summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.gitattributes20
-rw-r--r--.gitignore44
-rw-r--r--COPYING.LIB272
-rw-r--r--COPYING.LIBGLOSS73
-rw-r--r--COPYING.NEWLIB130
-rw-r--r--ChangeLog86
-rw-r--r--Makefile.def82
-rw-r--r--Makefile.in13071
-rw-r--r--Makefile.tpl219
-rwxr-xr-xcompile236
-rw-r--r--config-ml.in74
-rwxr-xr-xconfig.guess367
-rwxr-xr-xconfig.sub77
-rw-r--r--config/ChangeLog178
-rw-r--r--[-rwxr-xr-x]config/acinclude.m40
-rw-r--r--config/bitfields.m425
-rw-r--r--config/bootstrap-asan.mk4
-rw-r--r--config/bootstrap-lto-noplugin.mk6
-rw-r--r--config/bootstrap-lto.mk10
-rw-r--r--config/bootstrap-mpx.mk9
-rw-r--r--config/bootstrap-ubsan.mk8
-rw-r--r--config/dfp.m42
-rw-r--r--config/elf.m47
-rw-r--r--config/gcc-plugin.m4113
-rw-r--r--config/gettext.m44
-rw-r--r--config/iconv.m447
-rw-r--r--config/isl.m463
-rw-r--r--config/mh-alpha-linux3
-rw-r--r--config/mh-darwin30
-rw-r--r--config/mt-gnu2
-rw-r--r--config/mt-nios2-elf5
-rw-r--r--config/mt-ospace4
-rw-r--r--config/picflag.m415
-rw-r--r--config/plugins.m426
-rw-r--r--config/po.m44
-rw-r--r--config/sjlj.m412
-rw-r--r--config/stdint.m42
-rw-r--r--config/target-posix12
-rw-r--r--config/tcl.m44
-rw-r--r--config/warnings.m4112
-rw-r--r--config/zlib.m427
-rwxr-xr-xconfigure1335
-rw-r--r--configure.ac686
-rwxr-xr-xdepcomp544
-rw-r--r--etc/ChangeLog24
-rw-r--r--etc/Makefile.in182
-rw-r--r--etc/configbuild.ein149
-rw-r--r--etc/configbuild.fig50
-rw-r--r--etc/configbuild.jinbin11123 -> 0 bytes
-rw-r--r--etc/configbuild.tin9
-rw-r--r--etc/configdev.ein185
-rw-r--r--etc/configdev.fig80
-rw-r--r--etc/configdev.jinbin17967 -> 0 bytes
-rw-r--r--etc/configdev.tin17
-rw-r--r--etc/configure.texi2646
-rw-r--r--etc/fdl.texi505
-rw-r--r--etc/gnu-oids.texi52
-rw-r--r--etc/make-stds.texi1135
-rw-r--r--etc/standards.texi4235
-rw-r--r--etc/texi2pod.pl2
-rw-r--r--include/ChangeLog329
-rw-r--r--include/ChangeLog-91036
-rw-r--r--include/ChangeLog.jit11
-rw-r--r--include/ansidecl.h170
-rw-r--r--include/demangle.h34
-rw-r--r--include/dwarf2.def31
-rw-r--r--include/dwarf2.h10
-rw-r--r--include/dyn-string.h3
-rw-r--r--include/elf/ChangeLog9
-rw-r--r--include/elf/mips.h14
-rw-r--r--include/elf/rx.h5
-rw-r--r--include/environ.h33
-rw-r--r--include/fibheap.h3
-rw-r--r--include/filenames.h4
-rw-r--r--include/floatformat.h11
-rw-r--r--include/fnmatch.h2
-rw-r--r--include/gcc-c-fe.def197
-rw-r--r--include/gcc-c-interface.h220
-rw-r--r--include/gcc-interface.h127
-rw-r--r--include/gdb/gdb-index.h4
-rw-r--r--include/getopt.h3
-rw-r--r--include/gomp-constants.h257
-rw-r--r--include/hashtab.h13
-rw-r--r--include/leb128.h2
-rw-r--r--include/libiberty.h103
-rw-r--r--include/longlong.h1773
-rw-r--r--include/lto-symtab.h2
-rw-r--r--include/md5.h2
-rw-r--r--include/objalloc.h2
-rw-r--r--include/obstack.h914
-rw-r--r--include/opcode/ChangeLog13
-rw-r--r--include/opcode/mips.h83
-rw-r--r--include/opcode/xgate.h52
-rw-r--r--include/partition.h6
-rw-r--r--include/plugin-api.h29
-rw-r--r--include/safe-ctype.h2
-rw-r--r--include/sha1.h3
-rw-r--r--include/simple-object.h2
-rw-r--r--include/sort.h2
-rw-r--r--include/splay-tree.h23
-rw-r--r--include/symcat.h2
-rw-r--r--include/timeval-utils.h2
-rw-r--r--include/vtv-change-permission.h7
-rw-r--r--include/xregex2.h3
-rw-r--r--include/xtensa-config.h3
-rwxr-xr-xinstall-sh385
-rw-r--r--libgloss/ChangeLog6439
-rw-r--r--libgloss/ChangeLog-20157119
-rw-r--r--libgloss/README3
-rw-r--r--libgloss/aarch64/Makefile.in17
-rw-r--r--libgloss/aarch64/cpu-init/rdimon-aem-el3.S4
-rw-r--r--libgloss/aarch64/ftruncate.c34
-rw-r--r--libgloss/aarch64/truncate.c34
-rw-r--r--libgloss/arc/Makefile.in121
-rw-r--r--libgloss/arc/aclocal.m4404
-rwxr-xr-xlibgloss/arc/configure3872
-rw-r--r--libgloss/arc/configure.in55
-rw-r--r--libgloss/arc/crt0.S224
-rw-r--r--libgloss/arc/libcfunc.c92
-rw-r--r--libgloss/arc/nano.specs18
-rw-r--r--libgloss/arc/nsim-syscall.h457
-rw-r--r--libgloss/arc/nsim-syscalls.c235
-rw-r--r--libgloss/arc/nsim.specs11
-rw-r--r--libgloss/arc/sbrk.c61
-rw-r--r--libgloss/arm/Makefile.in53
-rw-r--r--libgloss/arm/arm.h36
-rw-r--r--libgloss/arm/configure2769
-rw-r--r--libgloss/arm/configure.in19
-rw-r--r--libgloss/arm/cpu-init/Makefile.in87
-rw-r--r--libgloss/arm/cpu-init/rdimon-aem.S539
-rw-r--r--libgloss/arm/crt0.S38
-rw-r--r--libgloss/arm/elf-aprofile-validation.specs22
-rw-r--r--libgloss/arm/elf-aprofile-ve.specs22
-rw-r--r--libgloss/arm/elf-nano.specs22
-rw-r--r--libgloss/arm/elf-rdimon.specs13
-rw-r--r--libgloss/arm/ftruncate.c34
-rw-r--r--libgloss/arm/linux-crt0.c2
-rw-r--r--libgloss/arm/redboot-crt0.S8
-rw-r--r--libgloss/arm/swi.h2
-rw-r--r--libgloss/arm/syscall.h6
-rw-r--r--libgloss/arm/syscalls.c15
-rw-r--r--libgloss/arm/trap.S2
-rw-r--r--libgloss/arm/truncate.c34
-rw-r--r--libgloss/bfin/Makefile.in2
-rwxr-xr-xlibgloss/configure21
-rw-r--r--libgloss/configure.in13
-rw-r--r--libgloss/d30v/syscalls.c2
-rw-r--r--libgloss/ft32/Makefile.in129
-rw-r--r--libgloss/ft32/aclocal.m4404
-rwxr-xr-xlibgloss/ft32/configure3975
-rw-r--r--libgloss/ft32/configure.in55
-rw-r--r--libgloss/ft32/crt0.S73
-rw-r--r--libgloss/ft32/fstat.c30
-rw-r--r--libgloss/ft32/getpid.c25
-rw-r--r--libgloss/ft32/isatty.c27
-rw-r--r--libgloss/ft32/kill.c30
-rw-r--r--libgloss/ft32/sbrk.c45
-rw-r--r--libgloss/ft32/sim-close.S37
-rw-r--r--libgloss/ft32/sim-exit.S34
-rw-r--r--libgloss/ft32/sim-inbyte.c26
-rw-r--r--libgloss/ft32/sim-lseek.S32
-rw-r--r--libgloss/ft32/sim-lseek.c32
-rw-r--r--libgloss/ft32/sim-open.S39
-rw-r--r--libgloss/ft32/sim-read.S39
-rw-r--r--libgloss/ft32/sim-time.c47
-rw-r--r--libgloss/ft32/sim-unlink.S37
-rw-r--r--libgloss/ft32/sim-write.S56
-rw-r--r--libgloss/ft32/sim.ld56
-rw-r--r--libgloss/ft32/stat.c30
-rw-r--r--libgloss/i960/mon960.c2
-rw-r--r--libgloss/libnosys/Makefile.in3
-rw-r--r--libgloss/libnosys/nosys.specs11
-rw-r--r--libgloss/libnosys/sbrk.c16
-rw-r--r--libgloss/lm32/Makefile.in6
-rw-r--r--libgloss/m68k/io-stat.c2
-rw-r--r--libgloss/mcore/syscall.h43
-rw-r--r--libgloss/mep/Makefile.in6
-rw-r--r--libgloss/mips/Makefile.in3
-rw-r--r--libgloss/mips/abiflags.S82
-rw-r--r--libgloss/mips/cfe_api.h1
-rw-r--r--libgloss/mips/crt0.S152
-rw-r--r--libgloss/mips/mti32.ld6
-rw-r--r--libgloss/mips/mti64.ld6
-rw-r--r--libgloss/mips/mti64_64.ld6
-rw-r--r--libgloss/mips/mti64_n32.ld6
-rw-r--r--libgloss/mips/regs.S2
-rw-r--r--libgloss/moxie/Makefile.in16
-rw-r--r--libgloss/moxie/configure16
-rw-r--r--libgloss/moxie/configure.in15
-rw-r--r--libgloss/moxie/crt0.S4
-rw-r--r--libgloss/moxie/moxiebox.ld232
-rw-r--r--libgloss/msp430/Makefile.in58
-rw-r--r--libgloss/msp430/cio.S (renamed from libgloss/msp430/cio.c)25
-rw-r--r--libgloss/msp430/ciosyscalls.S (renamed from libgloss/msp430/nosyscalls.S)75
-rw-r--r--libgloss/msp430/crt0.S187
-rw-r--r--libgloss/msp430/crt_bss.S44
-rw-r--r--libgloss/msp430/crtn.S2
-rw-r--r--libgloss/msp430/intr_vectors.ld71
-rw-r--r--libgloss/msp430/memmodel.h29
-rw-r--r--libgloss/msp430/msp430-sim.ld140
-rw-r--r--libgloss/msp430/msp430.ld188
-rw-r--r--libgloss/msp430/msp430F5438A-l.ld203
-rw-r--r--libgloss/msp430/msp430F5438A-s.ld189
-rw-r--r--libgloss/msp430/msp430xl-sim.ld349
-rw-r--r--libgloss/msp430/syscalls.S7
-rw-r--r--libgloss/msp430/unlink.c25
-rw-r--r--libgloss/mt/Makefile.in6
-rw-r--r--libgloss/mt/stat.c2
-rw-r--r--libgloss/nds32/Makefile.in59
-rw-r--r--libgloss/nds32/_argv.S (renamed from libgloss/nds32/syscall_exit.S)13
-rw-r--r--libgloss/nds32/_argvlen.S36
-rw-r--r--libgloss/nds32/_chdir.S36
-rw-r--r--libgloss/nds32/_chmod.S (renamed from libgloss/nds32/syscall_kill.S)26
-rw-r--r--libgloss/nds32/_close.S (renamed from libgloss/nds32/syscall_link.S)31
-rw-r--r--libgloss/nds32/_exit.S44
-rw-r--r--libgloss/nds32/_fstat.S (renamed from libgloss/nds32/syscall_argv.S)32
-rw-r--r--libgloss/nds32/_getpid.S (renamed from libgloss/nds32/syscall_getpid.S)25
-rw-r--r--libgloss/nds32/_gettimeofday.S (renamed from libgloss/nds32/syscall_gettimeofday.S)27
-rw-r--r--libgloss/nds32/_isatty.S (renamed from libgloss/nds32/syscall_isatty.S)47
-rw-r--r--libgloss/nds32/_kill.S46
-rw-r--r--libgloss/nds32/_link.S (renamed from libgloss/nds32/syscall_argvlen.S)38
-rw-r--r--libgloss/nds32/_lseek.S42
-rw-r--r--libgloss/nds32/_open.S42
-rw-r--r--libgloss/nds32/_read.S42
-rw-r--r--libgloss/nds32/_rename.S42
-rw-r--r--libgloss/nds32/_sbrk.S (renamed from libgloss/nds32/syscall_sbrk.S)6
-rw-r--r--libgloss/nds32/_stat.S42
-rw-r--r--libgloss/nds32/_system.S42
-rw-r--r--libgloss/nds32/_time.S36
-rw-r--r--libgloss/nds32/_times.S (renamed from libgloss/nds32/syscall_times.S)32
-rw-r--r--libgloss/nds32/_unlink.S43
-rw-r--r--libgloss/nds32/_utime.S36
-rw-r--r--libgloss/nds32/_write.S42
-rw-r--r--libgloss/nds32/crt0.S157
-rw-r--r--libgloss/nds32/crt1.S161
-rw-r--r--libgloss/nds32/syscall_chmod.S53
-rw-r--r--libgloss/nds32/syscall_close.S53
-rw-r--r--libgloss/nds32/syscall_error_handler.S (renamed from libgloss/nds32/syscall_chdir.S)35
-rw-r--r--libgloss/nds32/syscall_extra.h28
-rw-r--r--libgloss/nds32/syscall_fstat.S53
-rw-r--r--libgloss/nds32/syscall_lseek.S53
-rw-r--r--libgloss/nds32/syscall_open.S53
-rw-r--r--libgloss/nds32/syscall_rename.S53
-rw-r--r--libgloss/nds32/syscall_stat.S53
-rw-r--r--libgloss/nds32/syscall_system.S53
-rw-r--r--libgloss/nds32/syscall_time.S53
-rw-r--r--libgloss/nds32/syscall_unlink.S53
-rw-r--r--libgloss/nds32/syscall_utime.S53
-rw-r--r--libgloss/nds32/syscall_write.S53
-rw-r--r--libgloss/nds32/vh.h126
-rw-r--r--libgloss/or1k/Makefile.in146
-rw-r--r--libgloss/or1k/README77
-rw-r--r--libgloss/or1k/aclocal.m4409
-rw-r--r--libgloss/or1k/board.h35
-rw-r--r--libgloss/or1k/boards/README65
-rw-r--r--libgloss/or1k/boards/atlys.S55
-rw-r--r--libgloss/or1k/boards/de0_nano.S57
-rw-r--r--libgloss/or1k/boards/ml501.S55
-rw-r--r--libgloss/or1k/boards/ml509.S55
-rw-r--r--libgloss/or1k/boards/optimsoc.S97
-rw-r--r--libgloss/or1k/boards/or1ksim-uart.S55
-rw-r--r--libgloss/or1k/boards/or1ksim.S56
-rw-r--r--libgloss/or1k/boards/ordb1a3pe1500.S55
-rw-r--r--libgloss/or1k/boards/ordb2a.S55
-rw-r--r--libgloss/or1k/boards/orpsocrefdesign.S55
-rw-r--r--libgloss/or1k/boards/tmpl.S60
-rw-r--r--libgloss/or1k/boards/tmpl.c40
-rw-r--r--libgloss/or1k/caches-asm.S233
-rwxr-xr-xlibgloss/or1k/configure3892
-rw-r--r--libgloss/or1k/configure.in81
-rw-r--r--libgloss/or1k/crt0.S671
-rw-r--r--libgloss/or1k/exceptions-asm.S230
-rw-r--r--libgloss/or1k/exceptions.c21
-rw-r--r--libgloss/or1k/impure.c123
-rw-r--r--libgloss/or1k/include/or1k-asm.h83
-rw-r--r--libgloss/or1k/include/or1k-nop.h35
-rw-r--r--libgloss/or1k/include/or1k-sprs.h2417
-rw-r--r--libgloss/or1k/include/or1k-support.h665
-rw-r--r--libgloss/or1k/interrupts-asm.S162
-rw-r--r--libgloss/or1k/interrupts.c69
-rw-r--r--libgloss/or1k/mmu-asm.S67
-rw-r--r--libgloss/or1k/or1k-internals.h67
-rw-r--r--libgloss/or1k/or1k_uart.c167
-rw-r--r--libgloss/or1k/or1k_uart.h43
-rw-r--r--libgloss/or1k/outbyte.S34
-rw-r--r--libgloss/or1k/sbrk.c53
-rw-r--r--libgloss/or1k/sync-asm.S135
-rw-r--r--libgloss/or1k/syscalls.c160
-rw-r--r--libgloss/or1k/timer.c186
-rw-r--r--libgloss/or1k/util.c97
-rw-r--r--libgloss/rl78/Makefile.in5
-rw-r--r--libgloss/rl78/crt0.S70
-rw-r--r--libgloss/rl78/rl78-sim.ld40
-rw-r--r--libgloss/rl78/rl78-sys.h18
-rw-r--r--libgloss/rl78/rl78.ld42
-rw-r--r--libgloss/rl78/swrite.S41
-rw-r--r--libgloss/rl78/vregs.h56
-rw-r--r--libgloss/rl78/write.c8
-rw-r--r--libgloss/rx/crt0.S13
-rw-r--r--libgloss/rx/rx-sim.ld24
-rw-r--r--libgloss/rx/rx.ld24
-rw-r--r--libgloss/sparc/crt0.S3
-rw-r--r--libgloss/sparc/cygmon-crt0.S3
-rw-r--r--libgloss/sparc/erc32-crt0.S3
-rw-r--r--libgloss/sparc/traps.S3
-rw-r--r--libgloss/spu/lstat.c2
-rw-r--r--libgloss/v850/crt0.S9
-rw-r--r--libgloss/v850/sim.ld3
-rw-r--r--libgloss/visium/Makefile.in129
-rw-r--r--libgloss/visium/_exit.c41
-rw-r--r--libgloss/visium/aclocal.m4344
-rwxr-xr-xlibgloss/visium/configure3145
-rw-r--r--libgloss/visium/configure.in58
-rw-r--r--libgloss/visium/crt0.S88
-rw-r--r--libgloss/visium/gettod.c45
-rw-r--r--libgloss/visium/io-gdb.c140
-rw-r--r--libgloss/visium/io-stubs.c180
-rw-r--r--libgloss/visium/io.h141
-rw-r--r--libgloss/visium/sbrk.c56
-rw-r--r--libgloss/visium/serial-inbyte.c47
-rw-r--r--libgloss/visium/serial-outbyte.c39
-rw-r--r--libgloss/visium/syscall.h48
-rw-r--r--libgloss/visium/syscalls.c341
-rw-r--r--libtool.m424
-rw-r--r--ltmain.sh2
-rwxr-xr-xmissing461
-rwxr-xr-xmkinstalldirs4
-rwxr-xr-xmove-if-change6
-rw-r--r--newlib/ChangeLog25122
-rw-r--r--newlib/ChangeLog-201527735
-rw-r--r--newlib/HOWTO15
-rw-r--r--newlib/Makefile.am23
-rw-r--r--newlib/Makefile.in61
-rw-r--r--newlib/Makefile.shared21
-rw-r--r--newlib/NEWS50
-rw-r--r--newlib/README102
-rw-r--r--newlib/_newlib_version.hin11
-rw-r--r--newlib/acconfig.h6
-rw-r--r--newlib/acinclude.m46
-rwxr-xr-xnewlib/configure138
-rw-r--r--newlib/configure.host112
-rw-r--r--newlib/configure.in60
-rwxr-xr-xnewlib/doc/configure20
-rw-r--r--newlib/doc/doc.str10
-rw-r--r--newlib/doc/makedoc.c32
-rwxr-xr-xnewlib/iconvdata/configure42
-rw-r--r--newlib/libc/argz/Makefile.am16
-rw-r--r--newlib/libc/argz/Makefile.in25
-rw-r--r--newlib/libc/argz/argz_replace.c12
-rw-r--r--newlib/libc/argz/envz_merge.c1
-rwxr-xr-xnewlib/libc/configure91
-rw-r--r--newlib/libc/configure.in15
-rw-r--r--newlib/libc/ctype/Makefile.am16
-rw-r--r--newlib/libc/ctype/Makefile.in20
-rw-r--r--newlib/libc/ctype/ctype.tex4
-rw-r--r--newlib/libc/ctype/iswalpha.c2
-rw-r--r--newlib/libc/ctype/jp2uc.c1
-rw-r--r--newlib/libc/errno/Makefile.am15
-rw-r--r--newlib/libc/errno/Makefile.in18
-rw-r--r--newlib/libc/iconv/Makefile.am9
-rw-r--r--newlib/libc/iconv/Makefile.in26
-rw-r--r--newlib/libc/iconv/ccs/Makefile.am18
-rw-r--r--newlib/libc/iconv/ccs/Makefile.in25
-rw-r--r--newlib/libc/iconv/ccs/binary/Makefile.in21
-rw-r--r--newlib/libc/iconv/ces/Makefile.am19
-rw-r--r--newlib/libc/iconv/ces/Makefile.in17
-rw-r--r--newlib/libc/iconv/iconv.tex3
-rw-r--r--newlib/libc/iconv/lib/Makefile.am14
-rw-r--r--newlib/libc/iconv/lib/Makefile.in15
-rw-r--r--newlib/libc/iconv/lib/iconv.c21
-rw-r--r--newlib/libc/include/_ansi.h6
-rw-r--r--newlib/libc/include/_newlib_version.h2
-rw-r--r--newlib/libc/include/complex.h37
-rw-r--r--newlib/libc/include/cpio.h30
-rw-r--r--newlib/libc/include/ctype.h13
-rw-r--r--newlib/libc/include/dirent.h3
-rw-r--r--newlib/libc/include/fnmatch.h6
-rw-r--r--newlib/libc/include/getopt.h2
-rw-r--r--newlib/libc/include/glob.h3
-rw-r--r--newlib/libc/include/grp.h20
-rw-r--r--newlib/libc/include/iconv.h3
-rw-r--r--newlib/libc/include/ieeefp.h103
-rw-r--r--newlib/libc/include/inttypes.h287
-rw-r--r--newlib/libc/include/libgen.h16
-rw-r--r--newlib/libc/include/limits.h6
-rw-r--r--newlib/libc/include/machine/_arc4random.h1
-rw-r--r--newlib/libc/include/machine/_default_types.h168
-rw-r--r--newlib/libc/include/machine/_endian.h35
-rw-r--r--newlib/libc/include/machine/_time.h3
-rw-r--r--newlib/libc/include/machine/endian.h69
-rw-r--r--newlib/libc/include/machine/ieeefp.h12
-rw-r--r--newlib/libc/include/machine/setjmp.h65
-rw-r--r--newlib/libc/include/machine/time.h12
-rw-r--r--newlib/libc/include/machine/types.h33
-rw-r--r--newlib/libc/include/math.h193
-rw-r--r--newlib/libc/include/paths.h2
-rw-r--r--newlib/libc/include/pthread.h102
-rw-r--r--newlib/libc/include/pwd.h13
-rw-r--r--newlib/libc/include/reent.h1
-rw-r--r--newlib/libc/include/regex.h7
-rw-r--r--newlib/libc/include/search.h11
-rw-r--r--newlib/libc/include/setjmp.h5
-rw-r--r--newlib/libc/include/signal.h7
-rw-r--r--newlib/libc/include/spawn.h119
-rw-r--r--newlib/libc/include/stdatomic.h193
-rw-r--r--newlib/libc/include/stdint.h394
-rw-r--r--newlib/libc/include/stdio.h267
-rw-r--r--newlib/libc/include/stdio_ext.h36
-rw-r--r--newlib/libc/include/stdlib.h183
-rw-r--r--newlib/libc/include/string.h117
-rw-r--r--newlib/libc/include/strings.h11
-rw-r--r--newlib/libc/include/sys/_default_fcntl.h75
-rw-r--r--newlib/libc/include/sys/_intsup.h209
-rw-r--r--newlib/libc/include/sys/_sigset.h43
-rw-r--r--newlib/libc/include/sys/_stdint.h80
-rw-r--r--newlib/libc/include/sys/_timespec.h50
-rw-r--r--newlib/libc/include/sys/_timeval.h89
-rw-r--r--newlib/libc/include/sys/_types.h151
-rw-r--r--newlib/libc/include/sys/cdefs.h408
-rw-r--r--newlib/libc/include/sys/config.h18
-rw-r--r--newlib/libc/include/sys/errno.h38
-rw-r--r--newlib/libc/include/sys/features.h399
-rw-r--r--newlib/libc/include/sys/param.h10
-rw-r--r--newlib/libc/include/sys/reent.h26
-rw-r--r--newlib/libc/include/sys/resource.h2
-rw-r--r--newlib/libc/include/sys/sched.h2
-rw-r--r--newlib/libc/include/sys/select.h87
-rw-r--r--newlib/libc/include/sys/signal.h102
-rw-r--r--newlib/libc/include/sys/stat.h26
-rw-r--r--newlib/libc/include/sys/time.h341
-rw-r--r--newlib/libc/include/sys/timeb.h9
-rw-r--r--newlib/libc/include/sys/times.h9
-rw-r--r--newlib/libc/include/sys/timespec.h63
-rw-r--r--newlib/libc/include/sys/tree.h801
-rw-r--r--newlib/libc/include/sys/types.h318
-rw-r--r--newlib/libc/include/sys/unistd.h127
-rw-r--r--newlib/libc/include/sys/wait.h2
-rw-r--r--newlib/libc/include/tar.h4
-rw-r--r--newlib/libc/include/tgmath.h7
-rw-r--r--newlib/libc/include/threads.h93
-rw-r--r--newlib/libc/include/time.h48
-rw-r--r--newlib/libc/include/wchar.h152
-rw-r--r--newlib/libc/include/wordexp.h2
-rw-r--r--newlib/libc/libc.texinfo19
-rw-r--r--newlib/libc/locale/Makefile.am16
-rw-r--r--newlib/libc/locale/Makefile.in17
-rw-r--r--newlib/libc/locale/ldpart.c5
-rw-r--r--newlib/libc/locale/locale.c2
-rw-r--r--newlib/libc/locale/locale.tex2
-rwxr-xr-xnewlib/libc/machine/a29k/configure20
-rw-r--r--newlib/libc/machine/aarch64/Makefile.am14
-rw-r--r--newlib/libc/machine/aarch64/Makefile.in111
-rwxr-xr-xnewlib/libc/machine/aarch64/configure20
-rw-r--r--newlib/libc/machine/aarch64/machine/_types.h2
-rw-r--r--newlib/libc/machine/aarch64/memchr-stub.c31
-rw-r--r--newlib/libc/machine/aarch64/memchr.S176
-rw-r--r--newlib/libc/machine/aarch64/memcpy.S303
-rw-r--r--newlib/libc/machine/aarch64/memmove.S390
-rw-r--r--newlib/libc/machine/aarch64/memset.S375
-rw-r--r--newlib/libc/machine/aarch64/rawmemchr-stub.c31
-rw-r--r--newlib/libc/machine/aarch64/rawmemchr.S68
-rw-r--r--newlib/libc/machine/aarch64/stpcpy-stub.c31
-rw-r--r--newlib/libc/machine/aarch64/stpcpy.S34
-rw-r--r--newlib/libc/machine/aarch64/strchr-stub.c31
-rw-r--r--newlib/libc/machine/aarch64/strchr.S164
-rw-r--r--newlib/libc/machine/aarch64/strchrnul-stub.c31
-rw-r--r--newlib/libc/machine/aarch64/strchrnul.S149
-rw-r--r--newlib/libc/machine/aarch64/strcpy-stub.c31
-rw-r--r--newlib/libc/machine/aarch64/strcpy.S341
-rw-r--r--newlib/libc/machine/aarch64/strlen.S240
-rw-r--r--newlib/libc/machine/aarch64/strrchr-stub.c31
-rw-r--r--newlib/libc/machine/aarch64/strrchr.S182
-rw-r--r--newlib/libc/machine/arc/Makefile.am48
-rw-r--r--newlib/libc/machine/arc/Makefile.in664
-rw-r--r--newlib/libc/machine/arc/aclocal.m4 (renamed from newlib/libc/sys/arc/aclocal.m4)0
-rw-r--r--newlib/libc/machine/arc/asm.h82
-rwxr-xr-xnewlib/libc/machine/arc/configure4748
-rw-r--r--newlib/libc/machine/arc/configure.in13
-rw-r--r--newlib/libc/machine/arc/memcmp-bs-norm.S225
-rw-r--r--newlib/libc/machine/arc/memcmp-stub.c36
-rw-r--r--newlib/libc/machine/arc/memcmp.S154
-rw-r--r--newlib/libc/machine/arc/memcpy-archs.S268
-rw-r--r--newlib/libc/machine/arc/memcpy-bs.S105
-rw-r--r--newlib/libc/machine/arc/memcpy-stub.c36
-rw-r--r--newlib/libc/machine/arc/memcpy.S111
-rw-r--r--newlib/libc/machine/arc/memset-archs.S146
-rw-r--r--newlib/libc/machine/arc/memset-bs.S154
-rw-r--r--newlib/libc/machine/arc/memset-stub.c36
-rw-r--r--newlib/libc/machine/arc/memset.S110
-rw-r--r--newlib/libc/machine/arc/setjmp.S165
-rw-r--r--newlib/libc/machine/arc/strchr-bs-norm.S166
-rw-r--r--newlib/libc/machine/arc/strchr-bs.S202
-rw-r--r--newlib/libc/machine/arc/strchr-stub.c36
-rw-r--r--newlib/libc/machine/arc/strchr.S208
-rw-r--r--newlib/libc/machine/arc/strcmp-archs.S109
-rw-r--r--newlib/libc/machine/arc/strcmp-stub.c36
-rw-r--r--newlib/libc/machine/arc/strcmp.S133
-rw-r--r--newlib/libc/machine/arc/strcpy-bs-arc600.S120
-rw-r--r--newlib/libc/machine/arc/strcpy-bs.S103
-rw-r--r--newlib/libc/machine/arc/strcpy-stub.c36
-rw-r--r--newlib/libc/machine/arc/strcpy.S90
-rw-r--r--newlib/libc/machine/arc/strlen-bs-norm.S116
-rw-r--r--newlib/libc/machine/arc/strlen-bs.S122
-rw-r--r--newlib/libc/machine/arc/strlen-stub.c36
-rw-r--r--newlib/libc/machine/arc/strlen.S165
-rw-r--r--newlib/libc/machine/arc/strncpy-bs.S171
-rw-r--r--newlib/libc/machine/arc/strncpy-stub.c36
-rw-r--r--newlib/libc/machine/arc/strncpy.S134
-rw-r--r--newlib/libc/machine/arm/Makefile.am36
-rw-r--r--newlib/libc/machine/arm/Makefile.in128
-rw-r--r--newlib/libc/machine/arm/acle-compat.h182
-rw-r--r--newlib/libc/machine/arm/aeabi_memclr.c45
-rw-r--r--newlib/libc/machine/arm/aeabi_memcpy-armv7a.S286
-rw-r--r--newlib/libc/machine/arm/aeabi_memcpy.c64
-rw-r--r--newlib/libc/machine/arm/aeabi_memmove-arm.S64
-rw-r--r--newlib/libc/machine/arm/aeabi_memmove-soft.S52
-rw-r--r--newlib/libc/machine/arm/aeabi_memmove-thumb.S66
-rw-r--r--newlib/libc/machine/arm/aeabi_memmove-thumb2.S65
-rw-r--r--newlib/libc/machine/arm/aeabi_memmove.c63
-rw-r--r--newlib/libc/machine/arm/aeabi_memset-arm.S107
-rw-r--r--newlib/libc/machine/arm/aeabi_memset-soft.S52
-rw-r--r--newlib/libc/machine/arm/aeabi_memset-thumb.S120
-rw-r--r--newlib/libc/machine/arm/aeabi_memset-thumb2.S107
-rw-r--r--newlib/libc/machine/arm/aeabi_memset.c65
-rw-r--r--newlib/libc/machine/arm/arm_asm.h38
-rwxr-xr-xnewlib/libc/machine/arm/configure23
-rw-r--r--newlib/libc/machine/arm/configure.in2
-rw-r--r--newlib/libc/machine/arm/machine/_endian.h39
-rw-r--r--newlib/libc/machine/arm/machine/param.h6
-rw-r--r--newlib/libc/machine/arm/memchr-stub.c42
-rw-r--r--newlib/libc/machine/arm/memchr.S41
-rw-r--r--newlib/libc/machine/arm/memcpy-stub.c71
-rw-r--r--newlib/libc/machine/arm/memcpy.S18
-rw-r--r--newlib/libc/machine/arm/setjmp.S6
-rw-r--r--newlib/libc/machine/arm/strcmp-arm-tiny.S47
-rw-r--r--newlib/libc/machine/arm/strcmp-armv4.S382
-rw-r--r--newlib/libc/machine/arm/strcmp-armv4t.S54
-rw-r--r--newlib/libc/machine/arm/strcmp-armv6.S470
-rw-r--r--newlib/libc/machine/arm/strcmp-armv6m.S141
-rw-r--r--newlib/libc/machine/arm/strcmp-armv7.S469
-rw-r--r--newlib/libc/machine/arm/strcmp-armv7m.S378
-rw-r--r--newlib/libc/machine/arm/strcmp.S782
-rw-r--r--newlib/libc/machine/arm/strlen-armv7.S43
-rw-r--r--newlib/libc/machine/arm/strlen-stub.c (renamed from newlib/libc/machine/arm/strlen.c)43
-rw-r--r--newlib/libc/machine/arm/strlen-thumb1-Os.S50
-rw-r--r--newlib/libc/machine/arm/strlen-thumb2-Os.S54
-rw-r--r--newlib/libc/machine/arm/strlen.S51
-rwxr-xr-xnewlib/libc/machine/bfin/configure20
-rwxr-xr-xnewlib/libc/machine/configure54
-rw-r--r--newlib/libc/machine/configure.in4
-rw-r--r--newlib/libc/machine/cr16/configure20
-rwxr-xr-xnewlib/libc/machine/cris/configure20
-rw-r--r--newlib/libc/machine/cris/sys/signal.h4
-rwxr-xr-xnewlib/libc/machine/crx/configure20
-rwxr-xr-xnewlib/libc/machine/d10v/configure20
-rwxr-xr-xnewlib/libc/machine/d30v/configure20
-rwxr-xr-xnewlib/libc/machine/epiphany/configure20
-rw-r--r--newlib/libc/machine/epiphany/machine/stdlib.h15
-rwxr-xr-xnewlib/libc/machine/fr30/configure20
-rwxr-xr-xnewlib/libc/machine/frv/configure20
-rw-r--r--newlib/libc/machine/ft32/Makefile.am16
-rw-r--r--newlib/libc/machine/ft32/Makefile.in472
-rw-r--r--newlib/libc/machine/ft32/aclocal.m41012
-rwxr-xr-xnewlib/libc/machine/ft32/configure4748
-rw-r--r--newlib/libc/machine/ft32/configure.in14
-rw-r--r--newlib/libc/machine/ft32/memcpy.S32
-rw-r--r--newlib/libc/machine/ft32/memset.S30
-rw-r--r--newlib/libc/machine/ft32/setjmp.S94
-rw-r--r--newlib/libc/machine/ft32/stpcmp.S22
-rw-r--r--newlib/libc/machine/ft32/strcmp.S22
-rw-r--r--newlib/libc/machine/ft32/strcpy.S23
-rw-r--r--newlib/libc/machine/ft32/strlen.S22
-rwxr-xr-xnewlib/libc/machine/h8300/configure20
-rwxr-xr-xnewlib/libc/machine/h8500/configure20
-rwxr-xr-xnewlib/libc/machine/hppa/configure20
-rw-r--r--newlib/libc/machine/i386/Makefile.in22
-rwxr-xr-xnewlib/libc/machine/i386/configure42
-rw-r--r--newlib/libc/machine/i386/f_atan2.S37
-rw-r--r--newlib/libc/machine/i386/f_atan2f.S37
-rw-r--r--newlib/libc/machine/i386/f_exp.c47
-rw-r--r--newlib/libc/machine/i386/f_expf.c47
-rw-r--r--newlib/libc/machine/i386/f_frexp.S48
-rw-r--r--newlib/libc/machine/i386/f_frexpf.S48
-rw-r--r--newlib/libc/machine/i386/f_ldexp.S38
-rw-r--r--newlib/libc/machine/i386/f_ldexpf.S38
-rw-r--r--newlib/libc/machine/i386/f_log.S40
-rw-r--r--newlib/libc/machine/i386/f_log10.S40
-rw-r--r--newlib/libc/machine/i386/f_log10f.S40
-rw-r--r--newlib/libc/machine/i386/f_logf.S40
-rw-r--r--newlib/libc/machine/i386/f_math.h29
-rw-r--r--newlib/libc/machine/i386/f_pow.c47
-rw-r--r--newlib/libc/machine/i386/f_powf.c47
-rw-r--r--newlib/libc/machine/i386/f_tan.S37
-rw-r--r--newlib/libc/machine/i386/f_tanf.S37
-rw-r--r--newlib/libc/machine/i386/i386mach.h2
-rw-r--r--newlib/libc/machine/i386/memchr.S23
-rw-r--r--newlib/libc/machine/i386/memcmp.S28
-rw-r--r--newlib/libc/machine/i386/memcpy.S12
-rw-r--r--newlib/libc/machine/i386/memmove.S27
-rw-r--r--newlib/libc/machine/i386/memset.S10
-rw-r--r--newlib/libc/machine/i386/setjmp.S41
-rw-r--r--newlib/libc/machine/i386/strchr.S25
-rw-r--r--newlib/libc/machine/i386/strlen.S6
-rwxr-xr-xnewlib/libc/machine/i960/configure20
-rwxr-xr-xnewlib/libc/machine/iq2000/configure20
-rwxr-xr-xnewlib/libc/machine/lm32/configure20
-rwxr-xr-xnewlib/libc/machine/m32c/configure20
-rwxr-xr-xnewlib/libc/machine/m32r/configure20
-rwxr-xr-xnewlib/libc/machine/m68hc11/configure20
-rwxr-xr-xnewlib/libc/machine/m68k/configure20
-rwxr-xr-xnewlib/libc/machine/m88k/configure20
-rwxr-xr-xnewlib/libc/machine/mep/configure20
-rw-r--r--newlib/libc/machine/microblaze/configure20
-rw-r--r--newlib/libc/machine/mips/Makefile.am2
-rw-r--r--newlib/libc/machine/mips/Makefile.in26
-rwxr-xr-xnewlib/libc/machine/mips/configure20
-rw-r--r--newlib/libc/machine/mips/memcpy.S436
-rw-r--r--newlib/libc/machine/mips/memset.S437
-rw-r--r--newlib/libc/machine/mips/memset.c142
-rw-r--r--newlib/libc/machine/mips/setjmp.S70
-rw-r--r--newlib/libc/machine/mips/strcmp.S261
-rw-r--r--newlib/libc/machine/mips/strcmp.c71
-rwxr-xr-xnewlib/libc/machine/mn10200/configure20
-rwxr-xr-xnewlib/libc/machine/mn10300/configure20
-rw-r--r--newlib/libc/machine/moxie/configure20
-rw-r--r--newlib/libc/machine/msp430/Makefile.in58
-rw-r--r--newlib/libc/machine/msp430/aclocal.m478
-rwxr-xr-xnewlib/libc/machine/msp430/configure448
-rw-r--r--newlib/libc/machine/msp430/setjmp.S2
-rwxr-xr-xnewlib/libc/machine/mt/configure20
-rw-r--r--newlib/libc/machine/nds32/Makefile.am4
-rw-r--r--newlib/libc/machine/nds32/Makefile.in20
-rwxr-xr-xnewlib/libc/machine/nds32/configure1086
-rw-r--r--newlib/libc/machine/nds32/configure.in12
-rw-r--r--newlib/libc/machine/nds32/setjmp.S115
-rwxr-xr-xnewlib/libc/machine/necv70/configure20
-rwxr-xr-xnewlib/libc/machine/nios2/configure20
-rw-r--r--newlib/libc/machine/or1k/Makefile.am16
-rw-r--r--newlib/libc/machine/or1k/Makefile.in440
-rw-r--r--newlib/libc/machine/or1k/aclocal.m41012
-rwxr-xr-xnewlib/libc/machine/or1k/configure4748
-rw-r--r--newlib/libc/machine/or1k/configure.in14
-rw-r--r--newlib/libc/machine/or1k/setjmp.S108
-rwxr-xr-xnewlib/libc/machine/powerpc/configure20
-rw-r--r--newlib/libc/machine/powerpc/vfscanf.c23
-rwxr-xr-xnewlib/libc/machine/rl78/configure20
-rw-r--r--newlib/libc/machine/rl78/setjmp.S21
-rwxr-xr-xnewlib/libc/machine/rx/configure20
-rw-r--r--newlib/libc/machine/rx/memchr.S19
-rw-r--r--newlib/libc/machine/rx/memcpy.S21
-rw-r--r--newlib/libc/machine/rx/memmove.S37
-rw-r--r--newlib/libc/machine/rx/mempcpy.S17
-rw-r--r--newlib/libc/machine/rx/memset.S3
-rw-r--r--newlib/libc/machine/rx/strcat.S19
-rw-r--r--newlib/libc/machine/rx/strcmp.S18
-rw-r--r--newlib/libc/machine/rx/strcpy.S14
-rw-r--r--newlib/libc/machine/rx/strlen.S13
-rw-r--r--newlib/libc/machine/rx/strncat.S23
-rw-r--r--newlib/libc/machine/rx/strncmp.S28
-rw-r--r--newlib/libc/machine/rx/strncpy.S23
-rwxr-xr-xnewlib/libc/machine/sh/configure20
-rwxr-xr-xnewlib/libc/machine/sparc/configure20
-rw-r--r--newlib/libc/machine/sparc/setjmp.S8
-rw-r--r--newlib/libc/machine/spu/configure20
-rw-r--r--newlib/libc/machine/spu/fgetpos.c4
-rw-r--r--newlib/libc/machine/spu/fgets.c4
-rw-r--r--newlib/libc/machine/spu/fopen.c4
-rw-r--r--newlib/libc/machine/spu/fputs.c4
-rw-r--r--newlib/libc/machine/spu/fread.c4
-rw-r--r--newlib/libc/machine/spu/freopen.c6
-rw-r--r--newlib/libc/machine/spu/fwrite.c2
-rw-r--r--newlib/libc/machine/spu/machine/_types.h10
-rw-r--r--newlib/libc/machine/spu/setbuf.c4
-rw-r--r--newlib/libc/machine/spu/spu_timer_internal.h12
-rw-r--r--newlib/libc/machine/spu/sys/dirent.h2
-rw-r--r--newlib/libc/machine/spu/vfprintf.c4
-rw-r--r--newlib/libc/machine/spu/vfscanf.c4
-rw-r--r--newlib/libc/machine/spu/vsnprintf.c4
-rw-r--r--newlib/libc/machine/spu/vsprintf.c4
-rw-r--r--newlib/libc/machine/spu/vsscanf.c4
-rwxr-xr-xnewlib/libc/machine/tic4x/configure20
-rwxr-xr-xnewlib/libc/machine/tic6x/configure20
-rwxr-xr-xnewlib/libc/machine/tic80/configure20
-rwxr-xr-xnewlib/libc/machine/v850/configure20
-rw-r--r--newlib/libc/machine/visium/Makefile.am16
-rw-r--r--newlib/libc/machine/visium/Makefile.in (renamed from newlib/libc/sys/arc/Makefile.in)59
-rw-r--r--newlib/libc/machine/visium/aclocal.m41012
-rwxr-xr-xnewlib/libc/machine/visium/configure4748
-rw-r--r--newlib/libc/machine/visium/configure.in14
-rw-r--r--newlib/libc/machine/visium/memcpy.c874
-rw-r--r--newlib/libc/machine/visium/memcpy.h31
-rw-r--r--newlib/libc/machine/visium/memmove.c52
-rw-r--r--newlib/libc/machine/visium/memset.c677
-rw-r--r--newlib/libc/machine/visium/memset.h31
-rw-r--r--newlib/libc/machine/visium/setjmp.S67
-rwxr-xr-xnewlib/libc/machine/w65/configure20
-rwxr-xr-xnewlib/libc/machine/x86_64/configure20
-rw-r--r--newlib/libc/machine/x86_64/x86_64mach.h2
-rw-r--r--newlib/libc/machine/xc16x/configure20
-rwxr-xr-xnewlib/libc/machine/xscale/configure20
-rw-r--r--newlib/libc/machine/xscale/machine/profile.h10
-rwxr-xr-xnewlib/libc/machine/xstormy16/configure20
-rwxr-xr-xnewlib/libc/machine/z8k/configure20
-rw-r--r--newlib/libc/misc/Makefile.am16
-rw-r--r--newlib/libc/misc/Makefile.in17
-rw-r--r--newlib/libc/posix/Makefile.am22
-rw-r--r--newlib/libc/posix/Makefile.in34
-rw-r--r--newlib/libc/posix/closedir.c16
-rw-r--r--newlib/libc/posix/glob.c4
-rw-r--r--newlib/libc/posix/posix.tex3
-rw-r--r--newlib/libc/posix/posix_spawn.c577
-rw-r--r--newlib/libc/posix/readdir.c3
-rw-r--r--newlib/libc/posix/readdir_r.c11
-rw-r--r--newlib/libc/posix/regcomp.c6
-rw-r--r--newlib/libc/posix/regerror.c7
-rw-r--r--newlib/libc/posix/regex.310
-rw-r--r--newlib/libc/posix/regexec.c10
-rw-r--r--newlib/libc/posix/wordexp.c2
-rw-r--r--newlib/libc/reent/Makefile.am15
-rw-r--r--newlib/libc/reent/Makefile.in21
-rw-r--r--newlib/libc/reent/execr.c2
-rw-r--r--newlib/libc/reent/signalr.c1
-rw-r--r--newlib/libc/search/Makefile.am42
-rw-r--r--newlib/libc/search/Makefile.in68
-rw-r--r--newlib/libc/search/bsd_qsort_r.c2
-rw-r--r--newlib/libc/search/hash.c20
-rw-r--r--newlib/libc/search/qsort.c100
-rw-r--r--newlib/libc/search/qsort_r.c57
-rw-r--r--newlib/libc/search/tdelete.c4
-rw-r--r--newlib/libc/signal/Makefile.am15
-rw-r--r--newlib/libc/signal/Makefile.in17
-rw-r--r--newlib/libc/signal/signal.tex2
-rw-r--r--newlib/libc/stdio/Makefile.am228
-rw-r--r--newlib/libc/stdio/Makefile.in730
-rw-r--r--newlib/libc/stdio/asnprintf.c21
-rw-r--r--newlib/libc/stdio/asprintf.c19
-rw-r--r--newlib/libc/stdio/clearerr.c23
-rw-r--r--newlib/libc/stdio/clearerr_u.c41
-rw-r--r--newlib/libc/stdio/dprintf.c24
-rw-r--r--newlib/libc/stdio/fclose.c22
-rw-r--r--newlib/libc/stdio/feof.c24
-rw-r--r--newlib/libc/stdio/feof_u.c40
-rw-r--r--newlib/libc/stdio/ferror.c24
-rw-r--r--newlib/libc/stdio/ferror_u.c41
-rw-r--r--newlib/libc/stdio/fflush.c63
-rw-r--r--newlib/libc/stdio/fflush_u.c28
-rw-r--r--newlib/libc/stdio/fgetc.c42
-rw-r--r--newlib/libc/stdio/fgetc_u.c56
-rw-r--r--newlib/libc/stdio/fgetpos.c12
-rw-r--r--newlib/libc/stdio/fgets.c61
-rw-r--r--newlib/libc/stdio/fgets_u.c28
-rw-r--r--newlib/libc/stdio/fgetwc.c81
-rw-r--r--newlib/libc/stdio/fgetwc_u.c49
-rw-r--r--newlib/libc/stdio/fgetws.c63
-rw-r--r--newlib/libc/stdio/fgetws_u.c28
-rw-r--r--newlib/libc/stdio/fileno.c24
-rw-r--r--newlib/libc/stdio/fileno_u.c46
-rw-r--r--newlib/libc/stdio/findfp.c38
-rw-r--r--newlib/libc/stdio/flags.c4
-rw-r--r--newlib/libc/stdio/fmemopen.c12
-rw-r--r--newlib/libc/stdio/fopen.c4
-rw-r--r--newlib/libc/stdio/fopencookie.c5
-rw-r--r--newlib/libc/stdio/fprintf.c19
-rw-r--r--newlib/libc/stdio/fputc.c41
-rw-r--r--newlib/libc/stdio/fputc_u.c56
-rw-r--r--newlib/libc/stdio/fputs.c58
-rw-r--r--newlib/libc/stdio/fputs_u.c28
-rw-r--r--newlib/libc/stdio/fputwc.c83
-rw-r--r--newlib/libc/stdio/fputwc_u.c51
-rw-r--r--newlib/libc/stdio/fputws.c59
-rw-r--r--newlib/libc/stdio/fputws_u.c28
-rw-r--r--newlib/libc/stdio/fread.c67
-rw-r--r--newlib/libc/stdio/fread_u.c28
-rw-r--r--newlib/libc/stdio/freopen.c37
-rw-r--r--newlib/libc/stdio/fscanf.c15
-rw-r--r--newlib/libc/stdio/fseek.c16
-rw-r--r--newlib/libc/stdio/fsetlocking.c90
-rw-r--r--newlib/libc/stdio/funopen.c9
-rw-r--r--newlib/libc/stdio/fvwrite.c29
-rw-r--r--newlib/libc/stdio/fvwrite.h2
-rw-r--r--newlib/libc/stdio/fwalk.c7
-rw-r--r--newlib/libc/stdio/fwide.c8
-rw-r--r--newlib/libc/stdio/fwprintf.c4
-rw-r--r--newlib/libc/stdio/fwrite.c65
-rw-r--r--newlib/libc/stdio/fwrite_u.c28
-rw-r--r--newlib/libc/stdio/fwscanf.c5
-rw-r--r--newlib/libc/stdio/getchar_u.c2
-rw-r--r--newlib/libc/stdio/gets.c12
-rw-r--r--newlib/libc/stdio/getwc_u.c53
-rw-r--r--newlib/libc/stdio/getwchar.c41
-rw-r--r--newlib/libc/stdio/getwchar_u.c51
-rw-r--r--newlib/libc/stdio/local.h52
-rw-r--r--newlib/libc/stdio/makebuf.c108
-rw-r--r--newlib/libc/stdio/nano-vfprintf.c665
-rw-r--r--newlib/libc/stdio/nano-vfprintf_float.c364
-rw-r--r--newlib/libc/stdio/nano-vfprintf_i.c250
-rw-r--r--newlib/libc/stdio/nano-vfprintf_local.h234
-rw-r--r--newlib/libc/stdio/nano-vfscanf.c498
-rw-r--r--newlib/libc/stdio/nano-vfscanf_float.c342
-rw-r--r--newlib/libc/stdio/nano-vfscanf_i.c232
-rw-r--r--newlib/libc/stdio/nano-vfscanf_local.h178
-rw-r--r--newlib/libc/stdio/open_memstream.c3
-rw-r--r--newlib/libc/stdio/printf.c15
-rw-r--r--newlib/libc/stdio/puts.c2
-rw-r--r--newlib/libc/stdio/putwc_u.c54
-rw-r--r--newlib/libc/stdio/putwchar.c41
-rw-r--r--newlib/libc/stdio/putwchar_u.c53
-rw-r--r--newlib/libc/stdio/scanf.c15
-rw-r--r--newlib/libc/stdio/setbuf.c4
-rw-r--r--newlib/libc/stdio/setvbuf.c116
-rw-r--r--newlib/libc/stdio/snprintf.c19
-rw-r--r--newlib/libc/stdio/sprintf.c124
-rw-r--r--newlib/libc/stdio/sscanf.c212
-rw-r--r--newlib/libc/stdio/stdio.c10
-rw-r--r--newlib/libc/stdio/stdio.tex10
-rw-r--r--newlib/libc/stdio/stdio_ext.c113
-rw-r--r--newlib/libc/stdio/swprintf.c83
-rw-r--r--newlib/libc/stdio/swscanf.c195
-rw-r--r--newlib/libc/stdio/vasnprintf.c12
-rw-r--r--newlib/libc/stdio/vasprintf.c12
-rw-r--r--newlib/libc/stdio/vdprintf.c15
-rw-r--r--newlib/libc/stdio/vfprintf.c22
-rw-r--r--newlib/libc/stdio/vfscanf.c72
-rw-r--r--newlib/libc/stdio/vfwprintf.c13
-rw-r--r--newlib/libc/stdio/vfwscanf.c84
-rw-r--r--newlib/libc/stdio/vprintf.c13
-rw-r--r--newlib/libc/stdio/vscanf.c12
-rw-r--r--newlib/libc/stdio/vsnprintf.c20
-rw-r--r--newlib/libc/stdio/vsprintf.c20
-rw-r--r--newlib/libc/stdio/vsscanf.c20
-rw-r--r--newlib/libc/stdio/vswprintf.c4
-rw-r--r--newlib/libc/stdio/vswscanf.c4
-rw-r--r--newlib/libc/stdio/vwprintf.c2
-rw-r--r--newlib/libc/stdio/vwscanf.c5
-rw-r--r--newlib/libc/stdio/wprintf.c2
-rw-r--r--newlib/libc/stdio/wscanf.c3
-rw-r--r--newlib/libc/stdio64/Makefile.am17
-rw-r--r--newlib/libc/stdio64/Makefile.in20
-rw-r--r--newlib/libc/stdio64/fdopen64.c2
-rw-r--r--newlib/libc/stdio64/freopen64.c19
-rw-r--r--newlib/libc/stdio64/fseeko64.c8
-rw-r--r--newlib/libc/stdio64/stdio64.c4
-rw-r--r--newlib/libc/stdio64/stdio64.tex6
-rw-r--r--newlib/libc/stdlib/Makefile.am31
-rw-r--r--newlib/libc/stdlib/Makefile.in196
-rw-r--r--newlib/libc/stdlib/__atexit.c26
-rw-r--r--newlib/libc/stdlib/aligned_alloc.c38
-rw-r--r--newlib/libc/stdlib/arc4random.c195
-rw-r--r--newlib/libc/stdlib/arc4random.h89
-rw-r--r--newlib/libc/stdlib/arc4random_uniform.c56
-rw-r--r--newlib/libc/stdlib/chacha_private.h221
-rw-r--r--newlib/libc/stdlib/cxa_atexit.c9
-rw-r--r--newlib/libc/stdlib/efgcvt.c6
-rw-r--r--newlib/libc/stdlib/gd_qnan.h20
-rw-r--r--newlib/libc/stdlib/gdtoa-hexnan.c18
-rw-r--r--newlib/libc/stdlib/gdtoa.h2
-rw-r--r--newlib/libc/stdlib/getopt.c44
-rw-r--r--newlib/libc/stdlib/itoa.c69
-rw-r--r--newlib/libc/stdlib/ldtoa.c4717
-rw-r--r--newlib/libc/stdlib/llabs.c2
-rw-r--r--newlib/libc/stdlib/local.h2
-rw-r--r--newlib/libc/stdlib/mbrlen.c2
-rw-r--r--newlib/libc/stdlib/mbrtowc.c6
-rw-r--r--newlib/libc/stdlib/mbsnrtowcs.c29
-rw-r--r--newlib/libc/stdlib/mbsrtowcs.c8
-rw-r--r--newlib/libc/stdlib/mbstowcs.c6
-rw-r--r--newlib/libc/stdlib/mbstowcs_r.c4
-rw-r--r--newlib/libc/stdlib/mbtowc.c6
-rw-r--r--newlib/libc/stdlib/mbtowc_r.c4
-rw-r--r--newlib/libc/stdlib/mprec.h7
-rw-r--r--newlib/libc/stdlib/nano-mallocr.c131
-rw-r--r--newlib/libc/stdlib/on_exit.c9
-rw-r--r--newlib/libc/stdlib/on_exit_args.c30
-rw-r--r--newlib/libc/stdlib/on_exit_args.h12
-rw-r--r--newlib/libc/stdlib/quick_exit.c82
-rw-r--r--newlib/libc/stdlib/random.c82
-rw-r--r--newlib/libc/stdlib/rpmatch.c88
-rw-r--r--newlib/libc/stdlib/setenv_r.c7
-rw-r--r--newlib/libc/stdlib/stdlib.tex18
-rw-r--r--newlib/libc/stdlib/strtod.c39
-rw-r--r--newlib/libc/stdlib/strtodg.c1147
-rw-r--r--newlib/libc/stdlib/strtol.c12
-rw-r--r--newlib/libc/stdlib/strtold.c49
-rw-r--r--newlib/libc/stdlib/strtoll.c8
-rw-r--r--newlib/libc/stdlib/strtoll_r.c4
-rw-r--r--newlib/libc/stdlib/strtorx.c130
-rw-r--r--newlib/libc/stdlib/strtoul.c14
-rw-r--r--newlib/libc/stdlib/strtoull.c10
-rw-r--r--newlib/libc/stdlib/strtoull_r.c4
-rw-r--r--newlib/libc/stdlib/utoa.c76
-rw-r--r--newlib/libc/stdlib/wcrtomb.c4
-rw-r--r--newlib/libc/stdlib/wcsnrtombs.c37
-rw-r--r--newlib/libc/stdlib/wcsrtombs.c8
-rw-r--r--newlib/libc/stdlib/wcstod.c20
-rw-r--r--newlib/libc/stdlib/wcstol.c11
-rw-r--r--newlib/libc/stdlib/wcstold.c76
-rw-r--r--newlib/libc/stdlib/wcstoll.c11
-rw-r--r--newlib/libc/stdlib/wcstombs.c6
-rw-r--r--newlib/libc/stdlib/wcstombs_r.c4
-rw-r--r--newlib/libc/stdlib/wcstoul.c12
-rw-r--r--newlib/libc/stdlib/wcstoull.c12
-rw-r--r--newlib/libc/stdlib/wctomb_r.c2
-rw-r--r--newlib/libc/string/Makefile.am22
-rw-r--r--newlib/libc/string/Makefile.in141
-rw-r--r--newlib/libc/string/explicit_bzero.c16
-rw-r--r--newlib/libc/string/gnu_basename.c26
-rw-r--r--newlib/libc/string/local.h17
-rw-r--r--newlib/libc/string/memccpy.c2
-rw-r--r--newlib/libc/string/memchr.c2
-rw-r--r--newlib/libc/string/memmove.c2
-rw-r--r--newlib/libc/string/memrchr.c2
-rw-r--r--newlib/libc/string/memset.c4
-rw-r--r--newlib/libc/string/rawmemchr.c4
-rw-r--r--newlib/libc/string/strcasestr.c5
-rw-r--r--newlib/libc/string/strerror.c91
-rw-r--r--newlib/libc/string/strings.tex12
-rw-r--r--newlib/libc/string/strtok.c12
-rw-r--r--newlib/libc/string/timingsafe_bcmp.c29
-rw-r--r--newlib/libc/string/timingsafe_memcmp.c46
-rw-r--r--newlib/libc/string/u_strerr.c5
-rw-r--r--newlib/libc/string/wcpcpy.c10
-rw-r--r--newlib/libc/string/wcpncpy.c11
-rw-r--r--newlib/libc/string/wcscat.c11
-rw-r--r--newlib/libc/string/wcscpy.c11
-rw-r--r--newlib/libc/string/wcsncat.c11
-rw-r--r--newlib/libc/string/wcsncpy.c11
-rw-r--r--newlib/libc/string/wcsstr.c11
-rw-r--r--newlib/libc/string/wcstok.c19
-rw-r--r--newlib/libc/string/wcsxfrm.c11
-rw-r--r--newlib/libc/string/wmemcpy.c11
-rw-r--r--newlib/libc/sys.tex201
-rwxr-xr-xnewlib/libc/sys/a29khif/configure20
-rw-r--r--newlib/libc/sys/arc/crt0.S75
-rw-r--r--newlib/libc/sys/arc/dummy.S1
-rw-r--r--newlib/libc/sys/arc/isatty.c18
-rw-r--r--newlib/libc/sys/arc/mem-layout.c21
-rw-r--r--newlib/libc/sys/arc/sbrk.c43
-rw-r--r--newlib/libc/sys/arc/sys/syscall.h53
-rw-r--r--newlib/libc/sys/arc/syscalls.c131
-rw-r--r--newlib/libc/sys/arm/Makefile.am2
-rw-r--r--newlib/libc/sys/arm/Makefile.in2
-rw-r--r--newlib/libc/sys/arm/arm.h36
-rwxr-xr-xnewlib/libc/sys/arm/configure20
-rw-r--r--newlib/libc/sys/arm/crt0.S12
-rw-r--r--newlib/libc/sys/arm/swi.h2
-rw-r--r--newlib/libc/sys/arm/sys/param.h26
-rw-r--r--newlib/libc/sys/arm/syscalls.c6
-rwxr-xr-xnewlib/libc/sys/configure54
-rw-r--r--newlib/libc/sys/configure.in4
-rwxr-xr-xnewlib/libc/sys/d10v/configure20
-rwxr-xr-xnewlib/libc/sys/decstation/configure20
-rw-r--r--newlib/libc/sys/decstation/sys/dirent.h2
-rwxr-xr-xnewlib/libc/sys/epiphany/configure20
-rwxr-xr-xnewlib/libc/sys/h8300hms/configure20
-rwxr-xr-xnewlib/libc/sys/h8500hms/configure20
-rw-r--r--newlib/libc/sys/linux/argp/Makefile.in22
-rw-r--r--newlib/libc/sys/linux/cmath/Makefile.in22
-rwxr-xr-xnewlib/libc/sys/linux/configure42
-rw-r--r--newlib/libc/sys/linux/dl/Makefile.in22
-rw-r--r--newlib/libc/sys/linux/dl/atomicity.h6
-rw-r--r--newlib/libc/sys/linux/dl/dynamic-link.h4
-rw-r--r--newlib/libc/sys/linux/dl/ldsodefs.h2
-rw-r--r--newlib/libc/sys/linux/iconv/Makefile.in22
-rw-r--r--newlib/libc/sys/linux/iconv/gconv_charset.h2
-rw-r--r--newlib/libc/sys/linux/iconv/iconv.c6
-rw-r--r--newlib/libc/sys/linux/include/resolv.h2
-rw-r--r--newlib/libc/sys/linux/intl/Makefile.in22
-rw-r--r--newlib/libc/sys/linux/libc-symbols.h20
-rw-r--r--newlib/libc/sys/linux/linuxthreads/Makefile.in22
-rwxr-xr-xnewlib/libc/sys/linux/linuxthreads/configure42
-rw-r--r--newlib/libc/sys/linux/linuxthreads/internals.h6
-rw-r--r--newlib/libc/sys/linux/linuxthreads/libc-symbols.h16
-rwxr-xr-xnewlib/libc/sys/linux/linuxthreads/machine/configure42
-rw-r--r--newlib/libc/sys/linux/linuxthreads/machine/i386/Makefile.in22
-rwxr-xr-xnewlib/libc/sys/linux/linuxthreads/machine/i386/configure42
-rw-r--r--newlib/libc/sys/linux/linuxthreads/timer_create.c4
-rw-r--r--newlib/libc/sys/linux/linuxthreads/timer_settime.c4
-rwxr-xr-xnewlib/libc/sys/linux/machine/configure42
-rw-r--r--newlib/libc/sys/linux/machine/i386/Makefile.in22
-rwxr-xr-xnewlib/libc/sys/linux/machine/i386/configure42
-rw-r--r--newlib/libc/sys/linux/machine/i386/dl-machine.h22
-rw-r--r--newlib/libc/sys/linux/machine/i386/dl-procinfo.h10
-rw-r--r--newlib/libc/sys/linux/machine/i386/i386mach.h2
-rw-r--r--newlib/libc/sys/linux/machine/i386/weakalias.h4
-rw-r--r--newlib/libc/sys/linux/net/Makefile.in22
-rw-r--r--newlib/libc/sys/linux/net/ifname.c3
-rw-r--r--newlib/libc/sys/linux/realpath.c2
-rw-r--r--newlib/libc/sys/linux/shared.ld8
-rw-r--r--newlib/libc/sys/linux/statvfs.c2
-rw-r--r--newlib/libc/sys/linux/sys/_types.h7
-rw-r--r--newlib/libc/sys/linux/sys/dirent.h2
-rw-r--r--newlib/libc/sys/linux/sys/stat.h8
-rw-r--r--newlib/libc/sys/linux/sys/types.h1
-rw-r--r--newlib/libc/sys/linux/sys/unistd.h2
-rwxr-xr-xnewlib/libc/sys/m88kbug/configure20
-rw-r--r--newlib/libc/sys/m88kbug/syscalls.c2
-rwxr-xr-xnewlib/libc/sys/mmixware/configure20
-rwxr-xr-xnewlib/libc/sys/netware/configure20
-rw-r--r--newlib/libc/sys/or1k/Makefile.am16
-rw-r--r--newlib/libc/sys/or1k/Makefile.in452
-rw-r--r--newlib/libc/sys/or1k/aclocal.m41012
-rwxr-xr-xnewlib/libc/sys/or1k/configure4748
-rw-r--r--newlib/libc/sys/or1k/configure.in14
-rw-r--r--newlib/libc/sys/or1k/getreent.S26
-rw-r--r--newlib/libc/sys/or1k/mlock.c94
-rw-r--r--newlib/libc/sys/or1k/or1k-asm.h83
-rw-r--r--newlib/libc/sys/phoenix/Makefile.am133
-rw-r--r--newlib/libc/sys/phoenix/Makefile.in1094
-rw-r--r--newlib/libc/sys/phoenix/aclocal.m41012
-rw-r--r--newlib/libc/sys/phoenix/alarm.c29
-rw-r--r--newlib/libc/sys/phoenix/bits/posix_opt.h146
-rw-r--r--newlib/libc/sys/phoenix/chmod.c50
-rw-r--r--newlib/libc/sys/phoenix/chown.c61
-rw-r--r--newlib/libc/sys/phoenix/clocks.c50
-rw-r--r--newlib/libc/sys/phoenix/configure4904
-rw-r--r--newlib/libc/sys/phoenix/configure.in19
-rw-r--r--newlib/libc/sys/phoenix/dup.c50
-rw-r--r--newlib/libc/sys/phoenix/endmntent.c31
-rw-r--r--newlib/libc/sys/phoenix/exec.c55
-rw-r--r--newlib/libc/sys/phoenix/fcntl.c48
-rw-r--r--newlib/libc/sys/phoenix/fork.c44
-rw-r--r--newlib/libc/sys/phoenix/fs.c130
-rw-r--r--newlib/libc/sys/phoenix/getmntent.c101
-rw-r--r--newlib/libc/sys/phoenix/getpagesize.c31
-rw-r--r--newlib/libc/sys/phoenix/groups.c100
-rw-r--r--newlib/libc/sys/phoenix/ids.c137
-rw-r--r--newlib/libc/sys/phoenix/include/arpa/inet.h46
-rw-r--r--newlib/libc/sys/phoenix/include/arpa/nameser.h44
-rw-r--r--newlib/libc/sys/phoenix/include/arpa/telnet.h331
-rw-r--r--newlib/libc/sys/phoenix/include/features.h30
-rw-r--r--newlib/libc/sys/phoenix/include/mntent.h66
-rw-r--r--newlib/libc/sys/phoenix/include/net/if.h299
-rw-r--r--newlib/libc/sys/phoenix/include/netdb.h229
-rw-r--r--newlib/libc/sys/phoenix/include/netinet/in.h398
-rw-r--r--newlib/libc/sys/phoenix/include/netinet/in_systm.h57
-rw-r--r--newlib/libc/sys/phoenix/include/netinet/ip.h180
-rw-r--r--newlib/libc/sys/phoenix/include/netinet6/in6.h445
-rw-r--r--newlib/libc/sys/phoenix/include/poll.h30
-rw-r--r--newlib/libc/sys/phoenix/include/semaphore.h52
-rw-r--r--newlib/libc/sys/phoenix/include/syslog.h143
-rw-r--r--newlib/libc/sys/phoenix/include/time.h85
-rw-r--r--newlib/libc/sys/phoenix/io.c100
-rw-r--r--newlib/libc/sys/phoenix/ioctl.c43
-rw-r--r--newlib/libc/sys/phoenix/machine/Makefile.am25
-rw-r--r--newlib/libc/sys/phoenix/machine/Makefile.in511
-rw-r--r--newlib/libc/sys/phoenix/machine/aclocal.m41012
-rw-r--r--newlib/libc/sys/phoenix/machine/arm/Makefile.am21
-rw-r--r--newlib/libc/sys/phoenix/machine/arm/Makefile.in448
-rw-r--r--newlib/libc/sys/phoenix/machine/arm/aclocal.m41012
-rw-r--r--newlib/libc/sys/phoenix/machine/arm/configure4748
-rw-r--r--newlib/libc/sys/phoenix/machine/arm/configure.in14
-rw-r--r--newlib/libc/sys/phoenix/machine/arm/crt0.S47
-rw-r--r--newlib/libc/sys/phoenix/machine/arm/regenerate.sh5
-rw-r--r--newlib/libc/sys/phoenix/machine/arm/syscall.S52
-rw-r--r--newlib/libc/sys/phoenix/machine/configure4935
-rw-r--r--newlib/libc/sys/phoenix/machine/configure.in31
-rw-r--r--newlib/libc/sys/phoenix/machine/regenerate.sh5
-rw-r--r--newlib/libc/sys/phoenix/mmap.c86
-rw-r--r--newlib/libc/sys/phoenix/mount.c54
-rw-r--r--newlib/libc/sys/phoenix/nanosleep.c40
-rw-r--r--newlib/libc/sys/phoenix/net/domainname.c52
-rw-r--r--newlib/libc/sys/phoenix/net/freeaddrinfo.c52
-rw-r--r--newlib/libc/sys/phoenix/net/getaddrinfo.c185
-rw-r--r--newlib/libc/sys/phoenix/net/gethostbyaddr.c33
-rw-r--r--newlib/libc/sys/phoenix/net/gethostbyname.c33
-rw-r--r--newlib/libc/sys/phoenix/net/getnameinfo.c33
-rw-r--r--newlib/libc/sys/phoenix/net/getservbyname.c33
-rw-r--r--newlib/libc/sys/phoenix/net/getservbyport.c33
-rw-r--r--newlib/libc/sys/phoenix/net/herror.c38
-rw-r--r--newlib/libc/sys/phoenix/net/hostname.c52
-rw-r--r--newlib/libc/sys/phoenix/net/inet_addr.c70
-rw-r--r--newlib/libc/sys/phoenix/net/inet_aton.c166
-rw-r--r--newlib/libc/sys/phoenix/net/inet_lnaof.c46
-rw-r--r--newlib/libc/sys/phoenix/net/inet_makeaddr.c51
-rw-r--r--newlib/libc/sys/phoenix/net/inet_net_ntop.c107
-rw-r--r--newlib/libc/sys/phoenix/net/inet_net_pton.c190
-rw-r--r--newlib/libc/sys/phoenix/net/inet_netof.c46
-rw-r--r--newlib/libc/sys/phoenix/net/inet_network.c102
-rw-r--r--newlib/libc/sys/phoenix/net/inet_ntoa.c35
-rw-r--r--newlib/libc/sys/phoenix/net/inet_ntop.c171
-rw-r--r--newlib/libc/sys/phoenix/net/inet_pton.c198
-rw-r--r--newlib/libc/sys/phoenix/net/network.c49
-rw-r--r--newlib/libc/sys/phoenix/phoenix.c23
-rw-r--r--newlib/libc/sys/phoenix/pid.c37
-rw-r--r--newlib/libc/sys/phoenix/pipe.c38
-rw-r--r--newlib/libc/sys/phoenix/poll.c39
-rw-r--r--newlib/libc/sys/phoenix/realpath.c104
-rw-r--r--newlib/libc/sys/phoenix/reboot.c38
-rw-r--r--newlib/libc/sys/phoenix/regenerate.sh5
-rw-r--r--newlib/libc/sys/phoenix/resource.c88
-rw-r--r--newlib/libc/sys/phoenix/sbrk.c48
-rw-r--r--newlib/libc/sys/phoenix/sched.c107
-rw-r--r--newlib/libc/sys/phoenix/select.c40
-rw-r--r--newlib/libc/sys/phoenix/semaphore.c168
-rw-r--r--newlib/libc/sys/phoenix/setmntent.c30
-rw-r--r--newlib/libc/sys/phoenix/shm.c68
-rw-r--r--newlib/libc/sys/phoenix/signal.c75
-rw-r--r--newlib/libc/sys/phoenix/socket.c137
-rw-r--r--newlib/libc/sys/phoenix/sockopt.c75
-rw-r--r--newlib/libc/sys/phoenix/stat.c66
-rw-r--r--newlib/libc/sys/phoenix/statfs.c39
-rw-r--r--newlib/libc/sys/phoenix/symlink.c60
-rw-r--r--newlib/libc/sys/phoenix/sync.c45
-rw-r--r--newlib/libc/sys/phoenix/sys/_default_fcntl.h38
-rw-r--r--newlib/libc/sys/phoenix/sys/_null.h41
-rw-r--r--newlib/libc/sys/phoenix/sys/_timespec.h30
-rw-r--r--newlib/libc/sys/phoenix/sys/_timeval.h30
-rw-r--r--newlib/libc/sys/phoenix/sys/_types.h72
-rw-r--r--newlib/libc/sys/phoenix/sys/dirent.h74
-rw-r--r--newlib/libc/sys/phoenix/sys/errno.h42
-rw-r--r--newlib/libc/sys/phoenix/sys/ioctl.h32
-rw-r--r--newlib/libc/sys/phoenix/sys/ipc.h30
-rw-r--r--newlib/libc/sys/phoenix/sys/mman.h38
-rw-r--r--newlib/libc/sys/phoenix/sys/mount.h42
-rw-r--r--newlib/libc/sys/phoenix/sys/network.h31
-rw-r--r--newlib/libc/sys/phoenix/sys/param.h50
-rw-r--r--newlib/libc/sys/phoenix/sys/poll.h32
-rw-r--r--newlib/libc/sys/phoenix/sys/reboot.h32
-rw-r--r--newlib/libc/sys/phoenix/sys/resource.h121
-rw-r--r--newlib/libc/sys/phoenix/sys/sched.h38
-rw-r--r--newlib/libc/sys/phoenix/sys/select.h36
-rw-r--r--newlib/libc/sys/phoenix/sys/shm.h30
-rw-r--r--newlib/libc/sys/phoenix/sys/signal.h102
-rw-r--r--newlib/libc/sys/phoenix/sys/socket.h63
-rw-r--r--newlib/libc/sys/phoenix/sys/stat.h70
-rw-r--r--newlib/libc/sys/phoenix/sys/statfs.h30
-rw-r--r--newlib/libc/sys/phoenix/sys/stdio.h40
-rw-r--r--newlib/libc/sys/phoenix/sys/termios.h38
-rw-r--r--newlib/libc/sys/phoenix/sys/time.h46
-rw-r--r--newlib/libc/sys/phoenix/sys/timespec.h30
-rw-r--r--newlib/libc/sys/phoenix/sys/timeval.h30
-rw-r--r--newlib/libc/sys/phoenix/sys/types.h112
-rw-r--r--newlib/libc/sys/phoenix/sys/uio.h40
-rw-r--r--newlib/libc/sys/phoenix/sys/un.h40
-rw-r--r--newlib/libc/sys/phoenix/sys/unistd.h306
-rw-r--r--newlib/libc/sys/phoenix/sys/utmp.h45
-rw-r--r--newlib/libc/sys/phoenix/sys/utsname.h32
-rw-r--r--newlib/libc/sys/phoenix/sys/vfs.h38
-rw-r--r--newlib/libc/sys/phoenix/sys/wait.h45
-rw-r--r--newlib/libc/sys/phoenix/syscall.h127
-rw-r--r--newlib/libc/sys/phoenix/sysconf.c32
-rw-r--r--newlib/libc/sys/phoenix/syslog.c106
-rw-r--r--newlib/libc/sys/phoenix/time.c103
-rw-r--r--newlib/libc/sys/phoenix/truncate.c50
-rw-r--r--newlib/libc/sys/phoenix/tty.c125
-rw-r--r--newlib/libc/sys/phoenix/uname.c39
-rw-r--r--newlib/libc/sys/phoenix/utime.c68
-rw-r--r--newlib/libc/sys/phoenix/wait.c58
-rwxr-xr-xnewlib/libc/sys/rdos/chown.c22
-rw-r--r--newlib/libc/sys/rdos/close.c72
-rwxr-xr-xnewlib/libc/sys/rdos/configure20
-rw-r--r--newlib/libc/sys/rdos/execve.c20
-rwxr-xr-xnewlib/libc/sys/rdos/fork.c20
-rwxr-xr-xnewlib/libc/sys/rdos/fstat.c90
-rw-r--r--newlib/libc/sys/rdos/getpid.c20
-rw-r--r--newlib/libc/sys/rdos/gettod.c30
-rw-r--r--newlib/libc/sys/rdos/isatty.c18
-rw-r--r--newlib/libc/sys/rdos/kill.c20
-rw-r--r--newlib/libc/sys/rdos/link.c20
-rwxr-xr-xnewlib/libc/sys/rdos/lseek.c118
-rwxr-xr-xnewlib/libc/sys/rdos/open.c118
-rwxr-xr-xnewlib/libc/sys/rdos/rdos.h688
-rw-r--r--newlib/libc/sys/rdos/read.c70
-rwxr-xr-xnewlib/libc/sys/rdos/readlink.c22
-rw-r--r--newlib/libc/sys/rdos/sbrk.c66
-rwxr-xr-xnewlib/libc/sys/rdos/stat.c24
-rwxr-xr-xnewlib/libc/sys/rdos/symlink.c20
-rw-r--r--newlib/libc/sys/rdos/times.c22
-rw-r--r--newlib/libc/sys/rdos/unlink.c20
-rw-r--r--newlib/libc/sys/rdos/wait.c20
-rw-r--r--newlib/libc/sys/rdos/write.c70
-rw-r--r--newlib/libc/sys/rtems/Makefile.am2
-rw-r--r--newlib/libc/sys/rtems/Makefile.in17
-rwxr-xr-xnewlib/libc/sys/rtems/configure20
-rw-r--r--newlib/libc/sys/rtems/cpusetalloc.c38
-rw-r--r--newlib/libc/sys/rtems/cpusetfree.c38
-rw-r--r--newlib/libc/sys/rtems/crt0.c45
-rw-r--r--newlib/libc/sys/rtems/include/limits.h3
-rw-r--r--newlib/libc/sys/rtems/include/machine/_arc4random.h35
-rw-r--r--newlib/libc/sys/rtems/include/machine/_libatomic.h46
-rw-r--r--newlib/libc/sys/rtems/include/machine/_threads.h54
-rw-r--r--newlib/libc/sys/rtems/include/machine/_time.h199
-rw-r--r--newlib/libc/sys/rtems/include/machine/_types.h44
-rw-r--r--newlib/libc/sys/rtems/include/machine/limits.h (renamed from newlib/libc/sys/rtems/machine/limits.h)1
-rw-r--r--newlib/libc/sys/rtems/include/machine/param.h (renamed from newlib/libc/sys/rtems/machine/param.h)0
-rw-r--r--newlib/libc/sys/rtems/include/machine/types.h73
-rw-r--r--newlib/libc/sys/rtems/include/semaphore.h56
-rw-r--r--newlib/libc/sys/rtems/include/sys/cpuset.h311
-rw-r--r--newlib/libc/sys/rtems/include/sys/dirent.h (renamed from newlib/libc/sys/rtems/sys/dirent.h)4
-rw-r--r--newlib/libc/sys/rtems/include/sys/lock.h235
-rw-r--r--newlib/libc/sys/rtems/include/sys/param.h (renamed from newlib/libc/sys/rtems/sys/param.h)61
-rw-r--r--newlib/libc/sys/rtems/include/sys/syslimits.h (renamed from newlib/libc/sys/rtems/sys/syslimits.h)2
-rw-r--r--newlib/libc/sys/rtems/include/sys/utime.h (renamed from newlib/libc/sys/rtems/sys/utime.h)0
-rw-r--r--newlib/libc/sys/rtems/machine/_types.h58
-rwxr-xr-xnewlib/libc/sys/sh/configure20
-rwxr-xr-xnewlib/libc/sys/sparc64/configure20
-rw-r--r--newlib/libc/sys/sparc64/sys/_timeval.h (renamed from newlib/libc/sys/sparc64/sys/time.h)8
-rw-r--r--newlib/libc/sys/sparc64/sys/dirent.h2
-rw-r--r--newlib/libc/sys/sparc64/sys/fcntl.h24
-rw-r--r--newlib/libc/sys/sparc64/sys/stat.h9
-rwxr-xr-xnewlib/libc/sys/sun4/configure20
-rw-r--r--newlib/libc/sys/sun4/sys/dirent.h2
-rwxr-xr-xnewlib/libc/sys/sysmec/configure20
-rwxr-xr-xnewlib/libc/sys/sysnec810/configure20
-rwxr-xr-xnewlib/libc/sys/sysnecv850/configure20
-rwxr-xr-xnewlib/libc/sys/sysvi386/configure20
-rw-r--r--newlib/libc/sys/sysvi386/sys/dirent.h2
-rwxr-xr-xnewlib/libc/sys/sysvnecv70/configure20
-rwxr-xr-xnewlib/libc/sys/tic80/configure20
-rw-r--r--newlib/libc/sys/tirtos/Makefile.am (renamed from newlib/libc/sys/arc/Makefile.am)5
-rw-r--r--newlib/libc/sys/tirtos/Makefile.in438
-rw-r--r--newlib/libc/sys/tirtos/aclocal.m41012
-rwxr-xr-xnewlib/libc/sys/tirtos/configure (renamed from newlib/libc/sys/arc/configure)22
-rw-r--r--newlib/libc/sys/tirtos/configure.in (renamed from newlib/libc/sys/arc/configure.in)4
-rw-r--r--newlib/libc/sys/tirtos/include/sys/lock.h109
-rw-r--r--newlib/libc/sys/tirtos/lock.c92
-rwxr-xr-xnewlib/libc/sys/w65/configure20
-rwxr-xr-xnewlib/libc/sys/z8ksim/configure20
-rw-r--r--newlib/libc/syscalls/Makefile.am15
-rw-r--r--newlib/libc/syscalls/Makefile.in18
-rw-r--r--newlib/libc/time/Makefile.am18
-rw-r--r--newlib/libc/time/Makefile.in57
-rw-r--r--newlib/libc/time/asctime_r.c4
-rw-r--r--newlib/libc/time/clock.c2
-rw-r--r--newlib/libc/time/gmtime_r.c95
-rw-r--r--newlib/libc/time/lcltime_r.c117
-rw-r--r--newlib/libc/time/local.h6
-rw-r--r--newlib/libc/time/mktime.c2
-rw-r--r--newlib/libc/time/mktm_r.c259
-rw-r--r--newlib/libc/time/month_lengths.c14
-rw-r--r--newlib/libc/time/strftime.c197
-rw-r--r--newlib/libc/time/strptime.c8
-rw-r--r--newlib/libc/time/time.c13
-rw-r--r--newlib/libc/time/tzcalc_limits.c77
-rw-r--r--newlib/libc/time/tzset.c14
-rw-r--r--newlib/libc/time/tzset_r.c34
-rw-r--r--newlib/libc/time/wcsftime.c2
-rw-r--r--newlib/libc/unix/Makefile.am15
-rw-r--r--newlib/libc/unix/Makefile.in18
-rw-r--r--newlib/libc/unix/getcwd.c6
-rw-r--r--newlib/libc/xdr/Makefile.am16
-rw-r--r--newlib/libc/xdr/Makefile.in25
-rw-r--r--newlib/libm/common/Makefile.am20
-rw-r--r--newlib/libm/common/Makefile.in70
-rw-r--r--newlib/libm/common/fdlibm.h2
-rw-r--r--newlib/libm/common/hypotl.c55
-rw-r--r--newlib/libm/common/isgreater.c2
-rw-r--r--newlib/libm/common/log2l.c38
-rw-r--r--newlib/libm/common/logbl.c38
-rw-r--r--newlib/libm/common/modfl.c2
-rw-r--r--newlib/libm/common/nexttoward.c38
-rw-r--r--newlib/libm/common/nexttowardf.c78
-rw-r--r--newlib/libm/common/nexttowardl.c38
-rw-r--r--newlib/libm/common/s_exp10.c2
-rw-r--r--newlib/libm/common/s_fdim.c2
-rw-r--r--newlib/libm/common/s_fma.c2
-rw-r--r--newlib/libm/common/s_fmax.c2
-rw-r--r--newlib/libm/common/s_fmin.c2
-rw-r--r--newlib/libm/common/s_infinity.c2
-rw-r--r--newlib/libm/common/s_isinf.c7
-rw-r--r--newlib/libm/common/s_isnan.c18
-rw-r--r--newlib/libm/common/s_isnand.c8
-rw-r--r--newlib/libm/common/s_log2.c2
-rw-r--r--newlib/libm/common/s_logb.c2
-rw-r--r--newlib/libm/common/s_lrint.c2
-rw-r--r--newlib/libm/common/s_lround.c2
-rw-r--r--newlib/libm/common/s_nan.c8
-rw-r--r--newlib/libm/common/s_nearbyint.c2
-rw-r--r--newlib/libm/common/s_pow10.c2
-rw-r--r--newlib/libm/common/s_remquo.c2
-rw-r--r--newlib/libm/common/s_rint.c2
-rw-r--r--newlib/libm/common/s_round.c2
-rw-r--r--newlib/libm/common/s_scalbn.c2
-rw-r--r--newlib/libm/common/s_signbit.c10
-rw-r--r--newlib/libm/common/s_trunc.c2
-rw-r--r--newlib/libm/common/sf_isinf.c5
-rw-r--r--newlib/libm/common/sf_isnan.c2
-rw-r--r--newlib/libm/common/sf_nan.c4
-rw-r--r--newlib/libm/common/sl_finite.c25
-rw-r--r--newlib/libm/common/sqrtl.c155
-rw-r--r--newlib/libm/complex/Makefile.am31
-rw-r--r--newlib/libm/complex/Makefile.in161
-rw-r--r--newlib/libm/complex/cabs.c16
-rw-r--r--newlib/libm/complex/cabsl.c18
-rw-r--r--newlib/libm/complex/cimag.c16
-rw-r--r--newlib/libm/complex/cimagl.c16
-rw-r--r--newlib/libm/complex/clog10.c46
-rw-r--r--newlib/libm/complex/clog10f.c15
-rw-r--r--newlib/libm/complex/complex.tex70
-rw-r--r--newlib/libm/complex/creal.c18
-rw-r--r--newlib/libm/complex/creall.c16
-rwxr-xr-xnewlib/libm/configure42
-rw-r--r--newlib/libm/libm.texinfo19
-rw-r--r--newlib/libm/machine/aarch64/Makefile.am4
-rw-r--r--newlib/libm/machine/aarch64/Makefile.in66
-rwxr-xr-xnewlib/libm/machine/aarch64/configure20
-rw-r--r--newlib/libm/machine/aarch64/e_sqrt.c35
-rw-r--r--newlib/libm/machine/aarch64/ef_sqrt.c35
-rw-r--r--newlib/libm/machine/aarch64/s_fabs.c35
-rw-r--r--newlib/libm/machine/aarch64/sf_fabs.c35
-rw-r--r--newlib/libm/machine/arm/Makefile.in22
-rwxr-xr-xnewlib/libm/machine/arm/configure20
-rw-r--r--newlib/libm/machine/arm/s_ceil.c2
-rw-r--r--newlib/libm/machine/arm/s_floor.c2
-rw-r--r--newlib/libm/machine/arm/s_nearbyint.c2
-rw-r--r--newlib/libm/machine/arm/s_rint.c2
-rw-r--r--newlib/libm/machine/arm/s_round.c2
-rw-r--r--newlib/libm/machine/arm/s_trunc.c2
-rwxr-xr-xnewlib/libm/machine/configure45
-rw-r--r--newlib/libm/machine/configure.in1
-rw-r--r--newlib/libm/machine/i386/Makefile.in22
-rwxr-xr-xnewlib/libm/machine/i386/configure42
-rw-r--r--newlib/libm/machine/i386/i386mach.h2
-rw-r--r--newlib/libm/machine/nds32/Makefile.am30
-rw-r--r--newlib/libm/machine/nds32/Makefile.in489
-rw-r--r--newlib/libm/machine/nds32/aclocal.m41012
-rw-r--r--newlib/libm/machine/nds32/configure5845
-rw-r--r--newlib/libm/machine/nds32/configure.in35
-rw-r--r--newlib/libm/machine/nds32/w_sqrt.S (renamed from libgloss/nds32/syscall_read.S)66
-rw-r--r--newlib/libm/machine/nds32/wf_sqrt.S68
-rw-r--r--newlib/libm/machine/spu/Makefile.in22
-rw-r--r--newlib/libm/machine/spu/configure20
-rw-r--r--newlib/libm/machine/spu/sf_isinf.c2
-rw-r--r--newlib/libm/math/Makefile.am23
-rw-r--r--newlib/libm/math/Makefile.in46
-rw-r--r--newlib/libm/math/e_sqrt.c2
-rw-r--r--newlib/libm/math/el_hypot.c18
-rw-r--r--newlib/libm/math/math.tex171
-rw-r--r--newlib/libm/math/w_acos.c3
-rw-r--r--newlib/libm/math/w_acosh.c3
-rw-r--r--newlib/libm/math/w_asin.c3
-rw-r--r--newlib/libm/math/w_cosh.c6
-rw-r--r--newlib/libm/math/w_exp2.c2
-rw-r--r--newlib/libm/math/w_fmod.c8
-rw-r--r--newlib/libm/math/w_gamma.c2
-rw-r--r--newlib/libm/mathfp/Makefile.am161
-rw-r--r--newlib/libm/mathfp/Makefile.in161
-rw-r--r--newlib/libm/mathfp/e_acosh.c3
-rw-r--r--newlib/libm/mathfp/s_acos.c3
-rw-r--r--newlib/libm/mathfp/s_cosh.c6
-rw-r--r--newlib/libm/mathfp/s_fmod.c8
-rw-r--r--newlib/libm/mathfp/sf_numtest.c2
-rw-r--r--newlib/newlib.hin11
-rw-r--r--newlib/testsuite/lib/flags.exp2
-rw-r--r--newlib/testsuite/newlib.locale/UTF-8.exp12
-rw-r--r--newlib/testsuite/newlib.stdio/nulprintf.c17
-rw-r--r--newlib/testsuite/newlib.stdio/swprintf.c2
-rw-r--r--newlib/testsuite/newlib.wctype/tiswctype.c24
-rw-r--r--newlib/testsuite/newlib.wctype/twctrans.c8
-rw-r--r--newlib/testsuite/newlib.wctype/twctype.c2
-rw-r--r--src-release18
-rw-r--r--winsup/CONTRIBUTORS92
-rw-r--r--winsup/COPYING.LIB165
-rw-r--r--winsup/CVSChangeLogs.old/ChangeLog-2015 (renamed from winsup/ChangeLog)35
-rw-r--r--winsup/CVSChangeLogs.old/cygserver/ChangeLog-2015 (renamed from winsup/cygserver/ChangeLog)97
-rw-r--r--winsup/CVSChangeLogs.old/cygserver/ChangeLog.64bit (renamed from winsup/cygserver/ChangeLog.64bit)0
-rw-r--r--winsup/CVSChangeLogs.old/cygwin/ChangeLog-1995 (renamed from winsup/cygwin/ChangeLog-1995)0
-rw-r--r--winsup/CVSChangeLogs.old/cygwin/ChangeLog-1996 (renamed from winsup/cygwin/ChangeLog-1996)0
-rw-r--r--winsup/CVSChangeLogs.old/cygwin/ChangeLog-1997 (renamed from winsup/cygwin/ChangeLog-1997)0
-rw-r--r--winsup/CVSChangeLogs.old/cygwin/ChangeLog-1998 (renamed from winsup/cygwin/ChangeLog-1998)0
-rw-r--r--winsup/CVSChangeLogs.old/cygwin/ChangeLog-1999 (renamed from winsup/cygwin/ChangeLog-1999)0
-rw-r--r--winsup/CVSChangeLogs.old/cygwin/ChangeLog-2000 (renamed from winsup/cygwin/ChangeLog-2000)0
-rw-r--r--winsup/CVSChangeLogs.old/cygwin/ChangeLog-2001 (renamed from winsup/cygwin/ChangeLog-2001)0
-rw-r--r--winsup/CVSChangeLogs.old/cygwin/ChangeLog-2002 (renamed from winsup/cygwin/ChangeLog-2002)0
-rw-r--r--winsup/CVSChangeLogs.old/cygwin/ChangeLog-2003 (renamed from winsup/cygwin/ChangeLog-2003)0
-rw-r--r--winsup/CVSChangeLogs.old/cygwin/ChangeLog-2004 (renamed from winsup/cygwin/ChangeLog-2004)0
-rw-r--r--winsup/CVSChangeLogs.old/cygwin/ChangeLog-2005 (renamed from winsup/cygwin/ChangeLog-2005)0
-rw-r--r--winsup/CVSChangeLogs.old/cygwin/ChangeLog-2006 (renamed from winsup/cygwin/ChangeLog-2006)0
-rw-r--r--winsup/CVSChangeLogs.old/cygwin/ChangeLog-2007 (renamed from winsup/cygwin/ChangeLog-2007)0
-rw-r--r--winsup/CVSChangeLogs.old/cygwin/ChangeLog-2008 (renamed from winsup/cygwin/ChangeLog-2008)0
-rw-r--r--winsup/CVSChangeLogs.old/cygwin/ChangeLog-2009 (renamed from winsup/cygwin/ChangeLog-2009)0
-rw-r--r--winsup/CVSChangeLogs.old/cygwin/ChangeLog-2010 (renamed from winsup/cygwin/ChangeLog-2010)0
-rw-r--r--winsup/CVSChangeLogs.old/cygwin/ChangeLog-2011 (renamed from winsup/cygwin/ChangeLog-2011)0
-rw-r--r--winsup/CVSChangeLogs.old/cygwin/ChangeLog-2012 (renamed from winsup/cygwin/ChangeLog-2012)0
-rw-r--r--winsup/CVSChangeLogs.old/cygwin/ChangeLog-2013 (renamed from winsup/cygwin/ChangeLog)609
-rw-r--r--winsup/CVSChangeLogs.old/cygwin/ChangeLog-20142745
-rw-r--r--winsup/CVSChangeLogs.old/cygwin/ChangeLog-20152260
-rw-r--r--winsup/CVSChangeLogs.old/cygwin/ChangeLog.64bit (renamed from winsup/cygwin/ChangeLog.64bit)0
-rw-r--r--winsup/CVSChangeLogs.old/doc/ChangeLog-2015 (renamed from winsup/doc/ChangeLog)756
-rw-r--r--winsup/CVSChangeLogs.old/lsaauth/ChangeLog-2015 (renamed from winsup/lsaauth/ChangeLog)15
-rw-r--r--winsup/CVSChangeLogs.old/lsaauth/ChangeLog.64bit (renamed from winsup/lsaauth/ChangeLog.64bit)0
-rw-r--r--winsup/CVSChangeLogs.old/testsuite/ChangeLog-2015 (renamed from winsup/testsuite/ChangeLog)9
-rw-r--r--winsup/CVSChangeLogs.old/utils/ChangeLog-2000 (renamed from winsup/utils/ChangeLog-2000)0
-rw-r--r--winsup/CVSChangeLogs.old/utils/ChangeLog-2015 (renamed from winsup/utils/ChangeLog)454
-rw-r--r--winsup/CVSChangeLogs.old/utils/ChangeLog.64bit (renamed from winsup/utils/ChangeLog.64bit)0
-rw-r--r--winsup/CYGWIN_LICENSE96
-rw-r--r--winsup/Makefile.common8
-rw-r--r--winsup/Makefile.in17
-rw-r--r--winsup/README6
-rw-r--r--winsup/aclocal.m45
-rwxr-xr-xwinsup/ccwrap1
-rwxr-xr-xwinsup/configure321
-rw-r--r--[-rwxr-xr-x]winsup/configure.ac28
-rwxr-xr-xwinsup/configure.cygwin3
-rw-r--r--winsup/cygserver/Makefile.in10
-rw-r--r--winsup/cygserver/aclocal.m45
-rw-r--r--winsup/cygserver/bsd_helper.cc16
-rw-r--r--winsup/cygserver/bsd_helper.h14
-rw-r--r--winsup/cygserver/bsd_log.cc2
-rw-r--r--winsup/cygserver/bsd_log.h2
-rw-r--r--winsup/cygserver/bsd_mutex.cc25
-rw-r--r--winsup/cygserver/bsd_mutex.h2
-rw-r--r--winsup/cygserver/client.cc66
-rwxr-xr-xwinsup/cygserver/configure327
-rw-r--r--winsup/cygserver/configure.ac22
-rwxr-xr-xwinsup/cygserver/cygserver-config23
-rw-r--r--winsup/cygserver/cygserver.cc10
-rw-r--r--winsup/cygserver/cygserver.conf2
-rw-r--r--winsup/cygserver/msg.cc7
-rw-r--r--winsup/cygserver/process.cc71
-rw-r--r--winsup/cygserver/process.h10
-rw-r--r--winsup/cygserver/pwdgrp.cc167
-rw-r--r--winsup/cygserver/sem.cc7
-rw-r--r--winsup/cygserver/setpwd.cc4
-rw-r--r--winsup/cygserver/shm.cc7
-rw-r--r--winsup/cygserver/sysv_msg.cc6
-rw-r--r--winsup/cygserver/sysv_sem.cc3
-rw-r--r--winsup/cygserver/threaded_queue.cc26
-rw-r--r--winsup/cygserver/threaded_queue.h2
-rw-r--r--winsup/cygserver/transport.cc2
-rw-r--r--winsup/cygserver/transport.h2
-rw-r--r--winsup/cygserver/transport_pipes.cc32
-rw-r--r--winsup/cygserver/transport_pipes.h2
-rw-r--r--winsup/cygserver/woutsup.h2
-rw-r--r--winsup/cygwin/DevNotes25
-rw-r--r--winsup/cygwin/Makefile.in457
-rw-r--r--winsup/cygwin/acconfig.h11
-rw-r--r--winsup/cygwin/advapi32.cc2
-rwxr-xr-xwinsup/cygwin/analyze_sigfe1
-rw-r--r--winsup/cygwin/assert.cc4
-rw-r--r--winsup/cygwin/autoload.cc123
-rw-r--r--winsup/cygwin/automode.c2
-rw-r--r--winsup/cygwin/binmode.c6
-rw-r--r--winsup/cygwin/child_info.h14
-rw-r--r--winsup/cygwin/collate.h7
-rw-r--r--winsup/cygwin/common.din233
-rw-r--r--winsup/cygwin/config.h.in40
-rwxr-xr-xwinsup/cygwin/configure342
-rw-r--r--winsup/cygwin/configure.ac33
-rw-r--r--winsup/cygwin/cpuid.h84
-rw-r--r--winsup/cygwin/crt0.c2
-rw-r--r--winsup/cygwin/cxx.cc11
-rw-r--r--winsup/cygwin/cygerrno.h10
-rw-r--r--winsup/cygwin/cygheap.cc200
-rw-r--r--winsup/cygwin/cygheap.h218
-rw-r--r--winsup/cygwin/cygheap_malloc.h7
-rw-r--r--winsup/cygwin/cyglsa.h2
-rwxr-xr-xwinsup/cygwin/cygmagic4
-rw-r--r--winsup/cygwin/cygmalloc.h2
-rw-r--r--winsup/cygwin/cygprops.h21
-rw-r--r--winsup/cygwin/cygserver.h3
-rw-r--r--winsup/cygwin/cygserver_ipc.h22
-rw-r--r--winsup/cygwin/cygserver_msg.h2
-rw-r--r--winsup/cygwin/cygserver_pwdgrp.h61
-rw-r--r--winsup/cygwin/cygserver_sem.h2
-rw-r--r--winsup/cygwin/cygserver_setpwd.h2
-rw-r--r--winsup/cygwin/cygserver_shm.h2
-rw-r--r--winsup/cygwin/cygthread.cc5
-rw-r--r--winsup/cygwin/cygtls.cc115
-rw-r--r--winsup/cygwin/cygtls.h208
-rw-r--r--winsup/cygwin/cygtls_padsize.h12
-rw-r--r--winsup/cygwin/cygwait.cc13
-rw-r--r--winsup/cygwin/cygwait.h14
-rw-r--r--[-rwxr-xr-x]winsup/cygwin/cygwin-cxx.h2
-rw-r--r--winsup/cygwin/cygwin.ldif253
-rw-r--r--winsup/cygwin/cygwin.sc.in44
-rw-r--r--winsup/cygwin/cygwin_version.h2
-rw-r--r--winsup/cygwin/cygxdr.cc2
-rw-r--r--winsup/cygwin/cygxdr.h2
-rw-r--r--winsup/cygwin/dcrt0.cc349
-rw-r--r--winsup/cygwin/debug.cc4
-rw-r--r--winsup/cygwin/debug.h14
-rw-r--r--winsup/cygwin/devices.cc9480
-rw-r--r--winsup/cygwin/devices.h3
-rw-r--r--winsup/cygwin/devices.in24
-rw-r--r--winsup/cygwin/dir.cc356
-rw-r--r--winsup/cygwin/dlfcn.cc40
-rw-r--r--winsup/cygwin/dll_init.cc18
-rw-r--r--winsup/cygwin/dll_init.h3
-rw-r--r--winsup/cygwin/dll_init.sgml11
-rwxr-xr-xwinsup/cygwin/dllfixdbg1
-rw-r--r--winsup/cygwin/dlmalloc.c3815
-rw-r--r--winsup/cygwin/dlmalloc.h93
-rw-r--r--winsup/cygwin/dtable.cc69
-rw-r--r--winsup/cygwin/dtable.h28
-rw-r--r--winsup/cygwin/dtable.sgml20
-rw-r--r--winsup/cygwin/environ.cc649
-rw-r--r--winsup/cygwin/environ.h4
-rw-r--r--winsup/cygwin/errno.cc18
-rw-r--r--winsup/cygwin/exception.h170
-rw-r--r--winsup/cygwin/exceptions.cc925
-rw-r--r--winsup/cygwin/exec.cc18
-rw-r--r--winsup/cygwin/external.cc169
-rw-r--r--winsup/cygwin/external.sgml18
-rw-r--r--winsup/cygwin/fcntl.cc138
-rw-r--r--[-rwxr-xr-x]winsup/cygwin/fenv.cc11
-rw-r--r--winsup/cygwin/fhandler.cc200
-rw-r--r--winsup/cygwin/fhandler.h229
-rw-r--r--winsup/cygwin/fhandler_clipboard.cc45
-rw-r--r--winsup/cygwin/fhandler_console.cc1031
-rw-r--r--winsup/cygwin/fhandler_dev.cc65
-rw-r--r--winsup/cygwin/fhandler_disk_file.cc536
-rw-r--r--winsup/cygwin/fhandler_dsp.cc82
-rw-r--r--winsup/cygwin/fhandler_fifo.cc3
-rw-r--r--winsup/cygwin/fhandler_floppy.cc31
-rw-r--r--winsup/cygwin/fhandler_mailslot.cc2
-rw-r--r--winsup/cygwin/fhandler_netdrive.cc137
-rw-r--r--winsup/cygwin/fhandler_nodevice.cc3
-rw-r--r--winsup/cygwin/fhandler_proc.cc1072
-rw-r--r--winsup/cygwin/fhandler_process.cc184
-rw-r--r--winsup/cygwin/fhandler_procnet.cc13
-rw-r--r--winsup/cygwin/fhandler_procsys.cc56
-rw-r--r--winsup/cygwin/fhandler_procsysvipc.cc243
-rw-r--r--winsup/cygwin/fhandler_random.cc139
-rw-r--r--winsup/cygwin/fhandler_raw.cc6
-rw-r--r--winsup/cygwin/fhandler_registry.cc34
-rw-r--r--winsup/cygwin/fhandler_serial.cc3
-rw-r--r--winsup/cygwin/fhandler_socket.cc464
-rw-r--r--winsup/cygwin/fhandler_tape.cc300
-rw-r--r--winsup/cygwin/fhandler_termios.cc48
-rw-r--r--winsup/cygwin/fhandler_tty.cc643
-rw-r--r--winsup/cygwin/fhandler_virtual.cc9
-rw-r--r--winsup/cygwin/fhandler_virtual.h25
-rw-r--r--winsup/cygwin/fhandler_windows.cc64
-rw-r--r--winsup/cygwin/fhandler_zero.cc17
-rw-r--r--winsup/cygwin/flock.cc279
-rw-r--r--winsup/cygwin/fork.cc66
-rw-r--r--winsup/cygwin/gcrt0.c6
-rwxr-xr-xwinsup/cygwin/gendef316
-rwxr-xr-xwinsup/cygwin/gendevices1
-rwxr-xr-xwinsup/cygwin/gentls_offsets1
-rw-r--r--winsup/cygwin/glob.cc3
-rw-r--r--winsup/cygwin/globals.cc36
-rw-r--r--winsup/cygwin/gmon.c86
-rw-r--r--winsup/cygwin/gmon.h33
-rw-r--r--winsup/cygwin/grp.cc697
-rw-r--r--winsup/cygwin/heap.cc3
-rw-r--r--winsup/cygwin/heap.h2
-rw-r--r--winsup/cygwin/hires.h2
-rw-r--r--winsup/cygwin/hookapi.cc2
-rw-r--r--winsup/cygwin/how-autoload-works.txt2
-rw-r--r--winsup/cygwin/how-cygheap-works.txt2
-rw-r--r--winsup/cygwin/how-cygtls-works.txt2
-rw-r--r--winsup/cygwin/how-fhandlers-work.txt2
-rw-r--r--winsup/cygwin/how-signals-work.txt2
-rw-r--r--[-rwxr-xr-x]winsup/cygwin/how-startup-shutdown-works.txt3
-rw-r--r--winsup/cygwin/how-to-debug-cygwin.txt2
-rw-r--r--winsup/cygwin/i686.din28
-rw-r--r--winsup/cygwin/import/rexec.c391
-rw-r--r--winsup/cygwin/include/a.out.h2
-rw-r--r--winsup/cygwin/include/acl/libacl.h55
-rw-r--r--winsup/cygwin/include/arpa/inet.h2
-rw-r--r--[-rwxr-xr-x]winsup/cygwin/include/arpa/nameser.h0
-rw-r--r--[-rwxr-xr-x]winsup/cygwin/include/arpa/nameser_compat.h0
-rw-r--r--winsup/cygwin/include/asm/byteorder.h26
-rw-r--r--winsup/cygwin/include/asm/socket.h22
-rw-r--r--winsup/cygwin/include/asm/types.h6
-rw-r--r--winsup/cygwin/include/attr/xattr.h2
-rw-r--r--winsup/cygwin/include/bits/endian.h2
-rw-r--r--winsup/cygwin/include/byteswap.h16
-rw-r--r--winsup/cygwin/include/cygwin/acl.h90
-rw-r--r--winsup/cygwin/include/cygwin/config.h25
-rw-r--r--winsup/cygwin/include/cygwin/core_dump.h10
-rw-r--r--winsup/cygwin/include/cygwin/cygwin_dll.h8
-rw-r--r--winsup/cygwin/include/cygwin/fs.h2
-rw-r--r--winsup/cygwin/include/cygwin/grp.h2
-rw-r--r--winsup/cygwin/include/cygwin/hdreg.h2
-rw-r--r--winsup/cygwin/include/cygwin/if.h2
-rw-r--r--winsup/cygwin/include/cygwin/in.h11
-rw-r--r--winsup/cygwin/include/cygwin/in6.h10
-rw-r--r--winsup/cygwin/include/cygwin/ipc.h2
-rw-r--r--winsup/cygwin/include/cygwin/kd.h2
-rw-r--r--winsup/cygwin/include/cygwin/msg.h2
-rw-r--r--winsup/cygwin/include/cygwin/mtio.h2
-rw-r--r--winsup/cygwin/include/cygwin/rdevio.h2
-rw-r--r--winsup/cygwin/include/cygwin/sem.h2
-rw-r--r--winsup/cygwin/include/cygwin/shm.h7
-rw-r--r--winsup/cygwin/include/cygwin/signal.h50
-rw-r--r--winsup/cygwin/include/cygwin/socket.h42
-rw-r--r--winsup/cygwin/include/cygwin/stat.h8
-rw-r--r--winsup/cygwin/include/cygwin/stdlib.h33
-rw-r--r--winsup/cygwin/include/cygwin/sys_time.h27
-rw-r--r--winsup/cygwin/include/cygwin/sysproto.h2
-rw-r--r--winsup/cygwin/include/cygwin/time.h9
-rw-r--r--winsup/cygwin/include/cygwin/utmp.h2
-rw-r--r--winsup/cygwin/include/cygwin/version.h880
-rw-r--r--winsup/cygwin/include/cygwin/wait.h2
-rw-r--r--winsup/cygwin/include/dlfcn.h2
-rw-r--r--winsup/cygwin/include/endian.h24
-rw-r--r--winsup/cygwin/include/err.h2
-rw-r--r--winsup/cygwin/include/error.h2
-rw-r--r--winsup/cygwin/include/exceptions.h115
-rw-r--r--winsup/cygwin/include/fcntl.h16
-rw-r--r--winsup/cygwin/include/features.h2
-rw-r--r--[-rwxr-xr-x]winsup/cygwin/include/fenv.h22
-rw-r--r--winsup/cygwin/include/fnmatch.h6
-rw-r--r--winsup/cygwin/include/glob.h6
-rw-r--r--winsup/cygwin/include/ifaddrs.h13
-rw-r--r--winsup/cygwin/include/inttypes.h274
-rw-r--r--winsup/cygwin/include/io.h2
-rw-r--r--winsup/cygwin/include/lastlog.h2
-rw-r--r--winsup/cygwin/include/libgen.h23
-rw-r--r--winsup/cygwin/include/limits.h5
-rw-r--r--winsup/cygwin/include/machine/_arc4random.h28
-rw-r--r--winsup/cygwin/include/machine/_endian.h43
-rw-r--r--winsup/cygwin/include/machine/_types.h52
-rw-r--r--winsup/cygwin/include/machine/stdlib.h2
-rw-r--r--winsup/cygwin/include/machine/types.h (renamed from winsup/cygwin/include/cygwin/types.h)113
-rw-r--r--winsup/cygwin/include/mapi.h2
-rw-r--r--winsup/cygwin/include/memory.h2
-rw-r--r--winsup/cygwin/include/mntent.h2
-rw-r--r--winsup/cygwin/include/mqueue.h2
-rw-r--r--winsup/cygwin/include/net/if.h2
-rw-r--r--winsup/cygwin/include/netdb.h89
-rw-r--r--winsup/cygwin/include/netinet/in.h2
-rw-r--r--winsup/cygwin/include/netinet/in_systm.h2
-rw-r--r--winsup/cygwin/include/netinet/ip.h40
-rw-r--r--winsup/cygwin/include/netinet/ip6.h352
-rw-r--r--winsup/cygwin/include/netinet/ip_icmp.h2
-rw-r--r--winsup/cygwin/include/netinet/tcp.h24
-rw-r--r--winsup/cygwin/include/netinet/udp.h8
-rw-r--r--winsup/cygwin/include/paths.h3
-rw-r--r--winsup/cygwin/include/poll.h2
-rw-r--r--winsup/cygwin/include/pthread.h54
-rw-r--r--[-rwxr-xr-x]winsup/cygwin/include/resolv.h0
-rw-r--r--winsup/cygwin/include/semaphore.h2
-rw-r--r--winsup/cygwin/include/stdint.h290
-rw-r--r--winsup/cygwin/include/sys/acl.h87
-rw-r--r--winsup/cygwin/include/sys/cygwin.h85
-rw-r--r--winsup/cygwin/include/sys/dirent.h19
-rw-r--r--winsup/cygwin/include/sys/file.h31
-rw-r--r--winsup/cygwin/include/sys/ioctl.h2
-rw-r--r--winsup/cygwin/include/sys/ipc.h2
-rw-r--r--winsup/cygwin/include/sys/kd.h2
-rw-r--r--winsup/cygwin/include/sys/lock.h2
-rw-r--r--winsup/cygwin/include/sys/mman.h2
-rw-r--r--winsup/cygwin/include/sys/mount.h9
-rw-r--r--winsup/cygwin/include/sys/msg.h2
-rw-r--r--winsup/cygwin/include/sys/mtio.h2
-rw-r--r--winsup/cygwin/include/sys/poll.h2
-rw-r--r--winsup/cygwin/include/sys/procfs.h2
-rw-r--r--winsup/cygwin/include/sys/quota.h239
-rw-r--r--winsup/cygwin/include/sys/resource.h2
-rw-r--r--winsup/cygwin/include/sys/select.h41
-rw-r--r--winsup/cygwin/include/sys/sem.h2
-rw-r--r--winsup/cygwin/include/sys/shm.h2
-rw-r--r--winsup/cygwin/include/sys/smallprint.h2
-rw-r--r--winsup/cygwin/include/sys/socket.h4
-rw-r--r--winsup/cygwin/include/sys/statfs.h2
-rw-r--r--winsup/cygwin/include/sys/statvfs.h2
-rw-r--r--winsup/cygwin/include/sys/stdio.h2
-rw-r--r--winsup/cygwin/include/sys/strace.h15
-rw-r--r--winsup/cygwin/include/sys/sysinfo.h2
-rw-r--r--winsup/cygwin/include/sys/syslimits.h2
-rw-r--r--winsup/cygwin/include/sys/syslog.h2
-rw-r--r--winsup/cygwin/include/sys/sysmacros.h2
-rw-r--r--winsup/cygwin/include/sys/sysproto.h2
-rw-r--r--winsup/cygwin/include/sys/termio.h2
-rw-r--r--winsup/cygwin/include/sys/termios.h8
-rw-r--r--winsup/cygwin/include/sys/ucontext.h24
-rw-r--r--winsup/cygwin/include/sys/uio.h2
-rw-r--r--winsup/cygwin/include/sys/un.h2
-rw-r--r--winsup/cygwin/include/sys/utime.h2
-rw-r--r--winsup/cygwin/include/sys/utmp.h4
-rw-r--r--winsup/cygwin/include/sys/utsname.h2
-rw-r--r--winsup/cygwin/include/sys/vfs.h2
-rw-r--r--winsup/cygwin/include/sys/xattr.h3
-rw-r--r--winsup/cygwin/include/syslog.h2
-rw-r--r--winsup/cygwin/include/termio.h2
-rw-r--r--winsup/cygwin/include/tzfile.h2
-rw-r--r--winsup/cygwin/include/ucontext.h26
-rw-r--r--winsup/cygwin/include/utmpx.h5
-rw-r--r--winsup/cygwin/include/wait.h2
-rw-r--r--winsup/cygwin/init.cc21
-rw-r--r--winsup/cygwin/ioctl.cc3
-rw-r--r--winsup/cygwin/ipc.cc2
-rw-r--r--winsup/cygwin/kernel32.cc5
-rw-r--r--winsup/cygwin/lc_msg.h71
-rw-r--r--winsup/cygwin/ldap.cc714
-rw-r--r--winsup/cygwin/ldap.h67
-rw-r--r--winsup/cygwin/lib/_cygwin_crt0_common.cc8
-rw-r--r--winsup/cygwin/lib/atexit.c47
-rw-r--r--winsup/cygwin/lib/crt0.h2
-rw-r--r--winsup/cygwin/lib/cygwin_attach_dll.c2
-rw-r--r--winsup/cygwin/lib/cygwin_crt0.c2
-rw-r--r--winsup/cygwin/lib/dll_entry.c2
-rw-r--r--winsup/cygwin/lib/dll_main.cc2
-rw-r--r--winsup/cygwin/lib/dso_handle.c (renamed from winsup/cygwin/include/cygwin/_types.h)12
-rw-r--r--winsup/cygwin/lib/libcmain.c2
-rw-r--r--winsup/cygwin/lib/premain0.c2
-rw-r--r--winsup/cygwin/lib/premain1.c2
-rw-r--r--winsup/cygwin/lib/premain2.c2
-rw-r--r--winsup/cygwin/lib/premain3.c2
-rw-r--r--winsup/cygwin/libc/arc4random.cc363
-rw-r--r--winsup/cygwin/libc/arc4random_stir.c22
-rw-r--r--winsup/cygwin/libc/base64.c13
-rw-r--r--winsup/cygwin/libc/bsdlib.cc7
-rw-r--r--winsup/cygwin/libc/fnmatch.c133
-rw-r--r--winsup/cygwin/libc/fts.c182
-rw-r--r--winsup/cygwin/libc/inet_addr.c2
-rw-r--r--winsup/cygwin/libc/minires-os-if.c21
-rw-r--r--winsup/cygwin/libc/minires.c29
-rw-r--r--winsup/cygwin/libc/minires.h2
-rw-r--r--winsup/cygwin/libc/rcmd.cc2
-rw-r--r--winsup/cygwin/libc/rexec.cc184
-rw-r--r--winsup/cygwin/libc/strfmon.c2
-rw-r--r--winsup/cygwin/libc/strptime.cc47
-rw-r--r--winsup/cygwin/libc/xsique.cc2
-rw-r--r--[-rwxr-xr-x]winsup/cygwin/libstdcxx_wrapper.cc2
-rw-r--r--winsup/cygwin/localtime.cc100
-rw-r--r--winsup/cygwin/malloc.cc3801
-rw-r--r--winsup/cygwin/malloc_wrapper.cc26
-rw-r--r--winsup/cygwin/math.h43
-rw-r--r--winsup/cygwin/math/DISCLAIMER.PD9
-rw-r--r--winsup/cygwin/math/acosh.def.h70
-rw-r--r--winsup/cygwin/math/acoshl.c46
-rw-r--r--winsup/cygwin/math/acosl.c22
-rw-r--r--winsup/cygwin/math/asinhl.c33
-rw-r--r--winsup/cygwin/math/asinl.c27
-rw-r--r--winsup/cygwin/math/atan2l.c14
-rw-r--r--winsup/cygwin/math/atanhl.c34
-rw-r--r--winsup/cygwin/math/atanl.c17
-rw-r--r--winsup/cygwin/math/cabs.def.h49
-rw-r--r--winsup/cygwin/math/cabsl.c48
-rw-r--r--winsup/cygwin/math/cacos.def.h57
-rw-r--r--winsup/cygwin/math/cacosh.def.h100
-rw-r--r--winsup/cygwin/math/cacosl.c50
-rw-r--r--winsup/cygwin/math/carg.def.h49
-rw-r--r--winsup/cygwin/math/cargl.c48
-rw-r--r--winsup/cygwin/math/casin.def.h61
-rw-r--r--winsup/cygwin/math/casinh.def.h99
-rw-r--r--winsup/cygwin/math/casinl.c50
-rw-r--r--winsup/cygwin/math/catan.def.h61
-rw-r--r--winsup/cygwin/math/catanh.def.h93
-rw-r--r--winsup/cygwin/math/catanl.c50
-rw-r--r--winsup/cygwin/math/cbrtl.c80
-rw-r--r--winsup/cygwin/math/ccos.def.h54
-rw-r--r--winsup/cygwin/math/ccosh.def.h95
-rw-r--r--winsup/cygwin/math/ccosl.c50
-rw-r--r--winsup/cygwin/math/ceil.S124
-rw-r--r--winsup/cygwin/math/ceilf.S120
-rw-r--r--winsup/cygwin/math/ceill.S64
-rw-r--r--winsup/cygwin/math/cephes_emath.c1283
-rw-r--r--winsup/cygwin/math/cephes_emath.h719
-rw-r--r--winsup/cygwin/math/cephes_mconf.h417
-rw-r--r--winsup/cygwin/math/cexp.def.h111
-rw-r--r--winsup/cygwin/math/cexpl.c48
-rw-r--r--winsup/cygwin/math/cimag.def.h49
-rw-r--r--winsup/cygwin/math/cimagl.c48
-rw-r--r--winsup/cygwin/math/clog.def.h71
-rw-r--r--winsup/cygwin/math/clog10.def.h71
-rw-r--r--winsup/cygwin/math/clog10l.c48
-rw-r--r--winsup/cygwin/math/clogl.c48
-rw-r--r--winsup/cygwin/math/complex_internal.h153
-rw-r--r--winsup/cygwin/math/conj.def.h49
-rw-r--r--winsup/cygwin/math/conjl.c48
-rw-r--r--winsup/cygwin/math/copysignl.S56
-rw-r--r--winsup/cygwin/math/cos.def.h65
-rw-r--r--winsup/cygwin/math/coshl.c45
-rw-r--r--winsup/cygwin/math/cosl.c46
-rw-r--r--winsup/cygwin/math/cosl_internal.S55
-rw-r--r--winsup/cygwin/math/cossin.c75
-rw-r--r--winsup/cygwin/math/cpow.def.h49
-rw-r--r--winsup/cygwin/math/cpowl.c48
-rw-r--r--winsup/cygwin/math/cproj.def.h58
-rw-r--r--winsup/cygwin/math/cprojl.c48
-rw-r--r--winsup/cygwin/math/creal.def.h49
-rw-r--r--winsup/cygwin/math/creall.c48
-rw-r--r--winsup/cygwin/math/csin.def.h61
-rw-r--r--winsup/cygwin/math/csinh.def.h107
-rw-r--r--winsup/cygwin/math/csinl.c50
-rw-r--r--winsup/cygwin/math/csqrt.def.h122
-rw-r--r--winsup/cygwin/math/csqrtl.c48
-rw-r--r--winsup/cygwin/math/ctan.def.h61
-rw-r--r--winsup/cygwin/math/ctanh.def.h94
-rw-r--r--winsup/cygwin/math/ctanl.c50
-rw-r--r--winsup/cygwin/math/erfl.c303
-rw-r--r--winsup/cygwin/math/exp.def.h136
-rw-r--r--winsup/cygwin/math/exp10l.c8
-rw-r--r--winsup/cygwin/math/exp2.S94
-rw-r--r--winsup/cygwin/math/exp2l.S92
-rw-r--r--winsup/cygwin/math/expl.c46
-rw-r--r--winsup/cygwin/math/expm1.def.h72
-rw-r--r--winsup/cygwin/math/expm1l.c46
-rw-r--r--winsup/cygwin/math/fabsl.c18
-rw-r--r--winsup/cygwin/math/fastmath.h120
-rw-r--r--winsup/cygwin/math/fdiml.c24
-rw-r--r--winsup/cygwin/math/finite.c19
-rw-r--r--winsup/cygwin/math/floorl.S72
-rw-r--r--winsup/cygwin/math/fmal.c12
-rw-r--r--winsup/cygwin/math/fmaxl.c13
-rw-r--r--winsup/cygwin/math/fminl.c12
-rw-r--r--winsup/cygwin/math/fmodl.c20
-rw-r--r--winsup/cygwin/math/frexpl.S130
-rw-r--r--winsup/cygwin/math/ilogbl.S65
-rw-r--r--winsup/cygwin/math/internal_logl.S66
-rw-r--r--winsup/cygwin/math/isinf.c18
-rw-r--r--winsup/cygwin/math/isnan.c18
-rw-r--r--winsup/cygwin/math/ldexpl.c23
-rw-r--r--winsup/cygwin/math/lgammal.c342
-rw-r--r--winsup/cygwin/math/llrint.c18
-rw-r--r--winsup/cygwin/math/llrintf.c17
-rw-r--r--winsup/cygwin/math/llrintl.c18
-rw-r--r--winsup/cygwin/math/llroundl.c38
-rw-r--r--winsup/cygwin/math/log.def.h69
-rw-r--r--winsup/cygwin/math/log10l.S93
-rw-r--r--winsup/cygwin/math/log1pl.S102
-rw-r--r--winsup/cygwin/math/log2l.S87
-rw-r--r--winsup/cygwin/math/logbl.c22
-rw-r--r--winsup/cygwin/math/logl.c46
-rw-r--r--winsup/cygwin/math/lrint.c30
-rw-r--r--winsup/cygwin/math/lrintf.c30
-rw-r--r--winsup/cygwin/math/lrintl.c18
-rw-r--r--winsup/cygwin/math/lroundl.c37
-rw-r--r--winsup/cygwin/math/modfl.c41
-rw-r--r--winsup/cygwin/math/nanl.c5
-rw-r--r--winsup/cygwin/math/nearbyint.S57
-rw-r--r--winsup/cygwin/math/nearbyintf.S57
-rw-r--r--winsup/cygwin/math/nearbyintl.S58
-rw-r--r--winsup/cygwin/math/nextafterl.c71
-rw-r--r--winsup/cygwin/math/nexttoward.c47
-rw-r--r--winsup/cygwin/math/nexttowardf.c43
-rw-r--r--winsup/cygwin/math/pow.def.h215
-rw-r--r--winsup/cygwin/math/pow10l.c8
-rw-r--r--winsup/cygwin/math/powi.def.h153
-rw-r--r--winsup/cygwin/math/powil.c46
-rw-r--r--winsup/cygwin/math/powl.c46
-rw-r--r--winsup/cygwin/math/remainder.S40
-rw-r--r--winsup/cygwin/math/remainderf.S40
-rw-r--r--winsup/cygwin/math/remainderl.S39
-rw-r--r--winsup/cygwin/math/remquol.S75
-rw-r--r--winsup/cygwin/math/rint.c29
-rw-r--r--winsup/cygwin/math/rintf.c29
-rw-r--r--winsup/cygwin/math/rintl.c16
-rw-r--r--winsup/cygwin/math/roundl.c26
-rw-r--r--winsup/cygwin/math/scalbl.S35
-rw-r--r--winsup/cygwin/math/scalbnl.S41
-rw-r--r--winsup/cygwin/math/sin.def.h65
-rw-r--r--winsup/cygwin/math/sinhl.c100
-rw-r--r--winsup/cygwin/math/sinl.c46
-rw-r--r--winsup/cygwin/math/sinl_internal.S58
-rw-r--r--winsup/cygwin/math/sqrt.def.h94
-rw-r--r--winsup/cygwin/math/sqrtl.c46
-rw-r--r--winsup/cygwin/math/tanhl.c92
-rw-r--r--winsup/cygwin/math/tanl.S62
-rw-r--r--winsup/cygwin/math/tgammal.c393
-rw-r--r--winsup/cygwin/math/truncl.c26
-rw-r--r--winsup/cygwin/mcount.c14
-rw-r--r--winsup/cygwin/miscfuncs.cc544
-rw-r--r--winsup/cygwin/miscfuncs.h38
-rwxr-xr-xwinsup/cygwin/mkglobals_h2
-rwxr-xr-xwinsup/cygwin/mkvers.sh86
-rw-r--r--winsup/cygwin/mmap.cc193
-rw-r--r--winsup/cygwin/mmap_helper.h2
-rw-r--r--winsup/cygwin/mount.cc417
-rw-r--r--winsup/cygwin/mount.h21
-rw-r--r--winsup/cygwin/msg.cc110
-rw-r--r--winsup/cygwin/mtinfo.h2
-rw-r--r--winsup/cygwin/net.cc3078
-rw-r--r--winsup/cygwin/netdb.cc4
-rw-r--r--winsup/cygwin/nfs.cc2
-rw-r--r--winsup/cygwin/nfs.h2
-rw-r--r--winsup/cygwin/nlsfuncs.cc130
-rw-r--r--winsup/cygwin/ntdll.h102
-rw-r--r--winsup/cygwin/ntea.cc496
-rw-r--r--winsup/cygwin/passwd.cc696
-rw-r--r--winsup/cygwin/path.cc2570
-rw-r--r--winsup/cygwin/path.h123
-rw-r--r--winsup/cygwin/perprocess.h2
-rw-r--r--winsup/cygwin/pinfo.cc306
-rw-r--r--winsup/cygwin/pinfo.h10
-rw-r--r--winsup/cygwin/pipe.cc106
-rw-r--r--winsup/cygwin/poll.cc37
-rw-r--r--winsup/cygwin/posix_ipc.cc1017
-rw-r--r--winsup/cygwin/profil.c94
-rw-r--r--winsup/cygwin/profil.h10
-rw-r--r--winsup/cygwin/pseudo-reloc.cc10
-rw-r--r--winsup/cygwin/pthread.cc5
-rw-r--r--winsup/cygwin/pwdgrp.h271
-rw-r--r--winsup/cygwin/quotactl.cc331
-rw-r--r--winsup/cygwin/random.cc13
-rw-r--r--winsup/cygwin/regex/regcomp.c5
-rw-r--r--winsup/cygwin/registry.cc97
-rw-r--r--winsup/cygwin/registry.h7
-rw-r--r--winsup/cygwin/regparm.h2
-rw-r--r--winsup/cygwin/release/1.7.2671
-rw-r--r--winsup/cygwin/release/1.7.2719
-rw-r--r--winsup/cygwin/release/1.7.2855
-rw-r--r--winsup/cygwin/release/1.7.2944
-rw-r--r--winsup/cygwin/release/1.7.3043
-rw-r--r--winsup/cygwin/release/1.7.3142
-rw-r--r--winsup/cygwin/release/1.7.3223
-rw-r--r--winsup/cygwin/release/1.7.3380
-rw-r--r--winsup/cygwin/release/1.7.3494
-rw-r--r--winsup/cygwin/release/1.7.3590
-rw-r--r--winsup/cygwin/release/2.0.051
-rw-r--r--winsup/cygwin/release/2.0.18
-rw-r--r--winsup/cygwin/release/2.0.38
-rw-r--r--winsup/cygwin/release/2.0.418
-rw-r--r--winsup/cygwin/release/2.1.039
-rw-r--r--winsup/cygwin/release/2.2.030
-rw-r--r--winsup/cygwin/release/2.2.129
-rw-r--r--winsup/cygwin/release/2.3.070
-rw-r--r--winsup/cygwin/release/2.3.119
-rw-r--r--winsup/cygwin/release/2.4.086
-rw-r--r--winsup/cygwin/release/2.4.112
-rw-r--r--winsup/cygwin/release/2.5.0115
-rw-r--r--winsup/cygwin/release/2.5.122
-rw-r--r--winsup/cygwin/release/2.5.233
-rw-r--r--winsup/cygwin/resource.cc178
-rw-r--r--winsup/cygwin/scandir.cc5
-rw-r--r--winsup/cygwin/sched.cc343
-rw-r--r--winsup/cygwin/sec_acl.cc2031
-rw-r--r--winsup/cygwin/sec_auth.cc487
-rw-r--r--winsup/cygwin/sec_helper.cc380
-rw-r--r--winsup/cygwin/sec_posixacl.cc1077
-rw-r--r--winsup/cygwin/sec_posixacl.h68
-rw-r--r--winsup/cygwin/security.cc877
-rw-r--r--winsup/cygwin/security.h132
-rw-r--r--winsup/cygwin/security.sgml45
-rw-r--r--winsup/cygwin/select.cc352
-rw-r--r--winsup/cygwin/select.h10
-rw-r--r--winsup/cygwin/sem.cc50
-rw-r--r--winsup/cygwin/setlsapwd.cc14
-rw-r--r--winsup/cygwin/shared.cc25
-rw-r--r--winsup/cygwin/shared_info.h5
-rw-r--r--winsup/cygwin/shm.cc80
-rw-r--r--winsup/cygwin/signal.cc205
-rw-r--r--winsup/cygwin/sigproc.cc137
-rw-r--r--winsup/cygwin/sigproc.h23
-rw-r--r--winsup/cygwin/smallprint.cc19
-rw-r--r--winsup/cygwin/spawn.cc1218
-rw-r--r--winsup/cygwin/spinlock.h2
-rw-r--r--winsup/cygwin/stackdump.sgml13
-rw-r--r--winsup/cygwin/strace.cc88
-rw-r--r--winsup/cygwin/strfuncs.cc52
-rw-r--r--winsup/cygwin/string.h14
-rw-r--r--winsup/cygwin/strsig.cc5
-rw-r--r--winsup/cygwin/sync.cc3
-rw-r--r--winsup/cygwin/sync.h3
-rw-r--r--winsup/cygwin/syscalls.cc2374
-rw-r--r--winsup/cygwin/sysconf.cc489
-rw-r--r--winsup/cygwin/syslog.cc3
-rw-r--r--winsup/cygwin/termios.cc3
-rw-r--r--winsup/cygwin/textmode.c6
-rw-r--r--winsup/cygwin/textreadmode.c2
-rw-r--r--winsup/cygwin/thread.cc726
-rw-r--r--winsup/cygwin/thread.h49
-rw-r--r--winsup/cygwin/timer.cc217
-rw-r--r--winsup/cygwin/times.cc136
-rw-r--r--winsup/cygwin/tls_pbuf.cc28
-rw-r--r--winsup/cygwin/tls_pbuf.h24
-rw-r--r--winsup/cygwin/tlsoffsets.h224
-rw-r--r--winsup/cygwin/tlsoffsets64.h224
-rw-r--r--winsup/cygwin/tmpbuf.h2
-rw-r--r--winsup/cygwin/tty.cc6
-rw-r--r--winsup/cygwin/tty.h34
-rw-r--r--winsup/cygwin/uinfo.cc2327
-rw-r--r--winsup/cygwin/uname.cc128
-rw-r--r--winsup/cygwin/userinfo.h40
-rw-r--r--winsup/cygwin/wait.cc3
-rw-r--r--winsup/cygwin/wchar.h8
-rw-r--r--winsup/cygwin/winbase.h57
-rw-r--r--winsup/cygwin/wincap.cc152
-rw-r--r--winsup/cygwin/wincap.h34
-rw-r--r--winsup/cygwin/window.cc5
-rw-r--r--winsup/cygwin/winf.cc15
-rw-r--r--winsup/cygwin/winf.h4
-rw-r--r--winsup/cygwin/wininfo.h2
-rw-r--r--winsup/cygwin/winlean.h34
-rw-r--r--winsup/cygwin/winsup.h50
-rw-r--r--winsup/cygwin/winver.rc2
-rw-r--r--winsup/cygwin/wow64.cc24
-rw-r--r--winsup/cygwin/wow64.h2
-rw-r--r--winsup/cygwin/x86_64.din6
-rw-r--r--winsup/doc/.gitignore (renamed from winsup/doc/.cvsignore)0
-rw-r--r--winsup/doc/Makefile.in133
-rw-r--r--winsup/doc/README24
-rw-r--r--winsup/doc/aclocal.m4875
-rwxr-xr-xwinsup/doc/bodysnatcher.pl1
-rwxr-xr-xwinsup/doc/configure296
-rw-r--r--winsup/doc/configure.ac17
-rw-r--r--winsup/doc/cygserver.xml18
-rw-r--r--winsup/doc/cygwin-api.in.xml34
-rw-r--r--winsup/doc/cygwin-api.xml33
-rw-r--r--winsup/doc/cygwin-ug-net.xml4
-rw-r--r--winsup/doc/cygwin.xsl12
-rw-r--r--winsup/doc/cygwinenv.xml27
-rw-r--r--winsup/doc/doctool.c622
-rw-r--r--winsup/doc/doctool.txt146
-rw-r--r--winsup/doc/faq-api.xml12
-rw-r--r--winsup/doc/faq-copyright.xml2
-rw-r--r--winsup/doc/faq-programming.xml229
-rw-r--r--winsup/doc/faq-resources.xml27
-rw-r--r--winsup/doc/faq-setup.xml385
-rw-r--r--winsup/doc/faq-using.xml620
-rw-r--r--winsup/doc/faq-what.xml113
-rw-r--r--winsup/doc/fo.xsl39
-rw-r--r--winsup/doc/gprof.xml250
-rw-r--r--winsup/doc/highlights.xml71
-rw-r--r--winsup/doc/html.xsl29
-rw-r--r--winsup/doc/intro.xml199
-rw-r--r--winsup/doc/legal.xml2
-rw-r--r--winsup/doc/logon-funcs.xml95
-rw-r--r--winsup/doc/man.xsl13
-rw-r--r--winsup/doc/misc-funcs.xml113
-rw-r--r--winsup/doc/new-features.xml684
-rw-r--r--winsup/doc/ntsec.xml2120
-rw-r--r--winsup/doc/ov-ex-unix.xml8
-rw-r--r--winsup/doc/ov-ex-win.xml6
-rw-r--r--winsup/doc/overview.xml22
-rw-r--r--winsup/doc/path.xml (renamed from winsup/cygwin/path.sgml)156
-rw-r--r--winsup/doc/pathnames.xml99
-rw-r--r--winsup/doc/posix.xml (renamed from winsup/cygwin/posix.sgml)376
-rw-r--r--winsup/doc/programming.xml1
-rw-r--r--winsup/doc/setup-env.xml23
-rw-r--r--winsup/doc/setup-files.xml16
-rw-r--r--winsup/doc/setup-locale.xml42
-rw-r--r--winsup/doc/setup-maxmem.xml34
-rw-r--r--winsup/doc/setup-net.xml54
-rw-r--r--winsup/doc/specialnames.xml36
-rw-r--r--winsup/doc/textbinary.xml2
-rw-r--r--winsup/doc/using.xml2
-rw-r--r--winsup/doc/utils.xml (renamed from winsup/utils/utils.xml)1405
-rwxr-xr-xwinsup/doc/xidepend3
-rw-r--r--winsup/lsaauth/Makefile.in1
-rw-r--r--winsup/lsaauth/aclocal.m4875
-rwxr-xr-xwinsup/lsaauth/configure333
-rw-r--r--winsup/lsaauth/configure.ac28
-rwxr-xr-xwinsup/lsaauth/cyglsa-config2
-rw-r--r--winsup/lsaauth/cyglsa.c39
-rw-r--r--winsup/testsuite/Makefile.in1
-rwxr-xr-x[-rw-r--r--]winsup/testsuite/configure257
-rwxr-xr-xwinsup/testsuite/configure.ac4
-rw-r--r--winsup/testsuite/cygrun.c2
-rw-r--r--winsup/testsuite/winsup.api/cygload.cc2
-rw-r--r--winsup/testsuite/winsup.api/cygload.h1
-rw-r--r--winsup/testsuite/winsup.api/devdsp.c2
-rw-r--r--[-rwxr-xr-x]winsup/testsuite/winsup.api/signal-into-win32-api.c0
-rw-r--r--winsup/utils/Makefile.in18
-rw-r--r--winsup/utils/aclocal.m42
-rw-r--r--winsup/utils/bloda.cc2
-rwxr-xr-xwinsup/utils/configure110
-rw-r--r--winsup/utils/configure.ac16
-rw-r--r--winsup/utils/cygcheck.cc388
-rw-r--r--winsup/utils/cygpath.cc87
-rw-r--r--winsup/utils/dump_setup.cc17
-rw-r--r--winsup/utils/dumper.cc6
-rw-r--r--winsup/utils/dumper.h2
-rw-r--r--winsup/utils/getconf.c53
-rw-r--r--winsup/utils/getfacl.c202
-rw-r--r--winsup/utils/kill.cc9
-rw-r--r--winsup/utils/ldd.cc20
-rw-r--r--winsup/utils/loadlib.h2
-rw-r--r--winsup/utils/locale.cc9
-rw-r--r--winsup/utils/minidumper.cc273
-rw-r--r--winsup/utils/mkgroup.c522
-rw-r--r--winsup/utils/mkpasswd.c557
-rw-r--r--winsup/utils/module_info.cc53
-rw-r--r--winsup/utils/mount.cc5
-rw-r--r--winsup/utils/parse_pe.cc4
-rw-r--r--winsup/utils/passwd.c83
-rw-r--r--winsup/utils/path.cc10
-rw-r--r--winsup/utils/path.h2
-rw-r--r--winsup/utils/pldd.c4
-rw-r--r--winsup/utils/ps.cc52
-rw-r--r--winsup/utils/regtool.cc69
-rw-r--r--winsup/utils/setfacl.c571
-rw-r--r--winsup/utils/setmetamode.c4
-rw-r--r--winsup/utils/ssp.c250
-rw-r--r--winsup/utils/strace.cc106
-rw-r--r--winsup/utils/testsuite.cc2
-rw-r--r--winsup/utils/testsuite.h2
-rwxr-xr-xwinsup/utils/tzmap-from-unicode.org86
-rw-r--r--winsup/utils/tzmap.h517
-rw-r--r--winsup/utils/tzset.c506
-rw-r--r--winsup/utils/umount.cc4
-rw-r--r--winsup/utils/wide_path.h2
-rwxr-xr-xylwrap202
2079 files changed, 256804 insertions, 97032 deletions
diff --git a/.gitattributes b/.gitattributes
new file mode 100644
index 000000000..06d51d28a
--- /dev/null
+++ b/.gitattributes
@@ -0,0 +1,20 @@
+# -*- conf -*-
+
+## Set merge driver for ChangeLog files
+# See gnulib's lib/git-merge-changelog.c (or git-merge-changelog(1))
+# for per-user setup instructions.
+#
+# The short version of this (optional) procedure is:
+#
+# (1) Install git-merge-changelog (this is the tricky part!)
+#
+# (2) Add something like the following to your ~/.gitconfig:
+#
+# [merge "merge-changelog"]
+# name = GNU-style ChangeLog merge driver
+# driver = git-merge-changelog %O %A %B
+#
+# (3) Enjoy mostly effortless ChangeLog merges, at least until the
+# file gets renamed again ...
+
+ChangeLog merge=merge-changelog
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 000000000..13a554aa0
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,44 @@
+*.diff
+*.patch
+*.orig
+*.rej
+
+*~
+.#*
+*#
+
+*.flt
+*.gmo
+*.info
+*.la
+*.lo
+*.o
+*.pyc
+*.swp
+*.tmp
+
+.deps
+.libs
+
+autom4te.cache
+config.cache
+config.h
+config.intl
+config.log
+config.status
+libtool
+POTFILES
+*-POTFILES
+
+tags
+TAGS
+TAGS.sub
+
+.gdbinit
+.gdb_history
+
+# ignore core files, but not java/net/protocol/core/
+core
+!core/
+
+lost+found
diff --git a/COPYING.LIB b/COPYING.LIB
index 778d0bb5b..2d2d780e6 100644
--- a/COPYING.LIB
+++ b/COPYING.LIB
@@ -1,112 +1,127 @@
- GNU LIBRARY GENERAL PUBLIC LICENSE
- Version 2, June 1991
- Copyright (C) 1991 Free Software Foundation, Inc.
- 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
+ GNU LESSER GENERAL PUBLIC LICENSE
+ Version 2.1, February 1999
+
+ Copyright (C) 1991, 1999 Free Software Foundation, Inc.
+ 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
-[This is the first released version of the library GPL. It is
- numbered 2 because it goes with version 2 of the ordinary GPL.]
+[This is the first released version of the Lesser GPL. It also counts
+ as the successor of the GNU Library Public License, version 2, hence
+ the version number 2.1.]
- Preamble
+ Preamble
The licenses for most software are designed to take away your
freedom to share and change it. By contrast, the GNU General Public
Licenses are intended to guarantee your freedom to share and change
free software--to make sure the software is free for all its users.
- This license, the Library General Public License, applies to some
-specially designated Free Software Foundation software, and to any
-other libraries whose authors decide to use it. You can use it for
-your libraries, too.
-
- When we speak of free software, we are referring to freedom, not
-price. Our General Public Licenses are designed to make sure that you
-have the freedom to distribute copies of free software (and charge for
-this service if you wish), that you receive source code or can get it
-if you want it, that you can change the software or use pieces of it
-in new free programs; and that you know you can do these things.
+ This license, the Lesser General Public License, applies to some
+specially designated software packages--typically libraries--of the
+Free Software Foundation and other authors who decide to use it. You
+can use it too, but we suggest you first think carefully about whether
+this license or the ordinary General Public License is the better
+strategy to use in any particular case, based on the explanations
+below.
+
+ When we speak of free software, we are referring to freedom of use,
+not price. Our General Public Licenses are designed to make sure that
+you have the freedom to distribute copies of free software (and charge
+for this service if you wish); that you receive source code or can get
+it if you want it; that you can change the software and use pieces of
+it in new free programs; and that you are informed that you can do
+these things.
To protect your rights, we need to make restrictions that forbid
-anyone to deny you these rights or to ask you to surrender the rights.
-These restrictions translate to certain responsibilities for you if
-you distribute copies of the library, or if you modify it.
+distributors to deny you these rights or to ask you to surrender these
+rights. These restrictions translate to certain responsibilities for
+you if you distribute copies of the library or if you modify it.
For example, if you distribute copies of the library, whether gratis
or for a fee, you must give the recipients all the rights that we gave
you. You must make sure that they, too, receive or can get the source
-code. If you link a program with the library, you must provide
-complete object files to the recipients so that they can relink them
-with the library, after making changes to the library and recompiling
+code. If you link other code with the library, you must provide
+complete object files to the recipients, so that they can relink them
+with the library after making changes to the library and recompiling
it. And you must show them these terms so they know their rights.
- Our method of protecting your rights has two steps: (1) copyright
-the library, and (2) offer you this license which gives you legal
+ We protect your rights with a two-step method: (1) we copyright the
+library, and (2) we offer you this license, which gives you legal
permission to copy, distribute and/or modify the library.
- Also, for each distributor's protection, we want to make certain
-that everyone understands that there is no warranty for this free
-library. If the library is modified by someone else and passed on, we
-want its recipients to know that what they have is not the original
-version, so that any problems introduced by others will not reflect on
-the original authors' reputations.
+ To protect each distributor, we want to make it very clear that
+there is no warranty for the free library. Also, if the library is
+modified by someone else and passed on, the recipients should know
+that what they have is not the original version, so that the original
+author's reputation will not be affected by problems that might be
+introduced by others.
- Finally, any free program is threatened constantly by software
-patents. We wish to avoid the danger that companies distributing free
-software will individually obtain patent licenses, thus in effect
-transforming the program into proprietary software. To prevent this,
-we have made it clear that any patent must be licensed for everyone's
-free use or not licensed at all.
-
- Most GNU software, including some libraries, is covered by the ordinary
-GNU General Public License, which was designed for utility programs. This
-license, the GNU Library General Public License, applies to certain
-designated libraries. This license is quite different from the ordinary
-one; be sure to read it in full, and don't assume that anything in it is
-the same as in the ordinary license.
-
- The reason we have a separate public license for some libraries is that
-they blur the distinction we usually make between modifying or adding to a
-program and simply using it. Linking a program with a library, without
-changing the library, is in some sense simply using the library, and is
-analogous to running a utility program or application program. However, in
-a textual and legal sense, the linked executable is a combined work, a
-derivative of the original library, and the ordinary General Public License
-treats it as such.
-
- Because of this blurred distinction, using the ordinary General
-Public License for libraries did not effectively promote software
-sharing, because most developers did not use the libraries. We
-concluded that weaker conditions might promote sharing better.
-
- However, unrestricted linking of non-free programs would deprive the
-users of those programs of all benefit from the free status of the
-libraries themselves. This Library General Public License is intended to
-permit developers of non-free programs to use free libraries, while
-preserving your freedom as a user of such programs to change the free
-libraries that are incorporated in them. (We have not seen how to achieve
-this as regards changes in header files, but we have achieved it as regards
-changes in the actual functions of the Library.) The hope is that this
-will lead to faster development of free libraries.
+ Finally, software patents pose a constant threat to the existence of
+any free program. We wish to make sure that a company cannot
+effectively restrict the users of a free program by obtaining a
+restrictive license from a patent holder. Therefore, we insist that
+any patent license obtained for a version of the library must be
+consistent with the full freedom of use specified in this license.
+
+ Most GNU software, including some libraries, is covered by the
+ordinary GNU General Public License. This license, the GNU Lesser
+General Public License, applies to certain designated libraries, and
+is quite different from the ordinary General Public License. We use
+this license for certain libraries in order to permit linking those
+libraries into non-free programs.
+
+ When a program is linked with a library, whether statically or using
+a shared library, the combination of the two is legally speaking a
+combined work, a derivative of the original library. The ordinary
+General Public License therefore permits such linking only if the
+entire combination fits its criteria of freedom. The Lesser General
+Public License permits more lax criteria for linking other code with
+the library.
+
+ We call this license the "Lesser" General Public License because it
+does Less to protect the user's freedom than the ordinary General
+Public License. It also provides other free software developers Less
+of an advantage over competing non-free programs. These disadvantages
+are the reason we use the ordinary General Public License for many
+libraries. However, the Lesser license provides advantages in certain
+special circumstances.
+
+ For example, on rare occasions, there may be a special need to
+encourage the widest possible use of a certain library, so that it
+becomes a de-facto standard. To achieve this, non-free programs must
+be allowed to use the library. A more frequent case is that a free
+library does the same job as widely used non-free libraries. In this
+case, there is little to gain by limiting the free library to free
+software only, so we use the Lesser General Public License.
+
+ In other cases, permission to use a particular library in non-free
+programs enables a greater number of people to use a large body of
+free software. For example, permission to use the GNU C Library in
+non-free programs enables many more people to use the whole GNU
+operating system, as well as its variant, the GNU/Linux operating
+system.
+
+ Although the Lesser General Public License is Less protective of the
+users' freedom, it does ensure that the user of a program that is
+linked with the Library has the freedom and the wherewithal to run
+that program using a modified version of the Library.
The precise terms and conditions for copying, distribution and
modification follow. Pay close attention to the difference between a
"work based on the library" and a "work that uses the library". The
-former contains code derived from the library, while the latter only
-works together with the library.
-
- Note that it is possible for a library to be covered by the ordinary
-General Public License rather than by this special one.
+former contains code derived from the library, whereas the latter must
+be combined with the library in order to run.
- GNU LIBRARY GENERAL PUBLIC LICENSE
+ GNU LESSER GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
- 0. This License Agreement applies to any software library which
-contains a notice placed by the copyright holder or other authorized
-party saying it may be distributed under the terms of this Library
-General Public License (also called "this License"). Each licensee is
-addressed as "you".
+ 0. This License Agreement applies to any software library or other
+program which contains a notice placed by the copyright holder or
+other authorized party saying it may be distributed under the terms of
+this Lesser General Public License (also called "this License").
+Each licensee is addressed as "you".
A "library" means a collection of software functions and/or data
prepared so as to be conveniently linked with application programs
@@ -123,8 +138,8 @@ included without limitation in the term "modification".)
"Source code" for a work means the preferred form of the work for
making modifications to it. For a library, complete source code means
all the source code for all modules it contains, plus any associated
-interface definition files, plus the scripts used to control compilation
-and installation of the library.
+interface definition files, plus the scripts used to control
+compilation and installation of the library.
Activities other than copying, distribution and modification are not
covered by this License; they are outside its scope. The act of
@@ -133,7 +148,7 @@ such a program is covered only if its contents constitute a work based
on the Library (independent of the use of the Library in a tool for
writing it). Whether that is true depends on what the Library does
and what the program that uses the Library does.
-
+
1. You may copy and distribute verbatim copies of the Library's
complete source code as you receive it, in any medium, provided that
you conspicuously and appropriately publish on each copy an
@@ -255,7 +270,7 @@ distribute the object code for the work under the terms of Section 6.
Any executables containing that work also fall under Section 6,
whether or not they are linked directly with the Library itself.
- 6. As an exception to the Sections above, you may also compile or
+ 6. As an exception to the Sections above, you may also combine or
link a "work that uses the Library" with the Library to produce a
work containing portions of the Library, and distribute that work
under terms of your choice, provided that the terms permit
@@ -282,23 +297,31 @@ of these things:
Library will not necessarily be able to recompile the application
to use the modified definitions.)
- b) Accompany the work with a written offer, valid for at
- least three years, to give the same user the materials
- specified in Subsection 6a, above, for a charge no more
- than the cost of performing this distribution.
+ b) Use a suitable shared library mechanism for linking with the
+ Library. A suitable mechanism is one that (1) uses at run time a
+ copy of the library already present on the user's computer system,
+ rather than copying library functions into the executable, and (2)
+ will operate properly with a modified version of the library, if
+ the user installs one, as long as the modified version is
+ interface-compatible with the version that the work was made with.
- c) If distribution of the work is made by offering access to copy
+ c) Accompany the work with a written offer, valid for at least
+ three years, to give the same user the materials specified in
+ Subsection 6a, above, for a charge no more than the cost of
+ performing this distribution.
+
+ d) If distribution of the work is made by offering access to copy
from a designated place, offer equivalent access to copy the above
specified materials from the same place.
- d) Verify that the user has already received a copy of these
+ e) Verify that the user has already received a copy of these
materials or that you have already sent this user a copy.
For an executable, the required form of the "work that uses the
Library" must include any data and utility programs needed for
reproducing the executable from it. However, as a special exception,
-the source code distributed need not include anything that is normally
-distributed (in either source or binary form) with the major
+the materials to be distributed need not include anything that is
+normally distributed (in either source or binary form) with the major
components (compiler, kernel, and so on) of the operating system on
which the executable runs, unless that component itself accompanies
the executable.
@@ -347,7 +370,7 @@ Library), the recipient automatically receives a license from the
original licensor to copy, distribute, link with or modify the Library
subject to these terms and conditions. You may not impose any further
restrictions on the recipients' exercise of the rights granted herein.
-You are not responsible for enforcing compliance by third parties to
+You are not responsible for enforcing compliance by third parties with
this License.
11. If, as a consequence of a court judgment or allegation of patent
@@ -363,9 +386,10 @@ all those who receive copies directly or indirectly through you, then
the only way you could satisfy both it and this License would be to
refrain entirely from distribution of the Library.
-If any portion of this section is held invalid or unenforceable under any
-particular circumstance, the balance of the section is intended to apply,
-and the section as a whole is intended to apply in other circumstances.
+If any portion of this section is held invalid or unenforceable under
+any particular circumstance, the balance of the section is intended to
+apply, and the section as a whole is intended to apply in other
+circumstances.
It is not the purpose of this section to induce you to infringe any
patents or other property right claims or to contest validity of any
@@ -383,14 +407,14 @@ be a consequence of the rest of this License.
12. If the distribution and/or use of the Library is restricted in
certain countries either by patents or by copyrighted interfaces, the
-original copyright holder who places the Library under this License may add
-an explicit geographical distribution limitation excluding those countries,
-so that distribution is permitted only in or among countries not thus
-excluded. In such case, this License incorporates the limitation as if
-written in the body of this License.
+original copyright holder who places the Library under this License
+may add an explicit geographical distribution limitation excluding those
+countries, so that distribution is permitted only in or among
+countries not thus excluded. In such case, this License incorporates
+the limitation as if written in the body of this License.
13. The Free Software Foundation may publish revised and/or new
-versions of the Library General Public License from time to time.
+versions of the Lesser General Public License from time to time.
Such new versions will be similar in spirit to the present version,
but may differ in detail to address new problems or concerns.
@@ -411,7 +435,7 @@ decision will be guided by the two goals of preserving the free status
of all derivatives of our free software and of promoting the sharing
and reuse of software generally.
- NO WARRANTY
+ NO WARRANTY
15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
@@ -434,49 +458,53 @@ FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
DAMAGES.
- END OF TERMS AND CONDITIONS
+ END OF TERMS AND CONDITIONS
- Appendix: How to Apply These Terms to Your New Libraries
+ How to Apply These Terms to Your New Libraries
If you develop a new library, and you want it to be of the greatest
possible use to the public, we recommend making it free software that
everyone can redistribute and change. You can do so by permitting
-redistribution under these terms (or, alternatively, under the terms of the
-ordinary General Public License).
+redistribution under these terms (or, alternatively, under the terms
+of the ordinary General Public License).
+
+ To apply these terms, attach the following notices to the library.
+It is safest to attach them to the start of each source file to most
+effectively convey the exclusion of warranty; and each file should
+have at least the "copyright" line and a pointer to where the full
+notice is found.
- To apply these terms, attach the following notices to the library. It is
-safest to attach them to the start of each source file to most effectively
-convey the exclusion of warranty; and each file should have at least the
-"copyright" line and a pointer to where the full notice is found.
<one line to give the library's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
This library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public
+ modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
- version 2 of the License, or (at your option) any later version.
+ version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with this library; if not, write to the Free
- Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
- MA 02110-1301, USA
+ You should have received a copy of the GNU Lesser General Public
+ License along with this library; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
Also add information on how to contact you by electronic and paper mail.
-You should also get your employer (if you work as a programmer) or your
-school, if any, to sign a "copyright disclaimer" for the library, if
-necessary. Here is a sample; alter the names:
+You should also get your employer (if you work as a programmer) or
+your school, if any, to sign a "copyright disclaimer" for the library,
+if necessary. Here is a sample; alter the names:
Yoyodyne, Inc., hereby disclaims all copyright interest in the
- library `Frob' (a library for tweaking knobs) written by James Random Hacker.
+ library `Frob' (a library for tweaking knobs) written by James
+ Random Hacker.
<signature of Ty Coon>, 1 April 1990
Ty Coon, President of Vice
That's all there is to it!
+
+
diff --git a/COPYING.LIBGLOSS b/COPYING.LIBGLOSS
index d813065ef..c7a4c2924 100644
--- a/COPYING.LIBGLOSS
+++ b/COPYING.LIBGLOSS
@@ -352,3 +352,76 @@ 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.
+
+(18) - Rolls-Royce Controls and Data Services Limited (visium-* targets)
+
+Copyright (c) 2015 Rolls-Royce Controls and Data Services Limited.
+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 Rolls-Royce Controls and Data Services Limited 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 HOLDER 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.
+
+(19) - FTDI (ft32-* targets)
+
+Copyright (C) 2014 FTDI (support@ftdichip.com)
+
+The authors hereby grant permission to use, copy, modify, distribute,
+and license this software and its documentation for any purpose, provided
+that existing copyright notices are retained in all copies and that this
+notice is included verbatim in any distributions. No written agreement,
+license, or royalty fee is required for any of the authorized uses.
+Modifications to this software may be copyrighted by their authors
+and need not follow the licensing terms described here, provided that
+the new terms are clearly indicated on the first page of each file where
+they apply.
+
+(20) - Synopsys Inc (arc-* targets)
+
+Copyright (c) 2015, Synopsys, Inc. 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) Neither the name of the Synopsys, Inc., 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 HOLDER 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.
+
diff --git a/COPYING.NEWLIB b/COPYING.NEWLIB
index 73379ffc3..e7e1f8a74 100644
--- a/COPYING.NEWLIB
+++ b/COPYING.NEWLIB
@@ -762,7 +762,7 @@ SUCH DAMAGE.
(35) - ARM Ltd (arm and thumb variant targets only)
- Copyright (c) 2009 ARM Ltd
+ Copyright (c) 2009-2015 ARM Ltd
All rights reserved.
Redistribution and use in source and binary forms, with or without
@@ -820,9 +820,9 @@ NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-(37) Texas Instruments Incorporated (tic6x-* targets)
+(37) Texas Instruments Incorporated (tic6x-*, *-tirtos targets)
-Copyright (c) 1996-2010 Texas Instruments Incorporated
+Copyright (c) 1996-2010,2014 Texas Instruments Incorporated
http://www.ti.com/
Redistribution and use in source and binary forms, with or without
@@ -925,3 +925,127 @@ 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.
+(41) Ed Schouten - Free BSD
+
+Copyright (c) 2008 Ed Schouten <ed@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.
+
+(42) - Rolls-Royce Controls and Data Services Limited (visium-* targets)
+
+Copyright (c) 2015 Rolls-Royce Controls and Data Services Limited.
+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 Rolls-Royce Controls and Data Services Limited 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 HOLDER 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.
+
+(43) - FTDI (ft32-* targets)
+
+Copyright (C) 2014 FTDI (support@ftdichip.com)
+
+The authors hereby grant permission to use, copy, modify, distribute,
+and license this software and its documentation for any purpose, provided
+that existing copyright notices are retained in all copies and that this
+notice is included verbatim in any distributions. No written agreement,
+license, or royalty fee is required for any of the authorized uses.
+Modifications to this software may be copyrighted by their authors
+and need not follow the licensing terms described here, provided that
+the new terms are clearly indicated on the first page of each file where
+they apply.
+
+(44) - Synopsys Inc (arc-* targets)
+
+Copyright (c) 2015, Synopsys, Inc. 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) Neither the name of the Synopsys, Inc., 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 HOLDER 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.
+
+(45) Phoenix Systems - Phoenix-RTOS targets
+
+Copyright (c) 2016 Phoenix Systems
+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.
+
diff --git a/ChangeLog b/ChangeLog
index f390fa434..0e07ac706 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,89 @@
+2016-03-22 Corinna Vinschen <corinna@vinschen.de>
+
+ * Sync toplevel with upstream GCC.
+
+2015-11-12 Anton Kolesov <Anton.Kolesov@synopsys.com>
+
+ * COPYING.LIBGLOSS: Add Synopsys license.
+ * COPYING.NEWLIB: Likewise.
+
+2015-11-12 Anton Kolesov <Anton.Kolesov@synopsys.com>
+
+ * configure.in: Add ARC support to libgloss.
+ * configure: Regenerate.
+
+2015-09-22 Mike Frysinger <vapier@gentoo.org>
+
+ * config.guess: Update from config repo.
+ * config.sub: Ditto.
+
+2015-09-04 James Bowman <james.bowman@ftdichip.com>
+
+ * COPYING.LIBGLOSS: Add FTDI license.
+ * COPYING.NEWLIB: Likewise.
+
+2015-01-21 Eric Botcazou <ebotcazou@adacore.com>
+
+ * COPYING.LIBGLOSS: Add Controls and Data Services copyright.
+ * COPYING.NEWLIB: Likewise.
+
+2014-12-16 Jeff Johnston <jjohnstn@redhat.com>
+
+ * config.sub: Merge from binutils.
+ * config.guess: Ditto.
+
+2014-07-05 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
+
+ * configure.ac: Don't accept isl 0.10.
+ * configure: Regenerate.
+
+2014-05-14 Sandra Loosemore <sandra@codesourcery.com>
+
+ * configure.ac (target_makefile_frag): Set for nios2-*-elf*.
+ * configure: Regenerated.
+
+2014-04-04 Jeff Johnston <jjohnstn@redhat.com>
+
+ * COPYING.NEWLIB: Add to current TI license to
+ include tirtos addition.
+
+2014-02-04 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
+
+ PR target/59788
+ * ltmain.sh (opt_duplicate_compiler_generated_deps): Enable on
+ *solaris2*.
+
+2013-10-16 Jan-Benedict Glaw <jbglaw@lug-owl.de>
+
+ * configure.ac: Update from GCC.
+ * configure: Regenerate.
+
+2013-10-15 Hans-Peter Nilsson <hp@axis.com>
+
+ * src-release (do-proto-toplevel): Support subdir-path-prefixed
+ files in SUPPORT_FILES.
+ (SIM_SUPPORT_DIRS): New variable.
+ (sim.tar.bz2): New rule.
+
+2013-10-08 Jan-Benedict Glaw <jbglaw@lug-owl.de>
+
+ * configure.ac: Update from GCC.
+ * configure: Regenerate.
+
+2013-10-01 Jeff Johnston <jjohnstn@redhat.com>
+
+ * COPYING.NEWLIB: Update with new copyright.
+
+2013-09-21 Jan-Benedict Glaw <jbglaw@lug-owl.de>
+
+ * configure.ac: Update from GCC.
+ * configure: Regenerate.
+
+2013-09-20 Alan Modra <amodra@gmail.com>
+
+ * libtool.m4 (_LT_ENABLE_LOCK <ld -m flags>): Remove non-canonical
+ ppc host match. Support little-endian powerpc linux hosts.
+
2013-08-16 Joel Brobecker <brobecker@adacore.com>
* src-release (VER): When using $(TOOL)/common/create-version.sh,
diff --git a/Makefile.def b/Makefile.def
index 3ba1a5b9a..ea8453e85 100644
--- a/Makefile.def
+++ b/Makefile.def
@@ -30,6 +30,8 @@ build_modules= { module= flex; };
build_modules= { module= m4; };
build_modules= { module= texinfo; };
build_modules= { module= fixincludes; };
+build_modules= { module= libcpp;
+ extra_configure_flags='--disable-nls am_cv_func_iconv=no';};
host_modules= { module= bfd; bootstrap=true; };
host_modules= { module= opcodes; bootstrap=true; };
@@ -39,14 +41,15 @@ host_modules= { module= cgen; };
host_modules= { module= dejagnu; };
host_modules= { module= etc; };
host_modules= { module= fastjar; no_check_cross= true; };
-host_modules= { module= fixincludes;
+host_modules= { module= fixincludes; bootstrap=true;
missing= TAGS; };
host_modules= { module= flex; no_check_cross= true; };
host_modules= { module= gas; bootstrap=true; };
host_modules= { module= gcc; bootstrap=true;
extra_make_flags="$(EXTRA_GCC_FLAGS)"; };
host_modules= { module= gmp; lib_path=.libs; bootstrap=true;
- extra_configure_flags='--disable-shared';
+ // Work around in-tree gmp configure bug with missing flex.
+ extra_configure_flags='--disable-shared LEX="touch lex.yy.c"';
no_install= true;
// none-*-* disables asm optimizations, bootstrap-testing
// the compiler more thoroughly.
@@ -56,6 +59,7 @@ host_modules= { module= gmp; lib_path=.libs; bootstrap=true;
target="none-${host_vendor}-${host_os}"; };
host_modules= { module= mpfr; lib_path=.libs; bootstrap=true;
extra_configure_flags='--disable-shared @extra_mpfr_configure_flags@';
+ extra_make_flags='AM_CFLAGS="-DNO_ASM"';
no_install= true; };
host_modules= { module= mpc; lib_path=.libs; bootstrap=true;
extra_configure_flags='--disable-shared @extra_mpc_gmp_configure_flags@ @extra_mpc_mpfr_configure_flags@';
@@ -64,11 +68,6 @@ host_modules= { module= isl; lib_path=.libs; bootstrap=true;
extra_configure_flags='--disable-shared @extra_isl_gmp_configure_flags@';
extra_make_flags='V=1';
no_install= true; };
-host_modules= { module= cloog; lib_path=.libs; bootstrap=true;
- extra_configure_flags='--disable-shared --with-gmp=system --with-bits=gmp --with-isl=system';
- extra_exports='CPPFLAGS="$(HOST_GMPINC) $(HOST_ISLINC) $$CPPFLAGS"; export CPPFLAGS; LDFLAGS="-L$$r/$(HOST_SUBDIR)/gmp/.libs -L$$r/$(HOST_SUBDIR)/isl/.libs $$LDFLAGS"; export LDFLAGS; ';
- extra_make_flags='CPPFLAGS="$$CPPFLAGS" LDFLAGS="$$LDFLAGS" V=1';
- no_install= true; };
host_modules= { module= libelf; lib_path=.libs; bootstrap=true;
extra_configure_flags='--disable-shared';
no_install= true; };
@@ -85,11 +84,22 @@ host_modules= { module= libdecnumber; bootstrap=true; };
host_modules= { module= libgui; };
host_modules= { module= libiberty; bootstrap=true;
extra_configure_flags='@extra_host_libiberty_configure_flags@';};
+// Linker plugins may need their own build of libiberty; see
+// gcc/doc/install.texi. We take care that this build of libiberty doesn't get
+// installed. It's a helper library for linker plugins, so we pay attention to
+// @extra_linker_plugin_flags@ and @extra_linker_plugin_configure_flags@.
+host_modules= { module= libiberty-linker-plugin; bootstrap=true;
+ module_srcdir=libiberty;
+ extra_configure_flags='@extra_host_libiberty_configure_flags@ --disable-install-libiberty @extra_linker_plugin_flags@ @extra_linker_plugin_configure_flags@';
+ extra_make_flags='@extra_linker_plugin_flags@'; };
// We abuse missing to avoid installing anything for libiconv.
host_modules= { module= libiconv;
+ bootstrap=true;
extra_configure_flags='--disable-shared';
no_install= true;
- missing= install-info;
+ missing= pdf;
+ missing= html;
+ missing= info;
missing= install-pdf;
missing= install-html;
missing= install-info; };
@@ -98,7 +108,9 @@ host_modules= { module= readline; };
host_modules= { module= sid; };
host_modules= { module= sim; };
host_modules= { module= texinfo; no_install= true; };
-host_modules= { module= zlib; no_install=true; no_check=true; bootstrap=true; };
+host_modules= { module= zlib; no_install=true; no_check=true;
+ bootstrap=true;
+ extra_configure_flags='@extra_host_zlib_configure_flags@';};
host_modules= { module= gdb; };
host_modules= { module= expect; };
host_modules= { module= guile; };
@@ -111,21 +123,31 @@ host_modules= { module= libtermcap; no_check=true;
host_modules= { module= utils; no_check=true; };
host_modules= { module= gnattools; };
host_modules= { module= lto-plugin; bootstrap=true;
- extra_configure_flags=--enable-shared; };
+ extra_configure_flags='--enable-shared @extra_linker_plugin_flags@ @extra_linker_plugin_configure_flags@';
+ extra_make_flags='@extra_linker_plugin_flags@'; };
+host_modules= { module= libcc1; extra_configure_flags=--enable-shared; };
+host_modules= { module= gotools; };
target_modules = { module= libstdc++-v3;
bootstrap=true;
lib_path=src/.libs;
raw_cxx=true; };
-target_modules = { module= libmudflap; lib_path=.libs; };
target_modules = { module= libsanitizer;
bootstrap=true;
lib_path=.libs;
raw_cxx=true; };
+target_modules = { module= libmpx;
+ bootstrap=true;
+ lib_path=.libs; };
target_modules = { module= libvtv;
bootstrap=true;
lib_path=.libs;
raw_cxx=true; };
+target_modules = { module= libcilkrts;
+ lib_path=.libs; };
+target_modules = { module= liboffloadmic;
+ lib_path=.libs;
+ extra_configure_flags='@extra_liboffloadmic_configure_flags@'; };
target_modules = { module= libssp; lib_path=.libs; };
target_modules = { module= newlib; };
target_modules = { module= libgcc; bootstrap=true; no_check=true; };
@@ -270,6 +292,7 @@ flags_to_pass = { flag= LIBCFLAGS_FOR_TARGET ; };
flags_to_pass = { flag= LIBCXXFLAGS_FOR_TARGET ; };
flags_to_pass = { flag= NM_FOR_TARGET ; };
flags_to_pass = { flag= OBJDUMP_FOR_TARGET ; };
+flags_to_pass = { flag= OBJCOPY_FOR_TARGET ; };
flags_to_pass = { flag= RANLIB_FOR_TARGET ; };
flags_to_pass = { flag= READELF_FOR_TARGET ; };
flags_to_pass = { flag= STRIP_FOR_TARGET ; };
@@ -291,26 +314,32 @@ dependencies = { module=all-build-flex; on=all-build-m4; };
dependencies = { module=all-build-libiberty; on=all-build-texinfo; };
dependencies = { module=all-build-m4; on=all-build-texinfo; };
dependencies = { module=all-build-fixincludes; on=all-build-libiberty; };
+dependencies = { module=all-build-libcpp; on=all-build-libiberty; };
// Host modules specific to gcc.
dependencies = { module=configure-gcc; on=configure-intl; };
dependencies = { module=configure-gcc; on=all-gmp; };
+dependencies = { module=configure-gcc; on=all-mpfr; };
+dependencies = { module=configure-gcc; on=all-mpc; };
+dependencies = { module=configure-gcc; on=all-isl; };
dependencies = { module=configure-gcc; on=all-lto-plugin; };
dependencies = { module=configure-gcc; on=all-binutils; };
dependencies = { module=configure-gcc; on=all-gas; };
dependencies = { module=configure-gcc; on=all-ld; };
dependencies = { module=configure-gcc; on=all-gold; };
dependencies = { module=configure-gcc; on=all-libelf; };
+dependencies = { module=configure-gcc; on=all-libiconv; };
dependencies = { module=all-gcc; on=all-libiberty; hard=true; };
dependencies = { module=all-gcc; on=all-intl; };
dependencies = { module=all-gcc; on=all-mpfr; };
dependencies = { module=all-gcc; on=all-mpc; };
-dependencies = { module=all-gcc; on=all-cloog; };
+dependencies = { module=all-gcc; on=all-isl; };
dependencies = { module=all-gcc; on=all-build-texinfo; };
dependencies = { module=all-gcc; on=all-build-bison; };
dependencies = { module=all-gcc; on=all-build-flex; };
dependencies = { module=all-gcc; on=all-build-libiberty; };
dependencies = { module=all-gcc; on=all-build-fixincludes; };
+dependencies = { module=all-gcc; on=all-build-libcpp; };
dependencies = { module=all-gcc; on=all-zlib; };
dependencies = { module=all-gcc; on=all-libbacktrace; hard=true; };
dependencies = { module=all-gcc; on=all-libcpp; hard=true; };
@@ -318,6 +347,7 @@ dependencies = { module=all-gcc; on=all-libdecnumber; hard=true; };
dependencies = { module=all-gcc; on=all-libiberty; };
dependencies = { module=all-gcc; on=all-fixincludes; };
dependencies = { module=all-gcc; on=all-lto-plugin; };
+dependencies = { module=all-gcc; on=all-libiconv; };
dependencies = { module=info-gcc; on=all-build-libiberty; };
dependencies = { module=dvi-gcc; on=all-build-libiberty; };
dependencies = { module=pdf-gcc; on=all-build-libiberty; };
@@ -329,22 +359,33 @@ dependencies = { module=install-strip-gcc ; on=install-strip-lto-plugin; };
dependencies = { module=configure-libcpp; on=configure-libiberty; hard=true; };
dependencies = { module=configure-libcpp; on=configure-intl; };
+dependencies = { module=configure-libcpp; on=all-libiconv; };
dependencies = { module=all-libcpp; on=all-libiberty; hard=true; };
dependencies = { module=all-libcpp; on=all-intl; };
+dependencies = { module=all-libcpp; on=all-libiconv; };
dependencies = { module=all-fixincludes; on=all-libiberty; };
dependencies = { module=all-gnattools; on=all-target-libada; };
+dependencies = { module=all-gnattools; on=all-target-libstdc++-v3; };
+// Depending on the specific configuration, the LTO plugin will either use the
+// generic libiberty build or the specific build for linker plugins.
dependencies = { module=all-lto-plugin; on=all-libiberty; };
+dependencies = { module=all-lto-plugin; on=all-libiberty-linker-plugin; };
+
+dependencies = { module=configure-libcc1; on=configure-gcc; };
+dependencies = { module=all-libcc1; on=all-gcc; };
+
+dependencies = { module=all-gotools; on=all-target-libgo; };
dependencies = { module=all-utils; on=all-libiberty; };
+dependencies = { module=configure-intl; on=all-libiconv; };
dependencies = { module=configure-mpfr; on=all-gmp; };
dependencies = { module=configure-mpc; on=all-mpfr; };
dependencies = { module=configure-isl; on=all-gmp; };
-dependencies = { module=configure-cloog; on=all-isl; };
-dependencies = { module=configure-cloog; on=all-gmp; };
+dependencies = { module=all-intl; on=all-libiconv; };
// Host modules specific to gdb.
dependencies = { module=configure-gdb; on=all-intl; };
@@ -373,6 +414,7 @@ dependencies = { module=configure-bfd; on=configure-libiberty; hard=true; };
dependencies = { module=configure-bfd; on=configure-intl; };
dependencies = { module=all-bfd; on=all-libiberty; };
dependencies = { module=all-bfd; on=all-intl; };
+dependencies = { module=all-bfd; on=all-zlib; };
dependencies = { module=configure-opcodes; on=configure-libiberty; hard=true; };
dependencies = { module=all-opcodes; on=all-libiberty; };
@@ -417,6 +459,7 @@ dependencies = { module=all-ld; on=all-build-bison; };
dependencies = { module=all-ld; on=all-build-flex; };
dependencies = { module=all-ld; on=all-intl; };
dependencies = { module=all-ld; on=all-gas; };
+dependencies = { module=all-ld; on=all-binutils; };
dependencies = { module=install-ld; on=install-gold; };
dependencies = { module=install-strip-ld; on=install-strip-gold; };
dependencies = { module=configure-gold; on=configure-intl; };
@@ -492,6 +535,9 @@ dependencies = { module=all-m4; on=all-build-texinfo; };
// on libgcc and newlib/libgloss.
lang_env_dependencies = { module=libjava; cxx=true; };
lang_env_dependencies = { module=libitm; cxx=true; };
+lang_env_dependencies = { module=libffi; cxx=true; };
+lang_env_dependencies = { module=libcilkrts; cxx=true; };
+lang_env_dependencies = { module=liboffloadmic; cxx=true; };
lang_env_dependencies = { module=newlib; no_c=true; };
lang_env_dependencies = { module=libgloss; no_c=true; };
lang_env_dependencies = { module=libgcc; no_gcc=true; no_c=true; };
@@ -518,12 +564,14 @@ dependencies = { module=all-target-libjava; on=all-target-libffi; };
dependencies = { module=configure-target-libobjc; on=configure-target-boehm-gc; };
dependencies = { module=all-target-libobjc; on=all-target-boehm-gc; };
dependencies = { module=configure-target-libstdc++-v3; on=configure-target-libgomp; };
+dependencies = { module=configure-target-liboffloadmic; on=configure-target-libgomp; };
dependencies = { module=configure-target-libsanitizer; on=all-target-libstdc++-v3; };
dependencies = { module=configure-target-libvtv; on=all-target-libstdc++-v3; };
// parallel_list.o and parallel_settings.o depend on omp.h, which is
// generated by the libgomp configure. Unfortunately, due to the use of
// recursive make, we can't be that specific.
dependencies = { module=all-target-libstdc++-v3; on=configure-target-libgomp; };
+dependencies = { module=all-target-liboffloadmic; on=all-target-libgomp; };
dependencies = { module=install-target-libgo; on=install-target-libatomic; };
dependencies = { module=install-target-libgfortran; on=install-target-libquadmath; };
@@ -532,6 +580,10 @@ dependencies = { module=install-target-libsanitizer; on=install-target-libstdc++
dependencies = { module=install-target-libsanitizer; on=install-target-libgcc; };
dependencies = { module=install-target-libvtv; on=install-target-libstdc++-v3; };
dependencies = { module=install-target-libvtv; on=install-target-libgcc; };
+dependencies = { module=install-target-libcilkrts; on=install-target-libstdc++-v3; };
+dependencies = { module=install-target-libcilkrts; on=install-target-libgcc; };
+dependencies = { module=install-target-liboffloadmic; on=install-target-libstdc++-v3; };
+dependencies = { module=install-target-liboffloadmic; on=install-target-libgcc; };
dependencies = { module=install-target-libjava; on=install-target-libgcc; };
dependencies = { module=install-target-libitm; on=install-target-libgcc; };
dependencies = { module=install-target-libobjc; on=install-target-libgcc; };
@@ -547,11 +599,11 @@ dependencies = { module=all-target-winsup; on=all-target-libtermcap; };
dependencies = { module=configure-target-newlib; on=all-binutils; };
dependencies = { module=configure-target-newlib; on=all-ld; };
dependencies = { module=configure-target-libgfortran; on=all-target-libquadmath; };
+dependencies = { module=configure-target-libgfortran; on=all-target-libbacktrace; };
languages = { language=c; gcc-check-target=check-gcc; };
languages = { language=c++; gcc-check-target=check-c++;
lib-check-target=check-target-libstdc++-v3;
- lib-check-target=check-target-libmudflap-c++;
lib-check-target=check-target-libitm-c++;
lib-check-target=check-target-libgomp-c++; };
languages = { language=fortran; gcc-check-target=check-fortran;
diff --git a/Makefile.in b/Makefile.in
index a13771d40..1666c9de8 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -166,7 +166,7 @@ BUILD_EXPORTS = \
WINDMC="$(WINDMC_FOR_BUILD)"; export WINDMC;
# These variables must be set on the make command line for directories
-# built for the build system to override those in BASE_FLAGS_TO_PASSS.
+# built for the build system to override those in BASE_FLAGS_TO_PASS.
EXTRA_BUILD_FLAGS = \
CFLAGS="$(CFLAGS_FOR_BUILD)" \
LDFLAGS="$(LDFLAGS_FOR_BUILD)"
@@ -213,17 +213,19 @@ HOST_EXPORTS = \
LD_FOR_TARGET="$(LD_FOR_TARGET)"; export LD_FOR_TARGET; \
NM_FOR_TARGET="$(NM_FOR_TARGET)"; export NM_FOR_TARGET; \
OBJDUMP_FOR_TARGET="$(OBJDUMP_FOR_TARGET)"; export OBJDUMP_FOR_TARGET; \
+ OBJCOPY_FOR_TARGET="$(OBJCOPY_FOR_TARGET)"; export OBJCOPY_FOR_TARGET; \
RANLIB_FOR_TARGET="$(RANLIB_FOR_TARGET)"; export RANLIB_FOR_TARGET; \
READELF_FOR_TARGET="$(READELF_FOR_TARGET)"; export READELF_FOR_TARGET; \
TOPLEVEL_CONFIGURE_ARGUMENTS="$(TOPLEVEL_CONFIGURE_ARGUMENTS)"; export TOPLEVEL_CONFIGURE_ARGUMENTS; \
HOST_LIBS="$(STAGE1_LIBS)"; export HOST_LIBS; \
GMPLIBS="$(HOST_GMPLIBS)"; export GMPLIBS; \
GMPINC="$(HOST_GMPINC)"; export GMPINC; \
+ ISLLIBS="$(HOST_ISLLIBS)"; export ISLLIBS; \
ISLINC="$(HOST_ISLINC)"; export ISLINC; \
- CLOOGLIBS="$(HOST_CLOOGLIBS)"; export CLOOGLIBS; \
- CLOOGINC="$(HOST_CLOOGINC)"; export CLOOGINC; \
- LIBELFLIBS="$(HOST_LIBELFLIBS)" ; export LIBELFLIBS; \
- LIBELFINC="$(HOST_LIBELFINC)" ; export LIBELFINC; \
+ ISLVER="$(HOST_ISLVER)"; export ISLVER; \
+ LIBELFLIBS="$(HOST_LIBELFLIBS)"; export LIBELFLIBS; \
+ LIBELFINC="$(HOST_LIBELFINC)"; export LIBELFINC; \
+ XGCC_FLAGS_FOR_TARGET="$(XGCC_FLAGS_FOR_TARGET)"; export XGCC_FLAGS_FOR_TARGET; \
@if gcc-bootstrap
$(RPATH_ENVVAR)=`echo "$(TARGET_LIB_PATH)$$$(RPATH_ENVVAR)" | sed 's,::*,:,g;s,^:*,,;s,:*$$,,'`; export $(RPATH_ENVVAR); \
@endif gcc-bootstrap
@@ -239,9 +241,9 @@ POSTSTAGE1_CXX_EXPORT = \
-B$$r/$(HOST_SUBDIR)/prev-gcc/ -B$(build_tooldir)/bin/ -nostdinc++ \
-B$$r/prev-$(TARGET_SUBDIR)/libstdc++-v3/src/.libs \
-B$$r/prev-$(TARGET_SUBDIR)/libstdc++-v3/libsupc++/.libs \
- -I$$r/prev-$(TARGET_SUBDIR)/libstdc++-v3/include/$(TARGET_SUBDIR) \
- -I$$r/prev-$(TARGET_SUBDIR)/libstdc++-v3/include \
- -I$$s/libstdc++-v3/libsupc++ \
+ `if $(LEAN); then echo ' -isystem '; else echo ' -I'; fi`$$r/prev-$(TARGET_SUBDIR)/libstdc++-v3/include/$(TARGET_SUBDIR) \
+ `if $(LEAN); then echo ' -isystem '; else echo ' -I'; fi`$$r/prev-$(TARGET_SUBDIR)/libstdc++-v3/include \
+ `if $(LEAN); then echo ' -isystem '; else echo ' -I'; fi`$$s/libstdc++-v3/libsupc++ \
-L$$r/prev-$(TARGET_SUBDIR)/libstdc++-v3/src/.libs \
-L$$r/prev-$(TARGET_SUBDIR)/libstdc++-v3/libsupc++/.libs"; \
export CXX; \
@@ -256,6 +258,7 @@ POSTSTAGE1_HOST_EXPORTS = \
$(XGCC_FLAGS_FOR_TARGET) $$TFLAGS"; export CC; \
CC_FOR_BUILD="$$CC"; export CC_FOR_BUILD; \
$(POSTSTAGE1_CXX_EXPORT) \
+ $(LTO_EXPORTS) \
GNATBIND="$$r/$(HOST_SUBDIR)/prev-gcc/gnatbind"; export GNATBIND; \
LDFLAGS="$(POSTSTAGE1_LDFLAGS) $(BOOT_LDFLAGS)"; export LDFLAGS; \
HOST_LIBS="$(POSTSTAGE1_LIBS)"; export HOST_LIBS;
@@ -285,6 +288,7 @@ BASE_TARGET_EXPORTS = \
LIPO="$(LIPO_FOR_TARGET)"; export LIPO; \
NM="$(COMPILER_NM_FOR_TARGET)"; export NM; \
OBJDUMP="$(OBJDUMP_FOR_TARGET)"; export OBJDUMP; \
+ OBJCOPY="$(OBJCOPY_FOR_TARGET)"; export OBJCOPY; \
RANLIB="$(RANLIB_FOR_TARGET)"; export RANLIB; \
READELF="$(READELF_FOR_TARGET)"; export READELF; \
STRIP="$(STRIP_FOR_TARGET)"; export STRIP; \
@@ -309,12 +313,10 @@ NORMAL_TARGET_EXPORTS = \
HOST_GMPLIBS = @gmplibs@
HOST_GMPINC = @gmpinc@
-# Where to find ISL
+# Where to find isl
+HOST_ISLLIBS = @isllibs@
HOST_ISLINC = @islinc@
-
-# Where to find CLOOG
-HOST_CLOOGLIBS = @clooglibs@
-HOST_CLOOGINC = @clooginc@
+HOST_ISLVER = @islver@
# Where to find libelf
HOST_LIBELFLIBS = @libelflibs@
@@ -396,6 +398,7 @@ DLLTOOL = @DLLTOOL@
LD = @LD@
LIPO = @LIPO@
NM = @NM@
+OBJCOPY = @OBJCOPY@
OBJDUMP = @OBJDUMP@
RANLIB = @RANLIB@
READELF = @READELF@
@@ -483,11 +486,9 @@ STAGEfeedback_TFLAGS = $(STAGE_TFLAGS)
STAGEfeedback_CONFIGURE_FLAGS = $(STAGE_CONFIGURE_FLAGS)
-# Only build the C compiler for stage1, because that is the only one that
-# we can guarantee will build with the native compiler, and also it is the
-# only thing useful for building stage2. STAGE1_CFLAGS (via CFLAGS),
-# MAKEINFO and MAKEINFOFLAGS are explicitly passed here to make them
-# overrideable (for a bootstrap build stage1 also builds gcc.info).
+# By default, C and C++ are the only stage1 languages, because they are the
+# only ones we require to build with the bootstrap compiler, and also the
+# only ones useful for building stage2.
STAGE1_CFLAGS = @stage1_cflags@
STAGE1_CHECKING = @stage1_checking@
@@ -498,8 +499,10 @@ STAGE1_LANGUAGES = @stage1_languages@
# the last argument when conflicting --enable arguments are passed.
# * Likewise, we force-disable coverage flags, since the installed
# compiler probably has never heard of them.
+# * We also disable -Wformat, since older GCCs don't understand newer %s.
STAGE1_CONFIGURE_FLAGS = --disable-intermodule $(STAGE1_CHECKING) \
- --disable-coverage --enable-languages="$(STAGE1_LANGUAGES)"
+ --disable-coverage --enable-languages="$(STAGE1_LANGUAGES)" \
+ --disable-build-format-warnings
STAGEprofile_CFLAGS = $(STAGE2_CFLAGS) -fprofile-generate
STAGEprofile_TFLAGS = $(STAGE2_TFLAGS)
@@ -534,6 +537,7 @@ LD_FOR_TARGET=@LD_FOR_TARGET@
LIPO_FOR_TARGET=@LIPO_FOR_TARGET@
NM_FOR_TARGET=@NM_FOR_TARGET@
OBJDUMP_FOR_TARGET=@OBJDUMP_FOR_TARGET@
+OBJCOPY_FOR_TARGET=@OBJCOPY_FOR_TARGET@
RANLIB_FOR_TARGET=@RANLIB_FOR_TARGET@
READELF_FOR_TARGET=@READELF_FOR_TARGET@
STRIP_FOR_TARGET=@STRIP_FOR_TARGET@
@@ -575,24 +579,32 @@ all:
# This is the list of directories that may be needed in RPATH_ENVVAR
# so that programs built for the target machine work.
-TARGET_LIB_PATH = $(TARGET_LIB_PATH_libstdc++-v3)$(TARGET_LIB_PATH_libmudflap)$(TARGET_LIB_PATH_libsanitizer)$(TARGET_LIB_PATH_libvtv)$(TARGET_LIB_PATH_libssp)$(TARGET_LIB_PATH_libgomp)$(TARGET_LIB_PATH_libitm)$(TARGET_LIB_PATH_libatomic)$(HOST_LIB_PATH_gcc)
+TARGET_LIB_PATH = $(TARGET_LIB_PATH_libstdc++-v3)$(TARGET_LIB_PATH_libsanitizer)$(TARGET_LIB_PATH_libmpx)$(TARGET_LIB_PATH_libvtv)$(TARGET_LIB_PATH_libcilkrts)$(TARGET_LIB_PATH_liboffloadmic)$(TARGET_LIB_PATH_libssp)$(TARGET_LIB_PATH_libgomp)$(TARGET_LIB_PATH_libitm)$(TARGET_LIB_PATH_libatomic)$(HOST_LIB_PATH_gcc)
@if target-libstdc++-v3
TARGET_LIB_PATH_libstdc++-v3 = $$r/$(TARGET_SUBDIR)/libstdc++-v3/src/.libs:
@endif target-libstdc++-v3
-@if target-libmudflap
-TARGET_LIB_PATH_libmudflap = $$r/$(TARGET_SUBDIR)/libmudflap/.libs:
-@endif target-libmudflap
-
@if target-libsanitizer
TARGET_LIB_PATH_libsanitizer = $$r/$(TARGET_SUBDIR)/libsanitizer/.libs:
@endif target-libsanitizer
+@if target-libmpx
+TARGET_LIB_PATH_libmpx = $$r/$(TARGET_SUBDIR)/libmpx/.libs:
+@endif target-libmpx
+
@if target-libvtv
TARGET_LIB_PATH_libvtv = $$r/$(TARGET_SUBDIR)/libvtv/.libs:
@endif target-libvtv
+@if target-libcilkrts
+TARGET_LIB_PATH_libcilkrts = $$r/$(TARGET_SUBDIR)/libcilkrts/.libs:
+@endif target-libcilkrts
+
+@if target-liboffloadmic
+TARGET_LIB_PATH_liboffloadmic = $$r/$(TARGET_SUBDIR)/liboffloadmic/.libs:
+@endif target-liboffloadmic
+
@if target-libssp
TARGET_LIB_PATH_libssp = $$r/$(TARGET_SUBDIR)/libssp/.libs:
@endif target-libssp
@@ -613,7 +625,7 @@ TARGET_LIB_PATH_libatomic = $$r/$(TARGET_SUBDIR)/libatomic/.libs:
# This is the list of directories that may be needed in RPATH_ENVVAR
# so that programs built for the host machine work.
-HOST_LIB_PATH = $(HOST_LIB_PATH_gmp)$(HOST_LIB_PATH_mpfr)$(HOST_LIB_PATH_mpc)$(HOST_LIB_PATH_isl)$(HOST_LIB_PATH_cloog)$(HOST_LIB_PATH_libelf)
+HOST_LIB_PATH = $(HOST_LIB_PATH_gmp)$(HOST_LIB_PATH_mpfr)$(HOST_LIB_PATH_mpc)$(HOST_LIB_PATH_isl)$(HOST_LIB_PATH_libelf)
# Define HOST_LIB_PATH_gcc here, for the sake of TARGET_LIB_PATH, ouch
@if gcc
@@ -641,11 +653,6 @@ HOST_LIB_PATH_isl = \
$$r/$(HOST_SUBDIR)/isl/.libs:$$r/$(HOST_SUBDIR)/prev-isl/.libs:
@endif isl
-@if cloog
-HOST_LIB_PATH_cloog = \
- $$r/$(HOST_SUBDIR)/cloog/.libs:$$r/$(HOST_SUBDIR)/prev-cloog/.libs:
-@endif cloog
-
@if libelf
HOST_LIB_PATH_libelf = \
$$r/$(HOST_SUBDIR)/libelf/.libs:$$r/$(HOST_SUBDIR)/prev-libelf/.libs:
@@ -672,7 +679,9 @@ CXX_FOR_TARGET_FLAG_TO_PASS = \
$(shell if echo "$(CXX_FOR_TARGET)" | grep " -funconfigured-" > /dev/null; then :; else echo '"CXX_FOR_TARGET=$(CXX_FOR_TARGET)"'; fi)
@endif target-libstdc++-v3
-# Flags to pass down to all sub-makes.
+# Flags to pass down to all sub-makes. STAGE*FLAGS,
+# MAKEINFO and MAKEINFOFLAGS are explicitly passed here to make them
+# overrideable (for a bootstrap build stage1 also builds gcc.info).
BASE_FLAGS_TO_PASS = \
"DESTDIR=$(DESTDIR)" \
"RPATH_ENVVAR=$(RPATH_ENVVAR)" \
@@ -753,6 +762,7 @@ BASE_FLAGS_TO_PASS = \
"LIBCXXFLAGS_FOR_TARGET=$(LIBCXXFLAGS_FOR_TARGET)" \
"NM_FOR_TARGET=$(NM_FOR_TARGET)" \
"OBJDUMP_FOR_TARGET=$(OBJDUMP_FOR_TARGET)" \
+ "OBJCOPY_FOR_TARGET=$(OBJCOPY_FOR_TARGET)" \
"RANLIB_FOR_TARGET=$(RANLIB_FOR_TARGET)" \
"READELF_FOR_TARGET=$(READELF_FOR_TARGET)" \
"STRIP_FOR_TARGET=$(STRIP_FOR_TARGET)" \
@@ -782,7 +792,8 @@ BASE_FLAGS_TO_PASS = \
$(CXX_FOR_TARGET_FLAG_TO_PASS) \
"TFLAGS=$(TFLAGS)" \
"CONFIG_SHELL=$(SHELL)" \
- "MAKEINFO=$(MAKEINFO) $(MAKEINFOFLAGS)"
+ "MAKEINFO=$(MAKEINFO) $(MAKEINFOFLAGS)" \
+ $(if $(LSAN_OPTIONS),"LSAN_OPTIONS=$(LSAN_OPTIONS)")
# We leave this in just in case, but it is not needed anymore.
RECURSE_FLAGS_TO_PASS = $(BASE_FLAGS_TO_PASS)
@@ -824,8 +835,17 @@ POSTSTAGE1_FLAGS_TO_PASS = \
GNATBIND="$${GNATBIND}" \
LDFLAGS="$${LDFLAGS}" \
HOST_LIBS="$${HOST_LIBS}" \
+ $(LTO_FLAGS_TO_PASS) \
"`echo 'ADAFLAGS=$(BOOT_ADAFLAGS)' | sed -e s'/[^=][^=]*=$$/XFOO=/'`"
+@if gcc-bootstrap
+EXTRA_HOST_EXPORTS = if [ $(current_stage) != stage1 ]; then \
+ $(POSTSTAGE1_HOST_EXPORTS) \
+ fi;
+
+EXTRA_BOOTSTRAP_FLAGS = CC="$$CC" CXX="$$CXX" LDFLAGS="$$LDFLAGS"
+@endif gcc-bootstrap
+
# Flags to pass down to makes which are built with the target environment.
# The double $ decreases the length of the command line; those variables
# are set in BASE_FLAGS_TO_PASS, and the sub-make will expand them. The
@@ -836,7 +856,9 @@ EXTRA_TARGET_FLAGS = \
'AS=$(COMPILER_AS_FOR_TARGET)' \
'CC=$$(CC_FOR_TARGET) $$(XGCC_FLAGS_FOR_TARGET) $$(TFLAGS)' \
'CFLAGS=$$(CFLAGS_FOR_TARGET)' \
- 'CXX=$$(CXX_FOR_TARGET) $$(XGCC_FLAGS_FOR_TARGET) $$(TFLAGS)' \
+ 'CXX=$$(CXX_FOR_TARGET) -B$$r/$$(TARGET_SUBDIR)/libstdc++-v3/src/.libs \
+ -B$$r/$$(TARGET_SUBDIR)/libstdc++-v3/libsupc++/.libs \
+ $$(XGCC_FLAGS_FOR_TARGET) $$(TFLAGS)' \
'CXXFLAGS=$$(CXXFLAGS_FOR_TARGET)' \
'DLLTOOL=$$(DLLTOOL_FOR_TARGET)' \
'GCJ=$$(GCJ_FOR_TARGET) $$(XGCC_FLAGS_FOR_TARGET) $$(TFLAGS)' \
@@ -849,11 +871,14 @@ EXTRA_TARGET_FLAGS = \
'LIBCXXFLAGS=$$(LIBCXXFLAGS_FOR_TARGET)' \
'NM=$(COMPILER_NM_FOR_TARGET)' \
'OBJDUMP=$$(OBJDUMP_FOR_TARGET)' \
+ 'OBJCOPY=$$(OBJCOPY_FOR_TARGET)' \
'RANLIB=$$(RANLIB_FOR_TARGET)' \
'READELF=$$(READELF_FOR_TARGET)' \
'WINDRES=$$(WINDRES_FOR_TARGET)' \
'WINDMC=$$(WINDMC_FOR_TARGET)' \
'XGCC_FLAGS_FOR_TARGET=$(XGCC_FLAGS_FOR_TARGET)' \
+ 'STAGE1_LDFLAGS=$$(POSTSTAGE1_LDFLAGS)' \
+ 'STAGE1_LIBS=$$(POSTSTAGE1_LIBS)' \
"TFLAGS=$$TFLAGS"
TARGET_FLAGS_TO_PASS = $(BASE_FLAGS_TO_PASS) $(EXTRA_TARGET_FLAGS)
@@ -896,7 +921,6 @@ configure-host: \
maybe-configure-mpfr \
maybe-configure-mpc \
maybe-configure-isl \
- maybe-configure-cloog \
maybe-configure-libelf \
maybe-configure-gold \
maybe-configure-gprof \
@@ -909,6 +933,7 @@ configure-host: \
maybe-configure-libdecnumber \
maybe-configure-libgui \
maybe-configure-libiberty \
+ maybe-configure-libiberty-linker-plugin \
maybe-configure-libiconv \
maybe-configure-m4 \
maybe-configure-readline \
@@ -923,13 +948,17 @@ configure-host: \
maybe-configure-libtermcap \
maybe-configure-utils \
maybe-configure-gnattools \
- maybe-configure-lto-plugin
+ maybe-configure-lto-plugin \
+ maybe-configure-libcc1 \
+ maybe-configure-gotools
.PHONY: configure-target
configure-target: \
maybe-configure-target-libstdc++-v3 \
- maybe-configure-target-libmudflap \
maybe-configure-target-libsanitizer \
+ maybe-configure-target-libmpx \
maybe-configure-target-libvtv \
+ maybe-configure-target-libcilkrts \
+ maybe-configure-target-liboffloadmic \
maybe-configure-target-libssp \
maybe-configure-target-newlib \
maybe-configure-target-libgcc \
@@ -984,6 +1013,7 @@ all-build: maybe-all-build-flex
all-build: maybe-all-build-m4
all-build: maybe-all-build-texinfo
all-build: maybe-all-build-fixincludes
+all-build: maybe-all-build-libcpp
.PHONY: all-host
@@ -1001,7 +1031,9 @@ all-host: maybe-all-cgen
all-host: maybe-all-dejagnu
all-host: maybe-all-etc
all-host: maybe-all-fastjar
+@if fixincludes-no-bootstrap
all-host: maybe-all-fixincludes
+@endif fixincludes-no-bootstrap
all-host: maybe-all-flex
@if gas-no-bootstrap
all-host: maybe-all-gas
@@ -1021,9 +1053,6 @@ all-host: maybe-all-mpc
@if isl-no-bootstrap
all-host: maybe-all-isl
@endif isl-no-bootstrap
-@if cloog-no-bootstrap
-all-host: maybe-all-cloog
-@endif cloog-no-bootstrap
@if libelf-no-bootstrap
all-host: maybe-all-libelf
@endif libelf-no-bootstrap
@@ -1052,7 +1081,12 @@ all-host: maybe-all-libgui
@if libiberty-no-bootstrap
all-host: maybe-all-libiberty
@endif libiberty-no-bootstrap
+@if libiberty-linker-plugin-no-bootstrap
+all-host: maybe-all-libiberty-linker-plugin
+@endif libiberty-linker-plugin-no-bootstrap
+@if libiconv-no-bootstrap
all-host: maybe-all-libiconv
+@endif libiconv-no-bootstrap
all-host: maybe-all-m4
all-host: maybe-all-readline
all-host: maybe-all-sid
@@ -1071,19 +1105,25 @@ all-host: maybe-all-gnattools
@if lto-plugin-no-bootstrap
all-host: maybe-all-lto-plugin
@endif lto-plugin-no-bootstrap
+all-host: maybe-all-libcc1
+all-host: maybe-all-gotools
.PHONY: all-target
@if target-libstdc++-v3-no-bootstrap
all-target: maybe-all-target-libstdc++-v3
@endif target-libstdc++-v3-no-bootstrap
-all-target: maybe-all-target-libmudflap
@if target-libsanitizer-no-bootstrap
all-target: maybe-all-target-libsanitizer
@endif target-libsanitizer-no-bootstrap
+@if target-libmpx-no-bootstrap
+all-target: maybe-all-target-libmpx
+@endif target-libmpx-no-bootstrap
@if target-libvtv-no-bootstrap
all-target: maybe-all-target-libvtv
@endif target-libvtv-no-bootstrap
+all-target: maybe-all-target-libcilkrts
+all-target: maybe-all-target-liboffloadmic
all-target: maybe-all-target-libssp
all-target: maybe-all-target-newlib
@if target-libgcc-no-bootstrap
@@ -1141,7 +1181,6 @@ info-host: maybe-info-gmp
info-host: maybe-info-mpfr
info-host: maybe-info-mpc
info-host: maybe-info-isl
-info-host: maybe-info-cloog
info-host: maybe-info-libelf
info-host: maybe-info-gold
info-host: maybe-info-gprof
@@ -1154,6 +1193,7 @@ info-host: maybe-info-libcpp
info-host: maybe-info-libdecnumber
info-host: maybe-info-libgui
info-host: maybe-info-libiberty
+info-host: maybe-info-libiberty-linker-plugin
info-host: maybe-info-libiconv
info-host: maybe-info-m4
info-host: maybe-info-readline
@@ -1169,13 +1209,17 @@ info-host: maybe-info-libtermcap
info-host: maybe-info-utils
info-host: maybe-info-gnattools
info-host: maybe-info-lto-plugin
+info-host: maybe-info-libcc1
+info-host: maybe-info-gotools
.PHONY: info-target
info-target: maybe-info-target-libstdc++-v3
-info-target: maybe-info-target-libmudflap
info-target: maybe-info-target-libsanitizer
+info-target: maybe-info-target-libmpx
info-target: maybe-info-target-libvtv
+info-target: maybe-info-target-libcilkrts
+info-target: maybe-info-target-liboffloadmic
info-target: maybe-info-target-libssp
info-target: maybe-info-target-newlib
info-target: maybe-info-target-libgcc
@@ -1224,7 +1268,6 @@ dvi-host: maybe-dvi-gmp
dvi-host: maybe-dvi-mpfr
dvi-host: maybe-dvi-mpc
dvi-host: maybe-dvi-isl
-dvi-host: maybe-dvi-cloog
dvi-host: maybe-dvi-libelf
dvi-host: maybe-dvi-gold
dvi-host: maybe-dvi-gprof
@@ -1237,6 +1280,7 @@ dvi-host: maybe-dvi-libcpp
dvi-host: maybe-dvi-libdecnumber
dvi-host: maybe-dvi-libgui
dvi-host: maybe-dvi-libiberty
+dvi-host: maybe-dvi-libiberty-linker-plugin
dvi-host: maybe-dvi-libiconv
dvi-host: maybe-dvi-m4
dvi-host: maybe-dvi-readline
@@ -1252,13 +1296,17 @@ dvi-host: maybe-dvi-libtermcap
dvi-host: maybe-dvi-utils
dvi-host: maybe-dvi-gnattools
dvi-host: maybe-dvi-lto-plugin
+dvi-host: maybe-dvi-libcc1
+dvi-host: maybe-dvi-gotools
.PHONY: dvi-target
dvi-target: maybe-dvi-target-libstdc++-v3
-dvi-target: maybe-dvi-target-libmudflap
dvi-target: maybe-dvi-target-libsanitizer
+dvi-target: maybe-dvi-target-libmpx
dvi-target: maybe-dvi-target-libvtv
+dvi-target: maybe-dvi-target-libcilkrts
+dvi-target: maybe-dvi-target-liboffloadmic
dvi-target: maybe-dvi-target-libssp
dvi-target: maybe-dvi-target-newlib
dvi-target: maybe-dvi-target-libgcc
@@ -1307,7 +1355,6 @@ pdf-host: maybe-pdf-gmp
pdf-host: maybe-pdf-mpfr
pdf-host: maybe-pdf-mpc
pdf-host: maybe-pdf-isl
-pdf-host: maybe-pdf-cloog
pdf-host: maybe-pdf-libelf
pdf-host: maybe-pdf-gold
pdf-host: maybe-pdf-gprof
@@ -1320,6 +1367,7 @@ pdf-host: maybe-pdf-libcpp
pdf-host: maybe-pdf-libdecnumber
pdf-host: maybe-pdf-libgui
pdf-host: maybe-pdf-libiberty
+pdf-host: maybe-pdf-libiberty-linker-plugin
pdf-host: maybe-pdf-libiconv
pdf-host: maybe-pdf-m4
pdf-host: maybe-pdf-readline
@@ -1335,13 +1383,17 @@ pdf-host: maybe-pdf-libtermcap
pdf-host: maybe-pdf-utils
pdf-host: maybe-pdf-gnattools
pdf-host: maybe-pdf-lto-plugin
+pdf-host: maybe-pdf-libcc1
+pdf-host: maybe-pdf-gotools
.PHONY: pdf-target
pdf-target: maybe-pdf-target-libstdc++-v3
-pdf-target: maybe-pdf-target-libmudflap
pdf-target: maybe-pdf-target-libsanitizer
+pdf-target: maybe-pdf-target-libmpx
pdf-target: maybe-pdf-target-libvtv
+pdf-target: maybe-pdf-target-libcilkrts
+pdf-target: maybe-pdf-target-liboffloadmic
pdf-target: maybe-pdf-target-libssp
pdf-target: maybe-pdf-target-newlib
pdf-target: maybe-pdf-target-libgcc
@@ -1390,7 +1442,6 @@ html-host: maybe-html-gmp
html-host: maybe-html-mpfr
html-host: maybe-html-mpc
html-host: maybe-html-isl
-html-host: maybe-html-cloog
html-host: maybe-html-libelf
html-host: maybe-html-gold
html-host: maybe-html-gprof
@@ -1403,6 +1454,7 @@ html-host: maybe-html-libcpp
html-host: maybe-html-libdecnumber
html-host: maybe-html-libgui
html-host: maybe-html-libiberty
+html-host: maybe-html-libiberty-linker-plugin
html-host: maybe-html-libiconv
html-host: maybe-html-m4
html-host: maybe-html-readline
@@ -1418,13 +1470,17 @@ html-host: maybe-html-libtermcap
html-host: maybe-html-utils
html-host: maybe-html-gnattools
html-host: maybe-html-lto-plugin
+html-host: maybe-html-libcc1
+html-host: maybe-html-gotools
.PHONY: html-target
html-target: maybe-html-target-libstdc++-v3
-html-target: maybe-html-target-libmudflap
html-target: maybe-html-target-libsanitizer
+html-target: maybe-html-target-libmpx
html-target: maybe-html-target-libvtv
+html-target: maybe-html-target-libcilkrts
+html-target: maybe-html-target-liboffloadmic
html-target: maybe-html-target-libssp
html-target: maybe-html-target-newlib
html-target: maybe-html-target-libgcc
@@ -1473,7 +1529,6 @@ TAGS-host: maybe-TAGS-gmp
TAGS-host: maybe-TAGS-mpfr
TAGS-host: maybe-TAGS-mpc
TAGS-host: maybe-TAGS-isl
-TAGS-host: maybe-TAGS-cloog
TAGS-host: maybe-TAGS-libelf
TAGS-host: maybe-TAGS-gold
TAGS-host: maybe-TAGS-gprof
@@ -1486,6 +1541,7 @@ TAGS-host: maybe-TAGS-libcpp
TAGS-host: maybe-TAGS-libdecnumber
TAGS-host: maybe-TAGS-libgui
TAGS-host: maybe-TAGS-libiberty
+TAGS-host: maybe-TAGS-libiberty-linker-plugin
TAGS-host: maybe-TAGS-libiconv
TAGS-host: maybe-TAGS-m4
TAGS-host: maybe-TAGS-readline
@@ -1501,13 +1557,17 @@ TAGS-host: maybe-TAGS-libtermcap
TAGS-host: maybe-TAGS-utils
TAGS-host: maybe-TAGS-gnattools
TAGS-host: maybe-TAGS-lto-plugin
+TAGS-host: maybe-TAGS-libcc1
+TAGS-host: maybe-TAGS-gotools
.PHONY: TAGS-target
TAGS-target: maybe-TAGS-target-libstdc++-v3
-TAGS-target: maybe-TAGS-target-libmudflap
TAGS-target: maybe-TAGS-target-libsanitizer
+TAGS-target: maybe-TAGS-target-libmpx
TAGS-target: maybe-TAGS-target-libvtv
+TAGS-target: maybe-TAGS-target-libcilkrts
+TAGS-target: maybe-TAGS-target-liboffloadmic
TAGS-target: maybe-TAGS-target-libssp
TAGS-target: maybe-TAGS-target-newlib
TAGS-target: maybe-TAGS-target-libgcc
@@ -1556,7 +1616,6 @@ install-info-host: maybe-install-info-gmp
install-info-host: maybe-install-info-mpfr
install-info-host: maybe-install-info-mpc
install-info-host: maybe-install-info-isl
-install-info-host: maybe-install-info-cloog
install-info-host: maybe-install-info-libelf
install-info-host: maybe-install-info-gold
install-info-host: maybe-install-info-gprof
@@ -1569,6 +1628,7 @@ install-info-host: maybe-install-info-libcpp
install-info-host: maybe-install-info-libdecnumber
install-info-host: maybe-install-info-libgui
install-info-host: maybe-install-info-libiberty
+install-info-host: maybe-install-info-libiberty-linker-plugin
install-info-host: maybe-install-info-libiconv
install-info-host: maybe-install-info-m4
install-info-host: maybe-install-info-readline
@@ -1584,13 +1644,17 @@ install-info-host: maybe-install-info-libtermcap
install-info-host: maybe-install-info-utils
install-info-host: maybe-install-info-gnattools
install-info-host: maybe-install-info-lto-plugin
+install-info-host: maybe-install-info-libcc1
+install-info-host: maybe-install-info-gotools
.PHONY: install-info-target
install-info-target: maybe-install-info-target-libstdc++-v3
-install-info-target: maybe-install-info-target-libmudflap
install-info-target: maybe-install-info-target-libsanitizer
+install-info-target: maybe-install-info-target-libmpx
install-info-target: maybe-install-info-target-libvtv
+install-info-target: maybe-install-info-target-libcilkrts
+install-info-target: maybe-install-info-target-liboffloadmic
install-info-target: maybe-install-info-target-libssp
install-info-target: maybe-install-info-target-newlib
install-info-target: maybe-install-info-target-libgcc
@@ -1639,7 +1703,6 @@ install-pdf-host: maybe-install-pdf-gmp
install-pdf-host: maybe-install-pdf-mpfr
install-pdf-host: maybe-install-pdf-mpc
install-pdf-host: maybe-install-pdf-isl
-install-pdf-host: maybe-install-pdf-cloog
install-pdf-host: maybe-install-pdf-libelf
install-pdf-host: maybe-install-pdf-gold
install-pdf-host: maybe-install-pdf-gprof
@@ -1652,6 +1715,7 @@ install-pdf-host: maybe-install-pdf-libcpp
install-pdf-host: maybe-install-pdf-libdecnumber
install-pdf-host: maybe-install-pdf-libgui
install-pdf-host: maybe-install-pdf-libiberty
+install-pdf-host: maybe-install-pdf-libiberty-linker-plugin
install-pdf-host: maybe-install-pdf-libiconv
install-pdf-host: maybe-install-pdf-m4
install-pdf-host: maybe-install-pdf-readline
@@ -1667,13 +1731,17 @@ install-pdf-host: maybe-install-pdf-libtermcap
install-pdf-host: maybe-install-pdf-utils
install-pdf-host: maybe-install-pdf-gnattools
install-pdf-host: maybe-install-pdf-lto-plugin
+install-pdf-host: maybe-install-pdf-libcc1
+install-pdf-host: maybe-install-pdf-gotools
.PHONY: install-pdf-target
install-pdf-target: maybe-install-pdf-target-libstdc++-v3
-install-pdf-target: maybe-install-pdf-target-libmudflap
install-pdf-target: maybe-install-pdf-target-libsanitizer
+install-pdf-target: maybe-install-pdf-target-libmpx
install-pdf-target: maybe-install-pdf-target-libvtv
+install-pdf-target: maybe-install-pdf-target-libcilkrts
+install-pdf-target: maybe-install-pdf-target-liboffloadmic
install-pdf-target: maybe-install-pdf-target-libssp
install-pdf-target: maybe-install-pdf-target-newlib
install-pdf-target: maybe-install-pdf-target-libgcc
@@ -1722,7 +1790,6 @@ install-html-host: maybe-install-html-gmp
install-html-host: maybe-install-html-mpfr
install-html-host: maybe-install-html-mpc
install-html-host: maybe-install-html-isl
-install-html-host: maybe-install-html-cloog
install-html-host: maybe-install-html-libelf
install-html-host: maybe-install-html-gold
install-html-host: maybe-install-html-gprof
@@ -1735,6 +1802,7 @@ install-html-host: maybe-install-html-libcpp
install-html-host: maybe-install-html-libdecnumber
install-html-host: maybe-install-html-libgui
install-html-host: maybe-install-html-libiberty
+install-html-host: maybe-install-html-libiberty-linker-plugin
install-html-host: maybe-install-html-libiconv
install-html-host: maybe-install-html-m4
install-html-host: maybe-install-html-readline
@@ -1750,13 +1818,17 @@ install-html-host: maybe-install-html-libtermcap
install-html-host: maybe-install-html-utils
install-html-host: maybe-install-html-gnattools
install-html-host: maybe-install-html-lto-plugin
+install-html-host: maybe-install-html-libcc1
+install-html-host: maybe-install-html-gotools
.PHONY: install-html-target
install-html-target: maybe-install-html-target-libstdc++-v3
-install-html-target: maybe-install-html-target-libmudflap
install-html-target: maybe-install-html-target-libsanitizer
+install-html-target: maybe-install-html-target-libmpx
install-html-target: maybe-install-html-target-libvtv
+install-html-target: maybe-install-html-target-libcilkrts
+install-html-target: maybe-install-html-target-liboffloadmic
install-html-target: maybe-install-html-target-libssp
install-html-target: maybe-install-html-target-newlib
install-html-target: maybe-install-html-target-libgcc
@@ -1805,7 +1877,6 @@ installcheck-host: maybe-installcheck-gmp
installcheck-host: maybe-installcheck-mpfr
installcheck-host: maybe-installcheck-mpc
installcheck-host: maybe-installcheck-isl
-installcheck-host: maybe-installcheck-cloog
installcheck-host: maybe-installcheck-libelf
installcheck-host: maybe-installcheck-gold
installcheck-host: maybe-installcheck-gprof
@@ -1818,6 +1889,7 @@ installcheck-host: maybe-installcheck-libcpp
installcheck-host: maybe-installcheck-libdecnumber
installcheck-host: maybe-installcheck-libgui
installcheck-host: maybe-installcheck-libiberty
+installcheck-host: maybe-installcheck-libiberty-linker-plugin
installcheck-host: maybe-installcheck-libiconv
installcheck-host: maybe-installcheck-m4
installcheck-host: maybe-installcheck-readline
@@ -1833,13 +1905,17 @@ installcheck-host: maybe-installcheck-libtermcap
installcheck-host: maybe-installcheck-utils
installcheck-host: maybe-installcheck-gnattools
installcheck-host: maybe-installcheck-lto-plugin
+installcheck-host: maybe-installcheck-libcc1
+installcheck-host: maybe-installcheck-gotools
.PHONY: installcheck-target
installcheck-target: maybe-installcheck-target-libstdc++-v3
-installcheck-target: maybe-installcheck-target-libmudflap
installcheck-target: maybe-installcheck-target-libsanitizer
+installcheck-target: maybe-installcheck-target-libmpx
installcheck-target: maybe-installcheck-target-libvtv
+installcheck-target: maybe-installcheck-target-libcilkrts
+installcheck-target: maybe-installcheck-target-liboffloadmic
installcheck-target: maybe-installcheck-target-libssp
installcheck-target: maybe-installcheck-target-newlib
installcheck-target: maybe-installcheck-target-libgcc
@@ -1888,7 +1964,6 @@ mostlyclean-host: maybe-mostlyclean-gmp
mostlyclean-host: maybe-mostlyclean-mpfr
mostlyclean-host: maybe-mostlyclean-mpc
mostlyclean-host: maybe-mostlyclean-isl
-mostlyclean-host: maybe-mostlyclean-cloog
mostlyclean-host: maybe-mostlyclean-libelf
mostlyclean-host: maybe-mostlyclean-gold
mostlyclean-host: maybe-mostlyclean-gprof
@@ -1901,6 +1976,7 @@ mostlyclean-host: maybe-mostlyclean-libcpp
mostlyclean-host: maybe-mostlyclean-libdecnumber
mostlyclean-host: maybe-mostlyclean-libgui
mostlyclean-host: maybe-mostlyclean-libiberty
+mostlyclean-host: maybe-mostlyclean-libiberty-linker-plugin
mostlyclean-host: maybe-mostlyclean-libiconv
mostlyclean-host: maybe-mostlyclean-m4
mostlyclean-host: maybe-mostlyclean-readline
@@ -1916,13 +1992,17 @@ mostlyclean-host: maybe-mostlyclean-libtermcap
mostlyclean-host: maybe-mostlyclean-utils
mostlyclean-host: maybe-mostlyclean-gnattools
mostlyclean-host: maybe-mostlyclean-lto-plugin
+mostlyclean-host: maybe-mostlyclean-libcc1
+mostlyclean-host: maybe-mostlyclean-gotools
.PHONY: mostlyclean-target
mostlyclean-target: maybe-mostlyclean-target-libstdc++-v3
-mostlyclean-target: maybe-mostlyclean-target-libmudflap
mostlyclean-target: maybe-mostlyclean-target-libsanitizer
+mostlyclean-target: maybe-mostlyclean-target-libmpx
mostlyclean-target: maybe-mostlyclean-target-libvtv
+mostlyclean-target: maybe-mostlyclean-target-libcilkrts
+mostlyclean-target: maybe-mostlyclean-target-liboffloadmic
mostlyclean-target: maybe-mostlyclean-target-libssp
mostlyclean-target: maybe-mostlyclean-target-newlib
mostlyclean-target: maybe-mostlyclean-target-libgcc
@@ -1971,7 +2051,6 @@ clean-host: maybe-clean-gmp
clean-host: maybe-clean-mpfr
clean-host: maybe-clean-mpc
clean-host: maybe-clean-isl
-clean-host: maybe-clean-cloog
clean-host: maybe-clean-libelf
clean-host: maybe-clean-gold
clean-host: maybe-clean-gprof
@@ -1984,6 +2063,7 @@ clean-host: maybe-clean-libcpp
clean-host: maybe-clean-libdecnumber
clean-host: maybe-clean-libgui
clean-host: maybe-clean-libiberty
+clean-host: maybe-clean-libiberty-linker-plugin
clean-host: maybe-clean-libiconv
clean-host: maybe-clean-m4
clean-host: maybe-clean-readline
@@ -1999,13 +2079,17 @@ clean-host: maybe-clean-libtermcap
clean-host: maybe-clean-utils
clean-host: maybe-clean-gnattools
clean-host: maybe-clean-lto-plugin
+clean-host: maybe-clean-libcc1
+clean-host: maybe-clean-gotools
.PHONY: clean-target
clean-target: maybe-clean-target-libstdc++-v3
-clean-target: maybe-clean-target-libmudflap
clean-target: maybe-clean-target-libsanitizer
+clean-target: maybe-clean-target-libmpx
clean-target: maybe-clean-target-libvtv
+clean-target: maybe-clean-target-libcilkrts
+clean-target: maybe-clean-target-liboffloadmic
clean-target: maybe-clean-target-libssp
clean-target: maybe-clean-target-newlib
clean-target: maybe-clean-target-libgcc
@@ -2054,7 +2138,6 @@ distclean-host: maybe-distclean-gmp
distclean-host: maybe-distclean-mpfr
distclean-host: maybe-distclean-mpc
distclean-host: maybe-distclean-isl
-distclean-host: maybe-distclean-cloog
distclean-host: maybe-distclean-libelf
distclean-host: maybe-distclean-gold
distclean-host: maybe-distclean-gprof
@@ -2067,6 +2150,7 @@ distclean-host: maybe-distclean-libcpp
distclean-host: maybe-distclean-libdecnumber
distclean-host: maybe-distclean-libgui
distclean-host: maybe-distclean-libiberty
+distclean-host: maybe-distclean-libiberty-linker-plugin
distclean-host: maybe-distclean-libiconv
distclean-host: maybe-distclean-m4
distclean-host: maybe-distclean-readline
@@ -2082,13 +2166,17 @@ distclean-host: maybe-distclean-libtermcap
distclean-host: maybe-distclean-utils
distclean-host: maybe-distclean-gnattools
distclean-host: maybe-distclean-lto-plugin
+distclean-host: maybe-distclean-libcc1
+distclean-host: maybe-distclean-gotools
.PHONY: distclean-target
distclean-target: maybe-distclean-target-libstdc++-v3
-distclean-target: maybe-distclean-target-libmudflap
distclean-target: maybe-distclean-target-libsanitizer
+distclean-target: maybe-distclean-target-libmpx
distclean-target: maybe-distclean-target-libvtv
+distclean-target: maybe-distclean-target-libcilkrts
+distclean-target: maybe-distclean-target-liboffloadmic
distclean-target: maybe-distclean-target-libssp
distclean-target: maybe-distclean-target-newlib
distclean-target: maybe-distclean-target-libgcc
@@ -2137,7 +2225,6 @@ maintainer-clean-host: maybe-maintainer-clean-gmp
maintainer-clean-host: maybe-maintainer-clean-mpfr
maintainer-clean-host: maybe-maintainer-clean-mpc
maintainer-clean-host: maybe-maintainer-clean-isl
-maintainer-clean-host: maybe-maintainer-clean-cloog
maintainer-clean-host: maybe-maintainer-clean-libelf
maintainer-clean-host: maybe-maintainer-clean-gold
maintainer-clean-host: maybe-maintainer-clean-gprof
@@ -2150,6 +2237,7 @@ maintainer-clean-host: maybe-maintainer-clean-libcpp
maintainer-clean-host: maybe-maintainer-clean-libdecnumber
maintainer-clean-host: maybe-maintainer-clean-libgui
maintainer-clean-host: maybe-maintainer-clean-libiberty
+maintainer-clean-host: maybe-maintainer-clean-libiberty-linker-plugin
maintainer-clean-host: maybe-maintainer-clean-libiconv
maintainer-clean-host: maybe-maintainer-clean-m4
maintainer-clean-host: maybe-maintainer-clean-readline
@@ -2165,13 +2253,17 @@ maintainer-clean-host: maybe-maintainer-clean-libtermcap
maintainer-clean-host: maybe-maintainer-clean-utils
maintainer-clean-host: maybe-maintainer-clean-gnattools
maintainer-clean-host: maybe-maintainer-clean-lto-plugin
+maintainer-clean-host: maybe-maintainer-clean-libcc1
+maintainer-clean-host: maybe-maintainer-clean-gotools
.PHONY: maintainer-clean-target
maintainer-clean-target: maybe-maintainer-clean-target-libstdc++-v3
-maintainer-clean-target: maybe-maintainer-clean-target-libmudflap
maintainer-clean-target: maybe-maintainer-clean-target-libsanitizer
+maintainer-clean-target: maybe-maintainer-clean-target-libmpx
maintainer-clean-target: maybe-maintainer-clean-target-libvtv
+maintainer-clean-target: maybe-maintainer-clean-target-libcilkrts
+maintainer-clean-target: maybe-maintainer-clean-target-liboffloadmic
maintainer-clean-target: maybe-maintainer-clean-target-libssp
maintainer-clean-target: maybe-maintainer-clean-target-newlib
maintainer-clean-target: maybe-maintainer-clean-target-libgcc
@@ -2212,9 +2304,9 @@ do-info: maybe-all-texinfo
install-info: do-install-info dir.info
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- if [ -f dir.info ] ; then \
- $(INSTALL_DATA) dir.info $(DESTDIR)$(infodir)/dir.info ; \
- else true ; fi
+ if [ -f dir.info ]; then \
+ $(INSTALL_DATA) dir.info $(DESTDIR)$(infodir)/dir.info; \
+ else true; fi
install-pdf: do-install-pdf
@@ -2275,7 +2367,6 @@ check-host: \
maybe-check-mpfr \
maybe-check-mpc \
maybe-check-isl \
- maybe-check-cloog \
maybe-check-libelf \
maybe-check-gold \
maybe-check-gprof \
@@ -2288,6 +2379,7 @@ check-host: \
maybe-check-libdecnumber \
maybe-check-libgui \
maybe-check-libiberty \
+ maybe-check-libiberty-linker-plugin \
maybe-check-libiconv \
maybe-check-m4 \
maybe-check-readline \
@@ -2302,14 +2394,18 @@ check-host: \
maybe-check-libtermcap \
maybe-check-utils \
maybe-check-gnattools \
- maybe-check-lto-plugin
+ maybe-check-lto-plugin \
+ maybe-check-libcc1 \
+ maybe-check-gotools
.PHONY: check-target
check-target: \
maybe-check-target-libstdc++-v3 \
- maybe-check-target-libmudflap \
maybe-check-target-libsanitizer \
+ maybe-check-target-libmpx \
maybe-check-target-libvtv \
+ maybe-check-target-libcilkrts \
+ maybe-check-target-liboffloadmic \
maybe-check-target-libssp \
maybe-check-target-newlib \
maybe-check-target-libgcc \
@@ -2358,6 +2454,27 @@ mail-report-with-warnings.log: warning.log
chmod +x $@
echo If you really want to send e-mail, run ./$@ now
+# Local Vim config
+
+$(srcdir)/.local.vimrc:
+ $(LN_S) contrib/vimrc $@
+
+$(srcdir)/.lvimrc:
+ $(LN_S) contrib/vimrc $@
+
+vimrc: $(srcdir)/.local.vimrc $(srcdir)/.lvimrc
+
+.PHONY: vimrc
+
+# clang-format config
+
+$(srcdir)/.clang-format:
+ $(LN_S) contrib/clang-format $@
+
+clang-format: $(srcdir)/.clang-format
+
+.PHONY: clang-format
+
# Installation targets.
.PHONY: install uninstall
@@ -2384,7 +2501,6 @@ install-host-nogcc: \
maybe-install-mpfr \
maybe-install-mpc \
maybe-install-isl \
- maybe-install-cloog \
maybe-install-libelf \
maybe-install-gold \
maybe-install-gprof \
@@ -2397,6 +2513,7 @@ install-host-nogcc: \
maybe-install-libdecnumber \
maybe-install-libgui \
maybe-install-libiberty \
+ maybe-install-libiberty-linker-plugin \
maybe-install-libiconv \
maybe-install-m4 \
maybe-install-readline \
@@ -2411,7 +2528,9 @@ install-host-nogcc: \
maybe-install-libtermcap \
maybe-install-utils \
maybe-install-gnattools \
- maybe-install-lto-plugin
+ maybe-install-lto-plugin \
+ maybe-install-libcc1 \
+ maybe-install-gotools
.PHONY: install-host
install-host: \
@@ -2431,7 +2550,6 @@ install-host: \
maybe-install-mpfr \
maybe-install-mpc \
maybe-install-isl \
- maybe-install-cloog \
maybe-install-libelf \
maybe-install-gold \
maybe-install-gprof \
@@ -2444,6 +2562,7 @@ install-host: \
maybe-install-libdecnumber \
maybe-install-libgui \
maybe-install-libiberty \
+ maybe-install-libiberty-linker-plugin \
maybe-install-libiconv \
maybe-install-m4 \
maybe-install-readline \
@@ -2458,14 +2577,18 @@ install-host: \
maybe-install-libtermcap \
maybe-install-utils \
maybe-install-gnattools \
- maybe-install-lto-plugin
+ maybe-install-lto-plugin \
+ maybe-install-libcc1 \
+ maybe-install-gotools
.PHONY: install-target
install-target: \
maybe-install-target-libstdc++-v3 \
- maybe-install-target-libmudflap \
maybe-install-target-libsanitizer \
+ maybe-install-target-libmpx \
maybe-install-target-libvtv \
+ maybe-install-target-libcilkrts \
+ maybe-install-target-liboffloadmic \
maybe-install-target-libssp \
maybe-install-target-newlib \
maybe-install-target-libgcc \
@@ -2492,14 +2615,14 @@ uninstall:
.PHONY: install.all
install.all: install-no-fixedincludes
- @if [ -f ./gcc/Makefile ] ; then \
- r=`${PWD_COMMAND}` ; export r ; \
+ @if [ -f ./gcc/Makefile ]; then \
+ r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(HOST_EXPORTS) \
(cd ./gcc && \
- $(MAKE) $(FLAGS_TO_PASS) install-headers) ; \
+ $(MAKE) $(FLAGS_TO_PASS) install-headers); \
else \
- true ; \
+ true; \
fi
# install-no-fixedincludes is used to allow the elaboration of binary packages
@@ -2534,7 +2657,6 @@ install-strip-host: \
maybe-install-strip-mpfr \
maybe-install-strip-mpc \
maybe-install-strip-isl \
- maybe-install-strip-cloog \
maybe-install-strip-libelf \
maybe-install-strip-gold \
maybe-install-strip-gprof \
@@ -2547,6 +2669,7 @@ install-strip-host: \
maybe-install-strip-libdecnumber \
maybe-install-strip-libgui \
maybe-install-strip-libiberty \
+ maybe-install-strip-libiberty-linker-plugin \
maybe-install-strip-libiconv \
maybe-install-strip-m4 \
maybe-install-strip-readline \
@@ -2561,14 +2684,18 @@ install-strip-host: \
maybe-install-strip-libtermcap \
maybe-install-strip-utils \
maybe-install-strip-gnattools \
- maybe-install-strip-lto-plugin
+ maybe-install-strip-lto-plugin \
+ maybe-install-strip-libcc1 \
+ maybe-install-strip-gotools
.PHONY: install-strip-target
install-strip-target: \
maybe-install-strip-target-libstdc++-v3 \
- maybe-install-strip-target-libmudflap \
maybe-install-strip-target-libsanitizer \
+ maybe-install-strip-target-libmpx \
maybe-install-strip-target-libvtv \
+ maybe-install-strip-target-libcilkrts \
+ maybe-install-strip-target-liboffloadmic \
maybe-install-strip-target-libssp \
maybe-install-strip-target-newlib \
maybe-install-strip-target-libgcc \
@@ -2601,10 +2728,10 @@ installdirs: mkinstalldirs
$(SHELL) $(srcdir)/mkinstalldirs $(MAKEDIRS)
dir.info: do-install-info
- if [ -f $(srcdir)/texinfo/gen-info-dir ] ; then \
- $(srcdir)/texinfo/gen-info-dir $(DESTDIR)$(infodir) $(srcdir)/texinfo/dir.info-template > dir.info.new ; \
- mv -f dir.info.new dir.info ; \
- else true ; \
+ if [ -f $(srcdir)/texinfo/gen-info-dir ]; then \
+ $(srcdir)/texinfo/gen-info-dir $(DESTDIR)$(infodir) $(srcdir)/texinfo/dir.info-template > dir.info.new; \
+ mv -f dir.info.new dir.info; \
+ else true; \
fi
dist:
@@ -2646,7 +2773,7 @@ configure-build-libiberty:
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
test ! -f $(BUILD_SUBDIR)/libiberty/Makefile || exit 0; \
- $(SHELL) $(srcdir)/mkinstalldirs $(BUILD_SUBDIR)/libiberty ; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(BUILD_SUBDIR)/libiberty; \
$(BUILD_EXPORTS) \
echo Configuring in $(BUILD_SUBDIR)/libiberty; \
cd "$(BUILD_SUBDIR)/libiberty" || exit 1; \
@@ -2655,12 +2782,13 @@ configure-build-libiberty:
*) topdir=`echo $(BUILD_SUBDIR)/libiberty/ | \
sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
esac; \
- srcdiroption="--srcdir=$${topdir}/libiberty"; \
- libsrcdir="$$s/libiberty"; \
+ module_srcdir=libiberty; \
rm -f no-such-file || : ; \
- CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure \
+ CONFIG_SITE=no-such-file $(SHELL) \
+ $$s/$$module_srcdir/configure \
+ --srcdir=$${topdir}/$$module_srcdir \
$(BUILD_CONFIGARGS) --build=${build_alias} --host=${build_alias} \
- --target=${target_alias} $${srcdiroption} \
+ --target=${target_alias} \
|| exit 1
@endif build-libiberty
@@ -2702,7 +2830,7 @@ configure-build-bison:
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
test ! -f $(BUILD_SUBDIR)/bison/Makefile || exit 0; \
- $(SHELL) $(srcdir)/mkinstalldirs $(BUILD_SUBDIR)/bison ; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(BUILD_SUBDIR)/bison; \
$(BUILD_EXPORTS) \
echo Configuring in $(BUILD_SUBDIR)/bison; \
cd "$(BUILD_SUBDIR)/bison" || exit 1; \
@@ -2711,12 +2839,13 @@ configure-build-bison:
*) topdir=`echo $(BUILD_SUBDIR)/bison/ | \
sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
esac; \
- srcdiroption="--srcdir=$${topdir}/bison"; \
- libsrcdir="$$s/bison"; \
+ module_srcdir=bison; \
rm -f no-such-file || : ; \
- CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure \
+ CONFIG_SITE=no-such-file $(SHELL) \
+ $$s/$$module_srcdir/configure \
+ --srcdir=$${topdir}/$$module_srcdir \
$(BUILD_CONFIGARGS) --build=${build_alias} --host=${build_alias} \
- --target=${target_alias} $${srcdiroption} \
+ --target=${target_alias} \
|| exit 1
@endif build-bison
@@ -2758,7 +2887,7 @@ configure-build-flex:
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
test ! -f $(BUILD_SUBDIR)/flex/Makefile || exit 0; \
- $(SHELL) $(srcdir)/mkinstalldirs $(BUILD_SUBDIR)/flex ; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(BUILD_SUBDIR)/flex; \
$(BUILD_EXPORTS) \
echo Configuring in $(BUILD_SUBDIR)/flex; \
cd "$(BUILD_SUBDIR)/flex" || exit 1; \
@@ -2767,12 +2896,13 @@ configure-build-flex:
*) topdir=`echo $(BUILD_SUBDIR)/flex/ | \
sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
esac; \
- srcdiroption="--srcdir=$${topdir}/flex"; \
- libsrcdir="$$s/flex"; \
+ module_srcdir=flex; \
rm -f no-such-file || : ; \
- CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure \
+ CONFIG_SITE=no-such-file $(SHELL) \
+ $$s/$$module_srcdir/configure \
+ --srcdir=$${topdir}/$$module_srcdir \
$(BUILD_CONFIGARGS) --build=${build_alias} --host=${build_alias} \
- --target=${target_alias} $${srcdiroption} \
+ --target=${target_alias} \
|| exit 1
@endif build-flex
@@ -2814,7 +2944,7 @@ configure-build-m4:
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
test ! -f $(BUILD_SUBDIR)/m4/Makefile || exit 0; \
- $(SHELL) $(srcdir)/mkinstalldirs $(BUILD_SUBDIR)/m4 ; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(BUILD_SUBDIR)/m4; \
$(BUILD_EXPORTS) \
echo Configuring in $(BUILD_SUBDIR)/m4; \
cd "$(BUILD_SUBDIR)/m4" || exit 1; \
@@ -2823,12 +2953,13 @@ configure-build-m4:
*) topdir=`echo $(BUILD_SUBDIR)/m4/ | \
sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
esac; \
- srcdiroption="--srcdir=$${topdir}/m4"; \
- libsrcdir="$$s/m4"; \
+ module_srcdir=m4; \
rm -f no-such-file || : ; \
- CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure \
+ CONFIG_SITE=no-such-file $(SHELL) \
+ $$s/$$module_srcdir/configure \
+ --srcdir=$${topdir}/$$module_srcdir \
$(BUILD_CONFIGARGS) --build=${build_alias} --host=${build_alias} \
- --target=${target_alias} $${srcdiroption} \
+ --target=${target_alias} \
|| exit 1
@endif build-m4
@@ -2870,7 +3001,7 @@ configure-build-texinfo:
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
test ! -f $(BUILD_SUBDIR)/texinfo/Makefile || exit 0; \
- $(SHELL) $(srcdir)/mkinstalldirs $(BUILD_SUBDIR)/texinfo ; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(BUILD_SUBDIR)/texinfo; \
$(BUILD_EXPORTS) \
echo Configuring in $(BUILD_SUBDIR)/texinfo; \
cd "$(BUILD_SUBDIR)/texinfo" || exit 1; \
@@ -2879,12 +3010,13 @@ configure-build-texinfo:
*) topdir=`echo $(BUILD_SUBDIR)/texinfo/ | \
sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
esac; \
- srcdiroption="--srcdir=$${topdir}/texinfo"; \
- libsrcdir="$$s/texinfo"; \
+ module_srcdir=texinfo; \
rm -f no-such-file || : ; \
- CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure \
+ CONFIG_SITE=no-such-file $(SHELL) \
+ $$s/$$module_srcdir/configure \
+ --srcdir=$${topdir}/$$module_srcdir \
$(BUILD_CONFIGARGS) --build=${build_alias} --host=${build_alias} \
- --target=${target_alias} $${srcdiroption} \
+ --target=${target_alias} \
|| exit 1
@endif build-texinfo
@@ -2926,7 +3058,7 @@ configure-build-fixincludes:
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
test ! -f $(BUILD_SUBDIR)/fixincludes/Makefile || exit 0; \
- $(SHELL) $(srcdir)/mkinstalldirs $(BUILD_SUBDIR)/fixincludes ; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(BUILD_SUBDIR)/fixincludes; \
$(BUILD_EXPORTS) \
echo Configuring in $(BUILD_SUBDIR)/fixincludes; \
cd "$(BUILD_SUBDIR)/fixincludes" || exit 1; \
@@ -2935,12 +3067,13 @@ configure-build-fixincludes:
*) topdir=`echo $(BUILD_SUBDIR)/fixincludes/ | \
sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
esac; \
- srcdiroption="--srcdir=$${topdir}/fixincludes"; \
- libsrcdir="$$s/fixincludes"; \
+ module_srcdir=fixincludes; \
rm -f no-such-file || : ; \
- CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure \
+ CONFIG_SITE=no-such-file $(SHELL) \
+ $$s/$$module_srcdir/configure \
+ --srcdir=$${topdir}/$$module_srcdir \
$(BUILD_CONFIGARGS) --build=${build_alias} --host=${build_alias} \
- --target=${target_alias} $${srcdiroption} \
+ --target=${target_alias} \
|| exit 1
@endif build-fixincludes
@@ -2970,6 +3103,63 @@ all-build-fixincludes: configure-build-fixincludes
+.PHONY: configure-build-libcpp maybe-configure-build-libcpp
+maybe-configure-build-libcpp:
+@if gcc-bootstrap
+configure-build-libcpp: stage_current
+@endif gcc-bootstrap
+@if build-libcpp
+maybe-configure-build-libcpp: configure-build-libcpp
+configure-build-libcpp:
+ @: $(MAKE); $(unstage)
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ test ! -f $(BUILD_SUBDIR)/libcpp/Makefile || exit 0; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(BUILD_SUBDIR)/libcpp; \
+ $(BUILD_EXPORTS) \
+ echo Configuring in $(BUILD_SUBDIR)/libcpp; \
+ cd "$(BUILD_SUBDIR)/libcpp" || exit 1; \
+ case $(srcdir) in \
+ /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+ *) topdir=`echo $(BUILD_SUBDIR)/libcpp/ | \
+ sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
+ esac; \
+ module_srcdir=libcpp; \
+ rm -f no-such-file || : ; \
+ CONFIG_SITE=no-such-file $(SHELL) \
+ $$s/$$module_srcdir/configure \
+ --srcdir=$${topdir}/$$module_srcdir \
+ $(BUILD_CONFIGARGS) --build=${build_alias} --host=${build_alias} \
+ --target=${target_alias} --disable-nls am_cv_func_iconv=no \
+ || exit 1
+@endif build-libcpp
+
+
+
+
+
+.PHONY: all-build-libcpp maybe-all-build-libcpp
+maybe-all-build-libcpp:
+@if gcc-bootstrap
+all-build-libcpp: stage_current
+@endif gcc-bootstrap
+@if build-libcpp
+TARGET-build-libcpp=all
+maybe-all-build-libcpp: all-build-libcpp
+all-build-libcpp: configure-build-libcpp
+ @: $(MAKE); $(unstage)
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(BUILD_EXPORTS) \
+ (cd $(BUILD_SUBDIR)/libcpp && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_BUILD_FLAGS) \
+ $(TARGET-build-libcpp))
+@endif build-libcpp
+
+
+
+
+
# --------------------------------------
# Modules which run on the host machine
# --------------------------------------
@@ -2986,7 +3176,7 @@ configure-bfd:
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
test ! -f $(HOST_SUBDIR)/bfd/Makefile || exit 0; \
- $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/bfd ; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/bfd; \
$(HOST_EXPORTS) \
echo Configuring in $(HOST_SUBDIR)/bfd; \
cd "$(HOST_SUBDIR)/bfd" || exit 1; \
@@ -2995,11 +3185,12 @@ configure-bfd:
*) topdir=`echo $(HOST_SUBDIR)/bfd/ | \
sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
esac; \
- srcdiroption="--srcdir=$${topdir}/bfd"; \
- libsrcdir="$$s/bfd"; \
- $(SHELL) $${libsrcdir}/configure \
+ module_srcdir=bfd; \
+ $(SHELL) \
+ $$s/$$module_srcdir/configure \
+ --srcdir=$${topdir}/$$module_srcdir \
$(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
- --target=${target_alias} $${srcdiroption} \
+ --target=${target_alias} \
|| exit 1
@endif bfd
@@ -3020,19 +3211,20 @@ configure-stage1-bfd:
CFLAGS="$(STAGE1_CFLAGS)"; export CFLAGS; \
CXXFLAGS="$(STAGE1_CXXFLAGS)"; export CXXFLAGS; \
LIBCFLAGS="$(LIBCFLAGS)"; export LIBCFLAGS; \
- echo Configuring stage 1 in $(HOST_SUBDIR)/bfd ; \
- $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/bfd ; \
+ echo Configuring stage 1 in $(HOST_SUBDIR)/bfd; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/bfd; \
cd $(HOST_SUBDIR)/bfd || exit 1; \
case $(srcdir) in \
/* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
*) topdir=`echo $(HOST_SUBDIR)/bfd/ | \
sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
esac; \
- srcdiroption="--srcdir=$${topdir}/bfd"; \
- libsrcdir="$$s/bfd"; \
- $(SHELL) $${libsrcdir}/configure \
+ module_srcdir=bfd; \
+ $(SHELL) $$s/$$module_srcdir/configure \
+ --srcdir=$${topdir}/$$module_srcdir \
$(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
- --target=${target_alias} $${srcdiroption} \
+ --target=${target_alias} \
+ \
$(STAGE1_CONFIGURE_FLAGS)
@endif bfd-bootstrap
@@ -3052,19 +3244,19 @@ configure-stage2-bfd:
CFLAGS="$(STAGE2_CFLAGS)"; export CFLAGS; \
CXXFLAGS="$(STAGE2_CXXFLAGS)"; export CXXFLAGS; \
LIBCFLAGS="$(STAGE2_CFLAGS)"; export LIBCFLAGS; \
- echo Configuring stage 2 in $(HOST_SUBDIR)/bfd ; \
- $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/bfd ; \
+ echo Configuring stage 2 in $(HOST_SUBDIR)/bfd; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/bfd; \
cd $(HOST_SUBDIR)/bfd || exit 1; \
case $(srcdir) in \
/* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
*) topdir=`echo $(HOST_SUBDIR)/bfd/ | \
sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
esac; \
- srcdiroption="--srcdir=$${topdir}/bfd"; \
- libsrcdir="$$s/bfd"; \
- $(SHELL) $${libsrcdir}/configure \
+ module_srcdir=bfd; \
+ $(SHELL) $$s/$$module_srcdir/configure \
+ --srcdir=$${topdir}/$$module_srcdir \
$(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
- --target=${target_alias} $${srcdiroption} \
+ --target=${target_alias} \
--with-build-libsubdir=$(HOST_SUBDIR) \
$(STAGE2_CONFIGURE_FLAGS)
@endif bfd-bootstrap
@@ -3085,19 +3277,19 @@ configure-stage3-bfd:
CFLAGS="$(STAGE3_CFLAGS)"; export CFLAGS; \
CXXFLAGS="$(STAGE3_CXXFLAGS)"; export CXXFLAGS; \
LIBCFLAGS="$(STAGE3_CFLAGS)"; export LIBCFLAGS; \
- echo Configuring stage 3 in $(HOST_SUBDIR)/bfd ; \
- $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/bfd ; \
+ echo Configuring stage 3 in $(HOST_SUBDIR)/bfd; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/bfd; \
cd $(HOST_SUBDIR)/bfd || exit 1; \
case $(srcdir) in \
/* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
*) topdir=`echo $(HOST_SUBDIR)/bfd/ | \
sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
esac; \
- srcdiroption="--srcdir=$${topdir}/bfd"; \
- libsrcdir="$$s/bfd"; \
- $(SHELL) $${libsrcdir}/configure \
+ module_srcdir=bfd; \
+ $(SHELL) $$s/$$module_srcdir/configure \
+ --srcdir=$${topdir}/$$module_srcdir \
$(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
- --target=${target_alias} $${srcdiroption} \
+ --target=${target_alias} \
--with-build-libsubdir=$(HOST_SUBDIR) \
$(STAGE3_CONFIGURE_FLAGS)
@endif bfd-bootstrap
@@ -3118,19 +3310,19 @@ configure-stage4-bfd:
CFLAGS="$(STAGE4_CFLAGS)"; export CFLAGS; \
CXXFLAGS="$(STAGE4_CXXFLAGS)"; export CXXFLAGS; \
LIBCFLAGS="$(STAGE4_CFLAGS)"; export LIBCFLAGS; \
- echo Configuring stage 4 in $(HOST_SUBDIR)/bfd ; \
- $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/bfd ; \
+ echo Configuring stage 4 in $(HOST_SUBDIR)/bfd; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/bfd; \
cd $(HOST_SUBDIR)/bfd || exit 1; \
case $(srcdir) in \
/* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
*) topdir=`echo $(HOST_SUBDIR)/bfd/ | \
sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
esac; \
- srcdiroption="--srcdir=$${topdir}/bfd"; \
- libsrcdir="$$s/bfd"; \
- $(SHELL) $${libsrcdir}/configure \
+ module_srcdir=bfd; \
+ $(SHELL) $$s/$$module_srcdir/configure \
+ --srcdir=$${topdir}/$$module_srcdir \
$(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
- --target=${target_alias} $${srcdiroption} \
+ --target=${target_alias} \
--with-build-libsubdir=$(HOST_SUBDIR) \
$(STAGE4_CONFIGURE_FLAGS)
@endif bfd-bootstrap
@@ -3151,19 +3343,19 @@ configure-stageprofile-bfd:
CFLAGS="$(STAGEprofile_CFLAGS)"; export CFLAGS; \
CXXFLAGS="$(STAGEprofile_CXXFLAGS)"; export CXXFLAGS; \
LIBCFLAGS="$(STAGEprofile_CFLAGS)"; export LIBCFLAGS; \
- echo Configuring stage profile in $(HOST_SUBDIR)/bfd ; \
- $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/bfd ; \
+ echo Configuring stage profile in $(HOST_SUBDIR)/bfd; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/bfd; \
cd $(HOST_SUBDIR)/bfd || exit 1; \
case $(srcdir) in \
/* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
*) topdir=`echo $(HOST_SUBDIR)/bfd/ | \
sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
esac; \
- srcdiroption="--srcdir=$${topdir}/bfd"; \
- libsrcdir="$$s/bfd"; \
- $(SHELL) $${libsrcdir}/configure \
+ module_srcdir=bfd; \
+ $(SHELL) $$s/$$module_srcdir/configure \
+ --srcdir=$${topdir}/$$module_srcdir \
$(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
- --target=${target_alias} $${srcdiroption} \
+ --target=${target_alias} \
--with-build-libsubdir=$(HOST_SUBDIR) \
$(STAGEprofile_CONFIGURE_FLAGS)
@endif bfd-bootstrap
@@ -3184,19 +3376,19 @@ configure-stagefeedback-bfd:
CFLAGS="$(STAGEfeedback_CFLAGS)"; export CFLAGS; \
CXXFLAGS="$(STAGEfeedback_CXXFLAGS)"; export CXXFLAGS; \
LIBCFLAGS="$(STAGEfeedback_CFLAGS)"; export LIBCFLAGS; \
- echo Configuring stage feedback in $(HOST_SUBDIR)/bfd ; \
- $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/bfd ; \
+ echo Configuring stage feedback in $(HOST_SUBDIR)/bfd; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/bfd; \
cd $(HOST_SUBDIR)/bfd || exit 1; \
case $(srcdir) in \
/* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
*) topdir=`echo $(HOST_SUBDIR)/bfd/ | \
sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
esac; \
- srcdiroption="--srcdir=$${topdir}/bfd"; \
- libsrcdir="$$s/bfd"; \
- $(SHELL) $${libsrcdir}/configure \
+ module_srcdir=bfd; \
+ $(SHELL) $$s/$$module_srcdir/configure \
+ --srcdir=$${topdir}/$$module_srcdir \
$(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
- --target=${target_alias} $${srcdiroption} \
+ --target=${target_alias} \
--with-build-libsubdir=$(HOST_SUBDIR) \
$(STAGEfeedback_CONFIGURE_FLAGS)
@endif bfd-bootstrap
@@ -3483,9 +3675,9 @@ check-bfd:
@: $(MAKE); $(unstage)
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(HOST_EXPORTS) \
+ $(HOST_EXPORTS) $(EXTRA_HOST_EXPORTS) \
(cd $(HOST_SUBDIR)/bfd && \
- $(MAKE) $(FLAGS_TO_PASS) check)
+ $(MAKE) $(FLAGS_TO_PASS) $(EXTRA_BOOTSTRAP_FLAGS) check)
@endif bfd
@@ -3535,7 +3727,7 @@ info-bfd: \
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing info in bfd" ; \
+ echo "Doing info in bfd"; \
(cd $(HOST_SUBDIR)/bfd && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -3560,7 +3752,7 @@ dvi-bfd: \
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing dvi in bfd" ; \
+ echo "Doing dvi in bfd"; \
(cd $(HOST_SUBDIR)/bfd && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -3585,7 +3777,7 @@ pdf-bfd: \
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing pdf in bfd" ; \
+ echo "Doing pdf in bfd"; \
(cd $(HOST_SUBDIR)/bfd && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -3610,7 +3802,7 @@ html-bfd: \
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing html in bfd" ; \
+ echo "Doing html in bfd"; \
(cd $(HOST_SUBDIR)/bfd && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -3635,7 +3827,7 @@ TAGS-bfd: \
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing TAGS in bfd" ; \
+ echo "Doing TAGS in bfd"; \
(cd $(HOST_SUBDIR)/bfd && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -3661,7 +3853,7 @@ install-info-bfd: \
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing install-info in bfd" ; \
+ echo "Doing install-info in bfd"; \
(cd $(HOST_SUBDIR)/bfd && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -3687,7 +3879,7 @@ install-pdf-bfd: \
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing install-pdf in bfd" ; \
+ echo "Doing install-pdf in bfd"; \
(cd $(HOST_SUBDIR)/bfd && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -3713,7 +3905,7 @@ install-html-bfd: \
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing install-html in bfd" ; \
+ echo "Doing install-html in bfd"; \
(cd $(HOST_SUBDIR)/bfd && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -3738,7 +3930,7 @@ installcheck-bfd: \
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing installcheck in bfd" ; \
+ echo "Doing installcheck in bfd"; \
(cd $(HOST_SUBDIR)/bfd && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -3762,7 +3954,7 @@ mostlyclean-bfd:
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing mostlyclean in bfd" ; \
+ echo "Doing mostlyclean in bfd"; \
(cd $(HOST_SUBDIR)/bfd && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -3786,7 +3978,7 @@ clean-bfd:
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing clean in bfd" ; \
+ echo "Doing clean in bfd"; \
(cd $(HOST_SUBDIR)/bfd && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -3810,7 +4002,7 @@ distclean-bfd:
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing distclean in bfd" ; \
+ echo "Doing distclean in bfd"; \
(cd $(HOST_SUBDIR)/bfd && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -3834,7 +4026,7 @@ maintainer-clean-bfd:
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing maintainer-clean in bfd" ; \
+ echo "Doing maintainer-clean in bfd"; \
(cd $(HOST_SUBDIR)/bfd && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -3858,7 +4050,7 @@ configure-opcodes:
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
test ! -f $(HOST_SUBDIR)/opcodes/Makefile || exit 0; \
- $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/opcodes ; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/opcodes; \
$(HOST_EXPORTS) \
echo Configuring in $(HOST_SUBDIR)/opcodes; \
cd "$(HOST_SUBDIR)/opcodes" || exit 1; \
@@ -3867,11 +4059,12 @@ configure-opcodes:
*) topdir=`echo $(HOST_SUBDIR)/opcodes/ | \
sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
esac; \
- srcdiroption="--srcdir=$${topdir}/opcodes"; \
- libsrcdir="$$s/opcodes"; \
- $(SHELL) $${libsrcdir}/configure \
+ module_srcdir=opcodes; \
+ $(SHELL) \
+ $$s/$$module_srcdir/configure \
+ --srcdir=$${topdir}/$$module_srcdir \
$(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
- --target=${target_alias} $${srcdiroption} \
+ --target=${target_alias} \
|| exit 1
@endif opcodes
@@ -3892,19 +4085,20 @@ configure-stage1-opcodes:
CFLAGS="$(STAGE1_CFLAGS)"; export CFLAGS; \
CXXFLAGS="$(STAGE1_CXXFLAGS)"; export CXXFLAGS; \
LIBCFLAGS="$(LIBCFLAGS)"; export LIBCFLAGS; \
- echo Configuring stage 1 in $(HOST_SUBDIR)/opcodes ; \
- $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/opcodes ; \
+ echo Configuring stage 1 in $(HOST_SUBDIR)/opcodes; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/opcodes; \
cd $(HOST_SUBDIR)/opcodes || exit 1; \
case $(srcdir) in \
/* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
*) topdir=`echo $(HOST_SUBDIR)/opcodes/ | \
sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
esac; \
- srcdiroption="--srcdir=$${topdir}/opcodes"; \
- libsrcdir="$$s/opcodes"; \
- $(SHELL) $${libsrcdir}/configure \
+ module_srcdir=opcodes; \
+ $(SHELL) $$s/$$module_srcdir/configure \
+ --srcdir=$${topdir}/$$module_srcdir \
$(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
- --target=${target_alias} $${srcdiroption} \
+ --target=${target_alias} \
+ \
$(STAGE1_CONFIGURE_FLAGS)
@endif opcodes-bootstrap
@@ -3924,19 +4118,19 @@ configure-stage2-opcodes:
CFLAGS="$(STAGE2_CFLAGS)"; export CFLAGS; \
CXXFLAGS="$(STAGE2_CXXFLAGS)"; export CXXFLAGS; \
LIBCFLAGS="$(STAGE2_CFLAGS)"; export LIBCFLAGS; \
- echo Configuring stage 2 in $(HOST_SUBDIR)/opcodes ; \
- $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/opcodes ; \
+ echo Configuring stage 2 in $(HOST_SUBDIR)/opcodes; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/opcodes; \
cd $(HOST_SUBDIR)/opcodes || exit 1; \
case $(srcdir) in \
/* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
*) topdir=`echo $(HOST_SUBDIR)/opcodes/ | \
sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
esac; \
- srcdiroption="--srcdir=$${topdir}/opcodes"; \
- libsrcdir="$$s/opcodes"; \
- $(SHELL) $${libsrcdir}/configure \
+ module_srcdir=opcodes; \
+ $(SHELL) $$s/$$module_srcdir/configure \
+ --srcdir=$${topdir}/$$module_srcdir \
$(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
- --target=${target_alias} $${srcdiroption} \
+ --target=${target_alias} \
--with-build-libsubdir=$(HOST_SUBDIR) \
$(STAGE2_CONFIGURE_FLAGS)
@endif opcodes-bootstrap
@@ -3957,19 +4151,19 @@ configure-stage3-opcodes:
CFLAGS="$(STAGE3_CFLAGS)"; export CFLAGS; \
CXXFLAGS="$(STAGE3_CXXFLAGS)"; export CXXFLAGS; \
LIBCFLAGS="$(STAGE3_CFLAGS)"; export LIBCFLAGS; \
- echo Configuring stage 3 in $(HOST_SUBDIR)/opcodes ; \
- $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/opcodes ; \
+ echo Configuring stage 3 in $(HOST_SUBDIR)/opcodes; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/opcodes; \
cd $(HOST_SUBDIR)/opcodes || exit 1; \
case $(srcdir) in \
/* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
*) topdir=`echo $(HOST_SUBDIR)/opcodes/ | \
sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
esac; \
- srcdiroption="--srcdir=$${topdir}/opcodes"; \
- libsrcdir="$$s/opcodes"; \
- $(SHELL) $${libsrcdir}/configure \
+ module_srcdir=opcodes; \
+ $(SHELL) $$s/$$module_srcdir/configure \
+ --srcdir=$${topdir}/$$module_srcdir \
$(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
- --target=${target_alias} $${srcdiroption} \
+ --target=${target_alias} \
--with-build-libsubdir=$(HOST_SUBDIR) \
$(STAGE3_CONFIGURE_FLAGS)
@endif opcodes-bootstrap
@@ -3990,19 +4184,19 @@ configure-stage4-opcodes:
CFLAGS="$(STAGE4_CFLAGS)"; export CFLAGS; \
CXXFLAGS="$(STAGE4_CXXFLAGS)"; export CXXFLAGS; \
LIBCFLAGS="$(STAGE4_CFLAGS)"; export LIBCFLAGS; \
- echo Configuring stage 4 in $(HOST_SUBDIR)/opcodes ; \
- $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/opcodes ; \
+ echo Configuring stage 4 in $(HOST_SUBDIR)/opcodes; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/opcodes; \
cd $(HOST_SUBDIR)/opcodes || exit 1; \
case $(srcdir) in \
/* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
*) topdir=`echo $(HOST_SUBDIR)/opcodes/ | \
sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
esac; \
- srcdiroption="--srcdir=$${topdir}/opcodes"; \
- libsrcdir="$$s/opcodes"; \
- $(SHELL) $${libsrcdir}/configure \
+ module_srcdir=opcodes; \
+ $(SHELL) $$s/$$module_srcdir/configure \
+ --srcdir=$${topdir}/$$module_srcdir \
$(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
- --target=${target_alias} $${srcdiroption} \
+ --target=${target_alias} \
--with-build-libsubdir=$(HOST_SUBDIR) \
$(STAGE4_CONFIGURE_FLAGS)
@endif opcodes-bootstrap
@@ -4023,19 +4217,19 @@ configure-stageprofile-opcodes:
CFLAGS="$(STAGEprofile_CFLAGS)"; export CFLAGS; \
CXXFLAGS="$(STAGEprofile_CXXFLAGS)"; export CXXFLAGS; \
LIBCFLAGS="$(STAGEprofile_CFLAGS)"; export LIBCFLAGS; \
- echo Configuring stage profile in $(HOST_SUBDIR)/opcodes ; \
- $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/opcodes ; \
+ echo Configuring stage profile in $(HOST_SUBDIR)/opcodes; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/opcodes; \
cd $(HOST_SUBDIR)/opcodes || exit 1; \
case $(srcdir) in \
/* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
*) topdir=`echo $(HOST_SUBDIR)/opcodes/ | \
sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
esac; \
- srcdiroption="--srcdir=$${topdir}/opcodes"; \
- libsrcdir="$$s/opcodes"; \
- $(SHELL) $${libsrcdir}/configure \
+ module_srcdir=opcodes; \
+ $(SHELL) $$s/$$module_srcdir/configure \
+ --srcdir=$${topdir}/$$module_srcdir \
$(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
- --target=${target_alias} $${srcdiroption} \
+ --target=${target_alias} \
--with-build-libsubdir=$(HOST_SUBDIR) \
$(STAGEprofile_CONFIGURE_FLAGS)
@endif opcodes-bootstrap
@@ -4056,19 +4250,19 @@ configure-stagefeedback-opcodes:
CFLAGS="$(STAGEfeedback_CFLAGS)"; export CFLAGS; \
CXXFLAGS="$(STAGEfeedback_CXXFLAGS)"; export CXXFLAGS; \
LIBCFLAGS="$(STAGEfeedback_CFLAGS)"; export LIBCFLAGS; \
- echo Configuring stage feedback in $(HOST_SUBDIR)/opcodes ; \
- $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/opcodes ; \
+ echo Configuring stage feedback in $(HOST_SUBDIR)/opcodes; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/opcodes; \
cd $(HOST_SUBDIR)/opcodes || exit 1; \
case $(srcdir) in \
/* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
*) topdir=`echo $(HOST_SUBDIR)/opcodes/ | \
sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
esac; \
- srcdiroption="--srcdir=$${topdir}/opcodes"; \
- libsrcdir="$$s/opcodes"; \
- $(SHELL) $${libsrcdir}/configure \
+ module_srcdir=opcodes; \
+ $(SHELL) $$s/$$module_srcdir/configure \
+ --srcdir=$${topdir}/$$module_srcdir \
$(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
- --target=${target_alias} $${srcdiroption} \
+ --target=${target_alias} \
--with-build-libsubdir=$(HOST_SUBDIR) \
$(STAGEfeedback_CONFIGURE_FLAGS)
@endif opcodes-bootstrap
@@ -4355,9 +4549,9 @@ check-opcodes:
@: $(MAKE); $(unstage)
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(HOST_EXPORTS) \
+ $(HOST_EXPORTS) $(EXTRA_HOST_EXPORTS) \
(cd $(HOST_SUBDIR)/opcodes && \
- $(MAKE) $(FLAGS_TO_PASS) check)
+ $(MAKE) $(FLAGS_TO_PASS) $(EXTRA_BOOTSTRAP_FLAGS) check)
@endif opcodes
@@ -4407,7 +4601,7 @@ info-opcodes: \
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing info in opcodes" ; \
+ echo "Doing info in opcodes"; \
(cd $(HOST_SUBDIR)/opcodes && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -4432,7 +4626,7 @@ dvi-opcodes: \
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing dvi in opcodes" ; \
+ echo "Doing dvi in opcodes"; \
(cd $(HOST_SUBDIR)/opcodes && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -4457,7 +4651,7 @@ pdf-opcodes: \
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing pdf in opcodes" ; \
+ echo "Doing pdf in opcodes"; \
(cd $(HOST_SUBDIR)/opcodes && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -4482,7 +4676,7 @@ html-opcodes: \
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing html in opcodes" ; \
+ echo "Doing html in opcodes"; \
(cd $(HOST_SUBDIR)/opcodes && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -4507,7 +4701,7 @@ TAGS-opcodes: \
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing TAGS in opcodes" ; \
+ echo "Doing TAGS in opcodes"; \
(cd $(HOST_SUBDIR)/opcodes && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -4533,7 +4727,7 @@ install-info-opcodes: \
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing install-info in opcodes" ; \
+ echo "Doing install-info in opcodes"; \
(cd $(HOST_SUBDIR)/opcodes && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -4559,7 +4753,7 @@ install-pdf-opcodes: \
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing install-pdf in opcodes" ; \
+ echo "Doing install-pdf in opcodes"; \
(cd $(HOST_SUBDIR)/opcodes && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -4585,7 +4779,7 @@ install-html-opcodes: \
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing install-html in opcodes" ; \
+ echo "Doing install-html in opcodes"; \
(cd $(HOST_SUBDIR)/opcodes && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -4610,7 +4804,7 @@ installcheck-opcodes: \
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing installcheck in opcodes" ; \
+ echo "Doing installcheck in opcodes"; \
(cd $(HOST_SUBDIR)/opcodes && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -4634,7 +4828,7 @@ mostlyclean-opcodes:
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing mostlyclean in opcodes" ; \
+ echo "Doing mostlyclean in opcodes"; \
(cd $(HOST_SUBDIR)/opcodes && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -4658,7 +4852,7 @@ clean-opcodes:
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing clean in opcodes" ; \
+ echo "Doing clean in opcodes"; \
(cd $(HOST_SUBDIR)/opcodes && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -4682,7 +4876,7 @@ distclean-opcodes:
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing distclean in opcodes" ; \
+ echo "Doing distclean in opcodes"; \
(cd $(HOST_SUBDIR)/opcodes && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -4706,7 +4900,7 @@ maintainer-clean-opcodes:
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing maintainer-clean in opcodes" ; \
+ echo "Doing maintainer-clean in opcodes"; \
(cd $(HOST_SUBDIR)/opcodes && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -4730,7 +4924,7 @@ configure-binutils:
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
test ! -f $(HOST_SUBDIR)/binutils/Makefile || exit 0; \
- $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/binutils ; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/binutils; \
$(HOST_EXPORTS) \
echo Configuring in $(HOST_SUBDIR)/binutils; \
cd "$(HOST_SUBDIR)/binutils" || exit 1; \
@@ -4739,11 +4933,12 @@ configure-binutils:
*) topdir=`echo $(HOST_SUBDIR)/binutils/ | \
sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
esac; \
- srcdiroption="--srcdir=$${topdir}/binutils"; \
- libsrcdir="$$s/binutils"; \
- $(SHELL) $${libsrcdir}/configure \
+ module_srcdir=binutils; \
+ $(SHELL) \
+ $$s/$$module_srcdir/configure \
+ --srcdir=$${topdir}/$$module_srcdir \
$(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
- --target=${target_alias} $${srcdiroption} \
+ --target=${target_alias} \
|| exit 1
@endif binutils
@@ -4764,19 +4959,20 @@ configure-stage1-binutils:
CFLAGS="$(STAGE1_CFLAGS)"; export CFLAGS; \
CXXFLAGS="$(STAGE1_CXXFLAGS)"; export CXXFLAGS; \
LIBCFLAGS="$(LIBCFLAGS)"; export LIBCFLAGS; \
- echo Configuring stage 1 in $(HOST_SUBDIR)/binutils ; \
- $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/binutils ; \
+ echo Configuring stage 1 in $(HOST_SUBDIR)/binutils; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/binutils; \
cd $(HOST_SUBDIR)/binutils || exit 1; \
case $(srcdir) in \
/* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
*) topdir=`echo $(HOST_SUBDIR)/binutils/ | \
sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
esac; \
- srcdiroption="--srcdir=$${topdir}/binutils"; \
- libsrcdir="$$s/binutils"; \
- $(SHELL) $${libsrcdir}/configure \
+ module_srcdir=binutils; \
+ $(SHELL) $$s/$$module_srcdir/configure \
+ --srcdir=$${topdir}/$$module_srcdir \
$(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
- --target=${target_alias} $${srcdiroption} \
+ --target=${target_alias} \
+ \
$(STAGE1_CONFIGURE_FLAGS)
@endif binutils-bootstrap
@@ -4796,19 +4992,19 @@ configure-stage2-binutils:
CFLAGS="$(STAGE2_CFLAGS)"; export CFLAGS; \
CXXFLAGS="$(STAGE2_CXXFLAGS)"; export CXXFLAGS; \
LIBCFLAGS="$(STAGE2_CFLAGS)"; export LIBCFLAGS; \
- echo Configuring stage 2 in $(HOST_SUBDIR)/binutils ; \
- $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/binutils ; \
+ echo Configuring stage 2 in $(HOST_SUBDIR)/binutils; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/binutils; \
cd $(HOST_SUBDIR)/binutils || exit 1; \
case $(srcdir) in \
/* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
*) topdir=`echo $(HOST_SUBDIR)/binutils/ | \
sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
esac; \
- srcdiroption="--srcdir=$${topdir}/binutils"; \
- libsrcdir="$$s/binutils"; \
- $(SHELL) $${libsrcdir}/configure \
+ module_srcdir=binutils; \
+ $(SHELL) $$s/$$module_srcdir/configure \
+ --srcdir=$${topdir}/$$module_srcdir \
$(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
- --target=${target_alias} $${srcdiroption} \
+ --target=${target_alias} \
--with-build-libsubdir=$(HOST_SUBDIR) \
$(STAGE2_CONFIGURE_FLAGS)
@endif binutils-bootstrap
@@ -4829,19 +5025,19 @@ configure-stage3-binutils:
CFLAGS="$(STAGE3_CFLAGS)"; export CFLAGS; \
CXXFLAGS="$(STAGE3_CXXFLAGS)"; export CXXFLAGS; \
LIBCFLAGS="$(STAGE3_CFLAGS)"; export LIBCFLAGS; \
- echo Configuring stage 3 in $(HOST_SUBDIR)/binutils ; \
- $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/binutils ; \
+ echo Configuring stage 3 in $(HOST_SUBDIR)/binutils; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/binutils; \
cd $(HOST_SUBDIR)/binutils || exit 1; \
case $(srcdir) in \
/* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
*) topdir=`echo $(HOST_SUBDIR)/binutils/ | \
sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
esac; \
- srcdiroption="--srcdir=$${topdir}/binutils"; \
- libsrcdir="$$s/binutils"; \
- $(SHELL) $${libsrcdir}/configure \
+ module_srcdir=binutils; \
+ $(SHELL) $$s/$$module_srcdir/configure \
+ --srcdir=$${topdir}/$$module_srcdir \
$(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
- --target=${target_alias} $${srcdiroption} \
+ --target=${target_alias} \
--with-build-libsubdir=$(HOST_SUBDIR) \
$(STAGE3_CONFIGURE_FLAGS)
@endif binutils-bootstrap
@@ -4862,19 +5058,19 @@ configure-stage4-binutils:
CFLAGS="$(STAGE4_CFLAGS)"; export CFLAGS; \
CXXFLAGS="$(STAGE4_CXXFLAGS)"; export CXXFLAGS; \
LIBCFLAGS="$(STAGE4_CFLAGS)"; export LIBCFLAGS; \
- echo Configuring stage 4 in $(HOST_SUBDIR)/binutils ; \
- $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/binutils ; \
+ echo Configuring stage 4 in $(HOST_SUBDIR)/binutils; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/binutils; \
cd $(HOST_SUBDIR)/binutils || exit 1; \
case $(srcdir) in \
/* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
*) topdir=`echo $(HOST_SUBDIR)/binutils/ | \
sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
esac; \
- srcdiroption="--srcdir=$${topdir}/binutils"; \
- libsrcdir="$$s/binutils"; \
- $(SHELL) $${libsrcdir}/configure \
+ module_srcdir=binutils; \
+ $(SHELL) $$s/$$module_srcdir/configure \
+ --srcdir=$${topdir}/$$module_srcdir \
$(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
- --target=${target_alias} $${srcdiroption} \
+ --target=${target_alias} \
--with-build-libsubdir=$(HOST_SUBDIR) \
$(STAGE4_CONFIGURE_FLAGS)
@endif binutils-bootstrap
@@ -4895,19 +5091,19 @@ configure-stageprofile-binutils:
CFLAGS="$(STAGEprofile_CFLAGS)"; export CFLAGS; \
CXXFLAGS="$(STAGEprofile_CXXFLAGS)"; export CXXFLAGS; \
LIBCFLAGS="$(STAGEprofile_CFLAGS)"; export LIBCFLAGS; \
- echo Configuring stage profile in $(HOST_SUBDIR)/binutils ; \
- $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/binutils ; \
+ echo Configuring stage profile in $(HOST_SUBDIR)/binutils; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/binutils; \
cd $(HOST_SUBDIR)/binutils || exit 1; \
case $(srcdir) in \
/* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
*) topdir=`echo $(HOST_SUBDIR)/binutils/ | \
sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
esac; \
- srcdiroption="--srcdir=$${topdir}/binutils"; \
- libsrcdir="$$s/binutils"; \
- $(SHELL) $${libsrcdir}/configure \
+ module_srcdir=binutils; \
+ $(SHELL) $$s/$$module_srcdir/configure \
+ --srcdir=$${topdir}/$$module_srcdir \
$(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
- --target=${target_alias} $${srcdiroption} \
+ --target=${target_alias} \
--with-build-libsubdir=$(HOST_SUBDIR) \
$(STAGEprofile_CONFIGURE_FLAGS)
@endif binutils-bootstrap
@@ -4928,19 +5124,19 @@ configure-stagefeedback-binutils:
CFLAGS="$(STAGEfeedback_CFLAGS)"; export CFLAGS; \
CXXFLAGS="$(STAGEfeedback_CXXFLAGS)"; export CXXFLAGS; \
LIBCFLAGS="$(STAGEfeedback_CFLAGS)"; export LIBCFLAGS; \
- echo Configuring stage feedback in $(HOST_SUBDIR)/binutils ; \
- $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/binutils ; \
+ echo Configuring stage feedback in $(HOST_SUBDIR)/binutils; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/binutils; \
cd $(HOST_SUBDIR)/binutils || exit 1; \
case $(srcdir) in \
/* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
*) topdir=`echo $(HOST_SUBDIR)/binutils/ | \
sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
esac; \
- srcdiroption="--srcdir=$${topdir}/binutils"; \
- libsrcdir="$$s/binutils"; \
- $(SHELL) $${libsrcdir}/configure \
+ module_srcdir=binutils; \
+ $(SHELL) $$s/$$module_srcdir/configure \
+ --srcdir=$${topdir}/$$module_srcdir \
$(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
- --target=${target_alias} $${srcdiroption} \
+ --target=${target_alias} \
--with-build-libsubdir=$(HOST_SUBDIR) \
$(STAGEfeedback_CONFIGURE_FLAGS)
@endif binutils-bootstrap
@@ -5227,9 +5423,9 @@ check-binutils:
@: $(MAKE); $(unstage)
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(HOST_EXPORTS) \
+ $(HOST_EXPORTS) $(EXTRA_HOST_EXPORTS) \
(cd $(HOST_SUBDIR)/binutils && \
- $(MAKE) $(FLAGS_TO_PASS) check)
+ $(MAKE) $(FLAGS_TO_PASS) $(EXTRA_BOOTSTRAP_FLAGS) check)
@endif binutils
@@ -5279,7 +5475,7 @@ info-binutils: \
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing info in binutils" ; \
+ echo "Doing info in binutils"; \
(cd $(HOST_SUBDIR)/binutils && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -5304,7 +5500,7 @@ dvi-binutils: \
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing dvi in binutils" ; \
+ echo "Doing dvi in binutils"; \
(cd $(HOST_SUBDIR)/binutils && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -5329,7 +5525,7 @@ pdf-binutils: \
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing pdf in binutils" ; \
+ echo "Doing pdf in binutils"; \
(cd $(HOST_SUBDIR)/binutils && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -5354,7 +5550,7 @@ html-binutils: \
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing html in binutils" ; \
+ echo "Doing html in binutils"; \
(cd $(HOST_SUBDIR)/binutils && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -5379,7 +5575,7 @@ TAGS-binutils: \
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing TAGS in binutils" ; \
+ echo "Doing TAGS in binutils"; \
(cd $(HOST_SUBDIR)/binutils && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -5405,7 +5601,7 @@ install-info-binutils: \
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing install-info in binutils" ; \
+ echo "Doing install-info in binutils"; \
(cd $(HOST_SUBDIR)/binutils && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -5431,7 +5627,7 @@ install-pdf-binutils: \
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing install-pdf in binutils" ; \
+ echo "Doing install-pdf in binutils"; \
(cd $(HOST_SUBDIR)/binutils && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -5457,7 +5653,7 @@ install-html-binutils: \
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing install-html in binutils" ; \
+ echo "Doing install-html in binutils"; \
(cd $(HOST_SUBDIR)/binutils && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -5482,7 +5678,7 @@ installcheck-binutils: \
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing installcheck in binutils" ; \
+ echo "Doing installcheck in binutils"; \
(cd $(HOST_SUBDIR)/binutils && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -5506,7 +5702,7 @@ mostlyclean-binutils:
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing mostlyclean in binutils" ; \
+ echo "Doing mostlyclean in binutils"; \
(cd $(HOST_SUBDIR)/binutils && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -5530,7 +5726,7 @@ clean-binutils:
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing clean in binutils" ; \
+ echo "Doing clean in binutils"; \
(cd $(HOST_SUBDIR)/binutils && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -5554,7 +5750,7 @@ distclean-binutils:
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing distclean in binutils" ; \
+ echo "Doing distclean in binutils"; \
(cd $(HOST_SUBDIR)/binutils && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -5578,7 +5774,7 @@ maintainer-clean-binutils:
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing maintainer-clean in binutils" ; \
+ echo "Doing maintainer-clean in binutils"; \
(cd $(HOST_SUBDIR)/binutils && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -5603,7 +5799,7 @@ configure-bison:
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
test ! -f $(HOST_SUBDIR)/bison/Makefile || exit 0; \
- $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/bison ; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/bison; \
$(HOST_EXPORTS) \
echo Configuring in $(HOST_SUBDIR)/bison; \
cd "$(HOST_SUBDIR)/bison" || exit 1; \
@@ -5612,11 +5808,12 @@ configure-bison:
*) topdir=`echo $(HOST_SUBDIR)/bison/ | \
sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
esac; \
- srcdiroption="--srcdir=$${topdir}/bison"; \
- libsrcdir="$$s/bison"; \
- $(SHELL) $${libsrcdir}/configure \
+ module_srcdir=bison; \
+ $(SHELL) \
+ $$s/$$module_srcdir/configure \
+ --srcdir=$${topdir}/$$module_srcdir \
$(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
- --target=${target_alias} $${srcdiroption} \
+ --target=${target_alias} \
|| exit 1
@endif bison
@@ -5653,12 +5850,12 @@ maybe-check-bison: check-bison
# This module is only tested in a native toolchain.
check-bison:
@: $(MAKE); $(unstage)
- @if [ '$(host)' = '$(target)' ] ; then \
+ @if [ '$(host)' = '$(target)' ]; then \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(HOST_EXPORTS) \
+ $(HOST_EXPORTS) \
(cd $(HOST_SUBDIR)/bison && \
- $(MAKE) $(FLAGS_TO_PASS) check); \
+ $(MAKE) $(FLAGS_TO_PASS) check)
fi
@endif bison
@@ -5710,7 +5907,7 @@ info-bison: \
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing info in bison" ; \
+ echo "Doing info in bison"; \
(cd $(HOST_SUBDIR)/bison && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -5736,7 +5933,7 @@ dvi-bison: \
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing dvi in bison" ; \
+ echo "Doing dvi in bison"; \
(cd $(HOST_SUBDIR)/bison && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -5762,7 +5959,7 @@ pdf-bison: \
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing pdf in bison" ; \
+ echo "Doing pdf in bison"; \
(cd $(HOST_SUBDIR)/bison && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -5788,7 +5985,7 @@ html-bison: \
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing html in bison" ; \
+ echo "Doing html in bison"; \
(cd $(HOST_SUBDIR)/bison && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -5814,7 +6011,7 @@ TAGS-bison: \
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing TAGS in bison" ; \
+ echo "Doing TAGS in bison"; \
(cd $(HOST_SUBDIR)/bison && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -5841,7 +6038,7 @@ install-info-bison: \
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing install-info in bison" ; \
+ echo "Doing install-info in bison"; \
(cd $(HOST_SUBDIR)/bison && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -5868,7 +6065,7 @@ install-pdf-bison: \
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing install-pdf in bison" ; \
+ echo "Doing install-pdf in bison"; \
(cd $(HOST_SUBDIR)/bison && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -5895,7 +6092,7 @@ install-html-bison: \
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing install-html in bison" ; \
+ echo "Doing install-html in bison"; \
(cd $(HOST_SUBDIR)/bison && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -5921,7 +6118,7 @@ installcheck-bison: \
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing installcheck in bison" ; \
+ echo "Doing installcheck in bison"; \
(cd $(HOST_SUBDIR)/bison && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -5946,7 +6143,7 @@ mostlyclean-bison:
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing mostlyclean in bison" ; \
+ echo "Doing mostlyclean in bison"; \
(cd $(HOST_SUBDIR)/bison && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -5971,7 +6168,7 @@ clean-bison:
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing clean in bison" ; \
+ echo "Doing clean in bison"; \
(cd $(HOST_SUBDIR)/bison && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -5996,7 +6193,7 @@ distclean-bison:
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing distclean in bison" ; \
+ echo "Doing distclean in bison"; \
(cd $(HOST_SUBDIR)/bison && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -6021,7 +6218,7 @@ maintainer-clean-bison:
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing maintainer-clean in bison" ; \
+ echo "Doing maintainer-clean in bison"; \
(cd $(HOST_SUBDIR)/bison && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -6046,7 +6243,7 @@ configure-cgen:
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
test ! -f $(HOST_SUBDIR)/cgen/Makefile || exit 0; \
- $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/cgen ; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/cgen; \
$(HOST_EXPORTS) \
echo Configuring in $(HOST_SUBDIR)/cgen; \
cd "$(HOST_SUBDIR)/cgen" || exit 1; \
@@ -6055,11 +6252,12 @@ configure-cgen:
*) topdir=`echo $(HOST_SUBDIR)/cgen/ | \
sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
esac; \
- srcdiroption="--srcdir=$${topdir}/cgen"; \
- libsrcdir="$$s/cgen"; \
- $(SHELL) $${libsrcdir}/configure \
+ module_srcdir=cgen; \
+ $(SHELL) \
+ $$s/$$module_srcdir/configure \
+ --srcdir=$${topdir}/$$module_srcdir \
$(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
- --target=${target_alias} $${srcdiroption} \
+ --target=${target_alias} \
|| exit 1
@endif cgen
@@ -6097,7 +6295,7 @@ check-cgen:
@: $(MAKE); $(unstage)
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(HOST_EXPORTS) \
+ $(HOST_EXPORTS) \
(cd $(HOST_SUBDIR)/cgen && \
$(MAKE) $(FLAGS_TO_PASS) check)
@@ -6150,7 +6348,7 @@ info-cgen: \
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing info in cgen" ; \
+ echo "Doing info in cgen"; \
(cd $(HOST_SUBDIR)/cgen && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -6176,7 +6374,7 @@ dvi-cgen: \
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing dvi in cgen" ; \
+ echo "Doing dvi in cgen"; \
(cd $(HOST_SUBDIR)/cgen && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -6202,7 +6400,7 @@ pdf-cgen: \
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing pdf in cgen" ; \
+ echo "Doing pdf in cgen"; \
(cd $(HOST_SUBDIR)/cgen && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -6228,7 +6426,7 @@ html-cgen: \
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing html in cgen" ; \
+ echo "Doing html in cgen"; \
(cd $(HOST_SUBDIR)/cgen && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -6254,7 +6452,7 @@ TAGS-cgen: \
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing TAGS in cgen" ; \
+ echo "Doing TAGS in cgen"; \
(cd $(HOST_SUBDIR)/cgen && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -6281,7 +6479,7 @@ install-info-cgen: \
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing install-info in cgen" ; \
+ echo "Doing install-info in cgen"; \
(cd $(HOST_SUBDIR)/cgen && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -6308,7 +6506,7 @@ install-pdf-cgen: \
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing install-pdf in cgen" ; \
+ echo "Doing install-pdf in cgen"; \
(cd $(HOST_SUBDIR)/cgen && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -6335,7 +6533,7 @@ install-html-cgen: \
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing install-html in cgen" ; \
+ echo "Doing install-html in cgen"; \
(cd $(HOST_SUBDIR)/cgen && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -6361,7 +6559,7 @@ installcheck-cgen: \
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing installcheck in cgen" ; \
+ echo "Doing installcheck in cgen"; \
(cd $(HOST_SUBDIR)/cgen && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -6386,7 +6584,7 @@ mostlyclean-cgen:
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing mostlyclean in cgen" ; \
+ echo "Doing mostlyclean in cgen"; \
(cd $(HOST_SUBDIR)/cgen && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -6411,7 +6609,7 @@ clean-cgen:
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing clean in cgen" ; \
+ echo "Doing clean in cgen"; \
(cd $(HOST_SUBDIR)/cgen && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -6436,7 +6634,7 @@ distclean-cgen:
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing distclean in cgen" ; \
+ echo "Doing distclean in cgen"; \
(cd $(HOST_SUBDIR)/cgen && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -6461,7 +6659,7 @@ maintainer-clean-cgen:
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing maintainer-clean in cgen" ; \
+ echo "Doing maintainer-clean in cgen"; \
(cd $(HOST_SUBDIR)/cgen && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -6486,7 +6684,7 @@ configure-dejagnu:
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
test ! -f $(HOST_SUBDIR)/dejagnu/Makefile || exit 0; \
- $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/dejagnu ; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/dejagnu; \
$(HOST_EXPORTS) \
echo Configuring in $(HOST_SUBDIR)/dejagnu; \
cd "$(HOST_SUBDIR)/dejagnu" || exit 1; \
@@ -6495,11 +6693,12 @@ configure-dejagnu:
*) topdir=`echo $(HOST_SUBDIR)/dejagnu/ | \
sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
esac; \
- srcdiroption="--srcdir=$${topdir}/dejagnu"; \
- libsrcdir="$$s/dejagnu"; \
- $(SHELL) $${libsrcdir}/configure \
+ module_srcdir=dejagnu; \
+ $(SHELL) \
+ $$s/$$module_srcdir/configure \
+ --srcdir=$${topdir}/$$module_srcdir \
$(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
- --target=${target_alias} $${srcdiroption} \
+ --target=${target_alias} \
|| exit 1
@endif dejagnu
@@ -6537,7 +6736,7 @@ check-dejagnu:
@: $(MAKE); $(unstage)
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(HOST_EXPORTS) \
+ $(HOST_EXPORTS) \
(cd $(HOST_SUBDIR)/dejagnu && \
$(MAKE) $(FLAGS_TO_PASS) check)
@@ -6590,7 +6789,7 @@ info-dejagnu: \
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing info in dejagnu" ; \
+ echo "Doing info in dejagnu"; \
(cd $(HOST_SUBDIR)/dejagnu && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -6616,7 +6815,7 @@ dvi-dejagnu: \
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing dvi in dejagnu" ; \
+ echo "Doing dvi in dejagnu"; \
(cd $(HOST_SUBDIR)/dejagnu && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -6642,7 +6841,7 @@ pdf-dejagnu: \
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing pdf in dejagnu" ; \
+ echo "Doing pdf in dejagnu"; \
(cd $(HOST_SUBDIR)/dejagnu && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -6668,7 +6867,7 @@ html-dejagnu: \
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing html in dejagnu" ; \
+ echo "Doing html in dejagnu"; \
(cd $(HOST_SUBDIR)/dejagnu && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -6694,7 +6893,7 @@ TAGS-dejagnu: \
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing TAGS in dejagnu" ; \
+ echo "Doing TAGS in dejagnu"; \
(cd $(HOST_SUBDIR)/dejagnu && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -6721,7 +6920,7 @@ install-info-dejagnu: \
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing install-info in dejagnu" ; \
+ echo "Doing install-info in dejagnu"; \
(cd $(HOST_SUBDIR)/dejagnu && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -6748,7 +6947,7 @@ install-pdf-dejagnu: \
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing install-pdf in dejagnu" ; \
+ echo "Doing install-pdf in dejagnu"; \
(cd $(HOST_SUBDIR)/dejagnu && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -6775,7 +6974,7 @@ install-html-dejagnu: \
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing install-html in dejagnu" ; \
+ echo "Doing install-html in dejagnu"; \
(cd $(HOST_SUBDIR)/dejagnu && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -6801,7 +7000,7 @@ installcheck-dejagnu: \
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing installcheck in dejagnu" ; \
+ echo "Doing installcheck in dejagnu"; \
(cd $(HOST_SUBDIR)/dejagnu && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -6826,7 +7025,7 @@ mostlyclean-dejagnu:
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing mostlyclean in dejagnu" ; \
+ echo "Doing mostlyclean in dejagnu"; \
(cd $(HOST_SUBDIR)/dejagnu && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -6851,7 +7050,7 @@ clean-dejagnu:
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing clean in dejagnu" ; \
+ echo "Doing clean in dejagnu"; \
(cd $(HOST_SUBDIR)/dejagnu && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -6876,7 +7075,7 @@ distclean-dejagnu:
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing distclean in dejagnu" ; \
+ echo "Doing distclean in dejagnu"; \
(cd $(HOST_SUBDIR)/dejagnu && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -6901,7 +7100,7 @@ maintainer-clean-dejagnu:
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing maintainer-clean in dejagnu" ; \
+ echo "Doing maintainer-clean in dejagnu"; \
(cd $(HOST_SUBDIR)/dejagnu && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -6926,7 +7125,7 @@ configure-etc:
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
test ! -f $(HOST_SUBDIR)/etc/Makefile || exit 0; \
- $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/etc ; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/etc; \
$(HOST_EXPORTS) \
echo Configuring in $(HOST_SUBDIR)/etc; \
cd "$(HOST_SUBDIR)/etc" || exit 1; \
@@ -6935,11 +7134,12 @@ configure-etc:
*) topdir=`echo $(HOST_SUBDIR)/etc/ | \
sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
esac; \
- srcdiroption="--srcdir=$${topdir}/etc"; \
- libsrcdir="$$s/etc"; \
- $(SHELL) $${libsrcdir}/configure \
+ module_srcdir=etc; \
+ $(SHELL) \
+ $$s/$$module_srcdir/configure \
+ --srcdir=$${topdir}/$$module_srcdir \
$(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
- --target=${target_alias} $${srcdiroption} \
+ --target=${target_alias} \
|| exit 1
@endif etc
@@ -6977,7 +7177,7 @@ check-etc:
@: $(MAKE); $(unstage)
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(HOST_EXPORTS) \
+ $(HOST_EXPORTS) \
(cd $(HOST_SUBDIR)/etc && \
$(MAKE) $(FLAGS_TO_PASS) check)
@@ -7030,7 +7230,7 @@ info-etc: \
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing info in etc" ; \
+ echo "Doing info in etc"; \
(cd $(HOST_SUBDIR)/etc && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -7056,7 +7256,7 @@ dvi-etc: \
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing dvi in etc" ; \
+ echo "Doing dvi in etc"; \
(cd $(HOST_SUBDIR)/etc && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -7082,7 +7282,7 @@ pdf-etc: \
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing pdf in etc" ; \
+ echo "Doing pdf in etc"; \
(cd $(HOST_SUBDIR)/etc && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -7108,7 +7308,7 @@ html-etc: \
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing html in etc" ; \
+ echo "Doing html in etc"; \
(cd $(HOST_SUBDIR)/etc && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -7134,7 +7334,7 @@ TAGS-etc: \
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing TAGS in etc" ; \
+ echo "Doing TAGS in etc"; \
(cd $(HOST_SUBDIR)/etc && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -7161,7 +7361,7 @@ install-info-etc: \
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing install-info in etc" ; \
+ echo "Doing install-info in etc"; \
(cd $(HOST_SUBDIR)/etc && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -7188,7 +7388,7 @@ install-pdf-etc: \
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing install-pdf in etc" ; \
+ echo "Doing install-pdf in etc"; \
(cd $(HOST_SUBDIR)/etc && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -7215,7 +7415,7 @@ install-html-etc: \
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing install-html in etc" ; \
+ echo "Doing install-html in etc"; \
(cd $(HOST_SUBDIR)/etc && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -7241,7 +7441,7 @@ installcheck-etc: \
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing installcheck in etc" ; \
+ echo "Doing installcheck in etc"; \
(cd $(HOST_SUBDIR)/etc && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -7266,7 +7466,7 @@ mostlyclean-etc:
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing mostlyclean in etc" ; \
+ echo "Doing mostlyclean in etc"; \
(cd $(HOST_SUBDIR)/etc && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -7291,7 +7491,7 @@ clean-etc:
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing clean in etc" ; \
+ echo "Doing clean in etc"; \
(cd $(HOST_SUBDIR)/etc && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -7316,7 +7516,7 @@ distclean-etc:
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing distclean in etc" ; \
+ echo "Doing distclean in etc"; \
(cd $(HOST_SUBDIR)/etc && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -7341,7 +7541,7 @@ maintainer-clean-etc:
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing maintainer-clean in etc" ; \
+ echo "Doing maintainer-clean in etc"; \
(cd $(HOST_SUBDIR)/etc && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -7366,7 +7566,7 @@ configure-fastjar:
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
test ! -f $(HOST_SUBDIR)/fastjar/Makefile || exit 0; \
- $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/fastjar ; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/fastjar; \
$(HOST_EXPORTS) \
echo Configuring in $(HOST_SUBDIR)/fastjar; \
cd "$(HOST_SUBDIR)/fastjar" || exit 1; \
@@ -7375,11 +7575,12 @@ configure-fastjar:
*) topdir=`echo $(HOST_SUBDIR)/fastjar/ | \
sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
esac; \
- srcdiroption="--srcdir=$${topdir}/fastjar"; \
- libsrcdir="$$s/fastjar"; \
- $(SHELL) $${libsrcdir}/configure \
+ module_srcdir=fastjar; \
+ $(SHELL) \
+ $$s/$$module_srcdir/configure \
+ --srcdir=$${topdir}/$$module_srcdir \
$(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
- --target=${target_alias} $${srcdiroption} \
+ --target=${target_alias} \
|| exit 1
@endif fastjar
@@ -7416,12 +7617,12 @@ maybe-check-fastjar: check-fastjar
# This module is only tested in a native toolchain.
check-fastjar:
@: $(MAKE); $(unstage)
- @if [ '$(host)' = '$(target)' ] ; then \
+ @if [ '$(host)' = '$(target)' ]; then \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(HOST_EXPORTS) \
+ $(HOST_EXPORTS) \
(cd $(HOST_SUBDIR)/fastjar && \
- $(MAKE) $(FLAGS_TO_PASS) check); \
+ $(MAKE) $(FLAGS_TO_PASS) check)
fi
@endif fastjar
@@ -7473,7 +7674,7 @@ info-fastjar: \
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing info in fastjar" ; \
+ echo "Doing info in fastjar"; \
(cd $(HOST_SUBDIR)/fastjar && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -7499,7 +7700,7 @@ dvi-fastjar: \
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing dvi in fastjar" ; \
+ echo "Doing dvi in fastjar"; \
(cd $(HOST_SUBDIR)/fastjar && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -7525,7 +7726,7 @@ pdf-fastjar: \
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing pdf in fastjar" ; \
+ echo "Doing pdf in fastjar"; \
(cd $(HOST_SUBDIR)/fastjar && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -7551,7 +7752,7 @@ html-fastjar: \
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing html in fastjar" ; \
+ echo "Doing html in fastjar"; \
(cd $(HOST_SUBDIR)/fastjar && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -7577,7 +7778,7 @@ TAGS-fastjar: \
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing TAGS in fastjar" ; \
+ echo "Doing TAGS in fastjar"; \
(cd $(HOST_SUBDIR)/fastjar && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -7604,7 +7805,7 @@ install-info-fastjar: \
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing install-info in fastjar" ; \
+ echo "Doing install-info in fastjar"; \
(cd $(HOST_SUBDIR)/fastjar && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -7631,7 +7832,7 @@ install-pdf-fastjar: \
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing install-pdf in fastjar" ; \
+ echo "Doing install-pdf in fastjar"; \
(cd $(HOST_SUBDIR)/fastjar && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -7658,7 +7859,7 @@ install-html-fastjar: \
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing install-html in fastjar" ; \
+ echo "Doing install-html in fastjar"; \
(cd $(HOST_SUBDIR)/fastjar && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -7684,7 +7885,7 @@ installcheck-fastjar: \
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing installcheck in fastjar" ; \
+ echo "Doing installcheck in fastjar"; \
(cd $(HOST_SUBDIR)/fastjar && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -7709,7 +7910,7 @@ mostlyclean-fastjar:
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing mostlyclean in fastjar" ; \
+ echo "Doing mostlyclean in fastjar"; \
(cd $(HOST_SUBDIR)/fastjar && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -7734,7 +7935,7 @@ clean-fastjar:
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing clean in fastjar" ; \
+ echo "Doing clean in fastjar"; \
(cd $(HOST_SUBDIR)/fastjar && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -7759,7 +7960,7 @@ distclean-fastjar:
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing distclean in fastjar" ; \
+ echo "Doing distclean in fastjar"; \
(cd $(HOST_SUBDIR)/fastjar && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -7784,7 +7985,7 @@ maintainer-clean-fastjar:
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing maintainer-clean in fastjar" ; \
+ echo "Doing maintainer-clean in fastjar"; \
(cd $(HOST_SUBDIR)/fastjar && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -7805,11 +8006,10 @@ configure-fixincludes: stage_current
@if fixincludes
maybe-configure-fixincludes: configure-fixincludes
configure-fixincludes:
- @: $(MAKE); $(unstage)
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
test ! -f $(HOST_SUBDIR)/fixincludes/Makefile || exit 0; \
- $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/fixincludes ; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/fixincludes; \
$(HOST_EXPORTS) \
echo Configuring in $(HOST_SUBDIR)/fixincludes; \
cd "$(HOST_SUBDIR)/fixincludes" || exit 1; \
@@ -7818,16 +8018,216 @@ configure-fixincludes:
*) topdir=`echo $(HOST_SUBDIR)/fixincludes/ | \
sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
esac; \
- srcdiroption="--srcdir=$${topdir}/fixincludes"; \
- libsrcdir="$$s/fixincludes"; \
- $(SHELL) $${libsrcdir}/configure \
+ module_srcdir=fixincludes; \
+ $(SHELL) \
+ $$s/$$module_srcdir/configure \
+ --srcdir=$${topdir}/$$module_srcdir \
$(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
- --target=${target_alias} $${srcdiroption} \
+ --target=${target_alias} \
|| exit 1
@endif fixincludes
+.PHONY: configure-stage1-fixincludes maybe-configure-stage1-fixincludes
+maybe-configure-stage1-fixincludes:
+@if fixincludes-bootstrap
+maybe-configure-stage1-fixincludes: configure-stage1-fixincludes
+configure-stage1-fixincludes:
+ @[ $(current_stage) = stage1 ] || $(MAKE) stage1-start
+ @$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/fixincludes
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ TFLAGS="$(STAGE1_TFLAGS)"; \
+ test ! -f $(HOST_SUBDIR)/fixincludes/Makefile || exit 0; \
+ $(HOST_EXPORTS) \
+ CFLAGS="$(STAGE1_CFLAGS)"; export CFLAGS; \
+ CXXFLAGS="$(STAGE1_CXXFLAGS)"; export CXXFLAGS; \
+ LIBCFLAGS="$(LIBCFLAGS)"; export LIBCFLAGS; \
+ echo Configuring stage 1 in $(HOST_SUBDIR)/fixincludes; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/fixincludes; \
+ cd $(HOST_SUBDIR)/fixincludes || exit 1; \
+ case $(srcdir) in \
+ /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+ *) topdir=`echo $(HOST_SUBDIR)/fixincludes/ | \
+ sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
+ esac; \
+ module_srcdir=fixincludes; \
+ $(SHELL) $$s/$$module_srcdir/configure \
+ --srcdir=$${topdir}/$$module_srcdir \
+ $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
+ --target=${target_alias} \
+ \
+ $(STAGE1_CONFIGURE_FLAGS)
+@endif fixincludes-bootstrap
+
+.PHONY: configure-stage2-fixincludes maybe-configure-stage2-fixincludes
+maybe-configure-stage2-fixincludes:
+@if fixincludes-bootstrap
+maybe-configure-stage2-fixincludes: configure-stage2-fixincludes
+configure-stage2-fixincludes:
+ @[ $(current_stage) = stage2 ] || $(MAKE) stage2-start
+ @$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/fixincludes
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ TFLAGS="$(STAGE2_TFLAGS)"; \
+ test ! -f $(HOST_SUBDIR)/fixincludes/Makefile || exit 0; \
+ $(HOST_EXPORTS) \
+ $(POSTSTAGE1_HOST_EXPORTS) \
+ CFLAGS="$(STAGE2_CFLAGS)"; export CFLAGS; \
+ CXXFLAGS="$(STAGE2_CXXFLAGS)"; export CXXFLAGS; \
+ LIBCFLAGS="$(STAGE2_CFLAGS)"; export LIBCFLAGS; \
+ echo Configuring stage 2 in $(HOST_SUBDIR)/fixincludes; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/fixincludes; \
+ cd $(HOST_SUBDIR)/fixincludes || exit 1; \
+ case $(srcdir) in \
+ /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+ *) topdir=`echo $(HOST_SUBDIR)/fixincludes/ | \
+ sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
+ esac; \
+ module_srcdir=fixincludes; \
+ $(SHELL) $$s/$$module_srcdir/configure \
+ --srcdir=$${topdir}/$$module_srcdir \
+ $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
+ --target=${target_alias} \
+ --with-build-libsubdir=$(HOST_SUBDIR) \
+ $(STAGE2_CONFIGURE_FLAGS)
+@endif fixincludes-bootstrap
+
+.PHONY: configure-stage3-fixincludes maybe-configure-stage3-fixincludes
+maybe-configure-stage3-fixincludes:
+@if fixincludes-bootstrap
+maybe-configure-stage3-fixincludes: configure-stage3-fixincludes
+configure-stage3-fixincludes:
+ @[ $(current_stage) = stage3 ] || $(MAKE) stage3-start
+ @$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/fixincludes
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ TFLAGS="$(STAGE3_TFLAGS)"; \
+ test ! -f $(HOST_SUBDIR)/fixincludes/Makefile || exit 0; \
+ $(HOST_EXPORTS) \
+ $(POSTSTAGE1_HOST_EXPORTS) \
+ CFLAGS="$(STAGE3_CFLAGS)"; export CFLAGS; \
+ CXXFLAGS="$(STAGE3_CXXFLAGS)"; export CXXFLAGS; \
+ LIBCFLAGS="$(STAGE3_CFLAGS)"; export LIBCFLAGS; \
+ echo Configuring stage 3 in $(HOST_SUBDIR)/fixincludes; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/fixincludes; \
+ cd $(HOST_SUBDIR)/fixincludes || exit 1; \
+ case $(srcdir) in \
+ /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+ *) topdir=`echo $(HOST_SUBDIR)/fixincludes/ | \
+ sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
+ esac; \
+ module_srcdir=fixincludes; \
+ $(SHELL) $$s/$$module_srcdir/configure \
+ --srcdir=$${topdir}/$$module_srcdir \
+ $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
+ --target=${target_alias} \
+ --with-build-libsubdir=$(HOST_SUBDIR) \
+ $(STAGE3_CONFIGURE_FLAGS)
+@endif fixincludes-bootstrap
+
+.PHONY: configure-stage4-fixincludes maybe-configure-stage4-fixincludes
+maybe-configure-stage4-fixincludes:
+@if fixincludes-bootstrap
+maybe-configure-stage4-fixincludes: configure-stage4-fixincludes
+configure-stage4-fixincludes:
+ @[ $(current_stage) = stage4 ] || $(MAKE) stage4-start
+ @$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/fixincludes
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ TFLAGS="$(STAGE4_TFLAGS)"; \
+ test ! -f $(HOST_SUBDIR)/fixincludes/Makefile || exit 0; \
+ $(HOST_EXPORTS) \
+ $(POSTSTAGE1_HOST_EXPORTS) \
+ CFLAGS="$(STAGE4_CFLAGS)"; export CFLAGS; \
+ CXXFLAGS="$(STAGE4_CXXFLAGS)"; export CXXFLAGS; \
+ LIBCFLAGS="$(STAGE4_CFLAGS)"; export LIBCFLAGS; \
+ echo Configuring stage 4 in $(HOST_SUBDIR)/fixincludes; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/fixincludes; \
+ cd $(HOST_SUBDIR)/fixincludes || exit 1; \
+ case $(srcdir) in \
+ /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+ *) topdir=`echo $(HOST_SUBDIR)/fixincludes/ | \
+ sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
+ esac; \
+ module_srcdir=fixincludes; \
+ $(SHELL) $$s/$$module_srcdir/configure \
+ --srcdir=$${topdir}/$$module_srcdir \
+ $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
+ --target=${target_alias} \
+ --with-build-libsubdir=$(HOST_SUBDIR) \
+ $(STAGE4_CONFIGURE_FLAGS)
+@endif fixincludes-bootstrap
+
+.PHONY: configure-stageprofile-fixincludes maybe-configure-stageprofile-fixincludes
+maybe-configure-stageprofile-fixincludes:
+@if fixincludes-bootstrap
+maybe-configure-stageprofile-fixincludes: configure-stageprofile-fixincludes
+configure-stageprofile-fixincludes:
+ @[ $(current_stage) = stageprofile ] || $(MAKE) stageprofile-start
+ @$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/fixincludes
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ TFLAGS="$(STAGEprofile_TFLAGS)"; \
+ test ! -f $(HOST_SUBDIR)/fixincludes/Makefile || exit 0; \
+ $(HOST_EXPORTS) \
+ $(POSTSTAGE1_HOST_EXPORTS) \
+ CFLAGS="$(STAGEprofile_CFLAGS)"; export CFLAGS; \
+ CXXFLAGS="$(STAGEprofile_CXXFLAGS)"; export CXXFLAGS; \
+ LIBCFLAGS="$(STAGEprofile_CFLAGS)"; export LIBCFLAGS; \
+ echo Configuring stage profile in $(HOST_SUBDIR)/fixincludes; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/fixincludes; \
+ cd $(HOST_SUBDIR)/fixincludes || exit 1; \
+ case $(srcdir) in \
+ /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+ *) topdir=`echo $(HOST_SUBDIR)/fixincludes/ | \
+ sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
+ esac; \
+ module_srcdir=fixincludes; \
+ $(SHELL) $$s/$$module_srcdir/configure \
+ --srcdir=$${topdir}/$$module_srcdir \
+ $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
+ --target=${target_alias} \
+ --with-build-libsubdir=$(HOST_SUBDIR) \
+ $(STAGEprofile_CONFIGURE_FLAGS)
+@endif fixincludes-bootstrap
+
+.PHONY: configure-stagefeedback-fixincludes maybe-configure-stagefeedback-fixincludes
+maybe-configure-stagefeedback-fixincludes:
+@if fixincludes-bootstrap
+maybe-configure-stagefeedback-fixincludes: configure-stagefeedback-fixincludes
+configure-stagefeedback-fixincludes:
+ @[ $(current_stage) = stagefeedback ] || $(MAKE) stagefeedback-start
+ @$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/fixincludes
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ TFLAGS="$(STAGEfeedback_TFLAGS)"; \
+ test ! -f $(HOST_SUBDIR)/fixincludes/Makefile || exit 0; \
+ $(HOST_EXPORTS) \
+ $(POSTSTAGE1_HOST_EXPORTS) \
+ CFLAGS="$(STAGEfeedback_CFLAGS)"; export CFLAGS; \
+ CXXFLAGS="$(STAGEfeedback_CXXFLAGS)"; export CXXFLAGS; \
+ LIBCFLAGS="$(STAGEfeedback_CFLAGS)"; export LIBCFLAGS; \
+ echo Configuring stage feedback in $(HOST_SUBDIR)/fixincludes; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/fixincludes; \
+ cd $(HOST_SUBDIR)/fixincludes || exit 1; \
+ case $(srcdir) in \
+ /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+ *) topdir=`echo $(HOST_SUBDIR)/fixincludes/ | \
+ sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
+ esac; \
+ module_srcdir=fixincludes; \
+ $(SHELL) $$s/$$module_srcdir/configure \
+ --srcdir=$${topdir}/$$module_srcdir \
+ $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
+ --target=${target_alias} \
+ --with-build-libsubdir=$(HOST_SUBDIR) \
+ $(STAGEfeedback_CONFIGURE_FLAGS)
+@endif fixincludes-bootstrap
+
+
+
.PHONY: all-fixincludes maybe-all-fixincludes
@@ -7839,7 +8239,6 @@ all-fixincludes: stage_current
TARGET-fixincludes=all
maybe-all-fixincludes: all-fixincludes
all-fixincludes: configure-fixincludes
- @: $(MAKE); $(unstage)
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(HOST_EXPORTS) \
@@ -7850,6 +8249,255 @@ all-fixincludes: configure-fixincludes
+.PHONY: all-stage1-fixincludes maybe-all-stage1-fixincludes
+.PHONY: clean-stage1-fixincludes maybe-clean-stage1-fixincludes
+maybe-all-stage1-fixincludes:
+maybe-clean-stage1-fixincludes:
+@if fixincludes-bootstrap
+maybe-all-stage1-fixincludes: all-stage1-fixincludes
+all-stage1: all-stage1-fixincludes
+TARGET-stage1-fixincludes = $(TARGET-fixincludes)
+all-stage1-fixincludes: configure-stage1-fixincludes
+ @[ $(current_stage) = stage1 ] || $(MAKE) stage1-start
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ TFLAGS="$(STAGE1_TFLAGS)"; \
+ $(HOST_EXPORTS) \
+ cd $(HOST_SUBDIR)/fixincludes && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) \
+ CFLAGS="$(STAGE1_CFLAGS)" \
+ CXXFLAGS="$(STAGE1_CXXFLAGS)" \
+ LIBCFLAGS="$(LIBCFLAGS)" \
+ CFLAGS_FOR_TARGET="$(CFLAGS_FOR_TARGET)" \
+ CXXFLAGS_FOR_TARGET="$(CXXFLAGS_FOR_TARGET)" \
+ LIBCFLAGS_FOR_TARGET="$(LIBCFLAGS_FOR_TARGET)" \
+ $(EXTRA_HOST_FLAGS) \
+ $(STAGE1_FLAGS_TO_PASS) \
+ TFLAGS="$(STAGE1_TFLAGS)" \
+ $(TARGET-stage1-fixincludes)
+
+maybe-clean-stage1-fixincludes: clean-stage1-fixincludes
+clean-stage1: clean-stage1-fixincludes
+clean-stage1-fixincludes:
+ @if [ $(current_stage) = stage1 ]; then \
+ [ -f $(HOST_SUBDIR)/fixincludes/Makefile ] || exit 0; \
+ else \
+ [ -f $(HOST_SUBDIR)/stage1-fixincludes/Makefile ] || exit 0; \
+ $(MAKE) stage1-start; \
+ fi; \
+ cd $(HOST_SUBDIR)/fixincludes && \
+ $(MAKE) $(EXTRA_HOST_FLAGS) \
+ $(STAGE1_FLAGS_TO_PASS) clean
+@endif fixincludes-bootstrap
+
+
+.PHONY: all-stage2-fixincludes maybe-all-stage2-fixincludes
+.PHONY: clean-stage2-fixincludes maybe-clean-stage2-fixincludes
+maybe-all-stage2-fixincludes:
+maybe-clean-stage2-fixincludes:
+@if fixincludes-bootstrap
+maybe-all-stage2-fixincludes: all-stage2-fixincludes
+all-stage2: all-stage2-fixincludes
+TARGET-stage2-fixincludes = $(TARGET-fixincludes)
+all-stage2-fixincludes: configure-stage2-fixincludes
+ @[ $(current_stage) = stage2 ] || $(MAKE) stage2-start
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ TFLAGS="$(STAGE2_TFLAGS)"; \
+ $(HOST_EXPORTS) \
+ $(POSTSTAGE1_HOST_EXPORTS) \
+ cd $(HOST_SUBDIR)/fixincludes && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) \
+ CFLAGS="$(STAGE2_CFLAGS)" \
+ CXXFLAGS="$(STAGE2_CXXFLAGS)" \
+ LIBCFLAGS="$(STAGE2_CFLAGS)" \
+ CFLAGS_FOR_TARGET="$(CFLAGS_FOR_TARGET)" \
+ CXXFLAGS_FOR_TARGET="$(CXXFLAGS_FOR_TARGET)" \
+ LIBCFLAGS_FOR_TARGET="$(LIBCFLAGS_FOR_TARGET)" \
+ $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) \
+ TFLAGS="$(STAGE2_TFLAGS)" \
+ $(TARGET-stage2-fixincludes)
+
+maybe-clean-stage2-fixincludes: clean-stage2-fixincludes
+clean-stage2: clean-stage2-fixincludes
+clean-stage2-fixincludes:
+ @if [ $(current_stage) = stage2 ]; then \
+ [ -f $(HOST_SUBDIR)/fixincludes/Makefile ] || exit 0; \
+ else \
+ [ -f $(HOST_SUBDIR)/stage2-fixincludes/Makefile ] || exit 0; \
+ $(MAKE) stage2-start; \
+ fi; \
+ cd $(HOST_SUBDIR)/fixincludes && \
+ $(MAKE) $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) clean
+@endif fixincludes-bootstrap
+
+
+.PHONY: all-stage3-fixincludes maybe-all-stage3-fixincludes
+.PHONY: clean-stage3-fixincludes maybe-clean-stage3-fixincludes
+maybe-all-stage3-fixincludes:
+maybe-clean-stage3-fixincludes:
+@if fixincludes-bootstrap
+maybe-all-stage3-fixincludes: all-stage3-fixincludes
+all-stage3: all-stage3-fixincludes
+TARGET-stage3-fixincludes = $(TARGET-fixincludes)
+all-stage3-fixincludes: configure-stage3-fixincludes
+ @[ $(current_stage) = stage3 ] || $(MAKE) stage3-start
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ TFLAGS="$(STAGE3_TFLAGS)"; \
+ $(HOST_EXPORTS) \
+ $(POSTSTAGE1_HOST_EXPORTS) \
+ cd $(HOST_SUBDIR)/fixincludes && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) \
+ CFLAGS="$(STAGE3_CFLAGS)" \
+ CXXFLAGS="$(STAGE3_CXXFLAGS)" \
+ LIBCFLAGS="$(STAGE3_CFLAGS)" \
+ CFLAGS_FOR_TARGET="$(CFLAGS_FOR_TARGET)" \
+ CXXFLAGS_FOR_TARGET="$(CXXFLAGS_FOR_TARGET)" \
+ LIBCFLAGS_FOR_TARGET="$(LIBCFLAGS_FOR_TARGET)" \
+ $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) \
+ TFLAGS="$(STAGE3_TFLAGS)" \
+ $(TARGET-stage3-fixincludes)
+
+maybe-clean-stage3-fixincludes: clean-stage3-fixincludes
+clean-stage3: clean-stage3-fixincludes
+clean-stage3-fixincludes:
+ @if [ $(current_stage) = stage3 ]; then \
+ [ -f $(HOST_SUBDIR)/fixincludes/Makefile ] || exit 0; \
+ else \
+ [ -f $(HOST_SUBDIR)/stage3-fixincludes/Makefile ] || exit 0; \
+ $(MAKE) stage3-start; \
+ fi; \
+ cd $(HOST_SUBDIR)/fixincludes && \
+ $(MAKE) $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) clean
+@endif fixincludes-bootstrap
+
+
+.PHONY: all-stage4-fixincludes maybe-all-stage4-fixincludes
+.PHONY: clean-stage4-fixincludes maybe-clean-stage4-fixincludes
+maybe-all-stage4-fixincludes:
+maybe-clean-stage4-fixincludes:
+@if fixincludes-bootstrap
+maybe-all-stage4-fixincludes: all-stage4-fixincludes
+all-stage4: all-stage4-fixincludes
+TARGET-stage4-fixincludes = $(TARGET-fixincludes)
+all-stage4-fixincludes: configure-stage4-fixincludes
+ @[ $(current_stage) = stage4 ] || $(MAKE) stage4-start
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ TFLAGS="$(STAGE4_TFLAGS)"; \
+ $(HOST_EXPORTS) \
+ $(POSTSTAGE1_HOST_EXPORTS) \
+ cd $(HOST_SUBDIR)/fixincludes && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) \
+ CFLAGS="$(STAGE4_CFLAGS)" \
+ CXXFLAGS="$(STAGE4_CXXFLAGS)" \
+ LIBCFLAGS="$(STAGE4_CFLAGS)" \
+ CFLAGS_FOR_TARGET="$(CFLAGS_FOR_TARGET)" \
+ CXXFLAGS_FOR_TARGET="$(CXXFLAGS_FOR_TARGET)" \
+ LIBCFLAGS_FOR_TARGET="$(LIBCFLAGS_FOR_TARGET)" \
+ $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) \
+ TFLAGS="$(STAGE4_TFLAGS)" \
+ $(TARGET-stage4-fixincludes)
+
+maybe-clean-stage4-fixincludes: clean-stage4-fixincludes
+clean-stage4: clean-stage4-fixincludes
+clean-stage4-fixincludes:
+ @if [ $(current_stage) = stage4 ]; then \
+ [ -f $(HOST_SUBDIR)/fixincludes/Makefile ] || exit 0; \
+ else \
+ [ -f $(HOST_SUBDIR)/stage4-fixincludes/Makefile ] || exit 0; \
+ $(MAKE) stage4-start; \
+ fi; \
+ cd $(HOST_SUBDIR)/fixincludes && \
+ $(MAKE) $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) clean
+@endif fixincludes-bootstrap
+
+
+.PHONY: all-stageprofile-fixincludes maybe-all-stageprofile-fixincludes
+.PHONY: clean-stageprofile-fixincludes maybe-clean-stageprofile-fixincludes
+maybe-all-stageprofile-fixincludes:
+maybe-clean-stageprofile-fixincludes:
+@if fixincludes-bootstrap
+maybe-all-stageprofile-fixincludes: all-stageprofile-fixincludes
+all-stageprofile: all-stageprofile-fixincludes
+TARGET-stageprofile-fixincludes = $(TARGET-fixincludes)
+all-stageprofile-fixincludes: configure-stageprofile-fixincludes
+ @[ $(current_stage) = stageprofile ] || $(MAKE) stageprofile-start
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ TFLAGS="$(STAGEprofile_TFLAGS)"; \
+ $(HOST_EXPORTS) \
+ $(POSTSTAGE1_HOST_EXPORTS) \
+ cd $(HOST_SUBDIR)/fixincludes && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) \
+ CFLAGS="$(STAGEprofile_CFLAGS)" \
+ CXXFLAGS="$(STAGEprofile_CXXFLAGS)" \
+ LIBCFLAGS="$(STAGEprofile_CFLAGS)" \
+ CFLAGS_FOR_TARGET="$(CFLAGS_FOR_TARGET)" \
+ CXXFLAGS_FOR_TARGET="$(CXXFLAGS_FOR_TARGET)" \
+ LIBCFLAGS_FOR_TARGET="$(LIBCFLAGS_FOR_TARGET)" \
+ $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) \
+ TFLAGS="$(STAGEprofile_TFLAGS)" \
+ $(TARGET-stageprofile-fixincludes)
+
+maybe-clean-stageprofile-fixincludes: clean-stageprofile-fixincludes
+clean-stageprofile: clean-stageprofile-fixincludes
+clean-stageprofile-fixincludes:
+ @if [ $(current_stage) = stageprofile ]; then \
+ [ -f $(HOST_SUBDIR)/fixincludes/Makefile ] || exit 0; \
+ else \
+ [ -f $(HOST_SUBDIR)/stageprofile-fixincludes/Makefile ] || exit 0; \
+ $(MAKE) stageprofile-start; \
+ fi; \
+ cd $(HOST_SUBDIR)/fixincludes && \
+ $(MAKE) $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) clean
+@endif fixincludes-bootstrap
+
+
+.PHONY: all-stagefeedback-fixincludes maybe-all-stagefeedback-fixincludes
+.PHONY: clean-stagefeedback-fixincludes maybe-clean-stagefeedback-fixincludes
+maybe-all-stagefeedback-fixincludes:
+maybe-clean-stagefeedback-fixincludes:
+@if fixincludes-bootstrap
+maybe-all-stagefeedback-fixincludes: all-stagefeedback-fixincludes
+all-stagefeedback: all-stagefeedback-fixincludes
+TARGET-stagefeedback-fixincludes = $(TARGET-fixincludes)
+all-stagefeedback-fixincludes: configure-stagefeedback-fixincludes
+ @[ $(current_stage) = stagefeedback ] || $(MAKE) stagefeedback-start
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ TFLAGS="$(STAGEfeedback_TFLAGS)"; \
+ $(HOST_EXPORTS) \
+ $(POSTSTAGE1_HOST_EXPORTS) \
+ cd $(HOST_SUBDIR)/fixincludes && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) \
+ CFLAGS="$(STAGEfeedback_CFLAGS)" \
+ CXXFLAGS="$(STAGEfeedback_CXXFLAGS)" \
+ LIBCFLAGS="$(STAGEfeedback_CFLAGS)" \
+ CFLAGS_FOR_TARGET="$(CFLAGS_FOR_TARGET)" \
+ CXXFLAGS_FOR_TARGET="$(CXXFLAGS_FOR_TARGET)" \
+ LIBCFLAGS_FOR_TARGET="$(LIBCFLAGS_FOR_TARGET)" \
+ $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) \
+ TFLAGS="$(STAGEfeedback_TFLAGS)" \
+ $(TARGET-stagefeedback-fixincludes)
+
+maybe-clean-stagefeedback-fixincludes: clean-stagefeedback-fixincludes
+clean-stagefeedback: clean-stagefeedback-fixincludes
+clean-stagefeedback-fixincludes:
+ @if [ $(current_stage) = stagefeedback ]; then \
+ [ -f $(HOST_SUBDIR)/fixincludes/Makefile ] || exit 0; \
+ else \
+ [ -f $(HOST_SUBDIR)/stagefeedback-fixincludes/Makefile ] || exit 0; \
+ $(MAKE) stagefeedback-start; \
+ fi; \
+ cd $(HOST_SUBDIR)/fixincludes && \
+ $(MAKE) $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) clean
+@endif fixincludes-bootstrap
+
+
+
+
.PHONY: check-fixincludes maybe-check-fixincludes
maybe-check-fixincludes:
@@ -7860,9 +8508,9 @@ check-fixincludes:
@: $(MAKE); $(unstage)
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(HOST_EXPORTS) \
+ $(HOST_EXPORTS) $(EXTRA_HOST_EXPORTS) \
(cd $(HOST_SUBDIR)/fixincludes && \
- $(MAKE) $(FLAGS_TO_PASS) check)
+ $(MAKE) $(FLAGS_TO_PASS) $(EXTRA_BOOTSTRAP_FLAGS) check)
@endif fixincludes
@@ -7905,7 +8553,6 @@ maybe-info-fixincludes: info-fixincludes
info-fixincludes: \
configure-fixincludes
- @: $(MAKE); $(unstage)
@[ -f ./fixincludes/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
@@ -7913,7 +8560,7 @@ info-fixincludes: \
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing info in fixincludes" ; \
+ echo "Doing info in fixincludes"; \
(cd $(HOST_SUBDIR)/fixincludes && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -7931,7 +8578,6 @@ maybe-dvi-fixincludes: dvi-fixincludes
dvi-fixincludes: \
configure-fixincludes
- @: $(MAKE); $(unstage)
@[ -f ./fixincludes/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
@@ -7939,7 +8585,7 @@ dvi-fixincludes: \
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing dvi in fixincludes" ; \
+ echo "Doing dvi in fixincludes"; \
(cd $(HOST_SUBDIR)/fixincludes && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -7957,7 +8603,6 @@ maybe-pdf-fixincludes: pdf-fixincludes
pdf-fixincludes: \
configure-fixincludes
- @: $(MAKE); $(unstage)
@[ -f ./fixincludes/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
@@ -7965,7 +8610,7 @@ pdf-fixincludes: \
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing pdf in fixincludes" ; \
+ echo "Doing pdf in fixincludes"; \
(cd $(HOST_SUBDIR)/fixincludes && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -7983,7 +8628,6 @@ maybe-html-fixincludes: html-fixincludes
html-fixincludes: \
configure-fixincludes
- @: $(MAKE); $(unstage)
@[ -f ./fixincludes/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
@@ -7991,7 +8635,7 @@ html-fixincludes: \
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing html in fixincludes" ; \
+ echo "Doing html in fixincludes"; \
(cd $(HOST_SUBDIR)/fixincludes && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -8020,7 +8664,6 @@ maybe-install-info-fixincludes: install-info-fixincludes
install-info-fixincludes: \
configure-fixincludes \
info-fixincludes
- @: $(MAKE); $(unstage)
@[ -f ./fixincludes/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
@@ -8028,7 +8671,7 @@ install-info-fixincludes: \
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing install-info in fixincludes" ; \
+ echo "Doing install-info in fixincludes"; \
(cd $(HOST_SUBDIR)/fixincludes && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -8047,7 +8690,6 @@ maybe-install-pdf-fixincludes: install-pdf-fixincludes
install-pdf-fixincludes: \
configure-fixincludes \
pdf-fixincludes
- @: $(MAKE); $(unstage)
@[ -f ./fixincludes/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
@@ -8055,7 +8697,7 @@ install-pdf-fixincludes: \
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing install-pdf in fixincludes" ; \
+ echo "Doing install-pdf in fixincludes"; \
(cd $(HOST_SUBDIR)/fixincludes && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -8074,7 +8716,6 @@ maybe-install-html-fixincludes: install-html-fixincludes
install-html-fixincludes: \
configure-fixincludes \
html-fixincludes
- @: $(MAKE); $(unstage)
@[ -f ./fixincludes/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
@@ -8082,7 +8723,7 @@ install-html-fixincludes: \
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing install-html in fixincludes" ; \
+ echo "Doing install-html in fixincludes"; \
(cd $(HOST_SUBDIR)/fixincludes && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -8100,7 +8741,6 @@ maybe-installcheck-fixincludes: installcheck-fixincludes
installcheck-fixincludes: \
configure-fixincludes
- @: $(MAKE); $(unstage)
@[ -f ./fixincludes/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
@@ -8108,7 +8748,7 @@ installcheck-fixincludes: \
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing installcheck in fixincludes" ; \
+ echo "Doing installcheck in fixincludes"; \
(cd $(HOST_SUBDIR)/fixincludes && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -8125,7 +8765,6 @@ maybe-mostlyclean-fixincludes:
maybe-mostlyclean-fixincludes: mostlyclean-fixincludes
mostlyclean-fixincludes:
- @: $(MAKE); $(unstage)
@[ -f ./fixincludes/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
@@ -8133,7 +8772,7 @@ mostlyclean-fixincludes:
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing mostlyclean in fixincludes" ; \
+ echo "Doing mostlyclean in fixincludes"; \
(cd $(HOST_SUBDIR)/fixincludes && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -8150,7 +8789,6 @@ maybe-clean-fixincludes:
maybe-clean-fixincludes: clean-fixincludes
clean-fixincludes:
- @: $(MAKE); $(unstage)
@[ -f ./fixincludes/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
@@ -8158,7 +8796,7 @@ clean-fixincludes:
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing clean in fixincludes" ; \
+ echo "Doing clean in fixincludes"; \
(cd $(HOST_SUBDIR)/fixincludes && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -8175,7 +8813,6 @@ maybe-distclean-fixincludes:
maybe-distclean-fixincludes: distclean-fixincludes
distclean-fixincludes:
- @: $(MAKE); $(unstage)
@[ -f ./fixincludes/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
@@ -8183,7 +8820,7 @@ distclean-fixincludes:
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing distclean in fixincludes" ; \
+ echo "Doing distclean in fixincludes"; \
(cd $(HOST_SUBDIR)/fixincludes && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -8200,7 +8837,6 @@ maybe-maintainer-clean-fixincludes:
maybe-maintainer-clean-fixincludes: maintainer-clean-fixincludes
maintainer-clean-fixincludes:
- @: $(MAKE); $(unstage)
@[ -f ./fixincludes/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
@@ -8208,7 +8844,7 @@ maintainer-clean-fixincludes:
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing maintainer-clean in fixincludes" ; \
+ echo "Doing maintainer-clean in fixincludes"; \
(cd $(HOST_SUBDIR)/fixincludes && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -8233,7 +8869,7 @@ configure-flex:
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
test ! -f $(HOST_SUBDIR)/flex/Makefile || exit 0; \
- $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/flex ; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/flex; \
$(HOST_EXPORTS) \
echo Configuring in $(HOST_SUBDIR)/flex; \
cd "$(HOST_SUBDIR)/flex" || exit 1; \
@@ -8242,11 +8878,12 @@ configure-flex:
*) topdir=`echo $(HOST_SUBDIR)/flex/ | \
sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
esac; \
- srcdiroption="--srcdir=$${topdir}/flex"; \
- libsrcdir="$$s/flex"; \
- $(SHELL) $${libsrcdir}/configure \
+ module_srcdir=flex; \
+ $(SHELL) \
+ $$s/$$module_srcdir/configure \
+ --srcdir=$${topdir}/$$module_srcdir \
$(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
- --target=${target_alias} $${srcdiroption} \
+ --target=${target_alias} \
|| exit 1
@endif flex
@@ -8283,12 +8920,12 @@ maybe-check-flex: check-flex
# This module is only tested in a native toolchain.
check-flex:
@: $(MAKE); $(unstage)
- @if [ '$(host)' = '$(target)' ] ; then \
+ @if [ '$(host)' = '$(target)' ]; then \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(HOST_EXPORTS) \
+ $(HOST_EXPORTS) \
(cd $(HOST_SUBDIR)/flex && \
- $(MAKE) $(FLAGS_TO_PASS) check); \
+ $(MAKE) $(FLAGS_TO_PASS) check)
fi
@endif flex
@@ -8340,7 +8977,7 @@ info-flex: \
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing info in flex" ; \
+ echo "Doing info in flex"; \
(cd $(HOST_SUBDIR)/flex && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -8366,7 +9003,7 @@ dvi-flex: \
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing dvi in flex" ; \
+ echo "Doing dvi in flex"; \
(cd $(HOST_SUBDIR)/flex && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -8392,7 +9029,7 @@ pdf-flex: \
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing pdf in flex" ; \
+ echo "Doing pdf in flex"; \
(cd $(HOST_SUBDIR)/flex && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -8418,7 +9055,7 @@ html-flex: \
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing html in flex" ; \
+ echo "Doing html in flex"; \
(cd $(HOST_SUBDIR)/flex && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -8444,7 +9081,7 @@ TAGS-flex: \
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing TAGS in flex" ; \
+ echo "Doing TAGS in flex"; \
(cd $(HOST_SUBDIR)/flex && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -8471,7 +9108,7 @@ install-info-flex: \
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing install-info in flex" ; \
+ echo "Doing install-info in flex"; \
(cd $(HOST_SUBDIR)/flex && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -8498,7 +9135,7 @@ install-pdf-flex: \
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing install-pdf in flex" ; \
+ echo "Doing install-pdf in flex"; \
(cd $(HOST_SUBDIR)/flex && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -8525,7 +9162,7 @@ install-html-flex: \
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing install-html in flex" ; \
+ echo "Doing install-html in flex"; \
(cd $(HOST_SUBDIR)/flex && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -8551,7 +9188,7 @@ installcheck-flex: \
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing installcheck in flex" ; \
+ echo "Doing installcheck in flex"; \
(cd $(HOST_SUBDIR)/flex && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -8576,7 +9213,7 @@ mostlyclean-flex:
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing mostlyclean in flex" ; \
+ echo "Doing mostlyclean in flex"; \
(cd $(HOST_SUBDIR)/flex && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -8601,7 +9238,7 @@ clean-flex:
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing clean in flex" ; \
+ echo "Doing clean in flex"; \
(cd $(HOST_SUBDIR)/flex && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -8626,7 +9263,7 @@ distclean-flex:
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing distclean in flex" ; \
+ echo "Doing distclean in flex"; \
(cd $(HOST_SUBDIR)/flex && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -8651,7 +9288,7 @@ maintainer-clean-flex:
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing maintainer-clean in flex" ; \
+ echo "Doing maintainer-clean in flex"; \
(cd $(HOST_SUBDIR)/flex && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -8675,7 +9312,7 @@ configure-gas:
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
test ! -f $(HOST_SUBDIR)/gas/Makefile || exit 0; \
- $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/gas ; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/gas; \
$(HOST_EXPORTS) \
echo Configuring in $(HOST_SUBDIR)/gas; \
cd "$(HOST_SUBDIR)/gas" || exit 1; \
@@ -8684,11 +9321,12 @@ configure-gas:
*) topdir=`echo $(HOST_SUBDIR)/gas/ | \
sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
esac; \
- srcdiroption="--srcdir=$${topdir}/gas"; \
- libsrcdir="$$s/gas"; \
- $(SHELL) $${libsrcdir}/configure \
+ module_srcdir=gas; \
+ $(SHELL) \
+ $$s/$$module_srcdir/configure \
+ --srcdir=$${topdir}/$$module_srcdir \
$(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
- --target=${target_alias} $${srcdiroption} \
+ --target=${target_alias} \
|| exit 1
@endif gas
@@ -8709,19 +9347,20 @@ configure-stage1-gas:
CFLAGS="$(STAGE1_CFLAGS)"; export CFLAGS; \
CXXFLAGS="$(STAGE1_CXXFLAGS)"; export CXXFLAGS; \
LIBCFLAGS="$(LIBCFLAGS)"; export LIBCFLAGS; \
- echo Configuring stage 1 in $(HOST_SUBDIR)/gas ; \
- $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/gas ; \
+ echo Configuring stage 1 in $(HOST_SUBDIR)/gas; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/gas; \
cd $(HOST_SUBDIR)/gas || exit 1; \
case $(srcdir) in \
/* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
*) topdir=`echo $(HOST_SUBDIR)/gas/ | \
sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
esac; \
- srcdiroption="--srcdir=$${topdir}/gas"; \
- libsrcdir="$$s/gas"; \
- $(SHELL) $${libsrcdir}/configure \
+ module_srcdir=gas; \
+ $(SHELL) $$s/$$module_srcdir/configure \
+ --srcdir=$${topdir}/$$module_srcdir \
$(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
- --target=${target_alias} $${srcdiroption} \
+ --target=${target_alias} \
+ \
$(STAGE1_CONFIGURE_FLAGS)
@endif gas-bootstrap
@@ -8741,19 +9380,19 @@ configure-stage2-gas:
CFLAGS="$(STAGE2_CFLAGS)"; export CFLAGS; \
CXXFLAGS="$(STAGE2_CXXFLAGS)"; export CXXFLAGS; \
LIBCFLAGS="$(STAGE2_CFLAGS)"; export LIBCFLAGS; \
- echo Configuring stage 2 in $(HOST_SUBDIR)/gas ; \
- $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/gas ; \
+ echo Configuring stage 2 in $(HOST_SUBDIR)/gas; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/gas; \
cd $(HOST_SUBDIR)/gas || exit 1; \
case $(srcdir) in \
/* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
*) topdir=`echo $(HOST_SUBDIR)/gas/ | \
sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
esac; \
- srcdiroption="--srcdir=$${topdir}/gas"; \
- libsrcdir="$$s/gas"; \
- $(SHELL) $${libsrcdir}/configure \
+ module_srcdir=gas; \
+ $(SHELL) $$s/$$module_srcdir/configure \
+ --srcdir=$${topdir}/$$module_srcdir \
$(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
- --target=${target_alias} $${srcdiroption} \
+ --target=${target_alias} \
--with-build-libsubdir=$(HOST_SUBDIR) \
$(STAGE2_CONFIGURE_FLAGS)
@endif gas-bootstrap
@@ -8774,19 +9413,19 @@ configure-stage3-gas:
CFLAGS="$(STAGE3_CFLAGS)"; export CFLAGS; \
CXXFLAGS="$(STAGE3_CXXFLAGS)"; export CXXFLAGS; \
LIBCFLAGS="$(STAGE3_CFLAGS)"; export LIBCFLAGS; \
- echo Configuring stage 3 in $(HOST_SUBDIR)/gas ; \
- $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/gas ; \
+ echo Configuring stage 3 in $(HOST_SUBDIR)/gas; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/gas; \
cd $(HOST_SUBDIR)/gas || exit 1; \
case $(srcdir) in \
/* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
*) topdir=`echo $(HOST_SUBDIR)/gas/ | \
sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
esac; \
- srcdiroption="--srcdir=$${topdir}/gas"; \
- libsrcdir="$$s/gas"; \
- $(SHELL) $${libsrcdir}/configure \
+ module_srcdir=gas; \
+ $(SHELL) $$s/$$module_srcdir/configure \
+ --srcdir=$${topdir}/$$module_srcdir \
$(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
- --target=${target_alias} $${srcdiroption} \
+ --target=${target_alias} \
--with-build-libsubdir=$(HOST_SUBDIR) \
$(STAGE3_CONFIGURE_FLAGS)
@endif gas-bootstrap
@@ -8807,19 +9446,19 @@ configure-stage4-gas:
CFLAGS="$(STAGE4_CFLAGS)"; export CFLAGS; \
CXXFLAGS="$(STAGE4_CXXFLAGS)"; export CXXFLAGS; \
LIBCFLAGS="$(STAGE4_CFLAGS)"; export LIBCFLAGS; \
- echo Configuring stage 4 in $(HOST_SUBDIR)/gas ; \
- $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/gas ; \
+ echo Configuring stage 4 in $(HOST_SUBDIR)/gas; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/gas; \
cd $(HOST_SUBDIR)/gas || exit 1; \
case $(srcdir) in \
/* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
*) topdir=`echo $(HOST_SUBDIR)/gas/ | \
sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
esac; \
- srcdiroption="--srcdir=$${topdir}/gas"; \
- libsrcdir="$$s/gas"; \
- $(SHELL) $${libsrcdir}/configure \
+ module_srcdir=gas; \
+ $(SHELL) $$s/$$module_srcdir/configure \
+ --srcdir=$${topdir}/$$module_srcdir \
$(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
- --target=${target_alias} $${srcdiroption} \
+ --target=${target_alias} \
--with-build-libsubdir=$(HOST_SUBDIR) \
$(STAGE4_CONFIGURE_FLAGS)
@endif gas-bootstrap
@@ -8840,19 +9479,19 @@ configure-stageprofile-gas:
CFLAGS="$(STAGEprofile_CFLAGS)"; export CFLAGS; \
CXXFLAGS="$(STAGEprofile_CXXFLAGS)"; export CXXFLAGS; \
LIBCFLAGS="$(STAGEprofile_CFLAGS)"; export LIBCFLAGS; \
- echo Configuring stage profile in $(HOST_SUBDIR)/gas ; \
- $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/gas ; \
+ echo Configuring stage profile in $(HOST_SUBDIR)/gas; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/gas; \
cd $(HOST_SUBDIR)/gas || exit 1; \
case $(srcdir) in \
/* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
*) topdir=`echo $(HOST_SUBDIR)/gas/ | \
sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
esac; \
- srcdiroption="--srcdir=$${topdir}/gas"; \
- libsrcdir="$$s/gas"; \
- $(SHELL) $${libsrcdir}/configure \
+ module_srcdir=gas; \
+ $(SHELL) $$s/$$module_srcdir/configure \
+ --srcdir=$${topdir}/$$module_srcdir \
$(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
- --target=${target_alias} $${srcdiroption} \
+ --target=${target_alias} \
--with-build-libsubdir=$(HOST_SUBDIR) \
$(STAGEprofile_CONFIGURE_FLAGS)
@endif gas-bootstrap
@@ -8873,19 +9512,19 @@ configure-stagefeedback-gas:
CFLAGS="$(STAGEfeedback_CFLAGS)"; export CFLAGS; \
CXXFLAGS="$(STAGEfeedback_CXXFLAGS)"; export CXXFLAGS; \
LIBCFLAGS="$(STAGEfeedback_CFLAGS)"; export LIBCFLAGS; \
- echo Configuring stage feedback in $(HOST_SUBDIR)/gas ; \
- $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/gas ; \
+ echo Configuring stage feedback in $(HOST_SUBDIR)/gas; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/gas; \
cd $(HOST_SUBDIR)/gas || exit 1; \
case $(srcdir) in \
/* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
*) topdir=`echo $(HOST_SUBDIR)/gas/ | \
sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
esac; \
- srcdiroption="--srcdir=$${topdir}/gas"; \
- libsrcdir="$$s/gas"; \
- $(SHELL) $${libsrcdir}/configure \
+ module_srcdir=gas; \
+ $(SHELL) $$s/$$module_srcdir/configure \
+ --srcdir=$${topdir}/$$module_srcdir \
$(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
- --target=${target_alias} $${srcdiroption} \
+ --target=${target_alias} \
--with-build-libsubdir=$(HOST_SUBDIR) \
$(STAGEfeedback_CONFIGURE_FLAGS)
@endif gas-bootstrap
@@ -9172,9 +9811,9 @@ check-gas:
@: $(MAKE); $(unstage)
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(HOST_EXPORTS) \
+ $(HOST_EXPORTS) $(EXTRA_HOST_EXPORTS) \
(cd $(HOST_SUBDIR)/gas && \
- $(MAKE) $(FLAGS_TO_PASS) check)
+ $(MAKE) $(FLAGS_TO_PASS) $(EXTRA_BOOTSTRAP_FLAGS) check)
@endif gas
@@ -9224,7 +9863,7 @@ info-gas: \
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing info in gas" ; \
+ echo "Doing info in gas"; \
(cd $(HOST_SUBDIR)/gas && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -9249,7 +9888,7 @@ dvi-gas: \
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing dvi in gas" ; \
+ echo "Doing dvi in gas"; \
(cd $(HOST_SUBDIR)/gas && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -9274,7 +9913,7 @@ pdf-gas: \
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing pdf in gas" ; \
+ echo "Doing pdf in gas"; \
(cd $(HOST_SUBDIR)/gas && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -9299,7 +9938,7 @@ html-gas: \
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing html in gas" ; \
+ echo "Doing html in gas"; \
(cd $(HOST_SUBDIR)/gas && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -9324,7 +9963,7 @@ TAGS-gas: \
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing TAGS in gas" ; \
+ echo "Doing TAGS in gas"; \
(cd $(HOST_SUBDIR)/gas && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -9350,7 +9989,7 @@ install-info-gas: \
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing install-info in gas" ; \
+ echo "Doing install-info in gas"; \
(cd $(HOST_SUBDIR)/gas && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -9376,7 +10015,7 @@ install-pdf-gas: \
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing install-pdf in gas" ; \
+ echo "Doing install-pdf in gas"; \
(cd $(HOST_SUBDIR)/gas && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -9402,7 +10041,7 @@ install-html-gas: \
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing install-html in gas" ; \
+ echo "Doing install-html in gas"; \
(cd $(HOST_SUBDIR)/gas && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -9427,7 +10066,7 @@ installcheck-gas: \
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing installcheck in gas" ; \
+ echo "Doing installcheck in gas"; \
(cd $(HOST_SUBDIR)/gas && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -9451,7 +10090,7 @@ mostlyclean-gas:
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing mostlyclean in gas" ; \
+ echo "Doing mostlyclean in gas"; \
(cd $(HOST_SUBDIR)/gas && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -9475,7 +10114,7 @@ clean-gas:
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing clean in gas" ; \
+ echo "Doing clean in gas"; \
(cd $(HOST_SUBDIR)/gas && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -9499,7 +10138,7 @@ distclean-gas:
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing distclean in gas" ; \
+ echo "Doing distclean in gas"; \
(cd $(HOST_SUBDIR)/gas && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -9523,7 +10162,7 @@ maintainer-clean-gas:
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing maintainer-clean in gas" ; \
+ echo "Doing maintainer-clean in gas"; \
(cd $(HOST_SUBDIR)/gas && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -9547,7 +10186,7 @@ configure-gcc:
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
test ! -f $(HOST_SUBDIR)/gcc/Makefile || exit 0; \
- $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/gcc ; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/gcc; \
$(HOST_EXPORTS) \
echo Configuring in $(HOST_SUBDIR)/gcc; \
cd "$(HOST_SUBDIR)/gcc" || exit 1; \
@@ -9556,11 +10195,12 @@ configure-gcc:
*) topdir=`echo $(HOST_SUBDIR)/gcc/ | \
sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
esac; \
- srcdiroption="--srcdir=$${topdir}/gcc"; \
- libsrcdir="$$s/gcc"; \
- $(SHELL) $${libsrcdir}/configure \
+ module_srcdir=gcc; \
+ $(SHELL) \
+ $$s/$$module_srcdir/configure \
+ --srcdir=$${topdir}/$$module_srcdir \
$(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
- --target=${target_alias} $${srcdiroption} \
+ --target=${target_alias} \
|| exit 1
@endif gcc
@@ -9581,19 +10221,20 @@ configure-stage1-gcc:
CFLAGS="$(STAGE1_CFLAGS)"; export CFLAGS; \
CXXFLAGS="$(STAGE1_CXXFLAGS)"; export CXXFLAGS; \
LIBCFLAGS="$(LIBCFLAGS)"; export LIBCFLAGS; \
- echo Configuring stage 1 in $(HOST_SUBDIR)/gcc ; \
- $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/gcc ; \
+ echo Configuring stage 1 in $(HOST_SUBDIR)/gcc; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/gcc; \
cd $(HOST_SUBDIR)/gcc || exit 1; \
case $(srcdir) in \
/* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
*) topdir=`echo $(HOST_SUBDIR)/gcc/ | \
sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
esac; \
- srcdiroption="--srcdir=$${topdir}/gcc"; \
- libsrcdir="$$s/gcc"; \
- $(SHELL) $${libsrcdir}/configure \
+ module_srcdir=gcc; \
+ $(SHELL) $$s/$$module_srcdir/configure \
+ --srcdir=$${topdir}/$$module_srcdir \
$(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
- --target=${target_alias} $${srcdiroption} \
+ --target=${target_alias} \
+ \
$(STAGE1_CONFIGURE_FLAGS)
@endif gcc-bootstrap
@@ -9613,19 +10254,19 @@ configure-stage2-gcc:
CFLAGS="$(STAGE2_CFLAGS)"; export CFLAGS; \
CXXFLAGS="$(STAGE2_CXXFLAGS)"; export CXXFLAGS; \
LIBCFLAGS="$(STAGE2_CFLAGS)"; export LIBCFLAGS; \
- echo Configuring stage 2 in $(HOST_SUBDIR)/gcc ; \
- $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/gcc ; \
+ echo Configuring stage 2 in $(HOST_SUBDIR)/gcc; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/gcc; \
cd $(HOST_SUBDIR)/gcc || exit 1; \
case $(srcdir) in \
/* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
*) topdir=`echo $(HOST_SUBDIR)/gcc/ | \
sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
esac; \
- srcdiroption="--srcdir=$${topdir}/gcc"; \
- libsrcdir="$$s/gcc"; \
- $(SHELL) $${libsrcdir}/configure \
+ module_srcdir=gcc; \
+ $(SHELL) $$s/$$module_srcdir/configure \
+ --srcdir=$${topdir}/$$module_srcdir \
$(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
- --target=${target_alias} $${srcdiroption} \
+ --target=${target_alias} \
--with-build-libsubdir=$(HOST_SUBDIR) \
$(STAGE2_CONFIGURE_FLAGS)
@endif gcc-bootstrap
@@ -9646,19 +10287,19 @@ configure-stage3-gcc:
CFLAGS="$(STAGE3_CFLAGS)"; export CFLAGS; \
CXXFLAGS="$(STAGE3_CXXFLAGS)"; export CXXFLAGS; \
LIBCFLAGS="$(STAGE3_CFLAGS)"; export LIBCFLAGS; \
- echo Configuring stage 3 in $(HOST_SUBDIR)/gcc ; \
- $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/gcc ; \
+ echo Configuring stage 3 in $(HOST_SUBDIR)/gcc; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/gcc; \
cd $(HOST_SUBDIR)/gcc || exit 1; \
case $(srcdir) in \
/* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
*) topdir=`echo $(HOST_SUBDIR)/gcc/ | \
sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
esac; \
- srcdiroption="--srcdir=$${topdir}/gcc"; \
- libsrcdir="$$s/gcc"; \
- $(SHELL) $${libsrcdir}/configure \
+ module_srcdir=gcc; \
+ $(SHELL) $$s/$$module_srcdir/configure \
+ --srcdir=$${topdir}/$$module_srcdir \
$(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
- --target=${target_alias} $${srcdiroption} \
+ --target=${target_alias} \
--with-build-libsubdir=$(HOST_SUBDIR) \
$(STAGE3_CONFIGURE_FLAGS)
@endif gcc-bootstrap
@@ -9679,19 +10320,19 @@ configure-stage4-gcc:
CFLAGS="$(STAGE4_CFLAGS)"; export CFLAGS; \
CXXFLAGS="$(STAGE4_CXXFLAGS)"; export CXXFLAGS; \
LIBCFLAGS="$(STAGE4_CFLAGS)"; export LIBCFLAGS; \
- echo Configuring stage 4 in $(HOST_SUBDIR)/gcc ; \
- $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/gcc ; \
+ echo Configuring stage 4 in $(HOST_SUBDIR)/gcc; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/gcc; \
cd $(HOST_SUBDIR)/gcc || exit 1; \
case $(srcdir) in \
/* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
*) topdir=`echo $(HOST_SUBDIR)/gcc/ | \
sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
esac; \
- srcdiroption="--srcdir=$${topdir}/gcc"; \
- libsrcdir="$$s/gcc"; \
- $(SHELL) $${libsrcdir}/configure \
+ module_srcdir=gcc; \
+ $(SHELL) $$s/$$module_srcdir/configure \
+ --srcdir=$${topdir}/$$module_srcdir \
$(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
- --target=${target_alias} $${srcdiroption} \
+ --target=${target_alias} \
--with-build-libsubdir=$(HOST_SUBDIR) \
$(STAGE4_CONFIGURE_FLAGS)
@endif gcc-bootstrap
@@ -9712,19 +10353,19 @@ configure-stageprofile-gcc:
CFLAGS="$(STAGEprofile_CFLAGS)"; export CFLAGS; \
CXXFLAGS="$(STAGEprofile_CXXFLAGS)"; export CXXFLAGS; \
LIBCFLAGS="$(STAGEprofile_CFLAGS)"; export LIBCFLAGS; \
- echo Configuring stage profile in $(HOST_SUBDIR)/gcc ; \
- $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/gcc ; \
+ echo Configuring stage profile in $(HOST_SUBDIR)/gcc; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/gcc; \
cd $(HOST_SUBDIR)/gcc || exit 1; \
case $(srcdir) in \
/* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
*) topdir=`echo $(HOST_SUBDIR)/gcc/ | \
sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
esac; \
- srcdiroption="--srcdir=$${topdir}/gcc"; \
- libsrcdir="$$s/gcc"; \
- $(SHELL) $${libsrcdir}/configure \
+ module_srcdir=gcc; \
+ $(SHELL) $$s/$$module_srcdir/configure \
+ --srcdir=$${topdir}/$$module_srcdir \
$(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
- --target=${target_alias} $${srcdiroption} \
+ --target=${target_alias} \
--with-build-libsubdir=$(HOST_SUBDIR) \
$(STAGEprofile_CONFIGURE_FLAGS)
@endif gcc-bootstrap
@@ -9745,19 +10386,19 @@ configure-stagefeedback-gcc:
CFLAGS="$(STAGEfeedback_CFLAGS)"; export CFLAGS; \
CXXFLAGS="$(STAGEfeedback_CXXFLAGS)"; export CXXFLAGS; \
LIBCFLAGS="$(STAGEfeedback_CFLAGS)"; export LIBCFLAGS; \
- echo Configuring stage feedback in $(HOST_SUBDIR)/gcc ; \
- $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/gcc ; \
+ echo Configuring stage feedback in $(HOST_SUBDIR)/gcc; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/gcc; \
cd $(HOST_SUBDIR)/gcc || exit 1; \
case $(srcdir) in \
/* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
*) topdir=`echo $(HOST_SUBDIR)/gcc/ | \
sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
esac; \
- srcdiroption="--srcdir=$${topdir}/gcc"; \
- libsrcdir="$$s/gcc"; \
- $(SHELL) $${libsrcdir}/configure \
+ module_srcdir=gcc; \
+ $(SHELL) $$s/$$module_srcdir/configure \
+ --srcdir=$${topdir}/$$module_srcdir \
$(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
- --target=${target_alias} $${srcdiroption} \
+ --target=${target_alias} \
--with-build-libsubdir=$(HOST_SUBDIR) \
$(STAGEfeedback_CONFIGURE_FLAGS)
@endif gcc-bootstrap
@@ -10044,9 +10685,9 @@ check-gcc:
@: $(MAKE); $(unstage)
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(HOST_EXPORTS) \
+ $(HOST_EXPORTS) $(EXTRA_HOST_EXPORTS) \
(cd $(HOST_SUBDIR)/gcc && \
- $(MAKE) $(FLAGS_TO_PASS) $(EXTRA_GCC_FLAGS) check)
+ $(MAKE) $(FLAGS_TO_PASS) $(EXTRA_GCC_FLAGS) $(EXTRA_BOOTSTRAP_FLAGS) check)
@endif gcc
@@ -10096,7 +10737,7 @@ info-gcc: \
for flag in $(EXTRA_HOST_FLAGS) $(EXTRA_GCC_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing info in gcc" ; \
+ echo "Doing info in gcc"; \
(cd $(HOST_SUBDIR)/gcc && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -10121,7 +10762,7 @@ dvi-gcc: \
for flag in $(EXTRA_HOST_FLAGS) $(EXTRA_GCC_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing dvi in gcc" ; \
+ echo "Doing dvi in gcc"; \
(cd $(HOST_SUBDIR)/gcc && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -10146,7 +10787,7 @@ pdf-gcc: \
for flag in $(EXTRA_HOST_FLAGS) $(EXTRA_GCC_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing pdf in gcc" ; \
+ echo "Doing pdf in gcc"; \
(cd $(HOST_SUBDIR)/gcc && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -10171,7 +10812,7 @@ html-gcc: \
for flag in $(EXTRA_HOST_FLAGS) $(EXTRA_GCC_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing html in gcc" ; \
+ echo "Doing html in gcc"; \
(cd $(HOST_SUBDIR)/gcc && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -10196,7 +10837,7 @@ TAGS-gcc: \
for flag in $(EXTRA_HOST_FLAGS) $(EXTRA_GCC_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing TAGS in gcc" ; \
+ echo "Doing TAGS in gcc"; \
(cd $(HOST_SUBDIR)/gcc && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -10222,7 +10863,7 @@ install-info-gcc: \
for flag in $(EXTRA_HOST_FLAGS) $(EXTRA_GCC_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing install-info in gcc" ; \
+ echo "Doing install-info in gcc"; \
(cd $(HOST_SUBDIR)/gcc && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -10248,7 +10889,7 @@ install-pdf-gcc: \
for flag in $(EXTRA_HOST_FLAGS) $(EXTRA_GCC_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing install-pdf in gcc" ; \
+ echo "Doing install-pdf in gcc"; \
(cd $(HOST_SUBDIR)/gcc && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -10274,7 +10915,7 @@ install-html-gcc: \
for flag in $(EXTRA_HOST_FLAGS) $(EXTRA_GCC_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing install-html in gcc" ; \
+ echo "Doing install-html in gcc"; \
(cd $(HOST_SUBDIR)/gcc && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -10299,7 +10940,7 @@ installcheck-gcc: \
for flag in $(EXTRA_HOST_FLAGS) $(EXTRA_GCC_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing installcheck in gcc" ; \
+ echo "Doing installcheck in gcc"; \
(cd $(HOST_SUBDIR)/gcc && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -10323,7 +10964,7 @@ mostlyclean-gcc:
for flag in $(EXTRA_HOST_FLAGS) $(EXTRA_GCC_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing mostlyclean in gcc" ; \
+ echo "Doing mostlyclean in gcc"; \
(cd $(HOST_SUBDIR)/gcc && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -10347,7 +10988,7 @@ clean-gcc:
for flag in $(EXTRA_HOST_FLAGS) $(EXTRA_GCC_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing clean in gcc" ; \
+ echo "Doing clean in gcc"; \
(cd $(HOST_SUBDIR)/gcc && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -10371,7 +11012,7 @@ distclean-gcc:
for flag in $(EXTRA_HOST_FLAGS) $(EXTRA_GCC_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing distclean in gcc" ; \
+ echo "Doing distclean in gcc"; \
(cd $(HOST_SUBDIR)/gcc && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -10395,7 +11036,7 @@ maintainer-clean-gcc:
for flag in $(EXTRA_HOST_FLAGS) $(EXTRA_GCC_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing maintainer-clean in gcc" ; \
+ echo "Doing maintainer-clean in gcc"; \
(cd $(HOST_SUBDIR)/gcc && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -10419,7 +11060,7 @@ configure-gmp:
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
test ! -f $(HOST_SUBDIR)/gmp/Makefile || exit 0; \
- $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/gmp ; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/gmp; \
$(HOST_EXPORTS) \
echo Configuring in $(HOST_SUBDIR)/gmp; \
cd "$(HOST_SUBDIR)/gmp" || exit 1; \
@@ -10428,11 +11069,12 @@ configure-gmp:
*) topdir=`echo $(HOST_SUBDIR)/gmp/ | \
sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
esac; \
- srcdiroption="--srcdir=$${topdir}/gmp"; \
- libsrcdir="$$s/gmp"; \
- $(SHELL) $${libsrcdir}/configure \
+ module_srcdir=gmp; \
+ $(SHELL) \
+ $$s/$$module_srcdir/configure \
+ --srcdir=$${topdir}/$$module_srcdir \
$(HOST_CONFIGARGS) --build=${build_alias} --host=none-${host_vendor}-${host_os} \
- --target=none-${host_vendor}-${host_os} $${srcdiroption} --disable-shared \
+ --target=none-${host_vendor}-${host_os} --disable-shared LEX="touch lex.yy.c" \
|| exit 1
@endif gmp
@@ -10453,21 +11095,22 @@ configure-stage1-gmp:
CFLAGS="$(STAGE1_CFLAGS)"; export CFLAGS; \
CXXFLAGS="$(STAGE1_CXXFLAGS)"; export CXXFLAGS; \
LIBCFLAGS="$(LIBCFLAGS)"; export LIBCFLAGS; \
- echo Configuring stage 1 in $(HOST_SUBDIR)/gmp ; \
- $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/gmp ; \
+ echo Configuring stage 1 in $(HOST_SUBDIR)/gmp; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/gmp; \
cd $(HOST_SUBDIR)/gmp || exit 1; \
case $(srcdir) in \
/* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
*) topdir=`echo $(HOST_SUBDIR)/gmp/ | \
sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
esac; \
- srcdiroption="--srcdir=$${topdir}/gmp"; \
- libsrcdir="$$s/gmp"; \
- $(SHELL) $${libsrcdir}/configure \
+ module_srcdir=gmp; \
+ $(SHELL) $$s/$$module_srcdir/configure \
+ --srcdir=$${topdir}/$$module_srcdir \
$(HOST_CONFIGARGS) --build=${build_alias} --host=none-${host_vendor}-${host_os} \
- --target=none-${host_vendor}-${host_os} $${srcdiroption} \
+ --target=none-${host_vendor}-${host_os} \
+ \
$(STAGE1_CONFIGURE_FLAGS) \
- --disable-shared
+ --disable-shared LEX="touch lex.yy.c"
@endif gmp-bootstrap
.PHONY: configure-stage2-gmp maybe-configure-stage2-gmp
@@ -10486,22 +11129,22 @@ configure-stage2-gmp:
CFLAGS="$(STAGE2_CFLAGS)"; export CFLAGS; \
CXXFLAGS="$(STAGE2_CXXFLAGS)"; export CXXFLAGS; \
LIBCFLAGS="$(STAGE2_CFLAGS)"; export LIBCFLAGS; \
- echo Configuring stage 2 in $(HOST_SUBDIR)/gmp ; \
- $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/gmp ; \
+ echo Configuring stage 2 in $(HOST_SUBDIR)/gmp; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/gmp; \
cd $(HOST_SUBDIR)/gmp || exit 1; \
case $(srcdir) in \
/* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
*) topdir=`echo $(HOST_SUBDIR)/gmp/ | \
sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
esac; \
- srcdiroption="--srcdir=$${topdir}/gmp"; \
- libsrcdir="$$s/gmp"; \
- $(SHELL) $${libsrcdir}/configure \
+ module_srcdir=gmp; \
+ $(SHELL) $$s/$$module_srcdir/configure \
+ --srcdir=$${topdir}/$$module_srcdir \
$(HOST_CONFIGARGS) --build=${build_alias} --host=none-${host_vendor}-${host_os} \
- --target=none-${host_vendor}-${host_os} $${srcdiroption} \
+ --target=none-${host_vendor}-${host_os} \
--with-build-libsubdir=$(HOST_SUBDIR) \
$(STAGE2_CONFIGURE_FLAGS) \
- --disable-shared
+ --disable-shared LEX="touch lex.yy.c"
@endif gmp-bootstrap
.PHONY: configure-stage3-gmp maybe-configure-stage3-gmp
@@ -10520,22 +11163,22 @@ configure-stage3-gmp:
CFLAGS="$(STAGE3_CFLAGS)"; export CFLAGS; \
CXXFLAGS="$(STAGE3_CXXFLAGS)"; export CXXFLAGS; \
LIBCFLAGS="$(STAGE3_CFLAGS)"; export LIBCFLAGS; \
- echo Configuring stage 3 in $(HOST_SUBDIR)/gmp ; \
- $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/gmp ; \
+ echo Configuring stage 3 in $(HOST_SUBDIR)/gmp; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/gmp; \
cd $(HOST_SUBDIR)/gmp || exit 1; \
case $(srcdir) in \
/* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
*) topdir=`echo $(HOST_SUBDIR)/gmp/ | \
sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
esac; \
- srcdiroption="--srcdir=$${topdir}/gmp"; \
- libsrcdir="$$s/gmp"; \
- $(SHELL) $${libsrcdir}/configure \
+ module_srcdir=gmp; \
+ $(SHELL) $$s/$$module_srcdir/configure \
+ --srcdir=$${topdir}/$$module_srcdir \
$(HOST_CONFIGARGS) --build=${build_alias} --host=none-${host_vendor}-${host_os} \
- --target=none-${host_vendor}-${host_os} $${srcdiroption} \
+ --target=none-${host_vendor}-${host_os} \
--with-build-libsubdir=$(HOST_SUBDIR) \
$(STAGE3_CONFIGURE_FLAGS) \
- --disable-shared
+ --disable-shared LEX="touch lex.yy.c"
@endif gmp-bootstrap
.PHONY: configure-stage4-gmp maybe-configure-stage4-gmp
@@ -10554,22 +11197,22 @@ configure-stage4-gmp:
CFLAGS="$(STAGE4_CFLAGS)"; export CFLAGS; \
CXXFLAGS="$(STAGE4_CXXFLAGS)"; export CXXFLAGS; \
LIBCFLAGS="$(STAGE4_CFLAGS)"; export LIBCFLAGS; \
- echo Configuring stage 4 in $(HOST_SUBDIR)/gmp ; \
- $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/gmp ; \
+ echo Configuring stage 4 in $(HOST_SUBDIR)/gmp; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/gmp; \
cd $(HOST_SUBDIR)/gmp || exit 1; \
case $(srcdir) in \
/* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
*) topdir=`echo $(HOST_SUBDIR)/gmp/ | \
sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
esac; \
- srcdiroption="--srcdir=$${topdir}/gmp"; \
- libsrcdir="$$s/gmp"; \
- $(SHELL) $${libsrcdir}/configure \
+ module_srcdir=gmp; \
+ $(SHELL) $$s/$$module_srcdir/configure \
+ --srcdir=$${topdir}/$$module_srcdir \
$(HOST_CONFIGARGS) --build=${build_alias} --host=none-${host_vendor}-${host_os} \
- --target=none-${host_vendor}-${host_os} $${srcdiroption} \
+ --target=none-${host_vendor}-${host_os} \
--with-build-libsubdir=$(HOST_SUBDIR) \
$(STAGE4_CONFIGURE_FLAGS) \
- --disable-shared
+ --disable-shared LEX="touch lex.yy.c"
@endif gmp-bootstrap
.PHONY: configure-stageprofile-gmp maybe-configure-stageprofile-gmp
@@ -10588,22 +11231,22 @@ configure-stageprofile-gmp:
CFLAGS="$(STAGEprofile_CFLAGS)"; export CFLAGS; \
CXXFLAGS="$(STAGEprofile_CXXFLAGS)"; export CXXFLAGS; \
LIBCFLAGS="$(STAGEprofile_CFLAGS)"; export LIBCFLAGS; \
- echo Configuring stage profile in $(HOST_SUBDIR)/gmp ; \
- $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/gmp ; \
+ echo Configuring stage profile in $(HOST_SUBDIR)/gmp; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/gmp; \
cd $(HOST_SUBDIR)/gmp || exit 1; \
case $(srcdir) in \
/* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
*) topdir=`echo $(HOST_SUBDIR)/gmp/ | \
sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
esac; \
- srcdiroption="--srcdir=$${topdir}/gmp"; \
- libsrcdir="$$s/gmp"; \
- $(SHELL) $${libsrcdir}/configure \
+ module_srcdir=gmp; \
+ $(SHELL) $$s/$$module_srcdir/configure \
+ --srcdir=$${topdir}/$$module_srcdir \
$(HOST_CONFIGARGS) --build=${build_alias} --host=none-${host_vendor}-${host_os} \
- --target=none-${host_vendor}-${host_os} $${srcdiroption} \
+ --target=none-${host_vendor}-${host_os} \
--with-build-libsubdir=$(HOST_SUBDIR) \
$(STAGEprofile_CONFIGURE_FLAGS) \
- --disable-shared
+ --disable-shared LEX="touch lex.yy.c"
@endif gmp-bootstrap
.PHONY: configure-stagefeedback-gmp maybe-configure-stagefeedback-gmp
@@ -10622,22 +11265,22 @@ configure-stagefeedback-gmp:
CFLAGS="$(STAGEfeedback_CFLAGS)"; export CFLAGS; \
CXXFLAGS="$(STAGEfeedback_CXXFLAGS)"; export CXXFLAGS; \
LIBCFLAGS="$(STAGEfeedback_CFLAGS)"; export LIBCFLAGS; \
- echo Configuring stage feedback in $(HOST_SUBDIR)/gmp ; \
- $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/gmp ; \
+ echo Configuring stage feedback in $(HOST_SUBDIR)/gmp; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/gmp; \
cd $(HOST_SUBDIR)/gmp || exit 1; \
case $(srcdir) in \
/* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
*) topdir=`echo $(HOST_SUBDIR)/gmp/ | \
sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
esac; \
- srcdiroption="--srcdir=$${topdir}/gmp"; \
- libsrcdir="$$s/gmp"; \
- $(SHELL) $${libsrcdir}/configure \
+ module_srcdir=gmp; \
+ $(SHELL) $$s/$$module_srcdir/configure \
+ --srcdir=$${topdir}/$$module_srcdir \
$(HOST_CONFIGARGS) --build=${build_alias} --host=none-${host_vendor}-${host_os} \
- --target=none-${host_vendor}-${host_os} $${srcdiroption} \
+ --target=none-${host_vendor}-${host_os} \
--with-build-libsubdir=$(HOST_SUBDIR) \
$(STAGEfeedback_CONFIGURE_FLAGS) \
- --disable-shared
+ --disable-shared LEX="touch lex.yy.c"
@endif gmp-bootstrap
@@ -10922,9 +11565,9 @@ check-gmp:
@: $(MAKE); $(unstage)
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(HOST_EXPORTS) \
+ $(HOST_EXPORTS) $(EXTRA_HOST_EXPORTS) \
(cd $(HOST_SUBDIR)/gmp && \
- $(MAKE) $(FLAGS_TO_PASS) check)
+ $(MAKE) $(FLAGS_TO_PASS) $(EXTRA_BOOTSTRAP_FLAGS) check)
@endif gmp
@@ -10962,7 +11605,7 @@ info-gmp: \
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing info in gmp" ; \
+ echo "Doing info in gmp"; \
(cd $(HOST_SUBDIR)/gmp && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -10987,7 +11630,7 @@ dvi-gmp: \
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing dvi in gmp" ; \
+ echo "Doing dvi in gmp"; \
(cd $(HOST_SUBDIR)/gmp && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -11012,7 +11655,7 @@ pdf-gmp: \
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing pdf in gmp" ; \
+ echo "Doing pdf in gmp"; \
(cd $(HOST_SUBDIR)/gmp && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -11037,7 +11680,7 @@ html-gmp: \
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing html in gmp" ; \
+ echo "Doing html in gmp"; \
(cd $(HOST_SUBDIR)/gmp && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -11062,7 +11705,7 @@ TAGS-gmp: \
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing TAGS in gmp" ; \
+ echo "Doing TAGS in gmp"; \
(cd $(HOST_SUBDIR)/gmp && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -11088,7 +11731,7 @@ install-info-gmp: \
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing install-info in gmp" ; \
+ echo "Doing install-info in gmp"; \
(cd $(HOST_SUBDIR)/gmp && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -11114,7 +11757,7 @@ install-pdf-gmp: \
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing install-pdf in gmp" ; \
+ echo "Doing install-pdf in gmp"; \
(cd $(HOST_SUBDIR)/gmp && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -11140,7 +11783,7 @@ install-html-gmp: \
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing install-html in gmp" ; \
+ echo "Doing install-html in gmp"; \
(cd $(HOST_SUBDIR)/gmp && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -11165,7 +11808,7 @@ installcheck-gmp: \
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing installcheck in gmp" ; \
+ echo "Doing installcheck in gmp"; \
(cd $(HOST_SUBDIR)/gmp && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -11189,7 +11832,7 @@ mostlyclean-gmp:
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing mostlyclean in gmp" ; \
+ echo "Doing mostlyclean in gmp"; \
(cd $(HOST_SUBDIR)/gmp && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -11213,7 +11856,7 @@ clean-gmp:
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing clean in gmp" ; \
+ echo "Doing clean in gmp"; \
(cd $(HOST_SUBDIR)/gmp && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -11237,7 +11880,7 @@ distclean-gmp:
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing distclean in gmp" ; \
+ echo "Doing distclean in gmp"; \
(cd $(HOST_SUBDIR)/gmp && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -11261,7 +11904,7 @@ maintainer-clean-gmp:
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing maintainer-clean in gmp" ; \
+ echo "Doing maintainer-clean in gmp"; \
(cd $(HOST_SUBDIR)/gmp && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -11285,7 +11928,7 @@ configure-mpfr:
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
test ! -f $(HOST_SUBDIR)/mpfr/Makefile || exit 0; \
- $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/mpfr ; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/mpfr; \
$(HOST_EXPORTS) \
echo Configuring in $(HOST_SUBDIR)/mpfr; \
cd "$(HOST_SUBDIR)/mpfr" || exit 1; \
@@ -11294,11 +11937,12 @@ configure-mpfr:
*) topdir=`echo $(HOST_SUBDIR)/mpfr/ | \
sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
esac; \
- srcdiroption="--srcdir=$${topdir}/mpfr"; \
- libsrcdir="$$s/mpfr"; \
- $(SHELL) $${libsrcdir}/configure \
+ module_srcdir=mpfr; \
+ $(SHELL) \
+ $$s/$$module_srcdir/configure \
+ --srcdir=$${topdir}/$$module_srcdir \
$(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
- --target=${target_alias} $${srcdiroption} --disable-shared @extra_mpfr_configure_flags@ \
+ --target=${target_alias} --disable-shared @extra_mpfr_configure_flags@ \
|| exit 1
@endif mpfr
@@ -11319,19 +11963,20 @@ configure-stage1-mpfr:
CFLAGS="$(STAGE1_CFLAGS)"; export CFLAGS; \
CXXFLAGS="$(STAGE1_CXXFLAGS)"; export CXXFLAGS; \
LIBCFLAGS="$(LIBCFLAGS)"; export LIBCFLAGS; \
- echo Configuring stage 1 in $(HOST_SUBDIR)/mpfr ; \
- $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/mpfr ; \
+ echo Configuring stage 1 in $(HOST_SUBDIR)/mpfr; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/mpfr; \
cd $(HOST_SUBDIR)/mpfr || exit 1; \
case $(srcdir) in \
/* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
*) topdir=`echo $(HOST_SUBDIR)/mpfr/ | \
sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
esac; \
- srcdiroption="--srcdir=$${topdir}/mpfr"; \
- libsrcdir="$$s/mpfr"; \
- $(SHELL) $${libsrcdir}/configure \
+ module_srcdir=mpfr; \
+ $(SHELL) $$s/$$module_srcdir/configure \
+ --srcdir=$${topdir}/$$module_srcdir \
$(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
- --target=${target_alias} $${srcdiroption} \
+ --target=${target_alias} \
+ \
$(STAGE1_CONFIGURE_FLAGS) \
--disable-shared @extra_mpfr_configure_flags@
@endif mpfr-bootstrap
@@ -11352,19 +11997,19 @@ configure-stage2-mpfr:
CFLAGS="$(STAGE2_CFLAGS)"; export CFLAGS; \
CXXFLAGS="$(STAGE2_CXXFLAGS)"; export CXXFLAGS; \
LIBCFLAGS="$(STAGE2_CFLAGS)"; export LIBCFLAGS; \
- echo Configuring stage 2 in $(HOST_SUBDIR)/mpfr ; \
- $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/mpfr ; \
+ echo Configuring stage 2 in $(HOST_SUBDIR)/mpfr; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/mpfr; \
cd $(HOST_SUBDIR)/mpfr || exit 1; \
case $(srcdir) in \
/* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
*) topdir=`echo $(HOST_SUBDIR)/mpfr/ | \
sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
esac; \
- srcdiroption="--srcdir=$${topdir}/mpfr"; \
- libsrcdir="$$s/mpfr"; \
- $(SHELL) $${libsrcdir}/configure \
+ module_srcdir=mpfr; \
+ $(SHELL) $$s/$$module_srcdir/configure \
+ --srcdir=$${topdir}/$$module_srcdir \
$(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
- --target=${target_alias} $${srcdiroption} \
+ --target=${target_alias} \
--with-build-libsubdir=$(HOST_SUBDIR) \
$(STAGE2_CONFIGURE_FLAGS) \
--disable-shared @extra_mpfr_configure_flags@
@@ -11386,19 +12031,19 @@ configure-stage3-mpfr:
CFLAGS="$(STAGE3_CFLAGS)"; export CFLAGS; \
CXXFLAGS="$(STAGE3_CXXFLAGS)"; export CXXFLAGS; \
LIBCFLAGS="$(STAGE3_CFLAGS)"; export LIBCFLAGS; \
- echo Configuring stage 3 in $(HOST_SUBDIR)/mpfr ; \
- $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/mpfr ; \
+ echo Configuring stage 3 in $(HOST_SUBDIR)/mpfr; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/mpfr; \
cd $(HOST_SUBDIR)/mpfr || exit 1; \
case $(srcdir) in \
/* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
*) topdir=`echo $(HOST_SUBDIR)/mpfr/ | \
sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
esac; \
- srcdiroption="--srcdir=$${topdir}/mpfr"; \
- libsrcdir="$$s/mpfr"; \
- $(SHELL) $${libsrcdir}/configure \
+ module_srcdir=mpfr; \
+ $(SHELL) $$s/$$module_srcdir/configure \
+ --srcdir=$${topdir}/$$module_srcdir \
$(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
- --target=${target_alias} $${srcdiroption} \
+ --target=${target_alias} \
--with-build-libsubdir=$(HOST_SUBDIR) \
$(STAGE3_CONFIGURE_FLAGS) \
--disable-shared @extra_mpfr_configure_flags@
@@ -11420,19 +12065,19 @@ configure-stage4-mpfr:
CFLAGS="$(STAGE4_CFLAGS)"; export CFLAGS; \
CXXFLAGS="$(STAGE4_CXXFLAGS)"; export CXXFLAGS; \
LIBCFLAGS="$(STAGE4_CFLAGS)"; export LIBCFLAGS; \
- echo Configuring stage 4 in $(HOST_SUBDIR)/mpfr ; \
- $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/mpfr ; \
+ echo Configuring stage 4 in $(HOST_SUBDIR)/mpfr; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/mpfr; \
cd $(HOST_SUBDIR)/mpfr || exit 1; \
case $(srcdir) in \
/* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
*) topdir=`echo $(HOST_SUBDIR)/mpfr/ | \
sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
esac; \
- srcdiroption="--srcdir=$${topdir}/mpfr"; \
- libsrcdir="$$s/mpfr"; \
- $(SHELL) $${libsrcdir}/configure \
+ module_srcdir=mpfr; \
+ $(SHELL) $$s/$$module_srcdir/configure \
+ --srcdir=$${topdir}/$$module_srcdir \
$(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
- --target=${target_alias} $${srcdiroption} \
+ --target=${target_alias} \
--with-build-libsubdir=$(HOST_SUBDIR) \
$(STAGE4_CONFIGURE_FLAGS) \
--disable-shared @extra_mpfr_configure_flags@
@@ -11454,19 +12099,19 @@ configure-stageprofile-mpfr:
CFLAGS="$(STAGEprofile_CFLAGS)"; export CFLAGS; \
CXXFLAGS="$(STAGEprofile_CXXFLAGS)"; export CXXFLAGS; \
LIBCFLAGS="$(STAGEprofile_CFLAGS)"; export LIBCFLAGS; \
- echo Configuring stage profile in $(HOST_SUBDIR)/mpfr ; \
- $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/mpfr ; \
+ echo Configuring stage profile in $(HOST_SUBDIR)/mpfr; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/mpfr; \
cd $(HOST_SUBDIR)/mpfr || exit 1; \
case $(srcdir) in \
/* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
*) topdir=`echo $(HOST_SUBDIR)/mpfr/ | \
sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
esac; \
- srcdiroption="--srcdir=$${topdir}/mpfr"; \
- libsrcdir="$$s/mpfr"; \
- $(SHELL) $${libsrcdir}/configure \
+ module_srcdir=mpfr; \
+ $(SHELL) $$s/$$module_srcdir/configure \
+ --srcdir=$${topdir}/$$module_srcdir \
$(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
- --target=${target_alias} $${srcdiroption} \
+ --target=${target_alias} \
--with-build-libsubdir=$(HOST_SUBDIR) \
$(STAGEprofile_CONFIGURE_FLAGS) \
--disable-shared @extra_mpfr_configure_flags@
@@ -11488,19 +12133,19 @@ configure-stagefeedback-mpfr:
CFLAGS="$(STAGEfeedback_CFLAGS)"; export CFLAGS; \
CXXFLAGS="$(STAGEfeedback_CXXFLAGS)"; export CXXFLAGS; \
LIBCFLAGS="$(STAGEfeedback_CFLAGS)"; export LIBCFLAGS; \
- echo Configuring stage feedback in $(HOST_SUBDIR)/mpfr ; \
- $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/mpfr ; \
+ echo Configuring stage feedback in $(HOST_SUBDIR)/mpfr; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/mpfr; \
cd $(HOST_SUBDIR)/mpfr || exit 1; \
case $(srcdir) in \
/* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
*) topdir=`echo $(HOST_SUBDIR)/mpfr/ | \
sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
esac; \
- srcdiroption="--srcdir=$${topdir}/mpfr"; \
- libsrcdir="$$s/mpfr"; \
- $(SHELL) $${libsrcdir}/configure \
+ module_srcdir=mpfr; \
+ $(SHELL) $$s/$$module_srcdir/configure \
+ --srcdir=$${topdir}/$$module_srcdir \
$(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
- --target=${target_alias} $${srcdiroption} \
+ --target=${target_alias} \
--with-build-libsubdir=$(HOST_SUBDIR) \
$(STAGEfeedback_CONFIGURE_FLAGS) \
--disable-shared @extra_mpfr_configure_flags@
@@ -11523,7 +12168,7 @@ all-mpfr: configure-mpfr
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(HOST_EXPORTS) \
(cd $(HOST_SUBDIR)/mpfr && \
- $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS) $(STAGE1_FLAGS_TO_PASS) \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS) $(STAGE1_FLAGS_TO_PASS) AM_CFLAGS="-DNO_ASM" \
$(TARGET-mpfr))
@endif mpfr
@@ -11552,7 +12197,7 @@ all-stage1-mpfr: configure-stage1-mpfr
CXXFLAGS_FOR_TARGET="$(CXXFLAGS_FOR_TARGET)" \
LIBCFLAGS_FOR_TARGET="$(LIBCFLAGS_FOR_TARGET)" \
$(EXTRA_HOST_FLAGS) \
- $(STAGE1_FLAGS_TO_PASS) \
+ $(STAGE1_FLAGS_TO_PASS) AM_CFLAGS="-DNO_ASM" \
TFLAGS="$(STAGE1_TFLAGS)" \
$(TARGET-stage1-mpfr)
@@ -11567,7 +12212,7 @@ clean-stage1-mpfr:
fi; \
cd $(HOST_SUBDIR)/mpfr && \
$(MAKE) $(EXTRA_HOST_FLAGS) \
- $(STAGE1_FLAGS_TO_PASS) clean
+ $(STAGE1_FLAGS_TO_PASS) AM_CFLAGS="-DNO_ASM" clean
@endif mpfr-bootstrap
@@ -11594,7 +12239,7 @@ all-stage2-mpfr: configure-stage2-mpfr
CFLAGS_FOR_TARGET="$(CFLAGS_FOR_TARGET)" \
CXXFLAGS_FOR_TARGET="$(CXXFLAGS_FOR_TARGET)" \
LIBCFLAGS_FOR_TARGET="$(LIBCFLAGS_FOR_TARGET)" \
- $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) \
+ $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) AM_CFLAGS="-DNO_ASM" \
TFLAGS="$(STAGE2_TFLAGS)" \
$(TARGET-stage2-mpfr)
@@ -11608,7 +12253,7 @@ clean-stage2-mpfr:
$(MAKE) stage2-start; \
fi; \
cd $(HOST_SUBDIR)/mpfr && \
- $(MAKE) $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) clean
+ $(MAKE) $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) AM_CFLAGS="-DNO_ASM" clean
@endif mpfr-bootstrap
@@ -11635,7 +12280,7 @@ all-stage3-mpfr: configure-stage3-mpfr
CFLAGS_FOR_TARGET="$(CFLAGS_FOR_TARGET)" \
CXXFLAGS_FOR_TARGET="$(CXXFLAGS_FOR_TARGET)" \
LIBCFLAGS_FOR_TARGET="$(LIBCFLAGS_FOR_TARGET)" \
- $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) \
+ $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) AM_CFLAGS="-DNO_ASM" \
TFLAGS="$(STAGE3_TFLAGS)" \
$(TARGET-stage3-mpfr)
@@ -11649,7 +12294,7 @@ clean-stage3-mpfr:
$(MAKE) stage3-start; \
fi; \
cd $(HOST_SUBDIR)/mpfr && \
- $(MAKE) $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) clean
+ $(MAKE) $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) AM_CFLAGS="-DNO_ASM" clean
@endif mpfr-bootstrap
@@ -11676,7 +12321,7 @@ all-stage4-mpfr: configure-stage4-mpfr
CFLAGS_FOR_TARGET="$(CFLAGS_FOR_TARGET)" \
CXXFLAGS_FOR_TARGET="$(CXXFLAGS_FOR_TARGET)" \
LIBCFLAGS_FOR_TARGET="$(LIBCFLAGS_FOR_TARGET)" \
- $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) \
+ $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) AM_CFLAGS="-DNO_ASM" \
TFLAGS="$(STAGE4_TFLAGS)" \
$(TARGET-stage4-mpfr)
@@ -11690,7 +12335,7 @@ clean-stage4-mpfr:
$(MAKE) stage4-start; \
fi; \
cd $(HOST_SUBDIR)/mpfr && \
- $(MAKE) $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) clean
+ $(MAKE) $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) AM_CFLAGS="-DNO_ASM" clean
@endif mpfr-bootstrap
@@ -11717,7 +12362,7 @@ all-stageprofile-mpfr: configure-stageprofile-mpfr
CFLAGS_FOR_TARGET="$(CFLAGS_FOR_TARGET)" \
CXXFLAGS_FOR_TARGET="$(CXXFLAGS_FOR_TARGET)" \
LIBCFLAGS_FOR_TARGET="$(LIBCFLAGS_FOR_TARGET)" \
- $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) \
+ $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) AM_CFLAGS="-DNO_ASM" \
TFLAGS="$(STAGEprofile_TFLAGS)" \
$(TARGET-stageprofile-mpfr)
@@ -11731,7 +12376,7 @@ clean-stageprofile-mpfr:
$(MAKE) stageprofile-start; \
fi; \
cd $(HOST_SUBDIR)/mpfr && \
- $(MAKE) $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) clean
+ $(MAKE) $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) AM_CFLAGS="-DNO_ASM" clean
@endif mpfr-bootstrap
@@ -11758,7 +12403,7 @@ all-stagefeedback-mpfr: configure-stagefeedback-mpfr
CFLAGS_FOR_TARGET="$(CFLAGS_FOR_TARGET)" \
CXXFLAGS_FOR_TARGET="$(CXXFLAGS_FOR_TARGET)" \
LIBCFLAGS_FOR_TARGET="$(LIBCFLAGS_FOR_TARGET)" \
- $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) \
+ $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) AM_CFLAGS="-DNO_ASM" \
TFLAGS="$(STAGEfeedback_TFLAGS)" \
$(TARGET-stagefeedback-mpfr)
@@ -11772,7 +12417,7 @@ clean-stagefeedback-mpfr:
$(MAKE) stagefeedback-start; \
fi; \
cd $(HOST_SUBDIR)/mpfr && \
- $(MAKE) $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) clean
+ $(MAKE) $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) AM_CFLAGS="-DNO_ASM" clean
@endif mpfr-bootstrap
@@ -11788,9 +12433,9 @@ check-mpfr:
@: $(MAKE); $(unstage)
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(HOST_EXPORTS) \
+ $(HOST_EXPORTS) $(EXTRA_HOST_EXPORTS) \
(cd $(HOST_SUBDIR)/mpfr && \
- $(MAKE) $(FLAGS_TO_PASS) check)
+ $(MAKE) $(FLAGS_TO_PASS) AM_CFLAGS="-DNO_ASM" $(EXTRA_BOOTSTRAP_FLAGS) check)
@endif mpfr
@@ -11825,10 +12470,10 @@ info-mpfr: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(HOST_EXPORTS) \
- for flag in $(EXTRA_HOST_FLAGS) ; do \
+ for flag in $(EXTRA_HOST_FLAGS) AM_CFLAGS="-DNO_ASM"; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing info in mpfr" ; \
+ echo "Doing info in mpfr"; \
(cd $(HOST_SUBDIR)/mpfr && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -11850,10 +12495,10 @@ dvi-mpfr: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(HOST_EXPORTS) \
- for flag in $(EXTRA_HOST_FLAGS) ; do \
+ for flag in $(EXTRA_HOST_FLAGS) AM_CFLAGS="-DNO_ASM"; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing dvi in mpfr" ; \
+ echo "Doing dvi in mpfr"; \
(cd $(HOST_SUBDIR)/mpfr && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -11875,10 +12520,10 @@ pdf-mpfr: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(HOST_EXPORTS) \
- for flag in $(EXTRA_HOST_FLAGS) ; do \
+ for flag in $(EXTRA_HOST_FLAGS) AM_CFLAGS="-DNO_ASM"; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing pdf in mpfr" ; \
+ echo "Doing pdf in mpfr"; \
(cd $(HOST_SUBDIR)/mpfr && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -11900,10 +12545,10 @@ html-mpfr: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(HOST_EXPORTS) \
- for flag in $(EXTRA_HOST_FLAGS) ; do \
+ for flag in $(EXTRA_HOST_FLAGS) AM_CFLAGS="-DNO_ASM"; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing html in mpfr" ; \
+ echo "Doing html in mpfr"; \
(cd $(HOST_SUBDIR)/mpfr && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -11925,10 +12570,10 @@ TAGS-mpfr: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(HOST_EXPORTS) \
- for flag in $(EXTRA_HOST_FLAGS) ; do \
+ for flag in $(EXTRA_HOST_FLAGS) AM_CFLAGS="-DNO_ASM"; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing TAGS in mpfr" ; \
+ echo "Doing TAGS in mpfr"; \
(cd $(HOST_SUBDIR)/mpfr && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -11951,10 +12596,10 @@ install-info-mpfr: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(HOST_EXPORTS) \
- for flag in $(EXTRA_HOST_FLAGS) ; do \
+ for flag in $(EXTRA_HOST_FLAGS) AM_CFLAGS="-DNO_ASM"; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing install-info in mpfr" ; \
+ echo "Doing install-info in mpfr"; \
(cd $(HOST_SUBDIR)/mpfr && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -11977,10 +12622,10 @@ install-pdf-mpfr: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(HOST_EXPORTS) \
- for flag in $(EXTRA_HOST_FLAGS) ; do \
+ for flag in $(EXTRA_HOST_FLAGS) AM_CFLAGS="-DNO_ASM"; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing install-pdf in mpfr" ; \
+ echo "Doing install-pdf in mpfr"; \
(cd $(HOST_SUBDIR)/mpfr && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -12003,10 +12648,10 @@ install-html-mpfr: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(HOST_EXPORTS) \
- for flag in $(EXTRA_HOST_FLAGS) ; do \
+ for flag in $(EXTRA_HOST_FLAGS) AM_CFLAGS="-DNO_ASM"; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing install-html in mpfr" ; \
+ echo "Doing install-html in mpfr"; \
(cd $(HOST_SUBDIR)/mpfr && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -12028,10 +12673,10 @@ installcheck-mpfr: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(HOST_EXPORTS) \
- for flag in $(EXTRA_HOST_FLAGS) ; do \
+ for flag in $(EXTRA_HOST_FLAGS) AM_CFLAGS="-DNO_ASM"; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing installcheck in mpfr" ; \
+ echo "Doing installcheck in mpfr"; \
(cd $(HOST_SUBDIR)/mpfr && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -12052,10 +12697,10 @@ mostlyclean-mpfr:
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(HOST_EXPORTS) \
- for flag in $(EXTRA_HOST_FLAGS) ; do \
+ for flag in $(EXTRA_HOST_FLAGS) AM_CFLAGS="-DNO_ASM"; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing mostlyclean in mpfr" ; \
+ echo "Doing mostlyclean in mpfr"; \
(cd $(HOST_SUBDIR)/mpfr && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -12076,10 +12721,10 @@ clean-mpfr:
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(HOST_EXPORTS) \
- for flag in $(EXTRA_HOST_FLAGS) ; do \
+ for flag in $(EXTRA_HOST_FLAGS) AM_CFLAGS="-DNO_ASM"; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing clean in mpfr" ; \
+ echo "Doing clean in mpfr"; \
(cd $(HOST_SUBDIR)/mpfr && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -12100,10 +12745,10 @@ distclean-mpfr:
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(HOST_EXPORTS) \
- for flag in $(EXTRA_HOST_FLAGS) ; do \
+ for flag in $(EXTRA_HOST_FLAGS) AM_CFLAGS="-DNO_ASM"; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing distclean in mpfr" ; \
+ echo "Doing distclean in mpfr"; \
(cd $(HOST_SUBDIR)/mpfr && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -12124,10 +12769,10 @@ maintainer-clean-mpfr:
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(HOST_EXPORTS) \
- for flag in $(EXTRA_HOST_FLAGS) ; do \
+ for flag in $(EXTRA_HOST_FLAGS) AM_CFLAGS="-DNO_ASM"; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing maintainer-clean in mpfr" ; \
+ echo "Doing maintainer-clean in mpfr"; \
(cd $(HOST_SUBDIR)/mpfr && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -12151,7 +12796,7 @@ configure-mpc:
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
test ! -f $(HOST_SUBDIR)/mpc/Makefile || exit 0; \
- $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/mpc ; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/mpc; \
$(HOST_EXPORTS) \
echo Configuring in $(HOST_SUBDIR)/mpc; \
cd "$(HOST_SUBDIR)/mpc" || exit 1; \
@@ -12160,11 +12805,12 @@ configure-mpc:
*) topdir=`echo $(HOST_SUBDIR)/mpc/ | \
sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
esac; \
- srcdiroption="--srcdir=$${topdir}/mpc"; \
- libsrcdir="$$s/mpc"; \
- $(SHELL) $${libsrcdir}/configure \
+ module_srcdir=mpc; \
+ $(SHELL) \
+ $$s/$$module_srcdir/configure \
+ --srcdir=$${topdir}/$$module_srcdir \
$(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
- --target=${target_alias} $${srcdiroption} --disable-shared @extra_mpc_gmp_configure_flags@ @extra_mpc_mpfr_configure_flags@ \
+ --target=${target_alias} --disable-shared @extra_mpc_gmp_configure_flags@ @extra_mpc_mpfr_configure_flags@ \
|| exit 1
@endif mpc
@@ -12185,19 +12831,20 @@ configure-stage1-mpc:
CFLAGS="$(STAGE1_CFLAGS)"; export CFLAGS; \
CXXFLAGS="$(STAGE1_CXXFLAGS)"; export CXXFLAGS; \
LIBCFLAGS="$(LIBCFLAGS)"; export LIBCFLAGS; \
- echo Configuring stage 1 in $(HOST_SUBDIR)/mpc ; \
- $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/mpc ; \
+ echo Configuring stage 1 in $(HOST_SUBDIR)/mpc; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/mpc; \
cd $(HOST_SUBDIR)/mpc || exit 1; \
case $(srcdir) in \
/* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
*) topdir=`echo $(HOST_SUBDIR)/mpc/ | \
sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
esac; \
- srcdiroption="--srcdir=$${topdir}/mpc"; \
- libsrcdir="$$s/mpc"; \
- $(SHELL) $${libsrcdir}/configure \
+ module_srcdir=mpc; \
+ $(SHELL) $$s/$$module_srcdir/configure \
+ --srcdir=$${topdir}/$$module_srcdir \
$(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
- --target=${target_alias} $${srcdiroption} \
+ --target=${target_alias} \
+ \
$(STAGE1_CONFIGURE_FLAGS) \
--disable-shared @extra_mpc_gmp_configure_flags@ @extra_mpc_mpfr_configure_flags@
@endif mpc-bootstrap
@@ -12218,19 +12865,19 @@ configure-stage2-mpc:
CFLAGS="$(STAGE2_CFLAGS)"; export CFLAGS; \
CXXFLAGS="$(STAGE2_CXXFLAGS)"; export CXXFLAGS; \
LIBCFLAGS="$(STAGE2_CFLAGS)"; export LIBCFLAGS; \
- echo Configuring stage 2 in $(HOST_SUBDIR)/mpc ; \
- $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/mpc ; \
+ echo Configuring stage 2 in $(HOST_SUBDIR)/mpc; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/mpc; \
cd $(HOST_SUBDIR)/mpc || exit 1; \
case $(srcdir) in \
/* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
*) topdir=`echo $(HOST_SUBDIR)/mpc/ | \
sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
esac; \
- srcdiroption="--srcdir=$${topdir}/mpc"; \
- libsrcdir="$$s/mpc"; \
- $(SHELL) $${libsrcdir}/configure \
+ module_srcdir=mpc; \
+ $(SHELL) $$s/$$module_srcdir/configure \
+ --srcdir=$${topdir}/$$module_srcdir \
$(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
- --target=${target_alias} $${srcdiroption} \
+ --target=${target_alias} \
--with-build-libsubdir=$(HOST_SUBDIR) \
$(STAGE2_CONFIGURE_FLAGS) \
--disable-shared @extra_mpc_gmp_configure_flags@ @extra_mpc_mpfr_configure_flags@
@@ -12252,19 +12899,19 @@ configure-stage3-mpc:
CFLAGS="$(STAGE3_CFLAGS)"; export CFLAGS; \
CXXFLAGS="$(STAGE3_CXXFLAGS)"; export CXXFLAGS; \
LIBCFLAGS="$(STAGE3_CFLAGS)"; export LIBCFLAGS; \
- echo Configuring stage 3 in $(HOST_SUBDIR)/mpc ; \
- $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/mpc ; \
+ echo Configuring stage 3 in $(HOST_SUBDIR)/mpc; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/mpc; \
cd $(HOST_SUBDIR)/mpc || exit 1; \
case $(srcdir) in \
/* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
*) topdir=`echo $(HOST_SUBDIR)/mpc/ | \
sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
esac; \
- srcdiroption="--srcdir=$${topdir}/mpc"; \
- libsrcdir="$$s/mpc"; \
- $(SHELL) $${libsrcdir}/configure \
+ module_srcdir=mpc; \
+ $(SHELL) $$s/$$module_srcdir/configure \
+ --srcdir=$${topdir}/$$module_srcdir \
$(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
- --target=${target_alias} $${srcdiroption} \
+ --target=${target_alias} \
--with-build-libsubdir=$(HOST_SUBDIR) \
$(STAGE3_CONFIGURE_FLAGS) \
--disable-shared @extra_mpc_gmp_configure_flags@ @extra_mpc_mpfr_configure_flags@
@@ -12286,19 +12933,19 @@ configure-stage4-mpc:
CFLAGS="$(STAGE4_CFLAGS)"; export CFLAGS; \
CXXFLAGS="$(STAGE4_CXXFLAGS)"; export CXXFLAGS; \
LIBCFLAGS="$(STAGE4_CFLAGS)"; export LIBCFLAGS; \
- echo Configuring stage 4 in $(HOST_SUBDIR)/mpc ; \
- $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/mpc ; \
+ echo Configuring stage 4 in $(HOST_SUBDIR)/mpc; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/mpc; \
cd $(HOST_SUBDIR)/mpc || exit 1; \
case $(srcdir) in \
/* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
*) topdir=`echo $(HOST_SUBDIR)/mpc/ | \
sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
esac; \
- srcdiroption="--srcdir=$${topdir}/mpc"; \
- libsrcdir="$$s/mpc"; \
- $(SHELL) $${libsrcdir}/configure \
+ module_srcdir=mpc; \
+ $(SHELL) $$s/$$module_srcdir/configure \
+ --srcdir=$${topdir}/$$module_srcdir \
$(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
- --target=${target_alias} $${srcdiroption} \
+ --target=${target_alias} \
--with-build-libsubdir=$(HOST_SUBDIR) \
$(STAGE4_CONFIGURE_FLAGS) \
--disable-shared @extra_mpc_gmp_configure_flags@ @extra_mpc_mpfr_configure_flags@
@@ -12320,19 +12967,19 @@ configure-stageprofile-mpc:
CFLAGS="$(STAGEprofile_CFLAGS)"; export CFLAGS; \
CXXFLAGS="$(STAGEprofile_CXXFLAGS)"; export CXXFLAGS; \
LIBCFLAGS="$(STAGEprofile_CFLAGS)"; export LIBCFLAGS; \
- echo Configuring stage profile in $(HOST_SUBDIR)/mpc ; \
- $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/mpc ; \
+ echo Configuring stage profile in $(HOST_SUBDIR)/mpc; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/mpc; \
cd $(HOST_SUBDIR)/mpc || exit 1; \
case $(srcdir) in \
/* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
*) topdir=`echo $(HOST_SUBDIR)/mpc/ | \
sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
esac; \
- srcdiroption="--srcdir=$${topdir}/mpc"; \
- libsrcdir="$$s/mpc"; \
- $(SHELL) $${libsrcdir}/configure \
+ module_srcdir=mpc; \
+ $(SHELL) $$s/$$module_srcdir/configure \
+ --srcdir=$${topdir}/$$module_srcdir \
$(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
- --target=${target_alias} $${srcdiroption} \
+ --target=${target_alias} \
--with-build-libsubdir=$(HOST_SUBDIR) \
$(STAGEprofile_CONFIGURE_FLAGS) \
--disable-shared @extra_mpc_gmp_configure_flags@ @extra_mpc_mpfr_configure_flags@
@@ -12354,19 +13001,19 @@ configure-stagefeedback-mpc:
CFLAGS="$(STAGEfeedback_CFLAGS)"; export CFLAGS; \
CXXFLAGS="$(STAGEfeedback_CXXFLAGS)"; export CXXFLAGS; \
LIBCFLAGS="$(STAGEfeedback_CFLAGS)"; export LIBCFLAGS; \
- echo Configuring stage feedback in $(HOST_SUBDIR)/mpc ; \
- $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/mpc ; \
+ echo Configuring stage feedback in $(HOST_SUBDIR)/mpc; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/mpc; \
cd $(HOST_SUBDIR)/mpc || exit 1; \
case $(srcdir) in \
/* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
*) topdir=`echo $(HOST_SUBDIR)/mpc/ | \
sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
esac; \
- srcdiroption="--srcdir=$${topdir}/mpc"; \
- libsrcdir="$$s/mpc"; \
- $(SHELL) $${libsrcdir}/configure \
+ module_srcdir=mpc; \
+ $(SHELL) $$s/$$module_srcdir/configure \
+ --srcdir=$${topdir}/$$module_srcdir \
$(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
- --target=${target_alias} $${srcdiroption} \
+ --target=${target_alias} \
--with-build-libsubdir=$(HOST_SUBDIR) \
$(STAGEfeedback_CONFIGURE_FLAGS) \
--disable-shared @extra_mpc_gmp_configure_flags@ @extra_mpc_mpfr_configure_flags@
@@ -12654,9 +13301,9 @@ check-mpc:
@: $(MAKE); $(unstage)
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(HOST_EXPORTS) \
+ $(HOST_EXPORTS) $(EXTRA_HOST_EXPORTS) \
(cd $(HOST_SUBDIR)/mpc && \
- $(MAKE) $(FLAGS_TO_PASS) check)
+ $(MAKE) $(FLAGS_TO_PASS) $(EXTRA_BOOTSTRAP_FLAGS) check)
@endif mpc
@@ -12694,7 +13341,7 @@ info-mpc: \
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing info in mpc" ; \
+ echo "Doing info in mpc"; \
(cd $(HOST_SUBDIR)/mpc && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -12719,7 +13366,7 @@ dvi-mpc: \
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing dvi in mpc" ; \
+ echo "Doing dvi in mpc"; \
(cd $(HOST_SUBDIR)/mpc && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -12744,7 +13391,7 @@ pdf-mpc: \
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing pdf in mpc" ; \
+ echo "Doing pdf in mpc"; \
(cd $(HOST_SUBDIR)/mpc && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -12769,7 +13416,7 @@ html-mpc: \
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing html in mpc" ; \
+ echo "Doing html in mpc"; \
(cd $(HOST_SUBDIR)/mpc && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -12794,7 +13441,7 @@ TAGS-mpc: \
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing TAGS in mpc" ; \
+ echo "Doing TAGS in mpc"; \
(cd $(HOST_SUBDIR)/mpc && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -12820,7 +13467,7 @@ install-info-mpc: \
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing install-info in mpc" ; \
+ echo "Doing install-info in mpc"; \
(cd $(HOST_SUBDIR)/mpc && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -12846,7 +13493,7 @@ install-pdf-mpc: \
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing install-pdf in mpc" ; \
+ echo "Doing install-pdf in mpc"; \
(cd $(HOST_SUBDIR)/mpc && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -12872,7 +13519,7 @@ install-html-mpc: \
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing install-html in mpc" ; \
+ echo "Doing install-html in mpc"; \
(cd $(HOST_SUBDIR)/mpc && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -12897,7 +13544,7 @@ installcheck-mpc: \
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing installcheck in mpc" ; \
+ echo "Doing installcheck in mpc"; \
(cd $(HOST_SUBDIR)/mpc && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -12921,7 +13568,7 @@ mostlyclean-mpc:
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing mostlyclean in mpc" ; \
+ echo "Doing mostlyclean in mpc"; \
(cd $(HOST_SUBDIR)/mpc && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -12945,7 +13592,7 @@ clean-mpc:
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing clean in mpc" ; \
+ echo "Doing clean in mpc"; \
(cd $(HOST_SUBDIR)/mpc && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -12969,7 +13616,7 @@ distclean-mpc:
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing distclean in mpc" ; \
+ echo "Doing distclean in mpc"; \
(cd $(HOST_SUBDIR)/mpc && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -12993,7 +13640,7 @@ maintainer-clean-mpc:
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing maintainer-clean in mpc" ; \
+ echo "Doing maintainer-clean in mpc"; \
(cd $(HOST_SUBDIR)/mpc && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -13017,7 +13664,7 @@ configure-isl:
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
test ! -f $(HOST_SUBDIR)/isl/Makefile || exit 0; \
- $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/isl ; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/isl; \
$(HOST_EXPORTS) \
echo Configuring in $(HOST_SUBDIR)/isl; \
cd "$(HOST_SUBDIR)/isl" || exit 1; \
@@ -13026,11 +13673,12 @@ configure-isl:
*) topdir=`echo $(HOST_SUBDIR)/isl/ | \
sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
esac; \
- srcdiroption="--srcdir=$${topdir}/isl"; \
- libsrcdir="$$s/isl"; \
- $(SHELL) $${libsrcdir}/configure \
+ module_srcdir=isl; \
+ $(SHELL) \
+ $$s/$$module_srcdir/configure \
+ --srcdir=$${topdir}/$$module_srcdir \
$(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
- --target=${target_alias} $${srcdiroption} --disable-shared @extra_isl_gmp_configure_flags@ \
+ --target=${target_alias} --disable-shared @extra_isl_gmp_configure_flags@ \
|| exit 1
@endif isl
@@ -13051,19 +13699,20 @@ configure-stage1-isl:
CFLAGS="$(STAGE1_CFLAGS)"; export CFLAGS; \
CXXFLAGS="$(STAGE1_CXXFLAGS)"; export CXXFLAGS; \
LIBCFLAGS="$(LIBCFLAGS)"; export LIBCFLAGS; \
- echo Configuring stage 1 in $(HOST_SUBDIR)/isl ; \
- $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/isl ; \
+ echo Configuring stage 1 in $(HOST_SUBDIR)/isl; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/isl; \
cd $(HOST_SUBDIR)/isl || exit 1; \
case $(srcdir) in \
/* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
*) topdir=`echo $(HOST_SUBDIR)/isl/ | \
sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
esac; \
- srcdiroption="--srcdir=$${topdir}/isl"; \
- libsrcdir="$$s/isl"; \
- $(SHELL) $${libsrcdir}/configure \
+ module_srcdir=isl; \
+ $(SHELL) $$s/$$module_srcdir/configure \
+ --srcdir=$${topdir}/$$module_srcdir \
$(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
- --target=${target_alias} $${srcdiroption} \
+ --target=${target_alias} \
+ \
$(STAGE1_CONFIGURE_FLAGS) \
--disable-shared @extra_isl_gmp_configure_flags@
@endif isl-bootstrap
@@ -13084,19 +13733,19 @@ configure-stage2-isl:
CFLAGS="$(STAGE2_CFLAGS)"; export CFLAGS; \
CXXFLAGS="$(STAGE2_CXXFLAGS)"; export CXXFLAGS; \
LIBCFLAGS="$(STAGE2_CFLAGS)"; export LIBCFLAGS; \
- echo Configuring stage 2 in $(HOST_SUBDIR)/isl ; \
- $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/isl ; \
+ echo Configuring stage 2 in $(HOST_SUBDIR)/isl; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/isl; \
cd $(HOST_SUBDIR)/isl || exit 1; \
case $(srcdir) in \
/* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
*) topdir=`echo $(HOST_SUBDIR)/isl/ | \
sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
esac; \
- srcdiroption="--srcdir=$${topdir}/isl"; \
- libsrcdir="$$s/isl"; \
- $(SHELL) $${libsrcdir}/configure \
+ module_srcdir=isl; \
+ $(SHELL) $$s/$$module_srcdir/configure \
+ --srcdir=$${topdir}/$$module_srcdir \
$(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
- --target=${target_alias} $${srcdiroption} \
+ --target=${target_alias} \
--with-build-libsubdir=$(HOST_SUBDIR) \
$(STAGE2_CONFIGURE_FLAGS) \
--disable-shared @extra_isl_gmp_configure_flags@
@@ -13118,19 +13767,19 @@ configure-stage3-isl:
CFLAGS="$(STAGE3_CFLAGS)"; export CFLAGS; \
CXXFLAGS="$(STAGE3_CXXFLAGS)"; export CXXFLAGS; \
LIBCFLAGS="$(STAGE3_CFLAGS)"; export LIBCFLAGS; \
- echo Configuring stage 3 in $(HOST_SUBDIR)/isl ; \
- $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/isl ; \
+ echo Configuring stage 3 in $(HOST_SUBDIR)/isl; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/isl; \
cd $(HOST_SUBDIR)/isl || exit 1; \
case $(srcdir) in \
/* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
*) topdir=`echo $(HOST_SUBDIR)/isl/ | \
sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
esac; \
- srcdiroption="--srcdir=$${topdir}/isl"; \
- libsrcdir="$$s/isl"; \
- $(SHELL) $${libsrcdir}/configure \
+ module_srcdir=isl; \
+ $(SHELL) $$s/$$module_srcdir/configure \
+ --srcdir=$${topdir}/$$module_srcdir \
$(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
- --target=${target_alias} $${srcdiroption} \
+ --target=${target_alias} \
--with-build-libsubdir=$(HOST_SUBDIR) \
$(STAGE3_CONFIGURE_FLAGS) \
--disable-shared @extra_isl_gmp_configure_flags@
@@ -13152,19 +13801,19 @@ configure-stage4-isl:
CFLAGS="$(STAGE4_CFLAGS)"; export CFLAGS; \
CXXFLAGS="$(STAGE4_CXXFLAGS)"; export CXXFLAGS; \
LIBCFLAGS="$(STAGE4_CFLAGS)"; export LIBCFLAGS; \
- echo Configuring stage 4 in $(HOST_SUBDIR)/isl ; \
- $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/isl ; \
+ echo Configuring stage 4 in $(HOST_SUBDIR)/isl; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/isl; \
cd $(HOST_SUBDIR)/isl || exit 1; \
case $(srcdir) in \
/* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
*) topdir=`echo $(HOST_SUBDIR)/isl/ | \
sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
esac; \
- srcdiroption="--srcdir=$${topdir}/isl"; \
- libsrcdir="$$s/isl"; \
- $(SHELL) $${libsrcdir}/configure \
+ module_srcdir=isl; \
+ $(SHELL) $$s/$$module_srcdir/configure \
+ --srcdir=$${topdir}/$$module_srcdir \
$(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
- --target=${target_alias} $${srcdiroption} \
+ --target=${target_alias} \
--with-build-libsubdir=$(HOST_SUBDIR) \
$(STAGE4_CONFIGURE_FLAGS) \
--disable-shared @extra_isl_gmp_configure_flags@
@@ -13186,19 +13835,19 @@ configure-stageprofile-isl:
CFLAGS="$(STAGEprofile_CFLAGS)"; export CFLAGS; \
CXXFLAGS="$(STAGEprofile_CXXFLAGS)"; export CXXFLAGS; \
LIBCFLAGS="$(STAGEprofile_CFLAGS)"; export LIBCFLAGS; \
- echo Configuring stage profile in $(HOST_SUBDIR)/isl ; \
- $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/isl ; \
+ echo Configuring stage profile in $(HOST_SUBDIR)/isl; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/isl; \
cd $(HOST_SUBDIR)/isl || exit 1; \
case $(srcdir) in \
/* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
*) topdir=`echo $(HOST_SUBDIR)/isl/ | \
sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
esac; \
- srcdiroption="--srcdir=$${topdir}/isl"; \
- libsrcdir="$$s/isl"; \
- $(SHELL) $${libsrcdir}/configure \
+ module_srcdir=isl; \
+ $(SHELL) $$s/$$module_srcdir/configure \
+ --srcdir=$${topdir}/$$module_srcdir \
$(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
- --target=${target_alias} $${srcdiroption} \
+ --target=${target_alias} \
--with-build-libsubdir=$(HOST_SUBDIR) \
$(STAGEprofile_CONFIGURE_FLAGS) \
--disable-shared @extra_isl_gmp_configure_flags@
@@ -13220,19 +13869,19 @@ configure-stagefeedback-isl:
CFLAGS="$(STAGEfeedback_CFLAGS)"; export CFLAGS; \
CXXFLAGS="$(STAGEfeedback_CXXFLAGS)"; export CXXFLAGS; \
LIBCFLAGS="$(STAGEfeedback_CFLAGS)"; export LIBCFLAGS; \
- echo Configuring stage feedback in $(HOST_SUBDIR)/isl ; \
- $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/isl ; \
+ echo Configuring stage feedback in $(HOST_SUBDIR)/isl; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/isl; \
cd $(HOST_SUBDIR)/isl || exit 1; \
case $(srcdir) in \
/* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
*) topdir=`echo $(HOST_SUBDIR)/isl/ | \
sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
esac; \
- srcdiroption="--srcdir=$${topdir}/isl"; \
- libsrcdir="$$s/isl"; \
- $(SHELL) $${libsrcdir}/configure \
+ module_srcdir=isl; \
+ $(SHELL) $$s/$$module_srcdir/configure \
+ --srcdir=$${topdir}/$$module_srcdir \
$(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
- --target=${target_alias} $${srcdiroption} \
+ --target=${target_alias} \
--with-build-libsubdir=$(HOST_SUBDIR) \
$(STAGEfeedback_CONFIGURE_FLAGS) \
--disable-shared @extra_isl_gmp_configure_flags@
@@ -13520,9 +14169,9 @@ check-isl:
@: $(MAKE); $(unstage)
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(HOST_EXPORTS) \
+ $(HOST_EXPORTS) $(EXTRA_HOST_EXPORTS) \
(cd $(HOST_SUBDIR)/isl && \
- $(MAKE) $(FLAGS_TO_PASS) V=1 check)
+ $(MAKE) $(FLAGS_TO_PASS) V=1 $(EXTRA_BOOTSTRAP_FLAGS) check)
@endif isl
@@ -13560,7 +14209,7 @@ info-isl: \
for flag in $(EXTRA_HOST_FLAGS) V=1; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing info in isl" ; \
+ echo "Doing info in isl"; \
(cd $(HOST_SUBDIR)/isl && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -13585,7 +14234,7 @@ dvi-isl: \
for flag in $(EXTRA_HOST_FLAGS) V=1; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing dvi in isl" ; \
+ echo "Doing dvi in isl"; \
(cd $(HOST_SUBDIR)/isl && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -13610,7 +14259,7 @@ pdf-isl: \
for flag in $(EXTRA_HOST_FLAGS) V=1; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing pdf in isl" ; \
+ echo "Doing pdf in isl"; \
(cd $(HOST_SUBDIR)/isl && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -13635,7 +14284,7 @@ html-isl: \
for flag in $(EXTRA_HOST_FLAGS) V=1; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing html in isl" ; \
+ echo "Doing html in isl"; \
(cd $(HOST_SUBDIR)/isl && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -13660,7 +14309,7 @@ TAGS-isl: \
for flag in $(EXTRA_HOST_FLAGS) V=1; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing TAGS in isl" ; \
+ echo "Doing TAGS in isl"; \
(cd $(HOST_SUBDIR)/isl && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -13686,7 +14335,7 @@ install-info-isl: \
for flag in $(EXTRA_HOST_FLAGS) V=1; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing install-info in isl" ; \
+ echo "Doing install-info in isl"; \
(cd $(HOST_SUBDIR)/isl && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -13712,7 +14361,7 @@ install-pdf-isl: \
for flag in $(EXTRA_HOST_FLAGS) V=1; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing install-pdf in isl" ; \
+ echo "Doing install-pdf in isl"; \
(cd $(HOST_SUBDIR)/isl && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -13738,7 +14387,7 @@ install-html-isl: \
for flag in $(EXTRA_HOST_FLAGS) V=1; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing install-html in isl" ; \
+ echo "Doing install-html in isl"; \
(cd $(HOST_SUBDIR)/isl && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -13763,7 +14412,7 @@ installcheck-isl: \
for flag in $(EXTRA_HOST_FLAGS) V=1; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing installcheck in isl" ; \
+ echo "Doing installcheck in isl"; \
(cd $(HOST_SUBDIR)/isl && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -13787,7 +14436,7 @@ mostlyclean-isl:
for flag in $(EXTRA_HOST_FLAGS) V=1; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing mostlyclean in isl" ; \
+ echo "Doing mostlyclean in isl"; \
(cd $(HOST_SUBDIR)/isl && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -13811,7 +14460,7 @@ clean-isl:
for flag in $(EXTRA_HOST_FLAGS) V=1; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing clean in isl" ; \
+ echo "Doing clean in isl"; \
(cd $(HOST_SUBDIR)/isl && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -13835,7 +14484,7 @@ distclean-isl:
for flag in $(EXTRA_HOST_FLAGS) V=1; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing distclean in isl" ; \
+ echo "Doing distclean in isl"; \
(cd $(HOST_SUBDIR)/isl && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -13859,7 +14508,7 @@ maintainer-clean-isl:
for flag in $(EXTRA_HOST_FLAGS) V=1; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing maintainer-clean in isl" ; \
+ echo "Doing maintainer-clean in isl"; \
(cd $(HOST_SUBDIR)/isl && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -13872,872 +14521,6 @@ maintainer-clean-isl:
-.PHONY: configure-cloog maybe-configure-cloog
-maybe-configure-cloog:
-@if gcc-bootstrap
-configure-cloog: stage_current
-@endif gcc-bootstrap
-@if cloog
-maybe-configure-cloog: configure-cloog
-configure-cloog:
- @r=`${PWD_COMMAND}`; export r; \
- s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- test ! -f $(HOST_SUBDIR)/cloog/Makefile || exit 0; \
- $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/cloog ; \
- $(HOST_EXPORTS) CPPFLAGS="$(HOST_GMPINC) $(HOST_ISLINC) $$CPPFLAGS"; export CPPFLAGS; LDFLAGS="-L$$r/$(HOST_SUBDIR)/gmp/.libs -L$$r/$(HOST_SUBDIR)/isl/.libs $$LDFLAGS"; export LDFLAGS; \
- echo Configuring in $(HOST_SUBDIR)/cloog; \
- cd "$(HOST_SUBDIR)/cloog" || exit 1; \
- case $(srcdir) in \
- /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
- *) topdir=`echo $(HOST_SUBDIR)/cloog/ | \
- sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
- esac; \
- srcdiroption="--srcdir=$${topdir}/cloog"; \
- libsrcdir="$$s/cloog"; \
- $(SHELL) $${libsrcdir}/configure \
- $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
- --target=${target_alias} $${srcdiroption} --disable-shared --with-gmp=system --with-bits=gmp --with-isl=system \
- || exit 1
-@endif cloog
-
-
-
-.PHONY: configure-stage1-cloog maybe-configure-stage1-cloog
-maybe-configure-stage1-cloog:
-@if cloog-bootstrap
-maybe-configure-stage1-cloog: configure-stage1-cloog
-configure-stage1-cloog:
- @[ $(current_stage) = stage1 ] || $(MAKE) stage1-start
- @$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/cloog
- @r=`${PWD_COMMAND}`; export r; \
- s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- TFLAGS="$(STAGE1_TFLAGS)"; \
- test ! -f $(HOST_SUBDIR)/cloog/Makefile || exit 0; \
- $(HOST_EXPORTS) \
- CFLAGS="$(STAGE1_CFLAGS)"; export CFLAGS; \
- CXXFLAGS="$(STAGE1_CXXFLAGS)"; export CXXFLAGS; \
- LIBCFLAGS="$(LIBCFLAGS)"; export LIBCFLAGS; CPPFLAGS="$(HOST_GMPINC) $(HOST_ISLINC) $$CPPFLAGS"; export CPPFLAGS; LDFLAGS="-L$$r/$(HOST_SUBDIR)/gmp/.libs -L$$r/$(HOST_SUBDIR)/isl/.libs $$LDFLAGS"; export LDFLAGS; \
- echo Configuring stage 1 in $(HOST_SUBDIR)/cloog ; \
- $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/cloog ; \
- cd $(HOST_SUBDIR)/cloog || exit 1; \
- case $(srcdir) in \
- /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
- *) topdir=`echo $(HOST_SUBDIR)/cloog/ | \
- sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
- esac; \
- srcdiroption="--srcdir=$${topdir}/cloog"; \
- libsrcdir="$$s/cloog"; \
- $(SHELL) $${libsrcdir}/configure \
- $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
- --target=${target_alias} $${srcdiroption} \
- $(STAGE1_CONFIGURE_FLAGS) \
- --disable-shared --with-gmp=system --with-bits=gmp --with-isl=system
-@endif cloog-bootstrap
-
-.PHONY: configure-stage2-cloog maybe-configure-stage2-cloog
-maybe-configure-stage2-cloog:
-@if cloog-bootstrap
-maybe-configure-stage2-cloog: configure-stage2-cloog
-configure-stage2-cloog:
- @[ $(current_stage) = stage2 ] || $(MAKE) stage2-start
- @$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/cloog
- @r=`${PWD_COMMAND}`; export r; \
- s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- TFLAGS="$(STAGE2_TFLAGS)"; \
- test ! -f $(HOST_SUBDIR)/cloog/Makefile || exit 0; \
- $(HOST_EXPORTS) \
- $(POSTSTAGE1_HOST_EXPORTS) \
- CFLAGS="$(STAGE2_CFLAGS)"; export CFLAGS; \
- CXXFLAGS="$(STAGE2_CXXFLAGS)"; export CXXFLAGS; \
- LIBCFLAGS="$(STAGE2_CFLAGS)"; export LIBCFLAGS; CPPFLAGS="$(HOST_GMPINC) $(HOST_ISLINC) $$CPPFLAGS"; export CPPFLAGS; LDFLAGS="-L$$r/$(HOST_SUBDIR)/gmp/.libs -L$$r/$(HOST_SUBDIR)/isl/.libs $$LDFLAGS"; export LDFLAGS; \
- echo Configuring stage 2 in $(HOST_SUBDIR)/cloog ; \
- $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/cloog ; \
- cd $(HOST_SUBDIR)/cloog || exit 1; \
- case $(srcdir) in \
- /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
- *) topdir=`echo $(HOST_SUBDIR)/cloog/ | \
- sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
- esac; \
- srcdiroption="--srcdir=$${topdir}/cloog"; \
- libsrcdir="$$s/cloog"; \
- $(SHELL) $${libsrcdir}/configure \
- $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
- --target=${target_alias} $${srcdiroption} \
- --with-build-libsubdir=$(HOST_SUBDIR) \
- $(STAGE2_CONFIGURE_FLAGS) \
- --disable-shared --with-gmp=system --with-bits=gmp --with-isl=system
-@endif cloog-bootstrap
-
-.PHONY: configure-stage3-cloog maybe-configure-stage3-cloog
-maybe-configure-stage3-cloog:
-@if cloog-bootstrap
-maybe-configure-stage3-cloog: configure-stage3-cloog
-configure-stage3-cloog:
- @[ $(current_stage) = stage3 ] || $(MAKE) stage3-start
- @$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/cloog
- @r=`${PWD_COMMAND}`; export r; \
- s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- TFLAGS="$(STAGE3_TFLAGS)"; \
- test ! -f $(HOST_SUBDIR)/cloog/Makefile || exit 0; \
- $(HOST_EXPORTS) \
- $(POSTSTAGE1_HOST_EXPORTS) \
- CFLAGS="$(STAGE3_CFLAGS)"; export CFLAGS; \
- CXXFLAGS="$(STAGE3_CXXFLAGS)"; export CXXFLAGS; \
- LIBCFLAGS="$(STAGE3_CFLAGS)"; export LIBCFLAGS; CPPFLAGS="$(HOST_GMPINC) $(HOST_ISLINC) $$CPPFLAGS"; export CPPFLAGS; LDFLAGS="-L$$r/$(HOST_SUBDIR)/gmp/.libs -L$$r/$(HOST_SUBDIR)/isl/.libs $$LDFLAGS"; export LDFLAGS; \
- echo Configuring stage 3 in $(HOST_SUBDIR)/cloog ; \
- $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/cloog ; \
- cd $(HOST_SUBDIR)/cloog || exit 1; \
- case $(srcdir) in \
- /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
- *) topdir=`echo $(HOST_SUBDIR)/cloog/ | \
- sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
- esac; \
- srcdiroption="--srcdir=$${topdir}/cloog"; \
- libsrcdir="$$s/cloog"; \
- $(SHELL) $${libsrcdir}/configure \
- $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
- --target=${target_alias} $${srcdiroption} \
- --with-build-libsubdir=$(HOST_SUBDIR) \
- $(STAGE3_CONFIGURE_FLAGS) \
- --disable-shared --with-gmp=system --with-bits=gmp --with-isl=system
-@endif cloog-bootstrap
-
-.PHONY: configure-stage4-cloog maybe-configure-stage4-cloog
-maybe-configure-stage4-cloog:
-@if cloog-bootstrap
-maybe-configure-stage4-cloog: configure-stage4-cloog
-configure-stage4-cloog:
- @[ $(current_stage) = stage4 ] || $(MAKE) stage4-start
- @$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/cloog
- @r=`${PWD_COMMAND}`; export r; \
- s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- TFLAGS="$(STAGE4_TFLAGS)"; \
- test ! -f $(HOST_SUBDIR)/cloog/Makefile || exit 0; \
- $(HOST_EXPORTS) \
- $(POSTSTAGE1_HOST_EXPORTS) \
- CFLAGS="$(STAGE4_CFLAGS)"; export CFLAGS; \
- CXXFLAGS="$(STAGE4_CXXFLAGS)"; export CXXFLAGS; \
- LIBCFLAGS="$(STAGE4_CFLAGS)"; export LIBCFLAGS; CPPFLAGS="$(HOST_GMPINC) $(HOST_ISLINC) $$CPPFLAGS"; export CPPFLAGS; LDFLAGS="-L$$r/$(HOST_SUBDIR)/gmp/.libs -L$$r/$(HOST_SUBDIR)/isl/.libs $$LDFLAGS"; export LDFLAGS; \
- echo Configuring stage 4 in $(HOST_SUBDIR)/cloog ; \
- $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/cloog ; \
- cd $(HOST_SUBDIR)/cloog || exit 1; \
- case $(srcdir) in \
- /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
- *) topdir=`echo $(HOST_SUBDIR)/cloog/ | \
- sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
- esac; \
- srcdiroption="--srcdir=$${topdir}/cloog"; \
- libsrcdir="$$s/cloog"; \
- $(SHELL) $${libsrcdir}/configure \
- $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
- --target=${target_alias} $${srcdiroption} \
- --with-build-libsubdir=$(HOST_SUBDIR) \
- $(STAGE4_CONFIGURE_FLAGS) \
- --disable-shared --with-gmp=system --with-bits=gmp --with-isl=system
-@endif cloog-bootstrap
-
-.PHONY: configure-stageprofile-cloog maybe-configure-stageprofile-cloog
-maybe-configure-stageprofile-cloog:
-@if cloog-bootstrap
-maybe-configure-stageprofile-cloog: configure-stageprofile-cloog
-configure-stageprofile-cloog:
- @[ $(current_stage) = stageprofile ] || $(MAKE) stageprofile-start
- @$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/cloog
- @r=`${PWD_COMMAND}`; export r; \
- s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- TFLAGS="$(STAGEprofile_TFLAGS)"; \
- test ! -f $(HOST_SUBDIR)/cloog/Makefile || exit 0; \
- $(HOST_EXPORTS) \
- $(POSTSTAGE1_HOST_EXPORTS) \
- CFLAGS="$(STAGEprofile_CFLAGS)"; export CFLAGS; \
- CXXFLAGS="$(STAGEprofile_CXXFLAGS)"; export CXXFLAGS; \
- LIBCFLAGS="$(STAGEprofile_CFLAGS)"; export LIBCFLAGS; CPPFLAGS="$(HOST_GMPINC) $(HOST_ISLINC) $$CPPFLAGS"; export CPPFLAGS; LDFLAGS="-L$$r/$(HOST_SUBDIR)/gmp/.libs -L$$r/$(HOST_SUBDIR)/isl/.libs $$LDFLAGS"; export LDFLAGS; \
- echo Configuring stage profile in $(HOST_SUBDIR)/cloog ; \
- $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/cloog ; \
- cd $(HOST_SUBDIR)/cloog || exit 1; \
- case $(srcdir) in \
- /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
- *) topdir=`echo $(HOST_SUBDIR)/cloog/ | \
- sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
- esac; \
- srcdiroption="--srcdir=$${topdir}/cloog"; \
- libsrcdir="$$s/cloog"; \
- $(SHELL) $${libsrcdir}/configure \
- $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
- --target=${target_alias} $${srcdiroption} \
- --with-build-libsubdir=$(HOST_SUBDIR) \
- $(STAGEprofile_CONFIGURE_FLAGS) \
- --disable-shared --with-gmp=system --with-bits=gmp --with-isl=system
-@endif cloog-bootstrap
-
-.PHONY: configure-stagefeedback-cloog maybe-configure-stagefeedback-cloog
-maybe-configure-stagefeedback-cloog:
-@if cloog-bootstrap
-maybe-configure-stagefeedback-cloog: configure-stagefeedback-cloog
-configure-stagefeedback-cloog:
- @[ $(current_stage) = stagefeedback ] || $(MAKE) stagefeedback-start
- @$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/cloog
- @r=`${PWD_COMMAND}`; export r; \
- s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- TFLAGS="$(STAGEfeedback_TFLAGS)"; \
- test ! -f $(HOST_SUBDIR)/cloog/Makefile || exit 0; \
- $(HOST_EXPORTS) \
- $(POSTSTAGE1_HOST_EXPORTS) \
- CFLAGS="$(STAGEfeedback_CFLAGS)"; export CFLAGS; \
- CXXFLAGS="$(STAGEfeedback_CXXFLAGS)"; export CXXFLAGS; \
- LIBCFLAGS="$(STAGEfeedback_CFLAGS)"; export LIBCFLAGS; CPPFLAGS="$(HOST_GMPINC) $(HOST_ISLINC) $$CPPFLAGS"; export CPPFLAGS; LDFLAGS="-L$$r/$(HOST_SUBDIR)/gmp/.libs -L$$r/$(HOST_SUBDIR)/isl/.libs $$LDFLAGS"; export LDFLAGS; \
- echo Configuring stage feedback in $(HOST_SUBDIR)/cloog ; \
- $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/cloog ; \
- cd $(HOST_SUBDIR)/cloog || exit 1; \
- case $(srcdir) in \
- /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
- *) topdir=`echo $(HOST_SUBDIR)/cloog/ | \
- sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
- esac; \
- srcdiroption="--srcdir=$${topdir}/cloog"; \
- libsrcdir="$$s/cloog"; \
- $(SHELL) $${libsrcdir}/configure \
- $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
- --target=${target_alias} $${srcdiroption} \
- --with-build-libsubdir=$(HOST_SUBDIR) \
- $(STAGEfeedback_CONFIGURE_FLAGS) \
- --disable-shared --with-gmp=system --with-bits=gmp --with-isl=system
-@endif cloog-bootstrap
-
-
-
-
-
-.PHONY: all-cloog maybe-all-cloog
-maybe-all-cloog:
-@if gcc-bootstrap
-all-cloog: stage_current
-@endif gcc-bootstrap
-@if cloog
-TARGET-cloog=all
-maybe-all-cloog: all-cloog
-all-cloog: configure-cloog
- @r=`${PWD_COMMAND}`; export r; \
- s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(HOST_EXPORTS) CPPFLAGS="$(HOST_GMPINC) $(HOST_ISLINC) $$CPPFLAGS"; export CPPFLAGS; LDFLAGS="-L$$r/$(HOST_SUBDIR)/gmp/.libs -L$$r/$(HOST_SUBDIR)/isl/.libs $$LDFLAGS"; export LDFLAGS; \
- (cd $(HOST_SUBDIR)/cloog && \
- $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS) $(STAGE1_FLAGS_TO_PASS) CPPFLAGS="$$CPPFLAGS" LDFLAGS="$$LDFLAGS" V=1 \
- $(TARGET-cloog))
-@endif cloog
-
-
-
-.PHONY: all-stage1-cloog maybe-all-stage1-cloog
-.PHONY: clean-stage1-cloog maybe-clean-stage1-cloog
-maybe-all-stage1-cloog:
-maybe-clean-stage1-cloog:
-@if cloog-bootstrap
-maybe-all-stage1-cloog: all-stage1-cloog
-all-stage1: all-stage1-cloog
-TARGET-stage1-cloog = $(TARGET-cloog)
-all-stage1-cloog: configure-stage1-cloog
- @[ $(current_stage) = stage1 ] || $(MAKE) stage1-start
- @r=`${PWD_COMMAND}`; export r; \
- s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- TFLAGS="$(STAGE1_TFLAGS)"; \
- $(HOST_EXPORTS) CPPFLAGS="$(HOST_GMPINC) $(HOST_ISLINC) $$CPPFLAGS"; export CPPFLAGS; LDFLAGS="-L$$r/$(HOST_SUBDIR)/gmp/.libs -L$$r/$(HOST_SUBDIR)/isl/.libs $$LDFLAGS"; export LDFLAGS; \
- cd $(HOST_SUBDIR)/cloog && \
- $(MAKE) $(BASE_FLAGS_TO_PASS) \
- CFLAGS="$(STAGE1_CFLAGS)" \
- CXXFLAGS="$(STAGE1_CXXFLAGS)" \
- LIBCFLAGS="$(LIBCFLAGS)" \
- CFLAGS_FOR_TARGET="$(CFLAGS_FOR_TARGET)" \
- CXXFLAGS_FOR_TARGET="$(CXXFLAGS_FOR_TARGET)" \
- LIBCFLAGS_FOR_TARGET="$(LIBCFLAGS_FOR_TARGET)" \
- $(EXTRA_HOST_FLAGS) \
- $(STAGE1_FLAGS_TO_PASS) CPPFLAGS="$$CPPFLAGS" LDFLAGS="$$LDFLAGS" V=1 \
- TFLAGS="$(STAGE1_TFLAGS)" \
- $(TARGET-stage1-cloog)
-
-maybe-clean-stage1-cloog: clean-stage1-cloog
-clean-stage1: clean-stage1-cloog
-clean-stage1-cloog:
- @if [ $(current_stage) = stage1 ]; then \
- [ -f $(HOST_SUBDIR)/cloog/Makefile ] || exit 0; \
- else \
- [ -f $(HOST_SUBDIR)/stage1-cloog/Makefile ] || exit 0; \
- $(MAKE) stage1-start; \
- fi; \
- cd $(HOST_SUBDIR)/cloog && \
- $(MAKE) $(EXTRA_HOST_FLAGS) \
- $(STAGE1_FLAGS_TO_PASS) CPPFLAGS="$$CPPFLAGS" LDFLAGS="$$LDFLAGS" V=1 clean
-@endif cloog-bootstrap
-
-
-.PHONY: all-stage2-cloog maybe-all-stage2-cloog
-.PHONY: clean-stage2-cloog maybe-clean-stage2-cloog
-maybe-all-stage2-cloog:
-maybe-clean-stage2-cloog:
-@if cloog-bootstrap
-maybe-all-stage2-cloog: all-stage2-cloog
-all-stage2: all-stage2-cloog
-TARGET-stage2-cloog = $(TARGET-cloog)
-all-stage2-cloog: configure-stage2-cloog
- @[ $(current_stage) = stage2 ] || $(MAKE) stage2-start
- @r=`${PWD_COMMAND}`; export r; \
- s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- TFLAGS="$(STAGE2_TFLAGS)"; \
- $(HOST_EXPORTS) \
- $(POSTSTAGE1_HOST_EXPORTS) CPPFLAGS="$(HOST_GMPINC) $(HOST_ISLINC) $$CPPFLAGS"; export CPPFLAGS; LDFLAGS="-L$$r/$(HOST_SUBDIR)/gmp/.libs -L$$r/$(HOST_SUBDIR)/isl/.libs $$LDFLAGS"; export LDFLAGS; \
- cd $(HOST_SUBDIR)/cloog && \
- $(MAKE) $(BASE_FLAGS_TO_PASS) \
- CFLAGS="$(STAGE2_CFLAGS)" \
- CXXFLAGS="$(STAGE2_CXXFLAGS)" \
- LIBCFLAGS="$(STAGE2_CFLAGS)" \
- CFLAGS_FOR_TARGET="$(CFLAGS_FOR_TARGET)" \
- CXXFLAGS_FOR_TARGET="$(CXXFLAGS_FOR_TARGET)" \
- LIBCFLAGS_FOR_TARGET="$(LIBCFLAGS_FOR_TARGET)" \
- $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) CPPFLAGS="$$CPPFLAGS" LDFLAGS="$$LDFLAGS" V=1 \
- TFLAGS="$(STAGE2_TFLAGS)" \
- $(TARGET-stage2-cloog)
-
-maybe-clean-stage2-cloog: clean-stage2-cloog
-clean-stage2: clean-stage2-cloog
-clean-stage2-cloog:
- @if [ $(current_stage) = stage2 ]; then \
- [ -f $(HOST_SUBDIR)/cloog/Makefile ] || exit 0; \
- else \
- [ -f $(HOST_SUBDIR)/stage2-cloog/Makefile ] || exit 0; \
- $(MAKE) stage2-start; \
- fi; \
- cd $(HOST_SUBDIR)/cloog && \
- $(MAKE) $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) CPPFLAGS="$$CPPFLAGS" LDFLAGS="$$LDFLAGS" V=1 clean
-@endif cloog-bootstrap
-
-
-.PHONY: all-stage3-cloog maybe-all-stage3-cloog
-.PHONY: clean-stage3-cloog maybe-clean-stage3-cloog
-maybe-all-stage3-cloog:
-maybe-clean-stage3-cloog:
-@if cloog-bootstrap
-maybe-all-stage3-cloog: all-stage3-cloog
-all-stage3: all-stage3-cloog
-TARGET-stage3-cloog = $(TARGET-cloog)
-all-stage3-cloog: configure-stage3-cloog
- @[ $(current_stage) = stage3 ] || $(MAKE) stage3-start
- @r=`${PWD_COMMAND}`; export r; \
- s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- TFLAGS="$(STAGE3_TFLAGS)"; \
- $(HOST_EXPORTS) \
- $(POSTSTAGE1_HOST_EXPORTS) CPPFLAGS="$(HOST_GMPINC) $(HOST_ISLINC) $$CPPFLAGS"; export CPPFLAGS; LDFLAGS="-L$$r/$(HOST_SUBDIR)/gmp/.libs -L$$r/$(HOST_SUBDIR)/isl/.libs $$LDFLAGS"; export LDFLAGS; \
- cd $(HOST_SUBDIR)/cloog && \
- $(MAKE) $(BASE_FLAGS_TO_PASS) \
- CFLAGS="$(STAGE3_CFLAGS)" \
- CXXFLAGS="$(STAGE3_CXXFLAGS)" \
- LIBCFLAGS="$(STAGE3_CFLAGS)" \
- CFLAGS_FOR_TARGET="$(CFLAGS_FOR_TARGET)" \
- CXXFLAGS_FOR_TARGET="$(CXXFLAGS_FOR_TARGET)" \
- LIBCFLAGS_FOR_TARGET="$(LIBCFLAGS_FOR_TARGET)" \
- $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) CPPFLAGS="$$CPPFLAGS" LDFLAGS="$$LDFLAGS" V=1 \
- TFLAGS="$(STAGE3_TFLAGS)" \
- $(TARGET-stage3-cloog)
-
-maybe-clean-stage3-cloog: clean-stage3-cloog
-clean-stage3: clean-stage3-cloog
-clean-stage3-cloog:
- @if [ $(current_stage) = stage3 ]; then \
- [ -f $(HOST_SUBDIR)/cloog/Makefile ] || exit 0; \
- else \
- [ -f $(HOST_SUBDIR)/stage3-cloog/Makefile ] || exit 0; \
- $(MAKE) stage3-start; \
- fi; \
- cd $(HOST_SUBDIR)/cloog && \
- $(MAKE) $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) CPPFLAGS="$$CPPFLAGS" LDFLAGS="$$LDFLAGS" V=1 clean
-@endif cloog-bootstrap
-
-
-.PHONY: all-stage4-cloog maybe-all-stage4-cloog
-.PHONY: clean-stage4-cloog maybe-clean-stage4-cloog
-maybe-all-stage4-cloog:
-maybe-clean-stage4-cloog:
-@if cloog-bootstrap
-maybe-all-stage4-cloog: all-stage4-cloog
-all-stage4: all-stage4-cloog
-TARGET-stage4-cloog = $(TARGET-cloog)
-all-stage4-cloog: configure-stage4-cloog
- @[ $(current_stage) = stage4 ] || $(MAKE) stage4-start
- @r=`${PWD_COMMAND}`; export r; \
- s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- TFLAGS="$(STAGE4_TFLAGS)"; \
- $(HOST_EXPORTS) \
- $(POSTSTAGE1_HOST_EXPORTS) CPPFLAGS="$(HOST_GMPINC) $(HOST_ISLINC) $$CPPFLAGS"; export CPPFLAGS; LDFLAGS="-L$$r/$(HOST_SUBDIR)/gmp/.libs -L$$r/$(HOST_SUBDIR)/isl/.libs $$LDFLAGS"; export LDFLAGS; \
- cd $(HOST_SUBDIR)/cloog && \
- $(MAKE) $(BASE_FLAGS_TO_PASS) \
- CFLAGS="$(STAGE4_CFLAGS)" \
- CXXFLAGS="$(STAGE4_CXXFLAGS)" \
- LIBCFLAGS="$(STAGE4_CFLAGS)" \
- CFLAGS_FOR_TARGET="$(CFLAGS_FOR_TARGET)" \
- CXXFLAGS_FOR_TARGET="$(CXXFLAGS_FOR_TARGET)" \
- LIBCFLAGS_FOR_TARGET="$(LIBCFLAGS_FOR_TARGET)" \
- $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) CPPFLAGS="$$CPPFLAGS" LDFLAGS="$$LDFLAGS" V=1 \
- TFLAGS="$(STAGE4_TFLAGS)" \
- $(TARGET-stage4-cloog)
-
-maybe-clean-stage4-cloog: clean-stage4-cloog
-clean-stage4: clean-stage4-cloog
-clean-stage4-cloog:
- @if [ $(current_stage) = stage4 ]; then \
- [ -f $(HOST_SUBDIR)/cloog/Makefile ] || exit 0; \
- else \
- [ -f $(HOST_SUBDIR)/stage4-cloog/Makefile ] || exit 0; \
- $(MAKE) stage4-start; \
- fi; \
- cd $(HOST_SUBDIR)/cloog && \
- $(MAKE) $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) CPPFLAGS="$$CPPFLAGS" LDFLAGS="$$LDFLAGS" V=1 clean
-@endif cloog-bootstrap
-
-
-.PHONY: all-stageprofile-cloog maybe-all-stageprofile-cloog
-.PHONY: clean-stageprofile-cloog maybe-clean-stageprofile-cloog
-maybe-all-stageprofile-cloog:
-maybe-clean-stageprofile-cloog:
-@if cloog-bootstrap
-maybe-all-stageprofile-cloog: all-stageprofile-cloog
-all-stageprofile: all-stageprofile-cloog
-TARGET-stageprofile-cloog = $(TARGET-cloog)
-all-stageprofile-cloog: configure-stageprofile-cloog
- @[ $(current_stage) = stageprofile ] || $(MAKE) stageprofile-start
- @r=`${PWD_COMMAND}`; export r; \
- s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- TFLAGS="$(STAGEprofile_TFLAGS)"; \
- $(HOST_EXPORTS) \
- $(POSTSTAGE1_HOST_EXPORTS) CPPFLAGS="$(HOST_GMPINC) $(HOST_ISLINC) $$CPPFLAGS"; export CPPFLAGS; LDFLAGS="-L$$r/$(HOST_SUBDIR)/gmp/.libs -L$$r/$(HOST_SUBDIR)/isl/.libs $$LDFLAGS"; export LDFLAGS; \
- cd $(HOST_SUBDIR)/cloog && \
- $(MAKE) $(BASE_FLAGS_TO_PASS) \
- CFLAGS="$(STAGEprofile_CFLAGS)" \
- CXXFLAGS="$(STAGEprofile_CXXFLAGS)" \
- LIBCFLAGS="$(STAGEprofile_CFLAGS)" \
- CFLAGS_FOR_TARGET="$(CFLAGS_FOR_TARGET)" \
- CXXFLAGS_FOR_TARGET="$(CXXFLAGS_FOR_TARGET)" \
- LIBCFLAGS_FOR_TARGET="$(LIBCFLAGS_FOR_TARGET)" \
- $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) CPPFLAGS="$$CPPFLAGS" LDFLAGS="$$LDFLAGS" V=1 \
- TFLAGS="$(STAGEprofile_TFLAGS)" \
- $(TARGET-stageprofile-cloog)
-
-maybe-clean-stageprofile-cloog: clean-stageprofile-cloog
-clean-stageprofile: clean-stageprofile-cloog
-clean-stageprofile-cloog:
- @if [ $(current_stage) = stageprofile ]; then \
- [ -f $(HOST_SUBDIR)/cloog/Makefile ] || exit 0; \
- else \
- [ -f $(HOST_SUBDIR)/stageprofile-cloog/Makefile ] || exit 0; \
- $(MAKE) stageprofile-start; \
- fi; \
- cd $(HOST_SUBDIR)/cloog && \
- $(MAKE) $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) CPPFLAGS="$$CPPFLAGS" LDFLAGS="$$LDFLAGS" V=1 clean
-@endif cloog-bootstrap
-
-
-.PHONY: all-stagefeedback-cloog maybe-all-stagefeedback-cloog
-.PHONY: clean-stagefeedback-cloog maybe-clean-stagefeedback-cloog
-maybe-all-stagefeedback-cloog:
-maybe-clean-stagefeedback-cloog:
-@if cloog-bootstrap
-maybe-all-stagefeedback-cloog: all-stagefeedback-cloog
-all-stagefeedback: all-stagefeedback-cloog
-TARGET-stagefeedback-cloog = $(TARGET-cloog)
-all-stagefeedback-cloog: configure-stagefeedback-cloog
- @[ $(current_stage) = stagefeedback ] || $(MAKE) stagefeedback-start
- @r=`${PWD_COMMAND}`; export r; \
- s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- TFLAGS="$(STAGEfeedback_TFLAGS)"; \
- $(HOST_EXPORTS) \
- $(POSTSTAGE1_HOST_EXPORTS) CPPFLAGS="$(HOST_GMPINC) $(HOST_ISLINC) $$CPPFLAGS"; export CPPFLAGS; LDFLAGS="-L$$r/$(HOST_SUBDIR)/gmp/.libs -L$$r/$(HOST_SUBDIR)/isl/.libs $$LDFLAGS"; export LDFLAGS; \
- cd $(HOST_SUBDIR)/cloog && \
- $(MAKE) $(BASE_FLAGS_TO_PASS) \
- CFLAGS="$(STAGEfeedback_CFLAGS)" \
- CXXFLAGS="$(STAGEfeedback_CXXFLAGS)" \
- LIBCFLAGS="$(STAGEfeedback_CFLAGS)" \
- CFLAGS_FOR_TARGET="$(CFLAGS_FOR_TARGET)" \
- CXXFLAGS_FOR_TARGET="$(CXXFLAGS_FOR_TARGET)" \
- LIBCFLAGS_FOR_TARGET="$(LIBCFLAGS_FOR_TARGET)" \
- $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) CPPFLAGS="$$CPPFLAGS" LDFLAGS="$$LDFLAGS" V=1 \
- TFLAGS="$(STAGEfeedback_TFLAGS)" \
- $(TARGET-stagefeedback-cloog)
-
-maybe-clean-stagefeedback-cloog: clean-stagefeedback-cloog
-clean-stagefeedback: clean-stagefeedback-cloog
-clean-stagefeedback-cloog:
- @if [ $(current_stage) = stagefeedback ]; then \
- [ -f $(HOST_SUBDIR)/cloog/Makefile ] || exit 0; \
- else \
- [ -f $(HOST_SUBDIR)/stagefeedback-cloog/Makefile ] || exit 0; \
- $(MAKE) stagefeedback-start; \
- fi; \
- cd $(HOST_SUBDIR)/cloog && \
- $(MAKE) $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) CPPFLAGS="$$CPPFLAGS" LDFLAGS="$$LDFLAGS" V=1 clean
-@endif cloog-bootstrap
-
-
-
-
-
-.PHONY: check-cloog maybe-check-cloog
-maybe-check-cloog:
-@if cloog
-maybe-check-cloog: check-cloog
-
-check-cloog:
- @: $(MAKE); $(unstage)
- @r=`${PWD_COMMAND}`; export r; \
- s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(HOST_EXPORTS) \
- (cd $(HOST_SUBDIR)/cloog && \
- $(MAKE) $(FLAGS_TO_PASS) CPPFLAGS="$$CPPFLAGS" LDFLAGS="$$LDFLAGS" V=1 check)
-
-@endif cloog
-
-.PHONY: install-cloog maybe-install-cloog
-maybe-install-cloog:
-@if cloog
-maybe-install-cloog: install-cloog
-
-install-cloog:
-
-@endif cloog
-
-.PHONY: install-strip-cloog maybe-install-strip-cloog
-maybe-install-strip-cloog:
-@if cloog
-maybe-install-strip-cloog: install-strip-cloog
-
-install-strip-cloog:
-
-@endif cloog
-
-# Other targets (info, dvi, pdf, etc.)
-
-.PHONY: maybe-info-cloog info-cloog
-maybe-info-cloog:
-@if cloog
-maybe-info-cloog: info-cloog
-
-info-cloog: \
- configure-cloog
- @[ -f ./cloog/Makefile ] || exit 0; \
- r=`${PWD_COMMAND}`; export r; \
- s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(HOST_EXPORTS) \
- for flag in $(EXTRA_HOST_FLAGS) CPPFLAGS="$$CPPFLAGS" LDFLAGS="$$LDFLAGS" V=1; do \
- eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
- done; \
- echo "Doing info in cloog" ; \
- (cd $(HOST_SUBDIR)/cloog && \
- $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
- "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
- "RANLIB=$${RANLIB}" \
- "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
- info) \
- || exit 1
-
-@endif cloog
-
-.PHONY: maybe-dvi-cloog dvi-cloog
-maybe-dvi-cloog:
-@if cloog
-maybe-dvi-cloog: dvi-cloog
-
-dvi-cloog: \
- configure-cloog
- @[ -f ./cloog/Makefile ] || exit 0; \
- r=`${PWD_COMMAND}`; export r; \
- s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(HOST_EXPORTS) \
- for flag in $(EXTRA_HOST_FLAGS) CPPFLAGS="$$CPPFLAGS" LDFLAGS="$$LDFLAGS" V=1; do \
- eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
- done; \
- echo "Doing dvi in cloog" ; \
- (cd $(HOST_SUBDIR)/cloog && \
- $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
- "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
- "RANLIB=$${RANLIB}" \
- "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
- dvi) \
- || exit 1
-
-@endif cloog
-
-.PHONY: maybe-pdf-cloog pdf-cloog
-maybe-pdf-cloog:
-@if cloog
-maybe-pdf-cloog: pdf-cloog
-
-pdf-cloog: \
- configure-cloog
- @[ -f ./cloog/Makefile ] || exit 0; \
- r=`${PWD_COMMAND}`; export r; \
- s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(HOST_EXPORTS) \
- for flag in $(EXTRA_HOST_FLAGS) CPPFLAGS="$$CPPFLAGS" LDFLAGS="$$LDFLAGS" V=1; do \
- eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
- done; \
- echo "Doing pdf in cloog" ; \
- (cd $(HOST_SUBDIR)/cloog && \
- $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
- "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
- "RANLIB=$${RANLIB}" \
- "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
- pdf) \
- || exit 1
-
-@endif cloog
-
-.PHONY: maybe-html-cloog html-cloog
-maybe-html-cloog:
-@if cloog
-maybe-html-cloog: html-cloog
-
-html-cloog: \
- configure-cloog
- @[ -f ./cloog/Makefile ] || exit 0; \
- r=`${PWD_COMMAND}`; export r; \
- s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(HOST_EXPORTS) \
- for flag in $(EXTRA_HOST_FLAGS) CPPFLAGS="$$CPPFLAGS" LDFLAGS="$$LDFLAGS" V=1; do \
- eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
- done; \
- echo "Doing html in cloog" ; \
- (cd $(HOST_SUBDIR)/cloog && \
- $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
- "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
- "RANLIB=$${RANLIB}" \
- "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
- html) \
- || exit 1
-
-@endif cloog
-
-.PHONY: maybe-TAGS-cloog TAGS-cloog
-maybe-TAGS-cloog:
-@if cloog
-maybe-TAGS-cloog: TAGS-cloog
-
-TAGS-cloog: \
- configure-cloog
- @[ -f ./cloog/Makefile ] || exit 0; \
- r=`${PWD_COMMAND}`; export r; \
- s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(HOST_EXPORTS) \
- for flag in $(EXTRA_HOST_FLAGS) CPPFLAGS="$$CPPFLAGS" LDFLAGS="$$LDFLAGS" V=1; do \
- eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
- done; \
- echo "Doing TAGS in cloog" ; \
- (cd $(HOST_SUBDIR)/cloog && \
- $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
- "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
- "RANLIB=$${RANLIB}" \
- "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
- TAGS) \
- || exit 1
-
-@endif cloog
-
-.PHONY: maybe-install-info-cloog install-info-cloog
-maybe-install-info-cloog:
-@if cloog
-maybe-install-info-cloog: install-info-cloog
-
-install-info-cloog: \
- configure-cloog \
- info-cloog
- @[ -f ./cloog/Makefile ] || exit 0; \
- r=`${PWD_COMMAND}`; export r; \
- s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(HOST_EXPORTS) \
- for flag in $(EXTRA_HOST_FLAGS) CPPFLAGS="$$CPPFLAGS" LDFLAGS="$$LDFLAGS" V=1; do \
- eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
- done; \
- echo "Doing install-info in cloog" ; \
- (cd $(HOST_SUBDIR)/cloog && \
- $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
- "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
- "RANLIB=$${RANLIB}" \
- "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
- install-info) \
- || exit 1
-
-@endif cloog
-
-.PHONY: maybe-install-pdf-cloog install-pdf-cloog
-maybe-install-pdf-cloog:
-@if cloog
-maybe-install-pdf-cloog: install-pdf-cloog
-
-install-pdf-cloog: \
- configure-cloog \
- pdf-cloog
- @[ -f ./cloog/Makefile ] || exit 0; \
- r=`${PWD_COMMAND}`; export r; \
- s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(HOST_EXPORTS) \
- for flag in $(EXTRA_HOST_FLAGS) CPPFLAGS="$$CPPFLAGS" LDFLAGS="$$LDFLAGS" V=1; do \
- eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
- done; \
- echo "Doing install-pdf in cloog" ; \
- (cd $(HOST_SUBDIR)/cloog && \
- $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
- "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
- "RANLIB=$${RANLIB}" \
- "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
- install-pdf) \
- || exit 1
-
-@endif cloog
-
-.PHONY: maybe-install-html-cloog install-html-cloog
-maybe-install-html-cloog:
-@if cloog
-maybe-install-html-cloog: install-html-cloog
-
-install-html-cloog: \
- configure-cloog \
- html-cloog
- @[ -f ./cloog/Makefile ] || exit 0; \
- r=`${PWD_COMMAND}`; export r; \
- s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(HOST_EXPORTS) \
- for flag in $(EXTRA_HOST_FLAGS) CPPFLAGS="$$CPPFLAGS" LDFLAGS="$$LDFLAGS" V=1; do \
- eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
- done; \
- echo "Doing install-html in cloog" ; \
- (cd $(HOST_SUBDIR)/cloog && \
- $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
- "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
- "RANLIB=$${RANLIB}" \
- "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
- install-html) \
- || exit 1
-
-@endif cloog
-
-.PHONY: maybe-installcheck-cloog installcheck-cloog
-maybe-installcheck-cloog:
-@if cloog
-maybe-installcheck-cloog: installcheck-cloog
-
-installcheck-cloog: \
- configure-cloog
- @[ -f ./cloog/Makefile ] || exit 0; \
- r=`${PWD_COMMAND}`; export r; \
- s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(HOST_EXPORTS) \
- for flag in $(EXTRA_HOST_FLAGS) CPPFLAGS="$$CPPFLAGS" LDFLAGS="$$LDFLAGS" V=1; do \
- eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
- done; \
- echo "Doing installcheck in cloog" ; \
- (cd $(HOST_SUBDIR)/cloog && \
- $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
- "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
- "RANLIB=$${RANLIB}" \
- "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
- installcheck) \
- || exit 1
-
-@endif cloog
-
-.PHONY: maybe-mostlyclean-cloog mostlyclean-cloog
-maybe-mostlyclean-cloog:
-@if cloog
-maybe-mostlyclean-cloog: mostlyclean-cloog
-
-mostlyclean-cloog:
- @[ -f ./cloog/Makefile ] || exit 0; \
- r=`${PWD_COMMAND}`; export r; \
- s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(HOST_EXPORTS) \
- for flag in $(EXTRA_HOST_FLAGS) CPPFLAGS="$$CPPFLAGS" LDFLAGS="$$LDFLAGS" V=1; do \
- eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
- done; \
- echo "Doing mostlyclean in cloog" ; \
- (cd $(HOST_SUBDIR)/cloog && \
- $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
- "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
- "RANLIB=$${RANLIB}" \
- "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
- mostlyclean) \
- || exit 1
-
-@endif cloog
-
-.PHONY: maybe-clean-cloog clean-cloog
-maybe-clean-cloog:
-@if cloog
-maybe-clean-cloog: clean-cloog
-
-clean-cloog:
- @[ -f ./cloog/Makefile ] || exit 0; \
- r=`${PWD_COMMAND}`; export r; \
- s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(HOST_EXPORTS) \
- for flag in $(EXTRA_HOST_FLAGS) CPPFLAGS="$$CPPFLAGS" LDFLAGS="$$LDFLAGS" V=1; do \
- eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
- done; \
- echo "Doing clean in cloog" ; \
- (cd $(HOST_SUBDIR)/cloog && \
- $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
- "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
- "RANLIB=$${RANLIB}" \
- "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
- clean) \
- || exit 1
-
-@endif cloog
-
-.PHONY: maybe-distclean-cloog distclean-cloog
-maybe-distclean-cloog:
-@if cloog
-maybe-distclean-cloog: distclean-cloog
-
-distclean-cloog:
- @[ -f ./cloog/Makefile ] || exit 0; \
- r=`${PWD_COMMAND}`; export r; \
- s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(HOST_EXPORTS) \
- for flag in $(EXTRA_HOST_FLAGS) CPPFLAGS="$$CPPFLAGS" LDFLAGS="$$LDFLAGS" V=1; do \
- eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
- done; \
- echo "Doing distclean in cloog" ; \
- (cd $(HOST_SUBDIR)/cloog && \
- $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
- "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
- "RANLIB=$${RANLIB}" \
- "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
- distclean) \
- || exit 1
-
-@endif cloog
-
-.PHONY: maybe-maintainer-clean-cloog maintainer-clean-cloog
-maybe-maintainer-clean-cloog:
-@if cloog
-maybe-maintainer-clean-cloog: maintainer-clean-cloog
-
-maintainer-clean-cloog:
- @[ -f ./cloog/Makefile ] || exit 0; \
- r=`${PWD_COMMAND}`; export r; \
- s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(HOST_EXPORTS) \
- for flag in $(EXTRA_HOST_FLAGS) CPPFLAGS="$$CPPFLAGS" LDFLAGS="$$LDFLAGS" V=1; do \
- eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
- done; \
- echo "Doing maintainer-clean in cloog" ; \
- (cd $(HOST_SUBDIR)/cloog && \
- $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
- "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
- "RANLIB=$${RANLIB}" \
- "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
- maintainer-clean) \
- || exit 1
-
-@endif cloog
-
-
-
.PHONY: configure-libelf maybe-configure-libelf
maybe-configure-libelf:
@if gcc-bootstrap
@@ -14749,7 +14532,7 @@ configure-libelf:
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
test ! -f $(HOST_SUBDIR)/libelf/Makefile || exit 0; \
- $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/libelf ; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/libelf; \
$(HOST_EXPORTS) \
echo Configuring in $(HOST_SUBDIR)/libelf; \
cd "$(HOST_SUBDIR)/libelf" || exit 1; \
@@ -14758,11 +14541,12 @@ configure-libelf:
*) topdir=`echo $(HOST_SUBDIR)/libelf/ | \
sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
esac; \
- srcdiroption="--srcdir=$${topdir}/libelf"; \
- libsrcdir="$$s/libelf"; \
- $(SHELL) $${libsrcdir}/configure \
+ module_srcdir=libelf; \
+ $(SHELL) \
+ $$s/$$module_srcdir/configure \
+ --srcdir=$${topdir}/$$module_srcdir \
$(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
- --target=${target_alias} $${srcdiroption} --disable-shared \
+ --target=${target_alias} --disable-shared \
|| exit 1
@endif libelf
@@ -14783,19 +14567,20 @@ configure-stage1-libelf:
CFLAGS="$(STAGE1_CFLAGS)"; export CFLAGS; \
CXXFLAGS="$(STAGE1_CXXFLAGS)"; export CXXFLAGS; \
LIBCFLAGS="$(LIBCFLAGS)"; export LIBCFLAGS; \
- echo Configuring stage 1 in $(HOST_SUBDIR)/libelf ; \
- $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/libelf ; \
+ echo Configuring stage 1 in $(HOST_SUBDIR)/libelf; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/libelf; \
cd $(HOST_SUBDIR)/libelf || exit 1; \
case $(srcdir) in \
/* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
*) topdir=`echo $(HOST_SUBDIR)/libelf/ | \
sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
esac; \
- srcdiroption="--srcdir=$${topdir}/libelf"; \
- libsrcdir="$$s/libelf"; \
- $(SHELL) $${libsrcdir}/configure \
+ module_srcdir=libelf; \
+ $(SHELL) $$s/$$module_srcdir/configure \
+ --srcdir=$${topdir}/$$module_srcdir \
$(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
- --target=${target_alias} $${srcdiroption} \
+ --target=${target_alias} \
+ \
$(STAGE1_CONFIGURE_FLAGS) \
--disable-shared
@endif libelf-bootstrap
@@ -14816,19 +14601,19 @@ configure-stage2-libelf:
CFLAGS="$(STAGE2_CFLAGS)"; export CFLAGS; \
CXXFLAGS="$(STAGE2_CXXFLAGS)"; export CXXFLAGS; \
LIBCFLAGS="$(STAGE2_CFLAGS)"; export LIBCFLAGS; \
- echo Configuring stage 2 in $(HOST_SUBDIR)/libelf ; \
- $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/libelf ; \
+ echo Configuring stage 2 in $(HOST_SUBDIR)/libelf; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/libelf; \
cd $(HOST_SUBDIR)/libelf || exit 1; \
case $(srcdir) in \
/* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
*) topdir=`echo $(HOST_SUBDIR)/libelf/ | \
sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
esac; \
- srcdiroption="--srcdir=$${topdir}/libelf"; \
- libsrcdir="$$s/libelf"; \
- $(SHELL) $${libsrcdir}/configure \
+ module_srcdir=libelf; \
+ $(SHELL) $$s/$$module_srcdir/configure \
+ --srcdir=$${topdir}/$$module_srcdir \
$(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
- --target=${target_alias} $${srcdiroption} \
+ --target=${target_alias} \
--with-build-libsubdir=$(HOST_SUBDIR) \
$(STAGE2_CONFIGURE_FLAGS) \
--disable-shared
@@ -14850,19 +14635,19 @@ configure-stage3-libelf:
CFLAGS="$(STAGE3_CFLAGS)"; export CFLAGS; \
CXXFLAGS="$(STAGE3_CXXFLAGS)"; export CXXFLAGS; \
LIBCFLAGS="$(STAGE3_CFLAGS)"; export LIBCFLAGS; \
- echo Configuring stage 3 in $(HOST_SUBDIR)/libelf ; \
- $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/libelf ; \
+ echo Configuring stage 3 in $(HOST_SUBDIR)/libelf; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/libelf; \
cd $(HOST_SUBDIR)/libelf || exit 1; \
case $(srcdir) in \
/* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
*) topdir=`echo $(HOST_SUBDIR)/libelf/ | \
sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
esac; \
- srcdiroption="--srcdir=$${topdir}/libelf"; \
- libsrcdir="$$s/libelf"; \
- $(SHELL) $${libsrcdir}/configure \
+ module_srcdir=libelf; \
+ $(SHELL) $$s/$$module_srcdir/configure \
+ --srcdir=$${topdir}/$$module_srcdir \
$(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
- --target=${target_alias} $${srcdiroption} \
+ --target=${target_alias} \
--with-build-libsubdir=$(HOST_SUBDIR) \
$(STAGE3_CONFIGURE_FLAGS) \
--disable-shared
@@ -14884,19 +14669,19 @@ configure-stage4-libelf:
CFLAGS="$(STAGE4_CFLAGS)"; export CFLAGS; \
CXXFLAGS="$(STAGE4_CXXFLAGS)"; export CXXFLAGS; \
LIBCFLAGS="$(STAGE4_CFLAGS)"; export LIBCFLAGS; \
- echo Configuring stage 4 in $(HOST_SUBDIR)/libelf ; \
- $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/libelf ; \
+ echo Configuring stage 4 in $(HOST_SUBDIR)/libelf; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/libelf; \
cd $(HOST_SUBDIR)/libelf || exit 1; \
case $(srcdir) in \
/* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
*) topdir=`echo $(HOST_SUBDIR)/libelf/ | \
sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
esac; \
- srcdiroption="--srcdir=$${topdir}/libelf"; \
- libsrcdir="$$s/libelf"; \
- $(SHELL) $${libsrcdir}/configure \
+ module_srcdir=libelf; \
+ $(SHELL) $$s/$$module_srcdir/configure \
+ --srcdir=$${topdir}/$$module_srcdir \
$(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
- --target=${target_alias} $${srcdiroption} \
+ --target=${target_alias} \
--with-build-libsubdir=$(HOST_SUBDIR) \
$(STAGE4_CONFIGURE_FLAGS) \
--disable-shared
@@ -14918,19 +14703,19 @@ configure-stageprofile-libelf:
CFLAGS="$(STAGEprofile_CFLAGS)"; export CFLAGS; \
CXXFLAGS="$(STAGEprofile_CXXFLAGS)"; export CXXFLAGS; \
LIBCFLAGS="$(STAGEprofile_CFLAGS)"; export LIBCFLAGS; \
- echo Configuring stage profile in $(HOST_SUBDIR)/libelf ; \
- $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/libelf ; \
+ echo Configuring stage profile in $(HOST_SUBDIR)/libelf; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/libelf; \
cd $(HOST_SUBDIR)/libelf || exit 1; \
case $(srcdir) in \
/* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
*) topdir=`echo $(HOST_SUBDIR)/libelf/ | \
sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
esac; \
- srcdiroption="--srcdir=$${topdir}/libelf"; \
- libsrcdir="$$s/libelf"; \
- $(SHELL) $${libsrcdir}/configure \
+ module_srcdir=libelf; \
+ $(SHELL) $$s/$$module_srcdir/configure \
+ --srcdir=$${topdir}/$$module_srcdir \
$(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
- --target=${target_alias} $${srcdiroption} \
+ --target=${target_alias} \
--with-build-libsubdir=$(HOST_SUBDIR) \
$(STAGEprofile_CONFIGURE_FLAGS) \
--disable-shared
@@ -14952,19 +14737,19 @@ configure-stagefeedback-libelf:
CFLAGS="$(STAGEfeedback_CFLAGS)"; export CFLAGS; \
CXXFLAGS="$(STAGEfeedback_CXXFLAGS)"; export CXXFLAGS; \
LIBCFLAGS="$(STAGEfeedback_CFLAGS)"; export LIBCFLAGS; \
- echo Configuring stage feedback in $(HOST_SUBDIR)/libelf ; \
- $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/libelf ; \
+ echo Configuring stage feedback in $(HOST_SUBDIR)/libelf; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/libelf; \
cd $(HOST_SUBDIR)/libelf || exit 1; \
case $(srcdir) in \
/* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
*) topdir=`echo $(HOST_SUBDIR)/libelf/ | \
sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
esac; \
- srcdiroption="--srcdir=$${topdir}/libelf"; \
- libsrcdir="$$s/libelf"; \
- $(SHELL) $${libsrcdir}/configure \
+ module_srcdir=libelf; \
+ $(SHELL) $$s/$$module_srcdir/configure \
+ --srcdir=$${topdir}/$$module_srcdir \
$(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
- --target=${target_alias} $${srcdiroption} \
+ --target=${target_alias} \
--with-build-libsubdir=$(HOST_SUBDIR) \
$(STAGEfeedback_CONFIGURE_FLAGS) \
--disable-shared
@@ -15252,9 +15037,9 @@ check-libelf:
@: $(MAKE); $(unstage)
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(HOST_EXPORTS) \
+ $(HOST_EXPORTS) $(EXTRA_HOST_EXPORTS) \
(cd $(HOST_SUBDIR)/libelf && \
- $(MAKE) $(FLAGS_TO_PASS) check)
+ $(MAKE) $(FLAGS_TO_PASS) $(EXTRA_BOOTSTRAP_FLAGS) check)
@endif libelf
@@ -15292,7 +15077,7 @@ info-libelf: \
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing info in libelf" ; \
+ echo "Doing info in libelf"; \
(cd $(HOST_SUBDIR)/libelf && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -15317,7 +15102,7 @@ dvi-libelf: \
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing dvi in libelf" ; \
+ echo "Doing dvi in libelf"; \
(cd $(HOST_SUBDIR)/libelf && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -15342,7 +15127,7 @@ pdf-libelf: \
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing pdf in libelf" ; \
+ echo "Doing pdf in libelf"; \
(cd $(HOST_SUBDIR)/libelf && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -15367,7 +15152,7 @@ html-libelf: \
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing html in libelf" ; \
+ echo "Doing html in libelf"; \
(cd $(HOST_SUBDIR)/libelf && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -15392,7 +15177,7 @@ TAGS-libelf: \
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing TAGS in libelf" ; \
+ echo "Doing TAGS in libelf"; \
(cd $(HOST_SUBDIR)/libelf && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -15418,7 +15203,7 @@ install-info-libelf: \
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing install-info in libelf" ; \
+ echo "Doing install-info in libelf"; \
(cd $(HOST_SUBDIR)/libelf && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -15444,7 +15229,7 @@ install-pdf-libelf: \
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing install-pdf in libelf" ; \
+ echo "Doing install-pdf in libelf"; \
(cd $(HOST_SUBDIR)/libelf && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -15470,7 +15255,7 @@ install-html-libelf: \
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing install-html in libelf" ; \
+ echo "Doing install-html in libelf"; \
(cd $(HOST_SUBDIR)/libelf && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -15495,7 +15280,7 @@ installcheck-libelf: \
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing installcheck in libelf" ; \
+ echo "Doing installcheck in libelf"; \
(cd $(HOST_SUBDIR)/libelf && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -15519,7 +15304,7 @@ mostlyclean-libelf:
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing mostlyclean in libelf" ; \
+ echo "Doing mostlyclean in libelf"; \
(cd $(HOST_SUBDIR)/libelf && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -15543,7 +15328,7 @@ clean-libelf:
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing clean in libelf" ; \
+ echo "Doing clean in libelf"; \
(cd $(HOST_SUBDIR)/libelf && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -15567,7 +15352,7 @@ distclean-libelf:
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing distclean in libelf" ; \
+ echo "Doing distclean in libelf"; \
(cd $(HOST_SUBDIR)/libelf && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -15591,7 +15376,7 @@ maintainer-clean-libelf:
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing maintainer-clean in libelf" ; \
+ echo "Doing maintainer-clean in libelf"; \
(cd $(HOST_SUBDIR)/libelf && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -15615,7 +15400,7 @@ configure-gold:
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
test ! -f $(HOST_SUBDIR)/gold/Makefile || exit 0; \
- $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/gold ; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/gold; \
$(HOST_EXPORTS) \
echo Configuring in $(HOST_SUBDIR)/gold; \
cd "$(HOST_SUBDIR)/gold" || exit 1; \
@@ -15624,11 +15409,12 @@ configure-gold:
*) topdir=`echo $(HOST_SUBDIR)/gold/ | \
sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
esac; \
- srcdiroption="--srcdir=$${topdir}/gold"; \
- libsrcdir="$$s/gold"; \
- $(SHELL) $${libsrcdir}/configure \
+ module_srcdir=gold; \
+ $(SHELL) \
+ $$s/$$module_srcdir/configure \
+ --srcdir=$${topdir}/$$module_srcdir \
$(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
- --target=${target_alias} $${srcdiroption} \
+ --target=${target_alias} \
|| exit 1
@endif gold
@@ -15649,19 +15435,20 @@ configure-stage1-gold:
CFLAGS="$(STAGE1_CFLAGS)"; export CFLAGS; \
CXXFLAGS="$(STAGE1_CXXFLAGS)"; export CXXFLAGS; \
LIBCFLAGS="$(LIBCFLAGS)"; export LIBCFLAGS; \
- echo Configuring stage 1 in $(HOST_SUBDIR)/gold ; \
- $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/gold ; \
+ echo Configuring stage 1 in $(HOST_SUBDIR)/gold; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/gold; \
cd $(HOST_SUBDIR)/gold || exit 1; \
case $(srcdir) in \
/* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
*) topdir=`echo $(HOST_SUBDIR)/gold/ | \
sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
esac; \
- srcdiroption="--srcdir=$${topdir}/gold"; \
- libsrcdir="$$s/gold"; \
- $(SHELL) $${libsrcdir}/configure \
+ module_srcdir=gold; \
+ $(SHELL) $$s/$$module_srcdir/configure \
+ --srcdir=$${topdir}/$$module_srcdir \
$(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
- --target=${target_alias} $${srcdiroption} \
+ --target=${target_alias} \
+ \
$(STAGE1_CONFIGURE_FLAGS)
@endif gold-bootstrap
@@ -15681,19 +15468,19 @@ configure-stage2-gold:
CFLAGS="$(STAGE2_CFLAGS)"; export CFLAGS; \
CXXFLAGS="$(STAGE2_CXXFLAGS)"; export CXXFLAGS; \
LIBCFLAGS="$(STAGE2_CFLAGS)"; export LIBCFLAGS; \
- echo Configuring stage 2 in $(HOST_SUBDIR)/gold ; \
- $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/gold ; \
+ echo Configuring stage 2 in $(HOST_SUBDIR)/gold; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/gold; \
cd $(HOST_SUBDIR)/gold || exit 1; \
case $(srcdir) in \
/* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
*) topdir=`echo $(HOST_SUBDIR)/gold/ | \
sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
esac; \
- srcdiroption="--srcdir=$${topdir}/gold"; \
- libsrcdir="$$s/gold"; \
- $(SHELL) $${libsrcdir}/configure \
+ module_srcdir=gold; \
+ $(SHELL) $$s/$$module_srcdir/configure \
+ --srcdir=$${topdir}/$$module_srcdir \
$(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
- --target=${target_alias} $${srcdiroption} \
+ --target=${target_alias} \
--with-build-libsubdir=$(HOST_SUBDIR) \
$(STAGE2_CONFIGURE_FLAGS)
@endif gold-bootstrap
@@ -15714,19 +15501,19 @@ configure-stage3-gold:
CFLAGS="$(STAGE3_CFLAGS)"; export CFLAGS; \
CXXFLAGS="$(STAGE3_CXXFLAGS)"; export CXXFLAGS; \
LIBCFLAGS="$(STAGE3_CFLAGS)"; export LIBCFLAGS; \
- echo Configuring stage 3 in $(HOST_SUBDIR)/gold ; \
- $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/gold ; \
+ echo Configuring stage 3 in $(HOST_SUBDIR)/gold; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/gold; \
cd $(HOST_SUBDIR)/gold || exit 1; \
case $(srcdir) in \
/* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
*) topdir=`echo $(HOST_SUBDIR)/gold/ | \
sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
esac; \
- srcdiroption="--srcdir=$${topdir}/gold"; \
- libsrcdir="$$s/gold"; \
- $(SHELL) $${libsrcdir}/configure \
+ module_srcdir=gold; \
+ $(SHELL) $$s/$$module_srcdir/configure \
+ --srcdir=$${topdir}/$$module_srcdir \
$(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
- --target=${target_alias} $${srcdiroption} \
+ --target=${target_alias} \
--with-build-libsubdir=$(HOST_SUBDIR) \
$(STAGE3_CONFIGURE_FLAGS)
@endif gold-bootstrap
@@ -15747,19 +15534,19 @@ configure-stage4-gold:
CFLAGS="$(STAGE4_CFLAGS)"; export CFLAGS; \
CXXFLAGS="$(STAGE4_CXXFLAGS)"; export CXXFLAGS; \
LIBCFLAGS="$(STAGE4_CFLAGS)"; export LIBCFLAGS; \
- echo Configuring stage 4 in $(HOST_SUBDIR)/gold ; \
- $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/gold ; \
+ echo Configuring stage 4 in $(HOST_SUBDIR)/gold; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/gold; \
cd $(HOST_SUBDIR)/gold || exit 1; \
case $(srcdir) in \
/* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
*) topdir=`echo $(HOST_SUBDIR)/gold/ | \
sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
esac; \
- srcdiroption="--srcdir=$${topdir}/gold"; \
- libsrcdir="$$s/gold"; \
- $(SHELL) $${libsrcdir}/configure \
+ module_srcdir=gold; \
+ $(SHELL) $$s/$$module_srcdir/configure \
+ --srcdir=$${topdir}/$$module_srcdir \
$(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
- --target=${target_alias} $${srcdiroption} \
+ --target=${target_alias} \
--with-build-libsubdir=$(HOST_SUBDIR) \
$(STAGE4_CONFIGURE_FLAGS)
@endif gold-bootstrap
@@ -15780,19 +15567,19 @@ configure-stageprofile-gold:
CFLAGS="$(STAGEprofile_CFLAGS)"; export CFLAGS; \
CXXFLAGS="$(STAGEprofile_CXXFLAGS)"; export CXXFLAGS; \
LIBCFLAGS="$(STAGEprofile_CFLAGS)"; export LIBCFLAGS; \
- echo Configuring stage profile in $(HOST_SUBDIR)/gold ; \
- $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/gold ; \
+ echo Configuring stage profile in $(HOST_SUBDIR)/gold; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/gold; \
cd $(HOST_SUBDIR)/gold || exit 1; \
case $(srcdir) in \
/* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
*) topdir=`echo $(HOST_SUBDIR)/gold/ | \
sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
esac; \
- srcdiroption="--srcdir=$${topdir}/gold"; \
- libsrcdir="$$s/gold"; \
- $(SHELL) $${libsrcdir}/configure \
+ module_srcdir=gold; \
+ $(SHELL) $$s/$$module_srcdir/configure \
+ --srcdir=$${topdir}/$$module_srcdir \
$(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
- --target=${target_alias} $${srcdiroption} \
+ --target=${target_alias} \
--with-build-libsubdir=$(HOST_SUBDIR) \
$(STAGEprofile_CONFIGURE_FLAGS)
@endif gold-bootstrap
@@ -15813,19 +15600,19 @@ configure-stagefeedback-gold:
CFLAGS="$(STAGEfeedback_CFLAGS)"; export CFLAGS; \
CXXFLAGS="$(STAGEfeedback_CXXFLAGS)"; export CXXFLAGS; \
LIBCFLAGS="$(STAGEfeedback_CFLAGS)"; export LIBCFLAGS; \
- echo Configuring stage feedback in $(HOST_SUBDIR)/gold ; \
- $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/gold ; \
+ echo Configuring stage feedback in $(HOST_SUBDIR)/gold; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/gold; \
cd $(HOST_SUBDIR)/gold || exit 1; \
case $(srcdir) in \
/* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
*) topdir=`echo $(HOST_SUBDIR)/gold/ | \
sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
esac; \
- srcdiroption="--srcdir=$${topdir}/gold"; \
- libsrcdir="$$s/gold"; \
- $(SHELL) $${libsrcdir}/configure \
+ module_srcdir=gold; \
+ $(SHELL) $$s/$$module_srcdir/configure \
+ --srcdir=$${topdir}/$$module_srcdir \
$(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
- --target=${target_alias} $${srcdiroption} \
+ --target=${target_alias} \
--with-build-libsubdir=$(HOST_SUBDIR) \
$(STAGEfeedback_CONFIGURE_FLAGS)
@endif gold-bootstrap
@@ -16112,9 +15899,9 @@ check-gold:
@: $(MAKE); $(unstage)
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(HOST_EXPORTS) \
+ $(HOST_EXPORTS) $(EXTRA_HOST_EXPORTS) \
(cd $(HOST_SUBDIR)/gold && \
- $(MAKE) $(FLAGS_TO_PASS) check)
+ $(MAKE) $(FLAGS_TO_PASS) $(EXTRA_BOOTSTRAP_FLAGS) check)
@endif gold
@@ -16164,7 +15951,7 @@ info-gold: \
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing info in gold" ; \
+ echo "Doing info in gold"; \
(cd $(HOST_SUBDIR)/gold && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -16189,7 +15976,7 @@ dvi-gold: \
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing dvi in gold" ; \
+ echo "Doing dvi in gold"; \
(cd $(HOST_SUBDIR)/gold && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -16214,7 +16001,7 @@ pdf-gold: \
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing pdf in gold" ; \
+ echo "Doing pdf in gold"; \
(cd $(HOST_SUBDIR)/gold && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -16239,7 +16026,7 @@ html-gold: \
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing html in gold" ; \
+ echo "Doing html in gold"; \
(cd $(HOST_SUBDIR)/gold && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -16264,7 +16051,7 @@ TAGS-gold: \
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing TAGS in gold" ; \
+ echo "Doing TAGS in gold"; \
(cd $(HOST_SUBDIR)/gold && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -16290,7 +16077,7 @@ install-info-gold: \
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing install-info in gold" ; \
+ echo "Doing install-info in gold"; \
(cd $(HOST_SUBDIR)/gold && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -16316,7 +16103,7 @@ install-pdf-gold: \
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing install-pdf in gold" ; \
+ echo "Doing install-pdf in gold"; \
(cd $(HOST_SUBDIR)/gold && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -16342,7 +16129,7 @@ install-html-gold: \
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing install-html in gold" ; \
+ echo "Doing install-html in gold"; \
(cd $(HOST_SUBDIR)/gold && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -16367,7 +16154,7 @@ installcheck-gold: \
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing installcheck in gold" ; \
+ echo "Doing installcheck in gold"; \
(cd $(HOST_SUBDIR)/gold && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -16391,7 +16178,7 @@ mostlyclean-gold:
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing mostlyclean in gold" ; \
+ echo "Doing mostlyclean in gold"; \
(cd $(HOST_SUBDIR)/gold && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -16415,7 +16202,7 @@ clean-gold:
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing clean in gold" ; \
+ echo "Doing clean in gold"; \
(cd $(HOST_SUBDIR)/gold && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -16439,7 +16226,7 @@ distclean-gold:
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing distclean in gold" ; \
+ echo "Doing distclean in gold"; \
(cd $(HOST_SUBDIR)/gold && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -16463,7 +16250,7 @@ maintainer-clean-gold:
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing maintainer-clean in gold" ; \
+ echo "Doing maintainer-clean in gold"; \
(cd $(HOST_SUBDIR)/gold && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -16488,7 +16275,7 @@ configure-gprof:
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
test ! -f $(HOST_SUBDIR)/gprof/Makefile || exit 0; \
- $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/gprof ; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/gprof; \
$(HOST_EXPORTS) \
echo Configuring in $(HOST_SUBDIR)/gprof; \
cd "$(HOST_SUBDIR)/gprof" || exit 1; \
@@ -16497,11 +16284,12 @@ configure-gprof:
*) topdir=`echo $(HOST_SUBDIR)/gprof/ | \
sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
esac; \
- srcdiroption="--srcdir=$${topdir}/gprof"; \
- libsrcdir="$$s/gprof"; \
- $(SHELL) $${libsrcdir}/configure \
+ module_srcdir=gprof; \
+ $(SHELL) \
+ $$s/$$module_srcdir/configure \
+ --srcdir=$${topdir}/$$module_srcdir \
$(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
- --target=${target_alias} $${srcdiroption} \
+ --target=${target_alias} \
|| exit 1
@endif gprof
@@ -16539,7 +16327,7 @@ check-gprof:
@: $(MAKE); $(unstage)
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(HOST_EXPORTS) \
+ $(HOST_EXPORTS) \
(cd $(HOST_SUBDIR)/gprof && \
$(MAKE) $(FLAGS_TO_PASS) check)
@@ -16592,7 +16380,7 @@ info-gprof: \
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing info in gprof" ; \
+ echo "Doing info in gprof"; \
(cd $(HOST_SUBDIR)/gprof && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -16618,7 +16406,7 @@ dvi-gprof: \
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing dvi in gprof" ; \
+ echo "Doing dvi in gprof"; \
(cd $(HOST_SUBDIR)/gprof && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -16644,7 +16432,7 @@ pdf-gprof: \
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing pdf in gprof" ; \
+ echo "Doing pdf in gprof"; \
(cd $(HOST_SUBDIR)/gprof && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -16670,7 +16458,7 @@ html-gprof: \
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing html in gprof" ; \
+ echo "Doing html in gprof"; \
(cd $(HOST_SUBDIR)/gprof && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -16696,7 +16484,7 @@ TAGS-gprof: \
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing TAGS in gprof" ; \
+ echo "Doing TAGS in gprof"; \
(cd $(HOST_SUBDIR)/gprof && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -16723,7 +16511,7 @@ install-info-gprof: \
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing install-info in gprof" ; \
+ echo "Doing install-info in gprof"; \
(cd $(HOST_SUBDIR)/gprof && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -16750,7 +16538,7 @@ install-pdf-gprof: \
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing install-pdf in gprof" ; \
+ echo "Doing install-pdf in gprof"; \
(cd $(HOST_SUBDIR)/gprof && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -16777,7 +16565,7 @@ install-html-gprof: \
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing install-html in gprof" ; \
+ echo "Doing install-html in gprof"; \
(cd $(HOST_SUBDIR)/gprof && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -16803,7 +16591,7 @@ installcheck-gprof: \
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing installcheck in gprof" ; \
+ echo "Doing installcheck in gprof"; \
(cd $(HOST_SUBDIR)/gprof && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -16828,7 +16616,7 @@ mostlyclean-gprof:
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing mostlyclean in gprof" ; \
+ echo "Doing mostlyclean in gprof"; \
(cd $(HOST_SUBDIR)/gprof && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -16853,7 +16641,7 @@ clean-gprof:
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing clean in gprof" ; \
+ echo "Doing clean in gprof"; \
(cd $(HOST_SUBDIR)/gprof && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -16878,7 +16666,7 @@ distclean-gprof:
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing distclean in gprof" ; \
+ echo "Doing distclean in gprof"; \
(cd $(HOST_SUBDIR)/gprof && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -16903,7 +16691,7 @@ maintainer-clean-gprof:
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing maintainer-clean in gprof" ; \
+ echo "Doing maintainer-clean in gprof"; \
(cd $(HOST_SUBDIR)/gprof && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -16927,7 +16715,7 @@ configure-intl:
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
test ! -f $(HOST_SUBDIR)/intl/Makefile || exit 0; \
- $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/intl ; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/intl; \
$(HOST_EXPORTS) \
echo Configuring in $(HOST_SUBDIR)/intl; \
cd "$(HOST_SUBDIR)/intl" || exit 1; \
@@ -16936,11 +16724,12 @@ configure-intl:
*) topdir=`echo $(HOST_SUBDIR)/intl/ | \
sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
esac; \
- srcdiroption="--srcdir=$${topdir}/intl"; \
- libsrcdir="$$s/intl"; \
- $(SHELL) $${libsrcdir}/configure \
+ module_srcdir=intl; \
+ $(SHELL) \
+ $$s/$$module_srcdir/configure \
+ --srcdir=$${topdir}/$$module_srcdir \
$(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
- --target=${target_alias} $${srcdiroption} \
+ --target=${target_alias} \
|| exit 1
@endif intl
@@ -16961,19 +16750,20 @@ configure-stage1-intl:
CFLAGS="$(STAGE1_CFLAGS)"; export CFLAGS; \
CXXFLAGS="$(STAGE1_CXXFLAGS)"; export CXXFLAGS; \
LIBCFLAGS="$(LIBCFLAGS)"; export LIBCFLAGS; \
- echo Configuring stage 1 in $(HOST_SUBDIR)/intl ; \
- $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/intl ; \
+ echo Configuring stage 1 in $(HOST_SUBDIR)/intl; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/intl; \
cd $(HOST_SUBDIR)/intl || exit 1; \
case $(srcdir) in \
/* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
*) topdir=`echo $(HOST_SUBDIR)/intl/ | \
sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
esac; \
- srcdiroption="--srcdir=$${topdir}/intl"; \
- libsrcdir="$$s/intl"; \
- $(SHELL) $${libsrcdir}/configure \
+ module_srcdir=intl; \
+ $(SHELL) $$s/$$module_srcdir/configure \
+ --srcdir=$${topdir}/$$module_srcdir \
$(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
- --target=${target_alias} $${srcdiroption} \
+ --target=${target_alias} \
+ \
$(STAGE1_CONFIGURE_FLAGS)
@endif intl-bootstrap
@@ -16993,19 +16783,19 @@ configure-stage2-intl:
CFLAGS="$(STAGE2_CFLAGS)"; export CFLAGS; \
CXXFLAGS="$(STAGE2_CXXFLAGS)"; export CXXFLAGS; \
LIBCFLAGS="$(STAGE2_CFLAGS)"; export LIBCFLAGS; \
- echo Configuring stage 2 in $(HOST_SUBDIR)/intl ; \
- $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/intl ; \
+ echo Configuring stage 2 in $(HOST_SUBDIR)/intl; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/intl; \
cd $(HOST_SUBDIR)/intl || exit 1; \
case $(srcdir) in \
/* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
*) topdir=`echo $(HOST_SUBDIR)/intl/ | \
sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
esac; \
- srcdiroption="--srcdir=$${topdir}/intl"; \
- libsrcdir="$$s/intl"; \
- $(SHELL) $${libsrcdir}/configure \
+ module_srcdir=intl; \
+ $(SHELL) $$s/$$module_srcdir/configure \
+ --srcdir=$${topdir}/$$module_srcdir \
$(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
- --target=${target_alias} $${srcdiroption} \
+ --target=${target_alias} \
--with-build-libsubdir=$(HOST_SUBDIR) \
$(STAGE2_CONFIGURE_FLAGS)
@endif intl-bootstrap
@@ -17026,19 +16816,19 @@ configure-stage3-intl:
CFLAGS="$(STAGE3_CFLAGS)"; export CFLAGS; \
CXXFLAGS="$(STAGE3_CXXFLAGS)"; export CXXFLAGS; \
LIBCFLAGS="$(STAGE3_CFLAGS)"; export LIBCFLAGS; \
- echo Configuring stage 3 in $(HOST_SUBDIR)/intl ; \
- $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/intl ; \
+ echo Configuring stage 3 in $(HOST_SUBDIR)/intl; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/intl; \
cd $(HOST_SUBDIR)/intl || exit 1; \
case $(srcdir) in \
/* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
*) topdir=`echo $(HOST_SUBDIR)/intl/ | \
sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
esac; \
- srcdiroption="--srcdir=$${topdir}/intl"; \
- libsrcdir="$$s/intl"; \
- $(SHELL) $${libsrcdir}/configure \
+ module_srcdir=intl; \
+ $(SHELL) $$s/$$module_srcdir/configure \
+ --srcdir=$${topdir}/$$module_srcdir \
$(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
- --target=${target_alias} $${srcdiroption} \
+ --target=${target_alias} \
--with-build-libsubdir=$(HOST_SUBDIR) \
$(STAGE3_CONFIGURE_FLAGS)
@endif intl-bootstrap
@@ -17059,19 +16849,19 @@ configure-stage4-intl:
CFLAGS="$(STAGE4_CFLAGS)"; export CFLAGS; \
CXXFLAGS="$(STAGE4_CXXFLAGS)"; export CXXFLAGS; \
LIBCFLAGS="$(STAGE4_CFLAGS)"; export LIBCFLAGS; \
- echo Configuring stage 4 in $(HOST_SUBDIR)/intl ; \
- $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/intl ; \
+ echo Configuring stage 4 in $(HOST_SUBDIR)/intl; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/intl; \
cd $(HOST_SUBDIR)/intl || exit 1; \
case $(srcdir) in \
/* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
*) topdir=`echo $(HOST_SUBDIR)/intl/ | \
sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
esac; \
- srcdiroption="--srcdir=$${topdir}/intl"; \
- libsrcdir="$$s/intl"; \
- $(SHELL) $${libsrcdir}/configure \
+ module_srcdir=intl; \
+ $(SHELL) $$s/$$module_srcdir/configure \
+ --srcdir=$${topdir}/$$module_srcdir \
$(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
- --target=${target_alias} $${srcdiroption} \
+ --target=${target_alias} \
--with-build-libsubdir=$(HOST_SUBDIR) \
$(STAGE4_CONFIGURE_FLAGS)
@endif intl-bootstrap
@@ -17092,19 +16882,19 @@ configure-stageprofile-intl:
CFLAGS="$(STAGEprofile_CFLAGS)"; export CFLAGS; \
CXXFLAGS="$(STAGEprofile_CXXFLAGS)"; export CXXFLAGS; \
LIBCFLAGS="$(STAGEprofile_CFLAGS)"; export LIBCFLAGS; \
- echo Configuring stage profile in $(HOST_SUBDIR)/intl ; \
- $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/intl ; \
+ echo Configuring stage profile in $(HOST_SUBDIR)/intl; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/intl; \
cd $(HOST_SUBDIR)/intl || exit 1; \
case $(srcdir) in \
/* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
*) topdir=`echo $(HOST_SUBDIR)/intl/ | \
sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
esac; \
- srcdiroption="--srcdir=$${topdir}/intl"; \
- libsrcdir="$$s/intl"; \
- $(SHELL) $${libsrcdir}/configure \
+ module_srcdir=intl; \
+ $(SHELL) $$s/$$module_srcdir/configure \
+ --srcdir=$${topdir}/$$module_srcdir \
$(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
- --target=${target_alias} $${srcdiroption} \
+ --target=${target_alias} \
--with-build-libsubdir=$(HOST_SUBDIR) \
$(STAGEprofile_CONFIGURE_FLAGS)
@endif intl-bootstrap
@@ -17125,19 +16915,19 @@ configure-stagefeedback-intl:
CFLAGS="$(STAGEfeedback_CFLAGS)"; export CFLAGS; \
CXXFLAGS="$(STAGEfeedback_CXXFLAGS)"; export CXXFLAGS; \
LIBCFLAGS="$(STAGEfeedback_CFLAGS)"; export LIBCFLAGS; \
- echo Configuring stage feedback in $(HOST_SUBDIR)/intl ; \
- $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/intl ; \
+ echo Configuring stage feedback in $(HOST_SUBDIR)/intl; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/intl; \
cd $(HOST_SUBDIR)/intl || exit 1; \
case $(srcdir) in \
/* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
*) topdir=`echo $(HOST_SUBDIR)/intl/ | \
sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
esac; \
- srcdiroption="--srcdir=$${topdir}/intl"; \
- libsrcdir="$$s/intl"; \
- $(SHELL) $${libsrcdir}/configure \
+ module_srcdir=intl; \
+ $(SHELL) $$s/$$module_srcdir/configure \
+ --srcdir=$${topdir}/$$module_srcdir \
$(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
- --target=${target_alias} $${srcdiroption} \
+ --target=${target_alias} \
--with-build-libsubdir=$(HOST_SUBDIR) \
$(STAGEfeedback_CONFIGURE_FLAGS)
@endif intl-bootstrap
@@ -17424,9 +17214,9 @@ check-intl:
@: $(MAKE); $(unstage)
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(HOST_EXPORTS) \
+ $(HOST_EXPORTS) $(EXTRA_HOST_EXPORTS) \
(cd $(HOST_SUBDIR)/intl && \
- $(MAKE) $(FLAGS_TO_PASS) check)
+ $(MAKE) $(FLAGS_TO_PASS) $(EXTRA_BOOTSTRAP_FLAGS) check)
@endif intl
@@ -17476,7 +17266,7 @@ info-intl: \
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing info in intl" ; \
+ echo "Doing info in intl"; \
(cd $(HOST_SUBDIR)/intl && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -17501,7 +17291,7 @@ dvi-intl: \
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing dvi in intl" ; \
+ echo "Doing dvi in intl"; \
(cd $(HOST_SUBDIR)/intl && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -17526,7 +17316,7 @@ pdf-intl: \
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing pdf in intl" ; \
+ echo "Doing pdf in intl"; \
(cd $(HOST_SUBDIR)/intl && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -17551,7 +17341,7 @@ html-intl: \
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing html in intl" ; \
+ echo "Doing html in intl"; \
(cd $(HOST_SUBDIR)/intl && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -17576,7 +17366,7 @@ TAGS-intl: \
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing TAGS in intl" ; \
+ echo "Doing TAGS in intl"; \
(cd $(HOST_SUBDIR)/intl && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -17602,7 +17392,7 @@ install-info-intl: \
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing install-info in intl" ; \
+ echo "Doing install-info in intl"; \
(cd $(HOST_SUBDIR)/intl && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -17628,7 +17418,7 @@ install-pdf-intl: \
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing install-pdf in intl" ; \
+ echo "Doing install-pdf in intl"; \
(cd $(HOST_SUBDIR)/intl && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -17654,7 +17444,7 @@ install-html-intl: \
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing install-html in intl" ; \
+ echo "Doing install-html in intl"; \
(cd $(HOST_SUBDIR)/intl && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -17679,7 +17469,7 @@ installcheck-intl: \
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing installcheck in intl" ; \
+ echo "Doing installcheck in intl"; \
(cd $(HOST_SUBDIR)/intl && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -17703,7 +17493,7 @@ mostlyclean-intl:
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing mostlyclean in intl" ; \
+ echo "Doing mostlyclean in intl"; \
(cd $(HOST_SUBDIR)/intl && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -17727,7 +17517,7 @@ clean-intl:
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing clean in intl" ; \
+ echo "Doing clean in intl"; \
(cd $(HOST_SUBDIR)/intl && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -17751,7 +17541,7 @@ distclean-intl:
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing distclean in intl" ; \
+ echo "Doing distclean in intl"; \
(cd $(HOST_SUBDIR)/intl && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -17775,7 +17565,7 @@ maintainer-clean-intl:
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing maintainer-clean in intl" ; \
+ echo "Doing maintainer-clean in intl"; \
(cd $(HOST_SUBDIR)/intl && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -17800,7 +17590,7 @@ configure-tcl:
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
test ! -f $(HOST_SUBDIR)/tcl/Makefile || exit 0; \
- $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/tcl ; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/tcl; \
$(HOST_EXPORTS) \
echo Configuring in $(HOST_SUBDIR)/tcl; \
cd "$(HOST_SUBDIR)/tcl" || exit 1; \
@@ -17809,11 +17599,12 @@ configure-tcl:
*) topdir=`echo $(HOST_SUBDIR)/tcl/ | \
sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
esac; \
- srcdiroption="--srcdir=$${topdir}/tcl"; \
- libsrcdir="$$s/tcl"; \
- $(SHELL) $${libsrcdir}/configure \
+ module_srcdir=tcl; \
+ $(SHELL) \
+ $$s/$$module_srcdir/configure \
+ --srcdir=$${topdir}/$$module_srcdir \
$(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
- --target=${target_alias} $${srcdiroption} \
+ --target=${target_alias} \
|| exit 1
@endif tcl
@@ -17851,7 +17642,7 @@ check-tcl:
@: $(MAKE); $(unstage)
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(HOST_EXPORTS) \
+ $(HOST_EXPORTS) \
(cd $(HOST_SUBDIR)/tcl && \
$(MAKE) $(FLAGS_TO_PASS) check)
@@ -17904,7 +17695,7 @@ info-tcl: \
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing info in tcl" ; \
+ echo "Doing info in tcl"; \
(cd $(HOST_SUBDIR)/tcl && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -17930,7 +17721,7 @@ dvi-tcl: \
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing dvi in tcl" ; \
+ echo "Doing dvi in tcl"; \
(cd $(HOST_SUBDIR)/tcl && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -17956,7 +17747,7 @@ pdf-tcl: \
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing pdf in tcl" ; \
+ echo "Doing pdf in tcl"; \
(cd $(HOST_SUBDIR)/tcl && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -17982,7 +17773,7 @@ html-tcl: \
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing html in tcl" ; \
+ echo "Doing html in tcl"; \
(cd $(HOST_SUBDIR)/tcl && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -18008,7 +17799,7 @@ TAGS-tcl: \
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing TAGS in tcl" ; \
+ echo "Doing TAGS in tcl"; \
(cd $(HOST_SUBDIR)/tcl && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -18035,7 +17826,7 @@ install-info-tcl: \
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing install-info in tcl" ; \
+ echo "Doing install-info in tcl"; \
(cd $(HOST_SUBDIR)/tcl && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -18062,7 +17853,7 @@ install-pdf-tcl: \
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing install-pdf in tcl" ; \
+ echo "Doing install-pdf in tcl"; \
(cd $(HOST_SUBDIR)/tcl && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -18089,7 +17880,7 @@ install-html-tcl: \
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing install-html in tcl" ; \
+ echo "Doing install-html in tcl"; \
(cd $(HOST_SUBDIR)/tcl && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -18115,7 +17906,7 @@ installcheck-tcl: \
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing installcheck in tcl" ; \
+ echo "Doing installcheck in tcl"; \
(cd $(HOST_SUBDIR)/tcl && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -18150,7 +17941,7 @@ clean-tcl:
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing clean in tcl" ; \
+ echo "Doing clean in tcl"; \
(cd $(HOST_SUBDIR)/tcl && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -18175,7 +17966,7 @@ distclean-tcl:
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing distclean in tcl" ; \
+ echo "Doing distclean in tcl"; \
(cd $(HOST_SUBDIR)/tcl && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -18200,7 +17991,7 @@ maintainer-clean-tcl:
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing maintainer-clean in tcl" ; \
+ echo "Doing maintainer-clean in tcl"; \
(cd $(HOST_SUBDIR)/tcl && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -18225,7 +18016,7 @@ configure-itcl:
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
test ! -f $(HOST_SUBDIR)/itcl/Makefile || exit 0; \
- $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/itcl ; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/itcl; \
$(HOST_EXPORTS) \
echo Configuring in $(HOST_SUBDIR)/itcl; \
cd "$(HOST_SUBDIR)/itcl" || exit 1; \
@@ -18234,11 +18025,12 @@ configure-itcl:
*) topdir=`echo $(HOST_SUBDIR)/itcl/ | \
sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
esac; \
- srcdiroption="--srcdir=$${topdir}/itcl"; \
- libsrcdir="$$s/itcl"; \
- $(SHELL) $${libsrcdir}/configure \
+ module_srcdir=itcl; \
+ $(SHELL) \
+ $$s/$$module_srcdir/configure \
+ --srcdir=$${topdir}/$$module_srcdir \
$(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
- --target=${target_alias} $${srcdiroption} \
+ --target=${target_alias} \
|| exit 1
@endif itcl
@@ -18276,7 +18068,7 @@ check-itcl:
@: $(MAKE); $(unstage)
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(HOST_EXPORTS) \
+ $(HOST_EXPORTS) \
(cd $(HOST_SUBDIR)/itcl && \
$(MAKE) $(FLAGS_TO_PASS) check)
@@ -18329,7 +18121,7 @@ info-itcl: \
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing info in itcl" ; \
+ echo "Doing info in itcl"; \
(cd $(HOST_SUBDIR)/itcl && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -18355,7 +18147,7 @@ dvi-itcl: \
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing dvi in itcl" ; \
+ echo "Doing dvi in itcl"; \
(cd $(HOST_SUBDIR)/itcl && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -18381,7 +18173,7 @@ pdf-itcl: \
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing pdf in itcl" ; \
+ echo "Doing pdf in itcl"; \
(cd $(HOST_SUBDIR)/itcl && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -18407,7 +18199,7 @@ html-itcl: \
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing html in itcl" ; \
+ echo "Doing html in itcl"; \
(cd $(HOST_SUBDIR)/itcl && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -18433,7 +18225,7 @@ TAGS-itcl: \
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing TAGS in itcl" ; \
+ echo "Doing TAGS in itcl"; \
(cd $(HOST_SUBDIR)/itcl && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -18460,7 +18252,7 @@ install-info-itcl: \
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing install-info in itcl" ; \
+ echo "Doing install-info in itcl"; \
(cd $(HOST_SUBDIR)/itcl && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -18487,7 +18279,7 @@ install-pdf-itcl: \
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing install-pdf in itcl" ; \
+ echo "Doing install-pdf in itcl"; \
(cd $(HOST_SUBDIR)/itcl && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -18514,7 +18306,7 @@ install-html-itcl: \
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing install-html in itcl" ; \
+ echo "Doing install-html in itcl"; \
(cd $(HOST_SUBDIR)/itcl && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -18540,7 +18332,7 @@ installcheck-itcl: \
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing installcheck in itcl" ; \
+ echo "Doing installcheck in itcl"; \
(cd $(HOST_SUBDIR)/itcl && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -18565,7 +18357,7 @@ mostlyclean-itcl:
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing mostlyclean in itcl" ; \
+ echo "Doing mostlyclean in itcl"; \
(cd $(HOST_SUBDIR)/itcl && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -18590,7 +18382,7 @@ clean-itcl:
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing clean in itcl" ; \
+ echo "Doing clean in itcl"; \
(cd $(HOST_SUBDIR)/itcl && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -18615,7 +18407,7 @@ distclean-itcl:
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing distclean in itcl" ; \
+ echo "Doing distclean in itcl"; \
(cd $(HOST_SUBDIR)/itcl && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -18640,7 +18432,7 @@ maintainer-clean-itcl:
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing maintainer-clean in itcl" ; \
+ echo "Doing maintainer-clean in itcl"; \
(cd $(HOST_SUBDIR)/itcl && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -18664,7 +18456,7 @@ configure-ld:
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
test ! -f $(HOST_SUBDIR)/ld/Makefile || exit 0; \
- $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/ld ; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/ld; \
$(HOST_EXPORTS) \
echo Configuring in $(HOST_SUBDIR)/ld; \
cd "$(HOST_SUBDIR)/ld" || exit 1; \
@@ -18673,11 +18465,12 @@ configure-ld:
*) topdir=`echo $(HOST_SUBDIR)/ld/ | \
sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
esac; \
- srcdiroption="--srcdir=$${topdir}/ld"; \
- libsrcdir="$$s/ld"; \
- $(SHELL) $${libsrcdir}/configure \
+ module_srcdir=ld; \
+ $(SHELL) \
+ $$s/$$module_srcdir/configure \
+ --srcdir=$${topdir}/$$module_srcdir \
$(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
- --target=${target_alias} $${srcdiroption} \
+ --target=${target_alias} \
|| exit 1
@endif ld
@@ -18698,19 +18491,20 @@ configure-stage1-ld:
CFLAGS="$(STAGE1_CFLAGS)"; export CFLAGS; \
CXXFLAGS="$(STAGE1_CXXFLAGS)"; export CXXFLAGS; \
LIBCFLAGS="$(LIBCFLAGS)"; export LIBCFLAGS; \
- echo Configuring stage 1 in $(HOST_SUBDIR)/ld ; \
- $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/ld ; \
+ echo Configuring stage 1 in $(HOST_SUBDIR)/ld; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/ld; \
cd $(HOST_SUBDIR)/ld || exit 1; \
case $(srcdir) in \
/* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
*) topdir=`echo $(HOST_SUBDIR)/ld/ | \
sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
esac; \
- srcdiroption="--srcdir=$${topdir}/ld"; \
- libsrcdir="$$s/ld"; \
- $(SHELL) $${libsrcdir}/configure \
+ module_srcdir=ld; \
+ $(SHELL) $$s/$$module_srcdir/configure \
+ --srcdir=$${topdir}/$$module_srcdir \
$(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
- --target=${target_alias} $${srcdiroption} \
+ --target=${target_alias} \
+ \
$(STAGE1_CONFIGURE_FLAGS)
@endif ld-bootstrap
@@ -18730,19 +18524,19 @@ configure-stage2-ld:
CFLAGS="$(STAGE2_CFLAGS)"; export CFLAGS; \
CXXFLAGS="$(STAGE2_CXXFLAGS)"; export CXXFLAGS; \
LIBCFLAGS="$(STAGE2_CFLAGS)"; export LIBCFLAGS; \
- echo Configuring stage 2 in $(HOST_SUBDIR)/ld ; \
- $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/ld ; \
+ echo Configuring stage 2 in $(HOST_SUBDIR)/ld; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/ld; \
cd $(HOST_SUBDIR)/ld || exit 1; \
case $(srcdir) in \
/* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
*) topdir=`echo $(HOST_SUBDIR)/ld/ | \
sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
esac; \
- srcdiroption="--srcdir=$${topdir}/ld"; \
- libsrcdir="$$s/ld"; \
- $(SHELL) $${libsrcdir}/configure \
+ module_srcdir=ld; \
+ $(SHELL) $$s/$$module_srcdir/configure \
+ --srcdir=$${topdir}/$$module_srcdir \
$(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
- --target=${target_alias} $${srcdiroption} \
+ --target=${target_alias} \
--with-build-libsubdir=$(HOST_SUBDIR) \
$(STAGE2_CONFIGURE_FLAGS)
@endif ld-bootstrap
@@ -18763,19 +18557,19 @@ configure-stage3-ld:
CFLAGS="$(STAGE3_CFLAGS)"; export CFLAGS; \
CXXFLAGS="$(STAGE3_CXXFLAGS)"; export CXXFLAGS; \
LIBCFLAGS="$(STAGE3_CFLAGS)"; export LIBCFLAGS; \
- echo Configuring stage 3 in $(HOST_SUBDIR)/ld ; \
- $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/ld ; \
+ echo Configuring stage 3 in $(HOST_SUBDIR)/ld; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/ld; \
cd $(HOST_SUBDIR)/ld || exit 1; \
case $(srcdir) in \
/* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
*) topdir=`echo $(HOST_SUBDIR)/ld/ | \
sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
esac; \
- srcdiroption="--srcdir=$${topdir}/ld"; \
- libsrcdir="$$s/ld"; \
- $(SHELL) $${libsrcdir}/configure \
+ module_srcdir=ld; \
+ $(SHELL) $$s/$$module_srcdir/configure \
+ --srcdir=$${topdir}/$$module_srcdir \
$(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
- --target=${target_alias} $${srcdiroption} \
+ --target=${target_alias} \
--with-build-libsubdir=$(HOST_SUBDIR) \
$(STAGE3_CONFIGURE_FLAGS)
@endif ld-bootstrap
@@ -18796,19 +18590,19 @@ configure-stage4-ld:
CFLAGS="$(STAGE4_CFLAGS)"; export CFLAGS; \
CXXFLAGS="$(STAGE4_CXXFLAGS)"; export CXXFLAGS; \
LIBCFLAGS="$(STAGE4_CFLAGS)"; export LIBCFLAGS; \
- echo Configuring stage 4 in $(HOST_SUBDIR)/ld ; \
- $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/ld ; \
+ echo Configuring stage 4 in $(HOST_SUBDIR)/ld; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/ld; \
cd $(HOST_SUBDIR)/ld || exit 1; \
case $(srcdir) in \
/* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
*) topdir=`echo $(HOST_SUBDIR)/ld/ | \
sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
esac; \
- srcdiroption="--srcdir=$${topdir}/ld"; \
- libsrcdir="$$s/ld"; \
- $(SHELL) $${libsrcdir}/configure \
+ module_srcdir=ld; \
+ $(SHELL) $$s/$$module_srcdir/configure \
+ --srcdir=$${topdir}/$$module_srcdir \
$(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
- --target=${target_alias} $${srcdiroption} \
+ --target=${target_alias} \
--with-build-libsubdir=$(HOST_SUBDIR) \
$(STAGE4_CONFIGURE_FLAGS)
@endif ld-bootstrap
@@ -18829,19 +18623,19 @@ configure-stageprofile-ld:
CFLAGS="$(STAGEprofile_CFLAGS)"; export CFLAGS; \
CXXFLAGS="$(STAGEprofile_CXXFLAGS)"; export CXXFLAGS; \
LIBCFLAGS="$(STAGEprofile_CFLAGS)"; export LIBCFLAGS; \
- echo Configuring stage profile in $(HOST_SUBDIR)/ld ; \
- $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/ld ; \
+ echo Configuring stage profile in $(HOST_SUBDIR)/ld; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/ld; \
cd $(HOST_SUBDIR)/ld || exit 1; \
case $(srcdir) in \
/* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
*) topdir=`echo $(HOST_SUBDIR)/ld/ | \
sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
esac; \
- srcdiroption="--srcdir=$${topdir}/ld"; \
- libsrcdir="$$s/ld"; \
- $(SHELL) $${libsrcdir}/configure \
+ module_srcdir=ld; \
+ $(SHELL) $$s/$$module_srcdir/configure \
+ --srcdir=$${topdir}/$$module_srcdir \
$(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
- --target=${target_alias} $${srcdiroption} \
+ --target=${target_alias} \
--with-build-libsubdir=$(HOST_SUBDIR) \
$(STAGEprofile_CONFIGURE_FLAGS)
@endif ld-bootstrap
@@ -18862,19 +18656,19 @@ configure-stagefeedback-ld:
CFLAGS="$(STAGEfeedback_CFLAGS)"; export CFLAGS; \
CXXFLAGS="$(STAGEfeedback_CXXFLAGS)"; export CXXFLAGS; \
LIBCFLAGS="$(STAGEfeedback_CFLAGS)"; export LIBCFLAGS; \
- echo Configuring stage feedback in $(HOST_SUBDIR)/ld ; \
- $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/ld ; \
+ echo Configuring stage feedback in $(HOST_SUBDIR)/ld; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/ld; \
cd $(HOST_SUBDIR)/ld || exit 1; \
case $(srcdir) in \
/* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
*) topdir=`echo $(HOST_SUBDIR)/ld/ | \
sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
esac; \
- srcdiroption="--srcdir=$${topdir}/ld"; \
- libsrcdir="$$s/ld"; \
- $(SHELL) $${libsrcdir}/configure \
+ module_srcdir=ld; \
+ $(SHELL) $$s/$$module_srcdir/configure \
+ --srcdir=$${topdir}/$$module_srcdir \
$(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
- --target=${target_alias} $${srcdiroption} \
+ --target=${target_alias} \
--with-build-libsubdir=$(HOST_SUBDIR) \
$(STAGEfeedback_CONFIGURE_FLAGS)
@endif ld-bootstrap
@@ -19161,9 +18955,9 @@ check-ld:
@: $(MAKE); $(unstage)
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(HOST_EXPORTS) \
+ $(HOST_EXPORTS) $(EXTRA_HOST_EXPORTS) \
(cd $(HOST_SUBDIR)/ld && \
- $(MAKE) $(FLAGS_TO_PASS) check)
+ $(MAKE) $(FLAGS_TO_PASS) $(EXTRA_BOOTSTRAP_FLAGS) check)
@endif ld
@@ -19213,7 +19007,7 @@ info-ld: \
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing info in ld" ; \
+ echo "Doing info in ld"; \
(cd $(HOST_SUBDIR)/ld && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -19238,7 +19032,7 @@ dvi-ld: \
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing dvi in ld" ; \
+ echo "Doing dvi in ld"; \
(cd $(HOST_SUBDIR)/ld && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -19263,7 +19057,7 @@ pdf-ld: \
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing pdf in ld" ; \
+ echo "Doing pdf in ld"; \
(cd $(HOST_SUBDIR)/ld && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -19288,7 +19082,7 @@ html-ld: \
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing html in ld" ; \
+ echo "Doing html in ld"; \
(cd $(HOST_SUBDIR)/ld && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -19313,7 +19107,7 @@ TAGS-ld: \
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing TAGS in ld" ; \
+ echo "Doing TAGS in ld"; \
(cd $(HOST_SUBDIR)/ld && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -19339,7 +19133,7 @@ install-info-ld: \
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing install-info in ld" ; \
+ echo "Doing install-info in ld"; \
(cd $(HOST_SUBDIR)/ld && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -19365,7 +19159,7 @@ install-pdf-ld: \
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing install-pdf in ld" ; \
+ echo "Doing install-pdf in ld"; \
(cd $(HOST_SUBDIR)/ld && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -19391,7 +19185,7 @@ install-html-ld: \
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing install-html in ld" ; \
+ echo "Doing install-html in ld"; \
(cd $(HOST_SUBDIR)/ld && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -19416,7 +19210,7 @@ installcheck-ld: \
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing installcheck in ld" ; \
+ echo "Doing installcheck in ld"; \
(cd $(HOST_SUBDIR)/ld && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -19440,7 +19234,7 @@ mostlyclean-ld:
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing mostlyclean in ld" ; \
+ echo "Doing mostlyclean in ld"; \
(cd $(HOST_SUBDIR)/ld && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -19464,7 +19258,7 @@ clean-ld:
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing clean in ld" ; \
+ echo "Doing clean in ld"; \
(cd $(HOST_SUBDIR)/ld && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -19488,7 +19282,7 @@ distclean-ld:
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing distclean in ld" ; \
+ echo "Doing distclean in ld"; \
(cd $(HOST_SUBDIR)/ld && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -19512,7 +19306,7 @@ maintainer-clean-ld:
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing maintainer-clean in ld" ; \
+ echo "Doing maintainer-clean in ld"; \
(cd $(HOST_SUBDIR)/ld && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -19536,7 +19330,7 @@ configure-libbacktrace:
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
test ! -f $(HOST_SUBDIR)/libbacktrace/Makefile || exit 0; \
- $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/libbacktrace ; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/libbacktrace; \
$(HOST_EXPORTS) \
echo Configuring in $(HOST_SUBDIR)/libbacktrace; \
cd "$(HOST_SUBDIR)/libbacktrace" || exit 1; \
@@ -19545,11 +19339,12 @@ configure-libbacktrace:
*) topdir=`echo $(HOST_SUBDIR)/libbacktrace/ | \
sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
esac; \
- srcdiroption="--srcdir=$${topdir}/libbacktrace"; \
- libsrcdir="$$s/libbacktrace"; \
- $(SHELL) $${libsrcdir}/configure \
+ module_srcdir=libbacktrace; \
+ $(SHELL) \
+ $$s/$$module_srcdir/configure \
+ --srcdir=$${topdir}/$$module_srcdir \
$(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
- --target=${target_alias} $${srcdiroption} \
+ --target=${target_alias} \
|| exit 1
@endif libbacktrace
@@ -19570,19 +19365,20 @@ configure-stage1-libbacktrace:
CFLAGS="$(STAGE1_CFLAGS)"; export CFLAGS; \
CXXFLAGS="$(STAGE1_CXXFLAGS)"; export CXXFLAGS; \
LIBCFLAGS="$(LIBCFLAGS)"; export LIBCFLAGS; \
- echo Configuring stage 1 in $(HOST_SUBDIR)/libbacktrace ; \
- $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/libbacktrace ; \
+ echo Configuring stage 1 in $(HOST_SUBDIR)/libbacktrace; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/libbacktrace; \
cd $(HOST_SUBDIR)/libbacktrace || exit 1; \
case $(srcdir) in \
/* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
*) topdir=`echo $(HOST_SUBDIR)/libbacktrace/ | \
sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
esac; \
- srcdiroption="--srcdir=$${topdir}/libbacktrace"; \
- libsrcdir="$$s/libbacktrace"; \
- $(SHELL) $${libsrcdir}/configure \
+ module_srcdir=libbacktrace; \
+ $(SHELL) $$s/$$module_srcdir/configure \
+ --srcdir=$${topdir}/$$module_srcdir \
$(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
- --target=${target_alias} $${srcdiroption} \
+ --target=${target_alias} \
+ \
$(STAGE1_CONFIGURE_FLAGS)
@endif libbacktrace-bootstrap
@@ -19602,19 +19398,19 @@ configure-stage2-libbacktrace:
CFLAGS="$(STAGE2_CFLAGS)"; export CFLAGS; \
CXXFLAGS="$(STAGE2_CXXFLAGS)"; export CXXFLAGS; \
LIBCFLAGS="$(STAGE2_CFLAGS)"; export LIBCFLAGS; \
- echo Configuring stage 2 in $(HOST_SUBDIR)/libbacktrace ; \
- $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/libbacktrace ; \
+ echo Configuring stage 2 in $(HOST_SUBDIR)/libbacktrace; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/libbacktrace; \
cd $(HOST_SUBDIR)/libbacktrace || exit 1; \
case $(srcdir) in \
/* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
*) topdir=`echo $(HOST_SUBDIR)/libbacktrace/ | \
sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
esac; \
- srcdiroption="--srcdir=$${topdir}/libbacktrace"; \
- libsrcdir="$$s/libbacktrace"; \
- $(SHELL) $${libsrcdir}/configure \
+ module_srcdir=libbacktrace; \
+ $(SHELL) $$s/$$module_srcdir/configure \
+ --srcdir=$${topdir}/$$module_srcdir \
$(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
- --target=${target_alias} $${srcdiroption} \
+ --target=${target_alias} \
--with-build-libsubdir=$(HOST_SUBDIR) \
$(STAGE2_CONFIGURE_FLAGS)
@endif libbacktrace-bootstrap
@@ -19635,19 +19431,19 @@ configure-stage3-libbacktrace:
CFLAGS="$(STAGE3_CFLAGS)"; export CFLAGS; \
CXXFLAGS="$(STAGE3_CXXFLAGS)"; export CXXFLAGS; \
LIBCFLAGS="$(STAGE3_CFLAGS)"; export LIBCFLAGS; \
- echo Configuring stage 3 in $(HOST_SUBDIR)/libbacktrace ; \
- $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/libbacktrace ; \
+ echo Configuring stage 3 in $(HOST_SUBDIR)/libbacktrace; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/libbacktrace; \
cd $(HOST_SUBDIR)/libbacktrace || exit 1; \
case $(srcdir) in \
/* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
*) topdir=`echo $(HOST_SUBDIR)/libbacktrace/ | \
sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
esac; \
- srcdiroption="--srcdir=$${topdir}/libbacktrace"; \
- libsrcdir="$$s/libbacktrace"; \
- $(SHELL) $${libsrcdir}/configure \
+ module_srcdir=libbacktrace; \
+ $(SHELL) $$s/$$module_srcdir/configure \
+ --srcdir=$${topdir}/$$module_srcdir \
$(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
- --target=${target_alias} $${srcdiroption} \
+ --target=${target_alias} \
--with-build-libsubdir=$(HOST_SUBDIR) \
$(STAGE3_CONFIGURE_FLAGS)
@endif libbacktrace-bootstrap
@@ -19668,19 +19464,19 @@ configure-stage4-libbacktrace:
CFLAGS="$(STAGE4_CFLAGS)"; export CFLAGS; \
CXXFLAGS="$(STAGE4_CXXFLAGS)"; export CXXFLAGS; \
LIBCFLAGS="$(STAGE4_CFLAGS)"; export LIBCFLAGS; \
- echo Configuring stage 4 in $(HOST_SUBDIR)/libbacktrace ; \
- $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/libbacktrace ; \
+ echo Configuring stage 4 in $(HOST_SUBDIR)/libbacktrace; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/libbacktrace; \
cd $(HOST_SUBDIR)/libbacktrace || exit 1; \
case $(srcdir) in \
/* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
*) topdir=`echo $(HOST_SUBDIR)/libbacktrace/ | \
sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
esac; \
- srcdiroption="--srcdir=$${topdir}/libbacktrace"; \
- libsrcdir="$$s/libbacktrace"; \
- $(SHELL) $${libsrcdir}/configure \
+ module_srcdir=libbacktrace; \
+ $(SHELL) $$s/$$module_srcdir/configure \
+ --srcdir=$${topdir}/$$module_srcdir \
$(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
- --target=${target_alias} $${srcdiroption} \
+ --target=${target_alias} \
--with-build-libsubdir=$(HOST_SUBDIR) \
$(STAGE4_CONFIGURE_FLAGS)
@endif libbacktrace-bootstrap
@@ -19701,19 +19497,19 @@ configure-stageprofile-libbacktrace:
CFLAGS="$(STAGEprofile_CFLAGS)"; export CFLAGS; \
CXXFLAGS="$(STAGEprofile_CXXFLAGS)"; export CXXFLAGS; \
LIBCFLAGS="$(STAGEprofile_CFLAGS)"; export LIBCFLAGS; \
- echo Configuring stage profile in $(HOST_SUBDIR)/libbacktrace ; \
- $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/libbacktrace ; \
+ echo Configuring stage profile in $(HOST_SUBDIR)/libbacktrace; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/libbacktrace; \
cd $(HOST_SUBDIR)/libbacktrace || exit 1; \
case $(srcdir) in \
/* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
*) topdir=`echo $(HOST_SUBDIR)/libbacktrace/ | \
sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
esac; \
- srcdiroption="--srcdir=$${topdir}/libbacktrace"; \
- libsrcdir="$$s/libbacktrace"; \
- $(SHELL) $${libsrcdir}/configure \
+ module_srcdir=libbacktrace; \
+ $(SHELL) $$s/$$module_srcdir/configure \
+ --srcdir=$${topdir}/$$module_srcdir \
$(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
- --target=${target_alias} $${srcdiroption} \
+ --target=${target_alias} \
--with-build-libsubdir=$(HOST_SUBDIR) \
$(STAGEprofile_CONFIGURE_FLAGS)
@endif libbacktrace-bootstrap
@@ -19734,19 +19530,19 @@ configure-stagefeedback-libbacktrace:
CFLAGS="$(STAGEfeedback_CFLAGS)"; export CFLAGS; \
CXXFLAGS="$(STAGEfeedback_CXXFLAGS)"; export CXXFLAGS; \
LIBCFLAGS="$(STAGEfeedback_CFLAGS)"; export LIBCFLAGS; \
- echo Configuring stage feedback in $(HOST_SUBDIR)/libbacktrace ; \
- $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/libbacktrace ; \
+ echo Configuring stage feedback in $(HOST_SUBDIR)/libbacktrace; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/libbacktrace; \
cd $(HOST_SUBDIR)/libbacktrace || exit 1; \
case $(srcdir) in \
/* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
*) topdir=`echo $(HOST_SUBDIR)/libbacktrace/ | \
sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
esac; \
- srcdiroption="--srcdir=$${topdir}/libbacktrace"; \
- libsrcdir="$$s/libbacktrace"; \
- $(SHELL) $${libsrcdir}/configure \
+ module_srcdir=libbacktrace; \
+ $(SHELL) $$s/$$module_srcdir/configure \
+ --srcdir=$${topdir}/$$module_srcdir \
$(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
- --target=${target_alias} $${srcdiroption} \
+ --target=${target_alias} \
--with-build-libsubdir=$(HOST_SUBDIR) \
$(STAGEfeedback_CONFIGURE_FLAGS)
@endif libbacktrace-bootstrap
@@ -20033,9 +19829,9 @@ check-libbacktrace:
@: $(MAKE); $(unstage)
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(HOST_EXPORTS) \
+ $(HOST_EXPORTS) $(EXTRA_HOST_EXPORTS) \
(cd $(HOST_SUBDIR)/libbacktrace && \
- $(MAKE) $(FLAGS_TO_PASS) check)
+ $(MAKE) $(FLAGS_TO_PASS) $(EXTRA_BOOTSTRAP_FLAGS) check)
@endif libbacktrace
@@ -20085,7 +19881,7 @@ info-libbacktrace: \
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing info in libbacktrace" ; \
+ echo "Doing info in libbacktrace"; \
(cd $(HOST_SUBDIR)/libbacktrace && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -20110,7 +19906,7 @@ dvi-libbacktrace: \
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing dvi in libbacktrace" ; \
+ echo "Doing dvi in libbacktrace"; \
(cd $(HOST_SUBDIR)/libbacktrace && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -20135,7 +19931,7 @@ pdf-libbacktrace: \
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing pdf in libbacktrace" ; \
+ echo "Doing pdf in libbacktrace"; \
(cd $(HOST_SUBDIR)/libbacktrace && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -20160,7 +19956,7 @@ html-libbacktrace: \
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing html in libbacktrace" ; \
+ echo "Doing html in libbacktrace"; \
(cd $(HOST_SUBDIR)/libbacktrace && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -20185,7 +19981,7 @@ TAGS-libbacktrace: \
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing TAGS in libbacktrace" ; \
+ echo "Doing TAGS in libbacktrace"; \
(cd $(HOST_SUBDIR)/libbacktrace && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -20211,7 +20007,7 @@ install-info-libbacktrace: \
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing install-info in libbacktrace" ; \
+ echo "Doing install-info in libbacktrace"; \
(cd $(HOST_SUBDIR)/libbacktrace && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -20237,7 +20033,7 @@ install-pdf-libbacktrace: \
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing install-pdf in libbacktrace" ; \
+ echo "Doing install-pdf in libbacktrace"; \
(cd $(HOST_SUBDIR)/libbacktrace && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -20263,7 +20059,7 @@ install-html-libbacktrace: \
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing install-html in libbacktrace" ; \
+ echo "Doing install-html in libbacktrace"; \
(cd $(HOST_SUBDIR)/libbacktrace && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -20288,7 +20084,7 @@ installcheck-libbacktrace: \
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing installcheck in libbacktrace" ; \
+ echo "Doing installcheck in libbacktrace"; \
(cd $(HOST_SUBDIR)/libbacktrace && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -20312,7 +20108,7 @@ mostlyclean-libbacktrace:
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing mostlyclean in libbacktrace" ; \
+ echo "Doing mostlyclean in libbacktrace"; \
(cd $(HOST_SUBDIR)/libbacktrace && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -20336,7 +20132,7 @@ clean-libbacktrace:
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing clean in libbacktrace" ; \
+ echo "Doing clean in libbacktrace"; \
(cd $(HOST_SUBDIR)/libbacktrace && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -20360,7 +20156,7 @@ distclean-libbacktrace:
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing distclean in libbacktrace" ; \
+ echo "Doing distclean in libbacktrace"; \
(cd $(HOST_SUBDIR)/libbacktrace && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -20384,7 +20180,7 @@ maintainer-clean-libbacktrace:
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing maintainer-clean in libbacktrace" ; \
+ echo "Doing maintainer-clean in libbacktrace"; \
(cd $(HOST_SUBDIR)/libbacktrace && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -20408,7 +20204,7 @@ configure-libcpp:
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
test ! -f $(HOST_SUBDIR)/libcpp/Makefile || exit 0; \
- $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/libcpp ; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/libcpp; \
$(HOST_EXPORTS) \
echo Configuring in $(HOST_SUBDIR)/libcpp; \
cd "$(HOST_SUBDIR)/libcpp" || exit 1; \
@@ -20417,11 +20213,12 @@ configure-libcpp:
*) topdir=`echo $(HOST_SUBDIR)/libcpp/ | \
sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
esac; \
- srcdiroption="--srcdir=$${topdir}/libcpp"; \
- libsrcdir="$$s/libcpp"; \
- $(SHELL) $${libsrcdir}/configure \
+ module_srcdir=libcpp; \
+ $(SHELL) \
+ $$s/$$module_srcdir/configure \
+ --srcdir=$${topdir}/$$module_srcdir \
$(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
- --target=${target_alias} $${srcdiroption} \
+ --target=${target_alias} \
|| exit 1
@endif libcpp
@@ -20442,19 +20239,20 @@ configure-stage1-libcpp:
CFLAGS="$(STAGE1_CFLAGS)"; export CFLAGS; \
CXXFLAGS="$(STAGE1_CXXFLAGS)"; export CXXFLAGS; \
LIBCFLAGS="$(LIBCFLAGS)"; export LIBCFLAGS; \
- echo Configuring stage 1 in $(HOST_SUBDIR)/libcpp ; \
- $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/libcpp ; \
+ echo Configuring stage 1 in $(HOST_SUBDIR)/libcpp; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/libcpp; \
cd $(HOST_SUBDIR)/libcpp || exit 1; \
case $(srcdir) in \
/* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
*) topdir=`echo $(HOST_SUBDIR)/libcpp/ | \
sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
esac; \
- srcdiroption="--srcdir=$${topdir}/libcpp"; \
- libsrcdir="$$s/libcpp"; \
- $(SHELL) $${libsrcdir}/configure \
+ module_srcdir=libcpp; \
+ $(SHELL) $$s/$$module_srcdir/configure \
+ --srcdir=$${topdir}/$$module_srcdir \
$(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
- --target=${target_alias} $${srcdiroption} \
+ --target=${target_alias} \
+ \
$(STAGE1_CONFIGURE_FLAGS)
@endif libcpp-bootstrap
@@ -20474,19 +20272,19 @@ configure-stage2-libcpp:
CFLAGS="$(STAGE2_CFLAGS)"; export CFLAGS; \
CXXFLAGS="$(STAGE2_CXXFLAGS)"; export CXXFLAGS; \
LIBCFLAGS="$(STAGE2_CFLAGS)"; export LIBCFLAGS; \
- echo Configuring stage 2 in $(HOST_SUBDIR)/libcpp ; \
- $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/libcpp ; \
+ echo Configuring stage 2 in $(HOST_SUBDIR)/libcpp; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/libcpp; \
cd $(HOST_SUBDIR)/libcpp || exit 1; \
case $(srcdir) in \
/* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
*) topdir=`echo $(HOST_SUBDIR)/libcpp/ | \
sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
esac; \
- srcdiroption="--srcdir=$${topdir}/libcpp"; \
- libsrcdir="$$s/libcpp"; \
- $(SHELL) $${libsrcdir}/configure \
+ module_srcdir=libcpp; \
+ $(SHELL) $$s/$$module_srcdir/configure \
+ --srcdir=$${topdir}/$$module_srcdir \
$(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
- --target=${target_alias} $${srcdiroption} \
+ --target=${target_alias} \
--with-build-libsubdir=$(HOST_SUBDIR) \
$(STAGE2_CONFIGURE_FLAGS)
@endif libcpp-bootstrap
@@ -20507,19 +20305,19 @@ configure-stage3-libcpp:
CFLAGS="$(STAGE3_CFLAGS)"; export CFLAGS; \
CXXFLAGS="$(STAGE3_CXXFLAGS)"; export CXXFLAGS; \
LIBCFLAGS="$(STAGE3_CFLAGS)"; export LIBCFLAGS; \
- echo Configuring stage 3 in $(HOST_SUBDIR)/libcpp ; \
- $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/libcpp ; \
+ echo Configuring stage 3 in $(HOST_SUBDIR)/libcpp; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/libcpp; \
cd $(HOST_SUBDIR)/libcpp || exit 1; \
case $(srcdir) in \
/* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
*) topdir=`echo $(HOST_SUBDIR)/libcpp/ | \
sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
esac; \
- srcdiroption="--srcdir=$${topdir}/libcpp"; \
- libsrcdir="$$s/libcpp"; \
- $(SHELL) $${libsrcdir}/configure \
+ module_srcdir=libcpp; \
+ $(SHELL) $$s/$$module_srcdir/configure \
+ --srcdir=$${topdir}/$$module_srcdir \
$(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
- --target=${target_alias} $${srcdiroption} \
+ --target=${target_alias} \
--with-build-libsubdir=$(HOST_SUBDIR) \
$(STAGE3_CONFIGURE_FLAGS)
@endif libcpp-bootstrap
@@ -20540,19 +20338,19 @@ configure-stage4-libcpp:
CFLAGS="$(STAGE4_CFLAGS)"; export CFLAGS; \
CXXFLAGS="$(STAGE4_CXXFLAGS)"; export CXXFLAGS; \
LIBCFLAGS="$(STAGE4_CFLAGS)"; export LIBCFLAGS; \
- echo Configuring stage 4 in $(HOST_SUBDIR)/libcpp ; \
- $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/libcpp ; \
+ echo Configuring stage 4 in $(HOST_SUBDIR)/libcpp; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/libcpp; \
cd $(HOST_SUBDIR)/libcpp || exit 1; \
case $(srcdir) in \
/* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
*) topdir=`echo $(HOST_SUBDIR)/libcpp/ | \
sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
esac; \
- srcdiroption="--srcdir=$${topdir}/libcpp"; \
- libsrcdir="$$s/libcpp"; \
- $(SHELL) $${libsrcdir}/configure \
+ module_srcdir=libcpp; \
+ $(SHELL) $$s/$$module_srcdir/configure \
+ --srcdir=$${topdir}/$$module_srcdir \
$(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
- --target=${target_alias} $${srcdiroption} \
+ --target=${target_alias} \
--with-build-libsubdir=$(HOST_SUBDIR) \
$(STAGE4_CONFIGURE_FLAGS)
@endif libcpp-bootstrap
@@ -20573,19 +20371,19 @@ configure-stageprofile-libcpp:
CFLAGS="$(STAGEprofile_CFLAGS)"; export CFLAGS; \
CXXFLAGS="$(STAGEprofile_CXXFLAGS)"; export CXXFLAGS; \
LIBCFLAGS="$(STAGEprofile_CFLAGS)"; export LIBCFLAGS; \
- echo Configuring stage profile in $(HOST_SUBDIR)/libcpp ; \
- $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/libcpp ; \
+ echo Configuring stage profile in $(HOST_SUBDIR)/libcpp; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/libcpp; \
cd $(HOST_SUBDIR)/libcpp || exit 1; \
case $(srcdir) in \
/* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
*) topdir=`echo $(HOST_SUBDIR)/libcpp/ | \
sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
esac; \
- srcdiroption="--srcdir=$${topdir}/libcpp"; \
- libsrcdir="$$s/libcpp"; \
- $(SHELL) $${libsrcdir}/configure \
+ module_srcdir=libcpp; \
+ $(SHELL) $$s/$$module_srcdir/configure \
+ --srcdir=$${topdir}/$$module_srcdir \
$(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
- --target=${target_alias} $${srcdiroption} \
+ --target=${target_alias} \
--with-build-libsubdir=$(HOST_SUBDIR) \
$(STAGEprofile_CONFIGURE_FLAGS)
@endif libcpp-bootstrap
@@ -20606,19 +20404,19 @@ configure-stagefeedback-libcpp:
CFLAGS="$(STAGEfeedback_CFLAGS)"; export CFLAGS; \
CXXFLAGS="$(STAGEfeedback_CXXFLAGS)"; export CXXFLAGS; \
LIBCFLAGS="$(STAGEfeedback_CFLAGS)"; export LIBCFLAGS; \
- echo Configuring stage feedback in $(HOST_SUBDIR)/libcpp ; \
- $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/libcpp ; \
+ echo Configuring stage feedback in $(HOST_SUBDIR)/libcpp; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/libcpp; \
cd $(HOST_SUBDIR)/libcpp || exit 1; \
case $(srcdir) in \
/* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
*) topdir=`echo $(HOST_SUBDIR)/libcpp/ | \
sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
esac; \
- srcdiroption="--srcdir=$${topdir}/libcpp"; \
- libsrcdir="$$s/libcpp"; \
- $(SHELL) $${libsrcdir}/configure \
+ module_srcdir=libcpp; \
+ $(SHELL) $$s/$$module_srcdir/configure \
+ --srcdir=$${topdir}/$$module_srcdir \
$(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
- --target=${target_alias} $${srcdiroption} \
+ --target=${target_alias} \
--with-build-libsubdir=$(HOST_SUBDIR) \
$(STAGEfeedback_CONFIGURE_FLAGS)
@endif libcpp-bootstrap
@@ -20905,9 +20703,9 @@ check-libcpp:
@: $(MAKE); $(unstage)
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(HOST_EXPORTS) \
+ $(HOST_EXPORTS) $(EXTRA_HOST_EXPORTS) \
(cd $(HOST_SUBDIR)/libcpp && \
- $(MAKE) $(FLAGS_TO_PASS) check)
+ $(MAKE) $(FLAGS_TO_PASS) $(EXTRA_BOOTSTRAP_FLAGS) check)
@endif libcpp
@@ -20957,7 +20755,7 @@ info-libcpp: \
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing info in libcpp" ; \
+ echo "Doing info in libcpp"; \
(cd $(HOST_SUBDIR)/libcpp && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -20982,7 +20780,7 @@ dvi-libcpp: \
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing dvi in libcpp" ; \
+ echo "Doing dvi in libcpp"; \
(cd $(HOST_SUBDIR)/libcpp && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -21007,7 +20805,7 @@ pdf-libcpp: \
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing pdf in libcpp" ; \
+ echo "Doing pdf in libcpp"; \
(cd $(HOST_SUBDIR)/libcpp && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -21032,7 +20830,7 @@ html-libcpp: \
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing html in libcpp" ; \
+ echo "Doing html in libcpp"; \
(cd $(HOST_SUBDIR)/libcpp && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -21057,7 +20855,7 @@ TAGS-libcpp: \
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing TAGS in libcpp" ; \
+ echo "Doing TAGS in libcpp"; \
(cd $(HOST_SUBDIR)/libcpp && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -21083,7 +20881,7 @@ install-info-libcpp: \
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing install-info in libcpp" ; \
+ echo "Doing install-info in libcpp"; \
(cd $(HOST_SUBDIR)/libcpp && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -21109,7 +20907,7 @@ install-pdf-libcpp: \
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing install-pdf in libcpp" ; \
+ echo "Doing install-pdf in libcpp"; \
(cd $(HOST_SUBDIR)/libcpp && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -21135,7 +20933,7 @@ install-html-libcpp: \
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing install-html in libcpp" ; \
+ echo "Doing install-html in libcpp"; \
(cd $(HOST_SUBDIR)/libcpp && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -21160,7 +20958,7 @@ installcheck-libcpp: \
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing installcheck in libcpp" ; \
+ echo "Doing installcheck in libcpp"; \
(cd $(HOST_SUBDIR)/libcpp && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -21184,7 +20982,7 @@ mostlyclean-libcpp:
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing mostlyclean in libcpp" ; \
+ echo "Doing mostlyclean in libcpp"; \
(cd $(HOST_SUBDIR)/libcpp && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -21208,7 +21006,7 @@ clean-libcpp:
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing clean in libcpp" ; \
+ echo "Doing clean in libcpp"; \
(cd $(HOST_SUBDIR)/libcpp && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -21232,7 +21030,7 @@ distclean-libcpp:
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing distclean in libcpp" ; \
+ echo "Doing distclean in libcpp"; \
(cd $(HOST_SUBDIR)/libcpp && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -21256,7 +21054,7 @@ maintainer-clean-libcpp:
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing maintainer-clean in libcpp" ; \
+ echo "Doing maintainer-clean in libcpp"; \
(cd $(HOST_SUBDIR)/libcpp && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -21280,7 +21078,7 @@ configure-libdecnumber:
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
test ! -f $(HOST_SUBDIR)/libdecnumber/Makefile || exit 0; \
- $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/libdecnumber ; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/libdecnumber; \
$(HOST_EXPORTS) \
echo Configuring in $(HOST_SUBDIR)/libdecnumber; \
cd "$(HOST_SUBDIR)/libdecnumber" || exit 1; \
@@ -21289,11 +21087,12 @@ configure-libdecnumber:
*) topdir=`echo $(HOST_SUBDIR)/libdecnumber/ | \
sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
esac; \
- srcdiroption="--srcdir=$${topdir}/libdecnumber"; \
- libsrcdir="$$s/libdecnumber"; \
- $(SHELL) $${libsrcdir}/configure \
+ module_srcdir=libdecnumber; \
+ $(SHELL) \
+ $$s/$$module_srcdir/configure \
+ --srcdir=$${topdir}/$$module_srcdir \
$(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
- --target=${target_alias} $${srcdiroption} \
+ --target=${target_alias} \
|| exit 1
@endif libdecnumber
@@ -21314,19 +21113,20 @@ configure-stage1-libdecnumber:
CFLAGS="$(STAGE1_CFLAGS)"; export CFLAGS; \
CXXFLAGS="$(STAGE1_CXXFLAGS)"; export CXXFLAGS; \
LIBCFLAGS="$(LIBCFLAGS)"; export LIBCFLAGS; \
- echo Configuring stage 1 in $(HOST_SUBDIR)/libdecnumber ; \
- $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/libdecnumber ; \
+ echo Configuring stage 1 in $(HOST_SUBDIR)/libdecnumber; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/libdecnumber; \
cd $(HOST_SUBDIR)/libdecnumber || exit 1; \
case $(srcdir) in \
/* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
*) topdir=`echo $(HOST_SUBDIR)/libdecnumber/ | \
sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
esac; \
- srcdiroption="--srcdir=$${topdir}/libdecnumber"; \
- libsrcdir="$$s/libdecnumber"; \
- $(SHELL) $${libsrcdir}/configure \
+ module_srcdir=libdecnumber; \
+ $(SHELL) $$s/$$module_srcdir/configure \
+ --srcdir=$${topdir}/$$module_srcdir \
$(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
- --target=${target_alias} $${srcdiroption} \
+ --target=${target_alias} \
+ \
$(STAGE1_CONFIGURE_FLAGS)
@endif libdecnumber-bootstrap
@@ -21346,19 +21146,19 @@ configure-stage2-libdecnumber:
CFLAGS="$(STAGE2_CFLAGS)"; export CFLAGS; \
CXXFLAGS="$(STAGE2_CXXFLAGS)"; export CXXFLAGS; \
LIBCFLAGS="$(STAGE2_CFLAGS)"; export LIBCFLAGS; \
- echo Configuring stage 2 in $(HOST_SUBDIR)/libdecnumber ; \
- $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/libdecnumber ; \
+ echo Configuring stage 2 in $(HOST_SUBDIR)/libdecnumber; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/libdecnumber; \
cd $(HOST_SUBDIR)/libdecnumber || exit 1; \
case $(srcdir) in \
/* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
*) topdir=`echo $(HOST_SUBDIR)/libdecnumber/ | \
sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
esac; \
- srcdiroption="--srcdir=$${topdir}/libdecnumber"; \
- libsrcdir="$$s/libdecnumber"; \
- $(SHELL) $${libsrcdir}/configure \
+ module_srcdir=libdecnumber; \
+ $(SHELL) $$s/$$module_srcdir/configure \
+ --srcdir=$${topdir}/$$module_srcdir \
$(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
- --target=${target_alias} $${srcdiroption} \
+ --target=${target_alias} \
--with-build-libsubdir=$(HOST_SUBDIR) \
$(STAGE2_CONFIGURE_FLAGS)
@endif libdecnumber-bootstrap
@@ -21379,19 +21179,19 @@ configure-stage3-libdecnumber:
CFLAGS="$(STAGE3_CFLAGS)"; export CFLAGS; \
CXXFLAGS="$(STAGE3_CXXFLAGS)"; export CXXFLAGS; \
LIBCFLAGS="$(STAGE3_CFLAGS)"; export LIBCFLAGS; \
- echo Configuring stage 3 in $(HOST_SUBDIR)/libdecnumber ; \
- $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/libdecnumber ; \
+ echo Configuring stage 3 in $(HOST_SUBDIR)/libdecnumber; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/libdecnumber; \
cd $(HOST_SUBDIR)/libdecnumber || exit 1; \
case $(srcdir) in \
/* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
*) topdir=`echo $(HOST_SUBDIR)/libdecnumber/ | \
sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
esac; \
- srcdiroption="--srcdir=$${topdir}/libdecnumber"; \
- libsrcdir="$$s/libdecnumber"; \
- $(SHELL) $${libsrcdir}/configure \
+ module_srcdir=libdecnumber; \
+ $(SHELL) $$s/$$module_srcdir/configure \
+ --srcdir=$${topdir}/$$module_srcdir \
$(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
- --target=${target_alias} $${srcdiroption} \
+ --target=${target_alias} \
--with-build-libsubdir=$(HOST_SUBDIR) \
$(STAGE3_CONFIGURE_FLAGS)
@endif libdecnumber-bootstrap
@@ -21412,19 +21212,19 @@ configure-stage4-libdecnumber:
CFLAGS="$(STAGE4_CFLAGS)"; export CFLAGS; \
CXXFLAGS="$(STAGE4_CXXFLAGS)"; export CXXFLAGS; \
LIBCFLAGS="$(STAGE4_CFLAGS)"; export LIBCFLAGS; \
- echo Configuring stage 4 in $(HOST_SUBDIR)/libdecnumber ; \
- $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/libdecnumber ; \
+ echo Configuring stage 4 in $(HOST_SUBDIR)/libdecnumber; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/libdecnumber; \
cd $(HOST_SUBDIR)/libdecnumber || exit 1; \
case $(srcdir) in \
/* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
*) topdir=`echo $(HOST_SUBDIR)/libdecnumber/ | \
sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
esac; \
- srcdiroption="--srcdir=$${topdir}/libdecnumber"; \
- libsrcdir="$$s/libdecnumber"; \
- $(SHELL) $${libsrcdir}/configure \
+ module_srcdir=libdecnumber; \
+ $(SHELL) $$s/$$module_srcdir/configure \
+ --srcdir=$${topdir}/$$module_srcdir \
$(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
- --target=${target_alias} $${srcdiroption} \
+ --target=${target_alias} \
--with-build-libsubdir=$(HOST_SUBDIR) \
$(STAGE4_CONFIGURE_FLAGS)
@endif libdecnumber-bootstrap
@@ -21445,19 +21245,19 @@ configure-stageprofile-libdecnumber:
CFLAGS="$(STAGEprofile_CFLAGS)"; export CFLAGS; \
CXXFLAGS="$(STAGEprofile_CXXFLAGS)"; export CXXFLAGS; \
LIBCFLAGS="$(STAGEprofile_CFLAGS)"; export LIBCFLAGS; \
- echo Configuring stage profile in $(HOST_SUBDIR)/libdecnumber ; \
- $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/libdecnumber ; \
+ echo Configuring stage profile in $(HOST_SUBDIR)/libdecnumber; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/libdecnumber; \
cd $(HOST_SUBDIR)/libdecnumber || exit 1; \
case $(srcdir) in \
/* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
*) topdir=`echo $(HOST_SUBDIR)/libdecnumber/ | \
sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
esac; \
- srcdiroption="--srcdir=$${topdir}/libdecnumber"; \
- libsrcdir="$$s/libdecnumber"; \
- $(SHELL) $${libsrcdir}/configure \
+ module_srcdir=libdecnumber; \
+ $(SHELL) $$s/$$module_srcdir/configure \
+ --srcdir=$${topdir}/$$module_srcdir \
$(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
- --target=${target_alias} $${srcdiroption} \
+ --target=${target_alias} \
--with-build-libsubdir=$(HOST_SUBDIR) \
$(STAGEprofile_CONFIGURE_FLAGS)
@endif libdecnumber-bootstrap
@@ -21478,19 +21278,19 @@ configure-stagefeedback-libdecnumber:
CFLAGS="$(STAGEfeedback_CFLAGS)"; export CFLAGS; \
CXXFLAGS="$(STAGEfeedback_CXXFLAGS)"; export CXXFLAGS; \
LIBCFLAGS="$(STAGEfeedback_CFLAGS)"; export LIBCFLAGS; \
- echo Configuring stage feedback in $(HOST_SUBDIR)/libdecnumber ; \
- $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/libdecnumber ; \
+ echo Configuring stage feedback in $(HOST_SUBDIR)/libdecnumber; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/libdecnumber; \
cd $(HOST_SUBDIR)/libdecnumber || exit 1; \
case $(srcdir) in \
/* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
*) topdir=`echo $(HOST_SUBDIR)/libdecnumber/ | \
sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
esac; \
- srcdiroption="--srcdir=$${topdir}/libdecnumber"; \
- libsrcdir="$$s/libdecnumber"; \
- $(SHELL) $${libsrcdir}/configure \
+ module_srcdir=libdecnumber; \
+ $(SHELL) $$s/$$module_srcdir/configure \
+ --srcdir=$${topdir}/$$module_srcdir \
$(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
- --target=${target_alias} $${srcdiroption} \
+ --target=${target_alias} \
--with-build-libsubdir=$(HOST_SUBDIR) \
$(STAGEfeedback_CONFIGURE_FLAGS)
@endif libdecnumber-bootstrap
@@ -21777,9 +21577,9 @@ check-libdecnumber:
@: $(MAKE); $(unstage)
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(HOST_EXPORTS) \
+ $(HOST_EXPORTS) $(EXTRA_HOST_EXPORTS) \
(cd $(HOST_SUBDIR)/libdecnumber && \
- $(MAKE) $(FLAGS_TO_PASS) check)
+ $(MAKE) $(FLAGS_TO_PASS) $(EXTRA_BOOTSTRAP_FLAGS) check)
@endif libdecnumber
@@ -21829,7 +21629,7 @@ info-libdecnumber: \
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing info in libdecnumber" ; \
+ echo "Doing info in libdecnumber"; \
(cd $(HOST_SUBDIR)/libdecnumber && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -21854,7 +21654,7 @@ dvi-libdecnumber: \
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing dvi in libdecnumber" ; \
+ echo "Doing dvi in libdecnumber"; \
(cd $(HOST_SUBDIR)/libdecnumber && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -21879,7 +21679,7 @@ pdf-libdecnumber: \
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing pdf in libdecnumber" ; \
+ echo "Doing pdf in libdecnumber"; \
(cd $(HOST_SUBDIR)/libdecnumber && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -21904,7 +21704,7 @@ html-libdecnumber: \
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing html in libdecnumber" ; \
+ echo "Doing html in libdecnumber"; \
(cd $(HOST_SUBDIR)/libdecnumber && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -21929,7 +21729,7 @@ TAGS-libdecnumber: \
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing TAGS in libdecnumber" ; \
+ echo "Doing TAGS in libdecnumber"; \
(cd $(HOST_SUBDIR)/libdecnumber && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -21955,7 +21755,7 @@ install-info-libdecnumber: \
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing install-info in libdecnumber" ; \
+ echo "Doing install-info in libdecnumber"; \
(cd $(HOST_SUBDIR)/libdecnumber && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -21981,7 +21781,7 @@ install-pdf-libdecnumber: \
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing install-pdf in libdecnumber" ; \
+ echo "Doing install-pdf in libdecnumber"; \
(cd $(HOST_SUBDIR)/libdecnumber && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -22007,7 +21807,7 @@ install-html-libdecnumber: \
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing install-html in libdecnumber" ; \
+ echo "Doing install-html in libdecnumber"; \
(cd $(HOST_SUBDIR)/libdecnumber && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -22032,7 +21832,7 @@ installcheck-libdecnumber: \
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing installcheck in libdecnumber" ; \
+ echo "Doing installcheck in libdecnumber"; \
(cd $(HOST_SUBDIR)/libdecnumber && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -22056,7 +21856,7 @@ mostlyclean-libdecnumber:
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing mostlyclean in libdecnumber" ; \
+ echo "Doing mostlyclean in libdecnumber"; \
(cd $(HOST_SUBDIR)/libdecnumber && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -22080,7 +21880,7 @@ clean-libdecnumber:
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing clean in libdecnumber" ; \
+ echo "Doing clean in libdecnumber"; \
(cd $(HOST_SUBDIR)/libdecnumber && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -22104,7 +21904,7 @@ distclean-libdecnumber:
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing distclean in libdecnumber" ; \
+ echo "Doing distclean in libdecnumber"; \
(cd $(HOST_SUBDIR)/libdecnumber && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -22128,7 +21928,7 @@ maintainer-clean-libdecnumber:
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing maintainer-clean in libdecnumber" ; \
+ echo "Doing maintainer-clean in libdecnumber"; \
(cd $(HOST_SUBDIR)/libdecnumber && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -22153,7 +21953,7 @@ configure-libgui:
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
test ! -f $(HOST_SUBDIR)/libgui/Makefile || exit 0; \
- $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/libgui ; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/libgui; \
$(HOST_EXPORTS) \
echo Configuring in $(HOST_SUBDIR)/libgui; \
cd "$(HOST_SUBDIR)/libgui" || exit 1; \
@@ -22162,11 +21962,12 @@ configure-libgui:
*) topdir=`echo $(HOST_SUBDIR)/libgui/ | \
sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
esac; \
- srcdiroption="--srcdir=$${topdir}/libgui"; \
- libsrcdir="$$s/libgui"; \
- $(SHELL) $${libsrcdir}/configure \
+ module_srcdir=libgui; \
+ $(SHELL) \
+ $$s/$$module_srcdir/configure \
+ --srcdir=$${topdir}/$$module_srcdir \
$(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
- --target=${target_alias} $${srcdiroption} \
+ --target=${target_alias} \
|| exit 1
@endif libgui
@@ -22204,7 +22005,7 @@ check-libgui:
@: $(MAKE); $(unstage)
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(HOST_EXPORTS) \
+ $(HOST_EXPORTS) \
(cd $(HOST_SUBDIR)/libgui && \
$(MAKE) $(FLAGS_TO_PASS) check)
@@ -22257,7 +22058,7 @@ info-libgui: \
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing info in libgui" ; \
+ echo "Doing info in libgui"; \
(cd $(HOST_SUBDIR)/libgui && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -22283,7 +22084,7 @@ dvi-libgui: \
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing dvi in libgui" ; \
+ echo "Doing dvi in libgui"; \
(cd $(HOST_SUBDIR)/libgui && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -22309,7 +22110,7 @@ pdf-libgui: \
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing pdf in libgui" ; \
+ echo "Doing pdf in libgui"; \
(cd $(HOST_SUBDIR)/libgui && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -22335,7 +22136,7 @@ html-libgui: \
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing html in libgui" ; \
+ echo "Doing html in libgui"; \
(cd $(HOST_SUBDIR)/libgui && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -22361,7 +22162,7 @@ TAGS-libgui: \
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing TAGS in libgui" ; \
+ echo "Doing TAGS in libgui"; \
(cd $(HOST_SUBDIR)/libgui && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -22388,7 +22189,7 @@ install-info-libgui: \
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing install-info in libgui" ; \
+ echo "Doing install-info in libgui"; \
(cd $(HOST_SUBDIR)/libgui && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -22415,7 +22216,7 @@ install-pdf-libgui: \
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing install-pdf in libgui" ; \
+ echo "Doing install-pdf in libgui"; \
(cd $(HOST_SUBDIR)/libgui && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -22442,7 +22243,7 @@ install-html-libgui: \
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing install-html in libgui" ; \
+ echo "Doing install-html in libgui"; \
(cd $(HOST_SUBDIR)/libgui && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -22468,7 +22269,7 @@ installcheck-libgui: \
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing installcheck in libgui" ; \
+ echo "Doing installcheck in libgui"; \
(cd $(HOST_SUBDIR)/libgui && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -22493,7 +22294,7 @@ mostlyclean-libgui:
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing mostlyclean in libgui" ; \
+ echo "Doing mostlyclean in libgui"; \
(cd $(HOST_SUBDIR)/libgui && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -22518,7 +22319,7 @@ clean-libgui:
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing clean in libgui" ; \
+ echo "Doing clean in libgui"; \
(cd $(HOST_SUBDIR)/libgui && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -22543,7 +22344,7 @@ distclean-libgui:
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing distclean in libgui" ; \
+ echo "Doing distclean in libgui"; \
(cd $(HOST_SUBDIR)/libgui && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -22568,7 +22369,7 @@ maintainer-clean-libgui:
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing maintainer-clean in libgui" ; \
+ echo "Doing maintainer-clean in libgui"; \
(cd $(HOST_SUBDIR)/libgui && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -22592,7 +22393,7 @@ configure-libiberty:
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
test ! -f $(HOST_SUBDIR)/libiberty/Makefile || exit 0; \
- $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/libiberty ; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/libiberty; \
$(HOST_EXPORTS) \
echo Configuring in $(HOST_SUBDIR)/libiberty; \
cd "$(HOST_SUBDIR)/libiberty" || exit 1; \
@@ -22601,11 +22402,12 @@ configure-libiberty:
*) topdir=`echo $(HOST_SUBDIR)/libiberty/ | \
sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
esac; \
- srcdiroption="--srcdir=$${topdir}/libiberty"; \
- libsrcdir="$$s/libiberty"; \
- $(SHELL) $${libsrcdir}/configure \
+ module_srcdir=libiberty; \
+ $(SHELL) \
+ $$s/$$module_srcdir/configure \
+ --srcdir=$${topdir}/$$module_srcdir \
$(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
- --target=${target_alias} $${srcdiroption} @extra_host_libiberty_configure_flags@ \
+ --target=${target_alias} @extra_host_libiberty_configure_flags@ \
|| exit 1
@endif libiberty
@@ -22626,19 +22428,20 @@ configure-stage1-libiberty:
CFLAGS="$(STAGE1_CFLAGS)"; export CFLAGS; \
CXXFLAGS="$(STAGE1_CXXFLAGS)"; export CXXFLAGS; \
LIBCFLAGS="$(LIBCFLAGS)"; export LIBCFLAGS; \
- echo Configuring stage 1 in $(HOST_SUBDIR)/libiberty ; \
- $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/libiberty ; \
+ echo Configuring stage 1 in $(HOST_SUBDIR)/libiberty; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/libiberty; \
cd $(HOST_SUBDIR)/libiberty || exit 1; \
case $(srcdir) in \
/* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
*) topdir=`echo $(HOST_SUBDIR)/libiberty/ | \
sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
esac; \
- srcdiroption="--srcdir=$${topdir}/libiberty"; \
- libsrcdir="$$s/libiberty"; \
- $(SHELL) $${libsrcdir}/configure \
+ module_srcdir=libiberty; \
+ $(SHELL) $$s/$$module_srcdir/configure \
+ --srcdir=$${topdir}/$$module_srcdir \
$(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
- --target=${target_alias} $${srcdiroption} \
+ --target=${target_alias} \
+ \
$(STAGE1_CONFIGURE_FLAGS) \
@extra_host_libiberty_configure_flags@
@endif libiberty-bootstrap
@@ -22659,19 +22462,19 @@ configure-stage2-libiberty:
CFLAGS="$(STAGE2_CFLAGS)"; export CFLAGS; \
CXXFLAGS="$(STAGE2_CXXFLAGS)"; export CXXFLAGS; \
LIBCFLAGS="$(STAGE2_CFLAGS)"; export LIBCFLAGS; \
- echo Configuring stage 2 in $(HOST_SUBDIR)/libiberty ; \
- $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/libiberty ; \
+ echo Configuring stage 2 in $(HOST_SUBDIR)/libiberty; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/libiberty; \
cd $(HOST_SUBDIR)/libiberty || exit 1; \
case $(srcdir) in \
/* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
*) topdir=`echo $(HOST_SUBDIR)/libiberty/ | \
sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
esac; \
- srcdiroption="--srcdir=$${topdir}/libiberty"; \
- libsrcdir="$$s/libiberty"; \
- $(SHELL) $${libsrcdir}/configure \
+ module_srcdir=libiberty; \
+ $(SHELL) $$s/$$module_srcdir/configure \
+ --srcdir=$${topdir}/$$module_srcdir \
$(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
- --target=${target_alias} $${srcdiroption} \
+ --target=${target_alias} \
--with-build-libsubdir=$(HOST_SUBDIR) \
$(STAGE2_CONFIGURE_FLAGS) \
@extra_host_libiberty_configure_flags@
@@ -22693,19 +22496,19 @@ configure-stage3-libiberty:
CFLAGS="$(STAGE3_CFLAGS)"; export CFLAGS; \
CXXFLAGS="$(STAGE3_CXXFLAGS)"; export CXXFLAGS; \
LIBCFLAGS="$(STAGE3_CFLAGS)"; export LIBCFLAGS; \
- echo Configuring stage 3 in $(HOST_SUBDIR)/libiberty ; \
- $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/libiberty ; \
+ echo Configuring stage 3 in $(HOST_SUBDIR)/libiberty; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/libiberty; \
cd $(HOST_SUBDIR)/libiberty || exit 1; \
case $(srcdir) in \
/* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
*) topdir=`echo $(HOST_SUBDIR)/libiberty/ | \
sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
esac; \
- srcdiroption="--srcdir=$${topdir}/libiberty"; \
- libsrcdir="$$s/libiberty"; \
- $(SHELL) $${libsrcdir}/configure \
+ module_srcdir=libiberty; \
+ $(SHELL) $$s/$$module_srcdir/configure \
+ --srcdir=$${topdir}/$$module_srcdir \
$(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
- --target=${target_alias} $${srcdiroption} \
+ --target=${target_alias} \
--with-build-libsubdir=$(HOST_SUBDIR) \
$(STAGE3_CONFIGURE_FLAGS) \
@extra_host_libiberty_configure_flags@
@@ -22727,19 +22530,19 @@ configure-stage4-libiberty:
CFLAGS="$(STAGE4_CFLAGS)"; export CFLAGS; \
CXXFLAGS="$(STAGE4_CXXFLAGS)"; export CXXFLAGS; \
LIBCFLAGS="$(STAGE4_CFLAGS)"; export LIBCFLAGS; \
- echo Configuring stage 4 in $(HOST_SUBDIR)/libiberty ; \
- $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/libiberty ; \
+ echo Configuring stage 4 in $(HOST_SUBDIR)/libiberty; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/libiberty; \
cd $(HOST_SUBDIR)/libiberty || exit 1; \
case $(srcdir) in \
/* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
*) topdir=`echo $(HOST_SUBDIR)/libiberty/ | \
sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
esac; \
- srcdiroption="--srcdir=$${topdir}/libiberty"; \
- libsrcdir="$$s/libiberty"; \
- $(SHELL) $${libsrcdir}/configure \
+ module_srcdir=libiberty; \
+ $(SHELL) $$s/$$module_srcdir/configure \
+ --srcdir=$${topdir}/$$module_srcdir \
$(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
- --target=${target_alias} $${srcdiroption} \
+ --target=${target_alias} \
--with-build-libsubdir=$(HOST_SUBDIR) \
$(STAGE4_CONFIGURE_FLAGS) \
@extra_host_libiberty_configure_flags@
@@ -22761,19 +22564,19 @@ configure-stageprofile-libiberty:
CFLAGS="$(STAGEprofile_CFLAGS)"; export CFLAGS; \
CXXFLAGS="$(STAGEprofile_CXXFLAGS)"; export CXXFLAGS; \
LIBCFLAGS="$(STAGEprofile_CFLAGS)"; export LIBCFLAGS; \
- echo Configuring stage profile in $(HOST_SUBDIR)/libiberty ; \
- $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/libiberty ; \
+ echo Configuring stage profile in $(HOST_SUBDIR)/libiberty; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/libiberty; \
cd $(HOST_SUBDIR)/libiberty || exit 1; \
case $(srcdir) in \
/* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
*) topdir=`echo $(HOST_SUBDIR)/libiberty/ | \
sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
esac; \
- srcdiroption="--srcdir=$${topdir}/libiberty"; \
- libsrcdir="$$s/libiberty"; \
- $(SHELL) $${libsrcdir}/configure \
+ module_srcdir=libiberty; \
+ $(SHELL) $$s/$$module_srcdir/configure \
+ --srcdir=$${topdir}/$$module_srcdir \
$(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
- --target=${target_alias} $${srcdiroption} \
+ --target=${target_alias} \
--with-build-libsubdir=$(HOST_SUBDIR) \
$(STAGEprofile_CONFIGURE_FLAGS) \
@extra_host_libiberty_configure_flags@
@@ -22795,19 +22598,19 @@ configure-stagefeedback-libiberty:
CFLAGS="$(STAGEfeedback_CFLAGS)"; export CFLAGS; \
CXXFLAGS="$(STAGEfeedback_CXXFLAGS)"; export CXXFLAGS; \
LIBCFLAGS="$(STAGEfeedback_CFLAGS)"; export LIBCFLAGS; \
- echo Configuring stage feedback in $(HOST_SUBDIR)/libiberty ; \
- $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/libiberty ; \
+ echo Configuring stage feedback in $(HOST_SUBDIR)/libiberty; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/libiberty; \
cd $(HOST_SUBDIR)/libiberty || exit 1; \
case $(srcdir) in \
/* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
*) topdir=`echo $(HOST_SUBDIR)/libiberty/ | \
sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
esac; \
- srcdiroption="--srcdir=$${topdir}/libiberty"; \
- libsrcdir="$$s/libiberty"; \
- $(SHELL) $${libsrcdir}/configure \
+ module_srcdir=libiberty; \
+ $(SHELL) $$s/$$module_srcdir/configure \
+ --srcdir=$${topdir}/$$module_srcdir \
$(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
- --target=${target_alias} $${srcdiroption} \
+ --target=${target_alias} \
--with-build-libsubdir=$(HOST_SUBDIR) \
$(STAGEfeedback_CONFIGURE_FLAGS) \
@extra_host_libiberty_configure_flags@
@@ -23095,9 +22898,9 @@ check-libiberty:
@: $(MAKE); $(unstage)
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(HOST_EXPORTS) \
+ $(HOST_EXPORTS) $(EXTRA_HOST_EXPORTS) \
(cd $(HOST_SUBDIR)/libiberty && \
- $(MAKE) $(FLAGS_TO_PASS) check)
+ $(MAKE) $(FLAGS_TO_PASS) $(EXTRA_BOOTSTRAP_FLAGS) check)
@endif libiberty
@@ -23147,7 +22950,7 @@ info-libiberty: \
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing info in libiberty" ; \
+ echo "Doing info in libiberty"; \
(cd $(HOST_SUBDIR)/libiberty && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -23172,7 +22975,7 @@ dvi-libiberty: \
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing dvi in libiberty" ; \
+ echo "Doing dvi in libiberty"; \
(cd $(HOST_SUBDIR)/libiberty && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -23197,7 +23000,7 @@ pdf-libiberty: \
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing pdf in libiberty" ; \
+ echo "Doing pdf in libiberty"; \
(cd $(HOST_SUBDIR)/libiberty && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -23222,7 +23025,7 @@ html-libiberty: \
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing html in libiberty" ; \
+ echo "Doing html in libiberty"; \
(cd $(HOST_SUBDIR)/libiberty && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -23247,7 +23050,7 @@ TAGS-libiberty: \
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing TAGS in libiberty" ; \
+ echo "Doing TAGS in libiberty"; \
(cd $(HOST_SUBDIR)/libiberty && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -23273,7 +23076,7 @@ install-info-libiberty: \
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing install-info in libiberty" ; \
+ echo "Doing install-info in libiberty"; \
(cd $(HOST_SUBDIR)/libiberty && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -23299,7 +23102,7 @@ install-pdf-libiberty: \
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing install-pdf in libiberty" ; \
+ echo "Doing install-pdf in libiberty"; \
(cd $(HOST_SUBDIR)/libiberty && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -23325,7 +23128,7 @@ install-html-libiberty: \
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing install-html in libiberty" ; \
+ echo "Doing install-html in libiberty"; \
(cd $(HOST_SUBDIR)/libiberty && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -23350,7 +23153,7 @@ installcheck-libiberty: \
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing installcheck in libiberty" ; \
+ echo "Doing installcheck in libiberty"; \
(cd $(HOST_SUBDIR)/libiberty && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -23374,7 +23177,7 @@ mostlyclean-libiberty:
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing mostlyclean in libiberty" ; \
+ echo "Doing mostlyclean in libiberty"; \
(cd $(HOST_SUBDIR)/libiberty && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -23398,7 +23201,7 @@ clean-libiberty:
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing clean in libiberty" ; \
+ echo "Doing clean in libiberty"; \
(cd $(HOST_SUBDIR)/libiberty && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -23422,7 +23225,7 @@ distclean-libiberty:
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing distclean in libiberty" ; \
+ echo "Doing distclean in libiberty"; \
(cd $(HOST_SUBDIR)/libiberty && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -23446,7 +23249,7 @@ maintainer-clean-libiberty:
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing maintainer-clean in libiberty" ; \
+ echo "Doing maintainer-clean in libiberty"; \
(cd $(HOST_SUBDIR)/libiberty && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -23459,6 +23262,886 @@ maintainer-clean-libiberty:
+.PHONY: configure-libiberty-linker-plugin maybe-configure-libiberty-linker-plugin
+maybe-configure-libiberty-linker-plugin:
+@if gcc-bootstrap
+configure-libiberty-linker-plugin: stage_current
+@endif gcc-bootstrap
+@if libiberty-linker-plugin
+maybe-configure-libiberty-linker-plugin: configure-libiberty-linker-plugin
+configure-libiberty-linker-plugin:
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ test ! -f $(HOST_SUBDIR)/libiberty-linker-plugin/Makefile || exit 0; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/libiberty-linker-plugin; \
+ $(HOST_EXPORTS) \
+ echo Configuring in $(HOST_SUBDIR)/libiberty-linker-plugin; \
+ cd "$(HOST_SUBDIR)/libiberty-linker-plugin" || exit 1; \
+ case $(srcdir) in \
+ /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+ *) topdir=`echo $(HOST_SUBDIR)/libiberty-linker-plugin/ | \
+ sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
+ esac; \
+ module_srcdir=libiberty; \
+ $(SHELL) \
+ $$s/$$module_srcdir/configure \
+ --srcdir=$${topdir}/$$module_srcdir \
+ $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
+ --target=${target_alias} @extra_host_libiberty_configure_flags@ --disable-install-libiberty @extra_linker_plugin_flags@ @extra_linker_plugin_configure_flags@ \
+ || exit 1
+@endif libiberty-linker-plugin
+
+
+
+.PHONY: configure-stage1-libiberty-linker-plugin maybe-configure-stage1-libiberty-linker-plugin
+maybe-configure-stage1-libiberty-linker-plugin:
+@if libiberty-linker-plugin-bootstrap
+maybe-configure-stage1-libiberty-linker-plugin: configure-stage1-libiberty-linker-plugin
+configure-stage1-libiberty-linker-plugin:
+ @[ $(current_stage) = stage1 ] || $(MAKE) stage1-start
+ @$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/libiberty-linker-plugin
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ TFLAGS="$(STAGE1_TFLAGS)"; \
+ test ! -f $(HOST_SUBDIR)/libiberty-linker-plugin/Makefile || exit 0; \
+ $(HOST_EXPORTS) \
+ CFLAGS="$(STAGE1_CFLAGS)"; export CFLAGS; \
+ CXXFLAGS="$(STAGE1_CXXFLAGS)"; export CXXFLAGS; \
+ LIBCFLAGS="$(LIBCFLAGS)"; export LIBCFLAGS; \
+ echo Configuring stage 1 in $(HOST_SUBDIR)/libiberty-linker-plugin; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/libiberty-linker-plugin; \
+ cd $(HOST_SUBDIR)/libiberty-linker-plugin || exit 1; \
+ case $(srcdir) in \
+ /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+ *) topdir=`echo $(HOST_SUBDIR)/libiberty-linker-plugin/ | \
+ sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
+ esac; \
+ module_srcdir=libiberty; \
+ $(SHELL) $$s/$$module_srcdir/configure \
+ --srcdir=$${topdir}/$$module_srcdir \
+ $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
+ --target=${target_alias} \
+ \
+ $(STAGE1_CONFIGURE_FLAGS) \
+ @extra_host_libiberty_configure_flags@ --disable-install-libiberty @extra_linker_plugin_flags@ @extra_linker_plugin_configure_flags@
+@endif libiberty-linker-plugin-bootstrap
+
+.PHONY: configure-stage2-libiberty-linker-plugin maybe-configure-stage2-libiberty-linker-plugin
+maybe-configure-stage2-libiberty-linker-plugin:
+@if libiberty-linker-plugin-bootstrap
+maybe-configure-stage2-libiberty-linker-plugin: configure-stage2-libiberty-linker-plugin
+configure-stage2-libiberty-linker-plugin:
+ @[ $(current_stage) = stage2 ] || $(MAKE) stage2-start
+ @$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/libiberty-linker-plugin
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ TFLAGS="$(STAGE2_TFLAGS)"; \
+ test ! -f $(HOST_SUBDIR)/libiberty-linker-plugin/Makefile || exit 0; \
+ $(HOST_EXPORTS) \
+ $(POSTSTAGE1_HOST_EXPORTS) \
+ CFLAGS="$(STAGE2_CFLAGS)"; export CFLAGS; \
+ CXXFLAGS="$(STAGE2_CXXFLAGS)"; export CXXFLAGS; \
+ LIBCFLAGS="$(STAGE2_CFLAGS)"; export LIBCFLAGS; \
+ echo Configuring stage 2 in $(HOST_SUBDIR)/libiberty-linker-plugin; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/libiberty-linker-plugin; \
+ cd $(HOST_SUBDIR)/libiberty-linker-plugin || exit 1; \
+ case $(srcdir) in \
+ /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+ *) topdir=`echo $(HOST_SUBDIR)/libiberty-linker-plugin/ | \
+ sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
+ esac; \
+ module_srcdir=libiberty; \
+ $(SHELL) $$s/$$module_srcdir/configure \
+ --srcdir=$${topdir}/$$module_srcdir \
+ $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
+ --target=${target_alias} \
+ --with-build-libsubdir=$(HOST_SUBDIR) \
+ $(STAGE2_CONFIGURE_FLAGS) \
+ @extra_host_libiberty_configure_flags@ --disable-install-libiberty @extra_linker_plugin_flags@ @extra_linker_plugin_configure_flags@
+@endif libiberty-linker-plugin-bootstrap
+
+.PHONY: configure-stage3-libiberty-linker-plugin maybe-configure-stage3-libiberty-linker-plugin
+maybe-configure-stage3-libiberty-linker-plugin:
+@if libiberty-linker-plugin-bootstrap
+maybe-configure-stage3-libiberty-linker-plugin: configure-stage3-libiberty-linker-plugin
+configure-stage3-libiberty-linker-plugin:
+ @[ $(current_stage) = stage3 ] || $(MAKE) stage3-start
+ @$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/libiberty-linker-plugin
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ TFLAGS="$(STAGE3_TFLAGS)"; \
+ test ! -f $(HOST_SUBDIR)/libiberty-linker-plugin/Makefile || exit 0; \
+ $(HOST_EXPORTS) \
+ $(POSTSTAGE1_HOST_EXPORTS) \
+ CFLAGS="$(STAGE3_CFLAGS)"; export CFLAGS; \
+ CXXFLAGS="$(STAGE3_CXXFLAGS)"; export CXXFLAGS; \
+ LIBCFLAGS="$(STAGE3_CFLAGS)"; export LIBCFLAGS; \
+ echo Configuring stage 3 in $(HOST_SUBDIR)/libiberty-linker-plugin; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/libiberty-linker-plugin; \
+ cd $(HOST_SUBDIR)/libiberty-linker-plugin || exit 1; \
+ case $(srcdir) in \
+ /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+ *) topdir=`echo $(HOST_SUBDIR)/libiberty-linker-plugin/ | \
+ sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
+ esac; \
+ module_srcdir=libiberty; \
+ $(SHELL) $$s/$$module_srcdir/configure \
+ --srcdir=$${topdir}/$$module_srcdir \
+ $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
+ --target=${target_alias} \
+ --with-build-libsubdir=$(HOST_SUBDIR) \
+ $(STAGE3_CONFIGURE_FLAGS) \
+ @extra_host_libiberty_configure_flags@ --disable-install-libiberty @extra_linker_plugin_flags@ @extra_linker_plugin_configure_flags@
+@endif libiberty-linker-plugin-bootstrap
+
+.PHONY: configure-stage4-libiberty-linker-plugin maybe-configure-stage4-libiberty-linker-plugin
+maybe-configure-stage4-libiberty-linker-plugin:
+@if libiberty-linker-plugin-bootstrap
+maybe-configure-stage4-libiberty-linker-plugin: configure-stage4-libiberty-linker-plugin
+configure-stage4-libiberty-linker-plugin:
+ @[ $(current_stage) = stage4 ] || $(MAKE) stage4-start
+ @$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/libiberty-linker-plugin
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ TFLAGS="$(STAGE4_TFLAGS)"; \
+ test ! -f $(HOST_SUBDIR)/libiberty-linker-plugin/Makefile || exit 0; \
+ $(HOST_EXPORTS) \
+ $(POSTSTAGE1_HOST_EXPORTS) \
+ CFLAGS="$(STAGE4_CFLAGS)"; export CFLAGS; \
+ CXXFLAGS="$(STAGE4_CXXFLAGS)"; export CXXFLAGS; \
+ LIBCFLAGS="$(STAGE4_CFLAGS)"; export LIBCFLAGS; \
+ echo Configuring stage 4 in $(HOST_SUBDIR)/libiberty-linker-plugin; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/libiberty-linker-plugin; \
+ cd $(HOST_SUBDIR)/libiberty-linker-plugin || exit 1; \
+ case $(srcdir) in \
+ /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+ *) topdir=`echo $(HOST_SUBDIR)/libiberty-linker-plugin/ | \
+ sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
+ esac; \
+ module_srcdir=libiberty; \
+ $(SHELL) $$s/$$module_srcdir/configure \
+ --srcdir=$${topdir}/$$module_srcdir \
+ $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
+ --target=${target_alias} \
+ --with-build-libsubdir=$(HOST_SUBDIR) \
+ $(STAGE4_CONFIGURE_FLAGS) \
+ @extra_host_libiberty_configure_flags@ --disable-install-libiberty @extra_linker_plugin_flags@ @extra_linker_plugin_configure_flags@
+@endif libiberty-linker-plugin-bootstrap
+
+.PHONY: configure-stageprofile-libiberty-linker-plugin maybe-configure-stageprofile-libiberty-linker-plugin
+maybe-configure-stageprofile-libiberty-linker-plugin:
+@if libiberty-linker-plugin-bootstrap
+maybe-configure-stageprofile-libiberty-linker-plugin: configure-stageprofile-libiberty-linker-plugin
+configure-stageprofile-libiberty-linker-plugin:
+ @[ $(current_stage) = stageprofile ] || $(MAKE) stageprofile-start
+ @$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/libiberty-linker-plugin
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ TFLAGS="$(STAGEprofile_TFLAGS)"; \
+ test ! -f $(HOST_SUBDIR)/libiberty-linker-plugin/Makefile || exit 0; \
+ $(HOST_EXPORTS) \
+ $(POSTSTAGE1_HOST_EXPORTS) \
+ CFLAGS="$(STAGEprofile_CFLAGS)"; export CFLAGS; \
+ CXXFLAGS="$(STAGEprofile_CXXFLAGS)"; export CXXFLAGS; \
+ LIBCFLAGS="$(STAGEprofile_CFLAGS)"; export LIBCFLAGS; \
+ echo Configuring stage profile in $(HOST_SUBDIR)/libiberty-linker-plugin; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/libiberty-linker-plugin; \
+ cd $(HOST_SUBDIR)/libiberty-linker-plugin || exit 1; \
+ case $(srcdir) in \
+ /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+ *) topdir=`echo $(HOST_SUBDIR)/libiberty-linker-plugin/ | \
+ sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
+ esac; \
+ module_srcdir=libiberty; \
+ $(SHELL) $$s/$$module_srcdir/configure \
+ --srcdir=$${topdir}/$$module_srcdir \
+ $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
+ --target=${target_alias} \
+ --with-build-libsubdir=$(HOST_SUBDIR) \
+ $(STAGEprofile_CONFIGURE_FLAGS) \
+ @extra_host_libiberty_configure_flags@ --disable-install-libiberty @extra_linker_plugin_flags@ @extra_linker_plugin_configure_flags@
+@endif libiberty-linker-plugin-bootstrap
+
+.PHONY: configure-stagefeedback-libiberty-linker-plugin maybe-configure-stagefeedback-libiberty-linker-plugin
+maybe-configure-stagefeedback-libiberty-linker-plugin:
+@if libiberty-linker-plugin-bootstrap
+maybe-configure-stagefeedback-libiberty-linker-plugin: configure-stagefeedback-libiberty-linker-plugin
+configure-stagefeedback-libiberty-linker-plugin:
+ @[ $(current_stage) = stagefeedback ] || $(MAKE) stagefeedback-start
+ @$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/libiberty-linker-plugin
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ TFLAGS="$(STAGEfeedback_TFLAGS)"; \
+ test ! -f $(HOST_SUBDIR)/libiberty-linker-plugin/Makefile || exit 0; \
+ $(HOST_EXPORTS) \
+ $(POSTSTAGE1_HOST_EXPORTS) \
+ CFLAGS="$(STAGEfeedback_CFLAGS)"; export CFLAGS; \
+ CXXFLAGS="$(STAGEfeedback_CXXFLAGS)"; export CXXFLAGS; \
+ LIBCFLAGS="$(STAGEfeedback_CFLAGS)"; export LIBCFLAGS; \
+ echo Configuring stage feedback in $(HOST_SUBDIR)/libiberty-linker-plugin; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/libiberty-linker-plugin; \
+ cd $(HOST_SUBDIR)/libiberty-linker-plugin || exit 1; \
+ case $(srcdir) in \
+ /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+ *) topdir=`echo $(HOST_SUBDIR)/libiberty-linker-plugin/ | \
+ sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
+ esac; \
+ module_srcdir=libiberty; \
+ $(SHELL) $$s/$$module_srcdir/configure \
+ --srcdir=$${topdir}/$$module_srcdir \
+ $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
+ --target=${target_alias} \
+ --with-build-libsubdir=$(HOST_SUBDIR) \
+ $(STAGEfeedback_CONFIGURE_FLAGS) \
+ @extra_host_libiberty_configure_flags@ --disable-install-libiberty @extra_linker_plugin_flags@ @extra_linker_plugin_configure_flags@
+@endif libiberty-linker-plugin-bootstrap
+
+
+
+
+
+.PHONY: all-libiberty-linker-plugin maybe-all-libiberty-linker-plugin
+maybe-all-libiberty-linker-plugin:
+@if gcc-bootstrap
+all-libiberty-linker-plugin: stage_current
+@endif gcc-bootstrap
+@if libiberty-linker-plugin
+TARGET-libiberty-linker-plugin=all
+maybe-all-libiberty-linker-plugin: all-libiberty-linker-plugin
+all-libiberty-linker-plugin: configure-libiberty-linker-plugin
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ (cd $(HOST_SUBDIR)/libiberty-linker-plugin && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS) $(STAGE1_FLAGS_TO_PASS) @extra_linker_plugin_flags@ \
+ $(TARGET-libiberty-linker-plugin))
+@endif libiberty-linker-plugin
+
+
+
+.PHONY: all-stage1-libiberty-linker-plugin maybe-all-stage1-libiberty-linker-plugin
+.PHONY: clean-stage1-libiberty-linker-plugin maybe-clean-stage1-libiberty-linker-plugin
+maybe-all-stage1-libiberty-linker-plugin:
+maybe-clean-stage1-libiberty-linker-plugin:
+@if libiberty-linker-plugin-bootstrap
+maybe-all-stage1-libiberty-linker-plugin: all-stage1-libiberty-linker-plugin
+all-stage1: all-stage1-libiberty-linker-plugin
+TARGET-stage1-libiberty-linker-plugin = $(TARGET-libiberty-linker-plugin)
+all-stage1-libiberty-linker-plugin: configure-stage1-libiberty-linker-plugin
+ @[ $(current_stage) = stage1 ] || $(MAKE) stage1-start
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ TFLAGS="$(STAGE1_TFLAGS)"; \
+ $(HOST_EXPORTS) \
+ cd $(HOST_SUBDIR)/libiberty-linker-plugin && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) \
+ CFLAGS="$(STAGE1_CFLAGS)" \
+ CXXFLAGS="$(STAGE1_CXXFLAGS)" \
+ LIBCFLAGS="$(LIBCFLAGS)" \
+ CFLAGS_FOR_TARGET="$(CFLAGS_FOR_TARGET)" \
+ CXXFLAGS_FOR_TARGET="$(CXXFLAGS_FOR_TARGET)" \
+ LIBCFLAGS_FOR_TARGET="$(LIBCFLAGS_FOR_TARGET)" \
+ $(EXTRA_HOST_FLAGS) \
+ $(STAGE1_FLAGS_TO_PASS) @extra_linker_plugin_flags@ \
+ TFLAGS="$(STAGE1_TFLAGS)" \
+ $(TARGET-stage1-libiberty-linker-plugin)
+
+maybe-clean-stage1-libiberty-linker-plugin: clean-stage1-libiberty-linker-plugin
+clean-stage1: clean-stage1-libiberty-linker-plugin
+clean-stage1-libiberty-linker-plugin:
+ @if [ $(current_stage) = stage1 ]; then \
+ [ -f $(HOST_SUBDIR)/libiberty-linker-plugin/Makefile ] || exit 0; \
+ else \
+ [ -f $(HOST_SUBDIR)/stage1-libiberty-linker-plugin/Makefile ] || exit 0; \
+ $(MAKE) stage1-start; \
+ fi; \
+ cd $(HOST_SUBDIR)/libiberty-linker-plugin && \
+ $(MAKE) $(EXTRA_HOST_FLAGS) \
+ $(STAGE1_FLAGS_TO_PASS) @extra_linker_plugin_flags@ clean
+@endif libiberty-linker-plugin-bootstrap
+
+
+.PHONY: all-stage2-libiberty-linker-plugin maybe-all-stage2-libiberty-linker-plugin
+.PHONY: clean-stage2-libiberty-linker-plugin maybe-clean-stage2-libiberty-linker-plugin
+maybe-all-stage2-libiberty-linker-plugin:
+maybe-clean-stage2-libiberty-linker-plugin:
+@if libiberty-linker-plugin-bootstrap
+maybe-all-stage2-libiberty-linker-plugin: all-stage2-libiberty-linker-plugin
+all-stage2: all-stage2-libiberty-linker-plugin
+TARGET-stage2-libiberty-linker-plugin = $(TARGET-libiberty-linker-plugin)
+all-stage2-libiberty-linker-plugin: configure-stage2-libiberty-linker-plugin
+ @[ $(current_stage) = stage2 ] || $(MAKE) stage2-start
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ TFLAGS="$(STAGE2_TFLAGS)"; \
+ $(HOST_EXPORTS) \
+ $(POSTSTAGE1_HOST_EXPORTS) \
+ cd $(HOST_SUBDIR)/libiberty-linker-plugin && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) \
+ CFLAGS="$(STAGE2_CFLAGS)" \
+ CXXFLAGS="$(STAGE2_CXXFLAGS)" \
+ LIBCFLAGS="$(STAGE2_CFLAGS)" \
+ CFLAGS_FOR_TARGET="$(CFLAGS_FOR_TARGET)" \
+ CXXFLAGS_FOR_TARGET="$(CXXFLAGS_FOR_TARGET)" \
+ LIBCFLAGS_FOR_TARGET="$(LIBCFLAGS_FOR_TARGET)" \
+ $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) @extra_linker_plugin_flags@ \
+ TFLAGS="$(STAGE2_TFLAGS)" \
+ $(TARGET-stage2-libiberty-linker-plugin)
+
+maybe-clean-stage2-libiberty-linker-plugin: clean-stage2-libiberty-linker-plugin
+clean-stage2: clean-stage2-libiberty-linker-plugin
+clean-stage2-libiberty-linker-plugin:
+ @if [ $(current_stage) = stage2 ]; then \
+ [ -f $(HOST_SUBDIR)/libiberty-linker-plugin/Makefile ] || exit 0; \
+ else \
+ [ -f $(HOST_SUBDIR)/stage2-libiberty-linker-plugin/Makefile ] || exit 0; \
+ $(MAKE) stage2-start; \
+ fi; \
+ cd $(HOST_SUBDIR)/libiberty-linker-plugin && \
+ $(MAKE) $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) @extra_linker_plugin_flags@ clean
+@endif libiberty-linker-plugin-bootstrap
+
+
+.PHONY: all-stage3-libiberty-linker-plugin maybe-all-stage3-libiberty-linker-plugin
+.PHONY: clean-stage3-libiberty-linker-plugin maybe-clean-stage3-libiberty-linker-plugin
+maybe-all-stage3-libiberty-linker-plugin:
+maybe-clean-stage3-libiberty-linker-plugin:
+@if libiberty-linker-plugin-bootstrap
+maybe-all-stage3-libiberty-linker-plugin: all-stage3-libiberty-linker-plugin
+all-stage3: all-stage3-libiberty-linker-plugin
+TARGET-stage3-libiberty-linker-plugin = $(TARGET-libiberty-linker-plugin)
+all-stage3-libiberty-linker-plugin: configure-stage3-libiberty-linker-plugin
+ @[ $(current_stage) = stage3 ] || $(MAKE) stage3-start
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ TFLAGS="$(STAGE3_TFLAGS)"; \
+ $(HOST_EXPORTS) \
+ $(POSTSTAGE1_HOST_EXPORTS) \
+ cd $(HOST_SUBDIR)/libiberty-linker-plugin && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) \
+ CFLAGS="$(STAGE3_CFLAGS)" \
+ CXXFLAGS="$(STAGE3_CXXFLAGS)" \
+ LIBCFLAGS="$(STAGE3_CFLAGS)" \
+ CFLAGS_FOR_TARGET="$(CFLAGS_FOR_TARGET)" \
+ CXXFLAGS_FOR_TARGET="$(CXXFLAGS_FOR_TARGET)" \
+ LIBCFLAGS_FOR_TARGET="$(LIBCFLAGS_FOR_TARGET)" \
+ $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) @extra_linker_plugin_flags@ \
+ TFLAGS="$(STAGE3_TFLAGS)" \
+ $(TARGET-stage3-libiberty-linker-plugin)
+
+maybe-clean-stage3-libiberty-linker-plugin: clean-stage3-libiberty-linker-plugin
+clean-stage3: clean-stage3-libiberty-linker-plugin
+clean-stage3-libiberty-linker-plugin:
+ @if [ $(current_stage) = stage3 ]; then \
+ [ -f $(HOST_SUBDIR)/libiberty-linker-plugin/Makefile ] || exit 0; \
+ else \
+ [ -f $(HOST_SUBDIR)/stage3-libiberty-linker-plugin/Makefile ] || exit 0; \
+ $(MAKE) stage3-start; \
+ fi; \
+ cd $(HOST_SUBDIR)/libiberty-linker-plugin && \
+ $(MAKE) $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) @extra_linker_plugin_flags@ clean
+@endif libiberty-linker-plugin-bootstrap
+
+
+.PHONY: all-stage4-libiberty-linker-plugin maybe-all-stage4-libiberty-linker-plugin
+.PHONY: clean-stage4-libiberty-linker-plugin maybe-clean-stage4-libiberty-linker-plugin
+maybe-all-stage4-libiberty-linker-plugin:
+maybe-clean-stage4-libiberty-linker-plugin:
+@if libiberty-linker-plugin-bootstrap
+maybe-all-stage4-libiberty-linker-plugin: all-stage4-libiberty-linker-plugin
+all-stage4: all-stage4-libiberty-linker-plugin
+TARGET-stage4-libiberty-linker-plugin = $(TARGET-libiberty-linker-plugin)
+all-stage4-libiberty-linker-plugin: configure-stage4-libiberty-linker-plugin
+ @[ $(current_stage) = stage4 ] || $(MAKE) stage4-start
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ TFLAGS="$(STAGE4_TFLAGS)"; \
+ $(HOST_EXPORTS) \
+ $(POSTSTAGE1_HOST_EXPORTS) \
+ cd $(HOST_SUBDIR)/libiberty-linker-plugin && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) \
+ CFLAGS="$(STAGE4_CFLAGS)" \
+ CXXFLAGS="$(STAGE4_CXXFLAGS)" \
+ LIBCFLAGS="$(STAGE4_CFLAGS)" \
+ CFLAGS_FOR_TARGET="$(CFLAGS_FOR_TARGET)" \
+ CXXFLAGS_FOR_TARGET="$(CXXFLAGS_FOR_TARGET)" \
+ LIBCFLAGS_FOR_TARGET="$(LIBCFLAGS_FOR_TARGET)" \
+ $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) @extra_linker_plugin_flags@ \
+ TFLAGS="$(STAGE4_TFLAGS)" \
+ $(TARGET-stage4-libiberty-linker-plugin)
+
+maybe-clean-stage4-libiberty-linker-plugin: clean-stage4-libiberty-linker-plugin
+clean-stage4: clean-stage4-libiberty-linker-plugin
+clean-stage4-libiberty-linker-plugin:
+ @if [ $(current_stage) = stage4 ]; then \
+ [ -f $(HOST_SUBDIR)/libiberty-linker-plugin/Makefile ] || exit 0; \
+ else \
+ [ -f $(HOST_SUBDIR)/stage4-libiberty-linker-plugin/Makefile ] || exit 0; \
+ $(MAKE) stage4-start; \
+ fi; \
+ cd $(HOST_SUBDIR)/libiberty-linker-plugin && \
+ $(MAKE) $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) @extra_linker_plugin_flags@ clean
+@endif libiberty-linker-plugin-bootstrap
+
+
+.PHONY: all-stageprofile-libiberty-linker-plugin maybe-all-stageprofile-libiberty-linker-plugin
+.PHONY: clean-stageprofile-libiberty-linker-plugin maybe-clean-stageprofile-libiberty-linker-plugin
+maybe-all-stageprofile-libiberty-linker-plugin:
+maybe-clean-stageprofile-libiberty-linker-plugin:
+@if libiberty-linker-plugin-bootstrap
+maybe-all-stageprofile-libiberty-linker-plugin: all-stageprofile-libiberty-linker-plugin
+all-stageprofile: all-stageprofile-libiberty-linker-plugin
+TARGET-stageprofile-libiberty-linker-plugin = $(TARGET-libiberty-linker-plugin)
+all-stageprofile-libiberty-linker-plugin: configure-stageprofile-libiberty-linker-plugin
+ @[ $(current_stage) = stageprofile ] || $(MAKE) stageprofile-start
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ TFLAGS="$(STAGEprofile_TFLAGS)"; \
+ $(HOST_EXPORTS) \
+ $(POSTSTAGE1_HOST_EXPORTS) \
+ cd $(HOST_SUBDIR)/libiberty-linker-plugin && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) \
+ CFLAGS="$(STAGEprofile_CFLAGS)" \
+ CXXFLAGS="$(STAGEprofile_CXXFLAGS)" \
+ LIBCFLAGS="$(STAGEprofile_CFLAGS)" \
+ CFLAGS_FOR_TARGET="$(CFLAGS_FOR_TARGET)" \
+ CXXFLAGS_FOR_TARGET="$(CXXFLAGS_FOR_TARGET)" \
+ LIBCFLAGS_FOR_TARGET="$(LIBCFLAGS_FOR_TARGET)" \
+ $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) @extra_linker_plugin_flags@ \
+ TFLAGS="$(STAGEprofile_TFLAGS)" \
+ $(TARGET-stageprofile-libiberty-linker-plugin)
+
+maybe-clean-stageprofile-libiberty-linker-plugin: clean-stageprofile-libiberty-linker-plugin
+clean-stageprofile: clean-stageprofile-libiberty-linker-plugin
+clean-stageprofile-libiberty-linker-plugin:
+ @if [ $(current_stage) = stageprofile ]; then \
+ [ -f $(HOST_SUBDIR)/libiberty-linker-plugin/Makefile ] || exit 0; \
+ else \
+ [ -f $(HOST_SUBDIR)/stageprofile-libiberty-linker-plugin/Makefile ] || exit 0; \
+ $(MAKE) stageprofile-start; \
+ fi; \
+ cd $(HOST_SUBDIR)/libiberty-linker-plugin && \
+ $(MAKE) $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) @extra_linker_plugin_flags@ clean
+@endif libiberty-linker-plugin-bootstrap
+
+
+.PHONY: all-stagefeedback-libiberty-linker-plugin maybe-all-stagefeedback-libiberty-linker-plugin
+.PHONY: clean-stagefeedback-libiberty-linker-plugin maybe-clean-stagefeedback-libiberty-linker-plugin
+maybe-all-stagefeedback-libiberty-linker-plugin:
+maybe-clean-stagefeedback-libiberty-linker-plugin:
+@if libiberty-linker-plugin-bootstrap
+maybe-all-stagefeedback-libiberty-linker-plugin: all-stagefeedback-libiberty-linker-plugin
+all-stagefeedback: all-stagefeedback-libiberty-linker-plugin
+TARGET-stagefeedback-libiberty-linker-plugin = $(TARGET-libiberty-linker-plugin)
+all-stagefeedback-libiberty-linker-plugin: configure-stagefeedback-libiberty-linker-plugin
+ @[ $(current_stage) = stagefeedback ] || $(MAKE) stagefeedback-start
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ TFLAGS="$(STAGEfeedback_TFLAGS)"; \
+ $(HOST_EXPORTS) \
+ $(POSTSTAGE1_HOST_EXPORTS) \
+ cd $(HOST_SUBDIR)/libiberty-linker-plugin && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) \
+ CFLAGS="$(STAGEfeedback_CFLAGS)" \
+ CXXFLAGS="$(STAGEfeedback_CXXFLAGS)" \
+ LIBCFLAGS="$(STAGEfeedback_CFLAGS)" \
+ CFLAGS_FOR_TARGET="$(CFLAGS_FOR_TARGET)" \
+ CXXFLAGS_FOR_TARGET="$(CXXFLAGS_FOR_TARGET)" \
+ LIBCFLAGS_FOR_TARGET="$(LIBCFLAGS_FOR_TARGET)" \
+ $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) @extra_linker_plugin_flags@ \
+ TFLAGS="$(STAGEfeedback_TFLAGS)" \
+ $(TARGET-stagefeedback-libiberty-linker-plugin)
+
+maybe-clean-stagefeedback-libiberty-linker-plugin: clean-stagefeedback-libiberty-linker-plugin
+clean-stagefeedback: clean-stagefeedback-libiberty-linker-plugin
+clean-stagefeedback-libiberty-linker-plugin:
+ @if [ $(current_stage) = stagefeedback ]; then \
+ [ -f $(HOST_SUBDIR)/libiberty-linker-plugin/Makefile ] || exit 0; \
+ else \
+ [ -f $(HOST_SUBDIR)/stagefeedback-libiberty-linker-plugin/Makefile ] || exit 0; \
+ $(MAKE) stagefeedback-start; \
+ fi; \
+ cd $(HOST_SUBDIR)/libiberty-linker-plugin && \
+ $(MAKE) $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) @extra_linker_plugin_flags@ clean
+@endif libiberty-linker-plugin-bootstrap
+
+
+
+
+
+.PHONY: check-libiberty-linker-plugin maybe-check-libiberty-linker-plugin
+maybe-check-libiberty-linker-plugin:
+@if libiberty-linker-plugin
+maybe-check-libiberty-linker-plugin: check-libiberty-linker-plugin
+
+check-libiberty-linker-plugin:
+ @: $(MAKE); $(unstage)
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) $(EXTRA_HOST_EXPORTS) \
+ (cd $(HOST_SUBDIR)/libiberty-linker-plugin && \
+ $(MAKE) $(FLAGS_TO_PASS) @extra_linker_plugin_flags@ $(EXTRA_BOOTSTRAP_FLAGS) check)
+
+@endif libiberty-linker-plugin
+
+.PHONY: install-libiberty-linker-plugin maybe-install-libiberty-linker-plugin
+maybe-install-libiberty-linker-plugin:
+@if libiberty-linker-plugin
+maybe-install-libiberty-linker-plugin: install-libiberty-linker-plugin
+
+install-libiberty-linker-plugin: installdirs
+ @: $(MAKE); $(unstage)
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ (cd $(HOST_SUBDIR)/libiberty-linker-plugin && \
+ $(MAKE) $(FLAGS_TO_PASS) @extra_linker_plugin_flags@ install)
+
+@endif libiberty-linker-plugin
+
+.PHONY: install-strip-libiberty-linker-plugin maybe-install-strip-libiberty-linker-plugin
+maybe-install-strip-libiberty-linker-plugin:
+@if libiberty-linker-plugin
+maybe-install-strip-libiberty-linker-plugin: install-strip-libiberty-linker-plugin
+
+install-strip-libiberty-linker-plugin: installdirs
+ @: $(MAKE); $(unstage)
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ (cd $(HOST_SUBDIR)/libiberty-linker-plugin && \
+ $(MAKE) $(FLAGS_TO_PASS) @extra_linker_plugin_flags@ install-strip)
+
+@endif libiberty-linker-plugin
+
+# Other targets (info, dvi, pdf, etc.)
+
+.PHONY: maybe-info-libiberty-linker-plugin info-libiberty-linker-plugin
+maybe-info-libiberty-linker-plugin:
+@if libiberty-linker-plugin
+maybe-info-libiberty-linker-plugin: info-libiberty-linker-plugin
+
+info-libiberty-linker-plugin: \
+ configure-libiberty-linker-plugin
+ @[ -f ./libiberty-linker-plugin/Makefile ] || exit 0; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) @extra_linker_plugin_flags@; do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing info in libiberty-linker-plugin"; \
+ (cd $(HOST_SUBDIR)/libiberty-linker-plugin && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
+ info) \
+ || exit 1
+
+@endif libiberty-linker-plugin
+
+.PHONY: maybe-dvi-libiberty-linker-plugin dvi-libiberty-linker-plugin
+maybe-dvi-libiberty-linker-plugin:
+@if libiberty-linker-plugin
+maybe-dvi-libiberty-linker-plugin: dvi-libiberty-linker-plugin
+
+dvi-libiberty-linker-plugin: \
+ configure-libiberty-linker-plugin
+ @[ -f ./libiberty-linker-plugin/Makefile ] || exit 0; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) @extra_linker_plugin_flags@; do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing dvi in libiberty-linker-plugin"; \
+ (cd $(HOST_SUBDIR)/libiberty-linker-plugin && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
+ dvi) \
+ || exit 1
+
+@endif libiberty-linker-plugin
+
+.PHONY: maybe-pdf-libiberty-linker-plugin pdf-libiberty-linker-plugin
+maybe-pdf-libiberty-linker-plugin:
+@if libiberty-linker-plugin
+maybe-pdf-libiberty-linker-plugin: pdf-libiberty-linker-plugin
+
+pdf-libiberty-linker-plugin: \
+ configure-libiberty-linker-plugin
+ @[ -f ./libiberty-linker-plugin/Makefile ] || exit 0; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) @extra_linker_plugin_flags@; do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing pdf in libiberty-linker-plugin"; \
+ (cd $(HOST_SUBDIR)/libiberty-linker-plugin && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
+ pdf) \
+ || exit 1
+
+@endif libiberty-linker-plugin
+
+.PHONY: maybe-html-libiberty-linker-plugin html-libiberty-linker-plugin
+maybe-html-libiberty-linker-plugin:
+@if libiberty-linker-plugin
+maybe-html-libiberty-linker-plugin: html-libiberty-linker-plugin
+
+html-libiberty-linker-plugin: \
+ configure-libiberty-linker-plugin
+ @[ -f ./libiberty-linker-plugin/Makefile ] || exit 0; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) @extra_linker_plugin_flags@; do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing html in libiberty-linker-plugin"; \
+ (cd $(HOST_SUBDIR)/libiberty-linker-plugin && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
+ html) \
+ || exit 1
+
+@endif libiberty-linker-plugin
+
+.PHONY: maybe-TAGS-libiberty-linker-plugin TAGS-libiberty-linker-plugin
+maybe-TAGS-libiberty-linker-plugin:
+@if libiberty-linker-plugin
+maybe-TAGS-libiberty-linker-plugin: TAGS-libiberty-linker-plugin
+
+TAGS-libiberty-linker-plugin: \
+ configure-libiberty-linker-plugin
+ @[ -f ./libiberty-linker-plugin/Makefile ] || exit 0; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) @extra_linker_plugin_flags@; do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing TAGS in libiberty-linker-plugin"; \
+ (cd $(HOST_SUBDIR)/libiberty-linker-plugin && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
+ TAGS) \
+ || exit 1
+
+@endif libiberty-linker-plugin
+
+.PHONY: maybe-install-info-libiberty-linker-plugin install-info-libiberty-linker-plugin
+maybe-install-info-libiberty-linker-plugin:
+@if libiberty-linker-plugin
+maybe-install-info-libiberty-linker-plugin: install-info-libiberty-linker-plugin
+
+install-info-libiberty-linker-plugin: \
+ configure-libiberty-linker-plugin \
+ info-libiberty-linker-plugin
+ @[ -f ./libiberty-linker-plugin/Makefile ] || exit 0; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) @extra_linker_plugin_flags@; do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing install-info in libiberty-linker-plugin"; \
+ (cd $(HOST_SUBDIR)/libiberty-linker-plugin && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
+ install-info) \
+ || exit 1
+
+@endif libiberty-linker-plugin
+
+.PHONY: maybe-install-pdf-libiberty-linker-plugin install-pdf-libiberty-linker-plugin
+maybe-install-pdf-libiberty-linker-plugin:
+@if libiberty-linker-plugin
+maybe-install-pdf-libiberty-linker-plugin: install-pdf-libiberty-linker-plugin
+
+install-pdf-libiberty-linker-plugin: \
+ configure-libiberty-linker-plugin \
+ pdf-libiberty-linker-plugin
+ @[ -f ./libiberty-linker-plugin/Makefile ] || exit 0; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) @extra_linker_plugin_flags@; do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing install-pdf in libiberty-linker-plugin"; \
+ (cd $(HOST_SUBDIR)/libiberty-linker-plugin && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
+ install-pdf) \
+ || exit 1
+
+@endif libiberty-linker-plugin
+
+.PHONY: maybe-install-html-libiberty-linker-plugin install-html-libiberty-linker-plugin
+maybe-install-html-libiberty-linker-plugin:
+@if libiberty-linker-plugin
+maybe-install-html-libiberty-linker-plugin: install-html-libiberty-linker-plugin
+
+install-html-libiberty-linker-plugin: \
+ configure-libiberty-linker-plugin \
+ html-libiberty-linker-plugin
+ @[ -f ./libiberty-linker-plugin/Makefile ] || exit 0; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) @extra_linker_plugin_flags@; do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing install-html in libiberty-linker-plugin"; \
+ (cd $(HOST_SUBDIR)/libiberty-linker-plugin && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
+ install-html) \
+ || exit 1
+
+@endif libiberty-linker-plugin
+
+.PHONY: maybe-installcheck-libiberty-linker-plugin installcheck-libiberty-linker-plugin
+maybe-installcheck-libiberty-linker-plugin:
+@if libiberty-linker-plugin
+maybe-installcheck-libiberty-linker-plugin: installcheck-libiberty-linker-plugin
+
+installcheck-libiberty-linker-plugin: \
+ configure-libiberty-linker-plugin
+ @[ -f ./libiberty-linker-plugin/Makefile ] || exit 0; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) @extra_linker_plugin_flags@; do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing installcheck in libiberty-linker-plugin"; \
+ (cd $(HOST_SUBDIR)/libiberty-linker-plugin && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
+ installcheck) \
+ || exit 1
+
+@endif libiberty-linker-plugin
+
+.PHONY: maybe-mostlyclean-libiberty-linker-plugin mostlyclean-libiberty-linker-plugin
+maybe-mostlyclean-libiberty-linker-plugin:
+@if libiberty-linker-plugin
+maybe-mostlyclean-libiberty-linker-plugin: mostlyclean-libiberty-linker-plugin
+
+mostlyclean-libiberty-linker-plugin:
+ @[ -f ./libiberty-linker-plugin/Makefile ] || exit 0; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) @extra_linker_plugin_flags@; do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing mostlyclean in libiberty-linker-plugin"; \
+ (cd $(HOST_SUBDIR)/libiberty-linker-plugin && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
+ mostlyclean) \
+ || exit 1
+
+@endif libiberty-linker-plugin
+
+.PHONY: maybe-clean-libiberty-linker-plugin clean-libiberty-linker-plugin
+maybe-clean-libiberty-linker-plugin:
+@if libiberty-linker-plugin
+maybe-clean-libiberty-linker-plugin: clean-libiberty-linker-plugin
+
+clean-libiberty-linker-plugin:
+ @[ -f ./libiberty-linker-plugin/Makefile ] || exit 0; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) @extra_linker_plugin_flags@; do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing clean in libiberty-linker-plugin"; \
+ (cd $(HOST_SUBDIR)/libiberty-linker-plugin && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
+ clean) \
+ || exit 1
+
+@endif libiberty-linker-plugin
+
+.PHONY: maybe-distclean-libiberty-linker-plugin distclean-libiberty-linker-plugin
+maybe-distclean-libiberty-linker-plugin:
+@if libiberty-linker-plugin
+maybe-distclean-libiberty-linker-plugin: distclean-libiberty-linker-plugin
+
+distclean-libiberty-linker-plugin:
+ @[ -f ./libiberty-linker-plugin/Makefile ] || exit 0; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) @extra_linker_plugin_flags@; do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing distclean in libiberty-linker-plugin"; \
+ (cd $(HOST_SUBDIR)/libiberty-linker-plugin && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
+ distclean) \
+ || exit 1
+
+@endif libiberty-linker-plugin
+
+.PHONY: maybe-maintainer-clean-libiberty-linker-plugin maintainer-clean-libiberty-linker-plugin
+maybe-maintainer-clean-libiberty-linker-plugin:
+@if libiberty-linker-plugin
+maybe-maintainer-clean-libiberty-linker-plugin: maintainer-clean-libiberty-linker-plugin
+
+maintainer-clean-libiberty-linker-plugin:
+ @[ -f ./libiberty-linker-plugin/Makefile ] || exit 0; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) @extra_linker_plugin_flags@; do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing maintainer-clean in libiberty-linker-plugin"; \
+ (cd $(HOST_SUBDIR)/libiberty-linker-plugin && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
+ maintainer-clean) \
+ || exit 1
+
+@endif libiberty-linker-plugin
+
+
+
.PHONY: configure-libiconv maybe-configure-libiconv
maybe-configure-libiconv:
@if gcc-bootstrap
@@ -23467,11 +24150,10 @@ configure-libiconv: stage_current
@if libiconv
maybe-configure-libiconv: configure-libiconv
configure-libiconv:
- @: $(MAKE); $(unstage)
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
test ! -f $(HOST_SUBDIR)/libiconv/Makefile || exit 0; \
- $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/libiconv ; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/libiconv; \
$(HOST_EXPORTS) \
echo Configuring in $(HOST_SUBDIR)/libiconv; \
cd "$(HOST_SUBDIR)/libiconv" || exit 1; \
@@ -23480,16 +24162,222 @@ configure-libiconv:
*) topdir=`echo $(HOST_SUBDIR)/libiconv/ | \
sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
esac; \
- srcdiroption="--srcdir=$${topdir}/libiconv"; \
- libsrcdir="$$s/libiconv"; \
- $(SHELL) $${libsrcdir}/configure \
+ module_srcdir=libiconv; \
+ $(SHELL) \
+ $$s/$$module_srcdir/configure \
+ --srcdir=$${topdir}/$$module_srcdir \
$(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
- --target=${target_alias} $${srcdiroption} --disable-shared \
+ --target=${target_alias} --disable-shared \
|| exit 1
@endif libiconv
+.PHONY: configure-stage1-libiconv maybe-configure-stage1-libiconv
+maybe-configure-stage1-libiconv:
+@if libiconv-bootstrap
+maybe-configure-stage1-libiconv: configure-stage1-libiconv
+configure-stage1-libiconv:
+ @[ $(current_stage) = stage1 ] || $(MAKE) stage1-start
+ @$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/libiconv
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ TFLAGS="$(STAGE1_TFLAGS)"; \
+ test ! -f $(HOST_SUBDIR)/libiconv/Makefile || exit 0; \
+ $(HOST_EXPORTS) \
+ CFLAGS="$(STAGE1_CFLAGS)"; export CFLAGS; \
+ CXXFLAGS="$(STAGE1_CXXFLAGS)"; export CXXFLAGS; \
+ LIBCFLAGS="$(LIBCFLAGS)"; export LIBCFLAGS; \
+ echo Configuring stage 1 in $(HOST_SUBDIR)/libiconv; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/libiconv; \
+ cd $(HOST_SUBDIR)/libiconv || exit 1; \
+ case $(srcdir) in \
+ /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+ *) topdir=`echo $(HOST_SUBDIR)/libiconv/ | \
+ sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
+ esac; \
+ module_srcdir=libiconv; \
+ $(SHELL) $$s/$$module_srcdir/configure \
+ --srcdir=$${topdir}/$$module_srcdir \
+ $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
+ --target=${target_alias} \
+ \
+ $(STAGE1_CONFIGURE_FLAGS) \
+ --disable-shared
+@endif libiconv-bootstrap
+
+.PHONY: configure-stage2-libiconv maybe-configure-stage2-libiconv
+maybe-configure-stage2-libiconv:
+@if libiconv-bootstrap
+maybe-configure-stage2-libiconv: configure-stage2-libiconv
+configure-stage2-libiconv:
+ @[ $(current_stage) = stage2 ] || $(MAKE) stage2-start
+ @$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/libiconv
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ TFLAGS="$(STAGE2_TFLAGS)"; \
+ test ! -f $(HOST_SUBDIR)/libiconv/Makefile || exit 0; \
+ $(HOST_EXPORTS) \
+ $(POSTSTAGE1_HOST_EXPORTS) \
+ CFLAGS="$(STAGE2_CFLAGS)"; export CFLAGS; \
+ CXXFLAGS="$(STAGE2_CXXFLAGS)"; export CXXFLAGS; \
+ LIBCFLAGS="$(STAGE2_CFLAGS)"; export LIBCFLAGS; \
+ echo Configuring stage 2 in $(HOST_SUBDIR)/libiconv; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/libiconv; \
+ cd $(HOST_SUBDIR)/libiconv || exit 1; \
+ case $(srcdir) in \
+ /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+ *) topdir=`echo $(HOST_SUBDIR)/libiconv/ | \
+ sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
+ esac; \
+ module_srcdir=libiconv; \
+ $(SHELL) $$s/$$module_srcdir/configure \
+ --srcdir=$${topdir}/$$module_srcdir \
+ $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
+ --target=${target_alias} \
+ --with-build-libsubdir=$(HOST_SUBDIR) \
+ $(STAGE2_CONFIGURE_FLAGS) \
+ --disable-shared
+@endif libiconv-bootstrap
+
+.PHONY: configure-stage3-libiconv maybe-configure-stage3-libiconv
+maybe-configure-stage3-libiconv:
+@if libiconv-bootstrap
+maybe-configure-stage3-libiconv: configure-stage3-libiconv
+configure-stage3-libiconv:
+ @[ $(current_stage) = stage3 ] || $(MAKE) stage3-start
+ @$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/libiconv
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ TFLAGS="$(STAGE3_TFLAGS)"; \
+ test ! -f $(HOST_SUBDIR)/libiconv/Makefile || exit 0; \
+ $(HOST_EXPORTS) \
+ $(POSTSTAGE1_HOST_EXPORTS) \
+ CFLAGS="$(STAGE3_CFLAGS)"; export CFLAGS; \
+ CXXFLAGS="$(STAGE3_CXXFLAGS)"; export CXXFLAGS; \
+ LIBCFLAGS="$(STAGE3_CFLAGS)"; export LIBCFLAGS; \
+ echo Configuring stage 3 in $(HOST_SUBDIR)/libiconv; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/libiconv; \
+ cd $(HOST_SUBDIR)/libiconv || exit 1; \
+ case $(srcdir) in \
+ /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+ *) topdir=`echo $(HOST_SUBDIR)/libiconv/ | \
+ sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
+ esac; \
+ module_srcdir=libiconv; \
+ $(SHELL) $$s/$$module_srcdir/configure \
+ --srcdir=$${topdir}/$$module_srcdir \
+ $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
+ --target=${target_alias} \
+ --with-build-libsubdir=$(HOST_SUBDIR) \
+ $(STAGE3_CONFIGURE_FLAGS) \
+ --disable-shared
+@endif libiconv-bootstrap
+
+.PHONY: configure-stage4-libiconv maybe-configure-stage4-libiconv
+maybe-configure-stage4-libiconv:
+@if libiconv-bootstrap
+maybe-configure-stage4-libiconv: configure-stage4-libiconv
+configure-stage4-libiconv:
+ @[ $(current_stage) = stage4 ] || $(MAKE) stage4-start
+ @$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/libiconv
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ TFLAGS="$(STAGE4_TFLAGS)"; \
+ test ! -f $(HOST_SUBDIR)/libiconv/Makefile || exit 0; \
+ $(HOST_EXPORTS) \
+ $(POSTSTAGE1_HOST_EXPORTS) \
+ CFLAGS="$(STAGE4_CFLAGS)"; export CFLAGS; \
+ CXXFLAGS="$(STAGE4_CXXFLAGS)"; export CXXFLAGS; \
+ LIBCFLAGS="$(STAGE4_CFLAGS)"; export LIBCFLAGS; \
+ echo Configuring stage 4 in $(HOST_SUBDIR)/libiconv; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/libiconv; \
+ cd $(HOST_SUBDIR)/libiconv || exit 1; \
+ case $(srcdir) in \
+ /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+ *) topdir=`echo $(HOST_SUBDIR)/libiconv/ | \
+ sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
+ esac; \
+ module_srcdir=libiconv; \
+ $(SHELL) $$s/$$module_srcdir/configure \
+ --srcdir=$${topdir}/$$module_srcdir \
+ $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
+ --target=${target_alias} \
+ --with-build-libsubdir=$(HOST_SUBDIR) \
+ $(STAGE4_CONFIGURE_FLAGS) \
+ --disable-shared
+@endif libiconv-bootstrap
+
+.PHONY: configure-stageprofile-libiconv maybe-configure-stageprofile-libiconv
+maybe-configure-stageprofile-libiconv:
+@if libiconv-bootstrap
+maybe-configure-stageprofile-libiconv: configure-stageprofile-libiconv
+configure-stageprofile-libiconv:
+ @[ $(current_stage) = stageprofile ] || $(MAKE) stageprofile-start
+ @$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/libiconv
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ TFLAGS="$(STAGEprofile_TFLAGS)"; \
+ test ! -f $(HOST_SUBDIR)/libiconv/Makefile || exit 0; \
+ $(HOST_EXPORTS) \
+ $(POSTSTAGE1_HOST_EXPORTS) \
+ CFLAGS="$(STAGEprofile_CFLAGS)"; export CFLAGS; \
+ CXXFLAGS="$(STAGEprofile_CXXFLAGS)"; export CXXFLAGS; \
+ LIBCFLAGS="$(STAGEprofile_CFLAGS)"; export LIBCFLAGS; \
+ echo Configuring stage profile in $(HOST_SUBDIR)/libiconv; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/libiconv; \
+ cd $(HOST_SUBDIR)/libiconv || exit 1; \
+ case $(srcdir) in \
+ /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+ *) topdir=`echo $(HOST_SUBDIR)/libiconv/ | \
+ sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
+ esac; \
+ module_srcdir=libiconv; \
+ $(SHELL) $$s/$$module_srcdir/configure \
+ --srcdir=$${topdir}/$$module_srcdir \
+ $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
+ --target=${target_alias} \
+ --with-build-libsubdir=$(HOST_SUBDIR) \
+ $(STAGEprofile_CONFIGURE_FLAGS) \
+ --disable-shared
+@endif libiconv-bootstrap
+
+.PHONY: configure-stagefeedback-libiconv maybe-configure-stagefeedback-libiconv
+maybe-configure-stagefeedback-libiconv:
+@if libiconv-bootstrap
+maybe-configure-stagefeedback-libiconv: configure-stagefeedback-libiconv
+configure-stagefeedback-libiconv:
+ @[ $(current_stage) = stagefeedback ] || $(MAKE) stagefeedback-start
+ @$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/libiconv
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ TFLAGS="$(STAGEfeedback_TFLAGS)"; \
+ test ! -f $(HOST_SUBDIR)/libiconv/Makefile || exit 0; \
+ $(HOST_EXPORTS) \
+ $(POSTSTAGE1_HOST_EXPORTS) \
+ CFLAGS="$(STAGEfeedback_CFLAGS)"; export CFLAGS; \
+ CXXFLAGS="$(STAGEfeedback_CXXFLAGS)"; export CXXFLAGS; \
+ LIBCFLAGS="$(STAGEfeedback_CFLAGS)"; export LIBCFLAGS; \
+ echo Configuring stage feedback in $(HOST_SUBDIR)/libiconv; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/libiconv; \
+ cd $(HOST_SUBDIR)/libiconv || exit 1; \
+ case $(srcdir) in \
+ /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+ *) topdir=`echo $(HOST_SUBDIR)/libiconv/ | \
+ sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
+ esac; \
+ module_srcdir=libiconv; \
+ $(SHELL) $$s/$$module_srcdir/configure \
+ --srcdir=$${topdir}/$$module_srcdir \
+ $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
+ --target=${target_alias} \
+ --with-build-libsubdir=$(HOST_SUBDIR) \
+ $(STAGEfeedback_CONFIGURE_FLAGS) \
+ --disable-shared
+@endif libiconv-bootstrap
+
+
+
.PHONY: all-libiconv maybe-all-libiconv
@@ -23501,7 +24389,6 @@ all-libiconv: stage_current
TARGET-libiconv=all
maybe-all-libiconv: all-libiconv
all-libiconv: configure-libiconv
- @: $(MAKE); $(unstage)
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(HOST_EXPORTS) \
@@ -23512,6 +24399,255 @@ all-libiconv: configure-libiconv
+.PHONY: all-stage1-libiconv maybe-all-stage1-libiconv
+.PHONY: clean-stage1-libiconv maybe-clean-stage1-libiconv
+maybe-all-stage1-libiconv:
+maybe-clean-stage1-libiconv:
+@if libiconv-bootstrap
+maybe-all-stage1-libiconv: all-stage1-libiconv
+all-stage1: all-stage1-libiconv
+TARGET-stage1-libiconv = $(TARGET-libiconv)
+all-stage1-libiconv: configure-stage1-libiconv
+ @[ $(current_stage) = stage1 ] || $(MAKE) stage1-start
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ TFLAGS="$(STAGE1_TFLAGS)"; \
+ $(HOST_EXPORTS) \
+ cd $(HOST_SUBDIR)/libiconv && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) \
+ CFLAGS="$(STAGE1_CFLAGS)" \
+ CXXFLAGS="$(STAGE1_CXXFLAGS)" \
+ LIBCFLAGS="$(LIBCFLAGS)" \
+ CFLAGS_FOR_TARGET="$(CFLAGS_FOR_TARGET)" \
+ CXXFLAGS_FOR_TARGET="$(CXXFLAGS_FOR_TARGET)" \
+ LIBCFLAGS_FOR_TARGET="$(LIBCFLAGS_FOR_TARGET)" \
+ $(EXTRA_HOST_FLAGS) \
+ $(STAGE1_FLAGS_TO_PASS) \
+ TFLAGS="$(STAGE1_TFLAGS)" \
+ $(TARGET-stage1-libiconv)
+
+maybe-clean-stage1-libiconv: clean-stage1-libiconv
+clean-stage1: clean-stage1-libiconv
+clean-stage1-libiconv:
+ @if [ $(current_stage) = stage1 ]; then \
+ [ -f $(HOST_SUBDIR)/libiconv/Makefile ] || exit 0; \
+ else \
+ [ -f $(HOST_SUBDIR)/stage1-libiconv/Makefile ] || exit 0; \
+ $(MAKE) stage1-start; \
+ fi; \
+ cd $(HOST_SUBDIR)/libiconv && \
+ $(MAKE) $(EXTRA_HOST_FLAGS) \
+ $(STAGE1_FLAGS_TO_PASS) clean
+@endif libiconv-bootstrap
+
+
+.PHONY: all-stage2-libiconv maybe-all-stage2-libiconv
+.PHONY: clean-stage2-libiconv maybe-clean-stage2-libiconv
+maybe-all-stage2-libiconv:
+maybe-clean-stage2-libiconv:
+@if libiconv-bootstrap
+maybe-all-stage2-libiconv: all-stage2-libiconv
+all-stage2: all-stage2-libiconv
+TARGET-stage2-libiconv = $(TARGET-libiconv)
+all-stage2-libiconv: configure-stage2-libiconv
+ @[ $(current_stage) = stage2 ] || $(MAKE) stage2-start
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ TFLAGS="$(STAGE2_TFLAGS)"; \
+ $(HOST_EXPORTS) \
+ $(POSTSTAGE1_HOST_EXPORTS) \
+ cd $(HOST_SUBDIR)/libiconv && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) \
+ CFLAGS="$(STAGE2_CFLAGS)" \
+ CXXFLAGS="$(STAGE2_CXXFLAGS)" \
+ LIBCFLAGS="$(STAGE2_CFLAGS)" \
+ CFLAGS_FOR_TARGET="$(CFLAGS_FOR_TARGET)" \
+ CXXFLAGS_FOR_TARGET="$(CXXFLAGS_FOR_TARGET)" \
+ LIBCFLAGS_FOR_TARGET="$(LIBCFLAGS_FOR_TARGET)" \
+ $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) \
+ TFLAGS="$(STAGE2_TFLAGS)" \
+ $(TARGET-stage2-libiconv)
+
+maybe-clean-stage2-libiconv: clean-stage2-libiconv
+clean-stage2: clean-stage2-libiconv
+clean-stage2-libiconv:
+ @if [ $(current_stage) = stage2 ]; then \
+ [ -f $(HOST_SUBDIR)/libiconv/Makefile ] || exit 0; \
+ else \
+ [ -f $(HOST_SUBDIR)/stage2-libiconv/Makefile ] || exit 0; \
+ $(MAKE) stage2-start; \
+ fi; \
+ cd $(HOST_SUBDIR)/libiconv && \
+ $(MAKE) $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) clean
+@endif libiconv-bootstrap
+
+
+.PHONY: all-stage3-libiconv maybe-all-stage3-libiconv
+.PHONY: clean-stage3-libiconv maybe-clean-stage3-libiconv
+maybe-all-stage3-libiconv:
+maybe-clean-stage3-libiconv:
+@if libiconv-bootstrap
+maybe-all-stage3-libiconv: all-stage3-libiconv
+all-stage3: all-stage3-libiconv
+TARGET-stage3-libiconv = $(TARGET-libiconv)
+all-stage3-libiconv: configure-stage3-libiconv
+ @[ $(current_stage) = stage3 ] || $(MAKE) stage3-start
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ TFLAGS="$(STAGE3_TFLAGS)"; \
+ $(HOST_EXPORTS) \
+ $(POSTSTAGE1_HOST_EXPORTS) \
+ cd $(HOST_SUBDIR)/libiconv && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) \
+ CFLAGS="$(STAGE3_CFLAGS)" \
+ CXXFLAGS="$(STAGE3_CXXFLAGS)" \
+ LIBCFLAGS="$(STAGE3_CFLAGS)" \
+ CFLAGS_FOR_TARGET="$(CFLAGS_FOR_TARGET)" \
+ CXXFLAGS_FOR_TARGET="$(CXXFLAGS_FOR_TARGET)" \
+ LIBCFLAGS_FOR_TARGET="$(LIBCFLAGS_FOR_TARGET)" \
+ $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) \
+ TFLAGS="$(STAGE3_TFLAGS)" \
+ $(TARGET-stage3-libiconv)
+
+maybe-clean-stage3-libiconv: clean-stage3-libiconv
+clean-stage3: clean-stage3-libiconv
+clean-stage3-libiconv:
+ @if [ $(current_stage) = stage3 ]; then \
+ [ -f $(HOST_SUBDIR)/libiconv/Makefile ] || exit 0; \
+ else \
+ [ -f $(HOST_SUBDIR)/stage3-libiconv/Makefile ] || exit 0; \
+ $(MAKE) stage3-start; \
+ fi; \
+ cd $(HOST_SUBDIR)/libiconv && \
+ $(MAKE) $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) clean
+@endif libiconv-bootstrap
+
+
+.PHONY: all-stage4-libiconv maybe-all-stage4-libiconv
+.PHONY: clean-stage4-libiconv maybe-clean-stage4-libiconv
+maybe-all-stage4-libiconv:
+maybe-clean-stage4-libiconv:
+@if libiconv-bootstrap
+maybe-all-stage4-libiconv: all-stage4-libiconv
+all-stage4: all-stage4-libiconv
+TARGET-stage4-libiconv = $(TARGET-libiconv)
+all-stage4-libiconv: configure-stage4-libiconv
+ @[ $(current_stage) = stage4 ] || $(MAKE) stage4-start
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ TFLAGS="$(STAGE4_TFLAGS)"; \
+ $(HOST_EXPORTS) \
+ $(POSTSTAGE1_HOST_EXPORTS) \
+ cd $(HOST_SUBDIR)/libiconv && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) \
+ CFLAGS="$(STAGE4_CFLAGS)" \
+ CXXFLAGS="$(STAGE4_CXXFLAGS)" \
+ LIBCFLAGS="$(STAGE4_CFLAGS)" \
+ CFLAGS_FOR_TARGET="$(CFLAGS_FOR_TARGET)" \
+ CXXFLAGS_FOR_TARGET="$(CXXFLAGS_FOR_TARGET)" \
+ LIBCFLAGS_FOR_TARGET="$(LIBCFLAGS_FOR_TARGET)" \
+ $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) \
+ TFLAGS="$(STAGE4_TFLAGS)" \
+ $(TARGET-stage4-libiconv)
+
+maybe-clean-stage4-libiconv: clean-stage4-libiconv
+clean-stage4: clean-stage4-libiconv
+clean-stage4-libiconv:
+ @if [ $(current_stage) = stage4 ]; then \
+ [ -f $(HOST_SUBDIR)/libiconv/Makefile ] || exit 0; \
+ else \
+ [ -f $(HOST_SUBDIR)/stage4-libiconv/Makefile ] || exit 0; \
+ $(MAKE) stage4-start; \
+ fi; \
+ cd $(HOST_SUBDIR)/libiconv && \
+ $(MAKE) $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) clean
+@endif libiconv-bootstrap
+
+
+.PHONY: all-stageprofile-libiconv maybe-all-stageprofile-libiconv
+.PHONY: clean-stageprofile-libiconv maybe-clean-stageprofile-libiconv
+maybe-all-stageprofile-libiconv:
+maybe-clean-stageprofile-libiconv:
+@if libiconv-bootstrap
+maybe-all-stageprofile-libiconv: all-stageprofile-libiconv
+all-stageprofile: all-stageprofile-libiconv
+TARGET-stageprofile-libiconv = $(TARGET-libiconv)
+all-stageprofile-libiconv: configure-stageprofile-libiconv
+ @[ $(current_stage) = stageprofile ] || $(MAKE) stageprofile-start
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ TFLAGS="$(STAGEprofile_TFLAGS)"; \
+ $(HOST_EXPORTS) \
+ $(POSTSTAGE1_HOST_EXPORTS) \
+ cd $(HOST_SUBDIR)/libiconv && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) \
+ CFLAGS="$(STAGEprofile_CFLAGS)" \
+ CXXFLAGS="$(STAGEprofile_CXXFLAGS)" \
+ LIBCFLAGS="$(STAGEprofile_CFLAGS)" \
+ CFLAGS_FOR_TARGET="$(CFLAGS_FOR_TARGET)" \
+ CXXFLAGS_FOR_TARGET="$(CXXFLAGS_FOR_TARGET)" \
+ LIBCFLAGS_FOR_TARGET="$(LIBCFLAGS_FOR_TARGET)" \
+ $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) \
+ TFLAGS="$(STAGEprofile_TFLAGS)" \
+ $(TARGET-stageprofile-libiconv)
+
+maybe-clean-stageprofile-libiconv: clean-stageprofile-libiconv
+clean-stageprofile: clean-stageprofile-libiconv
+clean-stageprofile-libiconv:
+ @if [ $(current_stage) = stageprofile ]; then \
+ [ -f $(HOST_SUBDIR)/libiconv/Makefile ] || exit 0; \
+ else \
+ [ -f $(HOST_SUBDIR)/stageprofile-libiconv/Makefile ] || exit 0; \
+ $(MAKE) stageprofile-start; \
+ fi; \
+ cd $(HOST_SUBDIR)/libiconv && \
+ $(MAKE) $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) clean
+@endif libiconv-bootstrap
+
+
+.PHONY: all-stagefeedback-libiconv maybe-all-stagefeedback-libiconv
+.PHONY: clean-stagefeedback-libiconv maybe-clean-stagefeedback-libiconv
+maybe-all-stagefeedback-libiconv:
+maybe-clean-stagefeedback-libiconv:
+@if libiconv-bootstrap
+maybe-all-stagefeedback-libiconv: all-stagefeedback-libiconv
+all-stagefeedback: all-stagefeedback-libiconv
+TARGET-stagefeedback-libiconv = $(TARGET-libiconv)
+all-stagefeedback-libiconv: configure-stagefeedback-libiconv
+ @[ $(current_stage) = stagefeedback ] || $(MAKE) stagefeedback-start
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ TFLAGS="$(STAGEfeedback_TFLAGS)"; \
+ $(HOST_EXPORTS) \
+ $(POSTSTAGE1_HOST_EXPORTS) \
+ cd $(HOST_SUBDIR)/libiconv && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) \
+ CFLAGS="$(STAGEfeedback_CFLAGS)" \
+ CXXFLAGS="$(STAGEfeedback_CXXFLAGS)" \
+ LIBCFLAGS="$(STAGEfeedback_CFLAGS)" \
+ CFLAGS_FOR_TARGET="$(CFLAGS_FOR_TARGET)" \
+ CXXFLAGS_FOR_TARGET="$(CXXFLAGS_FOR_TARGET)" \
+ LIBCFLAGS_FOR_TARGET="$(LIBCFLAGS_FOR_TARGET)" \
+ $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) \
+ TFLAGS="$(STAGEfeedback_TFLAGS)" \
+ $(TARGET-stagefeedback-libiconv)
+
+maybe-clean-stagefeedback-libiconv: clean-stagefeedback-libiconv
+clean-stagefeedback: clean-stagefeedback-libiconv
+clean-stagefeedback-libiconv:
+ @if [ $(current_stage) = stagefeedback ]; then \
+ [ -f $(HOST_SUBDIR)/libiconv/Makefile ] || exit 0; \
+ else \
+ [ -f $(HOST_SUBDIR)/stagefeedback-libiconv/Makefile ] || exit 0; \
+ $(MAKE) stagefeedback-start; \
+ fi; \
+ cd $(HOST_SUBDIR)/libiconv && \
+ $(MAKE) $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) clean
+@endif libiconv-bootstrap
+
+
+
+
.PHONY: check-libiconv maybe-check-libiconv
maybe-check-libiconv:
@@ -23522,9 +24658,9 @@ check-libiconv:
@: $(MAKE); $(unstage)
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(HOST_EXPORTS) \
+ $(HOST_EXPORTS) $(EXTRA_HOST_EXPORTS) \
(cd $(HOST_SUBDIR)/libiconv && \
- $(MAKE) $(FLAGS_TO_PASS) check)
+ $(MAKE) $(FLAGS_TO_PASS) $(EXTRA_BOOTSTRAP_FLAGS) check)
@endif libiconv
@@ -23553,24 +24689,8 @@ maybe-info-libiconv:
@if libiconv
maybe-info-libiconv: info-libiconv
-info-libiconv: \
- configure-libiconv
- @: $(MAKE); $(unstage)
- @[ -f ./libiconv/Makefile ] || exit 0; \
- r=`${PWD_COMMAND}`; export r; \
- s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(HOST_EXPORTS) \
- for flag in $(EXTRA_HOST_FLAGS) ; do \
- eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
- done; \
- echo "Doing info in libiconv" ; \
- (cd $(HOST_SUBDIR)/libiconv && \
- $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
- "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
- "RANLIB=$${RANLIB}" \
- "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
- info) \
- || exit 1
+# libiconv doesn't support info.
+info-libiconv:
@endif libiconv
@@ -23581,7 +24701,6 @@ maybe-dvi-libiconv: dvi-libiconv
dvi-libiconv: \
configure-libiconv
- @: $(MAKE); $(unstage)
@[ -f ./libiconv/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
@@ -23589,7 +24708,7 @@ dvi-libiconv: \
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing dvi in libiconv" ; \
+ echo "Doing dvi in libiconv"; \
(cd $(HOST_SUBDIR)/libiconv && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -23605,24 +24724,8 @@ maybe-pdf-libiconv:
@if libiconv
maybe-pdf-libiconv: pdf-libiconv
-pdf-libiconv: \
- configure-libiconv
- @: $(MAKE); $(unstage)
- @[ -f ./libiconv/Makefile ] || exit 0; \
- r=`${PWD_COMMAND}`; export r; \
- s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(HOST_EXPORTS) \
- for flag in $(EXTRA_HOST_FLAGS) ; do \
- eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
- done; \
- echo "Doing pdf in libiconv" ; \
- (cd $(HOST_SUBDIR)/libiconv && \
- $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
- "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
- "RANLIB=$${RANLIB}" \
- "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
- pdf) \
- || exit 1
+# libiconv doesn't support pdf.
+pdf-libiconv:
@endif libiconv
@@ -23631,24 +24734,8 @@ maybe-html-libiconv:
@if libiconv
maybe-html-libiconv: html-libiconv
-html-libiconv: \
- configure-libiconv
- @: $(MAKE); $(unstage)
- @[ -f ./libiconv/Makefile ] || exit 0; \
- r=`${PWD_COMMAND}`; export r; \
- s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(HOST_EXPORTS) \
- for flag in $(EXTRA_HOST_FLAGS) ; do \
- eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
- done; \
- echo "Doing html in libiconv" ; \
- (cd $(HOST_SUBDIR)/libiconv && \
- $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
- "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
- "RANLIB=$${RANLIB}" \
- "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
- html) \
- || exit 1
+# libiconv doesn't support html.
+html-libiconv:
@endif libiconv
@@ -23659,7 +24746,6 @@ maybe-TAGS-libiconv: TAGS-libiconv
TAGS-libiconv: \
configure-libiconv
- @: $(MAKE); $(unstage)
@[ -f ./libiconv/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
@@ -23667,7 +24753,7 @@ TAGS-libiconv: \
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing TAGS in libiconv" ; \
+ echo "Doing TAGS in libiconv"; \
(cd $(HOST_SUBDIR)/libiconv && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -23715,7 +24801,6 @@ maybe-installcheck-libiconv: installcheck-libiconv
installcheck-libiconv: \
configure-libiconv
- @: $(MAKE); $(unstage)
@[ -f ./libiconv/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
@@ -23723,7 +24808,7 @@ installcheck-libiconv: \
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing installcheck in libiconv" ; \
+ echo "Doing installcheck in libiconv"; \
(cd $(HOST_SUBDIR)/libiconv && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -23740,7 +24825,6 @@ maybe-mostlyclean-libiconv:
maybe-mostlyclean-libiconv: mostlyclean-libiconv
mostlyclean-libiconv:
- @: $(MAKE); $(unstage)
@[ -f ./libiconv/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
@@ -23748,7 +24832,7 @@ mostlyclean-libiconv:
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing mostlyclean in libiconv" ; \
+ echo "Doing mostlyclean in libiconv"; \
(cd $(HOST_SUBDIR)/libiconv && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -23765,7 +24849,6 @@ maybe-clean-libiconv:
maybe-clean-libiconv: clean-libiconv
clean-libiconv:
- @: $(MAKE); $(unstage)
@[ -f ./libiconv/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
@@ -23773,7 +24856,7 @@ clean-libiconv:
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing clean in libiconv" ; \
+ echo "Doing clean in libiconv"; \
(cd $(HOST_SUBDIR)/libiconv && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -23790,7 +24873,6 @@ maybe-distclean-libiconv:
maybe-distclean-libiconv: distclean-libiconv
distclean-libiconv:
- @: $(MAKE); $(unstage)
@[ -f ./libiconv/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
@@ -23798,7 +24880,7 @@ distclean-libiconv:
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing distclean in libiconv" ; \
+ echo "Doing distclean in libiconv"; \
(cd $(HOST_SUBDIR)/libiconv && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -23815,7 +24897,6 @@ maybe-maintainer-clean-libiconv:
maybe-maintainer-clean-libiconv: maintainer-clean-libiconv
maintainer-clean-libiconv:
- @: $(MAKE); $(unstage)
@[ -f ./libiconv/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
@@ -23823,7 +24904,7 @@ maintainer-clean-libiconv:
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing maintainer-clean in libiconv" ; \
+ echo "Doing maintainer-clean in libiconv"; \
(cd $(HOST_SUBDIR)/libiconv && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -23848,7 +24929,7 @@ configure-m4:
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
test ! -f $(HOST_SUBDIR)/m4/Makefile || exit 0; \
- $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/m4 ; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/m4; \
$(HOST_EXPORTS) \
echo Configuring in $(HOST_SUBDIR)/m4; \
cd "$(HOST_SUBDIR)/m4" || exit 1; \
@@ -23857,11 +24938,12 @@ configure-m4:
*) topdir=`echo $(HOST_SUBDIR)/m4/ | \
sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
esac; \
- srcdiroption="--srcdir=$${topdir}/m4"; \
- libsrcdir="$$s/m4"; \
- $(SHELL) $${libsrcdir}/configure \
+ module_srcdir=m4; \
+ $(SHELL) \
+ $$s/$$module_srcdir/configure \
+ --srcdir=$${topdir}/$$module_srcdir \
$(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
- --target=${target_alias} $${srcdiroption} \
+ --target=${target_alias} \
|| exit 1
@endif m4
@@ -23899,7 +24981,7 @@ check-m4:
@: $(MAKE); $(unstage)
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(HOST_EXPORTS) \
+ $(HOST_EXPORTS) \
(cd $(HOST_SUBDIR)/m4 && \
$(MAKE) $(FLAGS_TO_PASS) check)
@@ -23952,7 +25034,7 @@ info-m4: \
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing info in m4" ; \
+ echo "Doing info in m4"; \
(cd $(HOST_SUBDIR)/m4 && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -23978,7 +25060,7 @@ dvi-m4: \
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing dvi in m4" ; \
+ echo "Doing dvi in m4"; \
(cd $(HOST_SUBDIR)/m4 && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -24004,7 +25086,7 @@ pdf-m4: \
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing pdf in m4" ; \
+ echo "Doing pdf in m4"; \
(cd $(HOST_SUBDIR)/m4 && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -24030,7 +25112,7 @@ html-m4: \
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing html in m4" ; \
+ echo "Doing html in m4"; \
(cd $(HOST_SUBDIR)/m4 && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -24056,7 +25138,7 @@ TAGS-m4: \
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing TAGS in m4" ; \
+ echo "Doing TAGS in m4"; \
(cd $(HOST_SUBDIR)/m4 && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -24083,7 +25165,7 @@ install-info-m4: \
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing install-info in m4" ; \
+ echo "Doing install-info in m4"; \
(cd $(HOST_SUBDIR)/m4 && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -24110,7 +25192,7 @@ install-pdf-m4: \
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing install-pdf in m4" ; \
+ echo "Doing install-pdf in m4"; \
(cd $(HOST_SUBDIR)/m4 && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -24137,7 +25219,7 @@ install-html-m4: \
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing install-html in m4" ; \
+ echo "Doing install-html in m4"; \
(cd $(HOST_SUBDIR)/m4 && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -24163,7 +25245,7 @@ installcheck-m4: \
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing installcheck in m4" ; \
+ echo "Doing installcheck in m4"; \
(cd $(HOST_SUBDIR)/m4 && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -24188,7 +25270,7 @@ mostlyclean-m4:
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing mostlyclean in m4" ; \
+ echo "Doing mostlyclean in m4"; \
(cd $(HOST_SUBDIR)/m4 && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -24213,7 +25295,7 @@ clean-m4:
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing clean in m4" ; \
+ echo "Doing clean in m4"; \
(cd $(HOST_SUBDIR)/m4 && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -24238,7 +25320,7 @@ distclean-m4:
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing distclean in m4" ; \
+ echo "Doing distclean in m4"; \
(cd $(HOST_SUBDIR)/m4 && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -24263,7 +25345,7 @@ maintainer-clean-m4:
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing maintainer-clean in m4" ; \
+ echo "Doing maintainer-clean in m4"; \
(cd $(HOST_SUBDIR)/m4 && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -24288,7 +25370,7 @@ configure-readline:
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
test ! -f $(HOST_SUBDIR)/readline/Makefile || exit 0; \
- $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/readline ; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/readline; \
$(HOST_EXPORTS) \
echo Configuring in $(HOST_SUBDIR)/readline; \
cd "$(HOST_SUBDIR)/readline" || exit 1; \
@@ -24297,11 +25379,12 @@ configure-readline:
*) topdir=`echo $(HOST_SUBDIR)/readline/ | \
sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
esac; \
- srcdiroption="--srcdir=$${topdir}/readline"; \
- libsrcdir="$$s/readline"; \
- $(SHELL) $${libsrcdir}/configure \
+ module_srcdir=readline; \
+ $(SHELL) \
+ $$s/$$module_srcdir/configure \
+ --srcdir=$${topdir}/$$module_srcdir \
$(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
- --target=${target_alias} $${srcdiroption} \
+ --target=${target_alias} \
|| exit 1
@endif readline
@@ -24339,7 +25422,7 @@ check-readline:
@: $(MAKE); $(unstage)
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(HOST_EXPORTS) \
+ $(HOST_EXPORTS) \
(cd $(HOST_SUBDIR)/readline && \
$(MAKE) $(FLAGS_TO_PASS) check)
@@ -24392,7 +25475,7 @@ info-readline: \
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing info in readline" ; \
+ echo "Doing info in readline"; \
(cd $(HOST_SUBDIR)/readline && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -24418,7 +25501,7 @@ dvi-readline: \
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing dvi in readline" ; \
+ echo "Doing dvi in readline"; \
(cd $(HOST_SUBDIR)/readline && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -24444,7 +25527,7 @@ pdf-readline: \
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing pdf in readline" ; \
+ echo "Doing pdf in readline"; \
(cd $(HOST_SUBDIR)/readline && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -24470,7 +25553,7 @@ html-readline: \
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing html in readline" ; \
+ echo "Doing html in readline"; \
(cd $(HOST_SUBDIR)/readline && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -24496,7 +25579,7 @@ TAGS-readline: \
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing TAGS in readline" ; \
+ echo "Doing TAGS in readline"; \
(cd $(HOST_SUBDIR)/readline && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -24523,7 +25606,7 @@ install-info-readline: \
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing install-info in readline" ; \
+ echo "Doing install-info in readline"; \
(cd $(HOST_SUBDIR)/readline && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -24550,7 +25633,7 @@ install-pdf-readline: \
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing install-pdf in readline" ; \
+ echo "Doing install-pdf in readline"; \
(cd $(HOST_SUBDIR)/readline && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -24577,7 +25660,7 @@ install-html-readline: \
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing install-html in readline" ; \
+ echo "Doing install-html in readline"; \
(cd $(HOST_SUBDIR)/readline && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -24603,7 +25686,7 @@ installcheck-readline: \
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing installcheck in readline" ; \
+ echo "Doing installcheck in readline"; \
(cd $(HOST_SUBDIR)/readline && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -24628,7 +25711,7 @@ mostlyclean-readline:
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing mostlyclean in readline" ; \
+ echo "Doing mostlyclean in readline"; \
(cd $(HOST_SUBDIR)/readline && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -24653,7 +25736,7 @@ clean-readline:
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing clean in readline" ; \
+ echo "Doing clean in readline"; \
(cd $(HOST_SUBDIR)/readline && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -24678,7 +25761,7 @@ distclean-readline:
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing distclean in readline" ; \
+ echo "Doing distclean in readline"; \
(cd $(HOST_SUBDIR)/readline && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -24703,7 +25786,7 @@ maintainer-clean-readline:
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing maintainer-clean in readline" ; \
+ echo "Doing maintainer-clean in readline"; \
(cd $(HOST_SUBDIR)/readline && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -24728,7 +25811,7 @@ configure-sid:
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
test ! -f $(HOST_SUBDIR)/sid/Makefile || exit 0; \
- $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/sid ; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/sid; \
$(HOST_EXPORTS) \
echo Configuring in $(HOST_SUBDIR)/sid; \
cd "$(HOST_SUBDIR)/sid" || exit 1; \
@@ -24737,11 +25820,12 @@ configure-sid:
*) topdir=`echo $(HOST_SUBDIR)/sid/ | \
sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
esac; \
- srcdiroption="--srcdir=$${topdir}/sid"; \
- libsrcdir="$$s/sid"; \
- $(SHELL) $${libsrcdir}/configure \
+ module_srcdir=sid; \
+ $(SHELL) \
+ $$s/$$module_srcdir/configure \
+ --srcdir=$${topdir}/$$module_srcdir \
$(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
- --target=${target_alias} $${srcdiroption} \
+ --target=${target_alias} \
|| exit 1
@endif sid
@@ -24779,7 +25863,7 @@ check-sid:
@: $(MAKE); $(unstage)
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(HOST_EXPORTS) \
+ $(HOST_EXPORTS) \
(cd $(HOST_SUBDIR)/sid && \
$(MAKE) $(FLAGS_TO_PASS) check)
@@ -24832,7 +25916,7 @@ info-sid: \
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing info in sid" ; \
+ echo "Doing info in sid"; \
(cd $(HOST_SUBDIR)/sid && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -24858,7 +25942,7 @@ dvi-sid: \
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing dvi in sid" ; \
+ echo "Doing dvi in sid"; \
(cd $(HOST_SUBDIR)/sid && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -24884,7 +25968,7 @@ pdf-sid: \
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing pdf in sid" ; \
+ echo "Doing pdf in sid"; \
(cd $(HOST_SUBDIR)/sid && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -24910,7 +25994,7 @@ html-sid: \
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing html in sid" ; \
+ echo "Doing html in sid"; \
(cd $(HOST_SUBDIR)/sid && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -24936,7 +26020,7 @@ TAGS-sid: \
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing TAGS in sid" ; \
+ echo "Doing TAGS in sid"; \
(cd $(HOST_SUBDIR)/sid && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -24963,7 +26047,7 @@ install-info-sid: \
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing install-info in sid" ; \
+ echo "Doing install-info in sid"; \
(cd $(HOST_SUBDIR)/sid && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -24990,7 +26074,7 @@ install-pdf-sid: \
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing install-pdf in sid" ; \
+ echo "Doing install-pdf in sid"; \
(cd $(HOST_SUBDIR)/sid && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -25017,7 +26101,7 @@ install-html-sid: \
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing install-html in sid" ; \
+ echo "Doing install-html in sid"; \
(cd $(HOST_SUBDIR)/sid && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -25043,7 +26127,7 @@ installcheck-sid: \
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing installcheck in sid" ; \
+ echo "Doing installcheck in sid"; \
(cd $(HOST_SUBDIR)/sid && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -25068,7 +26152,7 @@ mostlyclean-sid:
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing mostlyclean in sid" ; \
+ echo "Doing mostlyclean in sid"; \
(cd $(HOST_SUBDIR)/sid && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -25093,7 +26177,7 @@ clean-sid:
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing clean in sid" ; \
+ echo "Doing clean in sid"; \
(cd $(HOST_SUBDIR)/sid && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -25118,7 +26202,7 @@ distclean-sid:
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing distclean in sid" ; \
+ echo "Doing distclean in sid"; \
(cd $(HOST_SUBDIR)/sid && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -25143,7 +26227,7 @@ maintainer-clean-sid:
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing maintainer-clean in sid" ; \
+ echo "Doing maintainer-clean in sid"; \
(cd $(HOST_SUBDIR)/sid && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -25168,7 +26252,7 @@ configure-sim:
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
test ! -f $(HOST_SUBDIR)/sim/Makefile || exit 0; \
- $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/sim ; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/sim; \
$(HOST_EXPORTS) \
echo Configuring in $(HOST_SUBDIR)/sim; \
cd "$(HOST_SUBDIR)/sim" || exit 1; \
@@ -25177,11 +26261,12 @@ configure-sim:
*) topdir=`echo $(HOST_SUBDIR)/sim/ | \
sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
esac; \
- srcdiroption="--srcdir=$${topdir}/sim"; \
- libsrcdir="$$s/sim"; \
- $(SHELL) $${libsrcdir}/configure \
+ module_srcdir=sim; \
+ $(SHELL) \
+ $$s/$$module_srcdir/configure \
+ --srcdir=$${topdir}/$$module_srcdir \
$(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
- --target=${target_alias} $${srcdiroption} \
+ --target=${target_alias} \
|| exit 1
@endif sim
@@ -25219,7 +26304,7 @@ check-sim:
@: $(MAKE); $(unstage)
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(HOST_EXPORTS) \
+ $(HOST_EXPORTS) \
(cd $(HOST_SUBDIR)/sim && \
$(MAKE) $(FLAGS_TO_PASS) check)
@@ -25272,7 +26357,7 @@ info-sim: \
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing info in sim" ; \
+ echo "Doing info in sim"; \
(cd $(HOST_SUBDIR)/sim && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -25298,7 +26383,7 @@ dvi-sim: \
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing dvi in sim" ; \
+ echo "Doing dvi in sim"; \
(cd $(HOST_SUBDIR)/sim && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -25324,7 +26409,7 @@ pdf-sim: \
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing pdf in sim" ; \
+ echo "Doing pdf in sim"; \
(cd $(HOST_SUBDIR)/sim && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -25350,7 +26435,7 @@ html-sim: \
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing html in sim" ; \
+ echo "Doing html in sim"; \
(cd $(HOST_SUBDIR)/sim && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -25376,7 +26461,7 @@ TAGS-sim: \
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing TAGS in sim" ; \
+ echo "Doing TAGS in sim"; \
(cd $(HOST_SUBDIR)/sim && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -25403,7 +26488,7 @@ install-info-sim: \
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing install-info in sim" ; \
+ echo "Doing install-info in sim"; \
(cd $(HOST_SUBDIR)/sim && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -25430,7 +26515,7 @@ install-pdf-sim: \
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing install-pdf in sim" ; \
+ echo "Doing install-pdf in sim"; \
(cd $(HOST_SUBDIR)/sim && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -25457,7 +26542,7 @@ install-html-sim: \
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing install-html in sim" ; \
+ echo "Doing install-html in sim"; \
(cd $(HOST_SUBDIR)/sim && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -25483,7 +26568,7 @@ installcheck-sim: \
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing installcheck in sim" ; \
+ echo "Doing installcheck in sim"; \
(cd $(HOST_SUBDIR)/sim && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -25508,7 +26593,7 @@ mostlyclean-sim:
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing mostlyclean in sim" ; \
+ echo "Doing mostlyclean in sim"; \
(cd $(HOST_SUBDIR)/sim && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -25533,7 +26618,7 @@ clean-sim:
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing clean in sim" ; \
+ echo "Doing clean in sim"; \
(cd $(HOST_SUBDIR)/sim && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -25558,7 +26643,7 @@ distclean-sim:
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing distclean in sim" ; \
+ echo "Doing distclean in sim"; \
(cd $(HOST_SUBDIR)/sim && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -25583,7 +26668,7 @@ maintainer-clean-sim:
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing maintainer-clean in sim" ; \
+ echo "Doing maintainer-clean in sim"; \
(cd $(HOST_SUBDIR)/sim && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -25608,7 +26693,7 @@ configure-texinfo:
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
test ! -f $(HOST_SUBDIR)/texinfo/Makefile || exit 0; \
- $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/texinfo ; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/texinfo; \
$(HOST_EXPORTS) \
echo Configuring in $(HOST_SUBDIR)/texinfo; \
cd "$(HOST_SUBDIR)/texinfo" || exit 1; \
@@ -25617,11 +26702,12 @@ configure-texinfo:
*) topdir=`echo $(HOST_SUBDIR)/texinfo/ | \
sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
esac; \
- srcdiroption="--srcdir=$${topdir}/texinfo"; \
- libsrcdir="$$s/texinfo"; \
- $(SHELL) $${libsrcdir}/configure \
+ module_srcdir=texinfo; \
+ $(SHELL) \
+ $$s/$$module_srcdir/configure \
+ --srcdir=$${topdir}/$$module_srcdir \
$(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
- --target=${target_alias} $${srcdiroption} \
+ --target=${target_alias} \
|| exit 1
@endif texinfo
@@ -25659,7 +26745,7 @@ check-texinfo:
@: $(MAKE); $(unstage)
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(HOST_EXPORTS) \
+ $(HOST_EXPORTS) \
(cd $(HOST_SUBDIR)/texinfo && \
$(MAKE) $(FLAGS_TO_PASS) check)
@@ -25700,7 +26786,7 @@ info-texinfo: \
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing info in texinfo" ; \
+ echo "Doing info in texinfo"; \
(cd $(HOST_SUBDIR)/texinfo && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -25726,7 +26812,7 @@ dvi-texinfo: \
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing dvi in texinfo" ; \
+ echo "Doing dvi in texinfo"; \
(cd $(HOST_SUBDIR)/texinfo && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -25752,7 +26838,7 @@ pdf-texinfo: \
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing pdf in texinfo" ; \
+ echo "Doing pdf in texinfo"; \
(cd $(HOST_SUBDIR)/texinfo && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -25778,7 +26864,7 @@ html-texinfo: \
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing html in texinfo" ; \
+ echo "Doing html in texinfo"; \
(cd $(HOST_SUBDIR)/texinfo && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -25804,7 +26890,7 @@ TAGS-texinfo: \
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing TAGS in texinfo" ; \
+ echo "Doing TAGS in texinfo"; \
(cd $(HOST_SUBDIR)/texinfo && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -25831,7 +26917,7 @@ install-info-texinfo: \
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing install-info in texinfo" ; \
+ echo "Doing install-info in texinfo"; \
(cd $(HOST_SUBDIR)/texinfo && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -25858,7 +26944,7 @@ install-pdf-texinfo: \
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing install-pdf in texinfo" ; \
+ echo "Doing install-pdf in texinfo"; \
(cd $(HOST_SUBDIR)/texinfo && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -25885,7 +26971,7 @@ install-html-texinfo: \
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing install-html in texinfo" ; \
+ echo "Doing install-html in texinfo"; \
(cd $(HOST_SUBDIR)/texinfo && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -25911,7 +26997,7 @@ installcheck-texinfo: \
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing installcheck in texinfo" ; \
+ echo "Doing installcheck in texinfo"; \
(cd $(HOST_SUBDIR)/texinfo && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -25936,7 +27022,7 @@ mostlyclean-texinfo:
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing mostlyclean in texinfo" ; \
+ echo "Doing mostlyclean in texinfo"; \
(cd $(HOST_SUBDIR)/texinfo && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -25961,7 +27047,7 @@ clean-texinfo:
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing clean in texinfo" ; \
+ echo "Doing clean in texinfo"; \
(cd $(HOST_SUBDIR)/texinfo && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -25986,7 +27072,7 @@ distclean-texinfo:
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing distclean in texinfo" ; \
+ echo "Doing distclean in texinfo"; \
(cd $(HOST_SUBDIR)/texinfo && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -26011,7 +27097,7 @@ maintainer-clean-texinfo:
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing maintainer-clean in texinfo" ; \
+ echo "Doing maintainer-clean in texinfo"; \
(cd $(HOST_SUBDIR)/texinfo && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -26035,7 +27121,7 @@ configure-zlib:
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
test ! -f $(HOST_SUBDIR)/zlib/Makefile || exit 0; \
- $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/zlib ; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/zlib; \
$(HOST_EXPORTS) \
echo Configuring in $(HOST_SUBDIR)/zlib; \
cd "$(HOST_SUBDIR)/zlib" || exit 1; \
@@ -26044,11 +27130,12 @@ configure-zlib:
*) topdir=`echo $(HOST_SUBDIR)/zlib/ | \
sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
esac; \
- srcdiroption="--srcdir=$${topdir}/zlib"; \
- libsrcdir="$$s/zlib"; \
- $(SHELL) $${libsrcdir}/configure \
+ module_srcdir=zlib; \
+ $(SHELL) \
+ $$s/$$module_srcdir/configure \
+ --srcdir=$${topdir}/$$module_srcdir \
$(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
- --target=${target_alias} $${srcdiroption} \
+ --target=${target_alias} @extra_host_zlib_configure_flags@ \
|| exit 1
@endif zlib
@@ -26069,20 +27156,22 @@ configure-stage1-zlib:
CFLAGS="$(STAGE1_CFLAGS)"; export CFLAGS; \
CXXFLAGS="$(STAGE1_CXXFLAGS)"; export CXXFLAGS; \
LIBCFLAGS="$(LIBCFLAGS)"; export LIBCFLAGS; \
- echo Configuring stage 1 in $(HOST_SUBDIR)/zlib ; \
- $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/zlib ; \
+ echo Configuring stage 1 in $(HOST_SUBDIR)/zlib; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/zlib; \
cd $(HOST_SUBDIR)/zlib || exit 1; \
case $(srcdir) in \
/* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
*) topdir=`echo $(HOST_SUBDIR)/zlib/ | \
sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
esac; \
- srcdiroption="--srcdir=$${topdir}/zlib"; \
- libsrcdir="$$s/zlib"; \
- $(SHELL) $${libsrcdir}/configure \
+ module_srcdir=zlib; \
+ $(SHELL) $$s/$$module_srcdir/configure \
+ --srcdir=$${topdir}/$$module_srcdir \
$(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
- --target=${target_alias} $${srcdiroption} \
- $(STAGE1_CONFIGURE_FLAGS)
+ --target=${target_alias} \
+ \
+ $(STAGE1_CONFIGURE_FLAGS) \
+ @extra_host_zlib_configure_flags@
@endif zlib-bootstrap
.PHONY: configure-stage2-zlib maybe-configure-stage2-zlib
@@ -26101,21 +27190,22 @@ configure-stage2-zlib:
CFLAGS="$(STAGE2_CFLAGS)"; export CFLAGS; \
CXXFLAGS="$(STAGE2_CXXFLAGS)"; export CXXFLAGS; \
LIBCFLAGS="$(STAGE2_CFLAGS)"; export LIBCFLAGS; \
- echo Configuring stage 2 in $(HOST_SUBDIR)/zlib ; \
- $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/zlib ; \
+ echo Configuring stage 2 in $(HOST_SUBDIR)/zlib; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/zlib; \
cd $(HOST_SUBDIR)/zlib || exit 1; \
case $(srcdir) in \
/* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
*) topdir=`echo $(HOST_SUBDIR)/zlib/ | \
sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
esac; \
- srcdiroption="--srcdir=$${topdir}/zlib"; \
- libsrcdir="$$s/zlib"; \
- $(SHELL) $${libsrcdir}/configure \
+ module_srcdir=zlib; \
+ $(SHELL) $$s/$$module_srcdir/configure \
+ --srcdir=$${topdir}/$$module_srcdir \
$(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
- --target=${target_alias} $${srcdiroption} \
+ --target=${target_alias} \
--with-build-libsubdir=$(HOST_SUBDIR) \
- $(STAGE2_CONFIGURE_FLAGS)
+ $(STAGE2_CONFIGURE_FLAGS) \
+ @extra_host_zlib_configure_flags@
@endif zlib-bootstrap
.PHONY: configure-stage3-zlib maybe-configure-stage3-zlib
@@ -26134,21 +27224,22 @@ configure-stage3-zlib:
CFLAGS="$(STAGE3_CFLAGS)"; export CFLAGS; \
CXXFLAGS="$(STAGE3_CXXFLAGS)"; export CXXFLAGS; \
LIBCFLAGS="$(STAGE3_CFLAGS)"; export LIBCFLAGS; \
- echo Configuring stage 3 in $(HOST_SUBDIR)/zlib ; \
- $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/zlib ; \
+ echo Configuring stage 3 in $(HOST_SUBDIR)/zlib; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/zlib; \
cd $(HOST_SUBDIR)/zlib || exit 1; \
case $(srcdir) in \
/* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
*) topdir=`echo $(HOST_SUBDIR)/zlib/ | \
sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
esac; \
- srcdiroption="--srcdir=$${topdir}/zlib"; \
- libsrcdir="$$s/zlib"; \
- $(SHELL) $${libsrcdir}/configure \
+ module_srcdir=zlib; \
+ $(SHELL) $$s/$$module_srcdir/configure \
+ --srcdir=$${topdir}/$$module_srcdir \
$(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
- --target=${target_alias} $${srcdiroption} \
+ --target=${target_alias} \
--with-build-libsubdir=$(HOST_SUBDIR) \
- $(STAGE3_CONFIGURE_FLAGS)
+ $(STAGE3_CONFIGURE_FLAGS) \
+ @extra_host_zlib_configure_flags@
@endif zlib-bootstrap
.PHONY: configure-stage4-zlib maybe-configure-stage4-zlib
@@ -26167,21 +27258,22 @@ configure-stage4-zlib:
CFLAGS="$(STAGE4_CFLAGS)"; export CFLAGS; \
CXXFLAGS="$(STAGE4_CXXFLAGS)"; export CXXFLAGS; \
LIBCFLAGS="$(STAGE4_CFLAGS)"; export LIBCFLAGS; \
- echo Configuring stage 4 in $(HOST_SUBDIR)/zlib ; \
- $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/zlib ; \
+ echo Configuring stage 4 in $(HOST_SUBDIR)/zlib; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/zlib; \
cd $(HOST_SUBDIR)/zlib || exit 1; \
case $(srcdir) in \
/* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
*) topdir=`echo $(HOST_SUBDIR)/zlib/ | \
sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
esac; \
- srcdiroption="--srcdir=$${topdir}/zlib"; \
- libsrcdir="$$s/zlib"; \
- $(SHELL) $${libsrcdir}/configure \
+ module_srcdir=zlib; \
+ $(SHELL) $$s/$$module_srcdir/configure \
+ --srcdir=$${topdir}/$$module_srcdir \
$(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
- --target=${target_alias} $${srcdiroption} \
+ --target=${target_alias} \
--with-build-libsubdir=$(HOST_SUBDIR) \
- $(STAGE4_CONFIGURE_FLAGS)
+ $(STAGE4_CONFIGURE_FLAGS) \
+ @extra_host_zlib_configure_flags@
@endif zlib-bootstrap
.PHONY: configure-stageprofile-zlib maybe-configure-stageprofile-zlib
@@ -26200,21 +27292,22 @@ configure-stageprofile-zlib:
CFLAGS="$(STAGEprofile_CFLAGS)"; export CFLAGS; \
CXXFLAGS="$(STAGEprofile_CXXFLAGS)"; export CXXFLAGS; \
LIBCFLAGS="$(STAGEprofile_CFLAGS)"; export LIBCFLAGS; \
- echo Configuring stage profile in $(HOST_SUBDIR)/zlib ; \
- $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/zlib ; \
+ echo Configuring stage profile in $(HOST_SUBDIR)/zlib; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/zlib; \
cd $(HOST_SUBDIR)/zlib || exit 1; \
case $(srcdir) in \
/* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
*) topdir=`echo $(HOST_SUBDIR)/zlib/ | \
sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
esac; \
- srcdiroption="--srcdir=$${topdir}/zlib"; \
- libsrcdir="$$s/zlib"; \
- $(SHELL) $${libsrcdir}/configure \
+ module_srcdir=zlib; \
+ $(SHELL) $$s/$$module_srcdir/configure \
+ --srcdir=$${topdir}/$$module_srcdir \
$(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
- --target=${target_alias} $${srcdiroption} \
+ --target=${target_alias} \
--with-build-libsubdir=$(HOST_SUBDIR) \
- $(STAGEprofile_CONFIGURE_FLAGS)
+ $(STAGEprofile_CONFIGURE_FLAGS) \
+ @extra_host_zlib_configure_flags@
@endif zlib-bootstrap
.PHONY: configure-stagefeedback-zlib maybe-configure-stagefeedback-zlib
@@ -26233,21 +27326,22 @@ configure-stagefeedback-zlib:
CFLAGS="$(STAGEfeedback_CFLAGS)"; export CFLAGS; \
CXXFLAGS="$(STAGEfeedback_CXXFLAGS)"; export CXXFLAGS; \
LIBCFLAGS="$(STAGEfeedback_CFLAGS)"; export LIBCFLAGS; \
- echo Configuring stage feedback in $(HOST_SUBDIR)/zlib ; \
- $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/zlib ; \
+ echo Configuring stage feedback in $(HOST_SUBDIR)/zlib; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/zlib; \
cd $(HOST_SUBDIR)/zlib || exit 1; \
case $(srcdir) in \
/* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
*) topdir=`echo $(HOST_SUBDIR)/zlib/ | \
sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
esac; \
- srcdiroption="--srcdir=$${topdir}/zlib"; \
- libsrcdir="$$s/zlib"; \
- $(SHELL) $${libsrcdir}/configure \
+ module_srcdir=zlib; \
+ $(SHELL) $$s/$$module_srcdir/configure \
+ --srcdir=$${topdir}/$$module_srcdir \
$(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
- --target=${target_alias} $${srcdiroption} \
+ --target=${target_alias} \
--with-build-libsubdir=$(HOST_SUBDIR) \
- $(STAGEfeedback_CONFIGURE_FLAGS)
+ $(STAGEfeedback_CONFIGURE_FLAGS) \
+ @extra_host_zlib_configure_flags@
@endif zlib-bootstrap
@@ -26566,7 +27660,7 @@ info-zlib: \
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing info in zlib" ; \
+ echo "Doing info in zlib"; \
(cd $(HOST_SUBDIR)/zlib && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -26591,7 +27685,7 @@ dvi-zlib: \
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing dvi in zlib" ; \
+ echo "Doing dvi in zlib"; \
(cd $(HOST_SUBDIR)/zlib && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -26616,7 +27710,7 @@ pdf-zlib: \
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing pdf in zlib" ; \
+ echo "Doing pdf in zlib"; \
(cd $(HOST_SUBDIR)/zlib && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -26641,7 +27735,7 @@ html-zlib: \
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing html in zlib" ; \
+ echo "Doing html in zlib"; \
(cd $(HOST_SUBDIR)/zlib && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -26666,7 +27760,7 @@ TAGS-zlib: \
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing TAGS in zlib" ; \
+ echo "Doing TAGS in zlib"; \
(cd $(HOST_SUBDIR)/zlib && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -26692,7 +27786,7 @@ install-info-zlib: \
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing install-info in zlib" ; \
+ echo "Doing install-info in zlib"; \
(cd $(HOST_SUBDIR)/zlib && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -26718,7 +27812,7 @@ install-pdf-zlib: \
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing install-pdf in zlib" ; \
+ echo "Doing install-pdf in zlib"; \
(cd $(HOST_SUBDIR)/zlib && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -26744,7 +27838,7 @@ install-html-zlib: \
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing install-html in zlib" ; \
+ echo "Doing install-html in zlib"; \
(cd $(HOST_SUBDIR)/zlib && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -26769,7 +27863,7 @@ installcheck-zlib: \
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing installcheck in zlib" ; \
+ echo "Doing installcheck in zlib"; \
(cd $(HOST_SUBDIR)/zlib && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -26793,7 +27887,7 @@ mostlyclean-zlib:
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing mostlyclean in zlib" ; \
+ echo "Doing mostlyclean in zlib"; \
(cd $(HOST_SUBDIR)/zlib && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -26817,7 +27911,7 @@ clean-zlib:
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing clean in zlib" ; \
+ echo "Doing clean in zlib"; \
(cd $(HOST_SUBDIR)/zlib && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -26841,7 +27935,7 @@ distclean-zlib:
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing distclean in zlib" ; \
+ echo "Doing distclean in zlib"; \
(cd $(HOST_SUBDIR)/zlib && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -26865,7 +27959,7 @@ maintainer-clean-zlib:
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing maintainer-clean in zlib" ; \
+ echo "Doing maintainer-clean in zlib"; \
(cd $(HOST_SUBDIR)/zlib && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -26890,7 +27984,7 @@ configure-gdb:
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
test ! -f $(HOST_SUBDIR)/gdb/Makefile || exit 0; \
- $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/gdb ; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/gdb; \
$(HOST_EXPORTS) \
echo Configuring in $(HOST_SUBDIR)/gdb; \
cd "$(HOST_SUBDIR)/gdb" || exit 1; \
@@ -26899,11 +27993,12 @@ configure-gdb:
*) topdir=`echo $(HOST_SUBDIR)/gdb/ | \
sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
esac; \
- srcdiroption="--srcdir=$${topdir}/gdb"; \
- libsrcdir="$$s/gdb"; \
- $(SHELL) $${libsrcdir}/configure \
+ module_srcdir=gdb; \
+ $(SHELL) \
+ $$s/$$module_srcdir/configure \
+ --srcdir=$${topdir}/$$module_srcdir \
$(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
- --target=${target_alias} $${srcdiroption} \
+ --target=${target_alias} \
|| exit 1
@endif gdb
@@ -26941,7 +28036,7 @@ check-gdb:
@: $(MAKE); $(unstage)
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(HOST_EXPORTS) \
+ $(HOST_EXPORTS) \
(cd $(HOST_SUBDIR)/gdb && \
$(MAKE) $(FLAGS_TO_PASS) check)
@@ -26994,7 +28089,7 @@ info-gdb: \
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing info in gdb" ; \
+ echo "Doing info in gdb"; \
(cd $(HOST_SUBDIR)/gdb && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -27020,7 +28115,7 @@ dvi-gdb: \
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing dvi in gdb" ; \
+ echo "Doing dvi in gdb"; \
(cd $(HOST_SUBDIR)/gdb && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -27046,7 +28141,7 @@ pdf-gdb: \
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing pdf in gdb" ; \
+ echo "Doing pdf in gdb"; \
(cd $(HOST_SUBDIR)/gdb && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -27072,7 +28167,7 @@ html-gdb: \
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing html in gdb" ; \
+ echo "Doing html in gdb"; \
(cd $(HOST_SUBDIR)/gdb && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -27098,7 +28193,7 @@ TAGS-gdb: \
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing TAGS in gdb" ; \
+ echo "Doing TAGS in gdb"; \
(cd $(HOST_SUBDIR)/gdb && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -27125,7 +28220,7 @@ install-info-gdb: \
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing install-info in gdb" ; \
+ echo "Doing install-info in gdb"; \
(cd $(HOST_SUBDIR)/gdb && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -27152,7 +28247,7 @@ install-pdf-gdb: \
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing install-pdf in gdb" ; \
+ echo "Doing install-pdf in gdb"; \
(cd $(HOST_SUBDIR)/gdb && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -27179,7 +28274,7 @@ install-html-gdb: \
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing install-html in gdb" ; \
+ echo "Doing install-html in gdb"; \
(cd $(HOST_SUBDIR)/gdb && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -27205,7 +28300,7 @@ installcheck-gdb: \
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing installcheck in gdb" ; \
+ echo "Doing installcheck in gdb"; \
(cd $(HOST_SUBDIR)/gdb && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -27230,7 +28325,7 @@ mostlyclean-gdb:
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing mostlyclean in gdb" ; \
+ echo "Doing mostlyclean in gdb"; \
(cd $(HOST_SUBDIR)/gdb && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -27255,7 +28350,7 @@ clean-gdb:
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing clean in gdb" ; \
+ echo "Doing clean in gdb"; \
(cd $(HOST_SUBDIR)/gdb && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -27280,7 +28375,7 @@ distclean-gdb:
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing distclean in gdb" ; \
+ echo "Doing distclean in gdb"; \
(cd $(HOST_SUBDIR)/gdb && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -27305,7 +28400,7 @@ maintainer-clean-gdb:
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing maintainer-clean in gdb" ; \
+ echo "Doing maintainer-clean in gdb"; \
(cd $(HOST_SUBDIR)/gdb && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -27330,7 +28425,7 @@ configure-expect:
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
test ! -f $(HOST_SUBDIR)/expect/Makefile || exit 0; \
- $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/expect ; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/expect; \
$(HOST_EXPORTS) \
echo Configuring in $(HOST_SUBDIR)/expect; \
cd "$(HOST_SUBDIR)/expect" || exit 1; \
@@ -27339,11 +28434,12 @@ configure-expect:
*) topdir=`echo $(HOST_SUBDIR)/expect/ | \
sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
esac; \
- srcdiroption="--srcdir=$${topdir}/expect"; \
- libsrcdir="$$s/expect"; \
- $(SHELL) $${libsrcdir}/configure \
+ module_srcdir=expect; \
+ $(SHELL) \
+ $$s/$$module_srcdir/configure \
+ --srcdir=$${topdir}/$$module_srcdir \
$(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
- --target=${target_alias} $${srcdiroption} \
+ --target=${target_alias} \
|| exit 1
@endif expect
@@ -27381,7 +28477,7 @@ check-expect:
@: $(MAKE); $(unstage)
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(HOST_EXPORTS) \
+ $(HOST_EXPORTS) \
(cd $(HOST_SUBDIR)/expect && \
$(MAKE) $(FLAGS_TO_PASS) check)
@@ -27434,7 +28530,7 @@ info-expect: \
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing info in expect" ; \
+ echo "Doing info in expect"; \
(cd $(HOST_SUBDIR)/expect && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -27460,7 +28556,7 @@ dvi-expect: \
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing dvi in expect" ; \
+ echo "Doing dvi in expect"; \
(cd $(HOST_SUBDIR)/expect && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -27486,7 +28582,7 @@ pdf-expect: \
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing pdf in expect" ; \
+ echo "Doing pdf in expect"; \
(cd $(HOST_SUBDIR)/expect && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -27512,7 +28608,7 @@ html-expect: \
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing html in expect" ; \
+ echo "Doing html in expect"; \
(cd $(HOST_SUBDIR)/expect && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -27538,7 +28634,7 @@ TAGS-expect: \
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing TAGS in expect" ; \
+ echo "Doing TAGS in expect"; \
(cd $(HOST_SUBDIR)/expect && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -27565,7 +28661,7 @@ install-info-expect: \
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing install-info in expect" ; \
+ echo "Doing install-info in expect"; \
(cd $(HOST_SUBDIR)/expect && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -27592,7 +28688,7 @@ install-pdf-expect: \
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing install-pdf in expect" ; \
+ echo "Doing install-pdf in expect"; \
(cd $(HOST_SUBDIR)/expect && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -27619,7 +28715,7 @@ install-html-expect: \
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing install-html in expect" ; \
+ echo "Doing install-html in expect"; \
(cd $(HOST_SUBDIR)/expect && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -27645,7 +28741,7 @@ installcheck-expect: \
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing installcheck in expect" ; \
+ echo "Doing installcheck in expect"; \
(cd $(HOST_SUBDIR)/expect && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -27670,7 +28766,7 @@ mostlyclean-expect:
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing mostlyclean in expect" ; \
+ echo "Doing mostlyclean in expect"; \
(cd $(HOST_SUBDIR)/expect && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -27695,7 +28791,7 @@ clean-expect:
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing clean in expect" ; \
+ echo "Doing clean in expect"; \
(cd $(HOST_SUBDIR)/expect && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -27720,7 +28816,7 @@ distclean-expect:
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing distclean in expect" ; \
+ echo "Doing distclean in expect"; \
(cd $(HOST_SUBDIR)/expect && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -27745,7 +28841,7 @@ maintainer-clean-expect:
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing maintainer-clean in expect" ; \
+ echo "Doing maintainer-clean in expect"; \
(cd $(HOST_SUBDIR)/expect && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -27770,7 +28866,7 @@ configure-guile:
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
test ! -f $(HOST_SUBDIR)/guile/Makefile || exit 0; \
- $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/guile ; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/guile; \
$(HOST_EXPORTS) \
echo Configuring in $(HOST_SUBDIR)/guile; \
cd "$(HOST_SUBDIR)/guile" || exit 1; \
@@ -27779,11 +28875,12 @@ configure-guile:
*) topdir=`echo $(HOST_SUBDIR)/guile/ | \
sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
esac; \
- srcdiroption="--srcdir=$${topdir}/guile"; \
- libsrcdir="$$s/guile"; \
- $(SHELL) $${libsrcdir}/configure \
+ module_srcdir=guile; \
+ $(SHELL) \
+ $$s/$$module_srcdir/configure \
+ --srcdir=$${topdir}/$$module_srcdir \
$(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
- --target=${target_alias} $${srcdiroption} \
+ --target=${target_alias} \
|| exit 1
@endif guile
@@ -27821,7 +28918,7 @@ check-guile:
@: $(MAKE); $(unstage)
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(HOST_EXPORTS) \
+ $(HOST_EXPORTS) \
(cd $(HOST_SUBDIR)/guile && \
$(MAKE) $(FLAGS_TO_PASS) check)
@@ -27874,7 +28971,7 @@ info-guile: \
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing info in guile" ; \
+ echo "Doing info in guile"; \
(cd $(HOST_SUBDIR)/guile && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -27900,7 +28997,7 @@ dvi-guile: \
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing dvi in guile" ; \
+ echo "Doing dvi in guile"; \
(cd $(HOST_SUBDIR)/guile && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -27926,7 +29023,7 @@ pdf-guile: \
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing pdf in guile" ; \
+ echo "Doing pdf in guile"; \
(cd $(HOST_SUBDIR)/guile && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -27952,7 +29049,7 @@ html-guile: \
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing html in guile" ; \
+ echo "Doing html in guile"; \
(cd $(HOST_SUBDIR)/guile && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -27978,7 +29075,7 @@ TAGS-guile: \
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing TAGS in guile" ; \
+ echo "Doing TAGS in guile"; \
(cd $(HOST_SUBDIR)/guile && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -28005,7 +29102,7 @@ install-info-guile: \
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing install-info in guile" ; \
+ echo "Doing install-info in guile"; \
(cd $(HOST_SUBDIR)/guile && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -28032,7 +29129,7 @@ install-pdf-guile: \
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing install-pdf in guile" ; \
+ echo "Doing install-pdf in guile"; \
(cd $(HOST_SUBDIR)/guile && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -28059,7 +29156,7 @@ install-html-guile: \
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing install-html in guile" ; \
+ echo "Doing install-html in guile"; \
(cd $(HOST_SUBDIR)/guile && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -28085,7 +29182,7 @@ installcheck-guile: \
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing installcheck in guile" ; \
+ echo "Doing installcheck in guile"; \
(cd $(HOST_SUBDIR)/guile && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -28110,7 +29207,7 @@ mostlyclean-guile:
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing mostlyclean in guile" ; \
+ echo "Doing mostlyclean in guile"; \
(cd $(HOST_SUBDIR)/guile && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -28135,7 +29232,7 @@ clean-guile:
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing clean in guile" ; \
+ echo "Doing clean in guile"; \
(cd $(HOST_SUBDIR)/guile && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -28160,7 +29257,7 @@ distclean-guile:
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing distclean in guile" ; \
+ echo "Doing distclean in guile"; \
(cd $(HOST_SUBDIR)/guile && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -28185,7 +29282,7 @@ maintainer-clean-guile:
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing maintainer-clean in guile" ; \
+ echo "Doing maintainer-clean in guile"; \
(cd $(HOST_SUBDIR)/guile && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -28210,7 +29307,7 @@ configure-tk:
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
test ! -f $(HOST_SUBDIR)/tk/Makefile || exit 0; \
- $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/tk ; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/tk; \
$(HOST_EXPORTS) \
echo Configuring in $(HOST_SUBDIR)/tk; \
cd "$(HOST_SUBDIR)/tk" || exit 1; \
@@ -28219,11 +29316,12 @@ configure-tk:
*) topdir=`echo $(HOST_SUBDIR)/tk/ | \
sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
esac; \
- srcdiroption="--srcdir=$${topdir}/tk"; \
- libsrcdir="$$s/tk"; \
- $(SHELL) $${libsrcdir}/configure \
+ module_srcdir=tk; \
+ $(SHELL) \
+ $$s/$$module_srcdir/configure \
+ --srcdir=$${topdir}/$$module_srcdir \
$(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
- --target=${target_alias} $${srcdiroption} \
+ --target=${target_alias} \
|| exit 1
@endif tk
@@ -28261,7 +29359,7 @@ check-tk:
@: $(MAKE); $(unstage)
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(HOST_EXPORTS) \
+ $(HOST_EXPORTS) \
(cd $(HOST_SUBDIR)/tk && \
$(MAKE) $(FLAGS_TO_PASS) check)
@@ -28314,7 +29412,7 @@ info-tk: \
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing info in tk" ; \
+ echo "Doing info in tk"; \
(cd $(HOST_SUBDIR)/tk && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -28340,7 +29438,7 @@ dvi-tk: \
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing dvi in tk" ; \
+ echo "Doing dvi in tk"; \
(cd $(HOST_SUBDIR)/tk && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -28366,7 +29464,7 @@ pdf-tk: \
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing pdf in tk" ; \
+ echo "Doing pdf in tk"; \
(cd $(HOST_SUBDIR)/tk && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -28392,7 +29490,7 @@ html-tk: \
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing html in tk" ; \
+ echo "Doing html in tk"; \
(cd $(HOST_SUBDIR)/tk && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -28418,7 +29516,7 @@ TAGS-tk: \
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing TAGS in tk" ; \
+ echo "Doing TAGS in tk"; \
(cd $(HOST_SUBDIR)/tk && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -28445,7 +29543,7 @@ install-info-tk: \
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing install-info in tk" ; \
+ echo "Doing install-info in tk"; \
(cd $(HOST_SUBDIR)/tk && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -28472,7 +29570,7 @@ install-pdf-tk: \
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing install-pdf in tk" ; \
+ echo "Doing install-pdf in tk"; \
(cd $(HOST_SUBDIR)/tk && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -28499,7 +29597,7 @@ install-html-tk: \
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing install-html in tk" ; \
+ echo "Doing install-html in tk"; \
(cd $(HOST_SUBDIR)/tk && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -28525,7 +29623,7 @@ installcheck-tk: \
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing installcheck in tk" ; \
+ echo "Doing installcheck in tk"; \
(cd $(HOST_SUBDIR)/tk && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -28550,7 +29648,7 @@ mostlyclean-tk:
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing mostlyclean in tk" ; \
+ echo "Doing mostlyclean in tk"; \
(cd $(HOST_SUBDIR)/tk && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -28575,7 +29673,7 @@ clean-tk:
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing clean in tk" ; \
+ echo "Doing clean in tk"; \
(cd $(HOST_SUBDIR)/tk && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -28600,7 +29698,7 @@ distclean-tk:
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing distclean in tk" ; \
+ echo "Doing distclean in tk"; \
(cd $(HOST_SUBDIR)/tk && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -28625,7 +29723,7 @@ maintainer-clean-tk:
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing maintainer-clean in tk" ; \
+ echo "Doing maintainer-clean in tk"; \
(cd $(HOST_SUBDIR)/tk && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -28650,7 +29748,7 @@ configure-libtermcap:
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
test ! -f $(HOST_SUBDIR)/libtermcap/Makefile || exit 0; \
- $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/libtermcap ; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/libtermcap; \
$(HOST_EXPORTS) \
echo Configuring in $(HOST_SUBDIR)/libtermcap; \
cd "$(HOST_SUBDIR)/libtermcap" || exit 1; \
@@ -28659,11 +29757,12 @@ configure-libtermcap:
*) topdir=`echo $(HOST_SUBDIR)/libtermcap/ | \
sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
esac; \
- srcdiroption="--srcdir=$${topdir}/libtermcap"; \
- libsrcdir="$$s/libtermcap"; \
- $(SHELL) $${libsrcdir}/configure \
+ module_srcdir=libtermcap; \
+ $(SHELL) \
+ $$s/$$module_srcdir/configure \
+ --srcdir=$${topdir}/$$module_srcdir \
$(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
- --target=${target_alias} $${srcdiroption} \
+ --target=${target_alias} \
|| exit 1
@endif libtermcap
@@ -28748,7 +29847,7 @@ info-libtermcap: \
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing info in libtermcap" ; \
+ echo "Doing info in libtermcap"; \
(cd $(HOST_SUBDIR)/libtermcap && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -28774,7 +29873,7 @@ dvi-libtermcap: \
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing dvi in libtermcap" ; \
+ echo "Doing dvi in libtermcap"; \
(cd $(HOST_SUBDIR)/libtermcap && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -28800,7 +29899,7 @@ pdf-libtermcap: \
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing pdf in libtermcap" ; \
+ echo "Doing pdf in libtermcap"; \
(cd $(HOST_SUBDIR)/libtermcap && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -28826,7 +29925,7 @@ html-libtermcap: \
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing html in libtermcap" ; \
+ echo "Doing html in libtermcap"; \
(cd $(HOST_SUBDIR)/libtermcap && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -28852,7 +29951,7 @@ TAGS-libtermcap: \
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing TAGS in libtermcap" ; \
+ echo "Doing TAGS in libtermcap"; \
(cd $(HOST_SUBDIR)/libtermcap && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -28879,7 +29978,7 @@ install-info-libtermcap: \
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing install-info in libtermcap" ; \
+ echo "Doing install-info in libtermcap"; \
(cd $(HOST_SUBDIR)/libtermcap && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -28906,7 +30005,7 @@ install-pdf-libtermcap: \
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing install-pdf in libtermcap" ; \
+ echo "Doing install-pdf in libtermcap"; \
(cd $(HOST_SUBDIR)/libtermcap && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -28933,7 +30032,7 @@ install-html-libtermcap: \
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing install-html in libtermcap" ; \
+ echo "Doing install-html in libtermcap"; \
(cd $(HOST_SUBDIR)/libtermcap && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -28959,7 +30058,7 @@ installcheck-libtermcap: \
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing installcheck in libtermcap" ; \
+ echo "Doing installcheck in libtermcap"; \
(cd $(HOST_SUBDIR)/libtermcap && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -29024,7 +30123,7 @@ configure-utils:
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
test ! -f $(HOST_SUBDIR)/utils/Makefile || exit 0; \
- $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/utils ; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/utils; \
$(HOST_EXPORTS) \
echo Configuring in $(HOST_SUBDIR)/utils; \
cd "$(HOST_SUBDIR)/utils" || exit 1; \
@@ -29033,11 +30132,12 @@ configure-utils:
*) topdir=`echo $(HOST_SUBDIR)/utils/ | \
sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
esac; \
- srcdiroption="--srcdir=$${topdir}/utils"; \
- libsrcdir="$$s/utils"; \
- $(SHELL) $${libsrcdir}/configure \
+ module_srcdir=utils; \
+ $(SHELL) \
+ $$s/$$module_srcdir/configure \
+ --srcdir=$${topdir}/$$module_srcdir \
$(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
- --target=${target_alias} $${srcdiroption} \
+ --target=${target_alias} \
|| exit 1
@endif utils
@@ -29122,7 +30222,7 @@ info-utils: \
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing info in utils" ; \
+ echo "Doing info in utils"; \
(cd $(HOST_SUBDIR)/utils && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -29148,7 +30248,7 @@ dvi-utils: \
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing dvi in utils" ; \
+ echo "Doing dvi in utils"; \
(cd $(HOST_SUBDIR)/utils && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -29174,7 +30274,7 @@ pdf-utils: \
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing pdf in utils" ; \
+ echo "Doing pdf in utils"; \
(cd $(HOST_SUBDIR)/utils && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -29200,7 +30300,7 @@ html-utils: \
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing html in utils" ; \
+ echo "Doing html in utils"; \
(cd $(HOST_SUBDIR)/utils && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -29226,7 +30326,7 @@ TAGS-utils: \
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing TAGS in utils" ; \
+ echo "Doing TAGS in utils"; \
(cd $(HOST_SUBDIR)/utils && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -29253,7 +30353,7 @@ install-info-utils: \
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing install-info in utils" ; \
+ echo "Doing install-info in utils"; \
(cd $(HOST_SUBDIR)/utils && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -29280,7 +30380,7 @@ install-pdf-utils: \
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing install-pdf in utils" ; \
+ echo "Doing install-pdf in utils"; \
(cd $(HOST_SUBDIR)/utils && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -29307,7 +30407,7 @@ install-html-utils: \
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing install-html in utils" ; \
+ echo "Doing install-html in utils"; \
(cd $(HOST_SUBDIR)/utils && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -29333,7 +30433,7 @@ installcheck-utils: \
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing installcheck in utils" ; \
+ echo "Doing installcheck in utils"; \
(cd $(HOST_SUBDIR)/utils && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -29358,7 +30458,7 @@ mostlyclean-utils:
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing mostlyclean in utils" ; \
+ echo "Doing mostlyclean in utils"; \
(cd $(HOST_SUBDIR)/utils && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -29383,7 +30483,7 @@ clean-utils:
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing clean in utils" ; \
+ echo "Doing clean in utils"; \
(cd $(HOST_SUBDIR)/utils && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -29408,7 +30508,7 @@ distclean-utils:
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing distclean in utils" ; \
+ echo "Doing distclean in utils"; \
(cd $(HOST_SUBDIR)/utils && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -29433,7 +30533,7 @@ maintainer-clean-utils:
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing maintainer-clean in utils" ; \
+ echo "Doing maintainer-clean in utils"; \
(cd $(HOST_SUBDIR)/utils && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -29458,7 +30558,7 @@ configure-gnattools:
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
test ! -f $(HOST_SUBDIR)/gnattools/Makefile || exit 0; \
- $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/gnattools ; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/gnattools; \
$(HOST_EXPORTS) \
echo Configuring in $(HOST_SUBDIR)/gnattools; \
cd "$(HOST_SUBDIR)/gnattools" || exit 1; \
@@ -29467,11 +30567,12 @@ configure-gnattools:
*) topdir=`echo $(HOST_SUBDIR)/gnattools/ | \
sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
esac; \
- srcdiroption="--srcdir=$${topdir}/gnattools"; \
- libsrcdir="$$s/gnattools"; \
- $(SHELL) $${libsrcdir}/configure \
+ module_srcdir=gnattools; \
+ $(SHELL) \
+ $$s/$$module_srcdir/configure \
+ --srcdir=$${topdir}/$$module_srcdir \
$(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
- --target=${target_alias} $${srcdiroption} \
+ --target=${target_alias} \
|| exit 1
@endif gnattools
@@ -29509,7 +30610,7 @@ check-gnattools:
@: $(MAKE); $(unstage)
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(HOST_EXPORTS) \
+ $(HOST_EXPORTS) \
(cd $(HOST_SUBDIR)/gnattools && \
$(MAKE) $(FLAGS_TO_PASS) check)
@@ -29562,7 +30663,7 @@ info-gnattools: \
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing info in gnattools" ; \
+ echo "Doing info in gnattools"; \
(cd $(HOST_SUBDIR)/gnattools && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -29588,7 +30689,7 @@ dvi-gnattools: \
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing dvi in gnattools" ; \
+ echo "Doing dvi in gnattools"; \
(cd $(HOST_SUBDIR)/gnattools && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -29614,7 +30715,7 @@ pdf-gnattools: \
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing pdf in gnattools" ; \
+ echo "Doing pdf in gnattools"; \
(cd $(HOST_SUBDIR)/gnattools && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -29640,7 +30741,7 @@ html-gnattools: \
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing html in gnattools" ; \
+ echo "Doing html in gnattools"; \
(cd $(HOST_SUBDIR)/gnattools && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -29666,7 +30767,7 @@ TAGS-gnattools: \
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing TAGS in gnattools" ; \
+ echo "Doing TAGS in gnattools"; \
(cd $(HOST_SUBDIR)/gnattools && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -29693,7 +30794,7 @@ install-info-gnattools: \
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing install-info in gnattools" ; \
+ echo "Doing install-info in gnattools"; \
(cd $(HOST_SUBDIR)/gnattools && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -29720,7 +30821,7 @@ install-pdf-gnattools: \
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing install-pdf in gnattools" ; \
+ echo "Doing install-pdf in gnattools"; \
(cd $(HOST_SUBDIR)/gnattools && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -29747,7 +30848,7 @@ install-html-gnattools: \
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing install-html in gnattools" ; \
+ echo "Doing install-html in gnattools"; \
(cd $(HOST_SUBDIR)/gnattools && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -29773,7 +30874,7 @@ installcheck-gnattools: \
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing installcheck in gnattools" ; \
+ echo "Doing installcheck in gnattools"; \
(cd $(HOST_SUBDIR)/gnattools && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -29798,7 +30899,7 @@ mostlyclean-gnattools:
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing mostlyclean in gnattools" ; \
+ echo "Doing mostlyclean in gnattools"; \
(cd $(HOST_SUBDIR)/gnattools && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -29823,7 +30924,7 @@ clean-gnattools:
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing clean in gnattools" ; \
+ echo "Doing clean in gnattools"; \
(cd $(HOST_SUBDIR)/gnattools && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -29848,7 +30949,7 @@ distclean-gnattools:
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing distclean in gnattools" ; \
+ echo "Doing distclean in gnattools"; \
(cd $(HOST_SUBDIR)/gnattools && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -29873,7 +30974,7 @@ maintainer-clean-gnattools:
for flag in $(EXTRA_HOST_FLAGS) ; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing maintainer-clean in gnattools" ; \
+ echo "Doing maintainer-clean in gnattools"; \
(cd $(HOST_SUBDIR)/gnattools && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -29897,7 +30998,7 @@ configure-lto-plugin:
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
test ! -f $(HOST_SUBDIR)/lto-plugin/Makefile || exit 0; \
- $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/lto-plugin ; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/lto-plugin; \
$(HOST_EXPORTS) \
echo Configuring in $(HOST_SUBDIR)/lto-plugin; \
cd "$(HOST_SUBDIR)/lto-plugin" || exit 1; \
@@ -29906,11 +31007,12 @@ configure-lto-plugin:
*) topdir=`echo $(HOST_SUBDIR)/lto-plugin/ | \
sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
esac; \
- srcdiroption="--srcdir=$${topdir}/lto-plugin"; \
- libsrcdir="$$s/lto-plugin"; \
- $(SHELL) $${libsrcdir}/configure \
+ module_srcdir=lto-plugin; \
+ $(SHELL) \
+ $$s/$$module_srcdir/configure \
+ --srcdir=$${topdir}/$$module_srcdir \
$(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
- --target=${target_alias} $${srcdiroption} --enable-shared \
+ --target=${target_alias} --enable-shared @extra_linker_plugin_flags@ @extra_linker_plugin_configure_flags@ \
|| exit 1
@endif lto-plugin
@@ -29931,21 +31033,22 @@ configure-stage1-lto-plugin:
CFLAGS="$(STAGE1_CFLAGS)"; export CFLAGS; \
CXXFLAGS="$(STAGE1_CXXFLAGS)"; export CXXFLAGS; \
LIBCFLAGS="$(LIBCFLAGS)"; export LIBCFLAGS; \
- echo Configuring stage 1 in $(HOST_SUBDIR)/lto-plugin ; \
- $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/lto-plugin ; \
+ echo Configuring stage 1 in $(HOST_SUBDIR)/lto-plugin; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/lto-plugin; \
cd $(HOST_SUBDIR)/lto-plugin || exit 1; \
case $(srcdir) in \
/* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
*) topdir=`echo $(HOST_SUBDIR)/lto-plugin/ | \
sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
esac; \
- srcdiroption="--srcdir=$${topdir}/lto-plugin"; \
- libsrcdir="$$s/lto-plugin"; \
- $(SHELL) $${libsrcdir}/configure \
+ module_srcdir=lto-plugin; \
+ $(SHELL) $$s/$$module_srcdir/configure \
+ --srcdir=$${topdir}/$$module_srcdir \
$(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
- --target=${target_alias} $${srcdiroption} \
+ --target=${target_alias} \
+ \
$(STAGE1_CONFIGURE_FLAGS) \
- --enable-shared
+ --enable-shared @extra_linker_plugin_flags@ @extra_linker_plugin_configure_flags@
@endif lto-plugin-bootstrap
.PHONY: configure-stage2-lto-plugin maybe-configure-stage2-lto-plugin
@@ -29964,22 +31067,22 @@ configure-stage2-lto-plugin:
CFLAGS="$(STAGE2_CFLAGS)"; export CFLAGS; \
CXXFLAGS="$(STAGE2_CXXFLAGS)"; export CXXFLAGS; \
LIBCFLAGS="$(STAGE2_CFLAGS)"; export LIBCFLAGS; \
- echo Configuring stage 2 in $(HOST_SUBDIR)/lto-plugin ; \
- $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/lto-plugin ; \
+ echo Configuring stage 2 in $(HOST_SUBDIR)/lto-plugin; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/lto-plugin; \
cd $(HOST_SUBDIR)/lto-plugin || exit 1; \
case $(srcdir) in \
/* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
*) topdir=`echo $(HOST_SUBDIR)/lto-plugin/ | \
sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
esac; \
- srcdiroption="--srcdir=$${topdir}/lto-plugin"; \
- libsrcdir="$$s/lto-plugin"; \
- $(SHELL) $${libsrcdir}/configure \
+ module_srcdir=lto-plugin; \
+ $(SHELL) $$s/$$module_srcdir/configure \
+ --srcdir=$${topdir}/$$module_srcdir \
$(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
- --target=${target_alias} $${srcdiroption} \
+ --target=${target_alias} \
--with-build-libsubdir=$(HOST_SUBDIR) \
$(STAGE2_CONFIGURE_FLAGS) \
- --enable-shared
+ --enable-shared @extra_linker_plugin_flags@ @extra_linker_plugin_configure_flags@
@endif lto-plugin-bootstrap
.PHONY: configure-stage3-lto-plugin maybe-configure-stage3-lto-plugin
@@ -29998,22 +31101,22 @@ configure-stage3-lto-plugin:
CFLAGS="$(STAGE3_CFLAGS)"; export CFLAGS; \
CXXFLAGS="$(STAGE3_CXXFLAGS)"; export CXXFLAGS; \
LIBCFLAGS="$(STAGE3_CFLAGS)"; export LIBCFLAGS; \
- echo Configuring stage 3 in $(HOST_SUBDIR)/lto-plugin ; \
- $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/lto-plugin ; \
+ echo Configuring stage 3 in $(HOST_SUBDIR)/lto-plugin; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/lto-plugin; \
cd $(HOST_SUBDIR)/lto-plugin || exit 1; \
case $(srcdir) in \
/* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
*) topdir=`echo $(HOST_SUBDIR)/lto-plugin/ | \
sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
esac; \
- srcdiroption="--srcdir=$${topdir}/lto-plugin"; \
- libsrcdir="$$s/lto-plugin"; \
- $(SHELL) $${libsrcdir}/configure \
+ module_srcdir=lto-plugin; \
+ $(SHELL) $$s/$$module_srcdir/configure \
+ --srcdir=$${topdir}/$$module_srcdir \
$(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
- --target=${target_alias} $${srcdiroption} \
+ --target=${target_alias} \
--with-build-libsubdir=$(HOST_SUBDIR) \
$(STAGE3_CONFIGURE_FLAGS) \
- --enable-shared
+ --enable-shared @extra_linker_plugin_flags@ @extra_linker_plugin_configure_flags@
@endif lto-plugin-bootstrap
.PHONY: configure-stage4-lto-plugin maybe-configure-stage4-lto-plugin
@@ -30032,22 +31135,22 @@ configure-stage4-lto-plugin:
CFLAGS="$(STAGE4_CFLAGS)"; export CFLAGS; \
CXXFLAGS="$(STAGE4_CXXFLAGS)"; export CXXFLAGS; \
LIBCFLAGS="$(STAGE4_CFLAGS)"; export LIBCFLAGS; \
- echo Configuring stage 4 in $(HOST_SUBDIR)/lto-plugin ; \
- $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/lto-plugin ; \
+ echo Configuring stage 4 in $(HOST_SUBDIR)/lto-plugin; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/lto-plugin; \
cd $(HOST_SUBDIR)/lto-plugin || exit 1; \
case $(srcdir) in \
/* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
*) topdir=`echo $(HOST_SUBDIR)/lto-plugin/ | \
sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
esac; \
- srcdiroption="--srcdir=$${topdir}/lto-plugin"; \
- libsrcdir="$$s/lto-plugin"; \
- $(SHELL) $${libsrcdir}/configure \
+ module_srcdir=lto-plugin; \
+ $(SHELL) $$s/$$module_srcdir/configure \
+ --srcdir=$${topdir}/$$module_srcdir \
$(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
- --target=${target_alias} $${srcdiroption} \
+ --target=${target_alias} \
--with-build-libsubdir=$(HOST_SUBDIR) \
$(STAGE4_CONFIGURE_FLAGS) \
- --enable-shared
+ --enable-shared @extra_linker_plugin_flags@ @extra_linker_plugin_configure_flags@
@endif lto-plugin-bootstrap
.PHONY: configure-stageprofile-lto-plugin maybe-configure-stageprofile-lto-plugin
@@ -30066,22 +31169,22 @@ configure-stageprofile-lto-plugin:
CFLAGS="$(STAGEprofile_CFLAGS)"; export CFLAGS; \
CXXFLAGS="$(STAGEprofile_CXXFLAGS)"; export CXXFLAGS; \
LIBCFLAGS="$(STAGEprofile_CFLAGS)"; export LIBCFLAGS; \
- echo Configuring stage profile in $(HOST_SUBDIR)/lto-plugin ; \
- $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/lto-plugin ; \
+ echo Configuring stage profile in $(HOST_SUBDIR)/lto-plugin; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/lto-plugin; \
cd $(HOST_SUBDIR)/lto-plugin || exit 1; \
case $(srcdir) in \
/* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
*) topdir=`echo $(HOST_SUBDIR)/lto-plugin/ | \
sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
esac; \
- srcdiroption="--srcdir=$${topdir}/lto-plugin"; \
- libsrcdir="$$s/lto-plugin"; \
- $(SHELL) $${libsrcdir}/configure \
+ module_srcdir=lto-plugin; \
+ $(SHELL) $$s/$$module_srcdir/configure \
+ --srcdir=$${topdir}/$$module_srcdir \
$(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
- --target=${target_alias} $${srcdiroption} \
+ --target=${target_alias} \
--with-build-libsubdir=$(HOST_SUBDIR) \
$(STAGEprofile_CONFIGURE_FLAGS) \
- --enable-shared
+ --enable-shared @extra_linker_plugin_flags@ @extra_linker_plugin_configure_flags@
@endif lto-plugin-bootstrap
.PHONY: configure-stagefeedback-lto-plugin maybe-configure-stagefeedback-lto-plugin
@@ -30100,22 +31203,22 @@ configure-stagefeedback-lto-plugin:
CFLAGS="$(STAGEfeedback_CFLAGS)"; export CFLAGS; \
CXXFLAGS="$(STAGEfeedback_CXXFLAGS)"; export CXXFLAGS; \
LIBCFLAGS="$(STAGEfeedback_CFLAGS)"; export LIBCFLAGS; \
- echo Configuring stage feedback in $(HOST_SUBDIR)/lto-plugin ; \
- $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/lto-plugin ; \
+ echo Configuring stage feedback in $(HOST_SUBDIR)/lto-plugin; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/lto-plugin; \
cd $(HOST_SUBDIR)/lto-plugin || exit 1; \
case $(srcdir) in \
/* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
*) topdir=`echo $(HOST_SUBDIR)/lto-plugin/ | \
sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
esac; \
- srcdiroption="--srcdir=$${topdir}/lto-plugin"; \
- libsrcdir="$$s/lto-plugin"; \
- $(SHELL) $${libsrcdir}/configure \
+ module_srcdir=lto-plugin; \
+ $(SHELL) $$s/$$module_srcdir/configure \
+ --srcdir=$${topdir}/$$module_srcdir \
$(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
- --target=${target_alias} $${srcdiroption} \
+ --target=${target_alias} \
--with-build-libsubdir=$(HOST_SUBDIR) \
$(STAGEfeedback_CONFIGURE_FLAGS) \
- --enable-shared
+ --enable-shared @extra_linker_plugin_flags@ @extra_linker_plugin_configure_flags@
@endif lto-plugin-bootstrap
@@ -30135,7 +31238,7 @@ all-lto-plugin: configure-lto-plugin
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(HOST_EXPORTS) \
(cd $(HOST_SUBDIR)/lto-plugin && \
- $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS) $(STAGE1_FLAGS_TO_PASS) \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS) $(STAGE1_FLAGS_TO_PASS) @extra_linker_plugin_flags@ \
$(TARGET-lto-plugin))
@endif lto-plugin
@@ -30164,7 +31267,7 @@ all-stage1-lto-plugin: configure-stage1-lto-plugin
CXXFLAGS_FOR_TARGET="$(CXXFLAGS_FOR_TARGET)" \
LIBCFLAGS_FOR_TARGET="$(LIBCFLAGS_FOR_TARGET)" \
$(EXTRA_HOST_FLAGS) \
- $(STAGE1_FLAGS_TO_PASS) \
+ $(STAGE1_FLAGS_TO_PASS) @extra_linker_plugin_flags@ \
TFLAGS="$(STAGE1_TFLAGS)" \
$(TARGET-stage1-lto-plugin)
@@ -30179,7 +31282,7 @@ clean-stage1-lto-plugin:
fi; \
cd $(HOST_SUBDIR)/lto-plugin && \
$(MAKE) $(EXTRA_HOST_FLAGS) \
- $(STAGE1_FLAGS_TO_PASS) clean
+ $(STAGE1_FLAGS_TO_PASS) @extra_linker_plugin_flags@ clean
@endif lto-plugin-bootstrap
@@ -30206,7 +31309,7 @@ all-stage2-lto-plugin: configure-stage2-lto-plugin
CFLAGS_FOR_TARGET="$(CFLAGS_FOR_TARGET)" \
CXXFLAGS_FOR_TARGET="$(CXXFLAGS_FOR_TARGET)" \
LIBCFLAGS_FOR_TARGET="$(LIBCFLAGS_FOR_TARGET)" \
- $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) \
+ $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) @extra_linker_plugin_flags@ \
TFLAGS="$(STAGE2_TFLAGS)" \
$(TARGET-stage2-lto-plugin)
@@ -30220,7 +31323,7 @@ clean-stage2-lto-plugin:
$(MAKE) stage2-start; \
fi; \
cd $(HOST_SUBDIR)/lto-plugin && \
- $(MAKE) $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) clean
+ $(MAKE) $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) @extra_linker_plugin_flags@ clean
@endif lto-plugin-bootstrap
@@ -30247,7 +31350,7 @@ all-stage3-lto-plugin: configure-stage3-lto-plugin
CFLAGS_FOR_TARGET="$(CFLAGS_FOR_TARGET)" \
CXXFLAGS_FOR_TARGET="$(CXXFLAGS_FOR_TARGET)" \
LIBCFLAGS_FOR_TARGET="$(LIBCFLAGS_FOR_TARGET)" \
- $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) \
+ $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) @extra_linker_plugin_flags@ \
TFLAGS="$(STAGE3_TFLAGS)" \
$(TARGET-stage3-lto-plugin)
@@ -30261,7 +31364,7 @@ clean-stage3-lto-plugin:
$(MAKE) stage3-start; \
fi; \
cd $(HOST_SUBDIR)/lto-plugin && \
- $(MAKE) $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) clean
+ $(MAKE) $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) @extra_linker_plugin_flags@ clean
@endif lto-plugin-bootstrap
@@ -30288,7 +31391,7 @@ all-stage4-lto-plugin: configure-stage4-lto-plugin
CFLAGS_FOR_TARGET="$(CFLAGS_FOR_TARGET)" \
CXXFLAGS_FOR_TARGET="$(CXXFLAGS_FOR_TARGET)" \
LIBCFLAGS_FOR_TARGET="$(LIBCFLAGS_FOR_TARGET)" \
- $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) \
+ $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) @extra_linker_plugin_flags@ \
TFLAGS="$(STAGE4_TFLAGS)" \
$(TARGET-stage4-lto-plugin)
@@ -30302,7 +31405,7 @@ clean-stage4-lto-plugin:
$(MAKE) stage4-start; \
fi; \
cd $(HOST_SUBDIR)/lto-plugin && \
- $(MAKE) $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) clean
+ $(MAKE) $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) @extra_linker_plugin_flags@ clean
@endif lto-plugin-bootstrap
@@ -30329,7 +31432,7 @@ all-stageprofile-lto-plugin: configure-stageprofile-lto-plugin
CFLAGS_FOR_TARGET="$(CFLAGS_FOR_TARGET)" \
CXXFLAGS_FOR_TARGET="$(CXXFLAGS_FOR_TARGET)" \
LIBCFLAGS_FOR_TARGET="$(LIBCFLAGS_FOR_TARGET)" \
- $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) \
+ $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) @extra_linker_plugin_flags@ \
TFLAGS="$(STAGEprofile_TFLAGS)" \
$(TARGET-stageprofile-lto-plugin)
@@ -30343,7 +31446,7 @@ clean-stageprofile-lto-plugin:
$(MAKE) stageprofile-start; \
fi; \
cd $(HOST_SUBDIR)/lto-plugin && \
- $(MAKE) $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) clean
+ $(MAKE) $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) @extra_linker_plugin_flags@ clean
@endif lto-plugin-bootstrap
@@ -30370,7 +31473,7 @@ all-stagefeedback-lto-plugin: configure-stagefeedback-lto-plugin
CFLAGS_FOR_TARGET="$(CFLAGS_FOR_TARGET)" \
CXXFLAGS_FOR_TARGET="$(CXXFLAGS_FOR_TARGET)" \
LIBCFLAGS_FOR_TARGET="$(LIBCFLAGS_FOR_TARGET)" \
- $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) \
+ $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) @extra_linker_plugin_flags@ \
TFLAGS="$(STAGEfeedback_TFLAGS)" \
$(TARGET-stagefeedback-lto-plugin)
@@ -30384,7 +31487,7 @@ clean-stagefeedback-lto-plugin:
$(MAKE) stagefeedback-start; \
fi; \
cd $(HOST_SUBDIR)/lto-plugin && \
- $(MAKE) $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) clean
+ $(MAKE) $(EXTRA_HOST_FLAGS) $(POSTSTAGE1_FLAGS_TO_PASS) @extra_linker_plugin_flags@ clean
@endif lto-plugin-bootstrap
@@ -30400,9 +31503,9 @@ check-lto-plugin:
@: $(MAKE); $(unstage)
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(HOST_EXPORTS) \
+ $(HOST_EXPORTS) $(EXTRA_HOST_EXPORTS) \
(cd $(HOST_SUBDIR)/lto-plugin && \
- $(MAKE) $(FLAGS_TO_PASS) check)
+ $(MAKE) $(FLAGS_TO_PASS) @extra_linker_plugin_flags@ $(EXTRA_BOOTSTRAP_FLAGS) check)
@endif lto-plugin
@@ -30417,7 +31520,7 @@ install-lto-plugin: installdirs
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(HOST_EXPORTS) \
(cd $(HOST_SUBDIR)/lto-plugin && \
- $(MAKE) $(FLAGS_TO_PASS) install)
+ $(MAKE) $(FLAGS_TO_PASS) @extra_linker_plugin_flags@ install)
@endif lto-plugin
@@ -30432,7 +31535,7 @@ install-strip-lto-plugin: installdirs
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(HOST_EXPORTS) \
(cd $(HOST_SUBDIR)/lto-plugin && \
- $(MAKE) $(FLAGS_TO_PASS) install-strip)
+ $(MAKE) $(FLAGS_TO_PASS) @extra_linker_plugin_flags@ install-strip)
@endif lto-plugin
@@ -30449,10 +31552,10 @@ info-lto-plugin: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(HOST_EXPORTS) \
- for flag in $(EXTRA_HOST_FLAGS) ; do \
+ for flag in $(EXTRA_HOST_FLAGS) @extra_linker_plugin_flags@; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing info in lto-plugin" ; \
+ echo "Doing info in lto-plugin"; \
(cd $(HOST_SUBDIR)/lto-plugin && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -30474,10 +31577,10 @@ dvi-lto-plugin: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(HOST_EXPORTS) \
- for flag in $(EXTRA_HOST_FLAGS) ; do \
+ for flag in $(EXTRA_HOST_FLAGS) @extra_linker_plugin_flags@; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing dvi in lto-plugin" ; \
+ echo "Doing dvi in lto-plugin"; \
(cd $(HOST_SUBDIR)/lto-plugin && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -30499,10 +31602,10 @@ pdf-lto-plugin: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(HOST_EXPORTS) \
- for flag in $(EXTRA_HOST_FLAGS) ; do \
+ for flag in $(EXTRA_HOST_FLAGS) @extra_linker_plugin_flags@; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing pdf in lto-plugin" ; \
+ echo "Doing pdf in lto-plugin"; \
(cd $(HOST_SUBDIR)/lto-plugin && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -30524,10 +31627,10 @@ html-lto-plugin: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(HOST_EXPORTS) \
- for flag in $(EXTRA_HOST_FLAGS) ; do \
+ for flag in $(EXTRA_HOST_FLAGS) @extra_linker_plugin_flags@; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing html in lto-plugin" ; \
+ echo "Doing html in lto-plugin"; \
(cd $(HOST_SUBDIR)/lto-plugin && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -30549,10 +31652,10 @@ TAGS-lto-plugin: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(HOST_EXPORTS) \
- for flag in $(EXTRA_HOST_FLAGS) ; do \
+ for flag in $(EXTRA_HOST_FLAGS) @extra_linker_plugin_flags@; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing TAGS in lto-plugin" ; \
+ echo "Doing TAGS in lto-plugin"; \
(cd $(HOST_SUBDIR)/lto-plugin && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -30575,10 +31678,10 @@ install-info-lto-plugin: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(HOST_EXPORTS) \
- for flag in $(EXTRA_HOST_FLAGS) ; do \
+ for flag in $(EXTRA_HOST_FLAGS) @extra_linker_plugin_flags@; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing install-info in lto-plugin" ; \
+ echo "Doing install-info in lto-plugin"; \
(cd $(HOST_SUBDIR)/lto-plugin && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -30601,10 +31704,10 @@ install-pdf-lto-plugin: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(HOST_EXPORTS) \
- for flag in $(EXTRA_HOST_FLAGS) ; do \
+ for flag in $(EXTRA_HOST_FLAGS) @extra_linker_plugin_flags@; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing install-pdf in lto-plugin" ; \
+ echo "Doing install-pdf in lto-plugin"; \
(cd $(HOST_SUBDIR)/lto-plugin && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -30627,10 +31730,10 @@ install-html-lto-plugin: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(HOST_EXPORTS) \
- for flag in $(EXTRA_HOST_FLAGS) ; do \
+ for flag in $(EXTRA_HOST_FLAGS) @extra_linker_plugin_flags@; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing install-html in lto-plugin" ; \
+ echo "Doing install-html in lto-plugin"; \
(cd $(HOST_SUBDIR)/lto-plugin && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -30652,10 +31755,10 @@ installcheck-lto-plugin: \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(HOST_EXPORTS) \
- for flag in $(EXTRA_HOST_FLAGS) ; do \
+ for flag in $(EXTRA_HOST_FLAGS) @extra_linker_plugin_flags@; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing installcheck in lto-plugin" ; \
+ echo "Doing installcheck in lto-plugin"; \
(cd $(HOST_SUBDIR)/lto-plugin && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -30676,10 +31779,10 @@ mostlyclean-lto-plugin:
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(HOST_EXPORTS) \
- for flag in $(EXTRA_HOST_FLAGS) ; do \
+ for flag in $(EXTRA_HOST_FLAGS) @extra_linker_plugin_flags@; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing mostlyclean in lto-plugin" ; \
+ echo "Doing mostlyclean in lto-plugin"; \
(cd $(HOST_SUBDIR)/lto-plugin && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -30700,10 +31803,10 @@ clean-lto-plugin:
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(HOST_EXPORTS) \
- for flag in $(EXTRA_HOST_FLAGS) ; do \
+ for flag in $(EXTRA_HOST_FLAGS) @extra_linker_plugin_flags@; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing clean in lto-plugin" ; \
+ echo "Doing clean in lto-plugin"; \
(cd $(HOST_SUBDIR)/lto-plugin && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -30724,10 +31827,10 @@ distclean-lto-plugin:
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(HOST_EXPORTS) \
- for flag in $(EXTRA_HOST_FLAGS) ; do \
+ for flag in $(EXTRA_HOST_FLAGS) @extra_linker_plugin_flags@; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing distclean in lto-plugin" ; \
+ echo "Doing distclean in lto-plugin"; \
(cd $(HOST_SUBDIR)/lto-plugin && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -30748,10 +31851,10 @@ maintainer-clean-lto-plugin:
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(HOST_EXPORTS) \
- for flag in $(EXTRA_HOST_FLAGS) ; do \
+ for flag in $(EXTRA_HOST_FLAGS) @extra_linker_plugin_flags@; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing maintainer-clean in lto-plugin" ; \
+ echo "Doing maintainer-clean in lto-plugin"; \
(cd $(HOST_SUBDIR)/lto-plugin && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -30764,6 +31867,888 @@ maintainer-clean-lto-plugin:
+.PHONY: configure-libcc1 maybe-configure-libcc1
+maybe-configure-libcc1:
+@if gcc-bootstrap
+configure-libcc1: stage_current
+@endif gcc-bootstrap
+@if libcc1
+maybe-configure-libcc1: configure-libcc1
+configure-libcc1:
+ @: $(MAKE); $(unstage)
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ test ! -f $(HOST_SUBDIR)/libcc1/Makefile || exit 0; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/libcc1; \
+ $(HOST_EXPORTS) \
+ echo Configuring in $(HOST_SUBDIR)/libcc1; \
+ cd "$(HOST_SUBDIR)/libcc1" || exit 1; \
+ case $(srcdir) in \
+ /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+ *) topdir=`echo $(HOST_SUBDIR)/libcc1/ | \
+ sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
+ esac; \
+ module_srcdir=libcc1; \
+ $(SHELL) \
+ $$s/$$module_srcdir/configure \
+ --srcdir=$${topdir}/$$module_srcdir \
+ $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
+ --target=${target_alias} --enable-shared \
+ || exit 1
+@endif libcc1
+
+
+
+
+
+.PHONY: all-libcc1 maybe-all-libcc1
+maybe-all-libcc1:
+@if gcc-bootstrap
+all-libcc1: stage_current
+@endif gcc-bootstrap
+@if libcc1
+TARGET-libcc1=all
+maybe-all-libcc1: all-libcc1
+all-libcc1: configure-libcc1
+ @: $(MAKE); $(unstage)
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ (cd $(HOST_SUBDIR)/libcc1 && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS) $(STAGE1_FLAGS_TO_PASS) \
+ $(TARGET-libcc1))
+@endif libcc1
+
+
+
+
+.PHONY: check-libcc1 maybe-check-libcc1
+maybe-check-libcc1:
+@if libcc1
+maybe-check-libcc1: check-libcc1
+
+check-libcc1:
+ @: $(MAKE); $(unstage)
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ (cd $(HOST_SUBDIR)/libcc1 && \
+ $(MAKE) $(FLAGS_TO_PASS) check)
+
+@endif libcc1
+
+.PHONY: install-libcc1 maybe-install-libcc1
+maybe-install-libcc1:
+@if libcc1
+maybe-install-libcc1: install-libcc1
+
+install-libcc1: installdirs
+ @: $(MAKE); $(unstage)
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ (cd $(HOST_SUBDIR)/libcc1 && \
+ $(MAKE) $(FLAGS_TO_PASS) install)
+
+@endif libcc1
+
+.PHONY: install-strip-libcc1 maybe-install-strip-libcc1
+maybe-install-strip-libcc1:
+@if libcc1
+maybe-install-strip-libcc1: install-strip-libcc1
+
+install-strip-libcc1: installdirs
+ @: $(MAKE); $(unstage)
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ (cd $(HOST_SUBDIR)/libcc1 && \
+ $(MAKE) $(FLAGS_TO_PASS) install-strip)
+
+@endif libcc1
+
+# Other targets (info, dvi, pdf, etc.)
+
+.PHONY: maybe-info-libcc1 info-libcc1
+maybe-info-libcc1:
+@if libcc1
+maybe-info-libcc1: info-libcc1
+
+info-libcc1: \
+ configure-libcc1
+ @: $(MAKE); $(unstage)
+ @[ -f ./libcc1/Makefile ] || exit 0; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing info in libcc1"; \
+ (cd $(HOST_SUBDIR)/libcc1 && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
+ info) \
+ || exit 1
+
+@endif libcc1
+
+.PHONY: maybe-dvi-libcc1 dvi-libcc1
+maybe-dvi-libcc1:
+@if libcc1
+maybe-dvi-libcc1: dvi-libcc1
+
+dvi-libcc1: \
+ configure-libcc1
+ @: $(MAKE); $(unstage)
+ @[ -f ./libcc1/Makefile ] || exit 0; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing dvi in libcc1"; \
+ (cd $(HOST_SUBDIR)/libcc1 && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
+ dvi) \
+ || exit 1
+
+@endif libcc1
+
+.PHONY: maybe-pdf-libcc1 pdf-libcc1
+maybe-pdf-libcc1:
+@if libcc1
+maybe-pdf-libcc1: pdf-libcc1
+
+pdf-libcc1: \
+ configure-libcc1
+ @: $(MAKE); $(unstage)
+ @[ -f ./libcc1/Makefile ] || exit 0; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing pdf in libcc1"; \
+ (cd $(HOST_SUBDIR)/libcc1 && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
+ pdf) \
+ || exit 1
+
+@endif libcc1
+
+.PHONY: maybe-html-libcc1 html-libcc1
+maybe-html-libcc1:
+@if libcc1
+maybe-html-libcc1: html-libcc1
+
+html-libcc1: \
+ configure-libcc1
+ @: $(MAKE); $(unstage)
+ @[ -f ./libcc1/Makefile ] || exit 0; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing html in libcc1"; \
+ (cd $(HOST_SUBDIR)/libcc1 && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
+ html) \
+ || exit 1
+
+@endif libcc1
+
+.PHONY: maybe-TAGS-libcc1 TAGS-libcc1
+maybe-TAGS-libcc1:
+@if libcc1
+maybe-TAGS-libcc1: TAGS-libcc1
+
+TAGS-libcc1: \
+ configure-libcc1
+ @: $(MAKE); $(unstage)
+ @[ -f ./libcc1/Makefile ] || exit 0; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing TAGS in libcc1"; \
+ (cd $(HOST_SUBDIR)/libcc1 && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
+ TAGS) \
+ || exit 1
+
+@endif libcc1
+
+.PHONY: maybe-install-info-libcc1 install-info-libcc1
+maybe-install-info-libcc1:
+@if libcc1
+maybe-install-info-libcc1: install-info-libcc1
+
+install-info-libcc1: \
+ configure-libcc1 \
+ info-libcc1
+ @: $(MAKE); $(unstage)
+ @[ -f ./libcc1/Makefile ] || exit 0; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing install-info in libcc1"; \
+ (cd $(HOST_SUBDIR)/libcc1 && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
+ install-info) \
+ || exit 1
+
+@endif libcc1
+
+.PHONY: maybe-install-pdf-libcc1 install-pdf-libcc1
+maybe-install-pdf-libcc1:
+@if libcc1
+maybe-install-pdf-libcc1: install-pdf-libcc1
+
+install-pdf-libcc1: \
+ configure-libcc1 \
+ pdf-libcc1
+ @: $(MAKE); $(unstage)
+ @[ -f ./libcc1/Makefile ] || exit 0; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing install-pdf in libcc1"; \
+ (cd $(HOST_SUBDIR)/libcc1 && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
+ install-pdf) \
+ || exit 1
+
+@endif libcc1
+
+.PHONY: maybe-install-html-libcc1 install-html-libcc1
+maybe-install-html-libcc1:
+@if libcc1
+maybe-install-html-libcc1: install-html-libcc1
+
+install-html-libcc1: \
+ configure-libcc1 \
+ html-libcc1
+ @: $(MAKE); $(unstage)
+ @[ -f ./libcc1/Makefile ] || exit 0; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing install-html in libcc1"; \
+ (cd $(HOST_SUBDIR)/libcc1 && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
+ install-html) \
+ || exit 1
+
+@endif libcc1
+
+.PHONY: maybe-installcheck-libcc1 installcheck-libcc1
+maybe-installcheck-libcc1:
+@if libcc1
+maybe-installcheck-libcc1: installcheck-libcc1
+
+installcheck-libcc1: \
+ configure-libcc1
+ @: $(MAKE); $(unstage)
+ @[ -f ./libcc1/Makefile ] || exit 0; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing installcheck in libcc1"; \
+ (cd $(HOST_SUBDIR)/libcc1 && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
+ installcheck) \
+ || exit 1
+
+@endif libcc1
+
+.PHONY: maybe-mostlyclean-libcc1 mostlyclean-libcc1
+maybe-mostlyclean-libcc1:
+@if libcc1
+maybe-mostlyclean-libcc1: mostlyclean-libcc1
+
+mostlyclean-libcc1:
+ @: $(MAKE); $(unstage)
+ @[ -f ./libcc1/Makefile ] || exit 0; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing mostlyclean in libcc1"; \
+ (cd $(HOST_SUBDIR)/libcc1 && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
+ mostlyclean) \
+ || exit 1
+
+@endif libcc1
+
+.PHONY: maybe-clean-libcc1 clean-libcc1
+maybe-clean-libcc1:
+@if libcc1
+maybe-clean-libcc1: clean-libcc1
+
+clean-libcc1:
+ @: $(MAKE); $(unstage)
+ @[ -f ./libcc1/Makefile ] || exit 0; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing clean in libcc1"; \
+ (cd $(HOST_SUBDIR)/libcc1 && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
+ clean) \
+ || exit 1
+
+@endif libcc1
+
+.PHONY: maybe-distclean-libcc1 distclean-libcc1
+maybe-distclean-libcc1:
+@if libcc1
+maybe-distclean-libcc1: distclean-libcc1
+
+distclean-libcc1:
+ @: $(MAKE); $(unstage)
+ @[ -f ./libcc1/Makefile ] || exit 0; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing distclean in libcc1"; \
+ (cd $(HOST_SUBDIR)/libcc1 && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
+ distclean) \
+ || exit 1
+
+@endif libcc1
+
+.PHONY: maybe-maintainer-clean-libcc1 maintainer-clean-libcc1
+maybe-maintainer-clean-libcc1:
+@if libcc1
+maybe-maintainer-clean-libcc1: maintainer-clean-libcc1
+
+maintainer-clean-libcc1:
+ @: $(MAKE); $(unstage)
+ @[ -f ./libcc1/Makefile ] || exit 0; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing maintainer-clean in libcc1"; \
+ (cd $(HOST_SUBDIR)/libcc1 && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
+ maintainer-clean) \
+ || exit 1
+
+@endif libcc1
+
+
+
+.PHONY: configure-gotools maybe-configure-gotools
+maybe-configure-gotools:
+@if gcc-bootstrap
+configure-gotools: stage_current
+@endif gcc-bootstrap
+@if gotools
+maybe-configure-gotools: configure-gotools
+configure-gotools:
+ @: $(MAKE); $(unstage)
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ test ! -f $(HOST_SUBDIR)/gotools/Makefile || exit 0; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/gotools; \
+ $(HOST_EXPORTS) \
+ echo Configuring in $(HOST_SUBDIR)/gotools; \
+ cd "$(HOST_SUBDIR)/gotools" || exit 1; \
+ case $(srcdir) in \
+ /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+ *) topdir=`echo $(HOST_SUBDIR)/gotools/ | \
+ sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
+ esac; \
+ module_srcdir=gotools; \
+ $(SHELL) \
+ $$s/$$module_srcdir/configure \
+ --srcdir=$${topdir}/$$module_srcdir \
+ $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
+ --target=${target_alias} \
+ || exit 1
+@endif gotools
+
+
+
+
+
+.PHONY: all-gotools maybe-all-gotools
+maybe-all-gotools:
+@if gcc-bootstrap
+all-gotools: stage_current
+@endif gcc-bootstrap
+@if gotools
+TARGET-gotools=all
+maybe-all-gotools: all-gotools
+all-gotools: configure-gotools
+ @: $(MAKE); $(unstage)
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ (cd $(HOST_SUBDIR)/gotools && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS) $(STAGE1_FLAGS_TO_PASS) \
+ $(TARGET-gotools))
+@endif gotools
+
+
+
+
+.PHONY: check-gotools maybe-check-gotools
+maybe-check-gotools:
+@if gotools
+maybe-check-gotools: check-gotools
+
+check-gotools:
+ @: $(MAKE); $(unstage)
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ (cd $(HOST_SUBDIR)/gotools && \
+ $(MAKE) $(FLAGS_TO_PASS) check)
+
+@endif gotools
+
+.PHONY: install-gotools maybe-install-gotools
+maybe-install-gotools:
+@if gotools
+maybe-install-gotools: install-gotools
+
+install-gotools: installdirs
+ @: $(MAKE); $(unstage)
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ (cd $(HOST_SUBDIR)/gotools && \
+ $(MAKE) $(FLAGS_TO_PASS) install)
+
+@endif gotools
+
+.PHONY: install-strip-gotools maybe-install-strip-gotools
+maybe-install-strip-gotools:
+@if gotools
+maybe-install-strip-gotools: install-strip-gotools
+
+install-strip-gotools: installdirs
+ @: $(MAKE); $(unstage)
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ (cd $(HOST_SUBDIR)/gotools && \
+ $(MAKE) $(FLAGS_TO_PASS) install-strip)
+
+@endif gotools
+
+# Other targets (info, dvi, pdf, etc.)
+
+.PHONY: maybe-info-gotools info-gotools
+maybe-info-gotools:
+@if gotools
+maybe-info-gotools: info-gotools
+
+info-gotools: \
+ configure-gotools
+ @: $(MAKE); $(unstage)
+ @[ -f ./gotools/Makefile ] || exit 0; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing info in gotools"; \
+ (cd $(HOST_SUBDIR)/gotools && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
+ info) \
+ || exit 1
+
+@endif gotools
+
+.PHONY: maybe-dvi-gotools dvi-gotools
+maybe-dvi-gotools:
+@if gotools
+maybe-dvi-gotools: dvi-gotools
+
+dvi-gotools: \
+ configure-gotools
+ @: $(MAKE); $(unstage)
+ @[ -f ./gotools/Makefile ] || exit 0; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing dvi in gotools"; \
+ (cd $(HOST_SUBDIR)/gotools && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
+ dvi) \
+ || exit 1
+
+@endif gotools
+
+.PHONY: maybe-pdf-gotools pdf-gotools
+maybe-pdf-gotools:
+@if gotools
+maybe-pdf-gotools: pdf-gotools
+
+pdf-gotools: \
+ configure-gotools
+ @: $(MAKE); $(unstage)
+ @[ -f ./gotools/Makefile ] || exit 0; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing pdf in gotools"; \
+ (cd $(HOST_SUBDIR)/gotools && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
+ pdf) \
+ || exit 1
+
+@endif gotools
+
+.PHONY: maybe-html-gotools html-gotools
+maybe-html-gotools:
+@if gotools
+maybe-html-gotools: html-gotools
+
+html-gotools: \
+ configure-gotools
+ @: $(MAKE); $(unstage)
+ @[ -f ./gotools/Makefile ] || exit 0; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing html in gotools"; \
+ (cd $(HOST_SUBDIR)/gotools && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
+ html) \
+ || exit 1
+
+@endif gotools
+
+.PHONY: maybe-TAGS-gotools TAGS-gotools
+maybe-TAGS-gotools:
+@if gotools
+maybe-TAGS-gotools: TAGS-gotools
+
+TAGS-gotools: \
+ configure-gotools
+ @: $(MAKE); $(unstage)
+ @[ -f ./gotools/Makefile ] || exit 0; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing TAGS in gotools"; \
+ (cd $(HOST_SUBDIR)/gotools && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
+ TAGS) \
+ || exit 1
+
+@endif gotools
+
+.PHONY: maybe-install-info-gotools install-info-gotools
+maybe-install-info-gotools:
+@if gotools
+maybe-install-info-gotools: install-info-gotools
+
+install-info-gotools: \
+ configure-gotools \
+ info-gotools
+ @: $(MAKE); $(unstage)
+ @[ -f ./gotools/Makefile ] || exit 0; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing install-info in gotools"; \
+ (cd $(HOST_SUBDIR)/gotools && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
+ install-info) \
+ || exit 1
+
+@endif gotools
+
+.PHONY: maybe-install-pdf-gotools install-pdf-gotools
+maybe-install-pdf-gotools:
+@if gotools
+maybe-install-pdf-gotools: install-pdf-gotools
+
+install-pdf-gotools: \
+ configure-gotools \
+ pdf-gotools
+ @: $(MAKE); $(unstage)
+ @[ -f ./gotools/Makefile ] || exit 0; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing install-pdf in gotools"; \
+ (cd $(HOST_SUBDIR)/gotools && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
+ install-pdf) \
+ || exit 1
+
+@endif gotools
+
+.PHONY: maybe-install-html-gotools install-html-gotools
+maybe-install-html-gotools:
+@if gotools
+maybe-install-html-gotools: install-html-gotools
+
+install-html-gotools: \
+ configure-gotools \
+ html-gotools
+ @: $(MAKE); $(unstage)
+ @[ -f ./gotools/Makefile ] || exit 0; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing install-html in gotools"; \
+ (cd $(HOST_SUBDIR)/gotools && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
+ install-html) \
+ || exit 1
+
+@endif gotools
+
+.PHONY: maybe-installcheck-gotools installcheck-gotools
+maybe-installcheck-gotools:
+@if gotools
+maybe-installcheck-gotools: installcheck-gotools
+
+installcheck-gotools: \
+ configure-gotools
+ @: $(MAKE); $(unstage)
+ @[ -f ./gotools/Makefile ] || exit 0; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing installcheck in gotools"; \
+ (cd $(HOST_SUBDIR)/gotools && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
+ installcheck) \
+ || exit 1
+
+@endif gotools
+
+.PHONY: maybe-mostlyclean-gotools mostlyclean-gotools
+maybe-mostlyclean-gotools:
+@if gotools
+maybe-mostlyclean-gotools: mostlyclean-gotools
+
+mostlyclean-gotools:
+ @: $(MAKE); $(unstage)
+ @[ -f ./gotools/Makefile ] || exit 0; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing mostlyclean in gotools"; \
+ (cd $(HOST_SUBDIR)/gotools && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
+ mostlyclean) \
+ || exit 1
+
+@endif gotools
+
+.PHONY: maybe-clean-gotools clean-gotools
+maybe-clean-gotools:
+@if gotools
+maybe-clean-gotools: clean-gotools
+
+clean-gotools:
+ @: $(MAKE); $(unstage)
+ @[ -f ./gotools/Makefile ] || exit 0; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing clean in gotools"; \
+ (cd $(HOST_SUBDIR)/gotools && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
+ clean) \
+ || exit 1
+
+@endif gotools
+
+.PHONY: maybe-distclean-gotools distclean-gotools
+maybe-distclean-gotools:
+@if gotools
+maybe-distclean-gotools: distclean-gotools
+
+distclean-gotools:
+ @: $(MAKE); $(unstage)
+ @[ -f ./gotools/Makefile ] || exit 0; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing distclean in gotools"; \
+ (cd $(HOST_SUBDIR)/gotools && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
+ distclean) \
+ || exit 1
+
+@endif gotools
+
+.PHONY: maybe-maintainer-clean-gotools maintainer-clean-gotools
+maybe-maintainer-clean-gotools:
+@if gotools
+maybe-maintainer-clean-gotools: maintainer-clean-gotools
+
+maintainer-clean-gotools:
+ @: $(MAKE); $(unstage)
+ @[ -f ./gotools/Makefile ] || exit 0; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing maintainer-clean in gotools"; \
+ (cd $(HOST_SUBDIR)/gotools && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
+ maintainer-clean) \
+ || exit 1
+
+@endif gotools
+
+
+
# ---------------------------------------
# Modules which run on the target machine
# ---------------------------------------
@@ -30782,8 +32767,8 @@ configure-target-libstdc++-v3:
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
echo "Checking multilib configuration for libstdc++-v3..."; \
- $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libstdc++-v3 ; \
- $(CC_FOR_TARGET) --print-multi-lib > $(TARGET_SUBDIR)/libstdc++-v3/multilib.tmp 2> /dev/null ; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libstdc++-v3; \
+ $(CC_FOR_TARGET) --print-multi-lib > $(TARGET_SUBDIR)/libstdc++-v3/multilib.tmp 2> /dev/null; \
if test -r $(TARGET_SUBDIR)/libstdc++-v3/multilib.out; then \
if cmp -s $(TARGET_SUBDIR)/libstdc++-v3/multilib.tmp $(TARGET_SUBDIR)/libstdc++-v3/multilib.out; then \
rm -f $(TARGET_SUBDIR)/libstdc++-v3/multilib.tmp; \
@@ -30795,7 +32780,7 @@ configure-target-libstdc++-v3:
mv $(TARGET_SUBDIR)/libstdc++-v3/multilib.tmp $(TARGET_SUBDIR)/libstdc++-v3/multilib.out; \
fi; \
test ! -f $(TARGET_SUBDIR)/libstdc++-v3/Makefile || exit 0; \
- $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libstdc++-v3 ; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libstdc++-v3; \
$(RAW_CXX_TARGET_EXPORTS) \
echo Configuring in $(TARGET_SUBDIR)/libstdc++-v3; \
cd "$(TARGET_SUBDIR)/libstdc++-v3" || exit 1; \
@@ -30804,12 +32789,13 @@ configure-target-libstdc++-v3:
*) topdir=`echo $(TARGET_SUBDIR)/libstdc++-v3/ | \
sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
esac; \
- srcdiroption="--srcdir=$${topdir}/libstdc++-v3"; \
- libsrcdir="$$s/libstdc++-v3"; \
+ module_srcdir=libstdc++-v3; \
rm -f no-such-file || : ; \
- CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure \
+ CONFIG_SITE=no-such-file $(SHELL) \
+ $$s/$$module_srcdir/configure \
+ --srcdir=$${topdir}/$$module_srcdir \
$(TARGET_CONFIGARGS) --build=${build_alias} --host=${target_alias} \
- --target=${target_alias} $${srcdiroption} \
+ --target=${target_alias} \
|| exit 1
@endif target-libstdc++-v3
@@ -30826,7 +32812,7 @@ configure-stage1-target-libstdc++-v3:
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
TFLAGS="$(STAGE1_TFLAGS)"; \
echo "Checking multilib configuration for libstdc++-v3..."; \
- $(CC_FOR_TARGET) --print-multi-lib > $(TARGET_SUBDIR)/libstdc++-v3/multilib.tmp 2> /dev/null ; \
+ $(CC_FOR_TARGET) --print-multi-lib > $(TARGET_SUBDIR)/libstdc++-v3/multilib.tmp 2> /dev/null; \
if test -r $(TARGET_SUBDIR)/libstdc++-v3/multilib.out; then \
if cmp -s $(TARGET_SUBDIR)/libstdc++-v3/multilib.tmp $(TARGET_SUBDIR)/libstdc++-v3/multilib.out; then \
rm -f $(TARGET_SUBDIR)/libstdc++-v3/multilib.tmp; \
@@ -30842,19 +32828,20 @@ configure-stage1-target-libstdc++-v3:
CFLAGS="$(CFLAGS_FOR_TARGET)"; export CFLAGS; \
CXXFLAGS="$(CXXFLAGS_FOR_TARGET)"; export CXXFLAGS; \
LIBCFLAGS="$(LIBCFLAGS_FOR_TARGET)"; export LIBCFLAGS; \
- echo Configuring stage 1 in $(TARGET_SUBDIR)/libstdc++-v3 ; \
- $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libstdc++-v3 ; \
+ echo Configuring stage 1 in $(TARGET_SUBDIR)/libstdc++-v3; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libstdc++-v3; \
cd $(TARGET_SUBDIR)/libstdc++-v3 || exit 1; \
case $(srcdir) in \
/* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
*) topdir=`echo $(TARGET_SUBDIR)/libstdc++-v3/ | \
sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
esac; \
- srcdiroption="--srcdir=$${topdir}/libstdc++-v3"; \
- libsrcdir="$$s/libstdc++-v3"; \
- $(SHELL) $${libsrcdir}/configure \
+ module_srcdir=libstdc++-v3; \
+ $(SHELL) $$s/$$module_srcdir/configure \
+ --srcdir=$${topdir}/$$module_srcdir \
$(TARGET_CONFIGARGS) --build=${build_alias} --host=${target_alias} \
- --target=${target_alias} $${srcdiroption} \
+ --target=${target_alias} \
+ \
$(STAGE1_CONFIGURE_FLAGS)
@endif target-libstdc++-v3-bootstrap
@@ -30869,7 +32856,7 @@ configure-stage2-target-libstdc++-v3:
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
TFLAGS="$(STAGE2_TFLAGS)"; \
echo "Checking multilib configuration for libstdc++-v3..."; \
- $(CC_FOR_TARGET) --print-multi-lib > $(TARGET_SUBDIR)/libstdc++-v3/multilib.tmp 2> /dev/null ; \
+ $(CC_FOR_TARGET) --print-multi-lib > $(TARGET_SUBDIR)/libstdc++-v3/multilib.tmp 2> /dev/null; \
if test -r $(TARGET_SUBDIR)/libstdc++-v3/multilib.out; then \
if cmp -s $(TARGET_SUBDIR)/libstdc++-v3/multilib.tmp $(TARGET_SUBDIR)/libstdc++-v3/multilib.out; then \
rm -f $(TARGET_SUBDIR)/libstdc++-v3/multilib.tmp; \
@@ -30886,19 +32873,19 @@ configure-stage2-target-libstdc++-v3:
CFLAGS="$(CFLAGS_FOR_TARGET)"; export CFLAGS; \
CXXFLAGS="$(CXXFLAGS_FOR_TARGET)"; export CXXFLAGS; \
LIBCFLAGS="$(LIBCFLAGS_FOR_TARGET)"; export LIBCFLAGS; \
- echo Configuring stage 2 in $(TARGET_SUBDIR)/libstdc++-v3 ; \
- $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libstdc++-v3 ; \
+ echo Configuring stage 2 in $(TARGET_SUBDIR)/libstdc++-v3; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libstdc++-v3; \
cd $(TARGET_SUBDIR)/libstdc++-v3 || exit 1; \
case $(srcdir) in \
/* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
*) topdir=`echo $(TARGET_SUBDIR)/libstdc++-v3/ | \
sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
esac; \
- srcdiroption="--srcdir=$${topdir}/libstdc++-v3"; \
- libsrcdir="$$s/libstdc++-v3"; \
- $(SHELL) $${libsrcdir}/configure \
+ module_srcdir=libstdc++-v3; \
+ $(SHELL) $$s/$$module_srcdir/configure \
+ --srcdir=$${topdir}/$$module_srcdir \
$(TARGET_CONFIGARGS) --build=${build_alias} --host=${target_alias} \
- --target=${target_alias} $${srcdiroption} \
+ --target=${target_alias} \
--with-build-libsubdir=$(HOST_SUBDIR) \
$(STAGE2_CONFIGURE_FLAGS)
@endif target-libstdc++-v3-bootstrap
@@ -30914,7 +32901,7 @@ configure-stage3-target-libstdc++-v3:
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
TFLAGS="$(STAGE3_TFLAGS)"; \
echo "Checking multilib configuration for libstdc++-v3..."; \
- $(CC_FOR_TARGET) --print-multi-lib > $(TARGET_SUBDIR)/libstdc++-v3/multilib.tmp 2> /dev/null ; \
+ $(CC_FOR_TARGET) --print-multi-lib > $(TARGET_SUBDIR)/libstdc++-v3/multilib.tmp 2> /dev/null; \
if test -r $(TARGET_SUBDIR)/libstdc++-v3/multilib.out; then \
if cmp -s $(TARGET_SUBDIR)/libstdc++-v3/multilib.tmp $(TARGET_SUBDIR)/libstdc++-v3/multilib.out; then \
rm -f $(TARGET_SUBDIR)/libstdc++-v3/multilib.tmp; \
@@ -30931,19 +32918,19 @@ configure-stage3-target-libstdc++-v3:
CFLAGS="$(CFLAGS_FOR_TARGET)"; export CFLAGS; \
CXXFLAGS="$(CXXFLAGS_FOR_TARGET)"; export CXXFLAGS; \
LIBCFLAGS="$(LIBCFLAGS_FOR_TARGET)"; export LIBCFLAGS; \
- echo Configuring stage 3 in $(TARGET_SUBDIR)/libstdc++-v3 ; \
- $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libstdc++-v3 ; \
+ echo Configuring stage 3 in $(TARGET_SUBDIR)/libstdc++-v3; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libstdc++-v3; \
cd $(TARGET_SUBDIR)/libstdc++-v3 || exit 1; \
case $(srcdir) in \
/* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
*) topdir=`echo $(TARGET_SUBDIR)/libstdc++-v3/ | \
sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
esac; \
- srcdiroption="--srcdir=$${topdir}/libstdc++-v3"; \
- libsrcdir="$$s/libstdc++-v3"; \
- $(SHELL) $${libsrcdir}/configure \
+ module_srcdir=libstdc++-v3; \
+ $(SHELL) $$s/$$module_srcdir/configure \
+ --srcdir=$${topdir}/$$module_srcdir \
$(TARGET_CONFIGARGS) --build=${build_alias} --host=${target_alias} \
- --target=${target_alias} $${srcdiroption} \
+ --target=${target_alias} \
--with-build-libsubdir=$(HOST_SUBDIR) \
$(STAGE3_CONFIGURE_FLAGS)
@endif target-libstdc++-v3-bootstrap
@@ -30959,7 +32946,7 @@ configure-stage4-target-libstdc++-v3:
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
TFLAGS="$(STAGE4_TFLAGS)"; \
echo "Checking multilib configuration for libstdc++-v3..."; \
- $(CC_FOR_TARGET) --print-multi-lib > $(TARGET_SUBDIR)/libstdc++-v3/multilib.tmp 2> /dev/null ; \
+ $(CC_FOR_TARGET) --print-multi-lib > $(TARGET_SUBDIR)/libstdc++-v3/multilib.tmp 2> /dev/null; \
if test -r $(TARGET_SUBDIR)/libstdc++-v3/multilib.out; then \
if cmp -s $(TARGET_SUBDIR)/libstdc++-v3/multilib.tmp $(TARGET_SUBDIR)/libstdc++-v3/multilib.out; then \
rm -f $(TARGET_SUBDIR)/libstdc++-v3/multilib.tmp; \
@@ -30976,19 +32963,19 @@ configure-stage4-target-libstdc++-v3:
CFLAGS="$(CFLAGS_FOR_TARGET)"; export CFLAGS; \
CXXFLAGS="$(CXXFLAGS_FOR_TARGET)"; export CXXFLAGS; \
LIBCFLAGS="$(LIBCFLAGS_FOR_TARGET)"; export LIBCFLAGS; \
- echo Configuring stage 4 in $(TARGET_SUBDIR)/libstdc++-v3 ; \
- $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libstdc++-v3 ; \
+ echo Configuring stage 4 in $(TARGET_SUBDIR)/libstdc++-v3; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libstdc++-v3; \
cd $(TARGET_SUBDIR)/libstdc++-v3 || exit 1; \
case $(srcdir) in \
/* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
*) topdir=`echo $(TARGET_SUBDIR)/libstdc++-v3/ | \
sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
esac; \
- srcdiroption="--srcdir=$${topdir}/libstdc++-v3"; \
- libsrcdir="$$s/libstdc++-v3"; \
- $(SHELL) $${libsrcdir}/configure \
+ module_srcdir=libstdc++-v3; \
+ $(SHELL) $$s/$$module_srcdir/configure \
+ --srcdir=$${topdir}/$$module_srcdir \
$(TARGET_CONFIGARGS) --build=${build_alias} --host=${target_alias} \
- --target=${target_alias} $${srcdiroption} \
+ --target=${target_alias} \
--with-build-libsubdir=$(HOST_SUBDIR) \
$(STAGE4_CONFIGURE_FLAGS)
@endif target-libstdc++-v3-bootstrap
@@ -31004,7 +32991,7 @@ configure-stageprofile-target-libstdc++-v3:
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
TFLAGS="$(STAGEprofile_TFLAGS)"; \
echo "Checking multilib configuration for libstdc++-v3..."; \
- $(CC_FOR_TARGET) --print-multi-lib > $(TARGET_SUBDIR)/libstdc++-v3/multilib.tmp 2> /dev/null ; \
+ $(CC_FOR_TARGET) --print-multi-lib > $(TARGET_SUBDIR)/libstdc++-v3/multilib.tmp 2> /dev/null; \
if test -r $(TARGET_SUBDIR)/libstdc++-v3/multilib.out; then \
if cmp -s $(TARGET_SUBDIR)/libstdc++-v3/multilib.tmp $(TARGET_SUBDIR)/libstdc++-v3/multilib.out; then \
rm -f $(TARGET_SUBDIR)/libstdc++-v3/multilib.tmp; \
@@ -31021,19 +33008,19 @@ configure-stageprofile-target-libstdc++-v3:
CFLAGS="$(CFLAGS_FOR_TARGET)"; export CFLAGS; \
CXXFLAGS="$(CXXFLAGS_FOR_TARGET)"; export CXXFLAGS; \
LIBCFLAGS="$(LIBCFLAGS_FOR_TARGET)"; export LIBCFLAGS; \
- echo Configuring stage profile in $(TARGET_SUBDIR)/libstdc++-v3 ; \
- $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libstdc++-v3 ; \
+ echo Configuring stage profile in $(TARGET_SUBDIR)/libstdc++-v3; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libstdc++-v3; \
cd $(TARGET_SUBDIR)/libstdc++-v3 || exit 1; \
case $(srcdir) in \
/* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
*) topdir=`echo $(TARGET_SUBDIR)/libstdc++-v3/ | \
sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
esac; \
- srcdiroption="--srcdir=$${topdir}/libstdc++-v3"; \
- libsrcdir="$$s/libstdc++-v3"; \
- $(SHELL) $${libsrcdir}/configure \
+ module_srcdir=libstdc++-v3; \
+ $(SHELL) $$s/$$module_srcdir/configure \
+ --srcdir=$${topdir}/$$module_srcdir \
$(TARGET_CONFIGARGS) --build=${build_alias} --host=${target_alias} \
- --target=${target_alias} $${srcdiroption} \
+ --target=${target_alias} \
--with-build-libsubdir=$(HOST_SUBDIR) \
$(STAGEprofile_CONFIGURE_FLAGS)
@endif target-libstdc++-v3-bootstrap
@@ -31049,7 +33036,7 @@ configure-stagefeedback-target-libstdc++-v3:
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
TFLAGS="$(STAGEfeedback_TFLAGS)"; \
echo "Checking multilib configuration for libstdc++-v3..."; \
- $(CC_FOR_TARGET) --print-multi-lib > $(TARGET_SUBDIR)/libstdc++-v3/multilib.tmp 2> /dev/null ; \
+ $(CC_FOR_TARGET) --print-multi-lib > $(TARGET_SUBDIR)/libstdc++-v3/multilib.tmp 2> /dev/null; \
if test -r $(TARGET_SUBDIR)/libstdc++-v3/multilib.out; then \
if cmp -s $(TARGET_SUBDIR)/libstdc++-v3/multilib.tmp $(TARGET_SUBDIR)/libstdc++-v3/multilib.out; then \
rm -f $(TARGET_SUBDIR)/libstdc++-v3/multilib.tmp; \
@@ -31066,19 +33053,19 @@ configure-stagefeedback-target-libstdc++-v3:
CFLAGS="$(CFLAGS_FOR_TARGET)"; export CFLAGS; \
CXXFLAGS="$(CXXFLAGS_FOR_TARGET)"; export CXXFLAGS; \
LIBCFLAGS="$(LIBCFLAGS_FOR_TARGET)"; export LIBCFLAGS; \
- echo Configuring stage feedback in $(TARGET_SUBDIR)/libstdc++-v3 ; \
- $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libstdc++-v3 ; \
+ echo Configuring stage feedback in $(TARGET_SUBDIR)/libstdc++-v3; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libstdc++-v3; \
cd $(TARGET_SUBDIR)/libstdc++-v3 || exit 1; \
case $(srcdir) in \
/* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
*) topdir=`echo $(TARGET_SUBDIR)/libstdc++-v3/ | \
sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
esac; \
- srcdiroption="--srcdir=$${topdir}/libstdc++-v3"; \
- libsrcdir="$$s/libstdc++-v3"; \
- $(SHELL) $${libsrcdir}/configure \
+ module_srcdir=libstdc++-v3; \
+ $(SHELL) $$s/$$module_srcdir/configure \
+ --srcdir=$${topdir}/$$module_srcdir \
$(TARGET_CONFIGARGS) --build=${build_alias} --host=${target_alias} \
- --target=${target_alias} $${srcdiroption} \
+ --target=${target_alias} \
--with-build-libsubdir=$(HOST_SUBDIR) \
$(STAGEfeedback_CONFIGURE_FLAGS)
@endif target-libstdc++-v3-bootstrap
@@ -31412,11 +33399,11 @@ maybe-info-target-libstdc++-v3: info-target-libstdc++-v3
info-target-libstdc++-v3: \
configure-target-libstdc++-v3
@: $(MAKE); $(unstage)
- @[ -f $(TARGET_SUBDIR)/libstdc++-v3/Makefile ] || exit 0 ; \
+ @[ -f $(TARGET_SUBDIR)/libstdc++-v3/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(RAW_CXX_TARGET_EXPORTS) \
- echo "Doing info in $(TARGET_SUBDIR)/libstdc++-v3" ; \
+ echo "Doing info in $(TARGET_SUBDIR)/libstdc++-v3"; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
@@ -31438,11 +33425,11 @@ maybe-dvi-target-libstdc++-v3: dvi-target-libstdc++-v3
dvi-target-libstdc++-v3: \
configure-target-libstdc++-v3
@: $(MAKE); $(unstage)
- @[ -f $(TARGET_SUBDIR)/libstdc++-v3/Makefile ] || exit 0 ; \
+ @[ -f $(TARGET_SUBDIR)/libstdc++-v3/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(RAW_CXX_TARGET_EXPORTS) \
- echo "Doing dvi in $(TARGET_SUBDIR)/libstdc++-v3" ; \
+ echo "Doing dvi in $(TARGET_SUBDIR)/libstdc++-v3"; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
@@ -31464,11 +33451,11 @@ maybe-pdf-target-libstdc++-v3: pdf-target-libstdc++-v3
pdf-target-libstdc++-v3: \
configure-target-libstdc++-v3
@: $(MAKE); $(unstage)
- @[ -f $(TARGET_SUBDIR)/libstdc++-v3/Makefile ] || exit 0 ; \
+ @[ -f $(TARGET_SUBDIR)/libstdc++-v3/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(RAW_CXX_TARGET_EXPORTS) \
- echo "Doing pdf in $(TARGET_SUBDIR)/libstdc++-v3" ; \
+ echo "Doing pdf in $(TARGET_SUBDIR)/libstdc++-v3"; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
@@ -31490,11 +33477,11 @@ maybe-html-target-libstdc++-v3: html-target-libstdc++-v3
html-target-libstdc++-v3: \
configure-target-libstdc++-v3
@: $(MAKE); $(unstage)
- @[ -f $(TARGET_SUBDIR)/libstdc++-v3/Makefile ] || exit 0 ; \
+ @[ -f $(TARGET_SUBDIR)/libstdc++-v3/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(RAW_CXX_TARGET_EXPORTS) \
- echo "Doing html in $(TARGET_SUBDIR)/libstdc++-v3" ; \
+ echo "Doing html in $(TARGET_SUBDIR)/libstdc++-v3"; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
@@ -31516,11 +33503,11 @@ maybe-TAGS-target-libstdc++-v3: TAGS-target-libstdc++-v3
TAGS-target-libstdc++-v3: \
configure-target-libstdc++-v3
@: $(MAKE); $(unstage)
- @[ -f $(TARGET_SUBDIR)/libstdc++-v3/Makefile ] || exit 0 ; \
+ @[ -f $(TARGET_SUBDIR)/libstdc++-v3/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(RAW_CXX_TARGET_EXPORTS) \
- echo "Doing TAGS in $(TARGET_SUBDIR)/libstdc++-v3" ; \
+ echo "Doing TAGS in $(TARGET_SUBDIR)/libstdc++-v3"; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
@@ -31543,11 +33530,11 @@ install-info-target-libstdc++-v3: \
configure-target-libstdc++-v3 \
info-target-libstdc++-v3
@: $(MAKE); $(unstage)
- @[ -f $(TARGET_SUBDIR)/libstdc++-v3/Makefile ] || exit 0 ; \
+ @[ -f $(TARGET_SUBDIR)/libstdc++-v3/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(RAW_CXX_TARGET_EXPORTS) \
- echo "Doing install-info in $(TARGET_SUBDIR)/libstdc++-v3" ; \
+ echo "Doing install-info in $(TARGET_SUBDIR)/libstdc++-v3"; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
@@ -31570,11 +33557,11 @@ install-pdf-target-libstdc++-v3: \
configure-target-libstdc++-v3 \
pdf-target-libstdc++-v3
@: $(MAKE); $(unstage)
- @[ -f $(TARGET_SUBDIR)/libstdc++-v3/Makefile ] || exit 0 ; \
+ @[ -f $(TARGET_SUBDIR)/libstdc++-v3/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(RAW_CXX_TARGET_EXPORTS) \
- echo "Doing install-pdf in $(TARGET_SUBDIR)/libstdc++-v3" ; \
+ echo "Doing install-pdf in $(TARGET_SUBDIR)/libstdc++-v3"; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
@@ -31597,11 +33584,11 @@ install-html-target-libstdc++-v3: \
configure-target-libstdc++-v3 \
html-target-libstdc++-v3
@: $(MAKE); $(unstage)
- @[ -f $(TARGET_SUBDIR)/libstdc++-v3/Makefile ] || exit 0 ; \
+ @[ -f $(TARGET_SUBDIR)/libstdc++-v3/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(RAW_CXX_TARGET_EXPORTS) \
- echo "Doing install-html in $(TARGET_SUBDIR)/libstdc++-v3" ; \
+ echo "Doing install-html in $(TARGET_SUBDIR)/libstdc++-v3"; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
@@ -31623,11 +33610,11 @@ maybe-installcheck-target-libstdc++-v3: installcheck-target-libstdc++-v3
installcheck-target-libstdc++-v3: \
configure-target-libstdc++-v3
@: $(MAKE); $(unstage)
- @[ -f $(TARGET_SUBDIR)/libstdc++-v3/Makefile ] || exit 0 ; \
+ @[ -f $(TARGET_SUBDIR)/libstdc++-v3/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(RAW_CXX_TARGET_EXPORTS) \
- echo "Doing installcheck in $(TARGET_SUBDIR)/libstdc++-v3" ; \
+ echo "Doing installcheck in $(TARGET_SUBDIR)/libstdc++-v3"; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
@@ -31648,11 +33635,11 @@ maybe-mostlyclean-target-libstdc++-v3: mostlyclean-target-libstdc++-v3
mostlyclean-target-libstdc++-v3:
@: $(MAKE); $(unstage)
- @[ -f $(TARGET_SUBDIR)/libstdc++-v3/Makefile ] || exit 0 ; \
+ @[ -f $(TARGET_SUBDIR)/libstdc++-v3/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(RAW_CXX_TARGET_EXPORTS) \
- echo "Doing mostlyclean in $(TARGET_SUBDIR)/libstdc++-v3" ; \
+ echo "Doing mostlyclean in $(TARGET_SUBDIR)/libstdc++-v3"; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
@@ -31673,11 +33660,11 @@ maybe-clean-target-libstdc++-v3: clean-target-libstdc++-v3
clean-target-libstdc++-v3:
@: $(MAKE); $(unstage)
- @[ -f $(TARGET_SUBDIR)/libstdc++-v3/Makefile ] || exit 0 ; \
+ @[ -f $(TARGET_SUBDIR)/libstdc++-v3/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(RAW_CXX_TARGET_EXPORTS) \
- echo "Doing clean in $(TARGET_SUBDIR)/libstdc++-v3" ; \
+ echo "Doing clean in $(TARGET_SUBDIR)/libstdc++-v3"; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
@@ -31698,11 +33685,11 @@ maybe-distclean-target-libstdc++-v3: distclean-target-libstdc++-v3
distclean-target-libstdc++-v3:
@: $(MAKE); $(unstage)
- @[ -f $(TARGET_SUBDIR)/libstdc++-v3/Makefile ] || exit 0 ; \
+ @[ -f $(TARGET_SUBDIR)/libstdc++-v3/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(RAW_CXX_TARGET_EXPORTS) \
- echo "Doing distclean in $(TARGET_SUBDIR)/libstdc++-v3" ; \
+ echo "Doing distclean in $(TARGET_SUBDIR)/libstdc++-v3"; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
@@ -31723,11 +33710,11 @@ maybe-maintainer-clean-target-libstdc++-v3: maintainer-clean-target-libstdc++-v3
maintainer-clean-target-libstdc++-v3:
@: $(MAKE); $(unstage)
- @[ -f $(TARGET_SUBDIR)/libstdc++-v3/Makefile ] || exit 0 ; \
+ @[ -f $(TARGET_SUBDIR)/libstdc++-v3/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(RAW_CXX_TARGET_EXPORTS) \
- echo "Doing maintainer-clean in $(TARGET_SUBDIR)/libstdc++-v3" ; \
+ echo "Doing maintainer-clean in $(TARGET_SUBDIR)/libstdc++-v3"; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
@@ -31745,463 +33732,6 @@ maintainer-clean-target-libstdc++-v3:
-.PHONY: configure-target-libmudflap maybe-configure-target-libmudflap
-maybe-configure-target-libmudflap:
-@if gcc-bootstrap
-configure-target-libmudflap: stage_current
-@endif gcc-bootstrap
-@if target-libmudflap
-maybe-configure-target-libmudflap: configure-target-libmudflap
-configure-target-libmudflap:
- @: $(MAKE); $(unstage)
- @r=`${PWD_COMMAND}`; export r; \
- s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- echo "Checking multilib configuration for libmudflap..."; \
- $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libmudflap ; \
- $(CC_FOR_TARGET) --print-multi-lib > $(TARGET_SUBDIR)/libmudflap/multilib.tmp 2> /dev/null ; \
- if test -r $(TARGET_SUBDIR)/libmudflap/multilib.out; then \
- if cmp -s $(TARGET_SUBDIR)/libmudflap/multilib.tmp $(TARGET_SUBDIR)/libmudflap/multilib.out; then \
- rm -f $(TARGET_SUBDIR)/libmudflap/multilib.tmp; \
- else \
- rm -f $(TARGET_SUBDIR)/libmudflap/Makefile; \
- mv $(TARGET_SUBDIR)/libmudflap/multilib.tmp $(TARGET_SUBDIR)/libmudflap/multilib.out; \
- fi; \
- else \
- mv $(TARGET_SUBDIR)/libmudflap/multilib.tmp $(TARGET_SUBDIR)/libmudflap/multilib.out; \
- fi; \
- test ! -f $(TARGET_SUBDIR)/libmudflap/Makefile || exit 0; \
- $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libmudflap ; \
- $(NORMAL_TARGET_EXPORTS) \
- echo Configuring in $(TARGET_SUBDIR)/libmudflap; \
- cd "$(TARGET_SUBDIR)/libmudflap" || exit 1; \
- case $(srcdir) in \
- /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
- *) topdir=`echo $(TARGET_SUBDIR)/libmudflap/ | \
- sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
- esac; \
- srcdiroption="--srcdir=$${topdir}/libmudflap"; \
- libsrcdir="$$s/libmudflap"; \
- rm -f no-such-file || : ; \
- CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure \
- $(TARGET_CONFIGARGS) --build=${build_alias} --host=${target_alias} \
- --target=${target_alias} $${srcdiroption} \
- || exit 1
-@endif target-libmudflap
-
-
-
-
-
-.PHONY: all-target-libmudflap maybe-all-target-libmudflap
-maybe-all-target-libmudflap:
-@if gcc-bootstrap
-all-target-libmudflap: stage_current
-@endif gcc-bootstrap
-@if target-libmudflap
-TARGET-target-libmudflap=all
-maybe-all-target-libmudflap: all-target-libmudflap
-all-target-libmudflap: configure-target-libmudflap
- @: $(MAKE); $(unstage)
- @r=`${PWD_COMMAND}`; export r; \
- s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(NORMAL_TARGET_EXPORTS) \
- (cd $(TARGET_SUBDIR)/libmudflap && \
- $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_TARGET_FLAGS) \
- $(TARGET-target-libmudflap))
-@endif target-libmudflap
-
-
-
-
-
-.PHONY: check-target-libmudflap maybe-check-target-libmudflap
-maybe-check-target-libmudflap:
-@if target-libmudflap
-maybe-check-target-libmudflap: check-target-libmudflap
-
-check-target-libmudflap:
- @: $(MAKE); $(unstage)
- @r=`${PWD_COMMAND}`; export r; \
- s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(NORMAL_TARGET_EXPORTS) \
- (cd $(TARGET_SUBDIR)/libmudflap && \
- $(MAKE) $(TARGET_FLAGS_TO_PASS) check)
-
-@endif target-libmudflap
-
-.PHONY: install-target-libmudflap maybe-install-target-libmudflap
-maybe-install-target-libmudflap:
-@if target-libmudflap
-maybe-install-target-libmudflap: install-target-libmudflap
-
-install-target-libmudflap: installdirs
- @: $(MAKE); $(unstage)
- @r=`${PWD_COMMAND}`; export r; \
- s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(NORMAL_TARGET_EXPORTS) \
- (cd $(TARGET_SUBDIR)/libmudflap && \
- $(MAKE) $(TARGET_FLAGS_TO_PASS) install)
-
-@endif target-libmudflap
-
-.PHONY: install-strip-target-libmudflap maybe-install-strip-target-libmudflap
-maybe-install-strip-target-libmudflap:
-@if target-libmudflap
-maybe-install-strip-target-libmudflap: install-strip-target-libmudflap
-
-install-strip-target-libmudflap: installdirs
- @: $(MAKE); $(unstage)
- @r=`${PWD_COMMAND}`; export r; \
- s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(NORMAL_TARGET_EXPORTS) \
- (cd $(TARGET_SUBDIR)/libmudflap && \
- $(MAKE) $(TARGET_FLAGS_TO_PASS) install-strip)
-
-@endif target-libmudflap
-
-# Other targets (info, dvi, pdf, etc.)
-
-.PHONY: maybe-info-target-libmudflap info-target-libmudflap
-maybe-info-target-libmudflap:
-@if target-libmudflap
-maybe-info-target-libmudflap: info-target-libmudflap
-
-info-target-libmudflap: \
- configure-target-libmudflap
- @: $(MAKE); $(unstage)
- @[ -f $(TARGET_SUBDIR)/libmudflap/Makefile ] || exit 0 ; \
- r=`${PWD_COMMAND}`; export r; \
- s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(NORMAL_TARGET_EXPORTS) \
- echo "Doing info in $(TARGET_SUBDIR)/libmudflap" ; \
- for flag in $(EXTRA_TARGET_FLAGS); do \
- eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
- done; \
- (cd $(TARGET_SUBDIR)/libmudflap && \
- $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
- "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
- "RANLIB=$${RANLIB}" \
- "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
- info) \
- || exit 1
-
-@endif target-libmudflap
-
-.PHONY: maybe-dvi-target-libmudflap dvi-target-libmudflap
-maybe-dvi-target-libmudflap:
-@if target-libmudflap
-maybe-dvi-target-libmudflap: dvi-target-libmudflap
-
-dvi-target-libmudflap: \
- configure-target-libmudflap
- @: $(MAKE); $(unstage)
- @[ -f $(TARGET_SUBDIR)/libmudflap/Makefile ] || exit 0 ; \
- r=`${PWD_COMMAND}`; export r; \
- s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(NORMAL_TARGET_EXPORTS) \
- echo "Doing dvi in $(TARGET_SUBDIR)/libmudflap" ; \
- for flag in $(EXTRA_TARGET_FLAGS); do \
- eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
- done; \
- (cd $(TARGET_SUBDIR)/libmudflap && \
- $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
- "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
- "RANLIB=$${RANLIB}" \
- "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
- dvi) \
- || exit 1
-
-@endif target-libmudflap
-
-.PHONY: maybe-pdf-target-libmudflap pdf-target-libmudflap
-maybe-pdf-target-libmudflap:
-@if target-libmudflap
-maybe-pdf-target-libmudflap: pdf-target-libmudflap
-
-pdf-target-libmudflap: \
- configure-target-libmudflap
- @: $(MAKE); $(unstage)
- @[ -f $(TARGET_SUBDIR)/libmudflap/Makefile ] || exit 0 ; \
- r=`${PWD_COMMAND}`; export r; \
- s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(NORMAL_TARGET_EXPORTS) \
- echo "Doing pdf in $(TARGET_SUBDIR)/libmudflap" ; \
- for flag in $(EXTRA_TARGET_FLAGS); do \
- eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
- done; \
- (cd $(TARGET_SUBDIR)/libmudflap && \
- $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
- "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
- "RANLIB=$${RANLIB}" \
- "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
- pdf) \
- || exit 1
-
-@endif target-libmudflap
-
-.PHONY: maybe-html-target-libmudflap html-target-libmudflap
-maybe-html-target-libmudflap:
-@if target-libmudflap
-maybe-html-target-libmudflap: html-target-libmudflap
-
-html-target-libmudflap: \
- configure-target-libmudflap
- @: $(MAKE); $(unstage)
- @[ -f $(TARGET_SUBDIR)/libmudflap/Makefile ] || exit 0 ; \
- r=`${PWD_COMMAND}`; export r; \
- s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(NORMAL_TARGET_EXPORTS) \
- echo "Doing html in $(TARGET_SUBDIR)/libmudflap" ; \
- for flag in $(EXTRA_TARGET_FLAGS); do \
- eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
- done; \
- (cd $(TARGET_SUBDIR)/libmudflap && \
- $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
- "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
- "RANLIB=$${RANLIB}" \
- "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
- html) \
- || exit 1
-
-@endif target-libmudflap
-
-.PHONY: maybe-TAGS-target-libmudflap TAGS-target-libmudflap
-maybe-TAGS-target-libmudflap:
-@if target-libmudflap
-maybe-TAGS-target-libmudflap: TAGS-target-libmudflap
-
-TAGS-target-libmudflap: \
- configure-target-libmudflap
- @: $(MAKE); $(unstage)
- @[ -f $(TARGET_SUBDIR)/libmudflap/Makefile ] || exit 0 ; \
- r=`${PWD_COMMAND}`; export r; \
- s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(NORMAL_TARGET_EXPORTS) \
- echo "Doing TAGS in $(TARGET_SUBDIR)/libmudflap" ; \
- for flag in $(EXTRA_TARGET_FLAGS); do \
- eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
- done; \
- (cd $(TARGET_SUBDIR)/libmudflap && \
- $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
- "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
- "RANLIB=$${RANLIB}" \
- "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
- TAGS) \
- || exit 1
-
-@endif target-libmudflap
-
-.PHONY: maybe-install-info-target-libmudflap install-info-target-libmudflap
-maybe-install-info-target-libmudflap:
-@if target-libmudflap
-maybe-install-info-target-libmudflap: install-info-target-libmudflap
-
-install-info-target-libmudflap: \
- configure-target-libmudflap \
- info-target-libmudflap
- @: $(MAKE); $(unstage)
- @[ -f $(TARGET_SUBDIR)/libmudflap/Makefile ] || exit 0 ; \
- r=`${PWD_COMMAND}`; export r; \
- s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(NORMAL_TARGET_EXPORTS) \
- echo "Doing install-info in $(TARGET_SUBDIR)/libmudflap" ; \
- for flag in $(EXTRA_TARGET_FLAGS); do \
- eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
- done; \
- (cd $(TARGET_SUBDIR)/libmudflap && \
- $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
- "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
- "RANLIB=$${RANLIB}" \
- "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
- install-info) \
- || exit 1
-
-@endif target-libmudflap
-
-.PHONY: maybe-install-pdf-target-libmudflap install-pdf-target-libmudflap
-maybe-install-pdf-target-libmudflap:
-@if target-libmudflap
-maybe-install-pdf-target-libmudflap: install-pdf-target-libmudflap
-
-install-pdf-target-libmudflap: \
- configure-target-libmudflap \
- pdf-target-libmudflap
- @: $(MAKE); $(unstage)
- @[ -f $(TARGET_SUBDIR)/libmudflap/Makefile ] || exit 0 ; \
- r=`${PWD_COMMAND}`; export r; \
- s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(NORMAL_TARGET_EXPORTS) \
- echo "Doing install-pdf in $(TARGET_SUBDIR)/libmudflap" ; \
- for flag in $(EXTRA_TARGET_FLAGS); do \
- eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
- done; \
- (cd $(TARGET_SUBDIR)/libmudflap && \
- $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
- "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
- "RANLIB=$${RANLIB}" \
- "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
- install-pdf) \
- || exit 1
-
-@endif target-libmudflap
-
-.PHONY: maybe-install-html-target-libmudflap install-html-target-libmudflap
-maybe-install-html-target-libmudflap:
-@if target-libmudflap
-maybe-install-html-target-libmudflap: install-html-target-libmudflap
-
-install-html-target-libmudflap: \
- configure-target-libmudflap \
- html-target-libmudflap
- @: $(MAKE); $(unstage)
- @[ -f $(TARGET_SUBDIR)/libmudflap/Makefile ] || exit 0 ; \
- r=`${PWD_COMMAND}`; export r; \
- s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(NORMAL_TARGET_EXPORTS) \
- echo "Doing install-html in $(TARGET_SUBDIR)/libmudflap" ; \
- for flag in $(EXTRA_TARGET_FLAGS); do \
- eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
- done; \
- (cd $(TARGET_SUBDIR)/libmudflap && \
- $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
- "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
- "RANLIB=$${RANLIB}" \
- "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
- install-html) \
- || exit 1
-
-@endif target-libmudflap
-
-.PHONY: maybe-installcheck-target-libmudflap installcheck-target-libmudflap
-maybe-installcheck-target-libmudflap:
-@if target-libmudflap
-maybe-installcheck-target-libmudflap: installcheck-target-libmudflap
-
-installcheck-target-libmudflap: \
- configure-target-libmudflap
- @: $(MAKE); $(unstage)
- @[ -f $(TARGET_SUBDIR)/libmudflap/Makefile ] || exit 0 ; \
- r=`${PWD_COMMAND}`; export r; \
- s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(NORMAL_TARGET_EXPORTS) \
- echo "Doing installcheck in $(TARGET_SUBDIR)/libmudflap" ; \
- for flag in $(EXTRA_TARGET_FLAGS); do \
- eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
- done; \
- (cd $(TARGET_SUBDIR)/libmudflap && \
- $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
- "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
- "RANLIB=$${RANLIB}" \
- "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
- installcheck) \
- || exit 1
-
-@endif target-libmudflap
-
-.PHONY: maybe-mostlyclean-target-libmudflap mostlyclean-target-libmudflap
-maybe-mostlyclean-target-libmudflap:
-@if target-libmudflap
-maybe-mostlyclean-target-libmudflap: mostlyclean-target-libmudflap
-
-mostlyclean-target-libmudflap:
- @: $(MAKE); $(unstage)
- @[ -f $(TARGET_SUBDIR)/libmudflap/Makefile ] || exit 0 ; \
- r=`${PWD_COMMAND}`; export r; \
- s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(NORMAL_TARGET_EXPORTS) \
- echo "Doing mostlyclean in $(TARGET_SUBDIR)/libmudflap" ; \
- for flag in $(EXTRA_TARGET_FLAGS); do \
- eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
- done; \
- (cd $(TARGET_SUBDIR)/libmudflap && \
- $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
- "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
- "RANLIB=$${RANLIB}" \
- "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
- mostlyclean) \
- || exit 1
-
-@endif target-libmudflap
-
-.PHONY: maybe-clean-target-libmudflap clean-target-libmudflap
-maybe-clean-target-libmudflap:
-@if target-libmudflap
-maybe-clean-target-libmudflap: clean-target-libmudflap
-
-clean-target-libmudflap:
- @: $(MAKE); $(unstage)
- @[ -f $(TARGET_SUBDIR)/libmudflap/Makefile ] || exit 0 ; \
- r=`${PWD_COMMAND}`; export r; \
- s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(NORMAL_TARGET_EXPORTS) \
- echo "Doing clean in $(TARGET_SUBDIR)/libmudflap" ; \
- for flag in $(EXTRA_TARGET_FLAGS); do \
- eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
- done; \
- (cd $(TARGET_SUBDIR)/libmudflap && \
- $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
- "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
- "RANLIB=$${RANLIB}" \
- "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
- clean) \
- || exit 1
-
-@endif target-libmudflap
-
-.PHONY: maybe-distclean-target-libmudflap distclean-target-libmudflap
-maybe-distclean-target-libmudflap:
-@if target-libmudflap
-maybe-distclean-target-libmudflap: distclean-target-libmudflap
-
-distclean-target-libmudflap:
- @: $(MAKE); $(unstage)
- @[ -f $(TARGET_SUBDIR)/libmudflap/Makefile ] || exit 0 ; \
- r=`${PWD_COMMAND}`; export r; \
- s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(NORMAL_TARGET_EXPORTS) \
- echo "Doing distclean in $(TARGET_SUBDIR)/libmudflap" ; \
- for flag in $(EXTRA_TARGET_FLAGS); do \
- eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
- done; \
- (cd $(TARGET_SUBDIR)/libmudflap && \
- $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
- "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
- "RANLIB=$${RANLIB}" \
- "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
- distclean) \
- || exit 1
-
-@endif target-libmudflap
-
-.PHONY: maybe-maintainer-clean-target-libmudflap maintainer-clean-target-libmudflap
-maybe-maintainer-clean-target-libmudflap:
-@if target-libmudflap
-maybe-maintainer-clean-target-libmudflap: maintainer-clean-target-libmudflap
-
-maintainer-clean-target-libmudflap:
- @: $(MAKE); $(unstage)
- @[ -f $(TARGET_SUBDIR)/libmudflap/Makefile ] || exit 0 ; \
- r=`${PWD_COMMAND}`; export r; \
- s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(NORMAL_TARGET_EXPORTS) \
- echo "Doing maintainer-clean in $(TARGET_SUBDIR)/libmudflap" ; \
- for flag in $(EXTRA_TARGET_FLAGS); do \
- eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
- done; \
- (cd $(TARGET_SUBDIR)/libmudflap && \
- $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
- "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
- "RANLIB=$${RANLIB}" \
- "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
- maintainer-clean) \
- || exit 1
-
-@endif target-libmudflap
-
-
-
-
-
.PHONY: configure-target-libsanitizer maybe-configure-target-libsanitizer
maybe-configure-target-libsanitizer:
@if gcc-bootstrap
@@ -32213,8 +33743,8 @@ configure-target-libsanitizer:
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
echo "Checking multilib configuration for libsanitizer..."; \
- $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libsanitizer ; \
- $(CC_FOR_TARGET) --print-multi-lib > $(TARGET_SUBDIR)/libsanitizer/multilib.tmp 2> /dev/null ; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libsanitizer; \
+ $(CC_FOR_TARGET) --print-multi-lib > $(TARGET_SUBDIR)/libsanitizer/multilib.tmp 2> /dev/null; \
if test -r $(TARGET_SUBDIR)/libsanitizer/multilib.out; then \
if cmp -s $(TARGET_SUBDIR)/libsanitizer/multilib.tmp $(TARGET_SUBDIR)/libsanitizer/multilib.out; then \
rm -f $(TARGET_SUBDIR)/libsanitizer/multilib.tmp; \
@@ -32226,7 +33756,7 @@ configure-target-libsanitizer:
mv $(TARGET_SUBDIR)/libsanitizer/multilib.tmp $(TARGET_SUBDIR)/libsanitizer/multilib.out; \
fi; \
test ! -f $(TARGET_SUBDIR)/libsanitizer/Makefile || exit 0; \
- $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libsanitizer ; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libsanitizer; \
$(RAW_CXX_TARGET_EXPORTS) \
echo Configuring in $(TARGET_SUBDIR)/libsanitizer; \
cd "$(TARGET_SUBDIR)/libsanitizer" || exit 1; \
@@ -32235,12 +33765,13 @@ configure-target-libsanitizer:
*) topdir=`echo $(TARGET_SUBDIR)/libsanitizer/ | \
sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
esac; \
- srcdiroption="--srcdir=$${topdir}/libsanitizer"; \
- libsrcdir="$$s/libsanitizer"; \
+ module_srcdir=libsanitizer; \
rm -f no-such-file || : ; \
- CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure \
+ CONFIG_SITE=no-such-file $(SHELL) \
+ $$s/$$module_srcdir/configure \
+ --srcdir=$${topdir}/$$module_srcdir \
$(TARGET_CONFIGARGS) --build=${build_alias} --host=${target_alias} \
- --target=${target_alias} $${srcdiroption} \
+ --target=${target_alias} \
|| exit 1
@endif target-libsanitizer
@@ -32257,7 +33788,7 @@ configure-stage1-target-libsanitizer:
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
TFLAGS="$(STAGE1_TFLAGS)"; \
echo "Checking multilib configuration for libsanitizer..."; \
- $(CC_FOR_TARGET) --print-multi-lib > $(TARGET_SUBDIR)/libsanitizer/multilib.tmp 2> /dev/null ; \
+ $(CC_FOR_TARGET) --print-multi-lib > $(TARGET_SUBDIR)/libsanitizer/multilib.tmp 2> /dev/null; \
if test -r $(TARGET_SUBDIR)/libsanitizer/multilib.out; then \
if cmp -s $(TARGET_SUBDIR)/libsanitizer/multilib.tmp $(TARGET_SUBDIR)/libsanitizer/multilib.out; then \
rm -f $(TARGET_SUBDIR)/libsanitizer/multilib.tmp; \
@@ -32273,19 +33804,20 @@ configure-stage1-target-libsanitizer:
CFLAGS="$(CFLAGS_FOR_TARGET)"; export CFLAGS; \
CXXFLAGS="$(CXXFLAGS_FOR_TARGET)"; export CXXFLAGS; \
LIBCFLAGS="$(LIBCFLAGS_FOR_TARGET)"; export LIBCFLAGS; \
- echo Configuring stage 1 in $(TARGET_SUBDIR)/libsanitizer ; \
- $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libsanitizer ; \
+ echo Configuring stage 1 in $(TARGET_SUBDIR)/libsanitizer; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libsanitizer; \
cd $(TARGET_SUBDIR)/libsanitizer || exit 1; \
case $(srcdir) in \
/* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
*) topdir=`echo $(TARGET_SUBDIR)/libsanitizer/ | \
sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
esac; \
- srcdiroption="--srcdir=$${topdir}/libsanitizer"; \
- libsrcdir="$$s/libsanitizer"; \
- $(SHELL) $${libsrcdir}/configure \
+ module_srcdir=libsanitizer; \
+ $(SHELL) $$s/$$module_srcdir/configure \
+ --srcdir=$${topdir}/$$module_srcdir \
$(TARGET_CONFIGARGS) --build=${build_alias} --host=${target_alias} \
- --target=${target_alias} $${srcdiroption} \
+ --target=${target_alias} \
+ \
$(STAGE1_CONFIGURE_FLAGS)
@endif target-libsanitizer-bootstrap
@@ -32300,7 +33832,7 @@ configure-stage2-target-libsanitizer:
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
TFLAGS="$(STAGE2_TFLAGS)"; \
echo "Checking multilib configuration for libsanitizer..."; \
- $(CC_FOR_TARGET) --print-multi-lib > $(TARGET_SUBDIR)/libsanitizer/multilib.tmp 2> /dev/null ; \
+ $(CC_FOR_TARGET) --print-multi-lib > $(TARGET_SUBDIR)/libsanitizer/multilib.tmp 2> /dev/null; \
if test -r $(TARGET_SUBDIR)/libsanitizer/multilib.out; then \
if cmp -s $(TARGET_SUBDIR)/libsanitizer/multilib.tmp $(TARGET_SUBDIR)/libsanitizer/multilib.out; then \
rm -f $(TARGET_SUBDIR)/libsanitizer/multilib.tmp; \
@@ -32317,19 +33849,19 @@ configure-stage2-target-libsanitizer:
CFLAGS="$(CFLAGS_FOR_TARGET)"; export CFLAGS; \
CXXFLAGS="$(CXXFLAGS_FOR_TARGET)"; export CXXFLAGS; \
LIBCFLAGS="$(LIBCFLAGS_FOR_TARGET)"; export LIBCFLAGS; \
- echo Configuring stage 2 in $(TARGET_SUBDIR)/libsanitizer ; \
- $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libsanitizer ; \
+ echo Configuring stage 2 in $(TARGET_SUBDIR)/libsanitizer; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libsanitizer; \
cd $(TARGET_SUBDIR)/libsanitizer || exit 1; \
case $(srcdir) in \
/* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
*) topdir=`echo $(TARGET_SUBDIR)/libsanitizer/ | \
sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
esac; \
- srcdiroption="--srcdir=$${topdir}/libsanitizer"; \
- libsrcdir="$$s/libsanitizer"; \
- $(SHELL) $${libsrcdir}/configure \
+ module_srcdir=libsanitizer; \
+ $(SHELL) $$s/$$module_srcdir/configure \
+ --srcdir=$${topdir}/$$module_srcdir \
$(TARGET_CONFIGARGS) --build=${build_alias} --host=${target_alias} \
- --target=${target_alias} $${srcdiroption} \
+ --target=${target_alias} \
--with-build-libsubdir=$(HOST_SUBDIR) \
$(STAGE2_CONFIGURE_FLAGS)
@endif target-libsanitizer-bootstrap
@@ -32345,7 +33877,7 @@ configure-stage3-target-libsanitizer:
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
TFLAGS="$(STAGE3_TFLAGS)"; \
echo "Checking multilib configuration for libsanitizer..."; \
- $(CC_FOR_TARGET) --print-multi-lib > $(TARGET_SUBDIR)/libsanitizer/multilib.tmp 2> /dev/null ; \
+ $(CC_FOR_TARGET) --print-multi-lib > $(TARGET_SUBDIR)/libsanitizer/multilib.tmp 2> /dev/null; \
if test -r $(TARGET_SUBDIR)/libsanitizer/multilib.out; then \
if cmp -s $(TARGET_SUBDIR)/libsanitizer/multilib.tmp $(TARGET_SUBDIR)/libsanitizer/multilib.out; then \
rm -f $(TARGET_SUBDIR)/libsanitizer/multilib.tmp; \
@@ -32362,19 +33894,19 @@ configure-stage3-target-libsanitizer:
CFLAGS="$(CFLAGS_FOR_TARGET)"; export CFLAGS; \
CXXFLAGS="$(CXXFLAGS_FOR_TARGET)"; export CXXFLAGS; \
LIBCFLAGS="$(LIBCFLAGS_FOR_TARGET)"; export LIBCFLAGS; \
- echo Configuring stage 3 in $(TARGET_SUBDIR)/libsanitizer ; \
- $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libsanitizer ; \
+ echo Configuring stage 3 in $(TARGET_SUBDIR)/libsanitizer; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libsanitizer; \
cd $(TARGET_SUBDIR)/libsanitizer || exit 1; \
case $(srcdir) in \
/* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
*) topdir=`echo $(TARGET_SUBDIR)/libsanitizer/ | \
sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
esac; \
- srcdiroption="--srcdir=$${topdir}/libsanitizer"; \
- libsrcdir="$$s/libsanitizer"; \
- $(SHELL) $${libsrcdir}/configure \
+ module_srcdir=libsanitizer; \
+ $(SHELL) $$s/$$module_srcdir/configure \
+ --srcdir=$${topdir}/$$module_srcdir \
$(TARGET_CONFIGARGS) --build=${build_alias} --host=${target_alias} \
- --target=${target_alias} $${srcdiroption} \
+ --target=${target_alias} \
--with-build-libsubdir=$(HOST_SUBDIR) \
$(STAGE3_CONFIGURE_FLAGS)
@endif target-libsanitizer-bootstrap
@@ -32390,7 +33922,7 @@ configure-stage4-target-libsanitizer:
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
TFLAGS="$(STAGE4_TFLAGS)"; \
echo "Checking multilib configuration for libsanitizer..."; \
- $(CC_FOR_TARGET) --print-multi-lib > $(TARGET_SUBDIR)/libsanitizer/multilib.tmp 2> /dev/null ; \
+ $(CC_FOR_TARGET) --print-multi-lib > $(TARGET_SUBDIR)/libsanitizer/multilib.tmp 2> /dev/null; \
if test -r $(TARGET_SUBDIR)/libsanitizer/multilib.out; then \
if cmp -s $(TARGET_SUBDIR)/libsanitizer/multilib.tmp $(TARGET_SUBDIR)/libsanitizer/multilib.out; then \
rm -f $(TARGET_SUBDIR)/libsanitizer/multilib.tmp; \
@@ -32407,19 +33939,19 @@ configure-stage4-target-libsanitizer:
CFLAGS="$(CFLAGS_FOR_TARGET)"; export CFLAGS; \
CXXFLAGS="$(CXXFLAGS_FOR_TARGET)"; export CXXFLAGS; \
LIBCFLAGS="$(LIBCFLAGS_FOR_TARGET)"; export LIBCFLAGS; \
- echo Configuring stage 4 in $(TARGET_SUBDIR)/libsanitizer ; \
- $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libsanitizer ; \
+ echo Configuring stage 4 in $(TARGET_SUBDIR)/libsanitizer; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libsanitizer; \
cd $(TARGET_SUBDIR)/libsanitizer || exit 1; \
case $(srcdir) in \
/* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
*) topdir=`echo $(TARGET_SUBDIR)/libsanitizer/ | \
sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
esac; \
- srcdiroption="--srcdir=$${topdir}/libsanitizer"; \
- libsrcdir="$$s/libsanitizer"; \
- $(SHELL) $${libsrcdir}/configure \
+ module_srcdir=libsanitizer; \
+ $(SHELL) $$s/$$module_srcdir/configure \
+ --srcdir=$${topdir}/$$module_srcdir \
$(TARGET_CONFIGARGS) --build=${build_alias} --host=${target_alias} \
- --target=${target_alias} $${srcdiroption} \
+ --target=${target_alias} \
--with-build-libsubdir=$(HOST_SUBDIR) \
$(STAGE4_CONFIGURE_FLAGS)
@endif target-libsanitizer-bootstrap
@@ -32435,7 +33967,7 @@ configure-stageprofile-target-libsanitizer:
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
TFLAGS="$(STAGEprofile_TFLAGS)"; \
echo "Checking multilib configuration for libsanitizer..."; \
- $(CC_FOR_TARGET) --print-multi-lib > $(TARGET_SUBDIR)/libsanitizer/multilib.tmp 2> /dev/null ; \
+ $(CC_FOR_TARGET) --print-multi-lib > $(TARGET_SUBDIR)/libsanitizer/multilib.tmp 2> /dev/null; \
if test -r $(TARGET_SUBDIR)/libsanitizer/multilib.out; then \
if cmp -s $(TARGET_SUBDIR)/libsanitizer/multilib.tmp $(TARGET_SUBDIR)/libsanitizer/multilib.out; then \
rm -f $(TARGET_SUBDIR)/libsanitizer/multilib.tmp; \
@@ -32452,19 +33984,19 @@ configure-stageprofile-target-libsanitizer:
CFLAGS="$(CFLAGS_FOR_TARGET)"; export CFLAGS; \
CXXFLAGS="$(CXXFLAGS_FOR_TARGET)"; export CXXFLAGS; \
LIBCFLAGS="$(LIBCFLAGS_FOR_TARGET)"; export LIBCFLAGS; \
- echo Configuring stage profile in $(TARGET_SUBDIR)/libsanitizer ; \
- $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libsanitizer ; \
+ echo Configuring stage profile in $(TARGET_SUBDIR)/libsanitizer; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libsanitizer; \
cd $(TARGET_SUBDIR)/libsanitizer || exit 1; \
case $(srcdir) in \
/* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
*) topdir=`echo $(TARGET_SUBDIR)/libsanitizer/ | \
sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
esac; \
- srcdiroption="--srcdir=$${topdir}/libsanitizer"; \
- libsrcdir="$$s/libsanitizer"; \
- $(SHELL) $${libsrcdir}/configure \
+ module_srcdir=libsanitizer; \
+ $(SHELL) $$s/$$module_srcdir/configure \
+ --srcdir=$${topdir}/$$module_srcdir \
$(TARGET_CONFIGARGS) --build=${build_alias} --host=${target_alias} \
- --target=${target_alias} $${srcdiroption} \
+ --target=${target_alias} \
--with-build-libsubdir=$(HOST_SUBDIR) \
$(STAGEprofile_CONFIGURE_FLAGS)
@endif target-libsanitizer-bootstrap
@@ -32480,7 +34012,7 @@ configure-stagefeedback-target-libsanitizer:
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
TFLAGS="$(STAGEfeedback_TFLAGS)"; \
echo "Checking multilib configuration for libsanitizer..."; \
- $(CC_FOR_TARGET) --print-multi-lib > $(TARGET_SUBDIR)/libsanitizer/multilib.tmp 2> /dev/null ; \
+ $(CC_FOR_TARGET) --print-multi-lib > $(TARGET_SUBDIR)/libsanitizer/multilib.tmp 2> /dev/null; \
if test -r $(TARGET_SUBDIR)/libsanitizer/multilib.out; then \
if cmp -s $(TARGET_SUBDIR)/libsanitizer/multilib.tmp $(TARGET_SUBDIR)/libsanitizer/multilib.out; then \
rm -f $(TARGET_SUBDIR)/libsanitizer/multilib.tmp; \
@@ -32497,19 +34029,19 @@ configure-stagefeedback-target-libsanitizer:
CFLAGS="$(CFLAGS_FOR_TARGET)"; export CFLAGS; \
CXXFLAGS="$(CXXFLAGS_FOR_TARGET)"; export CXXFLAGS; \
LIBCFLAGS="$(LIBCFLAGS_FOR_TARGET)"; export LIBCFLAGS; \
- echo Configuring stage feedback in $(TARGET_SUBDIR)/libsanitizer ; \
- $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libsanitizer ; \
+ echo Configuring stage feedback in $(TARGET_SUBDIR)/libsanitizer; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libsanitizer; \
cd $(TARGET_SUBDIR)/libsanitizer || exit 1; \
case $(srcdir) in \
/* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
*) topdir=`echo $(TARGET_SUBDIR)/libsanitizer/ | \
sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
esac; \
- srcdiroption="--srcdir=$${topdir}/libsanitizer"; \
- libsrcdir="$$s/libsanitizer"; \
- $(SHELL) $${libsrcdir}/configure \
+ module_srcdir=libsanitizer; \
+ $(SHELL) $$s/$$module_srcdir/configure \
+ --srcdir=$${topdir}/$$module_srcdir \
$(TARGET_CONFIGARGS) --build=${build_alias} --host=${target_alias} \
- --target=${target_alias} $${srcdiroption} \
+ --target=${target_alias} \
--with-build-libsubdir=$(HOST_SUBDIR) \
$(STAGEfeedback_CONFIGURE_FLAGS)
@endif target-libsanitizer-bootstrap
@@ -32843,11 +34375,11 @@ maybe-info-target-libsanitizer: info-target-libsanitizer
info-target-libsanitizer: \
configure-target-libsanitizer
@: $(MAKE); $(unstage)
- @[ -f $(TARGET_SUBDIR)/libsanitizer/Makefile ] || exit 0 ; \
+ @[ -f $(TARGET_SUBDIR)/libsanitizer/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(RAW_CXX_TARGET_EXPORTS) \
- echo "Doing info in $(TARGET_SUBDIR)/libsanitizer" ; \
+ echo "Doing info in $(TARGET_SUBDIR)/libsanitizer"; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
@@ -32869,11 +34401,11 @@ maybe-dvi-target-libsanitizer: dvi-target-libsanitizer
dvi-target-libsanitizer: \
configure-target-libsanitizer
@: $(MAKE); $(unstage)
- @[ -f $(TARGET_SUBDIR)/libsanitizer/Makefile ] || exit 0 ; \
+ @[ -f $(TARGET_SUBDIR)/libsanitizer/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(RAW_CXX_TARGET_EXPORTS) \
- echo "Doing dvi in $(TARGET_SUBDIR)/libsanitizer" ; \
+ echo "Doing dvi in $(TARGET_SUBDIR)/libsanitizer"; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
@@ -32895,11 +34427,11 @@ maybe-pdf-target-libsanitizer: pdf-target-libsanitizer
pdf-target-libsanitizer: \
configure-target-libsanitizer
@: $(MAKE); $(unstage)
- @[ -f $(TARGET_SUBDIR)/libsanitizer/Makefile ] || exit 0 ; \
+ @[ -f $(TARGET_SUBDIR)/libsanitizer/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(RAW_CXX_TARGET_EXPORTS) \
- echo "Doing pdf in $(TARGET_SUBDIR)/libsanitizer" ; \
+ echo "Doing pdf in $(TARGET_SUBDIR)/libsanitizer"; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
@@ -32921,11 +34453,11 @@ maybe-html-target-libsanitizer: html-target-libsanitizer
html-target-libsanitizer: \
configure-target-libsanitizer
@: $(MAKE); $(unstage)
- @[ -f $(TARGET_SUBDIR)/libsanitizer/Makefile ] || exit 0 ; \
+ @[ -f $(TARGET_SUBDIR)/libsanitizer/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(RAW_CXX_TARGET_EXPORTS) \
- echo "Doing html in $(TARGET_SUBDIR)/libsanitizer" ; \
+ echo "Doing html in $(TARGET_SUBDIR)/libsanitizer"; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
@@ -32947,11 +34479,11 @@ maybe-TAGS-target-libsanitizer: TAGS-target-libsanitizer
TAGS-target-libsanitizer: \
configure-target-libsanitizer
@: $(MAKE); $(unstage)
- @[ -f $(TARGET_SUBDIR)/libsanitizer/Makefile ] || exit 0 ; \
+ @[ -f $(TARGET_SUBDIR)/libsanitizer/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(RAW_CXX_TARGET_EXPORTS) \
- echo "Doing TAGS in $(TARGET_SUBDIR)/libsanitizer" ; \
+ echo "Doing TAGS in $(TARGET_SUBDIR)/libsanitizer"; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
@@ -32974,11 +34506,11 @@ install-info-target-libsanitizer: \
configure-target-libsanitizer \
info-target-libsanitizer
@: $(MAKE); $(unstage)
- @[ -f $(TARGET_SUBDIR)/libsanitizer/Makefile ] || exit 0 ; \
+ @[ -f $(TARGET_SUBDIR)/libsanitizer/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(RAW_CXX_TARGET_EXPORTS) \
- echo "Doing install-info in $(TARGET_SUBDIR)/libsanitizer" ; \
+ echo "Doing install-info in $(TARGET_SUBDIR)/libsanitizer"; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
@@ -33001,11 +34533,11 @@ install-pdf-target-libsanitizer: \
configure-target-libsanitizer \
pdf-target-libsanitizer
@: $(MAKE); $(unstage)
- @[ -f $(TARGET_SUBDIR)/libsanitizer/Makefile ] || exit 0 ; \
+ @[ -f $(TARGET_SUBDIR)/libsanitizer/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(RAW_CXX_TARGET_EXPORTS) \
- echo "Doing install-pdf in $(TARGET_SUBDIR)/libsanitizer" ; \
+ echo "Doing install-pdf in $(TARGET_SUBDIR)/libsanitizer"; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
@@ -33028,11 +34560,11 @@ install-html-target-libsanitizer: \
configure-target-libsanitizer \
html-target-libsanitizer
@: $(MAKE); $(unstage)
- @[ -f $(TARGET_SUBDIR)/libsanitizer/Makefile ] || exit 0 ; \
+ @[ -f $(TARGET_SUBDIR)/libsanitizer/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(RAW_CXX_TARGET_EXPORTS) \
- echo "Doing install-html in $(TARGET_SUBDIR)/libsanitizer" ; \
+ echo "Doing install-html in $(TARGET_SUBDIR)/libsanitizer"; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
@@ -33054,11 +34586,11 @@ maybe-installcheck-target-libsanitizer: installcheck-target-libsanitizer
installcheck-target-libsanitizer: \
configure-target-libsanitizer
@: $(MAKE); $(unstage)
- @[ -f $(TARGET_SUBDIR)/libsanitizer/Makefile ] || exit 0 ; \
+ @[ -f $(TARGET_SUBDIR)/libsanitizer/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(RAW_CXX_TARGET_EXPORTS) \
- echo "Doing installcheck in $(TARGET_SUBDIR)/libsanitizer" ; \
+ echo "Doing installcheck in $(TARGET_SUBDIR)/libsanitizer"; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
@@ -33079,11 +34611,11 @@ maybe-mostlyclean-target-libsanitizer: mostlyclean-target-libsanitizer
mostlyclean-target-libsanitizer:
@: $(MAKE); $(unstage)
- @[ -f $(TARGET_SUBDIR)/libsanitizer/Makefile ] || exit 0 ; \
+ @[ -f $(TARGET_SUBDIR)/libsanitizer/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(RAW_CXX_TARGET_EXPORTS) \
- echo "Doing mostlyclean in $(TARGET_SUBDIR)/libsanitizer" ; \
+ echo "Doing mostlyclean in $(TARGET_SUBDIR)/libsanitizer"; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
@@ -33104,11 +34636,11 @@ maybe-clean-target-libsanitizer: clean-target-libsanitizer
clean-target-libsanitizer:
@: $(MAKE); $(unstage)
- @[ -f $(TARGET_SUBDIR)/libsanitizer/Makefile ] || exit 0 ; \
+ @[ -f $(TARGET_SUBDIR)/libsanitizer/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(RAW_CXX_TARGET_EXPORTS) \
- echo "Doing clean in $(TARGET_SUBDIR)/libsanitizer" ; \
+ echo "Doing clean in $(TARGET_SUBDIR)/libsanitizer"; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
@@ -33129,11 +34661,11 @@ maybe-distclean-target-libsanitizer: distclean-target-libsanitizer
distclean-target-libsanitizer:
@: $(MAKE); $(unstage)
- @[ -f $(TARGET_SUBDIR)/libsanitizer/Makefile ] || exit 0 ; \
+ @[ -f $(TARGET_SUBDIR)/libsanitizer/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(RAW_CXX_TARGET_EXPORTS) \
- echo "Doing distclean in $(TARGET_SUBDIR)/libsanitizer" ; \
+ echo "Doing distclean in $(TARGET_SUBDIR)/libsanitizer"; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
@@ -33154,11 +34686,11 @@ maybe-maintainer-clean-target-libsanitizer: maintainer-clean-target-libsanitizer
maintainer-clean-target-libsanitizer:
@: $(MAKE); $(unstage)
- @[ -f $(TARGET_SUBDIR)/libsanitizer/Makefile ] || exit 0 ; \
+ @[ -f $(TARGET_SUBDIR)/libsanitizer/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(RAW_CXX_TARGET_EXPORTS) \
- echo "Doing maintainer-clean in $(TARGET_SUBDIR)/libsanitizer" ; \
+ echo "Doing maintainer-clean in $(TARGET_SUBDIR)/libsanitizer"; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
@@ -33176,6 +34708,982 @@ maintainer-clean-target-libsanitizer:
+.PHONY: configure-target-libmpx maybe-configure-target-libmpx
+maybe-configure-target-libmpx:
+@if gcc-bootstrap
+configure-target-libmpx: stage_current
+@endif gcc-bootstrap
+@if target-libmpx
+maybe-configure-target-libmpx: configure-target-libmpx
+configure-target-libmpx:
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ echo "Checking multilib configuration for libmpx..."; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libmpx; \
+ $(CC_FOR_TARGET) --print-multi-lib > $(TARGET_SUBDIR)/libmpx/multilib.tmp 2> /dev/null; \
+ if test -r $(TARGET_SUBDIR)/libmpx/multilib.out; then \
+ if cmp -s $(TARGET_SUBDIR)/libmpx/multilib.tmp $(TARGET_SUBDIR)/libmpx/multilib.out; then \
+ rm -f $(TARGET_SUBDIR)/libmpx/multilib.tmp; \
+ else \
+ rm -f $(TARGET_SUBDIR)/libmpx/Makefile; \
+ mv $(TARGET_SUBDIR)/libmpx/multilib.tmp $(TARGET_SUBDIR)/libmpx/multilib.out; \
+ fi; \
+ else \
+ mv $(TARGET_SUBDIR)/libmpx/multilib.tmp $(TARGET_SUBDIR)/libmpx/multilib.out; \
+ fi; \
+ test ! -f $(TARGET_SUBDIR)/libmpx/Makefile || exit 0; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libmpx; \
+ $(NORMAL_TARGET_EXPORTS) \
+ echo Configuring in $(TARGET_SUBDIR)/libmpx; \
+ cd "$(TARGET_SUBDIR)/libmpx" || exit 1; \
+ case $(srcdir) in \
+ /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+ *) topdir=`echo $(TARGET_SUBDIR)/libmpx/ | \
+ sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
+ esac; \
+ module_srcdir=libmpx; \
+ rm -f no-such-file || : ; \
+ CONFIG_SITE=no-such-file $(SHELL) \
+ $$s/$$module_srcdir/configure \
+ --srcdir=$${topdir}/$$module_srcdir \
+ $(TARGET_CONFIGARGS) --build=${build_alias} --host=${target_alias} \
+ --target=${target_alias} \
+ || exit 1
+@endif target-libmpx
+
+
+
+.PHONY: configure-stage1-target-libmpx maybe-configure-stage1-target-libmpx
+maybe-configure-stage1-target-libmpx:
+@if target-libmpx-bootstrap
+maybe-configure-stage1-target-libmpx: configure-stage1-target-libmpx
+configure-stage1-target-libmpx:
+ @[ $(current_stage) = stage1 ] || $(MAKE) stage1-start
+ @$(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libmpx
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ TFLAGS="$(STAGE1_TFLAGS)"; \
+ echo "Checking multilib configuration for libmpx..."; \
+ $(CC_FOR_TARGET) --print-multi-lib > $(TARGET_SUBDIR)/libmpx/multilib.tmp 2> /dev/null; \
+ if test -r $(TARGET_SUBDIR)/libmpx/multilib.out; then \
+ if cmp -s $(TARGET_SUBDIR)/libmpx/multilib.tmp $(TARGET_SUBDIR)/libmpx/multilib.out; then \
+ rm -f $(TARGET_SUBDIR)/libmpx/multilib.tmp; \
+ else \
+ rm -f $(TARGET_SUBDIR)/libmpx/Makefile; \
+ mv $(TARGET_SUBDIR)/libmpx/multilib.tmp $(TARGET_SUBDIR)/libmpx/multilib.out; \
+ fi; \
+ else \
+ mv $(TARGET_SUBDIR)/libmpx/multilib.tmp $(TARGET_SUBDIR)/libmpx/multilib.out; \
+ fi; \
+ test ! -f $(TARGET_SUBDIR)/libmpx/Makefile || exit 0; \
+ $(NORMAL_TARGET_EXPORTS) \
+ CFLAGS="$(CFLAGS_FOR_TARGET)"; export CFLAGS; \
+ CXXFLAGS="$(CXXFLAGS_FOR_TARGET)"; export CXXFLAGS; \
+ LIBCFLAGS="$(LIBCFLAGS_FOR_TARGET)"; export LIBCFLAGS; \
+ echo Configuring stage 1 in $(TARGET_SUBDIR)/libmpx; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libmpx; \
+ cd $(TARGET_SUBDIR)/libmpx || exit 1; \
+ case $(srcdir) in \
+ /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+ *) topdir=`echo $(TARGET_SUBDIR)/libmpx/ | \
+ sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
+ esac; \
+ module_srcdir=libmpx; \
+ $(SHELL) $$s/$$module_srcdir/configure \
+ --srcdir=$${topdir}/$$module_srcdir \
+ $(TARGET_CONFIGARGS) --build=${build_alias} --host=${target_alias} \
+ --target=${target_alias} \
+ \
+ $(STAGE1_CONFIGURE_FLAGS)
+@endif target-libmpx-bootstrap
+
+.PHONY: configure-stage2-target-libmpx maybe-configure-stage2-target-libmpx
+maybe-configure-stage2-target-libmpx:
+@if target-libmpx-bootstrap
+maybe-configure-stage2-target-libmpx: configure-stage2-target-libmpx
+configure-stage2-target-libmpx:
+ @[ $(current_stage) = stage2 ] || $(MAKE) stage2-start
+ @$(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libmpx
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ TFLAGS="$(STAGE2_TFLAGS)"; \
+ echo "Checking multilib configuration for libmpx..."; \
+ $(CC_FOR_TARGET) --print-multi-lib > $(TARGET_SUBDIR)/libmpx/multilib.tmp 2> /dev/null; \
+ if test -r $(TARGET_SUBDIR)/libmpx/multilib.out; then \
+ if cmp -s $(TARGET_SUBDIR)/libmpx/multilib.tmp $(TARGET_SUBDIR)/libmpx/multilib.out; then \
+ rm -f $(TARGET_SUBDIR)/libmpx/multilib.tmp; \
+ else \
+ rm -f $(TARGET_SUBDIR)/libmpx/Makefile; \
+ mv $(TARGET_SUBDIR)/libmpx/multilib.tmp $(TARGET_SUBDIR)/libmpx/multilib.out; \
+ fi; \
+ else \
+ mv $(TARGET_SUBDIR)/libmpx/multilib.tmp $(TARGET_SUBDIR)/libmpx/multilib.out; \
+ fi; \
+ test ! -f $(TARGET_SUBDIR)/libmpx/Makefile || exit 0; \
+ $(NORMAL_TARGET_EXPORTS) \
+ \
+ CFLAGS="$(CFLAGS_FOR_TARGET)"; export CFLAGS; \
+ CXXFLAGS="$(CXXFLAGS_FOR_TARGET)"; export CXXFLAGS; \
+ LIBCFLAGS="$(LIBCFLAGS_FOR_TARGET)"; export LIBCFLAGS; \
+ echo Configuring stage 2 in $(TARGET_SUBDIR)/libmpx; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libmpx; \
+ cd $(TARGET_SUBDIR)/libmpx || exit 1; \
+ case $(srcdir) in \
+ /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+ *) topdir=`echo $(TARGET_SUBDIR)/libmpx/ | \
+ sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
+ esac; \
+ module_srcdir=libmpx; \
+ $(SHELL) $$s/$$module_srcdir/configure \
+ --srcdir=$${topdir}/$$module_srcdir \
+ $(TARGET_CONFIGARGS) --build=${build_alias} --host=${target_alias} \
+ --target=${target_alias} \
+ --with-build-libsubdir=$(HOST_SUBDIR) \
+ $(STAGE2_CONFIGURE_FLAGS)
+@endif target-libmpx-bootstrap
+
+.PHONY: configure-stage3-target-libmpx maybe-configure-stage3-target-libmpx
+maybe-configure-stage3-target-libmpx:
+@if target-libmpx-bootstrap
+maybe-configure-stage3-target-libmpx: configure-stage3-target-libmpx
+configure-stage3-target-libmpx:
+ @[ $(current_stage) = stage3 ] || $(MAKE) stage3-start
+ @$(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libmpx
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ TFLAGS="$(STAGE3_TFLAGS)"; \
+ echo "Checking multilib configuration for libmpx..."; \
+ $(CC_FOR_TARGET) --print-multi-lib > $(TARGET_SUBDIR)/libmpx/multilib.tmp 2> /dev/null; \
+ if test -r $(TARGET_SUBDIR)/libmpx/multilib.out; then \
+ if cmp -s $(TARGET_SUBDIR)/libmpx/multilib.tmp $(TARGET_SUBDIR)/libmpx/multilib.out; then \
+ rm -f $(TARGET_SUBDIR)/libmpx/multilib.tmp; \
+ else \
+ rm -f $(TARGET_SUBDIR)/libmpx/Makefile; \
+ mv $(TARGET_SUBDIR)/libmpx/multilib.tmp $(TARGET_SUBDIR)/libmpx/multilib.out; \
+ fi; \
+ else \
+ mv $(TARGET_SUBDIR)/libmpx/multilib.tmp $(TARGET_SUBDIR)/libmpx/multilib.out; \
+ fi; \
+ test ! -f $(TARGET_SUBDIR)/libmpx/Makefile || exit 0; \
+ $(NORMAL_TARGET_EXPORTS) \
+ \
+ CFLAGS="$(CFLAGS_FOR_TARGET)"; export CFLAGS; \
+ CXXFLAGS="$(CXXFLAGS_FOR_TARGET)"; export CXXFLAGS; \
+ LIBCFLAGS="$(LIBCFLAGS_FOR_TARGET)"; export LIBCFLAGS; \
+ echo Configuring stage 3 in $(TARGET_SUBDIR)/libmpx; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libmpx; \
+ cd $(TARGET_SUBDIR)/libmpx || exit 1; \
+ case $(srcdir) in \
+ /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+ *) topdir=`echo $(TARGET_SUBDIR)/libmpx/ | \
+ sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
+ esac; \
+ module_srcdir=libmpx; \
+ $(SHELL) $$s/$$module_srcdir/configure \
+ --srcdir=$${topdir}/$$module_srcdir \
+ $(TARGET_CONFIGARGS) --build=${build_alias} --host=${target_alias} \
+ --target=${target_alias} \
+ --with-build-libsubdir=$(HOST_SUBDIR) \
+ $(STAGE3_CONFIGURE_FLAGS)
+@endif target-libmpx-bootstrap
+
+.PHONY: configure-stage4-target-libmpx maybe-configure-stage4-target-libmpx
+maybe-configure-stage4-target-libmpx:
+@if target-libmpx-bootstrap
+maybe-configure-stage4-target-libmpx: configure-stage4-target-libmpx
+configure-stage4-target-libmpx:
+ @[ $(current_stage) = stage4 ] || $(MAKE) stage4-start
+ @$(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libmpx
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ TFLAGS="$(STAGE4_TFLAGS)"; \
+ echo "Checking multilib configuration for libmpx..."; \
+ $(CC_FOR_TARGET) --print-multi-lib > $(TARGET_SUBDIR)/libmpx/multilib.tmp 2> /dev/null; \
+ if test -r $(TARGET_SUBDIR)/libmpx/multilib.out; then \
+ if cmp -s $(TARGET_SUBDIR)/libmpx/multilib.tmp $(TARGET_SUBDIR)/libmpx/multilib.out; then \
+ rm -f $(TARGET_SUBDIR)/libmpx/multilib.tmp; \
+ else \
+ rm -f $(TARGET_SUBDIR)/libmpx/Makefile; \
+ mv $(TARGET_SUBDIR)/libmpx/multilib.tmp $(TARGET_SUBDIR)/libmpx/multilib.out; \
+ fi; \
+ else \
+ mv $(TARGET_SUBDIR)/libmpx/multilib.tmp $(TARGET_SUBDIR)/libmpx/multilib.out; \
+ fi; \
+ test ! -f $(TARGET_SUBDIR)/libmpx/Makefile || exit 0; \
+ $(NORMAL_TARGET_EXPORTS) \
+ \
+ CFLAGS="$(CFLAGS_FOR_TARGET)"; export CFLAGS; \
+ CXXFLAGS="$(CXXFLAGS_FOR_TARGET)"; export CXXFLAGS; \
+ LIBCFLAGS="$(LIBCFLAGS_FOR_TARGET)"; export LIBCFLAGS; \
+ echo Configuring stage 4 in $(TARGET_SUBDIR)/libmpx; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libmpx; \
+ cd $(TARGET_SUBDIR)/libmpx || exit 1; \
+ case $(srcdir) in \
+ /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+ *) topdir=`echo $(TARGET_SUBDIR)/libmpx/ | \
+ sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
+ esac; \
+ module_srcdir=libmpx; \
+ $(SHELL) $$s/$$module_srcdir/configure \
+ --srcdir=$${topdir}/$$module_srcdir \
+ $(TARGET_CONFIGARGS) --build=${build_alias} --host=${target_alias} \
+ --target=${target_alias} \
+ --with-build-libsubdir=$(HOST_SUBDIR) \
+ $(STAGE4_CONFIGURE_FLAGS)
+@endif target-libmpx-bootstrap
+
+.PHONY: configure-stageprofile-target-libmpx maybe-configure-stageprofile-target-libmpx
+maybe-configure-stageprofile-target-libmpx:
+@if target-libmpx-bootstrap
+maybe-configure-stageprofile-target-libmpx: configure-stageprofile-target-libmpx
+configure-stageprofile-target-libmpx:
+ @[ $(current_stage) = stageprofile ] || $(MAKE) stageprofile-start
+ @$(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libmpx
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ TFLAGS="$(STAGEprofile_TFLAGS)"; \
+ echo "Checking multilib configuration for libmpx..."; \
+ $(CC_FOR_TARGET) --print-multi-lib > $(TARGET_SUBDIR)/libmpx/multilib.tmp 2> /dev/null; \
+ if test -r $(TARGET_SUBDIR)/libmpx/multilib.out; then \
+ if cmp -s $(TARGET_SUBDIR)/libmpx/multilib.tmp $(TARGET_SUBDIR)/libmpx/multilib.out; then \
+ rm -f $(TARGET_SUBDIR)/libmpx/multilib.tmp; \
+ else \
+ rm -f $(TARGET_SUBDIR)/libmpx/Makefile; \
+ mv $(TARGET_SUBDIR)/libmpx/multilib.tmp $(TARGET_SUBDIR)/libmpx/multilib.out; \
+ fi; \
+ else \
+ mv $(TARGET_SUBDIR)/libmpx/multilib.tmp $(TARGET_SUBDIR)/libmpx/multilib.out; \
+ fi; \
+ test ! -f $(TARGET_SUBDIR)/libmpx/Makefile || exit 0; \
+ $(NORMAL_TARGET_EXPORTS) \
+ \
+ CFLAGS="$(CFLAGS_FOR_TARGET)"; export CFLAGS; \
+ CXXFLAGS="$(CXXFLAGS_FOR_TARGET)"; export CXXFLAGS; \
+ LIBCFLAGS="$(LIBCFLAGS_FOR_TARGET)"; export LIBCFLAGS; \
+ echo Configuring stage profile in $(TARGET_SUBDIR)/libmpx; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libmpx; \
+ cd $(TARGET_SUBDIR)/libmpx || exit 1; \
+ case $(srcdir) in \
+ /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+ *) topdir=`echo $(TARGET_SUBDIR)/libmpx/ | \
+ sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
+ esac; \
+ module_srcdir=libmpx; \
+ $(SHELL) $$s/$$module_srcdir/configure \
+ --srcdir=$${topdir}/$$module_srcdir \
+ $(TARGET_CONFIGARGS) --build=${build_alias} --host=${target_alias} \
+ --target=${target_alias} \
+ --with-build-libsubdir=$(HOST_SUBDIR) \
+ $(STAGEprofile_CONFIGURE_FLAGS)
+@endif target-libmpx-bootstrap
+
+.PHONY: configure-stagefeedback-target-libmpx maybe-configure-stagefeedback-target-libmpx
+maybe-configure-stagefeedback-target-libmpx:
+@if target-libmpx-bootstrap
+maybe-configure-stagefeedback-target-libmpx: configure-stagefeedback-target-libmpx
+configure-stagefeedback-target-libmpx:
+ @[ $(current_stage) = stagefeedback ] || $(MAKE) stagefeedback-start
+ @$(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libmpx
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ TFLAGS="$(STAGEfeedback_TFLAGS)"; \
+ echo "Checking multilib configuration for libmpx..."; \
+ $(CC_FOR_TARGET) --print-multi-lib > $(TARGET_SUBDIR)/libmpx/multilib.tmp 2> /dev/null; \
+ if test -r $(TARGET_SUBDIR)/libmpx/multilib.out; then \
+ if cmp -s $(TARGET_SUBDIR)/libmpx/multilib.tmp $(TARGET_SUBDIR)/libmpx/multilib.out; then \
+ rm -f $(TARGET_SUBDIR)/libmpx/multilib.tmp; \
+ else \
+ rm -f $(TARGET_SUBDIR)/libmpx/Makefile; \
+ mv $(TARGET_SUBDIR)/libmpx/multilib.tmp $(TARGET_SUBDIR)/libmpx/multilib.out; \
+ fi; \
+ else \
+ mv $(TARGET_SUBDIR)/libmpx/multilib.tmp $(TARGET_SUBDIR)/libmpx/multilib.out; \
+ fi; \
+ test ! -f $(TARGET_SUBDIR)/libmpx/Makefile || exit 0; \
+ $(NORMAL_TARGET_EXPORTS) \
+ \
+ CFLAGS="$(CFLAGS_FOR_TARGET)"; export CFLAGS; \
+ CXXFLAGS="$(CXXFLAGS_FOR_TARGET)"; export CXXFLAGS; \
+ LIBCFLAGS="$(LIBCFLAGS_FOR_TARGET)"; export LIBCFLAGS; \
+ echo Configuring stage feedback in $(TARGET_SUBDIR)/libmpx; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libmpx; \
+ cd $(TARGET_SUBDIR)/libmpx || exit 1; \
+ case $(srcdir) in \
+ /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+ *) topdir=`echo $(TARGET_SUBDIR)/libmpx/ | \
+ sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
+ esac; \
+ module_srcdir=libmpx; \
+ $(SHELL) $$s/$$module_srcdir/configure \
+ --srcdir=$${topdir}/$$module_srcdir \
+ $(TARGET_CONFIGARGS) --build=${build_alias} --host=${target_alias} \
+ --target=${target_alias} \
+ --with-build-libsubdir=$(HOST_SUBDIR) \
+ $(STAGEfeedback_CONFIGURE_FLAGS)
+@endif target-libmpx-bootstrap
+
+
+
+
+
+.PHONY: all-target-libmpx maybe-all-target-libmpx
+maybe-all-target-libmpx:
+@if gcc-bootstrap
+all-target-libmpx: stage_current
+@endif gcc-bootstrap
+@if target-libmpx
+TARGET-target-libmpx=all
+maybe-all-target-libmpx: all-target-libmpx
+all-target-libmpx: configure-target-libmpx
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(NORMAL_TARGET_EXPORTS) \
+ (cd $(TARGET_SUBDIR)/libmpx && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_TARGET_FLAGS) \
+ $(TARGET-target-libmpx))
+@endif target-libmpx
+
+
+
+.PHONY: all-stage1-target-libmpx maybe-all-stage1-target-libmpx
+.PHONY: clean-stage1-target-libmpx maybe-clean-stage1-target-libmpx
+maybe-all-stage1-target-libmpx:
+maybe-clean-stage1-target-libmpx:
+@if target-libmpx-bootstrap
+maybe-all-stage1-target-libmpx: all-stage1-target-libmpx
+all-stage1: all-stage1-target-libmpx
+TARGET-stage1-target-libmpx = $(TARGET-target-libmpx)
+all-stage1-target-libmpx: configure-stage1-target-libmpx
+ @[ $(current_stage) = stage1 ] || $(MAKE) stage1-start
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ TFLAGS="$(STAGE1_TFLAGS)"; \
+ $(NORMAL_TARGET_EXPORTS) \
+ cd $(TARGET_SUBDIR)/libmpx && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) \
+ CFLAGS="$(CFLAGS_FOR_TARGET)" \
+ CXXFLAGS="$(CXXFLAGS_FOR_TARGET)" \
+ LIBCFLAGS="$(LIBCFLAGS_FOR_TARGET)" \
+ CFLAGS_FOR_TARGET="$(CFLAGS_FOR_TARGET)" \
+ CXXFLAGS_FOR_TARGET="$(CXXFLAGS_FOR_TARGET)" \
+ LIBCFLAGS_FOR_TARGET="$(LIBCFLAGS_FOR_TARGET)" \
+ $(EXTRA_TARGET_FLAGS) \
+ \
+ TFLAGS="$(STAGE1_TFLAGS)" \
+ $(TARGET-stage1-target-libmpx)
+
+maybe-clean-stage1-target-libmpx: clean-stage1-target-libmpx
+clean-stage1: clean-stage1-target-libmpx
+clean-stage1-target-libmpx:
+ @if [ $(current_stage) = stage1 ]; then \
+ [ -f $(TARGET_SUBDIR)/libmpx/Makefile ] || exit 0; \
+ else \
+ [ -f $(TARGET_SUBDIR)/stage1-libmpx/Makefile ] || exit 0; \
+ $(MAKE) stage1-start; \
+ fi; \
+ cd $(TARGET_SUBDIR)/libmpx && \
+ $(MAKE) $(EXTRA_TARGET_FLAGS) \
+ clean
+@endif target-libmpx-bootstrap
+
+
+.PHONY: all-stage2-target-libmpx maybe-all-stage2-target-libmpx
+.PHONY: clean-stage2-target-libmpx maybe-clean-stage2-target-libmpx
+maybe-all-stage2-target-libmpx:
+maybe-clean-stage2-target-libmpx:
+@if target-libmpx-bootstrap
+maybe-all-stage2-target-libmpx: all-stage2-target-libmpx
+all-stage2: all-stage2-target-libmpx
+TARGET-stage2-target-libmpx = $(TARGET-target-libmpx)
+all-stage2-target-libmpx: configure-stage2-target-libmpx
+ @[ $(current_stage) = stage2 ] || $(MAKE) stage2-start
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ TFLAGS="$(STAGE2_TFLAGS)"; \
+ $(NORMAL_TARGET_EXPORTS) \
+ \
+ cd $(TARGET_SUBDIR)/libmpx && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) \
+ CFLAGS="$(CFLAGS_FOR_TARGET)" \
+ CXXFLAGS="$(CXXFLAGS_FOR_TARGET)" \
+ LIBCFLAGS="$(LIBCFLAGS_FOR_TARGET)" \
+ CFLAGS_FOR_TARGET="$(CFLAGS_FOR_TARGET)" \
+ CXXFLAGS_FOR_TARGET="$(CXXFLAGS_FOR_TARGET)" \
+ LIBCFLAGS_FOR_TARGET="$(LIBCFLAGS_FOR_TARGET)" \
+ $(EXTRA_TARGET_FLAGS) \
+ TFLAGS="$(STAGE2_TFLAGS)" \
+ $(TARGET-stage2-target-libmpx)
+
+maybe-clean-stage2-target-libmpx: clean-stage2-target-libmpx
+clean-stage2: clean-stage2-target-libmpx
+clean-stage2-target-libmpx:
+ @if [ $(current_stage) = stage2 ]; then \
+ [ -f $(TARGET_SUBDIR)/libmpx/Makefile ] || exit 0; \
+ else \
+ [ -f $(TARGET_SUBDIR)/stage2-libmpx/Makefile ] || exit 0; \
+ $(MAKE) stage2-start; \
+ fi; \
+ cd $(TARGET_SUBDIR)/libmpx && \
+ $(MAKE) $(EXTRA_TARGET_FLAGS) clean
+@endif target-libmpx-bootstrap
+
+
+.PHONY: all-stage3-target-libmpx maybe-all-stage3-target-libmpx
+.PHONY: clean-stage3-target-libmpx maybe-clean-stage3-target-libmpx
+maybe-all-stage3-target-libmpx:
+maybe-clean-stage3-target-libmpx:
+@if target-libmpx-bootstrap
+maybe-all-stage3-target-libmpx: all-stage3-target-libmpx
+all-stage3: all-stage3-target-libmpx
+TARGET-stage3-target-libmpx = $(TARGET-target-libmpx)
+all-stage3-target-libmpx: configure-stage3-target-libmpx
+ @[ $(current_stage) = stage3 ] || $(MAKE) stage3-start
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ TFLAGS="$(STAGE3_TFLAGS)"; \
+ $(NORMAL_TARGET_EXPORTS) \
+ \
+ cd $(TARGET_SUBDIR)/libmpx && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) \
+ CFLAGS="$(CFLAGS_FOR_TARGET)" \
+ CXXFLAGS="$(CXXFLAGS_FOR_TARGET)" \
+ LIBCFLAGS="$(LIBCFLAGS_FOR_TARGET)" \
+ CFLAGS_FOR_TARGET="$(CFLAGS_FOR_TARGET)" \
+ CXXFLAGS_FOR_TARGET="$(CXXFLAGS_FOR_TARGET)" \
+ LIBCFLAGS_FOR_TARGET="$(LIBCFLAGS_FOR_TARGET)" \
+ $(EXTRA_TARGET_FLAGS) \
+ TFLAGS="$(STAGE3_TFLAGS)" \
+ $(TARGET-stage3-target-libmpx)
+
+maybe-clean-stage3-target-libmpx: clean-stage3-target-libmpx
+clean-stage3: clean-stage3-target-libmpx
+clean-stage3-target-libmpx:
+ @if [ $(current_stage) = stage3 ]; then \
+ [ -f $(TARGET_SUBDIR)/libmpx/Makefile ] || exit 0; \
+ else \
+ [ -f $(TARGET_SUBDIR)/stage3-libmpx/Makefile ] || exit 0; \
+ $(MAKE) stage3-start; \
+ fi; \
+ cd $(TARGET_SUBDIR)/libmpx && \
+ $(MAKE) $(EXTRA_TARGET_FLAGS) clean
+@endif target-libmpx-bootstrap
+
+
+.PHONY: all-stage4-target-libmpx maybe-all-stage4-target-libmpx
+.PHONY: clean-stage4-target-libmpx maybe-clean-stage4-target-libmpx
+maybe-all-stage4-target-libmpx:
+maybe-clean-stage4-target-libmpx:
+@if target-libmpx-bootstrap
+maybe-all-stage4-target-libmpx: all-stage4-target-libmpx
+all-stage4: all-stage4-target-libmpx
+TARGET-stage4-target-libmpx = $(TARGET-target-libmpx)
+all-stage4-target-libmpx: configure-stage4-target-libmpx
+ @[ $(current_stage) = stage4 ] || $(MAKE) stage4-start
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ TFLAGS="$(STAGE4_TFLAGS)"; \
+ $(NORMAL_TARGET_EXPORTS) \
+ \
+ cd $(TARGET_SUBDIR)/libmpx && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) \
+ CFLAGS="$(CFLAGS_FOR_TARGET)" \
+ CXXFLAGS="$(CXXFLAGS_FOR_TARGET)" \
+ LIBCFLAGS="$(LIBCFLAGS_FOR_TARGET)" \
+ CFLAGS_FOR_TARGET="$(CFLAGS_FOR_TARGET)" \
+ CXXFLAGS_FOR_TARGET="$(CXXFLAGS_FOR_TARGET)" \
+ LIBCFLAGS_FOR_TARGET="$(LIBCFLAGS_FOR_TARGET)" \
+ $(EXTRA_TARGET_FLAGS) \
+ TFLAGS="$(STAGE4_TFLAGS)" \
+ $(TARGET-stage4-target-libmpx)
+
+maybe-clean-stage4-target-libmpx: clean-stage4-target-libmpx
+clean-stage4: clean-stage4-target-libmpx
+clean-stage4-target-libmpx:
+ @if [ $(current_stage) = stage4 ]; then \
+ [ -f $(TARGET_SUBDIR)/libmpx/Makefile ] || exit 0; \
+ else \
+ [ -f $(TARGET_SUBDIR)/stage4-libmpx/Makefile ] || exit 0; \
+ $(MAKE) stage4-start; \
+ fi; \
+ cd $(TARGET_SUBDIR)/libmpx && \
+ $(MAKE) $(EXTRA_TARGET_FLAGS) clean
+@endif target-libmpx-bootstrap
+
+
+.PHONY: all-stageprofile-target-libmpx maybe-all-stageprofile-target-libmpx
+.PHONY: clean-stageprofile-target-libmpx maybe-clean-stageprofile-target-libmpx
+maybe-all-stageprofile-target-libmpx:
+maybe-clean-stageprofile-target-libmpx:
+@if target-libmpx-bootstrap
+maybe-all-stageprofile-target-libmpx: all-stageprofile-target-libmpx
+all-stageprofile: all-stageprofile-target-libmpx
+TARGET-stageprofile-target-libmpx = $(TARGET-target-libmpx)
+all-stageprofile-target-libmpx: configure-stageprofile-target-libmpx
+ @[ $(current_stage) = stageprofile ] || $(MAKE) stageprofile-start
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ TFLAGS="$(STAGEprofile_TFLAGS)"; \
+ $(NORMAL_TARGET_EXPORTS) \
+ \
+ cd $(TARGET_SUBDIR)/libmpx && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) \
+ CFLAGS="$(CFLAGS_FOR_TARGET)" \
+ CXXFLAGS="$(CXXFLAGS_FOR_TARGET)" \
+ LIBCFLAGS="$(LIBCFLAGS_FOR_TARGET)" \
+ CFLAGS_FOR_TARGET="$(CFLAGS_FOR_TARGET)" \
+ CXXFLAGS_FOR_TARGET="$(CXXFLAGS_FOR_TARGET)" \
+ LIBCFLAGS_FOR_TARGET="$(LIBCFLAGS_FOR_TARGET)" \
+ $(EXTRA_TARGET_FLAGS) \
+ TFLAGS="$(STAGEprofile_TFLAGS)" \
+ $(TARGET-stageprofile-target-libmpx)
+
+maybe-clean-stageprofile-target-libmpx: clean-stageprofile-target-libmpx
+clean-stageprofile: clean-stageprofile-target-libmpx
+clean-stageprofile-target-libmpx:
+ @if [ $(current_stage) = stageprofile ]; then \
+ [ -f $(TARGET_SUBDIR)/libmpx/Makefile ] || exit 0; \
+ else \
+ [ -f $(TARGET_SUBDIR)/stageprofile-libmpx/Makefile ] || exit 0; \
+ $(MAKE) stageprofile-start; \
+ fi; \
+ cd $(TARGET_SUBDIR)/libmpx && \
+ $(MAKE) $(EXTRA_TARGET_FLAGS) clean
+@endif target-libmpx-bootstrap
+
+
+.PHONY: all-stagefeedback-target-libmpx maybe-all-stagefeedback-target-libmpx
+.PHONY: clean-stagefeedback-target-libmpx maybe-clean-stagefeedback-target-libmpx
+maybe-all-stagefeedback-target-libmpx:
+maybe-clean-stagefeedback-target-libmpx:
+@if target-libmpx-bootstrap
+maybe-all-stagefeedback-target-libmpx: all-stagefeedback-target-libmpx
+all-stagefeedback: all-stagefeedback-target-libmpx
+TARGET-stagefeedback-target-libmpx = $(TARGET-target-libmpx)
+all-stagefeedback-target-libmpx: configure-stagefeedback-target-libmpx
+ @[ $(current_stage) = stagefeedback ] || $(MAKE) stagefeedback-start
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ TFLAGS="$(STAGEfeedback_TFLAGS)"; \
+ $(NORMAL_TARGET_EXPORTS) \
+ \
+ cd $(TARGET_SUBDIR)/libmpx && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) \
+ CFLAGS="$(CFLAGS_FOR_TARGET)" \
+ CXXFLAGS="$(CXXFLAGS_FOR_TARGET)" \
+ LIBCFLAGS="$(LIBCFLAGS_FOR_TARGET)" \
+ CFLAGS_FOR_TARGET="$(CFLAGS_FOR_TARGET)" \
+ CXXFLAGS_FOR_TARGET="$(CXXFLAGS_FOR_TARGET)" \
+ LIBCFLAGS_FOR_TARGET="$(LIBCFLAGS_FOR_TARGET)" \
+ $(EXTRA_TARGET_FLAGS) \
+ TFLAGS="$(STAGEfeedback_TFLAGS)" \
+ $(TARGET-stagefeedback-target-libmpx)
+
+maybe-clean-stagefeedback-target-libmpx: clean-stagefeedback-target-libmpx
+clean-stagefeedback: clean-stagefeedback-target-libmpx
+clean-stagefeedback-target-libmpx:
+ @if [ $(current_stage) = stagefeedback ]; then \
+ [ -f $(TARGET_SUBDIR)/libmpx/Makefile ] || exit 0; \
+ else \
+ [ -f $(TARGET_SUBDIR)/stagefeedback-libmpx/Makefile ] || exit 0; \
+ $(MAKE) stagefeedback-start; \
+ fi; \
+ cd $(TARGET_SUBDIR)/libmpx && \
+ $(MAKE) $(EXTRA_TARGET_FLAGS) clean
+@endif target-libmpx-bootstrap
+
+
+
+
+
+
+.PHONY: check-target-libmpx maybe-check-target-libmpx
+maybe-check-target-libmpx:
+@if target-libmpx
+maybe-check-target-libmpx: check-target-libmpx
+
+check-target-libmpx:
+ @: $(MAKE); $(unstage)
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(NORMAL_TARGET_EXPORTS) \
+ (cd $(TARGET_SUBDIR)/libmpx && \
+ $(MAKE) $(TARGET_FLAGS_TO_PASS) check)
+
+@endif target-libmpx
+
+.PHONY: install-target-libmpx maybe-install-target-libmpx
+maybe-install-target-libmpx:
+@if target-libmpx
+maybe-install-target-libmpx: install-target-libmpx
+
+install-target-libmpx: installdirs
+ @: $(MAKE); $(unstage)
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(NORMAL_TARGET_EXPORTS) \
+ (cd $(TARGET_SUBDIR)/libmpx && \
+ $(MAKE) $(TARGET_FLAGS_TO_PASS) install)
+
+@endif target-libmpx
+
+.PHONY: install-strip-target-libmpx maybe-install-strip-target-libmpx
+maybe-install-strip-target-libmpx:
+@if target-libmpx
+maybe-install-strip-target-libmpx: install-strip-target-libmpx
+
+install-strip-target-libmpx: installdirs
+ @: $(MAKE); $(unstage)
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(NORMAL_TARGET_EXPORTS) \
+ (cd $(TARGET_SUBDIR)/libmpx && \
+ $(MAKE) $(TARGET_FLAGS_TO_PASS) install-strip)
+
+@endif target-libmpx
+
+# Other targets (info, dvi, pdf, etc.)
+
+.PHONY: maybe-info-target-libmpx info-target-libmpx
+maybe-info-target-libmpx:
+@if target-libmpx
+maybe-info-target-libmpx: info-target-libmpx
+
+info-target-libmpx: \
+ configure-target-libmpx
+ @: $(MAKE); $(unstage)
+ @[ -f $(TARGET_SUBDIR)/libmpx/Makefile ] || exit 0; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(NORMAL_TARGET_EXPORTS) \
+ echo "Doing info in $(TARGET_SUBDIR)/libmpx"; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/libmpx && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
+ info) \
+ || exit 1
+
+@endif target-libmpx
+
+.PHONY: maybe-dvi-target-libmpx dvi-target-libmpx
+maybe-dvi-target-libmpx:
+@if target-libmpx
+maybe-dvi-target-libmpx: dvi-target-libmpx
+
+dvi-target-libmpx: \
+ configure-target-libmpx
+ @: $(MAKE); $(unstage)
+ @[ -f $(TARGET_SUBDIR)/libmpx/Makefile ] || exit 0; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(NORMAL_TARGET_EXPORTS) \
+ echo "Doing dvi in $(TARGET_SUBDIR)/libmpx"; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/libmpx && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
+ dvi) \
+ || exit 1
+
+@endif target-libmpx
+
+.PHONY: maybe-pdf-target-libmpx pdf-target-libmpx
+maybe-pdf-target-libmpx:
+@if target-libmpx
+maybe-pdf-target-libmpx: pdf-target-libmpx
+
+pdf-target-libmpx: \
+ configure-target-libmpx
+ @: $(MAKE); $(unstage)
+ @[ -f $(TARGET_SUBDIR)/libmpx/Makefile ] || exit 0; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(NORMAL_TARGET_EXPORTS) \
+ echo "Doing pdf in $(TARGET_SUBDIR)/libmpx"; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/libmpx && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
+ pdf) \
+ || exit 1
+
+@endif target-libmpx
+
+.PHONY: maybe-html-target-libmpx html-target-libmpx
+maybe-html-target-libmpx:
+@if target-libmpx
+maybe-html-target-libmpx: html-target-libmpx
+
+html-target-libmpx: \
+ configure-target-libmpx
+ @: $(MAKE); $(unstage)
+ @[ -f $(TARGET_SUBDIR)/libmpx/Makefile ] || exit 0; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(NORMAL_TARGET_EXPORTS) \
+ echo "Doing html in $(TARGET_SUBDIR)/libmpx"; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/libmpx && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
+ html) \
+ || exit 1
+
+@endif target-libmpx
+
+.PHONY: maybe-TAGS-target-libmpx TAGS-target-libmpx
+maybe-TAGS-target-libmpx:
+@if target-libmpx
+maybe-TAGS-target-libmpx: TAGS-target-libmpx
+
+TAGS-target-libmpx: \
+ configure-target-libmpx
+ @: $(MAKE); $(unstage)
+ @[ -f $(TARGET_SUBDIR)/libmpx/Makefile ] || exit 0; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(NORMAL_TARGET_EXPORTS) \
+ echo "Doing TAGS in $(TARGET_SUBDIR)/libmpx"; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/libmpx && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
+ TAGS) \
+ || exit 1
+
+@endif target-libmpx
+
+.PHONY: maybe-install-info-target-libmpx install-info-target-libmpx
+maybe-install-info-target-libmpx:
+@if target-libmpx
+maybe-install-info-target-libmpx: install-info-target-libmpx
+
+install-info-target-libmpx: \
+ configure-target-libmpx \
+ info-target-libmpx
+ @: $(MAKE); $(unstage)
+ @[ -f $(TARGET_SUBDIR)/libmpx/Makefile ] || exit 0; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(NORMAL_TARGET_EXPORTS) \
+ echo "Doing install-info in $(TARGET_SUBDIR)/libmpx"; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/libmpx && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
+ install-info) \
+ || exit 1
+
+@endif target-libmpx
+
+.PHONY: maybe-install-pdf-target-libmpx install-pdf-target-libmpx
+maybe-install-pdf-target-libmpx:
+@if target-libmpx
+maybe-install-pdf-target-libmpx: install-pdf-target-libmpx
+
+install-pdf-target-libmpx: \
+ configure-target-libmpx \
+ pdf-target-libmpx
+ @: $(MAKE); $(unstage)
+ @[ -f $(TARGET_SUBDIR)/libmpx/Makefile ] || exit 0; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(NORMAL_TARGET_EXPORTS) \
+ echo "Doing install-pdf in $(TARGET_SUBDIR)/libmpx"; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/libmpx && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
+ install-pdf) \
+ || exit 1
+
+@endif target-libmpx
+
+.PHONY: maybe-install-html-target-libmpx install-html-target-libmpx
+maybe-install-html-target-libmpx:
+@if target-libmpx
+maybe-install-html-target-libmpx: install-html-target-libmpx
+
+install-html-target-libmpx: \
+ configure-target-libmpx \
+ html-target-libmpx
+ @: $(MAKE); $(unstage)
+ @[ -f $(TARGET_SUBDIR)/libmpx/Makefile ] || exit 0; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(NORMAL_TARGET_EXPORTS) \
+ echo "Doing install-html in $(TARGET_SUBDIR)/libmpx"; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/libmpx && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
+ install-html) \
+ || exit 1
+
+@endif target-libmpx
+
+.PHONY: maybe-installcheck-target-libmpx installcheck-target-libmpx
+maybe-installcheck-target-libmpx:
+@if target-libmpx
+maybe-installcheck-target-libmpx: installcheck-target-libmpx
+
+installcheck-target-libmpx: \
+ configure-target-libmpx
+ @: $(MAKE); $(unstage)
+ @[ -f $(TARGET_SUBDIR)/libmpx/Makefile ] || exit 0; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(NORMAL_TARGET_EXPORTS) \
+ echo "Doing installcheck in $(TARGET_SUBDIR)/libmpx"; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/libmpx && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
+ installcheck) \
+ || exit 1
+
+@endif target-libmpx
+
+.PHONY: maybe-mostlyclean-target-libmpx mostlyclean-target-libmpx
+maybe-mostlyclean-target-libmpx:
+@if target-libmpx
+maybe-mostlyclean-target-libmpx: mostlyclean-target-libmpx
+
+mostlyclean-target-libmpx:
+ @: $(MAKE); $(unstage)
+ @[ -f $(TARGET_SUBDIR)/libmpx/Makefile ] || exit 0; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(NORMAL_TARGET_EXPORTS) \
+ echo "Doing mostlyclean in $(TARGET_SUBDIR)/libmpx"; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/libmpx && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
+ mostlyclean) \
+ || exit 1
+
+@endif target-libmpx
+
+.PHONY: maybe-clean-target-libmpx clean-target-libmpx
+maybe-clean-target-libmpx:
+@if target-libmpx
+maybe-clean-target-libmpx: clean-target-libmpx
+
+clean-target-libmpx:
+ @: $(MAKE); $(unstage)
+ @[ -f $(TARGET_SUBDIR)/libmpx/Makefile ] || exit 0; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(NORMAL_TARGET_EXPORTS) \
+ echo "Doing clean in $(TARGET_SUBDIR)/libmpx"; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/libmpx && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
+ clean) \
+ || exit 1
+
+@endif target-libmpx
+
+.PHONY: maybe-distclean-target-libmpx distclean-target-libmpx
+maybe-distclean-target-libmpx:
+@if target-libmpx
+maybe-distclean-target-libmpx: distclean-target-libmpx
+
+distclean-target-libmpx:
+ @: $(MAKE); $(unstage)
+ @[ -f $(TARGET_SUBDIR)/libmpx/Makefile ] || exit 0; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(NORMAL_TARGET_EXPORTS) \
+ echo "Doing distclean in $(TARGET_SUBDIR)/libmpx"; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/libmpx && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
+ distclean) \
+ || exit 1
+
+@endif target-libmpx
+
+.PHONY: maybe-maintainer-clean-target-libmpx maintainer-clean-target-libmpx
+maybe-maintainer-clean-target-libmpx:
+@if target-libmpx
+maybe-maintainer-clean-target-libmpx: maintainer-clean-target-libmpx
+
+maintainer-clean-target-libmpx:
+ @: $(MAKE); $(unstage)
+ @[ -f $(TARGET_SUBDIR)/libmpx/Makefile ] || exit 0; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(NORMAL_TARGET_EXPORTS) \
+ echo "Doing maintainer-clean in $(TARGET_SUBDIR)/libmpx"; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/libmpx && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
+ maintainer-clean) \
+ || exit 1
+
+@endif target-libmpx
+
+
+
+
+
.PHONY: configure-target-libvtv maybe-configure-target-libvtv
maybe-configure-target-libvtv:
@if gcc-bootstrap
@@ -33187,8 +35695,8 @@ configure-target-libvtv:
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
echo "Checking multilib configuration for libvtv..."; \
- $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libvtv ; \
- $(CC_FOR_TARGET) --print-multi-lib > $(TARGET_SUBDIR)/libvtv/multilib.tmp 2> /dev/null ; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libvtv; \
+ $(CC_FOR_TARGET) --print-multi-lib > $(TARGET_SUBDIR)/libvtv/multilib.tmp 2> /dev/null; \
if test -r $(TARGET_SUBDIR)/libvtv/multilib.out; then \
if cmp -s $(TARGET_SUBDIR)/libvtv/multilib.tmp $(TARGET_SUBDIR)/libvtv/multilib.out; then \
rm -f $(TARGET_SUBDIR)/libvtv/multilib.tmp; \
@@ -33200,7 +35708,7 @@ configure-target-libvtv:
mv $(TARGET_SUBDIR)/libvtv/multilib.tmp $(TARGET_SUBDIR)/libvtv/multilib.out; \
fi; \
test ! -f $(TARGET_SUBDIR)/libvtv/Makefile || exit 0; \
- $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libvtv ; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libvtv; \
$(RAW_CXX_TARGET_EXPORTS) \
echo Configuring in $(TARGET_SUBDIR)/libvtv; \
cd "$(TARGET_SUBDIR)/libvtv" || exit 1; \
@@ -33209,12 +35717,13 @@ configure-target-libvtv:
*) topdir=`echo $(TARGET_SUBDIR)/libvtv/ | \
sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
esac; \
- srcdiroption="--srcdir=$${topdir}/libvtv"; \
- libsrcdir="$$s/libvtv"; \
+ module_srcdir=libvtv; \
rm -f no-such-file || : ; \
- CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure \
+ CONFIG_SITE=no-such-file $(SHELL) \
+ $$s/$$module_srcdir/configure \
+ --srcdir=$${topdir}/$$module_srcdir \
$(TARGET_CONFIGARGS) --build=${build_alias} --host=${target_alias} \
- --target=${target_alias} $${srcdiroption} \
+ --target=${target_alias} \
|| exit 1
@endif target-libvtv
@@ -33231,7 +35740,7 @@ configure-stage1-target-libvtv:
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
TFLAGS="$(STAGE1_TFLAGS)"; \
echo "Checking multilib configuration for libvtv..."; \
- $(CC_FOR_TARGET) --print-multi-lib > $(TARGET_SUBDIR)/libvtv/multilib.tmp 2> /dev/null ; \
+ $(CC_FOR_TARGET) --print-multi-lib > $(TARGET_SUBDIR)/libvtv/multilib.tmp 2> /dev/null; \
if test -r $(TARGET_SUBDIR)/libvtv/multilib.out; then \
if cmp -s $(TARGET_SUBDIR)/libvtv/multilib.tmp $(TARGET_SUBDIR)/libvtv/multilib.out; then \
rm -f $(TARGET_SUBDIR)/libvtv/multilib.tmp; \
@@ -33247,19 +35756,20 @@ configure-stage1-target-libvtv:
CFLAGS="$(CFLAGS_FOR_TARGET)"; export CFLAGS; \
CXXFLAGS="$(CXXFLAGS_FOR_TARGET)"; export CXXFLAGS; \
LIBCFLAGS="$(LIBCFLAGS_FOR_TARGET)"; export LIBCFLAGS; \
- echo Configuring stage 1 in $(TARGET_SUBDIR)/libvtv ; \
- $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libvtv ; \
+ echo Configuring stage 1 in $(TARGET_SUBDIR)/libvtv; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libvtv; \
cd $(TARGET_SUBDIR)/libvtv || exit 1; \
case $(srcdir) in \
/* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
*) topdir=`echo $(TARGET_SUBDIR)/libvtv/ | \
sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
esac; \
- srcdiroption="--srcdir=$${topdir}/libvtv"; \
- libsrcdir="$$s/libvtv"; \
- $(SHELL) $${libsrcdir}/configure \
+ module_srcdir=libvtv; \
+ $(SHELL) $$s/$$module_srcdir/configure \
+ --srcdir=$${topdir}/$$module_srcdir \
$(TARGET_CONFIGARGS) --build=${build_alias} --host=${target_alias} \
- --target=${target_alias} $${srcdiroption} \
+ --target=${target_alias} \
+ \
$(STAGE1_CONFIGURE_FLAGS)
@endif target-libvtv-bootstrap
@@ -33274,7 +35784,7 @@ configure-stage2-target-libvtv:
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
TFLAGS="$(STAGE2_TFLAGS)"; \
echo "Checking multilib configuration for libvtv..."; \
- $(CC_FOR_TARGET) --print-multi-lib > $(TARGET_SUBDIR)/libvtv/multilib.tmp 2> /dev/null ; \
+ $(CC_FOR_TARGET) --print-multi-lib > $(TARGET_SUBDIR)/libvtv/multilib.tmp 2> /dev/null; \
if test -r $(TARGET_SUBDIR)/libvtv/multilib.out; then \
if cmp -s $(TARGET_SUBDIR)/libvtv/multilib.tmp $(TARGET_SUBDIR)/libvtv/multilib.out; then \
rm -f $(TARGET_SUBDIR)/libvtv/multilib.tmp; \
@@ -33291,19 +35801,19 @@ configure-stage2-target-libvtv:
CFLAGS="$(CFLAGS_FOR_TARGET)"; export CFLAGS; \
CXXFLAGS="$(CXXFLAGS_FOR_TARGET)"; export CXXFLAGS; \
LIBCFLAGS="$(LIBCFLAGS_FOR_TARGET)"; export LIBCFLAGS; \
- echo Configuring stage 2 in $(TARGET_SUBDIR)/libvtv ; \
- $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libvtv ; \
+ echo Configuring stage 2 in $(TARGET_SUBDIR)/libvtv; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libvtv; \
cd $(TARGET_SUBDIR)/libvtv || exit 1; \
case $(srcdir) in \
/* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
*) topdir=`echo $(TARGET_SUBDIR)/libvtv/ | \
sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
esac; \
- srcdiroption="--srcdir=$${topdir}/libvtv"; \
- libsrcdir="$$s/libvtv"; \
- $(SHELL) $${libsrcdir}/configure \
+ module_srcdir=libvtv; \
+ $(SHELL) $$s/$$module_srcdir/configure \
+ --srcdir=$${topdir}/$$module_srcdir \
$(TARGET_CONFIGARGS) --build=${build_alias} --host=${target_alias} \
- --target=${target_alias} $${srcdiroption} \
+ --target=${target_alias} \
--with-build-libsubdir=$(HOST_SUBDIR) \
$(STAGE2_CONFIGURE_FLAGS)
@endif target-libvtv-bootstrap
@@ -33319,7 +35829,7 @@ configure-stage3-target-libvtv:
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
TFLAGS="$(STAGE3_TFLAGS)"; \
echo "Checking multilib configuration for libvtv..."; \
- $(CC_FOR_TARGET) --print-multi-lib > $(TARGET_SUBDIR)/libvtv/multilib.tmp 2> /dev/null ; \
+ $(CC_FOR_TARGET) --print-multi-lib > $(TARGET_SUBDIR)/libvtv/multilib.tmp 2> /dev/null; \
if test -r $(TARGET_SUBDIR)/libvtv/multilib.out; then \
if cmp -s $(TARGET_SUBDIR)/libvtv/multilib.tmp $(TARGET_SUBDIR)/libvtv/multilib.out; then \
rm -f $(TARGET_SUBDIR)/libvtv/multilib.tmp; \
@@ -33336,19 +35846,19 @@ configure-stage3-target-libvtv:
CFLAGS="$(CFLAGS_FOR_TARGET)"; export CFLAGS; \
CXXFLAGS="$(CXXFLAGS_FOR_TARGET)"; export CXXFLAGS; \
LIBCFLAGS="$(LIBCFLAGS_FOR_TARGET)"; export LIBCFLAGS; \
- echo Configuring stage 3 in $(TARGET_SUBDIR)/libvtv ; \
- $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libvtv ; \
+ echo Configuring stage 3 in $(TARGET_SUBDIR)/libvtv; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libvtv; \
cd $(TARGET_SUBDIR)/libvtv || exit 1; \
case $(srcdir) in \
/* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
*) topdir=`echo $(TARGET_SUBDIR)/libvtv/ | \
sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
esac; \
- srcdiroption="--srcdir=$${topdir}/libvtv"; \
- libsrcdir="$$s/libvtv"; \
- $(SHELL) $${libsrcdir}/configure \
+ module_srcdir=libvtv; \
+ $(SHELL) $$s/$$module_srcdir/configure \
+ --srcdir=$${topdir}/$$module_srcdir \
$(TARGET_CONFIGARGS) --build=${build_alias} --host=${target_alias} \
- --target=${target_alias} $${srcdiroption} \
+ --target=${target_alias} \
--with-build-libsubdir=$(HOST_SUBDIR) \
$(STAGE3_CONFIGURE_FLAGS)
@endif target-libvtv-bootstrap
@@ -33364,7 +35874,7 @@ configure-stage4-target-libvtv:
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
TFLAGS="$(STAGE4_TFLAGS)"; \
echo "Checking multilib configuration for libvtv..."; \
- $(CC_FOR_TARGET) --print-multi-lib > $(TARGET_SUBDIR)/libvtv/multilib.tmp 2> /dev/null ; \
+ $(CC_FOR_TARGET) --print-multi-lib > $(TARGET_SUBDIR)/libvtv/multilib.tmp 2> /dev/null; \
if test -r $(TARGET_SUBDIR)/libvtv/multilib.out; then \
if cmp -s $(TARGET_SUBDIR)/libvtv/multilib.tmp $(TARGET_SUBDIR)/libvtv/multilib.out; then \
rm -f $(TARGET_SUBDIR)/libvtv/multilib.tmp; \
@@ -33381,19 +35891,19 @@ configure-stage4-target-libvtv:
CFLAGS="$(CFLAGS_FOR_TARGET)"; export CFLAGS; \
CXXFLAGS="$(CXXFLAGS_FOR_TARGET)"; export CXXFLAGS; \
LIBCFLAGS="$(LIBCFLAGS_FOR_TARGET)"; export LIBCFLAGS; \
- echo Configuring stage 4 in $(TARGET_SUBDIR)/libvtv ; \
- $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libvtv ; \
+ echo Configuring stage 4 in $(TARGET_SUBDIR)/libvtv; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libvtv; \
cd $(TARGET_SUBDIR)/libvtv || exit 1; \
case $(srcdir) in \
/* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
*) topdir=`echo $(TARGET_SUBDIR)/libvtv/ | \
sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
esac; \
- srcdiroption="--srcdir=$${topdir}/libvtv"; \
- libsrcdir="$$s/libvtv"; \
- $(SHELL) $${libsrcdir}/configure \
+ module_srcdir=libvtv; \
+ $(SHELL) $$s/$$module_srcdir/configure \
+ --srcdir=$${topdir}/$$module_srcdir \
$(TARGET_CONFIGARGS) --build=${build_alias} --host=${target_alias} \
- --target=${target_alias} $${srcdiroption} \
+ --target=${target_alias} \
--with-build-libsubdir=$(HOST_SUBDIR) \
$(STAGE4_CONFIGURE_FLAGS)
@endif target-libvtv-bootstrap
@@ -33409,7 +35919,7 @@ configure-stageprofile-target-libvtv:
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
TFLAGS="$(STAGEprofile_TFLAGS)"; \
echo "Checking multilib configuration for libvtv..."; \
- $(CC_FOR_TARGET) --print-multi-lib > $(TARGET_SUBDIR)/libvtv/multilib.tmp 2> /dev/null ; \
+ $(CC_FOR_TARGET) --print-multi-lib > $(TARGET_SUBDIR)/libvtv/multilib.tmp 2> /dev/null; \
if test -r $(TARGET_SUBDIR)/libvtv/multilib.out; then \
if cmp -s $(TARGET_SUBDIR)/libvtv/multilib.tmp $(TARGET_SUBDIR)/libvtv/multilib.out; then \
rm -f $(TARGET_SUBDIR)/libvtv/multilib.tmp; \
@@ -33426,19 +35936,19 @@ configure-stageprofile-target-libvtv:
CFLAGS="$(CFLAGS_FOR_TARGET)"; export CFLAGS; \
CXXFLAGS="$(CXXFLAGS_FOR_TARGET)"; export CXXFLAGS; \
LIBCFLAGS="$(LIBCFLAGS_FOR_TARGET)"; export LIBCFLAGS; \
- echo Configuring stage profile in $(TARGET_SUBDIR)/libvtv ; \
- $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libvtv ; \
+ echo Configuring stage profile in $(TARGET_SUBDIR)/libvtv; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libvtv; \
cd $(TARGET_SUBDIR)/libvtv || exit 1; \
case $(srcdir) in \
/* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
*) topdir=`echo $(TARGET_SUBDIR)/libvtv/ | \
sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
esac; \
- srcdiroption="--srcdir=$${topdir}/libvtv"; \
- libsrcdir="$$s/libvtv"; \
- $(SHELL) $${libsrcdir}/configure \
+ module_srcdir=libvtv; \
+ $(SHELL) $$s/$$module_srcdir/configure \
+ --srcdir=$${topdir}/$$module_srcdir \
$(TARGET_CONFIGARGS) --build=${build_alias} --host=${target_alias} \
- --target=${target_alias} $${srcdiroption} \
+ --target=${target_alias} \
--with-build-libsubdir=$(HOST_SUBDIR) \
$(STAGEprofile_CONFIGURE_FLAGS)
@endif target-libvtv-bootstrap
@@ -33454,7 +35964,7 @@ configure-stagefeedback-target-libvtv:
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
TFLAGS="$(STAGEfeedback_TFLAGS)"; \
echo "Checking multilib configuration for libvtv..."; \
- $(CC_FOR_TARGET) --print-multi-lib > $(TARGET_SUBDIR)/libvtv/multilib.tmp 2> /dev/null ; \
+ $(CC_FOR_TARGET) --print-multi-lib > $(TARGET_SUBDIR)/libvtv/multilib.tmp 2> /dev/null; \
if test -r $(TARGET_SUBDIR)/libvtv/multilib.out; then \
if cmp -s $(TARGET_SUBDIR)/libvtv/multilib.tmp $(TARGET_SUBDIR)/libvtv/multilib.out; then \
rm -f $(TARGET_SUBDIR)/libvtv/multilib.tmp; \
@@ -33471,19 +35981,19 @@ configure-stagefeedback-target-libvtv:
CFLAGS="$(CFLAGS_FOR_TARGET)"; export CFLAGS; \
CXXFLAGS="$(CXXFLAGS_FOR_TARGET)"; export CXXFLAGS; \
LIBCFLAGS="$(LIBCFLAGS_FOR_TARGET)"; export LIBCFLAGS; \
- echo Configuring stage feedback in $(TARGET_SUBDIR)/libvtv ; \
- $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libvtv ; \
+ echo Configuring stage feedback in $(TARGET_SUBDIR)/libvtv; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libvtv; \
cd $(TARGET_SUBDIR)/libvtv || exit 1; \
case $(srcdir) in \
/* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
*) topdir=`echo $(TARGET_SUBDIR)/libvtv/ | \
sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
esac; \
- srcdiroption="--srcdir=$${topdir}/libvtv"; \
- libsrcdir="$$s/libvtv"; \
- $(SHELL) $${libsrcdir}/configure \
+ module_srcdir=libvtv; \
+ $(SHELL) $$s/$$module_srcdir/configure \
+ --srcdir=$${topdir}/$$module_srcdir \
$(TARGET_CONFIGARGS) --build=${build_alias} --host=${target_alias} \
- --target=${target_alias} $${srcdiroption} \
+ --target=${target_alias} \
--with-build-libsubdir=$(HOST_SUBDIR) \
$(STAGEfeedback_CONFIGURE_FLAGS)
@endif target-libvtv-bootstrap
@@ -33817,11 +36327,11 @@ maybe-info-target-libvtv: info-target-libvtv
info-target-libvtv: \
configure-target-libvtv
@: $(MAKE); $(unstage)
- @[ -f $(TARGET_SUBDIR)/libvtv/Makefile ] || exit 0 ; \
+ @[ -f $(TARGET_SUBDIR)/libvtv/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(RAW_CXX_TARGET_EXPORTS) \
- echo "Doing info in $(TARGET_SUBDIR)/libvtv" ; \
+ echo "Doing info in $(TARGET_SUBDIR)/libvtv"; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
@@ -33843,11 +36353,11 @@ maybe-dvi-target-libvtv: dvi-target-libvtv
dvi-target-libvtv: \
configure-target-libvtv
@: $(MAKE); $(unstage)
- @[ -f $(TARGET_SUBDIR)/libvtv/Makefile ] || exit 0 ; \
+ @[ -f $(TARGET_SUBDIR)/libvtv/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(RAW_CXX_TARGET_EXPORTS) \
- echo "Doing dvi in $(TARGET_SUBDIR)/libvtv" ; \
+ echo "Doing dvi in $(TARGET_SUBDIR)/libvtv"; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
@@ -33869,11 +36379,11 @@ maybe-pdf-target-libvtv: pdf-target-libvtv
pdf-target-libvtv: \
configure-target-libvtv
@: $(MAKE); $(unstage)
- @[ -f $(TARGET_SUBDIR)/libvtv/Makefile ] || exit 0 ; \
+ @[ -f $(TARGET_SUBDIR)/libvtv/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(RAW_CXX_TARGET_EXPORTS) \
- echo "Doing pdf in $(TARGET_SUBDIR)/libvtv" ; \
+ echo "Doing pdf in $(TARGET_SUBDIR)/libvtv"; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
@@ -33895,11 +36405,11 @@ maybe-html-target-libvtv: html-target-libvtv
html-target-libvtv: \
configure-target-libvtv
@: $(MAKE); $(unstage)
- @[ -f $(TARGET_SUBDIR)/libvtv/Makefile ] || exit 0 ; \
+ @[ -f $(TARGET_SUBDIR)/libvtv/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(RAW_CXX_TARGET_EXPORTS) \
- echo "Doing html in $(TARGET_SUBDIR)/libvtv" ; \
+ echo "Doing html in $(TARGET_SUBDIR)/libvtv"; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
@@ -33921,11 +36431,11 @@ maybe-TAGS-target-libvtv: TAGS-target-libvtv
TAGS-target-libvtv: \
configure-target-libvtv
@: $(MAKE); $(unstage)
- @[ -f $(TARGET_SUBDIR)/libvtv/Makefile ] || exit 0 ; \
+ @[ -f $(TARGET_SUBDIR)/libvtv/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(RAW_CXX_TARGET_EXPORTS) \
- echo "Doing TAGS in $(TARGET_SUBDIR)/libvtv" ; \
+ echo "Doing TAGS in $(TARGET_SUBDIR)/libvtv"; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
@@ -33948,11 +36458,11 @@ install-info-target-libvtv: \
configure-target-libvtv \
info-target-libvtv
@: $(MAKE); $(unstage)
- @[ -f $(TARGET_SUBDIR)/libvtv/Makefile ] || exit 0 ; \
+ @[ -f $(TARGET_SUBDIR)/libvtv/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(RAW_CXX_TARGET_EXPORTS) \
- echo "Doing install-info in $(TARGET_SUBDIR)/libvtv" ; \
+ echo "Doing install-info in $(TARGET_SUBDIR)/libvtv"; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
@@ -33975,11 +36485,11 @@ install-pdf-target-libvtv: \
configure-target-libvtv \
pdf-target-libvtv
@: $(MAKE); $(unstage)
- @[ -f $(TARGET_SUBDIR)/libvtv/Makefile ] || exit 0 ; \
+ @[ -f $(TARGET_SUBDIR)/libvtv/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(RAW_CXX_TARGET_EXPORTS) \
- echo "Doing install-pdf in $(TARGET_SUBDIR)/libvtv" ; \
+ echo "Doing install-pdf in $(TARGET_SUBDIR)/libvtv"; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
@@ -34002,11 +36512,11 @@ install-html-target-libvtv: \
configure-target-libvtv \
html-target-libvtv
@: $(MAKE); $(unstage)
- @[ -f $(TARGET_SUBDIR)/libvtv/Makefile ] || exit 0 ; \
+ @[ -f $(TARGET_SUBDIR)/libvtv/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(RAW_CXX_TARGET_EXPORTS) \
- echo "Doing install-html in $(TARGET_SUBDIR)/libvtv" ; \
+ echo "Doing install-html in $(TARGET_SUBDIR)/libvtv"; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
@@ -34028,11 +36538,11 @@ maybe-installcheck-target-libvtv: installcheck-target-libvtv
installcheck-target-libvtv: \
configure-target-libvtv
@: $(MAKE); $(unstage)
- @[ -f $(TARGET_SUBDIR)/libvtv/Makefile ] || exit 0 ; \
+ @[ -f $(TARGET_SUBDIR)/libvtv/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(RAW_CXX_TARGET_EXPORTS) \
- echo "Doing installcheck in $(TARGET_SUBDIR)/libvtv" ; \
+ echo "Doing installcheck in $(TARGET_SUBDIR)/libvtv"; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
@@ -34053,11 +36563,11 @@ maybe-mostlyclean-target-libvtv: mostlyclean-target-libvtv
mostlyclean-target-libvtv:
@: $(MAKE); $(unstage)
- @[ -f $(TARGET_SUBDIR)/libvtv/Makefile ] || exit 0 ; \
+ @[ -f $(TARGET_SUBDIR)/libvtv/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(RAW_CXX_TARGET_EXPORTS) \
- echo "Doing mostlyclean in $(TARGET_SUBDIR)/libvtv" ; \
+ echo "Doing mostlyclean in $(TARGET_SUBDIR)/libvtv"; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
@@ -34078,11 +36588,11 @@ maybe-clean-target-libvtv: clean-target-libvtv
clean-target-libvtv:
@: $(MAKE); $(unstage)
- @[ -f $(TARGET_SUBDIR)/libvtv/Makefile ] || exit 0 ; \
+ @[ -f $(TARGET_SUBDIR)/libvtv/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(RAW_CXX_TARGET_EXPORTS) \
- echo "Doing clean in $(TARGET_SUBDIR)/libvtv" ; \
+ echo "Doing clean in $(TARGET_SUBDIR)/libvtv"; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
@@ -34103,11 +36613,11 @@ maybe-distclean-target-libvtv: distclean-target-libvtv
distclean-target-libvtv:
@: $(MAKE); $(unstage)
- @[ -f $(TARGET_SUBDIR)/libvtv/Makefile ] || exit 0 ; \
+ @[ -f $(TARGET_SUBDIR)/libvtv/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(RAW_CXX_TARGET_EXPORTS) \
- echo "Doing distclean in $(TARGET_SUBDIR)/libvtv" ; \
+ echo "Doing distclean in $(TARGET_SUBDIR)/libvtv"; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
@@ -34128,11 +36638,11 @@ maybe-maintainer-clean-target-libvtv: maintainer-clean-target-libvtv
maintainer-clean-target-libvtv:
@: $(MAKE); $(unstage)
- @[ -f $(TARGET_SUBDIR)/libvtv/Makefile ] || exit 0 ; \
+ @[ -f $(TARGET_SUBDIR)/libvtv/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(RAW_CXX_TARGET_EXPORTS) \
- echo "Doing maintainer-clean in $(TARGET_SUBDIR)/libvtv" ; \
+ echo "Doing maintainer-clean in $(TARGET_SUBDIR)/libvtv"; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
@@ -34150,6 +36660,922 @@ maintainer-clean-target-libvtv:
+.PHONY: configure-target-libcilkrts maybe-configure-target-libcilkrts
+maybe-configure-target-libcilkrts:
+@if gcc-bootstrap
+configure-target-libcilkrts: stage_current
+@endif gcc-bootstrap
+@if target-libcilkrts
+maybe-configure-target-libcilkrts: configure-target-libcilkrts
+configure-target-libcilkrts:
+ @: $(MAKE); $(unstage)
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ echo "Checking multilib configuration for libcilkrts..."; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libcilkrts; \
+ $(CC_FOR_TARGET) --print-multi-lib > $(TARGET_SUBDIR)/libcilkrts/multilib.tmp 2> /dev/null; \
+ if test -r $(TARGET_SUBDIR)/libcilkrts/multilib.out; then \
+ if cmp -s $(TARGET_SUBDIR)/libcilkrts/multilib.tmp $(TARGET_SUBDIR)/libcilkrts/multilib.out; then \
+ rm -f $(TARGET_SUBDIR)/libcilkrts/multilib.tmp; \
+ else \
+ rm -f $(TARGET_SUBDIR)/libcilkrts/Makefile; \
+ mv $(TARGET_SUBDIR)/libcilkrts/multilib.tmp $(TARGET_SUBDIR)/libcilkrts/multilib.out; \
+ fi; \
+ else \
+ mv $(TARGET_SUBDIR)/libcilkrts/multilib.tmp $(TARGET_SUBDIR)/libcilkrts/multilib.out; \
+ fi; \
+ test ! -f $(TARGET_SUBDIR)/libcilkrts/Makefile || exit 0; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libcilkrts; \
+ $(NORMAL_TARGET_EXPORTS) \
+ echo Configuring in $(TARGET_SUBDIR)/libcilkrts; \
+ cd "$(TARGET_SUBDIR)/libcilkrts" || exit 1; \
+ case $(srcdir) in \
+ /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+ *) topdir=`echo $(TARGET_SUBDIR)/libcilkrts/ | \
+ sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
+ esac; \
+ module_srcdir=libcilkrts; \
+ rm -f no-such-file || : ; \
+ CONFIG_SITE=no-such-file $(SHELL) \
+ $$s/$$module_srcdir/configure \
+ --srcdir=$${topdir}/$$module_srcdir \
+ $(TARGET_CONFIGARGS) --build=${build_alias} --host=${target_alias} \
+ --target=${target_alias} \
+ || exit 1
+@endif target-libcilkrts
+
+
+
+
+
+.PHONY: all-target-libcilkrts maybe-all-target-libcilkrts
+maybe-all-target-libcilkrts:
+@if gcc-bootstrap
+all-target-libcilkrts: stage_current
+@endif gcc-bootstrap
+@if target-libcilkrts
+TARGET-target-libcilkrts=all
+maybe-all-target-libcilkrts: all-target-libcilkrts
+all-target-libcilkrts: configure-target-libcilkrts
+ @: $(MAKE); $(unstage)
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(NORMAL_TARGET_EXPORTS) \
+ (cd $(TARGET_SUBDIR)/libcilkrts && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_TARGET_FLAGS) \
+ $(TARGET-target-libcilkrts))
+@endif target-libcilkrts
+
+
+
+
+
+.PHONY: check-target-libcilkrts maybe-check-target-libcilkrts
+maybe-check-target-libcilkrts:
+@if target-libcilkrts
+maybe-check-target-libcilkrts: check-target-libcilkrts
+
+check-target-libcilkrts:
+ @: $(MAKE); $(unstage)
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(NORMAL_TARGET_EXPORTS) \
+ (cd $(TARGET_SUBDIR)/libcilkrts && \
+ $(MAKE) $(TARGET_FLAGS_TO_PASS) check)
+
+@endif target-libcilkrts
+
+.PHONY: install-target-libcilkrts maybe-install-target-libcilkrts
+maybe-install-target-libcilkrts:
+@if target-libcilkrts
+maybe-install-target-libcilkrts: install-target-libcilkrts
+
+install-target-libcilkrts: installdirs
+ @: $(MAKE); $(unstage)
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(NORMAL_TARGET_EXPORTS) \
+ (cd $(TARGET_SUBDIR)/libcilkrts && \
+ $(MAKE) $(TARGET_FLAGS_TO_PASS) install)
+
+@endif target-libcilkrts
+
+.PHONY: install-strip-target-libcilkrts maybe-install-strip-target-libcilkrts
+maybe-install-strip-target-libcilkrts:
+@if target-libcilkrts
+maybe-install-strip-target-libcilkrts: install-strip-target-libcilkrts
+
+install-strip-target-libcilkrts: installdirs
+ @: $(MAKE); $(unstage)
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(NORMAL_TARGET_EXPORTS) \
+ (cd $(TARGET_SUBDIR)/libcilkrts && \
+ $(MAKE) $(TARGET_FLAGS_TO_PASS) install-strip)
+
+@endif target-libcilkrts
+
+# Other targets (info, dvi, pdf, etc.)
+
+.PHONY: maybe-info-target-libcilkrts info-target-libcilkrts
+maybe-info-target-libcilkrts:
+@if target-libcilkrts
+maybe-info-target-libcilkrts: info-target-libcilkrts
+
+info-target-libcilkrts: \
+ configure-target-libcilkrts
+ @: $(MAKE); $(unstage)
+ @[ -f $(TARGET_SUBDIR)/libcilkrts/Makefile ] || exit 0; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(NORMAL_TARGET_EXPORTS) \
+ echo "Doing info in $(TARGET_SUBDIR)/libcilkrts"; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/libcilkrts && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
+ info) \
+ || exit 1
+
+@endif target-libcilkrts
+
+.PHONY: maybe-dvi-target-libcilkrts dvi-target-libcilkrts
+maybe-dvi-target-libcilkrts:
+@if target-libcilkrts
+maybe-dvi-target-libcilkrts: dvi-target-libcilkrts
+
+dvi-target-libcilkrts: \
+ configure-target-libcilkrts
+ @: $(MAKE); $(unstage)
+ @[ -f $(TARGET_SUBDIR)/libcilkrts/Makefile ] || exit 0; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(NORMAL_TARGET_EXPORTS) \
+ echo "Doing dvi in $(TARGET_SUBDIR)/libcilkrts"; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/libcilkrts && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
+ dvi) \
+ || exit 1
+
+@endif target-libcilkrts
+
+.PHONY: maybe-pdf-target-libcilkrts pdf-target-libcilkrts
+maybe-pdf-target-libcilkrts:
+@if target-libcilkrts
+maybe-pdf-target-libcilkrts: pdf-target-libcilkrts
+
+pdf-target-libcilkrts: \
+ configure-target-libcilkrts
+ @: $(MAKE); $(unstage)
+ @[ -f $(TARGET_SUBDIR)/libcilkrts/Makefile ] || exit 0; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(NORMAL_TARGET_EXPORTS) \
+ echo "Doing pdf in $(TARGET_SUBDIR)/libcilkrts"; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/libcilkrts && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
+ pdf) \
+ || exit 1
+
+@endif target-libcilkrts
+
+.PHONY: maybe-html-target-libcilkrts html-target-libcilkrts
+maybe-html-target-libcilkrts:
+@if target-libcilkrts
+maybe-html-target-libcilkrts: html-target-libcilkrts
+
+html-target-libcilkrts: \
+ configure-target-libcilkrts
+ @: $(MAKE); $(unstage)
+ @[ -f $(TARGET_SUBDIR)/libcilkrts/Makefile ] || exit 0; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(NORMAL_TARGET_EXPORTS) \
+ echo "Doing html in $(TARGET_SUBDIR)/libcilkrts"; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/libcilkrts && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
+ html) \
+ || exit 1
+
+@endif target-libcilkrts
+
+.PHONY: maybe-TAGS-target-libcilkrts TAGS-target-libcilkrts
+maybe-TAGS-target-libcilkrts:
+@if target-libcilkrts
+maybe-TAGS-target-libcilkrts: TAGS-target-libcilkrts
+
+TAGS-target-libcilkrts: \
+ configure-target-libcilkrts
+ @: $(MAKE); $(unstage)
+ @[ -f $(TARGET_SUBDIR)/libcilkrts/Makefile ] || exit 0; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(NORMAL_TARGET_EXPORTS) \
+ echo "Doing TAGS in $(TARGET_SUBDIR)/libcilkrts"; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/libcilkrts && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
+ TAGS) \
+ || exit 1
+
+@endif target-libcilkrts
+
+.PHONY: maybe-install-info-target-libcilkrts install-info-target-libcilkrts
+maybe-install-info-target-libcilkrts:
+@if target-libcilkrts
+maybe-install-info-target-libcilkrts: install-info-target-libcilkrts
+
+install-info-target-libcilkrts: \
+ configure-target-libcilkrts \
+ info-target-libcilkrts
+ @: $(MAKE); $(unstage)
+ @[ -f $(TARGET_SUBDIR)/libcilkrts/Makefile ] || exit 0; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(NORMAL_TARGET_EXPORTS) \
+ echo "Doing install-info in $(TARGET_SUBDIR)/libcilkrts"; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/libcilkrts && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
+ install-info) \
+ || exit 1
+
+@endif target-libcilkrts
+
+.PHONY: maybe-install-pdf-target-libcilkrts install-pdf-target-libcilkrts
+maybe-install-pdf-target-libcilkrts:
+@if target-libcilkrts
+maybe-install-pdf-target-libcilkrts: install-pdf-target-libcilkrts
+
+install-pdf-target-libcilkrts: \
+ configure-target-libcilkrts \
+ pdf-target-libcilkrts
+ @: $(MAKE); $(unstage)
+ @[ -f $(TARGET_SUBDIR)/libcilkrts/Makefile ] || exit 0; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(NORMAL_TARGET_EXPORTS) \
+ echo "Doing install-pdf in $(TARGET_SUBDIR)/libcilkrts"; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/libcilkrts && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
+ install-pdf) \
+ || exit 1
+
+@endif target-libcilkrts
+
+.PHONY: maybe-install-html-target-libcilkrts install-html-target-libcilkrts
+maybe-install-html-target-libcilkrts:
+@if target-libcilkrts
+maybe-install-html-target-libcilkrts: install-html-target-libcilkrts
+
+install-html-target-libcilkrts: \
+ configure-target-libcilkrts \
+ html-target-libcilkrts
+ @: $(MAKE); $(unstage)
+ @[ -f $(TARGET_SUBDIR)/libcilkrts/Makefile ] || exit 0; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(NORMAL_TARGET_EXPORTS) \
+ echo "Doing install-html in $(TARGET_SUBDIR)/libcilkrts"; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/libcilkrts && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
+ install-html) \
+ || exit 1
+
+@endif target-libcilkrts
+
+.PHONY: maybe-installcheck-target-libcilkrts installcheck-target-libcilkrts
+maybe-installcheck-target-libcilkrts:
+@if target-libcilkrts
+maybe-installcheck-target-libcilkrts: installcheck-target-libcilkrts
+
+installcheck-target-libcilkrts: \
+ configure-target-libcilkrts
+ @: $(MAKE); $(unstage)
+ @[ -f $(TARGET_SUBDIR)/libcilkrts/Makefile ] || exit 0; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(NORMAL_TARGET_EXPORTS) \
+ echo "Doing installcheck in $(TARGET_SUBDIR)/libcilkrts"; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/libcilkrts && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
+ installcheck) \
+ || exit 1
+
+@endif target-libcilkrts
+
+.PHONY: maybe-mostlyclean-target-libcilkrts mostlyclean-target-libcilkrts
+maybe-mostlyclean-target-libcilkrts:
+@if target-libcilkrts
+maybe-mostlyclean-target-libcilkrts: mostlyclean-target-libcilkrts
+
+mostlyclean-target-libcilkrts:
+ @: $(MAKE); $(unstage)
+ @[ -f $(TARGET_SUBDIR)/libcilkrts/Makefile ] || exit 0; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(NORMAL_TARGET_EXPORTS) \
+ echo "Doing mostlyclean in $(TARGET_SUBDIR)/libcilkrts"; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/libcilkrts && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
+ mostlyclean) \
+ || exit 1
+
+@endif target-libcilkrts
+
+.PHONY: maybe-clean-target-libcilkrts clean-target-libcilkrts
+maybe-clean-target-libcilkrts:
+@if target-libcilkrts
+maybe-clean-target-libcilkrts: clean-target-libcilkrts
+
+clean-target-libcilkrts:
+ @: $(MAKE); $(unstage)
+ @[ -f $(TARGET_SUBDIR)/libcilkrts/Makefile ] || exit 0; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(NORMAL_TARGET_EXPORTS) \
+ echo "Doing clean in $(TARGET_SUBDIR)/libcilkrts"; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/libcilkrts && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
+ clean) \
+ || exit 1
+
+@endif target-libcilkrts
+
+.PHONY: maybe-distclean-target-libcilkrts distclean-target-libcilkrts
+maybe-distclean-target-libcilkrts:
+@if target-libcilkrts
+maybe-distclean-target-libcilkrts: distclean-target-libcilkrts
+
+distclean-target-libcilkrts:
+ @: $(MAKE); $(unstage)
+ @[ -f $(TARGET_SUBDIR)/libcilkrts/Makefile ] || exit 0; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(NORMAL_TARGET_EXPORTS) \
+ echo "Doing distclean in $(TARGET_SUBDIR)/libcilkrts"; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/libcilkrts && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
+ distclean) \
+ || exit 1
+
+@endif target-libcilkrts
+
+.PHONY: maybe-maintainer-clean-target-libcilkrts maintainer-clean-target-libcilkrts
+maybe-maintainer-clean-target-libcilkrts:
+@if target-libcilkrts
+maybe-maintainer-clean-target-libcilkrts: maintainer-clean-target-libcilkrts
+
+maintainer-clean-target-libcilkrts:
+ @: $(MAKE); $(unstage)
+ @[ -f $(TARGET_SUBDIR)/libcilkrts/Makefile ] || exit 0; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(NORMAL_TARGET_EXPORTS) \
+ echo "Doing maintainer-clean in $(TARGET_SUBDIR)/libcilkrts"; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/libcilkrts && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
+ maintainer-clean) \
+ || exit 1
+
+@endif target-libcilkrts
+
+
+
+
+
+.PHONY: configure-target-liboffloadmic maybe-configure-target-liboffloadmic
+maybe-configure-target-liboffloadmic:
+@if gcc-bootstrap
+configure-target-liboffloadmic: stage_current
+@endif gcc-bootstrap
+@if target-liboffloadmic
+maybe-configure-target-liboffloadmic: configure-target-liboffloadmic
+configure-target-liboffloadmic:
+ @: $(MAKE); $(unstage)
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ echo "Checking multilib configuration for liboffloadmic..."; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/liboffloadmic; \
+ $(CC_FOR_TARGET) --print-multi-lib > $(TARGET_SUBDIR)/liboffloadmic/multilib.tmp 2> /dev/null; \
+ if test -r $(TARGET_SUBDIR)/liboffloadmic/multilib.out; then \
+ if cmp -s $(TARGET_SUBDIR)/liboffloadmic/multilib.tmp $(TARGET_SUBDIR)/liboffloadmic/multilib.out; then \
+ rm -f $(TARGET_SUBDIR)/liboffloadmic/multilib.tmp; \
+ else \
+ rm -f $(TARGET_SUBDIR)/liboffloadmic/Makefile; \
+ mv $(TARGET_SUBDIR)/liboffloadmic/multilib.tmp $(TARGET_SUBDIR)/liboffloadmic/multilib.out; \
+ fi; \
+ else \
+ mv $(TARGET_SUBDIR)/liboffloadmic/multilib.tmp $(TARGET_SUBDIR)/liboffloadmic/multilib.out; \
+ fi; \
+ test ! -f $(TARGET_SUBDIR)/liboffloadmic/Makefile || exit 0; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/liboffloadmic; \
+ $(NORMAL_TARGET_EXPORTS) \
+ echo Configuring in $(TARGET_SUBDIR)/liboffloadmic; \
+ cd "$(TARGET_SUBDIR)/liboffloadmic" || exit 1; \
+ case $(srcdir) in \
+ /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+ *) topdir=`echo $(TARGET_SUBDIR)/liboffloadmic/ | \
+ sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
+ esac; \
+ module_srcdir=liboffloadmic; \
+ rm -f no-such-file || : ; \
+ CONFIG_SITE=no-such-file $(SHELL) \
+ $$s/$$module_srcdir/configure \
+ --srcdir=$${topdir}/$$module_srcdir \
+ $(TARGET_CONFIGARGS) --build=${build_alias} --host=${target_alias} \
+ --target=${target_alias} @extra_liboffloadmic_configure_flags@ \
+ || exit 1
+@endif target-liboffloadmic
+
+
+
+
+
+.PHONY: all-target-liboffloadmic maybe-all-target-liboffloadmic
+maybe-all-target-liboffloadmic:
+@if gcc-bootstrap
+all-target-liboffloadmic: stage_current
+@endif gcc-bootstrap
+@if target-liboffloadmic
+TARGET-target-liboffloadmic=all
+maybe-all-target-liboffloadmic: all-target-liboffloadmic
+all-target-liboffloadmic: configure-target-liboffloadmic
+ @: $(MAKE); $(unstage)
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(NORMAL_TARGET_EXPORTS) \
+ (cd $(TARGET_SUBDIR)/liboffloadmic && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_TARGET_FLAGS) \
+ $(TARGET-target-liboffloadmic))
+@endif target-liboffloadmic
+
+
+
+
+
+.PHONY: check-target-liboffloadmic maybe-check-target-liboffloadmic
+maybe-check-target-liboffloadmic:
+@if target-liboffloadmic
+maybe-check-target-liboffloadmic: check-target-liboffloadmic
+
+check-target-liboffloadmic:
+ @: $(MAKE); $(unstage)
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(NORMAL_TARGET_EXPORTS) \
+ (cd $(TARGET_SUBDIR)/liboffloadmic && \
+ $(MAKE) $(TARGET_FLAGS_TO_PASS) check)
+
+@endif target-liboffloadmic
+
+.PHONY: install-target-liboffloadmic maybe-install-target-liboffloadmic
+maybe-install-target-liboffloadmic:
+@if target-liboffloadmic
+maybe-install-target-liboffloadmic: install-target-liboffloadmic
+
+install-target-liboffloadmic: installdirs
+ @: $(MAKE); $(unstage)
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(NORMAL_TARGET_EXPORTS) \
+ (cd $(TARGET_SUBDIR)/liboffloadmic && \
+ $(MAKE) $(TARGET_FLAGS_TO_PASS) install)
+
+@endif target-liboffloadmic
+
+.PHONY: install-strip-target-liboffloadmic maybe-install-strip-target-liboffloadmic
+maybe-install-strip-target-liboffloadmic:
+@if target-liboffloadmic
+maybe-install-strip-target-liboffloadmic: install-strip-target-liboffloadmic
+
+install-strip-target-liboffloadmic: installdirs
+ @: $(MAKE); $(unstage)
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(NORMAL_TARGET_EXPORTS) \
+ (cd $(TARGET_SUBDIR)/liboffloadmic && \
+ $(MAKE) $(TARGET_FLAGS_TO_PASS) install-strip)
+
+@endif target-liboffloadmic
+
+# Other targets (info, dvi, pdf, etc.)
+
+.PHONY: maybe-info-target-liboffloadmic info-target-liboffloadmic
+maybe-info-target-liboffloadmic:
+@if target-liboffloadmic
+maybe-info-target-liboffloadmic: info-target-liboffloadmic
+
+info-target-liboffloadmic: \
+ configure-target-liboffloadmic
+ @: $(MAKE); $(unstage)
+ @[ -f $(TARGET_SUBDIR)/liboffloadmic/Makefile ] || exit 0; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(NORMAL_TARGET_EXPORTS) \
+ echo "Doing info in $(TARGET_SUBDIR)/liboffloadmic"; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/liboffloadmic && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
+ info) \
+ || exit 1
+
+@endif target-liboffloadmic
+
+.PHONY: maybe-dvi-target-liboffloadmic dvi-target-liboffloadmic
+maybe-dvi-target-liboffloadmic:
+@if target-liboffloadmic
+maybe-dvi-target-liboffloadmic: dvi-target-liboffloadmic
+
+dvi-target-liboffloadmic: \
+ configure-target-liboffloadmic
+ @: $(MAKE); $(unstage)
+ @[ -f $(TARGET_SUBDIR)/liboffloadmic/Makefile ] || exit 0; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(NORMAL_TARGET_EXPORTS) \
+ echo "Doing dvi in $(TARGET_SUBDIR)/liboffloadmic"; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/liboffloadmic && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
+ dvi) \
+ || exit 1
+
+@endif target-liboffloadmic
+
+.PHONY: maybe-pdf-target-liboffloadmic pdf-target-liboffloadmic
+maybe-pdf-target-liboffloadmic:
+@if target-liboffloadmic
+maybe-pdf-target-liboffloadmic: pdf-target-liboffloadmic
+
+pdf-target-liboffloadmic: \
+ configure-target-liboffloadmic
+ @: $(MAKE); $(unstage)
+ @[ -f $(TARGET_SUBDIR)/liboffloadmic/Makefile ] || exit 0; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(NORMAL_TARGET_EXPORTS) \
+ echo "Doing pdf in $(TARGET_SUBDIR)/liboffloadmic"; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/liboffloadmic && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
+ pdf) \
+ || exit 1
+
+@endif target-liboffloadmic
+
+.PHONY: maybe-html-target-liboffloadmic html-target-liboffloadmic
+maybe-html-target-liboffloadmic:
+@if target-liboffloadmic
+maybe-html-target-liboffloadmic: html-target-liboffloadmic
+
+html-target-liboffloadmic: \
+ configure-target-liboffloadmic
+ @: $(MAKE); $(unstage)
+ @[ -f $(TARGET_SUBDIR)/liboffloadmic/Makefile ] || exit 0; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(NORMAL_TARGET_EXPORTS) \
+ echo "Doing html in $(TARGET_SUBDIR)/liboffloadmic"; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/liboffloadmic && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
+ html) \
+ || exit 1
+
+@endif target-liboffloadmic
+
+.PHONY: maybe-TAGS-target-liboffloadmic TAGS-target-liboffloadmic
+maybe-TAGS-target-liboffloadmic:
+@if target-liboffloadmic
+maybe-TAGS-target-liboffloadmic: TAGS-target-liboffloadmic
+
+TAGS-target-liboffloadmic: \
+ configure-target-liboffloadmic
+ @: $(MAKE); $(unstage)
+ @[ -f $(TARGET_SUBDIR)/liboffloadmic/Makefile ] || exit 0; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(NORMAL_TARGET_EXPORTS) \
+ echo "Doing TAGS in $(TARGET_SUBDIR)/liboffloadmic"; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/liboffloadmic && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
+ TAGS) \
+ || exit 1
+
+@endif target-liboffloadmic
+
+.PHONY: maybe-install-info-target-liboffloadmic install-info-target-liboffloadmic
+maybe-install-info-target-liboffloadmic:
+@if target-liboffloadmic
+maybe-install-info-target-liboffloadmic: install-info-target-liboffloadmic
+
+install-info-target-liboffloadmic: \
+ configure-target-liboffloadmic \
+ info-target-liboffloadmic
+ @: $(MAKE); $(unstage)
+ @[ -f $(TARGET_SUBDIR)/liboffloadmic/Makefile ] || exit 0; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(NORMAL_TARGET_EXPORTS) \
+ echo "Doing install-info in $(TARGET_SUBDIR)/liboffloadmic"; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/liboffloadmic && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
+ install-info) \
+ || exit 1
+
+@endif target-liboffloadmic
+
+.PHONY: maybe-install-pdf-target-liboffloadmic install-pdf-target-liboffloadmic
+maybe-install-pdf-target-liboffloadmic:
+@if target-liboffloadmic
+maybe-install-pdf-target-liboffloadmic: install-pdf-target-liboffloadmic
+
+install-pdf-target-liboffloadmic: \
+ configure-target-liboffloadmic \
+ pdf-target-liboffloadmic
+ @: $(MAKE); $(unstage)
+ @[ -f $(TARGET_SUBDIR)/liboffloadmic/Makefile ] || exit 0; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(NORMAL_TARGET_EXPORTS) \
+ echo "Doing install-pdf in $(TARGET_SUBDIR)/liboffloadmic"; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/liboffloadmic && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
+ install-pdf) \
+ || exit 1
+
+@endif target-liboffloadmic
+
+.PHONY: maybe-install-html-target-liboffloadmic install-html-target-liboffloadmic
+maybe-install-html-target-liboffloadmic:
+@if target-liboffloadmic
+maybe-install-html-target-liboffloadmic: install-html-target-liboffloadmic
+
+install-html-target-liboffloadmic: \
+ configure-target-liboffloadmic \
+ html-target-liboffloadmic
+ @: $(MAKE); $(unstage)
+ @[ -f $(TARGET_SUBDIR)/liboffloadmic/Makefile ] || exit 0; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(NORMAL_TARGET_EXPORTS) \
+ echo "Doing install-html in $(TARGET_SUBDIR)/liboffloadmic"; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/liboffloadmic && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
+ install-html) \
+ || exit 1
+
+@endif target-liboffloadmic
+
+.PHONY: maybe-installcheck-target-liboffloadmic installcheck-target-liboffloadmic
+maybe-installcheck-target-liboffloadmic:
+@if target-liboffloadmic
+maybe-installcheck-target-liboffloadmic: installcheck-target-liboffloadmic
+
+installcheck-target-liboffloadmic: \
+ configure-target-liboffloadmic
+ @: $(MAKE); $(unstage)
+ @[ -f $(TARGET_SUBDIR)/liboffloadmic/Makefile ] || exit 0; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(NORMAL_TARGET_EXPORTS) \
+ echo "Doing installcheck in $(TARGET_SUBDIR)/liboffloadmic"; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/liboffloadmic && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
+ installcheck) \
+ || exit 1
+
+@endif target-liboffloadmic
+
+.PHONY: maybe-mostlyclean-target-liboffloadmic mostlyclean-target-liboffloadmic
+maybe-mostlyclean-target-liboffloadmic:
+@if target-liboffloadmic
+maybe-mostlyclean-target-liboffloadmic: mostlyclean-target-liboffloadmic
+
+mostlyclean-target-liboffloadmic:
+ @: $(MAKE); $(unstage)
+ @[ -f $(TARGET_SUBDIR)/liboffloadmic/Makefile ] || exit 0; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(NORMAL_TARGET_EXPORTS) \
+ echo "Doing mostlyclean in $(TARGET_SUBDIR)/liboffloadmic"; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/liboffloadmic && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
+ mostlyclean) \
+ || exit 1
+
+@endif target-liboffloadmic
+
+.PHONY: maybe-clean-target-liboffloadmic clean-target-liboffloadmic
+maybe-clean-target-liboffloadmic:
+@if target-liboffloadmic
+maybe-clean-target-liboffloadmic: clean-target-liboffloadmic
+
+clean-target-liboffloadmic:
+ @: $(MAKE); $(unstage)
+ @[ -f $(TARGET_SUBDIR)/liboffloadmic/Makefile ] || exit 0; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(NORMAL_TARGET_EXPORTS) \
+ echo "Doing clean in $(TARGET_SUBDIR)/liboffloadmic"; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/liboffloadmic && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
+ clean) \
+ || exit 1
+
+@endif target-liboffloadmic
+
+.PHONY: maybe-distclean-target-liboffloadmic distclean-target-liboffloadmic
+maybe-distclean-target-liboffloadmic:
+@if target-liboffloadmic
+maybe-distclean-target-liboffloadmic: distclean-target-liboffloadmic
+
+distclean-target-liboffloadmic:
+ @: $(MAKE); $(unstage)
+ @[ -f $(TARGET_SUBDIR)/liboffloadmic/Makefile ] || exit 0; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(NORMAL_TARGET_EXPORTS) \
+ echo "Doing distclean in $(TARGET_SUBDIR)/liboffloadmic"; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/liboffloadmic && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
+ distclean) \
+ || exit 1
+
+@endif target-liboffloadmic
+
+.PHONY: maybe-maintainer-clean-target-liboffloadmic maintainer-clean-target-liboffloadmic
+maybe-maintainer-clean-target-liboffloadmic:
+@if target-liboffloadmic
+maybe-maintainer-clean-target-liboffloadmic: maintainer-clean-target-liboffloadmic
+
+maintainer-clean-target-liboffloadmic:
+ @: $(MAKE); $(unstage)
+ @[ -f $(TARGET_SUBDIR)/liboffloadmic/Makefile ] || exit 0; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(NORMAL_TARGET_EXPORTS) \
+ echo "Doing maintainer-clean in $(TARGET_SUBDIR)/liboffloadmic"; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/liboffloadmic && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
+ maintainer-clean) \
+ || exit 1
+
+@endif target-liboffloadmic
+
+
+
+
+
.PHONY: configure-target-libssp maybe-configure-target-libssp
maybe-configure-target-libssp:
@if gcc-bootstrap
@@ -34162,8 +37588,8 @@ configure-target-libssp:
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
echo "Checking multilib configuration for libssp..."; \
- $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libssp ; \
- $(CC_FOR_TARGET) --print-multi-lib > $(TARGET_SUBDIR)/libssp/multilib.tmp 2> /dev/null ; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libssp; \
+ $(CC_FOR_TARGET) --print-multi-lib > $(TARGET_SUBDIR)/libssp/multilib.tmp 2> /dev/null; \
if test -r $(TARGET_SUBDIR)/libssp/multilib.out; then \
if cmp -s $(TARGET_SUBDIR)/libssp/multilib.tmp $(TARGET_SUBDIR)/libssp/multilib.out; then \
rm -f $(TARGET_SUBDIR)/libssp/multilib.tmp; \
@@ -34175,7 +37601,7 @@ configure-target-libssp:
mv $(TARGET_SUBDIR)/libssp/multilib.tmp $(TARGET_SUBDIR)/libssp/multilib.out; \
fi; \
test ! -f $(TARGET_SUBDIR)/libssp/Makefile || exit 0; \
- $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libssp ; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libssp; \
$(NORMAL_TARGET_EXPORTS) \
echo Configuring in $(TARGET_SUBDIR)/libssp; \
cd "$(TARGET_SUBDIR)/libssp" || exit 1; \
@@ -34184,12 +37610,13 @@ configure-target-libssp:
*) topdir=`echo $(TARGET_SUBDIR)/libssp/ | \
sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
esac; \
- srcdiroption="--srcdir=$${topdir}/libssp"; \
- libsrcdir="$$s/libssp"; \
+ module_srcdir=libssp; \
rm -f no-such-file || : ; \
- CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure \
+ CONFIG_SITE=no-such-file $(SHELL) \
+ $$s/$$module_srcdir/configure \
+ --srcdir=$${topdir}/$$module_srcdir \
$(TARGET_CONFIGARGS) --build=${build_alias} --host=${target_alias} \
- --target=${target_alias} $${srcdiroption} \
+ --target=${target_alias} \
|| exit 1
@endif target-libssp
@@ -34274,11 +37701,11 @@ maybe-info-target-libssp: info-target-libssp
info-target-libssp: \
configure-target-libssp
@: $(MAKE); $(unstage)
- @[ -f $(TARGET_SUBDIR)/libssp/Makefile ] || exit 0 ; \
+ @[ -f $(TARGET_SUBDIR)/libssp/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(NORMAL_TARGET_EXPORTS) \
- echo "Doing info in $(TARGET_SUBDIR)/libssp" ; \
+ echo "Doing info in $(TARGET_SUBDIR)/libssp"; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
@@ -34300,11 +37727,11 @@ maybe-dvi-target-libssp: dvi-target-libssp
dvi-target-libssp: \
configure-target-libssp
@: $(MAKE); $(unstage)
- @[ -f $(TARGET_SUBDIR)/libssp/Makefile ] || exit 0 ; \
+ @[ -f $(TARGET_SUBDIR)/libssp/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(NORMAL_TARGET_EXPORTS) \
- echo "Doing dvi in $(TARGET_SUBDIR)/libssp" ; \
+ echo "Doing dvi in $(TARGET_SUBDIR)/libssp"; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
@@ -34326,11 +37753,11 @@ maybe-pdf-target-libssp: pdf-target-libssp
pdf-target-libssp: \
configure-target-libssp
@: $(MAKE); $(unstage)
- @[ -f $(TARGET_SUBDIR)/libssp/Makefile ] || exit 0 ; \
+ @[ -f $(TARGET_SUBDIR)/libssp/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(NORMAL_TARGET_EXPORTS) \
- echo "Doing pdf in $(TARGET_SUBDIR)/libssp" ; \
+ echo "Doing pdf in $(TARGET_SUBDIR)/libssp"; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
@@ -34352,11 +37779,11 @@ maybe-html-target-libssp: html-target-libssp
html-target-libssp: \
configure-target-libssp
@: $(MAKE); $(unstage)
- @[ -f $(TARGET_SUBDIR)/libssp/Makefile ] || exit 0 ; \
+ @[ -f $(TARGET_SUBDIR)/libssp/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(NORMAL_TARGET_EXPORTS) \
- echo "Doing html in $(TARGET_SUBDIR)/libssp" ; \
+ echo "Doing html in $(TARGET_SUBDIR)/libssp"; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
@@ -34378,11 +37805,11 @@ maybe-TAGS-target-libssp: TAGS-target-libssp
TAGS-target-libssp: \
configure-target-libssp
@: $(MAKE); $(unstage)
- @[ -f $(TARGET_SUBDIR)/libssp/Makefile ] || exit 0 ; \
+ @[ -f $(TARGET_SUBDIR)/libssp/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(NORMAL_TARGET_EXPORTS) \
- echo "Doing TAGS in $(TARGET_SUBDIR)/libssp" ; \
+ echo "Doing TAGS in $(TARGET_SUBDIR)/libssp"; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
@@ -34405,11 +37832,11 @@ install-info-target-libssp: \
configure-target-libssp \
info-target-libssp
@: $(MAKE); $(unstage)
- @[ -f $(TARGET_SUBDIR)/libssp/Makefile ] || exit 0 ; \
+ @[ -f $(TARGET_SUBDIR)/libssp/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(NORMAL_TARGET_EXPORTS) \
- echo "Doing install-info in $(TARGET_SUBDIR)/libssp" ; \
+ echo "Doing install-info in $(TARGET_SUBDIR)/libssp"; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
@@ -34432,11 +37859,11 @@ install-pdf-target-libssp: \
configure-target-libssp \
pdf-target-libssp
@: $(MAKE); $(unstage)
- @[ -f $(TARGET_SUBDIR)/libssp/Makefile ] || exit 0 ; \
+ @[ -f $(TARGET_SUBDIR)/libssp/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(NORMAL_TARGET_EXPORTS) \
- echo "Doing install-pdf in $(TARGET_SUBDIR)/libssp" ; \
+ echo "Doing install-pdf in $(TARGET_SUBDIR)/libssp"; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
@@ -34459,11 +37886,11 @@ install-html-target-libssp: \
configure-target-libssp \
html-target-libssp
@: $(MAKE); $(unstage)
- @[ -f $(TARGET_SUBDIR)/libssp/Makefile ] || exit 0 ; \
+ @[ -f $(TARGET_SUBDIR)/libssp/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(NORMAL_TARGET_EXPORTS) \
- echo "Doing install-html in $(TARGET_SUBDIR)/libssp" ; \
+ echo "Doing install-html in $(TARGET_SUBDIR)/libssp"; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
@@ -34485,11 +37912,11 @@ maybe-installcheck-target-libssp: installcheck-target-libssp
installcheck-target-libssp: \
configure-target-libssp
@: $(MAKE); $(unstage)
- @[ -f $(TARGET_SUBDIR)/libssp/Makefile ] || exit 0 ; \
+ @[ -f $(TARGET_SUBDIR)/libssp/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(NORMAL_TARGET_EXPORTS) \
- echo "Doing installcheck in $(TARGET_SUBDIR)/libssp" ; \
+ echo "Doing installcheck in $(TARGET_SUBDIR)/libssp"; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
@@ -34510,11 +37937,11 @@ maybe-mostlyclean-target-libssp: mostlyclean-target-libssp
mostlyclean-target-libssp:
@: $(MAKE); $(unstage)
- @[ -f $(TARGET_SUBDIR)/libssp/Makefile ] || exit 0 ; \
+ @[ -f $(TARGET_SUBDIR)/libssp/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(NORMAL_TARGET_EXPORTS) \
- echo "Doing mostlyclean in $(TARGET_SUBDIR)/libssp" ; \
+ echo "Doing mostlyclean in $(TARGET_SUBDIR)/libssp"; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
@@ -34535,11 +37962,11 @@ maybe-clean-target-libssp: clean-target-libssp
clean-target-libssp:
@: $(MAKE); $(unstage)
- @[ -f $(TARGET_SUBDIR)/libssp/Makefile ] || exit 0 ; \
+ @[ -f $(TARGET_SUBDIR)/libssp/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(NORMAL_TARGET_EXPORTS) \
- echo "Doing clean in $(TARGET_SUBDIR)/libssp" ; \
+ echo "Doing clean in $(TARGET_SUBDIR)/libssp"; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
@@ -34560,11 +37987,11 @@ maybe-distclean-target-libssp: distclean-target-libssp
distclean-target-libssp:
@: $(MAKE); $(unstage)
- @[ -f $(TARGET_SUBDIR)/libssp/Makefile ] || exit 0 ; \
+ @[ -f $(TARGET_SUBDIR)/libssp/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(NORMAL_TARGET_EXPORTS) \
- echo "Doing distclean in $(TARGET_SUBDIR)/libssp" ; \
+ echo "Doing distclean in $(TARGET_SUBDIR)/libssp"; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
@@ -34585,11 +38012,11 @@ maybe-maintainer-clean-target-libssp: maintainer-clean-target-libssp
maintainer-clean-target-libssp:
@: $(MAKE); $(unstage)
- @[ -f $(TARGET_SUBDIR)/libssp/Makefile ] || exit 0 ; \
+ @[ -f $(TARGET_SUBDIR)/libssp/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(NORMAL_TARGET_EXPORTS) \
- echo "Doing maintainer-clean in $(TARGET_SUBDIR)/libssp" ; \
+ echo "Doing maintainer-clean in $(TARGET_SUBDIR)/libssp"; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
@@ -34619,8 +38046,8 @@ configure-target-newlib:
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
echo "Checking multilib configuration for newlib..."; \
- $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/newlib ; \
- $(CC_FOR_TARGET) --print-multi-lib > $(TARGET_SUBDIR)/newlib/multilib.tmp 2> /dev/null ; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/newlib; \
+ $(CC_FOR_TARGET) --print-multi-lib > $(TARGET_SUBDIR)/newlib/multilib.tmp 2> /dev/null; \
if test -r $(TARGET_SUBDIR)/newlib/multilib.out; then \
if cmp -s $(TARGET_SUBDIR)/newlib/multilib.tmp $(TARGET_SUBDIR)/newlib/multilib.out; then \
rm -f $(TARGET_SUBDIR)/newlib/multilib.tmp; \
@@ -34632,7 +38059,7 @@ configure-target-newlib:
mv $(TARGET_SUBDIR)/newlib/multilib.tmp $(TARGET_SUBDIR)/newlib/multilib.out; \
fi; \
test ! -f $(TARGET_SUBDIR)/newlib/Makefile || exit 0; \
- $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/newlib ; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/newlib; \
$(NORMAL_TARGET_EXPORTS) \
echo Configuring in $(TARGET_SUBDIR)/newlib; \
cd "$(TARGET_SUBDIR)/newlib" || exit 1; \
@@ -34641,12 +38068,13 @@ configure-target-newlib:
*) topdir=`echo $(TARGET_SUBDIR)/newlib/ | \
sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
esac; \
- srcdiroption="--srcdir=$${topdir}/newlib"; \
- libsrcdir="$$s/newlib"; \
+ module_srcdir=newlib; \
rm -f no-such-file || : ; \
- CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure \
+ CONFIG_SITE=no-such-file $(SHELL) \
+ $$s/$$module_srcdir/configure \
+ --srcdir=$${topdir}/$$module_srcdir \
$(TARGET_CONFIGARGS) --build=${build_alias} --host=${target_alias} \
- --target=${target_alias} $${srcdiroption} \
+ --target=${target_alias} \
|| exit 1
@endif target-newlib
@@ -34731,11 +38159,11 @@ maybe-info-target-newlib: info-target-newlib
info-target-newlib: \
configure-target-newlib
@: $(MAKE); $(unstage)
- @[ -f $(TARGET_SUBDIR)/newlib/Makefile ] || exit 0 ; \
+ @[ -f $(TARGET_SUBDIR)/newlib/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(NORMAL_TARGET_EXPORTS) \
- echo "Doing info in $(TARGET_SUBDIR)/newlib" ; \
+ echo "Doing info in $(TARGET_SUBDIR)/newlib"; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
@@ -34757,11 +38185,11 @@ maybe-dvi-target-newlib: dvi-target-newlib
dvi-target-newlib: \
configure-target-newlib
@: $(MAKE); $(unstage)
- @[ -f $(TARGET_SUBDIR)/newlib/Makefile ] || exit 0 ; \
+ @[ -f $(TARGET_SUBDIR)/newlib/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(NORMAL_TARGET_EXPORTS) \
- echo "Doing dvi in $(TARGET_SUBDIR)/newlib" ; \
+ echo "Doing dvi in $(TARGET_SUBDIR)/newlib"; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
@@ -34783,11 +38211,11 @@ maybe-pdf-target-newlib: pdf-target-newlib
pdf-target-newlib: \
configure-target-newlib
@: $(MAKE); $(unstage)
- @[ -f $(TARGET_SUBDIR)/newlib/Makefile ] || exit 0 ; \
+ @[ -f $(TARGET_SUBDIR)/newlib/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(NORMAL_TARGET_EXPORTS) \
- echo "Doing pdf in $(TARGET_SUBDIR)/newlib" ; \
+ echo "Doing pdf in $(TARGET_SUBDIR)/newlib"; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
@@ -34809,11 +38237,11 @@ maybe-html-target-newlib: html-target-newlib
html-target-newlib: \
configure-target-newlib
@: $(MAKE); $(unstage)
- @[ -f $(TARGET_SUBDIR)/newlib/Makefile ] || exit 0 ; \
+ @[ -f $(TARGET_SUBDIR)/newlib/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(NORMAL_TARGET_EXPORTS) \
- echo "Doing html in $(TARGET_SUBDIR)/newlib" ; \
+ echo "Doing html in $(TARGET_SUBDIR)/newlib"; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
@@ -34835,11 +38263,11 @@ maybe-TAGS-target-newlib: TAGS-target-newlib
TAGS-target-newlib: \
configure-target-newlib
@: $(MAKE); $(unstage)
- @[ -f $(TARGET_SUBDIR)/newlib/Makefile ] || exit 0 ; \
+ @[ -f $(TARGET_SUBDIR)/newlib/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(NORMAL_TARGET_EXPORTS) \
- echo "Doing TAGS in $(TARGET_SUBDIR)/newlib" ; \
+ echo "Doing TAGS in $(TARGET_SUBDIR)/newlib"; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
@@ -34862,11 +38290,11 @@ install-info-target-newlib: \
configure-target-newlib \
info-target-newlib
@: $(MAKE); $(unstage)
- @[ -f $(TARGET_SUBDIR)/newlib/Makefile ] || exit 0 ; \
+ @[ -f $(TARGET_SUBDIR)/newlib/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(NORMAL_TARGET_EXPORTS) \
- echo "Doing install-info in $(TARGET_SUBDIR)/newlib" ; \
+ echo "Doing install-info in $(TARGET_SUBDIR)/newlib"; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
@@ -34889,11 +38317,11 @@ install-pdf-target-newlib: \
configure-target-newlib \
pdf-target-newlib
@: $(MAKE); $(unstage)
- @[ -f $(TARGET_SUBDIR)/newlib/Makefile ] || exit 0 ; \
+ @[ -f $(TARGET_SUBDIR)/newlib/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(NORMAL_TARGET_EXPORTS) \
- echo "Doing install-pdf in $(TARGET_SUBDIR)/newlib" ; \
+ echo "Doing install-pdf in $(TARGET_SUBDIR)/newlib"; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
@@ -34916,11 +38344,11 @@ install-html-target-newlib: \
configure-target-newlib \
html-target-newlib
@: $(MAKE); $(unstage)
- @[ -f $(TARGET_SUBDIR)/newlib/Makefile ] || exit 0 ; \
+ @[ -f $(TARGET_SUBDIR)/newlib/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(NORMAL_TARGET_EXPORTS) \
- echo "Doing install-html in $(TARGET_SUBDIR)/newlib" ; \
+ echo "Doing install-html in $(TARGET_SUBDIR)/newlib"; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
@@ -34942,11 +38370,11 @@ maybe-installcheck-target-newlib: installcheck-target-newlib
installcheck-target-newlib: \
configure-target-newlib
@: $(MAKE); $(unstage)
- @[ -f $(TARGET_SUBDIR)/newlib/Makefile ] || exit 0 ; \
+ @[ -f $(TARGET_SUBDIR)/newlib/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(NORMAL_TARGET_EXPORTS) \
- echo "Doing installcheck in $(TARGET_SUBDIR)/newlib" ; \
+ echo "Doing installcheck in $(TARGET_SUBDIR)/newlib"; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
@@ -34967,11 +38395,11 @@ maybe-mostlyclean-target-newlib: mostlyclean-target-newlib
mostlyclean-target-newlib:
@: $(MAKE); $(unstage)
- @[ -f $(TARGET_SUBDIR)/newlib/Makefile ] || exit 0 ; \
+ @[ -f $(TARGET_SUBDIR)/newlib/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(NORMAL_TARGET_EXPORTS) \
- echo "Doing mostlyclean in $(TARGET_SUBDIR)/newlib" ; \
+ echo "Doing mostlyclean in $(TARGET_SUBDIR)/newlib"; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
@@ -34992,11 +38420,11 @@ maybe-clean-target-newlib: clean-target-newlib
clean-target-newlib:
@: $(MAKE); $(unstage)
- @[ -f $(TARGET_SUBDIR)/newlib/Makefile ] || exit 0 ; \
+ @[ -f $(TARGET_SUBDIR)/newlib/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(NORMAL_TARGET_EXPORTS) \
- echo "Doing clean in $(TARGET_SUBDIR)/newlib" ; \
+ echo "Doing clean in $(TARGET_SUBDIR)/newlib"; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
@@ -35017,11 +38445,11 @@ maybe-distclean-target-newlib: distclean-target-newlib
distclean-target-newlib:
@: $(MAKE); $(unstage)
- @[ -f $(TARGET_SUBDIR)/newlib/Makefile ] || exit 0 ; \
+ @[ -f $(TARGET_SUBDIR)/newlib/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(NORMAL_TARGET_EXPORTS) \
- echo "Doing distclean in $(TARGET_SUBDIR)/newlib" ; \
+ echo "Doing distclean in $(TARGET_SUBDIR)/newlib"; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
@@ -35042,11 +38470,11 @@ maybe-maintainer-clean-target-newlib: maintainer-clean-target-newlib
maintainer-clean-target-newlib:
@: $(MAKE); $(unstage)
- @[ -f $(TARGET_SUBDIR)/newlib/Makefile ] || exit 0 ; \
+ @[ -f $(TARGET_SUBDIR)/newlib/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(NORMAL_TARGET_EXPORTS) \
- echo "Doing maintainer-clean in $(TARGET_SUBDIR)/newlib" ; \
+ echo "Doing maintainer-clean in $(TARGET_SUBDIR)/newlib"; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
@@ -35075,8 +38503,8 @@ configure-target-libgcc:
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
echo "Checking multilib configuration for libgcc..."; \
- $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libgcc ; \
- $(CC_FOR_TARGET) --print-multi-lib > $(TARGET_SUBDIR)/libgcc/multilib.tmp 2> /dev/null ; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libgcc; \
+ $(CC_FOR_TARGET) --print-multi-lib > $(TARGET_SUBDIR)/libgcc/multilib.tmp 2> /dev/null; \
if test -r $(TARGET_SUBDIR)/libgcc/multilib.out; then \
if cmp -s $(TARGET_SUBDIR)/libgcc/multilib.tmp $(TARGET_SUBDIR)/libgcc/multilib.out; then \
rm -f $(TARGET_SUBDIR)/libgcc/multilib.tmp; \
@@ -35088,7 +38516,7 @@ configure-target-libgcc:
mv $(TARGET_SUBDIR)/libgcc/multilib.tmp $(TARGET_SUBDIR)/libgcc/multilib.out; \
fi; \
test ! -f $(TARGET_SUBDIR)/libgcc/Makefile || exit 0; \
- $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libgcc ; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libgcc; \
$(NORMAL_TARGET_EXPORTS) \
echo Configuring in $(TARGET_SUBDIR)/libgcc; \
cd "$(TARGET_SUBDIR)/libgcc" || exit 1; \
@@ -35097,12 +38525,13 @@ configure-target-libgcc:
*) topdir=`echo $(TARGET_SUBDIR)/libgcc/ | \
sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
esac; \
- srcdiroption="--srcdir=$${topdir}/libgcc"; \
- libsrcdir="$$s/libgcc"; \
+ module_srcdir=libgcc; \
rm -f no-such-file || : ; \
- CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure \
+ CONFIG_SITE=no-such-file $(SHELL) \
+ $$s/$$module_srcdir/configure \
+ --srcdir=$${topdir}/$$module_srcdir \
$(TARGET_CONFIGARGS) --build=${build_alias} --host=${target_alias} \
- --target=${target_alias} $${srcdiroption} \
+ --target=${target_alias} \
|| exit 1
@endif target-libgcc
@@ -35119,7 +38548,7 @@ configure-stage1-target-libgcc:
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
TFLAGS="$(STAGE1_TFLAGS)"; \
echo "Checking multilib configuration for libgcc..."; \
- $(CC_FOR_TARGET) --print-multi-lib > $(TARGET_SUBDIR)/libgcc/multilib.tmp 2> /dev/null ; \
+ $(CC_FOR_TARGET) --print-multi-lib > $(TARGET_SUBDIR)/libgcc/multilib.tmp 2> /dev/null; \
if test -r $(TARGET_SUBDIR)/libgcc/multilib.out; then \
if cmp -s $(TARGET_SUBDIR)/libgcc/multilib.tmp $(TARGET_SUBDIR)/libgcc/multilib.out; then \
rm -f $(TARGET_SUBDIR)/libgcc/multilib.tmp; \
@@ -35135,19 +38564,20 @@ configure-stage1-target-libgcc:
CFLAGS="$(CFLAGS_FOR_TARGET)"; export CFLAGS; \
CXXFLAGS="$(CXXFLAGS_FOR_TARGET)"; export CXXFLAGS; \
LIBCFLAGS="$(LIBCFLAGS_FOR_TARGET)"; export LIBCFLAGS; \
- echo Configuring stage 1 in $(TARGET_SUBDIR)/libgcc ; \
- $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libgcc ; \
+ echo Configuring stage 1 in $(TARGET_SUBDIR)/libgcc; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libgcc; \
cd $(TARGET_SUBDIR)/libgcc || exit 1; \
case $(srcdir) in \
/* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
*) topdir=`echo $(TARGET_SUBDIR)/libgcc/ | \
sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
esac; \
- srcdiroption="--srcdir=$${topdir}/libgcc"; \
- libsrcdir="$$s/libgcc"; \
- $(SHELL) $${libsrcdir}/configure \
+ module_srcdir=libgcc; \
+ $(SHELL) $$s/$$module_srcdir/configure \
+ --srcdir=$${topdir}/$$module_srcdir \
$(TARGET_CONFIGARGS) --build=${build_alias} --host=${target_alias} \
- --target=${target_alias} $${srcdiroption} \
+ --target=${target_alias} \
+ \
$(STAGE1_CONFIGURE_FLAGS)
@endif target-libgcc-bootstrap
@@ -35162,7 +38592,7 @@ configure-stage2-target-libgcc:
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
TFLAGS="$(STAGE2_TFLAGS)"; \
echo "Checking multilib configuration for libgcc..."; \
- $(CC_FOR_TARGET) --print-multi-lib > $(TARGET_SUBDIR)/libgcc/multilib.tmp 2> /dev/null ; \
+ $(CC_FOR_TARGET) --print-multi-lib > $(TARGET_SUBDIR)/libgcc/multilib.tmp 2> /dev/null; \
if test -r $(TARGET_SUBDIR)/libgcc/multilib.out; then \
if cmp -s $(TARGET_SUBDIR)/libgcc/multilib.tmp $(TARGET_SUBDIR)/libgcc/multilib.out; then \
rm -f $(TARGET_SUBDIR)/libgcc/multilib.tmp; \
@@ -35179,19 +38609,19 @@ configure-stage2-target-libgcc:
CFLAGS="$(CFLAGS_FOR_TARGET)"; export CFLAGS; \
CXXFLAGS="$(CXXFLAGS_FOR_TARGET)"; export CXXFLAGS; \
LIBCFLAGS="$(LIBCFLAGS_FOR_TARGET)"; export LIBCFLAGS; \
- echo Configuring stage 2 in $(TARGET_SUBDIR)/libgcc ; \
- $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libgcc ; \
+ echo Configuring stage 2 in $(TARGET_SUBDIR)/libgcc; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libgcc; \
cd $(TARGET_SUBDIR)/libgcc || exit 1; \
case $(srcdir) in \
/* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
*) topdir=`echo $(TARGET_SUBDIR)/libgcc/ | \
sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
esac; \
- srcdiroption="--srcdir=$${topdir}/libgcc"; \
- libsrcdir="$$s/libgcc"; \
- $(SHELL) $${libsrcdir}/configure \
+ module_srcdir=libgcc; \
+ $(SHELL) $$s/$$module_srcdir/configure \
+ --srcdir=$${topdir}/$$module_srcdir \
$(TARGET_CONFIGARGS) --build=${build_alias} --host=${target_alias} \
- --target=${target_alias} $${srcdiroption} \
+ --target=${target_alias} \
--with-build-libsubdir=$(HOST_SUBDIR) \
$(STAGE2_CONFIGURE_FLAGS)
@endif target-libgcc-bootstrap
@@ -35207,7 +38637,7 @@ configure-stage3-target-libgcc:
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
TFLAGS="$(STAGE3_TFLAGS)"; \
echo "Checking multilib configuration for libgcc..."; \
- $(CC_FOR_TARGET) --print-multi-lib > $(TARGET_SUBDIR)/libgcc/multilib.tmp 2> /dev/null ; \
+ $(CC_FOR_TARGET) --print-multi-lib > $(TARGET_SUBDIR)/libgcc/multilib.tmp 2> /dev/null; \
if test -r $(TARGET_SUBDIR)/libgcc/multilib.out; then \
if cmp -s $(TARGET_SUBDIR)/libgcc/multilib.tmp $(TARGET_SUBDIR)/libgcc/multilib.out; then \
rm -f $(TARGET_SUBDIR)/libgcc/multilib.tmp; \
@@ -35224,19 +38654,19 @@ configure-stage3-target-libgcc:
CFLAGS="$(CFLAGS_FOR_TARGET)"; export CFLAGS; \
CXXFLAGS="$(CXXFLAGS_FOR_TARGET)"; export CXXFLAGS; \
LIBCFLAGS="$(LIBCFLAGS_FOR_TARGET)"; export LIBCFLAGS; \
- echo Configuring stage 3 in $(TARGET_SUBDIR)/libgcc ; \
- $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libgcc ; \
+ echo Configuring stage 3 in $(TARGET_SUBDIR)/libgcc; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libgcc; \
cd $(TARGET_SUBDIR)/libgcc || exit 1; \
case $(srcdir) in \
/* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
*) topdir=`echo $(TARGET_SUBDIR)/libgcc/ | \
sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
esac; \
- srcdiroption="--srcdir=$${topdir}/libgcc"; \
- libsrcdir="$$s/libgcc"; \
- $(SHELL) $${libsrcdir}/configure \
+ module_srcdir=libgcc; \
+ $(SHELL) $$s/$$module_srcdir/configure \
+ --srcdir=$${topdir}/$$module_srcdir \
$(TARGET_CONFIGARGS) --build=${build_alias} --host=${target_alias} \
- --target=${target_alias} $${srcdiroption} \
+ --target=${target_alias} \
--with-build-libsubdir=$(HOST_SUBDIR) \
$(STAGE3_CONFIGURE_FLAGS)
@endif target-libgcc-bootstrap
@@ -35252,7 +38682,7 @@ configure-stage4-target-libgcc:
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
TFLAGS="$(STAGE4_TFLAGS)"; \
echo "Checking multilib configuration for libgcc..."; \
- $(CC_FOR_TARGET) --print-multi-lib > $(TARGET_SUBDIR)/libgcc/multilib.tmp 2> /dev/null ; \
+ $(CC_FOR_TARGET) --print-multi-lib > $(TARGET_SUBDIR)/libgcc/multilib.tmp 2> /dev/null; \
if test -r $(TARGET_SUBDIR)/libgcc/multilib.out; then \
if cmp -s $(TARGET_SUBDIR)/libgcc/multilib.tmp $(TARGET_SUBDIR)/libgcc/multilib.out; then \
rm -f $(TARGET_SUBDIR)/libgcc/multilib.tmp; \
@@ -35269,19 +38699,19 @@ configure-stage4-target-libgcc:
CFLAGS="$(CFLAGS_FOR_TARGET)"; export CFLAGS; \
CXXFLAGS="$(CXXFLAGS_FOR_TARGET)"; export CXXFLAGS; \
LIBCFLAGS="$(LIBCFLAGS_FOR_TARGET)"; export LIBCFLAGS; \
- echo Configuring stage 4 in $(TARGET_SUBDIR)/libgcc ; \
- $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libgcc ; \
+ echo Configuring stage 4 in $(TARGET_SUBDIR)/libgcc; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libgcc; \
cd $(TARGET_SUBDIR)/libgcc || exit 1; \
case $(srcdir) in \
/* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
*) topdir=`echo $(TARGET_SUBDIR)/libgcc/ | \
sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
esac; \
- srcdiroption="--srcdir=$${topdir}/libgcc"; \
- libsrcdir="$$s/libgcc"; \
- $(SHELL) $${libsrcdir}/configure \
+ module_srcdir=libgcc; \
+ $(SHELL) $$s/$$module_srcdir/configure \
+ --srcdir=$${topdir}/$$module_srcdir \
$(TARGET_CONFIGARGS) --build=${build_alias} --host=${target_alias} \
- --target=${target_alias} $${srcdiroption} \
+ --target=${target_alias} \
--with-build-libsubdir=$(HOST_SUBDIR) \
$(STAGE4_CONFIGURE_FLAGS)
@endif target-libgcc-bootstrap
@@ -35297,7 +38727,7 @@ configure-stageprofile-target-libgcc:
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
TFLAGS="$(STAGEprofile_TFLAGS)"; \
echo "Checking multilib configuration for libgcc..."; \
- $(CC_FOR_TARGET) --print-multi-lib > $(TARGET_SUBDIR)/libgcc/multilib.tmp 2> /dev/null ; \
+ $(CC_FOR_TARGET) --print-multi-lib > $(TARGET_SUBDIR)/libgcc/multilib.tmp 2> /dev/null; \
if test -r $(TARGET_SUBDIR)/libgcc/multilib.out; then \
if cmp -s $(TARGET_SUBDIR)/libgcc/multilib.tmp $(TARGET_SUBDIR)/libgcc/multilib.out; then \
rm -f $(TARGET_SUBDIR)/libgcc/multilib.tmp; \
@@ -35314,19 +38744,19 @@ configure-stageprofile-target-libgcc:
CFLAGS="$(CFLAGS_FOR_TARGET)"; export CFLAGS; \
CXXFLAGS="$(CXXFLAGS_FOR_TARGET)"; export CXXFLAGS; \
LIBCFLAGS="$(LIBCFLAGS_FOR_TARGET)"; export LIBCFLAGS; \
- echo Configuring stage profile in $(TARGET_SUBDIR)/libgcc ; \
- $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libgcc ; \
+ echo Configuring stage profile in $(TARGET_SUBDIR)/libgcc; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libgcc; \
cd $(TARGET_SUBDIR)/libgcc || exit 1; \
case $(srcdir) in \
/* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
*) topdir=`echo $(TARGET_SUBDIR)/libgcc/ | \
sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
esac; \
- srcdiroption="--srcdir=$${topdir}/libgcc"; \
- libsrcdir="$$s/libgcc"; \
- $(SHELL) $${libsrcdir}/configure \
+ module_srcdir=libgcc; \
+ $(SHELL) $$s/$$module_srcdir/configure \
+ --srcdir=$${topdir}/$$module_srcdir \
$(TARGET_CONFIGARGS) --build=${build_alias} --host=${target_alias} \
- --target=${target_alias} $${srcdiroption} \
+ --target=${target_alias} \
--with-build-libsubdir=$(HOST_SUBDIR) \
$(STAGEprofile_CONFIGURE_FLAGS)
@endif target-libgcc-bootstrap
@@ -35342,7 +38772,7 @@ configure-stagefeedback-target-libgcc:
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
TFLAGS="$(STAGEfeedback_TFLAGS)"; \
echo "Checking multilib configuration for libgcc..."; \
- $(CC_FOR_TARGET) --print-multi-lib > $(TARGET_SUBDIR)/libgcc/multilib.tmp 2> /dev/null ; \
+ $(CC_FOR_TARGET) --print-multi-lib > $(TARGET_SUBDIR)/libgcc/multilib.tmp 2> /dev/null; \
if test -r $(TARGET_SUBDIR)/libgcc/multilib.out; then \
if cmp -s $(TARGET_SUBDIR)/libgcc/multilib.tmp $(TARGET_SUBDIR)/libgcc/multilib.out; then \
rm -f $(TARGET_SUBDIR)/libgcc/multilib.tmp; \
@@ -35359,19 +38789,19 @@ configure-stagefeedback-target-libgcc:
CFLAGS="$(CFLAGS_FOR_TARGET)"; export CFLAGS; \
CXXFLAGS="$(CXXFLAGS_FOR_TARGET)"; export CXXFLAGS; \
LIBCFLAGS="$(LIBCFLAGS_FOR_TARGET)"; export LIBCFLAGS; \
- echo Configuring stage feedback in $(TARGET_SUBDIR)/libgcc ; \
- $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libgcc ; \
+ echo Configuring stage feedback in $(TARGET_SUBDIR)/libgcc; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libgcc; \
cd $(TARGET_SUBDIR)/libgcc || exit 1; \
case $(srcdir) in \
/* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
*) topdir=`echo $(TARGET_SUBDIR)/libgcc/ | \
sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
esac; \
- srcdiroption="--srcdir=$${topdir}/libgcc"; \
- libsrcdir="$$s/libgcc"; \
- $(SHELL) $${libsrcdir}/configure \
+ module_srcdir=libgcc; \
+ $(SHELL) $$s/$$module_srcdir/configure \
+ --srcdir=$${topdir}/$$module_srcdir \
$(TARGET_CONFIGARGS) --build=${build_alias} --host=${target_alias} \
- --target=${target_alias} $${srcdiroption} \
+ --target=${target_alias} \
--with-build-libsubdir=$(HOST_SUBDIR) \
$(STAGEfeedback_CONFIGURE_FLAGS)
@endif target-libgcc-bootstrap
@@ -35700,11 +39130,11 @@ maybe-info-target-libgcc: info-target-libgcc
info-target-libgcc: \
configure-target-libgcc
@: $(MAKE); $(unstage)
- @[ -f $(TARGET_SUBDIR)/libgcc/Makefile ] || exit 0 ; \
+ @[ -f $(TARGET_SUBDIR)/libgcc/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(NORMAL_TARGET_EXPORTS) \
- echo "Doing info in $(TARGET_SUBDIR)/libgcc" ; \
+ echo "Doing info in $(TARGET_SUBDIR)/libgcc"; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
@@ -35726,11 +39156,11 @@ maybe-dvi-target-libgcc: dvi-target-libgcc
dvi-target-libgcc: \
configure-target-libgcc
@: $(MAKE); $(unstage)
- @[ -f $(TARGET_SUBDIR)/libgcc/Makefile ] || exit 0 ; \
+ @[ -f $(TARGET_SUBDIR)/libgcc/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(NORMAL_TARGET_EXPORTS) \
- echo "Doing dvi in $(TARGET_SUBDIR)/libgcc" ; \
+ echo "Doing dvi in $(TARGET_SUBDIR)/libgcc"; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
@@ -35752,11 +39182,11 @@ maybe-pdf-target-libgcc: pdf-target-libgcc
pdf-target-libgcc: \
configure-target-libgcc
@: $(MAKE); $(unstage)
- @[ -f $(TARGET_SUBDIR)/libgcc/Makefile ] || exit 0 ; \
+ @[ -f $(TARGET_SUBDIR)/libgcc/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(NORMAL_TARGET_EXPORTS) \
- echo "Doing pdf in $(TARGET_SUBDIR)/libgcc" ; \
+ echo "Doing pdf in $(TARGET_SUBDIR)/libgcc"; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
@@ -35778,11 +39208,11 @@ maybe-html-target-libgcc: html-target-libgcc
html-target-libgcc: \
configure-target-libgcc
@: $(MAKE); $(unstage)
- @[ -f $(TARGET_SUBDIR)/libgcc/Makefile ] || exit 0 ; \
+ @[ -f $(TARGET_SUBDIR)/libgcc/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(NORMAL_TARGET_EXPORTS) \
- echo "Doing html in $(TARGET_SUBDIR)/libgcc" ; \
+ echo "Doing html in $(TARGET_SUBDIR)/libgcc"; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
@@ -35804,11 +39234,11 @@ maybe-TAGS-target-libgcc: TAGS-target-libgcc
TAGS-target-libgcc: \
configure-target-libgcc
@: $(MAKE); $(unstage)
- @[ -f $(TARGET_SUBDIR)/libgcc/Makefile ] || exit 0 ; \
+ @[ -f $(TARGET_SUBDIR)/libgcc/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(NORMAL_TARGET_EXPORTS) \
- echo "Doing TAGS in $(TARGET_SUBDIR)/libgcc" ; \
+ echo "Doing TAGS in $(TARGET_SUBDIR)/libgcc"; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
@@ -35831,11 +39261,11 @@ install-info-target-libgcc: \
configure-target-libgcc \
info-target-libgcc
@: $(MAKE); $(unstage)
- @[ -f $(TARGET_SUBDIR)/libgcc/Makefile ] || exit 0 ; \
+ @[ -f $(TARGET_SUBDIR)/libgcc/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(NORMAL_TARGET_EXPORTS) \
- echo "Doing install-info in $(TARGET_SUBDIR)/libgcc" ; \
+ echo "Doing install-info in $(TARGET_SUBDIR)/libgcc"; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
@@ -35858,11 +39288,11 @@ install-pdf-target-libgcc: \
configure-target-libgcc \
pdf-target-libgcc
@: $(MAKE); $(unstage)
- @[ -f $(TARGET_SUBDIR)/libgcc/Makefile ] || exit 0 ; \
+ @[ -f $(TARGET_SUBDIR)/libgcc/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(NORMAL_TARGET_EXPORTS) \
- echo "Doing install-pdf in $(TARGET_SUBDIR)/libgcc" ; \
+ echo "Doing install-pdf in $(TARGET_SUBDIR)/libgcc"; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
@@ -35885,11 +39315,11 @@ install-html-target-libgcc: \
configure-target-libgcc \
html-target-libgcc
@: $(MAKE); $(unstage)
- @[ -f $(TARGET_SUBDIR)/libgcc/Makefile ] || exit 0 ; \
+ @[ -f $(TARGET_SUBDIR)/libgcc/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(NORMAL_TARGET_EXPORTS) \
- echo "Doing install-html in $(TARGET_SUBDIR)/libgcc" ; \
+ echo "Doing install-html in $(TARGET_SUBDIR)/libgcc"; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
@@ -35911,11 +39341,11 @@ maybe-installcheck-target-libgcc: installcheck-target-libgcc
installcheck-target-libgcc: \
configure-target-libgcc
@: $(MAKE); $(unstage)
- @[ -f $(TARGET_SUBDIR)/libgcc/Makefile ] || exit 0 ; \
+ @[ -f $(TARGET_SUBDIR)/libgcc/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(NORMAL_TARGET_EXPORTS) \
- echo "Doing installcheck in $(TARGET_SUBDIR)/libgcc" ; \
+ echo "Doing installcheck in $(TARGET_SUBDIR)/libgcc"; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
@@ -35936,11 +39366,11 @@ maybe-mostlyclean-target-libgcc: mostlyclean-target-libgcc
mostlyclean-target-libgcc:
@: $(MAKE); $(unstage)
- @[ -f $(TARGET_SUBDIR)/libgcc/Makefile ] || exit 0 ; \
+ @[ -f $(TARGET_SUBDIR)/libgcc/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(NORMAL_TARGET_EXPORTS) \
- echo "Doing mostlyclean in $(TARGET_SUBDIR)/libgcc" ; \
+ echo "Doing mostlyclean in $(TARGET_SUBDIR)/libgcc"; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
@@ -35961,11 +39391,11 @@ maybe-clean-target-libgcc: clean-target-libgcc
clean-target-libgcc:
@: $(MAKE); $(unstage)
- @[ -f $(TARGET_SUBDIR)/libgcc/Makefile ] || exit 0 ; \
+ @[ -f $(TARGET_SUBDIR)/libgcc/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(NORMAL_TARGET_EXPORTS) \
- echo "Doing clean in $(TARGET_SUBDIR)/libgcc" ; \
+ echo "Doing clean in $(TARGET_SUBDIR)/libgcc"; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
@@ -35986,11 +39416,11 @@ maybe-distclean-target-libgcc: distclean-target-libgcc
distclean-target-libgcc:
@: $(MAKE); $(unstage)
- @[ -f $(TARGET_SUBDIR)/libgcc/Makefile ] || exit 0 ; \
+ @[ -f $(TARGET_SUBDIR)/libgcc/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(NORMAL_TARGET_EXPORTS) \
- echo "Doing distclean in $(TARGET_SUBDIR)/libgcc" ; \
+ echo "Doing distclean in $(TARGET_SUBDIR)/libgcc"; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
@@ -36011,11 +39441,11 @@ maybe-maintainer-clean-target-libgcc: maintainer-clean-target-libgcc
maintainer-clean-target-libgcc:
@: $(MAKE); $(unstage)
- @[ -f $(TARGET_SUBDIR)/libgcc/Makefile ] || exit 0 ; \
+ @[ -f $(TARGET_SUBDIR)/libgcc/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(NORMAL_TARGET_EXPORTS) \
- echo "Doing maintainer-clean in $(TARGET_SUBDIR)/libgcc" ; \
+ echo "Doing maintainer-clean in $(TARGET_SUBDIR)/libgcc"; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
@@ -36045,8 +39475,8 @@ configure-target-libbacktrace:
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
echo "Checking multilib configuration for libbacktrace..."; \
- $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libbacktrace ; \
- $(CC_FOR_TARGET) --print-multi-lib > $(TARGET_SUBDIR)/libbacktrace/multilib.tmp 2> /dev/null ; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libbacktrace; \
+ $(CC_FOR_TARGET) --print-multi-lib > $(TARGET_SUBDIR)/libbacktrace/multilib.tmp 2> /dev/null; \
if test -r $(TARGET_SUBDIR)/libbacktrace/multilib.out; then \
if cmp -s $(TARGET_SUBDIR)/libbacktrace/multilib.tmp $(TARGET_SUBDIR)/libbacktrace/multilib.out; then \
rm -f $(TARGET_SUBDIR)/libbacktrace/multilib.tmp; \
@@ -36058,7 +39488,7 @@ configure-target-libbacktrace:
mv $(TARGET_SUBDIR)/libbacktrace/multilib.tmp $(TARGET_SUBDIR)/libbacktrace/multilib.out; \
fi; \
test ! -f $(TARGET_SUBDIR)/libbacktrace/Makefile || exit 0; \
- $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libbacktrace ; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libbacktrace; \
$(NORMAL_TARGET_EXPORTS) \
echo Configuring in $(TARGET_SUBDIR)/libbacktrace; \
cd "$(TARGET_SUBDIR)/libbacktrace" || exit 1; \
@@ -36067,12 +39497,13 @@ configure-target-libbacktrace:
*) topdir=`echo $(TARGET_SUBDIR)/libbacktrace/ | \
sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
esac; \
- srcdiroption="--srcdir=$${topdir}/libbacktrace"; \
- libsrcdir="$$s/libbacktrace"; \
+ module_srcdir=libbacktrace; \
rm -f no-such-file || : ; \
- CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure \
+ CONFIG_SITE=no-such-file $(SHELL) \
+ $$s/$$module_srcdir/configure \
+ --srcdir=$${topdir}/$$module_srcdir \
$(TARGET_CONFIGARGS) --build=${build_alias} --host=${target_alias} \
- --target=${target_alias} $${srcdiroption} \
+ --target=${target_alias} \
|| exit 1
@endif target-libbacktrace
@@ -36157,11 +39588,11 @@ maybe-info-target-libbacktrace: info-target-libbacktrace
info-target-libbacktrace: \
configure-target-libbacktrace
@: $(MAKE); $(unstage)
- @[ -f $(TARGET_SUBDIR)/libbacktrace/Makefile ] || exit 0 ; \
+ @[ -f $(TARGET_SUBDIR)/libbacktrace/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(NORMAL_TARGET_EXPORTS) \
- echo "Doing info in $(TARGET_SUBDIR)/libbacktrace" ; \
+ echo "Doing info in $(TARGET_SUBDIR)/libbacktrace"; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
@@ -36183,11 +39614,11 @@ maybe-dvi-target-libbacktrace: dvi-target-libbacktrace
dvi-target-libbacktrace: \
configure-target-libbacktrace
@: $(MAKE); $(unstage)
- @[ -f $(TARGET_SUBDIR)/libbacktrace/Makefile ] || exit 0 ; \
+ @[ -f $(TARGET_SUBDIR)/libbacktrace/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(NORMAL_TARGET_EXPORTS) \
- echo "Doing dvi in $(TARGET_SUBDIR)/libbacktrace" ; \
+ echo "Doing dvi in $(TARGET_SUBDIR)/libbacktrace"; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
@@ -36209,11 +39640,11 @@ maybe-pdf-target-libbacktrace: pdf-target-libbacktrace
pdf-target-libbacktrace: \
configure-target-libbacktrace
@: $(MAKE); $(unstage)
- @[ -f $(TARGET_SUBDIR)/libbacktrace/Makefile ] || exit 0 ; \
+ @[ -f $(TARGET_SUBDIR)/libbacktrace/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(NORMAL_TARGET_EXPORTS) \
- echo "Doing pdf in $(TARGET_SUBDIR)/libbacktrace" ; \
+ echo "Doing pdf in $(TARGET_SUBDIR)/libbacktrace"; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
@@ -36235,11 +39666,11 @@ maybe-html-target-libbacktrace: html-target-libbacktrace
html-target-libbacktrace: \
configure-target-libbacktrace
@: $(MAKE); $(unstage)
- @[ -f $(TARGET_SUBDIR)/libbacktrace/Makefile ] || exit 0 ; \
+ @[ -f $(TARGET_SUBDIR)/libbacktrace/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(NORMAL_TARGET_EXPORTS) \
- echo "Doing html in $(TARGET_SUBDIR)/libbacktrace" ; \
+ echo "Doing html in $(TARGET_SUBDIR)/libbacktrace"; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
@@ -36261,11 +39692,11 @@ maybe-TAGS-target-libbacktrace: TAGS-target-libbacktrace
TAGS-target-libbacktrace: \
configure-target-libbacktrace
@: $(MAKE); $(unstage)
- @[ -f $(TARGET_SUBDIR)/libbacktrace/Makefile ] || exit 0 ; \
+ @[ -f $(TARGET_SUBDIR)/libbacktrace/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(NORMAL_TARGET_EXPORTS) \
- echo "Doing TAGS in $(TARGET_SUBDIR)/libbacktrace" ; \
+ echo "Doing TAGS in $(TARGET_SUBDIR)/libbacktrace"; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
@@ -36288,11 +39719,11 @@ install-info-target-libbacktrace: \
configure-target-libbacktrace \
info-target-libbacktrace
@: $(MAKE); $(unstage)
- @[ -f $(TARGET_SUBDIR)/libbacktrace/Makefile ] || exit 0 ; \
+ @[ -f $(TARGET_SUBDIR)/libbacktrace/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(NORMAL_TARGET_EXPORTS) \
- echo "Doing install-info in $(TARGET_SUBDIR)/libbacktrace" ; \
+ echo "Doing install-info in $(TARGET_SUBDIR)/libbacktrace"; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
@@ -36315,11 +39746,11 @@ install-pdf-target-libbacktrace: \
configure-target-libbacktrace \
pdf-target-libbacktrace
@: $(MAKE); $(unstage)
- @[ -f $(TARGET_SUBDIR)/libbacktrace/Makefile ] || exit 0 ; \
+ @[ -f $(TARGET_SUBDIR)/libbacktrace/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(NORMAL_TARGET_EXPORTS) \
- echo "Doing install-pdf in $(TARGET_SUBDIR)/libbacktrace" ; \
+ echo "Doing install-pdf in $(TARGET_SUBDIR)/libbacktrace"; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
@@ -36342,11 +39773,11 @@ install-html-target-libbacktrace: \
configure-target-libbacktrace \
html-target-libbacktrace
@: $(MAKE); $(unstage)
- @[ -f $(TARGET_SUBDIR)/libbacktrace/Makefile ] || exit 0 ; \
+ @[ -f $(TARGET_SUBDIR)/libbacktrace/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(NORMAL_TARGET_EXPORTS) \
- echo "Doing install-html in $(TARGET_SUBDIR)/libbacktrace" ; \
+ echo "Doing install-html in $(TARGET_SUBDIR)/libbacktrace"; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
@@ -36368,11 +39799,11 @@ maybe-installcheck-target-libbacktrace: installcheck-target-libbacktrace
installcheck-target-libbacktrace: \
configure-target-libbacktrace
@: $(MAKE); $(unstage)
- @[ -f $(TARGET_SUBDIR)/libbacktrace/Makefile ] || exit 0 ; \
+ @[ -f $(TARGET_SUBDIR)/libbacktrace/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(NORMAL_TARGET_EXPORTS) \
- echo "Doing installcheck in $(TARGET_SUBDIR)/libbacktrace" ; \
+ echo "Doing installcheck in $(TARGET_SUBDIR)/libbacktrace"; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
@@ -36393,11 +39824,11 @@ maybe-mostlyclean-target-libbacktrace: mostlyclean-target-libbacktrace
mostlyclean-target-libbacktrace:
@: $(MAKE); $(unstage)
- @[ -f $(TARGET_SUBDIR)/libbacktrace/Makefile ] || exit 0 ; \
+ @[ -f $(TARGET_SUBDIR)/libbacktrace/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(NORMAL_TARGET_EXPORTS) \
- echo "Doing mostlyclean in $(TARGET_SUBDIR)/libbacktrace" ; \
+ echo "Doing mostlyclean in $(TARGET_SUBDIR)/libbacktrace"; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
@@ -36418,11 +39849,11 @@ maybe-clean-target-libbacktrace: clean-target-libbacktrace
clean-target-libbacktrace:
@: $(MAKE); $(unstage)
- @[ -f $(TARGET_SUBDIR)/libbacktrace/Makefile ] || exit 0 ; \
+ @[ -f $(TARGET_SUBDIR)/libbacktrace/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(NORMAL_TARGET_EXPORTS) \
- echo "Doing clean in $(TARGET_SUBDIR)/libbacktrace" ; \
+ echo "Doing clean in $(TARGET_SUBDIR)/libbacktrace"; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
@@ -36443,11 +39874,11 @@ maybe-distclean-target-libbacktrace: distclean-target-libbacktrace
distclean-target-libbacktrace:
@: $(MAKE); $(unstage)
- @[ -f $(TARGET_SUBDIR)/libbacktrace/Makefile ] || exit 0 ; \
+ @[ -f $(TARGET_SUBDIR)/libbacktrace/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(NORMAL_TARGET_EXPORTS) \
- echo "Doing distclean in $(TARGET_SUBDIR)/libbacktrace" ; \
+ echo "Doing distclean in $(TARGET_SUBDIR)/libbacktrace"; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
@@ -36468,11 +39899,11 @@ maybe-maintainer-clean-target-libbacktrace: maintainer-clean-target-libbacktrace
maintainer-clean-target-libbacktrace:
@: $(MAKE); $(unstage)
- @[ -f $(TARGET_SUBDIR)/libbacktrace/Makefile ] || exit 0 ; \
+ @[ -f $(TARGET_SUBDIR)/libbacktrace/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(NORMAL_TARGET_EXPORTS) \
- echo "Doing maintainer-clean in $(TARGET_SUBDIR)/libbacktrace" ; \
+ echo "Doing maintainer-clean in $(TARGET_SUBDIR)/libbacktrace"; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
@@ -36502,8 +39933,8 @@ configure-target-libquadmath:
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
echo "Checking multilib configuration for libquadmath..."; \
- $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libquadmath ; \
- $(CC_FOR_TARGET) --print-multi-lib > $(TARGET_SUBDIR)/libquadmath/multilib.tmp 2> /dev/null ; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libquadmath; \
+ $(CC_FOR_TARGET) --print-multi-lib > $(TARGET_SUBDIR)/libquadmath/multilib.tmp 2> /dev/null; \
if test -r $(TARGET_SUBDIR)/libquadmath/multilib.out; then \
if cmp -s $(TARGET_SUBDIR)/libquadmath/multilib.tmp $(TARGET_SUBDIR)/libquadmath/multilib.out; then \
rm -f $(TARGET_SUBDIR)/libquadmath/multilib.tmp; \
@@ -36515,7 +39946,7 @@ configure-target-libquadmath:
mv $(TARGET_SUBDIR)/libquadmath/multilib.tmp $(TARGET_SUBDIR)/libquadmath/multilib.out; \
fi; \
test ! -f $(TARGET_SUBDIR)/libquadmath/Makefile || exit 0; \
- $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libquadmath ; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libquadmath; \
$(NORMAL_TARGET_EXPORTS) \
echo Configuring in $(TARGET_SUBDIR)/libquadmath; \
cd "$(TARGET_SUBDIR)/libquadmath" || exit 1; \
@@ -36524,12 +39955,13 @@ configure-target-libquadmath:
*) topdir=`echo $(TARGET_SUBDIR)/libquadmath/ | \
sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
esac; \
- srcdiroption="--srcdir=$${topdir}/libquadmath"; \
- libsrcdir="$$s/libquadmath"; \
+ module_srcdir=libquadmath; \
rm -f no-such-file || : ; \
- CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure \
+ CONFIG_SITE=no-such-file $(SHELL) \
+ $$s/$$module_srcdir/configure \
+ --srcdir=$${topdir}/$$module_srcdir \
$(TARGET_CONFIGARGS) --build=${build_alias} --host=${target_alias} \
- --target=${target_alias} $${srcdiroption} \
+ --target=${target_alias} \
|| exit 1
@endif target-libquadmath
@@ -36614,11 +40046,11 @@ maybe-info-target-libquadmath: info-target-libquadmath
info-target-libquadmath: \
configure-target-libquadmath
@: $(MAKE); $(unstage)
- @[ -f $(TARGET_SUBDIR)/libquadmath/Makefile ] || exit 0 ; \
+ @[ -f $(TARGET_SUBDIR)/libquadmath/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(NORMAL_TARGET_EXPORTS) \
- echo "Doing info in $(TARGET_SUBDIR)/libquadmath" ; \
+ echo "Doing info in $(TARGET_SUBDIR)/libquadmath"; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
@@ -36640,11 +40072,11 @@ maybe-dvi-target-libquadmath: dvi-target-libquadmath
dvi-target-libquadmath: \
configure-target-libquadmath
@: $(MAKE); $(unstage)
- @[ -f $(TARGET_SUBDIR)/libquadmath/Makefile ] || exit 0 ; \
+ @[ -f $(TARGET_SUBDIR)/libquadmath/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(NORMAL_TARGET_EXPORTS) \
- echo "Doing dvi in $(TARGET_SUBDIR)/libquadmath" ; \
+ echo "Doing dvi in $(TARGET_SUBDIR)/libquadmath"; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
@@ -36666,11 +40098,11 @@ maybe-pdf-target-libquadmath: pdf-target-libquadmath
pdf-target-libquadmath: \
configure-target-libquadmath
@: $(MAKE); $(unstage)
- @[ -f $(TARGET_SUBDIR)/libquadmath/Makefile ] || exit 0 ; \
+ @[ -f $(TARGET_SUBDIR)/libquadmath/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(NORMAL_TARGET_EXPORTS) \
- echo "Doing pdf in $(TARGET_SUBDIR)/libquadmath" ; \
+ echo "Doing pdf in $(TARGET_SUBDIR)/libquadmath"; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
@@ -36692,11 +40124,11 @@ maybe-html-target-libquadmath: html-target-libquadmath
html-target-libquadmath: \
configure-target-libquadmath
@: $(MAKE); $(unstage)
- @[ -f $(TARGET_SUBDIR)/libquadmath/Makefile ] || exit 0 ; \
+ @[ -f $(TARGET_SUBDIR)/libquadmath/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(NORMAL_TARGET_EXPORTS) \
- echo "Doing html in $(TARGET_SUBDIR)/libquadmath" ; \
+ echo "Doing html in $(TARGET_SUBDIR)/libquadmath"; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
@@ -36718,11 +40150,11 @@ maybe-TAGS-target-libquadmath: TAGS-target-libquadmath
TAGS-target-libquadmath: \
configure-target-libquadmath
@: $(MAKE); $(unstage)
- @[ -f $(TARGET_SUBDIR)/libquadmath/Makefile ] || exit 0 ; \
+ @[ -f $(TARGET_SUBDIR)/libquadmath/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(NORMAL_TARGET_EXPORTS) \
- echo "Doing TAGS in $(TARGET_SUBDIR)/libquadmath" ; \
+ echo "Doing TAGS in $(TARGET_SUBDIR)/libquadmath"; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
@@ -36745,11 +40177,11 @@ install-info-target-libquadmath: \
configure-target-libquadmath \
info-target-libquadmath
@: $(MAKE); $(unstage)
- @[ -f $(TARGET_SUBDIR)/libquadmath/Makefile ] || exit 0 ; \
+ @[ -f $(TARGET_SUBDIR)/libquadmath/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(NORMAL_TARGET_EXPORTS) \
- echo "Doing install-info in $(TARGET_SUBDIR)/libquadmath" ; \
+ echo "Doing install-info in $(TARGET_SUBDIR)/libquadmath"; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
@@ -36772,11 +40204,11 @@ install-pdf-target-libquadmath: \
configure-target-libquadmath \
pdf-target-libquadmath
@: $(MAKE); $(unstage)
- @[ -f $(TARGET_SUBDIR)/libquadmath/Makefile ] || exit 0 ; \
+ @[ -f $(TARGET_SUBDIR)/libquadmath/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(NORMAL_TARGET_EXPORTS) \
- echo "Doing install-pdf in $(TARGET_SUBDIR)/libquadmath" ; \
+ echo "Doing install-pdf in $(TARGET_SUBDIR)/libquadmath"; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
@@ -36799,11 +40231,11 @@ install-html-target-libquadmath: \
configure-target-libquadmath \
html-target-libquadmath
@: $(MAKE); $(unstage)
- @[ -f $(TARGET_SUBDIR)/libquadmath/Makefile ] || exit 0 ; \
+ @[ -f $(TARGET_SUBDIR)/libquadmath/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(NORMAL_TARGET_EXPORTS) \
- echo "Doing install-html in $(TARGET_SUBDIR)/libquadmath" ; \
+ echo "Doing install-html in $(TARGET_SUBDIR)/libquadmath"; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
@@ -36825,11 +40257,11 @@ maybe-installcheck-target-libquadmath: installcheck-target-libquadmath
installcheck-target-libquadmath: \
configure-target-libquadmath
@: $(MAKE); $(unstage)
- @[ -f $(TARGET_SUBDIR)/libquadmath/Makefile ] || exit 0 ; \
+ @[ -f $(TARGET_SUBDIR)/libquadmath/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(NORMAL_TARGET_EXPORTS) \
- echo "Doing installcheck in $(TARGET_SUBDIR)/libquadmath" ; \
+ echo "Doing installcheck in $(TARGET_SUBDIR)/libquadmath"; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
@@ -36850,11 +40282,11 @@ maybe-mostlyclean-target-libquadmath: mostlyclean-target-libquadmath
mostlyclean-target-libquadmath:
@: $(MAKE); $(unstage)
- @[ -f $(TARGET_SUBDIR)/libquadmath/Makefile ] || exit 0 ; \
+ @[ -f $(TARGET_SUBDIR)/libquadmath/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(NORMAL_TARGET_EXPORTS) \
- echo "Doing mostlyclean in $(TARGET_SUBDIR)/libquadmath" ; \
+ echo "Doing mostlyclean in $(TARGET_SUBDIR)/libquadmath"; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
@@ -36875,11 +40307,11 @@ maybe-clean-target-libquadmath: clean-target-libquadmath
clean-target-libquadmath:
@: $(MAKE); $(unstage)
- @[ -f $(TARGET_SUBDIR)/libquadmath/Makefile ] || exit 0 ; \
+ @[ -f $(TARGET_SUBDIR)/libquadmath/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(NORMAL_TARGET_EXPORTS) \
- echo "Doing clean in $(TARGET_SUBDIR)/libquadmath" ; \
+ echo "Doing clean in $(TARGET_SUBDIR)/libquadmath"; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
@@ -36900,11 +40332,11 @@ maybe-distclean-target-libquadmath: distclean-target-libquadmath
distclean-target-libquadmath:
@: $(MAKE); $(unstage)
- @[ -f $(TARGET_SUBDIR)/libquadmath/Makefile ] || exit 0 ; \
+ @[ -f $(TARGET_SUBDIR)/libquadmath/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(NORMAL_TARGET_EXPORTS) \
- echo "Doing distclean in $(TARGET_SUBDIR)/libquadmath" ; \
+ echo "Doing distclean in $(TARGET_SUBDIR)/libquadmath"; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
@@ -36925,11 +40357,11 @@ maybe-maintainer-clean-target-libquadmath: maintainer-clean-target-libquadmath
maintainer-clean-target-libquadmath:
@: $(MAKE); $(unstage)
- @[ -f $(TARGET_SUBDIR)/libquadmath/Makefile ] || exit 0 ; \
+ @[ -f $(TARGET_SUBDIR)/libquadmath/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(NORMAL_TARGET_EXPORTS) \
- echo "Doing maintainer-clean in $(TARGET_SUBDIR)/libquadmath" ; \
+ echo "Doing maintainer-clean in $(TARGET_SUBDIR)/libquadmath"; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
@@ -36959,8 +40391,8 @@ configure-target-libgfortran:
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
echo "Checking multilib configuration for libgfortran..."; \
- $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libgfortran ; \
- $(CC_FOR_TARGET) --print-multi-lib > $(TARGET_SUBDIR)/libgfortran/multilib.tmp 2> /dev/null ; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libgfortran; \
+ $(CC_FOR_TARGET) --print-multi-lib > $(TARGET_SUBDIR)/libgfortran/multilib.tmp 2> /dev/null; \
if test -r $(TARGET_SUBDIR)/libgfortran/multilib.out; then \
if cmp -s $(TARGET_SUBDIR)/libgfortran/multilib.tmp $(TARGET_SUBDIR)/libgfortran/multilib.out; then \
rm -f $(TARGET_SUBDIR)/libgfortran/multilib.tmp; \
@@ -36972,7 +40404,7 @@ configure-target-libgfortran:
mv $(TARGET_SUBDIR)/libgfortran/multilib.tmp $(TARGET_SUBDIR)/libgfortran/multilib.out; \
fi; \
test ! -f $(TARGET_SUBDIR)/libgfortran/Makefile || exit 0; \
- $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libgfortran ; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libgfortran; \
$(NORMAL_TARGET_EXPORTS) \
echo Configuring in $(TARGET_SUBDIR)/libgfortran; \
cd "$(TARGET_SUBDIR)/libgfortran" || exit 1; \
@@ -36981,12 +40413,13 @@ configure-target-libgfortran:
*) topdir=`echo $(TARGET_SUBDIR)/libgfortran/ | \
sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
esac; \
- srcdiroption="--srcdir=$${topdir}/libgfortran"; \
- libsrcdir="$$s/libgfortran"; \
+ module_srcdir=libgfortran; \
rm -f no-such-file || : ; \
- CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure \
+ CONFIG_SITE=no-such-file $(SHELL) \
+ $$s/$$module_srcdir/configure \
+ --srcdir=$${topdir}/$$module_srcdir \
$(TARGET_CONFIGARGS) --build=${build_alias} --host=${target_alias} \
- --target=${target_alias} $${srcdiroption} \
+ --target=${target_alias} \
|| exit 1
@endif target-libgfortran
@@ -37071,11 +40504,11 @@ maybe-info-target-libgfortran: info-target-libgfortran
info-target-libgfortran: \
configure-target-libgfortran
@: $(MAKE); $(unstage)
- @[ -f $(TARGET_SUBDIR)/libgfortran/Makefile ] || exit 0 ; \
+ @[ -f $(TARGET_SUBDIR)/libgfortran/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(NORMAL_TARGET_EXPORTS) \
- echo "Doing info in $(TARGET_SUBDIR)/libgfortran" ; \
+ echo "Doing info in $(TARGET_SUBDIR)/libgfortran"; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
@@ -37097,11 +40530,11 @@ maybe-dvi-target-libgfortran: dvi-target-libgfortran
dvi-target-libgfortran: \
configure-target-libgfortran
@: $(MAKE); $(unstage)
- @[ -f $(TARGET_SUBDIR)/libgfortran/Makefile ] || exit 0 ; \
+ @[ -f $(TARGET_SUBDIR)/libgfortran/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(NORMAL_TARGET_EXPORTS) \
- echo "Doing dvi in $(TARGET_SUBDIR)/libgfortran" ; \
+ echo "Doing dvi in $(TARGET_SUBDIR)/libgfortran"; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
@@ -37123,11 +40556,11 @@ maybe-pdf-target-libgfortran: pdf-target-libgfortran
pdf-target-libgfortran: \
configure-target-libgfortran
@: $(MAKE); $(unstage)
- @[ -f $(TARGET_SUBDIR)/libgfortran/Makefile ] || exit 0 ; \
+ @[ -f $(TARGET_SUBDIR)/libgfortran/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(NORMAL_TARGET_EXPORTS) \
- echo "Doing pdf in $(TARGET_SUBDIR)/libgfortran" ; \
+ echo "Doing pdf in $(TARGET_SUBDIR)/libgfortran"; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
@@ -37149,11 +40582,11 @@ maybe-html-target-libgfortran: html-target-libgfortran
html-target-libgfortran: \
configure-target-libgfortran
@: $(MAKE); $(unstage)
- @[ -f $(TARGET_SUBDIR)/libgfortran/Makefile ] || exit 0 ; \
+ @[ -f $(TARGET_SUBDIR)/libgfortran/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(NORMAL_TARGET_EXPORTS) \
- echo "Doing html in $(TARGET_SUBDIR)/libgfortran" ; \
+ echo "Doing html in $(TARGET_SUBDIR)/libgfortran"; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
@@ -37175,11 +40608,11 @@ maybe-TAGS-target-libgfortran: TAGS-target-libgfortran
TAGS-target-libgfortran: \
configure-target-libgfortran
@: $(MAKE); $(unstage)
- @[ -f $(TARGET_SUBDIR)/libgfortran/Makefile ] || exit 0 ; \
+ @[ -f $(TARGET_SUBDIR)/libgfortran/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(NORMAL_TARGET_EXPORTS) \
- echo "Doing TAGS in $(TARGET_SUBDIR)/libgfortran" ; \
+ echo "Doing TAGS in $(TARGET_SUBDIR)/libgfortran"; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
@@ -37202,11 +40635,11 @@ install-info-target-libgfortran: \
configure-target-libgfortran \
info-target-libgfortran
@: $(MAKE); $(unstage)
- @[ -f $(TARGET_SUBDIR)/libgfortran/Makefile ] || exit 0 ; \
+ @[ -f $(TARGET_SUBDIR)/libgfortran/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(NORMAL_TARGET_EXPORTS) \
- echo "Doing install-info in $(TARGET_SUBDIR)/libgfortran" ; \
+ echo "Doing install-info in $(TARGET_SUBDIR)/libgfortran"; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
@@ -37229,11 +40662,11 @@ install-pdf-target-libgfortran: \
configure-target-libgfortran \
pdf-target-libgfortran
@: $(MAKE); $(unstage)
- @[ -f $(TARGET_SUBDIR)/libgfortran/Makefile ] || exit 0 ; \
+ @[ -f $(TARGET_SUBDIR)/libgfortran/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(NORMAL_TARGET_EXPORTS) \
- echo "Doing install-pdf in $(TARGET_SUBDIR)/libgfortran" ; \
+ echo "Doing install-pdf in $(TARGET_SUBDIR)/libgfortran"; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
@@ -37256,11 +40689,11 @@ install-html-target-libgfortran: \
configure-target-libgfortran \
html-target-libgfortran
@: $(MAKE); $(unstage)
- @[ -f $(TARGET_SUBDIR)/libgfortran/Makefile ] || exit 0 ; \
+ @[ -f $(TARGET_SUBDIR)/libgfortran/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(NORMAL_TARGET_EXPORTS) \
- echo "Doing install-html in $(TARGET_SUBDIR)/libgfortran" ; \
+ echo "Doing install-html in $(TARGET_SUBDIR)/libgfortran"; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
@@ -37282,11 +40715,11 @@ maybe-installcheck-target-libgfortran: installcheck-target-libgfortran
installcheck-target-libgfortran: \
configure-target-libgfortran
@: $(MAKE); $(unstage)
- @[ -f $(TARGET_SUBDIR)/libgfortran/Makefile ] || exit 0 ; \
+ @[ -f $(TARGET_SUBDIR)/libgfortran/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(NORMAL_TARGET_EXPORTS) \
- echo "Doing installcheck in $(TARGET_SUBDIR)/libgfortran" ; \
+ echo "Doing installcheck in $(TARGET_SUBDIR)/libgfortran"; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
@@ -37307,11 +40740,11 @@ maybe-mostlyclean-target-libgfortran: mostlyclean-target-libgfortran
mostlyclean-target-libgfortran:
@: $(MAKE); $(unstage)
- @[ -f $(TARGET_SUBDIR)/libgfortran/Makefile ] || exit 0 ; \
+ @[ -f $(TARGET_SUBDIR)/libgfortran/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(NORMAL_TARGET_EXPORTS) \
- echo "Doing mostlyclean in $(TARGET_SUBDIR)/libgfortran" ; \
+ echo "Doing mostlyclean in $(TARGET_SUBDIR)/libgfortran"; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
@@ -37332,11 +40765,11 @@ maybe-clean-target-libgfortran: clean-target-libgfortran
clean-target-libgfortran:
@: $(MAKE); $(unstage)
- @[ -f $(TARGET_SUBDIR)/libgfortran/Makefile ] || exit 0 ; \
+ @[ -f $(TARGET_SUBDIR)/libgfortran/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(NORMAL_TARGET_EXPORTS) \
- echo "Doing clean in $(TARGET_SUBDIR)/libgfortran" ; \
+ echo "Doing clean in $(TARGET_SUBDIR)/libgfortran"; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
@@ -37357,11 +40790,11 @@ maybe-distclean-target-libgfortran: distclean-target-libgfortran
distclean-target-libgfortran:
@: $(MAKE); $(unstage)
- @[ -f $(TARGET_SUBDIR)/libgfortran/Makefile ] || exit 0 ; \
+ @[ -f $(TARGET_SUBDIR)/libgfortran/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(NORMAL_TARGET_EXPORTS) \
- echo "Doing distclean in $(TARGET_SUBDIR)/libgfortran" ; \
+ echo "Doing distclean in $(TARGET_SUBDIR)/libgfortran"; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
@@ -37382,11 +40815,11 @@ maybe-maintainer-clean-target-libgfortran: maintainer-clean-target-libgfortran
maintainer-clean-target-libgfortran:
@: $(MAKE); $(unstage)
- @[ -f $(TARGET_SUBDIR)/libgfortran/Makefile ] || exit 0 ; \
+ @[ -f $(TARGET_SUBDIR)/libgfortran/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(NORMAL_TARGET_EXPORTS) \
- echo "Doing maintainer-clean in $(TARGET_SUBDIR)/libgfortran" ; \
+ echo "Doing maintainer-clean in $(TARGET_SUBDIR)/libgfortran"; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
@@ -37416,8 +40849,8 @@ configure-target-libobjc:
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
echo "Checking multilib configuration for libobjc..."; \
- $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libobjc ; \
- $(CC_FOR_TARGET) --print-multi-lib > $(TARGET_SUBDIR)/libobjc/multilib.tmp 2> /dev/null ; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libobjc; \
+ $(CC_FOR_TARGET) --print-multi-lib > $(TARGET_SUBDIR)/libobjc/multilib.tmp 2> /dev/null; \
if test -r $(TARGET_SUBDIR)/libobjc/multilib.out; then \
if cmp -s $(TARGET_SUBDIR)/libobjc/multilib.tmp $(TARGET_SUBDIR)/libobjc/multilib.out; then \
rm -f $(TARGET_SUBDIR)/libobjc/multilib.tmp; \
@@ -37429,7 +40862,7 @@ configure-target-libobjc:
mv $(TARGET_SUBDIR)/libobjc/multilib.tmp $(TARGET_SUBDIR)/libobjc/multilib.out; \
fi; \
test ! -f $(TARGET_SUBDIR)/libobjc/Makefile || exit 0; \
- $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libobjc ; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libobjc; \
$(NORMAL_TARGET_EXPORTS) \
echo Configuring in $(TARGET_SUBDIR)/libobjc; \
cd "$(TARGET_SUBDIR)/libobjc" || exit 1; \
@@ -37438,12 +40871,13 @@ configure-target-libobjc:
*) topdir=`echo $(TARGET_SUBDIR)/libobjc/ | \
sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
esac; \
- srcdiroption="--srcdir=$${topdir}/libobjc"; \
- libsrcdir="$$s/libobjc"; \
+ module_srcdir=libobjc; \
rm -f no-such-file || : ; \
- CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure \
+ CONFIG_SITE=no-such-file $(SHELL) \
+ $$s/$$module_srcdir/configure \
+ --srcdir=$${topdir}/$$module_srcdir \
$(TARGET_CONFIGARGS) --build=${build_alias} --host=${target_alias} \
- --target=${target_alias} $${srcdiroption} \
+ --target=${target_alias} \
|| exit 1
@endif target-libobjc
@@ -37528,11 +40962,11 @@ maybe-info-target-libobjc: info-target-libobjc
info-target-libobjc: \
configure-target-libobjc
@: $(MAKE); $(unstage)
- @[ -f $(TARGET_SUBDIR)/libobjc/Makefile ] || exit 0 ; \
+ @[ -f $(TARGET_SUBDIR)/libobjc/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(NORMAL_TARGET_EXPORTS) \
- echo "Doing info in $(TARGET_SUBDIR)/libobjc" ; \
+ echo "Doing info in $(TARGET_SUBDIR)/libobjc"; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
@@ -37554,11 +40988,11 @@ maybe-dvi-target-libobjc: dvi-target-libobjc
dvi-target-libobjc: \
configure-target-libobjc
@: $(MAKE); $(unstage)
- @[ -f $(TARGET_SUBDIR)/libobjc/Makefile ] || exit 0 ; \
+ @[ -f $(TARGET_SUBDIR)/libobjc/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(NORMAL_TARGET_EXPORTS) \
- echo "Doing dvi in $(TARGET_SUBDIR)/libobjc" ; \
+ echo "Doing dvi in $(TARGET_SUBDIR)/libobjc"; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
@@ -37580,11 +41014,11 @@ maybe-pdf-target-libobjc: pdf-target-libobjc
pdf-target-libobjc: \
configure-target-libobjc
@: $(MAKE); $(unstage)
- @[ -f $(TARGET_SUBDIR)/libobjc/Makefile ] || exit 0 ; \
+ @[ -f $(TARGET_SUBDIR)/libobjc/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(NORMAL_TARGET_EXPORTS) \
- echo "Doing pdf in $(TARGET_SUBDIR)/libobjc" ; \
+ echo "Doing pdf in $(TARGET_SUBDIR)/libobjc"; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
@@ -37606,11 +41040,11 @@ maybe-html-target-libobjc: html-target-libobjc
html-target-libobjc: \
configure-target-libobjc
@: $(MAKE); $(unstage)
- @[ -f $(TARGET_SUBDIR)/libobjc/Makefile ] || exit 0 ; \
+ @[ -f $(TARGET_SUBDIR)/libobjc/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(NORMAL_TARGET_EXPORTS) \
- echo "Doing html in $(TARGET_SUBDIR)/libobjc" ; \
+ echo "Doing html in $(TARGET_SUBDIR)/libobjc"; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
@@ -37632,11 +41066,11 @@ maybe-TAGS-target-libobjc: TAGS-target-libobjc
TAGS-target-libobjc: \
configure-target-libobjc
@: $(MAKE); $(unstage)
- @[ -f $(TARGET_SUBDIR)/libobjc/Makefile ] || exit 0 ; \
+ @[ -f $(TARGET_SUBDIR)/libobjc/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(NORMAL_TARGET_EXPORTS) \
- echo "Doing TAGS in $(TARGET_SUBDIR)/libobjc" ; \
+ echo "Doing TAGS in $(TARGET_SUBDIR)/libobjc"; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
@@ -37659,11 +41093,11 @@ install-info-target-libobjc: \
configure-target-libobjc \
info-target-libobjc
@: $(MAKE); $(unstage)
- @[ -f $(TARGET_SUBDIR)/libobjc/Makefile ] || exit 0 ; \
+ @[ -f $(TARGET_SUBDIR)/libobjc/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(NORMAL_TARGET_EXPORTS) \
- echo "Doing install-info in $(TARGET_SUBDIR)/libobjc" ; \
+ echo "Doing install-info in $(TARGET_SUBDIR)/libobjc"; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
@@ -37686,11 +41120,11 @@ install-pdf-target-libobjc: \
configure-target-libobjc \
pdf-target-libobjc
@: $(MAKE); $(unstage)
- @[ -f $(TARGET_SUBDIR)/libobjc/Makefile ] || exit 0 ; \
+ @[ -f $(TARGET_SUBDIR)/libobjc/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(NORMAL_TARGET_EXPORTS) \
- echo "Doing install-pdf in $(TARGET_SUBDIR)/libobjc" ; \
+ echo "Doing install-pdf in $(TARGET_SUBDIR)/libobjc"; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
@@ -37713,11 +41147,11 @@ install-html-target-libobjc: \
configure-target-libobjc \
html-target-libobjc
@: $(MAKE); $(unstage)
- @[ -f $(TARGET_SUBDIR)/libobjc/Makefile ] || exit 0 ; \
+ @[ -f $(TARGET_SUBDIR)/libobjc/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(NORMAL_TARGET_EXPORTS) \
- echo "Doing install-html in $(TARGET_SUBDIR)/libobjc" ; \
+ echo "Doing install-html in $(TARGET_SUBDIR)/libobjc"; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
@@ -37739,11 +41173,11 @@ maybe-installcheck-target-libobjc: installcheck-target-libobjc
installcheck-target-libobjc: \
configure-target-libobjc
@: $(MAKE); $(unstage)
- @[ -f $(TARGET_SUBDIR)/libobjc/Makefile ] || exit 0 ; \
+ @[ -f $(TARGET_SUBDIR)/libobjc/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(NORMAL_TARGET_EXPORTS) \
- echo "Doing installcheck in $(TARGET_SUBDIR)/libobjc" ; \
+ echo "Doing installcheck in $(TARGET_SUBDIR)/libobjc"; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
@@ -37764,11 +41198,11 @@ maybe-mostlyclean-target-libobjc: mostlyclean-target-libobjc
mostlyclean-target-libobjc:
@: $(MAKE); $(unstage)
- @[ -f $(TARGET_SUBDIR)/libobjc/Makefile ] || exit 0 ; \
+ @[ -f $(TARGET_SUBDIR)/libobjc/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(NORMAL_TARGET_EXPORTS) \
- echo "Doing mostlyclean in $(TARGET_SUBDIR)/libobjc" ; \
+ echo "Doing mostlyclean in $(TARGET_SUBDIR)/libobjc"; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
@@ -37789,11 +41223,11 @@ maybe-clean-target-libobjc: clean-target-libobjc
clean-target-libobjc:
@: $(MAKE); $(unstage)
- @[ -f $(TARGET_SUBDIR)/libobjc/Makefile ] || exit 0 ; \
+ @[ -f $(TARGET_SUBDIR)/libobjc/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(NORMAL_TARGET_EXPORTS) \
- echo "Doing clean in $(TARGET_SUBDIR)/libobjc" ; \
+ echo "Doing clean in $(TARGET_SUBDIR)/libobjc"; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
@@ -37814,11 +41248,11 @@ maybe-distclean-target-libobjc: distclean-target-libobjc
distclean-target-libobjc:
@: $(MAKE); $(unstage)
- @[ -f $(TARGET_SUBDIR)/libobjc/Makefile ] || exit 0 ; \
+ @[ -f $(TARGET_SUBDIR)/libobjc/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(NORMAL_TARGET_EXPORTS) \
- echo "Doing distclean in $(TARGET_SUBDIR)/libobjc" ; \
+ echo "Doing distclean in $(TARGET_SUBDIR)/libobjc"; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
@@ -37839,11 +41273,11 @@ maybe-maintainer-clean-target-libobjc: maintainer-clean-target-libobjc
maintainer-clean-target-libobjc:
@: $(MAKE); $(unstage)
- @[ -f $(TARGET_SUBDIR)/libobjc/Makefile ] || exit 0 ; \
+ @[ -f $(TARGET_SUBDIR)/libobjc/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(NORMAL_TARGET_EXPORTS) \
- echo "Doing maintainer-clean in $(TARGET_SUBDIR)/libobjc" ; \
+ echo "Doing maintainer-clean in $(TARGET_SUBDIR)/libobjc"; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
@@ -37873,8 +41307,8 @@ configure-target-libgo:
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
echo "Checking multilib configuration for libgo..."; \
- $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libgo ; \
- $(CC_FOR_TARGET) --print-multi-lib > $(TARGET_SUBDIR)/libgo/multilib.tmp 2> /dev/null ; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libgo; \
+ $(CC_FOR_TARGET) --print-multi-lib > $(TARGET_SUBDIR)/libgo/multilib.tmp 2> /dev/null; \
if test -r $(TARGET_SUBDIR)/libgo/multilib.out; then \
if cmp -s $(TARGET_SUBDIR)/libgo/multilib.tmp $(TARGET_SUBDIR)/libgo/multilib.out; then \
rm -f $(TARGET_SUBDIR)/libgo/multilib.tmp; \
@@ -37886,7 +41320,7 @@ configure-target-libgo:
mv $(TARGET_SUBDIR)/libgo/multilib.tmp $(TARGET_SUBDIR)/libgo/multilib.out; \
fi; \
test ! -f $(TARGET_SUBDIR)/libgo/Makefile || exit 0; \
- $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libgo ; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libgo; \
$(NORMAL_TARGET_EXPORTS) \
echo Configuring in $(TARGET_SUBDIR)/libgo; \
cd "$(TARGET_SUBDIR)/libgo" || exit 1; \
@@ -37895,12 +41329,13 @@ configure-target-libgo:
*) topdir=`echo $(TARGET_SUBDIR)/libgo/ | \
sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
esac; \
- srcdiroption="--srcdir=$${topdir}/libgo"; \
- libsrcdir="$$s/libgo"; \
+ module_srcdir=libgo; \
rm -f no-such-file || : ; \
- CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure \
+ CONFIG_SITE=no-such-file $(SHELL) \
+ $$s/$$module_srcdir/configure \
+ --srcdir=$${topdir}/$$module_srcdir \
$(TARGET_CONFIGARGS) --build=${build_alias} --host=${target_alias} \
- --target=${target_alias} $${srcdiroption} \
+ --target=${target_alias} \
|| exit 1
@endif target-libgo
@@ -37985,11 +41420,11 @@ maybe-info-target-libgo: info-target-libgo
info-target-libgo: \
configure-target-libgo
@: $(MAKE); $(unstage)
- @[ -f $(TARGET_SUBDIR)/libgo/Makefile ] || exit 0 ; \
+ @[ -f $(TARGET_SUBDIR)/libgo/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(NORMAL_TARGET_EXPORTS) \
- echo "Doing info in $(TARGET_SUBDIR)/libgo" ; \
+ echo "Doing info in $(TARGET_SUBDIR)/libgo"; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
@@ -38011,11 +41446,11 @@ maybe-dvi-target-libgo: dvi-target-libgo
dvi-target-libgo: \
configure-target-libgo
@: $(MAKE); $(unstage)
- @[ -f $(TARGET_SUBDIR)/libgo/Makefile ] || exit 0 ; \
+ @[ -f $(TARGET_SUBDIR)/libgo/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(NORMAL_TARGET_EXPORTS) \
- echo "Doing dvi in $(TARGET_SUBDIR)/libgo" ; \
+ echo "Doing dvi in $(TARGET_SUBDIR)/libgo"; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
@@ -38037,11 +41472,11 @@ maybe-pdf-target-libgo: pdf-target-libgo
pdf-target-libgo: \
configure-target-libgo
@: $(MAKE); $(unstage)
- @[ -f $(TARGET_SUBDIR)/libgo/Makefile ] || exit 0 ; \
+ @[ -f $(TARGET_SUBDIR)/libgo/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(NORMAL_TARGET_EXPORTS) \
- echo "Doing pdf in $(TARGET_SUBDIR)/libgo" ; \
+ echo "Doing pdf in $(TARGET_SUBDIR)/libgo"; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
@@ -38063,11 +41498,11 @@ maybe-html-target-libgo: html-target-libgo
html-target-libgo: \
configure-target-libgo
@: $(MAKE); $(unstage)
- @[ -f $(TARGET_SUBDIR)/libgo/Makefile ] || exit 0 ; \
+ @[ -f $(TARGET_SUBDIR)/libgo/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(NORMAL_TARGET_EXPORTS) \
- echo "Doing html in $(TARGET_SUBDIR)/libgo" ; \
+ echo "Doing html in $(TARGET_SUBDIR)/libgo"; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
@@ -38089,11 +41524,11 @@ maybe-TAGS-target-libgo: TAGS-target-libgo
TAGS-target-libgo: \
configure-target-libgo
@: $(MAKE); $(unstage)
- @[ -f $(TARGET_SUBDIR)/libgo/Makefile ] || exit 0 ; \
+ @[ -f $(TARGET_SUBDIR)/libgo/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(NORMAL_TARGET_EXPORTS) \
- echo "Doing TAGS in $(TARGET_SUBDIR)/libgo" ; \
+ echo "Doing TAGS in $(TARGET_SUBDIR)/libgo"; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
@@ -38116,11 +41551,11 @@ install-info-target-libgo: \
configure-target-libgo \
info-target-libgo
@: $(MAKE); $(unstage)
- @[ -f $(TARGET_SUBDIR)/libgo/Makefile ] || exit 0 ; \
+ @[ -f $(TARGET_SUBDIR)/libgo/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(NORMAL_TARGET_EXPORTS) \
- echo "Doing install-info in $(TARGET_SUBDIR)/libgo" ; \
+ echo "Doing install-info in $(TARGET_SUBDIR)/libgo"; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
@@ -38143,11 +41578,11 @@ install-pdf-target-libgo: \
configure-target-libgo \
pdf-target-libgo
@: $(MAKE); $(unstage)
- @[ -f $(TARGET_SUBDIR)/libgo/Makefile ] || exit 0 ; \
+ @[ -f $(TARGET_SUBDIR)/libgo/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(NORMAL_TARGET_EXPORTS) \
- echo "Doing install-pdf in $(TARGET_SUBDIR)/libgo" ; \
+ echo "Doing install-pdf in $(TARGET_SUBDIR)/libgo"; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
@@ -38170,11 +41605,11 @@ install-html-target-libgo: \
configure-target-libgo \
html-target-libgo
@: $(MAKE); $(unstage)
- @[ -f $(TARGET_SUBDIR)/libgo/Makefile ] || exit 0 ; \
+ @[ -f $(TARGET_SUBDIR)/libgo/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(NORMAL_TARGET_EXPORTS) \
- echo "Doing install-html in $(TARGET_SUBDIR)/libgo" ; \
+ echo "Doing install-html in $(TARGET_SUBDIR)/libgo"; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
@@ -38196,11 +41631,11 @@ maybe-installcheck-target-libgo: installcheck-target-libgo
installcheck-target-libgo: \
configure-target-libgo
@: $(MAKE); $(unstage)
- @[ -f $(TARGET_SUBDIR)/libgo/Makefile ] || exit 0 ; \
+ @[ -f $(TARGET_SUBDIR)/libgo/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(NORMAL_TARGET_EXPORTS) \
- echo "Doing installcheck in $(TARGET_SUBDIR)/libgo" ; \
+ echo "Doing installcheck in $(TARGET_SUBDIR)/libgo"; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
@@ -38221,11 +41656,11 @@ maybe-mostlyclean-target-libgo: mostlyclean-target-libgo
mostlyclean-target-libgo:
@: $(MAKE); $(unstage)
- @[ -f $(TARGET_SUBDIR)/libgo/Makefile ] || exit 0 ; \
+ @[ -f $(TARGET_SUBDIR)/libgo/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(NORMAL_TARGET_EXPORTS) \
- echo "Doing mostlyclean in $(TARGET_SUBDIR)/libgo" ; \
+ echo "Doing mostlyclean in $(TARGET_SUBDIR)/libgo"; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
@@ -38246,11 +41681,11 @@ maybe-clean-target-libgo: clean-target-libgo
clean-target-libgo:
@: $(MAKE); $(unstage)
- @[ -f $(TARGET_SUBDIR)/libgo/Makefile ] || exit 0 ; \
+ @[ -f $(TARGET_SUBDIR)/libgo/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(NORMAL_TARGET_EXPORTS) \
- echo "Doing clean in $(TARGET_SUBDIR)/libgo" ; \
+ echo "Doing clean in $(TARGET_SUBDIR)/libgo"; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
@@ -38271,11 +41706,11 @@ maybe-distclean-target-libgo: distclean-target-libgo
distclean-target-libgo:
@: $(MAKE); $(unstage)
- @[ -f $(TARGET_SUBDIR)/libgo/Makefile ] || exit 0 ; \
+ @[ -f $(TARGET_SUBDIR)/libgo/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(NORMAL_TARGET_EXPORTS) \
- echo "Doing distclean in $(TARGET_SUBDIR)/libgo" ; \
+ echo "Doing distclean in $(TARGET_SUBDIR)/libgo"; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
@@ -38296,11 +41731,11 @@ maybe-maintainer-clean-target-libgo: maintainer-clean-target-libgo
maintainer-clean-target-libgo:
@: $(MAKE); $(unstage)
- @[ -f $(TARGET_SUBDIR)/libgo/Makefile ] || exit 0 ; \
+ @[ -f $(TARGET_SUBDIR)/libgo/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(NORMAL_TARGET_EXPORTS) \
- echo "Doing maintainer-clean in $(TARGET_SUBDIR)/libgo" ; \
+ echo "Doing maintainer-clean in $(TARGET_SUBDIR)/libgo"; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
@@ -38330,8 +41765,8 @@ configure-target-libtermcap:
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
echo "Checking multilib configuration for libtermcap..."; \
- $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libtermcap ; \
- $(CC_FOR_TARGET) --print-multi-lib > $(TARGET_SUBDIR)/libtermcap/multilib.tmp 2> /dev/null ; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libtermcap; \
+ $(CC_FOR_TARGET) --print-multi-lib > $(TARGET_SUBDIR)/libtermcap/multilib.tmp 2> /dev/null; \
if test -r $(TARGET_SUBDIR)/libtermcap/multilib.out; then \
if cmp -s $(TARGET_SUBDIR)/libtermcap/multilib.tmp $(TARGET_SUBDIR)/libtermcap/multilib.out; then \
rm -f $(TARGET_SUBDIR)/libtermcap/multilib.tmp; \
@@ -38343,7 +41778,7 @@ configure-target-libtermcap:
mv $(TARGET_SUBDIR)/libtermcap/multilib.tmp $(TARGET_SUBDIR)/libtermcap/multilib.out; \
fi; \
test ! -f $(TARGET_SUBDIR)/libtermcap/Makefile || exit 0; \
- $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libtermcap ; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libtermcap; \
$(NORMAL_TARGET_EXPORTS) \
echo Configuring in $(TARGET_SUBDIR)/libtermcap; \
cd "$(TARGET_SUBDIR)/libtermcap" || exit 1; \
@@ -38352,12 +41787,13 @@ configure-target-libtermcap:
*) topdir=`echo $(TARGET_SUBDIR)/libtermcap/ | \
sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
esac; \
- srcdiroption="--srcdir=$${topdir}/libtermcap"; \
- libsrcdir="$$s/libtermcap"; \
+ module_srcdir=libtermcap; \
rm -f no-such-file || : ; \
- CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure \
+ CONFIG_SITE=no-such-file $(SHELL) \
+ $$s/$$module_srcdir/configure \
+ --srcdir=$${topdir}/$$module_srcdir \
$(TARGET_CONFIGARGS) --build=${build_alias} --host=${target_alias} \
- --target=${target_alias} $${srcdiroption} \
+ --target=${target_alias} \
|| exit 1
@endif target-libtermcap
@@ -38437,11 +41873,11 @@ maybe-info-target-libtermcap: info-target-libtermcap
info-target-libtermcap: \
configure-target-libtermcap
@: $(MAKE); $(unstage)
- @[ -f $(TARGET_SUBDIR)/libtermcap/Makefile ] || exit 0 ; \
+ @[ -f $(TARGET_SUBDIR)/libtermcap/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(NORMAL_TARGET_EXPORTS) \
- echo "Doing info in $(TARGET_SUBDIR)/libtermcap" ; \
+ echo "Doing info in $(TARGET_SUBDIR)/libtermcap"; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
@@ -38463,11 +41899,11 @@ maybe-dvi-target-libtermcap: dvi-target-libtermcap
dvi-target-libtermcap: \
configure-target-libtermcap
@: $(MAKE); $(unstage)
- @[ -f $(TARGET_SUBDIR)/libtermcap/Makefile ] || exit 0 ; \
+ @[ -f $(TARGET_SUBDIR)/libtermcap/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(NORMAL_TARGET_EXPORTS) \
- echo "Doing dvi in $(TARGET_SUBDIR)/libtermcap" ; \
+ echo "Doing dvi in $(TARGET_SUBDIR)/libtermcap"; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
@@ -38489,11 +41925,11 @@ maybe-pdf-target-libtermcap: pdf-target-libtermcap
pdf-target-libtermcap: \
configure-target-libtermcap
@: $(MAKE); $(unstage)
- @[ -f $(TARGET_SUBDIR)/libtermcap/Makefile ] || exit 0 ; \
+ @[ -f $(TARGET_SUBDIR)/libtermcap/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(NORMAL_TARGET_EXPORTS) \
- echo "Doing pdf in $(TARGET_SUBDIR)/libtermcap" ; \
+ echo "Doing pdf in $(TARGET_SUBDIR)/libtermcap"; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
@@ -38515,11 +41951,11 @@ maybe-html-target-libtermcap: html-target-libtermcap
html-target-libtermcap: \
configure-target-libtermcap
@: $(MAKE); $(unstage)
- @[ -f $(TARGET_SUBDIR)/libtermcap/Makefile ] || exit 0 ; \
+ @[ -f $(TARGET_SUBDIR)/libtermcap/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(NORMAL_TARGET_EXPORTS) \
- echo "Doing html in $(TARGET_SUBDIR)/libtermcap" ; \
+ echo "Doing html in $(TARGET_SUBDIR)/libtermcap"; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
@@ -38541,11 +41977,11 @@ maybe-TAGS-target-libtermcap: TAGS-target-libtermcap
TAGS-target-libtermcap: \
configure-target-libtermcap
@: $(MAKE); $(unstage)
- @[ -f $(TARGET_SUBDIR)/libtermcap/Makefile ] || exit 0 ; \
+ @[ -f $(TARGET_SUBDIR)/libtermcap/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(NORMAL_TARGET_EXPORTS) \
- echo "Doing TAGS in $(TARGET_SUBDIR)/libtermcap" ; \
+ echo "Doing TAGS in $(TARGET_SUBDIR)/libtermcap"; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
@@ -38568,11 +42004,11 @@ install-info-target-libtermcap: \
configure-target-libtermcap \
info-target-libtermcap
@: $(MAKE); $(unstage)
- @[ -f $(TARGET_SUBDIR)/libtermcap/Makefile ] || exit 0 ; \
+ @[ -f $(TARGET_SUBDIR)/libtermcap/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(NORMAL_TARGET_EXPORTS) \
- echo "Doing install-info in $(TARGET_SUBDIR)/libtermcap" ; \
+ echo "Doing install-info in $(TARGET_SUBDIR)/libtermcap"; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
@@ -38595,11 +42031,11 @@ install-pdf-target-libtermcap: \
configure-target-libtermcap \
pdf-target-libtermcap
@: $(MAKE); $(unstage)
- @[ -f $(TARGET_SUBDIR)/libtermcap/Makefile ] || exit 0 ; \
+ @[ -f $(TARGET_SUBDIR)/libtermcap/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(NORMAL_TARGET_EXPORTS) \
- echo "Doing install-pdf in $(TARGET_SUBDIR)/libtermcap" ; \
+ echo "Doing install-pdf in $(TARGET_SUBDIR)/libtermcap"; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
@@ -38622,11 +42058,11 @@ install-html-target-libtermcap: \
configure-target-libtermcap \
html-target-libtermcap
@: $(MAKE); $(unstage)
- @[ -f $(TARGET_SUBDIR)/libtermcap/Makefile ] || exit 0 ; \
+ @[ -f $(TARGET_SUBDIR)/libtermcap/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(NORMAL_TARGET_EXPORTS) \
- echo "Doing install-html in $(TARGET_SUBDIR)/libtermcap" ; \
+ echo "Doing install-html in $(TARGET_SUBDIR)/libtermcap"; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
@@ -38648,11 +42084,11 @@ maybe-installcheck-target-libtermcap: installcheck-target-libtermcap
installcheck-target-libtermcap: \
configure-target-libtermcap
@: $(MAKE); $(unstage)
- @[ -f $(TARGET_SUBDIR)/libtermcap/Makefile ] || exit 0 ; \
+ @[ -f $(TARGET_SUBDIR)/libtermcap/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(NORMAL_TARGET_EXPORTS) \
- echo "Doing installcheck in $(TARGET_SUBDIR)/libtermcap" ; \
+ echo "Doing installcheck in $(TARGET_SUBDIR)/libtermcap"; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
@@ -38722,8 +42158,8 @@ configure-target-winsup:
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
echo "Checking multilib configuration for winsup..."; \
- $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/winsup ; \
- $(CC_FOR_TARGET) --print-multi-lib > $(TARGET_SUBDIR)/winsup/multilib.tmp 2> /dev/null ; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/winsup; \
+ $(CC_FOR_TARGET) --print-multi-lib > $(TARGET_SUBDIR)/winsup/multilib.tmp 2> /dev/null; \
if test -r $(TARGET_SUBDIR)/winsup/multilib.out; then \
if cmp -s $(TARGET_SUBDIR)/winsup/multilib.tmp $(TARGET_SUBDIR)/winsup/multilib.out; then \
rm -f $(TARGET_SUBDIR)/winsup/multilib.tmp; \
@@ -38735,7 +42171,7 @@ configure-target-winsup:
mv $(TARGET_SUBDIR)/winsup/multilib.tmp $(TARGET_SUBDIR)/winsup/multilib.out; \
fi; \
test ! -f $(TARGET_SUBDIR)/winsup/Makefile || exit 0; \
- $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/winsup ; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/winsup; \
$(NORMAL_TARGET_EXPORTS) \
echo Configuring in $(TARGET_SUBDIR)/winsup; \
cd "$(TARGET_SUBDIR)/winsup" || exit 1; \
@@ -38744,12 +42180,13 @@ configure-target-winsup:
*) topdir=`echo $(TARGET_SUBDIR)/winsup/ | \
sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
esac; \
- srcdiroption="--srcdir=$${topdir}/winsup"; \
- libsrcdir="$$s/winsup"; \
+ module_srcdir=winsup; \
rm -f no-such-file || : ; \
- CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure \
+ CONFIG_SITE=no-such-file $(SHELL) \
+ $$s/$$module_srcdir/configure \
+ --srcdir=$${topdir}/$$module_srcdir \
$(TARGET_CONFIGARGS) --build=${build_alias} --host=${target_alias} \
- --target=${target_alias} $${srcdiroption} \
+ --target=${target_alias} \
|| exit 1
@endif target-winsup
@@ -38834,11 +42271,11 @@ maybe-info-target-winsup: info-target-winsup
info-target-winsup: \
configure-target-winsup
@: $(MAKE); $(unstage)
- @[ -f $(TARGET_SUBDIR)/winsup/Makefile ] || exit 0 ; \
+ @[ -f $(TARGET_SUBDIR)/winsup/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(NORMAL_TARGET_EXPORTS) \
- echo "Doing info in $(TARGET_SUBDIR)/winsup" ; \
+ echo "Doing info in $(TARGET_SUBDIR)/winsup"; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
@@ -38860,11 +42297,11 @@ maybe-dvi-target-winsup: dvi-target-winsup
dvi-target-winsup: \
configure-target-winsup
@: $(MAKE); $(unstage)
- @[ -f $(TARGET_SUBDIR)/winsup/Makefile ] || exit 0 ; \
+ @[ -f $(TARGET_SUBDIR)/winsup/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(NORMAL_TARGET_EXPORTS) \
- echo "Doing dvi in $(TARGET_SUBDIR)/winsup" ; \
+ echo "Doing dvi in $(TARGET_SUBDIR)/winsup"; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
@@ -38886,11 +42323,11 @@ maybe-pdf-target-winsup: pdf-target-winsup
pdf-target-winsup: \
configure-target-winsup
@: $(MAKE); $(unstage)
- @[ -f $(TARGET_SUBDIR)/winsup/Makefile ] || exit 0 ; \
+ @[ -f $(TARGET_SUBDIR)/winsup/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(NORMAL_TARGET_EXPORTS) \
- echo "Doing pdf in $(TARGET_SUBDIR)/winsup" ; \
+ echo "Doing pdf in $(TARGET_SUBDIR)/winsup"; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
@@ -38912,11 +42349,11 @@ maybe-html-target-winsup: html-target-winsup
html-target-winsup: \
configure-target-winsup
@: $(MAKE); $(unstage)
- @[ -f $(TARGET_SUBDIR)/winsup/Makefile ] || exit 0 ; \
+ @[ -f $(TARGET_SUBDIR)/winsup/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(NORMAL_TARGET_EXPORTS) \
- echo "Doing html in $(TARGET_SUBDIR)/winsup" ; \
+ echo "Doing html in $(TARGET_SUBDIR)/winsup"; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
@@ -38938,11 +42375,11 @@ maybe-TAGS-target-winsup: TAGS-target-winsup
TAGS-target-winsup: \
configure-target-winsup
@: $(MAKE); $(unstage)
- @[ -f $(TARGET_SUBDIR)/winsup/Makefile ] || exit 0 ; \
+ @[ -f $(TARGET_SUBDIR)/winsup/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(NORMAL_TARGET_EXPORTS) \
- echo "Doing TAGS in $(TARGET_SUBDIR)/winsup" ; \
+ echo "Doing TAGS in $(TARGET_SUBDIR)/winsup"; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
@@ -38965,11 +42402,11 @@ install-info-target-winsup: \
configure-target-winsup \
info-target-winsup
@: $(MAKE); $(unstage)
- @[ -f $(TARGET_SUBDIR)/winsup/Makefile ] || exit 0 ; \
+ @[ -f $(TARGET_SUBDIR)/winsup/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(NORMAL_TARGET_EXPORTS) \
- echo "Doing install-info in $(TARGET_SUBDIR)/winsup" ; \
+ echo "Doing install-info in $(TARGET_SUBDIR)/winsup"; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
@@ -38992,11 +42429,11 @@ install-pdf-target-winsup: \
configure-target-winsup \
pdf-target-winsup
@: $(MAKE); $(unstage)
- @[ -f $(TARGET_SUBDIR)/winsup/Makefile ] || exit 0 ; \
+ @[ -f $(TARGET_SUBDIR)/winsup/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(NORMAL_TARGET_EXPORTS) \
- echo "Doing install-pdf in $(TARGET_SUBDIR)/winsup" ; \
+ echo "Doing install-pdf in $(TARGET_SUBDIR)/winsup"; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
@@ -39019,11 +42456,11 @@ install-html-target-winsup: \
configure-target-winsup \
html-target-winsup
@: $(MAKE); $(unstage)
- @[ -f $(TARGET_SUBDIR)/winsup/Makefile ] || exit 0 ; \
+ @[ -f $(TARGET_SUBDIR)/winsup/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(NORMAL_TARGET_EXPORTS) \
- echo "Doing install-html in $(TARGET_SUBDIR)/winsup" ; \
+ echo "Doing install-html in $(TARGET_SUBDIR)/winsup"; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
@@ -39045,11 +42482,11 @@ maybe-installcheck-target-winsup: installcheck-target-winsup
installcheck-target-winsup: \
configure-target-winsup
@: $(MAKE); $(unstage)
- @[ -f $(TARGET_SUBDIR)/winsup/Makefile ] || exit 0 ; \
+ @[ -f $(TARGET_SUBDIR)/winsup/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(NORMAL_TARGET_EXPORTS) \
- echo "Doing installcheck in $(TARGET_SUBDIR)/winsup" ; \
+ echo "Doing installcheck in $(TARGET_SUBDIR)/winsup"; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
@@ -39070,11 +42507,11 @@ maybe-mostlyclean-target-winsup: mostlyclean-target-winsup
mostlyclean-target-winsup:
@: $(MAKE); $(unstage)
- @[ -f $(TARGET_SUBDIR)/winsup/Makefile ] || exit 0 ; \
+ @[ -f $(TARGET_SUBDIR)/winsup/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(NORMAL_TARGET_EXPORTS) \
- echo "Doing mostlyclean in $(TARGET_SUBDIR)/winsup" ; \
+ echo "Doing mostlyclean in $(TARGET_SUBDIR)/winsup"; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
@@ -39095,11 +42532,11 @@ maybe-clean-target-winsup: clean-target-winsup
clean-target-winsup:
@: $(MAKE); $(unstage)
- @[ -f $(TARGET_SUBDIR)/winsup/Makefile ] || exit 0 ; \
+ @[ -f $(TARGET_SUBDIR)/winsup/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(NORMAL_TARGET_EXPORTS) \
- echo "Doing clean in $(TARGET_SUBDIR)/winsup" ; \
+ echo "Doing clean in $(TARGET_SUBDIR)/winsup"; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
@@ -39120,11 +42557,11 @@ maybe-distclean-target-winsup: distclean-target-winsup
distclean-target-winsup:
@: $(MAKE); $(unstage)
- @[ -f $(TARGET_SUBDIR)/winsup/Makefile ] || exit 0 ; \
+ @[ -f $(TARGET_SUBDIR)/winsup/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(NORMAL_TARGET_EXPORTS) \
- echo "Doing distclean in $(TARGET_SUBDIR)/winsup" ; \
+ echo "Doing distclean in $(TARGET_SUBDIR)/winsup"; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
@@ -39145,11 +42582,11 @@ maybe-maintainer-clean-target-winsup: maintainer-clean-target-winsup
maintainer-clean-target-winsup:
@: $(MAKE); $(unstage)
- @[ -f $(TARGET_SUBDIR)/winsup/Makefile ] || exit 0 ; \
+ @[ -f $(TARGET_SUBDIR)/winsup/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(NORMAL_TARGET_EXPORTS) \
- echo "Doing maintainer-clean in $(TARGET_SUBDIR)/winsup" ; \
+ echo "Doing maintainer-clean in $(TARGET_SUBDIR)/winsup"; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
@@ -39179,8 +42616,8 @@ configure-target-libgloss:
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
echo "Checking multilib configuration for libgloss..."; \
- $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libgloss ; \
- $(CC_FOR_TARGET) --print-multi-lib > $(TARGET_SUBDIR)/libgloss/multilib.tmp 2> /dev/null ; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libgloss; \
+ $(CC_FOR_TARGET) --print-multi-lib > $(TARGET_SUBDIR)/libgloss/multilib.tmp 2> /dev/null; \
if test -r $(TARGET_SUBDIR)/libgloss/multilib.out; then \
if cmp -s $(TARGET_SUBDIR)/libgloss/multilib.tmp $(TARGET_SUBDIR)/libgloss/multilib.out; then \
rm -f $(TARGET_SUBDIR)/libgloss/multilib.tmp; \
@@ -39192,7 +42629,7 @@ configure-target-libgloss:
mv $(TARGET_SUBDIR)/libgloss/multilib.tmp $(TARGET_SUBDIR)/libgloss/multilib.out; \
fi; \
test ! -f $(TARGET_SUBDIR)/libgloss/Makefile || exit 0; \
- $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libgloss ; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libgloss; \
$(NORMAL_TARGET_EXPORTS) \
echo Configuring in $(TARGET_SUBDIR)/libgloss; \
cd "$(TARGET_SUBDIR)/libgloss" || exit 1; \
@@ -39201,12 +42638,13 @@ configure-target-libgloss:
*) topdir=`echo $(TARGET_SUBDIR)/libgloss/ | \
sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
esac; \
- srcdiroption="--srcdir=$${topdir}/libgloss"; \
- libsrcdir="$$s/libgloss"; \
+ module_srcdir=libgloss; \
rm -f no-such-file || : ; \
- CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure \
+ CONFIG_SITE=no-such-file $(SHELL) \
+ $$s/$$module_srcdir/configure \
+ --srcdir=$${topdir}/$$module_srcdir \
$(TARGET_CONFIGARGS) --build=${build_alias} --host=${target_alias} \
- --target=${target_alias} $${srcdiroption} \
+ --target=${target_alias} \
|| exit 1
@endif target-libgloss
@@ -39286,11 +42724,11 @@ maybe-info-target-libgloss: info-target-libgloss
info-target-libgloss: \
configure-target-libgloss
@: $(MAKE); $(unstage)
- @[ -f $(TARGET_SUBDIR)/libgloss/Makefile ] || exit 0 ; \
+ @[ -f $(TARGET_SUBDIR)/libgloss/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(NORMAL_TARGET_EXPORTS) \
- echo "Doing info in $(TARGET_SUBDIR)/libgloss" ; \
+ echo "Doing info in $(TARGET_SUBDIR)/libgloss"; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
@@ -39312,11 +42750,11 @@ maybe-dvi-target-libgloss: dvi-target-libgloss
dvi-target-libgloss: \
configure-target-libgloss
@: $(MAKE); $(unstage)
- @[ -f $(TARGET_SUBDIR)/libgloss/Makefile ] || exit 0 ; \
+ @[ -f $(TARGET_SUBDIR)/libgloss/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(NORMAL_TARGET_EXPORTS) \
- echo "Doing dvi in $(TARGET_SUBDIR)/libgloss" ; \
+ echo "Doing dvi in $(TARGET_SUBDIR)/libgloss"; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
@@ -39338,11 +42776,11 @@ maybe-pdf-target-libgloss: pdf-target-libgloss
pdf-target-libgloss: \
configure-target-libgloss
@: $(MAKE); $(unstage)
- @[ -f $(TARGET_SUBDIR)/libgloss/Makefile ] || exit 0 ; \
+ @[ -f $(TARGET_SUBDIR)/libgloss/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(NORMAL_TARGET_EXPORTS) \
- echo "Doing pdf in $(TARGET_SUBDIR)/libgloss" ; \
+ echo "Doing pdf in $(TARGET_SUBDIR)/libgloss"; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
@@ -39364,11 +42802,11 @@ maybe-html-target-libgloss: html-target-libgloss
html-target-libgloss: \
configure-target-libgloss
@: $(MAKE); $(unstage)
- @[ -f $(TARGET_SUBDIR)/libgloss/Makefile ] || exit 0 ; \
+ @[ -f $(TARGET_SUBDIR)/libgloss/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(NORMAL_TARGET_EXPORTS) \
- echo "Doing html in $(TARGET_SUBDIR)/libgloss" ; \
+ echo "Doing html in $(TARGET_SUBDIR)/libgloss"; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
@@ -39390,11 +42828,11 @@ maybe-TAGS-target-libgloss: TAGS-target-libgloss
TAGS-target-libgloss: \
configure-target-libgloss
@: $(MAKE); $(unstage)
- @[ -f $(TARGET_SUBDIR)/libgloss/Makefile ] || exit 0 ; \
+ @[ -f $(TARGET_SUBDIR)/libgloss/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(NORMAL_TARGET_EXPORTS) \
- echo "Doing TAGS in $(TARGET_SUBDIR)/libgloss" ; \
+ echo "Doing TAGS in $(TARGET_SUBDIR)/libgloss"; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
@@ -39417,11 +42855,11 @@ install-info-target-libgloss: \
configure-target-libgloss \
info-target-libgloss
@: $(MAKE); $(unstage)
- @[ -f $(TARGET_SUBDIR)/libgloss/Makefile ] || exit 0 ; \
+ @[ -f $(TARGET_SUBDIR)/libgloss/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(NORMAL_TARGET_EXPORTS) \
- echo "Doing install-info in $(TARGET_SUBDIR)/libgloss" ; \
+ echo "Doing install-info in $(TARGET_SUBDIR)/libgloss"; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
@@ -39444,11 +42882,11 @@ install-pdf-target-libgloss: \
configure-target-libgloss \
pdf-target-libgloss
@: $(MAKE); $(unstage)
- @[ -f $(TARGET_SUBDIR)/libgloss/Makefile ] || exit 0 ; \
+ @[ -f $(TARGET_SUBDIR)/libgloss/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(NORMAL_TARGET_EXPORTS) \
- echo "Doing install-pdf in $(TARGET_SUBDIR)/libgloss" ; \
+ echo "Doing install-pdf in $(TARGET_SUBDIR)/libgloss"; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
@@ -39471,11 +42909,11 @@ install-html-target-libgloss: \
configure-target-libgloss \
html-target-libgloss
@: $(MAKE); $(unstage)
- @[ -f $(TARGET_SUBDIR)/libgloss/Makefile ] || exit 0 ; \
+ @[ -f $(TARGET_SUBDIR)/libgloss/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(NORMAL_TARGET_EXPORTS) \
- echo "Doing install-html in $(TARGET_SUBDIR)/libgloss" ; \
+ echo "Doing install-html in $(TARGET_SUBDIR)/libgloss"; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
@@ -39497,11 +42935,11 @@ maybe-installcheck-target-libgloss: installcheck-target-libgloss
installcheck-target-libgloss: \
configure-target-libgloss
@: $(MAKE); $(unstage)
- @[ -f $(TARGET_SUBDIR)/libgloss/Makefile ] || exit 0 ; \
+ @[ -f $(TARGET_SUBDIR)/libgloss/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(NORMAL_TARGET_EXPORTS) \
- echo "Doing installcheck in $(TARGET_SUBDIR)/libgloss" ; \
+ echo "Doing installcheck in $(TARGET_SUBDIR)/libgloss"; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
@@ -39522,11 +42960,11 @@ maybe-mostlyclean-target-libgloss: mostlyclean-target-libgloss
mostlyclean-target-libgloss:
@: $(MAKE); $(unstage)
- @[ -f $(TARGET_SUBDIR)/libgloss/Makefile ] || exit 0 ; \
+ @[ -f $(TARGET_SUBDIR)/libgloss/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(NORMAL_TARGET_EXPORTS) \
- echo "Doing mostlyclean in $(TARGET_SUBDIR)/libgloss" ; \
+ echo "Doing mostlyclean in $(TARGET_SUBDIR)/libgloss"; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
@@ -39547,11 +42985,11 @@ maybe-clean-target-libgloss: clean-target-libgloss
clean-target-libgloss:
@: $(MAKE); $(unstage)
- @[ -f $(TARGET_SUBDIR)/libgloss/Makefile ] || exit 0 ; \
+ @[ -f $(TARGET_SUBDIR)/libgloss/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(NORMAL_TARGET_EXPORTS) \
- echo "Doing clean in $(TARGET_SUBDIR)/libgloss" ; \
+ echo "Doing clean in $(TARGET_SUBDIR)/libgloss"; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
@@ -39572,11 +43010,11 @@ maybe-distclean-target-libgloss: distclean-target-libgloss
distclean-target-libgloss:
@: $(MAKE); $(unstage)
- @[ -f $(TARGET_SUBDIR)/libgloss/Makefile ] || exit 0 ; \
+ @[ -f $(TARGET_SUBDIR)/libgloss/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(NORMAL_TARGET_EXPORTS) \
- echo "Doing distclean in $(TARGET_SUBDIR)/libgloss" ; \
+ echo "Doing distclean in $(TARGET_SUBDIR)/libgloss"; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
@@ -39597,11 +43035,11 @@ maybe-maintainer-clean-target-libgloss: maintainer-clean-target-libgloss
maintainer-clean-target-libgloss:
@: $(MAKE); $(unstage)
- @[ -f $(TARGET_SUBDIR)/libgloss/Makefile ] || exit 0 ; \
+ @[ -f $(TARGET_SUBDIR)/libgloss/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(NORMAL_TARGET_EXPORTS) \
- echo "Doing maintainer-clean in $(TARGET_SUBDIR)/libgloss" ; \
+ echo "Doing maintainer-clean in $(TARGET_SUBDIR)/libgloss"; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
@@ -39631,8 +43069,8 @@ configure-target-libffi:
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
echo "Checking multilib configuration for libffi..."; \
- $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libffi ; \
- $(CC_FOR_TARGET) --print-multi-lib > $(TARGET_SUBDIR)/libffi/multilib.tmp 2> /dev/null ; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libffi; \
+ $(CC_FOR_TARGET) --print-multi-lib > $(TARGET_SUBDIR)/libffi/multilib.tmp 2> /dev/null; \
if test -r $(TARGET_SUBDIR)/libffi/multilib.out; then \
if cmp -s $(TARGET_SUBDIR)/libffi/multilib.tmp $(TARGET_SUBDIR)/libffi/multilib.out; then \
rm -f $(TARGET_SUBDIR)/libffi/multilib.tmp; \
@@ -39644,7 +43082,7 @@ configure-target-libffi:
mv $(TARGET_SUBDIR)/libffi/multilib.tmp $(TARGET_SUBDIR)/libffi/multilib.out; \
fi; \
test ! -f $(TARGET_SUBDIR)/libffi/Makefile || exit 0; \
- $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libffi ; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libffi; \
$(NORMAL_TARGET_EXPORTS) \
echo Configuring in $(TARGET_SUBDIR)/libffi; \
cd "$(TARGET_SUBDIR)/libffi" || exit 1; \
@@ -39653,12 +43091,13 @@ configure-target-libffi:
*) topdir=`echo $(TARGET_SUBDIR)/libffi/ | \
sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
esac; \
- srcdiroption="--srcdir=$${topdir}/libffi"; \
- libsrcdir="$$s/libffi"; \
+ module_srcdir=libffi; \
rm -f no-such-file || : ; \
- CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure \
+ CONFIG_SITE=no-such-file $(SHELL) \
+ $$s/$$module_srcdir/configure \
+ --srcdir=$${topdir}/$$module_srcdir \
$(TARGET_CONFIGARGS) --build=${build_alias} --host=${target_alias} \
- --target=${target_alias} $${srcdiroption} \
+ --target=${target_alias} \
|| exit 1
@endif target-libffi
@@ -39733,11 +43172,11 @@ maybe-info-target-libffi: info-target-libffi
info-target-libffi: \
configure-target-libffi
@: $(MAKE); $(unstage)
- @[ -f $(TARGET_SUBDIR)/libffi/Makefile ] || exit 0 ; \
+ @[ -f $(TARGET_SUBDIR)/libffi/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(NORMAL_TARGET_EXPORTS) \
- echo "Doing info in $(TARGET_SUBDIR)/libffi" ; \
+ echo "Doing info in $(TARGET_SUBDIR)/libffi"; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
@@ -39759,11 +43198,11 @@ maybe-dvi-target-libffi: dvi-target-libffi
dvi-target-libffi: \
configure-target-libffi
@: $(MAKE); $(unstage)
- @[ -f $(TARGET_SUBDIR)/libffi/Makefile ] || exit 0 ; \
+ @[ -f $(TARGET_SUBDIR)/libffi/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(NORMAL_TARGET_EXPORTS) \
- echo "Doing dvi in $(TARGET_SUBDIR)/libffi" ; \
+ echo "Doing dvi in $(TARGET_SUBDIR)/libffi"; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
@@ -39785,11 +43224,11 @@ maybe-pdf-target-libffi: pdf-target-libffi
pdf-target-libffi: \
configure-target-libffi
@: $(MAKE); $(unstage)
- @[ -f $(TARGET_SUBDIR)/libffi/Makefile ] || exit 0 ; \
+ @[ -f $(TARGET_SUBDIR)/libffi/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(NORMAL_TARGET_EXPORTS) \
- echo "Doing pdf in $(TARGET_SUBDIR)/libffi" ; \
+ echo "Doing pdf in $(TARGET_SUBDIR)/libffi"; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
@@ -39811,11 +43250,11 @@ maybe-html-target-libffi: html-target-libffi
html-target-libffi: \
configure-target-libffi
@: $(MAKE); $(unstage)
- @[ -f $(TARGET_SUBDIR)/libffi/Makefile ] || exit 0 ; \
+ @[ -f $(TARGET_SUBDIR)/libffi/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(NORMAL_TARGET_EXPORTS) \
- echo "Doing html in $(TARGET_SUBDIR)/libffi" ; \
+ echo "Doing html in $(TARGET_SUBDIR)/libffi"; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
@@ -39837,11 +43276,11 @@ maybe-TAGS-target-libffi: TAGS-target-libffi
TAGS-target-libffi: \
configure-target-libffi
@: $(MAKE); $(unstage)
- @[ -f $(TARGET_SUBDIR)/libffi/Makefile ] || exit 0 ; \
+ @[ -f $(TARGET_SUBDIR)/libffi/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(NORMAL_TARGET_EXPORTS) \
- echo "Doing TAGS in $(TARGET_SUBDIR)/libffi" ; \
+ echo "Doing TAGS in $(TARGET_SUBDIR)/libffi"; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
@@ -39864,11 +43303,11 @@ install-info-target-libffi: \
configure-target-libffi \
info-target-libffi
@: $(MAKE); $(unstage)
- @[ -f $(TARGET_SUBDIR)/libffi/Makefile ] || exit 0 ; \
+ @[ -f $(TARGET_SUBDIR)/libffi/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(NORMAL_TARGET_EXPORTS) \
- echo "Doing install-info in $(TARGET_SUBDIR)/libffi" ; \
+ echo "Doing install-info in $(TARGET_SUBDIR)/libffi"; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
@@ -39891,11 +43330,11 @@ install-pdf-target-libffi: \
configure-target-libffi \
pdf-target-libffi
@: $(MAKE); $(unstage)
- @[ -f $(TARGET_SUBDIR)/libffi/Makefile ] || exit 0 ; \
+ @[ -f $(TARGET_SUBDIR)/libffi/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(NORMAL_TARGET_EXPORTS) \
- echo "Doing install-pdf in $(TARGET_SUBDIR)/libffi" ; \
+ echo "Doing install-pdf in $(TARGET_SUBDIR)/libffi"; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
@@ -39918,11 +43357,11 @@ install-html-target-libffi: \
configure-target-libffi \
html-target-libffi
@: $(MAKE); $(unstage)
- @[ -f $(TARGET_SUBDIR)/libffi/Makefile ] || exit 0 ; \
+ @[ -f $(TARGET_SUBDIR)/libffi/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(NORMAL_TARGET_EXPORTS) \
- echo "Doing install-html in $(TARGET_SUBDIR)/libffi" ; \
+ echo "Doing install-html in $(TARGET_SUBDIR)/libffi"; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
@@ -39944,11 +43383,11 @@ maybe-installcheck-target-libffi: installcheck-target-libffi
installcheck-target-libffi: \
configure-target-libffi
@: $(MAKE); $(unstage)
- @[ -f $(TARGET_SUBDIR)/libffi/Makefile ] || exit 0 ; \
+ @[ -f $(TARGET_SUBDIR)/libffi/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(NORMAL_TARGET_EXPORTS) \
- echo "Doing installcheck in $(TARGET_SUBDIR)/libffi" ; \
+ echo "Doing installcheck in $(TARGET_SUBDIR)/libffi"; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
@@ -39969,11 +43408,11 @@ maybe-mostlyclean-target-libffi: mostlyclean-target-libffi
mostlyclean-target-libffi:
@: $(MAKE); $(unstage)
- @[ -f $(TARGET_SUBDIR)/libffi/Makefile ] || exit 0 ; \
+ @[ -f $(TARGET_SUBDIR)/libffi/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(NORMAL_TARGET_EXPORTS) \
- echo "Doing mostlyclean in $(TARGET_SUBDIR)/libffi" ; \
+ echo "Doing mostlyclean in $(TARGET_SUBDIR)/libffi"; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
@@ -39994,11 +43433,11 @@ maybe-clean-target-libffi: clean-target-libffi
clean-target-libffi:
@: $(MAKE); $(unstage)
- @[ -f $(TARGET_SUBDIR)/libffi/Makefile ] || exit 0 ; \
+ @[ -f $(TARGET_SUBDIR)/libffi/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(NORMAL_TARGET_EXPORTS) \
- echo "Doing clean in $(TARGET_SUBDIR)/libffi" ; \
+ echo "Doing clean in $(TARGET_SUBDIR)/libffi"; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
@@ -40019,11 +43458,11 @@ maybe-distclean-target-libffi: distclean-target-libffi
distclean-target-libffi:
@: $(MAKE); $(unstage)
- @[ -f $(TARGET_SUBDIR)/libffi/Makefile ] || exit 0 ; \
+ @[ -f $(TARGET_SUBDIR)/libffi/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(NORMAL_TARGET_EXPORTS) \
- echo "Doing distclean in $(TARGET_SUBDIR)/libffi" ; \
+ echo "Doing distclean in $(TARGET_SUBDIR)/libffi"; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
@@ -40044,11 +43483,11 @@ maybe-maintainer-clean-target-libffi: maintainer-clean-target-libffi
maintainer-clean-target-libffi:
@: $(MAKE); $(unstage)
- @[ -f $(TARGET_SUBDIR)/libffi/Makefile ] || exit 0 ; \
+ @[ -f $(TARGET_SUBDIR)/libffi/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(NORMAL_TARGET_EXPORTS) \
- echo "Doing maintainer-clean in $(TARGET_SUBDIR)/libffi" ; \
+ echo "Doing maintainer-clean in $(TARGET_SUBDIR)/libffi"; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
@@ -40078,8 +43517,8 @@ configure-target-libjava:
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
echo "Checking multilib configuration for libjava..."; \
- $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libjava ; \
- $(CC_FOR_TARGET) --print-multi-lib > $(TARGET_SUBDIR)/libjava/multilib.tmp 2> /dev/null ; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libjava; \
+ $(CC_FOR_TARGET) --print-multi-lib > $(TARGET_SUBDIR)/libjava/multilib.tmp 2> /dev/null; \
if test -r $(TARGET_SUBDIR)/libjava/multilib.out; then \
if cmp -s $(TARGET_SUBDIR)/libjava/multilib.tmp $(TARGET_SUBDIR)/libjava/multilib.out; then \
rm -f $(TARGET_SUBDIR)/libjava/multilib.tmp; \
@@ -40091,7 +43530,7 @@ configure-target-libjava:
mv $(TARGET_SUBDIR)/libjava/multilib.tmp $(TARGET_SUBDIR)/libjava/multilib.out; \
fi; \
test ! -f $(TARGET_SUBDIR)/libjava/Makefile || exit 0; \
- $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libjava ; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libjava; \
$(RAW_CXX_TARGET_EXPORTS) \
echo Configuring in $(TARGET_SUBDIR)/libjava; \
cd "$(TARGET_SUBDIR)/libjava" || exit 1; \
@@ -40100,12 +43539,13 @@ configure-target-libjava:
*) topdir=`echo $(TARGET_SUBDIR)/libjava/ | \
sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
esac; \
- srcdiroption="--srcdir=$${topdir}/libjava"; \
- libsrcdir="$$s/libjava"; \
+ module_srcdir=libjava; \
rm -f no-such-file || : ; \
- CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure \
+ CONFIG_SITE=no-such-file $(SHELL) \
+ $$s/$$module_srcdir/configure \
+ --srcdir=$${topdir}/$$module_srcdir \
$(TARGET_CONFIGARGS) --build=${build_alias} --host=${target_alias} \
- --target=${target_alias} $${srcdiroption} $(EXTRA_CONFIGARGS_LIBJAVA) \
+ --target=${target_alias} $(EXTRA_CONFIGARGS_LIBJAVA) \
|| exit 1
@endif target-libjava
@@ -40190,11 +43630,11 @@ maybe-info-target-libjava: info-target-libjava
info-target-libjava: \
configure-target-libjava
@: $(MAKE); $(unstage)
- @[ -f $(TARGET_SUBDIR)/libjava/Makefile ] || exit 0 ; \
+ @[ -f $(TARGET_SUBDIR)/libjava/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(RAW_CXX_TARGET_EXPORTS) \
- echo "Doing info in $(TARGET_SUBDIR)/libjava" ; \
+ echo "Doing info in $(TARGET_SUBDIR)/libjava"; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
@@ -40216,11 +43656,11 @@ maybe-dvi-target-libjava: dvi-target-libjava
dvi-target-libjava: \
configure-target-libjava
@: $(MAKE); $(unstage)
- @[ -f $(TARGET_SUBDIR)/libjava/Makefile ] || exit 0 ; \
+ @[ -f $(TARGET_SUBDIR)/libjava/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(RAW_CXX_TARGET_EXPORTS) \
- echo "Doing dvi in $(TARGET_SUBDIR)/libjava" ; \
+ echo "Doing dvi in $(TARGET_SUBDIR)/libjava"; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
@@ -40242,11 +43682,11 @@ maybe-pdf-target-libjava: pdf-target-libjava
pdf-target-libjava: \
configure-target-libjava
@: $(MAKE); $(unstage)
- @[ -f $(TARGET_SUBDIR)/libjava/Makefile ] || exit 0 ; \
+ @[ -f $(TARGET_SUBDIR)/libjava/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(RAW_CXX_TARGET_EXPORTS) \
- echo "Doing pdf in $(TARGET_SUBDIR)/libjava" ; \
+ echo "Doing pdf in $(TARGET_SUBDIR)/libjava"; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
@@ -40268,11 +43708,11 @@ maybe-html-target-libjava: html-target-libjava
html-target-libjava: \
configure-target-libjava
@: $(MAKE); $(unstage)
- @[ -f $(TARGET_SUBDIR)/libjava/Makefile ] || exit 0 ; \
+ @[ -f $(TARGET_SUBDIR)/libjava/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(RAW_CXX_TARGET_EXPORTS) \
- echo "Doing html in $(TARGET_SUBDIR)/libjava" ; \
+ echo "Doing html in $(TARGET_SUBDIR)/libjava"; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
@@ -40294,11 +43734,11 @@ maybe-TAGS-target-libjava: TAGS-target-libjava
TAGS-target-libjava: \
configure-target-libjava
@: $(MAKE); $(unstage)
- @[ -f $(TARGET_SUBDIR)/libjava/Makefile ] || exit 0 ; \
+ @[ -f $(TARGET_SUBDIR)/libjava/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(RAW_CXX_TARGET_EXPORTS) \
- echo "Doing TAGS in $(TARGET_SUBDIR)/libjava" ; \
+ echo "Doing TAGS in $(TARGET_SUBDIR)/libjava"; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
@@ -40321,11 +43761,11 @@ install-info-target-libjava: \
configure-target-libjava \
info-target-libjava
@: $(MAKE); $(unstage)
- @[ -f $(TARGET_SUBDIR)/libjava/Makefile ] || exit 0 ; \
+ @[ -f $(TARGET_SUBDIR)/libjava/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(RAW_CXX_TARGET_EXPORTS) \
- echo "Doing install-info in $(TARGET_SUBDIR)/libjava" ; \
+ echo "Doing install-info in $(TARGET_SUBDIR)/libjava"; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
@@ -40348,11 +43788,11 @@ install-pdf-target-libjava: \
configure-target-libjava \
pdf-target-libjava
@: $(MAKE); $(unstage)
- @[ -f $(TARGET_SUBDIR)/libjava/Makefile ] || exit 0 ; \
+ @[ -f $(TARGET_SUBDIR)/libjava/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(RAW_CXX_TARGET_EXPORTS) \
- echo "Doing install-pdf in $(TARGET_SUBDIR)/libjava" ; \
+ echo "Doing install-pdf in $(TARGET_SUBDIR)/libjava"; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
@@ -40375,11 +43815,11 @@ install-html-target-libjava: \
configure-target-libjava \
html-target-libjava
@: $(MAKE); $(unstage)
- @[ -f $(TARGET_SUBDIR)/libjava/Makefile ] || exit 0 ; \
+ @[ -f $(TARGET_SUBDIR)/libjava/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(RAW_CXX_TARGET_EXPORTS) \
- echo "Doing install-html in $(TARGET_SUBDIR)/libjava" ; \
+ echo "Doing install-html in $(TARGET_SUBDIR)/libjava"; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
@@ -40401,11 +43841,11 @@ maybe-installcheck-target-libjava: installcheck-target-libjava
installcheck-target-libjava: \
configure-target-libjava
@: $(MAKE); $(unstage)
- @[ -f $(TARGET_SUBDIR)/libjava/Makefile ] || exit 0 ; \
+ @[ -f $(TARGET_SUBDIR)/libjava/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(RAW_CXX_TARGET_EXPORTS) \
- echo "Doing installcheck in $(TARGET_SUBDIR)/libjava" ; \
+ echo "Doing installcheck in $(TARGET_SUBDIR)/libjava"; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
@@ -40426,11 +43866,11 @@ maybe-mostlyclean-target-libjava: mostlyclean-target-libjava
mostlyclean-target-libjava:
@: $(MAKE); $(unstage)
- @[ -f $(TARGET_SUBDIR)/libjava/Makefile ] || exit 0 ; \
+ @[ -f $(TARGET_SUBDIR)/libjava/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(RAW_CXX_TARGET_EXPORTS) \
- echo "Doing mostlyclean in $(TARGET_SUBDIR)/libjava" ; \
+ echo "Doing mostlyclean in $(TARGET_SUBDIR)/libjava"; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
@@ -40451,11 +43891,11 @@ maybe-clean-target-libjava: clean-target-libjava
clean-target-libjava:
@: $(MAKE); $(unstage)
- @[ -f $(TARGET_SUBDIR)/libjava/Makefile ] || exit 0 ; \
+ @[ -f $(TARGET_SUBDIR)/libjava/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(RAW_CXX_TARGET_EXPORTS) \
- echo "Doing clean in $(TARGET_SUBDIR)/libjava" ; \
+ echo "Doing clean in $(TARGET_SUBDIR)/libjava"; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
@@ -40476,11 +43916,11 @@ maybe-distclean-target-libjava: distclean-target-libjava
distclean-target-libjava:
@: $(MAKE); $(unstage)
- @[ -f $(TARGET_SUBDIR)/libjava/Makefile ] || exit 0 ; \
+ @[ -f $(TARGET_SUBDIR)/libjava/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(RAW_CXX_TARGET_EXPORTS) \
- echo "Doing distclean in $(TARGET_SUBDIR)/libjava" ; \
+ echo "Doing distclean in $(TARGET_SUBDIR)/libjava"; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
@@ -40501,11 +43941,11 @@ maybe-maintainer-clean-target-libjava: maintainer-clean-target-libjava
maintainer-clean-target-libjava:
@: $(MAKE); $(unstage)
- @[ -f $(TARGET_SUBDIR)/libjava/Makefile ] || exit 0 ; \
+ @[ -f $(TARGET_SUBDIR)/libjava/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(RAW_CXX_TARGET_EXPORTS) \
- echo "Doing maintainer-clean in $(TARGET_SUBDIR)/libjava" ; \
+ echo "Doing maintainer-clean in $(TARGET_SUBDIR)/libjava"; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
@@ -40535,8 +43975,8 @@ configure-target-zlib:
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
echo "Checking multilib configuration for zlib..."; \
- $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/zlib ; \
- $(CC_FOR_TARGET) --print-multi-lib > $(TARGET_SUBDIR)/zlib/multilib.tmp 2> /dev/null ; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/zlib; \
+ $(CC_FOR_TARGET) --print-multi-lib > $(TARGET_SUBDIR)/zlib/multilib.tmp 2> /dev/null; \
if test -r $(TARGET_SUBDIR)/zlib/multilib.out; then \
if cmp -s $(TARGET_SUBDIR)/zlib/multilib.tmp $(TARGET_SUBDIR)/zlib/multilib.out; then \
rm -f $(TARGET_SUBDIR)/zlib/multilib.tmp; \
@@ -40548,7 +43988,7 @@ configure-target-zlib:
mv $(TARGET_SUBDIR)/zlib/multilib.tmp $(TARGET_SUBDIR)/zlib/multilib.out; \
fi; \
test ! -f $(TARGET_SUBDIR)/zlib/Makefile || exit 0; \
- $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/zlib ; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/zlib; \
$(NORMAL_TARGET_EXPORTS) \
echo Configuring in $(TARGET_SUBDIR)/zlib; \
cd "$(TARGET_SUBDIR)/zlib" || exit 1; \
@@ -40557,12 +43997,13 @@ configure-target-zlib:
*) topdir=`echo $(TARGET_SUBDIR)/zlib/ | \
sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
esac; \
- srcdiroption="--srcdir=$${topdir}/zlib"; \
- libsrcdir="$$s/zlib"; \
+ module_srcdir=zlib; \
rm -f no-such-file || : ; \
- CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure \
+ CONFIG_SITE=no-such-file $(SHELL) \
+ $$s/$$module_srcdir/configure \
+ --srcdir=$${topdir}/$$module_srcdir \
$(TARGET_CONFIGARGS) --build=${build_alias} --host=${target_alias} \
- --target=${target_alias} $${srcdiroption} \
+ --target=${target_alias} \
|| exit 1
@endif target-zlib
@@ -40647,11 +44088,11 @@ maybe-info-target-zlib: info-target-zlib
info-target-zlib: \
configure-target-zlib
@: $(MAKE); $(unstage)
- @[ -f $(TARGET_SUBDIR)/zlib/Makefile ] || exit 0 ; \
+ @[ -f $(TARGET_SUBDIR)/zlib/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(NORMAL_TARGET_EXPORTS) \
- echo "Doing info in $(TARGET_SUBDIR)/zlib" ; \
+ echo "Doing info in $(TARGET_SUBDIR)/zlib"; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
@@ -40673,11 +44114,11 @@ maybe-dvi-target-zlib: dvi-target-zlib
dvi-target-zlib: \
configure-target-zlib
@: $(MAKE); $(unstage)
- @[ -f $(TARGET_SUBDIR)/zlib/Makefile ] || exit 0 ; \
+ @[ -f $(TARGET_SUBDIR)/zlib/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(NORMAL_TARGET_EXPORTS) \
- echo "Doing dvi in $(TARGET_SUBDIR)/zlib" ; \
+ echo "Doing dvi in $(TARGET_SUBDIR)/zlib"; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
@@ -40699,11 +44140,11 @@ maybe-pdf-target-zlib: pdf-target-zlib
pdf-target-zlib: \
configure-target-zlib
@: $(MAKE); $(unstage)
- @[ -f $(TARGET_SUBDIR)/zlib/Makefile ] || exit 0 ; \
+ @[ -f $(TARGET_SUBDIR)/zlib/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(NORMAL_TARGET_EXPORTS) \
- echo "Doing pdf in $(TARGET_SUBDIR)/zlib" ; \
+ echo "Doing pdf in $(TARGET_SUBDIR)/zlib"; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
@@ -40725,11 +44166,11 @@ maybe-html-target-zlib: html-target-zlib
html-target-zlib: \
configure-target-zlib
@: $(MAKE); $(unstage)
- @[ -f $(TARGET_SUBDIR)/zlib/Makefile ] || exit 0 ; \
+ @[ -f $(TARGET_SUBDIR)/zlib/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(NORMAL_TARGET_EXPORTS) \
- echo "Doing html in $(TARGET_SUBDIR)/zlib" ; \
+ echo "Doing html in $(TARGET_SUBDIR)/zlib"; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
@@ -40751,11 +44192,11 @@ maybe-TAGS-target-zlib: TAGS-target-zlib
TAGS-target-zlib: \
configure-target-zlib
@: $(MAKE); $(unstage)
- @[ -f $(TARGET_SUBDIR)/zlib/Makefile ] || exit 0 ; \
+ @[ -f $(TARGET_SUBDIR)/zlib/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(NORMAL_TARGET_EXPORTS) \
- echo "Doing TAGS in $(TARGET_SUBDIR)/zlib" ; \
+ echo "Doing TAGS in $(TARGET_SUBDIR)/zlib"; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
@@ -40778,11 +44219,11 @@ install-info-target-zlib: \
configure-target-zlib \
info-target-zlib
@: $(MAKE); $(unstage)
- @[ -f $(TARGET_SUBDIR)/zlib/Makefile ] || exit 0 ; \
+ @[ -f $(TARGET_SUBDIR)/zlib/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(NORMAL_TARGET_EXPORTS) \
- echo "Doing install-info in $(TARGET_SUBDIR)/zlib" ; \
+ echo "Doing install-info in $(TARGET_SUBDIR)/zlib"; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
@@ -40805,11 +44246,11 @@ install-pdf-target-zlib: \
configure-target-zlib \
pdf-target-zlib
@: $(MAKE); $(unstage)
- @[ -f $(TARGET_SUBDIR)/zlib/Makefile ] || exit 0 ; \
+ @[ -f $(TARGET_SUBDIR)/zlib/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(NORMAL_TARGET_EXPORTS) \
- echo "Doing install-pdf in $(TARGET_SUBDIR)/zlib" ; \
+ echo "Doing install-pdf in $(TARGET_SUBDIR)/zlib"; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
@@ -40832,11 +44273,11 @@ install-html-target-zlib: \
configure-target-zlib \
html-target-zlib
@: $(MAKE); $(unstage)
- @[ -f $(TARGET_SUBDIR)/zlib/Makefile ] || exit 0 ; \
+ @[ -f $(TARGET_SUBDIR)/zlib/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(NORMAL_TARGET_EXPORTS) \
- echo "Doing install-html in $(TARGET_SUBDIR)/zlib" ; \
+ echo "Doing install-html in $(TARGET_SUBDIR)/zlib"; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
@@ -40858,11 +44299,11 @@ maybe-installcheck-target-zlib: installcheck-target-zlib
installcheck-target-zlib: \
configure-target-zlib
@: $(MAKE); $(unstage)
- @[ -f $(TARGET_SUBDIR)/zlib/Makefile ] || exit 0 ; \
+ @[ -f $(TARGET_SUBDIR)/zlib/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(NORMAL_TARGET_EXPORTS) \
- echo "Doing installcheck in $(TARGET_SUBDIR)/zlib" ; \
+ echo "Doing installcheck in $(TARGET_SUBDIR)/zlib"; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
@@ -40883,11 +44324,11 @@ maybe-mostlyclean-target-zlib: mostlyclean-target-zlib
mostlyclean-target-zlib:
@: $(MAKE); $(unstage)
- @[ -f $(TARGET_SUBDIR)/zlib/Makefile ] || exit 0 ; \
+ @[ -f $(TARGET_SUBDIR)/zlib/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(NORMAL_TARGET_EXPORTS) \
- echo "Doing mostlyclean in $(TARGET_SUBDIR)/zlib" ; \
+ echo "Doing mostlyclean in $(TARGET_SUBDIR)/zlib"; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
@@ -40908,11 +44349,11 @@ maybe-clean-target-zlib: clean-target-zlib
clean-target-zlib:
@: $(MAKE); $(unstage)
- @[ -f $(TARGET_SUBDIR)/zlib/Makefile ] || exit 0 ; \
+ @[ -f $(TARGET_SUBDIR)/zlib/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(NORMAL_TARGET_EXPORTS) \
- echo "Doing clean in $(TARGET_SUBDIR)/zlib" ; \
+ echo "Doing clean in $(TARGET_SUBDIR)/zlib"; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
@@ -40933,11 +44374,11 @@ maybe-distclean-target-zlib: distclean-target-zlib
distclean-target-zlib:
@: $(MAKE); $(unstage)
- @[ -f $(TARGET_SUBDIR)/zlib/Makefile ] || exit 0 ; \
+ @[ -f $(TARGET_SUBDIR)/zlib/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(NORMAL_TARGET_EXPORTS) \
- echo "Doing distclean in $(TARGET_SUBDIR)/zlib" ; \
+ echo "Doing distclean in $(TARGET_SUBDIR)/zlib"; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
@@ -40958,11 +44399,11 @@ maybe-maintainer-clean-target-zlib: maintainer-clean-target-zlib
maintainer-clean-target-zlib:
@: $(MAKE); $(unstage)
- @[ -f $(TARGET_SUBDIR)/zlib/Makefile ] || exit 0 ; \
+ @[ -f $(TARGET_SUBDIR)/zlib/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(NORMAL_TARGET_EXPORTS) \
- echo "Doing maintainer-clean in $(TARGET_SUBDIR)/zlib" ; \
+ echo "Doing maintainer-clean in $(TARGET_SUBDIR)/zlib"; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
@@ -40992,8 +44433,8 @@ configure-target-boehm-gc:
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
echo "Checking multilib configuration for boehm-gc..."; \
- $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/boehm-gc ; \
- $(CC_FOR_TARGET) --print-multi-lib > $(TARGET_SUBDIR)/boehm-gc/multilib.tmp 2> /dev/null ; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/boehm-gc; \
+ $(CC_FOR_TARGET) --print-multi-lib > $(TARGET_SUBDIR)/boehm-gc/multilib.tmp 2> /dev/null; \
if test -r $(TARGET_SUBDIR)/boehm-gc/multilib.out; then \
if cmp -s $(TARGET_SUBDIR)/boehm-gc/multilib.tmp $(TARGET_SUBDIR)/boehm-gc/multilib.out; then \
rm -f $(TARGET_SUBDIR)/boehm-gc/multilib.tmp; \
@@ -41005,7 +44446,7 @@ configure-target-boehm-gc:
mv $(TARGET_SUBDIR)/boehm-gc/multilib.tmp $(TARGET_SUBDIR)/boehm-gc/multilib.out; \
fi; \
test ! -f $(TARGET_SUBDIR)/boehm-gc/Makefile || exit 0; \
- $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/boehm-gc ; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/boehm-gc; \
$(NORMAL_TARGET_EXPORTS) \
echo Configuring in $(TARGET_SUBDIR)/boehm-gc; \
cd "$(TARGET_SUBDIR)/boehm-gc" || exit 1; \
@@ -41014,12 +44455,13 @@ configure-target-boehm-gc:
*) topdir=`echo $(TARGET_SUBDIR)/boehm-gc/ | \
sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
esac; \
- srcdiroption="--srcdir=$${topdir}/boehm-gc"; \
- libsrcdir="$$s/boehm-gc"; \
+ module_srcdir=boehm-gc; \
rm -f no-such-file || : ; \
- CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure \
+ CONFIG_SITE=no-such-file $(SHELL) \
+ $$s/$$module_srcdir/configure \
+ --srcdir=$${topdir}/$$module_srcdir \
$(TARGET_CONFIGARGS) --build=${build_alias} --host=${target_alias} \
- --target=${target_alias} $${srcdiroption} \
+ --target=${target_alias} \
|| exit 1
@endif target-boehm-gc
@@ -41104,11 +44546,11 @@ maybe-info-target-boehm-gc: info-target-boehm-gc
info-target-boehm-gc: \
configure-target-boehm-gc
@: $(MAKE); $(unstage)
- @[ -f $(TARGET_SUBDIR)/boehm-gc/Makefile ] || exit 0 ; \
+ @[ -f $(TARGET_SUBDIR)/boehm-gc/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(NORMAL_TARGET_EXPORTS) \
- echo "Doing info in $(TARGET_SUBDIR)/boehm-gc" ; \
+ echo "Doing info in $(TARGET_SUBDIR)/boehm-gc"; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
@@ -41130,11 +44572,11 @@ maybe-dvi-target-boehm-gc: dvi-target-boehm-gc
dvi-target-boehm-gc: \
configure-target-boehm-gc
@: $(MAKE); $(unstage)
- @[ -f $(TARGET_SUBDIR)/boehm-gc/Makefile ] || exit 0 ; \
+ @[ -f $(TARGET_SUBDIR)/boehm-gc/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(NORMAL_TARGET_EXPORTS) \
- echo "Doing dvi in $(TARGET_SUBDIR)/boehm-gc" ; \
+ echo "Doing dvi in $(TARGET_SUBDIR)/boehm-gc"; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
@@ -41156,11 +44598,11 @@ maybe-pdf-target-boehm-gc: pdf-target-boehm-gc
pdf-target-boehm-gc: \
configure-target-boehm-gc
@: $(MAKE); $(unstage)
- @[ -f $(TARGET_SUBDIR)/boehm-gc/Makefile ] || exit 0 ; \
+ @[ -f $(TARGET_SUBDIR)/boehm-gc/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(NORMAL_TARGET_EXPORTS) \
- echo "Doing pdf in $(TARGET_SUBDIR)/boehm-gc" ; \
+ echo "Doing pdf in $(TARGET_SUBDIR)/boehm-gc"; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
@@ -41182,11 +44624,11 @@ maybe-html-target-boehm-gc: html-target-boehm-gc
html-target-boehm-gc: \
configure-target-boehm-gc
@: $(MAKE); $(unstage)
- @[ -f $(TARGET_SUBDIR)/boehm-gc/Makefile ] || exit 0 ; \
+ @[ -f $(TARGET_SUBDIR)/boehm-gc/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(NORMAL_TARGET_EXPORTS) \
- echo "Doing html in $(TARGET_SUBDIR)/boehm-gc" ; \
+ echo "Doing html in $(TARGET_SUBDIR)/boehm-gc"; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
@@ -41208,11 +44650,11 @@ maybe-TAGS-target-boehm-gc: TAGS-target-boehm-gc
TAGS-target-boehm-gc: \
configure-target-boehm-gc
@: $(MAKE); $(unstage)
- @[ -f $(TARGET_SUBDIR)/boehm-gc/Makefile ] || exit 0 ; \
+ @[ -f $(TARGET_SUBDIR)/boehm-gc/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(NORMAL_TARGET_EXPORTS) \
- echo "Doing TAGS in $(TARGET_SUBDIR)/boehm-gc" ; \
+ echo "Doing TAGS in $(TARGET_SUBDIR)/boehm-gc"; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
@@ -41235,11 +44677,11 @@ install-info-target-boehm-gc: \
configure-target-boehm-gc \
info-target-boehm-gc
@: $(MAKE); $(unstage)
- @[ -f $(TARGET_SUBDIR)/boehm-gc/Makefile ] || exit 0 ; \
+ @[ -f $(TARGET_SUBDIR)/boehm-gc/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(NORMAL_TARGET_EXPORTS) \
- echo "Doing install-info in $(TARGET_SUBDIR)/boehm-gc" ; \
+ echo "Doing install-info in $(TARGET_SUBDIR)/boehm-gc"; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
@@ -41262,11 +44704,11 @@ install-pdf-target-boehm-gc: \
configure-target-boehm-gc \
pdf-target-boehm-gc
@: $(MAKE); $(unstage)
- @[ -f $(TARGET_SUBDIR)/boehm-gc/Makefile ] || exit 0 ; \
+ @[ -f $(TARGET_SUBDIR)/boehm-gc/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(NORMAL_TARGET_EXPORTS) \
- echo "Doing install-pdf in $(TARGET_SUBDIR)/boehm-gc" ; \
+ echo "Doing install-pdf in $(TARGET_SUBDIR)/boehm-gc"; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
@@ -41289,11 +44731,11 @@ install-html-target-boehm-gc: \
configure-target-boehm-gc \
html-target-boehm-gc
@: $(MAKE); $(unstage)
- @[ -f $(TARGET_SUBDIR)/boehm-gc/Makefile ] || exit 0 ; \
+ @[ -f $(TARGET_SUBDIR)/boehm-gc/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(NORMAL_TARGET_EXPORTS) \
- echo "Doing install-html in $(TARGET_SUBDIR)/boehm-gc" ; \
+ echo "Doing install-html in $(TARGET_SUBDIR)/boehm-gc"; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
@@ -41315,11 +44757,11 @@ maybe-installcheck-target-boehm-gc: installcheck-target-boehm-gc
installcheck-target-boehm-gc: \
configure-target-boehm-gc
@: $(MAKE); $(unstage)
- @[ -f $(TARGET_SUBDIR)/boehm-gc/Makefile ] || exit 0 ; \
+ @[ -f $(TARGET_SUBDIR)/boehm-gc/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(NORMAL_TARGET_EXPORTS) \
- echo "Doing installcheck in $(TARGET_SUBDIR)/boehm-gc" ; \
+ echo "Doing installcheck in $(TARGET_SUBDIR)/boehm-gc"; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
@@ -41340,11 +44782,11 @@ maybe-mostlyclean-target-boehm-gc: mostlyclean-target-boehm-gc
mostlyclean-target-boehm-gc:
@: $(MAKE); $(unstage)
- @[ -f $(TARGET_SUBDIR)/boehm-gc/Makefile ] || exit 0 ; \
+ @[ -f $(TARGET_SUBDIR)/boehm-gc/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(NORMAL_TARGET_EXPORTS) \
- echo "Doing mostlyclean in $(TARGET_SUBDIR)/boehm-gc" ; \
+ echo "Doing mostlyclean in $(TARGET_SUBDIR)/boehm-gc"; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
@@ -41365,11 +44807,11 @@ maybe-clean-target-boehm-gc: clean-target-boehm-gc
clean-target-boehm-gc:
@: $(MAKE); $(unstage)
- @[ -f $(TARGET_SUBDIR)/boehm-gc/Makefile ] || exit 0 ; \
+ @[ -f $(TARGET_SUBDIR)/boehm-gc/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(NORMAL_TARGET_EXPORTS) \
- echo "Doing clean in $(TARGET_SUBDIR)/boehm-gc" ; \
+ echo "Doing clean in $(TARGET_SUBDIR)/boehm-gc"; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
@@ -41390,11 +44832,11 @@ maybe-distclean-target-boehm-gc: distclean-target-boehm-gc
distclean-target-boehm-gc:
@: $(MAKE); $(unstage)
- @[ -f $(TARGET_SUBDIR)/boehm-gc/Makefile ] || exit 0 ; \
+ @[ -f $(TARGET_SUBDIR)/boehm-gc/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(NORMAL_TARGET_EXPORTS) \
- echo "Doing distclean in $(TARGET_SUBDIR)/boehm-gc" ; \
+ echo "Doing distclean in $(TARGET_SUBDIR)/boehm-gc"; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
@@ -41415,11 +44857,11 @@ maybe-maintainer-clean-target-boehm-gc: maintainer-clean-target-boehm-gc
maintainer-clean-target-boehm-gc:
@: $(MAKE); $(unstage)
- @[ -f $(TARGET_SUBDIR)/boehm-gc/Makefile ] || exit 0 ; \
+ @[ -f $(TARGET_SUBDIR)/boehm-gc/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(NORMAL_TARGET_EXPORTS) \
- echo "Doing maintainer-clean in $(TARGET_SUBDIR)/boehm-gc" ; \
+ echo "Doing maintainer-clean in $(TARGET_SUBDIR)/boehm-gc"; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
@@ -41449,8 +44891,8 @@ configure-target-rda:
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
echo "Checking multilib configuration for rda..."; \
- $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/rda ; \
- $(CC_FOR_TARGET) --print-multi-lib > $(TARGET_SUBDIR)/rda/multilib.tmp 2> /dev/null ; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/rda; \
+ $(CC_FOR_TARGET) --print-multi-lib > $(TARGET_SUBDIR)/rda/multilib.tmp 2> /dev/null; \
if test -r $(TARGET_SUBDIR)/rda/multilib.out; then \
if cmp -s $(TARGET_SUBDIR)/rda/multilib.tmp $(TARGET_SUBDIR)/rda/multilib.out; then \
rm -f $(TARGET_SUBDIR)/rda/multilib.tmp; \
@@ -41462,7 +44904,7 @@ configure-target-rda:
mv $(TARGET_SUBDIR)/rda/multilib.tmp $(TARGET_SUBDIR)/rda/multilib.out; \
fi; \
test ! -f $(TARGET_SUBDIR)/rda/Makefile || exit 0; \
- $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/rda ; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/rda; \
$(NORMAL_TARGET_EXPORTS) \
echo Configuring in $(TARGET_SUBDIR)/rda; \
cd "$(TARGET_SUBDIR)/rda" || exit 1; \
@@ -41471,12 +44913,13 @@ configure-target-rda:
*) topdir=`echo $(TARGET_SUBDIR)/rda/ | \
sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
esac; \
- srcdiroption="--srcdir=$${topdir}/rda"; \
- libsrcdir="$$s/rda"; \
+ module_srcdir=rda; \
rm -f no-such-file || : ; \
- CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure \
+ CONFIG_SITE=no-such-file $(SHELL) \
+ $$s/$$module_srcdir/configure \
+ --srcdir=$${topdir}/$$module_srcdir \
$(TARGET_CONFIGARGS) --build=${build_alias} --host=${target_alias} \
- --target=${target_alias} $${srcdiroption} \
+ --target=${target_alias} \
|| exit 1
@endif target-rda
@@ -41561,11 +45004,11 @@ maybe-info-target-rda: info-target-rda
info-target-rda: \
configure-target-rda
@: $(MAKE); $(unstage)
- @[ -f $(TARGET_SUBDIR)/rda/Makefile ] || exit 0 ; \
+ @[ -f $(TARGET_SUBDIR)/rda/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(NORMAL_TARGET_EXPORTS) \
- echo "Doing info in $(TARGET_SUBDIR)/rda" ; \
+ echo "Doing info in $(TARGET_SUBDIR)/rda"; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
@@ -41587,11 +45030,11 @@ maybe-dvi-target-rda: dvi-target-rda
dvi-target-rda: \
configure-target-rda
@: $(MAKE); $(unstage)
- @[ -f $(TARGET_SUBDIR)/rda/Makefile ] || exit 0 ; \
+ @[ -f $(TARGET_SUBDIR)/rda/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(NORMAL_TARGET_EXPORTS) \
- echo "Doing dvi in $(TARGET_SUBDIR)/rda" ; \
+ echo "Doing dvi in $(TARGET_SUBDIR)/rda"; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
@@ -41613,11 +45056,11 @@ maybe-pdf-target-rda: pdf-target-rda
pdf-target-rda: \
configure-target-rda
@: $(MAKE); $(unstage)
- @[ -f $(TARGET_SUBDIR)/rda/Makefile ] || exit 0 ; \
+ @[ -f $(TARGET_SUBDIR)/rda/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(NORMAL_TARGET_EXPORTS) \
- echo "Doing pdf in $(TARGET_SUBDIR)/rda" ; \
+ echo "Doing pdf in $(TARGET_SUBDIR)/rda"; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
@@ -41639,11 +45082,11 @@ maybe-html-target-rda: html-target-rda
html-target-rda: \
configure-target-rda
@: $(MAKE); $(unstage)
- @[ -f $(TARGET_SUBDIR)/rda/Makefile ] || exit 0 ; \
+ @[ -f $(TARGET_SUBDIR)/rda/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(NORMAL_TARGET_EXPORTS) \
- echo "Doing html in $(TARGET_SUBDIR)/rda" ; \
+ echo "Doing html in $(TARGET_SUBDIR)/rda"; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
@@ -41665,11 +45108,11 @@ maybe-TAGS-target-rda: TAGS-target-rda
TAGS-target-rda: \
configure-target-rda
@: $(MAKE); $(unstage)
- @[ -f $(TARGET_SUBDIR)/rda/Makefile ] || exit 0 ; \
+ @[ -f $(TARGET_SUBDIR)/rda/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(NORMAL_TARGET_EXPORTS) \
- echo "Doing TAGS in $(TARGET_SUBDIR)/rda" ; \
+ echo "Doing TAGS in $(TARGET_SUBDIR)/rda"; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
@@ -41692,11 +45135,11 @@ install-info-target-rda: \
configure-target-rda \
info-target-rda
@: $(MAKE); $(unstage)
- @[ -f $(TARGET_SUBDIR)/rda/Makefile ] || exit 0 ; \
+ @[ -f $(TARGET_SUBDIR)/rda/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(NORMAL_TARGET_EXPORTS) \
- echo "Doing install-info in $(TARGET_SUBDIR)/rda" ; \
+ echo "Doing install-info in $(TARGET_SUBDIR)/rda"; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
@@ -41719,11 +45162,11 @@ install-pdf-target-rda: \
configure-target-rda \
pdf-target-rda
@: $(MAKE); $(unstage)
- @[ -f $(TARGET_SUBDIR)/rda/Makefile ] || exit 0 ; \
+ @[ -f $(TARGET_SUBDIR)/rda/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(NORMAL_TARGET_EXPORTS) \
- echo "Doing install-pdf in $(TARGET_SUBDIR)/rda" ; \
+ echo "Doing install-pdf in $(TARGET_SUBDIR)/rda"; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
@@ -41746,11 +45189,11 @@ install-html-target-rda: \
configure-target-rda \
html-target-rda
@: $(MAKE); $(unstage)
- @[ -f $(TARGET_SUBDIR)/rda/Makefile ] || exit 0 ; \
+ @[ -f $(TARGET_SUBDIR)/rda/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(NORMAL_TARGET_EXPORTS) \
- echo "Doing install-html in $(TARGET_SUBDIR)/rda" ; \
+ echo "Doing install-html in $(TARGET_SUBDIR)/rda"; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
@@ -41772,11 +45215,11 @@ maybe-installcheck-target-rda: installcheck-target-rda
installcheck-target-rda: \
configure-target-rda
@: $(MAKE); $(unstage)
- @[ -f $(TARGET_SUBDIR)/rda/Makefile ] || exit 0 ; \
+ @[ -f $(TARGET_SUBDIR)/rda/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(NORMAL_TARGET_EXPORTS) \
- echo "Doing installcheck in $(TARGET_SUBDIR)/rda" ; \
+ echo "Doing installcheck in $(TARGET_SUBDIR)/rda"; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
@@ -41797,11 +45240,11 @@ maybe-mostlyclean-target-rda: mostlyclean-target-rda
mostlyclean-target-rda:
@: $(MAKE); $(unstage)
- @[ -f $(TARGET_SUBDIR)/rda/Makefile ] || exit 0 ; \
+ @[ -f $(TARGET_SUBDIR)/rda/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(NORMAL_TARGET_EXPORTS) \
- echo "Doing mostlyclean in $(TARGET_SUBDIR)/rda" ; \
+ echo "Doing mostlyclean in $(TARGET_SUBDIR)/rda"; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
@@ -41822,11 +45265,11 @@ maybe-clean-target-rda: clean-target-rda
clean-target-rda:
@: $(MAKE); $(unstage)
- @[ -f $(TARGET_SUBDIR)/rda/Makefile ] || exit 0 ; \
+ @[ -f $(TARGET_SUBDIR)/rda/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(NORMAL_TARGET_EXPORTS) \
- echo "Doing clean in $(TARGET_SUBDIR)/rda" ; \
+ echo "Doing clean in $(TARGET_SUBDIR)/rda"; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
@@ -41847,11 +45290,11 @@ maybe-distclean-target-rda: distclean-target-rda
distclean-target-rda:
@: $(MAKE); $(unstage)
- @[ -f $(TARGET_SUBDIR)/rda/Makefile ] || exit 0 ; \
+ @[ -f $(TARGET_SUBDIR)/rda/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(NORMAL_TARGET_EXPORTS) \
- echo "Doing distclean in $(TARGET_SUBDIR)/rda" ; \
+ echo "Doing distclean in $(TARGET_SUBDIR)/rda"; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
@@ -41872,11 +45315,11 @@ maybe-maintainer-clean-target-rda: maintainer-clean-target-rda
maintainer-clean-target-rda:
@: $(MAKE); $(unstage)
- @[ -f $(TARGET_SUBDIR)/rda/Makefile ] || exit 0 ; \
+ @[ -f $(TARGET_SUBDIR)/rda/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(NORMAL_TARGET_EXPORTS) \
- echo "Doing maintainer-clean in $(TARGET_SUBDIR)/rda" ; \
+ echo "Doing maintainer-clean in $(TARGET_SUBDIR)/rda"; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
@@ -41906,8 +45349,8 @@ configure-target-libada:
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
echo "Checking multilib configuration for libada..."; \
- $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libada ; \
- $(CC_FOR_TARGET) --print-multi-lib > $(TARGET_SUBDIR)/libada/multilib.tmp 2> /dev/null ; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libada; \
+ $(CC_FOR_TARGET) --print-multi-lib > $(TARGET_SUBDIR)/libada/multilib.tmp 2> /dev/null; \
if test -r $(TARGET_SUBDIR)/libada/multilib.out; then \
if cmp -s $(TARGET_SUBDIR)/libada/multilib.tmp $(TARGET_SUBDIR)/libada/multilib.out; then \
rm -f $(TARGET_SUBDIR)/libada/multilib.tmp; \
@@ -41919,7 +45362,7 @@ configure-target-libada:
mv $(TARGET_SUBDIR)/libada/multilib.tmp $(TARGET_SUBDIR)/libada/multilib.out; \
fi; \
test ! -f $(TARGET_SUBDIR)/libada/Makefile || exit 0; \
- $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libada ; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libada; \
$(NORMAL_TARGET_EXPORTS) \
echo Configuring in $(TARGET_SUBDIR)/libada; \
cd "$(TARGET_SUBDIR)/libada" || exit 1; \
@@ -41928,12 +45371,13 @@ configure-target-libada:
*) topdir=`echo $(TARGET_SUBDIR)/libada/ | \
sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
esac; \
- srcdiroption="--srcdir=$${topdir}/libada"; \
- libsrcdir="$$s/libada"; \
+ module_srcdir=libada; \
rm -f no-such-file || : ; \
- CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure \
+ CONFIG_SITE=no-such-file $(SHELL) \
+ $$s/$$module_srcdir/configure \
+ --srcdir=$${topdir}/$$module_srcdir \
$(TARGET_CONFIGARGS) --build=${build_alias} --host=${target_alias} \
- --target=${target_alias} $${srcdiroption} \
+ --target=${target_alias} \
|| exit 1
@endif target-libada
@@ -42018,11 +45462,11 @@ maybe-info-target-libada: info-target-libada
info-target-libada: \
configure-target-libada
@: $(MAKE); $(unstage)
- @[ -f $(TARGET_SUBDIR)/libada/Makefile ] || exit 0 ; \
+ @[ -f $(TARGET_SUBDIR)/libada/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(NORMAL_TARGET_EXPORTS) \
- echo "Doing info in $(TARGET_SUBDIR)/libada" ; \
+ echo "Doing info in $(TARGET_SUBDIR)/libada"; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
@@ -42044,11 +45488,11 @@ maybe-dvi-target-libada: dvi-target-libada
dvi-target-libada: \
configure-target-libada
@: $(MAKE); $(unstage)
- @[ -f $(TARGET_SUBDIR)/libada/Makefile ] || exit 0 ; \
+ @[ -f $(TARGET_SUBDIR)/libada/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(NORMAL_TARGET_EXPORTS) \
- echo "Doing dvi in $(TARGET_SUBDIR)/libada" ; \
+ echo "Doing dvi in $(TARGET_SUBDIR)/libada"; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
@@ -42070,11 +45514,11 @@ maybe-pdf-target-libada: pdf-target-libada
pdf-target-libada: \
configure-target-libada
@: $(MAKE); $(unstage)
- @[ -f $(TARGET_SUBDIR)/libada/Makefile ] || exit 0 ; \
+ @[ -f $(TARGET_SUBDIR)/libada/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(NORMAL_TARGET_EXPORTS) \
- echo "Doing pdf in $(TARGET_SUBDIR)/libada" ; \
+ echo "Doing pdf in $(TARGET_SUBDIR)/libada"; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
@@ -42096,11 +45540,11 @@ maybe-html-target-libada: html-target-libada
html-target-libada: \
configure-target-libada
@: $(MAKE); $(unstage)
- @[ -f $(TARGET_SUBDIR)/libada/Makefile ] || exit 0 ; \
+ @[ -f $(TARGET_SUBDIR)/libada/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(NORMAL_TARGET_EXPORTS) \
- echo "Doing html in $(TARGET_SUBDIR)/libada" ; \
+ echo "Doing html in $(TARGET_SUBDIR)/libada"; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
@@ -42122,11 +45566,11 @@ maybe-TAGS-target-libada: TAGS-target-libada
TAGS-target-libada: \
configure-target-libada
@: $(MAKE); $(unstage)
- @[ -f $(TARGET_SUBDIR)/libada/Makefile ] || exit 0 ; \
+ @[ -f $(TARGET_SUBDIR)/libada/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(NORMAL_TARGET_EXPORTS) \
- echo "Doing TAGS in $(TARGET_SUBDIR)/libada" ; \
+ echo "Doing TAGS in $(TARGET_SUBDIR)/libada"; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
@@ -42149,11 +45593,11 @@ install-info-target-libada: \
configure-target-libada \
info-target-libada
@: $(MAKE); $(unstage)
- @[ -f $(TARGET_SUBDIR)/libada/Makefile ] || exit 0 ; \
+ @[ -f $(TARGET_SUBDIR)/libada/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(NORMAL_TARGET_EXPORTS) \
- echo "Doing install-info in $(TARGET_SUBDIR)/libada" ; \
+ echo "Doing install-info in $(TARGET_SUBDIR)/libada"; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
@@ -42176,11 +45620,11 @@ install-pdf-target-libada: \
configure-target-libada \
pdf-target-libada
@: $(MAKE); $(unstage)
- @[ -f $(TARGET_SUBDIR)/libada/Makefile ] || exit 0 ; \
+ @[ -f $(TARGET_SUBDIR)/libada/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(NORMAL_TARGET_EXPORTS) \
- echo "Doing install-pdf in $(TARGET_SUBDIR)/libada" ; \
+ echo "Doing install-pdf in $(TARGET_SUBDIR)/libada"; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
@@ -42203,11 +45647,11 @@ install-html-target-libada: \
configure-target-libada \
html-target-libada
@: $(MAKE); $(unstage)
- @[ -f $(TARGET_SUBDIR)/libada/Makefile ] || exit 0 ; \
+ @[ -f $(TARGET_SUBDIR)/libada/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(NORMAL_TARGET_EXPORTS) \
- echo "Doing install-html in $(TARGET_SUBDIR)/libada" ; \
+ echo "Doing install-html in $(TARGET_SUBDIR)/libada"; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
@@ -42229,11 +45673,11 @@ maybe-installcheck-target-libada: installcheck-target-libada
installcheck-target-libada: \
configure-target-libada
@: $(MAKE); $(unstage)
- @[ -f $(TARGET_SUBDIR)/libada/Makefile ] || exit 0 ; \
+ @[ -f $(TARGET_SUBDIR)/libada/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(NORMAL_TARGET_EXPORTS) \
- echo "Doing installcheck in $(TARGET_SUBDIR)/libada" ; \
+ echo "Doing installcheck in $(TARGET_SUBDIR)/libada"; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
@@ -42254,11 +45698,11 @@ maybe-mostlyclean-target-libada: mostlyclean-target-libada
mostlyclean-target-libada:
@: $(MAKE); $(unstage)
- @[ -f $(TARGET_SUBDIR)/libada/Makefile ] || exit 0 ; \
+ @[ -f $(TARGET_SUBDIR)/libada/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(NORMAL_TARGET_EXPORTS) \
- echo "Doing mostlyclean in $(TARGET_SUBDIR)/libada" ; \
+ echo "Doing mostlyclean in $(TARGET_SUBDIR)/libada"; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
@@ -42279,11 +45723,11 @@ maybe-clean-target-libada: clean-target-libada
clean-target-libada:
@: $(MAKE); $(unstage)
- @[ -f $(TARGET_SUBDIR)/libada/Makefile ] || exit 0 ; \
+ @[ -f $(TARGET_SUBDIR)/libada/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(NORMAL_TARGET_EXPORTS) \
- echo "Doing clean in $(TARGET_SUBDIR)/libada" ; \
+ echo "Doing clean in $(TARGET_SUBDIR)/libada"; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
@@ -42304,11 +45748,11 @@ maybe-distclean-target-libada: distclean-target-libada
distclean-target-libada:
@: $(MAKE); $(unstage)
- @[ -f $(TARGET_SUBDIR)/libada/Makefile ] || exit 0 ; \
+ @[ -f $(TARGET_SUBDIR)/libada/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(NORMAL_TARGET_EXPORTS) \
- echo "Doing distclean in $(TARGET_SUBDIR)/libada" ; \
+ echo "Doing distclean in $(TARGET_SUBDIR)/libada"; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
@@ -42329,11 +45773,11 @@ maybe-maintainer-clean-target-libada: maintainer-clean-target-libada
maintainer-clean-target-libada:
@: $(MAKE); $(unstage)
- @[ -f $(TARGET_SUBDIR)/libada/Makefile ] || exit 0 ; \
+ @[ -f $(TARGET_SUBDIR)/libada/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(NORMAL_TARGET_EXPORTS) \
- echo "Doing maintainer-clean in $(TARGET_SUBDIR)/libada" ; \
+ echo "Doing maintainer-clean in $(TARGET_SUBDIR)/libada"; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
@@ -42362,8 +45806,8 @@ configure-target-libgomp:
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
echo "Checking multilib configuration for libgomp..."; \
- $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libgomp ; \
- $(CC_FOR_TARGET) --print-multi-lib > $(TARGET_SUBDIR)/libgomp/multilib.tmp 2> /dev/null ; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libgomp; \
+ $(CC_FOR_TARGET) --print-multi-lib > $(TARGET_SUBDIR)/libgomp/multilib.tmp 2> /dev/null; \
if test -r $(TARGET_SUBDIR)/libgomp/multilib.out; then \
if cmp -s $(TARGET_SUBDIR)/libgomp/multilib.tmp $(TARGET_SUBDIR)/libgomp/multilib.out; then \
rm -f $(TARGET_SUBDIR)/libgomp/multilib.tmp; \
@@ -42375,7 +45819,7 @@ configure-target-libgomp:
mv $(TARGET_SUBDIR)/libgomp/multilib.tmp $(TARGET_SUBDIR)/libgomp/multilib.out; \
fi; \
test ! -f $(TARGET_SUBDIR)/libgomp/Makefile || exit 0; \
- $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libgomp ; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libgomp; \
$(NORMAL_TARGET_EXPORTS) \
echo Configuring in $(TARGET_SUBDIR)/libgomp; \
cd "$(TARGET_SUBDIR)/libgomp" || exit 1; \
@@ -42384,12 +45828,13 @@ configure-target-libgomp:
*) topdir=`echo $(TARGET_SUBDIR)/libgomp/ | \
sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
esac; \
- srcdiroption="--srcdir=$${topdir}/libgomp"; \
- libsrcdir="$$s/libgomp"; \
+ module_srcdir=libgomp; \
rm -f no-such-file || : ; \
- CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure \
+ CONFIG_SITE=no-such-file $(SHELL) \
+ $$s/$$module_srcdir/configure \
+ --srcdir=$${topdir}/$$module_srcdir \
$(TARGET_CONFIGARGS) --build=${build_alias} --host=${target_alias} \
- --target=${target_alias} $${srcdiroption} \
+ --target=${target_alias} \
|| exit 1
@endif target-libgomp
@@ -42406,7 +45851,7 @@ configure-stage1-target-libgomp:
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
TFLAGS="$(STAGE1_TFLAGS)"; \
echo "Checking multilib configuration for libgomp..."; \
- $(CC_FOR_TARGET) --print-multi-lib > $(TARGET_SUBDIR)/libgomp/multilib.tmp 2> /dev/null ; \
+ $(CC_FOR_TARGET) --print-multi-lib > $(TARGET_SUBDIR)/libgomp/multilib.tmp 2> /dev/null; \
if test -r $(TARGET_SUBDIR)/libgomp/multilib.out; then \
if cmp -s $(TARGET_SUBDIR)/libgomp/multilib.tmp $(TARGET_SUBDIR)/libgomp/multilib.out; then \
rm -f $(TARGET_SUBDIR)/libgomp/multilib.tmp; \
@@ -42422,19 +45867,20 @@ configure-stage1-target-libgomp:
CFLAGS="$(CFLAGS_FOR_TARGET)"; export CFLAGS; \
CXXFLAGS="$(CXXFLAGS_FOR_TARGET)"; export CXXFLAGS; \
LIBCFLAGS="$(LIBCFLAGS_FOR_TARGET)"; export LIBCFLAGS; \
- echo Configuring stage 1 in $(TARGET_SUBDIR)/libgomp ; \
- $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libgomp ; \
+ echo Configuring stage 1 in $(TARGET_SUBDIR)/libgomp; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libgomp; \
cd $(TARGET_SUBDIR)/libgomp || exit 1; \
case $(srcdir) in \
/* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
*) topdir=`echo $(TARGET_SUBDIR)/libgomp/ | \
sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
esac; \
- srcdiroption="--srcdir=$${topdir}/libgomp"; \
- libsrcdir="$$s/libgomp"; \
- $(SHELL) $${libsrcdir}/configure \
+ module_srcdir=libgomp; \
+ $(SHELL) $$s/$$module_srcdir/configure \
+ --srcdir=$${topdir}/$$module_srcdir \
$(TARGET_CONFIGARGS) --build=${build_alias} --host=${target_alias} \
- --target=${target_alias} $${srcdiroption} \
+ --target=${target_alias} \
+ \
$(STAGE1_CONFIGURE_FLAGS)
@endif target-libgomp-bootstrap
@@ -42449,7 +45895,7 @@ configure-stage2-target-libgomp:
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
TFLAGS="$(STAGE2_TFLAGS)"; \
echo "Checking multilib configuration for libgomp..."; \
- $(CC_FOR_TARGET) --print-multi-lib > $(TARGET_SUBDIR)/libgomp/multilib.tmp 2> /dev/null ; \
+ $(CC_FOR_TARGET) --print-multi-lib > $(TARGET_SUBDIR)/libgomp/multilib.tmp 2> /dev/null; \
if test -r $(TARGET_SUBDIR)/libgomp/multilib.out; then \
if cmp -s $(TARGET_SUBDIR)/libgomp/multilib.tmp $(TARGET_SUBDIR)/libgomp/multilib.out; then \
rm -f $(TARGET_SUBDIR)/libgomp/multilib.tmp; \
@@ -42466,19 +45912,19 @@ configure-stage2-target-libgomp:
CFLAGS="$(CFLAGS_FOR_TARGET)"; export CFLAGS; \
CXXFLAGS="$(CXXFLAGS_FOR_TARGET)"; export CXXFLAGS; \
LIBCFLAGS="$(LIBCFLAGS_FOR_TARGET)"; export LIBCFLAGS; \
- echo Configuring stage 2 in $(TARGET_SUBDIR)/libgomp ; \
- $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libgomp ; \
+ echo Configuring stage 2 in $(TARGET_SUBDIR)/libgomp; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libgomp; \
cd $(TARGET_SUBDIR)/libgomp || exit 1; \
case $(srcdir) in \
/* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
*) topdir=`echo $(TARGET_SUBDIR)/libgomp/ | \
sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
esac; \
- srcdiroption="--srcdir=$${topdir}/libgomp"; \
- libsrcdir="$$s/libgomp"; \
- $(SHELL) $${libsrcdir}/configure \
+ module_srcdir=libgomp; \
+ $(SHELL) $$s/$$module_srcdir/configure \
+ --srcdir=$${topdir}/$$module_srcdir \
$(TARGET_CONFIGARGS) --build=${build_alias} --host=${target_alias} \
- --target=${target_alias} $${srcdiroption} \
+ --target=${target_alias} \
--with-build-libsubdir=$(HOST_SUBDIR) \
$(STAGE2_CONFIGURE_FLAGS)
@endif target-libgomp-bootstrap
@@ -42494,7 +45940,7 @@ configure-stage3-target-libgomp:
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
TFLAGS="$(STAGE3_TFLAGS)"; \
echo "Checking multilib configuration for libgomp..."; \
- $(CC_FOR_TARGET) --print-multi-lib > $(TARGET_SUBDIR)/libgomp/multilib.tmp 2> /dev/null ; \
+ $(CC_FOR_TARGET) --print-multi-lib > $(TARGET_SUBDIR)/libgomp/multilib.tmp 2> /dev/null; \
if test -r $(TARGET_SUBDIR)/libgomp/multilib.out; then \
if cmp -s $(TARGET_SUBDIR)/libgomp/multilib.tmp $(TARGET_SUBDIR)/libgomp/multilib.out; then \
rm -f $(TARGET_SUBDIR)/libgomp/multilib.tmp; \
@@ -42511,19 +45957,19 @@ configure-stage3-target-libgomp:
CFLAGS="$(CFLAGS_FOR_TARGET)"; export CFLAGS; \
CXXFLAGS="$(CXXFLAGS_FOR_TARGET)"; export CXXFLAGS; \
LIBCFLAGS="$(LIBCFLAGS_FOR_TARGET)"; export LIBCFLAGS; \
- echo Configuring stage 3 in $(TARGET_SUBDIR)/libgomp ; \
- $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libgomp ; \
+ echo Configuring stage 3 in $(TARGET_SUBDIR)/libgomp; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libgomp; \
cd $(TARGET_SUBDIR)/libgomp || exit 1; \
case $(srcdir) in \
/* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
*) topdir=`echo $(TARGET_SUBDIR)/libgomp/ | \
sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
esac; \
- srcdiroption="--srcdir=$${topdir}/libgomp"; \
- libsrcdir="$$s/libgomp"; \
- $(SHELL) $${libsrcdir}/configure \
+ module_srcdir=libgomp; \
+ $(SHELL) $$s/$$module_srcdir/configure \
+ --srcdir=$${topdir}/$$module_srcdir \
$(TARGET_CONFIGARGS) --build=${build_alias} --host=${target_alias} \
- --target=${target_alias} $${srcdiroption} \
+ --target=${target_alias} \
--with-build-libsubdir=$(HOST_SUBDIR) \
$(STAGE3_CONFIGURE_FLAGS)
@endif target-libgomp-bootstrap
@@ -42539,7 +45985,7 @@ configure-stage4-target-libgomp:
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
TFLAGS="$(STAGE4_TFLAGS)"; \
echo "Checking multilib configuration for libgomp..."; \
- $(CC_FOR_TARGET) --print-multi-lib > $(TARGET_SUBDIR)/libgomp/multilib.tmp 2> /dev/null ; \
+ $(CC_FOR_TARGET) --print-multi-lib > $(TARGET_SUBDIR)/libgomp/multilib.tmp 2> /dev/null; \
if test -r $(TARGET_SUBDIR)/libgomp/multilib.out; then \
if cmp -s $(TARGET_SUBDIR)/libgomp/multilib.tmp $(TARGET_SUBDIR)/libgomp/multilib.out; then \
rm -f $(TARGET_SUBDIR)/libgomp/multilib.tmp; \
@@ -42556,19 +46002,19 @@ configure-stage4-target-libgomp:
CFLAGS="$(CFLAGS_FOR_TARGET)"; export CFLAGS; \
CXXFLAGS="$(CXXFLAGS_FOR_TARGET)"; export CXXFLAGS; \
LIBCFLAGS="$(LIBCFLAGS_FOR_TARGET)"; export LIBCFLAGS; \
- echo Configuring stage 4 in $(TARGET_SUBDIR)/libgomp ; \
- $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libgomp ; \
+ echo Configuring stage 4 in $(TARGET_SUBDIR)/libgomp; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libgomp; \
cd $(TARGET_SUBDIR)/libgomp || exit 1; \
case $(srcdir) in \
/* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
*) topdir=`echo $(TARGET_SUBDIR)/libgomp/ | \
sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
esac; \
- srcdiroption="--srcdir=$${topdir}/libgomp"; \
- libsrcdir="$$s/libgomp"; \
- $(SHELL) $${libsrcdir}/configure \
+ module_srcdir=libgomp; \
+ $(SHELL) $$s/$$module_srcdir/configure \
+ --srcdir=$${topdir}/$$module_srcdir \
$(TARGET_CONFIGARGS) --build=${build_alias} --host=${target_alias} \
- --target=${target_alias} $${srcdiroption} \
+ --target=${target_alias} \
--with-build-libsubdir=$(HOST_SUBDIR) \
$(STAGE4_CONFIGURE_FLAGS)
@endif target-libgomp-bootstrap
@@ -42584,7 +46030,7 @@ configure-stageprofile-target-libgomp:
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
TFLAGS="$(STAGEprofile_TFLAGS)"; \
echo "Checking multilib configuration for libgomp..."; \
- $(CC_FOR_TARGET) --print-multi-lib > $(TARGET_SUBDIR)/libgomp/multilib.tmp 2> /dev/null ; \
+ $(CC_FOR_TARGET) --print-multi-lib > $(TARGET_SUBDIR)/libgomp/multilib.tmp 2> /dev/null; \
if test -r $(TARGET_SUBDIR)/libgomp/multilib.out; then \
if cmp -s $(TARGET_SUBDIR)/libgomp/multilib.tmp $(TARGET_SUBDIR)/libgomp/multilib.out; then \
rm -f $(TARGET_SUBDIR)/libgomp/multilib.tmp; \
@@ -42601,19 +46047,19 @@ configure-stageprofile-target-libgomp:
CFLAGS="$(CFLAGS_FOR_TARGET)"; export CFLAGS; \
CXXFLAGS="$(CXXFLAGS_FOR_TARGET)"; export CXXFLAGS; \
LIBCFLAGS="$(LIBCFLAGS_FOR_TARGET)"; export LIBCFLAGS; \
- echo Configuring stage profile in $(TARGET_SUBDIR)/libgomp ; \
- $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libgomp ; \
+ echo Configuring stage profile in $(TARGET_SUBDIR)/libgomp; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libgomp; \
cd $(TARGET_SUBDIR)/libgomp || exit 1; \
case $(srcdir) in \
/* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
*) topdir=`echo $(TARGET_SUBDIR)/libgomp/ | \
sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
esac; \
- srcdiroption="--srcdir=$${topdir}/libgomp"; \
- libsrcdir="$$s/libgomp"; \
- $(SHELL) $${libsrcdir}/configure \
+ module_srcdir=libgomp; \
+ $(SHELL) $$s/$$module_srcdir/configure \
+ --srcdir=$${topdir}/$$module_srcdir \
$(TARGET_CONFIGARGS) --build=${build_alias} --host=${target_alias} \
- --target=${target_alias} $${srcdiroption} \
+ --target=${target_alias} \
--with-build-libsubdir=$(HOST_SUBDIR) \
$(STAGEprofile_CONFIGURE_FLAGS)
@endif target-libgomp-bootstrap
@@ -42629,7 +46075,7 @@ configure-stagefeedback-target-libgomp:
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
TFLAGS="$(STAGEfeedback_TFLAGS)"; \
echo "Checking multilib configuration for libgomp..."; \
- $(CC_FOR_TARGET) --print-multi-lib > $(TARGET_SUBDIR)/libgomp/multilib.tmp 2> /dev/null ; \
+ $(CC_FOR_TARGET) --print-multi-lib > $(TARGET_SUBDIR)/libgomp/multilib.tmp 2> /dev/null; \
if test -r $(TARGET_SUBDIR)/libgomp/multilib.out; then \
if cmp -s $(TARGET_SUBDIR)/libgomp/multilib.tmp $(TARGET_SUBDIR)/libgomp/multilib.out; then \
rm -f $(TARGET_SUBDIR)/libgomp/multilib.tmp; \
@@ -42646,19 +46092,19 @@ configure-stagefeedback-target-libgomp:
CFLAGS="$(CFLAGS_FOR_TARGET)"; export CFLAGS; \
CXXFLAGS="$(CXXFLAGS_FOR_TARGET)"; export CXXFLAGS; \
LIBCFLAGS="$(LIBCFLAGS_FOR_TARGET)"; export LIBCFLAGS; \
- echo Configuring stage feedback in $(TARGET_SUBDIR)/libgomp ; \
- $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libgomp ; \
+ echo Configuring stage feedback in $(TARGET_SUBDIR)/libgomp; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libgomp; \
cd $(TARGET_SUBDIR)/libgomp || exit 1; \
case $(srcdir) in \
/* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
*) topdir=`echo $(TARGET_SUBDIR)/libgomp/ | \
sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
esac; \
- srcdiroption="--srcdir=$${topdir}/libgomp"; \
- libsrcdir="$$s/libgomp"; \
- $(SHELL) $${libsrcdir}/configure \
+ module_srcdir=libgomp; \
+ $(SHELL) $$s/$$module_srcdir/configure \
+ --srcdir=$${topdir}/$$module_srcdir \
$(TARGET_CONFIGARGS) --build=${build_alias} --host=${target_alias} \
- --target=${target_alias} $${srcdiroption} \
+ --target=${target_alias} \
--with-build-libsubdir=$(HOST_SUBDIR) \
$(STAGEfeedback_CONFIGURE_FLAGS)
@endif target-libgomp-bootstrap
@@ -42992,11 +46438,11 @@ maybe-info-target-libgomp: info-target-libgomp
info-target-libgomp: \
configure-target-libgomp
@: $(MAKE); $(unstage)
- @[ -f $(TARGET_SUBDIR)/libgomp/Makefile ] || exit 0 ; \
+ @[ -f $(TARGET_SUBDIR)/libgomp/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(NORMAL_TARGET_EXPORTS) \
- echo "Doing info in $(TARGET_SUBDIR)/libgomp" ; \
+ echo "Doing info in $(TARGET_SUBDIR)/libgomp"; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
@@ -43018,11 +46464,11 @@ maybe-dvi-target-libgomp: dvi-target-libgomp
dvi-target-libgomp: \
configure-target-libgomp
@: $(MAKE); $(unstage)
- @[ -f $(TARGET_SUBDIR)/libgomp/Makefile ] || exit 0 ; \
+ @[ -f $(TARGET_SUBDIR)/libgomp/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(NORMAL_TARGET_EXPORTS) \
- echo "Doing dvi in $(TARGET_SUBDIR)/libgomp" ; \
+ echo "Doing dvi in $(TARGET_SUBDIR)/libgomp"; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
@@ -43044,11 +46490,11 @@ maybe-pdf-target-libgomp: pdf-target-libgomp
pdf-target-libgomp: \
configure-target-libgomp
@: $(MAKE); $(unstage)
- @[ -f $(TARGET_SUBDIR)/libgomp/Makefile ] || exit 0 ; \
+ @[ -f $(TARGET_SUBDIR)/libgomp/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(NORMAL_TARGET_EXPORTS) \
- echo "Doing pdf in $(TARGET_SUBDIR)/libgomp" ; \
+ echo "Doing pdf in $(TARGET_SUBDIR)/libgomp"; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
@@ -43070,11 +46516,11 @@ maybe-html-target-libgomp: html-target-libgomp
html-target-libgomp: \
configure-target-libgomp
@: $(MAKE); $(unstage)
- @[ -f $(TARGET_SUBDIR)/libgomp/Makefile ] || exit 0 ; \
+ @[ -f $(TARGET_SUBDIR)/libgomp/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(NORMAL_TARGET_EXPORTS) \
- echo "Doing html in $(TARGET_SUBDIR)/libgomp" ; \
+ echo "Doing html in $(TARGET_SUBDIR)/libgomp"; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
@@ -43096,11 +46542,11 @@ maybe-TAGS-target-libgomp: TAGS-target-libgomp
TAGS-target-libgomp: \
configure-target-libgomp
@: $(MAKE); $(unstage)
- @[ -f $(TARGET_SUBDIR)/libgomp/Makefile ] || exit 0 ; \
+ @[ -f $(TARGET_SUBDIR)/libgomp/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(NORMAL_TARGET_EXPORTS) \
- echo "Doing TAGS in $(TARGET_SUBDIR)/libgomp" ; \
+ echo "Doing TAGS in $(TARGET_SUBDIR)/libgomp"; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
@@ -43123,11 +46569,11 @@ install-info-target-libgomp: \
configure-target-libgomp \
info-target-libgomp
@: $(MAKE); $(unstage)
- @[ -f $(TARGET_SUBDIR)/libgomp/Makefile ] || exit 0 ; \
+ @[ -f $(TARGET_SUBDIR)/libgomp/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(NORMAL_TARGET_EXPORTS) \
- echo "Doing install-info in $(TARGET_SUBDIR)/libgomp" ; \
+ echo "Doing install-info in $(TARGET_SUBDIR)/libgomp"; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
@@ -43150,11 +46596,11 @@ install-pdf-target-libgomp: \
configure-target-libgomp \
pdf-target-libgomp
@: $(MAKE); $(unstage)
- @[ -f $(TARGET_SUBDIR)/libgomp/Makefile ] || exit 0 ; \
+ @[ -f $(TARGET_SUBDIR)/libgomp/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(NORMAL_TARGET_EXPORTS) \
- echo "Doing install-pdf in $(TARGET_SUBDIR)/libgomp" ; \
+ echo "Doing install-pdf in $(TARGET_SUBDIR)/libgomp"; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
@@ -43177,11 +46623,11 @@ install-html-target-libgomp: \
configure-target-libgomp \
html-target-libgomp
@: $(MAKE); $(unstage)
- @[ -f $(TARGET_SUBDIR)/libgomp/Makefile ] || exit 0 ; \
+ @[ -f $(TARGET_SUBDIR)/libgomp/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(NORMAL_TARGET_EXPORTS) \
- echo "Doing install-html in $(TARGET_SUBDIR)/libgomp" ; \
+ echo "Doing install-html in $(TARGET_SUBDIR)/libgomp"; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
@@ -43203,11 +46649,11 @@ maybe-installcheck-target-libgomp: installcheck-target-libgomp
installcheck-target-libgomp: \
configure-target-libgomp
@: $(MAKE); $(unstage)
- @[ -f $(TARGET_SUBDIR)/libgomp/Makefile ] || exit 0 ; \
+ @[ -f $(TARGET_SUBDIR)/libgomp/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(NORMAL_TARGET_EXPORTS) \
- echo "Doing installcheck in $(TARGET_SUBDIR)/libgomp" ; \
+ echo "Doing installcheck in $(TARGET_SUBDIR)/libgomp"; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
@@ -43228,11 +46674,11 @@ maybe-mostlyclean-target-libgomp: mostlyclean-target-libgomp
mostlyclean-target-libgomp:
@: $(MAKE); $(unstage)
- @[ -f $(TARGET_SUBDIR)/libgomp/Makefile ] || exit 0 ; \
+ @[ -f $(TARGET_SUBDIR)/libgomp/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(NORMAL_TARGET_EXPORTS) \
- echo "Doing mostlyclean in $(TARGET_SUBDIR)/libgomp" ; \
+ echo "Doing mostlyclean in $(TARGET_SUBDIR)/libgomp"; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
@@ -43253,11 +46699,11 @@ maybe-clean-target-libgomp: clean-target-libgomp
clean-target-libgomp:
@: $(MAKE); $(unstage)
- @[ -f $(TARGET_SUBDIR)/libgomp/Makefile ] || exit 0 ; \
+ @[ -f $(TARGET_SUBDIR)/libgomp/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(NORMAL_TARGET_EXPORTS) \
- echo "Doing clean in $(TARGET_SUBDIR)/libgomp" ; \
+ echo "Doing clean in $(TARGET_SUBDIR)/libgomp"; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
@@ -43278,11 +46724,11 @@ maybe-distclean-target-libgomp: distclean-target-libgomp
distclean-target-libgomp:
@: $(MAKE); $(unstage)
- @[ -f $(TARGET_SUBDIR)/libgomp/Makefile ] || exit 0 ; \
+ @[ -f $(TARGET_SUBDIR)/libgomp/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(NORMAL_TARGET_EXPORTS) \
- echo "Doing distclean in $(TARGET_SUBDIR)/libgomp" ; \
+ echo "Doing distclean in $(TARGET_SUBDIR)/libgomp"; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
@@ -43303,11 +46749,11 @@ maybe-maintainer-clean-target-libgomp: maintainer-clean-target-libgomp
maintainer-clean-target-libgomp:
@: $(MAKE); $(unstage)
- @[ -f $(TARGET_SUBDIR)/libgomp/Makefile ] || exit 0 ; \
+ @[ -f $(TARGET_SUBDIR)/libgomp/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(NORMAL_TARGET_EXPORTS) \
- echo "Doing maintainer-clean in $(TARGET_SUBDIR)/libgomp" ; \
+ echo "Doing maintainer-clean in $(TARGET_SUBDIR)/libgomp"; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
@@ -43337,8 +46783,8 @@ configure-target-libitm:
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
echo "Checking multilib configuration for libitm..."; \
- $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libitm ; \
- $(CC_FOR_TARGET) --print-multi-lib > $(TARGET_SUBDIR)/libitm/multilib.tmp 2> /dev/null ; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libitm; \
+ $(CC_FOR_TARGET) --print-multi-lib > $(TARGET_SUBDIR)/libitm/multilib.tmp 2> /dev/null; \
if test -r $(TARGET_SUBDIR)/libitm/multilib.out; then \
if cmp -s $(TARGET_SUBDIR)/libitm/multilib.tmp $(TARGET_SUBDIR)/libitm/multilib.out; then \
rm -f $(TARGET_SUBDIR)/libitm/multilib.tmp; \
@@ -43350,7 +46796,7 @@ configure-target-libitm:
mv $(TARGET_SUBDIR)/libitm/multilib.tmp $(TARGET_SUBDIR)/libitm/multilib.out; \
fi; \
test ! -f $(TARGET_SUBDIR)/libitm/Makefile || exit 0; \
- $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libitm ; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libitm; \
$(NORMAL_TARGET_EXPORTS) \
echo Configuring in $(TARGET_SUBDIR)/libitm; \
cd "$(TARGET_SUBDIR)/libitm" || exit 1; \
@@ -43359,12 +46805,13 @@ configure-target-libitm:
*) topdir=`echo $(TARGET_SUBDIR)/libitm/ | \
sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
esac; \
- srcdiroption="--srcdir=$${topdir}/libitm"; \
- libsrcdir="$$s/libitm"; \
+ module_srcdir=libitm; \
rm -f no-such-file || : ; \
- CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure \
+ CONFIG_SITE=no-such-file $(SHELL) \
+ $$s/$$module_srcdir/configure \
+ --srcdir=$${topdir}/$$module_srcdir \
$(TARGET_CONFIGARGS) --build=${build_alias} --host=${target_alias} \
- --target=${target_alias} $${srcdiroption} \
+ --target=${target_alias} \
|| exit 1
@endif target-libitm
@@ -43449,11 +46896,11 @@ maybe-info-target-libitm: info-target-libitm
info-target-libitm: \
configure-target-libitm
@: $(MAKE); $(unstage)
- @[ -f $(TARGET_SUBDIR)/libitm/Makefile ] || exit 0 ; \
+ @[ -f $(TARGET_SUBDIR)/libitm/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(NORMAL_TARGET_EXPORTS) \
- echo "Doing info in $(TARGET_SUBDIR)/libitm" ; \
+ echo "Doing info in $(TARGET_SUBDIR)/libitm"; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
@@ -43475,11 +46922,11 @@ maybe-dvi-target-libitm: dvi-target-libitm
dvi-target-libitm: \
configure-target-libitm
@: $(MAKE); $(unstage)
- @[ -f $(TARGET_SUBDIR)/libitm/Makefile ] || exit 0 ; \
+ @[ -f $(TARGET_SUBDIR)/libitm/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(NORMAL_TARGET_EXPORTS) \
- echo "Doing dvi in $(TARGET_SUBDIR)/libitm" ; \
+ echo "Doing dvi in $(TARGET_SUBDIR)/libitm"; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
@@ -43501,11 +46948,11 @@ maybe-pdf-target-libitm: pdf-target-libitm
pdf-target-libitm: \
configure-target-libitm
@: $(MAKE); $(unstage)
- @[ -f $(TARGET_SUBDIR)/libitm/Makefile ] || exit 0 ; \
+ @[ -f $(TARGET_SUBDIR)/libitm/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(NORMAL_TARGET_EXPORTS) \
- echo "Doing pdf in $(TARGET_SUBDIR)/libitm" ; \
+ echo "Doing pdf in $(TARGET_SUBDIR)/libitm"; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
@@ -43527,11 +46974,11 @@ maybe-html-target-libitm: html-target-libitm
html-target-libitm: \
configure-target-libitm
@: $(MAKE); $(unstage)
- @[ -f $(TARGET_SUBDIR)/libitm/Makefile ] || exit 0 ; \
+ @[ -f $(TARGET_SUBDIR)/libitm/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(NORMAL_TARGET_EXPORTS) \
- echo "Doing html in $(TARGET_SUBDIR)/libitm" ; \
+ echo "Doing html in $(TARGET_SUBDIR)/libitm"; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
@@ -43553,11 +47000,11 @@ maybe-TAGS-target-libitm: TAGS-target-libitm
TAGS-target-libitm: \
configure-target-libitm
@: $(MAKE); $(unstage)
- @[ -f $(TARGET_SUBDIR)/libitm/Makefile ] || exit 0 ; \
+ @[ -f $(TARGET_SUBDIR)/libitm/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(NORMAL_TARGET_EXPORTS) \
- echo "Doing TAGS in $(TARGET_SUBDIR)/libitm" ; \
+ echo "Doing TAGS in $(TARGET_SUBDIR)/libitm"; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
@@ -43580,11 +47027,11 @@ install-info-target-libitm: \
configure-target-libitm \
info-target-libitm
@: $(MAKE); $(unstage)
- @[ -f $(TARGET_SUBDIR)/libitm/Makefile ] || exit 0 ; \
+ @[ -f $(TARGET_SUBDIR)/libitm/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(NORMAL_TARGET_EXPORTS) \
- echo "Doing install-info in $(TARGET_SUBDIR)/libitm" ; \
+ echo "Doing install-info in $(TARGET_SUBDIR)/libitm"; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
@@ -43607,11 +47054,11 @@ install-pdf-target-libitm: \
configure-target-libitm \
pdf-target-libitm
@: $(MAKE); $(unstage)
- @[ -f $(TARGET_SUBDIR)/libitm/Makefile ] || exit 0 ; \
+ @[ -f $(TARGET_SUBDIR)/libitm/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(NORMAL_TARGET_EXPORTS) \
- echo "Doing install-pdf in $(TARGET_SUBDIR)/libitm" ; \
+ echo "Doing install-pdf in $(TARGET_SUBDIR)/libitm"; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
@@ -43634,11 +47081,11 @@ install-html-target-libitm: \
configure-target-libitm \
html-target-libitm
@: $(MAKE); $(unstage)
- @[ -f $(TARGET_SUBDIR)/libitm/Makefile ] || exit 0 ; \
+ @[ -f $(TARGET_SUBDIR)/libitm/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(NORMAL_TARGET_EXPORTS) \
- echo "Doing install-html in $(TARGET_SUBDIR)/libitm" ; \
+ echo "Doing install-html in $(TARGET_SUBDIR)/libitm"; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
@@ -43660,11 +47107,11 @@ maybe-installcheck-target-libitm: installcheck-target-libitm
installcheck-target-libitm: \
configure-target-libitm
@: $(MAKE); $(unstage)
- @[ -f $(TARGET_SUBDIR)/libitm/Makefile ] || exit 0 ; \
+ @[ -f $(TARGET_SUBDIR)/libitm/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(NORMAL_TARGET_EXPORTS) \
- echo "Doing installcheck in $(TARGET_SUBDIR)/libitm" ; \
+ echo "Doing installcheck in $(TARGET_SUBDIR)/libitm"; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
@@ -43685,11 +47132,11 @@ maybe-mostlyclean-target-libitm: mostlyclean-target-libitm
mostlyclean-target-libitm:
@: $(MAKE); $(unstage)
- @[ -f $(TARGET_SUBDIR)/libitm/Makefile ] || exit 0 ; \
+ @[ -f $(TARGET_SUBDIR)/libitm/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(NORMAL_TARGET_EXPORTS) \
- echo "Doing mostlyclean in $(TARGET_SUBDIR)/libitm" ; \
+ echo "Doing mostlyclean in $(TARGET_SUBDIR)/libitm"; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
@@ -43710,11 +47157,11 @@ maybe-clean-target-libitm: clean-target-libitm
clean-target-libitm:
@: $(MAKE); $(unstage)
- @[ -f $(TARGET_SUBDIR)/libitm/Makefile ] || exit 0 ; \
+ @[ -f $(TARGET_SUBDIR)/libitm/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(NORMAL_TARGET_EXPORTS) \
- echo "Doing clean in $(TARGET_SUBDIR)/libitm" ; \
+ echo "Doing clean in $(TARGET_SUBDIR)/libitm"; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
@@ -43735,11 +47182,11 @@ maybe-distclean-target-libitm: distclean-target-libitm
distclean-target-libitm:
@: $(MAKE); $(unstage)
- @[ -f $(TARGET_SUBDIR)/libitm/Makefile ] || exit 0 ; \
+ @[ -f $(TARGET_SUBDIR)/libitm/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(NORMAL_TARGET_EXPORTS) \
- echo "Doing distclean in $(TARGET_SUBDIR)/libitm" ; \
+ echo "Doing distclean in $(TARGET_SUBDIR)/libitm"; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
@@ -43760,11 +47207,11 @@ maybe-maintainer-clean-target-libitm: maintainer-clean-target-libitm
maintainer-clean-target-libitm:
@: $(MAKE); $(unstage)
- @[ -f $(TARGET_SUBDIR)/libitm/Makefile ] || exit 0 ; \
+ @[ -f $(TARGET_SUBDIR)/libitm/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(NORMAL_TARGET_EXPORTS) \
- echo "Doing maintainer-clean in $(TARGET_SUBDIR)/libitm" ; \
+ echo "Doing maintainer-clean in $(TARGET_SUBDIR)/libitm"; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
@@ -43794,8 +47241,8 @@ configure-target-libatomic:
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
echo "Checking multilib configuration for libatomic..."; \
- $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libatomic ; \
- $(CC_FOR_TARGET) --print-multi-lib > $(TARGET_SUBDIR)/libatomic/multilib.tmp 2> /dev/null ; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libatomic; \
+ $(CC_FOR_TARGET) --print-multi-lib > $(TARGET_SUBDIR)/libatomic/multilib.tmp 2> /dev/null; \
if test -r $(TARGET_SUBDIR)/libatomic/multilib.out; then \
if cmp -s $(TARGET_SUBDIR)/libatomic/multilib.tmp $(TARGET_SUBDIR)/libatomic/multilib.out; then \
rm -f $(TARGET_SUBDIR)/libatomic/multilib.tmp; \
@@ -43807,7 +47254,7 @@ configure-target-libatomic:
mv $(TARGET_SUBDIR)/libatomic/multilib.tmp $(TARGET_SUBDIR)/libatomic/multilib.out; \
fi; \
test ! -f $(TARGET_SUBDIR)/libatomic/Makefile || exit 0; \
- $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libatomic ; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libatomic; \
$(NORMAL_TARGET_EXPORTS) \
echo Configuring in $(TARGET_SUBDIR)/libatomic; \
cd "$(TARGET_SUBDIR)/libatomic" || exit 1; \
@@ -43816,12 +47263,13 @@ configure-target-libatomic:
*) topdir=`echo $(TARGET_SUBDIR)/libatomic/ | \
sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
esac; \
- srcdiroption="--srcdir=$${topdir}/libatomic"; \
- libsrcdir="$$s/libatomic"; \
+ module_srcdir=libatomic; \
rm -f no-such-file || : ; \
- CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure \
+ CONFIG_SITE=no-such-file $(SHELL) \
+ $$s/$$module_srcdir/configure \
+ --srcdir=$${topdir}/$$module_srcdir \
$(TARGET_CONFIGARGS) --build=${build_alias} --host=${target_alias} \
- --target=${target_alias} $${srcdiroption} \
+ --target=${target_alias} \
|| exit 1
@endif target-libatomic
@@ -43906,11 +47354,11 @@ maybe-info-target-libatomic: info-target-libatomic
info-target-libatomic: \
configure-target-libatomic
@: $(MAKE); $(unstage)
- @[ -f $(TARGET_SUBDIR)/libatomic/Makefile ] || exit 0 ; \
+ @[ -f $(TARGET_SUBDIR)/libatomic/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(NORMAL_TARGET_EXPORTS) \
- echo "Doing info in $(TARGET_SUBDIR)/libatomic" ; \
+ echo "Doing info in $(TARGET_SUBDIR)/libatomic"; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
@@ -43932,11 +47380,11 @@ maybe-dvi-target-libatomic: dvi-target-libatomic
dvi-target-libatomic: \
configure-target-libatomic
@: $(MAKE); $(unstage)
- @[ -f $(TARGET_SUBDIR)/libatomic/Makefile ] || exit 0 ; \
+ @[ -f $(TARGET_SUBDIR)/libatomic/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(NORMAL_TARGET_EXPORTS) \
- echo "Doing dvi in $(TARGET_SUBDIR)/libatomic" ; \
+ echo "Doing dvi in $(TARGET_SUBDIR)/libatomic"; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
@@ -43958,11 +47406,11 @@ maybe-pdf-target-libatomic: pdf-target-libatomic
pdf-target-libatomic: \
configure-target-libatomic
@: $(MAKE); $(unstage)
- @[ -f $(TARGET_SUBDIR)/libatomic/Makefile ] || exit 0 ; \
+ @[ -f $(TARGET_SUBDIR)/libatomic/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(NORMAL_TARGET_EXPORTS) \
- echo "Doing pdf in $(TARGET_SUBDIR)/libatomic" ; \
+ echo "Doing pdf in $(TARGET_SUBDIR)/libatomic"; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
@@ -43984,11 +47432,11 @@ maybe-html-target-libatomic: html-target-libatomic
html-target-libatomic: \
configure-target-libatomic
@: $(MAKE); $(unstage)
- @[ -f $(TARGET_SUBDIR)/libatomic/Makefile ] || exit 0 ; \
+ @[ -f $(TARGET_SUBDIR)/libatomic/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(NORMAL_TARGET_EXPORTS) \
- echo "Doing html in $(TARGET_SUBDIR)/libatomic" ; \
+ echo "Doing html in $(TARGET_SUBDIR)/libatomic"; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
@@ -44010,11 +47458,11 @@ maybe-TAGS-target-libatomic: TAGS-target-libatomic
TAGS-target-libatomic: \
configure-target-libatomic
@: $(MAKE); $(unstage)
- @[ -f $(TARGET_SUBDIR)/libatomic/Makefile ] || exit 0 ; \
+ @[ -f $(TARGET_SUBDIR)/libatomic/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(NORMAL_TARGET_EXPORTS) \
- echo "Doing TAGS in $(TARGET_SUBDIR)/libatomic" ; \
+ echo "Doing TAGS in $(TARGET_SUBDIR)/libatomic"; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
@@ -44037,11 +47485,11 @@ install-info-target-libatomic: \
configure-target-libatomic \
info-target-libatomic
@: $(MAKE); $(unstage)
- @[ -f $(TARGET_SUBDIR)/libatomic/Makefile ] || exit 0 ; \
+ @[ -f $(TARGET_SUBDIR)/libatomic/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(NORMAL_TARGET_EXPORTS) \
- echo "Doing install-info in $(TARGET_SUBDIR)/libatomic" ; \
+ echo "Doing install-info in $(TARGET_SUBDIR)/libatomic"; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
@@ -44064,11 +47512,11 @@ install-pdf-target-libatomic: \
configure-target-libatomic \
pdf-target-libatomic
@: $(MAKE); $(unstage)
- @[ -f $(TARGET_SUBDIR)/libatomic/Makefile ] || exit 0 ; \
+ @[ -f $(TARGET_SUBDIR)/libatomic/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(NORMAL_TARGET_EXPORTS) \
- echo "Doing install-pdf in $(TARGET_SUBDIR)/libatomic" ; \
+ echo "Doing install-pdf in $(TARGET_SUBDIR)/libatomic"; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
@@ -44091,11 +47539,11 @@ install-html-target-libatomic: \
configure-target-libatomic \
html-target-libatomic
@: $(MAKE); $(unstage)
- @[ -f $(TARGET_SUBDIR)/libatomic/Makefile ] || exit 0 ; \
+ @[ -f $(TARGET_SUBDIR)/libatomic/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(NORMAL_TARGET_EXPORTS) \
- echo "Doing install-html in $(TARGET_SUBDIR)/libatomic" ; \
+ echo "Doing install-html in $(TARGET_SUBDIR)/libatomic"; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
@@ -44117,11 +47565,11 @@ maybe-installcheck-target-libatomic: installcheck-target-libatomic
installcheck-target-libatomic: \
configure-target-libatomic
@: $(MAKE); $(unstage)
- @[ -f $(TARGET_SUBDIR)/libatomic/Makefile ] || exit 0 ; \
+ @[ -f $(TARGET_SUBDIR)/libatomic/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(NORMAL_TARGET_EXPORTS) \
- echo "Doing installcheck in $(TARGET_SUBDIR)/libatomic" ; \
+ echo "Doing installcheck in $(TARGET_SUBDIR)/libatomic"; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
@@ -44142,11 +47590,11 @@ maybe-mostlyclean-target-libatomic: mostlyclean-target-libatomic
mostlyclean-target-libatomic:
@: $(MAKE); $(unstage)
- @[ -f $(TARGET_SUBDIR)/libatomic/Makefile ] || exit 0 ; \
+ @[ -f $(TARGET_SUBDIR)/libatomic/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(NORMAL_TARGET_EXPORTS) \
- echo "Doing mostlyclean in $(TARGET_SUBDIR)/libatomic" ; \
+ echo "Doing mostlyclean in $(TARGET_SUBDIR)/libatomic"; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
@@ -44167,11 +47615,11 @@ maybe-clean-target-libatomic: clean-target-libatomic
clean-target-libatomic:
@: $(MAKE); $(unstage)
- @[ -f $(TARGET_SUBDIR)/libatomic/Makefile ] || exit 0 ; \
+ @[ -f $(TARGET_SUBDIR)/libatomic/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(NORMAL_TARGET_EXPORTS) \
- echo "Doing clean in $(TARGET_SUBDIR)/libatomic" ; \
+ echo "Doing clean in $(TARGET_SUBDIR)/libatomic"; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
@@ -44192,11 +47640,11 @@ maybe-distclean-target-libatomic: distclean-target-libatomic
distclean-target-libatomic:
@: $(MAKE); $(unstage)
- @[ -f $(TARGET_SUBDIR)/libatomic/Makefile ] || exit 0 ; \
+ @[ -f $(TARGET_SUBDIR)/libatomic/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(NORMAL_TARGET_EXPORTS) \
- echo "Doing distclean in $(TARGET_SUBDIR)/libatomic" ; \
+ echo "Doing distclean in $(TARGET_SUBDIR)/libatomic"; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
@@ -44217,11 +47665,11 @@ maybe-maintainer-clean-target-libatomic: maintainer-clean-target-libatomic
maintainer-clean-target-libatomic:
@: $(MAKE); $(unstage)
- @[ -f $(TARGET_SUBDIR)/libatomic/Makefile ] || exit 0 ; \
+ @[ -f $(TARGET_SUBDIR)/libatomic/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(NORMAL_TARGET_EXPORTS) \
- echo "Doing maintainer-clean in $(TARGET_SUBDIR)/libatomic" ; \
+ echo "Doing maintainer-clean in $(TARGET_SUBDIR)/libatomic"; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
@@ -44237,13 +47685,6 @@ maintainer-clean-target-libatomic:
-@if target-libmudflap
-.PHONY: check-target-libmudflap-c++
-check-target-libmudflap-c++:
- $(MAKE) RUNTESTFLAGS="$(RUNTESTFLAGS) c++frags.exp" check-target-libmudflap
-
-@endif target-libmudflap
-
@if target-libgomp
.PHONY: check-target-libgomp-c++
check-target-libgomp-c++:
@@ -44271,7 +47712,7 @@ cross: all-build all-gas all-ld
echo "Building the C and C++ compiler"; \
cd gcc && $(MAKE) $(GCC_FLAGS_TO_PASS) LANGUAGES="c c++"
@r=`${PWD_COMMAND}`; export r; \
- s=`cd $(srcdir); ${PWD_COMMAND}` ; export s; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
echo "Building runtime libraries"; \
$(MAKE) $(RECURSE_FLAGS_TO_PASS) LANGUAGES="c c++" all
@endif gcc-no-bootstrap
@@ -44292,7 +47733,7 @@ check-gcc-c++:
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(HOST_EXPORTS) \
(cd gcc && $(MAKE) $(GCC_FLAGS_TO_PASS) check-c++);
-check-c++: check-gcc-c++ check-target-libstdc++-v3 check-target-libmudflap-c++ check-target-libitm-c++ check-target-libgomp-c++
+check-c++: check-gcc-c++ check-target-libstdc++-v3 check-target-libitm-c++ check-target-libgomp-c++
.PHONY: check-gcc-fortran check-fortran
check-gcc-fortran:
@@ -44411,216 +47852,236 @@ objext = .o
stage1-start::
@: $(MAKE); $(stage); \
- echo stage1 > stage_current ; \
+ echo stage1 > stage_current; \
echo stage1 > stage_last; \
$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)
@if bfd
@cd $(HOST_SUBDIR); [ -d stage1-bfd ] || \
mkdir stage1-bfd; \
- mv stage1-bfd bfd
+ mv stage1-bfd bfd
@endif bfd
@if opcodes
@cd $(HOST_SUBDIR); [ -d stage1-opcodes ] || \
mkdir stage1-opcodes; \
- mv stage1-opcodes opcodes
+ mv stage1-opcodes opcodes
@endif opcodes
@if binutils
@cd $(HOST_SUBDIR); [ -d stage1-binutils ] || \
mkdir stage1-binutils; \
- mv stage1-binutils binutils
+ mv stage1-binutils binutils
@endif binutils
+@if fixincludes
+ @cd $(HOST_SUBDIR); [ -d stage1-fixincludes ] || \
+ mkdir stage1-fixincludes; \
+ mv stage1-fixincludes fixincludes
+@endif fixincludes
@if gas
@cd $(HOST_SUBDIR); [ -d stage1-gas ] || \
mkdir stage1-gas; \
- mv stage1-gas gas
+ mv stage1-gas gas
@endif gas
@if gcc
@cd $(HOST_SUBDIR); [ -d stage1-gcc ] || \
mkdir stage1-gcc; \
- mv stage1-gcc gcc
+ mv stage1-gcc gcc
@endif gcc
@if gmp
@cd $(HOST_SUBDIR); [ -d stage1-gmp ] || \
mkdir stage1-gmp; \
- mv stage1-gmp gmp
+ mv stage1-gmp gmp
@endif gmp
@if mpfr
@cd $(HOST_SUBDIR); [ -d stage1-mpfr ] || \
mkdir stage1-mpfr; \
- mv stage1-mpfr mpfr
+ mv stage1-mpfr mpfr
@endif mpfr
@if mpc
@cd $(HOST_SUBDIR); [ -d stage1-mpc ] || \
mkdir stage1-mpc; \
- mv stage1-mpc mpc
+ mv stage1-mpc mpc
@endif mpc
@if isl
@cd $(HOST_SUBDIR); [ -d stage1-isl ] || \
mkdir stage1-isl; \
- mv stage1-isl isl
+ mv stage1-isl isl
@endif isl
-@if cloog
- @cd $(HOST_SUBDIR); [ -d stage1-cloog ] || \
- mkdir stage1-cloog; \
- mv stage1-cloog cloog
-@endif cloog
@if libelf
@cd $(HOST_SUBDIR); [ -d stage1-libelf ] || \
mkdir stage1-libelf; \
- mv stage1-libelf libelf
+ mv stage1-libelf libelf
@endif libelf
@if gold
@cd $(HOST_SUBDIR); [ -d stage1-gold ] || \
mkdir stage1-gold; \
- mv stage1-gold gold
+ mv stage1-gold gold
@endif gold
@if intl
@cd $(HOST_SUBDIR); [ -d stage1-intl ] || \
mkdir stage1-intl; \
- mv stage1-intl intl
+ mv stage1-intl intl
@endif intl
@if ld
@cd $(HOST_SUBDIR); [ -d stage1-ld ] || \
mkdir stage1-ld; \
- mv stage1-ld ld
+ mv stage1-ld ld
@endif ld
@if libbacktrace
@cd $(HOST_SUBDIR); [ -d stage1-libbacktrace ] || \
mkdir stage1-libbacktrace; \
- mv stage1-libbacktrace libbacktrace
+ mv stage1-libbacktrace libbacktrace
@endif libbacktrace
@if libcpp
@cd $(HOST_SUBDIR); [ -d stage1-libcpp ] || \
mkdir stage1-libcpp; \
- mv stage1-libcpp libcpp
+ mv stage1-libcpp libcpp
@endif libcpp
@if libdecnumber
@cd $(HOST_SUBDIR); [ -d stage1-libdecnumber ] || \
mkdir stage1-libdecnumber; \
- mv stage1-libdecnumber libdecnumber
+ mv stage1-libdecnumber libdecnumber
@endif libdecnumber
@if libiberty
@cd $(HOST_SUBDIR); [ -d stage1-libiberty ] || \
mkdir stage1-libiberty; \
- mv stage1-libiberty libiberty
+ mv stage1-libiberty libiberty
@endif libiberty
+@if libiberty-linker-plugin
+ @cd $(HOST_SUBDIR); [ -d stage1-libiberty-linker-plugin ] || \
+ mkdir stage1-libiberty-linker-plugin; \
+ mv stage1-libiberty-linker-plugin libiberty-linker-plugin
+@endif libiberty-linker-plugin
+@if libiconv
+ @cd $(HOST_SUBDIR); [ -d stage1-libiconv ] || \
+ mkdir stage1-libiconv; \
+ mv stage1-libiconv libiconv
+@endif libiconv
@if zlib
@cd $(HOST_SUBDIR); [ -d stage1-zlib ] || \
mkdir stage1-zlib; \
- mv stage1-zlib zlib
+ mv stage1-zlib zlib
@endif zlib
@if lto-plugin
@cd $(HOST_SUBDIR); [ -d stage1-lto-plugin ] || \
mkdir stage1-lto-plugin; \
- mv stage1-lto-plugin lto-plugin
+ mv stage1-lto-plugin lto-plugin
@endif lto-plugin
@[ -d stage1-$(TARGET_SUBDIR) ] || \
mkdir stage1-$(TARGET_SUBDIR); \
- mv stage1-$(TARGET_SUBDIR) $(TARGET_SUBDIR)
+ mv stage1-$(TARGET_SUBDIR) $(TARGET_SUBDIR)
stage1-end::
@if bfd
- @if test -d $(HOST_SUBDIR)/bfd ; then \
- cd $(HOST_SUBDIR); mv bfd stage1-bfd ; \
+ @if test -d $(HOST_SUBDIR)/bfd; then \
+ cd $(HOST_SUBDIR); mv bfd stage1-bfd; \
fi
@endif bfd
@if opcodes
- @if test -d $(HOST_SUBDIR)/opcodes ; then \
- cd $(HOST_SUBDIR); mv opcodes stage1-opcodes ; \
+ @if test -d $(HOST_SUBDIR)/opcodes; then \
+ cd $(HOST_SUBDIR); mv opcodes stage1-opcodes; \
fi
@endif opcodes
@if binutils
- @if test -d $(HOST_SUBDIR)/binutils ; then \
- cd $(HOST_SUBDIR); mv binutils stage1-binutils ; \
+ @if test -d $(HOST_SUBDIR)/binutils; then \
+ cd $(HOST_SUBDIR); mv binutils stage1-binutils; \
fi
@endif binutils
+@if fixincludes
+ @if test -d $(HOST_SUBDIR)/fixincludes; then \
+ cd $(HOST_SUBDIR); mv fixincludes stage1-fixincludes; \
+ fi
+@endif fixincludes
@if gas
- @if test -d $(HOST_SUBDIR)/gas ; then \
- cd $(HOST_SUBDIR); mv gas stage1-gas ; \
+ @if test -d $(HOST_SUBDIR)/gas; then \
+ cd $(HOST_SUBDIR); mv gas stage1-gas; \
fi
@endif gas
@if gcc
- @if test -d $(HOST_SUBDIR)/gcc ; then \
- cd $(HOST_SUBDIR); mv gcc stage1-gcc ; \
+ @if test -d $(HOST_SUBDIR)/gcc; then \
+ cd $(HOST_SUBDIR); mv gcc stage1-gcc; \
fi
@endif gcc
@if gmp
- @if test -d $(HOST_SUBDIR)/gmp ; then \
- cd $(HOST_SUBDIR); mv gmp stage1-gmp ; \
+ @if test -d $(HOST_SUBDIR)/gmp; then \
+ cd $(HOST_SUBDIR); mv gmp stage1-gmp; \
fi
@endif gmp
@if mpfr
- @if test -d $(HOST_SUBDIR)/mpfr ; then \
- cd $(HOST_SUBDIR); mv mpfr stage1-mpfr ; \
+ @if test -d $(HOST_SUBDIR)/mpfr; then \
+ cd $(HOST_SUBDIR); mv mpfr stage1-mpfr; \
fi
@endif mpfr
@if mpc
- @if test -d $(HOST_SUBDIR)/mpc ; then \
- cd $(HOST_SUBDIR); mv mpc stage1-mpc ; \
+ @if test -d $(HOST_SUBDIR)/mpc; then \
+ cd $(HOST_SUBDIR); mv mpc stage1-mpc; \
fi
@endif mpc
@if isl
- @if test -d $(HOST_SUBDIR)/isl ; then \
- cd $(HOST_SUBDIR); mv isl stage1-isl ; \
+ @if test -d $(HOST_SUBDIR)/isl; then \
+ cd $(HOST_SUBDIR); mv isl stage1-isl; \
fi
@endif isl
-@if cloog
- @if test -d $(HOST_SUBDIR)/cloog ; then \
- cd $(HOST_SUBDIR); mv cloog stage1-cloog ; \
- fi
-@endif cloog
@if libelf
- @if test -d $(HOST_SUBDIR)/libelf ; then \
- cd $(HOST_SUBDIR); mv libelf stage1-libelf ; \
+ @if test -d $(HOST_SUBDIR)/libelf; then \
+ cd $(HOST_SUBDIR); mv libelf stage1-libelf; \
fi
@endif libelf
@if gold
- @if test -d $(HOST_SUBDIR)/gold ; then \
- cd $(HOST_SUBDIR); mv gold stage1-gold ; \
+ @if test -d $(HOST_SUBDIR)/gold; then \
+ cd $(HOST_SUBDIR); mv gold stage1-gold; \
fi
@endif gold
@if intl
- @if test -d $(HOST_SUBDIR)/intl ; then \
- cd $(HOST_SUBDIR); mv intl stage1-intl ; \
+ @if test -d $(HOST_SUBDIR)/intl; then \
+ cd $(HOST_SUBDIR); mv intl stage1-intl; \
fi
@endif intl
@if ld
- @if test -d $(HOST_SUBDIR)/ld ; then \
- cd $(HOST_SUBDIR); mv ld stage1-ld ; \
+ @if test -d $(HOST_SUBDIR)/ld; then \
+ cd $(HOST_SUBDIR); mv ld stage1-ld; \
fi
@endif ld
@if libbacktrace
- @if test -d $(HOST_SUBDIR)/libbacktrace ; then \
- cd $(HOST_SUBDIR); mv libbacktrace stage1-libbacktrace ; \
+ @if test -d $(HOST_SUBDIR)/libbacktrace; then \
+ cd $(HOST_SUBDIR); mv libbacktrace stage1-libbacktrace; \
fi
@endif libbacktrace
@if libcpp
- @if test -d $(HOST_SUBDIR)/libcpp ; then \
- cd $(HOST_SUBDIR); mv libcpp stage1-libcpp ; \
+ @if test -d $(HOST_SUBDIR)/libcpp; then \
+ cd $(HOST_SUBDIR); mv libcpp stage1-libcpp; \
fi
@endif libcpp
@if libdecnumber
- @if test -d $(HOST_SUBDIR)/libdecnumber ; then \
- cd $(HOST_SUBDIR); mv libdecnumber stage1-libdecnumber ; \
+ @if test -d $(HOST_SUBDIR)/libdecnumber; then \
+ cd $(HOST_SUBDIR); mv libdecnumber stage1-libdecnumber; \
fi
@endif libdecnumber
@if libiberty
- @if test -d $(HOST_SUBDIR)/libiberty ; then \
- cd $(HOST_SUBDIR); mv libiberty stage1-libiberty ; \
+ @if test -d $(HOST_SUBDIR)/libiberty; then \
+ cd $(HOST_SUBDIR); mv libiberty stage1-libiberty; \
fi
@endif libiberty
+@if libiberty-linker-plugin
+ @if test -d $(HOST_SUBDIR)/libiberty-linker-plugin; then \
+ cd $(HOST_SUBDIR); mv libiberty-linker-plugin stage1-libiberty-linker-plugin; \
+ fi
+@endif libiberty-linker-plugin
+@if libiconv
+ @if test -d $(HOST_SUBDIR)/libiconv; then \
+ cd $(HOST_SUBDIR); mv libiconv stage1-libiconv; \
+ fi
+@endif libiconv
@if zlib
- @if test -d $(HOST_SUBDIR)/zlib ; then \
- cd $(HOST_SUBDIR); mv zlib stage1-zlib ; \
+ @if test -d $(HOST_SUBDIR)/zlib; then \
+ cd $(HOST_SUBDIR); mv zlib stage1-zlib; \
fi
@endif zlib
@if lto-plugin
- @if test -d $(HOST_SUBDIR)/lto-plugin ; then \
- cd $(HOST_SUBDIR); mv lto-plugin stage1-lto-plugin ; \
+ @if test -d $(HOST_SUBDIR)/lto-plugin; then \
+ cd $(HOST_SUBDIR); mv lto-plugin stage1-lto-plugin; \
fi
@endif lto-plugin
- @if test -d $(TARGET_SUBDIR) ; then \
- mv $(TARGET_SUBDIR) stage1-$(TARGET_SUBDIR) ; \
+ @if test -d $(TARGET_SUBDIR); then \
+ mv $(TARGET_SUBDIR) stage1-$(TARGET_SUBDIR); \
fi
rm -f stage_current
@@ -44631,8 +48092,8 @@ stage1-end::
stage1-bubble::
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- if test -f stage1-lean ; then \
- echo Skipping rebuild of stage1 ; \
+ if test -f stage1-lean ; then \
+ echo Skipping rebuild of stage1; \
else \
$(MAKE) stage1-start; \
$(MAKE) $(RECURSE_FLAGS_TO_PASS) all-stage1; \
@@ -44664,258 +48125,282 @@ distclean-stage1::
stage2-start::
@: $(MAKE); $(stage); \
- echo stage2 > stage_current ; \
+ echo stage2 > stage_current; \
echo stage2 > stage_last; \
$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)
@if bfd
@cd $(HOST_SUBDIR); [ -d stage2-bfd ] || \
mkdir stage2-bfd; \
- mv stage2-bfd bfd ; \
+ mv stage2-bfd bfd; \
mv stage1-bfd prev-bfd || test -f stage1-lean
@endif bfd
@if opcodes
@cd $(HOST_SUBDIR); [ -d stage2-opcodes ] || \
mkdir stage2-opcodes; \
- mv stage2-opcodes opcodes ; \
+ mv stage2-opcodes opcodes; \
mv stage1-opcodes prev-opcodes || test -f stage1-lean
@endif opcodes
@if binutils
@cd $(HOST_SUBDIR); [ -d stage2-binutils ] || \
mkdir stage2-binutils; \
- mv stage2-binutils binutils ; \
+ mv stage2-binutils binutils; \
mv stage1-binutils prev-binutils || test -f stage1-lean
@endif binutils
+@if fixincludes
+ @cd $(HOST_SUBDIR); [ -d stage2-fixincludes ] || \
+ mkdir stage2-fixincludes; \
+ mv stage2-fixincludes fixincludes; \
+ mv stage1-fixincludes prev-fixincludes || test -f stage1-lean
+@endif fixincludes
@if gas
@cd $(HOST_SUBDIR); [ -d stage2-gas ] || \
mkdir stage2-gas; \
- mv stage2-gas gas ; \
+ mv stage2-gas gas; \
mv stage1-gas prev-gas || test -f stage1-lean
@endif gas
@if gcc
@cd $(HOST_SUBDIR); [ -d stage2-gcc ] || \
mkdir stage2-gcc; \
- mv stage2-gcc gcc ; \
+ mv stage2-gcc gcc; \
mv stage1-gcc prev-gcc || test -f stage1-lean
@endif gcc
@if gmp
@cd $(HOST_SUBDIR); [ -d stage2-gmp ] || \
mkdir stage2-gmp; \
- mv stage2-gmp gmp ; \
+ mv stage2-gmp gmp; \
mv stage1-gmp prev-gmp || test -f stage1-lean
@endif gmp
@if mpfr
@cd $(HOST_SUBDIR); [ -d stage2-mpfr ] || \
mkdir stage2-mpfr; \
- mv stage2-mpfr mpfr ; \
+ mv stage2-mpfr mpfr; \
mv stage1-mpfr prev-mpfr || test -f stage1-lean
@endif mpfr
@if mpc
@cd $(HOST_SUBDIR); [ -d stage2-mpc ] || \
mkdir stage2-mpc; \
- mv stage2-mpc mpc ; \
+ mv stage2-mpc mpc; \
mv stage1-mpc prev-mpc || test -f stage1-lean
@endif mpc
@if isl
@cd $(HOST_SUBDIR); [ -d stage2-isl ] || \
mkdir stage2-isl; \
- mv stage2-isl isl ; \
+ mv stage2-isl isl; \
mv stage1-isl prev-isl || test -f stage1-lean
@endif isl
-@if cloog
- @cd $(HOST_SUBDIR); [ -d stage2-cloog ] || \
- mkdir stage2-cloog; \
- mv stage2-cloog cloog ; \
- mv stage1-cloog prev-cloog || test -f stage1-lean
-@endif cloog
@if libelf
@cd $(HOST_SUBDIR); [ -d stage2-libelf ] || \
mkdir stage2-libelf; \
- mv stage2-libelf libelf ; \
+ mv stage2-libelf libelf; \
mv stage1-libelf prev-libelf || test -f stage1-lean
@endif libelf
@if gold
@cd $(HOST_SUBDIR); [ -d stage2-gold ] || \
mkdir stage2-gold; \
- mv stage2-gold gold ; \
+ mv stage2-gold gold; \
mv stage1-gold prev-gold || test -f stage1-lean
@endif gold
@if intl
@cd $(HOST_SUBDIR); [ -d stage2-intl ] || \
mkdir stage2-intl; \
- mv stage2-intl intl ; \
+ mv stage2-intl intl; \
mv stage1-intl prev-intl || test -f stage1-lean
@endif intl
@if ld
@cd $(HOST_SUBDIR); [ -d stage2-ld ] || \
mkdir stage2-ld; \
- mv stage2-ld ld ; \
+ mv stage2-ld ld; \
mv stage1-ld prev-ld || test -f stage1-lean
@endif ld
@if libbacktrace
@cd $(HOST_SUBDIR); [ -d stage2-libbacktrace ] || \
mkdir stage2-libbacktrace; \
- mv stage2-libbacktrace libbacktrace ; \
+ mv stage2-libbacktrace libbacktrace; \
mv stage1-libbacktrace prev-libbacktrace || test -f stage1-lean
@endif libbacktrace
@if libcpp
@cd $(HOST_SUBDIR); [ -d stage2-libcpp ] || \
mkdir stage2-libcpp; \
- mv stage2-libcpp libcpp ; \
+ mv stage2-libcpp libcpp; \
mv stage1-libcpp prev-libcpp || test -f stage1-lean
@endif libcpp
@if libdecnumber
@cd $(HOST_SUBDIR); [ -d stage2-libdecnumber ] || \
mkdir stage2-libdecnumber; \
- mv stage2-libdecnumber libdecnumber ; \
+ mv stage2-libdecnumber libdecnumber; \
mv stage1-libdecnumber prev-libdecnumber || test -f stage1-lean
@endif libdecnumber
@if libiberty
@cd $(HOST_SUBDIR); [ -d stage2-libiberty ] || \
mkdir stage2-libiberty; \
- mv stage2-libiberty libiberty ; \
+ mv stage2-libiberty libiberty; \
mv stage1-libiberty prev-libiberty || test -f stage1-lean
@endif libiberty
+@if libiberty-linker-plugin
+ @cd $(HOST_SUBDIR); [ -d stage2-libiberty-linker-plugin ] || \
+ mkdir stage2-libiberty-linker-plugin; \
+ mv stage2-libiberty-linker-plugin libiberty-linker-plugin; \
+ mv stage1-libiberty-linker-plugin prev-libiberty-linker-plugin || test -f stage1-lean
+@endif libiberty-linker-plugin
+@if libiconv
+ @cd $(HOST_SUBDIR); [ -d stage2-libiconv ] || \
+ mkdir stage2-libiconv; \
+ mv stage2-libiconv libiconv; \
+ mv stage1-libiconv prev-libiconv || test -f stage1-lean
+@endif libiconv
@if zlib
@cd $(HOST_SUBDIR); [ -d stage2-zlib ] || \
mkdir stage2-zlib; \
- mv stage2-zlib zlib ; \
+ mv stage2-zlib zlib; \
mv stage1-zlib prev-zlib || test -f stage1-lean
@endif zlib
@if lto-plugin
@cd $(HOST_SUBDIR); [ -d stage2-lto-plugin ] || \
mkdir stage2-lto-plugin; \
- mv stage2-lto-plugin lto-plugin ; \
+ mv stage2-lto-plugin lto-plugin; \
mv stage1-lto-plugin prev-lto-plugin || test -f stage1-lean
@endif lto-plugin
@[ -d stage2-$(TARGET_SUBDIR) ] || \
mkdir stage2-$(TARGET_SUBDIR); \
- mv stage2-$(TARGET_SUBDIR) $(TARGET_SUBDIR) ; \
+ mv stage2-$(TARGET_SUBDIR) $(TARGET_SUBDIR); \
mv stage1-$(TARGET_SUBDIR) prev-$(TARGET_SUBDIR) || test -f stage1-lean
stage2-end::
@if bfd
- @if test -d $(HOST_SUBDIR)/bfd ; then \
- cd $(HOST_SUBDIR); mv bfd stage2-bfd ; \
- mv prev-bfd stage1-bfd ; : ; \
+ @if test -d $(HOST_SUBDIR)/bfd; then \
+ cd $(HOST_SUBDIR); mv bfd stage2-bfd; \
+ mv prev-bfd stage1-bfd; : ; \
fi
@endif bfd
@if opcodes
- @if test -d $(HOST_SUBDIR)/opcodes ; then \
- cd $(HOST_SUBDIR); mv opcodes stage2-opcodes ; \
- mv prev-opcodes stage1-opcodes ; : ; \
+ @if test -d $(HOST_SUBDIR)/opcodes; then \
+ cd $(HOST_SUBDIR); mv opcodes stage2-opcodes; \
+ mv prev-opcodes stage1-opcodes; : ; \
fi
@endif opcodes
@if binutils
- @if test -d $(HOST_SUBDIR)/binutils ; then \
- cd $(HOST_SUBDIR); mv binutils stage2-binutils ; \
- mv prev-binutils stage1-binutils ; : ; \
+ @if test -d $(HOST_SUBDIR)/binutils; then \
+ cd $(HOST_SUBDIR); mv binutils stage2-binutils; \
+ mv prev-binutils stage1-binutils; : ; \
fi
@endif binutils
+@if fixincludes
+ @if test -d $(HOST_SUBDIR)/fixincludes; then \
+ cd $(HOST_SUBDIR); mv fixincludes stage2-fixincludes; \
+ mv prev-fixincludes stage1-fixincludes; : ; \
+ fi
+@endif fixincludes
@if gas
- @if test -d $(HOST_SUBDIR)/gas ; then \
- cd $(HOST_SUBDIR); mv gas stage2-gas ; \
- mv prev-gas stage1-gas ; : ; \
+ @if test -d $(HOST_SUBDIR)/gas; then \
+ cd $(HOST_SUBDIR); mv gas stage2-gas; \
+ mv prev-gas stage1-gas; : ; \
fi
@endif gas
@if gcc
- @if test -d $(HOST_SUBDIR)/gcc ; then \
- cd $(HOST_SUBDIR); mv gcc stage2-gcc ; \
- mv prev-gcc stage1-gcc ; : ; \
+ @if test -d $(HOST_SUBDIR)/gcc; then \
+ cd $(HOST_SUBDIR); mv gcc stage2-gcc; \
+ mv prev-gcc stage1-gcc; : ; \
fi
@endif gcc
@if gmp
- @if test -d $(HOST_SUBDIR)/gmp ; then \
- cd $(HOST_SUBDIR); mv gmp stage2-gmp ; \
- mv prev-gmp stage1-gmp ; : ; \
+ @if test -d $(HOST_SUBDIR)/gmp; then \
+ cd $(HOST_SUBDIR); mv gmp stage2-gmp; \
+ mv prev-gmp stage1-gmp; : ; \
fi
@endif gmp
@if mpfr
- @if test -d $(HOST_SUBDIR)/mpfr ; then \
- cd $(HOST_SUBDIR); mv mpfr stage2-mpfr ; \
- mv prev-mpfr stage1-mpfr ; : ; \
+ @if test -d $(HOST_SUBDIR)/mpfr; then \
+ cd $(HOST_SUBDIR); mv mpfr stage2-mpfr; \
+ mv prev-mpfr stage1-mpfr; : ; \
fi
@endif mpfr
@if mpc
- @if test -d $(HOST_SUBDIR)/mpc ; then \
- cd $(HOST_SUBDIR); mv mpc stage2-mpc ; \
- mv prev-mpc stage1-mpc ; : ; \
+ @if test -d $(HOST_SUBDIR)/mpc; then \
+ cd $(HOST_SUBDIR); mv mpc stage2-mpc; \
+ mv prev-mpc stage1-mpc; : ; \
fi
@endif mpc
@if isl
- @if test -d $(HOST_SUBDIR)/isl ; then \
- cd $(HOST_SUBDIR); mv isl stage2-isl ; \
- mv prev-isl stage1-isl ; : ; \
+ @if test -d $(HOST_SUBDIR)/isl; then \
+ cd $(HOST_SUBDIR); mv isl stage2-isl; \
+ mv prev-isl stage1-isl; : ; \
fi
@endif isl
-@if cloog
- @if test -d $(HOST_SUBDIR)/cloog ; then \
- cd $(HOST_SUBDIR); mv cloog stage2-cloog ; \
- mv prev-cloog stage1-cloog ; : ; \
- fi
-@endif cloog
@if libelf
- @if test -d $(HOST_SUBDIR)/libelf ; then \
- cd $(HOST_SUBDIR); mv libelf stage2-libelf ; \
- mv prev-libelf stage1-libelf ; : ; \
+ @if test -d $(HOST_SUBDIR)/libelf; then \
+ cd $(HOST_SUBDIR); mv libelf stage2-libelf; \
+ mv prev-libelf stage1-libelf; : ; \
fi
@endif libelf
@if gold
- @if test -d $(HOST_SUBDIR)/gold ; then \
- cd $(HOST_SUBDIR); mv gold stage2-gold ; \
- mv prev-gold stage1-gold ; : ; \
+ @if test -d $(HOST_SUBDIR)/gold; then \
+ cd $(HOST_SUBDIR); mv gold stage2-gold; \
+ mv prev-gold stage1-gold; : ; \
fi
@endif gold
@if intl
- @if test -d $(HOST_SUBDIR)/intl ; then \
- cd $(HOST_SUBDIR); mv intl stage2-intl ; \
- mv prev-intl stage1-intl ; : ; \
+ @if test -d $(HOST_SUBDIR)/intl; then \
+ cd $(HOST_SUBDIR); mv intl stage2-intl; \
+ mv prev-intl stage1-intl; : ; \
fi
@endif intl
@if ld
- @if test -d $(HOST_SUBDIR)/ld ; then \
- cd $(HOST_SUBDIR); mv ld stage2-ld ; \
- mv prev-ld stage1-ld ; : ; \
+ @if test -d $(HOST_SUBDIR)/ld; then \
+ cd $(HOST_SUBDIR); mv ld stage2-ld; \
+ mv prev-ld stage1-ld; : ; \
fi
@endif ld
@if libbacktrace
- @if test -d $(HOST_SUBDIR)/libbacktrace ; then \
- cd $(HOST_SUBDIR); mv libbacktrace stage2-libbacktrace ; \
- mv prev-libbacktrace stage1-libbacktrace ; : ; \
+ @if test -d $(HOST_SUBDIR)/libbacktrace; then \
+ cd $(HOST_SUBDIR); mv libbacktrace stage2-libbacktrace; \
+ mv prev-libbacktrace stage1-libbacktrace; : ; \
fi
@endif libbacktrace
@if libcpp
- @if test -d $(HOST_SUBDIR)/libcpp ; then \
- cd $(HOST_SUBDIR); mv libcpp stage2-libcpp ; \
- mv prev-libcpp stage1-libcpp ; : ; \
+ @if test -d $(HOST_SUBDIR)/libcpp; then \
+ cd $(HOST_SUBDIR); mv libcpp stage2-libcpp; \
+ mv prev-libcpp stage1-libcpp; : ; \
fi
@endif libcpp
@if libdecnumber
- @if test -d $(HOST_SUBDIR)/libdecnumber ; then \
- cd $(HOST_SUBDIR); mv libdecnumber stage2-libdecnumber ; \
- mv prev-libdecnumber stage1-libdecnumber ; : ; \
+ @if test -d $(HOST_SUBDIR)/libdecnumber; then \
+ cd $(HOST_SUBDIR); mv libdecnumber stage2-libdecnumber; \
+ mv prev-libdecnumber stage1-libdecnumber; : ; \
fi
@endif libdecnumber
@if libiberty
- @if test -d $(HOST_SUBDIR)/libiberty ; then \
- cd $(HOST_SUBDIR); mv libiberty stage2-libiberty ; \
- mv prev-libiberty stage1-libiberty ; : ; \
+ @if test -d $(HOST_SUBDIR)/libiberty; then \
+ cd $(HOST_SUBDIR); mv libiberty stage2-libiberty; \
+ mv prev-libiberty stage1-libiberty; : ; \
fi
@endif libiberty
+@if libiberty-linker-plugin
+ @if test -d $(HOST_SUBDIR)/libiberty-linker-plugin; then \
+ cd $(HOST_SUBDIR); mv libiberty-linker-plugin stage2-libiberty-linker-plugin; \
+ mv prev-libiberty-linker-plugin stage1-libiberty-linker-plugin; : ; \
+ fi
+@endif libiberty-linker-plugin
+@if libiconv
+ @if test -d $(HOST_SUBDIR)/libiconv; then \
+ cd $(HOST_SUBDIR); mv libiconv stage2-libiconv; \
+ mv prev-libiconv stage1-libiconv; : ; \
+ fi
+@endif libiconv
@if zlib
- @if test -d $(HOST_SUBDIR)/zlib ; then \
- cd $(HOST_SUBDIR); mv zlib stage2-zlib ; \
- mv prev-zlib stage1-zlib ; : ; \
+ @if test -d $(HOST_SUBDIR)/zlib; then \
+ cd $(HOST_SUBDIR); mv zlib stage2-zlib; \
+ mv prev-zlib stage1-zlib; : ; \
fi
@endif zlib
@if lto-plugin
- @if test -d $(HOST_SUBDIR)/lto-plugin ; then \
- cd $(HOST_SUBDIR); mv lto-plugin stage2-lto-plugin ; \
- mv prev-lto-plugin stage1-lto-plugin ; : ; \
+ @if test -d $(HOST_SUBDIR)/lto-plugin; then \
+ cd $(HOST_SUBDIR); mv lto-plugin stage2-lto-plugin; \
+ mv prev-lto-plugin stage1-lto-plugin; : ; \
fi
@endif lto-plugin
- @if test -d $(TARGET_SUBDIR) ; then \
- mv $(TARGET_SUBDIR) stage2-$(TARGET_SUBDIR) ; \
- mv prev-$(TARGET_SUBDIR) stage1-$(TARGET_SUBDIR) ; : ; \
+ @if test -d $(TARGET_SUBDIR); then \
+ mv $(TARGET_SUBDIR) stage2-$(TARGET_SUBDIR); \
+ mv prev-$(TARGET_SUBDIR) stage1-$(TARGET_SUBDIR); : ; \
fi
rm -f stage_current
@@ -44926,8 +48411,8 @@ stage2-end::
stage2-bubble:: stage1-bubble
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- if test -f stage2-lean || test -f stage1-lean ; then \
- echo Skipping rebuild of stage2 ; \
+ if test -f stage2-lean || test -f stage1-lean ; then \
+ echo Skipping rebuild of stage2; \
else \
$(MAKE) stage2-start; \
$(MAKE) $(RECURSE_FLAGS_TO_PASS) all-stage2; \
@@ -44982,258 +48467,282 @@ distclean-stage2::
stage3-start::
@: $(MAKE); $(stage); \
- echo stage3 > stage_current ; \
+ echo stage3 > stage_current; \
echo stage3 > stage_last; \
$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)
@if bfd
@cd $(HOST_SUBDIR); [ -d stage3-bfd ] || \
mkdir stage3-bfd; \
- mv stage3-bfd bfd ; \
+ mv stage3-bfd bfd; \
mv stage2-bfd prev-bfd || test -f stage2-lean
@endif bfd
@if opcodes
@cd $(HOST_SUBDIR); [ -d stage3-opcodes ] || \
mkdir stage3-opcodes; \
- mv stage3-opcodes opcodes ; \
+ mv stage3-opcodes opcodes; \
mv stage2-opcodes prev-opcodes || test -f stage2-lean
@endif opcodes
@if binutils
@cd $(HOST_SUBDIR); [ -d stage3-binutils ] || \
mkdir stage3-binutils; \
- mv stage3-binutils binutils ; \
+ mv stage3-binutils binutils; \
mv stage2-binutils prev-binutils || test -f stage2-lean
@endif binutils
+@if fixincludes
+ @cd $(HOST_SUBDIR); [ -d stage3-fixincludes ] || \
+ mkdir stage3-fixincludes; \
+ mv stage3-fixincludes fixincludes; \
+ mv stage2-fixincludes prev-fixincludes || test -f stage2-lean
+@endif fixincludes
@if gas
@cd $(HOST_SUBDIR); [ -d stage3-gas ] || \
mkdir stage3-gas; \
- mv stage3-gas gas ; \
+ mv stage3-gas gas; \
mv stage2-gas prev-gas || test -f stage2-lean
@endif gas
@if gcc
@cd $(HOST_SUBDIR); [ -d stage3-gcc ] || \
mkdir stage3-gcc; \
- mv stage3-gcc gcc ; \
+ mv stage3-gcc gcc; \
mv stage2-gcc prev-gcc || test -f stage2-lean
@endif gcc
@if gmp
@cd $(HOST_SUBDIR); [ -d stage3-gmp ] || \
mkdir stage3-gmp; \
- mv stage3-gmp gmp ; \
+ mv stage3-gmp gmp; \
mv stage2-gmp prev-gmp || test -f stage2-lean
@endif gmp
@if mpfr
@cd $(HOST_SUBDIR); [ -d stage3-mpfr ] || \
mkdir stage3-mpfr; \
- mv stage3-mpfr mpfr ; \
+ mv stage3-mpfr mpfr; \
mv stage2-mpfr prev-mpfr || test -f stage2-lean
@endif mpfr
@if mpc
@cd $(HOST_SUBDIR); [ -d stage3-mpc ] || \
mkdir stage3-mpc; \
- mv stage3-mpc mpc ; \
+ mv stage3-mpc mpc; \
mv stage2-mpc prev-mpc || test -f stage2-lean
@endif mpc
@if isl
@cd $(HOST_SUBDIR); [ -d stage3-isl ] || \
mkdir stage3-isl; \
- mv stage3-isl isl ; \
+ mv stage3-isl isl; \
mv stage2-isl prev-isl || test -f stage2-lean
@endif isl
-@if cloog
- @cd $(HOST_SUBDIR); [ -d stage3-cloog ] || \
- mkdir stage3-cloog; \
- mv stage3-cloog cloog ; \
- mv stage2-cloog prev-cloog || test -f stage2-lean
-@endif cloog
@if libelf
@cd $(HOST_SUBDIR); [ -d stage3-libelf ] || \
mkdir stage3-libelf; \
- mv stage3-libelf libelf ; \
+ mv stage3-libelf libelf; \
mv stage2-libelf prev-libelf || test -f stage2-lean
@endif libelf
@if gold
@cd $(HOST_SUBDIR); [ -d stage3-gold ] || \
mkdir stage3-gold; \
- mv stage3-gold gold ; \
+ mv stage3-gold gold; \
mv stage2-gold prev-gold || test -f stage2-lean
@endif gold
@if intl
@cd $(HOST_SUBDIR); [ -d stage3-intl ] || \
mkdir stage3-intl; \
- mv stage3-intl intl ; \
+ mv stage3-intl intl; \
mv stage2-intl prev-intl || test -f stage2-lean
@endif intl
@if ld
@cd $(HOST_SUBDIR); [ -d stage3-ld ] || \
mkdir stage3-ld; \
- mv stage3-ld ld ; \
+ mv stage3-ld ld; \
mv stage2-ld prev-ld || test -f stage2-lean
@endif ld
@if libbacktrace
@cd $(HOST_SUBDIR); [ -d stage3-libbacktrace ] || \
mkdir stage3-libbacktrace; \
- mv stage3-libbacktrace libbacktrace ; \
+ mv stage3-libbacktrace libbacktrace; \
mv stage2-libbacktrace prev-libbacktrace || test -f stage2-lean
@endif libbacktrace
@if libcpp
@cd $(HOST_SUBDIR); [ -d stage3-libcpp ] || \
mkdir stage3-libcpp; \
- mv stage3-libcpp libcpp ; \
+ mv stage3-libcpp libcpp; \
mv stage2-libcpp prev-libcpp || test -f stage2-lean
@endif libcpp
@if libdecnumber
@cd $(HOST_SUBDIR); [ -d stage3-libdecnumber ] || \
mkdir stage3-libdecnumber; \
- mv stage3-libdecnumber libdecnumber ; \
+ mv stage3-libdecnumber libdecnumber; \
mv stage2-libdecnumber prev-libdecnumber || test -f stage2-lean
@endif libdecnumber
@if libiberty
@cd $(HOST_SUBDIR); [ -d stage3-libiberty ] || \
mkdir stage3-libiberty; \
- mv stage3-libiberty libiberty ; \
+ mv stage3-libiberty libiberty; \
mv stage2-libiberty prev-libiberty || test -f stage2-lean
@endif libiberty
+@if libiberty-linker-plugin
+ @cd $(HOST_SUBDIR); [ -d stage3-libiberty-linker-plugin ] || \
+ mkdir stage3-libiberty-linker-plugin; \
+ mv stage3-libiberty-linker-plugin libiberty-linker-plugin; \
+ mv stage2-libiberty-linker-plugin prev-libiberty-linker-plugin || test -f stage2-lean
+@endif libiberty-linker-plugin
+@if libiconv
+ @cd $(HOST_SUBDIR); [ -d stage3-libiconv ] || \
+ mkdir stage3-libiconv; \
+ mv stage3-libiconv libiconv; \
+ mv stage2-libiconv prev-libiconv || test -f stage2-lean
+@endif libiconv
@if zlib
@cd $(HOST_SUBDIR); [ -d stage3-zlib ] || \
mkdir stage3-zlib; \
- mv stage3-zlib zlib ; \
+ mv stage3-zlib zlib; \
mv stage2-zlib prev-zlib || test -f stage2-lean
@endif zlib
@if lto-plugin
@cd $(HOST_SUBDIR); [ -d stage3-lto-plugin ] || \
mkdir stage3-lto-plugin; \
- mv stage3-lto-plugin lto-plugin ; \
+ mv stage3-lto-plugin lto-plugin; \
mv stage2-lto-plugin prev-lto-plugin || test -f stage2-lean
@endif lto-plugin
@[ -d stage3-$(TARGET_SUBDIR) ] || \
mkdir stage3-$(TARGET_SUBDIR); \
- mv stage3-$(TARGET_SUBDIR) $(TARGET_SUBDIR) ; \
+ mv stage3-$(TARGET_SUBDIR) $(TARGET_SUBDIR); \
mv stage2-$(TARGET_SUBDIR) prev-$(TARGET_SUBDIR) || test -f stage2-lean
stage3-end::
@if bfd
- @if test -d $(HOST_SUBDIR)/bfd ; then \
- cd $(HOST_SUBDIR); mv bfd stage3-bfd ; \
- mv prev-bfd stage2-bfd ; : ; \
+ @if test -d $(HOST_SUBDIR)/bfd; then \
+ cd $(HOST_SUBDIR); mv bfd stage3-bfd; \
+ mv prev-bfd stage2-bfd; : ; \
fi
@endif bfd
@if opcodes
- @if test -d $(HOST_SUBDIR)/opcodes ; then \
- cd $(HOST_SUBDIR); mv opcodes stage3-opcodes ; \
- mv prev-opcodes stage2-opcodes ; : ; \
+ @if test -d $(HOST_SUBDIR)/opcodes; then \
+ cd $(HOST_SUBDIR); mv opcodes stage3-opcodes; \
+ mv prev-opcodes stage2-opcodes; : ; \
fi
@endif opcodes
@if binutils
- @if test -d $(HOST_SUBDIR)/binutils ; then \
- cd $(HOST_SUBDIR); mv binutils stage3-binutils ; \
- mv prev-binutils stage2-binutils ; : ; \
+ @if test -d $(HOST_SUBDIR)/binutils; then \
+ cd $(HOST_SUBDIR); mv binutils stage3-binutils; \
+ mv prev-binutils stage2-binutils; : ; \
fi
@endif binutils
+@if fixincludes
+ @if test -d $(HOST_SUBDIR)/fixincludes; then \
+ cd $(HOST_SUBDIR); mv fixincludes stage3-fixincludes; \
+ mv prev-fixincludes stage2-fixincludes; : ; \
+ fi
+@endif fixincludes
@if gas
- @if test -d $(HOST_SUBDIR)/gas ; then \
- cd $(HOST_SUBDIR); mv gas stage3-gas ; \
- mv prev-gas stage2-gas ; : ; \
+ @if test -d $(HOST_SUBDIR)/gas; then \
+ cd $(HOST_SUBDIR); mv gas stage3-gas; \
+ mv prev-gas stage2-gas; : ; \
fi
@endif gas
@if gcc
- @if test -d $(HOST_SUBDIR)/gcc ; then \
- cd $(HOST_SUBDIR); mv gcc stage3-gcc ; \
- mv prev-gcc stage2-gcc ; : ; \
+ @if test -d $(HOST_SUBDIR)/gcc; then \
+ cd $(HOST_SUBDIR); mv gcc stage3-gcc; \
+ mv prev-gcc stage2-gcc; : ; \
fi
@endif gcc
@if gmp
- @if test -d $(HOST_SUBDIR)/gmp ; then \
- cd $(HOST_SUBDIR); mv gmp stage3-gmp ; \
- mv prev-gmp stage2-gmp ; : ; \
+ @if test -d $(HOST_SUBDIR)/gmp; then \
+ cd $(HOST_SUBDIR); mv gmp stage3-gmp; \
+ mv prev-gmp stage2-gmp; : ; \
fi
@endif gmp
@if mpfr
- @if test -d $(HOST_SUBDIR)/mpfr ; then \
- cd $(HOST_SUBDIR); mv mpfr stage3-mpfr ; \
- mv prev-mpfr stage2-mpfr ; : ; \
+ @if test -d $(HOST_SUBDIR)/mpfr; then \
+ cd $(HOST_SUBDIR); mv mpfr stage3-mpfr; \
+ mv prev-mpfr stage2-mpfr; : ; \
fi
@endif mpfr
@if mpc
- @if test -d $(HOST_SUBDIR)/mpc ; then \
- cd $(HOST_SUBDIR); mv mpc stage3-mpc ; \
- mv prev-mpc stage2-mpc ; : ; \
+ @if test -d $(HOST_SUBDIR)/mpc; then \
+ cd $(HOST_SUBDIR); mv mpc stage3-mpc; \
+ mv prev-mpc stage2-mpc; : ; \
fi
@endif mpc
@if isl
- @if test -d $(HOST_SUBDIR)/isl ; then \
- cd $(HOST_SUBDIR); mv isl stage3-isl ; \
- mv prev-isl stage2-isl ; : ; \
+ @if test -d $(HOST_SUBDIR)/isl; then \
+ cd $(HOST_SUBDIR); mv isl stage3-isl; \
+ mv prev-isl stage2-isl; : ; \
fi
@endif isl
-@if cloog
- @if test -d $(HOST_SUBDIR)/cloog ; then \
- cd $(HOST_SUBDIR); mv cloog stage3-cloog ; \
- mv prev-cloog stage2-cloog ; : ; \
- fi
-@endif cloog
@if libelf
- @if test -d $(HOST_SUBDIR)/libelf ; then \
- cd $(HOST_SUBDIR); mv libelf stage3-libelf ; \
- mv prev-libelf stage2-libelf ; : ; \
+ @if test -d $(HOST_SUBDIR)/libelf; then \
+ cd $(HOST_SUBDIR); mv libelf stage3-libelf; \
+ mv prev-libelf stage2-libelf; : ; \
fi
@endif libelf
@if gold
- @if test -d $(HOST_SUBDIR)/gold ; then \
- cd $(HOST_SUBDIR); mv gold stage3-gold ; \
- mv prev-gold stage2-gold ; : ; \
+ @if test -d $(HOST_SUBDIR)/gold; then \
+ cd $(HOST_SUBDIR); mv gold stage3-gold; \
+ mv prev-gold stage2-gold; : ; \
fi
@endif gold
@if intl
- @if test -d $(HOST_SUBDIR)/intl ; then \
- cd $(HOST_SUBDIR); mv intl stage3-intl ; \
- mv prev-intl stage2-intl ; : ; \
+ @if test -d $(HOST_SUBDIR)/intl; then \
+ cd $(HOST_SUBDIR); mv intl stage3-intl; \
+ mv prev-intl stage2-intl; : ; \
fi
@endif intl
@if ld
- @if test -d $(HOST_SUBDIR)/ld ; then \
- cd $(HOST_SUBDIR); mv ld stage3-ld ; \
- mv prev-ld stage2-ld ; : ; \
+ @if test -d $(HOST_SUBDIR)/ld; then \
+ cd $(HOST_SUBDIR); mv ld stage3-ld; \
+ mv prev-ld stage2-ld; : ; \
fi
@endif ld
@if libbacktrace
- @if test -d $(HOST_SUBDIR)/libbacktrace ; then \
- cd $(HOST_SUBDIR); mv libbacktrace stage3-libbacktrace ; \
- mv prev-libbacktrace stage2-libbacktrace ; : ; \
+ @if test -d $(HOST_SUBDIR)/libbacktrace; then \
+ cd $(HOST_SUBDIR); mv libbacktrace stage3-libbacktrace; \
+ mv prev-libbacktrace stage2-libbacktrace; : ; \
fi
@endif libbacktrace
@if libcpp
- @if test -d $(HOST_SUBDIR)/libcpp ; then \
- cd $(HOST_SUBDIR); mv libcpp stage3-libcpp ; \
- mv prev-libcpp stage2-libcpp ; : ; \
+ @if test -d $(HOST_SUBDIR)/libcpp; then \
+ cd $(HOST_SUBDIR); mv libcpp stage3-libcpp; \
+ mv prev-libcpp stage2-libcpp; : ; \
fi
@endif libcpp
@if libdecnumber
- @if test -d $(HOST_SUBDIR)/libdecnumber ; then \
- cd $(HOST_SUBDIR); mv libdecnumber stage3-libdecnumber ; \
- mv prev-libdecnumber stage2-libdecnumber ; : ; \
+ @if test -d $(HOST_SUBDIR)/libdecnumber; then \
+ cd $(HOST_SUBDIR); mv libdecnumber stage3-libdecnumber; \
+ mv prev-libdecnumber stage2-libdecnumber; : ; \
fi
@endif libdecnumber
@if libiberty
- @if test -d $(HOST_SUBDIR)/libiberty ; then \
- cd $(HOST_SUBDIR); mv libiberty stage3-libiberty ; \
- mv prev-libiberty stage2-libiberty ; : ; \
+ @if test -d $(HOST_SUBDIR)/libiberty; then \
+ cd $(HOST_SUBDIR); mv libiberty stage3-libiberty; \
+ mv prev-libiberty stage2-libiberty; : ; \
fi
@endif libiberty
+@if libiberty-linker-plugin
+ @if test -d $(HOST_SUBDIR)/libiberty-linker-plugin; then \
+ cd $(HOST_SUBDIR); mv libiberty-linker-plugin stage3-libiberty-linker-plugin; \
+ mv prev-libiberty-linker-plugin stage2-libiberty-linker-plugin; : ; \
+ fi
+@endif libiberty-linker-plugin
+@if libiconv
+ @if test -d $(HOST_SUBDIR)/libiconv; then \
+ cd $(HOST_SUBDIR); mv libiconv stage3-libiconv; \
+ mv prev-libiconv stage2-libiconv; : ; \
+ fi
+@endif libiconv
@if zlib
- @if test -d $(HOST_SUBDIR)/zlib ; then \
- cd $(HOST_SUBDIR); mv zlib stage3-zlib ; \
- mv prev-zlib stage2-zlib ; : ; \
+ @if test -d $(HOST_SUBDIR)/zlib; then \
+ cd $(HOST_SUBDIR); mv zlib stage3-zlib; \
+ mv prev-zlib stage2-zlib; : ; \
fi
@endif zlib
@if lto-plugin
- @if test -d $(HOST_SUBDIR)/lto-plugin ; then \
- cd $(HOST_SUBDIR); mv lto-plugin stage3-lto-plugin ; \
- mv prev-lto-plugin stage2-lto-plugin ; : ; \
+ @if test -d $(HOST_SUBDIR)/lto-plugin; then \
+ cd $(HOST_SUBDIR); mv lto-plugin stage3-lto-plugin; \
+ mv prev-lto-plugin stage2-lto-plugin; : ; \
fi
@endif lto-plugin
- @if test -d $(TARGET_SUBDIR) ; then \
- mv $(TARGET_SUBDIR) stage3-$(TARGET_SUBDIR) ; \
- mv prev-$(TARGET_SUBDIR) stage2-$(TARGET_SUBDIR) ; : ; \
+ @if test -d $(TARGET_SUBDIR); then \
+ mv $(TARGET_SUBDIR) stage3-$(TARGET_SUBDIR); \
+ mv prev-$(TARGET_SUBDIR) stage2-$(TARGET_SUBDIR); : ; \
fi
rm -f stage_current
@@ -45244,13 +48753,13 @@ stage3-end::
stage3-bubble:: stage2-bubble
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- if test -f stage3-lean || test -f stage2-lean ; then \
- echo Skipping rebuild of stage3 ; \
+ if test -f stage3-lean || test -f stage2-lean ; then \
+ echo Skipping rebuild of stage3; \
else \
$(MAKE) stage3-start; \
if $(LEAN); then \
- rm -rf stage1-* ; \
- $(STAMP) stage1-lean ; \
+ rm -rf stage1-*; \
+ $(STAMP) stage1-lean; \
fi; \
$(MAKE) $(RECURSE_FLAGS_TO_PASS) all-stage3; \
fi
@@ -45267,16 +48776,16 @@ compare:
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
if test -f stage2-lean; then \
- echo Cannot compare object files as stage 2 was deleted. ; \
- exit 0 ; \
+ echo Cannot compare object files as stage 2 was deleted.; \
+ exit 0; \
fi; \
: $(MAKE); $(stage); \
- rm -f .bad_compare ; \
- echo Comparing stages 2 and 3 ; \
+ rm -f .bad_compare; \
+ echo Comparing stages 2 and 3; \
sed=`echo stage3 | sed 's,^stage,,;s,.,.,g'`; \
files=`find stage3-* -name "*$(objext)" -print | \
- sed -n s,^stage$$sed-,,p` ; \
- for file in $${files} ; do \
+ sed -n s,^stage$$sed-,,p`; \
+ for file in $${files}; do \
f1=$$r/stage2-$$file; f2=$$r/stage3-$$file; \
if test ! -f $$f1; then continue; fi; \
$(do-compare) > /dev/null 2>&1; \
@@ -45286,16 +48795,16 @@ compare:
echo warning: $$file differs ;; \
*) \
echo $$file differs >> .bad_compare ;; \
- esac ; \
- fi ; \
- done ; \
+ esac; \
+ fi; \
+ done; \
if [ -f .bad_compare ]; then \
echo "Bootstrap comparison failure!"; \
cat .bad_compare; \
exit 1; \
else \
echo Comparison successful.; \
- fi ; \
+ fi; \
$(STAMP) compare
if $(LEAN); then \
rm -rf stage2-*; \
@@ -45356,258 +48865,282 @@ cleanstrap: do-distclean local-clean
stage4-start::
@: $(MAKE); $(stage); \
- echo stage4 > stage_current ; \
+ echo stage4 > stage_current; \
echo stage4 > stage_last; \
$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)
@if bfd
@cd $(HOST_SUBDIR); [ -d stage4-bfd ] || \
mkdir stage4-bfd; \
- mv stage4-bfd bfd ; \
+ mv stage4-bfd bfd; \
mv stage3-bfd prev-bfd || test -f stage3-lean
@endif bfd
@if opcodes
@cd $(HOST_SUBDIR); [ -d stage4-opcodes ] || \
mkdir stage4-opcodes; \
- mv stage4-opcodes opcodes ; \
+ mv stage4-opcodes opcodes; \
mv stage3-opcodes prev-opcodes || test -f stage3-lean
@endif opcodes
@if binutils
@cd $(HOST_SUBDIR); [ -d stage4-binutils ] || \
mkdir stage4-binutils; \
- mv stage4-binutils binutils ; \
+ mv stage4-binutils binutils; \
mv stage3-binutils prev-binutils || test -f stage3-lean
@endif binutils
+@if fixincludes
+ @cd $(HOST_SUBDIR); [ -d stage4-fixincludes ] || \
+ mkdir stage4-fixincludes; \
+ mv stage4-fixincludes fixincludes; \
+ mv stage3-fixincludes prev-fixincludes || test -f stage3-lean
+@endif fixincludes
@if gas
@cd $(HOST_SUBDIR); [ -d stage4-gas ] || \
mkdir stage4-gas; \
- mv stage4-gas gas ; \
+ mv stage4-gas gas; \
mv stage3-gas prev-gas || test -f stage3-lean
@endif gas
@if gcc
@cd $(HOST_SUBDIR); [ -d stage4-gcc ] || \
mkdir stage4-gcc; \
- mv stage4-gcc gcc ; \
+ mv stage4-gcc gcc; \
mv stage3-gcc prev-gcc || test -f stage3-lean
@endif gcc
@if gmp
@cd $(HOST_SUBDIR); [ -d stage4-gmp ] || \
mkdir stage4-gmp; \
- mv stage4-gmp gmp ; \
+ mv stage4-gmp gmp; \
mv stage3-gmp prev-gmp || test -f stage3-lean
@endif gmp
@if mpfr
@cd $(HOST_SUBDIR); [ -d stage4-mpfr ] || \
mkdir stage4-mpfr; \
- mv stage4-mpfr mpfr ; \
+ mv stage4-mpfr mpfr; \
mv stage3-mpfr prev-mpfr || test -f stage3-lean
@endif mpfr
@if mpc
@cd $(HOST_SUBDIR); [ -d stage4-mpc ] || \
mkdir stage4-mpc; \
- mv stage4-mpc mpc ; \
+ mv stage4-mpc mpc; \
mv stage3-mpc prev-mpc || test -f stage3-lean
@endif mpc
@if isl
@cd $(HOST_SUBDIR); [ -d stage4-isl ] || \
mkdir stage4-isl; \
- mv stage4-isl isl ; \
+ mv stage4-isl isl; \
mv stage3-isl prev-isl || test -f stage3-lean
@endif isl
-@if cloog
- @cd $(HOST_SUBDIR); [ -d stage4-cloog ] || \
- mkdir stage4-cloog; \
- mv stage4-cloog cloog ; \
- mv stage3-cloog prev-cloog || test -f stage3-lean
-@endif cloog
@if libelf
@cd $(HOST_SUBDIR); [ -d stage4-libelf ] || \
mkdir stage4-libelf; \
- mv stage4-libelf libelf ; \
+ mv stage4-libelf libelf; \
mv stage3-libelf prev-libelf || test -f stage3-lean
@endif libelf
@if gold
@cd $(HOST_SUBDIR); [ -d stage4-gold ] || \
mkdir stage4-gold; \
- mv stage4-gold gold ; \
+ mv stage4-gold gold; \
mv stage3-gold prev-gold || test -f stage3-lean
@endif gold
@if intl
@cd $(HOST_SUBDIR); [ -d stage4-intl ] || \
mkdir stage4-intl; \
- mv stage4-intl intl ; \
+ mv stage4-intl intl; \
mv stage3-intl prev-intl || test -f stage3-lean
@endif intl
@if ld
@cd $(HOST_SUBDIR); [ -d stage4-ld ] || \
mkdir stage4-ld; \
- mv stage4-ld ld ; \
+ mv stage4-ld ld; \
mv stage3-ld prev-ld || test -f stage3-lean
@endif ld
@if libbacktrace
@cd $(HOST_SUBDIR); [ -d stage4-libbacktrace ] || \
mkdir stage4-libbacktrace; \
- mv stage4-libbacktrace libbacktrace ; \
+ mv stage4-libbacktrace libbacktrace; \
mv stage3-libbacktrace prev-libbacktrace || test -f stage3-lean
@endif libbacktrace
@if libcpp
@cd $(HOST_SUBDIR); [ -d stage4-libcpp ] || \
mkdir stage4-libcpp; \
- mv stage4-libcpp libcpp ; \
+ mv stage4-libcpp libcpp; \
mv stage3-libcpp prev-libcpp || test -f stage3-lean
@endif libcpp
@if libdecnumber
@cd $(HOST_SUBDIR); [ -d stage4-libdecnumber ] || \
mkdir stage4-libdecnumber; \
- mv stage4-libdecnumber libdecnumber ; \
+ mv stage4-libdecnumber libdecnumber; \
mv stage3-libdecnumber prev-libdecnumber || test -f stage3-lean
@endif libdecnumber
@if libiberty
@cd $(HOST_SUBDIR); [ -d stage4-libiberty ] || \
mkdir stage4-libiberty; \
- mv stage4-libiberty libiberty ; \
+ mv stage4-libiberty libiberty; \
mv stage3-libiberty prev-libiberty || test -f stage3-lean
@endif libiberty
+@if libiberty-linker-plugin
+ @cd $(HOST_SUBDIR); [ -d stage4-libiberty-linker-plugin ] || \
+ mkdir stage4-libiberty-linker-plugin; \
+ mv stage4-libiberty-linker-plugin libiberty-linker-plugin; \
+ mv stage3-libiberty-linker-plugin prev-libiberty-linker-plugin || test -f stage3-lean
+@endif libiberty-linker-plugin
+@if libiconv
+ @cd $(HOST_SUBDIR); [ -d stage4-libiconv ] || \
+ mkdir stage4-libiconv; \
+ mv stage4-libiconv libiconv; \
+ mv stage3-libiconv prev-libiconv || test -f stage3-lean
+@endif libiconv
@if zlib
@cd $(HOST_SUBDIR); [ -d stage4-zlib ] || \
mkdir stage4-zlib; \
- mv stage4-zlib zlib ; \
+ mv stage4-zlib zlib; \
mv stage3-zlib prev-zlib || test -f stage3-lean
@endif zlib
@if lto-plugin
@cd $(HOST_SUBDIR); [ -d stage4-lto-plugin ] || \
mkdir stage4-lto-plugin; \
- mv stage4-lto-plugin lto-plugin ; \
+ mv stage4-lto-plugin lto-plugin; \
mv stage3-lto-plugin prev-lto-plugin || test -f stage3-lean
@endif lto-plugin
@[ -d stage4-$(TARGET_SUBDIR) ] || \
mkdir stage4-$(TARGET_SUBDIR); \
- mv stage4-$(TARGET_SUBDIR) $(TARGET_SUBDIR) ; \
+ mv stage4-$(TARGET_SUBDIR) $(TARGET_SUBDIR); \
mv stage3-$(TARGET_SUBDIR) prev-$(TARGET_SUBDIR) || test -f stage3-lean
stage4-end::
@if bfd
- @if test -d $(HOST_SUBDIR)/bfd ; then \
- cd $(HOST_SUBDIR); mv bfd stage4-bfd ; \
- mv prev-bfd stage3-bfd ; : ; \
+ @if test -d $(HOST_SUBDIR)/bfd; then \
+ cd $(HOST_SUBDIR); mv bfd stage4-bfd; \
+ mv prev-bfd stage3-bfd; : ; \
fi
@endif bfd
@if opcodes
- @if test -d $(HOST_SUBDIR)/opcodes ; then \
- cd $(HOST_SUBDIR); mv opcodes stage4-opcodes ; \
- mv prev-opcodes stage3-opcodes ; : ; \
+ @if test -d $(HOST_SUBDIR)/opcodes; then \
+ cd $(HOST_SUBDIR); mv opcodes stage4-opcodes; \
+ mv prev-opcodes stage3-opcodes; : ; \
fi
@endif opcodes
@if binutils
- @if test -d $(HOST_SUBDIR)/binutils ; then \
- cd $(HOST_SUBDIR); mv binutils stage4-binutils ; \
- mv prev-binutils stage3-binutils ; : ; \
+ @if test -d $(HOST_SUBDIR)/binutils; then \
+ cd $(HOST_SUBDIR); mv binutils stage4-binutils; \
+ mv prev-binutils stage3-binutils; : ; \
fi
@endif binutils
+@if fixincludes
+ @if test -d $(HOST_SUBDIR)/fixincludes; then \
+ cd $(HOST_SUBDIR); mv fixincludes stage4-fixincludes; \
+ mv prev-fixincludes stage3-fixincludes; : ; \
+ fi
+@endif fixincludes
@if gas
- @if test -d $(HOST_SUBDIR)/gas ; then \
- cd $(HOST_SUBDIR); mv gas stage4-gas ; \
- mv prev-gas stage3-gas ; : ; \
+ @if test -d $(HOST_SUBDIR)/gas; then \
+ cd $(HOST_SUBDIR); mv gas stage4-gas; \
+ mv prev-gas stage3-gas; : ; \
fi
@endif gas
@if gcc
- @if test -d $(HOST_SUBDIR)/gcc ; then \
- cd $(HOST_SUBDIR); mv gcc stage4-gcc ; \
- mv prev-gcc stage3-gcc ; : ; \
+ @if test -d $(HOST_SUBDIR)/gcc; then \
+ cd $(HOST_SUBDIR); mv gcc stage4-gcc; \
+ mv prev-gcc stage3-gcc; : ; \
fi
@endif gcc
@if gmp
- @if test -d $(HOST_SUBDIR)/gmp ; then \
- cd $(HOST_SUBDIR); mv gmp stage4-gmp ; \
- mv prev-gmp stage3-gmp ; : ; \
+ @if test -d $(HOST_SUBDIR)/gmp; then \
+ cd $(HOST_SUBDIR); mv gmp stage4-gmp; \
+ mv prev-gmp stage3-gmp; : ; \
fi
@endif gmp
@if mpfr
- @if test -d $(HOST_SUBDIR)/mpfr ; then \
- cd $(HOST_SUBDIR); mv mpfr stage4-mpfr ; \
- mv prev-mpfr stage3-mpfr ; : ; \
+ @if test -d $(HOST_SUBDIR)/mpfr; then \
+ cd $(HOST_SUBDIR); mv mpfr stage4-mpfr; \
+ mv prev-mpfr stage3-mpfr; : ; \
fi
@endif mpfr
@if mpc
- @if test -d $(HOST_SUBDIR)/mpc ; then \
- cd $(HOST_SUBDIR); mv mpc stage4-mpc ; \
- mv prev-mpc stage3-mpc ; : ; \
+ @if test -d $(HOST_SUBDIR)/mpc; then \
+ cd $(HOST_SUBDIR); mv mpc stage4-mpc; \
+ mv prev-mpc stage3-mpc; : ; \
fi
@endif mpc
@if isl
- @if test -d $(HOST_SUBDIR)/isl ; then \
- cd $(HOST_SUBDIR); mv isl stage4-isl ; \
- mv prev-isl stage3-isl ; : ; \
+ @if test -d $(HOST_SUBDIR)/isl; then \
+ cd $(HOST_SUBDIR); mv isl stage4-isl; \
+ mv prev-isl stage3-isl; : ; \
fi
@endif isl
-@if cloog
- @if test -d $(HOST_SUBDIR)/cloog ; then \
- cd $(HOST_SUBDIR); mv cloog stage4-cloog ; \
- mv prev-cloog stage3-cloog ; : ; \
- fi
-@endif cloog
@if libelf
- @if test -d $(HOST_SUBDIR)/libelf ; then \
- cd $(HOST_SUBDIR); mv libelf stage4-libelf ; \
- mv prev-libelf stage3-libelf ; : ; \
+ @if test -d $(HOST_SUBDIR)/libelf; then \
+ cd $(HOST_SUBDIR); mv libelf stage4-libelf; \
+ mv prev-libelf stage3-libelf; : ; \
fi
@endif libelf
@if gold
- @if test -d $(HOST_SUBDIR)/gold ; then \
- cd $(HOST_SUBDIR); mv gold stage4-gold ; \
- mv prev-gold stage3-gold ; : ; \
+ @if test -d $(HOST_SUBDIR)/gold; then \
+ cd $(HOST_SUBDIR); mv gold stage4-gold; \
+ mv prev-gold stage3-gold; : ; \
fi
@endif gold
@if intl
- @if test -d $(HOST_SUBDIR)/intl ; then \
- cd $(HOST_SUBDIR); mv intl stage4-intl ; \
- mv prev-intl stage3-intl ; : ; \
+ @if test -d $(HOST_SUBDIR)/intl; then \
+ cd $(HOST_SUBDIR); mv intl stage4-intl; \
+ mv prev-intl stage3-intl; : ; \
fi
@endif intl
@if ld
- @if test -d $(HOST_SUBDIR)/ld ; then \
- cd $(HOST_SUBDIR); mv ld stage4-ld ; \
- mv prev-ld stage3-ld ; : ; \
+ @if test -d $(HOST_SUBDIR)/ld; then \
+ cd $(HOST_SUBDIR); mv ld stage4-ld; \
+ mv prev-ld stage3-ld; : ; \
fi
@endif ld
@if libbacktrace
- @if test -d $(HOST_SUBDIR)/libbacktrace ; then \
- cd $(HOST_SUBDIR); mv libbacktrace stage4-libbacktrace ; \
- mv prev-libbacktrace stage3-libbacktrace ; : ; \
+ @if test -d $(HOST_SUBDIR)/libbacktrace; then \
+ cd $(HOST_SUBDIR); mv libbacktrace stage4-libbacktrace; \
+ mv prev-libbacktrace stage3-libbacktrace; : ; \
fi
@endif libbacktrace
@if libcpp
- @if test -d $(HOST_SUBDIR)/libcpp ; then \
- cd $(HOST_SUBDIR); mv libcpp stage4-libcpp ; \
- mv prev-libcpp stage3-libcpp ; : ; \
+ @if test -d $(HOST_SUBDIR)/libcpp; then \
+ cd $(HOST_SUBDIR); mv libcpp stage4-libcpp; \
+ mv prev-libcpp stage3-libcpp; : ; \
fi
@endif libcpp
@if libdecnumber
- @if test -d $(HOST_SUBDIR)/libdecnumber ; then \
- cd $(HOST_SUBDIR); mv libdecnumber stage4-libdecnumber ; \
- mv prev-libdecnumber stage3-libdecnumber ; : ; \
+ @if test -d $(HOST_SUBDIR)/libdecnumber; then \
+ cd $(HOST_SUBDIR); mv libdecnumber stage4-libdecnumber; \
+ mv prev-libdecnumber stage3-libdecnumber; : ; \
fi
@endif libdecnumber
@if libiberty
- @if test -d $(HOST_SUBDIR)/libiberty ; then \
- cd $(HOST_SUBDIR); mv libiberty stage4-libiberty ; \
- mv prev-libiberty stage3-libiberty ; : ; \
+ @if test -d $(HOST_SUBDIR)/libiberty; then \
+ cd $(HOST_SUBDIR); mv libiberty stage4-libiberty; \
+ mv prev-libiberty stage3-libiberty; : ; \
fi
@endif libiberty
+@if libiberty-linker-plugin
+ @if test -d $(HOST_SUBDIR)/libiberty-linker-plugin; then \
+ cd $(HOST_SUBDIR); mv libiberty-linker-plugin stage4-libiberty-linker-plugin; \
+ mv prev-libiberty-linker-plugin stage3-libiberty-linker-plugin; : ; \
+ fi
+@endif libiberty-linker-plugin
+@if libiconv
+ @if test -d $(HOST_SUBDIR)/libiconv; then \
+ cd $(HOST_SUBDIR); mv libiconv stage4-libiconv; \
+ mv prev-libiconv stage3-libiconv; : ; \
+ fi
+@endif libiconv
@if zlib
- @if test -d $(HOST_SUBDIR)/zlib ; then \
- cd $(HOST_SUBDIR); mv zlib stage4-zlib ; \
- mv prev-zlib stage3-zlib ; : ; \
+ @if test -d $(HOST_SUBDIR)/zlib; then \
+ cd $(HOST_SUBDIR); mv zlib stage4-zlib; \
+ mv prev-zlib stage3-zlib; : ; \
fi
@endif zlib
@if lto-plugin
- @if test -d $(HOST_SUBDIR)/lto-plugin ; then \
- cd $(HOST_SUBDIR); mv lto-plugin stage4-lto-plugin ; \
- mv prev-lto-plugin stage3-lto-plugin ; : ; \
+ @if test -d $(HOST_SUBDIR)/lto-plugin; then \
+ cd $(HOST_SUBDIR); mv lto-plugin stage4-lto-plugin; \
+ mv prev-lto-plugin stage3-lto-plugin; : ; \
fi
@endif lto-plugin
- @if test -d $(TARGET_SUBDIR) ; then \
- mv $(TARGET_SUBDIR) stage4-$(TARGET_SUBDIR) ; \
- mv prev-$(TARGET_SUBDIR) stage3-$(TARGET_SUBDIR) ; : ; \
+ @if test -d $(TARGET_SUBDIR); then \
+ mv $(TARGET_SUBDIR) stage4-$(TARGET_SUBDIR); \
+ mv prev-$(TARGET_SUBDIR) stage3-$(TARGET_SUBDIR); : ; \
fi
rm -f stage_current
@@ -45618,13 +49151,13 @@ stage4-end::
stage4-bubble:: stage3-bubble
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- if test -f stage4-lean || test -f stage3-lean ; then \
- echo Skipping rebuild of stage4 ; \
+ if test -f stage4-lean || test -f stage3-lean ; then \
+ echo Skipping rebuild of stage4; \
else \
$(MAKE) stage4-start; \
if $(LEAN); then \
- rm -rf stage2-* ; \
- $(STAMP) stage2-lean ; \
+ rm -rf stage2-*; \
+ $(STAMP) stage2-lean; \
fi; \
$(MAKE) $(RECURSE_FLAGS_TO_PASS) all-stage4; \
fi
@@ -45641,16 +49174,16 @@ compare3:
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
if test -f stage3-lean; then \
- echo Cannot compare object files as stage 3 was deleted. ; \
- exit 0 ; \
+ echo Cannot compare object files as stage 3 was deleted.; \
+ exit 0; \
fi; \
: $(MAKE); $(stage); \
- rm -f .bad_compare ; \
- echo Comparing stages 3 and 4 ; \
+ rm -f .bad_compare; \
+ echo Comparing stages 3 and 4; \
sed=`echo stage4 | sed 's,^stage,,;s,.,.,g'`; \
files=`find stage4-* -name "*$(objext)" -print | \
- sed -n s,^stage$$sed-,,p` ; \
- for file in $${files} ; do \
+ sed -n s,^stage$$sed-,,p`; \
+ for file in $${files}; do \
f1=$$r/stage3-$$file; f2=$$r/stage4-$$file; \
if test ! -f $$f1; then continue; fi; \
$(do-compare3) > /dev/null 2>&1; \
@@ -45660,16 +49193,16 @@ compare3:
echo warning: $$file differs ;; \
*) \
echo $$file differs >> .bad_compare ;; \
- esac ; \
- fi ; \
- done ; \
+ esac; \
+ fi; \
+ done; \
if [ -f .bad_compare ]; then \
echo "Bootstrap comparison failure!"; \
cat .bad_compare; \
exit 1; \
else \
echo Comparison successful.; \
- fi ; \
+ fi; \
$(STAMP) compare3
if $(LEAN); then \
rm -rf stage3-*; \
@@ -45718,258 +49251,282 @@ distclean-stage4::
stageprofile-start::
@: $(MAKE); $(stage); \
- echo stageprofile > stage_current ; \
+ echo stageprofile > stage_current; \
echo stageprofile > stage_last; \
$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)
@if bfd
@cd $(HOST_SUBDIR); [ -d stageprofile-bfd ] || \
mkdir stageprofile-bfd; \
- mv stageprofile-bfd bfd ; \
+ mv stageprofile-bfd bfd; \
mv stage1-bfd prev-bfd || test -f stage1-lean
@endif bfd
@if opcodes
@cd $(HOST_SUBDIR); [ -d stageprofile-opcodes ] || \
mkdir stageprofile-opcodes; \
- mv stageprofile-opcodes opcodes ; \
+ mv stageprofile-opcodes opcodes; \
mv stage1-opcodes prev-opcodes || test -f stage1-lean
@endif opcodes
@if binutils
@cd $(HOST_SUBDIR); [ -d stageprofile-binutils ] || \
mkdir stageprofile-binutils; \
- mv stageprofile-binutils binutils ; \
+ mv stageprofile-binutils binutils; \
mv stage1-binutils prev-binutils || test -f stage1-lean
@endif binutils
+@if fixincludes
+ @cd $(HOST_SUBDIR); [ -d stageprofile-fixincludes ] || \
+ mkdir stageprofile-fixincludes; \
+ mv stageprofile-fixincludes fixincludes; \
+ mv stage1-fixincludes prev-fixincludes || test -f stage1-lean
+@endif fixincludes
@if gas
@cd $(HOST_SUBDIR); [ -d stageprofile-gas ] || \
mkdir stageprofile-gas; \
- mv stageprofile-gas gas ; \
+ mv stageprofile-gas gas; \
mv stage1-gas prev-gas || test -f stage1-lean
@endif gas
@if gcc
@cd $(HOST_SUBDIR); [ -d stageprofile-gcc ] || \
mkdir stageprofile-gcc; \
- mv stageprofile-gcc gcc ; \
+ mv stageprofile-gcc gcc; \
mv stage1-gcc prev-gcc || test -f stage1-lean
@endif gcc
@if gmp
@cd $(HOST_SUBDIR); [ -d stageprofile-gmp ] || \
mkdir stageprofile-gmp; \
- mv stageprofile-gmp gmp ; \
+ mv stageprofile-gmp gmp; \
mv stage1-gmp prev-gmp || test -f stage1-lean
@endif gmp
@if mpfr
@cd $(HOST_SUBDIR); [ -d stageprofile-mpfr ] || \
mkdir stageprofile-mpfr; \
- mv stageprofile-mpfr mpfr ; \
+ mv stageprofile-mpfr mpfr; \
mv stage1-mpfr prev-mpfr || test -f stage1-lean
@endif mpfr
@if mpc
@cd $(HOST_SUBDIR); [ -d stageprofile-mpc ] || \
mkdir stageprofile-mpc; \
- mv stageprofile-mpc mpc ; \
+ mv stageprofile-mpc mpc; \
mv stage1-mpc prev-mpc || test -f stage1-lean
@endif mpc
@if isl
@cd $(HOST_SUBDIR); [ -d stageprofile-isl ] || \
mkdir stageprofile-isl; \
- mv stageprofile-isl isl ; \
+ mv stageprofile-isl isl; \
mv stage1-isl prev-isl || test -f stage1-lean
@endif isl
-@if cloog
- @cd $(HOST_SUBDIR); [ -d stageprofile-cloog ] || \
- mkdir stageprofile-cloog; \
- mv stageprofile-cloog cloog ; \
- mv stage1-cloog prev-cloog || test -f stage1-lean
-@endif cloog
@if libelf
@cd $(HOST_SUBDIR); [ -d stageprofile-libelf ] || \
mkdir stageprofile-libelf; \
- mv stageprofile-libelf libelf ; \
+ mv stageprofile-libelf libelf; \
mv stage1-libelf prev-libelf || test -f stage1-lean
@endif libelf
@if gold
@cd $(HOST_SUBDIR); [ -d stageprofile-gold ] || \
mkdir stageprofile-gold; \
- mv stageprofile-gold gold ; \
+ mv stageprofile-gold gold; \
mv stage1-gold prev-gold || test -f stage1-lean
@endif gold
@if intl
@cd $(HOST_SUBDIR); [ -d stageprofile-intl ] || \
mkdir stageprofile-intl; \
- mv stageprofile-intl intl ; \
+ mv stageprofile-intl intl; \
mv stage1-intl prev-intl || test -f stage1-lean
@endif intl
@if ld
@cd $(HOST_SUBDIR); [ -d stageprofile-ld ] || \
mkdir stageprofile-ld; \
- mv stageprofile-ld ld ; \
+ mv stageprofile-ld ld; \
mv stage1-ld prev-ld || test -f stage1-lean
@endif ld
@if libbacktrace
@cd $(HOST_SUBDIR); [ -d stageprofile-libbacktrace ] || \
mkdir stageprofile-libbacktrace; \
- mv stageprofile-libbacktrace libbacktrace ; \
+ mv stageprofile-libbacktrace libbacktrace; \
mv stage1-libbacktrace prev-libbacktrace || test -f stage1-lean
@endif libbacktrace
@if libcpp
@cd $(HOST_SUBDIR); [ -d stageprofile-libcpp ] || \
mkdir stageprofile-libcpp; \
- mv stageprofile-libcpp libcpp ; \
+ mv stageprofile-libcpp libcpp; \
mv stage1-libcpp prev-libcpp || test -f stage1-lean
@endif libcpp
@if libdecnumber
@cd $(HOST_SUBDIR); [ -d stageprofile-libdecnumber ] || \
mkdir stageprofile-libdecnumber; \
- mv stageprofile-libdecnumber libdecnumber ; \
+ mv stageprofile-libdecnumber libdecnumber; \
mv stage1-libdecnumber prev-libdecnumber || test -f stage1-lean
@endif libdecnumber
@if libiberty
@cd $(HOST_SUBDIR); [ -d stageprofile-libiberty ] || \
mkdir stageprofile-libiberty; \
- mv stageprofile-libiberty libiberty ; \
+ mv stageprofile-libiberty libiberty; \
mv stage1-libiberty prev-libiberty || test -f stage1-lean
@endif libiberty
+@if libiberty-linker-plugin
+ @cd $(HOST_SUBDIR); [ -d stageprofile-libiberty-linker-plugin ] || \
+ mkdir stageprofile-libiberty-linker-plugin; \
+ mv stageprofile-libiberty-linker-plugin libiberty-linker-plugin; \
+ mv stage1-libiberty-linker-plugin prev-libiberty-linker-plugin || test -f stage1-lean
+@endif libiberty-linker-plugin
+@if libiconv
+ @cd $(HOST_SUBDIR); [ -d stageprofile-libiconv ] || \
+ mkdir stageprofile-libiconv; \
+ mv stageprofile-libiconv libiconv; \
+ mv stage1-libiconv prev-libiconv || test -f stage1-lean
+@endif libiconv
@if zlib
@cd $(HOST_SUBDIR); [ -d stageprofile-zlib ] || \
mkdir stageprofile-zlib; \
- mv stageprofile-zlib zlib ; \
+ mv stageprofile-zlib zlib; \
mv stage1-zlib prev-zlib || test -f stage1-lean
@endif zlib
@if lto-plugin
@cd $(HOST_SUBDIR); [ -d stageprofile-lto-plugin ] || \
mkdir stageprofile-lto-plugin; \
- mv stageprofile-lto-plugin lto-plugin ; \
+ mv stageprofile-lto-plugin lto-plugin; \
mv stage1-lto-plugin prev-lto-plugin || test -f stage1-lean
@endif lto-plugin
@[ -d stageprofile-$(TARGET_SUBDIR) ] || \
mkdir stageprofile-$(TARGET_SUBDIR); \
- mv stageprofile-$(TARGET_SUBDIR) $(TARGET_SUBDIR) ; \
+ mv stageprofile-$(TARGET_SUBDIR) $(TARGET_SUBDIR); \
mv stage1-$(TARGET_SUBDIR) prev-$(TARGET_SUBDIR) || test -f stage1-lean
stageprofile-end::
@if bfd
- @if test -d $(HOST_SUBDIR)/bfd ; then \
- cd $(HOST_SUBDIR); mv bfd stageprofile-bfd ; \
- mv prev-bfd stage1-bfd ; : ; \
+ @if test -d $(HOST_SUBDIR)/bfd; then \
+ cd $(HOST_SUBDIR); mv bfd stageprofile-bfd; \
+ mv prev-bfd stage1-bfd; : ; \
fi
@endif bfd
@if opcodes
- @if test -d $(HOST_SUBDIR)/opcodes ; then \
- cd $(HOST_SUBDIR); mv opcodes stageprofile-opcodes ; \
- mv prev-opcodes stage1-opcodes ; : ; \
+ @if test -d $(HOST_SUBDIR)/opcodes; then \
+ cd $(HOST_SUBDIR); mv opcodes stageprofile-opcodes; \
+ mv prev-opcodes stage1-opcodes; : ; \
fi
@endif opcodes
@if binutils
- @if test -d $(HOST_SUBDIR)/binutils ; then \
- cd $(HOST_SUBDIR); mv binutils stageprofile-binutils ; \
- mv prev-binutils stage1-binutils ; : ; \
+ @if test -d $(HOST_SUBDIR)/binutils; then \
+ cd $(HOST_SUBDIR); mv binutils stageprofile-binutils; \
+ mv prev-binutils stage1-binutils; : ; \
fi
@endif binutils
+@if fixincludes
+ @if test -d $(HOST_SUBDIR)/fixincludes; then \
+ cd $(HOST_SUBDIR); mv fixincludes stageprofile-fixincludes; \
+ mv prev-fixincludes stage1-fixincludes; : ; \
+ fi
+@endif fixincludes
@if gas
- @if test -d $(HOST_SUBDIR)/gas ; then \
- cd $(HOST_SUBDIR); mv gas stageprofile-gas ; \
- mv prev-gas stage1-gas ; : ; \
+ @if test -d $(HOST_SUBDIR)/gas; then \
+ cd $(HOST_SUBDIR); mv gas stageprofile-gas; \
+ mv prev-gas stage1-gas; : ; \
fi
@endif gas
@if gcc
- @if test -d $(HOST_SUBDIR)/gcc ; then \
- cd $(HOST_SUBDIR); mv gcc stageprofile-gcc ; \
- mv prev-gcc stage1-gcc ; : ; \
+ @if test -d $(HOST_SUBDIR)/gcc; then \
+ cd $(HOST_SUBDIR); mv gcc stageprofile-gcc; \
+ mv prev-gcc stage1-gcc; : ; \
fi
@endif gcc
@if gmp
- @if test -d $(HOST_SUBDIR)/gmp ; then \
- cd $(HOST_SUBDIR); mv gmp stageprofile-gmp ; \
- mv prev-gmp stage1-gmp ; : ; \
+ @if test -d $(HOST_SUBDIR)/gmp; then \
+ cd $(HOST_SUBDIR); mv gmp stageprofile-gmp; \
+ mv prev-gmp stage1-gmp; : ; \
fi
@endif gmp
@if mpfr
- @if test -d $(HOST_SUBDIR)/mpfr ; then \
- cd $(HOST_SUBDIR); mv mpfr stageprofile-mpfr ; \
- mv prev-mpfr stage1-mpfr ; : ; \
+ @if test -d $(HOST_SUBDIR)/mpfr; then \
+ cd $(HOST_SUBDIR); mv mpfr stageprofile-mpfr; \
+ mv prev-mpfr stage1-mpfr; : ; \
fi
@endif mpfr
@if mpc
- @if test -d $(HOST_SUBDIR)/mpc ; then \
- cd $(HOST_SUBDIR); mv mpc stageprofile-mpc ; \
- mv prev-mpc stage1-mpc ; : ; \
+ @if test -d $(HOST_SUBDIR)/mpc; then \
+ cd $(HOST_SUBDIR); mv mpc stageprofile-mpc; \
+ mv prev-mpc stage1-mpc; : ; \
fi
@endif mpc
@if isl
- @if test -d $(HOST_SUBDIR)/isl ; then \
- cd $(HOST_SUBDIR); mv isl stageprofile-isl ; \
- mv prev-isl stage1-isl ; : ; \
+ @if test -d $(HOST_SUBDIR)/isl; then \
+ cd $(HOST_SUBDIR); mv isl stageprofile-isl; \
+ mv prev-isl stage1-isl; : ; \
fi
@endif isl
-@if cloog
- @if test -d $(HOST_SUBDIR)/cloog ; then \
- cd $(HOST_SUBDIR); mv cloog stageprofile-cloog ; \
- mv prev-cloog stage1-cloog ; : ; \
- fi
-@endif cloog
@if libelf
- @if test -d $(HOST_SUBDIR)/libelf ; then \
- cd $(HOST_SUBDIR); mv libelf stageprofile-libelf ; \
- mv prev-libelf stage1-libelf ; : ; \
+ @if test -d $(HOST_SUBDIR)/libelf; then \
+ cd $(HOST_SUBDIR); mv libelf stageprofile-libelf; \
+ mv prev-libelf stage1-libelf; : ; \
fi
@endif libelf
@if gold
- @if test -d $(HOST_SUBDIR)/gold ; then \
- cd $(HOST_SUBDIR); mv gold stageprofile-gold ; \
- mv prev-gold stage1-gold ; : ; \
+ @if test -d $(HOST_SUBDIR)/gold; then \
+ cd $(HOST_SUBDIR); mv gold stageprofile-gold; \
+ mv prev-gold stage1-gold; : ; \
fi
@endif gold
@if intl
- @if test -d $(HOST_SUBDIR)/intl ; then \
- cd $(HOST_SUBDIR); mv intl stageprofile-intl ; \
- mv prev-intl stage1-intl ; : ; \
+ @if test -d $(HOST_SUBDIR)/intl; then \
+ cd $(HOST_SUBDIR); mv intl stageprofile-intl; \
+ mv prev-intl stage1-intl; : ; \
fi
@endif intl
@if ld
- @if test -d $(HOST_SUBDIR)/ld ; then \
- cd $(HOST_SUBDIR); mv ld stageprofile-ld ; \
- mv prev-ld stage1-ld ; : ; \
+ @if test -d $(HOST_SUBDIR)/ld; then \
+ cd $(HOST_SUBDIR); mv ld stageprofile-ld; \
+ mv prev-ld stage1-ld; : ; \
fi
@endif ld
@if libbacktrace
- @if test -d $(HOST_SUBDIR)/libbacktrace ; then \
- cd $(HOST_SUBDIR); mv libbacktrace stageprofile-libbacktrace ; \
- mv prev-libbacktrace stage1-libbacktrace ; : ; \
+ @if test -d $(HOST_SUBDIR)/libbacktrace; then \
+ cd $(HOST_SUBDIR); mv libbacktrace stageprofile-libbacktrace; \
+ mv prev-libbacktrace stage1-libbacktrace; : ; \
fi
@endif libbacktrace
@if libcpp
- @if test -d $(HOST_SUBDIR)/libcpp ; then \
- cd $(HOST_SUBDIR); mv libcpp stageprofile-libcpp ; \
- mv prev-libcpp stage1-libcpp ; : ; \
+ @if test -d $(HOST_SUBDIR)/libcpp; then \
+ cd $(HOST_SUBDIR); mv libcpp stageprofile-libcpp; \
+ mv prev-libcpp stage1-libcpp; : ; \
fi
@endif libcpp
@if libdecnumber
- @if test -d $(HOST_SUBDIR)/libdecnumber ; then \
- cd $(HOST_SUBDIR); mv libdecnumber stageprofile-libdecnumber ; \
- mv prev-libdecnumber stage1-libdecnumber ; : ; \
+ @if test -d $(HOST_SUBDIR)/libdecnumber; then \
+ cd $(HOST_SUBDIR); mv libdecnumber stageprofile-libdecnumber; \
+ mv prev-libdecnumber stage1-libdecnumber; : ; \
fi
@endif libdecnumber
@if libiberty
- @if test -d $(HOST_SUBDIR)/libiberty ; then \
- cd $(HOST_SUBDIR); mv libiberty stageprofile-libiberty ; \
- mv prev-libiberty stage1-libiberty ; : ; \
+ @if test -d $(HOST_SUBDIR)/libiberty; then \
+ cd $(HOST_SUBDIR); mv libiberty stageprofile-libiberty; \
+ mv prev-libiberty stage1-libiberty; : ; \
fi
@endif libiberty
+@if libiberty-linker-plugin
+ @if test -d $(HOST_SUBDIR)/libiberty-linker-plugin; then \
+ cd $(HOST_SUBDIR); mv libiberty-linker-plugin stageprofile-libiberty-linker-plugin; \
+ mv prev-libiberty-linker-plugin stage1-libiberty-linker-plugin; : ; \
+ fi
+@endif libiberty-linker-plugin
+@if libiconv
+ @if test -d $(HOST_SUBDIR)/libiconv; then \
+ cd $(HOST_SUBDIR); mv libiconv stageprofile-libiconv; \
+ mv prev-libiconv stage1-libiconv; : ; \
+ fi
+@endif libiconv
@if zlib
- @if test -d $(HOST_SUBDIR)/zlib ; then \
- cd $(HOST_SUBDIR); mv zlib stageprofile-zlib ; \
- mv prev-zlib stage1-zlib ; : ; \
+ @if test -d $(HOST_SUBDIR)/zlib; then \
+ cd $(HOST_SUBDIR); mv zlib stageprofile-zlib; \
+ mv prev-zlib stage1-zlib; : ; \
fi
@endif zlib
@if lto-plugin
- @if test -d $(HOST_SUBDIR)/lto-plugin ; then \
- cd $(HOST_SUBDIR); mv lto-plugin stageprofile-lto-plugin ; \
- mv prev-lto-plugin stage1-lto-plugin ; : ; \
+ @if test -d $(HOST_SUBDIR)/lto-plugin; then \
+ cd $(HOST_SUBDIR); mv lto-plugin stageprofile-lto-plugin; \
+ mv prev-lto-plugin stage1-lto-plugin; : ; \
fi
@endif lto-plugin
- @if test -d $(TARGET_SUBDIR) ; then \
- mv $(TARGET_SUBDIR) stageprofile-$(TARGET_SUBDIR) ; \
- mv prev-$(TARGET_SUBDIR) stage1-$(TARGET_SUBDIR) ; : ; \
+ @if test -d $(TARGET_SUBDIR); then \
+ mv $(TARGET_SUBDIR) stageprofile-$(TARGET_SUBDIR); \
+ mv prev-$(TARGET_SUBDIR) stage1-$(TARGET_SUBDIR); : ; \
fi
rm -f stage_current
@@ -45980,8 +49537,8 @@ stageprofile-end::
stageprofile-bubble:: stage1-bubble
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- if test -f stageprofile-lean || test -f stage1-lean ; then \
- echo Skipping rebuild of stageprofile ; \
+ if test -f stageprofile-lean || test -f stage1-lean ; then \
+ echo Skipping rebuild of stageprofile; \
else \
$(MAKE) stageprofile-start; \
$(MAKE) $(RECURSE_FLAGS_TO_PASS) all-stageprofile; \
@@ -46013,258 +49570,282 @@ distclean-stageprofile::
stagefeedback-start::
@: $(MAKE); $(stage); \
- echo stagefeedback > stage_current ; \
+ echo stagefeedback > stage_current; \
echo stagefeedback > stage_last; \
$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)
@if bfd
@cd $(HOST_SUBDIR); [ -d stagefeedback-bfd ] || \
mkdir stagefeedback-bfd; \
- mv stagefeedback-bfd bfd ; \
+ mv stagefeedback-bfd bfd; \
mv stageprofile-bfd prev-bfd || test -f stageprofile-lean
@endif bfd
@if opcodes
@cd $(HOST_SUBDIR); [ -d stagefeedback-opcodes ] || \
mkdir stagefeedback-opcodes; \
- mv stagefeedback-opcodes opcodes ; \
+ mv stagefeedback-opcodes opcodes; \
mv stageprofile-opcodes prev-opcodes || test -f stageprofile-lean
@endif opcodes
@if binutils
@cd $(HOST_SUBDIR); [ -d stagefeedback-binutils ] || \
mkdir stagefeedback-binutils; \
- mv stagefeedback-binutils binutils ; \
+ mv stagefeedback-binutils binutils; \
mv stageprofile-binutils prev-binutils || test -f stageprofile-lean
@endif binutils
+@if fixincludes
+ @cd $(HOST_SUBDIR); [ -d stagefeedback-fixincludes ] || \
+ mkdir stagefeedback-fixincludes; \
+ mv stagefeedback-fixincludes fixincludes; \
+ mv stageprofile-fixincludes prev-fixincludes || test -f stageprofile-lean
+@endif fixincludes
@if gas
@cd $(HOST_SUBDIR); [ -d stagefeedback-gas ] || \
mkdir stagefeedback-gas; \
- mv stagefeedback-gas gas ; \
+ mv stagefeedback-gas gas; \
mv stageprofile-gas prev-gas || test -f stageprofile-lean
@endif gas
@if gcc
@cd $(HOST_SUBDIR); [ -d stagefeedback-gcc ] || \
mkdir stagefeedback-gcc; \
- mv stagefeedback-gcc gcc ; \
+ mv stagefeedback-gcc gcc; \
mv stageprofile-gcc prev-gcc || test -f stageprofile-lean
@endif gcc
@if gmp
@cd $(HOST_SUBDIR); [ -d stagefeedback-gmp ] || \
mkdir stagefeedback-gmp; \
- mv stagefeedback-gmp gmp ; \
+ mv stagefeedback-gmp gmp; \
mv stageprofile-gmp prev-gmp || test -f stageprofile-lean
@endif gmp
@if mpfr
@cd $(HOST_SUBDIR); [ -d stagefeedback-mpfr ] || \
mkdir stagefeedback-mpfr; \
- mv stagefeedback-mpfr mpfr ; \
+ mv stagefeedback-mpfr mpfr; \
mv stageprofile-mpfr prev-mpfr || test -f stageprofile-lean
@endif mpfr
@if mpc
@cd $(HOST_SUBDIR); [ -d stagefeedback-mpc ] || \
mkdir stagefeedback-mpc; \
- mv stagefeedback-mpc mpc ; \
+ mv stagefeedback-mpc mpc; \
mv stageprofile-mpc prev-mpc || test -f stageprofile-lean
@endif mpc
@if isl
@cd $(HOST_SUBDIR); [ -d stagefeedback-isl ] || \
mkdir stagefeedback-isl; \
- mv stagefeedback-isl isl ; \
+ mv stagefeedback-isl isl; \
mv stageprofile-isl prev-isl || test -f stageprofile-lean
@endif isl
-@if cloog
- @cd $(HOST_SUBDIR); [ -d stagefeedback-cloog ] || \
- mkdir stagefeedback-cloog; \
- mv stagefeedback-cloog cloog ; \
- mv stageprofile-cloog prev-cloog || test -f stageprofile-lean
-@endif cloog
@if libelf
@cd $(HOST_SUBDIR); [ -d stagefeedback-libelf ] || \
mkdir stagefeedback-libelf; \
- mv stagefeedback-libelf libelf ; \
+ mv stagefeedback-libelf libelf; \
mv stageprofile-libelf prev-libelf || test -f stageprofile-lean
@endif libelf
@if gold
@cd $(HOST_SUBDIR); [ -d stagefeedback-gold ] || \
mkdir stagefeedback-gold; \
- mv stagefeedback-gold gold ; \
+ mv stagefeedback-gold gold; \
mv stageprofile-gold prev-gold || test -f stageprofile-lean
@endif gold
@if intl
@cd $(HOST_SUBDIR); [ -d stagefeedback-intl ] || \
mkdir stagefeedback-intl; \
- mv stagefeedback-intl intl ; \
+ mv stagefeedback-intl intl; \
mv stageprofile-intl prev-intl || test -f stageprofile-lean
@endif intl
@if ld
@cd $(HOST_SUBDIR); [ -d stagefeedback-ld ] || \
mkdir stagefeedback-ld; \
- mv stagefeedback-ld ld ; \
+ mv stagefeedback-ld ld; \
mv stageprofile-ld prev-ld || test -f stageprofile-lean
@endif ld
@if libbacktrace
@cd $(HOST_SUBDIR); [ -d stagefeedback-libbacktrace ] || \
mkdir stagefeedback-libbacktrace; \
- mv stagefeedback-libbacktrace libbacktrace ; \
+ mv stagefeedback-libbacktrace libbacktrace; \
mv stageprofile-libbacktrace prev-libbacktrace || test -f stageprofile-lean
@endif libbacktrace
@if libcpp
@cd $(HOST_SUBDIR); [ -d stagefeedback-libcpp ] || \
mkdir stagefeedback-libcpp; \
- mv stagefeedback-libcpp libcpp ; \
+ mv stagefeedback-libcpp libcpp; \
mv stageprofile-libcpp prev-libcpp || test -f stageprofile-lean
@endif libcpp
@if libdecnumber
@cd $(HOST_SUBDIR); [ -d stagefeedback-libdecnumber ] || \
mkdir stagefeedback-libdecnumber; \
- mv stagefeedback-libdecnumber libdecnumber ; \
+ mv stagefeedback-libdecnumber libdecnumber; \
mv stageprofile-libdecnumber prev-libdecnumber || test -f stageprofile-lean
@endif libdecnumber
@if libiberty
@cd $(HOST_SUBDIR); [ -d stagefeedback-libiberty ] || \
mkdir stagefeedback-libiberty; \
- mv stagefeedback-libiberty libiberty ; \
+ mv stagefeedback-libiberty libiberty; \
mv stageprofile-libiberty prev-libiberty || test -f stageprofile-lean
@endif libiberty
+@if libiberty-linker-plugin
+ @cd $(HOST_SUBDIR); [ -d stagefeedback-libiberty-linker-plugin ] || \
+ mkdir stagefeedback-libiberty-linker-plugin; \
+ mv stagefeedback-libiberty-linker-plugin libiberty-linker-plugin; \
+ mv stageprofile-libiberty-linker-plugin prev-libiberty-linker-plugin || test -f stageprofile-lean
+@endif libiberty-linker-plugin
+@if libiconv
+ @cd $(HOST_SUBDIR); [ -d stagefeedback-libiconv ] || \
+ mkdir stagefeedback-libiconv; \
+ mv stagefeedback-libiconv libiconv; \
+ mv stageprofile-libiconv prev-libiconv || test -f stageprofile-lean
+@endif libiconv
@if zlib
@cd $(HOST_SUBDIR); [ -d stagefeedback-zlib ] || \
mkdir stagefeedback-zlib; \
- mv stagefeedback-zlib zlib ; \
+ mv stagefeedback-zlib zlib; \
mv stageprofile-zlib prev-zlib || test -f stageprofile-lean
@endif zlib
@if lto-plugin
@cd $(HOST_SUBDIR); [ -d stagefeedback-lto-plugin ] || \
mkdir stagefeedback-lto-plugin; \
- mv stagefeedback-lto-plugin lto-plugin ; \
+ mv stagefeedback-lto-plugin lto-plugin; \
mv stageprofile-lto-plugin prev-lto-plugin || test -f stageprofile-lean
@endif lto-plugin
@[ -d stagefeedback-$(TARGET_SUBDIR) ] || \
mkdir stagefeedback-$(TARGET_SUBDIR); \
- mv stagefeedback-$(TARGET_SUBDIR) $(TARGET_SUBDIR) ; \
+ mv stagefeedback-$(TARGET_SUBDIR) $(TARGET_SUBDIR); \
mv stageprofile-$(TARGET_SUBDIR) prev-$(TARGET_SUBDIR) || test -f stageprofile-lean
stagefeedback-end::
@if bfd
- @if test -d $(HOST_SUBDIR)/bfd ; then \
- cd $(HOST_SUBDIR); mv bfd stagefeedback-bfd ; \
- mv prev-bfd stageprofile-bfd ; : ; \
+ @if test -d $(HOST_SUBDIR)/bfd; then \
+ cd $(HOST_SUBDIR); mv bfd stagefeedback-bfd; \
+ mv prev-bfd stageprofile-bfd; : ; \
fi
@endif bfd
@if opcodes
- @if test -d $(HOST_SUBDIR)/opcodes ; then \
- cd $(HOST_SUBDIR); mv opcodes stagefeedback-opcodes ; \
- mv prev-opcodes stageprofile-opcodes ; : ; \
+ @if test -d $(HOST_SUBDIR)/opcodes; then \
+ cd $(HOST_SUBDIR); mv opcodes stagefeedback-opcodes; \
+ mv prev-opcodes stageprofile-opcodes; : ; \
fi
@endif opcodes
@if binutils
- @if test -d $(HOST_SUBDIR)/binutils ; then \
- cd $(HOST_SUBDIR); mv binutils stagefeedback-binutils ; \
- mv prev-binutils stageprofile-binutils ; : ; \
+ @if test -d $(HOST_SUBDIR)/binutils; then \
+ cd $(HOST_SUBDIR); mv binutils stagefeedback-binutils; \
+ mv prev-binutils stageprofile-binutils; : ; \
fi
@endif binutils
+@if fixincludes
+ @if test -d $(HOST_SUBDIR)/fixincludes; then \
+ cd $(HOST_SUBDIR); mv fixincludes stagefeedback-fixincludes; \
+ mv prev-fixincludes stageprofile-fixincludes; : ; \
+ fi
+@endif fixincludes
@if gas
- @if test -d $(HOST_SUBDIR)/gas ; then \
- cd $(HOST_SUBDIR); mv gas stagefeedback-gas ; \
- mv prev-gas stageprofile-gas ; : ; \
+ @if test -d $(HOST_SUBDIR)/gas; then \
+ cd $(HOST_SUBDIR); mv gas stagefeedback-gas; \
+ mv prev-gas stageprofile-gas; : ; \
fi
@endif gas
@if gcc
- @if test -d $(HOST_SUBDIR)/gcc ; then \
- cd $(HOST_SUBDIR); mv gcc stagefeedback-gcc ; \
- mv prev-gcc stageprofile-gcc ; : ; \
+ @if test -d $(HOST_SUBDIR)/gcc; then \
+ cd $(HOST_SUBDIR); mv gcc stagefeedback-gcc; \
+ mv prev-gcc stageprofile-gcc; : ; \
fi
@endif gcc
@if gmp
- @if test -d $(HOST_SUBDIR)/gmp ; then \
- cd $(HOST_SUBDIR); mv gmp stagefeedback-gmp ; \
- mv prev-gmp stageprofile-gmp ; : ; \
+ @if test -d $(HOST_SUBDIR)/gmp; then \
+ cd $(HOST_SUBDIR); mv gmp stagefeedback-gmp; \
+ mv prev-gmp stageprofile-gmp; : ; \
fi
@endif gmp
@if mpfr
- @if test -d $(HOST_SUBDIR)/mpfr ; then \
- cd $(HOST_SUBDIR); mv mpfr stagefeedback-mpfr ; \
- mv prev-mpfr stageprofile-mpfr ; : ; \
+ @if test -d $(HOST_SUBDIR)/mpfr; then \
+ cd $(HOST_SUBDIR); mv mpfr stagefeedback-mpfr; \
+ mv prev-mpfr stageprofile-mpfr; : ; \
fi
@endif mpfr
@if mpc
- @if test -d $(HOST_SUBDIR)/mpc ; then \
- cd $(HOST_SUBDIR); mv mpc stagefeedback-mpc ; \
- mv prev-mpc stageprofile-mpc ; : ; \
+ @if test -d $(HOST_SUBDIR)/mpc; then \
+ cd $(HOST_SUBDIR); mv mpc stagefeedback-mpc; \
+ mv prev-mpc stageprofile-mpc; : ; \
fi
@endif mpc
@if isl
- @if test -d $(HOST_SUBDIR)/isl ; then \
- cd $(HOST_SUBDIR); mv isl stagefeedback-isl ; \
- mv prev-isl stageprofile-isl ; : ; \
+ @if test -d $(HOST_SUBDIR)/isl; then \
+ cd $(HOST_SUBDIR); mv isl stagefeedback-isl; \
+ mv prev-isl stageprofile-isl; : ; \
fi
@endif isl
-@if cloog
- @if test -d $(HOST_SUBDIR)/cloog ; then \
- cd $(HOST_SUBDIR); mv cloog stagefeedback-cloog ; \
- mv prev-cloog stageprofile-cloog ; : ; \
- fi
-@endif cloog
@if libelf
- @if test -d $(HOST_SUBDIR)/libelf ; then \
- cd $(HOST_SUBDIR); mv libelf stagefeedback-libelf ; \
- mv prev-libelf stageprofile-libelf ; : ; \
+ @if test -d $(HOST_SUBDIR)/libelf; then \
+ cd $(HOST_SUBDIR); mv libelf stagefeedback-libelf; \
+ mv prev-libelf stageprofile-libelf; : ; \
fi
@endif libelf
@if gold
- @if test -d $(HOST_SUBDIR)/gold ; then \
- cd $(HOST_SUBDIR); mv gold stagefeedback-gold ; \
- mv prev-gold stageprofile-gold ; : ; \
+ @if test -d $(HOST_SUBDIR)/gold; then \
+ cd $(HOST_SUBDIR); mv gold stagefeedback-gold; \
+ mv prev-gold stageprofile-gold; : ; \
fi
@endif gold
@if intl
- @if test -d $(HOST_SUBDIR)/intl ; then \
- cd $(HOST_SUBDIR); mv intl stagefeedback-intl ; \
- mv prev-intl stageprofile-intl ; : ; \
+ @if test -d $(HOST_SUBDIR)/intl; then \
+ cd $(HOST_SUBDIR); mv intl stagefeedback-intl; \
+ mv prev-intl stageprofile-intl; : ; \
fi
@endif intl
@if ld
- @if test -d $(HOST_SUBDIR)/ld ; then \
- cd $(HOST_SUBDIR); mv ld stagefeedback-ld ; \
- mv prev-ld stageprofile-ld ; : ; \
+ @if test -d $(HOST_SUBDIR)/ld; then \
+ cd $(HOST_SUBDIR); mv ld stagefeedback-ld; \
+ mv prev-ld stageprofile-ld; : ; \
fi
@endif ld
@if libbacktrace
- @if test -d $(HOST_SUBDIR)/libbacktrace ; then \
- cd $(HOST_SUBDIR); mv libbacktrace stagefeedback-libbacktrace ; \
- mv prev-libbacktrace stageprofile-libbacktrace ; : ; \
+ @if test -d $(HOST_SUBDIR)/libbacktrace; then \
+ cd $(HOST_SUBDIR); mv libbacktrace stagefeedback-libbacktrace; \
+ mv prev-libbacktrace stageprofile-libbacktrace; : ; \
fi
@endif libbacktrace
@if libcpp
- @if test -d $(HOST_SUBDIR)/libcpp ; then \
- cd $(HOST_SUBDIR); mv libcpp stagefeedback-libcpp ; \
- mv prev-libcpp stageprofile-libcpp ; : ; \
+ @if test -d $(HOST_SUBDIR)/libcpp; then \
+ cd $(HOST_SUBDIR); mv libcpp stagefeedback-libcpp; \
+ mv prev-libcpp stageprofile-libcpp; : ; \
fi
@endif libcpp
@if libdecnumber
- @if test -d $(HOST_SUBDIR)/libdecnumber ; then \
- cd $(HOST_SUBDIR); mv libdecnumber stagefeedback-libdecnumber ; \
- mv prev-libdecnumber stageprofile-libdecnumber ; : ; \
+ @if test -d $(HOST_SUBDIR)/libdecnumber; then \
+ cd $(HOST_SUBDIR); mv libdecnumber stagefeedback-libdecnumber; \
+ mv prev-libdecnumber stageprofile-libdecnumber; : ; \
fi
@endif libdecnumber
@if libiberty
- @if test -d $(HOST_SUBDIR)/libiberty ; then \
- cd $(HOST_SUBDIR); mv libiberty stagefeedback-libiberty ; \
- mv prev-libiberty stageprofile-libiberty ; : ; \
+ @if test -d $(HOST_SUBDIR)/libiberty; then \
+ cd $(HOST_SUBDIR); mv libiberty stagefeedback-libiberty; \
+ mv prev-libiberty stageprofile-libiberty; : ; \
fi
@endif libiberty
+@if libiberty-linker-plugin
+ @if test -d $(HOST_SUBDIR)/libiberty-linker-plugin; then \
+ cd $(HOST_SUBDIR); mv libiberty-linker-plugin stagefeedback-libiberty-linker-plugin; \
+ mv prev-libiberty-linker-plugin stageprofile-libiberty-linker-plugin; : ; \
+ fi
+@endif libiberty-linker-plugin
+@if libiconv
+ @if test -d $(HOST_SUBDIR)/libiconv; then \
+ cd $(HOST_SUBDIR); mv libiconv stagefeedback-libiconv; \
+ mv prev-libiconv stageprofile-libiconv; : ; \
+ fi
+@endif libiconv
@if zlib
- @if test -d $(HOST_SUBDIR)/zlib ; then \
- cd $(HOST_SUBDIR); mv zlib stagefeedback-zlib ; \
- mv prev-zlib stageprofile-zlib ; : ; \
+ @if test -d $(HOST_SUBDIR)/zlib; then \
+ cd $(HOST_SUBDIR); mv zlib stagefeedback-zlib; \
+ mv prev-zlib stageprofile-zlib; : ; \
fi
@endif zlib
@if lto-plugin
- @if test -d $(HOST_SUBDIR)/lto-plugin ; then \
- cd $(HOST_SUBDIR); mv lto-plugin stagefeedback-lto-plugin ; \
- mv prev-lto-plugin stageprofile-lto-plugin ; : ; \
+ @if test -d $(HOST_SUBDIR)/lto-plugin; then \
+ cd $(HOST_SUBDIR); mv lto-plugin stagefeedback-lto-plugin; \
+ mv prev-lto-plugin stageprofile-lto-plugin; : ; \
fi
@endif lto-plugin
- @if test -d $(TARGET_SUBDIR) ; then \
- mv $(TARGET_SUBDIR) stagefeedback-$(TARGET_SUBDIR) ; \
- mv prev-$(TARGET_SUBDIR) stageprofile-$(TARGET_SUBDIR) ; : ; \
+ @if test -d $(TARGET_SUBDIR); then \
+ mv $(TARGET_SUBDIR) stagefeedback-$(TARGET_SUBDIR); \
+ mv prev-$(TARGET_SUBDIR) stageprofile-$(TARGET_SUBDIR); : ; \
fi
rm -f stage_current
@@ -46275,8 +49856,8 @@ stagefeedback-end::
stagefeedback-bubble:: stageprofile-bubble
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- if test -f stagefeedback-lean || test -f stageprofile-lean ; then \
- echo Skipping rebuild of stagefeedback ; \
+ if test -f stagefeedback-lean || test -f stageprofile-lean ; then \
+ echo Skipping rebuild of stagefeedback; \
else \
$(MAKE) stagefeedback-start; \
$(MAKE) $(RECURSE_FLAGS_TO_PASS) all-stagefeedback; \
@@ -46335,10 +49916,10 @@ stagefeedback-start::
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
for i in prev-*; do \
- j=`echo $$i | sed s/^prev-//` ; \
+ j=`echo $$i | sed s/^prev-//`; \
cd $$r/$$i && \
- { find . -type d | sort | sed 's,.*,$(SHELL) '"$$s"'/mkinstalldirs "../'$$j'/&",' | $(SHELL) ; } && \
- { find . -name '*.*da' | sed 's,.*,$(LN) -f "&" "../'$$j'/&",' | $(SHELL) ; } ; \
+ { find . -type d | sort | sed 's,.*,$(SHELL) '"$$s"'/mkinstalldirs "../'$$j'/&",' | $(SHELL); } && \
+ { find . -name '*.*da' | sed 's,.*,$(LN) -f "&" "../'$$j'/&",' | $(SHELL); }; \
done
@if gcc-bootstrap
@@ -46375,19 +49956,26 @@ configure-stage3-target-libstdc++-v3: maybe-all-stage3-gcc
configure-stage4-target-libstdc++-v3: maybe-all-stage4-gcc
configure-stageprofile-target-libstdc++-v3: maybe-all-stageprofile-gcc
configure-stagefeedback-target-libstdc++-v3: maybe-all-stagefeedback-gcc
-configure-target-libmudflap: stage_last
configure-stage1-target-libsanitizer: maybe-all-stage1-gcc
configure-stage2-target-libsanitizer: maybe-all-stage2-gcc
configure-stage3-target-libsanitizer: maybe-all-stage3-gcc
configure-stage4-target-libsanitizer: maybe-all-stage4-gcc
configure-stageprofile-target-libsanitizer: maybe-all-stageprofile-gcc
configure-stagefeedback-target-libsanitizer: maybe-all-stagefeedback-gcc
+configure-stage1-target-libmpx: maybe-all-stage1-gcc
+configure-stage2-target-libmpx: maybe-all-stage2-gcc
+configure-stage3-target-libmpx: maybe-all-stage3-gcc
+configure-stage4-target-libmpx: maybe-all-stage4-gcc
+configure-stageprofile-target-libmpx: maybe-all-stageprofile-gcc
+configure-stagefeedback-target-libmpx: maybe-all-stagefeedback-gcc
configure-stage1-target-libvtv: maybe-all-stage1-gcc
configure-stage2-target-libvtv: maybe-all-stage2-gcc
configure-stage3-target-libvtv: maybe-all-stage3-gcc
configure-stage4-target-libvtv: maybe-all-stage4-gcc
configure-stageprofile-target-libvtv: maybe-all-stageprofile-gcc
configure-stagefeedback-target-libvtv: maybe-all-stagefeedback-gcc
+configure-target-libcilkrts: stage_last
+configure-target-liboffloadmic: stage_last
configure-target-libssp: stage_last
configure-target-newlib: stage_last
configure-stage1-target-libgcc: maybe-all-stage1-gcc
@@ -46422,9 +50010,11 @@ configure-target-libatomic: stage_last
@if gcc-no-bootstrap
configure-target-libstdc++-v3: maybe-all-gcc
-configure-target-libmudflap: maybe-all-gcc
configure-target-libsanitizer: maybe-all-gcc
+configure-target-libmpx: maybe-all-gcc
configure-target-libvtv: maybe-all-gcc
+configure-target-libcilkrts: maybe-all-gcc
+configure-target-liboffloadmic: maybe-all-gcc
configure-target-libssp: maybe-all-gcc
configure-target-newlib: maybe-all-gcc
configure-target-libgcc: maybe-all-gcc
@@ -46472,6 +50062,7 @@ all-build-flex: maybe-all-build-m4
all-build-libiberty: maybe-all-build-texinfo
all-build-m4: maybe-all-build-texinfo
all-build-fixincludes: maybe-all-build-libiberty
+all-build-libcpp: maybe-all-build-libiberty
configure-gcc: maybe-configure-intl
configure-stage1-gcc: maybe-configure-stage1-intl
@@ -46488,6 +50079,30 @@ configure-stage3-gcc: maybe-all-stage3-gmp
configure-stage4-gcc: maybe-all-stage4-gmp
configure-stageprofile-gcc: maybe-all-stageprofile-gmp
configure-stagefeedback-gcc: maybe-all-stagefeedback-gmp
+configure-gcc: maybe-all-mpfr
+
+configure-stage1-gcc: maybe-all-stage1-mpfr
+configure-stage2-gcc: maybe-all-stage2-mpfr
+configure-stage3-gcc: maybe-all-stage3-mpfr
+configure-stage4-gcc: maybe-all-stage4-mpfr
+configure-stageprofile-gcc: maybe-all-stageprofile-mpfr
+configure-stagefeedback-gcc: maybe-all-stagefeedback-mpfr
+configure-gcc: maybe-all-mpc
+
+configure-stage1-gcc: maybe-all-stage1-mpc
+configure-stage2-gcc: maybe-all-stage2-mpc
+configure-stage3-gcc: maybe-all-stage3-mpc
+configure-stage4-gcc: maybe-all-stage4-mpc
+configure-stageprofile-gcc: maybe-all-stageprofile-mpc
+configure-stagefeedback-gcc: maybe-all-stagefeedback-mpc
+configure-gcc: maybe-all-isl
+
+configure-stage1-gcc: maybe-all-stage1-isl
+configure-stage2-gcc: maybe-all-stage2-isl
+configure-stage3-gcc: maybe-all-stage3-isl
+configure-stage4-gcc: maybe-all-stage4-isl
+configure-stageprofile-gcc: maybe-all-stageprofile-isl
+configure-stagefeedback-gcc: maybe-all-stagefeedback-isl
configure-gcc: maybe-all-lto-plugin
configure-stage1-gcc: maybe-all-stage1-lto-plugin
@@ -46536,6 +50151,14 @@ configure-stage3-gcc: maybe-all-stage3-libelf
configure-stage4-gcc: maybe-all-stage4-libelf
configure-stageprofile-gcc: maybe-all-stageprofile-libelf
configure-stagefeedback-gcc: maybe-all-stagefeedback-libelf
+configure-gcc: maybe-all-libiconv
+
+configure-stage1-gcc: maybe-all-stage1-libiconv
+configure-stage2-gcc: maybe-all-stage2-libiconv
+configure-stage3-gcc: maybe-all-stage3-libiconv
+configure-stage4-gcc: maybe-all-stage4-libiconv
+configure-stageprofile-gcc: maybe-all-stageprofile-libiconv
+configure-stagefeedback-gcc: maybe-all-stagefeedback-libiconv
all-gcc: all-libiberty
all-stage1-gcc: all-stage1-libiberty
@@ -46568,14 +50191,14 @@ all-stage3-gcc: maybe-all-stage3-mpc
all-stage4-gcc: maybe-all-stage4-mpc
all-stageprofile-gcc: maybe-all-stageprofile-mpc
all-stagefeedback-gcc: maybe-all-stagefeedback-mpc
-all-gcc: maybe-all-cloog
-
-all-stage1-gcc: maybe-all-stage1-cloog
-all-stage2-gcc: maybe-all-stage2-cloog
-all-stage3-gcc: maybe-all-stage3-cloog
-all-stage4-gcc: maybe-all-stage4-cloog
-all-stageprofile-gcc: maybe-all-stageprofile-cloog
-all-stagefeedback-gcc: maybe-all-stagefeedback-cloog
+all-gcc: maybe-all-isl
+
+all-stage1-gcc: maybe-all-stage1-isl
+all-stage2-gcc: maybe-all-stage2-isl
+all-stage3-gcc: maybe-all-stage3-isl
+all-stage4-gcc: maybe-all-stage4-isl
+all-stageprofile-gcc: maybe-all-stageprofile-isl
+all-stagefeedback-gcc: maybe-all-stagefeedback-isl
all-gcc: maybe-all-build-texinfo
all-stage1-gcc: maybe-all-build-texinfo
@@ -46616,6 +50239,14 @@ all-stage3-gcc: maybe-all-build-fixincludes
all-stage4-gcc: maybe-all-build-fixincludes
all-stageprofile-gcc: maybe-all-build-fixincludes
all-stagefeedback-gcc: maybe-all-build-fixincludes
+all-gcc: maybe-all-build-libcpp
+
+all-stage1-gcc: maybe-all-build-libcpp
+all-stage2-gcc: maybe-all-build-libcpp
+all-stage3-gcc: maybe-all-build-libcpp
+all-stage4-gcc: maybe-all-build-libcpp
+all-stageprofile-gcc: maybe-all-build-libcpp
+all-stagefeedback-gcc: maybe-all-build-libcpp
all-gcc: maybe-all-zlib
all-stage1-gcc: maybe-all-stage1-zlib
@@ -46657,6 +50288,13 @@ all-stage4-gcc: maybe-all-stage4-libiberty
all-stageprofile-gcc: maybe-all-stageprofile-libiberty
all-stagefeedback-gcc: maybe-all-stagefeedback-libiberty
all-gcc: maybe-all-fixincludes
+
+all-stage1-gcc: maybe-all-stage1-fixincludes
+all-stage2-gcc: maybe-all-stage2-fixincludes
+all-stage3-gcc: maybe-all-stage3-fixincludes
+all-stage4-gcc: maybe-all-stage4-fixincludes
+all-stageprofile-gcc: maybe-all-stageprofile-fixincludes
+all-stagefeedback-gcc: maybe-all-stagefeedback-fixincludes
all-gcc: maybe-all-lto-plugin
all-stage1-gcc: maybe-all-stage1-lto-plugin
@@ -46665,6 +50303,14 @@ all-stage3-gcc: maybe-all-stage3-lto-plugin
all-stage4-gcc: maybe-all-stage4-lto-plugin
all-stageprofile-gcc: maybe-all-stageprofile-lto-plugin
all-stagefeedback-gcc: maybe-all-stagefeedback-lto-plugin
+all-gcc: maybe-all-libiconv
+
+all-stage1-gcc: maybe-all-stage1-libiconv
+all-stage2-gcc: maybe-all-stage2-libiconv
+all-stage3-gcc: maybe-all-stage3-libiconv
+all-stage4-gcc: maybe-all-stage4-libiconv
+all-stageprofile-gcc: maybe-all-stageprofile-libiconv
+all-stagefeedback-gcc: maybe-all-stagefeedback-libiconv
info-gcc: maybe-all-build-libiberty
info-stage1-gcc: maybe-all-build-libiberty
@@ -46717,6 +50363,14 @@ configure-stage3-libcpp: maybe-configure-stage3-intl
configure-stage4-libcpp: maybe-configure-stage4-intl
configure-stageprofile-libcpp: maybe-configure-stageprofile-intl
configure-stagefeedback-libcpp: maybe-configure-stagefeedback-intl
+configure-libcpp: maybe-all-libiconv
+
+configure-stage1-libcpp: maybe-all-stage1-libiconv
+configure-stage2-libcpp: maybe-all-stage2-libiconv
+configure-stage3-libcpp: maybe-all-stage3-libiconv
+configure-stage4-libcpp: maybe-all-stage4-libiconv
+configure-stageprofile-libcpp: maybe-all-stageprofile-libiconv
+configure-stagefeedback-libcpp: maybe-all-stagefeedback-libiconv
all-libcpp: all-libiberty
all-stage1-libcpp: all-stage1-libiberty
@@ -46733,8 +50387,24 @@ all-stage3-libcpp: maybe-all-stage3-intl
all-stage4-libcpp: maybe-all-stage4-intl
all-stageprofile-libcpp: maybe-all-stageprofile-intl
all-stagefeedback-libcpp: maybe-all-stagefeedback-intl
+all-libcpp: maybe-all-libiconv
+
+all-stage1-libcpp: maybe-all-stage1-libiconv
+all-stage2-libcpp: maybe-all-stage2-libiconv
+all-stage3-libcpp: maybe-all-stage3-libiconv
+all-stage4-libcpp: maybe-all-stage4-libiconv
+all-stageprofile-libcpp: maybe-all-stageprofile-libiconv
+all-stagefeedback-libcpp: maybe-all-stagefeedback-libiconv
all-fixincludes: maybe-all-libiberty
+
+all-stage1-fixincludes: maybe-all-stage1-libiberty
+all-stage2-fixincludes: maybe-all-stage2-libiberty
+all-stage3-fixincludes: maybe-all-stage3-libiberty
+all-stage4-fixincludes: maybe-all-stage4-libiberty
+all-stageprofile-fixincludes: maybe-all-stageprofile-libiberty
+all-stagefeedback-fixincludes: maybe-all-stagefeedback-libiberty
all-gnattools: maybe-all-target-libada
+all-gnattools: maybe-all-target-libstdc++-v3
all-lto-plugin: maybe-all-libiberty
all-stage1-lto-plugin: maybe-all-stage1-libiberty
@@ -46743,7 +50413,26 @@ all-stage3-lto-plugin: maybe-all-stage3-libiberty
all-stage4-lto-plugin: maybe-all-stage4-libiberty
all-stageprofile-lto-plugin: maybe-all-stageprofile-libiberty
all-stagefeedback-lto-plugin: maybe-all-stagefeedback-libiberty
+all-lto-plugin: maybe-all-libiberty-linker-plugin
+
+all-stage1-lto-plugin: maybe-all-stage1-libiberty-linker-plugin
+all-stage2-lto-plugin: maybe-all-stage2-libiberty-linker-plugin
+all-stage3-lto-plugin: maybe-all-stage3-libiberty-linker-plugin
+all-stage4-lto-plugin: maybe-all-stage4-libiberty-linker-plugin
+all-stageprofile-lto-plugin: maybe-all-stageprofile-libiberty-linker-plugin
+all-stagefeedback-lto-plugin: maybe-all-stagefeedback-libiberty-linker-plugin
+configure-libcc1: maybe-configure-gcc
+all-libcc1: maybe-all-gcc
+all-gotools: maybe-all-target-libgo
all-utils: maybe-all-libiberty
+configure-intl: maybe-all-libiconv
+
+configure-stage1-intl: maybe-all-stage1-libiconv
+configure-stage2-intl: maybe-all-stage2-libiconv
+configure-stage3-intl: maybe-all-stage3-libiconv
+configure-stage4-intl: maybe-all-stage4-libiconv
+configure-stageprofile-intl: maybe-all-stageprofile-libiconv
+configure-stagefeedback-intl: maybe-all-stagefeedback-libiconv
configure-mpfr: maybe-all-gmp
configure-stage1-mpfr: maybe-all-stage1-gmp
@@ -46768,22 +50457,14 @@ configure-stage3-isl: maybe-all-stage3-gmp
configure-stage4-isl: maybe-all-stage4-gmp
configure-stageprofile-isl: maybe-all-stageprofile-gmp
configure-stagefeedback-isl: maybe-all-stagefeedback-gmp
-configure-cloog: maybe-all-isl
-
-configure-stage1-cloog: maybe-all-stage1-isl
-configure-stage2-cloog: maybe-all-stage2-isl
-configure-stage3-cloog: maybe-all-stage3-isl
-configure-stage4-cloog: maybe-all-stage4-isl
-configure-stageprofile-cloog: maybe-all-stageprofile-isl
-configure-stagefeedback-cloog: maybe-all-stagefeedback-isl
-configure-cloog: maybe-all-gmp
-
-configure-stage1-cloog: maybe-all-stage1-gmp
-configure-stage2-cloog: maybe-all-stage2-gmp
-configure-stage3-cloog: maybe-all-stage3-gmp
-configure-stage4-cloog: maybe-all-stage4-gmp
-configure-stageprofile-cloog: maybe-all-stageprofile-gmp
-configure-stagefeedback-cloog: maybe-all-stagefeedback-gmp
+all-intl: maybe-all-libiconv
+
+all-stage1-intl: maybe-all-stage1-libiconv
+all-stage2-intl: maybe-all-stage2-libiconv
+all-stage3-intl: maybe-all-stage3-libiconv
+all-stage4-intl: maybe-all-stage4-libiconv
+all-stageprofile-intl: maybe-all-stageprofile-libiconv
+all-stagefeedback-intl: maybe-all-stagefeedback-libiconv
configure-gdb: maybe-all-intl
configure-gdb: maybe-configure-sim
configure-gdb: maybe-all-bfd
@@ -46833,6 +50514,14 @@ all-stage3-bfd: maybe-all-stage3-intl
all-stage4-bfd: maybe-all-stage4-intl
all-stageprofile-bfd: maybe-all-stageprofile-intl
all-stagefeedback-bfd: maybe-all-stagefeedback-intl
+all-bfd: maybe-all-zlib
+
+all-stage1-bfd: maybe-all-stage1-zlib
+all-stage2-bfd: maybe-all-stage2-zlib
+all-stage3-bfd: maybe-all-stage3-zlib
+all-stage4-bfd: maybe-all-stage4-zlib
+all-stageprofile-bfd: maybe-all-stageprofile-zlib
+all-stagefeedback-bfd: maybe-all-stagefeedback-zlib
configure-opcodes: configure-libiberty
configure-stage1-opcodes: configure-stage1-libiberty
@@ -47027,6 +50716,14 @@ all-stage3-ld: maybe-all-stage3-gas
all-stage4-ld: maybe-all-stage4-gas
all-stageprofile-ld: maybe-all-stageprofile-gas
all-stagefeedback-ld: maybe-all-stagefeedback-gas
+all-ld: maybe-all-binutils
+
+all-stage1-ld: maybe-all-stage1-binutils
+all-stage2-ld: maybe-all-stage2-binutils
+all-stage3-ld: maybe-all-stage3-binutils
+all-stage4-ld: maybe-all-stage4-binutils
+all-stageprofile-ld: maybe-all-stageprofile-binutils
+all-stagefeedback-ld: maybe-all-stagefeedback-binutils
install-ld: maybe-install-gold
install-strip-ld: maybe-install-strip-gold
configure-gold: maybe-configure-intl
@@ -47192,6 +50889,7 @@ configure-stage3-target-libstdc++-v3: maybe-configure-stage3-target-libgomp
configure-stage4-target-libstdc++-v3: maybe-configure-stage4-target-libgomp
configure-stageprofile-target-libstdc++-v3: maybe-configure-stageprofile-target-libgomp
configure-stagefeedback-target-libstdc++-v3: maybe-configure-stagefeedback-target-libgomp
+configure-target-liboffloadmic: maybe-configure-target-libgomp
configure-target-libsanitizer: maybe-all-target-libstdc++-v3
configure-stage1-target-libsanitizer: maybe-all-stage1-target-libstdc++-v3
@@ -47216,6 +50914,7 @@ all-stage3-target-libstdc++-v3: maybe-configure-stage3-target-libgomp
all-stage4-target-libstdc++-v3: maybe-configure-stage4-target-libgomp
all-stageprofile-target-libstdc++-v3: maybe-configure-stageprofile-target-libgomp
all-stagefeedback-target-libstdc++-v3: maybe-configure-stagefeedback-target-libgomp
+all-target-liboffloadmic: maybe-all-target-libgomp
install-target-libgo: maybe-install-target-libatomic
install-target-libgfortran: maybe-install-target-libquadmath
install-target-libgfortran: maybe-install-target-libgcc
@@ -47223,6 +50922,10 @@ install-target-libsanitizer: maybe-install-target-libstdc++-v3
install-target-libsanitizer: maybe-install-target-libgcc
install-target-libvtv: maybe-install-target-libstdc++-v3
install-target-libvtv: maybe-install-target-libgcc
+install-target-libcilkrts: maybe-install-target-libstdc++-v3
+install-target-libcilkrts: maybe-install-target-libgcc
+install-target-liboffloadmic: maybe-install-target-libstdc++-v3
+install-target-liboffloadmic: maybe-install-target-libgcc
install-target-libjava: maybe-install-target-libgcc
install-target-libitm: maybe-install-target-libgcc
install-target-libobjc: maybe-install-target-libgcc
@@ -47232,6 +50935,7 @@ all-target-winsup: maybe-all-target-libtermcap
configure-target-newlib: maybe-all-binutils
configure-target-newlib: maybe-all-ld
configure-target-libgfortran: maybe-all-target-libquadmath
+configure-target-libgfortran: maybe-all-target-libbacktrace
# Dependencies for target modules on other target modules are
@@ -47252,6 +50956,12 @@ configure-stage3-target-libsanitizer: maybe-all-stage3-target-libgcc
configure-stage4-target-libsanitizer: maybe-all-stage4-target-libgcc
configure-stageprofile-target-libsanitizer: maybe-all-stageprofile-target-libgcc
configure-stagefeedback-target-libsanitizer: maybe-all-stagefeedback-target-libgcc
+configure-stage1-target-libmpx: maybe-all-stage1-target-libgcc
+configure-stage2-target-libmpx: maybe-all-stage2-target-libgcc
+configure-stage3-target-libmpx: maybe-all-stage3-target-libgcc
+configure-stage4-target-libmpx: maybe-all-stage4-target-libgcc
+configure-stageprofile-target-libmpx: maybe-all-stageprofile-target-libgcc
+configure-stagefeedback-target-libmpx: maybe-all-stagefeedback-target-libgcc
configure-stage1-target-libvtv: maybe-all-stage1-target-libgcc
configure-stage2-target-libvtv: maybe-all-stage2-target-libgcc
configure-stage3-target-libvtv: maybe-all-stage3-target-libgcc
@@ -47268,9 +50978,11 @@ configure-stagefeedback-target-libgomp: maybe-all-stagefeedback-target-libgcc
@if gcc-no-bootstrap
configure-target-libstdc++-v3: maybe-all-target-libgcc
-configure-target-libmudflap: maybe-all-target-libgcc
configure-target-libsanitizer: maybe-all-target-libgcc
+configure-target-libmpx: maybe-all-target-libgcc
configure-target-libvtv: maybe-all-target-libgcc
+configure-target-libcilkrts: maybe-all-target-libgcc
+configure-target-liboffloadmic: maybe-all-target-libgcc
configure-target-libssp: maybe-all-target-libgcc
configure-target-newlib: maybe-all-target-libgcc
configure-target-libbacktrace: maybe-all-target-libgcc
@@ -47295,12 +51007,18 @@ configure-target-libatomic: maybe-all-target-libgcc
configure-target-libstdc++-v3: maybe-all-target-newlib maybe-all-target-libgloss
-configure-target-libmudflap: maybe-all-target-newlib maybe-all-target-libgloss
-
configure-target-libsanitizer: maybe-all-target-newlib maybe-all-target-libgloss
+configure-target-libmpx: maybe-all-target-newlib maybe-all-target-libgloss
+
configure-target-libvtv: maybe-all-target-newlib maybe-all-target-libgloss
+configure-target-libcilkrts: maybe-all-target-newlib maybe-all-target-libgloss
+configure-target-libcilkrts: maybe-all-target-libstdc++-v3
+
+configure-target-liboffloadmic: maybe-all-target-newlib maybe-all-target-libgloss
+configure-target-liboffloadmic: maybe-all-target-libstdc++-v3
+
configure-target-libssp: maybe-all-target-newlib maybe-all-target-libgloss
@@ -47321,6 +51039,7 @@ configure-target-winsup: maybe-all-target-newlib maybe-all-target-libgloss
configure-target-libffi: maybe-all-target-newlib maybe-all-target-libgloss
+configure-target-libffi: maybe-all-target-libstdc++-v3
configure-target-libjava: maybe-all-target-newlib maybe-all-target-libgloss
configure-target-libjava: maybe-all-target-libstdc++-v3
diff --git a/Makefile.tpl b/Makefile.tpl
index 3233a788d..829f664ae 100644
--- a/Makefile.tpl
+++ b/Makefile.tpl
@@ -169,7 +169,7 @@ BUILD_EXPORTS = \
WINDMC="$(WINDMC_FOR_BUILD)"; export WINDMC;
# These variables must be set on the make command line for directories
-# built for the build system to override those in BASE_FLAGS_TO_PASSS.
+# built for the build system to override those in BASE_FLAGS_TO_PASS.
EXTRA_BUILD_FLAGS = \
CFLAGS="$(CFLAGS_FOR_BUILD)" \
LDFLAGS="$(LDFLAGS_FOR_BUILD)"
@@ -216,17 +216,19 @@ HOST_EXPORTS = \
LD_FOR_TARGET="$(LD_FOR_TARGET)"; export LD_FOR_TARGET; \
NM_FOR_TARGET="$(NM_FOR_TARGET)"; export NM_FOR_TARGET; \
OBJDUMP_FOR_TARGET="$(OBJDUMP_FOR_TARGET)"; export OBJDUMP_FOR_TARGET; \
+ OBJCOPY_FOR_TARGET="$(OBJCOPY_FOR_TARGET)"; export OBJCOPY_FOR_TARGET; \
RANLIB_FOR_TARGET="$(RANLIB_FOR_TARGET)"; export RANLIB_FOR_TARGET; \
READELF_FOR_TARGET="$(READELF_FOR_TARGET)"; export READELF_FOR_TARGET; \
TOPLEVEL_CONFIGURE_ARGUMENTS="$(TOPLEVEL_CONFIGURE_ARGUMENTS)"; export TOPLEVEL_CONFIGURE_ARGUMENTS; \
HOST_LIBS="$(STAGE1_LIBS)"; export HOST_LIBS; \
GMPLIBS="$(HOST_GMPLIBS)"; export GMPLIBS; \
GMPINC="$(HOST_GMPINC)"; export GMPINC; \
+ ISLLIBS="$(HOST_ISLLIBS)"; export ISLLIBS; \
ISLINC="$(HOST_ISLINC)"; export ISLINC; \
- CLOOGLIBS="$(HOST_CLOOGLIBS)"; export CLOOGLIBS; \
- CLOOGINC="$(HOST_CLOOGINC)"; export CLOOGINC; \
- LIBELFLIBS="$(HOST_LIBELFLIBS)" ; export LIBELFLIBS; \
- LIBELFINC="$(HOST_LIBELFINC)" ; export LIBELFINC; \
+ ISLVER="$(HOST_ISLVER)"; export ISLVER; \
+ LIBELFLIBS="$(HOST_LIBELFLIBS)"; export LIBELFLIBS; \
+ LIBELFINC="$(HOST_LIBELFINC)"; export LIBELFINC; \
+ XGCC_FLAGS_FOR_TARGET="$(XGCC_FLAGS_FOR_TARGET)"; export XGCC_FLAGS_FOR_TARGET; \
@if gcc-bootstrap
$(RPATH_ENVVAR)=`echo "$(TARGET_LIB_PATH)$$$(RPATH_ENVVAR)" | sed 's,::*,:,g;s,^:*,,;s,:*$$,,'`; export $(RPATH_ENVVAR); \
@endif gcc-bootstrap
@@ -242,9 +244,9 @@ POSTSTAGE1_CXX_EXPORT = \
-B$$r/$(HOST_SUBDIR)/prev-gcc/ -B$(build_tooldir)/bin/ -nostdinc++ \
-B$$r/prev-$(TARGET_SUBDIR)/libstdc++-v3/src/.libs \
-B$$r/prev-$(TARGET_SUBDIR)/libstdc++-v3/libsupc++/.libs \
- -I$$r/prev-$(TARGET_SUBDIR)/libstdc++-v3/include/$(TARGET_SUBDIR) \
- -I$$r/prev-$(TARGET_SUBDIR)/libstdc++-v3/include \
- -I$$s/libstdc++-v3/libsupc++ \
+ `if $(LEAN); then echo ' -isystem '; else echo ' -I'; fi`$$r/prev-$(TARGET_SUBDIR)/libstdc++-v3/include/$(TARGET_SUBDIR) \
+ `if $(LEAN); then echo ' -isystem '; else echo ' -I'; fi`$$r/prev-$(TARGET_SUBDIR)/libstdc++-v3/include \
+ `if $(LEAN); then echo ' -isystem '; else echo ' -I'; fi`$$s/libstdc++-v3/libsupc++ \
-L$$r/prev-$(TARGET_SUBDIR)/libstdc++-v3/src/.libs \
-L$$r/prev-$(TARGET_SUBDIR)/libstdc++-v3/libsupc++/.libs"; \
export CXX; \
@@ -259,6 +261,7 @@ POSTSTAGE1_HOST_EXPORTS = \
$(XGCC_FLAGS_FOR_TARGET) $$TFLAGS"; export CC; \
CC_FOR_BUILD="$$CC"; export CC_FOR_BUILD; \
$(POSTSTAGE1_CXX_EXPORT) \
+ $(LTO_EXPORTS) \
GNATBIND="$$r/$(HOST_SUBDIR)/prev-gcc/gnatbind"; export GNATBIND; \
LDFLAGS="$(POSTSTAGE1_LDFLAGS) $(BOOT_LDFLAGS)"; export LDFLAGS; \
HOST_LIBS="$(POSTSTAGE1_LIBS)"; export HOST_LIBS;
@@ -288,6 +291,7 @@ BASE_TARGET_EXPORTS = \
LIPO="$(LIPO_FOR_TARGET)"; export LIPO; \
NM="$(COMPILER_NM_FOR_TARGET)"; export NM; \
OBJDUMP="$(OBJDUMP_FOR_TARGET)"; export OBJDUMP; \
+ OBJCOPY="$(OBJCOPY_FOR_TARGET)"; export OBJCOPY; \
RANLIB="$(RANLIB_FOR_TARGET)"; export RANLIB; \
READELF="$(READELF_FOR_TARGET)"; export READELF; \
STRIP="$(STRIP_FOR_TARGET)"; export STRIP; \
@@ -312,12 +316,10 @@ NORMAL_TARGET_EXPORTS = \
HOST_GMPLIBS = @gmplibs@
HOST_GMPINC = @gmpinc@
-# Where to find ISL
+# Where to find isl
+HOST_ISLLIBS = @isllibs@
HOST_ISLINC = @islinc@
-
-# Where to find CLOOG
-HOST_CLOOGLIBS = @clooglibs@
-HOST_CLOOGINC = @clooginc@
+HOST_ISLVER = @islver@
# Where to find libelf
HOST_LIBELFLIBS = @libelflibs@
@@ -436,11 +438,9 @@ STAGE[+id+]_TFLAGS = $(STAGE_TFLAGS)
STAGE[+id+]_CONFIGURE_FLAGS = $(STAGE_CONFIGURE_FLAGS)
[+ ENDFOR bootstrap-stage +]
-# Only build the C compiler for stage1, because that is the only one that
-# we can guarantee will build with the native compiler, and also it is the
-# only thing useful for building stage2. STAGE1_CFLAGS (via CFLAGS),
-# MAKEINFO and MAKEINFOFLAGS are explicitly passed here to make them
-# overrideable (for a bootstrap build stage1 also builds gcc.info).
+# By default, C and C++ are the only stage1 languages, because they are the
+# only ones we require to build with the bootstrap compiler, and also the
+# only ones useful for building stage2.
STAGE1_CFLAGS = @stage1_cflags@
STAGE1_CHECKING = @stage1_checking@
@@ -451,8 +451,10 @@ STAGE1_LANGUAGES = @stage1_languages@
# the last argument when conflicting --enable arguments are passed.
# * Likewise, we force-disable coverage flags, since the installed
# compiler probably has never heard of them.
+# * We also disable -Wformat, since older GCCs don't understand newer %s.
STAGE1_CONFIGURE_FLAGS = --disable-intermodule $(STAGE1_CHECKING) \
- --disable-coverage --enable-languages="$(STAGE1_LANGUAGES)"
+ --disable-coverage --enable-languages="$(STAGE1_LANGUAGES)" \
+ --disable-build-format-warnings
STAGEprofile_CFLAGS = $(STAGE2_CFLAGS) -fprofile-generate
STAGEprofile_TFLAGS = $(STAGE2_TFLAGS)
@@ -487,6 +489,7 @@ LD_FOR_TARGET=@LD_FOR_TARGET@
LIPO_FOR_TARGET=@LIPO_FOR_TARGET@
NM_FOR_TARGET=@NM_FOR_TARGET@
OBJDUMP_FOR_TARGET=@OBJDUMP_FOR_TARGET@
+OBJCOPY_FOR_TARGET=@OBJCOPY_FOR_TARGET@
RANLIB_FOR_TARGET=@RANLIB_FOR_TARGET@
READELF_FOR_TARGET=@READELF_FOR_TARGET@
STRIP_FOR_TARGET=@STRIP_FOR_TARGET@
@@ -577,7 +580,9 @@ CXX_FOR_TARGET_FLAG_TO_PASS = \
$(shell if echo "$(CXX_FOR_TARGET)" | grep " -funconfigured-" > /dev/null; then :; else echo '"CXX_FOR_TARGET=$(CXX_FOR_TARGET)"'; fi)
@endif target-libstdc++-v3
-# Flags to pass down to all sub-makes.
+# Flags to pass down to all sub-makes. STAGE*FLAGS,
+# MAKEINFO and MAKEINFOFLAGS are explicitly passed here to make them
+# overrideable (for a bootstrap build stage1 also builds gcc.info).
BASE_FLAGS_TO_PASS =[+ FOR flags_to_pass +][+ IF optional +] \
"`echo '[+flag+]=$([+flag+])' | sed -e s'/[^=][^=]*=$$/XFOO=/'`"[+ ELSE optional +] \
"[+flag+]=$([+flag+])"[+ ENDIF optional+][+ ENDFOR flags_to_pass +][+ FOR bootstrap-stage +] \
@@ -587,7 +592,8 @@ BASE_FLAGS_TO_PASS =[+ FOR flags_to_pass +][+ IF optional +] \
$(CXX_FOR_TARGET_FLAG_TO_PASS) \
"TFLAGS=$(TFLAGS)" \
"CONFIG_SHELL=$(SHELL)" \
- "MAKEINFO=$(MAKEINFO) $(MAKEINFOFLAGS)"
+ "MAKEINFO=$(MAKEINFO) $(MAKEINFOFLAGS)" \
+ $(if $(LSAN_OPTIONS),"LSAN_OPTIONS=$(LSAN_OPTIONS)")
# We leave this in just in case, but it is not needed anymore.
RECURSE_FLAGS_TO_PASS = $(BASE_FLAGS_TO_PASS)
@@ -629,8 +635,17 @@ POSTSTAGE1_FLAGS_TO_PASS = \
GNATBIND="$${GNATBIND}" \
LDFLAGS="$${LDFLAGS}" \
HOST_LIBS="$${HOST_LIBS}" \
+ $(LTO_FLAGS_TO_PASS) \
"`echo 'ADAFLAGS=$(BOOT_ADAFLAGS)' | sed -e s'/[^=][^=]*=$$/XFOO=/'`"
+@if gcc-bootstrap
+EXTRA_HOST_EXPORTS = if [ $(current_stage) != stage1 ]; then \
+ $(POSTSTAGE1_HOST_EXPORTS) \
+ fi;
+
+EXTRA_BOOTSTRAP_FLAGS = CC="$$CC" CXX="$$CXX" LDFLAGS="$$LDFLAGS"
+@endif gcc-bootstrap
+
# Flags to pass down to makes which are built with the target environment.
# The double $ decreases the length of the command line; those variables
# are set in BASE_FLAGS_TO_PASS, and the sub-make will expand them. The
@@ -641,7 +656,9 @@ EXTRA_TARGET_FLAGS = \
'AS=$(COMPILER_AS_FOR_TARGET)' \
'CC=$$(CC_FOR_TARGET) $$(XGCC_FLAGS_FOR_TARGET) $$(TFLAGS)' \
'CFLAGS=$$(CFLAGS_FOR_TARGET)' \
- 'CXX=$$(CXX_FOR_TARGET) $$(XGCC_FLAGS_FOR_TARGET) $$(TFLAGS)' \
+ 'CXX=$$(CXX_FOR_TARGET) -B$$r/$$(TARGET_SUBDIR)/libstdc++-v3/src/.libs \
+ -B$$r/$$(TARGET_SUBDIR)/libstdc++-v3/libsupc++/.libs \
+ $$(XGCC_FLAGS_FOR_TARGET) $$(TFLAGS)' \
'CXXFLAGS=$$(CXXFLAGS_FOR_TARGET)' \
'DLLTOOL=$$(DLLTOOL_FOR_TARGET)' \
'GCJ=$$(GCJ_FOR_TARGET) $$(XGCC_FLAGS_FOR_TARGET) $$(TFLAGS)' \
@@ -654,11 +671,14 @@ EXTRA_TARGET_FLAGS = \
'LIBCXXFLAGS=$$(LIBCXXFLAGS_FOR_TARGET)' \
'NM=$(COMPILER_NM_FOR_TARGET)' \
'OBJDUMP=$$(OBJDUMP_FOR_TARGET)' \
+ 'OBJCOPY=$$(OBJCOPY_FOR_TARGET)' \
'RANLIB=$$(RANLIB_FOR_TARGET)' \
'READELF=$$(READELF_FOR_TARGET)' \
'WINDRES=$$(WINDRES_FOR_TARGET)' \
'WINDMC=$$(WINDMC_FOR_TARGET)' \
'XGCC_FLAGS_FOR_TARGET=$(XGCC_FLAGS_FOR_TARGET)' \
+ 'STAGE1_LDFLAGS=$$(POSTSTAGE1_LDFLAGS)' \
+ 'STAGE1_LIBS=$$(POSTSTAGE1_LIBS)' \
"TFLAGS=$$TFLAGS"
TARGET_FLAGS_TO_PASS = $(BASE_FLAGS_TO_PASS) $(EXTRA_TARGET_FLAGS)
@@ -777,9 +797,9 @@ do-info: maybe-all-texinfo
install-info: do-install-info dir.info
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- if [ -f dir.info ] ; then \
- $(INSTALL_DATA) dir.info $(DESTDIR)$(infodir)/dir.info ; \
- else true ; fi
+ if [ -f dir.info ]; then \
+ $(INSTALL_DATA) dir.info $(DESTDIR)$(infodir)/dir.info; \
+ else true; fi
install-pdf: do-install-pdf
@@ -861,6 +881,27 @@ mail-report-with-warnings.log: warning.log
chmod +x $@
echo If you really want to send e-mail, run ./$@ now
+# Local Vim config
+
+$(srcdir)/.local.vimrc:
+ $(LN_S) contrib/vimrc $@
+
+$(srcdir)/.lvimrc:
+ $(LN_S) contrib/vimrc $@
+
+vimrc: $(srcdir)/.local.vimrc $(srcdir)/.lvimrc
+
+.PHONY: vimrc
+
+# clang-format config
+
+$(srcdir)/.clang-format:
+ $(LN_S) contrib/clang-format $@
+
+clang-format: $(srcdir)/.clang-format
+
+.PHONY: clang-format
+
# Installation targets.
.PHONY: install uninstall
@@ -893,14 +934,14 @@ uninstall:
.PHONY: install.all
install.all: install-no-fixedincludes
- @if [ -f ./gcc/Makefile ] ; then \
- r=`${PWD_COMMAND}` ; export r ; \
+ @if [ -f ./gcc/Makefile ]; then \
+ r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(HOST_EXPORTS) \
(cd ./gcc && \
- $(MAKE) $(FLAGS_TO_PASS) install-headers) ; \
+ $(MAKE) $(FLAGS_TO_PASS) install-headers); \
else \
- true ; \
+ true; \
fi
# install-no-fixedincludes is used to allow the elaboration of binary packages
@@ -940,10 +981,10 @@ installdirs: mkinstalldirs
$(SHELL) $(srcdir)/mkinstalldirs $(MAKEDIRS)
dir.info: do-install-info
- if [ -f $(srcdir)/texinfo/gen-info-dir ] ; then \
- $(srcdir)/texinfo/gen-info-dir $(DESTDIR)$(infodir) $(srcdir)/texinfo/dir.info-template > dir.info.new ; \
- mv -f dir.info.new dir.info ; \
- else true ; \
+ if [ -f $(srcdir)/texinfo/gen-info-dir ]; then \
+ $(srcdir)/texinfo/gen-info-dir $(DESTDIR)$(infodir) $(srcdir)/texinfo/dir.info-template > dir.info.new; \
+ mv -f dir.info.new dir.info; \
+ else true; \
fi
dist:
@@ -978,8 +1019,8 @@ configure-[+prefix+][+module+]: [+ IF bootstrap +][+ ELSE +]
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
[+ IF check_multilibs
+]echo "Checking multilib configuration for [+module+]..."; \
- $(SHELL) $(srcdir)/mkinstalldirs [+subdir+]/[+module+] ; \
- $(CC_FOR_TARGET) --print-multi-lib > [+subdir+]/[+module+]/multilib.tmp 2> /dev/null ; \
+ $(SHELL) $(srcdir)/mkinstalldirs [+subdir+]/[+module+]; \
+ $(CC_FOR_TARGET) --print-multi-lib > [+subdir+]/[+module+]/multilib.tmp 2> /dev/null; \
if test -r [+subdir+]/[+module+]/multilib.out; then \
if cmp -s [+subdir+]/[+module+]/multilib.tmp [+subdir+]/[+module+]/multilib.out; then \
rm -f [+subdir+]/[+module+]/multilib.tmp; \
@@ -991,7 +1032,7 @@ configure-[+prefix+][+module+]: [+ IF bootstrap +][+ ELSE +]
mv [+subdir+]/[+module+]/multilib.tmp [+subdir+]/[+module+]/multilib.out; \
fi; \
[+ ENDIF check_multilibs +]test ! -f [+subdir+]/[+module+]/Makefile || exit 0; \
- $(SHELL) $(srcdir)/mkinstalldirs [+subdir+]/[+module+] ; \
+ $(SHELL) $(srcdir)/mkinstalldirs [+subdir+]/[+module+]; \
[+exports+] [+extra_exports+] \
echo Configuring in [+subdir+]/[+module+]; \
cd "[+subdir+]/[+module+]" || exit 1; \
@@ -1000,12 +1041,13 @@ configure-[+prefix+][+module+]: [+ IF bootstrap +][+ ELSE +]
*) topdir=`echo [+subdir+]/[+module+]/ | \
sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
esac; \
- srcdiroption="--srcdir=$${topdir}/[+module+]"; \
- libsrcdir="$$s/[+module+]"; \
+ module_srcdir=[+? module_srcdir (get "module_srcdir") (get "module")+]; \
[+ IF no-config-site +]rm -f no-such-file || : ; \
- CONFIG_SITE=no-such-file [+ ENDIF +]$(SHELL) $${libsrcdir}/configure \
+ CONFIG_SITE=no-such-file [+ ENDIF +]$(SHELL) \
+ $$s/$$module_srcdir/configure \
+ --srcdir=$${topdir}/$$module_srcdir \
[+args+] --build=${build_alias} --host=[+host_alias+] \
- --target=[+target_alias+] $${srcdiroption} [+extra_configure_flags+] \
+ --target=[+target_alias+] [+extra_configure_flags+] \
|| exit 1
@endif [+prefix+][+module+]
@@ -1023,7 +1065,7 @@ configure-stage[+id+]-[+prefix+][+module+]:
TFLAGS="$(STAGE[+id+]_TFLAGS)"; \
[+ IF check_multilibs
+]echo "Checking multilib configuration for [+module+]..."; \
- $(CC_FOR_TARGET) --print-multi-lib > [+subdir+]/[+module+]/multilib.tmp 2> /dev/null ; \
+ $(CC_FOR_TARGET) --print-multi-lib > [+subdir+]/[+module+]/multilib.tmp 2> /dev/null; \
if test -r [+subdir+]/[+module+]/multilib.out; then \
if cmp -s [+subdir+]/[+module+]/multilib.tmp [+subdir+]/[+module+]/multilib.out; then \
rm -f [+subdir+]/[+module+]/multilib.tmp; \
@@ -1045,20 +1087,20 @@ configure-stage[+id+]-[+prefix+][+module+]:
LIBCFLAGS="$(STAGE[+id+]_CFLAGS)"[+ ELSE prev +] \
LIBCFLAGS="$(LIBCFLAGS)"[+ ENDIF prev +]; export LIBCFLAGS;[+
ENDIF prefix +] [+extra_exports+] \
- echo Configuring stage [+id+] in [+subdir+]/[+module+] ; \
- $(SHELL) $(srcdir)/mkinstalldirs [+subdir+]/[+module+] ; \
+ echo Configuring stage [+id+] in [+subdir+]/[+module+]; \
+ $(SHELL) $(srcdir)/mkinstalldirs [+subdir+]/[+module+]; \
cd [+subdir+]/[+module+] || exit 1; \
case $(srcdir) in \
/* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
*) topdir=`echo [+subdir+]/[+module+]/ | \
sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
esac; \
- srcdiroption="--srcdir=$${topdir}/[+module+]"; \
- libsrcdir="$$s/[+module+]"; \
- $(SHELL) $${libsrcdir}/configure \
+ module_srcdir=[+? module_srcdir (get "module_srcdir") (get "module")+]; \
+ $(SHELL) $$s/$$module_srcdir/configure \
+ --srcdir=$${topdir}/$$module_srcdir \
[+args+] --build=${build_alias} --host=[+host_alias+] \
- --target=[+target_alias+] $${srcdiroption} [+ IF prev +]\
- --with-build-libsubdir=$(HOST_SUBDIR) [+ ENDIF prev +]\
+ --target=[+target_alias+] \
+ [+ IF prev +]--with-build-libsubdir=$(HOST_SUBDIR)[+ ENDIF prev +] \
$(STAGE[+id+]_CONFIGURE_FLAGS)[+ IF extra_configure_flags +] \
[+extra_configure_flags+][+ ENDIF extra_configure_flags +]
@endif [+prefix+][+module+]-bootstrap
@@ -1179,21 +1221,25 @@ check-[+module+]:
# This module is only tested in a native toolchain.
check-[+module+]:
@: $(MAKE); $(unstage)
- @if [ '$(host)' = '$(target)' ] ; then \
+ @if [ '$(host)' = '$(target)' ]; then \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(HOST_EXPORTS) \
+ $(HOST_EXPORTS) [+ IF bootstrap +]$(EXTRA_HOST_EXPORTS)[+
+ ENDIF bootstrap +] \
(cd $(HOST_SUBDIR)/[+module+] && \
- $(MAKE) $(FLAGS_TO_PASS) [+extra_make_flags+] check); \
+ $(MAKE) $(FLAGS_TO_PASS) [+extra_make_flags+][+
+ IF bootstrap +] $(EXTRA_BOOTSTRAP_FLAGS)[+ ENDIF bootstrap +] check)
fi
[+ ELSE check +]
check-[+module+]:
@: $(MAKE); $(unstage)
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(HOST_EXPORTS) \
+ $(HOST_EXPORTS) [+ IF bootstrap +]$(EXTRA_HOST_EXPORTS)[+
+ ENDIF bootstrap +] \
(cd $(HOST_SUBDIR)/[+module+] && \
- $(MAKE) $(FLAGS_TO_PASS) [+extra_make_flags+] check)
+ $(MAKE) $(FLAGS_TO_PASS) [+extra_make_flags+][+
+ IF bootstrap +] $(EXTRA_BOOTSTRAP_FLAGS)[+ ENDIF bootstrap +] check)
[+ ENDIF no_check +]
@endif [+module+]
@@ -1253,7 +1299,7 @@ maybe-[+make_target+]-[+module+]: [+make_target+]-[+module+]
for flag in $(EXTRA_HOST_FLAGS) [+extra_make_flags+]; do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- echo "Doing [+make_target+] in [+module+]" ; \
+ echo "Doing [+make_target+] in [+module+]"; \
(cd $(HOST_SUBDIR)/[+module+] && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -1380,7 +1426,7 @@ maybe-[+make_target+]-target-[+module+]: [+make_target+]-target-[+module+]
[+depend+]-target-[+module+] [+
ENDFOR depend +]
@: $(MAKE); $(unstage)
- @[ -f $(TARGET_SUBDIR)/[+module+]/Makefile ] || exit 0 ; \
+ @[ -f $(TARGET_SUBDIR)/[+module+]/Makefile ] || exit 0; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \[+
IF raw_cxx +]
@@ -1388,7 +1434,7 @@ IF raw_cxx +]
ELSE normal_cxx +]
$(NORMAL_TARGET_EXPORTS) \[+
ENDIF raw_cxx +]
- echo "Doing [+make_target+] in $(TARGET_SUBDIR)/[+module+]" ; \
+ echo "Doing [+make_target+] in $(TARGET_SUBDIR)/[+module+]"; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
@@ -1404,13 +1450,6 @@ ENDIF raw_cxx +]
[+ ENDFOR recursive_targets +]
[+ ENDFOR target_modules +]
-@if target-libmudflap
-.PHONY: check-target-libmudflap-c++
-check-target-libmudflap-c++:
- $(MAKE) RUNTESTFLAGS="$(RUNTESTFLAGS) c++frags.exp" check-target-libmudflap
-
-@endif target-libmudflap
-
@if target-libgomp
.PHONY: check-target-libgomp-c++
check-target-libgomp-c++:
@@ -1438,7 +1477,7 @@ cross: all-build all-gas all-ld
echo "Building the C and C++ compiler"; \
cd gcc && $(MAKE) $(GCC_FLAGS_TO_PASS) LANGUAGES="c c++"
@r=`${PWD_COMMAND}`; export r; \
- s=`cd $(srcdir); ${PWD_COMMAND}` ; export s; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
echo "Building runtime libraries"; \
$(MAKE) $(RECURSE_FLAGS_TO_PASS) LANGUAGES="c c++" all
@endif gcc-no-bootstrap
@@ -1522,31 +1561,31 @@ objext = .o
stage[+id+]-start::
@: $(MAKE); $(stage); \
- echo stage[+id+] > stage_current ; \
+ echo stage[+id+] > stage_current; \
echo stage[+id+] > stage_last; \
$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)[+
FOR host_modules +][+ IF bootstrap +]
@if [+ module +]
@cd $(HOST_SUBDIR); [ -d stage[+id+]-[+module+] ] || \
mkdir stage[+id+]-[+module+]; \
- mv stage[+id+]-[+module+] [+module+] [+ IF prev +] ; \
+ mv stage[+id+]-[+module+] [+module+][+ IF prev +]; \
mv stage[+prev+]-[+module+] prev-[+module+] || test -f stage[+prev+]-lean [+ ENDIF prev +]
@endif [+ module +][+ ENDIF bootstrap +][+ ENDFOR host_modules +]
@[ -d stage[+id+]-$(TARGET_SUBDIR) ] || \
mkdir stage[+id+]-$(TARGET_SUBDIR); \
- mv stage[+id+]-$(TARGET_SUBDIR) $(TARGET_SUBDIR) [+ IF prev +] ; \
+ mv stage[+id+]-$(TARGET_SUBDIR) $(TARGET_SUBDIR)[+ IF prev +]; \
mv stage[+prev+]-$(TARGET_SUBDIR) prev-$(TARGET_SUBDIR) || test -f stage[+prev+]-lean [+ ENDIF prev +]
stage[+id+]-end:: [+ FOR host_modules +][+ IF bootstrap +]
@if [+ module +]
- @if test -d $(HOST_SUBDIR)/[+module+] ; then \
- cd $(HOST_SUBDIR); mv [+module+] stage[+id+]-[+module+] [+ IF prev +]; \
- mv prev-[+module+] stage[+prev+]-[+module+] ; : [+ ENDIF prev +] ; \
+ @if test -d $(HOST_SUBDIR)/[+module+]; then \
+ cd $(HOST_SUBDIR); mv [+module+] stage[+id+]-[+module+][+ IF prev +]; \
+ mv prev-[+module+] stage[+prev+]-[+module+]; : [+ ENDIF prev +]; \
fi
@endif [+ module +][+ ENDIF bootstrap +][+ ENDFOR host_modules +]
- @if test -d $(TARGET_SUBDIR) ; then \
- mv $(TARGET_SUBDIR) stage[+id+]-$(TARGET_SUBDIR) [+ IF prev +] ; \
- mv prev-$(TARGET_SUBDIR) stage[+prev+]-$(TARGET_SUBDIR) ; : [+ ENDIF prev +] ; \
+ @if test -d $(TARGET_SUBDIR); then \
+ mv $(TARGET_SUBDIR) stage[+id+]-$(TARGET_SUBDIR)[+ IF prev +]; \
+ mv prev-$(TARGET_SUBDIR) stage[+prev+]-$(TARGET_SUBDIR); : [+ ENDIF prev +]; \
fi
rm -f stage_current
@@ -1558,13 +1597,13 @@ stage[+id+]-bubble:: [+ IF prev +]stage[+prev+]-bubble[+ ENDIF +]
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
if test -f stage[+id+]-lean [+
- IF prev +]|| test -f stage[+prev+]-lean [+ ENDIF prev +] ; then \
- echo Skipping rebuild of stage[+id+] ; \
+ IF prev +]|| test -f stage[+prev+]-lean [+ ENDIF prev +]; then \
+ echo Skipping rebuild of stage[+id+]; \
else \
$(MAKE) stage[+id+]-start; \[+IF lean +]
if $(LEAN); then \
- rm -rf stage[+lean+]-* ; \
- $(STAMP) stage[+lean+]-lean ; \
+ rm -rf stage[+lean+]-*; \
+ $(STAMP) stage[+lean+]-lean; \
fi; \[+ ENDIF lean +]
$(MAKE) $(RECURSE_FLAGS_TO_PASS) all-stage[+id+]; \
fi[+ IF compare-target +]
@@ -1581,16 +1620,16 @@ do-clean: clean-stage[+id+]
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
if test -f stage[+prev+]-lean; then \
- echo Cannot compare object files as stage [+prev+] was deleted. ; \
- exit 0 ; \
+ echo Cannot compare object files as stage [+prev+] was deleted.; \
+ exit 0; \
fi; \
: $(MAKE); $(stage); \
- rm -f .bad_compare ; \
- echo Comparing stages [+prev+] and [+id+] ; \
+ rm -f .bad_compare; \
+ echo Comparing stages [+prev+] and [+id+]; \
sed=`echo stage[+id+] | sed 's,^stage,,;s,.,.,g'`; \
files=`find stage[+id+]-* -name "*$(objext)" -print | \
- sed -n s,^stage$$sed-,,p` ; \
- for file in $${files} ; do \
+ sed -n s,^stage$$sed-,,p`; \
+ for file in $${files}; do \
f1=$$r/stage[+prev+]-$$file; f2=$$r/stage[+id+]-$$file; \
if test ! -f $$f1; then continue; fi; \
$(do-[+compare-target+]) > /dev/null 2>&1; \
@@ -1600,16 +1639,16 @@ do-clean: clean-stage[+id+]
echo warning: $$file differs ;; \
*) \
echo $$file differs >> .bad_compare ;; \
- esac ; \
- fi ; \
- done ; \
+ esac; \
+ fi; \
+ done; \
if [ -f .bad_compare ]; then \
echo "Bootstrap comparison failure!"; \
cat .bad_compare; \
exit 1; \
else \
echo Comparison successful.; \
- fi ; \
+ fi; \
$(STAMP) [+compare-target+][+ IF prev +]
if $(LEAN); then \
rm -rf stage[+prev+]-*; \
@@ -1675,10 +1714,10 @@ stagefeedback-start::
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
for i in prev-*; do \
- j=`echo $$i | sed s/^prev-//` ; \
+ j=`echo $$i | sed s/^prev-//`; \
cd $$r/$$i && \
- { find . -type d | sort | sed 's,.*,$(SHELL) '"$$s"'/mkinstalldirs "../'$$j'/&",' | $(SHELL) ; } && \
- { find . -name '*.*da' | sed 's,.*,$(LN) -f "&" "../'$$j'/&",' | $(SHELL) ; } ; \
+ { find . -type d | sort | sed 's,.*,$(SHELL) '"$$s"'/mkinstalldirs "../'$$j'/&",' | $(SHELL); } && \
+ { find . -name '*.*da' | sed 's,.*,$(LN) -f "&" "../'$$j'/&",' | $(SHELL); }; \
done
@if gcc-bootstrap
diff --git a/compile b/compile
index ec64c6220..a85b723c7 100755
--- a/compile
+++ b/compile
@@ -1,10 +1,9 @@
#! /bin/sh
-# Wrapper for compilers which do not understand `-c -o'.
+# Wrapper for compilers which do not understand '-c -o'.
-scriptversion=2009-04-28.21; # UTC
+scriptversion=2012-10-14.11; # UTC
-# Copyright (C) 1999, 2000, 2003, 2004, 2005, 2009 Free Software
-# Foundation, Inc.
+# Copyright (C) 1999-2014 Free Software Foundation, Inc.
# Written by Tom Tromey <tromey@cygnus.com>.
#
# This program is free software; you can redistribute it and/or modify
@@ -29,21 +28,224 @@ scriptversion=2009-04-28.21; # UTC
# bugs to <bug-automake@gnu.org> or send patches to
# <automake-patches@gnu.org>.
+nl='
+'
+
+# We need space, tab and new line, in precisely that order. Quoting is
+# there to prevent tools from complaining about whitespace usage.
+IFS=" "" $nl"
+
+file_conv=
+
+# func_file_conv build_file lazy
+# Convert a $build file to $host form and store it in $file
+# Currently only supports Windows hosts. If the determined conversion
+# type is listed in (the comma separated) LAZY, no conversion will
+# take place.
+func_file_conv ()
+{
+ file=$1
+ case $file in
+ / | /[!/]*) # absolute file, and not a UNC file
+ if test -z "$file_conv"; then
+ # lazily determine how to convert abs files
+ case `uname -s` in
+ MINGW*)
+ file_conv=mingw
+ ;;
+ CYGWIN*)
+ file_conv=cygwin
+ ;;
+ *)
+ file_conv=wine
+ ;;
+ esac
+ fi
+ case $file_conv/,$2, in
+ *,$file_conv,*)
+ ;;
+ mingw/*)
+ file=`cmd //C echo "$file " | sed -e 's/"\(.*\) " *$/\1/'`
+ ;;
+ cygwin/*)
+ file=`cygpath -m "$file" || echo "$file"`
+ ;;
+ wine/*)
+ file=`winepath -w "$file" || echo "$file"`
+ ;;
+ esac
+ ;;
+ esac
+}
+
+# func_cl_dashL linkdir
+# Make cl look for libraries in LINKDIR
+func_cl_dashL ()
+{
+ func_file_conv "$1"
+ if test -z "$lib_path"; then
+ lib_path=$file
+ else
+ lib_path="$lib_path;$file"
+ fi
+ linker_opts="$linker_opts -LIBPATH:$file"
+}
+
+# func_cl_dashl library
+# Do a library search-path lookup for cl
+func_cl_dashl ()
+{
+ lib=$1
+ found=no
+ save_IFS=$IFS
+ IFS=';'
+ for dir in $lib_path $LIB
+ do
+ IFS=$save_IFS
+ if $shared && test -f "$dir/$lib.dll.lib"; then
+ found=yes
+ lib=$dir/$lib.dll.lib
+ break
+ fi
+ if test -f "$dir/$lib.lib"; then
+ found=yes
+ lib=$dir/$lib.lib
+ break
+ fi
+ if test -f "$dir/lib$lib.a"; then
+ found=yes
+ lib=$dir/lib$lib.a
+ break
+ fi
+ done
+ IFS=$save_IFS
+
+ if test "$found" != yes; then
+ lib=$lib.lib
+ fi
+}
+
+# func_cl_wrapper cl arg...
+# Adjust compile command to suit cl
+func_cl_wrapper ()
+{
+ # Assume a capable shell
+ lib_path=
+ shared=:
+ linker_opts=
+ for arg
+ do
+ if test -n "$eat"; then
+ eat=
+ else
+ case $1 in
+ -o)
+ # configure might choose to run compile as 'compile cc -o foo foo.c'.
+ eat=1
+ case $2 in
+ *.o | *.[oO][bB][jJ])
+ func_file_conv "$2"
+ set x "$@" -Fo"$file"
+ shift
+ ;;
+ *)
+ func_file_conv "$2"
+ set x "$@" -Fe"$file"
+ shift
+ ;;
+ esac
+ ;;
+ -I)
+ eat=1
+ func_file_conv "$2" mingw
+ set x "$@" -I"$file"
+ shift
+ ;;
+ -I*)
+ func_file_conv "${1#-I}" mingw
+ set x "$@" -I"$file"
+ shift
+ ;;
+ -l)
+ eat=1
+ func_cl_dashl "$2"
+ set x "$@" "$lib"
+ shift
+ ;;
+ -l*)
+ func_cl_dashl "${1#-l}"
+ set x "$@" "$lib"
+ shift
+ ;;
+ -L)
+ eat=1
+ func_cl_dashL "$2"
+ ;;
+ -L*)
+ func_cl_dashL "${1#-L}"
+ ;;
+ -static)
+ shared=false
+ ;;
+ -Wl,*)
+ arg=${1#-Wl,}
+ save_ifs="$IFS"; IFS=','
+ for flag in $arg; do
+ IFS="$save_ifs"
+ linker_opts="$linker_opts $flag"
+ done
+ IFS="$save_ifs"
+ ;;
+ -Xlinker)
+ eat=1
+ linker_opts="$linker_opts $2"
+ ;;
+ -*)
+ set x "$@" "$1"
+ shift
+ ;;
+ *.cc | *.CC | *.cxx | *.CXX | *.[cC]++)
+ func_file_conv "$1"
+ set x "$@" -Tp"$file"
+ shift
+ ;;
+ *.c | *.cpp | *.CPP | *.lib | *.LIB | *.Lib | *.OBJ | *.obj | *.[oO])
+ func_file_conv "$1" mingw
+ set x "$@" "$file"
+ shift
+ ;;
+ *)
+ set x "$@" "$1"
+ shift
+ ;;
+ esac
+ fi
+ shift
+ done
+ if test -n "$linker_opts"; then
+ linker_opts="-link$linker_opts"
+ fi
+ exec "$@" $linker_opts
+ exit 1
+}
+
+eat=
+
case $1 in
'')
- echo "$0: No command. Try \`$0 --help' for more information." 1>&2
+ echo "$0: No command. Try '$0 --help' for more information." 1>&2
exit 1;
;;
-h | --h*)
cat <<\EOF
Usage: compile [--help] [--version] PROGRAM [ARGS]
-Wrapper for compilers which do not understand `-c -o'.
-Remove `-o dest.o' from ARGS, run PROGRAM with the remaining
+Wrapper for compilers which do not understand '-c -o'.
+Remove '-o dest.o' from ARGS, run PROGRAM with the remaining
arguments, and rename the output as expected.
If you are trying to build a whole package this is not the
-right script to run: please start by reading the file `INSTALL'.
+right script to run: please start by reading the file 'INSTALL'.
Report bugs to <bug-automake@gnu.org>.
EOF
@@ -53,11 +255,13 @@ EOF
echo "compile $scriptversion"
exit $?
;;
+ cl | *[/\\]cl | cl.exe | *[/\\]cl.exe )
+ func_cl_wrapper "$@" # Doesn't return...
+ ;;
esac
ofile=
cfile=
-eat=
for arg
do
@@ -66,8 +270,8 @@ do
else
case $1 in
-o)
- # configure might choose to run compile as `compile cc -o foo foo.c'.
- # So we strip `-o arg' only if arg is an object.
+ # configure might choose to run compile as 'compile cc -o foo foo.c'.
+ # So we strip '-o arg' only if arg is an object.
eat=1
case $2 in
*.o | *.obj)
@@ -94,10 +298,10 @@ do
done
if test -z "$ofile" || test -z "$cfile"; then
- # If no `-o' option was seen then we might have been invoked from a
+ # If no '-o' option was seen then we might have been invoked from a
# pattern rule where we don't need one. That is ok -- this is a
# normal compilation that the losing compiler can handle. If no
- # `.c' file was seen then we are probably linking. That is also
+ # '.c' file was seen then we are probably linking. That is also
# ok.
exec "$@"
fi
@@ -106,7 +310,7 @@ fi
cofile=`echo "$cfile" | sed 's|^.*[\\/]||; s|^[a-zA-Z]:||; s/\.c$/.o/'`
# Create the lock directory.
-# Note: use `[/\\:.-]' here to ensure that we don't use the same name
+# Note: use '[/\\:.-]' here to ensure that we don't use the same name
# that we are using for the .o file. Also, base the name on the expected
# object file name, since that is what matters with a parallel build.
lockdir=`echo "$cofile" | sed -e 's|[/\\:.-]|_|g'`.d
@@ -124,9 +328,9 @@ trap "rmdir '$lockdir'; exit 1" 1 2 15
ret=$?
if test -f "$cofile"; then
- mv "$cofile" "$ofile"
+ test "$cofile" = "$ofile" || mv "$cofile" "$ofile"
elif test -f "${cofile}bj"; then
- mv "${cofile}bj" "$ofile"
+ test "${cofile}bj" = "$ofile" || mv "${cofile}bj" "$ofile"
fi
rmdir "$lockdir"
diff --git a/config-ml.in b/config-ml.in
index 11983461c..5e519942b 100644
--- a/config-ml.in
+++ b/config-ml.in
@@ -2,7 +2,7 @@
# wanting multilib support.
#
# Copyright (C) 1995, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
-# 2005, 2006, 2007, 2008, 2010, 2011 Free Software Foundation, Inc.
+# 2005, 2006, 2007, 2008, 2010, 2011, 2014 Free Software Foundation, Inc.
#
# This file is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -31,7 +31,7 @@
# user select which libraries s/he really wants.
#
# Subdirectories wishing to use multilib should put the following lines
-# in the "post-target" section of configure.in.
+# in the "post-target" section of configure.ac.
#
# if [ "${srcdir}" = "." ] ; then
# if [ "${with_target_subdir}" != "." ] ; then
@@ -105,31 +105,34 @@ ml_realsrcdir=${srcdir}
# Scan all the arguments and set all the ones we need.
-ml_verbose=--verbose
-for option in ${ac_configure_args}
-do
- # strip single quotes surrounding individual options
- case $option in
- \'*\') eval option=$option ;;
- esac
-
- case $option in
- --*) ;;
- -*) option=-$option ;;
- esac
-
- case $option in
- --*=*)
+scan_arguments ()
+{
+ ml_verbose=--verbose
+ for option
+ do
+ # Strip single quotes surrounding individual options, that is, remove one
+ # level of shell quoting for these.
+ case $option in
+ \'*\') eval option=$option ;;
+ esac
+
+ case $option in
+ --*) ;;
+ -*) option=-$option ;;
+ esac
+
+ case $option in
+ --*=*)
optarg=`echo $option | sed -e 's/^[^=]*=//'`
;;
- esac
+ esac
- case $option in
- --disable-*)
+ case $option in
+ --disable-*)
enableopt=`echo ${option} | sed 's:^--disable-:enable_:;s:-:_:g'`
eval $enableopt=no
;;
- --enable-*)
+ --enable-*)
case "$option" in
*=*) ;;
*) optarg=yes ;;
@@ -139,32 +142,37 @@ do
# Don't undo its work.
case $enableopt in
enable_shared | enable_static) ;;
- *) eval $enableopt="$optarg" ;;
+ *) eval $enableopt='$optarg' ;;
esac
;;
- --norecursion | --no-recursion)
+ --norecursion | --no-recursion)
ml_norecursion=yes
;;
- --silent | --sil* | --quiet | --q*)
+ --silent | --sil* | --quiet | --q*)
ml_verbose=--silent
;;
- --verbose | --v | --verb*)
+ --verbose | --v | --verb*)
ml_verbose=--verbose
;;
- --with-*)
+ --with-*)
case "$option" in
*=*) ;;
*) optarg=yes ;;
esac
withopt=`echo ${option} | sed 's:^--::;s:=.*$::;s:-:_:g'`
- eval $withopt="$optarg"
+ eval $withopt='$optarg'
;;
- --without-*)
+ --without-*)
withopt=`echo ${option} | sed 's:^--::;s:out::;s:-:_:g'`
eval $withopt=no
;;
- esac
-done
+ esac
+ done
+}
+# Use eval to properly handle configure arguments such as
+# --enable-foo='--enable-a=1 --enable-b=2 --enable-c=3'.
+eval scan_arguments "${ac_configure_args}"
+unset scan_arguments
# Only do this if --enable-multilib.
if [ "${enable_multilib}" = yes ]; then
@@ -174,8 +182,8 @@ if [ "${enable_multilib}" = yes ]; then
# ${with_multisubdir} tells us we're in the right branch, but we could be
# in a subdir of that.
# ??? The previous version could void this test by separating the process into
-# two files: one that only the library's toplevel configure.in ran (to
-# configure the multilib subdirs), and another that all configure.in's ran to
+# two files: one that only the library's toplevel configure.ac ran (to
+# configure the multilib subdirs), and another that all configure.ac's ran to
# update the Makefile. It seemed reasonable to collapse all multilib support
# into one file, but it does leave us with having to perform this test.
ml_toplevel_p=no
@@ -860,7 +868,7 @@ if [ -n "${multidirs}" ] && [ -z "${ml_norecursion}" ]; then
if eval ${ml_config_env} ${ml_config_shell} ${ml_recprog} \
--with-multisubdir=${ml_dir} --with-multisrctop=${multisrctop} \
- ${ac_configure_args} ${ml_config_env} ${ml_srcdiroption} ; then
+ "${ac_configure_args}" ${ml_config_env} ${ml_srcdiroption} ; then
true
else
exit 1
diff --git a/config.guess b/config.guess
index 2055429b1..dcd514968 100755
--- a/config.guess
+++ b/config.guess
@@ -1,8 +1,8 @@
#! /bin/sh
# Attempt to guess a canonical system name.
-# Copyright 1992-2013 Free Software Foundation, Inc.
+# Copyright 1992-2016 Free Software Foundation, Inc.
-timestamp='2013-04-24'
+timestamp='2016-01-01'
# This file is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by
@@ -24,12 +24,12 @@ timestamp='2013-04-24'
# program. This Exception is an additional permission under section 7
# of the GNU General Public License, version 3 ("GPLv3").
#
-# Originally written by Per Bothner.
+# Originally written by Per Bothner; maintained since 2000 by Ben Elliston.
#
# You can get the latest version of this script from:
-# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
+# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess
#
-# Please send patches with a ChangeLog entry to config-patches@gnu.org.
+# Please send patches to <config-patches@gnu.org>.
me=`echo "$0" | sed -e 's,.*/,,'`
@@ -50,7 +50,7 @@ version="\
GNU config.guess ($timestamp)
Originally written by Per Bothner.
-Copyright 1992-2013 Free Software Foundation, Inc.
+Copyright 1992-2016 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
@@ -132,6 +132,27 @@ UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown
UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
+case "${UNAME_SYSTEM}" in
+Linux|GNU|GNU/*)
+ # If the system lacks a compiler, then just pick glibc.
+ # We could probably try harder.
+ LIBC=gnu
+
+ eval $set_cc_for_build
+ cat <<-EOF > $dummy.c
+ #include <features.h>
+ #if defined(__UCLIBC__)
+ LIBC=uclibc
+ #elif defined(__dietlibc__)
+ LIBC=dietlibc
+ #else
+ LIBC=gnu
+ #endif
+ EOF
+ eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC' | sed 's, ,,g'`
+ ;;
+esac
+
# Note: order is significant - the case branches are not exclusive.
case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
@@ -147,20 +168,27 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
# Note: NetBSD doesn't particularly care about the vendor
# portion of the name. We always set it to "unknown".
sysctl="sysctl -n hw.machine_arch"
- UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \
- /usr/sbin/$sysctl 2>/dev/null || echo unknown)`
+ UNAME_MACHINE_ARCH=`(uname -p 2>/dev/null || \
+ /sbin/$sysctl 2>/dev/null || \
+ /usr/sbin/$sysctl 2>/dev/null || \
+ echo unknown)`
case "${UNAME_MACHINE_ARCH}" in
armeb) machine=armeb-unknown ;;
arm*) machine=arm-unknown ;;
sh3el) machine=shl-unknown ;;
sh3eb) machine=sh-unknown ;;
sh5el) machine=sh5le-unknown ;;
+ earmv*)
+ arch=`echo ${UNAME_MACHINE_ARCH} | sed -e 's,^e\(armv[0-9]\).*$,\1,'`
+ endian=`echo ${UNAME_MACHINE_ARCH} | sed -ne 's,^.*\(eb\)$,\1,p'`
+ machine=${arch}${endian}-unknown
+ ;;
*) machine=${UNAME_MACHINE_ARCH}-unknown ;;
esac
# The Operating System including object format, if it has switched
# to ELF recently, or will in the future.
case "${UNAME_MACHINE_ARCH}" in
- arm*|i386|m68k|ns32k|sh3*|sparc|vax)
+ arm*|earm*|i386|m68k|ns32k|sh3*|sparc|vax)
eval $set_cc_for_build
if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
| grep -q __ELF__
@@ -176,6 +204,13 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
os=netbsd
;;
esac
+ # Determine ABI tags.
+ case "${UNAME_MACHINE_ARCH}" in
+ earm*)
+ expr='s/^earmv[0-9]/-eabi/;s/eb$//'
+ abi=`echo ${UNAME_MACHINE_ARCH} | sed -e "$expr"`
+ ;;
+ esac
# The OS release
# Debian GNU/NetBSD machines have a different userland, and
# thus, need a distinct triplet. However, they do not need
@@ -186,13 +221,13 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
release='-gnu'
;;
*)
- release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
+ release=`echo ${UNAME_RELEASE} | sed -e 's/[-_].*//' | cut -d. -f1,2`
;;
esac
# Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:
# contains redundant information, the shorter form:
# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
- echo "${machine}-${os}${release}"
+ echo "${machine}-${os}${release}${abi}"
exit ;;
*:Bitrig:*:*)
UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'`
@@ -214,6 +249,9 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
*:MirBSD:*:*)
echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE}
exit ;;
+ *:Sortix:*:*)
+ echo ${UNAME_MACHINE}-unknown-sortix
+ exit ;;
alpha:OSF1:*:*)
case $UNAME_RELEASE in
*4.0)
@@ -558,8 +596,9 @@ EOF
else
IBM_ARCH=powerpc
fi
- if [ -x /usr/bin/oslevel ] ; then
- IBM_REV=`/usr/bin/oslevel`
+ if [ -x /usr/bin/lslpp ] ; then
+ IBM_REV=`/usr/bin/lslpp -Lqc bos.rte.libc |
+ awk -F: '{ print $3 }' | sed s/[0-9]*$/0/`
else
IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
fi
@@ -805,7 +844,7 @@ EOF
*:MINGW*:*)
echo ${UNAME_MACHINE}-pc-mingw32
exit ;;
- i*:MSYS*:*)
+ *:MSYS*:*)
echo ${UNAME_MACHINE}-pc-msys
exit ;;
i*:windows32*:*)
@@ -853,21 +892,21 @@ EOF
exit ;;
*:GNU:*:*)
# the GNU system
- echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
+ echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-${LIBC}`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
exit ;;
*:GNU/*:*:*)
# other systems with GNU libc and userland
- echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu
+ echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-${LIBC}
exit ;;
i*86:Minix:*:*)
echo ${UNAME_MACHINE}-pc-minix
exit ;;
aarch64:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
aarch64_be:Linux:*:*)
UNAME_MACHINE=aarch64_be
- echo ${UNAME_MACHINE}-unknown-linux-gnu
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
alpha:Linux:*:*)
case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
@@ -880,67 +919,60 @@ EOF
EV68*) UNAME_MACHINE=alphaev68 ;;
esac
objdump --private-headers /bin/sh | grep -q ld.so.1
- if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
- echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
+ if test "$?" = 0 ; then LIBC="gnulibc1" ; fi
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
arc:Linux:*:* | arceb:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
arm*:Linux:*:*)
eval $set_cc_for_build
if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
| grep -q __ARM_EABI__
then
- echo ${UNAME_MACHINE}-unknown-linux-gnu
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
else
if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \
| grep -q __ARM_PCS_VFP
then
- echo ${UNAME_MACHINE}-unknown-linux-gnueabi
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabi
else
- echo ${UNAME_MACHINE}-unknown-linux-gnueabihf
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabihf
fi
fi
exit ;;
avr32*:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
cris:Linux:*:*)
- echo ${UNAME_MACHINE}-axis-linux-gnu
+ echo ${UNAME_MACHINE}-axis-linux-${LIBC}
exit ;;
crisv32:Linux:*:*)
- echo ${UNAME_MACHINE}-axis-linux-gnu
+ echo ${UNAME_MACHINE}-axis-linux-${LIBC}
+ exit ;;
+ e2k:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
frv:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
hexagon:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
i*86:Linux:*:*)
- LIBC=gnu
- eval $set_cc_for_build
- sed 's/^ //' << EOF >$dummy.c
- #ifdef __dietlibc__
- LIBC=dietlibc
- #endif
- #else
- #include <features.h>
- #ifdef __UCLIBC__
- LIBC=uclibc
- #endif
-EOF
- eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'`
- echo "${UNAME_MACHINE}-pc-linux-${LIBC}"
+ echo ${UNAME_MACHINE}-pc-linux-${LIBC}
exit ;;
ia64:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ exit ;;
+ k1om:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
m32r*:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
m68*:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
mips:Linux:*:* | mips64:Linux:*:*)
eval $set_cc_for_build
@@ -959,59 +991,63 @@ EOF
#endif
EOF
eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'`
- test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
+ test x"${CPU}" != x && { echo "${CPU}-unknown-linux-${LIBC}"; exit; }
;;
- or1k:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
+ openrisc*:Linux:*:*)
+ echo or1k-unknown-linux-${LIBC}
exit ;;
- or32:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
+ or32:Linux:*:* | or1k*:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
padre:Linux:*:*)
- echo sparc-unknown-linux-gnu
+ echo sparc-unknown-linux-${LIBC}
exit ;;
parisc64:Linux:*:* | hppa64:Linux:*:*)
- echo hppa64-unknown-linux-gnu
+ echo hppa64-unknown-linux-${LIBC}
exit ;;
parisc:Linux:*:* | hppa:Linux:*:*)
# Look for CPU level
case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
- PA7*) echo hppa1.1-unknown-linux-gnu ;;
- PA8*) echo hppa2.0-unknown-linux-gnu ;;
- *) echo hppa-unknown-linux-gnu ;;
+ PA7*) echo hppa1.1-unknown-linux-${LIBC} ;;
+ PA8*) echo hppa2.0-unknown-linux-${LIBC} ;;
+ *) echo hppa-unknown-linux-${LIBC} ;;
esac
exit ;;
ppc64:Linux:*:*)
- echo powerpc64-unknown-linux-gnu
+ echo powerpc64-unknown-linux-${LIBC}
exit ;;
ppc:Linux:*:*)
- echo powerpc-unknown-linux-gnu
+ echo powerpc-unknown-linux-${LIBC}
+ exit ;;
+ ppc64le:Linux:*:*)
+ echo powerpc64le-unknown-linux-${LIBC}
+ exit ;;
+ ppcle:Linux:*:*)
+ echo powerpcle-unknown-linux-${LIBC}
exit ;;
s390:Linux:*:* | s390x:Linux:*:*)
- echo ${UNAME_MACHINE}-ibm-linux
+ echo ${UNAME_MACHINE}-ibm-linux-${LIBC}
exit ;;
sh64*:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
sh*:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
sparc:Linux:*:* | sparc64:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
tile*:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
vax:Linux:*:*)
- echo ${UNAME_MACHINE}-dec-linux-gnu
+ echo ${UNAME_MACHINE}-dec-linux-${LIBC}
exit ;;
x86_64:Linux:*:*)
- LIBC=gnu
- test -r /lib/libc.so && od -An -S13 /lib/libc.so | grep -q __uClibc_main && LIBC=uclibc
- echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ echo ${UNAME_MACHINE}-pc-linux-${LIBC}
exit ;;
xtensa*:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
i*86:DYNIX/ptx:4*:*)
# ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
@@ -1087,7 +1123,7 @@ EOF
# uname -m prints for DJGPP always 'pc', but it prints nothing about
# the processor, so we play safe by assuming i586.
# Note: whatever this is, it MUST be the same as what config.sub
- # prints for the "djgpp" host, or else GDB configury will decide that
+ # prints for the "djgpp" host, or else GDB configure will decide that
# this is a cross-build.
echo i586-pc-msdosdjgpp
exit ;;
@@ -1244,19 +1280,31 @@ EOF
exit ;;
*:Darwin:*:*)
UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
- case $UNAME_PROCESSOR in
- i386)
- eval $set_cc_for_build
- if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
- if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
- (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
- grep IS_64BIT_ARCH >/dev/null
- then
- UNAME_PROCESSOR="x86_64"
- fi
- fi ;;
- unknown) UNAME_PROCESSOR=powerpc ;;
- esac
+ eval $set_cc_for_build
+ if test "$UNAME_PROCESSOR" = unknown ; then
+ UNAME_PROCESSOR=powerpc
+ fi
+ if test `echo "$UNAME_RELEASE" | sed -e 's/\..*//'` -le 10 ; then
+ if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
+ if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
+ (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
+ grep IS_64BIT_ARCH >/dev/null
+ then
+ case $UNAME_PROCESSOR in
+ i386) UNAME_PROCESSOR=x86_64 ;;
+ powerpc) UNAME_PROCESSOR=powerpc64 ;;
+ esac
+ fi
+ fi
+ elif test "$UNAME_PROCESSOR" = i386 ; then
+ # Avoid executing cc on OS X 10.9, as it ships with a stub
+ # that puts up a graphical alert prompting to install
+ # developer tools. Any system running Mac OS X 10.7 or
+ # later (Darwin 11 and later) is required to have a 64-bit
+ # processor. This is not true of the ARM version of Darwin
+ # that Apple uses in portable devices.
+ UNAME_PROCESSOR=x86_64
+ fi
echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
exit ;;
*:procnto*:*:* | *:QNX:[0123456789]*:*)
@@ -1345,155 +1393,10 @@ EOF
x86_64:VMkernel:*:*)
echo ${UNAME_MACHINE}-unknown-esx
exit ;;
-esac
-
-eval $set_cc_for_build
-cat >$dummy.c <<EOF
-#ifdef _SEQUENT_
-# include <sys/types.h>
-# include <sys/utsname.h>
-#endif
-main ()
-{
-#if defined (sony)
-#if defined (MIPSEB)
- /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed,
- I don't know.... */
- printf ("mips-sony-bsd\n"); exit (0);
-#else
-#include <sys/param.h>
- printf ("m68k-sony-newsos%s\n",
-#ifdef NEWSOS4
- "4"
-#else
- ""
-#endif
- ); exit (0);
-#endif
-#endif
-
-#if defined (__arm) && defined (__acorn) && defined (__unix)
- printf ("arm-acorn-riscix\n"); exit (0);
-#endif
-
-#if defined (hp300) && !defined (hpux)
- printf ("m68k-hp-bsd\n"); exit (0);
-#endif
-
-#if defined (NeXT)
-#if !defined (__ARCHITECTURE__)
-#define __ARCHITECTURE__ "m68k"
-#endif
- int version;
- version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`;
- if (version < 4)
- printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version);
- else
- printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version);
- exit (0);
-#endif
-
-#if defined (MULTIMAX) || defined (n16)
-#if defined (UMAXV)
- printf ("ns32k-encore-sysv\n"); exit (0);
-#else
-#if defined (CMU)
- printf ("ns32k-encore-mach\n"); exit (0);
-#else
- printf ("ns32k-encore-bsd\n"); exit (0);
-#endif
-#endif
-#endif
-
-#if defined (__386BSD__)
- printf ("i386-pc-bsd\n"); exit (0);
-#endif
-
-#if defined (sequent)
-#if defined (i386)
- printf ("i386-sequent-dynix\n"); exit (0);
-#endif
-#if defined (ns32000)
- printf ("ns32k-sequent-dynix\n"); exit (0);
-#endif
-#endif
-
-#if defined (_SEQUENT_)
- struct utsname un;
-
- uname(&un);
-
- if (strncmp(un.version, "V2", 2) == 0) {
- printf ("i386-sequent-ptx2\n"); exit (0);
- }
- if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */
- printf ("i386-sequent-ptx1\n"); exit (0);
- }
- printf ("i386-sequent-ptx\n"); exit (0);
-
-#endif
-
-#if defined (vax)
-# if !defined (ultrix)
-# include <sys/param.h>
-# if defined (BSD)
-# if BSD == 43
- printf ("vax-dec-bsd4.3\n"); exit (0);
-# else
-# if BSD == 199006
- printf ("vax-dec-bsd4.3reno\n"); exit (0);
-# else
- printf ("vax-dec-bsd\n"); exit (0);
-# endif
-# endif
-# else
- printf ("vax-dec-bsd\n"); exit (0);
-# endif
-# else
- printf ("vax-dec-ultrix\n"); exit (0);
-# endif
-#endif
-
-#if defined (alliant) && defined (i860)
- printf ("i860-alliant-bsd\n"); exit (0);
-#endif
-
- exit (1);
-}
-EOF
-
-$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` &&
- { echo "$SYSTEM_NAME"; exit; }
-
-# Apollos put the system type in the environment.
-
-test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; }
-
-# Convex versions that predate uname can use getsysinfo(1)
-
-if [ -x /usr/convex/getsysinfo ]
-then
- case `getsysinfo -f cpu_type` in
- c1*)
- echo c1-convex-bsd
- exit ;;
- c2*)
- if getsysinfo -f scalar_acc
- then echo c32-convex-bsd
- else echo c2-convex-bsd
- fi
+ amd64:Isilon\ OneFS:*:*)
+ echo x86_64-unknown-onefs
exit ;;
- c34*)
- echo c34-convex-bsd
- exit ;;
- c38*)
- echo c38-convex-bsd
- exit ;;
- c4*)
- echo c4-convex-bsd
- exit ;;
- esac
-fi
+esac
cat >&2 <<EOF
$0: unable to guess system type
@@ -1502,9 +1405,9 @@ This script, last modified $timestamp, has failed to recognize
the operating system you are using. It is advised that you
download the most up to date version of the config scripts from
- http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
+ http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess
and
- http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD
+ http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub
If the version you run ($0) is already up to date, please
send the following data and any information you think might be
diff --git a/config.sub b/config.sub
index 8b612ab89..da6d1b682 100755
--- a/config.sub
+++ b/config.sub
@@ -1,8 +1,8 @@
#! /bin/sh
# Configuration validation subroutine script.
-# Copyright 1992-2013 Free Software Foundation, Inc.
+# Copyright 1992-2016 Free Software Foundation, Inc.
-timestamp='2013-04-24'
+timestamp='2016-01-01'
# This file is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by
@@ -25,7 +25,7 @@ timestamp='2013-04-24'
# of the GNU General Public License, version 3 ("GPLv3").
-# Please send patches with a ChangeLog entry to config-patches@gnu.org.
+# Please send patches to <config-patches@gnu.org>.
#
# Configuration subroutine to validate and canonicalize a configuration type.
# Supply the specified configuration type as an argument.
@@ -33,7 +33,7 @@ timestamp='2013-04-24'
# Otherwise, we print the canonical config type on stdout and succeed.
# You can get the latest version of this script from:
-# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD
+# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub
# This file is supposed to be the same for all GNU packages
# and recognize all the CPU types, system types and aliases
@@ -53,8 +53,7 @@ timestamp='2013-04-24'
me=`echo "$0" | sed -e 's,.*/,,'`
usage="\
-Usage: $0 [OPTION] CPU-MFR-OPSYS
- $0 [OPTION] ALIAS
+Usage: $0 [OPTION] CPU-MFR-OPSYS or ALIAS
Canonicalize a configuration name.
@@ -68,7 +67,7 @@ Report bugs and patches to <config-patches@gnu.org>."
version="\
GNU config.sub ($timestamp)
-Copyright 1992-2013 Free Software Foundation, Inc.
+Copyright 1992-2016 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
@@ -117,7 +116,7 @@ maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
case $maybe_os in
nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \
linux-musl* | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \
- knetbsd*-gnu* | netbsd*-gnu* | \
+ knetbsd*-gnu* | netbsd*-gnu* | netbsd*-eabi* | \
kopensolaris*-gnu* | \
storm-chaos* | os2-emx* | rtmk-nova*)
os=-$maybe_os
@@ -255,16 +254,18 @@ case $basic_machine in
| arc | arceb \
| arm | arm[bl]e | arme[lb] | armv[2-8] | armv[3-8][lb] | armv7[arm] \
| avr | avr32 \
+ | ba \
| be32 | be64 \
| bfin \
- | c4x | clipper \
+ | c4x | c8051 | clipper \
| d10v | d30v | dlx | dsp16xx \
- | epiphany \
- | fido | fr30 | frv \
+ | e2k | epiphany \
+ | fido | fr30 | frv | ft32 \
| h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
| hexagon \
| i370 | i860 | i960 | ia64 \
| ip2k | iq2000 \
+ | k1om \
| le32 | le64 \
| lm32 \
| m32c | m32r | m32rle | m68000 | m68k | m88k \
@@ -282,8 +283,10 @@ case $basic_machine in
| mips64vr5900 | mips64vr5900el \
| mipsisa32 | mipsisa32el \
| mipsisa32r2 | mipsisa32r2el \
+ | mipsisa32r6 | mipsisa32r6el \
| mipsisa64 | mipsisa64el \
| mipsisa64r2 | mipsisa64r2el \
+ | mipsisa64r6 | mipsisa64r6el \
| mipsisa64sb1 | mipsisa64sb1el \
| mipsisa64sr71k | mipsisa64sr71kel \
| mipsr5900 | mipsr5900el \
@@ -295,14 +298,14 @@ case $basic_machine in
| nds32 | nds32le | nds32be \
| nios | nios2 | nios2eb | nios2el \
| ns16k | ns32k \
- | open8 \
- | or1k | or32 \
+ | open8 | or1k | or1knd | or32 \
| pdp10 | pdp11 | pj | pjl \
| powerpc | powerpc64 | powerpc64le | powerpcle \
| pyramid \
+ | riscv32 | riscv64 \
| rl78 | rx \
| score \
- | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
+ | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[234]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
| sh64 | sh64le \
| sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \
| sparcv8 | sparcv9 | sparcv9b | sparcv9v \
@@ -310,6 +313,7 @@ case $basic_machine in
| tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \
| ubicom32 \
| v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \
+ | visium \
| we32k \
| x86 | xc16x | xstormy16 | xtensa \
| z8k | z80)
@@ -324,7 +328,10 @@ case $basic_machine in
c6x)
basic_machine=tic6x-unknown
;;
- m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | picochip)
+ leon|leon[3-9])
+ basic_machine=sparc-$basic_machine
+ ;;
+ m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | nvptx | picochip)
basic_machine=$basic_machine-unknown
os=-none
;;
@@ -369,18 +376,20 @@ case $basic_machine in
| alphapca5[67]-* | alpha64pca5[67]-* | arc-* | arceb-* \
| arm-* | armbe-* | armle-* | armeb-* | armv*-* \
| avr-* | avr32-* \
+ | ba-* \
| be32-* | be64-* \
| bfin-* | bs2000-* \
| c[123]* | c30-* | [cjt]90-* | c4x-* \
- | clipper-* | craynv-* | cydra-* \
+ | c8051-* | clipper-* | craynv-* | cydra-* \
| d10v-* | d30v-* | dlx-* \
- | elxsi-* \
+ | e2k-* | elxsi-* \
| f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \
| h8300-* | h8500-* \
| hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
| hexagon-* \
| i*86-* | i860-* | i960-* | ia64-* \
| ip2k-* | iq2000-* \
+ | k1om-* \
| le32-* | le64-* \
| lm32-* \
| m32c-* | m32r-* | m32rle-* \
@@ -400,8 +409,10 @@ case $basic_machine in
| mips64vr5900-* | mips64vr5900el-* \
| mipsisa32-* | mipsisa32el-* \
| mipsisa32r2-* | mipsisa32r2el-* \
+ | mipsisa32r6-* | mipsisa32r6el-* \
| mipsisa64-* | mipsisa64el-* \
| mipsisa64r2-* | mipsisa64r2el-* \
+ | mipsisa64r6-* | mipsisa64r6el-* \
| mipsisa64sb1-* | mipsisa64sb1el-* \
| mipsisa64sr71k-* | mipsisa64sr71kel-* \
| mipsr5900-* | mipsr5900el-* \
@@ -413,16 +424,18 @@ case $basic_machine in
| nios-* | nios2-* | nios2eb-* | nios2el-* \
| none-* | np1-* | ns16k-* | ns32k-* \
| open8-* \
+ | or1k*-* \
| orion-* \
| pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
| powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \
| pyramid-* \
+ | riscv32-* | riscv64-* \
| rl78-* | romp-* | rs6000-* | rx-* \
| sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \
| shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
| sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \
| sparclite-* \
- | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx?-* \
+ | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx*-* \
| tahoe-* \
| tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
| tile*-* \
@@ -430,6 +443,7 @@ case $basic_machine in
| ubicom32-* \
| v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \
| vax-* \
+ | visium-* \
| we32k-* \
| x86-* | x86_64-* | xc16x-* | xps100-* \
| xstormy16-* | xtensa*-* \
@@ -506,6 +520,9 @@ case $basic_machine in
basic_machine=i386-pc
os=-aros
;;
+ asmjs)
+ basic_machine=asmjs-unknown
+ ;;
aux)
basic_machine=m68k-apple
os=-aux
@@ -767,6 +784,9 @@ case $basic_machine in
basic_machine=m68k-isi
os=-sysv
;;
+ leon-*|leon[3-9]-*)
+ basic_machine=sparc-`echo $basic_machine | sed 's/-.*//'`
+ ;;
m68knommu)
basic_machine=m68k-unknown
os=-linux
@@ -794,7 +814,7 @@ case $basic_machine in
os=-mingw64
;;
mingw32)
- basic_machine=i386-pc
+ basic_machine=i686-pc
os=-mingw32
;;
mingw32ce)
@@ -822,6 +842,10 @@ case $basic_machine in
basic_machine=powerpc-unknown
os=-morphos
;;
+ moxiebox)
+ basic_machine=moxie-unknown
+ os=-moxiebox
+ ;;
msdos)
basic_machine=i386-pc
os=-msdos
@@ -830,7 +854,7 @@ case $basic_machine in
basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'`
;;
msys)
- basic_machine=i386-pc
+ basic_machine=i686-pc
os=-msys
;;
mvs)
@@ -1354,7 +1378,7 @@ case $os in
| -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \
| -sym* | -kopensolaris* | -plan9* \
| -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
- | -aos* | -aros* \
+ | -aos* | -aros* | -cloudabi* | -sortix* \
| -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
| -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
| -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \
@@ -1367,14 +1391,15 @@ case $os in
| -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
| -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \
| -linux-newlib* | -linux-musl* | -linux-uclibc* \
- | -uxpv* | -beos* | -mpeix* | -udk* \
+ | -uxpv* | -beos* | -mpeix* | -udk* | -moxiebox* \
| -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
| -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
| -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
| -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
| -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
| -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
- | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es*)
+ | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es* \
+ | -onefs* | -tirtos*)
# Remember, each alternative MUST END IN *, to match a version number.
;;
-qnx*)
@@ -1546,6 +1571,9 @@ case $basic_machine in
c4x-* | tic4x-*)
os=-coff
;;
+ c8051-*)
+ os=-elf
+ ;;
hexagon-*)
os=-elf
;;
@@ -1589,9 +1617,6 @@ case $basic_machine in
mips*-*)
os=-elf
;;
- or1k-*)
- os=-elf
- ;;
or32-*)
os=-coff
;;
diff --git a/config/ChangeLog b/config/ChangeLog
index cdc733c70..9b3964a60 100644
--- a/config/ChangeLog
+++ b/config/ChangeLog
@@ -1,3 +1,177 @@
+2015-10-21 Maxim Ostapenko <m.ostapenko@partner.samsung.com>
+
+ * bootstrap-asan.mk: Replace ASAN_OPTIONS=detect_leaks with
+ LSAN_OPTIONS=detect_leaks.
+
+2015-08-24 Yaakov Selkowitz <yselkowi@redhat.com>
+
+ * iconv.m4 (AM_ICONV_LINK): Use in-tree libiconv when present.
+
+2015-07-24 Micahel Darling <darlingm@gmail.com>
+
+ PR other/66259
+ * gettext.m4: Reflects renaming of configure.in to configure.ac
+ * po.m4: Likewise
+ * stdint.m4: Likewise
+ * tcl.m4: Likewise
+
+2015-07-14 H.J. Lu <hongjiu.lu@intel.com>
+
+ * zlib.m4: Sync with binutils-gdb.
+
+2015-06-30 H.J. Lu <hongjiu.lu@intel.com>
+
+ * dfp.m4 (enable_decimal_float): Also set to yes for
+ i?86*-*-elfiamcu target.
+
+2015-05-27 Jason Merrill <jason@redhat.com>
+
+ PR bootstrap/66304
+ * warnings.m4 (ACX_PROG_CXX_WARNING_OPTS)
+ (ACX_PROG_CXX_WARNINGS_ARE_ERRORS)
+ (ACX_PROG_CXX_WARNING_ALMOST_PEDANTIC): New.
+ (ACX_PROG_CC_WARNING_OPTS, ACX_PROG_CC_WARNING_ALMOST_PEDANTIC)
+ (ACX_PROG_CC_WARNINGS_ARE_ERRORS): Push into C language context.
+
+2015-05-13 Eric Botcazou <ebotcazou@adacore.com>
+
+ * sjlj.m4: New file.
+
+2015-05-04 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
+
+ * bitfields.m4: Change int to long long, and use bitfields of
+ width 1 instead of 0.
+
+2015-05-01 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
+
+ * bitfields.m4: New file.
+
+2015-04-14 H.J. Lu <hongjiu.lu@intel.com>
+
+ * bootstrap-mpx.mk: New file.
+
+2015-04-10 Jakub Jelinek <jakub@redhat.com>
+ Iain Sandoe <iain@codesourcery.com>
+
+ PR target/65351
+ * mh-darwin: Only apply -mdynamic-no-pic for m32 Darwin when the
+ compiler in use supports -mno-dynamic-no-pic.
+ * picflag.m4: Only append -mno-dynamic-no-pic for Darwin when
+ -mdynamic-no-pic is present in CFLAGS.
+
+2015-04-07 Jakub Jelinek <jakub@redhat.com>
+ Iain Sandoe <iain@codesourcery.com>
+
+ PR target/65351
+ * picflag.m4: Append -mno-dynamic-no-pic for Darwin.
+
+2015-03-25 Uros Bizjak <ubizjak@gmail.com>
+
+ PR bootstrap/65537
+ * bootstrap-lto-noplugin.mk: New build configuration.
+
+2015-02-18 Thomas Schwinge <thomas@codesourcery.com>
+
+ * elf.m4 (ACX_ELF_TARGET_IFELSE): nvptx-*-none isn't ELF.
+
+2014-11-17 Bob Dunlop <bob.dunlop@xyzzy.org.uk>
+
+ * mt-ospace (CFLAGS_FOR_TARGET): Append -g -Os rather than
+ overwriting.
+ (CXXFLAGS_FOR_TARGET): Similarly.
+
+2014-11-17 H.J. Lu <hongjiu.lu@intel.com>
+
+ PR bootstrap/63888
+ * bootstrap-asan.mk (ASAN_OPTIONS): Export "detect_leaks=0".
+
+2014-11-13 Kirill Yukhin <kirill.yukhin@intel.com>
+
+ * target-posix: New file.
+
+2014-11-11 Tobias Burnus <burnus@net-b.de>
+
+ * cloog.m4: Remove.
+
+2014-10-27 Tom Tromey <tromey@redhat.com>
+
+ * gcc-plugin.m4: New file.
+
+2014-09-01 Andi Kleen <ak@linux.intel.com>
+
+ * bootstrap-lto.mk: Implement slim bootstrap.
+
+2014-08-21 Bin Cheng <bin.cheng@arm.com>
+
+ * isl.m4 (ISL_CHECK_VERSION): Check link of isl library
+ for cross_compiling.
+
+2014-08-19 Alan Modra <amodra@gmail.com>
+
+ * plugins.m4 (AC_PLUGINS): If plugins are enabled, add -ldl to
+ LIBS via AC_SEARCH_LIBS.
+
+2014-08-18 Roman Gareev <gareevroman@gmail.com>
+
+ * cloog.m4: Remove the path to isllibs from clooglibs.
+ * isl.m4: Add paths to islinc, isllibs.
+
+2014-08-14 Alan Modra <amodra@gmail.com>
+
+ * plugins.m4: Test for dlfcn.h or windows.h here to set default
+ for --enable-plugins. Report error if someone tries to enable
+ plugins on a host we don't support.
+
+2014-07-26 Uros Bizjak <ubizjak@gmail.com>
+
+ PR target/47230
+ * mh-alpha-linux: New file.
+
+2014-05-14 Sandra Loosemore <sandra@codesourcery.com>
+
+ * mt-nios2-elf: New file.
+
+2014-04-25 Marc Glisse <marc.glisse@inria.fr>
+
+ PR target/43538
+ * mt-gnu: Don't reset CXXFLAGS_FOR_TARGET.
+
+2013-12-07 Mike Frysinger <vapier@gentoo.org>
+
+ * acinclude.m4: Remove +x file mode.
+
+2013-11-29 Marek Polacek <polacek@redhat.com>
+
+ * bootstrap-ubsan.mk (POSTSTAGE1_LDFLAGS): Remove -lpthread -ldl.
+ Add -B$$r/prev-$(TARGET_SUBDIR)/libsanitizer/.
+
+2013-11-29 H.J. Lu <hongjiu.lu@intel.com>
+
+ * bootstrap-asan.mk (POSTSTAGE1_LDFLAGS): Add
+ -B$$r/prev-$(TARGET_SUBDIR)/libsanitizer/.
+
+2013-11-19 Marek Polacek <polacek@redhat.com>
+
+ * bootstrap-ubsan.mk (POSTSTAGE1_LDFLAGS): Add -ldl.
+
+2013-11-18 Jan Hubicka <jh@suse.cz>
+
+ * bootstrap-lto.mk: Use -ffat-lto-objects.
+
+2013-11-15 Andreas Schwab <schwab@linux-m68k.org>
+
+ * picflag.m4 (m68k-*-*): Use default PIC flag.
+
+2013-09-29 Iain Sandoe <iain@codesourcery.com>
+
+ * mh-darwin (BOOT_CFLAGS): Only add -mdynamic-no-pic for m32 hosts.
+ (STAGE1_CFLAGS, STAGE1_LDFLAGS): New.
+ Fix over-length lines and amend comments.
+
+2013-08-30 Marek Polacek <polacek@redhat.com>
+
+ * bootstrap-ubsan.mk: New.
+
2013-03-27 Kai Tietz <ktietz@redhat.com>
* dfp.m4: Add support for cygwin x64 target.
@@ -8,6 +182,10 @@
* bootstrap-asan.mk (POSTSTAGE1_LDFLAGS): Add
-B$$r/prev-$(TARGET_SUBDIR)/libsanitizer/asan/.
+2013-01-23 Shenghou Ma <minux.ma@gmail.com>
+
+ * isl.m4: don't echo $CFLAGS for ISL_CHECK_VERSION.
+
2013-01-15 Richard Biener <rguenther@suse.de>
PR other/55973
diff --git a/config/acinclude.m4 b/config/acinclude.m4
index 8242b2c7a..8242b2c7a 100755..100644
--- a/config/acinclude.m4
+++ b/config/acinclude.m4
diff --git a/config/bitfields.m4 b/config/bitfields.m4
new file mode 100644
index 000000000..8185cd302
--- /dev/null
+++ b/config/bitfields.m4
@@ -0,0 +1,25 @@
+dnl Copyright (C) 2015 Free Software Foundation, Inc.
+dnl This file is free software, distributed under the terms of the GNU
+dnl General Public License. As a special exception to the GNU General
+dnl Public License, this file may be distributed as part of a program
+dnl that contains a configuration script generated by Autoconf, under
+dnl the same distribution terms as the rest of that program.
+
+# Define HAVE_BITFIELD_TYPE_MATTERS if the type of bitfields effects their
+# alignment.
+
+AC_DEFUN([gt_BITFIELD_TYPE_MATTERS],
+[
+ AC_CACHE_CHECK([if the type of bitfields matters], gt_cv_bitfield_type_matters,
+ [
+ AC_TRY_COMPILE(
+ [struct foo1 { char x; char y:1; char z; };
+struct foo2 { char x; long long int y:1; char z; };
+int foo1test[ sizeof (struct foo1) < sizeof (struct foo2) ? 1 : -1 ]; ],
+ [], gt_cv_bitfield_type_matters=yes, gt_cv_bitfield_type_matters=no)
+ ])
+ if test $gt_cv_bitfield_type_matters = yes; then
+ AC_DEFINE(HAVE_BITFIELD_TYPE_MATTERS, 1,
+ [Define if the type of bitfields effects alignment.])
+ fi
+])
diff --git a/config/bootstrap-asan.mk b/config/bootstrap-asan.mk
index e3f34f5ad..70baaf9bb 100644
--- a/config/bootstrap-asan.mk
+++ b/config/bootstrap-asan.mk
@@ -1,7 +1,11 @@
# This option enables -fsanitize=address for stage2 and stage3.
+# Suppress LeakSanitizer in bootstrap.
+export LSAN_OPTIONS="detect_leaks=0"
+
STAGE2_CFLAGS += -fsanitize=address
STAGE3_CFLAGS += -fsanitize=address
POSTSTAGE1_LDFLAGS += -fsanitize=address -static-libasan \
+ -B$$r/prev-$(TARGET_SUBDIR)/libsanitizer/ \
-B$$r/prev-$(TARGET_SUBDIR)/libsanitizer/asan/ \
-B$$r/prev-$(TARGET_SUBDIR)/libsanitizer/asan/.libs
diff --git a/config/bootstrap-lto-noplugin.mk b/config/bootstrap-lto-noplugin.mk
new file mode 100644
index 000000000..a5073365b
--- /dev/null
+++ b/config/bootstrap-lto-noplugin.mk
@@ -0,0 +1,6 @@
+# This option enables LTO for stage2 and stage3 on
+# hosts without linker plugin support.
+
+STAGE2_CFLAGS += -flto=jobserver -frandom-seed=1 -ffat-lto-objects
+STAGE3_CFLAGS += -flto=jobserver -frandom-seed=1 -ffat-lto-objects
+STAGEprofile_CFLAGS += -fno-lto
diff --git a/config/bootstrap-lto.mk b/config/bootstrap-lto.mk
index bbd3515ea..9e065e1d8 100644
--- a/config/bootstrap-lto.mk
+++ b/config/bootstrap-lto.mk
@@ -1,5 +1,13 @@
-# This option enables LTO for stage2 and stage3.
+# This option enables LTO for stage2 and stage3 in slim mode
STAGE2_CFLAGS += -flto=jobserver -frandom-seed=1
STAGE3_CFLAGS += -flto=jobserver -frandom-seed=1
STAGEprofile_CFLAGS += -fno-lto
+
+# assumes the host supports the linker plugin
+LTO_AR = $$r/$(HOST_SUBDIR)/prev-gcc/gcc-ar$(exeext) -B$$r/$(HOST_SUBDIR)/prev-gcc/
+LTO_RANLIB = $$r/$(HOST_SUBDIR)/prev-gcc/gcc-ranlib$(exeext) -B$$r/$(HOST_SUBDIR)/prev-gcc/
+
+LTO_EXPORTS = AR="$(LTO_AR)"; export AR; \
+ RANLIB="$(LTO_RANLIB)"; export RANLIB;
+LTO_FLAGS_TO_PASS = AR="$(LTO_AR)" RANLIB="$(LTO_RANLIB)"
diff --git a/config/bootstrap-mpx.mk b/config/bootstrap-mpx.mk
new file mode 100644
index 000000000..acc2a2e7a
--- /dev/null
+++ b/config/bootstrap-mpx.mk
@@ -0,0 +1,9 @@
+# This option enables -fcheck-pointer-bounds -mmpx for stage2 and stage3.
+
+STAGE2_CFLAGS += -fcheck-pointer-bounds -mmpx -frandom-seed=1
+STAGE3_CFLAGS += -fcheck-pointer-bounds -mmpx -frandom-seed=1
+POSTSTAGE1_LDFLAGS += -fcheck-pointer-bounds -mmpx -frandom-seed=1 \
+ -static-libmpx -static-libmpxwrappers \
+ -B$$r/prev-$(TARGET_SUBDIR)/libmpx \
+ -B$$r/prev-$(TARGET_SUBDIR)/libmpx/mpxrt/.libs \
+ -B$$r/prev-$(TARGET_SUBDIR)/libmpx/mpxwrap/.libs
diff --git a/config/bootstrap-ubsan.mk b/config/bootstrap-ubsan.mk
new file mode 100644
index 000000000..d2615e8f8
--- /dev/null
+++ b/config/bootstrap-ubsan.mk
@@ -0,0 +1,8 @@
+# This option enables -fsanitize=undefined for stage2 and stage3.
+
+STAGE2_CFLAGS += -fsanitize=undefined
+STAGE3_CFLAGS += -fsanitize=undefined
+POSTSTAGE1_LDFLAGS += -fsanitize=undefined -static-libubsan \
+ -B$$r/prev-$(TARGET_SUBDIR)/libsanitizer/ \
+ -B$$r/prev-$(TARGET_SUBDIR)/libsanitizer/ubsan/ \
+ -B$$r/prev-$(TARGET_SUBDIR)/libsanitizer/ubsan/.libs
diff --git a/config/dfp.m4 b/config/dfp.m4
index 48683f0f9..5b29089ce 100644
--- a/config/dfp.m4
+++ b/config/dfp.m4
@@ -21,7 +21,7 @@ Valid choices are 'yes', 'bid', 'dpd', and 'no'.]) ;;
[
case $1 in
powerpc*-*-linux* | i?86*-*-linux* | x86_64*-*-linux* | s390*-*-linux* | \
- i?86*-*-gnu* | \
+ i?86*-*-elfiamcu | i?86*-*-gnu* | \
i?86*-*-mingw* | x86_64*-*-mingw* | \
i?86*-*-cygwin* | x86_64*-*-cygwin*)
enable_decimal_float=yes
diff --git a/config/elf.m4 b/config/elf.m4
index da051cbe6..1772a4431 100644
--- a/config/elf.m4
+++ b/config/elf.m4
@@ -1,4 +1,4 @@
-dnl Copyright (C) 2010, 2011 Free Software Foundation, Inc.
+dnl Copyright (C) 2010, 2011, 2015 Free Software Foundation, Inc.
dnl This file is free software, distributed under the terms of the GNU
dnl General Public License. As a special exception to the GNU General
dnl Public License, this file may be distributed as part of a program
@@ -7,6 +7,8 @@ dnl the same distribution terms as the rest of that program.
dnl From Paolo Bonzini.
+dnl Is this an ELF target supporting the LTO plugin?
+
dnl usage: ACX_ELF_TARGET_IFELSE([if-elf], [if-not-elf])
AC_DEFUN([ACX_ELF_TARGET_IFELSE], [
AC_REQUIRE([AC_CANONICAL_TARGET])
@@ -15,7 +17,8 @@ target_elf=no
case $target in
*-darwin* | *-aix* | *-cygwin* | *-mingw* | *-aout* | *-*coff* | \
*-msdosdjgpp* | *-vms* | *-wince* | *-*-pe* | \
- alpha*-dec-osf* | *-interix* | hppa[[12]]*-*-hpux*)
+ alpha*-dec-osf* | *-interix* | hppa[[12]]*-*-hpux* | \
+ nvptx-*-none)
target_elf=no
;;
*)
diff --git a/config/gcc-plugin.m4 b/config/gcc-plugin.m4
new file mode 100644
index 000000000..dd06a58cd
--- /dev/null
+++ b/config/gcc-plugin.m4
@@ -0,0 +1,113 @@
+# gcc-plugin.m4 -*- Autoconf -*-
+# Check whether GCC is able to be built with plugin support.
+
+dnl Copyright (C) 2014 Free Software Foundation, Inc.
+dnl This file is free software, distributed under the terms of the GNU
+dnl General Public License. As a special exception to the GNU General
+dnl Public License, this file may be distributed as part of a program
+dnl that contains a configuration script generated by Autoconf, under
+dnl the same distribution terms as the rest of that program.
+
+# Check for plugin support.
+# Respects --enable-plugin.
+# Sets the shell variables enable_plugin and pluginlibs.
+AC_DEFUN([GCC_ENABLE_PLUGINS],
+ [# Check for plugin support
+ AC_ARG_ENABLE(plugin,
+ [AS_HELP_STRING([--enable-plugin], [enable plugin support])],
+ enable_plugin=$enableval,
+ enable_plugin=yes; default_plugin=yes)
+
+ pluginlibs=
+
+ case "${host}" in
+ *-*-darwin*)
+ if test x$build = x$host; then
+ export_sym_check="nm${exeext} -g"
+ elif test x$host = x$target; then
+ export_sym_check="$gcc_cv_nm -g"
+ else
+ export_sym_check=
+ fi
+ ;;
+ *)
+ if test x$build = x$host; then
+ export_sym_check="objdump${exeext} -T"
+ elif test x$host = x$target; then
+ export_sym_check="$gcc_cv_objdump -T"
+ else
+ export_sym_check=
+ fi
+ ;;
+ esac
+
+ if test x"$enable_plugin" = x"yes"; then
+
+ AC_MSG_CHECKING([for exported symbols])
+ if test "x$export_sym_check" != x; then
+ echo "int main() {return 0;} int foobar() {return 0;}" > conftest.c
+ ${CC} ${CFLAGS} ${LDFLAGS} conftest.c -o conftest$ac_exeext > /dev/null 2>&1
+ if $export_sym_check conftest$ac_exeext | grep -q foobar > /dev/null; then
+ : # No need to use a flag
+ AC_MSG_RESULT([yes])
+ else
+ AC_MSG_RESULT([yes])
+ AC_MSG_CHECKING([for -rdynamic])
+ ${CC} ${CFLAGS} ${LDFLAGS} -rdynamic conftest.c -o conftest$ac_exeext > /dev/null 2>&1
+ if $export_sym_check conftest$ac_exeext | grep -q foobar > /dev/null; then
+ plugin_rdynamic=yes
+ pluginlibs="-rdynamic"
+ else
+ plugin_rdynamic=no
+ enable_plugin=no
+ fi
+ AC_MSG_RESULT([$plugin_rdynamic])
+ fi
+ else
+ AC_MSG_RESULT([unable to check])
+ fi
+
+ # Check -ldl
+ saved_LIBS="$LIBS"
+ AC_SEARCH_LIBS([dlopen], [dl])
+ if test x"$ac_cv_search_dlopen" = x"-ldl"; then
+ pluginlibs="$pluginlibs -ldl"
+ fi
+ LIBS="$saved_LIBS"
+
+ # Check that we can build shared objects with -fPIC -shared
+ saved_LDFLAGS="$LDFLAGS"
+ saved_CFLAGS="$CFLAGS"
+ case "${host}" in
+ *-*-darwin*)
+ CFLAGS=`echo $CFLAGS | sed s/-mdynamic-no-pic//g`
+ CFLAGS="$CFLAGS -fPIC"
+ LDFLAGS="$LDFLAGS -shared -undefined dynamic_lookup"
+ ;;
+ *)
+ CFLAGS="$CFLAGS -fPIC"
+ LDFLAGS="$LDFLAGS -fPIC -shared"
+ ;;
+ esac
+ AC_MSG_CHECKING([for -fPIC -shared])
+ AC_TRY_LINK(
+ [extern int X;],[return X == 0;],
+ [AC_MSG_RESULT([yes]); have_pic_shared=yes],
+ [AC_MSG_RESULT([no]); have_pic_shared=no])
+ if test x"$have_pic_shared" != x"yes" -o x"$ac_cv_search_dlopen" = x"no"; then
+ pluginlibs=
+ enable_plugin=no
+ fi
+ LDFLAGS="$saved_LDFLAGS"
+ CFLAGS="$saved_CFLAGS"
+
+ # If plugin support had been requested but not available, fail.
+ if test x"$enable_plugin" = x"no" ; then
+ if test x"$default_plugin" != x"yes"; then
+ AC_MSG_ERROR([
+ Building GCC with plugin support requires a host that supports
+ -fPIC, -shared, -ldl and -rdynamic.])
+ fi
+ fi
+ fi
+])
diff --git a/config/gettext.m4 b/config/gettext.m4
index 16070b40a..45fa6b4ab 100644
--- a/config/gettext.m4
+++ b/config/gettext.m4
@@ -81,7 +81,7 @@ AC_DEFUN([AM_GNU_GETTEXT],
dnl Ideally we would do this search only after the
dnl if test "$USE_NLS" = "yes"; then
dnl if test "$gt_cv_func_gnugettext_libc" != "yes"; then
- dnl tests. But if configure.in invokes AM_ICONV after AM_GNU_GETTEXT
+ dnl tests. But if configure.ac invokes AM_ICONV after AM_GNU_GETTEXT
dnl the configure script would need to contain the same shell code
dnl again, outside any 'if'. There are two solutions:
dnl - Invoke AM_ICONV_LINKFLAGS_BODY here, outside any 'if'.
@@ -303,7 +303,7 @@ return (int) gettext ("")]ifelse([$2], [need-ngettext], [ + (int) ngettext ("",
AC_SUBST(USE_INCLUDED_LIBINTL)
AC_SUBST(CATOBJEXT)
- dnl For backward compatibility. Some configure.ins may be using this.
+ dnl For backward compatibility. Some configure.acs may be using this.
nls_cv_header_intl=
nls_cv_header_libgt=
diff --git a/config/iconv.m4 b/config/iconv.m4
index c5f357982..5f9304a6b 100644
--- a/config/iconv.m4
+++ b/config/iconv.m4
@@ -7,6 +7,7 @@ dnl that contains a configuration script generated by Autoconf, under
dnl the same distribution terms as the rest of that program.
dnl From Bruno Haible.
+dnl with modifications to support building with in-tree libiconv
AC_DEFUN([AM_ICONV_LINKFLAGS_BODY],
[
@@ -28,24 +29,51 @@ AC_DEFUN([AM_ICONV_LINK],
dnl accordingly.
AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY])
- dnl Add $INCICONV to CPPFLAGS before performing the following checks,
- dnl because if the user has installed libiconv and not disabled its use
- dnl via --without-libiconv-prefix, he wants to use it. The first
- dnl AC_TRY_LINK will then fail, the second AC_TRY_LINK will succeed.
- am_save_CPPFLAGS="$CPPFLAGS"
- AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCICONV])
-
AC_CACHE_CHECK(for iconv, am_cv_func_iconv, [
am_cv_func_iconv="no, consider installing GNU libiconv"
am_cv_lib_iconv=no
+ dnl Add $INCICONV to CPPFLAGS before performing the first check,
+ dnl because if the user has installed libiconv and not disabled its use
+ dnl via --without-libiconv-prefix, he wants to use it. This first
+ dnl AC_TRY_LINK will then fail, the second AC_TRY_LINK will succeed.
+ am_save_CPPFLAGS="$CPPFLAGS"
+ CPPFLAGS="$CPPFLAGS $INCICONV"
AC_TRY_LINK([#include <stdlib.h>
#include <iconv.h>],
[iconv_t cd = iconv_open("","");
iconv(cd,NULL,NULL,NULL,NULL);
iconv_close(cd);],
am_cv_func_iconv=yes)
+ CPPFLAGS="$am_save_CPPFLAGS"
+
+ if test "$am_cv_func_iconv" != yes && test -d ../libiconv; then
+ for _libs in .libs _libs; do
+ am_save_CPPFLAGS="$CPPFLAGS"
+ am_save_LIBS="$LIBS"
+ CPPFLAGS="$CPPFLAGS -I../libiconv/include"
+ LIBS="$LIBS ../libiconv/lib/$_libs/libiconv.a"
+ AC_TRY_LINK([#include <stdlib.h>
+#include <iconv.h>],
+ [iconv_t cd = iconv_open("","");
+ iconv(cd,NULL,NULL,NULL,NULL);
+ iconv_close(cd);],
+ INCICONV="-I../libiconv/include"
+ LIBICONV='${top_builddir}'/../libiconv/lib/$_libs/libiconv.a
+ LTLIBICONV='${top_builddir}'/../libiconv/lib/libiconv.la
+ am_cv_lib_iconv=yes
+ am_cv_func_iconv=yes)
+ CPPFLAGS="$am_save_CPPFLAGS"
+ LIBS="$am_save_LIBS"
+ if test "$am_cv_func_iconv" = "yes"; then
+ break
+ fi
+ done
+ fi
+
if test "$am_cv_func_iconv" != yes; then
+ am_save_CPPFLAGS="$CPPFLAGS"
am_save_LIBS="$LIBS"
+ CPPFLAGS="$LIBS $INCICONV"
LIBS="$LIBS $LIBICONV"
AC_TRY_LINK([#include <stdlib.h>
#include <iconv.h>],
@@ -54,6 +82,7 @@ AC_DEFUN([AM_ICONV_LINK],
iconv_close(cd);],
am_cv_lib_iconv=yes
am_cv_func_iconv=yes)
+ CPPFLAGS="$am_save_CPPFLAGS"
LIBS="$am_save_LIBS"
fi
])
@@ -61,12 +90,10 @@ AC_DEFUN([AM_ICONV_LINK],
AC_DEFINE(HAVE_ICONV, 1, [Define if you have the iconv() function.])
fi
if test "$am_cv_lib_iconv" = yes; then
+ AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCICONV])
AC_MSG_CHECKING([how to link with libiconv])
AC_MSG_RESULT([$LIBICONV])
else
- dnl If $LIBICONV didn't lead to a usable library, we don't need $INCICONV
- dnl either.
- CPPFLAGS="$am_save_CPPFLAGS"
LIBICONV=
LTLIBICONV=
fi
diff --git a/config/isl.m4 b/config/isl.m4
index f45854d22..92524af32 100644
--- a/config/isl.m4
+++ b/config/isl.m4
@@ -19,23 +19,23 @@
# ISL_INIT_FLAGS ()
# -------------------------
-# Provide configure switches for ISL support.
+# Provide configure switches for isl support.
# Initialize isllibs/islinc according to the user input.
AC_DEFUN([ISL_INIT_FLAGS],
[
AC_ARG_WITH([isl-include],
[AS_HELP_STRING(
[--with-isl-include=PATH],
- [Specify directory for installed ISL include files])])
+ [Specify directory for installed isl include files])])
AC_ARG_WITH([isl-lib],
[AS_HELP_STRING(
[--with-isl-lib=PATH],
- [Specify the directory for the installed ISL library])])
+ [Specify the directory for the installed isl library])])
AC_ARG_ENABLE(isl-version-check,
[AS_HELP_STRING(
[--disable-isl-version-check],
- [disable check for ISL version])],
+ [disable check for isl version])],
ENABLE_ISL_CHECK=$enableval,
ENABLE_ISL_CHECK=yes)
@@ -58,22 +58,24 @@ AC_DEFUN([ISL_INIT_FLAGS],
if test "x${with_isl_lib}" != x; then
isllibs="-L$with_isl_lib"
fi
- dnl If no --with-isl flag was specified and there is in-tree ISL
+ dnl If no --with-isl flag was specified and there is in-tree isl
dnl source, set up flags to use that and skip any version tests
- dnl as we cannot run them before building ISL.
+ dnl as we cannot run them before building isl.
if test "x${islinc}" = x && test "x${isllibs}" = x \
&& test -d ${srcdir}/isl; then
isllibs='-L$$r/$(HOST_SUBDIR)/isl/'"$lt_cv_objdir"' '
islinc='-I$$r/$(HOST_SUBDIR)/isl/include -I$$s/isl/include'
ENABLE_ISL_CHECK=no
- AC_MSG_WARN([using in-tree ISL, disabling version check])
+ AC_MSG_WARN([using in-tree isl, disabling version check])
fi
+
+ isllibs="${isllibs} -lisl"
]
)
# ISL_REQUESTED (ACTION-IF-REQUESTED, ACTION-IF-NOT)
# ----------------------------------------------------
-# Provide actions for failed ISL detection.
+# Provide actions for failed isl detection.
AC_DEFUN([ISL_REQUESTED],
[
AC_REQUIRE([ISL_INIT_FLAGS])
@@ -90,20 +92,9 @@ AC_DEFUN([ISL_REQUESTED],
]
)
-# _ISL_CHECK_CT_PROG(MAJOR, MINOR)
-# --------------------------------------------
-# Helper for verifying ISL compile time version.
-m4_define([_ISL_CHECK_CT_PROG],[AC_LANG_PROGRAM(
- [#include <isl/version.h>
- #include <string.h>],
- [if (strncmp (isl_version (), "isl-$1.$2", strlen ("isl-$1.$2")) != 0)
- return 1;
- ])])
-
-# ISL_CHECK_VERSION ISL_CHECK_VERSION (MAJOR, MINOR)
+# ISL_CHECK_VERSION ISL_CHECK_VERSION ()
# ----------------------------------------------------------------
-# Test the found ISL to be exact of version MAJOR.MINOR and at least
-# REVISION.
+# Test whether isl contains functionality added to the minimum expected version.
AC_DEFUN([ISL_CHECK_VERSION],
[
if test "${ENABLE_ISL_CHECK}" = yes ; then
@@ -112,16 +103,32 @@ AC_DEFUN([ISL_CHECK_VERSION],
_isl_saved_LIBS=$LIBS
CFLAGS="${_isl_saved_CFLAGS} ${islinc} ${gmpinc}"
- LDFLAGS="${_isl_saved_LDFLAGS} ${isllibs}"
- LIBS="${_isl_saved_LIBS} -lisl"
+ LDFLAGS="${_isl_saved_LDFLAGS} ${isllibs} ${gmplibs}"
+ LIBS="${_isl_saved_LIBS} -lisl -lgmp"
- AC_MSG_CHECKING([for version $1.$2 of ISL])
- AC_RUN_IFELSE([_ISL_CHECK_CT_PROG($1,$2)],
- [gcc_cv_isl=yes],
- [gcc_cv_isl=no],
- [gcc_cv_isl=yes])
+ AC_MSG_CHECKING([for isl 0.16, 0.15, or deprecated 0.14])
+ AC_TRY_LINK([#include <isl/ctx.h>],
+ [isl_ctx_get_max_operations (isl_ctx_alloc ());],
+ [gcc_cv_isl=yes],
+ [gcc_cv_isl=no])
AC_MSG_RESULT([$gcc_cv_isl])
+ if test "${gcc_cv_isl}" = no ; then
+ AC_MSG_RESULT([recommended isl version is 0.16 or 0.15, the minimum required isl version 0.14 is deprecated])
+ fi
+
+ AC_MSG_CHECKING([for isl 0.16 or 0.15])
+ AC_TRY_LINK([#include <isl/schedule.h>],
+ [isl_options_set_schedule_serialize_sccs (NULL, 0);],
+ [ac_has_isl_options_set_schedule_serialize_sccs=yes],
+ [ac_has_isl_options_set_schedule_serialize_sccs=no])
+ AC_MSG_RESULT($ac_has_isl_options_set_schedule_serialize_sccs)
+
+ if test x"$ac_has_isl_options_set_schedule_serialize_sccs" = x"yes"; then
+ islver="0.15"
+ AC_SUBST([islver])
+ fi
+
CFLAGS=$_isl_saved_CFLAGS
LDFLAGS=$_isl_saved_LDFLAGS
LIBS=$_isl_saved_LIBS
diff --git a/config/mh-alpha-linux b/config/mh-alpha-linux
new file mode 100644
index 000000000..9a9244baa
--- /dev/null
+++ b/config/mh-alpha-linux
@@ -0,0 +1,3 @@
+# Prevent GPREL16 relocation truncation
+LDFLAGS += -Wl,--no-relax
+BOOT_LDFLAGS += -Wl,--no-relax
diff --git a/config/mh-darwin b/config/mh-darwin
index 19bf26568..148b73038 100644
--- a/config/mh-darwin
+++ b/config/mh-darwin
@@ -1,7 +1,29 @@
# The -mdynamic-no-pic ensures that the compiler executable is built without
# position-independent-code -- the usual default on Darwin. This fix speeds
-# compiles by 3-5%.
-BOOT_CFLAGS += -mdynamic-no-pic
+# compiles by 3-5%. Don't add it if the compiler doesn't also support
+# -mno-dynamic-no-pic to undo it.
+DARWIN_MDYNAMIC_NO_PIC := \
+`case ${host} in i?86-*-darwin* | powerpc-*-darwin*) \
+ $(CC) -S -xc /dev/null -o /dev/null -mno-dynamic-no-pic 2>/dev/null \
+ && echo -mdynamic-no-pic ;; esac`
+DARWIN_GCC_MDYNAMIC_NO_PIC := \
+`case ${host} in i?86-*-darwin* | powerpc-*-darwin*) \
+ $(CC) -S -xc /dev/null -o /dev/null -mno-dynamic-no-pic 2>/dev/null \
+ || echo -mdynamic-no-pic ;; esac`
-# Ensure we don't try and use -pie, as it is incompatible with pch.
-BOOT_LDFLAGS += `case ${host} in *-*-darwin[1][1-9]*) echo -Wl,-no_pie ;; esac;`
+# ld on Darwin versions >= 10.7 defaults to PIE executables. Disable this for
+# gcc components, since it is incompatible with our pch implementation.
+DARWIN_NO_PIE := `case ${host} in *-*-darwin[1][1-9]*) echo -Wl,-no_pie ;; esac;`
+
+BOOT_CFLAGS += $(DARWIN_MDYNAMIC_NO_PIC)
+BOOT_LDFLAGS += $(DARWIN_NO_PIE)
+
+# Similarly, for cross-compilation.
+STAGE1_CFLAGS += $(DARWIN_MDYNAMIC_NO_PIC)
+STAGE1_LDFLAGS += $(DARWIN_NO_PIE)
+
+# Without -mno-dynamic-no-pic support, add -mdynamic-no-pic just to later
+# stages when we know it is built with gcc.
+STAGE2_CFLAGS += $(DARWIN_GCC_MDYNAMIC_NO_PIC)
+STAGE3_CFLAGS += $(DARWIN_GCC_MDYNAMIC_NO_PIC)
+STAGE4_CFLAGS += $(DARWIN_GCC_MDYNAMIC_NO_PIC)
diff --git a/config/mt-gnu b/config/mt-gnu
index 15bf41716..5c696f51b 100644
--- a/config/mt-gnu
+++ b/config/mt-gnu
@@ -1 +1 @@
-CXXFLAGS_FOR_TARGET = $(CXXFLAGS) -D_GNU_SOURCE
+CXXFLAGS_FOR_TARGET += -D_GNU_SOURCE
diff --git a/config/mt-nios2-elf b/config/mt-nios2-elf
new file mode 100644
index 000000000..1dee7c643
--- /dev/null
+++ b/config/mt-nios2-elf
@@ -0,0 +1,5 @@
+# We build library code with -mno-gpopt so that it can be linked with
+# larger executables with small-data sections that exceed the 16-bit
+# offset range for GP-relative addressing.
+CFLAGS_FOR_TARGET += -mno-gpopt
+CXXFLAGS_FOR_TARGET += -mno-gpopt
diff --git a/config/mt-ospace b/config/mt-ospace
index 7f091041d..ce29ff431 100644
--- a/config/mt-ospace
+++ b/config/mt-ospace
@@ -1,3 +1,3 @@
# Build libraries optimizing for space, not speed.
- CFLAGS_FOR_TARGET = -g -Os
- CXXFLAGS_FOR_TARGET = -g -Os
+ CFLAGS_FOR_TARGET += -g -Os
+ CXXFLAGS_FOR_TARGET += -g -Os
diff --git a/config/picflag.m4 b/config/picflag.m4
index 2ee5cd078..2f5b9721e 100644
--- a/config/picflag.m4
+++ b/config/picflag.m4
@@ -7,9 +7,15 @@ AC_DEFUN([_GCC_PICFLAG], [
case "${$2}" in
# PIC is the default on some targets or must not be used.
*-*-darwin*)
- # PIC is the default on this platform
- # Common symbols not allowed in MH_DYLIB files
- $1=-fno-common
+ # For darwin, common symbols are not allowed in MH_DYLIB files
+ case "${CFLAGS}" in
+ # If we are using a compiler supporting mdynamic-no-pic
+ # and the option has been tested as safe to add, then cancel
+ # it here, since the code generated is incompatible with shared
+ # libs.
+ *-mdynamic-no-pic*) $1='-fno-common -mno-dynamic-no-pic' ;;
+ *) $1=-fno-common ;;
+ esac
;;
alpha*-dec-osf5*)
# PIC is the default.
@@ -50,9 +56,6 @@ case "${$2}" in
i[[34567]]86-*-* | x86_64-*-*)
$1=-fpic
;;
- m68k-*-*)
- $1=-fpic
- ;;
# FIXME: Override -fPIC default in libgcc only?
sh-*-linux* | sh[[2346lbe]]*-*-linux*)
$1=-fpic
diff --git a/config/plugins.m4 b/config/plugins.m4
index 7ee8412aa..513c690e1 100644
--- a/config/plugins.m4
+++ b/config/plugins.m4
@@ -1,11 +1,21 @@
AC_DEFUN([AC_PLUGINS],
[
-AC_ARG_ENABLE([plugins],
-AS_HELP_STRING([--enable-plugins], [Enable support for plugins (defaults no)]),
-[case "${enableval}" in
- yes | "") plugins=yes ;;
- no) plugins=no ;;
- *) plugins=yes ;;
- esac],
-[plugins=no])
+ maybe_plugins=no
+ AC_CHECK_HEADERS([dlfcn.h], [maybe_plugins=yes], [], [AC_INCLUDES_DEFAULT])
+ AC_CHECK_HEADERS([windows.h], [maybe_plugins=yes], [], [AC_INCLUDES_DEFAULT])
+
+ AC_ARG_ENABLE([plugins],
+ AS_HELP_STRING([--enable-plugins], [Enable support for plugins]),
+ [case "${enableval}" in
+ no) plugins=no ;;
+ *) plugins=yes
+ if test "$maybe_plugins" != "yes" ; then
+ AC_MSG_ERROR([Building with plugin support requires a host that supports dlopen.])
+ fi ;;
+ esac],
+ [plugins=$maybe_plugins]
+ )
+ if test "$plugins" = "yes"; then
+ AC_SEARCH_LIBS([dlopen], [dl])
+ fi
])
diff --git a/config/po.m4 b/config/po.m4
index 2edd5a7d3..6ceef420f 100644
--- a/config/po.m4
+++ b/config/po.m4
@@ -117,14 +117,14 @@ AC_DEFUN([AM_PO_SUBDIRS],
if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then
# The LINGUAS file contains the set of available languages.
if test -n "$OBSOLETE_ALL_LINGUAS"; then
- test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete"
+ test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.ac is obsolete" || echo "setting ALL_LINGUAS in configure.ac is obsolete"
fi
ALL_LINGUAS_=`sed -e "/^#/d" "$ac_given_srcdir/$ac_dir/LINGUAS"`
# Hide the ALL_LINGUAS assigment from automake.
eval 'ALL_LINGUAS''=$ALL_LINGUAS_'
POMAKEFILEDEPS="$POMAKEFILEDEPS LINGUAS"
else
- # The set of available languages was given in configure.in.
+ # The set of available languages was given in configure.ac.
eval 'ALL_LINGUAS''=$OBSOLETE_ALL_LINGUAS'
fi
case "$ac_given_srcdir" in
diff --git a/config/sjlj.m4 b/config/sjlj.m4
new file mode 100644
index 000000000..71c8b319b
--- /dev/null
+++ b/config/sjlj.m4
@@ -0,0 +1,12 @@
+dnl Check if the compiler is configured for setjmp/longjmp exceptions.
+AC_DEFUN([GCC_CHECK_SJLJ_EXCEPTIONS],
+ [AC_CACHE_CHECK([whether the compiler is configured for setjmp/longjmp exceptions],
+ ac_cv_sjlj_exceptions,
+ [AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM(
+ [[#ifdef __USING_SJLJ_EXCEPTIONS__
+ this will fail
+ #endif]],
+ [[int i;]])],
+ [ac_cv_sjlj_exceptions=no],
+ [ac_cv_sjlj_exceptions=yes])])])
diff --git a/config/stdint.m4 b/config/stdint.m4
index 61898a75f..59f435954 100644
--- a/config/stdint.m4
+++ b/config/stdint.m4
@@ -39,7 +39,7 @@ dnl If your installed header files require the stdint-types you will want to
dnl create an installable file mylib-int.h that all your other installable
dnl header may include. So, for a library package named "mylib", just use
dnl GCC_HEADER_STDINT(mylib-int.h)
-dnl in configure.in and install that header file in Makefile.am along with
+dnl in configure.ac and install that header file in Makefile.am along with
dnl the other headers (mylib.h). The mylib-specific headers can simply
dnl use "#include <mylib-int.h>" to obtain the stdint-types.
dnl
diff --git a/config/target-posix b/config/target-posix
new file mode 100644
index 000000000..2fba066c6
--- /dev/null
+++ b/config/target-posix
@@ -0,0 +1,12 @@
+case "${target}" in
+ *-*-linux* | *-*-gnu* | *-*-k*bsd*-gnu | *-*-kopensolaris*-gnu)
+ ;;
+ *-*-netbsd* | *-*-freebsd* | *-*-openbsd* | *-*-dragonfly*)
+ ;;
+ *-*-solaris2* | *-*-hpux11*)
+ ;;
+ *-*-darwin* | *-*-aix*)
+ ;;
+ *)
+ UNSUPPORTED=1 ;;
+ esac
diff --git a/config/tcl.m4 b/config/tcl.m4
index 59a0c7e0a..4542a4b23 100644
--- a/config/tcl.m4
+++ b/config/tcl.m4
@@ -2136,7 +2136,7 @@ dnl # preprocessing tests use only CPPFLAGS.
INSTALL_LIB='$(INSTALL_LIBRARY) $(LIB_FILE) $(LIB_INSTALL_DIR)/$(LIB_FILE) ; (cd $(LIB_INSTALL_DIR) ; $(RANLIB) $(LIB_FILE))'
fi
-dnl Not at all clear what this was doing in Tcl's configure.in
+dnl Not at all clear what this was doing in Tcl's configure.ac
dnl or why it was needed was needed. In any event, this sort of
dnl things needs to be done in the big loop above.
dnl REMOVE THIS BLOCK LATER! (mdejong)
@@ -3235,7 +3235,7 @@ AC_DEFUN([SC_TCL_GETGRNAM_R], [AC_CHECK_FUNC(getgrnam_r, [
# created. Accumulates.
#
# Requires presence of SC_OUTPUT_COMMANDS_PRE at the end
-# of configure.in (right before AC_OUTPUT).
+# of configure.ac (right before AC_OUTPUT).
#
#--------------------------------------------------------------------
diff --git a/config/warnings.m4 b/config/warnings.m4
index b64b594e6..ce007f9b7 100644
--- a/config/warnings.m4
+++ b/config/warnings.m4
@@ -18,11 +18,12 @@
#along with GCC; see the file COPYING3. If not see
#<http://www.gnu.org/licenses/>.
-# ACX_PROG_CC_WARNING_OPTS(WARNINGS, [VARIABLE = WARN_CFLAGS)
+# ACX_PROG_CC_WARNING_OPTS(WARNINGS, [VARIABLE = WARN_CFLAGS])
# Sets @VARIABLE@ to the subset of the given options which the
# compiler accepts.
AC_DEFUN([ACX_PROG_CC_WARNING_OPTS],
[AC_REQUIRE([AC_PROG_CC])dnl
+AC_LANG_PUSH(C)
m4_pushdef([acx_Var], [m4_default([$2], [WARN_CFLAGS])])dnl
AC_SUBST(acx_Var)dnl
m4_expand_once([acx_Var=
@@ -48,6 +49,7 @@ for real_option in $1; do
done
CFLAGS="$save_CFLAGS"
m4_popdef([acx_Var])dnl
+AC_LANG_POP(C)
])# ACX_PROG_CC_WARNING_OPTS
# ACX_PROG_CC_WARNING_ALMOST_PEDANTIC(WARNINGS, [VARIABLE = WARN_PEDANTIC])
@@ -55,6 +57,7 @@ m4_popdef([acx_Var])dnl
# and accepts all of those options simultaneously, otherwise to nothing.
AC_DEFUN([ACX_PROG_CC_WARNING_ALMOST_PEDANTIC],
[AC_REQUIRE([AC_PROG_CC])dnl
+AC_LANG_PUSH(C)
m4_pushdef([acx_Var], [m4_default([$2], [WARN_PEDANTIC])])dnl
AC_SUBST(acx_Var)dnl
m4_expand_once([acx_Var=
@@ -77,6 +80,7 @@ AS_IF([test AS_VAR_GET(acx_Pedantic) = yes],
AS_VAR_POPDEF([acx_Pedantic])dnl
m4_popdef([acx_Woptions])dnl
m4_popdef([acx_Var])dnl
+AC_LANG_POP(C)
])# ACX_PROG_CC_WARNING_ALMOST_PEDANTIC
# ACX_PROG_CC_WARNINGS_ARE_ERRORS([x.y.z], [VARIABLE = WERROR])
@@ -88,6 +92,7 @@ m4_popdef([acx_Var])dnl
# appeared on the configure command line.
AC_DEFUN([ACX_PROG_CC_WARNINGS_ARE_ERRORS],
[AC_REQUIRE([AC_PROG_CC])dnl
+AC_LANG_PUSH(C)
m4_pushdef([acx_Var], [m4_default([$2], [WERROR])])dnl
AC_SUBST(acx_Var)dnl
m4_expand_once([acx_Var=
@@ -114,4 +119,109 @@ AS_IF([test $enable_werror_always = yes],
[acx_Var="$acx_Var${acx_Var:+ }-Werror"])
AS_VAR_POPDEF([acx_GCCvers])])
m4_popdef([acx_Var])dnl
+AC_LANG_POP(C)
])# ACX_PROG_CC_WARNINGS_ARE_ERRORS
+
+# ACX_PROG_CXX_WARNING_OPTS(WARNINGS, [VARIABLE = WARN_CXXFLAGS])
+# Sets @VARIABLE@ to the subset of the given options which the
+# compiler accepts.
+AC_DEFUN([ACX_PROG_CXX_WARNING_OPTS],
+[AC_REQUIRE([AC_PROG_CXX])dnl
+AC_LANG_PUSH(C++)
+m4_pushdef([acx_Var], [m4_default([$2], [WARN_CXXFLAGS])])dnl
+AC_SUBST(acx_Var)dnl
+m4_expand_once([acx_Var=
+],m4_quote(acx_Var=))dnl
+save_CXXFLAGS="$CXXFLAGS"
+for real_option in $1; do
+ # Do the check with the no- prefix removed since gcc silently
+ # accepts any -Wno-* option on purpose
+ case $real_option in
+ -Wno-*) option=-W`expr x$real_option : 'x-Wno-\(.*\)'` ;;
+ *) option=$real_option ;;
+ esac
+ AS_VAR_PUSHDEF([acx_Woption], [acx_cv_prog_cc_warning_$option])
+ AC_CACHE_CHECK([whether $CXX supports $option], acx_Woption,
+ [CXXFLAGS="$option"
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([],[])],
+ [AS_VAR_SET(acx_Woption, yes)],
+ [AS_VAR_SET(acx_Woption, no)])
+ ])
+ AS_IF([test AS_VAR_GET(acx_Woption) = yes],
+ [acx_Var="$acx_Var${acx_Var:+ }$real_option"])
+ AS_VAR_POPDEF([acx_Woption])dnl
+done
+CXXFLAGS="$save_CXXFLAGS"
+m4_popdef([acx_Var])dnl
+AC_LANG_POP(C++)
+])# ACX_PROG_CXX_WARNING_OPTS
+
+# ACX_PROG_CXX_WARNING_ALMOST_PEDANTIC(WARNINGS, [VARIABLE = WARN_PEDANTIC])
+# Append to VARIABLE "-pedantic" + the argument, if the compiler is G++
+# and accepts all of those options simultaneously, otherwise to nothing.
+AC_DEFUN([ACX_PROG_CXX_WARNING_ALMOST_PEDANTIC],
+[AC_REQUIRE([AC_PROG_CXX])dnl
+AC_LANG_PUSH(C++)
+m4_pushdef([acx_Var], [m4_default([$2], [WARN_PEDANTIC])])dnl
+AC_SUBST(acx_Var)dnl
+m4_expand_once([acx_Var=
+],m4_quote(acx_Var=))dnl
+# Do the check with the no- prefix removed from the warning options
+# since gcc silently accepts any -Wno-* option on purpose
+m4_pushdef([acx_Woptions], [m4_bpatsubst([$1], [-Wno-], [-W])])dnl
+AS_VAR_PUSHDEF([acx_Pedantic], [acx_cv_prog_cc_pedantic_]acx_Woptions)dnl
+AS_IF([test "$GXX" = yes],
+[AC_CACHE_CHECK([whether $CXX supports -pedantic ]acx_Woptions, acx_Pedantic,
+[save_CXXFLAGS="$CXXFLAGS"
+CXXFLAGS="-pedantic acx_Woptions"
+AC_COMPILE_IFELSE([AC_LANG_PROGRAM([],[])],
+ [AS_VAR_SET(acx_Pedantic, yes)],
+ [AS_VAR_SET(acx_Pedantic, no)])
+CXXFLAGS="$save_CXXFLAGS"])
+AS_IF([test AS_VAR_GET(acx_Pedantic) = yes],
+ [acx_Var="$acx_Var${acx_Var:+ }-pedantic $1"])
+])
+AS_VAR_POPDEF([acx_Pedantic])dnl
+m4_popdef([acx_Woptions])dnl
+m4_popdef([acx_Var])dnl
+AC_LANG_POP(C++)
+])# ACX_PROG_CXX_WARNING_ALMOST_PEDANTIC
+
+# ACX_PROG_CXX_WARNINGS_ARE_ERRORS([x.y.z], [VARIABLE = WERROR])
+# sets @VARIABLE@ to "-Werror" if the compiler is G++ >=x.y.z, or if
+# --enable-werror-always was given on the command line, otherwise
+# to nothing.
+# If the argument is the word "manual" instead of a version number,
+# then @VARIABLE@ will be set to -Werror only if --enable-werror-always
+# appeared on the configure command line.
+AC_DEFUN([ACX_PROG_CXX_WARNINGS_ARE_ERRORS],
+[AC_REQUIRE([AC_PROG_CXX])dnl
+AC_LANG_PUSH(C++)
+m4_pushdef([acx_Var], [m4_default([$2], [WERROR])])dnl
+AC_SUBST(acx_Var)dnl
+m4_expand_once([acx_Var=
+],m4_quote(acx_Var=))dnl
+AC_ARG_ENABLE(werror-always,
+ AS_HELP_STRING([--enable-werror-always],
+ [enable -Werror despite compiler version]),
+[], [enable_werror_always=no])
+AS_IF([test $enable_werror_always = yes],
+ [acx_Var="$acx_Var${acx_Var:+ }-Werror"])
+ m4_if($1, [manual],,
+ [AS_VAR_PUSHDEF([acx_GXXvers], [acx_cv_prog_cxx_gxx_$1_or_newer])dnl
+ AC_CACHE_CHECK([whether $CXX is G++ >=$1], acx_GXXvers,
+ [set fnord `echo $1 | tr '.' ' '`
+ shift
+ AC_PREPROC_IFELSE(
+[#if __GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__ \
+ < [$]1 * 10000 + [$]2 * 100 + [$]3
+#error insufficient
+#endif],
+ [AS_VAR_SET(acx_GXXvers, yes)],
+ [AS_VAR_SET(acx_GXXvers, no)])])
+ AS_IF([test AS_VAR_GET(acx_GXXvers) = yes],
+ [acx_Var="$acx_Var${acx_Var:+ }-Werror"])
+ AS_VAR_POPDEF([acx_GXXvers])])
+m4_popdef([acx_Var])dnl
+AC_LANG_POP(C++)
+])# ACX_PROG_CXX_WARNINGS_ARE_ERRORS
diff --git a/config/zlib.m4 b/config/zlib.m4
index b0174994e..afa57d112 100644
--- a/config/zlib.m4
+++ b/config/zlib.m4
@@ -1,18 +1,19 @@
-dnl A function to check for zlib availability. zlib is used by default
-dnl unless the user configured with --disable-nls.
+dnl A function to check if the system's zlib library should be used. The
+dnl builtin zlib dnl is used by default unless the user configured with
+dnl --with-system-zlib.
AC_DEFUN([AM_ZLIB],
[
- # See if the user specified whether he wants zlib support or not.
- AC_ARG_WITH(zlib,
- [ --with-zlib include zlib support (auto/yes/no) [default=auto]],
- [], [with_zlib=auto])
-
- if test "$with_zlib" != "no"; then
- AC_SEARCH_LIBS(zlibVersion, z, [AC_CHECK_HEADERS(zlib.h)])
- if test "$with_zlib" = "yes" -a "$ac_cv_header_zlib_h" != "yes"; then
- AC_MSG_ERROR([zlib (libz) library was explicitly requested but not found])
- fi
+ # Use the system's zlib library.
+ zlibdir="-L\$(top_builddir)/../zlib"
+ zlibinc="-I\$(top_srcdir)/../zlib"
+ AC_ARG_WITH(system-zlib,
+ [AS_HELP_STRING([--with-system-zlib], [use installed libz])],
+ if test x$with_system_zlib = xyes ; then
+ zlibdir=
+ zlibinc=
fi
+ )
+ AC_SUBST(zlibdir)
+ AC_SUBST(zlibinc)
])
-
diff --git a/configure b/configure
index ee45e1b00..ea63784be 100755
--- a/configure
+++ b/configure
@@ -556,6 +556,7 @@ enable_option_checking=no
ac_subst_vars='LTLIBOBJS
LIBOBJS
compare_exclusions
+host_shared
stage2_werror_flag
stage1_checking
stage1_cflags
@@ -573,6 +574,7 @@ STRIP_FOR_TARGET
READELF_FOR_TARGET
RANLIB_FOR_TARGET
OBJDUMP_FOR_TARGET
+OBJCOPY_FOR_TARGET
NM_FOR_TARGET
LIPO_FOR_TARGET
LD_FOR_TARGET
@@ -641,11 +643,14 @@ CXXFLAGS_FOR_TARGET
CFLAGS_FOR_TARGET
DEBUG_PREFIX_CFLAGS_FOR_TARGET
SYSROOT_CFLAGS_FOR_TARGET
-stage1_languages
+extra_host_zlib_configure_flags
extra_host_libiberty_configure_flags
-clooginc
-clooglibs
+stage1_languages
+extra_linker_plugin_flags
+extra_linker_plugin_configure_flags
islinc
+isllibs
+islver
poststage1_ldflags
poststage1_libs
stage1_ldflags
@@ -670,6 +675,7 @@ LDFLAGS
CFLAGS
CC
EXTRA_CONFIGARGS_LIBJAVA
+extra_liboffloadmic_configure_flags
target_subdir
host_subdir
build_subdir
@@ -743,13 +749,18 @@ ospace_frag'
ac_user_opts='
enable_option_checking
with_build_libsubdir
+with_system_zlib
+enable_as_accelerator_for
+enable_offload_targets
enable_gold
enable_ld
+enable_compressed_debug_sections
enable_libquadmath
enable_libquadmath_support
enable_libada
enable_libssp
enable_libstdcxx
+enable_liboffloadmic
enable_static_libjava
enable_bootstrap
with_mpc
@@ -763,30 +774,29 @@ with_gmp_dir
with_gmp
with_gmp_include
with_gmp_lib
-with_host_libstdcxx
with_stage1_libs
with_stage1_ldflags
with_boot_libs
with_boot_ldflags
-with_cloog
with_isl
with_isl_include
with_isl_lib
enable_isl_version_check
-with_cloog_include
-with_cloog_lib
-enable_cloog_version_check
enable_lto
+enable_linker_plugin_configure_flags
+enable_linker_plugin_flags
enable_stage1_languages
enable_objc_gc
with_build_sysroot
with_debug_prefix_map
with_build_config
+enable_vtable_verify
enable_serial_configure
with_build_time_tools
enable_maintainer_mode
enable_stage1_checking
enable_werror
+enable_host_shared
'
ac_precious_vars='build_alias
host_alias
@@ -827,6 +837,7 @@ DLLTOOL_FOR_TARGET
LD_FOR_TARGET
LIPO_FOR_TARGET
NM_FOR_TARGET
+OBJCOPY_FOR_TARGET
OBJDUMP_FOR_TARGET
RANLIB_FOR_TARGET
READELF_FOR_TARGET
@@ -1458,27 +1469,44 @@ Optional Features:
--disable-option-checking ignore unrecognized --enable/--with options
--disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
--enable-FEATURE[=ARG] include FEATURE [ARG=yes]
+ --enable-as-accelerator-for=ARG
+ build as offload target compiler. Specify offload
+ host triple by ARG
+ --enable-offload-targets=LIST
+ enable offloading to devices from comma-separated
+ LIST of TARGET[=DIR]. Use optional path to find
+ offload target compiler during the build
--enable-gold[=ARG] build gold [ARG={default,yes,no}]
--enable-ld[=ARG] build ld [ARG={default,yes,no}]
+ --enable-compressed-debug-sections={all,gas,gold,ld,none}
+ Enable compressed debug sections for gas, gold or ld
+ by default
--disable-libquadmath do not build libquadmath directory
--disable-libquadmath-support
disable libquadmath support for Fortran
--enable-libada build libada directory
--enable-libssp build libssp directory
--disable-libstdcxx do not build libstdc++-v3 directory
+ --enable-liboffloadmic=ARG
+ build liboffloadmic [ARG={no,host,target}]
--enable-static-libjava[=ARG]
build static libjava [default=no]
--enable-bootstrap enable bootstrapping [yes if native build]
--disable-isl-version-check
- disable check for ISL version
- --disable-cloog-version-check
- disable check for CLooG version
+ disable check for isl version
--enable-lto enable link time optimization support
+ --enable-linker-plugin-configure-flags=FLAGS
+ additional flags for configuring linker plugins
+ [none]
+ --enable-linker-plugin-flags=FLAGS
+ additional flags for configuring and building linker
+ plugins [none]
--enable-stage1-languages[=all]
choose additional languages to build during stage1.
Mostly useful for compiler development
--enable-objc-gc enable use of Boehm's garbage collector with the GNU
Objective-C runtime
+ --enable-vtable-verify Enable vtable verification feature
--enable-serial-[{host,target,build}-]configure
force sequential configuration of sub-packages for
the host, target or build machine, or all
@@ -1490,11 +1518,13 @@ Optional Features:
choose additional checking for stage1 of the
compiler
--enable-werror enable -Werror in bootstrap stage2 and later
+ --enable-host-shared build host code as shared libraries
Optional Packages:
--with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
--without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
--with-build-libsubdir=DIR Directory where to find libraries for build system
+ --with-system-zlib use installed libz
--with-mpc=PATH specify prefix directory for installed MPC package.
Equivalent to --with-mpc-include=PATH/include plus
--with-mpc-lib=PATH/lib
@@ -1514,28 +1544,18 @@ Optional Packages:
--with-gmp-lib=PATH/lib
--with-gmp-include=PATH specify directory for installed GMP include files
--with-gmp-lib=PATH specify directory for the installed GMP library
- --with-host-libstdcxx=L use linker arguments L to link with libstdc++ when
- linking with PPL
--with-stage1-libs=LIBS libraries for stage1
--with-stage1-ldflags=FLAGS
linker flags for stage1
--with-boot-libs=LIBS libraries for stage2 and later
--with-boot-ldflags=FLAGS
linker flags for stage2 and later
- --with-cloog=PATH Specify prefix directory for the installed CLooG-ISL
- package. Equivalent to
- --with-cloog-include=PATH/include plus
- --with-cloog-lib=PATH/lib
- --with-isl=PATH Specify prefix directory for the installed ISL
+ --with-isl=PATH Specify prefix directory for the installed isl
package. Equivalent to
--with-isl-include=PATH/include plus
--with-isl-lib=PATH/lib
- --with-isl-include=PATH Specify directory for installed ISL include files
- --with-isl-lib=PATH Specify the directory for the installed ISL library
- --with-cloog-include=PATH
- Specify directory for installed CLooG include files
- --with-cloog-lib=PATH Specify the directory for the installed CLooG
- library
+ --with-isl-include=PATH Specify directory for installed isl include files
+ --with-isl-lib=PATH Specify the directory for the installed isl library
--with-build-sysroot=SYSROOT
use sysroot as the system root during the build
--with-debug-prefix-map='A=B C=D ...'
@@ -1598,6 +1618,8 @@ Some influential environment variables:
LIPO for the target
NM_FOR_TARGET
NM for the target
+ OBJCOPY_FOR_TARGET
+ OBJCOPY for the target
OBJDUMP_FOR_TARGET
OBJDUMP for the target
RANLIB_FOR_TARGET
@@ -1858,48 +1880,6 @@ fi
return $ac_retval
} # ac_fn_c_try_link
-
-# ac_fn_c_try_run LINENO
-# ----------------------
-# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
-# that executables *can* be run.
-ac_fn_c_try_run ()
-{
- as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
- if { { ac_try="$ac_link"
-case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
- (eval "$ac_link") 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
- { { case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
- (eval "$ac_try") 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; }; }; then :
- ac_retval=0
-else
- $as_echo "$as_me: program exited with status $ac_status" >&5
- $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
- ac_retval=$ac_status
-fi
- rm -rf conftest.dSYM conftest_ipa8_conftest.oo
- eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
- return $ac_retval
-
-} # ac_fn_c_try_run
cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
@@ -2739,14 +2719,14 @@ extra_host_args=
# these library is used by various programs built for the build
# environment
#
-build_libs="build-libiberty"
+build_libs="build-libiberty build-libcpp"
# these tools are built for the build environment
build_tools="build-texinfo build-flex build-bison build-m4 build-fixincludes"
# these libraries are used by various programs built for the host environment
-#
-host_libs="intl libiberty opcodes bfd readline tcl tk itcl libgui zlib libbacktrace libcpp libdecnumber gmp mpfr mpc isl cloog libelf libiconv"
+#f
+host_libs="intl libiberty opcodes bfd readline tcl tk itcl libgui zlib libbacktrace libcpp libdecnumber gmp mpfr mpc isl libelf libiconv"
# these tools are built for the host environment
# Note, the powerpc-eabi build depends on sim occurring before gdb in order to
@@ -2754,7 +2734,7 @@ host_libs="intl libiberty opcodes bfd readline tcl tk itcl libgui zlib libbacktr
# binutils, gas and ld appear in that order because it makes sense to run
# "make check" in that particular order.
# If --enable-gold is used, "gold" may replace "ld".
-host_tools="texinfo flex bison binutils gas ld fixincludes gcc cgen sid sim gdb gprof etc expect dejagnu m4 utils guile fastjar gnattools"
+host_tools="texinfo flex bison binutils gas ld fixincludes gcc cgen sid sim gdb gprof etc expect dejagnu m4 utils guile fastjar gnattools libcc1 gotools"
# libgcj represents the runtime libraries only used by gcj.
libgcj="target-libffi \
@@ -2769,12 +2749,14 @@ target_libraries="target-libgcc \
target-libgloss \
target-newlib \
target-libgomp \
+ target-libcilkrts \
+ target-liboffloadmic \
target-libatomic \
target-libitm \
target-libstdc++-v3 \
- target-libmudflap \
target-libsanitizer \
target-libvtv \
+ target-libmpx \
target-libssp \
target-libquadmath \
target-libgfortran \
@@ -2877,6 +2859,12 @@ if test x$with_gnu_as = xno ; then
fi
use_included_zlib=
+
+# Check whether --with-system-zlib was given.
+if test "${with_system_zlib+set}" = set; then :
+ withval=$with_system_zlib;
+fi
+
# Make sure we don't let ZLIB be added if we didn't want it.
if test x$with_system_zlib = xyes ; then
use_included_zlib=no
@@ -2919,6 +2907,24 @@ case ${with_newlib} in
yes) skipdirs=`echo " ${skipdirs} " | sed -e 's/ target-newlib / /'` ;;
esac
+# Check whether --enable-as-accelerator-for was given.
+if test "${enable_as_accelerator_for+set}" = set; then :
+ enableval=$enable_as_accelerator_for;
+fi
+
+
+# Check whether --enable-offload-targets was given.
+if test "${enable_offload_targets+set}" = set; then :
+ enableval=$enable_offload_targets;
+ if test x"$enable_offload_targets" = x; then
+ as_fn_error "no offload targets specified" "$LINENO" 5
+ fi
+
+else
+ enable_offload_targets=
+fi
+
+
# Handle --enable-gold, --enable-ld.
# --disable-gold [--enable-ld]
# Build only ld. Default option.
@@ -2966,7 +2972,8 @@ case "${ENABLE_GOLD}" in
if test "$is_elf" = "yes"; then
# Check for target supported by gold.
case "${target}" in
- i?86-*-* | x86_64-*-* | sparc*-*-* | powerpc*-*-* | arm*-*-* | tilegx*-*-*)
+ i?86-*-* | x86_64-*-* | sparc*-*-* | powerpc*-*-* | arm*-*-* \
+ | aarch64*-*-* | tilegx*-*-* | mips*-*-* | s390*-*-*)
configdirs="$configdirs gold"
if test x${ENABLE_GOLD} = xdefault; then
default_ld=gold
@@ -3011,6 +3018,21 @@ $as_echo "$as_me: WARNING: neither ld nor gold are enabled" >&2;}
;;
esac
+# PR gas/19109
+# Decide the default method for compressing debug sections.
+# Provide a configure time option to override our default.
+# Check whether --enable-compressed_debug_sections was given.
+if test "${enable_compressed_debug_sections+set}" = set; then :
+ enableval=$enable_compressed_debug_sections;
+ if test x"$enable_compressed_debug_sections" = xyes; then
+ as_fn_error "no program with compressed debug sections specified" "$LINENO" 5
+ fi
+
+else
+ enable_compressed_debug_sections=
+fi
+
+
# Configure extra directories which are host specific
case "${host}" in
@@ -3085,9 +3107,47 @@ else
fi
if test "${ENABLE_LIBSTDCXX}" = "no" ; then
- noconfigdirs="$noconfigdirs libstdc++-v3"
+ noconfigdirs="$noconfigdirs target-libstdc++-v3"
+fi
+
+# If this is accelerator compiler and its target is intelmic we enable
+# target liboffloadmic by default. If this is compiler with offloading
+# for intelmic we enable host liboffloadmic by default. Otherwise
+# liboffloadmic is disabled by default.
+# Check whether --enable-liboffloadmic was given.
+if test "${enable_liboffloadmic+set}" = set; then :
+ enableval=$enable_liboffloadmic; case "$enableval" in
+ no | host | target)
+ enable_liboffloadmic=$enableval ;;
+ *)
+ as_fn_error "--enable-liboffloadmic=no/host/target" "$LINENO" 5 ;;
+esac
+else
+ if test x"$enable_as_accelerator_for" != x; then
+ case "${target}" in
+ *-intelmic-* | *-intelmicemul-*)
+ enable_liboffloadmic=target
+ extra_liboffloadmic_configure_flags="--enable-liboffloadmic=target"
+ ;;
+ *)
+ enable_liboffloadmic=no
+ ;;
+ esac
+else
+ case "${enable_offload_targets}" in
+ *-intelmic-* | *-intelmicemul-*)
+ enable_liboffloadmic=host
+ extra_liboffloadmic_configure_flags="--enable-liboffloadmic=host"
+ ;;
+ *)
+ enable_liboffloadmic=no
+ ;;
+ esac
+fi
fi
+
+
# Save it here so that, even in case of --enable-libgcj, if the Java
# front-end isn't enabled, we still get libgcj disabled.
libgcj_saved=$libgcj
@@ -3125,25 +3185,8 @@ if test x$enable_static_libjava != xyes ; then
fi
-# Disable libmudflap on some systems.
-if test x$enable_libmudflap = x ; then
- case "${target}" in
- *-*-linux* | *-*-gnu* | *-*-k*bsd*-gnu | bfin*-*-uclinux* | *-*-kopensolaris*-gnu)
- # Enable libmudflap by default in GNU and friends.
- ;;
- *-*-freebsd*)
- # Enable libmudflap by default in FreeBSD.
- ;;
- *)
- # Disable it by default everywhere else.
- noconfigdirs="$noconfigdirs target-libmudflap"
- ;;
- esac
-fi
-
-# Disable libgomp on non POSIX hosted systems.
+# Enable libgomp by default on hosted POSIX systems, and a few others.
if test x$enable_libgomp = x ; then
- # Enable libgomp by default on hosted POSIX systems.
case "${target}" in
*-*-linux* | *-*-gnu* | *-*-k*bsd*-gnu | *-*-kopensolaris*-gnu)
;;
@@ -3153,6 +3196,8 @@ if test x$enable_libgomp = x ; then
;;
*-*-darwin* | *-*-aix*)
;;
+ nvptx*-*-*)
+ ;;
*)
noconfigdirs="$noconfigdirs target-libgomp"
;;
@@ -3178,6 +3223,44 @@ $as_echo "yes" >&6; }
fi
fi
+# Disable libcilkrts on unsupported systems.
+if test -d ${srcdir}/libcilkrts; then
+ if test x$enable_libcilkrts = x; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcilkrts support" >&5
+$as_echo_n "checking for libcilkrts support... " >&6; }
+ if (srcdir=${srcdir}/libcilkrts; \
+ . ${srcdir}/configure.tgt; \
+ test -n "$UNSUPPORTED")
+ then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+ noconfigdirs="$noconfigdirs target-libcilkrts"
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+ fi
+ fi
+fi
+
+# Disable liboffloadmic on unsupported systems.
+if test -d ${srcdir}/liboffloadmic; then
+ if test x$enable_liboffloadmic != xno; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for liboffloadmic support" >&5
+$as_echo_n "checking for liboffloadmic support... " >&6; }
+ if (srcdir=${srcdir}/liboffloadmic; \
+ . ${srcdir}/configure.tgt; \
+ test -n "$UNSUPPORTED")
+ then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+ noconfigdirs="$noconfigdirs target-liboffloadmic"
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+ fi
+ fi
+fi
+
# Disable libitm on unsupported systems.
if test -d ${srcdir}/libitm; then
if test x$enable_libitm = x; then
@@ -3235,6 +3318,28 @@ $as_echo "yes" >&6; }
fi
fi
+
+# Enable libmpx on supported systems by request.
+if test -d ${srcdir}/libmpx; then
+ if test x$enable_libmpx = x; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libmpx support" >&5
+$as_echo_n "checking for libmpx support... " >&6; }
+ if (srcdir=${srcdir}/libmpx; \
+ . ${srcdir}/configure.tgt; \
+ test "$LIBMPX_SUPPORTED" != "yes")
+ then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+ noconfigdirs="$noconfigdirs target-libmpx"
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+ fi
+ fi
+fi
+
+
+
# Disable libquadmath for some systems.
case "${target}" in
avr-*-*)
@@ -3262,6 +3367,10 @@ case "${target}" in
# for explicit misaligned loads.
noconfigdirs="$noconfigdirs target-libssp"
;;
+ visium-*-*)
+ # No hosted I/O support.
+ noconfigdirs="$noconfigdirs target-libssp"
+ ;;
esac
# Disable libstdc++-v3 for some systems.
@@ -3279,6 +3388,9 @@ if test "${ENABLE_LIBSTDCXX}" = "default" ; then
avr-*-*)
noconfigdirs="$noconfigdirs target-libstdc++-v3"
;;
+ ft32-*-*)
+ noconfigdirs="$noconfigdirs target-libstdc++-v3"
+ ;;
esac
fi
@@ -3334,8 +3446,6 @@ case "${target}" in
;;
sh-*-* | sh[34]*-*-*)
;;
- sh64-*-* | sh5*-*-*)
- ;;
sparc*-*-*)
;;
x86_64-*-*)
@@ -3374,6 +3484,9 @@ case "${target}" in
alpha*-*-*vms*)
noconfigdirs="$noconfigdirs ${libgcj}"
;;
+ arm*-*-freebsd*)
+ noconfigdirs="$noconfigdirs ${libgcj}"
+ ;;
arm-wince-pe)
noconfigdirs="$noconfigdirs ${libgcj}"
;;
@@ -3430,11 +3543,22 @@ case "${target}" in
rs6000-*-aix*)
noconfigdirs="$noconfigdirs ${libgcj}"
;;
+ ft32-*-*)
+ noconfigdirs="$noconfigdirs ${libgcj}"
+ ;;
*-*-lynxos*)
noconfigdirs="$noconfigdirs ${libgcj}"
;;
esac
+# Disable the go frontend on systems where it is known to not work. Please keep
+# this in sync with contrib/config-list.mk.
+case "${target}" in
+*-*-darwin* | *-*-cygwin* | *-*-mingw* | *-*-aix*)
+ unsupported_languages="$unsupported_languages go"
+ ;;
+esac
+
# Disable libgo for some systems where it is known to not work.
# For testing, you can easily override this with --enable-libgo.
if test x$enable_libgo = x; then
@@ -3561,6 +3685,14 @@ esac
case "${target}" in
*-*-chorusos)
;;
+ aarch64-*-darwin*)
+ noconfigdirs="$noconfigdirs ld gas gdb gprof"
+ noconfigdirs="$noconfigdirs sim target-rda"
+ ;;
+ arm-*-darwin*)
+ noconfigdirs="$noconfigdirs ld gas gdb gprof"
+ noconfigdirs="$noconfigdirs sim target-rda"
+ ;;
powerpc-*-darwin*)
noconfigdirs="$noconfigdirs ld gas gdb gprof"
noconfigdirs="$noconfigdirs sim target-rda"
@@ -3595,6 +3727,10 @@ case "${target}" in
;;
*-*-rtems*)
noconfigdirs="$noconfigdirs target-libgloss"
+ # this is not caught below because this stanza matches earlier
+ case $target in
+ or1k*-*-*) noconfigdirs="$noconfigdirs gdb" ;;
+ esac
;;
# The tpf target doesn't support gdb yet.
*-*-tpf*)
@@ -3620,9 +3756,6 @@ case "${target}" in
sh*-*-pe|mips*-*-pe|*arm-wince-pe)
noconfigdirs="$noconfigdirs tcl tk itcl libgui sim"
;;
- arc-*-*)
- noconfigdirs="$noconfigdirs target-libgloss"
- ;;
arm-*-pe*)
noconfigdirs="$noconfigdirs target-libgloss"
;;
@@ -3651,8 +3784,11 @@ case "${target}" in
fr30-*-elf*)
noconfigdirs="$noconfigdirs gdb"
;;
+ ft32-*-*)
+ noconfigdirs="$noconfigdirs target-rda gprof"
+ ;;
moxie-*-*)
- noconfigdirs="$noconfigdirs gprof"
+ noconfigdirs="$noconfigdirs"
;;
h8300*-*-*)
noconfigdirs="$noconfigdirs target-libgloss"
@@ -3662,6 +3798,12 @@ case "${target}" in
;;
hppa1.1-*-osf* | hppa1.1-*-bsd* )
;;
+ hppa*64*-*-hpux*)
+ noconfigdirs="$noconfigdirs gdb"
+ ;;
+ hppa*-*-hpux11*)
+ noconfigdirs="$noconfigdirs gdb ld"
+ ;;
hppa*64*-*-linux*)
;;
hppa*-*-linux*)
@@ -3671,9 +3813,6 @@ case "${target}" in
hppa*-*-openbsd* | \
hppa*64*-*-*)
;;
- hppa*-hp-hpux11*)
- noconfigdirs="$noconfigdirs ld"
- ;;
hppa*-*-pro*)
;;
hppa*-*-*)
@@ -3688,7 +3827,7 @@ case "${target}" in
;;
ia64*-**-hpux*)
# No ld support yet.
- noconfigdirs="$noconfigdirs libgui itcl ld"
+ noconfigdirs="$noconfigdirs gdb libgui itcl ld"
;;
ia64*-*-*vms*)
# No ld support yet.
@@ -3770,7 +3909,7 @@ case "${target}" in
microblaze*)
noconfigdirs="$noconfigdirs gprof"
;;
- mips*-sde-elf* | mips*-mti-elf*)
+ mips*-sde-elf* | mips*-mti-elf* | mips*-img-elf*)
if test x$with_newlib = xyes; then
noconfigdirs="$noconfigdirs gprof"
fi
@@ -3793,7 +3932,16 @@ case "${target}" in
mips*-*-*)
noconfigdirs="$noconfigdirs gprof"
;;
- sh-*-* | sh64-*-*)
+ nds32*-*-*)
+ noconfigdirs="$noconfigdirs gdb"
+ ;;
+ nvptx*-*-*)
+ noconfigdirs="$noconfigdirs target-libssp target-libstdc++-v3 target-libobjc"
+ ;;
+ or1k*-*-*)
+ noconfigdirs="$noconfigdirs gdb"
+ ;;
+ sh-*-*)
case "${target}" in
sh*-*-elf)
;;
@@ -3809,7 +3957,7 @@ case "${target}" in
tic6x-*-*)
noconfigdirs="$noconfigdirs sim"
;;
- tilepro-*-* | tilegx-*-*)
+ tilepro*-*-* | tilegx*-*-*)
noconfigdirs="$noconfigdirs sim"
;;
v810-*-*)
@@ -3860,6 +4008,9 @@ fi
*-mingw*)
host_makefile_frag="config/mh-mingw"
;;
+ alpha*-linux*)
+ host_makefile_frag="config/mh-alpha-linux"
+ ;;
hppa*-hp-hpux10*)
host_makefile_frag="config/mh-pa-hpux10"
;;
@@ -5292,6 +5443,12 @@ $as_echo "$as_me: WARNING: trying to bootstrap a cross compiler" >&2;}
;;
esac
+# When bootstrapping with GCC, build stage 1 in C++98 mode to ensure that a
+# C++98 compiler can still start the bootstrap.
+if test "$enable_bootstrap:$GXX" = "yes:yes"; then
+ CXX="$CXX -std=gnu++98"
+fi
+
# Used for setting $lt_cv_objdir
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for objdir" >&5
$as_echo_n "checking for objdir... " >&6; }
@@ -5408,16 +5565,9 @@ if test "x$with_mpfr_lib" != x; then
gmplibs="-L$with_mpfr_lib $gmplibs"
fi
if test "x$with_mpfr$with_mpfr_include$with_mpfr_lib" = x && test -d ${srcdir}/mpfr; then
- # MPFR v3.1.0 moved the sources into a src sub-directory.
- if test -d ${srcdir}/mpfr/src; then
- gmplibs='-L$$r/$(HOST_SUBDIR)/mpfr/src/'"$lt_cv_objdir $gmplibs"
- gmpinc='-I$$r/$(HOST_SUBDIR)/mpfr/src -I$$s/mpfr/src '"$gmpinc"
- extra_mpc_mpfr_configure_flags='--with-mpfr-include=$$s/mpfr/src --with-mpfr-lib=$$r/$(HOST_SUBDIR)/mpfr/src/'"$lt_cv_objdir"
- else
- gmplibs='-L$$r/$(HOST_SUBDIR)/mpfr/'"$lt_cv_objdir $gmplibs"
- gmpinc='-I$$r/$(HOST_SUBDIR)/mpfr -I$$s/mpfr '"$gmpinc"
- extra_mpc_mpfr_configure_flags='--with-mpfr-include=$$s/mpfr --with-mpfr-lib=$$r/$(HOST_SUBDIR)/mpfr/'"$lt_cv_objdir"
- fi
+ gmplibs='-L$$r/$(HOST_SUBDIR)/mpfr/src/'"$lt_cv_objdir $gmplibs"
+ gmpinc='-I$$r/$(HOST_SUBDIR)/mpfr/src -I$$s/mpfr/src '"$gmpinc"
+ extra_mpc_mpfr_configure_flags='--with-mpfr-include=$$s/mpfr/src --with-mpfr-lib=$$r/$(HOST_SUBDIR)/mpfr/src/'"$lt_cv_objdir"
# Do not test the mpfr version. Assume that it is sufficient, since
# it is in the source tree, and the library has not been built yet
# but it would be included on the link line in the version check below
@@ -5710,20 +5860,6 @@ fi
-# Allow host libstdc++ to be specified for static linking with PPL.
-
-# Check whether --with-host-libstdcxx was given.
-if test "${with_host_libstdcxx+set}" = set; then :
- withval=$with_host_libstdcxx;
-fi
-
-
-case $with_host_libstdcxx in
- no|yes)
- as_fn_error "-with-host-libstdcxx needs an argument" "$LINENO" 5
- ;;
-esac
-
# Libraries to use for stage1 or when not bootstrapping.
# Check whether --with-stage1-libs was given.
@@ -5734,7 +5870,7 @@ if test "${with_stage1_libs+set}" = set; then :
stage1_libs=$withval
fi
else
- stage1_libs=$with_host_libstdcxx
+ stage1_libs=
fi
@@ -5760,8 +5896,7 @@ fi
-# Libraries to use for stage2 and later builds. This defaults to the
-# argument passed to --with-host-libstdcxx.
+# Libraries to use for stage2 and later builds.
# Check whether --with-boot-libs was given.
if test "${with_boot_libs+set}" = set; then :
@@ -5771,7 +5906,7 @@ if test "${with_boot_libs+set}" = set; then :
poststage1_libs=$withval
fi
else
- poststage1_libs=$with_host_libstdcxx
+ poststage1_libs=
fi
@@ -5797,15 +5932,8 @@ fi
-# GCC GRAPHITE dependences, ISL and CLOOG which in turn requires ISL.
-# Basic setup is inlined here, actual checks are in config/cloog.m4 and
-# config/isl.m4
-
-
-# Check whether --with-cloog was given.
-if test "${with_cloog+set}" = set; then :
- withval=$with_cloog;
-fi
+# GCC GRAPHITE dependency isl.
+# Basic setup is inlined here, actual checks are in config/isl.m4
# Check whether --with-isl was given.
@@ -5814,11 +5942,10 @@ if test "${with_isl+set}" = set; then :
fi
-# Treat either --without-cloog or --without-isl as a request to disable
+# Treat --without-isl as a request to disable
# GRAPHITE support and skip all following checks.
-if test "x$with_isl" != "xno" &&
- test "x$with_cloog" != "xno"; then
- # Check for ISL
+if test "x$with_isl" != "xno"; then
+ # Check for isl
# Check whether --with-isl-include was given.
@@ -5865,10 +5992,12 @@ fi
isllibs='-L$$r/$(HOST_SUBDIR)/isl/'"$lt_cv_objdir"' '
islinc='-I$$r/$(HOST_SUBDIR)/isl/include -I$$s/isl/include'
ENABLE_ISL_CHECK=no
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using in-tree ISL, disabling version check" >&5
-$as_echo "$as_me: WARNING: using in-tree ISL, disabling version check" >&2;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using in-tree isl, disabling version check" >&5
+$as_echo "$as_me: WARNING: using in-tree isl, disabling version check" >&2;}
fi
+ isllibs="${isllibs} -lisl"
+
if test "${ENABLE_ISL_CHECK}" = yes ; then
@@ -5877,87 +6006,64 @@ $as_echo "$as_me: WARNING: using in-tree ISL, disabling version check" >&2;}
_isl_saved_LIBS=$LIBS
CFLAGS="${_isl_saved_CFLAGS} ${islinc} ${gmpinc}"
- LDFLAGS="${_isl_saved_LDFLAGS} ${isllibs}"
- LIBS="${_isl_saved_LIBS} -lisl"
+ LDFLAGS="${_isl_saved_LDFLAGS} ${isllibs} ${gmplibs}"
+ LIBS="${_isl_saved_LIBS} -lisl -lgmp"
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for version 0.10 of ISL" >&5
-$as_echo_n "checking for version 0.10 of ISL... " >&6; }
- if test "$cross_compiling" = yes; then :
- gcc_cv_isl=yes
-else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for isl 0.16, 0.15, or deprecated 0.14" >&5
+$as_echo_n "checking for isl 0.16, 0.15, or deprecated 0.14... " >&6; }
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
-#include <isl/version.h>
- #include <string.h>
+#include <isl/ctx.h>
int
main ()
{
-if (strncmp (isl_version (), "isl-0.10", strlen ("isl-0.10")) != 0)
- return 1;
-
+isl_ctx_get_max_operations (isl_ctx_alloc ());
;
return 0;
}
_ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
+if ac_fn_c_try_link "$LINENO"; then :
gcc_cv_isl=yes
else
gcc_cv_isl=no
fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
- conftest.$ac_objext conftest.beam conftest.$ac_ext
-fi
-
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_isl" >&5
$as_echo "$gcc_cv_isl" >&6; }
- CFLAGS=$_isl_saved_CFLAGS
- LDFLAGS=$_isl_saved_LDFLAGS
- LIBS=$_isl_saved_LIBS
- fi
-
-
- if test "${gcc_cv_isl}" = no ; then
-
- if test "${ENABLE_ISL_CHECK}" = yes ; then
- _isl_saved_CFLAGS=$CFLAGS
- _isl_saved_LDFLAGS=$LDFLAGS
- _isl_saved_LIBS=$LIBS
-
- CFLAGS="${_isl_saved_CFLAGS} ${islinc} ${gmpinc}"
- LDFLAGS="${_isl_saved_LDFLAGS} ${isllibs}"
- LIBS="${_isl_saved_LIBS} -lisl"
+ if test "${gcc_cv_isl}" = no ; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: recommended isl version is 0.16 or 0.15, the minimum required isl version 0.14 is deprecated" >&5
+$as_echo "recommended isl version is 0.16 or 0.15, the minimum required isl version 0.14 is deprecated" >&6; }
+ fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for version 0.11 of ISL" >&5
-$as_echo_n "checking for version 0.11 of ISL... " >&6; }
- if test "$cross_compiling" = yes; then :
- gcc_cv_isl=yes
-else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for isl 0.16 or 0.15" >&5
+$as_echo_n "checking for isl 0.16 or 0.15... " >&6; }
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
-#include <isl/version.h>
- #include <string.h>
+#include <isl/schedule.h>
int
main ()
{
-if (strncmp (isl_version (), "isl-0.11", strlen ("isl-0.11")) != 0)
- return 1;
-
+isl_options_set_schedule_serialize_sccs (NULL, 0);
;
return 0;
}
_ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
- gcc_cv_isl=yes
+if ac_fn_c_try_link "$LINENO"; then :
+ ac_has_isl_options_set_schedule_serialize_sccs=yes
else
- gcc_cv_isl=no
-fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
- conftest.$ac_objext conftest.beam conftest.$ac_ext
+ ac_has_isl_options_set_schedule_serialize_sccs=no
fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_has_isl_options_set_schedule_serialize_sccs" >&5
+$as_echo "$ac_has_isl_options_set_schedule_serialize_sccs" >&6; }
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_isl" >&5
-$as_echo "$gcc_cv_isl" >&6; }
+ if test x"$ac_has_isl_options_set_schedule_serialize_sccs" = x"yes"; then
+ islver="0.15"
+
+ fi
CFLAGS=$_isl_saved_CFLAGS
LDFLAGS=$_isl_saved_LDFLAGS
@@ -5965,7 +6071,6 @@ $as_echo "$gcc_cv_isl" >&6; }
fi
- fi
@@ -5991,201 +6096,22 @@ $as_echo "$gcc_cv_isl" >&6; }
&& test "x${isllibs}" = x \
&& test "x${islinc}" = x ; then
- as_fn_error "Unable to find a usable ISL. See config.log for details." "$LINENO" 5
- fi
-
-
-
- if test "x$gcc_cv_isl" != "xno"; then
- # Check for CLOOG
-
-
-# Check whether --with-cloog-include was given.
-if test "${with_cloog_include+set}" = set; then :
- withval=$with_cloog_include;
-fi
-
-
-# Check whether --with-cloog-lib was given.
-if test "${with_cloog_lib+set}" = set; then :
- withval=$with_cloog_lib;
-fi
-
-
- # Check whether --enable-cloog-version-check was given.
-if test "${enable_cloog_version_check+set}" = set; then :
- enableval=$enable_cloog_version_check; ENABLE_CLOOG_CHECK=$enableval
-else
- ENABLE_CLOOG_CHECK=yes
-fi
-
-
- # Initialize clooglibs and clooginc.
- case $with_cloog in
- no)
- clooglibs=
- clooginc=
- ;;
- "" | yes)
- ;;
- *)
- clooglibs="-L$with_cloog/lib"
- clooginc="-I$with_cloog/include"
- ;;
- esac
- if test "x${with_cloog_include}" != x ; then
- clooginc="-I$with_cloog_include"
+ as_fn_error "Unable to find a usable isl. See config.log for details." "$LINENO" 5
fi
- if test "x${with_cloog_lib}" != x; then
- clooglibs="-L$with_cloog_lib"
- fi
- if test "x${clooginc}" = x && test "x${clooglibs}" = x \
- && test -d ${srcdir}/cloog; then
- clooglibs='-L$$r/$(HOST_SUBDIR)/cloog/'"$lt_cv_objdir"' '
- clooginc='-I$$r/$(HOST_SUBDIR)/cloog/include -I$$s/cloog/include -I'${srcdir}'/cloog/include '
- ENABLE_CLOOG_CHECK=no
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using in-tree CLooG, disabling version check" >&5
-$as_echo "$as_me: WARNING: using in-tree CLooG, disabling version check" >&2;}
- fi
-
- clooginc="-DCLOOG_INT_GMP ${clooginc}"
- clooglibs="${clooglibs} -lcloog-isl ${isllibs} -lisl"
-
-
-
- if test "${ENABLE_CLOOG_CHECK}" = yes ; then
- _cloog_saved_CFLAGS=$CFLAGS
- _cloog_saved_LDFLAGS=$LDFLAGS
-
- CFLAGS="${_cloog_saved_CFLAGS} ${clooginc} ${islinc} ${gmpinc}"
- LDFLAGS="${_cloog_saved_LDFLAGS} ${clooglibs} ${isllibs} ${gmplib}"
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for version 0.17.0 of CLooG" >&5
-$as_echo_n "checking for version 0.17.0 of CLooG... " >&6; }
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#include "cloog/version.h"
-int
-main ()
-{
-#if CLOOG_VERSION_MAJOR != 0 \
- || CLOOG_VERSION_MINOR != 17 \
- || CLOOG_VERSION_REVISION < 0
- choke me
- #endif
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
- gcc_cv_cloog=yes
-else
- gcc_cv_cloog=no
fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_cloog" >&5
-$as_echo "$gcc_cv_cloog" >&6; }
-
- CFLAGS=$_cloog_saved_CFLAGS
- LDFLAGS=$_cloog_saved_LDFLAGS
- fi
-
-
- if test "${gcc_cv_cloog}" = no ; then
-
-
- if test "${ENABLE_CLOOG_CHECK}" = yes ; then
- _cloog_saved_CFLAGS=$CFLAGS
- _cloog_saved_LDFLAGS=$LDFLAGS
-
- CFLAGS="${_cloog_saved_CFLAGS} ${clooginc} ${islinc} ${gmpinc}"
- LDFLAGS="${_cloog_saved_LDFLAGS} ${clooglibs} ${isllibs} ${gmplib}"
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for version 0.18.0 of CLooG" >&5
-$as_echo_n "checking for version 0.18.0 of CLooG... " >&6; }
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#include "cloog/version.h"
-int
-main ()
-{
-#if CLOOG_VERSION_MAJOR != 0 \
- || CLOOG_VERSION_MINOR != 18 \
- || CLOOG_VERSION_REVISION < 0
- choke me
- #endif
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
- gcc_cv_cloog=yes
-else
- gcc_cv_cloog=no
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_cloog" >&5
-$as_echo "$gcc_cv_cloog" >&6; }
-
- CFLAGS=$_cloog_saved_CFLAGS
- LDFLAGS=$_cloog_saved_LDFLAGS
- fi
-
-
- fi
-
-
-
-
-
- if test "x${with_cloog}" = xno; then
- graphite_requested=no
- elif test "x${with_cloog}" != x \
- || test "x${with_cloog_include}" != x \
- || test "x${with_cloog_lib}" != x ; then
- graphite_requested=yes
- else
- graphite_requested=no
- fi
-
-
-
- if test "${gcc_cv_cloog}" = no ; then
- clooglibs=
- clooginc=
- fi
-
- if test "${graphite_requested}" = yes \
- && test "x${clooglibs}" = x \
- && test "x${clooginc}" = x ; then
-
- as_fn_error "Unable to find a usable CLooG. See config.log for details." "$LINENO" 5
- fi
-
-
- fi
-fi
-
-# If either the ISL or the CLooG check failed, disable builds of in-tree
-# variants of both
+# If the isl check failed, disable builds of in-tree variant of isl
if test "x$with_isl" = xno ||
- test "x$with_cloog" = xno ||
- test "x$gcc_cv_cloog" = xno ||
test "x$gcc_cv_isl" = xno; then
- noconfigdirs="$noconfigdirs cloog isl"
+ noconfigdirs="$noconfigdirs isl"
islinc=
- clooginc=
- clooglibs=
fi
-
-
# Check for LTO support.
# Check whether --enable-lto was given.
if test "${enable_lto+set}" = set; then :
@@ -6202,7 +6128,8 @@ target_elf=no
case $target in
*-darwin* | *-aix* | *-cygwin* | *-mingw* | *-aout* | *-*coff* | \
*-msdosdjgpp* | *-vms* | *-wince* | *-*-pe* | \
- alpha*-dec-osf* | *-interix* | hppa[12]*-*-hpux*)
+ alpha*-dec-osf* | *-interix* | hppa[12]*-*-hpux* | \
+ nvptx-*-none)
target_elf=no
;;
*)
@@ -6217,7 +6144,7 @@ if test $target_elf = yes; then :
else
if test x"$default_enable_lto" = x"yes" ; then
case $target in
- *-apple-darwin9* | *-cygwin* | *-mingw*) ;;
+ *-apple-darwin9* | *-cygwin* | *-mingw* | *djgpp*) ;;
# On other non-ELF platforms, LTO has yet to be validated.
*) enable_lto=no ;;
esac
@@ -6228,7 +6155,7 @@ else
# warn during gcc/ subconfigure; unless you're bootstrapping with
# -flto it won't be needed until after installation anyway.
case $target in
- *-cygwin* | *-mingw* | *-apple-darwin*) ;;
+ *-cygwin* | *-mingw* | *-apple-darwin* | *djgpp*) ;;
*) if test x"$enable_lto" = x"yes"; then
as_fn_error "LTO support is not enabled for this target." "$LINENO" 5
fi
@@ -6245,6 +6172,23 @@ else
fi
+# Check whether --enable-linker-plugin-configure-flags was given.
+if test "${enable_linker_plugin_configure_flags+set}" = set; then :
+ enableval=$enable_linker_plugin_configure_flags; extra_linker_plugin_configure_flags=$enableval
+else
+ extra_linker_plugin_configure_flags=
+fi
+
+
+# Check whether --enable-linker-plugin-flags was given.
+if test "${enable_linker_plugin_flags+set}" = set; then :
+ enableval=$enable_linker_plugin_flags; extra_linker_plugin_flags=$enableval
+else
+ extra_linker_plugin_flags=
+fi
+
+
+
# By default, C and C++ are the only stage 1 languages.
stage1_languages=,c,
@@ -6261,7 +6205,7 @@ if test -d ${srcdir}/gcc; then
if test x"${enable_languages+set}" != xset; then
if test x"${LANGUAGES+set}" = xset; then
enable_languages="${LANGUAGES}"
- echo configure.in: warning: setting LANGUAGES is deprecated, use --enable-languages instead 1>&2
+ echo configure.ac: warning: setting LANGUAGES is deprecated, use --enable-languages instead 1>&2
else
enable_languages=all
fi
@@ -6269,7 +6213,7 @@ if test -d ${srcdir}/gcc; then
if test x"${enable_languages}" = x ||
test x"${enable_languages}" = xyes;
then
- echo configure.in: --enable-languages needs at least one language argument 1>&2
+ echo configure.ac: --enable-languages needs at least one language argument 1>&2
exit 1
fi
fi
@@ -6279,7 +6223,7 @@ if test -d ${srcdir}/gcc; then
# and make the substitution.
case ,${enable_languages}, in
*,f95,*)
- echo configure.in: warning: 'f95' as language name is deprecated, use 'fortran' instead 1>&2
+ echo configure.ac: warning: 'f95' as language name is deprecated, use 'fortran' instead 1>&2
enable_languages=`echo "${enable_languages}" | sed -e 's/f95/fortran/g'`
;;
esac
@@ -6345,7 +6289,6 @@ if test -d ${srcdir}/gcc; then
new_enable_languages=,c,
# If LTO is enabled, add the LTO front end.
- extra_host_libiberty_configure_flags=
if test "$enable_lto" = "yes" ; then
case ,${enable_languages}, in
*,lto,*) ;;
@@ -6353,10 +6296,16 @@ if test -d ${srcdir}/gcc; then
esac
if test "${build_lto_plugin}" = "yes" ; then
configdirs="$configdirs lto-plugin"
- extra_host_libiberty_configure_flags=--enable-shared
fi
fi
+ # If we're building an offloading compiler, add the LTO front end.
+ if test x"$enable_as_accelerator_for" != x ; then
+ case ,${enable_languages}, in
+ *,lto,*) ;;
+ *) enable_languages="${enable_languages},lto" ;;
+ esac
+ fi
missing_languages=`echo ",$enable_languages," | sed -e s/,all,/,/ -e s/,c,/,/ `
potential_languages=,c,
@@ -6571,11 +6520,19 @@ case ,${enable_languages},:${enable_objc_gc} in
;;
esac
-# Disable libitm, libsanitizer, libvtv if we're not building C++
+# Disable libcilkrts, libitm, libsanitizer, libvtv, liboffloadmic if we're not building C++
case ,${enable_languages}, in
- *,c++,*) ;;
+ *,c++,*)
+ # Disable libcilkrts, libitm, libsanitizer if we're not building libstdc++
+ case "${noconfigdirs}" in
+ *target-libstdc++-v3*)
+ noconfigdirs="$noconfigdirs target-libcilkrts target-libitm target-libsanitizer"
+ ;;
+ *) ;;
+ esac
+ ;;
*)
- noconfigdirs="$noconfigdirs target-libitm target-libsanitizer target-libvtv"
+ noconfigdirs="$noconfigdirs target-libcilkrts target-liboffloadmic target-libitm target-libsanitizer target-libvtv"
;;
esac
@@ -6647,6 +6604,50 @@ for i in ${target_configdirs_all} ; do
fi
done
+# Exclude target-zlib if target-libjava isn't built.
+case ${target_configdirs} in
+*target-libjava*)
+ ;;
+*)
+ target_configdirs="`echo ${target_configdirs} | sed -e 's/target-zlib//'`"
+ ;;
+esac
+
+# libiberty-linker-plugin is special: it doesn't have its own source directory,
+# so we have to add it after the preceding checks.
+if test x"$extra_linker_plugin_flags$extra_linker_plugin_configure_flags" != x
+then
+ case " $configdirs " in
+ *" libiberty "*)
+ # If we can build libiberty, we can also build libiberty-linker-plugin.
+ configdirs="$configdirs libiberty-linker-plugin"
+ extra_linker_plugin_configure_flags="$extra_linker_plugin_configure_flags \
+ --with-libiberty=../libiberty-linker-plugin";;
+ *)
+ as_fn_error "libiberty missing" "$LINENO" 5;;
+ esac
+fi
+
+# Sometimes we have special requirements for the host libiberty.
+extra_host_libiberty_configure_flags=
+extra_host_zlib_configure_flags=
+case " $configdirs " in
+ *" lto-plugin "* | *" libcc1 "*)
+ # When these are to be built as shared libraries, the same applies to
+ # libiberty.
+ extra_host_libiberty_configure_flags=--enable-shared
+ ;;
+ *" bfd "*)
+ # When bfd is to be built as a shared library, the same applies to
+ # zlib.
+ if test "$enable_shared" = "yes"; then
+ extra_host_zlib_configure_flags=--enable-host-shared
+ fi
+ ;;
+esac
+
+
+
# Produce a warning message for the subdirs we can't configure.
# This isn't especially interesting in the Cygnus tree, but in the individual
# FSF releases, it's important to let people know when their machine isn't
@@ -6771,28 +6772,36 @@ fi
# gcc) are built with "-O2 -g", so include those options when setting
# CFLAGS_FOR_TARGET and CXXFLAGS_FOR_TARGET.
if test "x$CFLAGS_FOR_TARGET" = x; then
- CFLAGS_FOR_TARGET=$CFLAGS
- case " $CFLAGS " in
- *" -O2 "*) ;;
- *) CFLAGS_FOR_TARGET="-O2 $CFLAGS_FOR_TARGET" ;;
- esac
- case " $CFLAGS " in
- *" -g "* | *" -g3 "*) ;;
- *) CFLAGS_FOR_TARGET="-g $CFLAGS_FOR_TARGET" ;;
- esac
+ if test "x${is_cross_compiler}" = xyes; then
+ CFLAGS_FOR_TARGET="-g -O2"
+ else
+ CFLAGS_FOR_TARGET=$CFLAGS
+ case " $CFLAGS " in
+ *" -O2 "*) ;;
+ *) CFLAGS_FOR_TARGET="-O2 $CFLAGS_FOR_TARGET" ;;
+ esac
+ case " $CFLAGS " in
+ *" -g "* | *" -g3 "*) ;;
+ *) CFLAGS_FOR_TARGET="-g $CFLAGS_FOR_TARGET" ;;
+ esac
+ fi
fi
if test "x$CXXFLAGS_FOR_TARGET" = x; then
- CXXFLAGS_FOR_TARGET=$CXXFLAGS
- case " $CXXFLAGS " in
- *" -O2 "*) ;;
- *) CXXFLAGS_FOR_TARGET="-O2 $CXXFLAGS_FOR_TARGET" ;;
- esac
- case " $CXXFLAGS " in
- *" -g "* | *" -g3 "*) ;;
- *) CXXFLAGS_FOR_TARGET="-g $CXXFLAGS_FOR_TARGET" ;;
- esac
+ if test "x${is_cross_compiler}" = xyes; then
+ CXXFLAGS_FOR_TARGET="-g -O2"
+ else
+ CXXFLAGS_FOR_TARGET=$CXXFLAGS
+ case " $CXXFLAGS " in
+ *" -O2 "*) ;;
+ *) CXXFLAGS_FOR_TARGET="-O2 $CXXFLAGS_FOR_TARGET" ;;
+ esac
+ case " $CXXFLAGS " in
+ *" -g "* | *" -g3 "*) ;;
+ *) CXXFLAGS_FOR_TARGET="-g $CXXFLAGS_FOR_TARGET" ;;
+ esac
+ fi
fi
@@ -6836,7 +6845,7 @@ fi
# have requested that this magic not happen.
#
# The command line options always override the explicit settings in
-# configure.in, and the settings in configure.in override this magic.
+# configure.ac, and the settings in configure.ac override this magic.
#
# If the default for a toolchain is to use GNU as and ld, and you don't
# want to do that, then you should use the --without-gnu-as and
@@ -6926,7 +6935,7 @@ case "${target}" in
spu-*-*)
target_makefile_frag="config/mt-spu"
;;
- mips*-sde-elf* | mips*-mti-elf*)
+ mips*-sde-elf* | mips*-mti-elf* | mips*-img-elf*)
target_makefile_frag="config/mt-sde"
;;
mipsisa*-*-elfoabi*)
@@ -6935,6 +6944,9 @@ case "${target}" in
mips*-*-*linux* | mips*-*-gnu*)
target_makefile_frag="config/mt-mips-gnu"
;;
+ nios2-*-elf*)
+ target_makefile_frag="config/mt-nios2-elf"
+ ;;
*-*-linux* | *-*-gnu* | *-*-k*bsd*-gnu | *-*-kopensolaris*-gnu)
target_makefile_frag="config/mt-gnu"
;;
@@ -6967,7 +6979,7 @@ case "${enable_target_optspace}:${target}" in
:d30v-*)
ospace_frag="config/mt-d30v"
;;
- :m32r-* | :d10v-* | :fr30-*)
+ :m32r-* | :d10v-* | :fr30-* | :i?86*-*-elfiamcu)
ospace_frag="config/mt-ospace"
;;
no:* | :*)
@@ -7037,26 +7049,104 @@ else
GCC_SHLIB_SUBDIR=
fi
+# Adjust the toplevel makefile according to whether bootstrap was selected.
+case $enable_bootstrap in
+ yes)
+ bootstrap_suffix=bootstrap
+ BUILD_CONFIG=bootstrap-debug
+ ;;
+ no)
+ bootstrap_suffix=no-bootstrap
+ BUILD_CONFIG=
+ ;;
+esac
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for default BUILD_CONFIG" >&5
+$as_echo_n "checking for default BUILD_CONFIG... " >&6; }
+
+
+# Check whether --with-build-config was given.
+if test "${with_build_config+set}" = set; then :
+ withval=$with_build_config; case $with_build_config in
+ yes) with_build_config= ;;
+ no) with_build_config= BUILD_CONFIG= ;;
+ esac
+fi
+
+
+if test "x${with_build_config}" != x; then
+ BUILD_CONFIG=$with_build_config
+else
+ case $BUILD_CONFIG in
+ bootstrap-debug)
+ if echo "int f (void) { return 0; }" > conftest.c &&
+ ${CC} -c conftest.c &&
+ mv conftest.o conftest.o.g0 &&
+ ${CC} -c -g conftest.c &&
+ mv conftest.o conftest.o.g &&
+ ${srcdir}/contrib/compare-debug conftest.o.g0 conftest.o.g > /dev/null 2>&1; then
+ :
+ else
+ BUILD_CONFIG=
+ fi
+ rm -f conftest.c conftest.o conftest.o.g0 conftest.o.g
+ ;;
+ esac
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CONFIG" >&5
+$as_echo "$BUILD_CONFIG" >&6; }
+
+
+# Use same top-level configure hooks in libgcc/libstdc++/libvtv.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-vtable-verify" >&5
+$as_echo_n "checking for --enable-vtable-verify... " >&6; }
+# Check whether --enable-vtable-verify was given.
+if test "${enable_vtable_verify+set}" = set; then :
+ enableval=$enable_vtable_verify; case "$enableval" in
+ yes) enable_vtable_verify=yes ;;
+ no) enable_vtable_verify=no ;;
+ *) enable_vtable_verify=no;;
+ esac
+else
+ enable_vtable_verify=no
+fi
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_vtable_verify" >&5
+$as_echo "$enable_vtable_verify" >&6; }
+
# Record target_configdirs and the configure arguments for target and
# build configuration in Makefile.
target_configdirs=`echo "${target_configdirs}" | sed -e 's/target-//g'`
build_configdirs=`echo "${build_configdirs}" | sed -e 's/build-//g'`
+bootstrap_fixincludes=no
# If we are building libgomp, bootstrap it.
if echo " ${target_configdirs} " | grep " libgomp " > /dev/null 2>&1 ; then
bootstrap_target_libs=${bootstrap_target_libs}target-libgomp,
fi
-# If we are building libsanitizer, bootstrap it.
-if echo " ${target_configdirs} " | grep " libsanitizer " > /dev/null 2>&1 ; then
- bootstrap_target_libs=${bootstrap_target_libs}target-libsanitizer,
+# If we are building libsanitizer and $BUILD_CONFIG contains bootstrap-asan
+# or bootstrap-ubsan, bootstrap it.
+if echo " ${target_configdirs} " | grep " libsanitizer " > /dev/null 2>&1; then
+ case "$BUILD_CONFIG" in
+ *bootstrap-asan* | *bootstrap-ubsan* )
+ bootstrap_target_libs=${bootstrap_target_libs}target-libsanitizer,
+ bootstrap_fixincludes=yes
+ ;;
+ esac
fi
-# If we are building libvtv, bootstrap it.
-if echo " ${target_configdirs} " | grep " libvtv " > /dev/null 2>&1 ; then
+# If we are building libvtv and --enable-vtable-verify, bootstrap it.
+if echo " ${target_configdirs} " | grep " libvtv " > /dev/null 2>&1 &&
+ test "$enable_vtable_verify" != no; then
bootstrap_target_libs=${bootstrap_target_libs}target-libvtv,
fi
+# If we are building libmpx, bootstrap it.
+if echo " ${target_configdirs} " | grep " libmpx " > /dev/null 2>&1; then
+ bootstrap_target_libs=${bootstrap_target_libs}target-libmpx,
+fi
+
# Determine whether gdb needs tk/tcl or not.
# Use 'maybe' since enable_gdbtk might be true even if tk isn't available
# and in that case we want gdb to be built without tk. Ugh!
@@ -7106,54 +7196,6 @@ case "$enable_bootstrap:$ENABLE_GOLD: $configdirs :,$stage1_languages," in
;;
esac
-# Adjust the toplevel makefile according to whether bootstrap was selected.
-case $enable_bootstrap in
- yes)
- bootstrap_suffix=bootstrap
- BUILD_CONFIG=bootstrap-debug
- ;;
- no)
- bootstrap_suffix=no-bootstrap
- BUILD_CONFIG=
- ;;
-esac
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for default BUILD_CONFIG" >&5
-$as_echo_n "checking for default BUILD_CONFIG... " >&6; }
-
-
-# Check whether --with-build-config was given.
-if test "${with_build_config+set}" = set; then :
- withval=$with_build_config; case $with_build_config in
- yes) with_build_config= ;;
- no) with_build_config= BUILD_CONFIG= ;;
- esac
-fi
-
-
-if test "x${with_build_config}" != x; then
- BUILD_CONFIG=$with_build_config
-else
- case $BUILD_CONFIG in
- bootstrap-debug)
- if echo "int f (void) { return 0; }" > conftest.c &&
- ${CC} -c conftest.c &&
- mv conftest.o conftest.o.g0 &&
- ${CC} -c -g conftest.c &&
- mv conftest.o conftest.o.g &&
- ${srcdir}/contrib/compare-debug conftest.o.g0 conftest.o.g > /dev/null 2>&1; then
- :
- else
- BUILD_CONFIG=
- fi
- rm -f conftest.c conftest.o conftest.o.g0 conftest.o.g
- ;;
- esac
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CONFIG" >&5
-$as_echo "$BUILD_CONFIG" >&6; }
-
-
extrasub_build=
for module in ${build_configdirs} ; do
if test -z "${no_recursion}" \
@@ -7177,11 +7219,15 @@ for module in ${configdirs} ; do
fi
done
fi
+ case ${module},${bootstrap_fixincludes} in
+ fixincludes,no) host_bootstrap_suffix=no-bootstrap ;;
+ *) host_bootstrap_suffix=$bootstrap_suffix ;;
+ esac
extrasub_host="$extrasub_host
/^@if $module\$/d
/^@endif $module\$/d
-/^@if $module-$bootstrap_suffix\$/d
-/^@endif $module-$bootstrap_suffix\$/d"
+/^@if $module-$host_bootstrap_suffix\$/d
+/^@endif $module-$host_bootstrap_suffix\$/d"
done
extrasub_target=
for module in ${target_configdirs} ; do
@@ -7324,7 +7370,7 @@ do
case $lib in
- mpc | mpfr | gmp | cloog)
+ mpc | mpfr | gmp | isl)
# If we're processing --with-$lib, --with-$lib-include or
# --with-$lib-lib, for one of the libs above, and target is
# different from host, don't pass the current argument to any
@@ -7417,8 +7463,10 @@ tbaseargs="$tbaseargs --disable-option-checking"
# For the build-side libraries, we just need to pretend we're native,
# and not use the same cache file. Multilibs are neither needed nor
-# desired.
-build_configargs="$build_configargs --cache-file=../config.cache ${baseargs}"
+# desired. We can't even use the same cache file for all build-side
+# libraries, as they're compiled differently; some with C, some with
+# C++ or with different feature-enabling options.
+build_configargs="$build_configargs --cache-file=./config.cache ${baseargs}"
# For host modules, accept cache file option, or specification as blank.
case "${cache_file}" in
@@ -7445,6 +7493,26 @@ if test x${is_cross_compiler} = xyes ; then
target_configargs="--with-cross-host=${host_noncanonical} ${target_configargs}"
fi
+# Special user-friendly check for native x86_64-linux build, if
+# multilib is not explicitly enabled.
+case "$target:$have_compiler:$host:$target:$enable_multilib" in
+ x86_64-*linux*:yes:$build:$build:)
+ # Make sure we have a development environment that handles 32-bit
+ dev64=no
+ echo "int main () { return 0; }" > conftest.c
+ ${CC} -m32 -o conftest ${CFLAGS} ${CPPFLAGS} ${LDFLAGS} conftest.c
+ if test $? = 0 ; then
+ if test -s conftest || test -s conftest.exe ; then
+ dev64=yes
+ fi
+ fi
+ rm -f conftest*
+ if test x${dev64} != xyes ; then
+ as_fn_error "I suspect your system does not have 32-bit development libraries (libc and headers). If you have them, rerun configure with --enable-multilib. If you do not have them, and want to build a 64-bit-only compiler, rerun configure with --disable-multilib." "$LINENO" 5
+ fi
+ ;;
+esac
+
# Default to --enable-multilib.
if test x${enable_multilib} = x ; then
target_configargs="--enable-multilib ${target_configargs}"
@@ -12241,6 +12309,236 @@ fi
+if test -z "$ac_cv_path_OBJCOPY_FOR_TARGET" ; then
+ if test -n "$with_build_time_tools"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for objcopy in $with_build_time_tools" >&5
+$as_echo_n "checking for objcopy in $with_build_time_tools... " >&6; }
+ if test -x $with_build_time_tools/objcopy; then
+ OBJCOPY_FOR_TARGET=`cd $with_build_time_tools && pwd`/objcopy
+ ac_cv_path_OBJCOPY_FOR_TARGET=$OBJCOPY_FOR_TARGET
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_OBJCOPY_FOR_TARGET" >&5
+$as_echo "$ac_cv_path_OBJCOPY_FOR_TARGET" >&6; }
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+ fi
+ elif test $build != $host && test $have_gcc_for_target = yes; then
+ OBJCOPY_FOR_TARGET=`$GCC_FOR_TARGET --print-prog-name=objcopy`
+ test $OBJCOPY_FOR_TARGET = objcopy && OBJCOPY_FOR_TARGET=
+ test -n "$OBJCOPY_FOR_TARGET" && ac_cv_path_OBJCOPY_FOR_TARGET=$OBJCOPY_FOR_TARGET
+ fi
+fi
+if test -z "$ac_cv_path_OBJCOPY_FOR_TARGET" && test -n "$gcc_cv_tool_dirs"; then
+ # Extract the first word of "objcopy", so it can be a program name with args.
+set dummy objcopy; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_path_OBJCOPY_FOR_TARGET+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ case $OBJCOPY_FOR_TARGET in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_OBJCOPY_FOR_TARGET="$OBJCOPY_FOR_TARGET" # Let the user override the test with a path.
+ ;;
+ *)
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $gcc_cv_tool_dirs
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_path_OBJCOPY_FOR_TARGET="$as_dir/$ac_word$ac_exec_ext"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+ ;;
+esac
+fi
+OBJCOPY_FOR_TARGET=$ac_cv_path_OBJCOPY_FOR_TARGET
+if test -n "$OBJCOPY_FOR_TARGET"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY_FOR_TARGET" >&5
+$as_echo "$OBJCOPY_FOR_TARGET" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_path_OBJCOPY_FOR_TARGET" ; then
+
+
+if test -n "$OBJCOPY_FOR_TARGET"; then
+ ac_cv_prog_OBJCOPY_FOR_TARGET=$OBJCOPY_FOR_TARGET
+elif test -n "$ac_cv_prog_OBJCOPY_FOR_TARGET"; then
+ OBJCOPY_FOR_TARGET=$ac_cv_prog_OBJCOPY_FOR_TARGET
+fi
+
+if test -n "$ac_cv_prog_OBJCOPY_FOR_TARGET"; then
+ for ncn_progname in objcopy; do
+ # Extract the first word of "${ncn_progname}", so it can be a program name with args.
+set dummy ${ncn_progname}; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_OBJCOPY_FOR_TARGET+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$OBJCOPY_FOR_TARGET"; then
+ ac_cv_prog_OBJCOPY_FOR_TARGET="$OBJCOPY_FOR_TARGET" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_OBJCOPY_FOR_TARGET="${ncn_progname}"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+OBJCOPY_FOR_TARGET=$ac_cv_prog_OBJCOPY_FOR_TARGET
+if test -n "$OBJCOPY_FOR_TARGET"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY_FOR_TARGET" >&5
+$as_echo "$OBJCOPY_FOR_TARGET" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+ done
+fi
+
+if test -z "$ac_cv_prog_OBJCOPY_FOR_TARGET" && test -n "$with_build_time_tools"; then
+ for ncn_progname in objcopy; do
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${ncn_progname} in $with_build_time_tools" >&5
+$as_echo_n "checking for ${ncn_progname} in $with_build_time_tools... " >&6; }
+ if test -x $with_build_time_tools/${ncn_progname}; then
+ ac_cv_prog_OBJCOPY_FOR_TARGET=$with_build_time_tools/${ncn_progname}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+ break
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+ fi
+ done
+fi
+
+if test -z "$ac_cv_prog_OBJCOPY_FOR_TARGET"; then
+ for ncn_progname in objcopy; do
+ if test -n "$ncn_target_tool_prefix"; then
+ # Extract the first word of "${ncn_target_tool_prefix}${ncn_progname}", so it can be a program name with args.
+set dummy ${ncn_target_tool_prefix}${ncn_progname}; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_OBJCOPY_FOR_TARGET+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$OBJCOPY_FOR_TARGET"; then
+ ac_cv_prog_OBJCOPY_FOR_TARGET="$OBJCOPY_FOR_TARGET" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_OBJCOPY_FOR_TARGET="${ncn_target_tool_prefix}${ncn_progname}"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+OBJCOPY_FOR_TARGET=$ac_cv_prog_OBJCOPY_FOR_TARGET
+if test -n "$OBJCOPY_FOR_TARGET"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY_FOR_TARGET" >&5
+$as_echo "$OBJCOPY_FOR_TARGET" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+ fi
+ if test -z "$ac_cv_prog_OBJCOPY_FOR_TARGET" && test $build = $target ; then
+ # Extract the first word of "${ncn_progname}", so it can be a program name with args.
+set dummy ${ncn_progname}; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_OBJCOPY_FOR_TARGET+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$OBJCOPY_FOR_TARGET"; then
+ ac_cv_prog_OBJCOPY_FOR_TARGET="$OBJCOPY_FOR_TARGET" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_OBJCOPY_FOR_TARGET="${ncn_progname}"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+OBJCOPY_FOR_TARGET=$ac_cv_prog_OBJCOPY_FOR_TARGET
+if test -n "$OBJCOPY_FOR_TARGET"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY_FOR_TARGET" >&5
+$as_echo "$OBJCOPY_FOR_TARGET" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+ fi
+ test -n "$ac_cv_prog_OBJCOPY_FOR_TARGET" && break
+ done
+fi
+
+if test -z "$ac_cv_prog_OBJCOPY_FOR_TARGET" ; then
+ set dummy objcopy
+ if test $build = $target ; then
+ OBJCOPY_FOR_TARGET="$2"
+ else
+ OBJCOPY_FOR_TARGET="${ncn_target_tool_prefix}$2"
+ fi
+else
+ OBJCOPY_FOR_TARGET="$ac_cv_prog_OBJCOPY_FOR_TARGET"
+fi
+
+else
+ OBJCOPY_FOR_TARGET=$ac_cv_path_OBJCOPY_FOR_TARGET
+fi
+
+
+
+
if test -z "$ac_cv_path_OBJDUMP_FOR_TARGET" ; then
if test -n "$with_build_time_tools"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for objdump in $with_build_time_tools" >&5
@@ -14171,6 +14469,48 @@ $as_echo "pre-installed" >&6; }
fi
fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find the target objcopy" >&5
+$as_echo_n "checking where to find the target objcopy... " >&6; }
+if test "x${build}" != "x${host}" ; then
+ if expr "x$OBJCOPY_FOR_TARGET" : "x/" > /dev/null; then
+ # We already found the complete path
+ ac_dir=`dirname $OBJCOPY_FOR_TARGET`
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: pre-installed in $ac_dir" >&5
+$as_echo "pre-installed in $ac_dir" >&6; }
+ else
+ # Canadian cross, just use what we found
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: pre-installed" >&5
+$as_echo "pre-installed" >&6; }
+ fi
+else
+ ok=yes
+ case " ${configdirs} " in
+ *" binutils "*) ;;
+ *) ok=no ;;
+ esac
+
+ if test $ok = yes; then
+ # An in-tree tool is available and we can use it
+ OBJCOPY_FOR_TARGET='$$r/$(HOST_SUBDIR)/binutils/objcopy'
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: just compiled" >&5
+$as_echo "just compiled" >&6; }
+ elif expr "x$OBJCOPY_FOR_TARGET" : "x/" > /dev/null; then
+ # We already found the complete path
+ ac_dir=`dirname $OBJCOPY_FOR_TARGET`
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: pre-installed in $ac_dir" >&5
+$as_echo "pre-installed in $ac_dir" >&6; }
+ elif test "x$target" = "x$host"; then
+ # We can use an host tool
+ OBJCOPY_FOR_TARGET='$(OBJCOPY)'
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: host tool" >&5
+$as_echo "host tool" >&6; }
+ else
+ # We need a cross tool
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: pre-installed" >&5
+$as_echo "pre-installed" >&6; }
+ fi
+fi
+
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find the target objdump" >&5
$as_echo_n "checking where to find the target objdump... " >&6; }
if test "x${build}" != "x${host}" ; then
@@ -14495,7 +14835,20 @@ if test "${enable_stage1_checking+set}" = set; then :
enableval=$enable_stage1_checking; stage1_checking=--enable-checking=${enable_stage1_checking}
else
if test "x$enable_checking" = xno || test "x$enable_checking" = x; then
- stage1_checking=--enable-checking=yes,types
+ # For --disable-checking or implicit --enable-checking=release, avoid
+ # setting --enable-checking=gc in the default stage1 checking for LTO
+ # bootstraps. See PR62077.
+ case $BUILD_CONFIG in
+ *lto*)
+ stage1_checking=--enable-checking=release,misc,gimple,rtlflag,tree,types;;
+ *)
+ stage1_checking=--enable-checking=yes,types;;
+ esac
+ if test "x$enable_checking" = x && \
+ test -d ${srcdir}/gcc && \
+ test x"`cat ${srcdir}/gcc/DEV-PHASE`" = xexperimental; then
+ stage1_checking=--enable-checking=yes,types,extra
+ fi
else
stage1_checking=--enable-checking=$enable_checking,types
fi
@@ -14521,6 +14874,40 @@ case ${enable_werror} in
esac
+# Enable --enable-host-shared.
+# Check whether --enable-host-shared was given.
+if test "${enable_host_shared+set}" = set; then :
+ enableval=$enable_host_shared; host_shared=$enableval
+else
+ host_shared=no
+fi
+
+
+
+# PR jit/64780: Require the user to explicitly specify
+# --enable-host-shared if the jit is enabled, hinting
+# that they might want to do a separate configure/build of
+# the jit, to avoid users from slowing down the rest of the
+# compiler by enabling the jit.
+if test ${host_shared} = "no" ; then
+ case "${enable_languages}" in
+ *jit*)
+ as_fn_error "
+Enabling language \"jit\" requires --enable-host-shared.
+
+--enable-host-shared typically slows the rest of the compiler down by
+a few %, so you must explicitly enable it.
+
+If you want to build both the jit and the regular compiler, it is often
+best to do this via two separate configure/builds, in separate
+directories, to avoid imposing the performance cost of
+--enable-host-shared on the regular compiler." "$LINENO" 5
+ ;;
+ *)
+ ;;
+ esac
+fi
+
# Specify what files to not compare during bootstrap.
compare_exclusions="gcc/cc*-checksum\$(objext) | gcc/ada/*tools/*"
diff --git a/configure.ac b/configure.ac
index 6f3d801ab..54558df98 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,6 +1,6 @@
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
-# 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012
-# Free Software Foundation, Inc.
+# 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012,
+# 2014, 2015, 2016 Free Software Foundation, Inc.
#
# This file is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by
@@ -29,7 +29,6 @@ m4_include([ltsugar.m4])
m4_include([ltversion.m4])
m4_include([lt~obsolete.m4])
m4_include([config/isl.m4])
-m4_include([config/cloog.m4])
AC_INIT(move-if-change)
AC_PREREQ(2.64)
@@ -126,14 +125,14 @@ extra_host_args=
# these library is used by various programs built for the build
# environment
#
-build_libs="build-libiberty"
+build_libs="build-libiberty build-libcpp"
# these tools are built for the build environment
build_tools="build-texinfo build-flex build-bison build-m4 build-fixincludes"
# these libraries are used by various programs built for the host environment
-#
-host_libs="intl libiberty opcodes bfd readline tcl tk itcl libgui zlib libbacktrace libcpp libdecnumber gmp mpfr mpc isl cloog libelf libiconv"
+#f
+host_libs="intl libiberty opcodes bfd readline tcl tk itcl libgui zlib libbacktrace libcpp libdecnumber gmp mpfr mpc isl libelf libiconv"
# these tools are built for the host environment
# Note, the powerpc-eabi build depends on sim occurring before gdb in order to
@@ -141,7 +140,7 @@ host_libs="intl libiberty opcodes bfd readline tcl tk itcl libgui zlib libbacktr
# binutils, gas and ld appear in that order because it makes sense to run
# "make check" in that particular order.
# If --enable-gold is used, "gold" may replace "ld".
-host_tools="texinfo flex bison binutils gas ld fixincludes gcc cgen sid sim gdb gprof etc expect dejagnu m4 utils guile fastjar gnattools"
+host_tools="texinfo flex bison binutils gas ld fixincludes gcc cgen sid sim gdb gprof etc expect dejagnu m4 utils guile fastjar gnattools libcc1 gotools"
# libgcj represents the runtime libraries only used by gcj.
libgcj="target-libffi \
@@ -156,12 +155,14 @@ target_libraries="target-libgcc \
target-libgloss \
target-newlib \
target-libgomp \
+ target-libcilkrts \
+ target-liboffloadmic \
target-libatomic \
target-libitm \
target-libstdc++-v3 \
- target-libmudflap \
target-libsanitizer \
target-libvtv \
+ target-libmpx \
target-libssp \
target-libquadmath \
target-libgfortran \
@@ -244,6 +245,8 @@ if test x$with_gnu_as = xno ; then
fi
use_included_zlib=
+AC_ARG_WITH(system-zlib,
+[AS_HELP_STRING([--with-system-zlib], [use installed libz])])
# Make sure we don't let ZLIB be added if we didn't want it.
if test x$with_system_zlib = xyes ; then
use_included_zlib=no
@@ -286,6 +289,22 @@ case ${with_newlib} in
yes) skipdirs=`echo " ${skipdirs} " | sed -e 's/ target-newlib / /'` ;;
esac
+AC_ARG_ENABLE(as-accelerator-for,
+[AS_HELP_STRING([--enable-as-accelerator-for=ARG],
+ [build as offload target compiler.
+ Specify offload host triple by ARG])])
+
+AC_ARG_ENABLE(offload-targets,
+[AS_HELP_STRING([--enable-offload-targets=LIST],
+ [enable offloading to devices from comma-separated LIST of
+ TARGET[=DIR]. Use optional path to find offload target compiler
+ during the build])],
+[
+ if test x"$enable_offload_targets" = x; then
+ AC_MSG_ERROR([no offload targets specified])
+ fi
+], [enable_offload_targets=])
+
# Handle --enable-gold, --enable-ld.
# --disable-gold [--enable-ld]
# Build only ld. Default option.
@@ -331,7 +350,8 @@ case "${ENABLE_GOLD}" in
if test "$is_elf" = "yes"; then
# Check for target supported by gold.
case "${target}" in
- i?86-*-* | x86_64-*-* | sparc*-*-* | powerpc*-*-* | arm*-*-* | tilegx*-*-*)
+ i?86-*-* | x86_64-*-* | sparc*-*-* | powerpc*-*-* | arm*-*-* \
+ | aarch64*-*-* | tilegx*-*-* | mips*-*-* | s390*-*-*)
configdirs="$configdirs gold"
if test x${ENABLE_GOLD} = xdefault; then
default_ld=gold
@@ -373,6 +393,19 @@ case "${ENABLE_LD}" in
;;
esac
+# PR gas/19109
+# Decide the default method for compressing debug sections.
+# Provide a configure time option to override our default.
+AC_ARG_ENABLE(compressed_debug_sections,
+[AS_HELP_STRING([--enable-compressed-debug-sections={all,gas,gold,ld,none}],
+ [Enable compressed debug sections for gas, gold or ld by
+ default])],
+[
+ if test x"$enable_compressed_debug_sections" = xyes; then
+ AC_MSG_ERROR([no program with compressed debug sections specified])
+ fi
+], [enable_compressed_debug_sections=])
+
# Configure extra directories which are host specific
case "${host}" in
@@ -435,9 +468,45 @@ AS_HELP_STRING([--disable-libstdcxx],
ENABLE_LIBSTDCXX=$enableval,
ENABLE_LIBSTDCXX=default)
[if test "${ENABLE_LIBSTDCXX}" = "no" ; then
- noconfigdirs="$noconfigdirs libstdc++-v3"
+ noconfigdirs="$noconfigdirs target-libstdc++-v3"
fi]
+# If this is accelerator compiler and its target is intelmic we enable
+# target liboffloadmic by default. If this is compiler with offloading
+# for intelmic we enable host liboffloadmic by default. Otherwise
+# liboffloadmic is disabled by default.
+AC_ARG_ENABLE([liboffloadmic],
+AC_HELP_STRING([[--enable-liboffloadmic[=ARG]]],
+ [build liboffloadmic @<:@ARG={no,host,target}@:>@]),
+[case "$enableval" in
+ no | host | target)
+ enable_liboffloadmic=$enableval ;;
+ *)
+ AC_MSG_ERROR([--enable-liboffloadmic=no/host/target]) ;;
+esac],
+[if test x"$enable_as_accelerator_for" != x; then
+ case "${target}" in
+ *-intelmic-* | *-intelmicemul-*)
+ enable_liboffloadmic=target
+ extra_liboffloadmic_configure_flags="--enable-liboffloadmic=target"
+ ;;
+ *)
+ enable_liboffloadmic=no
+ ;;
+ esac
+else
+ case "${enable_offload_targets}" in
+ *-intelmic-* | *-intelmicemul-*)
+ enable_liboffloadmic=host
+ extra_liboffloadmic_configure_flags="--enable-liboffloadmic=host"
+ ;;
+ *)
+ enable_liboffloadmic=no
+ ;;
+ esac
+fi])
+AC_SUBST(extra_liboffloadmic_configure_flags)
+
# Save it here so that, even in case of --enable-libgcj, if the Java
# front-end isn't enabled, we still get libgcj disabled.
libgcj_saved=$libgcj
@@ -473,25 +542,8 @@ if test x$enable_static_libjava != xyes ; then
fi
AC_SUBST(EXTRA_CONFIGARGS_LIBJAVA)
-# Disable libmudflap on some systems.
-if test x$enable_libmudflap = x ; then
- case "${target}" in
- *-*-linux* | *-*-gnu* | *-*-k*bsd*-gnu | bfin*-*-uclinux* | *-*-kopensolaris*-gnu)
- # Enable libmudflap by default in GNU and friends.
- ;;
- *-*-freebsd*)
- # Enable libmudflap by default in FreeBSD.
- ;;
- *)
- # Disable it by default everywhere else.
- noconfigdirs="$noconfigdirs target-libmudflap"
- ;;
- esac
-fi
-
-# Disable libgomp on non POSIX hosted systems.
+# Enable libgomp by default on hosted POSIX systems, and a few others.
if test x$enable_libgomp = x ; then
- # Enable libgomp by default on hosted POSIX systems.
case "${target}" in
*-*-linux* | *-*-gnu* | *-*-k*bsd*-gnu | *-*-kopensolaris*-gnu)
;;
@@ -501,6 +553,8 @@ if test x$enable_libgomp = x ; then
;;
*-*-darwin* | *-*-aix*)
;;
+ nvptx*-*-*)
+ ;;
*)
noconfigdirs="$noconfigdirs target-libgomp"
;;
@@ -523,6 +577,38 @@ if test -d ${srcdir}/libatomic; then
fi
fi
+# Disable libcilkrts on unsupported systems.
+if test -d ${srcdir}/libcilkrts; then
+ if test x$enable_libcilkrts = x; then
+ AC_MSG_CHECKING([for libcilkrts support])
+ if (srcdir=${srcdir}/libcilkrts; \
+ . ${srcdir}/configure.tgt; \
+ test -n "$UNSUPPORTED")
+ then
+ AC_MSG_RESULT([no])
+ noconfigdirs="$noconfigdirs target-libcilkrts"
+ else
+ AC_MSG_RESULT([yes])
+ fi
+ fi
+fi
+
+# Disable liboffloadmic on unsupported systems.
+if test -d ${srcdir}/liboffloadmic; then
+ if test x$enable_liboffloadmic != xno; then
+ AC_MSG_CHECKING([for liboffloadmic support])
+ if (srcdir=${srcdir}/liboffloadmic; \
+ . ${srcdir}/configure.tgt; \
+ test -n "$UNSUPPORTED")
+ then
+ AC_MSG_RESULT([no])
+ noconfigdirs="$noconfigdirs target-liboffloadmic"
+ else
+ AC_MSG_RESULT([yes])
+ fi
+ fi
+fi
+
# Disable libitm on unsupported systems.
if test -d ${srcdir}/libitm; then
if test x$enable_libitm = x; then
@@ -571,6 +657,25 @@ if test -d ${srcdir}/libvtv; then
fi
fi
+
+# Enable libmpx on supported systems by request.
+if test -d ${srcdir}/libmpx; then
+ if test x$enable_libmpx = x; then
+ AC_MSG_CHECKING([for libmpx support])
+ if (srcdir=${srcdir}/libmpx; \
+ . ${srcdir}/configure.tgt; \
+ test "$LIBMPX_SUPPORTED" != "yes")
+ then
+ AC_MSG_RESULT([no])
+ noconfigdirs="$noconfigdirs target-libmpx"
+ else
+ AC_MSG_RESULT([yes])
+ fi
+ fi
+fi
+
+
+
# Disable libquadmath for some systems.
case "${target}" in
avr-*-*)
@@ -598,6 +703,10 @@ case "${target}" in
# for explicit misaligned loads.
noconfigdirs="$noconfigdirs target-libssp"
;;
+ visium-*-*)
+ # No hosted I/O support.
+ noconfigdirs="$noconfigdirs target-libssp"
+ ;;
esac
# Disable libstdc++-v3 for some systems.
@@ -615,6 +724,9 @@ if test "${ENABLE_LIBSTDCXX}" = "default" ; then
avr-*-*)
noconfigdirs="$noconfigdirs target-libstdc++-v3"
;;
+ ft32-*-*)
+ noconfigdirs="$noconfigdirs target-libstdc++-v3"
+ ;;
esac
fi
@@ -670,8 +782,6 @@ case "${target}" in
;;
sh-*-* | sh[[34]]*-*-*)
;;
- sh64-*-* | sh5*-*-*)
- ;;
sparc*-*-*)
;;
x86_64-*-*)
@@ -710,6 +820,9 @@ case "${target}" in
alpha*-*-*vms*)
noconfigdirs="$noconfigdirs ${libgcj}"
;;
+ arm*-*-freebsd*)
+ noconfigdirs="$noconfigdirs ${libgcj}"
+ ;;
arm-wince-pe)
noconfigdirs="$noconfigdirs ${libgcj}"
;;
@@ -766,9 +879,20 @@ case "${target}" in
rs6000-*-aix*)
noconfigdirs="$noconfigdirs ${libgcj}"
;;
+ ft32-*-*)
+ noconfigdirs="$noconfigdirs ${libgcj}"
+ ;;
*-*-lynxos*)
noconfigdirs="$noconfigdirs ${libgcj}"
- ;;
+ ;;
+esac
+
+# Disable the go frontend on systems where it is known to not work. Please keep
+# this in sync with contrib/config-list.mk.
+case "${target}" in
+*-*-darwin* | *-*-cygwin* | *-*-mingw* | *-*-aix*)
+ unsupported_languages="$unsupported_languages go"
+ ;;
esac
# Disable libgo for some systems where it is known to not work.
@@ -897,6 +1021,14 @@ esac
case "${target}" in
*-*-chorusos)
;;
+ aarch64-*-darwin*)
+ noconfigdirs="$noconfigdirs ld gas gdb gprof"
+ noconfigdirs="$noconfigdirs sim target-rda"
+ ;;
+ arm-*-darwin*)
+ noconfigdirs="$noconfigdirs ld gas gdb gprof"
+ noconfigdirs="$noconfigdirs sim target-rda"
+ ;;
powerpc-*-darwin*)
noconfigdirs="$noconfigdirs ld gas gdb gprof"
noconfigdirs="$noconfigdirs sim target-rda"
@@ -931,6 +1063,10 @@ case "${target}" in
;;
*-*-rtems*)
noconfigdirs="$noconfigdirs target-libgloss"
+ # this is not caught below because this stanza matches earlier
+ case $target in
+ or1k*-*-*) noconfigdirs="$noconfigdirs gdb" ;;
+ esac
;;
# The tpf target doesn't support gdb yet.
*-*-tpf*)
@@ -956,9 +1092,6 @@ case "${target}" in
sh*-*-pe|mips*-*-pe|*arm-wince-pe)
noconfigdirs="$noconfigdirs tcl tk itcl libgui sim"
;;
- arc-*-*)
- noconfigdirs="$noconfigdirs target-libgloss"
- ;;
arm-*-pe*)
noconfigdirs="$noconfigdirs target-libgloss"
;;
@@ -987,8 +1120,11 @@ case "${target}" in
fr30-*-elf*)
noconfigdirs="$noconfigdirs gdb"
;;
+ ft32-*-*)
+ noconfigdirs="$noconfigdirs target-rda gprof"
+ ;;
moxie-*-*)
- noconfigdirs="$noconfigdirs gprof"
+ noconfigdirs="$noconfigdirs"
;;
h8300*-*-*)
noconfigdirs="$noconfigdirs target-libgloss"
@@ -998,6 +1134,12 @@ case "${target}" in
;;
hppa1.1-*-osf* | hppa1.1-*-bsd* )
;;
+ hppa*64*-*-hpux*)
+ noconfigdirs="$noconfigdirs gdb"
+ ;;
+ hppa*-*-hpux11*)
+ noconfigdirs="$noconfigdirs gdb ld"
+ ;;
hppa*64*-*-linux*)
;;
hppa*-*-linux*)
@@ -1007,9 +1149,6 @@ case "${target}" in
hppa*-*-openbsd* | \
hppa*64*-*-*)
;;
- hppa*-hp-hpux11*)
- noconfigdirs="$noconfigdirs ld"
- ;;
hppa*-*-pro*)
;;
hppa*-*-*)
@@ -1024,7 +1163,7 @@ case "${target}" in
;;
ia64*-**-hpux*)
# No ld support yet.
- noconfigdirs="$noconfigdirs libgui itcl ld"
+ noconfigdirs="$noconfigdirs gdb libgui itcl ld"
;;
ia64*-*-*vms*)
# No ld support yet.
@@ -1106,7 +1245,7 @@ case "${target}" in
microblaze*)
noconfigdirs="$noconfigdirs gprof"
;;
- mips*-sde-elf* | mips*-mti-elf*)
+ mips*-sde-elf* | mips*-mti-elf* | mips*-img-elf*)
if test x$with_newlib = xyes; then
noconfigdirs="$noconfigdirs gprof"
fi
@@ -1129,7 +1268,16 @@ case "${target}" in
mips*-*-*)
noconfigdirs="$noconfigdirs gprof"
;;
- sh-*-* | sh64-*-*)
+ nds32*-*-*)
+ noconfigdirs="$noconfigdirs gdb"
+ ;;
+ nvptx*-*-*)
+ noconfigdirs="$noconfigdirs target-libssp target-libstdc++-v3 target-libobjc"
+ ;;
+ or1k*-*-*)
+ noconfigdirs="$noconfigdirs gdb"
+ ;;
+ sh-*-*)
case "${target}" in
sh*-*-elf)
;;
@@ -1145,7 +1293,7 @@ case "${target}" in
tic6x-*-*)
noconfigdirs="$noconfigdirs sim"
;;
- tilepro-*-* | tilegx-*-*)
+ tilepro*-*-* | tilegx*-*-*)
noconfigdirs="$noconfigdirs sim"
;;
v810-*-*)
@@ -1177,6 +1325,9 @@ case "${host}" in
*-mingw*)
host_makefile_frag="config/mh-mingw"
;;
+ alpha*-linux*)
+ host_makefile_frag="config/mh-alpha-linux"
+ ;;
hppa*-hp-hpux10*)
host_makefile_frag="config/mh-pa-hpux10"
;;
@@ -1316,6 +1467,12 @@ case "$have_compiler:$host:$target:$enable_bootstrap" in
;;
esac
+# When bootstrapping with GCC, build stage 1 in C++98 mode to ensure that a
+# C++98 compiler can still start the bootstrap.
+if test "$enable_bootstrap:$GXX" = "yes:yes"; then
+ CXX="$CXX -std=gnu++98"
+fi
+
# Used for setting $lt_cv_objdir
_LT_CHECK_OBJDIR
@@ -1388,16 +1545,9 @@ if test "x$with_mpfr_lib" != x; then
gmplibs="-L$with_mpfr_lib $gmplibs"
fi
if test "x$with_mpfr$with_mpfr_include$with_mpfr_lib" = x && test -d ${srcdir}/mpfr; then
- # MPFR v3.1.0 moved the sources into a src sub-directory.
- if test -d ${srcdir}/mpfr/src; then
- gmplibs='-L$$r/$(HOST_SUBDIR)/mpfr/src/'"$lt_cv_objdir $gmplibs"
- gmpinc='-I$$r/$(HOST_SUBDIR)/mpfr/src -I$$s/mpfr/src '"$gmpinc"
- extra_mpc_mpfr_configure_flags='--with-mpfr-include=$$s/mpfr/src --with-mpfr-lib=$$r/$(HOST_SUBDIR)/mpfr/src/'"$lt_cv_objdir"
- else
- gmplibs='-L$$r/$(HOST_SUBDIR)/mpfr/'"$lt_cv_objdir $gmplibs"
- gmpinc='-I$$r/$(HOST_SUBDIR)/mpfr -I$$s/mpfr '"$gmpinc"
- extra_mpc_mpfr_configure_flags='--with-mpfr-include=$$s/mpfr --with-mpfr-lib=$$r/$(HOST_SUBDIR)/mpfr/'"$lt_cv_objdir"
- fi
+ gmplibs='-L$$r/$(HOST_SUBDIR)/mpfr/src/'"$lt_cv_objdir $gmplibs"
+ gmpinc='-I$$r/$(HOST_SUBDIR)/mpfr/src -I$$s/mpfr/src '"$gmpinc"
+ extra_mpc_mpfr_configure_flags='--with-mpfr-include=$$s/mpfr/src --with-mpfr-lib=$$r/$(HOST_SUBDIR)/mpfr/src/'"$lt_cv_objdir"
# Do not test the mpfr version. Assume that it is sufficient, since
# it is in the source tree, and the library has not been built yet
# but it would be included on the link line in the version check below
@@ -1554,18 +1704,6 @@ AC_SUBST(extra_mpc_gmp_configure_flags)
AC_SUBST(extra_mpc_mpfr_configure_flags)
AC_SUBST(extra_isl_gmp_configure_flags)
-# Allow host libstdc++ to be specified for static linking with PPL.
-AC_ARG_WITH(host-libstdcxx,
-[AS_HELP_STRING([--with-host-libstdcxx=L],
- [use linker arguments L to link with libstdc++
- when linking with PPL])])
-
-case $with_host_libstdcxx in
- no|yes)
- AC_MSG_ERROR([-with-host-libstdcxx needs an argument])
- ;;
-esac
-
# Libraries to use for stage1 or when not bootstrapping.
AC_ARG_WITH(stage1-libs,
[AS_HELP_STRING([--with-stage1-libs=LIBS], [libraries for stage1])],
@@ -1574,7 +1712,7 @@ AC_ARG_WITH(stage1-libs,
else
stage1_libs=$withval
fi],
-[stage1_libs=$with_host_libstdcxx])
+[stage1_libs=])
AC_SUBST(stage1_libs)
# Linker flags to use for stage1 or when not bootstrapping.
@@ -1594,8 +1732,7 @@ AC_ARG_WITH(stage1-ldflags,
fi])
AC_SUBST(stage1_ldflags)
-# Libraries to use for stage2 and later builds. This defaults to the
-# argument passed to --with-host-libstdcxx.
+# Libraries to use for stage2 and later builds.
AC_ARG_WITH(boot-libs,
[AS_HELP_STRING([--with-boot-libs=LIBS], [libraries for stage2 and later])],
[if test "$withval" = "no" -o "$withval" = "yes"; then
@@ -1603,7 +1740,7 @@ AC_ARG_WITH(boot-libs,
else
poststage1_libs=$withval
fi],
-[poststage1_libs=$with_host_libstdcxx])
+[poststage1_libs=])
AC_SUBST(poststage1_libs)
# Linker flags to use for stage2 and later builds.
@@ -1624,73 +1761,39 @@ AC_ARG_WITH(boot-ldflags,
fi])
AC_SUBST(poststage1_ldflags)
-# GCC GRAPHITE dependences, ISL and CLOOG which in turn requires ISL.
-# Basic setup is inlined here, actual checks are in config/cloog.m4 and
-# config/isl.m4
+# GCC GRAPHITE dependency isl.
+# Basic setup is inlined here, actual checks are in config/isl.m4
-AC_ARG_WITH(cloog,
- [AS_HELP_STRING(
- [--with-cloog=PATH],
- [Specify prefix directory for the installed CLooG-ISL package.
- Equivalent to --with-cloog-include=PATH/include
- plus --with-cloog-lib=PATH/lib])])
AC_ARG_WITH(isl,
[AS_HELP_STRING(
[--with-isl=PATH],
- [Specify prefix directory for the installed ISL package.
+ [Specify prefix directory for the installed isl package.
Equivalent to --with-isl-include=PATH/include
plus --with-isl-lib=PATH/lib])])
-# Treat either --without-cloog or --without-isl as a request to disable
+# Treat --without-isl as a request to disable
# GRAPHITE support and skip all following checks.
-if test "x$with_isl" != "xno" &&
- test "x$with_cloog" != "xno"; then
- # Check for ISL
+if test "x$with_isl" != "xno"; then
+ # Check for isl
dnl Provide configure switches and initialize islinc & isllibs
dnl with user input.
ISL_INIT_FLAGS
- dnl The versions of ISL that work for Graphite
- ISL_CHECK_VERSION(0,10)
- if test "${gcc_cv_isl}" = no ; then
- ISL_CHECK_VERSION(0,11)
- fi
- dnl Only execute fail-action, if ISL has been requested.
+ dnl The versions of isl that work for Graphite
+ ISL_CHECK_VERSION()
+ dnl Only execute fail-action, if isl has been requested.
ISL_IF_FAILED([
- AC_MSG_ERROR([Unable to find a usable ISL. See config.log for details.])])
-
- if test "x$gcc_cv_isl" != "xno"; then
- # Check for CLOOG
- dnl Provide configure switches and initialize clooginc & clooglibs
- dnl with user input.
- CLOOG_INIT_FLAGS
- dnl The versions of CLooG that work for Graphite.
- CLOOG_CHECK_VERSION(0,17,0)
- if test "${gcc_cv_cloog}" = no ; then
- CLOOG_CHECK_VERSION(0,18,0)
- fi
-
- dnl Only execute fail-action, if CLooG has been requested.
- CLOOG_IF_FAILED([
- AC_MSG_ERROR([Unable to find a usable CLooG. See config.log for details.])])
- fi
+ AC_MSG_ERROR([Unable to find a usable isl. See config.log for details.])])
fi
-# If either the ISL or the CLooG check failed, disable builds of in-tree
-# variants of both
+# If the isl check failed, disable builds of in-tree variant of isl
if test "x$with_isl" = xno ||
- test "x$with_cloog" = xno ||
- test "x$gcc_cv_cloog" = xno ||
test "x$gcc_cv_isl" = xno; then
- noconfigdirs="$noconfigdirs cloog isl"
+ noconfigdirs="$noconfigdirs isl"
islinc=
- clooginc=
- clooglibs=
fi
+AC_SUBST(isllibs)
AC_SUBST(islinc)
-AC_SUBST(clooglibs)
-AC_SUBST(clooginc)
-
# Check for LTO support.
AC_ARG_ENABLE(lto,
@@ -1702,7 +1805,7 @@ ACX_ELF_TARGET_IFELSE([# ELF platforms build the lto-plugin always.
build_lto_plugin=yes
],[if test x"$default_enable_lto" = x"yes" ; then
case $target in
- *-apple-darwin9* | *-cygwin* | *-mingw*) ;;
+ *-apple-darwin9* | *-cygwin* | *-mingw* | *djgpp*) ;;
# On other non-ELF platforms, LTO has yet to be validated.
*) enable_lto=no ;;
esac
@@ -1713,7 +1816,7 @@ ACX_ELF_TARGET_IFELSE([# ELF platforms build the lto-plugin always.
# warn during gcc/ subconfigure; unless you're bootstrapping with
# -flto it won't be needed until after installation anyway.
case $target in
- *-cygwin* | *-mingw* | *-apple-darwin*) ;;
+ *-cygwin* | *-mingw* | *-apple-darwin* | *djgpp*) ;;
*) if test x"$enable_lto" = x"yes"; then
AC_MSG_ERROR([LTO support is not enabled for this target.])
fi
@@ -1728,6 +1831,19 @@ ACX_ELF_TARGET_IFELSE([# ELF platforms build the lto-plugin always.
esac
])
+AC_ARG_ENABLE(linker-plugin-configure-flags,
+ [AS_HELP_STRING([[--enable-linker-plugin-configure-flags=FLAGS]],
+ [additional flags for configuring linker plugins @<:@none@:>@])],
+ extra_linker_plugin_configure_flags=$enableval,
+ extra_linker_plugin_configure_flags=)
+AC_SUBST(extra_linker_plugin_configure_flags)
+AC_ARG_ENABLE(linker-plugin-flags,
+ [AS_HELP_STRING([[--enable-linker-plugin-flags=FLAGS]],
+ [additional flags for configuring and building linker plugins @<:@none@:>@])],
+ extra_linker_plugin_flags=$enableval,
+ extra_linker_plugin_flags=)
+AC_SUBST(extra_linker_plugin_flags)
+
# By default, C and C++ are the only stage 1 languages.
stage1_languages=,c,
@@ -1744,7 +1860,7 @@ if test -d ${srcdir}/gcc; then
if test x"${enable_languages+set}" != xset; then
if test x"${LANGUAGES+set}" = xset; then
enable_languages="${LANGUAGES}"
- echo configure.in: warning: setting LANGUAGES is deprecated, use --enable-languages instead 1>&2
+ echo configure.ac: warning: setting LANGUAGES is deprecated, use --enable-languages instead 1>&2
else
enable_languages=all
fi
@@ -1752,7 +1868,7 @@ if test -d ${srcdir}/gcc; then
if test x"${enable_languages}" = x ||
test x"${enable_languages}" = xyes;
then
- echo configure.in: --enable-languages needs at least one language argument 1>&2
+ echo configure.ac: --enable-languages needs at least one language argument 1>&2
exit 1
fi
fi
@@ -1762,7 +1878,7 @@ if test -d ${srcdir}/gcc; then
# and make the substitution.
case ,${enable_languages}, in
*,f95,*)
- echo configure.in: warning: 'f95' as language name is deprecated, use 'fortran' instead 1>&2
+ echo configure.ac: warning: 'f95' as language name is deprecated, use 'fortran' instead 1>&2
enable_languages=`echo "${enable_languages}" | sed -e 's/f95/fortran/g'`
;;
esac
@@ -1828,7 +1944,6 @@ if test -d ${srcdir}/gcc; then
new_enable_languages=,c,
# If LTO is enabled, add the LTO front end.
- extra_host_libiberty_configure_flags=
if test "$enable_lto" = "yes" ; then
case ,${enable_languages}, in
*,lto,*) ;;
@@ -1836,10 +1951,16 @@ if test -d ${srcdir}/gcc; then
esac
if test "${build_lto_plugin}" = "yes" ; then
configdirs="$configdirs lto-plugin"
- extra_host_libiberty_configure_flags=--enable-shared
fi
fi
- AC_SUBST(extra_host_libiberty_configure_flags)
+
+ # If we're building an offloading compiler, add the LTO front end.
+ if test x"$enable_as_accelerator_for" != x ; then
+ case ,${enable_languages}, in
+ *,lto,*) ;;
+ *) enable_languages="${enable_languages},lto" ;;
+ esac
+ fi
missing_languages=`echo ",$enable_languages," | sed -e s/,all,/,/ -e s/,c,/,/ `
potential_languages=,c,
@@ -2054,11 +2175,19 @@ case ,${enable_languages},:${enable_objc_gc} in
;;
esac
-# Disable libitm, libsanitizer, libvtv if we're not building C++
+# Disable libcilkrts, libitm, libsanitizer, libvtv, liboffloadmic if we're not building C++
case ,${enable_languages}, in
- *,c++,*) ;;
+ *,c++,*)
+ # Disable libcilkrts, libitm, libsanitizer if we're not building libstdc++
+ case "${noconfigdirs}" in
+ *target-libstdc++-v3*)
+ noconfigdirs="$noconfigdirs target-libcilkrts target-libitm target-libsanitizer"
+ ;;
+ *) ;;
+ esac
+ ;;
*)
- noconfigdirs="$noconfigdirs target-libitm target-libsanitizer target-libvtv"
+ noconfigdirs="$noconfigdirs target-libcilkrts target-liboffloadmic target-libitm target-libsanitizer target-libvtv"
;;
esac
@@ -2130,6 +2259,50 @@ for i in ${target_configdirs_all} ; do
fi
done
+# Exclude target-zlib if target-libjava isn't built.
+case ${target_configdirs} in
+*target-libjava*)
+ ;;
+*)
+ target_configdirs="`echo ${target_configdirs} | sed -e 's/target-zlib//'`"
+ ;;
+esac
+
+# libiberty-linker-plugin is special: it doesn't have its own source directory,
+# so we have to add it after the preceding checks.
+if test x"$extra_linker_plugin_flags$extra_linker_plugin_configure_flags" != x
+then
+ case " $configdirs " in
+ *" libiberty "*)
+ # If we can build libiberty, we can also build libiberty-linker-plugin.
+ configdirs="$configdirs libiberty-linker-plugin"
+ extra_linker_plugin_configure_flags="$extra_linker_plugin_configure_flags \
+ --with-libiberty=../libiberty-linker-plugin";;
+ *)
+ AC_MSG_ERROR([libiberty missing]);;
+ esac
+fi
+
+# Sometimes we have special requirements for the host libiberty.
+extra_host_libiberty_configure_flags=
+extra_host_zlib_configure_flags=
+case " $configdirs " in
+ *" lto-plugin "* | *" libcc1 "*)
+ # When these are to be built as shared libraries, the same applies to
+ # libiberty.
+ extra_host_libiberty_configure_flags=--enable-shared
+ ;;
+ *" bfd "*)
+ # When bfd is to be built as a shared library, the same applies to
+ # zlib.
+ if test "$enable_shared" = "yes"; then
+ extra_host_zlib_configure_flags=--enable-host-shared
+ fi
+ ;;
+esac
+AC_SUBST(extra_host_libiberty_configure_flags)
+AC_SUBST(extra_host_zlib_configure_flags)
+
# Produce a warning message for the subdirs we can't configure.
# This isn't especially interesting in the Cygnus tree, but in the individual
# FSF releases, it's important to let people know when their machine isn't
@@ -2203,28 +2376,36 @@ AC_SUBST(DEBUG_PREFIX_CFLAGS_FOR_TARGET)
# gcc) are built with "-O2 -g", so include those options when setting
# CFLAGS_FOR_TARGET and CXXFLAGS_FOR_TARGET.
if test "x$CFLAGS_FOR_TARGET" = x; then
- CFLAGS_FOR_TARGET=$CFLAGS
- case " $CFLAGS " in
- *" -O2 "*) ;;
- *) CFLAGS_FOR_TARGET="-O2 $CFLAGS_FOR_TARGET" ;;
- esac
- case " $CFLAGS " in
- *" -g "* | *" -g3 "*) ;;
- *) CFLAGS_FOR_TARGET="-g $CFLAGS_FOR_TARGET" ;;
- esac
+ if test "x${is_cross_compiler}" = xyes; then
+ CFLAGS_FOR_TARGET="-g -O2"
+ else
+ CFLAGS_FOR_TARGET=$CFLAGS
+ case " $CFLAGS " in
+ *" -O2 "*) ;;
+ *) CFLAGS_FOR_TARGET="-O2 $CFLAGS_FOR_TARGET" ;;
+ esac
+ case " $CFLAGS " in
+ *" -g "* | *" -g3 "*) ;;
+ *) CFLAGS_FOR_TARGET="-g $CFLAGS_FOR_TARGET" ;;
+ esac
+ fi
fi
AC_SUBST(CFLAGS_FOR_TARGET)
if test "x$CXXFLAGS_FOR_TARGET" = x; then
- CXXFLAGS_FOR_TARGET=$CXXFLAGS
- case " $CXXFLAGS " in
- *" -O2 "*) ;;
- *) CXXFLAGS_FOR_TARGET="-O2 $CXXFLAGS_FOR_TARGET" ;;
- esac
- case " $CXXFLAGS " in
- *" -g "* | *" -g3 "*) ;;
- *) CXXFLAGS_FOR_TARGET="-g $CXXFLAGS_FOR_TARGET" ;;
- esac
+ if test "x${is_cross_compiler}" = xyes; then
+ CXXFLAGS_FOR_TARGET="-g -O2"
+ else
+ CXXFLAGS_FOR_TARGET=$CXXFLAGS
+ case " $CXXFLAGS " in
+ *" -O2 "*) ;;
+ *) CXXFLAGS_FOR_TARGET="-O2 $CXXFLAGS_FOR_TARGET" ;;
+ esac
+ case " $CXXFLAGS " in
+ *" -g "* | *" -g3 "*) ;;
+ *) CXXFLAGS_FOR_TARGET="-g $CXXFLAGS_FOR_TARGET" ;;
+ esac
+ fi
fi
AC_SUBST(CXXFLAGS_FOR_TARGET)
@@ -2268,7 +2449,7 @@ fi
# have requested that this magic not happen.
#
# The command line options always override the explicit settings in
-# configure.in, and the settings in configure.in override this magic.
+# configure.ac, and the settings in configure.ac override this magic.
#
# If the default for a toolchain is to use GNU as and ld, and you don't
# want to do that, then you should use the --without-gnu-as and
@@ -2358,7 +2539,7 @@ case "${target}" in
spu-*-*)
target_makefile_frag="config/mt-spu"
;;
- mips*-sde-elf* | mips*-mti-elf*)
+ mips*-sde-elf* | mips*-mti-elf* | mips*-img-elf*)
target_makefile_frag="config/mt-sde"
;;
mipsisa*-*-elfoabi*)
@@ -2367,6 +2548,9 @@ case "${target}" in
mips*-*-*linux* | mips*-*-gnu*)
target_makefile_frag="config/mt-mips-gnu"
;;
+ nios2-*-elf*)
+ target_makefile_frag="config/mt-nios2-elf"
+ ;;
*-*-linux* | *-*-gnu* | *-*-k*bsd*-gnu | *-*-kopensolaris*-gnu)
target_makefile_frag="config/mt-gnu"
;;
@@ -2399,7 +2583,7 @@ case "${enable_target_optspace}:${target}" in
:d30v-*)
ospace_frag="config/mt-d30v"
;;
- :m32r-* | :d10v-* | :fr30-*)
+ :m32r-* | :d10v-* | :fr30-* | :i?86*-*-elfiamcu)
ospace_frag="config/mt-ospace"
;;
no:* | :*)
@@ -2469,26 +2653,96 @@ else
GCC_SHLIB_SUBDIR=
fi
+# Adjust the toplevel makefile according to whether bootstrap was selected.
+case $enable_bootstrap in
+ yes)
+ bootstrap_suffix=bootstrap
+ BUILD_CONFIG=bootstrap-debug
+ ;;
+ no)
+ bootstrap_suffix=no-bootstrap
+ BUILD_CONFIG=
+ ;;
+esac
+
+AC_MSG_CHECKING(for default BUILD_CONFIG)
+
+AC_ARG_WITH([build-config],
+ [AS_HELP_STRING([--with-build-config='NAME NAME2...'],
+ [use config/NAME.mk build configuration])],
+ [case $with_build_config in
+ yes) with_build_config= ;;
+ no) with_build_config= BUILD_CONFIG= ;;
+ esac])
+
+if test "x${with_build_config}" != x; then
+ BUILD_CONFIG=$with_build_config
+else
+ case $BUILD_CONFIG in
+ bootstrap-debug)
+ if echo "int f (void) { return 0; }" > conftest.c &&
+ ${CC} -c conftest.c &&
+ mv conftest.o conftest.o.g0 &&
+ ${CC} -c -g conftest.c &&
+ mv conftest.o conftest.o.g &&
+ ${srcdir}/contrib/compare-debug conftest.o.g0 conftest.o.g > /dev/null 2>&1; then
+ :
+ else
+ BUILD_CONFIG=
+ fi
+ rm -f conftest.c conftest.o conftest.o.g0 conftest.o.g
+ ;;
+ esac
+fi
+AC_MSG_RESULT($BUILD_CONFIG)
+AC_SUBST(BUILD_CONFIG)
+
+# Use same top-level configure hooks in libgcc/libstdc++/libvtv.
+AC_MSG_CHECKING([for --enable-vtable-verify])
+AC_ARG_ENABLE(vtable-verify,
+[AS_HELP_STRING([--enable-vtable-verify],
+ [Enable vtable verification feature])],
+[case "$enableval" in
+ yes) enable_vtable_verify=yes ;;
+ no) enable_vtable_verify=no ;;
+ *) enable_vtable_verify=no;;
+ esac],
+[enable_vtable_verify=no])
+AC_MSG_RESULT($enable_vtable_verify)
+
# Record target_configdirs and the configure arguments for target and
# build configuration in Makefile.
target_configdirs=`echo "${target_configdirs}" | sed -e 's/target-//g'`
build_configdirs=`echo "${build_configdirs}" | sed -e 's/build-//g'`
+bootstrap_fixincludes=no
# If we are building libgomp, bootstrap it.
if echo " ${target_configdirs} " | grep " libgomp " > /dev/null 2>&1 ; then
bootstrap_target_libs=${bootstrap_target_libs}target-libgomp,
fi
-# If we are building libsanitizer, bootstrap it.
-if echo " ${target_configdirs} " | grep " libsanitizer " > /dev/null 2>&1 ; then
- bootstrap_target_libs=${bootstrap_target_libs}target-libsanitizer,
+# If we are building libsanitizer and $BUILD_CONFIG contains bootstrap-asan
+# or bootstrap-ubsan, bootstrap it.
+if echo " ${target_configdirs} " | grep " libsanitizer " > /dev/null 2>&1; then
+ case "$BUILD_CONFIG" in
+ *bootstrap-asan* | *bootstrap-ubsan* )
+ bootstrap_target_libs=${bootstrap_target_libs}target-libsanitizer,
+ bootstrap_fixincludes=yes
+ ;;
+ esac
fi
-# If we are building libvtv, bootstrap it.
-if echo " ${target_configdirs} " | grep " libvtv " > /dev/null 2>&1 ; then
+# If we are building libvtv and --enable-vtable-verify, bootstrap it.
+if echo " ${target_configdirs} " | grep " libvtv " > /dev/null 2>&1 &&
+ test "$enable_vtable_verify" != no; then
bootstrap_target_libs=${bootstrap_target_libs}target-libvtv,
fi
+# If we are building libmpx, bootstrap it.
+if echo " ${target_configdirs} " | grep " libmpx " > /dev/null 2>&1; then
+ bootstrap_target_libs=${bootstrap_target_libs}target-libmpx,
+fi
+
# Determine whether gdb needs tk/tcl or not.
# Use 'maybe' since enable_gdbtk might be true even if tk isn't available
# and in that case we want gdb to be built without tk. Ugh!
@@ -2538,50 +2792,6 @@ case "$enable_bootstrap:$ENABLE_GOLD: $configdirs :,$stage1_languages," in
;;
esac
-# Adjust the toplevel makefile according to whether bootstrap was selected.
-case $enable_bootstrap in
- yes)
- bootstrap_suffix=bootstrap
- BUILD_CONFIG=bootstrap-debug
- ;;
- no)
- bootstrap_suffix=no-bootstrap
- BUILD_CONFIG=
- ;;
-esac
-
-AC_MSG_CHECKING(for default BUILD_CONFIG)
-
-AC_ARG_WITH([build-config],
- [AS_HELP_STRING([--with-build-config='NAME NAME2...'],
- [use config/NAME.mk build configuration])],
- [case $with_build_config in
- yes) with_build_config= ;;
- no) with_build_config= BUILD_CONFIG= ;;
- esac])
-
-if test "x${with_build_config}" != x; then
- BUILD_CONFIG=$with_build_config
-else
- case $BUILD_CONFIG in
- bootstrap-debug)
- if echo "int f (void) { return 0; }" > conftest.c &&
- ${CC} -c conftest.c &&
- mv conftest.o conftest.o.g0 &&
- ${CC} -c -g conftest.c &&
- mv conftest.o conftest.o.g &&
- ${srcdir}/contrib/compare-debug conftest.o.g0 conftest.o.g > /dev/null 2>&1; then
- :
- else
- BUILD_CONFIG=
- fi
- rm -f conftest.c conftest.o conftest.o.g0 conftest.o.g
- ;;
- esac
-fi
-AC_MSG_RESULT($BUILD_CONFIG)
-AC_SUBST(BUILD_CONFIG)
-
extrasub_build=
for module in ${build_configdirs} ; do
if test -z "${no_recursion}" \
@@ -2605,11 +2815,15 @@ for module in ${configdirs} ; do
fi
done
fi
+ case ${module},${bootstrap_fixincludes} in
+ fixincludes,no) host_bootstrap_suffix=no-bootstrap ;;
+ *) host_bootstrap_suffix=$bootstrap_suffix ;;
+ esac
extrasub_host="$extrasub_host
/^@if $module\$/d
/^@endif $module\$/d
-/^@if $module-$bootstrap_suffix\$/d
-/^@endif $module-$bootstrap_suffix\$/d"
+/^@if $module-$host_bootstrap_suffix\$/d
+/^@endif $module-$host_bootstrap_suffix\$/d"
done
extrasub_target=
for module in ${target_configdirs} ; do
@@ -2752,7 +2966,7 @@ changequote(,)
changequote([,])
case $lib in
- mpc | mpfr | gmp | cloog)
+ mpc | mpfr | gmp | isl)
# If we're processing --with-$lib, --with-$lib-include or
# --with-$lib-lib, for one of the libs above, and target is
# different from host, don't pass the current argument to any
@@ -2848,8 +3062,10 @@ AC_ARG_VAR([target_configargs],
# For the build-side libraries, we just need to pretend we're native,
# and not use the same cache file. Multilibs are neither needed nor
-# desired.
-build_configargs="$build_configargs --cache-file=../config.cache ${baseargs}"
+# desired. We can't even use the same cache file for all build-side
+# libraries, as they're compiled differently; some with C, some with
+# C++ or with different feature-enabling options.
+build_configargs="$build_configargs --cache-file=./config.cache ${baseargs}"
# For host modules, accept cache file option, or specification as blank.
case "${cache_file}" in
@@ -2876,6 +3092,26 @@ if test x${is_cross_compiler} = xyes ; then
target_configargs="--with-cross-host=${host_noncanonical} ${target_configargs}"
fi
+# Special user-friendly check for native x86_64-linux build, if
+# multilib is not explicitly enabled.
+case "$target:$have_compiler:$host:$target:$enable_multilib" in
+ x86_64-*linux*:yes:$build:$build:)
+ # Make sure we have a development environment that handles 32-bit
+ dev64=no
+ echo "int main () { return 0; }" > conftest.c
+ ${CC} -m32 -o conftest ${CFLAGS} ${CPPFLAGS} ${LDFLAGS} conftest.c
+ if test $? = 0 ; then
+ if test -s conftest || test -s conftest.exe ; then
+ dev64=yes
+ fi
+ fi
+ rm -f conftest*
+ if test x${dev64} != xyes ; then
+ AC_MSG_ERROR([I suspect your system does not have 32-bit development libraries (libc and headers). If you have them, rerun configure with --enable-multilib. If you do not have them, and want to build a 64-bit-only compiler, rerun configure with --disable-multilib.])
+ fi
+ ;;
+esac
+
# Default to --enable-multilib.
if test x${enable_multilib} = x ; then
target_configargs="--enable-multilib ${target_configargs}"
@@ -3171,6 +3407,7 @@ ACX_CHECK_INSTALLED_TARGET_TOOL(DLLTOOL_FOR_TARGET, dlltool)
ACX_CHECK_INSTALLED_TARGET_TOOL(LD_FOR_TARGET, ld)
ACX_CHECK_INSTALLED_TARGET_TOOL(LIPO_FOR_TARGET, lipo)
ACX_CHECK_INSTALLED_TARGET_TOOL(NM_FOR_TARGET, nm)
+ACX_CHECK_INSTALLED_TARGET_TOOL(OBJCOPY_FOR_TARGET, objcopy)
ACX_CHECK_INSTALLED_TARGET_TOOL(OBJDUMP_FOR_TARGET, objdump)
ACX_CHECK_INSTALLED_TARGET_TOOL(RANLIB_FOR_TARGET, ranlib)
ACX_CHECK_INSTALLED_TARGET_TOOL(READELF_FOR_TARGET, readelf)
@@ -3201,6 +3438,7 @@ GCC_TARGET_TOOL(gccgo, GOC_FOR_TARGET, GOC,
GCC_TARGET_TOOL(ld, LD_FOR_TARGET, LD, [ld/ld-new])
GCC_TARGET_TOOL(lipo, LIPO_FOR_TARGET, LIPO)
GCC_TARGET_TOOL(nm, NM_FOR_TARGET, NM, [binutils/nm-new])
+GCC_TARGET_TOOL(objcopy, OBJCOPY_FOR_TARGET, OBJCOPY, [binutils/objcopy])
GCC_TARGET_TOOL(objdump, OBJDUMP_FOR_TARGET, OBJDUMP, [binutils/objdump])
GCC_TARGET_TOOL(ranlib, RANLIB_FOR_TARGET, RANLIB, [binutils/ranlib])
GCC_TARGET_TOOL(readelf, READELF_FOR_TARGET, READELF, [binutils/readelf])
@@ -3277,7 +3515,20 @@ AC_ARG_ENABLE(stage1-checking,
[choose additional checking for stage1 of the compiler])],
[stage1_checking=--enable-checking=${enable_stage1_checking}],
[if test "x$enable_checking" = xno || test "x$enable_checking" = x; then
- stage1_checking=--enable-checking=yes,types
+ # For --disable-checking or implicit --enable-checking=release, avoid
+ # setting --enable-checking=gc in the default stage1 checking for LTO
+ # bootstraps. See PR62077.
+ case $BUILD_CONFIG in
+ *lto*)
+ stage1_checking=--enable-checking=release,misc,gimple,rtlflag,tree,types;;
+ *)
+ stage1_checking=--enable-checking=yes,types;;
+ esac
+ if test "x$enable_checking" = x && \
+ test -d ${srcdir}/gcc && \
+ test x"`cat ${srcdir}/gcc/DEV-PHASE`" = xexperimental; then
+ stage1_checking=--enable-checking=yes,types,extra
+ fi
else
stage1_checking=--enable-checking=$enable_checking,types
fi])
@@ -3298,6 +3549,37 @@ case ${enable_werror} in
esac
AC_SUBST(stage2_werror_flag)
+# Enable --enable-host-shared.
+AC_ARG_ENABLE(host-shared,
+[AS_HELP_STRING([--enable-host-shared],
+ [build host code as shared libraries])],
+[host_shared=$enableval], [host_shared=no])
+AC_SUBST(host_shared)
+
+# PR jit/64780: Require the user to explicitly specify
+# --enable-host-shared if the jit is enabled, hinting
+# that they might want to do a separate configure/build of
+# the jit, to avoid users from slowing down the rest of the
+# compiler by enabling the jit.
+if test ${host_shared} = "no" ; then
+ case "${enable_languages}" in
+ *jit*)
+ AC_MSG_ERROR([
+Enabling language "jit" requires --enable-host-shared.
+
+--enable-host-shared typically slows the rest of the compiler down by
+a few %, so you must explicitly enable it.
+
+If you want to build both the jit and the regular compiler, it is often
+best to do this via two separate configure/builds, in separate
+directories, to avoid imposing the performance cost of
+--enable-host-shared on the regular compiler.])
+ ;;
+ *)
+ ;;
+ esac
+fi
+
# Specify what files to not compare during bootstrap.
compare_exclusions="gcc/cc*-checksum\$(objext) | gcc/ada/*tools/*"
diff --git a/depcomp b/depcomp
index df8eea7e4..4e70ff0bb 100755
--- a/depcomp
+++ b/depcomp
@@ -1,10 +1,9 @@
#! /bin/sh
# depcomp - compile a program generating dependencies as side-effects
-scriptversion=2009-04-28.21; # UTC
+scriptversion=2013-05-30.07; # UTC
-# Copyright (C) 1999, 2000, 2003, 2004, 2005, 2006, 2007, 2009 Free
-# Software Foundation, Inc.
+# Copyright (C) 1999-2014 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -28,9 +27,9 @@ scriptversion=2009-04-28.21; # UTC
case $1 in
'')
- echo "$0: No command. Try \`$0 --help' for more information." 1>&2
- exit 1;
- ;;
+ echo "$0: No command. Try '$0 --help' for more information." 1>&2
+ exit 1;
+ ;;
-h | --h*)
cat <<\EOF
Usage: depcomp [--help] [--version] PROGRAM [ARGS]
@@ -40,11 +39,11 @@ as side-effects.
Environment variables:
depmode Dependency tracking mode.
- source Source file read by `PROGRAMS ARGS'.
- object Object file output by `PROGRAMS ARGS'.
+ source Source file read by 'PROGRAMS ARGS'.
+ object Object file output by 'PROGRAMS ARGS'.
DEPDIR directory where to store dependencies.
depfile Dependency file to output.
- tmpdepfile Temporary file to use when outputing dependencies.
+ tmpdepfile Temporary file to use when outputting dependencies.
libtool Whether libtool is used (yes/no).
Report bugs to <bug-automake@gnu.org>.
@@ -57,6 +56,66 @@ EOF
;;
esac
+# Get the directory component of the given path, and save it in the
+# global variables '$dir'. Note that this directory component will
+# be either empty or ending with a '/' character. This is deliberate.
+set_dir_from ()
+{
+ case $1 in
+ */*) dir=`echo "$1" | sed -e 's|/[^/]*$|/|'`;;
+ *) dir=;;
+ esac
+}
+
+# Get the suffix-stripped basename of the given path, and save it the
+# global variable '$base'.
+set_base_from ()
+{
+ base=`echo "$1" | sed -e 's|^.*/||' -e 's/\.[^.]*$//'`
+}
+
+# If no dependency file was actually created by the compiler invocation,
+# we still have to create a dummy depfile, to avoid errors with the
+# Makefile "include basename.Plo" scheme.
+make_dummy_depfile ()
+{
+ echo "#dummy" > "$depfile"
+}
+
+# Factor out some common post-processing of the generated depfile.
+# Requires the auxiliary global variable '$tmpdepfile' to be set.
+aix_post_process_depfile ()
+{
+ # If the compiler actually managed to produce a dependency file,
+ # post-process it.
+ if test -f "$tmpdepfile"; then
+ # Each line is of the form 'foo.o: dependency.h'.
+ # Do two passes, one to just change these to
+ # $object: dependency.h
+ # and one to simply output
+ # dependency.h:
+ # which is needed to avoid the deleted-header problem.
+ { sed -e "s,^.*\.[$lower]*:,$object:," < "$tmpdepfile"
+ sed -e "s,^.*\.[$lower]*:[$tab ]*,," -e 's,$,:,' < "$tmpdepfile"
+ } > "$depfile"
+ rm -f "$tmpdepfile"
+ else
+ make_dummy_depfile
+ fi
+}
+
+# A tabulation character.
+tab=' '
+# A newline character.
+nl='
+'
+# Character ranges might be problematic outside the C locale.
+# These definitions help.
+upper=ABCDEFGHIJKLMNOPQRSTUVWXYZ
+lower=abcdefghijklmnopqrstuvwxyz
+digits=0123456789
+alpha=${upper}${lower}
+
if test -z "$depmode" || test -z "$source" || test -z "$object"; then
echo "depcomp: Variables source, object and depmode must be set" 1>&2
exit 1
@@ -69,6 +128,9 @@ tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`}
rm -f "$tmpdepfile"
+# Avoid interferences from the environment.
+gccflag= dashmflag=
+
# Some modes work just like other modes, but use different flags. We
# parameterize here, but still list the modes in the big case below,
# to make depend.m4 easier to write. Note that we *cannot* use a case
@@ -80,18 +142,32 @@ if test "$depmode" = hp; then
fi
if test "$depmode" = dashXmstdout; then
- # This is just like dashmstdout with a different argument.
- dashmflag=-xM
- depmode=dashmstdout
+ # This is just like dashmstdout with a different argument.
+ dashmflag=-xM
+ depmode=dashmstdout
fi
cygpath_u="cygpath -u -f -"
if test "$depmode" = msvcmsys; then
- # This is just like msvisualcpp but w/o cygpath translation.
- # Just convert the backslash-escaped backslashes to single forward
- # slashes to satisfy depend.m4
- cygpath_u="sed s,\\\\\\\\,/,g"
- depmode=msvisualcpp
+ # This is just like msvisualcpp but w/o cygpath translation.
+ # Just convert the backslash-escaped backslashes to single forward
+ # slashes to satisfy depend.m4
+ cygpath_u='sed s,\\\\,/,g'
+ depmode=msvisualcpp
+fi
+
+if test "$depmode" = msvc7msys; then
+ # This is just like msvc7 but w/o cygpath translation.
+ # Just convert the backslash-escaped backslashes to single forward
+ # slashes to satisfy depend.m4
+ cygpath_u='sed s,\\\\,/,g'
+ depmode=msvc7
+fi
+
+if test "$depmode" = xlc; then
+ # IBM C/C++ Compilers xlc/xlC can output gcc-like dependency information.
+ gccflag=-qmakedep=gcc,-MF
+ depmode=gcc
fi
case "$depmode" in
@@ -114,8 +190,7 @@ gcc3)
done
"$@"
stat=$?
- if test $stat -eq 0; then :
- else
+ if test $stat -ne 0; then
rm -f "$tmpdepfile"
exit $stat
fi
@@ -123,13 +198,17 @@ gcc3)
;;
gcc)
+## Note that this doesn't just cater to obsosete pre-3.x GCC compilers.
+## but also to in-use compilers like IMB xlc/xlC and the HP C compiler.
+## (see the conditional assignment to $gccflag above).
## There are various ways to get dependency output from gcc. Here's
## why we pick this rather obscure method:
## - Don't want to use -MD because we'd like the dependencies to end
## up in a subdir. Having to rename by hand is ugly.
## (We might end up doing this anyway to support other compilers.)
## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like
-## -MM, not -M (despite what the docs say).
+## -MM, not -M (despite what the docs say). Also, it might not be
+## supported by the other compilers which use the 'gcc' depmode.
## - Using -M directly means running the compiler twice (even worse
## than renaming).
if test -z "$gccflag"; then
@@ -137,31 +216,31 @@ gcc)
fi
"$@" -Wp,"$gccflag$tmpdepfile"
stat=$?
- if test $stat -eq 0; then :
- else
+ if test $stat -ne 0; then
rm -f "$tmpdepfile"
exit $stat
fi
rm -f "$depfile"
echo "$object : \\" > "$depfile"
- alpha=ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz
-## The second -e expression handles DOS-style file names with drive letters.
+ # The second -e expression handles DOS-style file names with drive
+ # letters.
sed -e 's/^[^:]*: / /' \
-e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile"
-## This next piece of magic avoids the `deleted header file' problem.
+## This next piece of magic avoids the "deleted header file" problem.
## The problem is that when a header file which appears in a .P file
## is deleted, the dependency causes make to die (because there is
## typically no way to rebuild the header). We avoid this by adding
## dummy dependencies for each header file. Too bad gcc doesn't do
## this for us directly.
- tr ' ' '
-' < "$tmpdepfile" |
-## Some versions of gcc put a space before the `:'. On the theory
+## Some versions of gcc put a space before the ':'. On the theory
## that the space means something, we add a space to the output as
-## well.
+## well. hp depmode also adds that space, but also prefixes the VPATH
+## to the object. Take care to not repeat it in the output.
## Some versions of the HPUX 10.20 sed can't process this invocation
## correctly. Breaking it into two sed invocations is a workaround.
- sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
+ tr ' ' "$nl" < "$tmpdepfile" \
+ | sed -e 's/^\\$//' -e '/^$/d' -e "s|.*$object$||" -e '/:$/d' \
+ | sed -e 's/$/ :/' >> "$depfile"
rm -f "$tmpdepfile"
;;
@@ -172,59 +251,21 @@ hp)
exit 1
;;
-sgi)
- if test "$libtool" = yes; then
- "$@" "-Wp,-MDupdate,$tmpdepfile"
- else
- "$@" -MDupdate "$tmpdepfile"
- fi
- stat=$?
- if test $stat -eq 0; then :
- else
- rm -f "$tmpdepfile"
- exit $stat
- fi
- rm -f "$depfile"
-
- if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files
- echo "$object : \\" > "$depfile"
-
- # Clip off the initial element (the dependent). Don't try to be
- # clever and replace this with sed code, as IRIX sed won't handle
- # lines with more than a fixed number of characters (4096 in
- # IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines;
- # the IRIX cc adds comments like `#:fec' to the end of the
- # dependency line.
- tr ' ' '
-' < "$tmpdepfile" \
- | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \
- tr '
-' ' ' >> "$depfile"
- echo >> "$depfile"
-
- # The second pass generates a dummy entry for each header file.
- tr ' ' '
-' < "$tmpdepfile" \
- | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \
- >> "$depfile"
- else
- # The sourcefile does not contain any dependencies, so just
- # store a dummy comment line, to avoid errors with the Makefile
- # "include basename.Plo" scheme.
- echo "#dummy" > "$depfile"
- fi
- rm -f "$tmpdepfile"
+xlc)
+ # This case exists only to let depend.m4 do its work. It works by
+ # looking at the text of this script. This case will never be run,
+ # since it is checked for above.
+ exit 1
;;
aix)
# The C for AIX Compiler uses -M and outputs the dependencies
# in a .u file. In older versions, this file always lives in the
- # current directory. Also, the AIX compiler puts `$object:' at the
+ # current directory. Also, the AIX compiler puts '$object:' at the
# start of each line; $object doesn't have directory information.
# Version 6 uses the directory in both cases.
- dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
- test "x$dir" = "x$object" && dir=
- base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
+ set_dir_from "$object"
+ set_base_from "$object"
if test "$libtool" = yes; then
tmpdepfile1=$dir$base.u
tmpdepfile2=$base.u
@@ -237,9 +278,7 @@ aix)
"$@" -M
fi
stat=$?
-
- if test $stat -eq 0; then :
- else
+ if test $stat -ne 0; then
rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
exit $stat
fi
@@ -248,44 +287,100 @@ aix)
do
test -f "$tmpdepfile" && break
done
- if test -f "$tmpdepfile"; then
- # Each line is of the form `foo.o: dependent.h'.
- # Do two passes, one to just change these to
- # `$object: dependent.h' and one to simply `dependent.h:'.
- sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile"
- # That's a tab and a space in the [].
- sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile"
- else
- # The sourcefile does not contain any dependencies, so just
- # store a dummy comment line, to avoid errors with the Makefile
- # "include basename.Plo" scheme.
- echo "#dummy" > "$depfile"
+ aix_post_process_depfile
+ ;;
+
+tcc)
+ # tcc (Tiny C Compiler) understand '-MD -MF file' since version 0.9.26
+ # FIXME: That version still under development at the moment of writing.
+ # Make that this statement remains true also for stable, released
+ # versions.
+ # It will wrap lines (doesn't matter whether long or short) with a
+ # trailing '\', as in:
+ #
+ # foo.o : \
+ # foo.c \
+ # foo.h \
+ #
+ # It will put a trailing '\' even on the last line, and will use leading
+ # spaces rather than leading tabs (at least since its commit 0394caf7
+ # "Emit spaces for -MD").
+ "$@" -MD -MF "$tmpdepfile"
+ stat=$?
+ if test $stat -ne 0; then
+ rm -f "$tmpdepfile"
+ exit $stat
fi
+ rm -f "$depfile"
+ # Each non-empty line is of the form 'foo.o : \' or ' dep.h \'.
+ # We have to change lines of the first kind to '$object: \'.
+ sed -e "s|.*:|$object :|" < "$tmpdepfile" > "$depfile"
+ # And for each line of the second kind, we have to emit a 'dep.h:'
+ # dummy dependency, to avoid the deleted-header problem.
+ sed -n -e 's|^ *\(.*\) *\\$|\1:|p' < "$tmpdepfile" >> "$depfile"
rm -f "$tmpdepfile"
;;
-icc)
- # Intel's C compiler understands `-MD -MF file'. However on
- # icc -MD -MF foo.d -c -o sub/foo.o sub/foo.c
- # ICC 7.0 will fill foo.d with something like
- # foo.o: sub/foo.c
- # foo.o: sub/foo.h
- # which is wrong. We want:
- # sub/foo.o: sub/foo.c
- # sub/foo.o: sub/foo.h
- # sub/foo.c:
- # sub/foo.h:
- # ICC 7.1 will output
+## The order of this option in the case statement is important, since the
+## shell code in configure will try each of these formats in the order
+## listed in this file. A plain '-MD' option would be understood by many
+## compilers, so we must ensure this comes after the gcc and icc options.
+pgcc)
+ # Portland's C compiler understands '-MD'.
+ # Will always output deps to 'file.d' where file is the root name of the
+ # source file under compilation, even if file resides in a subdirectory.
+ # The object file name does not affect the name of the '.d' file.
+ # pgcc 10.2 will output
# foo.o: sub/foo.c sub/foo.h
- # and will wrap long lines using \ :
+ # and will wrap long lines using '\' :
# foo.o: sub/foo.c ... \
# sub/foo.h ... \
# ...
+ set_dir_from "$object"
+ # Use the source, not the object, to determine the base name, since
+ # that's sadly what pgcc will do too.
+ set_base_from "$source"
+ tmpdepfile=$base.d
+
+ # For projects that build the same source file twice into different object
+ # files, the pgcc approach of using the *source* file root name can cause
+ # problems in parallel builds. Use a locking strategy to avoid stomping on
+ # the same $tmpdepfile.
+ lockdir=$base.d-lock
+ trap "
+ echo '$0: caught signal, cleaning up...' >&2
+ rmdir '$lockdir'
+ exit 1
+ " 1 2 13 15
+ numtries=100
+ i=$numtries
+ while test $i -gt 0; do
+ # mkdir is a portable test-and-set.
+ if mkdir "$lockdir" 2>/dev/null; then
+ # This process acquired the lock.
+ "$@" -MD
+ stat=$?
+ # Release the lock.
+ rmdir "$lockdir"
+ break
+ else
+ # If the lock is being held by a different process, wait
+ # until the winning process is done or we timeout.
+ while test -d "$lockdir" && test $i -gt 0; do
+ sleep 1
+ i=`expr $i - 1`
+ done
+ fi
+ i=`expr $i - 1`
+ done
+ trap - 1 2 13 15
+ if test $i -le 0; then
+ echo "$0: failed to acquire lock after $numtries attempts" >&2
+ echo "$0: check lockdir '$lockdir'" >&2
+ exit 1
+ fi
- "$@" -MD -MF "$tmpdepfile"
- stat=$?
- if test $stat -eq 0; then :
- else
+ if test $stat -ne 0; then
rm -f "$tmpdepfile"
exit $stat
fi
@@ -297,8 +392,8 @@ icc)
sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile"
# Some versions of the HPUX 10.20 sed can't process this invocation
# correctly. Breaking it into two sed invocations is a workaround.
- sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" |
- sed -e 's/$/ :/' >> "$depfile"
+ sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" \
+ | sed -e 's/$/ :/' >> "$depfile"
rm -f "$tmpdepfile"
;;
@@ -309,9 +404,8 @@ hp2)
# 'foo.d', which lands next to the object file, wherever that
# happens to be.
# Much of this is similar to the tru64 case; see comments there.
- dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
- test "x$dir" = "x$object" && dir=
- base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
+ set_dir_from "$object"
+ set_base_from "$object"
if test "$libtool" = yes; then
tmpdepfile1=$dir$base.d
tmpdepfile2=$dir.libs/$base.d
@@ -322,8 +416,7 @@ hp2)
"$@" +Maked
fi
stat=$?
- if test $stat -eq 0; then :
- else
+ if test $stat -ne 0; then
rm -f "$tmpdepfile1" "$tmpdepfile2"
exit $stat
fi
@@ -333,77 +426,107 @@ hp2)
test -f "$tmpdepfile" && break
done
if test -f "$tmpdepfile"; then
- sed -e "s,^.*\.[a-z]*:,$object:," "$tmpdepfile" > "$depfile"
- # Add `dependent.h:' lines.
+ sed -e "s,^.*\.[$lower]*:,$object:," "$tmpdepfile" > "$depfile"
+ # Add 'dependent.h:' lines.
sed -ne '2,${
- s/^ *//
- s/ \\*$//
- s/$/:/
- p
- }' "$tmpdepfile" >> "$depfile"
+ s/^ *//
+ s/ \\*$//
+ s/$/:/
+ p
+ }' "$tmpdepfile" >> "$depfile"
else
- echo "#dummy" > "$depfile"
+ make_dummy_depfile
fi
rm -f "$tmpdepfile" "$tmpdepfile2"
;;
tru64)
- # The Tru64 compiler uses -MD to generate dependencies as a side
- # effect. `cc -MD -o foo.o ...' puts the dependencies into `foo.o.d'.
- # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put
- # dependencies in `foo.d' instead, so we check for that too.
- # Subdirectories are respected.
- dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
- test "x$dir" = "x$object" && dir=
- base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
-
- if test "$libtool" = yes; then
- # With Tru64 cc, shared objects can also be used to make a
- # static library. This mechanism is used in libtool 1.4 series to
- # handle both shared and static libraries in a single compilation.
- # With libtool 1.4, dependencies were output in $dir.libs/$base.lo.d.
- #
- # With libtool 1.5 this exception was removed, and libtool now
- # generates 2 separate objects for the 2 libraries. These two
- # compilations output dependencies in $dir.libs/$base.o.d and
- # in $dir$base.o.d. We have to check for both files, because
- # one of the two compilations can be disabled. We should prefer
- # $dir$base.o.d over $dir.libs/$base.o.d because the latter is
- # automatically cleaned when .libs/ is deleted, while ignoring
- # the former would cause a distcleancheck panic.
- tmpdepfile1=$dir.libs/$base.lo.d # libtool 1.4
- tmpdepfile2=$dir$base.o.d # libtool 1.5
- tmpdepfile3=$dir.libs/$base.o.d # libtool 1.5
- tmpdepfile4=$dir.libs/$base.d # Compaq CCC V6.2-504
- "$@" -Wc,-MD
- else
- tmpdepfile1=$dir$base.o.d
- tmpdepfile2=$dir$base.d
- tmpdepfile3=$dir$base.d
- tmpdepfile4=$dir$base.d
- "$@" -MD
- fi
-
- stat=$?
- if test $stat -eq 0; then :
- else
- rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4"
- exit $stat
- fi
-
- for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4"
- do
- test -f "$tmpdepfile" && break
- done
- if test -f "$tmpdepfile"; then
- sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile"
- # That's a tab and a space in the [].
- sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile"
- else
- echo "#dummy" > "$depfile"
- fi
- rm -f "$tmpdepfile"
- ;;
+ # The Tru64 compiler uses -MD to generate dependencies as a side
+ # effect. 'cc -MD -o foo.o ...' puts the dependencies into 'foo.o.d'.
+ # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put
+ # dependencies in 'foo.d' instead, so we check for that too.
+ # Subdirectories are respected.
+ set_dir_from "$object"
+ set_base_from "$object"
+
+ if test "$libtool" = yes; then
+ # Libtool generates 2 separate objects for the 2 libraries. These
+ # two compilations output dependencies in $dir.libs/$base.o.d and
+ # in $dir$base.o.d. We have to check for both files, because
+ # one of the two compilations can be disabled. We should prefer
+ # $dir$base.o.d over $dir.libs/$base.o.d because the latter is
+ # automatically cleaned when .libs/ is deleted, while ignoring
+ # the former would cause a distcleancheck panic.
+ tmpdepfile1=$dir$base.o.d # libtool 1.5
+ tmpdepfile2=$dir.libs/$base.o.d # Likewise.
+ tmpdepfile3=$dir.libs/$base.d # Compaq CCC V6.2-504
+ "$@" -Wc,-MD
+ else
+ tmpdepfile1=$dir$base.d
+ tmpdepfile2=$dir$base.d
+ tmpdepfile3=$dir$base.d
+ "$@" -MD
+ fi
+
+ stat=$?
+ if test $stat -ne 0; then
+ rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
+ exit $stat
+ fi
+
+ for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
+ do
+ test -f "$tmpdepfile" && break
+ done
+ # Same post-processing that is required for AIX mode.
+ aix_post_process_depfile
+ ;;
+
+msvc7)
+ if test "$libtool" = yes; then
+ showIncludes=-Wc,-showIncludes
+ else
+ showIncludes=-showIncludes
+ fi
+ "$@" $showIncludes > "$tmpdepfile"
+ stat=$?
+ grep -v '^Note: including file: ' "$tmpdepfile"
+ if test $stat -ne 0; then
+ rm -f "$tmpdepfile"
+ exit $stat
+ fi
+ rm -f "$depfile"
+ echo "$object : \\" > "$depfile"
+ # The first sed program below extracts the file names and escapes
+ # backslashes for cygpath. The second sed program outputs the file
+ # name when reading, but also accumulates all include files in the
+ # hold buffer in order to output them again at the end. This only
+ # works with sed implementations that can handle large buffers.
+ sed < "$tmpdepfile" -n '
+/^Note: including file: *\(.*\)/ {
+ s//\1/
+ s/\\/\\\\/g
+ p
+}' | $cygpath_u | sort -u | sed -n '
+s/ /\\ /g
+s/\(.*\)/'"$tab"'\1 \\/p
+s/.\(.*\) \\/\1:/
+H
+$ {
+ s/.*/'"$tab"'/
+ G
+ p
+}' >> "$depfile"
+ echo >> "$depfile" # make sure the fragment doesn't end with a backslash
+ rm -f "$tmpdepfile"
+ ;;
+
+msvc7msys)
+ # This case exists only to let depend.m4 do its work. It works by
+ # looking at the text of this script. This case will never be run,
+ # since it is checked for above.
+ exit 1
+ ;;
#nosideeffect)
# This comment above is used by automake to tell side-effect
@@ -422,7 +545,7 @@ dashmstdout)
shift
fi
- # Remove `-o $object'.
+ # Remove '-o $object'.
IFS=" "
for arg
do
@@ -442,18 +565,18 @@ dashmstdout)
done
test -z "$dashmflag" && dashmflag=-M
- # Require at least two characters before searching for `:'
+ # Require at least two characters before searching for ':'
# in the target name. This is to cope with DOS-style filenames:
- # a dependency such as `c:/foo/bar' could be seen as target `c' otherwise.
+ # a dependency such as 'c:/foo/bar' could be seen as target 'c' otherwise.
"$@" $dashmflag |
- sed 's:^[ ]*[^: ][^:][^:]*\:[ ]*:'"$object"'\: :' > "$tmpdepfile"
+ sed "s|^[$tab ]*[^:$tab ][^:][^:]*:[$tab ]*|$object: |" > "$tmpdepfile"
rm -f "$depfile"
cat < "$tmpdepfile" > "$depfile"
- tr ' ' '
-' < "$tmpdepfile" | \
-## Some versions of the HPUX 10.20 sed can't process this invocation
-## correctly. Breaking it into two sed invocations is a workaround.
- sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
+ # Some versions of the HPUX 10.20 sed can't process this sed invocation
+ # correctly. Breaking it into two sed invocations is a workaround.
+ tr ' ' "$nl" < "$tmpdepfile" \
+ | sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' \
+ | sed -e 's/$/ :/' >> "$depfile"
rm -f "$tmpdepfile"
;;
@@ -503,12 +626,15 @@ makedepend)
touch "$tmpdepfile"
${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@"
rm -f "$depfile"
- cat < "$tmpdepfile" > "$depfile"
- sed '1,2d' "$tmpdepfile" | tr ' ' '
-' | \
-## Some versions of the HPUX 10.20 sed can't process this invocation
-## correctly. Breaking it into two sed invocations is a workaround.
- sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
+ # makedepend may prepend the VPATH from the source file name to the object.
+ # No need to regex-escape $object, excess matching of '.' is harmless.
+ sed "s|^.*\($object *:\)|\1|" "$tmpdepfile" > "$depfile"
+ # Some versions of the HPUX 10.20 sed can't process the last invocation
+ # correctly. Breaking it into two sed invocations is a workaround.
+ sed '1,2d' "$tmpdepfile" \
+ | tr ' ' "$nl" \
+ | sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' \
+ | sed -e 's/$/ :/' >> "$depfile"
rm -f "$tmpdepfile" "$tmpdepfile".bak
;;
@@ -525,7 +651,7 @@ cpp)
shift
fi
- # Remove `-o $object'.
+ # Remove '-o $object'.
IFS=" "
for arg
do
@@ -544,10 +670,10 @@ cpp)
esac
done
- "$@" -E |
- sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \
- -e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' |
- sed '$ s: \\$::' > "$tmpdepfile"
+ "$@" -E \
+ | sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \
+ -e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \
+ | sed '$ s: \\$::' > "$tmpdepfile"
rm -f "$depfile"
echo "$object : \\" > "$depfile"
cat < "$tmpdepfile" >> "$depfile"
@@ -579,23 +705,23 @@ msvisualcpp)
shift
;;
"-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI")
- set fnord "$@"
- shift
- shift
- ;;
+ set fnord "$@"
+ shift
+ shift
+ ;;
*)
- set fnord "$@" "$arg"
- shift
- shift
- ;;
+ set fnord "$@" "$arg"
+ shift
+ shift
+ ;;
esac
done
"$@" -E 2>/dev/null |
sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::\1:p' | $cygpath_u | sort -u > "$tmpdepfile"
rm -f "$depfile"
echo "$object : \\" > "$depfile"
- sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s:: \1 \\:p' >> "$depfile"
- echo " " >> "$depfile"
+ sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::'"$tab"'\1 \\:p' >> "$depfile"
+ echo "$tab" >> "$depfile"
sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::\1\::p' >> "$depfile"
rm -f "$tmpdepfile"
;;
diff --git a/etc/ChangeLog b/etc/ChangeLog
index d3b6a0bf3..c11033826 100644
--- a/etc/ChangeLog
+++ b/etc/ChangeLog
@@ -1,3 +1,27 @@
+2016-03-18 Nick Clifton <nickc@redhat.com>
+
+ * texi2pod.pl: Add TARGET to the list of recognised man page
+ sections.
+
+2014-06-27 Ludovic Courtès <ludo@gnu.org>
+
+ PR external/16327
+ PR external/16328
+ * Makefile.in (MAKEINFO, TEXI2DVI, TEXI2PDF, TEXI2HTML, DVIPS)
+ (TEXIDIR, INFOFILES, DVIFILES, PDFFILES, HTMLFILES): Remove.
+ (all): Remove dependency on 'info'.
+ (install): Remove dependency on 'install-info'.
+ (standards.info, standards.html, standards.dvi, standards.ps)
+ (standards.pdf, configure.info, configure.dvi, configure.ps)
+ (configure.pdf, configure.pdf): Remove.
+ (info, install-info, html, install-html, dvi, pdf, install-pdf)
+ clean, maintainer-clean, realclean): Remove body.
+ * etc/configbuild.ein, etc/configbuild.fig, etc/configbuild.jin,
+ etc/configbuild.tin, etc/configdev.ein, etc/configdev.fig,
+ etc/configdev.jin, etc/configdev.tin, etc/configure.texi,
+ etc/fdl.texi, etc/gnu-oids.texi, etc/make-stds.texi,
+ etc/standards.texi: Remove.
+
2010-11-20 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
* Makefile.in (install-strip): New target.
diff --git a/etc/Makefile.in b/etc/Makefile.in
index 0d19c13e6..4aa64c114 100644
--- a/etc/Makefile.in
+++ b/etc/Makefile.in
@@ -37,187 +37,12 @@ INSTALL = @INSTALL@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_DATA = @INSTALL_DATA@
-MAKEINFO = `if [ -f ../texinfo/makeinfo/makeinfo ]; \
- then echo ../texinfo/makeinfo/makeinfo; \
- else echo makeinfo; fi`
-TEXI2DVI = `if [ -f ../texinfo/util/texi2dvi ]; \
- then echo ../texinfo/util/texi2dvi; \
- else echo texi2dvi; fi`
-TEXI2PDF = `if [ -f ../texinfo/util/texi2dvi ]; \
- then echo "../texinfo/util/texi2dvi --pdf"; \
- else echo "texi2dvi --pdf"; fi`
-TEXI2HTML = `if [ -f ../texinfo/makeinfo/makeinfo ]; \
- then echo "../texinfo/makeinfo/makeinfo --html"; \
- else echo "makeinfo --html"; fi`
-
-DVIPS = dvips
-
-# Where to find texinfo.tex to format documentation with TeX.
-TEXIDIR = $(srcdir)/../texinfo
-
#### Host, target, and site specific Makefile fragments come in here.
###
-INFOFILES = standards.info configure.info
-DVIFILES = standards.dvi configure.dvi
-PDFFILES = standards.pdf configure.pdf
-HTMLFILES = standards.html configure.html
-
-all: info
-install install-strip: install-info
-
-uninstall:
-
-info:
- for f in $(INFOFILES); do \
- if test -f $(srcdir)/`echo $$f | sed -e 's/.info$$/.texi/'`; then \
- if $(MAKE) "MAKEINFO=$(MAKEINFO)" $$f; then \
- true; \
- else \
- exit 1; \
- fi; \
- fi; \
- done
-
-install-info: info
- $(SHELL) $(srcdir)/../mkinstalldirs $(DESTDIR)$(infodir)
- if test ! -f standards.info; then cd $(srcdir); fi; \
- if test -f standards.info; then \
- for i in standards.info*; do \
- $(INSTALL_DATA) $$i $(DESTDIR)$(infodir)/$$i; \
- done; \
- fi
- if test ! -f configure.info; then cd $(srcdir); fi; \
- if test -f configure.info; then \
- for i in configure.info*; do \
- $(INSTALL_DATA) $$i $(DESTDIR)$(infodir)/$$i; \
- done; \
- fi
-
-html:
- for f in $(HTMLFILES); do \
- if test -f $(srcdir)/`echo $$f | sed -e 's/.html$$/.texi/'`; then \
- if $(MAKE) "TEXI2HTML=$(TEXI2HTML)" $$f; then \
- true; \
- else \
- exit 1; \
- fi; \
- fi; \
- done
-
-install-html: html
- $(SHELL) $(srcdir)/../mkinstalldirs $(DESTDIR)$(htmldir)
- if test ! -f standards.html; then cd $(srcdir); fi; \
- if test -f standards.html; then \
- for i in standards.html*; do \
- $(INSTALL_DATA) $$i $(DESTDIR)$(htmldir)/$$i; \
- done; \
- fi
- if test ! -f configure.html; then cd $(srcdir); fi; \
- if test -f configure.html; then \
- for i in configure.html*; do \
- $(INSTALL_DATA) $$i $(DESTDIR)$(htmldir)/$$i; \
- done; \
- fi
-
-dvi:
- for f in $(DVIFILES); do \
- if test -f $(srcdir)/`echo $$f | sed -e 's/.dvi$$/.texi/'`; then \
- if $(MAKE) "TEXI2DVI=$(TEXI2DVI)" $$f; then \
- true; \
- else \
- exit 1; \
- fi; \
- fi; \
- done
-
-pdf:
- for f in $(PDFFILES); do \
- if test -f $(srcdir)/`echo $$f | sed -e 's/.pdf$$/.texi/'`; then \
- if $(MAKE) "TEXI2PDF=$(TEXI2PDF)" $$f; then \
- true; \
- else \
- exit 1; \
- fi; \
- fi; \
- done
-
-install-pdf: pdf
- $(SHELL) $(srcdir)/../mkinstalldirs $(DESTDIR)$(pdfdir)/etc
- if test ! -f standards.pdf; then cd $(srcdir); fi; \
- if test -f standards.pdf; then \
- for i in standards.pdf*; do \
- $(INSTALL_DATA) $$i $(DESTDIR)$(pdfdir)/etc/$$i; \
- done; \
- fi
- if test ! -f configure.pdf; then cd $(srcdir); fi; \
- if test -f configure.pdf; then \
- for i in configure.pdf*; do \
- $(INSTALL_DATA) $$i $(DESTDIR)$(pdfdir)/etc/$$i; \
- done; \
- fi
-
-standards.info: $(srcdir)/standards.texi $(srcdir)/make-stds.texi
- $(MAKEINFO) --no-split -I$(srcdir) -o standards.info $(srcdir)/standards.texi
-
-standards.html: $(srcdir)/standards.texi $(srcdir)/make-stds.texi
- $(TEXI2HTML) --no-split -I$(srcdir) -o standards.html $(srcdir)/standards.texi
-
-standards.dvi: $(srcdir)/standards.texi
- TEXINPUTS=$(TEXIDIR):$$TEXINPUTS $(TEXI2DVI) $(srcdir)/standards.texi
-
-standards.ps: standards.dvi
- $(DVIPS) standards.dvi -o standards.ps
-
-standards.pdf: $(srcdir)/standards.texi
- TEXINPUTS=$(TEXIDIR):$$TEXINPUTS $(TEXI2PDF) $(srcdir)/standards.texi
-
-# makeinfo requires images to be in the current directory.
-configure.info: $(srcdir)/configure.texi $(srcdir)/configdev.tin $(srcdir)/configbuild.tin
- rm -f configdev.txt configbuild.txt
- cp $(srcdir)/configdev.tin configdev.txt
- cp $(srcdir)/configbuild.tin configbuild.txt
- $(MAKEINFO) -I$(srcdir) -o configure.info $(srcdir)/configure.texi
- rm -f configdev.txt configbuild.txt
-
-# texi2dvi wants both the .txt and the .eps files.
-configure.dvi: $(srcdir)/configure.texi $(srcdir)/configdev.tin $(srcdir)/configbuild.tin $(srcdir)/configdev.ein $(srcdir)/configbuild.ein
- rm -f configdev.txt configbuild.txt
- cp $(srcdir)/configdev.tin configdev.txt
- cp $(srcdir)/configbuild.tin configbuild.txt
- rm -f configdev.eps configbuild.eps
- cp $(srcdir)/configdev.ein configdev.eps
- cp $(srcdir)/configbuild.ein configbuild.eps
- TEXINPUTS=$(TEXIDIR):$$TEXINPUTS $(TEXI2DVI) $(srcdir)/configure.texi
- rm -f configdev.txt configbuild.txt
- rm -f configdev.eps configbuild.eps
-
-# dvips requires images to be in the current directory
-configure.ps: configure.dvi $(srcdir)/configdev.ein $(srcdir)/configbuild.ein
- rm -f configdev.eps configbuild.eps
- cp $(srcdir)/configdev.ein configdev.eps
- cp $(srcdir)/configbuild.ein configbuild.eps
- $(DVIPS) configure.dvi -o configure.ps
- rm -f configdev.eps configbuild.eps
-
-configure.pdf: $(srcdir)/configure.texi $(srcdir)/configdev.tin $(srcdir)/configbuild.tin $(srcdir)/configdev.ein $(srcdir)/configbuild.ein
- rm -f configdev.pdf configbuild.pdf
- epstopdf $(srcdir)/configdev.ein -outfile=configdev.pdf
- epstopdf $(srcdir)/configbuild.ein -outfile=configbuild.pdf
- TEXINPUTS=$(TEXIDIR):$$TEXINPUTS $(TEXI2PDF) $(srcdir)/configure.texi
- rm -f configdev.pdf configbuild.pdf
-
-configure.html: $(srcdir)/configure.texi
- cp $(srcdir)/configdev.jin configdev.jpg
- cp $(srcdir)/configbuild.jin configbuild.jpg
- $(TEXI2HTML) --no-split -I$(srcdir) -o configure.html $(srcdir)/configure.texi
+all:
clean:
- rm -f *.aux *.cp *.cps *.dvi *.fn *.fns *.ky *.kys *.log
- rm -f *.pg *.pgs *.toc *.tp *.tps *.vr *.vrs
- rm -f configdev.txt configbuild.txt
- rm -f configdev.eps configbuild.eps
- rm -f configdev.jpg configbuild.jpg
mostlyclean: clean
@@ -225,8 +50,6 @@ distclean: clean
rm -f Makefile config.status config.cache
maintainer-clean realclean: distclean
- rm -f *.html*
- rm -f *.info*
Makefile: $(srcdir)/Makefile.in $(host_makefile_frag) $(target_makefile_frag) \
config.status
@@ -244,5 +67,8 @@ config.status: $(srcdir)/configure
## these last targets are for standards.texi conformance
dist:
check:
+info html dvi ps pdf:
+install install-strip install-info install-html install-pdf:
installcheck:
+uninstall:
TAGS:
diff --git a/etc/configbuild.ein b/etc/configbuild.ein
deleted file mode 100644
index 7a0e214f2..000000000
--- a/etc/configbuild.ein
+++ /dev/null
@@ -1,149 +0,0 @@
-%!PS-Adobe-2.0 EPSF-2.0
-%%Title: configbuild.fig
-%%Creator: fig2dev Version 3.1 Patchlevel 1
-%%CreationDate: Fri Jun 12 20:13:16 1998
-%%For: ian@tito.cygnus.com (Ian Lance Taylor)
-%%Orientation: Portrait
-%%BoundingBox: 0 0 322 173
-%%Pages: 0
-%%BeginSetup
-%%IncludeFeature: *PageSize Letter
-%%EndSetup
-%%EndComments
-/$F2psDict 200 dict def
-$F2psDict begin
-$F2psDict /mtrx matrix put
-/col-1 {} def
-/col0 {0.000 0.000 0.000 srgb} bind def
-/col1 {0.000 0.000 1.000 srgb} bind def
-/col2 {0.000 1.000 0.000 srgb} bind def
-/col3 {0.000 1.000 1.000 srgb} bind def
-/col4 {1.000 0.000 0.000 srgb} bind def
-/col5 {1.000 0.000 1.000 srgb} bind def
-/col6 {1.000 1.000 0.000 srgb} bind def
-/col7 {1.000 1.000 1.000 srgb} bind def
-/col8 {0.000 0.000 0.560 srgb} bind def
-/col9 {0.000 0.000 0.690 srgb} bind def
-/col10 {0.000 0.000 0.820 srgb} bind def
-/col11 {0.530 0.810 1.000 srgb} bind def
-/col12 {0.000 0.560 0.000 srgb} bind def
-/col13 {0.000 0.690 0.000 srgb} bind def
-/col14 {0.000 0.820 0.000 srgb} bind def
-/col15 {0.000 0.560 0.560 srgb} bind def
-/col16 {0.000 0.690 0.690 srgb} bind def
-/col17 {0.000 0.820 0.820 srgb} bind def
-/col18 {0.560 0.000 0.000 srgb} bind def
-/col19 {0.690 0.000 0.000 srgb} bind def
-/col20 {0.820 0.000 0.000 srgb} bind def
-/col21 {0.560 0.000 0.560 srgb} bind def
-/col22 {0.690 0.000 0.690 srgb} bind def
-/col23 {0.820 0.000 0.820 srgb} bind def
-/col24 {0.500 0.190 0.000 srgb} bind def
-/col25 {0.630 0.250 0.000 srgb} bind def
-/col26 {0.750 0.380 0.000 srgb} bind def
-/col27 {1.000 0.500 0.500 srgb} bind def
-/col28 {1.000 0.630 0.630 srgb} bind def
-/col29 {1.000 0.750 0.750 srgb} bind def
-/col30 {1.000 0.880 0.880 srgb} bind def
-/col31 {1.000 0.840 0.000 srgb} bind def
-
-end
-save
--62.0 226.0 translate
-1 -1 scale
-
-/clp {closepath} bind def
-/ef {eofill} bind def
-/gr {grestore} bind def
-/gs {gsave} bind def
-/l {lineto} bind def
-/m {moveto} bind def
-/n {newpath} bind def
-/s {stroke} bind def
-/slc {setlinecap} bind def
-/slj {setlinejoin} bind def
-/slw {setlinewidth} bind def
-/srgb {setrgbcolor} bind def
-/rot {rotate} bind def
-/sc {scale} bind def
-/tr {translate} bind def
-/tnt {dup dup currentrgbcolor
- 4 -2 roll dup 1 exch sub 3 -1 roll mul add
- 4 -2 roll dup 1 exch sub 3 -1 roll mul add
- 4 -2 roll dup 1 exch sub 3 -1 roll mul add srgb}
- bind def
-/shd {dup dup currentrgbcolor 4 -2 roll mul 4 -2 roll mul
- 4 -2 roll mul srgb} bind def
-/$F2psBegin {$F2psDict begin /$F2psEnteredState save def} def
-/$F2psEnd {$F2psEnteredState restore end} def
-%%EndProlog
-
-$F2psBegin
-10 setmiterlimit
- 0.06000 0.06000 sc
-7.500 slw
-% Polyline
-n 1050 900 m 2100 900 l 2100 1425 l 1050 1425 l clp gs col-1 s gr
-% Polyline
-n 1500 1425 m 1500 2100 l gs col-1 s gr
-n 1530.00 1980.00 m 1500.00 2100.00 l 1470.00 1980.00 l 1500.50 1980.50 l 1530.00 1980.00 l clp gs 0.00 setgray ef gr gs col-1 s gr
-% Polyline
-n 1500 2625 m 1500 3300 l gs col-1 s gr
-n 1530.00 3180.00 m 1500.00 3300.00 l 1470.00 3180.00 l 1500.50 3180.50 l 1530.00 3180.00 l clp gs 0.00 setgray ef gr gs col-1 s gr
-% Polyline
-n 2925 900 m 3825 900 l 3825 1425 l 2925 1425 l clp gs col-1 s gr
-% Polyline
-n 1155 2100 m 1050 2100 1050 2520 105 arcto 4 {pop} repeat 1050 2625 2220 2625 105 arcto 4 {pop} repeat 2325 2625 2325 2205 105 arcto 4 {pop} repeat 2325 2100 1155 2100 105 arcto 4 {pop} repeat clp gs col-1 s gr
-% Polyline
-n 2850 2100 m 4125 2100 l 4125 2625 l 2850 2625 l clp gs col-1 s gr
-% Polyline
-n 3375 1425 m 3375 2100 l gs col-1 s gr
-n 3405.00 1980.00 m 3375.00 2100.00 l 3345.00 1980.00 l 3375.50 1980.50 l 3405.00 1980.00 l clp gs 0.00 setgray ef gr gs col-1 s gr
-% Polyline
-n 5100 900 m 6300 900 l 6300 1350 l 5100 1350 l clp gs col-1 s gr
-% Polyline
-n 5625 1350 m 5625 2100 l gs col-1 s gr
-n 5655.00 1980.00 m 5625.00 2100.00 l 5595.00 1980.00 l 5625.50 1980.50 l 5655.00 1980.00 l clp gs 0.00 setgray ef gr gs col-1 s gr
-% Polyline
-n 5205 2100 m 5100 2100 5100 2520 105 arcto 4 {pop} repeat 5100 2625 6270 2625 105 arcto 4 {pop} repeat 6375 2625 6375 2205 105 arcto 4 {pop} repeat 6375 2100 5205 2100 105 arcto 4 {pop} repeat clp gs col-1 s gr
-% Polyline
-n 5625 2625 m 5625 3300 l gs col-1 s gr
-n 5655.00 3180.00 m 5625.00 3300.00 l 5595.00 3180.00 l 5625.50 3180.50 l 5655.00 3180.00 l clp gs 0.00 setgray ef gr gs col-1 s gr
-% Polyline
-n 5100 3300 m 6225 3300 l 6225 3750 l 5100 3750 l clp gs col-1 s gr
-% Polyline
- [1 50.0] 50.000000 setdash
-n 2850 2400 m 2325 2400 l gs col-1 s gr [] 0 setdash
-n 2445.00 2430.00 m 2325.00 2400.00 l 2445.00 2370.00 l 2445.50 2400.50 l 2445.00 2430.00 l clp gs 0.00 setgray ef gr gs col-1 s gr
-% Polyline
- [1 50.0] 50.000000 setdash
-n 4125 2400 m 5100 2400 l gs col-1 s gr [] 0 setdash
-n 4980.00 2370.00 m 5100.00 2400.00 l 4980.00 2430.00 l 4980.50 2400.50 l 4980.00 2370.00 l clp gs 0.00 setgray ef gr gs col-1 s gr
-% Polyline
-n 1050 3300 m 1950 3300 l 1950 3750 l 1050 3750 l clp gs col-1 s gr
-/Times-Roman findfont 180.00 scalefont setfont
-1200 1200 m
-gs 1 -1 sc (config.in) col-1 show gr
-/Times-Roman findfont 180.00 scalefont setfont
-3000 1200 m
-gs 1 -1 sc (configure) col-1 show gr
-/Times-Roman findfont 180.00 scalefont setfont
-3000 2400 m
-gs 1 -1 sc (config.status) col-1 show gr
-/Times-Roman findfont 180.00 scalefont setfont
-1200 2400 m
-gs 1 -1 sc (config.status) col-1 show gr
-/Times-Roman findfont 180.00 scalefont setfont
-1200 3600 m
-gs 1 -1 sc (config.h) col-1 show gr
-/Times-Roman findfont 180.00 scalefont setfont
-5250 1200 m
-gs 1 -1 sc (Makefile.in) col-1 show gr
-/Times-Roman findfont 180.00 scalefont setfont
-5250 2400 m
-gs 1 -1 sc (config.status) col-1 show gr
-/Times-Roman findfont 180.00 scalefont setfont
-5250 3600 m
-gs 1 -1 sc (Makefile) col-1 show gr
-$F2psEnd
-restore
diff --git a/etc/configbuild.fig b/etc/configbuild.fig
deleted file mode 100644
index 747592d3d..000000000
--- a/etc/configbuild.fig
+++ /dev/null
@@ -1,50 +0,0 @@
-#FIG 3.1
-Portrait
-Center
-Inches
-1200 2
-2 2 0 1 -1 7 0 0 -1 0.000 0 0 0 0 0 5
- 1050 900 2100 900 2100 1425 1050 1425 1050 900
-2 1 0 1 -1 7 0 0 -1 0.000 0 0 -1 1 0 2
- 1 1 1.00 60.00 120.00
- 1500 1425 1500 2100
-2 1 0 1 -1 7 0 0 -1 0.000 0 0 -1 1 0 2
- 1 1 1.00 60.00 120.00
- 1500 2625 1500 3300
-2 2 0 1 -1 7 0 0 -1 0.000 0 0 0 0 0 5
- 2925 900 3825 900 3825 1425 2925 1425 2925 900
-2 4 0 1 -1 7 0 0 -1 0.000 0 0 7 0 0 5
- 2325 2625 2325 2100 1050 2100 1050 2625 2325 2625
-2 2 0 1 -1 7 0 0 -1 0.000 0 0 0 0 0 5
- 2850 2100 4125 2100 4125 2625 2850 2625 2850 2100
-2 1 0 1 -1 7 0 0 -1 0.000 0 0 -1 1 0 2
- 1 1 1.00 60.00 120.00
- 3375 1425 3375 2100
-2 2 0 1 -1 7 0 0 -1 0.000 0 0 0 0 0 5
- 5100 900 6300 900 6300 1350 5100 1350 5100 900
-2 1 0 1 -1 7 0 0 -1 0.000 0 0 -1 1 0 2
- 1 1 1.00 60.00 120.00
- 5625 1350 5625 2100
-2 4 0 1 -1 7 0 0 -1 0.000 0 0 7 0 0 5
- 6375 2625 6375 2100 5100 2100 5100 2625 6375 2625
-2 1 0 1 -1 7 0 0 -1 0.000 0 0 -1 1 0 2
- 1 1 1.00 60.00 120.00
- 5625 2625 5625 3300
-2 2 0 1 -1 7 0 0 -1 0.000 0 0 0 0 0 5
- 5100 3300 6225 3300 6225 3750 5100 3750 5100 3300
-2 1 2 1 -1 7 0 0 -1 3.000 0 0 -1 1 0 2
- 1 1 1.00 60.00 120.00
- 2850 2400 2325 2400
-2 1 2 1 -1 7 0 0 -1 3.000 0 0 -1 1 0 2
- 1 1 1.00 60.00 120.00
- 4125 2400 5100 2400
-2 2 0 1 -1 7 0 0 -1 0.000 0 0 0 0 0 5
- 1050 3300 1950 3300 1950 3750 1050 3750 1050 3300
-4 0 -1 0 0 0 12 0.0000000 4 180 645 1200 1200 config.in\001
-4 0 -1 0 0 0 12 0.0000000 4 180 705 3000 1200 configure\001
-4 0 -1 0 0 0 12 0.0000000 4 180 990 3000 2400 config.status\001
-4 0 -1 0 0 0 12 0.0000000 4 180 990 1200 2400 config.status\001
-4 0 -1 0 0 0 12 0.0000000 4 180 600 1200 3600 config.h\001
-4 0 -1 0 0 0 12 0.0000000 4 135 855 5250 1200 Makefile.in\001
-4 0 -1 0 0 0 12 0.0000000 4 180 990 5250 2400 config.status\001
-4 0 -1 0 0 0 12 0.0000000 4 135 675 5250 3600 Makefile\001
diff --git a/etc/configbuild.jin b/etc/configbuild.jin
deleted file mode 100644
index 44cd9397a..000000000
--- a/etc/configbuild.jin
+++ /dev/null
Binary files differ
diff --git a/etc/configbuild.tin b/etc/configbuild.tin
deleted file mode 100644
index cfdd6fe07..000000000
--- a/etc/configbuild.tin
+++ /dev/null
@@ -1,9 +0,0 @@
- config.in *configure* Makefile.in
- | | |
- | v |
- | config.status |
- | | |
- *config.status*<======+==========>*config.status*
- | |
- v v
- config.h Makefile
diff --git a/etc/configdev.ein b/etc/configdev.ein
deleted file mode 100644
index 7f837850d..000000000
--- a/etc/configdev.ein
+++ /dev/null
@@ -1,185 +0,0 @@
-%!PS-Adobe-2.0 EPSF-2.0
-%%Title: configdev.fig
-%%Creator: fig2dev Version 3.1 Patchlevel 1
-%%CreationDate: Mon Jun 15 17:35:19 1998
-%%For: ian@tito.cygnus.com (Ian Lance Taylor)
-%%Orientation: Portrait
-%%BoundingBox: 0 0 344 317
-%%Pages: 0
-%%BeginSetup
-%%IncludeFeature: *PageSize Letter
-%%EndSetup
-%%EndComments
-/$F2psDict 200 dict def
-$F2psDict begin
-$F2psDict /mtrx matrix put
-/col-1 {} def
-/col0 {0.000 0.000 0.000 srgb} bind def
-/col1 {0.000 0.000 1.000 srgb} bind def
-/col2 {0.000 1.000 0.000 srgb} bind def
-/col3 {0.000 1.000 1.000 srgb} bind def
-/col4 {1.000 0.000 0.000 srgb} bind def
-/col5 {1.000 0.000 1.000 srgb} bind def
-/col6 {1.000 1.000 0.000 srgb} bind def
-/col7 {1.000 1.000 1.000 srgb} bind def
-/col8 {0.000 0.000 0.560 srgb} bind def
-/col9 {0.000 0.000 0.690 srgb} bind def
-/col10 {0.000 0.000 0.820 srgb} bind def
-/col11 {0.530 0.810 1.000 srgb} bind def
-/col12 {0.000 0.560 0.000 srgb} bind def
-/col13 {0.000 0.690 0.000 srgb} bind def
-/col14 {0.000 0.820 0.000 srgb} bind def
-/col15 {0.000 0.560 0.560 srgb} bind def
-/col16 {0.000 0.690 0.690 srgb} bind def
-/col17 {0.000 0.820 0.820 srgb} bind def
-/col18 {0.560 0.000 0.000 srgb} bind def
-/col19 {0.690 0.000 0.000 srgb} bind def
-/col20 {0.820 0.000 0.000 srgb} bind def
-/col21 {0.560 0.000 0.560 srgb} bind def
-/col22 {0.690 0.000 0.690 srgb} bind def
-/col23 {0.820 0.000 0.820 srgb} bind def
-/col24 {0.500 0.190 0.000 srgb} bind def
-/col25 {0.630 0.250 0.000 srgb} bind def
-/col26 {0.750 0.380 0.000 srgb} bind def
-/col27 {1.000 0.500 0.500 srgb} bind def
-/col28 {1.000 0.630 0.630 srgb} bind def
-/col29 {1.000 0.750 0.750 srgb} bind def
-/col30 {1.000 0.880 0.880 srgb} bind def
-/col31 {1.000 0.840 0.000 srgb} bind def
-
-end
-save
--62.0 370.0 translate
-1 -1 scale
-
-/clp {closepath} bind def
-/ef {eofill} bind def
-/gr {grestore} bind def
-/gs {gsave} bind def
-/l {lineto} bind def
-/m {moveto} bind def
-/n {newpath} bind def
-/s {stroke} bind def
-/slc {setlinecap} bind def
-/slj {setlinejoin} bind def
-/slw {setlinewidth} bind def
-/srgb {setrgbcolor} bind def
-/rot {rotate} bind def
-/sc {scale} bind def
-/tr {translate} bind def
-/tnt {dup dup currentrgbcolor
- 4 -2 roll dup 1 exch sub 3 -1 roll mul add
- 4 -2 roll dup 1 exch sub 3 -1 roll mul add
- 4 -2 roll dup 1 exch sub 3 -1 roll mul add srgb}
- bind def
-/shd {dup dup currentrgbcolor 4 -2 roll mul 4 -2 roll mul
- 4 -2 roll mul srgb} bind def
-/$F2psBegin {$F2psDict begin /$F2psEnteredState save def} def
-/$F2psEnd {$F2psEnteredState restore end} def
-%%EndProlog
-
-$F2psBegin
-10 setmiterlimit
- 0.06000 0.06000 sc
-7.500 slw
-% Polyline
-n 1050 900 m 2100 900 l 2100 1425 l 1050 1425 l clp gs col-1 s gr
-% Polyline
-n 2925 900 m 3975 900 l 3975 1425 l 2925 1425 l clp gs col-1 s gr
-% Polyline
-n 5550 900 m 6750 900 l 6750 1350 l 5550 1350 l clp gs col-1 s gr
-% Polyline
-n 3750 1800 m 5025 1800 l 5025 2250 l 3750 2250 l clp gs col-1 s gr
-% Polyline
-n 1155 2100 m 1050 2100 1050 2520 105 arcto 4 {pop} repeat 1050 2625 2070 2625 105 arcto 4 {pop} repeat 2175 2625 2175 2205 105 arcto 4 {pop} repeat 2175 2100 1155 2100 105 arcto 4 {pop} repeat clp gs col-1 s gr
-% Polyline
-n 5550 3300 m 6675 3300 l 6675 3750 l 5550 3750 l clp gs col-1 s gr
-% Polyline
-n 5655 2100 m 5550 2100 5550 2520 105 arcto 4 {pop} repeat 5550 2625 6495 2625 105 arcto 4 {pop} repeat 6600 2625 6600 2205 105 arcto 4 {pop} repeat 6600 2100 5655 2100 105 arcto 4 {pop} repeat clp gs col-1 s gr
-% Polyline
-n 3750 3600 m 4875 3600 l 4875 4050 l 3750 4050 l clp gs col-1 s gr
-% Polyline
-n 3855 2700 m 3750 2700 3750 3045 105 arcto 4 {pop} repeat 3750 3150 4545 3150 105 arcto 4 {pop} repeat 4650 3150 4650 2805 105 arcto 4 {pop} repeat 4650 2700 3855 2700 105 arcto 4 {pop} repeat clp gs col-1 s gr
-% Polyline
-n 2850 5700 m 3750 5700 l 3750 6150 l 2850 6150 l clp gs col-1 s gr
-% Polyline
-n 3030 4800 m 2925 4800 2925 5145 105 arcto 4 {pop} repeat 2925 5250 3645 5250 105 arcto 4 {pop} repeat 3750 5250 3750 4905 105 arcto 4 {pop} repeat 3750 4800 3030 4800 105 arcto 4 {pop} repeat clp gs col-1 s gr
-% Polyline
-n 1500 1425 m 1500 2100 l gs col-1 s gr
-n 1530.00 1980.00 m 1500.00 2100.00 l 1470.00 1980.00 l 1500.50 1980.50 l 1530.00 1980.00 l clp gs 0.00 setgray ef gr gs col-1 s gr
-% Polyline
-n 3300 1425 m 3300 4800 l gs col-1 s gr
-n 3330.00 4680.00 m 3300.00 4800.00 l 3270.00 4680.00 l 3300.50 4680.50 l 3330.00 4680.00 l clp gs 0.00 setgray ef gr gs col-1 s gr
-% Polyline
-n 3300 1575 m 1875 1575 l 1875 2100 l gs col-1 s gr
-n 1905.00 1980.00 m 1875.00 2100.00 l 1845.00 1980.00 l 1875.50 1980.50 l 1905.00 1980.00 l clp gs 0.00 setgray ef gr gs col-1 s gr
-% Polyline
-n 3300 1575 m 5700 1575 l 5700 2100 l gs col-1 s gr
-n 5730.00 1980.00 m 5700.00 2100.00 l 5670.00 1980.00 l 5700.50 1980.50 l 5730.00 1980.00 l clp gs 0.00 setgray ef gr gs col-1 s gr
-% Polyline
-n 6225 1350 m 6225 2100 l gs col-1 s gr
-n 6255.00 1980.00 m 6225.00 2100.00 l 6195.00 1980.00 l 6225.50 1980.50 l 6255.00 1980.00 l clp gs 0.00 setgray ef gr gs col-1 s gr
-% Polyline
-n 6075 2625 m 6075 3300 l gs col-1 s gr
-n 6105.00 3180.00 m 6075.00 3300.00 l 6045.00 3180.00 l 6075.50 3180.50 l 6105.00 3180.00 l clp gs 0.00 setgray ef gr gs col-1 s gr
-% Polyline
-n 4200 2250 m 4200 2700 l gs col-1 s gr
-n 4230.00 2580.00 m 4200.00 2700.00 l 4170.00 2580.00 l 4200.50 2580.50 l 4230.00 2580.00 l clp gs 0.00 setgray ef gr gs col-1 s gr
-% Polyline
-n 4200 3150 m 4200 3600 l gs col-1 s gr
-n 4230.00 3480.00 m 4200.00 3600.00 l 4170.00 3480.00 l 4200.50 3480.50 l 4230.00 3480.00 l clp gs 0.00 setgray ef gr gs col-1 s gr
-% Polyline
-n 4200 4050 m 4200 4500 l 3675 4500 l 3675 4800 l gs col-1 s gr
-n 3705.00 4680.00 m 3675.00 4800.00 l 3645.00 4680.00 l 3675.50 4680.50 l 3705.00 4680.00 l clp gs 0.00 setgray ef gr gs col-1 s gr
-% Polyline
-n 3375 5250 m 3375 5700 l gs col-1 s gr
-n 3405.00 5580.00 m 3375.00 5700.00 l 3345.00 5580.00 l 3375.50 5580.50 l 3405.00 5580.00 l clp gs 0.00 setgray ef gr gs col-1 s gr
-% Polyline
-n 3300 2925 m 3750 2925 l gs col-1 s gr
-n 3630.00 2895.00 m 3750.00 2925.00 l 3630.00 2955.00 l 3630.50 2925.50 l 3630.00 2895.00 l clp gs 0.00 setgray ef gr gs col-1 s gr
-% Polyline
-n 1500 2625 m 1500 3300 l gs col-1 s gr
-n 1530.00 3180.00 m 1500.00 3300.00 l 1470.00 3180.00 l 1500.50 3180.50 l 1530.00 3180.00 l clp gs 0.00 setgray ef gr gs col-1 s gr
-% Polyline
-n 1050 3300 m 2100 3300 l 2100 3750 l 1050 3750 l clp gs col-1 s gr
-% Polyline
-n 4875 3825 m 5250 3825 l 5250 2400 l 5550 2400 l gs col-1 s gr
-n 5430.00 2370.00 m 5550.00 2400.00 l 5430.00 2430.00 l 5430.50 2400.50 l 5430.00 2370.00 l clp gs 0.00 setgray ef gr gs col-1 s gr
-/Times-Roman findfont 180.00 scalefont setfont
-1200 1200 m
-gs 1 -1 sc (acconfig.h) col-1 show gr
-/Times-Roman findfont 180.00 scalefont setfont
-3000 1200 m
-gs 1 -1 sc (configure.in) col-1 show gr
-/Times-Roman findfont 180.00 scalefont setfont
-5700 1200 m
-gs 1 -1 sc (Makefile.am) col-1 show gr
-/Times-Roman findfont 180.00 scalefont setfont
-3900 2100 m
-gs 1 -1 sc (acinclude.m4) col-1 show gr
-/Times-Roman findfont 180.00 scalefont setfont
-1200 2400 m
-gs 1 -1 sc (autoheader) col-1 show gr
-/Times-Roman findfont 180.00 scalefont setfont
-1200 3600 m
-gs 1 -1 sc (config.in) col-1 show gr
-/Times-Roman findfont 180.00 scalefont setfont
-5700 3600 m
-gs 1 -1 sc (Makefile.in) col-1 show gr
-/Times-Roman findfont 180.00 scalefont setfont
-5700 2400 m
-gs 1 -1 sc (automake) col-1 show gr
-/Times-Roman findfont 180.00 scalefont setfont
-3900 3900 m
-gs 1 -1 sc (aclocal.m4) col-1 show gr
-/Times-Roman findfont 180.00 scalefont setfont
-3900 3000 m
-gs 1 -1 sc (aclocal) col-1 show gr
-/Times-Roman findfont 180.00 scalefont setfont
-3000 6000 m
-gs 1 -1 sc (configure) col-1 show gr
-/Times-Roman findfont 180.00 scalefont setfont
-3000 5100 m
-gs 1 -1 sc (autoconf) col-1 show gr
-$F2psEnd
-restore
diff --git a/etc/configdev.fig b/etc/configdev.fig
deleted file mode 100644
index 4d386ec4f..000000000
--- a/etc/configdev.fig
+++ /dev/null
@@ -1,80 +0,0 @@
-#FIG 3.1
-Portrait
-Center
-Inches
-1200 2
-2 2 0 1 -1 7 0 0 -1 0.000 0 0 0 0 0 5
- 1050 900 2100 900 2100 1425 1050 1425 1050 900
-2 2 0 1 -1 7 0 0 -1 0.000 0 0 0 0 0 5
- 2925 900 3975 900 3975 1425 2925 1425 2925 900
-2 2 0 1 -1 7 0 0 -1 0.000 0 0 0 0 0 5
- 5550 900 6750 900 6750 1350 5550 1350 5550 900
-2 2 0 1 -1 7 0 0 -1 0.000 0 0 0 0 0 5
- 3750 1800 5025 1800 5025 2250 3750 2250 3750 1800
-2 4 0 1 -1 7 0 0 -1 0.000 0 0 7 0 0 5
- 2175 2625 2175 2100 1050 2100 1050 2625 2175 2625
-2 2 0 1 -1 7 0 0 -1 0.000 0 0 0 0 0 5
- 5550 3300 6675 3300 6675 3750 5550 3750 5550 3300
-2 4 0 1 -1 7 0 0 -1 0.000 0 0 7 0 0 5
- 6600 2625 6600 2100 5550 2100 5550 2625 6600 2625
-2 2 0 1 -1 7 0 0 -1 0.000 0 0 0 0 0 5
- 3750 3600 4875 3600 4875 4050 3750 4050 3750 3600
-2 4 0 1 -1 7 0 0 -1 0.000 0 0 7 0 0 5
- 4650 3150 4650 2700 3750 2700 3750 3150 4650 3150
-2 2 0 1 -1 7 0 0 -1 0.000 0 0 0 0 0 5
- 2850 5700 3750 5700 3750 6150 2850 6150 2850 5700
-2 4 0 1 -1 7 0 0 -1 0.000 0 0 7 0 0 5
- 3750 5250 3750 4800 2925 4800 2925 5250 3750 5250
-2 1 0 1 -1 7 0 0 -1 0.000 0 0 -1 1 0 2
- 1 1 1.00 60.00 120.00
- 1500 1425 1500 2100
-2 1 0 1 -1 7 0 0 -1 0.000 0 0 -1 1 0 2
- 1 1 1.00 60.00 120.00
- 3300 1425 3300 4800
-2 1 0 1 -1 7 0 0 -1 0.000 0 0 -1 1 0 3
- 1 1 1.00 60.00 120.00
- 3300 1575 1875 1575 1875 2100
-2 1 0 1 -1 7 0 0 -1 0.000 0 0 -1 1 0 3
- 1 1 1.00 60.00 120.00
- 3300 1575 5700 1575 5700 2100
-2 1 0 1 -1 7 0 0 -1 0.000 0 0 -1 1 0 2
- 1 1 1.00 60.00 120.00
- 6225 1350 6225 2100
-2 1 0 1 -1 7 0 0 -1 0.000 0 0 -1 1 0 2
- 1 1 1.00 60.00 120.00
- 6075 2625 6075 3300
-2 1 0 1 -1 7 0 0 -1 0.000 0 0 -1 1 0 2
- 1 1 1.00 60.00 120.00
- 4200 2250 4200 2700
-2 1 0 1 -1 7 0 0 -1 0.000 0 0 -1 1 0 2
- 1 1 1.00 60.00 120.00
- 4200 3150 4200 3600
-2 1 0 1 -1 7 0 0 -1 0.000 0 0 -1 1 0 4
- 1 1 1.00 60.00 120.00
- 4200 4050 4200 4500 3675 4500 3675 4800
-2 1 0 1 -1 7 0 0 -1 0.000 0 0 -1 1 0 2
- 1 1 1.00 60.00 120.00
- 3375 5250 3375 5700
-2 1 0 1 -1 7 0 0 -1 0.000 0 0 -1 1 0 2
- 1 1 1.00 60.00 120.00
- 3300 2925 3750 2925
-2 1 0 1 -1 7 0 0 -1 0.000 0 0 -1 1 0 2
- 1 1 1.00 60.00 120.00
- 1500 2625 1500 3300
-2 2 0 1 -1 7 0 0 -1 0.000 0 0 0 0 0 5
- 1050 3300 2100 3300 2100 3750 1050 3750 1050 3300
-2 1 0 1 -1 7 0 0 -1 0.000 0 0 -1 1 0 4
- 1 1 1.00 60.00 120.00
- 4875 3825 5250 3825 5250 2400 5550 2400
-4 0 -1 0 0 0 12 0.0000000 4 180 780 1200 1200 acconfig.h\001
-4 0 -1 0 0 0 12 0.0000000 4 180 885 3000 1200 configure.in\001
-4 0 -1 0 0 0 12 0.0000000 4 135 945 5700 1200 Makefile.am\001
-4 0 -1 0 0 0 12 0.0000000 4 135 990 3900 2100 acinclude.m4\001
-4 0 -1 0 0 0 12 0.0000000 4 135 840 1200 2400 autoheader\001
-4 0 -1 0 0 0 12 0.0000000 4 180 645 1200 3600 config.in\001
-4 0 -1 0 0 0 12 0.0000000 4 135 855 5700 3600 Makefile.in\001
-4 0 -1 0 0 0 12 0.0000000 4 135 735 5700 2400 automake\001
-4 0 -1 0 0 0 12 0.0000000 4 135 810 3900 3900 aclocal.m4\001
-4 0 -1 0 0 0 12 0.0000000 4 135 540 3900 3000 aclocal\001
-4 0 -1 0 0 0 12 0.0000000 4 180 705 3000 6000 configure\001
-4 0 -1 0 0 0 12 0.0000000 4 135 660 3000 5100 autoconf\001
diff --git a/etc/configdev.jin b/etc/configdev.jin
deleted file mode 100644
index 9b11a71ac..000000000
--- a/etc/configdev.jin
+++ /dev/null
Binary files differ
diff --git a/etc/configdev.tin b/etc/configdev.tin
deleted file mode 100644
index c9b6f34f4..000000000
--- a/etc/configdev.tin
+++ /dev/null
@@ -1,17 +0,0 @@
- acconfig.h configure.in Makefile.am
- | | |
- | --------------+---------------------- |
- | | | | |
- v v | acinclude.m4 | |
- *autoheader* | | v v
- | | v --->*automake*
- v |--->*aclocal* | |
- config.in | | | v
- | v | Makefile.in
- | aclocal.m4---
- | |
- v v
- *autoconf*
- |
- v
- configure
diff --git a/etc/configure.texi b/etc/configure.texi
deleted file mode 100644
index 58c528548..000000000
--- a/etc/configure.texi
+++ /dev/null
@@ -1,2646 +0,0 @@
-\input texinfo
-@c %**start of header
-@setfilename configure.info
-@settitle The GNU configure and build system
-@setchapternewpage off
-@c %**end of header
-
-@dircategory GNU admin
-@direntry
-* configure: (configure). The GNU configure and build system
-@end direntry
-
-@ifnottex
-This file documents the GNU configure and build system.
-
-Copyright (C) 1998 Cygnus Solutions.
-
-Permission is granted to make and distribute verbatim copies of
-this manual provided the copyright notice and this permission notice
-are preserved on all copies.
-
-@ignore
-Permission is granted to process this file through TeX and print the
-results, provided the printed document carries copying permission
-notice identical to this one except for the removal of this paragraph
-
-
-@end ignore
-Permission is granted to copy and distribute modified versions of this
-manual under the conditions for verbatim copying, provided that the entire
-resulting derived work is distributed under the terms of a permission
-notice identical to this one.
-
-Permission is granted to copy and distribute translations of this manual
-into another language, under the above conditions for modified versions,
-except that this permission notice may be stated in a translation approved
-by the Foundation.
-@end ifnottex
-
-@titlepage
-@title The GNU configure and build system
-@author Ian Lance Taylor
-
-@page
-@vskip 0pt plus 1filll
-Copyright @copyright{} 1998 Cygnus Solutions
-
-Permission is granted to make and distribute verbatim copies of
-this manual provided the copyright notice and this permission notice
-are preserved on all copies.
-
-Permission is granted to copy and distribute modified versions of this
-manual under the conditions for verbatim copying, provided that the entire
-resulting derived work is distributed under the terms of a permission
-notice identical to this one.
-
-Permission is granted to copy and distribute translations of this manual
-into another language, under the above conditions for modified versions,
-except that this permission notice may be stated in a translation
-approved by the Free Software Foundation.
-@end titlepage
-
-@ifnottex
-@node Top
-@top GNU configure and build system
-
-The GNU configure and build system.
-
-@menu
-* Introduction:: Introduction.
-* Getting Started:: Getting Started.
-* Files:: Files.
-* Configuration Names:: Configuration Names.
-* Cross Compilation Tools:: Cross Compilation Tools.
-* Canadian Cross:: Canadian Cross.
-* Cygnus Configure:: Cygnus Configure.
-* Multilibs:: Multilibs.
-* FAQ:: Frequently Asked Questions.
-* Index:: Index.
-@end menu
-
-@end ifnottex
-
-@node Introduction
-@chapter Introduction
-
-This document describes the GNU configure and build systems. It
-describes how autoconf, automake, libtool, and make fit together. It
-also includes a discussion of the older Cygnus configure system.
-
-This document does not describe in detail how to use each of the tools;
-see the respective manuals for that. Instead, it describes which files
-the developer must write, which files are machine generated and how they
-are generated, and where certain common problems should be addressed.
-
-@ifnothtml
-This document draws on several sources, including the autoconf manual by
-David MacKenzie (@pxref{Top, , autoconf overview, autoconf, Autoconf}),
-the automake manual by David MacKenzie and Tom Tromey (@pxref{Top, ,
-automake overview, automake, GNU Automake}), the libtool manual by
-Gordon Matzigkeit (@pxref{Top, , libtool overview, libtool, GNU
-libtool}), and the Cygnus configure manual by K. Richard Pixley.
-@end ifnothtml
-@ifhtml
-This document draws on several sources, including
-@uref{http://www.delorie.com/gnu/docs/autoconf/autoconf_toc.html, the
-autoconf manual} by David MacKenzie,
-@uref{http://www.delorie.com/gnu/docs/automake/automake_toc.html, the
-automake manual} by David MacKenzie and Tom Tromey,
-@uref{http://www.delorie.com/gnu/docs/libtool/libtool_toc.html, the
-libtool manual} by Gordon Matzigkeit, and the Cygnus configure manual by
-K. Richard Pixley.
-@end ifhtml
-
-@menu
-* Goals:: Goals.
-* Tools:: The tools.
-* History:: History.
-* Building:: Building.
-@end menu
-
-@node Goals
-@section Goals
-@cindex goals
-
-The GNU configure and build system has two main goals.
-
-The first is to simplify the development of portable programs. The
-system permits the developer to concentrate on writing the program,
-simplifying many details of portability across Unix and even Windows
-systems, and permitting the developer to describe how to build the
-program using simple rules rather than complex Makefiles.
-
-The second is to simplify the building of programs distributed as source
-code. All programs are built using a simple, standardized, two step
-process. The program builder need not install any special tools in
-order to build the program.
-
-@node Tools
-@section Tools
-
-The GNU configure and build system is comprised of several different
-tools. Program developers must build and install all of these tools.
-
-People who just want to build programs from distributed sources normally
-do not need any special tools beyond a Unix shell, a make program, and a
-C compiler.
-
-@table @asis
-@item autoconf
-provides a general portability framework, based on testing the features
-of the host system at build time.
-@item automake
-a system for describing how to build a program, permitting the developer
-to write a simplified @file{Makefile}.
-@item libtool
-a standardized approach to building shared libraries.
-@item gettext
-provides a framework for translation of text messages into other
-languages; not really discussed in this document.
-@item m4
-autoconf requires the GNU version of m4; the standard Unix m4 does not
-suffice.
-@item perl
-automake requires perl.
-@end table
-
-@node History
-@section History
-@cindex history
-
-This is a very brief and probably inaccurate history.
-
-As the number of Unix variants increased during the 1980s, it became
-harder to write programs which could run on all variants. While it was
-often possible to use @code{#ifdef} to identify particular systems,
-developers frequently did not have access to every system, and the
-characteristics of some systems changed from version to version.
-
-By 1992, at least three different approaches had been developed:
-@itemize @bullet
-@item
-The Metaconfig program, by Larry Wall, Harlan Stenn, and Raphael
-Manfredi.
-@item
-The Cygnus configure script, by K. Richard Pixley, and the gcc configure
-script, by Richard Stallman. These use essentially the same approach,
-and the developers communicated regularly.
-@item
-The autoconf program, by David MacKenzie.
-@end itemize
-
-The Metaconfig program is still used for Perl and a few other programs.
-It is part of the Dist package. I do not know if it is being developed.
-
-In 1994, David MacKenzie and others modified autoconf to incorporate all
-the features of Cygnus configure. Since then, there has been a slow but
-steady conversion of GNU programs from Cygnus configure to autoconf. gcc
-has been converted, eliminating the gcc configure script.
-
-GNU autoconf was regularly maintained until late 1996. As of this
-writing in June, 1998, it has no public maintainer.
-
-Most programs are built using the make program, which requires the
-developer to write Makefiles describing how to build the programs.
-Since most programs are built in pretty much the same way, this led to a
-lot of duplication.
-
-The X Window system is built using the imake tool, which uses a database
-of rules to eliminate the duplication. However, building a tool which
-was developed using imake requires that the builder have imake
-installed, violating one of the goals of the GNU system.
-
-The new BSD make provides a standard library of Makefile fragments,
-which permits developers to write very simple Makefiles. However, this
-requires that the builder install the new BSD make program.
-
-In 1994, David MacKenzie wrote the first version of automake, which
-permitted writing a simple build description which was converted into a
-Makefile which could be used by the standard make program. In 1995, Tom
-Tromey completely rewrote automake in Perl, and he continues to enhance
-it.
-
-Various free packages built libraries, and by around 1995 several
-included support to build shared libraries on various platforms.
-However, there was no consistent approach. In early 1996, Gordon
-Matzigkeit began working on libtool, which provided a standardized
-approach to building shared libraries. This was integrated into
-automake from the start.
-
-The development of automake and libtool was driven by the GNITS project,
-a group of GNU maintainers who designed standardized tools to help meet
-the GNU coding standards.
-
-@node Building
-@section Building
-
-Most readers of this document should already know how to build a tool by
-running @samp{configure} and @samp{make}. This section may serve as a
-quick introduction or reminder.
-
-Building a tool is normally as simple as running @samp{configure}
-followed by @samp{make}. You should normally run @samp{configure} from
-an empty directory, using some path to refer to the @samp{configure}
-script in the source directory. The directory in which you run
-@samp{configure} is called the @dfn{object directory}.
-
-In order to use a object directory which is different from the source
-directory, you must be using the GNU version of @samp{make}, which has
-the required @samp{VPATH} support. Despite this restriction, using a
-different object directory is highly recommended:
-@itemize @bullet
-@item
-It keeps the files generated during the build from cluttering up your
-sources.
-@item
-It permits you to remove the built files by simply removing the entire
-build directory.
-@item
-It permits you to build from the same sources with several sets of
-configure options simultaneously.
-@end itemize
-
-If you don't have GNU @samp{make}, you will have to run @samp{configure}
-in the source directory. All GNU packages should support this; in
-particular, GNU packages should not assume the presence of GNU
-@samp{make}.
-
-After running @samp{configure}, you can build the tools by running
-@samp{make}.
-
-To install the tools, run @samp{make install}. Installing the tools
-will copy the programs and any required support files to the
-@dfn{installation directory}. The location of the installation
-directory is controlled by @samp{configure} options, as described below.
-
-In the Cygnus tree at present, the info files are built and installed as
-a separate step. To build them, run @samp{make info}. To install them,
-run @samp{make install-info}. The equivalent html files are also built
-and installed in a separate step. To build the html files, run
-@samp{make html}. To install the html files run @samp{make install-html}.
-
-All @samp{configure} scripts support a wide variety of options. The
-most interesting ones are @samp{--with} and @samp{--enable} options
-which are generally specific to particular tools. You can usually use
-the @samp{--help} option to get a list of interesting options for a
-particular configure script.
-
-The only generic options you are likely to use are the @samp{--prefix}
-and @samp{--exec-prefix} options. These options are used to specify the
-installation directory.
-
-The directory named by the @samp{--prefix} option will hold machine
-independent files such as info files.
-
-The directory named by the @samp{--exec-prefix} option, which is
-normally a subdirectory of the @samp{--prefix} directory, will hold
-machine dependent files such as executables.
-
-The default for @samp{--prefix} is @file{/usr/local}. The default for
-@samp{--exec-prefix} is the value used for @samp{--prefix}.
-
-The convention used in Cygnus releases is to use a @samp{--prefix}
-option of @file{/usr/cygnus/@var{release}}, where @var{release} is the
-name of the release, and to use a @samp{--exec-prefix} option of
-@file{/usr/cygnus/@var{release}/H-@var{host}}, where @var{host} is the
-configuration name of the host system (@pxref{Configuration Names}).
-
-Do not use either the source or the object directory as the installation
-directory. That will just lead to confusion.
-
-@node Getting Started
-@chapter Getting Started
-
-To start using the GNU configure and build system with your software
-package, you must write three files, and you must run some tools to
-manually generate additional files.
-
-@menu
-* Write configure.in:: Write configure.in.
-* Write Makefile.am:: Write Makefile.am.
-* Write acconfig.h:: Write acconfig.h.
-* Generate files:: Generate files.
-* Getting Started Example:: Example.
-@end menu
-
-@node Write configure.in
-@section Write configure.in
-@cindex @file{configure.in}, writing
-
-You must first write the file @file{configure.in}. This is an autoconf
-input file, and the autoconf manual describes in detail what this file
-should look like.
-
-You will write tests in your @file{configure.in} file to check for
-conditions that may change from one system to another, such as the
-presence of particular header files or functions.
-
-For example, not all systems support the @samp{gettimeofday} function.
-If you want to use the @samp{gettimeofday} function when it is
-available, and to use some other function when it is not, you would
-check for this by putting @samp{AC_CHECK_FUNCS(gettimeofday)} in
-@file{configure.in}.
-
-When the configure script is run at build time, this will arrange to
-define the preprocessor macro @samp{HAVE_GETTIMEOFDAY} to the value 1 if
-the @samp{gettimeofday} function is available, and to not define the
-macro at all if the function is not available. Your code can then use
-@samp{#ifdef} to test whether it is safe to call @samp{gettimeofday}.
-
-If you have an existing body of code, the @samp{autoscan} program may
-help identify potential portability problems, and hence configure tests
-that you will want to use.
-@ifnothtml
-@xref{Invoking autoscan, , , autoconf, the autoconf manual}.
-@end ifnothtml
-@ifhtml
-See @uref{http://www.delorie.com/gnu/docs/autoconf/autoconf_4.html, the
-autoscan documentation}.
-@end ifhtml
-
-Another handy tool for an existing body of code is @samp{ifnames}. This
-will show you all the preprocessor conditionals that the code already
-uses.
-@ifnothtml
-@xref{Invoking ifnames, , , autoconf, the autoconf manual}.
-@end ifnothtml
-@ifhtml
-See @uref{http://www.delorie.com/gnu/docs/autoconf/autoconf_5.html, the
-ifnames documentation}.
-@end ifhtml
-
-Besides the portability tests which are specific to your particular
-package, every @file{configure.in} file should contain the following
-macros.
-
-@table @samp
-@item AC_INIT
-@cindex @samp{AC_INIT}
-This macro takes a single argument, which is the name of a file in your
-package. For example, @samp{AC_INIT(foo.c)}.
-
-@item AC_PREREQ(@var{VERSION})
-@cindex @samp{AC_PREREQ}
-This macro is optional. It may be used to indicate the version of
-@samp{autoconf} that you are using. This will prevent users from
-running an earlier version of @samp{autoconf} and perhaps getting an
-invalid @file{configure} script. For example, @samp{AC_PREREQ(2.12)}.
-
-@item AM_INIT_AUTOMAKE
-@cindex @samp{AM_INIT_AUTOMAKE}
-This macro takes two arguments: the name of the package, and a version
-number. For example, @samp{AM_INIT_AUTOMAKE(foo, 1.0)}. (This macro is
-not needed if you are not using automake).
-
-@item AM_CONFIG_HEADER
-@cindex @samp{AM_CONFIG_HEADER}
-This macro names the header file which will hold the preprocessor macro
-definitions at run time. Normally this should be @file{config.h}. Your
-sources would then use @samp{#include "config.h"} to include it.
-
-This macro may optionally name the input file for that header file; by
-default, this is @file{config.h.in}, but that file name works poorly on
-DOS filesystems. Therefore, it is often better to name it explicitly as
-@file{config.in}.
-
-This is what you should normally put in @file{configure.in}:
-@example
-AM_CONFIG_HEADER(config.h:config.in)
-@end example
-
-@cindex @samp{AC_CONFIG_HEADER}
-(If you are not using automake, use @samp{AC_CONFIG_HEADER} rather than
-@samp{AM_CONFIG_HEADER}).
-
-@item AM_MAINTAINER_MODE
-@cindex @samp{AM_MAINTAINER_MODE}
-This macro always appears in Cygnus configure scripts. Other programs
-may or may not use it.
-
-If this macro is used, the @samp{--enable-maintainer-mode} option is
-required to enable automatic rebuilding of generated files used by the
-configure system. This of course requires that developers be aware of,
-and use, that option.
-
-If this macro is not used, then the generated files will always be
-rebuilt automatically. This will cause problems if the wrong versions
-of autoconf, automake, or others are in the builder's @samp{PATH}.
-
-(If you are not using automake, you do not need to use this macro).
-
-@item AC_EXEEXT
-@cindex @samp{AC_EXEEXT}
-@cindex @samp{AM_EXEEXT}
-Either this macro or @samp{AM_EXEEXT} always appears in Cygnus configure
-files. Other programs may or may not use one of them.
-
-This macro looks for the executable suffix used on the host system. On
-Unix systems, this is the empty string. On Windows systems, this is
-@samp{.exe}. This macro directs automake to use the executable suffix
-as appropriate when creating programs. This macro does not take any
-arguments.
-
-The @samp{AC_EXEEXT} form is new, and is part of a Cygnus patch to
-autoconf to support compiling with Visual C++. Older programs use
-@samp{AM_EXEEXT} instead.
-
-(Programs which do not use automake use neither @samp{AC_EXEEXT} nor
-@samp{AM_EXEEXT}).
-
-@item AC_PROG_CC
-@cindex @samp{AC_PROG_CC}
-If you are writing C code, you will normally want to use this macro. It
-locates the C compiler to use. It does not take any arguments.
-
-However, if this @file{configure.in} file is for a library which is to
-be compiled by a cross compiler which may not fully work, then you will
-not want to use @samp{AC_PROG_CC}. Instead, you will want to use a
-variant which does not call the macro @samp{AC_PROG_CC_WORKS}. Examples
-can be found in various @file{configure.in} files for libraries that are
-compiled with cross compilers, such as libiberty or libgloss. This is
-essentially a bug in autoconf, and there will probably be a better
-workaround at some point.
-
-@item AC_PROG_CXX
-@cindex @samp{AC_PROG_CXX}
-If you are writing C++ code, you will want to use this macro. It
-locates the C++ compiler to use. It does not take any arguments. The
-same cross compiler comments apply as for @samp{AC_PROG_CC}.
-
-@item AM_PROG_LIBTOOL
-@cindex @samp{AM_PROG_LIBTOOL}
-If you want to build libraries, and you want to permit them to be
-shared, or you want to link against libraries which were built using
-libtool, then you will need this macro. This macro is required in order
-to use libtool.
-
-@cindex @samp{AM_DISABLE_SHARED}
-By default, this will cause all libraries to be built as shared
-libraries. To prevent this--to change the default--use
-@samp{AM_DISABLE_SHARED} before @samp{AM_PROG_LIBTOOL}. The configure
-options @samp{--enable-shared} and @samp{--disable-shared} may be used
-to override the default at build time.
-
-@item AC_DEFINE(_GNU_SOURCE)
-@cindex @samp{_GNU_SOURCE}
-GNU packages should normally include this line before any other feature
-tests. This defines the macro @samp{_GNU_SOURCE} when compiling, which
-directs the libc header files to provide the standard GNU system
-interfaces including all GNU extensions. If this macro is not defined,
-certain GNU extensions may not be available.
-
-@item AC_OUTPUT
-@cindex @samp{AC_OUTPUT}
-This macro takes a list of file names which the configure process should
-produce. This is normally a list of one or more @file{Makefile} files
-in different directories. If your package lives entirely in a single
-directory, you would use simply @samp{AC_OUTPUT(Makefile)}. If you also
-have, for example, a @file{lib} subdirectory, you would use
-@samp{AC_OUTPUT(Makefile lib/Makefile)}.
-@end table
-
-If you want to use locally defined macros in your @file{configure.in}
-file, then you will need to write a @file{acinclude.m4} file which
-defines them (if not using automake, this file is called
-@file{aclocal.m4}). Alternatively, you can put separate macros in an
-@file{m4} subdirectory, and put @samp{ACLOCAL_AMFLAGS = -I m4} in your
-@file{Makefile.am} file so that the @samp{aclocal} program will be able
-to find them.
-
-The different macro prefixes indicate which tool defines the macro.
-Macros which start with @samp{AC_} are part of autoconf. Macros which
-start with @samp{AM_} are provided by automake or libtool.
-
-@node Write Makefile.am
-@section Write Makefile.am
-@cindex @file{Makefile.am}, writing
-
-You must write the file @file{Makefile.am}. This is an automake input
-file, and the automake manual describes in detail what this file should
-look like.
-
-The automake commands in @file{Makefile.am} mostly look like variable
-assignments in a @file{Makefile}. automake recognizes special variable
-names, and automatically add make rules to the output as needed.
-
-There will be one @file{Makefile.am} file for each directory in your
-package. For each directory with subdirectories, the @file{Makefile.am}
-file should contain the line
-@smallexample
-SUBDIRS = @var{dir} @var{dir} @dots{}
-@end smallexample
-@noindent
-where each @var{dir} is the name of a subdirectory.
-
-For each @file{Makefile.am}, there should be a corresponding
-@file{Makefile} in the @samp{AC_OUTPUT} macro in @file{configure.in}.
-
-Every @file{Makefile.am} written at Cygnus should contain the line
-@smallexample
-AUTOMAKE_OPTIONS = cygnus
-@end smallexample
-@noindent
-This puts automake into Cygnus mode. See the automake manual for
-details.
-
-You may to include the version number of @samp{automake} that you are
-using on the @samp{AUTOMAKE_OPTIONS} line. For example,
-@smallexample
-AUTOMAKE_OPTIONS = cygnus 1.3
-@end smallexample
-@noindent
-This will prevent users from running an earlier version of
-@samp{automake} and perhaps getting an invalid @file{Makefile.in}.
-
-If your package builds a program, then in the directory where that
-program is built you will normally want a line like
-@smallexample
-bin_PROGRAMS = @var{program}
-@end smallexample
-@noindent
-where @var{program} is the name of the program. You will then want a
-line like
-@smallexample
-@var{program}_SOURCES = @var{file} @var{file} @dots{}
-@end smallexample
-@noindent
-where each @var{file} is the name of a source file to link into the
-program (e.g., @samp{foo.c}).
-
-If your package builds a library, and you do not want the library to
-ever be built as a shared library, then in the directory where that
-library is built you will normally want a line like
-@smallexample
-lib_LIBRARIES = lib@var{name}.a
-@end smallexample
-@noindent
-where @samp{lib@var{name}.a} is the name of the library. You will then
-want a line like
-@smallexample
-lib@var{name}_a_SOURCES = @var{file} @var{file} @dots{}
-@end smallexample
-@noindent
-where each @var{file} is the name of a source file to add to the
-library.
-
-If your package builds a library, and you want to permit building the
-library as a shared library, then in the directory where that library is
-built you will normally want a line like
-@smallexample
-lib_LTLIBRARIES = lib@var{name}.la
-@end smallexample
-The use of @samp{LTLIBRARIES}, and the @samp{.la} extension, indicate a
-library to be built using libtool. As usual, you will then want a line
-like
-@smallexample
-lib@var{name}_la_SOURCES = @var{file} @var{file} @dots{}
-@end smallexample
-
-The strings @samp{bin} and @samp{lib} that appear above in
-@samp{bin_PROGRAMS} and @samp{lib_LIBRARIES} are not arbitrary. They
-refer to particular directories, which may be set by the @samp{--bindir}
-and @samp{--libdir} options to @file{configure}. If those options are
-not used, the default values are based on the @samp{--prefix} or
-@samp{--exec-prefix} options to @file{configure}. It is possible to use
-other names if the program or library should be installed in some other
-directory.
-
-The @file{Makefile.am} file may also contain almost anything that may
-appear in a normal @file{Makefile}. automake also supports many other
-special variables, as well as conditionals.
-
-See the automake manual for more information.
-
-@node Write acconfig.h
-@section Write acconfig.h
-@cindex @file{acconfig.h}, writing
-
-If you are generating a portability header file, (i.e., you are using
-@samp{AM_CONFIG_HEADER} in @file{configure.in}), then you will have to
-write a @file{acconfig.h} file. It will have to contain the following
-lines.
-
-@smallexample
-/* Name of package. */
-#undef PACKAGE
-
-/* Version of package. */
-#undef VERSION
-@end smallexample
-
-This requirement is really a bug in the system, and the requirement may
-be eliminated at some later date.
-
-The @file{acconfig.h} file will also similar comment and @samp{#undef}
-lines for any unusual macros in the @file{configure.in} file, including
-any macro which appears in a @samp{AC_DEFINE} macro.
-
-In particular, if you are writing a GNU package and therefore include
-@samp{AC_DEFINE(_GNU_SOURCE)} in @file{configure.in} as suggested above,
-you will need lines like this in @file{acconfig.h}:
-@smallexample
-/* Enable GNU extensions. */
-#undef _GNU_SOURCE
-@end smallexample
-
-Normally the @samp{autoheader} program will inform you of any such
-requirements by printing an error message when it is run. However, if
-you do anything particular odd in your @file{configure.in} file, you
-will have to make sure that the right entries appear in
-@file{acconfig.h}, since otherwise the results of the tests may not be
-available in the @file{config.h} file which your code will use.
-
-(Thee @samp{PACKAGE} and @samp{VERSION} lines are not required if you
-are not using automake, and in that case you may not need a
-@file{acconfig.h} file at all).
-
-@node Generate files
-@section Generate files
-
-Once you have written @file{configure.in}, @file{Makefile.am},
-@file{acconfig.h}, and possibly @file{acinclude.m4}, you must use
-autoconf and automake programs to produce the first versions of the
-generated files. This is done by executing the following sequence of
-commands.
-
-@smallexample
-aclocal
-autoconf
-autoheader
-automake
-@end smallexample
-
-The @samp{aclocal} and @samp{automake} commands are part of the automake
-package, and the @samp{autoconf} and @samp{autoheader} commands are part
-of the autoconf package.
-
-If you are using a @file{m4} subdirectory for your macros, you will need
-to use the @samp{-I m4} option when you run @samp{aclocal}.
-
-If you are not using the Cygnus tree, use the @samp{-a} option when
-running @samp{automake} command in order to copy the required support
-files into your source directory.
-
-If you are using libtool, you must build and install the libtool package
-with the same @samp{--prefix} and @samp{--exec-prefix} options as you
-used with the autoconf and automake packages. You must do this before
-running any of the above commands. If you are not using the Cygnus
-tree, you will need to run the @samp{libtoolize} program to copy the
-libtool support files into your directory.
-
-Once you have managed to run these commands without getting any errors,
-you should create a new empty directory, and run the @samp{configure}
-script which will have been created by @samp{autoconf} with the
-@samp{--enable-maintainer-mode} option. This will give you a set of
-Makefiles which will include rules to automatically rebuild all the
-generated files.
-
-After doing that, whenever you have changed some of the input files and
-want to regenerated the other files, go to your object directory and run
-@samp{make}. Doing this is more reliable than trying to rebuild the
-files manually, because there are complex order dependencies and it is
-easy to forget something.
-
-@node Getting Started Example
-@section Example
-
-Let's consider a trivial example.
-
-Suppose we want to write a simple version of @samp{touch}. Our program,
-which we will call @samp{poke}, will take a single file name argument,
-and use the @samp{utime} system call to set the modification and access
-times of the file to the current time. We want this program to be
-highly portable.
-
-We'll first see what this looks like without using autoconf and
-automake, and then see what it looks like with them.
-
-@menu
-* Getting Started Example 1:: First Try.
-* Getting Started Example 2:: Second Try.
-* Getting Started Example 3:: Third Try.
-* Generate Files in Example:: Generate Files.
-@end menu
-
-@node Getting Started Example 1
-@subsection First Try
-
-Here is our first try at @samp{poke.c}. Note that we've written it
-without ANSI/ISO C prototypes, since we want it to be highly portable.
-
-@example
-#include <stdio.h>
-#include <stdlib.h>
-#include <sys/types.h>
-#include <utime.h>
-
-int
-main (argc, argv)
- int argc;
- char **argv;
-@{
- if (argc != 2)
- @{
- fprintf (stderr, "Usage: poke file\n");
- exit (1);
- @}
-
- if (utime (argv[1], NULL) < 0)
- @{
- perror ("utime");
- exit (1);
- @}
-
- exit (0);
-@}
-@end example
-
-We also write a simple @file{Makefile}.
-
-@example
-CC = gcc
-CFLAGS = -g -O2
-
-all: poke
-
-poke: poke.o
- $(CC) -o poke $(CFLAGS) $(LDFLAGS) poke.o
-@end example
-
-So far, so good.
-
-Unfortunately, there are a few problems.
-
-On older Unix systems derived from BSD 4.3, the @samp{utime} system call
-does not accept a second argument of @samp{NULL}. On those systems, we
-need to pass a pointer to @samp{struct utimbuf} structure.
-Unfortunately, even older systems don't define that structure; on those
-systems, we need to pass an array of two @samp{long} values.
-
-The header file @file{stdlib.h} was invented by ANSI C, and older
-systems don't have a copy. We included it above to get a declaration of
-@samp{exit}.
-
-We can find some of these portability problems by running
-@samp{autoscan}, which will create a @file{configure.scan} file which we
-can use as a prototype for our @file{configure.in} file. I won't show
-the output, but it will notice the potential problems with @samp{utime}
-and @file{stdlib.h}.
-
-In our @file{Makefile}, we don't provide any way to install the program.
-This doesn't matter much for such a simple example, but a real program
-will need an @samp{install} target. For that matter, we will also want
-a @samp{clean} target.
-
-@node Getting Started Example 2
-@subsection Second Try
-
-Here is our second try at this program.
-
-We modify @file{poke.c} to use preprocessor macros to control what
-features are available. (I've cheated a bit by using the same macro
-names which autoconf will use).
-
-@example
-#include <stdio.h>
-
-#ifdef STDC_HEADERS
-#include <stdlib.h>
-#endif
-
-#include <sys/types.h>
-
-#ifdef HAVE_UTIME_H
-#include <utime.h>
-#endif
-
-#ifndef HAVE_UTIME_NULL
-
-#include <time.h>
-
-#ifndef HAVE_STRUCT_UTIMBUF
-
-struct utimbuf
-@{
- long actime;
- long modtime;
-@};
-
-#endif
-
-static int
-utime_now (file)
- char *file;
-@{
- struct utimbuf now;
-
- now.actime = now.modtime = time (NULL);
- return utime (file, &now);
-@}
-
-#define utime(f, p) utime_now (f)
-
-#endif /* HAVE_UTIME_NULL */
-
-int
-main (argc, argv)
- int argc;
- char **argv;
-@{
- if (argc != 2)
- @{
- fprintf (stderr, "Usage: poke file\n");
- exit (1);
- @}
-
- if (utime (argv[1], NULL) < 0)
- @{
- perror ("utime");
- exit (1);
- @}
-
- exit (0);
-@}
-@end example
-
-Here is the associated @file{Makefile}. We've added support for the
-preprocessor flags we use. We've also added @samp{install} and
-@samp{clean} targets.
-
-@example
-# Set this to your installation directory.
-bindir = /usr/local/bin
-
-# Uncomment this if you have the standard ANSI/ISO C header files.
-# STDC_HDRS = -DSTDC_HEADERS
-
-# Uncomment this if you have utime.h.
-# UTIME_H = -DHAVE_UTIME_H
-
-# Uncomment this if utime (FILE, NULL) works on your system.
-# UTIME_NULL = -DHAVE_UTIME_NULL
-
-# Uncomment this if struct utimbuf is defined in utime.h.
-# UTIMBUF = -DHAVE_STRUCT_UTIMBUF
-
-CC = gcc
-CFLAGS = -g -O2
-
-ALL_CFLAGS = $(STDC_HDRS) $(UTIME_H) $(UTIME_NULL) $(UTIMBUF) $(CFLAGS)
-
-all: poke
-
-poke: poke.o
- $(CC) -o poke $(ALL_CFLAGS) $(LDFLAGS) poke.o
-
-.c.o:
- $(CC) -c $(ALL_CFLAGS) poke.c
-
-install: poke
- cp poke $(bindir)/poke
-
-clean:
- rm poke poke.o
-@end example
-
-Some problems with this approach should be clear.
-
-Users who want to compile poke will have to know how @samp{utime} works
-on their systems, so that they can uncomment the @file{Makefile}
-correctly.
-
-The installation is done using @samp{cp}, but many systems have an
-@samp{install} program which may be used, and which supports optional
-features such as stripping debugging information out of the installed
-binary.
-
-The use of @file{Makefile} variables like @samp{CC}, @samp{CFLAGS} and
-@samp{LDFLAGS} follows the requirements of the GNU standards. This is
-convenient for all packages, since it reduces surprises for users.
-However, it is easy to get the details wrong, and wind up with a
-slightly nonstandard distribution.
-
-@node Getting Started Example 3
-@subsection Third Try
-
-For our third try at this program, we will write a @file{configure.in}
-script to discover the configuration features on the host system, rather
-than requiring the user to edit the @file{Makefile}. We will also write
-a @file{Makefile.am} rather than a @file{Makefile}.
-
-The only change to @file{poke.c} is to add a line at the start of the
-file:
-@smallexample
-#include "config.h"
-@end smallexample
-
-The new @file{configure.in} file is as follows.
-
-@example
-AC_INIT(poke.c)
-AM_INIT_AUTOMAKE(poke, 1.0)
-AM_CONFIG_HEADER(config.h:config.in)
-AC_PROG_CC
-AC_HEADER_STDC
-AC_CHECK_HEADERS(utime.h)
-AC_EGREP_HEADER(utimbuf, utime.h, AC_DEFINE(HAVE_STRUCT_UTIMBUF))
-AC_FUNC_UTIME_NULL
-AC_OUTPUT(Makefile)
-@end example
-
-The first four macros in this file, and the last one, were described
-above; see @ref{Write configure.in}. If we omit these macros, then when
-we run @samp{automake} we will get a reminder that we need them.
-
-The other macros are standard autoconf macros.
-
-@table @samp
-@item AC_HEADER_STDC
-Check for standard C headers.
-@item AC_CHECK_HEADERS
-Check whether a particular header file exists.
-@item AC_EGREP_HEADER
-Check for a particular string in a particular header file, in this case
-checking for @samp{utimbuf} in @file{utime.h}.
-@item AC_FUNC_UTIME_NULL
-Check whether @samp{utime} accepts a NULL second argument to set the
-file change time to the current time.
-@end table
-
-See the autoconf manual for a more complete description.
-
-The new @file{Makefile.am} file is as follows. Note how simple this is
-compared to our earlier @file{Makefile}.
-
-@example
-bin_PROGRAMS = poke
-
-poke_SOURCES = poke.c
-@end example
-
-This means that we should build a single program name @samp{poke}. It
-should be installed in the binary directory, which we called
-@samp{bindir} earlier. The program @samp{poke} is built from the source
-file @file{poke.c}.
-
-We must also write a @file{acconfig.h} file. Besides @samp{PACKAGE} and
-@samp{VERSION}, which must be mentioned for all packages which use
-automake, we must include @samp{HAVE_STRUCT_UTIMBUF}, since we mentioned
-it in an @samp{AC_DEFINE}.
-
-@example
-/* Name of package. */
-#undef PACKAGE
-
-/* Version of package. */
-#undef VERSION
-
-/* Whether utime.h defines struct utimbuf. */
-#undef HAVE_STRUCT_UTIMBUF
-@end example
-
-@node Generate Files in Example
-@subsection Generate Files
-
-We must now generate the other files, using the following commands.
-
-@smallexample
-aclocal
-autoconf
-autoheader
-automake
-@end smallexample
-
-When we run @samp{autoheader}, it will remind us of any macros we forgot
-to add to @file{acconfig.h}.
-
-When we run @samp{automake}, it will want to add some files to our
-distribution. It will add them automatically if we use the
-@samp{--add-missing} option.
-
-By default, @samp{automake} will run in GNU mode, which means that it
-will want us to create certain additional files; as of this writing, it
-will want @file{NEWS}, @file{README}, @file{AUTHORS}, and
-@file{ChangeLog}, all of which are files which should appear in a
-standard GNU distribution. We can either add those files, or run
-@samp{automake} with the @samp{--foreign} option.
-
-Running these tools will generate the following files, all of which are
-described in the next chapter.
-
-@itemize @bullet
-@item
-@file{aclocal.m4}
-@item
-@file{configure}
-@item
-@file{config.in}
-@item
-@file{Makefile.in}
-@item
-@file{stamp-h.in}
-@end itemize
-
-@node Files
-@chapter Files
-
-As was seen in the previous chapter, the GNU configure and build system
-uses a number of different files. The developer must write a few files.
-The others are generated by various tools.
-
-The system is rather flexible, and can be used in many different ways.
-In describing the files that it uses, I will describe the common case,
-and mention some other cases that may arise.
-
-@menu
-* Developer Files:: Developer Files.
-* Build Files:: Build Files.
-* Support Files:: Support Files.
-@end menu
-
-@node Developer Files
-@section Developer Files
-
-This section describes the files written or generated by the developer
-of a package.
-
-@menu
-* Developer Files Picture:: Developer Files Picture.
-* Written Developer Files:: Written Developer Files.
-* Generated Developer Files:: Generated Developer Files.
-@end menu
-
-@node Developer Files Picture
-@subsection Developer Files Picture
-
-Here is a picture of the files which are written by the developer, the
-generated files which would be included with a complete source
-distribution, and the tools which create those files.
-@ifinfo
-The file names are plain text and the tool names are enclosed by
-@samp{*} characters
-@end ifinfo
-@ifnotinfo
-The file names are in rectangles with square corners and the tool names
-are in rectangles with rounded corners
-@end ifnotinfo
-(e.g., @samp{autoheader} is the name of a tool, not the name of a file).
-
-@image{configdev,,,,jpg}
-
-@node Written Developer Files
-@subsection Written Developer Files
-
-The following files would be written by the developer.
-
-@table @file
-@item configure.in
-@cindex @file{configure.in}
-This is the configuration script. This script contains invocations of
-autoconf macros. It may also contain ordinary shell script code. This
-file will contain feature tests for portability issues. The last thing
-in the file will normally be an @samp{AC_OUTPUT} macro listing which
-files to create when the builder runs the configure script. This file
-is always required when using the GNU configure system. @xref{Write
-configure.in}.
-
-@item Makefile.am
-@cindex @file{Makefile.am}
-This is the automake input file. It describes how the code should be
-built. It consists of definitions of automake variables. It may also
-contain ordinary Makefile targets. This file is only needed when using
-automake (newer tools normally use automake, but there are still older
-tools which have not been converted, in which the developer writes
-@file{Makefile.in} directly). @xref{Write Makefile.am}.
-
-@item acconfig.h
-@cindex @file{acconfig.h}
-When the configure script creates a portability header file, by using
-@samp{AM_CONFIG_HEADER} (or, if not using automake,
-@samp{AC_CONFIG_HEADER}), this file is used to describe macros which are
-not recognized by the @samp{autoheader} command. This is normally a
-fairly uninteresting file, consisting of a collection of @samp{#undef}
-lines with comments. Normally any call to @samp{AC_DEFINE} in
-@file{configure.in} will require a line in this file. @xref{Write
-acconfig.h}.
-
-@item acinclude.m4
-@cindex @file{acinclude.m4}
-This file is not always required. It defines local autoconf macros.
-These macros may then be used in @file{configure.in}. If you don't need
-any local autoconf macros, then you don't need this file at all. In
-fact, in general, you never need local autoconf macros, since you can
-put everything in @file{configure.in}, but sometimes a local macro is
-convenient.
-
-Newer tools may omit @file{acinclude.m4}, and instead use a
-subdirectory, typically named @file{m4}, and define
-@samp{ACLOCAL_AMFLAGS = -I m4} in @file{Makefile.am} to force
-@samp{aclocal} to look there for macro definitions. The macro
-definitions are then placed in separate files in that directory.
-
-The @file{acinclude.m4} file is only used when using automake; in older
-tools, the developer writes @file{aclocal.m4} directly, if it is needed.
-@end table
-
-@node Generated Developer Files
-@subsection Generated Developer Files
-
-The following files would be generated by the developer.
-
-When using automake, these files are normally not generated manually
-after the first time. Instead, the generated @file{Makefile} contains
-rules to automatically rebuild the files as required. When
-@samp{AM_MAINTAINER_MODE} is used in @file{configure.in} (the normal
-case in Cygnus code), the automatic rebuilding rules will only be
-defined if you configure using the @samp{--enable-maintainer-mode}
-option.
-
-When using automatic rebuilding, it is important to ensure that all the
-various tools have been built and installed on your @samp{PATH}. Using
-automatic rebuilding is highly recommended, so much so that I'm not
-going to explain what you have to do if you don't use it.
-
-@table @file
-@item configure
-@cindex @file{configure}
-This is the configure script which will be run when building the
-package. This is generated by @samp{autoconf} from @file{configure.in}
-and @file{aclocal.m4}. This is a shell script.
-
-@item Makefile.in
-@cindex @file{Makefile.in}
-This is the file which the configure script will turn into the
-@file{Makefile} at build time. This file is generated by
-@samp{automake} from @file{Makefile.am}. If you aren't using automake,
-you must write this file yourself. This file is pretty much a normal
-@file{Makefile}, with some configure substitutions for certain
-variables.
-
-@item aclocal.m4
-@cindex @file{aclocal.m4}
-This file is created by the @samp{aclocal} program, based on the
-contents of @file{configure.in} and @file{acinclude.m4} (or, as noted in
-the description of @file{acinclude.m4} above, on the contents of an
-@file{m4} subdirectory). This file contains definitions of autoconf
-macros which @samp{autoconf} will use when generating the file
-@file{configure}. These autoconf macros may be defined by you in
-@file{acinclude.m4} or they may be defined by other packages such as
-automake, libtool or gettext. If you aren't using automake, you will
-normally write this file yourself; in that case, if @file{configure.in}
-uses only standard autoconf macros, this file will not be needed at all.
-
-@item config.in
-@cindex @file{config.in}
-@cindex @file{config.h.in}
-This file is created by @samp{autoheader} based on @file{acconfig.h} and
-@file{configure.in}. At build time, the configure script will define
-some of the macros in it to create @file{config.h}, which may then be
-included by your program. This permits your C code to use preprocessor
-conditionals to change its behaviour based on the characteristics of the
-host system. This file may also be called @file{config.h.in}.
-
-@item stamp.h-in
-@cindex @file{stamp-h.in}
-This rather uninteresting file, which I omitted from the picture, is
-generated by @samp{automake}. It always contains the string
-@samp{timestamp}. It is used as a timestamp file indicating whether
-@file{config.in} is up to date. Using a timestamp file means that
-@file{config.in} can be marked as up to date without actually changing
-its modification time. This is useful since @file{config.in} depends
-upon @file{configure.in}, but it is easy to change @file{configure.in}
-in a way which does not affect @file{config.in}.
-@end table
-
-@node Build Files
-@section Build Files
-
-This section describes the files which are created at configure and
-build time. These are the files which somebody who builds the package
-will see.
-
-Of course, the developer will also build the package. The distinction
-between developer files and build files is not that the developer does
-not see the build files, but that somebody who only builds the package
-does not have to worry about the developer files.
-
-@menu
-* Build Files Picture:: Build Files Picture.
-* Build Files Description:: Build Files Description.
-@end menu
-
-@node Build Files Picture
-@subsection Build Files Picture
-
-Here is a picture of the files which will be created at build time.
-@file{config.status} is both a created file and a shell script which is
-run to create other files, and the picture attempts to show that.
-
-@image{configbuild,,,,jpg}
-
-@node Build Files Description
-@subsection Build Files Description
-
-This is a description of the files which are created at build time.
-
-@table @file
-@item config.status
-@cindex @file{config.status}
-The first step in building a package is to run the @file{configure}
-script. The @file{configure} script will create the file
-@file{config.status}, which is itself a shell script. When you first
-run @file{configure}, it will automatically run @file{config.status}.
-An @file{Makefile} derived from an automake generated @file{Makefile.in}
-will contain rules to automatically run @file{config.status} again when
-necessary to recreate certain files if their inputs change.
-
-@item Makefile
-@cindex @file{Makefile}
-This is the file which make will read to build the program. The
-@file{config.status} script will transform @file{Makefile.in} into
-@file{Makefile}.
-
-@item config.h
-@cindex @file{config.h}
-This file defines C preprocessor macros which C code can use to adjust
-its behaviour on different systems. The @file{config.status} script
-will transform @file{config.in} into @file{config.h}.
-
-@item config.cache
-@cindex @file{config.cache}
-This file did not fit neatly into the picture, and I omitted it. It is
-used by the @file{configure} script to cache results between runs. This
-can be an important speedup. If you modify @file{configure.in} in such
-a way that the results of old tests should change (perhaps you have
-added a new library to @samp{LDFLAGS}), then you will have to remove
-@file{config.cache} to force the tests to be rerun.
-
-The autoconf manual explains how to set up a site specific cache file.
-This can speed up running @file{configure} scripts on your system.
-
-@item stamp.h
-@cindex @file{stamp-h}
-This file, which I omitted from the picture, is similar to
-@file{stamp-h.in}. It is used as a timestamp file indicating whether
-@file{config.h} is up to date. This is useful since @file{config.h}
-depends upon @file{config.status}, but it is easy for
-@file{config.status} to change in a way which does not affect
-@file{config.h}.
-@end table
-
-@node Support Files
-@section Support Files
-
-The GNU configure and build system requires several support files to be
-included with your distribution. You do not normally need to concern
-yourself with these. If you are using the Cygnus tree, most are already
-present. Otherwise, they will be installed with your source by
-@samp{automake} (with the @samp{--add-missing} option) and
-@samp{libtoolize}.
-
-You don't have to put the support files in the top level directory. You
-can put them in a subdirectory, and use the @samp{AC_CONFIG_AUX_DIR}
-macro in @file{configure.in} to tell @samp{automake} and the
-@file{configure} script where they are.
-
-In this section, I describe the support files, so that you can know what
-they are and why they are there.
-
-@table @file
-@item ABOUT-NLS
-Added by automake if you are using gettext. This is a documentation
-file about the gettext project.
-@item ansi2knr.c
-Used by an automake generated @file{Makefile} if you put @samp{ansi2knr}
-in @samp{AUTOMAKE_OPTIONS} in @file{Makefile.am}. This permits
-compiling ANSI C code with a K&R C compiler.
-@item ansi2knr.1
-The man page which goes with @file{ansi2knr.c}.
-@item config.guess
-A shell script which determines the configuration name for the system on
-which it is run.
-@item config.sub
-A shell script which canonicalizes a configuration name entered by a
-user.
-@item elisp-comp
-Used to compile Emacs LISP files.
-@item install-sh
-A shell script which installs a program. This is used if the configure
-script can not find an install binary.
-@item ltconfig
-Used by libtool. This is a shell script which configures libtool for
-the particular system on which it is used.
-@item ltmain.sh
-Used by libtool. This is the actual libtool script which is used, after
-it is configured by @file{ltconfig} to build a library.
-@item mdate-sh
-A shell script used by an automake generated @file{Makefile} to pretty
-print the modification time of a file. This is used to maintain version
-numbers for texinfo files.
-@item missing
-A shell script used if some tool is missing entirely. This is used by
-an automake generated @file{Makefile} to avoid certain sorts of
-timestamp problems.
-@item mkinstalldirs
-A shell script which creates a directory, including all parent
-directories. This is used by an automake generated @file{Makefile}
-during installation.
-@item texinfo.tex
-Required if you have any texinfo files. This is used when converting
-Texinfo files into DVI using @samp{texi2dvi} and @TeX{}.
-@item ylwrap
-A shell script used by an automake generated @file{Makefile} to run
-programs like @samp{bison}, @samp{yacc}, @samp{flex}, and @samp{lex}.
-These programs default to producing output files with a fixed name, and
-the @file{ylwrap} script runs them in a subdirectory to avoid file name
-conflicts when using a parallel make program.
-@end table
-
-@node Configuration Names
-@chapter Configuration Names
-@cindex configuration names
-@cindex configuration triplets
-@cindex triplets
-@cindex host names
-@cindex host triplets
-@cindex canonical system names
-@cindex system names
-@cindex system types
-
-The GNU configure system names all systems using a @dfn{configuration
-name}. All such names used to be triplets (they may now contain four
-parts in certain cases), and the term @dfn{configuration triplet} is
-still seen.
-
-@menu
-* Configuration Name Definition:: Configuration Name Definition.
-* Using Configuration Names:: Using Configuration Names.
-@end menu
-
-@node Configuration Name Definition
-@section Configuration Name Definition
-
-This is a string of the form
-@var{cpu}-@var{manufacturer}-@var{operating_system}. In some cases,
-this is extended to a four part form:
-@var{cpu}-@var{manufacturer}-@var{kernel}-@var{operating_system}.
-
-When using a configuration name in a configure option, it is normally
-not necessary to specify an entire name. In particular, the
-@var{manufacturer} field is often omitted, leading to strings such as
-@samp{i386-linux} or @samp{sparc-sunos}. The shell script
-@file{config.sub} will translate these shortened strings into the
-canonical form. autoconf will arrange for @file{config.sub} to be run
-automatically when it is needed.
-
-The fields of a configuration name are as follows:
-
-@table @var
-@item cpu
-The type of processor. This is typically something like @samp{i386} or
-@samp{sparc}. More specific variants are used as well, such as
-@samp{mipsel} to indicate a little endian MIPS processor.
-@item manufacturer
-A somewhat freeform field which indicates the manufacturer of the
-system. This is often simply @samp{unknown}. Other common strings are
-@samp{pc} for an IBM PC compatible system, or the name of a workstation
-vendor, such as @samp{sun}.
-@item operating_system
-The name of the operating system which is run on the system. This will
-be something like @samp{solaris2.5} or @samp{irix6.3}. There is no
-particular restriction on the version number, and strings like
-@samp{aix4.1.4.0} are seen. For an embedded system, which has no
-operating system, this field normally indicates the type of object file
-format, such as @samp{elf} or @samp{coff}.
-@item kernel
-This is used mainly for GNU/Linux. A typical GNU/Linux configuration
-name is @samp{i586-pc-linux-gnulibc1}. In this case the kernel,
-@samp{linux}, is separated from the operating system, @samp{gnulibc1}.
-@end table
-
-The shell script @file{config.guess} will normally print the correct
-configuration name for the system on which it is run. It does by
-running @samp{uname} and by examining other characteristics of the
-system.
-
-Because @file{config.guess} can normally determine the configuration
-name for a machine, it is normally only necessary to specify a
-configuration name when building a cross-compiler or when building using
-a cross-compiler.
-
-@node Using Configuration Names
-@section Using Configuration Names
-
-A configure script will sometimes have to make a decision based on a
-configuration name. You will need to do this if you have to compile
-code differently based on something which can not be tested using a
-standard autoconf feature test.
-
-It is normally better to test for particular features, rather than to
-test for a particular system. This is because as Unix evolves,
-different systems copy features from one another. Even if you need to
-determine whether the feature is supported based on a configuration
-name, you should define a macro which describes the feature, rather than
-defining a macro which describes the particular system you are on.
-
-Testing for a particular system is normally done using a case statement
-in @file{configure.in}. The case statement might look something like
-the following, assuming that @samp{host} is a shell variable holding a
-canonical configuration name (which will be the case if
-@file{configure.in} uses the @samp{AC_CANONICAL_HOST} or
-@samp{AC_CANONICAL_SYSTEM} macro).
-
-@smallexample
-case "$@{host@}" in
-i[3-7]86-*-linux-gnu*) do something ;;
-sparc*-sun-solaris2.[56789]*) do something ;;
-sparc*-sun-solaris*) do something ;;
-mips*-*-elf*) do something ;;
-esac
-@end smallexample
-
-It is particularly important to use @samp{*} after the operating system
-field, in order to match the version number which will be generated by
-@file{config.guess}.
-
-In most cases you must be careful to match a range of processor types.
-For most processor families, a trailing @samp{*} suffices, as in
-@samp{mips*} above. For the i386 family, something along the lines of
-@samp{i[3-7]86} suffices at present. For the m68k family, you will
-need something like @samp{m68*}. Of course, if you do not need to match
-on the processor, it is simpler to just replace the entire field by a
-@samp{*}, as in @samp{*-*-irix*}.
-
-@node Cross Compilation Tools
-@chapter Cross Compilation Tools
-@cindex cross tools
-
-The GNU configure and build system can be used to build @dfn{cross
-compilation} tools. A cross compilation tool is a tool which runs on
-one system and produces code which runs on another system.
-
-@menu
-* Cross Compilation Concepts:: Cross Compilation Concepts.
-* Host and Target:: Host and Target.
-* Using the Host Type:: Using the Host Type.
-* Specifying the Target:: Specifying the Target.
-* Using the Target Type:: Using the Target Type.
-* Cross Tools in the Cygnus Tree:: Cross Tools in the Cygnus Tree
-@end menu
-
-@node Cross Compilation Concepts
-@section Cross Compilation Concepts
-
-@cindex cross compiler
-A compiler which produces programs which run on a different system is a
-cross compilation compiler, or simply a @dfn{cross compiler}.
-Similarly, we speak of cross assemblers, cross linkers, etc.
-
-In the normal case, a compiler produces code which runs on the same
-system as the one on which the compiler runs. When it is necessary to
-distinguish this case from the cross compilation case, such a compiler
-is called a @dfn{native compiler}. Similarly, we speak of native
-assemblers, etc.
-
-Although the debugger is not strictly speaking a compilation tool, it is
-nevertheless meaningful to speak of a cross debugger: a debugger which
-is used to debug code which runs on another system. Everything that is
-said below about configuring cross compilation tools applies to the
-debugger as well.
-
-@node Host and Target
-@section Host and Target
-@cindex host system
-@cindex target system
-
-When building cross compilation tools, there are two different systems
-involved: the system on which the tools will run, and the system for
-which the tools generate code.
-
-The system on which the tools will run is called the @dfn{host} system.
-
-The system for which the tools generate code is called the @dfn{target}
-system.
-
-For example, suppose you have a compiler which runs on a GNU/Linux
-system and generates ELF programs for a MIPS embedded system. In this
-case the GNU/Linux system is the host, and the MIPS ELF system is the
-target. Such a compiler could be called a GNU/Linux cross MIPS ELF
-compiler, or, equivalently, a @samp{i386-linux-gnu} cross
-@samp{mips-elf} compiler.
-
-Naturally, most programs are not cross compilation tools. For those
-programs, it does not make sense to speak of a target. It only makes
-sense to speak of a target for tools like @samp{gcc} or the
-@samp{binutils} which actually produce running code. For example, it
-does not make sense to speak of the target of a tool like @samp{bison}
-or @samp{make}.
-
-Most cross compilation tools can also serve as native tools. For a
-native compilation tool, it is still meaningful to speak of a target.
-For a native tool, the target is the same as the host. For example, for
-a GNU/Linux native compiler, the host is GNU/Linux, and the target is
-also GNU/Linux.
-
-@node Using the Host Type
-@section Using the Host Type
-
-In almost all cases the host system is the system on which you run the
-@samp{configure} script, and on which you build the tools (for the case
-when they differ, @pxref{Canadian Cross}).
-
-@cindex @samp{AC_CANONICAL_HOST}
-If your configure script needs to know the configuration name of the
-host system, and the package is not a cross compilation tool and
-therefore does not have a target, put @samp{AC_CANONICAL_HOST} in
-@file{configure.in}. This macro will arrange to define a few shell
-variables when the @samp{configure} script is run.
-
-@table @samp
-@item host
-The canonical configuration name of the host. This will normally be
-determined by running the @file{config.guess} shell script, although the
-user is permitted to override this by using an explicit @samp{--host}
-option.
-@item host_alias
-In the unusual case that the user used an explicit @samp{--host} option,
-this will be the argument to @samp{--host}. In the normal case, this
-will be the same as the @samp{host} variable.
-@item host_cpu
-@itemx host_vendor
-@itemx host_os
-The first three parts of the canonical configuration name.
-@end table
-
-The shell variables may be used by putting shell code in
-@file{configure.in}. For an example, see @ref{Using Configuration
-Names}.
-
-@node Specifying the Target
-@section Specifying the Target
-
-By default, the @samp{configure} script will assume that the target is
-the same as the host. This is the more common case; for example, it
-leads to a native compiler rather than a cross compiler.
-
-@cindex @samp{--target} option
-@cindex target option
-@cindex configure target
-If you want to build a cross compilation tool, you must specify the
-target explicitly by using the @samp{--target} option when you run
-@samp{configure}. The argument to @samp{--target} is the configuration
-name of the system for which you wish to generate code.
-@xref{Configuration Names}.
-
-For example, to build tools which generate code for a MIPS ELF embedded
-system, you would use @samp{--target mips-elf}.
-
-@node Using the Target Type
-@section Using the Target Type
-
-@cindex @samp{AC_CANONICAL_SYSTEM}
-When writing @file{configure.in} for a cross compilation tool, you will
-need to use information about the target. To do this, put
-@samp{AC_CANONICAL_SYSTEM} in @file{configure.in}.
-
-@samp{AC_CANONICAL_SYSTEM} will look for a @samp{--target} option and
-canonicalize it using the @file{config.sub} shell script. It will also
-run @samp{AC_CANONICAL_HOST} (@pxref{Using the Host Type}).
-
-The target type will be recorded in the following shell variables. Note
-that the host versions of these variables will also be defined by
-@samp{AC_CANONICAL_HOST}.
-
-@table @samp
-@item target
-The canonical configuration name of the target.
-@item target_alias
-The argument to the @samp{--target} option. If the user did not specify
-a @samp{--target} option, this will be the same as @samp{host_alias}.
-@item target_cpu
-@itemx target_vendor
-@itemx target_os
-The first three parts of the canonical target configuration name.
-@end table
-
-Note that if @samp{host} and @samp{target} are the same string, you can
-assume a native configuration. If they are different, you can assume a
-cross configuration.
-
-It is arguably possible for @samp{host} and @samp{target} to represent
-the same system, but for the strings to not be identical. For example,
-if @samp{config.guess} returns @samp{sparc-sun-sunos4.1.4}, and somebody
-configures with @samp{--target sparc-sun-sunos4.1}, then the slight
-differences between the two versions of SunOS may be unimportant for
-your tool. However, in the general case it can be quite difficult to
-determine whether the differences between two configuration names are
-significant or not. Therefore, by convention, if the user specifies a
-@samp{--target} option without specifying a @samp{--host} option, it is
-assumed that the user wants to configure a cross compilation tool.
-
-The variables @samp{target} and @samp{target_alias} should be handled
-differently.
-
-In general, whenever the user may actually see a string,
-@samp{target_alias} should be used. This includes anything which may
-appear in the file system, such as a directory name or part of a tool
-name. It also includes any tool output, unless it is clearly labelled
-as the canonical target configuration name. This permits the user to
-use the @samp{--target} option to specify how the tool will appear to
-the outside world.
-
-On the other hand, when checking for characteristics of the target
-system, @samp{target} should be used. This is because a wide variety of
-@samp{--target} options may map into the same canonical configuration
-name. You should not attempt to duplicate the canonicalization done by
-@samp{config.sub} in your own code.
-
-By convention, cross tools are installed with a prefix of the argument
-used with the @samp{--target} option, also known as @samp{target_alias}
-(@pxref{Using the Target Type}). If the user does not use the
-@samp{--target} option, and thus is building a native tool, no prefix is
-used.
-
-For example, if gcc is configured with @samp{--target mips-elf}, then
-the installed binary will be named @samp{mips-elf-gcc}. If gcc is
-configured without a @samp{--target} option, then the installed binary
-will be named @samp{gcc}.
-
-The autoconf macro @samp{AC_ARG_PROGRAM} will handle this for you. If
-you are using automake, no more need be done; the programs will
-automatically be installed with the correct prefixes. Otherwise, see
-the autoconf documentation for @samp{AC_ARG_PROGRAM}.
-
-@node Cross Tools in the Cygnus Tree
-@section Cross Tools in the Cygnus Tree
-
-The Cygnus tree is used for various packages including gdb, the GNU
-binutils, and egcs. It is also, of course, used for Cygnus releases.
-
-In the Cygnus tree, the top level @file{configure} script uses the old
-Cygnus configure system, not autoconf. The top level @file{Makefile.in}
-is written to build packages based on what is in the source tree, and
-supports building a large number of tools in a single
-@samp{configure}/@samp{make} step.
-
-The Cygnus tree may be configured with a @samp{--target} option. The
-@samp{--target} option applies recursively to every subdirectory, and
-permits building an entire set of cross tools at once.
-
-@menu
-* Host and Target Libraries:: Host and Target Libraries.
-* Target Library Configure Scripts:: Target Library Configure Scripts.
-* Make Targets in Cygnus Tree:: Make Targets in Cygnus Tree.
-* Target libiberty:: Target libiberty
-@end menu
-
-@node Host and Target Libraries
-@subsection Host and Target Libraries
-
-The Cygnus tree distinguishes host libraries from target libraries.
-
-Host libraries are built with the compiler used to build the programs
-which run on the host, which is called the host compiler. This includes
-libraries such as @samp{bfd} and @samp{tcl}. These libraries are built
-with the host compiler, and are linked into programs like the binutils
-or gcc which run on the host.
-
-Target libraries are built with the target compiler. If gcc is present
-in the source tree, then the target compiler is the gcc that is built
-using the host compiler. Target libraries are libraries such as
-@samp{newlib} and @samp{libstdc++}. These libraries are not linked into
-the host programs, but are instead made available for use with programs
-built with the target compiler.
-
-For the rest of this section, assume that gcc is present in the source
-tree, so that it will be used to build the target libraries.
-
-There is a complication here. The configure process needs to know which
-compiler you are going to use to build a tool; otherwise, the feature
-tests will not work correctly. The Cygnus tree handles this by not
-configuring the target libraries until the target compiler is built. In
-order to permit everything to build using a single
-@samp{configure}/@samp{make}, the configuration of the target libraries
-is actually triggered during the make step.
-
-When the target libraries are configured, the @samp{--target} option is
-not used. Instead, the @samp{--host} option is used with the argument
-of the @samp{--target} option for the overall configuration. If no
-@samp{--target} option was used for the overall configuration, the
-@samp{--host} option will be passed with the output of the
-@file{config.guess} shell script. Any @samp{--build} option is passed
-down unchanged.
-
-This translation of configuration options is done because since the
-target libraries are compiled with the target compiler, they are being
-built in order to run on the target of the overall configuration. By
-the definition of host, this means that their host system is the same as
-the target system of the overall configuration.
-
-The same process is used for both a native configuration and a cross
-configuration. Even when using a native configuration, the target
-libraries will be configured and built using the newly built compiler.
-This is particularly important for the C++ libraries, since there is no
-reason to assume that the C++ compiler used to build the host tools (if
-there even is one) uses the same ABI as the g++ compiler which will be
-used to build the target libraries.
-
-There is one difference between a native configuration and a cross
-configuration. In a native configuration, the target libraries are
-normally configured and built as siblings of the host tools. In a cross
-configuration, the target libraries are normally built in a subdirectory
-whose name is the argument to @samp{--target}. This is mainly for
-historical reasons.
-
-To summarize, running @samp{configure} in the Cygnus tree configures all
-the host libraries and tools, but does not configure any of the target
-libraries. Running @samp{make} then does the following steps:
-
-@itemize @bullet
-@item
-Build the host libraries.
-@item
-Build the host programs, including gcc. Note that we call gcc both a
-host program (since it runs on the host) and a target compiler (since it
-generates code for the target).
-@item
-Using the newly built target compiler, configure the target libraries.
-@item
-Build the target libraries.
-@end itemize
-
-The steps need not be done in precisely this order, since they are
-actually controlled by @file{Makefile} targets.
-
-@node Target Library Configure Scripts
-@subsection Target Library Configure Scripts
-
-There are a few things you must know in order to write a configure
-script for a target library. This is just a quick sketch, and beginners
-shouldn't worry if they don't follow everything here.
-
-The target libraries are configured and built using a newly built target
-compiler. There may not be any startup files or libraries for this
-target compiler. In fact, those files will probably be built as part of
-some target library, which naturally means that they will not exist when
-your target library is configured.
-
-This means that the configure script for a target library may not use
-any test which requires doing a link. This unfortunately includes many
-useful autoconf macros, such as @samp{AC_CHECK_FUNCS}. autoconf macros
-which do a compile but not a link, such as @samp{AC_CHECK_HEADERS}, may
-be used.
-
-This is a severe restriction, but normally not a fatal one, as target
-libraries can often assume the presence of other target libraries, and
-thus know which functions will be available.
-
-As of this writing, the autoconf macro @samp{AC_PROG_CC} does a link to
-make sure that the compiler works. This may fail in a target library,
-so target libraries must use a different set of macros to locate the
-compiler. See the @file{configure.in} file in a directory like
-@file{libiberty} or @file{libgloss} for an example.
-
-As noted in the previous section, target libraries are sometimes built
-in directories which are siblings to the host tools, and are sometimes
-built in a subdirectory. The @samp{--with-target-subdir} configure
-option will be passed when the library is configured. Its value will be
-an empty string if the target library is a sibling. Its value will be
-the name of the subdirectory if the target library is in a subdirectory.
-
-If the overall build is not a native build (i.e., the overall configure
-used the @samp{--target} option), then the library will be configured
-with the @samp{--with-cross-host} option. The value of this option will
-be the host system of the overall build. Recall that the host system of
-the library will be the target of the overall build. If the overall
-build is a native build, the @samp{--with-cross-host} option will not be
-used.
-
-A library which can be built both standalone and as a target library may
-want to install itself into different directories depending upon the
-case. When built standalone, or when built native, the library should
-be installed in @samp{$(libdir)}. When built as a target library which
-is not native, the library should be installed in @samp{$(tooldir)/lib}.
-The @samp{--with-cross-host} option may be used to distinguish these
-cases.
-
-This same test of @samp{--with-cross-host} may be used to see whether it
-is OK to use link tests in the configure script. If the
-@samp{--with-cross-host} option is not used, then the library is being
-built either standalone or native, and a link should work.
-
-@node Make Targets in Cygnus Tree
-@subsection Make Targets in Cygnus Tree
-
-The top level @file{Makefile} in the Cygnus tree defines targets for
-every known subdirectory.
-
-For every subdirectory @var{dir} which holds a host library or program,
-the @file{Makefile} target @samp{all-@var{dir}} will build that library
-or program.
-
-There are dependencies among host tools. For example, building gcc
-requires first building gas, because the gcc build process invokes the
-target assembler. These dependencies are reflected in the top level
-@file{Makefile}.
-
-For every subdirectory @var{dir} which holds a target library, the
-@file{Makefile} target @samp{configure-target-@var{dir}} will configure
-that library. The @file{Makefile} target @samp{all-target-@var{dir}}
-will build that library.
-
-Every @samp{configure-target-@var{dir}} target depends upon
-@samp{all-gcc}, since gcc, the target compiler, is required to configure
-the tool. Every @samp{all-target-@var{dir}} target depends upon the
-corresponding @samp{configure-target-@var{dir}} target.
-
-There are several other targets which may be of interest for each
-directory: @samp{install-@var{dir}}, @samp{clean-@var{dir}}, and
-@samp{check-@var{dir}}. There are also corresponding @samp{target}
-versions of these for the target libraries , such as
-@samp{install-target-@var{dir}}.
-
-@node Target libiberty
-@subsection Target libiberty
-
-The @file{libiberty} subdirectory is currently a special case, in that
-it is the only directory which is built both using the host compiler and
-using the target compiler.
-
-This is because the files in @file{libiberty} are used when building the
-host tools, and they are also incorporated into the @file{libstdc++}
-target library as support code.
-
-This duality does not pose any particular difficulties. It means that
-there are targets for both @samp{all-libiberty} and
-@samp{all-target-libiberty}.
-
-In a native configuration, when target libraries are not built in a
-subdirectory, the same objects are normally used as both the host build
-and the target build. This is normally OK, since libiberty contains
-only C code, and in a native configuration the results of the host
-compiler and the target compiler are normally interoperable.
-
-Irix 6 is again an exception here, since the SGI native compiler
-defaults to using the @samp{O32} ABI, and gcc defaults to using the
-@samp{N32} ABI. On Irix 6, the target libraries are built in a
-subdirectory even for a native configuration, avoiding this problem.
-
-There are currently no other libraries built for both the host and the
-target, but there is no conceptual problem with adding more.
-
-@node Canadian Cross
-@chapter Canadian Cross
-@cindex canadian cross
-@cindex building with a cross compiler
-@cindex cross compiler, building with
-
-It is possible to use the GNU configure and build system to build a
-program which will run on a system which is different from the system on
-which the tools are built. In other words, it is possible to build
-programs using a cross compiler.
-
-This is referred to as a @dfn{Canadian Cross}.
-
-@menu
-* Canadian Cross Example:: Canadian Cross Example.
-* Canadian Cross Concepts:: Canadian Cross Concepts.
-* Build Cross Host Tools:: Build Cross Host Tools.
-* Build and Host Options:: Build and Host Options.
-* CCross not in Cygnus Tree:: Canadian Cross not in Cygnus Tree.
-* CCross in Cygnus Tree:: Canadian Cross in Cygnus Tree.
-* Supporting Canadian Cross:: Supporting Canadian Cross.
-@end menu
-
-@node Canadian Cross Example
-@section Canadian Cross Example
-
-Here is an example of a Canadian Cross.
-
-While running on a GNU/Linux, you can build a program which will run on
-a Solaris system. You would use a GNU/Linux cross Solaris compiler to
-build the program.
-
-Of course, you could not run the resulting program on your GNU/Linux
-system. You would have to copy it over to a Solaris system before you
-would run it.
-
-Of course, you could also simply build the programs on the Solaris
-system in the first place. However, perhaps the Solaris system is not
-available for some reason; perhaps you actually don't have one, but you
-want to build the tools for somebody else to use. Or perhaps your
-GNU/Linux system is much faster than your Solaris system.
-
-A Canadian Cross build is most frequently used when building programs to
-run on a non-Unix system, such as DOS or Windows. It may be simpler to
-configure and build on a Unix system than to support the configuration
-machinery on a non-Unix system.
-
-@node Canadian Cross Concepts
-@section Canadian Cross Concepts
-
-When building a Canadian Cross, there are at least two different systems
-involved: the system on which the tools are being built, and the system
-on which the tools will run.
-
-The system on which the tools are being built is called the @dfn{build}
-system.
-
-The system on which the tools will run is called the host system.
-
-For example, if you are building a Solaris program on a GNU/Linux
-system, as in the previous section, the build system would be GNU/Linux,
-and the host system would be Solaris.
-
-It is, of course, possible to build a cross compiler using a Canadian
-Cross (i.e., build a cross compiler using a cross compiler). In this
-case, the system for which the resulting cross compiler generates code
-is called the target system. (For a more complete discussion of host
-and target systems, @pxref{Host and Target}).
-
-An example of building a cross compiler using a Canadian Cross would be
-building a Windows cross MIPS ELF compiler on a GNU/Linux system. In
-this case the build system would be GNU/Linux, the host system would be
-Windows, and the target system would be MIPS ELF.
-
-The name Canadian Cross comes from the case when the build, host, and
-target systems are all different. At the time that these issues were
-all being hashed out, Canada had three national political parties.
-
-@node Build Cross Host Tools
-@section Build Cross Host Tools
-
-In order to configure a program for a Canadian Cross build, you must
-first build and install the set of cross tools you will use to build the
-program.
-
-These tools will be build cross host tools. That is, they will run on
-the build system, and will produce code that runs on the host system.
-
-It is easy to confuse the meaning of build and host here. Always
-remember that the build system is where you are doing the build, and the
-host system is where the resulting program will run. Therefore, you
-need a build cross host compiler.
-
-In general, you must have a complete cross environment in order to do
-the build. This normally means a cross compiler, cross assembler, and
-so forth, as well as libraries and include files for the host system.
-
-@node Build and Host Options
-@section Build and Host Options
-@cindex configuring a canadian cross
-@cindex canadian cross, configuring
-
-When you run @file{configure}, you must use both the @samp{--build} and
-@samp{--host} options.
-
-@cindex @samp{--build} option
-@cindex build option
-@cindex configure build system
-The @samp{--build} option is used to specify the configuration name of
-the build system. This can normally be the result of running the
-@file{config.guess} shell script, and it is reasonable to use
-@samp{--build=`config.guess`}.
-
-@cindex @samp{--host} option
-@cindex host option
-@cindex configure host
-The @samp{--host} option is used to specify the configuration name of
-the host system.
-
-As we explained earlier, @file{config.guess} is used to set the default
-value for the @samp{--host} option (@pxref{Using the Host Type}). We
-can now see that since @file{config.guess} returns the type of system on
-which it is run, it really identifies the build system. Since the host
-system is normally the same as the build system (i.e., people do not
-normally build using a cross compiler), it is reasonable to use the
-result of @file{config.guess} as the default for the host system when
-the @samp{--host} option is not used.
-
-It might seem that if the @samp{--host} option were used without the
-@samp{--build} option that the configure script could run
-@file{config.guess} to determine the build system, and presume a
-Canadian Cross if the result of @file{config.guess} differed from the
-@samp{--host} option. However, for historical reasons, some configure
-scripts are routinely run using an explicit @samp{--host} option, rather
-than using the default from @file{config.guess}. As noted earlier, it
-is difficult or impossible to reliably compare configuration names
-(@pxref{Using the Target Type}). Therefore, by convention, if the
-@samp{--host} option is used, but the @samp{--build} option is not used,
-then the build system defaults to the host system.
-
-@node CCross not in Cygnus Tree
-@section Canadian Cross not in Cygnus Tree.
-
-If you are not using the Cygnus tree, you must explicitly specify the
-cross tools which you want to use to build the program. This is done by
-setting environment variables before running the @file{configure}
-script.
-
-You must normally set at least the environment variables @samp{CC},
-@samp{AR}, and @samp{RANLIB} to the cross tools which you want to use to
-build.
-
-For some programs, you must set additional cross tools as well, such as
-@samp{AS}, @samp{LD}, or @samp{NM}.
-
-You would set these environment variables to the build cross tools which
-you are going to use.
-
-For example, if you are building a Solaris program on a GNU/Linux
-system, and your GNU/Linux cross Solaris compiler were named
-@samp{solaris-gcc}, then you would set the environment variable
-@samp{CC} to @samp{solaris-gcc}.
-
-@node CCross in Cygnus Tree
-@section Canadian Cross in Cygnus Tree
-@cindex canadian cross in cygnus tree
-
-This section describes configuring and building a Canadian Cross when
-using the Cygnus tree.
-
-@menu
-* Standard Cygnus CCross:: Building a Normal Program.
-* Cross Cygnus CCross:: Building a Cross Program.
-@end menu
-
-@node Standard Cygnus CCross
-@subsection Building a Normal Program
-
-When configuring a Canadian Cross in the Cygnus tree, all the
-appropriate environment variables are automatically set to
-@samp{@var{host}-@var{tool}}, where @var{host} is the value used for the
-@samp{--host} option, and @var{tool} is the name of the tool (e.g.,
-@samp{gcc}, @samp{as}, etc.). These tools must be on your @samp{PATH}.
-
-Adding a prefix of @var{host} will give the usual name for the build
-cross host tools. To see this, consider that when these cross tools
-were built, they were configured to run on the build system and to
-produce code for the host system. That is, they were configured with a
-@samp{--target} option that is the same as the system which we are now
-calling the host. Recall that the default name for installed cross
-tools uses the target system as a prefix (@pxref{Using the Target
-Type}). Since that is the system which we are now calling the host,
-@var{host} is the right prefix to use.
-
-For example, if you configure with @samp{--build=i386-linux-gnu} and
-@samp{--host=solaris}, then the Cygnus tree will automatically default
-to using the compiler @samp{solaris-gcc}. You must have previously
-built and installed this compiler, probably by doing a build with no
-@samp{--host} option and with a @samp{--target} option of
-@samp{solaris}.
-
-@node Cross Cygnus CCross
-@subsection Building a Cross Program
-
-There are additional considerations if you want to build a cross
-compiler, rather than a native compiler, in the Cygnus tree using a
-Canadian Cross.
-
-When you build a cross compiler using the Cygnus tree, then the target
-libraries will normally be built with the newly built target compiler
-(@pxref{Host and Target Libraries}). However, this will not work when
-building with a Canadian Cross. This is because the newly built target
-compiler will be a program which runs on the host system, and therefore
-will not be able to run on the build system.
-
-Therefore, when building a cross compiler with the Cygnus tree, you must
-first install a set of build cross target tools. These tools will be
-used when building the target libraries.
-
-Note that this is not a requirement of a Canadian Cross in general. For
-example, it would be possible to build just the host cross target tools
-on the build system, to copy the tools to the host system, and to build
-the target libraries on the host system. The requirement for build
-cross target tools is imposed by the Cygnus tree, which expects to be
-able to build both host programs and target libraries in a single
-@samp{configure}/@samp{make} step. Because it builds these in a single
-step, it expects to be able to build the target libraries on the build
-system, which means that it must use a build cross target toolchain.
-
-For example, suppose you want to build a Windows cross MIPS ELF compiler
-on a GNU/Linux system. You must have previously installed both a
-GNU/Linux cross Windows compiler and a GNU/Linux cross MIPS ELF
-compiler.
-
-In order to build the Windows (configuration name @samp{i386-cygwin32})
-cross MIPS ELF (configure name @samp{mips-elf}) compiler, you might
-execute the following commands (long command lines are broken across
-lines with a trailing backslash as a continuation character).
-
-@example
-mkdir linux-x-cygwin32
-cd linux-x-cygwin32
-@var{srcdir}/configure --target i386-cygwin32 --prefix=@var{installdir} \
- --exec-prefix=@var{installdir}/H-i386-linux
-make
-make install
-cd ..
-mkdir linux-x-mips-elf
-cd linux-x-mips-elf
-@var{srcdir}/configure --target mips-elf --prefix=@var{installdir} \
- --exec-prefix=@var{installdir}/H-i386-linux
-make
-make install
-cd ..
-mkdir cygwin32-x-mips-elf
-cd cygwin32-x-mips-elf
-@var{srcdir}/configure --build=i386-linux-gnu --host=i386-cygwin32 \
- --target=mips-elf --prefix=@var{wininstalldir} \
- --exec-prefix=@var{wininstalldir}/H-i386-cygwin32
-make
-make install
-@end example
-
-You would then copy the contents of @var{wininstalldir} over to the
-Windows machine, and run the resulting programs.
-
-@node Supporting Canadian Cross
-@section Supporting Canadian Cross
-
-If you want to make it possible to build a program you are developing
-using a Canadian Cross, you must take some care when writing your
-configure and make rules. Simple cases will normally work correctly.
-However, it is not hard to write configure and make tests which will
-fail in a Canadian Cross.
-
-@menu
-* CCross in Configure:: Supporting Canadian Cross in Configure Scripts.
-* CCross in Make:: Supporting Canadian Cross in Makefiles.
-@end menu
-
-@node CCross in Configure
-@subsection Supporting Canadian Cross in Configure Scripts
-@cindex canadian cross in configure
-
-In a @file{configure.in} file, after calling @samp{AC_PROG_CC}, you can
-find out whether this is a Canadian Cross configure by examining the
-shell variable @samp{cross_compiling}. In a Canadian Cross, which means
-that the compiler is a cross compiler, @samp{cross_compiling} will be
-@samp{yes}. In a normal configuration, @samp{cross_compiling} will be
-@samp{no}.
-
-You ordinarily do not need to know the type of the build system in a
-configure script. However, if you do need that information, you can get
-it by using the macro @samp{AC_CANONICAL_SYSTEM}, the same macro that is
-used to determine the target system. This macro will set the variables
-@samp{build}, @samp{build_alias}, @samp{build_cpu}, @samp{build_vendor},
-and @samp{build_os}, which correspond to the similar @samp{target} and
-@samp{host} variables, except that they describe the build system.
-
-When writing tests in @file{configure.in}, you must remember that you
-want to test the host environment, not the build environment.
-
-Macros like @samp{AC_CHECK_FUNCS} which use the compiler will test the
-host environment. That is because the tests will be done by running the
-compiler, which is actually a build cross host compiler. If the
-compiler can find the function, that means that the function is present
-in the host environment.
-
-Tests like @samp{test -f /dev/ptyp0}, on the other hand, will test the
-build environment. Remember that the configure script is running on the
-build system, not the host system. If your configure scripts examines
-files, those files will be on the build system. Whatever you determine
-based on those files may or may not be the case on the host system.
-
-Most autoconf macros will work correctly for a Canadian Cross. The main
-exception is @samp{AC_TRY_RUN}. This macro tries to compile and run a
-test program. This will fail in a Canadian Cross, because the program
-will be compiled for the host system, which means that it will not run
-on the build system.
-
-The @samp{AC_TRY_RUN} macro provides an optional argument to tell the
-configure script what to do in a Canadian Cross. If that argument is
-not present, you will get a warning when you run @samp{autoconf}:
-@smallexample
-warning: AC_TRY_RUN called without default to allow cross compiling
-@end smallexample
-@noindent
-This tells you that the resulting @file{configure} script will not work
-with a Canadian Cross.
-
-In some cases while it may better to perform a test at configure time,
-it is also possible to perform the test at run time. In such a case you
-can use the cross compiling argument to @samp{AC_TRY_RUN} to tell your
-program that the test could not be performed at configure time.
-
-There are a few other autoconf macros which will not work correctly with
-a Canadian Cross: a partial list is @samp{AC_FUNC_GETPGRP},
-@samp{AC_FUNC_SETPGRP}, @samp{AC_FUNC_SETVBUF_REVERSED}, and
-@samp{AC_SYS_RESTARTABLE_SYSCALLS}. The @samp{AC_CHECK_SIZEOF} macro is
-generally not very useful with a Canadian Cross; it permits an optional
-argument indicating the default size, but there is no way to know what
-the correct default should be.
-
-@node CCross in Make
-@subsection Supporting Canadian Cross in Makefiles.
-@cindex canadian cross in makefile
-
-The main Canadian Cross issue in a @file{Makefile} arises when you want
-to use a subsidiary program to generate code or data which you will then
-include in your real program.
-
-If you compile this subsidiary program using @samp{$(CC)} in the usual
-way, you will not be able to run it. This is because @samp{$(CC)} will
-build a program for the host system, but the program is being built on
-the build system.
-
-You must instead use a compiler for the build system, rather than the
-host system. In the Cygnus tree, this make variable
-@samp{$(CC_FOR_BUILD)} will hold a compiler for the build system.
-
-Note that you should not include @file{config.h} in a file you are
-compiling with @samp{$(CC_FOR_BUILD)}. The @file{configure} script will
-build @file{config.h} with information for the host system. However,
-you are compiling the file using a compiler for the build system (a
-native compiler). Subsidiary programs are normally simple filters which
-do no user interaction, and it is normally possible to write them in a
-highly portable fashion so that the absence of @file{config.h} is not
-crucial.
-
-@cindex @samp{HOST_CC}
-The gcc @file{Makefile.in} shows a complex situation in which certain
-files, such as @file{rtl.c}, must be compiled into both subsidiary
-programs run on the build system and into the final program. This
-approach may be of interest for advanced build system hackers. Note
-that the build system compiler is rather confusingly called
-@samp{HOST_CC}.
-
-@node Cygnus Configure
-@chapter Cygnus Configure
-@cindex cygnus configure
-
-The Cygnus configure script predates autoconf. All of its interesting
-features have been incorporated into autoconf. No new programs should
-be written to use the Cygnus configure script.
-
-However, the Cygnus configure script is still used in a few places: at
-the top of the Cygnus tree and in a few target libraries in the Cygnus
-tree. Until those uses have been replaced with autoconf, some brief
-notes are appropriate here. This is not complete documentation, but it
-should be possible to use this as a guide while examining the scripts
-themselves.
-
-@menu
-* Cygnus Configure Basics:: Cygnus Configure Basics.
-* Cygnus Configure in C++ Libraries:: Cygnus Configure in C++ Libraries.
-@end menu
-
-@node Cygnus Configure Basics
-@section Cygnus Configure Basics
-
-Cygnus configure does not use any generated files; there is no program
-corresponding to @samp{autoconf}. Instead, there is a single shell
-script named @samp{configure} which may be found at the top of the
-Cygnus tree. This shell script was written by hand; it was not
-generated by autoconf, and it is incorrect, and indeed harmful, to run
-@samp{autoconf} in the top level of a Cygnus tree.
-
-Cygnus configure works in a particular directory by examining the file
-@file{configure.in} in that directory. That file is broken into four
-separate shell scripts.
-
-The first is the contents of @file{configure.in} up to a line that
-starts with @samp{# per-host:}. This is the common part.
-
-The second is the rest of @file{configure.in} up to a line that starts
-with @samp{# per-target:}. This is the per host part.
-
-The third is the rest of @file{configure.in} up to a line that starts
-with @samp{# post-target:}. This is the per target part.
-
-The fourth is the remainder of @file{configure.in}. This is the post
-target part.
-
-If any of these comment lines are missing, the corresponding shell
-script is empty.
-
-Cygnus configure will first execute the common part. This must set the
-shell variable @samp{srctrigger} to the name of a source file, to
-confirm that Cygnus configure is looking at the right directory. This
-may set the shell variables @samp{package_makefile_frag} and
-@samp{package_makefile_rules_frag}.
-
-Cygnus configure will next set the @samp{build} and @samp{host} shell
-variables, and execute the per host part. This may set the shell
-variable @samp{host_makefile_frag}.
-
-Cygnus configure will next set the @samp{target} variable, and execute
-the per target part. This may set the shell variable
-@samp{target_makefile_frag}.
-
-Any of these scripts may set the @samp{subdirs} shell variable. This
-variable is a list of subdirectories where a @file{Makefile.in} file may
-be found. Cygnus configure will automatically look for a
-@file{Makefile.in} file in the current directory. The @samp{subdirs}
-shell variable is not normally used, and I believe that the only
-directory which uses it at present is @file{newlib}.
-
-For each @file{Makefile.in}, Cygnus configure will automatically create
-a @file{Makefile} by adding definitions for @samp{make} variables such
-as @samp{host} and @samp{target}, and automatically editing the values
-of @samp{make} variables such as @samp{prefix} if they are present.
-
-Also, if any of the @samp{makefile_frag} shell variables are set, Cygnus
-configure will interpret them as file names relative to either the
-working directory or the source directory, and will read the contents of
-the file into the generated @file{Makefile}. The file contents will be
-read in after the first line in @file{Makefile.in} which starts with
-@samp{####}.
-
-These @file{Makefile} fragments are used to customize behaviour for a
-particular host or target. They serve to select particular files to
-compile, and to define particular preprocessor macros by providing
-values for @samp{make} variables which are then used during compilation.
-Cygnus configure, unlike autoconf, normally does not do feature tests,
-and normally requires support to be added manually for each new host.
-
-The @file{Makefile} fragment support is similar to the autoconf
-@samp{AC_SUBST_FILE} macro.
-
-After creating each @file{Makefile}, the post target script will be run
-(i.e., it may be run several times). This script may further customize
-the @file{Makefile}. When it is run, the shell variable @samp{Makefile}
-will hold the name of the @file{Makefile}, including the appropriate
-directory component.
-
-Like an autoconf generated @file{configure} script, Cygnus configure
-will create a file named @file{config.status} which, when run, will
-automatically recreate the configuration. The @file{config.status} file
-will simply execute the Cygnus configure script again with the
-appropriate arguments.
-
-Any of the parts of @file{configure.in} may set the shell variables
-@samp{files} and @samp{links}. Cygnus configure will set up symlinks
-from the names in @samp{links} to the files named in @samp{files}. This
-is similar to the autoconf @samp{AC_LINK_FILES} macro.
-
-Finally, any of the parts of @file{configure.in} may set the shell
-variable @samp{configdirs} to a set of subdirectories. If it is set,
-Cygnus configure will recursively run the configure process in each
-subdirectory. If the subdirectory uses Cygnus configure, it will
-contain a @file{configure.in} file but no @file{configure} file, in
-which case Cygnus configure will invoke itself recursively. If the
-subdirectory has a @file{configure} file, Cygnus configure assumes that
-it is an autoconf generated @file{configure} script, and simply invokes
-it directly.
-
-@node Cygnus Configure in C++ Libraries
-@section Cygnus Configure in C++ Libraries
-@cindex @file{libstdc++} configure
-@cindex @file{libio} configure
-@cindex @file{libg++} configure
-
-The C++ library configure system, written by Per Bothner, deserves
-special mention. It uses Cygnus configure, but it does feature testing
-like that done by autoconf generated @file{configure} scripts. This
-approach is used in the libraries @file{libio}, @file{libstdc++}, and
-@file{libg++}.
-
-Most of the @file{Makefile} information is written out by the shell
-script @file{libio/config.shared}. Each @file{configure.in} file sets
-certain shell variables, and then invokes @file{config.shared} to create
-two package @file{Makefile} fragments. These fragments are then
-incorporated into the resulting @file{Makefile} by the Cygnus configure
-script.
-
-The file @file{_G_config.h} is created in the @file{libio} object
-directory by running the shell script @file{libio/gen-params}. This
-shell script uses feature tests to define macros and typedefs in
-@file{_G_config.h}.
-
-@node Multilibs
-@chapter Multilibs
-@cindex multilibs
-
-For some targets gcc may have different processor requirements depending
-upon command line options. An obvious example is the
-@samp{-msoft-float} option supported on several processors. This option
-means that the floating point registers are not available, which means
-that floating point operations must be done by calling an emulation
-subroutine rather than by using machine instructions.
-
-For such options, gcc is often configured to compile target libraries
-twice: once with @samp{-msoft-float} and once without. When gcc
-compiles target libraries more than once, the resulting libraries are
-called @dfn{multilibs}.
-
-Multilibs are not really part of the GNU configure and build system, but
-we discuss them here since they require support in the @file{configure}
-scripts and @file{Makefile}s used for target libraries.
-
-@menu
-* Multilibs in gcc:: Multilibs in gcc.
-* Multilibs in Target Libraries:: Multilibs in Target Libraries.
-@end menu
-
-@node Multilibs in gcc
-@section Multilibs in gcc
-
-In gcc, multilibs are defined by setting the variable
-@samp{MULTILIB_OPTIONS} in the target @file{Makefile} fragment. Several
-other @samp{MULTILIB} variables may also be defined there. @xref{Target
-Fragment, , The Target Makefile Fragment, gcc, Using and Porting GNU
-CC}.
-
-If you have built gcc, you can see what multilibs it uses by running it
-with the @samp{-print-multi-lib} option. The output @samp{.;} means
-that no multilibs are used. In general, the output is a sequence of
-lines, one per multilib. The first part of each line, up to the
-@samp{;}, is the name of the multilib directory. The second part is a
-list of compiler options separated by @samp{@@} characters.
-
-Multilibs are built in a tree of directories. The top of the tree,
-represented by @samp{.} in the list of multilib directories, is the
-default library to use when no special compiler options are used. The
-subdirectories of the tree hold versions of the library to use when
-particular compiler options are used.
-
-@node Multilibs in Target Libraries
-@section Multilibs in Target Libraries
-
-The target libraries in the Cygnus tree are automatically built with
-multilibs. That means that each library is built multiple times.
-
-This default is set in the top level @file{configure.in} file, by adding
-@samp{--enable-multilib} to the list of arguments passed to configure
-when it is run for the target libraries (@pxref{Host and Target
-Libraries}).
-
-Each target library uses the shell script @file{config-ml.in}, written
-by Doug Evans, to prepare to build target libraries. This shell script
-is invoked after the @file{Makefile} has been created by the
-@file{configure} script. If multilibs are not enabled, it does nothing,
-otherwise it modifies the @file{Makefile} to support multilibs.
-
-The @file{config-ml.in} script makes one copy of the @file{Makefile} for
-each multilib in the appropriate subdirectory. When configuring in the
-source directory (which is not recommended), it will build a symlink
-tree of the sources in each subdirectory.
-
-The @file{config-ml.in} script sets several variables in the various
-@file{Makefile}s. The @file{Makefile.in} must have definitions for
-these variables already; @file{config-ml.in} simply changes the existing
-values. The @file{Makefile} should use default values for these
-variables which will do the right thing in the subdirectories.
-
-@table @samp
-@item MULTISRCTOP
-@file{config-ml.in} will set this to a sequence of @samp{../} strings,
-where the number of strings is the number of multilib levels in the
-source tree. The default value should be the empty string.
-@item MULTIBUILDTOP
-@file{config-ml.in} will set this to a sequence of @samp{../} strings,
-where the number of strings is number of multilib levels in the object
-directory. The default value should be the empty string. This will
-differ from @samp{MULTISRCTOP} when configuring in the source tree
-(which is not recommended).
-@item MULTIDIRS
-In the top level @file{Makefile} only, @file{config-ml.in} will set this
-to the list of multilib subdirectories. The default value should be the
-empty string.
-@item MULTISUBDIR
-@file{config-ml.in} will set this to the installed subdirectory name to
-use for this subdirectory, with a leading @samp{/}. The default value
-shold be the empty string.
-@item MULTIDO
-@itemx MULTICLEAN
-In the top level @file{Makefile} only, @file{config-ml.in} will set
-these variables to commands to use when doing a recursive make. These
-variables should both default to the string @samp{true}, so that by
-default nothing happens.
-@end table
-
-All references to the parent of the source directory should use the
-variable @samp{MULTISRCTOP}. Instead of writing @samp{$(srcdir)/..},
-you must write @samp{$(srcdir)/$(MULTISRCTOP)..}.
-
-Similarly, references to the parent of the object directory should use
-the variable @samp{MULTIBUILDTOP}.
-
-In the installation target, the libraries should be installed in the
-subdirectory @samp{MULTISUBDIR}. Instead of installing
-@samp{$(libdir)/libfoo.a}, install
-@samp{$(libdir)$(MULTISUBDIR)/libfoo.a}.
-
-The @file{config-ml.in} script also modifies the top level
-@file{Makefile} to add @samp{multi-do} and @samp{multi-clean} targets
-which are used when building multilibs.
-
-The default target of the @file{Makefile} should include the following
-command:
-@smallexample
-@@$(MULTIDO) $(FLAGS_TO_PASS) DO=all multi-do
-@end smallexample
-@noindent
-This assumes that @samp{$(FLAGS_TO_PASS)} is defined as a set of
-variables to pass to a recursive invocation of @samp{make}. This will
-build all the multilibs. Note that the default value of @samp{MULTIDO}
-is @samp{true}, so by default this command will do nothing. It will
-only do something in the top level @file{Makefile} if multilibs were
-enabled.
-
-The @samp{install} target of the @file{Makefile} should include the
-following command:
-@smallexample
-@@$(MULTIDO) $(FLAGS_TO_PASS) DO=install multi-do
-@end smallexample
-
-In general, any operation, other than clean, which should be performed
-on all the multilibs should use a @samp{$(MULTIDO)} line, setting the
-variable @samp{DO} to the target of each recursive call to @samp{make}.
-
-The @samp{clean} targets (@samp{clean}, @samp{mostlyclean}, etc.) should
-use @samp{$(MULTICLEAN)}. For example, the @samp{clean} target should
-do this:
-@smallexample
-@@$(MULTICLEAN) DO=clean multi-clean
-@end smallexample
-
-@node FAQ
-@chapter Frequently Asked Questions
-
-@table @asis
-@item Which do I run first, @samp{autoconf} or @samp{automake}?
-Except when you first add autoconf or automake support to a package, you
-shouldn't run either by hand. Instead, configure with the
-@samp{--enable-maintainer-mode} option, and let @samp{make} take care of
-it.
-
-@cindex undefined macros
-@item @samp{autoconf} says something about undefined macros.
-This means that you have macros in your @file{configure.in} which are
-not defined by @samp{autoconf}. You may be using an old version of
-@samp{autoconf}; try building and installing a newer one. Make sure the
-newly installled @samp{autoconf} is first on your @samp{PATH}. Also,
-see the next question.
-
-@cindex @samp{CY_GNU_GETTEXT} in @file{configure}
-@cindex @samp{AM_PROG_LIBTOOL} in @file{configure}
-@item My @file{configure} script has stuff like @samp{CY_GNU_GETTEXT} in it.
-This means that you have macros in your @file{configure.in} which should
-be defined in your @file{aclocal.m4} file, but aren't. This usually
-means that @samp{aclocal} was not able to appropriate definitions of the
-macros. Make sure that you have installed all the packages you need.
-In particular, make sure that you have installed libtool (this is where
-@samp{AM_PROG_LIBTOOL} is defined) and gettext (this is where
-@samp{CY_GNU_GETTEXT} is defined, at least in the Cygnus version of
-gettext).
-
-@cindex @file{Makefile}, garbage characters
-@item My @file{Makefile} has @samp{@@} characters in it.
-This may mean that you tried to use an autoconf substitution in your
-@file{Makefile.in} without adding the appropriate @samp{AC_SUBST} call
-to your @file{configure} script. Or it may just mean that you need to
-rebuild @file{Makefile} in your build directory. To rebuild
-@file{Makefile} from @file{Makefile.in}, run the shell script
-@file{config.status} with no arguments. If you need to force
-@file{configure} to run again, first run @samp{config.status --recheck}.
-These runs are normally done automatically by @file{Makefile} targets,
-but if your @file{Makefile} has gotten messed up you'll need to help
-them along.
-
-@cindex @samp{config.status --recheck}
-@item Why do I have to run both @samp{config.status --recheck} and @samp{config.status}?
-Normally, you don't; they will be run automatically by @file{Makefile}
-targets. If you do need to run them, use @samp{config.status --recheck}
-to run the @file{configure} script again with the same arguments as the
-first time you ran it. Use @samp{config.status} (with no arguments) to
-regenerate all files (@file{Makefile}, @file{config.h}, etc.) based on
-the results of the configure script. The two cases are separate because
-it isn't always necessary to regenerate all the files after running
-@samp{config.status --recheck}. The @file{Makefile} targets generated
-by automake will use the environment variables @samp{CONFIG_FILES} and
-@samp{CONFIG_HEADERS} to only regenerate files as they are needed.
-
-@item What is the Cygnus tree?
-The Cygnus tree is used for various packages including gdb, the GNU
-binutils, and egcs. It is also, of course, used for Cygnus releases.
-It is the build system which was developed at Cygnus, using the Cygnus
-configure script. It permits building many different packages with a
-single configure and make. The configure scripts in the tree are being
-converted to autoconf, but the general build structure remains intact.
-
-@item Why do I have to keep rebuilding and reinstalling the tools?
-I know, it's a pain. Unfortunately, there are bugs in the tools
-themselves which need to be fixed, and each time that happens everybody
-who uses the tools need to reinstall new versions of them. I don't know
-if there is going to be a clever fix until the tools stabilize.
-
-@item Why not just have a Cygnus tree @samp{make} target to update the tools?
-The tools unfortunately need to be installed before they can be used.
-That means that they must be built using an appropriate prefix, and it
-seems unwise to assume that every configuration uses an appropriate
-prefix. It might be possible to make them work in place, or it might be
-possible to install them in some subdirectory; so far these approaches
-have not been implemented.
-@end table
-
-@node Index
-@unnumbered Index
-
-@printindex cp
-
-@contents
-@bye
diff --git a/etc/fdl.texi b/etc/fdl.texi
deleted file mode 100644
index 7c26c34b0..000000000
--- a/etc/fdl.texi
+++ /dev/null
@@ -1,505 +0,0 @@
-@c The GNU Free Documentation License.
-@center Version 1.3, 3 November 2008
-
-@c This file is intended to be included within another document,
-@c hence no sectioning command or @node.
-
-@display
-Copyright @copyright{} 2000, 2001, 2002, 2007, 2008 Free Software Foundation, Inc.
-@uref{http://fsf.org/}
-
-Everyone is permitted to copy and distribute verbatim copies
-of this license document, but changing it is not allowed.
-@end display
-
-@enumerate 0
-@item
-PREAMBLE
-
-The purpose of this License is to make a manual, textbook, or other
-functional and useful document @dfn{free} in the sense of freedom: to
-assure everyone the effective freedom to copy and redistribute it,
-with or without modifying it, either commercially or noncommercially.
-Secondarily, this License preserves for the author and publisher a way
-to get credit for their work, while not being considered responsible
-for modifications made by others.
-
-This License is a kind of ``copyleft'', which means that derivative
-works of the document must themselves be free in the same sense. It
-complements the GNU General Public License, which is a copyleft
-license designed for free software.
-
-We have designed this License in order to use it for manuals for free
-software, because free software needs free documentation: a free
-program should come with manuals providing the same freedoms that the
-software does. But this License is not limited to software manuals;
-it can be used for any textual work, regardless of subject matter or
-whether it is published as a printed book. We recommend this License
-principally for works whose purpose is instruction or reference.
-
-@item
-APPLICABILITY AND DEFINITIONS
-
-This License applies to any manual or other work, in any medium, that
-contains a notice placed by the copyright holder saying it can be
-distributed under the terms of this License. Such a notice grants a
-world-wide, royalty-free license, unlimited in duration, to use that
-work under the conditions stated herein. The ``Document'', below,
-refers to any such manual or work. Any member of the public is a
-licensee, and is addressed as ``you''. You accept the license if you
-copy, modify or distribute the work in a way requiring permission
-under copyright law.
-
-A ``Modified Version'' of the Document means any work containing the
-Document or a portion of it, either copied verbatim, or with
-modifications and/or translated into another language.
-
-A ``Secondary Section'' is a named appendix or a front-matter section
-of the Document that deals exclusively with the relationship of the
-publishers or authors of the Document to the Document's overall
-subject (or to related matters) and contains nothing that could fall
-directly within that overall subject. (Thus, if the Document is in
-part a textbook of mathematics, a Secondary Section may not explain
-any mathematics.) The relationship could be a matter of historical
-connection with the subject or with related matters, or of legal,
-commercial, philosophical, ethical or political position regarding
-them.
-
-The ``Invariant Sections'' are certain Secondary Sections whose titles
-are designated, as being those of Invariant Sections, in the notice
-that says that the Document is released under this License. If a
-section does not fit the above definition of Secondary then it is not
-allowed to be designated as Invariant. The Document may contain zero
-Invariant Sections. If the Document does not identify any Invariant
-Sections then there are none.
-
-The ``Cover Texts'' are certain short passages of text that are listed,
-as Front-Cover Texts or Back-Cover Texts, in the notice that says that
-the Document is released under this License. A Front-Cover Text may
-be at most 5 words, and a Back-Cover Text may be at most 25 words.
-
-A ``Transparent'' copy of the Document means a machine-readable copy,
-represented in a format whose specification is available to the
-general public, that is suitable for revising the document
-straightforwardly with generic text editors or (for images composed of
-pixels) generic paint programs or (for drawings) some widely available
-drawing editor, and that is suitable for input to text formatters or
-for automatic translation to a variety of formats suitable for input
-to text formatters. A copy made in an otherwise Transparent file
-format whose markup, or absence of markup, has been arranged to thwart
-or discourage subsequent modification by readers is not Transparent.
-An image format is not Transparent if used for any substantial amount
-of text. A copy that is not ``Transparent'' is called ``Opaque''.
-
-Examples of suitable formats for Transparent copies include plain
-@sc{ascii} without markup, Texinfo input format, La@TeX{} input
-format, @acronym{SGML} or @acronym{XML} using a publicly available
-@acronym{DTD}, and standard-conforming simple @acronym{HTML},
-PostScript or @acronym{PDF} designed for human modification. Examples
-of transparent image formats include @acronym{PNG}, @acronym{XCF} and
-@acronym{JPG}. Opaque formats include proprietary formats that can be
-read and edited only by proprietary word processors, @acronym{SGML} or
-@acronym{XML} for which the @acronym{DTD} and/or processing tools are
-not generally available, and the machine-generated @acronym{HTML},
-PostScript or @acronym{PDF} produced by some word processors for
-output purposes only.
-
-The ``Title Page'' means, for a printed book, the title page itself,
-plus such following pages as are needed to hold, legibly, the material
-this License requires to appear in the title page. For works in
-formats which do not have any title page as such, ``Title Page'' means
-the text near the most prominent appearance of the work's title,
-preceding the beginning of the body of the text.
-
-The ``publisher'' means any person or entity that distributes copies
-of the Document to the public.
-
-A section ``Entitled XYZ'' means a named subunit of the Document whose
-title either is precisely XYZ or contains XYZ in parentheses following
-text that translates XYZ in another language. (Here XYZ stands for a
-specific section name mentioned below, such as ``Acknowledgements'',
-``Dedications'', ``Endorsements'', or ``History''.) To ``Preserve the Title''
-of such a section when you modify the Document means that it remains a
-section ``Entitled XYZ'' according to this definition.
-
-The Document may include Warranty Disclaimers next to the notice which
-states that this License applies to the Document. These Warranty
-Disclaimers are considered to be included by reference in this
-License, but only as regards disclaiming warranties: any other
-implication that these Warranty Disclaimers may have is void and has
-no effect on the meaning of this License.
-
-@item
-VERBATIM COPYING
-
-You may copy and distribute the Document in any medium, either
-commercially or noncommercially, provided that this License, the
-copyright notices, and the license notice saying this License applies
-to the Document are reproduced in all copies, and that you add no other
-conditions whatsoever to those of this License. You may not use
-technical measures to obstruct or control the reading or further
-copying of the copies you make or distribute. However, you may accept
-compensation in exchange for copies. If you distribute a large enough
-number of copies you must also follow the conditions in section 3.
-
-You may also lend copies, under the same conditions stated above, and
-you may publicly display copies.
-
-@item
-COPYING IN QUANTITY
-
-If you publish printed copies (or copies in media that commonly have
-printed covers) of the Document, numbering more than 100, and the
-Document's license notice requires Cover Texts, you must enclose the
-copies in covers that carry, clearly and legibly, all these Cover
-Texts: Front-Cover Texts on the front cover, and Back-Cover Texts on
-the back cover. Both covers must also clearly and legibly identify
-you as the publisher of these copies. The front cover must present
-the full title with all words of the title equally prominent and
-visible. You may add other material on the covers in addition.
-Copying with changes limited to the covers, as long as they preserve
-the title of the Document and satisfy these conditions, can be treated
-as verbatim copying in other respects.
-
-If the required texts for either cover are too voluminous to fit
-legibly, you should put the first ones listed (as many as fit
-reasonably) on the actual cover, and continue the rest onto adjacent
-pages.
-
-If you publish or distribute Opaque copies of the Document numbering
-more than 100, you must either include a machine-readable Transparent
-copy along with each Opaque copy, or state in or with each Opaque copy
-a computer-network location from which the general network-using
-public has access to download using public-standard network protocols
-a complete Transparent copy of the Document, free of added material.
-If you use the latter option, you must take reasonably prudent steps,
-when you begin distribution of Opaque copies in quantity, to ensure
-that this Transparent copy will remain thus accessible at the stated
-location until at least one year after the last time you distribute an
-Opaque copy (directly or through your agents or retailers) of that
-edition to the public.
-
-It is requested, but not required, that you contact the authors of the
-Document well before redistributing any large number of copies, to give
-them a chance to provide you with an updated version of the Document.
-
-@item
-MODIFICATIONS
-
-You may copy and distribute a Modified Version of the Document under
-the conditions of sections 2 and 3 above, provided that you release
-the Modified Version under precisely this License, with the Modified
-Version filling the role of the Document, thus licensing distribution
-and modification of the Modified Version to whoever possesses a copy
-of it. In addition, you must do these things in the Modified Version:
-
-@enumerate A
-@item
-Use in the Title Page (and on the covers, if any) a title distinct
-from that of the Document, and from those of previous versions
-(which should, if there were any, be listed in the History section
-of the Document). You may use the same title as a previous version
-if the original publisher of that version gives permission.
-
-@item
-List on the Title Page, as authors, one or more persons or entities
-responsible for authorship of the modifications in the Modified
-Version, together with at least five of the principal authors of the
-Document (all of its principal authors, if it has fewer than five),
-unless they release you from this requirement.
-
-@item
-State on the Title page the name of the publisher of the
-Modified Version, as the publisher.
-
-@item
-Preserve all the copyright notices of the Document.
-
-@item
-Add an appropriate copyright notice for your modifications
-adjacent to the other copyright notices.
-
-@item
-Include, immediately after the copyright notices, a license notice
-giving the public permission to use the Modified Version under the
-terms of this License, in the form shown in the Addendum below.
-
-@item
-Preserve in that license notice the full lists of Invariant Sections
-and required Cover Texts given in the Document's license notice.
-
-@item
-Include an unaltered copy of this License.
-
-@item
-Preserve the section Entitled ``History'', Preserve its Title, and add
-to it an item stating at least the title, year, new authors, and
-publisher of the Modified Version as given on the Title Page. If
-there is no section Entitled ``History'' in the Document, create one
-stating the title, year, authors, and publisher of the Document as
-given on its Title Page, then add an item describing the Modified
-Version as stated in the previous sentence.
-
-@item
-Preserve the network location, if any, given in the Document for
-public access to a Transparent copy of the Document, and likewise
-the network locations given in the Document for previous versions
-it was based on. These may be placed in the ``History'' section.
-You may omit a network location for a work that was published at
-least four years before the Document itself, or if the original
-publisher of the version it refers to gives permission.
-
-@item
-For any section Entitled ``Acknowledgements'' or ``Dedications'', Preserve
-the Title of the section, and preserve in the section all the
-substance and tone of each of the contributor acknowledgements and/or
-dedications given therein.
-
-@item
-Preserve all the Invariant Sections of the Document,
-unaltered in their text and in their titles. Section numbers
-or the equivalent are not considered part of the section titles.
-
-@item
-Delete any section Entitled ``Endorsements''. Such a section
-may not be included in the Modified Version.
-
-@item
-Do not retitle any existing section to be Entitled ``Endorsements'' or
-to conflict in title with any Invariant Section.
-
-@item
-Preserve any Warranty Disclaimers.
-@end enumerate
-
-If the Modified Version includes new front-matter sections or
-appendices that qualify as Secondary Sections and contain no material
-copied from the Document, you may at your option designate some or all
-of these sections as invariant. To do this, add their titles to the
-list of Invariant Sections in the Modified Version's license notice.
-These titles must be distinct from any other section titles.
-
-You may add a section Entitled ``Endorsements'', provided it contains
-nothing but endorsements of your Modified Version by various
-parties---for example, statements of peer review or that the text has
-been approved by an organization as the authoritative definition of a
-standard.
-
-You may add a passage of up to five words as a Front-Cover Text, and a
-passage of up to 25 words as a Back-Cover Text, to the end of the list
-of Cover Texts in the Modified Version. Only one passage of
-Front-Cover Text and one of Back-Cover Text may be added by (or
-through arrangements made by) any one entity. If the Document already
-includes a cover text for the same cover, previously added by you or
-by arrangement made by the same entity you are acting on behalf of,
-you may not add another; but you may replace the old one, on explicit
-permission from the previous publisher that added the old one.
-
-The author(s) and publisher(s) of the Document do not by this License
-give permission to use their names for publicity for or to assert or
-imply endorsement of any Modified Version.
-
-@item
-COMBINING DOCUMENTS
-
-You may combine the Document with other documents released under this
-License, under the terms defined in section 4 above for modified
-versions, provided that you include in the combination all of the
-Invariant Sections of all of the original documents, unmodified, and
-list them all as Invariant Sections of your combined work in its
-license notice, and that you preserve all their Warranty Disclaimers.
-
-The combined work need only contain one copy of this License, and
-multiple identical Invariant Sections may be replaced with a single
-copy. If there are multiple Invariant Sections with the same name but
-different contents, make the title of each such section unique by
-adding at the end of it, in parentheses, the name of the original
-author or publisher of that section if known, or else a unique number.
-Make the same adjustment to the section titles in the list of
-Invariant Sections in the license notice of the combined work.
-
-In the combination, you must combine any sections Entitled ``History''
-in the various original documents, forming one section Entitled
-``History''; likewise combine any sections Entitled ``Acknowledgements'',
-and any sections Entitled ``Dedications''. You must delete all
-sections Entitled ``Endorsements.''
-
-@item
-COLLECTIONS OF DOCUMENTS
-
-You may make a collection consisting of the Document and other documents
-released under this License, and replace the individual copies of this
-License in the various documents with a single copy that is included in
-the collection, provided that you follow the rules of this License for
-verbatim copying of each of the documents in all other respects.
-
-You may extract a single document from such a collection, and distribute
-it individually under this License, provided you insert a copy of this
-License into the extracted document, and follow this License in all
-other respects regarding verbatim copying of that document.
-
-@item
-AGGREGATION WITH INDEPENDENT WORKS
-
-A compilation of the Document or its derivatives with other separate
-and independent documents or works, in or on a volume of a storage or
-distribution medium, is called an ``aggregate'' if the copyright
-resulting from the compilation is not used to limit the legal rights
-of the compilation's users beyond what the individual works permit.
-When the Document is included in an aggregate, this License does not
-apply to the other works in the aggregate which are not themselves
-derivative works of the Document.
-
-If the Cover Text requirement of section 3 is applicable to these
-copies of the Document, then if the Document is less than one half of
-the entire aggregate, the Document's Cover Texts may be placed on
-covers that bracket the Document within the aggregate, or the
-electronic equivalent of covers if the Document is in electronic form.
-Otherwise they must appear on printed covers that bracket the whole
-aggregate.
-
-@item
-TRANSLATION
-
-Translation is considered a kind of modification, so you may
-distribute translations of the Document under the terms of section 4.
-Replacing Invariant Sections with translations requires special
-permission from their copyright holders, but you may include
-translations of some or all Invariant Sections in addition to the
-original versions of these Invariant Sections. You may include a
-translation of this License, and all the license notices in the
-Document, and any Warranty Disclaimers, provided that you also include
-the original English version of this License and the original versions
-of those notices and disclaimers. In case of a disagreement between
-the translation and the original version of this License or a notice
-or disclaimer, the original version will prevail.
-
-If a section in the Document is Entitled ``Acknowledgements'',
-``Dedications'', or ``History'', the requirement (section 4) to Preserve
-its Title (section 1) will typically require changing the actual
-title.
-
-@item
-TERMINATION
-
-You may not copy, modify, sublicense, or distribute the Document
-except as expressly provided under this License. Any attempt
-otherwise to copy, modify, sublicense, or distribute it is void, and
-will automatically terminate your rights under this License.
-
-However, if you cease all violation of this License, then your license
-from a particular copyright holder is reinstated (a) provisionally,
-unless and until the copyright holder explicitly and finally
-terminates your license, and (b) permanently, if the copyright holder
-fails to notify you of the violation by some reasonable means prior to
-60 days after the cessation.
-
-Moreover, your license from a particular copyright holder is
-reinstated permanently if the copyright holder notifies you of the
-violation by some reasonable means, this is the first time you have
-received notice of violation of this License (for any work) from that
-copyright holder, and you cure the violation prior to 30 days after
-your receipt of the notice.
-
-Termination of your rights under this section does not terminate the
-licenses of parties who have received copies or rights from you under
-this License. If your rights have been terminated and not permanently
-reinstated, receipt of a copy of some or all of the same material does
-not give you any rights to use it.
-
-@item
-FUTURE REVISIONS OF THIS LICENSE
-
-The Free Software Foundation may publish new, revised versions
-of the GNU Free Documentation License from time to time. Such new
-versions will be similar in spirit to the present version, but may
-differ in detail to address new problems or concerns. See
-@uref{http://www.gnu.org/copyleft/}.
-
-Each version of the License is given a distinguishing version number.
-If the Document specifies that a particular numbered version of this
-License ``or any later version'' applies to it, you have the option of
-following the terms and conditions either of that specified version or
-of any later version that has been published (not as a draft) by the
-Free Software Foundation. If the Document does not specify a version
-number of this License, you may choose any version ever published (not
-as a draft) by the Free Software Foundation. If the Document
-specifies that a proxy can decide which future versions of this
-License can be used, that proxy's public statement of acceptance of a
-version permanently authorizes you to choose that version for the
-Document.
-
-@item
-RELICENSING
-
-``Massive Multiauthor Collaboration Site'' (or ``MMC Site'') means any
-World Wide Web server that publishes copyrightable works and also
-provides prominent facilities for anybody to edit those works. A
-public wiki that anybody can edit is an example of such a server. A
-``Massive Multiauthor Collaboration'' (or ``MMC'') contained in the
-site means any set of copyrightable works thus published on the MMC
-site.
-
-``CC-BY-SA'' means the Creative Commons Attribution-Share Alike 3.0
-license published by Creative Commons Corporation, a not-for-profit
-corporation with a principal place of business in San Francisco,
-California, as well as future copyleft versions of that license
-published by that same organization.
-
-``Incorporate'' means to publish or republish a Document, in whole or
-in part, as part of another Document.
-
-An MMC is ``eligible for relicensing'' if it is licensed under this
-License, and if all works that were first published under this License
-somewhere other than this MMC, and subsequently incorporated in whole
-or in part into the MMC, (1) had no cover texts or invariant sections,
-and (2) were thus incorporated prior to November 1, 2008.
-
-The operator of an MMC Site may republish an MMC contained in the site
-under CC-BY-SA on the same site at any time before August 1, 2009,
-provided the MMC is eligible for relicensing.
-
-@end enumerate
-
-@page
-@heading ADDENDUM: How to use this License for your documents
-
-To use this License in a document you have written, include a copy of
-the License in the document and put the following copyright and
-license notices just after the title page:
-
-@smallexample
-@group
- Copyright (C) @var{year} @var{your name}.
- Permission is granted to copy, distribute and/or modify this document
- under the terms of the GNU Free Documentation License, Version 1.3
- or any later version published by the Free Software Foundation;
- with no Invariant Sections, no Front-Cover Texts, and no Back-Cover
- Texts. A copy of the license is included in the section entitled ``GNU
- Free Documentation License''.
-@end group
-@end smallexample
-
-If you have Invariant Sections, Front-Cover Texts and Back-Cover Texts,
-replace the ``with@dots{}Texts.'' line with this:
-
-@smallexample
-@group
- with the Invariant Sections being @var{list their titles}, with
- the Front-Cover Texts being @var{list}, and with the Back-Cover Texts
- being @var{list}.
-@end group
-@end smallexample
-
-If you have Invariant Sections without Cover Texts, or some other
-combination of the three, merge those two alternatives to suit the
-situation.
-
-If your document contains nontrivial examples of program code, we
-recommend releasing these examples in parallel under your choice of
-free software license, such as the GNU General Public License,
-to permit their use in free software.
-
-@c Local Variables:
-@c ispell-local-pdict: "ispell-dict"
-@c End:
diff --git a/etc/gnu-oids.texi b/etc/gnu-oids.texi
deleted file mode 100644
index da9146cc1..000000000
--- a/etc/gnu-oids.texi
+++ /dev/null
@@ -1,52 +0,0 @@
-@c This table of OID's is included in the GNU Coding Standards.
-@c
-@c Copyright 2008, 2009, 2010 Free Software Foundation, Inc.
-@c
-@c Copying and distribution of this file, with or without modification,
-@c are permitted in any medium without royalty provided the copyright
-@c notice and this notice are preserved.
-@c
-@c When adding new OIDs, please add them also to
-@c http://www.alvestrand.no/objectid/ (except it gets an internal
-@c server error, so never mind)
-@c (Our page is http://www.alvestrand.no/objectid/1.3.6.1.4.1.11591.html.)
-
-1.3.6.1.4.1.11591 GNU
-
-1.3.6.1.4.1.11591.1 GNU Radius
-
-1.3.6.1.4.1.11591.2 GnuPG
- 1.3.6.1.4.1.11591.2.1 notation
- 1.3.6.1.4.1.11591.2.1.1 pkaAddress
-
-1.3.6.1.4.1.11591.3 GNU Radar
-
-1.3.6.1.4.1.11591.4 GNU GSS
-
-@c Added 2008-10-24 on request from Sergey Poznyakoff <gray@gnu.org.ua>
-1.3.6.1.4.1.11591.5 GNU Mailutils
-
-@c Added 2009-03-03 on request from Simon Josefsson <simon@josefsson.org>
-1.3.6.1.4.1.11591.6 GNU Shishi
-
-@c Added 2010-05-17 on request from Eric Blossom <eb@comsec.com>
-1.3.6.1.4.1.11591.7 GNU Radio
-
-1.3.6.1.4.1.11591.12 digestAlgorithm
- 1.3.6.1.4.1.11591.12.2 TIGER/192
- 1.3.6.1.4.1.11591.13 encryptionAlgorithm
- 1.3.6.1.4.1.11591.13.2 Serpent
- 1.3.6.1.4.1.11591.13.2.1 Serpent-128-ECB
- 1.3.6.1.4.1.11591.13.2.2 Serpent-128-CBC
- 1.3.6.1.4.1.11591.13.2.3 Serpent-128-OFB
- 1.3.6.1.4.1.11591.13.2.4 Serpent-128-CFB
- 1.3.6.1.4.1.11591.13.2.21 Serpent-192-ECB
- 1.3.6.1.4.1.11591.13.2.22 Serpent-192-CBC
- 1.3.6.1.4.1.11591.13.2.23 Serpent-192-OFB
- 1.3.6.1.4.1.11591.13.2.24 Serpent-192-CFB
- 1.3.6.1.4.1.11591.13.2.41 Serpent-256-ECB
- 1.3.6.1.4.1.11591.13.2.42 Serpent-256-CBC
- 1.3.6.1.4.1.11591.13.2.43 Serpent-256-OFB
- 1.3.6.1.4.1.11591.13.2.44 Serpent-256-CFB
- 1.3.6.1.4.1.11591.14 CRC algorithms
- 1.3.6.1.4.1.11591.14.1 CRC 32
diff --git a/etc/make-stds.texi b/etc/make-stds.texi
deleted file mode 100644
index 91a1ed030..000000000
--- a/etc/make-stds.texi
+++ /dev/null
@@ -1,1135 +0,0 @@
-@comment This file is included by both standards.texi and make.texinfo.
-@comment It was broken out of standards.texi on 1/6/93 by roland.
-
-@node Makefile Conventions
-@chapter Makefile Conventions
-@comment standards.texi does not print an index, but make.texinfo does.
-@cindex makefile, conventions for
-@cindex conventions for makefiles
-@cindex standards for makefiles
-
-@c Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 2000, 2001,
-@c 2004, 2005, 2006 Free Software Foundation, Inc.
-
-@c Permission is granted to copy, distribute and/or modify this document
-@c under the terms of the GNU Free Documentation License, Version 1.2
-@c or any later version published by the Free Software Foundation;
-@c with no Invariant Sections, with no
-@c Front-Cover Texts, and with no Back-Cover Texts.
-@c A copy of the license is included in the section entitled ``GNU
-@c Free Documentation License''.
-
-This
-@ifinfo
-node
-@end ifinfo
-@iftex
-@ifset CODESTD
-section
-@end ifset
-@ifclear CODESTD
-chapter
-@end ifclear
-@end iftex
-describes conventions for writing the Makefiles for GNU programs.
-Using Automake will help you write a Makefile that follows these
-conventions.
-
-@menu
-* Makefile Basics:: General conventions for Makefiles.
-* Utilities in Makefiles:: Utilities to be used in Makefiles.
-* Command Variables:: Variables for specifying commands.
-* DESTDIR:: Supporting staged installs.
-* Directory Variables:: Variables for installation directories.
-* Standard Targets:: Standard targets for users.
-* Install Command Categories:: Three categories of commands in the `install'
- rule: normal, pre-install and post-install.
-@end menu
-
-@node Makefile Basics
-@section General Conventions for Makefiles
-
-Every Makefile should contain this line:
-
-@example
-SHELL = /bin/sh
-@end example
-
-@noindent
-to avoid trouble on systems where the @code{SHELL} variable might be
-inherited from the environment. (This is never a problem with GNU
-@code{make}.)
-
-Different @code{make} programs have incompatible suffix lists and
-implicit rules, and this sometimes creates confusion or misbehavior. So
-it is a good idea to set the suffix list explicitly using only the
-suffixes you need in the particular Makefile, like this:
-
-@example
-.SUFFIXES:
-.SUFFIXES: .c .o
-@end example
-
-@noindent
-The first line clears out the suffix list, the second introduces all
-suffixes which may be subject to implicit rules in this Makefile.
-
-Don't assume that @file{.} is in the path for command execution. When
-you need to run programs that are a part of your package during the
-make, please make sure that it uses @file{./} if the program is built as
-part of the make or @file{$(srcdir)/} if the file is an unchanging part
-of the source code. Without one of these prefixes, the current search
-path is used.
-
-The distinction between @file{./} (the @dfn{build directory}) and
-@file{$(srcdir)/} (the @dfn{source directory}) is important because
-users can build in a separate directory using the @samp{--srcdir} option
-to @file{configure}. A rule of the form:
-
-@smallexample
-foo.1 : foo.man sedscript
- sed -e sedscript foo.man > foo.1
-@end smallexample
-
-@noindent
-will fail when the build directory is not the source directory, because
-@file{foo.man} and @file{sedscript} are in the source directory.
-
-When using GNU @code{make}, relying on @samp{VPATH} to find the source
-file will work in the case where there is a single dependency file,
-since the @code{make} automatic variable @samp{$<} will represent the
-source file wherever it is. (Many versions of @code{make} set @samp{$<}
-only in implicit rules.) A Makefile target like
-
-@smallexample
-foo.o : bar.c
- $(CC) -I. -I$(srcdir) $(CFLAGS) -c bar.c -o foo.o
-@end smallexample
-
-@noindent
-should instead be written as
-
-@smallexample
-foo.o : bar.c
- $(CC) -I. -I$(srcdir) $(CFLAGS) -c $< -o $@@
-@end smallexample
-
-@noindent
-in order to allow @samp{VPATH} to work correctly. When the target has
-multiple dependencies, using an explicit @samp{$(srcdir)} is the easiest
-way to make the rule work well. For example, the target above for
-@file{foo.1} is best written as:
-
-@smallexample
-foo.1 : foo.man sedscript
- sed -e $(srcdir)/sedscript $(srcdir)/foo.man > $@@
-@end smallexample
-
-GNU distributions usually contain some files which are not source
-files---for example, Info files, and the output from Autoconf, Automake,
-Bison or Flex. Since these files normally appear in the source
-directory, they should always appear in the source directory, not in the
-build directory. So Makefile rules to update them should put the
-updated files in the source directory.
-
-However, if a file does not appear in the distribution, then the
-Makefile should not put it in the source directory, because building a
-program in ordinary circumstances should not modify the source directory
-in any way.
-
-Try to make the build and installation targets, at least (and all their
-subtargets) work correctly with a parallel @code{make}.
-
-@node Utilities in Makefiles
-@section Utilities in Makefiles
-
-Write the Makefile commands (and any shell scripts, such as
-@code{configure}) to run in @code{sh}, not in @code{csh}. Don't use any
-special features of @code{ksh} or @code{bash}.
-
-The @code{configure} script and the Makefile rules for building and
-installation should not use any utilities directly except these:
-
-@c dd find
-@c gunzip gzip md5sum
-@c mkfifo mknod tee uname
-
-@example
-cat cmp cp diff echo egrep expr false grep install-info
-ln ls mkdir mv pwd rm rmdir sed sleep sort tar test touch true
-@end example
-
-The compression program @code{gzip} can be used in the @code{dist} rule.
-
-Stick to the generally supported options for these programs. For
-example, don't use @samp{mkdir -p}, convenient as it may be, because
-most systems don't support it.
-
-It is a good idea to avoid creating symbolic links in makefiles, since a
-few systems don't support them.
-
-The Makefile rules for building and installation can also use compilers
-and related programs, but should do so via @code{make} variables so that the
-user can substitute alternatives. Here are some of the programs we
-mean:
-
-@example
-ar bison cc flex install ld ldconfig lex
-make makeinfo ranlib texi2dvi yacc
-@end example
-
-Use the following @code{make} variables to run those programs:
-
-@example
-$(AR) $(BISON) $(CC) $(FLEX) $(INSTALL) $(LD) $(LDCONFIG) $(LEX)
-$(MAKE) $(MAKEINFO) $(RANLIB) $(TEXI2DVI) $(YACC)
-@end example
-
-When you use @code{ranlib} or @code{ldconfig}, you should make sure
-nothing bad happens if the system does not have the program in question.
-Arrange to ignore an error from that command, and print a message before
-the command to tell the user that failure of this command does not mean
-a problem. (The Autoconf @samp{AC_PROG_RANLIB} macro can help with
-this.)
-
-If you use symbolic links, you should implement a fallback for systems
-that don't have symbolic links.
-
-Additional utilities that can be used via Make variables are:
-
-@example
-chgrp chmod chown mknod
-@end example
-
-It is ok to use other utilities in Makefile portions (or scripts)
-intended only for particular systems where you know those utilities
-exist.
-
-@node Command Variables
-@section Variables for Specifying Commands
-
-Makefiles should provide variables for overriding certain commands, options,
-and so on.
-
-In particular, you should run most utility programs via variables.
-Thus, if you use Bison, have a variable named @code{BISON} whose default
-value is set with @samp{BISON = bison}, and refer to it with
-@code{$(BISON)} whenever you need to use Bison.
-
-File management utilities such as @code{ln}, @code{rm}, @code{mv}, and
-so on, need not be referred to through variables in this way, since users
-don't need to replace them with other programs.
-
-Each program-name variable should come with an options variable that is
-used to supply options to the program. Append @samp{FLAGS} to the
-program-name variable name to get the options variable name---for
-example, @code{BISONFLAGS}. (The names @code{CFLAGS} for the C
-compiler, @code{YFLAGS} for yacc, and @code{LFLAGS} for lex, are
-exceptions to this rule, but we keep them because they are standard.)
-Use @code{CPPFLAGS} in any compilation command that runs the
-preprocessor, and use @code{LDFLAGS} in any compilation command that
-does linking as well as in any direct use of @code{ld}.
-
-If there are C compiler options that @emph{must} be used for proper
-compilation of certain files, do not include them in @code{CFLAGS}.
-Users expect to be able to specify @code{CFLAGS} freely themselves.
-Instead, arrange to pass the necessary options to the C compiler
-independently of @code{CFLAGS}, by writing them explicitly in the
-compilation commands or by defining an implicit rule, like this:
-
-@smallexample
-CFLAGS = -g
-ALL_CFLAGS = -I. $(CFLAGS)
-.c.o:
- $(CC) -c $(CPPFLAGS) $(ALL_CFLAGS) $<
-@end smallexample
-
-Do include the @samp{-g} option in @code{CFLAGS}, because that is not
-@emph{required} for proper compilation. You can consider it a default
-that is only recommended. If the package is set up so that it is
-compiled with GCC by default, then you might as well include @samp{-O}
-in the default value of @code{CFLAGS} as well.
-
-Put @code{CFLAGS} last in the compilation command, after other variables
-containing compiler options, so the user can use @code{CFLAGS} to
-override the others.
-
-@code{CFLAGS} should be used in every invocation of the C compiler,
-both those which do compilation and those which do linking.
-
-Every Makefile should define the variable @code{INSTALL}, which is the
-basic command for installing a file into the system.
-
-Every Makefile should also define the variables @code{INSTALL_PROGRAM}
-and @code{INSTALL_DATA}. (The default for @code{INSTALL_PROGRAM} should
-be @code{$(INSTALL)}; the default for @code{INSTALL_DATA} should be
-@code{$@{INSTALL@} -m 644}.) Then it should use those variables as the
-commands for actual installation, for executables and non-executables
-respectively. Minimal use of these variables is as follows:
-
-@example
-$(INSTALL_PROGRAM) foo $(bindir)/foo
-$(INSTALL_DATA) libfoo.a $(libdir)/libfoo.a
-@end example
-
-However, it is preferable to support a @code{DESTDIR} prefix on the
-target files, as explained in the next section.
-
-@noindent
-Always use a file name, not a directory name, as the second argument of
-the installation commands. Use a separate command for each file to be
-installed.
-
-
-@node DESTDIR
-@section @code{DESTDIR}: support for staged installs
-
-@vindex DESTDIR
-@cindex staged installs
-@cindex installations, staged
-
-@code{DESTDIR} is a variable prepended to each installed target file,
-like this:
-
-@example
-$(INSTALL_PROGRAM) foo $(DESTDIR)$(bindir)/foo
-$(INSTALL_DATA) libfoo.a $(DESTDIR)$(libdir)/libfoo.a
-@end example
-
-The @code{DESTDIR} variable is specified by the user on the @code{make}
-command line. For example:
-
-@example
-make DESTDIR=/tmp/stage install
-@end example
-
-@noindent
-@code{DESTDIR} should be supported only in the @code{install*} and
-@code{uninstall*} targets, as those are the only targets where it is
-useful.
-
-If your installation step would normally install
-@file{/usr/local/bin/foo} and @file{/usr/local/lib/libfoo.a}, then an
-installation invoked as in the example above would install
-@file{/tmp/stage/usr/local/bin/foo} and
-@file{/tmp/stage/usr/local/lib/libfoo.a} instead.
-
-Prepending the variable @code{DESTDIR} to each target in this way
-provides for @dfn{staged installs}, where the installed files are not
-placed directly into their expected location but are instead copied
-into a temporary location (@code{DESTDIR}). However, installed files
-maintain their relative directory structure and any embedded file names
-will not be modified.
-
-You should not set the value of @code{DESTDIR} in your @file{Makefile}
-at all; then the files are installed into their expected locations by
-default. Also, specifying @code{DESTDIR} should not change the
-operation of the software in any way, so its value should not be
-included in any file contents.
-
-@code{DESTDIR} support is commonly used in package creation. It is
-also helpful to users who want to understand what a given package will
-install where, and to allow users who don't normally have permissions
-to install into protected areas to build and install before gaining
-those permissions. Finally, it can be useful with tools such as
-@code{stow}, where code is installed in one place but made to appear
-to be installed somewhere else using symbolic links or special mount
-operations. So, we strongly recommend GNU packages support
-@code{DESTDIR}, though it is not an absolute requirement.
-
-
-@node Directory Variables
-@section Variables for Installation Directories
-
-Installation directories should always be named by variables, so it is
-easy to install in a nonstandard place. The standard names for these
-variables and the values they should have in GNU packages are
-described below. They are based on a standard file system layout;
-variants of it are used in GNU/Linux and other modern operating
-systems.
-
-Installers are expected to override these values when calling
-@command{make} (e.g., @kbd{make prefix=/usr install} or
-@command{configure} (e.g., @kbd{configure --prefix=/usr}). GNU
-packages should not try to guess which value should be appropriate for
-these variables on the system they are being installed onto: use the
-default settings specified here so that all GNU packages behave
-identically, allowing the installer to achieve any desired layout.
-
-These first two variables set the root for the installation. All the
-other installation directories should be subdirectories of one of
-these two, and nothing should be directly installed into these two
-directories.
-
-@table @code
-@item prefix
-@vindex prefix
-A prefix used in constructing the default values of the variables listed
-below. The default value of @code{prefix} should be @file{/usr/local}.
-When building the complete GNU system, the prefix will be empty and
-@file{/usr} will be a symbolic link to @file{/}.
-(If you are using Autoconf, write it as @samp{@@prefix@@}.)
-
-Running @samp{make install} with a different value of @code{prefix} from
-the one used to build the program should @emph{not} recompile the
-program.
-
-@item exec_prefix
-@vindex exec_prefix
-A prefix used in constructing the default values of some of the
-variables listed below. The default value of @code{exec_prefix} should
-be @code{$(prefix)}.
-(If you are using Autoconf, write it as @samp{@@exec_prefix@@}.)
-
-Generally, @code{$(exec_prefix)} is used for directories that contain
-machine-specific files (such as executables and subroutine libraries),
-while @code{$(prefix)} is used directly for other directories.
-
-Running @samp{make install} with a different value of @code{exec_prefix}
-from the one used to build the program should @emph{not} recompile the
-program.
-@end table
-
-Executable programs are installed in one of the following directories.
-
-@table @code
-@item bindir
-@vindex bindir
-The directory for installing executable programs that users can run.
-This should normally be @file{/usr/local/bin}, but write it as
-@file{$(exec_prefix)/bin}.
-(If you are using Autoconf, write it as @samp{@@bindir@@}.)
-
-@item sbindir
-@vindex sbindir
-The directory for installing executable programs that can be run from
-the shell, but are only generally useful to system administrators. This
-should normally be @file{/usr/local/sbin}, but write it as
-@file{$(exec_prefix)/sbin}.
-(If you are using Autoconf, write it as @samp{@@sbindir@@}.)
-
-@item libexecdir
-@vindex libexecdir
-@comment This paragraph adjusted to avoid overfull hbox --roland 5jul94
-The directory for installing executable programs to be run by other
-programs rather than by users. This directory should normally be
-@file{/usr/local/libexec}, but write it as @file{$(exec_prefix)/libexec}.
-(If you are using Autoconf, write it as @samp{@@libexecdir@@}.)
-
-The definition of @samp{libexecdir} is the same for all packages, so
-you should install your data in a subdirectory thereof. Most packages
-install their data under @file{$(libexecdir)/@var{package-name}/},
-possibly within additional subdirectories thereof, such as
-@file{$(libexecdir)/@var{package-name}/@var{machine}/@var{version}}.
-@end table
-
-Data files used by the program during its execution are divided into
-categories in two ways.
-
-@itemize @bullet
-@item
-Some files are normally modified by programs; others are never normally
-modified (though users may edit some of these).
-
-@item
-Some files are architecture-independent and can be shared by all
-machines at a site; some are architecture-dependent and can be shared
-only by machines of the same kind and operating system; others may never
-be shared between two machines.
-@end itemize
-
-This makes for six different possibilities. However, we want to
-discourage the use of architecture-dependent files, aside from object
-files and libraries. It is much cleaner to make other data files
-architecture-independent, and it is generally not hard.
-
-Here are the variables Makefiles should use to specify directories
-to put these various kinds of files in:
-
-@table @samp
-@item datarootdir
-The root of the directory tree for read-only architecture-independent
-data files. This should normally be @file{/usr/local/share}, but
-write it as @file{$(prefix)/share}. (If you are using Autoconf, write
-it as @samp{@@datarootdir@@}.) @samp{datadir}'s default value is
-based on this variable; so are @samp{infodir}, @samp{mandir}, and
-others.
-
-@item datadir
-The directory for installing idiosyncratic read-only
-architecture-independent data files for this program. This is usually
-the same place as @samp{datarootdir}, but we use the two separate
-variables so that you can move these program-specific files without
-altering the location for Info files, man pages, etc.
-
-This should normally be @file{/usr/local/share}, but write it as
-@file{$(datarootdir)}. (If you are using Autoconf, write it as
-@samp{@@datadir@@}.)
-
-The definition of @samp{datadir} is the same for all packages, so you
-should install your data in a subdirectory thereof. Most packages
-install their data under @file{$(datadir)/@var{package-name}/}.
-
-@item sysconfdir
-The directory for installing read-only data files that pertain to a
-single machine--that is to say, files for configuring a host. Mailer
-and network configuration files, @file{/etc/passwd}, and so forth belong
-here. All the files in this directory should be ordinary ASCII text
-files. This directory should normally be @file{/usr/local/etc}, but
-write it as @file{$(prefix)/etc}.
-(If you are using Autoconf, write it as @samp{@@sysconfdir@@}.)
-
-Do not install executables here in this directory (they probably belong
-in @file{$(libexecdir)} or @file{$(sbindir)}). Also do not install
-files that are modified in the normal course of their use (programs
-whose purpose is to change the configuration of the system excluded).
-Those probably belong in @file{$(localstatedir)}.
-
-@item sharedstatedir
-The directory for installing architecture-independent data files which
-the programs modify while they run. This should normally be
-@file{/usr/local/com}, but write it as @file{$(prefix)/com}.
-(If you are using Autoconf, write it as @samp{@@sharedstatedir@@}.)
-
-@item localstatedir
-The directory for installing data files which the programs modify while
-they run, and that pertain to one specific machine. Users should never
-need to modify files in this directory to configure the package's
-operation; put such configuration information in separate files that go
-in @file{$(datadir)} or @file{$(sysconfdir)}. @file{$(localstatedir)}
-should normally be @file{/usr/local/var}, but write it as
-@file{$(prefix)/var}.
-(If you are using Autoconf, write it as @samp{@@localstatedir@@}.)
-@end table
-
-These variables specify the directory for installing certain specific
-types of files, if your program has them. Every GNU package should
-have Info files, so every program needs @samp{infodir}, but not all
-need @samp{libdir} or @samp{lispdir}.
-
-@table @samp
-@item includedir
-@c rewritten to avoid overfull hbox --roland
-The directory for installing header files to be included by user
-programs with the C @samp{#include} preprocessor directive. This
-should normally be @file{/usr/local/include}, but write it as
-@file{$(prefix)/include}.
-(If you are using Autoconf, write it as @samp{@@includedir@@}.)
-
-Most compilers other than GCC do not look for header files in directory
-@file{/usr/local/include}. So installing the header files this way is
-only useful with GCC. Sometimes this is not a problem because some
-libraries are only really intended to work with GCC. But some libraries
-are intended to work with other compilers. They should install their
-header files in two places, one specified by @code{includedir} and one
-specified by @code{oldincludedir}.
-
-@item oldincludedir
-The directory for installing @samp{#include} header files for use with
-compilers other than GCC. This should normally be @file{/usr/include}.
-(If you are using Autoconf, you can write it as @samp{@@oldincludedir@@}.)
-
-The Makefile commands should check whether the value of
-@code{oldincludedir} is empty. If it is, they should not try to use
-it; they should cancel the second installation of the header files.
-
-A package should not replace an existing header in this directory unless
-the header came from the same package. Thus, if your Foo package
-provides a header file @file{foo.h}, then it should install the header
-file in the @code{oldincludedir} directory if either (1) there is no
-@file{foo.h} there or (2) the @file{foo.h} that exists came from the Foo
-package.
-
-To tell whether @file{foo.h} came from the Foo package, put a magic
-string in the file---part of a comment---and @code{grep} for that string.
-
-@item docdir
-The directory for installing documentation files (other than Info) for
-this package. By default, it should be
-@file{/usr/local/share/doc/@var{yourpkg}}, but it should be written as
-@file{$(datarootdir)/doc/@var{yourpkg}}. (If you are using Autoconf,
-write it as @samp{@@docdir@@}.) The @var{yourpkg} subdirectory, which
-may include a version number, prevents collisions among files with
-common names, such as @file{README}.
-
-@item infodir
-The directory for installing the Info files for this package. By
-default, it should be @file{/usr/local/share/info}, but it should be
-written as @file{$(datarootdir)/info}. (If you are using Autoconf,
-write it as @samp{@@infodir@@}.) @code{infodir} is separate from
-@code{docdir} for compatibility with existing practice.
-
-@item htmldir
-@itemx dvidir
-@itemx pdfdir
-@itemx psdir
-Directories for installing documentation files in the particular
-format. They should all be set to @code{$(docdir)} by default. (If
-you are using Autoconf, write them as @samp{@@htmldir@@},
-@samp{@@dvidir@@}, etc.) Packages which supply several translations
-of their documentation should install them in
-@samp{$(htmldir)/}@var{ll}, @samp{$(pdfdir)/}@var{ll}, etc. where
-@var{ll} is a locale abbreviation such as @samp{en} or @samp{pt_BR}.
-
-@item libdir
-The directory for object files and libraries of object code. Do not
-install executables here, they probably ought to go in @file{$(libexecdir)}
-instead. The value of @code{libdir} should normally be
-@file{/usr/local/lib}, but write it as @file{$(exec_prefix)/lib}.
-(If you are using Autoconf, write it as @samp{@@libdir@@}.)
-
-@item lispdir
-The directory for installing any Emacs Lisp files in this package. By
-default, it should be @file{/usr/local/share/emacs/site-lisp}, but it
-should be written as @file{$(datarootdir)/emacs/site-lisp}.
-
-If you are using Autoconf, write the default as @samp{@@lispdir@@}.
-In order to make @samp{@@lispdir@@} work, you need the following lines
-in your @file{configure.in} file:
-
-@example
-lispdir='$@{datarootdir@}/emacs/site-lisp'
-AC_SUBST(lispdir)
-@end example
-
-@item localedir
-The directory for installing locale-specific message catalogs for this
-package. By default, it should be @file{/usr/local/share/locale}, but
-it should be written as @file{$(datarootdir)/locale}. (If you are
-using Autoconf, write it as @samp{@@localedir@@}.) This directory
-usually has a subdirectory per locale.
-@end table
-
-Unix-style man pages are installed in one of the following:
-
-@table @samp
-@item mandir
-The top-level directory for installing the man pages (if any) for this
-package. It will normally be @file{/usr/local/share/man}, but you
-should write it as @file{$(datarootdir)/man}. (If you are using
-Autoconf, write it as @samp{@@mandir@@}.)
-
-@item man1dir
-The directory for installing section 1 man pages. Write it as
-@file{$(mandir)/man1}.
-@item man2dir
-The directory for installing section 2 man pages. Write it as
-@file{$(mandir)/man2}
-@item @dots{}
-
-@strong{Don't make the primary documentation for any GNU software be a
-man page. Write a manual in Texinfo instead. Man pages are just for
-the sake of people running GNU software on Unix, which is a secondary
-application only.}
-
-@item manext
-The file name extension for the installed man page. This should contain
-a period followed by the appropriate digit; it should normally be @samp{.1}.
-
-@item man1ext
-The file name extension for installed section 1 man pages.
-@item man2ext
-The file name extension for installed section 2 man pages.
-@item @dots{}
-Use these names instead of @samp{manext} if the package needs to install man
-pages in more than one section of the manual.
-@end table
-
-And finally, you should set the following variable:
-
-@table @samp
-@item srcdir
-The directory for the sources being compiled. The value of this
-variable is normally inserted by the @code{configure} shell script.
-(If you are using Autoconf, use @samp{srcdir = @@srcdir@@}.)
-@end table
-
-For example:
-
-@smallexample
-@c I have changed some of the comments here slightly to fix an overfull
-@c hbox, so the make manual can format correctly. --roland
-# Common prefix for installation directories.
-# NOTE: This directory must exist when you start the install.
-prefix = /usr/local
-datarootdir = $(prefix)/share
-datadir = $(datarootdir)
-exec_prefix = $(prefix)
-# Where to put the executable for the command `gcc'.
-bindir = $(exec_prefix)/bin
-# Where to put the directories used by the compiler.
-libexecdir = $(exec_prefix)/libexec
-# Where to put the Info files.
-infodir = $(datarootdir)/info
-@end smallexample
-
-If your program installs a large number of files into one of the
-standard user-specified directories, it might be useful to group them
-into a subdirectory particular to that program. If you do this, you
-should write the @code{install} rule to create these subdirectories.
-
-Do not expect the user to include the subdirectory name in the value of
-any of the variables listed above. The idea of having a uniform set of
-variable names for installation directories is to enable the user to
-specify the exact same values for several different GNU packages. In
-order for this to be useful, all the packages must be designed so that
-they will work sensibly when the user does so.
-
-At times, not all of these variables may be implemented in the current
-release of Autoconf and/or Automake; but as of Autoconf@tie{}2.60, we
-believe all of them are. When any are missing, the descriptions here
-serve as specifications for what Autoconf will implement. As a
-programmer, you can either use a development version of Autoconf or
-avoid using these variables until a stable release is made which
-supports them.
-
-
-@node Standard Targets
-@section Standard Targets for Users
-
-All GNU programs should have the following targets in their Makefiles:
-
-@table @samp
-@item all
-Compile the entire program. This should be the default target. This
-target need not rebuild any documentation files; Info files should
-normally be included in the distribution, and DVI (and other
-documentation format) files should be made only when explicitly asked
-for.
-
-By default, the Make rules should compile and link with @samp{-g}, so
-that executable programs have debugging symbols. Users who don't mind
-being helpless can strip the executables later if they wish.
-
-@item install
-Compile the program and copy the executables, libraries, and so on to
-the file names where they should reside for actual use. If there is a
-simple test to verify that a program is properly installed, this target
-should run that test.
-
-Do not strip executables when installing them. Devil-may-care users can
-use the @code{install-strip} target to do that.
-
-If possible, write the @code{install} target rule so that it does not
-modify anything in the directory where the program was built, provided
-@samp{make all} has just been done. This is convenient for building the
-program under one user name and installing it under another.
-
-The commands should create all the directories in which files are to be
-installed, if they don't already exist. This includes the directories
-specified as the values of the variables @code{prefix} and
-@code{exec_prefix}, as well as all subdirectories that are needed.
-One way to do this is by means of an @code{installdirs} target
-as described below.
-
-Use @samp{-} before any command for installing a man page, so that
-@code{make} will ignore any errors. This is in case there are systems
-that don't have the Unix man page documentation system installed.
-
-The way to install Info files is to copy them into @file{$(infodir)}
-with @code{$(INSTALL_DATA)} (@pxref{Command Variables}), and then run
-the @code{install-info} program if it is present. @code{install-info}
-is a program that edits the Info @file{dir} file to add or update the
-menu entry for the given Info file; it is part of the Texinfo package.
-Here is a sample rule to install an Info file:
-
-@comment This example has been carefully formatted for the Make manual.
-@comment Please do not reformat it without talking to bug-make@gnu.org.
-@smallexample
-$(DESTDIR)$(infodir)/foo.info: foo.info
- $(POST_INSTALL)
-# There may be a newer info file in . than in srcdir.
- -if test -f foo.info; then d=.; \
- else d=$(srcdir); fi; \
- $(INSTALL_DATA) $$d/foo.info $(DESTDIR)$@@; \
-# Run install-info only if it exists.
-# Use `if' instead of just prepending `-' to the
-# line so we notice real errors from install-info.
-# We use `$(SHELL) -c' because some shells do not
-# fail gracefully when there is an unknown command.
- if $(SHELL) -c 'install-info --version' \
- >/dev/null 2>&1; then \
- install-info --dir-file=$(DESTDIR)$(infodir)/dir \
- $(DESTDIR)$(infodir)/foo.info; \
- else true; fi
-@end smallexample
-
-When writing the @code{install} target, you must classify all the
-commands into three categories: normal ones, @dfn{pre-installation}
-commands and @dfn{post-installation} commands. @xref{Install Command
-Categories}.
-
-@item install-html
-@itemx install-dvi
-@itemx install-pdf
-@itemx install-ps
-These targets install documentation in formats other than Info;
-they're intended to be called explicitly by the person installing the
-package, if that format is desired. GNU prefers Info files, so these
-must be installed by the @code{install} target.
-
-When you have many documentation files to install, we recommend that
-you avoid collisions and clutter by arranging for these targets to
-install in subdirectories of the appropriate installation directory,
-such as @code{htmldir}. As one example, if your package has multiple
-manuals, and you wish to install HTML documentation with many files
-(such as the ``split'' mode output by @code{makeinfo --html}), you'll
-certainly want to use subdirectories, or two nodes with the same name
-in different manuals will overwrite each other.
-
-Please make these @code{install-@var{format}} targets invoke the
-commands for the @var{format} target, for example, by making
-@var{format} a dependency.
-
-@item uninstall
-Delete all the installed files---the copies that the @samp{install}
-and @samp{install-*} targets create.
-
-This rule should not modify the directories where compilation is done,
-only the directories where files are installed.
-
-The uninstallation commands are divided into three categories, just like
-the installation commands. @xref{Install Command Categories}.
-
-@item install-strip
-Like @code{install}, but strip the executable files while installing
-them. In simple cases, this target can use the @code{install} target in
-a simple way:
-
-@smallexample
-install-strip:
- $(MAKE) INSTALL_PROGRAM='$(INSTALL_PROGRAM) -s' \
- install
-@end smallexample
-
-But if the package installs scripts as well as real executables, the
-@code{install-strip} target can't just refer to the @code{install}
-target; it has to strip the executables but not the scripts.
-
-@code{install-strip} should not strip the executables in the build
-directory which are being copied for installation. It should only strip
-the copies that are installed.
-
-Normally we do not recommend stripping an executable unless you are sure
-the program has no bugs. However, it can be reasonable to install a
-stripped executable for actual execution while saving the unstripped
-executable elsewhere in case there is a bug.
-
-@comment The gratuitous blank line here is to make the table look better
-@comment in the printed Make manual. Please leave it in.
-@item clean
-
-Delete all files in the current directory that are normally created by
-building the program. Also delete files in other directories if they
-are created by this makefile. However, don't delete the files that
-record the configuration. Also preserve files that could be made by
-building, but normally aren't because the distribution comes with
-them. There is no need to delete parent directories that were created
-with @samp{mkdir -p}, since they could have existed anyway.
-
-Delete @file{.dvi} files here if they are not part of the distribution.
-
-@item distclean
-Delete all files in the current directory (or created by this
-makefile) that are created by configuring or building the program. If
-you have unpacked the source and built the program without creating
-any other files, @samp{make distclean} should leave only the files
-that were in the distribution. However, there is no need to delete
-parent directories that were created with @samp{mkdir -p}, since they
-could have existed anyway.
-
-@item mostlyclean
-Like @samp{clean}, but may refrain from deleting a few files that people
-normally don't want to recompile. For example, the @samp{mostlyclean}
-target for GCC does not delete @file{libgcc.a}, because recompiling it
-is rarely necessary and takes a lot of time.
-
-@item maintainer-clean
-Delete almost everything that can be reconstructed with this Makefile.
-This typically includes everything deleted by @code{distclean}, plus
-more: C source files produced by Bison, tags tables, Info files, and
-so on.
-
-The reason we say ``almost everything'' is that running the command
-@samp{make maintainer-clean} should not delete @file{configure} even
-if @file{configure} can be remade using a rule in the Makefile. More
-generally, @samp{make maintainer-clean} should not delete anything
-that needs to exist in order to run @file{configure} and then begin to
-build the program. Also, there is no need to delete parent
-directories that were created with @samp{mkdir -p}, since they could
-have existed anyway. These are the only exceptions;
-@code{maintainer-clean} should delete everything else that can be
-rebuilt.
-
-The @samp{maintainer-clean} target is intended to be used by a maintainer of
-the package, not by ordinary users. You may need special tools to
-reconstruct some of the files that @samp{make maintainer-clean} deletes.
-Since these files are normally included in the distribution, we don't
-take care to make them easy to reconstruct. If you find you need to
-unpack the full distribution again, don't blame us.
-
-To help make users aware of this, the commands for the special
-@code{maintainer-clean} target should start with these two:
-
-@smallexample
-@@echo 'This command is intended for maintainers to use; it'
-@@echo 'deletes files that may need special tools to rebuild.'
-@end smallexample
-
-@item TAGS
-Update a tags table for this program.
-@c ADR: how?
-
-@item info
-Generate any Info files needed. The best way to write the rules is as
-follows:
-
-@smallexample
-info: foo.info
-
-foo.info: foo.texi chap1.texi chap2.texi
- $(MAKEINFO) $(srcdir)/foo.texi
-@end smallexample
-
-@noindent
-You must define the variable @code{MAKEINFO} in the Makefile. It should
-run the @code{makeinfo} program, which is part of the Texinfo
-distribution.
-
-Normally a GNU distribution comes with Info files, and that means the
-Info files are present in the source directory. Therefore, the Make
-rule for an info file should update it in the source directory. When
-users build the package, ordinarily Make will not update the Info files
-because they will already be up to date.
-
-@item dvi
-@itemx html
-@itemx pdf
-@itemx ps
-Generate documentation files in the given format. These targets
-should always exist, but any or all can be a no-op if the given output
-format cannot be generated. These targets should not be dependencies
-of the @code{all} target; the user must manually invoke them.
-
-Here's an example rule for generating DVI files from Texinfo:
-
-@smallexample
-dvi: foo.dvi
-
-foo.dvi: foo.texi chap1.texi chap2.texi
- $(TEXI2DVI) $(srcdir)/foo.texi
-@end smallexample
-
-@noindent
-You must define the variable @code{TEXI2DVI} in the Makefile. It should
-run the program @code{texi2dvi}, which is part of the Texinfo
-distribution.@footnote{@code{texi2dvi} uses @TeX{} to do the real work
-of formatting. @TeX{} is not distributed with Texinfo.} Alternatively,
-write just the dependencies, and allow GNU @code{make} to provide the command.
-
-Here's another example, this one for generating HTML from Texinfo:
-
-@smallexample
-html: foo.html
-
-foo.html: foo.texi chap1.texi chap2.texi
- $(TEXI2HTML) $(srcdir)/foo.texi
-@end smallexample
-
-@noindent
-Again, you would define the variable @code{TEXI2HTML} in the Makefile;
-for example, it might run @code{makeinfo --no-split --html}
-(@command{makeinfo} is part of the Texinfo distribution).
-
-@item dist
-Create a distribution tar file for this program. The tar file should be
-set up so that the file names in the tar file start with a subdirectory
-name which is the name of the package it is a distribution for. This
-name can include the version number.
-
-For example, the distribution tar file of GCC version 1.40 unpacks into
-a subdirectory named @file{gcc-1.40}.
-
-The easiest way to do this is to create a subdirectory appropriately
-named, use @code{ln} or @code{cp} to install the proper files in it, and
-then @code{tar} that subdirectory.
-
-Compress the tar file with @code{gzip}. For example, the actual
-distribution file for GCC version 1.40 is called @file{gcc-1.40.tar.gz}.
-
-The @code{dist} target should explicitly depend on all non-source files
-that are in the distribution, to make sure they are up to date in the
-distribution.
-@ifset CODESTD
-@xref{Releases, , Making Releases}.
-@end ifset
-@ifclear CODESTD
-@xref{Releases, , Making Releases, standards, GNU Coding Standards}.
-@end ifclear
-
-@item check
-Perform self-tests (if any). The user must build the program before
-running the tests, but need not install the program; you should write
-the self-tests so that they work when the program is built but not
-installed.
-@end table
-
-The following targets are suggested as conventional names, for programs
-in which they are useful.
-
-@table @code
-@item installcheck
-Perform installation tests (if any). The user must build and install
-the program before running the tests. You should not assume that
-@file{$(bindir)} is in the search path.
-
-@item installdirs
-It's useful to add a target named @samp{installdirs} to create the
-directories where files are installed, and their parent directories.
-There is a script called @file{mkinstalldirs} which is convenient for
-this; you can find it in the Texinfo package.
-@c It's in /gd/gnu/lib/mkinstalldirs.
-You can use a rule like this:
-
-@comment This has been carefully formatted to look decent in the Make manual.
-@comment Please be sure not to make it extend any further to the right.--roland
-@smallexample
-# Make sure all installation directories (e.g. $(bindir))
-# actually exist by making them if necessary.
-installdirs: mkinstalldirs
- $(srcdir)/mkinstalldirs $(bindir) $(datadir) \
- $(libdir) $(infodir) \
- $(mandir)
-@end smallexample
-
-@noindent
-or, if you wish to support @env{DESTDIR},
-
-@smallexample
-# Make sure all installation directories (e.g. $(bindir))
-# actually exist by making them if necessary.
-installdirs: mkinstalldirs
- $(srcdir)/mkinstalldirs \
- $(DESTDIR)$(bindir) $(DESTDIR)$(datadir) \
- $(DESTDIR)$(libdir) $(DESTDIR)$(infodir) \
- $(DESTDIR)$(mandir)
-@end smallexample
-
-This rule should not modify the directories where compilation is done.
-It should do nothing but create installation directories.
-@end table
-
-@node Install Command Categories
-@section Install Command Categories
-
-@cindex pre-installation commands
-@cindex post-installation commands
-When writing the @code{install} target, you must classify all the
-commands into three categories: normal ones, @dfn{pre-installation}
-commands and @dfn{post-installation} commands.
-
-Normal commands move files into their proper places, and set their
-modes. They may not alter any files except the ones that come entirely
-from the package they belong to.
-
-Pre-installation and post-installation commands may alter other files;
-in particular, they can edit global configuration files or data bases.
-
-Pre-installation commands are typically executed before the normal
-commands, and post-installation commands are typically run after the
-normal commands.
-
-The most common use for a post-installation command is to run
-@code{install-info}. This cannot be done with a normal command, since
-it alters a file (the Info directory) which does not come entirely and
-solely from the package being installed. It is a post-installation
-command because it needs to be done after the normal command which
-installs the package's Info files.
-
-Most programs don't need any pre-installation commands, but we have the
-feature just in case it is needed.
-
-To classify the commands in the @code{install} rule into these three
-categories, insert @dfn{category lines} among them. A category line
-specifies the category for the commands that follow.
-
-A category line consists of a tab and a reference to a special Make
-variable, plus an optional comment at the end. There are three
-variables you can use, one for each category; the variable name
-specifies the category. Category lines are no-ops in ordinary execution
-because these three Make variables are normally undefined (and you
-@emph{should not} define them in the makefile).
-
-Here are the three possible category lines, each with a comment that
-explains what it means:
-
-@smallexample
- $(PRE_INSTALL) # @r{Pre-install commands follow.}
- $(POST_INSTALL) # @r{Post-install commands follow.}
- $(NORMAL_INSTALL) # @r{Normal commands follow.}
-@end smallexample
-
-If you don't use a category line at the beginning of the @code{install}
-rule, all the commands are classified as normal until the first category
-line. If you don't use any category lines, all the commands are
-classified as normal.
-
-These are the category lines for @code{uninstall}:
-
-@smallexample
- $(PRE_UNINSTALL) # @r{Pre-uninstall commands follow.}
- $(POST_UNINSTALL) # @r{Post-uninstall commands follow.}
- $(NORMAL_UNINSTALL) # @r{Normal commands follow.}
-@end smallexample
-
-Typically, a pre-uninstall command would be used for deleting entries
-from the Info directory.
-
-If the @code{install} or @code{uninstall} target has any dependencies
-which act as subroutines of installation, then you should start
-@emph{each} dependency's commands with a category line, and start the
-main target's commands with a category line also. This way, you can
-ensure that each command is placed in the right category regardless of
-which of the dependencies actually run.
-
-Pre-installation and post-installation commands should not run any
-programs except for these:
-
-@example
-[ basename bash cat chgrp chmod chown cmp cp dd diff echo
-egrep expand expr false fgrep find getopt grep gunzip gzip
-hostname install install-info kill ldconfig ln ls md5sum
-mkdir mkfifo mknod mv printenv pwd rm rmdir sed sort tee
-test touch true uname xargs yes
-@end example
-
-@cindex binary packages
-The reason for distinguishing the commands in this way is for the sake
-of making binary packages. Typically a binary package contains all the
-executables and other files that need to be installed, and has its own
-method of installing them---so it does not need to run the normal
-installation commands. But installing the binary package does need to
-execute the pre-installation and post-installation commands.
-
-Programs to build binary packages work by extracting the
-pre-installation and post-installation commands. Here is one way of
-extracting the pre-installation commands (the @option{-s} option to
-@command{make} is needed to silence messages about entering
-subdirectories):
-
-@smallexample
-make -s -n install -o all \
- PRE_INSTALL=pre-install \
- POST_INSTALL=post-install \
- NORMAL_INSTALL=normal-install \
- | gawk -f pre-install.awk
-@end smallexample
-
-@noindent
-where the file @file{pre-install.awk} could contain this:
-
-@smallexample
-$0 ~ /^(normal-install|post-install)[ \t]*$/ @{on = 0@}
-on @{print $0@}
-$0 ~ /^pre-install[ \t]*$/ @{on = 1@}
-@end smallexample
diff --git a/etc/standards.texi b/etc/standards.texi
deleted file mode 100644
index 4b1c03dd2..000000000
--- a/etc/standards.texi
+++ /dev/null
@@ -1,4235 +0,0 @@
-\input texinfo @c -*-texinfo-*-
-@c %**start of header
-@setfilename standards.info
-@settitle GNU Coding Standards
-@c This date is automagically updated when you save this file:
-@set lastupdate April 12, 2010
-@c %**end of header
-
-@dircategory GNU organization
-@direntry
-* Standards: (standards). GNU coding standards.
-@end direntry
-
-@c @setchapternewpage odd
-@setchapternewpage off
-
-@c Put everything in one index (arbitrarily chosen to be the concept index).
-@syncodeindex fn cp
-@syncodeindex ky cp
-@syncodeindex pg cp
-@syncodeindex vr cp
-
-@c This is used by a cross ref in make-stds.texi
-@set CODESTD 1
-
-@copying
-The GNU coding standards, last updated @value{lastupdate}.
-
-Copyright @copyright{} 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
-2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software
-Foundation, Inc.
-
-Permission is granted to copy, distribute and/or modify this document
-under the terms of the GNU Free Documentation License, Version 1.3 or
-any later version published by the Free Software Foundation; with no
-Invariant Sections, with no Front-Cover Texts, and with no Back-Cover
-Texts. A copy of the license is included in the section entitled
-``GNU Free Documentation License''.
-@end copying
-
-@titlepage
-@title GNU Coding Standards
-@author Richard Stallman, et al.
-@author last updated @value{lastupdate}
-@page
-@vskip 0pt plus 1filll
-@insertcopying
-@end titlepage
-
-@contents
-
-@ifnottex
-@node Top, Preface, (dir), (dir)
-@top Version
-
-@insertcopying
-@end ifnottex
-
-@menu
-* Preface:: About the GNU Coding Standards.
-* Legal Issues:: Keeping free software free.
-* Design Advice:: General program design.
-* Program Behavior:: Program behavior for all programs
-* Writing C:: Making the best use of C.
-* Documentation:: Documenting programs.
-* Managing Releases:: The release process.
-* References:: Mentioning non-free software or documentation.
-* GNU Free Documentation License:: Copying and sharing this manual.
-* Index::
-
-@end menu
-
-@node Preface
-@chapter About the GNU Coding Standards
-
-The GNU Coding Standards were written by Richard Stallman and other GNU
-Project volunteers. Their purpose is to make the GNU system clean,
-consistent, and easy to install. This document can also be read as a
-guide to writing portable, robust and reliable programs. It focuses on
-programs written in C, but many of the rules and principles are useful
-even if you write in another programming language. The rules often
-state reasons for writing in a certain way.
-
-@cindex where to obtain @code{standards.texi}
-@cindex downloading this manual
-If you did not obtain this file directly from the GNU project and
-recently, please check for a newer version. You can get the GNU
-Coding Standards from the GNU web server in many
-different formats, including the Texinfo source, PDF, HTML, DVI, plain
-text, and more, at: @uref{http://www.gnu.org/prep/standards/}.
-
-If you are maintaining an official GNU package, in addition to this
-document, please read and follow the GNU maintainer information
-(@pxref{Top, , Contents, maintain, Information for Maintainers of GNU
-Software}).
-
-@cindex @code{gnustandards-commit@@gnu.org} mailing list
-If you want to receive diffs for every change to these GNU documents,
-join the mailing list @code{gnustandards-commit@@gnu.org}, via the web
-interface at
-@url{http://lists.gnu.org/mailman/listinfo/gnustandards-commit}.
-Archives are also available there.
-
-@cindex @code{bug-standards@@gnu.org} email address
-@cindex Savannah repository for gnustandards
-@cindex gnustandards project repository
-Please send corrections or suggestions for this document to
-@email{bug-standards@@gnu.org}. If you make a suggestion, please
-include a suggested new wording for it, to help us consider the
-suggestion efficiently. We prefer a context diff to the Texinfo
-source, but if that's difficult for you, you can make a context diff
-for some other version of this document, or propose it in any way that
-makes it clear. The source repository for this document can be found
-at @url{http://savannah.gnu.org/projects/gnustandards}.
-
-These standards cover the minimum of what is important when writing a
-GNU package. Likely, the need for additional standards will come up.
-Sometimes, you might suggest that such standards be added to this
-document. If you think your standards would be generally useful, please
-do suggest them.
-
-You should also set standards for your package on many questions not
-addressed or not firmly specified here. The most important point is to
-be self-consistent---try to stick to the conventions you pick, and try
-to document them as much as possible. That way, your program will be
-more maintainable by others.
-
-The GNU Hello program serves as an example of how to follow the GNU
-coding standards for a trivial program.
-@uref{http://www.gnu.org/software/hello/hello.html}.
-
-This release of the GNU Coding Standards was last updated
-@value{lastupdate}.
-
-
-@node Legal Issues
-@chapter Keeping Free Software Free
-@cindex legal aspects
-
-This chapter discusses how you can make sure that GNU software
-avoids legal difficulties, and other related issues.
-
-@menu
-* Reading Non-Free Code:: Referring to proprietary programs.
-* Contributions:: Accepting contributions.
-* Trademarks:: How we deal with trademark issues.
-@end menu
-
-@node Reading Non-Free Code
-@section Referring to Proprietary Programs
-@cindex proprietary programs
-@cindex avoiding proprietary code
-
-Don't in any circumstances refer to Unix source code for or during
-your work on GNU! (Or to any other proprietary programs.)
-
-If you have a vague recollection of the internals of a Unix program,
-this does not absolutely mean you can't write an imitation of it, but
-do try to organize the imitation internally along different lines,
-because this is likely to make the details of the Unix version
-irrelevant and dissimilar to your results.
-
-For example, Unix utilities were generally optimized to minimize
-memory use; if you go for speed instead, your program will be very
-different. You could keep the entire input file in memory and scan it
-there instead of using stdio. Use a smarter algorithm discovered more
-recently than the Unix program. Eliminate use of temporary files. Do
-it in one pass instead of two (we did this in the assembler).
-
-Or, on the contrary, emphasize simplicity instead of speed. For some
-applications, the speed of today's computers makes simpler algorithms
-adequate.
-
-Or go for generality. For example, Unix programs often have static
-tables or fixed-size strings, which make for arbitrary limits; use
-dynamic allocation instead. Make sure your program handles NULs and
-other funny characters in the input files. Add a programming language
-for extensibility and write part of the program in that language.
-
-Or turn some parts of the program into independently usable libraries.
-Or use a simple garbage collector instead of tracking precisely when
-to free memory, or use a new GNU facility such as obstacks.
-
-@node Contributions
-@section Accepting Contributions
-@cindex legal papers
-@cindex accepting contributions
-
-If the program you are working on is copyrighted by the Free Software
-Foundation, then when someone else sends you a piece of code to add to
-the program, we need legal papers to use it---just as we asked you to
-sign papers initially. @emph{Each} person who makes a nontrivial
-contribution to a program must sign some sort of legal papers in order
-for us to have clear title to the program; the main author alone is not
-enough.
-
-So, before adding in any contributions from other people, please tell
-us, so we can arrange to get the papers. Then wait until we tell you
-that we have received the signed papers, before you actually use the
-contribution.
-
-This applies both before you release the program and afterward. If
-you receive diffs to fix a bug, and they make significant changes, we
-need legal papers for that change.
-
-This also applies to comments and documentation files. For copyright
-law, comments and code are just text. Copyright applies to all kinds of
-text, so we need legal papers for all kinds.
-
-We know it is frustrating to ask for legal papers; it's frustrating for
-us as well. But if you don't wait, you are going out on a limb---for
-example, what if the contributor's employer won't sign a disclaimer?
-You might have to take that code out again!
-
-You don't need papers for changes of a few lines here or there, since
-they are not significant for copyright purposes. Also, you don't need
-papers if all you get from the suggestion is some ideas, not actual code
-which you use. For example, if someone sent you one implementation, but
-you write a different implementation of the same idea, you don't need to
-get papers.
-
-The very worst thing is if you forget to tell us about the other
-contributor. We could be very embarrassed in court some day as a
-result.
-
-We have more detailed advice for maintainers of programs; if you have
-reached the stage of actually maintaining a program for GNU (whether
-released or not), please ask us for a copy. It is also available
-online for your perusal: @uref{http://www.gnu.org/prep/maintain/}.
-
-@node Trademarks
-@section Trademarks
-@cindex trademarks
-
-Please do not include any trademark acknowledgements in GNU software
-packages or documentation.
-
-Trademark acknowledgements are the statements that such-and-such is a
-trademark of so-and-so. The GNU Project has no objection to the basic
-idea of trademarks, but these acknowledgements feel like kowtowing,
-and there is no legal requirement for them, so we don't use them.
-
-What is legally required, as regards other people's trademarks, is to
-avoid using them in ways which a reader might reasonably understand as
-naming or labeling our own programs or activities. For example, since
-``Objective C'' is (or at least was) a trademark, we made sure to say
-that we provide a ``compiler for the Objective C language'' rather
-than an ``Objective C compiler''. The latter would have been meant as
-a shorter way of saying the former, but it does not explicitly state
-the relationship, so it could be misinterpreted as using ``Objective
-C'' as a label for the compiler rather than for the language.
-
-Please don't use ``win'' as an abbreviation for Microsoft Windows in
-GNU software or documentation. In hacker terminology, calling
-something a ``win'' is a form of praise. If you wish to praise
-Microsoft Windows when speaking on your own, by all means do so, but
-not in GNU software. Usually we write the name ``Windows'' in full,
-but when brevity is very important (as in file names and sometimes
-symbol names), we abbreviate it to ``w''. For instance, the files and
-functions in Emacs that deal with Windows start with @samp{w32}.
-
-@node Design Advice
-@chapter General Program Design
-@cindex program design
-
-This chapter discusses some of the issues you should take into
-account when designing your program.
-
-@c Standard or ANSI C
-@c
-@c In 1989 the American National Standards Institute (ANSI) standardized
-@c C as standard X3.159-1989. In December of that year the
-@c International Standards Organization ISO adopted the ANSI C standard
-@c making minor changes. In 1990 ANSI then re-adopted ISO standard
-@c C. This version of C is known as either ANSI C or Standard C.
-
-@c A major revision of the C Standard appeared in 1999.
-
-@menu
-* Source Language:: Which languages to use.
-* Compatibility:: Compatibility with other implementations.
-* Using Extensions:: Using non-standard features.
-* Standard C:: Using standard C features.
-* Conditional Compilation:: Compiling code only if a conditional is true.
-@end menu
-
-@node Source Language
-@section Which Languages to Use
-@cindex programming languages
-
-When you want to use a language that gets compiled and runs at high
-speed, the best language to use is C. Using another language is like
-using a non-standard feature: it will cause trouble for users. Even if
-GCC supports the other language, users may find it inconvenient to have
-to install the compiler for that other language in order to build your
-program. For example, if you write your program in C++, people will
-have to install the GNU C++ compiler in order to compile your program.
-
-C has one other advantage over C++ and other compiled languages: more
-people know C, so more people will find it easy to read and modify the
-program if it is written in C.
-
-So in general it is much better to use C, rather than the
-comparable alternatives.
-
-But there are two exceptions to that conclusion:
-
-@itemize @bullet
-@item
-It is no problem to use another language to write a tool specifically
-intended for use with that language. That is because the only people
-who want to build the tool will be those who have installed the other
-language anyway.
-
-@item
-If an application is of interest only to a narrow part of the community,
-then the question of which language it is written in has less effect on
-other people, so you may as well please yourself.
-@end itemize
-
-Many programs are designed to be extensible: they include an interpreter
-for a language that is higher level than C. Often much of the program
-is written in that language, too. The Emacs editor pioneered this
-technique.
-
-@cindex Guile
-@cindex GNOME and Guile
-The standard extensibility interpreter for GNU software is Guile
-(@uref{http://www.gnu.org/@/software/@/guile/}), which implements the
-language Scheme (an especially clean and simple dialect of Lisp).
-Guile also includes bindings for GTK+/GNOME, making it practical to
-write modern GUI functionality within Guile. We don't reject programs
-written in other ``scripting languages'' such as Perl and Python, but
-using Guile is very important for the overall consistency of the GNU
-system.
-
-
-@node Compatibility
-@section Compatibility with Other Implementations
-@cindex compatibility with C and @sc{posix} standards
-@cindex @sc{posix} compatibility
-
-With occasional exceptions, utility programs and libraries for GNU
-should be upward compatible with those in Berkeley Unix, and upward
-compatible with Standard C if Standard C specifies their
-behavior, and upward compatible with @sc{posix} if @sc{posix} specifies
-their behavior.
-
-When these standards conflict, it is useful to offer compatibility
-modes for each of them.
-
-@cindex options for compatibility
-Standard C and @sc{posix} prohibit many kinds of extensions. Feel
-free to make the extensions anyway, and include a @samp{--ansi},
-@samp{--posix}, or @samp{--compatible} option to turn them off.
-However, if the extension has a significant chance of breaking any real
-programs or scripts, then it is not really upward compatible. So you
-should try to redesign its interface to make it upward compatible.
-
-@cindex @code{POSIXLY_CORRECT}, environment variable
-Many GNU programs suppress extensions that conflict with @sc{posix} if the
-environment variable @code{POSIXLY_CORRECT} is defined (even if it is
-defined with a null value). Please make your program recognize this
-variable if appropriate.
-
-When a feature is used only by users (not by programs or command
-files), and it is done poorly in Unix, feel free to replace it
-completely with something totally different and better. (For example,
-@code{vi} is replaced with Emacs.) But it is nice to offer a compatible
-feature as well. (There is a free @code{vi} clone, so we offer it.)
-
-Additional useful features are welcome regardless of whether
-there is any precedent for them.
-
-@node Using Extensions
-@section Using Non-standard Features
-@cindex non-standard extensions
-
-Many GNU facilities that already exist support a number of convenient
-extensions over the comparable Unix facilities. Whether to use these
-extensions in implementing your program is a difficult question.
-
-On the one hand, using the extensions can make a cleaner program.
-On the other hand, people will not be able to build the program
-unless the other GNU tools are available. This might cause the
-program to work on fewer kinds of machines.
-
-With some extensions, it might be easy to provide both alternatives.
-For example, you can define functions with a ``keyword'' @code{INLINE}
-and define that as a macro to expand into either @code{inline} or
-nothing, depending on the compiler.
-
-In general, perhaps it is best not to use the extensions if you can
-straightforwardly do without them, but to use the extensions if they
-are a big improvement.
-
-An exception to this rule are the large, established programs (such as
-Emacs) which run on a great variety of systems. Using GNU extensions in
-such programs would make many users unhappy, so we don't do that.
-
-Another exception is for programs that are used as part of compilation:
-anything that must be compiled with other compilers in order to
-bootstrap the GNU compilation facilities. If these require the GNU
-compiler, then no one can compile them without having them installed
-already. That would be extremely troublesome in certain cases.
-
-@node Standard C
-@section Standard C and Pre-Standard C
-@cindex @sc{ansi} C standard
-
-1989 Standard C is widespread enough now that it is ok to use its
-features in new programs. There is one exception: do not ever use the
-``trigraph'' feature of Standard C.
-
-1999 Standard C is not widespread yet, so please do not require its
-features in programs. It is ok to use its features if they are present.
-
-However, it is easy to support pre-standard compilers in most programs,
-so if you know how to do that, feel free. If a program you are
-maintaining has such support, you should try to keep it working.
-
-@cindex function prototypes
-To support pre-standard C, instead of writing function definitions in
-standard prototype form,
-
-@example
-int
-foo (int x, int y)
-@dots{}
-@end example
-
-@noindent
-write the definition in pre-standard style like this,
-
-@example
-int
-foo (x, y)
- int x, y;
-@dots{}
-@end example
-
-@noindent
-and use a separate declaration to specify the argument prototype:
-
-@example
-int foo (int, int);
-@end example
-
-You need such a declaration anyway, in a header file, to get the benefit
-of prototypes in all the files where the function is called. And once
-you have the declaration, you normally lose nothing by writing the
-function definition in the pre-standard style.
-
-This technique does not work for integer types narrower than @code{int}.
-If you think of an argument as being of a type narrower than @code{int},
-declare it as @code{int} instead.
-
-There are a few special cases where this technique is hard to use. For
-example, if a function argument needs to hold the system type
-@code{dev_t}, you run into trouble, because @code{dev_t} is shorter than
-@code{int} on some machines; but you cannot use @code{int} instead,
-because @code{dev_t} is wider than @code{int} on some machines. There
-is no type you can safely use on all machines in a non-standard
-definition. The only way to support non-standard C and pass such an
-argument is to check the width of @code{dev_t} using Autoconf and choose
-the argument type accordingly. This may not be worth the trouble.
-
-In order to support pre-standard compilers that do not recognize
-prototypes, you may want to use a preprocessor macro like this:
-
-@example
-/* Declare the prototype for a general external function. */
-#if defined (__STDC__) || defined (WINDOWSNT)
-#define P_(proto) proto
-#else
-#define P_(proto) ()
-#endif
-@end example
-
-@node Conditional Compilation
-@section Conditional Compilation
-
-When supporting configuration options already known when building your
-program we prefer using @code{if (... )} over conditional compilation,
-as in the former case the compiler is able to perform more extensive
-checking of all possible code paths.
-
-For example, please write
-
-@smallexample
- if (HAS_FOO)
- ...
- else
- ...
-@end smallexample
-
-@noindent
-instead of:
-
-@smallexample
- #ifdef HAS_FOO
- ...
- #else
- ...
- #endif
-@end smallexample
-
-A modern compiler such as GCC will generate exactly the same code in
-both cases, and we have been using similar techniques with good success
-in several projects. Of course, the former method assumes that
-@code{HAS_FOO} is defined as either 0 or 1.
-
-While this is not a silver bullet solving all portability problems,
-and is not always appropriate, following this policy would have saved
-GCC developers many hours, or even days, per year.
-
-In the case of function-like macros like @code{REVERSIBLE_CC_MODE} in
-GCC which cannot be simply used in @code{if (...)} statements, there is
-an easy workaround. Simply introduce another macro
-@code{HAS_REVERSIBLE_CC_MODE} as in the following example:
-
-@smallexample
- #ifdef REVERSIBLE_CC_MODE
- #define HAS_REVERSIBLE_CC_MODE 1
- #else
- #define HAS_REVERSIBLE_CC_MODE 0
- #endif
-@end smallexample
-
-@node Program Behavior
-@chapter Program Behavior for All Programs
-
-This chapter describes conventions for writing robust
-software. It also describes general standards for error messages, the
-command line interface, and how libraries should behave.
-
-@menu
-* Non-GNU Standards:: We consider standards such as POSIX;
- we don't "obey" them.
-* Semantics:: Writing robust programs.
-* Libraries:: Library behavior.
-* Errors:: Formatting error messages.
-* User Interfaces:: Standards about interfaces generally.
-* Graphical Interfaces:: Standards for graphical interfaces.
-* Command-Line Interfaces:: Standards for command line interfaces.
-* Option Table:: Table of long options.
-* OID Allocations:: Table of OID slots for GNU.
-* Memory Usage:: When and how to care about memory needs.
-* File Usage:: Which files to use, and where.
-@end menu
-
-@node Non-GNU Standards
-@section Non-GNU Standards
-
-The GNU Project regards standards published by other organizations as
-suggestions, not orders. We consider those standards, but we do not
-``obey'' them. In developing a GNU program, you should implement
-an outside standard's specifications when that makes the GNU system
-better overall in an objective sense. When it doesn't, you shouldn't.
-
-In most cases, following published standards is convenient for
-users---it means that their programs or scripts will work more
-portably. For instance, GCC implements nearly all the features of
-Standard C as specified by that standard. C program developers would
-be unhappy if it did not. And GNU utilities mostly follow
-specifications of POSIX.2; shell script writers and users would be
-unhappy if our programs were incompatible.
-
-But we do not follow either of these specifications rigidly, and there
-are specific points on which we decided not to follow them, so as to
-make the GNU system better for users.
-
-For instance, Standard C says that nearly all extensions to C are
-prohibited. How silly! GCC implements many extensions, some of which
-were later adopted as part of the standard. If you want these
-constructs to give an error message as ``required'' by the standard,
-you must specify @samp{--pedantic}, which was implemented only so that
-we can say ``GCC is a 100% implementation of the standard,'' not
-because there is any reason to actually use it.
-
-POSIX.2 specifies that @samp{df} and @samp{du} must output sizes by
-default in units of 512 bytes. What users want is units of 1k, so
-that is what we do by default. If you want the ridiculous behavior
-``required'' by POSIX, you must set the environment variable
-@samp{POSIXLY_CORRECT} (which was originally going to be named
-@samp{POSIX_ME_HARDER}).
-
-GNU utilities also depart from the letter of the POSIX.2 specification
-when they support long-named command-line options, and intermixing
-options with ordinary arguments. This minor incompatibility with
-POSIX is never a problem in practice, and it is very useful.
-
-In particular, don't reject a new feature, or remove an old one,
-merely because a standard says it is ``forbidden'' or ``deprecated.''
-
-@node Semantics
-@section Writing Robust Programs
-
-@cindex arbitrary limits on data
-Avoid arbitrary limits on the length or number of @emph{any} data
-structure, including file names, lines, files, and symbols, by allocating
-all data structures dynamically. In most Unix utilities, ``long lines
-are silently truncated''. This is not acceptable in a GNU utility.
-
-@cindex @code{NUL} characters
-Utilities reading files should not drop NUL characters, or any other
-nonprinting characters @emph{including those with codes above 0177}.
-The only sensible exceptions would be utilities specifically intended
-for interface to certain types of terminals or printers
-that can't handle those characters.
-Whenever possible, try to make programs work properly with
-sequences of bytes that represent multibyte characters, using encodings
-such as UTF-8 and others.
-
-@cindex error messages
-Check every system call for an error return, unless you know you wish to
-ignore errors. Include the system error text (from @code{perror} or
-equivalent) in @emph{every} error message resulting from a failing
-system call, as well as the name of the file if any and the name of the
-utility. Just ``cannot open foo.c'' or ``stat failed'' is not
-sufficient.
-
-@cindex @code{malloc} return value
-@cindex memory allocation failure
-Check every call to @code{malloc} or @code{realloc} to see if it
-returned zero. Check @code{realloc} even if you are making the block
-smaller; in a system that rounds block sizes to a power of 2,
-@code{realloc} may get a different block if you ask for less space.
-
-In Unix, @code{realloc} can destroy the storage block if it returns
-zero. GNU @code{realloc} does not have this bug: if it fails, the
-original block is unchanged. Feel free to assume the bug is fixed. If
-you wish to run your program on Unix, and wish to avoid lossage in this
-case, you can use the GNU @code{malloc}.
-
-You must expect @code{free} to alter the contents of the block that was
-freed. Anything you want to fetch from the block, you must fetch before
-calling @code{free}.
-
-If @code{malloc} fails in a noninteractive program, make that a fatal
-error. In an interactive program (one that reads commands from the
-user), it is better to abort the command and return to the command
-reader loop. This allows the user to kill other processes to free up
-virtual memory, and then try the command again.
-
-@cindex command-line arguments, decoding
-Use @code{getopt_long} to decode arguments, unless the argument syntax
-makes this unreasonable.
-
-When static storage is to be written in during program execution, use
-explicit C code to initialize it. Reserve C initialized declarations
-for data that will not be changed.
-@c ADR: why?
-
-Try to avoid low-level interfaces to obscure Unix data structures (such
-as file directories, utmp, or the layout of kernel memory), since these
-are less likely to work compatibly. If you need to find all the files
-in a directory, use @code{readdir} or some other high-level interface.
-These are supported compatibly by GNU.
-
-@cindex signal handling
-The preferred signal handling facilities are the BSD variant of
-@code{signal}, and the @sc{posix} @code{sigaction} function; the
-alternative USG @code{signal} interface is an inferior design.
-
-Nowadays, using the @sc{posix} signal functions may be the easiest way
-to make a program portable. If you use @code{signal}, then on GNU/Linux
-systems running GNU libc version 1, you should include
-@file{bsd/signal.h} instead of @file{signal.h}, so as to get BSD
-behavior. It is up to you whether to support systems where
-@code{signal} has only the USG behavior, or give up on them.
-
-@cindex impossible conditions
-In error checks that detect ``impossible'' conditions, just abort.
-There is usually no point in printing any message. These checks
-indicate the existence of bugs. Whoever wants to fix the bugs will have
-to read the source code and run a debugger. So explain the problem with
-comments in the source. The relevant data will be in variables, which
-are easy to examine with the debugger, so there is no point moving them
-elsewhere.
-
-Do not use a count of errors as the exit status for a program.
-@emph{That does not work}, because exit status values are limited to 8
-bits (0 through 255). A single run of the program might have 256
-errors; if you try to return 256 as the exit status, the parent process
-will see 0 as the status, and it will appear that the program succeeded.
-
-@cindex temporary files
-@cindex @code{TMPDIR} environment variable
-If you make temporary files, check the @code{TMPDIR} environment
-variable; if that variable is defined, use the specified directory
-instead of @file{/tmp}.
-
-In addition, be aware that there is a possible security problem when
-creating temporary files in world-writable directories. In C, you can
-avoid this problem by creating temporary files in this manner:
-
-@example
-fd = open (filename, O_WRONLY | O_CREAT | O_EXCL, 0600);
-@end example
-
-@noindent
-or by using the @code{mkstemps} function from libiberty.
-
-In bash, use @code{set -C} to avoid this problem.
-
-@node Libraries
-@section Library Behavior
-@cindex libraries
-
-Try to make library functions reentrant. If they need to do dynamic
-storage allocation, at least try to avoid any nonreentrancy aside from
-that of @code{malloc} itself.
-
-Here are certain name conventions for libraries, to avoid name
-conflicts.
-
-Choose a name prefix for the library, more than two characters long.
-All external function and variable names should start with this
-prefix. In addition, there should only be one of these in any given
-library member. This usually means putting each one in a separate
-source file.
-
-An exception can be made when two external symbols are always used
-together, so that no reasonable program could use one without the
-other; then they can both go in the same file.
-
-External symbols that are not documented entry points for the user
-should have names beginning with @samp{_}. The @samp{_} should be
-followed by the chosen name prefix for the library, to prevent
-collisions with other libraries. These can go in the same files with
-user entry points if you like.
-
-Static functions and variables can be used as you like and need not
-fit any naming convention.
-
-@node Errors
-@section Formatting Error Messages
-@cindex formatting error messages
-@cindex error messages, formatting
-
-Error messages from compilers should look like this:
-
-@example
-@var{source-file-name}:@var{lineno}: @var{message}
-@end example
-
-@noindent
-If you want to mention the column number, use one of these formats:
-
-@example
-@var{source-file-name}:@var{lineno}:@var{column}: @var{message}
-@var{source-file-name}:@var{lineno}.@var{column}: @var{message}
-
-@end example
-
-@noindent
-Line numbers should start from 1 at the beginning of the file, and
-column numbers should start from 1 at the beginning of the line. (Both
-of these conventions are chosen for compatibility.) Calculate column
-numbers assuming that space and all ASCII printing characters have
-equal width, and assuming tab stops every 8 columns.
-
-The error message can also give both the starting and ending positions
-of the erroneous text. There are several formats so that you can
-avoid redundant information such as a duplicate line number.
-Here are the possible formats:
-
-@example
-@var{source-file-name}:@var{lineno-1}.@var{column-1}-@var{lineno-2}.@var{column-2}: @var{message}
-@var{source-file-name}:@var{lineno-1}.@var{column-1}-@var{column-2}: @var{message}
-@var{source-file-name}:@var{lineno-1}-@var{lineno-2}: @var{message}
-@end example
-
-@noindent
-When an error is spread over several files, you can use this format:
-
-@example
-@var{file-1}:@var{lineno-1}.@var{column-1}-@var{file-2}:@var{lineno-2}.@var{column-2}: @var{message}
-@end example
-
-Error messages from other noninteractive programs should look like this:
-
-@example
-@var{program}:@var{source-file-name}:@var{lineno}: @var{message}
-@end example
-
-@noindent
-when there is an appropriate source file, or like this:
-
-@example
-@var{program}: @var{message}
-@end example
-
-@noindent
-when there is no relevant source file.
-
-If you want to mention the column number, use this format:
-
-@example
-@var{program}:@var{source-file-name}:@var{lineno}:@var{column}: @var{message}
-@end example
-
-In an interactive program (one that is reading commands from a
-terminal), it is better not to include the program name in an error
-message. The place to indicate which program is running is in the
-prompt or with the screen layout. (When the same program runs with
-input from a source other than a terminal, it is not interactive and
-would do best to print error messages using the noninteractive style.)
-
-The string @var{message} should not begin with a capital letter when
-it follows a program name and/or file name, because that isn't the
-beginning of a sentence. (The sentence conceptually starts at the
-beginning of the line.) Also, it should not end with a period.
-
-Error messages from interactive programs, and other messages such as
-usage messages, should start with a capital letter. But they should not
-end with a period.
-
-@node User Interfaces
-@section Standards for Interfaces Generally
-
-@cindex program name and its behavior
-@cindex behavior, dependent on program's name
-Please don't make the behavior of a utility depend on the name used
-to invoke it. It is useful sometimes to make a link to a utility
-with a different name, and that should not change what it does.
-
-Instead, use a run time option or a compilation switch or both
-to select among the alternate behaviors.
-
-@cindex output device and program's behavior
-Likewise, please don't make the behavior of the program depend on the
-type of output device it is used with. Device independence is an
-important principle of the system's design; do not compromise it merely
-to save someone from typing an option now and then. (Variation in error
-message syntax when using a terminal is ok, because that is a side issue
-that people do not depend on.)
-
-If you think one behavior is most useful when the output is to a
-terminal, and another is most useful when the output is a file or a
-pipe, then it is usually best to make the default behavior the one that
-is useful with output to a terminal, and have an option for the other
-behavior.
-
-Compatibility requires certain programs to depend on the type of output
-device. It would be disastrous if @code{ls} or @code{sh} did not do so
-in the way all users expect. In some of these cases, we supplement the
-program with a preferred alternate version that does not depend on the
-output device type. For example, we provide a @code{dir} program much
-like @code{ls} except that its default output format is always
-multi-column format.
-
-
-@node Graphical Interfaces
-@section Standards for Graphical Interfaces
-@cindex graphical user interface
-@cindex interface styles
-@cindex user interface styles
-
-@cindex GTK+
-When you write a program that provides a graphical user interface,
-please make it work with the X Window System and the GTK+ toolkit
-unless the functionality specifically requires some alternative (for
-example, ``displaying jpeg images while in console mode'').
-
-In addition, please provide a command-line interface to control the
-functionality. (In many cases, the graphical user interface can be a
-separate program which invokes the command-line program.) This is
-so that the same jobs can be done from scripts.
-
-@cindex CORBA
-@cindex GNOME
-@cindex D-bus
-@cindex keyboard interface
-@cindex library interface
-Please also consider providing a D-bus interface for use from other
-running programs, such as within GNOME. (GNOME used to use CORBA
-for this, but that is being phased out.) In addition, consider
-providing a library interface (for use from C), and perhaps a
-keyboard-driven console interface (for use by users from console
-mode). Once you are doing the work to provide the functionality and
-the graphical interface, these won't be much extra work.
-
-
-@node Command-Line Interfaces
-@section Standards for Command Line Interfaces
-@cindex command-line interface
-
-@findex getopt
-It is a good idea to follow the @sc{posix} guidelines for the
-command-line options of a program. The easiest way to do this is to use
-@code{getopt} to parse them. Note that the GNU version of @code{getopt}
-will normally permit options anywhere among the arguments unless the
-special argument @samp{--} is used. This is not what @sc{posix}
-specifies; it is a GNU extension.
-
-@cindex long-named options
-Please define long-named options that are equivalent to the
-single-letter Unix-style options. We hope to make GNU more user
-friendly this way. This is easy to do with the GNU function
-@code{getopt_long}.
-
-One of the advantages of long-named options is that they can be
-consistent from program to program. For example, users should be able
-to expect the ``verbose'' option of any GNU program which has one, to be
-spelled precisely @samp{--verbose}. To achieve this uniformity, look at
-the table of common long-option names when you choose the option names
-for your program (@pxref{Option Table}).
-
-It is usually a good idea for file names given as ordinary arguments to
-be input files only; any output files would be specified using options
-(preferably @samp{-o} or @samp{--output}). Even if you allow an output
-file name as an ordinary argument for compatibility, try to provide an
-option as another way to specify it. This will lead to more consistency
-among GNU utilities, and fewer idiosyncrasies for users to remember.
-
-@cindex standard command-line options
-@cindex options, standard command-line
-@cindex CGI programs, standard options for
-@cindex PATH_INFO, specifying standard options as
-All programs should support two standard options: @samp{--version}
-and @samp{--help}. CGI programs should accept these as command-line
-options, and also if given as the @env{PATH_INFO}; for instance,
-visiting @url{http://example.org/p.cgi/--help} in a browser should
-output the same information as invoking @samp{p.cgi --help} from the
-command line.
-
-@menu
-* --version:: The standard output for --version.
-* --help:: The standard output for --help.
-@end menu
-
-@node --version
-@subsection @option{--version}
-
-@cindex @samp{--version} output
-
-The standard @code{--version} option should direct the program to
-print information about its name, version, origin and legal status,
-all on standard output, and then exit successfully. Other options and
-arguments should be ignored once this is seen, and the program should
-not perform its normal function.
-
-@cindex canonical name of a program
-@cindex program's canonical name
-The first line is meant to be easy for a program to parse; the version
-number proper starts after the last space. In addition, it contains
-the canonical name for this program, in this format:
-
-@example
-GNU Emacs 19.30
-@end example
-
-@noindent
-The program's name should be a constant string; @emph{don't} compute it
-from @code{argv[0]}. The idea is to state the standard or canonical
-name for the program, not its file name. There are other ways to find
-out the precise file name where a command is found in @code{PATH}.
-
-If the program is a subsidiary part of a larger package, mention the
-package name in parentheses, like this:
-
-@example
-emacsserver (GNU Emacs) 19.30
-@end example
-
-@noindent
-If the package has a version number which is different from this
-program's version number, you can mention the package version number
-just before the close-parenthesis.
-
-If you @emph{need} to mention the version numbers of libraries which
-are distributed separately from the package which contains this program,
-you can do so by printing an additional line of version info for each
-library you want to mention. Use the same format for these lines as for
-the first line.
-
-Please do not mention all of the libraries that the program uses ``just
-for completeness''---that would produce a lot of unhelpful clutter.
-Please mention library version numbers only if you find in practice that
-they are very important to you in debugging.
-
-The following line, after the version number line or lines, should be a
-copyright notice. If more than one copyright notice is called for, put
-each on a separate line.
-
-Next should follow a line stating the license, preferably using one of
-abbrevations below, and a brief statement that the program is free
-software, and that users are free to copy and change it. Also mention
-that there is no warranty, to the extent permitted by law. See
-recommended wording below.
-
-It is ok to finish the output with a list of the major authors of the
-program, as a way of giving credit.
-
-Here's an example of output that follows these rules:
-
-@smallexample
-GNU hello 2.3
-Copyright (C) 2007 Free Software Foundation, Inc.
-License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
-This is free software: you are free to change and redistribute it.
-There is NO WARRANTY, to the extent permitted by law.
-@end smallexample
-
-You should adapt this to your program, of course, filling in the proper
-year, copyright holder, name of program, and the references to
-distribution terms, and changing the rest of the wording as necessary.
-
-This copyright notice only needs to mention the most recent year in
-which changes were made---there's no need to list the years for previous
-versions' changes. You don't have to mention the name of the program in
-these notices, if that is inconvenient, since it appeared in the first
-line. (The rules are different for copyright notices in source files;
-@pxref{Copyright Notices,,,maintain,Information for GNU Maintainers}.)
-
-Translations of the above lines must preserve the validity of the
-copyright notices (@pxref{Internationalization}). If the translation's
-character set supports it, the @samp{(C)} should be replaced with the
-copyright symbol, as follows:
-
-@ifinfo
-(the official copyright symbol, which is the letter C in a circle);
-@end ifinfo
-@ifnotinfo
-@copyright{}
-@end ifnotinfo
-
-Write the word ``Copyright'' exactly like that, in English. Do not
-translate it into another language. International treaties recognize
-the English word ``Copyright''; translations into other languages do not
-have legal significance.
-
-Finally, here is the table of our suggested license abbreviations.
-Any abbreviation can be followed by @samp{v@var{version}[+]}, meaning
-that particular version, or later versions with the @samp{+}, as shown
-above.
-
-In the case of exceptions for extra permissions with the GPL, we use
-@samp{/} for a separator; the version number can follow the license
-abbreviation as usual, as in the examples below.
-
-@table @asis
-@item GPL
-GNU General Public License, @url{http://www.gnu.org/@/licenses/@/gpl.html}.
-
-@item LGPL
-GNU Lesser General Public License, @url{http://www.gnu.org/@/licenses/@/lgpl.html}.
-
-@item GPL/Ada
-GNU GPL with the exception for Ada.
-
-@item Apache
-The Apache Software Foundation license,
-@url{http://www.apache.org/@/licenses}.
-
-@item Artistic
-The Artistic license used for Perl, @url{http://www.perlfoundation.org/@/legal}.
-
-@item Expat
-The Expat license, @url{http://www.jclark.com/@/xml/@/copying.txt}.
-
-@item MPL
-The Mozilla Public License, @url{http://www.mozilla.org/@/MPL/}.
-
-@item OBSD
-The original (4-clause) BSD license, incompatible with the GNU GPL
-@url{http://www.xfree86.org/@/3.3.6/@/COPYRIGHT2.html#6}.
-
-@item PHP
-The license used for PHP, @url{http://www.php.net/@/license/}.
-
-@item public domain
-The non-license that is being in the public domain,
-@url{http://www.gnu.org/@/licenses/@/license-list.html#PublicDomain}.
-
-@item Python
-The license for Python, @url{http://www.python.org/@/2.0.1/@/license.html}.
-
-@item RBSD
-The revised (3-clause) BSD, compatible with the GNU GPL,@*
-@url{http://www.xfree86.org/@/3.3.6/@/COPYRIGHT2.html#5}.
-
-@item X11
-The simple non-copyleft license used for most versions of the X Window
-System, @url{http://www.xfree86.org/@/3.3.6/@/COPYRIGHT2.html#3}.
-
-@item Zlib
-The license for Zlib, @url{http://www.gzip.org/@/zlib/@/zlib_license.html}.
-
-@end table
-
-More information about these licenses and many more are on the GNU
-licensing web pages,
-@url{http://www.gnu.org/@/licenses/@/license-list.html}.
-
-
-@node --help
-@subsection @option{--help}
-
-@cindex @samp{--help} output
-
-The standard @code{--help} option should output brief documentation
-for how to invoke the program, on standard output, then exit
-successfully. Other options and arguments should be ignored once this
-is seen, and the program should not perform its normal function.
-
-@cindex address for bug reports
-@cindex bug reports
-Near the end of the @samp{--help} option's output, please place lines
-giving the email address for bug reports, the package's home page
-(normally @indicateurl{http://www.gnu.org/software/@var{pkg}}, and the
-general page for help using GNU programs. The format should be like this:
-
-@example
-Report bugs to: @var{mailing-address}
-@var{pkg} home page: <http://www.gnu.org/software/@var{pkg}/>
-General help using GNU software: <http://www.gnu.org/gethelp/>
-@end example
-
-It is ok to mention other appropriate mailing lists and web pages.
-
-
-@node Option Table
-@section Table of Long Options
-@cindex long option names
-@cindex table of long options
-
-Here is a table of long options used by GNU programs. It is surely
-incomplete, but we aim to list all the options that a new program might
-want to be compatible with. If you use names not already in the table,
-please send @email{bug-standards@@gnu.org} a list of them, with their
-meanings, so we can update the table.
-
-@c Please leave newlines between items in this table; it's much easier
-@c to update when it isn't completely squashed together and unreadable.
-@c When there is more than one short option for a long option name, put
-@c a semicolon between the lists of the programs that use them, not a
-@c period. --friedman
-
-@table @samp
-@item after-date
-@samp{-N} in @code{tar}.
-
-@item all
-@samp{-a} in @code{du}, @code{ls}, @code{nm}, @code{stty}, @code{uname},
-and @code{unexpand}.
-
-@item all-text
-@samp{-a} in @code{diff}.
-
-@item almost-all
-@samp{-A} in @code{ls}.
-
-@item append
-@samp{-a} in @code{etags}, @code{tee}, @code{time};
-@samp{-r} in @code{tar}.
-
-@item archive
-@samp{-a} in @code{cp}.
-
-@item archive-name
-@samp{-n} in @code{shar}.
-
-@item arglength
-@samp{-l} in @code{m4}.
-
-@item ascii
-@samp{-a} in @code{diff}.
-
-@item assign
-@samp{-v} in @code{gawk}.
-
-@item assume-new
-@samp{-W} in @code{make}.
-
-@item assume-old
-@samp{-o} in @code{make}.
-
-@item auto-check
-@samp{-a} in @code{recode}.
-
-@item auto-pager
-@samp{-a} in @code{wdiff}.
-
-@item auto-reference
-@samp{-A} in @code{ptx}.
-
-@item avoid-wraps
-@samp{-n} in @code{wdiff}.
-
-@item background
-For server programs, run in the background.
-
-@item backward-search
-@samp{-B} in @code{ctags}.
-
-@item basename
-@samp{-f} in @code{shar}.
-
-@item batch
-Used in GDB.
-
-@item baud
-Used in GDB.
-
-@item before
-@samp{-b} in @code{tac}.
-
-@item binary
-@samp{-b} in @code{cpio} and @code{diff}.
-
-@item bits-per-code
-@samp{-b} in @code{shar}.
-
-@item block-size
-Used in @code{cpio} and @code{tar}.
-
-@item blocks
-@samp{-b} in @code{head} and @code{tail}.
-
-@item break-file
-@samp{-b} in @code{ptx}.
-
-@item brief
-Used in various programs to make output shorter.
-
-@item bytes
-@samp{-c} in @code{head}, @code{split}, and @code{tail}.
-
-@item c@t{++}
-@samp{-C} in @code{etags}.
-
-@item catenate
-@samp{-A} in @code{tar}.
-
-@item cd
-Used in various programs to specify the directory to use.
-
-@item changes
-@samp{-c} in @code{chgrp} and @code{chown}.
-
-@item classify
-@samp{-F} in @code{ls}.
-
-@item colons
-@samp{-c} in @code{recode}.
-
-@item command
-@samp{-c} in @code{su};
-@samp{-x} in GDB.
-
-@item compare
-@samp{-d} in @code{tar}.
-
-@item compat
-Used in @code{gawk}.
-
-@item compress
-@samp{-Z} in @code{tar} and @code{shar}.
-
-@item concatenate
-@samp{-A} in @code{tar}.
-
-@item confirmation
-@samp{-w} in @code{tar}.
-
-@item context
-Used in @code{diff}.
-
-@item copyleft
-@samp{-W copyleft} in @code{gawk}.
-
-@item copyright
-@samp{-C} in @code{ptx}, @code{recode}, and @code{wdiff};
-@samp{-W copyright} in @code{gawk}.
-
-@item core
-Used in GDB.
-
-@item count
-@samp{-q} in @code{who}.
-
-@item count-links
-@samp{-l} in @code{du}.
-
-@item create
-Used in @code{tar} and @code{cpio}.
-
-@item cut-mark
-@samp{-c} in @code{shar}.
-
-@item cxref
-@samp{-x} in @code{ctags}.
-
-@item date
-@samp{-d} in @code{touch}.
-
-@item debug
-@samp{-d} in @code{make} and @code{m4};
-@samp{-t} in Bison.
-
-@item define
-@samp{-D} in @code{m4}.
-
-@item defines
-@samp{-d} in Bison and @code{ctags}.
-
-@item delete
-@samp{-D} in @code{tar}.
-
-@item dereference
-@samp{-L} in @code{chgrp}, @code{chown}, @code{cpio}, @code{du},
-@code{ls}, and @code{tar}.
-
-@item dereference-args
-@samp{-D} in @code{du}.
-
-@item device
-Specify an I/O device (special file name).
-
-@item diacritics
-@samp{-d} in @code{recode}.
-
-@item dictionary-order
-@samp{-d} in @code{look}.
-
-@item diff
-@samp{-d} in @code{tar}.
-
-@item digits
-@samp{-n} in @code{csplit}.
-
-@item directory
-Specify the directory to use, in various programs. In @code{ls}, it
-means to show directories themselves rather than their contents. In
-@code{rm} and @code{ln}, it means to not treat links to directories
-specially.
-
-@item discard-all
-@samp{-x} in @code{strip}.
-
-@item discard-locals
-@samp{-X} in @code{strip}.
-
-@item dry-run
-@samp{-n} in @code{make}.
-
-@item ed
-@samp{-e} in @code{diff}.
-
-@item elide-empty-files
-@samp{-z} in @code{csplit}.
-
-@item end-delete
-@samp{-x} in @code{wdiff}.
-
-@item end-insert
-@samp{-z} in @code{wdiff}.
-
-@item entire-new-file
-@samp{-N} in @code{diff}.
-
-@item environment-overrides
-@samp{-e} in @code{make}.
-
-@item eof
-@samp{-e} in @code{xargs}.
-
-@item epoch
-Used in GDB.
-
-@item error-limit
-Used in @code{makeinfo}.
-
-@item error-output
-@samp{-o} in @code{m4}.
-
-@item escape
-@samp{-b} in @code{ls}.
-
-@item exclude-from
-@samp{-X} in @code{tar}.
-
-@item exec
-Used in GDB.
-
-@item exit
-@samp{-x} in @code{xargs}.
-
-@item exit-0
-@samp{-e} in @code{unshar}.
-
-@item expand-tabs
-@samp{-t} in @code{diff}.
-
-@item expression
-@samp{-e} in @code{sed}.
-
-@item extern-only
-@samp{-g} in @code{nm}.
-
-@item extract
-@samp{-i} in @code{cpio};
-@samp{-x} in @code{tar}.
-
-@item faces
-@samp{-f} in @code{finger}.
-
-@item fast
-@samp{-f} in @code{su}.
-
-@item fatal-warnings
-@samp{-E} in @code{m4}.
-
-@item file
-@samp{-f} in @code{gawk}, @code{info}, @code{make}, @code{mt},
-@code{sed}, and @code{tar}.
-
-@item field-separator
-@samp{-F} in @code{gawk}.
-
-@item file-prefix
-@samp{-b} in Bison.
-
-@item file-type
-@samp{-F} in @code{ls}.
-
-@item files-from
-@samp{-T} in @code{tar}.
-
-@item fill-column
-Used in @code{makeinfo}.
-
-@item flag-truncation
-@samp{-F} in @code{ptx}.
-
-@item fixed-output-files
-@samp{-y} in Bison.
-
-@item follow
-@samp{-f} in @code{tail}.
-
-@item footnote-style
-Used in @code{makeinfo}.
-
-@item force
-@samp{-f} in @code{cp}, @code{ln}, @code{mv}, and @code{rm}.
-
-@item force-prefix
-@samp{-F} in @code{shar}.
-
-@item foreground
-For server programs, run in the foreground;
-in other words, don't do anything special to run the server
-in the background.
-
-@item format
-Used in @code{ls}, @code{time}, and @code{ptx}.
-
-@item freeze-state
-@samp{-F} in @code{m4}.
-
-@item fullname
-Used in GDB.
-
-@item gap-size
-@samp{-g} in @code{ptx}.
-
-@item get
-@samp{-x} in @code{tar}.
-
-@item graphic
-@samp{-i} in @code{ul}.
-
-@item graphics
-@samp{-g} in @code{recode}.
-
-@item group
-@samp{-g} in @code{install}.
-
-@item gzip
-@samp{-z} in @code{tar} and @code{shar}.
-
-@item hashsize
-@samp{-H} in @code{m4}.
-
-@item header
-@samp{-h} in @code{objdump} and @code{recode}
-
-@item heading
-@samp{-H} in @code{who}.
-
-@item help
-Used to ask for brief usage information.
-
-@item here-delimiter
-@samp{-d} in @code{shar}.
-
-@item hide-control-chars
-@samp{-q} in @code{ls}.
-
-@item html
-In @code{makeinfo}, output HTML.
-
-@item idle
-@samp{-u} in @code{who}.
-
-@item ifdef
-@samp{-D} in @code{diff}.
-
-@item ignore
-@samp{-I} in @code{ls};
-@samp{-x} in @code{recode}.
-
-@item ignore-all-space
-@samp{-w} in @code{diff}.
-
-@item ignore-backups
-@samp{-B} in @code{ls}.
-
-@item ignore-blank-lines
-@samp{-B} in @code{diff}.
-
-@item ignore-case
-@samp{-f} in @code{look} and @code{ptx};
-@samp{-i} in @code{diff} and @code{wdiff}.
-
-@item ignore-errors
-@samp{-i} in @code{make}.
-
-@item ignore-file
-@samp{-i} in @code{ptx}.
-
-@item ignore-indentation
-@samp{-I} in @code{etags}.
-
-@item ignore-init-file
-@samp{-f} in Oleo.
-
-@item ignore-interrupts
-@samp{-i} in @code{tee}.
-
-@item ignore-matching-lines
-@samp{-I} in @code{diff}.
-
-@item ignore-space-change
-@samp{-b} in @code{diff}.
-
-@item ignore-zeros
-@samp{-i} in @code{tar}.
-
-@item include
-@samp{-i} in @code{etags};
-@samp{-I} in @code{m4}.
-
-@item include-dir
-@samp{-I} in @code{make}.
-
-@item incremental
-@samp{-G} in @code{tar}.
-
-@item info
-@samp{-i}, @samp{-l}, and @samp{-m} in Finger.
-
-@item init-file
-In some programs, specify the name of the file to read as the user's
-init file.
-
-@item initial
-@samp{-i} in @code{expand}.
-
-@item initial-tab
-@samp{-T} in @code{diff}.
-
-@item inode
-@samp{-i} in @code{ls}.
-
-@item interactive
-@samp{-i} in @code{cp}, @code{ln}, @code{mv}, @code{rm};
-@samp{-e} in @code{m4};
-@samp{-p} in @code{xargs};
-@samp{-w} in @code{tar}.
-
-@item intermix-type
-@samp{-p} in @code{shar}.
-
-@item iso-8601
-Used in @code{date}
-
-@item jobs
-@samp{-j} in @code{make}.
-
-@item just-print
-@samp{-n} in @code{make}.
-
-@item keep-going
-@samp{-k} in @code{make}.
-
-@item keep-files
-@samp{-k} in @code{csplit}.
-
-@item kilobytes
-@samp{-k} in @code{du} and @code{ls}.
-
-@item language
-@samp{-l} in @code{etags}.
-
-@item less-mode
-@samp{-l} in @code{wdiff}.
-
-@item level-for-gzip
-@samp{-g} in @code{shar}.
-
-@item line-bytes
-@samp{-C} in @code{split}.
-
-@item lines
-Used in @code{split}, @code{head}, and @code{tail}.
-
-@item link
-@samp{-l} in @code{cpio}.
-
-@item lint
-@itemx lint-old
-Used in @code{gawk}.
-
-@item list
-@samp{-t} in @code{cpio};
-@samp{-l} in @code{recode}.
-
-@item list
-@samp{-t} in @code{tar}.
-
-@item literal
-@samp{-N} in @code{ls}.
-
-@item load-average
-@samp{-l} in @code{make}.
-
-@item login
-Used in @code{su}.
-
-@item machine
-Used in @code{uname}.
-
-@item macro-name
-@samp{-M} in @code{ptx}.
-
-@item mail
-@samp{-m} in @code{hello} and @code{uname}.
-
-@item make-directories
-@samp{-d} in @code{cpio}.
-
-@item makefile
-@samp{-f} in @code{make}.
-
-@item mapped
-Used in GDB.
-
-@item max-args
-@samp{-n} in @code{xargs}.
-
-@item max-chars
-@samp{-n} in @code{xargs}.
-
-@item max-lines
-@samp{-l} in @code{xargs}.
-
-@item max-load
-@samp{-l} in @code{make}.
-
-@item max-procs
-@samp{-P} in @code{xargs}.
-
-@item mesg
-@samp{-T} in @code{who}.
-
-@item message
-@samp{-T} in @code{who}.
-
-@item minimal
-@samp{-d} in @code{diff}.
-
-@item mixed-uuencode
-@samp{-M} in @code{shar}.
-
-@item mode
-@samp{-m} in @code{install}, @code{mkdir}, and @code{mkfifo}.
-
-@item modification-time
-@samp{-m} in @code{tar}.
-
-@item multi-volume
-@samp{-M} in @code{tar}.
-
-@item name-prefix
-@samp{-a} in Bison.
-
-@item nesting-limit
-@samp{-L} in @code{m4}.
-
-@item net-headers
-@samp{-a} in @code{shar}.
-
-@item new-file
-@samp{-W} in @code{make}.
-
-@item no-builtin-rules
-@samp{-r} in @code{make}.
-
-@item no-character-count
-@samp{-w} in @code{shar}.
-
-@item no-check-existing
-@samp{-x} in @code{shar}.
-
-@item no-common
-@samp{-3} in @code{wdiff}.
-
-@item no-create
-@samp{-c} in @code{touch}.
-
-@item no-defines
-@samp{-D} in @code{etags}.
-
-@item no-deleted
-@samp{-1} in @code{wdiff}.
-
-@item no-dereference
-@samp{-d} in @code{cp}.
-
-@item no-inserted
-@samp{-2} in @code{wdiff}.
-
-@item no-keep-going
-@samp{-S} in @code{make}.
-
-@item no-lines
-@samp{-l} in Bison.
-
-@item no-piping
-@samp{-P} in @code{shar}.
-
-@item no-prof
-@samp{-e} in @code{gprof}.
-
-@item no-regex
-@samp{-R} in @code{etags}.
-
-@item no-sort
-@samp{-p} in @code{nm}.
-
-@item no-splash
-Don't print a startup splash screen.
-
-@item no-split
-Used in @code{makeinfo}.
-
-@item no-static
-@samp{-a} in @code{gprof}.
-
-@item no-time
-@samp{-E} in @code{gprof}.
-
-@item no-timestamp
-@samp{-m} in @code{shar}.
-
-@item no-validate
-Used in @code{makeinfo}.
-
-@item no-wait
-Used in @code{emacsclient}.
-
-@item no-warn
-Used in various programs to inhibit warnings.
-
-@item node
-@samp{-n} in @code{info}.
-
-@item nodename
-@samp{-n} in @code{uname}.
-
-@item nonmatching
-@samp{-f} in @code{cpio}.
-
-@item nstuff
-@samp{-n} in @code{objdump}.
-
-@item null
-@samp{-0} in @code{xargs}.
-
-@item number
-@samp{-n} in @code{cat}.
-
-@item number-nonblank
-@samp{-b} in @code{cat}.
-
-@item numeric-sort
-@samp{-n} in @code{nm}.
-
-@item numeric-uid-gid
-@samp{-n} in @code{cpio} and @code{ls}.
-
-@item nx
-Used in GDB.
-
-@item old-archive
-@samp{-o} in @code{tar}.
-
-@item old-file
-@samp{-o} in @code{make}.
-
-@item one-file-system
-@samp{-l} in @code{tar}, @code{cp}, and @code{du}.
-
-@item only-file
-@samp{-o} in @code{ptx}.
-
-@item only-prof
-@samp{-f} in @code{gprof}.
-
-@item only-time
-@samp{-F} in @code{gprof}.
-
-@item options
-@samp{-o} in @code{getopt}, @code{fdlist}, @code{fdmount},
-@code{fdmountd}, and @code{fdumount}.
-
-@item output
-In various programs, specify the output file name.
-
-@item output-prefix
-@samp{-o} in @code{shar}.
-
-@item override
-@samp{-o} in @code{rm}.
-
-@item overwrite
-@samp{-c} in @code{unshar}.
-
-@item owner
-@samp{-o} in @code{install}.
-
-@item paginate
-@samp{-l} in @code{diff}.
-
-@item paragraph-indent
-Used in @code{makeinfo}.
-
-@item parents
-@samp{-p} in @code{mkdir} and @code{rmdir}.
-
-@item pass-all
-@samp{-p} in @code{ul}.
-
-@item pass-through
-@samp{-p} in @code{cpio}.
-
-@item port
-@samp{-P} in @code{finger}.
-
-@item portability
-@samp{-c} in @code{cpio} and @code{tar}.
-
-@item posix
-Used in @code{gawk}.
-
-@item prefix-builtins
-@samp{-P} in @code{m4}.
-
-@item prefix
-@samp{-f} in @code{csplit}.
-
-@item preserve
-Used in @code{tar} and @code{cp}.
-
-@item preserve-environment
-@samp{-p} in @code{su}.
-
-@item preserve-modification-time
-@samp{-m} in @code{cpio}.
-
-@item preserve-order
-@samp{-s} in @code{tar}.
-
-@item preserve-permissions
-@samp{-p} in @code{tar}.
-
-@item print
-@samp{-l} in @code{diff}.
-
-@item print-chars
-@samp{-L} in @code{cmp}.
-
-@item print-data-base
-@samp{-p} in @code{make}.
-
-@item print-directory
-@samp{-w} in @code{make}.
-
-@item print-file-name
-@samp{-o} in @code{nm}.
-
-@item print-symdefs
-@samp{-s} in @code{nm}.
-
-@item printer
-@samp{-p} in @code{wdiff}.
-
-@item prompt
-@samp{-p} in @code{ed}.
-
-@item proxy
-Specify an HTTP proxy.
-
-@item query-user
-@samp{-X} in @code{shar}.
-
-@item question
-@samp{-q} in @code{make}.
-
-@item quiet
-Used in many programs to inhibit the usual output. Every
-program accepting @samp{--quiet} should accept @samp{--silent} as a
-synonym.
-
-@item quiet-unshar
-@samp{-Q} in @code{shar}
-
-@item quote-name
-@samp{-Q} in @code{ls}.
-
-@item rcs
-@samp{-n} in @code{diff}.
-
-@item re-interval
-Used in @code{gawk}.
-
-@item read-full-blocks
-@samp{-B} in @code{tar}.
-
-@item readnow
-Used in GDB.
-
-@item recon
-@samp{-n} in @code{make}.
-
-@item record-number
-@samp{-R} in @code{tar}.
-
-@item recursive
-Used in @code{chgrp}, @code{chown}, @code{cp}, @code{ls}, @code{diff},
-and @code{rm}.
-
-@item reference
-@samp{-r} in @code{touch}.
-
-@item references
-@samp{-r} in @code{ptx}.
-
-@item regex
-@samp{-r} in @code{tac} and @code{etags}.
-
-@item release
-@samp{-r} in @code{uname}.
-
-@item reload-state
-@samp{-R} in @code{m4}.
-
-@item relocation
-@samp{-r} in @code{objdump}.
-
-@item rename
-@samp{-r} in @code{cpio}.
-
-@item replace
-@samp{-i} in @code{xargs}.
-
-@item report-identical-files
-@samp{-s} in @code{diff}.
-
-@item reset-access-time
-@samp{-a} in @code{cpio}.
-
-@item reverse
-@samp{-r} in @code{ls} and @code{nm}.
-
-@item reversed-ed
-@samp{-f} in @code{diff}.
-
-@item right-side-defs
-@samp{-R} in @code{ptx}.
-
-@item same-order
-@samp{-s} in @code{tar}.
-
-@item same-permissions
-@samp{-p} in @code{tar}.
-
-@item save
-@samp{-g} in @code{stty}.
-
-@item se
-Used in GDB.
-
-@item sentence-regexp
-@samp{-S} in @code{ptx}.
-
-@item separate-dirs
-@samp{-S} in @code{du}.
-
-@item separator
-@samp{-s} in @code{tac}.
-
-@item sequence
-Used by @code{recode} to chose files or pipes for sequencing passes.
-
-@item shell
-@samp{-s} in @code{su}.
-
-@item show-all
-@samp{-A} in @code{cat}.
-
-@item show-c-function
-@samp{-p} in @code{diff}.
-
-@item show-ends
-@samp{-E} in @code{cat}.
-
-@item show-function-line
-@samp{-F} in @code{diff}.
-
-@item show-tabs
-@samp{-T} in @code{cat}.
-
-@item silent
-Used in many programs to inhibit the usual output.
-Every program accepting
-@samp{--silent} should accept @samp{--quiet} as a synonym.
-
-@item size
-@samp{-s} in @code{ls}.
-
-@item socket
-Specify a file descriptor for a network server to use for its socket,
-instead of opening and binding a new socket. This provides a way to
-run, in a non-privileged process, a server that normally needs a
-reserved port number.
-
-@item sort
-Used in @code{ls}.
-
-@item source
-@samp{-W source} in @code{gawk}.
-
-@item sparse
-@samp{-S} in @code{tar}.
-
-@item speed-large-files
-@samp{-H} in @code{diff}.
-
-@item split-at
-@samp{-E} in @code{unshar}.
-
-@item split-size-limit
-@samp{-L} in @code{shar}.
-
-@item squeeze-blank
-@samp{-s} in @code{cat}.
-
-@item start-delete
-@samp{-w} in @code{wdiff}.
-
-@item start-insert
-@samp{-y} in @code{wdiff}.
-
-@item starting-file
-Used in @code{tar} and @code{diff} to specify which file within
-a directory to start processing with.
-
-@item statistics
-@samp{-s} in @code{wdiff}.
-
-@item stdin-file-list
-@samp{-S} in @code{shar}.
-
-@item stop
-@samp{-S} in @code{make}.
-
-@item strict
-@samp{-s} in @code{recode}.
-
-@item strip
-@samp{-s} in @code{install}.
-
-@item strip-all
-@samp{-s} in @code{strip}.
-
-@item strip-debug
-@samp{-S} in @code{strip}.
-
-@item submitter
-@samp{-s} in @code{shar}.
-
-@item suffix
-@samp{-S} in @code{cp}, @code{ln}, @code{mv}.
-
-@item suffix-format
-@samp{-b} in @code{csplit}.
-
-@item sum
-@samp{-s} in @code{gprof}.
-
-@item summarize
-@samp{-s} in @code{du}.
-
-@item symbolic
-@samp{-s} in @code{ln}.
-
-@item symbols
-Used in GDB and @code{objdump}.
-
-@item synclines
-@samp{-s} in @code{m4}.
-
-@item sysname
-@samp{-s} in @code{uname}.
-
-@item tabs
-@samp{-t} in @code{expand} and @code{unexpand}.
-
-@item tabsize
-@samp{-T} in @code{ls}.
-
-@item terminal
-@samp{-T} in @code{tput} and @code{ul}.
-@samp{-t} in @code{wdiff}.
-
-@item text
-@samp{-a} in @code{diff}.
-
-@item text-files
-@samp{-T} in @code{shar}.
-
-@item time
-Used in @code{ls} and @code{touch}.
-
-@item timeout
-Specify how long to wait before giving up on some operation.
-
-@item to-stdout
-@samp{-O} in @code{tar}.
-
-@item total
-@samp{-c} in @code{du}.
-
-@item touch
-@samp{-t} in @code{make}, @code{ranlib}, and @code{recode}.
-
-@item trace
-@samp{-t} in @code{m4}.
-
-@item traditional
-@samp{-t} in @code{hello};
-@samp{-W traditional} in @code{gawk};
-@samp{-G} in @code{ed}, @code{m4}, and @code{ptx}.
-
-@item tty
-Used in GDB.
-
-@item typedefs
-@samp{-t} in @code{ctags}.
-
-@item typedefs-and-c++
-@samp{-T} in @code{ctags}.
-
-@item typeset-mode
-@samp{-t} in @code{ptx}.
-
-@item uncompress
-@samp{-z} in @code{tar}.
-
-@item unconditional
-@samp{-u} in @code{cpio}.
-
-@item undefine
-@samp{-U} in @code{m4}.
-
-@item undefined-only
-@samp{-u} in @code{nm}.
-
-@item update
-@samp{-u} in @code{cp}, @code{ctags}, @code{mv}, @code{tar}.
-
-@item usage
-Used in @code{gawk}; same as @samp{--help}.
-
-@item uuencode
-@samp{-B} in @code{shar}.
-
-@item vanilla-operation
-@samp{-V} in @code{shar}.
-
-@item verbose
-Print more information about progress. Many programs support this.
-
-@item verify
-@samp{-W} in @code{tar}.
-
-@item version
-Print the version number.
-
-@item version-control
-@samp{-V} in @code{cp}, @code{ln}, @code{mv}.
-
-@item vgrind
-@samp{-v} in @code{ctags}.
-
-@item volume
-@samp{-V} in @code{tar}.
-
-@item what-if
-@samp{-W} in @code{make}.
-
-@item whole-size-limit
-@samp{-l} in @code{shar}.
-
-@item width
-@samp{-w} in @code{ls} and @code{ptx}.
-
-@item word-regexp
-@samp{-W} in @code{ptx}.
-
-@item writable
-@samp{-T} in @code{who}.
-
-@item zeros
-@samp{-z} in @code{gprof}.
-@end table
-
-@node OID Allocations
-@section OID Allocations
-@cindex OID allocations for GNU
-@cindex SNMP
-@cindex LDAP
-@cindex X.509
-
-The OID (object identifier) 1.3.6.1.4.1.11591 has been assigned to the
-GNU Project (thanks to Werner Koch). These are used for SNMP, LDAP,
-X.509 certificates, and so on. The web site
-@url{http://www.alvestrand.no/objectid} has a (voluntary) listing of
-many OID assignments.
-
-If you need a new slot for your GNU package, write
-@email{maintainers@@gnu.org}. Here is a list of arcs currently
-assigned:
-
-@example
-@include gnu-oids.texi
-@end example
-
-
-@node Memory Usage
-@section Memory Usage
-@cindex memory usage
-
-If a program typically uses just a few meg of memory, don't bother making any
-effort to reduce memory usage. For example, if it is impractical for
-other reasons to operate on files more than a few meg long, it is
-reasonable to read entire input files into memory to operate on them.
-
-However, for programs such as @code{cat} or @code{tail}, that can
-usefully operate on very large files, it is important to avoid using a
-technique that would artificially limit the size of files it can handle.
-If a program works by lines and could be applied to arbitrary
-user-supplied input files, it should keep only a line in memory, because
-this is not very hard and users will want to be able to operate on input
-files that are bigger than will fit in memory all at once.
-
-If your program creates complicated data structures, just make them in
-memory and give a fatal error if @code{malloc} returns zero.
-
-@node File Usage
-@section File Usage
-@cindex file usage
-
-Programs should be prepared to operate when @file{/usr} and @file{/etc}
-are read-only file systems. Thus, if the program manages log files,
-lock files, backup files, score files, or any other files which are
-modified for internal purposes, these files should not be stored in
-@file{/usr} or @file{/etc}.
-
-There are two exceptions. @file{/etc} is used to store system
-configuration information; it is reasonable for a program to modify
-files in @file{/etc} when its job is to update the system configuration.
-Also, if the user explicitly asks to modify one file in a directory, it
-is reasonable for the program to store other files in the same
-directory.
-
-@node Writing C
-@chapter Making The Best Use of C
-
-This chapter provides advice on how best to use the C language
-when writing GNU software.
-
-@menu
-* Formatting:: Formatting your source code.
-* Comments:: Commenting your work.
-* Syntactic Conventions:: Clean use of C constructs.
-* Names:: Naming variables, functions, and files.
-* System Portability:: Portability among different operating systems.
-* CPU Portability:: Supporting the range of CPU types.
-* System Functions:: Portability and ``standard'' library functions.
-* Internationalization:: Techniques for internationalization.
-* Character Set:: Use ASCII by default.
-* Quote Characters:: Use `...' in the C locale.
-* Mmap:: How you can safely use @code{mmap}.
-@end menu
-
-@node Formatting
-@section Formatting Your Source Code
-@cindex formatting source code
-
-@cindex open brace
-@cindex braces, in C source
-It is important to put the open-brace that starts the body of a C
-function in column one, so that they will start a defun. Several
-tools look for open-braces in column one to find the beginnings of C
-functions. These tools will not work on code not formatted that way.
-
-Avoid putting open-brace, open-parenthesis or open-bracket in column
-one when they are inside a function, so that they won't start a defun.
-The open-brace that starts a @code{struct} body can go in column one
-if you find it useful to treat that definition as a defun.
-
-It is also important for function definitions to start the name of the
-function in column one. This helps people to search for function
-definitions, and may also help certain tools recognize them. Thus,
-using Standard C syntax, the format is this:
-
-@example
-static char *
-concat (char *s1, char *s2)
-@{
- @dots{}
-@}
-@end example
-
-@noindent
-or, if you want to use traditional C syntax, format the definition like
-this:
-
-@example
-static char *
-concat (s1, s2) /* Name starts in column one here */
- char *s1, *s2;
-@{ /* Open brace in column one here */
- @dots{}
-@}
-@end example
-
-In Standard C, if the arguments don't fit nicely on one line,
-split it like this:
-
-@example
-int
-lots_of_args (int an_integer, long a_long, short a_short,
- double a_double, float a_float)
-@dots{}
-@end example
-
-The rest of this section gives our recommendations for other aspects of
-C formatting style, which is also the default style of the @code{indent}
-program in version 1.2 and newer. It corresponds to the options
-
-@smallexample
--nbad -bap -nbc -bbo -bl -bli2 -bls -ncdb -nce -cp1 -cs -di2
--ndj -nfc1 -nfca -hnl -i2 -ip5 -lp -pcs -psl -nsc -nsob
-@end smallexample
-
-We don't think of these recommendations as requirements, because it
-causes no problems for users if two different programs have different
-formatting styles.
-
-But whatever style you use, please use it consistently, since a mixture
-of styles within one program tends to look ugly. If you are
-contributing changes to an existing program, please follow the style of
-that program.
-
-For the body of the function, our recommended style looks like this:
-
-@example
-if (x < foo (y, z))
- haha = bar[4] + 5;
-else
- @{
- while (z)
- @{
- haha += foo (z, z);
- z--;
- @}
- return ++x + bar ();
- @}
-@end example
-
-@cindex spaces before open-paren
-We find it easier to read a program when it has spaces before the
-open-parentheses and after the commas. Especially after the commas.
-
-When you split an expression into multiple lines, split it
-before an operator, not after one. Here is the right way:
-
-@cindex expressions, splitting
-@example
-if (foo_this_is_long && bar > win (x, y, z)
- && remaining_condition)
-@end example
-
-Try to avoid having two operators of different precedence at the same
-level of indentation. For example, don't write this:
-
-@example
-mode = (inmode[j] == VOIDmode
- || GET_MODE_SIZE (outmode[j]) > GET_MODE_SIZE (inmode[j])
- ? outmode[j] : inmode[j]);
-@end example
-
-Instead, use extra parentheses so that the indentation shows the nesting:
-
-@example
-mode = ((inmode[j] == VOIDmode
- || (GET_MODE_SIZE (outmode[j]) > GET_MODE_SIZE (inmode[j])))
- ? outmode[j] : inmode[j]);
-@end example
-
-Insert extra parentheses so that Emacs will indent the code properly.
-For example, the following indentation looks nice if you do it by hand,
-
-@example
-v = rup->ru_utime.tv_sec*1000 + rup->ru_utime.tv_usec/1000
- + rup->ru_stime.tv_sec*1000 + rup->ru_stime.tv_usec/1000;
-@end example
-
-@noindent
-but Emacs would alter it. Adding a set of parentheses produces
-something that looks equally nice, and which Emacs will preserve:
-
-@example
-v = (rup->ru_utime.tv_sec*1000 + rup->ru_utime.tv_usec/1000
- + rup->ru_stime.tv_sec*1000 + rup->ru_stime.tv_usec/1000);
-@end example
-
-Format do-while statements like this:
-
-@example
-do
- @{
- a = foo (a);
- @}
-while (a > 0);
-@end example
-
-@cindex formfeed
-@cindex control-L
-Please use formfeed characters (control-L) to divide the program into
-pages at logical places (but not within a function). It does not matter
-just how long the pages are, since they do not have to fit on a printed
-page. The formfeeds should appear alone on lines by themselves.
-
-@node Comments
-@section Commenting Your Work
-@cindex commenting
-
-Every program should start with a comment saying briefly what it is for.
-Example: @samp{fmt - filter for simple filling of text}. This comment
-should be at the top of the source file containing the @samp{main}
-function of the program.
-
-Also, please write a brief comment at the start of each source file,
-with the file name and a line or two about the overall purpose of the
-file.
-
-Please write the comments in a GNU program in English, because English
-is the one language that nearly all programmers in all countries can
-read. If you do not write English well, please write comments in
-English as well as you can, then ask other people to help rewrite them.
-If you can't write comments in English, please find someone to work with
-you and translate your comments into English.
-
-Please put a comment on each function saying what the function does,
-what sorts of arguments it gets, and what the possible values of
-arguments mean and are used for. It is not necessary to duplicate in
-words the meaning of the C argument declarations, if a C type is being
-used in its customary fashion. If there is anything nonstandard about
-its use (such as an argument of type @code{char *} which is really the
-address of the second character of a string, not the first), or any
-possible values that would not work the way one would expect (such as,
-that strings containing newlines are not guaranteed to work), be sure
-to say so.
-
-Also explain the significance of the return value, if there is one.
-
-Please put two spaces after the end of a sentence in your comments, so
-that the Emacs sentence commands will work. Also, please write
-complete sentences and capitalize the first word. If a lower-case
-identifier comes at the beginning of a sentence, don't capitalize it!
-Changing the spelling makes it a different identifier. If you don't
-like starting a sentence with a lower case letter, write the sentence
-differently (e.g., ``The identifier lower-case is @dots{}'').
-
-The comment on a function is much clearer if you use the argument
-names to speak about the argument values. The variable name itself
-should be lower case, but write it in upper case when you are speaking
-about the value rather than the variable itself. Thus, ``the inode
-number NODE_NUM'' rather than ``an inode''.
-
-There is usually no purpose in restating the name of the function in
-the comment before it, because the reader can see that for himself.
-There might be an exception when the comment is so long that the function
-itself would be off the bottom of the screen.
-
-There should be a comment on each static variable as well, like this:
-
-@example
-/* Nonzero means truncate lines in the display;
- zero means continue them. */
-int truncate_lines;
-@end example
-
-@cindex conditionals, comments for
-@cindex @code{#endif}, commenting
-Every @samp{#endif} should have a comment, except in the case of short
-conditionals (just a few lines) that are not nested. The comment should
-state the condition of the conditional that is ending, @emph{including
-its sense}. @samp{#else} should have a comment describing the condition
-@emph{and sense} of the code that follows. For example:
-
-@example
-@group
-#ifdef foo
- @dots{}
-#else /* not foo */
- @dots{}
-#endif /* not foo */
-@end group
-@group
-#ifdef foo
- @dots{}
-#endif /* foo */
-@end group
-@end example
-
-@noindent
-but, by contrast, write the comments this way for a @samp{#ifndef}:
-
-@example
-@group
-#ifndef foo
- @dots{}
-#else /* foo */
- @dots{}
-#endif /* foo */
-@end group
-@group
-#ifndef foo
- @dots{}
-#endif /* not foo */
-@end group
-@end example
-
-@node Syntactic Conventions
-@section Clean Use of C Constructs
-@cindex syntactic conventions
-
-@cindex implicit @code{int}
-@cindex function argument, declaring
-Please explicitly declare the types of all objects. For example, you
-should explicitly declare all arguments to functions, and you should
-declare functions to return @code{int} rather than omitting the
-@code{int}.
-
-@cindex compiler warnings
-@cindex @samp{-Wall} compiler option
-Some programmers like to use the GCC @samp{-Wall} option, and change the
-code whenever it issues a warning. If you want to do this, then do.
-Other programmers prefer not to use @samp{-Wall}, because it gives
-warnings for valid and legitimate code which they do not want to change.
-If you want to do this, then do. The compiler should be your servant,
-not your master.
-
-Declarations of external functions and functions to appear later in the
-source file should all go in one place near the beginning of the file
-(somewhere before the first function definition in the file), or else
-should go in a header file. Don't put @code{extern} declarations inside
-functions.
-
-@cindex temporary variables
-It used to be common practice to use the same local variables (with
-names like @code{tem}) over and over for different values within one
-function. Instead of doing this, it is better to declare a separate local
-variable for each distinct purpose, and give it a name which is
-meaningful. This not only makes programs easier to understand, it also
-facilitates optimization by good compilers. You can also move the
-declaration of each local variable into the smallest scope that includes
-all its uses. This makes the program even cleaner.
-
-Don't use local variables or parameters that shadow global identifiers.
-
-@cindex multiple variables in a line
-Don't declare multiple variables in one declaration that spans lines.
-Start a new declaration on each line, instead. For example, instead
-of this:
-
-@example
-@group
-int foo,
- bar;
-@end group
-@end example
-
-@noindent
-write either this:
-
-@example
-int foo, bar;
-@end example
-
-@noindent
-or this:
-
-@example
-int foo;
-int bar;
-@end example
-
-@noindent
-(If they are global variables, each should have a comment preceding it
-anyway.)
-
-When you have an @code{if}-@code{else} statement nested in another
-@code{if} statement, always put braces around the @code{if}-@code{else}.
-Thus, never write like this:
-
-@example
-if (foo)
- if (bar)
- win ();
- else
- lose ();
-@end example
-
-@noindent
-always like this:
-
-@example
-if (foo)
- @{
- if (bar)
- win ();
- else
- lose ();
- @}
-@end example
-
-If you have an @code{if} statement nested inside of an @code{else}
-statement, either write @code{else if} on one line, like this,
-
-@example
-if (foo)
- @dots{}
-else if (bar)
- @dots{}
-@end example
-
-@noindent
-with its @code{then}-part indented like the preceding @code{then}-part,
-or write the nested @code{if} within braces like this:
-
-@example
-if (foo)
- @dots{}
-else
- @{
- if (bar)
- @dots{}
- @}
-@end example
-
-Don't declare both a structure tag and variables or typedefs in the
-same declaration. Instead, declare the structure tag separately
-and then use it to declare the variables or typedefs.
-
-Try to avoid assignments inside @code{if}-conditions (assignments
-inside @code{while}-conditions are ok). For example, don't write
-this:
-
-@example
-if ((foo = (char *) malloc (sizeof *foo)) == 0)
- fatal ("virtual memory exhausted");
-@end example
-
-@noindent
-instead, write this:
-
-@example
-foo = (char *) malloc (sizeof *foo);
-if (foo == 0)
- fatal ("virtual memory exhausted");
-@end example
-
-@pindex lint
-Don't make the program ugly to placate @code{lint}. Please don't insert any
-casts to @code{void}. Zero without a cast is perfectly fine as a null
-pointer constant, except when calling a varargs function.
-
-@node Names
-@section Naming Variables, Functions, and Files
-
-@cindex names of variables, functions, and files
-The names of global variables and functions in a program serve as
-comments of a sort. So don't choose terse names---instead, look for
-names that give useful information about the meaning of the variable or
-function. In a GNU program, names should be English, like other
-comments.
-
-Local variable names can be shorter, because they are used only within
-one context, where (presumably) comments explain their purpose.
-
-Try to limit your use of abbreviations in symbol names. It is ok to
-make a few abbreviations, explain what they mean, and then use them
-frequently, but don't use lots of obscure abbreviations.
-
-Please use underscores to separate words in a name, so that the Emacs
-word commands can be useful within them. Stick to lower case; reserve
-upper case for macros and @code{enum} constants, and for name-prefixes
-that follow a uniform convention.
-
-For example, you should use names like @code{ignore_space_change_flag};
-don't use names like @code{iCantReadThis}.
-
-Variables that indicate whether command-line options have been
-specified should be named after the meaning of the option, not after
-the option-letter. A comment should state both the exact meaning of
-the option and its letter. For example,
-
-@example
-@group
-/* Ignore changes in horizontal whitespace (-b). */
-int ignore_space_change_flag;
-@end group
-@end example
-
-When you want to define names with constant integer values, use
-@code{enum} rather than @samp{#define}. GDB knows about enumeration
-constants.
-
-@cindex file-name limitations
-@pindex doschk
-You might want to make sure that none of the file names would conflict
-if the files were loaded onto an MS-DOS file system which shortens the
-names. You can use the program @code{doschk} to test for this.
-
-Some GNU programs were designed to limit themselves to file names of 14
-characters or less, to avoid file name conflicts if they are read into
-older System V systems. Please preserve this feature in the existing
-GNU programs that have it, but there is no need to do this in new GNU
-programs. @code{doschk} also reports file names longer than 14
-characters.
-
-@node System Portability
-@section Portability between System Types
-@cindex portability, between system types
-
-In the Unix world, ``portability'' refers to porting to different Unix
-versions. For a GNU program, this kind of portability is desirable, but
-not paramount.
-
-The primary purpose of GNU software is to run on top of the GNU kernel,
-compiled with the GNU C compiler, on various types of @sc{cpu}. So the
-kinds of portability that are absolutely necessary are quite limited.
-But it is important to support Linux-based GNU systems, since they
-are the form of GNU that is popular.
-
-Beyond that, it is good to support the other free operating systems
-(*BSD), and it is nice to support other Unix-like systems if you want
-to. Supporting a variety of Unix-like systems is desirable, although
-not paramount. It is usually not too hard, so you may as well do it.
-But you don't have to consider it an obligation, if it does turn out to
-be hard.
-
-@pindex autoconf
-The easiest way to achieve portability to most Unix-like systems is to
-use Autoconf. It's unlikely that your program needs to know more
-information about the host platform than Autoconf can provide, simply
-because most of the programs that need such knowledge have already been
-written.
-
-Avoid using the format of semi-internal data bases (e.g., directories)
-when there is a higher-level alternative (@code{readdir}).
-
-@cindex non-@sc{posix} systems, and portability
-As for systems that are not like Unix, such as MSDOS, Windows, VMS, MVS,
-and older Macintosh systems, supporting them is often a lot of work.
-When that is the case, it is better to spend your time adding features
-that will be useful on GNU and GNU/Linux, rather than on supporting
-other incompatible systems.
-
-If you do support Windows, please do not abbreviate it as ``win''. In
-hacker terminology, calling something a ``win'' is a form of praise.
-You're free to praise Microsoft Windows on your own if you want, but
-please don't do this in GNU packages. Instead of abbreviating
-``Windows'' to ``win'', you can write it in full or abbreviate it to
-``woe'' or ``w''. In GNU Emacs, for instance, we use @samp{w32} in
-file names of Windows-specific files, but the macro for Windows
-conditionals is called @code{WINDOWSNT}.
-
-It is a good idea to define the ``feature test macro''
-@code{_GNU_SOURCE} when compiling your C files. When you compile on GNU
-or GNU/Linux, this will enable the declarations of GNU library extension
-functions, and that will usually give you a compiler error message if
-you define the same function names in some other way in your program.
-(You don't have to actually @emph{use} these functions, if you prefer
-to make the program more portable to other systems.)
-
-But whether or not you use these GNU extensions, you should avoid
-using their names for any other meanings. Doing so would make it hard
-to move your code into other GNU programs.
-
-@node CPU Portability
-@section Portability between @sc{cpu}s
-
-@cindex data types, and portability
-@cindex portability, and data types
-Even GNU systems will differ because of differences among @sc{cpu}
-types---for example, difference in byte ordering and alignment
-requirements. It is absolutely essential to handle these differences.
-However, don't make any effort to cater to the possibility that an
-@code{int} will be less than 32 bits. We don't support 16-bit machines
-in GNU.
-
-Similarly, don't make any effort to cater to the possibility that
-@code{long} will be smaller than predefined types like @code{size_t}.
-For example, the following code is ok:
-
-@example
-printf ("size = %lu\n", (unsigned long) sizeof array);
-printf ("diff = %ld\n", (long) (pointer2 - pointer1));
-@end example
-
-1989 Standard C requires this to work, and we know of only one
-counterexample: 64-bit programs on Microsoft Windows. We will
-leave it to those who want to port GNU programs to that environment
-to figure out how to do it.
-
-Predefined file-size types like @code{off_t} are an exception: they are
-longer than @code{long} on many platforms, so code like the above won't
-work with them. One way to print an @code{off_t} value portably is to
-print its digits yourself, one by one.
-
-Don't assume that the address of an @code{int} object is also the
-address of its least-significant byte. This is false on big-endian
-machines. Thus, don't make the following mistake:
-
-@example
-int c;
-@dots{}
-while ((c = getchar ()) != EOF)
- write (file_descriptor, &c, 1);
-@end example
-
-@noindent Instead, use @code{unsigned char} as follows. (The @code{unsigned}
-is for portability to unusual systems where @code{char} is signed and
-where there is integer overflow checking.)
-
-@example
-int c;
-while ((c = getchar ()) != EOF)
- @{
- unsigned char u = c;
- write (file_descriptor, &u, 1);
- @}
-@end example
-
-It used to be ok to not worry about the difference between pointers
-and integers when passing arguments to functions. However, on most
-modern 64-bit machines pointers are wider than @code{int}.
-Conversely, integer types like @code{long long int} and @code{off_t}
-are wider than pointers on most modern 32-bit machines. Hence it's
-often better nowadays to use prototypes to define functions whose
-argument types are not trivial.
-
-In particular, if functions accept varying argument counts or types
-they should be declared using prototypes containing @samp{...} and
-defined using @file{stdarg.h}. For an example of this, please see the
-@uref{http://www.gnu.org/software/gnulib/, Gnulib} error module, which
-declares and defines the following function:
-
-@example
-/* Print a message with `fprintf (stderr, FORMAT, ...)';
- if ERRNUM is nonzero, follow it with ": " and strerror (ERRNUM).
- If STATUS is nonzero, terminate the program with `exit (STATUS)'. */
-
-void error (int status, int errnum, const char *format, ...);
-@end example
-
-A simple way to use the Gnulib error module is to obtain the two
-source files @file{error.c} and @file{error.h} from the Gnulib library
-source code repository at
-@uref{http://git.savannah.gnu.org/@/gitweb/@/?p=gnulib.git}.
-Here's a sample use:
-
-@example
-#include "error.h"
-#include <errno.h>
-#include <stdio.h>
-
-char *program_name = "myprogram";
-
-FILE *
-xfopen (char const *name)
-@{
- FILE *fp = fopen (name, "r");
- if (! fp)
- error (1, errno, "cannot read %s", name);
- return fp;
-@}
-@end example
-
-@cindex casting pointers to integers
-Avoid casting pointers to integers if you can. Such casts greatly
-reduce portability, and in most programs they are easy to avoid. In the
-cases where casting pointers to integers is essential---such as, a Lisp
-interpreter which stores type information as well as an address in one
-word---you'll have to make explicit provisions to handle different word
-sizes. You will also need to make provision for systems in which the
-normal range of addresses you can get from @code{malloc} starts far away
-from zero.
-
-@node System Functions
-@section Calling System Functions
-@cindex library functions, and portability
-@cindex portability, and library functions
-
-C implementations differ substantially. Standard C reduces but does
-not eliminate the incompatibilities; meanwhile, many GNU packages still
-support pre-standard compilers because this is not hard to do. This
-chapter gives recommendations for how to use the more-or-less standard C
-library functions to avoid unnecessary loss of portability.
-
-@itemize @bullet
-@item
-Don't use the return value of @code{sprintf}. It returns the number of
-characters written on some systems, but not on all systems.
-
-@item
-Be aware that @code{vfprintf} is not always available.
-
-@item
-@code{main} should be declared to return type @code{int}. It should
-terminate either by calling @code{exit} or by returning the integer
-status code; make sure it cannot ever return an undefined value.
-
-@cindex declaration for system functions
-@item
-Don't declare system functions explicitly.
-
-Almost any declaration for a system function is wrong on some system.
-To minimize conflicts, leave it to the system header files to declare
-system functions. If the headers don't declare a function, let it
-remain undeclared.
-
-While it may seem unclean to use a function without declaring it, in
-practice this works fine for most system library functions on the
-systems where this really happens; thus, the disadvantage is only
-theoretical. By contrast, actual declarations have frequently caused
-actual conflicts.
-
-@item
-If you must declare a system function, don't specify the argument types.
-Use an old-style declaration, not a Standard C prototype. The more you
-specify about the function, the more likely a conflict.
-
-@item
-In particular, don't unconditionally declare @code{malloc} or
-@code{realloc}.
-
-Most GNU programs use those functions just once, in functions
-conventionally named @code{xmalloc} and @code{xrealloc}. These
-functions call @code{malloc} and @code{realloc}, respectively, and
-check the results.
-
-Because @code{xmalloc} and @code{xrealloc} are defined in your program,
-you can declare them in other files without any risk of type conflict.
-
-On most systems, @code{int} is the same length as a pointer; thus, the
-calls to @code{malloc} and @code{realloc} work fine. For the few
-exceptional systems (mostly 64-bit machines), you can use
-@strong{conditionalized} declarations of @code{malloc} and
-@code{realloc}---or put these declarations in configuration files
-specific to those systems.
-
-@cindex string library functions
-@item
-The string functions require special treatment. Some Unix systems have
-a header file @file{string.h}; others have @file{strings.h}. Neither
-file name is portable. There are two things you can do: use Autoconf to
-figure out which file to include, or don't include either file.
-
-@item
-If you don't include either strings file, you can't get declarations for
-the string functions from the header file in the usual way.
-
-That causes less of a problem than you might think. The newer standard
-string functions should be avoided anyway because many systems still
-don't support them. The string functions you can use are these:
-
-@example
-strcpy strncpy strcat strncat
-strlen strcmp strncmp
-strchr strrchr
-@end example
-
-The copy and concatenate functions work fine without a declaration as
-long as you don't use their values. Using their values without a
-declaration fails on systems where the width of a pointer differs from
-the width of @code{int}, and perhaps in other cases. It is trivial to
-avoid using their values, so do that.
-
-The compare functions and @code{strlen} work fine without a declaration
-on most systems, possibly all the ones that GNU software runs on.
-You may find it necessary to declare them @strong{conditionally} on a
-few systems.
-
-The search functions must be declared to return @code{char *}. Luckily,
-there is no variation in the data type they return. But there is
-variation in their names. Some systems give these functions the names
-@code{index} and @code{rindex}; other systems use the names
-@code{strchr} and @code{strrchr}. Some systems support both pairs of
-names, but neither pair works on all systems.
-
-You should pick a single pair of names and use it throughout your
-program. (Nowadays, it is better to choose @code{strchr} and
-@code{strrchr} for new programs, since those are the standard
-names.) Declare both of those names as functions returning @code{char
-*}. On systems which don't support those names, define them as macros
-in terms of the other pair. For example, here is what to put at the
-beginning of your file (or in a header) if you want to use the names
-@code{strchr} and @code{strrchr} throughout:
-
-@example
-#ifndef HAVE_STRCHR
-#define strchr index
-#endif
-#ifndef HAVE_STRRCHR
-#define strrchr rindex
-#endif
-
-char *strchr ();
-char *strrchr ();
-@end example
-@end itemize
-
-Here we assume that @code{HAVE_STRCHR} and @code{HAVE_STRRCHR} are
-macros defined in systems where the corresponding functions exist.
-One way to get them properly defined is to use Autoconf.
-
-@node Internationalization
-@section Internationalization
-@cindex internationalization
-
-@pindex gettext
-GNU has a library called GNU gettext that makes it easy to translate the
-messages in a program into various languages. You should use this
-library in every program. Use English for the messages as they appear
-in the program, and let gettext provide the way to translate them into
-other languages.
-
-Using GNU gettext involves putting a call to the @code{gettext} macro
-around each string that might need translation---like this:
-
-@example
-printf (gettext ("Processing file `%s'..."));
-@end example
-
-@noindent
-This permits GNU gettext to replace the string @code{"Processing file
-`%s'..."} with a translated version.
-
-Once a program uses gettext, please make a point of writing calls to
-@code{gettext} when you add new strings that call for translation.
-
-Using GNU gettext in a package involves specifying a @dfn{text domain
-name} for the package. The text domain name is used to separate the
-translations for this package from the translations for other packages.
-Normally, the text domain name should be the same as the name of the
-package---for example, @samp{coreutils} for the GNU core utilities.
-
-@cindex message text, and internationalization
-To enable gettext to work well, avoid writing code that makes
-assumptions about the structure of words or sentences. When you want
-the precise text of a sentence to vary depending on the data, use two or
-more alternative string constants each containing a complete sentences,
-rather than inserting conditionalized words or phrases into a single
-sentence framework.
-
-Here is an example of what not to do:
-
-@smallexample
-printf ("%s is full", capacity > 5000000 ? "disk" : "floppy disk");
-@end smallexample
-
-If you apply gettext to all strings, like this,
-
-@smallexample
-printf (gettext ("%s is full"),
- capacity > 5000000 ? gettext ("disk") : gettext ("floppy disk"));
-@end smallexample
-
-@noindent
-the translator will hardly know that "disk" and "floppy disk" are meant to
-be substituted in the other string. Worse, in some languages (like French)
-the construction will not work: the translation of the word "full" depends
-on the gender of the first part of the sentence; it happens to be not the
-same for "disk" as for "floppy disk".
-
-Complete sentences can be translated without problems:
-
-@example
-printf (capacity > 5000000 ? gettext ("disk is full")
- : gettext ("floppy disk is full"));
-@end example
-
-A similar problem appears at the level of sentence structure with this
-code:
-
-@example
-printf ("# Implicit rule search has%s been done.\n",
- f->tried_implicit ? "" : " not");
-@end example
-
-@noindent
-Adding @code{gettext} calls to this code cannot give correct results for
-all languages, because negation in some languages requires adding words
-at more than one place in the sentence. By contrast, adding
-@code{gettext} calls does the job straightforwardly if the code starts
-out like this:
-
-@example
-printf (f->tried_implicit
- ? "# Implicit rule search has been done.\n",
- : "# Implicit rule search has not been done.\n");
-@end example
-
-Another example is this one:
-
-@example
-printf ("%d file%s processed", nfiles,
- nfiles != 1 ? "s" : "");
-@end example
-
-@noindent
-The problem with this example is that it assumes that plurals are made
-by adding `s'. If you apply gettext to the format string, like this,
-
-@example
-printf (gettext ("%d file%s processed"), nfiles,
- nfiles != 1 ? "s" : "");
-@end example
-
-@noindent
-the message can use different words, but it will still be forced to use
-`s' for the plural. Here is a better way, with gettext being applied to
-the two strings independently:
-
-@example
-printf ((nfiles != 1 ? gettext ("%d files processed")
- : gettext ("%d file processed")),
- nfiles);
-@end example
-
-@noindent
-But this still doesn't work for languages like Polish, which has three
-plural forms: one for nfiles == 1, one for nfiles == 2, 3, 4, 22, 23, 24, ...
-and one for the rest. The GNU @code{ngettext} function solves this problem:
-
-@example
-printf (ngettext ("%d files processed", "%d file processed", nfiles),
- nfiles);
-@end example
-
-
-@node Character Set
-@section Character Set
-@cindex character set
-@cindex encodings
-@cindex ASCII characters
-@cindex non-ASCII characters
-
-Sticking to the ASCII character set (plain text, 7-bit characters) is
-preferred in GNU source code comments, text documents, and other
-contexts, unless there is good reason to do something else because of
-the application domain. For example, if source code deals with the
-French Revolutionary calendar, it is OK if its literal strings contain
-accented characters in month names like ``Flor@'eal''. Also, it is OK
-to use non-ASCII characters to represent proper names of contributors in
-change logs (@pxref{Change Logs}).
-
-If you need to use non-ASCII characters, you should normally stick with
-one encoding, as one cannot in general mix encodings reliably.
-
-
-@node Quote Characters
-@section Quote Characters
-@cindex quote characters
-@cindex locale-specific quote characters
-@cindex left quote
-@cindex grave accent
-
-In the C locale, GNU programs should stick to plain ASCII for quotation
-characters in messages to users: preferably 0x60 (@samp{`}) for left
-quotes and 0x27 (@samp{'}) for right quotes. It is ok, but not
-required, to use locale-specific quotes in other locales.
-
-The @uref{http://www.gnu.org/software/gnulib/, Gnulib} @code{quote} and
-@code{quotearg} modules provide a reasonably straightforward way to
-support locale-specific quote characters, as well as taking care of
-other issues, such as quoting a filename that itself contains a quote
-character. See the Gnulib documentation for usage details.
-
-In any case, the documentation for your program should clearly specify
-how it does quoting, if different than the preferred method of @samp{`}
-and @samp{'}. This is especially important if the output of your
-program is ever likely to be parsed by another program.
-
-Quotation characters are a difficult area in the computing world at
-this time: there are no true left or right quote characters in Latin1;
-the @samp{`} character we use was standardized there as a grave
-accent. Moreover, Latin1 is still not universally usable.
-
-Unicode contains the unambiguous quote characters required, and its
-common encoding UTF-8 is upward compatible with Latin1. However,
-Unicode and UTF-8 are not universally well-supported, either.
-
-This may change over the next few years, and then we will revisit
-this.
-
-
-@node Mmap
-@section Mmap
-@findex mmap
-
-Don't assume that @code{mmap} either works on all files or fails
-for all files. It may work on some files and fail on others.
-
-The proper way to use @code{mmap} is to try it on the specific file for
-which you want to use it---and if @code{mmap} doesn't work, fall back on
-doing the job in another way using @code{read} and @code{write}.
-
-The reason this precaution is needed is that the GNU kernel (the HURD)
-provides a user-extensible file system, in which there can be many
-different kinds of ``ordinary files.'' Many of them support
-@code{mmap}, but some do not. It is important to make programs handle
-all these kinds of files.
-
-@node Documentation
-@chapter Documenting Programs
-@cindex documentation
-
-A GNU program should ideally come with full free documentation, adequate
-for both reference and tutorial purposes. If the package can be
-programmed or extended, the documentation should cover programming or
-extending it, as well as just using it.
-
-@menu
-* GNU Manuals:: Writing proper manuals.
-* Doc Strings and Manuals:: Compiling doc strings doesn't make a manual.
-* Manual Structure Details:: Specific structure conventions.
-* License for Manuals:: Writing the distribution terms for a manual.
-* Manual Credits:: Giving credit to documentation contributors.
-* Printed Manuals:: Mentioning the printed manual.
-* NEWS File:: NEWS files supplement manuals.
-* Change Logs:: Recording changes.
-* Man Pages:: Man pages are secondary.
-* Reading other Manuals:: How far you can go in learning
- from other manuals.
-@end menu
-
-@node GNU Manuals
-@section GNU Manuals
-
-The preferred document format for the GNU system is the Texinfo
-formatting language. Every GNU package should (ideally) have
-documentation in Texinfo both for reference and for learners. Texinfo
-makes it possible to produce a good quality formatted book, using
-@TeX{}, and to generate an Info file. It is also possible to generate
-HTML output from Texinfo source. See the Texinfo manual, either the
-hardcopy, or the on-line version available through @code{info} or the
-Emacs Info subsystem (@kbd{C-h i}).
-
-Nowadays some other formats such as Docbook and Sgmltexi can be
-converted automatically into Texinfo. It is ok to produce the Texinfo
-documentation by conversion this way, as long as it gives good results.
-
-Make sure your manual is clear to a reader who knows nothing about the
-topic and reads it straight through. This means covering basic topics
-at the beginning, and advanced topics only later. This also means
-defining every specialized term when it is first used.
-
-Programmers tend to carry over the structure of the program as the
-structure for its documentation. But this structure is not
-necessarily good for explaining how to use the program; it may be
-irrelevant and confusing for a user.
-
-Instead, the right way to structure documentation is according to the
-concepts and questions that a user will have in mind when reading it.
-This principle applies at every level, from the lowest (ordering
-sentences in a paragraph) to the highest (ordering of chapter topics
-within the manual). Sometimes this structure of ideas matches the
-structure of the implementation of the software being documented---but
-often they are different. An important part of learning to write good
-documentation is to learn to notice when you have unthinkingly
-structured the documentation like the implementation, stop yourself,
-and look for better alternatives.
-
-For example, each program in the GNU system probably ought to be
-documented in one manual; but this does not mean each program should
-have its own manual. That would be following the structure of the
-implementation, rather than the structure that helps the user
-understand.
-
-Instead, each manual should cover a coherent @emph{topic}. For example,
-instead of a manual for @code{diff} and a manual for @code{diff3}, we
-have one manual for ``comparison of files'' which covers both of those
-programs, as well as @code{cmp}. By documenting these programs
-together, we can make the whole subject clearer.
-
-The manual which discusses a program should certainly document all of
-the program's command-line options and all of its commands. It should
-give examples of their use. But don't organize the manual as a list
-of features. Instead, organize it logically, by subtopics. Address
-the questions that a user will ask when thinking about the job that
-the program does. Don't just tell the reader what each feature can
-do---say what jobs it is good for, and show how to use it for those
-jobs. Explain what is recommended usage, and what kinds of usage
-users should avoid.
-
-In general, a GNU manual should serve both as tutorial and reference.
-It should be set up for convenient access to each topic through Info,
-and for reading straight through (appendixes aside). A GNU manual
-should give a good introduction to a beginner reading through from the
-start, and should also provide all the details that hackers want.
-The Bison manual is a good example of this---please take a look at it
-to see what we mean.
-
-That is not as hard as it first sounds. Arrange each chapter as a
-logical breakdown of its topic, but order the sections, and write their
-text, so that reading the chapter straight through makes sense. Do
-likewise when structuring the book into chapters, and when structuring a
-section into paragraphs. The watchword is, @emph{at each point, address
-the most fundamental and important issue raised by the preceding text.}
-
-If necessary, add extra chapters at the beginning of the manual which
-are purely tutorial and cover the basics of the subject. These provide
-the framework for a beginner to understand the rest of the manual. The
-Bison manual provides a good example of how to do this.
-
-To serve as a reference, a manual should have an Index that list all the
-functions, variables, options, and important concepts that are part of
-the program. One combined Index should do for a short manual, but
-sometimes for a complex package it is better to use multiple indices.
-The Texinfo manual includes advice on preparing good index entries, see
-@ref{Index Entries, , Making Index Entries, texinfo, GNU Texinfo}, and
-see @ref{Indexing Commands, , Defining the Entries of an
-Index, texinfo, GNU Texinfo}.
-
-Don't use Unix man pages as a model for how to write GNU documentation;
-most of them are terse, badly structured, and give inadequate
-explanation of the underlying concepts. (There are, of course, some
-exceptions.) Also, Unix man pages use a particular format which is
-different from what we use in GNU manuals.
-
-Please include an email address in the manual for where to report
-bugs @emph{in the text of the manual}.
-
-Please do not use the term ``pathname'' that is used in Unix
-documentation; use ``file name'' (two words) instead. We use the term
-``path'' only for search paths, which are lists of directory names.
-
-Please do not use the term ``illegal'' to refer to erroneous input to
-a computer program. Please use ``invalid'' for this, and reserve the
-term ``illegal'' for activities prohibited by law.
-
-Please do not write @samp{()} after a function name just to indicate
-it is a function. @code{foo ()} is not a function, it is a function
-call with no arguments.
-
-@node Doc Strings and Manuals
-@section Doc Strings and Manuals
-
-Some programming systems, such as Emacs, provide a documentation string
-for each function, command or variable. You may be tempted to write a
-reference manual by compiling the documentation strings and writing a
-little additional text to go around them---but you must not do it. That
-approach is a fundamental mistake. The text of well-written
-documentation strings will be entirely wrong for a manual.
-
-A documentation string needs to stand alone---when it appears on the
-screen, there will be no other text to introduce or explain it.
-Meanwhile, it can be rather informal in style.
-
-The text describing a function or variable in a manual must not stand
-alone; it appears in the context of a section or subsection. Other text
-at the beginning of the section should explain some of the concepts, and
-should often make some general points that apply to several functions or
-variables. The previous descriptions of functions and variables in the
-section will also have given information about the topic. A description
-written to stand alone would repeat some of that information; this
-redundancy looks bad. Meanwhile, the informality that is acceptable in
-a documentation string is totally unacceptable in a manual.
-
-The only good way to use documentation strings in writing a good manual
-is to use them as a source of information for writing good text.
-
-@node Manual Structure Details
-@section Manual Structure Details
-@cindex manual structure
-
-The title page of the manual should state the version of the programs or
-packages documented in the manual. The Top node of the manual should
-also contain this information. If the manual is changing more
-frequently than or independent of the program, also state a version
-number for the manual in both of these places.
-
-Each program documented in the manual should have a node named
-@samp{@var{program} Invocation} or @samp{Invoking @var{program}}. This
-node (together with its subnodes, if any) should describe the program's
-command line arguments and how to run it (the sort of information people
-would look for in a man page). Start with an @samp{@@example}
-containing a template for all the options and arguments that the program
-uses.
-
-Alternatively, put a menu item in some menu whose item name fits one of
-the above patterns. This identifies the node which that item points to
-as the node for this purpose, regardless of the node's actual name.
-
-The @samp{--usage} feature of the Info reader looks for such a node
-or menu item in order to find the relevant text, so it is essential
-for every Texinfo file to have one.
-
-If one manual describes several programs, it should have such a node for
-each program described in the manual.
-
-@node License for Manuals
-@section License for Manuals
-@cindex license for manuals
-
-Please use the GNU Free Documentation License for all GNU manuals that
-are more than a few pages long. Likewise for a collection of short
-documents---you only need one copy of the GNU FDL for the whole
-collection. For a single short document, you can use a very permissive
-non-copyleft license, to avoid taking up space with a long license.
-
-See @uref{http://www.gnu.org/copyleft/fdl-howto.html} for more explanation
-of how to employ the GFDL.
-
-Note that it is not obligatory to include a copy of the GNU GPL or GNU
-LGPL in a manual whose license is neither the GPL nor the LGPL. It can
-be a good idea to include the program's license in a large manual; in a
-short manual, whose size would be increased considerably by including
-the program's license, it is probably better not to include it.
-
-@node Manual Credits
-@section Manual Credits
-@cindex credits for manuals
-
-Please credit the principal human writers of the manual as the authors,
-on the title page of the manual. If a company sponsored the work, thank
-the company in a suitable place in the manual, but do not cite the
-company as an author.
-
-@node Printed Manuals
-@section Printed Manuals
-
-The FSF publishes some GNU manuals in printed form. To encourage sales
-of these manuals, the on-line versions of the manual should mention at
-the very start that the printed manual is available and should point at
-information for getting it---for instance, with a link to the page
-@url{http://www.gnu.org/order/order.html}. This should not be included
-in the printed manual, though, because there it is redundant.
-
-It is also useful to explain in the on-line forms of the manual how the
-user can print out the manual from the sources.
-
-@node NEWS File
-@section The NEWS File
-@cindex @file{NEWS} file
-
-In addition to its manual, the package should have a file named
-@file{NEWS} which contains a list of user-visible changes worth
-mentioning. In each new release, add items to the front of the file and
-identify the version they pertain to. Don't discard old items; leave
-them in the file after the newer items. This way, a user upgrading from
-any previous version can see what is new.
-
-If the @file{NEWS} file gets very long, move some of the older items
-into a file named @file{ONEWS} and put a note at the end referring the
-user to that file.
-
-@node Change Logs
-@section Change Logs
-@cindex change logs
-
-Keep a change log to describe all the changes made to program source
-files. The purpose of this is so that people investigating bugs in the
-future will know about the changes that might have introduced the bug.
-Often a new bug can be found by looking at what was recently changed.
-More importantly, change logs can help you eliminate conceptual
-inconsistencies between different parts of a program, by giving you a
-history of how the conflicting concepts arose and who they came from.
-
-@menu
-* Change Log Concepts::
-* Style of Change Logs::
-* Simple Changes::
-* Conditional Changes::
-* Indicating the Part Changed::
-@end menu
-
-@node Change Log Concepts
-@subsection Change Log Concepts
-
-You can think of the change log as a conceptual ``undo list'' which
-explains how earlier versions were different from the current version.
-People can see the current version; they don't need the change log
-to tell them what is in it. What they want from a change log is a
-clear explanation of how the earlier version differed.
-
-The change log file is normally called @file{ChangeLog} and covers an
-entire directory. Each directory can have its own change log, or a
-directory can use the change log of its parent directory---it's up to
-you.
-
-Another alternative is to record change log information with a version
-control system such as RCS or CVS. This can be converted automatically
-to a @file{ChangeLog} file using @code{rcs2log}; in Emacs, the command
-@kbd{C-x v a} (@code{vc-update-change-log}) does the job.
-
-There's no need to describe the full purpose of the changes or how
-they work together. However, sometimes it is useful to write one line
-to describe the overall purpose of a change or a batch of changes. If
-you think that a change calls for explanation, you're probably right.
-Please do explain it---but please put the full explanation in comments
-in the code, where people will see it whenever they see the code. For
-example, ``New function'' is enough for the change log when you add a
-function, because there should be a comment before the function
-definition to explain what it does.
-
-In the past, we recommended not mentioning changes in non-software
-files (manuals, help files, etc.) in change logs. However, we've been
-advised that it is a good idea to include them, for the sake of
-copyright records.
-
-The easiest way to add an entry to @file{ChangeLog} is with the Emacs
-command @kbd{M-x add-change-log-entry}. An entry should have an
-asterisk, the name of the changed file, and then in parentheses the name
-of the changed functions, variables or whatever, followed by a colon.
-Then describe the changes you made to that function or variable.
-
-@node Style of Change Logs
-@subsection Style of Change Logs
-@cindex change logs, style
-
-Here are some simple examples of change log entries, starting with the
-header line that says who made the change and when it was installed,
-followed by descriptions of specific changes. (These examples are
-drawn from Emacs and GCC.)
-
-@example
-1998-08-17 Richard Stallman <rms@@gnu.org>
-
-* register.el (insert-register): Return nil.
-(jump-to-register): Likewise.
-
-* sort.el (sort-subr): Return nil.
-
-* tex-mode.el (tex-bibtex-file, tex-file, tex-region):
-Restart the tex shell if process is gone or stopped.
-(tex-shell-running): New function.
-
-* expr.c (store_one_arg): Round size up for move_block_to_reg.
-(expand_call): Round up when emitting USE insns.
-* stmt.c (assign_parms): Round size up for move_block_from_reg.
-@end example
-
-It's important to name the changed function or variable in full. Don't
-abbreviate function or variable names, and don't combine them.
-Subsequent maintainers will often search for a function name to find all
-the change log entries that pertain to it; if you abbreviate the name,
-they won't find it when they search.
-
-For example, some people are tempted to abbreviate groups of function
-names by writing @samp{* register.el (@{insert,jump-to@}-register)};
-this is not a good idea, since searching for @code{jump-to-register} or
-@code{insert-register} would not find that entry.
-
-Separate unrelated change log entries with blank lines. When two
-entries represent parts of the same change, so that they work together,
-then don't put blank lines between them. Then you can omit the file
-name and the asterisk when successive entries are in the same file.
-
-Break long lists of function names by closing continued lines with
-@samp{)}, rather than @samp{,}, and opening the continuation with
-@samp{(} as in this example:
-
-@example
-* keyboard.c (menu_bar_items, tool_bar_items)
-(Fexecute_extended_command): Deal with `keymap' property.
-@end example
-
-When you install someone else's changes, put the contributor's name in
-the change log entry rather than in the text of the entry. In other
-words, write this:
-
-@example
-2002-07-14 John Doe <jdoe@@gnu.org>
-
- * sewing.c: Make it sew.
-@end example
-
-@noindent
-rather than this:
-
-@example
-2002-07-14 Usual Maintainer <usual@@gnu.org>
-
- * sewing.c: Make it sew. Patch by jdoe@@gnu.org.
-@end example
-
-As for the date, that should be the date you applied the change.
-
-@node Simple Changes
-@subsection Simple Changes
-
-Certain simple kinds of changes don't need much detail in the change
-log.
-
-When you change the calling sequence of a function in a simple fashion,
-and you change all the callers of the function to use the new calling
-sequence, there is no need to make individual entries for all the
-callers that you changed. Just write in the entry for the function
-being called, ``All callers changed''---like this:
-
-@example
-* keyboard.c (Fcommand_execute): New arg SPECIAL.
-All callers changed.
-@end example
-
-When you change just comments or doc strings, it is enough to write an
-entry for the file, without mentioning the functions. Just ``Doc
-fixes'' is enough for the change log.
-
-There's no technical need to make change log entries for documentation
-files. This is because documentation is not susceptible to bugs that
-are hard to fix. Documentation does not consist of parts that must
-interact in a precisely engineered fashion. To correct an error, you
-need not know the history of the erroneous passage; it is enough to
-compare what the documentation says with the way the program actually
-works.
-
-However, you should keep change logs for documentation files when the
-project gets copyright assignments from its contributors, so as to
-make the records of authorship more accurate.
-
-@node Conditional Changes
-@subsection Conditional Changes
-@cindex conditional changes, and change logs
-@cindex change logs, conditional changes
-
-C programs often contain compile-time @code{#if} conditionals. Many
-changes are conditional; sometimes you add a new definition which is
-entirely contained in a conditional. It is very useful to indicate in
-the change log the conditions for which the change applies.
-
-Our convention for indicating conditional changes is to use square
-brackets around the name of the condition.
-
-Here is a simple example, describing a change which is conditional but
-does not have a function or entity name associated with it:
-
-@example
-* xterm.c [SOLARIS2]: Include string.h.
-@end example
-
-Here is an entry describing a new definition which is entirely
-conditional. This new definition for the macro @code{FRAME_WINDOW_P} is
-used only when @code{HAVE_X_WINDOWS} is defined:
-
-@example
-* frame.h [HAVE_X_WINDOWS] (FRAME_WINDOW_P): Macro defined.
-@end example
-
-Here is an entry for a change within the function @code{init_display},
-whose definition as a whole is unconditional, but the changes themselves
-are contained in a @samp{#ifdef HAVE_LIBNCURSES} conditional:
-
-@example
-* dispnew.c (init_display) [HAVE_LIBNCURSES]: If X, call tgetent.
-@end example
-
-Here is an entry for a change that takes affect only when
-a certain macro is @emph{not} defined:
-
-@example
-(gethostname) [!HAVE_SOCKETS]: Replace with winsock version.
-@end example
-
-@node Indicating the Part Changed
-@subsection Indicating the Part Changed
-
-Indicate the part of a function which changed by using angle brackets
-enclosing an indication of what the changed part does. Here is an entry
-for a change in the part of the function @code{sh-while-getopts} that
-deals with @code{sh} commands:
-
-@example
-* progmodes/sh-script.el (sh-while-getopts) <sh>: Handle case that
-user-specified option string is empty.
-@end example
-
-
-@node Man Pages
-@section Man Pages
-@cindex man pages
-
-In the GNU project, man pages are secondary. It is not necessary or
-expected for every GNU program to have a man page, but some of them do.
-It's your choice whether to include a man page in your program.
-
-When you make this decision, consider that supporting a man page
-requires continual effort each time the program is changed. The time
-you spend on the man page is time taken away from more useful work.
-
-For a simple program which changes little, updating the man page may be
-a small job. Then there is little reason not to include a man page, if
-you have one.
-
-For a large program that changes a great deal, updating a man page may
-be a substantial burden. If a user offers to donate a man page, you may
-find this gift costly to accept. It may be better to refuse the man
-page unless the same person agrees to take full responsibility for
-maintaining it---so that you can wash your hands of it entirely. If
-this volunteer later ceases to do the job, then don't feel obliged to
-pick it up yourself; it may be better to withdraw the man page from the
-distribution until someone else agrees to update it.
-
-When a program changes only a little, you may feel that the
-discrepancies are small enough that the man page remains useful without
-updating. If so, put a prominent note near the beginning of the man
-page explaining that you don't maintain it and that the Texinfo manual
-is more authoritative. The note should say how to access the Texinfo
-documentation.
-
-Be sure that man pages include a copyright statement and free license.
-The simple all-permissive license is appropriate for simple man pages
-(@pxref{License Notices for Other Files,,,maintain,Information for GNU
-Maintainers}).
-
-For long man pages, with enough explanation and documentation that
-they can be considered true manuals, use the GFDL (@pxref{License for
-Manuals}).
-
-Finally, the GNU help2man program
-(@uref{http://www.gnu.org/software/help2man/}) is one way to automate
-generation of a man page, in this case from @option{--help} output.
-This is sufficient in many cases.
-
-@node Reading other Manuals
-@section Reading other Manuals
-
-There may be non-free books or documentation files that describe the
-program you are documenting.
-
-It is ok to use these documents for reference, just as the author of a
-new algebra textbook can read other books on algebra. A large portion
-of any non-fiction book consists of facts, in this case facts about how
-a certain program works, and these facts are necessarily the same for
-everyone who writes about the subject. But be careful not to copy your
-outline structure, wording, tables or examples from preexisting non-free
-documentation. Copying from free documentation may be ok; please check
-with the FSF about the individual case.
-
-@node Managing Releases
-@chapter The Release Process
-@cindex releasing
-
-Making a release is more than just bundling up your source files in a
-tar file and putting it up for FTP. You should set up your software so
-that it can be configured to run on a variety of systems. Your Makefile
-should conform to the GNU standards described below, and your directory
-layout should also conform to the standards discussed below. Doing so
-makes it easy to include your package into the larger framework of
-all GNU software.
-
-@menu
-* Configuration:: How configuration of GNU packages should work.
-* Makefile Conventions:: Makefile conventions.
-* Releases:: Making releases
-@end menu
-
-@node Configuration
-@section How Configuration Should Work
-@cindex program configuration
-
-@pindex configure
-Each GNU distribution should come with a shell script named
-@code{configure}. This script is given arguments which describe the
-kind of machine and system you want to compile the program for.
-The @code{configure} script must record the configuration options so
-that they affect compilation.
-
-The description here is the specification of the interface for the
-@code{configure} script in GNU packages. Many packages implement it
-using GNU Autoconf (@pxref{Top,, Introduction, autoconf, Autoconf})
-and/or GNU Automake (@pxref{Top,, Introduction, automake, Automake}),
-but you do not have to use these tools. You can implement it any way
-you like; for instance, by making @code{configure} be a wrapper around
-a completely different configuration system.
-
-Another way for the @code{configure} script to operate is to make a
-link from a standard name such as @file{config.h} to the proper
-configuration file for the chosen system. If you use this technique,
-the distribution should @emph{not} contain a file named
-@file{config.h}. This is so that people won't be able to build the
-program without configuring it first.
-
-Another thing that @code{configure} can do is to edit the Makefile. If
-you do this, the distribution should @emph{not} contain a file named
-@file{Makefile}. Instead, it should include a file @file{Makefile.in} which
-contains the input used for editing. Once again, this is so that people
-won't be able to build the program without configuring it first.
-
-If @code{configure} does write the @file{Makefile}, then @file{Makefile}
-should have a target named @file{Makefile} which causes @code{configure}
-to be rerun, setting up the same configuration that was set up last
-time. The files that @code{configure} reads should be listed as
-dependencies of @file{Makefile}.
-
-All the files which are output from the @code{configure} script should
-have comments at the beginning explaining that they were generated
-automatically using @code{configure}. This is so that users won't think
-of trying to edit them by hand.
-
-The @code{configure} script should write a file named @file{config.status}
-which describes which configuration options were specified when the
-program was last configured. This file should be a shell script which,
-if run, will recreate the same configuration.
-
-The @code{configure} script should accept an option of the form
-@samp{--srcdir=@var{dirname}} to specify the directory where sources are found
-(if it is not the current directory). This makes it possible to build
-the program in a separate directory, so that the actual source directory
-is not modified.
-
-If the user does not specify @samp{--srcdir}, then @code{configure} should
-check both @file{.} and @file{..} to see if it can find the sources. If
-it finds the sources in one of these places, it should use them from
-there. Otherwise, it should report that it cannot find the sources, and
-should exit with nonzero status.
-
-Usually the easy way to support @samp{--srcdir} is by editing a
-definition of @code{VPATH} into the Makefile. Some rules may need to
-refer explicitly to the specified source directory. To make this
-possible, @code{configure} can add to the Makefile a variable named
-@code{srcdir} whose value is precisely the specified directory.
-
-In addition, the @samp{configure} script should take options
-corresponding to most of the standard directory variables
-(@pxref{Directory Variables}). Here is the list:
-
-@example
---prefix --exec-prefix --bindir --sbindir --libexecdir --sysconfdir
---sharedstatedir --localstatedir --libdir --includedir --oldincludedir
---datarootdir --datadir --infodir --localedir --mandir --docdir
---htmldir --dvidir --pdfdir --psdir
-@end example
-
-The @code{configure} script should also take an argument which specifies the
-type of system to build the program for. This argument should look like
-this:
-
-@example
-@var{cpu}-@var{company}-@var{system}
-@end example
-
-For example, an Athlon-based GNU/Linux system might be
-@samp{i686-pc-linux-gnu}.
-
-The @code{configure} script needs to be able to decode all plausible
-alternatives for how to describe a machine. Thus,
-@samp{athlon-pc-gnu/linux} would be a valid alias. There is a shell
-script called
-@uref{http://git.savannah.gnu.org/@/gitweb/@/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD,
-@file{config.sub}} that you can use as a subroutine to validate system
-types and canonicalize aliases.
-
-The @code{configure} script should also take the option
-@option{--build=@var{buildtype}}, which should be equivalent to a
-plain @var{buildtype} argument. For example, @samp{configure
---build=i686-pc-linux-gnu} is equivalent to @samp{configure
-i686-pc-linux-gnu}. When the build type is not specified by an option
-or argument, the @code{configure} script should normally guess it using
-the shell script
-@uref{http://git.savannah.gnu.org/@/gitweb/@/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD,
-@file{config.guess}}.
-
-@cindex optional features, configure-time
-Other options are permitted to specify in more detail the software
-or hardware present on the machine, to include or exclude optional parts
-of the package, or to adjust the name of some tools or arguments to them:
-
-@table @samp
-@item --enable-@var{feature}@r{[}=@var{parameter}@r{]}
-Configure the package to build and install an optional user-level
-facility called @var{feature}. This allows users to choose which
-optional features to include. Giving an optional @var{parameter} of
-@samp{no} should omit @var{feature}, if it is built by default.
-
-No @samp{--enable} option should @strong{ever} cause one feature to
-replace another. No @samp{--enable} option should ever substitute one
-useful behavior for another useful behavior. The only proper use for
-@samp{--enable} is for questions of whether to build part of the program
-or exclude it.
-
-@item --with-@var{package}
-@c @r{[}=@var{parameter}@r{]}
-The package @var{package} will be installed, so configure this package
-to work with @var{package}.
-
-@c Giving an optional @var{parameter} of
-@c @samp{no} should omit @var{package}, if it is used by default.
-
-Possible values of @var{package} include
-@samp{gnu-as} (or @samp{gas}), @samp{gnu-ld}, @samp{gnu-libc},
-@samp{gdb},
-@samp{x},
-and
-@samp{x-toolkit}.
-
-Do not use a @samp{--with} option to specify the file name to use to
-find certain files. That is outside the scope of what @samp{--with}
-options are for.
-
-@item @var{variable}=@var{value}
-Set the value of the variable @var{variable} to @var{value}. This is
-used to override the default values of commands or arguments in the
-build process. For example, the user could issue @samp{configure
-CFLAGS=-g CXXFLAGS=-g} to build with debugging information and without
-the default optimization.
-
-Specifying variables as arguments to @code{configure}, like this:
-@example
-./configure CC=gcc
-@end example
-is preferable to setting them in environment variables:
-@example
-CC=gcc ./configure
-@end example
-as it helps to recreate the same configuration later with
-@file{config.status}. However, both methods should be supported.
-@end table
-
-All @code{configure} scripts should accept all of the ``detail''
-options and the variable settings, whether or not they make any
-difference to the particular package at hand. In particular, they
-should accept any option that starts with @samp{--with-} or
-@samp{--enable-}. This is so users will be able to configure an
-entire GNU source tree at once with a single set of options.
-
-You will note that the categories @samp{--with-} and @samp{--enable-}
-are narrow: they @strong{do not} provide a place for any sort of option
-you might think of. That is deliberate. We want to limit the possible
-configuration options in GNU software. We do not want GNU programs to
-have idiosyncratic configuration options.
-
-Packages that perform part of the compilation process may support
-cross-compilation. In such a case, the host and target machines for the
-program may be different.
-
-The @code{configure} script should normally treat the specified type of
-system as both the host and the target, thus producing a program which
-works for the same type of machine that it runs on.
-
-To compile a program to run on a host type that differs from the build
-type, use the configure option @option{--host=@var{hosttype}}, where
-@var{hosttype} uses the same syntax as @var{buildtype}. The host type
-normally defaults to the build type.
-
-To configure a cross-compiler, cross-assembler, or what have you, you
-should specify a target different from the host, using the configure
-option @samp{--target=@var{targettype}}. The syntax for
-@var{targettype} is the same as for the host type. So the command would
-look like this:
-
-@example
-./configure --host=@var{hosttype} --target=@var{targettype}
-@end example
-
-The target type normally defaults to the host type.
-Programs for which cross-operation is not meaningful need not accept the
-@samp{--target} option, because configuring an entire operating system for
-cross-operation is not a meaningful operation.
-
-Some programs have ways of configuring themselves automatically. If
-your program is set up to do this, your @code{configure} script can simply
-ignore most of its arguments.
-
-@comment The makefile standards are in a separate file that is also
-@comment included by make.texinfo. Done by roland@gnu.ai.mit.edu on 1/6/93.
-@comment For this document, turn chapters into sections, etc.
-@lowersections
-@include make-stds.texi
-@raisesections
-
-@node Releases
-@section Making Releases
-@cindex packaging
-
-You should identify each release with a pair of version numbers, a
-major version and a minor. We have no objection to using more than
-two numbers, but it is very unlikely that you really need them.
-
-Package the distribution of @code{Foo version 69.96} up in a gzipped tar
-file with the name @file{foo-69.96.tar.gz}. It should unpack into a
-subdirectory named @file{foo-69.96}.
-
-Building and installing the program should never modify any of the files
-contained in the distribution. This means that all the files that form
-part of the program in any way must be classified into @dfn{source
-files} and @dfn{non-source files}. Source files are written by humans
-and never changed automatically; non-source files are produced from
-source files by programs under the control of the Makefile.
-
-@cindex @file{README} file
-The distribution should contain a file named @file{README} which gives
-the name of the package, and a general description of what it does. It
-is also good to explain the purpose of each of the first-level
-subdirectories in the package, if there are any. The @file{README} file
-should either state the version number of the package, or refer to where
-in the package it can be found.
-
-The @file{README} file should refer to the file @file{INSTALL}, which
-should contain an explanation of the installation procedure.
-
-The @file{README} file should also refer to the file which contains the
-copying conditions. The GNU GPL, if used, should be in a file called
-@file{COPYING}. If the GNU LGPL is used, it should be in a file called
-@file{COPYING.LESSER}.
-
-Naturally, all the source files must be in the distribution. It is okay
-to include non-source files in the distribution, provided they are
-up-to-date and machine-independent, so that building the distribution
-normally will never modify them. We commonly include non-source files
-produced by Bison, @code{lex}, @TeX{}, and @code{makeinfo}; this helps avoid
-unnecessary dependencies between our distributions, so that users can
-install whichever packages they want to install.
-
-Non-source files that might actually be modified by building and
-installing the program should @strong{never} be included in the
-distribution. So if you do distribute non-source files, always make
-sure they are up to date when you make a new distribution.
-
-Make sure that all the files in the distribution are world-readable, and
-that directories are world-readable and world-searchable (octal mode 755).
-We used to recommend that all directories in the distribution also be
-world-writable (octal mode 777), because ancient versions of @code{tar}
-would otherwise not cope when extracting the archive as an unprivileged
-user. That can easily lead to security issues when creating the archive,
-however, so now we recommend against that.
-
-Don't include any symbolic links in the distribution itself. If the tar
-file contains symbolic links, then people cannot even unpack it on
-systems that don't support symbolic links. Also, don't use multiple
-names for one file in different directories, because certain file
-systems cannot handle this and that prevents unpacking the
-distribution.
-
-Try to make sure that all the file names will be unique on MS-DOS. A
-name on MS-DOS consists of up to 8 characters, optionally followed by a
-period and up to three characters. MS-DOS will truncate extra
-characters both before and after the period. Thus,
-@file{foobarhacker.c} and @file{foobarhacker.o} are not ambiguous; they
-are truncated to @file{foobarha.c} and @file{foobarha.o}, which are
-distinct.
-
-@cindex @file{texinfo.tex}, in a distribution
-Include in your distribution a copy of the @file{texinfo.tex} you used
-to test print any @file{*.texinfo} or @file{*.texi} files.
-
-Likewise, if your program uses small GNU software packages like regex,
-getopt, obstack, or termcap, include them in the distribution file.
-Leaving them out would make the distribution file a little smaller at
-the expense of possible inconvenience to a user who doesn't know what
-other files to get.
-
-@node References
-@chapter References to Non-Free Software and Documentation
-@cindex references to non-free material
-
-A GNU program should not recommend, promote, or grant legitimacy to
-the use of any non-free program. Proprietary software is a social and
-ethical problem, and our aim is to put an end to that problem. We
-can't stop some people from writing proprietary programs, or stop
-other people from using them, but we can and should refuse to
-advertise them to new potential customers, or to give the public the
-idea that their existence is ethical.
-
-The GNU definition of free software is found on the GNU web site at
-@url{http://www.gnu.org/@/philosophy/@/free-sw.html}, and the definition
-of free documentation is found at
-@url{http://www.gnu.org/@/philosophy/@/free-doc.html}. The terms ``free''
-and ``non-free'', used in this document, refer to those definitions.
-
-A list of important licenses and whether they qualify as free is in
-@url{http://www.gnu.org/@/licenses/@/license-list.html}. If it is not
-clear whether a license qualifies as free, please ask the GNU Project
-by writing to @email{licensing@@gnu.org}. We will answer, and if the
-license is an important one, we will add it to the list.
-
-When a non-free program or system is well known, you can mention it in
-passing---that is harmless, since users who might want to use it
-probably already know about it. For instance, it is fine to explain
-how to build your package on top of some widely used non-free
-operating system, or how to use it together with some widely used
-non-free program.
-
-However, you should give only the necessary information to help those
-who already use the non-free program to use your program with
-it---don't give, or refer to, any further information about the
-proprietary program, and don't imply that the proprietary program
-enhances your program, or that its existence is in any way a good
-thing. The goal should be that people already using the proprietary
-program will get the advice they need about how to use your free
-program with it, while people who don't already use the proprietary
-program will not see anything likely to lead them to take an interest
-in it.
-
-If a non-free program or system is obscure in your program's domain,
-your program should not mention or support it at all, since doing so
-would tend to popularize the non-free program more than it popularizes
-your program. (You cannot hope to find many additional users for your
-program among the users of Foobar, if the existence of Foobar is not
-generally known among people who might want to use your program.)
-
-Sometimes a program is free software in itself but depends on a
-non-free platform in order to run. For instance, many Java programs
-depend on some non-free Java libraries. To recommend or promote such
-a program is to promote the other programs it needs. This is why we
-are careful about listing Java programs in the Free Software
-Directory: we don't want to promote the non-free Java libraries.
-
-We hope this particular problem with Java will be gone by and by, as
-we replace the remaining non-free standard Java libraries with free
-software, but the general principle will remain the same: don't
-recommend, promote or legitimize programs that depend on non-free
-software to run.
-
-Some free programs strongly encourage the use of non-free software. A
-typical example is @command{mplayer}. It is free software in itself,
-and the free code can handle some kinds of files. However,
-@command{mplayer} recommends use of non-free codecs for other kinds of
-files, and users that install @command{mplayer} are very likely to
-install those codecs along with it. To recommend @command{mplayer}
-is, in effect, to promote use of the non-free codecs.
-
-Thus, you should not recommend programs that strongly encourage the
-use of non-free software. This is why we do not list
-@command{mplayer} in the Free Software Directory.
-
-A GNU package should not refer the user to any non-free documentation
-for free software. Free documentation that can be included in free
-operating systems is essential for completing the GNU system, or any
-free operating system, so encouraging it is a priority; to recommend
-use of documentation that we are not allowed to include undermines the
-impetus for the community to produce documentation that we can
-include. So GNU packages should never recommend non-free
-documentation.
-
-By contrast, it is ok to refer to journal articles and textbooks in
-the comments of a program for explanation of how it functions, even
-though they are non-free. This is because we don't include such
-things in the GNU system even they are free---they are outside the
-scope of what a software distribution needs to include.
-
-Referring to a web site that describes or recommends a non-free
-program is promoting that program, so please do not make links (or
-mention by name) web sites that contain such material. This policy is
-relevant particularly for the web pages for a GNU package.
-
-Following links from nearly any web site can lead eventually to
-non-free software; this is inherent in the nature of the web. So it
-makes no sense to criticize a site for having such links. As long as
-the site does not itself recommend a non-free program, there is no
-need to consider the question of the sites that it links to for other
-reasons.
-
-Thus, for example, you should not refer to AT&T's web site if that
-recommends AT&T's non-free software packages; you should not refer to
-a site that links to AT&T's site presenting it as a place to get some
-non-free program, because that link recommends and legitimizes the
-non-free program. However, that a site contains a link to AT&T's web
-site for some other purpose (such as long-distance telephone service)
-is not an objection against it.
-
-@node GNU Free Documentation License
-@appendix GNU Free Documentation License
-
-@cindex FDL, GNU Free Documentation License
-@include fdl.texi
-
-@node Index
-@unnumbered Index
-@printindex cp
-
-@bye
-
-Local variables:
-eval: (add-hook 'write-file-hooks 'time-stamp)
-time-stamp-start: "@set lastupdate "
-time-stamp-end: "$"
-time-stamp-format: "%:b %:d, %:y"
-compile-command: "cd work.s && make"
-End:
diff --git a/etc/texi2pod.pl b/etc/texi2pod.pl
index cd0ffd943..dd3e181db 100644
--- a/etc/texi2pod.pl
+++ b/etc/texi2pod.pl
@@ -340,7 +340,7 @@ die "No filename or title\n" unless defined $fn && defined $tl;
$sects{NAME} = "$fn \- $tl\n";
$sects{FOOTNOTES} .= "=back\n" if exists $sects{FOOTNOTES};
-for $sect (qw(NAME SYNOPSIS DESCRIPTION OPTIONS ENVIRONMENT FILES
+for $sect (qw(NAME SYNOPSIS TARGET DESCRIPTION OPTIONS ENVIRONMENT FILES
BUGS NOTES FOOTNOTES SEEALSO AUTHOR COPYRIGHT)) {
if(exists $sects{$sect}) {
$head = $sect;
diff --git a/include/ChangeLog b/include/ChangeLog
index 17a62bade..e2f4df69c 100644
--- a/include/ChangeLog
+++ b/include/ChangeLog
@@ -1,3 +1,332 @@
+2016-03-17 Thomas Schwinge <thomas@codesourcery.com>
+
+ * gomp-constants.h (enum gomp_map_kind): Rename
+ GOMP_MAP_FORCE_DEALLOC to GOMP_MAP_DELETE. Adjust all users.
+
+2016-03-03 Than McIntosh <thanm@google.com>
+
+ * plugin-api.h: Add new hooks to the plugin transfer vector to
+ to support querying section alignment and section size.
+ (ld_plugin_get_input_section_alignment): New hook.
+ (ld_plugin_get_input_section_size): New hook.
+ (ld_plugin_tag): Add LDPT_GET_INPUT_SECTION_ALIGNMENT
+ and LDPT_GET_INPUT_SECTION_SIZE.
+ (ld_plugin_tv): Add tv_get_input_section_alignment and
+ tv_get_input_section_size.
+
+2016-03-03 Evgenii Stepanov <eugenis@google.com>
+
+ * plugin-api.h (enum ld_plugin_tag): Add LDPT_GET_SYMBOLS_V3.
+
+2016-01-19 Martin Jambor <mjambor@suse.cz>
+
+ * gomp-constants.h (GOMP_DEVICE_HSA): New macro.
+ (GOMP_VERSION_HSA): Likewise.
+ (GOMP_TARGET_ARG_DEVICE_MASK): Likewise.
+ (GOMP_TARGET_ARG_DEVICE_ALL): Likewise.
+ (GOMP_TARGET_ARG_SUBSEQUENT_PARAM): Likewise.
+ (GOMP_TARGET_ARG_ID_MASK): Likewise.
+ (GOMP_TARGET_ARG_NUM_TEAMS): Likewise.
+ (GOMP_TARGET_ARG_THREAD_LIMIT): Likewise.
+ (GOMP_TARGET_ARG_VALUE_SHIFT): Likewise.
+ (GOMP_TARGET_ARG_HSA_KERNEL_ATTRIBUTES): Likewise.
+
+2016-01-07 Mike Frysinger <vapier@gentoo.org>
+
+ * longlong.h: Change !__SHMEDIA__ to
+ (!defined (__SHMEDIA__) || !__SHMEDIA__).
+ Change __SHMEDIA__ to defined (__SHMEDIA__) && __SHMEDIA__.
+
+2016-01-05 Mike Frysinger <vapier@gentoo.org>
+
+ * libiberty.h (dupargv): Change arg to char * const *.
+ (writeargv, countargv): Likewise.
+
+2015-11-25 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
+
+ * vtv-change-permission.h (VTV_PAGE_SIZE) [__sun__ && __svr4__ &&
+ __sparc__]: Define.
+
+2015-11-12 James Norris <jnorris@codesourcery.com>
+ Joseph Myers <joseph@codesourcery.com>
+
+ * gomp-constants.h (enum gomp_map_kind): Add GOMP_MAP_DEVICE_RESIDENT
+ and GOMP_MAP_LINK.
+
+2015-11-09 Alan Modra <amodra@gmail.com>
+
+ PR gdb/17133
+ * obstack.h (__attribute_pure__): Expand _GL_ATTRIBUTE_PURE.
+
+2015-11-09 Alan Modra <amodra@gmail.com>
+
+ PR gdb/17133
+ * obstack.h: Import current gnulib file.
+
+2015-11-05 Jakub Jelinek <jakub@redhat.com>
+ Ilya Verbin <ilya.verbin@intel.com>
+
+ * gomp-constants.h (GOMP_MAP_FLAG_SPECIAL_2): Define.
+ (GOMP_MAP_FLAG_ALWAYS): Remove.
+ (enum gomp_map_kind): Use GOMP_MAP_FLAG_SPECIAL_2 instead of
+ GOMP_MAP_FLAG_ALWAYS for GOMP_MAP_ALWAYS_TO, GOMP_MAP_ALWAYS_FROM,
+ GOMP_MAP_ALWAYS_TOFROM, GOMP_MAP_STRUCT, GOMP_MAP_RELEASE.
+ Add GOMP_MAP_ALWAYS_POINTER and GOMP_MAP_FIRSTPRIVATE_REFERENCE.
+ (GOMP_MAP_ALWAYS_P): Define.
+ (GOMP_TARGET_FLAG_NOWAIT): Adjust comment.
+
+2015-10-27 Daniel Jacobowitz <dan@codesourcery.com>
+ Joseph Myers <joseph@codesourcery.com>
+ Mark Shinwell <shinwell@codesourcery.com>
+ Andrew Stubbs <ams@codesourcery.com>
+ Rich Felker <dalias@libc.org>
+
+ * longlong.h (udiv_qrnnd): Add FDPIC compatible version for SH.
+
+2015-10-18 Roland McGrath <roland@gnu.org>
+
+ PR other/63758
+ * environ.h: New file.
+
+2015-10-13 Jakub Jelinek <jakub@redhat.com>
+ Ilya Verbin <ilya.verbin@intel.com>
+
+ * gomp-constants.h (GOMP_MAP_FLAG_ALWAYS): Define.
+ (enum gomp_map_kind): Add GOMP_MAP_FIRSTPRIVATE,
+ GOMP_MAP_FIRSTPRIVATE_INT, GOMP_MAP_USE_DEVICE_PTR,
+ GOMP_MAP_ZERO_LEN_ARRAY_SECTION, GOMP_MAP_ALWAYS_TO,
+ GOMP_MAP_ALWAYS_FROM, GOMP_MAP_ALWAYS_TOFROM, GOMP_MAP_STRUCT,
+ GOMP_MAP_DELETE_ZERO_LEN_ARRAY_SECTION, GOMP_MAP_DELETE,
+ GOMP_MAP_RELEASE, GOMP_MAP_FIRSTPRIVATE_POINTER.
+ (GOMP_MAP_ALWAYS_TO_P, GOMP_MAP_ALWAYS_FROM_P): Define.
+ (GOMP_TASK_FLAG_UNTIED, GOMP_TASK_FLAG_FINAL, GOMP_TASK_FLAG_MERGEABLE,
+ GOMP_TASK_FLAG_DEPEND, GOMP_TASK_FLAG_PRIORITY, GOMP_TASK_FLAG_UP,
+ GOMP_TASK_FLAG_GRAINSIZE, GOMP_TASK_FLAG_IF, GOMP_TASK_FLAG_NOGROUP,
+ GOMP_TARGET_FLAG_NOWAIT, GOMP_TARGET_FLAG_EXIT_DATA,
+ GOMP_TARGET_FLAG_UPDATE): Define.
+
+2015-09-28 Nathan Sidwell <nathan@codesourcery.com>
+
+ * gomp-constants.h (GOMP_VERSION_NVIDIA_PTX): Increment.
+ (GOMP_DIM_GANG, GOMP_DIM_WORKER, GOMP_DIM_VECTOR, GOMP_DIM_MAX,
+ GOMP_DIM_MASK): New.
+ (GOMP_LAUNCH_DIM, GOMP_LAUNCH_ASYNC, GOMP_LAUNCH_WAIT): New.
+ (GOMP_LAUNCH_CODE_SHIFT, GOMP_LAUNCH_DEVICE_SHIFT,
+ GOMP_LAUNCH_OP_SHIFT): New.
+ (GOMP_LAUNCH_PACK, GOMP_LAUNCH_CODE, GOMP_LAUNCH_DEVICE,
+ GOMP_LAUNCH_OP): New.
+ (GOMP_LAUNCH_OP_MAX): New.
+
+2015-08-24 Nathan Sidwell <nathan@codesourcery.com>
+
+ * gomp-constants.h (GOMP_VERSION, GOMP_VERSION_NVIDIA_PTX,
+ GOMP_VERSION_INTEL_MIC): New.
+ (GOMP_VERSION_PACK, GOMP_VERSION_LIB, GOMP_VERSION_DEV): New.
+
+2015-08-14 Pierre-Marie de Rodat <derodat@adacore.com>
+
+ * dwarf2.def (DW_AT_GNU_bias): New attribute.
+
+2015-08-14 Pierre-Marie de Rodat <derodat@adacore.com>
+
+ * dwarf2.def (DW_AT_GNU_numerator, DW_AT_GNU_denominator): New
+ attributes.
+
+2015-08-11 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
+
+ * ansidecl.h (GCC_FINAL): New macro.
+
+2015-08-10 Thomas Schwinge <thomas@codesourcery.com>
+
+ * gomp-constants.c (GOMP_DEVICE_HOST_NONSHM): Remove.
+
+2015-05-22 Yunlian Jiang <yunlian@google.com>
+
+ * libiberty.h (asprintf): Don't declare if HAVE_DECL_ASPRINTF is
+ not defined.
+
+2015-03-19 Richard Biener <rguenther@suse.de>
+
+ * partition.h (struct partition_elem): Re-order elements to
+ avoid padding.
+
+2015-03-02 Markus Trippelsdorf <markus@trippelsdorf.de>
+
+ PR target/65261
+ * ansidecl.h (ATTRIBUTE_NO_SANITIZE_UNDEFINED): New macro.
+
+2015-02-19 Pedro Alves <palves@redhat.com>
+
+ * floatformat.h [__cplusplus]: Wrap in extern "C".
+
+2015-02-04 Jakub Jelinek <jakub@redhat.com>
+
+ * dwarf2.h (enum dwarf_source_language): Add DW_LANG_Fortran03
+ and DW_LANG_Fortran08.
+
+2015-01-15 Thomas Schwinge <thomas@codesourcery.com>
+ Julian Brown <julian@codesourcery.com>
+ James Norris <jnorris@codesourcery.com>
+
+ * gomp-constants.h: New file.
+
+2014-12-14 Jan-Benedict Glaw <jbglaw@lug-owl.de>
+
+ * libiberty.h: Merge Copyright year update from Binutils.
+
+2014-12-24 Uros Bizjak <ubizjak@gmail.com>
+ Ben Elliston <bje@au.ibm.com>
+ Manuel Lopez-Ibanez <manu@gcc.gnu.org>
+
+ * libiberty.h (xasprintf): Declare.
+
+2014-12-11 Uros Bizjak <ubizjak@gmail.com>
+ Ben Elliston <bje@au.ibm.com>
+ Manuel Lopez-Ibanez <manu@gcc.gnu.org>
+
+ * libiberty.h (xvasprintf): Declare.
+
+2014-12-09 Trevor Saunders <tsaunders@mozilla.com>
+
+ * hashtab.h, splay-tree.h: Remove GTY markers.
+
+2014-12-08 Mark Wielaard <mjw@redhat.com>
+
+ PR debug/60782
+ * dwarf2.def: Add DWARFv5 DW_TAG_atomic_type.
+
+2014-11-21 Mark Wielaard <mjw@redhat.com>
+
+ * dwarf2.h: Add DW_LANG_C_plus_plus_11, DW_LANG_C11 and
+ DW_LANG_C_plus_plus_14.
+
+2014-11-25 Mark Wielaard <mjw@redhat.com>
+
+ * dwarf2.def (DW_AT_noreturn): New DWARF5 attribute.
+
+2014-11-14 Shinichiro Hamaji <shinichiro.hamaji@gmail.com>
+
+ * dwarf2.def (DW_AT_APPLE_optimized, DW_AT_APPLE_flags)
+ (DW_AT_APPLE_isa, DW_AT_APPLE_block)
+ (DW_AT_APPLE_major_runtime_vers, DW_AT_APPLE_runtime_class)
+ (DW_AT_APPLE_omit_frame_ptr, DW_AT_APPLE_property_name)
+ (DW_AT_APPLE_property_getter, DW_AT_APPLE_property_setter)
+ (DW_AT_APPLE_property_attribute, DW_AT_APPLE_objc_complete_type)
+ (DW_AT_APPLE_property): New macros.
+
+2014-11-11 Anthony Brandon <anthony.brandon@gmail.com>
+ Manuel López-Ibáñez <manu@gcc.gnu.org>
+
+ PR driver/36312
+ * filenames.h: Add prototype for canonical_filename_eq.
+
+2014-11-11 David Malcolm <dmalcolm@redhat.com>
+
+ * ChangeLog.jit: New.
+
+2014-10-28 Richard Henderson <rth@redhat.com>
+
+ * longlong.h [__alpha] (umul_ppmm): Disable for c++.
+
+2014-10-28 Yury Gribov <y.gribov@samsung.com>
+
+ * libiberty.h (strtol, strtoul, strtoll, strtoull): New prototypes.
+
+2014-10-27 Phil Muldoon <pmuldoon@redhat.com>
+ Jan Kratochvil <jan.kratochvil@redhat.com>
+ Tom Tromey <tromey@redhat.com>
+
+ * gcc-c-fe.def: New file.
+ * gcc-c-interface.h: New file.
+ * gcc-interface.h: New file.
+
+2014-10-15 David Malcolm <dmalcolm@redhat.com>
+
+ * libiberty.h (choose_tmpdir): New prototype.
+
+2013-10-02 Mark Wielaard <mjw@redhat.com>
+
+ PR debug/63239
+ * dwarf2.def (DW_AT_GNU_deleted): New attribute.
+
+2014-09-26 Max Ostapenko <m.ostapenko@partner.samsung.com>
+
+ * libiberty.h (PEX_STDOUT_APPEND): New flag.
+ (PEX_STDERR_APPEND): Likewise.
+
+2014-09-23 Iain Buclaw <ibuclaw@gdcproject.org>
+
+ * demangle.h (DMGL_DLANG): New macro.
+ (DMGL_STYLE_MASK): Add DMGL_DLANG.
+ (demangling_styles): Add dlang_demangling.
+ (DLANG_DEMANGLING_STYLE_STRING): New macro.
+ (DLANG_DEMANGLING): New macro.
+ (dlang_demangle): New prototype.
+
+2014-09-15 Andreas Krebbel <Andreas.Krebbel@de.ibm.com>
+
+ * longlong.h: Add __udiv_w_sdiv prototype.
+
+2014-06-10 Thomas Schwinge <thomas@codesourcery.com>
+
+ PR lto/61334
+ * libiberty.h [defined (HAVE_DECL_STRNLEN) &&
+ !HAVE_DECL_STRNLEN] (strnlen): New prototype.
+
+2014-05-21 John Marino <gnugcc@marino.st>
+
+ * liberty.h: Use basename function on DragonFly.
+
+2014-05-01 Steve Ellcey <sellcey@mips.com>
+
+ * include/longlong.h: Use 'defined()' to check __mips16.
+
+2014-04-30 Richard Sandiford <rdsandiford@googlemail.com>
+
+ * longlong.h (__i386__): Remove W_TYPE_SIZE==64 handling.
+
+2014-04-22 Yufeng Zhang <yufeng.zhang@arm.com>
+
+ * longlong.h: Merge from glibc.
+
+2014-01-21 Tom Tromey <tromey@redhat.com>
+
+ * ansidecl.h (ANSI_PROTOTYPES, PTRCONST, LONG_DOUBLE, PARAMS)
+ (VPARAMS, VA_START, VA_OPEN, VA_CLOSE, VA_FIXEDARG, CONST)
+ (VOLATILE, SIGNED, PROTO, EXFUN, DEFUN, DEFUN_VOID, AND, DOTS)
+ (NOARGS): Don't define.
+ * libiberty.h (expandargv, writeargv): Don't use PARAMS.
+
+2013-12-23 Bill Maddox <maddox@google.com>
+
+ * demangle.h (enum gnu_v3_ctor_kinds):
+ Added literal gnu_v3_unified_ctor.
+ (enum gnu_v3_ctor_kinds):
+ Added literal gnu_v3_unified_dtor.
+
+2013-12-04 Richard Sandiford <rdsandiford@googlemail.com>
+
+ * longlong.h: New file.
+
+2013-10-29 Marc Glisse <marc.glisse@inria.fr>
+
+ PR tree-optimization/58689
+ * ansidecl.h (ATTRIBUTE_RETURNS_NONNULL): New macro.
+ * libiberty.h (basename, lbasename, dos_lbasename, unix_lbasename,
+ concat_copy): Mark with attributes nonnull(1) and returns_nonnull.
+ (concat, reconcat, concat_copy2, choose_temp_base, xstrerror,
+ xmalloc, xrealloc, xcalloc, xstrdup, xstrndup, xmemdup, pex_init):
+ Mark with attribute returns_nonnull.
+
+2013-10-22 Sterling Augustine <saugustine@google.com>
+
+ * gdb/gdb-index.h: Merge from gdb tree.
+
+2013-10-10 Sean Keys <skeys@ipdatasys.com>
+
+ * xgate.h : Cleanup after opcode
+ table modification..
+
2013-08-20 Alan Modra <amodra@gmail.com>
* floatformat.h (floatformat_ibm_long_double): Delete.
diff --git a/include/ChangeLog-9103 b/include/ChangeLog-9103
index bac53022b..3eeb77c1b 100644
--- a/include/ChangeLog-9103
+++ b/include/ChangeLog-9103
@@ -2674,12 +2674,6 @@ Wed Aug 21 20:32:13 1991 John Gilmore (gnu at cygint.cygnus.com)
to reflect reality as I know it.
-Copyright (C) 1993-2003 Free Software Foundation, Inc.
-
-Copying and distribution of this file, with or without modification,
-are permitted in any medium without royalty provided the copyright
-notice and this notice are preserved.
-
Local Variables:
mode: change-log
left-margin: 8
diff --git a/include/ChangeLog.jit b/include/ChangeLog.jit
new file mode 100644
index 000000000..84acd3314
--- /dev/null
+++ b/include/ChangeLog.jit
@@ -0,0 +1,11 @@
+2014-09-25 David Malcolm <dmalcolm@redhat.com>
+
+ * libiberty.h (choose_tmpdir): New prototype.
+ * ChangeLog.jit: New.
+
+
+Copyright (C) 2014 Free Software Foundation, Inc.
+
+Copying and distribution of this file, with or without modification,
+are permitted in any medium without royalty provided the copyright
+notice and this notice are preserved.
diff --git a/include/ansidecl.h b/include/ansidecl.h
index 40f4a5fea..6e4bfc21f 100644
--- a/include/ansidecl.h
+++ b/include/ansidecl.h
@@ -1,7 +1,5 @@
/* ANSI and traditional C compatability macros
- Copyright 1991, 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
- 2002, 2003, 2004, 2005, 2006, 2007, 2009, 2010
- Free Software Foundation, Inc.
+ Copyright (C) 1991-2015 Free Software Foundation, Inc.
This file is part of the GNU C Library.
This program is free software; you can redistribute it and/or modify
@@ -24,93 +22,16 @@ Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
Macro ANSI C definition Traditional C definition
----- ---- - ---------- ----------- - ----------
- ANSI_PROTOTYPES 1 not defined
PTR `void *' `char *'
- PTRCONST `void *const' `char *'
- LONG_DOUBLE `long double' `double'
const not defined `'
volatile not defined `'
signed not defined `'
- VA_START(ap, var) va_start(ap, var) va_start(ap)
-
- Note that it is safe to write "void foo();" indicating a function
- with no return value, in all K+R compilers we have been able to test.
-
- For declaring functions with prototypes, we also provide these:
-
- PARAMS ((prototype))
- -- for functions which take a fixed number of arguments. Use this
- when declaring the function. When defining the function, write a
- K+R style argument list. For example:
-
- char *strcpy PARAMS ((char *dest, char *source));
- ...
- char *
- strcpy (dest, source)
- char *dest;
- char *source;
- { ... }
-
-
- VPARAMS ((prototype, ...))
- -- for functions which take a variable number of arguments. Use
- PARAMS to declare the function, VPARAMS to define it. For example:
-
- int printf PARAMS ((const char *format, ...));
- ...
- int
- printf VPARAMS ((const char *format, ...))
- {
- ...
- }
-
- For writing functions which take variable numbers of arguments, we
- also provide the VA_OPEN, VA_CLOSE, and VA_FIXEDARG macros. These
- hide the differences between K+R <varargs.h> and C89 <stdarg.h> more
- thoroughly than the simple VA_START() macro mentioned above.
-
- VA_OPEN and VA_CLOSE are used *instead of* va_start and va_end.
- Immediately after VA_OPEN, put a sequence of VA_FIXEDARG calls
- corresponding to the list of fixed arguments. Then use va_arg
- normally to get the variable arguments, or pass your va_list object
- around. You do not declare the va_list yourself; VA_OPEN does it
- for you.
-
- Here is a complete example:
-
- int
- printf VPARAMS ((const char *format, ...))
- {
- int result;
-
- VA_OPEN (ap, format);
- VA_FIXEDARG (ap, const char *, format);
-
- result = vfprintf (stdout, format, ap);
- VA_CLOSE (ap);
-
- return result;
- }
-
-
- You can declare variables either before or after the VA_OPEN,
- VA_FIXEDARG sequence. Also, VA_OPEN and VA_CLOSE are the beginning
- and end of a block. They must appear at the same nesting level,
- and any variables declared after VA_OPEN go out of scope at
- VA_CLOSE. Unfortunately, with a K+R compiler, that includes the
- argument list. You can have multiple instances of VA_OPEN/VA_CLOSE
- pairs in a single function in case you need to traverse the
- argument list more than once.
For ease of writing code which uses GCC extensions but needs to be
portable to other compilers, we provide the GCC_VERSION macro that
simplifies testing __GNUC__ and __GNUC_MINOR__ together, and various
wrappers around __attribute__. Also, __extension__ will be #defined
- to nothing if it doesn't work. See below.
-
- This header also defines a lot of obsolete macros:
- CONST, VOLATILE, SIGNED, PROTO, EXFUN, DEFUN, DEFUN_VOID,
- AND, DOTS, NOARGS. Don't use them. */
+ to nothing if it doesn't work. See below. */
#ifndef _ANSIDECL_H
#define _ANSIDECL_H 1
@@ -149,28 +70,8 @@ So instead we use the macro below and test it against specific values. */
C++ compilers, does not define __STDC__, though it acts as if this
was so. (Verified versions: 5.7, 6.2, 6.3, 6.5) */
-#define ANSI_PROTOTYPES 1
#define PTR void *
-#define PTRCONST void *const
-#define LONG_DOUBLE long double
-
-/* PARAMS is often defined elsewhere (e.g. by libintl.h), so wrap it in
- a #ifndef. */
-#ifndef PARAMS
-#define PARAMS(ARGS) ARGS
-#endif
-#define VPARAMS(ARGS) ARGS
-#define VA_START(VA_LIST, VAR) va_start(VA_LIST, VAR)
-
-/* variadic function helper macros */
-/* "struct Qdmy" swallows the semicolon after VA_OPEN/VA_FIXEDARG's
- use without inhibiting further decls and without declaring an
- actual variable. */
-#define VA_OPEN(AP, VAR) { va_list AP; va_start(AP, VAR); { struct Qdmy
-#define VA_CLOSE(AP) } va_end(AP); }
-#define VA_FIXEDARG(AP, T, N) struct Qdmy
-
#undef const
#undef volatile
#undef signed
@@ -188,35 +89,9 @@ So instead we use the macro below and test it against specific values. */
# endif
#endif
-/* These are obsolete. Do not use. */
-#ifndef IN_GCC
-#define CONST const
-#define VOLATILE volatile
-#define SIGNED signed
-
-#define PROTO(type, name, arglist) type name arglist
-#define EXFUN(name, proto) name proto
-#define DEFUN(name, arglist, args) name(args)
-#define DEFUN_VOID(name) name(void)
-#define AND ,
-#define DOTS , ...
-#define NOARGS void
-#endif /* ! IN_GCC */
-
#else /* Not ANSI C. */
-#undef ANSI_PROTOTYPES
#define PTR char *
-#define PTRCONST PTR
-#define LONG_DOUBLE double
-
-#define PARAMS(args) ()
-#define VPARAMS(args) (va_alist) va_dcl
-#define VA_START(va_list, var) va_start(va_list)
-
-#define VA_OPEN(AP, VAR) { va_list AP; va_start(AP); { struct Qdmy
-#define VA_CLOSE(AP) } va_end(AP); }
-#define VA_FIXEDARG(AP, TYPE, NAME) TYPE NAME = va_arg(AP, TYPE)
/* some systems define these in header files for non-ansi mode */
#undef const
@@ -228,20 +103,6 @@ So instead we use the macro below and test it against specific values. */
#define signed
#define inline
-#ifndef IN_GCC
-#define CONST
-#define VOLATILE
-#define SIGNED
-
-#define PROTO(type, name, arglist) type name ()
-#define EXFUN(name, proto) name()
-#define DEFUN(name, arglist, args) name arglist args;
-#define DEFUN_VOID(name) name()
-#define AND ;
-#define DOTS
-#define NOARGS
-#endif /* ! IN_GCC */
-
#endif /* ANSI C. */
/* Define macros for some gcc attributes. This permits us to use the
@@ -311,6 +172,15 @@ So instead we use the macro below and test it against specific values. */
# endif /* GNUC >= 3.3 */
#endif /* ATTRIBUTE_NONNULL */
+/* Attribute `returns_nonnull' was valid as of gcc 4.9. */
+#ifndef ATTRIBUTE_RETURNS_NONNULL
+# if (GCC_VERSION >= 4009)
+# define ATTRIBUTE_RETURNS_NONNULL __attribute__ ((__returns_nonnull__))
+# else
+# define ATTRIBUTE_RETURNS_NONNULL
+# endif /* GNUC >= 4.9 */
+#endif /* ATTRIBUTE_RETURNS_NONNULL */
+
/* Attribute `pure' was valid as of gcc 3.0. */
#ifndef ATTRIBUTE_PURE
# if (GCC_VERSION >= 3000)
@@ -404,6 +274,15 @@ So instead we use the macro below and test it against specific values. */
# endif /* GNUC >= 4.3 */
#endif /* ATTRIBUTE_HOT */
+/* Attribute 'no_sanitize_undefined' was valid as of gcc 4.9. */
+#ifndef ATTRIBUTE_NO_SANITIZE_UNDEFINED
+# if (GCC_VERSION >= 4009)
+# define ATTRIBUTE_NO_SANITIZE_UNDEFINED __attribute__ ((no_sanitize_undefined))
+# else
+# define ATTRIBUTE_NO_SANITIZE_UNDEFINED
+# endif /* GNUC >= 4.9 */
+#endif /* ATTRIBUTE_NO_SANITIZE_UNDEFINED */
+
/* We use __extension__ in some places to suppress -pedantic warnings
about GCC extensions. This feature didn't work properly before
gcc 2.8. */
@@ -434,6 +313,15 @@ So instead we use the macro below and test it against specific values. */
#define ENUM_BITFIELD(TYPE) unsigned int
#endif
+ /* This is used to mark a class or virtual function as final. */
+#if __cplusplus >= 201103L
+#define GCC_FINAL final
+#elif GCC_VERSION >= 4007
+#define GCC_FINAL __final
+#else
+#define GCC_FINAL
+#endif
+
#ifdef __cplusplus
}
#endif
diff --git a/include/demangle.h b/include/demangle.h
index 58bf547d5..1d7cadf4b 100644
--- a/include/demangle.h
+++ b/include/demangle.h
@@ -1,7 +1,6 @@
/* Defs for interface to demanglers.
- Copyright 1992, 1993, 1994, 1995, 1996, 1997, 1998, 2000, 2001, 2002,
- 2003, 2004, 2005, 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
-
+ Copyright (C) 1992-2015 Free Software Foundation, Inc.
+
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public License
as published by the Free Software Foundation; either version 2, or
@@ -63,9 +62,10 @@ extern "C" {
#define DMGL_EDG (1 << 13)
#define DMGL_GNU_V3 (1 << 14)
#define DMGL_GNAT (1 << 15)
+#define DMGL_DLANG (1 << 16)
/* If none of these are set, use 'current_demangling_style' as the default. */
-#define DMGL_STYLE_MASK (DMGL_AUTO|DMGL_GNU|DMGL_LUCID|DMGL_ARM|DMGL_HP|DMGL_EDG|DMGL_GNU_V3|DMGL_JAVA|DMGL_GNAT)
+#define DMGL_STYLE_MASK (DMGL_AUTO|DMGL_GNU|DMGL_LUCID|DMGL_ARM|DMGL_HP|DMGL_EDG|DMGL_GNU_V3|DMGL_JAVA|DMGL_GNAT|DMGL_DLANG)
/* Enumeration of possible demangling styles.
@@ -87,7 +87,8 @@ extern enum demangling_styles
edg_demangling = DMGL_EDG,
gnu_v3_demangling = DMGL_GNU_V3,
java_demangling = DMGL_JAVA,
- gnat_demangling = DMGL_GNAT
+ gnat_demangling = DMGL_GNAT,
+ dlang_demangling = DMGL_DLANG
} current_demangling_style;
/* Define string names for the various demangling styles. */
@@ -102,6 +103,7 @@ extern enum demangling_styles
#define GNU_V3_DEMANGLING_STYLE_STRING "gnu-v3"
#define JAVA_DEMANGLING_STYLE_STRING "java"
#define GNAT_DEMANGLING_STYLE_STRING "gnat"
+#define DLANG_DEMANGLING_STYLE_STRING "dlang"
/* Some macros to test what demangling style is active. */
@@ -115,6 +117,7 @@ extern enum demangling_styles
#define GNU_V3_DEMANGLING (((int) CURRENT_DEMANGLING_STYLE) & DMGL_GNU_V3)
#define JAVA_DEMANGLING (((int) CURRENT_DEMANGLING_STYLE) & DMGL_JAVA)
#define GNAT_DEMANGLING (((int) CURRENT_DEMANGLING_STYLE) & DMGL_GNAT)
+#define DLANG_DEMANGLING (((int) CURRENT_DEMANGLING_STYLE) & DMGL_DLANG)
/* Provide information about the available demangle styles. This code is
pulled from gdb into libiberty because it is useful to binutils also. */
@@ -140,10 +143,10 @@ cplus_mangle_opname (const char *opname, int options);
extern void
set_cplus_marker_for_demangling (int ch);
-extern enum demangling_styles
+extern enum demangling_styles
cplus_demangle_set_style (enum demangling_styles style);
-extern enum demangling_styles
+extern enum demangling_styles
cplus_demangle_name_to_style (const char *name);
/* Callback typedef for allocation-less demangler interfaces. */
@@ -169,10 +172,17 @@ java_demangle_v3 (const char *mangled);
char *
ada_demangle (const char *mangled, int options);
+extern char *
+dlang_demangle (const char *mangled, int options);
+
enum gnu_v3_ctor_kinds {
gnu_v3_complete_object_ctor = 1,
gnu_v3_base_object_ctor,
gnu_v3_complete_object_allocating_ctor,
+ /* These are not part of the V3 ABI. Unified constructors are generated
+ as a speed-for-space optimization when the -fdeclone-ctor-dtor option
+ is used, and are always internal symbols. */
+ gnu_v3_unified_ctor,
gnu_v3_object_ctor_group
};
@@ -188,6 +198,10 @@ enum gnu_v3_dtor_kinds {
gnu_v3_deleting_dtor = 1,
gnu_v3_complete_object_dtor,
gnu_v3_base_object_dtor,
+ /* These are not part of the V3 ABI. Unified destructors are generated
+ as a speed-for-space optimization when the -fdeclone-ctor-dtor option
+ is used, and are always internal symbols. */
+ gnu_v3_unified_dtor,
gnu_v3_object_dtor_group
};
@@ -365,6 +379,10 @@ enum demangle_component_type
/* A typecast, represented as a unary operator. The one subtree is
the type to which the argument should be cast. */
DEMANGLE_COMPONENT_CAST,
+ /* A conversion operator, represented as a unary operator. The one
+ subtree is the type to which the argument should be converted
+ to. */
+ DEMANGLE_COMPONENT_CONVERSION,
/* A nullary expression. The left subtree is the operator. */
DEMANGLE_COMPONENT_NULLARY,
/* A unary expression. The left subtree is the operator, and the
@@ -428,6 +446,8 @@ enum demangle_component_type
DEMANGLE_COMPONENT_PACK_EXPANSION,
/* A name with an ABI tag. */
DEMANGLE_COMPONENT_TAGGED_NAME,
+ /* A transaction-safe function type. */
+ DEMANGLE_COMPONENT_TRANSACTION_SAFE,
/* A cloned function. */
DEMANGLE_COMPONENT_CLONE
};
diff --git a/include/dwarf2.def b/include/dwarf2.def
index 71a37b30c..2dfee5666 100644
--- a/include/dwarf2.def
+++ b/include/dwarf2.def
@@ -1,9 +1,7 @@
/* -*- c -*-
Declarations and definitions of codes relating to the DWARF2 and
DWARF3 symbolic debugging information formats.
- Copyright (C) 1992, 1993, 1995, 1996, 1997, 1999, 2000, 2001, 2002,
- 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012
- Free Software Foundation, Inc.
+ Copyright (C) 1992-2015 Free Software Foundation, Inc.
Written by Gary Funck (gary@intrepid.com) The Ada Joint Program
Office (AJPO), Florida State University and Silicon Graphics Inc.
@@ -133,6 +131,8 @@ DW_TAG (DW_TAG_shared_type, 0x40)
DW_TAG (DW_TAG_type_unit, 0x41)
DW_TAG (DW_TAG_rvalue_reference_type, 0x42)
DW_TAG (DW_TAG_template_alias, 0x43)
+/* DWARF 5. */
+DW_TAG (DW_TAG_atomic_type, 0x47)
DW_TAG_DUP (DW_TAG_lo_user, 0x4080)
DW_TAG_DUP (DW_TAG_hi_user, 0xffff)
@@ -308,6 +308,8 @@ DW_AT (DW_AT_data_bit_offset, 0x6b)
DW_AT (DW_AT_const_expr, 0x6c)
DW_AT (DW_AT_enum_class, 0x6d)
DW_AT (DW_AT_linkage_name, 0x6e)
+/* DWARF 5. */
+DW_AT (DW_AT_noreturn, 0x87)
DW_AT_DUP (DW_AT_lo_user, 0x2000) /* Implementation-defined range start. */
DW_AT_DUP (DW_AT_hi_user, 0x3fff) /* Implementation-defined range end. */
@@ -383,6 +385,8 @@ DW_AT (DW_AT_GNU_all_call_sites, 0x2117)
DW_AT (DW_AT_GNU_all_source_call_sites, 0x2118)
/* Section offset into .debug_macro section. */
DW_AT (DW_AT_GNU_macros, 0x2119)
+/* Attribute for C++ deleted special member functions (= delete;). */
+DW_AT (DW_AT_GNU_deleted, 0x211a)
/* Extensions for Fission. See http://gcc.gnu.org/wiki/DebugFission. */
DW_AT (DW_AT_GNU_dwo_name, 0x2130)
DW_AT (DW_AT_GNU_dwo_id, 0x2131)
@@ -400,12 +404,33 @@ DW_AT (DW_AT_VMS_rtnbeg_pd_address, 0x2201)
See http://gcc.gnu.org/wiki/DW_AT_GNAT_descriptive_type . */
DW_AT (DW_AT_use_GNAT_descriptive_type, 0x2301)
DW_AT (DW_AT_GNAT_descriptive_type, 0x2302)
+/* Rational constant extension.
+ See https://gcc.gnu.org/wiki/DW_AT_GNU_numerator_denominator . */
+DW_TAG (DW_AT_GNU_numerator, 0x2303)
+DW_TAG (DW_AT_GNU_denominator, 0x2304)
+/* Biased integer extension.
+ See https://gcc.gnu.org/wiki/DW_AT_GNU_bias . */
+DW_TAG (DW_AT_GNU_bias, 0x2305)
/* UPC extension. */
DW_AT (DW_AT_upc_threads_scaled, 0x3210)
/* PGI (STMicroelectronics) extensions. */
DW_AT (DW_AT_PGI_lbase, 0x3a00)
DW_AT (DW_AT_PGI_soffset, 0x3a01)
DW_AT (DW_AT_PGI_lstride, 0x3a02)
+/* Apple extensions. */
+DW_AT (DW_AT_APPLE_optimized, 0x3fe1)
+DW_AT (DW_AT_APPLE_flags, 0x3fe2)
+DW_AT (DW_AT_APPLE_isa, 0x3fe3)
+DW_AT (DW_AT_APPLE_block, 0x3fe4)
+DW_AT (DW_AT_APPLE_major_runtime_vers, 0x3fe5)
+DW_AT (DW_AT_APPLE_runtime_class, 0x3fe6)
+DW_AT (DW_AT_APPLE_omit_frame_ptr, 0x3fe7)
+DW_AT (DW_AT_APPLE_property_name, 0x3fe8)
+DW_AT (DW_AT_APPLE_property_getter, 0x3fe9)
+DW_AT (DW_AT_APPLE_property_setter, 0x3fea)
+DW_AT (DW_AT_APPLE_property_attribute, 0x3feb)
+DW_AT (DW_AT_APPLE_objc_complete_type, 0x3fec)
+DW_AT (DW_AT_APPLE_property, 0x3fed)
DW_END_AT
DW_FIRST_OP (DW_OP_addr, 0x03)
diff --git a/include/dwarf2.h b/include/dwarf2.h
index 120e2c16b..4ada87162 100644
--- a/include/dwarf2.h
+++ b/include/dwarf2.h
@@ -1,8 +1,6 @@
/* Declarations and definitions of codes relating to the DWARF2 and
DWARF3 symbolic debugging information formats.
- Copyright (C) 1992, 1993, 1995, 1996, 1997, 1999, 2000, 2001, 2002,
- 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012
- Free Software Foundation, Inc.
+ Copyright (C) 1992-2015 Free Software Foundation, Inc.
Written by Gary Funck (gary@intrepid.com) The Ada Joint Program
Office (AJPO), Florida State University and Silicon Graphics Inc.
@@ -309,6 +307,12 @@ enum dwarf_source_language
/* DWARF 5. */
DW_LANG_Go = 0x0016,
+ DW_LANG_C_plus_plus_11 = 0x001a, /* dwarf5.20141029.pdf DRAFT */
+ DW_LANG_C11 = 0x001d,
+ DW_LANG_C_plus_plus_14 = 0x0021,
+ DW_LANG_Fortran03 = 0x0022,
+ DW_LANG_Fortran08 = 0x0023,
+
DW_LANG_lo_user = 0x8000, /* Implementation-defined range start. */
DW_LANG_hi_user = 0xffff, /* Implementation-defined range start. */
diff --git a/include/dyn-string.h b/include/dyn-string.h
index 2b147271e..7c3684b7c 100644
--- a/include/dyn-string.h
+++ b/include/dyn-string.h
@@ -1,6 +1,5 @@
/* An abstract string datatype.
- Copyright (C) 1998, 1999, 2000, 2002, 2004, 2005, 2009
- Free Software Foundation, Inc.
+ Copyright (C) 1998-2015 Free Software Foundation, Inc.
Contributed by Mark Mitchell (mark@markmitchell.com).
This file is part of GCC.
diff --git a/include/elf/ChangeLog b/include/elf/ChangeLog
index 2b6948252..c2577e889 100644
--- a/include/elf/ChangeLog
+++ b/include/elf/ChangeLog
@@ -1,3 +1,12 @@
+2013-10-14 Chao-ying Fu <Chao-ying.Fu@imgtec.com>
+
+ * mips.h (enum): Add Tag_GNU_MIPS_ABI_MSA.
+ (enum): Add Val_GNU_MIPS_ABI_MSA_ANY and Val_GNU_MIPS_ABI_MSA_128.
+
+2013-09-17 Doug Gilmore <Doug.Gilmore@imgtec.com>
+
+ * mips.h (EF_MIPS_FP64): New e_flags bit.
+
2013-08-09 Nick Clifton <nickc@redhat.com>
* rl78.c (E_FLAG_RL78_G10): Define.
diff --git a/include/elf/mips.h b/include/elf/mips.h
index d25e773f1..2c5a9a621 100644
--- a/include/elf/mips.h
+++ b/include/elf/mips.h
@@ -191,6 +191,9 @@ END_RELOC_NUMBERS (R_MIPS_maxext)
(regs are 32-bits wide). */
#define EF_MIPS_32BITMODE 0x00000100
+/* 32-bit machine but FP registers are 64 bit (-mfp64). */
+#define EF_MIPS_FP64 0x00000200
+
/* Code in file uses the IEEE 754-2008 NaN encoding convention. */
#define EF_MIPS_NAN2008 0x00000400
@@ -1132,6 +1135,9 @@ enum
/* Floating-point ABI used by this object file. */
Tag_GNU_MIPS_ABI_FP = 4,
+
+ /* MSA ABI used by this object file. */
+ Tag_GNU_MIPS_ABI_MSA = 8,
};
/* Object attribute values. */
@@ -1153,6 +1159,14 @@ enum
/* Using -mips32r2 -mfp64. */
Val_GNU_MIPS_ABI_FP_64 = 4,
+
+ /* Values defined for Tag_GNU_MIPS_ABI_MSA. */
+
+ /* Not tagged or not using any ABIs affected by the differences. */
+ Val_GNU_MIPS_ABI_MSA_ANY = 0,
+
+ /* Using 128-bit MSA. */
+ Val_GNU_MIPS_ABI_MSA_128 = 1,
};
#endif /* _ELF_MIPS_H */
diff --git a/include/elf/rx.h b/include/elf/rx.h
index 83980853e..c17128c48 100644
--- a/include/elf/rx.h
+++ b/include/elf/rx.h
@@ -120,6 +120,11 @@ END_RELOC_NUMBERS (R_RX_max)
#define E_FLAG_RX_PID (1 << 2) /* Unofficial - DJ */
#define E_FLAG_RX_ABI (1 << 3) /* Binary passes stacked arguments using natural alignment. Unofficial - NC. */
+#define E_FLAG_RX_SINSNS_SET (1 << 6) /* Set if bit-5 is significant. */
+#define E_FLAG_RX_SINSNS_YES (1 << 7) /* Set if string instructions are used in the binary. */
+#define E_FLAG_RX_SINSNS_NO 0 /* Bit-5 if this binary must not be linked with a string instruction using binary. */
+#define E_FLAG_RX_SINSNS_MASK (3 << 6) /* Mask of bits used to determine string instruction use. */
+
/* These define the addend field of R_RX_RH_RELAX relocations. */
#define RX_RELAXA_IMM6 0x00000010 /* Imm8/16/24/32 at bit offset 6. */
#define RX_RELAXA_IMM12 0x00000020 /* Imm8/16/24/32 at bit offset 12. */
diff --git a/include/environ.h b/include/environ.h
new file mode 100644
index 000000000..c18902ba5
--- /dev/null
+++ b/include/environ.h
@@ -0,0 +1,33 @@
+/* Declare the environ system variable.
+ Copyright (C) 2015 Free Software Foundation, Inc.
+
+This file is part of the libiberty library.
+Libiberty is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public
+License as published by the Free Software Foundation; either
+version 2 of the License, or (at your option) any later version.
+
+Libiberty is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with libiberty; see the file COPYING.LIB. If not,
+write to the Free Software Foundation, Inc., 51 Franklin Street - Fifth Floor,
+Boston, MA 02110-1301, USA. */
+
+/* On OSX, the environ variable can be used directly in the code of an
+ executable, but cannot be used in the code of a shared library (such as
+ GCC's liblto_plugin, which links in libiberty code). Instead, the
+ function _NSGetEnviron can be called to get the address of environ. */
+
+#ifndef HAVE_ENVIRON_DECL
+# ifdef __APPLE__
+# include <crt_externs.h>
+# define environ (*_NSGetEnviron ())
+# else
+extern char **environ;
+# endif
+# define HAVE_ENVIRON_DECL
+#endif
diff --git a/include/fibheap.h b/include/fibheap.h
index a3d09dd9d..85b10c58b 100644
--- a/include/fibheap.h
+++ b/include/fibheap.h
@@ -1,6 +1,5 @@
/* A Fibonacci heap datatype.
- Copyright 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2009
- Free Software Foundation, Inc.
+ Copyright (C) 1998-2015 Free Software Foundation, Inc.
Contributed by Daniel Berlin (dan@cgsoftware.com).
This file is part of GCC.
diff --git a/include/filenames.h b/include/filenames.h
index e799a51b6..1161daaa4 100644
--- a/include/filenames.h
+++ b/include/filenames.h
@@ -5,7 +5,7 @@
use forward- and back-slash in path names interchangeably, and
some of them have case-insensitive file names.
- Copyright 2000, 2001, 2007, 2010 Free Software Foundation, Inc.
+ Copyright (C) 2000-2015 Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
@@ -90,6 +90,8 @@ extern hashval_t filename_hash (const void *s);
extern int filename_eq (const void *s1, const void *s2);
+extern int canonical_filename_eq (const char *a, const char *b);
+
#ifdef __cplusplus
}
#endif
diff --git a/include/floatformat.h b/include/floatformat.h
index 04db61a26..af4d09cb8 100644
--- a/include/floatformat.h
+++ b/include/floatformat.h
@@ -1,6 +1,5 @@
/* IEEE floating point support declarations, for GDB, the GNU Debugger.
- Copyright 1991, 1994, 1995, 1997, 2000, 2003, 2005, 2010
- Free Software Foundation, Inc.
+ Copyright (C) 1991-2015 Free Software Foundation, Inc.
This file is part of GDB.
@@ -23,6 +22,10 @@ Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
#include "ansidecl.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/* A floatformat consists of a sign bit, an exponent and a mantissa. Once the
bytes are concatenated according to the byteorder flag, then each of those
fields is contiguous. We number the bits with 0 being the most significant
@@ -149,4 +152,8 @@ floatformat_from_double (const struct floatformat *, const double *, void *);
extern int
floatformat_is_valid (const struct floatformat *fmt, const void *from);
+#ifdef __cplusplus
+}
+#endif
+
#endif /* defined (FLOATFORMAT_H) */
diff --git a/include/fnmatch.h b/include/fnmatch.h
index 5b9953ca3..0789fc146 100644
--- a/include/fnmatch.h
+++ b/include/fnmatch.h
@@ -1,4 +1,4 @@
-/* Copyright 1991, 1992, 1993, 1996 Free Software Foundation, Inc.
+/* Copyright (C) 1991-2015 Free Software Foundation, Inc.
NOTE: The canonical source of this file is maintained with the GNU C Library.
Bugs can be reported to bug-glibc@prep.ai.mit.edu.
diff --git a/include/gcc-c-fe.def b/include/gcc-c-fe.def
new file mode 100644
index 000000000..25ace1c85
--- /dev/null
+++ b/include/gcc-c-fe.def
@@ -0,0 +1,197 @@
+/* Interface between GCC C FE and GDB -*- c -*-
+
+ Copyright (C) 2014-2015 Free Software Foundation, Inc.
+
+ This file is part of GCC.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+
+
+/* Create a new "decl" in GCC. A decl is a declaration, basically a
+ kind of symbol.
+
+ NAME is the name of the new symbol. SYM_KIND is the kind of
+ symbol being requested. SYM_TYPE is the new symbol's C type;
+ except for labels, where this is not meaningful and should be
+ zero. If SUBSTITUTION_NAME is not NULL, then a reference to this
+ decl in the source will later be substituted with a dereference
+ of a variable of the given name. Otherwise, for symbols having
+ an address (e.g., functions), ADDRESS is the address. FILENAME
+ and LINE_NUMBER refer to the symbol's source location. If this
+ is not known, FILENAME can be NULL and LINE_NUMBER can be 0.
+ This function returns the new decl. */
+
+GCC_METHOD7 (gcc_decl, build_decl,
+ const char *, /* Argument NAME. */
+ enum gcc_c_symbol_kind, /* Argument SYM_KIND. */
+ gcc_type, /* Argument SYM_TYPE. */
+ const char *, /* Argument SUBSTITUTION_NAME. */
+ gcc_address, /* Argument ADDRESS. */
+ const char *, /* Argument FILENAME. */
+ unsigned int) /* Argument LINE_NUMBER. */
+
+/* Insert a GCC decl into the symbol table. DECL is the decl to
+ insert. IS_GLOBAL is true if this is an outermost binding, and
+ false if it is a possibly-shadowing binding. */
+
+GCC_METHOD2 (int /* bool */, bind,
+ gcc_decl, /* Argument DECL. */
+ int /* bool */) /* Argument IS_GLOBAL. */
+
+/* Insert a tagged type into the symbol table. NAME is the tag name
+ of the type and TAGGED_TYPE is the type itself. TAGGED_TYPE must
+ be either a struct, union, or enum type, as these are the only
+ types that have tags. FILENAME and LINE_NUMBER refer to the type's
+ source location. If this is not known, FILENAME can be NULL and
+ LINE_NUMBER can be 0. */
+
+GCC_METHOD4 (int /* bool */, tagbind,
+ const char *, /* Argument NAME. */
+ gcc_type, /* Argument TAGGED_TYPE. */
+ const char *, /* Argument FILENAME. */
+ unsigned int) /* Argument LINE_NUMBER. */
+
+/* Return the type of a pointer to a given base type. */
+
+GCC_METHOD1 (gcc_type, build_pointer_type,
+ gcc_type) /* Argument BASE_TYPE. */
+
+/* Create a new 'struct' type. Initially it has no fields. */
+
+GCC_METHOD0 (gcc_type, build_record_type)
+
+/* Create a new 'union' type. Initially it has no fields. */
+
+GCC_METHOD0 (gcc_type, build_union_type)
+
+/* Add a field to a struct or union type. FIELD_NAME is the field's
+ name. FIELD_TYPE is the type of the field. BITSIZE and BITPOS
+ indicate where in the struct the field occurs. */
+
+GCC_METHOD5 (int /* bool */, build_add_field,
+ gcc_type, /* Argument RECORD_OR_UNION_TYPE. */
+ const char *, /* Argument FIELD_NAME. */
+ gcc_type, /* Argument FIELD_TYPE. */
+ unsigned long, /* Argument BITSIZE. */
+ unsigned long) /* Argument BITPOS. */
+
+/* After all the fields have been added to a struct or union, the
+ struct or union type must be "finished". This does some final
+ cleanups in GCC. */
+
+GCC_METHOD2 (int /* bool */, finish_record_or_union,
+ gcc_type, /* Argument RECORD_OR_UNION_TYPE. */
+ unsigned long) /* Argument SIZE_IN_BYTES. */
+
+/* Create a new 'enum' type. The new type initially has no
+ associated constants. */
+
+GCC_METHOD1 (gcc_type, build_enum_type,
+ gcc_type) /* Argument UNDERLYING_INT_TYPE. */
+
+/* Add a new constant to an enum type. NAME is the constant's
+ name and VALUE is its value. */
+
+GCC_METHOD3 (int /* bool */, build_add_enum_constant,
+ gcc_type, /* Argument ENUM_TYPE. */
+ const char *, /* Argument NAME. */
+ unsigned long) /* Argument VALUE. */
+
+/* After all the constants have been added to an enum, the type must
+ be "finished". This does some final cleanups in GCC. */
+
+GCC_METHOD1 (int /* bool */, finish_enum_type,
+ gcc_type) /* Argument ENUM_TYPE. */
+
+/* Create a new function type. RETURN_TYPE is the type returned by
+ the function, and ARGUMENT_TYPES is a vector, of length NARGS, of
+ the argument types. IS_VARARGS is true if the function is
+ varargs. */
+
+GCC_METHOD3 (gcc_type, build_function_type,
+ gcc_type, /* Argument RETURN_TYPE. */
+ const struct gcc_type_array *, /* Argument ARGUMENT_TYPES. */
+ int /* bool */) /* Argument IS_VARARGS. */
+
+/* Return an integer type with the given properties. */
+
+GCC_METHOD2 (gcc_type, int_type,
+ int /* bool */, /* Argument IS_UNSIGNED. */
+ unsigned long) /* Argument SIZE_IN_BYTES. */
+
+/* Return a floating point type with the given properties. */
+
+GCC_METHOD1 (gcc_type, float_type,
+ unsigned long) /* Argument SIZE_IN_BYTES. */
+
+/* Return the 'void' type. */
+
+GCC_METHOD0 (gcc_type, void_type)
+
+/* Return the 'bool' type. */
+
+GCC_METHOD0 (gcc_type, bool_type)
+
+/* Create a new array type. If NUM_ELEMENTS is -1, then the array
+ is assumed to have an unknown length. */
+
+GCC_METHOD2 (gcc_type, build_array_type,
+ gcc_type, /* Argument ELEMENT_TYPE. */
+ int) /* Argument NUM_ELEMENTS. */
+
+/* Create a new variably-sized array type. UPPER_BOUND_NAME is the
+ name of a local variable that holds the upper bound of the array;
+ it is one less than the array size. */
+
+GCC_METHOD2 (gcc_type, build_vla_array_type,
+ gcc_type, /* Argument ELEMENT_TYPE. */
+ const char *) /* Argument UPPER_BOUND_NAME. */
+
+/* Return a qualified variant of a given base type. QUALIFIERS says
+ which qualifiers to use; it is composed of or'd together
+ constants from 'enum gcc_qualifiers'. */
+
+GCC_METHOD2 (gcc_type, build_qualified_type,
+ gcc_type, /* Argument UNQUALIFIED_TYPE. */
+ enum gcc_qualifiers) /* Argument QUALIFIERS. */
+
+/* Build a complex type given its element type. */
+
+GCC_METHOD1 (gcc_type, build_complex_type,
+ gcc_type) /* Argument ELEMENT_TYPE. */
+
+/* Build a vector type given its element type and number of
+ elements. */
+
+GCC_METHOD2 (gcc_type, build_vector_type,
+ gcc_type, /* Argument ELEMENT_TYPE. */
+ int) /* Argument NUM_ELEMENTS. */
+
+/* Build a constant. NAME is the constant's name and VALUE is its
+ value. FILENAME and LINE_NUMBER refer to the type's source
+ location. If this is not known, FILENAME can be NULL and
+ LINE_NUMBER can be 0. */
+
+GCC_METHOD5 (int /* bool */, build_constant,
+ gcc_type, /* Argument TYPE. */
+ const char *, /* Argument NAME. */
+ unsigned long, /* Argument VALUE. */
+ const char *, /* Argument FILENAME. */
+ unsigned int) /* Argument LINE_NUMBER. */
+
+/* Emit an error and return an error type object. */
+
+GCC_METHOD1 (gcc_type, error,
+ const char *) /* Argument MESSAGE. */
diff --git a/include/gcc-c-interface.h b/include/gcc-c-interface.h
new file mode 100644
index 000000000..95d0fc94e
--- /dev/null
+++ b/include/gcc-c-interface.h
@@ -0,0 +1,220 @@
+/* Interface between GCC C FE and GDB
+
+ Copyright (C) 2014-2015 Free Software Foundation, Inc.
+
+ This file is part of GCC.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#ifndef GCC_C_INTERFACE_H
+#define GCC_C_INTERFACE_H
+
+#include "gcc-interface.h"
+
+/* This header defines the interface to the GCC API. It must be both
+ valid C and valid C++, because it is included by both programs. */
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/* Forward declaration. */
+
+struct gcc_c_context;
+
+/*
+ * Definitions and declarations for the C front end.
+ */
+
+/* Defined versions of the C front-end API. */
+
+enum gcc_c_api_version
+{
+ GCC_C_FE_VERSION_0 = 0
+};
+
+/* Qualifiers. */
+
+enum gcc_qualifiers
+{
+ GCC_QUALIFIER_CONST = 1,
+ GCC_QUALIFIER_VOLATILE = 2,
+ GCC_QUALIFIER_RESTRICT = 4
+};
+
+/* This enumerates the kinds of decls that GDB can create. */
+
+enum gcc_c_symbol_kind
+{
+ /* A function. */
+
+ GCC_C_SYMBOL_FUNCTION,
+
+ /* A variable. */
+
+ GCC_C_SYMBOL_VARIABLE,
+
+ /* A typedef. */
+
+ GCC_C_SYMBOL_TYPEDEF,
+
+ /* A label. */
+
+ GCC_C_SYMBOL_LABEL
+};
+
+/* This enumerates the types of symbols that GCC might request from
+ GDB. */
+
+enum gcc_c_oracle_request
+{
+ /* An ordinary symbol -- a variable, function, typedef, or enum
+ constant. */
+
+ GCC_C_ORACLE_SYMBOL,
+
+ /* A struct, union, or enum tag. */
+
+ GCC_C_ORACLE_TAG,
+
+ /* A label. */
+
+ GCC_C_ORACLE_LABEL
+};
+
+/* The type of the function called by GCC to ask GDB for a symbol's
+ definition. DATUM is an arbitrary value supplied when the oracle
+ function is registered. CONTEXT is the GCC context in which the
+ request is being made. REQUEST specifies what sort of symbol is
+ being requested, and IDENTIFIER is the name of the symbol. */
+
+typedef void gcc_c_oracle_function (void *datum,
+ struct gcc_c_context *context,
+ enum gcc_c_oracle_request request,
+ const char *identifier);
+
+/* The type of the function called by GCC to ask GDB for a symbol's
+ address. This should return 0 if the address is not known. */
+
+typedef gcc_address gcc_c_symbol_address_function (void *datum,
+ struct gcc_c_context *ctxt,
+ const char *identifier);
+
+/* An array of types used for creating a function type. */
+
+struct gcc_type_array
+{
+ /* Number of elements. */
+
+ int n_elements;
+
+ /* The elements. */
+
+ gcc_type *elements;
+};
+
+/* The vtable used by the C front end. */
+
+struct gcc_c_fe_vtable
+{
+ /* The version of the C interface. The value is one of the
+ gcc_c_api_version constants. */
+
+ unsigned int c_version;
+
+ /* Set the callbacks for this context.
+
+ The binding oracle is called whenever the C parser needs to look
+ up a symbol. This gives the caller a chance to lazily
+ instantiate symbols using other parts of the gcc_c_fe_interface
+ API.
+
+ The address oracle is called whenever the C parser needs to look
+ up a symbol. This is only called for symbols not provided by the
+ symbol oracle -- that is, just built-in functions where GCC
+ provides the declaration.
+
+ DATUM is an arbitrary piece of data that is passed back verbatim
+ to the callbakcs in requests. */
+
+ void (*set_callbacks) (struct gcc_c_context *self,
+ gcc_c_oracle_function *binding_oracle,
+ gcc_c_symbol_address_function *address_oracle,
+ void *datum);
+
+#define GCC_METHOD0(R, N) \
+ R (*N) (struct gcc_c_context *);
+#define GCC_METHOD1(R, N, A) \
+ R (*N) (struct gcc_c_context *, A);
+#define GCC_METHOD2(R, N, A, B) \
+ R (*N) (struct gcc_c_context *, A, B);
+#define GCC_METHOD3(R, N, A, B, C) \
+ R (*N) (struct gcc_c_context *, A, B, C);
+#define GCC_METHOD4(R, N, A, B, C, D) \
+ R (*N) (struct gcc_c_context *, A, B, C, D);
+#define GCC_METHOD5(R, N, A, B, C, D, E) \
+ R (*N) (struct gcc_c_context *, A, B, C, D, E);
+#define GCC_METHOD7(R, N, A, B, C, D, E, F, G) \
+ R (*N) (struct gcc_c_context *, A, B, C, D, E, F, G);
+
+#include "gcc-c-fe.def"
+
+#undef GCC_METHOD0
+#undef GCC_METHOD1
+#undef GCC_METHOD2
+#undef GCC_METHOD3
+#undef GCC_METHOD4
+#undef GCC_METHOD5
+#undef GCC_METHOD7
+
+};
+
+/* The C front end object. */
+
+struct gcc_c_context
+{
+ /* Base class. */
+
+ struct gcc_base_context base;
+
+ /* Our vtable. This is a separate field because this is simpler
+ than implementing a vtable inheritance scheme in C. */
+
+ const struct gcc_c_fe_vtable *c_ops;
+};
+
+/* The name of the .so that the compiler builds. We dlopen this
+ later. */
+
+#define GCC_C_FE_LIBCC libcc1.so
+
+/* The compiler exports a single initialization function. This macro
+ holds its name as a symbol. */
+
+#define GCC_C_FE_CONTEXT gcc_c_fe_context
+
+/* The type of the initialization function. The caller passes in the
+ desired base version and desired C-specific version. If the
+ request can be satisfied, a compatible gcc_context object will be
+ returned. Otherwise, the function returns NULL. */
+
+typedef struct gcc_c_context *gcc_c_fe_context_function
+ (enum gcc_base_api_version,
+ enum gcc_c_api_version);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* GCC_C_INTERFACE_H */
diff --git a/include/gcc-interface.h b/include/gcc-interface.h
new file mode 100644
index 000000000..df7db6ec1
--- /dev/null
+++ b/include/gcc-interface.h
@@ -0,0 +1,127 @@
+/* Generic interface between GCC and GDB
+
+ Copyright (C) 2014-2015 Free Software Foundation, Inc.
+
+ This file is part of GCC.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#ifndef GCC_INTERFACE_H
+#define GCC_INTERFACE_H
+
+/* This header defines the interface to the GCC API. It must be both
+ valid C and valid C++, because it is included by both programs. */
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/* Opaque typedefs for objects passed through the interface. */
+
+typedef unsigned long long gcc_type;
+typedef unsigned long long gcc_decl;
+
+/* An address in the inferior. */
+
+typedef unsigned long long gcc_address;
+
+/* Forward declaration. */
+
+struct gcc_base_context;
+
+/* Defined versions of the generic API. */
+
+enum gcc_base_api_version
+{
+ GCC_FE_VERSION_0 = 0
+};
+
+/* The operations defined by the GCC base API. This is the vtable for
+ the real context structure which is passed around.
+
+ The "base" API is concerned with basics shared by all compiler
+ front ends: setting command-line arguments, the file names, etc.
+
+ Front-end-specific interfaces inherit from this one. */
+
+struct gcc_base_vtable
+{
+ /* The actual version implemented in this interface. This field can
+ be relied on not to move, so users can always check it if they
+ desire. The value is one of the gcc_base_api_version constants.
+ */
+
+ unsigned int version;
+
+ /* Set the compiler's command-line options for the next compilation.
+ TRIPLET_REGEXP is a regular expression that is used to match the
+ configury triplet prefix to the compiler.
+ The arguments are copied by GCC. ARGV need not be
+ NULL-terminated. The arguments must be set separately for each
+ compilation; that is, after a compile is requested, the
+ previously-set arguments cannot be reused.
+
+ This returns NULL on success. On failure, returns a malloc()d
+ error message. The caller is responsible for freeing it. */
+
+ char *(*set_arguments) (struct gcc_base_context *self,
+ const char *triplet_regexp,
+ int argc, char **argv);
+
+ /* Set the file name of the program to compile. The string is
+ copied by the method implementation, but the caller must
+ guarantee that the file exists through the compilation. */
+
+ void (*set_source_file) (struct gcc_base_context *self, const char *file);
+
+ /* Set a callback to use for printing error messages. DATUM is
+ passed through to the callback unchanged. */
+
+ void (*set_print_callback) (struct gcc_base_context *self,
+ void (*print_function) (void *datum,
+ const char *message),
+ void *datum);
+
+ /* Perform the compilation. FILENAME is the name of the resulting
+ object file. VERBOSE can be set to cause GCC to print some
+ information as it works. Returns true on success, false on
+ error. */
+
+ int /* bool */ (*compile) (struct gcc_base_context *self,
+ const char *filename,
+ int /* bool */ verbose);
+
+ /* Destroy this object. */
+
+ void (*destroy) (struct gcc_base_context *self);
+};
+
+/* The GCC object. */
+
+struct gcc_base_context
+{
+ /* The virtual table. */
+
+ const struct gcc_base_vtable *ops;
+};
+
+/* The name of the dummy wrapper function generated by gdb. */
+
+#define GCC_FE_WRAPPER_FUNCTION "_gdb_expr"
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* GCC_INTERFACE_H */
diff --git a/include/gdb/gdb-index.h b/include/gdb/gdb-index.h
index c197c9d37..4e3d0a754 100644
--- a/include/gdb/gdb-index.h
+++ b/include/gdb/gdb-index.h
@@ -1,5 +1,5 @@
/* Public attributes of the .gdb_index section.
- Copyright 2012-2013 Free Software Foundation, Inc.
+ Copyright (C) 2012-2015 Free Software Foundation, Inc.
This file is part of GDB.
@@ -68,7 +68,7 @@ typedef enum {
Give the unused bits a value so gdb will print them sensibly. */
GDB_INDEX_SYMBOL_KIND_UNUSED5 = 5,
GDB_INDEX_SYMBOL_KIND_UNUSED6 = 6,
- GDB_INDEX_SYMBOL_KIND_UNUSED7 = 7,
+ GDB_INDEX_SYMBOL_KIND_UNUSED7 = 7
} gdb_index_symbol_kind;
#define GDB_INDEX_SYMBOL_KIND_SHIFT 28
diff --git a/include/getopt.h b/include/getopt.h
index 5421cabed..6f496b113 100644
--- a/include/getopt.h
+++ b/include/getopt.h
@@ -1,6 +1,5 @@
/* Declarations for getopt.
- Copyright 1989, 1990, 1991, 1992, 1993, 1994, 1996, 1997, 1998, 2000,
- 2002 Free Software Foundation, Inc.
+ Copyright (C) 1989-2015 Free Software Foundation, Inc.
NOTE: The canonical source of this file is maintained with the GNU C Library.
Bugs can be reported to bug-glibc@gnu.org.
diff --git a/include/gomp-constants.h b/include/gomp-constants.h
new file mode 100644
index 000000000..e31c2e003
--- /dev/null
+++ b/include/gomp-constants.h
@@ -0,0 +1,257 @@
+/* Communication between GCC and libgomp.
+
+ Copyright (C) 2014-2015 Free Software Foundation, Inc.
+
+ Contributed by Mentor Embedded.
+
+ This file is part of the GNU Offloading and Multi Processing Library
+ (libgomp).
+
+ Libgomp is free software; you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3, or (at your option)
+ any later version.
+
+ Libgomp is distributed in the hope that it will be useful, but WITHOUT ANY
+ WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+ FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ more details.
+
+ Under Section 7 of GPL version 3, you are granted additional
+ permissions described in the GCC Runtime Library Exception, version
+ 3.1, as published by the Free Software Foundation.
+
+ You should have received a copy of the GNU General Public License and
+ a copy of the GCC Runtime Library Exception along with this program;
+ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+ <http://www.gnu.org/licenses/>. */
+
+#ifndef GOMP_CONSTANTS_H
+#define GOMP_CONSTANTS_H 1
+
+/* Memory mapping types. */
+
+/* One byte. */
+#define GOMP_MAP_LAST (1 << 8)
+
+#define GOMP_MAP_FLAG_TO (1 << 0)
+#define GOMP_MAP_FLAG_FROM (1 << 1)
+/* Special map kinds, enumerated starting here. */
+#define GOMP_MAP_FLAG_SPECIAL_0 (1 << 2)
+#define GOMP_MAP_FLAG_SPECIAL_1 (1 << 3)
+#define GOMP_MAP_FLAG_SPECIAL_2 (1 << 4)
+#define GOMP_MAP_FLAG_SPECIAL (GOMP_MAP_FLAG_SPECIAL_1 \
+ | GOMP_MAP_FLAG_SPECIAL_0)
+/* Flag to force a specific behavior (or else, trigger a run-time error). */
+#define GOMP_MAP_FLAG_FORCE (1 << 7)
+
+enum gomp_map_kind
+ {
+ /* If not already present, allocate. */
+ GOMP_MAP_ALLOC = 0,
+ /* ..., and copy to device. */
+ GOMP_MAP_TO = (GOMP_MAP_ALLOC | GOMP_MAP_FLAG_TO),
+ /* ..., and copy from device. */
+ GOMP_MAP_FROM = (GOMP_MAP_ALLOC | GOMP_MAP_FLAG_FROM),
+ /* ..., and copy to and from device. */
+ GOMP_MAP_TOFROM = (GOMP_MAP_TO | GOMP_MAP_FROM),
+ /* The following kind is an internal only map kind, used for pointer based
+ array sections. OMP_CLAUSE_SIZE for these is not the pointer size,
+ which is implicitly POINTER_SIZE_UNITS, but the bias. */
+ GOMP_MAP_POINTER = (GOMP_MAP_FLAG_SPECIAL_0 | 0),
+ /* Also internal, behaves like GOMP_MAP_TO, but additionally any
+ GOMP_MAP_POINTER records consecutive after it which have addresses
+ falling into that range will not be ignored if GOMP_MAP_TO_PSET wasn't
+ mapped already. */
+ GOMP_MAP_TO_PSET = (GOMP_MAP_FLAG_SPECIAL_0 | 1),
+ /* Must already be present. */
+ GOMP_MAP_FORCE_PRESENT = (GOMP_MAP_FLAG_SPECIAL_0 | 2),
+ /* Deallocate a mapping, without copying from device. */
+ GOMP_MAP_DELETE = (GOMP_MAP_FLAG_SPECIAL_0 | 3),
+ /* Is a device pointer. OMP_CLAUSE_SIZE for these is unused; is implicitly
+ POINTER_SIZE_UNITS. */
+ GOMP_MAP_FORCE_DEVICEPTR = (GOMP_MAP_FLAG_SPECIAL_1 | 0),
+ /* Do not map, copy bits for firstprivate instead. */
+ /* OpenACC device_resident. */
+ GOMP_MAP_DEVICE_RESIDENT = (GOMP_MAP_FLAG_SPECIAL_1 | 1),
+ /* OpenACC link. */
+ GOMP_MAP_LINK = (GOMP_MAP_FLAG_SPECIAL_1 | 2),
+ /* Allocate. */
+ GOMP_MAP_FIRSTPRIVATE = (GOMP_MAP_FLAG_SPECIAL | 0),
+ /* Similarly, but store the value in the pointer rather than
+ pointed by the pointer. */
+ GOMP_MAP_FIRSTPRIVATE_INT = (GOMP_MAP_FLAG_SPECIAL | 1),
+ /* Pointer translate host address into device address and copy that
+ back to host. */
+ GOMP_MAP_USE_DEVICE_PTR = (GOMP_MAP_FLAG_SPECIAL | 2),
+ /* Allocate a zero length array section. Prefer next non-zero length
+ mapping over previous non-zero length mapping over zero length mapping
+ at the address. If not already mapped, do nothing (and pointer translate
+ to NULL). */
+ GOMP_MAP_ZERO_LEN_ARRAY_SECTION = (GOMP_MAP_FLAG_SPECIAL | 3),
+ /* Allocate. */
+ GOMP_MAP_FORCE_ALLOC = (GOMP_MAP_FLAG_FORCE | GOMP_MAP_ALLOC),
+ /* ..., and copy to device. */
+ GOMP_MAP_FORCE_TO = (GOMP_MAP_FLAG_FORCE | GOMP_MAP_TO),
+ /* ..., and copy from device. */
+ GOMP_MAP_FORCE_FROM = (GOMP_MAP_FLAG_FORCE | GOMP_MAP_FROM),
+ /* ..., and copy to and from device. */
+ GOMP_MAP_FORCE_TOFROM = (GOMP_MAP_FLAG_FORCE | GOMP_MAP_TOFROM),
+ /* If not already present, allocate. And unconditionally copy to
+ device. */
+ GOMP_MAP_ALWAYS_TO = (GOMP_MAP_FLAG_SPECIAL_2 | GOMP_MAP_TO),
+ /* If not already present, allocate. And unconditionally copy from
+ device. */
+ GOMP_MAP_ALWAYS_FROM = (GOMP_MAP_FLAG_SPECIAL_2
+ | GOMP_MAP_FROM),
+ /* If not already present, allocate. And unconditionally copy to and from
+ device. */
+ GOMP_MAP_ALWAYS_TOFROM = (GOMP_MAP_FLAG_SPECIAL_2
+ | GOMP_MAP_TOFROM),
+ /* Map a sparse struct; the address is the base of the structure, alignment
+ it's required alignment, and size is the number of adjacent entries
+ that belong to the struct. The adjacent entries should be sorted by
+ increasing address, so it is easy to determine lowest needed address
+ (address of the first adjacent entry) and highest needed address
+ (address of the last adjacent entry plus its size). */
+ GOMP_MAP_STRUCT = (GOMP_MAP_FLAG_SPECIAL_2
+ | GOMP_MAP_FLAG_SPECIAL | 0),
+ /* On a location of a pointer/reference that is assumed to be already mapped
+ earlier, store the translated address of the preceeding mapping.
+ No refcount is bumped by this, and the store is done unconditionally. */
+ GOMP_MAP_ALWAYS_POINTER = (GOMP_MAP_FLAG_SPECIAL_2
+ | GOMP_MAP_FLAG_SPECIAL | 1),
+ /* Forced deallocation of zero length array section. */
+ GOMP_MAP_DELETE_ZERO_LEN_ARRAY_SECTION
+ = (GOMP_MAP_FLAG_SPECIAL_2
+ | GOMP_MAP_FLAG_SPECIAL | 3),
+ /* Decrement usage count and deallocate if zero. */
+ GOMP_MAP_RELEASE = (GOMP_MAP_FLAG_SPECIAL_2
+ | GOMP_MAP_DELETE),
+
+ /* Internal to GCC, not used in libgomp. */
+ /* Do not map, but pointer assign a pointer instead. */
+ GOMP_MAP_FIRSTPRIVATE_POINTER = (GOMP_MAP_LAST | 1),
+ /* Do not map, but pointer assign a reference instead. */
+ GOMP_MAP_FIRSTPRIVATE_REFERENCE = (GOMP_MAP_LAST | 2)
+ };
+
+#define GOMP_MAP_COPY_TO_P(X) \
+ (!((X) & GOMP_MAP_FLAG_SPECIAL) \
+ && ((X) & GOMP_MAP_FLAG_TO))
+
+#define GOMP_MAP_COPY_FROM_P(X) \
+ (!((X) & GOMP_MAP_FLAG_SPECIAL) \
+ && ((X) & GOMP_MAP_FLAG_FROM))
+
+#define GOMP_MAP_POINTER_P(X) \
+ ((X) == GOMP_MAP_POINTER)
+
+#define GOMP_MAP_ALWAYS_TO_P(X) \
+ (((X) == GOMP_MAP_ALWAYS_TO) || ((X) == GOMP_MAP_ALWAYS_TOFROM))
+
+#define GOMP_MAP_ALWAYS_FROM_P(X) \
+ (((X) == GOMP_MAP_ALWAYS_FROM) || ((X) == GOMP_MAP_ALWAYS_TOFROM))
+
+#define GOMP_MAP_ALWAYS_P(X) \
+ (GOMP_MAP_ALWAYS_TO_P (X) || ((X) == GOMP_MAP_ALWAYS_FROM))
+
+
+/* Asynchronous behavior. Keep in sync with
+ libgomp/{openacc.h,openacc.f90,openacc_lib.h}:acc_async_t. */
+
+#define GOMP_ASYNC_NOVAL -1
+#define GOMP_ASYNC_SYNC -2
+
+
+/* Device codes. Keep in sync with
+ libgomp/{openacc.h,openacc.f90,openacc_lib.h}:acc_device_t as well as
+ libgomp/libgomp-plugin.h. */
+#define GOMP_DEVICE_NONE 0
+#define GOMP_DEVICE_DEFAULT 1
+#define GOMP_DEVICE_HOST 2
+/* #define GOMP_DEVICE_HOST_NONSHM 3 removed. */
+#define GOMP_DEVICE_NOT_HOST 4
+#define GOMP_DEVICE_NVIDIA_PTX 5
+#define GOMP_DEVICE_INTEL_MIC 6
+#define GOMP_DEVICE_HSA 7
+
+#define GOMP_DEVICE_ICV -1
+#define GOMP_DEVICE_HOST_FALLBACK -2
+
+/* GOMP_task/GOMP_taskloop* flags argument. */
+#define GOMP_TASK_FLAG_UNTIED (1 << 0)
+#define GOMP_TASK_FLAG_FINAL (1 << 1)
+#define GOMP_TASK_FLAG_MERGEABLE (1 << 2)
+#define GOMP_TASK_FLAG_DEPEND (1 << 3)
+#define GOMP_TASK_FLAG_PRIORITY (1 << 4)
+#define GOMP_TASK_FLAG_UP (1 << 8)
+#define GOMP_TASK_FLAG_GRAINSIZE (1 << 9)
+#define GOMP_TASK_FLAG_IF (1 << 10)
+#define GOMP_TASK_FLAG_NOGROUP (1 << 11)
+
+/* GOMP_target{_ext,update_ext,enter_exit_data} flags argument. */
+#define GOMP_TARGET_FLAG_NOWAIT (1 << 0)
+#define GOMP_TARGET_FLAG_EXIT_DATA (1 << 1)
+/* Internal to libgomp. */
+#define GOMP_TARGET_FLAG_UPDATE (1U << 31)
+
+/* Versions of libgomp and device-specific plugins. */
+#define GOMP_VERSION 0
+#define GOMP_VERSION_NVIDIA_PTX 1
+#define GOMP_VERSION_INTEL_MIC 0
+#define GOMP_VERSION_HSA 0
+
+#define GOMP_VERSION_PACK(LIB, DEV) (((LIB) << 16) | (DEV))
+#define GOMP_VERSION_LIB(PACK) (((PACK) >> 16) & 0xffff)
+#define GOMP_VERSION_DEV(PACK) ((PACK) & 0xffff)
+
+#define GOMP_DIM_GANG 0
+#define GOMP_DIM_WORKER 1
+#define GOMP_DIM_VECTOR 2
+#define GOMP_DIM_MAX 3
+#define GOMP_DIM_MASK(X) (1u << (X))
+
+/* Varadic launch arguments. End of list is marked by a zero. */
+#define GOMP_LAUNCH_DIM 1 /* Launch dimensions, op = mask */
+#define GOMP_LAUNCH_ASYNC 2 /* Async, op = cst val if not MAX */
+#define GOMP_LAUNCH_WAIT 3 /* Waits, op = num waits. */
+#define GOMP_LAUNCH_CODE_SHIFT 28
+#define GOMP_LAUNCH_DEVICE_SHIFT 16
+#define GOMP_LAUNCH_OP_SHIFT 0
+#define GOMP_LAUNCH_PACK(CODE,DEVICE,OP) \
+ (((CODE) << GOMP_LAUNCH_CODE_SHIFT) \
+ | ((DEVICE) << GOMP_LAUNCH_DEVICE_SHIFT) \
+ | ((OP) << GOMP_LAUNCH_OP_SHIFT))
+#define GOMP_LAUNCH_CODE(X) (((X) >> GOMP_LAUNCH_CODE_SHIFT) & 0xf)
+#define GOMP_LAUNCH_DEVICE(X) (((X) >> GOMP_LAUNCH_DEVICE_SHIFT) & 0xfff)
+#define GOMP_LAUNCH_OP(X) (((X) >> GOMP_LAUNCH_OP_SHIFT) & 0xffff)
+#define GOMP_LAUNCH_OP_MAX 0xffff
+
+/* Bitmask to apply in order to find out the intended device of a target
+ argument. */
+#define GOMP_TARGET_ARG_DEVICE_MASK ((1 << 7) - 1)
+/* The target argument is significant for all devices. */
+#define GOMP_TARGET_ARG_DEVICE_ALL 0
+
+/* Flag set when the subsequent element in the device-specific argument
+ values. */
+#define GOMP_TARGET_ARG_SUBSEQUENT_PARAM (1 << 7)
+
+/* Bitmask to apply to a target argument to find out the value identifier. */
+#define GOMP_TARGET_ARG_ID_MASK (((1 << 8) - 1) << 8)
+/* Target argument index of NUM_TEAMS. */
+#define GOMP_TARGET_ARG_NUM_TEAMS (1 << 8)
+/* Target argument index of THREAD_LIMIT. */
+#define GOMP_TARGET_ARG_THREAD_LIMIT (2 << 8)
+
+/* If the value is directly embeded in target argument, it should be a 16-bit
+ at most and shifted by this many bits. */
+#define GOMP_TARGET_ARG_VALUE_SHIFT 16
+
+/* HSA specific data structures. */
+
+/* Identifiers of device-specific target arguments. */
+#define GOMP_TARGET_ARG_HSA_KERNEL_ATTRIBUTES (1 << 8)
+
+#endif
diff --git a/include/hashtab.h b/include/hashtab.h
index 4bb65d6c7..b1b5877aa 100644
--- a/include/hashtab.h
+++ b/include/hashtab.h
@@ -1,6 +1,5 @@
/* An expandable hash tables datatype.
- Copyright (C) 1999, 2000, 2002, 2003, 2004, 2005, 2009, 2010
- Free Software Foundation, Inc.
+ Copyright (C) 1999-2015 Free Software Foundation, Inc.
Contributed by Vladimir Makarov (vmakarov@cygnus.com).
This program is free software; you can redistribute it and/or modify
@@ -39,10 +38,6 @@ extern "C" {
#include "ansidecl.h"
-#ifndef GTY
-#define GTY(X)
-#endif
-
/* The type for a hash code. */
typedef unsigned int hashval_t;
@@ -97,7 +92,7 @@ typedef void (*htab_free_with_arg) (void *, void *);
functions mentioned below. The size of this structure is subject to
change. */
-struct GTY(()) htab {
+struct htab {
/* Pointer to hash function. */
htab_hash hash_f;
@@ -108,7 +103,7 @@ struct GTY(()) htab {
htab_del del_f;
/* Table itself. */
- void ** GTY ((use_param, length ("%h.size"))) entries;
+ void **entries;
/* Current size (in entries) of the hash table. */
size_t size;
@@ -132,7 +127,7 @@ struct GTY(()) htab {
htab_free free_f;
/* Alternate allocate/free functions, which take an extra argument. */
- void * GTY((skip)) alloc_arg;
+ void *alloc_arg;
htab_alloc_with_arg alloc_with_arg_f;
htab_free_with_arg free_with_arg_f;
diff --git a/include/leb128.h b/include/leb128.h
index f584f72e5..56016b0f7 100644
--- a/include/leb128.h
+++ b/include/leb128.h
@@ -1,5 +1,5 @@
/* Utilities for reading leb128 values.
- Copyright (C) 2012 Free Software Foundation, Inc.
+ Copyright (C) 2012-2015 Free Software Foundation, Inc.
This file is part of the libiberty library.
Libiberty is free software; you can redistribute it and/or
diff --git a/include/libiberty.h b/include/libiberty.h
index cacde800e..a9c885fc6 100644
--- a/include/libiberty.h
+++ b/include/libiberty.h
@@ -1,7 +1,6 @@
/* Function declarations for libiberty.
- Copyright 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
- 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc.
+ Copyright (C) 1997-2015 Free Software Foundation, Inc.
Note - certain prototypes declared in this header file are for
functions whoes implementation copyright does not belong to the
@@ -81,19 +80,19 @@ extern void freeargv (char **);
/* Duplicate an argument vector. Allocates memory using malloc. Use
freeargv to free the vector. */
-extern char **dupargv (char **) ATTRIBUTE_MALLOC;
+extern char **dupargv (char * const *) ATTRIBUTE_MALLOC;
/* Expand "@file" arguments in argv. */
-extern void expandargv PARAMS ((int *, char ***));
+extern void expandargv (int *, char ***);
/* Write argv to an @-file, inserting necessary quoting. */
-extern int writeargv PARAMS ((char **, FILE *));
+extern int writeargv (char * const *, FILE *);
/* Return the number of elements in argv. */
-extern int countargv (char**);
+extern int countargv (char * const *);
/* Return the last component of a path name. Note that we can't use a
prototype here because the parameter is declared inconsistently
@@ -106,8 +105,11 @@ extern int countargv (char**);
to find the declaration so provide a fully prototyped one. If it
is 1, we found it so don't provide any declaration at all. */
#if !HAVE_DECL_BASENAME
-#if defined (__GNU_LIBRARY__ ) || defined (__linux__) || defined (__FreeBSD__) || defined (__OpenBSD__) || defined(__NetBSD__) || defined (__CYGWIN__) || defined (__CYGWIN32__) || defined (__MINGW32__) || defined (HAVE_DECL_BASENAME)
-extern char *basename (const char *);
+#if defined (__GNU_LIBRARY__ ) || defined (__linux__) \
+ || defined (__FreeBSD__) || defined (__OpenBSD__) || defined (__NetBSD__) \
+ || defined (__CYGWIN__) || defined (__CYGWIN32__) || defined (__MINGW32__) \
+ || defined (__DragonFly__) || defined (HAVE_DECL_BASENAME)
+extern char *basename (const char *) ATTRIBUTE_RETURNS_NONNULL ATTRIBUTE_NONNULL(1);
#else
/* Do not allow basename to be used if there is no prototype seen. We
either need to use the above prototype or have one from
@@ -118,18 +120,18 @@ extern char *basename (const char *);
/* A well-defined basename () that is always compiled in. */
-extern const char *lbasename (const char *);
+extern const char *lbasename (const char *) ATTRIBUTE_RETURNS_NONNULL ATTRIBUTE_NONNULL(1);
/* Same, but assumes DOS semantics (drive name, backslash is also a
dir separator) regardless of host. */
-extern const char *dos_lbasename (const char *);
+extern const char *dos_lbasename (const char *) ATTRIBUTE_RETURNS_NONNULL ATTRIBUTE_NONNULL(1);
/* Same, but assumes Unix semantics (absolute paths always start with
a slash, only forward slash is accepted as dir separator)
regardless of host. */
-extern const char *unix_lbasename (const char *);
+extern const char *unix_lbasename (const char *) ATTRIBUTE_RETURNS_NONNULL ATTRIBUTE_NONNULL(1);
/* A well-defined realpath () that is always compiled in. */
@@ -139,7 +141,7 @@ extern char *lrealpath (const char *);
the last argument of this function, to terminate the list of
strings. Allocates memory using xmalloc. */
-extern char *concat (const char *, ...) ATTRIBUTE_MALLOC ATTRIBUTE_SENTINEL;
+extern char *concat (const char *, ...) ATTRIBUTE_MALLOC ATTRIBUTE_RETURNS_NONNULL ATTRIBUTE_SENTINEL;
/* Concatenate an arbitrary number of strings. You must pass NULL as
the last argument of this function, to terminate the list of
@@ -148,7 +150,7 @@ extern char *concat (const char *, ...) ATTRIBUTE_MALLOC ATTRIBUTE_SENTINEL;
pointer to be freed after the new string is created, similar to the
way xrealloc works. */
-extern char *reconcat (char *, const char *, ...) ATTRIBUTE_MALLOC ATTRIBUTE_SENTINEL;
+extern char *reconcat (char *, const char *, ...) ATTRIBUTE_MALLOC ATTRIBUTE_RETURNS_NONNULL ATTRIBUTE_SENTINEL;
/* Determine the length of concatenating an arbitrary number of
strings. You must pass NULL as the last argument of this function,
@@ -161,14 +163,14 @@ extern unsigned long concat_length (const char *, ...) ATTRIBUTE_SENTINEL;
to terminate the list of strings. The supplied memory is assumed
to be large enough. */
-extern char *concat_copy (char *, const char *, ...) ATTRIBUTE_SENTINEL;
+extern char *concat_copy (char *, const char *, ...) ATTRIBUTE_RETURNS_NONNULL ATTRIBUTE_NONNULL(1) ATTRIBUTE_SENTINEL;
/* Concatenate an arbitrary number of strings into a GLOBAL area of
memory. You must pass NULL as the last argument of this function,
to terminate the list of strings. The supplied memory is assumed
to be large enough. */
-extern char *concat_copy2 (const char *, ...) ATTRIBUTE_SENTINEL;
+extern char *concat_copy2 (const char *, ...) ATTRIBUTE_RETURNS_NONNULL ATTRIBUTE_SENTINEL;
/* This is the global area used by concat_copy2. */
@@ -224,9 +226,14 @@ extern char *make_relative_prefix (const char *, const char *,
extern char *make_relative_prefix_ignore_links (const char *, const char *,
const char *) ATTRIBUTE_MALLOC;
+/* Returns a pointer to a directory path suitable for creating temporary
+ files in. */
+
+extern const char *choose_tmpdir (void) ATTRIBUTE_RETURNS_NONNULL;
+
/* Choose a temporary directory to use for scratch files. */
-extern char *choose_temp_base (void) ATTRIBUTE_MALLOC;
+extern char *choose_temp_base (void) ATTRIBUTE_MALLOC ATTRIBUTE_RETURNS_NONNULL;
/* Return a temporary file name or NULL if unable to create one. */
@@ -256,7 +263,7 @@ extern int strtoerrno (const char *);
/* ANSI's strerror(), but more robust. */
-extern char *xstrerror (int);
+extern char *xstrerror (int) ATTRIBUTE_RETURNS_NONNULL;
/* Return the maximum signal number for which strsignal will return a
string. */
@@ -298,30 +305,30 @@ extern void xmalloc_failed (size_t) ATTRIBUTE_NORETURN;
message to stderr (using the name set by xmalloc_set_program_name,
if any) and then call xexit. */
-extern void *xmalloc (size_t) ATTRIBUTE_MALLOC;
+extern void *xmalloc (size_t) ATTRIBUTE_MALLOC ATTRIBUTE_RETURNS_NONNULL;
/* Reallocate memory without fail. This works like xmalloc. Note,
realloc type functions are not suitable for attribute malloc since
they may return the same address across multiple calls. */
-extern void *xrealloc (void *, size_t);
+extern void *xrealloc (void *, size_t) ATTRIBUTE_RETURNS_NONNULL;
/* Allocate memory without fail and set it to zero. This works like
xmalloc. */
-extern void *xcalloc (size_t, size_t) ATTRIBUTE_MALLOC;
+extern void *xcalloc (size_t, size_t) ATTRIBUTE_MALLOC ATTRIBUTE_RETURNS_NONNULL;
/* Copy a string into a memory buffer without fail. */
-extern char *xstrdup (const char *) ATTRIBUTE_MALLOC;
+extern char *xstrdup (const char *) ATTRIBUTE_MALLOC ATTRIBUTE_RETURNS_NONNULL;
/* Copy at most N characters from string into a buffer without fail. */
-extern char *xstrndup (const char *, size_t) ATTRIBUTE_MALLOC;
+extern char *xstrndup (const char *, size_t) ATTRIBUTE_MALLOC ATTRIBUTE_RETURNS_NONNULL;
/* Copy an existing memory buffer to a new memory buffer without fail. */
-extern void *xmemdup (const void *, size_t, size_t) ATTRIBUTE_MALLOC;
+extern void *xmemdup (const void *, size_t, size_t) ATTRIBUTE_MALLOC ATTRIBUTE_RETURNS_NONNULL;
/* Physical memory routines. Return values are in BYTES. */
extern double physmem_total (void);
@@ -399,7 +406,7 @@ extern void hex_init (void);
Returns NULL on error. */
extern struct pex_obj *pex_init (int flags, const char *pname,
- const char *tempbase);
+ const char *tempbase) ATTRIBUTE_RETURNS_NONNULL;
/* Flags for pex_run. These are bits to be or'ed together. */
@@ -442,6 +449,11 @@ extern struct pex_obj *pex_init (int flags, const char *pname,
on Unix. */
#define PEX_BINARY_ERROR 0x80
+/* Append stdout to existing file instead of truncating it. */
+#define PEX_STDOUT_APPEND 0x100
+
+/* Thes same as PEX_STDOUT_APPEND, but for STDERR. */
+#define PEX_STDERR_APPEND 0x200
/* Execute one program. Returns NULL on success. On error returns an
error string (typically just the name of a system call); the error
@@ -609,13 +621,18 @@ extern int pexecute (const char *, char * const *, const char *,
extern int pwait (int, int *, int);
-#if !HAVE_DECL_ASPRINTF
+#if defined(HAVE_DECL_ASPRINTF) && !HAVE_DECL_ASPRINTF
/* Like sprintf but provides a pointer to malloc'd storage, which must
be freed by the caller. */
extern int asprintf (char **, const char *, ...) ATTRIBUTE_PRINTF_2;
#endif
+/* Like asprintf but allocates memory without fail. This works like
+ xmalloc. */
+
+extern char *xasprintf (const char *, ...) ATTRIBUTE_MALLOC ATTRIBUTE_PRINTF_1;
+
#if !HAVE_DECL_VASPRINTF
/* Like vsprintf but provides a pointer to malloc'd storage, which
must be freed by the caller. */
@@ -623,6 +640,11 @@ extern int asprintf (char **, const char *, ...) ATTRIBUTE_PRINTF_2;
extern int vasprintf (char **, const char *, va_list) ATTRIBUTE_PRINTF(2,0);
#endif
+/* Like vasprintf but allocates memory without fail. This works like
+ xmalloc. */
+
+extern char *xvasprintf (const char *, va_list) ATTRIBUTE_MALLOC ATTRIBUTE_PRINTF(1,0);
+
#if defined(HAVE_DECL_SNPRINTF) && !HAVE_DECL_SNPRINTF
/* Like sprintf but prints at most N characters. */
extern int snprintf (char *, size_t, const char *, ...) ATTRIBUTE_PRINTF_3;
@@ -633,6 +655,37 @@ extern int snprintf (char *, size_t, const char *, ...) ATTRIBUTE_PRINTF_3;
extern int vsnprintf (char *, size_t, const char *, va_list) ATTRIBUTE_PRINTF(3,0);
#endif
+#if defined (HAVE_DECL_STRNLEN) && !HAVE_DECL_STRNLEN
+extern size_t strnlen (const char *, size_t);
+#endif
+
+#if defined(HAVE_DECL_STRVERSCMP) && !HAVE_DECL_STRVERSCMP
+/* Compare version strings. */
+extern int strverscmp (const char *, const char *);
+#endif
+
+#if defined(HAVE_DECL_STRTOL) && !HAVE_DECL_STRTOL
+extern long int strtol (const char *nptr,
+ char **endptr, int base);
+#endif
+
+#if defined(HAVE_DECL_STRTOUL) && !HAVE_DECL_STRTOUL
+extern unsigned long int strtoul (const char *nptr,
+ char **endptr, int base);
+#endif
+
+#if defined(HAVE_LONG_LONG) && defined(HAVE_DECL_STRTOLL) && !HAVE_DECL_STRTOLL
+__extension__
+extern long long int strtoll (const char *nptr,
+ char **endptr, int base);
+#endif
+
+#if defined(HAVE_LONG_LONG) && defined(HAVE_DECL_STRTOULL) && !HAVE_DECL_STRTOULL
+__extension__
+extern unsigned long long int strtoull (const char *nptr,
+ char **endptr, int base);
+#endif
+
#if defined(HAVE_DECL_STRVERSCMP) && !HAVE_DECL_STRVERSCMP
/* Compare version strings. */
extern int strverscmp (const char *, const char *);
diff --git a/include/longlong.h b/include/longlong.h
new file mode 100644
index 000000000..34ad9b4f5
--- /dev/null
+++ b/include/longlong.h
@@ -0,0 +1,1773 @@
+/* longlong.h -- definitions for mixed size 32/64 bit arithmetic.
+ Copyright (C) 1991-2015 Free Software Foundation, Inc.
+
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ In addition to the permissions in the GNU Lesser General Public
+ License, the Free Software Foundation gives you unlimited
+ permission to link the compiled version of this file into
+ combinations with other programs, and to distribute those
+ combinations without any restriction coming from the use of this
+ file. (The Lesser General Public License restrictions do apply in
+ other respects; for example, they cover modification of the file,
+ and distribution when not linked into a combine executable.)
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
+
+/* You have to define the following before including this file:
+
+ UWtype -- An unsigned type, default type for operations (typically a "word")
+ UHWtype -- An unsigned type, at least half the size of UWtype.
+ UDWtype -- An unsigned type, at least twice as large a UWtype
+ W_TYPE_SIZE -- size in bits of UWtype
+
+ UQItype -- Unsigned 8 bit type.
+ SItype, USItype -- Signed and unsigned 32 bit types.
+ DItype, UDItype -- Signed and unsigned 64 bit types.
+
+ On a 32 bit machine UWtype should typically be USItype;
+ on a 64 bit machine, UWtype should typically be UDItype. */
+
+#define __BITS4 (W_TYPE_SIZE / 4)
+#define __ll_B ((UWtype) 1 << (W_TYPE_SIZE / 2))
+#define __ll_lowpart(t) ((UWtype) (t) & (__ll_B - 1))
+#define __ll_highpart(t) ((UWtype) (t) >> (W_TYPE_SIZE / 2))
+
+#ifndef W_TYPE_SIZE
+#define W_TYPE_SIZE 32
+#define UWtype USItype
+#define UHWtype USItype
+#define UDWtype UDItype
+#endif
+
+/* Used in glibc only. */
+#ifndef attribute_hidden
+#define attribute_hidden
+#endif
+
+extern const UQItype __clz_tab[256] attribute_hidden;
+
+/* Define auxiliary asm macros.
+
+ 1) umul_ppmm(high_prod, low_prod, multiplier, multiplicand) multiplies two
+ UWtype integers MULTIPLIER and MULTIPLICAND, and generates a two UWtype
+ word product in HIGH_PROD and LOW_PROD.
+
+ 2) __umulsidi3(a,b) multiplies two UWtype integers A and B, and returns a
+ UDWtype product. This is just a variant of umul_ppmm.
+
+ 3) udiv_qrnnd(quotient, remainder, high_numerator, low_numerator,
+ denominator) divides a UDWtype, composed by the UWtype integers
+ HIGH_NUMERATOR and LOW_NUMERATOR, by DENOMINATOR and places the quotient
+ in QUOTIENT and the remainder in REMAINDER. HIGH_NUMERATOR must be less
+ than DENOMINATOR for correct operation. If, in addition, the most
+ significant bit of DENOMINATOR must be 1, then the pre-processor symbol
+ UDIV_NEEDS_NORMALIZATION is defined to 1.
+
+ 4) sdiv_qrnnd(quotient, remainder, high_numerator, low_numerator,
+ denominator). Like udiv_qrnnd but the numbers are signed. The quotient
+ is rounded towards 0.
+
+ 5) count_leading_zeros(count, x) counts the number of zero-bits from the
+ msb to the first nonzero bit in the UWtype X. This is the number of
+ steps X needs to be shifted left to set the msb. Undefined for X == 0,
+ unless the symbol COUNT_LEADING_ZEROS_0 is defined to some value.
+
+ 6) count_trailing_zeros(count, x) like count_leading_zeros, but counts
+ from the least significant end.
+
+ 7) add_ssaaaa(high_sum, low_sum, high_addend_1, low_addend_1,
+ high_addend_2, low_addend_2) adds two UWtype integers, composed by
+ HIGH_ADDEND_1 and LOW_ADDEND_1, and HIGH_ADDEND_2 and LOW_ADDEND_2
+ respectively. The result is placed in HIGH_SUM and LOW_SUM. Overflow
+ (i.e. carry out) is not stored anywhere, and is lost.
+
+ 8) sub_ddmmss(high_difference, low_difference, high_minuend, low_minuend,
+ high_subtrahend, low_subtrahend) subtracts two two-word UWtype integers,
+ composed by HIGH_MINUEND_1 and LOW_MINUEND_1, and HIGH_SUBTRAHEND_2 and
+ LOW_SUBTRAHEND_2 respectively. The result is placed in HIGH_DIFFERENCE
+ and LOW_DIFFERENCE. Overflow (i.e. carry out) is not stored anywhere,
+ and is lost.
+
+ If any of these macros are left undefined for a particular CPU,
+ C macros are used. */
+
+/* The CPUs come in alphabetical order below.
+
+ Please add support for more CPUs here, or improve the current support
+ for the CPUs below!
+ (E.g. WE32100, IBM360.) */
+
+#if defined (__GNUC__) && !defined (NO_ASM)
+
+/* We sometimes need to clobber "cc" with gcc2, but that would not be
+ understood by gcc1. Use cpp to avoid major code duplication. */
+#if __GNUC__ < 2
+#define __CLOBBER_CC
+#define __AND_CLOBBER_CC
+#else /* __GNUC__ >= 2 */
+#define __CLOBBER_CC : "cc"
+#define __AND_CLOBBER_CC , "cc"
+#endif /* __GNUC__ < 2 */
+
+#if defined (__aarch64__)
+
+#if W_TYPE_SIZE == 32
+#define count_leading_zeros(COUNT, X) ((COUNT) = __builtin_clz (X))
+#define count_trailing_zeros(COUNT, X) ((COUNT) = __builtin_ctz (X))
+#define COUNT_LEADING_ZEROS_0 32
+#endif /* W_TYPE_SIZE == 32 */
+
+#if W_TYPE_SIZE == 64
+#define count_leading_zeros(COUNT, X) ((COUNT) = __builtin_clzll (X))
+#define count_trailing_zeros(COUNT, X) ((COUNT) = __builtin_ctzll (X))
+#define COUNT_LEADING_ZEROS_0 64
+#endif /* W_TYPE_SIZE == 64 */
+
+#endif /* __aarch64__ */
+
+#if defined (__alpha) && W_TYPE_SIZE == 64
+/* There is a bug in g++ before version 5 that
+ errors on __builtin_alpha_umulh. */
+#if !defined(__cplusplus) || __GNUC__ >= 5
+#define umul_ppmm(ph, pl, m0, m1) \
+ do { \
+ UDItype __m0 = (m0), __m1 = (m1); \
+ (ph) = __builtin_alpha_umulh (__m0, __m1); \
+ (pl) = __m0 * __m1; \
+ } while (0)
+#define UMUL_TIME 46
+#endif /* !c++ */
+#ifndef LONGLONG_STANDALONE
+#define udiv_qrnnd(q, r, n1, n0, d) \
+ do { UDItype __r; \
+ (q) = __udiv_qrnnd (&__r, (n1), (n0), (d)); \
+ (r) = __r; \
+ } while (0)
+extern UDItype __udiv_qrnnd (UDItype *, UDItype, UDItype, UDItype);
+#define UDIV_TIME 220
+#endif /* LONGLONG_STANDALONE */
+#ifdef __alpha_cix__
+#define count_leading_zeros(COUNT,X) ((COUNT) = __builtin_clzl (X))
+#define count_trailing_zeros(COUNT,X) ((COUNT) = __builtin_ctzl (X))
+#define COUNT_LEADING_ZEROS_0 64
+#else
+#define count_leading_zeros(COUNT,X) \
+ do { \
+ UDItype __xr = (X), __t, __a; \
+ __t = __builtin_alpha_cmpbge (0, __xr); \
+ __a = __clz_tab[__t ^ 0xff] - 1; \
+ __t = __builtin_alpha_extbl (__xr, __a); \
+ (COUNT) = 64 - (__clz_tab[__t] + __a*8); \
+ } while (0)
+#define count_trailing_zeros(COUNT,X) \
+ do { \
+ UDItype __xr = (X), __t, __a; \
+ __t = __builtin_alpha_cmpbge (0, __xr); \
+ __t = ~__t & -~__t; \
+ __a = ((__t & 0xCC) != 0) * 2; \
+ __a += ((__t & 0xF0) != 0) * 4; \
+ __a += ((__t & 0xAA) != 0); \
+ __t = __builtin_alpha_extbl (__xr, __a); \
+ __a <<= 3; \
+ __t &= -__t; \
+ __a += ((__t & 0xCC) != 0) * 2; \
+ __a += ((__t & 0xF0) != 0) * 4; \
+ __a += ((__t & 0xAA) != 0); \
+ (COUNT) = __a; \
+ } while (0)
+#endif /* __alpha_cix__ */
+#endif /* __alpha */
+
+#if defined (__arc__) && W_TYPE_SIZE == 32
+#define add_ssaaaa(sh, sl, ah, al, bh, bl) \
+ __asm__ ("add.f %1, %4, %5\n\tadc %0, %2, %3" \
+ : "=r" ((USItype) (sh)), \
+ "=&r" ((USItype) (sl)) \
+ : "%r" ((USItype) (ah)), \
+ "rIJ" ((USItype) (bh)), \
+ "%r" ((USItype) (al)), \
+ "rIJ" ((USItype) (bl)))
+#define sub_ddmmss(sh, sl, ah, al, bh, bl) \
+ __asm__ ("sub.f %1, %4, %5\n\tsbc %0, %2, %3" \
+ : "=r" ((USItype) (sh)), \
+ "=&r" ((USItype) (sl)) \
+ : "r" ((USItype) (ah)), \
+ "rIJ" ((USItype) (bh)), \
+ "r" ((USItype) (al)), \
+ "rIJ" ((USItype) (bl)))
+
+#define __umulsidi3(u,v) ((UDItype)(USItype)u*(USItype)v)
+#ifdef __ARC_NORM__
+#define count_leading_zeros(count, x) \
+ do \
+ { \
+ SItype c_; \
+ \
+ __asm__ ("norm.f\t%0,%1\n\tmov.mi\t%0,-1" : "=r" (c_) : "r" (x) : "cc");\
+ (count) = c_ + 1; \
+ } \
+ while (0)
+#define COUNT_LEADING_ZEROS_0 32
+#endif
+#endif
+
+#if defined (__arm__) && (defined (__thumb2__) || !defined (__thumb__)) \
+ && W_TYPE_SIZE == 32
+#define add_ssaaaa(sh, sl, ah, al, bh, bl) \
+ __asm__ ("adds %1, %4, %5\n\tadc %0, %2, %3" \
+ : "=r" ((USItype) (sh)), \
+ "=&r" ((USItype) (sl)) \
+ : "%r" ((USItype) (ah)), \
+ "rI" ((USItype) (bh)), \
+ "%r" ((USItype) (al)), \
+ "rI" ((USItype) (bl)) __CLOBBER_CC)
+#define sub_ddmmss(sh, sl, ah, al, bh, bl) \
+ __asm__ ("subs %1, %4, %5\n\tsbc %0, %2, %3" \
+ : "=r" ((USItype) (sh)), \
+ "=&r" ((USItype) (sl)) \
+ : "r" ((USItype) (ah)), \
+ "rI" ((USItype) (bh)), \
+ "r" ((USItype) (al)), \
+ "rI" ((USItype) (bl)) __CLOBBER_CC)
+# if defined(__ARM_ARCH_2__) || defined(__ARM_ARCH_2A__) \
+ || defined(__ARM_ARCH_3__)
+# define umul_ppmm(xh, xl, a, b) \
+ do { \
+ register USItype __t0, __t1, __t2; \
+ __asm__ ("%@ Inlined umul_ppmm\n" \
+ " mov %2, %5, lsr #16\n" \
+ " mov %0, %6, lsr #16\n" \
+ " bic %3, %5, %2, lsl #16\n" \
+ " bic %4, %6, %0, lsl #16\n" \
+ " mul %1, %3, %4\n" \
+ " mul %4, %2, %4\n" \
+ " mul %3, %0, %3\n" \
+ " mul %0, %2, %0\n" \
+ " adds %3, %4, %3\n" \
+ " addcs %0, %0, #65536\n" \
+ " adds %1, %1, %3, lsl #16\n" \
+ " adc %0, %0, %3, lsr #16" \
+ : "=&r" ((USItype) (xh)), \
+ "=r" ((USItype) (xl)), \
+ "=&r" (__t0), "=&r" (__t1), "=r" (__t2) \
+ : "r" ((USItype) (a)), \
+ "r" ((USItype) (b)) __CLOBBER_CC ); \
+ } while (0)
+# define UMUL_TIME 20
+# else
+# define umul_ppmm(xh, xl, a, b) \
+ do { \
+ /* Generate umull, under compiler control. */ \
+ register UDItype __t0 = (UDItype)(USItype)(a) * (USItype)(b); \
+ (xl) = (USItype)__t0; \
+ (xh) = (USItype)(__t0 >> 32); \
+ } while (0)
+# define UMUL_TIME 3
+# endif
+# define UDIV_TIME 100
+#endif /* __arm__ */
+
+#if defined(__arm__)
+/* Let gcc decide how best to implement count_leading_zeros. */
+#define count_leading_zeros(COUNT,X) ((COUNT) = __builtin_clz (X))
+#define count_trailing_zeros(COUNT,X) ((COUNT) = __builtin_ctz (X))
+#define COUNT_LEADING_ZEROS_0 32
+#endif
+
+#if defined (__AVR__)
+
+#if W_TYPE_SIZE == 16
+#define count_leading_zeros(COUNT,X) ((COUNT) = __builtin_clz (X))
+#define count_trailing_zeros(COUNT,X) ((COUNT) = __builtin_ctz (X))
+#define COUNT_LEADING_ZEROS_0 16
+#endif /* W_TYPE_SIZE == 16 */
+
+#if W_TYPE_SIZE == 32
+#define count_leading_zeros(COUNT,X) ((COUNT) = __builtin_clzl (X))
+#define count_trailing_zeros(COUNT,X) ((COUNT) = __builtin_ctzl (X))
+#define COUNT_LEADING_ZEROS_0 32
+#endif /* W_TYPE_SIZE == 32 */
+
+#if W_TYPE_SIZE == 64
+#define count_leading_zeros(COUNT,X) ((COUNT) = __builtin_clzll (X))
+#define count_trailing_zeros(COUNT,X) ((COUNT) = __builtin_ctzll (X))
+#define COUNT_LEADING_ZEROS_0 64
+#endif /* W_TYPE_SIZE == 64 */
+
+#endif /* defined (__AVR__) */
+
+#if defined (__CRIS__)
+
+#if __CRIS_arch_version >= 3
+#define count_leading_zeros(COUNT, X) ((COUNT) = __builtin_clz (X))
+#define COUNT_LEADING_ZEROS_0 32
+#endif /* __CRIS_arch_version >= 3 */
+
+#if __CRIS_arch_version >= 8
+#define count_trailing_zeros(COUNT, X) ((COUNT) = __builtin_ctz (X))
+#endif /* __CRIS_arch_version >= 8 */
+
+#if __CRIS_arch_version >= 10
+#define __umulsidi3(u,v) ((UDItype)(USItype) (u) * (UDItype)(USItype) (v))
+#else
+#define __umulsidi3 __umulsidi3
+extern UDItype __umulsidi3 (USItype, USItype);
+#endif /* __CRIS_arch_version >= 10 */
+
+#define umul_ppmm(w1, w0, u, v) \
+ do { \
+ UDItype __x = __umulsidi3 (u, v); \
+ (w0) = (USItype) (__x); \
+ (w1) = (USItype) (__x >> 32); \
+ } while (0)
+
+/* FIXME: defining add_ssaaaa and sub_ddmmss should be advantageous for
+ DFmode ("double" intrinsics, avoiding two of the three insns handling
+ carry), but defining them as open-code C composing and doing the
+ operation in DImode (UDImode) shows that the DImode needs work:
+ register pressure from requiring neighboring registers and the
+ traffic to and from them come to dominate, in the 4.7 series. */
+
+#endif /* defined (__CRIS__) */
+
+#if defined (__hppa) && W_TYPE_SIZE == 32
+#define add_ssaaaa(sh, sl, ah, al, bh, bl) \
+ __asm__ ("add %4,%5,%1\n\taddc %2,%3,%0" \
+ : "=r" ((USItype) (sh)), \
+ "=&r" ((USItype) (sl)) \
+ : "%rM" ((USItype) (ah)), \
+ "rM" ((USItype) (bh)), \
+ "%rM" ((USItype) (al)), \
+ "rM" ((USItype) (bl)))
+#define sub_ddmmss(sh, sl, ah, al, bh, bl) \
+ __asm__ ("sub %4,%5,%1\n\tsubb %2,%3,%0" \
+ : "=r" ((USItype) (sh)), \
+ "=&r" ((USItype) (sl)) \
+ : "rM" ((USItype) (ah)), \
+ "rM" ((USItype) (bh)), \
+ "rM" ((USItype) (al)), \
+ "rM" ((USItype) (bl)))
+#if defined (_PA_RISC1_1)
+#define umul_ppmm(w1, w0, u, v) \
+ do { \
+ union \
+ { \
+ UDItype __f; \
+ struct {USItype __w1, __w0;} __w1w0; \
+ } __t; \
+ __asm__ ("xmpyu %1,%2,%0" \
+ : "=x" (__t.__f) \
+ : "x" ((USItype) (u)), \
+ "x" ((USItype) (v))); \
+ (w1) = __t.__w1w0.__w1; \
+ (w0) = __t.__w1w0.__w0; \
+ } while (0)
+#define UMUL_TIME 8
+#else
+#define UMUL_TIME 30
+#endif
+#define UDIV_TIME 40
+#define count_leading_zeros(count, x) \
+ do { \
+ USItype __tmp; \
+ __asm__ ( \
+ "ldi 1,%0\n" \
+" extru,= %1,15,16,%%r0 ; Bits 31..16 zero?\n" \
+" extru,tr %1,15,16,%1 ; No. Shift down, skip add.\n"\
+" ldo 16(%0),%0 ; Yes. Perform add.\n" \
+" extru,= %1,23,8,%%r0 ; Bits 15..8 zero?\n" \
+" extru,tr %1,23,8,%1 ; No. Shift down, skip add.\n"\
+" ldo 8(%0),%0 ; Yes. Perform add.\n" \
+" extru,= %1,27,4,%%r0 ; Bits 7..4 zero?\n" \
+" extru,tr %1,27,4,%1 ; No. Shift down, skip add.\n"\
+" ldo 4(%0),%0 ; Yes. Perform add.\n" \
+" extru,= %1,29,2,%%r0 ; Bits 3..2 zero?\n" \
+" extru,tr %1,29,2,%1 ; No. Shift down, skip add.\n"\
+" ldo 2(%0),%0 ; Yes. Perform add.\n" \
+" extru %1,30,1,%1 ; Extract bit 1.\n" \
+" sub %0,%1,%0 ; Subtract it.\n" \
+ : "=r" (count), "=r" (__tmp) : "1" (x)); \
+ } while (0)
+#endif
+
+#if (defined (__i370__) || defined (__s390__) || defined (__mvs__)) && W_TYPE_SIZE == 32
+#if !defined (__zarch__)
+#define smul_ppmm(xh, xl, m0, m1) \
+ do { \
+ union {DItype __ll; \
+ struct {USItype __h, __l;} __i; \
+ } __x; \
+ __asm__ ("lr %N0,%1\n\tmr %0,%2" \
+ : "=&r" (__x.__ll) \
+ : "r" (m0), "r" (m1)); \
+ (xh) = __x.__i.__h; (xl) = __x.__i.__l; \
+ } while (0)
+#define sdiv_qrnnd(q, r, n1, n0, d) \
+ do { \
+ union {DItype __ll; \
+ struct {USItype __h, __l;} __i; \
+ } __x; \
+ __x.__i.__h = n1; __x.__i.__l = n0; \
+ __asm__ ("dr %0,%2" \
+ : "=r" (__x.__ll) \
+ : "0" (__x.__ll), "r" (d)); \
+ (q) = __x.__i.__l; (r) = __x.__i.__h; \
+ } while (0)
+#else
+#define smul_ppmm(xh, xl, m0, m1) \
+ do { \
+ register SItype __r0 __asm__ ("0"); \
+ register SItype __r1 __asm__ ("1") = (m0); \
+ \
+ __asm__ ("mr\t%%r0,%3" \
+ : "=r" (__r0), "=r" (__r1) \
+ : "r" (__r1), "r" (m1)); \
+ (xh) = __r0; (xl) = __r1; \
+ } while (0)
+
+#define sdiv_qrnnd(q, r, n1, n0, d) \
+ do { \
+ register SItype __r0 __asm__ ("0") = (n1); \
+ register SItype __r1 __asm__ ("1") = (n0); \
+ \
+ __asm__ ("dr\t%%r0,%4" \
+ : "=r" (__r0), "=r" (__r1) \
+ : "r" (__r0), "r" (__r1), "r" (d)); \
+ (q) = __r1; (r) = __r0; \
+ } while (0)
+#endif /* __zarch__ */
+#endif
+
+#if (defined (__i386__) || defined (__i486__)) && W_TYPE_SIZE == 32
+#define add_ssaaaa(sh, sl, ah, al, bh, bl) \
+ __asm__ ("add{l} {%5,%1|%1,%5}\n\tadc{l} {%3,%0|%0,%3}" \
+ : "=r" ((USItype) (sh)), \
+ "=&r" ((USItype) (sl)) \
+ : "%0" ((USItype) (ah)), \
+ "g" ((USItype) (bh)), \
+ "%1" ((USItype) (al)), \
+ "g" ((USItype) (bl)))
+#define sub_ddmmss(sh, sl, ah, al, bh, bl) \
+ __asm__ ("sub{l} {%5,%1|%1,%5}\n\tsbb{l} {%3,%0|%0,%3}" \
+ : "=r" ((USItype) (sh)), \
+ "=&r" ((USItype) (sl)) \
+ : "0" ((USItype) (ah)), \
+ "g" ((USItype) (bh)), \
+ "1" ((USItype) (al)), \
+ "g" ((USItype) (bl)))
+#define umul_ppmm(w1, w0, u, v) \
+ __asm__ ("mul{l} %3" \
+ : "=a" ((USItype) (w0)), \
+ "=d" ((USItype) (w1)) \
+ : "%0" ((USItype) (u)), \
+ "rm" ((USItype) (v)))
+#define udiv_qrnnd(q, r, n1, n0, dv) \
+ __asm__ ("div{l} %4" \
+ : "=a" ((USItype) (q)), \
+ "=d" ((USItype) (r)) \
+ : "0" ((USItype) (n0)), \
+ "1" ((USItype) (n1)), \
+ "rm" ((USItype) (dv)))
+#define count_leading_zeros(count, x) ((count) = __builtin_clz (x))
+#define count_trailing_zeros(count, x) ((count) = __builtin_ctz (x))
+#define UMUL_TIME 40
+#define UDIV_TIME 40
+#endif /* 80x86 */
+
+#if defined (__x86_64__) && W_TYPE_SIZE == 64
+#define add_ssaaaa(sh, sl, ah, al, bh, bl) \
+ __asm__ ("add{q} {%5,%1|%1,%5}\n\tadc{q} {%3,%0|%0,%3}" \
+ : "=r" ((UDItype) (sh)), \
+ "=&r" ((UDItype) (sl)) \
+ : "%0" ((UDItype) (ah)), \
+ "rme" ((UDItype) (bh)), \
+ "%1" ((UDItype) (al)), \
+ "rme" ((UDItype) (bl)))
+#define sub_ddmmss(sh, sl, ah, al, bh, bl) \
+ __asm__ ("sub{q} {%5,%1|%1,%5}\n\tsbb{q} {%3,%0|%0,%3}" \
+ : "=r" ((UDItype) (sh)), \
+ "=&r" ((UDItype) (sl)) \
+ : "0" ((UDItype) (ah)), \
+ "rme" ((UDItype) (bh)), \
+ "1" ((UDItype) (al)), \
+ "rme" ((UDItype) (bl)))
+#define umul_ppmm(w1, w0, u, v) \
+ __asm__ ("mul{q} %3" \
+ : "=a" ((UDItype) (w0)), \
+ "=d" ((UDItype) (w1)) \
+ : "%0" ((UDItype) (u)), \
+ "rm" ((UDItype) (v)))
+#define udiv_qrnnd(q, r, n1, n0, dv) \
+ __asm__ ("div{q} %4" \
+ : "=a" ((UDItype) (q)), \
+ "=d" ((UDItype) (r)) \
+ : "0" ((UDItype) (n0)), \
+ "1" ((UDItype) (n1)), \
+ "rm" ((UDItype) (dv)))
+#define count_leading_zeros(count, x) ((count) = __builtin_clzll (x))
+#define count_trailing_zeros(count, x) ((count) = __builtin_ctzll (x))
+#define UMUL_TIME 40
+#define UDIV_TIME 40
+#endif /* x86_64 */
+
+#if defined (__i960__) && W_TYPE_SIZE == 32
+#define umul_ppmm(w1, w0, u, v) \
+ ({union {UDItype __ll; \
+ struct {USItype __l, __h;} __i; \
+ } __xx; \
+ __asm__ ("emul %2,%1,%0" \
+ : "=d" (__xx.__ll) \
+ : "%dI" ((USItype) (u)), \
+ "dI" ((USItype) (v))); \
+ (w1) = __xx.__i.__h; (w0) = __xx.__i.__l;})
+#define __umulsidi3(u, v) \
+ ({UDItype __w; \
+ __asm__ ("emul %2,%1,%0" \
+ : "=d" (__w) \
+ : "%dI" ((USItype) (u)), \
+ "dI" ((USItype) (v))); \
+ __w; })
+#endif /* __i960__ */
+
+#if defined (__ia64) && W_TYPE_SIZE == 64
+/* This form encourages gcc (pre-release 3.4 at least) to emit predicated
+ "sub r=r,r" and "sub r=r,r,1", giving a 2 cycle latency. The generic
+ code using "al<bl" arithmetically comes out making an actual 0 or 1 in a
+ register, which takes an extra cycle. */
+#define sub_ddmmss(sh, sl, ah, al, bh, bl) \
+ do { \
+ UWtype __x; \
+ __x = (al) - (bl); \
+ if ((al) < (bl)) \
+ (sh) = (ah) - (bh) - 1; \
+ else \
+ (sh) = (ah) - (bh); \
+ (sl) = __x; \
+ } while (0)
+
+/* Do both product parts in assembly, since that gives better code with
+ all gcc versions. Some callers will just use the upper part, and in
+ that situation we waste an instruction, but not any cycles. */
+#define umul_ppmm(ph, pl, m0, m1) \
+ __asm__ ("xma.hu %0 = %2, %3, f0\n\txma.l %1 = %2, %3, f0" \
+ : "=&f" (ph), "=f" (pl) \
+ : "f" (m0), "f" (m1))
+#define count_leading_zeros(count, x) \
+ do { \
+ UWtype _x = (x), _y, _a, _c; \
+ __asm__ ("mux1 %0 = %1, @rev" : "=r" (_y) : "r" (_x)); \
+ __asm__ ("czx1.l %0 = %1" : "=r" (_a) : "r" (-_y | _y)); \
+ _c = (_a - 1) << 3; \
+ _x >>= _c; \
+ if (_x >= 1 << 4) \
+ _x >>= 4, _c += 4; \
+ if (_x >= 1 << 2) \
+ _x >>= 2, _c += 2; \
+ _c += _x >> 1; \
+ (count) = W_TYPE_SIZE - 1 - _c; \
+ } while (0)
+/* similar to what gcc does for __builtin_ffs, but 0 based rather than 1
+ based, and we don't need a special case for x==0 here */
+#define count_trailing_zeros(count, x) \
+ do { \
+ UWtype __ctz_x = (x); \
+ __asm__ ("popcnt %0 = %1" \
+ : "=r" (count) \
+ : "r" ((__ctz_x-1) & ~__ctz_x)); \
+ } while (0)
+#define UMUL_TIME 14
+#endif
+
+#if defined (__M32R__) && W_TYPE_SIZE == 32
+#define add_ssaaaa(sh, sl, ah, al, bh, bl) \
+ /* The cmp clears the condition bit. */ \
+ __asm__ ("cmp %0,%0\n\taddx %1,%5\n\taddx %0,%3" \
+ : "=r" ((USItype) (sh)), \
+ "=&r" ((USItype) (sl)) \
+ : "0" ((USItype) (ah)), \
+ "r" ((USItype) (bh)), \
+ "1" ((USItype) (al)), \
+ "r" ((USItype) (bl)) \
+ : "cbit")
+#define sub_ddmmss(sh, sl, ah, al, bh, bl) \
+ /* The cmp clears the condition bit. */ \
+ __asm__ ("cmp %0,%0\n\tsubx %1,%5\n\tsubx %0,%3" \
+ : "=r" ((USItype) (sh)), \
+ "=&r" ((USItype) (sl)) \
+ : "0" ((USItype) (ah)), \
+ "r" ((USItype) (bh)), \
+ "1" ((USItype) (al)), \
+ "r" ((USItype) (bl)) \
+ : "cbit")
+#endif /* __M32R__ */
+
+#if defined (__mc68000__) && W_TYPE_SIZE == 32
+#define add_ssaaaa(sh, sl, ah, al, bh, bl) \
+ __asm__ ("add%.l %5,%1\n\taddx%.l %3,%0" \
+ : "=d" ((USItype) (sh)), \
+ "=&d" ((USItype) (sl)) \
+ : "%0" ((USItype) (ah)), \
+ "d" ((USItype) (bh)), \
+ "%1" ((USItype) (al)), \
+ "g" ((USItype) (bl)))
+#define sub_ddmmss(sh, sl, ah, al, bh, bl) \
+ __asm__ ("sub%.l %5,%1\n\tsubx%.l %3,%0" \
+ : "=d" ((USItype) (sh)), \
+ "=&d" ((USItype) (sl)) \
+ : "0" ((USItype) (ah)), \
+ "d" ((USItype) (bh)), \
+ "1" ((USItype) (al)), \
+ "g" ((USItype) (bl)))
+
+/* The '020, '030, '040, '060 and CPU32 have 32x32->64 and 64/32->32q-32r. */
+#if (defined (__mc68020__) && !defined (__mc68060__))
+#define umul_ppmm(w1, w0, u, v) \
+ __asm__ ("mulu%.l %3,%1:%0" \
+ : "=d" ((USItype) (w0)), \
+ "=d" ((USItype) (w1)) \
+ : "%0" ((USItype) (u)), \
+ "dmi" ((USItype) (v)))
+#define UMUL_TIME 45
+#define udiv_qrnnd(q, r, n1, n0, d) \
+ __asm__ ("divu%.l %4,%1:%0" \
+ : "=d" ((USItype) (q)), \
+ "=d" ((USItype) (r)) \
+ : "0" ((USItype) (n0)), \
+ "1" ((USItype) (n1)), \
+ "dmi" ((USItype) (d)))
+#define UDIV_TIME 90
+#define sdiv_qrnnd(q, r, n1, n0, d) \
+ __asm__ ("divs%.l %4,%1:%0" \
+ : "=d" ((USItype) (q)), \
+ "=d" ((USItype) (r)) \
+ : "0" ((USItype) (n0)), \
+ "1" ((USItype) (n1)), \
+ "dmi" ((USItype) (d)))
+
+#elif defined (__mcoldfire__) /* not mc68020 */
+
+#define umul_ppmm(xh, xl, a, b) \
+ __asm__ ("| Inlined umul_ppmm\n" \
+ " move%.l %2,%/d0\n" \
+ " move%.l %3,%/d1\n" \
+ " move%.l %/d0,%/d2\n" \
+ " swap %/d0\n" \
+ " move%.l %/d1,%/d3\n" \
+ " swap %/d1\n" \
+ " move%.w %/d2,%/d4\n" \
+ " mulu %/d3,%/d4\n" \
+ " mulu %/d1,%/d2\n" \
+ " mulu %/d0,%/d3\n" \
+ " mulu %/d0,%/d1\n" \
+ " move%.l %/d4,%/d0\n" \
+ " clr%.w %/d0\n" \
+ " swap %/d0\n" \
+ " add%.l %/d0,%/d2\n" \
+ " add%.l %/d3,%/d2\n" \
+ " jcc 1f\n" \
+ " add%.l %#65536,%/d1\n" \
+ "1: swap %/d2\n" \
+ " moveq %#0,%/d0\n" \
+ " move%.w %/d2,%/d0\n" \
+ " move%.w %/d4,%/d2\n" \
+ " move%.l %/d2,%1\n" \
+ " add%.l %/d1,%/d0\n" \
+ " move%.l %/d0,%0" \
+ : "=g" ((USItype) (xh)), \
+ "=g" ((USItype) (xl)) \
+ : "g" ((USItype) (a)), \
+ "g" ((USItype) (b)) \
+ : "d0", "d1", "d2", "d3", "d4")
+#define UMUL_TIME 100
+#define UDIV_TIME 400
+#else /* not ColdFire */
+/* %/ inserts REGISTER_PREFIX, %# inserts IMMEDIATE_PREFIX. */
+#define umul_ppmm(xh, xl, a, b) \
+ __asm__ ("| Inlined umul_ppmm\n" \
+ " move%.l %2,%/d0\n" \
+ " move%.l %3,%/d1\n" \
+ " move%.l %/d0,%/d2\n" \
+ " swap %/d0\n" \
+ " move%.l %/d1,%/d3\n" \
+ " swap %/d1\n" \
+ " move%.w %/d2,%/d4\n" \
+ " mulu %/d3,%/d4\n" \
+ " mulu %/d1,%/d2\n" \
+ " mulu %/d0,%/d3\n" \
+ " mulu %/d0,%/d1\n" \
+ " move%.l %/d4,%/d0\n" \
+ " eor%.w %/d0,%/d0\n" \
+ " swap %/d0\n" \
+ " add%.l %/d0,%/d2\n" \
+ " add%.l %/d3,%/d2\n" \
+ " jcc 1f\n" \
+ " add%.l %#65536,%/d1\n" \
+ "1: swap %/d2\n" \
+ " moveq %#0,%/d0\n" \
+ " move%.w %/d2,%/d0\n" \
+ " move%.w %/d4,%/d2\n" \
+ " move%.l %/d2,%1\n" \
+ " add%.l %/d1,%/d0\n" \
+ " move%.l %/d0,%0" \
+ : "=g" ((USItype) (xh)), \
+ "=g" ((USItype) (xl)) \
+ : "g" ((USItype) (a)), \
+ "g" ((USItype) (b)) \
+ : "d0", "d1", "d2", "d3", "d4")
+#define UMUL_TIME 100
+#define UDIV_TIME 400
+
+#endif /* not mc68020 */
+
+/* The '020, '030, '040 and '060 have bitfield insns.
+ cpu32 disguises as a 68020, but lacks them. */
+#if defined (__mc68020__) && !defined (__mcpu32__)
+#define count_leading_zeros(count, x) \
+ __asm__ ("bfffo %1{%b2:%b2},%0" \
+ : "=d" ((USItype) (count)) \
+ : "od" ((USItype) (x)), "n" (0))
+/* Some ColdFire architectures have a ff1 instruction supported via
+ __builtin_clz. */
+#elif defined (__mcfisaaplus__) || defined (__mcfisac__)
+#define count_leading_zeros(count,x) ((count) = __builtin_clz (x))
+#define COUNT_LEADING_ZEROS_0 32
+#endif
+#endif /* mc68000 */
+
+#if defined (__m88000__) && W_TYPE_SIZE == 32
+#define add_ssaaaa(sh, sl, ah, al, bh, bl) \
+ __asm__ ("addu.co %1,%r4,%r5\n\taddu.ci %0,%r2,%r3" \
+ : "=r" ((USItype) (sh)), \
+ "=&r" ((USItype) (sl)) \
+ : "%rJ" ((USItype) (ah)), \
+ "rJ" ((USItype) (bh)), \
+ "%rJ" ((USItype) (al)), \
+ "rJ" ((USItype) (bl)))
+#define sub_ddmmss(sh, sl, ah, al, bh, bl) \
+ __asm__ ("subu.co %1,%r4,%r5\n\tsubu.ci %0,%r2,%r3" \
+ : "=r" ((USItype) (sh)), \
+ "=&r" ((USItype) (sl)) \
+ : "rJ" ((USItype) (ah)), \
+ "rJ" ((USItype) (bh)), \
+ "rJ" ((USItype) (al)), \
+ "rJ" ((USItype) (bl)))
+#define count_leading_zeros(count, x) \
+ do { \
+ USItype __cbtmp; \
+ __asm__ ("ff1 %0,%1" \
+ : "=r" (__cbtmp) \
+ : "r" ((USItype) (x))); \
+ (count) = __cbtmp ^ 31; \
+ } while (0)
+#define COUNT_LEADING_ZEROS_0 63 /* sic */
+#if defined (__mc88110__)
+#define umul_ppmm(wh, wl, u, v) \
+ do { \
+ union {UDItype __ll; \
+ struct {USItype __h, __l;} __i; \
+ } __xx; \
+ __asm__ ("mulu.d %0,%1,%2" \
+ : "=r" (__xx.__ll) \
+ : "r" ((USItype) (u)), \
+ "r" ((USItype) (v))); \
+ (wh) = __xx.__i.__h; \
+ (wl) = __xx.__i.__l; \
+ } while (0)
+#define udiv_qrnnd(q, r, n1, n0, d) \
+ ({union {UDItype __ll; \
+ struct {USItype __h, __l;} __i; \
+ } __xx; \
+ USItype __q; \
+ __xx.__i.__h = (n1); __xx.__i.__l = (n0); \
+ __asm__ ("divu.d %0,%1,%2" \
+ : "=r" (__q) \
+ : "r" (__xx.__ll), \
+ "r" ((USItype) (d))); \
+ (r) = (n0) - __q * (d); (q) = __q; })
+#define UMUL_TIME 5
+#define UDIV_TIME 25
+#else
+#define UMUL_TIME 17
+#define UDIV_TIME 150
+#endif /* __mc88110__ */
+#endif /* __m88000__ */
+
+#if defined (__mn10300__)
+# if defined (__AM33__)
+# define count_leading_zeros(COUNT,X) ((COUNT) = __builtin_clz (X))
+# define umul_ppmm(w1, w0, u, v) \
+ asm("mulu %3,%2,%1,%0" : "=r"(w0), "=r"(w1) : "r"(u), "r"(v))
+# define smul_ppmm(w1, w0, u, v) \
+ asm("mul %3,%2,%1,%0" : "=r"(w0), "=r"(w1) : "r"(u), "r"(v))
+# else
+# define umul_ppmm(w1, w0, u, v) \
+ asm("nop; nop; mulu %3,%0" : "=d"(w0), "=z"(w1) : "%0"(u), "d"(v))
+# define smul_ppmm(w1, w0, u, v) \
+ asm("nop; nop; mul %3,%0" : "=d"(w0), "=z"(w1) : "%0"(u), "d"(v))
+# endif
+# define add_ssaaaa(sh, sl, ah, al, bh, bl) \
+ do { \
+ DWunion __s, __a, __b; \
+ __a.s.low = (al); __a.s.high = (ah); \
+ __b.s.low = (bl); __b.s.high = (bh); \
+ __s.ll = __a.ll + __b.ll; \
+ (sl) = __s.s.low; (sh) = __s.s.high; \
+ } while (0)
+# define sub_ddmmss(sh, sl, ah, al, bh, bl) \
+ do { \
+ DWunion __s, __a, __b; \
+ __a.s.low = (al); __a.s.high = (ah); \
+ __b.s.low = (bl); __b.s.high = (bh); \
+ __s.ll = __a.ll - __b.ll; \
+ (sl) = __s.s.low; (sh) = __s.s.high; \
+ } while (0)
+# define udiv_qrnnd(q, r, nh, nl, d) \
+ asm("divu %2,%0" : "=D"(q), "=z"(r) : "D"(d), "0"(nl), "1"(nh))
+# define sdiv_qrnnd(q, r, nh, nl, d) \
+ asm("div %2,%0" : "=D"(q), "=z"(r) : "D"(d), "0"(nl), "1"(nh))
+# define UMUL_TIME 3
+# define UDIV_TIME 38
+#endif
+
+#if defined (__mips__) && W_TYPE_SIZE == 32
+#define umul_ppmm(w1, w0, u, v) \
+ do { \
+ UDItype __x = (UDItype) (USItype) (u) * (USItype) (v); \
+ (w1) = (USItype) (__x >> 32); \
+ (w0) = (USItype) (__x); \
+ } while (0)
+#define UMUL_TIME 10
+#define UDIV_TIME 100
+
+#if (__mips == 32 || __mips == 64) && ! defined (__mips16)
+#define count_leading_zeros(COUNT,X) ((COUNT) = __builtin_clz (X))
+#define COUNT_LEADING_ZEROS_0 32
+#endif
+#endif /* __mips__ */
+
+#if defined (__ns32000__) && W_TYPE_SIZE == 32
+#define umul_ppmm(w1, w0, u, v) \
+ ({union {UDItype __ll; \
+ struct {USItype __l, __h;} __i; \
+ } __xx; \
+ __asm__ ("meid %2,%0" \
+ : "=g" (__xx.__ll) \
+ : "%0" ((USItype) (u)), \
+ "g" ((USItype) (v))); \
+ (w1) = __xx.__i.__h; (w0) = __xx.__i.__l;})
+#define __umulsidi3(u, v) \
+ ({UDItype __w; \
+ __asm__ ("meid %2,%0" \
+ : "=g" (__w) \
+ : "%0" ((USItype) (u)), \
+ "g" ((USItype) (v))); \
+ __w; })
+#define udiv_qrnnd(q, r, n1, n0, d) \
+ ({union {UDItype __ll; \
+ struct {USItype __l, __h;} __i; \
+ } __xx; \
+ __xx.__i.__h = (n1); __xx.__i.__l = (n0); \
+ __asm__ ("deid %2,%0" \
+ : "=g" (__xx.__ll) \
+ : "0" (__xx.__ll), \
+ "g" ((USItype) (d))); \
+ (r) = __xx.__i.__l; (q) = __xx.__i.__h; })
+#define count_trailing_zeros(count,x) \
+ do { \
+ __asm__ ("ffsd %2,%0" \
+ : "=r" ((USItype) (count)) \
+ : "0" ((USItype) 0), \
+ "r" ((USItype) (x))); \
+ } while (0)
+#endif /* __ns32000__ */
+
+/* FIXME: We should test _IBMR2 here when we add assembly support for the
+ system vendor compilers.
+ FIXME: What's needed for gcc PowerPC VxWorks? __vxworks__ is not good
+ enough, since that hits ARM and m68k too. */
+#if (defined (_ARCH_PPC) /* AIX */ \
+ || defined (__powerpc__) /* gcc */ \
+ || defined (__POWERPC__) /* BEOS */ \
+ || defined (__ppc__) /* Darwin */ \
+ || (defined (PPC) && ! defined (CPU_FAMILY)) /* gcc 2.7.x GNU&SysV */ \
+ || (defined (PPC) && defined (CPU_FAMILY) /* VxWorks */ \
+ && CPU_FAMILY == PPC) \
+ ) && W_TYPE_SIZE == 32
+#define add_ssaaaa(sh, sl, ah, al, bh, bl) \
+ do { \
+ if (__builtin_constant_p (bh) && (bh) == 0) \
+ __asm__ ("add%I4c %1,%3,%4\n\taddze %0,%2" \
+ : "=r" (sh), "=&r" (sl) : "r" (ah), "%r" (al), "rI" (bl));\
+ else if (__builtin_constant_p (bh) && (bh) == ~(USItype) 0) \
+ __asm__ ("add%I4c %1,%3,%4\n\taddme %0,%2" \
+ : "=r" (sh), "=&r" (sl) : "r" (ah), "%r" (al), "rI" (bl));\
+ else \
+ __asm__ ("add%I5c %1,%4,%5\n\tadde %0,%2,%3" \
+ : "=r" (sh), "=&r" (sl) \
+ : "%r" (ah), "r" (bh), "%r" (al), "rI" (bl)); \
+ } while (0)
+#define sub_ddmmss(sh, sl, ah, al, bh, bl) \
+ do { \
+ if (__builtin_constant_p (ah) && (ah) == 0) \
+ __asm__ ("subf%I3c %1,%4,%3\n\tsubfze %0,%2" \
+ : "=r" (sh), "=&r" (sl) : "r" (bh), "rI" (al), "r" (bl));\
+ else if (__builtin_constant_p (ah) && (ah) == ~(USItype) 0) \
+ __asm__ ("subf%I3c %1,%4,%3\n\tsubfme %0,%2" \
+ : "=r" (sh), "=&r" (sl) : "r" (bh), "rI" (al), "r" (bl));\
+ else if (__builtin_constant_p (bh) && (bh) == 0) \
+ __asm__ ("subf%I3c %1,%4,%3\n\taddme %0,%2" \
+ : "=r" (sh), "=&r" (sl) : "r" (ah), "rI" (al), "r" (bl));\
+ else if (__builtin_constant_p (bh) && (bh) == ~(USItype) 0) \
+ __asm__ ("subf%I3c %1,%4,%3\n\taddze %0,%2" \
+ : "=r" (sh), "=&r" (sl) : "r" (ah), "rI" (al), "r" (bl));\
+ else \
+ __asm__ ("subf%I4c %1,%5,%4\n\tsubfe %0,%3,%2" \
+ : "=r" (sh), "=&r" (sl) \
+ : "r" (ah), "r" (bh), "rI" (al), "r" (bl)); \
+ } while (0)
+#define count_leading_zeros(count, x) \
+ __asm__ ("cntlzw %0,%1" : "=r" (count) : "r" (x))
+#define COUNT_LEADING_ZEROS_0 32
+#if defined (_ARCH_PPC) || defined (__powerpc__) || defined (__POWERPC__) \
+ || defined (__ppc__) \
+ || (defined (PPC) && ! defined (CPU_FAMILY)) /* gcc 2.7.x GNU&SysV */ \
+ || (defined (PPC) && defined (CPU_FAMILY) /* VxWorks */ \
+ && CPU_FAMILY == PPC)
+#define umul_ppmm(ph, pl, m0, m1) \
+ do { \
+ USItype __m0 = (m0), __m1 = (m1); \
+ __asm__ ("mulhwu %0,%1,%2" : "=r" (ph) : "%r" (m0), "r" (m1)); \
+ (pl) = __m0 * __m1; \
+ } while (0)
+#define UMUL_TIME 15
+#define smul_ppmm(ph, pl, m0, m1) \
+ do { \
+ SItype __m0 = (m0), __m1 = (m1); \
+ __asm__ ("mulhw %0,%1,%2" : "=r" (ph) : "%r" (m0), "r" (m1)); \
+ (pl) = __m0 * __m1; \
+ } while (0)
+#define SMUL_TIME 14
+#define UDIV_TIME 120
+#endif
+#endif /* 32-bit POWER architecture variants. */
+
+/* We should test _IBMR2 here when we add assembly support for the system
+ vendor compilers. */
+#if (defined (_ARCH_PPC64) || defined (__powerpc64__)) && W_TYPE_SIZE == 64
+#define add_ssaaaa(sh, sl, ah, al, bh, bl) \
+ do { \
+ if (__builtin_constant_p (bh) && (bh) == 0) \
+ __asm__ ("add%I4c %1,%3,%4\n\taddze %0,%2" \
+ : "=r" (sh), "=&r" (sl) : "r" (ah), "%r" (al), "rI" (bl));\
+ else if (__builtin_constant_p (bh) && (bh) == ~(UDItype) 0) \
+ __asm__ ("add%I4c %1,%3,%4\n\taddme %0,%2" \
+ : "=r" (sh), "=&r" (sl) : "r" (ah), "%r" (al), "rI" (bl));\
+ else \
+ __asm__ ("add%I5c %1,%4,%5\n\tadde %0,%2,%3" \
+ : "=r" (sh), "=&r" (sl) \
+ : "%r" (ah), "r" (bh), "%r" (al), "rI" (bl)); \
+ } while (0)
+#define sub_ddmmss(sh, sl, ah, al, bh, bl) \
+ do { \
+ if (__builtin_constant_p (ah) && (ah) == 0) \
+ __asm__ ("subf%I3c %1,%4,%3\n\tsubfze %0,%2" \
+ : "=r" (sh), "=&r" (sl) : "r" (bh), "rI" (al), "r" (bl));\
+ else if (__builtin_constant_p (ah) && (ah) == ~(UDItype) 0) \
+ __asm__ ("subf%I3c %1,%4,%3\n\tsubfme %0,%2" \
+ : "=r" (sh), "=&r" (sl) : "r" (bh), "rI" (al), "r" (bl));\
+ else if (__builtin_constant_p (bh) && (bh) == 0) \
+ __asm__ ("subf%I3c %1,%4,%3\n\taddme %0,%2" \
+ : "=r" (sh), "=&r" (sl) : "r" (ah), "rI" (al), "r" (bl));\
+ else if (__builtin_constant_p (bh) && (bh) == ~(UDItype) 0) \
+ __asm__ ("subf%I3c %1,%4,%3\n\taddze %0,%2" \
+ : "=r" (sh), "=&r" (sl) : "r" (ah), "rI" (al), "r" (bl));\
+ else \
+ __asm__ ("subf%I4c %1,%5,%4\n\tsubfe %0,%3,%2" \
+ : "=r" (sh), "=&r" (sl) \
+ : "r" (ah), "r" (bh), "rI" (al), "r" (bl)); \
+ } while (0)
+#define count_leading_zeros(count, x) \
+ __asm__ ("cntlzd %0,%1" : "=r" (count) : "r" (x))
+#define COUNT_LEADING_ZEROS_0 64
+#define umul_ppmm(ph, pl, m0, m1) \
+ do { \
+ UDItype __m0 = (m0), __m1 = (m1); \
+ __asm__ ("mulhdu %0,%1,%2" : "=r" (ph) : "%r" (m0), "r" (m1)); \
+ (pl) = __m0 * __m1; \
+ } while (0)
+#define UMUL_TIME 15
+#define smul_ppmm(ph, pl, m0, m1) \
+ do { \
+ DItype __m0 = (m0), __m1 = (m1); \
+ __asm__ ("mulhd %0,%1,%2" : "=r" (ph) : "%r" (m0), "r" (m1)); \
+ (pl) = __m0 * __m1; \
+ } while (0)
+#define SMUL_TIME 14 /* ??? */
+#define UDIV_TIME 120 /* ??? */
+#endif /* 64-bit PowerPC. */
+
+#if defined (__ibm032__) /* RT/ROMP */ && W_TYPE_SIZE == 32
+#define add_ssaaaa(sh, sl, ah, al, bh, bl) \
+ __asm__ ("a %1,%5\n\tae %0,%3" \
+ : "=r" ((USItype) (sh)), \
+ "=&r" ((USItype) (sl)) \
+ : "%0" ((USItype) (ah)), \
+ "r" ((USItype) (bh)), \
+ "%1" ((USItype) (al)), \
+ "r" ((USItype) (bl)))
+#define sub_ddmmss(sh, sl, ah, al, bh, bl) \
+ __asm__ ("s %1,%5\n\tse %0,%3" \
+ : "=r" ((USItype) (sh)), \
+ "=&r" ((USItype) (sl)) \
+ : "0" ((USItype) (ah)), \
+ "r" ((USItype) (bh)), \
+ "1" ((USItype) (al)), \
+ "r" ((USItype) (bl)))
+#define umul_ppmm(ph, pl, m0, m1) \
+ do { \
+ USItype __m0 = (m0), __m1 = (m1); \
+ __asm__ ( \
+ "s r2,r2\n" \
+" mts r10,%2\n" \
+" m r2,%3\n" \
+" m r2,%3\n" \
+" m r2,%3\n" \
+" m r2,%3\n" \
+" m r2,%3\n" \
+" m r2,%3\n" \
+" m r2,%3\n" \
+" m r2,%3\n" \
+" m r2,%3\n" \
+" m r2,%3\n" \
+" m r2,%3\n" \
+" m r2,%3\n" \
+" m r2,%3\n" \
+" m r2,%3\n" \
+" m r2,%3\n" \
+" m r2,%3\n" \
+" cas %0,r2,r0\n" \
+" mfs r10,%1" \
+ : "=r" ((USItype) (ph)), \
+ "=r" ((USItype) (pl)) \
+ : "%r" (__m0), \
+ "r" (__m1) \
+ : "r2"); \
+ (ph) += ((((SItype) __m0 >> 31) & __m1) \
+ + (((SItype) __m1 >> 31) & __m0)); \
+ } while (0)
+#define UMUL_TIME 20
+#define UDIV_TIME 200
+#define count_leading_zeros(count, x) \
+ do { \
+ if ((x) >= 0x10000) \
+ __asm__ ("clz %0,%1" \
+ : "=r" ((USItype) (count)) \
+ : "r" ((USItype) (x) >> 16)); \
+ else \
+ { \
+ __asm__ ("clz %0,%1" \
+ : "=r" ((USItype) (count)) \
+ : "r" ((USItype) (x))); \
+ (count) += 16; \
+ } \
+ } while (0)
+#endif
+
+#if defined(__sh__) && (!defined (__SHMEDIA__) || !__SHMEDIA__) && W_TYPE_SIZE == 32
+#ifndef __sh1__
+#define umul_ppmm(w1, w0, u, v) \
+ __asm__ ( \
+ "dmulu.l %2,%3\n\tsts%M1 macl,%1\n\tsts%M0 mach,%0" \
+ : "=r<" ((USItype)(w1)), \
+ "=r<" ((USItype)(w0)) \
+ : "r" ((USItype)(u)), \
+ "r" ((USItype)(v)) \
+ : "macl", "mach")
+#define UMUL_TIME 5
+#endif
+
+/* This is the same algorithm as __udiv_qrnnd_c. */
+#define UDIV_NEEDS_NORMALIZATION 1
+
+#ifdef __FDPIC__
+/* FDPIC needs a special version of the asm fragment to extract the
+ code address from the function descriptor. __udiv_qrnnd_16 is
+ assumed to be local and not to use the GOT, so loading r12 is
+ not needed. */
+#define udiv_qrnnd(q, r, n1, n0, d) \
+ do { \
+ extern UWtype __udiv_qrnnd_16 (UWtype, UWtype) \
+ __attribute__ ((visibility ("hidden"))); \
+ /* r0: rn r1: qn */ /* r0: n1 r4: n0 r5: d r6: d1 */ /* r2: __m */ \
+ __asm__ ( \
+ "mov%M4 %4,r5\n" \
+" swap.w %3,r4\n" \
+" swap.w r5,r6\n" \
+" mov.l @%5,r2\n" \
+" jsr @r2\n" \
+" shll16 r6\n" \
+" swap.w r4,r4\n" \
+" mov.l @%5,r2\n" \
+" jsr @r2\n" \
+" swap.w r1,%0\n" \
+" or r1,%0" \
+ : "=r" (q), "=&z" (r) \
+ : "1" (n1), "r" (n0), "rm" (d), "r" (&__udiv_qrnnd_16) \
+ : "r1", "r2", "r4", "r5", "r6", "pr", "t"); \
+ } while (0)
+#else
+#define udiv_qrnnd(q, r, n1, n0, d) \
+ do { \
+ extern UWtype __udiv_qrnnd_16 (UWtype, UWtype) \
+ __attribute__ ((visibility ("hidden"))); \
+ /* r0: rn r1: qn */ /* r0: n1 r4: n0 r5: d r6: d1 */ /* r2: __m */ \
+ __asm__ ( \
+ "mov%M4 %4,r5\n" \
+" swap.w %3,r4\n" \
+" swap.w r5,r6\n" \
+" jsr @%5\n" \
+" shll16 r6\n" \
+" swap.w r4,r4\n" \
+" jsr @%5\n" \
+" swap.w r1,%0\n" \
+" or r1,%0" \
+ : "=r" (q), "=&z" (r) \
+ : "1" (n1), "r" (n0), "rm" (d), "r" (&__udiv_qrnnd_16) \
+ : "r1", "r2", "r4", "r5", "r6", "pr", "t"); \
+ } while (0)
+#endif /* __FDPIC__ */
+
+#define UDIV_TIME 80
+
+#define sub_ddmmss(sh, sl, ah, al, bh, bl) \
+ __asm__ ("clrt;subc %5,%1; subc %4,%0" \
+ : "=r" (sh), "=r" (sl) \
+ : "0" (ah), "1" (al), "r" (bh), "r" (bl) : "t")
+
+#endif /* __sh__ */
+
+#if defined (__SH5__) && defined (__SHMEDIA__) && __SHMEDIA__ && W_TYPE_SIZE == 32
+#define __umulsidi3(u,v) ((UDItype)(USItype)u*(USItype)v)
+#define count_leading_zeros(count, x) \
+ do \
+ { \
+ UDItype x_ = (USItype)(x); \
+ SItype c_; \
+ \
+ __asm__ ("nsb %1, %0" : "=r" (c_) : "r" (x_)); \
+ (count) = c_ - 31; \
+ } \
+ while (0)
+#define COUNT_LEADING_ZEROS_0 32
+#endif
+
+#if defined (__sparc__) && !defined (__arch64__) && !defined (__sparcv9) \
+ && W_TYPE_SIZE == 32
+#define add_ssaaaa(sh, sl, ah, al, bh, bl) \
+ __asm__ ("addcc %r4,%5,%1\n\taddx %r2,%3,%0" \
+ : "=r" ((USItype) (sh)), \
+ "=&r" ((USItype) (sl)) \
+ : "%rJ" ((USItype) (ah)), \
+ "rI" ((USItype) (bh)), \
+ "%rJ" ((USItype) (al)), \
+ "rI" ((USItype) (bl)) \
+ __CLOBBER_CC)
+#define sub_ddmmss(sh, sl, ah, al, bh, bl) \
+ __asm__ ("subcc %r4,%5,%1\n\tsubx %r2,%3,%0" \
+ : "=r" ((USItype) (sh)), \
+ "=&r" ((USItype) (sl)) \
+ : "rJ" ((USItype) (ah)), \
+ "rI" ((USItype) (bh)), \
+ "rJ" ((USItype) (al)), \
+ "rI" ((USItype) (bl)) \
+ __CLOBBER_CC)
+#if defined (__sparc_v9__)
+#define umul_ppmm(w1, w0, u, v) \
+ do { \
+ register USItype __g1 asm ("g1"); \
+ __asm__ ("umul\t%2,%3,%1\n\t" \
+ "srlx\t%1, 32, %0" \
+ : "=r" ((USItype) (w1)), \
+ "=r" (__g1) \
+ : "r" ((USItype) (u)), \
+ "r" ((USItype) (v))); \
+ (w0) = __g1; \
+ } while (0)
+#define udiv_qrnnd(__q, __r, __n1, __n0, __d) \
+ __asm__ ("mov\t%2,%%y\n\t" \
+ "udiv\t%3,%4,%0\n\t" \
+ "umul\t%0,%4,%1\n\t" \
+ "sub\t%3,%1,%1" \
+ : "=&r" ((USItype) (__q)), \
+ "=&r" ((USItype) (__r)) \
+ : "r" ((USItype) (__n1)), \
+ "r" ((USItype) (__n0)), \
+ "r" ((USItype) (__d)))
+#else
+#if defined (__sparc_v8__)
+#define umul_ppmm(w1, w0, u, v) \
+ __asm__ ("umul %2,%3,%1;rd %%y,%0" \
+ : "=r" ((USItype) (w1)), \
+ "=r" ((USItype) (w0)) \
+ : "r" ((USItype) (u)), \
+ "r" ((USItype) (v)))
+#define udiv_qrnnd(__q, __r, __n1, __n0, __d) \
+ __asm__ ("mov %2,%%y;nop;nop;nop;udiv %3,%4,%0;umul %0,%4,%1;sub %3,%1,%1"\
+ : "=&r" ((USItype) (__q)), \
+ "=&r" ((USItype) (__r)) \
+ : "r" ((USItype) (__n1)), \
+ "r" ((USItype) (__n0)), \
+ "r" ((USItype) (__d)))
+#else
+#if defined (__sparclite__)
+/* This has hardware multiply but not divide. It also has two additional
+ instructions scan (ffs from high bit) and divscc. */
+#define umul_ppmm(w1, w0, u, v) \
+ __asm__ ("umul %2,%3,%1;rd %%y,%0" \
+ : "=r" ((USItype) (w1)), \
+ "=r" ((USItype) (w0)) \
+ : "r" ((USItype) (u)), \
+ "r" ((USItype) (v)))
+#define udiv_qrnnd(q, r, n1, n0, d) \
+ __asm__ ("! Inlined udiv_qrnnd\n" \
+" wr %%g0,%2,%%y ! Not a delayed write for sparclite\n" \
+" tst %%g0\n" \
+" divscc %3,%4,%%g1\n" \
+" divscc %%g1,%4,%%g1\n" \
+" divscc %%g1,%4,%%g1\n" \
+" divscc %%g1,%4,%%g1\n" \
+" divscc %%g1,%4,%%g1\n" \
+" divscc %%g1,%4,%%g1\n" \
+" divscc %%g1,%4,%%g1\n" \
+" divscc %%g1,%4,%%g1\n" \
+" divscc %%g1,%4,%%g1\n" \
+" divscc %%g1,%4,%%g1\n" \
+" divscc %%g1,%4,%%g1\n" \
+" divscc %%g1,%4,%%g1\n" \
+" divscc %%g1,%4,%%g1\n" \
+" divscc %%g1,%4,%%g1\n" \
+" divscc %%g1,%4,%%g1\n" \
+" divscc %%g1,%4,%%g1\n" \
+" divscc %%g1,%4,%%g1\n" \
+" divscc %%g1,%4,%%g1\n" \
+" divscc %%g1,%4,%%g1\n" \
+" divscc %%g1,%4,%%g1\n" \
+" divscc %%g1,%4,%%g1\n" \
+" divscc %%g1,%4,%%g1\n" \
+" divscc %%g1,%4,%%g1\n" \
+" divscc %%g1,%4,%%g1\n" \
+" divscc %%g1,%4,%%g1\n" \
+" divscc %%g1,%4,%%g1\n" \
+" divscc %%g1,%4,%%g1\n" \
+" divscc %%g1,%4,%%g1\n" \
+" divscc %%g1,%4,%%g1\n" \
+" divscc %%g1,%4,%%g1\n" \
+" divscc %%g1,%4,%%g1\n" \
+" divscc %%g1,%4,%0\n" \
+" rd %%y,%1\n" \
+" bl,a 1f\n" \
+" add %1,%4,%1\n" \
+"1: ! End of inline udiv_qrnnd" \
+ : "=r" ((USItype) (q)), \
+ "=r" ((USItype) (r)) \
+ : "r" ((USItype) (n1)), \
+ "r" ((USItype) (n0)), \
+ "rI" ((USItype) (d)) \
+ : "g1" __AND_CLOBBER_CC)
+#define UDIV_TIME 37
+#define count_leading_zeros(count, x) \
+ do { \
+ __asm__ ("scan %1,1,%0" \
+ : "=r" ((USItype) (count)) \
+ : "r" ((USItype) (x))); \
+ } while (0)
+/* Early sparclites return 63 for an argument of 0, but they warn that future
+ implementations might change this. Therefore, leave COUNT_LEADING_ZEROS_0
+ undefined. */
+#else
+/* SPARC without integer multiplication and divide instructions.
+ (i.e. at least Sun4/20,40,60,65,75,110,260,280,330,360,380,470,490) */
+#define umul_ppmm(w1, w0, u, v) \
+ __asm__ ("! Inlined umul_ppmm\n" \
+" wr %%g0,%2,%%y ! SPARC has 0-3 delay insn after a wr\n"\
+" sra %3,31,%%o5 ! Don't move this insn\n" \
+" and %2,%%o5,%%o5 ! Don't move this insn\n" \
+" andcc %%g0,0,%%g1 ! Don't move this insn\n" \
+" mulscc %%g1,%3,%%g1\n" \
+" mulscc %%g1,%3,%%g1\n" \
+" mulscc %%g1,%3,%%g1\n" \
+" mulscc %%g1,%3,%%g1\n" \
+" mulscc %%g1,%3,%%g1\n" \
+" mulscc %%g1,%3,%%g1\n" \
+" mulscc %%g1,%3,%%g1\n" \
+" mulscc %%g1,%3,%%g1\n" \
+" mulscc %%g1,%3,%%g1\n" \
+" mulscc %%g1,%3,%%g1\n" \
+" mulscc %%g1,%3,%%g1\n" \
+" mulscc %%g1,%3,%%g1\n" \
+" mulscc %%g1,%3,%%g1\n" \
+" mulscc %%g1,%3,%%g1\n" \
+" mulscc %%g1,%3,%%g1\n" \
+" mulscc %%g1,%3,%%g1\n" \
+" mulscc %%g1,%3,%%g1\n" \
+" mulscc %%g1,%3,%%g1\n" \
+" mulscc %%g1,%3,%%g1\n" \
+" mulscc %%g1,%3,%%g1\n" \
+" mulscc %%g1,%3,%%g1\n" \
+" mulscc %%g1,%3,%%g1\n" \
+" mulscc %%g1,%3,%%g1\n" \
+" mulscc %%g1,%3,%%g1\n" \
+" mulscc %%g1,%3,%%g1\n" \
+" mulscc %%g1,%3,%%g1\n" \
+" mulscc %%g1,%3,%%g1\n" \
+" mulscc %%g1,%3,%%g1\n" \
+" mulscc %%g1,%3,%%g1\n" \
+" mulscc %%g1,%3,%%g1\n" \
+" mulscc %%g1,%3,%%g1\n" \
+" mulscc %%g1,%3,%%g1\n" \
+" mulscc %%g1,0,%%g1\n" \
+" add %%g1,%%o5,%0\n" \
+" rd %%y,%1" \
+ : "=r" ((USItype) (w1)), \
+ "=r" ((USItype) (w0)) \
+ : "%rI" ((USItype) (u)), \
+ "r" ((USItype) (v)) \
+ : "g1", "o5" __AND_CLOBBER_CC)
+#define UMUL_TIME 39 /* 39 instructions */
+/* It's quite necessary to add this much assembler for the sparc.
+ The default udiv_qrnnd (in C) is more than 10 times slower! */
+#define udiv_qrnnd(__q, __r, __n1, __n0, __d) \
+ __asm__ ("! Inlined udiv_qrnnd\n" \
+" mov 32,%%g1\n" \
+" subcc %1,%2,%%g0\n" \
+"1: bcs 5f\n" \
+" addxcc %0,%0,%0 ! shift n1n0 and a q-bit in lsb\n" \
+" sub %1,%2,%1 ! this kills msb of n\n" \
+" addx %1,%1,%1 ! so this can't give carry\n" \
+" subcc %%g1,1,%%g1\n" \
+"2: bne 1b\n" \
+" subcc %1,%2,%%g0\n" \
+" bcs 3f\n" \
+" addxcc %0,%0,%0 ! shift n1n0 and a q-bit in lsb\n" \
+" b 3f\n" \
+" sub %1,%2,%1 ! this kills msb of n\n" \
+"4: sub %1,%2,%1\n" \
+"5: addxcc %1,%1,%1\n" \
+" bcc 2b\n" \
+" subcc %%g1,1,%%g1\n" \
+"! Got carry from n. Subtract next step to cancel this carry.\n" \
+" bne 4b\n" \
+" addcc %0,%0,%0 ! shift n1n0 and a 0-bit in lsb\n" \
+" sub %1,%2,%1\n" \
+"3: xnor %0,0,%0\n" \
+" ! End of inline udiv_qrnnd" \
+ : "=&r" ((USItype) (__q)), \
+ "=&r" ((USItype) (__r)) \
+ : "r" ((USItype) (__d)), \
+ "1" ((USItype) (__n1)), \
+ "0" ((USItype) (__n0)) : "g1" __AND_CLOBBER_CC)
+#define UDIV_TIME (3+7*32) /* 7 instructions/iteration. 32 iterations. */
+#endif /* __sparclite__ */
+#endif /* __sparc_v8__ */
+#endif /* __sparc_v9__ */
+#endif /* sparc32 */
+
+#if ((defined (__sparc__) && defined (__arch64__)) || defined (__sparcv9)) \
+ && W_TYPE_SIZE == 64
+#define add_ssaaaa(sh, sl, ah, al, bh, bl) \
+ do { \
+ UDItype __carry = 0; \
+ __asm__ ("addcc\t%r5,%6,%1\n\t" \
+ "add\t%r3,%4,%0\n\t" \
+ "movcs\t%%xcc, 1, %2\n\t" \
+ "add\t%0, %2, %0" \
+ : "=r" ((UDItype)(sh)), \
+ "=&r" ((UDItype)(sl)), \
+ "+r" (__carry) \
+ : "%rJ" ((UDItype)(ah)), \
+ "rI" ((UDItype)(bh)), \
+ "%rJ" ((UDItype)(al)), \
+ "rI" ((UDItype)(bl)) \
+ __CLOBBER_CC); \
+ } while (0)
+
+#define sub_ddmmss(sh, sl, ah, al, bh, bl) \
+ do { \
+ UDItype __carry = 0; \
+ __asm__ ("subcc\t%r5,%6,%1\n\t" \
+ "sub\t%r3,%4,%0\n\t" \
+ "movcs\t%%xcc, 1, %2\n\t" \
+ "sub\t%0, %2, %0" \
+ : "=r" ((UDItype)(sh)), \
+ "=&r" ((UDItype)(sl)), \
+ "+r" (__carry) \
+ : "%rJ" ((UDItype)(ah)), \
+ "rI" ((UDItype)(bh)), \
+ "%rJ" ((UDItype)(al)), \
+ "rI" ((UDItype)(bl)) \
+ __CLOBBER_CC); \
+ } while (0)
+
+#define umul_ppmm(wh, wl, u, v) \
+ do { \
+ UDItype tmp1, tmp2, tmp3, tmp4; \
+ __asm__ __volatile__ ( \
+ "srl %7,0,%3\n\t" \
+ "mulx %3,%6,%1\n\t" \
+ "srlx %6,32,%2\n\t" \
+ "mulx %2,%3,%4\n\t" \
+ "sllx %4,32,%5\n\t" \
+ "srl %6,0,%3\n\t" \
+ "sub %1,%5,%5\n\t" \
+ "srlx %5,32,%5\n\t" \
+ "addcc %4,%5,%4\n\t" \
+ "srlx %7,32,%5\n\t" \
+ "mulx %3,%5,%3\n\t" \
+ "mulx %2,%5,%5\n\t" \
+ "sethi %%hi(0x80000000),%2\n\t" \
+ "addcc %4,%3,%4\n\t" \
+ "srlx %4,32,%4\n\t" \
+ "add %2,%2,%2\n\t" \
+ "movcc %%xcc,%%g0,%2\n\t" \
+ "addcc %5,%4,%5\n\t" \
+ "sllx %3,32,%3\n\t" \
+ "add %1,%3,%1\n\t" \
+ "add %5,%2,%0" \
+ : "=r" ((UDItype)(wh)), \
+ "=&r" ((UDItype)(wl)), \
+ "=&r" (tmp1), "=&r" (tmp2), "=&r" (tmp3), "=&r" (tmp4) \
+ : "r" ((UDItype)(u)), \
+ "r" ((UDItype)(v)) \
+ __CLOBBER_CC); \
+ } while (0)
+#define UMUL_TIME 96
+#define UDIV_TIME 230
+#endif /* sparc64 */
+
+#if defined (__vax__) && W_TYPE_SIZE == 32
+#define add_ssaaaa(sh, sl, ah, al, bh, bl) \
+ __asm__ ("addl2 %5,%1\n\tadwc %3,%0" \
+ : "=g" ((USItype) (sh)), \
+ "=&g" ((USItype) (sl)) \
+ : "%0" ((USItype) (ah)), \
+ "g" ((USItype) (bh)), \
+ "%1" ((USItype) (al)), \
+ "g" ((USItype) (bl)))
+#define sub_ddmmss(sh, sl, ah, al, bh, bl) \
+ __asm__ ("subl2 %5,%1\n\tsbwc %3,%0" \
+ : "=g" ((USItype) (sh)), \
+ "=&g" ((USItype) (sl)) \
+ : "0" ((USItype) (ah)), \
+ "g" ((USItype) (bh)), \
+ "1" ((USItype) (al)), \
+ "g" ((USItype) (bl)))
+#define umul_ppmm(xh, xl, m0, m1) \
+ do { \
+ union { \
+ UDItype __ll; \
+ struct {USItype __l, __h;} __i; \
+ } __xx; \
+ USItype __m0 = (m0), __m1 = (m1); \
+ __asm__ ("emul %1,%2,$0,%0" \
+ : "=r" (__xx.__ll) \
+ : "g" (__m0), \
+ "g" (__m1)); \
+ (xh) = __xx.__i.__h; \
+ (xl) = __xx.__i.__l; \
+ (xh) += ((((SItype) __m0 >> 31) & __m1) \
+ + (((SItype) __m1 >> 31) & __m0)); \
+ } while (0)
+#define sdiv_qrnnd(q, r, n1, n0, d) \
+ do { \
+ union {DItype __ll; \
+ struct {SItype __l, __h;} __i; \
+ } __xx; \
+ __xx.__i.__h = n1; __xx.__i.__l = n0; \
+ __asm__ ("ediv %3,%2,%0,%1" \
+ : "=g" (q), "=g" (r) \
+ : "g" (__xx.__ll), "g" (d)); \
+ } while (0)
+#endif /* __vax__ */
+
+#ifdef _TMS320C6X
+#define add_ssaaaa(sh, sl, ah, al, bh, bl) \
+ do \
+ { \
+ UDItype __ll; \
+ __asm__ ("addu .l1 %1, %2, %0" \
+ : "=a" (__ll) : "a" (al), "a" (bl)); \
+ (sl) = (USItype)__ll; \
+ (sh) = ((USItype)(__ll >> 32)) + (ah) + (bh); \
+ } \
+ while (0)
+
+#ifdef _TMS320C6400_PLUS
+#define __umulsidi3(u,v) ((UDItype)(USItype)u*(USItype)v)
+#define umul_ppmm(w1, w0, u, v) \
+ do { \
+ UDItype __x = (UDItype) (USItype) (u) * (USItype) (v); \
+ (w1) = (USItype) (__x >> 32); \
+ (w0) = (USItype) (__x); \
+ } while (0)
+#endif /* _TMS320C6400_PLUS */
+
+#define count_leading_zeros(count, x) ((count) = __builtin_clz (x))
+#ifdef _TMS320C6400
+#define count_trailing_zeros(count, x) ((count) = __builtin_ctz (x))
+#endif
+#define UMUL_TIME 4
+#define UDIV_TIME 40
+#endif /* _TMS320C6X */
+
+#if defined (__xtensa__) && W_TYPE_SIZE == 32
+/* This code is not Xtensa-configuration-specific, so rely on the compiler
+ to expand builtin functions depending on what configuration features
+ are available. This avoids library calls when the operation can be
+ performed in-line. */
+#define umul_ppmm(w1, w0, u, v) \
+ do { \
+ DWunion __w; \
+ __w.ll = __builtin_umulsidi3 (u, v); \
+ w1 = __w.s.high; \
+ w0 = __w.s.low; \
+ } while (0)
+#define __umulsidi3(u, v) __builtin_umulsidi3 (u, v)
+#define count_leading_zeros(COUNT, X) ((COUNT) = __builtin_clz (X))
+#define count_trailing_zeros(COUNT, X) ((COUNT) = __builtin_ctz (X))
+#endif /* __xtensa__ */
+
+#if defined xstormy16
+extern UHItype __stormy16_count_leading_zeros (UHItype);
+#define count_leading_zeros(count, x) \
+ do \
+ { \
+ UHItype size; \
+ \
+ /* We assume that W_TYPE_SIZE is a multiple of 16... */ \
+ for ((count) = 0, size = W_TYPE_SIZE; size; size -= 16) \
+ { \
+ UHItype c; \
+ \
+ c = __clzhi2 ((x) >> (size - 16)); \
+ (count) += c; \
+ if (c != 16) \
+ break; \
+ } \
+ } \
+ while (0)
+#define COUNT_LEADING_ZEROS_0 W_TYPE_SIZE
+#endif
+
+#if defined (__z8000__) && W_TYPE_SIZE == 16
+#define add_ssaaaa(sh, sl, ah, al, bh, bl) \
+ __asm__ ("add %H1,%H5\n\tadc %H0,%H3" \
+ : "=r" ((unsigned int)(sh)), \
+ "=&r" ((unsigned int)(sl)) \
+ : "%0" ((unsigned int)(ah)), \
+ "r" ((unsigned int)(bh)), \
+ "%1" ((unsigned int)(al)), \
+ "rQR" ((unsigned int)(bl)))
+#define sub_ddmmss(sh, sl, ah, al, bh, bl) \
+ __asm__ ("sub %H1,%H5\n\tsbc %H0,%H3" \
+ : "=r" ((unsigned int)(sh)), \
+ "=&r" ((unsigned int)(sl)) \
+ : "0" ((unsigned int)(ah)), \
+ "r" ((unsigned int)(bh)), \
+ "1" ((unsigned int)(al)), \
+ "rQR" ((unsigned int)(bl)))
+#define umul_ppmm(xh, xl, m0, m1) \
+ do { \
+ union {long int __ll; \
+ struct {unsigned int __h, __l;} __i; \
+ } __xx; \
+ unsigned int __m0 = (m0), __m1 = (m1); \
+ __asm__ ("mult %S0,%H3" \
+ : "=r" (__xx.__i.__h), \
+ "=r" (__xx.__i.__l) \
+ : "%1" (__m0), \
+ "rQR" (__m1)); \
+ (xh) = __xx.__i.__h; (xl) = __xx.__i.__l; \
+ (xh) += ((((signed int) __m0 >> 15) & __m1) \
+ + (((signed int) __m1 >> 15) & __m0)); \
+ } while (0)
+#endif /* __z8000__ */
+
+#endif /* __GNUC__ */
+
+/* If this machine has no inline assembler, use C macros. */
+
+#if !defined (add_ssaaaa)
+#define add_ssaaaa(sh, sl, ah, al, bh, bl) \
+ do { \
+ UWtype __x; \
+ __x = (al) + (bl); \
+ (sh) = (ah) + (bh) + (__x < (al)); \
+ (sl) = __x; \
+ } while (0)
+#endif
+
+#if !defined (sub_ddmmss)
+#define sub_ddmmss(sh, sl, ah, al, bh, bl) \
+ do { \
+ UWtype __x; \
+ __x = (al) - (bl); \
+ (sh) = (ah) - (bh) - (__x > (al)); \
+ (sl) = __x; \
+ } while (0)
+#endif
+
+/* If we lack umul_ppmm but have smul_ppmm, define umul_ppmm in terms of
+ smul_ppmm. */
+#if !defined (umul_ppmm) && defined (smul_ppmm)
+#define umul_ppmm(w1, w0, u, v) \
+ do { \
+ UWtype __w1; \
+ UWtype __xm0 = (u), __xm1 = (v); \
+ smul_ppmm (__w1, w0, __xm0, __xm1); \
+ (w1) = __w1 + (-(__xm0 >> (W_TYPE_SIZE - 1)) & __xm1) \
+ + (-(__xm1 >> (W_TYPE_SIZE - 1)) & __xm0); \
+ } while (0)
+#endif
+
+/* If we still don't have umul_ppmm, define it using plain C. */
+#if !defined (umul_ppmm)
+#define umul_ppmm(w1, w0, u, v) \
+ do { \
+ UWtype __x0, __x1, __x2, __x3; \
+ UHWtype __ul, __vl, __uh, __vh; \
+ \
+ __ul = __ll_lowpart (u); \
+ __uh = __ll_highpart (u); \
+ __vl = __ll_lowpart (v); \
+ __vh = __ll_highpart (v); \
+ \
+ __x0 = (UWtype) __ul * __vl; \
+ __x1 = (UWtype) __ul * __vh; \
+ __x2 = (UWtype) __uh * __vl; \
+ __x3 = (UWtype) __uh * __vh; \
+ \
+ __x1 += __ll_highpart (__x0);/* this can't give carry */ \
+ __x1 += __x2; /* but this indeed can */ \
+ if (__x1 < __x2) /* did we get it? */ \
+ __x3 += __ll_B; /* yes, add it in the proper pos. */ \
+ \
+ (w1) = __x3 + __ll_highpart (__x1); \
+ (w0) = __ll_lowpart (__x1) * __ll_B + __ll_lowpart (__x0); \
+ } while (0)
+#endif
+
+#if !defined (__umulsidi3)
+#define __umulsidi3(u, v) \
+ ({DWunion __w; \
+ umul_ppmm (__w.s.high, __w.s.low, u, v); \
+ __w.ll; })
+#endif
+
+/* Define this unconditionally, so it can be used for debugging. */
+#define __udiv_qrnnd_c(q, r, n1, n0, d) \
+ do { \
+ UWtype __d1, __d0, __q1, __q0; \
+ UWtype __r1, __r0, __m; \
+ __d1 = __ll_highpart (d); \
+ __d0 = __ll_lowpart (d); \
+ \
+ __r1 = (n1) % __d1; \
+ __q1 = (n1) / __d1; \
+ __m = (UWtype) __q1 * __d0; \
+ __r1 = __r1 * __ll_B | __ll_highpart (n0); \
+ if (__r1 < __m) \
+ { \
+ __q1--, __r1 += (d); \
+ if (__r1 >= (d)) /* i.e. we didn't get carry when adding to __r1 */\
+ if (__r1 < __m) \
+ __q1--, __r1 += (d); \
+ } \
+ __r1 -= __m; \
+ \
+ __r0 = __r1 % __d1; \
+ __q0 = __r1 / __d1; \
+ __m = (UWtype) __q0 * __d0; \
+ __r0 = __r0 * __ll_B | __ll_lowpart (n0); \
+ if (__r0 < __m) \
+ { \
+ __q0--, __r0 += (d); \
+ if (__r0 >= (d)) \
+ if (__r0 < __m) \
+ __q0--, __r0 += (d); \
+ } \
+ __r0 -= __m; \
+ \
+ (q) = (UWtype) __q1 * __ll_B | __q0; \
+ (r) = __r0; \
+ } while (0)
+
+/* If the processor has no udiv_qrnnd but sdiv_qrnnd, go through
+ __udiv_w_sdiv (defined in libgcc or elsewhere). */
+#if !defined (udiv_qrnnd) && defined (sdiv_qrnnd)
+#define udiv_qrnnd(q, r, nh, nl, d) \
+ do { \
+ extern UWtype __udiv_w_sdiv (UWtype *, UWtype, UWtype, UWtype); \
+ UWtype __r; \
+ (q) = __udiv_w_sdiv (&__r, nh, nl, d); \
+ (r) = __r; \
+ } while (0)
+#endif
+
+/* If udiv_qrnnd was not defined for this processor, use __udiv_qrnnd_c. */
+#if !defined (udiv_qrnnd)
+#define UDIV_NEEDS_NORMALIZATION 1
+#define udiv_qrnnd __udiv_qrnnd_c
+#endif
+
+#if !defined (count_leading_zeros)
+#define count_leading_zeros(count, x) \
+ do { \
+ UWtype __xr = (x); \
+ UWtype __a; \
+ \
+ if (W_TYPE_SIZE <= 32) \
+ { \
+ __a = __xr < ((UWtype)1<<2*__BITS4) \
+ ? (__xr < ((UWtype)1<<__BITS4) ? 0 : __BITS4) \
+ : (__xr < ((UWtype)1<<3*__BITS4) ? 2*__BITS4 : 3*__BITS4); \
+ } \
+ else \
+ { \
+ for (__a = W_TYPE_SIZE - 8; __a > 0; __a -= 8) \
+ if (((__xr >> __a) & 0xff) != 0) \
+ break; \
+ } \
+ \
+ (count) = W_TYPE_SIZE - (__clz_tab[__xr >> __a] + __a); \
+ } while (0)
+#define COUNT_LEADING_ZEROS_0 W_TYPE_SIZE
+#endif
+
+#if !defined (count_trailing_zeros)
+/* Define count_trailing_zeros using count_leading_zeros. The latter might be
+ defined in asm, but if it is not, the C version above is good enough. */
+#define count_trailing_zeros(count, x) \
+ do { \
+ UWtype __ctz_x = (x); \
+ UWtype __ctz_c; \
+ count_leading_zeros (__ctz_c, __ctz_x & -__ctz_x); \
+ (count) = W_TYPE_SIZE - 1 - __ctz_c; \
+ } while (0)
+#endif
+
+#ifndef UDIV_NEEDS_NORMALIZATION
+#define UDIV_NEEDS_NORMALIZATION 0
+#endif
diff --git a/include/lto-symtab.h b/include/lto-symtab.h
index 9312c5d9d..878d0502c 100644
--- a/include/lto-symtab.h
+++ b/include/lto-symtab.h
@@ -1,5 +1,5 @@
/* Data types used in the IL symbol table.
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009-2015 Free Software Foundation, Inc.
Contributed by Rafael Espindola <espindola@google.com>
This file is part of GCC.
diff --git a/include/md5.h b/include/md5.h
index 6da2fefe1..909f7b4df 100644
--- a/include/md5.h
+++ b/include/md5.h
@@ -1,6 +1,6 @@
/* md5.h - Declaration of functions and data types used for MD5 sum
computing library functions.
- Copyright 1995, 1996, 2000 Free Software Foundation, Inc.
+ Copyright (C) 1995-2015 Free Software Foundation, Inc.
NOTE: The canonical source of this file is maintained with the GNU C
Library. Bugs can be reported to bug-glibc@prep.ai.mit.edu.
diff --git a/include/objalloc.h b/include/objalloc.h
index 52857663b..2c0635090 100644
--- a/include/objalloc.h
+++ b/include/objalloc.h
@@ -1,5 +1,5 @@
/* objalloc.h -- routines to allocate memory for objects
- Copyright 1997-2012 Free Software Foundation, Inc.
+ Copyright (C) 1997-2015 Free Software Foundation, Inc.
Written by Ian Lance Taylor, Cygnus Solutions.
This program is free software; you can redistribute it and/or modify it
diff --git a/include/obstack.h b/include/obstack.h
index 23487ba4f..0d13c72d0 100644
--- a/include/obstack.h
+++ b/include/obstack.h
@@ -1,108 +1,102 @@
/* obstack.h - object stack macros
- Copyright 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1996, 1997, 1998,
- 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008
- Free Software Foundation, Inc.
+ Copyright (C) 1988-2015 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
- NOTE: The canonical source of this file is maintained with the GNU C Library.
- Bugs can be reported to bug-glibc@gnu.org.
-
- This program is free software; you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by the
- Free Software Foundation; either version 2, or (at your option) any
- later version.
-
- This program is distributed in the hope that it will be useful,
+ The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301,
- USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
/* Summary:
-All the apparent functions defined here are macros. The idea
-is that you would use these pre-tested macros to solve a
-very specific set of problems, and they would run fast.
-Caution: no side-effects in arguments please!! They may be
-evaluated MANY times!!
-
-These macros operate a stack of objects. Each object starts life
-small, and may grow to maturity. (Consider building a word syllable
-by syllable.) An object can move while it is growing. Once it has
-been "finished" it never changes address again. So the "top of the
-stack" is typically an immature growing object, while the rest of the
-stack is of mature, fixed size and fixed address objects.
-
-These routines grab large chunks of memory, using a function you
-supply, called `obstack_chunk_alloc'. On occasion, they free chunks,
-by calling `obstack_chunk_free'. You must define them and declare
-them before using any obstack macros.
-
-Each independent stack is represented by a `struct obstack'.
-Each of the obstack macros expects a pointer to such a structure
-as the first argument.
-
-One motivation for this package is the problem of growing char strings
-in symbol tables. Unless you are "fascist pig with a read-only mind"
---Gosper's immortal quote from HAKMEM item 154, out of context--you
-would not like to put any arbitrary upper limit on the length of your
-symbols.
-
-In practice this often means you will build many short symbols and a
-few long symbols. At the time you are reading a symbol you don't know
-how long it is. One traditional method is to read a symbol into a
-buffer, realloc()ating the buffer every time you try to read a symbol
-that is longer than the buffer. This is beaut, but you still will
-want to copy the symbol from the buffer to a more permanent
-symbol-table entry say about half the time.
-
-With obstacks, you can work differently. Use one obstack for all symbol
-names. As you read a symbol, grow the name in the obstack gradually.
-When the name is complete, finalize it. Then, if the symbol exists already,
-free the newly read name.
-
-The way we do this is to take a large chunk, allocating memory from
-low addresses. When you want to build a symbol in the chunk you just
-add chars above the current "high water mark" in the chunk. When you
-have finished adding chars, because you got to the end of the symbol,
-you know how long the chars are, and you can create a new object.
-Mostly the chars will not burst over the highest address of the chunk,
-because you would typically expect a chunk to be (say) 100 times as
-long as an average object.
-
-In case that isn't clear, when we have enough chars to make up
-the object, THEY ARE ALREADY CONTIGUOUS IN THE CHUNK (guaranteed)
-so we just point to it where it lies. No moving of chars is
-needed and this is the second win: potentially long strings need
-never be explicitly shuffled. Once an object is formed, it does not
-change its address during its lifetime.
-
-When the chars burst over a chunk boundary, we allocate a larger
-chunk, and then copy the partly formed object from the end of the old
-chunk to the beginning of the new larger chunk. We then carry on
-accreting characters to the end of the object as we normally would.
-
-A special macro is provided to add a single char at a time to a
-growing object. This allows the use of register variables, which
-break the ordinary 'growth' macro.
-
-Summary:
- We allocate large chunks.
- We carve out one object at a time from the current chunk.
- Once carved, an object never moves.
- We are free to append data of any size to the currently
- growing object.
- Exactly one object is growing in an obstack at any one time.
- You can run one obstack per control block.
- You may have as many control blocks as you dare.
- Because of the way we do it, you can `unwind' an obstack
- back to a previous state. (You may remove objects much
- as you would with a stack.)
-*/
+ All the apparent functions defined here are macros. The idea
+ is that you would use these pre-tested macros to solve a
+ very specific set of problems, and they would run fast.
+ Caution: no side-effects in arguments please!! They may be
+ evaluated MANY times!!
+
+ These macros operate a stack of objects. Each object starts life
+ small, and may grow to maturity. (Consider building a word syllable
+ by syllable.) An object can move while it is growing. Once it has
+ been "finished" it never changes address again. So the "top of the
+ stack" is typically an immature growing object, while the rest of the
+ stack is of mature, fixed size and fixed address objects.
+
+ These routines grab large chunks of memory, using a function you
+ supply, called 'obstack_chunk_alloc'. On occasion, they free chunks,
+ by calling 'obstack_chunk_free'. You must define them and declare
+ them before using any obstack macros.
+
+ Each independent stack is represented by a 'struct obstack'.
+ Each of the obstack macros expects a pointer to such a structure
+ as the first argument.
+
+ One motivation for this package is the problem of growing char strings
+ in symbol tables. Unless you are "fascist pig with a read-only mind"
+ --Gosper's immortal quote from HAKMEM item 154, out of context--you
+ would not like to put any arbitrary upper limit on the length of your
+ symbols.
+
+ In practice this often means you will build many short symbols and a
+ few long symbols. At the time you are reading a symbol you don't know
+ how long it is. One traditional method is to read a symbol into a
+ buffer, realloc()ating the buffer every time you try to read a symbol
+ that is longer than the buffer. This is beaut, but you still will
+ want to copy the symbol from the buffer to a more permanent
+ symbol-table entry say about half the time.
+
+ With obstacks, you can work differently. Use one obstack for all symbol
+ names. As you read a symbol, grow the name in the obstack gradually.
+ When the name is complete, finalize it. Then, if the symbol exists already,
+ free the newly read name.
+
+ The way we do this is to take a large chunk, allocating memory from
+ low addresses. When you want to build a symbol in the chunk you just
+ add chars above the current "high water mark" in the chunk. When you
+ have finished adding chars, because you got to the end of the symbol,
+ you know how long the chars are, and you can create a new object.
+ Mostly the chars will not burst over the highest address of the chunk,
+ because you would typically expect a chunk to be (say) 100 times as
+ long as an average object.
+
+ In case that isn't clear, when we have enough chars to make up
+ the object, THEY ARE ALREADY CONTIGUOUS IN THE CHUNK (guaranteed)
+ so we just point to it where it lies. No moving of chars is
+ needed and this is the second win: potentially long strings need
+ never be explicitly shuffled. Once an object is formed, it does not
+ change its address during its lifetime.
+
+ When the chars burst over a chunk boundary, we allocate a larger
+ chunk, and then copy the partly formed object from the end of the old
+ chunk to the beginning of the new larger chunk. We then carry on
+ accreting characters to the end of the object as we normally would.
+
+ A special macro is provided to add a single char at a time to a
+ growing object. This allows the use of register variables, which
+ break the ordinary 'growth' macro.
+
+ Summary:
+ We allocate large chunks.
+ We carve out one object at a time from the current chunk.
+ Once carved, an object never moves.
+ We are free to append data of any size to the currently
+ growing object.
+ Exactly one object is growing in an obstack at any one time.
+ You can run one obstack per control block.
+ You may have as many control blocks as you dare.
+ Because of the way we do it, you can "unwind" an obstack
+ back to a previous state. (You may remove objects much
+ as you would with a stack.)
+ */
/* Don't do the contents of this file more than once. */
@@ -110,144 +104,128 @@ Summary:
#ifndef _OBSTACK_H
#define _OBSTACK_H 1
-#ifdef __cplusplus
-extern "C" {
+#ifndef _OBSTACK_INTERFACE_VERSION
+# define _OBSTACK_INTERFACE_VERSION 2
#endif
-
-/* We use subtraction of (char *) 0 instead of casting to int
- because on word-addressable machines a simple cast to int
- may ignore the byte-within-word field of the pointer. */
-#ifndef __PTR_TO_INT
-# define __PTR_TO_INT(P) ((P) - (char *) 0)
-#endif
+#include <stddef.h> /* For size_t and ptrdiff_t. */
+#include <string.h> /* For __GNU_LIBRARY__, and memcpy. */
-#ifndef __INT_TO_PTR
-# define __INT_TO_PTR(P) ((P) + (char *) 0)
+#if _OBSTACK_INTERFACE_VERSION == 1
+/* For binary compatibility with obstack version 1, which used "int"
+ and "long" for these two types. */
+# define _OBSTACK_SIZE_T unsigned int
+# define _CHUNK_SIZE_T unsigned long
+# define _OBSTACK_CAST(type, expr) ((type) (expr))
+#else
+/* Version 2 with sane types, especially for 64-bit hosts. */
+# define _OBSTACK_SIZE_T size_t
+# define _CHUNK_SIZE_T size_t
+# define _OBSTACK_CAST(type, expr) (expr)
#endif
-/* We need the type of the resulting object. If __PTRDIFF_TYPE__ is
- defined, as with GNU C, use that; that way we don't pollute the
- namespace with <stddef.h>'s symbols. Otherwise, if <stddef.h> is
- available, include it and use ptrdiff_t. In traditional C, long is
- the best that we can do. */
+/* If B is the base of an object addressed by P, return the result of
+ aligning P to the next multiple of A + 1. B and P must be of type
+ char *. A + 1 must be a power of 2. */
-#ifdef __PTRDIFF_TYPE__
-# define PTR_INT_TYPE __PTRDIFF_TYPE__
-#else
-# ifdef HAVE_STDDEF_H
-# include <stddef.h>
-# define PTR_INT_TYPE ptrdiff_t
+#define __BPTR_ALIGN(B, P, A) ((B) + (((P) - (B) + (A)) & ~(A)))
+
+/* Similar to __BPTR_ALIGN (B, P, A), except optimize the common case
+ where pointers can be converted to integers, aligned as integers,
+ and converted back again. If ptrdiff_t is narrower than a
+ pointer (e.g., the AS/400), play it safe and compute the alignment
+ relative to B. Otherwise, use the faster strategy of computing the
+ alignment relative to 0. */
+
+#define __PTR_ALIGN(B, P, A) \
+ __BPTR_ALIGN (sizeof (ptrdiff_t) < sizeof (void *) ? (B) : (char *) 0, \
+ P, A)
+
+#ifndef __attribute_pure__
+# if defined __GNUC_MINOR__ && __GNUC__ * 1000 + __GNUC_MINOR__ >= 2096
+# define __attribute_pure__ __attribute__ ((__pure__))
# else
-# define PTR_INT_TYPE long
+# define __attribute_pure__
# endif
#endif
-#if defined _LIBC || defined HAVE_STRING_H
-# include <string.h>
-# define _obstack_memcpy(To, From, N) memcpy ((To), (From), (N))
-#else
-# ifdef memcpy
-# define _obstack_memcpy(To, From, N) memcpy ((To), (char *)(From), (N))
-# else
-# define _obstack_memcpy(To, From, N) bcopy ((char *)(From), (To), (N))
-# endif
+#ifdef __cplusplus
+extern "C" {
#endif
-struct _obstack_chunk /* Lives at front of each chunk. */
+struct _obstack_chunk /* Lives at front of each chunk. */
{
- char *limit; /* 1 past end of this chunk */
- struct _obstack_chunk *prev; /* address of prior chunk or NULL */
- char contents[4]; /* objects begin here */
+ char *limit; /* 1 past end of this chunk */
+ struct _obstack_chunk *prev; /* address of prior chunk or NULL */
+ char contents[4]; /* objects begin here */
};
-struct obstack /* control current object in current chunk */
+struct obstack /* control current object in current chunk */
{
- long chunk_size; /* preferred size to allocate chunks in */
- struct _obstack_chunk *chunk; /* address of current struct obstack_chunk */
- char *object_base; /* address of object we are building */
- char *next_free; /* where to add next char to current object */
- char *chunk_limit; /* address of char after current chunk */
- PTR_INT_TYPE temp; /* Temporary for some macros. */
- int alignment_mask; /* Mask of alignment for each object. */
- /* These prototypes vary based on `use_extra_arg', and we use
- casts to the prototypeless function type in all assignments,
- but having prototypes here quiets -Wstrict-prototypes. */
- struct _obstack_chunk *(*chunkfun) (void *, long);
- void (*freefun) (void *, struct _obstack_chunk *);
- void *extra_arg; /* first arg for chunk alloc/dealloc funcs */
- unsigned use_extra_arg:1; /* chunk alloc/dealloc funcs take extra arg */
- unsigned maybe_empty_object:1;/* There is a possibility that the current
- chunk contains a zero-length object. This
- prevents freeing the chunk if we allocate
- a bigger chunk to replace it. */
- unsigned alloc_failed:1; /* No longer used, as we now call the failed
- handler on error, but retained for binary
- compatibility. */
+ _CHUNK_SIZE_T chunk_size; /* preferred size to allocate chunks in */
+ struct _obstack_chunk *chunk; /* address of current struct obstack_chunk */
+ char *object_base; /* address of object we are building */
+ char *next_free; /* where to add next char to current object */
+ char *chunk_limit; /* address of char after current chunk */
+ union
+ {
+ _OBSTACK_SIZE_T i;
+ void *p;
+ } temp; /* Temporary for some macros. */
+ _OBSTACK_SIZE_T alignment_mask; /* Mask of alignment for each object. */
+
+ /* These prototypes vary based on 'use_extra_arg'. */
+ union
+ {
+ void *(*plain) (size_t);
+ void *(*extra) (void *, size_t);
+ } chunkfun;
+ union
+ {
+ void (*plain) (void *);
+ void (*extra) (void *, void *);
+ } freefun;
+
+ void *extra_arg; /* first arg for chunk alloc/dealloc funcs */
+ unsigned use_extra_arg : 1; /* chunk alloc/dealloc funcs take extra arg */
+ unsigned maybe_empty_object : 1; /* There is a possibility that the current
+ chunk contains a zero-length object. This
+ prevents freeing the chunk if we allocate
+ a bigger chunk to replace it. */
+ unsigned alloc_failed : 1; /* No longer used, as we now call the failed
+ handler on error, but retained for binary
+ compatibility. */
};
/* Declare the external functions we use; they are in obstack.c. */
-extern void _obstack_newchunk (struct obstack *, int);
+extern void _obstack_newchunk (struct obstack *, _OBSTACK_SIZE_T);
extern void _obstack_free (struct obstack *, void *);
-extern int _obstack_begin (struct obstack *, int, int,
- void *(*) (long), void (*) (void *));
-extern int _obstack_begin_1 (struct obstack *, int, int,
- void *(*) (void *, long),
- void (*) (void *, void *), void *);
-extern int _obstack_memory_used (struct obstack *);
-
-/* Do the function-declarations after the structs
- but before defining the macros. */
-
-void obstack_init (struct obstack *obstack);
-
-void * obstack_alloc (struct obstack *obstack, int size);
-
-void * obstack_copy (struct obstack *obstack, void *address, int size);
-void * obstack_copy0 (struct obstack *obstack, void *address, int size);
-
-void obstack_free (struct obstack *obstack, void *block);
-
-void obstack_blank (struct obstack *obstack, int size);
-
-void obstack_grow (struct obstack *obstack, void *data, int size);
-void obstack_grow0 (struct obstack *obstack, void *data, int size);
-
-void obstack_1grow (struct obstack *obstack, int data_char);
-void obstack_ptr_grow (struct obstack *obstack, void *data);
-void obstack_int_grow (struct obstack *obstack, int data);
-
-void * obstack_finish (struct obstack *obstack);
-
-int obstack_object_size (struct obstack *obstack);
-
-int obstack_room (struct obstack *obstack);
-void obstack_make_room (struct obstack *obstack, int size);
-void obstack_1grow_fast (struct obstack *obstack, int data_char);
-void obstack_ptr_grow_fast (struct obstack *obstack, void *data);
-void obstack_int_grow_fast (struct obstack *obstack, int data);
-void obstack_blank_fast (struct obstack *obstack, int size);
-
-void * obstack_base (struct obstack *obstack);
-void * obstack_next_free (struct obstack *obstack);
-int obstack_alignment_mask (struct obstack *obstack);
-int obstack_chunk_size (struct obstack *obstack);
-int obstack_memory_used (struct obstack *obstack);
-
-/* Error handler called when `obstack_chunk_alloc' failed to allocate
- more memory. This can be set to a user defined function. The
- default action is to print a message and abort. */
+extern int _obstack_begin (struct obstack *,
+ _OBSTACK_SIZE_T, _OBSTACK_SIZE_T,
+ void *(*) (size_t), void (*) (void *));
+extern int _obstack_begin_1 (struct obstack *,
+ _OBSTACK_SIZE_T, _OBSTACK_SIZE_T,
+ void *(*) (void *, size_t),
+ void (*) (void *, void *), void *);
+extern _OBSTACK_SIZE_T _obstack_memory_used (struct obstack *)
+ __attribute_pure__;
+
+
+/* Error handler called when 'obstack_chunk_alloc' failed to allocate
+ more memory. This can be set to a user defined function which
+ should either abort gracefully or use longjump - but shouldn't
+ return. The default action is to print a message and abort. */
extern void (*obstack_alloc_failed_handler) (void);
-/* Exit value used when `print_and_abort' is used. */
+/* Exit value used when 'print_and_abort' is used. */
extern int obstack_exit_failure;
-
+
/* Pointer to beginning of object being allocated or to be allocated next.
Note that this might not be the final address of the object
because a new chunk might be needed to hold the final size. */
-#define obstack_base(h) ((h)->object_base)
+#define obstack_base(h) ((void *) (h)->object_base)
/* Size for allocating ordinary chunks. */
@@ -255,203 +233,210 @@ extern int obstack_exit_failure;
/* Pointer to next byte not yet allocated in current chunk. */
-#define obstack_next_free(h) ((h)->next_free)
+#define obstack_next_free(h) ((void *) (h)->next_free)
/* Mask specifying low bits that should be clear in address of an object. */
#define obstack_alignment_mask(h) ((h)->alignment_mask)
-/* To prevent prototype warnings provide complete argument list in
- standard C version. */
-# define obstack_init(h) \
- _obstack_begin ((h), 0, 0, \
- (void *(*) (long)) obstack_chunk_alloc, (void (*) (void *)) obstack_chunk_free)
+/* To prevent prototype warnings provide complete argument list. */
+#define obstack_init(h) \
+ _obstack_begin ((h), 0, 0, \
+ _OBSTACK_CAST (void *(*) (size_t), obstack_chunk_alloc), \
+ _OBSTACK_CAST (void (*) (void *), obstack_chunk_free))
-# define obstack_begin(h, size) \
- _obstack_begin ((h), (size), 0, \
- (void *(*) (long)) obstack_chunk_alloc, (void (*) (void *)) obstack_chunk_free)
+#define obstack_begin(h, size) \
+ _obstack_begin ((h), (size), 0, \
+ _OBSTACK_CAST (void *(*) (size_t), obstack_chunk_alloc), \
+ _OBSTACK_CAST (void (*) (void *), obstack_chunk_free))
-# define obstack_specify_allocation(h, size, alignment, chunkfun, freefun) \
- _obstack_begin ((h), (size), (alignment), \
- (void *(*) (long)) (chunkfun), (void (*) (void *)) (freefun))
+#define obstack_specify_allocation(h, size, alignment, chunkfun, freefun) \
+ _obstack_begin ((h), (size), (alignment), \
+ _OBSTACK_CAST (void *(*) (size_t), chunkfun), \
+ _OBSTACK_CAST (void (*) (void *), freefun))
-# define obstack_specify_allocation_with_arg(h, size, alignment, chunkfun, freefun, arg) \
- _obstack_begin_1 ((h), (size), (alignment), \
- (void *(*) (void *, long)) (chunkfun), \
- (void (*) (void *, void *)) (freefun), (arg))
+#define obstack_specify_allocation_with_arg(h, size, alignment, chunkfun, freefun, arg) \
+ _obstack_begin_1 ((h), (size), (alignment), \
+ _OBSTACK_CAST (void *(*) (void *, size_t), chunkfun), \
+ _OBSTACK_CAST (void (*) (void *, void *), freefun), arg)
-# define obstack_chunkfun(h, newchunkfun) \
- ((h) -> chunkfun = (struct _obstack_chunk *(*)(void *, long)) (newchunkfun))
+#define obstack_chunkfun(h, newchunkfun) \
+ ((void) ((h)->chunkfun.extra = (void *(*) (void *, size_t)) (newchunkfun)))
-# define obstack_freefun(h, newfreefun) \
- ((h) -> freefun = (void (*)(void *, struct _obstack_chunk *)) (newfreefun))
+#define obstack_freefun(h, newfreefun) \
+ ((void) ((h)->freefun.extra = (void *(*) (void *, void *)) (newfreefun)))
-#define obstack_1grow_fast(h,achar) (*((h)->next_free)++ = (achar))
+#define obstack_1grow_fast(h, achar) ((void) (*((h)->next_free)++ = (achar)))
-#define obstack_blank_fast(h,n) ((h)->next_free += (n))
+#define obstack_blank_fast(h, n) ((void) ((h)->next_free += (n)))
#define obstack_memory_used(h) _obstack_memory_used (h)
-
-#if defined __GNUC__ && defined __STDC__ && __STDC__
-/* NextStep 2.0 cc is really gcc 1.93 but it defines __GNUC__ = 2 and
- does not implement __extension__. But that compiler doesn't define
- __GNUC_MINOR__. */
-# if __GNUC__ < 2 || (__NeXT__ && !__GNUC_MINOR__)
+
+#if defined __GNUC__
+# if !defined __GNUC_MINOR__ || __GNUC__ * 1000 + __GNUC_MINOR__ < 2008
# define __extension__
# endif
/* For GNU C, if not -traditional,
we can define these macros to compute all args only once
without using a global variable.
- Also, we can avoid using the `temp' slot, to make faster code. */
-
-# define obstack_object_size(OBSTACK) \
- __extension__ \
- ({ struct obstack *__o = (OBSTACK); \
- (unsigned) (__o->next_free - __o->object_base); })
-
-# define obstack_room(OBSTACK) \
- __extension__ \
- ({ struct obstack *__o = (OBSTACK); \
- (unsigned) (__o->chunk_limit - __o->next_free); })
-
-# define obstack_make_room(OBSTACK,length) \
-__extension__ \
-({ struct obstack *__o = (OBSTACK); \
- int __len = (length); \
- if (__o->chunk_limit - __o->next_free < __len) \
- _obstack_newchunk (__o, __len); \
- (void) 0; })
-
-# define obstack_empty_p(OBSTACK) \
- __extension__ \
- ({ struct obstack *__o = (OBSTACK); \
- (__o->chunk->prev == 0 && __o->next_free - __o->chunk->contents == 0); })
-
-# define obstack_grow(OBSTACK,where,length) \
-__extension__ \
-({ struct obstack *__o = (OBSTACK); \
- int __len = (length); \
- if (__o->next_free + __len > __o->chunk_limit) \
- _obstack_newchunk (__o, __len); \
- _obstack_memcpy (__o->next_free, (where), __len); \
- __o->next_free += __len; \
- (void) 0; })
-
-# define obstack_grow0(OBSTACK,where,length) \
-__extension__ \
-({ struct obstack *__o = (OBSTACK); \
- int __len = (length); \
- if (__o->next_free + __len + 1 > __o->chunk_limit) \
- _obstack_newchunk (__o, __len + 1); \
- _obstack_memcpy (__o->next_free, (where), __len); \
- __o->next_free += __len; \
- *(__o->next_free)++ = 0; \
- (void) 0; })
-
-# define obstack_1grow(OBSTACK,datum) \
-__extension__ \
-({ struct obstack *__o = (OBSTACK); \
- if (__o->next_free + 1 > __o->chunk_limit) \
- _obstack_newchunk (__o, 1); \
- obstack_1grow_fast (__o, datum); \
- (void) 0; })
-
-/* These assume that the obstack alignment is good enough for pointers or ints,
- and that the data added so far to the current object
+ Also, we can avoid using the 'temp' slot, to make faster code. */
+
+# define obstack_object_size(OBSTACK) \
+ __extension__ \
+ ({ struct obstack const *__o = (OBSTACK); \
+ (_OBSTACK_SIZE_T) (__o->next_free - __o->object_base); })
+
+/* The local variable is named __o1 to avoid a shadowed variable
+ warning when invoked from other obstack macros. */
+# define obstack_room(OBSTACK) \
+ __extension__ \
+ ({ struct obstack const *__o1 = (OBSTACK); \
+ (_OBSTACK_SIZE_T) (__o1->chunk_limit - __o1->next_free); })
+
+# define obstack_make_room(OBSTACK, length) \
+ __extension__ \
+ ({ struct obstack *__o = (OBSTACK); \
+ _OBSTACK_SIZE_T __len = (length); \
+ if (obstack_room (__o) < __len) \
+ _obstack_newchunk (__o, __len); \
+ (void) 0; })
+
+# define obstack_empty_p(OBSTACK) \
+ __extension__ \
+ ({ struct obstack const *__o = (OBSTACK); \
+ (__o->chunk->prev == 0 \
+ && __o->next_free == __PTR_ALIGN ((char *) __o->chunk, \
+ __o->chunk->contents, \
+ __o->alignment_mask)); })
+
+# define obstack_grow(OBSTACK, where, length) \
+ __extension__ \
+ ({ struct obstack *__o = (OBSTACK); \
+ _OBSTACK_SIZE_T __len = (length); \
+ if (obstack_room (__o) < __len) \
+ _obstack_newchunk (__o, __len); \
+ memcpy (__o->next_free, where, __len); \
+ __o->next_free += __len; \
+ (void) 0; })
+
+# define obstack_grow0(OBSTACK, where, length) \
+ __extension__ \
+ ({ struct obstack *__o = (OBSTACK); \
+ _OBSTACK_SIZE_T __len = (length); \
+ if (obstack_room (__o) < __len + 1) \
+ _obstack_newchunk (__o, __len + 1); \
+ memcpy (__o->next_free, where, __len); \
+ __o->next_free += __len; \
+ *(__o->next_free)++ = 0; \
+ (void) 0; })
+
+# define obstack_1grow(OBSTACK, datum) \
+ __extension__ \
+ ({ struct obstack *__o = (OBSTACK); \
+ if (obstack_room (__o) < 1) \
+ _obstack_newchunk (__o, 1); \
+ obstack_1grow_fast (__o, datum); })
+
+/* These assume that the obstack alignment is good enough for pointers
+ or ints, and that the data added so far to the current object
shares that much alignment. */
-# define obstack_ptr_grow(OBSTACK,datum) \
-__extension__ \
-({ struct obstack *__o = (OBSTACK); \
- if (__o->next_free + sizeof (void *) > __o->chunk_limit) \
- _obstack_newchunk (__o, sizeof (void *)); \
- obstack_ptr_grow_fast (__o, datum); })
-
-# define obstack_int_grow(OBSTACK,datum) \
-__extension__ \
-({ struct obstack *__o = (OBSTACK); \
- if (__o->next_free + sizeof (int) > __o->chunk_limit) \
- _obstack_newchunk (__o, sizeof (int)); \
- obstack_int_grow_fast (__o, datum); })
-
-# define obstack_ptr_grow_fast(OBSTACK,aptr) \
-__extension__ \
-({ struct obstack *__o1 = (OBSTACK); \
- *(const void **) __o1->next_free = (aptr); \
- __o1->next_free += sizeof (const void *); \
- (void) 0; })
-
-# define obstack_int_grow_fast(OBSTACK,aint) \
-__extension__ \
-({ struct obstack *__o1 = (OBSTACK); \
- *(int *) __o1->next_free = (aint); \
- __o1->next_free += sizeof (int); \
- (void) 0; })
-
-# define obstack_blank(OBSTACK,length) \
-__extension__ \
-({ struct obstack *__o = (OBSTACK); \
- int __len = (length); \
- if (__o->chunk_limit - __o->next_free < __len) \
- _obstack_newchunk (__o, __len); \
- obstack_blank_fast (__o, __len); \
- (void) 0; })
-
-# define obstack_alloc(OBSTACK,length) \
-__extension__ \
-({ struct obstack *__h = (OBSTACK); \
- obstack_blank (__h, (length)); \
- obstack_finish (__h); })
-
-# define obstack_copy(OBSTACK,where,length) \
-__extension__ \
-({ struct obstack *__h = (OBSTACK); \
- obstack_grow (__h, (where), (length)); \
- obstack_finish (__h); })
-
-# define obstack_copy0(OBSTACK,where,length) \
-__extension__ \
-({ struct obstack *__h = (OBSTACK); \
- obstack_grow0 (__h, (where), (length)); \
- obstack_finish (__h); })
-
-/* The local variable is named __o1 to avoid a name conflict
- when obstack_blank is called. */
-# define obstack_finish(OBSTACK) \
-__extension__ \
-({ struct obstack *__o1 = (OBSTACK); \
- void *value; \
- value = (void *) __o1->object_base; \
- if (__o1->next_free == value) \
- __o1->maybe_empty_object = 1; \
- __o1->next_free \
- = __INT_TO_PTR ((__PTR_TO_INT (__o1->next_free)+__o1->alignment_mask)\
- & ~ (__o1->alignment_mask)); \
- if (__o1->next_free - (char *)__o1->chunk \
- > __o1->chunk_limit - (char *)__o1->chunk) \
- __o1->next_free = __o1->chunk_limit; \
- __o1->object_base = __o1->next_free; \
- value; })
-
-# define obstack_free(OBSTACK, OBJ) \
-__extension__ \
-({ struct obstack *__o = (OBSTACK); \
- void *__obj = (void *) (OBJ); \
- if (__obj > (void *)__o->chunk && __obj < (void *)__o->chunk_limit) \
- __o->next_free = __o->object_base = (char *) __obj; \
- else (obstack_free) (__o, __obj); })
-
-#else /* not __GNUC__ or not __STDC__ */
-
-# define obstack_object_size(h) \
- (unsigned) ((h)->next_free - (h)->object_base)
-
-# define obstack_room(h) \
- (unsigned) ((h)->chunk_limit - (h)->next_free)
-
-# define obstack_empty_p(h) \
- ((h)->chunk->prev == 0 && (h)->next_free - (h)->chunk->contents == 0)
+# define obstack_ptr_grow(OBSTACK, datum) \
+ __extension__ \
+ ({ struct obstack *__o = (OBSTACK); \
+ if (obstack_room (__o) < sizeof (void *)) \
+ _obstack_newchunk (__o, sizeof (void *)); \
+ obstack_ptr_grow_fast (__o, datum); })
+
+# define obstack_int_grow(OBSTACK, datum) \
+ __extension__ \
+ ({ struct obstack *__o = (OBSTACK); \
+ if (obstack_room (__o) < sizeof (int)) \
+ _obstack_newchunk (__o, sizeof (int)); \
+ obstack_int_grow_fast (__o, datum); })
+
+# define obstack_ptr_grow_fast(OBSTACK, aptr) \
+ __extension__ \
+ ({ struct obstack *__o1 = (OBSTACK); \
+ void *__p1 = __o1->next_free; \
+ *(const void **) __p1 = (aptr); \
+ __o1->next_free += sizeof (const void *); \
+ (void) 0; })
+
+# define obstack_int_grow_fast(OBSTACK, aint) \
+ __extension__ \
+ ({ struct obstack *__o1 = (OBSTACK); \
+ void *__p1 = __o1->next_free; \
+ *(int *) __p1 = (aint); \
+ __o1->next_free += sizeof (int); \
+ (void) 0; })
+
+# define obstack_blank(OBSTACK, length) \
+ __extension__ \
+ ({ struct obstack *__o = (OBSTACK); \
+ _OBSTACK_SIZE_T __len = (length); \
+ if (obstack_room (__o) < __len) \
+ _obstack_newchunk (__o, __len); \
+ obstack_blank_fast (__o, __len); })
+
+# define obstack_alloc(OBSTACK, length) \
+ __extension__ \
+ ({ struct obstack *__h = (OBSTACK); \
+ obstack_blank (__h, (length)); \
+ obstack_finish (__h); })
+
+# define obstack_copy(OBSTACK, where, length) \
+ __extension__ \
+ ({ struct obstack *__h = (OBSTACK); \
+ obstack_grow (__h, (where), (length)); \
+ obstack_finish (__h); })
+
+# define obstack_copy0(OBSTACK, where, length) \
+ __extension__ \
+ ({ struct obstack *__h = (OBSTACK); \
+ obstack_grow0 (__h, (where), (length)); \
+ obstack_finish (__h); })
+
+/* The local variable is named __o1 to avoid a shadowed variable
+ warning when invoked from other obstack macros, typically obstack_free. */
+# define obstack_finish(OBSTACK) \
+ __extension__ \
+ ({ struct obstack *__o1 = (OBSTACK); \
+ void *__value = (void *) __o1->object_base; \
+ if (__o1->next_free == __value) \
+ __o1->maybe_empty_object = 1; \
+ __o1->next_free \
+ = __PTR_ALIGN (__o1->object_base, __o1->next_free, \
+ __o1->alignment_mask); \
+ if ((size_t) (__o1->next_free - (char *) __o1->chunk) \
+ > (size_t) (__o1->chunk_limit - (char *) __o1->chunk)) \
+ __o1->next_free = __o1->chunk_limit; \
+ __o1->object_base = __o1->next_free; \
+ __value; })
+
+# define obstack_free(OBSTACK, OBJ) \
+ __extension__ \
+ ({ struct obstack *__o = (OBSTACK); \
+ void *__obj = (void *) (OBJ); \
+ if (__obj > (void *) __o->chunk && __obj < (void *) __o->chunk_limit) \
+ __o->next_free = __o->object_base = (char *) __obj; \
+ else \
+ _obstack_free (__o, __obj); })
+
+#else /* not __GNUC__ */
+
+# define obstack_object_size(h) \
+ ((_OBSTACK_SIZE_T) ((h)->next_free - (h)->object_base))
+
+# define obstack_room(h) \
+ ((_OBSTACK_SIZE_T) ((h)->chunk_limit - (h)->next_free))
+
+# define obstack_empty_p(h) \
+ ((h)->chunk->prev == 0 \
+ && (h)->next_free == __PTR_ALIGN ((char *) (h)->chunk, \
+ (h)->chunk->contents, \
+ (h)->alignment_mask))
/* Note that the call to _obstack_newchunk is enclosed in (..., 0)
so that we can avoid having void expressions
@@ -459,87 +444,92 @@ __extension__ \
Casting the third operand to void was tried before,
but some compilers won't accept it. */
-# define obstack_make_room(h,length) \
-( (h)->temp = (length), \
- (((h)->next_free + (h)->temp > (h)->chunk_limit) \
- ? (_obstack_newchunk ((h), (h)->temp), 0) : 0))
-
-# define obstack_grow(h,where,length) \
-( (h)->temp = (length), \
- (((h)->next_free + (h)->temp > (h)->chunk_limit) \
- ? (_obstack_newchunk ((h), (h)->temp), 0) : 0), \
- _obstack_memcpy ((h)->next_free, (where), (h)->temp), \
- (h)->next_free += (h)->temp)
-
-# define obstack_grow0(h,where,length) \
-( (h)->temp = (length), \
- (((h)->next_free + (h)->temp + 1 > (h)->chunk_limit) \
- ? (_obstack_newchunk ((h), (h)->temp + 1), 0) : 0), \
- _obstack_memcpy ((h)->next_free, (where), (h)->temp), \
- (h)->next_free += (h)->temp, \
- *((h)->next_free)++ = 0)
-
-# define obstack_1grow(h,datum) \
-( (((h)->next_free + 1 > (h)->chunk_limit) \
- ? (_obstack_newchunk ((h), 1), 0) : 0), \
- obstack_1grow_fast (h, datum))
-
-# define obstack_ptr_grow(h,datum) \
-( (((h)->next_free + sizeof (char *) > (h)->chunk_limit) \
- ? (_obstack_newchunk ((h), sizeof (char *)), 0) : 0), \
- obstack_ptr_grow_fast (h, datum))
-
-# define obstack_int_grow(h,datum) \
-( (((h)->next_free + sizeof (int) > (h)->chunk_limit) \
- ? (_obstack_newchunk ((h), sizeof (int)), 0) : 0), \
- obstack_int_grow_fast (h, datum))
-
-# define obstack_ptr_grow_fast(h,aptr) \
- (((const void **) ((h)->next_free += sizeof (void *)))[-1] = (aptr))
-
-# define obstack_int_grow_fast(h,aint) \
- (((int *) ((h)->next_free += sizeof (int)))[-1] = (aptr))
-
-# define obstack_blank(h,length) \
-( (h)->temp = (length), \
- (((h)->chunk_limit - (h)->next_free < (h)->temp) \
- ? (_obstack_newchunk ((h), (h)->temp), 0) : 0), \
- obstack_blank_fast (h, (h)->temp))
-
-# define obstack_alloc(h,length) \
- (obstack_blank ((h), (length)), obstack_finish ((h)))
-
-# define obstack_copy(h,where,length) \
- (obstack_grow ((h), (where), (length)), obstack_finish ((h)))
-
-# define obstack_copy0(h,where,length) \
- (obstack_grow0 ((h), (where), (length)), obstack_finish ((h)))
-
-# define obstack_finish(h) \
-( ((h)->next_free == (h)->object_base \
- ? (((h)->maybe_empty_object = 1), 0) \
- : 0), \
- (h)->temp = __PTR_TO_INT ((h)->object_base), \
- (h)->next_free \
- = __INT_TO_PTR ((__PTR_TO_INT ((h)->next_free)+(h)->alignment_mask) \
- & ~ ((h)->alignment_mask)), \
- (((h)->next_free - (char *) (h)->chunk \
- > (h)->chunk_limit - (char *) (h)->chunk) \
- ? ((h)->next_free = (h)->chunk_limit) : 0), \
- (h)->object_base = (h)->next_free, \
- (void *) __INT_TO_PTR ((h)->temp))
-
-# define obstack_free(h,obj) \
-( (h)->temp = (char *) (obj) - (char *) (h)->chunk, \
- (((h)->temp > 0 && (h)->temp < (h)->chunk_limit - (char *) (h)->chunk)\
- ? (((h)->next_free = (h)->object_base \
- = (h)->temp + (char *) (h)->chunk), 0) \
- : ((obstack_free) ((h), (h)->temp + (char *) (h)->chunk), 0)))
-
-#endif /* not __GNUC__ or not __STDC__ */
+# define obstack_make_room(h, length) \
+ ((h)->temp.i = (length), \
+ ((obstack_room (h) < (h)->temp.i) \
+ ? (_obstack_newchunk (h, (h)->temp.i), 0) : 0), \
+ (void) 0)
+
+# define obstack_grow(h, where, length) \
+ ((h)->temp.i = (length), \
+ ((obstack_room (h) < (h)->temp.i) \
+ ? (_obstack_newchunk ((h), (h)->temp.i), 0) : 0), \
+ memcpy ((h)->next_free, where, (h)->temp.i), \
+ (h)->next_free += (h)->temp.i, \
+ (void) 0)
+
+# define obstack_grow0(h, where, length) \
+ ((h)->temp.i = (length), \
+ ((obstack_room (h) < (h)->temp.i + 1) \
+ ? (_obstack_newchunk ((h), (h)->temp.i + 1), 0) : 0), \
+ memcpy ((h)->next_free, where, (h)->temp.i), \
+ (h)->next_free += (h)->temp.i, \
+ *((h)->next_free)++ = 0, \
+ (void) 0)
+
+# define obstack_1grow(h, datum) \
+ (((obstack_room (h) < 1) \
+ ? (_obstack_newchunk ((h), 1), 0) : 0), \
+ obstack_1grow_fast (h, datum))
+
+# define obstack_ptr_grow(h, datum) \
+ (((obstack_room (h) < sizeof (char *)) \
+ ? (_obstack_newchunk ((h), sizeof (char *)), 0) : 0), \
+ obstack_ptr_grow_fast (h, datum))
+
+# define obstack_int_grow(h, datum) \
+ (((obstack_room (h) < sizeof (int)) \
+ ? (_obstack_newchunk ((h), sizeof (int)), 0) : 0), \
+ obstack_int_grow_fast (h, datum))
+
+# define obstack_ptr_grow_fast(h, aptr) \
+ (((const void **) ((h)->next_free += sizeof (void *)))[-1] = (aptr), \
+ (void) 0)
+
+# define obstack_int_grow_fast(h, aint) \
+ (((int *) ((h)->next_free += sizeof (int)))[-1] = (aint), \
+ (void) 0)
+
+# define obstack_blank(h, length) \
+ ((h)->temp.i = (length), \
+ ((obstack_room (h) < (h)->temp.i) \
+ ? (_obstack_newchunk ((h), (h)->temp.i), 0) : 0), \
+ obstack_blank_fast (h, (h)->temp.i))
+
+# define obstack_alloc(h, length) \
+ (obstack_blank ((h), (length)), obstack_finish ((h)))
+
+# define obstack_copy(h, where, length) \
+ (obstack_grow ((h), (where), (length)), obstack_finish ((h)))
+
+# define obstack_copy0(h, where, length) \
+ (obstack_grow0 ((h), (where), (length)), obstack_finish ((h)))
+
+# define obstack_finish(h) \
+ (((h)->next_free == (h)->object_base \
+ ? (((h)->maybe_empty_object = 1), 0) \
+ : 0), \
+ (h)->temp.p = (h)->object_base, \
+ (h)->next_free \
+ = __PTR_ALIGN ((h)->object_base, (h)->next_free, \
+ (h)->alignment_mask), \
+ (((size_t) ((h)->next_free - (char *) (h)->chunk) \
+ > (size_t) ((h)->chunk_limit - (char *) (h)->chunk)) \
+ ? ((h)->next_free = (h)->chunk_limit) : 0), \
+ (h)->object_base = (h)->next_free, \
+ (h)->temp.p)
+
+# define obstack_free(h, obj) \
+ ((h)->temp.p = (void *) (obj), \
+ (((h)->temp.p > (void *) (h)->chunk \
+ && (h)->temp.p < (void *) (h)->chunk_limit) \
+ ? (void) ((h)->next_free = (h)->object_base = (char *) (h)->temp.p) \
+ : _obstack_free ((h), (h)->temp.p)))
+
+#endif /* not __GNUC__ */
#ifdef __cplusplus
-} /* C++ */
+} /* C++ */
#endif
-#endif /* obstack.h */
+#endif /* _OBSTACK_H */
diff --git a/include/opcode/ChangeLog b/include/opcode/ChangeLog
index caf7aee83..f645a7e7e 100644
--- a/include/opcode/ChangeLog
+++ b/include/opcode/ChangeLog
@@ -1,3 +1,16 @@
+2013-10-14 Chao-ying Fu <Chao-ying.Fu@imgtec.com>
+
+ * mips.h (mips_operand_type): Add OP_IMM_INDEX and OP_REG_INDEX.
+ (mips_reg_operand_type): Add OP_REG_MSA and OP_REG_MSA_CTRL.
+ For MIPS, add comments for +d, +e, +h, +k, +l, +n, +o, +u, +v, +w,
+ +T, +U, +V, +W, +~, +!, +@, +#, +$, +%, +^, +&, +*, +|.
+ For MIPS, update extension character sequences after +.
+ (ASE_MSA): New define.
+ (ASE_MSA64): New define.
+ For microMIPS, add comments for +d, +e, +h, +k, +l, +n, +o, +u, +v, +w,
+ +x, +T, +U, +V, +W, +~, +!, +@, +#, +$, +%, +^, +&, +*, +|.
+ For microMIPS, update extension character sequences after +.
+
2013-08-23 Yuri Chornoivan <yurchor@ukr.net>
PR binutils/15834
diff --git a/include/opcode/mips.h b/include/opcode/mips.h
index f21697ec4..cb16d2a45 100644
--- a/include/opcode/mips.h
+++ b/include/opcode/mips.h
@@ -413,7 +413,13 @@ enum mips_operand_type {
/* Like OP_VU0_SUFFIX, but used when the operand's value has already
been set. Any suffix used here must match the previous value. */
- OP_VU0_MATCH_SUFFIX
+ OP_VU0_MATCH_SUFFIX,
+
+ /* An index selected by an integer, e.g. [1]. */
+ OP_IMM_INDEX,
+
+ /* An index selected by a register, e.g. [$2]. */
+ OP_REG_INDEX
};
/* Enumerates the types of MIPS register. */
@@ -454,7 +460,13 @@ enum mips_reg_operand_type {
OP_REG_R5900_I,
OP_REG_R5900_Q,
OP_REG_R5900_R,
- OP_REG_R5900_ACC
+ OP_REG_R5900_ACC,
+
+ /* MSA registers $w0-$w31. */
+ OP_REG_MSA,
+
+ /* MSA control registers $0-$31. */
+ OP_REG_MSA_CTRL
};
/* Base class for all operands. */
@@ -891,6 +903,32 @@ struct mips_opcode
Enhanced VA Scheme:
"+j" 9-bit signed offset in bit 7 (OP_*_EVAOFFSET)
+ MSA Extension:
+ "+d" 5-bit MSA register (FD)
+ "+e" 5-bit MSA register (FS)
+ "+h" 5-bit MSA register (FT)
+ "+k" 5-bit GPR at bit 6
+ "+l" 5-bit MSA control register at bit 6
+ "+n" 5-bit MSA control register at bit 11
+ "+o" 5-bit vector element index at bit 16
+ "+u" 4-bit vector element index at bit 16
+ "+v" 3-bit vector element index at bit 16
+ "+w" 2-bit vector element index at bit 16
+ "+T" (-512 .. 511) << 0 at bit 16
+ "+U" (-512 .. 511) << 1 at bit 16
+ "+V" (-512 .. 511) << 2 at bit 16
+ "+W" (-512 .. 511) << 3 at bit 16
+ "+~" 2 bit LSA/DLSA shift amount from 1 to 4 at bit 6
+ "+!" 3 bit unsigned bit position at bit 16
+ "+@" 4 bit unsigned bit position at bit 16
+ "+#" 6 bit unsigned bit position at bit 16
+ "+$" 5 bit unsigned immediate at bit 16
+ "+%" 5 bit signed immediate at bit 16
+ "+^" 10 bit signed immediate at bit 11
+ "+&" 0 vector element index
+ "+*" 5-bit register vector element index at bit 16
+ "+|" 8-bit mask at bit 16
+
Other:
"()" parens surrounding optional value
"," separates operands
@@ -905,8 +943,9 @@ struct mips_opcode
Extension character sequences used so far ("+" followed by the
following), for quick reference when adding more:
"1234567890"
- "ABCEFGHJKLMNPQSXZ"
- "abcfgijmpqrstxyz"
+ "~!@#$%^&*|"
+ "ABCEFGHJKLMNPQSTUVWXZ"
+ "abcdefghijklmnopqrstuvwxyz"
*/
/* These are the bits which may be set in the pinfo field of an
@@ -1115,6 +1154,9 @@ static const unsigned int mips_isa_table[] =
/* Virtualization ASE */
#define ASE_VIRT 0x00000200
#define ASE_VIRT64 0x00000400
+/* MSA Extension */
+#define ASE_MSA 0x00000800
+#define ASE_MSA64 0x00001000
/* MIPS ISA defines, use instead of hardcoding ISA level. */
@@ -2044,6 +2086,33 @@ extern const int bfd_mips16_num_opcodes;
microMIPS Enhanced VA Scheme:
"+j" 9-bit signed offset in bit 0 (OP_*_EVAOFFSET)
+ MSA Extension:
+ "+d" 5-bit MSA register (FD)
+ "+e" 5-bit MSA register (FS)
+ "+h" 5-bit MSA register (FT)
+ "+k" 5-bit GPR at bit 6
+ "+l" 5-bit MSA control register at bit 6
+ "+n" 5-bit MSA control register at bit 11
+ "+o" 5-bit vector element index at bit 16
+ "+u" 4-bit vector element index at bit 16
+ "+v" 3-bit vector element index at bit 16
+ "+w" 2-bit vector element index at bit 16
+ "+x" 5-bit shift amount at bit 16
+ "+T" (-512 .. 511) << 0 at bit 16
+ "+U" (-512 .. 511) << 1 at bit 16
+ "+V" (-512 .. 511) << 2 at bit 16
+ "+W" (-512 .. 511) << 3 at bit 16
+ "+~" 2 bit LSA/DLSA shift amount from 1 to 4 at bit 6
+ "+!" 3 bit unsigned bit position at bit 16
+ "+@" 4 bit unsigned bit position at bit 16
+ "+#" 6 bit unsigned bit position at bit 16
+ "+$" 5 bit unsigned immediate at bit 16
+ "+%" 5 bit signed immediate at bit 16
+ "+^" 10 bit signed immediate at bit 11
+ "+&" 0 vector element index
+ "+*" 5-bit register vector element index at bit 16
+ "+|" 8-bit mask at bit 16
+
Other:
"()" parens surrounding optional value
"," separates operands
@@ -2059,9 +2128,9 @@ extern const int bfd_mips16_num_opcodes;
Extension character sequences used so far ("+" followed by the
following), for quick reference when adding more:
""
- ""
- "ABCEFGH"
- "ij"
+ "~!@#$%^&*|"
+ "ABCEFGHTUVW"
+ "dehijklnouvwx"
Extension character sequences used so far ("m" followed by the
following), for quick reference when adding more:
diff --git a/include/opcode/xgate.h b/include/opcode/xgate.h
index 77a521f83..8451e66c4 100644
--- a/include/opcode/xgate.h
+++ b/include/opcode/xgate.h
@@ -46,38 +46,24 @@
#define XGATE_CYCLE_A 0x40
#define XGATE_CYCLE_f 0x80
-/* Opcode format abbreviations. */
-#define XG_INH 0x0001 /* Inherent. */
-#define XG_I 0x0002 /* 3-bit immediate address. */
-#define XG_R_I 0x0004 /* Register followed by 4/8-bit immediate value. */
-#define XG_R_R 0x0008 /* Register followed by a register. */
-#define XG_R_R_R 0x0010 /* Register followed by two registers. */
-#define XG_R 0x0020 /* Single register. */
-#define XG_PC 0x0040 /* PC relative 10 or 11 bit. */
-#define XG_R_C 0x0080 /* General register followed by ccr register. */
-#define XG_C_R 0x0100 /* CCR register followed by a general register. */
-#define XG_R_P 0x0200 /* General register followed by pc register. */
-#define XG_R_R_I 0x0400 /* Two general registers followed by an immediate value. */
-#define XG_PCREL 0x0800 /* Immediate value that is relative to the current pc. */
-
/* XGATE operand formats as stored in the XGATE_opcode table.
They are only used by GAS to recognize operands. */
-#define XGATE_OP_INH ""
-#define XGATE_OP_TRI "r,r,r"
-#define XGATE_OP_DYA "r,r"
-#define XGATE_OP_IMM16 "r,if"
-#define XGATE_OP_IMM8 "r,i8"
-#define XGATE_OP_IMM4 "r,i4"
-#define XGATE_OP_IMM3 "i3"
-#define XGATE_OP_MON "r"
-#define XGATE_OP_MON_R_C "r,c"
-#define XGATE_OP_MON_C_R "c,r"
-#define XGATE_OP_MON_R_P "r,p"
-#define XGATE_OP_IDR "r,r,+"
-#define XGATE_OP_IDO5 "r,r,i5"
-#define XGATE_OP_REL9 "b9"
-#define XGATE_OP_REL10 "ba"
-#define XGATE_OP_DYA_MON "=r"
+#define XGATE_OP_INH "" /* Inherent. */
+#define XGATE_OP_TRI "r,r,r" /* Register followed by two registers. */
+#define XGATE_OP_DYA "r,r" /* Register followed by a register. */
+#define XGATE_OP_IMM16 "r,if" /* Register followed by 16-bit value. */
+#define XGATE_OP_IMM8 "r,i8" /* Register followed by 8-bit value. */
+#define XGATE_OP_IMM4 "r,i4" /* Register followed by 4-bit value. */
+#define XGATE_OP_IMM3 "i3" /* Register followed by 3-bit value. */
+#define XGATE_OP_MON "r" /* Single register. */
+#define XGATE_OP_MON_R_C "r,c" /* General register followed by ccr register. */
+#define XGATE_OP_MON_C_R "c,r" /* CCR register followed by a general register. */
+#define XGATE_OP_MON_R_P "r,p" /* General register followed by pc register. */
+#define XGATE_OP_IDR "r,r,+" /* Three registers with the third having a -/+ directive. */
+#define XGATE_OP_IDO5 "r,r,i5" /* Two general registers followed by an immediate value. */
+#define XGATE_OP_REL9 "b9" /* 9-bit value that is relative to the current pc. */
+#define XGATE_OP_REL10 "ba" /* 10-bit value that is relative to the current pc. */
+#define XGATE_OP_DYA_MON "=r"
/* Macro definitions. */
#define XGATE_OP_IMM16mADD "r,if; addl addh"
#define XGATE_OP_IMM16mAND "r,if; andl andh"
@@ -90,18 +76,12 @@
#define XGATE_V2 0x2
#define XGATE_V3 0x4
-/* Max opcodes per opcode handle. */
-#define MAX_OPCODES 0x05
-
-#define MAX_DETECT_CHARS 0x10
-
/* The opcode table definitions. */
struct xgate_opcode
{
char * name; /* Op-code name. */
char * constraints; /* Constraint chars. */
char * format; /* Bit definitions. */
- unsigned int sh_format; /* Shorthand format mask. */
unsigned int size; /* Opcode size in bytes. */
unsigned int bin_opcode; /* Binary opcode with operands masked off. */
unsigned char cycles_min; /* Minimum cpu cycles needed. */
diff --git a/include/partition.h b/include/partition.h
index d8b554f8f..c39873b60 100644
--- a/include/partition.h
+++ b/include/partition.h
@@ -45,12 +45,12 @@ extern "C" {
struct partition_elem
{
- /* The canonical element that represents the class containing this
- element. */
- int class_element;
/* The next element in this class. Elements in each class form a
circular list. */
struct partition_elem* next;
+ /* The canonical element that represents the class containing this
+ element. */
+ int class_element;
/* The number of elements in this class. Valid only if this is the
canonical element for its class. */
unsigned class_count;
diff --git a/include/plugin-api.h b/include/plugin-api.h
index 5797d4dce..a794a3704 100644
--- a/include/plugin-api.h
+++ b/include/plugin-api.h
@@ -1,6 +1,6 @@
/* plugin-api.h -- External linker plugin API. */
-/* Copyright 2009, 2010 Free Software Foundation, Inc.
+/* Copyright (C) 2009-2016 Free Software Foundation, Inc.
Written by Cary Coutant <ccoutant@google.com>.
This file is part of binutils.
@@ -345,6 +345,26 @@ enum ld_plugin_status
const struct ld_plugin_section * section_list,
unsigned int num_sections);
+/* The linker's interface for retrieving the section alignment requirement
+ of a specific section in an object. This interface should only be invoked in the
+ claim_file handler. This function sets *ADDRALIGN to the ELF sh_addralign
+ value of the input section. */
+
+typedef
+enum ld_plugin_status
+(*ld_plugin_get_input_section_alignment) (const struct ld_plugin_section section,
+ unsigned int *addralign);
+
+/* The linker's interface for retrieving the section size of a specific section
+ in an object. This interface should only be invoked in the claim_file handler.
+ This function sets *SECSIZE to the ELF sh_size
+ value of the input section. */
+
+typedef
+enum ld_plugin_status
+(*ld_plugin_get_input_section_size) (const struct ld_plugin_section section,
+ uint64_t *secsize);
+
enum ld_plugin_level
{
LDPL_INFO,
@@ -384,7 +404,10 @@ enum ld_plugin_tag
LDPT_ALLOW_SECTION_ORDERING = 24,
LDPT_GET_SYMBOLS_V2 = 25,
LDPT_ALLOW_UNIQUE_SEGMENT_FOR_SECTIONS = 26,
- LDPT_UNIQUE_SEGMENT_FOR_SECTIONS = 27
+ LDPT_UNIQUE_SEGMENT_FOR_SECTIONS = 27,
+ LDPT_GET_SYMBOLS_V3 = 28,
+ LDPT_GET_INPUT_SECTION_ALIGNMENT = 29,
+ LDPT_GET_INPUT_SECTION_SIZE = 30
};
/* The plugin transfer vector. */
@@ -416,6 +439,8 @@ struct ld_plugin_tv
ld_plugin_allow_section_ordering tv_allow_section_ordering;
ld_plugin_allow_unique_segment_for_sections tv_allow_unique_segment_for_sections;
ld_plugin_unique_segment_for_sections tv_unique_segment_for_sections;
+ ld_plugin_get_input_section_alignment tv_get_input_section_alignment;
+ ld_plugin_get_input_section_size tv_get_input_section_size;
} tv_u;
};
diff --git a/include/safe-ctype.h b/include/safe-ctype.h
index 0266bf1aa..a6d163e6e 100644
--- a/include/safe-ctype.h
+++ b/include/safe-ctype.h
@@ -1,6 +1,6 @@
/* <ctype.h> replacement macros.
- Copyright (C) 2000, 2001 Free Software Foundation, Inc.
+ Copyright (C) 2000-2015 Free Software Foundation, Inc.
Contributed by Zack Weinberg <zackw@stanford.edu>.
This file is part of the libiberty library.
diff --git a/include/sha1.h b/include/sha1.h
index 4da5c37f3..24f3ab79d 100644
--- a/include/sha1.h
+++ b/include/sha1.h
@@ -1,7 +1,6 @@
/* Declarations of functions and data types used for SHA1 sum
library functions.
- Copyright (C) 2000, 2001, 2003, 2005, 2006, 2008, 2010
- Free Software Foundation, Inc.
+ Copyright (C) 2000-2015 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the
diff --git a/include/simple-object.h b/include/simple-object.h
index c4786757a..5bd3d06c1 100644
--- a/include/simple-object.h
+++ b/include/simple-object.h
@@ -1,5 +1,5 @@
/* simple-object.h -- simple routines to read and write object files
- Copyright 2010 Free Software Foundation, Inc.
+ Copyright (C) 2010-2015 Free Software Foundation, Inc.
Written by Ian Lance Taylor, Google.
This program is free software; you can redistribute it and/or modify it
diff --git a/include/sort.h b/include/sort.h
index 582af8162..23025d431 100644
--- a/include/sort.h
+++ b/include/sort.h
@@ -1,5 +1,5 @@
/* Sorting algorithms.
- Copyright (C) 2000, 2002 Free Software Foundation, Inc.
+ Copyright (C) 2000-2015 Free Software Foundation, Inc.
Contributed by Mark Mitchell <mark@codesourcery.com>.
This file is part of GCC.
diff --git a/include/splay-tree.h b/include/splay-tree.h
index a26135a09..f71d7d7b6 100644
--- a/include/splay-tree.h
+++ b/include/splay-tree.h
@@ -1,6 +1,5 @@
/* A splay-tree datatype.
- Copyright 1998, 1999, 2000, 2002, 2005, 2007, 2009, 2010
- Free Software Foundation, Inc.
+ Copyright (C) 1998-2015 Free Software Foundation, Inc.
Contributed by Mark Mitchell (mark@markmitchell.com).
This file is part of GCC.
@@ -44,10 +43,6 @@ extern "C" {
#include <inttypes.h>
#endif
-#ifndef GTY
-#define GTY(X)
-#endif
-
/* Use typedefs for the key and data types to facilitate changing
these types, if necessary. These types should be sufficiently wide
that any pointer or scalar can be cast to these types, and then
@@ -86,22 +81,22 @@ typedef void *(*splay_tree_allocate_fn) (int, void *);
typedef void (*splay_tree_deallocate_fn) (void *, void *);
/* The nodes in the splay tree. */
-struct GTY(()) splay_tree_node_s {
+struct splay_tree_node_s {
/* The key. */
- splay_tree_key GTY ((use_param1)) key;
+ splay_tree_key key;
/* The value. */
- splay_tree_value GTY ((use_param2)) value;
+ splay_tree_value value;
/* The left and right children, respectively. */
- splay_tree_node GTY ((use_params)) left;
- splay_tree_node GTY ((use_params)) right;
+ splay_tree_node left;
+ splay_tree_node right;
};
/* The splay tree itself. */
-struct GTY(()) splay_tree_s {
+struct splay_tree_s {
/* The root of the tree. */
- splay_tree_node GTY ((use_params)) root;
+ splay_tree_node root;
/* The comparision function. */
splay_tree_compare_fn comp;
@@ -119,7 +114,7 @@ struct GTY(()) splay_tree_s {
splay_tree_deallocate_fn deallocate;
/* Parameter for allocate/free functions. */
- void * GTY((skip)) allocate_data;
+ void *allocate_data;
};
typedef struct splay_tree_s *splay_tree;
diff --git a/include/symcat.h b/include/symcat.h
index b46128796..95fc9b2c5 100644
--- a/include/symcat.h
+++ b/include/symcat.h
@@ -1,6 +1,6 @@
/* Symbol concatenation utilities.
- Copyright (C) 1998, 2000, 2010 Free Software Foundation, Inc.
+ Copyright (C) 1998-2015 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/include/timeval-utils.h b/include/timeval-utils.h
index 1caf9b36d..adbe8183f 100644
--- a/include/timeval-utils.h
+++ b/include/timeval-utils.h
@@ -1,5 +1,5 @@
/* Basic struct timeval utilities.
- Copyright (C) 2011 Free Software Foundation, Inc.
+ Copyright (C) 2011-2015 Free Software Foundation, Inc.
This file is part of the libiberty library.
Libiberty is free software; you can redistribute it and/or
diff --git a/include/vtv-change-permission.h b/include/vtv-change-permission.h
index 1adcb9745..04ad8c3db 100644
--- a/include/vtv-change-permission.h
+++ b/include/vtv-change-permission.h
@@ -1,5 +1,4 @@
-/* Copyright (C) 2013
- Free Software Foundation
+/* Copyright (C) 2013-2015 Free Software Foundation, Inc.
This file is part of GCC.
@@ -47,8 +46,12 @@ extern void __VLTChangePermission (int);
/* TODO - Replace '4096' below with correct big page size. */
#define VTV_PAGE_SIZE 4096
#else
+#if defined(__sun__) && defined(__svr4__) && defined(__sparc__)
+#define VTV_PAGE_SIZE 8192
+#else
#define VTV_PAGE_SIZE 4096
#endif
+#endif
diff --git a/include/xregex2.h b/include/xregex2.h
index d3d0da14a..05066d4b2 100644
--- a/include/xregex2.h
+++ b/include/xregex2.h
@@ -1,8 +1,7 @@
/* Definitions for data structures and routines for the regular
expression library, version 0.12.
- Copyright (C) 1985, 1989, 1990, 1991, 1992, 1993, 1995, 1996, 1997,
- 1998, 2000, 2005 Free Software Foundation, Inc.
+ Copyright (C) 1985-2015 Free Software Foundation, Inc.
This file is part of the GNU C Library. Its master source is NOT part of
the C library, however. The master source lives in /gd/gnu/lib.
diff --git a/include/xtensa-config.h b/include/xtensa-config.h
index 30f4f41a2..5ae4c8060 100644
--- a/include/xtensa-config.h
+++ b/include/xtensa-config.h
@@ -1,6 +1,5 @@
/* Xtensa configuration settings.
- Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2010
- Free Software Foundation, Inc.
+ Copyright (C) 2001-2015 Free Software Foundation, Inc.
Contributed by Bob Wilson (bob.wilson@acm.org) at Tensilica.
This program is free software; you can redistribute it and/or modify
diff --git a/install-sh b/install-sh
index 6781b987b..0b0fdcbba 100755
--- a/install-sh
+++ b/install-sh
@@ -1,7 +1,7 @@
#!/bin/sh
# install - install a program, script, or datafile
-scriptversion=2009-04-28.21; # UTC
+scriptversion=2013-12-25.23; # UTC
# This originates from X11R5 (mit/util/scripts/install.sh), which was
# later released in X11R6 (xc/config/util/install.sh) with the
@@ -35,25 +35,21 @@ scriptversion=2009-04-28.21; # UTC
# FSF changes to this file are in the public domain.
#
# Calling this script install-sh is preferred over install.sh, to prevent
-# `make' implicit rules from creating a file called install from it
+# 'make' implicit rules from creating a file called install from it
# when there is no Makefile.
#
# This script is compatible with the BSD install script, but was written
# from scratch.
+tab=' '
nl='
'
-IFS=" "" $nl"
+IFS=" $tab$nl"
-# set DOITPROG to echo to test this script
+# Set DOITPROG to "echo" to test this script.
-# Don't use :- since 4.3BSD and earlier shells don't like it.
doit=${DOITPROG-}
-if test -z "$doit"; then
- doit_exec=exec
-else
- doit_exec=$doit
-fi
+doit_exec=${doit:-exec}
# Put in absolute file names if you don't have them in your path;
# or use environment vars.
@@ -68,17 +64,6 @@ mvprog=${MVPROG-mv}
rmprog=${RMPROG-rm}
stripprog=${STRIPPROG-strip}
-posix_glob='?'
-initialize_posix_glob='
- test "$posix_glob" != "?" || {
- if (set -f) 2>/dev/null; then
- posix_glob=
- else
- posix_glob=:
- fi
- }
-'
-
posix_mkdir=
# Desired mode of installed file.
@@ -97,7 +82,7 @@ dir_arg=
dst_arg=
copy_on_change=false
-no_target_directory=
+is_target_a_directory=possibly
usage="\
Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE
@@ -137,42 +122,57 @@ while test $# -ne 0; do
-d) dir_arg=true;;
-g) chgrpcmd="$chgrpprog $2"
- shift;;
+ shift;;
--help) echo "$usage"; exit $?;;
-m) mode=$2
- case $mode in
- *' '* | *' '* | *'
-'* | *'*'* | *'?'* | *'['*)
- echo "$0: invalid mode: $mode" >&2
- exit 1;;
- esac
- shift;;
+ case $mode in
+ *' '* | *"$tab"* | *"$nl"* | *'*'* | *'?'* | *'['*)
+ echo "$0: invalid mode: $mode" >&2
+ exit 1;;
+ esac
+ shift;;
-o) chowncmd="$chownprog $2"
- shift;;
+ shift;;
-s) stripcmd=$stripprog;;
- -t) dst_arg=$2
- shift;;
+ -t)
+ is_target_a_directory=always
+ dst_arg=$2
+ # Protect names problematic for 'test' and other utilities.
+ case $dst_arg in
+ -* | [=\(\)!]) dst_arg=./$dst_arg;;
+ esac
+ shift;;
- -T) no_target_directory=true;;
+ -T) is_target_a_directory=never;;
--version) echo "$0 $scriptversion"; exit $?;;
- --) shift
- break;;
+ --) shift
+ break;;
- -*) echo "$0: invalid option: $1" >&2
- exit 1;;
+ -*) echo "$0: invalid option: $1" >&2
+ exit 1;;
*) break;;
esac
shift
done
+# We allow the use of options -d and -T together, by making -d
+# take the precedence; this is for compatibility with GNU install.
+
+if test -n "$dir_arg"; then
+ if test -n "$dst_arg"; then
+ echo "$0: target directory not allowed when installing a directory." >&2
+ exit 1
+ fi
+fi
+
if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then
# When -d is used, all remaining arguments are directories to create.
# When -t is used, the destination is already specified.
@@ -186,6 +186,10 @@ if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then
fi
shift # arg
dst_arg=$arg
+ # Protect names problematic for 'test' and other utilities.
+ case $dst_arg in
+ -* | [=\(\)!]) dst_arg=./$dst_arg;;
+ esac
done
fi
@@ -194,13 +198,26 @@ if test $# -eq 0; then
echo "$0: no input file specified." >&2
exit 1
fi
- # It's OK to call `install-sh -d' without argument.
+ # It's OK to call 'install-sh -d' without argument.
# This can happen when creating conditional directories.
exit 0
fi
if test -z "$dir_arg"; then
- trap '(exit $?); exit' 1 2 13 15
+ if test $# -gt 1 || test "$is_target_a_directory" = always; then
+ if test ! -d "$dst_arg"; then
+ echo "$0: $dst_arg: Is not a directory." >&2
+ exit 1
+ fi
+ fi
+fi
+
+if test -z "$dir_arg"; then
+ do_exit='(exit $ret); exit $ret'
+ trap "ret=129; $do_exit" 1
+ trap "ret=130; $do_exit" 2
+ trap "ret=141; $do_exit" 13
+ trap "ret=143; $do_exit" 15
# Set umask so as not to create temps with too-generous modes.
# However, 'strip' requires both read and write access to temps.
@@ -211,16 +228,16 @@ if test -z "$dir_arg"; then
*[0-7])
if test -z "$stripcmd"; then
- u_plus_rw=
+ u_plus_rw=
else
- u_plus_rw='% 200'
+ u_plus_rw='% 200'
fi
cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;;
*)
if test -z "$stripcmd"; then
- u_plus_rw=
+ u_plus_rw=
else
- u_plus_rw=,u+rw
+ u_plus_rw=,u+rw
fi
cp_umask=$mode$u_plus_rw;;
esac
@@ -228,9 +245,9 @@ fi
for src
do
- # Protect names starting with `-'.
+ # Protect names problematic for 'test' and other utilities.
case $src in
- -*) src=./$src;;
+ -* | [=\(\)!]) src=./$src;;
esac
if test -n "$dir_arg"; then
@@ -252,51 +269,20 @@ do
echo "$0: no destination specified." >&2
exit 1
fi
-
dst=$dst_arg
- # Protect names starting with `-'.
- case $dst in
- -*) dst=./$dst;;
- esac
# If destination is a directory, append the input filename; won't work
# if double slashes aren't ignored.
if test -d "$dst"; then
- if test -n "$no_target_directory"; then
- echo "$0: $dst_arg: Is a directory" >&2
- exit 1
+ if test "$is_target_a_directory" = never; then
+ echo "$0: $dst_arg: Is a directory" >&2
+ exit 1
fi
dstdir=$dst
dst=$dstdir/`basename "$src"`
dstdir_status=0
else
- # Prefer dirname, but fall back on a substitute if dirname fails.
- dstdir=`
- (dirname "$dst") 2>/dev/null ||
- expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
- X"$dst" : 'X\(//\)[^/]' \| \
- X"$dst" : 'X\(//\)$' \| \
- X"$dst" : 'X\(/\)' \| . 2>/dev/null ||
- echo X"$dst" |
- sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
- s//\1/
- q
- }
- /^X\(\/\/\)[^/].*/{
- s//\1/
- q
- }
- /^X\(\/\/\)$/{
- s//\1/
- q
- }
- /^X\(\/\).*/{
- s//\1/
- q
- }
- s/.*/./; q'
- `
-
+ dstdir=`dirname "$dst"`
test -d "$dstdir"
dstdir_status=$?
fi
@@ -307,74 +293,74 @@ do
if test $dstdir_status != 0; then
case $posix_mkdir in
'')
- # Create intermediate dirs using mode 755 as modified by the umask.
- # This is like FreeBSD 'install' as of 1997-10-28.
- umask=`umask`
- case $stripcmd.$umask in
- # Optimize common cases.
- *[2367][2367]) mkdir_umask=$umask;;
- .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;;
-
- *[0-7])
- mkdir_umask=`expr $umask + 22 \
- - $umask % 100 % 40 + $umask % 20 \
- - $umask % 10 % 4 + $umask % 2
- `;;
- *) mkdir_umask=$umask,go-w;;
- esac
-
- # With -d, create the new directory with the user-specified mode.
- # Otherwise, rely on $mkdir_umask.
- if test -n "$dir_arg"; then
- mkdir_mode=-m$mode
- else
- mkdir_mode=
- fi
-
- posix_mkdir=false
- case $umask in
- *[123567][0-7][0-7])
- # POSIX mkdir -p sets u+wx bits regardless of umask, which
- # is incompatible with FreeBSD 'install' when (umask & 300) != 0.
- ;;
- *)
- tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$
- trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0
-
- if (umask $mkdir_umask &&
- exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1
- then
- if test -z "$dir_arg" || {
- # Check for POSIX incompatibilities with -m.
- # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or
- # other-writeable bit of parent directory when it shouldn't.
- # FreeBSD 6.1 mkdir -m -p sets mode of existing directory.
- ls_ld_tmpdir=`ls -ld "$tmpdir"`
- case $ls_ld_tmpdir in
- d????-?r-*) different_mode=700;;
- d????-?--*) different_mode=755;;
- *) false;;
- esac &&
- $mkdirprog -m$different_mode -p -- "$tmpdir" && {
- ls_ld_tmpdir_1=`ls -ld "$tmpdir"`
- test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1"
- }
- }
- then posix_mkdir=:
- fi
- rmdir "$tmpdir/d" "$tmpdir"
- else
- # Remove any dirs left behind by ancient mkdir implementations.
- rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null
- fi
- trap '' 0;;
- esac;;
+ # Create intermediate dirs using mode 755 as modified by the umask.
+ # This is like FreeBSD 'install' as of 1997-10-28.
+ umask=`umask`
+ case $stripcmd.$umask in
+ # Optimize common cases.
+ *[2367][2367]) mkdir_umask=$umask;;
+ .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;;
+
+ *[0-7])
+ mkdir_umask=`expr $umask + 22 \
+ - $umask % 100 % 40 + $umask % 20 \
+ - $umask % 10 % 4 + $umask % 2
+ `;;
+ *) mkdir_umask=$umask,go-w;;
+ esac
+
+ # With -d, create the new directory with the user-specified mode.
+ # Otherwise, rely on $mkdir_umask.
+ if test -n "$dir_arg"; then
+ mkdir_mode=-m$mode
+ else
+ mkdir_mode=
+ fi
+
+ posix_mkdir=false
+ case $umask in
+ *[123567][0-7][0-7])
+ # POSIX mkdir -p sets u+wx bits regardless of umask, which
+ # is incompatible with FreeBSD 'install' when (umask & 300) != 0.
+ ;;
+ *)
+ tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$
+ trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0
+
+ if (umask $mkdir_umask &&
+ exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1
+ then
+ if test -z "$dir_arg" || {
+ # Check for POSIX incompatibilities with -m.
+ # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or
+ # other-writable bit of parent directory when it shouldn't.
+ # FreeBSD 6.1 mkdir -m -p sets mode of existing directory.
+ ls_ld_tmpdir=`ls -ld "$tmpdir"`
+ case $ls_ld_tmpdir in
+ d????-?r-*) different_mode=700;;
+ d????-?--*) different_mode=755;;
+ *) false;;
+ esac &&
+ $mkdirprog -m$different_mode -p -- "$tmpdir" && {
+ ls_ld_tmpdir_1=`ls -ld "$tmpdir"`
+ test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1"
+ }
+ }
+ then posix_mkdir=:
+ fi
+ rmdir "$tmpdir/d" "$tmpdir"
+ else
+ # Remove any dirs left behind by ancient mkdir implementations.
+ rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null
+ fi
+ trap '' 0;;
+ esac;;
esac
if
$posix_mkdir && (
- umask $mkdir_umask &&
- $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir"
+ umask $mkdir_umask &&
+ $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir"
)
then :
else
@@ -384,53 +370,51 @@ do
# directory the slow way, step by step, checking for races as we go.
case $dstdir in
- /*) prefix='/';;
- -*) prefix='./';;
- *) prefix='';;
+ /*) prefix='/';;
+ [-=\(\)!]*) prefix='./';;
+ *) prefix='';;
esac
- eval "$initialize_posix_glob"
-
oIFS=$IFS
IFS=/
- $posix_glob set -f
+ set -f
set fnord $dstdir
shift
- $posix_glob set +f
+ set +f
IFS=$oIFS
prefixes=
for d
do
- test -z "$d" && continue
-
- prefix=$prefix$d
- if test -d "$prefix"; then
- prefixes=
- else
- if $posix_mkdir; then
- (umask=$mkdir_umask &&
- $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break
- # Don't fail if two instances are running concurrently.
- test -d "$prefix" || exit 1
- else
- case $prefix in
- *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;;
- *) qprefix=$prefix;;
- esac
- prefixes="$prefixes '$qprefix'"
- fi
- fi
- prefix=$prefix/
+ test X"$d" = X && continue
+
+ prefix=$prefix$d
+ if test -d "$prefix"; then
+ prefixes=
+ else
+ if $posix_mkdir; then
+ (umask=$mkdir_umask &&
+ $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break
+ # Don't fail if two instances are running concurrently.
+ test -d "$prefix" || exit 1
+ else
+ case $prefix in
+ *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;;
+ *) qprefix=$prefix;;
+ esac
+ prefixes="$prefixes '$qprefix'"
+ fi
+ fi
+ prefix=$prefix/
done
if test -n "$prefixes"; then
- # Don't fail if two instances are running concurrently.
- (umask $mkdir_umask &&
- eval "\$doit_exec \$mkdirprog $prefixes") ||
- test -d "$dstdir" || exit 1
- obsolete_mkdir_used=true
+ # Don't fail if two instances are running concurrently.
+ (umask $mkdir_umask &&
+ eval "\$doit_exec \$mkdirprog $prefixes") ||
+ test -d "$dstdir" || exit 1
+ obsolete_mkdir_used=true
fi
fi
fi
@@ -465,15 +449,12 @@ do
# If -C, don't bother to copy if it wouldn't change the file.
if $copy_on_change &&
- old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` &&
- new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` &&
-
- eval "$initialize_posix_glob" &&
- $posix_glob set -f &&
+ old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` &&
+ new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` &&
+ set -f &&
set X $old && old=:$2:$4:$5:$6 &&
set X $new && new=:$2:$4:$5:$6 &&
- $posix_glob set +f &&
-
+ set +f &&
test "$old" = "$new" &&
$cmpprog "$dst" "$dsttmp" >/dev/null 2>&1
then
@@ -486,24 +467,24 @@ do
# to itself, or perhaps because mv is so ancient that it does not
# support -f.
{
- # Now remove or move aside any old file at destination location.
- # We try this two ways since rm can't unlink itself on some
- # systems and the destination file might be busy for other
- # reasons. In this case, the final cleanup might fail but the new
- # file should still install successfully.
- {
- test ! -f "$dst" ||
- $doit $rmcmd -f "$dst" 2>/dev/null ||
- { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null &&
- { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; }
- } ||
- { echo "$0: cannot unlink or rename $dst" >&2
- (exit 1); exit 1
- }
- } &&
-
- # Now rename the file to the real destination.
- $doit $mvcmd "$dsttmp" "$dst"
+ # Now remove or move aside any old file at destination location.
+ # We try this two ways since rm can't unlink itself on some
+ # systems and the destination file might be busy for other
+ # reasons. In this case, the final cleanup might fail but the new
+ # file should still install successfully.
+ {
+ test ! -f "$dst" ||
+ $doit $rmcmd -f "$dst" 2>/dev/null ||
+ { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null &&
+ { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; }
+ } ||
+ { echo "$0: cannot unlink or rename $dst" >&2
+ (exit 1); exit 1
+ }
+ } &&
+
+ # Now rename the file to the real destination.
+ $doit $mvcmd "$dsttmp" "$dst"
}
fi || exit 1
diff --git a/libgloss/ChangeLog b/libgloss/ChangeLog
index 1d130b735..62f63d500 100644
--- a/libgloss/ChangeLog
+++ b/libgloss/ChangeLog
@@ -1,6438 +1 @@
-2013-08-12 Yufeng Zhang <Yufeng.Zhang@arm.com>
-
- * aarch64/crt0.S: Remove 'start'.
- * arm/crt0.S: Ditto.
- * arm/redboot-crt0.S: Ditto.
-
-2013-07-24 Steve Ellcey <sellcey@mips.com>
-
- * mips/idtmon.S (unlink, lseek, stat): Add new functions.
-
-2013-07-23 Nagaraju Mekala <nagaraju.mekala@xilinx.com>
-
- * microblaze/_exception_handler.S: Adjust to be weak.
-
-2013-07-23 Edgar E. Iglesias <edgar.iglesias@xilinx.com>
-
- * microblaze/Makefile.in: Add LINUX_BSP.
- * microblaze/elf-gloss-linux.ld: New file.
- * microblaze/elf-gloss-linux.specs: Likewise.
- * microblaze/linux-crt0.S: Likewise.
- * microblaze/linux-inbyte.c: Likewise.
- * microblaze/linux-outbyte.c: Likewise.
- * microblaze/linux-syscalls-wrap.c: Likewise.
- * microblaze/linux-syscalls.S: Likewise.
- * microblaze/linux-syscalls.h: Likewise.
-
-2013-07-17 Yaakov Selkowitz <yselkowitz@users.sourceforge.net>
-
- * lm32/configure: Regenerate.
- * moxie/configure: Ditto.
- * spu/configure: Ditto.
-
-2013-07-16 David Holsgrove <david.holsgrove@xilinx.com>
-
- * microblaze/Makefile.in: Add GENOBJS and target_makefile_frag.
- * microblaze/configure.in: Add target_makefile_frag.
- * microblaze/configure: Regenerate.
- * microblaze/xil_printf.c: Add new file.
-
-2013-07-16 David Holsgrove <david.holsgrove@xilinx.com>
-
- * configure.in: Change to microblaze*.
- * configure: Regenerate.
- * microblaze/xilinx.ld: Remove OUTPUT_FORMAT.
-
-2013-07-12 Marcus Shawcroft <marcus.shawcroft@arm.com>
-
- * aarch64/cpu-init/rdimon-aem-el3.S (vectors): Page align.
-
-2013-07-09 Sabrina Ni <sabrina@andestech.com>
-
- * configure.in: Add nds32 subdir.
- * configure: Regenerated.
- * nds32/configure.in: New.
- * nds32/configure: New (autogenerated).
- * nds32/{crt0.S,crt1.S}: New.
- * nds32/Makefile.in: New.
- * nds32/{syscall_argvlen.S,syscall_argv.S,
- syscall_chdirS, syscall_chmod.S,
- syscall_close.S,syscall_exit.S,syscall_extra.h, syscall_fstat.S,
- syscall_getpid.S,syscall_gettimeofday.S,syscall_isatty.S,syscall_kill.S,
- syscall_link.S,syscall_lseek.S,syscall_open.S,syscall_read.S,
- syscall_rename.S,syscall_sbrk.S,syscall_stat.S,syscall_system.S,
- syscall_time.S,syscall_times.S,syscall_unlink.S,syscall_utime.S,
- syscall_write.S}: New.
-
-2013-07-04 Yufeng Zhang <Yufeng.Zhang@arm.com>
-
- * aarch64/syscalls.c (stack_ptr): Defined with asm ("wsp") if __ILP32__
- is defined.
-
-2013-07-02 Joey Ye <joey.ye@arm.com>
-
- * arm/crt0.S (_mainCRTStartup): Weak reference to atexit and _fini
- when lite exit is enabled.
-
-2013-06-28 Yufeng Zhang <Yufeng.Zhang@arm.com>
-
- * aarch64/syscalls.c (POINTER_TO_PARAM_BLOCK_T): New macro.
- (initialise_monitor_handles): Replace cast with macro
- POINTER_TO_PARAM_BLOCK_T.
- (_swiread): Likewise.
- (_swiwrite): Likewise.
- (_swiopen): Likewise.
- (_unlink): Likewise.
- (_system): Likewise.
- (_rename): Likewise.
-
-2013-06-25 Yufeng Zhang <Yufeng.Zhang@arm.com>
-
- * aarch64/crt0.S (GEN_DWORD): New macro definition.
- (PTR_REG): Ditto.
- (PTR_SIZE): Ditto.
- (PTR_LOG_SIZE): Ditto.
- (start): Use GEN_DWORD to replace the .dword of HeapBase,
- __bss_start__, __bss_end__, FUNCTION(_fini), env and
- CommandLine; when __ILP32__ is defined, set the stack base to
- the top end of the 32-bit address space if the returned value
- from the Angel API call is larger than or equal to 4 GiB.
- Also carry out sanity check on the heap base; abort if the
- base is larger than or equal to 4 GiB. Use other new
- macros in the instructions that processes the argv arrays.
- (StackBase): New lable; replace __stack_base__.
- (__stack_base__): Set with StackBase or StackBase + 4.
-
-2013-05-30 Jeff Johnston <jjohnstn@redhat.com>
-
- * rs6000/Makefile.in: Add sim-times support. This file has been
- moved from newlib/libc/machine/powerpc and renamed.
- * rs6000/sim-times.c: New file.
-
-2013-05-14 DJ Delorie <dj@redhat.com>
- Nick Clifton <nickc@redhat.com>
-
- * configure.in (msp430*-*-elf): Add.
- * configure: Regenerate.
- * msp430: New directory.
-
-2013-04-19 Steve Ellcey <sellcey@imgtec.com>
-
- * mips/cfe_api.h (int64_t): Remove define.
- (uint64_t): Remove define.
- (intptr_t): Remove define.
- (uintptr_t): Remove define.
- (sys/types.h): Remove include.
- (_ansi.h): Remove include.
-
-2013-04-19 Yufeng Zhang <yufeng.zhang@arm.com>
-
- * aarch64/Makefile.in (rdimon-crt0.o, rdimon-trap.o)
- (rdimon-_exit.o, rdimon-_kill.o, rdimon-syscalls.o)
- (rdimon-libcfunc.o): Add $(CFLAGS) to the compiler command line.
- * aarch64/cpu-init/Makefile.in (${CPU_INIT_OBJS}): Add $(CFLAGS)
- to the compiler command line.
-
-2013-02-10 Peter Marheine <peter@taricorp.net>
-
- * libgloss/rx/Makefile.in: Respect DESTDIR when installing
-
-2013-02-04 Greta Yorsh <greta.yorsh@arm.com>
-
- * arm/elf-rdimon.specs (-lrdimon): Change link to lib.
-
-2013-02-01 Nick Clifton <nickc@redhat.com>
-
- * v850/crt0.S: Add recognition of the e3v5
- architecture variant.
-
-2013-01-18 Marcus Shawcroft <marcus.shawcroft@arm.com>
-
- * aarch64/Machine.in (RDIMON_SCRIPTS):
- Add aem-ve.specs and aem-validation.specs.
- * aarch64/elf-aem-validation.specs: New file.
- * aarch64/elf-aem-ve.specs: New file.
-
-2013-01-15 Nick Clifton <nickc@redhat.com>
-
- * v850/crt0.S (_start): Enable FPU for the V850e2v3.
-
-2012-12-17 Stuart Henderson <shenders@gcc.gnu.org>
-
- * bfin/Makefile.in: Add BF60x support.
- * bfin/basiccrt.S: Add core1 support.
- * bfin/bf606.ld: New file.
- * bfin/bf606c0.ld: New file.
- * bfin/bf606c1.ld: New file.
- * bfin/bf606m.ld: New file.
- * bfin/bf607.ld: New file.
- * bfin/bf607c0.ld: New file.
- * bfin/bf607c1.ld: New file.
- * bfin/bf607m.ld: New file.
- * bfin/bf608.ld: New file.
- * bfin/bf608c0.ld: New file.
- * bfin/bf608c1.ld: New file.
- * bfin/bf608m.ld: New file.
- * bfin/bf609.ld: New file.
- * bfin/bf609c0.ld: New file.
- * bfin/bf609c1.ld: New file.
- * bfin/bf609m.ld: New file.
- * bfin/bfin-common-mc0.ld: New file.
- * bfin/include/cdefBF606.h : New file.
- * bfin/include/cdefBF607.h : New file.
- * bfin/include/cdefBF608.h : New file.
- * bfin/include/cdefBF609.h : New file.
- * bfin/include/defBF606.h : New file.
- * bfin/include/defBF607.h : New file.
- * bfin/include/defBF608.h : New file.
- * bfin/include/defBF609.h : New file.
- * bfin/include/sys/_adi_platform.h: Add BF60x support.
- * bfin/include/sys/anomaly_macros_rtl.h : Clean up.
-
-2012-11-23 Yufeng Zhang <yufeng.zhang@arm.com>
-
- * aarch64/configure.in: Replace the direct generation of
- cpu-init/Makefile.in with AC_CONFIG_SUBDIRS(cpu-init).
- * aarch64/configure: Re-generate.
- * aarch64/cpu-init/Makefile.in (objtype): Remove.
- (Makefile, config.status): Update the rules.
- * aarch64/cpu-init/aclocal.m4: New file (generated).
- * aarch64/cpu-init/configure.in: New file.
- * aarch64/cpu-init/configure: New file (generated).
-
-2012-10-27 Anthony Green <green@moxielogic.com>
-
- * moxie/sim-unlink.S (unlink): Loop forever.
- moxie/sim-time.S (_sim_time): Ditto.
-
-2012-10-27 Anthony Green <green@moxielogic.com>
-
- * moxie/crt0.S (_start): Call memset with correct
- ABI.
-
-2012-10-03 DJ Delorie <dj@redhat.com>
-
- * rl78/crt0.S (_interrupt_vector_table): Convert from CPP macros
- to GAS macros, to avoid dependence on the line separation
- character.
-
-2012-10-01 DJ Delorie <dj@redhat.com>
-
- * v850/sbrk.c (_sbrk): Change heap_start to be an array of
- undefined size, to avoid problems when compiled with -msda=4.
-
-2012-09-26 Ian Bolton <ian.bolton@arm.com>
- Jim MacArthur <jim.macarthur@arm.com>
- Marcus Shawcroft <marcus.shawcroft@arm.com>
- Nigel Stephens <nigel.stephens@arm.com>
- Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
- Richard Earnshaw <rearnsha@arm.com>
- Sofiane Naci <sofiane.naci@arm.com>
- Tejas Belagod <tejas.belagod@arm.com>
- Yufeng Zhang <yufeng.zhang@arm.com>
-
- * aarch64/Makefile.in: New file.
- * aarch64/_exit.c: New file.
- * aarch64/_kill.c: New file.
- * aarch64/aclocal.m4: Generated.
- * aarch64/configure: Generated.
- * aarch64/configure.in: New file.
- * aarch64/cpu-init/Makefile.in: New file.
- * aarch64/cpu-init/rdimon-aem-el3.S: New file.
- * aarch64/crt0.S: New file.
- * aarch64/elf-rdimon.specs: New file.
- * aarch64/libcfunc.c: New file.
- * aarch64/svc.h: New file.
- * aarch64/syscalls.c: New file.
- * configure.in: Add AArch64.
- * configure: Re-generated.
-
-2012-09-13 Anthony Green <green@moxielogic.com>
-
- * moxie/moxie-elf-common.ld: Add bi-endian support.
-
-2012-08-30 DJ Delorie <dj@redhat.com>
-
- * rx/rx.ld: Add W_* sections to .rodata.
- * rx/rx-sim.ld: Likewise.
-
-2012-08-30 Kaushik Phatak <kaushik.phatak@kpitcummins.com>
-
- * cr16/sys/syscall.h: New file.
-
-2012-05-02 Greta Yorsh <Greta.Yorsh@arm.com>
-
- * arm/redboot-crt0.S (__change_mode): Replace mov with movs.
-
-2012-03-23 Mike Frysinger <vapier@gentoo.org>
-
- * cris/Makefile.in (install-lin): Add $(DESTDIR) before ${tooldir}.
-
-2012-03-12 Mike Frysinger <vapier@gentoo.org>
-
- * libnosys/Makefile.in (NEWLIB_CFLAGS, NEWLIB_LDFLAGS,
- INCLUDES, CFLAGS_FOR_TARGET, LDFLAGS_FOR_TARGET,
- AR_FLAGS, .c.o, .C.o, .s.o, .S.o, .c.s): Delete and replace
- with @host_makefile_frag@.
-
-2012-03-12 Mike Frysinger <vapier@gentoo.org>
-
- * config/default.mh (AR_FLAGS): Set to rc.
-
-2012-03-09 Jeff Johnston <jjohnstn@redhat.com>
-
- * epiphany/access.c: Add modification rights to clause as
- permitted by DJ Delorie.
- * iq2000/access.c: Ditto.
- * mn10200/access.c: Ditto.
- * mn10300/access.c: Ditto.
- * mt/access.c: Ditto.
- * v850/access.c: Ditto.
-
-2012-03-02 Bin Cheng <bin.cheng@arm.com>
-
- * configure.in: Accept "arm*" target spec instead of just "arm".
- * configure: Regenerated.
- * libnosys/configure.in: Likewise.
- (libc_symbol_prefix): Renamed to libc_cv_symbol_prefix.
- * libnosys/configure: Regenerated (using autoconf v2.68).
-
-2012-02-21 Jeremy Bennett <jeremy.bennett@embecosm.com>
- Alan Lehotsky <apl@alum.mit.edu>
- Joern Rennecke <joern.rennecke@embecosm.com>
-
- * configure.in: Add Epiphany support.
- * configure: Regenerate.
- * epiphany: New directory.
- * libgloss/README: Add Epiphany entry.
-
-2012-01-23 Stuart Henderson <stuart.henderson@analog.com>
-
- * bfin/_exit.c: New file.
- * bfin/Makefile.in (BOARD_OBJS): Add _exit.o.
-
-2012-01-17 Bin Cheng <bin.cheng@arm.com>
-
- * arm/linux-crt0.c: Use ldr instead of adr to get address of
- _start_thumb.
-
-2011-12-18 Steve Kilbane <stephen.kilbane@analog.com>
-
- * bfin/clear_cache_range.c: New file.
- * bfin/Makefile.in (SIM_OBJS): Add clear_cache_range.o.
- (BOARD_OBJS): Likewise.
- (BOARD_BSP): Set to libbfinbsp.a.
- (${BOARD_BSP}): New rule.
-
-2011-12-15 Konrad Eisele <konrad@gaisler.com>
-
- * configure.in: Add SPARC LEON support.
- * configure: Regenerated.
- * sparc_leon/asm-leon/amba.h, sparc_leon/asm-leon/asmmacro.h,
- sparc_leon/asm-leon/clock.h, sparc_leon/asm-leon/contextswitch.h,
- sparc_leon/asm-leon/elfmacro.h, sparc_leon/asm-leon/head.h,
- sparc_leon/asm-leon/irq.h, sparc_leon/asm-leon/jiffies.h,
- sparc_leon/asm-leon/lambapp.h, sparc_leon/asm-leon/lambapp_devs.h,
- sparc_leon/asm-leon/leon.h, sparc_leon/asm-leon/leon3.h,
- sparc_leon/asm-leon/leonbare_debug.h, sparc_leon/asm-leon/leonbare_kernel.h,
- sparc_leon/asm-leon/leonbare_kernel_queue.h, sparc_leon/asm-leon/leoncompat.h,
- sparc_leon/asm-leon/leondbg.h, sparc_leon/asm-leon/leonstack.h,
- sparc_leon/asm-leon/liblocks.h, sparc_leon/asm-leon/linkage.h,
- sparc_leon/asm-leon/param.h, sparc_leon/asm-leon/queue.h,
- sparc_leon/asm-leon/spinlock.h, sparc_leon/asm-leon/stack.h,
- sparc_leon/asm-leon/time.h, sparc_leon/asm-leon/timer.h,
- sparc_leon/asm-leon/types.h, sparc_leon/asm-leon/winmacros.h:
- New file.
- * sparc_leon/Makefile.in, sparc_leon/_exit.c,
- sparc_leon/amba.c, sparc_leon/amba_dbg.c,
- sparc_leon/amba_driver.c, sparc_leon/amba_scan.c,
- sparc_leon/asm-leon, sparc_leon/bdinit.S,
- sparc_leon/busscan.S, sparc_leon/cacheA.S,
- sparc_leon/catch_interrupt.c, sparc_leon/catch_interrupt_mvt.c,
- sparc_leon/catch_interrupt_pending.c, sparc_leon/catch_interrupt_svt.c,
- sparc_leon/configure.in,
- sparc_leon/console.c, sparc_leon/console_dbg.c,
- sparc_leon/console_init.c, sparc_leon/contextswitch.c,
- sparc_leon/contextswitch_asm.S, sparc_leon/crt0.S,
- sparc_leon/crti.S, sparc_leon/crtn.S,
- sparc_leon/etrap.S, sparc_leon/etrap_fast.S,
- sparc_leon/fpu.S, sparc_leon/gettimeofday.c,
- sparc_leon/initcalls.c, sparc_leon/io.c,
- sparc_leon/irqinstall.S, sparc_leon/irqtrap.S,
- sparc_leon/irqtrap_fast.S, sparc_leon/jiffies.c,
- sparc_leon/kernel.c, sparc_leon/kernel_context.S,
- sparc_leon/kernel_debug.c, sparc_leon/kernel_debug_var.c,
- sparc_leon/kernel_mm.c, sparc_leon/kernel_mutex.c,
- sparc_leon/kernel_queue.c, sparc_leon/kernel_sched.c,
- sparc_leon/kernel_thread.c, sparc_leon/lcpuinit.S,
- sparc_leon/locore.S, sparc_leon/locore_atexit.c,
- sparc_leon/locore_clean.S, sparc_leon/locore_mvt.S,
- sparc_leon/locore_mvt_reset.S, sparc_leon/locore_svt.S,
- sparc_leon/locore_svt_reset.S, sparc_leon/locore_svtdisp.S,
- sparc_leon/locore_var.S, sparc_leon/locore_var_svt.S,
- sparc_leon/mmu_asm.S, sparc_leon/mutex.c,
- sparc_leon/nocache.S, sparc_leon/pnpinit.c,
- sparc_leon/pnpinit_malloc.c, sparc_leon/pnpinit_simple.c,
- sparc_leon/regwin.S, sparc_leon/regwin_patch.c,
- sparc_leon/regwin_slow.S, sparc_leon/regwinflush.S,
- sparc_leon/rtc.c, sparc_leon/rtrap.S,
- sparc_leon/rtrap_fast.S, sparc_leon/stop.S,
- sparc_leon/timer.c, sparc_leon/times.c:
- New file
- * sparc_leon/configure: Regenerate
-
-2011-12-13 Richard Earnshaw <rearnsha@arm.com>
- Thomas Klein <th.r.klein@web.de>
-
- * arm/crt0.S: Manually set the target architecture
- when compiling for Thumb1 on EABI targets.
- Avoid v6-only Thumb-1 MOV instruction.
-
-2011-11-28 DJ Delorie <dj@redhat.com>
-
- * configure.in: Add rl78.
- * configure: Regenerate.
- * rl78: New directory
-
-2011-11-08 Mike Frysinger <vapier@gentoo.org>
-
- * libnosys/Makefile.in (install): Use INSTALL_DATA.
-
-2011-10-07 Nick Clifton <nickc@redhat.com>
-
- * rx/crt0.S: Initialise the PID address register.
- (__pid_base): Define weakly.
-
-2011-09-29 Matthew Gretton-Dann <matthew.gretton-dann@arm.com>
-
- * arm/crt0.s: Support 0 heap base response from HeapInfo syscall.
-
-2011-09-29 Bin Cheng <bin.cheng@arm.com>
-
- * arm/arm.h (HAVE_CALL_INDIRECT): Define.
- * arm/crt0.S (indirect_call): New macro. Encodes indirect
- function calls. Does not use blx for pre-armv5 targets.
-
-2011-08-19 Nick Clifton <nickc@redhat.com>
-
- * iq2000/sim.ld (.gcc_except_table): Include .gcc_except_table.foo
- sections as well.
-
-2011-08-08 Mike Stump <mikestump@comcast.net>
-
- * Makefile.in: Make stmp-bsp and install consistent with
- subdir_do target with regards to error handling.
-
-2011-07-13 Bin Cheng <bin.cheng@arm.com>
-
- * arm/crt0.S: Support armv6-m processors in libgloss.
- * arm/swi.h: Likewise.
- * arm/trap.S: Likewise.
- * arm/redboot-crt0.S: Likewise.
- * arm/linux-crt0.c: Likewise.
- * arm/arm.h: New.
-
-2011-07-01 Mike Frysinger <vapier@gentoo.org>
-
- * bfin/syscalls.c (_getpid): Call do_syscall with func argument n and
- return the result.
- (_fstat): Delete stub body. Add block array and assign file/st to it.
- Call do_syscall with result.
- (_stat): Delete stub body. Add block array and assign fname/st to
- it. Call do_syscall with result.
- (_link): Change func arguments to accept two strings. Add block array
- and assign existing/new to it. Call do_syscall with result.
- (_unlink): Change func arguments to accept a string. Call do_syscall
- with new argument.
-
-2011-07-01 Mike Frysinger <vapier@gentoo.org>
-
- * bfin/syscalls.c (_lseek): Change 3rd arg name to whence. Increase
- block array to 3 elements. Set 3rd element to whence.
-
-2011-06-29 Jeff Johnston <jjohnstn@redhat.com>
-
- * arm/Makefile.in: Add $CFLAGS to compile commands for specified .o targets.
-
-2011-06-22 Mike Frysinger <vapier@gentoo.org>
-
- * bfin/syscalls.c (do_syscall): Delete local variable definitions.
- Declare result, result2, errcode local ints. Delete asm inputs
- and outputs. Set output constraints to q0/result, q1/result2, and
- q2/errcode. Set input constraints to qA/reason and q0/arg. Set
- errno to errcode.
-
-2011-06-21 Mike Frysinger <vapier@gentoo.org>
-
- * bfin/syscalls.c: Trim trailing whitespace.
- * bfin/crt0.S: Likewise.
-
-2011-06-14 Joseph Myers <joseph@codesourcery.com>
-
- * configure.in: Don't handle strongarm, ep9312 and xscale target
- names.
- * configure: Regenerate.
- * libnosys/configure.in: Don't handle strongarm and thumb target
- names.
- * libnosys/configure: Regenerate.
-
-2011-05-27 Nick Clifton <nickc@redhat.com>
-
- * v8500/sbrk.c (_sbrk): Tidy code.
- Base start of heap on the "heap_start" symbol.
-
-2011-03-26 Mike Frysinger <vapier@gentoo.org>
-
- * bfin/include/builtins.h (__builtin_raise): Change constraint to n.
- (__builtin_excpt): Likewise.
-
-2011-03-26 Mike Frysinger <vapier@gentoo.org>
-
- * bfin/Makefile.in (install-sim): Exit when install fails.
- (install-board): Likewise.
-
-2011-03-24 Nick Clifton <nickc@redhat.com>
-
- * xstormy16/crt0.s (_hwint): Fix .size directive.
-
- * frv/crt0.S (__frv_fix_usrptrs): Fix .size directive.
-
-2011-03-21 Kevin Buettner <kevinb@redhat.com>
-
- * v850/sys/syscall.h (SYS_rename): Define.
-
-2011-01-10 Mike Frysinger <vapier@gentoo.org>
-
- * Makefile.in (stmp-bsp): Exit when subdirs fail.
- (install): Likewise.
-
-2010-12-02 Jayant Sonar jayant.sonar@kpitcummins.com
- Kaushik Phatak kaushik.phatak@kpitcummins.com
-
- * configure.in: Add CR16 support.
- * configure: Regenerated.
- * cr16/aclocal.m4: New.
- * cr16/close.c: New.
- * cr16/configure: New.
- * cr16/configure.in: New.
- * cr16/crt1.S: New.
- * cr16/crti.S: New.
- * cr16/crtn.S: New.
- * cr16/dvz_hndl.c: New.
- * cr16/_exit.c: New.
- * cr16/flg_hndl.c: New.
- * cr16/fstat.c: New.
- * cr16/_getenv.c: New.
- * cr16/getpid.c: New.
- * cr16/iad_hndl.c: New.
- * cr16/intable.c: New.
- * cr16/isatty.c: New.
- * cr16/kill.c: New.
- * cr16/lseek.c: New.
- * cr16/Makefile.in: New.
- * cr16/open.c: New.
- * cr16/putnum.c: New.
- * cr16/read.c: New.
- * cr16/_rename.c: New.
- * cr16/sbrk.c: New.
- * cr16/sim.ld: New.
- * cr16/stat.c: New.
- * cr16/svc_hndl.c: New.
- * cr16/time.c: New.
- * cr16/und_hndl.c: New.
- * cr16/unlink.c: New.
- * cr16/write.c: New.
-
-2010-11-17 Bernd Schmidt <bernds@codesourcery.com>
-
- * tic6x/syscalls.c (cio_getclk_to_host, cio_getclk_from_host): New
- structs.
- (cio_to_host, cio_from_host): Use them.
- (clock): New function.
-
-2010-10-17 Mike Frysinger <vapier@gentoo.org>
-
- * bfin/include/blackfin.h, bfin/include/builtins.h,
- bfin/include/ccblkfn.h, bfin/include/cdefBF512.h,
- bfin/include/cdefBF514.h, bfin/include/cdefBF516.h,
- bfin/include/cdefBF518.h, bfin/include/cdefBF51x_base.h,
- bfin/include/cdefBF522.h, bfin/include/cdefBF523.h,
- bfin/include/cdefBF524.h, bfin/include/cdefBF525.h,
- bfin/include/cdefBF526.h, bfin/include/cdefBF527.h,
- bfin/include/cdefBF52x_base.h, bfin/include/cdefBF531.h,
- bfin/include/cdefBF532.h, bfin/include/cdefBF533.h,
- bfin/include/cdefBF534.h, bfin/include/cdefBF535.h,
- bfin/include/cdefBF536.h, bfin/include/cdefBF537.h,
- bfin/include/cdefBF538.h, bfin/include/cdefBF539.h,
- bfin/include/cdefBF53x.h, bfin/include/cdefBF542.h,
- bfin/include/cdefBF542M.h, bfin/include/cdefBF544.h,
- bfin/include/cdefBF544M.h, bfin/include/cdefBF547.h,
- bfin/include/cdefBF547M.h, bfin/include/cdefBF548.h,
- bfin/include/cdefBF548M.h, bfin/include/cdefBF549.h,
- bfin/include/cdefBF549M.h, bfin/include/cdefBF54x_base.h,
- bfin/include/cdefBF561.h, bfin/include/cdef_LPBlackfin.h,
- bfin/include/cdefblackfin.h, bfin/include/cplb.h,
- bfin/include/cplbtab.h, bfin/include/defBF512.h,
- bfin/include/defBF514.h, bfin/include/defBF516.h,
- bfin/include/defBF518.h, bfin/include/defBF51x_base.h,
- bfin/include/defBF522.h, bfin/include/defBF523.h,
- bfin/include/defBF524.h, bfin/include/defBF525.h,
- bfin/include/defBF526.h, bfin/include/defBF527.h,
- bfin/include/defBF52x_base.h, bfin/include/defBF531.h,
- bfin/include/defBF532.h, bfin/include/defBF533.h,
- bfin/include/defBF534.h, bfin/include/defBF535.h,
- bfin/include/defBF536.h, bfin/include/defBF537.h,
- bfin/include/defBF538.h, bfin/include/defBF539.h,
- bfin/include/defBF542.h, bfin/include/defBF542M.h,
- bfin/include/defBF544.h, bfin/include/defBF544M.h,
- bfin/include/defBF547.h, bfin/include/defBF547M.h,
- bfin/include/defBF548.h, bfin/include/defBF548M.h,
- bfin/include/defBF549.h, bfin/include/defBF549M.h,
- bfin/include/defBF54x_base.h, bfin/include/defBF561.h,
- bfin/include/defblackfin.h, bfin/include/sysreg.h,
- bfin/include/sys/anomaly_macros_rtl.h, bfin/include/sys/excause.h,
- bfin/include/sys/exception.h, bfin/include/sys/mc_typedef.h,
- bfin/include/sys/platform.h, bfin/include/sys/pll.h:
- Update to Visual DSP 5.0 Update 8.
-
-2010-10-16 Mike Frysinger <vapier@gentoo.org>
-
- * bfin/Makefile.in (BOARD_SCRIPTS): Add bf592.ld.
- * bfin/bf592: New linker scripts.
- * bfin/include/cdefBF592-A.h, bfin/include/cdefBF59x_base.h,
- bfin/include/defBF592-A.h, bfin/include/defBF59x_base.h: New files.
- * bfin/include/sys/_adi_platform.h: Include new bf592 headers.
-
-2010-10-15 Mike Frysinger <vapier@gentoo.org>
-
- * bfin/Makefile.in (BOARD_SCRIPTS): Add bf504.ld and bf506.ld.
- * bfin/bf504.ld, bfin/bf506.ld: New linker scripts.
- * bfin/include/cdefBF504.h, bfin/include/cdefBF504F.h,
- bfin/include/cdefBF506F.h, bfin/include/cdefBF50x_base.h,
- bfin/include/defBF504.h, bfin/include/defBF504F.h,
- bfin/include/defBF506F.h, bfin/include/defBF50x_base.h: New files.
- * bfin/include/def_LPBlackfin.h: Add DMC_P for __ADSPBF50x__.
- * bfin/include/sys/_adi_platform.h: Include new bf50x headers.
-
-2010-10-15 Stuart Henderson <stuart.henderson@analog.com>
-
- * bfin/bfin-common-mc.ld: Add .l1.data and .l1.text input sections.
- * bfin/bfin-common-sc.ld: Likewise.
-
-2010-10-15 Mike Frysinger <vapier@gentoo.org>
-
- * bfin/include/sys/_adi_platform.h: Remove __ADSPBF541__.
- * bfin/include/cdefBF541.h, bfin/include/defBF541.h: Punt.
-
-2010-10-08 Bernd Schmidt <bernds@codesourcery.com>
- Joseph Myers <joseph@codesourcery.com>
-
- * configure.in: Handle tic6x targets.
- * configure: Regenerate.
- * tic6x/Makefile.in, tic6x/configure.in, tic6x/crt0.S,
- tic6x/getpid.c, tic6x/kill.c, tic6x/sbrk.c, tic6x/syscalls.c: New.
- * tic6x/configure: New (generated).
-
-2010-10-02 Anthony Green <green@moxielogic.com>
-
- * moxie/Makefile.in (QEMU_OBJS): Add missing object files to the
- qemu support library.
-
-2010-10-02 Anthony Green <green@moxielogic.com>
-
- * moxie/crt0.S (_start): Minor optimizations to __start.
-
-2010-09-23 Mike Frysinger <vapier@gentoo.org>
- Corinna Vinschen <vinschen@redhat.com>
-
- * doc/porting.texi: Fix typos.
-
-2010-09-22 Mike Frysinger <vapier@gentoo.org>
-
- * README: Add bfin to the list.
-
-2010-08-27 Christophe Lyon <christophe.lyon@st.com>
-
- * syscalls.c (_isatty): Fix return value.
-
-2010-07-23 Naveen.H.S <naveenh1@kpitcummins.com>
- Gina Verlekar <gina.verlekar@kpitcummins.com>
-
- Moving files from newlib/libc/sys/sysnecv850 to v850
-
- * libnosys/configure: Regenerated.
- * libnosys/configure.in: Compact v850 support to v850*-*-*.
- * libnosys/configure: Regenerated.
- * configure.in: Add libgloss support for v850.
- * configure: Regenerated.
- * v850/access.c: New file.
- * v850/aclocal.m4: New.
- * v850/chmod.c: New.
- * v850/chown.c: New.
- * v850/close.c: New.
- * v850/configure: New.
- * v850/configure.in: New.
- * v850/crt0.S: New.
- * v850/crt1.c: New.
- * v850/execv.c: New.
- * v850/execve.c: New.
- * v850/_exit.c: New.
- * v850/fork.c: New.
- * v850/fstat.c: New.
- * v850/getpid.c: New.
- * v850/gettime.c: New.
- * v850/isatty.c: New.
- * v850/kill.c: New.
- * v850/link.c: New.
- * v850/lseek.c: New.
- * v850/Makefile.in: New.
- * v850/open.c: New.
- * v850/pipe.c: New.
- * v850/read.c: New.
- * v850/sbrk.c: New.
- * v850/sim.ld: New.
- * v850/stat.c: New.
- * v850/time.c: New.
- * v850/times.c: New.
- * v850/trap.S: New.
- * v850/unlink.c: New.
- * v850/utime.c: New.
- * v850/wait.c: New.
- * v850/write.c: New.
-
-2010-07-19 Rafael Campos <methril@gmail.com>
-
- * m68k/cf-crt1.c (hardware_init_hook): Accommodate new family
- __mcf_family_51 since gcc 4.5.1.
-
-2010-06-29 Nick Clifton <nickc@redhat.com>
-
- * xstormy16/eva_app.ld (.gcc_except_table): Include sections with
- the .gcc_except_table. prefix.
- * xstormy16/eva_stub.ld: Likewise.
- * xstormy16/sim_high.ld: Likewise.
- * xstormy16/sim_low.ld: Likewise.
-
-2010-05-03 Michael Eager <eager@eagercon.com>
-
- * rs6000/Makefile.in: Remove xil-exit.o.
-
-2010-02-08 Conny Marco Menebrocker <c-m-m@gmx.de>
-
- * xc16x/xc16x.mt: New file.
- * xc16x/configure.in: Add target_makefile_frag reference.
- * xc16x/configure: Regenerated.
-
-2009-12-17 Jeff Johnston <jjohnstn@redhat.com>
-
- * mn10300/Makefile.in: Add mkdir call to make installation
- directory when installing.
-
-2009-12-16 Conny Marco Menebrocker <c-m-m@gmx.de>
-
- * xc16x/Makefile.in: Remove extraneous stuff
- brought in by copy.
- * xc16x/configure.in: Ditto.
- * xc16x/configure: Regenerated.
-
-2009-12-10 Conny Marco Menebrocker <c-m-m@gmx.de>
-
- * configure.in: Add xc16x support.
- * configure: Regenerated.
- * xc16x/Makefile.in: New file for xc16x port.
- * xc16x/aclocal.m4: Ditto.
- * xc16x/close.S: Ditto.
- * xc16x/configure: Ditto.
- * xc16x/configure.in: Ditto.
- * xc16x/create.c: Ditto.
- * xc16x/crt0.S: Ditto.
- * xc16x/fstat.S: Ditto.
- * xc16x/getchar1.c: Ditto.
- * xc16x/isatty.c: Ditto.
- * xc16x/lseek.c: Ditto.
- * xc16x/mem-layout.c: Ditto.
- * xc16x/misc.c: Ditto.
- * xc16x/open.c: Ditto.
- * xc16x/read.c: Ditto.
- * xc16x/sbrk.c: Ditto.
- * xc16x/syscalls.c: Ditto.
- * xc16x/trap_handle.c: Ditto.
- * xc16x/write.c: Ditto.
- * xc16x/sys/syscall.h: Ditto.
-
-2009-11-25 DJ Delorie <dj@redhat.com>
-
- * rx/rx.ld: Place .sbss properly.
- * rx/rx-sim.ld: Likewise.
-
-2009-10-26 DJ Delorie <dj@redhat.com>
-
- * configure.in: Add support for RX sub-directory.
- * configure: Regenerate.
- * rx: New directory.
- * rx/*: New files to support RX architecture.
-
-2009-10-26 Nick Clifton <nickc@redhat.com>
-
- * arm/linux-syscalls0.S (SYSCALL0, SYSCALL3, SYSCALL6, SYSCALL4):
- Delete Thumb definitions - the ARM versions work correctly in
- Thumb mode.
-
-2009-10-08 Jie Zhang <jie.zhang@analog.com>
-
- * bfin/Makefile.in (basiccrt.o, basiccrts.o): Use
- -mcpu=bf532-any for the default multilib.
-
-2009-09-28 Michael Eager <eager@eagercon.com>
-
- * configure.in: Add microblaze-*-*.
- * configure: Add microblaze-*-* (not regenerated.)
- * microblaze: NEW microblaze target directory.
- * microblaze/configure.in: NEW.
- * microblaze/configure: Generate.
- * microblaze/Makefile.in: NEW.
- * microblaze/{crt0.S, crt1.S, crt2.S, crt3.S, crt4.S, crtinit.S}: NEW.
- * microblaze/{pgcrtinit.S, _program_clean.S, _program_init.S,
- sbrk.c, sim-crtinit.S, sim-pgcrtinit.S, timer.c, _exception_handler.S,
- _hw_exception_handler.S, _interrupt_handler.S, xil_malloc.c,
- nnxil_printf.c, xil_sbrk.c: NEW.
- * microblaze/xilinx.ld: NEW.
-
-2009-09-21 Ken Werner <ken.werner@de.ibm.com>
-
- * spu/getpagesize.c: Align getpagesize implementation to POSIX
-
-2009-09-16 Mike Frysinger <michael.frysinger@analog.com>
-
- * bfin/include/cdefBF512.h, bfin/include/cdefBF514.h,
- bfin/include/cdefBF516.h, bfin/include/cdefBF518.h,
- bfin/include/cdefBF51x_base.h, bfin/include/cdefBF523.h,
- bfin/include/cdefBF524.h, bfin/include/cdefBF526.h,
- bfin/include/cdefBF542M.h, bfin/include/cdefBF544M.h,
- bfin/include/cdefBF547M.h, bfin/include/cdefBF548M.h,
- bfin/include/cdefBF549M.h, bfin/include/defBF512.h,
- bfin/include/defBF514.h, bfin/include/defBF516.h,
- bfin/include/defBF518.h, bfin/include/defBF51x_base.h,
- bfin/include/defBF523.h, bfin/include/defBF524.h,
- bfin/include/defBF526.h, bfin/include/defBF542M.h,
- bfin/include/defBF544M.h, bfin/include/defBF547M.h,
- bfin/include/defBF548M.h, bfin/include/defBF549M.h:
- New file.
- * bfin/include/ccblkfn.h, bfin/include/cdefBF525.h,
- bfin/include/cdefBF527.h, bfin/include/cdefBF52x_base.h,
- bfin/include/cdefBF532.h, bfin/include/cdefBF534.h,
- bfin/include/cdefBF535.h, bfin/include/cdefBF538.h,
- bfin/include/cdefBF539.h, bfin/include/cdefBF542.h,
- bfin/include/cdefBF544.h, bfin/include/cdefBF547.h,
- bfin/include/cdefBF548.h, bfin/include/cdefBF549.h,
- bfin/include/cdefBF54x_base.h, bfin/include/cdefBF561.h,
- bfin/include/cdefblackfin.h, bfin/include/cdef_LPBlackfin.h,
- bfin/include/cplb.h, bfin/include/defBF527.h,
- bfin/include/defBF52x_base.h, bfin/include/defBF532.h,
- bfin/include/defBF534.h, bfin/include/defBF535.h,
- bfin/include/defBF537.h, bfin/include/defBF538.h,
- bfin/include/defBF539.h, bfin/include/defBF542.h,
- bfin/include/defBF544.h, bfin/include/defBF547.h,
- bfin/include/defBF548.h, bfin/include/defBF549.h,
- bfin/include/defBF54x_base.h, bfin/include/defBF561.h,
- bfin/include/defblackfin.h, bfin/include/def_LPBlackfin.h,
- bfin/include/sys/_adi_platform.h,
- bfin/include/sys/anomaly_macros_rtl.h,
- bfin/include/sys/exception.h, bfin/include/sysreg.h:
- Update to Visual DSP 5.0 Update 6.
-
-2009-09-16 Mike Frysinger <michael.frysinger@analog.com>
-
- * bfin/Makefile.in (BOARD_SCRIPTS): Add bf512.ld, bf514.ld,
- and bf516.ld, bf518.ld.
- * bfin/bf512.ld: New file.
- * bfin/bf514.ld: Likewise.
- * bfin/bf516.ld: Likewise.
- * bfin/bf518.ld: Likewise
-
-2009-09-16 Jie Zhang <jie.zhang@analog.com>
-
- * bfin/*.ld: Fix typos in comments.
-
-2009-09-08 Bernd Schmidt <bernd.schmidt@analog.com>
-
- * bfin/include/ccblkfn.h: New file.
-
-2009-09-08 Mike Frysinger <michael.frysinger@analog.com>
-
- * bfin/include/sys/_adi_platform.h: Convert __ASSEMBLY__ to
- __ASSEMBLER__.
- * bfin/include/sys/pll.h: Likewise
-
-2009-09-08 Jie Zhang <jie.zhang@analog.com>
-
- * bfin/Makefile.in (basiccrt.o, basiccrts.o): Don't use
- -mcpu=bf532-any for the default multilib.
-
-2009-07-28 DJ Delorie <dj@redhat.com>
-
- * mep/gmap_default.ld: Add linkonce sections for .vtext.
- * mep/default.ld: Likewise.
- * mep/fmax.ld: Likewise.
- * mep/simple.ld: Likewise.
-
-2009-07-14 DJ Delorie <dj@redhat.com>
-
- * mep/syscalls.S (sysret): Maintain 16-byte stack alignment.
-
-2009-07-08 DJ Delorie <dj@redhat.com>
-
- * m32c/sbrk.c (sbrk): Change to take ptrdiff_t, not int.
-
-2009-07-01 Anthony Green <green@moxielogic.com>
-
- * moxie/crt0.S (_start): Clear BSS at startup. Register _fini()
- with atexit().
- * moxie/sim-open.S: Fix comment.
-
-2009-06-19 Joseph Myers <joseph@codesourcery.com>
-
- * Makefile.in (html, pdf): New.
- * doc/Makefile.in (html, pdf, porting.pdf, porting.html): New.
- * doc/porting.texi: Fix section structure.
-
-2009-06-17 Michael Eager <eager@eagercon.com>
-
- * rs6000/Makefile.in: Add xilinx support.
- * rs6000/xil-crt0.s: New crt0 file for powerpc-xilinx-eabi.
- * rs6000/xilinx.ld: New file.
- * rs6000/xilinx440.ld: Ditto.
-
-2009-05-13 Ken Werner <ken.werner@de.ibm.com>
-
- * configure.in: Introduce config_libnosys flag which defaults to true.
- * configure: Regenerate.
-
-2009-05-13 Ulrich Weigand <uweigand@de.ibm.com>
-
- * spu/crtn.S: Add dummy to ensure nothing gets linked at address 0.
- * spu/crti.S: Remove nop.
-
-2009-05-08 Nick Clifton <nickc@redhat.com>
-
- * mn10300/sim.ld: Add missing section names such as .bss.*
- .text.*, etc. General tidy up.
-
-2009-05-07 Ken Werner <ken.werner@de.ibm.com>
-
- * spu/configure.in: Fix multilib support.
- * spu/configure: Regenerate.
- * spu/Makefile.in: Add CFLAGS_FOR_TARGET.
-
-2009-04-29 Anthony Green <green@moxielogic.com>
-
- * moxie/moxie-elf-common.ld: Move default stack out to accommodate
- large GCC tests.
-
-2009-04-22 Anthony Green <green@moxielogic.com>
-
- * configure.in: Add moxie support.
- * configure: Regenerate.
- * moxie/aclocal.m4, moxie/configure, moxie/configure.in,
- moxie/crt0.S, moxie/fstat.c, moxie/getpid.c, isatty.c,
- moxie/kill.c, moxie/Makefile.in, moxie/moxie-elf-common.ld,
- moxie/print.c, moxie/putnum.c, moxie/qemu.ld, moxie/qemu-time.c,
- moxie/qemu-write.c, moxie/sbrk.c, moxie/sim-close.S,
- moxie/sim-exit.S,
- moxie/sim-inbyte.c, moxie/sim.ld, moxie/sim-lseek.c,
- moxie/sim-lseek.S, moxie/sim-open.S, moxie/sim-read.S, moxie/sim-time.c,
- moxie/sim-unlink.S, moxie/sim-write.S, moxie/stat.c: New files.
-
-2009-04-22 DJ Delorie <dj@redhat.com>
-
- * mep/sim-crt0.S (_start): Fix typo.
-
-2009-04-21 DJ Delorie <dj@redhat.com>
-
- * mep/Makefile.in (SCRIPTS): Update to new config.
- * mep/default.ld: New.
- * mep/gmap_default.ld: Change default endian to little.
- * mep/sim-crt0.S: Maintain 8-byte stack alignment.
- * mep/sim-crtn.S: Likewise.
-
-2009-04-03 Ken Werner <ken.werner@de.ibm.com>
-
- * spu/Makefile.in: Add new files.
- * spu/times.c: New File.
- * spu/getitimer.c: Likewise.
- * spu/setitimer.c: Likewise.
-
-2009-04-03 Ken Werner <ken.werner@de.ibm.com>
-
- * spu/Makefile.in: Add linux_getpid.o and linux_gettid.o.
- * spu/linux_getpid.c: New file.
- * spu/linux_gettid.c: New file.
-
-2009-04-03 Ken Werner <ken.werner@de.ibm.com>
-
- * spu/crt0.S (_start): Place spu_id in the first agument register.
-
-2009-03-16 Jeff Johnston <jjohnstn@redhat.com>
-
- * m32r/m32r-stub.c: Replace with one from newer version of gdb.
-
-2009-01-07 Ben Elliston <bje@au.ibm.com>
-
- * Makefile.in (all): Add `+' to the command line so that the
- command is always treated as $(MAKE).
- * doc/Makefile.in (datarootdir): Define.
-
-2008-12-17 Jon Beniston <jon@beniston.com>
-
- * README: Add description of lm32 directory.
- * configure.in: Add lm32 target.
- * configure: Regenerated.
- * libnosys/configure.in: Add lm32 target.
- * libnosys/configure: Regenerated.
- * lm32: New directory.
- * lm32/aclocal.m4: New file.
- * lm32/Makefile.in: New file.
- * lm32/configure.in: New file.
- * lm32/configure: New file.
- * lm32/crt0.S: New file.
- * lm32/isatty.c: New file.
- * lm32/scall.S: New file.
- * lm32/sim.ld: New file.
-
-2008-12-11 Ken Werner <ken.werner@de.ibm.com>
-
- * spu/crt0.S: Call __monstartup if profiling is enabled.
- * spu/Makefile.in: Add gcrt1.o gcrt2.o.
-
-2008-12-06 Adam Nemet <anemet@caviumnetworks.com>
-
- * mips/idt32.ld: Set arch to mips:isa32r2 from mips:isa32. Update
- comment.
-
-2008-12-05 Adam Nemet <anemet@caviumnetworks.com>
-
- * mips/idt64.ld: Set arch to mips:isa64r2 from mips:isa64. Update
- comment.
-
-2008-11-20 Ken Werner <ken.werner@de.ibm.com>
- Patrick Mansfield <patmans@us.ibm.com>
- Joel Schopp <jschopp@austin.ibm.com>
-
- * spu/Makefile.in: Add new files.
- * spu/jsre.h: Add JSRE_MMAP, JSRE_MREMAP, JSRE_MSYNC and
- JSRE_MUNMAP opcodes.
- * spu/mmap_eaddr.c: New File.
- * spu/mremap_eaddr.c: Likewise.
- * spu/msync_eaddr.c: Likewise.
- * spu/munmap_eaddr.c: Likewise.
-
-2008-11-17 Jeff Johnston <jjohnstn@redhat.com>
-
- * m32r/Makefile.in: Add building m32r-stub.o from local copy instead
- of up and over in gdb.
- * m32r/m32r-stub.c: New file copied from gdb.
-
-2008-10-06 Bill Tompkins <bill+newlib@key-square.com>
-
- * arm/crt0.S: Fix calling hardware_init_hook() or software_init_hook()
- under thumb and thumb2.
-
-2008-09-24 DJ Delorie <dj@redhat.com>
-
- * m32c/varvects.S: New.
- * m32c/varvects.h: New.
- * m32c/sample.c: New.
- * m32c/Makefile.in: Add m32cgloss library support.
- * m32c/crt0.S: Tweaks to support interrupts by default.
- * m32c/m32c.tmpl: Likewise.
-
-2008-09-10 Ken Werner <ken.werner@de.ibm.com>
-
- * spu/dirfuncs.c: Avoid warnings.
- * spu/kill.c: Likewise.
-
-2008-09-04 Ken Werner <ken.werner@de.ibm.com>
-
- * spu/Makefile.in: Fix missing linux_syscalls.o.
- * spu/linux_syscalls.c: Remove extraneous "3D" sequences.
-
-2008-08-14 Jie Zhang <jie.zhang@analog.com>
-
- * bfin/Makefile.in: (top_srcdir): Define.
- (mkinstalldirs): Define.
- (BOARD_SCRIPTS): Define.
- (BOARD_LDFLAGS): Define.
- (BOARD_BSP): Define.
- (BOARD_CRT0S): Define.
- (BOARD_OBJS): Define.
- (BOARD_TEST): Define.
- (BOARD_INSTALL): Define.
- (INCLUDES): Add -I$(srcdir)/include.
- (all): Add ${BOARD_CRT0S} and ${BOARD_BSP}.
- (.c.S): Remove target.
- (crt0.o): New target.
- (basiccrt.o): Likewise.
- (basiccrtb.o): Likewise.
- (basiccrts.o): Likewise.
- (basiccrt561.o, basiccrt561s.o, basiccrt561b.o): Likewise
- (clean mostlyclean): Remove ${BOARD_BSP}.
- (install): Depend on ${BOARD_INSTALL}.
- (install-sim): Reformat.
- (install-board): New target.
- * bfin/basiccrt.S: Remove useless __ADSPBF561_COREB__ in
- workaround code for 05000229.
- * bfin/syscalls.c (do_syscall): Use `EXCPT 0' instead of
- `RAISE 0' for syscall.
- * bfin/basiccrt.S: New file.
- * bfin/bf5*ld: New file.
- * bfin/bfin-common-mc.ld: New file.
- * bfin/bfin-common-sc.ld: New file.
- * bfin/include/blackfin.h: New file.
- * bfin/include/cdefBF5*.h: New file.
- * bfin/include/cdef_LPBlackfin.h: New file.
- * bfin/include/cdefblackfin.h: New file.
- * bfin/include/cplb.h: New file.
- * bfin/include/cplbtab.h: New file.
- * bfin/include/defBF5*.h: New files.
- * bfin/include/def_LPBlackfin.h: New files.
- * bfin/include/defblackfin.h: New file.
- * bfin/include/sys/_adi_platform.h: New file.
- * bfin/include/sys/anomaly_macros_rtl.h: New file.
- * bfin/include/sys/excause.h: New file.
- * bfin/include/sys/exception.h: New file.
- * bfin/include/sys/mc_typedef.h: New file.
- * bfin/include/sys/platform.h: New file.
- * bfin/include/sys/pll.h: New file.
- * bfin/include/sysreg.h: New file.
- * libnosys/configure.in (MISSING_SYSCALL_NAMES): Don't define
- for bfin.
- * libnosys/configure: Regenerate.
-
-2008-07-17 Ken Werner <ken.werner@de.ibm.com>
-
- * spu/syscalls.c: Check and set the errno value.
-
-2008-06-17 Ken Werner <ken.werner@de.ibm.com>
-
- * spu/Makefile.in: Add new file.
- * spu/linux_syscalls.c: New file to add Linux syscall support.
-
-2008-06-16 Corrin Meyer <cjmeyer@gmail.com>
-
- * m68k/cf-crt1.c[__mcf_family_m1qe]: Don't access CACR.
-
-2008-05-20 Nick Clifton <nickc@redhat.com>
-
- * iq2000/crt0.S (__dso_handle): Define (weak).
- * frv/crt0.S (__dso_handle): Define (weak).
- * mn10300/crt0.S (___dso_handle): Define (weak).
-
-2008-05-05 Ken Werner <ken.werner@de.ibm.com>
-
- * spu/readlink.c: Align readlink implementation to POSIX.
-
-2008-04-25 Nick Clifton <nickc@redhat.com>
-
- * arm/crt0.S: Allow assembly under ARMv7 ISA. Support for
- initializing stack pointers for interrupt modes is still pending.
-
-2008-04-14 Patrick Mansfield <patmans@us.ibm.com>
-
- * spu/sbrk.c: Remove "extern int errno", use whatever is supplied
- by sys/errno.h.
-
-2008-04-04 DJ Delorie <dj@redhat.com>
-
- * hp74x/configure: Regenerate with autoconf 2.61.
- * fr30/configure: Regenerate with autoconf 2.61.
- * mips/configure: Regenerate with autoconf 2.61.
- * xstormy16/configure: Regenerate with autoconf 2.61.
- * rs6000/configure: Regenerate with autoconf 2.61.
- * d30v/configure: Regenerate with autoconf 2.61.
- * i386/configure: Regenerate with autoconf 2.61.
- * configure: Regenerate with autoconf 2.61.
- * wince/configure: Regenerate with autoconf 2.61.
- * pa/configure: Regenerate with autoconf 2.61.
- * m32r/configure: Regenerate with autoconf 2.61.
- * mn10200/configure: Regenerate with autoconf 2.61.
- * iq2000/configure: Regenerate with autoconf 2.61.
- * cris/configure: Regenerate with autoconf 2.61.
- * m68k/configure: Regenerate with autoconf 2.61.
- * spu/configure: Regenerate with autoconf 2.61.
- * m32c/configure: Regenerate with autoconf 2.61.
- * mn10300/configure: Regenerate with autoconf 2.61.
- * i960/configure: Regenerate with autoconf 2.61.
- * arm/configure: Regenerate with autoconf 2.61.
- * libnosys/configure: Regenerate with autoconf 2.61.
- * m68hc11/configure: Regenerate with autoconf 2.61.
- * bfin/configure: Regenerate with autoconf 2.61.
- * crx/configure: Regenerate with autoconf 2.61.
- * mt/configure: Regenerate with autoconf 2.61.
- * sparc/configure: Regenerate with autoconf 2.61.
- * sparc/libsys/configure: Regenerate with autoconf 2.61.
- * mcore/configure: Regenerate with autoconf 2.61.
- * mep/configure: Regenerate with autoconf 2.61.
- * frv/configure: Regenerate with autoconf 2.61.
- * doc/configure: Regenerate with autoconf 2.61.
-
-2008-01-10 DJ Delorie <dj@redhat.com>
-
- * m32c/exit.S (__exit): preserve both argument registers.
-
-2008-01-03 Jeff Johnston <jjohnstn@redhat.com>
-
- * arm/redboot-syscalls.c: Consistently supply _isatty if syscalls
- dir is used in newlib.
- * bfin/syscalls.c: Ditto.
- * cris/gensyscalls: Ditto.
- * fr30/syscalls.c: Ditto.
- * frv/isatty.c: Ditto.
- * iq2000/isatty.c: Ditto.
- * libnosys/isatty.c: Ditto.
- * m32r/isatty.c: Ditto.
- * mn10200/isatty.c: Ditto.
- * mn10300/isatty.c: Ditto.
- * xstormy16/isatty.c: New file with _isatty function.
-
-2007-12-01 Hans-Peter Nilsson <hp@axis.com>
-
- * cris/Makefile.in (crt0.o): Add CFLAGS when compiling crt0.S.
-
-2007-11-06 Dave Brolley <brolley@redhat.com>
-
- * syscall.h (SYS_reconfig): New macro.
-
-2007-10-11 Ulrich Weigand <uweigand@de.ibm.com>
-
- * spu/crt0.S: Fix so element one of register one is correctly set
- when compiled with -mstdmain and -fstack-check.
-
-2007-10-02 Markus Deuling <deuling@de.ibm.com>
-
- * spu/crt0.S: Initialize __ea_local_store (EA address of the LS)
- via register 6.
-
-2007-10-01 Markus Deuling <deuling@de.ibm.com>
-
- * spu/Makefile.in: add dependencies for crt files.
-
-2007-10-01 Patrick Mansfield <patmans@us.ibm.com>
-
- * spu/sbrk.c: Use the current stack pointer value rather than the
- maximum available memory to determine the amount of heap space
- left. Without this change calling sbrk() can allocate space that
- is currently in use on the stack.
-
-2007-09-26 Patrick Mansfield <patmans@us.ibm.com>
-
- * spu/sched_yield.c: New file (missed on 2007-09-21).
-
-2007-09-21 Patrick Mansfield <patmans@us.ibm.com>
-
- * spu/Makefile.in: Add new files.
- * spu/jsre.h: Add JSRE_PREAD, JSRE_PWRITE, JSRE_READV, and
- JSRE_WRITEV opcodes.
- * spu/pread.c: New file to add pread via assist call.
- * spu/pwrite.c: New file to add pwrite via assist call.
- * spu/readv.c: New file to add readv via assist call.
- * spu/writev.c: New file to add writev via assist call.
-
-2007-09-21 Patrick Mansfield <patmans@us.ibm.com>
-
- * spu/jsre.h: Add JSRE_SCHED_YIELD, JSRE_UMASK, JSRE_UTIME, and
- JSRE_UTIMES.
- * spu/sched_yield.c: New file add sched_yield via assist call.
- * spu/umask.c: New file add umask via assist call.
- * spu/utime.c: New file add utime via assist call.
- * spu/utimes.c: New file add utimes via assist call.
- * spu/Makefile.in: Add new files.
-
-2007-09-21 Patrick Mansfield <patmans@us.ibm.com>
-
- * spu/jsre.h: Add JSRE_SHM_OPEN and JSRE_SHM_UNLINK opcodes.
- * spu/shm_open.c: New file to add shm_open via assist call.
- * spu/shm_unlink.c: New file to add shm_unlink via assist call.
- * spu/Makefile.in: Add shm_open.o and shm_unlink.o
-
-2007-09-21 Patrick Mansfield <patmans@us.ibm.com>
-
- * spu/dirfuncs.c: New file, holds the opendir, closedir, readdir,
- rewinddir, seekdir and telldir implementations. These are
- grouped in one file so that we do not need a separate file for
- the struct dirent and DIR allocation code.
- * spu/jsre.h: Add JSRE_OPENDIR and other dir opcodes.
- * spu/Makefile.in: Add dirfuncs.o.
-
-2007-08-13 Carlos O'Donell <carlos@codesourcery.com>
-
- * arm/crt0.S: Remove '.set' for __stack, hardware_init_hook,
- and software_init_hook.
-
-2007-08-10 Carlos O'Donell <carlos@codesourcery.com>
-
- 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
-
- * arm/syscalls.c (_stat): Use _close
-
- * arm/syscalls.c (struct poslog): Rename to...
- (struct fdent): ... this.
- (FILE_HANDLE_OFFSET): Remove.
- (findslot): Return a struct fdent* if fd is valid, otherwise return NULL.
- (newslot): New function.
- (remap_handle): Remove.
- (initialise_monitor_handles): Use stdout as fallback for stderr.
- (wrap): Rename to...
- (checkerror): ... this.
- (_swiread): Use checkerror() for the return of SWI calls. Correct the use of r0.
- (_read): Use findslot(). Return EBADF on bad handle.
- (_swilseek): Call findslot(). Check for valid whence. Check for negative offset when using
- SEEK_CUR, and check for overflow. Use checkerror(). Check *_Flen calls for errors.
- (_swiwrite): Correct the use of r0.
- (_write): Call findslot().
- (_swiopen): Call findslot(). Check for valid flags. Use checkerror(). Call newslot().
- Handle O_TRUNC, and O_WRONLY. Return index into openfiles[] for fd.
- (_swiclose): Correct the use of r0.
- (_close): Handle stderr == stdout case. Only reclaim handle if _swiclose succeeded.
- (_getpid): Use __attribute__((unused)).
- (_sbrk): Fix formatting.
- (_swistat): New function.
- (_stat): Call _swistat().
- (_fstat): Call _swistat().
- (_unlink): Correct the use of r0.
- (isatty): Call finslot(). Correct the use of r0.
- (_system): Call checkerror(). Correct the use of r0.
- (_rename): Correct the use of r0.
-
-2007-07-13 Kevin Buettner <kevinb@redhat.com>
-
- * mep/fmax.ld, mep/gmap_default.ld, mep/min.ld, mep/simple.ld (.gcc_except_table): Add pattern
- for .gcc_except_table.*.
-
-2007-07-06 Jeff Johnston <jjohnstn@redhat.com>
-
- * arm/syscalls.c (gettimeofday): Change to POSIX signature
- where second argument is passed as void *.
- * bfin/syscalls.c (gettimeofday): Ditto.
- * cris/gensyscalls (gettimeofday): Ditto.
- * cris/linunistd.h (gettimeofday): Ditto.
- * crx/time.c (gettimeofday): Ditto.
- * frv/sim-time.c (gettimeofday): Ditto.
- * i386/cygmon-salib.c (gettimeofday): Ditto.
- * libnosys/gettod.c (gettimeofday): Ditto.
- * m68k/io-gettimeofday.c (gettimeofday): Ditto.
- * sparc/cygmon-salib.c (gettimeofday): Ditto.
- * spu/gettimeofday.c (gettimeofday): Ditto.
-
-2007-06-20 Patrick Mansfield <patmans@us.ibm.com>
-
- * spu/jsre.h: Add JSRE_MKSTEMP and JSRE_MKTEMP values.
- * spu/mkstemp.c: New file to add mkstemp support via assist call.
- * spu/mktemp.c: New file to add mktemp support via assist call.
- * spu/Makefile.in: Add mkstemp.o and mktemp.o
-
-2007-06-20 Patrick Mansfield <patmans@us.ibm.com>
-
- * spu/jsre.h: Add new JSRE opcodes.
- * spu/dup2.c: New file to add dup2 support via assist call.
- * spu/fdatasync.c: New file to add fdatasync support via assist call.
- * spu/fsync.c: New file to add fsync support via assist call.
- * spu/lockf.c: New file to add lockf support via assist call.
- * spu/sync.c: New file to add sync support via assist call.
- * spu/truncate.c: New file to add truncate support via assist call.
- * spu/Makefile.in: Add new files.
-
-2007-06-20 Patrick Mansfield <patmans@us.ibm.com>
-
- * spu/jsre.h: JSRE_LINK, JSRE_SYMLINK and JSRE_READLINK.
- * spu/link.c: New file to add link support via an assist call.
- * spu/readlink.c: New file to add readlink support via an assist call.
- * spu/symlink.c: New file to add symlink support via an assist call.
- * spu/Makefile.in: Add new files.
-
-2007-06-20 Patrick Mansfield <patmans@us.ibm.com>
-
- * spu/jsre.h: Add JSRE_LSTAT.
- * spu/lstat.c: New file add lstat support via an assist call.
- * spu/conv_stat.c: New file, add common stat conversion code.
- * spu/fstat.c: Use __conv_stat.
- * spu/stat.c: Use __conv_stat.
- * spu/Makefile.in: Add conv_stat.o and lstat.o.
-
-2007-06-20 Patrick Mansfield <patmans@us.ibm.com>
-
- * spu/jsre.h: Add JSRE_GETCWD.
- * spu/getcwd.c: New file, implement getcwd with help from an
- assist call.
- * spu/Makefile.in: Add getcwd.
-
-2007-06-20 Patrick Mansfield <patmans@us.ibm.com>
-
- * spu/jsre.h: Add defines for new assist calls.
- * spu/chdir.c: New file, support chdir via assist call.
- * spu/chmod.c: New file, support chmod via assist call.
- * spu/chown.c: New file, support chown via assist call.
- * spu/fchdir.c: New file, support fchdir via assist call.
- * spu/fchmod.c: New file, support fchmod via assist call.
- * spu/fchown.c: New file, support fchown via assist call.
- * spu/lchown.c: New file, support lchown via assist call.
- * spu/mkdir.c: New file, support mkdir via assist call.
- * spu/mknod.c: New file, support mknod via assist call.
- * spu/rmdir.c: New file, support rmdir via assist call.
- * spu/Makefile.in: Add new files.
-
-2007-06-20 Patrick Mansfield <patmans@us.ibm.com>
-
- * spu/getpagesize.c: New file add getpagesize via an assist call.
- * spu/jsre.h: Add JSRE_GETPAGESIZE.
- * spu/Makefile.in: Add getpagesize.
-
-2007-06-13 Patrick Mansfield <patmans@us.ibm.com>
-
- * spu/Makefile.in: Add nanosleep.c.
- * spu/jsre.h: Add JSRE_NANOSLEEP.
- * spu/nanosleep.c: New file, supply nanosleep via an assist call.
-
-2007-06-05 Patrick Mansfield <patman@us.ibm.com>
-
- * spu/jsre.h: Remove the assist call structs and defines that are
- specific to one assist call from here.
- * spu/access.c: Move struct syscall_access_t to here.
- * spu/fstat.c: Move struct syscall_fstat_t to here.
- * spu/ftruncate.c: Move struct syscall_ftruncate_t to here.
- * spu/gettimeofday.c: Move struct syscall_gettimeofday_t to here.
- * spu/lseek.c: Move struct syscall_lseek_t and JSRE_SEEK defines to
- here.
- * spu/open.c: Move struct syscall_open_t and JSRE_O_ defines to here.
- * spu/read.c: Move struct syscall_read_t to here, and actually use
- it (it is the same as syscall_write_t).
- * spu/stat.c: Move struct syscall_stat_t to here.
- * spu/write.c: Move struct syscall_write_t to here.
- * spu/close.c: Pass the address of the first and only argument to
- __send_to_ppe rather than using an automatic variable and a
- special struct.
- * spu/dup.c: Ditto.
- * spu/unlink.c: Ditto.
-
-2007-05-30 Kazu Hirata <kazu@codesourcery.com>
-
- * m68k/cf-crt1.C, m68k/cf.sc, m68k/fido.sc, m68k/fido-crt0.S:
- Replace __INIT_SECTION__ and __FINI_SECTION__ with _init and
- _fini, respectively.
-
-2007-05-23 Patrick Mansfield <patmans@us.ibm.com>
-
- * spu/syscalls.c: Change __send_to_ppe to return the result stored
- in stored in slot 0 of the data, rather than have each assisted
- call retrieve the value.
- * spu/jsre.h: Remove the now unused syscall_out_t.
- * spu/access.c: Use the __send_to_ppe result instead of the slot 0
- value, remove unused syscall_out_t variable.
- * spu/close.c: Ditto.
- * spu/dup.c: Ditto.
- * spu/fstat.c: Ditto.
- * spu/ftruncate.c: Ditto.
- * spu/gettimeofday.c: Ditto.
- * spu/lseek.c: Ditto.
- * spu/open.c: Ditto.
- * spu/read.c: Ditto.
- * spu/stat.c: Ditto.
- * spu/unlink.c: Ditto.
- * spu/write.c: Ditto.
-
-2007-05-23 Kazu Hirata <kazu@codesourcery.com>
-
- * m68k/fido.sc (.data): Move .jcr to .text. Catch .got.plt
- and .got.
-
-2007-05-07 Patrick Mansfield <patmans@us.ibm.com>
-
- * spu/open.c: Unconditionally set the "mode" to fix a bug where
- mode was not properly set.
-
-2007-05-03 Kazu Hirata <kazu@codesourcery.com>
-
- * m68k/fido-_exit.c (_exit): Use stop #0x700.
-
-2007-04-27 Kazu Hirata <kazu@codesourcery.com>
-
- * m68k/fido.sc: Catch .text.*, .rodata.*, .data.*, .bss.*,
- .ctor.*, and .dtor.*. Wrap ctor/dtor-related sections with KEEP.
-
-2007-04-04 Patrick Mansfield <patmans@us.ibm.com>
-
- * spu/syscalls.c: Rename _send_to_ppe __send_to_ppe, and set errno
- on return from the offload call.
- * spu/jsre.h: Include sys/syscall.h for the send_to_ppe prototype.
- * spu/access.c: Call __send_to_ppe instead of _send_to_ppe, and
- remove the setting of errno.
- * spu/close.c: Ditto.
- * spu/dup.c: Ditto.
- * spu/fstat.c: Ditto.
- * spu/ftruncate.c: Ditto.
- * spu/gettimeofday.c: Ditto.
- * spu/lseek.c: Ditto.
- * spu/open.c: Ditto.
- * spu/read.c: Ditto.
- * spu/stat.c: Ditto.
- * spu/unlink.c: Ditto.
- * spu/write.c: Ditto.
-
-2007-03-01 Ben Elliston <bje@au.ibm.com>
-
- * spu/sbrk.c (sbrk): Adjust the stack pointer vector correctly so
- that GCC runtime stack checking works. Handle the backchain, too.
-
-2007-02-21 Patrick Mansfield <patmans@us.ibm.com>
-
- * spu/gettimeofday.c: New file which adds SPU gettimeofday.
- * spu/jsre.h: Remove time, add gettimeofday.
- * spu/Makefile.in: Ditto.
-
-2007-02-21 Hans-Peter Nilsson <hp@axis.com>
-
- * cris/crt0.S: Use jump, not ba, to skip the interrupt table. Use
- "setf", not "nop", for common_v10_v32 compatibility.
- Move out interrupt table to irqtable.S. Include here for non-ELF.
- * cris/irqtable.S: Extracted from cris/crt0.S. Provide per-entry
- weak default stub definitions.
- * cris/crtn.c: Use "setf", not "nop", for common_v10_v32
- compatibility.
- * cris/setup.S [__arch_common_v10_v32]: Return.
- * cris/Makefile.in (BSP_OBJS): Add irqtable.o.
-
-2007-02-15 Nick Clifton <nickc@redhat.com>
-
- * sparc/cygmon.ld.src: Link .rodata.* input sections into .text
- output section.
- * sparc/cygmon-sparc64-ld.src: Likewise.
-
-2007-02-08 Dave Brolley <brolley@redhat.com>
-
- * mep: New target directory.
- * README: Add MeP.
- * configure.in: Add support for MeP.
- * configure: Regenerated.
- * mep/configure.in: New file.
- * mep/configure: Ditto.
- * mep/Makefile.in: Ditto.
- * mep/aclocal.m4: Ditto.
- * mep/crt0.S: Ditto.
- * mep/crtn.S: Ditto.
- * mep/sim-crt0.S: Ditto.
- * mep/sim-crtn.S: Ditto.
- * mep/fmax.ld: Ditto.
- * mep/gcov-io.h: Ditto.
- * mep/gmap_default.ld: Ditto.
- * mep/handlers.c: Ditto.
- * mep/h_reset.c: Ditto.
- * mep/isatty.c: Ditto.
- * mep/mep-bb.c: Ditto.
- * mep/mep-gmon.c: Ditto.
- * mep/min.ld: Ditto.
- * mep/read.c: Ditto.
- * mep/sbrk.c: Ditto.
- * mep/sdram-crt0.S: Ditto.
- * mep/sdram-crtn.S: Ditto.
- * mep/simnovec-crt0.S: Ditto.
- * mep/simple.ld: Ditto.
- * mep/simsdran-crt0.S: Ditto.
- * mep/syscalls.S: Ditto.
- * mep/write.c: Ditto.
-
-2007-01-19 Kazunori Asayama <asayama@sm.sony.co.jp>
-
- * spu/syscalls.c: Replace vector with __vector.
-
-2007-01-09 Ben Elliston <bje@au.ibm.com>
-
- * spu/exit.c (_exit): Finish with an infinite loop to eliminate a
- warning about this noreturn function returning.
-
-2007-01-04 Kazu Hirata <kazu@codesourcery.com>
-
- Merge from newlib-csl-20060320-branch:
- 2006-12-22 Nathan Sidwell <nathan@codesourcery.com>
-
- libgloss/
- * m68k/Makefile.in (CF_ISRS): Remove now shared routines.
- * m68k/cf-crt0.S (__reset): Define here.
- * m68k/cf-isrs.c: Share some ISRS. Add aliases for each IRQ slot.
- * m68k/cf-isv.S: Move to .interrupt_vector section. Make each
- slot a unique routine.
- * m68k/cf.sc: Adjust for .interrupt_vector section.
-
- libgloss/
- * m68k/Makefile.in (m5273c3): Rename to ...
- (m5272c3): ... here to fix typo.
- (m5249c3): New.
- (CF_BOARDS): Add it.
-
-2006-01-03 Kazu Hirata <kazu@codesourcery.com>
-
- * arm/Makefile (RDPMON_OBJS): Add _exit.o and _kill.o.
- (RDIMON_OBJS): Define in terms of RDPMON_OBJS.
- (rdimon-_exit.o, rdimon-_kill.o): New.
- * arm/_exit.c, arm/_kill.c: New.
- * arm/syscalls.c (_exit, _kill): Remove.
-
-2007-01-03 Kazu Hirata <kazu@codesourcery.com>
-
- Merge from newlib-csl-20060320-branch:
- 2006-12-22 Nathan Sidwell <nathan@codesourcery.com>
-
- * m68k/cf-crt0.S (__start): Adjust semihosting.
-
-2007-01-02 Kazu Hirata <kazu@codesourcery.com>
-
- Merge from newlib-csl-20060320-branch:
- 2006-12-22 Nathan Sidwell <nathan@codesourcery.com>
-
- * m68k/cf-hosted.S (__hosted): Adjust semihosting.
-
-2007-01-02 Ben Elliston <bje@au.ibm.com>
-
- * spu/time.c (time): Cast new sys.time value to unsigned int.
-
-2006-12-25 Kazu Hirata <kazu@codesourcery.com>
-
- * arm/syscalls.c (_unlink, _system, _rename): Cast arguments
- to do_AngelSWI to int.
-
- * arm/licfunc.c (do_AngelSWI): Remove.
- * arm/syscalls.c (do_AngelSWI): Remove.
- * arm/swi.h (do_AngelSWI): New.
-
-2006-12-18 Kazu Hirata <kazu@codesourcery.com>
-
- Merge from newlib-csl-20060320-branch:
- 2006-12-15 Daniel Jacobowitz <dan@codesourcery.com>
-
- * m68k/fido-crt0.S (_vector_table): Reference
- _PrivilegeViolationHandler.
-
- 2006-12-15 Daniel Jacobowitz <dan@codesourcery.com>
-
- * m68k/fido-crt0.S (_start): Set %vbr for context 0 in
- RAM configs.
- * m68k/fido.sc: Clean up formatting. Add comments. Move
- stack and heap end to SDRAM for SRAM and SDRAM configurations.
- Put RedBoot application text in SRAM.
-
- 2006-12-13 Nathan Sidwell <nathan@codesourcery.com>
-
- * m68k/Makefile (install_cf): Don't loop over files here. Only
- install sources for the default multilib.
- (install_fido): Likewise.
- (install_io): Install bsps in one go.
-
- 2006-12-01 Nathan Sidwell <nathan@codesourcery.com>
- Kazu Hirata <kazu@codesourcery.com>
-
- * configure.in: Recognize fido-*-*.
- * configure: Regenerate.
- * m68k/Makefile.in (CF_ISRS): Use addprefix.
- (FIDO_CRT0, FIDO_BSP, FIDO_OBJS, FIDO_HANDLERS,
- FIDO_UNHOSTED_SCRIPTS, FIDO_HOSTED_SCRIPTS, FIDO_SCRIPTS,
- FIDO_SOURCES, all_fido, fido-%-crt0.o, fido-rom.ld,
- fido-rom-hosted.ld, fido-sram.ld, fido-sram-hosted.ld,
- fido-sdram.ld, fido-sdram-hosted.ld, fido-redboot.ld,
- install_fido): New.
- * m68k/asm.h (mbb): New.
- * m68k/configure.in (DO): Check for __mfido__.
- * m68k/configure: Regenerate.
- * m68k/fido-_exit.c, m68k/fido-crt0.S, m68k/fido-handler.c,
- m68k/fido-hosted.S, m68k/fido-sbrk.c, m68k/fido.h,
- m68k/fido.sc, m68k/fido_profiling.h: New.
-
-2006-12-18 Ben Elliston <bje@au.ibm.com>
-
- * spu/stat.c (stat): Cast new sys.pathname value to unsigned int.
-
-2006-12-13 Ben Elliston <bje@au.ibm.com>
-
- * libnosys/_exit.c (_exit): Finish with an infinite loop to
- eliminate a warning about this noreturn function returning.
-
-2006-12-13 Sa Liu <saliu@de.ibm.com>
-
- * spu/access.c: New file
- * spu/dup.c: New file
- * spu/ftruncate.c: New file
- * spu/jsre.h: add structures for new functions
- * spu/time.c: New file
- * spu/Makefile.in (access.o, dup.o, ftruncate.o, time.o): New targets.
-
-2006-12-12 Ben Elliston <bje@au.ibm.com>
-
- * configure.in: Remove superfluous semicolons.
- * configure: Regenerate.
-
-2006-12-11 Kazu Hirata <kazu@codesourcery.com>
-
- Merge from newlib-csl-20060320-branch:
- 2006-12-01 Nathan Sidwell <nathan@codesourcery.com>
- Kazu Hirata <kazu@codesourcery.com>
-
- * m68k/Makefile.in (CF_ISRS): Use addprefix.
-
- 2006-11-01 Nathan Sidwell <nathan@codesourcery.com>
-
- * m68k/Makefile.in (CFLAGS): Do not clear. Add to all compilations.
- (ARFLAGS): Remove commented out definition.
-
-
- * m68k/configure.in (DO) Set to list of target cpu families.
- * m68k/configure: Rebuilt.
- * m68k/Makefile.in (DO): New.
- (UNHOSTED_BSP, UNHOSTED_OBJS, HOSTED_BSP, HOSTED_OBJS): Move
- later.
- (m5208evb, m5213evb, m52235evb, m5235evb, m5273c3, m5275evb,
- m5282evb, m5329evb, m5485evb): Move earlier.
- (all): Add all_$DO dependencies.
- (all_cf, all_m68k): New targets, depend on cf & m68k bsps as
- appropriate.
- (m%-ram.ld, m%-rom.ld, m%-ram-hosted.ld, m%-rom-hosted.ld): Add
- 'm' prefix.
- (install): Add install_$DO dependencies.
- (install_cf, install_m68k): New targets. Perform cf and m68k
- installs as appropriate.
- (install_io): New, install the io libraries.
-
-
- 2006-10-23 Nathan Sidwell <nathan@codesourcery.com>
-
- * m68k/Makefile.in (CF_CRT0): Rename to CF_CRT0S, separate hosted
- & unhosted versions.
- (CF_OBJS): Add cf-isv.o.
- (CF_SOURCES): Add cf-isv.S.
- (cf-hosted-crt0.o, cf-unhosted-crt0.o): New targets.
- * m68k/cf-isv.S: New, broken out of ...
- * m68k/cf-crt0.S: ... here. Add HOSTED & UNHOSTED differences.
- * m68k/cf-crt1.c (__start1): Add heap_limit argument.
- (__heap_limit): Define.
- * m68k/cf-sbrk.c (__heap_limit): Declare.
- (sbrk): Adjust for __heap_limit.
- * m68k/cf.sc: Use different crt0's for hosted & unhosted.
- Install a separate isv.o file.
- * m68k/io.h (HOSTED_PUTCHAR): Replace with ...
- (HOSTED_INIT_SIM): ... this.
-
-
- 2006-10-20 Nathan Sidwell <nathan@codesourcery.com>
-
- * m68k/Makefile.in (CF_BOARDS): Add m5275evb.
- (m5275evb): New board.
-
-
- 2006-10-20 Vladimir Prus <vladimir@codesourcery.com>
-
- * m68k/cf.sc: Add linkonce sections and
- DWARF sections.
-
-
- 2006-10-07 Nathan Sidwell <nathan@codesourcery.com>
-
- * m68k/Makefile.in: Adjust Coldfire rules.
- (BDM_CRT0, BDM_BSP, BDM_OBJS, BDM_ISRS): Rename to ...
- (CF_CRT0, CF_BSP, CF_OBJS, CF_ISRS): ... here. Adjust.
- (BDM_OTHER_OBJS): Remove.
- (BDM_SYSOBJS): Rename to ...
- (UNHOSTED_OBJS): ... here. Adjust.
- (UNHOSTED_BSP, HOSTED_OBJS, HOSTED_BSP): New.
- (CF_HOSTED_SCRIPTS): New.
- (CF_SCRIPTS, CF_SOURCES): Adjust.
- * m68k/cf.sc: Add IO library variable.
- * m68k/bdm-crt0.S, m68k/bdm-crt1.c, m68k/bdm-isrs.c,
- m68k/bdm-sbrk.c, m68k/bdm-semihost.S: Rename to ...
- * m68k/cf-crt0.S, m68k/cf-crt1.c, m68k/cf-isrs.c, m68k/cf-sbrk.c,
- m68k/cf-hosted.S: ... here.
- * m68k/cf-exit.c: New.
- * m68k/bdm-gdb.h, m68k/bdm-semihost.h: Merge into ...
- * m68k/io.h: ... here. Add unhosted support. Adjust conversion
- function names.
- * m68k/bdm-gdb.c: Rename to ...
- * m68k/io-gdb.c: ... here. Adjust names of conversion functions.
- * m68k/bdm-close.c, m68k/bdm-exit.c, m68k/bdm-fstat.c,
- m68k/bdm-gettimeofday.c, m68k/bdm-isatty.c, m68k/bdm-lseek.c,
- m68k/bdm-open.c, m68k/bdm-read.c, m68k/bdm-rename.c,
- m68k/bdm-stat.c, m68k/bdm-system.c, m68k/bdm-time.c,
- m68k/bdm-unlink.c, m68k/bdm-write.c: Rename to ...
- * m68k/io-close.c, m68k/io-exit.c, m68k/io-fstat.c,
- m68k/io-gettimeofday.c, m68k/io-isatty.c, m68k/io-lseek.c,
- m68k/io-open.c, m68k/io-read.c, m68k/io-rename.c, m68k/io-stat.c,
- m68k/io-system.c, m68k/io-time.c, m68k/io-unlink.c,
- m68k/io-write.c: ... here. Include io.h. Adjust for hosted &
- unhosted libraries. Adjust names of gdb conversion functions.
-
-
- 2006-09-29 Nathan Sidwell <nathan@codesourcery.com>
-
- * m68k/bdm-semihost.S: Add more comments. Make instruction weirder.
-
- 2006-09-22 Nathan Sidwell <nathan@codesourcery.com>
-
- * m68k/bdm-crt1.c (hardware_init_hook): Use #defines for CACR bits.
-
- 2006-09-18 Nathan Sidwell <nathan@codesourcery.com>
-
- * m68k/Makefile.in: Don't force a frame pointer on the ISRs.
- * m68k/bdm-crt1.c (__start1): Don't set the VBR here.
- (hardeare_init_hook): Define weakly. Set VBR here, enable caching
- if supported.
-
-
- * m68k/Makefile.in (bdm-semihost.o): Build from bdm-semihost.S.
- * m68k/bdm-semihost.c: Remove.
- * m68k/bdm-semihost.S: New.
- * m68k/bdm-crt0.S: Don't install semihosting trap handler.
- * m68k/bdm-close.c, bdm-exit.c, bdm-fstat.c, bdm-gettimeofday.c,
- bdm-isatty.c, bdm-lseek.c, bdm-open.c, bdm-read.c, bdm-rename.c,
- bdm-stat.c, bdm-system.c, bdm-unlink.c, bdm-write.c): Update.
- * m68k/bdm-isrs.c: Update comment.
- * m68k/bdm-semihost.h (BDM_TRAPNUM, BDM_FUNC_REG, BDM_ARG_REG,
- BDM_TRAP): Remove.
- (__bdm_semihost): Declare.
-
-
- 2006-09-15 Nathan Sidwell <nathan@codesourcery.com>
-
- * m68k/Makefile.in (BDM_OTHER_OBJS): Remove sbrk.o.
- (BDM_SYSOBJS): Add bdm-sbrk.o.
- * m68k/bdm-sbrk.c: New.
-
-
- 2006-09-06 Nathan Sidwell <nathan@codesourcery.com>
-
- * m68k/Makefile.in (CF_SOURCES): New.
- (install): Install them.
-
-
- 2006-09-01 Nathan Sidwell <nathan@codesourcery.com>
-
- * m68k/cf.sc: Add .jcr section to .text.
-
-2006-12-11 Ben Elliston <bje@au.ibm.com>
-
- * configure.in: Remove extra whitespace from config_testsuite =
- VALUE statements to eliminate shell errors.
- * configure: Regenerate.
-
-2006-12-08 Sa Liu <saliu@de.ibm.com>
-
- * spu/exit.c (libgloss_exit): Rename from this ..
- (_exit): .. to this. Overhaul.
- (exit): Remove.
- * spu/crt0.S, spu/crti.S, spu/crtn.S: New files.
- * spu/crt0.C, spu/init.c: Remove.
- * spu/configure.in (AC_INIT): Check for crt0.S, not crt0.C.
- * spu/configure: Regenerate.
- * spu/Makefile.in (crti.o, crtn.o, crt1.o, crt2.o): New targets.
- (OBJS): Remove init.o.
- (CRTOBJS): New.
- (OUTPUTS): Add $(CRTOBJS).
-
-2006-11-27 Jeff Johnston <jjohnstn@redhat.com>
-
- * mips/crt0.S: Fix preprocessor statements from previous patch
- to be ANSI.
-
-2006-11-24 Thiemo Seufer <ths@mips.com>
- Nigel Stephens <nigel@mips.com>
-
- * mips/crt0.S (_start): Use all available float registers. Don't touch
- SR_PE on post-mips2 CPUs, it means soft reset there.
-
-2006-11-22 Luca Barbato <lu_zero@gentoo.org>
-
- * spu/syscalls.c: Include spu_intrinsics.h to provide vector keyword.
-
-2006-11-17 Jeff Johnston <jjohnstn@redhat.com>
-
- * mn10300/Makefile.in: Add spaces after do in "for" loop.
-
-2006-11-08 Jie Zhang <jie.zhang@analog.com>
-
- * bfin/configure.in: New.
- * bfin/crt0.S: New.
- * bfin/Makefile.in: New.
- * bfin/syscalls.c: New.
- * bfin/aclocal.m4: Generate.
- * bfin/configure: Ditto.
- * configure.in: Add support for bfin-*-*.
- * configure: Regenerate.
- * syscall.h (SYS_argc): Define.
- (SYS_argnlen): Define.
- (SYS_argn): Define.
-
-2006-10-10 Thiemo Seufer <ths@mips.com>
-
- * mips/Makefile.in: Add INCLUDES to local compile rules.
-
-2006-10-06 Jeff Johnston <jjohnstn@redhat.com>
-
- * Makefile.in: Add CFLAGS_FOR_TARGET and CCASFLAGS to
- FLAGS_TO_PASS.
-
-2006-10-03 Jeff Johnston <jjohnstn@redhat.com>
-
- * arm/linux-syscalls0.c: Rewrite bx insn architecture flag check
- to avoid use of __ARM_ARCH__.
-
-2006-10-02 Nick Clifton <nickc@redhat.com>
-
- * arm/linux-syscalls0.c: Add arm architecture flag
- checks around bx insn.
-
-2006-09-07 Masaki Muranaka <monaka@monami-software.com>
-
- * xstormy16/Makefile.in (clean): Fix a mismatched parenthesis.
-
-2006-09-01 Kazu Hirata <kazu@codesourcery.com>
-
- Merge from newlib-csl-20060320-branch:
- 2006-08-31 Nathan Sidwell <nathan@codesourcery.com>
-
- * m68k/bdm-crt1.c: Call hardware_init_hook before copying
- initialized data.
-
- * m68k/Makefile.in (CF_BDM_SCRIPTS): Rename to CF_RAM_SCRIPTS.
- (CF_SCRIPTS): Update.
- (%-bdm.ld): Rename to %-ram.ld.
-
- 2006-08-25 Nathan Sidwell <nathan@codesourcery.com>
-
- * m68k/Makefile.in (DBUG_BSP, DBUG_OBJS): Remove.
- (BDM_CRT0): New.
- (BDM_OBJS): Add bdm-crt1.o.
- (BDM_OTHER_OBJS): Remove print.o putnum.o
- (CF_BOARDS): New.
- (CF_BDM_SCRIPTS): Generated name of ram scripts.
- (CF_ROM_SCRIPTS): Generated name of rom scripts.
- (CF_SCRIPTS): Adjust.
- (all): Add BDM_CRT0.
- (bdm-crt0.o, bdm-crt1.o): New targets.
- (bdm-isv.o): Remove.
- (m5208evb, m5213evb, m52235evb, m5235evb, m5273c3, m5282evb,
- m5329evb, m5485evb): New.
- (%-bdm.ld, %-rom.ld): New. Replace individual linker script rules.
- (install): Remove DBUG installs.
- * m68k/bdm-crt0.S: New.
- * m68k/bdm-crt1.c: New.
- * m68k/bdm-exit.c: Call __reset.
- * m68k/bdm-isv.c: Remove.
- * m68k/cf.sc: Adjust to produce either rom or ram images.
- * m68k/dbug-exit.S, m68k/dbug-inbyte.S, m68k/dbug-outbyte.S: Remove.
-
- 2006-07-24 Nathan Sidwell <nathan@codesourcery.com>
-
- Bug 844
- * m68k/cf.sc: Set entry point to _start.
- * m68k/crt0.X (_start): New name for entrypoint
- (start): Weak alias for start.
-
- 2006-06-09 Nathan Sidwell <nathan@codesourcery.com>
-
- * m68k/bdm-system.c (_system): Support system(NULL).
-
- 2006-06-08 Nathan Sidwell <nathan@codesourcery.com>
-
- * m68k/bdm-system.c (_system): Properly encode non failure exit
- code.
-
- 2006-06-05 Nathan Sidwell <nathan@codesourcery.com>
-
- * m68k/Makefile.in (BDM_SYSOBJS): Remove bdm-inbyte.o.
- Add bdm-time.o.
- * m68k/bdm-close.c: Add copyright notice.
- * m68k/bdm-fstat.c: Add copyright notice.
- * m68k/bdm-gettimeofday.c: Add copyright notice.
- * m68k/bdm-inbyte.c: Remove.
- * m68k/bdm-isatty.c: Add copyright notice.
- * m68k/bdm-lseek.c: Add copyright notice. Fix &/| thinko.
- * m68k/bdm-open.c: Add copyright notice.
- * m68k/bdm-read.c: Add copyright notice.
- * m68k/bdm-rename.c: Add copyright notice.
- * m68k/bdm-stat.c: Add copyright notice.
- * m68k/bdm-system.c: Add copyright notice.
- * m68k/bdm-time.c: New.
- * m68k/bdm-unlink.c: Add copyright notice.
- * m68k/bdm-write.c: Add copyright notice.
-
- 2006-05-25 Nathan Sidwell <nathan@codesourcery.com>
-
- * m68k/Makefile.in (m52235-dbug.ld, m52235-bdm.ld): New
- scripts.
-
- 2006-05-24 Nathan Sidwell <nathan@codesourcery.com>
-
- * m68k/Makefile.in (BDM_SYSOBJS): Remove bdm-outbyte.o.
- * m68k/bdm-outbyte.c: Delete.
- * m68k/bdm-semihost.h (BDM_OUTBYTE): Mark as obsolete.
-
- 2006-05-22 Sandra Loosemore <sandra@codesourcery.com>
-
- * m68k/bdm-semihost.h: Add new constants for additional
- semihosting functions. Add new BDM_TRAP macro to encapsulate
- inline asm.
- * m68k/bdm-exit.c (_exit): Use new BDM_TRAP macro.
- * m68k/bdm-outbyte.c (outbyte): Ditto.
- * m68k/bdm-isrs.c, m68k/bdm-isv.c: Former BDM_TRAP
- now called BDM_TRAPNUM.
- * m68k/bdm-gdb.h, m68k/bdm-gdb.c: New files
- containing declarations and conversion functions for GDB's fileio
- protocol.
- * m68k/bdm-close.c: New file to define corresponding function.
- * m68k/bdm-fstat.c: Ditto.
- * m68k/bdm-gettimeofday.c: Ditto.
- * m68k/bdm-isatty.c: Ditto.
- * m68k/bdm-lseek.c: Ditto.
- * m68k/bdm-open.c: Ditto.
- * m68k/bdm-read.c: Ditto.
- * m68k/bdm-rename.c: Ditto.
- * m68k/bdm-stat.c: Ditto.
- * m68k/bdm-system.c: Ditto.
- * m68k/bdm-unlink.c: Ditto.
- * m68k/bdm-write.c Ditto.
- * m68k/Makefile.in: Add dependencies for new files.
-
- 2006-03-29 Nathan Sidwell <nathan@codesourcery.com>
-
- * m68k/bdm-isv.c (software_init_hook): Fix trap numbering.
-
- * m68k/Makefile.in (CF_SCRIPTS): Add m5329 board.
- Reorder.
- (*-dbug.ld, *-bdm.ld): Add appropriate IO definition.
- (m5329evb-dbug.ld, m5329evb-bdm.ld): New.
- * cf.sc (GROUP): Revert previous change. Add IO library.
-
- * m68k/Makefile.in (BDM_BSP, BDM_OBJS, BDM_ISRS): New.
- (CF_SCRIPTS): Rename dbug scripts. Add bdm scripts. Add m5485
- scripts.
- (all): Add new targets.
- (BDM_BSP): New target.
- (bdm-isv.o, bdm-exit.o, bdm-outbyte.o, bdm-semihost.o): New
- targets.
- (BDM_ISRS): New targets.
- (m5208evb.ld, m5213evb.ld, m5235evb.ld, m5272c3.ld, m5282evb.ld):
- Rename and adjust.
- (m5485evb-dbug): New.
- (m5208evb-bdm.ld, m5213evb-bdm.ld, m5235evb-bdm.ld,
- m5272c3-bdm.ld, m5282evb-bdm.ld, m5485evb-bdm.ld): New.
- (install): Add BDM_BSP.
- * m68k/bdm-exit.c: New
- * m68k/bdm-inbyte.c: New
- * m68k/bdm-outbyte.c: New
- * m68k/bdm-semihost.c: New
- * m68k/bdm-semihost.h: New
- * m68k/bdm-isrs.c: New.
- * m68k/bdm-isv.c: New.
- * dbug-cf.sc: Renamed to ...
- * cf.sc: ... here. Add bdm flexibility. Remove GROUP
-
- 2006-05-22 Sandra Loosemore <sandra@codesourcery.com>
-
- * m68k/bdm-semihost.h: Add new constants for additional
- semihosting functions. Add new BDM_TRAP macro to encapsulate
- inline asm.
- * m68k/bdm-exit.c (_exit): Use new BDM_TRAP macro.
- * m68k/bdm-outbyte.c (outbyte): Ditto.
- * m68k/bdm-isrs.c, m68k/bdm-isv.c: Former BDM_TRAP
- now called BDM_TRAPNUM.
- * m68k/bdm-gdb.h, m68k/bdm-gdb.c: New files
- containing declarations and conversion functions for GDB's fileio
- protocol.
- * m68k/bdm-close.c: New file to define corresponding function.
- * m68k/bdm-fstat.c: Ditto.
- * m68k/bdm-gettimeofday.c: Ditto.
- * m68k/bdm-isatty.c: Ditto.
- * m68k/bdm-lseek.c: Ditto.
- * m68k/bdm-open.c: Ditto.
- * m68k/bdm-read.c: Ditto.
- * m68k/bdm-rename.c: Ditto.
- * m68k/bdm-stat.c: Ditto.
- * m68k/bdm-system.c: Ditto.
- * m68k/bdm-unlink.c: Ditto.
- * m68k/bdm-write.c Ditto.
- * m68k/Makefile.in: Add dependencies for new files.
-
-2006-08-30 Kazunori Asayama <asayama@sm.sony.co.jp>
-
- * spu/syscalls.c: Add a new argument to _send_to_ppe() to
- specify signal code.
- * spu/jsre.h: Update declaration of _send_to_ppe().
- * spu/close.c: Replace _send_to_ppe_0x2101() by _send_to_ppe().
- * spu/fstat.c: Ditto.
- * spu/lseek.c: Ditto.
- * spu/open.c: Ditto.
- * spu/read.c: Ditto.
- * spu/stat.c: Ditto.
- * spu/unlink.c: Ditto.
- * spu/write.c: Ditto.
-
-2006-08-30 Kazunori Asayama <asayama@sm.sony.co.jp>
-
- * spu/Makefile.in: Add dependency.
-
-2006-08-24 Paul Brook <paul@codesourcery.com>
-
- * arm/linux-crt0.c: Disable Arm stub for Thumb-2.
-
-2006-08-23 Kazunori Asayama <asayama@sm.sony.co.jp>
-
- * spu/Makefile.in: Add new object files.
- * spu/syscalls.c: Move each system call to individual file.
- * spu/jsre.h: Add declaration of _send_to_ppe_0x2101().
- * spu/close.c: New file. Moved from spu/syscalls.c.
- * spu/fstat.c: Likewise.
- * spu/getpid.c: Likewise.
- * spu/isatty.c: Likewise.
- * spu/kill.c: Likewise.
- * spu/lseek.c: Likewise.
- * spu/open.c: Likewise.
- * spu/read.c: Likewise.
- * spu/stat.c: Likewise.
- * spu/unlink.c: Likewise.
- * spu/write.c: Likewise.
-
-2006-08-21 David Ung <davidu@mips.com>
-
- * mips/Makefile.in: Add rule for cygmon.o and pass the -mno-mips16
- option since it uses the syscall instruction.
-
-2006-08-16 Joel Schopp <jschopp@austin.ibm.com>
-
- * spu/Makefile.in: Add special compiler
- options to reduce size.
-
-2006-08-16 Joel Schopp <jschopp@austin.ibm.com>
-
- * spu/jsre.h(JSRE_STAT): New define.
- (syscall_stat_t): New type.
- * spu/syscalls.c(stat): New syscall.
-
-2006-08-16 Joel Schopp <jschopp@austin.ibm.com>
-
- * configure.in: Add spu support.
- * configure: Regenerated.
- * spu/Makefile.in: New file.
- * spu/aclocal.m4: Ditto.
- * spu/configure: Ditto.
- * spu/configure.in: Ditto.
- * spu/crt0.c: Ditto.
- * spu/exit.c: Ditto.
- * spu/init.c: Ditto.
- * spu/jsre.h: Ditto.
- * spu/sbrk.c: Ditto.
- * spu/syscalls.c: Ditto.
-
-2006-07-05 Shaun Jackman <sjackman@gmail.com>
-
- * arm/linux-crt0.S: Remove file.
- * arm/linux-crt0.c: New file. Supports PIC code.
-
-2006-07-04 Shaun Jackman <sjackman@gmail.com>
-
- * arm/linux-syscalls0.S (ftruncate, getegid, geteuid, getgid,
- getgroups, getpgid, getpgrp, getuid, lchown, pause, pipe,
- setpgid, setgid, setsid, setuid, sigprocmask, sync, uname): New
- system call.
-
-2006-06-30 DJ Delorie <dj@redhat.com>
-
- * m32c/crt0.S (done_inilist): Fix dwarf2 address sizes.
-
-2006-06-23 Shaun Jackman <sjackman@gmail.com>
-
- * arm/elf-linux.specs: New file.
-
-2006-06-13 Sandra Loosemore <sandra@codesourcery.com>
-
- * arm/syscalls.c (_unlink, isatty, _system, _rename):
- Make them do something useful in the ARM_RDI_MONITOR case.
-
-2006-06-08 Fred Fish <fnf@specifix.com>
-
- * mips/idt.ld, mips/idt32.ld, mips/idt64.ld, mips/nullmon.ld,
- mips/pmon.ld: Keep special sections generated by mips gcc.
-
-2006-06-05 Shaun Jackman <sjackman@gmail.com>
-
- * arm/linux-syscalls0.S (reboot): Remove.
- * arm/linux-syscalls1.c (reboot): New function.
-
-2006-06-05 Shaun Jackman <sjackman@gmail.com>
-
- * arm/syscalls.c (kill) [ARM_RDI_MONITOR]: Use the signal
- argument to choose an ADP exception reason.
- * arm/libcfunc.c (abort): Remove this function.
-
-2006-05-30 Shaun Jackman <sjackman@gmail.com>
-
- * arm/Makefile.in: Add Linux syscall interface.
- * arm/linux-crt0.S: New file.
- * arm/linux-syscall.h: New file.
- * arm/linux-syscalls0.S: New file.
- * arm/linux-syscalls1.c: New file.
-
-2006-05-23 Fred Fish <fnf@specifix.com>
-
- * mips/configure.in: Change mipsisa64-*-* to
- mipsisa64*-*-* to catch minor variations like
- mipsisa64sb1.
- * mips/configure: Regenerated.
-
-2006-05-10 Jeff Johnston <jjohnstn@redhat.com>
-
- * Makefile.in: Pass some additional flags in FLAGS_TO_PASS.
- * configure.in: Add additional flags when creating Makefile.
- * configure: Regenerated.
- * arm/configure
- * arm/configure.in: Set with_multisubdir when creating Makefile.
- * cris/configure.in: Ditto.
- * d30v/configure.in: Ditto.
- * frv/configure.in: Ditto.
- * i386/configure.in: Ditto.
- * iq2000/configure.in: Ditto.
- * libnosys/configure.in: Ditto.
- * m32c/configure.in: Ditto.
- * m32r/configure.in: Ditto.
- * m68hc11/configure.in: Ditto.
- * m68k/configure.in: Ditto.
- * mcore/configure.in: Ditto.
- * mips/configure.in: Ditto.
- * mn10200/configure.in: Ditto.
- * mn10300/configure.in: Ditto.
- * mt/configure.in: Ditto.
- * pa/configure.in: Ditto.
- * rs6000/configure.in: Ditto.
- * sparc/configure.in: Ditto.
- * cris/configure: Regenerated.
- * d30v/configure: Ditto.
- * frv/configure: Ditto.
- * i386/configure: Ditto.
- * iq2000/configure: Ditto.
- * libnosys/configure: Ditto.
- * m32c/configure: Ditto.
- * m32r/configure: Ditto.
- * m68hc11/configure: Ditto.
- * m68k/configure: Ditto.
- * mcore/configure: Ditto.
- * mips/configure: Ditto.
- * mn10200/configure: Ditto.
- * mn10300/configure: Ditto.
- * mt/configure: Ditto.
- * pa/configure: Ditto.
- * rs6000/configure: Ditto.
- * sparc/configure: Ditto.
-
-2006-04-19 Jeff Johnston <jjohnstn@redhat.com>
-
- * configure.in: Modified to support autoconf 2.59.
- * */configure.in: Ditto.
- * configure: Regenerated.
- * */configure: Ditto.
- * wince/aclocal.m4: Ditto.
- * acinclude.m4: New file.
- * aclocal.m4: Ditto.
- * arm/aclocal.m4: Ditto.
- * cris/aclocal.m4: Ditto.
- * crx/aclocal.m4: Ditto.
- * d30v/aclocal.m4: Ditto.
- * fr30/aclocal.m4: Ditto.
- * frv/aclocal.m4: Ditto.
- * hp74x/aclocal.m4: Ditto.
- * i386/aclocal.m4: Ditto.
- * i960/aclocal.m4: Ditto.
- * iq2000/aclocal.m4: Ditto.
- * libnosys/aclocal.m4: Ditto.
- * m32c/aclocal.m4: Ditto.
- * m32r/aclocal.m4: Ditto.
- * m68hc11/aclocal.m4: Ditto.
- * m68k/aclocal.m4: Ditto.
- * mcore/aclocal.m4: Ditto.
- * mips/aclocal.m4: Ditto.
- * mn10200/aclocal.m4: Ditto.
- * mn10300/aclocal.m4: Ditto.
- * mt/aclocal.m4: Ditto.
- * pa/aclocal.m4: Ditto.
- * rs6000/aclocal.m4: Ditto.
- * sparc/aclocal.m4: Ditto.
- * sparc/libsys/aclocal.m4: Ditto.
- * xstormy16/aclocal.m4: Ditto.
-
-2006-04-18 Mark Mitchell <mark@codesourcery.com>
-
- * doc/porting.texi: Document libgloss build conventions.
-
-2006-03-22 Nathan Sidwell <nathan@codesourcery.com>
-
- * mt/startup-16-002.S (.internal_io): Make @nobits.
- * mt/startup-16-003.S (.internal_io): Make @nobits.
- * mt/startup-ms2.S (.internal_io): Make @nobits.
-
-2006-03-02 DJ Delorie <dj@redhat.com>
-
- * m32c/exit.S: Preserve r1.
-
-2006-02-24 Paul Brook <paul@codesourcery.com>
-
- * arm/redboot-crt0.S: Use cps in Thumb-2 mode.
-
-2006-02-22 Nathan Sidwell <nathan@codesourcery.com>
-
- * m68k/Makefile.in (CF_SCRIPTS): New.
- (all): Add CF_SCRIPTS.
- (m5208evb.ld, m5213evb.ld, m5235evb.ld, m5272c3.ld,
- m5282evb.ld): New targets
- (install): Iterate over CF_SCRIPTS.
- * m68k/crt0.S: Don't use dbra on any cf chips.
- * m68k/dbug-cf.sc: New.
-
-2006-02-07 Paul Brook <paul@codesourcery.com>
-
- * arm/crt0.S: Add Thumb-2 startup code.
- * arm/redboot-crt0.S: Ditto.
- * arm/libcfunc.c (do_AngelSWI): Use AngelSWIInsn.
- * arm/swi.h (AngelSWIInsn, AngelSWIAsm): Define.
- * arm/trap.S: Disable for Thumb-2.
-
-2006-01-18 Nathan Sidwell <nathan@codesourcery.com>
-
- * mt/ms2.ld (.sram): Correct typo in section names.
-
-2006-01-16 Nathan Sidwell <nathan@codesourcery.com>
-
- * mt/Makefile.in (SCRIPTS, CRT0): Add ms2 files.
- (crt0-ms2.o): New target.
- * mt/crt0-ms2.S, mt/exit-ms2.c, mt/ms2.ld, mt/startup-ms2.S: New.
-
-2006-01-04 Paul Brook <paul@codesourcery.com>
-
- * m68k/bcc.ld: Add .got.plt and .got
- * m68k/idp.ld: Ditto.
- * m68k/idpgdb: Ditto.
- * m68k/mvme135.ld: Ditto.
- * m68k/sbc5204.ld: Ditto.
- * m68k/sbc5206.ld: Ditto.
- * m68k/sim.ld: Ditto.
-
-2005-12-13 DJ Delorie <dj@redhat.com>
-
- * m32c/crt0.S: Add support for preinit, init, and fini arrays, and
- .init and .fini processing.
- * m32c/crtn.S: Likewise.
- * m32c/exit.S: Likewise.
-
-2005-12-13 Nathan Sidwell <nathan@codesourcery.com>
-
- * mt/16-002.ld: Change architecture to 'mt'. Remove
- SEARCH_DIR.
- * mt/16-003.ld: Likewise.
- * mt/64-001.ld: Likewise.
- * mt/Makefile.in: Change comment to reference 'mt' rather than 'ms1'.
- * mt/crt0.S: Likewise.
-
-2005-12-12 Nathan Sidwell <nathan@codesourcery.com>
-
- * configure.in: Replace ms1 arch with mt arch.
- * configure: Rebuilt.
- * mt: Renamed from ms1 dir.
-
-2005-12-06 Paul Brook <paul@codesourcery.com>
-
- * m68k/bcc.ld: Add .text.*, .rodata.*, .data.* and .bss.*.
- * m68k/idp.ld: Ditto.
- * m68k/idpgdb: Ditto.
- * m68k/mvme135.ld: Ditto.
- * m68k/sbc5204.ld: Ditto.
- * m68k/sbc5206.ld: Ditto.
- * m68k/sim.ld: Ditto.
-
-2005-11-30 Shaun Jackman <sjackman@gmail.com>
-
- * libnosys/Makefile.in (OBJS): Add chown, readlink, and symlink.
- * libnosys/chown.c: New file.
- * libnosys/readlink.c: New file.
- * libnosys/symlink.c: New file.
-
-2005-11-30 Shaun Jackman <sjackman@gmail.com>
-
- * arm/libcfunc.c (clock, sleep, usleep): New functions.
- * arm/syscalls.c (_clock): New function.
- (_times): Call _clock.
-
-2005-11-17 Shaun Jackman <sjackman@gmail.com>
-
- * libgloss/arm/libcfunc.c (isatty): Call _isatty. GDB now supports
- the IsTTY SWI that _isatty calls.
-
-2005-11-17 Hans-Peter Nilsson <hp@axis.com>
-
- * cris/linunistd.h: Don't redefine errno as extern int.
-
-2005-10-20 Jeff Johnston <jjohnstn@redhat.com>
-
- * arm/configure.in: Add AC_SUBST for BUILD_CRT0_TRUE and
- BUILD_CRT0_FALSE.
- * arm/configure: Regenerate.
-
-2005-10-17 Jeff Johnston <jjohnstn@redhat.com>
-
- * arm/configure.in: Support building crt0.o when syscalls
- are disabled in newlib.
- * arm/configure: Regenerated.
-
-2005-10-03 James E Wilson <wilson@specifix.com>
-
- * mips/array.ld, mips/cfe.ld, mips/ddb-kseg0.ld, mips/ddb.ld,
- mips/dve.ld, mips/idt.ld, mips/idt32.ld, mips/idt64.ld,
- mips/idtecoff.ld, mips/jmr3904app-java.ld, mips/jmr3904app.ld,
- jmr3904dram-java.ld, mips/jmr3904dram.ld, mips/lsi.ld, mips/nullmon.ld,
- mips/pmon.ld: Add support for .bss.* sections.
-
-2005-09-23 James E Wilson <wilson@specifix.com>
-
- * mips/array.ld, mips/cfe.ld, mips/ddb-kseg0.ld, mips/ddb.ld,
- mips/dve.ld, mips/idt.ld, mips/idt32.ld, mips/idt64.ld,
- mips/idtecoff.ld, mips/jmr3904app-java.ld, mips/jmr3904app.ld,
- jmr3904dram-java.ld, mips/jmr3904dram.ld, mips/lsi.ld, mips/nullmon.ld,
- mips/pmon.ld: Change x* to x.* in existing linkonce lines. Add
- support for .gnu.linkonce.b.*.
-
-2005-08-30 Jeff Johnston <jjohnstn@redhat.com>
-
- * rs6000/Makefile.in (VPATH): Use colon as separator.
-
-2005-08-24 Aldy Hernandez <aldyh@redhat.com>
-
- * ms1/access.c: Change copyright notice.
-
-2005-08-19 DJ Delorie <dj@redhat.com>
-
- * m32c/Makefile.in (m16cmon.ld, m32cmon.ld): Fix output names.
- (*.o): Add dependencies.
- * m32c/m32csys.h: Move syscall location to 0x400 as per Renesas
- recommendations.
-
-2005-08-18 DJ Delorie <dj@redhat.com>
-
- * m32c/Makefile.in: Block out memory regions reserved for monitors
- and simulators. Add monitor link scripts.
-
-2005-08-16 Shaun Jackman <sjackman@gmail.com>
-
- * arm/syscalls.c (initialise_monitor_handles): Set
- monitor_stderr to the result of SWI_open(":tt", "a")
- instead of simply duplicating stdout.
-
-2005-08-10 DJ Delorie <dj@redhat.com>
-
- * configure.in: Add m32c support.
- * configure: Regenerated
- * m32c: New directory, Renesas R8C/M16C/M32C support.
- * m32c/abort.S m32c/argvlen.S m32c/argv.S m32c/chdir.S,
- m32c/chmod.S m32c/close.S m32c/configure m32c/configure.in,
- m32c/crt0.S, m32c/crtn.S, m32c/exit.S, m32c/fstat.S,
- m32c/genscript, m32c/getpid.S, m32c/gettimeofday.S,
- m32c/heaptop.S, m32c/isatty.S, m32c/kill.S, m32c/link.S,
- m32c/lseek.S, m32c/m32csys.h, m32c/m32c.tmpl, m32c/Makefile.in,
- m32c/open.S, m32c/read.S, m32c/sbrk.c, m32c/stat.S, m32c/time.S,
- m32c/times.S, m32c/unlink.S, m32c/utime.S, m32c/write.S: New files
-
-2005-08-02 Shaun Jackman <sjackman@gmail.com>
-
- * libgloss/arm/libcfunc.c (isatty): New function.
-
-2005-08-02 Shaun Jackman <sjackman@gmail.com>
-
- * libgloss/arm/syscalls.c (_exit): Call _kill with the second
- argument set to -1, which is an invalid signal number.
- (_kill): Comment and coding style changes only.
- (_raise): Remove function.
-
-2005-07-19 Paul Brook <paul@codesourcery.com>
-
- * arm/crt0.S: Ensure doubleword stack alignment.
-
-2005-07-18 Richard Sandiford <richard@codesourcery.com>
-
- * mips/array.ld (.sdata): Include .gnu.linkonce.s.*, not
- .gnu.linkonce.s*.
- (.sbss): Include .sbss.* and .gnu.linkonce.sb.*.
- * mips/cfe.ld, mips/ddb-kseg0.ld, mips/ddb.ld, mips/dve.ld,
- * mips/idt32.ld, mips/idt64.ld, mips/idtecoff.ld, mips/idt.ld,
- * mips/jmr3904app-java.ld, mips/jmr3904app.ld,
- * mips/jmr3904dram-java.ld, mips/jmr3904dram.ld,
- * mips/lsi.ld, mips/nullmon.ld, mips/pmon.ld: As for mips/array.ld.
-
-2005-07-18 Shaun Jackman <sjackman@gmail.com>
-
- * libgloss/arm/libcfunc.c (abort): Call _exit instead of the RDI swi.
- (alarm): Add the weak attribute.
- (pause): New function. Return ENOSYS.
- * libgloss/arm/syscalls.c (_getpid): Add the weak attribute.
- (_fstat): Ditto.
- (_stat): Ditto.
- (_link): Ditto. Return ENOSYS.
- (_unlink): Call the swi instead of returning -1.
- (_raise): Add the weak attribute. Return ENOSYS.
- (isatty): Rename to _isatty. Call the swi instead of returning 1.
- (_system): Call the swi instead of returning ENOSYS.
- (_rename): Ditto.
-
-2005-07-06 Aldy Hernandez <aldyh@redhat.com>
-
- * configure.in: Add ms1 case.
- * configure: Regenerate.
- * ms1/16-002.ld: New.
- * ms1/16-003.ld: New.
- * ms1/64-001.ld: New.
- * ms1/access.c: New.
- * ms1/chmod.c: New.
- * ms1/close.c: New.
- * ms1/configure: New.
- * ms1/configure.in: New.
- * ms1/crt0-16-002.S: New.
- * ms1/crt0-16-003.S: New.
- * ms1/crt0-64-001.S: New.
- * ms1/crt0.S: New.
- * ms1/exit-16-002.c: New.
- * ms1/exit-16-003.c: New.
- * ms1/exit-64-001.c: New.
- * ms1/exit.c: New.
- * ms1/fstat.c: New.
- * ms1/getpid.c: New.
- * ms1/gettime.c: New.
- * ms1/isatty.c: New.
- * ms1/kill.c: New.
- * ms1/lseek.c: New.
- * ms1/Makefile.in: New.
- * ms1/open.c: New.
- * ms1/read.c: New.
- * ms1/sbrk.c: New.
- * ms1/startup-16-002.S: New.
- * ms1/startup-16-003.S: New.
- * ms1/startup-64-001.S: New.
- * ms1/stat.c: New.
- * ms1/time.c: New.
- * ms1/times.c: New.
- * ms1/trap.h: New.
- * ms1/trap.S: New.
- * ms1/unlink.c: New.
- * ms1/utime.c: New.
- * ms1/write.c: New.
-
-2005-05-19 Corinna Vinschen <vinschen@redhat.com>
-
- * arm/elf-redboot.ld, iq2000/sim.ld, m68hc11/sim-valid-m68hc11.ld,
- * m68hc11/sim-valid-m68hc12.ld, mcore/elf-cmb.ld, mips/cfe.ld,
- * mips/ddb-kseg0.ld, mips/ddb.ld, mips/dve.ld, mips/idt.ld,
- * mips/idt32.ld, mips/idt64.ld, mips/jmr3904app-java.ld,
- * mips/jmr3904app.ld, mips/jmr3904dram-java.ld, mips/jmr3904dram.ld,
- * mips/nullmon.ld, mips/pmon.ld, mn10200/eval.ld, mn10200/sim.ld,
- * mn10300/asb2303.ld, mn10300/asb2305.ld, mn10300/eval.ld,
- * mn10300/sim.ld, rs6000/ads.ld, rs6000/mbx.ld, rs6000/yellowknife.ld,
- * sh/sh1lcevb.ld, sh/sh2lcevb.ld, sh/sh3bb.ld, sh/sh3lcevb.ld,
- * sparc/elfsim.ld, sparc/ex930.ld, sparc/ex931.ld, sparc/ex934.ld,
- * sparc/sparc86x.ld, xstormy16/eva_app.ld, xstormy16/eva_stub.ld,
- * xstormy16/sim_high.ld, xstormy16/sim_rom.ld: Add .debug_ranges
- section.
-
-2005-05-05 Tobias Anderberg <tobias.anderberg@axis.com>
-
- * arm/syscalls.c (get_errno): Fix output register constraint.
-
-2005-05-05 J"orn Rennecke <joern.rennecke@st.com>
-
- * rs6000/sim-getrusage.S: New file, broken out of:
- (simulator.S).
- * rs6000/Makefile.in (SIM_OBJS): Add sim-getrusage.o.
- (sim-getrusage.o): New rule.
-
-2005-04-28 Shaun Jackman <sjackman@gmail.com>
-
- * libgloss/syscalls.c (get_errno): Add an output register constraint.
-
-2005-04-19 Eric Christopher <echristo@redhat.com>
-
- * mips/regs.S: Sign extend constants for mips64 and unify
- address handling.
-
-2005-04-12 Shaun Jackman <sjackman@gmail.com>
-
- * libgloss/arm/Makefile.in (RDPMON_BSP): librdpmon.a was empty due
- to a typo. Fixed.
- (RDIMON_BSP): Ditto.
-
-2005-04-12 Richard Sandiford <rsandifo@redhat.com>
-
- * mips/array.ld, mips/cfe.ld, mips/dve.ld, mips/idt32.ld,
- * mips/idt64.ld, mips/idtecoff.ld, mips/idt.ld,
- * mips/jmr3904app-java.ld, mips/jmr3904app.ld,
- * mips/jmr3904dram-java.ld, mips/jmr3904dram.ld, mips/lsi.ld,
- * mips/nullmon.ld, mips/pmon.ld: Keep .init and .fini.
-
-2005-02-08 Antony King <antony.king@st.com>
-
- * arm/syscalls.c: Change CHECK_INIT to pass reentrant struct
- instead of file pointer.
-
-2005-02-01 Hans-Peter Nilsson <hp@axis.com>
-
- * cris/Makefile.in (ALL_INSTALL_FILES): New macro.
- (ALL_INSTALL_FILES_NEWLIB_COPY): New macro.
- (all): Use ALL_INSTALL_FILES instead of its contents. Add
- ALL_INSTALL_FILES_NEWLIB_COPY.
- ($(objroot)/newlib/%, $(objroot)/newlib/libnosys.a): New rules
-
-2005-01-27 Hans-Peter Nilsson <hp@axis.com>
-
- * configure.in: Support cris-*-* and crisv32-*-*.
- * libnosys/configure.in: Ditto.
- * configure, libnosys/configure: Regenerate.
- * cris: New directory.
- * cris/crt0.S, cris/crtn.c, cris/gensyscalls, cris/linunistd.h,
- cris/outbyte.c, cris/configure.in, cris/crti.c, cris/lcrt0.c,
- cris/Makefile.in, cris/setup.S, cris/configure: New files.
-
-2005-01-21 Hans-Peter Nilsson <hp@axis.com>
-
- * libnosys/warning.h (stub_warning): Remove "warning: " prefix.
-
-2005-01-18 Hans-Peter Nilsson <hp@axis.com>
-
- * libnosys/warning.h (link_warning) [HAVE_GNU_LD and HAVE_ELF]:
- Prefix symbol in section name with __SYMBOL_PREFIX. Do not use
- __make_section_unallocated. Mark magic variable as used.
-
-2005-01-18 Hans-Peter Nilsson <hp@axis.com>
-
- * libnosys/configure.in (libc_cv_asm_previous_directive): Set
- cache-id variable.
- (libc_cv_asm_popsection_directive): Ditto.
- (libc_cv_section_attributes): Ditto.
- (libc_symbol_prefix): Rename from libc_dollar_prefix. Check for
- "_" as well, and set __SYMBOL_PREFIX accordingly.
- * libnosys/configure: Regenerate.
-
-2005-01-18 Hans-Peter Nilsson <hp@axis.com>
-
- * libnosys/Makefile.in (LD, AS): Correct obsoleted suffix: Say
- as-new and ld-new, not as.new and ld.new.
-
-2005-01-14 Hans-Peter Nilsson <hp@axis.com>
-
- * libnosys/warning.h (__make_section_unallocated)
- [HAVE_ASM_PREVIOUS_DIRECTIVE, HAVE_ASM_POPSECTION_DIRECTIVE]: Use "\n"
- instead of ";" to delimit assembly lines.
-
-2005-01-07 Paul Brook <paul@codesourcery.com>
-
- * arm/crt0.S: Call __libc_{init,fini}_array instead of
- _init/_fini if they exist.
-
-2004-11-26 Paul Brook <paul@codesourcery.com>
-
- * arm/crt0.S (_start): Add .cantunwind annotation.
-
-2004-10-28 Nick Clifton <nickc@redhat.com>
-
- * configure.in: Add support for iq2000 target.
- * configure: Regenerate.
-
-2004-10-05 Tomer Levi <Tomer.Levi@nsc.com>
-
- * configure.in: Support crx-*-*.
- * configure: regenerate.
- * crx/_exit.c: New file.
- * crx/_getenv.c: Ditto.
- * crx/_rename: Ditto.
- * crx/close.c: Ditto.
- * crx/configure.in: Ditto.
- * crx/crti.S: Ditto.
- * crx/crtn.S: Ditto.
- * crx/crt0.S: Ditto.
- * crx/dvz_hndl.c: Ditto.
- * crx/flg_hndl.c: Ditto.
- * crx/fstat.c: Ditto.
- * crx/getpid.c: Ditto.
- * crx/iad_hndl.c: Ditto.
- * crx/intable.c: Ditto.
- * crx/isatty.c: Ditto.
- * crx/kill.c: Ditto.
- * crx/lseek.c: Ditto.
- * crx/Makefile.in: Ditto.
- * crx/open.c: Ditto.
- * crx/putnum.c: Ditto.
- * crx/read.c: Ditto.
- * crx/sbrk.c: Ditto.
- * crx/sim.ld: Ditto.
- * crx/stat.c: Ditto.
- * crx/svc_hndl.c: Ditto.
- * crx/time.c: Ditto.
- * crx/und_hndl.c: Ditto.
- * crx/unlink.c: Ditto.
- * crx/write.c: Ditto.
-
-2004-10-01 Paul Brook <paul@codesourcery.com>
-
- * arm/configure.in: Add *-*-aebi target.
- * arm/configure: Regenerate.
-
-2004-08-25 Corinna Vinschen <vinschen@redhat.com>
-
- * i386/cygmon.ld (.text): Fix alignment.
- (.rodata): Handle .rodata.* sections.
-
-2004-06-27 Hideki Iwamoto <h-iwamoto@kit.hi-ho.ne.jp>
-
- * Makefile.in: Support $(DESTDIR).
- * arm/Makefile.in: Ditto.
- * d30v/Makefile.in: Ditto.
- * doc/Makefile.in: Ditto.
- * fr30/Makefile.in: Ditto.
- * frv/Makefile.in: Ditto.
- * hp74x/Makefile.in: Ditto.
- * i386/Makefile.in: Ditto.
- * i960/Makefile.in: Ditto.
- * iq2000/Makefile.in: Ditto.
- * libnosys/Makefile.in: Ditto.
- * m32r/Makefile.in: Ditto.
- * m68hc11/Makefile.in: Ditto.
- * m68k/Makefile.in: Ditto.
- * mcore/Makefile.in: Ditto.
- * mips/Makefile.in: Ditto.
- * mn10200/Makefile.in: Ditto.
- * mn10300/Makefile.in: Ditto.
- * pa/Makefile.in: Ditto.
- * rs6000/Makefile.in: Ditto.
- * sparc/Makefile.in: Ditto.
- * sparc/libsys/Makefile.in: Ditto.
- * xstormy16/Makefile.in: Ditto.
-
-2004-06-25 Jeff Johnston <jjohnstn@redhat.com>
-
- * libnosys/_exit.c: New file.
- * libnosys/Makefile.in: Add _exit.o.
-
-2004-06-17 Jeff Johnston <jjohnstn@redhat.com>
-
- * arm/configure.in: Check the value of newlib-may-supply-syscalls
- enablement variable to determine if crt0 should or should not be
- built.
- * arm/configure: Regenerated.
- * arm/Makefile.in: Changed to look at @BUILD_CRT0_TRUE@ and
- @BUILD_CRT0_FALSE@ variables set in configure to determine
- if crt0.o should be built and installed.
-
-2004-06-09 Toralf Lund <toralf@procaptura.com>
-
- * arm/crt0.S: Copied from newlib and it now also sets up stacks for
- FIQ and IRQ mode, plus calls hardware_init_hook() and
- software_init_hook() if present.
- * arm/libcfunc.c, arm/swi.h, arm/syscalls.c: Copied
- from newlib.
- * arm/Makefile.in: Build crt0.o, rdpmon-crt0.o, rdimon-crt0.o,
- librdpmon.a, librdimon.a - support file for "bare" setup, as well
- as "RDP" and "RDI" monitors.
- * arm/coff-rdpmon.specs, arm/elf-rdpmon.specs,
- arm/coff-rdimon.specs, arm/elf-rdimon.specs: gcc specs files to go
- with above mentioned support libs and startfiles.
-
-2004-06-03 Alexandre Oliva <aoliva@redhat.com>
-
- * mn10300/sim.ld: Start at address 4, to avoid ambiguity with NULL
- pointers.
-
-2004-05-26 Jeff Johnston <jjohnstn@redhat.com>
-
- * libnosys/sbrk.c: Add include of <_syslist.h> and "config.h".
-
-2004-05-05 Richard Sandiford <rsandifo@redhat.com>
-
- * mips/array.ld, mips/cfe.ld, mips/ddb-kseg0.ld, mips/ddb.ld,
- * mips/dve.ld, mips/idt32.ld, mips/idt64.ld, mips/idt.ld
- * mips/jmr3904app.ld, mips/lsi.ld, mips/nullmon.ld, mips/pmon.ld
- (.eh_frame_hdr, .eh_frame, .gcc_except_table, .jcr): New sections.
-
-2004-04-02 Chris Demetriou <cgd@broadcom.com>
-
- * mips/regs.S (C0_COUNT): Fix comment that kept this from being
- defined.
- * mips/vr4300.S: Use C0_COUNT as appropriate instead of hardcoding $9.
- * mips/vr5xxx.S: Likewise.
-
-2004-03-23 Eric Christopher <echristo@redhat.com>
-
- * frv/crt0.S: Fix comment.
- * mips/configure.in: Add mipsisa64-*-* to target support.
- * mips/configure: Regenerate.
-
-2004-03-03 Stephane Carrez <stcarrez@nerim.fr>
-
- * m68hc11/sci-inout.S: Supports -mlong-calls.
- * m68hc11/sim-valid-m68hc11.ld (.tramp): New section for trampolines.
- (.text): Mark the .installN and .finiN section with KEEP.
- (.vectors): Likewise for .vectors.
- (.gcc_except_table): New section.
- * m68hc11/sim-valid-m68hc12.ld (.tramp): New section for trampolines.
- (.text): Mark the .installN and .finiN section with KEEP.
- (.vectors): Likewise for .vectors.
- (.gcc_except_table): New section.
-
-2004-01-23 Gábor Lóki <loki@inf.u-szeged.hu>
-
- * m68k/leds.c: remove led_putnum(), zylons() forward
- function declarations.
- * m68k/leds.h: add zylons() forward function declaration.
-
-2004-01-06 Alexandre Oliva <aoliva@redhat.com>
-
- 2003-12-02 Richard Sandiford <rsandifo@redhat.com>
- * frv/crt0.S (_start): Fix use of FDPIC conditionals. Move the set of
- gr11 outside the FDPIC conditional. Avoid clobbering gr4 too early.
- 2003-11-14 Richard Sandiford <rsandifo@redhat.com>
- * frv/crt0.S: Fix fdpic sp calculation.
- 2003-11-05 Alexandre Oliva <aoliva@redhat.com>
- * frv/crt0.S: Use __stacksize, not __stack, to initialize sp on
- FDPIC. Update comments on computing _GLOBAL_OFFSET_TABLE_. Don't
- fixup ctors nor dtors on FDPIC.
- 2003-09-19 Alexandre Oliva <aoliva@redhat.com>
- * frv/crt0.S (_start): Set up gr15 only for FDPIC.
- * frv/crt0.S (_start): Save _GLOBAL_OFFSET_TABLE_ in gr17, and set
- gr15 before function calls.
- 2003-09-19 DJ Delorie <dj@redhat.com>, Alexandre Oliva <aoliva@redhat.com>
- * frv/crt0.S (_start): Set up gr15 with _GLOBAL_OFFSET_TABLE_'s
- value.
-
-2003-10-27 Bernardo Innocenti <bernie@develer.com>
-
- * m68k/asm.h: Add macros for -fPIC, -msep-data and
- -mid-shared-library support.
- * m68k/crt0.S: Use macros for -fPIC, -msep-data and
- -mid-shared-library support.
- * m68k/sim-crt0.S: Likewise.
-
-2003-10-15 Bernardo Innocenti <bernie@develer.com>
-
- * m68k/sim-funcs.c (_XOPEN_SOURCE): Define to get the pid_t
- typedef from <unistd.h>.
-
-2003-08-26 Jason Merrill <jason@redhat.com>
-
- * sparc/elfsim.ld: Fix __EH_FRAME_BEGIN__ definition.
- * sparc/sparc86x.ld: Likewise.
-
-2003-08-20 Chris Demetriou <cgd@broadcom.com>
-
- * mips/crt0_cfe.S: New file.
- * mips/cfe_mem.c: New file.
- * mips/cfe_prestart.S: Remove.
- * mips/cfe.ld: Adjust to use crt0_cfe.o as the startup file, and
- and use _start as the entry point. Align BSS to 32-byte boundary.
- * mips/cfe.c: Reimplement to fit on top of a crt0_cfe.o file.
- * mips/cfe_api.h (__libcfe_stack_size, __libcfe_mem_limit)
- (__libcfe_meminit, __libcfe_stack_top): New prototypes.
- * mips/Makefile.in (CFEOBJS): Replace cfe_prestart.o with cfe_mem.o.
- (cfe.o, cfe_api.o, cfe_mem.o, crt0_cfe.o): New targets.
- * mips/configure.in: Build and install crt0_cfe.o when CFE support
- is built.
- * mips/configure: Regenerate.
-
-2003-08-12 Jeff Johnston <jjohnstn@redhat.com>
-
- * i386/cygmon-salib.c (unlink): New stub.
-
-2003-08-08 Mark Salter <msalter@redhat.com>
-
- * i386/cygmon.ld: Add 4 byte alignment to __CTOR_LIST__
-
- Bernd Schmidt <bernds@redhat.com>
-
- * i386/cygmon.ld: Add entry for .rodata.
-
-2003-07-14 Kazuhiro Inaoka <inaoka.kazuhiro@renesas.com>
-
- * m32r/configure.in: fixed bug to delete ../config-ml.in.
-
-2003-07-10 Alexandre Oliva <aoliva@redhat.com>
-
- 2001-10-30 Jeff Johnston <jjohnstn@redhat.com>
- * mn10300/asb2305.ld: Added ASB2305 support.
- * mn10300/configure: Ditto.
- * mn10300/configure.in: Ditto.
- 2001-09-12 Stan Cox <scox@redhat.com>
- * mn10300/asb2303.ld: New file. Linker script for the ASB2303
- AM33/2.00 board.
- * mn10300/configure.in: Add support for asb2303 board script.
-
-2003-07-08 Jeff Johnston <jjohnstn@redhat.com>
-
- * configure.in: Reapply Kazuhiro Inaoko's multilib patch from
- 04-17-03.
- * configure: Regenerated.
-
-2003-06-23 Kazuhiro Inaoka <inaoka.kazuhiro@renesas.com>
-
- * m32r/crt0.S (_start): Allow _stack to be placed anywhere
- in memory.
-
-2003-06-06 Stan Cox <scox@redhat.com>
- Jeff Johnston <jjohnstn@redhat.com>
- Anthony Green <green@redhat.com>
-
- * configure.in: Add iq2000 support.
- * configure: Rebuilt.
- * iq2000/Makefile.in, iq2000/access.c, iq2000/_exit.c,
- iq2000/configure, iq2000/chmod.c, iq2000/chown.c, iq2000/close.c,
- iq2000/configure.in, iq2000/creat.c, iq2000/crt0.S, iq2000/crt1.c,
- iq2000/execv.c, iq2000/execve.c, iq2000/fork.c, iq2000/fstat.c,
- iq2000/getpid.c, iq2000/gettime.c, iq2000/isatty.c, iq2000/kill.c,
- iq2000/lseek.c, iq2000/open.c, iq2000/pipe.c, iq2000/read.c,
- iq2000/sbrk.c, iq2000/sim.ld, iq2000/stat.c, iq2000/test.c,
- iq2000/time.c, iq2000/times.c, iq2000/trap.c, iq2000/trap.h,
- iq2000/unlink.c, iq2000/utime.c, iq2000/wait.c, iq2000/write.c:
- New files.
-
-2003-05-27 Jeff Johnston <jjohnstn@redhat.com>
-
- * libnosys/Makefile.in: Add errno.o.
- * libnosys/errno.c: New file to supply errno definition if
- one not provided yet.
-
-2003-05-26 Eric Christopher <echristo@redhat.com>
-
- * mips/crt0.S: Remove stackbase variable set.
-
-2003-05-02 Eric Christopher <echristo@redhat.com>
-
- * mips/cma101.c (__sizemem): Make sure that end is not in .sdata.
-
-2003-04-29 Nick Clifton <nickc@redhat.com>
-
- * libnosys/sbrk.c: Remove unnecessary #include's.
- Change return type of _sbrk() function to void * to match
- definition in system header files.
- Fix formatting.
-
-2003-04-23 Andrew Haley <aph@cambridge.redhat.com>
-
- * xstormy16/sim_rom.ld: New.
- * xstormy16/Makefile.in (SIM_SCRIPTS): Add sim_rom.ld.
- * xstormy16/crt0.s (_int_reset): Copy ROM data to RAM.
- * xstormy16/eva_app.ld (_rdata, _data): New.
- * xstormy16/sim_high.ld (_rdata, _data): New.
-
-2003-04-17 Inaoka Kazuhiro <inaoka.kazuhiro@renesas.com>
-
- * m32r/Makefile.in: Add multilib support.
- * m32r/configure.in: Ditto.
- * m32r/configure: Regenerated.
-
-2003-04-16 Nick Clifton <nickc@redhat.com>
-
- * xstormy16/sim_high.ld: Add .jcr section mapping.
- * xstormy16/eva_stub.ld: Likewise.
- * xstormy16/eva_app.ld: Likewise.
-
-2003-04-09 Chris Demetriou <cgd@broadcom.com>
-
- * mips/cfe.c (_flush_cache): New function.
-
-2003-02-18 Richard Sandiford <rsandifo@redhat.com>
-
- * mips/nullmon.c (_ftext, _end): Adjust declaration.
- (get_mem_info): Rework.
-
-2003-02-18 Richard Sandiford <rsandifo@redhat.com>
-
- * mips/crt0.S (zerobss): Reload __memsize after call.
-
-2003-02-17 Chris Demetriou <cgd@broadcom.com>
-
- * mips/cfe.c (__cfe_handle, __cfe_entrypt): Fix types.
-
-2003-02-05 Chris Demetriou <cgd@broadcom.com>
-
- * mips/configure.in (mipsisa32el-*-*): Handle in the same way
- as mipsisa32-*-*.
- (mipsisa32r2-*-*, mipsisa32r2el-*-*): New, handled in the same
- way as mipsisa32-*-*.
- * mips/configure: Regenerate.
-
-2003-02-05 Chris Demetriou <cgd@broadcom.com>
-
- * mips/cfe.c (hardware_hazard_hook): Move...
- * mips/cfe_prestart.S (hardware_hazard_hook): To here,
- and translate into assembly.
-
-2003-01-08 Richard Sandiford <rsandifo@redhat.com>
-
- * mips/crt0.S (_start): Allocate 64 bytes of stack instead of 32.
- Pass an empty argv and envp to main().
-
-2003-01-08 Richard Sandiford <rsandifo@redhat.com>
-
- * mips/configure.in (mips64vr-elf, mips64vrel-elf): New config.
- * mips/configure: Regenerate.
-
-2003-01-07 Chris Demetriou <cgd@broadcom.com>
-
- * crt0.S: Check for definition of __mips64 rather than
- checking (__mips < 3).
- * pmon.S: Likewise.
- * cygmon.c (sysCall): Avoid multi-line string literals.
-
-2002-11-12 Jeff Johnston <jjohnstn@redhat.com>
-
- * mips/Makefile.in: Add cygmon support.
- * mips/configure.in: Ditto.
- * mips/configure: Regenerated.
- * mips/crt0_cygmon.S: New file.
- * mips/cygmon.c: Ditto.
- * mips/pmon.S: Minor formatting and copyright changes.
- * mips/crt0.S: Ditto.
-
-2002-11-08 Jeff Johnston <jjohnstn@redhat.com>
-
- * arm/Makefile.in: Add support for new pid specs.
- * arm/coff-iq80310.specs: Change to allow future support.
- * arm/elf-iq80310.specs: Ditto.
- * arm/elf-redboot.specs: Ditto.
- * arm/coff-redboot.ld: Add EH frame support.
- * arm/redboot-crt0.S: Add optional code to clear bss without
- memset.
- * arm/coff-pid.specs: New file.
- * arm/elf-pid.specs: New file.
-
-2002-11-08 Jeff Johnston <jjohnstn@redhat.com>
- Catherine Moore <clm@redhat.com>
-
- * m32r/configure.in: Do not require gcc to be able to link an
- executable.
- * m32r/configure: Regenerate.
- * m32r/Makefile.in: Directly reference gdbstub.
-
-2002-10-25 Bernd Schmidt <bernds@redhat.com>
-
- * i386/cygmon.ld: Add entry for .gcc_except_table.
-
-2000-10-25 Mark Salter <msalter@redhat.com>
-
- * i386/cygmon-crt0.S: Use __USER_LABEL_PREFIX__ for symbols. Always
- use __start for start symbol.
- * i386/cygmon-salib.c: Don't build __do_global_[cd]tors for AOUT.
- Disable file I/O extensions to make Plum Hall happy.
- * i386/cygmon.ld: Set __start as entry point.
- * i386/Makefile.in: Support IS_AOUT.
- * i386/configure.in: Support IS_AOUT.
- * i386/configure: Regenerated.
- * i386/cygmon-salib.c:
- * i386/cygmon-gmon.c (_mcount): It's _etext.
-
-2002-10-25 Jeff Johnston <jjohnstn@redhat.com>
-
- * configure.in: Clarify some of the triplets so unsupported
- configurations don't pass through.
- * configure: Regenerated.
-
-2002-10-18 Stephane Carrez <stcarrez@nerim.fr>
-
- * m68hc11/syscalls.c (sbrk): Use ptrdiff_t for increment parameter.
-
-2002-10-07 Richard Sandiford <rsandifo@redhat.com>
-
- * mips/ddb.ld: KEEP .init and .fini.
- * mips/ddb-kseg0.ld: Likewise.
-
-2002-10-04 Michael Snyder <msnyder@redhat.com>
-
- * m32r/m32r-lib.c (exceptionHandler): Fix computation of
- exception vector address, as suggested by Mitsubishi.
- (getExceptionVector): Ditto.
-
-2002-08-01 Chris Demetriou <cgd@broadcom.com>
-
- * mips/cfe.ld (STARTUP): New definition.
- * mips/ddb-kseg0.ld (STARTUP): Likewise.
- * mips/ddb.ld (STARTUP): Likewise.
- * mips/dve.ld (STARTUP): Likewise.
- * mips/idt.ld (STARTUP): Likewise.
- * mips/jmr3904app-java.ld (STARTUP): Likewise.
- * mips/jmr3904app.ld (STARTUP): Likewise.
- * mips/jmr3904dram-java.ld (STARTUP): Likewise.
- * mips/jmr3904dram.ld (STARTUP): Likewise.
- * mips/lsi.ld (STARTUP): Likewise.
- * mips/nullmon.ld (STARTUP): Likewise.
- * mips/pmon.ld (STARTUP): Likewise.
-
-2002-07-23 Stephane Carrez <stcarrez@nerim.fr>
-
- * README: Mention 68HC11/68HC12 support.
- * configure.in: Recognize m6811-elf and m6812-elf.
- * configure: Regenerated.
- * m68hc11/Makefile.in: New file.
- * m68hc11/configure.in: New file.
- * m68hc11/configure: New file.
- * m68hc11/crt0.S: New file.
- * m68hc11/sci-inout.S: New file for 68hc11/68hc12 sio.
- * m68hc11/sim-valid-m68hc11.ld: New file.
- * m68hc11/sim-valid-m68hc12.ld: New file.
- * m68hc11/syscalls.c: New file.
-
-2002-07-22 Aldy Hernandez <aldyh@redhat.com>
-
- * rs6000/simulator.S (gettimeofday): New.
- (getrusage): New.
-
-2002-07-18 Chris Demetriou <cgd@broadcom.com>
-
- * read.c (read): Don't assign past end of buffer, fix return value.
-
-2002-07-12 Chris Demetriou <cgd@broadcom.com>
-
- * mips/Makefile.in (GENOBJS2): New variable to name other
- commonly used objects.
- (DVEOBJS, JMR3904OBJS): Reference GENOBJS2.
-
- * mips/Makefile.in: Add support for Broadcom CFE firmware.
- * mips/configure.in: (mipsisa32*-*-*, *): Likewise.
- * mips/configure: Regenerate.
- * mips/cfe.c: New file.
- * mips/cfe.ld: New file.
- * mips/cfe_api.c: New file.
- * mips/cfe_api.h: New file.
- * mips/cfe_api_int.h: New file.
- * mips/cfe_error.h: New file.
- * mips/cfe_prestart.S: New file.
-
-2002-07-12 Chris Demetriou <cgd@broadcom.com>
-
- * mips/array.ld (hardware_exit_hook, hardware_hazard_hook): New
- symbols for optionally-provided functions.
- * mips/ddb-kseg0.ld: Likewise.
- * mips/ddb.ld: Likewise.
- * mips/dve.ld: Likewise.
- * mips/idt.ld: Likewise.
- * mips/idt32.ld: Likewise.
- * mips/idt64.ld: Likewise.
- * mips/idtecoff.ld: Likewise.
- * mips/jmr3904app-java.ld: Likewise.
- * mips/jmr3904app.ld: Likewise.
- * mips/jmr3904dram-java.ld: Likewise.
- * mips/jmr3904dram.ld: Likewise.
- * mips/lsi.ld: Likewise.
- * mips/nullmon.ld: Likewise.
- * mips/pmon.ld: Likewise.
- * mips/crt0.S: Invoke hardware_exit_hook and hardware_hazard_hook
- functions if they are provided.
- (_exit): Handle __embedded_pic properly.
-
-2002-06-18 Dave Brolley <brolley@redhat.com>
-
- From Catherine Moore, Michael Meissner, Richard Sandiford:
- * configure.in: Support frv*-*-*.
- * frv/Makefile.in: New file.
- * frv/configure: New file.
- * frv/configure.in: New file.
- * frv/crt0.S: New file.
- * frv/fstat.c: New file.
- * frv/getpid.c: New file.
- * frv/isatty.c: New file.
- * frv/kill.c: New file.
- * frv/print.c: New file.
- * frv/putnum.c: New file.
- * frv/sbrk.c: New file.
- * frv/sim-close.S: New file.
- * frv/sim-exit.S: New file.
- * frv/sim-inbyte.c: New file.
- * frv/sim-lseek.S: New file.
- * frv/sim-open.S: New file.
- * frv/sim-read.S: New file.
- * frv/sim-time.c: New file.
- * frv/sim-unlink.S: New file.
- * frv/sim-write.S: New file.
- * frv/stat.c: New file.
-
-2002-05-11 Thomas Fitzsimmons <fitzsim@redhat.com>
-
- * libnosys/acconfig.h (HAVE_SECTION_ATTRIBUTES): New macro.
- * libnosys/configure.in: Check gcc's support for section attributes.
- * libnosys/warning.h: Have link_warning expand to nothing if gcc
- does not support section attributes.
-
-2002-04-22 Jonathan Larmour <jlarmour@redhat.com>
-
- * arm/syscall.h: New file. To define extra syscall values for RedBoot.
-
- * arm/redboot-syscalls.c (_close): Fix setting of errno value.
- (_lseek): Ditto.
- (_open): Ditto.
- (_write): Ditto.
- (_read): Ditto.
- (_rename): New function.
- (_system): Ditto.
- (_stat): Ditto.
- (_unlink): Call a syscall for this now.
- (isatty): Ditto.
- (_fstat): Ditto.
- (_gettimeofday): Ditto.
-
-2002-04-17 Joel Sherrill <joel@OARcorp.com>
-
- * debug.h: Change mem_err to volatile to match definition in
- debug.c.
-
-2002-04-17 Joel Sherrill <joel@OARcorp.com>
-
- * sparc/cygmon-salib.c, sparc/erc32-stub.c: Don't use multi-line
- strings.
-
-2002-04-16 Jeff Johnston <jjohnstn@redhat.com>
-
- * m68k/configure.in: Change to use LIB_AC_PROG_CC instead
- of AC_PROG_CC to avoid building an executable in configuration.
- * m68k/configure: Regenerated.
-
-2002-04-15 Hans-Peter Nilsson <hp@bitrange.com>
-
- * d30v/syscalls.c: #include <time.h>. Don't use multi-line
- strings.
-
-2002-04-15 Hans-Peter Nilsson <hp@bitrange.com>
-
- * m32r/trapmon0.c (__trap0): Don't use multi-line strings.
-
-2002-02-05 Mark Salter <msalter@redhat.com>
-
- * arm/elf-iq80310.specs: Ditto.
- * arm/elf-redboot.specs: Ditto.
- * arm/elf-redboot.ld: Fix eh_frame sections. Add .jcr section.
- * arm/redboot-crt0.S: Add support for __USES_INITFINI__.
-
-2002-02-01 Geoffrey Keating <geoffk@redhat.com>
-
- * xstormy16/Makefile.in (SIM_OBJS): Remove sbrk.o, add
- sim_malloc_start.o.
- * xstormy16/eva_app.ld: Add __malloc_start.
- * xstormy16/sbrk.c: Remove.
- * xstormy16/sim_malloc_start.s: New file.
- * xstormy16/sim_high.ld: Make the stack start immediately at the
- end of the program.
-
-2002-02-01 Michael Meissner <meissner@redhat.com>
-
- * mips/cma101.c (__sizemem_default): Allow user to specify the
- memory size.
- (__sizemem): Use it.
-
-2002-01-24 Mark Salter <msalter@redhat.com>
-
- * arm/redboot-crt0.S: Use __get_memtop to put stack in high memory.
-
- * arm/redboot-syscalls.c (_times): Unconditionally use SYS_times.
- (__get_memtop): New funtion to return top of memory.
-
-2002-01-15 Mark Salter <msalter@redhat.com>
-
- * xstormy16/eva_stub.ld: Provide interrupt routine symbols which
- forward interrupts to user application vectors.
-
- * xstormy16/crt0_stub.s: Remove default interrupt routines.
-
- * xstormy16/Makefile.in: Rename stub app to eva_stub.elf and
- add it to install list.
-
-2002-01-07 Mark Salter <msalter@redhat.com>
-
- * configure.in: Add support for arm, strongarm, and xscale.
- * configure: Regenerated.
- * arm/coff-iq80310.specs: New file.
- * arm/coff-redboot.ld: New file.
- * arm/coff-redboot.specs: New file.
- * arm/configure: New file.
- * arm/configure.in: New file.
- * arm/elf-iq80310.specs: New file.
- * arm/elf-redboot.ld: New file.
- * arm/elf-redboot.specs: New file.
- * arm/Makefile.in: New file.
- * arm/redboot-crt0.S: New file.
- * arm/redboot-syscalls.c: New file.
-
-2001-12-22 Geoffrey Keating <geoffk@redhat.com>
- Mark Salter <msalter@redhat.com>
- Catherine Moore <clm@redhat.com>
- Richard Henderson <rth@redhat.com>
-
- * configure.in: Add xstormy16.
- * libnosys/configure.in: Add xstormy16.
- * configure: Regenerated.
- * libnosys/configure: Regenerated.
- * xstormy16/Makefile.in: New file.
- * xstormy16/close.c: New file.
- * xstormy16/configure: New file.
- * xstormy16/configure.in: New file.
- * xstormy16/crt0.s: New file.
- * xstormy16/crt0_stub.s: New file.
- * xstormy16/crti.s: New file.
- * xstormy16/crtn.s: New file.
- * xstormy16/eva_app.c: New file.
- * xstormy16/eva_app.ld: New file.
- * xstormy16/eva_stub.ld: New file.
- * xstormy16/fstat.c: New file.
- * xstormy16/getpid.c: New file.
- * xstormy16/kill.c: New file.
- * xstormy16/lseek.c: New file.
- * xstormy16/open.c: New file.
- * xstormy16/sbrk.c: New file.
- * xstormy16/sim_high.ld: New file.
- * xstormy16/stat.c: New file.
- * xstormy16/syscalls.S: New file.
- * xstormy16/syscalls.m4: New file.
- * xstormy16/unlink.c: New file.
- * xstormy16/xstormy16_stub.c: New file.
-
-2001-10-31 Jeff Johnston <jjohnstn@redhat.com>
-
- * m32r/Makefile.in: Use gdb stub set by configure.
- * m32r/configure.in: Add a special macro for testing
- c compiler without building executable. Add setting of
- GDBSTUB.
- * m32r/configure: Regenerated.
-
-2001-10-31 David Howells <dhowells@redhat.com>
-
- * syscall.h: Added SYS_times, SYS_gettimeofday, SYS_link values.
- * mn10300/times.c: Renamed "times" to "_times" so that it can be
- referenced by newlib.
- * mn10300/cygmon.c: New file.
- * mn10300/crt0_redboot.S: Ditto.
- * mn10300/crt0_cygmon.S: Ditto.
- * mn10300/Makefile.in: Added RedBoot and Cygmon support.
- * mn10300/configure.in: Changed to allow for future
- evaluation boards to be added.
- * mn10300/configure: Regenerated.
-
-2001-10-17 Michael Meissner <meissner@redhat.com>
-
- * regs.S (K0BASE_ADDR,K1BASE_ADDR): Define as addresses to
- identify if a program is running in kernel segment 0.
-
- * cma101.c (__sizemem): If we are running in kernel segment 0,
- instead of kernel segment 1, use kernel segment 0 addresses which
- are uncached when sizing memory.
-
- * ddb-kseg0.ld: New file, clone of ddb.ld, except it links the
- program to run in kernel segment 0, instead of kernel segment 1.
-
- * configure.in: Treat ddb-kseg0.ld like ddb.ld.
- * configure: Regenerate.
-
-2001-09-15 Eric Christopher <echristo@redhat.com>
-
- * mips/configure.in (LIB_AC_PROG_CC): Fix typo in mipsisa32 to
- mipsisa32*.
- * mips/configure: Regenerate.
-
-2001-09-14 Eric Christopher <echristo@redhat.com>
-
- * mips/configure.in: Add mipsisa32 support.
- * mips/configure: Regenerate.
- * mips/idt32.ld: New file.
- * mips/idt64.ld: New file.
-
-2001-09-11 Michael Meissner <meissner@redhat.com>
-
- * mips/crt0.S (_start): If -mfp32, don't enable 64-bit floating
- point registers, even if we are compiling for a mips3 or greater.
-
-2001-09-10 Jim Blandy <jimb@redhat.com>
-
- Add support for GDB monitor-style I/O.
- * m68k/idp-outbyte.c (raw_outbyte): Renamed from outbyte; made
- static.
- (outbyte): Call raw_outbyte; if GDB_MONITOR_OUTPUT is #defined,
- precede the byte with a ^O character.
- * m68k/idpgdb.ld: New linker script.
- * m68k/Makefile.in (IDPGDB_LDFLAGS, IDPGDB_BSP, IDPGDB_OBJS): New
- variables.
- (all): Add ${IDPGDB_BSP} to the list of things to build.
- (${IDPGDB_BSP}, idp-gdb-outbyte.o, idpgdb-test.x,
- idpgdb-test.srec, idpgdb-test.dis, idpgdb-test): New rules.
- (install): Install the IDPGDB stuff, too.
-
-2001-08-30 Richard Henderson <rth@redhat.com>
- Eric Christopher <echristo@redhat.com>
-
- * mips/crt0.S: Fix for .init/.fini sections.
-
-2001-08-30 Richard Henderson <rth@redhat.com>
- Eric Christopher <echristo@redhat.com>
-
- * mips/idt.ld: Rewrite for .init/.fini sections.
-
-2001-08-22 Jonathan Larmour <jlarmour@redhat.com>
-
- * mips/Makefile.in (jmr3904-io.o): Remove bogus use of `-mips3.'
-
-2001-07-18 Jeff Johnston <jjohnstn@redhat.com>
-
- * hp74x/configure: Regenerated with current autoconf.
- * m32r/configure: Ditto.
- * m68k/configure: Ditto.
- * pa/configure: Ditto.
- * sparc/configure: Ditto.
-
-2001-03-08 Geoffrey Keating <geoffk@redhat.com>
-
- * rs6000/simulator.S (dup): New syscall.
-
-2001-02-28 Will Cohen <wcohen@redhat.com>
-
- * src/libgloss/m68k/Makefile.in: Updated copyright and
- added rules to build simulator related libraries.
- (SIM_SCRIPTS): New variable.
- (SIM_LDFLAGS): New variable.
- (SIM_BSP): New variable.
- (SIM_CRT0): New variable.
- (SIM_OBJS): New variable.
- (SIM_TEST): New variable.
- (SIM_INSTALL): new variable.
- * src/libgloss/m68k/sim-abort.c: New file.
- * src/libgloss/m68k/sim-crt0.S: New file.
- * src/libgloss/m68k/sim-errno.c: New file.
- * src/libgloss/m68k/sim-funcs.c: New file.
- * src/libgloss/m68k/sim-inbyte.c: New file.
- * src/libgloss/m68k/sim-print.c: New file.
- * src/libgloss/m68k/sim-sbrk.c: New file.
- * src/libgloss/m68k/sim.ld: New file.
- * src/libgloss/m68k/simulator.S: New file.
-
-2001-02-22 Jeff Johnston <jjohnstn@redhat.com>
-
- * mn10200/access.c: With DJ Delorie's permission, this code is
- now freely modifiable with no reference to "copying.dj".
- * mn10300/access.c: Ditto.
-
-2001-02-06 Will Cohen <wcohen@redhat.com>
-
- * rs6000/sim-errno.c (__errno): Removed.
- (_cerror): Use re-entrant version of errno.
-
-2000-09-05 Geoff Keating <geoffk@cygnus.com>
-
- * rs6000/simulator.S: Use conditional returns for documentation
- purposes.
- (access): Add new syscall.
-
-Wed May 24 16:47:12 2000 Alexandre Oliva <aoliva@cygnus.com>
-
- * mn10300/time.c (time): Set *tloc, since the sim doesn't.
-
-Mon Jan 31 18:45:26 2000 Donald Lindsay <dlindsay@cygnus.com>
-
- * mips/crt0.S: If compiled into a mips2 multilib, sets processor
- status register for 32 bit addressing
- * mips/regs.S: Add symbols for status and config register fields.
- * mips/vr5xxx.S: Variant of vr300.S with extensions to __cpu_flush()
- to cope with Vr5000 secondary cache and with Vr5432 CACHE instruction.
- * mips/Makefile.in: Add rule for forming vr5xxx.o.
- * mips/configure.in: Add case arm for mips64vr5000 since the
- default (which was previously used) should not get vr5xxx.o.
-
-Wed Dec 22 19:08:09 1999 Christopher Faylor <cgf@cygnus.com>
-
- * wince/Makefile.am: Use LDADD from configure.
- * wince/Makefile.in: Regenerate.
- * wince/configure.in: Determine libraries needed based (crudely) on
- target.
- * wince/configure: Regenerate.
-
-1999-12-16 Tom Tromey <tromey@cygnus.com>
-
- * mips/Makefile.in (jmr3904-io.o): Don't compile with `-mips3'.
-
- * mips/jmr3904-io.c: Actually completed merge of Andrew Haley's
- patch of 1998-11-23.
-
- * mips/jmr3904dram-java.ld: Provide _Jv_QthreadsStackSize. Link
- against -lgcjcoop, not -lqthreads.
- * mips/jmr3904app-java.ld: Provide _Jv_QthreadsStackSize.
-
-1999-12-16 Brendan Kehoe <brendan@cygnus.com>
-
- * m68k/idp.ld: Only use specific .dtors and .ctors uses of KEEP,
- without the bits for __{C,D}TOR_{LIST,END}__.
-
-1999-12-14 Geoff Keating <geoffk@cygnus.com>
-
- * m68k/idp.ld (.text): Put crtbegin at the start of the
- constructors and destructors.
-
-Mon Nov 29 12:14:48 1999 Christopher Faylor <cgf@cygnus.com>
-
- * wince/Makefile.am: Add missing gdbdir assignment.
- * wince/Makefile.in: Regenerate.
-
-1999-11-22 Gavin Romig-Koch <gavin@cygnus.com>
-
- * mips/idt.ld: Remove the OUTPUT_ARCH("mips:4000") directive.
-
-1999-11-15 Nick Clifton <nickc@cygnus.com>
-
- * configure.in: Add arm-wince-pe target.
- * configure: Regenerate.
-
-1999-11-11 Brendan Kehoe <brendan@cygnus.com>
-
- * sparc/elfsim.ld (.text): Also provide __EH_FRAME_BEGIN__ since we're
- not bringing in crtbegin.o.
- * sparc/sparc86x.ld (.text): Likewise. Add initp support.
-
-1999-10-30 Geoffrey Keating <geoffk@cygnus.com>
-
- * mips/crt0.S: Handle -membedded-pic properly. Set the $gp much
- earlier because it'll be needed. Set the high bits of the PC to
- be consistent with other pointers, so that exception handling
- doesn't get confused.
-
-1999-09-27 Jonathan Larmour <jlarmour@cygnus.co.uk>
-
- * sparc/crt0.s: Delete. This file is obsolete and caused problems
- on case-insensitive windows filesystems.
-
-Wed Sep 22 15:59:17 1999 Christopher Faylor <cgf@cygnus.com>
-
- * configure.in: Generalize Windows CE target detection.
- * configure: Regenerate.
- * wince/Makefile.am: Rename CE stub filename.
- * wince/Makefile.in: Regenerate.
- * wince/configure.in: Allow changing of CE stub.
- * wince/configure: Regenerate.
-
-1999-07-26 Andrew Haley <aph@cygnus.com>
-
- * m32r/crt0.S (_start): Use a full word immediate for __bss_start
- and _end to allow them to be placed anywhere in memory.
-
-1999-07-08 Jason Merrill <jason@yorick.cygnus.com>
-
- * sparc/elfsim.ld: Provide initp support.
-
-1999-06-22 Nick Clifton <nickc@cygnus.com>
-
- * mips/dve.ld (.rdata): Rename section to .rodata.
- * mips/idt.ld (.rdata): Rename section to .rodata.
- * mips/jmr3904app-java.ld (.rdata): Rename section to .rodata.
- * mips/jmr3904app.ld (.rdata): Rename section to .rodata.
- * mips/lsi.ld (.rdata): Rename section to .rodata.
- * mips/nullmon.ld (.rdata): Rename section to .rodata.
- * mips/pmon.ld (.rdata): Rename section to .rodata.
- * mips/r5900.ld (.rdata): Rename section to .rodata.
- * mips/sky.ld (.rdata): Rename section to .rodata.
- * mips/vpu.ld (.rdata): Rename section to .rodata.
-
-Tue Jun 01 16:57:46 1999 Jeff Johnston <jjohnstn@cygnus.com>
-
- * libnosys/configure.in: Added setting of ac_file
- prior to calling config-ml.in.
- * libnosys/configure: Regenerated.
- * libnosys/Makefile.in: Added code to make install directory
- for libnosys.a prior to installing.
-
-Wed May 26 17:22:46 1999 Christopher Faylor <cgf@cygnus.com>
-
- * Makefile.am: Expect the object file to be in the
- current directory.
- * Makefile.in: Regenerate.
-
-Tue May 25 14:35:21 1999 Christopher Faylor <cgf@cygnus.com>
-
- * configure.in: Add wince targest.
- * configure: Regenerate.
- * wince: New directory
- * wince/Makefile.am: New file.
- * wince/Makefile.in: New file.
- * wince/aclocal.m4: New file.
- * wince/configure: New file.
- * wince/configure.in: New file.
-
-1999-05-24 Jim Wilson <wilson@cygnus.com>
-
- * sparc/elfsim.ld: Add `.data.*'.
-
-1999-05-22 Jason Merrill <jason@yorick.cygnus.com>
-
- * m68k/idp.ld: Add initp support.
- * sparc/cygmon.ld.src: Likewise.
-
-1999-05-14 Nick Clifton <nickc@cygnus.com>
-
- * mcore/syscalls.S (_sbrk): Round to 8 bytes not 4.
-
-1999-05-13 Mark Salter <msalter@cygnus.com>
-
- * mcore/configure.in: Fixed multilib support.
- * mcore/configure: Regenerated.
- * mcore/Makefile.in: Fixed multilib problems.
- Added cmb board support
- * mcore/close.c: New file.
- * mcore/cmb-exit.c: Ditto.
- * mcore/cmb-inbyte.c: Ditto.
- * mcore/cmb-outbyte.c: Ditto.
- * mcore/elf-cmb.ld: Ditto.
- * mcore/elf-cmb.specs: Ditto.
- * mcore/fstat.c: Ditto.
- * mcore/getpid.c: Ditto.
- * mcore/kill.c: Ditto.
- * mcore/lseek.c: Ditto.
- * mcore/open.c: Ditto.
- * mcore/pe-cmb.ld: Ditto.
- * mcore/pe-cmb.specs: Ditto.
- * mcore/print.c: Ditto.
- * mcore/putnum.c: Ditto.
- * mcore/raise.c: Ditto.
- * mcore/read.c: Ditto.
- * mcore/sbrk.c: Ditto.
- * mcore/stat.c: Ditto.
- * mcore/unlink.c: Ditto.
- * mcore/write.c: Ditto.
- * mcore/c-syscalls.c: Removed.
-
-1999-05-07 Nick Clifton <nickc@cygnus.com>
-
- * mcore/syscalls.S (_write): Use 0x50FF instead of trap 1.
- Tidy up code layout.
-
-1999-05-06 Nick Clifton <nickc@cygnus.com>
-
- * mcore/Makefile.in: Fix build rule.
- * mcore/syscalls.s: Rename to syscalls.S
-
-1999-05-04 Nick Clifton <nickc@cygnus.com>
-
- * mcore/configure.in: Depend upon crt0.S not crt0.s.
- * mcore/configure: Regenerate.
-
-1999-04-29 Nick Clifton <nickc@cygnus.com>
-
- * mcore/crt0.S: Renamed file from crt0.s.
- Only invoke init() and fini() routines for ELF builds.
- Use __bss_start__ and __bss_end__ to locate .bss section.
-
-1999-04-26 Angela Marie Thomas <angela@cygnus.com>
-
- * mips/array.ld: Fix ELF ctor/dtor support.
- * mips/ddb.ld: Likewise.
- * mips/dve.ld: Likewise.
- * mips/idt.ld: Likewise.
- * mips/jmr3904app.ld: Likewise.
- * mips/lsi.ld: Likewise.
- * mips/nullmon.ld: Likewise.
- * mips/pmon.ld: Likewise.
- * mips/r5900.ld: Likewise.
- * mips/sky.ld: Likewise.
- * mips/vpu.ld: Likewise.
-
-1999-04-22 Nick Clifton <nickc@cygnus.com>
-
- * mcore/crt0.s: Initialise data section, call _init and _fini.
-
- * mcore/syscalls.s (_exit): Renamed from __exit.
-
- * fr30/crt0.s (_start): Initialise arg[cv] after calling _init and
- atexit.
-
-1999-04-21 Nick Clifton <nickc@cygnus.com>
-
- * mcore/crt0.s (_start): Use .long directive, not .word.
-
- * mcore/syscalls.s (_sbrk): fix syntax.
-
-1999-04-20 Jason Molenda (jsm@bugshack.cygnus.com)
-
- * sparc/sparc86.ld: Set alignment for the .data section.
-
-1999-04-18 Nick Clifton <nickc@cygnus.com>
-
- * configure.in: Add support for mcore targets.
- * configure: Regenerate.
- * mcore: New directory.
- * mcore/Makefile.in: New File: meta Makefile.
- * mcore/configure.in: New File: meta configure file..
- * mcore/configure: New File: Generated.
- * mcore/crt0.s: New File: mcore startup code.
- * mcore/syscalls.s: New File: Assembler system call stubs.
- * mcore/c-syscalls.c: New File: C system call stubs.
-
-Tue Apr 13 17:20:34 1999 Catherine Moore <clm@cygnus.com>
-
- * mips/array.ld: Support linkonce sections.
- * mips/ddb.ld: Likewise.
- * mips/dve.ld: Likewise.
- * mips/idt.ld: Likewise.
- * mips/jmr3904app.ld: Likewise.
- * mips/jmr3904app-java.ld: Likewise.
- * mips/jmr3904dram.ld: Likewise.
- * mips/jmr3904dram-java.ld: Likewise.
- * mips/lsi.ld: Likewise.
- * mips/nullmon.ld: Likewise.
- * mips/pmon.ld: Likewise.
- * mips/r5900.ld: Likewise.
- * mips/sky.ld: Likewise.
- * mips/vpu.ld: Likewise.
-
-Mon Apr 12 21:01:46 1999 Catherine Moore <clm@cygnus.com>
-
- * mips/array.ld: Add ELF ctor/dtor support.
- * mips/ddb.ld: Likewise.
- * mips/dve.ld: Likewise.
- * mips/idt.ld: Likewise.
- * mips/jmr3904app.ld: Likewise.
- * mips/lsi.ld: Likewise.
- * mips/nullmon.ld: Likewise.
- * mips/pmon.ld: Likewise.
- * mips/r5900.ld: Likewise.
- * mips/sky.ld: Likewise.
- * mips/vpu.ld: Likewise.
-
-Sun Apr 11 00:43:34 1999 Jim Wilson <wilson@cygnus.com>
-
- * i960/crt0.c (_start): Increase stack size to 256K.
-
-Wed Mar 31 17:56:41 1999 Bob Manson <manson@charmed.cygnus.com>
-
- * i386/cygmon-salib.c: Add read and write syscall support.
- * i386/cygmon-syscall.h: Ditto.
-
- * i386/cygmon-gmon.[ch]: Profile support.
-
-Sun Feb 28 23:39:32 1999 Geoffrey Noer <noer@cygnus.com>
-
- * libnosys/configure.in: Check cygwin*, not cygwin32.
- * libnosys/configure: Regenerate.
-
-1999-02-18 Tom Tromey <tromey@cygnus.com>
-
- * mips/configure: Rebuilt.
- * mips/configure.in (script_list): Added jmr3904dram-java and
- jmr3904app-java.
- * mips/jmr3904dram-java.ld: New file.
- * mips/jmr3904dram.ld: Don't mention -lqthreads.
- * mips/jmr3904app-java.ld: New file.
- * mips/jmr3904app.ld: Don't mention -lgcjcoop.
-
-Wed Feb 17 13:27:24 1999 Jim Wilson <wilson@cygnus.com>
-
- * m68k/crt0.S (start): Use jpbl not jmi in coldfire code.
-
-1999-02-18 Tom Tromey <tromey@cygnus.com>
-
- * Merge from branch:
-
- Tue Feb 16 12:57:06 PST 1999 Angela Marie Thomas <angela@cygnus.com>
-
- * mips/jmr3904app.ld: Change -lqthreads to -lgcjcoop due to
- library name change.
-
- Thu Feb 4 16:15:44 1999 Warren Levy <warrenl@cygnus.com>
-
- * mips/configure.in (script_list): Added jmr3904dram.ld.
- * mips/configure: Rebuilt.
-
- Thu Jan 21 19:11:45 1999 Warren Levy <warrenl@cygnus.com>
-
- * mips/jmr3904dram.ld: Created.
-
- Wed Dec 30 11:15:46 1998 Anthony Green <green@cygnus.com>
-
- * mips/jmr3904app.ld: libgcc is dependent on libqthreads, so
- it must be linked it.
-
- Wed Dec 30 11:04:54 1998 Anthony Green <green@cygnus.com>
-
- * mips/jmr3904app.ld: Make sure the stack owns all 8k plus
- the padding allocated for alignment.
-
- 1998-11-23 Andrew Haley <aph@viagra.cygnus.co.uk>
-
- * mips/jmr3904-io.c: change get_mem_info() to use _mem_size
- imported from the linker script.
- * mips/jmr3904app.ld: Provide _mem_size.
-
- * mips/jmr3904app.ld: Allocate 8k bytes for stack.
-
- 1998-11-19 Andrew Haley <aph@viagra.cygnus.co.uk>
-
- * mips/crt0.S: set argc to 0 before calling main()
- * get_mem_info() was incorrect; jmr3904 has 1M max of SRAM.
-
- Wed Nov 4 15:28:44 1998 Anthony Green <green@cygnus.com>
-
- * mips/jmr3904-io.c: Implement get_mem_info().
-
- Wed Nov 4 15:22:41 1998 Anthony Green <green@cygnus.com>
-
- * mips/Makefile.in: Rename libtx39jmr.a to libjmr3904.a.
- * mips/configure.in: Ditto.
- * mips/configure: Regenerate.
-
- Tue Nov 3 15:39:14 1998 Angela Marie Thomas (angela@cygnus.com)
-
- * mips/configure.in: Add jmr3904app to script list for tx39.
- * mips/configure: Regenerate.
-
-1999-02-08 Nick Clifton <nickc@cygnus.com>
-
- * libnosys/configure.in: Add support for StrongARM target.
- * libnosys/configure: Regenerate.
-
-Thu Feb 4 10:56:59 1999 Jeff Johnston <jjohnstn@cygnus.com>
-
- * d30v/syscalls.c (time): Added code to honor argument
- passed to time which is either a pointer to a time_t
- value to set or is the NULL pointer.
-
-1999-02-03 Keith Seitz <keiths@cygnus.com>
-
- * m32r/m32r-lib.c (rx_char): Rename rx_uchar and return
- only unsigned chars.
- (getDebugChar2): Remove and integrate support into "M"
- packet code.
-
-1999-01-29 Doug Evans <devans@casey.cygnus.com>
-
- * sparc/erc32-crt0.S (_exit): Set magic number for simulator.
- * sparc/traps.S (win_flush): Make sure %sp is valid before flushing
- all windows.
-
-Tue Jan 19 06:19:51 1999 Jeffrey A Law (law@cygnus.com)
-
- * mn10300/crt0.S: Use ".stack" for the name of the stack section,
- not "._stack". Remove mn10200 support.
- * mn10300/trap.S: Remove mn10200 support.
- * mn10300/sim.ld: Collect *(.stack) *(._stack) input sections into
- the .stack output section to be safe.
- * mn10300/eval.ld: Likewise.
-
- * mn10200/crt0.S: Use ".stack" for the name of the stack section,
- not "._stack".
- * mn10200/sim.ld: Collect *(.stack) *(._stack) input sections into
- the .stack output section to be safe.
- * mn10200/eval.ld: Likewise.
-
-1999-01-14 Nick Clifton <nickc@cygnus.com>
-
- * fr30/Makefile.in: Set target of install to be SIM_INSTALL not
- MON_INSTALL.
-
- * fr30/crt0.s (_start): Use atexit to call C++ global
- destructors. Patch from Mark Salter <msalter@cygnus.com>
-
-1999-01-12 Nick Clifton <nickc@cygnus.com>
-
- * fr30/crt0.s: Remove .stack section - it is no longer necessary.
-
-1999-01-11 Nick Clifton <nickc@cygnus.com>
-
- * fr30/crt0.s (_start): Add calls to _init and _fini for C++
- global constructor/destructor support.
-
-1999-01-07 Nick Clifton <nickc@cygnus.com>
-
- * fr30/crt0.s (_start): Apply patch from Mark Salter
- <msalter@cygnus.com> to cope with initialising .bss areas that are
- not word sized.
-
-1998-12-23 Michael Meissner <meissner@cygnus.com>
-
- * m68k/idp.ld (.eh_frame): Add section to the .text segment.
- (__{INIT,FINI}__SECTION__): Align to a 4 byte boundary.
- (.gcc_except_table): Ditto.
-
-Mon Dec 21 22:45:05 1998 Mark Alexander <marka@cygnus.com>
-
- * sh/sh1lcevb.ld: Add DWARF sections.
- * sh/sh2lcevb.ld: Ditto.
- * sh/sh3lcevb.ld: Ditto.
- * sh/sh3bb.ld: Ditto.
-
-Fri Dec 18 22:07:21 1998 Bob Manson <manson@charmed.cygnus.com>
-
- * i386/cygmon.ld: Make sure -lcygmon appears both before
- and after -lc, so we pick up functions from there in
- preference to libc functions.
-
- * i386/cygmon-salib.c: Add syscalls for time and gettimeofday.
- Don't add __do_global_ctors () and __do_global_dtors () if
- we're on a coff target.
- (open): Add dummy function so plumhall will compile.
- (clock): Replacement for clock () syscall that uses
- gettimeofday().
-
-
-1998-12-18 Gavin Romig-Koch <gavin@cygnus.com>
-
- * mips/Makefile.in, mips/vr4300.S: Move the -mips3 into vr4300.S.
-
-1998-12-17 Nick Clifton <nickc@cygnus.com>
-
- * fr30/syscalls.c: Include ../syscall.h not ../../sim/fr30/targ-vals.h
- (_open): Return file descriptor allocated by simulator.
- (isatty): Always false to avoid having to cope with reads from
- stdin. For Now...
-
-1998-12-16 Nick Clifton <nickc@cygnus.com>
-
- * fr30/Makefile.in: Add libraries to clean target.
-
- * fr30/syscalls.c (_write): Save length so that it can be returned
- to caller.
-
- * fr30/crt0.s (_start): Initialise argc, argv and envp before
- calling main().
-
-1998-12-15 Gavin Romig-Koch <gavin@cygnus.com>
-
- * mips/ddb.ld (OUTPUT_ARCH): Remove.
-
-1998-12-12 Nick Clifton <nickc@cygnus.com>
-
- * fr30/syscalls.c: Remove stub for abort and add stubs for _kill
- and _getpid.
-
-1998-12-11 Nick Clifton <nickc@cygnus.com>
-
- * configure.in: Add support for fr30 target.
- * configure: Regenerate.
- * fr30: New directory.
- * fr30/Makefile.am: New file - build crt0.o and libsim.a
- * fr30/Makefile.in: New file - generate from Makefile.am.
- * fr30/configure.in: New file - support fr30 target
- * fr30/configure: New file - generate from configure.in.
- * fr30/crt0.s: New file - Basic executable startup code.
- * fr30/syscalls.c: New file - System call emulation library.
-
-1998-12-11 Gavin Romig-Koch <gavin@cygnus.com>
-
- * mips/crt0.S (_start): Change initialization of FR.
-
-1998-12-08 James E Wilson <wilson@wilson-pc.cygnus.com>
-
- * i960/crt0.c (set_stack): Change return type to void. Init SP to
- FP + 64 instead of FP. Simplify code to align ptr.
- (_start): Call exit instead of _exit. Delete local variable stack.
- Init stack to heap+4096.
- * i960/mon960.c (abort): Ifdef out.
- * i960/syscall.h: New file.
-
-1998-12-04 Ken Raeburn <raeburn@cygnus.com>
-
- * mips/cma101.c (time): Add heuristic to handle Y2K overflow.
-
-Tue Dec 1 17:57:52 1998 Stan Shebs <shebs@andros.cygnus.com>
-
- * config/ppc.mh (.s.o): Don't use CFLAGS_MRELOCATABLE when
- assembling.
-
-Wed Nov 18 19:14:15 1998 Jim Wilson <wilson@cygnus.com>
-
- * mips/entry.S: Handle mips16 builds.
-
-1998-10-30 Ian Molee <imolee@cygnus.com>
-
- * m32r/trapmon0.c: New file. Mon2000 trap handler.
- * m32r/trapmon0.S: Removed.
- * m32/Makefile.in: Changed to reflect above-changed files.
-
-Wed Oct 28 07:55:55 1998 Mark Alexander <marka@cygnus.com>
-
- * sparc/crt0.S: Move entry point to start of text section.
- Put the address of the data section at the start of the section,
- so the GDB sparclite loader can find it for a.out loads.
-
-Mon Oct 26 13:11:41 1998 Jeffrey A Law (law@cygnus.com)
-
- * d30v/syscalls.c (time): Returns a time_t and accepts a pointer to
- a time_t as its argument.
-
- * i386/cygmon-syscall.h: Fix bogus asm constraints. You must not
- clobber a register that overlaps with an input or output.
-
-Fri Oct 23 11:06:16 1998 John Metzler <jmetzler@cygnus.com>
-
- * mips/jmr3904-io.c (hardware_init_hook): Add file to support
- serial input and out put as required by libgloss read and write
- functions.
-
- * mips/jmr3904app.ld : LInker script for tx39jmr3904 board. Uses
- addresses per eCos conventions, not original ROM monitor.
-
- * configure.in: Add libtx39jmr.c to build target
-
- * Makefile.in: rules for libtx39jmr.a and jmr3904-io.o
-
-1998-10-15 Ian Molee <imolee@cygnus.com>
-
- * m32r/mon.specs: New file
- * m32r/trapmon0.S: New file
- * m32r/Makefile.in: Modified to add support for mon2000 trap0.
-
-Tue Oct 13 11:52:03 1998 Jeff Johnston <jjohnstn@cygnus.com>
-
- * libnosys/warning.h: New file.
-
-1998-10-06 Ken Raeburn <raeburn@cygnus.com>
-
- * mips/configure.in: Build nullmon stuff in default case. Don't
- treat vr4100 specially.
-
-Tue Oct 6 15:17:42 1998 Jeff Johnston <jjohnstn@cygnus.com>
-
- * libnosys/sbrk.c (_sbrk): Added reference to config.h.
- * libnosys/close.c (_close): Added stub warning outside of
- function body and added reference to config.h.
- * libnosys/execve.c (_execve): Ditto.
- * libnosys/fork.c (_fork): Ditto.
- * libnosys/fstat.c (_fstat): Ditto.
- * libnosys/getpid.c (_getpid): Ditto.
- * libnosys/gettod.c (_gettimeofday): Ditto.
- * libnosys/isatty.c (_isatty): Ditto.
- * libnosys/kill.c (_kill): Ditto.
- * libnosys/link.c (_link): Ditto.
- * libnosys/lseek.c (_lseek): Ditto.
- * libnosys/open.c (_open): Ditto.
- * libnosys/read.c (_read): Ditto.
- * libnosys/stat.c (_stat): Ditto.
- * libnosys/times.c (_times): Ditto.
- * libnosys/unlink.c (_unlink): Ditto.
- * libnosys/wait.c (_wait): Ditto.
- * libnosys/write.c (_write): Ditto.
- * libnosys/acconfig.h: New file.
- * libnosys/config.h.in: New file.
- * libnosys/exit.c: Removed as _exit cannot be stubbed.
- * libnosys/Makefile.in: Regenerated.
- * libnosys/configure.in: Configure header file specified.
- * libnosys/configure: Regenerated.
-
-Wed Sep 30 12:45:43 1998 Bob Manson <manson@charmed.cygnus.com>
-
- * i386/cygmon.ld: Increase memory limits; put the initial
- executable above 1MB.
-
-Fri Sep 25 13:49:22 1998 Bob Manson <manson@charmed.cygnus.com>
-
- * i386/configure.in: Changed crt0.c to cygmon-salib.c.
-
-Wed Sep 23 19:25:46 1998 Bob Manson <manson@charmed.cygnus.com>
-
- * configure.in: Add i386-*-elf* triplet.
- * i386/*: Support for i386 targets.
-
-Wed Sep 16 19:43:52 1998 Doug Evans <devans@canuck.cygnus.com>
-
- * m32r/m32r-lib.c: Rename -DMSA2000 to -DREVC and reverse test.
- (exceptionHandler,getExceptionHandler): Add cast to avoid warning.
-
-Wed Sep 9 19:22:03 1998 Mark Alexander <marka@cygnus.com>
-
- * sparc/Makefile.in: Remove cache86x.o, not needed any more.
- * sparc/sparclite.h: (read_asr, write_asr): Define.
- * sparc/cache.c (is_danlite): New function.
- (cache_off, cache_on, flush_i_cache): Test for DANlite.
- * sparc/salib.c (update_leds): Allow user to disable LED flashing.
- * sparc/sparc86x.ld: Prevent section overlap.
-
-1998-09-04 Keith Seitz <keiths@cygnus.com>
-
- * m32r/m32r-lib.c (rx_rdy): Add support for MSA2000G01 board.
- (rx_char): Ditto.
- (getDebugChar2): New function to support binary downloads (gdb
- remote protocol "X" command).
- (exceptionHandler): Add support for MSA2000G01 board.
- (getExceptionHandler): Ditto.
-
-1998-08-20 Michael Meissner <meissner@cygnus.com>
-
- * libnosys/gettod.c: Include sys/time.h so that struct timezone is
- declared.
-
-Sun Aug 16 10:46:43 1998 Mark Alexander <marka@cygnus.com>
-
- * sparc/Makefile.in: Add new BSP for sparc86x (DANlite).
- * sparc/salib.c (outbyte): Add hook for GDB stub.
- (cache_off, cache_on, flush_i_cache): Move to cache.c.
- * sparc/cache.c: New file for sparclite-specific cache code.
- * sparc/cache-86x.c: New file for sparc86x-specific cache code.
- * sparc/sparc86x.ld: New linker script for sparc86x.
- * sparc/crt0.S: Disable broken data relocation code.
- * sparc/sparcl-stub.c (outbyte_stub): New function for redirecting
- standard output to GDB.
- (handle_exception): Initialize outbyte hook.
-
-Tue Aug 11 13:27:31 1998 Jim Wilson <wilson@cygnus.com>
-
- * m68k/idp.ld (__INIT_SECTION__): Align to 2 byte boundary.
- * m68k/bcc.ld, m68k/mvme135.ld, m68k/mvme162.ld: Likewise.
- * m68k/sbc5204.ld, m68k/sbc5206.ld: Likewise.
-
-1998-08-11 Jason Merrill <jason@yorick.cygnus.com>
-
- * mn10300/{sim.ld,eval.ld}: Add init_priority support.
-
-Tue Aug 11 10:04:05 1998 Jeffrey A Law (law@cygnus.com)
-
- * mn10200/sim.ld: Rework code to insert pad before the start of the
- data segment.
- * mn10200/eval.ld: Likewise.
- * mn10300/sim.ld: Likewise.
- * mn10300/eval.ld: Likewise.
-
-Sat Aug 8 09:46:37 1998 Jim Wilson <wilson@cygnus.com>
-
- * mips/cma101.c (__sizemem): New local variable extra. Align base
- to int boundary.
-
-Tue Jul 28 10:57:12 1998 Mark Alexander <marka@cygnus.com>
-
- * sparc/Makefile.in (ERC32_OBJS): Add fixctors.
- * sparc/erc32-crt0.S: Call __fix_ctors just before calling main.
- * sparc/fixctors.c: New file.
-
-Sat Jul 18 07:15:33 1998 Mark Alexander <marka@cygnus.com>
-
- * sparc/crt0.S (win_ovf_trap, win_unf_trap): Use correct names for
- extern functions win_ovf and win_unf; fixes unresolved symbols
- in COFF.
-
-Mon Jul 13 17:50:41 1998 Jeff Johnston <jjohnstn@cygnus.com>
-
- * configure.in: Added libnosys as subdir.
- * configure: Rebuilt configure based on configure.in.
- * libnosys/close.c (_close): Part of new libnosys stub library
- to use for situations with no operating system support.
- * libnosys/environ.c (environ): ditto.
- * libnosys/execve.c (_execve): ditto.
- * libnosys/exit.c (_exit): ditto.
- * libnosys/fork.c (_fork): ditto.
- * libnosys/fstat.c (_fstat): ditto.
- * libnosys/getpid.c (_getpid): ditto.
- * libnosys/gettod.c (_gettimeofday): ditto.
- * libnosys/isatty.c (_isatty): ditto.
- * libnosys/kill.c (_kill): ditto.
- * libnosys/link.c (_link): ditto.
- * libnosys/lseek.c (_lseek): ditto.
- * libnosys/open.c (_open): ditto.
- * libnosys/read.c (_read): ditto.
- * libnosys/sbrk.c (_sbrk): ditto.
- * libnosys/stat.c (_stat): ditto.
- * libnosys/times.c (_times): ditto.
- * libnosys/unlink.c (_unlink): ditto.
- * libnosys/wait.c (_wait): ditto.
- * libnosys/write.c (_write): ditto.
- * libnosys/Makefile.in : Makefile.in for creating libnosys Makefile.
- * libnosys/configure.in: configure.in to create libnosys configure.
- * libnosys/configure: Configure for libnosys library.
-
-Mon Jul 13 14:13:07 EDT 1998 Jim Lemke <jlemke@cygnus.com>
-
- * sim/mips.ld: Clarify a comment.
-
-Tue Jul 7 21:12:41 1998 Mark Alexander <marka@cygnus.com>
-
- * sparc/elfsim.ld: Make it work on both a.out and ELF.
- * sparc/traps.S: Rename trap_table label to work on both a.out
- and ELF. Put the address of the data section at the start
- of the section, so the simulator loader can find it for a.out loads.
-
-Thu Jun 25 09:24:53 1998 Mark Alexander <marka@cygnus.com>
-
- * config/mn10200.mt: New file.
-
-Tue Jun 23 22:45:49 1998 Mark Alexander <marka@cygnus.com>
-
- * mn10200/crt0.S: Don't waste top four bytes of stack.
- * mn10200/eval.ld: Fix stack top address.
-
-Mon Jun 22 09:30:22 1998 Drew Moseley <dmoseley@cygnus.com>
-
- * mips/dvemon.c: Remove the close function and get it from the generic
- close.o
- * mips/Makefile.in (DVEOBJS): Add generic open.o and close.o to the DVEOBJS
- list to ensure that the proper API's are included.
-
-Wed Jun 17 12:33:05 1998 Mark Alexander <marka@cygnus.com>
-
- * configure.in: Add mn10200 support.
- * configure: Regenerate.
- * mn10200/Makefile.in: New file.
- * mn10200/_exit.c: New file.
- * mn10200/access.c: New file.
- * mn10200/chmod.c: New file.
- * mn10200/chown.c: New file.
- * mn10200/close.c: New file.
- * mn10200/configure: New file.
- * mn10200/configure.in: New file.
- * mn10200/creat.c: New file.
- * mn10200/crt0.S: New file.
- * mn10200/crt1.c: New file.
- * mn10200/eval.ld: New file.
- * mn10200/execv.c: New file.
- * mn10200/execve.c: New file.
- * mn10200/fork.c: New file.
- * mn10200/fstat.c: New file.
- * mn10200/getpid.c: New file.
- * mn10200/gettime.c: New file.
- * mn10200/isatty.c: New file.
- * mn10200/kill.c: New file.
- * mn10200/lseek.c: New file.
- * mn10200/open.c: New file.
- * mn10200/pipe.c: New file.
- * mn10200/read.c: New file.
- * mn10200/sbrk.c: New file.
- * mn10200/sim.ld: New file.
- * mn10200/stat.c: New file.
- * mn10200/test.c: New file.
- * mn10200/time.c: New file.
- * mn10200/times.c: New file.
- * mn10200/trap.S: New file.
- * mn10200/trap.h: New file.
- * mn10200/unlink.c: New file.
- * mn10200/utime.c: New file.
- * mn10200/wait.c: New file.
- * mn10200/write.c: New file.
-
-Fri Jun 12 17:26:56 1998 Doug Evans <devans@seba.cygnus.com>
-
- * m32r/sys/syscall.h: Delete. Use ./syscall.h now.
- * m32r/trap0.S: Renamed from trap.S.
- * m32r/eit.h: New file.
- * m32r/crtsysc.c: Delete, split up into several files.
- * m32r/chmod.c: New file.
- * m32r/close.c: New file.
- * m32r/exit.c: New file.
- * m32r/fstat.c: New file.
- * m32r/getpid.c: New file.
- * m32r/isatty.c: New file.
- * m32r/kill.c: New file.
- * m32r/lseek.c: New file.
- * m32r/open.c: New file.
- * m32r/raise.c: New file.
- * m32r/read.c: New file.
- * m32r/sbrk.c: New file.
- * m32r/stat.c: New file.
- * m32r/unlink.c: New file.
- * m32r/utime.c: New file.
- * m32r/write.c: New file.
- * m32r/Makefile.in (SYSCALLS): Delete.
- (LIBOBJS,LIBGLOSS): New variables.
- (all,install): Update.
- (libgloss.a): New rule.
-
-Thu Jun 11 08:38:42 1998 Doug Evans <devans@seba.cygnus.com>
-
- * sparc/cygmon-salib.c (setitimer): Add `const' to second arg.
- (gettimeofday): Change type of 2nd arg to struct timezone *.
-
-Tue Jun 9 12:02:21 1998 Ian Carmichael <iancarm@cygnus.com>
-
- * mips/syscalls.c (sbrk): Allow memory allocation to work
- for configurations which don't have memory at K1BASE.
- * mips/cma101.c (__sizemem): Ditto.
-
-Tue Jun 9 13:17:28 1998 Michael Snyder <msnyder@cleaver.cygnus.com>
-
- * m68k/emc-stub.c: New file, stub for the EMC Symmetrix target.
- * m68k/gdbinit.emc: New file, user support for special features
- supported only on the EMC Symmetrix target.
-
-Fri Jun 5 16:40:20 1998 Mark Alexander <marka@cygnus.com>
-
- * sparc/elfsim.ld: Fix ctor and dtor tables to work in both
- little- and big-endian executables.
-
-Wed Jun 3 23:09:38 1998 Mark Alexander <marka@cygnus.com>
-
- * sparc/sparcl-stub.c: Include asm.h. Use STRINGSYM macro to generate
- proper prefix for public assembly language labels.
- * sparc/ex930.ld: Add DWARF sections.
- * sparc/ex931.ld: Ditto.
- * sparc/ex934.ld: Ditto.
- * sparc/elfsim.ld: Simplify and clean up.
- * sparc/Makefile.in: Build ex934 BSP. Allow little-endian builds.
- * sparc/traps.S (win_flush): Rewrite using code from Cygmon
- to eliminate register corruption.
-
-Mon Jun 1 15:21:05 1998 Geoffrey Noer <noer@cygnus.com>
-
- * sparc/cygmon-salib.c: Stop including sys/itimer.h
-
-Sun May 31 10:46:37 1998 Michael Meissner <meissner@cygnus.com>
-
- * rs6000/Makefile.in (SOLARIS_*): Don't build solaris bsp's any
- more.
-
-Fri May 22 13:50:55 1998 Angela Marie Thomas (angela@cygnus.com)
-
- * mn10300/Makefile.in: Install sim.ld.
-
-Wed May 20 22:45:11 1998 Mark Alexander <marka@cygnus.com>
-
- * sparc/elfsim.ld: Add constructor and destructor tables.
-
-Sat May 16 17:08:17 1998 Bob Manson <manson@charmed.cygnus.com>
-
- * sparc/cygmon-salib.c (__getProgramArgs): Use asm constraints.
-
-Fri May 15 16:50:36 1998 Mark Alexander <marka@cygnus.com>
-
- * sparc/traps.S (win_flush): Don't destroy %g1 and %g2.
-
-Fri May 15 15:59:30 1998 Gavin Koch <gavin@cygnus.com>
-
- * mips/configure.in: Add idt to tx39 chain.
- * mips/configure: Rebuild.
-
-Fri May 15 15:48:28 1998 Gavin Koch <gavin@cygnus.com>
-
- * mips/crt0.S (__stackbase): Added.
- (zerobss): Initialize __stackbase.
-
-1998-05-13 Brendan Kehoe <brendan@cygnus.com>
-
- * mips/configure.in: Also grok `mipstx39*-*-*'.
- * mips/configure: Regenerated.
-
-Mon May 11 15:07:12 1998 Bob Manson <manson@charmed.cygnus.com>
-
- * configure.in: Added powerpcle target.
- * configure: Regenerated.
-
-Thu May 7 16:43:37 1998 Mark Alexander <marka@cygnus.com>
-
- * sparc/elfsim.ld (OUTPUT_FORMAT): Add little-endian support.
-
- * sparc/crt0.S (_start): Define label for ELF targets.
- * sparc/salib.c: Include asm.h. Use STRINGSYM macro to generate
- proper prefix for public assembly language labels.
- (write, read): Disable to avoid conflict with generic versions
- of these functions.
- * sparc/erc32-stub.c: Move STRINGSYM macro to sparc/asm.h.
- * sparc/asm.h: Move STRINGSYM macro here from sparc/erc32-stub.c
-
-Mon May 4 08:30:58 1998 Mark Alexander <marka@cygnus.com>
-
- * sparc/configure.in: Treat sparc86x as a sparclite.
- * sparc/configure.in: Ditto.
- * sparc/Makefile.in (slite-install): Install missing files
- for simulator.
-
-Thu Apr 30 16:41:15 1998 John Metzler <jmetzler@cygnus.com>
-
- * mips/configure.in: adjust target type pattern to export nullmon.ld
- * mips/configure: regenerated
-
-Mon Apr 27 21:38:18 1998 Mark Alexander <marka@cygnus.com>
-
- * configure.in: Added sparc86x configuration.
- * configure: Ditto.
-
-Wed Apr 22 21:45:13 1998 Jeffrey A Law (law@cygnus.com)
-
- * mips/crt0.S: Increase stack alignment.
-
-Fri Apr 10 21:17:48 1998 Mark Alexander <marka@cygnus.com>
-
- * sparc/traps.S (win_flush): Prevent immediate window underflow
- trap on return. Miscellaneous comment formatting cleanup.
-
-Tue Apr 7 18:34:51 1998 Mark Alexander <marka@cygnus.com>
-
- * sparc/elfsim.ld: Align BSS at 8-byte boundary.
-
-Mon Apr 6 13:12:32 1998 Mark Salter <msalter@chef.cygnus.com>
-
- * rs6000/ads-io.c (write): Added write().
-
- * rs6000/Makefile.in: Changed objects used for libads to be
- new ads specific object files instead of some mvme objects.
-
- * Added ads-io.c and ads-exit.c to provide function stubs which
- are safe on ads board (SDS monitor).
-
- * rs6000/mbx-outbyte.c (outbyte): Foundry console output
- is fixed, so re-enable output char quoting for mbx.
-
- * rs6000/mbx.specs: Added blank line to end of file. There
- were link errors without it?
-
- * rs6000/mbx.specs: Use mbx.ld script for linking.
-
- * rs6000/mbx-outbyte.c: Don't quote characters. We don't want
- gdb to display program output, yet.
-
- * rs6000/Makefile.in (install-mbx): Fixed install of mbx.specs
- file.
-
- * rs6000/Makefile.in: Support for MBX EPPCBug monitor.
- * rs6000/mbx-{exit,inbyte,outbyte,print}.c: New files for MBX.
- * rs6000/mbx.ld,mbx.specs: New files for MBX.
-
-Wed Apr 1 21:42:40 1998 Mark Alexander <marka@cygnus.com>
-
- * sparc/elfsim.ld: New linker script for running ELF programs
- in erc32 simulator.
- * sparc/erc32-crt0.S: Disable copying of data segment.
- * sparc/erc32-stub.c: Generate correct public name for breakinst.
- * sparc/Makefile.in: Build erc32 library always.
-
-Thu Apr 2 11:24:32 1998 Andrew Cagney <cagney@b1.cygnus.com>
-
- * mips/syscalls.c (sbrk): Check word size correct for
- get_mem_info.
-
-Fri Mar 27 08:55:52 1998 Mark Alexander <marka@cygnus.com>
-
- * mips/crt0.S: Insert NOP before _start to keep GDB happy.
- * mips/dve.ld: Eliminate references to VR4300.
-
-Thu Mar 26 19:47:36 1998 Mark Alexander <marka@cygnus.com>
-
- * mn10300/eval.ld: Don't use absolute path in SEARCH_DIR.
- * mn10300/sim.ld: Ditto.
-
-Wed Mar 25 10:49:49 1998 Bob Manson <manson@charmed.cygnus.com>
-
- * sparc/cygmon-salib.c (__getProgramArgs): New function.
-
- * sparc/cygmon-crt0.S (init): Call __getProgramArgs.
-
- * configure.in: Added sparc64 configuration.
-
- * configure: Regenerated.
-
-Tue Mar 24 10:44:41 1998 Mark Alexander <marka@cygnus.com>
-
- * mn10300/Makefile.in: Install libraries, not just linker scripts.
-
-Tue Mar 24 09:52:28 1998 Mark Alexander <marka@cygnus.com>
-
- * config/mn10300.mt: New file
- * mn10300/configure.in: Use mn10300.mt as target makefile fragment
- instead of nothing at all.
- * mn10300/configure: Ditto.
-
-Tue Mar 24 16:59:06 1998 Stu Grossman <grossman@bhuna.cygnus.co.uk>
-
- * doc/configure: Regenerate with autoconf 2.12.1 to fix shell
- issues for NT native builds.
-
-Mon Mar 16 18:51:11 1998 Bob Manson <manson@charmed.cygnus.com>
-
- * sparc/cygmon-crt0.S: Make start a global symbol (for the linker
- script; we also need to make SYM(start) global).
-
-Wed Mar 11 10:24:39 1998 Stan Cox <scox@rtl.cygnus.com>
-
- * sparc/cygmon.ld.src (.debug*): Added dwarf sections.
-
-Fri Mar 6 23:41:54 1998 Bob Manson <manson@charmed.cygnus.com>
-
- * sparc/cygmon.ld.src: Use TARGET_RAM_START.
-
- * sparc/Makefile.in (SLITE_RAM_START): Add.
- (SPARC_RAM_START): Add.
- (SPARC64_RAM_START): Add.
- (SLITE_ALL): Add cygmon object files and linker script.
- slite-install: Install CygMon libraries and linker script.
-
-Mon Mar 2 19:36:12 1998 Michael Meissner <meissner@cygnus.com>
-
- * rs6000/ads.ld: Add default attributes to memory region.
- * a29k/{p3dgps,sa29200{,b}}.ld: Ditto.
- * hp74x/hppa.ld: Ditto.
- * m68k/{bcc,idp,mvme{135,162},sbc520{4,6}}.ld: Ditto.
- * pa/{op50n,w89k}.ld: Ditto.
- * sh/{sh1{l,2,3}cevb,sh3bb}.ld: Ditto.
- * sparc/{erc32,ex93{0,1,4}}.ld: Ditto.
-
-Fri Feb 27 17:15:35 1998 Mark Alexander <marka@cygnus.com>
-
- * mn10300/configure.in (AC_INIT): Use crt0.S instead of crt0-eval.S.
-
-Fri Feb 27 17:39:23 1998 Jeffrey A Law (law@cygnus.com)
-
- * configure.in: Use "mn10300" subdir for "mn10300-*-*".
-
-Mon Feb 23 20:29:42 1998 Mark Alexander <marka@cygnus.com>
-
- * mn10300/Makefile.in (GENOBJS): Remove system calls no longer
- supported.
- * mn10300/trap.h: Use generic syscall.h.
- * mn10300/sys/syscall.h: Removed in favor of generic syscall.h.
-
-Mon Feb 23 16:19:17 1998 Gavin Koch <gavin@cygnus.com>
-
- * mips/Makefile.in (cma101.o): Add rule to explicitly use -mno-mips16.
- * mips/cma101.c: Reverse my previous change.
- Add #ifdef __mips16 then #error.
-
-Mon Feb 23 11:29:33 1998 Mark Alexander <marka@cygnus.com>
-
- * mn10300/Makefile.in: Add rules for building libeval.a.
- * mn10300/configure: Don't use default.mt.
- * mn10300/configure.in: Ditto.
- * mn10300/eval.ld: Replace with modified version of default script.
-
- * mn10300/_exit.c: New file for libeval.a.
- * mn10300/access.c: Ditto.
- * mn10300/chmod.c: Ditto.
- * mn10300/chown.c: Ditto.
- * mn10300/close.c: Ditto.
- * mn10300/creat.c: Ditto.
- * mn10300/crt0.S: Ditto.
- * mn10300/crt1.c: Ditto.
- * mn10300/execv.c: Ditto.
- * mn10300/execve.c: Ditto.
- * mn10300/fork.c: Ditto.
- * mn10300/fstat.c: Ditto.
- * mn10300/getpid.c: Ditto.
- * mn10300/gettime.c: Ditto.
- * mn10300/isatty.c: Ditto.
- * mn10300/kill.c: Ditto.
- * mn10300/lseek.c: Ditto.
- * mn10300/open.c: Ditto.
- * mn10300/pipe.c: Ditto.
- * mn10300/read.c: Ditto.
- * mn10300/sbrk.c: Ditto.
- * mn10300/sim.ld: Ditto.
- * mn10300/stat.c: Ditto.
- * mn10300/time.c: Ditto.
- * mn10300/times.c: Ditto.
- * mn10300/trap.S: Ditto.
- * mn10300/trap.h: Ditto.
- * mn10300/unlink.c: Ditto.
- * mn10300/utime.c: Ditto.
- * mn10300/wait.c: Ditto.
- * mn10300/write.c: Ditto.
- * mn10300/sys/syscall.h: Ditto.
-
-Fri Feb 20 17:19:22 1998 Gavin Koch <gavin@cygnus.com>
-
- * mips/cma101.c: #ifdef out whole file if mips16.
-
-Thu Feb 19 13:05:58 1998 Bob Manson <manson@charmed.cygnus.com>
-
- * i960/*: Revised.
-
-Wed Feb 18 12:00:20 1998 Jeff Johnston <jjohnstn@cygnus.com>
-
- * m68k/crt0.S (start): Fixed code that clears .bss. Code
- was using dbra instruction and did not account for the fact
- that the instruction branches until counter is -1, not 0.
-
-Tue Feb 17 18:21:52 1998 Mark Alexander <marka@cygnus.com>
-
- * mn10300/Makefile.in: New file for MN10300 eval board support.
- * mn10300/configure: Ditto.
- * mn10300/configure.in: Ditto.
- * mn10300/crt0-eval.S: Ditto.
- * mn10300/eval.ld: Ditto.
- * mn10300/test.c: Ditto.
-
-Tue Feb 17 19:55:47 1998 Gavin Koch <gavin@cygnus.com>
-
- * mips/vr4300.S (__previous): Fix comment type-o in
- previous change.
-
-Tue Feb 17 10:47:45 1998 Gavin Koch <gavin@cygnus.com>
-
- * mips/vr4300.S (__previous,baseaddr,res_baseaddr):
- Figure the length of the exception handler at runtime
- rather than compile time.
-
-Tue Feb 3 14:07:51 1998 Ian Lance Taylor <ian@cygnus.com>
-
- * configure.in: When running config-ml.in, put --enable-multilib
- before ac_configure_args, so that --disable-multilib can override
- it.
- * configure: Rebuild.
-
-Fri Jan 9 17:10:59 1998 Mark Alexander <marka@cygnus.com>
-
- * mips/Makefile.in (LSIOBJS, DVEOBJS): Add part-specific objects.
-
-Mon Jan 5 17:01:45 1998 Mark Alexander <marka@cygnus.com>
-
- * config/mips.mt: Add rules for read.o and write.o.
- * mips/dvemon.c: New file to support Densan DVE-R3900 board.
- * mips/dve.ld: New file to support Densan DVE-R3900 board.
- * mips/Makefile.in: Add rules for Densan support library libdve.a.
- * mips/configure.in: Build libdve.a for tx39 targets.
- * mips/configure: Ditto.
-
-Tue Dec 30 15:34:17 1997 Bob Manson <manson@charmed.cygnus.com>
-
- * sparc/Makefile.in: Add define for TARGET_CPU_$(CPU).
-
- * sparc/cygmon-salib.c: If TARGET_CPU_SPARC64, include
- sys/types.h, and define _open_r, _close_r, etc.
-
-Sun Dec 28 17:15:50 1997 Bob Manson <manson@charmed.cygnus.com>
-
- * sparc/cygmon-salib.c (_open_r, _close_r): New functions.
- (read, write): If the fd isn't 0, 1, or 2, return an error.
-
-Fri Dec 26 18:45:28 1997 Bob Manson <manson@charmed.cygnus.com>
-
- * sparc/cygmon-salib.c (_sbrk_r, _fstat_r,_brk_r): Define.
-
- * sparc/cygmon-crt0.S: Zero out %fp so backtraces from gdb work
- properly.
-
- * sparc/configure.in: Set CYGMONLDSCRIPTTEMPL appropriately.
-
- * sparc/Makefile.in ($(objdir)/cygmon.ld): Use CYGMONLDSCRIPTTEMPL
- to determine what template file we use.
-
-1997-12-22 Felix Lee <flee@cygnus.com>
-
- * rs6000/sim-errno.c (_cerror): need to return -1.
- * rs6000/sol-cfuncs.c (_cerror): likewise.
-
-Mon Dec 22 16:54:31 1997 Bob Manson <manson@charmed.cygnus.com>
-
- * sparc/cygmon-crt0.S: Add stack bias code if TARGET_CPU_SPARC64 is
- defined. Allocate 128 bytes for a frame if sparc64.
-
- * sparc/cygmon.ld.src: New file, replaced cygmon.ld.
-
- * sparc/Makefile.in (SPARC_OBJ_FORMAT): Added.
- (SPARC64_ALL,SPARC64_INSTALL,SPARC64_OBJ_FORMAT): Added.
- ($(objdir)/cygmon.ld): Create from $(objdir)/cygmon.ld.src.
-
- * sparc/configure.in: Add sparc64 to CPU list.
- * sparc/configure: Regenerated.
- * configure: Regenerated.
-
-Sun Dec 21 18:19:27 1997 Bob Manson <manson@charmed.cygnus.com>
-
- * configure.in: Added sparc64-elf configuration.
-
-Wed Dec 10 19:15:26 1997 Andrew Cagney <cagney@b1.cygnus.com>
-
- * mips/pmon.ld, mips/ddb.ld: Add handling of DWARF
- sections. Copied from mips/idt.ld.
-
-Wed Dec 10 12:31:04 1997 Mark Alexander <marka@cygnus.com>
-
- * mips/configure: Add entry.o to LSI library.
- * mips/configure.in: Ditto.
- * mips/crt0.S: Declare init hooks as .text to avoid linker errors.
- * mips/pmon.S: Don't use 64-bit instructions on 32-bit EABI machines.
- * mips/entry.S: New file (MIPS16 entry/exit exception handler).
-
-Tue Dec 9 18:51:45 1997 Michael Meissner <meissner@cygnus.com>
-
- * d30v/crt0.S (_start): Don't load r1 with 32 anymore. Zero out
- the 3 bss areas.
-
-Fri Nov 28 22:34:14 1997 Bob Manson <manson@charmed.cygnus.com>
-
- * sparc/cygmon-salib.c (open): New syscall.
-
- * sparc/cygmon.ld: Add gcc_except_table section.
-
- * sparc/cygmon-crt0.S: Call __install_signal_handler.
- Run ctors/dtors as appropriate.
-
- * sparc/cygmon-salib.c (gettimeofday): New syscall.
- (stime): Ditto.
- (add_mapping): Ditto.
- (remove_mapping): Ditto.
- (__install_signal_handler): Ditto.
-
-Wed Nov 26 15:25:11 1997 Michael Meissner <meissner@cygnus.com>
-
- * rs6000/mcount.S: New file to in case no profiling module was
- defined.
-
- * rs6000/Makefile.in (OBJS): Add mcount.o
- (mcount.o): Depend on mcount.S.
-
-Mon Nov 24 23:25:07 1997 Bob Manson <manson@charmed.cygnus.com>
-
- * sparc/cygmon.ld: Add linkonce sections.
-
-Mon Nov 24 18:42:55 1997 Michael Meissner <meissner@cygnus.com>
-
- * d30v/syscalls.c (__syscall): Correct setting errno.
-
-Sun Nov 23 17:49:45 1997 Bob Manson <manson@charmed.cygnus.com>
-
- * sparc/Makefile.in: Removed TARGET_CFLAGS.
- * sparc/configure.in: Ditto.
- * sparc/configure: Regenerated.
-
-Fri Nov 21 21:21:23 1997 Michael Meissner <meissner@cygnus.com>
-
- * syscall.h: Remove d30v from comments.
-
- * d30v/syscalls.c: Use common syscall.h file, move setting errno
- into common function, rather than have each stub do it.
-
- * d30v/Makefile.in (syscalls.c): Use common syscall.h, not the old
- d30v specific version.
- (clean): Properly remove libraries.
-
- * d30v/sys/syscall.h: Delete.
-
-Wed Nov 19 16:13:00 1997 Doug Evans <devans@seba.cygnus.com>
-
- * rs6000/Makefile.in (unlink.o): Add rule for.
-
- * syscall.h: New file.
-
-Tue Nov 18 17:22:18 1997 Doug Evans <devans@seba.cygnus.com>
-
- * sparc/asm.h (CONCAT1): Use __USER_LABEL_PREFIX__.
-
- * sparc/Makefile.in: Reorganize file.
-
- * sparc/Makefile.in: Rename all occurences of SIM to ERC32.
- (all): Don't build erc32 support any more (never installed anyway).
- * sparc/erc32-io.c: Renamed from sim-io.c.
- * sparc/erc32-stub.c: Renamed from sim-stub.c.
- * sparc/erc32-crt0.S: Renamed from sim-crt0.S.
- * sparc/erc32.ld: Renamed from sim.ld.
- * sparc/configure.in (AC_INIT): Update.
- * sparc/configure: Regenerate.
-
-Tue Nov 18 13:54:46 1997 Michael Meissner <meissner@cygnus.com>
-
- * d30v/syscalls.c: New file to provide system call stubs.
- * d30v/sys/syscall.h: New file to provide system call numbers.
- * d30v/sim-{exit,read,write}.S: Delete, no longer used.
- * d30v/Makefile.in: Remove old system stubs, and use the new ones
- in syscalls.c.
-
-Tue Nov 18 12:38:37 1997 Michael Meissner <meissner@cygnus.com>
-
- * d30v/sys/syscall.h: Define for d30v system calls.
-
-Mon Nov 17 22:04:04 1997 Bob Manson <manson@charmed.cygnus.com>
-
- * configure.in: Configure the sparc directory for the sparc-elf
- toolchain.
- * configure: Regenerated.
-
- * sparc/Makefile.in: For a generic sparc toolchain, build the cygmon
- crt0 and install the cygmon linker script.
-
- * sparc/asm.h (USER_LABEL_PREFIX): If it's already defined, don't
- redefine it.
-
- * sparc/configure.in: Add LIB_AC_PROG_CC. Add TARGET_CFLAGS
- subst variable.
- * sparc/configure: Regenerated.
-
- * sparc/cygmon.ld: New file.
- * sparc/cygmon-crt0.S: New file.
- * sparc/cygmon-salib.c: New file.
-
-Sun Nov 16 20:22:22 1997 Michael Meissner <meissner@cygnus.com>
-
- * d30v/crt0.S (_start): Set up stack pointer to end of internal
- memory by default.
-
-Tue Nov 11 17:43:06 1997 Michael Meissner <meissner@cygnus.com>
-
- * d30v/Makefile.in (OBJS): Use print.o, not print.c. Add sbrk.o.
-
-Mon Nov 10 13:57:40 1997 Michael Meissner <meissner@cygnus.com>
-
- * configure.in (d30v-*-*): Add configuration.
- * configure: Regenerate.
-
- * d30v/{crt0,sim-{read,write,exit}}.S: Correct typos.
- * d30v/Makefile.in: Ditto.
-
-Sat Nov 8 14:38:57 1997 Michael Meissner <meissner@cygnus.com>
-
- * d30v/crt0.S: New file for d30v port.
- * d30v/configure{,.in}: Ditto.
- * d30v/Makefile.in: Ditto.
- * d30v/{in,out}byte.c: Ditto.
- * d30v/sim-{read,write,exit}.c: Ditto.
-
-Tue Sep 16 15:21:08 1997 Gavin Koch <gavin@cygnus.com>
-
- * mips/Makefile.in (vr4300.o): Reinstate command, it's will
- be necessary until all hosts properly set BSP in configure.in.
-
-Mon Sep 15 16:20:29 1997 Bob Manson <manson@charmed.cygnus.com>
-
- * m68k/*.ld: Add underscore versions of __CTOR_LIST__ and
- __DTOR_LIST__.
-
-Mon Sep 15 12:13:34 1997 Mark Alexander <marka@cygnus.com>
-
- * mips/crt0.S: Declare external functions as .text to
- eliminate linker warnings.
-
-Tue Sep 9 23:35:04 1997 Gavin Koch <gavin@cygnus.com>
-
- * mips/Makefile.in (SCRIPTS): Now is configurable.
- (BSP): Now is configurable.
- (vr4300.o): Remove unnecessary command.
- * mips/configure.in: Configure the newly configuable
- SCRIPTS and BSP.
- * mips/configure: Re-autoconf.
-
-
-Mon Sep 8 16:53:12 1997 Bob Manson <manson@charmed.cygnus.com>
-
- * mips/Makefile.in (pmon.o): Added compile command that includes
- PART_SPECIFIC_DEFINES. Don't include cma101.o by default.
-
- * mips/configure.in (part_specific_defines): New variable
- used when building pmon.o.
- (part_specific_obj): Include cma101.o as well as vr4300.o,
- since it is board-specific in many ways (and relies on
- routines in vr4300.o).
-
-Mon Sep 8 14:42:44 1997 Gavin Koch <gavin@cygnus.com>
-
- * mips/idt.ld: Add handling of DWARF sections.
-
-Sun Sep 7 16:43:05 1997 Gavin Koch <gavin@cygnus.com>
-
- * mips/crt0.S, mips/idtmon.S, mips/vr4300.S: Handle mips16 builds.
-
-Thu Sep 4 19:35:12 1997 Andrew Cagney <cagney@b1.cygnus.com>
-
- * v850/sys/syscall.h: Match with what is in newlib.
-
-Mon Sep 1 12:43:50 1997 Andrew Cagney <cagney@b1.cygnus.com>
-
- * v850/sys/syscall.h: New file.
-
-Thu Aug 28 17:27:16 1997 Stan Shebs <shebs@andros.cygnus.com>
-
- * rs6000/ads.ld: Define ram region.
- (__stack): Fix value.
- * rs6000/crt0.S: Clear the sbss area as well as bss.
-
-Tue Aug 26 16:22:36 1997 Ian Lance Taylor <ian@cygnus.com>
-
- * m68k/bcc.ld: Don't use BLOCK for the section addresses.
- Instead, just force . to be aligned when necessary.
- * m68k/idp.ld, m68k/mvme135.ld, m68k/mvme162.ld: Likewise.
- * m68k/sbc5204.ld, m68k/sbc5206: Likewise.
-
-Fri Aug 8 14:20:16 1997 Michael Meissner <meissner@cygnus.com>
-
- * rs6000/Makefile.in (install-{yellowknife,ads}): The linker
- scripts are in the source directory, not the object directory.
-
-Fri Aug 1 12:21:31 1997 Stan Shebs <shebs@andros.cygnus.com>
-
- * rs6000/ads.ld: New file, linker script for 821/860 ADS board.
- * rs6000/yellowknife.ld: New file, linker script for embedded
- Yellowknife (CHRP/PPCP) box.
- * rs6000/Makefile.in: Add rules for ADS and Yellowknife bits,
- remove references to EVM, don't optimize the test program.
- * rs6000/crt0.S: Renamed from mvme-crt0.S, is generic.
- * rs6000/mvme-stack.S: Removed, unnecessary.
-
-Tue Jun 3 12:54:59 1997 Bob Manson <manson@charmed.cygnus.com>
-
- * mips/crt0.S: Added GCRT0 #ifdef for profiling support.
-
- * mips/Makefile.in (SCRIPTS): Added idtecoff.
- (PCRT0): Added.
-
- * mips/idtecoff.ld: Added. Add crt0.o startup entry.
-
-Fri Apr 18 15:54:11 1997 Doug Evans <dje@canuck.cygnus.com>
-
- * m32r/crt0.S: Remove references to .fillinsn.
-
-Mon Apr 14 16:34:27 1997 Ian Lance Taylor <ian@cygnus.com>
-
- * testsuite/Makefile.in (INSTALL): Change install.sh to
- install-sh.
-
-Wed Apr 9 15:41:39 1997 Mike Meissner <meissner@cygnus.com>
-
- * rs6000/configure.in (AC_PROG_CC): copied from configure.in.
- * rs6000/configure: Regenerate.
-
-
-Sat Mar 29 12:21:08 1997 Bob Manson <manson@charmed.cygnus.com>
-
- * sparc/(ex930.ld,ex931.ld,ex934.ld}: Set __end as well
- as _end and end.
-
-Fri Mar 28 23:01:38 1997 Mark Alexander <marka@cygnus.com>
-
- * mips/lsi.ld: Before setting _gp, use ALIGN(8) instead
- of ALIGN(16). Remove ALIGN from _gp computation.
-
-Mon Mar 17 10:00:29 1997 Gavin Koch <gavin@cygnus.com>
-
- * mips/idtmon.S: Added magic number for _flush_cache slot.
-
-Fri Mar 14 14:36:06 1997 J.T. Conklin <jtc@beauty.cygnus.com>
-
- * m68k/Makefile.in (install): Fix typo.
-
- * m68k/crt0.S: Changed to use correct loop condition for coldfire.
-
-Wed Mar 12 16:00:51 1997 Stu Grossman (grossman@critters.cygnus.com)
-
- * sparc/Makefile.in: Add rules for above.
- (701_OBJS): Add salib-701.o, sparclet-stub.o.
- [Brought over from Nov 5 change in sparclet branch.]
-
- * sparc/salib-701.c (flush_i_cache): Implement cache flushing to fix
- intermittent problems with gdb stub and breakpoints. Fixes pr 11755.
-
-Wed Mar 12 15:49:30 1997 J.T. Conklin <jtc@cygnus.com>
-
- * m68k/sbc5204: Fix GROUP specifier.
- * m68k/sbc5206: Likewise.
-
-Tue Mar 11 13:43:49 1997 J.T. Conklin <jtc@cygnus.com>
-
- * m68k/Makefile.in (all): Fix typo.
-
- * m68k/crt0.S: Use cmpl #0,aX instead of cmpw #0,aX as the latter
- is an invalid instruction on the coldfire.
-
-Fri Mar 7 19:42:50 1997 Mark Alexander <marka@cygnus.com>
-
- * mips/lsi.ld: New file.
- * mips/lsipmon.S: New file.
- * Makefile.in: Add support for LSI variant of PMON (MiniRISC board).
- * pmon.S: Ditto.
-
-Fri Mar 7 10:29:11 1997 Ian Lance Taylor <ian@cygnus.com>
-
- * mips/regs.S (pc): Define.
-
-Thu Mar 6 18:11:57 1997 Bob Manson <manson@charmed.cygnus.com>
-
- * mips/pmon.S (INDIRECT): For a target that uses the 64-bit
- ABI, set up the stack for a 32-bit call before actually calling
- PMON.
-
- * mips/regs.S: K1BASE needs to be a 64-bit value on a machine
- with 64-bit pointers.
-
- * mips/syscalls.c (sbrk): Use size_t instead of unsigned int
- when comparing pointers.
-
-Wed Mar 5 15:44:04 1997 Doug Evans <dje@seba.cygnus.com>
-
- * m32r/crtsysc.c (_sbrk): Change _end decl to __model__ (__medium__).
- * m32r/Makefile.in (m32r-stub.o): Use MULTISRCTOP to find m32r-stub.c.
-
-Tue Mar 4 07:01:44 1997 J.T. Conklin <jtc@cygnus.com>
-
- * m68k/crt0.S: Use cmpw #0,aX instead of tstl aX, as the latter is
- an invalid addressing mode on the 68000 core.
-
-Mon Mar 3 16:38:19 1997 Jim Wilson <wilson@cygnus.com>
-
- * mips/crt0.S: Subtract 24 instead of 8 when computing sp.
-
-Mon Mar 3 13:35:20 1997 Doug Evans <dje@canuck.cygnus.com>
-
- * m32r/m32r-lib.c: New file.
- * m32r/{eva,eva-stub}.ld: New files.
- * m32r/Makefile.in: Build and install them.
- Also build and install m32r-stub.o.
-
-Tue Feb 25 11:59:20 1997 Gavin Koch <gavin@cygnus.com>
-
- * mips/configure.in (LIB_AC_PROG_CC): copied from configure.in.
- * mips/configure.in (AC_PROG_CC): replaced by LIB_AC_PROG_CC
- can't do final link until libs in this directory are built.
- * mips/configure: regenerated.
-
-Tue Feb 25 00:31:27 1997 Ian Lance Taylor <ian@cygnus.com>
-
- * mips/crt0.S: Call hardware_init_hook and software_init_hook via
- a register, to avoid relocation overflow if they are zero.
-
-Mon Feb 24 22:25:49 1997 Gavin Koch <gavin@cygnus.com>
-
- * mips/Makefile.in (IDTOBJS,PMONOBJS): Part specific modules
- can now be configured by part_specific_obj.
- * mips/configure.in (part_specific_obj): added.
- * mips/configure: regenerate.
-
-Fri Feb 21 14:29:54 1997 Doug Evans <dje@canuck.cygnus.com>
-
- * m32r/crtsysc.c (_sbrk): Declare _end with __attribute ((__sym32__)).
-
-Fri Feb 21 10:10:55 1997 Jim Wilson <wilson@cygnus.com>
-
- * mips/ddb.ld: Align the location counter before setting _gp, and
- before setting edata. Remove ALIGN from _gp computation.
- * mips/idt.ld, mips/pmon.ld: Before setting _gp, use ALIGN(8) instead
- of ALIGN(16). Remove ALIGN from _gp computation.
-
-Thu Feb 20 17:30:41 1997 Ian Lance Taylor <ian@cygnus.com>
-
- * mips/array.ld: Add mips16 sections.
- * mips/ddb.ld, mips/idt.ld, mips/pmon.ld: Likewise.
-
- * mips/crt0.S (zerobss): Use subu, not sub.
-
-Tue Feb 18 17:25:56 1997 Mark Alexander <marka@cygnus.com>
-
- * mips/crt0.S: Add .ent lines for all code fragments, so
- that objdump --disassemble will display them correctly.
-
-Fri Feb 14 11:07:20 1997 J.T. Conklin <jtc@cygnus.com>
-
- * m68k/mvme-stub.c: New file. Common debugger stub used for mvme-
- based targets. This should eventually be merged with or replaced
- by the m68k stub from gdb.
- * m68k/{mvme135-stub.c, mvme162lx-stub.c}: Removed.
- * m68k/Makefile.in: Updated for above change.
-
- * m68k/{mvme135-asm.S, mvme162lx-asm.S}: Removed all whitespace
- differences and changed to consistantly use the IMM macro for
- immediate constants. It is now possible to compare these two
- files without having to filter out insignificant differences.
-
- * m68k/mvme135-stub.c (set_debug_traps): Renamed from
- init_debug_traps to match documentation and other sample debugger
- stubs.
-
- * m68k/sbc5204.ld: New file, linker script for Arnewsh SBC5204.
-
- * m68k/sbc5206.ld: New file, linker script for Arnewsh SBC5206.
-
- * m68k/Makefile.in (DBUG_OBJ, DBUG_BSP): New BSP for coldfire
- targets running the dbug monitor.
-
- * m68k/{dbug-exit.S,dbug-inbyte.S,dbug-outbyte.S}: New files.
-
-Thu Feb 6 13:31:06 1997 Bob Manson <manson@charmed.cygnus.com>
-
- * m68k/crt0.S: Don't use SYM to refer to symbols defined
- in the linker script.
-
-Thu Jan 16 10:34:36 1997 Jim Wilson <wilson@cygnus.com>
-
- * mips/{ddb.ld,idt.ld,pmon.ld}: Readd OUTPUT_FORMAT definition.
-
-Wed Jan 8 14:49:26 1997 Jim Wilson <wilson@cygnus.com>
-
- * mips/crt0.S (_start): Don't try to use FPU registers if
- __mips_soft_float is defined.
-
-Fri Dec 27 15:41:08 1996 Bob Manson <manson@charmed.cygnus.com>
-
- * sparc/Makefile.in (splet-install): Add tsc701.ld.
-
-Thu Dec 26 14:59:34 1996 Michael Snyder <msnyder@cleaver.cygnus.com>
-
- * sparc/sparclet-stub.c: Add support for "P" protocol command.
- Add support for %cc coprocessor registers, %asr registers.
- Work-around broken SAVE instruction on sparclet.
-
-Tue Dec 24 22:15:53 1996 Angela Marie Thomas (angela@cygnus.com)
-
- * mips/pmon.S: add an INDIRECT for _flush_cache to be the
- same as mon_flush_cache. This fixes failures in "make check"
-
-Mon Dec 23 18:08:05 1996 Jim Wilson <wilson@cygnus.com>
-
- * mips/syscalls.c (__errno, _raise): Delete.
-
-Wed Dec 18 17:29:28 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * mips/idt.ld: Align the location counter before setting _gp, and
- before setting edata.
- * mips/pmon.ld: Likewise.
-
-Sat Dec 14 21:52:40 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * configure.in: Use a special version of AC_PROG_CC. Autoconf
- 2.12 introduced a check for whether the compiler works, and that
- check will fail for a cross compilers without a complete set of
- libraries.
-
-Fri Dec 13 10:40:14 1996 Rob Savoye <rob@chinadoll.cygnus.com>
-
- * sbrk.c: Set the heap pointer to the address of _end, not the
- value.
-
-Wed Dec 11 15:26:50 1996 Jim Wilson <wilson@cygnus.com>
-
- * mips/{ddb.ld,idt.ld,pmon.ld}: Delete OUTPUT_FORMAT definition.
-
-Fri Dec 6 15:52:36 1996 Jim Wilson <wilson@cygnus.com>
-
- * mips/crt0.S: Delete unreachable instruction after exit call.
- Move exit call before .end _start.
-
-Tue Nov 26 15:05:26 1996 Doug Evans <dje@rtl.cygnus.com>
-
- * configure: Regenerate with autoconf 2.12.
-
-Mon Nov 11 15:12:08 1996 Michael Meissner <meissner@tiktok.cygnus.com>
-
- * config/ppc.mh: New PowerPC eabi target specific config file.
- Always use -mrelocatable-lib -mno-eabi.
-
- * rs6000/configure.in (host_makefile_frag): Use config/ppc.mh.
- * rs6000/configure: Regenerate.
-
- * rs6000/{mvme,sim}-crt0.o (_start): Make initial stack frame 64
- bytes, not 56 so that it is aligned to a 16 byte boundary.
-
-Tue Nov 5 10:24:29 1996 Doug Evans <dje@canuck.cygnus.com>
-
- * sparc/Makefile.in (crt0-701.o): Use default rule to build.
- * sparc/crt0-701.S: Second pass at little endian support.
-
-Tue Nov 5 10:08:40 1996 Dawn Perchik <dawn@critters.cygnus.com>
-
- * sparc/{salib-701.c,sparclet-stub.c,tsc701.ld}: New files.
- * sparc/Makefile.in: Add rules for above.
- (701_OBJS): Add salib-701.o, sparclet-stub.o.
-
-Fri Nov 1 21:50:12 1996 Angela Marie Thomas (angela@cygnus.com)
-
- * mips/ddb.ld: rename cairo.ld to ddb.ld
- * mips/Makefile.in: rename cairo to ddb
-
-Thu Oct 31 13:54:58 1996 Stan Shebs <shebs@andros.cygnus.com>
-
- * sh/sh1lcevb.ld, sh/sh2lcevb.ld, sh/sh3lcevb.ld: New files,
- linker scripts for Hitachi eval boards.
-
-Thu Oct 31 12:39:53 1996 Doug Evans <dje@seba.cygnus.com>
-
- * m32r/crt0.S: Set up fp. Speed up zeroing of bss.
-
-Sun Oct 27 20:34:27 1996 Mark Alexander <marka@cygnus.com>
-
- * mips/crt0.S: Initialize gp register correctly.
-
-Tue Oct 22 12:02:19 1996 Doug Evans <dje@canuck.cygnus.com>
-
- * m32r/sys/syscall.h: New file.
- * m32r/crt0.S: Rewrite.
- * m32r/crtsysc.c (__trap): Adjust literal and comment syntax.
-
-Thu Oct 17 13:47:54 1996 Doug Evans <dje@canuck.cygnus.com>
-
- * m32r/syscalls.c: Deleted, renamed to
- * m32r/crtsysc.c: this.
- * m32r/Makefile.in: Updated.
-
-Mon Sep 30 11:42:08 1996 Doug Evans <dje@canuck.cygnus.com>
-
- * m32r/{Makefile.in,configure.in,configure}: New files.
- * m32r/{crt0.S,syscalls.c,trap.S}: New files.
- * configure.in: Recognize m32r-*-*.
- * configure: Regenerated.
-
-Thu Sep 26 10:59:25 1996 James G. Smith <jsmith@cygnus.co.uk>
-
- * mips/crt0.S (_exit): Update terminating break instruction to use
- an explicit high value.
-
-Mon Sep 23 19:02:32 1996 Stan Shebs <shebs@andros.cygnus.com>
-
- * sh: New directory, Hitachi SH libgloss support.
- * sh/sh3bb.ld: New file, SH3 big box linker script.
-
-Thu Sep 19 12:02:23 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * mips/crt0.S (zerobss): Use bltu in zerobss loop, not bne, in
- case the end symbol is not aligned.
-
-Sun Sep 15 12:23:47 1996 James G. Smith <jsmith@cygnus.co.uk>
-
- * mips/vr4300.S (__cpu_flush): Fix lui constant.
- * mips/crt0.S (init): Fix passing of arg0 through exit() and
- _exit().
- * mips/syscalls.c (__errno): Return address of errno, rather than
- NULL.
-
-Wed Sep 11 10:45:13 1996 Stu Grossman (grossman@critters.cygnus.com)
-
- * m68k/bcc.ls, m68k/idp.ld, m68k/mvme135.ld, m68k/mvme162.ld:
- Merge .init and .fini sections into .text to fix a.out.
-
-Sun Sep 8 09:50:08 1996 Stu Grossman (grossman@critters.cygnus.com)
-
- * m68k/bcc.ls, m68k/idp.ld, m68k/mvme135.ld, m68k/mvme162.ld:
- Many fixes for problems discovered during testing. Make stack end
- at end of ram. Force __CTOR_LIST__ and __DTOR_LIST__ to be
- longword aligned. Move .shdata out of .text section. Put .rodata
- and .gcc_except_table into .text section. Get rid of .shbss
- section, load it into .bss. Remove bogus start address
- calculation for .bss. Force all sections to be longword aligned.
- Create .init and .fini sections (including function prologues and
- epilogues) for ELF support.
- * cpu32bug.S cpu32bug.h: Move defs for cpu32bug monitor into
- cpu32bug.h. Make sure that cpu32bug function codes aren't global.
- Remove creation of vbr_table. Fix function prologue in _exit.
- Use fp instead of a6. Add .text pseudo-op to the beginning of
- each function.
- * crt0.S: Remove global symbols zeroboss, init and launch. Make
- main, exit, hardware_init_hook, software_init_hook, atexit and
- __do_global_dtors extern, not global. Fix logic error when
- initializing stack pointer. It now loads sp if __stack is non-
- zero. Reverse order of software and hardware init hooks.
- Hardware now comes first. Add call to __INIT_SECTION__, and
- register __FINI_SECTION__ with atexit. This is needed to make ELF
- static constructors and destructors work right.
-
-Tue Sep 3 11:55:01 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * m68k/bcc.ld: Set address of .stab and .stabstr to 0, not `.'.
- * m68k/idp.ld, m68k/mvme135.ld, m68k/mvme162.ld: Likewise.
- * hp74x/hppa.c, rs6000/evm.ld, sparc/ex930.ld: Likewise.
- * sparc/ex931.ld, sparc/ex934.ld, sparc/sim.ld: Likewise.
-
-Fri Aug 30 15:57:37 1996 James G. Smith <jsmith@cygnus.co.uk>
-
- * mips/Makefile.in (SCRIPTS): Add cairo.
- (vr4300.o:): Force build with target CFLAGS to ensure correct
- multilib endianness. The -Tcairo.ld target uses libpmon.a aswell
- as the -Tpmon.ld target.
- * mips/{idt.ld,pmon.ld}: Remove explicit crt0.o include.
- * mips/cairo.ld: Added.
- * mips/crt0.S: Restore atexit() call. Fix startup stack
- initialisation.
- * mips/pmon.S: Fix monitor indirection to be 64bit clean.
- * mips/vr4300.s: Added simple bus error handler to cope with
- sizing memory that doesn't ghost, but does abort.
- * mips/cma101.c: Improve the memory sizer.
- * mips/regs.S: Add definitions for SR_KX, SR_SX and SR_UX.
-
-Thu Aug 29 17:07:45 1996 Michael Meissner <meissner@tiktok.cygnus.com>
-
- * a29k/configure.in (i[345]86-*-*): Recognize i686 for pentium
- pro.
- * testsuite/libgloss.all/configure.in (i[345]86-*-*): Ditto.
- * a29k/configure: Regenerate.
-
-Thu Aug 22 10:31:38 1996 Michael Meissner <meissner@tiktok.cygnus.com>
-
- * rs6000/Makefile.in (install{,-linux,-solaris}): Add install of
- Linux, Solaris libraries if built.
-
-Fri Aug 16 10:12:48 1996 Rob Savoye <rob@chinadoll.cygnus.com>
-
- * m68k/Makefile.in: Add -nostdlib to the test targets.
- * m68k/{idp,bcc,mvme135,mvme162}.ld: Move the CTORS and DTORS from
- .data to .text where they really belong.
- * m68k/crt0.S(launch): Don't put __do_global_dtors into atexit,
- GCC is supposed to do this in __main.
-
-Mon Aug 5 15:04:34 1996 Doug Evans <dje@canuck.cygnus.com>
-
- * sparc/libsys/isatty.c: New file.
-
-Sun Aug 4 22:32:14 1996 Rob Savoye <rob@chinadoll.cygnus.com>
-
- * pa/Makefile.in: Build the test case as seperate targets.
- * pa/{w89k,op50n}.ld: Use GROUP rather than INPUT to get all the
- libraries.
-
-Fri Aug 2 18:25:07 1996 J.T. Conklin <jtc@rtl.cygnus.com>
-
- * m68k/Makefile.in: Install common crt0.o, remove old references
- to per-bsp crt0's.
-
-Tue Jul 30 21:48:05 1996 Rob Savoye <rob@chinadoll.cygnus.com>
-
- * sparc/Makefile.in: Built crt0.S, not crto.s.
- * sparc/crt0.S: Don't use REGS macro, use % always.
- * sparc/salib.c: Add a prototype for putDebugChar.
-
-Tue Jul 23 15:12:42 1996 Doug Evans <dje@canuck.cygnus.com>
-
- * sparc/{sysc-701.c,crt0-701.S}: New files.
- * sparc/Makefile.in (all): Build them.
- ($(701_BSP),crt0-701.o): New targets.
- ($(CRT0),$(SIM_CRT0),dtor.o): Don't use $<, for sunos make.
- (all): Depend on $($(CPU)_ALL).
- (install): Use $(INSTALL_DATA), not $(INSTALL_PROGRAM).
- Depend on $($(CPU)_INSTALL).
- * sparc/configure.in (libgloss_topdir): Delete unnecessary $(srcdir).
- (AC_CONFIG_AUX_DIR): Call.
- (CPU): Define.
- * sparc/configure: Regenerated.
-
-Mon Jul 22 14:32:39 1996 Doug Evans <dje@canuck.cygnus.com>
-
- * config/{default.mt,mips.mt}: Don't use $<, for sunos make.
-
-Mon Jul 22 15:54:02 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * m68k/crt0.S (zerobss): Don't use dbra if __mcf5200__.
-
-Sun Jul 14 16:47:14 1996 Michael Meissner <meissner@tiktok.cygnus.com>
-
- * lseek.c (lseek): Don't use SET_ERRNO.
- * open.c (open): Ditto.
-
-Wed Jul 3 18:19:10 1996 Stu Grossman (grossman@critters.cygnus.com)
-
- * sparc/Makefile.in: Install ex930/931/934.ld files.
- * sparc/configure, sparc/configure.in: Use AC_CANONICAL_SYSTEM to
- define target_alias to make install work from this directory.
-
-Wed Jul 3 18:04:49 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * Makefile.in: Make sure we always have an argument to for. Make
- sure rootpre and srcrootpre are always set before using
- FLAGS_TO_PASS.
-
-Tue Jul 2 18:04:31 1996 J.T. Conklin <jtc@hippo.cygnus.com>
-
- * glue.h (SET_ERRNO): Removed.
- * sbrk.c, stat.c, unlink.c: Don't use SET_ERRNO.
-
-Mon Jul 1 14:24:51 1996 Michael Meissner <meissner@tiktok.cygnus.com>
-
- * rs6000/Makefile.in: Add $(srcdir)/.. dependencies for all files
- in the toplevel.
-
-Sat Jun 29 23:26:39 1996 James G. Smith <jsmith@cygnus.co.uk>
-
- * mips/cma101.c (DOSYNC): Explicitly select -mips2 for the
- assembly of the "sync" instruction.
- * mips/Makefile.in: Removed special cma101.o build. Seperate
- install.sh invocations for the BSP libraries.
-
-Sat Jun 29 08:17:52 1996 Michael Meissner <meissner@tiktok.cygnus.com>
-
- * doc/porting.texi (GNU remote protocol): Fix bad texinfo.
-
-Fri Jun 28 23:16:37 1996 Rob Savoye <rob@chinadoll>
-
- * sparc/traps.S: Don't use REGS macro, use % always.
- * sparc/Makefile.in: Add -nostdlib when building the test cases,
- as gcc keeps thinks it wants two crt0.o.
- * sparc/asm.h: Don't define the REGS macro, we'll use explicit
- register prefixes. Always define USER_LABEL_PREFIX cause gcc is
- broken, and I doubt it'll get fixed.
-
-Sat Jun 29 05:05:15 1996 James G. Smith <jsmith@cygnus.co.uk>
-
- * mips/crt0.S (zerobss): Fix the stack-pointer calculation.
-
-Thu Jun 27 17:23:33 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * mips/Makefile.in (vr4300.o): Pass -mips3 after $(ASFLAGS).
- (cma101.o): Pass -mips2 after $(CFLAGS).
-
-Tue Jun 25 22:48:15 1996 Jason Molenda (crash@godzilla.cygnus.co.jp)
-
- * Makefile.in (bindir, libdir): Use autoconf-set values.
- * configure: Rebuilt.
-
- * doc/Makefile.in (mandir, infodir): Use autoconf-set values.
- * doc/configure.in (AC_PREREQ): autoconf 2.5 or higher.
- * doc/configure: Rebuilt.
-
- * {a29k,hp74x,i960,m68k,mips,pa,rs6000,sparc,sparc/libsys}/Makefile.in
- (bindir, libdir): Use autoconf-set values.
- * {a29k,hp74x,i960,m68k,mips,pa,rs6000,sparc,sparc/libsys}/configure.in
- (AC_PREREQ): autoconf 2.5 or higher.
- * {a29k,hp74x,i960,m68k,mips,pa,rs6000,sparc,sparc/libsys}/configure:
- Rebuilt.
-
-Mon Jun 24 22:01:11 1996 Rob Savoye <rob@chinadoll.cygnus.com>
-
- * sparc/crt0.S: Set the stack to the upper part of memory. Execute
- hardware_init_hook and software_init_hook if they exist with a
- legit address. Drop into exit after main. Zero the bss section.
- * sparc/ex930.ld: PROVIDE hardware_init_hook and
- software_init_hook.
-
-Mon Jun 24 19:44:45 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * mips/Makefile.in (cma101.o): Use -mips2 option when compiling.
-
-Wed Jun 19 13:57:36 1996 Rob Savoye <rob@darkstar.cygnus.com>
-
- * debug.[ch]: New files for GDB stub support.
- * config/default.mt: Add rules for debug.o.
- * config/default.mh: Add rule for building C++ source. Add $srcdir
- to INCLUDES so shared header files can be found.
-
- * sparc/salib.c(exceptionHandler): Range check the vector number
- so we get a legit %tbr value. Add wrappers so inbyte and outbyte
- work.
- * sparc/crt0.s: Handle cpus that don't have FP support.
- * sparc/Makefile.in: Add multilib support. Add variable for
- objcopy and objdump. Build the BSPs as archive libraries, not
- object files. Add support for the SIS sparc simulator. Build the
- test case srecords and dissasembly as seperate makefile
- targets. Also optionally build the C++ test case. Use a target
- makefile fragment.
- * sparc/configure.in: Add multilib support.
- * sparc/configure: Regenerated.
- * sparc/asm.h: Macros to deal with aout and coff formats portably.
- * sparc/slite.h: Sparclite specific stuff.
- * sparc/{sim-crt0.S,sim-stub.c,sim-io.c,sim.ld}: New support for
- the SIS sparc simulator.
- * sparc/traps.S: Generic trap handlers for SIS and ex93x targets.
- * sparc/tests.c: Test case for linking and GDB protocol.
-
-Tue Jun 18 20:06:16 1996 Rob Savoye <rob@chinadoll.cygnus.com>
-
- * pa/Makefile.in: Build the test case srecords and dissasembly
- as seperate makefile targets. Also optionally build the C++ test
- case.
- * pa/crt0.S: If __stack and __globals have a legit address, use
- that for %sp and %gp. Execute hardware_init_hook and
- software_init_hook if they exist with a legit address. Add
- __do_global_dtors() to the atexit array.
- * pa/{w89k,op50n}.ld: Use GROUP rather than INPUT to get the
- libraries. Allocate the stack and global spaces from the top of
- memory. PROVIDE hardware_init_hook and software_init_hook.
-
- * m68k/Makefile.in: Build the test case srecords and dissasembly
- as seperate makefile targets. Also optionally build the C++ test
- case.
- * m68k/asm.h: Don't define __USER_LABEL_PREFIX__ and
- __REGISTER_PREFIX__ ourselves since suprisingly gcc sets them
- correctly for a change.
- * m68k/{bcc,mvme135,mvme162,idp}.ld: Use the same crt0 rather than
- building seperate ones. PROVIDE hardware_init_hook and
- software_init_hook. Stick the Constructors and Destructors in
- .data cause they don't work in .text (which is where they should
- really be).
- * m68k/cpu32bug: Add a few more traps to support the older ABug
- monitor.
- * m68k/crt0.S: If __stack is isn't set, set the stack to the top
- of memory. Excecute hardware_init_hook and software_init_hook if
- they exist with a legit address. Add __do_global_dtors() to the
- atexit array.
-
- * rs6000/Makefile.in: Use the linker script to build the test
- case. Also build a C++ test case.
- * rs6000/dtor.C: Test contructors and destructors.
- * rs6000/{sim,mvme}.ld: New linkers scripts for the simulator and
- the mvme board.
- * rs6000/evm.ld: Provide hardware_init_hook and software_init_hook
- so we can test for them in the crt0.S.
- * rs6000/crto.S: Excecute hardware_init_hook and
- software_init_hook if they exist with a legit address.
-
-Mon Jun 17 18:39:17 1996 Rob Savoye <rob@chinadoll.cygnus.com>
-
- * mips/Makefile.in: Replace the "test" target with seperate
- targets for the dissasembled file, and the srecord.
- * mips/configure.in: Use a target makefile fragment.
- * mips/configure: Regenerate.
- * mips/idt.ld: Add a comment on producing srecords. Setup a space
- for the stack. PROVIDE hardware_init_hook and software_init_hook.
- * mips/crt0.S: Make a small stack. Run memsize() using the temp
- stack, and then set the stack to the top of memory. Also grab some
- space for the globals. Add __do_global_dtors() to the atexit
- array. Call _exit from newlib so the atexit array gets run, then
- exits.
-
-Thu Jun 13 15:44:46 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * mips/Makefile.in (vr4300.o): Use -mips3 option when assembling.
-
-Sat Jun 1 16:27:53 1996 Michael Meissner <meissner@wogglebug.tiac.net>
-
- * rs6000/simulator.S (open, close, lseek): Add system calls.
- * rs6000/Makefile.in (OBJS): Don't put open.o, close.o, lseek.o
- here.
- (SIM_OBJS): Put them here instead.
-
-Tue Apr 30 20:01:08 1996 Rob Savoye <rob@chinadoll.cygnus.com>
-
- * m68k/crt0.S: Don't allocate __stack in the .bss section.
- * m68k/{idp,mvme135,mvme162,bcc}.ld: Set __stack to a word below
- the top of memory. Use "-l" in GROUP rather than the full name so
- it'll get found using the path lookup in LD. Also link in libgcc
- too. Don't set __lstack anymore.
- * m68k/Makefile.in: Build test as a series of Makefile targets,
- rather than as a big loop.
-
-Thu Apr 25 08:38:15 1996 Michael Meissner <meissner@tiktok.cygnus.com>
-
- * rs6000/mvme-stack.S: New file, define __stack.
- * rs6000/mvme-crt0.S (_start): If __stack is not 0, use that for
- the stack address.
-
-Thu Apr 25 06:42:02 1996 Rob Savoye <rob@chinadoll.cygnus.com>
-
- * rs6000/Makefile.in: Add support for multilib.
- * rs6000/configure.in: Ditto.
- * rs6000/configure: Regenerate.
-
-Wed Apr 24 11:02:33 1996 Doug Evans <dje@blues.cygnus.com>
-
- * sparc/libsys/Makefile.in (isatty.o): Add rule for SunOS VPATH.
-
-Fri Apr 19 13:23:31 1996 Rob Savoye <rob@chinadoll.cygnus.com>
-
- * {mips,a29k,pa}/configure.in: Add support for multilibs
- by using config-ml.in.
- * {mips,a29k,pa}/configure: Regenerate.
- * {mips,a29k,pa}/Makefile.in: Build archive libraries,
- not objects for the BSPs.
-
-Fri Apr 19 12:33:25 1996 Michael Meissner <meissner@tiktok.cygnus.com>
-
- * rs6000/sol-crt0.c: Delete, file moved into gcc directory.
-
-Mon Apr 15 14:09:26 1996 Michael Meissner <meissner@tiktok.cygnus.com>
-
- * rs6000/simulator.S: Call _cerror to save errno if an error
- occurred.
- * rs6000/sim-errno.c (_cerrno): New function to set errno.
-
-Thu Apr 11 14:19:01 1996 Michael Meissner <meissner@tiktok.cygnus.com>
-
- * rs6000/sol-{crt0.c,syscall.S,cfuncs.c}: New files to support
- libgloss on PowerPC Solaris.
-
- * rs6000/Makefile.in: Add Solaris support.
-
-Tue Apr 16 17:43:06 1996 Rob Savoye <rob@chinadoll.cygnus.com>
-
- * Makefile.in: Don't do anything if SUBDIRS is empty.
-
-Mon Apr 15 15:37:52 1996 Rob Savoye <rob@chinadoll.cygnus.com>
-
- * configure.in, m68k/configure.in: Add support for multilibs by
- using config-ml.in.
- * m68k/crt0.S: If a value for __stack hasn't been specified,
- initialize %sp to some memory in .bss.
- * m68k/Makefile.in: Build archive libraries, not objects for the
- BSPs. Build multiple copies of the crt0.o, one for each target. Add
- support to build multilibs.
- * idp.ld, bcc.ld, mvme135.ld, mvme162.ld: Use GROUP to look for
- libc.a and the BSP rather than INPUT an object. Get the right
- crt0.o.
-
-Tue Apr 9 23:31:53 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * m68k/cpu32bug.S (getDebugChar): Use extw/extl rather than
- extbl, so it can be used on a 68000.
-
-Wed Mar 27 17:18:01 1996 Michael Meissner <meissner@tiktok.cygnus.com>
-
- * rs6000/{mvme-exit,simulator}.S (_exit): Loop on a trap
- instruction following the _exit system call. This also makes sure
- that the debugger reports the address as being in _exit, rather
- than whatever function follows _exit.
-
-Fri Mar 15 12:30:02 1996 J.T. Conklin <jtc@rtl.cygnus.com>
-
- * i960/{Makefile.in,asm.h,configure,configure.in,mon-read.c,
- mon-syscalls.S,mon-write.c}: Initial support for MON960.
- * configure.in: Add support for i960.
- * configure: Rebuild with autoconf 2.8.
-
-Fri Mar 8 18:12:52 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * a29k/configure.in: Call AC_CONFIG_AUX_DIR.
- * a29k/configure: Rebuild with autoconf 2.7.
- * m68k/configure.in: Call AC_CONFIG_AUX_DIR before
- AC_CANONICAL_SYSTEM.
- * mips/configure.in, pa/configure.in: Likewise.
- * rs6000/configure.in: Likewise.
- * m68k/configure, mips/configure, pa/configure: Rebuild.
- * rs6000/configure: Rebuild.
-
-Fri Mar 8 08:11:14 1996 Doug Evans <dje@charmed.cygnus.com>
-
- * sparc/libsys/sbrk.S (curbrk): Moved from here,
- * sparc/libsys/cerror.S (curbrk): To here.
-
-Thu Mar 7 11:39:09 1996 James G. Smith <jsmith@cygnus.co.uk>
-
- * mips/crt0.S (bssloop): Updated comment to reflect the source.
-
-Wed Mar 6 18:12:25 1996 Doug Evans <dje@charmed.cygnus.com>
-
- * configure.in (sparclet-*-aout*): Add entry.
- * configure: Regenerated.
- * sparc/libsys/{Makefile.in,configure.in,configure,isatty.c,
- libsys-crt0.S,sbrk.S,syscall.h,syscallasm.h,template.S,template_r.S}:
- New files.
-
-Fri Feb 23 22:21:07 1996 Rob Savoye <rob@chinadoll.cygnus.com>
-
- * a29k: New dir for a29k-coff support for the AMSAT Phase-3D
- satellite. (doesn't use udi)
- * a29k/{29200-io.c,Makefile.in,configure,configure.in,README,crt0.s,
- p3dgps.ld,sa29200.ld,sa29200b.ld,test.c: New files for a29k
- support.
- * a29k/sys/{cpudef.h,intrinsi.h,macros.h,romdcl.h,sysmac.h,
- fpsymbol.h,libconfig.h,proreg.h,smartmac.h}: New files for a29k
- support.
- * configure.in: Add support for a29k.
- * configure: Rebuild.
-
-Thu Feb 22 13:32:28 1996 Michael Meissner <meissner@tiktok.cygnus.com>
-
- * rs6000/mvme-read.c (read): New file, if large read, do a .INLN
- system call, instead of sucessive .INCHR system calls. Map \r on
- input to \n.
-
- * rs6000/mvme-inbyte.S: Add stub for new input system calls.
-
- * rs6000/Makefile.in (MVME_OBJS): Add mvme-read.o, delete read.o
-
-Wed Feb 21 16:45:19 1996 Michael Meissner <meissner@tiktok.cygnus.com>
-
- * rs6000/mvme-print.c: New file, map write into sequences of
- .OUTLN/.OUTCHR/.PCRLF rather than just using .OUTCHR.
-
- * rs6000/mvme-outbyte.S: Add stubs for new output system calls.
-
- * rs6000/Makefile.in (MVME_OBJS): Add mvme-print.o, delete print.o
- and write.o.
-
-Thu Feb 15 11:37:02 1996 James G. Smith <jsmith@cygnus.co.uk>
-
- * mips/{mipsidt,mipspmon}.ld: Added OUTPUT_ARCH definition.
- * mips/cma101.c (time): Added time() function.
-
-Tue Feb 13 10:36:07 1996 James G. Smith <jsmith@cygnus.co.uk>
-
- * mips/vr4300.S (__cpu_flush): Fix loop counter.
-
-Tue Jan 30 15:41:19 1996 James G. Smith <jsmith@cygnus.co.uk>
-
- * mips/syscalls.c: Used include file, rather than local manifest
- definitions.
- * mips/crt0.S: Removed IDT monitor entry points.
- * mips/Makefile.in: Construct mipsidt and mipspmon BSP files.
- * mips/{cma101.c,idtmon.S,pmon.S,regs.S,vr4300.S}: Added.
- * mips/{mipspmon.ld}: Added.
-
-Sun Jan 28 08:01:31 1996 Michael Meissner <meissner@tiktok.cygnus.com>
-
- * rs6000/configure.in (AC_INIT): Use sim-crt0.S, not crt0.s.
- * rs6000/configure: Regenerate.
-
-Wed Jan 24 14:26:01 1996 Michael Meissner <meissner@tiktok.cygnus.com>
-
- * rs6000/{mvme,sim}-crt0.S (__atexit): Put the __atexit variable
- in the .sdata section, and provide a fixup for the address, in
- order to support the new -msdata compiler flag.
-
-Thu Jan 11 11:24:25 1996 Michael Meissner <meissner@tiktok.cygnus.com>
-
- * rs6000/{mvme,sim}-crt0.S (__atexit): Provide address of atexit,
- so eabi-ctors in libgcc.a can know to register the function to
- call all of the destructors.
-
-Sat Dec 30 14:31:37 1995 Doug Evans <dje@canuck.cygnus.com>
-
- * configure.in (AC_CONFIG_AUX_DIR): Adjust to new build tree layout.
- * {doc,hp74x,m68k,mips,pa,rs6000,sparc}/configure.in
- (AC_CONFIG_AUX_DIR): Define
- * {,doc,hp74x,m68k,mips,pa,rs6000,sparc}/configure: Regenerated.
-
-Mon Dec 11 12:20:24 1995 Ian Lance Taylor <ian@cygnus.com>
-
- * Makefile.in (FLAGS_TO_PASS): Add INSTALL, INSTALL_PROGRAM,
- and INSTALL_DATA.
-
-Fri Dec 1 16:54:15 1995 James G. Smith <jsmith@cygnus.co.uk>
-
- * mips/syscalls.c (sbrk): Fixed memory addressing. System call
- returns size, not (last address + 1).
-
-Thu Nov 16 13:47:57 1995 Ian Lance Taylor <ian@cygnus.com>
-
- * config/default.mh: Don't define CC_FOR_TARGET, AS_FOR_TARGET,
- AR_FOR_TARGET, LD_FOR_TARGET, RANLIB_FOR_TARGET, NM_FOR_TARGET,
- OBJDUMP_FOR_TARGET, or OBJCOPY_FOR_TARGET. Change the build rules
- to use CC, etc., instead of CC_FOR_TARGET, etc.
- * configure.in, */configure.in: Get values for CC, AS, AR, LD, and
- RANLIB. Always use default.mh.
- * Makefile.in (FLAGS_TO_PASS): Pass down LD.
- * Makefile.in, */Makefile.in: Let CC, AS, AR, LD, and RANLIB by
- substituted by the autoconf configure script. Use them instead of
- the *_FOR_TARGET variants.
- * hp74x/configure.in: Don't call AC_CANONICAL_SYSTEM.
- * m68k/configure.in: Call AC_ARG_PROGRAM.
- * mips/configure.in, pa/configure.in: Likewise.
- * rs6000/configure.in: Likewise.
- * m68k/Makefile.in: Set program_transform_name, OBJDUMP, and
- OBJCOPY.
- * mips/Makefile.in, pa/Makefile.in, rs6000/Makefile.in: Likewise.
- * mips/Makefile.in: Split new test target from all target.
- * configure, */configure: Rebuild.
-
-Tue Nov 14 12:04:36 1995 Angela Marie Thomas (angela@cygnus.com)
-
- * Makefile.in: Added prefix, exec-prefix and tooldir to
- FLAGS_TO_PASS so vaulting works correctly.
-
-Tue Nov 14 18:32:41 1995 James G. Smith <jsmith@cygnus.co.uk>
-
- * mips/mipsidt.ld: Added.
- * mips/syscalls.c: Added.
- * mips/crt0.S: Added FPU presence check, and entry points into IDT
- monitor.
- * mips/Makefile.in (all): Updated to build generic IDT monitor
- crt0.o file.
- * mips/test.c (main): Removed unnecessary prototypes.
- * configure.in (configdirs): Removed mips64vr4300 target.
- * configure: Re-generated.
- * config/default.mh (OBJDUMP_FOR_TARGET): Added missing parent
- directory path element.
- * mipsidt: Directory removed.
-
-Fri Nov 10 12:50:03 1995 Ian Lance Taylor <ian@cygnus.com>
-
- * configure.in, */configure.in: Don't call AC_ARG_PROGRAM.
- * configure, */configure: Rebuild.
- * Makefile.in, */Makefile.in: Don't set program_transform_name.
-
-Wed Nov 8 16:19:31 1995 James G. Smith <jsmith@pasanda.cygnus.co.uk>
-
- * configure.in (configdirs): Add mips*vr4300*-*-* target.
-
- * configure: Re-generated.
-
- * mipsidt/crt0.S: Check for FPU presence.
-
- * mipsidt/mipsidt.ld: Removed explicit crt0.o from link.
-
- * mipsidt/Makefile.in: Explicitly link against crt0.o file.
-
-Thu Nov 2 23:27:28 1995 Rob Savoye <rob@chinadoll.cygnus.com>
-
- * config/default.mh: Add additional "../" to path used to find
- comp-tools binaries in an object tree.
-
-Mon Oct 30 18:10:47 1995 Michael Meissner <meissner@tiktok.cygnus.com>
-
- * rs6000/mvme-crt0.S (_start): Zero out bss before the the program
- starts.
-
-Tue Oct 24 10:07:50 1995 Michael Meissner <meissner@tiktok.cygnus.com>
-
- * rs6000/mvme-{exit,outbyte,inbyte}.S: Use hex for the system
- calls, not decimal, since formatting the disk when you intend to
- write out a character is not nice.
-
-Mon Oct 23 22:17:12 1995 Michael Meissner <meissner@tiktok.cygnus.com>
-
- * rs6000/mvme-crt0.S (_start): Bump sp by -4 before storing end of
- stack chain to avoid last word indebugger's memory.
-
- * rs6000/mvme-{exit,inbyte,outbyte}.S: System call number goes in
- r10, not r0.
-
-Mon Oct 23 17:57:23 1995 James G. Smith <jsmith@jaalfrezi.cygnus.co.uk>
-
- * mipsidt/Makefile.in: Removed the LDFLAGS_FOR_TARGET in the test
- program link.
-
- * mipsidt/crt0.S: Changed monitor entry sequence.
-
- * mipsidt/syscalls.c: Added local sbrk() function, derived from
- (libgloss/sbrk.c), but using the monitor routine to ascertain the
- amount of memory available.
-
-Mon Oct 23 11:58:04 1995 James G. Smith <jsmith@pasanda.cygnus.co.uk>
-
- * mipsidt: Added (directory). This is a simple crt0 module for the
- IDT MIPS monitor. The existing "libgloss/mips" directory is for a
- specific R3000 board, so it was safer creating a new target
- directory.
- * mipsidt/Makefile.in: Added.
- * mipsidt/configure: Added.
- * mipsidt/configure.in: Added.
- * mipsidt/crt0.S: Added.
-
- * mipsidt/syscalls.c: Added.
- * mipsidt/test.c: Added.
-
- * configure (mips*vr4300*-*-*): Use new mipsidt target directory.
-
-Mon Oct 9 21:07:08 1995 Michael Meissner <meissner@cygnus.com>
-
- * rs6000/Makefile (all asm rules): Remove asm.h dependency.
- * rs6000/asm.h: File deleted, moved to gcc directory as ppc-asm.h.
- * rs6000/mvme-{crt0,exit,inbyte,outbyte}.S: Include ppc-asm.h, not
- asm.h.
- * rs6000/sim{-crt0,ulator}.S: Ditto.
-
- * rs6000/{mvme,sim}-crt0.S (_start): Don't use FUNC_START/FUNC_END
- for _start, since the linker needs to see this.
-
-Mon Oct 9 12:08:12 1995 Stu Grossman (grossman@cygnus.com)
-
- * sparc/sparc-stub.c: include sparclite.h to get access to register
- fondling macros.
- * (trap_low): Save and restore FP regs if necessary. Also, clean
- up save and restore of debug unit regs.
- * (hard_trap_info): Add more architecturally defined traps.
- * (set_debug_traps): Only set FP disabled trap if FP is disabled.
- * (get_in_break_mode): Clean up. Get rid of calls to
- set_hw_breakpoint_trap(). Also, use write_asi macro
- * (handle_exception): Clean up `g' and `G' commands. Add `P'
- command.
- * (hw_breakpoint): Why was this here!? It's gone now...
- * sparc/crt0.s: Speed up prom copy loop. Clean up window over/under
- flow setup. Call main instead of jumping to it.
- * sparc/salib.c (get_uart_status rcv_char flush_i_cache): Use new
- and improved read_asi macro.
- * (win_ovf win_unf): Parameterize window size.
- * sparclite.h (read_asi): Rewrite so that macro returns an rval.
- * (read_psr write_psr): New macros to do the obvious.
- * Add conditionalized code for 933 window size.
-
-Fri Oct 6 15:35:01 1995 Michael Meissner <meissner@tiktok.cygnus.com>
-
- * rs6000/simulator.S (abort): Delete abort.
- * rs6000/sim-abort.c: New file, to print message that abort was
- called.
- * rs6000/Makefile.in (SIM_OBJS): Add sim-abort.o.
-
- * rs6000/asm.h (FUNC_NAME, FUNC_START, FUNC_END): New macros that
- give the start and end of a function written in assembler. If
- -mcall-aixdesc or -mcall-nt, create a function descriptor and name
- the real function with one or two leading periods.
-
- * rs6000/{simulator,sim-crt0}.S: Use new function macros.
- * rs6000/mvme-{crt0,exit,inbyte,outbyte}.S: Ditto.
-
- * rs6000/Makefile.in: Add asm.h as a dependent for all .S files.
- Compile the .S files with gcc, so that -mcall-* flags define the
- appropriate macros.
-
-Thu Sep 28 13:49:45 1995 Ian Lance Taylor <ian@cygnus.com>
-
- * sparc/ex93x.ld: Remove crt0.o from INPUT; gcc will normally pass
- crt0.o anyhow. Add leading underscore to __CTOR_LIST__, et. al.
- * sparc/salib.c (__main): Comment out empty function.
-
-Wed Sep 20 14:36:12 1995 Ian Lance Taylor <ian@cygnus.com>
-
- * Makefile.in (maintainer-clean): New synonym for realclean.
- * hp74x/Makefile.in (maintainer-clean): Likewise.
- * m68k/Makefile.in (maintainer-clean): Likewise.
- * pa/Makefile.in (maintainer-clean): Likewise.
- * mips/Makefile.in (maintainer-clean): Likewise.
- * rs6000/Makefile.in (maintainer-clean): Likewise.
- * sparc/Makefile.in (maintainer-clean): Likewise.
- * doc/Makefile.in (maintainer-clean): Likewise.
- * testsuite/Makefile.in (maintainer-clean): Likewise.
- * testsuite/libgloss.all/Makefile.in (maintainer-clean): Likewise.
-
-Sat Sep 16 23:04:11 1995 Michael Meissner <meissner@tiktok.cygnus.com>
-
- * rs6000/Makefile.in (all): Fix typo preventing simulator from
- being built.
-
-Tue Sep 12 10:43:41 1995 J.T. Conklin <jtc@rtl.cygnus.com>
-
- * rs6000/Makefile.in: Misc mvme support fixes.
-
- * rs6000/{mvme-exit.S, mvme-inbyte.S, mvme-outbyte.S}: Strip
- leading underscores from identifiers.
-
- * m68k/asm.h: New file, macro definitions helpful for assembly
- language programming.
- * m68k/{cpu32bug.S, crt0.S, mvme.S, mvme135-asm.S, mvme162lx-asm.S}:
- Use asm.h.
-
- * rs6000/{mvme-crt0.S, mvme-exit.S, mvme-inbyte.S, mvme-outbyte.S}:
- New files, preliminary support for motorola mvme targets running
- the ppcbug monitor.
- * rs6000/Makefile.in: Build mvme support.
-
- * rs6000/asm.h: New file, macro definitions helpful for assembly
- language programming.
- * rs6000/{sim-crt0.S, simulator.S}: Use asm.h.
-
-Fri Sep 8 18:51:29 1995 Michael Meissner <meissner@wogglebug.tiac.net>
-
- * rs6000/sim-sbrk.c (sbrk): Add cast to silence warning.
-
-Fri Sep 8 13:03:12 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
-
- * m68k/idp-inbyte.c (READREG): Add volatile to the cast, to avoid
- reordered insns that can end up being an infinite loop.
- * m68k/idp-outbyte.c (READREG): Likewise.
-
-Wed Sep 6 10:01:33 1995 Michael Meissner <meissner@tiktok.cygnus.com>
-
- * rs6000/sim-sbrk.c (sbrk): Use the brk system call, instead of
- using a large static area for the break area.
-
-Thu Aug 24 14:57:28 1995 Michael Meissner <meissner@tiktok.cygnus.com>
-
- * rs6000/Makefile.in (install*): Add separate installation rules
- for sim and evm targets.
-
-Wed Aug 23 16:49:02 1995 Michael Meissner <meissner@tiktok.cygnus.com>
-
- * rs6000/sim*: Add PowerPC simulator support.
-
-Tue Aug 22 11:52:40 1995 Jeff Law (law@snake.cs.utah.edu)
-
- * pa/hp-milli.s: Add entry/exit pseudo-ops around all exported
- code. Fix callinfo directives to include "millicode" attribute.
-
- * pa/hp-milli.s (divU): Fix bug found by arith-rand1.c testing.
-
-Mon Aug 21 23:31:42 1995 Jeff Law (law@snake.cs.utah.edu)
-
- * pa/crt0.S ($START$): Use local label prefix for local label
- "bssloop".
-
-Mon Aug 14 11:57:46 1995 Kung Hsu <kung@mexican.cygnus.com>
-
- * ex93x/sparclite.h: add __WINSIZE.
- * ex93x/salib.c: Use __WINSIZE, implements write with $O command of
- stub protocol.
-
-Thu Aug 3 14:40:12 1995 J.T. Conklin <jtc@rtl.cygnus.com>
-
- * Makefile.in: Updated to reflect filename changes.
-
- * m68k/mc68681-duart.h: Renamed to m68681reg.h.
- * m68k/mc68681-duart.c: Split up and renamed to idp-inbyte.c and
- idp-outbyte.c
-
-Fri Jul 28 11:23:24 1995 J.T. Conklin <jtc@rtl.cygnus.com>
-
- * m68k/mc68681-duart.h: Removed everything except register offsets.
- Changed offsets so they reflect actual chip instead of how device
- is mapped into the IDP address space.
- * m68k/mc68681-duart.c (DUART_ADDR): New macro, base address.
- (READREG, WRITEREG): Changed to correspond to unusual way the
- device is mapped (ie. base address + (reg offset * 4) + 3)).
- (duart_status, duart_mode, duart_init, duart_restore): Removed,
- these interfaces were never used and didn't work.
- (outbyte): Removed unconditional delay.
-
- * m68k/crt0.S: Use SYM(_end) instead of end. This completes my
- change of April 18th which makes the "_end" symbol compatible
- with both a.out and coff toolchains.
- (zerobss): Handle zero-length bss.
-
-Thu Jul 27 15:35:37 1995 J.T. Conklin <jtc@rtl.cygnus.com>
-
- * configure, {doc, hp74x, m68k, mips, pa, sparc}/configure:
- regenerated with autoconf 2.4.2.
-
-Wed Jul 26 13:42:27 1995 J.T. Conklin <jtc@rtl.cygnus.com>
-
- * doc/porting.texi: Fix typos and spelling errors.
-
-Mon Jun 26 09:23:23 1995 Jeffrey A. Law <law@rtl.cygnus.com>
-
- * pa/Makefile.in: Enable HP supplied millicode routines.
- * pa/hp-milli.s: Make sure copyright notice gets included
- in objects files.
-
- * pa/crt0.S ($START$): Use "%" instead of "'" to avoid losing whe
- run through cpp.
-
-Fri Jun 16 18:40:22 1995 Jeffrey A. Law <law@rtl.cygnus.com>
-
- * pa/crt0.S ($START$): Use long-calls to call main and exit.
-
-Tue Jun 13 16:05:13 1995 Rob Savoye <rob@darkstar.cygnus.com>
-
- * pa/crt0.S: Call exit() after returning from main.
-
-Tue Jun 13 10:43:14 1995 J.T. Conklin <jtc@rtl.cygnus.com>
-
- * Makefile.in, {doc, hp74x, m68k, mips, pa, sparc}/Makefile.in
- (distclean, realclean): Remove autoconf-generated config.cache
- and config.log files.
-
-Mon Jun 5 15:56:22 1995 J.T. Conklin <jtc@rtl.cygnus.com>
-
- * config/{default.mh, dos.mh} (CFLAGS_FOR_TARGET): Added -O2.
- (.c.o, .s.o, .S.o, etc.): Don't use @ to hide how the compiler
- is invoked, it makes it much more difficult to debug.
-
-Tue May 30 19:07:59 1995 Rob Savoye <rob@darkstar.cygnus.com>
-
- * testsuite/libgloss.all/math.c: Add additional tests for modulo.
-
-Mon May 29 13:03:39 1995 Rob Savoye <rob@darkstar.cygnus.com>
-
- * stat.c: Add const so it works with newlib's stat.h.
-
-Thu May 25 16:28:42 1995 Rob Savoye <rob@darkstar.cygnus.com>
-
- * m68k/mvme.S: Extend sign using two instructions rather than one
- so it'll work on a stock mc68000.
-
-Tue May 23 18:12:19 1995 Rob Savoye <rob@darkstar.cygnus.com>
-
- * close.c, stat.c, fstat.c, open.c, lseek.c, print.c, putnum.c,
- unlink.c read.c, sbrk.c, getpid.x, kill.c: New files that used to
- be glue.c.
- * {m68k,pa,mips}/Makefile.in: Build using broken up glue.c.
- * pa/Makefile.in: Make all just build BSP, add seperate test
- target.
- * most files: add Cygnus BSD-style copyright message.
-
-Tue May 23 12:58:03 1995 J.T. Conklin <jtc@rtl.cygnus.com>
-
- * configure.in, {hp74x, m68k, mips, pa, sparc}/configure.in:
- Use changequote() to temporarily turn off m4 quoting so that
- i[345]86-*-go32 pattern in case statement remains unchanged.
- * configure, {hp74x, m68k, mips, pa, sparc}/configure:
- regenerated.
-
-Tue May 23 11:15:52 1995 Angela Marie Thomas <angela@cirdan.cygnus.com>
-
- * mips/Makefile.in (SCRIPT): added "SCRIPT = array.ld" so installs
- work correctly.
-
-Mon May 22 21:33:49 1995 Rob Savoye <rob@darkstar.cygnus.com>
-
- * ex93x: renamed to sparc.
- * r3000: renamed to mips.
- * hppro: renamed to pa.
- * configure.in, configure: Use new directory names.
- * config/default.mh: Remove '' in sed program_transform_name so
- it actually works.
- * doc/porting.texi: update doc.
-
-Wed May 17 17:25:53 1995 J.T. Conklin <jtc@rtl.cygnus.com>
-
- * doc/configure.in: converted to autoconf.
- * doc/configure: New file, generated with autoconf 2.3.
-
- * Makefile.in, config/{ex93x, hp74x, hppro, m68k,
- r3000}/Makefile.in (Makefile.in): Added config.status to
- dependency list.
- (config.status): New target.
-
- * m68k/Makefile.in: Build M68332BCC BSP.
-
-Wed May 10 18:43:21 1995 Stu Grossman (grossman@andros.cygnus.com)
-
- * glue.c: Change decl of end to char[] for some reason.
- * (sbrk): Rewrite sbrk so that it works.
- * (fstat): Return status indicating fd is for a tty. Makes stdio
- work better.
- * hppro/crt0.S (_sr4export): Retrieve rp from -24(sp), not
- -18(sp). Note that -24 decimal == -18 hex...
- * hppro/op50n-io.S: Add read and write interfaces to the rom
- monitor. Unfortunately, the monitor doesn't seem to work...
- * hppro/op50n.ld: Clean up lots of stuff. Define memory in a
- nice way. Define stack and reserve space. Put heap after stack.
-
-Thu May 4 10:28:01 1995 J.T. Conklin <jtc@rtl.cygnus.com>
-
- * configure.in (AC_PREREQ): Changed to 2.3, since autoconf
- versions prior to this generate code that AIX 4.X's sh can't
- hack.
-
- * m68k/Makefile.in (BCC_BSP, BCC_OBJS): New BSP for M68332BCC.
- * m68k/cpu32bug.S: New file, support for cpu32bug monitor used by
- bcc.
- * m68k/bcc.ld: Link with bcc.o
-
-Fri Apr 21 16:17:17 1995 Torbjorn Granlund <tege@rtl.cygnus.com>
-
- * hppro/{milli.S,divide.S,divI.S,divU.S,multiply.S,test-div.c,
- test-dyncall.c,test-mul.c,remI.S,remU.S,dyncall.S}: Delete.
- * hppro/divcnst-generic/*: Delete.
- * hppro/divcnst-fast/*: Delete.
- * hppro/Makefile.in: Delete junk.
-
-Tue Apr 18 11:22:47 1995 J.T. Conklin <jtc@rtl.cygnus.com>
-
- * m68k/{bcc.ld idp.ld, mvme135.ld, mvme162lx.ld}: Removed stack
- section, moved __stack definition to the top level and set it
- explicitly to the value appropriate to the target board.
- Added __end symbol (needed for a.out toolchains).
-
-Mon Apr 17 12:48:48 1995 Stu Grossman (grossman@andros.cygnus.com)
-
- * hppro/w89k.ld: Move _stack to before `end' and `_end' so that
- malloc doesn't trash the stack.
- * hppro/w89k-io.c (outbyte): Make this be void, and remove return
- value, which is useless anyway.
-
-Mon Apr 17 06:13:55 1995 J.T. Conklin <jtc@rtl.cygnus.com>
-
- * m68k/bcc.ld: New file, linker script for M68332BCC Business Card
- Computer.
- * m68k/Makefile.in: Install BCC linker script.
-
- * Makefile.in: Fixed typo.
-
- * hppro/configure.in: Changed AC_INIT file from crt0.s to crt0.S.
- * hppro/configure: regenerated.
-
-Mon Apr 17 00:02:15 1995 Stu Grossman (grossman@andros.cygnus.com)
-
- * hppro/op50n.ld: Define _stack explicitly instead of implicitly
- via common.
- * hppro/{w89k-io.c w89k.h}: Use pointers to volatile for inp and
- outp. Use correct port numbers for COM1 serial port.
-
-Fri Apr 14 16:56:35 1995 Ken Raeburn <raeburn@cujo.cygnus.com>
-
- * m68k/mc68ec.c (_exit): Use extended asm construct to get the
- proper immediate-operand syntax for whatever the target assembler
- configuration is.
- * m68k/mvme.S (__IMMEDIATE_PREFIX__, IMM): Copy and use macro
- definitions as in m68k/crt0.S.
-
-Thu Apr 13 16:48:46 1995 Angela Marie Thomas <angela@cirdan.cygnus.com>
-
- * Makefile.in: fixed clean rules such that they do not try to
- clean ${SUBDIRS} if libgloss not supported on that target.
-
-Thu Apr 13 13:39:46 1995 J.T. Conklin <jtc@rtl.cygnus.com>
-
- * configure.in: Append new subdirectories to ${configdirs}.
- (go32-*-*): Removed.
- * configure: Regenerated.
-
- * m68k/mvme162lx.ld: Put __stack in ram, even though it's not
- loaded.
-
- * m68k/Makefile.in: Don't hide how BSP objects are built.
-
- * glue.c (print, putnum): declared void.
-
- * {hppro,m68k}/Makefile.in: Use ${CC_FOR_TARGET} to link executables.
- (LIBS_FOR_TARGET): Removed.
-
- * config/{default.mh, dos.mh} (NEWLIB_CFLAGS, NEWLIB_LDFLAGS): New
- make variables, expands to compiler flags to find headers and
- libraries if ${objroot}/newlib is present.
- (CFLAGS_FOR_TARGET): Added ${NEWLIB_CFLAGS}.
- (LDFLAGS_FOR_TARGET): Added ${NEWLIB_LDFLAGS}.
- (LIBC_FOR_TARGET, LIBM_FOR_TARGET, LIBGCC_FOR_TARGET,
- LIBS_FOR_TARGET): Removed.
-
-Thu Apr 13 11:51:17 1995 Torbjorn Granlund <tege@adder.cygnus.com>
-
- * m68k/Makefile.in (install): Use correct names for MVME* variables.
- * configure.in: Delete `unknown' from m68* case.
-
-Thu Apr 13 11:47:01 1995 J.T. Conklin <jtc@rtl.cygnus.com>
-
- * m68k/crt0.S: initialize stack pointer to __stack before creating
- inital stack frame.
-
- * m68k/{idp.ld, mvme135.ld, mvme162lx.ld}: Move __stack out of
- bss, and into its own segment with an address at top of RAM.
-
-Wed Apr 12 12:36:28 1995 J.T. Conklin <jtc@rtl.cygnus.com>
-
- * {.,ex93x,hp74x,hppro,m68k,r3000}/{Makefile,configure}.in:
- converted to autoconf.
- * {.,ex93x,hp74x,hppro,m68k,r3000}/configure: New files, generated
- from configure.in with autoconf 2.3.
-
-Mon Apr 10 22:50:48 1995 J.T. Conklin (jtc@rtl.cygnus.com)
-
- * m68k/{idp.ld, mvme135.ld, mvme162lx.ld}: Revert last change,
- CONSTRUCTING and RELOCATING only work for linker scripts built
- from ld/scripttmpl/*.
-
- * m68k/{idp.ld, mvme135.ld, mvme162lx.ld}: Changed to use
- CONSTRUCTING and RELOCATING expressions so that the ctor/dtor
- tables and etext, edata, and end variables are only done when
- appropriate.
-
-Fri Apr 7 17:30:35 1995 Stu Grossman (grossman@andros.cygnus.com)
-
- * config/default.mh: Use $${srcroot} instead of ${SRCROOT} to get
- inherited value.
- * hppro/crt0.S: Remove static definitions of _stack and $global$.
- Let the linker script define them in the BSS segment.
- * hppro/w89k.ld: Use MEMORY to define memory regions. Add defs
- for $global$ and _stack in the appropriate segments.
-
-Tue Apr 4 18:27:37 1995 Jason Molenda (phydeaux@cygnus.com)
-
- * Makefile.in (FLAGS_TO_PASS): pass down MAKEINFO.
-
-Thu Mar 30 18:10:53 1995 Kung Hsu <kung@mexican.cygnus.com>
-
- * ex93x/ex93x.ld: Add crt0.o in INPUT.
- * ex93x/sparcl-stub.c: Add nop after bg insn.
- * ex93x/sparc-stub.c: Add & 0x7f mask to all character input.
-
-Thu Mar 30 15:22:31 1995 Rob Savoye <rob@rtl.cygnus.com>
-
- * {hppro,m68k,ex93x,testsuite/libgloss}/configure.in: Add SRCROOT
- variable.
- * {hppro,m68k,ex93x,testsuite/libgloss}/Makefile.in: Add SRCROOT
- variable.
- * config/default.mh: Use SRCROOT to find the newlib includes.
-
-Tue Mar 28 19:54:26 1995 Rob Savoye <rob@darkstar.cygnus.com>
-
- * configure.in, testsuite/configure.in: Add SRCROOT variable.
- * glue.c: Change "char *path" to "const char *path" so it works
- with the changes stat.h.
-
-Fri Mar 24 17:29:08 1995 Kung Hsu <kung@mexican.cygnus.com>
-
- * ex93x/ex93x.ld: The stubs module now can have different names for
- different SPARClite chips. Use default one which is slite930.o.
-
-Mon Mar 20 15:49:46 1995 J.T. Conklin <jtc@rtl.cygnus.com>
-
- * m68k/mc68ec.c (_exit): Changed to take integer status argument.
-
-Fri Mar 17 17:48:42 1995 Kung Hsu <kung@mexican.cygnus.com>
-
- * config/default.h: add -I. to INCLUDES.
- * ex93x/salib.c: to include sparclite.h.
- * ex93x/sparclite.h: new file copied from gdb/sparclite.
-
- * config/default.mh: Fix INCLUDES to one level less '../'.
-
-Mon Mar 13 17:05:35 1995 Rob Savoye <rob@darkstar.cygnus.com>
-
- * testsuite/libgloss.all/misc.c: Misc bug reports, mostly
- soft-float tests.
-
-Wed Mar 8 19:00:18 1995 Rob Savoye <rob@darkstar.cygnus.com>
-
- * m68k/{crt0.S, mvem135.ld, mvme162lx.ld, idp.ld}: Setup the stack
- in the linker script. Use a macro to cover using '#' or '&' for
- immediate values.
- * m68k/{mvme135-asm.S, mvme162lx-asm.S}: Use a macro to cover
- using '#' or '&' for immediate values.
- * testsuite/libgloss.all/io.c: Add a test for read().
-
-Thu Feb 16 21:13:34 1995 Rob Savoye <rob@darkstar.cygnus.com>
-
- * glue.c: Make use _ansi.h, move to top level libgloss directory
- form all other directories.
- * Makefile.in: All Makefiles had SCRIPTS and OBJROOT added.
- * {m68k,hppro,r3000)/Makefile.in: All build the test the same way
- using OBJROOT.
- * configure.in: All configure.in now edit the value to OBJROOT in
- the Makefiles they produce.
- * config/default.mh: Use OBJROOT for paths to test for fresh
- binaries.
- * configure.in: Add the testsuite directory.
- * testsuite/config/{m68k.mt,mips.mt}: New target support for
- MVME135, IDP, and Array targets.
-
-Thu Feb 9 21:45:33 1995 Rob Savoye <rob@darkstar.cygnus.com>
-
- * testsuite/libgloss.all{varargs.c,varargs2.c}: Test cases for
- traditional and ANSI varargs. (which currently fail)
- * Makefile.in: Build intelligently and use dependancies so we
- don't rebuild the world for each test run.
- * configure.in: Make a .gdbinit file to run the tests and load via
- gdb.
-
-Wed Mar 8 22:35:29 1995 Ken Raeburn <raeburn@cujo.cygnus.com>
-
- * m68k/idp.ld: Omit STARTUP line, since crt0.o is being supplied
- by gcc.
-
-Thu Feb 23 12:08:19 1995 Ken Raeburn <raeburn@cujo.cygnus.com>
-
- * m68k/crt0.S: Use '&' instead of '#' for immediate operands.
- * m68k/mc68ec.c: Ditto, in asm statements.
- * m68k/mvme.S: Ditto.
-
-Wed Feb 1 23:55:39 1995 Angela Marie Thomas <angela@cirdan.cygnus.com>
-
- * Makefile.in (all): added "else" statements for Ultrix to work
-
-Fri Jan 27 10:48:20 1995 Rob Savoye <rob@darkstar.cygnus.com>
-
- * testuite/{config,lib,libgloss.all}: DejaGnu testing support.
- * testsuite/config/support.c: A minimal testing API for minimal
- targets.
- * testsuite/config/hppa.mt: Set build flags for PRO targets.
- * libgloss.all/{float.c,memory.c,io.c,double.c,math.c,array.c}:
- Test cases for libgloss and soft-float.
-
- * hppro/{w89k.ld,op50n.ld}: Set .text here now.
-
-Wed Jan 25 21:16:38 1995 Rob Savoye <rob@darkstar.cygnus.com>
-
- * testsuite/{config,lib,libgloss.all}: The beginnings of a test
- suite for low level stuff. A few test cases now all build.
-
-Thu Jan 12 13:02:12 1995 Rob Savoye <rob@darkstar.cygnus.com>
-
- * config/default.mh: Change default path for linking in a freshly
- built libc.a, libm.a, libgcc.a to work with -msift-float.
-
- * hppro/Makefile.in: Set MULTILIB so the -msoft-float safe
- libraries get used.
-
- * m68k/Makefile.in: Use explicit rules, rather than redefining
- .c.o. This is to force compiling with -m68000.
-
-Mon Jan 9 15:28:10 1995 Rob Savoye <rob@darkstar.cygnus.com>
-
- * {hppro,m68k,r3000}/glue.c: Return correct value on receiving a
- '\n' or '\r'.
-
-Fri Dec 30 15:05:03 1994 Rob Savoye <rob@darkstar.cygnus.com>
-
- * doc, doc/Makefile.in, configure.in: New directory.
- * doc/porting.texi: New manual that explains porting the GNU tools
- to embedded systems.
-
-Mon Dec 19 16:05:37 1994 Kung Hsu <kung@mexican.cygnus.com>
-
- * ex93x/Makefile.in: Use sparcl-stub.c instaed of sparc-stub.c,
- which has hardware breakpoint support.
- * ex93x/Makefile.in: Also generate slite930.o and slite931.o, instead
- slite.o.
- * ex93x/sparcl-stub.c: New file.
- * ex93x/sparc-stub.c: Use latest from gdb/sparclite directory.
-
-Fri Dec 16 15:17:14 1994 Rob Savoye <rob@darkstar.cygnus.com>
-
- * r3000/crt0.S: Zero the bss section by words.
-
- * r3000/Makefile.in: Add in the rest of the support code for the
- Array Tech board.
-
- * r3000/array.ld: Set the memory map for the Array Tech LSI
- prototype.
-
- * r3000/array-io.c: Lowest level I/O code for Array Tech LSI
- prototype using ROM entry points.
-
-Wed Dec 14 10:23:41 1994 Rob Savoye <rob@darkstar.cygnus.com>
-
- * hppro/crt0.S: Add _sr4export function so GDB calls work.
-
- * hppro/Makefile.in: Link in libc.a twice so atexit works().
-
- * hppro/glue.c: Don't stub out __main anymore.
-
-Tue Dec 13 15:42:23 1994 Rob Savoye <rob@darkstar.cygnus.com>
-
- * r3000/Makefile.in: Look for both libgcc2 and libgcc.
-
- * r3000/glue.c,crt0.S,test.c: New support for for mips.
-
- * configure.in: Configure r3000 dir for a mips chip.
-
-Tue Dec 6 15:24:41 1994 Rob Savoye <rob@darkstar.cygnus.com>
-
- * hppro/divcnst-generic/*.S. Add .exit and .procend so it'll
- compile.
-
- * hppro/Makefile.in: Link in the rest of the millicode routines.
-
-Mon Nov 21 20:21:48 1994 Rob Savoye <rob@darkstar.cygnus.com>
-
- * hppro/configure.in,config/dos.mh: Work for a canadian cross,
- since xgcc is for the wrong architecture.
-
-Thu Nov 17 21:07:52 1994 Rob Savoye <rob@darkstar.cygnus.com>
-
- * config/default.mh: Find the corrrect libgcc2.a.
-
- * Makefile.in: Link in libgcc2.a by default. Build new millicode
- routines.
-
- * divI.S, divU.S, multiply.S, remI.S, remU.S, test-div.c,
- test-dyncall.c, test-mul.c: New millicode files for low level math
- support.
-
- * test.c: Use printf so millicode gets exercised.
-
- * divcnst-fast/divU_10.S, divU_12.S, divU_3.S, divU_5.S, divU_6.S,
- divU_9.S: Fast versions of some division routines.
-
- * divcnst-generic/divI_14.S, divI_5.S, divI_9.S, divU_14.S
- divU_5.S, divU_9.S divI_10.S, divI_15.S, divI_6.S, divU_10.S,
- divU_15.S, divU_6.S divI_12.S, divI_3.S, divI_7.S, divU_12.S,
- divU_3.S, divU_7.S: Yet more millicode routines.
-
-Wed Nov 16 15:25:03 1994 Rob Savoye (rob@cygnus.com)
-
- * config/default.mh: Add default searches for the correct libc and
- libm.
-
- * Makefile.in: Use ${LIBC_FOR_TARGET} and ${LIBM_FOR_TARGET}
-
- * hppro/w89k.ld,op50n.ld,Makefile.in: Don't try to link in libc
- for the test program.
-
-Tue Nov 8 17:12:35 1994 Rob Savoye <rob@rtl.cygnus.com>
-
- * m68k/glue.c: Remove errno so there's no libc dependancies.
-
- * m68k/mvme135-asm.S: Moved setup_vectors and exceptionHandler
- from mvme.S so the library can link without the stub.
-
- * m68k: New directory. Merge the idp, shared, and mvme135
- directories into one place.
-
- * config/default.mh: Use CC_FOR_TARGET for .S files so the
- preprocessor actually gets run.
-
- * ex93x/crt0.s, ex93x/salib.c: Migrate changes from gdb/sparclite.
-
-Fri Sep 16 21:22:57 1994 Rob Savoye (rob@darkstar.cygnus.com)
-
- * shared, idp, mvme135: Support for Motorola IDP and MVME135 m68k
- based target boards. Moved from newlib/stub.
-
- * ex93x: Move from newlib/stub/ex93x. Sparclite ex93x
- board support.
-
- * hp74x, hppro: Add HP 742 & hp743 code "as is" with a working but
- unfinished gdb stub. Add hppro for the WinBind and Oki Pa target
- boards.
-
- * libgloss: Creation. A library for board support packages. The
- Gnu low-level OS Support. Move mvme135/ChangeLog to here.
-
-Wed Sep 29 20:42:34 1993 Rob Savoye (rob@darkstar.cygnus.com)
-
- * mvme135/crt0.S, mvme135/glue.c: Moved to ../shared.
-
-Thu Apr 1 13:18:15 1993 Ian Lance Taylor (ian@cygnus.com)
-
- * mvme135/mvme.S: Renamed exceptionhandler to exceptionHandler, which is
- what mvme135-stub.c expects.
-
-Tue Mar 30 18:44:43 1993 Doug Evans (dje@poseidon.cygnus.com)
-
- * mvme135/mvme135-stub.c (initializeRemcomErrorFrame): Remove reference to
- __STDC__.
-
-Tue Dec 29 10:15:33 1992 Ian Lance Taylor (ian@cygnus.com)
-
- * mvme135/mvme135-asm.S: new file.
- mvme135-stub.c: moved all assembler routines into mvme135-asm.S.
- Makefile.in: build mvme135-stub.o.
-
- * ChangeLog: created.
+Deprecated. See git log instead.
diff --git a/libgloss/ChangeLog-2015 b/libgloss/ChangeLog-2015
new file mode 100644
index 000000000..5e647694e
--- /dev/null
+++ b/libgloss/ChangeLog-2015
@@ -0,0 +1,7119 @@
+2015-12-17 DJ Delorie <dj@redhat.com>
+
+ * configure.in: Don't build default libnosys for msp430
+ * configure: Regenerate.
+ * msp430/Makefile: Rename libcio to libnosys.
+
+ * msp430/cio.c: Remove, replace with...
+ * msp430/cio.S: New, this.
+
+2015-12-16 Kevin Buettner <kevinb@redhat.com>
+
+ * rl78/write.c (_write): Don't output CR when LF is encountered.
+
+2015-12-04 Nick Clifton <nickc@redhat.com>
+
+ * msp430/msp430xl-sim.ld (__high_bsssize): Define.
+
+2015-11-23 Nick Clifton <nickc@redhat.com>
+
+ * msp430/msp430xl-sim.ld (__high_bsssize): Provide.
+
+2015-11-12 Anton Kolesov <Anton.Kolesov@synopsys.com>
+
+ * configure: Add ARC support.
+ * configure.in: Likewise.
+ * arc/Makefile.in: Likewise.
+ * arc/aclocal.m4: Likewise.
+ * arc/configure: Likewise.
+ * arc/configure.in: Likewise.
+ * arc/crt0.S: Likewise.
+ * arc/libcfunc.c: Likewise.
+ * arc/nsim-syscall.h: Likewise.
+ * arc/nsim-syscalls.c: Likewise.
+ * arc/nsim.specs: Likewise.
+ * arc/sbrk.c: Likewise.
+
+2015-10-20 Kaushik Phatak <kaushik.phatak@kpit.com>
+
+ * rl78/crt0.S (_start): Fixed code that clears .bss
+
+2015-10-06 Nick Clifton <nickc@redhat.com>
+
+ * msp430/msp430-sim.ld: Add .persistent section.
+ Tidy up section layout.
+ Start RAM above hardware multiply registers.
+ * msp430/msp430xl-sim.ld: Likewise.
+
+2015-09-04 James Bowman <james.bowman@ftdichip.com>
+
+ * configure.in: Add ft32 support.
+ * ft32/sbrk.c: New file.
+ * ft32/sim-close.S: Ditto.
+ * ft32/sim-exit.S: Ditto.
+ * ft32/sim-inbyte.c: Ditto.
+ * ft32/sim.ld: Ditto.
+ * ft32/sim-lseek.c: Ditto.
+ * ft32/sim-lseek.S: Ditto.
+ * ft32/sim-open.S: Ditto.
+ * ft32/sim-read.S: Ditto.
+ * ft32/sim-time.c: Ditto.
+ * ft32/sim-unlink.S: Ditto.
+ * ft32/sim-write.S: Ditto.
+ * ft32/stat.c: Ditto.
+ * ft32/configure.in: Ditto.
+ * ft32/crt0.S: Ditto.
+ * ft32/fstat.c: Ditto.
+ * ft32/getpid.c: Ditto.
+ * ft32/isatty.c: Ditto.
+ * ft32/kill.c: Ditto.
+ * ft32/Makefile.in: Ditto.
+
+2015-08-20 Nick Clifton <nickc@redhat.com>
+
+ PR libgloss/18786
+ * msp430/crt0.S: Remove watchdog disabling code.
+
+2015-08-07 Stefan Wallentowitz <stefan.wallentowitz@tum.de>
+
+ * or1k/boards/optimsoc.S: Fix symbol name
+ * or1k/crt0.S: Remove paranthesis
+
+2015-08-07 Stefan Wallentowitz <stefan.wallentowitz@tum.de>
+
+ * or1k/crt0.S: Add exception nesting
+ * or1k/exceptions-asm.S: ditto
+ * or1k/util.c: ditto
+
+2015-08-07 Stefan Wallentowitz <stefan.wallentowitz@tum.de>
+
+ * or1k/sbrk.c: Make heap end globally visible
+
+2015-08-04 Nick Clifton <nickc@redhat.com>
+
+ * rl78/rl78-sim.ld: Provide a value for __rl78_abs__.
+ * rl78/rl78.ld: Likewise.
+
+2015-07-14 Andre Vieira <andre.simoesdiasvieira@arm.com\>
+
+ * arm/elf-nano.specs: Added option to search for system headers in
+ newlib-nano directory.
+
+2015-05-26 Stefan Wallentowitz <stefan.wallentowitz@tum.de>
+
+ * or1k/impure.c: Fix initialization of impure ptr
+
+2015-05-26 Stefan Wallentowitz <stefan.wallentowitz@tum.de>
+
+ * or1k/boards/optimsoc.S: Heap for gzll kernel
+
+2015-05-26 Stefan Wallentowitz <stefan.wallentowitz@tum.de>
+
+ * or1k/sbrk.c: Allow for different heap start
+
+2015-05-26 Stefan Wallentowitz <stefan.wallentowitz@tum.de>
+
+ * or1k/or1k_uart.c: Fix interrupts
+
+2015-05-26 Stefan Wallentowitz <stefan.wallentowitz@tum.de>
+
+ * or1k/timer.c: Properly set interrupt flags
+
+2015-05-26 Stefan Wallentowitz <stefan.wallentowitz@tum.de>
+
+ * or1k/exception-asm.S: Store missing state
+
+2015-05-26 Stefan Wallentowitz <stefan.wallentowitz@tum.de>
+
+ * or1k/crt0.S: Fix exception stack frame
+ * or1k/exception-asm.S: ditto
+
+2015-05-26 Stefan Wallentowitz <stefan.wallentowitz@tum.de>
+
+ * or1k/interruts-asm.S: Change registers to callee-saved.
+
+2015-05-18 Nick Clifton <nickc@redhat.com>
+
+ * msp430/msp430-sim.ld (.stack): Add an assertion to make sure
+ that the data area does not overrun the stack. PROVIDE a new
+ symbol __stack_size to allow the user to set the limit.
+ * msp430/msp430xl-sim.ld (.stack): Likewise.
+ * rl78/rl78-sim.ld (.stack): Likewise.
+ * rl78/rl78.ld (.stack): Likewise.
+ * rx/rx-sim.ld (.stack): Likewise.
+ * rx/rx.ld (.stack): Likewise.
+
+2015-05-05 Nick Clifton <nickc@redhat.com>
+
+ * msp430/msp430.ld: Delete.
+ * msp430/msp430F5438A-l.ld: Delete.
+ * msp430/msp430F5438A-s.ld: Delete.
+ * msp430/crt_movedata.S: Delete.
+
+ * msp430/Makefile.in (SCRIPTS): Remove msp430.ld.
+ (CRT_OBJS): Add crt_move_highdata.o.
+ * msp430/memmodel.h (START_CRT_FUNC): New macro.
+ (END_CRT_FUNC): New macro.
+ (WEAK_DEF): New macro.
+ * msp430/crt0.S: Use new macros.
+ (move_highdata): New code to initialise the .data section if it is
+ held in high memory.
+
+ * msp430/msp430-sim.ld (.data): Add .either.data.
+ (.rodata2): Move some read-only data sections here.
+ (.text): Add .either.text.
+ (.rodata): Add .either.rodata.
+ (.bss): Add .either.bss.
+ * msp430/msp430xl-sim.ld (MEMORY): Add HIROM.
+ (.rodata2): Move some read-only data sections here.
+ (.upper.data): New section. Include notes about how to initialise
+ it.
+
+2015-04-21 Mike Frysinger <vapier@gentoo.org>
+
+ * mcore/syscall.h: New header.
+
+2015-04-21 Mike Frysinger <vapier@gentoo.org>
+
+ * arm/syscall.h: Adjust comment header.
+
+2015-04-09 Nick Clifton <nickc@redhat.com>
+
+ * rx/crt0.S (_start): If string instructions are not allowed,
+ avoid using SMOVF.
+
+2015-04-08 Nick Clifton <nickc@redhat.com>
+
+ * rx/rx.ld: Add .note and DWARF3 sections.
+ * rx/rx-sim.ld: Likewise.
+
+2015-04-07 Nick Clifton <nickc@redhat.com>
+
+ * rl78/rl78.ld (.csstart): Add a KEEP directive.
+ * rl78/rl78-sim.ld (.csstart): Add a KEEP directive.
+
+2015-03-05 Nick Clifton <nickc@redhat.com>
+
+ * v850/sim.ld: Add a .note.renesas section.
+
+2015-02-17 Renlin Li <renlin.li@arm.com>
+
+ * arm/crt0.S: Initialise __heap_limit when ARM_RDI_MONITOR is defined.
+ * arm/syscalls.c: define __heap_limit global symbol.
+ * arm/syscalls.c (_sbrk): Honour __heap_limit.
+
+2015-02-11 Stefan Wallentowitz <stefan.wallentowitz@tum.de>
+
+ * or1k/or1k_uart.c: Write bugfix and cleanup/documentation.
+ * or1k/or1k_uart.h: Cleanup.
+
+2015-01-22 Yaakov Selkowitz <yselkowi@redhat.com>
+
+ * sparc/crt0.S: Declare use of system registers.
+ * sparc/cygmon-crt0.S: Ditto.
+ * sparc/erc32-crt0.S: Ditto.
+ * sparc/traps.S: Ditto.
+
+2015-01-21 Eric Botcazou <ebotcazou@adacore.com>
+
+ * configure.in: Add Visium support.
+ * configure: Regenerate.
+ * visium/: New directory.
+
+2015-01-15 DJ Delorie <dj@redhat.com>
+
+ * rl78/crt0.S: Initialize .saddr. Avoid using SEL.
+ * rl78/rl78-sim.ld: Add .saddr/.frodata section.
+ * rl78/rl78.ld: Likewise.
+ * rl78/rl78-sim.ld: Make room for virtual register banks.
+ * rl78/rl78.ld: Likewise.
+
+ * rl78/vregs.h: New.
+ * rl78-sys.h: Use it.
+ * rl78/swrite.S: New.
+ * rl78/Makefile.in: Build it.
+ * rl78/write.c: Use it.
+
+2015-01-14 Stefan Wallentowitz <stefan.wallentowitz@tum.de>
+
+ * or1k/include/or1k-sprs.h: New auto-generated header file.
+
+2015-01-05 Yaakov Selkowitz <yselkowi@redhat.com>
+
+ * lm32/Makefile.in (install): Respect DESTDIR.
+ (install-scripts): Ditto.
+ * mep/Makefile.in (install): Ditto.
+ * mt/Makefile.in (install): Ditto.
+ * rl78/Makefile.in (install): Ditto.
+
+2014-12-27 Anthony Green <green@moxielogic.com>
+
+ * moxie/crt0.S (_start): sub.l is now sub.
+
+2014-12-15 Stefan Wallentowitz <stefan.wallentowitz@tum.de>
+
+ * or1k/Makefile.in: Build and install board libraries
+ * or1k/board.h: New file
+ * or1k/boards/README: New file
+ * or1k/boards/atlys.S: New file
+ * or1k/boards/de0_nano.S: New file
+ * or1k/boards/ml501.S: New file
+ * or1k/boards/ml509.S: New file
+ * or1k/boards/optimsoc.S: New file
+ * or1k/boards/or1ksim-uart.S: New file
+ * or1k/boards/or1ksim.S: New file
+ * or1k/boards/ordb1a3pe1500.S: New file
+ * or1k/boards/ordb2a.S: New file
+ * or1k/boards/orpsocrefdesign.S: New file
+ * or1k/boards/tmpl.S: New file
+ * or1k/boards/tmpl.c: New file
+
+2014-12-15 Stefan Wallentowitz <stefan.wallentowitz@tum.de>
+
+ * or1k/Makefile.in: Add libor1k
+ * or1k/README: New file
+ * or1k/caches-asm.S: New file
+ * or1k/exceptions-asm.S: New file
+ * or1k/exceptions.c: New file
+ * or1k/impure.c: New file
+ * or1k/include/or1k-nop.h: New file
+ * or1k/include/or1k-support.h: New file
+ * or1k/interrupts-asm.S: New file
+ * or1k/interrupts.c: New file
+ * or1k/mmu-asm.S: New file
+ * or1k/or1k-internals.h: New file
+ * or1k/or1k_uart.c: New file
+ * or1k/or1k_uart.h: New file
+ * or1k/outbyte.S: New file
+ * or1k/sbrk.c: New file
+ * or1k/sync-asm.S: New file
+ * or1k/syscalls.c: New file
+ * or1k/timer.c: New file
+ * or1k/util.c: New file
+
+2014-12-15 Stefan Wallentowitz <stefan.wallentowitz@tum.de>
+
+ * README: Add details about or1k.
+ * configure.in: Add or1k/or1knd
+ * configure: Regenerated.
+ * or1k/aclocal.m4: New file.
+ * or1k/configure: Ditto.
+ * or1k/Makefile.in: New file
+ * or1k/configure.in: New file
+ * or1k/crt0.S: New file
+ * or1k/include/or1k-asm.h: New file
+
+2014-12-15 Nick Hung <nick@andestech.com>
+
+ * libgloss/nds32/_exit.S: Finish with an infinite loop in _exit.
+ * libgloss/nds32/_getpid.S: Don't issue _getpid system call, it is
+ always successful.
+ * libgloss/nds32/_gettimeofday.S: No error for _gettimeofday is defined
+ in SYS_geterr handler.
+ * libgloss/nds32/_isatty.S: No error for _isatty is defined in
+ SYS_geterr handler.
+ * libgloss/nds32/_kill.S: Alway fail. errno = EINVAL.
+ * libgloss/nds32/_link.S: Alway fail. errno = EMLINK.
+ * libgloss/nds32/_times.S: Alway fail. errno = EACCES.
+ * libgloss/nds32/_unlink.S: fix copy and paste error.
+ * libgloss/nds32/crt0.S: Add pre_c_init, post_c_init, arg_init.
+ * libgloss/nds32/crt1.S: Add pre_c_init, post_c_init, arg_init.
+ * libgloss/nds32/syscall_extra.h: Re-format.
+ * libgloss/nds32/vh.h: Add more virtual hosting number.
+
+2014-12-11 Anthony Green <green@moxielogic.com>
+
+ * moxie/configure: Rebuilt.
+
+2014-11-28 Jaydeep Patil <jaydeep.patil@imgtec.com>
+ Matthew Fortune <Matthew.Fortune@imgtec.com>
+
+ * mips/crt0.S: Configure processor based on .MIPS.abiflags.
+ Remove FPU availability check, just use the pre-processor flags
+ to indicicate what the user wanted.
+ * mips/abiflags.S: New file.
+ * mips/regs.S (SR_MSA): Define macro.
+ * mips/mti32.ld: Place .MIPS.abiflags and wrap in marker symbols.
+ * mips/mti64.ld: Likewise.
+ * mips/mti64_64.ld: Likewise.
+ * mips/mti64_n32.ld: Likewise.
+
+2014-11-26 Matthew Fortune <Matthew.Fortune@imgtec.com>
+
+ * mips/crt0.S: Remove .set noreorder throughout.
+ (zerobss): Open code the bltu macro instruction so that the
+ zero-loop does not have a NOP in the branch delay slot.
+
+2014-11-13 Nick Clifton <nickc@redhat.com>
+
+ * msp430/Makefile.in (CRT_OBJS): Add crt_high_bss.o.
+ * msp430/crt0.S (high_bss): Add.
+ * msp430/msp430-sim.ld: Add error message if .upper sections are
+ detected.
+ * msp430/msp430xl-sim.ld (MEMORY): Adjust to better mimic real
+ life MCUs. Add support for upper and lower sections.
+
+2014-10-22 Tim Harder <radhermit@gmail.com>
+
+ * msp430/Makefile.in: Respect DESTDIR during install.
+
+2014-09-22 Peter A. Bigot <pab@pabigot.com>
+
+ * configure.in: Remove config_libnosys=false
+ * configure: Regenerated.
+ * msp430/nosyscalls.S: Rename to ciosyscalls.S
+ * msp430/Makefile.in: Change LIBNOSYS to LIB_CIO.
+
+2014-08-14 Bin Cheng <bin.cheng@arm.com>
+
+ * arm/elf-nano.specs: New file.
+ * arm/elf-rdimon.specs: Support nano.specs.
+ * arm/Makefile.in: Support nano.specs.
+ * libnosys/nosys.specs: Support nano.specs.
+
+2014-07-27 Anthony Green <green@moxielogic.com>
+
+ * moxie/Makefile.in (LD_SCRIPTS): Add moxiebox.ld
+ Conditionally build and install crt0.o.
+ * moxie/configure.in: Don't build crt0.o for moxiebox.
+ * moxie/moxiebox.ld: New file.
+
+2014-07-16 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
+
+ * arm/elf-aprofile-validation.specs (*link): Make text segment
+ 64k-aligned.
+ * arm/elf-aprofile-ve.specs (*link): Likewise.
+
+2014-04-30 Nick Clifton <nickc@redhat.com>
+
+ * msp430/Makefile.in (NOSYS_OBJS): Add unlink.o.
+ (SCRIPTS): Remove msp430F5438A-s.ld and msp430F5438A-s.ld.
+ * unlink.c: New file.
+
+2014-04-04 Ashish Kapania <akapania@ti.com>
+
+ * arm/configure.in: (*-*-tirtos*) Accept TIRTOS target when setting
+ objtype
+ * arm/configure: Regenerated.
+
+2014-03-21 Sabrini Ni <sabrinanitw@gmail.com>
+
+ * nds32/_sbrk.S: Add .size and .type directive.
+
+2014-03-21 Sabrini Ni <sabrinanitw@gmail.com>
+
+ * nds32/crt0.S: Tweak initialization sqeuence.
+ * nds32/crt1.S: Ditto.
+
+2014-03-21 Sabrini Ni <sabrinanitw@gmail.com>
+
+ * nds32/_argv.S: Replace syscall with break.
+ * nds32/_argvlen.S: Ditto.
+ * nds32/_chdir.S: Ditto.
+ * nds32/_chmod.S: Ditto.
+ * nds32/_close.S: Ditto.
+ * nds32/_exit.S: Ditto.
+ * nds32/_fstat.S: Ditto.
+ * nds32/_getpid.S: Ditto.
+ * nds32/_gettimeofday.S: Ditto.
+ * nds32/_isatty.S: Ditto.
+ * nds32/_kill.S: Ditto.
+ * nds32/_link.S: Ditto.
+ * nds32/_lseek.S: Ditto.
+ * nds32/_open.S: Ditto.
+ * nds32/_read.S: Ditto.
+ * nds32/_rename.S: Ditto.
+ * nds32/_stat.S: Ditto.
+ * nds32/_system.S: Ditto.
+ * nds32/_time.S: Ditto.
+ * nds32/_times.S: Ditto.
+ * nds32/_unlink.S: Ditto.
+ * nds32/_utime.S: Ditto.
+ * nds32/_write.S: Ditto.
+ * nds32/syscall_error_handler.S: Ditto.
+ * nds32/vh.h: New.
+
+2014-03-21 Sabrini Ni <sabrinanitw@gmail.com>
+
+ * nds32/crt0.S: Initialize ITB base.
+ * nds32/crt1.S: Ditto.
+
+2014-03-21 Sabrini Ni <sabrinanitw@gmail.com>
+
+ * nds32/Makefile.in: Alter filename.
+ * nds32/syscall_argv.S: Rename to _argv.S
+ * nds32/syscall_argvlen.S: Rename to _argvlen.S
+ * nds32/syscall_chdir.S: Rename to _chdir.S
+ * nds32/syscall_chmod.S: Rename to _chmod.S
+ * nds32/syscall_close.S: Rename to _close.S
+ * nds32/syscall_exit.S: Rename to _exit.S
+ * nds32/syscall_fstat.S: Rename to _fstat.S
+ * nds32/syscall_getpid.S: Rename to _getpid.S
+ * nds32/syscall_gettimeofday.S: Rename to _gettimeofday.S
+ * nds32/syscall_isatty.S: Rename to _isatty.S
+ * nds32/syscall_kill.S: Rename to _kill.S
+ * nds32/syscall_link.S: Rename to _link.S
+ * nds32/syscall_lseek.S: Rename to _lseek.S
+ * nds32/syscall_open.S: Rename to _open.S
+ * nds32/syscall_read.S: Rename to _read.S
+ * nds32/syscall_rename.S: Rename to _rename.S
+ * nds32/syscall_sbrk.S: Rename to _sbrk.S
+ * nds32/syscall_stat.S: Rename to _stat.S
+ * nds32/syscall_system.S: Rename to _system.S
+ * nds32/syscall_time.S: Rename to _time.S
+ * nds32/syscall_times.S: Rename to _times.S
+ * nds32/syscall_unlink.S: Rename to _unlink.S
+ * nds32/syscall_utime.S: Rename to _utime.S
+ * nds32/syscall_write.S: Rename to _write.S
+
+2014-03-21 Sabrini Ni <sabrinanitw@gmail.com>
+
+ * nds32/syscall_argv.S: Correct the method to set errno.
+ * nds32/syscall_argvlen.S: Ditto.
+ * nds32/syscall_chdir.S: Ditto.
+ * nds32/syscall_chmod.S: Ditto.
+ * nds32/syscall_close.S: Ditto.
+ * nds32/syscall_error_handler.S: Ditto.
+ * nds32/syscall_fstat.S: Ditto.
+ * nds32/syscall_getpid.S: Ditto.
+ * nds32/syscall_gettimeofday.S: Ditto.
+ * nds32/syscall_isatty.S: Ditto.
+ * nds32/syscall_kill.S: Ditto.
+ * nds32/syscall_link.S: Ditto.
+ * nds32/syscall_lseek.S: Ditto.
+ * nds32/syscall_open.S: Ditto.
+ * nds32/syscall_read.S: Ditto.
+ * nds32/syscall_rename.S: Ditto.
+ * nds32/syscall_sbrk.S: Ditto.
+ * nds32/syscall_stat.S: Ditto.
+ * nds32/syscall_system.S: Ditto.
+ * nds32/syscall_time.S: Ditto.
+ * nds32/syscall_times.S: Ditto.
+ * nds32/syscall_unlink.S: Ditto.
+ * nds32/syscall_utime.S: Ditto.
+ * nds32/syscall_write.S: Ditto.
+
+2014-03-21 Sabrini Ni <sabrinanitw@gmail.com>
+
+ * nds32/crt0.S: Use pseudo-instruction "bal frame" to replace
+ "la + jral".
+ * nds32/crt1.S: Ditto.
+
+2014-03-21 Sabrini Ni <sabrinanitw@gmail.com>
+
+ * nds32/crt0.S: Eliminate initialization for $fp.
+ * nds32/crt1.S: Ditto.
+
+2014-03-21 Sabrini Ni <sabrinanitw@gmail.com>
+
+ * nds32/crt0.S: Refine.
+ * nds32/crt1.S: Refine.
+
+2014-03-21 Sabrini Ni <sabrinanitw@gmail.com>
+
+ * nds32/crt0.S: Set argc=argv=env=0.
+ * nds32/crt1.S: Ditto.
+
+2014-03-21 Sabrini Ni <sabrinanitw@gmail.com>
+
+ * nds32/Makefile.in: Add syscall_error_handler.o.
+ * nds32/syscall_error_handler.S: New.
+ * nds32/syscall_extra.h: Reduce code size.
+
+2014-03-21 Sabrini Ni <sabrinanitw@gmail.com>
+
+ * nds32/syscall_extra.h: Define macro.
+ * nds32/syscall_argv.S: Use define macro.
+ * nds32/syscall_argvlen.S: Ditto.
+ * nds32/syscall_chdir.S: Ditto.
+ * nds32/syscall_chmod.S: Ditto.
+ * nds32/syscall_close.S: Ditto.
+ * nds32/syscall_fstat.S: Ditto.
+ * nds32/syscall_getpid.S: Ditto.
+ * nds32/syscall_gettimeofday.S: Ditto.
+ * nds32/syscall_isatty.S: Ditto.
+ * nds32/syscall_kill.S: Ditto.
+ * nds32/syscall_link.S: Ditto.
+ * nds32/syscall_lseek.S: Ditto.
+ * nds32/syscall_open.S: Ditto.
+ * nds32/syscall_read.S: Ditto.
+ * nds32/syscall_rename.S: Ditto.
+ * nds32/syscall_stat.S: Ditto.
+ * nds32/syscall_system.S: Ditto.
+ * nds32/syscall_time.S: Ditto.
+ * nds32/syscall_times.S: Ditto.
+ * nds32/syscall_unlink.S: Ditto.
+ * nds32/syscall_utime.S: Ditto.
+ * nds32/syscall_write.S: Ditto.
+
+2014-02-27 Joey Ye <joey.ye@arm.com>
+
+ * libnosys/sbrk.c (_sbrk): Remove TWS
+
+2014-02-11 Joey Ye <joey.ye@arm.com>
+
+ * arm/syscalls.c (_sbrk): Define as weak symbols.
+ (_read, _write): Ditto.
+
+2014-02-03 Richard Earnshaw <rearnsha@arm.com>
+
+ * aarch64/Makefile.in (RDIMON_SCRIPTS): Rule to build in-tree copies
+ of scripts.
+ (all): Build the in-tree copies of the scripts.
+ (clean): Also delete the in-tree copies of the scripts.
+
+2014-01-29 DJ Delorie <dj@redhat.com>
+
+ * msp430/Makefile.in (crt0-minrt.o, crtn-minrt.o): New. Build
+ from crt0.S with -DMINRT.
+ (CRT_OBJS): Expand.
+ (crt_%.o): New rule pattern. Build multiple objects from crt0.S.
+ * msp430/crt0.S: Further break out functionality. Support -DMINRT
+ that omits all init/fini logic.
+ * msp430/crtn.S: Likewise.
+ * msp430/msp430-sim.ld: Wildcard all .crt_* sections, sorted.
+ * msp430/msp430.ld: Likewise.
+ * msp430/msp430xl-sim.ld: Likewise.
+
+2014-01-28 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
+
+ * aarch64/cpu-init/rdimon-aem-el3.S (flat_map): Use bic-immediate
+ form to clear WXN bit.
+
+2014-01-24 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
+
+ * aarch64/cpu-init/rdimon-aem-el3.S (flat_map): Clear WXN bit
+ in SCTLR_EL3. Add dsb.
+
+2014-01-10 Jeff Johnston <jjohnstn@redhat.com>
+
+ * arm/configure.in: Revert previous fix and change host_makefile_frag
+ to calculate the absolute location of srcdir/../config/default.mh.
+ * arm/configure: Regenerated.
+
+2014-01-07 Jeff Johnston <jjohnstn@redhat.com>
+
+ * arm/configure.in: Fix host_makefile_frag to use ac_abs_srcdir.
+ * arm/configure: Regenerated.
+
+2013-12-04 Steve Ellcey <sellcey@mips.com>
+
+ * mips/cfe_api.h: Include stdint.h.
+
+2013-11-21 Daniel Ramirez <javamonn@gmail.com>
+
+ * d30v/syscalls.c, i960/mon960.c, m68k/io-stat.c, mt/stat.c,
+ spu/lstat.c, spu/stat.c: Add restrict keyword.
+
+2013-11-21 Marcus Shawcroft <marcus.shawcroft@arm.com>
+
+ * aarch64/ftruncate.c: Include errno.h.
+ (ftruncate) Set errno.
+ * aarch64/truncate.c: Include errno.h.
+ (truncate) Set errno.
+
+2013-11-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
+
+ * arm/ftruncate.c: Include errno.h.
+ (ftruncate) Set errno.
+ * arm/truncate.c: Include errno.h.
+ (truncate) Set errno.
+
+2013-11-18 Marcus Shawcroft <marcus.shawcroft@arm.com>
+
+ * arm/ftruncate.c: New.
+ * arm/truncate.c: New.
+ * arm/Makefile.in (RDPMON_OBJS): Add ftruncate.o and truncate.o.
+ (rdimon-ftruncate.o, rdimon-truncate.o): New rule:
+
+2013-10-14 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
+
+ * arm/cpu-init/rdimon-aem.S: Disable for M class cores.
+ * arm/crt0.S: Don't call _rdimon_hw_init_hook for non-A class cores.
+ * arm/cpu-init/Makefile.in (CPU_INIT_OBJS): Use CFLAGS.
+
+2013-09-30 Steve Ellcey <sellcey@mips.com>
+
+ * mips/Makefile.in (install): Add mkdir, fix install command.
+
+2013-09-27 Marcus Shawcroft <marcus.shawcroft@arm.com>
+
+ * arm/Makefile.in (RDIMON_SCRIPTS): Add aprofile-validation.specs.
+ * arm/elf-aprofile-validation.specs: New.
+
+2013-09-20 Matthew Gretton-Dann <matthew.gretton-dann@arm.com>
+ Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
+ Greta Yorsh <greta.yorsh@arm.com>
+
+ * arm/Makefile.in: Add support for cpu-init directory and add
+ elf-aprofile-ve.specs.
+ * arm/configure.in: Likewise.
+ * arm/configure: Regenerate.
+ * arm/cpu-init: New directory.
+ * arm/cpu-init/Makefile.in: New file.
+ * arm/cpu-init/rdimon-aem.S: Likewise.
+ * arm/crt0.S: Call _rdimon_init_hook
+ * arm/elf-aprofile-ve.specs: New file.
+
+2013-09-18 Nick Clifton <nickc@redhat.com>
+
+ * msp430/Makefile.in (SCRIPTS): Add intr_vectors.ld.
+ (LIB_CRT): New.
+ (CRT_OBJS): New.
+ (all): Add dependency upon LIB_CRT.
+ (install): Likewise.
+ * msp430/msp430-sim.ld: Include intr_vectors.ld.
+ KEEP crt code, lowtext code and tm_clone_table.
+ Separate the noinit section from the .bss section.
+ Allow for extended .debug_line sections.
+ * msp430/msp430.ld: Likewise.
+ * msp430/msp430F5438A-l.ld: Likewise.
+ * msp430/msp430F5438A-s.ld: Likewise.
+ * msp430/msp430xl-sim.ld: Likewise
+. * msp430/crt_movedata.S: New.
+ * msp430/crt_bss.S: New.
+ * msp430/intr_vectors.ld: New.
+
+2013-09-17 Joey Ye <joey.ye@arm.com>
+
+ * libnosys/Makefile.in: Install nosys.specs.
+ * libnosys/nosys.specs: New specs.
+
+2013-08-12 Yufeng Zhang <Yufeng.Zhang@arm.com>
+
+ * aarch64/crt0.S: Remove 'start'.
+ * arm/crt0.S: Ditto.
+ * arm/redboot-crt0.S: Ditto.
+
+2013-07-24 Steve Ellcey <sellcey@mips.com>
+
+ * mips/idtmon.S (unlink, lseek, stat): Add new functions.
+
+2013-07-23 Nagaraju Mekala <nagaraju.mekala@xilinx.com>
+
+ * microblaze/_exception_handler.S: Adjust to be weak.
+
+2013-07-23 Edgar E. Iglesias <edgar.iglesias@xilinx.com>
+
+ * microblaze/Makefile.in: Add LINUX_BSP.
+ * microblaze/elf-gloss-linux.ld: New file.
+ * microblaze/elf-gloss-linux.specs: Likewise.
+ * microblaze/linux-crt0.S: Likewise.
+ * microblaze/linux-inbyte.c: Likewise.
+ * microblaze/linux-outbyte.c: Likewise.
+ * microblaze/linux-syscalls-wrap.c: Likewise.
+ * microblaze/linux-syscalls.S: Likewise.
+ * microblaze/linux-syscalls.h: Likewise.
+
+2013-07-17 Yaakov Selkowitz <yselkowitz@users.sourceforge.net>
+
+ * lm32/configure: Regenerate.
+ * moxie/configure: Ditto.
+ * spu/configure: Ditto.
+
+2013-07-16 David Holsgrove <david.holsgrove@xilinx.com>
+
+ * microblaze/Makefile.in: Add GENOBJS and target_makefile_frag.
+ * microblaze/configure.in: Add target_makefile_frag.
+ * microblaze/configure: Regenerate.
+ * microblaze/xil_printf.c: Add new file.
+
+2013-07-16 David Holsgrove <david.holsgrove@xilinx.com>
+
+ * configure.in: Change to microblaze*.
+ * configure: Regenerate.
+ * microblaze/xilinx.ld: Remove OUTPUT_FORMAT.
+
+2013-07-12 Marcus Shawcroft <marcus.shawcroft@arm.com>
+
+ * aarch64/cpu-init/rdimon-aem-el3.S (vectors): Page align.
+
+2013-07-09 Sabrina Ni <sabrina@andestech.com>
+
+ * configure.in: Add nds32 subdir.
+ * configure: Regenerated.
+ * nds32/configure.in: New.
+ * nds32/configure: New (autogenerated).
+ * nds32/{crt0.S,crt1.S}: New.
+ * nds32/Makefile.in: New.
+ * nds32/{syscall_argvlen.S,syscall_argv.S,
+ syscall_chdirS, syscall_chmod.S,
+ syscall_close.S,syscall_exit.S,syscall_extra.h, syscall_fstat.S,
+ syscall_getpid.S,syscall_gettimeofday.S,syscall_isatty.S,syscall_kill.S,
+ syscall_link.S,syscall_lseek.S,syscall_open.S,syscall_read.S,
+ syscall_rename.S,syscall_sbrk.S,syscall_stat.S,syscall_system.S,
+ syscall_time.S,syscall_times.S,syscall_unlink.S,syscall_utime.S,
+ syscall_write.S}: New.
+
+2013-07-04 Yufeng Zhang <Yufeng.Zhang@arm.com>
+
+ * aarch64/syscalls.c (stack_ptr): Defined with asm ("wsp") if __ILP32__
+ is defined.
+
+2013-07-02 Joey Ye <joey.ye@arm.com>
+
+ * arm/crt0.S (_mainCRTStartup): Weak reference to atexit and _fini
+ when lite exit is enabled.
+
+2013-06-28 Yufeng Zhang <Yufeng.Zhang@arm.com>
+
+ * aarch64/syscalls.c (POINTER_TO_PARAM_BLOCK_T): New macro.
+ (initialise_monitor_handles): Replace cast with macro
+ POINTER_TO_PARAM_BLOCK_T.
+ (_swiread): Likewise.
+ (_swiwrite): Likewise.
+ (_swiopen): Likewise.
+ (_unlink): Likewise.
+ (_system): Likewise.
+ (_rename): Likewise.
+
+2013-06-25 Yufeng Zhang <Yufeng.Zhang@arm.com>
+
+ * aarch64/crt0.S (GEN_DWORD): New macro definition.
+ (PTR_REG): Ditto.
+ (PTR_SIZE): Ditto.
+ (PTR_LOG_SIZE): Ditto.
+ (start): Use GEN_DWORD to replace the .dword of HeapBase,
+ __bss_start__, __bss_end__, FUNCTION(_fini), env and
+ CommandLine; when __ILP32__ is defined, set the stack base to
+ the top end of the 32-bit address space if the returned value
+ from the Angel API call is larger than or equal to 4 GiB.
+ Also carry out sanity check on the heap base; abort if the
+ base is larger than or equal to 4 GiB. Use other new
+ macros in the instructions that processes the argv arrays.
+ (StackBase): New lable; replace __stack_base__.
+ (__stack_base__): Set with StackBase or StackBase + 4.
+
+2013-05-30 Jeff Johnston <jjohnstn@redhat.com>
+
+ * rs6000/Makefile.in: Add sim-times support. This file has been
+ moved from newlib/libc/machine/powerpc and renamed.
+ * rs6000/sim-times.c: New file.
+
+2013-05-14 DJ Delorie <dj@redhat.com>
+ Nick Clifton <nickc@redhat.com>
+
+ * configure.in (msp430*-*-elf): Add.
+ * configure: Regenerate.
+ * msp430: New directory.
+
+2013-04-19 Steve Ellcey <sellcey@imgtec.com>
+
+ * mips/cfe_api.h (int64_t): Remove define.
+ (uint64_t): Remove define.
+ (intptr_t): Remove define.
+ (uintptr_t): Remove define.
+ (sys/types.h): Remove include.
+ (_ansi.h): Remove include.
+
+2013-04-19 Yufeng Zhang <yufeng.zhang@arm.com>
+
+ * aarch64/Makefile.in (rdimon-crt0.o, rdimon-trap.o)
+ (rdimon-_exit.o, rdimon-_kill.o, rdimon-syscalls.o)
+ (rdimon-libcfunc.o): Add $(CFLAGS) to the compiler command line.
+ * aarch64/cpu-init/Makefile.in (${CPU_INIT_OBJS}): Add $(CFLAGS)
+ to the compiler command line.
+
+2013-02-10 Peter Marheine <peter@taricorp.net>
+
+ * libgloss/rx/Makefile.in: Respect DESTDIR when installing
+
+2013-02-04 Greta Yorsh <greta.yorsh@arm.com>
+
+ * arm/elf-rdimon.specs (-lrdimon): Change link to lib.
+
+2013-02-01 Nick Clifton <nickc@redhat.com>
+
+ * v850/crt0.S: Add recognition of the e3v5
+ architecture variant.
+
+2013-01-18 Marcus Shawcroft <marcus.shawcroft@arm.com>
+
+ * aarch64/Machine.in (RDIMON_SCRIPTS):
+ Add aem-ve.specs and aem-validation.specs.
+ * aarch64/elf-aem-validation.specs: New file.
+ * aarch64/elf-aem-ve.specs: New file.
+
+2013-01-15 Nick Clifton <nickc@redhat.com>
+
+ * v850/crt0.S (_start): Enable FPU for the V850e2v3.
+
+2012-12-17 Stuart Henderson <shenders@gcc.gnu.org>
+
+ * bfin/Makefile.in: Add BF60x support.
+ * bfin/basiccrt.S: Add core1 support.
+ * bfin/bf606.ld: New file.
+ * bfin/bf606c0.ld: New file.
+ * bfin/bf606c1.ld: New file.
+ * bfin/bf606m.ld: New file.
+ * bfin/bf607.ld: New file.
+ * bfin/bf607c0.ld: New file.
+ * bfin/bf607c1.ld: New file.
+ * bfin/bf607m.ld: New file.
+ * bfin/bf608.ld: New file.
+ * bfin/bf608c0.ld: New file.
+ * bfin/bf608c1.ld: New file.
+ * bfin/bf608m.ld: New file.
+ * bfin/bf609.ld: New file.
+ * bfin/bf609c0.ld: New file.
+ * bfin/bf609c1.ld: New file.
+ * bfin/bf609m.ld: New file.
+ * bfin/bfin-common-mc0.ld: New file.
+ * bfin/include/cdefBF606.h : New file.
+ * bfin/include/cdefBF607.h : New file.
+ * bfin/include/cdefBF608.h : New file.
+ * bfin/include/cdefBF609.h : New file.
+ * bfin/include/defBF606.h : New file.
+ * bfin/include/defBF607.h : New file.
+ * bfin/include/defBF608.h : New file.
+ * bfin/include/defBF609.h : New file.
+ * bfin/include/sys/_adi_platform.h: Add BF60x support.
+ * bfin/include/sys/anomaly_macros_rtl.h : Clean up.
+
+2012-11-23 Yufeng Zhang <yufeng.zhang@arm.com>
+
+ * aarch64/configure.in: Replace the direct generation of
+ cpu-init/Makefile.in with AC_CONFIG_SUBDIRS(cpu-init).
+ * aarch64/configure: Re-generate.
+ * aarch64/cpu-init/Makefile.in (objtype): Remove.
+ (Makefile, config.status): Update the rules.
+ * aarch64/cpu-init/aclocal.m4: New file (generated).
+ * aarch64/cpu-init/configure.in: New file.
+ * aarch64/cpu-init/configure: New file (generated).
+
+2012-10-27 Anthony Green <green@moxielogic.com>
+
+ * moxie/sim-unlink.S (unlink): Loop forever.
+ moxie/sim-time.S (_sim_time): Ditto.
+
+2012-10-27 Anthony Green <green@moxielogic.com>
+
+ * moxie/crt0.S (_start): Call memset with correct
+ ABI.
+
+2012-10-03 DJ Delorie <dj@redhat.com>
+
+ * rl78/crt0.S (_interrupt_vector_table): Convert from CPP macros
+ to GAS macros, to avoid dependence on the line separation
+ character.
+
+2012-10-01 DJ Delorie <dj@redhat.com>
+
+ * v850/sbrk.c (_sbrk): Change heap_start to be an array of
+ undefined size, to avoid problems when compiled with -msda=4.
+
+2012-09-26 Ian Bolton <ian.bolton@arm.com>
+ Jim MacArthur <jim.macarthur@arm.com>
+ Marcus Shawcroft <marcus.shawcroft@arm.com>
+ Nigel Stephens <nigel.stephens@arm.com>
+ Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
+ Richard Earnshaw <rearnsha@arm.com>
+ Sofiane Naci <sofiane.naci@arm.com>
+ Tejas Belagod <tejas.belagod@arm.com>
+ Yufeng Zhang <yufeng.zhang@arm.com>
+
+ * aarch64/Makefile.in: New file.
+ * aarch64/_exit.c: New file.
+ * aarch64/_kill.c: New file.
+ * aarch64/aclocal.m4: Generated.
+ * aarch64/configure: Generated.
+ * aarch64/configure.in: New file.
+ * aarch64/cpu-init/Makefile.in: New file.
+ * aarch64/cpu-init/rdimon-aem-el3.S: New file.
+ * aarch64/crt0.S: New file.
+ * aarch64/elf-rdimon.specs: New file.
+ * aarch64/libcfunc.c: New file.
+ * aarch64/svc.h: New file.
+ * aarch64/syscalls.c: New file.
+ * configure.in: Add AArch64.
+ * configure: Re-generated.
+
+2012-09-13 Anthony Green <green@moxielogic.com>
+
+ * moxie/moxie-elf-common.ld: Add bi-endian support.
+
+2012-08-30 DJ Delorie <dj@redhat.com>
+
+ * rx/rx.ld: Add W_* sections to .rodata.
+ * rx/rx-sim.ld: Likewise.
+
+2012-08-30 Kaushik Phatak <kaushik.phatak@kpitcummins.com>
+
+ * cr16/sys/syscall.h: New file.
+
+2012-05-02 Greta Yorsh <Greta.Yorsh@arm.com>
+
+ * arm/redboot-crt0.S (__change_mode): Replace mov with movs.
+
+2012-03-23 Mike Frysinger <vapier@gentoo.org>
+
+ * cris/Makefile.in (install-lin): Add $(DESTDIR) before ${tooldir}.
+
+2012-03-12 Mike Frysinger <vapier@gentoo.org>
+
+ * libnosys/Makefile.in (NEWLIB_CFLAGS, NEWLIB_LDFLAGS,
+ INCLUDES, CFLAGS_FOR_TARGET, LDFLAGS_FOR_TARGET,
+ AR_FLAGS, .c.o, .C.o, .s.o, .S.o, .c.s): Delete and replace
+ with @host_makefile_frag@.
+
+2012-03-12 Mike Frysinger <vapier@gentoo.org>
+
+ * config/default.mh (AR_FLAGS): Set to rc.
+
+2012-03-09 Jeff Johnston <jjohnstn@redhat.com>
+
+ * epiphany/access.c: Add modification rights to clause as
+ permitted by DJ Delorie.
+ * iq2000/access.c: Ditto.
+ * mn10200/access.c: Ditto.
+ * mn10300/access.c: Ditto.
+ * mt/access.c: Ditto.
+ * v850/access.c: Ditto.
+
+2012-03-02 Bin Cheng <bin.cheng@arm.com>
+
+ * configure.in: Accept "arm*" target spec instead of just "arm".
+ * configure: Regenerated.
+ * libnosys/configure.in: Likewise.
+ (libc_symbol_prefix): Renamed to libc_cv_symbol_prefix.
+ * libnosys/configure: Regenerated (using autoconf v2.68).
+
+2012-02-21 Jeremy Bennett <jeremy.bennett@embecosm.com>
+ Alan Lehotsky <apl@alum.mit.edu>
+ Joern Rennecke <joern.rennecke@embecosm.com>
+
+ * configure.in: Add Epiphany support.
+ * configure: Regenerate.
+ * epiphany: New directory.
+ * libgloss/README: Add Epiphany entry.
+
+2012-01-23 Stuart Henderson <stuart.henderson@analog.com>
+
+ * bfin/_exit.c: New file.
+ * bfin/Makefile.in (BOARD_OBJS): Add _exit.o.
+
+2012-01-17 Bin Cheng <bin.cheng@arm.com>
+
+ * arm/linux-crt0.c: Use ldr instead of adr to get address of
+ _start_thumb.
+
+2011-12-18 Steve Kilbane <stephen.kilbane@analog.com>
+
+ * bfin/clear_cache_range.c: New file.
+ * bfin/Makefile.in (SIM_OBJS): Add clear_cache_range.o.
+ (BOARD_OBJS): Likewise.
+ (BOARD_BSP): Set to libbfinbsp.a.
+ (${BOARD_BSP}): New rule.
+
+2011-12-15 Konrad Eisele <konrad@gaisler.com>
+
+ * configure.in: Add SPARC LEON support.
+ * configure: Regenerated.
+ * sparc_leon/asm-leon/amba.h, sparc_leon/asm-leon/asmmacro.h,
+ sparc_leon/asm-leon/clock.h, sparc_leon/asm-leon/contextswitch.h,
+ sparc_leon/asm-leon/elfmacro.h, sparc_leon/asm-leon/head.h,
+ sparc_leon/asm-leon/irq.h, sparc_leon/asm-leon/jiffies.h,
+ sparc_leon/asm-leon/lambapp.h, sparc_leon/asm-leon/lambapp_devs.h,
+ sparc_leon/asm-leon/leon.h, sparc_leon/asm-leon/leon3.h,
+ sparc_leon/asm-leon/leonbare_debug.h, sparc_leon/asm-leon/leonbare_kernel.h,
+ sparc_leon/asm-leon/leonbare_kernel_queue.h, sparc_leon/asm-leon/leoncompat.h,
+ sparc_leon/asm-leon/leondbg.h, sparc_leon/asm-leon/leonstack.h,
+ sparc_leon/asm-leon/liblocks.h, sparc_leon/asm-leon/linkage.h,
+ sparc_leon/asm-leon/param.h, sparc_leon/asm-leon/queue.h,
+ sparc_leon/asm-leon/spinlock.h, sparc_leon/asm-leon/stack.h,
+ sparc_leon/asm-leon/time.h, sparc_leon/asm-leon/timer.h,
+ sparc_leon/asm-leon/types.h, sparc_leon/asm-leon/winmacros.h:
+ New file.
+ * sparc_leon/Makefile.in, sparc_leon/_exit.c,
+ sparc_leon/amba.c, sparc_leon/amba_dbg.c,
+ sparc_leon/amba_driver.c, sparc_leon/amba_scan.c,
+ sparc_leon/asm-leon, sparc_leon/bdinit.S,
+ sparc_leon/busscan.S, sparc_leon/cacheA.S,
+ sparc_leon/catch_interrupt.c, sparc_leon/catch_interrupt_mvt.c,
+ sparc_leon/catch_interrupt_pending.c, sparc_leon/catch_interrupt_svt.c,
+ sparc_leon/configure.in,
+ sparc_leon/console.c, sparc_leon/console_dbg.c,
+ sparc_leon/console_init.c, sparc_leon/contextswitch.c,
+ sparc_leon/contextswitch_asm.S, sparc_leon/crt0.S,
+ sparc_leon/crti.S, sparc_leon/crtn.S,
+ sparc_leon/etrap.S, sparc_leon/etrap_fast.S,
+ sparc_leon/fpu.S, sparc_leon/gettimeofday.c,
+ sparc_leon/initcalls.c, sparc_leon/io.c,
+ sparc_leon/irqinstall.S, sparc_leon/irqtrap.S,
+ sparc_leon/irqtrap_fast.S, sparc_leon/jiffies.c,
+ sparc_leon/kernel.c, sparc_leon/kernel_context.S,
+ sparc_leon/kernel_debug.c, sparc_leon/kernel_debug_var.c,
+ sparc_leon/kernel_mm.c, sparc_leon/kernel_mutex.c,
+ sparc_leon/kernel_queue.c, sparc_leon/kernel_sched.c,
+ sparc_leon/kernel_thread.c, sparc_leon/lcpuinit.S,
+ sparc_leon/locore.S, sparc_leon/locore_atexit.c,
+ sparc_leon/locore_clean.S, sparc_leon/locore_mvt.S,
+ sparc_leon/locore_mvt_reset.S, sparc_leon/locore_svt.S,
+ sparc_leon/locore_svt_reset.S, sparc_leon/locore_svtdisp.S,
+ sparc_leon/locore_var.S, sparc_leon/locore_var_svt.S,
+ sparc_leon/mmu_asm.S, sparc_leon/mutex.c,
+ sparc_leon/nocache.S, sparc_leon/pnpinit.c,
+ sparc_leon/pnpinit_malloc.c, sparc_leon/pnpinit_simple.c,
+ sparc_leon/regwin.S, sparc_leon/regwin_patch.c,
+ sparc_leon/regwin_slow.S, sparc_leon/regwinflush.S,
+ sparc_leon/rtc.c, sparc_leon/rtrap.S,
+ sparc_leon/rtrap_fast.S, sparc_leon/stop.S,
+ sparc_leon/timer.c, sparc_leon/times.c:
+ New file
+ * sparc_leon/configure: Regenerate
+
+2011-12-13 Richard Earnshaw <rearnsha@arm.com>
+ Thomas Klein <th.r.klein@web.de>
+
+ * arm/crt0.S: Manually set the target architecture
+ when compiling for Thumb1 on EABI targets.
+ Avoid v6-only Thumb-1 MOV instruction.
+
+2011-11-28 DJ Delorie <dj@redhat.com>
+
+ * configure.in: Add rl78.
+ * configure: Regenerate.
+ * rl78: New directory
+
+2011-11-08 Mike Frysinger <vapier@gentoo.org>
+
+ * libnosys/Makefile.in (install): Use INSTALL_DATA.
+
+2011-10-07 Nick Clifton <nickc@redhat.com>
+
+ * rx/crt0.S: Initialise the PID address register.
+ (__pid_base): Define weakly.
+
+2011-09-29 Matthew Gretton-Dann <matthew.gretton-dann@arm.com>
+
+ * arm/crt0.s: Support 0 heap base response from HeapInfo syscall.
+
+2011-09-29 Bin Cheng <bin.cheng@arm.com>
+
+ * arm/arm.h (HAVE_CALL_INDIRECT): Define.
+ * arm/crt0.S (indirect_call): New macro. Encodes indirect
+ function calls. Does not use blx for pre-armv5 targets.
+
+2011-08-19 Nick Clifton <nickc@redhat.com>
+
+ * iq2000/sim.ld (.gcc_except_table): Include .gcc_except_table.foo
+ sections as well.
+
+2011-08-08 Mike Stump <mikestump@comcast.net>
+
+ * Makefile.in: Make stmp-bsp and install consistent with
+ subdir_do target with regards to error handling.
+
+2011-07-13 Bin Cheng <bin.cheng@arm.com>
+
+ * arm/crt0.S: Support armv6-m processors in libgloss.
+ * arm/swi.h: Likewise.
+ * arm/trap.S: Likewise.
+ * arm/redboot-crt0.S: Likewise.
+ * arm/linux-crt0.c: Likewise.
+ * arm/arm.h: New.
+
+2011-07-01 Mike Frysinger <vapier@gentoo.org>
+
+ * bfin/syscalls.c (_getpid): Call do_syscall with func argument n and
+ return the result.
+ (_fstat): Delete stub body. Add block array and assign file/st to it.
+ Call do_syscall with result.
+ (_stat): Delete stub body. Add block array and assign fname/st to
+ it. Call do_syscall with result.
+ (_link): Change func arguments to accept two strings. Add block array
+ and assign existing/new to it. Call do_syscall with result.
+ (_unlink): Change func arguments to accept a string. Call do_syscall
+ with new argument.
+
+2011-07-01 Mike Frysinger <vapier@gentoo.org>
+
+ * bfin/syscalls.c (_lseek): Change 3rd arg name to whence. Increase
+ block array to 3 elements. Set 3rd element to whence.
+
+2011-06-29 Jeff Johnston <jjohnstn@redhat.com>
+
+ * arm/Makefile.in: Add $CFLAGS to compile commands for specified .o targets.
+
+2011-06-22 Mike Frysinger <vapier@gentoo.org>
+
+ * bfin/syscalls.c (do_syscall): Delete local variable definitions.
+ Declare result, result2, errcode local ints. Delete asm inputs
+ and outputs. Set output constraints to q0/result, q1/result2, and
+ q2/errcode. Set input constraints to qA/reason and q0/arg. Set
+ errno to errcode.
+
+2011-06-21 Mike Frysinger <vapier@gentoo.org>
+
+ * bfin/syscalls.c: Trim trailing whitespace.
+ * bfin/crt0.S: Likewise.
+
+2011-06-14 Joseph Myers <joseph@codesourcery.com>
+
+ * configure.in: Don't handle strongarm, ep9312 and xscale target
+ names.
+ * configure: Regenerate.
+ * libnosys/configure.in: Don't handle strongarm and thumb target
+ names.
+ * libnosys/configure: Regenerate.
+
+2011-05-27 Nick Clifton <nickc@redhat.com>
+
+ * v8500/sbrk.c (_sbrk): Tidy code.
+ Base start of heap on the "heap_start" symbol.
+
+2011-03-26 Mike Frysinger <vapier@gentoo.org>
+
+ * bfin/include/builtins.h (__builtin_raise): Change constraint to n.
+ (__builtin_excpt): Likewise.
+
+2011-03-26 Mike Frysinger <vapier@gentoo.org>
+
+ * bfin/Makefile.in (install-sim): Exit when install fails.
+ (install-board): Likewise.
+
+2011-03-24 Nick Clifton <nickc@redhat.com>
+
+ * xstormy16/crt0.s (_hwint): Fix .size directive.
+
+ * frv/crt0.S (__frv_fix_usrptrs): Fix .size directive.
+
+2011-03-21 Kevin Buettner <kevinb@redhat.com>
+
+ * v850/sys/syscall.h (SYS_rename): Define.
+
+2011-01-10 Mike Frysinger <vapier@gentoo.org>
+
+ * Makefile.in (stmp-bsp): Exit when subdirs fail.
+ (install): Likewise.
+
+2010-12-02 Jayant Sonar jayant.sonar@kpitcummins.com
+ Kaushik Phatak kaushik.phatak@kpitcummins.com
+
+ * configure.in: Add CR16 support.
+ * configure: Regenerated.
+ * cr16/aclocal.m4: New.
+ * cr16/close.c: New.
+ * cr16/configure: New.
+ * cr16/configure.in: New.
+ * cr16/crt1.S: New.
+ * cr16/crti.S: New.
+ * cr16/crtn.S: New.
+ * cr16/dvz_hndl.c: New.
+ * cr16/_exit.c: New.
+ * cr16/flg_hndl.c: New.
+ * cr16/fstat.c: New.
+ * cr16/_getenv.c: New.
+ * cr16/getpid.c: New.
+ * cr16/iad_hndl.c: New.
+ * cr16/intable.c: New.
+ * cr16/isatty.c: New.
+ * cr16/kill.c: New.
+ * cr16/lseek.c: New.
+ * cr16/Makefile.in: New.
+ * cr16/open.c: New.
+ * cr16/putnum.c: New.
+ * cr16/read.c: New.
+ * cr16/_rename.c: New.
+ * cr16/sbrk.c: New.
+ * cr16/sim.ld: New.
+ * cr16/stat.c: New.
+ * cr16/svc_hndl.c: New.
+ * cr16/time.c: New.
+ * cr16/und_hndl.c: New.
+ * cr16/unlink.c: New.
+ * cr16/write.c: New.
+
+2010-11-17 Bernd Schmidt <bernds@codesourcery.com>
+
+ * tic6x/syscalls.c (cio_getclk_to_host, cio_getclk_from_host): New
+ structs.
+ (cio_to_host, cio_from_host): Use them.
+ (clock): New function.
+
+2010-10-17 Mike Frysinger <vapier@gentoo.org>
+
+ * bfin/include/blackfin.h, bfin/include/builtins.h,
+ bfin/include/ccblkfn.h, bfin/include/cdefBF512.h,
+ bfin/include/cdefBF514.h, bfin/include/cdefBF516.h,
+ bfin/include/cdefBF518.h, bfin/include/cdefBF51x_base.h,
+ bfin/include/cdefBF522.h, bfin/include/cdefBF523.h,
+ bfin/include/cdefBF524.h, bfin/include/cdefBF525.h,
+ bfin/include/cdefBF526.h, bfin/include/cdefBF527.h,
+ bfin/include/cdefBF52x_base.h, bfin/include/cdefBF531.h,
+ bfin/include/cdefBF532.h, bfin/include/cdefBF533.h,
+ bfin/include/cdefBF534.h, bfin/include/cdefBF535.h,
+ bfin/include/cdefBF536.h, bfin/include/cdefBF537.h,
+ bfin/include/cdefBF538.h, bfin/include/cdefBF539.h,
+ bfin/include/cdefBF53x.h, bfin/include/cdefBF542.h,
+ bfin/include/cdefBF542M.h, bfin/include/cdefBF544.h,
+ bfin/include/cdefBF544M.h, bfin/include/cdefBF547.h,
+ bfin/include/cdefBF547M.h, bfin/include/cdefBF548.h,
+ bfin/include/cdefBF548M.h, bfin/include/cdefBF549.h,
+ bfin/include/cdefBF549M.h, bfin/include/cdefBF54x_base.h,
+ bfin/include/cdefBF561.h, bfin/include/cdef_LPBlackfin.h,
+ bfin/include/cdefblackfin.h, bfin/include/cplb.h,
+ bfin/include/cplbtab.h, bfin/include/defBF512.h,
+ bfin/include/defBF514.h, bfin/include/defBF516.h,
+ bfin/include/defBF518.h, bfin/include/defBF51x_base.h,
+ bfin/include/defBF522.h, bfin/include/defBF523.h,
+ bfin/include/defBF524.h, bfin/include/defBF525.h,
+ bfin/include/defBF526.h, bfin/include/defBF527.h,
+ bfin/include/defBF52x_base.h, bfin/include/defBF531.h,
+ bfin/include/defBF532.h, bfin/include/defBF533.h,
+ bfin/include/defBF534.h, bfin/include/defBF535.h,
+ bfin/include/defBF536.h, bfin/include/defBF537.h,
+ bfin/include/defBF538.h, bfin/include/defBF539.h,
+ bfin/include/defBF542.h, bfin/include/defBF542M.h,
+ bfin/include/defBF544.h, bfin/include/defBF544M.h,
+ bfin/include/defBF547.h, bfin/include/defBF547M.h,
+ bfin/include/defBF548.h, bfin/include/defBF548M.h,
+ bfin/include/defBF549.h, bfin/include/defBF549M.h,
+ bfin/include/defBF54x_base.h, bfin/include/defBF561.h,
+ bfin/include/defblackfin.h, bfin/include/sysreg.h,
+ bfin/include/sys/anomaly_macros_rtl.h, bfin/include/sys/excause.h,
+ bfin/include/sys/exception.h, bfin/include/sys/mc_typedef.h,
+ bfin/include/sys/platform.h, bfin/include/sys/pll.h:
+ Update to Visual DSP 5.0 Update 8.
+
+2010-10-16 Mike Frysinger <vapier@gentoo.org>
+
+ * bfin/Makefile.in (BOARD_SCRIPTS): Add bf592.ld.
+ * bfin/bf592: New linker scripts.
+ * bfin/include/cdefBF592-A.h, bfin/include/cdefBF59x_base.h,
+ bfin/include/defBF592-A.h, bfin/include/defBF59x_base.h: New files.
+ * bfin/include/sys/_adi_platform.h: Include new bf592 headers.
+
+2010-10-15 Mike Frysinger <vapier@gentoo.org>
+
+ * bfin/Makefile.in (BOARD_SCRIPTS): Add bf504.ld and bf506.ld.
+ * bfin/bf504.ld, bfin/bf506.ld: New linker scripts.
+ * bfin/include/cdefBF504.h, bfin/include/cdefBF504F.h,
+ bfin/include/cdefBF506F.h, bfin/include/cdefBF50x_base.h,
+ bfin/include/defBF504.h, bfin/include/defBF504F.h,
+ bfin/include/defBF506F.h, bfin/include/defBF50x_base.h: New files.
+ * bfin/include/def_LPBlackfin.h: Add DMC_P for __ADSPBF50x__.
+ * bfin/include/sys/_adi_platform.h: Include new bf50x headers.
+
+2010-10-15 Stuart Henderson <stuart.henderson@analog.com>
+
+ * bfin/bfin-common-mc.ld: Add .l1.data and .l1.text input sections.
+ * bfin/bfin-common-sc.ld: Likewise.
+
+2010-10-15 Mike Frysinger <vapier@gentoo.org>
+
+ * bfin/include/sys/_adi_platform.h: Remove __ADSPBF541__.
+ * bfin/include/cdefBF541.h, bfin/include/defBF541.h: Punt.
+
+2010-10-08 Bernd Schmidt <bernds@codesourcery.com>
+ Joseph Myers <joseph@codesourcery.com>
+
+ * configure.in: Handle tic6x targets.
+ * configure: Regenerate.
+ * tic6x/Makefile.in, tic6x/configure.in, tic6x/crt0.S,
+ tic6x/getpid.c, tic6x/kill.c, tic6x/sbrk.c, tic6x/syscalls.c: New.
+ * tic6x/configure: New (generated).
+
+2010-10-02 Anthony Green <green@moxielogic.com>
+
+ * moxie/Makefile.in (QEMU_OBJS): Add missing object files to the
+ qemu support library.
+
+2010-10-02 Anthony Green <green@moxielogic.com>
+
+ * moxie/crt0.S (_start): Minor optimizations to __start.
+
+2010-09-23 Mike Frysinger <vapier@gentoo.org>
+ Corinna Vinschen <vinschen@redhat.com>
+
+ * doc/porting.texi: Fix typos.
+
+2010-09-22 Mike Frysinger <vapier@gentoo.org>
+
+ * README: Add bfin to the list.
+
+2010-08-27 Christophe Lyon <christophe.lyon@st.com>
+
+ * syscalls.c (_isatty): Fix return value.
+
+2010-07-23 Naveen.H.S <naveenh1@kpitcummins.com>
+ Gina Verlekar <gina.verlekar@kpitcummins.com>
+
+ Moving files from newlib/libc/sys/sysnecv850 to v850
+
+ * libnosys/configure: Regenerated.
+ * libnosys/configure.in: Compact v850 support to v850*-*-*.
+ * libnosys/configure: Regenerated.
+ * configure.in: Add libgloss support for v850.
+ * configure: Regenerated.
+ * v850/access.c: New file.
+ * v850/aclocal.m4: New.
+ * v850/chmod.c: New.
+ * v850/chown.c: New.
+ * v850/close.c: New.
+ * v850/configure: New.
+ * v850/configure.in: New.
+ * v850/crt0.S: New.
+ * v850/crt1.c: New.
+ * v850/execv.c: New.
+ * v850/execve.c: New.
+ * v850/_exit.c: New.
+ * v850/fork.c: New.
+ * v850/fstat.c: New.
+ * v850/getpid.c: New.
+ * v850/gettime.c: New.
+ * v850/isatty.c: New.
+ * v850/kill.c: New.
+ * v850/link.c: New.
+ * v850/lseek.c: New.
+ * v850/Makefile.in: New.
+ * v850/open.c: New.
+ * v850/pipe.c: New.
+ * v850/read.c: New.
+ * v850/sbrk.c: New.
+ * v850/sim.ld: New.
+ * v850/stat.c: New.
+ * v850/time.c: New.
+ * v850/times.c: New.
+ * v850/trap.S: New.
+ * v850/unlink.c: New.
+ * v850/utime.c: New.
+ * v850/wait.c: New.
+ * v850/write.c: New.
+
+2010-07-19 Rafael Campos <methril@gmail.com>
+
+ * m68k/cf-crt1.c (hardware_init_hook): Accommodate new family
+ __mcf_family_51 since gcc 4.5.1.
+
+2010-06-29 Nick Clifton <nickc@redhat.com>
+
+ * xstormy16/eva_app.ld (.gcc_except_table): Include sections with
+ the .gcc_except_table. prefix.
+ * xstormy16/eva_stub.ld: Likewise.
+ * xstormy16/sim_high.ld: Likewise.
+ * xstormy16/sim_low.ld: Likewise.
+
+2010-05-03 Michael Eager <eager@eagercon.com>
+
+ * rs6000/Makefile.in: Remove xil-exit.o.
+
+2010-02-08 Conny Marco Menebrocker <c-m-m@gmx.de>
+
+ * xc16x/xc16x.mt: New file.
+ * xc16x/configure.in: Add target_makefile_frag reference.
+ * xc16x/configure: Regenerated.
+
+2009-12-17 Jeff Johnston <jjohnstn@redhat.com>
+
+ * mn10300/Makefile.in: Add mkdir call to make installation
+ directory when installing.
+
+2009-12-16 Conny Marco Menebrocker <c-m-m@gmx.de>
+
+ * xc16x/Makefile.in: Remove extraneous stuff
+ brought in by copy.
+ * xc16x/configure.in: Ditto.
+ * xc16x/configure: Regenerated.
+
+2009-12-10 Conny Marco Menebrocker <c-m-m@gmx.de>
+
+ * configure.in: Add xc16x support.
+ * configure: Regenerated.
+ * xc16x/Makefile.in: New file for xc16x port.
+ * xc16x/aclocal.m4: Ditto.
+ * xc16x/close.S: Ditto.
+ * xc16x/configure: Ditto.
+ * xc16x/configure.in: Ditto.
+ * xc16x/create.c: Ditto.
+ * xc16x/crt0.S: Ditto.
+ * xc16x/fstat.S: Ditto.
+ * xc16x/getchar1.c: Ditto.
+ * xc16x/isatty.c: Ditto.
+ * xc16x/lseek.c: Ditto.
+ * xc16x/mem-layout.c: Ditto.
+ * xc16x/misc.c: Ditto.
+ * xc16x/open.c: Ditto.
+ * xc16x/read.c: Ditto.
+ * xc16x/sbrk.c: Ditto.
+ * xc16x/syscalls.c: Ditto.
+ * xc16x/trap_handle.c: Ditto.
+ * xc16x/write.c: Ditto.
+ * xc16x/sys/syscall.h: Ditto.
+
+2009-11-25 DJ Delorie <dj@redhat.com>
+
+ * rx/rx.ld: Place .sbss properly.
+ * rx/rx-sim.ld: Likewise.
+
+2009-10-26 DJ Delorie <dj@redhat.com>
+
+ * configure.in: Add support for RX sub-directory.
+ * configure: Regenerate.
+ * rx: New directory.
+ * rx/*: New files to support RX architecture.
+
+2009-10-26 Nick Clifton <nickc@redhat.com>
+
+ * arm/linux-syscalls0.S (SYSCALL0, SYSCALL3, SYSCALL6, SYSCALL4):
+ Delete Thumb definitions - the ARM versions work correctly in
+ Thumb mode.
+
+2009-10-08 Jie Zhang <jie.zhang@analog.com>
+
+ * bfin/Makefile.in (basiccrt.o, basiccrts.o): Use
+ -mcpu=bf532-any for the default multilib.
+
+2009-09-28 Michael Eager <eager@eagercon.com>
+
+ * configure.in: Add microblaze-*-*.
+ * configure: Add microblaze-*-* (not regenerated.)
+ * microblaze: NEW microblaze target directory.
+ * microblaze/configure.in: NEW.
+ * microblaze/configure: Generate.
+ * microblaze/Makefile.in: NEW.
+ * microblaze/{crt0.S, crt1.S, crt2.S, crt3.S, crt4.S, crtinit.S}: NEW.
+ * microblaze/{pgcrtinit.S, _program_clean.S, _program_init.S,
+ sbrk.c, sim-crtinit.S, sim-pgcrtinit.S, timer.c, _exception_handler.S,
+ _hw_exception_handler.S, _interrupt_handler.S, xil_malloc.c,
+ nnxil_printf.c, xil_sbrk.c: NEW.
+ * microblaze/xilinx.ld: NEW.
+
+2009-09-21 Ken Werner <ken.werner@de.ibm.com>
+
+ * spu/getpagesize.c: Align getpagesize implementation to POSIX
+
+2009-09-16 Mike Frysinger <michael.frysinger@analog.com>
+
+ * bfin/include/cdefBF512.h, bfin/include/cdefBF514.h,
+ bfin/include/cdefBF516.h, bfin/include/cdefBF518.h,
+ bfin/include/cdefBF51x_base.h, bfin/include/cdefBF523.h,
+ bfin/include/cdefBF524.h, bfin/include/cdefBF526.h,
+ bfin/include/cdefBF542M.h, bfin/include/cdefBF544M.h,
+ bfin/include/cdefBF547M.h, bfin/include/cdefBF548M.h,
+ bfin/include/cdefBF549M.h, bfin/include/defBF512.h,
+ bfin/include/defBF514.h, bfin/include/defBF516.h,
+ bfin/include/defBF518.h, bfin/include/defBF51x_base.h,
+ bfin/include/defBF523.h, bfin/include/defBF524.h,
+ bfin/include/defBF526.h, bfin/include/defBF542M.h,
+ bfin/include/defBF544M.h, bfin/include/defBF547M.h,
+ bfin/include/defBF548M.h, bfin/include/defBF549M.h:
+ New file.
+ * bfin/include/ccblkfn.h, bfin/include/cdefBF525.h,
+ bfin/include/cdefBF527.h, bfin/include/cdefBF52x_base.h,
+ bfin/include/cdefBF532.h, bfin/include/cdefBF534.h,
+ bfin/include/cdefBF535.h, bfin/include/cdefBF538.h,
+ bfin/include/cdefBF539.h, bfin/include/cdefBF542.h,
+ bfin/include/cdefBF544.h, bfin/include/cdefBF547.h,
+ bfin/include/cdefBF548.h, bfin/include/cdefBF549.h,
+ bfin/include/cdefBF54x_base.h, bfin/include/cdefBF561.h,
+ bfin/include/cdefblackfin.h, bfin/include/cdef_LPBlackfin.h,
+ bfin/include/cplb.h, bfin/include/defBF527.h,
+ bfin/include/defBF52x_base.h, bfin/include/defBF532.h,
+ bfin/include/defBF534.h, bfin/include/defBF535.h,
+ bfin/include/defBF537.h, bfin/include/defBF538.h,
+ bfin/include/defBF539.h, bfin/include/defBF542.h,
+ bfin/include/defBF544.h, bfin/include/defBF547.h,
+ bfin/include/defBF548.h, bfin/include/defBF549.h,
+ bfin/include/defBF54x_base.h, bfin/include/defBF561.h,
+ bfin/include/defblackfin.h, bfin/include/def_LPBlackfin.h,
+ bfin/include/sys/_adi_platform.h,
+ bfin/include/sys/anomaly_macros_rtl.h,
+ bfin/include/sys/exception.h, bfin/include/sysreg.h:
+ Update to Visual DSP 5.0 Update 6.
+
+2009-09-16 Mike Frysinger <michael.frysinger@analog.com>
+
+ * bfin/Makefile.in (BOARD_SCRIPTS): Add bf512.ld, bf514.ld,
+ and bf516.ld, bf518.ld.
+ * bfin/bf512.ld: New file.
+ * bfin/bf514.ld: Likewise.
+ * bfin/bf516.ld: Likewise.
+ * bfin/bf518.ld: Likewise
+
+2009-09-16 Jie Zhang <jie.zhang@analog.com>
+
+ * bfin/*.ld: Fix typos in comments.
+
+2009-09-08 Bernd Schmidt <bernd.schmidt@analog.com>
+
+ * bfin/include/ccblkfn.h: New file.
+
+2009-09-08 Mike Frysinger <michael.frysinger@analog.com>
+
+ * bfin/include/sys/_adi_platform.h: Convert __ASSEMBLY__ to
+ __ASSEMBLER__.
+ * bfin/include/sys/pll.h: Likewise
+
+2009-09-08 Jie Zhang <jie.zhang@analog.com>
+
+ * bfin/Makefile.in (basiccrt.o, basiccrts.o): Don't use
+ -mcpu=bf532-any for the default multilib.
+
+2009-07-28 DJ Delorie <dj@redhat.com>
+
+ * mep/gmap_default.ld: Add linkonce sections for .vtext.
+ * mep/default.ld: Likewise.
+ * mep/fmax.ld: Likewise.
+ * mep/simple.ld: Likewise.
+
+2009-07-14 DJ Delorie <dj@redhat.com>
+
+ * mep/syscalls.S (sysret): Maintain 16-byte stack alignment.
+
+2009-07-08 DJ Delorie <dj@redhat.com>
+
+ * m32c/sbrk.c (sbrk): Change to take ptrdiff_t, not int.
+
+2009-07-01 Anthony Green <green@moxielogic.com>
+
+ * moxie/crt0.S (_start): Clear BSS at startup. Register _fini()
+ with atexit().
+ * moxie/sim-open.S: Fix comment.
+
+2009-06-19 Joseph Myers <joseph@codesourcery.com>
+
+ * Makefile.in (html, pdf): New.
+ * doc/Makefile.in (html, pdf, porting.pdf, porting.html): New.
+ * doc/porting.texi: Fix section structure.
+
+2009-06-17 Michael Eager <eager@eagercon.com>
+
+ * rs6000/Makefile.in: Add xilinx support.
+ * rs6000/xil-crt0.s: New crt0 file for powerpc-xilinx-eabi.
+ * rs6000/xilinx.ld: New file.
+ * rs6000/xilinx440.ld: Ditto.
+
+2009-05-13 Ken Werner <ken.werner@de.ibm.com>
+
+ * configure.in: Introduce config_libnosys flag which defaults to true.
+ * configure: Regenerate.
+
+2009-05-13 Ulrich Weigand <uweigand@de.ibm.com>
+
+ * spu/crtn.S: Add dummy to ensure nothing gets linked at address 0.
+ * spu/crti.S: Remove nop.
+
+2009-05-08 Nick Clifton <nickc@redhat.com>
+
+ * mn10300/sim.ld: Add missing section names such as .bss.*
+ .text.*, etc. General tidy up.
+
+2009-05-07 Ken Werner <ken.werner@de.ibm.com>
+
+ * spu/configure.in: Fix multilib support.
+ * spu/configure: Regenerate.
+ * spu/Makefile.in: Add CFLAGS_FOR_TARGET.
+
+2009-04-29 Anthony Green <green@moxielogic.com>
+
+ * moxie/moxie-elf-common.ld: Move default stack out to accommodate
+ large GCC tests.
+
+2009-04-22 Anthony Green <green@moxielogic.com>
+
+ * configure.in: Add moxie support.
+ * configure: Regenerate.
+ * moxie/aclocal.m4, moxie/configure, moxie/configure.in,
+ moxie/crt0.S, moxie/fstat.c, moxie/getpid.c, isatty.c,
+ moxie/kill.c, moxie/Makefile.in, moxie/moxie-elf-common.ld,
+ moxie/print.c, moxie/putnum.c, moxie/qemu.ld, moxie/qemu-time.c,
+ moxie/qemu-write.c, moxie/sbrk.c, moxie/sim-close.S,
+ moxie/sim-exit.S,
+ moxie/sim-inbyte.c, moxie/sim.ld, moxie/sim-lseek.c,
+ moxie/sim-lseek.S, moxie/sim-open.S, moxie/sim-read.S, moxie/sim-time.c,
+ moxie/sim-unlink.S, moxie/sim-write.S, moxie/stat.c: New files.
+
+2009-04-22 DJ Delorie <dj@redhat.com>
+
+ * mep/sim-crt0.S (_start): Fix typo.
+
+2009-04-21 DJ Delorie <dj@redhat.com>
+
+ * mep/Makefile.in (SCRIPTS): Update to new config.
+ * mep/default.ld: New.
+ * mep/gmap_default.ld: Change default endian to little.
+ * mep/sim-crt0.S: Maintain 8-byte stack alignment.
+ * mep/sim-crtn.S: Likewise.
+
+2009-04-03 Ken Werner <ken.werner@de.ibm.com>
+
+ * spu/Makefile.in: Add new files.
+ * spu/times.c: New File.
+ * spu/getitimer.c: Likewise.
+ * spu/setitimer.c: Likewise.
+
+2009-04-03 Ken Werner <ken.werner@de.ibm.com>
+
+ * spu/Makefile.in: Add linux_getpid.o and linux_gettid.o.
+ * spu/linux_getpid.c: New file.
+ * spu/linux_gettid.c: New file.
+
+2009-04-03 Ken Werner <ken.werner@de.ibm.com>
+
+ * spu/crt0.S (_start): Place spu_id in the first agument register.
+
+2009-03-16 Jeff Johnston <jjohnstn@redhat.com>
+
+ * m32r/m32r-stub.c: Replace with one from newer version of gdb.
+
+2009-01-07 Ben Elliston <bje@au.ibm.com>
+
+ * Makefile.in (all): Add `+' to the command line so that the
+ command is always treated as $(MAKE).
+ * doc/Makefile.in (datarootdir): Define.
+
+2008-12-17 Jon Beniston <jon@beniston.com>
+
+ * README: Add description of lm32 directory.
+ * configure.in: Add lm32 target.
+ * configure: Regenerated.
+ * libnosys/configure.in: Add lm32 target.
+ * libnosys/configure: Regenerated.
+ * lm32: New directory.
+ * lm32/aclocal.m4: New file.
+ * lm32/Makefile.in: New file.
+ * lm32/configure.in: New file.
+ * lm32/configure: New file.
+ * lm32/crt0.S: New file.
+ * lm32/isatty.c: New file.
+ * lm32/scall.S: New file.
+ * lm32/sim.ld: New file.
+
+2008-12-11 Ken Werner <ken.werner@de.ibm.com>
+
+ * spu/crt0.S: Call __monstartup if profiling is enabled.
+ * spu/Makefile.in: Add gcrt1.o gcrt2.o.
+
+2008-12-06 Adam Nemet <anemet@caviumnetworks.com>
+
+ * mips/idt32.ld: Set arch to mips:isa32r2 from mips:isa32. Update
+ comment.
+
+2008-12-05 Adam Nemet <anemet@caviumnetworks.com>
+
+ * mips/idt64.ld: Set arch to mips:isa64r2 from mips:isa64. Update
+ comment.
+
+2008-11-20 Ken Werner <ken.werner@de.ibm.com>
+ Patrick Mansfield <patmans@us.ibm.com>
+ Joel Schopp <jschopp@austin.ibm.com>
+
+ * spu/Makefile.in: Add new files.
+ * spu/jsre.h: Add JSRE_MMAP, JSRE_MREMAP, JSRE_MSYNC and
+ JSRE_MUNMAP opcodes.
+ * spu/mmap_eaddr.c: New File.
+ * spu/mremap_eaddr.c: Likewise.
+ * spu/msync_eaddr.c: Likewise.
+ * spu/munmap_eaddr.c: Likewise.
+
+2008-11-17 Jeff Johnston <jjohnstn@redhat.com>
+
+ * m32r/Makefile.in: Add building m32r-stub.o from local copy instead
+ of up and over in gdb.
+ * m32r/m32r-stub.c: New file copied from gdb.
+
+2008-10-06 Bill Tompkins <bill+newlib@key-square.com>
+
+ * arm/crt0.S: Fix calling hardware_init_hook() or software_init_hook()
+ under thumb and thumb2.
+
+2008-09-24 DJ Delorie <dj@redhat.com>
+
+ * m32c/varvects.S: New.
+ * m32c/varvects.h: New.
+ * m32c/sample.c: New.
+ * m32c/Makefile.in: Add m32cgloss library support.
+ * m32c/crt0.S: Tweaks to support interrupts by default.
+ * m32c/m32c.tmpl: Likewise.
+
+2008-09-10 Ken Werner <ken.werner@de.ibm.com>
+
+ * spu/dirfuncs.c: Avoid warnings.
+ * spu/kill.c: Likewise.
+
+2008-09-04 Ken Werner <ken.werner@de.ibm.com>
+
+ * spu/Makefile.in: Fix missing linux_syscalls.o.
+ * spu/linux_syscalls.c: Remove extraneous "3D" sequences.
+
+2008-08-14 Jie Zhang <jie.zhang@analog.com>
+
+ * bfin/Makefile.in: (top_srcdir): Define.
+ (mkinstalldirs): Define.
+ (BOARD_SCRIPTS): Define.
+ (BOARD_LDFLAGS): Define.
+ (BOARD_BSP): Define.
+ (BOARD_CRT0S): Define.
+ (BOARD_OBJS): Define.
+ (BOARD_TEST): Define.
+ (BOARD_INSTALL): Define.
+ (INCLUDES): Add -I$(srcdir)/include.
+ (all): Add ${BOARD_CRT0S} and ${BOARD_BSP}.
+ (.c.S): Remove target.
+ (crt0.o): New target.
+ (basiccrt.o): Likewise.
+ (basiccrtb.o): Likewise.
+ (basiccrts.o): Likewise.
+ (basiccrt561.o, basiccrt561s.o, basiccrt561b.o): Likewise
+ (clean mostlyclean): Remove ${BOARD_BSP}.
+ (install): Depend on ${BOARD_INSTALL}.
+ (install-sim): Reformat.
+ (install-board): New target.
+ * bfin/basiccrt.S: Remove useless __ADSPBF561_COREB__ in
+ workaround code for 05000229.
+ * bfin/syscalls.c (do_syscall): Use `EXCPT 0' instead of
+ `RAISE 0' for syscall.
+ * bfin/basiccrt.S: New file.
+ * bfin/bf5*ld: New file.
+ * bfin/bfin-common-mc.ld: New file.
+ * bfin/bfin-common-sc.ld: New file.
+ * bfin/include/blackfin.h: New file.
+ * bfin/include/cdefBF5*.h: New file.
+ * bfin/include/cdef_LPBlackfin.h: New file.
+ * bfin/include/cdefblackfin.h: New file.
+ * bfin/include/cplb.h: New file.
+ * bfin/include/cplbtab.h: New file.
+ * bfin/include/defBF5*.h: New files.
+ * bfin/include/def_LPBlackfin.h: New files.
+ * bfin/include/defblackfin.h: New file.
+ * bfin/include/sys/_adi_platform.h: New file.
+ * bfin/include/sys/anomaly_macros_rtl.h: New file.
+ * bfin/include/sys/excause.h: New file.
+ * bfin/include/sys/exception.h: New file.
+ * bfin/include/sys/mc_typedef.h: New file.
+ * bfin/include/sys/platform.h: New file.
+ * bfin/include/sys/pll.h: New file.
+ * bfin/include/sysreg.h: New file.
+ * libnosys/configure.in (MISSING_SYSCALL_NAMES): Don't define
+ for bfin.
+ * libnosys/configure: Regenerate.
+
+2008-07-17 Ken Werner <ken.werner@de.ibm.com>
+
+ * spu/syscalls.c: Check and set the errno value.
+
+2008-06-17 Ken Werner <ken.werner@de.ibm.com>
+
+ * spu/Makefile.in: Add new file.
+ * spu/linux_syscalls.c: New file to add Linux syscall support.
+
+2008-06-16 Corrin Meyer <cjmeyer@gmail.com>
+
+ * m68k/cf-crt1.c[__mcf_family_m1qe]: Don't access CACR.
+
+2008-05-20 Nick Clifton <nickc@redhat.com>
+
+ * iq2000/crt0.S (__dso_handle): Define (weak).
+ * frv/crt0.S (__dso_handle): Define (weak).
+ * mn10300/crt0.S (___dso_handle): Define (weak).
+
+2008-05-05 Ken Werner <ken.werner@de.ibm.com>
+
+ * spu/readlink.c: Align readlink implementation to POSIX.
+
+2008-04-25 Nick Clifton <nickc@redhat.com>
+
+ * arm/crt0.S: Allow assembly under ARMv7 ISA. Support for
+ initializing stack pointers for interrupt modes is still pending.
+
+2008-04-14 Patrick Mansfield <patmans@us.ibm.com>
+
+ * spu/sbrk.c: Remove "extern int errno", use whatever is supplied
+ by sys/errno.h.
+
+2008-04-04 DJ Delorie <dj@redhat.com>
+
+ * hp74x/configure: Regenerate with autoconf 2.61.
+ * fr30/configure: Regenerate with autoconf 2.61.
+ * mips/configure: Regenerate with autoconf 2.61.
+ * xstormy16/configure: Regenerate with autoconf 2.61.
+ * rs6000/configure: Regenerate with autoconf 2.61.
+ * d30v/configure: Regenerate with autoconf 2.61.
+ * i386/configure: Regenerate with autoconf 2.61.
+ * configure: Regenerate with autoconf 2.61.
+ * wince/configure: Regenerate with autoconf 2.61.
+ * pa/configure: Regenerate with autoconf 2.61.
+ * m32r/configure: Regenerate with autoconf 2.61.
+ * mn10200/configure: Regenerate with autoconf 2.61.
+ * iq2000/configure: Regenerate with autoconf 2.61.
+ * cris/configure: Regenerate with autoconf 2.61.
+ * m68k/configure: Regenerate with autoconf 2.61.
+ * spu/configure: Regenerate with autoconf 2.61.
+ * m32c/configure: Regenerate with autoconf 2.61.
+ * mn10300/configure: Regenerate with autoconf 2.61.
+ * i960/configure: Regenerate with autoconf 2.61.
+ * arm/configure: Regenerate with autoconf 2.61.
+ * libnosys/configure: Regenerate with autoconf 2.61.
+ * m68hc11/configure: Regenerate with autoconf 2.61.
+ * bfin/configure: Regenerate with autoconf 2.61.
+ * crx/configure: Regenerate with autoconf 2.61.
+ * mt/configure: Regenerate with autoconf 2.61.
+ * sparc/configure: Regenerate with autoconf 2.61.
+ * sparc/libsys/configure: Regenerate with autoconf 2.61.
+ * mcore/configure: Regenerate with autoconf 2.61.
+ * mep/configure: Regenerate with autoconf 2.61.
+ * frv/configure: Regenerate with autoconf 2.61.
+ * doc/configure: Regenerate with autoconf 2.61.
+
+2008-01-10 DJ Delorie <dj@redhat.com>
+
+ * m32c/exit.S (__exit): preserve both argument registers.
+
+2008-01-03 Jeff Johnston <jjohnstn@redhat.com>
+
+ * arm/redboot-syscalls.c: Consistently supply _isatty if syscalls
+ dir is used in newlib.
+ * bfin/syscalls.c: Ditto.
+ * cris/gensyscalls: Ditto.
+ * fr30/syscalls.c: Ditto.
+ * frv/isatty.c: Ditto.
+ * iq2000/isatty.c: Ditto.
+ * libnosys/isatty.c: Ditto.
+ * m32r/isatty.c: Ditto.
+ * mn10200/isatty.c: Ditto.
+ * mn10300/isatty.c: Ditto.
+ * xstormy16/isatty.c: New file with _isatty function.
+
+2007-12-01 Hans-Peter Nilsson <hp@axis.com>
+
+ * cris/Makefile.in (crt0.o): Add CFLAGS when compiling crt0.S.
+
+2007-11-06 Dave Brolley <brolley@redhat.com>
+
+ * syscall.h (SYS_reconfig): New macro.
+
+2007-10-11 Ulrich Weigand <uweigand@de.ibm.com>
+
+ * spu/crt0.S: Fix so element one of register one is correctly set
+ when compiled with -mstdmain and -fstack-check.
+
+2007-10-02 Markus Deuling <deuling@de.ibm.com>
+
+ * spu/crt0.S: Initialize __ea_local_store (EA address of the LS)
+ via register 6.
+
+2007-10-01 Markus Deuling <deuling@de.ibm.com>
+
+ * spu/Makefile.in: add dependencies for crt files.
+
+2007-10-01 Patrick Mansfield <patmans@us.ibm.com>
+
+ * spu/sbrk.c: Use the current stack pointer value rather than the
+ maximum available memory to determine the amount of heap space
+ left. Without this change calling sbrk() can allocate space that
+ is currently in use on the stack.
+
+2007-09-26 Patrick Mansfield <patmans@us.ibm.com>
+
+ * spu/sched_yield.c: New file (missed on 2007-09-21).
+
+2007-09-21 Patrick Mansfield <patmans@us.ibm.com>
+
+ * spu/Makefile.in: Add new files.
+ * spu/jsre.h: Add JSRE_PREAD, JSRE_PWRITE, JSRE_READV, and
+ JSRE_WRITEV opcodes.
+ * spu/pread.c: New file to add pread via assist call.
+ * spu/pwrite.c: New file to add pwrite via assist call.
+ * spu/readv.c: New file to add readv via assist call.
+ * spu/writev.c: New file to add writev via assist call.
+
+2007-09-21 Patrick Mansfield <patmans@us.ibm.com>
+
+ * spu/jsre.h: Add JSRE_SCHED_YIELD, JSRE_UMASK, JSRE_UTIME, and
+ JSRE_UTIMES.
+ * spu/sched_yield.c: New file add sched_yield via assist call.
+ * spu/umask.c: New file add umask via assist call.
+ * spu/utime.c: New file add utime via assist call.
+ * spu/utimes.c: New file add utimes via assist call.
+ * spu/Makefile.in: Add new files.
+
+2007-09-21 Patrick Mansfield <patmans@us.ibm.com>
+
+ * spu/jsre.h: Add JSRE_SHM_OPEN and JSRE_SHM_UNLINK opcodes.
+ * spu/shm_open.c: New file to add shm_open via assist call.
+ * spu/shm_unlink.c: New file to add shm_unlink via assist call.
+ * spu/Makefile.in: Add shm_open.o and shm_unlink.o
+
+2007-09-21 Patrick Mansfield <patmans@us.ibm.com>
+
+ * spu/dirfuncs.c: New file, holds the opendir, closedir, readdir,
+ rewinddir, seekdir and telldir implementations. These are
+ grouped in one file so that we do not need a separate file for
+ the struct dirent and DIR allocation code.
+ * spu/jsre.h: Add JSRE_OPENDIR and other dir opcodes.
+ * spu/Makefile.in: Add dirfuncs.o.
+
+2007-08-13 Carlos O'Donell <carlos@codesourcery.com>
+
+ * arm/crt0.S: Remove '.set' for __stack, hardware_init_hook,
+ and software_init_hook.
+
+2007-08-10 Carlos O'Donell <carlos@codesourcery.com>
+
+ 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
+
+ * arm/syscalls.c (_stat): Use _close
+
+ * arm/syscalls.c (struct poslog): Rename to...
+ (struct fdent): ... this.
+ (FILE_HANDLE_OFFSET): Remove.
+ (findslot): Return a struct fdent* if fd is valid, otherwise return NULL.
+ (newslot): New function.
+ (remap_handle): Remove.
+ (initialise_monitor_handles): Use stdout as fallback for stderr.
+ (wrap): Rename to...
+ (checkerror): ... this.
+ (_swiread): Use checkerror() for the return of SWI calls. Correct the use of r0.
+ (_read): Use findslot(). Return EBADF on bad handle.
+ (_swilseek): Call findslot(). Check for valid whence. Check for negative offset when using
+ SEEK_CUR, and check for overflow. Use checkerror(). Check *_Flen calls for errors.
+ (_swiwrite): Correct the use of r0.
+ (_write): Call findslot().
+ (_swiopen): Call findslot(). Check for valid flags. Use checkerror(). Call newslot().
+ Handle O_TRUNC, and O_WRONLY. Return index into openfiles[] for fd.
+ (_swiclose): Correct the use of r0.
+ (_close): Handle stderr == stdout case. Only reclaim handle if _swiclose succeeded.
+ (_getpid): Use __attribute__((unused)).
+ (_sbrk): Fix formatting.
+ (_swistat): New function.
+ (_stat): Call _swistat().
+ (_fstat): Call _swistat().
+ (_unlink): Correct the use of r0.
+ (isatty): Call finslot(). Correct the use of r0.
+ (_system): Call checkerror(). Correct the use of r0.
+ (_rename): Correct the use of r0.
+
+2007-07-13 Kevin Buettner <kevinb@redhat.com>
+
+ * mep/fmax.ld, mep/gmap_default.ld, mep/min.ld, mep/simple.ld (.gcc_except_table): Add pattern
+ for .gcc_except_table.*.
+
+2007-07-06 Jeff Johnston <jjohnstn@redhat.com>
+
+ * arm/syscalls.c (gettimeofday): Change to POSIX signature
+ where second argument is passed as void *.
+ * bfin/syscalls.c (gettimeofday): Ditto.
+ * cris/gensyscalls (gettimeofday): Ditto.
+ * cris/linunistd.h (gettimeofday): Ditto.
+ * crx/time.c (gettimeofday): Ditto.
+ * frv/sim-time.c (gettimeofday): Ditto.
+ * i386/cygmon-salib.c (gettimeofday): Ditto.
+ * libnosys/gettod.c (gettimeofday): Ditto.
+ * m68k/io-gettimeofday.c (gettimeofday): Ditto.
+ * sparc/cygmon-salib.c (gettimeofday): Ditto.
+ * spu/gettimeofday.c (gettimeofday): Ditto.
+
+2007-06-20 Patrick Mansfield <patmans@us.ibm.com>
+
+ * spu/jsre.h: Add JSRE_MKSTEMP and JSRE_MKTEMP values.
+ * spu/mkstemp.c: New file to add mkstemp support via assist call.
+ * spu/mktemp.c: New file to add mktemp support via assist call.
+ * spu/Makefile.in: Add mkstemp.o and mktemp.o
+
+2007-06-20 Patrick Mansfield <patmans@us.ibm.com>
+
+ * spu/jsre.h: Add new JSRE opcodes.
+ * spu/dup2.c: New file to add dup2 support via assist call.
+ * spu/fdatasync.c: New file to add fdatasync support via assist call.
+ * spu/fsync.c: New file to add fsync support via assist call.
+ * spu/lockf.c: New file to add lockf support via assist call.
+ * spu/sync.c: New file to add sync support via assist call.
+ * spu/truncate.c: New file to add truncate support via assist call.
+ * spu/Makefile.in: Add new files.
+
+2007-06-20 Patrick Mansfield <patmans@us.ibm.com>
+
+ * spu/jsre.h: JSRE_LINK, JSRE_SYMLINK and JSRE_READLINK.
+ * spu/link.c: New file to add link support via an assist call.
+ * spu/readlink.c: New file to add readlink support via an assist call.
+ * spu/symlink.c: New file to add symlink support via an assist call.
+ * spu/Makefile.in: Add new files.
+
+2007-06-20 Patrick Mansfield <patmans@us.ibm.com>
+
+ * spu/jsre.h: Add JSRE_LSTAT.
+ * spu/lstat.c: New file add lstat support via an assist call.
+ * spu/conv_stat.c: New file, add common stat conversion code.
+ * spu/fstat.c: Use __conv_stat.
+ * spu/stat.c: Use __conv_stat.
+ * spu/Makefile.in: Add conv_stat.o and lstat.o.
+
+2007-06-20 Patrick Mansfield <patmans@us.ibm.com>
+
+ * spu/jsre.h: Add JSRE_GETCWD.
+ * spu/getcwd.c: New file, implement getcwd with help from an
+ assist call.
+ * spu/Makefile.in: Add getcwd.
+
+2007-06-20 Patrick Mansfield <patmans@us.ibm.com>
+
+ * spu/jsre.h: Add defines for new assist calls.
+ * spu/chdir.c: New file, support chdir via assist call.
+ * spu/chmod.c: New file, support chmod via assist call.
+ * spu/chown.c: New file, support chown via assist call.
+ * spu/fchdir.c: New file, support fchdir via assist call.
+ * spu/fchmod.c: New file, support fchmod via assist call.
+ * spu/fchown.c: New file, support fchown via assist call.
+ * spu/lchown.c: New file, support lchown via assist call.
+ * spu/mkdir.c: New file, support mkdir via assist call.
+ * spu/mknod.c: New file, support mknod via assist call.
+ * spu/rmdir.c: New file, support rmdir via assist call.
+ * spu/Makefile.in: Add new files.
+
+2007-06-20 Patrick Mansfield <patmans@us.ibm.com>
+
+ * spu/getpagesize.c: New file add getpagesize via an assist call.
+ * spu/jsre.h: Add JSRE_GETPAGESIZE.
+ * spu/Makefile.in: Add getpagesize.
+
+2007-06-13 Patrick Mansfield <patmans@us.ibm.com>
+
+ * spu/Makefile.in: Add nanosleep.c.
+ * spu/jsre.h: Add JSRE_NANOSLEEP.
+ * spu/nanosleep.c: New file, supply nanosleep via an assist call.
+
+2007-06-05 Patrick Mansfield <patman@us.ibm.com>
+
+ * spu/jsre.h: Remove the assist call structs and defines that are
+ specific to one assist call from here.
+ * spu/access.c: Move struct syscall_access_t to here.
+ * spu/fstat.c: Move struct syscall_fstat_t to here.
+ * spu/ftruncate.c: Move struct syscall_ftruncate_t to here.
+ * spu/gettimeofday.c: Move struct syscall_gettimeofday_t to here.
+ * spu/lseek.c: Move struct syscall_lseek_t and JSRE_SEEK defines to
+ here.
+ * spu/open.c: Move struct syscall_open_t and JSRE_O_ defines to here.
+ * spu/read.c: Move struct syscall_read_t to here, and actually use
+ it (it is the same as syscall_write_t).
+ * spu/stat.c: Move struct syscall_stat_t to here.
+ * spu/write.c: Move struct syscall_write_t to here.
+ * spu/close.c: Pass the address of the first and only argument to
+ __send_to_ppe rather than using an automatic variable and a
+ special struct.
+ * spu/dup.c: Ditto.
+ * spu/unlink.c: Ditto.
+
+2007-05-30 Kazu Hirata <kazu@codesourcery.com>
+
+ * m68k/cf-crt1.C, m68k/cf.sc, m68k/fido.sc, m68k/fido-crt0.S:
+ Replace __INIT_SECTION__ and __FINI_SECTION__ with _init and
+ _fini, respectively.
+
+2007-05-23 Patrick Mansfield <patmans@us.ibm.com>
+
+ * spu/syscalls.c: Change __send_to_ppe to return the result stored
+ in stored in slot 0 of the data, rather than have each assisted
+ call retrieve the value.
+ * spu/jsre.h: Remove the now unused syscall_out_t.
+ * spu/access.c: Use the __send_to_ppe result instead of the slot 0
+ value, remove unused syscall_out_t variable.
+ * spu/close.c: Ditto.
+ * spu/dup.c: Ditto.
+ * spu/fstat.c: Ditto.
+ * spu/ftruncate.c: Ditto.
+ * spu/gettimeofday.c: Ditto.
+ * spu/lseek.c: Ditto.
+ * spu/open.c: Ditto.
+ * spu/read.c: Ditto.
+ * spu/stat.c: Ditto.
+ * spu/unlink.c: Ditto.
+ * spu/write.c: Ditto.
+
+2007-05-23 Kazu Hirata <kazu@codesourcery.com>
+
+ * m68k/fido.sc (.data): Move .jcr to .text. Catch .got.plt
+ and .got.
+
+2007-05-07 Patrick Mansfield <patmans@us.ibm.com>
+
+ * spu/open.c: Unconditionally set the "mode" to fix a bug where
+ mode was not properly set.
+
+2007-05-03 Kazu Hirata <kazu@codesourcery.com>
+
+ * m68k/fido-_exit.c (_exit): Use stop #0x700.
+
+2007-04-27 Kazu Hirata <kazu@codesourcery.com>
+
+ * m68k/fido.sc: Catch .text.*, .rodata.*, .data.*, .bss.*,
+ .ctor.*, and .dtor.*. Wrap ctor/dtor-related sections with KEEP.
+
+2007-04-04 Patrick Mansfield <patmans@us.ibm.com>
+
+ * spu/syscalls.c: Rename _send_to_ppe __send_to_ppe, and set errno
+ on return from the offload call.
+ * spu/jsre.h: Include sys/syscall.h for the send_to_ppe prototype.
+ * spu/access.c: Call __send_to_ppe instead of _send_to_ppe, and
+ remove the setting of errno.
+ * spu/close.c: Ditto.
+ * spu/dup.c: Ditto.
+ * spu/fstat.c: Ditto.
+ * spu/ftruncate.c: Ditto.
+ * spu/gettimeofday.c: Ditto.
+ * spu/lseek.c: Ditto.
+ * spu/open.c: Ditto.
+ * spu/read.c: Ditto.
+ * spu/stat.c: Ditto.
+ * spu/unlink.c: Ditto.
+ * spu/write.c: Ditto.
+
+2007-03-01 Ben Elliston <bje@au.ibm.com>
+
+ * spu/sbrk.c (sbrk): Adjust the stack pointer vector correctly so
+ that GCC runtime stack checking works. Handle the backchain, too.
+
+2007-02-21 Patrick Mansfield <patmans@us.ibm.com>
+
+ * spu/gettimeofday.c: New file which adds SPU gettimeofday.
+ * spu/jsre.h: Remove time, add gettimeofday.
+ * spu/Makefile.in: Ditto.
+
+2007-02-21 Hans-Peter Nilsson <hp@axis.com>
+
+ * cris/crt0.S: Use jump, not ba, to skip the interrupt table. Use
+ "setf", not "nop", for common_v10_v32 compatibility.
+ Move out interrupt table to irqtable.S. Include here for non-ELF.
+ * cris/irqtable.S: Extracted from cris/crt0.S. Provide per-entry
+ weak default stub definitions.
+ * cris/crtn.c: Use "setf", not "nop", for common_v10_v32
+ compatibility.
+ * cris/setup.S [__arch_common_v10_v32]: Return.
+ * cris/Makefile.in (BSP_OBJS): Add irqtable.o.
+
+2007-02-15 Nick Clifton <nickc@redhat.com>
+
+ * sparc/cygmon.ld.src: Link .rodata.* input sections into .text
+ output section.
+ * sparc/cygmon-sparc64-ld.src: Likewise.
+
+2007-02-08 Dave Brolley <brolley@redhat.com>
+
+ * mep: New target directory.
+ * README: Add MeP.
+ * configure.in: Add support for MeP.
+ * configure: Regenerated.
+ * mep/configure.in: New file.
+ * mep/configure: Ditto.
+ * mep/Makefile.in: Ditto.
+ * mep/aclocal.m4: Ditto.
+ * mep/crt0.S: Ditto.
+ * mep/crtn.S: Ditto.
+ * mep/sim-crt0.S: Ditto.
+ * mep/sim-crtn.S: Ditto.
+ * mep/fmax.ld: Ditto.
+ * mep/gcov-io.h: Ditto.
+ * mep/gmap_default.ld: Ditto.
+ * mep/handlers.c: Ditto.
+ * mep/h_reset.c: Ditto.
+ * mep/isatty.c: Ditto.
+ * mep/mep-bb.c: Ditto.
+ * mep/mep-gmon.c: Ditto.
+ * mep/min.ld: Ditto.
+ * mep/read.c: Ditto.
+ * mep/sbrk.c: Ditto.
+ * mep/sdram-crt0.S: Ditto.
+ * mep/sdram-crtn.S: Ditto.
+ * mep/simnovec-crt0.S: Ditto.
+ * mep/simple.ld: Ditto.
+ * mep/simsdran-crt0.S: Ditto.
+ * mep/syscalls.S: Ditto.
+ * mep/write.c: Ditto.
+
+2007-01-19 Kazunori Asayama <asayama@sm.sony.co.jp>
+
+ * spu/syscalls.c: Replace vector with __vector.
+
+2007-01-09 Ben Elliston <bje@au.ibm.com>
+
+ * spu/exit.c (_exit): Finish with an infinite loop to eliminate a
+ warning about this noreturn function returning.
+
+2007-01-04 Kazu Hirata <kazu@codesourcery.com>
+
+ Merge from newlib-csl-20060320-branch:
+ 2006-12-22 Nathan Sidwell <nathan@codesourcery.com>
+
+ libgloss/
+ * m68k/Makefile.in (CF_ISRS): Remove now shared routines.
+ * m68k/cf-crt0.S (__reset): Define here.
+ * m68k/cf-isrs.c: Share some ISRS. Add aliases for each IRQ slot.
+ * m68k/cf-isv.S: Move to .interrupt_vector section. Make each
+ slot a unique routine.
+ * m68k/cf.sc: Adjust for .interrupt_vector section.
+
+ libgloss/
+ * m68k/Makefile.in (m5273c3): Rename to ...
+ (m5272c3): ... here to fix typo.
+ (m5249c3): New.
+ (CF_BOARDS): Add it.
+
+2006-01-03 Kazu Hirata <kazu@codesourcery.com>
+
+ * arm/Makefile (RDPMON_OBJS): Add _exit.o and _kill.o.
+ (RDIMON_OBJS): Define in terms of RDPMON_OBJS.
+ (rdimon-_exit.o, rdimon-_kill.o): New.
+ * arm/_exit.c, arm/_kill.c: New.
+ * arm/syscalls.c (_exit, _kill): Remove.
+
+2007-01-03 Kazu Hirata <kazu@codesourcery.com>
+
+ Merge from newlib-csl-20060320-branch:
+ 2006-12-22 Nathan Sidwell <nathan@codesourcery.com>
+
+ * m68k/cf-crt0.S (__start): Adjust semihosting.
+
+2007-01-02 Kazu Hirata <kazu@codesourcery.com>
+
+ Merge from newlib-csl-20060320-branch:
+ 2006-12-22 Nathan Sidwell <nathan@codesourcery.com>
+
+ * m68k/cf-hosted.S (__hosted): Adjust semihosting.
+
+2007-01-02 Ben Elliston <bje@au.ibm.com>
+
+ * spu/time.c (time): Cast new sys.time value to unsigned int.
+
+2006-12-25 Kazu Hirata <kazu@codesourcery.com>
+
+ * arm/syscalls.c (_unlink, _system, _rename): Cast arguments
+ to do_AngelSWI to int.
+
+ * arm/licfunc.c (do_AngelSWI): Remove.
+ * arm/syscalls.c (do_AngelSWI): Remove.
+ * arm/swi.h (do_AngelSWI): New.
+
+2006-12-18 Kazu Hirata <kazu@codesourcery.com>
+
+ Merge from newlib-csl-20060320-branch:
+ 2006-12-15 Daniel Jacobowitz <dan@codesourcery.com>
+
+ * m68k/fido-crt0.S (_vector_table): Reference
+ _PrivilegeViolationHandler.
+
+ 2006-12-15 Daniel Jacobowitz <dan@codesourcery.com>
+
+ * m68k/fido-crt0.S (_start): Set %vbr for context 0 in
+ RAM configs.
+ * m68k/fido.sc: Clean up formatting. Add comments. Move
+ stack and heap end to SDRAM for SRAM and SDRAM configurations.
+ Put RedBoot application text in SRAM.
+
+ 2006-12-13 Nathan Sidwell <nathan@codesourcery.com>
+
+ * m68k/Makefile (install_cf): Don't loop over files here. Only
+ install sources for the default multilib.
+ (install_fido): Likewise.
+ (install_io): Install bsps in one go.
+
+ 2006-12-01 Nathan Sidwell <nathan@codesourcery.com>
+ Kazu Hirata <kazu@codesourcery.com>
+
+ * configure.in: Recognize fido-*-*.
+ * configure: Regenerate.
+ * m68k/Makefile.in (CF_ISRS): Use addprefix.
+ (FIDO_CRT0, FIDO_BSP, FIDO_OBJS, FIDO_HANDLERS,
+ FIDO_UNHOSTED_SCRIPTS, FIDO_HOSTED_SCRIPTS, FIDO_SCRIPTS,
+ FIDO_SOURCES, all_fido, fido-%-crt0.o, fido-rom.ld,
+ fido-rom-hosted.ld, fido-sram.ld, fido-sram-hosted.ld,
+ fido-sdram.ld, fido-sdram-hosted.ld, fido-redboot.ld,
+ install_fido): New.
+ * m68k/asm.h (mbb): New.
+ * m68k/configure.in (DO): Check for __mfido__.
+ * m68k/configure: Regenerate.
+ * m68k/fido-_exit.c, m68k/fido-crt0.S, m68k/fido-handler.c,
+ m68k/fido-hosted.S, m68k/fido-sbrk.c, m68k/fido.h,
+ m68k/fido.sc, m68k/fido_profiling.h: New.
+
+2006-12-18 Ben Elliston <bje@au.ibm.com>
+
+ * spu/stat.c (stat): Cast new sys.pathname value to unsigned int.
+
+2006-12-13 Ben Elliston <bje@au.ibm.com>
+
+ * libnosys/_exit.c (_exit): Finish with an infinite loop to
+ eliminate a warning about this noreturn function returning.
+
+2006-12-13 Sa Liu <saliu@de.ibm.com>
+
+ * spu/access.c: New file
+ * spu/dup.c: New file
+ * spu/ftruncate.c: New file
+ * spu/jsre.h: add structures for new functions
+ * spu/time.c: New file
+ * spu/Makefile.in (access.o, dup.o, ftruncate.o, time.o): New targets.
+
+2006-12-12 Ben Elliston <bje@au.ibm.com>
+
+ * configure.in: Remove superfluous semicolons.
+ * configure: Regenerate.
+
+2006-12-11 Kazu Hirata <kazu@codesourcery.com>
+
+ Merge from newlib-csl-20060320-branch:
+ 2006-12-01 Nathan Sidwell <nathan@codesourcery.com>
+ Kazu Hirata <kazu@codesourcery.com>
+
+ * m68k/Makefile.in (CF_ISRS): Use addprefix.
+
+ 2006-11-01 Nathan Sidwell <nathan@codesourcery.com>
+
+ * m68k/Makefile.in (CFLAGS): Do not clear. Add to all compilations.
+ (ARFLAGS): Remove commented out definition.
+
+
+ * m68k/configure.in (DO) Set to list of target cpu families.
+ * m68k/configure: Rebuilt.
+ * m68k/Makefile.in (DO): New.
+ (UNHOSTED_BSP, UNHOSTED_OBJS, HOSTED_BSP, HOSTED_OBJS): Move
+ later.
+ (m5208evb, m5213evb, m52235evb, m5235evb, m5273c3, m5275evb,
+ m5282evb, m5329evb, m5485evb): Move earlier.
+ (all): Add all_$DO dependencies.
+ (all_cf, all_m68k): New targets, depend on cf & m68k bsps as
+ appropriate.
+ (m%-ram.ld, m%-rom.ld, m%-ram-hosted.ld, m%-rom-hosted.ld): Add
+ 'm' prefix.
+ (install): Add install_$DO dependencies.
+ (install_cf, install_m68k): New targets. Perform cf and m68k
+ installs as appropriate.
+ (install_io): New, install the io libraries.
+
+
+ 2006-10-23 Nathan Sidwell <nathan@codesourcery.com>
+
+ * m68k/Makefile.in (CF_CRT0): Rename to CF_CRT0S, separate hosted
+ & unhosted versions.
+ (CF_OBJS): Add cf-isv.o.
+ (CF_SOURCES): Add cf-isv.S.
+ (cf-hosted-crt0.o, cf-unhosted-crt0.o): New targets.
+ * m68k/cf-isv.S: New, broken out of ...
+ * m68k/cf-crt0.S: ... here. Add HOSTED & UNHOSTED differences.
+ * m68k/cf-crt1.c (__start1): Add heap_limit argument.
+ (__heap_limit): Define.
+ * m68k/cf-sbrk.c (__heap_limit): Declare.
+ (sbrk): Adjust for __heap_limit.
+ * m68k/cf.sc: Use different crt0's for hosted & unhosted.
+ Install a separate isv.o file.
+ * m68k/io.h (HOSTED_PUTCHAR): Replace with ...
+ (HOSTED_INIT_SIM): ... this.
+
+
+ 2006-10-20 Nathan Sidwell <nathan@codesourcery.com>
+
+ * m68k/Makefile.in (CF_BOARDS): Add m5275evb.
+ (m5275evb): New board.
+
+
+ 2006-10-20 Vladimir Prus <vladimir@codesourcery.com>
+
+ * m68k/cf.sc: Add linkonce sections and
+ DWARF sections.
+
+
+ 2006-10-07 Nathan Sidwell <nathan@codesourcery.com>
+
+ * m68k/Makefile.in: Adjust Coldfire rules.
+ (BDM_CRT0, BDM_BSP, BDM_OBJS, BDM_ISRS): Rename to ...
+ (CF_CRT0, CF_BSP, CF_OBJS, CF_ISRS): ... here. Adjust.
+ (BDM_OTHER_OBJS): Remove.
+ (BDM_SYSOBJS): Rename to ...
+ (UNHOSTED_OBJS): ... here. Adjust.
+ (UNHOSTED_BSP, HOSTED_OBJS, HOSTED_BSP): New.
+ (CF_HOSTED_SCRIPTS): New.
+ (CF_SCRIPTS, CF_SOURCES): Adjust.
+ * m68k/cf.sc: Add IO library variable.
+ * m68k/bdm-crt0.S, m68k/bdm-crt1.c, m68k/bdm-isrs.c,
+ m68k/bdm-sbrk.c, m68k/bdm-semihost.S: Rename to ...
+ * m68k/cf-crt0.S, m68k/cf-crt1.c, m68k/cf-isrs.c, m68k/cf-sbrk.c,
+ m68k/cf-hosted.S: ... here.
+ * m68k/cf-exit.c: New.
+ * m68k/bdm-gdb.h, m68k/bdm-semihost.h: Merge into ...
+ * m68k/io.h: ... here. Add unhosted support. Adjust conversion
+ function names.
+ * m68k/bdm-gdb.c: Rename to ...
+ * m68k/io-gdb.c: ... here. Adjust names of conversion functions.
+ * m68k/bdm-close.c, m68k/bdm-exit.c, m68k/bdm-fstat.c,
+ m68k/bdm-gettimeofday.c, m68k/bdm-isatty.c, m68k/bdm-lseek.c,
+ m68k/bdm-open.c, m68k/bdm-read.c, m68k/bdm-rename.c,
+ m68k/bdm-stat.c, m68k/bdm-system.c, m68k/bdm-time.c,
+ m68k/bdm-unlink.c, m68k/bdm-write.c: Rename to ...
+ * m68k/io-close.c, m68k/io-exit.c, m68k/io-fstat.c,
+ m68k/io-gettimeofday.c, m68k/io-isatty.c, m68k/io-lseek.c,
+ m68k/io-open.c, m68k/io-read.c, m68k/io-rename.c, m68k/io-stat.c,
+ m68k/io-system.c, m68k/io-time.c, m68k/io-unlink.c,
+ m68k/io-write.c: ... here. Include io.h. Adjust for hosted &
+ unhosted libraries. Adjust names of gdb conversion functions.
+
+
+ 2006-09-29 Nathan Sidwell <nathan@codesourcery.com>
+
+ * m68k/bdm-semihost.S: Add more comments. Make instruction weirder.
+
+ 2006-09-22 Nathan Sidwell <nathan@codesourcery.com>
+
+ * m68k/bdm-crt1.c (hardware_init_hook): Use #defines for CACR bits.
+
+ 2006-09-18 Nathan Sidwell <nathan@codesourcery.com>
+
+ * m68k/Makefile.in: Don't force a frame pointer on the ISRs.
+ * m68k/bdm-crt1.c (__start1): Don't set the VBR here.
+ (hardeare_init_hook): Define weakly. Set VBR here, enable caching
+ if supported.
+
+
+ * m68k/Makefile.in (bdm-semihost.o): Build from bdm-semihost.S.
+ * m68k/bdm-semihost.c: Remove.
+ * m68k/bdm-semihost.S: New.
+ * m68k/bdm-crt0.S: Don't install semihosting trap handler.
+ * m68k/bdm-close.c, bdm-exit.c, bdm-fstat.c, bdm-gettimeofday.c,
+ bdm-isatty.c, bdm-lseek.c, bdm-open.c, bdm-read.c, bdm-rename.c,
+ bdm-stat.c, bdm-system.c, bdm-unlink.c, bdm-write.c): Update.
+ * m68k/bdm-isrs.c: Update comment.
+ * m68k/bdm-semihost.h (BDM_TRAPNUM, BDM_FUNC_REG, BDM_ARG_REG,
+ BDM_TRAP): Remove.
+ (__bdm_semihost): Declare.
+
+
+ 2006-09-15 Nathan Sidwell <nathan@codesourcery.com>
+
+ * m68k/Makefile.in (BDM_OTHER_OBJS): Remove sbrk.o.
+ (BDM_SYSOBJS): Add bdm-sbrk.o.
+ * m68k/bdm-sbrk.c: New.
+
+
+ 2006-09-06 Nathan Sidwell <nathan@codesourcery.com>
+
+ * m68k/Makefile.in (CF_SOURCES): New.
+ (install): Install them.
+
+
+ 2006-09-01 Nathan Sidwell <nathan@codesourcery.com>
+
+ * m68k/cf.sc: Add .jcr section to .text.
+
+2006-12-11 Ben Elliston <bje@au.ibm.com>
+
+ * configure.in: Remove extra whitespace from config_testsuite =
+ VALUE statements to eliminate shell errors.
+ * configure: Regenerate.
+
+2006-12-08 Sa Liu <saliu@de.ibm.com>
+
+ * spu/exit.c (libgloss_exit): Rename from this ..
+ (_exit): .. to this. Overhaul.
+ (exit): Remove.
+ * spu/crt0.S, spu/crti.S, spu/crtn.S: New files.
+ * spu/crt0.C, spu/init.c: Remove.
+ * spu/configure.in (AC_INIT): Check for crt0.S, not crt0.C.
+ * spu/configure: Regenerate.
+ * spu/Makefile.in (crti.o, crtn.o, crt1.o, crt2.o): New targets.
+ (OBJS): Remove init.o.
+ (CRTOBJS): New.
+ (OUTPUTS): Add $(CRTOBJS).
+
+2006-11-27 Jeff Johnston <jjohnstn@redhat.com>
+
+ * mips/crt0.S: Fix preprocessor statements from previous patch
+ to be ANSI.
+
+2006-11-24 Thiemo Seufer <ths@mips.com>
+ Nigel Stephens <nigel@mips.com>
+
+ * mips/crt0.S (_start): Use all available float registers. Don't touch
+ SR_PE on post-mips2 CPUs, it means soft reset there.
+
+2006-11-22 Luca Barbato <lu_zero@gentoo.org>
+
+ * spu/syscalls.c: Include spu_intrinsics.h to provide vector keyword.
+
+2006-11-17 Jeff Johnston <jjohnstn@redhat.com>
+
+ * mn10300/Makefile.in: Add spaces after do in "for" loop.
+
+2006-11-08 Jie Zhang <jie.zhang@analog.com>
+
+ * bfin/configure.in: New.
+ * bfin/crt0.S: New.
+ * bfin/Makefile.in: New.
+ * bfin/syscalls.c: New.
+ * bfin/aclocal.m4: Generate.
+ * bfin/configure: Ditto.
+ * configure.in: Add support for bfin-*-*.
+ * configure: Regenerate.
+ * syscall.h (SYS_argc): Define.
+ (SYS_argnlen): Define.
+ (SYS_argn): Define.
+
+2006-10-10 Thiemo Seufer <ths@mips.com>
+
+ * mips/Makefile.in: Add INCLUDES to local compile rules.
+
+2006-10-06 Jeff Johnston <jjohnstn@redhat.com>
+
+ * Makefile.in: Add CFLAGS_FOR_TARGET and CCASFLAGS to
+ FLAGS_TO_PASS.
+
+2006-10-03 Jeff Johnston <jjohnstn@redhat.com>
+
+ * arm/linux-syscalls0.c: Rewrite bx insn architecture flag check
+ to avoid use of __ARM_ARCH__.
+
+2006-10-02 Nick Clifton <nickc@redhat.com>
+
+ * arm/linux-syscalls0.c: Add arm architecture flag
+ checks around bx insn.
+
+2006-09-07 Masaki Muranaka <monaka@monami-software.com>
+
+ * xstormy16/Makefile.in (clean): Fix a mismatched parenthesis.
+
+2006-09-01 Kazu Hirata <kazu@codesourcery.com>
+
+ Merge from newlib-csl-20060320-branch:
+ 2006-08-31 Nathan Sidwell <nathan@codesourcery.com>
+
+ * m68k/bdm-crt1.c: Call hardware_init_hook before copying
+ initialized data.
+
+ * m68k/Makefile.in (CF_BDM_SCRIPTS): Rename to CF_RAM_SCRIPTS.
+ (CF_SCRIPTS): Update.
+ (%-bdm.ld): Rename to %-ram.ld.
+
+ 2006-08-25 Nathan Sidwell <nathan@codesourcery.com>
+
+ * m68k/Makefile.in (DBUG_BSP, DBUG_OBJS): Remove.
+ (BDM_CRT0): New.
+ (BDM_OBJS): Add bdm-crt1.o.
+ (BDM_OTHER_OBJS): Remove print.o putnum.o
+ (CF_BOARDS): New.
+ (CF_BDM_SCRIPTS): Generated name of ram scripts.
+ (CF_ROM_SCRIPTS): Generated name of rom scripts.
+ (CF_SCRIPTS): Adjust.
+ (all): Add BDM_CRT0.
+ (bdm-crt0.o, bdm-crt1.o): New targets.
+ (bdm-isv.o): Remove.
+ (m5208evb, m5213evb, m52235evb, m5235evb, m5273c3, m5282evb,
+ m5329evb, m5485evb): New.
+ (%-bdm.ld, %-rom.ld): New. Replace individual linker script rules.
+ (install): Remove DBUG installs.
+ * m68k/bdm-crt0.S: New.
+ * m68k/bdm-crt1.c: New.
+ * m68k/bdm-exit.c: Call __reset.
+ * m68k/bdm-isv.c: Remove.
+ * m68k/cf.sc: Adjust to produce either rom or ram images.
+ * m68k/dbug-exit.S, m68k/dbug-inbyte.S, m68k/dbug-outbyte.S: Remove.
+
+ 2006-07-24 Nathan Sidwell <nathan@codesourcery.com>
+
+ Bug 844
+ * m68k/cf.sc: Set entry point to _start.
+ * m68k/crt0.X (_start): New name for entrypoint
+ (start): Weak alias for start.
+
+ 2006-06-09 Nathan Sidwell <nathan@codesourcery.com>
+
+ * m68k/bdm-system.c (_system): Support system(NULL).
+
+ 2006-06-08 Nathan Sidwell <nathan@codesourcery.com>
+
+ * m68k/bdm-system.c (_system): Properly encode non failure exit
+ code.
+
+ 2006-06-05 Nathan Sidwell <nathan@codesourcery.com>
+
+ * m68k/Makefile.in (BDM_SYSOBJS): Remove bdm-inbyte.o.
+ Add bdm-time.o.
+ * m68k/bdm-close.c: Add copyright notice.
+ * m68k/bdm-fstat.c: Add copyright notice.
+ * m68k/bdm-gettimeofday.c: Add copyright notice.
+ * m68k/bdm-inbyte.c: Remove.
+ * m68k/bdm-isatty.c: Add copyright notice.
+ * m68k/bdm-lseek.c: Add copyright notice. Fix &/| thinko.
+ * m68k/bdm-open.c: Add copyright notice.
+ * m68k/bdm-read.c: Add copyright notice.
+ * m68k/bdm-rename.c: Add copyright notice.
+ * m68k/bdm-stat.c: Add copyright notice.
+ * m68k/bdm-system.c: Add copyright notice.
+ * m68k/bdm-time.c: New.
+ * m68k/bdm-unlink.c: Add copyright notice.
+ * m68k/bdm-write.c: Add copyright notice.
+
+ 2006-05-25 Nathan Sidwell <nathan@codesourcery.com>
+
+ * m68k/Makefile.in (m52235-dbug.ld, m52235-bdm.ld): New
+ scripts.
+
+ 2006-05-24 Nathan Sidwell <nathan@codesourcery.com>
+
+ * m68k/Makefile.in (BDM_SYSOBJS): Remove bdm-outbyte.o.
+ * m68k/bdm-outbyte.c: Delete.
+ * m68k/bdm-semihost.h (BDM_OUTBYTE): Mark as obsolete.
+
+ 2006-05-22 Sandra Loosemore <sandra@codesourcery.com>
+
+ * m68k/bdm-semihost.h: Add new constants for additional
+ semihosting functions. Add new BDM_TRAP macro to encapsulate
+ inline asm.
+ * m68k/bdm-exit.c (_exit): Use new BDM_TRAP macro.
+ * m68k/bdm-outbyte.c (outbyte): Ditto.
+ * m68k/bdm-isrs.c, m68k/bdm-isv.c: Former BDM_TRAP
+ now called BDM_TRAPNUM.
+ * m68k/bdm-gdb.h, m68k/bdm-gdb.c: New files
+ containing declarations and conversion functions for GDB's fileio
+ protocol.
+ * m68k/bdm-close.c: New file to define corresponding function.
+ * m68k/bdm-fstat.c: Ditto.
+ * m68k/bdm-gettimeofday.c: Ditto.
+ * m68k/bdm-isatty.c: Ditto.
+ * m68k/bdm-lseek.c: Ditto.
+ * m68k/bdm-open.c: Ditto.
+ * m68k/bdm-read.c: Ditto.
+ * m68k/bdm-rename.c: Ditto.
+ * m68k/bdm-stat.c: Ditto.
+ * m68k/bdm-system.c: Ditto.
+ * m68k/bdm-unlink.c: Ditto.
+ * m68k/bdm-write.c Ditto.
+ * m68k/Makefile.in: Add dependencies for new files.
+
+ 2006-03-29 Nathan Sidwell <nathan@codesourcery.com>
+
+ * m68k/bdm-isv.c (software_init_hook): Fix trap numbering.
+
+ * m68k/Makefile.in (CF_SCRIPTS): Add m5329 board.
+ Reorder.
+ (*-dbug.ld, *-bdm.ld): Add appropriate IO definition.
+ (m5329evb-dbug.ld, m5329evb-bdm.ld): New.
+ * cf.sc (GROUP): Revert previous change. Add IO library.
+
+ * m68k/Makefile.in (BDM_BSP, BDM_OBJS, BDM_ISRS): New.
+ (CF_SCRIPTS): Rename dbug scripts. Add bdm scripts. Add m5485
+ scripts.
+ (all): Add new targets.
+ (BDM_BSP): New target.
+ (bdm-isv.o, bdm-exit.o, bdm-outbyte.o, bdm-semihost.o): New
+ targets.
+ (BDM_ISRS): New targets.
+ (m5208evb.ld, m5213evb.ld, m5235evb.ld, m5272c3.ld, m5282evb.ld):
+ Rename and adjust.
+ (m5485evb-dbug): New.
+ (m5208evb-bdm.ld, m5213evb-bdm.ld, m5235evb-bdm.ld,
+ m5272c3-bdm.ld, m5282evb-bdm.ld, m5485evb-bdm.ld): New.
+ (install): Add BDM_BSP.
+ * m68k/bdm-exit.c: New
+ * m68k/bdm-inbyte.c: New
+ * m68k/bdm-outbyte.c: New
+ * m68k/bdm-semihost.c: New
+ * m68k/bdm-semihost.h: New
+ * m68k/bdm-isrs.c: New.
+ * m68k/bdm-isv.c: New.
+ * dbug-cf.sc: Renamed to ...
+ * cf.sc: ... here. Add bdm flexibility. Remove GROUP
+
+ 2006-05-22 Sandra Loosemore <sandra@codesourcery.com>
+
+ * m68k/bdm-semihost.h: Add new constants for additional
+ semihosting functions. Add new BDM_TRAP macro to encapsulate
+ inline asm.
+ * m68k/bdm-exit.c (_exit): Use new BDM_TRAP macro.
+ * m68k/bdm-outbyte.c (outbyte): Ditto.
+ * m68k/bdm-isrs.c, m68k/bdm-isv.c: Former BDM_TRAP
+ now called BDM_TRAPNUM.
+ * m68k/bdm-gdb.h, m68k/bdm-gdb.c: New files
+ containing declarations and conversion functions for GDB's fileio
+ protocol.
+ * m68k/bdm-close.c: New file to define corresponding function.
+ * m68k/bdm-fstat.c: Ditto.
+ * m68k/bdm-gettimeofday.c: Ditto.
+ * m68k/bdm-isatty.c: Ditto.
+ * m68k/bdm-lseek.c: Ditto.
+ * m68k/bdm-open.c: Ditto.
+ * m68k/bdm-read.c: Ditto.
+ * m68k/bdm-rename.c: Ditto.
+ * m68k/bdm-stat.c: Ditto.
+ * m68k/bdm-system.c: Ditto.
+ * m68k/bdm-unlink.c: Ditto.
+ * m68k/bdm-write.c Ditto.
+ * m68k/Makefile.in: Add dependencies for new files.
+
+2006-08-30 Kazunori Asayama <asayama@sm.sony.co.jp>
+
+ * spu/syscalls.c: Add a new argument to _send_to_ppe() to
+ specify signal code.
+ * spu/jsre.h: Update declaration of _send_to_ppe().
+ * spu/close.c: Replace _send_to_ppe_0x2101() by _send_to_ppe().
+ * spu/fstat.c: Ditto.
+ * spu/lseek.c: Ditto.
+ * spu/open.c: Ditto.
+ * spu/read.c: Ditto.
+ * spu/stat.c: Ditto.
+ * spu/unlink.c: Ditto.
+ * spu/write.c: Ditto.
+
+2006-08-30 Kazunori Asayama <asayama@sm.sony.co.jp>
+
+ * spu/Makefile.in: Add dependency.
+
+2006-08-24 Paul Brook <paul@codesourcery.com>
+
+ * arm/linux-crt0.c: Disable Arm stub for Thumb-2.
+
+2006-08-23 Kazunori Asayama <asayama@sm.sony.co.jp>
+
+ * spu/Makefile.in: Add new object files.
+ * spu/syscalls.c: Move each system call to individual file.
+ * spu/jsre.h: Add declaration of _send_to_ppe_0x2101().
+ * spu/close.c: New file. Moved from spu/syscalls.c.
+ * spu/fstat.c: Likewise.
+ * spu/getpid.c: Likewise.
+ * spu/isatty.c: Likewise.
+ * spu/kill.c: Likewise.
+ * spu/lseek.c: Likewise.
+ * spu/open.c: Likewise.
+ * spu/read.c: Likewise.
+ * spu/stat.c: Likewise.
+ * spu/unlink.c: Likewise.
+ * spu/write.c: Likewise.
+
+2006-08-21 David Ung <davidu@mips.com>
+
+ * mips/Makefile.in: Add rule for cygmon.o and pass the -mno-mips16
+ option since it uses the syscall instruction.
+
+2006-08-16 Joel Schopp <jschopp@austin.ibm.com>
+
+ * spu/Makefile.in: Add special compiler
+ options to reduce size.
+
+2006-08-16 Joel Schopp <jschopp@austin.ibm.com>
+
+ * spu/jsre.h(JSRE_STAT): New define.
+ (syscall_stat_t): New type.
+ * spu/syscalls.c(stat): New syscall.
+
+2006-08-16 Joel Schopp <jschopp@austin.ibm.com>
+
+ * configure.in: Add spu support.
+ * configure: Regenerated.
+ * spu/Makefile.in: New file.
+ * spu/aclocal.m4: Ditto.
+ * spu/configure: Ditto.
+ * spu/configure.in: Ditto.
+ * spu/crt0.c: Ditto.
+ * spu/exit.c: Ditto.
+ * spu/init.c: Ditto.
+ * spu/jsre.h: Ditto.
+ * spu/sbrk.c: Ditto.
+ * spu/syscalls.c: Ditto.
+
+2006-07-05 Shaun Jackman <sjackman@gmail.com>
+
+ * arm/linux-crt0.S: Remove file.
+ * arm/linux-crt0.c: New file. Supports PIC code.
+
+2006-07-04 Shaun Jackman <sjackman@gmail.com>
+
+ * arm/linux-syscalls0.S (ftruncate, getegid, geteuid, getgid,
+ getgroups, getpgid, getpgrp, getuid, lchown, pause, pipe,
+ setpgid, setgid, setsid, setuid, sigprocmask, sync, uname): New
+ system call.
+
+2006-06-30 DJ Delorie <dj@redhat.com>
+
+ * m32c/crt0.S (done_inilist): Fix dwarf2 address sizes.
+
+2006-06-23 Shaun Jackman <sjackman@gmail.com>
+
+ * arm/elf-linux.specs: New file.
+
+2006-06-13 Sandra Loosemore <sandra@codesourcery.com>
+
+ * arm/syscalls.c (_unlink, isatty, _system, _rename):
+ Make them do something useful in the ARM_RDI_MONITOR case.
+
+2006-06-08 Fred Fish <fnf@specifix.com>
+
+ * mips/idt.ld, mips/idt32.ld, mips/idt64.ld, mips/nullmon.ld,
+ mips/pmon.ld: Keep special sections generated by mips gcc.
+
+2006-06-05 Shaun Jackman <sjackman@gmail.com>
+
+ * arm/linux-syscalls0.S (reboot): Remove.
+ * arm/linux-syscalls1.c (reboot): New function.
+
+2006-06-05 Shaun Jackman <sjackman@gmail.com>
+
+ * arm/syscalls.c (kill) [ARM_RDI_MONITOR]: Use the signal
+ argument to choose an ADP exception reason.
+ * arm/libcfunc.c (abort): Remove this function.
+
+2006-05-30 Shaun Jackman <sjackman@gmail.com>
+
+ * arm/Makefile.in: Add Linux syscall interface.
+ * arm/linux-crt0.S: New file.
+ * arm/linux-syscall.h: New file.
+ * arm/linux-syscalls0.S: New file.
+ * arm/linux-syscalls1.c: New file.
+
+2006-05-23 Fred Fish <fnf@specifix.com>
+
+ * mips/configure.in: Change mipsisa64-*-* to
+ mipsisa64*-*-* to catch minor variations like
+ mipsisa64sb1.
+ * mips/configure: Regenerated.
+
+2006-05-10 Jeff Johnston <jjohnstn@redhat.com>
+
+ * Makefile.in: Pass some additional flags in FLAGS_TO_PASS.
+ * configure.in: Add additional flags when creating Makefile.
+ * configure: Regenerated.
+ * arm/configure
+ * arm/configure.in: Set with_multisubdir when creating Makefile.
+ * cris/configure.in: Ditto.
+ * d30v/configure.in: Ditto.
+ * frv/configure.in: Ditto.
+ * i386/configure.in: Ditto.
+ * iq2000/configure.in: Ditto.
+ * libnosys/configure.in: Ditto.
+ * m32c/configure.in: Ditto.
+ * m32r/configure.in: Ditto.
+ * m68hc11/configure.in: Ditto.
+ * m68k/configure.in: Ditto.
+ * mcore/configure.in: Ditto.
+ * mips/configure.in: Ditto.
+ * mn10200/configure.in: Ditto.
+ * mn10300/configure.in: Ditto.
+ * mt/configure.in: Ditto.
+ * pa/configure.in: Ditto.
+ * rs6000/configure.in: Ditto.
+ * sparc/configure.in: Ditto.
+ * cris/configure: Regenerated.
+ * d30v/configure: Ditto.
+ * frv/configure: Ditto.
+ * i386/configure: Ditto.
+ * iq2000/configure: Ditto.
+ * libnosys/configure: Ditto.
+ * m32c/configure: Ditto.
+ * m32r/configure: Ditto.
+ * m68hc11/configure: Ditto.
+ * m68k/configure: Ditto.
+ * mcore/configure: Ditto.
+ * mips/configure: Ditto.
+ * mn10200/configure: Ditto.
+ * mn10300/configure: Ditto.
+ * mt/configure: Ditto.
+ * pa/configure: Ditto.
+ * rs6000/configure: Ditto.
+ * sparc/configure: Ditto.
+
+2006-04-19 Jeff Johnston <jjohnstn@redhat.com>
+
+ * configure.in: Modified to support autoconf 2.59.
+ * */configure.in: Ditto.
+ * configure: Regenerated.
+ * */configure: Ditto.
+ * wince/aclocal.m4: Ditto.
+ * acinclude.m4: New file.
+ * aclocal.m4: Ditto.
+ * arm/aclocal.m4: Ditto.
+ * cris/aclocal.m4: Ditto.
+ * crx/aclocal.m4: Ditto.
+ * d30v/aclocal.m4: Ditto.
+ * fr30/aclocal.m4: Ditto.
+ * frv/aclocal.m4: Ditto.
+ * hp74x/aclocal.m4: Ditto.
+ * i386/aclocal.m4: Ditto.
+ * i960/aclocal.m4: Ditto.
+ * iq2000/aclocal.m4: Ditto.
+ * libnosys/aclocal.m4: Ditto.
+ * m32c/aclocal.m4: Ditto.
+ * m32r/aclocal.m4: Ditto.
+ * m68hc11/aclocal.m4: Ditto.
+ * m68k/aclocal.m4: Ditto.
+ * mcore/aclocal.m4: Ditto.
+ * mips/aclocal.m4: Ditto.
+ * mn10200/aclocal.m4: Ditto.
+ * mn10300/aclocal.m4: Ditto.
+ * mt/aclocal.m4: Ditto.
+ * pa/aclocal.m4: Ditto.
+ * rs6000/aclocal.m4: Ditto.
+ * sparc/aclocal.m4: Ditto.
+ * sparc/libsys/aclocal.m4: Ditto.
+ * xstormy16/aclocal.m4: Ditto.
+
+2006-04-18 Mark Mitchell <mark@codesourcery.com>
+
+ * doc/porting.texi: Document libgloss build conventions.
+
+2006-03-22 Nathan Sidwell <nathan@codesourcery.com>
+
+ * mt/startup-16-002.S (.internal_io): Make @nobits.
+ * mt/startup-16-003.S (.internal_io): Make @nobits.
+ * mt/startup-ms2.S (.internal_io): Make @nobits.
+
+2006-03-02 DJ Delorie <dj@redhat.com>
+
+ * m32c/exit.S: Preserve r1.
+
+2006-02-24 Paul Brook <paul@codesourcery.com>
+
+ * arm/redboot-crt0.S: Use cps in Thumb-2 mode.
+
+2006-02-22 Nathan Sidwell <nathan@codesourcery.com>
+
+ * m68k/Makefile.in (CF_SCRIPTS): New.
+ (all): Add CF_SCRIPTS.
+ (m5208evb.ld, m5213evb.ld, m5235evb.ld, m5272c3.ld,
+ m5282evb.ld): New targets
+ (install): Iterate over CF_SCRIPTS.
+ * m68k/crt0.S: Don't use dbra on any cf chips.
+ * m68k/dbug-cf.sc: New.
+
+2006-02-07 Paul Brook <paul@codesourcery.com>
+
+ * arm/crt0.S: Add Thumb-2 startup code.
+ * arm/redboot-crt0.S: Ditto.
+ * arm/libcfunc.c (do_AngelSWI): Use AngelSWIInsn.
+ * arm/swi.h (AngelSWIInsn, AngelSWIAsm): Define.
+ * arm/trap.S: Disable for Thumb-2.
+
+2006-01-18 Nathan Sidwell <nathan@codesourcery.com>
+
+ * mt/ms2.ld (.sram): Correct typo in section names.
+
+2006-01-16 Nathan Sidwell <nathan@codesourcery.com>
+
+ * mt/Makefile.in (SCRIPTS, CRT0): Add ms2 files.
+ (crt0-ms2.o): New target.
+ * mt/crt0-ms2.S, mt/exit-ms2.c, mt/ms2.ld, mt/startup-ms2.S: New.
+
+2006-01-04 Paul Brook <paul@codesourcery.com>
+
+ * m68k/bcc.ld: Add .got.plt and .got
+ * m68k/idp.ld: Ditto.
+ * m68k/idpgdb: Ditto.
+ * m68k/mvme135.ld: Ditto.
+ * m68k/sbc5204.ld: Ditto.
+ * m68k/sbc5206.ld: Ditto.
+ * m68k/sim.ld: Ditto.
+
+2005-12-13 DJ Delorie <dj@redhat.com>
+
+ * m32c/crt0.S: Add support for preinit, init, and fini arrays, and
+ .init and .fini processing.
+ * m32c/crtn.S: Likewise.
+ * m32c/exit.S: Likewise.
+
+2005-12-13 Nathan Sidwell <nathan@codesourcery.com>
+
+ * mt/16-002.ld: Change architecture to 'mt'. Remove
+ SEARCH_DIR.
+ * mt/16-003.ld: Likewise.
+ * mt/64-001.ld: Likewise.
+ * mt/Makefile.in: Change comment to reference 'mt' rather than 'ms1'.
+ * mt/crt0.S: Likewise.
+
+2005-12-12 Nathan Sidwell <nathan@codesourcery.com>
+
+ * configure.in: Replace ms1 arch with mt arch.
+ * configure: Rebuilt.
+ * mt: Renamed from ms1 dir.
+
+2005-12-06 Paul Brook <paul@codesourcery.com>
+
+ * m68k/bcc.ld: Add .text.*, .rodata.*, .data.* and .bss.*.
+ * m68k/idp.ld: Ditto.
+ * m68k/idpgdb: Ditto.
+ * m68k/mvme135.ld: Ditto.
+ * m68k/sbc5204.ld: Ditto.
+ * m68k/sbc5206.ld: Ditto.
+ * m68k/sim.ld: Ditto.
+
+2005-11-30 Shaun Jackman <sjackman@gmail.com>
+
+ * libnosys/Makefile.in (OBJS): Add chown, readlink, and symlink.
+ * libnosys/chown.c: New file.
+ * libnosys/readlink.c: New file.
+ * libnosys/symlink.c: New file.
+
+2005-11-30 Shaun Jackman <sjackman@gmail.com>
+
+ * arm/libcfunc.c (clock, sleep, usleep): New functions.
+ * arm/syscalls.c (_clock): New function.
+ (_times): Call _clock.
+
+2005-11-17 Shaun Jackman <sjackman@gmail.com>
+
+ * libgloss/arm/libcfunc.c (isatty): Call _isatty. GDB now supports
+ the IsTTY SWI that _isatty calls.
+
+2005-11-17 Hans-Peter Nilsson <hp@axis.com>
+
+ * cris/linunistd.h: Don't redefine errno as extern int.
+
+2005-10-20 Jeff Johnston <jjohnstn@redhat.com>
+
+ * arm/configure.in: Add AC_SUBST for BUILD_CRT0_TRUE and
+ BUILD_CRT0_FALSE.
+ * arm/configure: Regenerate.
+
+2005-10-17 Jeff Johnston <jjohnstn@redhat.com>
+
+ * arm/configure.in: Support building crt0.o when syscalls
+ are disabled in newlib.
+ * arm/configure: Regenerated.
+
+2005-10-03 James E Wilson <wilson@specifix.com>
+
+ * mips/array.ld, mips/cfe.ld, mips/ddb-kseg0.ld, mips/ddb.ld,
+ mips/dve.ld, mips/idt.ld, mips/idt32.ld, mips/idt64.ld,
+ mips/idtecoff.ld, mips/jmr3904app-java.ld, mips/jmr3904app.ld,
+ jmr3904dram-java.ld, mips/jmr3904dram.ld, mips/lsi.ld, mips/nullmon.ld,
+ mips/pmon.ld: Add support for .bss.* sections.
+
+2005-09-23 James E Wilson <wilson@specifix.com>
+
+ * mips/array.ld, mips/cfe.ld, mips/ddb-kseg0.ld, mips/ddb.ld,
+ mips/dve.ld, mips/idt.ld, mips/idt32.ld, mips/idt64.ld,
+ mips/idtecoff.ld, mips/jmr3904app-java.ld, mips/jmr3904app.ld,
+ jmr3904dram-java.ld, mips/jmr3904dram.ld, mips/lsi.ld, mips/nullmon.ld,
+ mips/pmon.ld: Change x* to x.* in existing linkonce lines. Add
+ support for .gnu.linkonce.b.*.
+
+2005-08-30 Jeff Johnston <jjohnstn@redhat.com>
+
+ * rs6000/Makefile.in (VPATH): Use colon as separator.
+
+2005-08-24 Aldy Hernandez <aldyh@redhat.com>
+
+ * ms1/access.c: Change copyright notice.
+
+2005-08-19 DJ Delorie <dj@redhat.com>
+
+ * m32c/Makefile.in (m16cmon.ld, m32cmon.ld): Fix output names.
+ (*.o): Add dependencies.
+ * m32c/m32csys.h: Move syscall location to 0x400 as per Renesas
+ recommendations.
+
+2005-08-18 DJ Delorie <dj@redhat.com>
+
+ * m32c/Makefile.in: Block out memory regions reserved for monitors
+ and simulators. Add monitor link scripts.
+
+2005-08-16 Shaun Jackman <sjackman@gmail.com>
+
+ * arm/syscalls.c (initialise_monitor_handles): Set
+ monitor_stderr to the result of SWI_open(":tt", "a")
+ instead of simply duplicating stdout.
+
+2005-08-10 DJ Delorie <dj@redhat.com>
+
+ * configure.in: Add m32c support.
+ * configure: Regenerated
+ * m32c: New directory, Renesas R8C/M16C/M32C support.
+ * m32c/abort.S m32c/argvlen.S m32c/argv.S m32c/chdir.S,
+ m32c/chmod.S m32c/close.S m32c/configure m32c/configure.in,
+ m32c/crt0.S, m32c/crtn.S, m32c/exit.S, m32c/fstat.S,
+ m32c/genscript, m32c/getpid.S, m32c/gettimeofday.S,
+ m32c/heaptop.S, m32c/isatty.S, m32c/kill.S, m32c/link.S,
+ m32c/lseek.S, m32c/m32csys.h, m32c/m32c.tmpl, m32c/Makefile.in,
+ m32c/open.S, m32c/read.S, m32c/sbrk.c, m32c/stat.S, m32c/time.S,
+ m32c/times.S, m32c/unlink.S, m32c/utime.S, m32c/write.S: New files
+
+2005-08-02 Shaun Jackman <sjackman@gmail.com>
+
+ * libgloss/arm/libcfunc.c (isatty): New function.
+
+2005-08-02 Shaun Jackman <sjackman@gmail.com>
+
+ * libgloss/arm/syscalls.c (_exit): Call _kill with the second
+ argument set to -1, which is an invalid signal number.
+ (_kill): Comment and coding style changes only.
+ (_raise): Remove function.
+
+2005-07-19 Paul Brook <paul@codesourcery.com>
+
+ * arm/crt0.S: Ensure doubleword stack alignment.
+
+2005-07-18 Richard Sandiford <richard@codesourcery.com>
+
+ * mips/array.ld (.sdata): Include .gnu.linkonce.s.*, not
+ .gnu.linkonce.s*.
+ (.sbss): Include .sbss.* and .gnu.linkonce.sb.*.
+ * mips/cfe.ld, mips/ddb-kseg0.ld, mips/ddb.ld, mips/dve.ld,
+ * mips/idt32.ld, mips/idt64.ld, mips/idtecoff.ld, mips/idt.ld,
+ * mips/jmr3904app-java.ld, mips/jmr3904app.ld,
+ * mips/jmr3904dram-java.ld, mips/jmr3904dram.ld,
+ * mips/lsi.ld, mips/nullmon.ld, mips/pmon.ld: As for mips/array.ld.
+
+2005-07-18 Shaun Jackman <sjackman@gmail.com>
+
+ * libgloss/arm/libcfunc.c (abort): Call _exit instead of the RDI swi.
+ (alarm): Add the weak attribute.
+ (pause): New function. Return ENOSYS.
+ * libgloss/arm/syscalls.c (_getpid): Add the weak attribute.
+ (_fstat): Ditto.
+ (_stat): Ditto.
+ (_link): Ditto. Return ENOSYS.
+ (_unlink): Call the swi instead of returning -1.
+ (_raise): Add the weak attribute. Return ENOSYS.
+ (isatty): Rename to _isatty. Call the swi instead of returning 1.
+ (_system): Call the swi instead of returning ENOSYS.
+ (_rename): Ditto.
+
+2005-07-06 Aldy Hernandez <aldyh@redhat.com>
+
+ * configure.in: Add ms1 case.
+ * configure: Regenerate.
+ * ms1/16-002.ld: New.
+ * ms1/16-003.ld: New.
+ * ms1/64-001.ld: New.
+ * ms1/access.c: New.
+ * ms1/chmod.c: New.
+ * ms1/close.c: New.
+ * ms1/configure: New.
+ * ms1/configure.in: New.
+ * ms1/crt0-16-002.S: New.
+ * ms1/crt0-16-003.S: New.
+ * ms1/crt0-64-001.S: New.
+ * ms1/crt0.S: New.
+ * ms1/exit-16-002.c: New.
+ * ms1/exit-16-003.c: New.
+ * ms1/exit-64-001.c: New.
+ * ms1/exit.c: New.
+ * ms1/fstat.c: New.
+ * ms1/getpid.c: New.
+ * ms1/gettime.c: New.
+ * ms1/isatty.c: New.
+ * ms1/kill.c: New.
+ * ms1/lseek.c: New.
+ * ms1/Makefile.in: New.
+ * ms1/open.c: New.
+ * ms1/read.c: New.
+ * ms1/sbrk.c: New.
+ * ms1/startup-16-002.S: New.
+ * ms1/startup-16-003.S: New.
+ * ms1/startup-64-001.S: New.
+ * ms1/stat.c: New.
+ * ms1/time.c: New.
+ * ms1/times.c: New.
+ * ms1/trap.h: New.
+ * ms1/trap.S: New.
+ * ms1/unlink.c: New.
+ * ms1/utime.c: New.
+ * ms1/write.c: New.
+
+2005-05-19 Corinna Vinschen <vinschen@redhat.com>
+
+ * arm/elf-redboot.ld, iq2000/sim.ld, m68hc11/sim-valid-m68hc11.ld,
+ * m68hc11/sim-valid-m68hc12.ld, mcore/elf-cmb.ld, mips/cfe.ld,
+ * mips/ddb-kseg0.ld, mips/ddb.ld, mips/dve.ld, mips/idt.ld,
+ * mips/idt32.ld, mips/idt64.ld, mips/jmr3904app-java.ld,
+ * mips/jmr3904app.ld, mips/jmr3904dram-java.ld, mips/jmr3904dram.ld,
+ * mips/nullmon.ld, mips/pmon.ld, mn10200/eval.ld, mn10200/sim.ld,
+ * mn10300/asb2303.ld, mn10300/asb2305.ld, mn10300/eval.ld,
+ * mn10300/sim.ld, rs6000/ads.ld, rs6000/mbx.ld, rs6000/yellowknife.ld,
+ * sh/sh1lcevb.ld, sh/sh2lcevb.ld, sh/sh3bb.ld, sh/sh3lcevb.ld,
+ * sparc/elfsim.ld, sparc/ex930.ld, sparc/ex931.ld, sparc/ex934.ld,
+ * sparc/sparc86x.ld, xstormy16/eva_app.ld, xstormy16/eva_stub.ld,
+ * xstormy16/sim_high.ld, xstormy16/sim_rom.ld: Add .debug_ranges
+ section.
+
+2005-05-05 Tobias Anderberg <tobias.anderberg@axis.com>
+
+ * arm/syscalls.c (get_errno): Fix output register constraint.
+
+2005-05-05 J"orn Rennecke <joern.rennecke@st.com>
+
+ * rs6000/sim-getrusage.S: New file, broken out of:
+ (simulator.S).
+ * rs6000/Makefile.in (SIM_OBJS): Add sim-getrusage.o.
+ (sim-getrusage.o): New rule.
+
+2005-04-28 Shaun Jackman <sjackman@gmail.com>
+
+ * libgloss/syscalls.c (get_errno): Add an output register constraint.
+
+2005-04-19 Eric Christopher <echristo@redhat.com>
+
+ * mips/regs.S: Sign extend constants for mips64 and unify
+ address handling.
+
+2005-04-12 Shaun Jackman <sjackman@gmail.com>
+
+ * libgloss/arm/Makefile.in (RDPMON_BSP): librdpmon.a was empty due
+ to a typo. Fixed.
+ (RDIMON_BSP): Ditto.
+
+2005-04-12 Richard Sandiford <rsandifo@redhat.com>
+
+ * mips/array.ld, mips/cfe.ld, mips/dve.ld, mips/idt32.ld,
+ * mips/idt64.ld, mips/idtecoff.ld, mips/idt.ld,
+ * mips/jmr3904app-java.ld, mips/jmr3904app.ld,
+ * mips/jmr3904dram-java.ld, mips/jmr3904dram.ld, mips/lsi.ld,
+ * mips/nullmon.ld, mips/pmon.ld: Keep .init and .fini.
+
+2005-02-08 Antony King <antony.king@st.com>
+
+ * arm/syscalls.c: Change CHECK_INIT to pass reentrant struct
+ instead of file pointer.
+
+2005-02-01 Hans-Peter Nilsson <hp@axis.com>
+
+ * cris/Makefile.in (ALL_INSTALL_FILES): New macro.
+ (ALL_INSTALL_FILES_NEWLIB_COPY): New macro.
+ (all): Use ALL_INSTALL_FILES instead of its contents. Add
+ ALL_INSTALL_FILES_NEWLIB_COPY.
+ ($(objroot)/newlib/%, $(objroot)/newlib/libnosys.a): New rules
+
+2005-01-27 Hans-Peter Nilsson <hp@axis.com>
+
+ * configure.in: Support cris-*-* and crisv32-*-*.
+ * libnosys/configure.in: Ditto.
+ * configure, libnosys/configure: Regenerate.
+ * cris: New directory.
+ * cris/crt0.S, cris/crtn.c, cris/gensyscalls, cris/linunistd.h,
+ cris/outbyte.c, cris/configure.in, cris/crti.c, cris/lcrt0.c,
+ cris/Makefile.in, cris/setup.S, cris/configure: New files.
+
+2005-01-21 Hans-Peter Nilsson <hp@axis.com>
+
+ * libnosys/warning.h (stub_warning): Remove "warning: " prefix.
+
+2005-01-18 Hans-Peter Nilsson <hp@axis.com>
+
+ * libnosys/warning.h (link_warning) [HAVE_GNU_LD and HAVE_ELF]:
+ Prefix symbol in section name with __SYMBOL_PREFIX. Do not use
+ __make_section_unallocated. Mark magic variable as used.
+
+2005-01-18 Hans-Peter Nilsson <hp@axis.com>
+
+ * libnosys/configure.in (libc_cv_asm_previous_directive): Set
+ cache-id variable.
+ (libc_cv_asm_popsection_directive): Ditto.
+ (libc_cv_section_attributes): Ditto.
+ (libc_symbol_prefix): Rename from libc_dollar_prefix. Check for
+ "_" as well, and set __SYMBOL_PREFIX accordingly.
+ * libnosys/configure: Regenerate.
+
+2005-01-18 Hans-Peter Nilsson <hp@axis.com>
+
+ * libnosys/Makefile.in (LD, AS): Correct obsoleted suffix: Say
+ as-new and ld-new, not as.new and ld.new.
+
+2005-01-14 Hans-Peter Nilsson <hp@axis.com>
+
+ * libnosys/warning.h (__make_section_unallocated)
+ [HAVE_ASM_PREVIOUS_DIRECTIVE, HAVE_ASM_POPSECTION_DIRECTIVE]: Use "\n"
+ instead of ";" to delimit assembly lines.
+
+2005-01-07 Paul Brook <paul@codesourcery.com>
+
+ * arm/crt0.S: Call __libc_{init,fini}_array instead of
+ _init/_fini if they exist.
+
+2004-11-26 Paul Brook <paul@codesourcery.com>
+
+ * arm/crt0.S (_start): Add .cantunwind annotation.
+
+2004-10-28 Nick Clifton <nickc@redhat.com>
+
+ * configure.in: Add support for iq2000 target.
+ * configure: Regenerate.
+
+2004-10-05 Tomer Levi <Tomer.Levi@nsc.com>
+
+ * configure.in: Support crx-*-*.
+ * configure: regenerate.
+ * crx/_exit.c: New file.
+ * crx/_getenv.c: Ditto.
+ * crx/_rename: Ditto.
+ * crx/close.c: Ditto.
+ * crx/configure.in: Ditto.
+ * crx/crti.S: Ditto.
+ * crx/crtn.S: Ditto.
+ * crx/crt0.S: Ditto.
+ * crx/dvz_hndl.c: Ditto.
+ * crx/flg_hndl.c: Ditto.
+ * crx/fstat.c: Ditto.
+ * crx/getpid.c: Ditto.
+ * crx/iad_hndl.c: Ditto.
+ * crx/intable.c: Ditto.
+ * crx/isatty.c: Ditto.
+ * crx/kill.c: Ditto.
+ * crx/lseek.c: Ditto.
+ * crx/Makefile.in: Ditto.
+ * crx/open.c: Ditto.
+ * crx/putnum.c: Ditto.
+ * crx/read.c: Ditto.
+ * crx/sbrk.c: Ditto.
+ * crx/sim.ld: Ditto.
+ * crx/stat.c: Ditto.
+ * crx/svc_hndl.c: Ditto.
+ * crx/time.c: Ditto.
+ * crx/und_hndl.c: Ditto.
+ * crx/unlink.c: Ditto.
+ * crx/write.c: Ditto.
+
+2004-10-01 Paul Brook <paul@codesourcery.com>
+
+ * arm/configure.in: Add *-*-aebi target.
+ * arm/configure: Regenerate.
+
+2004-08-25 Corinna Vinschen <vinschen@redhat.com>
+
+ * i386/cygmon.ld (.text): Fix alignment.
+ (.rodata): Handle .rodata.* sections.
+
+2004-06-27 Hideki Iwamoto <h-iwamoto@kit.hi-ho.ne.jp>
+
+ * Makefile.in: Support $(DESTDIR).
+ * arm/Makefile.in: Ditto.
+ * d30v/Makefile.in: Ditto.
+ * doc/Makefile.in: Ditto.
+ * fr30/Makefile.in: Ditto.
+ * frv/Makefile.in: Ditto.
+ * hp74x/Makefile.in: Ditto.
+ * i386/Makefile.in: Ditto.
+ * i960/Makefile.in: Ditto.
+ * iq2000/Makefile.in: Ditto.
+ * libnosys/Makefile.in: Ditto.
+ * m32r/Makefile.in: Ditto.
+ * m68hc11/Makefile.in: Ditto.
+ * m68k/Makefile.in: Ditto.
+ * mcore/Makefile.in: Ditto.
+ * mips/Makefile.in: Ditto.
+ * mn10200/Makefile.in: Ditto.
+ * mn10300/Makefile.in: Ditto.
+ * pa/Makefile.in: Ditto.
+ * rs6000/Makefile.in: Ditto.
+ * sparc/Makefile.in: Ditto.
+ * sparc/libsys/Makefile.in: Ditto.
+ * xstormy16/Makefile.in: Ditto.
+
+2004-06-25 Jeff Johnston <jjohnstn@redhat.com>
+
+ * libnosys/_exit.c: New file.
+ * libnosys/Makefile.in: Add _exit.o.
+
+2004-06-17 Jeff Johnston <jjohnstn@redhat.com>
+
+ * arm/configure.in: Check the value of newlib-may-supply-syscalls
+ enablement variable to determine if crt0 should or should not be
+ built.
+ * arm/configure: Regenerated.
+ * arm/Makefile.in: Changed to look at @BUILD_CRT0_TRUE@ and
+ @BUILD_CRT0_FALSE@ variables set in configure to determine
+ if crt0.o should be built and installed.
+
+2004-06-09 Toralf Lund <toralf@procaptura.com>
+
+ * arm/crt0.S: Copied from newlib and it now also sets up stacks for
+ FIQ and IRQ mode, plus calls hardware_init_hook() and
+ software_init_hook() if present.
+ * arm/libcfunc.c, arm/swi.h, arm/syscalls.c: Copied
+ from newlib.
+ * arm/Makefile.in: Build crt0.o, rdpmon-crt0.o, rdimon-crt0.o,
+ librdpmon.a, librdimon.a - support file for "bare" setup, as well
+ as "RDP" and "RDI" monitors.
+ * arm/coff-rdpmon.specs, arm/elf-rdpmon.specs,
+ arm/coff-rdimon.specs, arm/elf-rdimon.specs: gcc specs files to go
+ with above mentioned support libs and startfiles.
+
+2004-06-03 Alexandre Oliva <aoliva@redhat.com>
+
+ * mn10300/sim.ld: Start at address 4, to avoid ambiguity with NULL
+ pointers.
+
+2004-05-26 Jeff Johnston <jjohnstn@redhat.com>
+
+ * libnosys/sbrk.c: Add include of <_syslist.h> and "config.h".
+
+2004-05-05 Richard Sandiford <rsandifo@redhat.com>
+
+ * mips/array.ld, mips/cfe.ld, mips/ddb-kseg0.ld, mips/ddb.ld,
+ * mips/dve.ld, mips/idt32.ld, mips/idt64.ld, mips/idt.ld
+ * mips/jmr3904app.ld, mips/lsi.ld, mips/nullmon.ld, mips/pmon.ld
+ (.eh_frame_hdr, .eh_frame, .gcc_except_table, .jcr): New sections.
+
+2004-04-02 Chris Demetriou <cgd@broadcom.com>
+
+ * mips/regs.S (C0_COUNT): Fix comment that kept this from being
+ defined.
+ * mips/vr4300.S: Use C0_COUNT as appropriate instead of hardcoding $9.
+ * mips/vr5xxx.S: Likewise.
+
+2004-03-23 Eric Christopher <echristo@redhat.com>
+
+ * frv/crt0.S: Fix comment.
+ * mips/configure.in: Add mipsisa64-*-* to target support.
+ * mips/configure: Regenerate.
+
+2004-03-03 Stephane Carrez <stcarrez@nerim.fr>
+
+ * m68hc11/sci-inout.S: Supports -mlong-calls.
+ * m68hc11/sim-valid-m68hc11.ld (.tramp): New section for trampolines.
+ (.text): Mark the .installN and .finiN section with KEEP.
+ (.vectors): Likewise for .vectors.
+ (.gcc_except_table): New section.
+ * m68hc11/sim-valid-m68hc12.ld (.tramp): New section for trampolines.
+ (.text): Mark the .installN and .finiN section with KEEP.
+ (.vectors): Likewise for .vectors.
+ (.gcc_except_table): New section.
+
+2004-01-23 Gábor Lóki <loki@inf.u-szeged.hu>
+
+ * m68k/leds.c: remove led_putnum(), zylons() forward
+ function declarations.
+ * m68k/leds.h: add zylons() forward function declaration.
+
+2004-01-06 Alexandre Oliva <aoliva@redhat.com>
+
+ 2003-12-02 Richard Sandiford <rsandifo@redhat.com>
+ * frv/crt0.S (_start): Fix use of FDPIC conditionals. Move the set of
+ gr11 outside the FDPIC conditional. Avoid clobbering gr4 too early.
+ 2003-11-14 Richard Sandiford <rsandifo@redhat.com>
+ * frv/crt0.S: Fix fdpic sp calculation.
+ 2003-11-05 Alexandre Oliva <aoliva@redhat.com>
+ * frv/crt0.S: Use __stacksize, not __stack, to initialize sp on
+ FDPIC. Update comments on computing _GLOBAL_OFFSET_TABLE_. Don't
+ fixup ctors nor dtors on FDPIC.
+ 2003-09-19 Alexandre Oliva <aoliva@redhat.com>
+ * frv/crt0.S (_start): Set up gr15 only for FDPIC.
+ * frv/crt0.S (_start): Save _GLOBAL_OFFSET_TABLE_ in gr17, and set
+ gr15 before function calls.
+ 2003-09-19 DJ Delorie <dj@redhat.com>, Alexandre Oliva <aoliva@redhat.com>
+ * frv/crt0.S (_start): Set up gr15 with _GLOBAL_OFFSET_TABLE_'s
+ value.
+
+2003-10-27 Bernardo Innocenti <bernie@develer.com>
+
+ * m68k/asm.h: Add macros for -fPIC, -msep-data and
+ -mid-shared-library support.
+ * m68k/crt0.S: Use macros for -fPIC, -msep-data and
+ -mid-shared-library support.
+ * m68k/sim-crt0.S: Likewise.
+
+2003-10-15 Bernardo Innocenti <bernie@develer.com>
+
+ * m68k/sim-funcs.c (_XOPEN_SOURCE): Define to get the pid_t
+ typedef from <unistd.h>.
+
+2003-08-26 Jason Merrill <jason@redhat.com>
+
+ * sparc/elfsim.ld: Fix __EH_FRAME_BEGIN__ definition.
+ * sparc/sparc86x.ld: Likewise.
+
+2003-08-20 Chris Demetriou <cgd@broadcom.com>
+
+ * mips/crt0_cfe.S: New file.
+ * mips/cfe_mem.c: New file.
+ * mips/cfe_prestart.S: Remove.
+ * mips/cfe.ld: Adjust to use crt0_cfe.o as the startup file, and
+ and use _start as the entry point. Align BSS to 32-byte boundary.
+ * mips/cfe.c: Reimplement to fit on top of a crt0_cfe.o file.
+ * mips/cfe_api.h (__libcfe_stack_size, __libcfe_mem_limit)
+ (__libcfe_meminit, __libcfe_stack_top): New prototypes.
+ * mips/Makefile.in (CFEOBJS): Replace cfe_prestart.o with cfe_mem.o.
+ (cfe.o, cfe_api.o, cfe_mem.o, crt0_cfe.o): New targets.
+ * mips/configure.in: Build and install crt0_cfe.o when CFE support
+ is built.
+ * mips/configure: Regenerate.
+
+2003-08-12 Jeff Johnston <jjohnstn@redhat.com>
+
+ * i386/cygmon-salib.c (unlink): New stub.
+
+2003-08-08 Mark Salter <msalter@redhat.com>
+
+ * i386/cygmon.ld: Add 4 byte alignment to __CTOR_LIST__
+
+ Bernd Schmidt <bernds@redhat.com>
+
+ * i386/cygmon.ld: Add entry for .rodata.
+
+2003-07-14 Kazuhiro Inaoka <inaoka.kazuhiro@renesas.com>
+
+ * m32r/configure.in: fixed bug to delete ../config-ml.in.
+
+2003-07-10 Alexandre Oliva <aoliva@redhat.com>
+
+ 2001-10-30 Jeff Johnston <jjohnstn@redhat.com>
+ * mn10300/asb2305.ld: Added ASB2305 support.
+ * mn10300/configure: Ditto.
+ * mn10300/configure.in: Ditto.
+ 2001-09-12 Stan Cox <scox@redhat.com>
+ * mn10300/asb2303.ld: New file. Linker script for the ASB2303
+ AM33/2.00 board.
+ * mn10300/configure.in: Add support for asb2303 board script.
+
+2003-07-08 Jeff Johnston <jjohnstn@redhat.com>
+
+ * configure.in: Reapply Kazuhiro Inaoko's multilib patch from
+ 04-17-03.
+ * configure: Regenerated.
+
+2003-06-23 Kazuhiro Inaoka <inaoka.kazuhiro@renesas.com>
+
+ * m32r/crt0.S (_start): Allow _stack to be placed anywhere
+ in memory.
+
+2003-06-06 Stan Cox <scox@redhat.com>
+ Jeff Johnston <jjohnstn@redhat.com>
+ Anthony Green <green@redhat.com>
+
+ * configure.in: Add iq2000 support.
+ * configure: Rebuilt.
+ * iq2000/Makefile.in, iq2000/access.c, iq2000/_exit.c,
+ iq2000/configure, iq2000/chmod.c, iq2000/chown.c, iq2000/close.c,
+ iq2000/configure.in, iq2000/creat.c, iq2000/crt0.S, iq2000/crt1.c,
+ iq2000/execv.c, iq2000/execve.c, iq2000/fork.c, iq2000/fstat.c,
+ iq2000/getpid.c, iq2000/gettime.c, iq2000/isatty.c, iq2000/kill.c,
+ iq2000/lseek.c, iq2000/open.c, iq2000/pipe.c, iq2000/read.c,
+ iq2000/sbrk.c, iq2000/sim.ld, iq2000/stat.c, iq2000/test.c,
+ iq2000/time.c, iq2000/times.c, iq2000/trap.c, iq2000/trap.h,
+ iq2000/unlink.c, iq2000/utime.c, iq2000/wait.c, iq2000/write.c:
+ New files.
+
+2003-05-27 Jeff Johnston <jjohnstn@redhat.com>
+
+ * libnosys/Makefile.in: Add errno.o.
+ * libnosys/errno.c: New file to supply errno definition if
+ one not provided yet.
+
+2003-05-26 Eric Christopher <echristo@redhat.com>
+
+ * mips/crt0.S: Remove stackbase variable set.
+
+2003-05-02 Eric Christopher <echristo@redhat.com>
+
+ * mips/cma101.c (__sizemem): Make sure that end is not in .sdata.
+
+2003-04-29 Nick Clifton <nickc@redhat.com>
+
+ * libnosys/sbrk.c: Remove unnecessary #include's.
+ Change return type of _sbrk() function to void * to match
+ definition in system header files.
+ Fix formatting.
+
+2003-04-23 Andrew Haley <aph@cambridge.redhat.com>
+
+ * xstormy16/sim_rom.ld: New.
+ * xstormy16/Makefile.in (SIM_SCRIPTS): Add sim_rom.ld.
+ * xstormy16/crt0.s (_int_reset): Copy ROM data to RAM.
+ * xstormy16/eva_app.ld (_rdata, _data): New.
+ * xstormy16/sim_high.ld (_rdata, _data): New.
+
+2003-04-17 Inaoka Kazuhiro <inaoka.kazuhiro@renesas.com>
+
+ * m32r/Makefile.in: Add multilib support.
+ * m32r/configure.in: Ditto.
+ * m32r/configure: Regenerated.
+
+2003-04-16 Nick Clifton <nickc@redhat.com>
+
+ * xstormy16/sim_high.ld: Add .jcr section mapping.
+ * xstormy16/eva_stub.ld: Likewise.
+ * xstormy16/eva_app.ld: Likewise.
+
+2003-04-09 Chris Demetriou <cgd@broadcom.com>
+
+ * mips/cfe.c (_flush_cache): New function.
+
+2003-02-18 Richard Sandiford <rsandifo@redhat.com>
+
+ * mips/nullmon.c (_ftext, _end): Adjust declaration.
+ (get_mem_info): Rework.
+
+2003-02-18 Richard Sandiford <rsandifo@redhat.com>
+
+ * mips/crt0.S (zerobss): Reload __memsize after call.
+
+2003-02-17 Chris Demetriou <cgd@broadcom.com>
+
+ * mips/cfe.c (__cfe_handle, __cfe_entrypt): Fix types.
+
+2003-02-05 Chris Demetriou <cgd@broadcom.com>
+
+ * mips/configure.in (mipsisa32el-*-*): Handle in the same way
+ as mipsisa32-*-*.
+ (mipsisa32r2-*-*, mipsisa32r2el-*-*): New, handled in the same
+ way as mipsisa32-*-*.
+ * mips/configure: Regenerate.
+
+2003-02-05 Chris Demetriou <cgd@broadcom.com>
+
+ * mips/cfe.c (hardware_hazard_hook): Move...
+ * mips/cfe_prestart.S (hardware_hazard_hook): To here,
+ and translate into assembly.
+
+2003-01-08 Richard Sandiford <rsandifo@redhat.com>
+
+ * mips/crt0.S (_start): Allocate 64 bytes of stack instead of 32.
+ Pass an empty argv and envp to main().
+
+2003-01-08 Richard Sandiford <rsandifo@redhat.com>
+
+ * mips/configure.in (mips64vr-elf, mips64vrel-elf): New config.
+ * mips/configure: Regenerate.
+
+2003-01-07 Chris Demetriou <cgd@broadcom.com>
+
+ * crt0.S: Check for definition of __mips64 rather than
+ checking (__mips < 3).
+ * pmon.S: Likewise.
+ * cygmon.c (sysCall): Avoid multi-line string literals.
+
+2002-11-12 Jeff Johnston <jjohnstn@redhat.com>
+
+ * mips/Makefile.in: Add cygmon support.
+ * mips/configure.in: Ditto.
+ * mips/configure: Regenerated.
+ * mips/crt0_cygmon.S: New file.
+ * mips/cygmon.c: Ditto.
+ * mips/pmon.S: Minor formatting and copyright changes.
+ * mips/crt0.S: Ditto.
+
+2002-11-08 Jeff Johnston <jjohnstn@redhat.com>
+
+ * arm/Makefile.in: Add support for new pid specs.
+ * arm/coff-iq80310.specs: Change to allow future support.
+ * arm/elf-iq80310.specs: Ditto.
+ * arm/elf-redboot.specs: Ditto.
+ * arm/coff-redboot.ld: Add EH frame support.
+ * arm/redboot-crt0.S: Add optional code to clear bss without
+ memset.
+ * arm/coff-pid.specs: New file.
+ * arm/elf-pid.specs: New file.
+
+2002-11-08 Jeff Johnston <jjohnstn@redhat.com>
+ Catherine Moore <clm@redhat.com>
+
+ * m32r/configure.in: Do not require gcc to be able to link an
+ executable.
+ * m32r/configure: Regenerate.
+ * m32r/Makefile.in: Directly reference gdbstub.
+
+2002-10-25 Bernd Schmidt <bernds@redhat.com>
+
+ * i386/cygmon.ld: Add entry for .gcc_except_table.
+
+2000-10-25 Mark Salter <msalter@redhat.com>
+
+ * i386/cygmon-crt0.S: Use __USER_LABEL_PREFIX__ for symbols. Always
+ use __start for start symbol.
+ * i386/cygmon-salib.c: Don't build __do_global_[cd]tors for AOUT.
+ Disable file I/O extensions to make Plum Hall happy.
+ * i386/cygmon.ld: Set __start as entry point.
+ * i386/Makefile.in: Support IS_AOUT.
+ * i386/configure.in: Support IS_AOUT.
+ * i386/configure: Regenerated.
+ * i386/cygmon-salib.c:
+ * i386/cygmon-gmon.c (_mcount): It's _etext.
+
+2002-10-25 Jeff Johnston <jjohnstn@redhat.com>
+
+ * configure.in: Clarify some of the triplets so unsupported
+ configurations don't pass through.
+ * configure: Regenerated.
+
+2002-10-18 Stephane Carrez <stcarrez@nerim.fr>
+
+ * m68hc11/syscalls.c (sbrk): Use ptrdiff_t for increment parameter.
+
+2002-10-07 Richard Sandiford <rsandifo@redhat.com>
+
+ * mips/ddb.ld: KEEP .init and .fini.
+ * mips/ddb-kseg0.ld: Likewise.
+
+2002-10-04 Michael Snyder <msnyder@redhat.com>
+
+ * m32r/m32r-lib.c (exceptionHandler): Fix computation of
+ exception vector address, as suggested by Mitsubishi.
+ (getExceptionVector): Ditto.
+
+2002-08-01 Chris Demetriou <cgd@broadcom.com>
+
+ * mips/cfe.ld (STARTUP): New definition.
+ * mips/ddb-kseg0.ld (STARTUP): Likewise.
+ * mips/ddb.ld (STARTUP): Likewise.
+ * mips/dve.ld (STARTUP): Likewise.
+ * mips/idt.ld (STARTUP): Likewise.
+ * mips/jmr3904app-java.ld (STARTUP): Likewise.
+ * mips/jmr3904app.ld (STARTUP): Likewise.
+ * mips/jmr3904dram-java.ld (STARTUP): Likewise.
+ * mips/jmr3904dram.ld (STARTUP): Likewise.
+ * mips/lsi.ld (STARTUP): Likewise.
+ * mips/nullmon.ld (STARTUP): Likewise.
+ * mips/pmon.ld (STARTUP): Likewise.
+
+2002-07-23 Stephane Carrez <stcarrez@nerim.fr>
+
+ * README: Mention 68HC11/68HC12 support.
+ * configure.in: Recognize m6811-elf and m6812-elf.
+ * configure: Regenerated.
+ * m68hc11/Makefile.in: New file.
+ * m68hc11/configure.in: New file.
+ * m68hc11/configure: New file.
+ * m68hc11/crt0.S: New file.
+ * m68hc11/sci-inout.S: New file for 68hc11/68hc12 sio.
+ * m68hc11/sim-valid-m68hc11.ld: New file.
+ * m68hc11/sim-valid-m68hc12.ld: New file.
+ * m68hc11/syscalls.c: New file.
+
+2002-07-22 Aldy Hernandez <aldyh@redhat.com>
+
+ * rs6000/simulator.S (gettimeofday): New.
+ (getrusage): New.
+
+2002-07-18 Chris Demetriou <cgd@broadcom.com>
+
+ * read.c (read): Don't assign past end of buffer, fix return value.
+
+2002-07-12 Chris Demetriou <cgd@broadcom.com>
+
+ * mips/Makefile.in (GENOBJS2): New variable to name other
+ commonly used objects.
+ (DVEOBJS, JMR3904OBJS): Reference GENOBJS2.
+
+ * mips/Makefile.in: Add support for Broadcom CFE firmware.
+ * mips/configure.in: (mipsisa32*-*-*, *): Likewise.
+ * mips/configure: Regenerate.
+ * mips/cfe.c: New file.
+ * mips/cfe.ld: New file.
+ * mips/cfe_api.c: New file.
+ * mips/cfe_api.h: New file.
+ * mips/cfe_api_int.h: New file.
+ * mips/cfe_error.h: New file.
+ * mips/cfe_prestart.S: New file.
+
+2002-07-12 Chris Demetriou <cgd@broadcom.com>
+
+ * mips/array.ld (hardware_exit_hook, hardware_hazard_hook): New
+ symbols for optionally-provided functions.
+ * mips/ddb-kseg0.ld: Likewise.
+ * mips/ddb.ld: Likewise.
+ * mips/dve.ld: Likewise.
+ * mips/idt.ld: Likewise.
+ * mips/idt32.ld: Likewise.
+ * mips/idt64.ld: Likewise.
+ * mips/idtecoff.ld: Likewise.
+ * mips/jmr3904app-java.ld: Likewise.
+ * mips/jmr3904app.ld: Likewise.
+ * mips/jmr3904dram-java.ld: Likewise.
+ * mips/jmr3904dram.ld: Likewise.
+ * mips/lsi.ld: Likewise.
+ * mips/nullmon.ld: Likewise.
+ * mips/pmon.ld: Likewise.
+ * mips/crt0.S: Invoke hardware_exit_hook and hardware_hazard_hook
+ functions if they are provided.
+ (_exit): Handle __embedded_pic properly.
+
+2002-06-18 Dave Brolley <brolley@redhat.com>
+
+ From Catherine Moore, Michael Meissner, Richard Sandiford:
+ * configure.in: Support frv*-*-*.
+ * frv/Makefile.in: New file.
+ * frv/configure: New file.
+ * frv/configure.in: New file.
+ * frv/crt0.S: New file.
+ * frv/fstat.c: New file.
+ * frv/getpid.c: New file.
+ * frv/isatty.c: New file.
+ * frv/kill.c: New file.
+ * frv/print.c: New file.
+ * frv/putnum.c: New file.
+ * frv/sbrk.c: New file.
+ * frv/sim-close.S: New file.
+ * frv/sim-exit.S: New file.
+ * frv/sim-inbyte.c: New file.
+ * frv/sim-lseek.S: New file.
+ * frv/sim-open.S: New file.
+ * frv/sim-read.S: New file.
+ * frv/sim-time.c: New file.
+ * frv/sim-unlink.S: New file.
+ * frv/sim-write.S: New file.
+ * frv/stat.c: New file.
+
+2002-05-11 Thomas Fitzsimmons <fitzsim@redhat.com>
+
+ * libnosys/acconfig.h (HAVE_SECTION_ATTRIBUTES): New macro.
+ * libnosys/configure.in: Check gcc's support for section attributes.
+ * libnosys/warning.h: Have link_warning expand to nothing if gcc
+ does not support section attributes.
+
+2002-04-22 Jonathan Larmour <jlarmour@redhat.com>
+
+ * arm/syscall.h: New file. To define extra syscall values for RedBoot.
+
+ * arm/redboot-syscalls.c (_close): Fix setting of errno value.
+ (_lseek): Ditto.
+ (_open): Ditto.
+ (_write): Ditto.
+ (_read): Ditto.
+ (_rename): New function.
+ (_system): Ditto.
+ (_stat): Ditto.
+ (_unlink): Call a syscall for this now.
+ (isatty): Ditto.
+ (_fstat): Ditto.
+ (_gettimeofday): Ditto.
+
+2002-04-17 Joel Sherrill <joel@OARcorp.com>
+
+ * debug.h: Change mem_err to volatile to match definition in
+ debug.c.
+
+2002-04-17 Joel Sherrill <joel@OARcorp.com>
+
+ * sparc/cygmon-salib.c, sparc/erc32-stub.c: Don't use multi-line
+ strings.
+
+2002-04-16 Jeff Johnston <jjohnstn@redhat.com>
+
+ * m68k/configure.in: Change to use LIB_AC_PROG_CC instead
+ of AC_PROG_CC to avoid building an executable in configuration.
+ * m68k/configure: Regenerated.
+
+2002-04-15 Hans-Peter Nilsson <hp@bitrange.com>
+
+ * d30v/syscalls.c: #include <time.h>. Don't use multi-line
+ strings.
+
+2002-04-15 Hans-Peter Nilsson <hp@bitrange.com>
+
+ * m32r/trapmon0.c (__trap0): Don't use multi-line strings.
+
+2002-02-05 Mark Salter <msalter@redhat.com>
+
+ * arm/elf-iq80310.specs: Ditto.
+ * arm/elf-redboot.specs: Ditto.
+ * arm/elf-redboot.ld: Fix eh_frame sections. Add .jcr section.
+ * arm/redboot-crt0.S: Add support for __USES_INITFINI__.
+
+2002-02-01 Geoffrey Keating <geoffk@redhat.com>
+
+ * xstormy16/Makefile.in (SIM_OBJS): Remove sbrk.o, add
+ sim_malloc_start.o.
+ * xstormy16/eva_app.ld: Add __malloc_start.
+ * xstormy16/sbrk.c: Remove.
+ * xstormy16/sim_malloc_start.s: New file.
+ * xstormy16/sim_high.ld: Make the stack start immediately at the
+ end of the program.
+
+2002-02-01 Michael Meissner <meissner@redhat.com>
+
+ * mips/cma101.c (__sizemem_default): Allow user to specify the
+ memory size.
+ (__sizemem): Use it.
+
+2002-01-24 Mark Salter <msalter@redhat.com>
+
+ * arm/redboot-crt0.S: Use __get_memtop to put stack in high memory.
+
+ * arm/redboot-syscalls.c (_times): Unconditionally use SYS_times.
+ (__get_memtop): New funtion to return top of memory.
+
+2002-01-15 Mark Salter <msalter@redhat.com>
+
+ * xstormy16/eva_stub.ld: Provide interrupt routine symbols which
+ forward interrupts to user application vectors.
+
+ * xstormy16/crt0_stub.s: Remove default interrupt routines.
+
+ * xstormy16/Makefile.in: Rename stub app to eva_stub.elf and
+ add it to install list.
+
+2002-01-07 Mark Salter <msalter@redhat.com>
+
+ * configure.in: Add support for arm, strongarm, and xscale.
+ * configure: Regenerated.
+ * arm/coff-iq80310.specs: New file.
+ * arm/coff-redboot.ld: New file.
+ * arm/coff-redboot.specs: New file.
+ * arm/configure: New file.
+ * arm/configure.in: New file.
+ * arm/elf-iq80310.specs: New file.
+ * arm/elf-redboot.ld: New file.
+ * arm/elf-redboot.specs: New file.
+ * arm/Makefile.in: New file.
+ * arm/redboot-crt0.S: New file.
+ * arm/redboot-syscalls.c: New file.
+
+2001-12-22 Geoffrey Keating <geoffk@redhat.com>
+ Mark Salter <msalter@redhat.com>
+ Catherine Moore <clm@redhat.com>
+ Richard Henderson <rth@redhat.com>
+
+ * configure.in: Add xstormy16.
+ * libnosys/configure.in: Add xstormy16.
+ * configure: Regenerated.
+ * libnosys/configure: Regenerated.
+ * xstormy16/Makefile.in: New file.
+ * xstormy16/close.c: New file.
+ * xstormy16/configure: New file.
+ * xstormy16/configure.in: New file.
+ * xstormy16/crt0.s: New file.
+ * xstormy16/crt0_stub.s: New file.
+ * xstormy16/crti.s: New file.
+ * xstormy16/crtn.s: New file.
+ * xstormy16/eva_app.c: New file.
+ * xstormy16/eva_app.ld: New file.
+ * xstormy16/eva_stub.ld: New file.
+ * xstormy16/fstat.c: New file.
+ * xstormy16/getpid.c: New file.
+ * xstormy16/kill.c: New file.
+ * xstormy16/lseek.c: New file.
+ * xstormy16/open.c: New file.
+ * xstormy16/sbrk.c: New file.
+ * xstormy16/sim_high.ld: New file.
+ * xstormy16/stat.c: New file.
+ * xstormy16/syscalls.S: New file.
+ * xstormy16/syscalls.m4: New file.
+ * xstormy16/unlink.c: New file.
+ * xstormy16/xstormy16_stub.c: New file.
+
+2001-10-31 Jeff Johnston <jjohnstn@redhat.com>
+
+ * m32r/Makefile.in: Use gdb stub set by configure.
+ * m32r/configure.in: Add a special macro for testing
+ c compiler without building executable. Add setting of
+ GDBSTUB.
+ * m32r/configure: Regenerated.
+
+2001-10-31 David Howells <dhowells@redhat.com>
+
+ * syscall.h: Added SYS_times, SYS_gettimeofday, SYS_link values.
+ * mn10300/times.c: Renamed "times" to "_times" so that it can be
+ referenced by newlib.
+ * mn10300/cygmon.c: New file.
+ * mn10300/crt0_redboot.S: Ditto.
+ * mn10300/crt0_cygmon.S: Ditto.
+ * mn10300/Makefile.in: Added RedBoot and Cygmon support.
+ * mn10300/configure.in: Changed to allow for future
+ evaluation boards to be added.
+ * mn10300/configure: Regenerated.
+
+2001-10-17 Michael Meissner <meissner@redhat.com>
+
+ * regs.S (K0BASE_ADDR,K1BASE_ADDR): Define as addresses to
+ identify if a program is running in kernel segment 0.
+
+ * cma101.c (__sizemem): If we are running in kernel segment 0,
+ instead of kernel segment 1, use kernel segment 0 addresses which
+ are uncached when sizing memory.
+
+ * ddb-kseg0.ld: New file, clone of ddb.ld, except it links the
+ program to run in kernel segment 0, instead of kernel segment 1.
+
+ * configure.in: Treat ddb-kseg0.ld like ddb.ld.
+ * configure: Regenerate.
+
+2001-09-15 Eric Christopher <echristo@redhat.com>
+
+ * mips/configure.in (LIB_AC_PROG_CC): Fix typo in mipsisa32 to
+ mipsisa32*.
+ * mips/configure: Regenerate.
+
+2001-09-14 Eric Christopher <echristo@redhat.com>
+
+ * mips/configure.in: Add mipsisa32 support.
+ * mips/configure: Regenerate.
+ * mips/idt32.ld: New file.
+ * mips/idt64.ld: New file.
+
+2001-09-11 Michael Meissner <meissner@redhat.com>
+
+ * mips/crt0.S (_start): If -mfp32, don't enable 64-bit floating
+ point registers, even if we are compiling for a mips3 or greater.
+
+2001-09-10 Jim Blandy <jimb@redhat.com>
+
+ Add support for GDB monitor-style I/O.
+ * m68k/idp-outbyte.c (raw_outbyte): Renamed from outbyte; made
+ static.
+ (outbyte): Call raw_outbyte; if GDB_MONITOR_OUTPUT is #defined,
+ precede the byte with a ^O character.
+ * m68k/idpgdb.ld: New linker script.
+ * m68k/Makefile.in (IDPGDB_LDFLAGS, IDPGDB_BSP, IDPGDB_OBJS): New
+ variables.
+ (all): Add ${IDPGDB_BSP} to the list of things to build.
+ (${IDPGDB_BSP}, idp-gdb-outbyte.o, idpgdb-test.x,
+ idpgdb-test.srec, idpgdb-test.dis, idpgdb-test): New rules.
+ (install): Install the IDPGDB stuff, too.
+
+2001-08-30 Richard Henderson <rth@redhat.com>
+ Eric Christopher <echristo@redhat.com>
+
+ * mips/crt0.S: Fix for .init/.fini sections.
+
+2001-08-30 Richard Henderson <rth@redhat.com>
+ Eric Christopher <echristo@redhat.com>
+
+ * mips/idt.ld: Rewrite for .init/.fini sections.
+
+2001-08-22 Jonathan Larmour <jlarmour@redhat.com>
+
+ * mips/Makefile.in (jmr3904-io.o): Remove bogus use of `-mips3.'
+
+2001-07-18 Jeff Johnston <jjohnstn@redhat.com>
+
+ * hp74x/configure: Regenerated with current autoconf.
+ * m32r/configure: Ditto.
+ * m68k/configure: Ditto.
+ * pa/configure: Ditto.
+ * sparc/configure: Ditto.
+
+2001-03-08 Geoffrey Keating <geoffk@redhat.com>
+
+ * rs6000/simulator.S (dup): New syscall.
+
+2001-02-28 Will Cohen <wcohen@redhat.com>
+
+ * src/libgloss/m68k/Makefile.in: Updated copyright and
+ added rules to build simulator related libraries.
+ (SIM_SCRIPTS): New variable.
+ (SIM_LDFLAGS): New variable.
+ (SIM_BSP): New variable.
+ (SIM_CRT0): New variable.
+ (SIM_OBJS): New variable.
+ (SIM_TEST): New variable.
+ (SIM_INSTALL): new variable.
+ * src/libgloss/m68k/sim-abort.c: New file.
+ * src/libgloss/m68k/sim-crt0.S: New file.
+ * src/libgloss/m68k/sim-errno.c: New file.
+ * src/libgloss/m68k/sim-funcs.c: New file.
+ * src/libgloss/m68k/sim-inbyte.c: New file.
+ * src/libgloss/m68k/sim-print.c: New file.
+ * src/libgloss/m68k/sim-sbrk.c: New file.
+ * src/libgloss/m68k/sim.ld: New file.
+ * src/libgloss/m68k/simulator.S: New file.
+
+2001-02-22 Jeff Johnston <jjohnstn@redhat.com>
+
+ * mn10200/access.c: With DJ Delorie's permission, this code is
+ now freely modifiable with no reference to "copying.dj".
+ * mn10300/access.c: Ditto.
+
+2001-02-06 Will Cohen <wcohen@redhat.com>
+
+ * rs6000/sim-errno.c (__errno): Removed.
+ (_cerror): Use re-entrant version of errno.
+
+2000-09-05 Geoff Keating <geoffk@cygnus.com>
+
+ * rs6000/simulator.S: Use conditional returns for documentation
+ purposes.
+ (access): Add new syscall.
+
+Wed May 24 16:47:12 2000 Alexandre Oliva <aoliva@cygnus.com>
+
+ * mn10300/time.c (time): Set *tloc, since the sim doesn't.
+
+Mon Jan 31 18:45:26 2000 Donald Lindsay <dlindsay@cygnus.com>
+
+ * mips/crt0.S: If compiled into a mips2 multilib, sets processor
+ status register for 32 bit addressing
+ * mips/regs.S: Add symbols for status and config register fields.
+ * mips/vr5xxx.S: Variant of vr300.S with extensions to __cpu_flush()
+ to cope with Vr5000 secondary cache and with Vr5432 CACHE instruction.
+ * mips/Makefile.in: Add rule for forming vr5xxx.o.
+ * mips/configure.in: Add case arm for mips64vr5000 since the
+ default (which was previously used) should not get vr5xxx.o.
+
+Wed Dec 22 19:08:09 1999 Christopher Faylor <cgf@cygnus.com>
+
+ * wince/Makefile.am: Use LDADD from configure.
+ * wince/Makefile.in: Regenerate.
+ * wince/configure.in: Determine libraries needed based (crudely) on
+ target.
+ * wince/configure: Regenerate.
+
+1999-12-16 Tom Tromey <tromey@cygnus.com>
+
+ * mips/Makefile.in (jmr3904-io.o): Don't compile with `-mips3'.
+
+ * mips/jmr3904-io.c: Actually completed merge of Andrew Haley's
+ patch of 1998-11-23.
+
+ * mips/jmr3904dram-java.ld: Provide _Jv_QthreadsStackSize. Link
+ against -lgcjcoop, not -lqthreads.
+ * mips/jmr3904app-java.ld: Provide _Jv_QthreadsStackSize.
+
+1999-12-16 Brendan Kehoe <brendan@cygnus.com>
+
+ * m68k/idp.ld: Only use specific .dtors and .ctors uses of KEEP,
+ without the bits for __{C,D}TOR_{LIST,END}__.
+
+1999-12-14 Geoff Keating <geoffk@cygnus.com>
+
+ * m68k/idp.ld (.text): Put crtbegin at the start of the
+ constructors and destructors.
+
+Mon Nov 29 12:14:48 1999 Christopher Faylor <cgf@cygnus.com>
+
+ * wince/Makefile.am: Add missing gdbdir assignment.
+ * wince/Makefile.in: Regenerate.
+
+1999-11-22 Gavin Romig-Koch <gavin@cygnus.com>
+
+ * mips/idt.ld: Remove the OUTPUT_ARCH("mips:4000") directive.
+
+1999-11-15 Nick Clifton <nickc@cygnus.com>
+
+ * configure.in: Add arm-wince-pe target.
+ * configure: Regenerate.
+
+1999-11-11 Brendan Kehoe <brendan@cygnus.com>
+
+ * sparc/elfsim.ld (.text): Also provide __EH_FRAME_BEGIN__ since we're
+ not bringing in crtbegin.o.
+ * sparc/sparc86x.ld (.text): Likewise. Add initp support.
+
+1999-10-30 Geoffrey Keating <geoffk@cygnus.com>
+
+ * mips/crt0.S: Handle -membedded-pic properly. Set the $gp much
+ earlier because it'll be needed. Set the high bits of the PC to
+ be consistent with other pointers, so that exception handling
+ doesn't get confused.
+
+1999-09-27 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * sparc/crt0.s: Delete. This file is obsolete and caused problems
+ on case-insensitive windows filesystems.
+
+Wed Sep 22 15:59:17 1999 Christopher Faylor <cgf@cygnus.com>
+
+ * configure.in: Generalize Windows CE target detection.
+ * configure: Regenerate.
+ * wince/Makefile.am: Rename CE stub filename.
+ * wince/Makefile.in: Regenerate.
+ * wince/configure.in: Allow changing of CE stub.
+ * wince/configure: Regenerate.
+
+1999-07-26 Andrew Haley <aph@cygnus.com>
+
+ * m32r/crt0.S (_start): Use a full word immediate for __bss_start
+ and _end to allow them to be placed anywhere in memory.
+
+1999-07-08 Jason Merrill <jason@yorick.cygnus.com>
+
+ * sparc/elfsim.ld: Provide initp support.
+
+1999-06-22 Nick Clifton <nickc@cygnus.com>
+
+ * mips/dve.ld (.rdata): Rename section to .rodata.
+ * mips/idt.ld (.rdata): Rename section to .rodata.
+ * mips/jmr3904app-java.ld (.rdata): Rename section to .rodata.
+ * mips/jmr3904app.ld (.rdata): Rename section to .rodata.
+ * mips/lsi.ld (.rdata): Rename section to .rodata.
+ * mips/nullmon.ld (.rdata): Rename section to .rodata.
+ * mips/pmon.ld (.rdata): Rename section to .rodata.
+ * mips/r5900.ld (.rdata): Rename section to .rodata.
+ * mips/sky.ld (.rdata): Rename section to .rodata.
+ * mips/vpu.ld (.rdata): Rename section to .rodata.
+
+Tue Jun 01 16:57:46 1999 Jeff Johnston <jjohnstn@cygnus.com>
+
+ * libnosys/configure.in: Added setting of ac_file
+ prior to calling config-ml.in.
+ * libnosys/configure: Regenerated.
+ * libnosys/Makefile.in: Added code to make install directory
+ for libnosys.a prior to installing.
+
+Wed May 26 17:22:46 1999 Christopher Faylor <cgf@cygnus.com>
+
+ * Makefile.am: Expect the object file to be in the
+ current directory.
+ * Makefile.in: Regenerate.
+
+Tue May 25 14:35:21 1999 Christopher Faylor <cgf@cygnus.com>
+
+ * configure.in: Add wince targest.
+ * configure: Regenerate.
+ * wince: New directory
+ * wince/Makefile.am: New file.
+ * wince/Makefile.in: New file.
+ * wince/aclocal.m4: New file.
+ * wince/configure: New file.
+ * wince/configure.in: New file.
+
+1999-05-24 Jim Wilson <wilson@cygnus.com>
+
+ * sparc/elfsim.ld: Add `.data.*'.
+
+1999-05-22 Jason Merrill <jason@yorick.cygnus.com>
+
+ * m68k/idp.ld: Add initp support.
+ * sparc/cygmon.ld.src: Likewise.
+
+1999-05-14 Nick Clifton <nickc@cygnus.com>
+
+ * mcore/syscalls.S (_sbrk): Round to 8 bytes not 4.
+
+1999-05-13 Mark Salter <msalter@cygnus.com>
+
+ * mcore/configure.in: Fixed multilib support.
+ * mcore/configure: Regenerated.
+ * mcore/Makefile.in: Fixed multilib problems.
+ Added cmb board support
+ * mcore/close.c: New file.
+ * mcore/cmb-exit.c: Ditto.
+ * mcore/cmb-inbyte.c: Ditto.
+ * mcore/cmb-outbyte.c: Ditto.
+ * mcore/elf-cmb.ld: Ditto.
+ * mcore/elf-cmb.specs: Ditto.
+ * mcore/fstat.c: Ditto.
+ * mcore/getpid.c: Ditto.
+ * mcore/kill.c: Ditto.
+ * mcore/lseek.c: Ditto.
+ * mcore/open.c: Ditto.
+ * mcore/pe-cmb.ld: Ditto.
+ * mcore/pe-cmb.specs: Ditto.
+ * mcore/print.c: Ditto.
+ * mcore/putnum.c: Ditto.
+ * mcore/raise.c: Ditto.
+ * mcore/read.c: Ditto.
+ * mcore/sbrk.c: Ditto.
+ * mcore/stat.c: Ditto.
+ * mcore/unlink.c: Ditto.
+ * mcore/write.c: Ditto.
+ * mcore/c-syscalls.c: Removed.
+
+1999-05-07 Nick Clifton <nickc@cygnus.com>
+
+ * mcore/syscalls.S (_write): Use 0x50FF instead of trap 1.
+ Tidy up code layout.
+
+1999-05-06 Nick Clifton <nickc@cygnus.com>
+
+ * mcore/Makefile.in: Fix build rule.
+ * mcore/syscalls.s: Rename to syscalls.S
+
+1999-05-04 Nick Clifton <nickc@cygnus.com>
+
+ * mcore/configure.in: Depend upon crt0.S not crt0.s.
+ * mcore/configure: Regenerate.
+
+1999-04-29 Nick Clifton <nickc@cygnus.com>
+
+ * mcore/crt0.S: Renamed file from crt0.s.
+ Only invoke init() and fini() routines for ELF builds.
+ Use __bss_start__ and __bss_end__ to locate .bss section.
+
+1999-04-26 Angela Marie Thomas <angela@cygnus.com>
+
+ * mips/array.ld: Fix ELF ctor/dtor support.
+ * mips/ddb.ld: Likewise.
+ * mips/dve.ld: Likewise.
+ * mips/idt.ld: Likewise.
+ * mips/jmr3904app.ld: Likewise.
+ * mips/lsi.ld: Likewise.
+ * mips/nullmon.ld: Likewise.
+ * mips/pmon.ld: Likewise.
+ * mips/r5900.ld: Likewise.
+ * mips/sky.ld: Likewise.
+ * mips/vpu.ld: Likewise.
+
+1999-04-22 Nick Clifton <nickc@cygnus.com>
+
+ * mcore/crt0.s: Initialise data section, call _init and _fini.
+
+ * mcore/syscalls.s (_exit): Renamed from __exit.
+
+ * fr30/crt0.s (_start): Initialise arg[cv] after calling _init and
+ atexit.
+
+1999-04-21 Nick Clifton <nickc@cygnus.com>
+
+ * mcore/crt0.s (_start): Use .long directive, not .word.
+
+ * mcore/syscalls.s (_sbrk): fix syntax.
+
+1999-04-20 Jason Molenda (jsm@bugshack.cygnus.com)
+
+ * sparc/sparc86.ld: Set alignment for the .data section.
+
+1999-04-18 Nick Clifton <nickc@cygnus.com>
+
+ * configure.in: Add support for mcore targets.
+ * configure: Regenerate.
+ * mcore: New directory.
+ * mcore/Makefile.in: New File: meta Makefile.
+ * mcore/configure.in: New File: meta configure file..
+ * mcore/configure: New File: Generated.
+ * mcore/crt0.s: New File: mcore startup code.
+ * mcore/syscalls.s: New File: Assembler system call stubs.
+ * mcore/c-syscalls.c: New File: C system call stubs.
+
+Tue Apr 13 17:20:34 1999 Catherine Moore <clm@cygnus.com>
+
+ * mips/array.ld: Support linkonce sections.
+ * mips/ddb.ld: Likewise.
+ * mips/dve.ld: Likewise.
+ * mips/idt.ld: Likewise.
+ * mips/jmr3904app.ld: Likewise.
+ * mips/jmr3904app-java.ld: Likewise.
+ * mips/jmr3904dram.ld: Likewise.
+ * mips/jmr3904dram-java.ld: Likewise.
+ * mips/lsi.ld: Likewise.
+ * mips/nullmon.ld: Likewise.
+ * mips/pmon.ld: Likewise.
+ * mips/r5900.ld: Likewise.
+ * mips/sky.ld: Likewise.
+ * mips/vpu.ld: Likewise.
+
+Mon Apr 12 21:01:46 1999 Catherine Moore <clm@cygnus.com>
+
+ * mips/array.ld: Add ELF ctor/dtor support.
+ * mips/ddb.ld: Likewise.
+ * mips/dve.ld: Likewise.
+ * mips/idt.ld: Likewise.
+ * mips/jmr3904app.ld: Likewise.
+ * mips/lsi.ld: Likewise.
+ * mips/nullmon.ld: Likewise.
+ * mips/pmon.ld: Likewise.
+ * mips/r5900.ld: Likewise.
+ * mips/sky.ld: Likewise.
+ * mips/vpu.ld: Likewise.
+
+Sun Apr 11 00:43:34 1999 Jim Wilson <wilson@cygnus.com>
+
+ * i960/crt0.c (_start): Increase stack size to 256K.
+
+Wed Mar 31 17:56:41 1999 Bob Manson <manson@charmed.cygnus.com>
+
+ * i386/cygmon-salib.c: Add read and write syscall support.
+ * i386/cygmon-syscall.h: Ditto.
+
+ * i386/cygmon-gmon.[ch]: Profile support.
+
+Sun Feb 28 23:39:32 1999 Geoffrey Noer <noer@cygnus.com>
+
+ * libnosys/configure.in: Check cygwin*, not cygwin32.
+ * libnosys/configure: Regenerate.
+
+1999-02-18 Tom Tromey <tromey@cygnus.com>
+
+ * mips/configure: Rebuilt.
+ * mips/configure.in (script_list): Added jmr3904dram-java and
+ jmr3904app-java.
+ * mips/jmr3904dram-java.ld: New file.
+ * mips/jmr3904dram.ld: Don't mention -lqthreads.
+ * mips/jmr3904app-java.ld: New file.
+ * mips/jmr3904app.ld: Don't mention -lgcjcoop.
+
+Wed Feb 17 13:27:24 1999 Jim Wilson <wilson@cygnus.com>
+
+ * m68k/crt0.S (start): Use jpbl not jmi in coldfire code.
+
+1999-02-18 Tom Tromey <tromey@cygnus.com>
+
+ * Merge from branch:
+
+ Tue Feb 16 12:57:06 PST 1999 Angela Marie Thomas <angela@cygnus.com>
+
+ * mips/jmr3904app.ld: Change -lqthreads to -lgcjcoop due to
+ library name change.
+
+ Thu Feb 4 16:15:44 1999 Warren Levy <warrenl@cygnus.com>
+
+ * mips/configure.in (script_list): Added jmr3904dram.ld.
+ * mips/configure: Rebuilt.
+
+ Thu Jan 21 19:11:45 1999 Warren Levy <warrenl@cygnus.com>
+
+ * mips/jmr3904dram.ld: Created.
+
+ Wed Dec 30 11:15:46 1998 Anthony Green <green@cygnus.com>
+
+ * mips/jmr3904app.ld: libgcc is dependent on libqthreads, so
+ it must be linked it.
+
+ Wed Dec 30 11:04:54 1998 Anthony Green <green@cygnus.com>
+
+ * mips/jmr3904app.ld: Make sure the stack owns all 8k plus
+ the padding allocated for alignment.
+
+ 1998-11-23 Andrew Haley <aph@viagra.cygnus.co.uk>
+
+ * mips/jmr3904-io.c: change get_mem_info() to use _mem_size
+ imported from the linker script.
+ * mips/jmr3904app.ld: Provide _mem_size.
+
+ * mips/jmr3904app.ld: Allocate 8k bytes for stack.
+
+ 1998-11-19 Andrew Haley <aph@viagra.cygnus.co.uk>
+
+ * mips/crt0.S: set argc to 0 before calling main()
+ * get_mem_info() was incorrect; jmr3904 has 1M max of SRAM.
+
+ Wed Nov 4 15:28:44 1998 Anthony Green <green@cygnus.com>
+
+ * mips/jmr3904-io.c: Implement get_mem_info().
+
+ Wed Nov 4 15:22:41 1998 Anthony Green <green@cygnus.com>
+
+ * mips/Makefile.in: Rename libtx39jmr.a to libjmr3904.a.
+ * mips/configure.in: Ditto.
+ * mips/configure: Regenerate.
+
+ Tue Nov 3 15:39:14 1998 Angela Marie Thomas (angela@cygnus.com)
+
+ * mips/configure.in: Add jmr3904app to script list for tx39.
+ * mips/configure: Regenerate.
+
+1999-02-08 Nick Clifton <nickc@cygnus.com>
+
+ * libnosys/configure.in: Add support for StrongARM target.
+ * libnosys/configure: Regenerate.
+
+Thu Feb 4 10:56:59 1999 Jeff Johnston <jjohnstn@cygnus.com>
+
+ * d30v/syscalls.c (time): Added code to honor argument
+ passed to time which is either a pointer to a time_t
+ value to set or is the NULL pointer.
+
+1999-02-03 Keith Seitz <keiths@cygnus.com>
+
+ * m32r/m32r-lib.c (rx_char): Rename rx_uchar and return
+ only unsigned chars.
+ (getDebugChar2): Remove and integrate support into "M"
+ packet code.
+
+1999-01-29 Doug Evans <devans@casey.cygnus.com>
+
+ * sparc/erc32-crt0.S (_exit): Set magic number for simulator.
+ * sparc/traps.S (win_flush): Make sure %sp is valid before flushing
+ all windows.
+
+Tue Jan 19 06:19:51 1999 Jeffrey A Law (law@cygnus.com)
+
+ * mn10300/crt0.S: Use ".stack" for the name of the stack section,
+ not "._stack". Remove mn10200 support.
+ * mn10300/trap.S: Remove mn10200 support.
+ * mn10300/sim.ld: Collect *(.stack) *(._stack) input sections into
+ the .stack output section to be safe.
+ * mn10300/eval.ld: Likewise.
+
+ * mn10200/crt0.S: Use ".stack" for the name of the stack section,
+ not "._stack".
+ * mn10200/sim.ld: Collect *(.stack) *(._stack) input sections into
+ the .stack output section to be safe.
+ * mn10200/eval.ld: Likewise.
+
+1999-01-14 Nick Clifton <nickc@cygnus.com>
+
+ * fr30/Makefile.in: Set target of install to be SIM_INSTALL not
+ MON_INSTALL.
+
+ * fr30/crt0.s (_start): Use atexit to call C++ global
+ destructors. Patch from Mark Salter <msalter@cygnus.com>
+
+1999-01-12 Nick Clifton <nickc@cygnus.com>
+
+ * fr30/crt0.s: Remove .stack section - it is no longer necessary.
+
+1999-01-11 Nick Clifton <nickc@cygnus.com>
+
+ * fr30/crt0.s (_start): Add calls to _init and _fini for C++
+ global constructor/destructor support.
+
+1999-01-07 Nick Clifton <nickc@cygnus.com>
+
+ * fr30/crt0.s (_start): Apply patch from Mark Salter
+ <msalter@cygnus.com> to cope with initialising .bss areas that are
+ not word sized.
+
+1998-12-23 Michael Meissner <meissner@cygnus.com>
+
+ * m68k/idp.ld (.eh_frame): Add section to the .text segment.
+ (__{INIT,FINI}__SECTION__): Align to a 4 byte boundary.
+ (.gcc_except_table): Ditto.
+
+Mon Dec 21 22:45:05 1998 Mark Alexander <marka@cygnus.com>
+
+ * sh/sh1lcevb.ld: Add DWARF sections.
+ * sh/sh2lcevb.ld: Ditto.
+ * sh/sh3lcevb.ld: Ditto.
+ * sh/sh3bb.ld: Ditto.
+
+Fri Dec 18 22:07:21 1998 Bob Manson <manson@charmed.cygnus.com>
+
+ * i386/cygmon.ld: Make sure -lcygmon appears both before
+ and after -lc, so we pick up functions from there in
+ preference to libc functions.
+
+ * i386/cygmon-salib.c: Add syscalls for time and gettimeofday.
+ Don't add __do_global_ctors () and __do_global_dtors () if
+ we're on a coff target.
+ (open): Add dummy function so plumhall will compile.
+ (clock): Replacement for clock () syscall that uses
+ gettimeofday().
+
+
+1998-12-18 Gavin Romig-Koch <gavin@cygnus.com>
+
+ * mips/Makefile.in, mips/vr4300.S: Move the -mips3 into vr4300.S.
+
+1998-12-17 Nick Clifton <nickc@cygnus.com>
+
+ * fr30/syscalls.c: Include ../syscall.h not ../../sim/fr30/targ-vals.h
+ (_open): Return file descriptor allocated by simulator.
+ (isatty): Always false to avoid having to cope with reads from
+ stdin. For Now...
+
+1998-12-16 Nick Clifton <nickc@cygnus.com>
+
+ * fr30/Makefile.in: Add libraries to clean target.
+
+ * fr30/syscalls.c (_write): Save length so that it can be returned
+ to caller.
+
+ * fr30/crt0.s (_start): Initialise argc, argv and envp before
+ calling main().
+
+1998-12-15 Gavin Romig-Koch <gavin@cygnus.com>
+
+ * mips/ddb.ld (OUTPUT_ARCH): Remove.
+
+1998-12-12 Nick Clifton <nickc@cygnus.com>
+
+ * fr30/syscalls.c: Remove stub for abort and add stubs for _kill
+ and _getpid.
+
+1998-12-11 Nick Clifton <nickc@cygnus.com>
+
+ * configure.in: Add support for fr30 target.
+ * configure: Regenerate.
+ * fr30: New directory.
+ * fr30/Makefile.am: New file - build crt0.o and libsim.a
+ * fr30/Makefile.in: New file - generate from Makefile.am.
+ * fr30/configure.in: New file - support fr30 target
+ * fr30/configure: New file - generate from configure.in.
+ * fr30/crt0.s: New file - Basic executable startup code.
+ * fr30/syscalls.c: New file - System call emulation library.
+
+1998-12-11 Gavin Romig-Koch <gavin@cygnus.com>
+
+ * mips/crt0.S (_start): Change initialization of FR.
+
+1998-12-08 James E Wilson <wilson@wilson-pc.cygnus.com>
+
+ * i960/crt0.c (set_stack): Change return type to void. Init SP to
+ FP + 64 instead of FP. Simplify code to align ptr.
+ (_start): Call exit instead of _exit. Delete local variable stack.
+ Init stack to heap+4096.
+ * i960/mon960.c (abort): Ifdef out.
+ * i960/syscall.h: New file.
+
+1998-12-04 Ken Raeburn <raeburn@cygnus.com>
+
+ * mips/cma101.c (time): Add heuristic to handle Y2K overflow.
+
+Tue Dec 1 17:57:52 1998 Stan Shebs <shebs@andros.cygnus.com>
+
+ * config/ppc.mh (.s.o): Don't use CFLAGS_MRELOCATABLE when
+ assembling.
+
+Wed Nov 18 19:14:15 1998 Jim Wilson <wilson@cygnus.com>
+
+ * mips/entry.S: Handle mips16 builds.
+
+1998-10-30 Ian Molee <imolee@cygnus.com>
+
+ * m32r/trapmon0.c: New file. Mon2000 trap handler.
+ * m32r/trapmon0.S: Removed.
+ * m32/Makefile.in: Changed to reflect above-changed files.
+
+Wed Oct 28 07:55:55 1998 Mark Alexander <marka@cygnus.com>
+
+ * sparc/crt0.S: Move entry point to start of text section.
+ Put the address of the data section at the start of the section,
+ so the GDB sparclite loader can find it for a.out loads.
+
+Mon Oct 26 13:11:41 1998 Jeffrey A Law (law@cygnus.com)
+
+ * d30v/syscalls.c (time): Returns a time_t and accepts a pointer to
+ a time_t as its argument.
+
+ * i386/cygmon-syscall.h: Fix bogus asm constraints. You must not
+ clobber a register that overlaps with an input or output.
+
+Fri Oct 23 11:06:16 1998 John Metzler <jmetzler@cygnus.com>
+
+ * mips/jmr3904-io.c (hardware_init_hook): Add file to support
+ serial input and out put as required by libgloss read and write
+ functions.
+
+ * mips/jmr3904app.ld : LInker script for tx39jmr3904 board. Uses
+ addresses per eCos conventions, not original ROM monitor.
+
+ * configure.in: Add libtx39jmr.c to build target
+
+ * Makefile.in: rules for libtx39jmr.a and jmr3904-io.o
+
+1998-10-15 Ian Molee <imolee@cygnus.com>
+
+ * m32r/mon.specs: New file
+ * m32r/trapmon0.S: New file
+ * m32r/Makefile.in: Modified to add support for mon2000 trap0.
+
+Tue Oct 13 11:52:03 1998 Jeff Johnston <jjohnstn@cygnus.com>
+
+ * libnosys/warning.h: New file.
+
+1998-10-06 Ken Raeburn <raeburn@cygnus.com>
+
+ * mips/configure.in: Build nullmon stuff in default case. Don't
+ treat vr4100 specially.
+
+Tue Oct 6 15:17:42 1998 Jeff Johnston <jjohnstn@cygnus.com>
+
+ * libnosys/sbrk.c (_sbrk): Added reference to config.h.
+ * libnosys/close.c (_close): Added stub warning outside of
+ function body and added reference to config.h.
+ * libnosys/execve.c (_execve): Ditto.
+ * libnosys/fork.c (_fork): Ditto.
+ * libnosys/fstat.c (_fstat): Ditto.
+ * libnosys/getpid.c (_getpid): Ditto.
+ * libnosys/gettod.c (_gettimeofday): Ditto.
+ * libnosys/isatty.c (_isatty): Ditto.
+ * libnosys/kill.c (_kill): Ditto.
+ * libnosys/link.c (_link): Ditto.
+ * libnosys/lseek.c (_lseek): Ditto.
+ * libnosys/open.c (_open): Ditto.
+ * libnosys/read.c (_read): Ditto.
+ * libnosys/stat.c (_stat): Ditto.
+ * libnosys/times.c (_times): Ditto.
+ * libnosys/unlink.c (_unlink): Ditto.
+ * libnosys/wait.c (_wait): Ditto.
+ * libnosys/write.c (_write): Ditto.
+ * libnosys/acconfig.h: New file.
+ * libnosys/config.h.in: New file.
+ * libnosys/exit.c: Removed as _exit cannot be stubbed.
+ * libnosys/Makefile.in: Regenerated.
+ * libnosys/configure.in: Configure header file specified.
+ * libnosys/configure: Regenerated.
+
+Wed Sep 30 12:45:43 1998 Bob Manson <manson@charmed.cygnus.com>
+
+ * i386/cygmon.ld: Increase memory limits; put the initial
+ executable above 1MB.
+
+Fri Sep 25 13:49:22 1998 Bob Manson <manson@charmed.cygnus.com>
+
+ * i386/configure.in: Changed crt0.c to cygmon-salib.c.
+
+Wed Sep 23 19:25:46 1998 Bob Manson <manson@charmed.cygnus.com>
+
+ * configure.in: Add i386-*-elf* triplet.
+ * i386/*: Support for i386 targets.
+
+Wed Sep 16 19:43:52 1998 Doug Evans <devans@canuck.cygnus.com>
+
+ * m32r/m32r-lib.c: Rename -DMSA2000 to -DREVC and reverse test.
+ (exceptionHandler,getExceptionHandler): Add cast to avoid warning.
+
+Wed Sep 9 19:22:03 1998 Mark Alexander <marka@cygnus.com>
+
+ * sparc/Makefile.in: Remove cache86x.o, not needed any more.
+ * sparc/sparclite.h: (read_asr, write_asr): Define.
+ * sparc/cache.c (is_danlite): New function.
+ (cache_off, cache_on, flush_i_cache): Test for DANlite.
+ * sparc/salib.c (update_leds): Allow user to disable LED flashing.
+ * sparc/sparc86x.ld: Prevent section overlap.
+
+1998-09-04 Keith Seitz <keiths@cygnus.com>
+
+ * m32r/m32r-lib.c (rx_rdy): Add support for MSA2000G01 board.
+ (rx_char): Ditto.
+ (getDebugChar2): New function to support binary downloads (gdb
+ remote protocol "X" command).
+ (exceptionHandler): Add support for MSA2000G01 board.
+ (getExceptionHandler): Ditto.
+
+1998-08-20 Michael Meissner <meissner@cygnus.com>
+
+ * libnosys/gettod.c: Include sys/time.h so that struct timezone is
+ declared.
+
+Sun Aug 16 10:46:43 1998 Mark Alexander <marka@cygnus.com>
+
+ * sparc/Makefile.in: Add new BSP for sparc86x (DANlite).
+ * sparc/salib.c (outbyte): Add hook for GDB stub.
+ (cache_off, cache_on, flush_i_cache): Move to cache.c.
+ * sparc/cache.c: New file for sparclite-specific cache code.
+ * sparc/cache-86x.c: New file for sparc86x-specific cache code.
+ * sparc/sparc86x.ld: New linker script for sparc86x.
+ * sparc/crt0.S: Disable broken data relocation code.
+ * sparc/sparcl-stub.c (outbyte_stub): New function for redirecting
+ standard output to GDB.
+ (handle_exception): Initialize outbyte hook.
+
+Tue Aug 11 13:27:31 1998 Jim Wilson <wilson@cygnus.com>
+
+ * m68k/idp.ld (__INIT_SECTION__): Align to 2 byte boundary.
+ * m68k/bcc.ld, m68k/mvme135.ld, m68k/mvme162.ld: Likewise.
+ * m68k/sbc5204.ld, m68k/sbc5206.ld: Likewise.
+
+1998-08-11 Jason Merrill <jason@yorick.cygnus.com>
+
+ * mn10300/{sim.ld,eval.ld}: Add init_priority support.
+
+Tue Aug 11 10:04:05 1998 Jeffrey A Law (law@cygnus.com)
+
+ * mn10200/sim.ld: Rework code to insert pad before the start of the
+ data segment.
+ * mn10200/eval.ld: Likewise.
+ * mn10300/sim.ld: Likewise.
+ * mn10300/eval.ld: Likewise.
+
+Sat Aug 8 09:46:37 1998 Jim Wilson <wilson@cygnus.com>
+
+ * mips/cma101.c (__sizemem): New local variable extra. Align base
+ to int boundary.
+
+Tue Jul 28 10:57:12 1998 Mark Alexander <marka@cygnus.com>
+
+ * sparc/Makefile.in (ERC32_OBJS): Add fixctors.
+ * sparc/erc32-crt0.S: Call __fix_ctors just before calling main.
+ * sparc/fixctors.c: New file.
+
+Sat Jul 18 07:15:33 1998 Mark Alexander <marka@cygnus.com>
+
+ * sparc/crt0.S (win_ovf_trap, win_unf_trap): Use correct names for
+ extern functions win_ovf and win_unf; fixes unresolved symbols
+ in COFF.
+
+Mon Jul 13 17:50:41 1998 Jeff Johnston <jjohnstn@cygnus.com>
+
+ * configure.in: Added libnosys as subdir.
+ * configure: Rebuilt configure based on configure.in.
+ * libnosys/close.c (_close): Part of new libnosys stub library
+ to use for situations with no operating system support.
+ * libnosys/environ.c (environ): ditto.
+ * libnosys/execve.c (_execve): ditto.
+ * libnosys/exit.c (_exit): ditto.
+ * libnosys/fork.c (_fork): ditto.
+ * libnosys/fstat.c (_fstat): ditto.
+ * libnosys/getpid.c (_getpid): ditto.
+ * libnosys/gettod.c (_gettimeofday): ditto.
+ * libnosys/isatty.c (_isatty): ditto.
+ * libnosys/kill.c (_kill): ditto.
+ * libnosys/link.c (_link): ditto.
+ * libnosys/lseek.c (_lseek): ditto.
+ * libnosys/open.c (_open): ditto.
+ * libnosys/read.c (_read): ditto.
+ * libnosys/sbrk.c (_sbrk): ditto.
+ * libnosys/stat.c (_stat): ditto.
+ * libnosys/times.c (_times): ditto.
+ * libnosys/unlink.c (_unlink): ditto.
+ * libnosys/wait.c (_wait): ditto.
+ * libnosys/write.c (_write): ditto.
+ * libnosys/Makefile.in : Makefile.in for creating libnosys Makefile.
+ * libnosys/configure.in: configure.in to create libnosys configure.
+ * libnosys/configure: Configure for libnosys library.
+
+Mon Jul 13 14:13:07 EDT 1998 Jim Lemke <jlemke@cygnus.com>
+
+ * sim/mips.ld: Clarify a comment.
+
+Tue Jul 7 21:12:41 1998 Mark Alexander <marka@cygnus.com>
+
+ * sparc/elfsim.ld: Make it work on both a.out and ELF.
+ * sparc/traps.S: Rename trap_table label to work on both a.out
+ and ELF. Put the address of the data section at the start
+ of the section, so the simulator loader can find it for a.out loads.
+
+Thu Jun 25 09:24:53 1998 Mark Alexander <marka@cygnus.com>
+
+ * config/mn10200.mt: New file.
+
+Tue Jun 23 22:45:49 1998 Mark Alexander <marka@cygnus.com>
+
+ * mn10200/crt0.S: Don't waste top four bytes of stack.
+ * mn10200/eval.ld: Fix stack top address.
+
+Mon Jun 22 09:30:22 1998 Drew Moseley <dmoseley@cygnus.com>
+
+ * mips/dvemon.c: Remove the close function and get it from the generic
+ close.o
+ * mips/Makefile.in (DVEOBJS): Add generic open.o and close.o to the DVEOBJS
+ list to ensure that the proper API's are included.
+
+Wed Jun 17 12:33:05 1998 Mark Alexander <marka@cygnus.com>
+
+ * configure.in: Add mn10200 support.
+ * configure: Regenerate.
+ * mn10200/Makefile.in: New file.
+ * mn10200/_exit.c: New file.
+ * mn10200/access.c: New file.
+ * mn10200/chmod.c: New file.
+ * mn10200/chown.c: New file.
+ * mn10200/close.c: New file.
+ * mn10200/configure: New file.
+ * mn10200/configure.in: New file.
+ * mn10200/creat.c: New file.
+ * mn10200/crt0.S: New file.
+ * mn10200/crt1.c: New file.
+ * mn10200/eval.ld: New file.
+ * mn10200/execv.c: New file.
+ * mn10200/execve.c: New file.
+ * mn10200/fork.c: New file.
+ * mn10200/fstat.c: New file.
+ * mn10200/getpid.c: New file.
+ * mn10200/gettime.c: New file.
+ * mn10200/isatty.c: New file.
+ * mn10200/kill.c: New file.
+ * mn10200/lseek.c: New file.
+ * mn10200/open.c: New file.
+ * mn10200/pipe.c: New file.
+ * mn10200/read.c: New file.
+ * mn10200/sbrk.c: New file.
+ * mn10200/sim.ld: New file.
+ * mn10200/stat.c: New file.
+ * mn10200/test.c: New file.
+ * mn10200/time.c: New file.
+ * mn10200/times.c: New file.
+ * mn10200/trap.S: New file.
+ * mn10200/trap.h: New file.
+ * mn10200/unlink.c: New file.
+ * mn10200/utime.c: New file.
+ * mn10200/wait.c: New file.
+ * mn10200/write.c: New file.
+
+Fri Jun 12 17:26:56 1998 Doug Evans <devans@seba.cygnus.com>
+
+ * m32r/sys/syscall.h: Delete. Use ./syscall.h now.
+ * m32r/trap0.S: Renamed from trap.S.
+ * m32r/eit.h: New file.
+ * m32r/crtsysc.c: Delete, split up into several files.
+ * m32r/chmod.c: New file.
+ * m32r/close.c: New file.
+ * m32r/exit.c: New file.
+ * m32r/fstat.c: New file.
+ * m32r/getpid.c: New file.
+ * m32r/isatty.c: New file.
+ * m32r/kill.c: New file.
+ * m32r/lseek.c: New file.
+ * m32r/open.c: New file.
+ * m32r/raise.c: New file.
+ * m32r/read.c: New file.
+ * m32r/sbrk.c: New file.
+ * m32r/stat.c: New file.
+ * m32r/unlink.c: New file.
+ * m32r/utime.c: New file.
+ * m32r/write.c: New file.
+ * m32r/Makefile.in (SYSCALLS): Delete.
+ (LIBOBJS,LIBGLOSS): New variables.
+ (all,install): Update.
+ (libgloss.a): New rule.
+
+Thu Jun 11 08:38:42 1998 Doug Evans <devans@seba.cygnus.com>
+
+ * sparc/cygmon-salib.c (setitimer): Add `const' to second arg.
+ (gettimeofday): Change type of 2nd arg to struct timezone *.
+
+Tue Jun 9 12:02:21 1998 Ian Carmichael <iancarm@cygnus.com>
+
+ * mips/syscalls.c (sbrk): Allow memory allocation to work
+ for configurations which don't have memory at K1BASE.
+ * mips/cma101.c (__sizemem): Ditto.
+
+Tue Jun 9 13:17:28 1998 Michael Snyder <msnyder@cleaver.cygnus.com>
+
+ * m68k/emc-stub.c: New file, stub for the EMC Symmetrix target.
+ * m68k/gdbinit.emc: New file, user support for special features
+ supported only on the EMC Symmetrix target.
+
+Fri Jun 5 16:40:20 1998 Mark Alexander <marka@cygnus.com>
+
+ * sparc/elfsim.ld: Fix ctor and dtor tables to work in both
+ little- and big-endian executables.
+
+Wed Jun 3 23:09:38 1998 Mark Alexander <marka@cygnus.com>
+
+ * sparc/sparcl-stub.c: Include asm.h. Use STRINGSYM macro to generate
+ proper prefix for public assembly language labels.
+ * sparc/ex930.ld: Add DWARF sections.
+ * sparc/ex931.ld: Ditto.
+ * sparc/ex934.ld: Ditto.
+ * sparc/elfsim.ld: Simplify and clean up.
+ * sparc/Makefile.in: Build ex934 BSP. Allow little-endian builds.
+ * sparc/traps.S (win_flush): Rewrite using code from Cygmon
+ to eliminate register corruption.
+
+Mon Jun 1 15:21:05 1998 Geoffrey Noer <noer@cygnus.com>
+
+ * sparc/cygmon-salib.c: Stop including sys/itimer.h
+
+Sun May 31 10:46:37 1998 Michael Meissner <meissner@cygnus.com>
+
+ * rs6000/Makefile.in (SOLARIS_*): Don't build solaris bsp's any
+ more.
+
+Fri May 22 13:50:55 1998 Angela Marie Thomas (angela@cygnus.com)
+
+ * mn10300/Makefile.in: Install sim.ld.
+
+Wed May 20 22:45:11 1998 Mark Alexander <marka@cygnus.com>
+
+ * sparc/elfsim.ld: Add constructor and destructor tables.
+
+Sat May 16 17:08:17 1998 Bob Manson <manson@charmed.cygnus.com>
+
+ * sparc/cygmon-salib.c (__getProgramArgs): Use asm constraints.
+
+Fri May 15 16:50:36 1998 Mark Alexander <marka@cygnus.com>
+
+ * sparc/traps.S (win_flush): Don't destroy %g1 and %g2.
+
+Fri May 15 15:59:30 1998 Gavin Koch <gavin@cygnus.com>
+
+ * mips/configure.in: Add idt to tx39 chain.
+ * mips/configure: Rebuild.
+
+Fri May 15 15:48:28 1998 Gavin Koch <gavin@cygnus.com>
+
+ * mips/crt0.S (__stackbase): Added.
+ (zerobss): Initialize __stackbase.
+
+1998-05-13 Brendan Kehoe <brendan@cygnus.com>
+
+ * mips/configure.in: Also grok `mipstx39*-*-*'.
+ * mips/configure: Regenerated.
+
+Mon May 11 15:07:12 1998 Bob Manson <manson@charmed.cygnus.com>
+
+ * configure.in: Added powerpcle target.
+ * configure: Regenerated.
+
+Thu May 7 16:43:37 1998 Mark Alexander <marka@cygnus.com>
+
+ * sparc/elfsim.ld (OUTPUT_FORMAT): Add little-endian support.
+
+ * sparc/crt0.S (_start): Define label for ELF targets.
+ * sparc/salib.c: Include asm.h. Use STRINGSYM macro to generate
+ proper prefix for public assembly language labels.
+ (write, read): Disable to avoid conflict with generic versions
+ of these functions.
+ * sparc/erc32-stub.c: Move STRINGSYM macro to sparc/asm.h.
+ * sparc/asm.h: Move STRINGSYM macro here from sparc/erc32-stub.c
+
+Mon May 4 08:30:58 1998 Mark Alexander <marka@cygnus.com>
+
+ * sparc/configure.in: Treat sparc86x as a sparclite.
+ * sparc/configure.in: Ditto.
+ * sparc/Makefile.in (slite-install): Install missing files
+ for simulator.
+
+Thu Apr 30 16:41:15 1998 John Metzler <jmetzler@cygnus.com>
+
+ * mips/configure.in: adjust target type pattern to export nullmon.ld
+ * mips/configure: regenerated
+
+Mon Apr 27 21:38:18 1998 Mark Alexander <marka@cygnus.com>
+
+ * configure.in: Added sparc86x configuration.
+ * configure: Ditto.
+
+Wed Apr 22 21:45:13 1998 Jeffrey A Law (law@cygnus.com)
+
+ * mips/crt0.S: Increase stack alignment.
+
+Fri Apr 10 21:17:48 1998 Mark Alexander <marka@cygnus.com>
+
+ * sparc/traps.S (win_flush): Prevent immediate window underflow
+ trap on return. Miscellaneous comment formatting cleanup.
+
+Tue Apr 7 18:34:51 1998 Mark Alexander <marka@cygnus.com>
+
+ * sparc/elfsim.ld: Align BSS at 8-byte boundary.
+
+Mon Apr 6 13:12:32 1998 Mark Salter <msalter@chef.cygnus.com>
+
+ * rs6000/ads-io.c (write): Added write().
+
+ * rs6000/Makefile.in: Changed objects used for libads to be
+ new ads specific object files instead of some mvme objects.
+
+ * Added ads-io.c and ads-exit.c to provide function stubs which
+ are safe on ads board (SDS monitor).
+
+ * rs6000/mbx-outbyte.c (outbyte): Foundry console output
+ is fixed, so re-enable output char quoting for mbx.
+
+ * rs6000/mbx.specs: Added blank line to end of file. There
+ were link errors without it?
+
+ * rs6000/mbx.specs: Use mbx.ld script for linking.
+
+ * rs6000/mbx-outbyte.c: Don't quote characters. We don't want
+ gdb to display program output, yet.
+
+ * rs6000/Makefile.in (install-mbx): Fixed install of mbx.specs
+ file.
+
+ * rs6000/Makefile.in: Support for MBX EPPCBug monitor.
+ * rs6000/mbx-{exit,inbyte,outbyte,print}.c: New files for MBX.
+ * rs6000/mbx.ld,mbx.specs: New files for MBX.
+
+Wed Apr 1 21:42:40 1998 Mark Alexander <marka@cygnus.com>
+
+ * sparc/elfsim.ld: New linker script for running ELF programs
+ in erc32 simulator.
+ * sparc/erc32-crt0.S: Disable copying of data segment.
+ * sparc/erc32-stub.c: Generate correct public name for breakinst.
+ * sparc/Makefile.in: Build erc32 library always.
+
+Thu Apr 2 11:24:32 1998 Andrew Cagney <cagney@b1.cygnus.com>
+
+ * mips/syscalls.c (sbrk): Check word size correct for
+ get_mem_info.
+
+Fri Mar 27 08:55:52 1998 Mark Alexander <marka@cygnus.com>
+
+ * mips/crt0.S: Insert NOP before _start to keep GDB happy.
+ * mips/dve.ld: Eliminate references to VR4300.
+
+Thu Mar 26 19:47:36 1998 Mark Alexander <marka@cygnus.com>
+
+ * mn10300/eval.ld: Don't use absolute path in SEARCH_DIR.
+ * mn10300/sim.ld: Ditto.
+
+Wed Mar 25 10:49:49 1998 Bob Manson <manson@charmed.cygnus.com>
+
+ * sparc/cygmon-salib.c (__getProgramArgs): New function.
+
+ * sparc/cygmon-crt0.S (init): Call __getProgramArgs.
+
+ * configure.in: Added sparc64 configuration.
+
+ * configure: Regenerated.
+
+Tue Mar 24 10:44:41 1998 Mark Alexander <marka@cygnus.com>
+
+ * mn10300/Makefile.in: Install libraries, not just linker scripts.
+
+Tue Mar 24 09:52:28 1998 Mark Alexander <marka@cygnus.com>
+
+ * config/mn10300.mt: New file
+ * mn10300/configure.in: Use mn10300.mt as target makefile fragment
+ instead of nothing at all.
+ * mn10300/configure: Ditto.
+
+Tue Mar 24 16:59:06 1998 Stu Grossman <grossman@bhuna.cygnus.co.uk>
+
+ * doc/configure: Regenerate with autoconf 2.12.1 to fix shell
+ issues for NT native builds.
+
+Mon Mar 16 18:51:11 1998 Bob Manson <manson@charmed.cygnus.com>
+
+ * sparc/cygmon-crt0.S: Make start a global symbol (for the linker
+ script; we also need to make SYM(start) global).
+
+Wed Mar 11 10:24:39 1998 Stan Cox <scox@rtl.cygnus.com>
+
+ * sparc/cygmon.ld.src (.debug*): Added dwarf sections.
+
+Fri Mar 6 23:41:54 1998 Bob Manson <manson@charmed.cygnus.com>
+
+ * sparc/cygmon.ld.src: Use TARGET_RAM_START.
+
+ * sparc/Makefile.in (SLITE_RAM_START): Add.
+ (SPARC_RAM_START): Add.
+ (SPARC64_RAM_START): Add.
+ (SLITE_ALL): Add cygmon object files and linker script.
+ slite-install: Install CygMon libraries and linker script.
+
+Mon Mar 2 19:36:12 1998 Michael Meissner <meissner@cygnus.com>
+
+ * rs6000/ads.ld: Add default attributes to memory region.
+ * a29k/{p3dgps,sa29200{,b}}.ld: Ditto.
+ * hp74x/hppa.ld: Ditto.
+ * m68k/{bcc,idp,mvme{135,162},sbc520{4,6}}.ld: Ditto.
+ * pa/{op50n,w89k}.ld: Ditto.
+ * sh/{sh1{l,2,3}cevb,sh3bb}.ld: Ditto.
+ * sparc/{erc32,ex93{0,1,4}}.ld: Ditto.
+
+Fri Feb 27 17:15:35 1998 Mark Alexander <marka@cygnus.com>
+
+ * mn10300/configure.in (AC_INIT): Use crt0.S instead of crt0-eval.S.
+
+Fri Feb 27 17:39:23 1998 Jeffrey A Law (law@cygnus.com)
+
+ * configure.in: Use "mn10300" subdir for "mn10300-*-*".
+
+Mon Feb 23 20:29:42 1998 Mark Alexander <marka@cygnus.com>
+
+ * mn10300/Makefile.in (GENOBJS): Remove system calls no longer
+ supported.
+ * mn10300/trap.h: Use generic syscall.h.
+ * mn10300/sys/syscall.h: Removed in favor of generic syscall.h.
+
+Mon Feb 23 16:19:17 1998 Gavin Koch <gavin@cygnus.com>
+
+ * mips/Makefile.in (cma101.o): Add rule to explicitly use -mno-mips16.
+ * mips/cma101.c: Reverse my previous change.
+ Add #ifdef __mips16 then #error.
+
+Mon Feb 23 11:29:33 1998 Mark Alexander <marka@cygnus.com>
+
+ * mn10300/Makefile.in: Add rules for building libeval.a.
+ * mn10300/configure: Don't use default.mt.
+ * mn10300/configure.in: Ditto.
+ * mn10300/eval.ld: Replace with modified version of default script.
+
+ * mn10300/_exit.c: New file for libeval.a.
+ * mn10300/access.c: Ditto.
+ * mn10300/chmod.c: Ditto.
+ * mn10300/chown.c: Ditto.
+ * mn10300/close.c: Ditto.
+ * mn10300/creat.c: Ditto.
+ * mn10300/crt0.S: Ditto.
+ * mn10300/crt1.c: Ditto.
+ * mn10300/execv.c: Ditto.
+ * mn10300/execve.c: Ditto.
+ * mn10300/fork.c: Ditto.
+ * mn10300/fstat.c: Ditto.
+ * mn10300/getpid.c: Ditto.
+ * mn10300/gettime.c: Ditto.
+ * mn10300/isatty.c: Ditto.
+ * mn10300/kill.c: Ditto.
+ * mn10300/lseek.c: Ditto.
+ * mn10300/open.c: Ditto.
+ * mn10300/pipe.c: Ditto.
+ * mn10300/read.c: Ditto.
+ * mn10300/sbrk.c: Ditto.
+ * mn10300/sim.ld: Ditto.
+ * mn10300/stat.c: Ditto.
+ * mn10300/time.c: Ditto.
+ * mn10300/times.c: Ditto.
+ * mn10300/trap.S: Ditto.
+ * mn10300/trap.h: Ditto.
+ * mn10300/unlink.c: Ditto.
+ * mn10300/utime.c: Ditto.
+ * mn10300/wait.c: Ditto.
+ * mn10300/write.c: Ditto.
+ * mn10300/sys/syscall.h: Ditto.
+
+Fri Feb 20 17:19:22 1998 Gavin Koch <gavin@cygnus.com>
+
+ * mips/cma101.c: #ifdef out whole file if mips16.
+
+Thu Feb 19 13:05:58 1998 Bob Manson <manson@charmed.cygnus.com>
+
+ * i960/*: Revised.
+
+Wed Feb 18 12:00:20 1998 Jeff Johnston <jjohnstn@cygnus.com>
+
+ * m68k/crt0.S (start): Fixed code that clears .bss. Code
+ was using dbra instruction and did not account for the fact
+ that the instruction branches until counter is -1, not 0.
+
+Tue Feb 17 18:21:52 1998 Mark Alexander <marka@cygnus.com>
+
+ * mn10300/Makefile.in: New file for MN10300 eval board support.
+ * mn10300/configure: Ditto.
+ * mn10300/configure.in: Ditto.
+ * mn10300/crt0-eval.S: Ditto.
+ * mn10300/eval.ld: Ditto.
+ * mn10300/test.c: Ditto.
+
+Tue Feb 17 19:55:47 1998 Gavin Koch <gavin@cygnus.com>
+
+ * mips/vr4300.S (__previous): Fix comment type-o in
+ previous change.
+
+Tue Feb 17 10:47:45 1998 Gavin Koch <gavin@cygnus.com>
+
+ * mips/vr4300.S (__previous,baseaddr,res_baseaddr):
+ Figure the length of the exception handler at runtime
+ rather than compile time.
+
+Tue Feb 3 14:07:51 1998 Ian Lance Taylor <ian@cygnus.com>
+
+ * configure.in: When running config-ml.in, put --enable-multilib
+ before ac_configure_args, so that --disable-multilib can override
+ it.
+ * configure: Rebuild.
+
+Fri Jan 9 17:10:59 1998 Mark Alexander <marka@cygnus.com>
+
+ * mips/Makefile.in (LSIOBJS, DVEOBJS): Add part-specific objects.
+
+Mon Jan 5 17:01:45 1998 Mark Alexander <marka@cygnus.com>
+
+ * config/mips.mt: Add rules for read.o and write.o.
+ * mips/dvemon.c: New file to support Densan DVE-R3900 board.
+ * mips/dve.ld: New file to support Densan DVE-R3900 board.
+ * mips/Makefile.in: Add rules for Densan support library libdve.a.
+ * mips/configure.in: Build libdve.a for tx39 targets.
+ * mips/configure: Ditto.
+
+Tue Dec 30 15:34:17 1997 Bob Manson <manson@charmed.cygnus.com>
+
+ * sparc/Makefile.in: Add define for TARGET_CPU_$(CPU).
+
+ * sparc/cygmon-salib.c: If TARGET_CPU_SPARC64, include
+ sys/types.h, and define _open_r, _close_r, etc.
+
+Sun Dec 28 17:15:50 1997 Bob Manson <manson@charmed.cygnus.com>
+
+ * sparc/cygmon-salib.c (_open_r, _close_r): New functions.
+ (read, write): If the fd isn't 0, 1, or 2, return an error.
+
+Fri Dec 26 18:45:28 1997 Bob Manson <manson@charmed.cygnus.com>
+
+ * sparc/cygmon-salib.c (_sbrk_r, _fstat_r,_brk_r): Define.
+
+ * sparc/cygmon-crt0.S: Zero out %fp so backtraces from gdb work
+ properly.
+
+ * sparc/configure.in: Set CYGMONLDSCRIPTTEMPL appropriately.
+
+ * sparc/Makefile.in ($(objdir)/cygmon.ld): Use CYGMONLDSCRIPTTEMPL
+ to determine what template file we use.
+
+1997-12-22 Felix Lee <flee@cygnus.com>
+
+ * rs6000/sim-errno.c (_cerror): need to return -1.
+ * rs6000/sol-cfuncs.c (_cerror): likewise.
+
+Mon Dec 22 16:54:31 1997 Bob Manson <manson@charmed.cygnus.com>
+
+ * sparc/cygmon-crt0.S: Add stack bias code if TARGET_CPU_SPARC64 is
+ defined. Allocate 128 bytes for a frame if sparc64.
+
+ * sparc/cygmon.ld.src: New file, replaced cygmon.ld.
+
+ * sparc/Makefile.in (SPARC_OBJ_FORMAT): Added.
+ (SPARC64_ALL,SPARC64_INSTALL,SPARC64_OBJ_FORMAT): Added.
+ ($(objdir)/cygmon.ld): Create from $(objdir)/cygmon.ld.src.
+
+ * sparc/configure.in: Add sparc64 to CPU list.
+ * sparc/configure: Regenerated.
+ * configure: Regenerated.
+
+Sun Dec 21 18:19:27 1997 Bob Manson <manson@charmed.cygnus.com>
+
+ * configure.in: Added sparc64-elf configuration.
+
+Wed Dec 10 19:15:26 1997 Andrew Cagney <cagney@b1.cygnus.com>
+
+ * mips/pmon.ld, mips/ddb.ld: Add handling of DWARF
+ sections. Copied from mips/idt.ld.
+
+Wed Dec 10 12:31:04 1997 Mark Alexander <marka@cygnus.com>
+
+ * mips/configure: Add entry.o to LSI library.
+ * mips/configure.in: Ditto.
+ * mips/crt0.S: Declare init hooks as .text to avoid linker errors.
+ * mips/pmon.S: Don't use 64-bit instructions on 32-bit EABI machines.
+ * mips/entry.S: New file (MIPS16 entry/exit exception handler).
+
+Tue Dec 9 18:51:45 1997 Michael Meissner <meissner@cygnus.com>
+
+ * d30v/crt0.S (_start): Don't load r1 with 32 anymore. Zero out
+ the 3 bss areas.
+
+Fri Nov 28 22:34:14 1997 Bob Manson <manson@charmed.cygnus.com>
+
+ * sparc/cygmon-salib.c (open): New syscall.
+
+ * sparc/cygmon.ld: Add gcc_except_table section.
+
+ * sparc/cygmon-crt0.S: Call __install_signal_handler.
+ Run ctors/dtors as appropriate.
+
+ * sparc/cygmon-salib.c (gettimeofday): New syscall.
+ (stime): Ditto.
+ (add_mapping): Ditto.
+ (remove_mapping): Ditto.
+ (__install_signal_handler): Ditto.
+
+Wed Nov 26 15:25:11 1997 Michael Meissner <meissner@cygnus.com>
+
+ * rs6000/mcount.S: New file to in case no profiling module was
+ defined.
+
+ * rs6000/Makefile.in (OBJS): Add mcount.o
+ (mcount.o): Depend on mcount.S.
+
+Mon Nov 24 23:25:07 1997 Bob Manson <manson@charmed.cygnus.com>
+
+ * sparc/cygmon.ld: Add linkonce sections.
+
+Mon Nov 24 18:42:55 1997 Michael Meissner <meissner@cygnus.com>
+
+ * d30v/syscalls.c (__syscall): Correct setting errno.
+
+Sun Nov 23 17:49:45 1997 Bob Manson <manson@charmed.cygnus.com>
+
+ * sparc/Makefile.in: Removed TARGET_CFLAGS.
+ * sparc/configure.in: Ditto.
+ * sparc/configure: Regenerated.
+
+Fri Nov 21 21:21:23 1997 Michael Meissner <meissner@cygnus.com>
+
+ * syscall.h: Remove d30v from comments.
+
+ * d30v/syscalls.c: Use common syscall.h file, move setting errno
+ into common function, rather than have each stub do it.
+
+ * d30v/Makefile.in (syscalls.c): Use common syscall.h, not the old
+ d30v specific version.
+ (clean): Properly remove libraries.
+
+ * d30v/sys/syscall.h: Delete.
+
+Wed Nov 19 16:13:00 1997 Doug Evans <devans@seba.cygnus.com>
+
+ * rs6000/Makefile.in (unlink.o): Add rule for.
+
+ * syscall.h: New file.
+
+Tue Nov 18 17:22:18 1997 Doug Evans <devans@seba.cygnus.com>
+
+ * sparc/asm.h (CONCAT1): Use __USER_LABEL_PREFIX__.
+
+ * sparc/Makefile.in: Reorganize file.
+
+ * sparc/Makefile.in: Rename all occurences of SIM to ERC32.
+ (all): Don't build erc32 support any more (never installed anyway).
+ * sparc/erc32-io.c: Renamed from sim-io.c.
+ * sparc/erc32-stub.c: Renamed from sim-stub.c.
+ * sparc/erc32-crt0.S: Renamed from sim-crt0.S.
+ * sparc/erc32.ld: Renamed from sim.ld.
+ * sparc/configure.in (AC_INIT): Update.
+ * sparc/configure: Regenerate.
+
+Tue Nov 18 13:54:46 1997 Michael Meissner <meissner@cygnus.com>
+
+ * d30v/syscalls.c: New file to provide system call stubs.
+ * d30v/sys/syscall.h: New file to provide system call numbers.
+ * d30v/sim-{exit,read,write}.S: Delete, no longer used.
+ * d30v/Makefile.in: Remove old system stubs, and use the new ones
+ in syscalls.c.
+
+Tue Nov 18 12:38:37 1997 Michael Meissner <meissner@cygnus.com>
+
+ * d30v/sys/syscall.h: Define for d30v system calls.
+
+Mon Nov 17 22:04:04 1997 Bob Manson <manson@charmed.cygnus.com>
+
+ * configure.in: Configure the sparc directory for the sparc-elf
+ toolchain.
+ * configure: Regenerated.
+
+ * sparc/Makefile.in: For a generic sparc toolchain, build the cygmon
+ crt0 and install the cygmon linker script.
+
+ * sparc/asm.h (USER_LABEL_PREFIX): If it's already defined, don't
+ redefine it.
+
+ * sparc/configure.in: Add LIB_AC_PROG_CC. Add TARGET_CFLAGS
+ subst variable.
+ * sparc/configure: Regenerated.
+
+ * sparc/cygmon.ld: New file.
+ * sparc/cygmon-crt0.S: New file.
+ * sparc/cygmon-salib.c: New file.
+
+Sun Nov 16 20:22:22 1997 Michael Meissner <meissner@cygnus.com>
+
+ * d30v/crt0.S (_start): Set up stack pointer to end of internal
+ memory by default.
+
+Tue Nov 11 17:43:06 1997 Michael Meissner <meissner@cygnus.com>
+
+ * d30v/Makefile.in (OBJS): Use print.o, not print.c. Add sbrk.o.
+
+Mon Nov 10 13:57:40 1997 Michael Meissner <meissner@cygnus.com>
+
+ * configure.in (d30v-*-*): Add configuration.
+ * configure: Regenerate.
+
+ * d30v/{crt0,sim-{read,write,exit}}.S: Correct typos.
+ * d30v/Makefile.in: Ditto.
+
+Sat Nov 8 14:38:57 1997 Michael Meissner <meissner@cygnus.com>
+
+ * d30v/crt0.S: New file for d30v port.
+ * d30v/configure{,.in}: Ditto.
+ * d30v/Makefile.in: Ditto.
+ * d30v/{in,out}byte.c: Ditto.
+ * d30v/sim-{read,write,exit}.c: Ditto.
+
+Tue Sep 16 15:21:08 1997 Gavin Koch <gavin@cygnus.com>
+
+ * mips/Makefile.in (vr4300.o): Reinstate command, it's will
+ be necessary until all hosts properly set BSP in configure.in.
+
+Mon Sep 15 16:20:29 1997 Bob Manson <manson@charmed.cygnus.com>
+
+ * m68k/*.ld: Add underscore versions of __CTOR_LIST__ and
+ __DTOR_LIST__.
+
+Mon Sep 15 12:13:34 1997 Mark Alexander <marka@cygnus.com>
+
+ * mips/crt0.S: Declare external functions as .text to
+ eliminate linker warnings.
+
+Tue Sep 9 23:35:04 1997 Gavin Koch <gavin@cygnus.com>
+
+ * mips/Makefile.in (SCRIPTS): Now is configurable.
+ (BSP): Now is configurable.
+ (vr4300.o): Remove unnecessary command.
+ * mips/configure.in: Configure the newly configuable
+ SCRIPTS and BSP.
+ * mips/configure: Re-autoconf.
+
+
+Mon Sep 8 16:53:12 1997 Bob Manson <manson@charmed.cygnus.com>
+
+ * mips/Makefile.in (pmon.o): Added compile command that includes
+ PART_SPECIFIC_DEFINES. Don't include cma101.o by default.
+
+ * mips/configure.in (part_specific_defines): New variable
+ used when building pmon.o.
+ (part_specific_obj): Include cma101.o as well as vr4300.o,
+ since it is board-specific in many ways (and relies on
+ routines in vr4300.o).
+
+Mon Sep 8 14:42:44 1997 Gavin Koch <gavin@cygnus.com>
+
+ * mips/idt.ld: Add handling of DWARF sections.
+
+Sun Sep 7 16:43:05 1997 Gavin Koch <gavin@cygnus.com>
+
+ * mips/crt0.S, mips/idtmon.S, mips/vr4300.S: Handle mips16 builds.
+
+Thu Sep 4 19:35:12 1997 Andrew Cagney <cagney@b1.cygnus.com>
+
+ * v850/sys/syscall.h: Match with what is in newlib.
+
+Mon Sep 1 12:43:50 1997 Andrew Cagney <cagney@b1.cygnus.com>
+
+ * v850/sys/syscall.h: New file.
+
+Thu Aug 28 17:27:16 1997 Stan Shebs <shebs@andros.cygnus.com>
+
+ * rs6000/ads.ld: Define ram region.
+ (__stack): Fix value.
+ * rs6000/crt0.S: Clear the sbss area as well as bss.
+
+Tue Aug 26 16:22:36 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ * m68k/bcc.ld: Don't use BLOCK for the section addresses.
+ Instead, just force . to be aligned when necessary.
+ * m68k/idp.ld, m68k/mvme135.ld, m68k/mvme162.ld: Likewise.
+ * m68k/sbc5204.ld, m68k/sbc5206: Likewise.
+
+Fri Aug 8 14:20:16 1997 Michael Meissner <meissner@cygnus.com>
+
+ * rs6000/Makefile.in (install-{yellowknife,ads}): The linker
+ scripts are in the source directory, not the object directory.
+
+Fri Aug 1 12:21:31 1997 Stan Shebs <shebs@andros.cygnus.com>
+
+ * rs6000/ads.ld: New file, linker script for 821/860 ADS board.
+ * rs6000/yellowknife.ld: New file, linker script for embedded
+ Yellowknife (CHRP/PPCP) box.
+ * rs6000/Makefile.in: Add rules for ADS and Yellowknife bits,
+ remove references to EVM, don't optimize the test program.
+ * rs6000/crt0.S: Renamed from mvme-crt0.S, is generic.
+ * rs6000/mvme-stack.S: Removed, unnecessary.
+
+Tue Jun 3 12:54:59 1997 Bob Manson <manson@charmed.cygnus.com>
+
+ * mips/crt0.S: Added GCRT0 #ifdef for profiling support.
+
+ * mips/Makefile.in (SCRIPTS): Added idtecoff.
+ (PCRT0): Added.
+
+ * mips/idtecoff.ld: Added. Add crt0.o startup entry.
+
+Fri Apr 18 15:54:11 1997 Doug Evans <dje@canuck.cygnus.com>
+
+ * m32r/crt0.S: Remove references to .fillinsn.
+
+Mon Apr 14 16:34:27 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ * testsuite/Makefile.in (INSTALL): Change install.sh to
+ install-sh.
+
+Wed Apr 9 15:41:39 1997 Mike Meissner <meissner@cygnus.com>
+
+ * rs6000/configure.in (AC_PROG_CC): copied from configure.in.
+ * rs6000/configure: Regenerate.
+
+
+Sat Mar 29 12:21:08 1997 Bob Manson <manson@charmed.cygnus.com>
+
+ * sparc/(ex930.ld,ex931.ld,ex934.ld}: Set __end as well
+ as _end and end.
+
+Fri Mar 28 23:01:38 1997 Mark Alexander <marka@cygnus.com>
+
+ * mips/lsi.ld: Before setting _gp, use ALIGN(8) instead
+ of ALIGN(16). Remove ALIGN from _gp computation.
+
+Mon Mar 17 10:00:29 1997 Gavin Koch <gavin@cygnus.com>
+
+ * mips/idtmon.S: Added magic number for _flush_cache slot.
+
+Fri Mar 14 14:36:06 1997 J.T. Conklin <jtc@beauty.cygnus.com>
+
+ * m68k/Makefile.in (install): Fix typo.
+
+ * m68k/crt0.S: Changed to use correct loop condition for coldfire.
+
+Wed Mar 12 16:00:51 1997 Stu Grossman (grossman@critters.cygnus.com)
+
+ * sparc/Makefile.in: Add rules for above.
+ (701_OBJS): Add salib-701.o, sparclet-stub.o.
+ [Brought over from Nov 5 change in sparclet branch.]
+
+ * sparc/salib-701.c (flush_i_cache): Implement cache flushing to fix
+ intermittent problems with gdb stub and breakpoints. Fixes pr 11755.
+
+Wed Mar 12 15:49:30 1997 J.T. Conklin <jtc@cygnus.com>
+
+ * m68k/sbc5204: Fix GROUP specifier.
+ * m68k/sbc5206: Likewise.
+
+Tue Mar 11 13:43:49 1997 J.T. Conklin <jtc@cygnus.com>
+
+ * m68k/Makefile.in (all): Fix typo.
+
+ * m68k/crt0.S: Use cmpl #0,aX instead of cmpw #0,aX as the latter
+ is an invalid instruction on the coldfire.
+
+Fri Mar 7 19:42:50 1997 Mark Alexander <marka@cygnus.com>
+
+ * mips/lsi.ld: New file.
+ * mips/lsipmon.S: New file.
+ * Makefile.in: Add support for LSI variant of PMON (MiniRISC board).
+ * pmon.S: Ditto.
+
+Fri Mar 7 10:29:11 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ * mips/regs.S (pc): Define.
+
+Thu Mar 6 18:11:57 1997 Bob Manson <manson@charmed.cygnus.com>
+
+ * mips/pmon.S (INDIRECT): For a target that uses the 64-bit
+ ABI, set up the stack for a 32-bit call before actually calling
+ PMON.
+
+ * mips/regs.S: K1BASE needs to be a 64-bit value on a machine
+ with 64-bit pointers.
+
+ * mips/syscalls.c (sbrk): Use size_t instead of unsigned int
+ when comparing pointers.
+
+Wed Mar 5 15:44:04 1997 Doug Evans <dje@seba.cygnus.com>
+
+ * m32r/crtsysc.c (_sbrk): Change _end decl to __model__ (__medium__).
+ * m32r/Makefile.in (m32r-stub.o): Use MULTISRCTOP to find m32r-stub.c.
+
+Tue Mar 4 07:01:44 1997 J.T. Conklin <jtc@cygnus.com>
+
+ * m68k/crt0.S: Use cmpw #0,aX instead of tstl aX, as the latter is
+ an invalid addressing mode on the 68000 core.
+
+Mon Mar 3 16:38:19 1997 Jim Wilson <wilson@cygnus.com>
+
+ * mips/crt0.S: Subtract 24 instead of 8 when computing sp.
+
+Mon Mar 3 13:35:20 1997 Doug Evans <dje@canuck.cygnus.com>
+
+ * m32r/m32r-lib.c: New file.
+ * m32r/{eva,eva-stub}.ld: New files.
+ * m32r/Makefile.in: Build and install them.
+ Also build and install m32r-stub.o.
+
+Tue Feb 25 11:59:20 1997 Gavin Koch <gavin@cygnus.com>
+
+ * mips/configure.in (LIB_AC_PROG_CC): copied from configure.in.
+ * mips/configure.in (AC_PROG_CC): replaced by LIB_AC_PROG_CC
+ can't do final link until libs in this directory are built.
+ * mips/configure: regenerated.
+
+Tue Feb 25 00:31:27 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ * mips/crt0.S: Call hardware_init_hook and software_init_hook via
+ a register, to avoid relocation overflow if they are zero.
+
+Mon Feb 24 22:25:49 1997 Gavin Koch <gavin@cygnus.com>
+
+ * mips/Makefile.in (IDTOBJS,PMONOBJS): Part specific modules
+ can now be configured by part_specific_obj.
+ * mips/configure.in (part_specific_obj): added.
+ * mips/configure: regenerate.
+
+Fri Feb 21 14:29:54 1997 Doug Evans <dje@canuck.cygnus.com>
+
+ * m32r/crtsysc.c (_sbrk): Declare _end with __attribute ((__sym32__)).
+
+Fri Feb 21 10:10:55 1997 Jim Wilson <wilson@cygnus.com>
+
+ * mips/ddb.ld: Align the location counter before setting _gp, and
+ before setting edata. Remove ALIGN from _gp computation.
+ * mips/idt.ld, mips/pmon.ld: Before setting _gp, use ALIGN(8) instead
+ of ALIGN(16). Remove ALIGN from _gp computation.
+
+Thu Feb 20 17:30:41 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ * mips/array.ld: Add mips16 sections.
+ * mips/ddb.ld, mips/idt.ld, mips/pmon.ld: Likewise.
+
+ * mips/crt0.S (zerobss): Use subu, not sub.
+
+Tue Feb 18 17:25:56 1997 Mark Alexander <marka@cygnus.com>
+
+ * mips/crt0.S: Add .ent lines for all code fragments, so
+ that objdump --disassemble will display them correctly.
+
+Fri Feb 14 11:07:20 1997 J.T. Conklin <jtc@cygnus.com>
+
+ * m68k/mvme-stub.c: New file. Common debugger stub used for mvme-
+ based targets. This should eventually be merged with or replaced
+ by the m68k stub from gdb.
+ * m68k/{mvme135-stub.c, mvme162lx-stub.c}: Removed.
+ * m68k/Makefile.in: Updated for above change.
+
+ * m68k/{mvme135-asm.S, mvme162lx-asm.S}: Removed all whitespace
+ differences and changed to consistantly use the IMM macro for
+ immediate constants. It is now possible to compare these two
+ files without having to filter out insignificant differences.
+
+ * m68k/mvme135-stub.c (set_debug_traps): Renamed from
+ init_debug_traps to match documentation and other sample debugger
+ stubs.
+
+ * m68k/sbc5204.ld: New file, linker script for Arnewsh SBC5204.
+
+ * m68k/sbc5206.ld: New file, linker script for Arnewsh SBC5206.
+
+ * m68k/Makefile.in (DBUG_OBJ, DBUG_BSP): New BSP for coldfire
+ targets running the dbug monitor.
+
+ * m68k/{dbug-exit.S,dbug-inbyte.S,dbug-outbyte.S}: New files.
+
+Thu Feb 6 13:31:06 1997 Bob Manson <manson@charmed.cygnus.com>
+
+ * m68k/crt0.S: Don't use SYM to refer to symbols defined
+ in the linker script.
+
+Thu Jan 16 10:34:36 1997 Jim Wilson <wilson@cygnus.com>
+
+ * mips/{ddb.ld,idt.ld,pmon.ld}: Readd OUTPUT_FORMAT definition.
+
+Wed Jan 8 14:49:26 1997 Jim Wilson <wilson@cygnus.com>
+
+ * mips/crt0.S (_start): Don't try to use FPU registers if
+ __mips_soft_float is defined.
+
+Fri Dec 27 15:41:08 1996 Bob Manson <manson@charmed.cygnus.com>
+
+ * sparc/Makefile.in (splet-install): Add tsc701.ld.
+
+Thu Dec 26 14:59:34 1996 Michael Snyder <msnyder@cleaver.cygnus.com>
+
+ * sparc/sparclet-stub.c: Add support for "P" protocol command.
+ Add support for %cc coprocessor registers, %asr registers.
+ Work-around broken SAVE instruction on sparclet.
+
+Tue Dec 24 22:15:53 1996 Angela Marie Thomas (angela@cygnus.com)
+
+ * mips/pmon.S: add an INDIRECT for _flush_cache to be the
+ same as mon_flush_cache. This fixes failures in "make check"
+
+Mon Dec 23 18:08:05 1996 Jim Wilson <wilson@cygnus.com>
+
+ * mips/syscalls.c (__errno, _raise): Delete.
+
+Wed Dec 18 17:29:28 1996 Ian Lance Taylor <ian@cygnus.com>
+
+ * mips/idt.ld: Align the location counter before setting _gp, and
+ before setting edata.
+ * mips/pmon.ld: Likewise.
+
+Sat Dec 14 21:52:40 1996 Ian Lance Taylor <ian@cygnus.com>
+
+ * configure.in: Use a special version of AC_PROG_CC. Autoconf
+ 2.12 introduced a check for whether the compiler works, and that
+ check will fail for a cross compilers without a complete set of
+ libraries.
+
+Fri Dec 13 10:40:14 1996 Rob Savoye <rob@chinadoll.cygnus.com>
+
+ * sbrk.c: Set the heap pointer to the address of _end, not the
+ value.
+
+Wed Dec 11 15:26:50 1996 Jim Wilson <wilson@cygnus.com>
+
+ * mips/{ddb.ld,idt.ld,pmon.ld}: Delete OUTPUT_FORMAT definition.
+
+Fri Dec 6 15:52:36 1996 Jim Wilson <wilson@cygnus.com>
+
+ * mips/crt0.S: Delete unreachable instruction after exit call.
+ Move exit call before .end _start.
+
+Tue Nov 26 15:05:26 1996 Doug Evans <dje@rtl.cygnus.com>
+
+ * configure: Regenerate with autoconf 2.12.
+
+Mon Nov 11 15:12:08 1996 Michael Meissner <meissner@tiktok.cygnus.com>
+
+ * config/ppc.mh: New PowerPC eabi target specific config file.
+ Always use -mrelocatable-lib -mno-eabi.
+
+ * rs6000/configure.in (host_makefile_frag): Use config/ppc.mh.
+ * rs6000/configure: Regenerate.
+
+ * rs6000/{mvme,sim}-crt0.o (_start): Make initial stack frame 64
+ bytes, not 56 so that it is aligned to a 16 byte boundary.
+
+Tue Nov 5 10:24:29 1996 Doug Evans <dje@canuck.cygnus.com>
+
+ * sparc/Makefile.in (crt0-701.o): Use default rule to build.
+ * sparc/crt0-701.S: Second pass at little endian support.
+
+Tue Nov 5 10:08:40 1996 Dawn Perchik <dawn@critters.cygnus.com>
+
+ * sparc/{salib-701.c,sparclet-stub.c,tsc701.ld}: New files.
+ * sparc/Makefile.in: Add rules for above.
+ (701_OBJS): Add salib-701.o, sparclet-stub.o.
+
+Fri Nov 1 21:50:12 1996 Angela Marie Thomas (angela@cygnus.com)
+
+ * mips/ddb.ld: rename cairo.ld to ddb.ld
+ * mips/Makefile.in: rename cairo to ddb
+
+Thu Oct 31 13:54:58 1996 Stan Shebs <shebs@andros.cygnus.com>
+
+ * sh/sh1lcevb.ld, sh/sh2lcevb.ld, sh/sh3lcevb.ld: New files,
+ linker scripts for Hitachi eval boards.
+
+Thu Oct 31 12:39:53 1996 Doug Evans <dje@seba.cygnus.com>
+
+ * m32r/crt0.S: Set up fp. Speed up zeroing of bss.
+
+Sun Oct 27 20:34:27 1996 Mark Alexander <marka@cygnus.com>
+
+ * mips/crt0.S: Initialize gp register correctly.
+
+Tue Oct 22 12:02:19 1996 Doug Evans <dje@canuck.cygnus.com>
+
+ * m32r/sys/syscall.h: New file.
+ * m32r/crt0.S: Rewrite.
+ * m32r/crtsysc.c (__trap): Adjust literal and comment syntax.
+
+Thu Oct 17 13:47:54 1996 Doug Evans <dje@canuck.cygnus.com>
+
+ * m32r/syscalls.c: Deleted, renamed to
+ * m32r/crtsysc.c: this.
+ * m32r/Makefile.in: Updated.
+
+Mon Sep 30 11:42:08 1996 Doug Evans <dje@canuck.cygnus.com>
+
+ * m32r/{Makefile.in,configure.in,configure}: New files.
+ * m32r/{crt0.S,syscalls.c,trap.S}: New files.
+ * configure.in: Recognize m32r-*-*.
+ * configure: Regenerated.
+
+Thu Sep 26 10:59:25 1996 James G. Smith <jsmith@cygnus.co.uk>
+
+ * mips/crt0.S (_exit): Update terminating break instruction to use
+ an explicit high value.
+
+Mon Sep 23 19:02:32 1996 Stan Shebs <shebs@andros.cygnus.com>
+
+ * sh: New directory, Hitachi SH libgloss support.
+ * sh/sh3bb.ld: New file, SH3 big box linker script.
+
+Thu Sep 19 12:02:23 1996 Ian Lance Taylor <ian@cygnus.com>
+
+ * mips/crt0.S (zerobss): Use bltu in zerobss loop, not bne, in
+ case the end symbol is not aligned.
+
+Sun Sep 15 12:23:47 1996 James G. Smith <jsmith@cygnus.co.uk>
+
+ * mips/vr4300.S (__cpu_flush): Fix lui constant.
+ * mips/crt0.S (init): Fix passing of arg0 through exit() and
+ _exit().
+ * mips/syscalls.c (__errno): Return address of errno, rather than
+ NULL.
+
+Wed Sep 11 10:45:13 1996 Stu Grossman (grossman@critters.cygnus.com)
+
+ * m68k/bcc.ls, m68k/idp.ld, m68k/mvme135.ld, m68k/mvme162.ld:
+ Merge .init and .fini sections into .text to fix a.out.
+
+Sun Sep 8 09:50:08 1996 Stu Grossman (grossman@critters.cygnus.com)
+
+ * m68k/bcc.ls, m68k/idp.ld, m68k/mvme135.ld, m68k/mvme162.ld:
+ Many fixes for problems discovered during testing. Make stack end
+ at end of ram. Force __CTOR_LIST__ and __DTOR_LIST__ to be
+ longword aligned. Move .shdata out of .text section. Put .rodata
+ and .gcc_except_table into .text section. Get rid of .shbss
+ section, load it into .bss. Remove bogus start address
+ calculation for .bss. Force all sections to be longword aligned.
+ Create .init and .fini sections (including function prologues and
+ epilogues) for ELF support.
+ * cpu32bug.S cpu32bug.h: Move defs for cpu32bug monitor into
+ cpu32bug.h. Make sure that cpu32bug function codes aren't global.
+ Remove creation of vbr_table. Fix function prologue in _exit.
+ Use fp instead of a6. Add .text pseudo-op to the beginning of
+ each function.
+ * crt0.S: Remove global symbols zeroboss, init and launch. Make
+ main, exit, hardware_init_hook, software_init_hook, atexit and
+ __do_global_dtors extern, not global. Fix logic error when
+ initializing stack pointer. It now loads sp if __stack is non-
+ zero. Reverse order of software and hardware init hooks.
+ Hardware now comes first. Add call to __INIT_SECTION__, and
+ register __FINI_SECTION__ with atexit. This is needed to make ELF
+ static constructors and destructors work right.
+
+Tue Sep 3 11:55:01 1996 Ian Lance Taylor <ian@cygnus.com>
+
+ * m68k/bcc.ld: Set address of .stab and .stabstr to 0, not `.'.
+ * m68k/idp.ld, m68k/mvme135.ld, m68k/mvme162.ld: Likewise.
+ * hp74x/hppa.c, rs6000/evm.ld, sparc/ex930.ld: Likewise.
+ * sparc/ex931.ld, sparc/ex934.ld, sparc/sim.ld: Likewise.
+
+Fri Aug 30 15:57:37 1996 James G. Smith <jsmith@cygnus.co.uk>
+
+ * mips/Makefile.in (SCRIPTS): Add cairo.
+ (vr4300.o:): Force build with target CFLAGS to ensure correct
+ multilib endianness. The -Tcairo.ld target uses libpmon.a aswell
+ as the -Tpmon.ld target.
+ * mips/{idt.ld,pmon.ld}: Remove explicit crt0.o include.
+ * mips/cairo.ld: Added.
+ * mips/crt0.S: Restore atexit() call. Fix startup stack
+ initialisation.
+ * mips/pmon.S: Fix monitor indirection to be 64bit clean.
+ * mips/vr4300.s: Added simple bus error handler to cope with
+ sizing memory that doesn't ghost, but does abort.
+ * mips/cma101.c: Improve the memory sizer.
+ * mips/regs.S: Add definitions for SR_KX, SR_SX and SR_UX.
+
+Thu Aug 29 17:07:45 1996 Michael Meissner <meissner@tiktok.cygnus.com>
+
+ * a29k/configure.in (i[345]86-*-*): Recognize i686 for pentium
+ pro.
+ * testsuite/libgloss.all/configure.in (i[345]86-*-*): Ditto.
+ * a29k/configure: Regenerate.
+
+Thu Aug 22 10:31:38 1996 Michael Meissner <meissner@tiktok.cygnus.com>
+
+ * rs6000/Makefile.in (install{,-linux,-solaris}): Add install of
+ Linux, Solaris libraries if built.
+
+Fri Aug 16 10:12:48 1996 Rob Savoye <rob@chinadoll.cygnus.com>
+
+ * m68k/Makefile.in: Add -nostdlib to the test targets.
+ * m68k/{idp,bcc,mvme135,mvme162}.ld: Move the CTORS and DTORS from
+ .data to .text where they really belong.
+ * m68k/crt0.S(launch): Don't put __do_global_dtors into atexit,
+ GCC is supposed to do this in __main.
+
+Mon Aug 5 15:04:34 1996 Doug Evans <dje@canuck.cygnus.com>
+
+ * sparc/libsys/isatty.c: New file.
+
+Sun Aug 4 22:32:14 1996 Rob Savoye <rob@chinadoll.cygnus.com>
+
+ * pa/Makefile.in: Build the test case as seperate targets.
+ * pa/{w89k,op50n}.ld: Use GROUP rather than INPUT to get all the
+ libraries.
+
+Fri Aug 2 18:25:07 1996 J.T. Conklin <jtc@rtl.cygnus.com>
+
+ * m68k/Makefile.in: Install common crt0.o, remove old references
+ to per-bsp crt0's.
+
+Tue Jul 30 21:48:05 1996 Rob Savoye <rob@chinadoll.cygnus.com>
+
+ * sparc/Makefile.in: Built crt0.S, not crto.s.
+ * sparc/crt0.S: Don't use REGS macro, use % always.
+ * sparc/salib.c: Add a prototype for putDebugChar.
+
+Tue Jul 23 15:12:42 1996 Doug Evans <dje@canuck.cygnus.com>
+
+ * sparc/{sysc-701.c,crt0-701.S}: New files.
+ * sparc/Makefile.in (all): Build them.
+ ($(701_BSP),crt0-701.o): New targets.
+ ($(CRT0),$(SIM_CRT0),dtor.o): Don't use $<, for sunos make.
+ (all): Depend on $($(CPU)_ALL).
+ (install): Use $(INSTALL_DATA), not $(INSTALL_PROGRAM).
+ Depend on $($(CPU)_INSTALL).
+ * sparc/configure.in (libgloss_topdir): Delete unnecessary $(srcdir).
+ (AC_CONFIG_AUX_DIR): Call.
+ (CPU): Define.
+ * sparc/configure: Regenerated.
+
+Mon Jul 22 14:32:39 1996 Doug Evans <dje@canuck.cygnus.com>
+
+ * config/{default.mt,mips.mt}: Don't use $<, for sunos make.
+
+Mon Jul 22 15:54:02 1996 Ian Lance Taylor <ian@cygnus.com>
+
+ * m68k/crt0.S (zerobss): Don't use dbra if __mcf5200__.
+
+Sun Jul 14 16:47:14 1996 Michael Meissner <meissner@tiktok.cygnus.com>
+
+ * lseek.c (lseek): Don't use SET_ERRNO.
+ * open.c (open): Ditto.
+
+Wed Jul 3 18:19:10 1996 Stu Grossman (grossman@critters.cygnus.com)
+
+ * sparc/Makefile.in: Install ex930/931/934.ld files.
+ * sparc/configure, sparc/configure.in: Use AC_CANONICAL_SYSTEM to
+ define target_alias to make install work from this directory.
+
+Wed Jul 3 18:04:49 1996 Ian Lance Taylor <ian@cygnus.com>
+
+ * Makefile.in: Make sure we always have an argument to for. Make
+ sure rootpre and srcrootpre are always set before using
+ FLAGS_TO_PASS.
+
+Tue Jul 2 18:04:31 1996 J.T. Conklin <jtc@hippo.cygnus.com>
+
+ * glue.h (SET_ERRNO): Removed.
+ * sbrk.c, stat.c, unlink.c: Don't use SET_ERRNO.
+
+Mon Jul 1 14:24:51 1996 Michael Meissner <meissner@tiktok.cygnus.com>
+
+ * rs6000/Makefile.in: Add $(srcdir)/.. dependencies for all files
+ in the toplevel.
+
+Sat Jun 29 23:26:39 1996 James G. Smith <jsmith@cygnus.co.uk>
+
+ * mips/cma101.c (DOSYNC): Explicitly select -mips2 for the
+ assembly of the "sync" instruction.
+ * mips/Makefile.in: Removed special cma101.o build. Seperate
+ install.sh invocations for the BSP libraries.
+
+Sat Jun 29 08:17:52 1996 Michael Meissner <meissner@tiktok.cygnus.com>
+
+ * doc/porting.texi (GNU remote protocol): Fix bad texinfo.
+
+Fri Jun 28 23:16:37 1996 Rob Savoye <rob@chinadoll>
+
+ * sparc/traps.S: Don't use REGS macro, use % always.
+ * sparc/Makefile.in: Add -nostdlib when building the test cases,
+ as gcc keeps thinks it wants two crt0.o.
+ * sparc/asm.h: Don't define the REGS macro, we'll use explicit
+ register prefixes. Always define USER_LABEL_PREFIX cause gcc is
+ broken, and I doubt it'll get fixed.
+
+Sat Jun 29 05:05:15 1996 James G. Smith <jsmith@cygnus.co.uk>
+
+ * mips/crt0.S (zerobss): Fix the stack-pointer calculation.
+
+Thu Jun 27 17:23:33 1996 Ian Lance Taylor <ian@cygnus.com>
+
+ * mips/Makefile.in (vr4300.o): Pass -mips3 after $(ASFLAGS).
+ (cma101.o): Pass -mips2 after $(CFLAGS).
+
+Tue Jun 25 22:48:15 1996 Jason Molenda (crash@godzilla.cygnus.co.jp)
+
+ * Makefile.in (bindir, libdir): Use autoconf-set values.
+ * configure: Rebuilt.
+
+ * doc/Makefile.in (mandir, infodir): Use autoconf-set values.
+ * doc/configure.in (AC_PREREQ): autoconf 2.5 or higher.
+ * doc/configure: Rebuilt.
+
+ * {a29k,hp74x,i960,m68k,mips,pa,rs6000,sparc,sparc/libsys}/Makefile.in
+ (bindir, libdir): Use autoconf-set values.
+ * {a29k,hp74x,i960,m68k,mips,pa,rs6000,sparc,sparc/libsys}/configure.in
+ (AC_PREREQ): autoconf 2.5 or higher.
+ * {a29k,hp74x,i960,m68k,mips,pa,rs6000,sparc,sparc/libsys}/configure:
+ Rebuilt.
+
+Mon Jun 24 22:01:11 1996 Rob Savoye <rob@chinadoll.cygnus.com>
+
+ * sparc/crt0.S: Set the stack to the upper part of memory. Execute
+ hardware_init_hook and software_init_hook if they exist with a
+ legit address. Drop into exit after main. Zero the bss section.
+ * sparc/ex930.ld: PROVIDE hardware_init_hook and
+ software_init_hook.
+
+Mon Jun 24 19:44:45 1996 Ian Lance Taylor <ian@cygnus.com>
+
+ * mips/Makefile.in (cma101.o): Use -mips2 option when compiling.
+
+Wed Jun 19 13:57:36 1996 Rob Savoye <rob@darkstar.cygnus.com>
+
+ * debug.[ch]: New files for GDB stub support.
+ * config/default.mt: Add rules for debug.o.
+ * config/default.mh: Add rule for building C++ source. Add $srcdir
+ to INCLUDES so shared header files can be found.
+
+ * sparc/salib.c(exceptionHandler): Range check the vector number
+ so we get a legit %tbr value. Add wrappers so inbyte and outbyte
+ work.
+ * sparc/crt0.s: Handle cpus that don't have FP support.
+ * sparc/Makefile.in: Add multilib support. Add variable for
+ objcopy and objdump. Build the BSPs as archive libraries, not
+ object files. Add support for the SIS sparc simulator. Build the
+ test case srecords and dissasembly as seperate makefile
+ targets. Also optionally build the C++ test case. Use a target
+ makefile fragment.
+ * sparc/configure.in: Add multilib support.
+ * sparc/configure: Regenerated.
+ * sparc/asm.h: Macros to deal with aout and coff formats portably.
+ * sparc/slite.h: Sparclite specific stuff.
+ * sparc/{sim-crt0.S,sim-stub.c,sim-io.c,sim.ld}: New support for
+ the SIS sparc simulator.
+ * sparc/traps.S: Generic trap handlers for SIS and ex93x targets.
+ * sparc/tests.c: Test case for linking and GDB protocol.
+
+Tue Jun 18 20:06:16 1996 Rob Savoye <rob@chinadoll.cygnus.com>
+
+ * pa/Makefile.in: Build the test case srecords and dissasembly
+ as seperate makefile targets. Also optionally build the C++ test
+ case.
+ * pa/crt0.S: If __stack and __globals have a legit address, use
+ that for %sp and %gp. Execute hardware_init_hook and
+ software_init_hook if they exist with a legit address. Add
+ __do_global_dtors() to the atexit array.
+ * pa/{w89k,op50n}.ld: Use GROUP rather than INPUT to get the
+ libraries. Allocate the stack and global spaces from the top of
+ memory. PROVIDE hardware_init_hook and software_init_hook.
+
+ * m68k/Makefile.in: Build the test case srecords and dissasembly
+ as seperate makefile targets. Also optionally build the C++ test
+ case.
+ * m68k/asm.h: Don't define __USER_LABEL_PREFIX__ and
+ __REGISTER_PREFIX__ ourselves since suprisingly gcc sets them
+ correctly for a change.
+ * m68k/{bcc,mvme135,mvme162,idp}.ld: Use the same crt0 rather than
+ building seperate ones. PROVIDE hardware_init_hook and
+ software_init_hook. Stick the Constructors and Destructors in
+ .data cause they don't work in .text (which is where they should
+ really be).
+ * m68k/cpu32bug: Add a few more traps to support the older ABug
+ monitor.
+ * m68k/crt0.S: If __stack is isn't set, set the stack to the top
+ of memory. Excecute hardware_init_hook and software_init_hook if
+ they exist with a legit address. Add __do_global_dtors() to the
+ atexit array.
+
+ * rs6000/Makefile.in: Use the linker script to build the test
+ case. Also build a C++ test case.
+ * rs6000/dtor.C: Test contructors and destructors.
+ * rs6000/{sim,mvme}.ld: New linkers scripts for the simulator and
+ the mvme board.
+ * rs6000/evm.ld: Provide hardware_init_hook and software_init_hook
+ so we can test for them in the crt0.S.
+ * rs6000/crto.S: Excecute hardware_init_hook and
+ software_init_hook if they exist with a legit address.
+
+Mon Jun 17 18:39:17 1996 Rob Savoye <rob@chinadoll.cygnus.com>
+
+ * mips/Makefile.in: Replace the "test" target with seperate
+ targets for the dissasembled file, and the srecord.
+ * mips/configure.in: Use a target makefile fragment.
+ * mips/configure: Regenerate.
+ * mips/idt.ld: Add a comment on producing srecords. Setup a space
+ for the stack. PROVIDE hardware_init_hook and software_init_hook.
+ * mips/crt0.S: Make a small stack. Run memsize() using the temp
+ stack, and then set the stack to the top of memory. Also grab some
+ space for the globals. Add __do_global_dtors() to the atexit
+ array. Call _exit from newlib so the atexit array gets run, then
+ exits.
+
+Thu Jun 13 15:44:46 1996 Ian Lance Taylor <ian@cygnus.com>
+
+ * mips/Makefile.in (vr4300.o): Use -mips3 option when assembling.
+
+Sat Jun 1 16:27:53 1996 Michael Meissner <meissner@wogglebug.tiac.net>
+
+ * rs6000/simulator.S (open, close, lseek): Add system calls.
+ * rs6000/Makefile.in (OBJS): Don't put open.o, close.o, lseek.o
+ here.
+ (SIM_OBJS): Put them here instead.
+
+Tue Apr 30 20:01:08 1996 Rob Savoye <rob@chinadoll.cygnus.com>
+
+ * m68k/crt0.S: Don't allocate __stack in the .bss section.
+ * m68k/{idp,mvme135,mvme162,bcc}.ld: Set __stack to a word below
+ the top of memory. Use "-l" in GROUP rather than the full name so
+ it'll get found using the path lookup in LD. Also link in libgcc
+ too. Don't set __lstack anymore.
+ * m68k/Makefile.in: Build test as a series of Makefile targets,
+ rather than as a big loop.
+
+Thu Apr 25 08:38:15 1996 Michael Meissner <meissner@tiktok.cygnus.com>
+
+ * rs6000/mvme-stack.S: New file, define __stack.
+ * rs6000/mvme-crt0.S (_start): If __stack is not 0, use that for
+ the stack address.
+
+Thu Apr 25 06:42:02 1996 Rob Savoye <rob@chinadoll.cygnus.com>
+
+ * rs6000/Makefile.in: Add support for multilib.
+ * rs6000/configure.in: Ditto.
+ * rs6000/configure: Regenerate.
+
+Wed Apr 24 11:02:33 1996 Doug Evans <dje@blues.cygnus.com>
+
+ * sparc/libsys/Makefile.in (isatty.o): Add rule for SunOS VPATH.
+
+Fri Apr 19 13:23:31 1996 Rob Savoye <rob@chinadoll.cygnus.com>
+
+ * {mips,a29k,pa}/configure.in: Add support for multilibs
+ by using config-ml.in.
+ * {mips,a29k,pa}/configure: Regenerate.
+ * {mips,a29k,pa}/Makefile.in: Build archive libraries,
+ not objects for the BSPs.
+
+Fri Apr 19 12:33:25 1996 Michael Meissner <meissner@tiktok.cygnus.com>
+
+ * rs6000/sol-crt0.c: Delete, file moved into gcc directory.
+
+Mon Apr 15 14:09:26 1996 Michael Meissner <meissner@tiktok.cygnus.com>
+
+ * rs6000/simulator.S: Call _cerror to save errno if an error
+ occurred.
+ * rs6000/sim-errno.c (_cerrno): New function to set errno.
+
+Thu Apr 11 14:19:01 1996 Michael Meissner <meissner@tiktok.cygnus.com>
+
+ * rs6000/sol-{crt0.c,syscall.S,cfuncs.c}: New files to support
+ libgloss on PowerPC Solaris.
+
+ * rs6000/Makefile.in: Add Solaris support.
+
+Tue Apr 16 17:43:06 1996 Rob Savoye <rob@chinadoll.cygnus.com>
+
+ * Makefile.in: Don't do anything if SUBDIRS is empty.
+
+Mon Apr 15 15:37:52 1996 Rob Savoye <rob@chinadoll.cygnus.com>
+
+ * configure.in, m68k/configure.in: Add support for multilibs by
+ using config-ml.in.
+ * m68k/crt0.S: If a value for __stack hasn't been specified,
+ initialize %sp to some memory in .bss.
+ * m68k/Makefile.in: Build archive libraries, not objects for the
+ BSPs. Build multiple copies of the crt0.o, one for each target. Add
+ support to build multilibs.
+ * idp.ld, bcc.ld, mvme135.ld, mvme162.ld: Use GROUP to look for
+ libc.a and the BSP rather than INPUT an object. Get the right
+ crt0.o.
+
+Tue Apr 9 23:31:53 1996 Ian Lance Taylor <ian@cygnus.com>
+
+ * m68k/cpu32bug.S (getDebugChar): Use extw/extl rather than
+ extbl, so it can be used on a 68000.
+
+Wed Mar 27 17:18:01 1996 Michael Meissner <meissner@tiktok.cygnus.com>
+
+ * rs6000/{mvme-exit,simulator}.S (_exit): Loop on a trap
+ instruction following the _exit system call. This also makes sure
+ that the debugger reports the address as being in _exit, rather
+ than whatever function follows _exit.
+
+Fri Mar 15 12:30:02 1996 J.T. Conklin <jtc@rtl.cygnus.com>
+
+ * i960/{Makefile.in,asm.h,configure,configure.in,mon-read.c,
+ mon-syscalls.S,mon-write.c}: Initial support for MON960.
+ * configure.in: Add support for i960.
+ * configure: Rebuild with autoconf 2.8.
+
+Fri Mar 8 18:12:52 1996 Ian Lance Taylor <ian@cygnus.com>
+
+ * a29k/configure.in: Call AC_CONFIG_AUX_DIR.
+ * a29k/configure: Rebuild with autoconf 2.7.
+ * m68k/configure.in: Call AC_CONFIG_AUX_DIR before
+ AC_CANONICAL_SYSTEM.
+ * mips/configure.in, pa/configure.in: Likewise.
+ * rs6000/configure.in: Likewise.
+ * m68k/configure, mips/configure, pa/configure: Rebuild.
+ * rs6000/configure: Rebuild.
+
+Fri Mar 8 08:11:14 1996 Doug Evans <dje@charmed.cygnus.com>
+
+ * sparc/libsys/sbrk.S (curbrk): Moved from here,
+ * sparc/libsys/cerror.S (curbrk): To here.
+
+Thu Mar 7 11:39:09 1996 James G. Smith <jsmith@cygnus.co.uk>
+
+ * mips/crt0.S (bssloop): Updated comment to reflect the source.
+
+Wed Mar 6 18:12:25 1996 Doug Evans <dje@charmed.cygnus.com>
+
+ * configure.in (sparclet-*-aout*): Add entry.
+ * configure: Regenerated.
+ * sparc/libsys/{Makefile.in,configure.in,configure,isatty.c,
+ libsys-crt0.S,sbrk.S,syscall.h,syscallasm.h,template.S,template_r.S}:
+ New files.
+
+Fri Feb 23 22:21:07 1996 Rob Savoye <rob@chinadoll.cygnus.com>
+
+ * a29k: New dir for a29k-coff support for the AMSAT Phase-3D
+ satellite. (doesn't use udi)
+ * a29k/{29200-io.c,Makefile.in,configure,configure.in,README,crt0.s,
+ p3dgps.ld,sa29200.ld,sa29200b.ld,test.c: New files for a29k
+ support.
+ * a29k/sys/{cpudef.h,intrinsi.h,macros.h,romdcl.h,sysmac.h,
+ fpsymbol.h,libconfig.h,proreg.h,smartmac.h}: New files for a29k
+ support.
+ * configure.in: Add support for a29k.
+ * configure: Rebuild.
+
+Thu Feb 22 13:32:28 1996 Michael Meissner <meissner@tiktok.cygnus.com>
+
+ * rs6000/mvme-read.c (read): New file, if large read, do a .INLN
+ system call, instead of sucessive .INCHR system calls. Map \r on
+ input to \n.
+
+ * rs6000/mvme-inbyte.S: Add stub for new input system calls.
+
+ * rs6000/Makefile.in (MVME_OBJS): Add mvme-read.o, delete read.o
+
+Wed Feb 21 16:45:19 1996 Michael Meissner <meissner@tiktok.cygnus.com>
+
+ * rs6000/mvme-print.c: New file, map write into sequences of
+ .OUTLN/.OUTCHR/.PCRLF rather than just using .OUTCHR.
+
+ * rs6000/mvme-outbyte.S: Add stubs for new output system calls.
+
+ * rs6000/Makefile.in (MVME_OBJS): Add mvme-print.o, delete print.o
+ and write.o.
+
+Thu Feb 15 11:37:02 1996 James G. Smith <jsmith@cygnus.co.uk>
+
+ * mips/{mipsidt,mipspmon}.ld: Added OUTPUT_ARCH definition.
+ * mips/cma101.c (time): Added time() function.
+
+Tue Feb 13 10:36:07 1996 James G. Smith <jsmith@cygnus.co.uk>
+
+ * mips/vr4300.S (__cpu_flush): Fix loop counter.
+
+Tue Jan 30 15:41:19 1996 James G. Smith <jsmith@cygnus.co.uk>
+
+ * mips/syscalls.c: Used include file, rather than local manifest
+ definitions.
+ * mips/crt0.S: Removed IDT monitor entry points.
+ * mips/Makefile.in: Construct mipsidt and mipspmon BSP files.
+ * mips/{cma101.c,idtmon.S,pmon.S,regs.S,vr4300.S}: Added.
+ * mips/{mipspmon.ld}: Added.
+
+Sun Jan 28 08:01:31 1996 Michael Meissner <meissner@tiktok.cygnus.com>
+
+ * rs6000/configure.in (AC_INIT): Use sim-crt0.S, not crt0.s.
+ * rs6000/configure: Regenerate.
+
+Wed Jan 24 14:26:01 1996 Michael Meissner <meissner@tiktok.cygnus.com>
+
+ * rs6000/{mvme,sim}-crt0.S (__atexit): Put the __atexit variable
+ in the .sdata section, and provide a fixup for the address, in
+ order to support the new -msdata compiler flag.
+
+Thu Jan 11 11:24:25 1996 Michael Meissner <meissner@tiktok.cygnus.com>
+
+ * rs6000/{mvme,sim}-crt0.S (__atexit): Provide address of atexit,
+ so eabi-ctors in libgcc.a can know to register the function to
+ call all of the destructors.
+
+Sat Dec 30 14:31:37 1995 Doug Evans <dje@canuck.cygnus.com>
+
+ * configure.in (AC_CONFIG_AUX_DIR): Adjust to new build tree layout.
+ * {doc,hp74x,m68k,mips,pa,rs6000,sparc}/configure.in
+ (AC_CONFIG_AUX_DIR): Define
+ * {,doc,hp74x,m68k,mips,pa,rs6000,sparc}/configure: Regenerated.
+
+Mon Dec 11 12:20:24 1995 Ian Lance Taylor <ian@cygnus.com>
+
+ * Makefile.in (FLAGS_TO_PASS): Add INSTALL, INSTALL_PROGRAM,
+ and INSTALL_DATA.
+
+Fri Dec 1 16:54:15 1995 James G. Smith <jsmith@cygnus.co.uk>
+
+ * mips/syscalls.c (sbrk): Fixed memory addressing. System call
+ returns size, not (last address + 1).
+
+Thu Nov 16 13:47:57 1995 Ian Lance Taylor <ian@cygnus.com>
+
+ * config/default.mh: Don't define CC_FOR_TARGET, AS_FOR_TARGET,
+ AR_FOR_TARGET, LD_FOR_TARGET, RANLIB_FOR_TARGET, NM_FOR_TARGET,
+ OBJDUMP_FOR_TARGET, or OBJCOPY_FOR_TARGET. Change the build rules
+ to use CC, etc., instead of CC_FOR_TARGET, etc.
+ * configure.in, */configure.in: Get values for CC, AS, AR, LD, and
+ RANLIB. Always use default.mh.
+ * Makefile.in (FLAGS_TO_PASS): Pass down LD.
+ * Makefile.in, */Makefile.in: Let CC, AS, AR, LD, and RANLIB by
+ substituted by the autoconf configure script. Use them instead of
+ the *_FOR_TARGET variants.
+ * hp74x/configure.in: Don't call AC_CANONICAL_SYSTEM.
+ * m68k/configure.in: Call AC_ARG_PROGRAM.
+ * mips/configure.in, pa/configure.in: Likewise.
+ * rs6000/configure.in: Likewise.
+ * m68k/Makefile.in: Set program_transform_name, OBJDUMP, and
+ OBJCOPY.
+ * mips/Makefile.in, pa/Makefile.in, rs6000/Makefile.in: Likewise.
+ * mips/Makefile.in: Split new test target from all target.
+ * configure, */configure: Rebuild.
+
+Tue Nov 14 12:04:36 1995 Angela Marie Thomas (angela@cygnus.com)
+
+ * Makefile.in: Added prefix, exec-prefix and tooldir to
+ FLAGS_TO_PASS so vaulting works correctly.
+
+Tue Nov 14 18:32:41 1995 James G. Smith <jsmith@cygnus.co.uk>
+
+ * mips/mipsidt.ld: Added.
+ * mips/syscalls.c: Added.
+ * mips/crt0.S: Added FPU presence check, and entry points into IDT
+ monitor.
+ * mips/Makefile.in (all): Updated to build generic IDT monitor
+ crt0.o file.
+ * mips/test.c (main): Removed unnecessary prototypes.
+ * configure.in (configdirs): Removed mips64vr4300 target.
+ * configure: Re-generated.
+ * config/default.mh (OBJDUMP_FOR_TARGET): Added missing parent
+ directory path element.
+ * mipsidt: Directory removed.
+
+Fri Nov 10 12:50:03 1995 Ian Lance Taylor <ian@cygnus.com>
+
+ * configure.in, */configure.in: Don't call AC_ARG_PROGRAM.
+ * configure, */configure: Rebuild.
+ * Makefile.in, */Makefile.in: Don't set program_transform_name.
+
+Wed Nov 8 16:19:31 1995 James G. Smith <jsmith@pasanda.cygnus.co.uk>
+
+ * configure.in (configdirs): Add mips*vr4300*-*-* target.
+
+ * configure: Re-generated.
+
+ * mipsidt/crt0.S: Check for FPU presence.
+
+ * mipsidt/mipsidt.ld: Removed explicit crt0.o from link.
+
+ * mipsidt/Makefile.in: Explicitly link against crt0.o file.
+
+Thu Nov 2 23:27:28 1995 Rob Savoye <rob@chinadoll.cygnus.com>
+
+ * config/default.mh: Add additional "../" to path used to find
+ comp-tools binaries in an object tree.
+
+Mon Oct 30 18:10:47 1995 Michael Meissner <meissner@tiktok.cygnus.com>
+
+ * rs6000/mvme-crt0.S (_start): Zero out bss before the the program
+ starts.
+
+Tue Oct 24 10:07:50 1995 Michael Meissner <meissner@tiktok.cygnus.com>
+
+ * rs6000/mvme-{exit,outbyte,inbyte}.S: Use hex for the system
+ calls, not decimal, since formatting the disk when you intend to
+ write out a character is not nice.
+
+Mon Oct 23 22:17:12 1995 Michael Meissner <meissner@tiktok.cygnus.com>
+
+ * rs6000/mvme-crt0.S (_start): Bump sp by -4 before storing end of
+ stack chain to avoid last word indebugger's memory.
+
+ * rs6000/mvme-{exit,inbyte,outbyte}.S: System call number goes in
+ r10, not r0.
+
+Mon Oct 23 17:57:23 1995 James G. Smith <jsmith@jaalfrezi.cygnus.co.uk>
+
+ * mipsidt/Makefile.in: Removed the LDFLAGS_FOR_TARGET in the test
+ program link.
+
+ * mipsidt/crt0.S: Changed monitor entry sequence.
+
+ * mipsidt/syscalls.c: Added local sbrk() function, derived from
+ (libgloss/sbrk.c), but using the monitor routine to ascertain the
+ amount of memory available.
+
+Mon Oct 23 11:58:04 1995 James G. Smith <jsmith@pasanda.cygnus.co.uk>
+
+ * mipsidt: Added (directory). This is a simple crt0 module for the
+ IDT MIPS monitor. The existing "libgloss/mips" directory is for a
+ specific R3000 board, so it was safer creating a new target
+ directory.
+ * mipsidt/Makefile.in: Added.
+ * mipsidt/configure: Added.
+ * mipsidt/configure.in: Added.
+ * mipsidt/crt0.S: Added.
+
+ * mipsidt/syscalls.c: Added.
+ * mipsidt/test.c: Added.
+
+ * configure (mips*vr4300*-*-*): Use new mipsidt target directory.
+
+Mon Oct 9 21:07:08 1995 Michael Meissner <meissner@cygnus.com>
+
+ * rs6000/Makefile (all asm rules): Remove asm.h dependency.
+ * rs6000/asm.h: File deleted, moved to gcc directory as ppc-asm.h.
+ * rs6000/mvme-{crt0,exit,inbyte,outbyte}.S: Include ppc-asm.h, not
+ asm.h.
+ * rs6000/sim{-crt0,ulator}.S: Ditto.
+
+ * rs6000/{mvme,sim}-crt0.S (_start): Don't use FUNC_START/FUNC_END
+ for _start, since the linker needs to see this.
+
+Mon Oct 9 12:08:12 1995 Stu Grossman (grossman@cygnus.com)
+
+ * sparc/sparc-stub.c: include sparclite.h to get access to register
+ fondling macros.
+ * (trap_low): Save and restore FP regs if necessary. Also, clean
+ up save and restore of debug unit regs.
+ * (hard_trap_info): Add more architecturally defined traps.
+ * (set_debug_traps): Only set FP disabled trap if FP is disabled.
+ * (get_in_break_mode): Clean up. Get rid of calls to
+ set_hw_breakpoint_trap(). Also, use write_asi macro
+ * (handle_exception): Clean up `g' and `G' commands. Add `P'
+ command.
+ * (hw_breakpoint): Why was this here!? It's gone now...
+ * sparc/crt0.s: Speed up prom copy loop. Clean up window over/under
+ flow setup. Call main instead of jumping to it.
+ * sparc/salib.c (get_uart_status rcv_char flush_i_cache): Use new
+ and improved read_asi macro.
+ * (win_ovf win_unf): Parameterize window size.
+ * sparclite.h (read_asi): Rewrite so that macro returns an rval.
+ * (read_psr write_psr): New macros to do the obvious.
+ * Add conditionalized code for 933 window size.
+
+Fri Oct 6 15:35:01 1995 Michael Meissner <meissner@tiktok.cygnus.com>
+
+ * rs6000/simulator.S (abort): Delete abort.
+ * rs6000/sim-abort.c: New file, to print message that abort was
+ called.
+ * rs6000/Makefile.in (SIM_OBJS): Add sim-abort.o.
+
+ * rs6000/asm.h (FUNC_NAME, FUNC_START, FUNC_END): New macros that
+ give the start and end of a function written in assembler. If
+ -mcall-aixdesc or -mcall-nt, create a function descriptor and name
+ the real function with one or two leading periods.
+
+ * rs6000/{simulator,sim-crt0}.S: Use new function macros.
+ * rs6000/mvme-{crt0,exit,inbyte,outbyte}.S: Ditto.
+
+ * rs6000/Makefile.in: Add asm.h as a dependent for all .S files.
+ Compile the .S files with gcc, so that -mcall-* flags define the
+ appropriate macros.
+
+Thu Sep 28 13:49:45 1995 Ian Lance Taylor <ian@cygnus.com>
+
+ * sparc/ex93x.ld: Remove crt0.o from INPUT; gcc will normally pass
+ crt0.o anyhow. Add leading underscore to __CTOR_LIST__, et. al.
+ * sparc/salib.c (__main): Comment out empty function.
+
+Wed Sep 20 14:36:12 1995 Ian Lance Taylor <ian@cygnus.com>
+
+ * Makefile.in (maintainer-clean): New synonym for realclean.
+ * hp74x/Makefile.in (maintainer-clean): Likewise.
+ * m68k/Makefile.in (maintainer-clean): Likewise.
+ * pa/Makefile.in (maintainer-clean): Likewise.
+ * mips/Makefile.in (maintainer-clean): Likewise.
+ * rs6000/Makefile.in (maintainer-clean): Likewise.
+ * sparc/Makefile.in (maintainer-clean): Likewise.
+ * doc/Makefile.in (maintainer-clean): Likewise.
+ * testsuite/Makefile.in (maintainer-clean): Likewise.
+ * testsuite/libgloss.all/Makefile.in (maintainer-clean): Likewise.
+
+Sat Sep 16 23:04:11 1995 Michael Meissner <meissner@tiktok.cygnus.com>
+
+ * rs6000/Makefile.in (all): Fix typo preventing simulator from
+ being built.
+
+Tue Sep 12 10:43:41 1995 J.T. Conklin <jtc@rtl.cygnus.com>
+
+ * rs6000/Makefile.in: Misc mvme support fixes.
+
+ * rs6000/{mvme-exit.S, mvme-inbyte.S, mvme-outbyte.S}: Strip
+ leading underscores from identifiers.
+
+ * m68k/asm.h: New file, macro definitions helpful for assembly
+ language programming.
+ * m68k/{cpu32bug.S, crt0.S, mvme.S, mvme135-asm.S, mvme162lx-asm.S}:
+ Use asm.h.
+
+ * rs6000/{mvme-crt0.S, mvme-exit.S, mvme-inbyte.S, mvme-outbyte.S}:
+ New files, preliminary support for motorola mvme targets running
+ the ppcbug monitor.
+ * rs6000/Makefile.in: Build mvme support.
+
+ * rs6000/asm.h: New file, macro definitions helpful for assembly
+ language programming.
+ * rs6000/{sim-crt0.S, simulator.S}: Use asm.h.
+
+Fri Sep 8 18:51:29 1995 Michael Meissner <meissner@wogglebug.tiac.net>
+
+ * rs6000/sim-sbrk.c (sbrk): Add cast to silence warning.
+
+Fri Sep 8 13:03:12 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
+
+ * m68k/idp-inbyte.c (READREG): Add volatile to the cast, to avoid
+ reordered insns that can end up being an infinite loop.
+ * m68k/idp-outbyte.c (READREG): Likewise.
+
+Wed Sep 6 10:01:33 1995 Michael Meissner <meissner@tiktok.cygnus.com>
+
+ * rs6000/sim-sbrk.c (sbrk): Use the brk system call, instead of
+ using a large static area for the break area.
+
+Thu Aug 24 14:57:28 1995 Michael Meissner <meissner@tiktok.cygnus.com>
+
+ * rs6000/Makefile.in (install*): Add separate installation rules
+ for sim and evm targets.
+
+Wed Aug 23 16:49:02 1995 Michael Meissner <meissner@tiktok.cygnus.com>
+
+ * rs6000/sim*: Add PowerPC simulator support.
+
+Tue Aug 22 11:52:40 1995 Jeff Law (law@snake.cs.utah.edu)
+
+ * pa/hp-milli.s: Add entry/exit pseudo-ops around all exported
+ code. Fix callinfo directives to include "millicode" attribute.
+
+ * pa/hp-milli.s (divU): Fix bug found by arith-rand1.c testing.
+
+Mon Aug 21 23:31:42 1995 Jeff Law (law@snake.cs.utah.edu)
+
+ * pa/crt0.S ($START$): Use local label prefix for local label
+ "bssloop".
+
+Mon Aug 14 11:57:46 1995 Kung Hsu <kung@mexican.cygnus.com>
+
+ * ex93x/sparclite.h: add __WINSIZE.
+ * ex93x/salib.c: Use __WINSIZE, implements write with $O command of
+ stub protocol.
+
+Thu Aug 3 14:40:12 1995 J.T. Conklin <jtc@rtl.cygnus.com>
+
+ * Makefile.in: Updated to reflect filename changes.
+
+ * m68k/mc68681-duart.h: Renamed to m68681reg.h.
+ * m68k/mc68681-duart.c: Split up and renamed to idp-inbyte.c and
+ idp-outbyte.c
+
+Fri Jul 28 11:23:24 1995 J.T. Conklin <jtc@rtl.cygnus.com>
+
+ * m68k/mc68681-duart.h: Removed everything except register offsets.
+ Changed offsets so they reflect actual chip instead of how device
+ is mapped into the IDP address space.
+ * m68k/mc68681-duart.c (DUART_ADDR): New macro, base address.
+ (READREG, WRITEREG): Changed to correspond to unusual way the
+ device is mapped (ie. base address + (reg offset * 4) + 3)).
+ (duart_status, duart_mode, duart_init, duart_restore): Removed,
+ these interfaces were never used and didn't work.
+ (outbyte): Removed unconditional delay.
+
+ * m68k/crt0.S: Use SYM(_end) instead of end. This completes my
+ change of April 18th which makes the "_end" symbol compatible
+ with both a.out and coff toolchains.
+ (zerobss): Handle zero-length bss.
+
+Thu Jul 27 15:35:37 1995 J.T. Conklin <jtc@rtl.cygnus.com>
+
+ * configure, {doc, hp74x, m68k, mips, pa, sparc}/configure:
+ regenerated with autoconf 2.4.2.
+
+Wed Jul 26 13:42:27 1995 J.T. Conklin <jtc@rtl.cygnus.com>
+
+ * doc/porting.texi: Fix typos and spelling errors.
+
+Mon Jun 26 09:23:23 1995 Jeffrey A. Law <law@rtl.cygnus.com>
+
+ * pa/Makefile.in: Enable HP supplied millicode routines.
+ * pa/hp-milli.s: Make sure copyright notice gets included
+ in objects files.
+
+ * pa/crt0.S ($START$): Use "%" instead of "'" to avoid losing whe
+ run through cpp.
+
+Fri Jun 16 18:40:22 1995 Jeffrey A. Law <law@rtl.cygnus.com>
+
+ * pa/crt0.S ($START$): Use long-calls to call main and exit.
+
+Tue Jun 13 16:05:13 1995 Rob Savoye <rob@darkstar.cygnus.com>
+
+ * pa/crt0.S: Call exit() after returning from main.
+
+Tue Jun 13 10:43:14 1995 J.T. Conklin <jtc@rtl.cygnus.com>
+
+ * Makefile.in, {doc, hp74x, m68k, mips, pa, sparc}/Makefile.in
+ (distclean, realclean): Remove autoconf-generated config.cache
+ and config.log files.
+
+Mon Jun 5 15:56:22 1995 J.T. Conklin <jtc@rtl.cygnus.com>
+
+ * config/{default.mh, dos.mh} (CFLAGS_FOR_TARGET): Added -O2.
+ (.c.o, .s.o, .S.o, etc.): Don't use @ to hide how the compiler
+ is invoked, it makes it much more difficult to debug.
+
+Tue May 30 19:07:59 1995 Rob Savoye <rob@darkstar.cygnus.com>
+
+ * testsuite/libgloss.all/math.c: Add additional tests for modulo.
+
+Mon May 29 13:03:39 1995 Rob Savoye <rob@darkstar.cygnus.com>
+
+ * stat.c: Add const so it works with newlib's stat.h.
+
+Thu May 25 16:28:42 1995 Rob Savoye <rob@darkstar.cygnus.com>
+
+ * m68k/mvme.S: Extend sign using two instructions rather than one
+ so it'll work on a stock mc68000.
+
+Tue May 23 18:12:19 1995 Rob Savoye <rob@darkstar.cygnus.com>
+
+ * close.c, stat.c, fstat.c, open.c, lseek.c, print.c, putnum.c,
+ unlink.c read.c, sbrk.c, getpid.x, kill.c: New files that used to
+ be glue.c.
+ * {m68k,pa,mips}/Makefile.in: Build using broken up glue.c.
+ * pa/Makefile.in: Make all just build BSP, add seperate test
+ target.
+ * most files: add Cygnus BSD-style copyright message.
+
+Tue May 23 12:58:03 1995 J.T. Conklin <jtc@rtl.cygnus.com>
+
+ * configure.in, {hp74x, m68k, mips, pa, sparc}/configure.in:
+ Use changequote() to temporarily turn off m4 quoting so that
+ i[345]86-*-go32 pattern in case statement remains unchanged.
+ * configure, {hp74x, m68k, mips, pa, sparc}/configure:
+ regenerated.
+
+Tue May 23 11:15:52 1995 Angela Marie Thomas <angela@cirdan.cygnus.com>
+
+ * mips/Makefile.in (SCRIPT): added "SCRIPT = array.ld" so installs
+ work correctly.
+
+Mon May 22 21:33:49 1995 Rob Savoye <rob@darkstar.cygnus.com>
+
+ * ex93x: renamed to sparc.
+ * r3000: renamed to mips.
+ * hppro: renamed to pa.
+ * configure.in, configure: Use new directory names.
+ * config/default.mh: Remove '' in sed program_transform_name so
+ it actually works.
+ * doc/porting.texi: update doc.
+
+Wed May 17 17:25:53 1995 J.T. Conklin <jtc@rtl.cygnus.com>
+
+ * doc/configure.in: converted to autoconf.
+ * doc/configure: New file, generated with autoconf 2.3.
+
+ * Makefile.in, config/{ex93x, hp74x, hppro, m68k,
+ r3000}/Makefile.in (Makefile.in): Added config.status to
+ dependency list.
+ (config.status): New target.
+
+ * m68k/Makefile.in: Build M68332BCC BSP.
+
+Wed May 10 18:43:21 1995 Stu Grossman (grossman@andros.cygnus.com)
+
+ * glue.c: Change decl of end to char[] for some reason.
+ * (sbrk): Rewrite sbrk so that it works.
+ * (fstat): Return status indicating fd is for a tty. Makes stdio
+ work better.
+ * hppro/crt0.S (_sr4export): Retrieve rp from -24(sp), not
+ -18(sp). Note that -24 decimal == -18 hex...
+ * hppro/op50n-io.S: Add read and write interfaces to the rom
+ monitor. Unfortunately, the monitor doesn't seem to work...
+ * hppro/op50n.ld: Clean up lots of stuff. Define memory in a
+ nice way. Define stack and reserve space. Put heap after stack.
+
+Thu May 4 10:28:01 1995 J.T. Conklin <jtc@rtl.cygnus.com>
+
+ * configure.in (AC_PREREQ): Changed to 2.3, since autoconf
+ versions prior to this generate code that AIX 4.X's sh can't
+ hack.
+
+ * m68k/Makefile.in (BCC_BSP, BCC_OBJS): New BSP for M68332BCC.
+ * m68k/cpu32bug.S: New file, support for cpu32bug monitor used by
+ bcc.
+ * m68k/bcc.ld: Link with bcc.o
+
+Fri Apr 21 16:17:17 1995 Torbjorn Granlund <tege@rtl.cygnus.com>
+
+ * hppro/{milli.S,divide.S,divI.S,divU.S,multiply.S,test-div.c,
+ test-dyncall.c,test-mul.c,remI.S,remU.S,dyncall.S}: Delete.
+ * hppro/divcnst-generic/*: Delete.
+ * hppro/divcnst-fast/*: Delete.
+ * hppro/Makefile.in: Delete junk.
+
+Tue Apr 18 11:22:47 1995 J.T. Conklin <jtc@rtl.cygnus.com>
+
+ * m68k/{bcc.ld idp.ld, mvme135.ld, mvme162lx.ld}: Removed stack
+ section, moved __stack definition to the top level and set it
+ explicitly to the value appropriate to the target board.
+ Added __end symbol (needed for a.out toolchains).
+
+Mon Apr 17 12:48:48 1995 Stu Grossman (grossman@andros.cygnus.com)
+
+ * hppro/w89k.ld: Move _stack to before `end' and `_end' so that
+ malloc doesn't trash the stack.
+ * hppro/w89k-io.c (outbyte): Make this be void, and remove return
+ value, which is useless anyway.
+
+Mon Apr 17 06:13:55 1995 J.T. Conklin <jtc@rtl.cygnus.com>
+
+ * m68k/bcc.ld: New file, linker script for M68332BCC Business Card
+ Computer.
+ * m68k/Makefile.in: Install BCC linker script.
+
+ * Makefile.in: Fixed typo.
+
+ * hppro/configure.in: Changed AC_INIT file from crt0.s to crt0.S.
+ * hppro/configure: regenerated.
+
+Mon Apr 17 00:02:15 1995 Stu Grossman (grossman@andros.cygnus.com)
+
+ * hppro/op50n.ld: Define _stack explicitly instead of implicitly
+ via common.
+ * hppro/{w89k-io.c w89k.h}: Use pointers to volatile for inp and
+ outp. Use correct port numbers for COM1 serial port.
+
+Fri Apr 14 16:56:35 1995 Ken Raeburn <raeburn@cujo.cygnus.com>
+
+ * m68k/mc68ec.c (_exit): Use extended asm construct to get the
+ proper immediate-operand syntax for whatever the target assembler
+ configuration is.
+ * m68k/mvme.S (__IMMEDIATE_PREFIX__, IMM): Copy and use macro
+ definitions as in m68k/crt0.S.
+
+Thu Apr 13 16:48:46 1995 Angela Marie Thomas <angela@cirdan.cygnus.com>
+
+ * Makefile.in: fixed clean rules such that they do not try to
+ clean ${SUBDIRS} if libgloss not supported on that target.
+
+Thu Apr 13 13:39:46 1995 J.T. Conklin <jtc@rtl.cygnus.com>
+
+ * configure.in: Append new subdirectories to ${configdirs}.
+ (go32-*-*): Removed.
+ * configure: Regenerated.
+
+ * m68k/mvme162lx.ld: Put __stack in ram, even though it's not
+ loaded.
+
+ * m68k/Makefile.in: Don't hide how BSP objects are built.
+
+ * glue.c (print, putnum): declared void.
+
+ * {hppro,m68k}/Makefile.in: Use ${CC_FOR_TARGET} to link executables.
+ (LIBS_FOR_TARGET): Removed.
+
+ * config/{default.mh, dos.mh} (NEWLIB_CFLAGS, NEWLIB_LDFLAGS): New
+ make variables, expands to compiler flags to find headers and
+ libraries if ${objroot}/newlib is present.
+ (CFLAGS_FOR_TARGET): Added ${NEWLIB_CFLAGS}.
+ (LDFLAGS_FOR_TARGET): Added ${NEWLIB_LDFLAGS}.
+ (LIBC_FOR_TARGET, LIBM_FOR_TARGET, LIBGCC_FOR_TARGET,
+ LIBS_FOR_TARGET): Removed.
+
+Thu Apr 13 11:51:17 1995 Torbjorn Granlund <tege@adder.cygnus.com>
+
+ * m68k/Makefile.in (install): Use correct names for MVME* variables.
+ * configure.in: Delete `unknown' from m68* case.
+
+Thu Apr 13 11:47:01 1995 J.T. Conklin <jtc@rtl.cygnus.com>
+
+ * m68k/crt0.S: initialize stack pointer to __stack before creating
+ inital stack frame.
+
+ * m68k/{idp.ld, mvme135.ld, mvme162lx.ld}: Move __stack out of
+ bss, and into its own segment with an address at top of RAM.
+
+Wed Apr 12 12:36:28 1995 J.T. Conklin <jtc@rtl.cygnus.com>
+
+ * {.,ex93x,hp74x,hppro,m68k,r3000}/{Makefile,configure}.in:
+ converted to autoconf.
+ * {.,ex93x,hp74x,hppro,m68k,r3000}/configure: New files, generated
+ from configure.in with autoconf 2.3.
+
+Mon Apr 10 22:50:48 1995 J.T. Conklin (jtc@rtl.cygnus.com)
+
+ * m68k/{idp.ld, mvme135.ld, mvme162lx.ld}: Revert last change,
+ CONSTRUCTING and RELOCATING only work for linker scripts built
+ from ld/scripttmpl/*.
+
+ * m68k/{idp.ld, mvme135.ld, mvme162lx.ld}: Changed to use
+ CONSTRUCTING and RELOCATING expressions so that the ctor/dtor
+ tables and etext, edata, and end variables are only done when
+ appropriate.
+
+Fri Apr 7 17:30:35 1995 Stu Grossman (grossman@andros.cygnus.com)
+
+ * config/default.mh: Use $${srcroot} instead of ${SRCROOT} to get
+ inherited value.
+ * hppro/crt0.S: Remove static definitions of _stack and $global$.
+ Let the linker script define them in the BSS segment.
+ * hppro/w89k.ld: Use MEMORY to define memory regions. Add defs
+ for $global$ and _stack in the appropriate segments.
+
+Tue Apr 4 18:27:37 1995 Jason Molenda (phydeaux@cygnus.com)
+
+ * Makefile.in (FLAGS_TO_PASS): pass down MAKEINFO.
+
+Thu Mar 30 18:10:53 1995 Kung Hsu <kung@mexican.cygnus.com>
+
+ * ex93x/ex93x.ld: Add crt0.o in INPUT.
+ * ex93x/sparcl-stub.c: Add nop after bg insn.
+ * ex93x/sparc-stub.c: Add & 0x7f mask to all character input.
+
+Thu Mar 30 15:22:31 1995 Rob Savoye <rob@rtl.cygnus.com>
+
+ * {hppro,m68k,ex93x,testsuite/libgloss}/configure.in: Add SRCROOT
+ variable.
+ * {hppro,m68k,ex93x,testsuite/libgloss}/Makefile.in: Add SRCROOT
+ variable.
+ * config/default.mh: Use SRCROOT to find the newlib includes.
+
+Tue Mar 28 19:54:26 1995 Rob Savoye <rob@darkstar.cygnus.com>
+
+ * configure.in, testsuite/configure.in: Add SRCROOT variable.
+ * glue.c: Change "char *path" to "const char *path" so it works
+ with the changes stat.h.
+
+Fri Mar 24 17:29:08 1995 Kung Hsu <kung@mexican.cygnus.com>
+
+ * ex93x/ex93x.ld: The stubs module now can have different names for
+ different SPARClite chips. Use default one which is slite930.o.
+
+Mon Mar 20 15:49:46 1995 J.T. Conklin <jtc@rtl.cygnus.com>
+
+ * m68k/mc68ec.c (_exit): Changed to take integer status argument.
+
+Fri Mar 17 17:48:42 1995 Kung Hsu <kung@mexican.cygnus.com>
+
+ * config/default.h: add -I. to INCLUDES.
+ * ex93x/salib.c: to include sparclite.h.
+ * ex93x/sparclite.h: new file copied from gdb/sparclite.
+
+ * config/default.mh: Fix INCLUDES to one level less '../'.
+
+Mon Mar 13 17:05:35 1995 Rob Savoye <rob@darkstar.cygnus.com>
+
+ * testsuite/libgloss.all/misc.c: Misc bug reports, mostly
+ soft-float tests.
+
+Wed Mar 8 19:00:18 1995 Rob Savoye <rob@darkstar.cygnus.com>
+
+ * m68k/{crt0.S, mvem135.ld, mvme162lx.ld, idp.ld}: Setup the stack
+ in the linker script. Use a macro to cover using '#' or '&' for
+ immediate values.
+ * m68k/{mvme135-asm.S, mvme162lx-asm.S}: Use a macro to cover
+ using '#' or '&' for immediate values.
+ * testsuite/libgloss.all/io.c: Add a test for read().
+
+Thu Feb 16 21:13:34 1995 Rob Savoye <rob@darkstar.cygnus.com>
+
+ * glue.c: Make use _ansi.h, move to top level libgloss directory
+ form all other directories.
+ * Makefile.in: All Makefiles had SCRIPTS and OBJROOT added.
+ * {m68k,hppro,r3000)/Makefile.in: All build the test the same way
+ using OBJROOT.
+ * configure.in: All configure.in now edit the value to OBJROOT in
+ the Makefiles they produce.
+ * config/default.mh: Use OBJROOT for paths to test for fresh
+ binaries.
+ * configure.in: Add the testsuite directory.
+ * testsuite/config/{m68k.mt,mips.mt}: New target support for
+ MVME135, IDP, and Array targets.
+
+Thu Feb 9 21:45:33 1995 Rob Savoye <rob@darkstar.cygnus.com>
+
+ * testsuite/libgloss.all{varargs.c,varargs2.c}: Test cases for
+ traditional and ANSI varargs. (which currently fail)
+ * Makefile.in: Build intelligently and use dependancies so we
+ don't rebuild the world for each test run.
+ * configure.in: Make a .gdbinit file to run the tests and load via
+ gdb.
+
+Wed Mar 8 22:35:29 1995 Ken Raeburn <raeburn@cujo.cygnus.com>
+
+ * m68k/idp.ld: Omit STARTUP line, since crt0.o is being supplied
+ by gcc.
+
+Thu Feb 23 12:08:19 1995 Ken Raeburn <raeburn@cujo.cygnus.com>
+
+ * m68k/crt0.S: Use '&' instead of '#' for immediate operands.
+ * m68k/mc68ec.c: Ditto, in asm statements.
+ * m68k/mvme.S: Ditto.
+
+Wed Feb 1 23:55:39 1995 Angela Marie Thomas <angela@cirdan.cygnus.com>
+
+ * Makefile.in (all): added "else" statements for Ultrix to work
+
+Fri Jan 27 10:48:20 1995 Rob Savoye <rob@darkstar.cygnus.com>
+
+ * testuite/{config,lib,libgloss.all}: DejaGnu testing support.
+ * testsuite/config/support.c: A minimal testing API for minimal
+ targets.
+ * testsuite/config/hppa.mt: Set build flags for PRO targets.
+ * libgloss.all/{float.c,memory.c,io.c,double.c,math.c,array.c}:
+ Test cases for libgloss and soft-float.
+
+ * hppro/{w89k.ld,op50n.ld}: Set .text here now.
+
+Wed Jan 25 21:16:38 1995 Rob Savoye <rob@darkstar.cygnus.com>
+
+ * testsuite/{config,lib,libgloss.all}: The beginnings of a test
+ suite for low level stuff. A few test cases now all build.
+
+Thu Jan 12 13:02:12 1995 Rob Savoye <rob@darkstar.cygnus.com>
+
+ * config/default.mh: Change default path for linking in a freshly
+ built libc.a, libm.a, libgcc.a to work with -msift-float.
+
+ * hppro/Makefile.in: Set MULTILIB so the -msoft-float safe
+ libraries get used.
+
+ * m68k/Makefile.in: Use explicit rules, rather than redefining
+ .c.o. This is to force compiling with -m68000.
+
+Mon Jan 9 15:28:10 1995 Rob Savoye <rob@darkstar.cygnus.com>
+
+ * {hppro,m68k,r3000}/glue.c: Return correct value on receiving a
+ '\n' or '\r'.
+
+Fri Dec 30 15:05:03 1994 Rob Savoye <rob@darkstar.cygnus.com>
+
+ * doc, doc/Makefile.in, configure.in: New directory.
+ * doc/porting.texi: New manual that explains porting the GNU tools
+ to embedded systems.
+
+Mon Dec 19 16:05:37 1994 Kung Hsu <kung@mexican.cygnus.com>
+
+ * ex93x/Makefile.in: Use sparcl-stub.c instaed of sparc-stub.c,
+ which has hardware breakpoint support.
+ * ex93x/Makefile.in: Also generate slite930.o and slite931.o, instead
+ slite.o.
+ * ex93x/sparcl-stub.c: New file.
+ * ex93x/sparc-stub.c: Use latest from gdb/sparclite directory.
+
+Fri Dec 16 15:17:14 1994 Rob Savoye <rob@darkstar.cygnus.com>
+
+ * r3000/crt0.S: Zero the bss section by words.
+
+ * r3000/Makefile.in: Add in the rest of the support code for the
+ Array Tech board.
+
+ * r3000/array.ld: Set the memory map for the Array Tech LSI
+ prototype.
+
+ * r3000/array-io.c: Lowest level I/O code for Array Tech LSI
+ prototype using ROM entry points.
+
+Wed Dec 14 10:23:41 1994 Rob Savoye <rob@darkstar.cygnus.com>
+
+ * hppro/crt0.S: Add _sr4export function so GDB calls work.
+
+ * hppro/Makefile.in: Link in libc.a twice so atexit works().
+
+ * hppro/glue.c: Don't stub out __main anymore.
+
+Tue Dec 13 15:42:23 1994 Rob Savoye <rob@darkstar.cygnus.com>
+
+ * r3000/Makefile.in: Look for both libgcc2 and libgcc.
+
+ * r3000/glue.c,crt0.S,test.c: New support for for mips.
+
+ * configure.in: Configure r3000 dir for a mips chip.
+
+Tue Dec 6 15:24:41 1994 Rob Savoye <rob@darkstar.cygnus.com>
+
+ * hppro/divcnst-generic/*.S. Add .exit and .procend so it'll
+ compile.
+
+ * hppro/Makefile.in: Link in the rest of the millicode routines.
+
+Mon Nov 21 20:21:48 1994 Rob Savoye <rob@darkstar.cygnus.com>
+
+ * hppro/configure.in,config/dos.mh: Work for a canadian cross,
+ since xgcc is for the wrong architecture.
+
+Thu Nov 17 21:07:52 1994 Rob Savoye <rob@darkstar.cygnus.com>
+
+ * config/default.mh: Find the corrrect libgcc2.a.
+
+ * Makefile.in: Link in libgcc2.a by default. Build new millicode
+ routines.
+
+ * divI.S, divU.S, multiply.S, remI.S, remU.S, test-div.c,
+ test-dyncall.c, test-mul.c: New millicode files for low level math
+ support.
+
+ * test.c: Use printf so millicode gets exercised.
+
+ * divcnst-fast/divU_10.S, divU_12.S, divU_3.S, divU_5.S, divU_6.S,
+ divU_9.S: Fast versions of some division routines.
+
+ * divcnst-generic/divI_14.S, divI_5.S, divI_9.S, divU_14.S
+ divU_5.S, divU_9.S divI_10.S, divI_15.S, divI_6.S, divU_10.S,
+ divU_15.S, divU_6.S divI_12.S, divI_3.S, divI_7.S, divU_12.S,
+ divU_3.S, divU_7.S: Yet more millicode routines.
+
+Wed Nov 16 15:25:03 1994 Rob Savoye (rob@cygnus.com)
+
+ * config/default.mh: Add default searches for the correct libc and
+ libm.
+
+ * Makefile.in: Use ${LIBC_FOR_TARGET} and ${LIBM_FOR_TARGET}
+
+ * hppro/w89k.ld,op50n.ld,Makefile.in: Don't try to link in libc
+ for the test program.
+
+Tue Nov 8 17:12:35 1994 Rob Savoye <rob@rtl.cygnus.com>
+
+ * m68k/glue.c: Remove errno so there's no libc dependancies.
+
+ * m68k/mvme135-asm.S: Moved setup_vectors and exceptionHandler
+ from mvme.S so the library can link without the stub.
+
+ * m68k: New directory. Merge the idp, shared, and mvme135
+ directories into one place.
+
+ * config/default.mh: Use CC_FOR_TARGET for .S files so the
+ preprocessor actually gets run.
+
+ * ex93x/crt0.s, ex93x/salib.c: Migrate changes from gdb/sparclite.
+
+Fri Sep 16 21:22:57 1994 Rob Savoye (rob@darkstar.cygnus.com)
+
+ * shared, idp, mvme135: Support for Motorola IDP and MVME135 m68k
+ based target boards. Moved from newlib/stub.
+
+ * ex93x: Move from newlib/stub/ex93x. Sparclite ex93x
+ board support.
+
+ * hp74x, hppro: Add HP 742 & hp743 code "as is" with a working but
+ unfinished gdb stub. Add hppro for the WinBind and Oki Pa target
+ boards.
+
+ * libgloss: Creation. A library for board support packages. The
+ Gnu low-level OS Support. Move mvme135/ChangeLog to here.
+
+Wed Sep 29 20:42:34 1993 Rob Savoye (rob@darkstar.cygnus.com)
+
+ * mvme135/crt0.S, mvme135/glue.c: Moved to ../shared.
+
+Thu Apr 1 13:18:15 1993 Ian Lance Taylor (ian@cygnus.com)
+
+ * mvme135/mvme.S: Renamed exceptionhandler to exceptionHandler, which is
+ what mvme135-stub.c expects.
+
+Tue Mar 30 18:44:43 1993 Doug Evans (dje@poseidon.cygnus.com)
+
+ * mvme135/mvme135-stub.c (initializeRemcomErrorFrame): Remove reference to
+ __STDC__.
+
+Tue Dec 29 10:15:33 1992 Ian Lance Taylor (ian@cygnus.com)
+
+ * mvme135/mvme135-asm.S: new file.
+ mvme135-stub.c: moved all assembler routines into mvme135-asm.S.
+ Makefile.in: build mvme135-stub.o.
+
+ * ChangeLog: created.
diff --git a/libgloss/README b/libgloss/README
index e2a420fd9..1141841bb 100644
--- a/libgloss/README
+++ b/libgloss/README
@@ -7,4 +7,5 @@ mep - Toshiba Media Processor.
pa - WinBond and Oki boards with a PA.
mips - R3000 support. Array Tech LSI33k based RAID disk controller.
lm32 - Lattice Mico32 simulator.
-epiphany - Adapteva Epiphany multicore processor. \ No newline at end of file
+epiphany - Adapteva Epiphany multicore processor.
+or1k - OpenRISC 1000 processor. \ No newline at end of file
diff --git a/libgloss/aarch64/Makefile.in b/libgloss/aarch64/Makefile.in
index 654296b42..3c8a9fd10 100644
--- a/libgloss/aarch64/Makefile.in
+++ b/libgloss/aarch64/Makefile.in
@@ -73,7 +73,7 @@ OBJCOPY = `if [ -f ${objroot}/../binutils/objcopy ] ; \
then echo ${objroot}/../binutils/objcopy ; \
else t='$(program_transform_name)'; echo objcopy | sed -e $$t ; fi`
-OBJS = syscalls.o libcfunc.o _exit.o _kill.o
+OBJS = ftruncate.o libcfunc.o syscalls.o truncate.o _exit.o _kill.o
CRT0 = crt0.o
CRT0_INSTALL = install-crt0
@@ -93,7 +93,7 @@ CFLAGS = -g
# build a test program for each target board. Just trying to get
# it to link is a good test, so we ignore all the errors for now.
#
-all: ${CRT0} ${RDIMON_CRT0} ${RDIMON_BSP}
+all: ${CRT0} ${RDIMON_CRT0} ${RDIMON_BSP} ${RDIMON_SCRIPTS}
@rootpre=`pwd`/; export rootpre; \
srcrootpre=`cd $(srcdir); pwd`/; export srcrootpre; \
for dir in .. ${SUBDIRS}; do \
@@ -122,13 +122,19 @@ rdimon-crt0.o: crt0.S
rdimon-_exit.o: _exit.c
$(CC) $(CFLAGS_FOR_TARGET) $(CFLAGS) $(INCLUDES) -DARM_RDI_MONITOR -o $@ -c $<
+rdimon-ftruncate.o: ftruncate.c
+ $(CC) $(CFLAGS_FOR_TARGET) $(CFLAGS) $(INCLUDES) -DARM_RDI_MONITOR -o $@ -c $<
+
rdimon-_kill.o: _kill.c
$(CC) $(CFLAGS_FOR_TARGET) $(CFLAGS) $(INCLUDES) -DARM_RDI_MONITOR -o $@ -c $<
+rdimon-libcfunc.o: libcfunc.c
+ $(CC) $(CFLAGS_FOR_TARGET) $(CFLAGS) $(INCLUDES) -DARM_RDI_MONITOR -o $@ -c $<
+
rdimon-syscalls.o: syscalls.c
$(CC) $(CFLAGS_FOR_TARGET) $(CFLAGS) $(INCLUDES) -DARM_RDI_MONITOR -o $@ -c $<
-rdimon-libcfunc.o: libcfunc.c
+rdimon-truncate.o: truncate.c
$(CC) $(CFLAGS_FOR_TARGET) $(CFLAGS) $(INCLUDES) -DARM_RDI_MONITOR -o $@ -c $<
$(RDIMON_BSP): $(RDIMON_OBJS)
@@ -136,7 +142,7 @@ $(RDIMON_BSP): $(RDIMON_OBJS)
${RANLIB} $@
clean mostlyclean:
- rm -f a.out core *.i *.o *-test *.srec *.dis *.x $(SIM_BSP)
+ rm -f a.out core *.i *.o *-test *.srec *.dis *.x $(SIM_BSP) ${RDIMON_SCRIPTS}
@rootpre=`pwd`/; export rootpre; \
srcrootpre=`cd $(srcdir); pwd`/; export srcrootpre; \
for dir in .. ${SUBDIRS}; do \
@@ -169,6 +175,9 @@ install-rdimon:
set -e; for x in ${RDIMON_CRT0} ${RDIMON_BSP}; do ${INSTALL_DATA} $$x $(DESTDIR)${tooldir}/lib${MULTISUBDIR}/$$x; done
set -e; for x in ${RDIMON_SCRIPTS}; do ${INSTALL_DATA} ${srcdir}/${objtype}$$x $(DESTDIR)${tooldir}/lib${MULTISUBDIR}/$$x; done
+# Make copies of the scripts to facilitate in-tree bootstrapping.
+${RDIMON_SCRIPTS}: %: ${objtype}%
+ cp $< $@
doc:
info:
diff --git a/libgloss/aarch64/cpu-init/rdimon-aem-el3.S b/libgloss/aarch64/cpu-init/rdimon-aem-el3.S
index 6ddf62345..41db8f90c 100644
--- a/libgloss/aarch64/cpu-init/rdimon-aem-el3.S
+++ b/libgloss/aarch64/cpu-init/rdimon-aem-el3.S
@@ -138,9 +138,11 @@ _flat_map:
mrs x0, sctlr_el3
ldr x1, =0x100d /* bits I(12) SA(3) C(2) M(0) */
- bic x0, x0, #2 /* clear bit A(1) */
+ bic x0, x0, #(1 << 1) /* clear bit A(1) */
+ bic x0, x0, #(1 << 19) /* clear WXN */
orr x0, x0, x1 /* set bits */
+ dsb sy
msr sctlr_el3, x0
isb
ret
diff --git a/libgloss/aarch64/ftruncate.c b/libgloss/aarch64/ftruncate.c
new file mode 100644
index 000000000..41a64d2ae
--- /dev/null
+++ b/libgloss/aarch64/ftruncate.c
@@ -0,0 +1,34 @@
+/* Copyright (c) 2013 ARM Ltd. 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. The name of the company may not be used to endorse or promote
+ products derived from this software without specific prior written
+ permission.
+
+ THIS SOFTWARE IS PROVIDED BY ARM LTD ``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 ARM LTD 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 <errno.h>
+#include <sys/types.h>
+
+int
+ftruncate (int file, off_t length)
+{
+ errno = ENOSYS;
+ return -1;
+}
diff --git a/libgloss/aarch64/truncate.c b/libgloss/aarch64/truncate.c
new file mode 100644
index 000000000..92c0fcab3
--- /dev/null
+++ b/libgloss/aarch64/truncate.c
@@ -0,0 +1,34 @@
+/* Copyright (c) 2013 ARM Ltd. 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. The name of the company may not be used to endorse or promote
+ products derived from this software without specific prior written
+ permission.
+
+ THIS SOFTWARE IS PROVIDED BY ARM LTD ``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 ARM LTD 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 <errno.h>
+#include <sys/types.h>
+
+int
+truncate (const char *path, off_t length)
+{
+ errno = ENOSYS;
+ return -1;
+}
diff --git a/libgloss/arc/Makefile.in b/libgloss/arc/Makefile.in
new file mode 100644
index 000000000..073d650df
--- /dev/null
+++ b/libgloss/arc/Makefile.in
@@ -0,0 +1,121 @@
+#
+#
+DESTDIR =
+VPATH = @srcdir@ @srcdir@/..
+srcdir = @srcdir@
+objdir = .
+srcroot = $(srcdir)/../..
+objroot = $(objdir)/../..
+mkinstalldirs = $(SHELL) $(srcroot)/mkinstalldirs
+
+prefix = @prefix@
+exec_prefix = @exec_prefix@
+
+host_alias = @host_alias@
+target_alias = @target_alias@
+
+bindir = @bindir@
+libdir = @libdir@
+tooldir = $(exec_prefix)/$(target_alias)
+
+objtype = @objtype@
+
+INSTALL = @INSTALL@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_DATA = @INSTALL_DATA@
+
+# Multilib support variables.
+# TOP is used instead of MULTI{BUILD,SRC}TOP.
+MULTIDIRS =
+MULTISUBDIR =
+MULTIDO = true
+MULTICLEAN = true
+
+SHELL = /bin/sh
+
+CC = @CC@
+
+AS = @AS@
+AR = @AR@
+LD = @LD@
+RANLIB = @RANLIB@
+
+OBJDUMP = `if [ -f ${objroot}/../binutils/objdump ] ; \
+ then echo ${objroot}/../binutils/objdump ; \
+ else t='$(program_transform_name)'; echo objdump | sed -e $$t ; fi`
+OBJCOPY = `if [ -f ${objroot}/../binutils/objcopy ] ; \
+ then echo ${objroot}/../binutils/objcopy ; \
+ else t='$(program_transform_name)'; echo objcopy | sed -e $$t ; fi`
+
+CRT0 = crt0.o
+CRT0_INSTALL = install-crt0
+
+NSIM_BSP = libnsim.a
+NSIM_OBJS = \
+ libcfunc.o \
+ nsim-syscalls.o \
+ sbrk.o
+NSIM_INSTALL = install-nsim
+NSIM_SCRIPTS = nsim.specs
+
+NANO_SCRIPTS = nano.specs
+NANO_INSTALL = install-nano
+
+CFLAGS = -g
+
+# Host specific makefile fragment comes in here.
+@host_makefile_frag@
+
+all: $(CRT0) $(NSIM_BSP)
+
+$(NSIM_BSP): $(NSIM_OBJS)
+ $(AR) $(ARFLAGS) $@ $?
+ $(RANLIB) $@
+
+libcfunc.o: libcfunc.c
+nsim-syscalls.o: nsim-syscalls.c
+sbrk.o: sbrk.c
+
+#
+$(CRT0): crt0.S
+
+clean mostlyclean:
+ rm -f *.o *.a
+
+distclean maintainer-clean realclean: clean
+ rm -f Makefile config.status config.log config.cache *~
+
+.PHONY: install info install-info clean-info doc dvi
+install: $(CRT0_INSTALL) $(NSIM_INSTALL) $(NANO_INSTALL)
+
+# multilibdir may not exist yet - libgcc for ARC depends on libc, hence
+# newlib/libgloss is built before libgcc. And in parallel build libgloss maybe
+# built and installed before newlib, therefore libgloss has to create target
+# directory.
+
+$(CRT0_INSTALL):
+ $(mkinstalldirs) $(DESTDIR)${tooldir}/lib${MULTISUBDIR}
+ ${INSTALL_DATA} ${CRT0} $(DESTDIR)${tooldir}/lib${MULTISUBDIR}/$(CRT0)
+
+$(NSIM_INSTALL):
+ $(mkinstalldirs) $(DESTDIR)${tooldir}/lib${MULTISUBDIR}
+ $(INSTALL_DATA) $(NSIM_BSP) $(DESTDIR)$(tooldir)/lib$(MULTISUBDIR)/$(NSIM_BSP)
+ for x in $(NSIM_SCRIPTS); do \
+ $(INSTALL_DATA) $(srcdir)/$$x $(DESTDIR)$(tooldir)/lib$(MULTISUBDIR)/$$x; done
+
+$(NANO_INSTALL):
+ $(mkinstalldirs) $(DESTDIR)${tooldir}/lib${MULTISUBDIR}
+ for x in $(NANO_SCRIPTS); do \
+ $(INSTALL_DATA) $(srcdir)/$$x $(DESTDIR)$(tooldir)/lib$(MULTISUBDIR)/$$x; done
+
+doc:
+info:
+dvi:
+install-info:
+clean-info:
+
+Makefile: Makefile.in config.status @host_makefile_frag_path@
+ $(SHELL) config.status
+
+config.status: configure
+ $(SHELL) config.status --recheck
diff --git a/libgloss/arc/aclocal.m4 b/libgloss/arc/aclocal.m4
new file mode 100644
index 000000000..234952367
--- /dev/null
+++ b/libgloss/arc/aclocal.m4
@@ -0,0 +1,404 @@
+# generated automatically by aclocal 1.11.1 -*- Autoconf -*-
+
+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
+# 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
+# This file 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.
+
+# AM_CONDITIONAL -*- Autoconf -*-
+
+# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008
+# Free Software Foundation, Inc.
+#
+# This file 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.
+
+# serial 9
+
+# AM_CONDITIONAL(NAME, SHELL-CONDITION)
+# -------------------------------------
+# Define a conditional.
+AC_DEFUN([AM_CONDITIONAL],
+[AC_PREREQ(2.52)dnl
+ ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])],
+ [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
+AC_SUBST([$1_TRUE])dnl
+AC_SUBST([$1_FALSE])dnl
+_AM_SUBST_NOTMAKE([$1_TRUE])dnl
+_AM_SUBST_NOTMAKE([$1_FALSE])dnl
+m4_define([_AM_COND_VALUE_$1], [$2])dnl
+if $2; then
+ $1_TRUE=
+ $1_FALSE='#'
+else
+ $1_TRUE='#'
+ $1_FALSE=
+fi
+AC_CONFIG_COMMANDS_PRE(
+[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
+ AC_MSG_ERROR([[conditional "$1" was never defined.
+Usually this means the macro was only invoked conditionally.]])
+fi])])
+
+# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009
+# Free Software Foundation, Inc.
+#
+# This file 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.
+
+# serial 10
+
+# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
+# written in clear, in which case automake, when reading aclocal.m4,
+# will think it sees a *use*, and therefore will trigger all it's
+# C support machinery. Also note that it means that autoscan, seeing
+# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
+
+
+# _AM_DEPENDENCIES(NAME)
+# ----------------------
+# See how the compiler implements dependency checking.
+# NAME is "CC", "CXX", "GCJ", or "OBJC".
+# We try a few techniques and use that to set a single cache variable.
+#
+# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
+# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
+# dependency, and given that the user is not expected to run this macro,
+# just rely on AC_PROG_CC.
+AC_DEFUN([_AM_DEPENDENCIES],
+[AC_REQUIRE([AM_SET_DEPDIR])dnl
+AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
+AC_REQUIRE([AM_MAKE_INCLUDE])dnl
+AC_REQUIRE([AM_DEP_TRACK])dnl
+
+ifelse([$1], CC, [depcc="$CC" am_compiler_list=],
+ [$1], CXX, [depcc="$CXX" am_compiler_list=],
+ [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
+ [$1], UPC, [depcc="$UPC" am_compiler_list=],
+ [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'],
+ [depcc="$$1" am_compiler_list=])
+
+AC_CACHE_CHECK([dependency style of $depcc],
+ [am_cv_$1_dependencies_compiler_type],
+[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
+ # We make a subdir and do the tests there. Otherwise we can end up
+ # making bogus files that we don't know about and never remove. For
+ # instance it was reported that on HP-UX the gcc test will end up
+ # making a dummy file named `D' -- because `-MD' means `put the output
+ # in D'.
+ mkdir conftest.dir
+ # Copy depcomp to subdir because otherwise we won't find it if we're
+ # using a relative directory.
+ cp "$am_depcomp" conftest.dir
+ cd conftest.dir
+ # We will build objects and dependencies in a subdirectory because
+ # it helps to detect inapplicable dependency modes. For instance
+ # both Tru64's cc and ICC support -MD to output dependencies as a
+ # side effect of compilation, but ICC will put the dependencies in
+ # the current directory while Tru64 will put them in the object
+ # directory.
+ mkdir sub
+
+ am_cv_$1_dependencies_compiler_type=none
+ if test "$am_compiler_list" = ""; then
+ am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
+ fi
+ am__universal=false
+ m4_case([$1], [CC],
+ [case " $depcc " in #(
+ *\ -arch\ *\ -arch\ *) am__universal=true ;;
+ esac],
+ [CXX],
+ [case " $depcc " in #(
+ *\ -arch\ *\ -arch\ *) am__universal=true ;;
+ esac])
+
+ for depmode in $am_compiler_list; do
+ # Setup a source with many dependencies, because some compilers
+ # like to wrap large dependency lists on column 80 (with \), and
+ # we should not choose a depcomp mode which is confused by this.
+ #
+ # We need to recreate these files for each test, as the compiler may
+ # overwrite some of them when testing with obscure command lines.
+ # This happens at least with the AIX C compiler.
+ : > sub/conftest.c
+ for i in 1 2 3 4 5 6; do
+ echo '#include "conftst'$i'.h"' >> sub/conftest.c
+ # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
+ # Solaris 8's {/usr,}/bin/sh.
+ touch sub/conftst$i.h
+ done
+ echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
+
+ # We check with `-c' and `-o' for the sake of the "dashmstdout"
+ # mode. It turns out that the SunPro C++ compiler does not properly
+ # handle `-M -o', and we need to detect this. Also, some Intel
+ # versions had trouble with output in subdirs
+ am__obj=sub/conftest.${OBJEXT-o}
+ am__minus_obj="-o $am__obj"
+ case $depmode in
+ gcc)
+ # This depmode causes a compiler race in universal mode.
+ test "$am__universal" = false || continue
+ ;;
+ nosideeffect)
+ # after this tag, mechanisms are not by side-effect, so they'll
+ # only be used when explicitly requested
+ if test "x$enable_dependency_tracking" = xyes; then
+ continue
+ else
+ break
+ fi
+ ;;
+ msvisualcpp | msvcmsys)
+ # This compiler won't grok `-c -o', but also, the minuso test has
+ # not run yet. These depmodes are late enough in the game, and
+ # so weak that their functioning should not be impacted.
+ am__obj=conftest.${OBJEXT-o}
+ am__minus_obj=
+ ;;
+ none) break ;;
+ esac
+ if depmode=$depmode \
+ source=sub/conftest.c object=$am__obj \
+ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
+ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
+ >/dev/null 2>conftest.err &&
+ grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
+ grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
+ grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
+ ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
+ # icc doesn't choke on unknown options, it will just issue warnings
+ # or remarks (even with -Werror). So we grep stderr for any message
+ # that says an option was ignored or not supported.
+ # When given -MP, icc 7.0 and 7.1 complain thusly:
+ # icc: Command line warning: ignoring option '-M'; no argument required
+ # The diagnosis changed in icc 8.0:
+ # icc: Command line remark: option '-MP' not supported
+ if (grep 'ignoring option' conftest.err ||
+ grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
+ am_cv_$1_dependencies_compiler_type=$depmode
+ break
+ fi
+ fi
+ done
+
+ cd ..
+ rm -rf conftest.dir
+else
+ am_cv_$1_dependencies_compiler_type=none
+fi
+])
+AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
+AM_CONDITIONAL([am__fastdep$1], [
+ test "x$enable_dependency_tracking" != xno \
+ && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
+])
+
+
+# AM_SET_DEPDIR
+# -------------
+# Choose a directory name for dependency files.
+# This macro is AC_REQUIREd in _AM_DEPENDENCIES
+AC_DEFUN([AM_SET_DEPDIR],
+[AC_REQUIRE([AM_SET_LEADING_DOT])dnl
+AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
+])
+
+
+# AM_DEP_TRACK
+# ------------
+AC_DEFUN([AM_DEP_TRACK],
+[AC_ARG_ENABLE(dependency-tracking,
+[ --disable-dependency-tracking speeds up one-time build
+ --enable-dependency-tracking do not reject slow dependency extractors])
+if test "x$enable_dependency_tracking" != xno; then
+ am_depcomp="$ac_aux_dir/depcomp"
+ AMDEPBACKSLASH='\'
+fi
+AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
+AC_SUBST([AMDEPBACKSLASH])dnl
+_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
+])
+
+# Generate code to set up dependency tracking. -*- Autoconf -*-
+
+# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008
+# Free Software Foundation, Inc.
+#
+# This file 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.
+
+#serial 5
+
+# _AM_OUTPUT_DEPENDENCY_COMMANDS
+# ------------------------------
+AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
+[{
+ # Autoconf 2.62 quotes --file arguments for eval, but not when files
+ # are listed without --file. Let's play safe and only enable the eval
+ # if we detect the quoting.
+ case $CONFIG_FILES in
+ *\'*) eval set x "$CONFIG_FILES" ;;
+ *) set x $CONFIG_FILES ;;
+ esac
+ shift
+ for mf
+ do
+ # Strip MF so we end up with the name of the file.
+ mf=`echo "$mf" | sed -e 's/:.*$//'`
+ # Check whether this is an Automake generated Makefile or not.
+ # We used to match only the files named `Makefile.in', but
+ # some people rename them; so instead we look at the file content.
+ # Grep'ing the first line is not enough: some people post-process
+ # each Makefile.in and add a new line on top of each file to say so.
+ # Grep'ing the whole file is not good either: AIX grep has a line
+ # limit of 2048, but all sed's we know have understand at least 4000.
+ if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
+ dirpart=`AS_DIRNAME("$mf")`
+ else
+ continue
+ fi
+ # Extract the definition of DEPDIR, am__include, and am__quote
+ # from the Makefile without running `make'.
+ DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
+ test -z "$DEPDIR" && continue
+ am__include=`sed -n 's/^am__include = //p' < "$mf"`
+ test -z "am__include" && continue
+ am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
+ # When using ansi2knr, U may be empty or an underscore; expand it
+ U=`sed -n 's/^U = //p' < "$mf"`
+ # Find all dependency output files, they are included files with
+ # $(DEPDIR) in their names. We invoke sed twice because it is the
+ # simplest approach to changing $(DEPDIR) to its actual value in the
+ # expansion.
+ for file in `sed -n "
+ s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
+ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
+ # Make sure the directory exists.
+ test -f "$dirpart/$file" && continue
+ fdir=`AS_DIRNAME(["$file"])`
+ AS_MKDIR_P([$dirpart/$fdir])
+ # echo "creating $dirpart/$file"
+ echo '# dummy' > "$dirpart/$file"
+ done
+ done
+}
+])# _AM_OUTPUT_DEPENDENCY_COMMANDS
+
+
+# AM_OUTPUT_DEPENDENCY_COMMANDS
+# -----------------------------
+# This macro should only be invoked once -- use via AC_REQUIRE.
+#
+# This code is only required when automatic dependency tracking
+# is enabled. FIXME. This creates each `.P' file that we will
+# need in order to bootstrap the dependency handling code.
+AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
+[AC_CONFIG_COMMANDS([depfiles],
+ [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
+ [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
+])
+
+# Copyright (C) 2003, 2005 Free Software Foundation, Inc.
+#
+# This file 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.
+
+# serial 2
+
+# Check whether the underlying file-system supports filenames
+# with a leading dot. For instance MS-DOS doesn't.
+AC_DEFUN([AM_SET_LEADING_DOT],
+[rm -rf .tst 2>/dev/null
+mkdir .tst 2>/dev/null
+if test -d .tst; then
+ am__leading_dot=.
+else
+ am__leading_dot=_
+fi
+rmdir .tst 2>/dev/null
+AC_SUBST([am__leading_dot])])
+
+# Check to see how 'make' treats includes. -*- Autoconf -*-
+
+# Copyright (C) 2001, 2002, 2003, 2005, 2009 Free Software Foundation, Inc.
+#
+# This file 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.
+
+# serial 4
+
+# AM_MAKE_INCLUDE()
+# -----------------
+# Check to see how make treats includes.
+AC_DEFUN([AM_MAKE_INCLUDE],
+[am_make=${MAKE-make}
+cat > confinc << 'END'
+am__doit:
+ @echo this is the am__doit target
+.PHONY: am__doit
+END
+# If we don't find an include directive, just comment out the code.
+AC_MSG_CHECKING([for style of include used by $am_make])
+am__include="#"
+am__quote=
+_am_result=none
+# First try GNU make style include.
+echo "include confinc" > confmf
+# Ignore all kinds of additional output from `make'.
+case `$am_make -s -f confmf 2> /dev/null` in #(
+*the\ am__doit\ target*)
+ am__include=include
+ am__quote=
+ _am_result=GNU
+ ;;
+esac
+# Now try BSD make style include.
+if test "$am__include" = "#"; then
+ echo '.include "confinc"' > confmf
+ case `$am_make -s -f confmf 2> /dev/null` in #(
+ *the\ am__doit\ target*)
+ am__include=.include
+ am__quote="\""
+ _am_result=BSD
+ ;;
+ esac
+fi
+AC_SUBST([am__include])
+AC_SUBST([am__quote])
+AC_MSG_RESULT([$_am_result])
+rm -f confinc confmf
+])
+
+# Copyright (C) 2006, 2008 Free Software Foundation, Inc.
+#
+# This file 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.
+
+# serial 2
+
+# _AM_SUBST_NOTMAKE(VARIABLE)
+# ---------------------------
+# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
+# This macro is traced by Automake.
+AC_DEFUN([_AM_SUBST_NOTMAKE])
+
+# AM_SUBST_NOTMAKE(VARIABLE)
+# ---------------------------
+# Public sister of _AM_SUBST_NOTMAKE.
+AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
+
+m4_include([../acinclude.m4])
diff --git a/libgloss/arc/configure b/libgloss/arc/configure
new file mode 100755
index 000000000..2e8a7ed43
--- /dev/null
+++ b/libgloss/arc/configure
@@ -0,0 +1,3872 @@
+#! /bin/sh
+# Guess values for system-dependent variables and create Makefiles.
+# Generated by GNU Autoconf 2.68.
+#
+#
+# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
+# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software
+# Foundation, Inc.
+#
+#
+# This configure script is free software; the Free Software Foundation
+# gives unlimited permission to copy, distribute and modify it.
+## -------------------- ##
+## M4sh Initialization. ##
+## -------------------- ##
+
+# Be more Bourne compatible
+DUALCASE=1; export DUALCASE # for MKS sh
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
+ emulate sh
+ NULLCMD=:
+ # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
+ # is contrary to our usage. Disable this feature.
+ alias -g '${1+"$@"}'='"$@"'
+ setopt NO_GLOB_SUBST
+else
+ case `(set -o) 2>/dev/null` in #(
+ *posix*) :
+ set -o posix ;; #(
+ *) :
+ ;;
+esac
+fi
+
+
+as_nl='
+'
+export as_nl
+# Printing a long string crashes Solaris 7 /usr/bin/printf.
+as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
+as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
+as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
+# Prefer a ksh shell builtin over an external printf program on Solaris,
+# but without wasting forks for bash or zsh.
+if test -z "$BASH_VERSION$ZSH_VERSION" \
+ && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
+ as_echo='print -r --'
+ as_echo_n='print -rn --'
+elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
+ as_echo='printf %s\n'
+ as_echo_n='printf %s'
+else
+ if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
+ as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
+ as_echo_n='/usr/ucb/echo -n'
+ else
+ as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
+ as_echo_n_body='eval
+ arg=$1;
+ case $arg in #(
+ *"$as_nl"*)
+ expr "X$arg" : "X\\(.*\\)$as_nl";
+ arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
+ esac;
+ expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
+ '
+ export as_echo_n_body
+ as_echo_n='sh -c $as_echo_n_body as_echo'
+ fi
+ export as_echo_body
+ as_echo='sh -c $as_echo_body as_echo'
+fi
+
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+ PATH_SEPARATOR=:
+ (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
+ (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
+ PATH_SEPARATOR=';'
+ }
+fi
+
+
+# IFS
+# We need space, tab and new line, in precisely that order. Quoting is
+# there to prevent editors from complaining about space-tab.
+# (If _AS_PATH_WALK were called with IFS unset, it would disable word
+# splitting by setting IFS to empty value.)
+IFS=" "" $as_nl"
+
+# Find who we are. Look in the path if we contain no directory separator.
+as_myself=
+case $0 in #((
+ *[\\/]* ) as_myself=$0 ;;
+ *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
+ done
+IFS=$as_save_IFS
+
+ ;;
+esac
+# We did not find ourselves, most probably we were run as `sh COMMAND'
+# in which case we are not to be found in the path.
+if test "x$as_myself" = x; then
+ as_myself=$0
+fi
+if test ! -f "$as_myself"; then
+ $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
+ exit 1
+fi
+
+# Unset variables that we do not need and which cause bugs (e.g. in
+# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
+# suppresses any "Segmentation fault" message there. '((' could
+# trigger a bug in pdksh 5.2.14.
+for as_var in BASH_ENV ENV MAIL MAILPATH
+do eval test x\${$as_var+set} = xset \
+ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
+done
+PS1='$ '
+PS2='> '
+PS4='+ '
+
+# NLS nuisances.
+LC_ALL=C
+export LC_ALL
+LANGUAGE=C
+export LANGUAGE
+
+# CDPATH.
+(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
+
+if test "x$CONFIG_SHELL" = x; then
+ as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
+ emulate sh
+ NULLCMD=:
+ # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
+ # is contrary to our usage. Disable this feature.
+ alias -g '\${1+\"\$@\"}'='\"\$@\"'
+ setopt NO_GLOB_SUBST
+else
+ case \`(set -o) 2>/dev/null\` in #(
+ *posix*) :
+ set -o posix ;; #(
+ *) :
+ ;;
+esac
+fi
+"
+ as_required="as_fn_return () { (exit \$1); }
+as_fn_success () { as_fn_return 0; }
+as_fn_failure () { as_fn_return 1; }
+as_fn_ret_success () { return 0; }
+as_fn_ret_failure () { return 1; }
+
+exitcode=0
+as_fn_success || { exitcode=1; echo as_fn_success failed.; }
+as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
+as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
+as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
+if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
+
+else
+ exitcode=1; echo positional parameters were not saved.
+fi
+test x\$exitcode = x0 || exit 1"
+ as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
+ as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
+ eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
+ test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1"
+ if (eval "$as_required") 2>/dev/null; then :
+ as_have_required=yes
+else
+ as_have_required=no
+fi
+ if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
+
+else
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+as_found=false
+for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ as_found=:
+ case $as_dir in #(
+ /*)
+ for as_base in sh bash ksh sh5; do
+ # Try only shells that exist, to save several forks.
+ as_shell=$as_dir/$as_base
+ if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
+ { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
+ CONFIG_SHELL=$as_shell as_have_required=yes
+ if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
+ break 2
+fi
+fi
+ done;;
+ esac
+ as_found=false
+done
+$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
+ { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
+ CONFIG_SHELL=$SHELL as_have_required=yes
+fi; }
+IFS=$as_save_IFS
+
+
+ if test "x$CONFIG_SHELL" != x; then :
+ # We cannot yet assume a decent shell, so we have to provide a
+ # neutralization value for shells without unset; and this also
+ # works around shells that cannot unset nonexistent variables.
+ # Preserve -v and -x to the replacement shell.
+ BASH_ENV=/dev/null
+ ENV=/dev/null
+ (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
+ export CONFIG_SHELL
+ case $- in # ((((
+ *v*x* | *x*v* ) as_opts=-vx ;;
+ *v* ) as_opts=-v ;;
+ *x* ) as_opts=-x ;;
+ * ) as_opts= ;;
+ esac
+ exec "$CONFIG_SHELL" $as_opts "$as_myself" ${1+"$@"}
+fi
+
+ if test x$as_have_required = xno; then :
+ $as_echo "$0: This script requires a shell more modern than all"
+ $as_echo "$0: the shells that I found on your system."
+ if test x${ZSH_VERSION+set} = xset ; then
+ $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
+ $as_echo "$0: be upgraded to zsh 4.3.4 or later."
+ else
+ $as_echo "$0: Please tell bug-autoconf@gnu.org about your system,
+$0: including any error possibly output before this
+$0: message. Then install a modern shell, or manually run
+$0: the script under such a shell if you do have one."
+ fi
+ exit 1
+fi
+fi
+fi
+SHELL=${CONFIG_SHELL-/bin/sh}
+export SHELL
+# Unset more variables known to interfere with behavior of common tools.
+CLICOLOR_FORCE= GREP_OPTIONS=
+unset CLICOLOR_FORCE GREP_OPTIONS
+
+## --------------------- ##
+## M4sh Shell Functions. ##
+## --------------------- ##
+# as_fn_unset VAR
+# ---------------
+# Portably unset VAR.
+as_fn_unset ()
+{
+ { eval $1=; unset $1;}
+}
+as_unset=as_fn_unset
+
+# as_fn_set_status STATUS
+# -----------------------
+# Set $? to STATUS, without forking.
+as_fn_set_status ()
+{
+ return $1
+} # as_fn_set_status
+
+# as_fn_exit STATUS
+# -----------------
+# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
+as_fn_exit ()
+{
+ set +e
+ as_fn_set_status $1
+ exit $1
+} # as_fn_exit
+
+# as_fn_mkdir_p
+# -------------
+# Create "$as_dir" as a directory, including parents if necessary.
+as_fn_mkdir_p ()
+{
+
+ case $as_dir in #(
+ -*) as_dir=./$as_dir;;
+ esac
+ test -d "$as_dir" || eval $as_mkdir_p || {
+ as_dirs=
+ while :; do
+ case $as_dir in #(
+ *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
+ *) as_qdir=$as_dir;;
+ esac
+ as_dirs="'$as_qdir' $as_dirs"
+ as_dir=`$as_dirname -- "$as_dir" ||
+$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$as_dir" : 'X\(//\)[^/]' \| \
+ X"$as_dir" : 'X\(//\)$' \| \
+ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$as_dir" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)[^/].*/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+ test -d "$as_dir" && break
+ done
+ test -z "$as_dirs" || eval "mkdir $as_dirs"
+ } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
+
+
+} # as_fn_mkdir_p
+# as_fn_append VAR VALUE
+# ----------------------
+# Append the text in VALUE to the end of the definition contained in VAR. Take
+# advantage of any shell optimizations that allow amortized linear growth over
+# repeated appends, instead of the typical quadratic growth present in naive
+# implementations.
+if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
+ eval 'as_fn_append ()
+ {
+ eval $1+=\$2
+ }'
+else
+ as_fn_append ()
+ {
+ eval $1=\$$1\$2
+ }
+fi # as_fn_append
+
+# as_fn_arith ARG...
+# ------------------
+# Perform arithmetic evaluation on the ARGs, and store the result in the
+# global $as_val. Take advantage of shells that can avoid forks. The arguments
+# must be portable across $(()) and expr.
+if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
+ eval 'as_fn_arith ()
+ {
+ as_val=$(( $* ))
+ }'
+else
+ as_fn_arith ()
+ {
+ as_val=`expr "$@" || test $? -eq 1`
+ }
+fi # as_fn_arith
+
+
+# as_fn_error STATUS ERROR [LINENO LOG_FD]
+# ----------------------------------------
+# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
+# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
+# script with STATUS, using 1 if that was 0.
+as_fn_error ()
+{
+ as_status=$1; test $as_status -eq 0 && as_status=1
+ if test "$4"; then
+ as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
+ fi
+ $as_echo "$as_me: error: $2" >&2
+ as_fn_exit $as_status
+} # as_fn_error
+
+if expr a : '\(a\)' >/dev/null 2>&1 &&
+ test "X`expr 00001 : '.*\(...\)'`" = X001; then
+ as_expr=expr
+else
+ as_expr=false
+fi
+
+if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
+ as_basename=basename
+else
+ as_basename=false
+fi
+
+if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
+ as_dirname=dirname
+else
+ as_dirname=false
+fi
+
+as_me=`$as_basename -- "$0" ||
+$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
+ X"$0" : 'X\(//\)$' \| \
+ X"$0" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X/"$0" |
+ sed '/^.*\/\([^/][^/]*\)\/*$/{
+ s//\1/
+ q
+ }
+ /^X\/\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\/\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+
+# Avoid depending upon Character Ranges.
+as_cr_letters='abcdefghijklmnopqrstuvwxyz'
+as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
+as_cr_Letters=$as_cr_letters$as_cr_LETTERS
+as_cr_digits='0123456789'
+as_cr_alnum=$as_cr_Letters$as_cr_digits
+
+
+ as_lineno_1=$LINENO as_lineno_1a=$LINENO
+ as_lineno_2=$LINENO as_lineno_2a=$LINENO
+ eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
+ test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
+ # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-)
+ sed -n '
+ p
+ /[$]LINENO/=
+ ' <$as_myself |
+ sed '
+ s/[$]LINENO.*/&-/
+ t lineno
+ b
+ :lineno
+ N
+ :loop
+ s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
+ t loop
+ s/-\n.*//
+ ' >$as_me.lineno &&
+ chmod +x "$as_me.lineno" ||
+ { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
+
+ # Don't try to exec as it changes $[0], causing all sort of problems
+ # (the dirname of $[0] is not the place where we might find the
+ # original and so on. Autoconf is especially sensitive to this).
+ . "./$as_me.lineno"
+ # Exit status is that of the last command.
+ exit
+}
+
+ECHO_C= ECHO_N= ECHO_T=
+case `echo -n x` in #(((((
+-n*)
+ case `echo 'xy\c'` in
+ *c*) ECHO_T=' ';; # ECHO_T is single tab character.
+ xy) ECHO_C='\c';;
+ *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
+ ECHO_T=' ';;
+ esac;;
+*)
+ ECHO_N='-n';;
+esac
+
+rm -f conf$$ conf$$.exe conf$$.file
+if test -d conf$$.dir; then
+ rm -f conf$$.dir/conf$$.file
+else
+ rm -f conf$$.dir
+ mkdir conf$$.dir 2>/dev/null
+fi
+if (echo >conf$$.file) 2>/dev/null; then
+ if ln -s conf$$.file conf$$ 2>/dev/null; then
+ as_ln_s='ln -s'
+ # ... but there are two gotchas:
+ # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
+ # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
+ # In both cases, we have to default to `cp -p'.
+ ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
+ as_ln_s='cp -p'
+ elif ln conf$$.file conf$$ 2>/dev/null; then
+ as_ln_s=ln
+ else
+ as_ln_s='cp -p'
+ fi
+else
+ as_ln_s='cp -p'
+fi
+rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
+rmdir conf$$.dir 2>/dev/null
+
+if mkdir -p . 2>/dev/null; then
+ as_mkdir_p='mkdir -p "$as_dir"'
+else
+ test -d ./-p && rmdir ./-p
+ as_mkdir_p=false
+fi
+
+if test -x / >/dev/null 2>&1; then
+ as_test_x='test -x'
+else
+ if ls -dL / >/dev/null 2>&1; then
+ as_ls_L_option=L
+ else
+ as_ls_L_option=
+ fi
+ as_test_x='
+ eval sh -c '\''
+ if test -d "$1"; then
+ test -d "$1/.";
+ else
+ case $1 in #(
+ -*)set "./$1";;
+ esac;
+ case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
+ ???[sx]*):;;*)false;;esac;fi
+ '\'' sh
+ '
+fi
+as_executable_p=$as_test_x
+
+# Sed expression to map a string onto a valid CPP name.
+as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
+
+# Sed expression to map a string onto a valid variable name.
+as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
+
+
+test -n "$DJDIR" || exec 7<&0 </dev/null
+exec 6>&1
+
+# Name of the host.
+# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
+# so uname gets run too.
+ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
+
+#
+# Initializations.
+#
+ac_default_prefix=/usr/local
+ac_clean_files=
+ac_config_libobj_dir=.
+LIBOBJS=
+cross_compiling=no
+subdirs=
+MFLAGS=
+MAKEFLAGS=
+
+# Identity of this package.
+PACKAGE_NAME=
+PACKAGE_TARNAME=
+PACKAGE_VERSION=
+PACKAGE_STRING=
+PACKAGE_BUGREPORT=
+PACKAGE_URL=
+
+ac_unique_file="crt0.S"
+ac_subst_vars='LTLIBOBJS
+LIBOBJS
+host_makefile_frag_path
+CCASFLAGS
+CCAS
+RANLIB
+LD
+AR
+AS
+am__fastdepCC_FALSE
+am__fastdepCC_TRUE
+CCDEPMODE
+AMDEPBACKSLASH
+AMDEP_FALSE
+AMDEP_TRUE
+am__quote
+am__include
+DEPDIR
+am__leading_dot
+CC
+INSTALL_DATA
+INSTALL_SCRIPT
+INSTALL_PROGRAM
+target_os
+target_vendor
+target_cpu
+target
+host_os
+host_vendor
+host_cpu
+host
+build_os
+build_vendor
+build_cpu
+build
+target_alias
+host_alias
+build_alias
+LIBS
+ECHO_T
+ECHO_N
+ECHO_C
+DEFS
+mandir
+localedir
+libdir
+psdir
+pdfdir
+dvidir
+htmldir
+infodir
+docdir
+oldincludedir
+includedir
+localstatedir
+sharedstatedir
+sysconfdir
+datadir
+datarootdir
+libexecdir
+sbindir
+bindir
+program_transform_name
+prefix
+exec_prefix
+PACKAGE_URL
+PACKAGE_BUGREPORT
+PACKAGE_STRING
+PACKAGE_VERSION
+PACKAGE_TARNAME
+PACKAGE_NAME
+PATH_SEPARATOR
+SHELL'
+ac_subst_files='host_makefile_frag'
+ac_user_opts='
+enable_option_checking
+enable_dependency_tracking
+'
+ ac_precious_vars='build_alias
+host_alias
+target_alias
+CCAS
+CCASFLAGS'
+
+
+# Initialize some variables set by options.
+ac_init_help=
+ac_init_version=false
+ac_unrecognized_opts=
+ac_unrecognized_sep=
+# The variables have the same names as the options, with
+# dashes changed to underlines.
+cache_file=/dev/null
+exec_prefix=NONE
+no_create=
+no_recursion=
+prefix=NONE
+program_prefix=NONE
+program_suffix=NONE
+program_transform_name=s,x,x,
+silent=
+site=
+srcdir=
+verbose=
+x_includes=NONE
+x_libraries=NONE
+
+# Installation directory options.
+# These are left unexpanded so users can "make install exec_prefix=/foo"
+# and all the variables that are supposed to be based on exec_prefix
+# by default will actually change.
+# Use braces instead of parens because sh, perl, etc. also accept them.
+# (The list follows the same order as the GNU Coding Standards.)
+bindir='${exec_prefix}/bin'
+sbindir='${exec_prefix}/sbin'
+libexecdir='${exec_prefix}/libexec'
+datarootdir='${prefix}/share'
+datadir='${datarootdir}'
+sysconfdir='${prefix}/etc'
+sharedstatedir='${prefix}/com'
+localstatedir='${prefix}/var'
+includedir='${prefix}/include'
+oldincludedir='/usr/include'
+docdir='${datarootdir}/doc/${PACKAGE}'
+infodir='${datarootdir}/info'
+htmldir='${docdir}'
+dvidir='${docdir}'
+pdfdir='${docdir}'
+psdir='${docdir}'
+libdir='${exec_prefix}/lib'
+localedir='${datarootdir}/locale'
+mandir='${datarootdir}/man'
+
+ac_prev=
+ac_dashdash=
+for ac_option
+do
+ # If the previous option needs an argument, assign it.
+ if test -n "$ac_prev"; then
+ eval $ac_prev=\$ac_option
+ ac_prev=
+ continue
+ fi
+
+ case $ac_option in
+ *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
+ *=) ac_optarg= ;;
+ *) ac_optarg=yes ;;
+ esac
+
+ # Accept the important Cygnus configure options, so we can diagnose typos.
+
+ case $ac_dashdash$ac_option in
+ --)
+ ac_dashdash=yes ;;
+
+ -bindir | --bindir | --bindi | --bind | --bin | --bi)
+ ac_prev=bindir ;;
+ -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
+ bindir=$ac_optarg ;;
+
+ -build | --build | --buil | --bui | --bu)
+ ac_prev=build_alias ;;
+ -build=* | --build=* | --buil=* | --bui=* | --bu=*)
+ build_alias=$ac_optarg ;;
+
+ -cache-file | --cache-file | --cache-fil | --cache-fi \
+ | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
+ ac_prev=cache_file ;;
+ -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
+ | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
+ cache_file=$ac_optarg ;;
+
+ --config-cache | -C)
+ cache_file=config.cache ;;
+
+ -datadir | --datadir | --datadi | --datad)
+ ac_prev=datadir ;;
+ -datadir=* | --datadir=* | --datadi=* | --datad=*)
+ datadir=$ac_optarg ;;
+
+ -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
+ | --dataroo | --dataro | --datar)
+ ac_prev=datarootdir ;;
+ -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
+ | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
+ datarootdir=$ac_optarg ;;
+
+ -disable-* | --disable-*)
+ ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
+ # Reject names that are not valid shell variable names.
+ expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
+ as_fn_error $? "invalid feature name: $ac_useropt"
+ ac_useropt_orig=$ac_useropt
+ ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
+ case $ac_user_opts in
+ *"
+"enable_$ac_useropt"
+"*) ;;
+ *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
+ ac_unrecognized_sep=', ';;
+ esac
+ eval enable_$ac_useropt=no ;;
+
+ -docdir | --docdir | --docdi | --doc | --do)
+ ac_prev=docdir ;;
+ -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
+ docdir=$ac_optarg ;;
+
+ -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
+ ac_prev=dvidir ;;
+ -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
+ dvidir=$ac_optarg ;;
+
+ -enable-* | --enable-*)
+ ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
+ # Reject names that are not valid shell variable names.
+ expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
+ as_fn_error $? "invalid feature name: $ac_useropt"
+ ac_useropt_orig=$ac_useropt
+ ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
+ case $ac_user_opts in
+ *"
+"enable_$ac_useropt"
+"*) ;;
+ *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
+ ac_unrecognized_sep=', ';;
+ esac
+ eval enable_$ac_useropt=\$ac_optarg ;;
+
+ -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
+ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
+ | --exec | --exe | --ex)
+ ac_prev=exec_prefix ;;
+ -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
+ | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
+ | --exec=* | --exe=* | --ex=*)
+ exec_prefix=$ac_optarg ;;
+
+ -gas | --gas | --ga | --g)
+ # Obsolete; use --with-gas.
+ with_gas=yes ;;
+
+ -help | --help | --hel | --he | -h)
+ ac_init_help=long ;;
+ -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
+ ac_init_help=recursive ;;
+ -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
+ ac_init_help=short ;;
+
+ -host | --host | --hos | --ho)
+ ac_prev=host_alias ;;
+ -host=* | --host=* | --hos=* | --ho=*)
+ host_alias=$ac_optarg ;;
+
+ -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
+ ac_prev=htmldir ;;
+ -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
+ | --ht=*)
+ htmldir=$ac_optarg ;;
+
+ -includedir | --includedir | --includedi | --included | --include \
+ | --includ | --inclu | --incl | --inc)
+ ac_prev=includedir ;;
+ -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
+ | --includ=* | --inclu=* | --incl=* | --inc=*)
+ includedir=$ac_optarg ;;
+
+ -infodir | --infodir | --infodi | --infod | --info | --inf)
+ ac_prev=infodir ;;
+ -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
+ infodir=$ac_optarg ;;
+
+ -libdir | --libdir | --libdi | --libd)
+ ac_prev=libdir ;;
+ -libdir=* | --libdir=* | --libdi=* | --libd=*)
+ libdir=$ac_optarg ;;
+
+ -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
+ | --libexe | --libex | --libe)
+ ac_prev=libexecdir ;;
+ -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
+ | --libexe=* | --libex=* | --libe=*)
+ libexecdir=$ac_optarg ;;
+
+ -localedir | --localedir | --localedi | --localed | --locale)
+ ac_prev=localedir ;;
+ -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
+ localedir=$ac_optarg ;;
+
+ -localstatedir | --localstatedir | --localstatedi | --localstated \
+ | --localstate | --localstat | --localsta | --localst | --locals)
+ ac_prev=localstatedir ;;
+ -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
+ | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
+ localstatedir=$ac_optarg ;;
+
+ -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
+ ac_prev=mandir ;;
+ -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
+ mandir=$ac_optarg ;;
+
+ -nfp | --nfp | --nf)
+ # Obsolete; use --without-fp.
+ with_fp=no ;;
+
+ -no-create | --no-create | --no-creat | --no-crea | --no-cre \
+ | --no-cr | --no-c | -n)
+ no_create=yes ;;
+
+ -no-recursion | --no-recursion | --no-recursio | --no-recursi \
+ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
+ no_recursion=yes ;;
+
+ -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
+ | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
+ | --oldin | --oldi | --old | --ol | --o)
+ ac_prev=oldincludedir ;;
+ -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
+ | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
+ | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
+ oldincludedir=$ac_optarg ;;
+
+ -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
+ ac_prev=prefix ;;
+ -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
+ prefix=$ac_optarg ;;
+
+ -program-prefix | --program-prefix | --program-prefi | --program-pref \
+ | --program-pre | --program-pr | --program-p)
+ ac_prev=program_prefix ;;
+ -program-prefix=* | --program-prefix=* | --program-prefi=* \
+ | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
+ program_prefix=$ac_optarg ;;
+
+ -program-suffix | --program-suffix | --program-suffi | --program-suff \
+ | --program-suf | --program-su | --program-s)
+ ac_prev=program_suffix ;;
+ -program-suffix=* | --program-suffix=* | --program-suffi=* \
+ | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
+ program_suffix=$ac_optarg ;;
+
+ -program-transform-name | --program-transform-name \
+ | --program-transform-nam | --program-transform-na \
+ | --program-transform-n | --program-transform- \
+ | --program-transform | --program-transfor \
+ | --program-transfo | --program-transf \
+ | --program-trans | --program-tran \
+ | --progr-tra | --program-tr | --program-t)
+ ac_prev=program_transform_name ;;
+ -program-transform-name=* | --program-transform-name=* \
+ | --program-transform-nam=* | --program-transform-na=* \
+ | --program-transform-n=* | --program-transform-=* \
+ | --program-transform=* | --program-transfor=* \
+ | --program-transfo=* | --program-transf=* \
+ | --program-trans=* | --program-tran=* \
+ | --progr-tra=* | --program-tr=* | --program-t=*)
+ program_transform_name=$ac_optarg ;;
+
+ -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
+ ac_prev=pdfdir ;;
+ -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
+ pdfdir=$ac_optarg ;;
+
+ -psdir | --psdir | --psdi | --psd | --ps)
+ ac_prev=psdir ;;
+ -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
+ psdir=$ac_optarg ;;
+
+ -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+ | -silent | --silent | --silen | --sile | --sil)
+ silent=yes ;;
+
+ -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
+ ac_prev=sbindir ;;
+ -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
+ | --sbi=* | --sb=*)
+ sbindir=$ac_optarg ;;
+
+ -sharedstatedir | --sharedstatedir | --sharedstatedi \
+ | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
+ | --sharedst | --shareds | --shared | --share | --shar \
+ | --sha | --sh)
+ ac_prev=sharedstatedir ;;
+ -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
+ | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
+ | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
+ | --sha=* | --sh=*)
+ sharedstatedir=$ac_optarg ;;
+
+ -site | --site | --sit)
+ ac_prev=site ;;
+ -site=* | --site=* | --sit=*)
+ site=$ac_optarg ;;
+
+ -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
+ ac_prev=srcdir ;;
+ -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
+ srcdir=$ac_optarg ;;
+
+ -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
+ | --syscon | --sysco | --sysc | --sys | --sy)
+ ac_prev=sysconfdir ;;
+ -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
+ | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
+ sysconfdir=$ac_optarg ;;
+
+ -target | --target | --targe | --targ | --tar | --ta | --t)
+ ac_prev=target_alias ;;
+ -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
+ target_alias=$ac_optarg ;;
+
+ -v | -verbose | --verbose | --verbos | --verbo | --verb)
+ verbose=yes ;;
+
+ -version | --version | --versio | --versi | --vers | -V)
+ ac_init_version=: ;;
+
+ -with-* | --with-*)
+ ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
+ # Reject names that are not valid shell variable names.
+ expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
+ as_fn_error $? "invalid package name: $ac_useropt"
+ ac_useropt_orig=$ac_useropt
+ ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
+ case $ac_user_opts in
+ *"
+"with_$ac_useropt"
+"*) ;;
+ *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
+ ac_unrecognized_sep=', ';;
+ esac
+ eval with_$ac_useropt=\$ac_optarg ;;
+
+ -without-* | --without-*)
+ ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
+ # Reject names that are not valid shell variable names.
+ expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
+ as_fn_error $? "invalid package name: $ac_useropt"
+ ac_useropt_orig=$ac_useropt
+ ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
+ case $ac_user_opts in
+ *"
+"with_$ac_useropt"
+"*) ;;
+ *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
+ ac_unrecognized_sep=', ';;
+ esac
+ eval with_$ac_useropt=no ;;
+
+ --x)
+ # Obsolete; use --with-x.
+ with_x=yes ;;
+
+ -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
+ | --x-incl | --x-inc | --x-in | --x-i)
+ ac_prev=x_includes ;;
+ -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
+ | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
+ x_includes=$ac_optarg ;;
+
+ -x-libraries | --x-libraries | --x-librarie | --x-librari \
+ | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
+ ac_prev=x_libraries ;;
+ -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
+ | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
+ x_libraries=$ac_optarg ;;
+
+ -*) as_fn_error $? "unrecognized option: \`$ac_option'
+Try \`$0 --help' for more information"
+ ;;
+
+ *=*)
+ ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
+ # Reject names that are not valid shell variable names.
+ case $ac_envvar in #(
+ '' | [0-9]* | *[!_$as_cr_alnum]* )
+ as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
+ esac
+ eval $ac_envvar=\$ac_optarg
+ export $ac_envvar ;;
+
+ *)
+ # FIXME: should be removed in autoconf 3.0.
+ $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
+ expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
+ $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
+ : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
+ ;;
+
+ esac
+done
+
+if test -n "$ac_prev"; then
+ ac_option=--`echo $ac_prev | sed 's/_/-/g'`
+ as_fn_error $? "missing argument to $ac_option"
+fi
+
+if test -n "$ac_unrecognized_opts"; then
+ case $enable_option_checking in
+ no) ;;
+ fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
+ *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
+ esac
+fi
+
+# Check all directory arguments for consistency.
+for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
+ datadir sysconfdir sharedstatedir localstatedir includedir \
+ oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
+ libdir localedir mandir
+do
+ eval ac_val=\$$ac_var
+ # Remove trailing slashes.
+ case $ac_val in
+ */ )
+ ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
+ eval $ac_var=\$ac_val;;
+ esac
+ # Be sure to have absolute directory names.
+ case $ac_val in
+ [\\/$]* | ?:[\\/]* ) continue;;
+ NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
+ esac
+ as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
+done
+
+# There might be people who depend on the old broken behavior: `$host'
+# used to hold the argument of --host etc.
+# FIXME: To remove some day.
+build=$build_alias
+host=$host_alias
+target=$target_alias
+
+# FIXME: To remove some day.
+if test "x$host_alias" != x; then
+ if test "x$build_alias" = x; then
+ cross_compiling=maybe
+ $as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host.
+ If a cross compiler is detected then cross compile mode will be used" >&2
+ elif test "x$build_alias" != "x$host_alias"; then
+ cross_compiling=yes
+ fi
+fi
+
+ac_tool_prefix=
+test -n "$host_alias" && ac_tool_prefix=$host_alias-
+
+test "$silent" = yes && exec 6>/dev/null
+
+
+ac_pwd=`pwd` && test -n "$ac_pwd" &&
+ac_ls_di=`ls -di .` &&
+ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
+ as_fn_error $? "working directory cannot be determined"
+test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
+ as_fn_error $? "pwd does not report name of working directory"
+
+
+# Find the source files, if location was not specified.
+if test -z "$srcdir"; then
+ ac_srcdir_defaulted=yes
+ # Try the directory containing this script, then the parent directory.
+ ac_confdir=`$as_dirname -- "$as_myself" ||
+$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$as_myself" : 'X\(//\)[^/]' \| \
+ X"$as_myself" : 'X\(//\)$' \| \
+ X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$as_myself" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)[^/].*/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+ srcdir=$ac_confdir
+ if test ! -r "$srcdir/$ac_unique_file"; then
+ srcdir=..
+ fi
+else
+ ac_srcdir_defaulted=no
+fi
+if test ! -r "$srcdir/$ac_unique_file"; then
+ test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
+ as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
+fi
+ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
+ac_abs_confdir=`(
+ cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
+ pwd)`
+# When building in place, set srcdir=.
+if test "$ac_abs_confdir" = "$ac_pwd"; then
+ srcdir=.
+fi
+# Remove unnecessary trailing slashes from srcdir.
+# Double slashes in file names in object file debugging info
+# mess up M-x gdb in Emacs.
+case $srcdir in
+*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
+esac
+for ac_var in $ac_precious_vars; do
+ eval ac_env_${ac_var}_set=\${${ac_var}+set}
+ eval ac_env_${ac_var}_value=\$${ac_var}
+ eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
+ eval ac_cv_env_${ac_var}_value=\$${ac_var}
+done
+
+#
+# Report the --help message.
+#
+if test "$ac_init_help" = "long"; then
+ # Omit some internal or obsolete options to make the list less imposing.
+ # This message is too long to be a string in the A/UX 3.1 sh.
+ cat <<_ACEOF
+\`configure' configures this package to adapt to many kinds of systems.
+
+Usage: $0 [OPTION]... [VAR=VALUE]...
+
+To assign environment variables (e.g., CC, CFLAGS...), specify them as
+VAR=VALUE. See below for descriptions of some of the useful variables.
+
+Defaults for the options are specified in brackets.
+
+Configuration:
+ -h, --help display this help and exit
+ --help=short display options specific to this package
+ --help=recursive display the short help of all the included packages
+ -V, --version display version information and exit
+ -q, --quiet, --silent do not print \`checking ...' messages
+ --cache-file=FILE cache test results in FILE [disabled]
+ -C, --config-cache alias for \`--cache-file=config.cache'
+ -n, --no-create do not create output files
+ --srcdir=DIR find the sources in DIR [configure dir or \`..']
+
+Installation directories:
+ --prefix=PREFIX install architecture-independent files in PREFIX
+ [$ac_default_prefix]
+ --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
+ [PREFIX]
+
+By default, \`make install' will install all the files in
+\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
+an installation prefix other than \`$ac_default_prefix' using \`--prefix',
+for instance \`--prefix=\$HOME'.
+
+For better control, use the options below.
+
+Fine tuning of the installation directories:
+ --bindir=DIR user executables [EPREFIX/bin]
+ --sbindir=DIR system admin executables [EPREFIX/sbin]
+ --libexecdir=DIR program executables [EPREFIX/libexec]
+ --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
+ --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
+ --localstatedir=DIR modifiable single-machine data [PREFIX/var]
+ --libdir=DIR object code libraries [EPREFIX/lib]
+ --includedir=DIR C header files [PREFIX/include]
+ --oldincludedir=DIR C header files for non-gcc [/usr/include]
+ --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
+ --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
+ --infodir=DIR info documentation [DATAROOTDIR/info]
+ --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
+ --mandir=DIR man documentation [DATAROOTDIR/man]
+ --docdir=DIR documentation root [DATAROOTDIR/doc/PACKAGE]
+ --htmldir=DIR html documentation [DOCDIR]
+ --dvidir=DIR dvi documentation [DOCDIR]
+ --pdfdir=DIR pdf documentation [DOCDIR]
+ --psdir=DIR ps documentation [DOCDIR]
+_ACEOF
+
+ cat <<\_ACEOF
+
+Program names:
+ --program-prefix=PREFIX prepend PREFIX to installed program names
+ --program-suffix=SUFFIX append SUFFIX to installed program names
+ --program-transform-name=PROGRAM run sed PROGRAM on installed program names
+
+System types:
+ --build=BUILD configure for building on BUILD [guessed]
+ --host=HOST cross-compile to build programs to run on HOST [BUILD]
+ --target=TARGET configure for building compilers for TARGET [HOST]
+_ACEOF
+fi
+
+if test -n "$ac_init_help"; then
+
+ cat <<\_ACEOF
+
+Optional Features:
+ --disable-option-checking ignore unrecognized --enable/--with options
+ --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
+ --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
+ --disable-dependency-tracking speeds up one-time build
+ --enable-dependency-tracking do not reject slow dependency extractors
+
+Some influential environment variables:
+ CCAS assembler compiler command (defaults to CC)
+ CCASFLAGS assembler compiler flags (defaults to CFLAGS)
+
+Use these variables to override the choices made by `configure' or to help
+it to find libraries and programs with nonstandard names/locations.
+
+Report bugs to the package provider.
+_ACEOF
+ac_status=$?
+fi
+
+if test "$ac_init_help" = "recursive"; then
+ # If there are subdirs, report their specific --help.
+ for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
+ test -d "$ac_dir" ||
+ { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
+ continue
+ ac_builddir=.
+
+case "$ac_dir" in
+.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
+*)
+ ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
+ # A ".." for each directory in $ac_dir_suffix.
+ ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
+ case $ac_top_builddir_sub in
+ "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
+ *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
+ esac ;;
+esac
+ac_abs_top_builddir=$ac_pwd
+ac_abs_builddir=$ac_pwd$ac_dir_suffix
+# for backward compatibility:
+ac_top_builddir=$ac_top_build_prefix
+
+case $srcdir in
+ .) # We are building in place.
+ ac_srcdir=.
+ ac_top_srcdir=$ac_top_builddir_sub
+ ac_abs_top_srcdir=$ac_pwd ;;
+ [\\/]* | ?:[\\/]* ) # Absolute name.
+ ac_srcdir=$srcdir$ac_dir_suffix;
+ ac_top_srcdir=$srcdir
+ ac_abs_top_srcdir=$srcdir ;;
+ *) # Relative name.
+ ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
+ ac_top_srcdir=$ac_top_build_prefix$srcdir
+ ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
+esac
+ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
+
+ cd "$ac_dir" || { ac_status=$?; continue; }
+ # Check for guested configure.
+ if test -f "$ac_srcdir/configure.gnu"; then
+ echo &&
+ $SHELL "$ac_srcdir/configure.gnu" --help=recursive
+ elif test -f "$ac_srcdir/configure"; then
+ echo &&
+ $SHELL "$ac_srcdir/configure" --help=recursive
+ else
+ $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
+ fi || ac_status=$?
+ cd "$ac_pwd" || { ac_status=$?; break; }
+ done
+fi
+
+test -n "$ac_init_help" && exit $ac_status
+if $ac_init_version; then
+ cat <<\_ACEOF
+configure
+generated by GNU Autoconf 2.68
+
+Copyright (C) 2010 Free Software Foundation, Inc.
+This configure script is free software; the Free Software Foundation
+gives unlimited permission to copy, distribute and modify it.
+_ACEOF
+ exit
+fi
+
+## ------------------------ ##
+## Autoconf initialization. ##
+## ------------------------ ##
+
+# ac_fn_c_try_compile LINENO
+# --------------------------
+# Try to compile conftest.$ac_ext, and return whether this succeeded.
+ac_fn_c_try_compile ()
+{
+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ rm -f conftest.$ac_objext
+ if { { ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_compile") 2>conftest.err
+ ac_status=$?
+ if test -s conftest.err; then
+ grep -v '^ *+' conftest.err >conftest.er1
+ cat conftest.er1 >&5
+ mv -f conftest.er1 conftest.err
+ fi
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then :
+ ac_retval=0
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_retval=1
+fi
+ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+ as_fn_set_status $ac_retval
+
+} # ac_fn_c_try_compile
+cat >config.log <<_ACEOF
+This file contains any messages produced by compilers while
+running configure, to aid debugging if configure makes a mistake.
+
+It was created by $as_me, which was
+generated by GNU Autoconf 2.68. Invocation command line was
+
+ $ $0 $@
+
+_ACEOF
+exec 5>>config.log
+{
+cat <<_ASUNAME
+## --------- ##
+## Platform. ##
+## --------- ##
+
+hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
+uname -m = `(uname -m) 2>/dev/null || echo unknown`
+uname -r = `(uname -r) 2>/dev/null || echo unknown`
+uname -s = `(uname -s) 2>/dev/null || echo unknown`
+uname -v = `(uname -v) 2>/dev/null || echo unknown`
+
+/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
+/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
+
+/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
+/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
+/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
+/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
+/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
+/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
+/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
+
+_ASUNAME
+
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ $as_echo "PATH: $as_dir"
+ done
+IFS=$as_save_IFS
+
+} >&5
+
+cat >&5 <<_ACEOF
+
+
+## ----------- ##
+## Core tests. ##
+## ----------- ##
+
+_ACEOF
+
+
+# Keep a trace of the command line.
+# Strip out --no-create and --no-recursion so they do not pile up.
+# Strip out --silent because we don't want to record it for future runs.
+# Also quote any args containing shell meta-characters.
+# Make two passes to allow for proper duplicate-argument suppression.
+ac_configure_args=
+ac_configure_args0=
+ac_configure_args1=
+ac_must_keep_next=false
+for ac_pass in 1 2
+do
+ for ac_arg
+ do
+ case $ac_arg in
+ -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
+ -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+ | -silent | --silent | --silen | --sile | --sil)
+ continue ;;
+ *\'*)
+ ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
+ esac
+ case $ac_pass in
+ 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
+ 2)
+ as_fn_append ac_configure_args1 " '$ac_arg'"
+ if test $ac_must_keep_next = true; then
+ ac_must_keep_next=false # Got value, back to normal.
+ else
+ case $ac_arg in
+ *=* | --config-cache | -C | -disable-* | --disable-* \
+ | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
+ | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
+ | -with-* | --with-* | -without-* | --without-* | --x)
+ case "$ac_configure_args0 " in
+ "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
+ esac
+ ;;
+ -* ) ac_must_keep_next=true ;;
+ esac
+ fi
+ as_fn_append ac_configure_args " '$ac_arg'"
+ ;;
+ esac
+ done
+done
+{ ac_configure_args0=; unset ac_configure_args0;}
+{ ac_configure_args1=; unset ac_configure_args1;}
+
+# When interrupted or exit'd, cleanup temporary files, and complete
+# config.log. We remove comments because anyway the quotes in there
+# would cause problems or look ugly.
+# WARNING: Use '\'' to represent an apostrophe within the trap.
+# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
+trap 'exit_status=$?
+ # Save into config.log some information that might help in debugging.
+ {
+ echo
+
+ $as_echo "## ---------------- ##
+## Cache variables. ##
+## ---------------- ##"
+ echo
+ # The following way of writing the cache mishandles newlines in values,
+(
+ for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
+ eval ac_val=\$$ac_var
+ case $ac_val in #(
+ *${as_nl}*)
+ case $ac_var in #(
+ *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
+$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
+ esac
+ case $ac_var in #(
+ _ | IFS | as_nl) ;; #(
+ BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
+ *) { eval $ac_var=; unset $ac_var;} ;;
+ esac ;;
+ esac
+ done
+ (set) 2>&1 |
+ case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
+ *${as_nl}ac_space=\ *)
+ sed -n \
+ "s/'\''/'\''\\\\'\'''\''/g;
+ s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
+ ;; #(
+ *)
+ sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
+ ;;
+ esac |
+ sort
+)
+ echo
+
+ $as_echo "## ----------------- ##
+## Output variables. ##
+## ----------------- ##"
+ echo
+ for ac_var in $ac_subst_vars
+ do
+ eval ac_val=\$$ac_var
+ case $ac_val in
+ *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
+ esac
+ $as_echo "$ac_var='\''$ac_val'\''"
+ done | sort
+ echo
+
+ if test -n "$ac_subst_files"; then
+ $as_echo "## ------------------- ##
+## File substitutions. ##
+## ------------------- ##"
+ echo
+ for ac_var in $ac_subst_files
+ do
+ eval ac_val=\$$ac_var
+ case $ac_val in
+ *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
+ esac
+ $as_echo "$ac_var='\''$ac_val'\''"
+ done | sort
+ echo
+ fi
+
+ if test -s confdefs.h; then
+ $as_echo "## ----------- ##
+## confdefs.h. ##
+## ----------- ##"
+ echo
+ cat confdefs.h
+ echo
+ fi
+ test "$ac_signal" != 0 &&
+ $as_echo "$as_me: caught signal $ac_signal"
+ $as_echo "$as_me: exit $exit_status"
+ } >&5
+ rm -f core *.core core.conftest.* &&
+ rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
+ exit $exit_status
+' 0
+for ac_signal in 1 2 13 15; do
+ trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
+done
+ac_signal=0
+
+# confdefs.h avoids OS command line length limits that DEFS can exceed.
+rm -f -r conftest* confdefs.h
+
+$as_echo "/* confdefs.h */" > confdefs.h
+
+# Predefined preprocessor variables.
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_NAME "$PACKAGE_NAME"
+_ACEOF
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
+_ACEOF
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_VERSION "$PACKAGE_VERSION"
+_ACEOF
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_STRING "$PACKAGE_STRING"
+_ACEOF
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
+_ACEOF
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_URL "$PACKAGE_URL"
+_ACEOF
+
+
+# Let the site file select an alternate cache file if it wants to.
+# Prefer an explicitly selected file to automatically selected ones.
+ac_site_file1=NONE
+ac_site_file2=NONE
+if test -n "$CONFIG_SITE"; then
+ # We do not want a PATH search for config.site.
+ case $CONFIG_SITE in #((
+ -*) ac_site_file1=./$CONFIG_SITE;;
+ */*) ac_site_file1=$CONFIG_SITE;;
+ *) ac_site_file1=./$CONFIG_SITE;;
+ esac
+elif test "x$prefix" != xNONE; then
+ ac_site_file1=$prefix/share/config.site
+ ac_site_file2=$prefix/etc/config.site
+else
+ ac_site_file1=$ac_default_prefix/share/config.site
+ ac_site_file2=$ac_default_prefix/etc/config.site
+fi
+for ac_site_file in "$ac_site_file1" "$ac_site_file2"
+do
+ test "x$ac_site_file" = xNONE && continue
+ if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
+$as_echo "$as_me: loading site script $ac_site_file" >&6;}
+ sed 's/^/| /' "$ac_site_file" >&5
+ . "$ac_site_file" \
+ || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "failed to load site script $ac_site_file
+See \`config.log' for more details" "$LINENO" 5; }
+ fi
+done
+
+if test -r "$cache_file"; then
+ # Some versions of bash will fail to source /dev/null (special files
+ # actually), so we avoid doing that. DJGPP emulates it as a regular file.
+ if test /dev/null != "$cache_file" && test -f "$cache_file"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
+$as_echo "$as_me: loading cache $cache_file" >&6;}
+ case $cache_file in
+ [\\/]* | ?:[\\/]* ) . "$cache_file";;
+ *) . "./$cache_file";;
+ esac
+ fi
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
+$as_echo "$as_me: creating cache $cache_file" >&6;}
+ >$cache_file
+fi
+
+# Check that the precious variables saved in the cache have kept the same
+# value.
+ac_cache_corrupted=false
+for ac_var in $ac_precious_vars; do
+ eval ac_old_set=\$ac_cv_env_${ac_var}_set
+ eval ac_new_set=\$ac_env_${ac_var}_set
+ eval ac_old_val=\$ac_cv_env_${ac_var}_value
+ eval ac_new_val=\$ac_env_${ac_var}_value
+ case $ac_old_set,$ac_new_set in
+ set,)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
+$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
+ ac_cache_corrupted=: ;;
+ ,set)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
+$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
+ ac_cache_corrupted=: ;;
+ ,);;
+ *)
+ if test "x$ac_old_val" != "x$ac_new_val"; then
+ # differences in whitespace do not lead to failure.
+ ac_old_val_w=`echo x $ac_old_val`
+ ac_new_val_w=`echo x $ac_new_val`
+ if test "$ac_old_val_w" != "$ac_new_val_w"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
+$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
+ ac_cache_corrupted=:
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
+$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
+ eval $ac_var=\$ac_old_val
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
+$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
+$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
+ fi;;
+ esac
+ # Pass precious variables to config.status.
+ if test "$ac_new_set" = set; then
+ case $ac_new_val in
+ *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
+ *) ac_arg=$ac_var=$ac_new_val ;;
+ esac
+ case " $ac_configure_args " in
+ *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
+ *) as_fn_append ac_configure_args " '$ac_arg'" ;;
+ esac
+ fi
+done
+if $ac_cache_corrupted; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
+$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
+ as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
+fi
+## -------------------- ##
+## Main body of script. ##
+## -------------------- ##
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+
+if test "${enable_shared}" = "yes" ; then
+ echo "Shared libraries not supported for cross compiling, ignored"
+fi
+
+if test "$srcdir" = "." ; then
+ if test "${with_target_subdir}" != "." ; then
+ libgloss_topdir="${srcdir}/${with_multisrctop}../../.."
+ else
+ libgloss_topdir="${srcdir}/${with_multisrctop}../.."
+ fi
+else
+ libgloss_topdir="${srcdir}/../.."
+fi
+ac_aux_dir=
+for ac_dir in $libgloss_topdir "$srcdir"/$libgloss_topdir; do
+ if test -f "$ac_dir/install-sh"; then
+ ac_aux_dir=$ac_dir
+ ac_install_sh="$ac_aux_dir/install-sh -c"
+ break
+ elif test -f "$ac_dir/install.sh"; then
+ ac_aux_dir=$ac_dir
+ ac_install_sh="$ac_aux_dir/install.sh -c"
+ break
+ elif test -f "$ac_dir/shtool"; then
+ ac_aux_dir=$ac_dir
+ ac_install_sh="$ac_aux_dir/shtool install -c"
+ break
+ fi
+done
+if test -z "$ac_aux_dir"; then
+ as_fn_error $? "cannot find install-sh, install.sh, or shtool in $libgloss_topdir \"$srcdir\"/$libgloss_topdir" "$LINENO" 5
+fi
+
+# These three variables are undocumented and unsupported,
+# and are intended to be withdrawn in a future Autoconf release.
+# They can cause serious problems if a builder's source tree is in a directory
+# whose full name contains unusual characters.
+ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
+ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
+ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
+
+
+
+# Make sure we can run config.sub.
+$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
+ as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
+$as_echo_n "checking build system type... " >&6; }
+if ${ac_cv_build+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_build_alias=$build_alias
+test "x$ac_build_alias" = x &&
+ ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
+test "x$ac_build_alias" = x &&
+ as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
+ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
+ as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
+$as_echo "$ac_cv_build" >&6; }
+case $ac_cv_build in
+*-*-*) ;;
+*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
+esac
+build=$ac_cv_build
+ac_save_IFS=$IFS; IFS='-'
+set x $ac_cv_build
+shift
+build_cpu=$1
+build_vendor=$2
+shift; shift
+# Remember, the first character of IFS is used to create $*,
+# except with old shells:
+build_os=$*
+IFS=$ac_save_IFS
+case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
+$as_echo_n "checking host system type... " >&6; }
+if ${ac_cv_host+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test "x$host_alias" = x; then
+ ac_cv_host=$ac_cv_build
+else
+ ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
+ as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
+$as_echo "$ac_cv_host" >&6; }
+case $ac_cv_host in
+*-*-*) ;;
+*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
+esac
+host=$ac_cv_host
+ac_save_IFS=$IFS; IFS='-'
+set x $ac_cv_host
+shift
+host_cpu=$1
+host_vendor=$2
+shift; shift
+# Remember, the first character of IFS is used to create $*,
+# except with old shells:
+host_os=$*
+IFS=$ac_save_IFS
+case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
+$as_echo_n "checking target system type... " >&6; }
+if ${ac_cv_target+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test "x$target_alias" = x; then
+ ac_cv_target=$ac_cv_host
+else
+ ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
+ as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
+$as_echo "$ac_cv_target" >&6; }
+case $ac_cv_target in
+*-*-*) ;;
+*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
+esac
+target=$ac_cv_target
+ac_save_IFS=$IFS; IFS='-'
+set x $ac_cv_target
+shift
+target_cpu=$1
+target_vendor=$2
+shift; shift
+# Remember, the first character of IFS is used to create $*,
+# except with old shells:
+target_os=$*
+IFS=$ac_save_IFS
+case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
+
+
+# The aliases save the names the user supplied, while $host etc.
+# will get canonicalized.
+test -n "$target_alias" &&
+ test "$program_prefix$program_suffix$program_transform_name" = \
+ NONENONEs,x,x, &&
+ program_prefix=${target_alias}-
+
+test "$program_prefix" != NONE &&
+ program_transform_name="s&^&$program_prefix&;$program_transform_name"
+# Use a double $ so make ignores it.
+test "$program_suffix" != NONE &&
+ program_transform_name="s&\$&$program_suffix&;$program_transform_name"
+# Double any \ or $.
+# By default was `s,x,x', remove it if useless.
+ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
+program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"`
+
+
+# Find a good install program. We prefer a C program (faster),
+# so one script is as good as another. But avoid the broken or
+# incompatible versions:
+# SysV /etc/install, /usr/sbin/install
+# SunOS /usr/etc/install
+# IRIX /sbin/install
+# AIX /bin/install
+# AmigaOS /C/install, which installs bootblocks on floppy discs
+# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
+# AFS /usr/afsws/bin/install, which mishandles nonexistent args
+# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
+# OS/2's system install, which has a completely different semantic
+# ./install, which can be erroneously created by make from ./install.sh.
+# Reject install programs that cannot install multiple files.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
+$as_echo_n "checking for a BSD-compatible install... " >&6; }
+if test -z "$INSTALL"; then
+if ${ac_cv_path_install+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ # Account for people who put trailing slashes in PATH elements.
+case $as_dir/ in #((
+ ./ | .// | /[cC]/* | \
+ /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
+ ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
+ /usr/ucb/* ) ;;
+ *)
+ # OSF1 and SCO ODT 3.0 have their own names for install.
+ # Don't use installbsd from OSF since it installs stuff as root
+ # by default.
+ for ac_prog in ginstall scoinst install; do
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
+ if test $ac_prog = install &&
+ grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
+ # AIX install. It has an incompatible calling convention.
+ :
+ elif test $ac_prog = install &&
+ grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
+ # program-specific install script used by HP pwplus--don't use.
+ :
+ else
+ rm -rf conftest.one conftest.two conftest.dir
+ echo one > conftest.one
+ echo two > conftest.two
+ mkdir conftest.dir
+ if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
+ test -s conftest.one && test -s conftest.two &&
+ test -s conftest.dir/conftest.one &&
+ test -s conftest.dir/conftest.two
+ then
+ ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
+ break 3
+ fi
+ fi
+ fi
+ done
+ done
+ ;;
+esac
+
+ done
+IFS=$as_save_IFS
+
+rm -rf conftest.one conftest.two conftest.dir
+
+fi
+ if test "${ac_cv_path_install+set}" = set; then
+ INSTALL=$ac_cv_path_install
+ else
+ # As a last resort, use the slow shell script. Don't cache a
+ # value for INSTALL within a source directory, because that will
+ # break other packages using the cache if that directory is
+ # removed, or if the value is a relative name.
+ INSTALL=$ac_install_sh
+ fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
+$as_echo "$INSTALL" >&6; }
+
+# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
+# It thinks the first close brace ends the variable substitution.
+test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
+
+test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
+
+test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
+
+
+rm -rf .tst 2>/dev/null
+mkdir .tst 2>/dev/null
+if test -d .tst; then
+ am__leading_dot=.
+else
+ am__leading_dot=_
+fi
+rmdir .tst 2>/dev/null
+
+DEPDIR="${am__leading_dot}deps"
+
+ac_config_commands="$ac_config_commands depfiles"
+
+
+am_make=${MAKE-make}
+cat > confinc << 'END'
+am__doit:
+ @echo this is the am__doit target
+.PHONY: am__doit
+END
+# If we don't find an include directive, just comment out the code.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5
+$as_echo_n "checking for style of include used by $am_make... " >&6; }
+am__include="#"
+am__quote=
+_am_result=none
+# First try GNU make style include.
+echo "include confinc" > confmf
+# Ignore all kinds of additional output from `make'.
+case `$am_make -s -f confmf 2> /dev/null` in #(
+*the\ am__doit\ target*)
+ am__include=include
+ am__quote=
+ _am_result=GNU
+ ;;
+esac
+# Now try BSD make style include.
+if test "$am__include" = "#"; then
+ echo '.include "confinc"' > confmf
+ case `$am_make -s -f confmf 2> /dev/null` in #(
+ *the\ am__doit\ target*)
+ am__include=.include
+ am__quote="\""
+ _am_result=BSD
+ ;;
+ esac
+fi
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5
+$as_echo "$_am_result" >&6; }
+rm -f confinc confmf
+
+# Check whether --enable-dependency-tracking was given.
+if test "${enable_dependency_tracking+set}" = set; then :
+ enableval=$enable_dependency_tracking;
+fi
+
+if test "x$enable_dependency_tracking" != xno; then
+ am_depcomp="$ac_aux_dir/depcomp"
+ AMDEPBACKSLASH='\'
+fi
+ if test "x$enable_dependency_tracking" != xno; then
+ AMDEP_TRUE=
+ AMDEP_FALSE='#'
+else
+ AMDEP_TRUE='#'
+ AMDEP_FALSE=
+fi
+
+
+# Extract the first word of "gcc", so it can be a program name with args.
+set dummy gcc; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_CC+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_CC="gcc"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+$as_echo "$CC" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+
+depcc="$CC" am_compiler_list=
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
+$as_echo_n "checking dependency style of $depcc... " >&6; }
+if ${am_cv_CC_dependencies_compiler_type+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
+ # We make a subdir and do the tests there. Otherwise we can end up
+ # making bogus files that we don't know about and never remove. For
+ # instance it was reported that on HP-UX the gcc test will end up
+ # making a dummy file named `D' -- because `-MD' means `put the output
+ # in D'.
+ mkdir conftest.dir
+ # Copy depcomp to subdir because otherwise we won't find it if we're
+ # using a relative directory.
+ cp "$am_depcomp" conftest.dir
+ cd conftest.dir
+ # We will build objects and dependencies in a subdirectory because
+ # it helps to detect inapplicable dependency modes. For instance
+ # both Tru64's cc and ICC support -MD to output dependencies as a
+ # side effect of compilation, but ICC will put the dependencies in
+ # the current directory while Tru64 will put them in the object
+ # directory.
+ mkdir sub
+
+ am_cv_CC_dependencies_compiler_type=none
+ if test "$am_compiler_list" = ""; then
+ am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
+ fi
+ am__universal=false
+ case " $depcc " in #(
+ *\ -arch\ *\ -arch\ *) am__universal=true ;;
+ esac
+
+ for depmode in $am_compiler_list; do
+ # Setup a source with many dependencies, because some compilers
+ # like to wrap large dependency lists on column 80 (with \), and
+ # we should not choose a depcomp mode which is confused by this.
+ #
+ # We need to recreate these files for each test, as the compiler may
+ # overwrite some of them when testing with obscure command lines.
+ # This happens at least with the AIX C compiler.
+ : > sub/conftest.c
+ for i in 1 2 3 4 5 6; do
+ echo '#include "conftst'$i'.h"' >> sub/conftest.c
+ # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
+ # Solaris 8's {/usr,}/bin/sh.
+ touch sub/conftst$i.h
+ done
+ echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
+
+ # We check with `-c' and `-o' for the sake of the "dashmstdout"
+ # mode. It turns out that the SunPro C++ compiler does not properly
+ # handle `-M -o', and we need to detect this. Also, some Intel
+ # versions had trouble with output in subdirs
+ am__obj=sub/conftest.${OBJEXT-o}
+ am__minus_obj="-o $am__obj"
+ case $depmode in
+ gcc)
+ # This depmode causes a compiler race in universal mode.
+ test "$am__universal" = false || continue
+ ;;
+ nosideeffect)
+ # after this tag, mechanisms are not by side-effect, so they'll
+ # only be used when explicitly requested
+ if test "x$enable_dependency_tracking" = xyes; then
+ continue
+ else
+ break
+ fi
+ ;;
+ msvisualcpp | msvcmsys)
+ # This compiler won't grok `-c -o', but also, the minuso test has
+ # not run yet. These depmodes are late enough in the game, and
+ # so weak that their functioning should not be impacted.
+ am__obj=conftest.${OBJEXT-o}
+ am__minus_obj=
+ ;;
+ none) break ;;
+ esac
+ if depmode=$depmode \
+ source=sub/conftest.c object=$am__obj \
+ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
+ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
+ >/dev/null 2>conftest.err &&
+ grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
+ grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
+ grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
+ ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
+ # icc doesn't choke on unknown options, it will just issue warnings
+ # or remarks (even with -Werror). So we grep stderr for any message
+ # that says an option was ignored or not supported.
+ # When given -MP, icc 7.0 and 7.1 complain thusly:
+ # icc: Command line warning: ignoring option '-M'; no argument required
+ # The diagnosis changed in icc 8.0:
+ # icc: Command line remark: option '-MP' not supported
+ if (grep 'ignoring option' conftest.err ||
+ grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
+ am_cv_CC_dependencies_compiler_type=$depmode
+ break
+ fi
+ fi
+ done
+
+ cd ..
+ rm -rf conftest.dir
+else
+ am_cv_CC_dependencies_compiler_type=none
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
+$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; }
+CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
+
+ if
+ test "x$enable_dependency_tracking" != xno \
+ && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then
+ am__fastdepCC_TRUE=
+ am__fastdepCC_FALSE='#'
+else
+ am__fastdepCC_TRUE='#'
+ am__fastdepCC_FALSE=
+fi
+
+
+if test -z "$CC"; then
+ # Extract the first word of "cc", so it can be a program name with args.
+set dummy cc; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_CC+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+ ac_prog_rejected=no
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
+ ac_prog_rejected=yes
+ continue
+ fi
+ ac_cv_prog_CC="cc"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+if test $ac_prog_rejected = yes; then
+ # We found a bogon in the path, so make sure we never use it.
+ set dummy $ac_cv_prog_CC
+ shift
+ if test $# != 0; then
+ # We chose a different compiler from the bogus one.
+ # However, it has the same basename, so the bogon will be chosen
+ # first if we set CC to just the basename; use the full file name.
+ shift
+ ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
+ fi
+fi
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+$as_echo "$CC" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+ test -z "$CC" && as_fn_error $? "no acceptable cc found in \$PATH" "$LINENO" 5
+fi
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using GNU C" >&5
+$as_echo_n "checking whether we are using GNU C... " >&6; }
+if ${ac_cv_c_compiler_gnu+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat > conftest.c <<EOF
+#ifdef __GNUC__
+ yes;
+#endif
+EOF
+if { ac_try='${CC-cc} -E conftest.c'
+ { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; } | egrep yes >/dev/null 2>&1; then
+ ac_cv_c_compiler_gnu=yes
+else
+ ac_cv_c_compiler_gnu=no
+fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
+$as_echo "$ac_cv_c_compiler_gnu" >&6; }
+
+if test $ac_cv_c_compiler_gnu = yes; then
+ GCC=yes
+ ac_test_CFLAGS="${CFLAGS+set}"
+ ac_save_CFLAGS="$CFLAGS"
+ CFLAGS=
+ ac_test_CFLAGS=${CFLAGS+set}
+ac_save_CFLAGS=$CFLAGS
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
+$as_echo_n "checking whether $CC accepts -g... " >&6; }
+if ${ac_cv_prog_cc_g+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_save_c_werror_flag=$ac_c_werror_flag
+ ac_c_werror_flag=yes
+ ac_cv_prog_cc_g=no
+ CFLAGS="-g"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ ac_cv_prog_cc_g=yes
+else
+ CFLAGS=""
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+
+else
+ ac_c_werror_flag=$ac_save_c_werror_flag
+ CFLAGS="-g"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ ac_cv_prog_cc_g=yes
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ ac_c_werror_flag=$ac_save_c_werror_flag
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
+$as_echo "$ac_cv_prog_cc_g" >&6; }
+if test "$ac_test_CFLAGS" = set; then
+ CFLAGS=$ac_save_CFLAGS
+elif test $ac_cv_prog_cc_g = yes; then
+ if test "$GCC" = yes; then
+ CFLAGS="-g -O2"
+ else
+ CFLAGS="-g"
+ fi
+else
+ if test "$GCC" = yes; then
+ CFLAGS="-O2"
+ else
+ CFLAGS=
+ fi
+fi
+ if test "$ac_test_CFLAGS" = set; then
+ CFLAGS="$ac_save_CFLAGS"
+ elif test $ac_cv_prog_cc_g = yes; then
+ CFLAGS="-g -O2"
+ else
+ CFLAGS="-O2"
+ fi
+else
+ GCC=
+ test "${CFLAGS+set}" = set || CFLAGS="-g"
+fi
+
+
+AS=${AS-as}
+
+AR=${AR-ar}
+
+LD=${LD-ld}
+
+if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
+set dummy ${ac_tool_prefix}ranlib; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_RANLIB+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$RANLIB"; then
+ ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+RANLIB=$ac_cv_prog_RANLIB
+if test -n "$RANLIB"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
+$as_echo "$RANLIB" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_RANLIB"; then
+ ac_ct_RANLIB=$RANLIB
+ # Extract the first word of "ranlib", so it can be a program name with args.
+set dummy ranlib; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_ct_RANLIB"; then
+ ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_ac_ct_RANLIB="ranlib"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
+if test -n "$ac_ct_RANLIB"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
+$as_echo "$ac_ct_RANLIB" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+ if test "x$ac_ct_RANLIB" = x; then
+ RANLIB=":"
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ RANLIB=$ac_ct_RANLIB
+ fi
+else
+ RANLIB="$ac_cv_prog_RANLIB"
+fi
+
+# By default we simply use the C compiler to build assembly code.
+
+test "${CCAS+set}" = set || CCAS=$CC
+test "${CCASFLAGS+set}" = set || CCASFLAGS=$CFLAGS
+
+
+
+
+host_makefile_frag=${srcdir}/../config/default.mh
+
+host_makefile_frag_path=$host_makefile_frag
+
+
+
+ac_config_files="$ac_config_files Makefile"
+
+cat >confcache <<\_ACEOF
+# This file is a shell script that caches the results of configure
+# tests run on this system so they can be shared between configure
+# scripts and configure runs, see configure's option --config-cache.
+# It is not useful on other systems. If it contains results you don't
+# want to keep, you may remove or edit it.
+#
+# config.status only pays attention to the cache file if you give it
+# the --recheck option to rerun configure.
+#
+# `ac_cv_env_foo' variables (set or unset) will be overridden when
+# loading this file, other *unset* `ac_cv_foo' will be assigned the
+# following values.
+
+_ACEOF
+
+# The following way of writing the cache mishandles newlines in values,
+# but we know of no workaround that is simple, portable, and efficient.
+# So, we kill variables containing newlines.
+# Ultrix sh set writes to stderr and can't be redirected directly,
+# and sets the high bit in the cache file unless we assign to the vars.
+(
+ for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
+ eval ac_val=\$$ac_var
+ case $ac_val in #(
+ *${as_nl}*)
+ case $ac_var in #(
+ *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
+$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
+ esac
+ case $ac_var in #(
+ _ | IFS | as_nl) ;; #(
+ BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
+ *) { eval $ac_var=; unset $ac_var;} ;;
+ esac ;;
+ esac
+ done
+
+ (set) 2>&1 |
+ case $as_nl`(ac_space=' '; set) 2>&1` in #(
+ *${as_nl}ac_space=\ *)
+ # `set' does not quote correctly, so add quotes: double-quote
+ # substitution turns \\\\ into \\, and sed turns \\ into \.
+ sed -n \
+ "s/'/'\\\\''/g;
+ s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
+ ;; #(
+ *)
+ # `set' quotes correctly as required by POSIX, so do not add quotes.
+ sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
+ ;;
+ esac |
+ sort
+) |
+ sed '
+ /^ac_cv_env_/b end
+ t clear
+ :clear
+ s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
+ t end
+ s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
+ :end' >>confcache
+if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
+ if test -w "$cache_file"; then
+ if test "x$cache_file" != "x/dev/null"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
+$as_echo "$as_me: updating cache $cache_file" >&6;}
+ if test ! -f "$cache_file" || test -h "$cache_file"; then
+ cat confcache >"$cache_file"
+ else
+ case $cache_file in #(
+ */* | ?:*)
+ mv -f confcache "$cache_file"$$ &&
+ mv -f "$cache_file"$$ "$cache_file" ;; #(
+ *)
+ mv -f confcache "$cache_file" ;;
+ esac
+ fi
+ fi
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
+$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
+ fi
+fi
+rm -f confcache
+
+test "x$prefix" = xNONE && prefix=$ac_default_prefix
+# Let make expand exec_prefix.
+test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
+
+# Transform confdefs.h into DEFS.
+# Protect against shell expansion while executing Makefile rules.
+# Protect against Makefile macro expansion.
+#
+# If the first sed substitution is executed (which looks for macros that
+# take arguments), then branch to the quote section. Otherwise,
+# look for a macro that doesn't take arguments.
+ac_script='
+:mline
+/\\$/{
+ N
+ s,\\\n,,
+ b mline
+}
+t clear
+:clear
+s/^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*([^)]*)\)[ ]*\(.*\)/-D\1=\2/g
+t quote
+s/^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)/-D\1=\2/g
+t quote
+b any
+:quote
+s/[ `~#$^&*(){}\\|;'\''"<>?]/\\&/g
+s/\[/\\&/g
+s/\]/\\&/g
+s/\$/$$/g
+H
+:any
+${
+ g
+ s/^\n//
+ s/\n/ /g
+ p
+}
+'
+DEFS=`sed -n "$ac_script" confdefs.h`
+
+
+ac_libobjs=
+ac_ltlibobjs=
+U=
+for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
+ # 1. Remove the extension, and $U if already installed.
+ ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
+ ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
+ # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
+ # will be set to the directory where LIBOBJS objects are built.
+ as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
+ as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
+done
+LIBOBJS=$ac_libobjs
+
+LTLIBOBJS=$ac_ltlibobjs
+
+
+if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then
+ as_fn_error $? "conditional \"AMDEP\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
+ as_fn_error $? "conditional \"am__fastdepCC\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+
+: "${CONFIG_STATUS=./config.status}"
+ac_write_fail=0
+ac_clean_files_save=$ac_clean_files
+ac_clean_files="$ac_clean_files $CONFIG_STATUS"
+{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
+$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
+as_write_fail=0
+cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
+#! $SHELL
+# Generated by $as_me.
+# Run this file to recreate the current configuration.
+# Compiler output produced by configure, useful for debugging
+# configure, is in config.log if it exists.
+
+debug=false
+ac_cs_recheck=false
+ac_cs_silent=false
+
+SHELL=\${CONFIG_SHELL-$SHELL}
+export SHELL
+_ASEOF
+cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
+## -------------------- ##
+## M4sh Initialization. ##
+## -------------------- ##
+
+# Be more Bourne compatible
+DUALCASE=1; export DUALCASE # for MKS sh
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
+ emulate sh
+ NULLCMD=:
+ # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
+ # is contrary to our usage. Disable this feature.
+ alias -g '${1+"$@"}'='"$@"'
+ setopt NO_GLOB_SUBST
+else
+ case `(set -o) 2>/dev/null` in #(
+ *posix*) :
+ set -o posix ;; #(
+ *) :
+ ;;
+esac
+fi
+
+
+as_nl='
+'
+export as_nl
+# Printing a long string crashes Solaris 7 /usr/bin/printf.
+as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
+as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
+as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
+# Prefer a ksh shell builtin over an external printf program on Solaris,
+# but without wasting forks for bash or zsh.
+if test -z "$BASH_VERSION$ZSH_VERSION" \
+ && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
+ as_echo='print -r --'
+ as_echo_n='print -rn --'
+elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
+ as_echo='printf %s\n'
+ as_echo_n='printf %s'
+else
+ if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
+ as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
+ as_echo_n='/usr/ucb/echo -n'
+ else
+ as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
+ as_echo_n_body='eval
+ arg=$1;
+ case $arg in #(
+ *"$as_nl"*)
+ expr "X$arg" : "X\\(.*\\)$as_nl";
+ arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
+ esac;
+ expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
+ '
+ export as_echo_n_body
+ as_echo_n='sh -c $as_echo_n_body as_echo'
+ fi
+ export as_echo_body
+ as_echo='sh -c $as_echo_body as_echo'
+fi
+
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+ PATH_SEPARATOR=:
+ (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
+ (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
+ PATH_SEPARATOR=';'
+ }
+fi
+
+
+# IFS
+# We need space, tab and new line, in precisely that order. Quoting is
+# there to prevent editors from complaining about space-tab.
+# (If _AS_PATH_WALK were called with IFS unset, it would disable word
+# splitting by setting IFS to empty value.)
+IFS=" "" $as_nl"
+
+# Find who we are. Look in the path if we contain no directory separator.
+as_myself=
+case $0 in #((
+ *[\\/]* ) as_myself=$0 ;;
+ *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
+ done
+IFS=$as_save_IFS
+
+ ;;
+esac
+# We did not find ourselves, most probably we were run as `sh COMMAND'
+# in which case we are not to be found in the path.
+if test "x$as_myself" = x; then
+ as_myself=$0
+fi
+if test ! -f "$as_myself"; then
+ $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
+ exit 1
+fi
+
+# Unset variables that we do not need and which cause bugs (e.g. in
+# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
+# suppresses any "Segmentation fault" message there. '((' could
+# trigger a bug in pdksh 5.2.14.
+for as_var in BASH_ENV ENV MAIL MAILPATH
+do eval test x\${$as_var+set} = xset \
+ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
+done
+PS1='$ '
+PS2='> '
+PS4='+ '
+
+# NLS nuisances.
+LC_ALL=C
+export LC_ALL
+LANGUAGE=C
+export LANGUAGE
+
+# CDPATH.
+(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
+
+
+# as_fn_error STATUS ERROR [LINENO LOG_FD]
+# ----------------------------------------
+# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
+# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
+# script with STATUS, using 1 if that was 0.
+as_fn_error ()
+{
+ as_status=$1; test $as_status -eq 0 && as_status=1
+ if test "$4"; then
+ as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
+ fi
+ $as_echo "$as_me: error: $2" >&2
+ as_fn_exit $as_status
+} # as_fn_error
+
+
+# as_fn_set_status STATUS
+# -----------------------
+# Set $? to STATUS, without forking.
+as_fn_set_status ()
+{
+ return $1
+} # as_fn_set_status
+
+# as_fn_exit STATUS
+# -----------------
+# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
+as_fn_exit ()
+{
+ set +e
+ as_fn_set_status $1
+ exit $1
+} # as_fn_exit
+
+# as_fn_unset VAR
+# ---------------
+# Portably unset VAR.
+as_fn_unset ()
+{
+ { eval $1=; unset $1;}
+}
+as_unset=as_fn_unset
+# as_fn_append VAR VALUE
+# ----------------------
+# Append the text in VALUE to the end of the definition contained in VAR. Take
+# advantage of any shell optimizations that allow amortized linear growth over
+# repeated appends, instead of the typical quadratic growth present in naive
+# implementations.
+if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
+ eval 'as_fn_append ()
+ {
+ eval $1+=\$2
+ }'
+else
+ as_fn_append ()
+ {
+ eval $1=\$$1\$2
+ }
+fi # as_fn_append
+
+# as_fn_arith ARG...
+# ------------------
+# Perform arithmetic evaluation on the ARGs, and store the result in the
+# global $as_val. Take advantage of shells that can avoid forks. The arguments
+# must be portable across $(()) and expr.
+if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
+ eval 'as_fn_arith ()
+ {
+ as_val=$(( $* ))
+ }'
+else
+ as_fn_arith ()
+ {
+ as_val=`expr "$@" || test $? -eq 1`
+ }
+fi # as_fn_arith
+
+
+if expr a : '\(a\)' >/dev/null 2>&1 &&
+ test "X`expr 00001 : '.*\(...\)'`" = X001; then
+ as_expr=expr
+else
+ as_expr=false
+fi
+
+if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
+ as_basename=basename
+else
+ as_basename=false
+fi
+
+if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
+ as_dirname=dirname
+else
+ as_dirname=false
+fi
+
+as_me=`$as_basename -- "$0" ||
+$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
+ X"$0" : 'X\(//\)$' \| \
+ X"$0" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X/"$0" |
+ sed '/^.*\/\([^/][^/]*\)\/*$/{
+ s//\1/
+ q
+ }
+ /^X\/\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\/\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+
+# Avoid depending upon Character Ranges.
+as_cr_letters='abcdefghijklmnopqrstuvwxyz'
+as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
+as_cr_Letters=$as_cr_letters$as_cr_LETTERS
+as_cr_digits='0123456789'
+as_cr_alnum=$as_cr_Letters$as_cr_digits
+
+ECHO_C= ECHO_N= ECHO_T=
+case `echo -n x` in #(((((
+-n*)
+ case `echo 'xy\c'` in
+ *c*) ECHO_T=' ';; # ECHO_T is single tab character.
+ xy) ECHO_C='\c';;
+ *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
+ ECHO_T=' ';;
+ esac;;
+*)
+ ECHO_N='-n';;
+esac
+
+rm -f conf$$ conf$$.exe conf$$.file
+if test -d conf$$.dir; then
+ rm -f conf$$.dir/conf$$.file
+else
+ rm -f conf$$.dir
+ mkdir conf$$.dir 2>/dev/null
+fi
+if (echo >conf$$.file) 2>/dev/null; then
+ if ln -s conf$$.file conf$$ 2>/dev/null; then
+ as_ln_s='ln -s'
+ # ... but there are two gotchas:
+ # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
+ # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
+ # In both cases, we have to default to `cp -p'.
+ ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
+ as_ln_s='cp -p'
+ elif ln conf$$.file conf$$ 2>/dev/null; then
+ as_ln_s=ln
+ else
+ as_ln_s='cp -p'
+ fi
+else
+ as_ln_s='cp -p'
+fi
+rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
+rmdir conf$$.dir 2>/dev/null
+
+
+# as_fn_mkdir_p
+# -------------
+# Create "$as_dir" as a directory, including parents if necessary.
+as_fn_mkdir_p ()
+{
+
+ case $as_dir in #(
+ -*) as_dir=./$as_dir;;
+ esac
+ test -d "$as_dir" || eval $as_mkdir_p || {
+ as_dirs=
+ while :; do
+ case $as_dir in #(
+ *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
+ *) as_qdir=$as_dir;;
+ esac
+ as_dirs="'$as_qdir' $as_dirs"
+ as_dir=`$as_dirname -- "$as_dir" ||
+$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$as_dir" : 'X\(//\)[^/]' \| \
+ X"$as_dir" : 'X\(//\)$' \| \
+ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$as_dir" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)[^/].*/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+ test -d "$as_dir" && break
+ done
+ test -z "$as_dirs" || eval "mkdir $as_dirs"
+ } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
+
+
+} # as_fn_mkdir_p
+if mkdir -p . 2>/dev/null; then
+ as_mkdir_p='mkdir -p "$as_dir"'
+else
+ test -d ./-p && rmdir ./-p
+ as_mkdir_p=false
+fi
+
+if test -x / >/dev/null 2>&1; then
+ as_test_x='test -x'
+else
+ if ls -dL / >/dev/null 2>&1; then
+ as_ls_L_option=L
+ else
+ as_ls_L_option=
+ fi
+ as_test_x='
+ eval sh -c '\''
+ if test -d "$1"; then
+ test -d "$1/.";
+ else
+ case $1 in #(
+ -*)set "./$1";;
+ esac;
+ case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
+ ???[sx]*):;;*)false;;esac;fi
+ '\'' sh
+ '
+fi
+as_executable_p=$as_test_x
+
+# Sed expression to map a string onto a valid CPP name.
+as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
+
+# Sed expression to map a string onto a valid variable name.
+as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
+
+
+exec 6>&1
+## ----------------------------------- ##
+## Main body of $CONFIG_STATUS script. ##
+## ----------------------------------- ##
+_ASEOF
+test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+# Save the log message, to keep $0 and so on meaningful, and to
+# report actual input values of CONFIG_FILES etc. instead of their
+# values after options handling.
+ac_log="
+This file was extended by $as_me, which was
+generated by GNU Autoconf 2.68. Invocation command line was
+
+ CONFIG_FILES = $CONFIG_FILES
+ CONFIG_HEADERS = $CONFIG_HEADERS
+ CONFIG_LINKS = $CONFIG_LINKS
+ CONFIG_COMMANDS = $CONFIG_COMMANDS
+ $ $0 $@
+
+on `(hostname || uname -n) 2>/dev/null | sed 1q`
+"
+
+_ACEOF
+
+case $ac_config_files in *"
+"*) set x $ac_config_files; shift; ac_config_files=$*;;
+esac
+
+
+
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+# Files that config.status was made for.
+config_files="$ac_config_files"
+config_commands="$ac_config_commands"
+
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+ac_cs_usage="\
+\`$as_me' instantiates files and other configuration actions
+from templates according to the current configuration. Unless the files
+and actions are specified as TAGs, all are instantiated by default.
+
+Usage: $0 [OPTION]... [TAG]...
+
+ -h, --help print this help, then exit
+ -V, --version print version number and configuration settings, then exit
+ --config print configuration, then exit
+ -q, --quiet, --silent
+ do not print progress messages
+ -d, --debug don't remove temporary files
+ --recheck update $as_me by reconfiguring in the same conditions
+ --file=FILE[:TEMPLATE]
+ instantiate the configuration file FILE
+
+Configuration files:
+$config_files
+
+Configuration commands:
+$config_commands
+
+Report bugs to the package provider."
+
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
+ac_cs_version="\\
+config.status
+configured by $0, generated by GNU Autoconf 2.68,
+ with options \\"\$ac_cs_config\\"
+
+Copyright (C) 2010 Free Software Foundation, Inc.
+This config.status script is free software; the Free Software Foundation
+gives unlimited permission to copy, distribute and modify it."
+
+ac_pwd='$ac_pwd'
+srcdir='$srcdir'
+INSTALL='$INSTALL'
+test -n "\$AWK" || AWK=awk
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+# The default lists apply if the user does not specify any file.
+ac_need_defaults=:
+while test $# != 0
+do
+ case $1 in
+ --*=?*)
+ ac_option=`expr "X$1" : 'X\([^=]*\)='`
+ ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
+ ac_shift=:
+ ;;
+ --*=)
+ ac_option=`expr "X$1" : 'X\([^=]*\)='`
+ ac_optarg=
+ ac_shift=:
+ ;;
+ *)
+ ac_option=$1
+ ac_optarg=$2
+ ac_shift=shift
+ ;;
+ esac
+
+ case $ac_option in
+ # Handling of the options.
+ -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
+ ac_cs_recheck=: ;;
+ --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
+ $as_echo "$ac_cs_version"; exit ;;
+ --config | --confi | --conf | --con | --co | --c )
+ $as_echo "$ac_cs_config"; exit ;;
+ --debug | --debu | --deb | --de | --d | -d )
+ debug=: ;;
+ --file | --fil | --fi | --f )
+ $ac_shift
+ case $ac_optarg in
+ *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
+ '') as_fn_error $? "missing file argument" ;;
+ esac
+ as_fn_append CONFIG_FILES " '$ac_optarg'"
+ ac_need_defaults=false;;
+ --he | --h | --help | --hel | -h )
+ $as_echo "$ac_cs_usage"; exit ;;
+ -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+ | -silent | --silent | --silen | --sile | --sil | --si | --s)
+ ac_cs_silent=: ;;
+
+ # This is an error.
+ -*) as_fn_error $? "unrecognized option: \`$1'
+Try \`$0 --help' for more information." ;;
+
+ *) as_fn_append ac_config_targets " $1"
+ ac_need_defaults=false ;;
+
+ esac
+ shift
+done
+
+ac_configure_extra_args=
+
+if $ac_cs_silent; then
+ exec 6>/dev/null
+ ac_configure_extra_args="$ac_configure_extra_args --silent"
+fi
+
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+if \$ac_cs_recheck; then
+ set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
+ shift
+ \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
+ CONFIG_SHELL='$SHELL'
+ export CONFIG_SHELL
+ exec "\$@"
+fi
+
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+exec 5>>config.log
+{
+ echo
+ sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
+## Running $as_me. ##
+_ASBOX
+ $as_echo "$ac_log"
+} >&5
+
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+#
+# INIT-COMMANDS
+#
+AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"
+srcdir=${srcdir}
+target=${target}
+with_multisubdir=${with_multisubdir}
+ac_configure_args="${ac_configure_args} --enable-multilib"
+CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
+libgloss_topdir=${libgloss_topdir}
+
+
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+
+# Handling of arguments.
+for ac_config_target in $ac_config_targets
+do
+ case $ac_config_target in
+ "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
+ "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
+
+ *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
+ esac
+done
+
+
+# If the user did not use the arguments to specify the items to instantiate,
+# then the envvar interface is used. Set only those that are not.
+# We use the long form for the default assignment because of an extremely
+# bizarre bug on SunOS 4.1.3.
+if $ac_need_defaults; then
+ test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
+ test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
+fi
+
+# Have a temporary directory for convenience. Make it in the build tree
+# simply because there is no reason against having it here, and in addition,
+# creating and moving files from /tmp can sometimes cause problems.
+# Hook for its removal unless debugging.
+# Note that there is a small window in which the directory will not be cleaned:
+# after its creation but before its name has been assigned to `$tmp'.
+$debug ||
+{
+ tmp= ac_tmp=
+ trap 'exit_status=$?
+ : "${ac_tmp:=$tmp}"
+ { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
+' 0
+ trap 'as_fn_exit 1' 1 2 13 15
+}
+# Create a (secure) tmp directory for tmp files.
+
+{
+ tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
+ test -d "$tmp"
+} ||
+{
+ tmp=./conf$$-$RANDOM
+ (umask 077 && mkdir "$tmp")
+} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
+ac_tmp=$tmp
+
+# Set up the scripts for CONFIG_FILES section.
+# No need to generate them if there are no CONFIG_FILES.
+# This happens for instance with `./config.status config.h'.
+if test -n "$CONFIG_FILES"; then
+
+if $AWK 'BEGIN { getline <"/dev/null" }' </dev/null 2>/dev/null; then
+ ac_cs_awk_getline=:
+ ac_cs_awk_pipe_init=
+ ac_cs_awk_read_file='
+ while ((getline aline < (F[key])) > 0)
+ print(aline)
+ close(F[key])'
+ ac_cs_awk_pipe_fini=
+else
+ ac_cs_awk_getline=false
+ ac_cs_awk_pipe_init="print \"cat <<'|#_!!_#|' &&\""
+ ac_cs_awk_read_file='
+ print "|#_!!_#|"
+ print "cat " F[key] " &&"
+ '$ac_cs_awk_pipe_init
+ # The final `:' finishes the AND list.
+ ac_cs_awk_pipe_fini='END { print "|#_!!_#|"; print ":" }'
+fi
+ac_cr=`echo X | tr X '\015'`
+# On cygwin, bash can eat \r inside `` if the user requested igncr.
+# But we know of no other shell where ac_cr would be empty at this
+# point, so we can use a bashism as a fallback.
+if test "x$ac_cr" = x; then
+ eval ac_cr=\$\'\\r\'
+fi
+ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
+if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
+ ac_cs_awk_cr='\\r'
+else
+ ac_cs_awk_cr=$ac_cr
+fi
+
+echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
+_ACEOF
+
+# Create commands to substitute file output variables.
+{
+ echo "cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1" &&
+ echo 'cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&' &&
+ echo "$ac_subst_files" | sed 's/.*/F["&"]="$&"/' &&
+ echo "_ACAWK" &&
+ echo "_ACEOF"
+} >conf$$files.sh &&
+. ./conf$$files.sh ||
+ as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
+rm -f conf$$files.sh
+
+{
+ echo "cat >conf$$subs.awk <<_ACEOF" &&
+ echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
+ echo "_ACEOF"
+} >conf$$subs.sh ||
+ as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
+ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
+ac_delim='%!_!# '
+for ac_last_try in false false false false false :; do
+ . ./conf$$subs.sh ||
+ as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
+
+ ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
+ if test $ac_delim_n = $ac_delim_num; then
+ break
+ elif $ac_last_try; then
+ as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
+ else
+ ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
+ fi
+done
+rm -f conf$$subs.sh
+
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
+_ACEOF
+sed -n '
+h
+s/^/S["/; s/!.*/"]=/
+p
+g
+s/^[^!]*!//
+:repl
+t repl
+s/'"$ac_delim"'$//
+t delim
+:nl
+h
+s/\(.\{148\}\)..*/\1/
+t more1
+s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
+p
+n
+b repl
+:more1
+s/["\\]/\\&/g; s/^/"/; s/$/"\\/
+p
+g
+s/.\{148\}//
+t nl
+:delim
+h
+s/\(.\{148\}\)..*/\1/
+t more2
+s/["\\]/\\&/g; s/^/"/; s/$/"/
+p
+b
+:more2
+s/["\\]/\\&/g; s/^/"/; s/$/"\\/
+p
+g
+s/.\{148\}//
+t delim
+' <conf$$subs.awk | sed '
+/^[^""]/{
+ N
+ s/\n//
+}
+' >>$CONFIG_STATUS || ac_write_fail=1
+rm -f conf$$subs.awk
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+_ACAWK
+cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
+ for (key in S) S_is_set[key] = 1
+ FS = ""
+ \$ac_cs_awk_pipe_init
+}
+{
+ line = $ 0
+ nfields = split(line, field, "@")
+ substed = 0
+ len = length(field[1])
+ for (i = 2; i < nfields; i++) {
+ key = field[i]
+ keylen = length(key)
+ if (S_is_set[key]) {
+ value = S[key]
+ line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
+ len += length(value) + length(field[++i])
+ substed = 1
+ } else
+ len += 1 + keylen
+ }
+ if (nfields == 3 && !substed) {
+ key = field[2]
+ if (F[key] != "" && line ~ /^[ ]*@.*@[ ]*$/) {
+ \$ac_cs_awk_read_file
+ next
+ }
+ }
+ print line
+}
+\$ac_cs_awk_pipe_fini
+_ACAWK
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
+ sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
+else
+ cat
+fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
+ || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
+_ACEOF
+
+# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
+# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
+# trailing colons and then remove the whole line if VPATH becomes empty
+# (actually we leave an empty line to preserve line numbers).
+if test "x$srcdir" = x.; then
+ ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
+h
+s///
+s/^/:/
+s/[ ]*$/:/
+s/:\$(srcdir):/:/g
+s/:\${srcdir}:/:/g
+s/:@srcdir@:/:/g
+s/^:*//
+s/:*$//
+x
+s/\(=[ ]*\).*/\1/
+G
+s/\n//
+s/^[^=]*=[ ]*$//
+}'
+fi
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+fi # test -n "$CONFIG_FILES"
+
+
+eval set X " :F $CONFIG_FILES :C $CONFIG_COMMANDS"
+shift
+for ac_tag
+do
+ case $ac_tag in
+ :[FHLC]) ac_mode=$ac_tag; continue;;
+ esac
+ case $ac_mode$ac_tag in
+ :[FHL]*:*);;
+ :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
+ :[FH]-) ac_tag=-:-;;
+ :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
+ esac
+ ac_save_IFS=$IFS
+ IFS=:
+ set x $ac_tag
+ IFS=$ac_save_IFS
+ shift
+ ac_file=$1
+ shift
+
+ case $ac_mode in
+ :L) ac_source=$1;;
+ :[FH])
+ ac_file_inputs=
+ for ac_f
+ do
+ case $ac_f in
+ -) ac_f="$ac_tmp/stdin";;
+ *) # Look for the file first in the build tree, then in the source tree
+ # (if the path is not absolute). The absolute path cannot be DOS-style,
+ # because $ac_f cannot contain `:'.
+ test -f "$ac_f" ||
+ case $ac_f in
+ [\\/$]*) false;;
+ *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
+ esac ||
+ as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
+ esac
+ case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
+ as_fn_append ac_file_inputs " '$ac_f'"
+ done
+
+ # Let's still pretend it is `configure' which instantiates (i.e., don't
+ # use $as_me), people would be surprised to read:
+ # /* config.h. Generated by config.status. */
+ configure_input='Generated from '`
+ $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
+ `' by configure.'
+ if test x"$ac_file" != x-; then
+ configure_input="$ac_file. $configure_input"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
+$as_echo "$as_me: creating $ac_file" >&6;}
+ fi
+ # Neutralize special characters interpreted by sed in replacement strings.
+ case $configure_input in #(
+ *\&* | *\|* | *\\* )
+ ac_sed_conf_input=`$as_echo "$configure_input" |
+ sed 's/[\\\\&|]/\\\\&/g'`;; #(
+ *) ac_sed_conf_input=$configure_input;;
+ esac
+
+ case $ac_tag in
+ *:-:* | *:-) cat >"$ac_tmp/stdin" \
+ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
+ esac
+ ;;
+ esac
+
+ ac_dir=`$as_dirname -- "$ac_file" ||
+$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$ac_file" : 'X\(//\)[^/]' \| \
+ X"$ac_file" : 'X\(//\)$' \| \
+ X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$ac_file" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)[^/].*/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+ as_dir="$ac_dir"; as_fn_mkdir_p
+ ac_builddir=.
+
+case "$ac_dir" in
+.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
+*)
+ ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
+ # A ".." for each directory in $ac_dir_suffix.
+ ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
+ case $ac_top_builddir_sub in
+ "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
+ *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
+ esac ;;
+esac
+ac_abs_top_builddir=$ac_pwd
+ac_abs_builddir=$ac_pwd$ac_dir_suffix
+# for backward compatibility:
+ac_top_builddir=$ac_top_build_prefix
+
+case $srcdir in
+ .) # We are building in place.
+ ac_srcdir=.
+ ac_top_srcdir=$ac_top_builddir_sub
+ ac_abs_top_srcdir=$ac_pwd ;;
+ [\\/]* | ?:[\\/]* ) # Absolute name.
+ ac_srcdir=$srcdir$ac_dir_suffix;
+ ac_top_srcdir=$srcdir
+ ac_abs_top_srcdir=$srcdir ;;
+ *) # Relative name.
+ ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
+ ac_top_srcdir=$ac_top_build_prefix$srcdir
+ ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
+esac
+ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
+
+
+ case $ac_mode in
+ :F)
+ #
+ # CONFIG_FILE
+ #
+
+ case $INSTALL in
+ [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
+ *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
+ esac
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+# If the template does not know about datarootdir, expand it.
+# FIXME: This hack should be removed a few years after 2.60.
+ac_datarootdir_hack=; ac_datarootdir_seen=
+ac_sed_dataroot='
+/datarootdir/ {
+ p
+ q
+}
+/@datadir@/p
+/@docdir@/p
+/@infodir@/p
+/@localedir@/p
+/@mandir@/p'
+case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
+*datarootdir*) ac_datarootdir_seen=yes;;
+*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
+$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+ ac_datarootdir_hack='
+ s&@datadir@&$datadir&g
+ s&@docdir@&$docdir&g
+ s&@infodir@&$infodir&g
+ s&@localedir@&$localedir&g
+ s&@mandir@&$mandir&g
+ s&\\\${datarootdir}&$datarootdir&g' ;;
+esac
+_ACEOF
+
+# Neutralize VPATH when `$srcdir' = `.'.
+# Shell code in configure.ac might set extrasub.
+# FIXME: do we really want to maintain this feature?
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+ac_sed_extra="$ac_vpsub
+$extrasub
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+:t
+/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
+s|@configure_input@|$ac_sed_conf_input|;t t
+s&@top_builddir@&$ac_top_builddir_sub&;t t
+s&@top_build_prefix@&$ac_top_build_prefix&;t t
+s&@srcdir@&$ac_srcdir&;t t
+s&@abs_srcdir@&$ac_abs_srcdir&;t t
+s&@top_srcdir@&$ac_top_srcdir&;t t
+s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
+s&@builddir@&$ac_builddir&;t t
+s&@abs_builddir@&$ac_abs_builddir&;t t
+s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
+s&@INSTALL@&$ac_INSTALL&;t t
+$ac_datarootdir_hack
+"
+eval sed \"\$ac_sed_extra\" "$ac_file_inputs" |
+if $ac_cs_awk_getline; then
+ $AWK -f "$ac_tmp/subs.awk"
+else
+ $AWK -f "$ac_tmp/subs.awk" | $SHELL
+fi \
+ >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
+
+test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
+ { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
+ { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
+ "$ac_tmp/out"`; test -z "$ac_out"; } &&
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
+which seems to be undefined. Please make sure it is defined" >&5
+$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
+which seems to be undefined. Please make sure it is defined" >&2;}
+
+ rm -f "$ac_tmp/stdin"
+ case $ac_file in
+ -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
+ *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
+ esac \
+ || as_fn_error $? "could not create $ac_file" "$LINENO" 5
+ ;;
+
+
+ :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
+$as_echo "$as_me: executing $ac_file commands" >&6;}
+ ;;
+ esac
+
+
+ case $ac_file$ac_mode in
+ "depfiles":C) test x"$AMDEP_TRUE" != x"" || {
+ # Autoconf 2.62 quotes --file arguments for eval, but not when files
+ # are listed without --file. Let's play safe and only enable the eval
+ # if we detect the quoting.
+ case $CONFIG_FILES in
+ *\'*) eval set x "$CONFIG_FILES" ;;
+ *) set x $CONFIG_FILES ;;
+ esac
+ shift
+ for mf
+ do
+ # Strip MF so we end up with the name of the file.
+ mf=`echo "$mf" | sed -e 's/:.*$//'`
+ # Check whether this is an Automake generated Makefile or not.
+ # We used to match only the files named `Makefile.in', but
+ # some people rename them; so instead we look at the file content.
+ # Grep'ing the first line is not enough: some people post-process
+ # each Makefile.in and add a new line on top of each file to say so.
+ # Grep'ing the whole file is not good either: AIX grep has a line
+ # limit of 2048, but all sed's we know have understand at least 4000.
+ if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
+ dirpart=`$as_dirname -- "$mf" ||
+$as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$mf" : 'X\(//\)[^/]' \| \
+ X"$mf" : 'X\(//\)$' \| \
+ X"$mf" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$mf" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)[^/].*/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+ else
+ continue
+ fi
+ # Extract the definition of DEPDIR, am__include, and am__quote
+ # from the Makefile without running `make'.
+ DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
+ test -z "$DEPDIR" && continue
+ am__include=`sed -n 's/^am__include = //p' < "$mf"`
+ test -z "am__include" && continue
+ am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
+ # When using ansi2knr, U may be empty or an underscore; expand it
+ U=`sed -n 's/^U = //p' < "$mf"`
+ # Find all dependency output files, they are included files with
+ # $(DEPDIR) in their names. We invoke sed twice because it is the
+ # simplest approach to changing $(DEPDIR) to its actual value in the
+ # expansion.
+ for file in `sed -n "
+ s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
+ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
+ # Make sure the directory exists.
+ test -f "$dirpart/$file" && continue
+ fdir=`$as_dirname -- "$file" ||
+$as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$file" : 'X\(//\)[^/]' \| \
+ X"$file" : 'X\(//\)$' \| \
+ X"$file" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$file" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)[^/].*/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+ as_dir=$dirpart/$fdir; as_fn_mkdir_p
+ # echo "creating $dirpart/$file"
+ echo '# dummy' > "$dirpart/$file"
+ done
+ done
+}
+ ;;
+ "Makefile":F) . ${libgloss_topdir}/config-ml.in ;;
+
+ esac
+done # for ac_tag
+
+
+as_fn_exit 0
+_ACEOF
+ac_clean_files=$ac_clean_files_save
+
+test $ac_write_fail = 0 ||
+ as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
+
+
+# configure is writing to config.log, and then calls config.status.
+# config.status does its own redirection, appending to config.log.
+# Unfortunately, on DOS this fails, as config.log is still kept open
+# by configure, so config.status won't be able to write to it; its
+# output is simply discarded. So we exec the FD to /dev/null,
+# effectively closing config.log, so it can be properly (re)opened and
+# appended to by config.status. When coming back to configure, we
+# need to make the FD available again.
+if test "$no_create" != yes; then
+ ac_cs_success=:
+ ac_config_status_args=
+ test "$silent" = yes &&
+ ac_config_status_args="$ac_config_status_args --quiet"
+ exec 5>/dev/null
+ $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
+ exec 5>>config.log
+ # Use ||, not &&, to avoid exiting from the if with $? = 1, which
+ # would make configure fail if this is the last instruction.
+ $ac_cs_success || as_fn_exit 1
+fi
+if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
+$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
+fi
+
diff --git a/libgloss/arc/configure.in b/libgloss/arc/configure.in
new file mode 100644
index 000000000..04169f1b5
--- /dev/null
+++ b/libgloss/arc/configure.in
@@ -0,0 +1,55 @@
+dnl Process this file with autoconf to produce a configure script.
+AC_PREREQ(2.59)
+AC_INIT(crt0.S)
+
+if test "${enable_shared}" = "yes" ; then
+ echo "Shared libraries not supported for cross compiling, ignored"
+fi
+
+if test "$srcdir" = "." ; then
+ if test "${with_target_subdir}" != "." ; then
+ libgloss_topdir="${srcdir}/${with_multisrctop}../../.."
+ else
+ libgloss_topdir="${srcdir}/${with_multisrctop}../.."
+ fi
+else
+ libgloss_topdir="${srcdir}/../.."
+fi
+AC_CONFIG_AUX_DIR($libgloss_topdir)
+
+AC_CANONICAL_SYSTEM
+AC_ARG_PROGRAM
+
+AC_PROG_INSTALL
+
+LIB_AC_PROG_CC
+
+AS=${AS-as}
+AC_SUBST(AS)
+AR=${AR-ar}
+AC_SUBST(AR)
+LD=${LD-ld}
+AC_SUBST(LD)
+AC_PROG_RANLIB
+LIB_AM_PROG_AS
+
+host_makefile_frag=${srcdir}/../config/default.mh
+
+dnl We have to assign the same value to other variables because autoconf
+dnl doesn't provide a mechanism to substitute a replacement keyword with
+dnl arbitrary data or pathnames.
+dnl
+host_makefile_frag_path=$host_makefile_frag
+AC_SUBST(host_makefile_frag_path)
+AC_SUBST_FILE(host_makefile_frag)
+
+AC_CONFIG_FILES(Makefile,
+. ${libgloss_topdir}/config-ml.in,
+srcdir=${srcdir}
+target=${target}
+with_multisubdir=${with_multisubdir}
+ac_configure_args="${ac_configure_args} --enable-multilib"
+CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
+libgloss_topdir=${libgloss_topdir}
+)
+AC_OUTPUT
diff --git a/libgloss/arc/crt0.S b/libgloss/arc/crt0.S
new file mode 100644
index 000000000..7db07fff0
--- /dev/null
+++ b/libgloss/arc/crt0.S
@@ -0,0 +1,224 @@
+/*
+ Copyright (c) 2015-2016, Synopsys, Inc. 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) Neither the name of the Synopsys, Inc., 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 HOLDER 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.
+*/
+
+/*
+ The startup code for the ARC family of processors does the following before
+ transferring control to user defined main label:
+ 1. Set sp to __stack_top (link time variable)
+ 2. Set fp to zero
+ 3. Zero out the bss section (for uninitialized globals)
+ After returning from main, the processor is halted and the pipeline is
+ flushed out.
+
+ We expect argc in r0 and argv in r1. These are saved in r13 / r14 during
+ the initialization code.
+*/
+
+/* Compatibility with older ARC GCC, that doesn't provide some of the
+ preprocessor defines used by newlib and libgloss for ARC. */
+#if defined (__Xbarrel_shifter) && !defined (__ARC_BARREL_SHIFTER__)
+#define __ARC_BARREL_SHIFTER__ 1
+#endif
+
+#if defined (__EM__) && !defined (__ARCEM__)
+#define __ARCEM__ 1
+#endif
+
+#if defined (__HS__) && !defined (__ARCHS__)
+#define __ARCHS__ 1
+#endif
+
+ .file "crt0.S"
+ .extern main
+
+#if defined (__ARCEM__) || defined (__ARCHS__)
+ .section .ivt, "a", @progbits
+
+; Helper macro to define weak symbols to include into interrupt vector table.
+; User code may define those functions in them, so user function will be
+; referenced in the IVT. By default all handlers point to _exit_halt - so they
+; always cause application halt, because if application causes an exception or
+; interrupt, but doesn't set a handler for it - something is wrong in
+; application. Exception is "start" entry of IVT, which points to __start
+; function.
+#define IVT_ENTRY(name) \
+ .word name `\
+ .weak name `\
+ .set name, _exit_halt
+
+; handler's name, number, name, offset in IVT (hex/dec)
+.word __start ; 0 program entry point 0x0 0
+IVT_ENTRY(memory_error) ; 1 memory_error 0x4 4
+IVT_ENTRY(instruction_error) ; 2 instruction_error 0x8 8
+IVT_ENTRY(EV_MachineCheck) ; 3 EV_MachineCheck 0xC 12
+IVT_ENTRY(EV_TLBMissI) ; 4 EV_TLBMissI 0x10 16
+IVT_ENTRY(EV_TLBMissD) ; 5 EV_TLBMissD 0x14 20
+IVT_ENTRY(EV_ProtV) ; 6 EV_ProtV 0x18 24
+IVT_ENTRY(EV_PrivilegeV) ; 7 EV_PrivilegeV 0x1C 28
+IVT_ENTRY(EV_SWI) ; 8 EV_SWI 0x20 32
+IVT_ENTRY(EV_Trap) ; 9 EV_Trap 0x24 36
+IVT_ENTRY(EV_Extension) ; 10 EV_Extension 0x28 40
+IVT_ENTRY(EV_DivZero) ; 11 EV_DivZero 0x2C 44
+IVT_ENTRY(EV_DCError) ; 12 EV_DCError 0x30 48
+IVT_ENTRY(EV_Maligned) ; 13 EV_Maligned 0x34 52
+IVT_ENTRY(EV_Ex14) ; 14 unused 0x38 56
+IVT_ENTRY(EV_Ex15) ; 15 unused 0x3C 60
+IVT_ENTRY(IRQ_Timer0) ; 16 Timer 0 0x40 64
+IVT_ENTRY(IRQ_Timer1) ; 17 Timer 1 0x44 68
+IVT_ENTRY(IRQ_18) ; 18 0x48 72
+IVT_ENTRY(IRQ_19) ; 19 0x4C 76
+IVT_ENTRY(IRQ_20) ; 20 0x50 80
+
+ .section .text.__startup, "ax", @progbits
+#else
+ .text
+#endif /* __ARCEM__ || __ARCHS__ */
+
+ .global __start
+ .type __start, @function
+
+#ifdef __ARC601__
+; Startup code for the ARC601 processor
+__start:
+ mov gp, @__SDATA_BEGIN__
+ mov sp, @__stack_top ; Point to top of stack
+ mov r5, 0 ; Zero value
+ mov_s r2, @__sbss_start ; r2 = start of the bss section
+ sub r3, @_end, r2 ; r3 = size of the bss section in bytes
+
+ asr_s r3, r3
+ asr_s r3, r3 ; r3 = size of bss in words
+
+.Lbss_loop:
+ cmp r3, 0xff ; Check for max lp_count
+ mov.le lp_count, r3
+ mov.gt lp_count, 0xff
+ lpnz 2f ; Loop to zero bss
+ st.ab r5,[r2, 4] ; Write word of zeros
+ nop
+2:
+ sub.f r3, r3, 0xff ; Decrement word count
+ jp .Lbss_loop
+
+#else /* __ARC601__ */
+
+; Startup code for the ARC600, ARC700 and ARCv2 processors
+; NOTE: The following restrictions apply on zero overhead loops (other
+; restrictions are not pertinent to this code)
+; - loop end should be 4 instruction words away from the lp_count setting
+; instruction
+; - loop body should have at least two instruction words
+__start:
+#if defined (__ARCHS__)
+ ; Allow unaligned accesses.
+ lr r2, [0xA]
+ bset r2, r2, 19
+ flag r2
+#endif
+ mov gp, @__SDATA_BEGIN__
+ mov_s r2, @__sbss_start ; r2 = start of the bss section
+ sub r3, @_end, r2 ; r3 = size of the bss section in bytes
+ ; set up the loop counter register to the size (in words) of the bss section
+#if defined (__ARC_BARREL_SHIFTER__)
+ asr.f lp_count, r3, 2
+#else
+ asr_s r13, r3
+ asr.f lp_count, r13
+#endif
+#if defined (__ARC600__)
+ ; loop to zero out the bss. Enter loop only if lp_count != 0
+ lpnz @.Lend_zbss
+ add r3, pcl, 20
+ sr r3, [2] ; LP_END
+ ; initialize stack pointer, and this instruction has 2 words
+ mov sp, @__stack_top
+ mov_s r3, 0
+ st.ab r3, [r2, 4] ; zero out the word
+.Lend_zbss:
+#else
+ mov sp, @__stack_top ; initialize stack pointer
+ mov_s r3,0
+ ; loop to zero out the bss. Enter loop only if lp_count != 0
+ lpnz @.Lend_zbss
+ st.ab r3,[r2, 4] ; zero out the word
+ nop
+.Lend_zbss:
+#endif
+
+#endif /* !__ARC601__ */
+
+; Some targets use the .init and .fini sections to create constructors and
+; destructors, and for these targets we need to call the _init function and
+; arrange for _fini to be called at program exit.
+ mov_s r13, r0
+ mov_s r14, r1
+ ; calling atexit drags in malloc, so instead poke the function
+ ; address directly into the reent structure
+ ld r1, [gp, @_impure_ptr@sda]
+ mov_s r0, @_fini
+ add r1, r1, 0x14c ; &_GLOBAL_REENT->atexit0
+ st r1, [r1, -4] ; _GLOBAL_REENT->atexit
+ st_s r0, [r1, 8] ; _GLOBAL_REENT->atexit0._fns[0]
+ mov_s r0, 1
+ st_s r0, [r1, 4] ; _GLOBAL_REENT->atexit0._ind
+; branch to _init
+#if defined (__EM__) || defined (__HS__)
+ jl @_init
+#else
+ bl @_init
+#endif /* __ARCEM__ || __ARCHS__ */
+ mov_s r0, r13
+ mov_s r1, r14
+; branch to main
+#if defined (__ARCEM__) || defined (__ARCHS__)
+ mov fp,0 ; initialize frame pointer
+ jl @main
+#else
+ bl.d @main
+ mov fp, 0 ; initialize frame pointer
+#endif /* __ARCEM__ || __ARCHS__ */
+ ; r0 contains exit code
+ j @exit
+
+.section .text._exit_halt,"ax",@progbits
+.global _exit_halt
+.type _exit_halt, @function
+
+_exit_halt:
+ ; r0 contains exit code
+ flag 1
+#if defined (__ARC600__) || defined (__ARC700__)
+ ; ARCompact requires 3 nops after flag 1
+ nop
+ nop
+ nop
+#endif
+ b @_exit_halt
+.balign 4
diff --git a/libgloss/arc/libcfunc.c b/libgloss/arc/libcfunc.c
new file mode 100644
index 000000000..c6e64f2b7
--- /dev/null
+++ b/libgloss/arc/libcfunc.c
@@ -0,0 +1,92 @@
+/*
+ Copyright (c) 2015, Synopsys, Inc. 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) Neither the name of the Synopsys, Inc., 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 HOLDER 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.
+*/
+
+/* This file has been copied from libgloss/arm/libcfuncs.c.
+
+ Support files for GNU libc. Files in the C namespace go here.
+ Files in the system namespace (ie those that start with an underscore)
+ go in syscalls.c.
+
+ Note: These functions are in a seperate file so that OS providers can
+ overrride the system call stubs (defined in syscalls.c) without having
+ to provide libc functions as well. */
+
+#include <errno.h>
+#include <sys/types.h>
+#include <time.h>
+#include <unistd.h>
+
+unsigned __attribute__((weak))
+alarm (unsigned seconds)
+{
+ (void)seconds;
+ return 0;
+}
+
+clock_t _clock (void);
+clock_t __attribute__((weak))
+clock (void)
+{
+ return _clock ();
+}
+
+int _isatty (int fildes);
+int __attribute__((weak))
+isatty (int fildes)
+{
+ return _isatty (fildes);
+}
+
+int __attribute__((weak))
+pause (void)
+{
+ errno = ENOSYS;
+ return -1;
+}
+
+unsigned __attribute__((weak))
+sleep (unsigned seconds)
+{
+ clock_t t0 = _clock ();
+ clock_t dt = seconds * CLOCKS_PER_SEC;
+
+ while (_clock () - t0 < dt);
+ return 0;
+}
+
+int __attribute__((weak))
+usleep (useconds_t useconds)
+{
+ clock_t t0 = _clock ();
+ clock_t dt = useconds / (1000000/CLOCKS_PER_SEC);
+
+ while (_clock () - t0 < dt);
+ return 0;
+}
diff --git a/libgloss/arc/nano.specs b/libgloss/arc/nano.specs
new file mode 100644
index 000000000..91ab61d35
--- /dev/null
+++ b/libgloss/arc/nano.specs
@@ -0,0 +1,18 @@
+%rename link nano_link
+%rename link_gcc_c_sequence nano_link_gcc_c_sequence
+
+*nano_libc:
+-lc_nano
+
+*nano_libgloss:
+%{specs=nsim.specs:-lnsim} %{specs=nosys.specs:-lnosys}
+
+*link_gcc_c_sequence:
+%(nano_link_gcc_c_sequence) --start-group %G %(nano_libc) %(nano_libgloss) --end-group
+
+*link:
+%(nano_link) %:replace-outfile(-lc -lc_nano) %:replace-outfile(-lg -lg_nano) %:replace-outfile(-lstdc++ -lstdc++_nano) %:replace-outfile(-lsupc++ -lsupc++_nano)
+
+*lib:
+%{!shared:%{g*:-lg_nano} %{!p:%{!pg:-lc_nano}}%{p:-lc_p}%{pg:-lc_p}}
+
diff --git a/libgloss/arc/nsim-syscall.h b/libgloss/arc/nsim-syscall.h
new file mode 100644
index 000000000..a2009f5b2
--- /dev/null
+++ b/libgloss/arc/nsim-syscall.h
@@ -0,0 +1,457 @@
+/*
+ Copyright (c) 2015, Synopsys, Inc. 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) Neither the name of the Synopsys, Inc., 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 HOLDER 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.
+*/
+
+#ifndef _ASM_ARC_UNISTD_H
+#define _ASM_ARC_UNISTD_H
+
+#include <stdint.h>
+
+#ifndef __ASSEMBLY__
+/* This file contains the system call numbers. Not all are implemented in nSIM
+ hostlink. Numbers correspond to the old ARCLinux syscalls, but during
+ upstreaming of ARC Linux, those numbers has been changed, hence today ARC
+ Linux and nSIM hostlink use different system call numbers. */
+
+#define SYS_exit 1
+#define SYS__exit SYS_exit
+#define SYS_fork 2
+#define SYS_read 3
+#define SYS_write 4
+#define SYS_open 5
+#define SYS_close 6
+#define SYS_waitpid 7
+#define SYS_creat 8
+#define SYS_link 9
+#define SYS_unlink 10
+#define SYS_execve 11
+#define SYS_chdir 12
+#define SYS_time 13
+#define SYS_mknod 14
+#define SYS_chmod 15
+#define SYS_chown 16
+#define SYS_break 17
+#define SYS_oldstat 18
+#define SYS_lseek 19
+#define SYS_getpid 20
+#define SYS_mount 21
+#define SYS_umount 22
+#define SYS_setuid 23
+#define SYS_getuid 24
+#define SYS_stime 25
+#define SYS_ptrace 26
+#define SYS_alarm 27
+#define SYS_oldfstat 28
+#define SYS_pause 29
+#define SYS_utime 30
+#define SYS_stty 31
+#define SYS_gtty 32
+#define SYS_access 33
+#define SYS_nice 34
+#define SYS_ftime 35
+#define SYS_sync 36
+#define SYS_kill 37
+#define SYS_rename 38
+#define SYS_mkdir 39
+#define SYS_rmdir 40
+#define SYS_dup 41
+#define SYS_pipe 42
+#define SYS_times 43
+#define SYS_prof 44
+#define SYS_brk 45
+#define SYS_setgid 46
+#define SYS_getgid 47
+#define SYS_signal 48
+#define SYS_geteuid 49
+#define SYS_getegid 50
+#define SYS_acct 51
+#define SYS_umount2 52
+#define SYS_lock 53
+#define SYS_ioctl 54
+#define SYS_fcntl 55
+#define SYS_mpx 56
+#define SYS_setpgid 57
+#define SYS_ulimit 58
+#define SYS_oldolduname 59
+#define SYS_umask 60
+#define SYS_chroot 61
+#define SYS_ustat 62
+#define SYS_dup2 63
+#define SYS_getppid 64
+#define SYS_getpgrp 65
+#define SYS_setsid 66
+#define SYS_sigaction 67
+#define SYS_sgetmask 68
+#define SYS_ssetmask 69
+#define SYS_setreuid 70
+#define SYS_setregid 71
+#define SYS_sigsuspend 72
+#define SYS_sigpending 73
+#define SYS_sethostname 74
+#define SYS_setrlimit 75
+#define SYS_old_getrlimit 76
+#define SYS_getrusage 77
+#define SYS_gettimeofday 78
+#define SYS_settimeofday 79
+#define SYS_getgroups 80
+#define SYS_setgroups 81
+#define SYS_select 82
+#define SYS_symlink 83
+#define SYS_oldlstat 84
+#define SYS_readlink 85
+#define SYS_uselib 86
+#define SYS_swapon 87
+#define SYS_reboot 88
+#define SYS_readdir 89
+#define SYS_mmap 90
+#define SYS_munmap 91
+#define SYS_truncate 92
+#define SYS_ftruncate 93
+#define SYS_fchmod 94
+#define SYS_fchown 95
+#define SYS_getpriority 96
+#define SYS_setpriority 97
+#define SYS_profil 98
+#define SYS_statfs 99
+#define SYS_fstatfs 100
+#define SYS_ioperm 101
+#define SYS_socketcall 102
+#define SYS_syslog 103
+#define SYS_setitimer 104
+#define SYS_getitimer 105
+#define SYS_stat 106
+#define SYS_lstat 107
+#define SYS_fstat 108
+#define SYS_olduname 109
+#define SYS_iopl 110 /* not supported */
+#define SYS_vhangup 111
+#define SYS_idle 112 /* Obsolete */
+#define SYS_vm86 113 /* not supported */
+#define SYS_wait4 114
+#define SYS_swapoff 115
+#define SYS_sysinfo 116
+#define SYS_ipc 117
+#define SYS_fsync 118
+#define SYS_sigreturn 119
+#define SYS_clone 120
+#define SYS_setdomainname 121
+#define SYS_uname 122
+#define SYS_cacheflush 123
+#define SYS_adjtimex 124
+#define SYS_mprotect 125
+#define SYS_sigprocmask 126
+#define SYS_create_module 127
+#define SYS_init_module 128
+#define SYS_delete_module 129
+#define SYS_get_kernel_syms 130
+#define SYS_quotactl 131
+#define SYS_getpgid 132
+#define SYS_fchdir 133
+#define SYS_bdflush 134
+#define SYS_sysfs 135
+#define SYS_personality 136
+#define SYS_afs_syscall 137 /* Syscall for Andrew File System */
+#define SYS_setfsuid 138
+#define SYS_setfsgid 139
+#define SYS__llseek 140
+#define SYS_getdents 141
+#define SYS__newselect 142
+#define SYS_flock 143
+#define SYS_msync 144
+#define SYS_readv 145
+#define SYS_writev 146
+#define SYS_getsid 147
+#define SYS_fdatasync 148
+#define SYS__sysctl 149
+#define SYS_mlock 150
+#define SYS_munlock 151
+#define SYS_mlockall 152
+#define SYS_munlockall 153
+#define SYS_sched_setparam 154
+#define SYS_sched_getparam 155
+#define SYS_sched_setscheduler 156
+#define SYS_sched_getscheduler 157
+#define SYS_sched_yield 158
+#define SYS_sched_get_priority_max 159
+#define SYS_sched_get_priority_min 160
+#define SYS_sched_rr_get_interval 161
+#define SYS_nanosleep 162
+#define SYS_mremap 163
+#define SYS_setresuid 164
+#define SYS_getresuid 165
+#define SYS_query_module 167
+#define SYS_poll 168
+#define SYS_nfsservctl 169
+#define SYS_setresgid 170
+#define SYS_getresgid 171
+#define SYS_prctl 172
+#define SYS_rt_sigreturn 173
+#define SYS_rt_sigaction 174
+#define SYS_rt_sigprocmask 175
+#define SYS_rt_sigpending 176
+#define SYS_rt_sigtimedwait 177
+#define SYS_rt_sigqueueinfo 178
+#define SYS_rt_sigsuspend 179
+#define SYS_pread 180
+#define SYS_pwrite 181
+#define SYS_lchown 182
+#define SYS_getcwd 183
+#define SYS_capget 184
+#define SYS_capset 185
+#define SYS_sigaltstack 186
+#define SYS_sendfile 187
+#define SYS_getpmsg 188 /* some people actually want streams */
+#define SYS_putpmsg 189 /* some people actually want streams */
+#define SYS_vfork 190
+#define SYS_getrlimit 191
+#define SYS_mmap2 192
+#define SYS_truncate64 193
+#define SYS_ftruncate64 194
+#define SYS_stat64 195
+#define SYS_lstat64 196
+#define SYS_fstat64 197
+#define SYS_chown32 198
+#define SYS_getuid32 199
+#define SYS_getgid32 200
+#define SYS_geteuid32 201
+#define SYS_getegid32 202
+#define SYS_setreuid32 203
+#define SYS_setregid32 204
+#define SYS_getgroups32 205
+#define SYS_setgroups32 206
+#define SYS_fchown32 207
+#define SYS_setresuid32 208
+#define SYS_getresuid32 209
+#define SYS_setresgid32 210
+#define SYS_getresgid32 211
+#define SYS_lchown32 212
+#define SYS_setuid32 213
+#define SYS_setgid32 214
+#define SYS_setfsuid32 215
+#define SYS_setfsgid32 216
+#define SYS_pivot_root 217
+#define SYS_getdents64 220
+#define SYS_fcntl64 221
+#define SYS_gettid 224
+
+#endif /* ! __ASSEMBLY__ */
+
+#ifdef __ARC700__
+#define SYSCALL \
+ "trap0 \n\t"
+#else
+#define SYSCALL \
+ "swi \n\t"\
+ "nop \n\t"\
+ "nop \n\t"
+#endif /* __ARC700__ */
+
+/* There are two variants of macroses here:
+ - _syscall is a complete function definition of system call
+ - _naked_syscall only invokes system call and can be inserted into other
+ functions. This macro is defined only for those syscall<N>, where it is
+ actually used. */
+
+#define _syscall0(type, name) \
+type _##name () \
+{ \
+ long __res; \
+ __asm__ __volatile__ ("mov r8, %1\n\t" \
+ SYSCALL \
+ "mov %0, r0" \
+ : "=r" (__res) \
+ : "i" (SYS_##name) \
+ : "cc", "r0", "r8"); \
+ if ((unsigned long)(__res) >= (unsigned long)(-125)) { \
+ errno = -__res; \
+ __res = -1; \
+ } \
+ return (type)__res; \
+}
+
+#define _syscall1(type, name, atype, a) \
+type _##name (atype a) \
+{ \
+ long __res; \
+ __asm__ __volatile__ ("mov r0, %2\n\t" \
+ "mov r8, %1\n\t" \
+ SYSCALL \
+ "mov %0, r0" \
+ : "=r" (__res) \
+ : "i" (SYS_##name), \
+ "r" ((long)a) \
+ : "cc", "r0", "r8"); \
+ if ((unsigned long)(__res) >= (unsigned long)(-125)) { \
+ errno = -__res; \
+ __res = -1; \
+ } \
+ return (type)__res; \
+}
+
+#define _naked_syscall2(__res, name, a, b) \
+ __asm__ __volatile__ ("mov r1, %3\n\t" \
+ "mov r0, %2\n\t" \
+ "mov r8, %1\n\t" \
+ SYSCALL \
+ "mov %0, r0" \
+ : "=r" (__res) \
+ : "i" (SYS_##name), \
+ "r" ((long)a), \
+ "r" ((long)b) \
+ : "cc", "r0", "r1", "r8"); \
+ if ((unsigned long)(__res) >= (unsigned long)(-125)) { \
+ errno = -__res; \
+ __res = -1; \
+ }
+
+#define _syscall2(type, name, atype, a, btype, b) \
+type _##name (atype a, btype b) \
+{ \
+ long __res; \
+ _naked_syscall2 (__res, name, a, b) \
+ return (type)__res; \
+}
+
+#define _naked_syscall3(__res, name, a, b, c) \
+ __asm__ __volatile__ ( \
+ "mov r2, %4\n\t" \
+ "mov r1, %3\n\t" \
+ "mov r0, %2\n\t" \
+ "mov r8, %1\n\t" \
+ SYSCALL \
+ "mov %0, r0" \
+ : "=r" (__res) \
+ : "i" (SYS_##name), \
+ "r" ((long)a), \
+ "r" ((long)b), \
+ "r" ((long)c) \
+ : "cc", "r0", "r1", "r2", "r8"); \
+ if ((unsigned long)(__res) >= (unsigned long)(-125)) { \
+ errno = -__res; \
+ __res = -1; \
+ }
+
+#define _syscall3(type,name,atype,a,btype,b,ctype,c) \
+type _##name (atype a, btype b, ctype c) \
+{ \
+ long __res; \
+ _naked_syscall3 (__res, name, a, b, c) \
+ return (type)__res; \
+}
+
+#define _syscall4(type, name, atype, a, btype, b, ctype, c, dtype, d) \
+type _##name (atype a, btype b, ctype c, dtype d) \
+{ \
+ long __res; \
+ __asm__ __volatile__ ( \
+ "mov r3, %5\n\t" \
+ "mov r2, %4\n\t" \
+ "mov r1, %3\n\t" \
+ "mov r0, %2\n\t" \
+ "mov r8, %1\n\t" \
+ SYSCALL \
+ "mov %0, r0" \
+ : "=r" (__res) \
+ : "i" (SYS_##name), \
+ "r" ((long)a), \
+ "r" ((long)b), \
+ "r" ((long)c), \
+ "r" ((long)d) \
+ : "cc", "r0", "r1", "r2", "r3", "r8"); \
+ if ((unsigned long)(__res) >= (unsigned long)(-125)) { \
+ errno = -__res; \
+ __res = -1; \
+ } \
+ return (type)__res; \
+}
+
+#define _syscall5(type, name, atype, a, btype, b, ctype, c, dtype, d, \
+ etype, e) \
+type _##name (atype a, btype b, ctype c, dtype d, etype e) \
+{ \
+ long __res; \
+ __asm__ __volatile__ ( \
+ "mov r4, %6\n\t" \
+ "mov r3, %5\n\t" \
+ "mov r2, %4\n\t" \
+ "mov r1, %3\n\t" \
+ "mov r0, %2\n\t" \
+ "mov r8, %1\n\t" \
+ SYSCALL \
+ "mov %0, r0" \
+ : "=r" (__res) \
+ : "i" (SYS_##name), \
+ "r" ((long)a), \
+ "r" ((long)b), \
+ "r" ((long)c), \
+ "r" ((long)d), \
+ "r" ((long)e) \
+ : "cc", "r0", "r1", "r2", "r3", "r4", "r8"); \
+ if ((unsigned long)(__res) >= (unsigned long)(-125)) { \
+ errno = -__res; \
+ __res = -1; \
+ } \
+ return (type)__res; \
+}
+
+/* open() flags that are used by nSIM hostlink. See comment for _open()
+ implementation in nsim-syscalls.c. */
+#define ARC_LINUX_RDONLY 0
+#define ARC_LINUX_WRONLY 1
+#define ARC_LINUX_RDWR 2
+#define ARC_LINUX_CREAT 0x0040
+#define ARC_LINUX_APPEND 0x0400
+#define ARC_LINUX_TRUNC 0x0200
+#define ARC_LINUX_EXCL 0x0080
+
+/* stat structure as defined in nSIM hostlink. */
+struct nsim_stat {
+ uint16_t dev;
+ uint16_t __pad1;
+ uint32_t ino;
+ uint16_t mode;
+ uint16_t nlink;
+ uint16_t uid;
+ uint16_t gid;
+ uint16_t rdev;
+ uint16_t __pad2;
+ uint32_t size;
+ uint32_t blksize;
+ uint32_t blocks;
+ uint32_t atime;
+ uint32_t __unused1;
+ uint32_t mtime;
+ uint32_t __unused2;
+ uint32_t ctime;
+ uint32_t __unused3;
+ uint32_t __unused4;
+ uint32_t __unused5;
+};
+
+#endif /* _ASM_ARC_UNISTD_H */
diff --git a/libgloss/arc/nsim-syscalls.c b/libgloss/arc/nsim-syscalls.c
new file mode 100644
index 000000000..7dd0af10f
--- /dev/null
+++ b/libgloss/arc/nsim-syscalls.c
@@ -0,0 +1,235 @@
+/*
+ Copyright (c) 2015, Synopsys, Inc. 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) Neither the name of the Synopsys, Inc., 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 HOLDER 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 <_syslist.h>
+#include <errno.h>
+#include <sys/fcntl.h>
+#include <sys/stat.h>
+#include <sys/time.h>
+#include <sys/times.h>
+#include <sys/types.h>
+
+#include "glue.h"
+#include "nsim-syscall.h"
+
+/* Those system calls are implemented in both nSIM and CGEN. */
+_syscall3 (_ssize_t, read, int, fd, void *, buf, size_t, count)
+_syscall3 (_ssize_t, write, int, fd, const void *, buf, size_t, count)
+_syscall1 (int, unlink, const char *, pathname)
+_syscall3 (off_t, lseek, int, fd, off_t, offset, int, whence)
+_syscall2 (int, gettimeofday, struct timeval *, tv, void *, tz)
+_syscall1 (_CLOCK_T_, time, _CLOCK_T_ *, t)
+_syscall1 (int, close, int, fd)
+_syscall1 (_CLOCK_T_, times, struct tms *, buf)
+/* stat requires custom implementation. */
+/* _syscall2 (int, stat, const char *, path, struct stat *, st)
+ _syscall2 (int, fstat, int, file, struct stat *, st) */
+/* nSIM implements brk and sbrk, but instead sbrk.c is used. */
+/* _syscall1 (int, brk, void *, addr) */
+/* open requires custom implementation. */
+/* _syscall3 (int, open, const char *, pathname, int, flags, int, mode) */
+
+/* Those syscalls are not available in CGEN simulator. */
+_syscall1 (int, rmdir, const char *, pathname)
+_syscall2 (char *, getcwd, char *, buf, size_t, size)
+/* stat requires custom implementation. */
+/* _syscall2 (int, lstat, const char *, path, struct stat *, st) */
+
+/* Historically "open" flags defined by default in newlib and in Linux for ARC
+ are different - this is true for some other architectures as well, e.g.
+ ARM. To provide compatibility ARC port of newlib had a custom fcntl.h file
+ that has "open" flags identical to Linux ones. Some other architectures
+ (spart64, cris) override default fcntl.h as well, but I'm not sure this is
+ really a good idea. Unlike system call numbers that can be unique to each
+ BSP in libgloss, "open" flags are not abstracted from the application code
+ itself, hence it is not possible to have fcntl.h in the libgloss. To make
+ matters worse, existing simulators already has been built for the Linux-like
+ "open" flags. To preserve compatibility with existing hostlink
+ implementations in simulators, but avoid custom fcntl.h in the future,
+ simulator BSP has to do dynamic rewriting of "open" flags from the newlib
+ default into old ARC Linux flags. Simulators support only most basic flags,
+ therefore only those are translated in this implementation. */
+int
+_open (const char * pathname, int flags, int mode)
+{
+ int nsim_flags = 0;
+
+ /* RDONLY, WRONLY, RDWR are same as newlib default. */
+ nsim_flags |= flags & O_RDONLY;
+ nsim_flags |= flags & O_WRONLY;
+ nsim_flags |= flags & O_RDWR;
+ nsim_flags |= (flags & O_CREAT) ? ARC_LINUX_CREAT : 0;
+ nsim_flags |= (flags & O_APPEND) ? ARC_LINUX_APPEND : 0;
+ nsim_flags |= (flags & O_TRUNC) ? ARC_LINUX_TRUNC : 0;
+ nsim_flags |= (flags & O_EXCL) ? ARC_LINUX_EXCL : 0;
+ /* There are other fcntl flags that are different between newlib and ARC
+ uClibc, however they are not supported by nSIM hostlink, therefore there
+ is no need to translate them. */
+
+ long __res;
+ _naked_syscall3 (__res, open, pathname, nsim_flags, mode)
+ return __res;
+}
+
+/* Should be provided by crt0.S. */
+extern void __attribute__((noreturn)) _exit_halt ();
+
+void
+__attribute__((noreturn))
+_exit (int ret)
+{
+ /* Doing an "exit" system call would work on nSIM with hostlink, but call to
+ _exit_halt, which will do a CPU halt is more universal and will work in
+ many other cases as well, including an FPGA/SoC. */
+ _exit_halt ();
+}
+
+/* This is a copy of newlib/libc/posix/_isatty.c. It is needed because nSIM
+ hostlink doesn't implement isatty system call. Hardware boards on the other
+ hand would want isatty implementation that always returns 1, since they are
+ connected to console and doesn't have file IO. */
+int
+_isatty (int fd)
+{
+ struct stat buf;
+
+ if (fstat (fd, &buf) < 0)
+ {
+ errno = EBADF;
+ return 0;
+ }
+ if (S_ISCHR (buf.st_mode))
+ {
+ return 1;
+ }
+ errno = ENOTTY;
+ return 0;
+}
+
+/* System call "getpid" is implemented in nSIM hostlink, but it is better not
+ to expose it in libgloss. */
+int
+_getpid (void)
+{
+ return __MYPID;
+}
+
+/* System call "kill" is implemented in nSIM hostlink on Linux hosts, but it
+ seems dangerous to expose it. Instead, like most of the other "_kill"
+ implementations in libgloss, this will kill only self. */
+int
+_kill (int pid, int sig)
+{
+ if (pid == __MYPID)
+ {
+ _exit (sig);
+ }
+ errno = ENOSYS;
+ return -1;
+}
+
+static void
+translate_stat (struct nsim_stat *nsim, struct stat *buf)
+{
+ #define TR(field, type) buf->st_ ## field = (type) nsim->field
+ TR (dev, dev_t);
+ TR (ino, ino_t);
+ TR (mode, mode_t);
+ TR (nlink, nlink_t);
+ TR (uid, uid_t);
+ TR (gid, gid_t);
+ TR (rdev, dev_t);
+ TR (size, off_t);
+ TR (atime, time_t);
+ TR (mtime, time_t);
+ TR (ctime, time_t);
+ TR (blksize, long);
+ TR (blocks, long);
+ #undef TR
+}
+
+/* stat/fstat implementation. Situation is similiar to open and its flags -
+ structure is defined in libc, hence cannot be customized in libgloss, yet we
+ have a case where nSIM uses some definition which is not compatible with
+ neither old ARC-custom definition of "struct stat" in newlib, nor with
+ generic newlib implementation. */
+int
+_stat (const char * path, struct stat *buf)
+{
+ struct nsim_stat nsim_stat;
+ long __res;
+ _naked_syscall2 (__res, stat, path, &nsim_stat)
+ translate_stat (&nsim_stat, buf);
+ return __res;
+}
+
+int
+_lstat (const char * path, struct stat *buf)
+{
+ struct nsim_stat nsim_stat;
+ long __res;
+ _naked_syscall2 (__res, stat, path, &nsim_stat)
+ translate_stat (&nsim_stat, buf);
+ return __res;
+}
+
+int
+_fstat (int fd, struct stat *buf)
+{
+ struct nsim_stat nsim_stat;
+ long __res;
+ _naked_syscall2 (__res, stat, fd, &nsim_stat)
+ translate_stat (&nsim_stat, buf);
+ return __res;
+}
+
+/* Some system calls are implemented in nSIM hostlink, but are available only
+ on Linux hosts. To minimize potential compatibility issues they are by
+ default disabled in libgloss build. */
+#ifdef ARC_NSIM_WIN32_HOST
+_syscall3 (int, ioctl, int, fd, int, request, char *, argp)
+_syscall3 (_ssize_t, readv, int, fd, const struct iovec *, iov, int, iovcnt)
+_syscall3 (_ssize_t, writev, int, fd, const struct iovec *, iov, int, iovcnt)
+_syscall5 (off_t, llseek, int, fd, unsigned long, offset_high,
+ unsigned long, offset_low, loff_t *, result,
+ unsigned int, whence)
+_syscall2 (int, getrusage, int, who, struct rusage *, usage)
+_syscall2 (int, setrlimit, int, resource, const struct rlimit *, rlim)
+_syscall2 (int, getrlimit, int, resource, struct rlimit *, rlim)
+_syscall3 (int, sigaction, int signum, const struct sigaction *, act,
+ struct sigaction *, oldact)
+_syscall0 (uid_t, getuid)
+_syscall0 (gid_t, getgid)
+_syscall0 (uid_t, geteuid)
+_syscall0 (gid_t, getegid)
+_syscall2 (int, kill, pid_t, pid, int, sig)
+_syscall3 (_ssize_t, readlink, const char *, path, char *, buf, size_t, bufsize)
+#endif
diff --git a/libgloss/arc/nsim.specs b/libgloss/arc/nsim.specs
new file mode 100644
index 000000000..508bdb24e
--- /dev/null
+++ b/libgloss/arc/nsim.specs
@@ -0,0 +1,11 @@
+%rename link_gcc_c_sequence nsim_link_gcc_c_sequence
+
+*nsim_libgloss:
+-lnsim
+
+*nsim_libc:
+%{!specs=nano.specs:-lc} %{specs=nano.specs:-lc_nano}
+
+*link_gcc_c_sequence:
+%(nsim_link_gcc_c_sequence) --start-group %G %(nsim_libc) %(nsim_libgloss) --end-group
+
diff --git a/libgloss/arc/sbrk.c b/libgloss/arc/sbrk.c
new file mode 100644
index 000000000..8cb8461dd
--- /dev/null
+++ b/libgloss/arc/sbrk.c
@@ -0,0 +1,61 @@
+/*
+ Copyright (c) 2015, Synopsys, Inc. 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) Neither the name of the Synopsys, Inc., 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 HOLDER 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 <sys/types.h>
+#include <sys/errno.h>
+
+extern char __start_heap;
+extern char __end_heap;
+
+caddr_t
+_sbrk (size_t nbytes)
+{
+ static char* heap_ptr = NULL;
+ char* prev_heap_ptr;
+
+ if (heap_ptr == NULL)
+ {
+ heap_ptr = &__start_heap;
+ }
+
+ /* Align the 'heap_ptr' so that memory will always be allocated at word
+ boundaries. */
+ heap_ptr = (char *) ((((unsigned long) heap_ptr) + 7) & ~7);
+ prev_heap_ptr = heap_ptr;
+
+ if ((heap_ptr + nbytes) < &__end_heap)
+ {
+ heap_ptr += nbytes;
+ return (caddr_t) prev_heap_ptr;
+ }
+
+ errno = ENOMEM;
+ return (caddr_t) -1;
+}
diff --git a/libgloss/arm/Makefile.in b/libgloss/arm/Makefile.in
index 3fb723648..3f87deae2 100644
--- a/libgloss/arm/Makefile.in
+++ b/libgloss/arm/Makefile.in
@@ -41,6 +41,8 @@ AR = @AR@
LD = @LD@
RANLIB = @RANLIB@
+SUBDIRS = @subdirs@
+
OBJDUMP = `if [ -f ${objroot}/../binutils/objdump ] ; \
then echo ${objroot}/../binutils/objdump ; \
else t='$(program_transform_name)'; echo objdump | sed -e $$t ; fi`
@@ -50,8 +52,11 @@ OBJCOPY = `if [ -f ${objroot}/../binutils/objcopy ] ; \
@BUILD_CRT0_TRUE@CRT0 = crt0.o
@BUILD_CRT0_TRUE@CRT0_INSTALL = install-crt0
-@BUILD_CRT0_FALSE@CRT0 =
-@BUILD_CRT0_FALSE@CRT0_INSTALL =
+@BUILD_CRT0_FALSE@CRT0 =
+@BUILD_CRT0_FALSE@CRT0_INSTALL =
+
+NANO_SCRIPTS=nano.specs
+NANO_INSTALL=install-nano
LINUX_CRT0 = linux-crt0.o
LINUX_BSP = libgloss-linux.a
@@ -66,14 +71,14 @@ REDBOOT_INSTALL = install-redboot
RDPMON_CRT0 = rdpmon-crt0.o
RDPMON_BSP = librdpmon.a
-RDPMON_OBJS = syscalls.o libcfunc.o trap.o _exit.o _kill.o
+RDPMON_OBJS = ftruncate.o libcfunc.o syscalls.o trap.o truncate.o _exit.o _kill.o
RDPMON_SCRIPTS = rdpmon.specs
RDPMON_INSTALL = install-rdpmon
RDIMON_CRT0 = rdimon-crt0.o
RDIMON_BSP = librdimon.a
RDIMON_OBJS = $(patsubst %,rdimon-%,$(RDPMON_OBJS))
-RDIMON_SCRIPTS = rdimon.specs
+RDIMON_SCRIPTS = rdimon.specs aprofile-validation.specs aprofile-ve.specs
RDIMON_INSTALL = install-rdimon
CFLAGS = -g
@@ -89,11 +94,22 @@ IQ80310_INSTALL = install-iq80310
# Host specific makefile fragment comes in here.
@host_makefile_frag@
+INCLUDES += `if [ -d ${objroot}/newlib ]; then echo -I$(srcroot)/newlib/libc/machine/arm; fi`
+
#
# build a test program for each target board. Just trying to get
# it to link is a good test, so we ignore all the errors for now.
#
all: ${CRT0} ${LINUX_CRT0} ${LINUX_BSP} ${REDBOOT_CRT0} ${REDBOOT_OBJS} ${RDPMON_CRT0} ${RDPMON_BSP} ${RDIMON_CRT0} ${RDIMON_BSP}
+ @rootpre=`pwd`/; export rootpre; \
+ srcrootpre=`cd $(srcdir); pwd`/; export srcrootpre; \
+ for dir in .. ${SUBDIRS}; do \
+ if [ x$$dir != x.. ]; then \
+ if [ -d $$dir ]; then \
+ (cd $$dir; $(MAKE) $(FLAGS_TO_PASS)); \
+ else true; fi; \
+ else true; fi; \
+ done
#
# here's where we build the test programs for each target
@@ -112,9 +128,15 @@ rdpmon-crt0.o: crt0.S
rdimon-crt0.o: crt0.S
$(CC) $(CFLAGS_FOR_TARGET) $(CFLAGS) $(INCLUDES) -DARM_RDI_MONITOR -o $@ -c $<
+rdimon-ftruncate.o: ftruncate.c
+ $(CC) $(CFLAGS_FOR_TARGET) $(CFLAGS) $(INCLUDES) -DARM_RDI_MONITOR -o $@ -c $<
+
rdimon-trap.o: trap.S
$(CC) $(CFLAGS_FOR_TARGET) $(CFLAGS) $(INCLUDES) -DARM_RDI_MONITOR -o $@ -c $<
+rdimon-truncate.o: truncate.c
+ $(CC) $(CFLAGS_FOR_TARGET) $(CFLAGS) $(INCLUDES) -DARM_RDI_MONITOR -o $@ -c $<
+
rdimon-_exit.o: _exit.c
$(CC) $(CFLAGS_FOR_TARGET) $(CFLAGS) $(INCLUDES) -DARM_RDI_MONITOR -o $@ -c $<
@@ -141,12 +163,33 @@ $(RDIMON_BSP): $(RDIMON_OBJS)
clean mostlyclean:
rm -f a.out core *.i *.o *-test *.srec *.dis *.x $(SIM_BSP) $(IQ80310_BSP)
+ @rootpre=`pwd`/; export rootpre; \
+ srcrootpre=`cd $(srcdir); pwd`/; export srcrootpre; \
+ for dir in .. ${SUBDIRS}; do \
+ if [ x$$dir != x.. ]; then \
+ if [ -d $$dir ]; then \
+ (cd $$dir; $(MAKE) $(FLAGS_TO_PASS) clean); \
+ else true; fi; \
+ else true; fi; \
+ done
distclean maintainer-clean realclean: clean
rm -f Makefile config.status *~
.PHONY: install info install-info clean-info
-install: ${CRT0_INSTALL} ${LINUX_INSTALL} ${REDBOOT_INSTALL} ${RDPMON_INSTALL} ${RDIMON_INSTALL} ${IQ80310_INSTALL} ${PID_INSTALL}
+install: ${CRT0_INSTALL} ${LINUX_INSTALL} ${REDBOOT_INSTALL} ${RDPMON_INSTALL} ${RDIMON_INSTALL} ${IQ80310_INSTALL} ${PID_INSTALL} ${NANO_INSTALL}
+ @rootpre=`pwd`/; export rootpre; \
+ srcrootpre=`cd $(srcdir); pwd`/; export srcrootpre; \
+ for dir in .. ${SUBDIRS}; do \
+ if [ x$$dir != x.. ]; then \
+ if [ -d $$dir ]; then \
+ (cd $$dir; $(MAKE) $(FLAGS_TO_PASS) install); \
+ else true; fi; \
+ else true; fi; \
+ done
+
+install-nano:
+ set -e; for x in ${NANO_SCRIPTS}; do ${INSTALL_DATA} ${srcdir}/${objtype}$$x $(DESTDIR)${tooldir}/lib${MULTISUBDIR}/$$x; done
install-crt0:
${INSTALL_DATA} ${CRT0} $(DESTDIR)${tooldir}/lib${MULTISUBDIR}/$$x
diff --git a/libgloss/arm/arm.h b/libgloss/arm/arm.h
index 26a1ff110..0489f2d92 100644
--- a/libgloss/arm/arm.h
+++ b/libgloss/arm/arm.h
@@ -29,25 +29,27 @@
#ifndef _LIBGLOSS_ARM_H
#define _LIBGLOSS_ARM_H
-/* __thumb2__ stands for thumb on armva7(A/R/M/EM) architectures,
- __ARM_ARCH_6M__ stands for armv6-M(thumb only) architecture,
- __ARM_ARCH_7M__ stands for armv7-M(thumb only) architecture.
- __ARM_ARCH_7EM__ stands for armv7e-M(thumb only) architecture.
- There are some macro combinations used many times in libgloss/arm,
- like (__thumb2__ || (__thumb__ && __ARM_ARCH_6M__)), so factor
- it out and use THUMB_V7_V6M instead, which stands for thumb on
- v6-m/v7 arch as the combination does. */
-#if defined(__thumb2__) || (defined(__thumb__) && defined(__ARM_ARCH_6M__))
-# define THUMB_V7_V6M
+#include "acle-compat.h"
+
+/* Checking for targets supporting only Thumb instructions (eg. ARMv6-M) or
+ supporting Thumb-2 instructions, whether ARM instructions are available or
+ not, is done many times in libgloss/arm. So factor it out and use
+ PREFER_THUMB instead. */
+#if __thumb2__ || (__thumb__ && !__ARM_ARCH_ISA_ARM)
+# define PREFER_THUMB
+#endif
+
+/* Processor only capable of executing Thumb-1 instructions. */
+#if __ARM_ARCH_ISA_THUMB == 1 && !__ARM_ARCH_ISA_ARM
+# define THUMB1_ONLY
#endif
-/* The (__ARM_ARCH_7EM__ || __ARM_ARCH_7M__ || __ARM_ARCH_6M__) combination
- stands for cortex-M profile architectures, which don't support ARM state.
- Factor it out and use THUMB_V7M_V6M instead. */
-#if defined(__ARM_ARCH_7M__) \
- || defined(__ARM_ARCH_7EM__) \
- || defined(__ARM_ARCH_6M__)
-# define THUMB_V7M_V6M
+/* M profile architectures. This is a different set of architectures than
+ those not having ARM ISA because it does not contain ARMv7. This macro is
+ necessary to test which architectures use bkpt as semihosting interface from
+ architectures using svc. */
+#if !__ARM_ARCH_ISA_ARM && !__ARM_ARCH_7__
+# define THUMB_VXM
#endif
/* Defined if this target supports the BLX Rm instruction. */
diff --git a/libgloss/arm/configure b/libgloss/arm/configure
index 4c316a107..93c2b2746 100644
--- a/libgloss/arm/configure
+++ b/libgloss/arm/configure
@@ -1,60 +1,83 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.61.
+# Generated by GNU Autoconf 2.68.
+#
#
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
-# 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
+# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software
+# Foundation, Inc.
+#
+#
# This configure script is free software; the Free Software Foundation
# gives unlimited permission to copy, distribute and modify it.
-## --------------------- ##
-## M4sh Initialization. ##
-## --------------------- ##
+## -------------------- ##
+## M4sh Initialization. ##
+## -------------------- ##
# Be more Bourne compatible
DUALCASE=1; export DUALCASE # for MKS sh
-if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
emulate sh
NULLCMD=:
- # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
+ # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
# is contrary to our usage. Disable this feature.
alias -g '${1+"$@"}'='"$@"'
setopt NO_GLOB_SUBST
else
- case `(set -o) 2>/dev/null` in
- *posix*) set -o posix ;;
+ case `(set -o) 2>/dev/null` in #(
+ *posix*) :
+ set -o posix ;; #(
+ *) :
+ ;;
esac
-
fi
-
-
-# PATH needs CR
-# Avoid depending upon Character Ranges.
-as_cr_letters='abcdefghijklmnopqrstuvwxyz'
-as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
-as_cr_Letters=$as_cr_letters$as_cr_LETTERS
-as_cr_digits='0123456789'
-as_cr_alnum=$as_cr_Letters$as_cr_digits
-
-# The user is always right.
-if test "${PATH_SEPARATOR+set}" != set; then
- echo "#! /bin/sh" >conf$$.sh
- echo "exit 0" >>conf$$.sh
- chmod +x conf$$.sh
- if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
- PATH_SEPARATOR=';'
+as_nl='
+'
+export as_nl
+# Printing a long string crashes Solaris 7 /usr/bin/printf.
+as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
+as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
+as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
+# Prefer a ksh shell builtin over an external printf program on Solaris,
+# but without wasting forks for bash or zsh.
+if test -z "$BASH_VERSION$ZSH_VERSION" \
+ && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
+ as_echo='print -r --'
+ as_echo_n='print -rn --'
+elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
+ as_echo='printf %s\n'
+ as_echo_n='printf %s'
+else
+ if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
+ as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
+ as_echo_n='/usr/ucb/echo -n'
else
- PATH_SEPARATOR=:
+ as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
+ as_echo_n_body='eval
+ arg=$1;
+ case $arg in #(
+ *"$as_nl"*)
+ expr "X$arg" : "X\\(.*\\)$as_nl";
+ arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
+ esac;
+ expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
+ '
+ export as_echo_n_body
+ as_echo_n='sh -c $as_echo_n_body as_echo'
fi
- rm -f conf$$.sh
+ export as_echo_body
+ as_echo='sh -c $as_echo_body as_echo'
fi
-# Support unset when possible.
-if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
- as_unset=unset
-else
- as_unset=false
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+ PATH_SEPARATOR=:
+ (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
+ (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
+ PATH_SEPARATOR=';'
+ }
fi
@@ -63,20 +86,19 @@ fi
# there to prevent editors from complaining about space-tab.
# (If _AS_PATH_WALK were called with IFS unset, it would disable word
# splitting by setting IFS to empty value.)
-as_nl='
-'
IFS=" "" $as_nl"
# Find who we are. Look in the path if we contain no directory separator.
-case $0 in
+as_myself=
+case $0 in #((
*[\\/]* ) as_myself=$0 ;;
*) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
- test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
-done
+ test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
+ done
IFS=$as_save_IFS
;;
@@ -87,354 +109,327 @@ if test "x$as_myself" = x; then
as_myself=$0
fi
if test ! -f "$as_myself"; then
- echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
- { (exit 1); exit 1; }
+ $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
+ exit 1
fi
-# Work around bugs in pre-3.0 UWIN ksh.
-for as_var in ENV MAIL MAILPATH
-do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
+# Unset variables that we do not need and which cause bugs (e.g. in
+# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
+# suppresses any "Segmentation fault" message there. '((' could
+# trigger a bug in pdksh 5.2.14.
+for as_var in BASH_ENV ENV MAIL MAILPATH
+do eval test x\${$as_var+set} = xset \
+ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
done
PS1='$ '
PS2='> '
PS4='+ '
# NLS nuisances.
-for as_var in \
- LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
- LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
- LC_TELEPHONE LC_TIME
-do
- if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
- eval $as_var=C; export $as_var
- else
- ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
- fi
-done
-
-# Required to use basename.
-if expr a : '\(a\)' >/dev/null 2>&1 &&
- test "X`expr 00001 : '.*\(...\)'`" = X001; then
- as_expr=expr
-else
- as_expr=false
-fi
-
-if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
- as_basename=basename
-else
- as_basename=false
-fi
-
-
-# Name of the executable.
-as_me=`$as_basename -- "$0" ||
-$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
- X"$0" : 'X\(//\)$' \| \
- X"$0" : 'X\(/\)' \| . 2>/dev/null ||
-echo X/"$0" |
- sed '/^.*\/\([^/][^/]*\)\/*$/{
- s//\1/
- q
- }
- /^X\/\(\/\/\)$/{
- s//\1/
- q
- }
- /^X\/\(\/\).*/{
- s//\1/
- q
- }
- s/.*/./; q'`
+LC_ALL=C
+export LC_ALL
+LANGUAGE=C
+export LANGUAGE
# CDPATH.
-$as_unset CDPATH
-
+(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
if test "x$CONFIG_SHELL" = x; then
- if (eval ":") 2>/dev/null; then
- as_have_required=yes
+ as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
+ emulate sh
+ NULLCMD=:
+ # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
+ # is contrary to our usage. Disable this feature.
+ alias -g '\${1+\"\$@\"}'='\"\$@\"'
+ setopt NO_GLOB_SUBST
else
- as_have_required=no
+ case \`(set -o) 2>/dev/null\` in #(
+ *posix*) :
+ set -o posix ;; #(
+ *) :
+ ;;
+esac
fi
-
- if test $as_have_required = yes && (eval ":
-(as_func_return () {
- (exit \$1)
-}
-as_func_success () {
- as_func_return 0
-}
-as_func_failure () {
- as_func_return 1
-}
-as_func_ret_success () {
- return 0
-}
-as_func_ret_failure () {
- return 1
-}
+"
+ as_required="as_fn_return () { (exit \$1); }
+as_fn_success () { as_fn_return 0; }
+as_fn_failure () { as_fn_return 1; }
+as_fn_ret_success () { return 0; }
+as_fn_ret_failure () { return 1; }
exitcode=0
-if as_func_success; then
- :
-else
- exitcode=1
- echo as_func_success failed.
-fi
-
-if as_func_failure; then
- exitcode=1
- echo as_func_failure succeeded.
-fi
+as_fn_success || { exitcode=1; echo as_fn_success failed.; }
+as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
+as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
+as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
+if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
-if as_func_ret_success; then
- :
else
- exitcode=1
- echo as_func_ret_success failed.
+ exitcode=1; echo positional parameters were not saved.
fi
-
-if as_func_ret_failure; then
- exitcode=1
- echo as_func_ret_failure succeeded.
-fi
-
-if ( set x; as_func_ret_success y && test x = \"\$1\" ); then
- :
+test x\$exitcode = x0 || exit 1"
+ as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
+ as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
+ eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
+ test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1"
+ if (eval "$as_required") 2>/dev/null; then :
+ as_have_required=yes
else
- exitcode=1
- echo positional parameters were not saved.
+ as_have_required=no
fi
+ if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
-test \$exitcode = 0) || { (exit 1); exit 1; }
-
-(
- as_lineno_1=\$LINENO
- as_lineno_2=\$LINENO
- test \"x\$as_lineno_1\" != \"x\$as_lineno_2\" &&
- test \"x\`expr \$as_lineno_1 + 1\`\" = \"x\$as_lineno_2\") || { (exit 1); exit 1; }
-") 2> /dev/null; then
- :
-else
- as_candidate_shells=
- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+else
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+as_found=false
for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
- case $as_dir in
+ as_found=:
+ case $as_dir in #(
/*)
for as_base in sh bash ksh sh5; do
- as_candidate_shells="$as_candidate_shells $as_dir/$as_base"
+ # Try only shells that exist, to save several forks.
+ as_shell=$as_dir/$as_base
+ if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
+ { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
+ CONFIG_SHELL=$as_shell as_have_required=yes
+ if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
+ break 2
+fi
+fi
done;;
esac
+ as_found=false
done
+$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
+ { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
+ CONFIG_SHELL=$SHELL as_have_required=yes
+fi; }
IFS=$as_save_IFS
- for as_shell in $as_candidate_shells $SHELL; do
- # Try only shells that exist, to save several forks.
- if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
- { ("$as_shell") 2> /dev/null <<\_ASEOF
-if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
- emulate sh
- NULLCMD=:
- # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
- # is contrary to our usage. Disable this feature.
- alias -g '${1+"$@"}'='"$@"'
- setopt NO_GLOB_SUBST
-else
- case `(set -o) 2>/dev/null` in
- *posix*) set -o posix ;;
-esac
-
+ if test "x$CONFIG_SHELL" != x; then :
+ # We cannot yet assume a decent shell, so we have to provide a
+ # neutralization value for shells without unset; and this also
+ # works around shells that cannot unset nonexistent variables.
+ # Preserve -v and -x to the replacement shell.
+ BASH_ENV=/dev/null
+ ENV=/dev/null
+ (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
+ export CONFIG_SHELL
+ case $- in # ((((
+ *v*x* | *x*v* ) as_opts=-vx ;;
+ *v* ) as_opts=-v ;;
+ *x* ) as_opts=-x ;;
+ * ) as_opts= ;;
+ esac
+ exec "$CONFIG_SHELL" $as_opts "$as_myself" ${1+"$@"}
fi
-
-:
-_ASEOF
-}; then
- CONFIG_SHELL=$as_shell
- as_have_required=yes
- if { "$as_shell" 2> /dev/null <<\_ASEOF
-if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
- emulate sh
- NULLCMD=:
- # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
- # is contrary to our usage. Disable this feature.
- alias -g '${1+"$@"}'='"$@"'
- setopt NO_GLOB_SUBST
-else
- case `(set -o) 2>/dev/null` in
- *posix*) set -o posix ;;
-esac
-
+ if test x$as_have_required = xno; then :
+ $as_echo "$0: This script requires a shell more modern than all"
+ $as_echo "$0: the shells that I found on your system."
+ if test x${ZSH_VERSION+set} = xset ; then
+ $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
+ $as_echo "$0: be upgraded to zsh 4.3.4 or later."
+ else
+ $as_echo "$0: Please tell bug-autoconf@gnu.org about your system,
+$0: including any error possibly output before this
+$0: message. Then install a modern shell, or manually run
+$0: the script under such a shell if you do have one."
+ fi
+ exit 1
fi
+fi
+fi
+SHELL=${CONFIG_SHELL-/bin/sh}
+export SHELL
+# Unset more variables known to interfere with behavior of common tools.
+CLICOLOR_FORCE= GREP_OPTIONS=
+unset CLICOLOR_FORCE GREP_OPTIONS
-
-:
-(as_func_return () {
- (exit $1)
-}
-as_func_success () {
- as_func_return 0
-}
-as_func_failure () {
- as_func_return 1
-}
-as_func_ret_success () {
- return 0
-}
-as_func_ret_failure () {
- return 1
+## --------------------- ##
+## M4sh Shell Functions. ##
+## --------------------- ##
+# as_fn_unset VAR
+# ---------------
+# Portably unset VAR.
+as_fn_unset ()
+{
+ { eval $1=; unset $1;}
}
+as_unset=as_fn_unset
-exitcode=0
-if as_func_success; then
- :
-else
- exitcode=1
- echo as_func_success failed.
-fi
+# as_fn_set_status STATUS
+# -----------------------
+# Set $? to STATUS, without forking.
+as_fn_set_status ()
+{
+ return $1
+} # as_fn_set_status
-if as_func_failure; then
- exitcode=1
- echo as_func_failure succeeded.
-fi
+# as_fn_exit STATUS
+# -----------------
+# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
+as_fn_exit ()
+{
+ set +e
+ as_fn_set_status $1
+ exit $1
+} # as_fn_exit
+
+# as_fn_mkdir_p
+# -------------
+# Create "$as_dir" as a directory, including parents if necessary.
+as_fn_mkdir_p ()
+{
-if as_func_ret_success; then
- :
+ case $as_dir in #(
+ -*) as_dir=./$as_dir;;
+ esac
+ test -d "$as_dir" || eval $as_mkdir_p || {
+ as_dirs=
+ while :; do
+ case $as_dir in #(
+ *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
+ *) as_qdir=$as_dir;;
+ esac
+ as_dirs="'$as_qdir' $as_dirs"
+ as_dir=`$as_dirname -- "$as_dir" ||
+$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$as_dir" : 'X\(//\)[^/]' \| \
+ X"$as_dir" : 'X\(//\)$' \| \
+ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$as_dir" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)[^/].*/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+ test -d "$as_dir" && break
+ done
+ test -z "$as_dirs" || eval "mkdir $as_dirs"
+ } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
+
+
+} # as_fn_mkdir_p
+# as_fn_append VAR VALUE
+# ----------------------
+# Append the text in VALUE to the end of the definition contained in VAR. Take
+# advantage of any shell optimizations that allow amortized linear growth over
+# repeated appends, instead of the typical quadratic growth present in naive
+# implementations.
+if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
+ eval 'as_fn_append ()
+ {
+ eval $1+=\$2
+ }'
else
- exitcode=1
- echo as_func_ret_success failed.
-fi
-
-if as_func_ret_failure; then
- exitcode=1
- echo as_func_ret_failure succeeded.
-fi
-
-if ( set x; as_func_ret_success y && test x = "$1" ); then
- :
+ as_fn_append ()
+ {
+ eval $1=\$$1\$2
+ }
+fi # as_fn_append
+
+# as_fn_arith ARG...
+# ------------------
+# Perform arithmetic evaluation on the ARGs, and store the result in the
+# global $as_val. Take advantage of shells that can avoid forks. The arguments
+# must be portable across $(()) and expr.
+if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
+ eval 'as_fn_arith ()
+ {
+ as_val=$(( $* ))
+ }'
else
- exitcode=1
- echo positional parameters were not saved.
-fi
-
-test $exitcode = 0) || { (exit 1); exit 1; }
-
-(
- as_lineno_1=$LINENO
- as_lineno_2=$LINENO
- test "x$as_lineno_1" != "x$as_lineno_2" &&
- test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2") || { (exit 1); exit 1; }
-
-_ASEOF
-}; then
- break
-fi
-
-fi
-
- done
-
- if test "x$CONFIG_SHELL" != x; then
- for as_var in BASH_ENV ENV
- do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
- done
- export CONFIG_SHELL
- exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"}
-fi
-
-
- if test $as_have_required = no; then
- echo This script requires a shell more modern than all the
- echo shells that I found on your system. Please install a
- echo modern shell, or manually run the script under such a
- echo shell if you do have one.
- { (exit 1); exit 1; }
-fi
-
-
-fi
-
-fi
-
+ as_fn_arith ()
+ {
+ as_val=`expr "$@" || test $? -eq 1`
+ }
+fi # as_fn_arith
-(eval "as_func_return () {
- (exit \$1)
-}
-as_func_success () {
- as_func_return 0
-}
-as_func_failure () {
- as_func_return 1
-}
-as_func_ret_success () {
- return 0
-}
-as_func_ret_failure () {
- return 1
-}
+# as_fn_error STATUS ERROR [LINENO LOG_FD]
+# ----------------------------------------
+# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
+# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
+# script with STATUS, using 1 if that was 0.
+as_fn_error ()
+{
+ as_status=$1; test $as_status -eq 0 && as_status=1
+ if test "$4"; then
+ as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
+ fi
+ $as_echo "$as_me: error: $2" >&2
+ as_fn_exit $as_status
+} # as_fn_error
-exitcode=0
-if as_func_success; then
- :
+if expr a : '\(a\)' >/dev/null 2>&1 &&
+ test "X`expr 00001 : '.*\(...\)'`" = X001; then
+ as_expr=expr
else
- exitcode=1
- echo as_func_success failed.
-fi
-
-if as_func_failure; then
- exitcode=1
- echo as_func_failure succeeded.
+ as_expr=false
fi
-if as_func_ret_success; then
- :
+if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
+ as_basename=basename
else
- exitcode=1
- echo as_func_ret_success failed.
-fi
-
-if as_func_ret_failure; then
- exitcode=1
- echo as_func_ret_failure succeeded.
+ as_basename=false
fi
-if ( set x; as_func_ret_success y && test x = \"\$1\" ); then
- :
+if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
+ as_dirname=dirname
else
- exitcode=1
- echo positional parameters were not saved.
+ as_dirname=false
fi
-test \$exitcode = 0") || {
- echo No shell found that supports shell functions.
- echo Please tell autoconf@gnu.org about your system,
- echo including any error possibly output before this
- echo message
-}
-
+as_me=`$as_basename -- "$0" ||
+$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
+ X"$0" : 'X\(//\)$' \| \
+ X"$0" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X/"$0" |
+ sed '/^.*\/\([^/][^/]*\)\/*$/{
+ s//\1/
+ q
+ }
+ /^X\/\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\/\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+# Avoid depending upon Character Ranges.
+as_cr_letters='abcdefghijklmnopqrstuvwxyz'
+as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
+as_cr_Letters=$as_cr_letters$as_cr_LETTERS
+as_cr_digits='0123456789'
+as_cr_alnum=$as_cr_Letters$as_cr_digits
- as_lineno_1=$LINENO
- as_lineno_2=$LINENO
- test "x$as_lineno_1" != "x$as_lineno_2" &&
- test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
- # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
- # uniformly replaced by the line number. The first 'sed' inserts a
- # line-number line after each line using $LINENO; the second 'sed'
- # does the real work. The second script uses 'N' to pair each
- # line-number line with the line containing $LINENO, and appends
- # trailing '-' during substitution so that $LINENO is not a special
- # case at line end.
- # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
- # scripts with optimization help from Paolo Bonzini. Blame Lee
- # E. McMahon (1931-1989) for sed's syntax. :-)
+ as_lineno_1=$LINENO as_lineno_1a=$LINENO
+ as_lineno_2=$LINENO as_lineno_2a=$LINENO
+ eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
+ test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
+ # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-)
sed -n '
p
/[$]LINENO/=
@@ -451,8 +446,7 @@ test \$exitcode = 0") || {
s/-\n.*//
' >$as_me.lineno &&
chmod +x "$as_me.lineno" ||
- { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
- { (exit 1); exit 1; }; }
+ { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
# Don't try to exec as it changes $[0], causing all sort of problems
# (the dirname of $[0] is not the place where we might find the
@@ -462,49 +456,40 @@ test \$exitcode = 0") || {
exit
}
-
-if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
- as_dirname=dirname
-else
- as_dirname=false
-fi
-
ECHO_C= ECHO_N= ECHO_T=
-case `echo -n x` in
+case `echo -n x` in #(((((
-n*)
- case `echo 'x\c'` in
+ case `echo 'xy\c'` in
*c*) ECHO_T=' ';; # ECHO_T is single tab character.
- *) ECHO_C='\c';;
+ xy) ECHO_C='\c';;
+ *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
+ ECHO_T=' ';;
esac;;
*)
ECHO_N='-n';;
esac
-if expr a : '\(a\)' >/dev/null 2>&1 &&
- test "X`expr 00001 : '.*\(...\)'`" = X001; then
- as_expr=expr
-else
- as_expr=false
-fi
-
rm -f conf$$ conf$$.exe conf$$.file
if test -d conf$$.dir; then
rm -f conf$$.dir/conf$$.file
else
rm -f conf$$.dir
- mkdir conf$$.dir
-fi
-echo >conf$$.file
-if ln -s conf$$.file conf$$ 2>/dev/null; then
- as_ln_s='ln -s'
- # ... but there are two gotchas:
- # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
- # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
- # In both cases, we have to default to `cp -p'.
- ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
+ mkdir conf$$.dir 2>/dev/null
+fi
+if (echo >conf$$.file) 2>/dev/null; then
+ if ln -s conf$$.file conf$$ 2>/dev/null; then
+ as_ln_s='ln -s'
+ # ... but there are two gotchas:
+ # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
+ # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
+ # In both cases, we have to default to `cp -p'.
+ ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
+ as_ln_s='cp -p'
+ elif ln conf$$.file conf$$ 2>/dev/null; then
+ as_ln_s=ln
+ else
as_ln_s='cp -p'
-elif ln conf$$.file conf$$ 2>/dev/null; then
- as_ln_s=ln
+ fi
else
as_ln_s='cp -p'
fi
@@ -512,7 +497,7 @@ rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
rmdir conf$$.dir 2>/dev/null
if mkdir -p . 2>/dev/null; then
- as_mkdir_p=:
+ as_mkdir_p='mkdir -p "$as_dir"'
else
test -d ./-p && rmdir ./-p
as_mkdir_p=false
@@ -529,12 +514,12 @@ else
as_test_x='
eval sh -c '\''
if test -d "$1"; then
- test -d "$1/.";
+ test -d "$1/.";
else
- case $1 in
- -*)set "./$1";;
+ case $1 in #(
+ -*)set "./$1";;
esac;
- case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
+ case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
???[sx]*):;;*)false;;esac;fi
'\'' sh
'
@@ -548,11 +533,11 @@ as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
-
-exec 7<&0 </dev/null 6>&1
+test -n "$DJDIR" || exec 7<&0 </dev/null
+exec 6>&1
# Name of the host.
-# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
+# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
# so uname gets run too.
ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
@@ -567,7 +552,6 @@ cross_compiling=no
subdirs=
MFLAGS=
MAKEFLAGS=
-SHELL=${CONFIG_SHELL-/bin/sh}
# Identity of this package.
PACKAGE_NAME=
@@ -575,84 +559,92 @@ PACKAGE_TARNAME=
PACKAGE_VERSION=
PACKAGE_STRING=
PACKAGE_BUGREPORT=
+PACKAGE_URL=
ac_unique_file="redboot-crt0.S"
-ac_subst_vars='SHELL
-PATH_SEPARATOR
-PACKAGE_NAME
-PACKAGE_TARNAME
-PACKAGE_VERSION
-PACKAGE_STRING
-PACKAGE_BUGREPORT
-exec_prefix
-prefix
-program_transform_name
-bindir
-sbindir
-libexecdir
-datarootdir
-datadir
-sysconfdir
-sharedstatedir
-localstatedir
-includedir
-oldincludedir
-docdir
-infodir
-htmldir
-dvidir
-pdfdir
-psdir
-libdir
-localedir
-mandir
-DEFS
-ECHO_C
-ECHO_N
-ECHO_T
-LIBS
-build_alias
-host_alias
-target_alias
-BUILD_CRT0_TRUE
-BUILD_CRT0_FALSE
-build
-build_cpu
-build_vendor
-build_os
-host
-host_cpu
-host_vendor
-host_os
-target
-target_cpu
-target_vendor
-target_os
-INSTALL_PROGRAM
-INSTALL_SCRIPT
-INSTALL_DATA
-CC
-am__leading_dot
-DEPDIR
-am__include
-am__quote
-AMDEP_TRUE
-AMDEP_FALSE
-AMDEPBACKSLASH
-CCDEPMODE
-am__fastdepCC_TRUE
-am__fastdepCC_FALSE
-AS
-AR
-LD
-RANLIB
-CCAS
-CCASFLAGS
-objtype
-host_makefile_frag_path
+ac_subst_vars='LTLIBOBJS
LIBOBJS
-LTLIBOBJS'
+subdirs
+host_makefile_frag_path
+objtype
+CCASFLAGS
+CCAS
+RANLIB
+LD
+AR
+AS
+am__fastdepCC_FALSE
+am__fastdepCC_TRUE
+CCDEPMODE
+AMDEPBACKSLASH
+AMDEP_FALSE
+AMDEP_TRUE
+am__quote
+am__include
+DEPDIR
+am__leading_dot
+CC
+INSTALL_DATA
+INSTALL_SCRIPT
+INSTALL_PROGRAM
+target_os
+target_vendor
+target_cpu
+target
+host_os
+host_vendor
+host_cpu
+host
+build_os
+build_vendor
+build_cpu
+build
+BUILD_CRT0_FALSE
+BUILD_CRT0_TRUE
+target_alias
+host_alias
+build_alias
+LIBS
+ECHO_T
+ECHO_N
+ECHO_C
+DEFS
+mandir
+localedir
+libdir
+psdir
+pdfdir
+dvidir
+htmldir
+infodir
+docdir
+oldincludedir
+includedir
+localstatedir
+sharedstatedir
+sysconfdir
+datadir
+datarootdir
+libexecdir
+sbindir
+bindir
+program_transform_name
+prefix
+exec_prefix
+PACKAGE_URL
+PACKAGE_BUGREPORT
+PACKAGE_STRING
+PACKAGE_VERSION
+PACKAGE_TARNAME
+PACKAGE_NAME
+PATH_SEPARATOR
+SHELL'
ac_subst_files='host_makefile_frag'
+ac_user_opts='
+enable_option_checking
+enable_newlib_supplied_syscalls
+enable_dependency_tracking
+'
ac_precious_vars='build_alias
host_alias
target_alias
@@ -663,6 +655,8 @@ CCASFLAGS'
# Initialize some variables set by options.
ac_init_help=
ac_init_version=false
+ac_unrecognized_opts=
+ac_unrecognized_sep=
# The variables have the same names as the options, with
# dashes changed to underlines.
cache_file=/dev/null
@@ -718,8 +712,9 @@ do
fi
case $ac_option in
- *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
- *) ac_optarg=yes ;;
+ *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
+ *=) ac_optarg= ;;
+ *) ac_optarg=yes ;;
esac
# Accept the important Cygnus configure options, so we can diagnose typos.
@@ -761,13 +756,20 @@ do
datarootdir=$ac_optarg ;;
-disable-* | --disable-*)
- ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
+ ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
# Reject names that are not valid shell variable names.
- expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null &&
- { echo "$as_me: error: invalid feature name: $ac_feature" >&2
- { (exit 1); exit 1; }; }
- ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'`
- eval enable_$ac_feature=no ;;
+ expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
+ as_fn_error $? "invalid feature name: $ac_useropt"
+ ac_useropt_orig=$ac_useropt
+ ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
+ case $ac_user_opts in
+ *"
+"enable_$ac_useropt"
+"*) ;;
+ *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
+ ac_unrecognized_sep=', ';;
+ esac
+ eval enable_$ac_useropt=no ;;
-docdir | --docdir | --docdi | --doc | --do)
ac_prev=docdir ;;
@@ -780,13 +782,20 @@ do
dvidir=$ac_optarg ;;
-enable-* | --enable-*)
- ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
+ ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
# Reject names that are not valid shell variable names.
- expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null &&
- { echo "$as_me: error: invalid feature name: $ac_feature" >&2
- { (exit 1); exit 1; }; }
- ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'`
- eval enable_$ac_feature=\$ac_optarg ;;
+ expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
+ as_fn_error $? "invalid feature name: $ac_useropt"
+ ac_useropt_orig=$ac_useropt
+ ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
+ case $ac_user_opts in
+ *"
+"enable_$ac_useropt"
+"*) ;;
+ *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
+ ac_unrecognized_sep=', ';;
+ esac
+ eval enable_$ac_useropt=\$ac_optarg ;;
-exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
| --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
@@ -977,22 +986,36 @@ do
ac_init_version=: ;;
-with-* | --with-*)
- ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
+ ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
# Reject names that are not valid shell variable names.
- expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null &&
- { echo "$as_me: error: invalid package name: $ac_package" >&2
- { (exit 1); exit 1; }; }
- ac_package=`echo $ac_package | sed 's/[-.]/_/g'`
- eval with_$ac_package=\$ac_optarg ;;
+ expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
+ as_fn_error $? "invalid package name: $ac_useropt"
+ ac_useropt_orig=$ac_useropt
+ ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
+ case $ac_user_opts in
+ *"
+"with_$ac_useropt"
+"*) ;;
+ *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
+ ac_unrecognized_sep=', ';;
+ esac
+ eval with_$ac_useropt=\$ac_optarg ;;
-without-* | --without-*)
- ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
+ ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
# Reject names that are not valid shell variable names.
- expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null &&
- { echo "$as_me: error: invalid package name: $ac_package" >&2
- { (exit 1); exit 1; }; }
- ac_package=`echo $ac_package | sed 's/[-.]/_/g'`
- eval with_$ac_package=no ;;
+ expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
+ as_fn_error $? "invalid package name: $ac_useropt"
+ ac_useropt_orig=$ac_useropt
+ ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
+ case $ac_user_opts in
+ *"
+"with_$ac_useropt"
+"*) ;;
+ *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
+ ac_unrecognized_sep=', ';;
+ esac
+ eval with_$ac_useropt=no ;;
--x)
# Obsolete; use --with-x.
@@ -1012,26 +1035,26 @@ do
| --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
x_libraries=$ac_optarg ;;
- -*) { echo "$as_me: error: unrecognized option: $ac_option
-Try \`$0 --help' for more information." >&2
- { (exit 1); exit 1; }; }
+ -*) as_fn_error $? "unrecognized option: \`$ac_option'
+Try \`$0 --help' for more information"
;;
*=*)
ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
# Reject names that are not valid shell variable names.
- expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
- { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
- { (exit 1); exit 1; }; }
+ case $ac_envvar in #(
+ '' | [0-9]* | *[!_$as_cr_alnum]* )
+ as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
+ esac
eval $ac_envvar=\$ac_optarg
export $ac_envvar ;;
*)
# FIXME: should be removed in autoconf 3.0.
- echo "$as_me: WARNING: you should use --build, --host, --target" >&2
+ $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
- echo "$as_me: WARNING: invalid host type: $ac_option" >&2
- : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
+ $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
+ : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
;;
esac
@@ -1039,23 +1062,36 @@ done
if test -n "$ac_prev"; then
ac_option=--`echo $ac_prev | sed 's/_/-/g'`
- { echo "$as_me: error: missing argument to $ac_option" >&2
- { (exit 1); exit 1; }; }
+ as_fn_error $? "missing argument to $ac_option"
fi
-# Be sure to have absolute directory names.
+if test -n "$ac_unrecognized_opts"; then
+ case $enable_option_checking in
+ no) ;;
+ fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
+ *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
+ esac
+fi
+
+# Check all directory arguments for consistency.
for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
datadir sysconfdir sharedstatedir localstatedir includedir \
oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
libdir localedir mandir
do
eval ac_val=\$$ac_var
+ # Remove trailing slashes.
+ case $ac_val in
+ */ )
+ ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
+ eval $ac_var=\$ac_val;;
+ esac
+ # Be sure to have absolute directory names.
case $ac_val in
[\\/$]* | ?:[\\/]* ) continue;;
NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
esac
- { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
- { (exit 1); exit 1; }; }
+ as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
done
# There might be people who depend on the old broken behavior: `$host'
@@ -1069,8 +1105,8 @@ target=$target_alias
if test "x$host_alias" != x; then
if test "x$build_alias" = x; then
cross_compiling=maybe
- echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
- If a cross compiler is detected then cross compile mode will be used." >&2
+ $as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host.
+ If a cross compiler is detected then cross compile mode will be used" >&2
elif test "x$build_alias" != "x$host_alias"; then
cross_compiling=yes
fi
@@ -1085,23 +1121,21 @@ test "$silent" = yes && exec 6>/dev/null
ac_pwd=`pwd` && test -n "$ac_pwd" &&
ac_ls_di=`ls -di .` &&
ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
- { echo "$as_me: error: Working directory cannot be determined" >&2
- { (exit 1); exit 1; }; }
+ as_fn_error $? "working directory cannot be determined"
test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
- { echo "$as_me: error: pwd does not report name of working directory" >&2
- { (exit 1); exit 1; }; }
+ as_fn_error $? "pwd does not report name of working directory"
# Find the source files, if location was not specified.
if test -z "$srcdir"; then
ac_srcdir_defaulted=yes
# Try the directory containing this script, then the parent directory.
- ac_confdir=`$as_dirname -- "$0" ||
-$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
- X"$0" : 'X\(//\)[^/]' \| \
- X"$0" : 'X\(//\)$' \| \
- X"$0" : 'X\(/\)' \| . 2>/dev/null ||
-echo X"$0" |
+ ac_confdir=`$as_dirname -- "$as_myself" ||
+$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$as_myself" : 'X\(//\)[^/]' \| \
+ X"$as_myself" : 'X\(//\)$' \| \
+ X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$as_myself" |
sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
s//\1/
q
@@ -1128,13 +1162,11 @@ else
fi
if test ! -r "$srcdir/$ac_unique_file"; then
test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
- { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
- { (exit 1); exit 1; }; }
+ as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
fi
ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
ac_abs_confdir=`(
- cd "$srcdir" && test -r "./$ac_unique_file" || { echo "$as_me: error: $ac_msg" >&2
- { (exit 1); exit 1; }; }
+ cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
pwd)`
# When building in place, set srcdir=.
if test "$ac_abs_confdir" = "$ac_pwd"; then
@@ -1174,7 +1206,7 @@ Configuration:
--help=short display options specific to this package
--help=recursive display the short help of all the included packages
-V, --version display version information and exit
- -q, --quiet, --silent do not print \`checking...' messages
+ -q, --quiet, --silent do not print \`checking ...' messages
--cache-file=FILE cache test results in FILE [disabled]
-C, --config-cache alias for \`--cache-file=config.cache'
-n, --no-create do not create output files
@@ -1182,9 +1214,9 @@ Configuration:
Installation directories:
--prefix=PREFIX install architecture-independent files in PREFIX
- [$ac_default_prefix]
+ [$ac_default_prefix]
--exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
- [PREFIX]
+ [PREFIX]
By default, \`make install' will install all the files in
\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
@@ -1194,25 +1226,25 @@ for instance \`--prefix=\$HOME'.
For better control, use the options below.
Fine tuning of the installation directories:
- --bindir=DIR user executables [EPREFIX/bin]
- --sbindir=DIR system admin executables [EPREFIX/sbin]
- --libexecdir=DIR program executables [EPREFIX/libexec]
- --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
- --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
- --localstatedir=DIR modifiable single-machine data [PREFIX/var]
- --libdir=DIR object code libraries [EPREFIX/lib]
- --includedir=DIR C header files [PREFIX/include]
- --oldincludedir=DIR C header files for non-gcc [/usr/include]
- --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
- --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
- --infodir=DIR info documentation [DATAROOTDIR/info]
- --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
- --mandir=DIR man documentation [DATAROOTDIR/man]
- --docdir=DIR documentation root [DATAROOTDIR/doc/PACKAGE]
- --htmldir=DIR html documentation [DOCDIR]
- --dvidir=DIR dvi documentation [DOCDIR]
- --pdfdir=DIR pdf documentation [DOCDIR]
- --psdir=DIR ps documentation [DOCDIR]
+ --bindir=DIR user executables [EPREFIX/bin]
+ --sbindir=DIR system admin executables [EPREFIX/sbin]
+ --libexecdir=DIR program executables [EPREFIX/libexec]
+ --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
+ --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
+ --localstatedir=DIR modifiable single-machine data [PREFIX/var]
+ --libdir=DIR object code libraries [EPREFIX/lib]
+ --includedir=DIR C header files [PREFIX/include]
+ --oldincludedir=DIR C header files for non-gcc [/usr/include]
+ --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
+ --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
+ --infodir=DIR info documentation [DATAROOTDIR/info]
+ --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
+ --mandir=DIR man documentation [DATAROOTDIR/man]
+ --docdir=DIR documentation root [DATAROOTDIR/doc/PACKAGE]
+ --htmldir=DIR html documentation [DOCDIR]
+ --dvidir=DIR dvi documentation [DOCDIR]
+ --pdfdir=DIR pdf documentation [DOCDIR]
+ --psdir=DIR ps documentation [DOCDIR]
_ACEOF
cat <<\_ACEOF
@@ -1234,6 +1266,7 @@ if test -n "$ac_init_help"; then
cat <<\_ACEOF
Optional Features:
+ --disable-option-checking ignore unrecognized --enable/--with options
--disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
--enable-FEATURE[=ARG] include FEATURE [ARG=yes]
--disable-newlib-supplied-syscalls disable newlib from supplying syscalls
@@ -1247,6 +1280,7 @@ Some influential environment variables:
Use these variables to override the choices made by `configure' or to help
it to find libraries and programs with nonstandard names/locations.
+Report bugs to the package provider.
_ACEOF
ac_status=$?
fi
@@ -1254,15 +1288,17 @@ fi
if test "$ac_init_help" = "recursive"; then
# If there are subdirs, report their specific --help.
for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
- test -d "$ac_dir" || continue
+ test -d "$ac_dir" ||
+ { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
+ continue
ac_builddir=.
case "$ac_dir" in
.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
*)
- ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
+ ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
# A ".." for each directory in $ac_dir_suffix.
- ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'`
+ ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
case $ac_top_builddir_sub in
"") ac_top_builddir_sub=. ac_top_build_prefix= ;;
*) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
@@ -1298,7 +1334,7 @@ ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
echo &&
$SHELL "$ac_srcdir/configure" --help=recursive
else
- echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
+ $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
fi || ac_status=$?
cd "$ac_pwd" || { ac_status=$?; break; }
done
@@ -1308,21 +1344,62 @@ test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
configure
-generated by GNU Autoconf 2.61
+generated by GNU Autoconf 2.68
-Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
-2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
+Copyright (C) 2010 Free Software Foundation, Inc.
This configure script is free software; the Free Software Foundation
gives unlimited permission to copy, distribute and modify it.
_ACEOF
exit
fi
+
+## ------------------------ ##
+## Autoconf initialization. ##
+## ------------------------ ##
+
+# ac_fn_c_try_compile LINENO
+# --------------------------
+# Try to compile conftest.$ac_ext, and return whether this succeeded.
+ac_fn_c_try_compile ()
+{
+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ rm -f conftest.$ac_objext
+ if { { ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_compile") 2>conftest.err
+ ac_status=$?
+ if test -s conftest.err; then
+ grep -v '^ *+' conftest.err >conftest.er1
+ cat conftest.er1 >&5
+ mv -f conftest.er1 conftest.err
+ fi
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then :
+ ac_retval=0
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_retval=1
+fi
+ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+ as_fn_set_status $ac_retval
+
+} # ac_fn_c_try_compile
cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
It was created by $as_me, which was
-generated by GNU Autoconf 2.61. Invocation command line was
+generated by GNU Autoconf 2.68. Invocation command line was
$ $0 $@
@@ -1358,8 +1435,8 @@ for as_dir in $PATH
do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
- echo "PATH: $as_dir"
-done
+ $as_echo "PATH: $as_dir"
+ done
IFS=$as_save_IFS
} >&5
@@ -1393,12 +1470,12 @@ do
| -silent | --silent | --silen | --sile | --sil)
continue ;;
*\'*)
- ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
+ ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
esac
case $ac_pass in
- 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
+ 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2)
- ac_configure_args1="$ac_configure_args1 '$ac_arg'"
+ as_fn_append ac_configure_args1 " '$ac_arg'"
if test $ac_must_keep_next = true; then
ac_must_keep_next=false # Got value, back to normal.
else
@@ -1414,13 +1491,13 @@ do
-* ) ac_must_keep_next=true ;;
esac
fi
- ac_configure_args="$ac_configure_args '$ac_arg'"
+ as_fn_append ac_configure_args " '$ac_arg'"
;;
esac
done
done
-$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
-$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; }
+{ ac_configure_args0=; unset ac_configure_args0;}
+{ ac_configure_args1=; unset ac_configure_args1;}
# When interrupted or exit'd, cleanup temporary files, and complete
# config.log. We remove comments because anyway the quotes in there
@@ -1432,11 +1509,9 @@ trap 'exit_status=$?
{
echo
- cat <<\_ASBOX
-## ---------------- ##
+ $as_echo "## ---------------- ##
## Cache variables. ##
-## ---------------- ##
-_ASBOX
+## ---------------- ##"
echo
# The following way of writing the cache mishandles newlines in values,
(
@@ -1445,12 +1520,13 @@ _ASBOX
case $ac_val in #(
*${as_nl}*)
case $ac_var in #(
- *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
-echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
+ *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
+$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
esac
case $ac_var in #(
_ | IFS | as_nl) ;; #(
- *) $as_unset $ac_var ;;
+ BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
+ *) { eval $ac_var=; unset $ac_var;} ;;
esac ;;
esac
done
@@ -1469,128 +1545,136 @@ echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
)
echo
- cat <<\_ASBOX
-## ----------------- ##
+ $as_echo "## ----------------- ##
## Output variables. ##
-## ----------------- ##
-_ASBOX
+## ----------------- ##"
echo
for ac_var in $ac_subst_vars
do
eval ac_val=\$$ac_var
case $ac_val in
- *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
+ *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
esac
- echo "$ac_var='\''$ac_val'\''"
+ $as_echo "$ac_var='\''$ac_val'\''"
done | sort
echo
if test -n "$ac_subst_files"; then
- cat <<\_ASBOX
-## ------------------- ##
+ $as_echo "## ------------------- ##
## File substitutions. ##
-## ------------------- ##
-_ASBOX
+## ------------------- ##"
echo
for ac_var in $ac_subst_files
do
eval ac_val=\$$ac_var
case $ac_val in
- *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
+ *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
esac
- echo "$ac_var='\''$ac_val'\''"
+ $as_echo "$ac_var='\''$ac_val'\''"
done | sort
echo
fi
if test -s confdefs.h; then
- cat <<\_ASBOX
-## ----------- ##
+ $as_echo "## ----------- ##
## confdefs.h. ##
-## ----------- ##
-_ASBOX
+## ----------- ##"
echo
cat confdefs.h
echo
fi
test "$ac_signal" != 0 &&
- echo "$as_me: caught signal $ac_signal"
- echo "$as_me: exit $exit_status"
+ $as_echo "$as_me: caught signal $ac_signal"
+ $as_echo "$as_me: exit $exit_status"
} >&5
rm -f core *.core core.conftest.* &&
rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
exit $exit_status
' 0
for ac_signal in 1 2 13 15; do
- trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
+ trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
done
ac_signal=0
# confdefs.h avoids OS command line length limits that DEFS can exceed.
rm -f -r conftest* confdefs.h
+$as_echo "/* confdefs.h */" > confdefs.h
+
# Predefined preprocessor variables.
cat >>confdefs.h <<_ACEOF
#define PACKAGE_NAME "$PACKAGE_NAME"
_ACEOF
-
cat >>confdefs.h <<_ACEOF
#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
_ACEOF
-
cat >>confdefs.h <<_ACEOF
#define PACKAGE_VERSION "$PACKAGE_VERSION"
_ACEOF
-
cat >>confdefs.h <<_ACEOF
#define PACKAGE_STRING "$PACKAGE_STRING"
_ACEOF
-
cat >>confdefs.h <<_ACEOF
#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
_ACEOF
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_URL "$PACKAGE_URL"
+_ACEOF
+
# Let the site file select an alternate cache file if it wants to.
-# Prefer explicitly selected file to automatically selected ones.
+# Prefer an explicitly selected file to automatically selected ones.
+ac_site_file1=NONE
+ac_site_file2=NONE
if test -n "$CONFIG_SITE"; then
- set x "$CONFIG_SITE"
+ # We do not want a PATH search for config.site.
+ case $CONFIG_SITE in #((
+ -*) ac_site_file1=./$CONFIG_SITE;;
+ */*) ac_site_file1=$CONFIG_SITE;;
+ *) ac_site_file1=./$CONFIG_SITE;;
+ esac
elif test "x$prefix" != xNONE; then
- set x "$prefix/share/config.site" "$prefix/etc/config.site"
+ ac_site_file1=$prefix/share/config.site
+ ac_site_file2=$prefix/etc/config.site
else
- set x "$ac_default_prefix/share/config.site" \
- "$ac_default_prefix/etc/config.site"
+ ac_site_file1=$ac_default_prefix/share/config.site
+ ac_site_file2=$ac_default_prefix/etc/config.site
fi
-shift
-for ac_site_file
+for ac_site_file in "$ac_site_file1" "$ac_site_file2"
do
- if test -r "$ac_site_file"; then
- { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
-echo "$as_me: loading site script $ac_site_file" >&6;}
+ test "x$ac_site_file" = xNONE && continue
+ if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
+$as_echo "$as_me: loading site script $ac_site_file" >&6;}
sed 's/^/| /' "$ac_site_file" >&5
- . "$ac_site_file"
+ . "$ac_site_file" \
+ || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "failed to load site script $ac_site_file
+See \`config.log' for more details" "$LINENO" 5; }
fi
done
if test -r "$cache_file"; then
- # Some versions of bash will fail to source /dev/null (special
- # files actually), so we avoid doing that.
- if test -f "$cache_file"; then
- { echo "$as_me:$LINENO: loading cache $cache_file" >&5
-echo "$as_me: loading cache $cache_file" >&6;}
+ # Some versions of bash will fail to source /dev/null (special files
+ # actually), so we avoid doing that. DJGPP emulates it as a regular file.
+ if test /dev/null != "$cache_file" && test -f "$cache_file"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
+$as_echo "$as_me: loading cache $cache_file" >&6;}
case $cache_file in
[\\/]* | ?:[\\/]* ) . "$cache_file";;
*) . "./$cache_file";;
esac
fi
else
- { echo "$as_me:$LINENO: creating cache $cache_file" >&5
-echo "$as_me: creating cache $cache_file" >&6;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
+$as_echo "$as_me: creating cache $cache_file" >&6;}
>$cache_file
fi
@@ -1604,60 +1688,56 @@ for ac_var in $ac_precious_vars; do
eval ac_new_val=\$ac_env_${ac_var}_value
case $ac_old_set,$ac_new_set in
set,)
- { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
-echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
+$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
ac_cache_corrupted=: ;;
,set)
- { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
-echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
+$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
ac_cache_corrupted=: ;;
,);;
*)
if test "x$ac_old_val" != "x$ac_new_val"; then
- { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
-echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
- { echo "$as_me:$LINENO: former value: $ac_old_val" >&5
-echo "$as_me: former value: $ac_old_val" >&2;}
- { echo "$as_me:$LINENO: current value: $ac_new_val" >&5
-echo "$as_me: current value: $ac_new_val" >&2;}
- ac_cache_corrupted=:
+ # differences in whitespace do not lead to failure.
+ ac_old_val_w=`echo x $ac_old_val`
+ ac_new_val_w=`echo x $ac_new_val`
+ if test "$ac_old_val_w" != "$ac_new_val_w"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
+$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
+ ac_cache_corrupted=:
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
+$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
+ eval $ac_var=\$ac_old_val
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
+$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
+$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
fi;;
esac
# Pass precious variables to config.status.
if test "$ac_new_set" = set; then
case $ac_new_val in
- *\'*) ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
+ *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
*) ac_arg=$ac_var=$ac_new_val ;;
esac
case " $ac_configure_args " in
*" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
- *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
+ *) as_fn_append ac_configure_args " '$ac_arg'" ;;
esac
fi
done
if $ac_cache_corrupted; then
- { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
-echo "$as_me: error: changes in the environment can compromise the build" >&2;}
- { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
-echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
- { (exit 1); exit 1; }; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
+$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
+ as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
fi
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+## -------------------- ##
+## Main body of script. ##
+## -------------------- ##
ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
@@ -1668,13 +1748,11 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
# Check whether --enable-newlib-supplied-syscalls was given.
-if test "${enable_newlib_supplied_syscalls+set}" = set; then
+if test "${enable_newlib_supplied_syscalls+set}" = set; then :
enableval=$enable_newlib_supplied_syscalls; case "${enableval}" in
yes) newlib_may_supply_syscalls=yes ;;
no) newlib_may_supply_syscalls=no ;;
- *) { { echo "$as_me:$LINENO: error: bad value ${enableval} for newlib-supplied-syscalls option" >&5
-echo "$as_me: error: bad value ${enableval} for newlib-supplied-syscalls option" >&2;}
- { (exit 1); exit 1; }; } ;;
+ *) as_fn_error $? "bad value ${enableval} for newlib-supplied-syscalls option" "$LINENO" 5 ;;
esac
else
newlib_may_supply_syscalls=yes
@@ -1717,9 +1795,7 @@ for ac_dir in $libgloss_topdir "$srcdir"/$libgloss_topdir; do
fi
done
if test -z "$ac_aux_dir"; then
- { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in $libgloss_topdir \"$srcdir\"/$libgloss_topdir" >&5
-echo "$as_me: error: cannot find install-sh or install.sh in $libgloss_topdir \"$srcdir\"/$libgloss_topdir" >&2;}
- { (exit 1); exit 1; }; }
+ as_fn_error $? "cannot find install-sh, install.sh, or shtool in $libgloss_topdir \"$srcdir\"/$libgloss_topdir" "$LINENO" 5
fi
# These three variables are undocumented and unsupported,
@@ -1734,35 +1810,27 @@ ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
# Make sure we can run config.sub.
$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
- { { echo "$as_me:$LINENO: error: cannot run $SHELL $ac_aux_dir/config.sub" >&5
-echo "$as_me: error: cannot run $SHELL $ac_aux_dir/config.sub" >&2;}
- { (exit 1); exit 1; }; }
+ as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
-{ echo "$as_me:$LINENO: checking build system type" >&5
-echo $ECHO_N "checking build system type... $ECHO_C" >&6; }
-if test "${ac_cv_build+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
+$as_echo_n "checking build system type... " >&6; }
+if ${ac_cv_build+:} false; then :
+ $as_echo_n "(cached) " >&6
else
ac_build_alias=$build_alias
test "x$ac_build_alias" = x &&
ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
test "x$ac_build_alias" = x &&
- { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5
-echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
- { (exit 1); exit 1; }; }
+ as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
- { { echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&5
-echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&2;}
- { (exit 1); exit 1; }; }
+ as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
fi
-{ echo "$as_me:$LINENO: result: $ac_cv_build" >&5
-echo "${ECHO_T}$ac_cv_build" >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
+$as_echo "$ac_cv_build" >&6; }
case $ac_cv_build in
*-*-*) ;;
-*) { { echo "$as_me:$LINENO: error: invalid value of canonical build" >&5
-echo "$as_me: error: invalid value of canonical build" >&2;}
- { (exit 1); exit 1; }; };;
+*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
esac
build=$ac_cv_build
ac_save_IFS=$IFS; IFS='-'
@@ -1778,28 +1846,24 @@ IFS=$ac_save_IFS
case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
-{ echo "$as_me:$LINENO: checking host system type" >&5
-echo $ECHO_N "checking host system type... $ECHO_C" >&6; }
-if test "${ac_cv_host+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
+$as_echo_n "checking host system type... " >&6; }
+if ${ac_cv_host+:} false; then :
+ $as_echo_n "(cached) " >&6
else
if test "x$host_alias" = x; then
ac_cv_host=$ac_cv_build
else
ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
- { { echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&5
-echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&2;}
- { (exit 1); exit 1; }; }
+ as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
fi
fi
-{ echo "$as_me:$LINENO: result: $ac_cv_host" >&5
-echo "${ECHO_T}$ac_cv_host" >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
+$as_echo "$ac_cv_host" >&6; }
case $ac_cv_host in
*-*-*) ;;
-*) { { echo "$as_me:$LINENO: error: invalid value of canonical host" >&5
-echo "$as_me: error: invalid value of canonical host" >&2;}
- { (exit 1); exit 1; }; };;
+*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
esac
host=$ac_cv_host
ac_save_IFS=$IFS; IFS='-'
@@ -1815,28 +1879,24 @@ IFS=$ac_save_IFS
case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
-{ echo "$as_me:$LINENO: checking target system type" >&5
-echo $ECHO_N "checking target system type... $ECHO_C" >&6; }
-if test "${ac_cv_target+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
+$as_echo_n "checking target system type... " >&6; }
+if ${ac_cv_target+:} false; then :
+ $as_echo_n "(cached) " >&6
else
if test "x$target_alias" = x; then
ac_cv_target=$ac_cv_host
else
ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
- { { echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $target_alias failed" >&5
-echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $target_alias failed" >&2;}
- { (exit 1); exit 1; }; }
+ as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
fi
fi
-{ echo "$as_me:$LINENO: result: $ac_cv_target" >&5
-echo "${ECHO_T}$ac_cv_target" >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
+$as_echo "$ac_cv_target" >&6; }
case $ac_cv_target in
*-*-*) ;;
-*) { { echo "$as_me:$LINENO: error: invalid value of canonical target" >&5
-echo "$as_me: error: invalid value of canonical target" >&2;}
- { (exit 1); exit 1; }; };;
+*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
esac
target=$ac_cv_target
ac_save_IFS=$IFS; IFS='-'
@@ -1858,18 +1918,16 @@ test -n "$target_alias" &&
test "$program_prefix$program_suffix$program_transform_name" = \
NONENONEs,x,x, &&
program_prefix=${target_alias}-
+
test "$program_prefix" != NONE &&
program_transform_name="s&^&$program_prefix&;$program_transform_name"
# Use a double $ so make ignores it.
test "$program_suffix" != NONE &&
program_transform_name="s&\$&$program_suffix&;$program_transform_name"
-# Double any \ or $. echo might interpret backslashes.
+# Double any \ or $.
# By default was `s,x,x', remove it if useless.
-cat <<\_ACEOF >conftest.sed
-s/[\\$]/&&/g;s/;s,x,x,$//
-_ACEOF
-program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
-rm -f conftest.sed
+ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
+program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"`
# Find a good install program. We prefer a C program (faster),
@@ -1885,22 +1943,23 @@ rm -f conftest.sed
# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
# OS/2's system install, which has a completely different semantic
# ./install, which can be erroneously created by make from ./install.sh.
-{ echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
-echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6; }
+# Reject install programs that cannot install multiple files.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
+$as_echo_n "checking for a BSD-compatible install... " >&6; }
if test -z "$INSTALL"; then
-if test "${ac_cv_path_install+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+if ${ac_cv_path_install+:} false; then :
+ $as_echo_n "(cached) " >&6
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
- # Account for people who put trailing slashes in PATH elements.
-case $as_dir/ in
- ./ | .// | /cC/* | \
+ # Account for people who put trailing slashes in PATH elements.
+case $as_dir/ in #((
+ ./ | .// | /[cC]/* | \
/etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
- ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \
+ ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
/usr/ucb/* ) ;;
*)
# OSF1 and SCO ODT 3.0 have their own names for install.
@@ -1918,17 +1977,29 @@ case $as_dir/ in
# program-specific install script used by HP pwplus--don't use.
:
else
- ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
- break 3
+ rm -rf conftest.one conftest.two conftest.dir
+ echo one > conftest.one
+ echo two > conftest.two
+ mkdir conftest.dir
+ if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
+ test -s conftest.one && test -s conftest.two &&
+ test -s conftest.dir/conftest.one &&
+ test -s conftest.dir/conftest.two
+ then
+ ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
+ break 3
+ fi
fi
fi
done
done
;;
esac
-done
+
+ done
IFS=$as_save_IFS
+rm -rf conftest.one conftest.two conftest.dir
fi
if test "${ac_cv_path_install+set}" = set; then
@@ -1941,8 +2012,8 @@ fi
INSTALL=$ac_install_sh
fi
fi
-{ echo "$as_me:$LINENO: result: $INSTALL" >&5
-echo "${ECHO_T}$INSTALL" >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
+$as_echo "$INSTALL" >&6; }
# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
# It thinks the first close brace ends the variable substitution.
@@ -1974,8 +2045,8 @@ am__doit:
.PHONY: am__doit
END
# If we don't find an include directive, just comment out the code.
-{ echo "$as_me:$LINENO: checking for style of include used by $am_make" >&5
-echo $ECHO_N "checking for style of include used by $am_make... $ECHO_C" >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5
+$as_echo_n "checking for style of include used by $am_make... " >&6; }
am__include="#"
am__quote=
_am_result=none
@@ -2002,12 +2073,12 @@ if test "$am__include" = "#"; then
fi
-{ echo "$as_me:$LINENO: result: $_am_result" >&5
-echo "${ECHO_T}$_am_result" >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5
+$as_echo "$_am_result" >&6; }
rm -f confinc confmf
# Check whether --enable-dependency-tracking was given.
-if test "${enable_dependency_tracking+set}" = set; then
+if test "${enable_dependency_tracking+set}" = set; then :
enableval=$enable_dependency_tracking;
fi
@@ -2029,10 +2100,10 @@ fi
# Extract the first word of "gcc", so it can be a program name with args.
set dummy gcc; ac_word=$2
-{ echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
-if test "${ac_cv_prog_CC+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_CC+:} false; then :
+ $as_echo_n "(cached) " >&6
else
if test -n "$CC"; then
ac_cv_prog_CC="$CC" # Let the user override the test.
@@ -2042,35 +2113,35 @@ for as_dir in $PATH
do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
+ for ac_exec_ext in '' $ac_executable_extensions; do
if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
ac_cv_prog_CC="gcc"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
-done
+ done
IFS=$as_save_IFS
fi
fi
CC=$ac_cv_prog_CC
if test -n "$CC"; then
- { echo "$as_me:$LINENO: result: $CC" >&5
-echo "${ECHO_T}$CC" >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+$as_echo "$CC" >&6; }
else
- { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
fi
depcc="$CC" am_compiler_list=
-{ echo "$as_me:$LINENO: checking dependency style of $depcc" >&5
-echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6; }
-if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
+$as_echo_n "checking dependency style of $depcc... " >&6; }
+if ${am_cv_CC_dependencies_compiler_type+:} false; then :
+ $as_echo_n "(cached) " >&6
else
if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
# We make a subdir and do the tests there. Otherwise we can end up
@@ -2157,8 +2228,8 @@ else
fi
fi
-{ echo "$as_me:$LINENO: result: $am_cv_CC_dependencies_compiler_type" >&5
-echo "${ECHO_T}$am_cv_CC_dependencies_compiler_type" >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
+$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; }
CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
@@ -2177,10 +2248,10 @@ fi
if test -z "$CC"; then
# Extract the first word of "cc", so it can be a program name with args.
set dummy cc; ac_word=$2
-{ echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
-if test "${ac_cv_prog_CC+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_CC+:} false; then :
+ $as_echo_n "(cached) " >&6
else
if test -n "$CC"; then
ac_cv_prog_CC="$CC" # Let the user override the test.
@@ -2191,18 +2262,18 @@ for as_dir in $PATH
do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
+ for ac_exec_ext in '' $ac_executable_extensions; do
if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
ac_prog_rejected=yes
continue
fi
ac_cv_prog_CC="cc"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
-done
+ done
IFS=$as_save_IFS
if test $ac_prog_rejected = yes; then
@@ -2221,23 +2292,21 @@ fi
fi
CC=$ac_cv_prog_CC
if test -n "$CC"; then
- { echo "$as_me:$LINENO: result: $CC" >&5
-echo "${ECHO_T}$CC" >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+$as_echo "$CC" >&6; }
else
- { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
fi
- test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable cc found in \$PATH" >&5
-echo "$as_me: error: no acceptable cc found in \$PATH" >&2;}
- { (exit 1); exit 1; }; }
+ test -z "$CC" && as_fn_error $? "no acceptable cc found in \$PATH" "$LINENO" 5
fi
-{ echo "$as_me:$LINENO: checking whether we are using GNU C" >&5
-echo $ECHO_N "checking whether we are using GNU C... $ECHO_C" >&6; }
-if test "${ac_cv_c_compiler_gnu+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using GNU C" >&5
+$as_echo_n "checking whether we are using GNU C... " >&6; }
+if ${ac_cv_c_compiler_gnu+:} false; then :
+ $as_echo_n "(cached) " >&6
else
cat > conftest.c <<EOF
#ifdef __GNUC__
@@ -2245,18 +2314,18 @@ else
#endif
EOF
if { ac_try='${CC-cc} -E conftest.c'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } | egrep yes >/dev/null 2>&1; then
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; } | egrep yes >/dev/null 2>&1; then
ac_cv_c_compiler_gnu=yes
else
ac_cv_c_compiler_gnu=no
fi
fi
-{ echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
-echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
+$as_echo "$ac_cv_c_compiler_gnu" >&6; }
if test $ac_cv_c_compiler_gnu = yes; then
GCC=yes
@@ -2265,20 +2334,16 @@ if test $ac_cv_c_compiler_gnu = yes; then
CFLAGS=
ac_test_CFLAGS=${CFLAGS+set}
ac_save_CFLAGS=$CFLAGS
-{ echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
-echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6; }
-if test "${ac_cv_prog_cc_g+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
+$as_echo_n "checking whether $CC accepts -g... " >&6; }
+if ${ac_cv_prog_cc_g+:} false; then :
+ $as_echo_n "(cached) " >&6
else
ac_save_c_werror_flag=$ac_c_werror_flag
ac_c_werror_flag=yes
ac_cv_prog_cc_g=no
CFLAGS="-g"
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
int
@@ -2289,34 +2354,11 @@ main ()
return 0;
}
_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
- (eval "$ac_compile") 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } && {
- test -z "$ac_c_werror_flag" ||
- test ! -s conftest.err
- } && test -s conftest.$ac_objext; then
+if ac_fn_c_try_compile "$LINENO"; then :
ac_cv_prog_cc_g=yes
else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
- CFLAGS=""
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+ CFLAGS=""
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
int
@@ -2327,35 +2369,12 @@ main ()
return 0;
}
_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
- (eval "$ac_compile") 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } && {
- test -z "$ac_c_werror_flag" ||
- test ! -s conftest.err
- } && test -s conftest.$ac_objext; then
- :
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+if ac_fn_c_try_compile "$LINENO"; then :
- ac_c_werror_flag=$ac_save_c_werror_flag
+else
+ ac_c_werror_flag=$ac_save_c_werror_flag
CFLAGS="-g"
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
int
@@ -2366,42 +2385,18 @@ main ()
return 0;
}
_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
- (eval "$ac_compile") 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } && {
- test -z "$ac_c_werror_flag" ||
- test ! -s conftest.err
- } && test -s conftest.$ac_objext; then
+if ac_fn_c_try_compile "$LINENO"; then :
ac_cv_prog_cc_g=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-
fi
-
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
-
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
-
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
ac_c_werror_flag=$ac_save_c_werror_flag
fi
-{ echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
-echo "${ECHO_T}$ac_cv_prog_cc_g" >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
+$as_echo "$ac_cv_prog_cc_g" >&6; }
if test "$ac_test_CFLAGS" = set; then
CFLAGS=$ac_save_CFLAGS
elif test $ac_cv_prog_cc_g = yes; then
@@ -2438,10 +2433,10 @@ LD=${LD-ld}
if test -n "$ac_tool_prefix"; then
# Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
set dummy ${ac_tool_prefix}ranlib; ac_word=$2
-{ echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
-if test "${ac_cv_prog_RANLIB+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_RANLIB+:} false; then :
+ $as_echo_n "(cached) " >&6
else
if test -n "$RANLIB"; then
ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
@@ -2451,25 +2446,25 @@ for as_dir in $PATH
do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
+ for ac_exec_ext in '' $ac_executable_extensions; do
if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
-done
+ done
IFS=$as_save_IFS
fi
fi
RANLIB=$ac_cv_prog_RANLIB
if test -n "$RANLIB"; then
- { echo "$as_me:$LINENO: result: $RANLIB" >&5
-echo "${ECHO_T}$RANLIB" >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
+$as_echo "$RANLIB" >&6; }
else
- { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
fi
@@ -2478,10 +2473,10 @@ if test -z "$ac_cv_prog_RANLIB"; then
ac_ct_RANLIB=$RANLIB
# Extract the first word of "ranlib", so it can be a program name with args.
set dummy ranlib; ac_word=$2
-{ echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
-if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
+ $as_echo_n "(cached) " >&6
else
if test -n "$ac_ct_RANLIB"; then
ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
@@ -2491,25 +2486,25 @@ for as_dir in $PATH
do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
+ for ac_exec_ext in '' $ac_executable_extensions; do
if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
ac_cv_prog_ac_ct_RANLIB="ranlib"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
-done
+ done
IFS=$as_save_IFS
fi
fi
ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
if test -n "$ac_ct_RANLIB"; then
- { echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
-echo "${ECHO_T}$ac_ct_RANLIB" >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
+$as_echo "$ac_ct_RANLIB" >&6; }
else
- { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
fi
if test "x$ac_ct_RANLIB" = x; then
@@ -2517,12 +2512,8 @@ fi
else
case $cross_compiling:$ac_tool_warned in
yes:)
-{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
-whose name does not start with the host triplet. If you think this
-configuration is useful to you, please write to autoconf@gnu.org." >&5
-echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
-whose name does not start with the host triplet. If you think this
-configuration is useful to you, please write to autoconf@gnu.org." >&2;}
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
ac_tool_warned=yes ;;
esac
RANLIB=$ac_ct_RANLIB
@@ -2540,7 +2531,7 @@ test "${CCASFLAGS+set}" = set || CCASFLAGS=$CFLAGS
case "${target}" in
- *-*-elf | *-*-eabi)
+ *-*-elf | *-*-eabi | *-*-tirtos*)
objtype=elf-
;;
*-*-coff)
@@ -2550,12 +2541,20 @@ esac
-host_makefile_frag=${srcdir}/../config/default.mh
+host_makefile_frag=`cd $srcdir/../config;pwd`/default.mh
host_makefile_frag_path=$host_makefile_frag
+# Configure cpu init plug-ins
+if test -d "${srcdir}/cpu-init"; then
+ subdirs="${subdirs} cpu-init"
+ ac_config_files="$ac_config_files cpu-init/Makefile"
+
+
+fi
+
ac_config_files="$ac_config_files Makefile"
cat >confcache <<\_ACEOF
@@ -2585,12 +2584,13 @@ _ACEOF
case $ac_val in #(
*${as_nl}*)
case $ac_var in #(
- *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
-echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
+ *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
+$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
esac
case $ac_var in #(
_ | IFS | as_nl) ;; #(
- *) $as_unset $ac_var ;;
+ BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
+ *) { eval $ac_var=; unset $ac_var;} ;;
esac ;;
esac
done
@@ -2598,8 +2598,8 @@ echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
(set) 2>&1 |
case $as_nl`(ac_space=' '; set) 2>&1` in #(
*${as_nl}ac_space=\ *)
- # `set' does not quote correctly, so add quotes (double-quote
- # substitution turns \\\\ into \\, and sed turns \\ into \).
+ # `set' does not quote correctly, so add quotes: double-quote
+ # substitution turns \\\\ into \\, and sed turns \\ into \.
sed -n \
"s/'/'\\\\''/g;
s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
@@ -2621,13 +2621,24 @@ echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
:end' >>confcache
if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
if test -w "$cache_file"; then
- test "x$cache_file" != "x/dev/null" &&
- { echo "$as_me:$LINENO: updating cache $cache_file" >&5
-echo "$as_me: updating cache $cache_file" >&6;}
- cat confcache >$cache_file
+ if test "x$cache_file" != "x/dev/null"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
+$as_echo "$as_me: updating cache $cache_file" >&6;}
+ if test ! -f "$cache_file" || test -h "$cache_file"; then
+ cat confcache >"$cache_file"
+ else
+ case $cache_file in #(
+ */* | ?:*)
+ mv -f confcache "$cache_file"$$ &&
+ mv -f "$cache_file"$$ "$cache_file" ;; #(
+ *)
+ mv -f confcache "$cache_file" ;;
+ esac
+ fi
+ fi
else
- { echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5
-echo "$as_me: not updating unwritable cache $cache_file" >&6;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
+$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
fi
fi
rm -f confcache
@@ -2644,6 +2655,12 @@ test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
# take arguments), then branch to the quote section. Otherwise,
# look for a macro that doesn't take arguments.
ac_script='
+:mline
+/\\$/{
+ N
+ s,\\\n,,
+ b mline
+}
t clear
:clear
s/^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*([^)]*)\)[ ]*\(.*\)/-D\1=\2/g
@@ -2670,14 +2687,15 @@ DEFS=`sed -n "$ac_script" confdefs.h`
ac_libobjs=
ac_ltlibobjs=
+U=
for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
# 1. Remove the extension, and $U if already installed.
ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
- ac_i=`echo "$ac_i" | sed "$ac_script"`
+ ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
# 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
# will be set to the directory where LIBOBJS objects are built.
- ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext"
- ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo'
+ as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
+ as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
done
LIBOBJS=$ac_libobjs
@@ -2685,26 +2703,22 @@ LTLIBOBJS=$ac_ltlibobjs
if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then
- { { echo "$as_me:$LINENO: error: conditional \"AMDEP\" was never defined.
-Usually this means the macro was only invoked conditionally." >&5
-echo "$as_me: error: conditional \"AMDEP\" was never defined.
-Usually this means the macro was only invoked conditionally." >&2;}
- { (exit 1); exit 1; }; }
+ as_fn_error $? "conditional \"AMDEP\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
- { { echo "$as_me:$LINENO: error: conditional \"am__fastdepCC\" was never defined.
-Usually this means the macro was only invoked conditionally." >&5
-echo "$as_me: error: conditional \"am__fastdepCC\" was never defined.
-Usually this means the macro was only invoked conditionally." >&2;}
- { (exit 1); exit 1; }; }
+ as_fn_error $? "conditional \"am__fastdepCC\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
-: ${CONFIG_STATUS=./config.status}
+: "${CONFIG_STATUS=./config.status}"
+ac_write_fail=0
ac_clean_files_save=$ac_clean_files
ac_clean_files="$ac_clean_files $CONFIG_STATUS"
-{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
-echo "$as_me: creating $CONFIG_STATUS" >&6;}
-cat >$CONFIG_STATUS <<_ACEOF
+{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
+$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
+as_write_fail=0
+cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
#! $SHELL
# Generated by $as_me.
# Run this file to recreate the current configuration.
@@ -2714,59 +2728,79 @@ cat >$CONFIG_STATUS <<_ACEOF
debug=false
ac_cs_recheck=false
ac_cs_silent=false
-SHELL=\${CONFIG_SHELL-$SHELL}
-_ACEOF
-cat >>$CONFIG_STATUS <<\_ACEOF
-## --------------------- ##
-## M4sh Initialization. ##
-## --------------------- ##
+SHELL=\${CONFIG_SHELL-$SHELL}
+export SHELL
+_ASEOF
+cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
+## -------------------- ##
+## M4sh Initialization. ##
+## -------------------- ##
# Be more Bourne compatible
DUALCASE=1; export DUALCASE # for MKS sh
-if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
emulate sh
NULLCMD=:
- # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
+ # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
# is contrary to our usage. Disable this feature.
alias -g '${1+"$@"}'='"$@"'
setopt NO_GLOB_SUBST
else
- case `(set -o) 2>/dev/null` in
- *posix*) set -o posix ;;
+ case `(set -o) 2>/dev/null` in #(
+ *posix*) :
+ set -o posix ;; #(
+ *) :
+ ;;
esac
-
fi
-
-
-# PATH needs CR
-# Avoid depending upon Character Ranges.
-as_cr_letters='abcdefghijklmnopqrstuvwxyz'
-as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
-as_cr_Letters=$as_cr_letters$as_cr_LETTERS
-as_cr_digits='0123456789'
-as_cr_alnum=$as_cr_Letters$as_cr_digits
-
-# The user is always right.
-if test "${PATH_SEPARATOR+set}" != set; then
- echo "#! /bin/sh" >conf$$.sh
- echo "exit 0" >>conf$$.sh
- chmod +x conf$$.sh
- if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
- PATH_SEPARATOR=';'
+as_nl='
+'
+export as_nl
+# Printing a long string crashes Solaris 7 /usr/bin/printf.
+as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
+as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
+as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
+# Prefer a ksh shell builtin over an external printf program on Solaris,
+# but without wasting forks for bash or zsh.
+if test -z "$BASH_VERSION$ZSH_VERSION" \
+ && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
+ as_echo='print -r --'
+ as_echo_n='print -rn --'
+elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
+ as_echo='printf %s\n'
+ as_echo_n='printf %s'
+else
+ if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
+ as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
+ as_echo_n='/usr/ucb/echo -n'
else
- PATH_SEPARATOR=:
+ as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
+ as_echo_n_body='eval
+ arg=$1;
+ case $arg in #(
+ *"$as_nl"*)
+ expr "X$arg" : "X\\(.*\\)$as_nl";
+ arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
+ esac;
+ expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
+ '
+ export as_echo_n_body
+ as_echo_n='sh -c $as_echo_n_body as_echo'
fi
- rm -f conf$$.sh
+ export as_echo_body
+ as_echo='sh -c $as_echo_body as_echo'
fi
-# Support unset when possible.
-if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
- as_unset=unset
-else
- as_unset=false
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+ PATH_SEPARATOR=:
+ (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
+ (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
+ PATH_SEPARATOR=';'
+ }
fi
@@ -2775,20 +2809,19 @@ fi
# there to prevent editors from complaining about space-tab.
# (If _AS_PATH_WALK were called with IFS unset, it would disable word
# splitting by setting IFS to empty value.)
-as_nl='
-'
IFS=" "" $as_nl"
# Find who we are. Look in the path if we contain no directory separator.
-case $0 in
+as_myself=
+case $0 in #((
*[\\/]* ) as_myself=$0 ;;
*) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
- test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
-done
+ test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
+ done
IFS=$as_save_IFS
;;
@@ -2799,32 +2832,111 @@ if test "x$as_myself" = x; then
as_myself=$0
fi
if test ! -f "$as_myself"; then
- echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
- { (exit 1); exit 1; }
+ $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
+ exit 1
fi
-# Work around bugs in pre-3.0 UWIN ksh.
-for as_var in ENV MAIL MAILPATH
-do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
+# Unset variables that we do not need and which cause bugs (e.g. in
+# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
+# suppresses any "Segmentation fault" message there. '((' could
+# trigger a bug in pdksh 5.2.14.
+for as_var in BASH_ENV ENV MAIL MAILPATH
+do eval test x\${$as_var+set} = xset \
+ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
done
PS1='$ '
PS2='> '
PS4='+ '
# NLS nuisances.
-for as_var in \
- LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
- LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
- LC_TELEPHONE LC_TIME
-do
- if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
- eval $as_var=C; export $as_var
- else
- ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
+LC_ALL=C
+export LC_ALL
+LANGUAGE=C
+export LANGUAGE
+
+# CDPATH.
+(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
+
+
+# as_fn_error STATUS ERROR [LINENO LOG_FD]
+# ----------------------------------------
+# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
+# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
+# script with STATUS, using 1 if that was 0.
+as_fn_error ()
+{
+ as_status=$1; test $as_status -eq 0 && as_status=1
+ if test "$4"; then
+ as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
fi
-done
+ $as_echo "$as_me: error: $2" >&2
+ as_fn_exit $as_status
+} # as_fn_error
+
+
+# as_fn_set_status STATUS
+# -----------------------
+# Set $? to STATUS, without forking.
+as_fn_set_status ()
+{
+ return $1
+} # as_fn_set_status
+
+# as_fn_exit STATUS
+# -----------------
+# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
+as_fn_exit ()
+{
+ set +e
+ as_fn_set_status $1
+ exit $1
+} # as_fn_exit
+
+# as_fn_unset VAR
+# ---------------
+# Portably unset VAR.
+as_fn_unset ()
+{
+ { eval $1=; unset $1;}
+}
+as_unset=as_fn_unset
+# as_fn_append VAR VALUE
+# ----------------------
+# Append the text in VALUE to the end of the definition contained in VAR. Take
+# advantage of any shell optimizations that allow amortized linear growth over
+# repeated appends, instead of the typical quadratic growth present in naive
+# implementations.
+if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
+ eval 'as_fn_append ()
+ {
+ eval $1+=\$2
+ }'
+else
+ as_fn_append ()
+ {
+ eval $1=\$$1\$2
+ }
+fi # as_fn_append
+
+# as_fn_arith ARG...
+# ------------------
+# Perform arithmetic evaluation on the ARGs, and store the result in the
+# global $as_val. Take advantage of shells that can avoid forks. The arguments
+# must be portable across $(()) and expr.
+if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
+ eval 'as_fn_arith ()
+ {
+ as_val=$(( $* ))
+ }'
+else
+ as_fn_arith ()
+ {
+ as_val=`expr "$@" || test $? -eq 1`
+ }
+fi # as_fn_arith
+
-# Required to use basename.
if expr a : '\(a\)' >/dev/null 2>&1 &&
test "X`expr 00001 : '.*\(...\)'`" = X001; then
as_expr=expr
@@ -2838,13 +2950,17 @@ else
as_basename=false
fi
+if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
+ as_dirname=dirname
+else
+ as_dirname=false
+fi
-# Name of the executable.
as_me=`$as_basename -- "$0" ||
$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
X"$0" : 'X\(//\)$' \| \
X"$0" : 'X\(/\)' \| . 2>/dev/null ||
-echo X/"$0" |
+$as_echo X/"$0" |
sed '/^.*\/\([^/][^/]*\)\/*$/{
s//\1/
q
@@ -2859,104 +2975,103 @@ echo X/"$0" |
}
s/.*/./; q'`
-# CDPATH.
-$as_unset CDPATH
-
-
-
- as_lineno_1=$LINENO
- as_lineno_2=$LINENO
- test "x$as_lineno_1" != "x$as_lineno_2" &&
- test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
-
- # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
- # uniformly replaced by the line number. The first 'sed' inserts a
- # line-number line after each line using $LINENO; the second 'sed'
- # does the real work. The second script uses 'N' to pair each
- # line-number line with the line containing $LINENO, and appends
- # trailing '-' during substitution so that $LINENO is not a special
- # case at line end.
- # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
- # scripts with optimization help from Paolo Bonzini. Blame Lee
- # E. McMahon (1931-1989) for sed's syntax. :-)
- sed -n '
- p
- /[$]LINENO/=
- ' <$as_myself |
- sed '
- s/[$]LINENO.*/&-/
- t lineno
- b
- :lineno
- N
- :loop
- s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
- t loop
- s/-\n.*//
- ' >$as_me.lineno &&
- chmod +x "$as_me.lineno" ||
- { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
- { (exit 1); exit 1; }; }
-
- # Don't try to exec as it changes $[0], causing all sort of problems
- # (the dirname of $[0] is not the place where we might find the
- # original and so on. Autoconf is especially sensitive to this).
- . "./$as_me.lineno"
- # Exit status is that of the last command.
- exit
-}
-
-
-if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
- as_dirname=dirname
-else
- as_dirname=false
-fi
+# Avoid depending upon Character Ranges.
+as_cr_letters='abcdefghijklmnopqrstuvwxyz'
+as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
+as_cr_Letters=$as_cr_letters$as_cr_LETTERS
+as_cr_digits='0123456789'
+as_cr_alnum=$as_cr_Letters$as_cr_digits
ECHO_C= ECHO_N= ECHO_T=
-case `echo -n x` in
+case `echo -n x` in #(((((
-n*)
- case `echo 'x\c'` in
+ case `echo 'xy\c'` in
*c*) ECHO_T=' ';; # ECHO_T is single tab character.
- *) ECHO_C='\c';;
+ xy) ECHO_C='\c';;
+ *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
+ ECHO_T=' ';;
esac;;
*)
ECHO_N='-n';;
esac
-if expr a : '\(a\)' >/dev/null 2>&1 &&
- test "X`expr 00001 : '.*\(...\)'`" = X001; then
- as_expr=expr
-else
- as_expr=false
-fi
-
rm -f conf$$ conf$$.exe conf$$.file
if test -d conf$$.dir; then
rm -f conf$$.dir/conf$$.file
else
rm -f conf$$.dir
- mkdir conf$$.dir
-fi
-echo >conf$$.file
-if ln -s conf$$.file conf$$ 2>/dev/null; then
- as_ln_s='ln -s'
- # ... but there are two gotchas:
- # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
- # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
- # In both cases, we have to default to `cp -p'.
- ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
+ mkdir conf$$.dir 2>/dev/null
+fi
+if (echo >conf$$.file) 2>/dev/null; then
+ if ln -s conf$$.file conf$$ 2>/dev/null; then
+ as_ln_s='ln -s'
+ # ... but there are two gotchas:
+ # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
+ # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
+ # In both cases, we have to default to `cp -p'.
+ ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
+ as_ln_s='cp -p'
+ elif ln conf$$.file conf$$ 2>/dev/null; then
+ as_ln_s=ln
+ else
as_ln_s='cp -p'
-elif ln conf$$.file conf$$ 2>/dev/null; then
- as_ln_s=ln
+ fi
else
as_ln_s='cp -p'
fi
rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
rmdir conf$$.dir 2>/dev/null
+
+# as_fn_mkdir_p
+# -------------
+# Create "$as_dir" as a directory, including parents if necessary.
+as_fn_mkdir_p ()
+{
+
+ case $as_dir in #(
+ -*) as_dir=./$as_dir;;
+ esac
+ test -d "$as_dir" || eval $as_mkdir_p || {
+ as_dirs=
+ while :; do
+ case $as_dir in #(
+ *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
+ *) as_qdir=$as_dir;;
+ esac
+ as_dirs="'$as_qdir' $as_dirs"
+ as_dir=`$as_dirname -- "$as_dir" ||
+$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$as_dir" : 'X\(//\)[^/]' \| \
+ X"$as_dir" : 'X\(//\)$' \| \
+ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$as_dir" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)[^/].*/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+ test -d "$as_dir" && break
+ done
+ test -z "$as_dirs" || eval "mkdir $as_dirs"
+ } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
+
+
+} # as_fn_mkdir_p
if mkdir -p . 2>/dev/null; then
- as_mkdir_p=:
+ as_mkdir_p='mkdir -p "$as_dir"'
else
test -d ./-p && rmdir ./-p
as_mkdir_p=false
@@ -2973,12 +3088,12 @@ else
as_test_x='
eval sh -c '\''
if test -d "$1"; then
- test -d "$1/.";
+ test -d "$1/.";
else
- case $1 in
- -*)set "./$1";;
+ case $1 in #(
+ -*)set "./$1";;
esac;
- case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
+ case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
???[sx]*):;;*)false;;esac;fi
'\'' sh
'
@@ -2993,13 +3108,19 @@ as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
exec 6>&1
+## ----------------------------------- ##
+## Main body of $CONFIG_STATUS script. ##
+## ----------------------------------- ##
+_ASEOF
+test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
-# Save the log message, to keep $[0] and so on meaningful, and to
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+# Save the log message, to keep $0 and so on meaningful, and to
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
This file was extended by $as_me, which was
-generated by GNU Autoconf 2.61. Invocation command line was
+generated by GNU Autoconf 2.68. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
CONFIG_HEADERS = $CONFIG_HEADERS
@@ -3012,27 +3133,36 @@ on `(hostname || uname -n) 2>/dev/null | sed 1q`
_ACEOF
-cat >>$CONFIG_STATUS <<_ACEOF
+case $ac_config_files in *"
+"*) set x $ac_config_files; shift; ac_config_files=$*;;
+esac
+
+
+
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
# Files that config.status was made for.
config_files="$ac_config_files"
config_commands="$ac_config_commands"
_ACEOF
-cat >>$CONFIG_STATUS <<\_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
ac_cs_usage="\
-\`$as_me' instantiates files from templates according to the
-current configuration.
+\`$as_me' instantiates files and other configuration actions
+from templates according to the current configuration. Unless the files
+and actions are specified as TAGs, all are instantiated by default.
-Usage: $0 [OPTIONS] [FILE]...
+Usage: $0 [OPTION]... [TAG]...
-h, --help print this help, then exit
-V, --version print version number and configuration settings, then exit
- -q, --quiet do not print progress messages
+ --config print configuration, then exit
+ -q, --quiet, --silent
+ do not print progress messages
-d, --debug don't remove temporary files
--recheck update $as_me by reconfiguring in the same conditions
- --file=FILE[:TEMPLATE]
- instantiate the configuration file FILE
+ --file=FILE[:TEMPLATE]
+ instantiate the configuration file FILE
Configuration files:
$config_files
@@ -3040,36 +3170,42 @@ $config_files
Configuration commands:
$config_commands
-Report bugs to <bug-autoconf@gnu.org>."
+Report bugs to the package provider."
_ACEOF
-cat >>$CONFIG_STATUS <<_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
config.status
-configured by $0, generated by GNU Autoconf 2.61,
- with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
+configured by $0, generated by GNU Autoconf 2.68,
+ with options \\"\$ac_cs_config\\"
-Copyright (C) 2006 Free Software Foundation, Inc.
+Copyright (C) 2010 Free Software Foundation, Inc.
This config.status script is free software; the Free Software Foundation
gives unlimited permission to copy, distribute and modify it."
ac_pwd='$ac_pwd'
srcdir='$srcdir'
INSTALL='$INSTALL'
+test -n "\$AWK" || AWK=awk
_ACEOF
-cat >>$CONFIG_STATUS <<\_ACEOF
-# If no file are specified by the user, then we need to provide default
-# value. By we need to know if files were specified by the user.
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+# The default lists apply if the user does not specify any file.
ac_need_defaults=:
while test $# != 0
do
case $1 in
- --*=*)
+ --*=?*)
ac_option=`expr "X$1" : 'X\([^=]*\)='`
ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
ac_shift=:
;;
+ --*=)
+ ac_option=`expr "X$1" : 'X\([^=]*\)='`
+ ac_optarg=
+ ac_shift=:
+ ;;
*)
ac_option=$1
ac_optarg=$2
@@ -3082,25 +3218,30 @@ do
-recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
ac_cs_recheck=: ;;
--version | --versio | --versi | --vers | --ver | --ve | --v | -V )
- echo "$ac_cs_version"; exit ;;
+ $as_echo "$ac_cs_version"; exit ;;
+ --config | --confi | --conf | --con | --co | --c )
+ $as_echo "$ac_cs_config"; exit ;;
--debug | --debu | --deb | --de | --d | -d )
debug=: ;;
--file | --fil | --fi | --f )
$ac_shift
- CONFIG_FILES="$CONFIG_FILES $ac_optarg"
+ case $ac_optarg in
+ *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
+ '') as_fn_error $? "missing file argument" ;;
+ esac
+ as_fn_append CONFIG_FILES " '$ac_optarg'"
ac_need_defaults=false;;
--he | --h | --help | --hel | -h )
- echo "$ac_cs_usage"; exit ;;
+ $as_echo "$ac_cs_usage"; exit ;;
-q | -quiet | --quiet | --quie | --qui | --qu | --q \
| -silent | --silent | --silen | --sile | --sil | --si | --s)
ac_cs_silent=: ;;
# This is an error.
- -*) { echo "$as_me: error: unrecognized option: $1
-Try \`$0 --help' for more information." >&2
- { (exit 1); exit 1; }; } ;;
+ -*) as_fn_error $? "unrecognized option: \`$1'
+Try \`$0 --help' for more information." ;;
- *) ac_config_targets="$ac_config_targets $1"
+ *) as_fn_append ac_config_targets " $1"
ac_need_defaults=false ;;
esac
@@ -3115,32 +3256,41 @@ if $ac_cs_silent; then
fi
_ACEOF
-cat >>$CONFIG_STATUS <<_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
if \$ac_cs_recheck; then
- echo "running CONFIG_SHELL=$SHELL $SHELL $0 "$ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
- CONFIG_SHELL=$SHELL
+ set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
+ shift
+ \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
+ CONFIG_SHELL='$SHELL'
export CONFIG_SHELL
- exec $SHELL "$0"$ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
+ exec "\$@"
fi
_ACEOF
-cat >>$CONFIG_STATUS <<\_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
exec 5>>config.log
{
echo
sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
## Running $as_me. ##
_ASBOX
- echo "$ac_log"
+ $as_echo "$ac_log"
} >&5
_ACEOF
-cat >>$CONFIG_STATUS <<_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
#
# INIT-COMMANDS
#
AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"
srcdir=${srcdir}
+ target=${target}
+ with_multisubdir=${with_multisubdir}
+ ac_configure_args="${ac_configure_args} --enable-multilib"
+ CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
+ libgloss_topdir=${libgloss_topdir}
+
+srcdir=${srcdir}
target=${target}
with_multisubdir=${with_multisubdir}
ac_configure_args="${ac_configure_args} --enable-multilib"
@@ -3150,18 +3300,17 @@ libgloss_topdir=${libgloss_topdir}
_ACEOF
-cat >>$CONFIG_STATUS <<\_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# Handling of arguments.
for ac_config_target in $ac_config_targets
do
case $ac_config_target in
"depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
+ "cpu-init/Makefile") CONFIG_FILES="$CONFIG_FILES cpu-init/Makefile" ;;
"Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
- *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
-echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
- { (exit 1); exit 1; }; };;
+ *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
esac
done
@@ -3183,195 +3332,228 @@ fi
# after its creation but before its name has been assigned to `$tmp'.
$debug ||
{
- tmp=
+ tmp= ac_tmp=
trap 'exit_status=$?
- { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
+ : "${ac_tmp:=$tmp}"
+ { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
' 0
- trap '{ (exit 1); exit 1; }' 1 2 13 15
+ trap 'as_fn_exit 1' 1 2 13 15
}
# Create a (secure) tmp directory for tmp files.
{
tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
- test -n "$tmp" && test -d "$tmp"
+ test -d "$tmp"
} ||
{
tmp=./conf$$-$RANDOM
(umask 077 && mkdir "$tmp")
-} ||
-{
- echo "$me: cannot create a temporary directory in ." >&2
- { (exit 1); exit 1; }
-}
-
-#
-# Set up the sed scripts for CONFIG_FILES section.
-#
+} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
+ac_tmp=$tmp
-# No need to generate the scripts if there are no CONFIG_FILES.
-# This happens for instance when ./config.status config.h
+# Set up the scripts for CONFIG_FILES section.
+# No need to generate them if there are no CONFIG_FILES.
+# This happens for instance with `./config.status config.h'.
if test -n "$CONFIG_FILES"; then
+if $AWK 'BEGIN { getline <"/dev/null" }' </dev/null 2>/dev/null; then
+ ac_cs_awk_getline=:
+ ac_cs_awk_pipe_init=
+ ac_cs_awk_read_file='
+ while ((getline aline < (F[key])) > 0)
+ print(aline)
+ close(F[key])'
+ ac_cs_awk_pipe_fini=
+else
+ ac_cs_awk_getline=false
+ ac_cs_awk_pipe_init="print \"cat <<'|#_!!_#|' &&\""
+ ac_cs_awk_read_file='
+ print "|#_!!_#|"
+ print "cat " F[key] " &&"
+ '$ac_cs_awk_pipe_init
+ # The final `:' finishes the AND list.
+ ac_cs_awk_pipe_fini='END { print "|#_!!_#|"; print ":" }'
+fi
+ac_cr=`echo X | tr X '\015'`
+# On cygwin, bash can eat \r inside `` if the user requested igncr.
+# But we know of no other shell where ac_cr would be empty at this
+# point, so we can use a bashism as a fallback.
+if test "x$ac_cr" = x; then
+ eval ac_cr=\$\'\\r\'
+fi
+ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
+if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
+ ac_cs_awk_cr='\\r'
+else
+ ac_cs_awk_cr=$ac_cr
+fi
+
+echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
_ACEOF
-# Create sed commands to just substitute file output variables.
-
-# Remaining file output variables are in a fragment that also has non-file
-# output varibles.
-
-
+# Create commands to substitute file output variables.
+{
+ echo "cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1" &&
+ echo 'cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&' &&
+ echo "$ac_subst_files" | sed 's/.*/F["&"]="$&"/' &&
+ echo "_ACAWK" &&
+ echo "_ACEOF"
+} >conf$$files.sh &&
+. ./conf$$files.sh ||
+ as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
+rm -f conf$$files.sh
+{
+ echo "cat >conf$$subs.awk <<_ACEOF" &&
+ echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
+ echo "_ACEOF"
+} >conf$$subs.sh ||
+ as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
+ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
ac_delim='%!_!# '
for ac_last_try in false false false false false :; do
- cat >conf$$subs.sed <<_ACEOF
-SHELL!$SHELL$ac_delim
-PATH_SEPARATOR!$PATH_SEPARATOR$ac_delim
-PACKAGE_NAME!$PACKAGE_NAME$ac_delim
-PACKAGE_TARNAME!$PACKAGE_TARNAME$ac_delim
-PACKAGE_VERSION!$PACKAGE_VERSION$ac_delim
-PACKAGE_STRING!$PACKAGE_STRING$ac_delim
-PACKAGE_BUGREPORT!$PACKAGE_BUGREPORT$ac_delim
-exec_prefix!$exec_prefix$ac_delim
-prefix!$prefix$ac_delim
-program_transform_name!$program_transform_name$ac_delim
-bindir!$bindir$ac_delim
-sbindir!$sbindir$ac_delim
-libexecdir!$libexecdir$ac_delim
-datarootdir!$datarootdir$ac_delim
-datadir!$datadir$ac_delim
-sysconfdir!$sysconfdir$ac_delim
-sharedstatedir!$sharedstatedir$ac_delim
-localstatedir!$localstatedir$ac_delim
-includedir!$includedir$ac_delim
-oldincludedir!$oldincludedir$ac_delim
-docdir!$docdir$ac_delim
-infodir!$infodir$ac_delim
-htmldir!$htmldir$ac_delim
-dvidir!$dvidir$ac_delim
-pdfdir!$pdfdir$ac_delim
-psdir!$psdir$ac_delim
-libdir!$libdir$ac_delim
-localedir!$localedir$ac_delim
-mandir!$mandir$ac_delim
-DEFS!$DEFS$ac_delim
-ECHO_C!$ECHO_C$ac_delim
-ECHO_N!$ECHO_N$ac_delim
-ECHO_T!$ECHO_T$ac_delim
-LIBS!$LIBS$ac_delim
-build_alias!$build_alias$ac_delim
-host_alias!$host_alias$ac_delim
-target_alias!$target_alias$ac_delim
-BUILD_CRT0_TRUE!$BUILD_CRT0_TRUE$ac_delim
-BUILD_CRT0_FALSE!$BUILD_CRT0_FALSE$ac_delim
-build!$build$ac_delim
-build_cpu!$build_cpu$ac_delim
-build_vendor!$build_vendor$ac_delim
-build_os!$build_os$ac_delim
-host!$host$ac_delim
-host_cpu!$host_cpu$ac_delim
-host_vendor!$host_vendor$ac_delim
-host_os!$host_os$ac_delim
-target!$target$ac_delim
-target_cpu!$target_cpu$ac_delim
-target_vendor!$target_vendor$ac_delim
-target_os!$target_os$ac_delim
-INSTALL_PROGRAM!$INSTALL_PROGRAM$ac_delim
-INSTALL_SCRIPT!$INSTALL_SCRIPT$ac_delim
-INSTALL_DATA!$INSTALL_DATA$ac_delim
-CC!$CC$ac_delim
-am__leading_dot!$am__leading_dot$ac_delim
-DEPDIR!$DEPDIR$ac_delim
-am__include!$am__include$ac_delim
-am__quote!$am__quote$ac_delim
-AMDEP_TRUE!$AMDEP_TRUE$ac_delim
-AMDEP_FALSE!$AMDEP_FALSE$ac_delim
-AMDEPBACKSLASH!$AMDEPBACKSLASH$ac_delim
-CCDEPMODE!$CCDEPMODE$ac_delim
-am__fastdepCC_TRUE!$am__fastdepCC_TRUE$ac_delim
-am__fastdepCC_FALSE!$am__fastdepCC_FALSE$ac_delim
-AS!$AS$ac_delim
-AR!$AR$ac_delim
-LD!$LD$ac_delim
-RANLIB!$RANLIB$ac_delim
-CCAS!$CCAS$ac_delim
-CCASFLAGS!$CCASFLAGS$ac_delim
-objtype!$objtype$ac_delim
-host_makefile_frag_path!$host_makefile_frag_path$ac_delim
-LIBOBJS!$LIBOBJS$ac_delim
-LTLIBOBJS!$LTLIBOBJS$ac_delim
-_ACEOF
+ . ./conf$$subs.sh ||
+ as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
- if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 75; then
+ ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
+ if test $ac_delim_n = $ac_delim_num; then
break
elif $ac_last_try; then
- { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
-echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
- { (exit 1); exit 1; }; }
+ as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
else
ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
fi
done
+rm -f conf$$subs.sh
-ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
-if test -n "$ac_eof"; then
- ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
- ac_eof=`expr $ac_eof + 1`
-fi
-
-cat >>$CONFIG_STATUS <<_ACEOF
-cat >"\$tmp/subs-1.sed" <<\CEOF$ac_eof
-/@[a-zA-Z_][a-zA-Z_0-9]*@/!b end
-/^[ ]*@host_makefile_frag@[ ]*$/{
-r $host_makefile_frag
-d
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
+_ACEOF
+sed -n '
+h
+s/^/S["/; s/!.*/"]=/
+p
+g
+s/^[^!]*!//
+:repl
+t repl
+s/'"$ac_delim"'$//
+t delim
+:nl
+h
+s/\(.\{148\}\)..*/\1/
+t more1
+s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
+p
+n
+b repl
+:more1
+s/["\\]/\\&/g; s/^/"/; s/$/"\\/
+p
+g
+s/.\{148\}//
+t nl
+:delim
+h
+s/\(.\{148\}\)..*/\1/
+t more2
+s/["\\]/\\&/g; s/^/"/; s/$/"/
+p
+b
+:more2
+s/["\\]/\\&/g; s/^/"/; s/$/"\\/
+p
+g
+s/.\{148\}//
+t delim
+' <conf$$subs.awk | sed '
+/^[^""]/{
+ N
+ s/\n//
+}
+' >>$CONFIG_STATUS || ac_write_fail=1
+rm -f conf$$subs.awk
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+_ACAWK
+cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
+ for (key in S) S_is_set[key] = 1
+ FS = ""
+ \$ac_cs_awk_pipe_init
+}
+{
+ line = $ 0
+ nfields = split(line, field, "@")
+ substed = 0
+ len = length(field[1])
+ for (i = 2; i < nfields; i++) {
+ key = field[i]
+ keylen = length(key)
+ if (S_is_set[key]) {
+ value = S[key]
+ line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
+ len += length(value) + length(field[++i])
+ substed = 1
+ } else
+ len += 1 + keylen
+ }
+ if (nfields == 3 && !substed) {
+ key = field[2]
+ if (F[key] != "" && line ~ /^[ ]*@.*@[ ]*$/) {
+ \$ac_cs_awk_read_file
+ next
+ }
+ }
+ print line
}
+\$ac_cs_awk_pipe_fini
+_ACAWK
_ACEOF
-sed '
-s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
-s/^/s,@/; s/!/@,|#_!!_#|/
-:n
-t n
-s/'"$ac_delim"'$/,g/; t
-s/$/\\/; p
-N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
-' >>$CONFIG_STATUS <conf$$subs.sed
-rm -f conf$$subs.sed
-cat >>$CONFIG_STATUS <<_ACEOF
-:end
-s/|#_!!_#|//g
-CEOF$ac_eof
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
+ sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
+else
+ cat
+fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
+ || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
_ACEOF
-
-# VPATH may cause trouble with some makes, so we remove $(srcdir),
-# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
+# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
+# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
# trailing colons and then remove the whole line if VPATH becomes empty
# (actually we leave an empty line to preserve line numbers).
if test "x$srcdir" = x.; then
- ac_vpsub='/^[ ]*VPATH[ ]*=/{
-s/:*\$(srcdir):*/:/
-s/:*\${srcdir}:*/:/
-s/:*@srcdir@:*/:/
-s/^\([^=]*=[ ]*\):*/\1/
+ ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
+h
+s///
+s/^/:/
+s/[ ]*$/:/
+s/:\$(srcdir):/:/g
+s/:\${srcdir}:/:/g
+s/:@srcdir@:/:/g
+s/^:*//
s/:*$//
+x
+s/\(=[ ]*\).*/\1/
+G
+s/\n//
s/^[^=]*=[ ]*$//
}'
fi
-cat >>$CONFIG_STATUS <<\_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
fi # test -n "$CONFIG_FILES"
-for ac_tag in :F $CONFIG_FILES :C $CONFIG_COMMANDS
+eval set X " :F $CONFIG_FILES :C $CONFIG_COMMANDS"
+shift
+for ac_tag
do
case $ac_tag in
:[FHLC]) ac_mode=$ac_tag; continue;;
esac
case $ac_mode$ac_tag in
:[FHL]*:*);;
- :L* | :C*:*) { { echo "$as_me:$LINENO: error: Invalid tag $ac_tag." >&5
-echo "$as_me: error: Invalid tag $ac_tag." >&2;}
- { (exit 1); exit 1; }; };;
+ :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
:[FH]-) ac_tag=-:-;;
:[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
esac
@@ -3390,7 +3572,7 @@ echo "$as_me: error: Invalid tag $ac_tag." >&2;}
for ac_f
do
case $ac_f in
- -) ac_f="$tmp/stdin";;
+ -) ac_f="$ac_tmp/stdin";;
*) # Look for the file first in the build tree, then in the source tree
# (if the path is not absolute). The absolute path cannot be DOS-style,
# because $ac_f cannot contain `:'.
@@ -3399,26 +3581,34 @@ echo "$as_me: error: Invalid tag $ac_tag." >&2;}
[\\/$]*) false;;
*) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
esac ||
- { { echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5
-echo "$as_me: error: cannot find input file: $ac_f" >&2;}
- { (exit 1); exit 1; }; };;
+ as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
esac
- ac_file_inputs="$ac_file_inputs $ac_f"
+ case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
+ as_fn_append ac_file_inputs " '$ac_f'"
done
# Let's still pretend it is `configure' which instantiates (i.e., don't
# use $as_me), people would be surprised to read:
# /* config.h. Generated by config.status. */
- configure_input="Generated from "`IFS=:
- echo $* | sed 's|^[^:]*/||;s|:[^:]*/|, |g'`" by configure."
+ configure_input='Generated from '`
+ $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
+ `' by configure.'
if test x"$ac_file" != x-; then
configure_input="$ac_file. $configure_input"
- { echo "$as_me:$LINENO: creating $ac_file" >&5
-echo "$as_me: creating $ac_file" >&6;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
+$as_echo "$as_me: creating $ac_file" >&6;}
fi
+ # Neutralize special characters interpreted by sed in replacement strings.
+ case $configure_input in #(
+ *\&* | *\|* | *\\* )
+ ac_sed_conf_input=`$as_echo "$configure_input" |
+ sed 's/[\\\\&|]/\\\\&/g'`;; #(
+ *) ac_sed_conf_input=$configure_input;;
+ esac
case $ac_tag in
- *:-:* | *:-) cat >"$tmp/stdin";;
+ *:-:* | *:-) cat >"$ac_tmp/stdin" \
+ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
esac
;;
esac
@@ -3428,7 +3618,7 @@ $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
X"$ac_file" : 'X\(//\)[^/]' \| \
X"$ac_file" : 'X\(//\)$' \| \
X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
-echo X"$ac_file" |
+$as_echo X"$ac_file" |
sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
s//\1/
q
@@ -3446,55 +3636,15 @@ echo X"$ac_file" |
q
}
s/.*/./; q'`
- { as_dir="$ac_dir"
- case $as_dir in #(
- -*) as_dir=./$as_dir;;
- esac
- test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || {
- as_dirs=
- while :; do
- case $as_dir in #(
- *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #(
- *) as_qdir=$as_dir;;
- esac
- as_dirs="'$as_qdir' $as_dirs"
- as_dir=`$as_dirname -- "$as_dir" ||
-$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
- X"$as_dir" : 'X\(//\)[^/]' \| \
- X"$as_dir" : 'X\(//\)$' \| \
- X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
-echo X"$as_dir" |
- sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
- s//\1/
- q
- }
- /^X\(\/\/\)[^/].*/{
- s//\1/
- q
- }
- /^X\(\/\/\)$/{
- s//\1/
- q
- }
- /^X\(\/\).*/{
- s//\1/
- q
- }
- s/.*/./; q'`
- test -d "$as_dir" && break
- done
- test -z "$as_dirs" || eval "mkdir $as_dirs"
- } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5
-echo "$as_me: error: cannot create directory $as_dir" >&2;}
- { (exit 1); exit 1; }; }; }
+ as_dir="$ac_dir"; as_fn_mkdir_p
ac_builddir=.
case "$ac_dir" in
.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
*)
- ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
+ ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
# A ".." for each directory in $ac_dir_suffix.
- ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'`
+ ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
case $ac_top_builddir_sub in
"") ac_top_builddir_sub=. ac_top_build_prefix= ;;
*) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
@@ -3534,12 +3684,12 @@ ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
esac
_ACEOF
-cat >>$CONFIG_STATUS <<\_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# If the template does not know about datarootdir, expand it.
# FIXME: This hack should be removed a few years after 2.60.
ac_datarootdir_hack=; ac_datarootdir_seen=
-
-case `sed -n '/datarootdir/ {
+ac_sed_dataroot='
+/datarootdir/ {
p
q
}
@@ -3547,36 +3697,37 @@ case `sed -n '/datarootdir/ {
/@docdir@/p
/@infodir@/p
/@localedir@/p
-/@mandir@/p
-' $ac_file_inputs` in
+/@mandir@/p'
+case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
*datarootdir*) ac_datarootdir_seen=yes;;
*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
- { echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
-echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
+$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
_ACEOF
-cat >>$CONFIG_STATUS <<_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_datarootdir_hack='
s&@datadir@&$datadir&g
s&@docdir@&$docdir&g
s&@infodir@&$infodir&g
s&@localedir@&$localedir&g
s&@mandir@&$mandir&g
- s&\\\${datarootdir}&$datarootdir&g' ;;
+ s&\\\${datarootdir}&$datarootdir&g' ;;
esac
_ACEOF
# Neutralize VPATH when `$srcdir' = `.'.
# Shell code in configure.ac might set extrasub.
# FIXME: do we really want to maintain this feature?
-cat >>$CONFIG_STATUS <<_ACEOF
- sed "$ac_vpsub
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+ac_sed_extra="$ac_vpsub
$extrasub
_ACEOF
-cat >>$CONFIG_STATUS <<\_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
:t
/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
-s&@configure_input@&$configure_input&;t t
+s|@configure_input@|$ac_sed_conf_input|;t t
s&@top_builddir@&$ac_top_builddir_sub&;t t
+s&@top_build_prefix@&$ac_top_build_prefix&;t t
s&@srcdir@&$ac_srcdir&;t t
s&@abs_srcdir@&$ac_abs_srcdir&;t t
s&@top_srcdir@&$ac_top_srcdir&;t t
@@ -3586,26 +3737,35 @@ s&@abs_builddir@&$ac_abs_builddir&;t t
s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
s&@INSTALL@&$ac_INSTALL&;t t
$ac_datarootdir_hack
-" $ac_file_inputs | sed -f "$tmp/subs-1.sed" >$tmp/out
+"
+eval sed \"\$ac_sed_extra\" "$ac_file_inputs" |
+if $ac_cs_awk_getline; then
+ $AWK -f "$ac_tmp/subs.awk"
+else
+ $AWK -f "$ac_tmp/subs.awk" | $SHELL
+fi \
+ >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
- { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
- { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
- { echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir'
-which seems to be undefined. Please make sure it is defined." >&5
-echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
-which seems to be undefined. Please make sure it is defined." >&2;}
-
- rm -f "$tmp/stdin"
+ { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
+ { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
+ "$ac_tmp/out"`; test -z "$ac_out"; } &&
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
+which seems to be undefined. Please make sure it is defined" >&5
+$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
+which seems to be undefined. Please make sure it is defined" >&2;}
+
+ rm -f "$ac_tmp/stdin"
case $ac_file in
- -) cat "$tmp/out"; rm -f "$tmp/out";;
- *) rm -f "$ac_file"; mv "$tmp/out" $ac_file;;
- esac
+ -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
+ *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
+ esac \
+ || as_fn_error $? "could not create $ac_file" "$LINENO" 5
;;
- :C) { echo "$as_me:$LINENO: executing $ac_file commands" >&5
-echo "$as_me: executing $ac_file commands" >&6;}
+ :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
+$as_echo "$as_me: executing $ac_file commands" >&6;}
;;
esac
@@ -3626,7 +3786,7 @@ $as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
X"$mf" : 'X\(//\)[^/]' \| \
X"$mf" : 'X\(//\)$' \| \
X"$mf" : 'X\(/\)' \| . 2>/dev/null ||
-echo X"$mf" |
+$as_echo X"$mf" |
sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
s//\1/
q
@@ -3670,42 +3830,7 @@ $as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
X"$file" : 'X\(//\)[^/]' \| \
X"$file" : 'X\(//\)$' \| \
X"$file" : 'X\(/\)' \| . 2>/dev/null ||
-echo X"$file" |
- sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
- s//\1/
- q
- }
- /^X\(\/\/\)[^/].*/{
- s//\1/
- q
- }
- /^X\(\/\/\)$/{
- s//\1/
- q
- }
- /^X\(\/\).*/{
- s//\1/
- q
- }
- s/.*/./; q'`
- { as_dir=$dirpart/$fdir
- case $as_dir in #(
- -*) as_dir=./$as_dir;;
- esac
- test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || {
- as_dirs=
- while :; do
- case $as_dir in #(
- *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #(
- *) as_qdir=$as_dir;;
- esac
- as_dirs="'$as_qdir' $as_dirs"
- as_dir=`$as_dirname -- "$as_dir" ||
-$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
- X"$as_dir" : 'X\(//\)[^/]' \| \
- X"$as_dir" : 'X\(//\)$' \| \
- X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
-echo X"$as_dir" |
+$as_echo X"$file" |
sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
s//\1/
q
@@ -3723,28 +3848,26 @@ echo X"$as_dir" |
q
}
s/.*/./; q'`
- test -d "$as_dir" && break
- done
- test -z "$as_dirs" || eval "mkdir $as_dirs"
- } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5
-echo "$as_me: error: cannot create directory $as_dir" >&2;}
- { (exit 1); exit 1; }; }; }
+ as_dir=$dirpart/$fdir; as_fn_mkdir_p
# echo "creating $dirpart/$file"
echo '# dummy' > "$dirpart/$file"
done
done
;;
+ "cpu-init/Makefile":F) . ${libgloss_topdir}/config-ml.in ;;
"Makefile":F) . ${libgloss_topdir}/config-ml.in ;;
esac
done # for ac_tag
-{ (exit 0); exit 0; }
+as_fn_exit 0
_ACEOF
-chmod +x $CONFIG_STATUS
ac_clean_files=$ac_clean_files_save
+test $ac_write_fail = 0 ||
+ as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
+
# configure is writing to config.log, and then calls config.status.
# config.status does its own redirection, appending to config.log.
@@ -3764,7 +3887,11 @@ if test "$no_create" != yes; then
exec 5>>config.log
# Use ||, not &&, to avoid exiting from the if with $? = 1, which
# would make configure fail if this is the last instruction.
- $ac_cs_success || { (exit 1); exit 1; }
+ $ac_cs_success || as_fn_exit 1
+fi
+if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
+$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
fi
diff --git a/libgloss/arm/configure.in b/libgloss/arm/configure.in
index 970952fa8..39c15d724 100644
--- a/libgloss/arm/configure.in
+++ b/libgloss/arm/configure.in
@@ -49,7 +49,7 @@ AC_PROG_RANLIB
LIB_AM_PROG_AS
case "${target}" in
- *-*-elf | *-*-eabi)
+ *-*-elf | *-*-eabi | *-*-tirtos*)
objtype=elf-
;;
*-*-coff)
@@ -59,7 +59,7 @@ esac
AC_SUBST(objtype)
-host_makefile_frag=${srcdir}/../config/default.mh
+host_makefile_frag=`cd $srcdir/../config;pwd`/default.mh
dnl We have to assign the same value to other variables because autoconf
dnl doesn't provide a mechanism to substitute a replacement keyword with
@@ -69,6 +69,21 @@ host_makefile_frag_path=$host_makefile_frag
AC_SUBST(host_makefile_frag_path)
AC_SUBST_FILE(host_makefile_frag)
+# Configure cpu init plug-ins
+if test -d "${srcdir}/cpu-init"; then
+ subdirs="${subdirs} cpu-init"
+ AC_CONFIG_FILES(cpu-init/Makefile,
+ . ${libgloss_topdir}/config-ml.in,
+ srcdir=${srcdir}
+ target=${target}
+ with_multisubdir=${with_multisubdir}
+ ac_configure_args="${ac_configure_args} --enable-multilib"
+ CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
+ libgloss_topdir=${libgloss_topdir}
+ )
+ AC_SUBST(subdirs)
+fi
+
AC_CONFIG_FILES(Makefile,
. ${libgloss_topdir}/config-ml.in,
srcdir=${srcdir}
diff --git a/libgloss/arm/cpu-init/Makefile.in b/libgloss/arm/cpu-init/Makefile.in
new file mode 100644
index 000000000..547c58daf
--- /dev/null
+++ b/libgloss/arm/cpu-init/Makefile.in
@@ -0,0 +1,87 @@
+#
+#
+DESTDIR =
+VPATH = @srcdir@ @srcdir@/.. @srcdir@/../..
+srcdir = @srcdir@
+objdir = .
+srcroot = $(srcdir)/../../..
+objroot = $(objdir)/../../..
+
+prefix = @prefix@
+exec_prefix = @exec_prefix@
+
+host_alias = @host_alias@
+target_alias = @target_alias@
+
+bindir = @bindir@
+libdir = @libdir@
+tooldir = $(exec_prefix)/$(target_alias)
+
+objtype = @objtype@
+
+INSTALL = @INSTALL@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_DATA = @INSTALL_DATA@
+
+# Multilib support variables.
+# TOP is used instead of MULTI{BUILD,SRC}TOP.
+MULTISRCTOP =
+MULTIBUILDTOP =
+MULTIDIRS =
+MULTISUBDIR =
+MULTIDO = true
+MULTICLEAN = true
+
+SHELL = /bin/sh
+
+CC = @CC@
+
+AS = @AS@
+AR = @AR@
+LD = @LD@
+RANLIB = @RANLIB@
+
+CPU_INIT_OBJS = rdimon-aem.o
+CPU_INIT_INSTALL = install-cpu-init
+
+CFLAGS = -g
+
+# Host specific makefile fragment comes in here.
+@host_makefile_frag@
+
+.PHONY: all
+all: ${CPU_INIT_OBJS}
+
+#
+# here's where we build the test programs for each target
+#
+.PHONY: test
+test:
+
+# Static pattern rule for assembling cpu init files to object files.
+${CPU_INIT_OBJS}: %.o: %.S
+ $(CC) $(CFLAGS_FOR_TARGET) $(CFLAGS) $(INCLUDES) -DARM_RDI_MONITOR -o $@ -c $<
+
+clean mostlyclean:
+ rm -f a.out core *.i *.o *-test *.srec *.dis *.x
+
+distclean maintainer-clean realclean: clean
+ rm -f Makefile *~
+
+.PHONY: install info install-info clean-info
+install: ${CPU_INIT_INSTALL}
+
+install-cpu-init:
+ test -d $(DESTDIR)${tooldir}/lib${MULTISUBDIR}/cpu-init || mkdir $(DESTDIR)${tooldir}/lib${MULTISUBDIR}/cpu-init
+ set -e; for x in ${CPU_INIT_OBJS}; do ${INSTALL_DATA} $$x $(DESTDIR)${tooldir}/lib${MULTISUBDIR}/cpu-init/$$x; done
+
+doc:
+info:
+install-info:
+clean-info:
+
+Makefile: Makefile.in ../config.status @host_makefile_frag_path@
+ $(SHELL) ../config.status --file cpu-init/Makefile
+
+../config.status: ../configure
+ $(SHELL) ../config.status --recheck
diff --git a/libgloss/arm/cpu-init/rdimon-aem.S b/libgloss/arm/cpu-init/rdimon-aem.S
new file mode 100644
index 000000000..95b86e4d4
--- /dev/null
+++ b/libgloss/arm/cpu-init/rdimon-aem.S
@@ -0,0 +1,539 @@
+/* Copyright (c) 2005-2013 ARM Ltd. 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. The name of the company may not be used to endorse or promote
+ products derived from this software without specific prior written
+ permission.
+
+ THIS SOFTWARE IS PROVIDED BY ARM LTD ``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 ARM LTD 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. */
+
+/* This file gives a basic initialisation of a Cortex-A series core. It is
+ the bare minimum required to get Cortex-A core running with a semihosting
+ interface.
+
+ It sets up a basic 1:1 phsyical address to virtual address mapping;
+ turns the MMU on; enables branch prediction; activates any integrated
+ caches; enables the Advanced SIMD and VFP co-processors; and installs
+ basic exception handlers.
+
+ It does not handle peripherals, and assumes all memory is Normal.
+
+ It does not change processor state from the startup privilege and security
+ level.
+
+ This has only been tested to work in ARM state.
+
+ By default it assumes exception vectors are located from address 0.
+ However, if this is not true they can be moved by defining the
+ _rdimon_vector_base symbol. For example if you have HIVECS enabled you
+ may pass --defsym _rdimon_vector_base=0xffff0000 on the linker command
+ line. */
+
+ /* __ARM_ARCH_PROFILE is defined from GCC 4.8 onwards, however __ARM_ARCH_7A
+ has been defined since 4.2 onwards, which is when v7-a support was added
+ and hence 'A' profile support was added in the compiler. Allow for this
+ file to be built with older compilers. */
+#if defined(__ARM_ARCH_7A__) || (__ARM_ARCH_PROFILE == 'A')
+ .syntax unified
+ .arch armv7-a
+ .arm
+
+ @ CPU Initialisation
+ .globl _rdimon_hw_init_hook
+ .type _rdimon_hw_init_hook, %function
+
+_rdimon_hw_init_hook:
+ @ Only run the code on CPU 0 - otherwise spin
+ mrc 15, 0, r4, cr0, cr0, 5 @ Read MPIDR
+ ands r4, r4, #15
+spin:
+ bne spin
+
+ mov r10, lr @ Save LR for final return
+
+#ifdef __ARMEB__
+ @ Setup for Big Endian
+ setend be
+ mrc 15, 0, r4, cr1, cr0, 0 @ Read SCTLR
+ orr r4, r4, #(1<<25) @ Switch to Big Endian (Set SCTLR.EE)
+ mcr 15, 0, r4, cr1, cr0, 0 @ Write SCTLR
+#else
+ @ Setup for Little Endian
+ setend le
+ mrc 15, 0, r4, cr1, cr0, 0 @ Read SCTLR
+ bic r4, r4, #(1<<25) @ Switch to LE (unset SCTLR.EE)
+ mcr 15, 0, r4, cr1, cr0, 0 @ Write SCTLR
+#endif
+
+ bl is_a15_a7
+
+ @ For Cortex-A15 and Cortex-A7 only:
+ @ Write zero into the ACTLR to turn everything on.
+ itt eq
+ moveq r4, #0
+ mcreq 15, 0, r4, c1, c0, 1
+ isb
+
+ @ For Cortex-A15 and Cortex-A7 only:
+ @ Set ACTLR:SMP bit before enabling the caches and MMU,
+ @ or performing any cache and TLB maintenance operations.
+ ittt eq
+ mrceq 15, 0, r4, c1, c0, 1 @ Read ACTLR
+ orreq r4, r4, #(1<<6) @ Enable ACTLR:SMP
+ mcreq 15, 0, r4, c1, c0, 1 @ Write ACTLR
+ isb
+
+ @ Setup for exceptions being taken to Thumb/ARM state
+ mrc 15, 0, r4, cr1, cr0, 0 @ Read SCTLR
+#if defined(__thumb__)
+ orr r4, r4, #(1 << 30) @ Enable SCTLR.TE
+#else
+ bic r4, r4, #(1 << 30) @ Disable SCTLR.TE
+#endif
+ mcr 15, 0, r4, cr1, cr0, 0 @ Write SCTLR
+
+ bl __reset_caches
+
+ mrc 15, 0, r4, cr1, cr0, 0 @ Read SCTLR
+ orr r4, r4, #(1<<22) @ Enable unaligned mode
+ bic r4, r4, #2 @ Disable alignment faults
+ bic r4, r4, #1 @ Disable MMU
+ mcr 15, 0, r4, cr1, cr0, 0 @ Write SCTLR
+
+ mov r4, #0
+ mcr 15, 0, r4, cr8, cr7, 0 @ Write TLBIALL - Invaliidate unified
+ @ TLB
+ @ Setup MMU Primary table P=V mapping.
+ mvn r4, #0
+ mcr 15, 0, r4, cr3, cr0, 0 @ Write DACR
+
+ mov r4, #0 @ Always use TTBR0, no LPAE
+ mcr 15, 0, r4, cr2, cr0, 2 @ Write TTBCR
+ adr r4, page_table_addr @ Load the base for vectors
+ ldr r4, [r4]
+ mrc p15, 0, r0, c0, c0, 5 @ read MPIDR
+ tst r0, #0x80000000 @ bis[31]
+ @ Set page table flags - there are two page table flag formats for the
+ @ architecture. For systems without multiprocessor extensions we use 0x1
+ @ which is Inner cacheable/Outer non-cacheable. For systems with
+ @ multiprocessor extensions we use 0x59 which is Inner/Outer write-back,
+ @ no write-allocate, and cacheable. See the ARMARM-v7AR for more details.
+ it ne
+ addne r4, r4, #0x58
+ add r4, r4, #1
+
+ mcr 15, 0, r4, cr2, cr0, 0 @ Write TTBR0
+
+ mov r0, #34 @ 0x22 @ TR0 and TR1 - normal memory
+ orr r0, r0, #(1 << 19) @ Shareable
+ mcr 15, 0, r0, cr10, cr2, 0 @ Write PRRR
+ movw r0, #0x33
+ movt r0, #0x33
+ mcr 15, 0, r0, cr10, cr2, 1 @ Write NMRR
+ mrc 15, 0, r0, cr1, cr0, 0 @ Read SCTLR
+ bic r0, r0, #(1 << 28) @ Clear TRE bit
+ mcr 15, 0, r0, cr1, cr0, 0 @ Write SCTLR
+
+ @ Now install the vector code - we move the Vector code from where it is
+ @ in the image to be based at _rdimon_vector_base. We have to do this copy
+ @ as the code is all PC-relative. We actually cheat and do a BX <reg> so
+ @ that we are at a known address relatively quickly and have to move as
+ @ little code as possible.
+ mov r7, #(VectorCode_Limit - VectorCode)
+ adr r5, VectorCode
+ adr r6, vector_base_addr @ Load the base for vectors
+ ldr r6, [r6]
+
+copy_loop: @ Do the copy
+ ldr r4, [r5], #4
+ str r4, [r6], #4
+ subs r7, r7, #4
+ bne copy_loop
+
+ mrc 15, 0, r4, cr1, cr0, 0 @ Read SCTLR
+ bic r4, r4, #0x1000 @ Disable I Cache
+ bic r4, r4, #4 @ Disable D Cache
+ orr r4, r4, #1 @ Enable MMU
+ bic r4, r4, #(1 << 28) @ Clear TRE bit
+ mcr 15, 0, r4, cr1, cr0, 0 @ Write SCTLR
+ mrc 15, 0, r4, cr1, cr0, 2 @ Read CPACR
+ orr r4, r4, #0x00f00000 @ Turn on VFP Co-procs
+ bic r4, r4, #0x80000000 @ Clear ASEDIS bit
+ mcr 15, 0, r4, cr1, cr0, 2 @ Write CPACR
+ isb
+ mov r4, #0
+ mcr 15, 0, r4, cr7, cr5, 4 @ Flush prefetch buffer
+ mrc 15, 0, r4, cr1, cr0, 2 @ Read CPACR
+ ubfx r4, r4, #20, #4 @ Extract bits [20, 23)
+ cmp r4, #0xf @ If not all set then the CPU does not
+ itt eq @ have FP or Advanced SIMD.
+ moveq r4, #0x40000000 @ Enable FP and Advanced SIMD
+ mcreq 10, 7, r4, cr8, cr0, 0 @ vmsr fpexc, r4
+skip_vfp_enable:
+ bl __enable_caches @ Turn caches on
+ bx r10 @ Return to CRT startup routine
+
+ @ This enable us to be more precise about which caches we want
+init_cpu_client_enable_dcache:
+init_cpu_client_enable_icache:
+ mov r0, #1
+ bx lr
+
+vector_base_addr:
+ .word _rdimon_vector_base
+ .weak _rdimon_vector_base
+page_table_addr:
+ .word page_tables
+
+ @ Vector code - must be PIC and in ARM state.
+VectorCode:
+ b vector_reset
+ b vector_undef
+ b vector_swi
+ b vector_prefetch
+ b vector_dataabt
+ b vector_reserved
+ b vector_irq
+ b vector_fiq
+
+vector_reset:
+ adr sp, vector_sp_base
+ push {r0, r1, r2, r3, r4, r5, r6, r7, r8, r9, sl, fp, ip, lr}
+ mov r4, #0
+ b vector_common
+vector_undef:
+ adr sp, vector_sp_base
+ push {r0, r1, r2, r3, r4, r5, r6, r7, r8, r9, sl, fp, ip, lr}
+ mov r4, #1
+ b vector_common
+vector_swi:
+ adr sp, vector_sp_base
+ push {r0, r1, r2, r3, r4, r5, r6, r7, r8, r9, sl, fp, ip, lr}
+ mov r4, #2
+ b vector_common
+vector_prefetch:
+ adr sp, vector_sp_base
+ push {r0, r1, r2, r3, r4, r5, r6, r7, r8, r9, sl, fp, ip, lr}
+ mov r4, #3
+ b vector_common
+vector_dataabt:
+ adr sp, vector_sp_base
+ push {r0, r1, r2, r3, r4, r5, r6, r7, r8, r9, sl, fp, ip, lr}
+ mov r4, #4
+ b vector_common
+vector_reserved:
+ adr sp, vector_sp_base
+ push {r0, r1, r2, r3, r4, r5, r6, r7, r8, r9, sl, fp, ip, lr}
+ mov r4, #5
+ b vector_common
+vector_irq:
+ adr sp, vector_sp_base
+ push {r0, r1, r2, r3, r4, r5, r6, r7, r8, r9, sl, fp, ip, lr}
+ mov r4, #6
+ b vector_common
+vector_fiq:
+ adr sp, vector_sp_base
+ push {r0, r1, r2, r3, r4, r5, r6, r7, r8, r9, sl, fp, ip, lr}
+ mov r4, #7
+ b vector_common
+vector_common:
+ adr r1, vector_common_adr @ Find where we're going to
+ ldr r1, [r1]
+ bx r1 @ And branch there
+vector_common_adr:
+ .word vector_common_2 @ Common handling code
+
+ @ Vector stack
+ .p2align 3 @ Align to 8 byte boundary boundary to
+ @ keep ABI compatibility
+ .fill 32, 4, 0 @ 32-entry stack is enough for vector
+ @ handlers.
+vector_sp_base:
+VectorCode_Limit:
+ @ End of PIC code for vectors
+
+ @ Common Handling of vectors
+ .type vector_common_2, %function
+vector_common_2:
+ mrs r1, APSR
+ mrs r2, SPSR
+ push {r1, r2} @ Save PSRs
+
+ @ Output the vector we have caught
+ bl out_nl
+ adr r0, which_vector
+ bl out_string
+ adr r0, vector_names
+ mov r1, #11
+ mla r0, r4, r1, r0
+ bl out_string
+ bl out_nl
+
+ @ Dump the registers
+ adrl r6, register_names
+ mov r7, #0
+dump_r_loop:
+ mov r0, r6
+ bl out_string
+ add r6, r6, #6
+ ldr r0, [sp, r7, lsl #2]
+ bl out_word
+ bl out_nl
+ add r7, r7, #1
+ cmp r7, #16
+ blt dump_r_loop
+ adr r0, end
+ bl out_string
+
+ @ And exit
+ mov r0, #24
+ orr r1, r4, #0x20000
+ svc 0x00123456
+
+ @ Output the string in r0
+out_string:
+ push {lr}
+ mov r1, r0
+ mov r0, #4
+ svc 0x00123456
+ pop {pc}
+
+ @ Output a New-line
+out_nl:
+ mov r0, #10
+ @ Fallthrough
+
+ @ Output the character in r0
+out_char:
+ push {lr}
+ strb r0, [sp, #-4]!
+ mov r0, #3
+ mov r1, sp
+ svc 0x00123456
+ add sp, sp, #4
+ pop {pc}
+
+ @ Output the value of r0 as a hex-word
+out_word:
+ push {r4, r5, r6, lr}
+ mov r4, r0
+ mov r5, #28
+ adr r6, hexchars
+word_loop:
+ lsr r0, r4, r5
+ and r0, r0, #15
+ ldrb r0, [r6, r0]
+ bl out_char
+ subs r5, r5, #4
+ bpl word_loop
+ pop {r4, r5, r6, pc}
+
+hexchars:
+ .ascii "0123456789abcdef"
+
+which_vector:
+ .asciz "Hit vector:"
+end:
+ .asciz "End.\n"
+
+vector_names:
+ .asciz "reset "
+ .asciz "undef "
+ .asciz "swi "
+ .asciz "prefetch "
+ .asciz "data abort"
+ .asciz "reserved "
+ .asciz "irq "
+ .asciz "fiq "
+
+register_names:
+ .asciz "apsr "
+ .asciz "spsr "
+ .asciz "r0 "
+ .asciz "r1 "
+ .asciz "r2 "
+ .asciz "r3 "
+ .asciz "r4 "
+ .asciz "r5 "
+ .asciz "r6 "
+ .asciz "r7 "
+ .asciz "r8 "
+ .asciz "r9 "
+ .asciz "r10 "
+ .asciz "r11 "
+ .asciz "r12 "
+ .asciz "r14 "
+
+ .p2align 3
+
+
+ @ Enable the caches
+__enable_caches:
+ mov r0, #0
+ mcr 15, 0, r0, cr8, cr7, 0 @ Invalidate all unified-TLB
+ mov r0, #0
+ mcr 15, 0, r0, cr7, cr5, 6 @ Invalidate branch predictor
+ mrc 15, 0, r4, cr1, cr0, 0 @ Read SCTLR
+ orr r4, r4, #0x800 @ Enable branch predictor
+ mcr 15, 0, r4, cr1, cr0, 0 @ Set SCTLR
+ mov r5, lr @ Save LR as we're going to BL
+ mrc 15, 0, r4, cr1, cr0, 0 @ Read SCTLR
+ bl init_cpu_client_enable_icache
+ cmp r0, #0
+ it ne
+ orrne r4, r4, #0x1000 @ Enable I-Cache
+ bl init_cpu_client_enable_dcache
+ cmp r0, #0
+ it ne
+ orrne r4, r4, #4
+ mcr 15, 0, r4, cr1, cr0, 0 @ Enable D-Cache
+ bx r5 @ Return
+
+__reset_caches:
+ mov ip, lr @ Save LR
+ mov r0, #0
+ mcr 15, 0, r0, cr7, cr5, 6 @ Invalidate branch predictor
+ mrc 15, 0, r6, cr1, cr0, 0 @ Read SCTLR
+ mrc 15, 0, r0, cr1, cr0, 0 @ Read SCTLR!
+ bic r0, r0, #0x1000 @ Disable I cache
+ mcr 15, 0, r0, cr1, cr0, 0 @ Write SCTLR
+ mrc 15, 1, r0, cr0, cr0, 1 @ Read CLIDR
+ tst r0, #3 @ Harvard Cache?
+ mov r0, #0
+ it ne
+ mcrne 15, 0, r0, cr7, cr5, 0 @ Invalidate Instruction Cache?
+
+ mrc 15, 0, r1, cr1, cr0, 0 @ Read SCTLR (again!)
+ orr r1, r1, #0x800 @ Enable branch predictor
+
+ @ If we're not enabling caches we have
+ @ no more work to do.
+ bl init_cpu_client_enable_icache
+ cmp r0, #0
+ it ne
+ orrne r1, r1, #0x1000 @ Enable I-Cache now -
+ @ We actually only do this if we have a
+ @ Harvard style cache.
+ it eq
+ bleq init_cpu_client_enable_dcache
+ itt eq
+ cmpeq r0, #0
+ beq Finished1
+
+ mcr 15, 0, r1, cr1, cr0, 0 @ Write SCTLR (turn on Branch predictor & I-cache)
+
+ mrc 15, 1, r0, cr0, cr0, 1 @ Read CLIDR
+ ands r3, r0, #0x7000000
+ lsr r3, r3, #23 @ Total cache levels << 1
+ beq Finished1
+
+ mov lr, #0 @ lr = cache level << 1
+Loop11:
+ mrc 15, 1, r0, cr0, cr0, 1 @ Read CLIDR
+ add r2, lr, lr, lsr #1 @ r2 holds cache 'set' position
+ lsr r1, r0, r2 @ Bottom 3-bits are Ctype for this level
+ and r1, r1, #7 @ Get those 3-bits alone
+ cmp r1, #2
+ blt Skip1 @ No cache or only I-Cache at this level
+ mcr 15, 2, lr, cr0, cr0, 0 @ Write CSSELR
+ mov r1, #0
+ isb sy
+ mrc 15, 1, r1, cr0, cr0, 0 @ Read CCSIDR
+ and r2, r1, #7 @ Extract line length field
+ add r2, r2, #4 @ Add 4 for the line length offset (log2 16 bytes)
+ movw r0, #0x3ff
+ ands r0, r0, r1, lsr #3 @ r0 is the max number on the way size
+ clz r4, r0 @ r4 is the bit position of the way size increment
+ movw r5, #0x7fff
+ ands r5, r5, r1, lsr #13 @ r5 is the max number of the index size (right aligned)
+Loop21:
+ mov r7, r0 @ r7 working copy of max way size
+Loop31:
+ orr r1, lr, r7, lsl r4 @ factor in way number and cache number
+ orr r1, r1, r5, lsl r2 @ factor in set number
+ tst r6, #4 @ D-Cache on?
+ ite eq
+ mcreq 15, 0, r1, cr7, cr6, 2 @ No - invalidate by set/way
+ mcrne 15, 0, r1, cr7, cr14, 2 @ yes - clean + invalidate by set/way
+ subs r7, r7, #1 @ Decrement way number
+ bge Loop31
+ subs r5, r5, #1 @ Decrement set number
+ bge Loop21
+Skip1:
+ add lr, lr, #2 @ increment cache number
+ cmp r3, lr
+ bgt Loop11
+Finished1:
+ @ Now we know the caches are clean we can:
+ mrc 15, 0, r4, cr1, cr0, 0 @ Read SCTLR
+ bic r4, r4, #4 @ Disable D-Cache
+ mcr 15, 0, r4, cr1, cr0, 0 @ Write SCTLR
+ mov r4, #0
+ mcr 15, 0, r4, cr7, cr5, 6 @ Write BPIALL
+
+ bx ip @ Return
+
+ @ Set Z if this is a Cortex-A15 or Cortex_A7
+ @ Other flags corrupted
+is_a15_a7:
+ mrc 15, 0, r8, c0, c0, 0
+ movw r9, #0xfff0
+ movt r9, #0xff0f
+ and r8, r8, r9
+ movw r9, #0xc0f0
+ movt r9, #0x410f
+ cmp r8, r9
+ movw r9, #0xc070
+ movt r9, #0x410f
+ it ne
+ cmpne r8, r9
+ bx lr
+
+ @ Descriptor type: Section
+ @ Bufferable: True
+ @ Cacheable: True
+ @ Execute Never: False
+ @ Domain: 0
+ @ Impl. Defined: 0
+ @ Access: 0/11 Full access
+ @ TEX: 001
+ @ Shareable: False
+ @ Not Global: False
+ @ Supersection: False
+#define PT(X) \
+ .word X;
+#define PT2(X) \
+ PT(X) PT(X + 0x100000) PT(X + 0x200000) PT(X + 0x300000)
+#define PT3(X) \
+ PT2(X) PT2(X + 0x400000) PT2(X + 0x800000) PT2(X + 0xc00000)
+#define PT4(X) \
+ PT3(X) PT3(X + 0x1000000) PT3(X + 0x2000000) PT3(X + 0x3000000)
+#define PT5(X) \
+ PT4(X) PT4(X + 0x4000000) PT4(X + 0x8000000) PT4(X + 0xc000000)
+#define PT6(X) \
+ PT5(X) PT5(X + 0x10000000) PT5(X + 0x20000000) PT5(X + 0x30000000)
+#define PT7(X) \
+ PT6(X) PT6(X + 0x40000000) PT6(X + 0x80000000) PT6(X + 0xc0000000)
+
+ .section page_tables_section, "aw", %progbits
+ .p2align 14
+page_tables:
+ PT7(0x1c0e)
+
+#endif //#if defined(__ARM_ARCH_7A__) || __ARM_ARCH_PROFILE == 'A'
diff --git a/libgloss/arm/crt0.S b/libgloss/arm/crt0.S
index 86ee2cd7d..35c306be0 100644
--- a/libgloss/arm/crt0.S
+++ b/libgloss/arm/crt0.S
@@ -44,7 +44,7 @@
/* .text is used instead of .section .text so it works with arm-aout too. */
.text
.syntax unified
-#ifdef THUMB_V7_V6M
+#ifdef PREFER_THUMB
.thumb
.macro FUNC_START name
.global \name
@@ -77,6 +77,19 @@
.fnstart
#endif
+ /* __ARM_ARCH_PROFILE is defined from GCC 4.8 onwards, however __ARM_ARCH_7A
+ has been defined since 4.2 onwards, which is when v7-a support was added
+ and hence 'A' profile support was added in the compiler. Allow for this
+ file to be built with older compilers. We only call this for A profile
+ cores. */
+#if defined (__ARM_ARCH_7A__) || (__ARM_ARCH_PROFILE == 'A')
+/* The init hook does not use the stack and is called before the stack has been set up. */
+#ifdef ARM_RDI_MONITOR
+ bl _rdimon_hw_init_hook
+ .weak FUNCTION (_rdimon_hw_init_hook)
+#endif
+#endif
+
/* Start by setting up a stack */
#ifdef ARM_RDP_MONITOR
/* Issue Demon SWI to read stack info */
@@ -85,7 +98,7 @@
/* stack limit is at end of data */
/* allow slop for stack overflow handling and small frames */
-#ifdef __ARM_ARCH_6M__
+#ifdef THUMB1_ONLY
ldr r0, .LC2
adds r0, #128
adds r0, #128
@@ -99,7 +112,7 @@
/* Issue Angel SWI to read stack info */
movs r0, #AngelSWI_Reason_HeapInfo
adr r1, .LC0 /* point at ptr to 4 words to receive data */
-#ifdef THUMB_V7M_V6M
+#ifdef THUMB_VXM
bkpt AngelSWI
#elif defined(__thumb2__)
/* We are in thumb mode for startup on armv7 architectures. */
@@ -110,6 +123,13 @@
#endif
ldr r0, .LC0 /* point at values read */
+ /* Set __heap_limit. */
+ ldr r1, [r0, #4]
+ cmp r1, #0
+ beq .LC33
+ ldr r2, =__heap_limit
+ str r1, [r2]
+.LC33:
ldr r1, [r0, #0]
cmp r1, #0
bne .LC32
@@ -136,7 +156,7 @@
cmp r2, #0
beq .LC27
/* allow slop for stack overflow handling and small frames */
-#ifdef __ARM_ARCH_6M__
+#ifdef THUMB1_ONLY
adds r2, #128
adds r2, #128
mov sl, r2
@@ -162,7 +182,7 @@
#ifdef __thumb2__
it eq
#endif
-#ifdef __ARM_ARCH_6M__
+#ifdef THUMB1_ONLY
bne .LC28
ldr r3, .LC0
.LC28:
@@ -174,7 +194,7 @@
have somehow missed it below (in which case it gets the same
value as FIQ - not ideal, but better than nothing.) */
mov sp, r3
-#ifdef THUMB_V7_V6M
+#ifdef PREFER_THUMB
/* XXX Fill in stack assignments for interrupt modes. */
#else
mrs r2, CPSR
@@ -217,7 +237,7 @@
this default 64k is enough for the program being executed.
However, it ensures that this simple crt0 world will not
immediately cause an overflow event: */
-#ifdef __ARM_ARCH_6M__
+#ifdef THUMB1_ONLY
movs r2, #64
lsls r2, r2, #10
subs r2, r3, r2
@@ -237,7 +257,7 @@
subs a3, a3, a1 /* Third arg: length of block */
-#if defined(__thumb__) && !defined(THUMB_V7_V6M)
+#if __thumb__ && !defined(PREFER_THUMB)
/* Enter Thumb mode.... */
add a4, pc, #1 /* Get the address of the Thumb block */
bx a4 /* Go there and start Thumb decoding */
@@ -408,7 +428,7 @@ __change_mode:
bl FUNCTION (exit) /* Should not return. */
-#if defined(__thumb__) && !defined(THUMB_V7_V6M)
+#if __thumb__ && !defined(PREFER_THUMB)
/* Come out of Thumb mode. This code should be redundant. */
mov a4, pc
diff --git a/libgloss/arm/elf-aprofile-validation.specs b/libgloss/arm/elf-aprofile-validation.specs
new file mode 100644
index 000000000..166a5dec6
--- /dev/null
+++ b/libgloss/arm/elf-aprofile-validation.specs
@@ -0,0 +1,22 @@
+# aem-validation.specs
+#
+# Spec file for AArch32 A profile baremetal newlib, libgloss on
+# VALIDATION platform with AngelAPI semi-hosting.
+#
+# This Spec file is also appropriate for the foundation model.
+
+%rename link old_link
+
+*link:
+--defsym=_rdimon_vector_base=0x00000000 -Ttext-segment=0x00010000 %(old_link)
+
+%rename lib libc
+
+*libgloss:
+-lrdimon
+
+*lib:
+cpu-init/rdimon-aem.o%s --start-group %(libc) %(libgloss) --end-group
+
+*startfile:
+crti%O%s crtbegin%O%s %{!pg:rdimon-crt0%O%s} %{pg:rdimon-crt0%O%s}
diff --git a/libgloss/arm/elf-aprofile-ve.specs b/libgloss/arm/elf-aprofile-ve.specs
new file mode 100644
index 000000000..d94bb7a94
--- /dev/null
+++ b/libgloss/arm/elf-aprofile-ve.specs
@@ -0,0 +1,22 @@
+# aem-ve.specs
+#
+# Spec file for AArch32 A profile baremetal newlib, libgloss on VE platform with AngelAPI
+# semi-hosting.
+#
+# This Spec file is also appropriate for the foundation model.
+
+%rename link old_link
+
+*link:
+--defsym=_rdimon_vector_base=0x80000000 -Ttext-segment=0x80010000 %(old_link)
+
+%rename lib libc
+
+*libgloss:
+-lrdimon
+
+*lib:
+cpu-init/rdimon-aem.o%s --start-group %(libc) %(libgloss) --end-group
+
+*startfile:
+crti%O%s crtbegin%O%s %{!pg:rdimon-crt0%O%s} %{pg:rdimon-crt0%O%s}
diff --git a/libgloss/arm/elf-nano.specs b/libgloss/arm/elf-nano.specs
new file mode 100644
index 000000000..575f47d38
--- /dev/null
+++ b/libgloss/arm/elf-nano.specs
@@ -0,0 +1,22 @@
+%rename link nano_link
+%rename link_gcc_c_sequence nano_link_gcc_c_sequence
+%rename cpp nano_cpp
+
+*cpp:
+-isystem =/include/newlib-nano %(nano_cpp)
+
+*nano_libc:
+-lc_nano
+
+*nano_libgloss:
+%{specs=rdimon.specs:-lrdimon_nano} %{specs=nosys.specs:-lnosys}
+
+*link_gcc_c_sequence:
+%(nano_link_gcc_c_sequence) --start-group %G %(nano_libc) %(nano_libgloss) --end-group
+
+*link:
+%(nano_link) %:replace-outfile(-lc -lc_nano) %:replace-outfile(-lg -lg_nano) %:replace-outfile(-lrdimon -lrdimon_nano) %:replace-outfile(-lstdc++ -lstdc++_nano) %:replace-outfile(-lsupc++ -lsupc++_nano)
+
+*lib:
+%{!shared:%{g*:-lg_nano} %{!p:%{!pg:-lc_nano}}%{p:-lc_p}%{pg:-lc_p}}
+
diff --git a/libgloss/arm/elf-rdimon.specs b/libgloss/arm/elf-rdimon.specs
index 2f0692c8a..c35061f3a 100644
--- a/libgloss/arm/elf-rdimon.specs
+++ b/libgloss/arm/elf-rdimon.specs
@@ -1,10 +1,13 @@
-%rename lib libc
+%rename link_gcc_c_sequence rdimon_link_gcc_c_sequence
-*libgloss:
--lrdimon
+*rdimon_libc:
+%{!specs=nano.specs:-lc} %{specs=nano.specs:-lc_nano}
-*lib:
---start-group %(libc) %(libgloss) --end-group
+*rdimon_libgloss:
+%{!specs=nano.specs:-lrdimon} %{specs=nano.specs:-lrdimon_nano}
+
+*link_gcc_c_sequence:
+%(rdimon_link_gcc_c_sequence) --start-group %G %(rdimon_libc) %(rdimon_libgloss) --end-group
*startfile:
crti%O%s crtbegin%O%s %{!pg:rdimon-crt0%O%s} %{pg:rdimon-crt0%O%s}
diff --git a/libgloss/arm/ftruncate.c b/libgloss/arm/ftruncate.c
new file mode 100644
index 000000000..41a64d2ae
--- /dev/null
+++ b/libgloss/arm/ftruncate.c
@@ -0,0 +1,34 @@
+/* Copyright (c) 2013 ARM Ltd. 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. The name of the company may not be used to endorse or promote
+ products derived from this software without specific prior written
+ permission.
+
+ THIS SOFTWARE IS PROVIDED BY ARM LTD ``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 ARM LTD 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 <errno.h>
+#include <sys/types.h>
+
+int
+ftruncate (int file, off_t length)
+{
+ errno = ENOSYS;
+ return -1;
+}
diff --git a/libgloss/arm/linux-crt0.c b/libgloss/arm/linux-crt0.c
index c313d269f..878ece765 100644
--- a/libgloss/arm/linux-crt0.c
+++ b/libgloss/arm/linux-crt0.c
@@ -12,7 +12,7 @@
static int _main(int argc, char *argv[]) __attribute__((noreturn));
-#if defined(__thumb__) && !defined(THUMB_V7_V6M)
+#if __thumb__ && !defined(PREFER_THUMB)
asm("\n"
".code 32\n"
".global _start\n"
diff --git a/libgloss/arm/redboot-crt0.S b/libgloss/arm/redboot-crt0.S
index 1d902286e..0e3a9b4e2 100644
--- a/libgloss/arm/redboot-crt0.S
+++ b/libgloss/arm/redboot-crt0.S
@@ -14,7 +14,7 @@
.text
.syntax unified
/* Setup the assembly entry point. */
-#ifdef THUMB_V7_V6M
+#ifdef PREFER_THUMB
.macro FUNC_START name
.global \name
.thumb_func
@@ -31,13 +31,13 @@
FUNC_START SYM_NAME(_start)
/* Unnecessary to set fp for v6-m/v7-m, which don't support
ARM state. */
-#ifndef THUMB_V7M_V6M
+#if __ARM_ARCH_ISA_ARM
mov fp, #0 /* Null frame pointer. */
#endif
movs r7, #0 /* Null frame pointer for Thumb. */
/* Enable interrupts for gdb debugging. */
-#ifdef THUMB_V7_V6M
+#ifdef PREFER_THUMB
cpsie if
#else
mrs r0, cpsr
@@ -66,7 +66,7 @@
/* Nothing to left to clear. */
#endif
-#if defined(__thumb__) && !defined(THUMB_V7_V6M)
+#if __thumb__ && !defined(PREFER_THUMB)
/* Enter Thumb mode. */
add a4, pc, #1 /* Get the address of the Thumb block. */
bx a4 /* Go there and start Thumb decoding. */
diff --git a/libgloss/arm/swi.h b/libgloss/arm/swi.h
index 0f9313447..b7fa243f8 100644
--- a/libgloss/arm/swi.h
+++ b/libgloss/arm/swi.h
@@ -36,7 +36,7 @@
#define AngelSWI AngelSWI_ARM
#endif
/* For thumb only architectures use the BKPT instruction instead of SWI. */
-#ifdef THUMB_V7M_V6M
+#ifdef THUMB_VXM
#define AngelSWIInsn "bkpt"
#define AngelSWIAsm bkpt
#else
diff --git a/libgloss/arm/syscall.h b/libgloss/arm/syscall.h
index 759801f4f..21e3801db 100644
--- a/libgloss/arm/syscall.h
+++ b/libgloss/arm/syscall.h
@@ -1,6 +1,6 @@
-/* General use syscall.h file.
- The more ports that use this file, the simpler sim/common/nltvals.def
- remains. */
+/* arm syscall.h file. This is used only by the simulator. This includes
+ a few extra needed by RedBoot, but is otherwise a copy of the
+ libgloss/syscall.h file. */
#ifndef LIBGLOSS_SYSCALL_H
#define LIBGLOSS_SYSCALL_H
diff --git a/libgloss/arm/syscalls.c b/libgloss/arm/syscalls.c
index 15cc69f61..0ccad215c 100644
--- a/libgloss/arm/syscalls.c
+++ b/libgloss/arm/syscalls.c
@@ -264,10 +264,10 @@ _swiread (int fh,
#endif
}
-/* fd, is a valid user file handle.
+/* fd, is a valid user file handle.
Translates the return of _swiread into
bytes read. */
-int
+int __attribute__((weak))
_read (int fd,
char * ptr,
int len)
@@ -418,7 +418,7 @@ _swiwrite (
}
/* fd, is a user file descriptor. */
-int
+int __attribute__((weak))
_write (int fd,
char * ptr,
int len)
@@ -587,7 +587,10 @@ _getpid (int n __attribute__ ((unused)))
return 1;
}
-caddr_t
+/* Heap limit returned from SYS_HEAPINFO Angel semihost call. */
+uint __heap_limit = 0xcafedead;
+
+caddr_t __attribute__((weak))
_sbrk (int incr)
{
extern char end asm ("end"); /* Defined by the linker. */
@@ -599,7 +602,9 @@ _sbrk (int incr)
prev_heap_end = heap_end;
- if (heap_end + incr > stack_ptr)
+ if ((heap_end + incr > stack_ptr)
+ /* Honour heap limit if it's valid. */
+ || (__heap_limit != 0xcafedead && heap_end + incr > __heap_limit))
{
/* Some of the libstdc++-v3 tests rely upon detecting
out of memory errors, so do not abort here. */
diff --git a/libgloss/arm/trap.S b/libgloss/arm/trap.S
index 9eb39069a..d854b57bb 100644
--- a/libgloss/arm/trap.S
+++ b/libgloss/arm/trap.S
@@ -1,6 +1,6 @@
#include "arm.h"
/* Run-time exception support */
-#ifndef THUMB_V7_V6M
+#ifndef PREFER_THUMB
#include "swi.h"
/* .text is used instead of .section .text so it works with arm-aout too. */
diff --git a/libgloss/arm/truncate.c b/libgloss/arm/truncate.c
new file mode 100644
index 000000000..92c0fcab3
--- /dev/null
+++ b/libgloss/arm/truncate.c
@@ -0,0 +1,34 @@
+/* Copyright (c) 2013 ARM Ltd. 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. The name of the company may not be used to endorse or promote
+ products derived from this software without specific prior written
+ permission.
+
+ THIS SOFTWARE IS PROVIDED BY ARM LTD ``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 ARM LTD 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 <errno.h>
+#include <sys/types.h>
+
+int
+truncate (const char *path, off_t length)
+{
+ errno = ENOSYS;
+ return -1;
+}
diff --git a/libgloss/bfin/Makefile.in b/libgloss/bfin/Makefile.in
index c86710810..b206a17ae 100644
--- a/libgloss/bfin/Makefile.in
+++ b/libgloss/bfin/Makefile.in
@@ -78,7 +78,7 @@ BOARD_LDFLAGS =
BOARD_BSP = libbfinbsp.a
BOARD_CRT0S = basiccrt.o basiccrts.o
BOARD_CRT0S += basiccrt561.o basiccrt561s.o basiccrt561b.o
-BOARD_CRT0S += basiccrt60x.o basiccrt60xs.o basiccrt60xc1.o
+# BOARD_CRT0S += basiccrt60x.o basiccrt60xs.o basiccrt60xc1.o
BOARD_OBJS = clear_cache_range.o _exit.o
BOARD_TEST =
BOARD_INSTALL = install-board
diff --git a/libgloss/configure b/libgloss/configure
index 41d91d68a..90a05222a 100755
--- a/libgloss/configure
+++ b/libgloss/configure
@@ -666,6 +666,7 @@ CCAS
CCASFLAGS'
ac_subdirs_all='doc
aarch64
+arc
epiphany
i386
m32r
@@ -688,6 +689,7 @@ crx
d30v
fr30
frv
+ft32
lm32
mcore
mep
@@ -695,6 +697,7 @@ moxie
microblaze
mt
v850
+visium
xc16x
xstormy16
m32c
@@ -705,6 +708,7 @@ arm
spu
tic6x
iq2000
+or1k
libnosys'
# Initialize some variables set by options.
@@ -2399,6 +2403,10 @@ case "${target}" in
config_testsuite=true
;;
+ arc*-*-*)
+ subdirs="$subdirs arc"
+
+ ;;
epiphany-*-*)
subdirs="$subdirs epiphany"
@@ -2488,6 +2496,10 @@ case "${target}" in
subdirs="$subdirs frv"
;;
+ ft32*-*-*)
+ subdirs="$subdirs ft32"
+
+ ;;
lm32*-*-*)
subdirs="$subdirs lm32"
@@ -2516,6 +2528,11 @@ case "${target}" in
subdirs="$subdirs v850"
;;
+ visium-*-*)
+ subdirs="$subdirs visium"
+
+ config_testsuite=false
+ ;;
xc16x-*-*)
subdirs="$subdirs xc16x"
@@ -2560,6 +2577,10 @@ case "${target}" in
subdirs="$subdirs iq2000"
;;
+ or1k-*-* | or1knd-*-* )
+ subdirs="$subdirs or1k"
+
+ ;;
esac
diff --git a/libgloss/configure.in b/libgloss/configure.in
index 14287e753..d1b3b3469 100644
--- a/libgloss/configure.in
+++ b/libgloss/configure.in
@@ -38,6 +38,9 @@ case "${target}" in
AC_CONFIG_SUBDIRS(aarch64)
config_testsuite=true
;;
+ arc*-*-*)
+ AC_CONFIG_SUBDIRS(arc)
+ ;;
epiphany-*-*)
AC_CONFIG_SUBDIRS(epiphany)
config_testsuite=true
@@ -105,6 +108,9 @@ case "${target}" in
frv*-*-*)
AC_CONFIG_SUBDIRS([frv])
;;
+ ft32*-*-*)
+ AC_CONFIG_SUBDIRS([ft32])
+ ;;
lm32*-*-*)
AC_CONFIG_SUBDIRS([lm32])
;;
@@ -126,6 +132,10 @@ case "${target}" in
v850*-*-*)
AC_CONFIG_SUBDIRS([v850])
;;
+ visium-*-*)
+ AC_CONFIG_SUBDIRS([visium])
+ config_testsuite=false
+ ;;
xc16x-*-*)
AC_CONFIG_SUBDIRS([xc16x])
;;
@@ -160,6 +170,9 @@ case "${target}" in
iq2000-*-*)
AC_CONFIG_SUBDIRS([iq2000])
;;
+ or1k-*-* | or1knd-*-* )
+ AC_CONFIG_SUBDIRS([or1k])
+ ;;
esac
dnl For now, don't bother configuring testsuite
diff --git a/libgloss/d30v/syscalls.c b/libgloss/d30v/syscalls.c
index b55bb629a..64fbcf977 100644
--- a/libgloss/d30v/syscalls.c
+++ b/libgloss/d30v/syscalls.c
@@ -119,7 +119,7 @@ chdir (char *dir)
}
int
-stat (const char *filename, void *info)
+stat (const char *__restrict filename, void *__restrict info)
{
return __syscall (filename, info, 0, 0, SYS_stat);
}
diff --git a/libgloss/ft32/Makefile.in b/libgloss/ft32/Makefile.in
new file mode 100644
index 000000000..21f9e8270
--- /dev/null
+++ b/libgloss/ft32/Makefile.in
@@ -0,0 +1,129 @@
+# Copyright (C) 2015 FTDI (support@ftdichip.com)
+#
+# The authors hereby grant permission to use, copy, modify, distribute,
+# and license this software and its documentation for any purpose, provided
+# that existing copyright notices are retained in all copies and that this
+# notice is included verbatim in any distributions. No written agreement,
+# license, or royalty fee is required for any of the authorized uses.
+# Modifications to this software may be copyrighted by their authors
+# and need not follow the licensing terms described here, provided that
+# the new terms are clearly indicated on the first page of each file where
+# they apply.
+
+# Makefile for libgloss/spro. This is the board support code for the
+# ft32 target.
+
+DESTDIR =
+VPATH = @srcdir@ @srcdir@/..
+srcdir = @srcdir@
+objdir = .
+srcroot = $(srcdir)/../..
+objroot = $(objdir)/../..
+
+prefix = @prefix@
+exec_prefix = @exec_prefix@
+
+host_alias = @host_alias@
+target_alias = @target_alias@
+
+bindir = @bindir@
+libdir = @libdir@
+tooldir = $(exec_prefix)/$(target_alias)
+
+# Multilib support variables.
+# TOP is used instead of MULTI{BUILD,SRC}TOP.
+MULTIDIRS =
+MULTISUBDIR =
+MULTIDO = true
+MULTICLEAN = true
+
+INSTALL = @INSTALL@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_DATA = @INSTALL_DATA@
+
+SHELL = /bin/sh
+
+CC = @CC@
+
+AS = @AS@
+AR = @AR@
+LD = @LD@
+RANLIB = @RANLIB@
+AR_FLAGS = rc
+
+OBJDUMP = `if [ -f ${objroot}/../binutils/objdump ] ; \
+ then echo ${objroot}/../binutils/objdump ; \
+ else t='$(program_transform_name)'; echo objdump | sed -e $$t ; fi`
+OBJCOPY = `if [ -f ${objroot}/../binutils/objcopy ] ; \
+ then echo ${objroot}/../binutils/objcopy ; \
+ else t='$(program_transform_name)'; echo objcopy | sed -e $$t ; fi`
+
+LD_SCRIPTS = ft32-elf-common.ld sim.ld
+
+CRT0 = crt0.o
+SIM_BSP = libsim.a
+SIM_OBJS = fstat.o \
+ getpid.o \
+ isatty.o \
+ kill.o \
+ sbrk.o \
+ sim-close.o \
+ sim-exit.o \
+ sim-inbyte.o \
+ sim-lseek.o \
+ sim-open.o \
+ sim-read.o \
+ sim-time.o \
+ sim-unlink.o \
+ sim-write.o \
+ stat.o
+
+#### Host specific Makefile fragment comes in here.
+@host_makefile_frag@
+
+all: $(CRT0) $(SIM_BSP)
+
+$(SIM_BSP): $(SIM_OBJS)
+ $(AR) $(ARFLAGS) $@ $?
+ $(RANLIB) $@
+
+fstat.o: $(srcdir)/fstat.c
+getpid.o: $(srcdir)/getpid.c
+isatty.o: $(srcdir)/isatty.c
+kill.o: $(srcdir)/kill.c
+putnum.o: $(srcdir)/putnum.c
+sbrk.o: $(srcdir)/sbrk.c
+sim-close.o: $(srcdir)/sim-close.S
+sim-exit.o: $(srcdir)/sim-exit.S
+sim-inbyte.o: $(srcdir)/sim-inbyte.c
+sim-lseek.o: $(srcdir)/sim-lseek.c
+sim-open.o: $(srcdir)/sim-open.S
+sim-read.o: $(srcdir)/sim-read.S
+sim-time.o: $(srcdir)/sim-time.c
+sim-unlink.o: $(srcdir)/sim-unlink.S
+sim-write.o: $(srcdir)/sim-write.S
+stat.o: $(srcdir)/stat.c
+
+install: $($(CPU)_INSTALL)
+ $(INSTALL_DATA) $(CRT0) $(DESTDIR)$(tooldir)/lib${MULTISUBDIR}/$(CRT0)
+ $(INSTALL_DATA) $(SIM_BSP) $(DESTDIR)$(tooldir)/lib${MULTISUBDIR}/$(SIM_BSP)
+ for x in ${LD_SCRIPTS}; do \
+ ${INSTALL_DATA} ${srcdir}/$$x $(DESTDIR)${tooldir}/lib/$$x; \
+ done;
+
+clean mostlyclean:
+ rm -f *.o *.a
+
+distclean maintainer-clean realclean: clean
+ rm -f Makefile config.cache config.log config.status
+
+.PHONY: info dvi doc install-info clean-info
+info doc dvi:
+install-info:
+clean-info:
+
+Makefile: Makefile.in config.status @host_makefile_frag_path@
+ $(SHELL) config.status
+
+config.status: configure
+ $(SHELL) config.status --recheck
diff --git a/libgloss/ft32/aclocal.m4 b/libgloss/ft32/aclocal.m4
new file mode 100644
index 000000000..234952367
--- /dev/null
+++ b/libgloss/ft32/aclocal.m4
@@ -0,0 +1,404 @@
+# generated automatically by aclocal 1.11.1 -*- Autoconf -*-
+
+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
+# 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
+# This file 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.
+
+# AM_CONDITIONAL -*- Autoconf -*-
+
+# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008
+# Free Software Foundation, Inc.
+#
+# This file 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.
+
+# serial 9
+
+# AM_CONDITIONAL(NAME, SHELL-CONDITION)
+# -------------------------------------
+# Define a conditional.
+AC_DEFUN([AM_CONDITIONAL],
+[AC_PREREQ(2.52)dnl
+ ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])],
+ [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
+AC_SUBST([$1_TRUE])dnl
+AC_SUBST([$1_FALSE])dnl
+_AM_SUBST_NOTMAKE([$1_TRUE])dnl
+_AM_SUBST_NOTMAKE([$1_FALSE])dnl
+m4_define([_AM_COND_VALUE_$1], [$2])dnl
+if $2; then
+ $1_TRUE=
+ $1_FALSE='#'
+else
+ $1_TRUE='#'
+ $1_FALSE=
+fi
+AC_CONFIG_COMMANDS_PRE(
+[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
+ AC_MSG_ERROR([[conditional "$1" was never defined.
+Usually this means the macro was only invoked conditionally.]])
+fi])])
+
+# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009
+# Free Software Foundation, Inc.
+#
+# This file 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.
+
+# serial 10
+
+# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
+# written in clear, in which case automake, when reading aclocal.m4,
+# will think it sees a *use*, and therefore will trigger all it's
+# C support machinery. Also note that it means that autoscan, seeing
+# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
+
+
+# _AM_DEPENDENCIES(NAME)
+# ----------------------
+# See how the compiler implements dependency checking.
+# NAME is "CC", "CXX", "GCJ", or "OBJC".
+# We try a few techniques and use that to set a single cache variable.
+#
+# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
+# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
+# dependency, and given that the user is not expected to run this macro,
+# just rely on AC_PROG_CC.
+AC_DEFUN([_AM_DEPENDENCIES],
+[AC_REQUIRE([AM_SET_DEPDIR])dnl
+AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
+AC_REQUIRE([AM_MAKE_INCLUDE])dnl
+AC_REQUIRE([AM_DEP_TRACK])dnl
+
+ifelse([$1], CC, [depcc="$CC" am_compiler_list=],
+ [$1], CXX, [depcc="$CXX" am_compiler_list=],
+ [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
+ [$1], UPC, [depcc="$UPC" am_compiler_list=],
+ [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'],
+ [depcc="$$1" am_compiler_list=])
+
+AC_CACHE_CHECK([dependency style of $depcc],
+ [am_cv_$1_dependencies_compiler_type],
+[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
+ # We make a subdir and do the tests there. Otherwise we can end up
+ # making bogus files that we don't know about and never remove. For
+ # instance it was reported that on HP-UX the gcc test will end up
+ # making a dummy file named `D' -- because `-MD' means `put the output
+ # in D'.
+ mkdir conftest.dir
+ # Copy depcomp to subdir because otherwise we won't find it if we're
+ # using a relative directory.
+ cp "$am_depcomp" conftest.dir
+ cd conftest.dir
+ # We will build objects and dependencies in a subdirectory because
+ # it helps to detect inapplicable dependency modes. For instance
+ # both Tru64's cc and ICC support -MD to output dependencies as a
+ # side effect of compilation, but ICC will put the dependencies in
+ # the current directory while Tru64 will put them in the object
+ # directory.
+ mkdir sub
+
+ am_cv_$1_dependencies_compiler_type=none
+ if test "$am_compiler_list" = ""; then
+ am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
+ fi
+ am__universal=false
+ m4_case([$1], [CC],
+ [case " $depcc " in #(
+ *\ -arch\ *\ -arch\ *) am__universal=true ;;
+ esac],
+ [CXX],
+ [case " $depcc " in #(
+ *\ -arch\ *\ -arch\ *) am__universal=true ;;
+ esac])
+
+ for depmode in $am_compiler_list; do
+ # Setup a source with many dependencies, because some compilers
+ # like to wrap large dependency lists on column 80 (with \), and
+ # we should not choose a depcomp mode which is confused by this.
+ #
+ # We need to recreate these files for each test, as the compiler may
+ # overwrite some of them when testing with obscure command lines.
+ # This happens at least with the AIX C compiler.
+ : > sub/conftest.c
+ for i in 1 2 3 4 5 6; do
+ echo '#include "conftst'$i'.h"' >> sub/conftest.c
+ # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
+ # Solaris 8's {/usr,}/bin/sh.
+ touch sub/conftst$i.h
+ done
+ echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
+
+ # We check with `-c' and `-o' for the sake of the "dashmstdout"
+ # mode. It turns out that the SunPro C++ compiler does not properly
+ # handle `-M -o', and we need to detect this. Also, some Intel
+ # versions had trouble with output in subdirs
+ am__obj=sub/conftest.${OBJEXT-o}
+ am__minus_obj="-o $am__obj"
+ case $depmode in
+ gcc)
+ # This depmode causes a compiler race in universal mode.
+ test "$am__universal" = false || continue
+ ;;
+ nosideeffect)
+ # after this tag, mechanisms are not by side-effect, so they'll
+ # only be used when explicitly requested
+ if test "x$enable_dependency_tracking" = xyes; then
+ continue
+ else
+ break
+ fi
+ ;;
+ msvisualcpp | msvcmsys)
+ # This compiler won't grok `-c -o', but also, the minuso test has
+ # not run yet. These depmodes are late enough in the game, and
+ # so weak that their functioning should not be impacted.
+ am__obj=conftest.${OBJEXT-o}
+ am__minus_obj=
+ ;;
+ none) break ;;
+ esac
+ if depmode=$depmode \
+ source=sub/conftest.c object=$am__obj \
+ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
+ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
+ >/dev/null 2>conftest.err &&
+ grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
+ grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
+ grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
+ ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
+ # icc doesn't choke on unknown options, it will just issue warnings
+ # or remarks (even with -Werror). So we grep stderr for any message
+ # that says an option was ignored or not supported.
+ # When given -MP, icc 7.0 and 7.1 complain thusly:
+ # icc: Command line warning: ignoring option '-M'; no argument required
+ # The diagnosis changed in icc 8.0:
+ # icc: Command line remark: option '-MP' not supported
+ if (grep 'ignoring option' conftest.err ||
+ grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
+ am_cv_$1_dependencies_compiler_type=$depmode
+ break
+ fi
+ fi
+ done
+
+ cd ..
+ rm -rf conftest.dir
+else
+ am_cv_$1_dependencies_compiler_type=none
+fi
+])
+AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
+AM_CONDITIONAL([am__fastdep$1], [
+ test "x$enable_dependency_tracking" != xno \
+ && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
+])
+
+
+# AM_SET_DEPDIR
+# -------------
+# Choose a directory name for dependency files.
+# This macro is AC_REQUIREd in _AM_DEPENDENCIES
+AC_DEFUN([AM_SET_DEPDIR],
+[AC_REQUIRE([AM_SET_LEADING_DOT])dnl
+AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
+])
+
+
+# AM_DEP_TRACK
+# ------------
+AC_DEFUN([AM_DEP_TRACK],
+[AC_ARG_ENABLE(dependency-tracking,
+[ --disable-dependency-tracking speeds up one-time build
+ --enable-dependency-tracking do not reject slow dependency extractors])
+if test "x$enable_dependency_tracking" != xno; then
+ am_depcomp="$ac_aux_dir/depcomp"
+ AMDEPBACKSLASH='\'
+fi
+AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
+AC_SUBST([AMDEPBACKSLASH])dnl
+_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
+])
+
+# Generate code to set up dependency tracking. -*- Autoconf -*-
+
+# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008
+# Free Software Foundation, Inc.
+#
+# This file 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.
+
+#serial 5
+
+# _AM_OUTPUT_DEPENDENCY_COMMANDS
+# ------------------------------
+AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
+[{
+ # Autoconf 2.62 quotes --file arguments for eval, but not when files
+ # are listed without --file. Let's play safe and only enable the eval
+ # if we detect the quoting.
+ case $CONFIG_FILES in
+ *\'*) eval set x "$CONFIG_FILES" ;;
+ *) set x $CONFIG_FILES ;;
+ esac
+ shift
+ for mf
+ do
+ # Strip MF so we end up with the name of the file.
+ mf=`echo "$mf" | sed -e 's/:.*$//'`
+ # Check whether this is an Automake generated Makefile or not.
+ # We used to match only the files named `Makefile.in', but
+ # some people rename them; so instead we look at the file content.
+ # Grep'ing the first line is not enough: some people post-process
+ # each Makefile.in and add a new line on top of each file to say so.
+ # Grep'ing the whole file is not good either: AIX grep has a line
+ # limit of 2048, but all sed's we know have understand at least 4000.
+ if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
+ dirpart=`AS_DIRNAME("$mf")`
+ else
+ continue
+ fi
+ # Extract the definition of DEPDIR, am__include, and am__quote
+ # from the Makefile without running `make'.
+ DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
+ test -z "$DEPDIR" && continue
+ am__include=`sed -n 's/^am__include = //p' < "$mf"`
+ test -z "am__include" && continue
+ am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
+ # When using ansi2knr, U may be empty or an underscore; expand it
+ U=`sed -n 's/^U = //p' < "$mf"`
+ # Find all dependency output files, they are included files with
+ # $(DEPDIR) in their names. We invoke sed twice because it is the
+ # simplest approach to changing $(DEPDIR) to its actual value in the
+ # expansion.
+ for file in `sed -n "
+ s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
+ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
+ # Make sure the directory exists.
+ test -f "$dirpart/$file" && continue
+ fdir=`AS_DIRNAME(["$file"])`
+ AS_MKDIR_P([$dirpart/$fdir])
+ # echo "creating $dirpart/$file"
+ echo '# dummy' > "$dirpart/$file"
+ done
+ done
+}
+])# _AM_OUTPUT_DEPENDENCY_COMMANDS
+
+
+# AM_OUTPUT_DEPENDENCY_COMMANDS
+# -----------------------------
+# This macro should only be invoked once -- use via AC_REQUIRE.
+#
+# This code is only required when automatic dependency tracking
+# is enabled. FIXME. This creates each `.P' file that we will
+# need in order to bootstrap the dependency handling code.
+AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
+[AC_CONFIG_COMMANDS([depfiles],
+ [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
+ [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
+])
+
+# Copyright (C) 2003, 2005 Free Software Foundation, Inc.
+#
+# This file 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.
+
+# serial 2
+
+# Check whether the underlying file-system supports filenames
+# with a leading dot. For instance MS-DOS doesn't.
+AC_DEFUN([AM_SET_LEADING_DOT],
+[rm -rf .tst 2>/dev/null
+mkdir .tst 2>/dev/null
+if test -d .tst; then
+ am__leading_dot=.
+else
+ am__leading_dot=_
+fi
+rmdir .tst 2>/dev/null
+AC_SUBST([am__leading_dot])])
+
+# Check to see how 'make' treats includes. -*- Autoconf -*-
+
+# Copyright (C) 2001, 2002, 2003, 2005, 2009 Free Software Foundation, Inc.
+#
+# This file 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.
+
+# serial 4
+
+# AM_MAKE_INCLUDE()
+# -----------------
+# Check to see how make treats includes.
+AC_DEFUN([AM_MAKE_INCLUDE],
+[am_make=${MAKE-make}
+cat > confinc << 'END'
+am__doit:
+ @echo this is the am__doit target
+.PHONY: am__doit
+END
+# If we don't find an include directive, just comment out the code.
+AC_MSG_CHECKING([for style of include used by $am_make])
+am__include="#"
+am__quote=
+_am_result=none
+# First try GNU make style include.
+echo "include confinc" > confmf
+# Ignore all kinds of additional output from `make'.
+case `$am_make -s -f confmf 2> /dev/null` in #(
+*the\ am__doit\ target*)
+ am__include=include
+ am__quote=
+ _am_result=GNU
+ ;;
+esac
+# Now try BSD make style include.
+if test "$am__include" = "#"; then
+ echo '.include "confinc"' > confmf
+ case `$am_make -s -f confmf 2> /dev/null` in #(
+ *the\ am__doit\ target*)
+ am__include=.include
+ am__quote="\""
+ _am_result=BSD
+ ;;
+ esac
+fi
+AC_SUBST([am__include])
+AC_SUBST([am__quote])
+AC_MSG_RESULT([$_am_result])
+rm -f confinc confmf
+])
+
+# Copyright (C) 2006, 2008 Free Software Foundation, Inc.
+#
+# This file 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.
+
+# serial 2
+
+# _AM_SUBST_NOTMAKE(VARIABLE)
+# ---------------------------
+# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
+# This macro is traced by Automake.
+AC_DEFUN([_AM_SUBST_NOTMAKE])
+
+# AM_SUBST_NOTMAKE(VARIABLE)
+# ---------------------------
+# Public sister of _AM_SUBST_NOTMAKE.
+AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
+
+m4_include([../acinclude.m4])
diff --git a/libgloss/ft32/configure b/libgloss/ft32/configure
new file mode 100755
index 000000000..c573667b4
--- /dev/null
+++ b/libgloss/ft32/configure
@@ -0,0 +1,3975 @@
+#! /bin/sh
+# Guess values for system-dependent variables and create Makefiles.
+# Generated by GNU Autoconf 2.63.
+#
+# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
+# 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
+# This configure script is free software; the Free Software Foundation
+# gives unlimited permission to copy, distribute and modify it.
+## --------------------- ##
+## M4sh Initialization. ##
+## --------------------- ##
+
+# Be more Bourne compatible
+DUALCASE=1; export DUALCASE # for MKS sh
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
+ emulate sh
+ NULLCMD=:
+ # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
+ # is contrary to our usage. Disable this feature.
+ alias -g '${1+"$@"}'='"$@"'
+ setopt NO_GLOB_SUBST
+else
+ case `(set -o) 2>/dev/null` in
+ *posix*) set -o posix ;;
+esac
+
+fi
+
+
+
+
+# PATH needs CR
+# Avoid depending upon Character Ranges.
+as_cr_letters='abcdefghijklmnopqrstuvwxyz'
+as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
+as_cr_Letters=$as_cr_letters$as_cr_LETTERS
+as_cr_digits='0123456789'
+as_cr_alnum=$as_cr_Letters$as_cr_digits
+
+as_nl='
+'
+export as_nl
+# Printing a long string crashes Solaris 7 /usr/bin/printf.
+as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
+as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
+as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
+if (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
+ as_echo='printf %s\n'
+ as_echo_n='printf %s'
+else
+ if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
+ as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
+ as_echo_n='/usr/ucb/echo -n'
+ else
+ as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
+ as_echo_n_body='eval
+ arg=$1;
+ case $arg in
+ *"$as_nl"*)
+ expr "X$arg" : "X\\(.*\\)$as_nl";
+ arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
+ esac;
+ expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
+ '
+ export as_echo_n_body
+ as_echo_n='sh -c $as_echo_n_body as_echo'
+ fi
+ export as_echo_body
+ as_echo='sh -c $as_echo_body as_echo'
+fi
+
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+ PATH_SEPARATOR=:
+ (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
+ (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
+ PATH_SEPARATOR=';'
+ }
+fi
+
+# Support unset when possible.
+if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
+ as_unset=unset
+else
+ as_unset=false
+fi
+
+
+# IFS
+# We need space, tab and new line, in precisely that order. Quoting is
+# there to prevent editors from complaining about space-tab.
+# (If _AS_PATH_WALK were called with IFS unset, it would disable word
+# splitting by setting IFS to empty value.)
+IFS=" "" $as_nl"
+
+# Find who we are. Look in the path if we contain no directory separator.
+case $0 in
+ *[\\/]* ) as_myself=$0 ;;
+ *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
+done
+IFS=$as_save_IFS
+
+ ;;
+esac
+# We did not find ourselves, most probably we were run as `sh COMMAND'
+# in which case we are not to be found in the path.
+if test "x$as_myself" = x; then
+ as_myself=$0
+fi
+if test ! -f "$as_myself"; then
+ $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
+ { (exit 1); exit 1; }
+fi
+
+# Work around bugs in pre-3.0 UWIN ksh.
+for as_var in ENV MAIL MAILPATH
+do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
+done
+PS1='$ '
+PS2='> '
+PS4='+ '
+
+# NLS nuisances.
+LC_ALL=C
+export LC_ALL
+LANGUAGE=C
+export LANGUAGE
+
+# Required to use basename.
+if expr a : '\(a\)' >/dev/null 2>&1 &&
+ test "X`expr 00001 : '.*\(...\)'`" = X001; then
+ as_expr=expr
+else
+ as_expr=false
+fi
+
+if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
+ as_basename=basename
+else
+ as_basename=false
+fi
+
+
+# Name of the executable.
+as_me=`$as_basename -- "$0" ||
+$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
+ X"$0" : 'X\(//\)$' \| \
+ X"$0" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X/"$0" |
+ sed '/^.*\/\([^/][^/]*\)\/*$/{
+ s//\1/
+ q
+ }
+ /^X\/\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\/\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+
+# CDPATH.
+$as_unset CDPATH
+
+
+if test "x$CONFIG_SHELL" = x; then
+ if (eval ":") 2>/dev/null; then
+ as_have_required=yes
+else
+ as_have_required=no
+fi
+
+ if test $as_have_required = yes && (eval ":
+(as_func_return () {
+ (exit \$1)
+}
+as_func_success () {
+ as_func_return 0
+}
+as_func_failure () {
+ as_func_return 1
+}
+as_func_ret_success () {
+ return 0
+}
+as_func_ret_failure () {
+ return 1
+}
+
+exitcode=0
+if as_func_success; then
+ :
+else
+ exitcode=1
+ echo as_func_success failed.
+fi
+
+if as_func_failure; then
+ exitcode=1
+ echo as_func_failure succeeded.
+fi
+
+if as_func_ret_success; then
+ :
+else
+ exitcode=1
+ echo as_func_ret_success failed.
+fi
+
+if as_func_ret_failure; then
+ exitcode=1
+ echo as_func_ret_failure succeeded.
+fi
+
+if ( set x; as_func_ret_success y && test x = \"\$1\" ); then
+ :
+else
+ exitcode=1
+ echo positional parameters were not saved.
+fi
+
+test \$exitcode = 0) || { (exit 1); exit 1; }
+
+(
+ as_lineno_1=\$LINENO
+ as_lineno_2=\$LINENO
+ test \"x\$as_lineno_1\" != \"x\$as_lineno_2\" &&
+ test \"x\`expr \$as_lineno_1 + 1\`\" = \"x\$as_lineno_2\") || { (exit 1); exit 1; }
+") 2> /dev/null; then
+ :
+else
+ as_candidate_shells=
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ case $as_dir in
+ /*)
+ for as_base in sh bash ksh sh5; do
+ as_candidate_shells="$as_candidate_shells $as_dir/$as_base"
+ done;;
+ esac
+done
+IFS=$as_save_IFS
+
+
+ for as_shell in $as_candidate_shells $SHELL; do
+ # Try only shells that exist, to save several forks.
+ if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
+ { ("$as_shell") 2> /dev/null <<\_ASEOF
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
+ emulate sh
+ NULLCMD=:
+ # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
+ # is contrary to our usage. Disable this feature.
+ alias -g '${1+"$@"}'='"$@"'
+ setopt NO_GLOB_SUBST
+else
+ case `(set -o) 2>/dev/null` in
+ *posix*) set -o posix ;;
+esac
+
+fi
+
+
+:
+_ASEOF
+}; then
+ CONFIG_SHELL=$as_shell
+ as_have_required=yes
+ if { "$as_shell" 2> /dev/null <<\_ASEOF
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
+ emulate sh
+ NULLCMD=:
+ # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
+ # is contrary to our usage. Disable this feature.
+ alias -g '${1+"$@"}'='"$@"'
+ setopt NO_GLOB_SUBST
+else
+ case `(set -o) 2>/dev/null` in
+ *posix*) set -o posix ;;
+esac
+
+fi
+
+
+:
+(as_func_return () {
+ (exit $1)
+}
+as_func_success () {
+ as_func_return 0
+}
+as_func_failure () {
+ as_func_return 1
+}
+as_func_ret_success () {
+ return 0
+}
+as_func_ret_failure () {
+ return 1
+}
+
+exitcode=0
+if as_func_success; then
+ :
+else
+ exitcode=1
+ echo as_func_success failed.
+fi
+
+if as_func_failure; then
+ exitcode=1
+ echo as_func_failure succeeded.
+fi
+
+if as_func_ret_success; then
+ :
+else
+ exitcode=1
+ echo as_func_ret_success failed.
+fi
+
+if as_func_ret_failure; then
+ exitcode=1
+ echo as_func_ret_failure succeeded.
+fi
+
+if ( set x; as_func_ret_success y && test x = "$1" ); then
+ :
+else
+ exitcode=1
+ echo positional parameters were not saved.
+fi
+
+test $exitcode = 0) || { (exit 1); exit 1; }
+
+(
+ as_lineno_1=$LINENO
+ as_lineno_2=$LINENO
+ test "x$as_lineno_1" != "x$as_lineno_2" &&
+ test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2") || { (exit 1); exit 1; }
+
+_ASEOF
+}; then
+ break
+fi
+
+fi
+
+ done
+
+ if test "x$CONFIG_SHELL" != x; then
+ for as_var in BASH_ENV ENV
+ do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
+ done
+ export CONFIG_SHELL
+ exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"}
+fi
+
+
+ if test $as_have_required = no; then
+ echo This script requires a shell more modern than all the
+ echo shells that I found on your system. Please install a
+ echo modern shell, or manually run the script under such a
+ echo shell if you do have one.
+ { (exit 1); exit 1; }
+fi
+
+
+fi
+
+fi
+
+
+
+(eval "as_func_return () {
+ (exit \$1)
+}
+as_func_success () {
+ as_func_return 0
+}
+as_func_failure () {
+ as_func_return 1
+}
+as_func_ret_success () {
+ return 0
+}
+as_func_ret_failure () {
+ return 1
+}
+
+exitcode=0
+if as_func_success; then
+ :
+else
+ exitcode=1
+ echo as_func_success failed.
+fi
+
+if as_func_failure; then
+ exitcode=1
+ echo as_func_failure succeeded.
+fi
+
+if as_func_ret_success; then
+ :
+else
+ exitcode=1
+ echo as_func_ret_success failed.
+fi
+
+if as_func_ret_failure; then
+ exitcode=1
+ echo as_func_ret_failure succeeded.
+fi
+
+if ( set x; as_func_ret_success y && test x = \"\$1\" ); then
+ :
+else
+ exitcode=1
+ echo positional parameters were not saved.
+fi
+
+test \$exitcode = 0") || {
+ echo No shell found that supports shell functions.
+ echo Please tell bug-autoconf@gnu.org about your system,
+ echo including any error possibly output before this message.
+ echo This can help us improve future autoconf versions.
+ echo Configuration will now proceed without shell functions.
+}
+
+
+
+ as_lineno_1=$LINENO
+ as_lineno_2=$LINENO
+ test "x$as_lineno_1" != "x$as_lineno_2" &&
+ test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
+
+ # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
+ # uniformly replaced by the line number. The first 'sed' inserts a
+ # line-number line after each line using $LINENO; the second 'sed'
+ # does the real work. The second script uses 'N' to pair each
+ # line-number line with the line containing $LINENO, and appends
+ # trailing '-' during substitution so that $LINENO is not a special
+ # case at line end.
+ # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
+ # scripts with optimization help from Paolo Bonzini. Blame Lee
+ # E. McMahon (1931-1989) for sed's syntax. :-)
+ sed -n '
+ p
+ /[$]LINENO/=
+ ' <$as_myself |
+ sed '
+ s/[$]LINENO.*/&-/
+ t lineno
+ b
+ :lineno
+ N
+ :loop
+ s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
+ t loop
+ s/-\n.*//
+ ' >$as_me.lineno &&
+ chmod +x "$as_me.lineno" ||
+ { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
+ { (exit 1); exit 1; }; }
+
+ # Don't try to exec as it changes $[0], causing all sort of problems
+ # (the dirname of $[0] is not the place where we might find the
+ # original and so on. Autoconf is especially sensitive to this).
+ . "./$as_me.lineno"
+ # Exit status is that of the last command.
+ exit
+}
+
+
+if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
+ as_dirname=dirname
+else
+ as_dirname=false
+fi
+
+ECHO_C= ECHO_N= ECHO_T=
+case `echo -n x` in
+-n*)
+ case `echo 'x\c'` in
+ *c*) ECHO_T=' ';; # ECHO_T is single tab character.
+ *) ECHO_C='\c';;
+ esac;;
+*)
+ ECHO_N='-n';;
+esac
+if expr a : '\(a\)' >/dev/null 2>&1 &&
+ test "X`expr 00001 : '.*\(...\)'`" = X001; then
+ as_expr=expr
+else
+ as_expr=false
+fi
+
+rm -f conf$$ conf$$.exe conf$$.file
+if test -d conf$$.dir; then
+ rm -f conf$$.dir/conf$$.file
+else
+ rm -f conf$$.dir
+ mkdir conf$$.dir 2>/dev/null
+fi
+if (echo >conf$$.file) 2>/dev/null; then
+ if ln -s conf$$.file conf$$ 2>/dev/null; then
+ as_ln_s='ln -s'
+ # ... but there are two gotchas:
+ # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
+ # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
+ # In both cases, we have to default to `cp -p'.
+ ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
+ as_ln_s='cp -p'
+ elif ln conf$$.file conf$$ 2>/dev/null; then
+ as_ln_s=ln
+ else
+ as_ln_s='cp -p'
+ fi
+else
+ as_ln_s='cp -p'
+fi
+rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
+rmdir conf$$.dir 2>/dev/null
+
+if mkdir -p . 2>/dev/null; then
+ as_mkdir_p=:
+else
+ test -d ./-p && rmdir ./-p
+ as_mkdir_p=false
+fi
+
+if test -x / >/dev/null 2>&1; then
+ as_test_x='test -x'
+else
+ if ls -dL / >/dev/null 2>&1; then
+ as_ls_L_option=L
+ else
+ as_ls_L_option=
+ fi
+ as_test_x='
+ eval sh -c '\''
+ if test -d "$1"; then
+ test -d "$1/.";
+ else
+ case $1 in
+ -*)set "./$1";;
+ esac;
+ case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
+ ???[sx]*):;;*)false;;esac;fi
+ '\'' sh
+ '
+fi
+as_executable_p=$as_test_x
+
+# Sed expression to map a string onto a valid CPP name.
+as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
+
+# Sed expression to map a string onto a valid variable name.
+as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
+
+
+
+exec 7<&0 </dev/null 6>&1
+
+# Name of the host.
+# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
+# so uname gets run too.
+ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
+
+#
+# Initializations.
+#
+ac_default_prefix=/usr/local
+ac_clean_files=
+ac_config_libobj_dir=.
+LIBOBJS=
+cross_compiling=no
+subdirs=
+MFLAGS=
+MAKEFLAGS=
+SHELL=${CONFIG_SHELL-/bin/sh}
+
+# Identity of this package.
+PACKAGE_NAME=
+PACKAGE_TARNAME=
+PACKAGE_VERSION=
+PACKAGE_STRING=
+PACKAGE_BUGREPORT=
+
+ac_unique_file="crt0.S"
+ac_subst_vars='LTLIBOBJS
+LIBOBJS
+host_makefile_frag_path
+CCASFLAGS
+CCAS
+RANLIB
+LD
+AR
+AS
+am__fastdepCC_FALSE
+am__fastdepCC_TRUE
+CCDEPMODE
+AMDEPBACKSLASH
+AMDEP_FALSE
+AMDEP_TRUE
+am__quote
+am__include
+DEPDIR
+am__leading_dot
+CC
+INSTALL_DATA
+INSTALL_SCRIPT
+INSTALL_PROGRAM
+target_os
+target_vendor
+target_cpu
+target
+host_os
+host_vendor
+host_cpu
+host
+build_os
+build_vendor
+build_cpu
+build
+target_alias
+host_alias
+build_alias
+LIBS
+ECHO_T
+ECHO_N
+ECHO_C
+DEFS
+mandir
+localedir
+libdir
+psdir
+pdfdir
+dvidir
+htmldir
+infodir
+docdir
+oldincludedir
+includedir
+localstatedir
+sharedstatedir
+sysconfdir
+datadir
+datarootdir
+libexecdir
+sbindir
+bindir
+program_transform_name
+prefix
+exec_prefix
+PACKAGE_BUGREPORT
+PACKAGE_STRING
+PACKAGE_VERSION
+PACKAGE_TARNAME
+PACKAGE_NAME
+PATH_SEPARATOR
+SHELL'
+ac_subst_files='host_makefile_frag'
+ac_user_opts='
+enable_option_checking
+enable_dependency_tracking
+'
+ ac_precious_vars='build_alias
+host_alias
+target_alias
+CCAS
+CCASFLAGS'
+
+
+# Initialize some variables set by options.
+ac_init_help=
+ac_init_version=false
+ac_unrecognized_opts=
+ac_unrecognized_sep=
+# The variables have the same names as the options, with
+# dashes changed to underlines.
+cache_file=/dev/null
+exec_prefix=NONE
+no_create=
+no_recursion=
+prefix=NONE
+program_prefix=NONE
+program_suffix=NONE
+program_transform_name=s,x,x,
+silent=
+site=
+srcdir=
+verbose=
+x_includes=NONE
+x_libraries=NONE
+
+# Installation directory options.
+# These are left unexpanded so users can "make install exec_prefix=/foo"
+# and all the variables that are supposed to be based on exec_prefix
+# by default will actually change.
+# Use braces instead of parens because sh, perl, etc. also accept them.
+# (The list follows the same order as the GNU Coding Standards.)
+bindir='${exec_prefix}/bin'
+sbindir='${exec_prefix}/sbin'
+libexecdir='${exec_prefix}/libexec'
+datarootdir='${prefix}/share'
+datadir='${datarootdir}'
+sysconfdir='${prefix}/etc'
+sharedstatedir='${prefix}/com'
+localstatedir='${prefix}/var'
+includedir='${prefix}/include'
+oldincludedir='/usr/include'
+docdir='${datarootdir}/doc/${PACKAGE}'
+infodir='${datarootdir}/info'
+htmldir='${docdir}'
+dvidir='${docdir}'
+pdfdir='${docdir}'
+psdir='${docdir}'
+libdir='${exec_prefix}/lib'
+localedir='${datarootdir}/locale'
+mandir='${datarootdir}/man'
+
+ac_prev=
+ac_dashdash=
+for ac_option
+do
+ # If the previous option needs an argument, assign it.
+ if test -n "$ac_prev"; then
+ eval $ac_prev=\$ac_option
+ ac_prev=
+ continue
+ fi
+
+ case $ac_option in
+ *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
+ *) ac_optarg=yes ;;
+ esac
+
+ # Accept the important Cygnus configure options, so we can diagnose typos.
+
+ case $ac_dashdash$ac_option in
+ --)
+ ac_dashdash=yes ;;
+
+ -bindir | --bindir | --bindi | --bind | --bin | --bi)
+ ac_prev=bindir ;;
+ -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
+ bindir=$ac_optarg ;;
+
+ -build | --build | --buil | --bui | --bu)
+ ac_prev=build_alias ;;
+ -build=* | --build=* | --buil=* | --bui=* | --bu=*)
+ build_alias=$ac_optarg ;;
+
+ -cache-file | --cache-file | --cache-fil | --cache-fi \
+ | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
+ ac_prev=cache_file ;;
+ -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
+ | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
+ cache_file=$ac_optarg ;;
+
+ --config-cache | -C)
+ cache_file=config.cache ;;
+
+ -datadir | --datadir | --datadi | --datad)
+ ac_prev=datadir ;;
+ -datadir=* | --datadir=* | --datadi=* | --datad=*)
+ datadir=$ac_optarg ;;
+
+ -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
+ | --dataroo | --dataro | --datar)
+ ac_prev=datarootdir ;;
+ -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
+ | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
+ datarootdir=$ac_optarg ;;
+
+ -disable-* | --disable-*)
+ ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
+ # Reject names that are not valid shell variable names.
+ expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
+ { $as_echo "$as_me: error: invalid feature name: $ac_useropt" >&2
+ { (exit 1); exit 1; }; }
+ ac_useropt_orig=$ac_useropt
+ ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
+ case $ac_user_opts in
+ *"
+"enable_$ac_useropt"
+"*) ;;
+ *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
+ ac_unrecognized_sep=', ';;
+ esac
+ eval enable_$ac_useropt=no ;;
+
+ -docdir | --docdir | --docdi | --doc | --do)
+ ac_prev=docdir ;;
+ -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
+ docdir=$ac_optarg ;;
+
+ -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
+ ac_prev=dvidir ;;
+ -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
+ dvidir=$ac_optarg ;;
+
+ -enable-* | --enable-*)
+ ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
+ # Reject names that are not valid shell variable names.
+ expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
+ { $as_echo "$as_me: error: invalid feature name: $ac_useropt" >&2
+ { (exit 1); exit 1; }; }
+ ac_useropt_orig=$ac_useropt
+ ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
+ case $ac_user_opts in
+ *"
+"enable_$ac_useropt"
+"*) ;;
+ *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
+ ac_unrecognized_sep=', ';;
+ esac
+ eval enable_$ac_useropt=\$ac_optarg ;;
+
+ -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
+ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
+ | --exec | --exe | --ex)
+ ac_prev=exec_prefix ;;
+ -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
+ | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
+ | --exec=* | --exe=* | --ex=*)
+ exec_prefix=$ac_optarg ;;
+
+ -gas | --gas | --ga | --g)
+ # Obsolete; use --with-gas.
+ with_gas=yes ;;
+
+ -help | --help | --hel | --he | -h)
+ ac_init_help=long ;;
+ -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
+ ac_init_help=recursive ;;
+ -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
+ ac_init_help=short ;;
+
+ -host | --host | --hos | --ho)
+ ac_prev=host_alias ;;
+ -host=* | --host=* | --hos=* | --ho=*)
+ host_alias=$ac_optarg ;;
+
+ -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
+ ac_prev=htmldir ;;
+ -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
+ | --ht=*)
+ htmldir=$ac_optarg ;;
+
+ -includedir | --includedir | --includedi | --included | --include \
+ | --includ | --inclu | --incl | --inc)
+ ac_prev=includedir ;;
+ -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
+ | --includ=* | --inclu=* | --incl=* | --inc=*)
+ includedir=$ac_optarg ;;
+
+ -infodir | --infodir | --infodi | --infod | --info | --inf)
+ ac_prev=infodir ;;
+ -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
+ infodir=$ac_optarg ;;
+
+ -libdir | --libdir | --libdi | --libd)
+ ac_prev=libdir ;;
+ -libdir=* | --libdir=* | --libdi=* | --libd=*)
+ libdir=$ac_optarg ;;
+
+ -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
+ | --libexe | --libex | --libe)
+ ac_prev=libexecdir ;;
+ -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
+ | --libexe=* | --libex=* | --libe=*)
+ libexecdir=$ac_optarg ;;
+
+ -localedir | --localedir | --localedi | --localed | --locale)
+ ac_prev=localedir ;;
+ -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
+ localedir=$ac_optarg ;;
+
+ -localstatedir | --localstatedir | --localstatedi | --localstated \
+ | --localstate | --localstat | --localsta | --localst | --locals)
+ ac_prev=localstatedir ;;
+ -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
+ | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
+ localstatedir=$ac_optarg ;;
+
+ -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
+ ac_prev=mandir ;;
+ -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
+ mandir=$ac_optarg ;;
+
+ -nfp | --nfp | --nf)
+ # Obsolete; use --without-fp.
+ with_fp=no ;;
+
+ -no-create | --no-create | --no-creat | --no-crea | --no-cre \
+ | --no-cr | --no-c | -n)
+ no_create=yes ;;
+
+ -no-recursion | --no-recursion | --no-recursio | --no-recursi \
+ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
+ no_recursion=yes ;;
+
+ -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
+ | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
+ | --oldin | --oldi | --old | --ol | --o)
+ ac_prev=oldincludedir ;;
+ -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
+ | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
+ | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
+ oldincludedir=$ac_optarg ;;
+
+ -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
+ ac_prev=prefix ;;
+ -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
+ prefix=$ac_optarg ;;
+
+ -program-prefix | --program-prefix | --program-prefi | --program-pref \
+ | --program-pre | --program-pr | --program-p)
+ ac_prev=program_prefix ;;
+ -program-prefix=* | --program-prefix=* | --program-prefi=* \
+ | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
+ program_prefix=$ac_optarg ;;
+
+ -program-suffix | --program-suffix | --program-suffi | --program-suff \
+ | --program-suf | --program-su | --program-s)
+ ac_prev=program_suffix ;;
+ -program-suffix=* | --program-suffix=* | --program-suffi=* \
+ | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
+ program_suffix=$ac_optarg ;;
+
+ -program-transform-name | --program-transform-name \
+ | --program-transform-nam | --program-transform-na \
+ | --program-transform-n | --program-transform- \
+ | --program-transform | --program-transfor \
+ | --program-transfo | --program-transf \
+ | --program-trans | --program-tran \
+ | --progr-tra | --program-tr | --program-t)
+ ac_prev=program_transform_name ;;
+ -program-transform-name=* | --program-transform-name=* \
+ | --program-transform-nam=* | --program-transform-na=* \
+ | --program-transform-n=* | --program-transform-=* \
+ | --program-transform=* | --program-transfor=* \
+ | --program-transfo=* | --program-transf=* \
+ | --program-trans=* | --program-tran=* \
+ | --progr-tra=* | --program-tr=* | --program-t=*)
+ program_transform_name=$ac_optarg ;;
+
+ -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
+ ac_prev=pdfdir ;;
+ -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
+ pdfdir=$ac_optarg ;;
+
+ -psdir | --psdir | --psdi | --psd | --ps)
+ ac_prev=psdir ;;
+ -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
+ psdir=$ac_optarg ;;
+
+ -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+ | -silent | --silent | --silen | --sile | --sil)
+ silent=yes ;;
+
+ -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
+ ac_prev=sbindir ;;
+ -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
+ | --sbi=* | --sb=*)
+ sbindir=$ac_optarg ;;
+
+ -sharedstatedir | --sharedstatedir | --sharedstatedi \
+ | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
+ | --sharedst | --shareds | --shared | --share | --shar \
+ | --sha | --sh)
+ ac_prev=sharedstatedir ;;
+ -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
+ | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
+ | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
+ | --sha=* | --sh=*)
+ sharedstatedir=$ac_optarg ;;
+
+ -site | --site | --sit)
+ ac_prev=site ;;
+ -site=* | --site=* | --sit=*)
+ site=$ac_optarg ;;
+
+ -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
+ ac_prev=srcdir ;;
+ -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
+ srcdir=$ac_optarg ;;
+
+ -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
+ | --syscon | --sysco | --sysc | --sys | --sy)
+ ac_prev=sysconfdir ;;
+ -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
+ | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
+ sysconfdir=$ac_optarg ;;
+
+ -target | --target | --targe | --targ | --tar | --ta | --t)
+ ac_prev=target_alias ;;
+ -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
+ target_alias=$ac_optarg ;;
+
+ -v | -verbose | --verbose | --verbos | --verbo | --verb)
+ verbose=yes ;;
+
+ -version | --version | --versio | --versi | --vers | -V)
+ ac_init_version=: ;;
+
+ -with-* | --with-*)
+ ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
+ # Reject names that are not valid shell variable names.
+ expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
+ { $as_echo "$as_me: error: invalid package name: $ac_useropt" >&2
+ { (exit 1); exit 1; }; }
+ ac_useropt_orig=$ac_useropt
+ ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
+ case $ac_user_opts in
+ *"
+"with_$ac_useropt"
+"*) ;;
+ *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
+ ac_unrecognized_sep=', ';;
+ esac
+ eval with_$ac_useropt=\$ac_optarg ;;
+
+ -without-* | --without-*)
+ ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
+ # Reject names that are not valid shell variable names.
+ expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
+ { $as_echo "$as_me: error: invalid package name: $ac_useropt" >&2
+ { (exit 1); exit 1; }; }
+ ac_useropt_orig=$ac_useropt
+ ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
+ case $ac_user_opts in
+ *"
+"with_$ac_useropt"
+"*) ;;
+ *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
+ ac_unrecognized_sep=', ';;
+ esac
+ eval with_$ac_useropt=no ;;
+
+ --x)
+ # Obsolete; use --with-x.
+ with_x=yes ;;
+
+ -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
+ | --x-incl | --x-inc | --x-in | --x-i)
+ ac_prev=x_includes ;;
+ -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
+ | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
+ x_includes=$ac_optarg ;;
+
+ -x-libraries | --x-libraries | --x-librarie | --x-librari \
+ | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
+ ac_prev=x_libraries ;;
+ -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
+ | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
+ x_libraries=$ac_optarg ;;
+
+ -*) { $as_echo "$as_me: error: unrecognized option: $ac_option
+Try \`$0 --help' for more information." >&2
+ { (exit 1); exit 1; }; }
+ ;;
+
+ *=*)
+ ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
+ # Reject names that are not valid shell variable names.
+ expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
+ { $as_echo "$as_me: error: invalid variable name: $ac_envvar" >&2
+ { (exit 1); exit 1; }; }
+ eval $ac_envvar=\$ac_optarg
+ export $ac_envvar ;;
+
+ *)
+ # FIXME: should be removed in autoconf 3.0.
+ $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
+ expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
+ $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
+ : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
+ ;;
+
+ esac
+done
+
+if test -n "$ac_prev"; then
+ ac_option=--`echo $ac_prev | sed 's/_/-/g'`
+ { $as_echo "$as_me: error: missing argument to $ac_option" >&2
+ { (exit 1); exit 1; }; }
+fi
+
+if test -n "$ac_unrecognized_opts"; then
+ case $enable_option_checking in
+ no) ;;
+ fatal) { $as_echo "$as_me: error: unrecognized options: $ac_unrecognized_opts" >&2
+ { (exit 1); exit 1; }; } ;;
+ *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
+ esac
+fi
+
+# Check all directory arguments for consistency.
+for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
+ datadir sysconfdir sharedstatedir localstatedir includedir \
+ oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
+ libdir localedir mandir
+do
+ eval ac_val=\$$ac_var
+ # Remove trailing slashes.
+ case $ac_val in
+ */ )
+ ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
+ eval $ac_var=\$ac_val;;
+ esac
+ # Be sure to have absolute directory names.
+ case $ac_val in
+ [\\/$]* | ?:[\\/]* ) continue;;
+ NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
+ esac
+ { $as_echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
+ { (exit 1); exit 1; }; }
+done
+
+# There might be people who depend on the old broken behavior: `$host'
+# used to hold the argument of --host etc.
+# FIXME: To remove some day.
+build=$build_alias
+host=$host_alias
+target=$target_alias
+
+# FIXME: To remove some day.
+if test "x$host_alias" != x; then
+ if test "x$build_alias" = x; then
+ cross_compiling=maybe
+ $as_echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
+ If a cross compiler is detected then cross compile mode will be used." >&2
+ elif test "x$build_alias" != "x$host_alias"; then
+ cross_compiling=yes
+ fi
+fi
+
+ac_tool_prefix=
+test -n "$host_alias" && ac_tool_prefix=$host_alias-
+
+test "$silent" = yes && exec 6>/dev/null
+
+
+ac_pwd=`pwd` && test -n "$ac_pwd" &&
+ac_ls_di=`ls -di .` &&
+ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
+ { $as_echo "$as_me: error: working directory cannot be determined" >&2
+ { (exit 1); exit 1; }; }
+test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
+ { $as_echo "$as_me: error: pwd does not report name of working directory" >&2
+ { (exit 1); exit 1; }; }
+
+
+# Find the source files, if location was not specified.
+if test -z "$srcdir"; then
+ ac_srcdir_defaulted=yes
+ # Try the directory containing this script, then the parent directory.
+ ac_confdir=`$as_dirname -- "$as_myself" ||
+$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$as_myself" : 'X\(//\)[^/]' \| \
+ X"$as_myself" : 'X\(//\)$' \| \
+ X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$as_myself" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)[^/].*/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+ srcdir=$ac_confdir
+ if test ! -r "$srcdir/$ac_unique_file"; then
+ srcdir=..
+ fi
+else
+ ac_srcdir_defaulted=no
+fi
+if test ! -r "$srcdir/$ac_unique_file"; then
+ test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
+ { $as_echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
+ { (exit 1); exit 1; }; }
+fi
+ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
+ac_abs_confdir=`(
+ cd "$srcdir" && test -r "./$ac_unique_file" || { $as_echo "$as_me: error: $ac_msg" >&2
+ { (exit 1); exit 1; }; }
+ pwd)`
+# When building in place, set srcdir=.
+if test "$ac_abs_confdir" = "$ac_pwd"; then
+ srcdir=.
+fi
+# Remove unnecessary trailing slashes from srcdir.
+# Double slashes in file names in object file debugging info
+# mess up M-x gdb in Emacs.
+case $srcdir in
+*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
+esac
+for ac_var in $ac_precious_vars; do
+ eval ac_env_${ac_var}_set=\${${ac_var}+set}
+ eval ac_env_${ac_var}_value=\$${ac_var}
+ eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
+ eval ac_cv_env_${ac_var}_value=\$${ac_var}
+done
+
+#
+# Report the --help message.
+#
+if test "$ac_init_help" = "long"; then
+ # Omit some internal or obsolete options to make the list less imposing.
+ # This message is too long to be a string in the A/UX 3.1 sh.
+ cat <<_ACEOF
+\`configure' configures this package to adapt to many kinds of systems.
+
+Usage: $0 [OPTION]... [VAR=VALUE]...
+
+To assign environment variables (e.g., CC, CFLAGS...), specify them as
+VAR=VALUE. See below for descriptions of some of the useful variables.
+
+Defaults for the options are specified in brackets.
+
+Configuration:
+ -h, --help display this help and exit
+ --help=short display options specific to this package
+ --help=recursive display the short help of all the included packages
+ -V, --version display version information and exit
+ -q, --quiet, --silent do not print \`checking...' messages
+ --cache-file=FILE cache test results in FILE [disabled]
+ -C, --config-cache alias for \`--cache-file=config.cache'
+ -n, --no-create do not create output files
+ --srcdir=DIR find the sources in DIR [configure dir or \`..']
+
+Installation directories:
+ --prefix=PREFIX install architecture-independent files in PREFIX
+ [$ac_default_prefix]
+ --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
+ [PREFIX]
+
+By default, \`make install' will install all the files in
+\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
+an installation prefix other than \`$ac_default_prefix' using \`--prefix',
+for instance \`--prefix=\$HOME'.
+
+For better control, use the options below.
+
+Fine tuning of the installation directories:
+ --bindir=DIR user executables [EPREFIX/bin]
+ --sbindir=DIR system admin executables [EPREFIX/sbin]
+ --libexecdir=DIR program executables [EPREFIX/libexec]
+ --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
+ --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
+ --localstatedir=DIR modifiable single-machine data [PREFIX/var]
+ --libdir=DIR object code libraries [EPREFIX/lib]
+ --includedir=DIR C header files [PREFIX/include]
+ --oldincludedir=DIR C header files for non-gcc [/usr/include]
+ --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
+ --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
+ --infodir=DIR info documentation [DATAROOTDIR/info]
+ --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
+ --mandir=DIR man documentation [DATAROOTDIR/man]
+ --docdir=DIR documentation root [DATAROOTDIR/doc/PACKAGE]
+ --htmldir=DIR html documentation [DOCDIR]
+ --dvidir=DIR dvi documentation [DOCDIR]
+ --pdfdir=DIR pdf documentation [DOCDIR]
+ --psdir=DIR ps documentation [DOCDIR]
+_ACEOF
+
+ cat <<\_ACEOF
+
+Program names:
+ --program-prefix=PREFIX prepend PREFIX to installed program names
+ --program-suffix=SUFFIX append SUFFIX to installed program names
+ --program-transform-name=PROGRAM run sed PROGRAM on installed program names
+
+System types:
+ --build=BUILD configure for building on BUILD [guessed]
+ --host=HOST cross-compile to build programs to run on HOST [BUILD]
+ --target=TARGET configure for building compilers for TARGET [HOST]
+_ACEOF
+fi
+
+if test -n "$ac_init_help"; then
+
+ cat <<\_ACEOF
+
+Optional Features:
+ --disable-option-checking ignore unrecognized --enable/--with options
+ --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
+ --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
+ --disable-dependency-tracking speeds up one-time build
+ --enable-dependency-tracking do not reject slow dependency extractors
+
+Some influential environment variables:
+ CCAS assembler compiler command (defaults to CC)
+ CCASFLAGS assembler compiler flags (defaults to CFLAGS)
+
+Use these variables to override the choices made by `configure' or to help
+it to find libraries and programs with nonstandard names/locations.
+
+_ACEOF
+ac_status=$?
+fi
+
+if test "$ac_init_help" = "recursive"; then
+ # If there are subdirs, report their specific --help.
+ for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
+ test -d "$ac_dir" ||
+ { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
+ continue
+ ac_builddir=.
+
+case "$ac_dir" in
+.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
+*)
+ ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
+ # A ".." for each directory in $ac_dir_suffix.
+ ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
+ case $ac_top_builddir_sub in
+ "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
+ *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
+ esac ;;
+esac
+ac_abs_top_builddir=$ac_pwd
+ac_abs_builddir=$ac_pwd$ac_dir_suffix
+# for backward compatibility:
+ac_top_builddir=$ac_top_build_prefix
+
+case $srcdir in
+ .) # We are building in place.
+ ac_srcdir=.
+ ac_top_srcdir=$ac_top_builddir_sub
+ ac_abs_top_srcdir=$ac_pwd ;;
+ [\\/]* | ?:[\\/]* ) # Absolute name.
+ ac_srcdir=$srcdir$ac_dir_suffix;
+ ac_top_srcdir=$srcdir
+ ac_abs_top_srcdir=$srcdir ;;
+ *) # Relative name.
+ ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
+ ac_top_srcdir=$ac_top_build_prefix$srcdir
+ ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
+esac
+ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
+
+ cd "$ac_dir" || { ac_status=$?; continue; }
+ # Check for guested configure.
+ if test -f "$ac_srcdir/configure.gnu"; then
+ echo &&
+ $SHELL "$ac_srcdir/configure.gnu" --help=recursive
+ elif test -f "$ac_srcdir/configure"; then
+ echo &&
+ $SHELL "$ac_srcdir/configure" --help=recursive
+ else
+ $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
+ fi || ac_status=$?
+ cd "$ac_pwd" || { ac_status=$?; break; }
+ done
+fi
+
+test -n "$ac_init_help" && exit $ac_status
+if $ac_init_version; then
+ cat <<\_ACEOF
+configure
+generated by GNU Autoconf 2.63
+
+Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
+2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
+This configure script is free software; the Free Software Foundation
+gives unlimited permission to copy, distribute and modify it.
+_ACEOF
+ exit
+fi
+cat >config.log <<_ACEOF
+This file contains any messages produced by compilers while
+running configure, to aid debugging if configure makes a mistake.
+
+It was created by $as_me, which was
+generated by GNU Autoconf 2.63. Invocation command line was
+
+ $ $0 $@
+
+_ACEOF
+exec 5>>config.log
+{
+cat <<_ASUNAME
+## --------- ##
+## Platform. ##
+## --------- ##
+
+hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
+uname -m = `(uname -m) 2>/dev/null || echo unknown`
+uname -r = `(uname -r) 2>/dev/null || echo unknown`
+uname -s = `(uname -s) 2>/dev/null || echo unknown`
+uname -v = `(uname -v) 2>/dev/null || echo unknown`
+
+/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
+/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
+
+/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
+/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
+/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
+/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
+/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
+/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
+/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
+
+_ASUNAME
+
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ $as_echo "PATH: $as_dir"
+done
+IFS=$as_save_IFS
+
+} >&5
+
+cat >&5 <<_ACEOF
+
+
+## ----------- ##
+## Core tests. ##
+## ----------- ##
+
+_ACEOF
+
+
+# Keep a trace of the command line.
+# Strip out --no-create and --no-recursion so they do not pile up.
+# Strip out --silent because we don't want to record it for future runs.
+# Also quote any args containing shell meta-characters.
+# Make two passes to allow for proper duplicate-argument suppression.
+ac_configure_args=
+ac_configure_args0=
+ac_configure_args1=
+ac_must_keep_next=false
+for ac_pass in 1 2
+do
+ for ac_arg
+ do
+ case $ac_arg in
+ -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
+ -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+ | -silent | --silent | --silen | --sile | --sil)
+ continue ;;
+ *\'*)
+ ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
+ esac
+ case $ac_pass in
+ 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
+ 2)
+ ac_configure_args1="$ac_configure_args1 '$ac_arg'"
+ if test $ac_must_keep_next = true; then
+ ac_must_keep_next=false # Got value, back to normal.
+ else
+ case $ac_arg in
+ *=* | --config-cache | -C | -disable-* | --disable-* \
+ | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
+ | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
+ | -with-* | --with-* | -without-* | --without-* | --x)
+ case "$ac_configure_args0 " in
+ "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
+ esac
+ ;;
+ -* ) ac_must_keep_next=true ;;
+ esac
+ fi
+ ac_configure_args="$ac_configure_args '$ac_arg'"
+ ;;
+ esac
+ done
+done
+$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
+$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; }
+
+# When interrupted or exit'd, cleanup temporary files, and complete
+# config.log. We remove comments because anyway the quotes in there
+# would cause problems or look ugly.
+# WARNING: Use '\'' to represent an apostrophe within the trap.
+# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
+trap 'exit_status=$?
+ # Save into config.log some information that might help in debugging.
+ {
+ echo
+
+ cat <<\_ASBOX
+## ---------------- ##
+## Cache variables. ##
+## ---------------- ##
+_ASBOX
+ echo
+ # The following way of writing the cache mishandles newlines in values,
+(
+ for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
+ eval ac_val=\$$ac_var
+ case $ac_val in #(
+ *${as_nl}*)
+ case $ac_var in #(
+ *_cv_*) { $as_echo "$as_me:$LINENO: WARNING: cache variable $ac_var contains a newline" >&5
+$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
+ esac
+ case $ac_var in #(
+ _ | IFS | as_nl) ;; #(
+ BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
+ *) $as_unset $ac_var ;;
+ esac ;;
+ esac
+ done
+ (set) 2>&1 |
+ case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
+ *${as_nl}ac_space=\ *)
+ sed -n \
+ "s/'\''/'\''\\\\'\'''\''/g;
+ s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
+ ;; #(
+ *)
+ sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
+ ;;
+ esac |
+ sort
+)
+ echo
+
+ cat <<\_ASBOX
+## ----------------- ##
+## Output variables. ##
+## ----------------- ##
+_ASBOX
+ echo
+ for ac_var in $ac_subst_vars
+ do
+ eval ac_val=\$$ac_var
+ case $ac_val in
+ *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
+ esac
+ $as_echo "$ac_var='\''$ac_val'\''"
+ done | sort
+ echo
+
+ if test -n "$ac_subst_files"; then
+ cat <<\_ASBOX
+## ------------------- ##
+## File substitutions. ##
+## ------------------- ##
+_ASBOX
+ echo
+ for ac_var in $ac_subst_files
+ do
+ eval ac_val=\$$ac_var
+ case $ac_val in
+ *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
+ esac
+ $as_echo "$ac_var='\''$ac_val'\''"
+ done | sort
+ echo
+ fi
+
+ if test -s confdefs.h; then
+ cat <<\_ASBOX
+## ----------- ##
+## confdefs.h. ##
+## ----------- ##
+_ASBOX
+ echo
+ cat confdefs.h
+ echo
+ fi
+ test "$ac_signal" != 0 &&
+ $as_echo "$as_me: caught signal $ac_signal"
+ $as_echo "$as_me: exit $exit_status"
+ } >&5
+ rm -f core *.core core.conftest.* &&
+ rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
+ exit $exit_status
+' 0
+for ac_signal in 1 2 13 15; do
+ trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
+done
+ac_signal=0
+
+# confdefs.h avoids OS command line length limits that DEFS can exceed.
+rm -f -r conftest* confdefs.h
+
+# Predefined preprocessor variables.
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_NAME "$PACKAGE_NAME"
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_VERSION "$PACKAGE_VERSION"
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_STRING "$PACKAGE_STRING"
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
+_ACEOF
+
+
+# Let the site file select an alternate cache file if it wants to.
+# Prefer an explicitly selected file to automatically selected ones.
+ac_site_file1=NONE
+ac_site_file2=NONE
+if test -n "$CONFIG_SITE"; then
+ ac_site_file1=$CONFIG_SITE
+elif test "x$prefix" != xNONE; then
+ ac_site_file1=$prefix/share/config.site
+ ac_site_file2=$prefix/etc/config.site
+else
+ ac_site_file1=$ac_default_prefix/share/config.site
+ ac_site_file2=$ac_default_prefix/etc/config.site
+fi
+for ac_site_file in "$ac_site_file1" "$ac_site_file2"
+do
+ test "x$ac_site_file" = xNONE && continue
+ if test -r "$ac_site_file"; then
+ { $as_echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
+$as_echo "$as_me: loading site script $ac_site_file" >&6;}
+ sed 's/^/| /' "$ac_site_file" >&5
+ . "$ac_site_file"
+ fi
+done
+
+if test -r "$cache_file"; then
+ # Some versions of bash will fail to source /dev/null (special
+ # files actually), so we avoid doing that.
+ if test -f "$cache_file"; then
+ { $as_echo "$as_me:$LINENO: loading cache $cache_file" >&5
+$as_echo "$as_me: loading cache $cache_file" >&6;}
+ case $cache_file in
+ [\\/]* | ?:[\\/]* ) . "$cache_file";;
+ *) . "./$cache_file";;
+ esac
+ fi
+else
+ { $as_echo "$as_me:$LINENO: creating cache $cache_file" >&5
+$as_echo "$as_me: creating cache $cache_file" >&6;}
+ >$cache_file
+fi
+
+# Check that the precious variables saved in the cache have kept the same
+# value.
+ac_cache_corrupted=false
+for ac_var in $ac_precious_vars; do
+ eval ac_old_set=\$ac_cv_env_${ac_var}_set
+ eval ac_new_set=\$ac_env_${ac_var}_set
+ eval ac_old_val=\$ac_cv_env_${ac_var}_value
+ eval ac_new_val=\$ac_env_${ac_var}_value
+ case $ac_old_set,$ac_new_set in
+ set,)
+ { $as_echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
+$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
+ ac_cache_corrupted=: ;;
+ ,set)
+ { $as_echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
+$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
+ ac_cache_corrupted=: ;;
+ ,);;
+ *)
+ if test "x$ac_old_val" != "x$ac_new_val"; then
+ # differences in whitespace do not lead to failure.
+ ac_old_val_w=`echo x $ac_old_val`
+ ac_new_val_w=`echo x $ac_new_val`
+ if test "$ac_old_val_w" != "$ac_new_val_w"; then
+ { $as_echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
+$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
+ ac_cache_corrupted=:
+ else
+ { $as_echo "$as_me:$LINENO: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
+$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
+ eval $ac_var=\$ac_old_val
+ fi
+ { $as_echo "$as_me:$LINENO: former value: \`$ac_old_val'" >&5
+$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
+ { $as_echo "$as_me:$LINENO: current value: \`$ac_new_val'" >&5
+$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
+ fi;;
+ esac
+ # Pass precious variables to config.status.
+ if test "$ac_new_set" = set; then
+ case $ac_new_val in
+ *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
+ *) ac_arg=$ac_var=$ac_new_val ;;
+ esac
+ case " $ac_configure_args " in
+ *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
+ *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
+ esac
+ fi
+done
+if $ac_cache_corrupted; then
+ { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+ { $as_echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
+$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
+ { { $as_echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
+$as_echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
+ { (exit 1); exit 1; }; }
+fi
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+
+if test "${enable_shared}" = "yes" ; then
+ echo "Shared libraries not supported for cross compiling, ignored"
+fi
+
+if test "$srcdir" = "." ; then
+ if test "${with_target_subdir}" != "." ; then
+ libgloss_topdir="${srcdir}/${with_multisrctop}../../.."
+ else
+ libgloss_topdir="${srcdir}/${with_multisrctop}../.."
+ fi
+else
+ libgloss_topdir="${srcdir}/../.."
+fi
+ac_aux_dir=
+for ac_dir in $libgloss_topdir "$srcdir"/$libgloss_topdir; do
+ if test -f "$ac_dir/install-sh"; then
+ ac_aux_dir=$ac_dir
+ ac_install_sh="$ac_aux_dir/install-sh -c"
+ break
+ elif test -f "$ac_dir/install.sh"; then
+ ac_aux_dir=$ac_dir
+ ac_install_sh="$ac_aux_dir/install.sh -c"
+ break
+ elif test -f "$ac_dir/shtool"; then
+ ac_aux_dir=$ac_dir
+ ac_install_sh="$ac_aux_dir/shtool install -c"
+ break
+ fi
+done
+if test -z "$ac_aux_dir"; then
+ { { $as_echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in $libgloss_topdir \"$srcdir\"/$libgloss_topdir" >&5
+$as_echo "$as_me: error: cannot find install-sh or install.sh in $libgloss_topdir \"$srcdir\"/$libgloss_topdir" >&2;}
+ { (exit 1); exit 1; }; }
+fi
+
+# These three variables are undocumented and unsupported,
+# and are intended to be withdrawn in a future Autoconf release.
+# They can cause serious problems if a builder's source tree is in a directory
+# whose full name contains unusual characters.
+ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
+ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
+ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
+
+
+
+# Make sure we can run config.sub.
+$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
+ { { $as_echo "$as_me:$LINENO: error: cannot run $SHELL $ac_aux_dir/config.sub" >&5
+$as_echo "$as_me: error: cannot run $SHELL $ac_aux_dir/config.sub" >&2;}
+ { (exit 1); exit 1; }; }
+
+{ $as_echo "$as_me:$LINENO: checking build system type" >&5
+$as_echo_n "checking build system type... " >&6; }
+if test "${ac_cv_build+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ ac_build_alias=$build_alias
+test "x$ac_build_alias" = x &&
+ ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
+test "x$ac_build_alias" = x &&
+ { { $as_echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5
+$as_echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
+ { (exit 1); exit 1; }; }
+ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
+ { { $as_echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&5
+$as_echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&2;}
+ { (exit 1); exit 1; }; }
+
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_build" >&5
+$as_echo "$ac_cv_build" >&6; }
+case $ac_cv_build in
+*-*-*) ;;
+*) { { $as_echo "$as_me:$LINENO: error: invalid value of canonical build" >&5
+$as_echo "$as_me: error: invalid value of canonical build" >&2;}
+ { (exit 1); exit 1; }; };;
+esac
+build=$ac_cv_build
+ac_save_IFS=$IFS; IFS='-'
+set x $ac_cv_build
+shift
+build_cpu=$1
+build_vendor=$2
+shift; shift
+# Remember, the first character of IFS is used to create $*,
+# except with old shells:
+build_os=$*
+IFS=$ac_save_IFS
+case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
+
+
+{ $as_echo "$as_me:$LINENO: checking host system type" >&5
+$as_echo_n "checking host system type... " >&6; }
+if test "${ac_cv_host+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ if test "x$host_alias" = x; then
+ ac_cv_host=$ac_cv_build
+else
+ ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
+ { { $as_echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&5
+$as_echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&2;}
+ { (exit 1); exit 1; }; }
+fi
+
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_host" >&5
+$as_echo "$ac_cv_host" >&6; }
+case $ac_cv_host in
+*-*-*) ;;
+*) { { $as_echo "$as_me:$LINENO: error: invalid value of canonical host" >&5
+$as_echo "$as_me: error: invalid value of canonical host" >&2;}
+ { (exit 1); exit 1; }; };;
+esac
+host=$ac_cv_host
+ac_save_IFS=$IFS; IFS='-'
+set x $ac_cv_host
+shift
+host_cpu=$1
+host_vendor=$2
+shift; shift
+# Remember, the first character of IFS is used to create $*,
+# except with old shells:
+host_os=$*
+IFS=$ac_save_IFS
+case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
+
+
+{ $as_echo "$as_me:$LINENO: checking target system type" >&5
+$as_echo_n "checking target system type... " >&6; }
+if test "${ac_cv_target+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ if test "x$target_alias" = x; then
+ ac_cv_target=$ac_cv_host
+else
+ ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
+ { { $as_echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $target_alias failed" >&5
+$as_echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $target_alias failed" >&2;}
+ { (exit 1); exit 1; }; }
+fi
+
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_target" >&5
+$as_echo "$ac_cv_target" >&6; }
+case $ac_cv_target in
+*-*-*) ;;
+*) { { $as_echo "$as_me:$LINENO: error: invalid value of canonical target" >&5
+$as_echo "$as_me: error: invalid value of canonical target" >&2;}
+ { (exit 1); exit 1; }; };;
+esac
+target=$ac_cv_target
+ac_save_IFS=$IFS; IFS='-'
+set x $ac_cv_target
+shift
+target_cpu=$1
+target_vendor=$2
+shift; shift
+# Remember, the first character of IFS is used to create $*,
+# except with old shells:
+target_os=$*
+IFS=$ac_save_IFS
+case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
+
+
+# The aliases save the names the user supplied, while $host etc.
+# will get canonicalized.
+test -n "$target_alias" &&
+ test "$program_prefix$program_suffix$program_transform_name" = \
+ NONENONEs,x,x, &&
+ program_prefix=${target_alias}-
+test "$program_prefix" != NONE &&
+ program_transform_name="s&^&$program_prefix&;$program_transform_name"
+# Use a double $ so make ignores it.
+test "$program_suffix" != NONE &&
+ program_transform_name="s&\$&$program_suffix&;$program_transform_name"
+# Double any \ or $.
+# By default was `s,x,x', remove it if useless.
+ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
+program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"`
+
+
+# Find a good install program. We prefer a C program (faster),
+# so one script is as good as another. But avoid the broken or
+# incompatible versions:
+# SysV /etc/install, /usr/sbin/install
+# SunOS /usr/etc/install
+# IRIX /sbin/install
+# AIX /bin/install
+# AmigaOS /C/install, which installs bootblocks on floppy discs
+# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
+# AFS /usr/afsws/bin/install, which mishandles nonexistent args
+# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
+# OS/2's system install, which has a completely different semantic
+# ./install, which can be erroneously created by make from ./install.sh.
+# Reject install programs that cannot install multiple files.
+{ $as_echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
+$as_echo_n "checking for a BSD-compatible install... " >&6; }
+if test -z "$INSTALL"; then
+if test "${ac_cv_path_install+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ # Account for people who put trailing slashes in PATH elements.
+case $as_dir/ in
+ ./ | .// | /cC/* | \
+ /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
+ ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \
+ /usr/ucb/* ) ;;
+ *)
+ # OSF1 and SCO ODT 3.0 have their own names for install.
+ # Don't use installbsd from OSF since it installs stuff as root
+ # by default.
+ for ac_prog in ginstall scoinst install; do
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
+ if test $ac_prog = install &&
+ grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
+ # AIX install. It has an incompatible calling convention.
+ :
+ elif test $ac_prog = install &&
+ grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
+ # program-specific install script used by HP pwplus--don't use.
+ :
+ else
+ rm -rf conftest.one conftest.two conftest.dir
+ echo one > conftest.one
+ echo two > conftest.two
+ mkdir conftest.dir
+ if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
+ test -s conftest.one && test -s conftest.two &&
+ test -s conftest.dir/conftest.one &&
+ test -s conftest.dir/conftest.two
+ then
+ ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
+ break 3
+ fi
+ fi
+ fi
+ done
+ done
+ ;;
+esac
+
+done
+IFS=$as_save_IFS
+
+rm -rf conftest.one conftest.two conftest.dir
+
+fi
+ if test "${ac_cv_path_install+set}" = set; then
+ INSTALL=$ac_cv_path_install
+ else
+ # As a last resort, use the slow shell script. Don't cache a
+ # value for INSTALL within a source directory, because that will
+ # break other packages using the cache if that directory is
+ # removed, or if the value is a relative name.
+ INSTALL=$ac_install_sh
+ fi
+fi
+{ $as_echo "$as_me:$LINENO: result: $INSTALL" >&5
+$as_echo "$INSTALL" >&6; }
+
+# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
+# It thinks the first close brace ends the variable substitution.
+test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
+
+test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
+
+test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
+
+
+rm -rf .tst 2>/dev/null
+mkdir .tst 2>/dev/null
+if test -d .tst; then
+ am__leading_dot=.
+else
+ am__leading_dot=_
+fi
+rmdir .tst 2>/dev/null
+
+DEPDIR="${am__leading_dot}deps"
+
+ac_config_commands="$ac_config_commands depfiles"
+
+
+am_make=${MAKE-make}
+cat > confinc << 'END'
+am__doit:
+ @echo this is the am__doit target
+.PHONY: am__doit
+END
+# If we don't find an include directive, just comment out the code.
+{ $as_echo "$as_me:$LINENO: checking for style of include used by $am_make" >&5
+$as_echo_n "checking for style of include used by $am_make... " >&6; }
+am__include="#"
+am__quote=
+_am_result=none
+# First try GNU make style include.
+echo "include confinc" > confmf
+# Ignore all kinds of additional output from `make'.
+case `$am_make -s -f confmf 2> /dev/null` in #(
+*the\ am__doit\ target*)
+ am__include=include
+ am__quote=
+ _am_result=GNU
+ ;;
+esac
+# Now try BSD make style include.
+if test "$am__include" = "#"; then
+ echo '.include "confinc"' > confmf
+ case `$am_make -s -f confmf 2> /dev/null` in #(
+ *the\ am__doit\ target*)
+ am__include=.include
+ am__quote="\""
+ _am_result=BSD
+ ;;
+ esac
+fi
+
+
+{ $as_echo "$as_me:$LINENO: result: $_am_result" >&5
+$as_echo "$_am_result" >&6; }
+rm -f confinc confmf
+
+# Check whether --enable-dependency-tracking was given.
+if test "${enable_dependency_tracking+set}" = set; then
+ enableval=$enable_dependency_tracking;
+fi
+
+if test "x$enable_dependency_tracking" != xno; then
+ am_depcomp="$ac_aux_dir/depcomp"
+ AMDEPBACKSLASH='\'
+fi
+ if test "x$enable_dependency_tracking" != xno; then
+ AMDEP_TRUE=
+ AMDEP_FALSE='#'
+else
+ AMDEP_TRUE='#'
+ AMDEP_FALSE=
+fi
+
+
+# Extract the first word of "gcc", so it can be a program name with args.
+set dummy gcc; ac_word=$2
+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_CC+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_CC="gcc"
+ $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+IFS=$as_save_IFS
+
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+ { $as_echo "$as_me:$LINENO: result: $CC" >&5
+$as_echo "$CC" >&6; }
+else
+ { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+
+depcc="$CC" am_compiler_list=
+
+{ $as_echo "$as_me:$LINENO: checking dependency style of $depcc" >&5
+$as_echo_n "checking dependency style of $depcc... " >&6; }
+if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
+ # We make a subdir and do the tests there. Otherwise we can end up
+ # making bogus files that we don't know about and never remove. For
+ # instance it was reported that on HP-UX the gcc test will end up
+ # making a dummy file named `D' -- because `-MD' means `put the output
+ # in D'.
+ mkdir conftest.dir
+ # Copy depcomp to subdir because otherwise we won't find it if we're
+ # using a relative directory.
+ cp "$am_depcomp" conftest.dir
+ cd conftest.dir
+ # We will build objects and dependencies in a subdirectory because
+ # it helps to detect inapplicable dependency modes. For instance
+ # both Tru64's cc and ICC support -MD to output dependencies as a
+ # side effect of compilation, but ICC will put the dependencies in
+ # the current directory while Tru64 will put them in the object
+ # directory.
+ mkdir sub
+
+ am_cv_CC_dependencies_compiler_type=none
+ if test "$am_compiler_list" = ""; then
+ am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
+ fi
+ am__universal=false
+ case " $depcc " in #(
+ *\ -arch\ *\ -arch\ *) am__universal=true ;;
+ esac
+
+ for depmode in $am_compiler_list; do
+ # Setup a source with many dependencies, because some compilers
+ # like to wrap large dependency lists on column 80 (with \), and
+ # we should not choose a depcomp mode which is confused by this.
+ #
+ # We need to recreate these files for each test, as the compiler may
+ # overwrite some of them when testing with obscure command lines.
+ # This happens at least with the AIX C compiler.
+ : > sub/conftest.c
+ for i in 1 2 3 4 5 6; do
+ echo '#include "conftst'$i'.h"' >> sub/conftest.c
+ # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
+ # Solaris 8's {/usr,}/bin/sh.
+ touch sub/conftst$i.h
+ done
+ echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
+
+ # We check with `-c' and `-o' for the sake of the "dashmstdout"
+ # mode. It turns out that the SunPro C++ compiler does not properly
+ # handle `-M -o', and we need to detect this. Also, some Intel
+ # versions had trouble with output in subdirs
+ am__obj=sub/conftest.${OBJEXT-o}
+ am__minus_obj="-o $am__obj"
+ case $depmode in
+ gcc)
+ # This depmode causes a compiler race in universal mode.
+ test "$am__universal" = false || continue
+ ;;
+ nosideeffect)
+ # after this tag, mechanisms are not by side-effect, so they'll
+ # only be used when explicitly requested
+ if test "x$enable_dependency_tracking" = xyes; then
+ continue
+ else
+ break
+ fi
+ ;;
+ msvisualcpp | msvcmsys)
+ # This compiler won't grok `-c -o', but also, the minuso test has
+ # not run yet. These depmodes are late enough in the game, and
+ # so weak that their functioning should not be impacted.
+ am__obj=conftest.${OBJEXT-o}
+ am__minus_obj=
+ ;;
+ none) break ;;
+ esac
+ if depmode=$depmode \
+ source=sub/conftest.c object=$am__obj \
+ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
+ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
+ >/dev/null 2>conftest.err &&
+ grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
+ grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
+ grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
+ ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
+ # icc doesn't choke on unknown options, it will just issue warnings
+ # or remarks (even with -Werror). So we grep stderr for any message
+ # that says an option was ignored or not supported.
+ # When given -MP, icc 7.0 and 7.1 complain thusly:
+ # icc: Command line warning: ignoring option '-M'; no argument required
+ # The diagnosis changed in icc 8.0:
+ # icc: Command line remark: option '-MP' not supported
+ if (grep 'ignoring option' conftest.err ||
+ grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
+ am_cv_CC_dependencies_compiler_type=$depmode
+ break
+ fi
+ fi
+ done
+
+ cd ..
+ rm -rf conftest.dir
+else
+ am_cv_CC_dependencies_compiler_type=none
+fi
+
+fi
+{ $as_echo "$as_me:$LINENO: result: $am_cv_CC_dependencies_compiler_type" >&5
+$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; }
+CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
+
+ if
+ test "x$enable_dependency_tracking" != xno \
+ && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then
+ am__fastdepCC_TRUE=
+ am__fastdepCC_FALSE='#'
+else
+ am__fastdepCC_TRUE='#'
+ am__fastdepCC_FALSE=
+fi
+
+
+if test -z "$CC"; then
+ # Extract the first word of "cc", so it can be a program name with args.
+set dummy cc; ac_word=$2
+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_CC+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+ ac_prog_rejected=no
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
+ ac_prog_rejected=yes
+ continue
+ fi
+ ac_cv_prog_CC="cc"
+ $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+IFS=$as_save_IFS
+
+if test $ac_prog_rejected = yes; then
+ # We found a bogon in the path, so make sure we never use it.
+ set dummy $ac_cv_prog_CC
+ shift
+ if test $# != 0; then
+ # We chose a different compiler from the bogus one.
+ # However, it has the same basename, so the bogon will be chosen
+ # first if we set CC to just the basename; use the full file name.
+ shift
+ ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
+ fi
+fi
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+ { $as_echo "$as_me:$LINENO: result: $CC" >&5
+$as_echo "$CC" >&6; }
+else
+ { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+ test -z "$CC" && { { $as_echo "$as_me:$LINENO: error: no acceptable cc found in \$PATH" >&5
+$as_echo "$as_me: error: no acceptable cc found in \$PATH" >&2;}
+ { (exit 1); exit 1; }; }
+fi
+
+{ $as_echo "$as_me:$LINENO: checking whether we are using GNU C" >&5
+$as_echo_n "checking whether we are using GNU C... " >&6; }
+if test "${ac_cv_c_compiler_gnu+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ cat > conftest.c <<EOF
+#ifdef __GNUC__
+ yes;
+#endif
+EOF
+if { ac_try='${CC-cc} -E conftest.c'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } | egrep yes >/dev/null 2>&1; then
+ ac_cv_c_compiler_gnu=yes
+else
+ ac_cv_c_compiler_gnu=no
+fi
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
+$as_echo "$ac_cv_c_compiler_gnu" >&6; }
+
+if test $ac_cv_c_compiler_gnu = yes; then
+ GCC=yes
+ ac_test_CFLAGS="${CFLAGS+set}"
+ ac_save_CFLAGS="$CFLAGS"
+ CFLAGS=
+ ac_test_CFLAGS=${CFLAGS+set}
+ac_save_CFLAGS=$CFLAGS
+{ $as_echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
+$as_echo_n "checking whether $CC accepts -g... " >&6; }
+if test "${ac_cv_prog_cc_g+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ ac_save_c_werror_flag=$ac_c_werror_flag
+ ac_c_werror_flag=yes
+ ac_cv_prog_cc_g=no
+ CFLAGS="-g"
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_cv_prog_cc_g=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ CFLAGS=""
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ :
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_c_werror_flag=$ac_save_c_werror_flag
+ CFLAGS="-g"
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_cv_prog_cc_g=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ ac_c_werror_flag=$ac_save_c_werror_flag
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
+$as_echo "$ac_cv_prog_cc_g" >&6; }
+if test "$ac_test_CFLAGS" = set; then
+ CFLAGS=$ac_save_CFLAGS
+elif test $ac_cv_prog_cc_g = yes; then
+ if test "$GCC" = yes; then
+ CFLAGS="-g -O2"
+ else
+ CFLAGS="-g"
+ fi
+else
+ if test "$GCC" = yes; then
+ CFLAGS="-O2"
+ else
+ CFLAGS=
+ fi
+fi
+ if test "$ac_test_CFLAGS" = set; then
+ CFLAGS="$ac_save_CFLAGS"
+ elif test $ac_cv_prog_cc_g = yes; then
+ CFLAGS="-g -O2"
+ else
+ CFLAGS="-O2"
+ fi
+else
+ GCC=
+ test "${CFLAGS+set}" = set || CFLAGS="-g"
+fi
+
+
+AS=${AS-as}
+
+AR=${AR-ar}
+
+LD=${LD-ld}
+
+if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
+set dummy ${ac_tool_prefix}ranlib; ac_word=$2
+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_RANLIB+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$RANLIB"; then
+ ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
+ $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+IFS=$as_save_IFS
+
+fi
+fi
+RANLIB=$ac_cv_prog_RANLIB
+if test -n "$RANLIB"; then
+ { $as_echo "$as_me:$LINENO: result: $RANLIB" >&5
+$as_echo "$RANLIB" >&6; }
+else
+ { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_RANLIB"; then
+ ac_ct_RANLIB=$RANLIB
+ # Extract the first word of "ranlib", so it can be a program name with args.
+set dummy ranlib; ac_word=$2
+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_ct_RANLIB"; then
+ ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_ac_ct_RANLIB="ranlib"
+ $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
+if test -n "$ac_ct_RANLIB"; then
+ { $as_echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
+$as_echo "$ac_ct_RANLIB" >&6; }
+else
+ { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+ if test "x$ac_ct_RANLIB" = x; then
+ RANLIB=":"
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ RANLIB=$ac_ct_RANLIB
+ fi
+else
+ RANLIB="$ac_cv_prog_RANLIB"
+fi
+
+# By default we simply use the C compiler to build assembly code.
+
+test "${CCAS+set}" = set || CCAS=$CC
+test "${CCASFLAGS+set}" = set || CCASFLAGS=$CFLAGS
+
+
+
+
+host_makefile_frag=${srcdir}/../config/default.mh
+
+host_makefile_frag_path=$host_makefile_frag
+
+
+
+ac_config_files="$ac_config_files Makefile"
+
+cat >confcache <<\_ACEOF
+# This file is a shell script that caches the results of configure
+# tests run on this system so they can be shared between configure
+# scripts and configure runs, see configure's option --config-cache.
+# It is not useful on other systems. If it contains results you don't
+# want to keep, you may remove or edit it.
+#
+# config.status only pays attention to the cache file if you give it
+# the --recheck option to rerun configure.
+#
+# `ac_cv_env_foo' variables (set or unset) will be overridden when
+# loading this file, other *unset* `ac_cv_foo' will be assigned the
+# following values.
+
+_ACEOF
+
+# The following way of writing the cache mishandles newlines in values,
+# but we know of no workaround that is simple, portable, and efficient.
+# So, we kill variables containing newlines.
+# Ultrix sh set writes to stderr and can't be redirected directly,
+# and sets the high bit in the cache file unless we assign to the vars.
+(
+ for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
+ eval ac_val=\$$ac_var
+ case $ac_val in #(
+ *${as_nl}*)
+ case $ac_var in #(
+ *_cv_*) { $as_echo "$as_me:$LINENO: WARNING: cache variable $ac_var contains a newline" >&5
+$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
+ esac
+ case $ac_var in #(
+ _ | IFS | as_nl) ;; #(
+ BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
+ *) $as_unset $ac_var ;;
+ esac ;;
+ esac
+ done
+
+ (set) 2>&1 |
+ case $as_nl`(ac_space=' '; set) 2>&1` in #(
+ *${as_nl}ac_space=\ *)
+ # `set' does not quote correctly, so add quotes (double-quote
+ # substitution turns \\\\ into \\, and sed turns \\ into \).
+ sed -n \
+ "s/'/'\\\\''/g;
+ s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
+ ;; #(
+ *)
+ # `set' quotes correctly as required by POSIX, so do not add quotes.
+ sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
+ ;;
+ esac |
+ sort
+) |
+ sed '
+ /^ac_cv_env_/b end
+ t clear
+ :clear
+ s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
+ t end
+ s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
+ :end' >>confcache
+if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
+ if test -w "$cache_file"; then
+ test "x$cache_file" != "x/dev/null" &&
+ { $as_echo "$as_me:$LINENO: updating cache $cache_file" >&5
+$as_echo "$as_me: updating cache $cache_file" >&6;}
+ cat confcache >$cache_file
+ else
+ { $as_echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5
+$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
+ fi
+fi
+rm -f confcache
+
+test "x$prefix" = xNONE && prefix=$ac_default_prefix
+# Let make expand exec_prefix.
+test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
+
+# Transform confdefs.h into DEFS.
+# Protect against shell expansion while executing Makefile rules.
+# Protect against Makefile macro expansion.
+#
+# If the first sed substitution is executed (which looks for macros that
+# take arguments), then branch to the quote section. Otherwise,
+# look for a macro that doesn't take arguments.
+ac_script='
+:mline
+/\\$/{
+ N
+ s,\\\n,,
+ b mline
+}
+t clear
+:clear
+s/^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*([^)]*)\)[ ]*\(.*\)/-D\1=\2/g
+t quote
+s/^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)/-D\1=\2/g
+t quote
+b any
+:quote
+s/[ `~#$^&*(){}\\|;'\''"<>?]/\\&/g
+s/\[/\\&/g
+s/\]/\\&/g
+s/\$/$$/g
+H
+:any
+${
+ g
+ s/^\n//
+ s/\n/ /g
+ p
+}
+'
+DEFS=`sed -n "$ac_script" confdefs.h`
+
+
+ac_libobjs=
+ac_ltlibobjs=
+for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
+ # 1. Remove the extension, and $U if already installed.
+ ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
+ ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
+ # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
+ # will be set to the directory where LIBOBJS objects are built.
+ ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext"
+ ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo'
+done
+LIBOBJS=$ac_libobjs
+
+LTLIBOBJS=$ac_ltlibobjs
+
+
+if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then
+ { { $as_echo "$as_me:$LINENO: error: conditional \"AMDEP\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+$as_echo "$as_me: error: conditional \"AMDEP\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
+ { { $as_echo "$as_me:$LINENO: error: conditional \"am__fastdepCC\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+$as_echo "$as_me: error: conditional \"am__fastdepCC\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+
+: ${CONFIG_STATUS=./config.status}
+ac_write_fail=0
+ac_clean_files_save=$ac_clean_files
+ac_clean_files="$ac_clean_files $CONFIG_STATUS"
+{ $as_echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
+$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
+cat >$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+#! $SHELL
+# Generated by $as_me.
+# Run this file to recreate the current configuration.
+# Compiler output produced by configure, useful for debugging
+# configure, is in config.log if it exists.
+
+debug=false
+ac_cs_recheck=false
+ac_cs_silent=false
+SHELL=\${CONFIG_SHELL-$SHELL}
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+## --------------------- ##
+## M4sh Initialization. ##
+## --------------------- ##
+
+# Be more Bourne compatible
+DUALCASE=1; export DUALCASE # for MKS sh
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
+ emulate sh
+ NULLCMD=:
+ # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
+ # is contrary to our usage. Disable this feature.
+ alias -g '${1+"$@"}'='"$@"'
+ setopt NO_GLOB_SUBST
+else
+ case `(set -o) 2>/dev/null` in
+ *posix*) set -o posix ;;
+esac
+
+fi
+
+
+
+
+# PATH needs CR
+# Avoid depending upon Character Ranges.
+as_cr_letters='abcdefghijklmnopqrstuvwxyz'
+as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
+as_cr_Letters=$as_cr_letters$as_cr_LETTERS
+as_cr_digits='0123456789'
+as_cr_alnum=$as_cr_Letters$as_cr_digits
+
+as_nl='
+'
+export as_nl
+# Printing a long string crashes Solaris 7 /usr/bin/printf.
+as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
+as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
+as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
+if (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
+ as_echo='printf %s\n'
+ as_echo_n='printf %s'
+else
+ if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
+ as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
+ as_echo_n='/usr/ucb/echo -n'
+ else
+ as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
+ as_echo_n_body='eval
+ arg=$1;
+ case $arg in
+ *"$as_nl"*)
+ expr "X$arg" : "X\\(.*\\)$as_nl";
+ arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
+ esac;
+ expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
+ '
+ export as_echo_n_body
+ as_echo_n='sh -c $as_echo_n_body as_echo'
+ fi
+ export as_echo_body
+ as_echo='sh -c $as_echo_body as_echo'
+fi
+
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+ PATH_SEPARATOR=:
+ (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
+ (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
+ PATH_SEPARATOR=';'
+ }
+fi
+
+# Support unset when possible.
+if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
+ as_unset=unset
+else
+ as_unset=false
+fi
+
+
+# IFS
+# We need space, tab and new line, in precisely that order. Quoting is
+# there to prevent editors from complaining about space-tab.
+# (If _AS_PATH_WALK were called with IFS unset, it would disable word
+# splitting by setting IFS to empty value.)
+IFS=" "" $as_nl"
+
+# Find who we are. Look in the path if we contain no directory separator.
+case $0 in
+ *[\\/]* ) as_myself=$0 ;;
+ *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
+done
+IFS=$as_save_IFS
+
+ ;;
+esac
+# We did not find ourselves, most probably we were run as `sh COMMAND'
+# in which case we are not to be found in the path.
+if test "x$as_myself" = x; then
+ as_myself=$0
+fi
+if test ! -f "$as_myself"; then
+ $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
+ { (exit 1); exit 1; }
+fi
+
+# Work around bugs in pre-3.0 UWIN ksh.
+for as_var in ENV MAIL MAILPATH
+do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
+done
+PS1='$ '
+PS2='> '
+PS4='+ '
+
+# NLS nuisances.
+LC_ALL=C
+export LC_ALL
+LANGUAGE=C
+export LANGUAGE
+
+# Required to use basename.
+if expr a : '\(a\)' >/dev/null 2>&1 &&
+ test "X`expr 00001 : '.*\(...\)'`" = X001; then
+ as_expr=expr
+else
+ as_expr=false
+fi
+
+if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
+ as_basename=basename
+else
+ as_basename=false
+fi
+
+
+# Name of the executable.
+as_me=`$as_basename -- "$0" ||
+$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
+ X"$0" : 'X\(//\)$' \| \
+ X"$0" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X/"$0" |
+ sed '/^.*\/\([^/][^/]*\)\/*$/{
+ s//\1/
+ q
+ }
+ /^X\/\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\/\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+
+# CDPATH.
+$as_unset CDPATH
+
+
+
+ as_lineno_1=$LINENO
+ as_lineno_2=$LINENO
+ test "x$as_lineno_1" != "x$as_lineno_2" &&
+ test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
+
+ # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
+ # uniformly replaced by the line number. The first 'sed' inserts a
+ # line-number line after each line using $LINENO; the second 'sed'
+ # does the real work. The second script uses 'N' to pair each
+ # line-number line with the line containing $LINENO, and appends
+ # trailing '-' during substitution so that $LINENO is not a special
+ # case at line end.
+ # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
+ # scripts with optimization help from Paolo Bonzini. Blame Lee
+ # E. McMahon (1931-1989) for sed's syntax. :-)
+ sed -n '
+ p
+ /[$]LINENO/=
+ ' <$as_myself |
+ sed '
+ s/[$]LINENO.*/&-/
+ t lineno
+ b
+ :lineno
+ N
+ :loop
+ s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
+ t loop
+ s/-\n.*//
+ ' >$as_me.lineno &&
+ chmod +x "$as_me.lineno" ||
+ { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
+ { (exit 1); exit 1; }; }
+
+ # Don't try to exec as it changes $[0], causing all sort of problems
+ # (the dirname of $[0] is not the place where we might find the
+ # original and so on. Autoconf is especially sensitive to this).
+ . "./$as_me.lineno"
+ # Exit status is that of the last command.
+ exit
+}
+
+
+if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
+ as_dirname=dirname
+else
+ as_dirname=false
+fi
+
+ECHO_C= ECHO_N= ECHO_T=
+case `echo -n x` in
+-n*)
+ case `echo 'x\c'` in
+ *c*) ECHO_T=' ';; # ECHO_T is single tab character.
+ *) ECHO_C='\c';;
+ esac;;
+*)
+ ECHO_N='-n';;
+esac
+if expr a : '\(a\)' >/dev/null 2>&1 &&
+ test "X`expr 00001 : '.*\(...\)'`" = X001; then
+ as_expr=expr
+else
+ as_expr=false
+fi
+
+rm -f conf$$ conf$$.exe conf$$.file
+if test -d conf$$.dir; then
+ rm -f conf$$.dir/conf$$.file
+else
+ rm -f conf$$.dir
+ mkdir conf$$.dir 2>/dev/null
+fi
+if (echo >conf$$.file) 2>/dev/null; then
+ if ln -s conf$$.file conf$$ 2>/dev/null; then
+ as_ln_s='ln -s'
+ # ... but there are two gotchas:
+ # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
+ # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
+ # In both cases, we have to default to `cp -p'.
+ ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
+ as_ln_s='cp -p'
+ elif ln conf$$.file conf$$ 2>/dev/null; then
+ as_ln_s=ln
+ else
+ as_ln_s='cp -p'
+ fi
+else
+ as_ln_s='cp -p'
+fi
+rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
+rmdir conf$$.dir 2>/dev/null
+
+if mkdir -p . 2>/dev/null; then
+ as_mkdir_p=:
+else
+ test -d ./-p && rmdir ./-p
+ as_mkdir_p=false
+fi
+
+if test -x / >/dev/null 2>&1; then
+ as_test_x='test -x'
+else
+ if ls -dL / >/dev/null 2>&1; then
+ as_ls_L_option=L
+ else
+ as_ls_L_option=
+ fi
+ as_test_x='
+ eval sh -c '\''
+ if test -d "$1"; then
+ test -d "$1/.";
+ else
+ case $1 in
+ -*)set "./$1";;
+ esac;
+ case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
+ ???[sx]*):;;*)false;;esac;fi
+ '\'' sh
+ '
+fi
+as_executable_p=$as_test_x
+
+# Sed expression to map a string onto a valid CPP name.
+as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
+
+# Sed expression to map a string onto a valid variable name.
+as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
+
+
+exec 6>&1
+
+# Save the log message, to keep $[0] and so on meaningful, and to
+# report actual input values of CONFIG_FILES etc. instead of their
+# values after options handling.
+ac_log="
+This file was extended by $as_me, which was
+generated by GNU Autoconf 2.63. Invocation command line was
+
+ CONFIG_FILES = $CONFIG_FILES
+ CONFIG_HEADERS = $CONFIG_HEADERS
+ CONFIG_LINKS = $CONFIG_LINKS
+ CONFIG_COMMANDS = $CONFIG_COMMANDS
+ $ $0 $@
+
+on `(hostname || uname -n) 2>/dev/null | sed 1q`
+"
+
+_ACEOF
+
+case $ac_config_files in *"
+"*) set x $ac_config_files; shift; ac_config_files=$*;;
+esac
+
+
+
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+# Files that config.status was made for.
+config_files="$ac_config_files"
+config_commands="$ac_config_commands"
+
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+ac_cs_usage="\
+\`$as_me' instantiates files from templates according to the
+current configuration.
+
+Usage: $0 [OPTION]... [FILE]...
+
+ -h, --help print this help, then exit
+ -V, --version print version number and configuration settings, then exit
+ -q, --quiet, --silent
+ do not print progress messages
+ -d, --debug don't remove temporary files
+ --recheck update $as_me by reconfiguring in the same conditions
+ --file=FILE[:TEMPLATE]
+ instantiate the configuration file FILE
+
+Configuration files:
+$config_files
+
+Configuration commands:
+$config_commands
+
+Report bugs to <bug-autoconf@gnu.org>."
+
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+ac_cs_version="\\
+config.status
+configured by $0, generated by GNU Autoconf 2.63,
+ with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
+
+Copyright (C) 2008 Free Software Foundation, Inc.
+This config.status script is free software; the Free Software Foundation
+gives unlimited permission to copy, distribute and modify it."
+
+ac_pwd='$ac_pwd'
+srcdir='$srcdir'
+INSTALL='$INSTALL'
+test -n "\$AWK" || AWK=awk
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+# The default lists apply if the user does not specify any file.
+ac_need_defaults=:
+while test $# != 0
+do
+ case $1 in
+ --*=*)
+ ac_option=`expr "X$1" : 'X\([^=]*\)='`
+ ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
+ ac_shift=:
+ ;;
+ *)
+ ac_option=$1
+ ac_optarg=$2
+ ac_shift=shift
+ ;;
+ esac
+
+ case $ac_option in
+ # Handling of the options.
+ -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
+ ac_cs_recheck=: ;;
+ --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
+ $as_echo "$ac_cs_version"; exit ;;
+ --debug | --debu | --deb | --de | --d | -d )
+ debug=: ;;
+ --file | --fil | --fi | --f )
+ $ac_shift
+ case $ac_optarg in
+ *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
+ esac
+ CONFIG_FILES="$CONFIG_FILES '$ac_optarg'"
+ ac_need_defaults=false;;
+ --he | --h | --help | --hel | -h )
+ $as_echo "$ac_cs_usage"; exit ;;
+ -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+ | -silent | --silent | --silen | --sile | --sil | --si | --s)
+ ac_cs_silent=: ;;
+
+ # This is an error.
+ -*) { $as_echo "$as_me: error: unrecognized option: $1
+Try \`$0 --help' for more information." >&2
+ { (exit 1); exit 1; }; } ;;
+
+ *) ac_config_targets="$ac_config_targets $1"
+ ac_need_defaults=false ;;
+
+ esac
+ shift
+done
+
+ac_configure_extra_args=
+
+if $ac_cs_silent; then
+ exec 6>/dev/null
+ ac_configure_extra_args="$ac_configure_extra_args --silent"
+fi
+
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+if \$ac_cs_recheck; then
+ set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
+ shift
+ \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
+ CONFIG_SHELL='$SHELL'
+ export CONFIG_SHELL
+ exec "\$@"
+fi
+
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+exec 5>>config.log
+{
+ echo
+ sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
+## Running $as_me. ##
+_ASBOX
+ $as_echo "$ac_log"
+} >&5
+
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+#
+# INIT-COMMANDS
+#
+AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"
+srcdir=${srcdir}
+target=${target}
+with_multisubdir=${with_multisubdir}
+ac_configure_args="${ac_configure_args} --enable-multilib"
+CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
+libgloss_topdir=${libgloss_topdir}
+
+
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+
+# Handling of arguments.
+for ac_config_target in $ac_config_targets
+do
+ case $ac_config_target in
+ "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
+ "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
+
+ *) { { $as_echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
+$as_echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
+ { (exit 1); exit 1; }; };;
+ esac
+done
+
+
+# If the user did not use the arguments to specify the items to instantiate,
+# then the envvar interface is used. Set only those that are not.
+# We use the long form for the default assignment because of an extremely
+# bizarre bug on SunOS 4.1.3.
+if $ac_need_defaults; then
+ test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
+ test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
+fi
+
+# Have a temporary directory for convenience. Make it in the build tree
+# simply because there is no reason against having it here, and in addition,
+# creating and moving files from /tmp can sometimes cause problems.
+# Hook for its removal unless debugging.
+# Note that there is a small window in which the directory will not be cleaned:
+# after its creation but before its name has been assigned to `$tmp'.
+$debug ||
+{
+ tmp=
+ trap 'exit_status=$?
+ { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
+' 0
+ trap '{ (exit 1); exit 1; }' 1 2 13 15
+}
+# Create a (secure) tmp directory for tmp files.
+
+{
+ tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
+ test -n "$tmp" && test -d "$tmp"
+} ||
+{
+ tmp=./conf$$-$RANDOM
+ (umask 077 && mkdir "$tmp")
+} ||
+{
+ $as_echo "$as_me: cannot create a temporary directory in ." >&2
+ { (exit 1); exit 1; }
+}
+
+# Set up the scripts for CONFIG_FILES section.
+# No need to generate them if there are no CONFIG_FILES.
+# This happens for instance with `./config.status config.h'.
+if test -n "$CONFIG_FILES"; then
+
+if $AWK 'BEGIN { getline <"/dev/null" }' </dev/null 2>/dev/null; then
+ ac_cs_awk_getline=:
+ ac_cs_awk_pipe_init=
+ ac_cs_awk_read_file='
+ while ((getline aline < (F[key])) > 0)
+ print(aline)
+ close(F[key])'
+ ac_cs_awk_pipe_fini=
+else
+ ac_cs_awk_getline=false
+ ac_cs_awk_pipe_init="print \"cat <<'|#_!!_#|' &&\""
+ ac_cs_awk_read_file='
+ print "|#_!!_#|"
+ print "cat " F[key] " &&"
+ '$ac_cs_awk_pipe_init
+ # The final `:' finishes the AND list.
+ ac_cs_awk_pipe_fini='END { print "|#_!!_#|"; print ":" }'
+fi
+ac_cr=' '
+ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
+if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
+ ac_cs_awk_cr='\\r'
+else
+ ac_cs_awk_cr=$ac_cr
+fi
+
+echo 'BEGIN {' >"$tmp/subs1.awk" &&
+_ACEOF
+
+# Create commands to substitute file output variables.
+{
+ echo "cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1" &&
+ echo 'cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&' &&
+ echo "$ac_subst_files" | sed 's/.*/F["&"]="$&"/' &&
+ echo "_ACAWK" &&
+ echo "_ACEOF"
+} >conf$$files.sh &&
+. ./conf$$files.sh ||
+ { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
+$as_echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
+ { (exit 1); exit 1; }; }
+rm -f conf$$files.sh
+
+{
+ echo "cat >conf$$subs.awk <<_ACEOF" &&
+ echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
+ echo "_ACEOF"
+} >conf$$subs.sh ||
+ { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
+$as_echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
+ { (exit 1); exit 1; }; }
+ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'`
+ac_delim='%!_!# '
+for ac_last_try in false false false false false :; do
+ . ./conf$$subs.sh ||
+ { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
+$as_echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
+ { (exit 1); exit 1; }; }
+
+ ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
+ if test $ac_delim_n = $ac_delim_num; then
+ break
+ elif $ac_last_try; then
+ { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
+$as_echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
+ { (exit 1); exit 1; }; }
+ else
+ ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
+ fi
+done
+rm -f conf$$subs.sh
+
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&
+_ACEOF
+sed -n '
+h
+s/^/S["/; s/!.*/"]=/
+p
+g
+s/^[^!]*!//
+:repl
+t repl
+s/'"$ac_delim"'$//
+t delim
+:nl
+h
+s/\(.\{148\}\).*/\1/
+t more1
+s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
+p
+n
+b repl
+:more1
+s/["\\]/\\&/g; s/^/"/; s/$/"\\/
+p
+g
+s/.\{148\}//
+t nl
+:delim
+h
+s/\(.\{148\}\).*/\1/
+t more2
+s/["\\]/\\&/g; s/^/"/; s/$/"/
+p
+b
+:more2
+s/["\\]/\\&/g; s/^/"/; s/$/"\\/
+p
+g
+s/.\{148\}//
+t delim
+' <conf$$subs.awk | sed '
+/^[^""]/{
+ N
+ s/\n//
+}
+' >>$CONFIG_STATUS || ac_write_fail=1
+rm -f conf$$subs.awk
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+_ACAWK
+cat >>"\$tmp/subs1.awk" <<_ACAWK &&
+ for (key in S) S_is_set[key] = 1
+ FS = ""
+ \$ac_cs_awk_pipe_init
+}
+{
+ line = $ 0
+ nfields = split(line, field, "@")
+ substed = 0
+ len = length(field[1])
+ for (i = 2; i < nfields; i++) {
+ key = field[i]
+ keylen = length(key)
+ if (S_is_set[key]) {
+ value = S[key]
+ line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
+ len += length(value) + length(field[++i])
+ substed = 1
+ } else
+ len += 1 + keylen
+ }
+ if (nfields == 3 && !substed) {
+ key = field[2]
+ if (F[key] != "" && line ~ /^[ ]*@.*@[ ]*$/) {
+ \$ac_cs_awk_read_file
+ next
+ }
+ }
+ print line
+}
+\$ac_cs_awk_pipe_fini
+_ACAWK
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
+ sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
+else
+ cat
+fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \
+ || { { $as_echo "$as_me:$LINENO: error: could not setup config files machinery" >&5
+$as_echo "$as_me: error: could not setup config files machinery" >&2;}
+ { (exit 1); exit 1; }; }
+_ACEOF
+
+# VPATH may cause trouble with some makes, so we remove $(srcdir),
+# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
+# trailing colons and then remove the whole line if VPATH becomes empty
+# (actually we leave an empty line to preserve line numbers).
+if test "x$srcdir" = x.; then
+ ac_vpsub='/^[ ]*VPATH[ ]*=/{
+s/:*\$(srcdir):*/:/
+s/:*\${srcdir}:*/:/
+s/:*@srcdir@:*/:/
+s/^\([^=]*=[ ]*\):*/\1/
+s/:*$//
+s/^[^=]*=[ ]*$//
+}'
+fi
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+fi # test -n "$CONFIG_FILES"
+
+
+eval set X " :F $CONFIG_FILES :C $CONFIG_COMMANDS"
+shift
+for ac_tag
+do
+ case $ac_tag in
+ :[FHLC]) ac_mode=$ac_tag; continue;;
+ esac
+ case $ac_mode$ac_tag in
+ :[FHL]*:*);;
+ :L* | :C*:*) { { $as_echo "$as_me:$LINENO: error: invalid tag $ac_tag" >&5
+$as_echo "$as_me: error: invalid tag $ac_tag" >&2;}
+ { (exit 1); exit 1; }; };;
+ :[FH]-) ac_tag=-:-;;
+ :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
+ esac
+ ac_save_IFS=$IFS
+ IFS=:
+ set x $ac_tag
+ IFS=$ac_save_IFS
+ shift
+ ac_file=$1
+ shift
+
+ case $ac_mode in
+ :L) ac_source=$1;;
+ :[FH])
+ ac_file_inputs=
+ for ac_f
+ do
+ case $ac_f in
+ -) ac_f="$tmp/stdin";;
+ *) # Look for the file first in the build tree, then in the source tree
+ # (if the path is not absolute). The absolute path cannot be DOS-style,
+ # because $ac_f cannot contain `:'.
+ test -f "$ac_f" ||
+ case $ac_f in
+ [\\/$]*) false;;
+ *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
+ esac ||
+ { { $as_echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5
+$as_echo "$as_me: error: cannot find input file: $ac_f" >&2;}
+ { (exit 1); exit 1; }; };;
+ esac
+ case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
+ ac_file_inputs="$ac_file_inputs '$ac_f'"
+ done
+
+ # Let's still pretend it is `configure' which instantiates (i.e., don't
+ # use $as_me), people would be surprised to read:
+ # /* config.h. Generated by config.status. */
+ configure_input='Generated from '`
+ $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
+ `' by configure.'
+ if test x"$ac_file" != x-; then
+ configure_input="$ac_file. $configure_input"
+ { $as_echo "$as_me:$LINENO: creating $ac_file" >&5
+$as_echo "$as_me: creating $ac_file" >&6;}
+ fi
+ # Neutralize special characters interpreted by sed in replacement strings.
+ case $configure_input in #(
+ *\&* | *\|* | *\\* )
+ ac_sed_conf_input=`$as_echo "$configure_input" |
+ sed 's/[\\\\&|]/\\\\&/g'`;; #(
+ *) ac_sed_conf_input=$configure_input;;
+ esac
+
+ case $ac_tag in
+ *:-:* | *:-) cat >"$tmp/stdin" \
+ || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5
+$as_echo "$as_me: error: could not create $ac_file" >&2;}
+ { (exit 1); exit 1; }; } ;;
+ esac
+ ;;
+ esac
+
+ ac_dir=`$as_dirname -- "$ac_file" ||
+$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$ac_file" : 'X\(//\)[^/]' \| \
+ X"$ac_file" : 'X\(//\)$' \| \
+ X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$ac_file" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)[^/].*/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+ { as_dir="$ac_dir"
+ case $as_dir in #(
+ -*) as_dir=./$as_dir;;
+ esac
+ test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || {
+ as_dirs=
+ while :; do
+ case $as_dir in #(
+ *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
+ *) as_qdir=$as_dir;;
+ esac
+ as_dirs="'$as_qdir' $as_dirs"
+ as_dir=`$as_dirname -- "$as_dir" ||
+$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$as_dir" : 'X\(//\)[^/]' \| \
+ X"$as_dir" : 'X\(//\)$' \| \
+ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$as_dir" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)[^/].*/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+ test -d "$as_dir" && break
+ done
+ test -z "$as_dirs" || eval "mkdir $as_dirs"
+ } || test -d "$as_dir" || { { $as_echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5
+$as_echo "$as_me: error: cannot create directory $as_dir" >&2;}
+ { (exit 1); exit 1; }; }; }
+ ac_builddir=.
+
+case "$ac_dir" in
+.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
+*)
+ ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
+ # A ".." for each directory in $ac_dir_suffix.
+ ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
+ case $ac_top_builddir_sub in
+ "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
+ *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
+ esac ;;
+esac
+ac_abs_top_builddir=$ac_pwd
+ac_abs_builddir=$ac_pwd$ac_dir_suffix
+# for backward compatibility:
+ac_top_builddir=$ac_top_build_prefix
+
+case $srcdir in
+ .) # We are building in place.
+ ac_srcdir=.
+ ac_top_srcdir=$ac_top_builddir_sub
+ ac_abs_top_srcdir=$ac_pwd ;;
+ [\\/]* | ?:[\\/]* ) # Absolute name.
+ ac_srcdir=$srcdir$ac_dir_suffix;
+ ac_top_srcdir=$srcdir
+ ac_abs_top_srcdir=$srcdir ;;
+ *) # Relative name.
+ ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
+ ac_top_srcdir=$ac_top_build_prefix$srcdir
+ ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
+esac
+ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
+
+
+ case $ac_mode in
+ :F)
+ #
+ # CONFIG_FILE
+ #
+
+ case $INSTALL in
+ [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
+ *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
+ esac
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+# If the template does not know about datarootdir, expand it.
+# FIXME: This hack should be removed a few years after 2.60.
+ac_datarootdir_hack=; ac_datarootdir_seen=
+
+ac_sed_dataroot='
+/datarootdir/ {
+ p
+ q
+}
+/@datadir@/p
+/@docdir@/p
+/@infodir@/p
+/@localedir@/p
+/@mandir@/p
+'
+case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
+*datarootdir*) ac_datarootdir_seen=yes;;
+*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
+ { $as_echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
+$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+ ac_datarootdir_hack='
+ s&@datadir@&$datadir&g
+ s&@docdir@&$docdir&g
+ s&@infodir@&$infodir&g
+ s&@localedir@&$localedir&g
+ s&@mandir@&$mandir&g
+ s&\\\${datarootdir}&$datarootdir&g' ;;
+esac
+_ACEOF
+
+# Neutralize VPATH when `$srcdir' = `.'.
+# Shell code in configure.ac might set extrasub.
+# FIXME: do we really want to maintain this feature?
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+ac_sed_extra="$ac_vpsub
+$extrasub
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+:t
+/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
+s|@configure_input@|$ac_sed_conf_input|;t t
+s&@top_builddir@&$ac_top_builddir_sub&;t t
+s&@top_build_prefix@&$ac_top_build_prefix&;t t
+s&@srcdir@&$ac_srcdir&;t t
+s&@abs_srcdir@&$ac_abs_srcdir&;t t
+s&@top_srcdir@&$ac_top_srcdir&;t t
+s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
+s&@builddir@&$ac_builddir&;t t
+s&@abs_builddir@&$ac_abs_builddir&;t t
+s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
+s&@INSTALL@&$ac_INSTALL&;t t
+$ac_datarootdir_hack
+"
+eval sed \"\$ac_sed_extra\" "$ac_file_inputs" |
+if $ac_cs_awk_getline; then
+ $AWK -f "$tmp/subs.awk"
+else
+ $AWK -f "$tmp/subs.awk" | $SHELL
+fi >$tmp/out \
+ || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5
+$as_echo "$as_me: error: could not create $ac_file" >&2;}
+ { (exit 1); exit 1; }; }
+
+test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
+ { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
+ { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
+ { $as_echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir'
+which seems to be undefined. Please make sure it is defined." >&5
+$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
+which seems to be undefined. Please make sure it is defined." >&2;}
+
+ rm -f "$tmp/stdin"
+ case $ac_file in
+ -) cat "$tmp/out" && rm -f "$tmp/out";;
+ *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";;
+ esac \
+ || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5
+$as_echo "$as_me: error: could not create $ac_file" >&2;}
+ { (exit 1); exit 1; }; }
+ ;;
+
+
+ :C) { $as_echo "$as_me:$LINENO: executing $ac_file commands" >&5
+$as_echo "$as_me: executing $ac_file commands" >&6;}
+ ;;
+ esac
+
+
+ case $ac_file$ac_mode in
+ "depfiles":C) test x"$AMDEP_TRUE" != x"" || {
+ # Autoconf 2.62 quotes --file arguments for eval, but not when files
+ # are listed without --file. Let's play safe and only enable the eval
+ # if we detect the quoting.
+ case $CONFIG_FILES in
+ *\'*) eval set x "$CONFIG_FILES" ;;
+ *) set x $CONFIG_FILES ;;
+ esac
+ shift
+ for mf
+ do
+ # Strip MF so we end up with the name of the file.
+ mf=`echo "$mf" | sed -e 's/:.*$//'`
+ # Check whether this is an Automake generated Makefile or not.
+ # We used to match only the files named `Makefile.in', but
+ # some people rename them; so instead we look at the file content.
+ # Grep'ing the first line is not enough: some people post-process
+ # each Makefile.in and add a new line on top of each file to say so.
+ # Grep'ing the whole file is not good either: AIX grep has a line
+ # limit of 2048, but all sed's we know have understand at least 4000.
+ if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
+ dirpart=`$as_dirname -- "$mf" ||
+$as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$mf" : 'X\(//\)[^/]' \| \
+ X"$mf" : 'X\(//\)$' \| \
+ X"$mf" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$mf" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)[^/].*/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+ else
+ continue
+ fi
+ # Extract the definition of DEPDIR, am__include, and am__quote
+ # from the Makefile without running `make'.
+ DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
+ test -z "$DEPDIR" && continue
+ am__include=`sed -n 's/^am__include = //p' < "$mf"`
+ test -z "am__include" && continue
+ am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
+ # When using ansi2knr, U may be empty or an underscore; expand it
+ U=`sed -n 's/^U = //p' < "$mf"`
+ # Find all dependency output files, they are included files with
+ # $(DEPDIR) in their names. We invoke sed twice because it is the
+ # simplest approach to changing $(DEPDIR) to its actual value in the
+ # expansion.
+ for file in `sed -n "
+ s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
+ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
+ # Make sure the directory exists.
+ test -f "$dirpart/$file" && continue
+ fdir=`$as_dirname -- "$file" ||
+$as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$file" : 'X\(//\)[^/]' \| \
+ X"$file" : 'X\(//\)$' \| \
+ X"$file" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$file" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)[^/].*/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+ { as_dir=$dirpart/$fdir
+ case $as_dir in #(
+ -*) as_dir=./$as_dir;;
+ esac
+ test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || {
+ as_dirs=
+ while :; do
+ case $as_dir in #(
+ *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
+ *) as_qdir=$as_dir;;
+ esac
+ as_dirs="'$as_qdir' $as_dirs"
+ as_dir=`$as_dirname -- "$as_dir" ||
+$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$as_dir" : 'X\(//\)[^/]' \| \
+ X"$as_dir" : 'X\(//\)$' \| \
+ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$as_dir" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)[^/].*/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+ test -d "$as_dir" && break
+ done
+ test -z "$as_dirs" || eval "mkdir $as_dirs"
+ } || test -d "$as_dir" || { { $as_echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5
+$as_echo "$as_me: error: cannot create directory $as_dir" >&2;}
+ { (exit 1); exit 1; }; }; }
+ # echo "creating $dirpart/$file"
+ echo '# dummy' > "$dirpart/$file"
+ done
+ done
+}
+ ;;
+ "Makefile":F) . ${libgloss_topdir}/config-ml.in ;;
+
+ esac
+done # for ac_tag
+
+
+{ (exit 0); exit 0; }
+_ACEOF
+chmod +x $CONFIG_STATUS
+ac_clean_files=$ac_clean_files_save
+
+test $ac_write_fail = 0 ||
+ { { $as_echo "$as_me:$LINENO: error: write failure creating $CONFIG_STATUS" >&5
+$as_echo "$as_me: error: write failure creating $CONFIG_STATUS" >&2;}
+ { (exit 1); exit 1; }; }
+
+
+# configure is writing to config.log, and then calls config.status.
+# config.status does its own redirection, appending to config.log.
+# Unfortunately, on DOS this fails, as config.log is still kept open
+# by configure, so config.status won't be able to write to it; its
+# output is simply discarded. So we exec the FD to /dev/null,
+# effectively closing config.log, so it can be properly (re)opened and
+# appended to by config.status. When coming back to configure, we
+# need to make the FD available again.
+if test "$no_create" != yes; then
+ ac_cs_success=:
+ ac_config_status_args=
+ test "$silent" = yes &&
+ ac_config_status_args="$ac_config_status_args --quiet"
+ exec 5>/dev/null
+ $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
+ exec 5>>config.log
+ # Use ||, not &&, to avoid exiting from the if with $? = 1, which
+ # would make configure fail if this is the last instruction.
+ $ac_cs_success || { (exit 1); exit 1; }
+fi
+if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
+ { $as_echo "$as_me:$LINENO: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
+$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
+fi
+
diff --git a/libgloss/ft32/configure.in b/libgloss/ft32/configure.in
new file mode 100644
index 000000000..04169f1b5
--- /dev/null
+++ b/libgloss/ft32/configure.in
@@ -0,0 +1,55 @@
+dnl Process this file with autoconf to produce a configure script.
+AC_PREREQ(2.59)
+AC_INIT(crt0.S)
+
+if test "${enable_shared}" = "yes" ; then
+ echo "Shared libraries not supported for cross compiling, ignored"
+fi
+
+if test "$srcdir" = "." ; then
+ if test "${with_target_subdir}" != "." ; then
+ libgloss_topdir="${srcdir}/${with_multisrctop}../../.."
+ else
+ libgloss_topdir="${srcdir}/${with_multisrctop}../.."
+ fi
+else
+ libgloss_topdir="${srcdir}/../.."
+fi
+AC_CONFIG_AUX_DIR($libgloss_topdir)
+
+AC_CANONICAL_SYSTEM
+AC_ARG_PROGRAM
+
+AC_PROG_INSTALL
+
+LIB_AC_PROG_CC
+
+AS=${AS-as}
+AC_SUBST(AS)
+AR=${AR-ar}
+AC_SUBST(AR)
+LD=${LD-ld}
+AC_SUBST(LD)
+AC_PROG_RANLIB
+LIB_AM_PROG_AS
+
+host_makefile_frag=${srcdir}/../config/default.mh
+
+dnl We have to assign the same value to other variables because autoconf
+dnl doesn't provide a mechanism to substitute a replacement keyword with
+dnl arbitrary data or pathnames.
+dnl
+host_makefile_frag_path=$host_makefile_frag
+AC_SUBST(host_makefile_frag_path)
+AC_SUBST_FILE(host_makefile_frag)
+
+AC_CONFIG_FILES(Makefile,
+. ${libgloss_topdir}/config-ml.in,
+srcdir=${srcdir}
+target=${target}
+with_multisubdir=${with_multisubdir}
+ac_configure_args="${ac_configure_args} --enable-multilib"
+CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
+libgloss_topdir=${libgloss_topdir}
+)
+AC_OUTPUT
diff --git a/libgloss/ft32/crt0.S b/libgloss/ft32/crt0.S
new file mode 100644
index 000000000..eb6f6a3e9
--- /dev/null
+++ b/libgloss/ft32/crt0.S
@@ -0,0 +1,73 @@
+/* crt0.S -- startup file for FT32
+ *
+ * Copyright (c) 2015 FTDI
+ *
+ * The authors hereby grant permission to use, copy, modify, distribute,
+ * and license this software and its documentation for any purpose, provided
+ * that existing copyright notices are retained in all copies and that this
+ * notice is included verbatim in any distributions. No written agreement,
+ * license, or royalty fee is required for any of the authorized uses.
+ * Modifications to this software may be copyrighted by their authors
+ * and need not follow the licensing terms described here, provided that
+ * the new terms are clearly indicated on the first page of each file where
+ * they apply.
+ */
+
+ .globl __start
+ .weak _start
+ .text
+ .type __start,@function
+
+__start:
+_start:
+
+ jmp truestart
+ jmp truestart
+
+ reti
+ reti
+ reti
+ reti
+ reti
+ reti
+ reti
+ reti
+ reti
+ reti
+ reti
+ reti
+ reti
+ reti
+ reti
+ reti
+ reti
+ reti
+ reti
+ reti
+ reti
+ reti
+ reti
+ reti
+ reti
+ reti
+ reti
+ reti
+ reti
+ reti
+ reti
+ reti
+
+truestart:
+ ldk.l $sp, 0xfffc /* set the top of stack */
+ ldk.l $fp,0 /* zero fp to allow unwinders to stop */
+
+ /* Set argc and argv to zero */
+ ldk.l $r0, 0
+ ldk.l $r1, 0
+
+ sub.l $sp,$sp,24 # room for the args to main
+ call main
+ call exit
+
+.Lend:
+ .size __start,(.Lend-__start)
diff --git a/libgloss/ft32/fstat.c b/libgloss/ft32/fstat.c
new file mode 100644
index 000000000..77058b2d1
--- /dev/null
+++ b/libgloss/ft32/fstat.c
@@ -0,0 +1,30 @@
+/* fstat.c -- get status of a file.
+ *
+ * Copyright (C) 2015 FTDI (support@ftdichip.com)
+ *
+ * The authors hereby grant permission to use, copy, modify, distribute,
+ * and license this software and its documentation for any purpose, provided
+ * that existing copyright notices are retained in all copies and that this
+ * notice is included verbatim in any distributions. No written agreement,
+ * license, or royalty fee is required for any of the authorized uses.
+ * Modifications to this software may be copyrighted by their authors
+ * and need not follow the licensing terms described here, provided that
+ * the new terms are clearly indicated on the first page of each file where
+ * they apply.
+ */
+#include <sys/stat.h>
+#include "glue.h"
+
+/*
+ * fstat -- Since we have no file system, we just return an error.
+ */
+int
+_DEFUN (_fstat, (fd, buf),
+ int fd _AND
+ struct stat *buf)
+{
+ buf->st_mode = S_IFCHR; /* Always pretend to be a tty */
+ buf->st_blksize = 0;
+
+ return (0);
+}
diff --git a/libgloss/ft32/getpid.c b/libgloss/ft32/getpid.c
new file mode 100644
index 000000000..75bba424a
--- /dev/null
+++ b/libgloss/ft32/getpid.c
@@ -0,0 +1,25 @@
+/* getpid.c -- get the current process id.
+ *
+ * Copyright (C) 2015 FTDI (support@ftdichip.com)
+ *
+ * The authors hereby grant permission to use, copy, modify, distribute,
+ * and license this software and its documentation for any purpose, provided
+ * that existing copyright notices are retained in all copies and that this
+ * notice is included verbatim in any distributions. No written agreement,
+ * license, or royalty fee is required for any of the authorized uses.
+ * Modifications to this software may be copyrighted by their authors
+ * and need not follow the licensing terms described here, provided that
+ * the new terms are clearly indicated on the first page of each file where
+ * they apply.
+ */
+#include "glue.h"
+
+/*
+ * getpid -- only one process, so just return 1.
+ */
+int
+_DEFUN (_getpid, (),
+ )
+{
+ return __MYPID;
+}
diff --git a/libgloss/ft32/isatty.c b/libgloss/ft32/isatty.c
new file mode 100644
index 000000000..449410ebe
--- /dev/null
+++ b/libgloss/ft32/isatty.c
@@ -0,0 +1,27 @@
+/* isatty.c -- chek the terminal device.
+ *
+ * Copyright (C) 2015 FTDI (support@ftdichip.com)
+ *
+ * The authors hereby grant permission to use, copy, modify, distribute,
+ * and license this software and its documentation for any purpose, provided
+ * that existing copyright notices are retained in all copies and that this
+ * notice is included verbatim in any distributions. No written agreement,
+ * license, or royalty fee is required for any of the authorized uses.
+ * Modifications to this software may be copyrighted by their authors
+ * and need not follow the licensing terms described here, provided that
+ * the new terms are clearly indicated on the first page of each file where
+ * they apply.
+ */
+#include "glue.h"
+
+/*
+ * isatty -- returns 1 if connected to a terminal device,
+ * returns 0 if not. Since we're hooked up to a
+ * serial port, we'll say yes _AND return a 1.
+ */
+int
+_DEFUN (_isatty, (fd),
+ int fd)
+{
+ return (1);
+}
diff --git a/libgloss/ft32/kill.c b/libgloss/ft32/kill.c
new file mode 100644
index 000000000..765b03e78
--- /dev/null
+++ b/libgloss/ft32/kill.c
@@ -0,0 +1,30 @@
+/* kill.c -- remove a process.
+ *
+ * Copyright (C) 2015 FTDI (support@ftdichip.com)
+ *
+ * The authors hereby grant permission to use, copy, modify, distribute,
+ * and license this software and its documentation for any purpose, provided
+ * that existing copyright notices are retained in all copies and that this
+ * notice is included verbatim in any distributions. No written agreement,
+ * license, or royalty fee is required for any of the authorized uses.
+ * Modifications to this software may be copyrighted by their authors
+ * and need not follow the licensing terms described here, provided that
+ * the new terms are clearly indicated on the first page of each file where
+ * they apply.
+ */
+#include "glue.h"
+
+extern void _exit (int) __attribute__((__noreturn__));
+
+/*
+ * kill -- go out via exit...
+ */
+int
+_DEFUN (_kill, (pid, sig),
+ int pid _AND
+ int sig)
+{
+ if(pid == __MYPID)
+ _exit(sig);
+ return 0;
+}
diff --git a/libgloss/ft32/sbrk.c b/libgloss/ft32/sbrk.c
new file mode 100644
index 000000000..8e6743e4b
--- /dev/null
+++ b/libgloss/ft32/sbrk.c
@@ -0,0 +1,45 @@
+/* sbrk.c -- allocate memory dynamically.
+ *
+ *
+ * Copyright (C) 2015 FTDI (support@ftdichip.com)
+ *
+ * The authors hereby grant permission to use, copy, modify, distribute,
+ * and license this software and its documentation for any purpose, provided
+ * that existing copyright notices are retained in all copies and that this
+ * notice is included verbatim in any distributions. No written agreement,
+ * license, or royalty fee is required for any of the authorized uses.
+ * Modifications to this software may be copyrighted by their authors
+ * and need not follow the licensing terms described here, provided that
+ * the new terms are clearly indicated on the first page of each file where
+ * they apply.
+ */
+#include <errno.h>
+#include "glue.h"
+
+char *__heap_ptr = (char *)&_end;
+
+/*
+ * sbrk -- changes heap size size. Get nbytes more
+ * RAM. We just increment a pointer in what's
+ * left of memory on the board.
+ */
+char *
+_sbrk (nbytes)
+ int nbytes;
+{
+ char *base;
+ char *sp;
+ char canary;
+
+ if ((__heap_ptr + nbytes) < (&canary - 2000))
+ {
+ base = __heap_ptr;
+ __heap_ptr += nbytes;
+ return base;
+ }
+ else
+ {
+ errno = ENOMEM;
+ return ((char *)-1);
+ }
+}
diff --git a/libgloss/ft32/sim-close.S b/libgloss/ft32/sim-close.S
new file mode 100644
index 000000000..e79aa478c
--- /dev/null
+++ b/libgloss/ft32/sim-close.S
@@ -0,0 +1,37 @@
+/*
+ * sim-close.S -- close interface for FT32 simulator
+ *
+ * Copyright (C) 2015 FTDI (support@ftdichip.com)
+ *
+ * The authors hereby grant permission to use, copy, modify, distribute,
+ * and license this software and its documentation for any purpose, provided
+ * that existing copyright notices are retained in all copies and that this
+ * notice is included verbatim in any distributions. No written agreement,
+ * license, or royalty fee is required for any of the authorized uses.
+ * Modifications to this software may be copyrighted by their authors
+ * and need not follow the licensing terms described here, provided that
+ * the new terms are clearly indicated on the first page of each file where
+ * they apply.
+ */
+
+#include "syscall.h"
+
+/*
+ * Input:
+ * $r0 -- File descriptor to close.
+ *
+ * Output:
+ * $r0 -- 0 or -1.
+ * errno -- Set if an error
+ */
+
+ .globl _close
+ .type _close,@function
+ .weak close
+ .text
+_close:
+close:
+# swi SYS_close
+ return
+.Lend:
+ .size _close,.Lend-_close
diff --git a/libgloss/ft32/sim-exit.S b/libgloss/ft32/sim-exit.S
new file mode 100644
index 000000000..425742230
--- /dev/null
+++ b/libgloss/ft32/sim-exit.S
@@ -0,0 +1,34 @@
+/*
+ * sim-exit.S -- _exit interface for FT32 simulator
+ *
+ * Copyright (C) 2015 FTDI (support@ftdichip.com)
+ *
+ * The authors hereby grant permission to use, copy, modify, distribute,
+ * and license this software and its documentation for any purpose, provided
+ * that existing copyright notices are retained in all copies and that this
+ * notice is included verbatim in any distributions. No written agreement,
+ * license, or royalty fee is required for any of the authorized uses.
+ * Modifications to this software may be copyrighted by their authors
+ * and need not follow the licensing terms described here, provided that
+ * the new terms are clearly indicated on the first page of each file where
+ * they apply.
+ */
+
+#include "syscall.h"
+
+/*
+ * Input:
+ * $r0 -- exit value
+ *
+ * Output:
+ * none
+ */
+
+ .globl _exit
+ .type _exit,@function
+ .text
+_exit:
+ # swi SYS_exit
+ sta.l 0x1fffc,$r0
+.Lend:
+ .size _exit,.Lend-_exit
diff --git a/libgloss/ft32/sim-inbyte.c b/libgloss/ft32/sim-inbyte.c
new file mode 100644
index 000000000..9df0e1fe4
--- /dev/null
+++ b/libgloss/ft32/sim-inbyte.c
@@ -0,0 +1,26 @@
+/*
+ * sim-inbyte.c -- read a character from standard input.
+ *
+ * Copyright (C) 2015 FTDI (support@ftdichip.com)
+ *
+ * The authors hereby grant permission to use, copy, modify, distribute,
+ * and license this software and its documentation for any purpose, provided
+ * that existing copyright notices are retained in all copies and that this
+ * notice is included verbatim in any distributions. No written agreement,
+ * license, or royalty fee is required for any of the authorized uses.
+ * Modifications to this software may be copyrighted by their authors
+ * and need not follow the licensing terms described here, provided that
+ * the new terms are clearly indicated on the first page of each file where
+ * they apply.
+ */
+
+int
+inbyte ()
+{
+ char c;
+
+ if (read (0, &c, 1) <= 0)
+ return -1;
+
+ return c;
+}
diff --git a/libgloss/ft32/sim-lseek.S b/libgloss/ft32/sim-lseek.S
new file mode 100644
index 000000000..2dfde1625
--- /dev/null
+++ b/libgloss/ft32/sim-lseek.S
@@ -0,0 +1,32 @@
+/*
+ * sim-lseek.S -- write interface for FT32 simulator
+ *
+ * Copyright (C) 2015 FTDI (support@ftdichip.com)
+ *
+ * The authors hereby grant permission to use, copy, modify, distribute,
+ * and license this software and its documentation for any purpose, provided
+ * that existing copyright notices are retained in all copies and that this
+ * notice is included verbatim in any distributions. No written agreement,
+ * license, or royalty fee is required for any of the authorized uses.
+ * Modifications to this software may be copyrighted by their authors
+ * and need not follow the licensing terms described here, provided that
+ * the new terms are clearly indicated on the first page of each file where
+ * they apply.
+ */
+
+#include <sys/types.h>
+#include <errno.h>
+
+/*
+ * lseek -- Since a simulated serial port is non-seekable, we return
+ * an error.
+ */
+off_t
+_DEFUN (_lseek, (fd, offset, whence),
+ int fd _AND
+ off_t offset _AND
+ int whence)
+{
+ errno = ESPIPE;
+ return ((off_t)-1);
+}
diff --git a/libgloss/ft32/sim-lseek.c b/libgloss/ft32/sim-lseek.c
new file mode 100644
index 000000000..297de2b8a
--- /dev/null
+++ b/libgloss/ft32/sim-lseek.c
@@ -0,0 +1,32 @@
+/*
+ * sim-lseek.S -- write interface for FT32 simulator
+ *
+ * Copyright (C) 2015 FTDI (support@ftdichip.com)
+ *
+ * The authors hereby grant permission to use, copy, modify, distribute,
+ * and license this software and its documentation for any purpose, provided
+ * that existing copyright notices are retained in all copies and that this
+ * notice is included verbatim in any distributions. No written agreement,
+ * license, or royalty fee is required for any of the authorized uses.
+ * Modifications to this software may be copyrighted by their authors
+ * and need not follow the licensing terms described here, provided that
+ * the new terms are clearly indicated on the first page of each file where
+ * they apply.
+ */
+
+#include <sys/types.h>
+#include <errno.h>
+
+/*
+ * lseek -- Since a simulated serial port is non-seekable, we return
+ * an error.
+ */
+off_t
+_DEFUN (_lseek, (fd, offset, whence),
+ int fd _AND
+ off_t offset _AND
+ int whence)
+{
+ /* errno = ESPIPE; */
+ return ((off_t)-1);
+}
diff --git a/libgloss/ft32/sim-open.S b/libgloss/ft32/sim-open.S
new file mode 100644
index 000000000..71a7178c0
--- /dev/null
+++ b/libgloss/ft32/sim-open.S
@@ -0,0 +1,39 @@
+/*
+ * sim-open.S -- open interface for FT32 simulator
+ *
+ * Copyright (C) 2015 FTDI (support@ftdichip.com)
+ *
+ * The authors hereby grant permission to use, copy, modify, distribute,
+ * and license this software and its documentation for any purpose, provided
+ * that existing copyright notices are retained in all copies and that this
+ * notice is included verbatim in any distributions. No written agreement,
+ * license, or royalty fee is required for any of the authorized uses.
+ * Modifications to this software may be copyrighted by their authors
+ * and need not follow the licensing terms described here, provided that
+ * the new terms are clearly indicated on the first page of each file where
+ * they apply.
+ */
+
+#include "syscall.h"
+
+/*
+ * Input:
+ * $r0 -- File name to open.
+ * $r1 -- open mode.
+ * -0x12($fp) -- optionally, the permission bits to set the file to.
+ *
+ * Output:
+ * $r0 -- file descriptor or -1.
+ * errno -- Set if an error
+ */
+
+ .globl _open
+ .type _open,@function
+ .weak open
+ .text
+_open:
+open:
+ # swi SYS_open
+ return
+.Lend:
+ .size _open,.Lend-_open
diff --git a/libgloss/ft32/sim-read.S b/libgloss/ft32/sim-read.S
new file mode 100644
index 000000000..cab687a5c
--- /dev/null
+++ b/libgloss/ft32/sim-read.S
@@ -0,0 +1,39 @@
+/*
+ * sim-read.S -- read interface for FT32 simulator
+ *
+ * Copyright (C) 2015 FTDI (support@ftdichip.com)
+ *
+ * The authors hereby grant permission to use, copy, modify, distribute,
+ * and license this software and its documentation for any purpose, provided
+ * that existing copyright notices are retained in all copies and that this
+ * notice is included verbatim in any distributions. No written agreement,
+ * license, or royalty fee is required for any of the authorized uses.
+ * Modifications to this software may be copyrighted by their authors
+ * and need not follow the licensing terms described here, provided that
+ * the new terms are clearly indicated on the first page of each file where
+ * they apply.
+ */
+
+#include "syscall.h"
+
+/*
+ * Input:
+ * $r0 -- File descriptor.
+ * $r1 -- Buffer to be read into.
+ * -0x12($fp) -- Length of the buffer.
+ *
+ * Output:
+ * $r0 -- Length read or -1.
+ * errno -- Set if an error
+ */
+
+ .globl _read
+ .type _read,@function
+ .weak read
+ .text
+_read:
+read:
+ # swi SYS_read
+ return
+.Lend:
+ .size _read,.Lend-_read
diff --git a/libgloss/ft32/sim-time.c b/libgloss/ft32/sim-time.c
new file mode 100644
index 000000000..25e72a1f4
--- /dev/null
+++ b/libgloss/ft32/sim-time.c
@@ -0,0 +1,47 @@
+/* sim-time.c -- stubs so clock can be linked in.
+ *
+ * Copyright (C) 2015 FTDI (support@ftdichip.com)
+ *
+ * The authors hereby grant permission to use, copy, modify, distribute,
+ * and license this software and its documentation for any purpose, provided
+ * that existing copyright notices are retained in all copies and that this
+ * notice is included verbatim in any distributions. No written agreement,
+ * license, or royalty fee is required for any of the authorized uses.
+ * Modifications to this software may be copyrighted by their authors
+ * and need not follow the licensing terms described here, provided that
+ * the new terms are clearly indicated on the first page of each file where
+ * they apply.
+ */
+#include <errno.h>
+#include <sys/time.h>
+#include <sys/times.h>
+#include "glue.h"
+
+/*
+ * _times -- no clock, so return an error.
+ */
+int
+_DEFUN (_times, _times (buf),
+ struct tms *buf)
+{
+ errno = EINVAL;
+ return (-1);
+}
+
+/*
+ * _gettimeofday -- implement in terms of time, which means we can't return the
+ * microseconds.
+ */
+int
+_DEFUN (_gettimeofday, _gettimeofday (tv, tz),
+ struct timeval *tv _AND
+ void *tzvp)
+{
+ struct timezone *tz = tzvp;
+ if (tz)
+ tz->tz_minuteswest = tz->tz_dsttime = 0;
+
+ tv->tv_usec = 0;
+ tv->tv_sec = 0;
+ return 0;
+}
diff --git a/libgloss/ft32/sim-unlink.S b/libgloss/ft32/sim-unlink.S
new file mode 100644
index 000000000..182ef0e3b
--- /dev/null
+++ b/libgloss/ft32/sim-unlink.S
@@ -0,0 +1,37 @@
+/*
+ * sim-unlink.S -- write interface for FT32 simulator
+ *
+ * Copyright (C) 2015 FTDI (support@ftdichip.com)
+ *
+ * The authors hereby grant permission to use, copy, modify, distribute,
+ * and license this software and its documentation for any purpose, provided
+ * that existing copyright notices are retained in all copies and that this
+ * notice is included verbatim in any distributions. No written agreement,
+ * license, or royalty fee is required for any of the authorized uses.
+ * Modifications to this software may be copyrighted by their authors
+ * and need not follow the licensing terms described here, provided that
+ * the new terms are clearly indicated on the first page of each file where
+ * they apply.
+ */
+
+#include "syscall.h"
+
+ .globl _unlink
+ .type _unlink,@function
+ .weak unlink
+ .text
+_unlink:
+unlink:
+ return
+.Lend:
+ .size _unlink,.Lend-_unlink
+
+ .globl _link
+ .type _link,@function
+ .weak link
+ .text
+_link:
+link:
+ return
+.Lend1:
+ .size _link,.Lend1-_link
diff --git a/libgloss/ft32/sim-write.S b/libgloss/ft32/sim-write.S
new file mode 100644
index 000000000..90fef8d69
--- /dev/null
+++ b/libgloss/ft32/sim-write.S
@@ -0,0 +1,56 @@
+/*
+ * sim-write.S -- write interface for FT32 simulator
+ *
+ * Copyright (C) 2015 FTDI (support@ftdichip.com)
+ *
+ * The authors hereby grant permission to use, copy, modify, distribute,
+ * and license this software and its documentation for any purpose, provided
+ * that existing copyright notices are retained in all copies and that this
+ * notice is included verbatim in any distributions. No written agreement,
+ * license, or royalty fee is required for any of the authorized uses.
+ * Modifications to this software may be copyrighted by their authors
+ * and need not follow the licensing terms described here, provided that
+ * the new terms are clearly indicated on the first page of each file where
+ * they apply.
+ */
+
+#include "syscall.h"
+
+/*
+ * Input:
+ * $r0 -- File descriptor.
+ * $r1 -- String to be printed.
+ * $r2 -- Length of the string.
+ *
+ * Output:
+ * $r0 -- Length written or -1.
+ * errno -- Set if an error
+ */
+
+ .globl _write
+ .type _write,@function
+ .weak write
+ .text
+_write:
+write:
+
+# LDI.l $r1,$r0,0
+# STA.l MAGIC,$r1
+# jmp .f
+#
+# .loop:
+# sta.l 0x10000,$r2
+# add.l $r0,$r0,1
+# .f:
+# ldi.b $r2,$r0,0
+# cmp.b $r2,0
+# jmpc nz,.loop
+
+ ldk.l $r3,0x10000
+ streamout.b $r3,$r1,$r2
+ move.l $r0,$r2
+
+ return
+
+.Lend:
+ .size _write,.Lend-_write
diff --git a/libgloss/ft32/sim.ld b/libgloss/ft32/sim.ld
new file mode 100644
index 000000000..c61c1a6e7
--- /dev/null
+++ b/libgloss/ft32/sim.ld
@@ -0,0 +1,56 @@
+OUTPUT_FORMAT("elf32-ft32")
+OUTPUT_ARCH(ft32)
+
+SEARCH_DIR(.)
+GROUP(-lsim -lc -lgcc -lsim)
+
+MEMORY
+{
+ flash (rx) : ORIGIN = 0, LENGTH = 256K
+ ram (rw!x) : ORIGIN = 0x800000, LENGTH = 64K
+}
+SECTIONS
+{
+ .text :
+ {
+ *(.text*)
+ *(.strings)
+ *(._pm*)
+ *(.init)
+ *(.fini)
+ _etext = . ;
+ } > flash
+ .tors :
+ {
+ ___ctors = . ;
+ *(.ctors)
+ ___ctors_end = . ;
+ ___dtors = . ;
+ *(.dtors)
+ ___dtors_end = . ;
+ } > ram
+ .data : AT (ADDR (.text) + SIZEOF (.text))
+ {
+ *(.data)
+ *(.rodata)
+ *(.rodata*)
+ _edata = . ;
+ } > ram
+ .bss SIZEOF(.data) + ADDR(.data) :
+ {
+ _bss_start = . ;
+ *(.bss)
+ *(COMMON)
+ _end = . ;
+ } > ram
+ __data_load_start = LOADADDR(.data);
+ __data_load_end = __data_load_start + SIZEOF(.data);
+ .stab 0 (NOLOAD) :
+ {
+ *(.stab)
+ }
+ .stabstr 0 (NOLOAD) :
+ {
+ *(.stabstr)
+ }
+}
diff --git a/libgloss/ft32/stat.c b/libgloss/ft32/stat.c
new file mode 100644
index 000000000..580e2ca6e
--- /dev/null
+++ b/libgloss/ft32/stat.c
@@ -0,0 +1,30 @@
+/* stat.c -- Get the status of a file.
+ *
+ * Copyright (C) 2015 FTDI (support@ftdichip.com)
+ *
+ * The authors hereby grant permission to use, copy, modify, distribute,
+ * and license this software and its documentation for any purpose, provided
+ * that existing copyright notices are retained in all copies and that this
+ * notice is included verbatim in any distributions. No written agreement,
+ * license, or royalty fee is required for any of the authorized uses.
+ * Modifications to this software may be copyrighted by their authors
+ * and need not follow the licensing terms described here, provided that
+ * the new terms are clearly indicated on the first page of each file where
+ * they apply.
+ */
+#include <sys/stat.h>
+#include <errno.h>
+#include "glue.h"
+
+/*
+ * stat -- Since we have no file system, we just return an error.
+ */
+int
+_DEFUN (_stat, (path, buf),
+ const char *path _AND
+ struct stat *buf)
+{
+ errno = EIO;
+ return (-1);
+}
+
diff --git a/libgloss/i960/mon960.c b/libgloss/i960/mon960.c
index f81b6ac29..7b1e07e66 100644
--- a/libgloss/i960/mon960.c
+++ b/libgloss/i960/mon960.c
@@ -37,7 +37,7 @@ fstat (int file, struct stat *st)
}
int
-stat (const char *filename, struct stat *st)
+stat (const char *__restrict filename, struct stat *__restrict st)
{
st->st_mode = S_IFCHR;
return 0;
diff --git a/libgloss/libnosys/Makefile.in b/libgloss/libnosys/Makefile.in
index ff4c41647..22828a47f 100644
--- a/libgloss/libnosys/Makefile.in
+++ b/libgloss/libnosys/Makefile.in
@@ -77,6 +77,7 @@ GCC_LDFLAGS = `if [ -d ${objroot}/../gcc ] ; \
then echo -L${objroot}/../gcc ; fi`
OUTPUTS = libnosys.a
+SPECS = ${srcdir}/nosys.specs
# Host specific makefile fragment comes in here.
@host_makefile_frag@
@@ -101,7 +102,7 @@ distclean maintainer-clean realclean: clean
.PHONY: install info install-info clean-info
install:
- @for outputs in ${OUTPUTS}; do\
+ @for outputs in ${OUTPUTS} ${SPECS}; do\
mkdir -p $(DESTDIR)$(tooldir)/lib${MULTISUBDIR}; \
$(INSTALL_DATA) $${outputs} $(DESTDIR)$(tooldir)/lib${MULTISUBDIR}; \
done
diff --git a/libgloss/libnosys/nosys.specs b/libgloss/libnosys/nosys.specs
new file mode 100644
index 000000000..3a84db3b5
--- /dev/null
+++ b/libgloss/libnosys/nosys.specs
@@ -0,0 +1,11 @@
+%rename link_gcc_c_sequence nosys_link_gcc_c_sequence
+
+*nosys_libgloss:
+-lnosys
+
+*nosys_libc:
+%{!specs=nano.specs:-lc} %{specs=nano.specs:-lc_nano}
+
+*link_gcc_c_sequence:
+%(nosys_link_gcc_c_sequence) --start-group %G %(nosys_libc) %(nosys_libgloss) --end-group
+
diff --git a/libgloss/libnosys/sbrk.c b/libgloss/libnosys/sbrk.c
index 39f411cdd..86c130ab6 100644
--- a/libgloss/libnosys/sbrk.c
+++ b/libgloss/libnosys/sbrk.c
@@ -6,16 +6,16 @@
void *
_sbrk (incr)
int incr;
-{
+{
extern char end; /* Set by linker. */
- static char * heap_end;
- char * prev_heap_end;
+ static char * heap_end;
+ char * prev_heap_end;
if (heap_end == 0)
- heap_end = & end;
+ heap_end = & end;
- prev_heap_end = heap_end;
- heap_end += incr;
+ prev_heap_end = heap_end;
+ heap_end += incr;
- return (void *) prev_heap_end;
-}
+ return (void *) prev_heap_end;
+}
diff --git a/libgloss/lm32/Makefile.in b/libgloss/lm32/Makefile.in
index d4901f8e6..a871807d0 100644
--- a/libgloss/lm32/Makefile.in
+++ b/libgloss/lm32/Makefile.in
@@ -72,10 +72,10 @@ distclean maintainer-clean realclean: clean
.PHONY: install info install-info clean-info
install: install-scripts # install-includes
@for crt0 in ${CRT0S}; do\
- $(INSTALL_PROGRAM) $${crt0} $(tooldir)/lib${MULTISUBDIR}; \
+ $(INSTALL_PROGRAM) $${crt0} $(DESTDIR)$(tooldir)/lib${MULTISUBDIR}; \
done
@for bsp in ${BSPS}; do\
- $(INSTALL_PROGRAM) $${bsp} $(tooldir)/lib${MULTISUBDIR}; \
+ $(INSTALL_PROGRAM) $${bsp} $(DESTDIR)$(tooldir)/lib${MULTISUBDIR}; \
done
install-includes:
@@ -86,7 +86,7 @@ install-includes:
install-scripts:
@for script in ${SCRIPTS}; do\
- $(INSTALL_DATA) ${srcdir}/$${script} $(tooldir)/lib${MULTISUBDIR}; \
+ $(INSTALL_DATA) ${srcdir}/$${script} $(DESTDIR)$(tooldir)/lib${MULTISUBDIR}; \
done
doc:
diff --git a/libgloss/m68k/io-stat.c b/libgloss/m68k/io-stat.c
index a707b0d64..af36b3dd6 100644
--- a/libgloss/m68k/io-stat.c
+++ b/libgloss/m68k/io-stat.c
@@ -34,7 +34,7 @@
*/
-int stat (const char *filename, struct stat *buf)
+int stat (const char *__restrict filename, struct stat *__restrict buf)
{
#if HOSTED
gdb_parambuf_t parameters;
diff --git a/libgloss/mcore/syscall.h b/libgloss/mcore/syscall.h
new file mode 100644
index 000000000..e204f0c5e
--- /dev/null
+++ b/libgloss/mcore/syscall.h
@@ -0,0 +1,43 @@
+/* syscall.h for the mcore processor. It matches the syscalls.S file which
+ matches the GNU simulator.
+
+ 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 Rolls-Royce Controls and Data Services Limited 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. */
+
+#ifndef LIBGLOSS_SYSCALL_H
+#define LIBGLOSS_SYSCALL_H
+
+#define SYS_read 3
+#define SYS_write 4
+#define SYS_open 5
+#define SYS_close 6
+#define SYS_creat 8
+#define SYS_link 9
+#define SYS_unlink 10
+#define SYS_time 13
+#define SYS_lseek 19
+#define SYS_access 33
+#define SYS_times 43
+
+#endif
diff --git a/libgloss/mep/Makefile.in b/libgloss/mep/Makefile.in
index b42347d10..89dff42c3 100644
--- a/libgloss/mep/Makefile.in
+++ b/libgloss/mep/Makefile.in
@@ -99,13 +99,13 @@ crtn.o: $(srcdir)/crtn.S $(srcdir)/sim-crtn.S
install: $(CRT) $(SIM_BSP)
for c in $(CRT) $(SIM_BSP); do \
- $(INSTALL_DATA) $$c $(tooldir)/lib${MULTISUBDIR}/$$c ;\
+ $(INSTALL_DATA) $$c $(DESTDIR)$(tooldir)/lib${MULTISUBDIR}/$$c ;\
done
if test -z "$(MULTISUBDIR)"; then \
for c in $(SCRIPTS); do \
- $(INSTALL_DATA) $(srcdir)/$$c $(tooldir)/lib${MULTISUBDIR}/$$c ;\
+ $(INSTALL_DATA) $(srcdir)/$$c $(DESTDIR)$(tooldir)/lib${MULTISUBDIR}/$$c ;\
done; \
- $(INSTALL_DATA) $(srcdir)/gmap_default.ld $(tooldir)/lib/gmap_default.tmpl; \
+ $(INSTALL_DATA) $(srcdir)/gmap_default.ld $(DESTDIR)$(tooldir)/lib/gmap_default.tmpl; \
else true; fi
clean mostlyclean:
diff --git a/libgloss/mips/Makefile.in b/libgloss/mips/Makefile.in
index 2042e48ec..d96478d93 100644
--- a/libgloss/mips/Makefile.in
+++ b/libgloss/mips/Makefile.in
@@ -201,8 +201,9 @@ distclean maintainer-clean realclean: clean
.PHONY: install info install-info clean-info
install:
+ mkdir -p $(DESTDIR)$(tooldir)/lib${MULTISUBDIR}
@for file in $(CRT0) $(PCRT0) $(BSP); do \
- $(INSTALL_DATA) $${file} $(DESTDIR)$(tooldir)/lib${MULTISUBDIR}; \
+ $(INSTALL_DATA) $${file} $(DESTDIR)$(tooldir)/lib${MULTISUBDIR}/$${file}; \
done
@for script in ${SCRIPTS}; do\
$(INSTALL_DATA) ${srcdir}/$${script}.ld $(DESTDIR)$(tooldir)/lib${MULTISUBDIR}/$${script}.ld; \
diff --git a/libgloss/mips/abiflags.S b/libgloss/mips/abiflags.S
new file mode 100644
index 000000000..953caafb4
--- /dev/null
+++ b/libgloss/mips/abiflags.S
@@ -0,0 +1,82 @@
+/*
+ * abiflags.S - MIPS ABI flags.
+ */
+
+/* Values for the xxx_size bytes of an ABI flags structure. */
+#define AFL_REG_NONE 0x00 /* No registers. */
+#define AFL_REG_32 0x01 /* 32-bit registers. */
+#define AFL_REG_64 0x02 /* 64-bit registers. */
+#define AFL_REG_128 0x03 /* 128-bit registers. */
+
+/* Masks for the ases word of an ABI flags structure. */
+#define AFL_ASE_DSP 0x00000001 /* DSP ASE. */
+#define AFL_ASE_DSPR2 0x00000002 /* DSP R2 ASE. */
+#define AFL_ASE_EVA 0x00000004 /* Enhanced VA Scheme. */
+#define AFL_ASE_MCU 0x00000008 /* MCU (MicroController) ASE. */
+#define AFL_ASE_MDMX 0x00000010 /* MDMX ASE. */
+#define AFL_ASE_MIPS3D 0x00000020 /* MIPS-3D ASE. */
+#define AFL_ASE_MT 0x00000040 /* MT ASE. */
+#define AFL_ASE_SMARTMIPS 0x00000080 /* SmartMIPS ASE. */
+#define AFL_ASE_VIRT 0x00000100 /* VZ ASE. */
+#define AFL_ASE_MSA 0x00000200 /* MSA ASE. */
+#define AFL_ASE_MIPS16 0x00000400 /* MIPS16 ASE. */
+#define AFL_ASE_MICROMIPS 0x00000800 /* MICROMIPS ASE. */
+#define AFL_ASE_XPA 0x00001000 /* XPA ASE. */
+
+/* Values for the isa_ext word of an ABI flags structure. */
+#define AFL_EXT_XLR 1 /* RMI Xlr instruction. */
+#define AFL_EXT_OCTEON2 2 /* Cavium Networks Octeon2. */
+#define AFL_EXT_OCTEONP 3 /* Cavium Networks OcteonP. */
+#define AFL_EXT_LOONGSON_3A 4 /* Loongson 3A. */
+#define AFL_EXT_OCTEON 5 /* Cavium Networks Octeon. */
+#define AFL_EXT_5900 6 /* MIPS R5900 instruction. */
+#define AFL_EXT_4650 7 /* MIPS R4650 instruction. */
+#define AFL_EXT_4010 8 /* LSI R4010 instruction. */
+#define AFL_EXT_4100 9 /* NEC VR4100 instruction. */
+#define AFL_EXT_3900 10 /* Toshiba R3900 instruction. */
+#define AFL_EXT_10000 11 /* MIPS R10000 instruction. */
+#define AFL_EXT_SB1 12 /* Broadcom SB-1 instruction. */
+#define AFL_EXT_4111 13 /* NEC VR4111/VR4181 instruction. */
+#define AFL_EXT_4120 14 /* NEC VR4120 instruction. */
+#define AFL_EXT_5400 15 /* NEC VR5400 instruction. */
+#define AFL_EXT_5500 16 /* NEC VR5500 instruction. */
+#define AFL_EXT_LOONGSON_2E 17 /* ST Microelectronics Loongson 2E. */
+#define AFL_EXT_LOONGSON_2F 18 /* ST Microelectronics Loongson 2F. */
+
+/* Values defined for Tag_GNU_MIPS_ABI_FP. */
+#define Val_GNU_MIPS_ABI_FP_ANY 0 /* Not tagged or not using any ABIs affected by the differences. */
+#define Val_GNU_MIPS_ABI_FP_DOUBLE 1 /* Using hard-float -mdouble-float. */
+#define Val_GNU_MIPS_ABI_FP_SINGLE 2 /* Using hard-float -msingle-float. */
+#define Val_GNU_MIPS_ABI_FP_SOFT 3 /* Using soft-float. */
+#define Val_GNU_MIPS_ABI_FP_OLD_64 4 /* Using -mips32r2 -mfp64. */
+#define Val_GNU_MIPS_ABI_FP_XX 5 /* Using -mfpxx */
+#define Val_GNU_MIPS_ABI_FP_64 6 /* Using -mips32r2 -mfp64. */
+#define Val_GNU_MIPS_ABI_MSA_ANY 0 /* Not tagged or not using any ABIs affected by the differences. */
+#define Val_GNU_MIPS_ABI_MSA_128 1 /* Using 128-bit MSA. */
+
+/* MIPS ABI flags structure */
+ .struct 0
+ABIFlags_version:
+ .struct ABIFlags_version + 2
+ABIFlags_isa_level:
+ .struct ABIFlags_isa_level + 1
+ABIFlags_isa_rev:
+ .struct ABIFlags_isa_rev + 1
+ABIFlags_gpr_size:
+ .struct ABIFlags_gpr_size + 1
+ABIFlags_cpr1_size:
+ .struct ABIFlags_cpr1_size + 1
+ABIFlags_cpr2_size:
+ .struct ABIFlags_cpr2_size + 1
+ABIFlags_fp_abi:
+ .struct ABIFlags_fp_abi + 1
+ABIFlags_isa_ext:
+ .struct ABIFlags_isa_ext + 4
+ABIFlags_ases:
+ .struct ABIFlags_ases + 4
+ABIFlags_flags1:
+ .struct ABIFlags_flags1 + 4
+ABIFlags_flags2:
+ .struct ABIFlags_flags2 + 4
+
+/*> EOF abiflags.S <*/
diff --git a/libgloss/mips/cfe_api.h b/libgloss/mips/cfe_api.h
index b17f929c4..b79b0a08f 100644
--- a/libgloss/mips/cfe_api.h
+++ b/libgloss/mips/cfe_api.h
@@ -59,6 +59,7 @@
* CFE_API_* can be defined here as desired.
*/
/* Begin customization. */
+#include <stdint.h>
#include <string.h>
#define cfe_strlen(s) strlen(s)
diff --git a/libgloss/mips/crt0.S b/libgloss/mips/crt0.S
index 599e79c60..254998242 100644
--- a/libgloss/mips/crt0.S
+++ b/libgloss/mips/crt0.S
@@ -14,12 +14,16 @@
* they apply.
*/
+/* This file does not use any floating-point ABI. */
+ .gnu_attribute 4,0
+
#ifdef __mips16
/* This file contains 32 bit assembly code. */
.set nomips16
#endif
#include "regs.S"
+#include "abiflags.S"
/*
* Set up some room for a stack. We just grab a chunk of memory.
@@ -57,13 +61,14 @@
.globl _start
.ent _start
_start:
- .set noreorder
#ifdef __mips_embedded_pic
#define PICBASE start_PICBASE
+ .set noreorder
PICBASE = .+8
bal PICBASE
nop
move s0,$31
+ .set reorder
#endif
#if __mips<3
# define STATUS_MASK (SR_CU1|SR_PE)
@@ -81,55 +86,88 @@ _start:
# endif
# endif
#endif
- li v0, STATUS_MASK
- mtc0 v0, C0_SR
- mtc0 zero, C0_CAUSE
- nop
- /* Avoid hazard from FPU enable and other SR changes. */
- LA (t0, hardware_hazard_hook)
- beq t0,zero,1f
- nop
- jal t0
+ /* Clear Cause register. */
+ mtc0 zero,C0_CAUSE
nop
-1:
-/* Check for FPU presence. Don't check if we know that soft_float is
- being used. (This also avoids illegal instruction exceptions.) */
+ /* Read MIPS_abiflags structure and set status/config registers
+ accordingly. */
+ .weak __MIPS_abiflags_start
+ .weak __MIPS_abiflags_end
+ LA (t0,__MIPS_abiflags_start)
+ LA (t1,__MIPS_abiflags_end)
+ addiu t1,t1,-24
+ move v0,zero /* Mask for C0_SR. */
+
+ /* Branch to 1f is the .MIPS.abiflags section is not 24 bytes. This
+ indicates it is either missing or corrupt. */
+ bne t0,t1,1f
+
+ /* Check isa_level. */
+ lbu t1,ABIFlags_isa_level(t0)
+ sltu v1,t1,3 /* Is MIPS < 3? */
+ xori t1,t1,64 /* Is MIPS64? */
+ beq v1,zero,4f
+ li v1,SR_PE
+ or v0,v0,v1 /* Enable soft reset. */
+4:
+ li v1,(SR_KX|SR_SX|SR_UX)
+ bne t1,zero,5f
+ or v0,v0,v1 /* Enable extended addressing. */
+5:
+ /* Check fp_abi. */
+ lbu t1,ABIFlags_fp_abi(t0)
+ xori t1,t1,Val_GNU_MIPS_ABI_FP_SOFT
+ li v1,SR_CU1
+ beq t1,zero,2f /* Skip MSA and cpr1_size checks. */
+ or v0,v0,v1 /* Enable co-processor 1. */
+
+ /* Check cpr1_size. */
+ lbu t1,ABIFlags_cpr1_size(t0)
+ xori t1,t1,AFL_REG_64
+ li v1,SR_FR
+ bne t1,zero,3f
+ or v0,v0,v1 /* Enable 64-bit FPU registers. */
+3:
+ /* Check ases. */
+ lw t1,ABIFlags_ases(t0)
+ andi t1,t1,AFL_ASE_MSA
+ li v1,SR_FR
+ beq t1,zero,2f
+ or v0,v0,v1 /* Enable 64-bit FPU registers. */
+ li v1,SR_MSA
+ .set push
+ .set mips32
+ mtc0 v1,C0_CONFIG,5 /* Enable MSA. */
+ .set pop
+ b 2f
-#ifndef __mips_soft_float
- li t2,0xAAAA5555
- mtc1 t2,fp0 /* write to FPR 0 */
- mtc1 zero,fp1 /* write to FPR 1 */
- mfc1 t0,fp0
- mfc1 t1,fp1
- nop
- bne t0,t2,1f /* check for match */
- nop
- bne t1,zero,1f /* double check */
- nop
- j 2f /* FPU is present. */
- nop
-#endif
1:
- /* FPU is not present. Set status register to say that. */
- li v0, (STATUS_MASK-(STATUS_MASK & SR_CU1))
- mtc0 v0, C0_SR
+ /* MIPS_abiflags structure is not available. Set status/config
+ registers based on flags defined by compiler. */
+#ifdef __mips_soft_float
+ li v0,(STATUS_MASK-(STATUS_MASK & SR_CU1))
+#else
+ li v0,STATUS_MASK
+#endif
+
+2:
+ /* Set C0_SR, */
+ mtc0 v0,C0_SR
nop
- /* Avoid hazard from FPU disable. */
- LA (t0, hardware_hazard_hook)
+
+ /* Avoid hazard from C0_SR changes. */
+ LA (t0, hardware_hazard_hook)
beq t0,zero,2f
- nop
- jal t0
- nop
+ jalr t0
2:
-/* Fix high bits, if any, of the PC so that exception handling
- doesn't get confused. */
+/* Fix high bits, if any, of the PC so that exception handling doesn't get
+ confused. */
LA (v0, 3f)
jr v0
- nop
3:
LA (gp, _gp) # set the global data pointer
.end _start
@@ -145,21 +183,20 @@ _start:
zerobss:
LA (v0, _fbss)
LA (v1, _end)
-3:
- sw zero,0(v0)
- bltu v0,v1,3b
- addiu v0,v0,4 # executed in delay slot
-
+ beq v0,v1,2f
+1:
+ addiu v0,v0,4
+ sw zero,-4(v0)
+ bne v0,v1,1b
+2:
la t0, __lstack # make a small stack so we
addiu sp, t0, STARTUP_STACK_SIZE # can run some C code
la a0, __memsize # get the usable memory size
jal get_mem_info
- nop
/* setup the stack pointer */
LA (t0, __stack) # is __stack set ?
bne t0,zero,4f
- nop
/* NOTE: a0[0] contains the amount of memory available, and
not the last memory address. */
@@ -189,19 +226,14 @@ zerobss:
init:
LA (t9, hardware_init_hook) # init the hardware if needed
beq t9,zero,6f
- nop
- jal t9
- nop
+ jalr t9
6:
LA (t9, software_init_hook) # init the hardware if needed
beq t9,zero,7f
- nop
- jal t9
- nop
+ jalr t9
7:
LA (a0, _fini)
jal atexit
- nop
#ifdef GCRT0
.globl _ftext
@@ -209,12 +241,10 @@ init:
LA (a0, _ftext)
LA (a1, _etext)
jal monstartup
- nop
#endif
jal _init # run global constructors
- nop
addiu a1,sp,32 # argv = sp + 32
addiu a2,sp,40 # envp = sp + 40
@@ -225,13 +255,13 @@ init:
sw zero,(a1)
sw zero,(a2)
#endif
- jal main # call the program start function
move a0,zero # set argc to 0
+ jal main # call the program start function
# fall through to the "exit" routine
+ move a0,v0 # pass through the exit code
jal exit # call libc exit to run the G++
# destructors
- move a0,v0 # pass through the exit code
.end init
@@ -257,27 +287,25 @@ _exit:
/* Need to reinit PICBASE, since we might be called via exit()
rather than via a return path which would restore old s0. */
#define PICBASE exit_PICBASE
+ .set noreorder
PICBASE = .+8
bal PICBASE
nop
move s0,$31
+ .set reorder
#endif
#ifdef GCRT0
LA (t0, _mcleanup)
- jal t0
- nop
+ jalr t0
#endif
LA (t0, hardware_exit_hook)
beq t0,zero,1f
- nop
- jal t0
- nop
+ jalr t0
1:
# break instruction can cope with 0xfffff, but GAS limits the range:
break 1023
b 7b # but loop back just in-case
- nop
.end _exit
/* Assume the PICBASE set up above is no longer valid below here. */
diff --git a/libgloss/mips/mti32.ld b/libgloss/mips/mti32.ld
index 715639ef5..2739c620f 100644
--- a/libgloss/mips/mti32.ld
+++ b/libgloss/mips/mti32.ld
@@ -93,6 +93,11 @@ SECTIONS
}
. = .;
+ .MIPS.abiflags : {
+ __MIPS_abiflags_start = .;
+ *(.MIPS.abiflags)
+ __MIPS_abiflags_end = .;
+ }
.rodata : {
*(.rdata)
*(.rodata)
@@ -137,6 +142,7 @@ SECTIONS
*(COMMON)
}
+ . = ALIGN(4);
PROVIDE (end = .);
_end = .;
diff --git a/libgloss/mips/mti64.ld b/libgloss/mips/mti64.ld
index 1bd11f6f8..15975ad89 100644
--- a/libgloss/mips/mti64.ld
+++ b/libgloss/mips/mti64.ld
@@ -95,6 +95,11 @@ SECTIONS
}
. = .;
+ .MIPS.abiflags : {
+ __MIPS_abiflags_start = .;
+ *(.MIPS.abiflags)
+ __MIPS_abiflags_end = .;
+ }
.rodata : {
*(.rdata)
*(.rodata)
@@ -139,6 +144,7 @@ SECTIONS
*(COMMON)
}
+ . = ALIGN(4);
PROVIDE (end = .);
_end = .;
diff --git a/libgloss/mips/mti64_64.ld b/libgloss/mips/mti64_64.ld
index a058b9626..7a2074f1a 100644
--- a/libgloss/mips/mti64_64.ld
+++ b/libgloss/mips/mti64_64.ld
@@ -98,6 +98,11 @@ SECTIONS
}
. = .;
+ .MIPS.abiflags : {
+ __MIPS_abiflags_start = .;
+ *(.MIPS.abiflags)
+ __MIPS_abiflags_end = .;
+ }
.rodata : {
*(.rdata)
*(.rodata)
@@ -142,6 +147,7 @@ SECTIONS
*(COMMON)
}
+ . = ALIGN(4);
PROVIDE (end = .);
_end = .;
diff --git a/libgloss/mips/mti64_n32.ld b/libgloss/mips/mti64_n32.ld
index 279571b2f..4003845e0 100644
--- a/libgloss/mips/mti64_n32.ld
+++ b/libgloss/mips/mti64_n32.ld
@@ -98,6 +98,11 @@ SECTIONS
}
. = .;
+ .MIPS.abiflags : {
+ __MIPS_abiflags_start = .;
+ *(.MIPS.abiflags)
+ __MIPS_abiflags_end = .;
+ }
.rodata : {
*(.rdata)
*(.rodata)
@@ -142,6 +147,7 @@ SECTIONS
*(COMMON)
}
+ . = ALIGN(4);
PROVIDE (end = .);
_end = .;
diff --git a/libgloss/mips/regs.S b/libgloss/mips/regs.S
index bdf933f13..e4b134307 100644
--- a/libgloss/mips/regs.S
+++ b/libgloss/mips/regs.S
@@ -98,6 +98,8 @@
#define SR_SX 0x00000040 /* Supervisor extended addressing enabled */
#define SR_UX 0x00000020 /* User extended addressing enabled */
+#define SR_MSA 0x08000000 /* MSA ASE */
+
/* Standard (R4000) cache operations. Taken from "MIPS R4000
Microprocessor User's Manual" 2nd edition: */
diff --git a/libgloss/moxie/Makefile.in b/libgloss/moxie/Makefile.in
index a6ca86c8c..9aba6b4ce 100644
--- a/libgloss/moxie/Makefile.in
+++ b/libgloss/moxie/Makefile.in
@@ -58,9 +58,13 @@ OBJCOPY = `if [ -f ${objroot}/../binutils/objcopy ] ; \
then echo ${objroot}/../binutils/objcopy ; \
else t='$(program_transform_name)'; echo objcopy | sed -e $$t ; fi`
-LD_SCRIPTS = moxie-elf-common.ld qemu.ld sim.ld
+LD_SCRIPTS = moxie-elf-common.ld qemu.ld sim.ld moxiebox.ld
+
+@BUILD_CRT0_TRUE@CRT0 = crt0.o
+@BUILD_CRT0_TRUE@CRT0_INSTALL = install-crt0
+@BUILD_CRT0_FALSE@CRT0 =
+@BUILD_CRT0_FALSE@CRT0_INSTALL =
-CRT0 = crt0.o
SIM_BSP = libsim.a
SIM_OBJS = fstat.o \
getpid.o \
@@ -96,7 +100,7 @@ QEMU_OBJS = qemu-write.o \
#### Host specific Makefile fragment comes in here.
@host_makefile_frag@
-all: $(CRT0) $(SIM_BSP) $(QEMU_BSP)
+all: ${CRT0} $(SIM_BSP) $(QEMU_BSP)
$(SIM_BSP): $(SIM_OBJS)
$(AR) $(ARFLAGS) $@ $?
@@ -124,14 +128,16 @@ sim-write.o: $(srcdir)/sim-write.S
stat.o: $(srcdir)/stat.c
qemu-write.o: $(srcdir)/qemu-write.c
-install: $($(CPU)_INSTALL)
- $(INSTALL_DATA) $(CRT0) $(DESTDIR)$(tooldir)/lib${MULTISUBDIR}/$(CRT0)
+install: ${CRT0_INSTALL} $($(CPU)_INSTALL)
$(INSTALL_DATA) $(SIM_BSP) $(DESTDIR)$(tooldir)/lib${MULTISUBDIR}/$(SIM_BSP)
$(INSTALL_DATA) $(QEMU_BSP) $(DESTDIR)$(tooldir)/lib${MULTISUBDIR}/$(QEMU_BSP)
for x in ${LD_SCRIPTS}; do \
${INSTALL_DATA} ${srcdir}/$$x $(DESTDIR)${tooldir}/lib/$$x; \
done;
+install-crt0:
+ ${INSTALL_DATA} ${CRT0} $(DESTDIR)${tooldir}/lib${MULTISUBDIR}/$$x
+
clean mostlyclean:
rm -f *.o *.a
diff --git a/libgloss/moxie/configure b/libgloss/moxie/configure
index 45233987e..94441c1f2 100644
--- a/libgloss/moxie/configure
+++ b/libgloss/moxie/configure
@@ -585,6 +585,8 @@ ac_unique_file="crt0.S"
ac_subst_vars='LTLIBOBJS
LIBOBJS
host_makefile_frag_path
+BUILD_CRT0_FALSE
+BUILD_CRT0_TRUE
CCASFLAGS
CCAS
RANLIB
@@ -2525,6 +2527,20 @@ test "${CCASFLAGS+set}" = set || CCASFLAGS=$CFLAGS
+case "${target}" in
+ moxie-*-moxiebox*)
+ BUILD_CRT0_TRUE='#'
+ BUILD_CRT0_FALSE=
+ ;;
+ *)
+ BUILD_CRT0_TRUE=
+ BUILD_CRT0_FALSE='#'
+ ;;
+esac
+
+
+
+
host_makefile_frag=${srcdir}/../config/default.mh
host_makefile_frag_path=$host_makefile_frag
diff --git a/libgloss/moxie/configure.in b/libgloss/moxie/configure.in
index 04169f1b5..e3b5d1426 100644
--- a/libgloss/moxie/configure.in
+++ b/libgloss/moxie/configure.in
@@ -33,6 +33,21 @@ AC_SUBST(LD)
AC_PROG_RANLIB
LIB_AM_PROG_AS
+dnl Don't build crt0 for moxiebox, which provides crt0 for us.
+case "${target}" in
+ moxie-*-moxiebox*)
+ BUILD_CRT0_TRUE='#'
+ BUILD_CRT0_FALSE=
+ ;;
+ *)
+ BUILD_CRT0_TRUE=
+ BUILD_CRT0_FALSE='#'
+ ;;
+esac
+
+AC_SUBST(BUILD_CRT0_TRUE)
+AC_SUBST(BUILD_CRT0_FALSE)
+
host_makefile_frag=${srcdir}/../config/default.mh
dnl We have to assign the same value to other variables because autoconf
diff --git a/libgloss/moxie/crt0.S b/libgloss/moxie/crt0.S
index 44616a82e..17c6b98ab 100644
--- a/libgloss/moxie/crt0.S
+++ b/libgloss/moxie/crt0.S
@@ -1,6 +1,6 @@
/* crt0.S -- startup file for moxie
*
- * Copyright (c) 2008, 2009 Anthony Green
+ * Copyright (c) 2008, 2009, 2014 Anthony Green
*
* The authors hereby grant permission to use, copy, modify, distribute,
* and license this software and its documentation for any purpose, provided
@@ -26,7 +26,7 @@ _start:
ldi.l $r0, __bss_start__
xor $r1, $r1
ldi.l $r2, __bss_end__
- sub.l $r2, $r0
+ sub $r2, $r0
jsra memset
/* Call _init to invoke static constructors, etc. */
diff --git a/libgloss/moxie/moxiebox.ld b/libgloss/moxie/moxiebox.ld
new file mode 100644
index 000000000..1da9d06f8
--- /dev/null
+++ b/libgloss/moxie/moxiebox.ld
@@ -0,0 +1,232 @@
+/*
+ * Default linker script for moxiebox.
+ *
+ * Copyright (C) 2014 Anthony Green
+ *
+ * The authors hereby grant permission to use, copy, modify,
+ * distribute, and license this software and its documentation for any
+ * purpose, provided that existing copyright notices are retained in
+ * all copies and that this notice is included verbatim in any
+ * distributions. No written agreement, license, or royalty fee is
+ * required for any of the authorized uses. Modifications to this
+ * software may be copyrighted by their authors and need not follow
+ * the licensing terms described here, provided that the new terms are
+ * clearly indicated on the first page of each file where they apply.
+ */
+
+OUTPUT_FORMAT("elf32-littlemoxie")
+OUTPUT_ARCH(moxie)
+ENTRY(_start)
+SECTIONS
+{
+ /* Read-only sections, merged into text segment: */
+ . = 0x00001000;
+ .interp : { *(.interp) }
+ .hash : { *(.hash) }
+ .dynsym : { *(.dynsym) }
+ .dynstr : { *(.dynstr) }
+ .gnu.version : { *(.gnu.version) }
+ .gnu.version_d : { *(.gnu.version_d) }
+ .gnu.version_r : { *(.gnu.version_r) }
+ .rel.init : { *(.rel.init) }
+ .rela.init : { *(.rela.init) }
+ .rel.text :
+ {
+ *(.rel.text)
+ *(.rel.text.*)
+ *(.rel.gnu.linkonce.t*)
+ }
+ .rela.text :
+ {
+ *(.rela.text)
+ *(.rela.text.*)
+ *(.rela.gnu.linkonce.t*)
+ }
+ .rel.fini : { *(.rel.fini) }
+ .rela.fini : { *(.rela.fini) }
+ .rel.rodata :
+ {
+ *(.rel.rodata)
+ *(.rel.rodata.*)
+ *(.rel.gnu.linkonce.r*)
+ }
+ .rela.rodata :
+ {
+ *(.rela.rodata)
+ *(.rela.rodata.*)
+ *(.rela.gnu.linkonce.r*)
+ }
+ .rel.data :
+ {
+ *(.rel.data)
+ *(.rel.data.*)
+ *(.rel.gnu.linkonce.d*)
+ }
+ .rela.data :
+ {
+ *(.rela.data)
+ *(.rela.data.*)
+ *(.rela.gnu.linkonce.d*)
+ }
+ .rel.ctors : { *(.rel.ctors) }
+ .rela.ctors : { *(.rela.ctors) }
+ .rel.dtors : { *(.rel.dtors) }
+ .rela.dtors : { *(.rela.dtors) }
+ .rel.got : { *(.rel.got) }
+ .rela.got : { *(.rela.got) }
+ .rel.sdata :
+ {
+ *(.rel.sdata)
+ *(.rel.sdata.*)
+ *(.rel.gnu.linkonce.s*)
+ }
+ .rela.sdata :
+ {
+ *(.rela.sdata)
+ *(.rela.sdata.*)
+ *(.rela.gnu.linkonce.s*)
+ }
+ .rel.sbss : { *(.rel.sbss) }
+ .rela.sbss : { *(.rela.sbss) }
+ .rel.bss : { *(.rel.bss) }
+ .rela.bss : { *(.rela.bss) }
+ .rel.plt : { *(.rel.plt) }
+ .rela.plt : { *(.rela.plt) }
+ .plt : { *(.plt) }
+ .text :
+ {
+ *(.text)
+ *(.text.*)
+ *(.stub)
+ /* .gnu.warning sections are handled specially by elf32.em. */
+ *(.gnu.warning)
+ *(.gnu.linkonce.t*)
+ *(.glue_7t) *(.glue_7)
+ } =0
+ .init :
+ {
+ KEEP (*(.init))
+ } =0
+ _etext = .;
+ PROVIDE (etext = .);
+ .fini :
+ {
+ KEEP (*(.fini))
+ } =0
+ .rodata : { *(.rodata) *(.rodata.*) *(.gnu.linkonce.r*) }
+ .rodata1 : { *(.rodata1) }
+ .eh_frame_hdr : { *(.eh_frame_hdr) }
+ /* Adjust the address for the data segment. We want to adjust up to
+ the same address within the page on the next page up. */
+ . = ALIGN(256) + (. & (256 - 1));
+ .data :
+ {
+ *(.data)
+ *(.data.*)
+ *(.gnu.linkonce.d*)
+ SORT(CONSTRUCTORS)
+ }
+ .data1 : { *(.data1) }
+ .eh_frame : { KEEP (*(.eh_frame)) }
+ .gcc_except_table : { *(.gcc_except_table) }
+ .ctors :
+ {
+ /* gcc uses crtbegin.o to find the start of
+ the constructors, so we make sure it is
+ first. Because this is a wildcard, it
+ doesn't matter if the user does not
+ actually link against crtbegin.o; the
+ linker won't look for a file to match a
+ wildcard. The wildcard also means that it
+ doesn't matter which directory crtbegin.o
+ is in. */
+ KEEP (*crtbegin.o(.ctors))
+ /* We don't want to include the .ctor section from
+ from the crtend.o file until after the sorted ctors.
+ The .ctor section from the crtend file contains the
+ end of ctors marker and it must be last */
+ KEEP (*(EXCLUDE_FILE (*crtend.o ) .ctors))
+ KEEP (*(SORT(.ctors.*)))
+ KEEP (*(.ctors))
+ }
+ .dtors :
+ {
+ KEEP (*crtbegin.o(.dtors))
+ KEEP (*(EXCLUDE_FILE (*crtend.o ) .dtors))
+ KEEP (*(SORT(.dtors.*)))
+ KEEP (*(.dtors))
+ }
+ .jcr : { KEEP (*(.jcr)) }
+ .got : { *(.got.plt) *(.got) }
+ .dynamic : { *(.dynamic) }
+ /* We want the small data sections together, so single-instruction offsets
+ can access them all, and initialized data all before uninitialized, so
+ we can shorten the on-disk segment size. */
+ .sdata :
+ {
+ *(.sdata)
+ *(.sdata.*)
+ *(.gnu.linkonce.s.*)
+ }
+ _edata = .;
+ PROVIDE (edata = .);
+ __bss_start = .;
+ __bss_start__ = .;
+ .sbss :
+ {
+ *(.dynsbss)
+ *(.sbss)
+ *(.sbss.*)
+ *(.scommon)
+ }
+ .bss :
+ {
+ *(.dynbss)
+ *(.bss)
+ *(.bss.*)
+ *(COMMON)
+ /* Align here to ensure that the .bss section occupies space up to
+ _end. Align after .bss to ensure correct alignment even if the
+ .bss section disappears because there are no input sections. */
+ . = ALIGN(32 / 8);
+ }
+ . = ALIGN(32 / 8);
+ _end = .;
+ _bss_end__ = . ; __bss_end__ = . ; __end__ = . ;
+ PROVIDE (end = .);
+ /* Stabs debugging sections. */
+ .stab 0 : { *(.stab) }
+ .stabstr 0 : { *(.stabstr) }
+ .stab.excl 0 : { *(.stab.excl) }
+ .stab.exclstr 0 : { *(.stab.exclstr) }
+ .stab.index 0 : { *(.stab.index) }
+ .stab.indexstr 0 : { *(.stab.indexstr) }
+ .comment 0 : { *(.comment) }
+ /* DWARF debug sections.
+ Symbols in the DWARF debugging sections are relative to the beginning
+ of the section so we begin them at 0. */
+ /* DWARF 1 */
+ .debug 0 : { *(.debug) }
+ .line 0 : { *(.line) }
+ /* GNU DWARF 1 extensions */
+ .debug_srcinfo 0 : { *(.debug_srcinfo) }
+ .debug_sfnames 0 : { *(.debug_sfnames) }
+ /* DWARF 1.1 and DWARF 2 */
+ .debug_aranges 0 : { *(.debug_aranges) }
+ .debug_pubnames 0 : { *(.debug_pubnames) }
+ /* DWARF 2 */
+ .debug_info 0 : { *(.debug_info) }
+ .debug_abbrev 0 : { *(.debug_abbrev) }
+ .debug_line 0 : { *(.debug_line) }
+ .debug_frame 0 : { *(.debug_frame) }
+ .debug_str 0 : { *(.debug_str) }
+ .debug_loc 0 : { *(.debug_loc) }
+ .debug_macinfo 0 : { *(.debug_macinfo) }
+ .debug_ranges 0 : { *(.debug_ranges) }
+ /* SGI/MIPS DWARF 2 extensions */
+ .debug_weaknames 0 : { *(.debug_weaknames) }
+ .debug_funcnames 0 : { *(.debug_funcnames) }
+ .debug_typenames 0 : { *(.debug_typenames) }
+ .debug_varnames 0 : { *(.debug_varnames) }
+ /* These must appear regardless of . */
+}
diff --git a/libgloss/msp430/Makefile.in b/libgloss/msp430/Makefile.in
index 0282e3f32..73079d65b 100644
--- a/libgloss/msp430/Makefile.in
+++ b/libgloss/msp430/Makefile.in
@@ -1,4 +1,4 @@
-# Copyright (c) 2008, 2009, 2011, 2013 Red Hat, Inc. All rights reserved.
+# Copyright (c) 2008-2014 Red Hat, Inc. All rights reserved.
#
# This copyrighted material is made available to anyone wishing to use, modify,
# copy, or redistribute it subject to the terms and conditions of the BSD
@@ -12,6 +12,7 @@
# Makefile for libgloss/msp430.
+DESTDIR =
VPATH = @srcdir@
srcdir = @srcdir@
objdir = .
@@ -56,40 +57,66 @@ OBJCOPY = `if [ -f ${objroot}/../binutils/objcopy ] ; \
then echo ${objroot}/../binutils/objcopy ; \
else t='$(program_transform_name)'; echo objcopy | sed -e $$t ; fi`
-SCRIPTS = $(srcdir)/msp430.ld $(srcdir)/msp430-sim.ld
+SCRIPTS = $(srcdir)/msp430-sim.ld
SCRIPTS += $(srcdir)/msp430xl-sim.ld
-SCRIPTS += $(srcdir)/msp430F5438A-s.ld
-SCRIPTS += $(srcdir)/msp430F5438A-l.ld
-CRT = gcrt0.o crt0.o crtn.o
+SCRIPTS += $(srcdir)/intr_vectors.ld
+
+CRT = gcrt0.o crt0.o crt0-minrt.o crtn.o crtn-minrt.o
SIM_BSP = libsim.a
-LIBNOSYS = libnosys.a
+LIB_NOSYS = libnosys.a
+LIB_CRT = libcrt.a
SIM_OBJS = syscalls.o \
cio.o \
write.o \
sbrk.o
-NOSYS_OBJS = nosyscalls.o \
+NOSYS_OBJS = ciosyscalls.o \
cio.o \
write.o \
+ unlink.o \
sbrk.o
+# Each crt_*.o is built from crt0.S using -DL*. crt0.o is built from
+# crt0.s with -DL0 via the default rule below.
+CRT_OBJS = \
+ crt_bss.o \
+ crt_high_bss.o \
+ crt_movedata.o \
+ crt_move_highdata.o \
+ crt_main.o \
+ crt_main_minrt.o \
+ crt_callexit.o \
+ crt_init.o
+
#### Host specific Makefile fragment comes in here.
@host_makefile_frag@
+all: $(CRT) $(SIM_BSP) $(LIB_NOSYS) $(LIB_CRT) copy_scripts_to_objdir
+
+crt_%.o : crt0.S
+ $(CC) -DL$* -Wa,-gdwarf2 -Wa,-I$(srcdir) $(CFLAGS_FOR_TARGET) $(INCLUDES) $(CFLAGS) -c $< -o $@
+
+crt0-minrt.o : crt0.S
+ $(CC) -DL0 -DMINRT -Wa,-gdwarf2 -Wa,-I$(srcdir) $(CFLAGS_FOR_TARGET) $(INCLUDES) $(CFLAGS) -c $< -o $@
+
+crtn-minrt.o : crtn.S
+ $(CC) -DL0 -DMINRT -Wa,-gdwarf2 -Wa,-I$(srcdir) $(CFLAGS_FOR_TARGET) $(INCLUDES) $(CFLAGS) -c $< -o $@
+
# Override .S.o rule to pass assembler debugging flags
.S.o:
- $(CC) -Wa,-gdwarf2 -Wa,-I$(srcdir) $(CFLAGS_FOR_TARGET) $(INCLUDES) $(CFLAGS) -c $<
-
-all: $(CRT) $(SIM_BSP) $(LIBNOSYS) copy_scripts_to_objdir
+ $(CC) -DL0 -Wa,-gdwarf2 -Wa,-I$(srcdir) $(CFLAGS_FOR_TARGET) $(INCLUDES) $(CFLAGS) -c $<
$(SIM_BSP): $(SIM_OBJS)
$(AR) $(ARFLAGS) $@ $?
$(RANLIB) $@
+$(LIB_NOSYS): $(NOSYS_OBJS)
+ $(AR) $(ARFLAGS) $@ $?
+ $(RANLIB) $@
-$(LIBNOSYS): $(NOSYS_OBJS)
+$(LIB_CRT): $(CRT_OBJS)
$(AR) $(ARFLAGS) $@ $?
$(RANLIB) $@
@@ -126,13 +153,14 @@ unlink.o : $(SDEPS)
utime.o : $(SDEPS)
write.o : $(SDEPS)
-install: $(CRT) $(SIM_BSP) $(LIBNOSYS) $(SCRIPTS)
- for c in $(CRT) $(SIM_BSP) $(LIBNOSYS); do \
- $(INSTALL_DATA) $$c $(tooldir)/lib${MULTISUBDIR}/$$c ;\
+install: $(CRT) $(SIM_BSP) $(LIB_NOSYS) $(LIB_CRT) $(SCRIPTS)
+ mkdir -p $(DESTDIR)$(tooldir)/lib${MULTISUBDIR}
+ for c in $(CRT) $(SIM_BSP) $(LIB_NOSYS) $(LIB_CRT); do \
+ $(INSTALL_DATA) $$c $(DESTDIR)$(tooldir)/lib${MULTISUBDIR}/$$c ;\
done
for c in $(SCRIPTS); do \
b=`basename $$c`; \
- $(INSTALL_DATA) $$c $(tooldir)/lib${MULTISUBDIR}/$$b ;\
+ $(INSTALL_DATA) $$c $(DESTDIR)$(tooldir)/lib${MULTISUBDIR}/$$b ;\
done
clean mostlyclean:
diff --git a/libgloss/msp430/cio.c b/libgloss/msp430/cio.S
index d5e3e7430..e7a268dbb 100644
--- a/libgloss/msp430/cio.c
+++ b/libgloss/msp430/cio.S
@@ -1,6 +1,6 @@
/*
-Copyright (c) 2013 Red Hat, Inc. All rights reserved.
+Copyright (c) 2014 Red Hat, Inc. All rights reserved.
This copyrighted material is made available to anyone wishing to use, modify,
copy, or redistribute it subject to the terms and conditions of the BSD
@@ -13,14 +13,21 @@ License and may only be used or replicated with the express permission of
Red Hat, Inc.
*/
+#include "memmodel.h"
-#include "cio.h"
+ .data
-__CIOBUF__TYPE__ __CIOBUF__;
+ .global __CIOBUF__
+__CIOBUF__:
+ .global _CIOBUF_
+_CIOBUF_:
+ .space 75
-void
-_libgloss_cio_hook (void)
-{
- __asm__ __volatile__ (" .global C$$IO$$");
- __asm__ __volatile__ ("C$$IO$$: nop");
-}
+ .text
+
+ .global _libgloss_cio_hook
+_libgloss_cio_hook:
+ .global C$$IO$$
+C$$IO$$:
+ nop
+ ret_
diff --git a/libgloss/msp430/nosyscalls.S b/libgloss/msp430/ciosyscalls.S
index abb01b03e..889deae9e 100644
--- a/libgloss/msp430/nosyscalls.S
+++ b/libgloss/msp430/ciosyscalls.S
@@ -21,28 +21,60 @@
.macro sc,a
sc2 \a,\a
.endm
+
+.macro START_FUNC name1, name2=foo
+ .pushsection .text.\name1,"ax",@progbits
+ .p2align 1
+ .weak \name1
+ .global \name1
+\name1:
+ .ifnc \name2,foo
+ .weak \name2
+ .global \name2
+\name2:
+ .endif
+.endm
+
+.macro END_FUNC name1, name2=foo
+ .type \name1 , @function
+ .size \name1 , . - \name1
+ .ifnc \name2,foo
+ .type \name2 , @function
+ .size \name2 , . - \name2
+ .endif
+ .popsection
+.endm
+
+
+START_FUNC exit, _exit
+ /* For some reason, the board fails to stop at a breakpoint
+ placed on top of a software breakpoint instruction. */
+/* MOV.B #0,R3 ; this is a software breakpoint instruction */
+1: br_ #1b
+END_FUNC exit, _exit
+
+START_FUNC isatty,_isatty
+ MOV #1,R12
+ ret_
+END_FUNC isatty,_isatty
+
+
+START_FUNC getpid
+ MOV #42,R12
+ ret_
+END_FUNC getpid
+
+
.macro sc2,name,num
- .weak \name
- .global \name
-\name:
+ START_FUNC \name
call_ #__errno
movx_ #ENOSYS, @R12
MOV.W #-1,R12
ret_
+ END_FUNC \name
.endm
- .weak exit
- .weak _exit
- .global exit
- .global _exit
-exit:
-_exit:
- /* For some reason, the board fails to stop at a breakpoint
- placed on top of a software breakpoint instruction. */
-/* MOV.B #0,R3 ; this is a software breakpoint instruction */
-1: br_ #1b
-
#define SC(n) sc2 n,SYS_##n
SC (open)
@@ -52,18 +84,3 @@ _exit:
SC (fstat)
SC (lseek)
SC (kill)
-
- .weak isatty
- .global isatty
-isatty:
- .weak _isatty
- .global _isatty
-_isatty:
- MOV #1,R12
- ret_
-
- .weak getpid
- .global getpid
-getpid:
- MOV #42,R12
- ret_
diff --git a/libgloss/msp430/crt0.S b/libgloss/msp430/crt0.S
index 388b67829..5c84e7c0b 100644
--- a/libgloss/msp430/crt0.S
+++ b/libgloss/msp430/crt0.S
@@ -1,4 +1,4 @@
-/* Copyright (c) 2012-2013 Red Hat, Inc. All rights reserved.
+/* Copyright (c) 2012-2015 Red Hat, Inc. All rights reserved.
This copyrighted material is made available to anyone wishing to use, modify,
copy, or redistribute it subject to the terms and conditions of the BSD
@@ -13,17 +13,62 @@
#include "memmodel.h"
+;; The linker links all .crt_* sections in asciibetical order at the
+;; same place. So, the four digits in .crt_NNNN_xxx name created by
+;; the START_CRT_FUNC macro determine the link order, so, keep them
+;; in sequential order here. The first two digits are set here, the
+;; second two allow users to insert code between code fragments here.
+
+#if L0
.section ".resetvec", "a"
__msp430_resetvec_hook:
- .word __start
+ .word __crt0_start
+
+ ;; Here we provide weak definitions of the symbols used in the
+ ;; init_highbss and move_highdata blocks, in case they are not
+ ;; provided by the linker script. They are defined here because
+ ;; this block is always included in every executable, and because
+ ;; if there were defined in the blocks that need them their values
+ ;; would be used without giving the linker script a chance to
+ ;; override them.
+ ;;
+ ;; The weak definitions are needed if the user targets an MCU
+ ;; without high memory - and hence uses a linker script without
+ ;; a definition of the .upper.bss or .upper.data sections - and
+ ;; they have compiled their code with the -mdata-region=either
+ ;; command line option. That option causes the assembler to
+ ;; define the __crt0_move_highdata and/or crt0_init_highbss
+ ;; symbols, which in turn forces the inclusion of the
+ ;; move_highdata and/or init_highbss blocks in the startup code,
+ ;; regardless of the fact that the sections are not present in
+ ;; the linker script.
+
+ WEAK_DEF __upper_data_init
+ WEAK_DEF __rom_highdatacopysize
+ WEAK_DEF __high_datastart
+ WEAK_DEF __rom_highdatastart
+ WEAK_DEF __high_bssstart
+ WEAK_DEF __high_bsssize
- .section ".lowtext", "ax", @progbits
- .global __start
-__start:
+START_CRT_FUNC 0000 start
+ .refsym __msp430_resetvec_hook
+#ifdef MINRT
+ .refsym __crt0_call_just_main
+#else
+ .refsym __crt0_call_init_then_main
+#endif
mov_ #__stack, R1
- ;; Disable watchdog timer.
- MOV #0x5a80, &0x15C
+END_CRT_FUNC start
+#endif
+
+
+#if Lbss
+;; Note - this section is only included in the startup code of the
+;; application if it is needed. It is responsible for initializing
+;; the contents of the .bss section.
+
+START_CRT_FUNC 0100 init_bss
mov_ #__bssstart, R12
clr.w R13
@@ -33,6 +78,40 @@ __start:
#endif
call_ #memset
+END_CRT_FUNC init_bss
+#endif /* Lbss */
+
+
+#ifdef __MSP430X_LARGE__
+#if Lhigh_bss
+;; Note - this section is only included in the startup code of the
+;; application if it is needed. It is responsible for initializing
+;; the contents of the .upper.bss section.
+
+START_CRT_FUNC 0200 init_highbss
+
+ mov_ #__high_bssstart, R12
+ mov.w #0, R13
+ mov_ #__high_bsssize, R14
+ ;; If __high_bsssize is zero then skip the call to memset.
+ ;; This can happen if all of the bss data was placed into .either.bss.
+ cmp.w #0, R14
+ jeq 1f
+ call_ #memset
+1:
+END_CRT_FUNC init_highbss
+#endif /* Lhigh_bss */
+#endif /* __MSP430X_LARGE__ */
+
+
+#if Lmovedata
+;; Note - this section is only included in the startup code of the
+;; application if it is needed. It is responsible for copying the
+;; contents of the .data section from its load address (in ROM) to
+;; its run-time address (in RAM).
+
+START_CRT_FUNC 0300 movedata
+
mov_ #__datastart, R12
mov_ #__romdatastart, R13
@@ -40,23 +119,104 @@ __start:
cmp_ R12, R13
jeq 1f
- mov.w #__romdatacopysize, R14
+ mov_ #__romdatacopysize, R14
+
+ call_ #memmove
+1:
+END_CRT_FUNC movedata
+#endif /* Lmovedata */
+
+
#ifdef __MSP430X_LARGE__
- clr.w R15 ; We assume that __romdatacopysize is never > 64M
-#endif
+#if Lmove_highdata
+;; Note - this section is only included in the startup code of the application
+;; if it is needed. It is responsible either for making sure that the
+;; contents of the .upper.data section have their correct startup values.
+;; If a copy of the .upper.data section is stored in ROM then this means
+;; copying the contents into HIFRAM. If a copy of .upper.data is stored in a
+;; shadow section in HIFRAM then this means copying from the shadow section
+;; into the real section.
+
+START_CRT_FUNC 0400 move_highdata
+ ;; __rom_highdatacopysize may be zero. Test this first because
+ ;; its value may come from the weak definitions above and we do
+ ;; not want to access the memory at address 0 pointed to by the
+ ;; weak definition of __upper_data_init.
+ mov.w #__rom_highdatacopysize, R14
+ cmp.w #0, R14
+ jeq 3f
+
+ /* Test our status word. */
+ cmpx.w #0, &__upper_data_init
+ jeq 1f
+ /* Status word is non-zero - copy from shadow into upper. */
+ mov_ #__high_datastart, R12
+ mov_ #__rom_highdatastart, R13
+ jmp 2f
+
+1: /* Status word is zero. Copy from upper to shadow and change status word. */
+ movx.w #1, &__upper_data_init
+ mov_ #__rom_highdatastart, R12
+ mov_ #__high_datastart, R13
+
+2: ;; __rom_highdatacopysize may be zero. memmove should cope.
+ mov.w #__rom_highdatacopysize, R14
+
call_ #memmove
-1:
+3:
+END_CRT_FUNC move_highdata
+#endif /* Lmove_highdata */
+#endif /* __MSP430X_LARGE__ */
+
+
+#if Lmain_minrt
+;; Note - this section is only included in the startup code of the
+;; application if it is needed. It is responsible for just calling
+;; main. No initialization code is called first, and main is not
+;; expected to return.
+
+START_CRT_FUNC 0600 call_just_main
+
+ clr.w R12 ; Set argc == 0
+ call_ #main
+END_CRT_FUNC call_just_main
+#endif /* Lmain_minrt */
+
+
+#if Lmain
+;; Note - this section is only included in the startup code of the
+;; application if it is needed. It is responsible for calling the
+;; initialization code - constructors, etc - and then main. If main
+;; returns then the following section should be present to catch it.
+
+START_CRT_FUNC 0700 call_init_then_main
+
call_ #__msp430_init
clr.w R12 ; Set argc == 0
call_ #main
+END_CRT_FUNC call_init_then_main
+#endif /* Lmain */
+
+
+#if Lcallexit
+;; Note - this section is only included in the startup code of the
+;; application if it is needed. It is responsible for calling exit
+;; once main has finished.
+
+START_CRT_FUNC 0800 call_exit
+
call_ #_exit
- .word __msp430_resetvec_hook
+END_CRT_FUNC call_exit
+#endif /* Lcallexit */
;----------------------------------------
+#ifndef MINRT
+#if L0
+ .section ".crt_0900main_init", "ax", @progbits
.global _msp430_run_init_array
.type _msp430_run_init_array,@function
_msp430_run_init_array:
@@ -104,3 +264,6 @@ __msp430_init:
.global __msp430_fini
__msp430_fini:
call_ #_msp430_run_fini_array
+
+#endif
+#endif /* not MINRT */
diff --git a/libgloss/msp430/crt_bss.S b/libgloss/msp430/crt_bss.S
new file mode 100644
index 000000000..27ab2efeb
--- /dev/null
+++ b/libgloss/msp430/crt_bss.S
@@ -0,0 +1,44 @@
+/* Copyright (c) 2012-2013 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. */
+
+#include "memmodel.h"
+
+ .section ".crt_bss", "ax", @progbits
+
+ .global __crt0_init_bss
+__crt0_init_bss:
+
+ mov_ #__bssstart, R12
+ clr.w R13
+ mov.w #__bsssize, R14
+#ifdef __MSP430X_LARGE__
+ clr.w R15 ; We assume that __bsssize is never > 64M
+#endif
+ call_ #memset
diff --git a/libgloss/msp430/crtn.S b/libgloss/msp430/crtn.S
index 9fcaec0af..939d5ce6f 100644
--- a/libgloss/msp430/crtn.S
+++ b/libgloss/msp430/crtn.S
@@ -13,6 +13,7 @@
#include "memmodel.h"
+#ifndef MINRT
.section .init,"ax"
call_ #_msp430_run_preinit_array
call_ #_msp430_run_init_array
@@ -28,3 +29,4 @@ __msp430_fini_end:
.text
+#endif
diff --git a/libgloss/msp430/intr_vectors.ld b/libgloss/msp430/intr_vectors.ld
new file mode 100644
index 000000000..994146d48
--- /dev/null
+++ b/libgloss/msp430/intr_vectors.ld
@@ -0,0 +1,71 @@
+MEMORY
+{
+ VECT0 (w) : ORIGIN = 0x0FFC0, LENGTH = 2
+ VECT1 (w) : ORIGIN = 0x0FFC2, LENGTH = 2
+ VECT2 (w) : ORIGIN = 0x0FFC4, LENGTH = 2
+ VECT3 (w) : ORIGIN = 0x0FFC6, LENGTH = 2
+ VECT4 (w) : ORIGIN = 0x0FFC8, LENGTH = 2
+ VECT5 (w) : ORIGIN = 0x0FFCA, LENGTH = 2
+ VECT6 (w) : ORIGIN = 0x0FFCC, LENGTH = 2
+ VECT7 (w) : ORIGIN = 0x0FFCE, LENGTH = 2
+ VECT8 (w) : ORIGIN = 0x0FFD0, LENGTH = 2
+ VECT9 (w) : ORIGIN = 0x0FFD2, LENGTH = 2
+ VECT10 (w) : ORIGIN = 0x0FFD4, LENGTH = 2
+ VECT11 (w) : ORIGIN = 0x0FFD6, LENGTH = 2
+ VECT12 (w) : ORIGIN = 0x0FFD8, LENGTH = 2
+ VECT13 (w) : ORIGIN = 0x0FFDA, LENGTH = 2
+ VECT14 (w) : ORIGIN = 0x0FFDC, LENGTH = 2
+ VECT15 (w) : ORIGIN = 0x0FFDE, LENGTH = 2
+ VECT16 (w) : ORIGIN = 0x0FFE0, LENGTH = 2
+ VECT17 (w) : ORIGIN = 0x0FFE2, LENGTH = 2
+ VECT18 (w) : ORIGIN = 0x0FFE4, LENGTH = 2
+ VECT19 (w) : ORIGIN = 0x0FFE6, LENGTH = 2
+ VECT20 (w) : ORIGIN = 0x0FFE8, LENGTH = 2
+ VECT21 (w) : ORIGIN = 0x0FFEA, LENGTH = 2
+ VECT22 (w) : ORIGIN = 0x0FFEC, LENGTH = 2
+ VECT23 (w) : ORIGIN = 0x0FFEE, LENGTH = 2
+ VECT24 (w) : ORIGIN = 0x0FFF0, LENGTH = 2
+ VECT25 (w) : ORIGIN = 0x0FFF2, LENGTH = 2
+ VECT26 (w) : ORIGIN = 0x0FFF4, LENGTH = 2
+ VECT27 (w) : ORIGIN = 0x0FFF6, LENGTH = 2
+ VECT28 (w) : ORIGIN = 0x0FFF8, LENGTH = 2
+ VECT29 (w) : ORIGIN = 0x0FFFA, LENGTH = 2
+ VECT30 (w) : ORIGIN = 0x0FFFC, LENGTH = 2
+ VECT31 (w) : ORIGIN = 0x0FFFE, LENGTH = 2
+}
+
+SECTIONS
+{
+ __interrupt_vector_0 : { KEEP (*(__interrupt_vector_0)) } > VECT0
+ __interrupt_vector_1 : { KEEP (*(__interrupt_vector_1)) } > VECT1
+ __interrupt_vector_2 : { KEEP (*(__interrupt_vector_2)) } > VECT2
+ __interrupt_vector_3 : { KEEP (*(__interrupt_vector_3)) } > VECT3
+ __interrupt_vector_4 : { KEEP (*(__interrupt_vector_4)) } > VECT4
+ __interrupt_vector_5 : { KEEP (*(__interrupt_vector_5)) } > VECT5
+ __interrupt_vector_6 : { KEEP (*(__interrupt_vector_6)) } > VECT6
+ __interrupt_vector_7 : { KEEP (*(__interrupt_vector_7)) } > VECT7
+ __interrupt_vector_8 : { KEEP (*(__interrupt_vector_8)) } > VECT8
+ __interrupt_vector_9 : { KEEP (*(__interrupt_vector_9)) } > VECT9
+ __interrupt_vector_10 : { KEEP (*(__interrupt_vector_10)) } > VECT10
+ __interrupt_vector_11 : { KEEP (*(__interrupt_vector_11)) } > VECT11
+ __interrupt_vector_12 : { KEEP (*(__interrupt_vector_12)) } > VECT12
+ __interrupt_vector_13 : { KEEP (*(__interrupt_vector_13)) } > VECT13
+ __interrupt_vector_14 : { KEEP (*(__interrupt_vector_14)) } > VECT14
+ __interrupt_vector_15 : { KEEP (*(__interrupt_vector_15)) } > VECT15
+ __interrupt_vector_16 : { KEEP (*(__interrupt_vector_16)) } > VECT16
+ __interrupt_vector_17 : { KEEP (*(__interrupt_vector_17)) } > VECT17
+ __interrupt_vector_18 : { KEEP (*(__interrupt_vector_18)) } > VECT18
+ __interrupt_vector_19 : { KEEP (*(__interrupt_vector_19)) } > VECT19
+ __interrupt_vector_20 : { KEEP (*(__interrupt_vector_20)) } > VECT20
+ __interrupt_vector_21 : { KEEP (*(__interrupt_vector_21)) } > VECT21
+ __interrupt_vector_22 : { KEEP (*(__interrupt_vector_22)) } > VECT22
+ __interrupt_vector_23 : { KEEP (*(__interrupt_vector_23)) } > VECT23
+ __interrupt_vector_24 : { KEEP (*(__interrupt_vector_24)) } > VECT24
+ __interrupt_vector_25 : { KEEP (*(__interrupt_vector_25)) } > VECT25
+ __interrupt_vector_26 : { KEEP (*(__interrupt_vector_26)) KEEP (*(__interrupt_vector_watchdog)) } > VECT26
+ __interrupt_vector_27 : { KEEP (*(__interrupt_vector_27)) } > VECT27
+ __interrupt_vector_28 : { KEEP (*(__interrupt_vector_28)) } > VECT28
+ __interrupt_vector_29 : { KEEP (*(__interrupt_vector_29)) } > VECT29
+ __interrupt_vector_30 : { KEEP (*(__interrupt_vector_30)) KEEP (*(__interrupt_vector_nmi)) } > VECT30
+ __interrupt_vector_31 : { KEEP (*(__interrupt_vector_31)) KEEP (*(__interrupt_vector_reset)) KEEP (*(.resetvec)) } > VECT31
+}
diff --git a/libgloss/msp430/memmodel.h b/libgloss/msp430/memmodel.h
index 4804e17dd..a481460c6 100644
--- a/libgloss/msp430/memmodel.h
+++ b/libgloss/msp430/memmodel.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2012-2013 Red Hat, Inc. All rights reserved.
+/* Copyright (c) 2012-2015 Red Hat, Inc. All rights reserved.
This copyrighted material is made available to anyone wishing to use, modify,
copy, or redistribute it subject to the terms and conditions of the BSD
@@ -37,5 +37,30 @@
#define add_ ADD
#define PTRsz 2
-
#endif
+
+/* Start a function in its own named and numbered section, so that it
+ can be subject to linker garbage collection. The numbers are used
+ to enforce link-time ordering of the sections. Note - the construction
+ of the symbol names is critical - they need to match the unresolved
+ symbol references created by the compiler and assembler. */
+.macro START_CRT_FUNC number name
+ .section .crt_\number\name,"ax",@progbits
+ .global __crt0_\name
+ .type __crt0_\name , @function
+__crt0_\name:
+.endm
+
+
+/* End a named function. Sets the size so that GDB does not get confused. */
+.macro END_CRT_FUNC name
+ .size __crt0_\name, . - __crt0_\name
+.endm
+
+
+/* Provide a weak definition of NAME, initialized to zero. */
+.macro WEAK_DEF name
+ .global \name
+ .weak \name
+ \name = 0
+.endm
diff --git a/libgloss/msp430/msp430-sim.ld b/libgloss/msp430/msp430-sim.ld
index b01a35078..283127465 100644
--- a/libgloss/msp430/msp430-sim.ld
+++ b/libgloss/msp430/msp430-sim.ld
@@ -1,4 +1,4 @@
-/* Copyright (c) 2005,2008,2009,2011,2013 Red Hat, Inc. All rights reserved.
+/* Copyright (c) 2013-2015 Red Hat, Inc. All rights reserved.
This copyrighted material is made available to anyone wishing to use, modify,
copy, or redistribute it subject to the terms and conditions of the BSD
@@ -8,19 +8,18 @@
is available at http://www.opensource.org/licenses. Any Red Hat trademarks that
are incorporated in the source code or documentation are not subject to the BSD
License and may only be used or replicated with the express permission of
- Red Hat, Inc.
-*/
+ Red Hat, Inc. */
+
+/* Default linker script, for normal MSP430 executables. */
-/* Default linker script, for normal executables */
OUTPUT_ARCH(msp430)
ENTRY(_start)
-/* Do we need any of these for elf?
- __DYNAMIC = 0; */
+INCLUDE intr_vectors.ld
-MEMORY {
- RAM (w) : ORIGIN = 0x00200, LENGTH = 0x0ee00
- RESETVEC (w) : ORIGIN = 0x0fffe, LENGTH = 0x00002
+MEMORY
+{
+ RAM (w) : ORIGIN = 0x00500, LENGTH = 0x0eb00
}
SECTIONS
@@ -28,15 +27,21 @@ SECTIONS
.resetvec :
{
*(.resetvec)
- } > RESETVEC
+ } > VECT31
- .rodata : {
+ .rodata :
+ {
. = ALIGN(2);
*(.plt)
+ . = ALIGN(2);
+ *(.lower.rodata.* .lower.rodata)
+ . = ALIGN(2);
*(.rodata .rodata.* .gnu.linkonce.r.* .const .const:*)
+ . = ALIGN(2);
+ *(.either.rodata.* .either.rodata)
+ . = ALIGN(2);
*(.rodata1)
- *(.eh_frame_hdr)
- KEEP (*(.eh_frame))
+
KEEP (*(.gcc_except_table)) *(.gcc_except_table.*)
PROVIDE (__preinit_array_start = .);
KEEP (*(.preinit_array))
@@ -49,7 +54,18 @@ SECTIONS
KEEP (*(.fini_array))
KEEP (*(SORT(.fini_array.*)))
PROVIDE (__fini_array_end = .);
- LONG(0); /* Sentinel. */
+
+ } > RAM
+
+ /* Note: This is a separate .rodata section for sections which are
+ read only but which older linkers treat as read-write.
+ This prevents older linkers from marking the entire .rodata
+ section as read-write. */
+ .rodata2 :
+ {
+ . = ALIGN(2);
+ *(.eh_frame_hdr)
+ KEEP (*(.eh_frame))
/* gcc uses crtbegin.o to find the start of the constructors, so
we make sure it is first. Because this is a wildcard, it
@@ -73,11 +89,15 @@ SECTIONS
KEEP (*(.dtors))
} > RAM
- .text :
+ .text :
{
. = ALIGN(2);
PROVIDE (_start = .);
- *(.lowtext .text .stub .text.* .gnu.linkonce.t.* .text:*)
+ KEEP (*(SORT(.crt_*)))
+ *(.lowtext)
+ *(.lower.text.* .lower.text)
+ *(.text .stub .text.* .gnu.linkonce.t.* .text:*)
+ *(.either.text.* .either.text)
KEEP (*(.text.*personality*))
/* .gnu.warning sections are handled specially by elf32.em. */
*(.gnu.warning)
@@ -88,17 +108,24 @@ SECTIONS
. = ALIGN(2);
KEEP (*(.init))
KEEP (*(.fini))
+ KEEP (*(.tm_clone_table))
} > RAM
- .data : {
+ .data :
+ {
. = ALIGN(2);
PROVIDE (__datastart = .);
+ *(.lower.data.* .lower.data)
+
+ *(.data .data.* .gnu.linkonce.d.*)
+
+ *(.either.data.* .either.data)
+
KEEP (*(.jcr))
*(.data.rel.ro.local) *(.data.rel.ro*)
*(.dynamic)
- *(.data .data.* .gnu.linkonce.d.*)
KEEP (*(.gnu.linkonce.d.*personality*))
SORT(CONSTRUCTORS)
*(.data1)
@@ -121,30 +148,87 @@ SECTIONS
PROVIDE(__romdatastart = LOADADDR(.data));
PROVIDE (__romdatacopysize = SIZEOF(.data));
- .bss : {
+ .bss :
+ {
. = ALIGN(2);
PROVIDE (__bssstart = .);
+ *(.lower.bss.* .lower.bss)
*(.dynbss)
*(.sbss .sbss.*)
*(.bss .bss.* .gnu.linkonce.b.*)
+ *(.either.bss.* .either.bss)
. = ALIGN(2);
*(COMMON)
. = ALIGN(2);
PROVIDE (__bssend = .);
- _end = .;
- PROVIDE (end = .);
} > RAM
PROVIDE (__bsssize = SIZEOF(.bss));
+ /* This section contains data that is not initialised during load
+ *or* application reset. */
+ .noinit (NOLOAD) :
+ {
+ . = ALIGN(2);
+ PROVIDE (__noinit_start = .);
+ *(.noinit)
+ . = ALIGN(2);
+ PROVIDE (__noinit_end = .);
+ } > RAM
+
+ /* This section is intended to contain data that *is* initialised during load
+ but *not* on application reset. Normally the section would be stored in
+ FLASH RAM, but this is not available here. We just have to hope that the
+ programmer knows what they are doing. */
+ .persistent :
+ {
+ . = ALIGN(2);
+ PROVIDE (__persistent_start = .);
+ *(.persistent)
+ . = ALIGN(2);
+ PROVIDE (__persistent_end = .);
+ } > RAM
+
+ _end = .;
+ PROVIDE (end = .);
+
+ /* The __stack_size value of 0x100 is just a guess, but since it is
+ PROVIDEd the user can override it on the command line. It has to be
+ set here, rather than inside the .stack section, as symbols defined
+ inside sections are only evaluated during the final phase of the link,
+ long after the ASSERT is checked. An ASSERT referencing a PROVIDED but
+ not yet evaluated symbol will automatically fail.
+
+ FIXME: It would be nice if this value could be automatically set via
+ gcc's -fstack-usage command line option somehow. */
+ PROVIDE (__stack_size = 0x100);
+
.stack (ORIGIN (RAM) + LENGTH(RAM)) :
{
PROVIDE (__stack = .);
*(.stack)
+
+ /* Linker section checking ignores empty sections like
+ this one so we have to have our own test here. */
+ /* FIXME: This test is triggering erroneously. I have not figured
+ out why yet, but I am disabling it for now as it prevents the
+ gcc testsuite from working. */
+ /* ASSERT (__stack > (_end + __stack_size),
+ "Error: Too much data - no room left for the stack"); */
+ }
+
+ /* Make sure that .upper sections are not used without -mlarge support. */
+ .upper :
+ {
+ *(.upper.rodata.* .upper.rodata)
+ *(.upper.data.* .upper.data)
+ *(.upper.bss.* .upper.bss)
+ *(.upper.text.* .upper.text)
+ ASSERT (SIZEOF(.upper) == 0, "This MCU does not support high memory");
}
/* The rest are all not normally part of the runtime image. */
- .MP430.attributes 0 :
+ .MSP430.attributes 0 :
{
KEEP (*(.MSP430.attributes))
KEEP (*(.gnu.attributes))
@@ -162,29 +246,29 @@ SECTIONS
/* DWARF debug sections.
Symbols in the DWARF debugging sections are relative to the beginning
of the section so we begin them at 0. */
- /* DWARF 1 */
+ /* DWARF 1. */
.debug 0 : { *(.debug) }
.line 0 : { *(.line) }
- /* GNU DWARF 1 extensions */
+ /* GNU DWARF 1 extensions. */
.debug_srcinfo 0 : { *(.debug_srcinfo) }
.debug_sfnames 0 : { *(.debug_sfnames) }
- /* DWARF 1.1 and DWARF 2 */
+ /* DWARF 1.1 and DWARF 2. */
.debug_aranges 0 : { *(.debug_aranges) }
.debug_pubnames 0 : { *(.debug_pubnames) }
/* DWARF 2 */
.debug_info 0 : { *(.debug_info .gnu.linkonce.wi.*) }
.debug_abbrev 0 : { *(.debug_abbrev) }
- .debug_line 0 : { *(.debug_line) }
+ .debug_line 0 : { *(.debug_line .debug_line.* .debug_line_end ) }
.debug_frame 0 : { *(.debug_frame) }
.debug_str 0 : { *(.debug_str) }
.debug_loc 0 : { *(.debug_loc) }
.debug_macinfo 0 : { *(.debug_macinfo) }
- /* SGI/MIPS DWARF 2 extensions */
+ /* SGI/MIPS DWARF 2 extensions. */
.debug_weaknames 0 : { *(.debug_weaknames) }
.debug_funcnames 0 : { *(.debug_funcnames) }
.debug_typenames 0 : { *(.debug_typenames) }
.debug_varnames 0 : { *(.debug_varnames) }
- /* DWARF 3 */
+ /* DWARF 3. */
.debug_pubtypes 0 : { *(.debug_pubtypes) }
.debug_ranges 0 : { *(.debug_ranges) }
/* DWARF Extension. */
diff --git a/libgloss/msp430/msp430.ld b/libgloss/msp430/msp430.ld
deleted file mode 100644
index 26ed1cf96..000000000
--- a/libgloss/msp430/msp430.ld
+++ /dev/null
@@ -1,188 +0,0 @@
-/* Copyright (c) 2005,2008,2009,2011,2013 Red Hat, Inc. All rights reserved.
-
- This copyrighted material is made available to anyone wishing to use, modify,
- copy, or redistribute it subject to the terms and conditions of the BSD
- License. This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY expressed or implied, including the implied warranties
- of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. A copy of this license
- is available at http://www.opensource.org/licenses. Any Red Hat trademarks that
- are incorporated in the source code or documentation are not subject to the BSD
- License and may only be used or replicated with the express permission of
- Red Hat, Inc.
-*/
-
-/* Default linker script, for normal executables */
-OUTPUT_ARCH(msp430)
-ENTRY(_start)
-
-/* Do we need any of these for elf?
- __DYNAMIC = 0; */
-
-MEMORY {
- RAM (w) : ORIGIN = 0x00200, LENGTH = 0x0ee00
- RESETVEC (w) : ORIGIN = 0x0fffe, LENGTH = 0x00002
-}
-
-SECTIONS
-{
- .resetvec :
- {
- *(.resetvec)
- } > RESETVEC
-
- .rodata : {
- . = ALIGN(2);
- *(.plt)
- *(.rodata .rodata.* .gnu.linkonce.r.* .const .const:*)
- *(.rodata1)
- *(.eh_frame_hdr)
- KEEP (*(.eh_frame))
- KEEP (*(.gcc_except_table)) *(.gcc_except_table.*)
- PROVIDE (__preinit_array_start = .);
- KEEP (*(.preinit_array))
- PROVIDE (__preinit_array_end = .);
- PROVIDE (__init_array_start = .);
- KEEP (*(SORT(.init_array.*)))
- KEEP (*(.init_array))
- PROVIDE (__init_array_end = .);
- PROVIDE (__fini_array_start = .);
- KEEP (*(.fini_array))
- KEEP (*(SORT(.fini_array.*)))
- PROVIDE (__fini_array_end = .);
- LONG(0); /* Sentinel. */
-
- /* gcc uses crtbegin.o to find the start of the constructors, so
- we make sure it is first. Because this is a wildcard, it
- doesn't matter if the user does not actually link against
- crtbegin.o; the linker won't look for a file to match a
- wildcard. The wildcard also means that it doesn't matter which
- directory crtbegin.o is in. */
- KEEP (*crtbegin*.o(.ctors))
-
- /* We don't want to include the .ctor section from from the
- crtend.o file until after the sorted ctors. The .ctor section
- from the crtend file contains the end of ctors marker and it
- must be last */
- KEEP (*(EXCLUDE_FILE (*crtend*.o ) .ctors))
- KEEP (*(SORT(.ctors.*)))
- KEEP (*(.ctors))
-
- KEEP (*crtbegin*.o(.dtors))
- KEEP (*(EXCLUDE_FILE (*crtend*.o ) .dtors))
- KEEP (*(SORT(.dtors.*)))
- KEEP (*(.dtors))
- } > RAM
-
- .text :
- {
- . = ALIGN(2);
- PROVIDE (_start = .);
- *(.lowtext .text .stub .text.* .gnu.linkonce.t.* .text:*)
- KEEP (*(.text.*personality*))
- /* .gnu.warning sections are handled specially by elf32.em. */
- *(.gnu.warning)
- *(.interp .hash .dynsym .dynstr .gnu.version*)
- PROVIDE (__etext = .);
- PROVIDE (_etext = .);
- PROVIDE (etext = .);
- . = ALIGN(2);
- KEEP (*(.init))
- KEEP (*(.fini))
- } > RAM
-
- .data : {
- . = ALIGN(2);
- PROVIDE (__datastart = .);
-
- KEEP (*(.jcr))
- *(.data.rel.ro.local) *(.data.rel.ro*)
- *(.dynamic)
-
- *(.data .data.* .gnu.linkonce.d.*)
- KEEP (*(.gnu.linkonce.d.*personality*))
- SORT(CONSTRUCTORS)
- *(.data1)
- *(.got.plt) *(.got)
-
- /* We want the small data sections together, so single-instruction offsets
- can access them all, and initialized data all before uninitialized, so
- we can shorten the on-disk segment size. */
- . = ALIGN(2);
- *(.sdata .sdata.* .gnu.linkonce.s.* D_2 D_1)
-
- . = ALIGN(2);
- _edata = .;
- PROVIDE (edata = .);
- PROVIDE (__dataend = .);
- } > RAM
-
- /* Note that crt0 assumes this is a multiple of two; all the
- start/stop symbols are also assumed word-aligned. */
- PROVIDE(__romdatastart = LOADADDR(.data));
- PROVIDE (__romdatacopysize = SIZEOF(.data));
-
- .bss : {
- . = ALIGN(2);
- PROVIDE (__bssstart = .);
- *(.dynbss)
- *(.sbss .sbss.*)
- *(.bss .bss.* .gnu.linkonce.b.*)
- . = ALIGN(2);
- *(COMMON)
- . = ALIGN(2);
- PROVIDE (__bssend = .);
- _end = .;
- PROVIDE (end = .);
- } > RAM
- PROVIDE (__bsssize = SIZEOF(.bss));
-
- .stack (ORIGIN (RAM) + LENGTH(RAM)) :
- {
- PROVIDE (__stack = .);
- *(.stack)
- }
-
- .MP430.attributes 0 :
- {
- KEEP (*(.MSP430.attributes))
- KEEP (*(.gnu.attributes))
- KEEP (*(__TI_build_attributes))
- }
-
- /* The rest are all not normally part of the runtime image. */
-
- /* Stabs debugging sections. */
- .stab 0 : { *(.stab) }
- .stabstr 0 : { *(.stabstr) }
- .stab.excl 0 : { *(.stab.excl) }
- .stab.exclstr 0 : { *(.stab.exclstr) }
- .stab.index 0 : { *(.stab.index) }
- .stab.indexstr 0 : { *(.stab.indexstr) }
- .comment 0 : { *(.comment) }
- /* DWARF debug sections.
- Symbols in the DWARF debugging sections are relative to the beginning
- of the section so we begin them at 0. */
- /* DWARF 1 */
- .debug 0 : { *(.debug) }
- .line 0 : { *(.line) }
- /* GNU DWARF 1 extensions */
- .debug_srcinfo 0 : { *(.debug_srcinfo) }
- .debug_sfnames 0 : { *(.debug_sfnames) }
- /* DWARF 1.1 and DWARF 2 */
- .debug_aranges 0 : { *(.debug_aranges) }
- .debug_pubnames 0 : { *(.debug_pubnames) }
- /* DWARF 2 */
- .debug_info 0 : { *(.debug_info .gnu.linkonce.wi.*) }
- .debug_abbrev 0 : { *(.debug_abbrev) }
- .debug_line 0 : { *(.debug_line) }
- .debug_frame 0 : { *(.debug_frame) }
- .debug_str 0 : { *(.debug_str) }
- .debug_loc 0 : { *(.debug_loc) }
- .debug_macinfo 0 : { *(.debug_macinfo) }
- /* SGI/MIPS DWARF 2 extensions */
- .debug_weaknames 0 : { *(.debug_weaknames) }
- .debug_funcnames 0 : { *(.debug_funcnames) }
- .debug_typenames 0 : { *(.debug_typenames) }
- .debug_varnames 0 : { *(.debug_varnames) }
- /DISCARD/ : { *(.note.GNU-stack) }
-}
diff --git a/libgloss/msp430/msp430F5438A-l.ld b/libgloss/msp430/msp430F5438A-l.ld
deleted file mode 100644
index bfc527589..000000000
--- a/libgloss/msp430/msp430F5438A-l.ld
+++ /dev/null
@@ -1,203 +0,0 @@
-/* Copyright (c) 2013 Red Hat, Inc. All rights reserved.
-
- This copyrighted material is made available to anyone wishing to use, modify,
- copy, or redistribute it subject to the terms and conditions of the BSD
- License. This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY expressed or implied, including the implied warranties
- of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. A copy of this license
- is available at http://www.opensource.org/licenses. Any Red Hat trademarks that
- are incorporated in the source code or documentation are not subject to the BSD
- License and may only be used or replicated with the express permission of
- Red Hat, Inc.
-*/
-
-/* Default linker script, for normal executables */
-OUTPUT_ARCH(msp430)
-ENTRY(_start)
-
-/* Do we need any of these for elf?
- __DYNAMIC = 0; */
-
-MEMORY {
- RAM (w) : ORIGIN = 0x01c00, LENGTH = 0x04000
- LOWROM (w) : ORIGIN = 0x05c00, LENGTH = 0x0a3fe
- RESETVEC (w) : ORIGIN = 0x0fffe, LENGTH = 0x00002
- ROM (w) : ORIGIN = 0x10000, LENGTH = 0x35c00
-}
-
-SECTIONS
-{
- .resetvec :
- {
- *(.resetvec)
- } > RESETVEC
-
- .rodata : {
- . = ALIGN(2);
- *(.plt)
- *(.rodata .rodata.* .gnu.linkonce.r.* .const .const:*)
- *(.rodata1)
- *(.eh_frame_hdr)
- KEEP (*(.eh_frame))
- KEEP (*(.gcc_except_table)) *(.gcc_except_table.*)
- PROVIDE (__preinit_array_start = .);
- KEEP (*(.preinit_array))
- PROVIDE (__preinit_array_end = .);
- PROVIDE (__init_array_start = .);
- KEEP (*(SORT(.init_array.*)))
- KEEP (*(.init_array))
- PROVIDE (__init_array_end = .);
- PROVIDE (__fini_array_start = .);
- KEEP (*(.fini_array))
- KEEP (*(SORT(.fini_array.*)))
- PROVIDE (__fini_array_end = .);
- LONG(0); /* Sentinel. */
-
- /* gcc uses crtbegin.o to find the start of the constructors, so
- we make sure it is first. Because this is a wildcard, it
- doesn't matter if the user does not actually link against
- crtbegin.o; the linker won't look for a file to match a
- wildcard. The wildcard also means that it doesn't matter which
- directory crtbegin.o is in. */
- KEEP (*crtbegin*.o(.ctors))
-
- /* We don't want to include the .ctor section from from the
- crtend.o file until after the sorted ctors. The .ctor section
- from the crtend file contains the end of ctors marker and it
- must be last */
- KEEP (*(EXCLUDE_FILE (*crtend*.o ) .ctors))
- KEEP (*(SORT(.ctors.*)))
- KEEP (*(.ctors))
-
- KEEP (*crtbegin*.o(.dtors))
- KEEP (*(EXCLUDE_FILE (*crtend*.o ) .dtors))
- KEEP (*(SORT(.dtors.*)))
- KEEP (*(.dtors))
- } > ROM
-
- .data : {
- . = ALIGN(2);
- PROVIDE (__datastart = .);
-
- KEEP (*(.jcr))
- *(.data.rel.ro.local) *(.data.rel.ro*)
- *(.dynamic)
-
- *(.data .data.* .gnu.linkonce.d.*)
- KEEP (*(.gnu.linkonce.d.*personality*))
- SORT(CONSTRUCTORS)
- *(.data1)
- *(.got.plt) *(.got)
-
- /* We want the small data sections together, so single-instruction offsets
- can access them all, and initialized data all before uninitialized, so
- we can shorten the on-disk segment size. */
- . = ALIGN(2);
- *(.sdata .sdata.* .gnu.linkonce.s.* D_2 D_1)
-
- . = ALIGN(2);
- _edata = .;
- PROVIDE (edata = .);
- PROVIDE (__dataend = .);
- } > RAM AT>ROM
-
- /* Note that crt0 assumes this is a multiple of two; all the
- start/stop symbols are also assumed word-aligned. */
- PROVIDE(__romdatastart = LOADADDR(.data));
- PROVIDE (__romdatacopysize = SIZEOF(.data));
-
- .bss : {
- . = ALIGN(2);
- PROVIDE (__bssstart = .);
- *(.dynbss)
- *(.sbss .sbss.*)
- *(.bss .bss.* .gnu.linkonce.b.*)
- . = ALIGN(2);
- *(COMMON)
- . = ALIGN(2);
- PROVIDE (__bssend = .);
- _end = .;
- PROVIDE (end = .);
- } > RAM
- PROVIDE (__bsssize = SIZEOF(.bss));
-
- .stack (ORIGIN (RAM) + LENGTH(RAM)) :
- {
- PROVIDE (__stack = .);
- *(.stack)
- }
-
- /* This is just for crt0.S */
- .lowtext :
- {
- PROVIDE (_start = .);
- . = ALIGN(2);
- *(.lowtext)
- } > LOWROM
-
- .text :
- {
- . = ALIGN(2);
- *(.text .stub .text.* .gnu.linkonce.t.* .text:*)
- KEEP (*(.text.*personality*))
- /* .gnu.warning sections are handled specially by elf32.em. */
- *(.gnu.warning)
- *(.interp .hash .dynsym .dynstr .gnu.version*)
- PROVIDE (__etext = .);
- PROVIDE (_etext = .);
- PROVIDE (etext = .);
- . = ALIGN(2);
- KEEP (*(.init))
- KEEP (*(.fini))
- } > ROM
-
- /* The rest are all not normally part of the runtime image. */
-
- .MP430.attributes 0 :
- {
- KEEP (*(.MSP430.attributes))
- KEEP (*(.gnu.attributes))
- KEEP (*(__TI_build_attributes))
- }
-
- /* Stabs debugging sections. */
- .stab 0 : { *(.stab) }
- .stabstr 0 : { *(.stabstr) }
- .stab.excl 0 : { *(.stab.excl) }
- .stab.exclstr 0 : { *(.stab.exclstr) }
- .stab.index 0 : { *(.stab.index) }
- .stab.indexstr 0 : { *(.stab.indexstr) }
- .comment 0 : { *(.comment) }
- /* DWARF debug sections.
- Symbols in the DWARF debugging sections are relative to the beginning
- of the section so we begin them at 0. */
- /* DWARF 1 */
- .debug 0 : { *(.debug) }
- .line 0 : { *(.line) }
- /* GNU DWARF 1 extensions */
- .debug_srcinfo 0 : { *(.debug_srcinfo) }
- .debug_sfnames 0 : { *(.debug_sfnames) }
- /* DWARF 1.1 and DWARF 2 */
- .debug_aranges 0 : { *(.debug_aranges) }
- .debug_pubnames 0 : { *(.debug_pubnames) }
- /* DWARF 2 */
- .debug_info 0 : { *(.debug_info .gnu.linkonce.wi.*) }
- .debug_abbrev 0 : { *(.debug_abbrev) }
- .debug_line 0 : { *(.debug_line) }
- .debug_frame 0 : { *(.debug_frame) }
- .debug_str 0 : { *(.debug_str) }
- .debug_loc 0 : { *(.debug_loc) }
- .debug_macinfo 0 : { *(.debug_macinfo) }
- /* SGI/MIPS DWARF 2 extensions */
- .debug_weaknames 0 : { *(.debug_weaknames) }
- .debug_funcnames 0 : { *(.debug_funcnames) }
- .debug_typenames 0 : { *(.debug_typenames) }
- .debug_varnames 0 : { *(.debug_varnames) }
- /* DWARF 3 */
- .debug_pubtypes 0 : { *(.debug_pubtypes) }
- .debug_ranges 0 : { *(.debug_ranges) }
- /* DWARF Extension. */
- .debug_macro 0 : { *(.debug_macro) }
-
- /DISCARD/ : { *(.note.GNU-stack) }
-}
diff --git a/libgloss/msp430/msp430F5438A-s.ld b/libgloss/msp430/msp430F5438A-s.ld
deleted file mode 100644
index bbe6d752f..000000000
--- a/libgloss/msp430/msp430F5438A-s.ld
+++ /dev/null
@@ -1,189 +0,0 @@
-/* Copyright (c) 2005,2008,2009,2011,2013 Red Hat, Inc. All rights reserved.
-
- This copyrighted material is made available to anyone wishing to use, modify,
- copy, or redistribute it subject to the terms and conditions of the BSD
- License. This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY expressed or implied, including the implied warranties
- of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. A copy of this license
- is available at http://www.opensource.org/licenses. Any Red Hat trademarks that
- are incorporated in the source code or documentation are not subject to the BSD
- License and may only be used or replicated with the express permission of
- Red Hat, Inc.
-*/
-
-/* Default linker script, for normal executables */
-OUTPUT_ARCH(msp430)
-ENTRY(_start)
-
-/* Do we need any of these for elf?
- __DYNAMIC = 0; */
-
-MEMORY {
- RAM (w) : ORIGIN = 0x01c00, LENGTH = 0x04000
- ROM (w) : ORIGIN = 0x05c00, LENGTH = 0x0a3fe
- RESETVEC (w) : ORIGIN = 0x0fffe, LENGTH = 0x00002
-}
-
-SECTIONS
-{
- .resetvec :
- {
- *(.resetvec)
- } > RESETVEC
-
- .rodata : {
- . = ALIGN(2);
- *(.plt)
- *(.rodata .rodata.* .gnu.linkonce.r.* .const .const:*)
- *(.rodata1)
- *(.eh_frame_hdr)
- KEEP (*(.eh_frame))
- KEEP (*(.gcc_except_table)) *(.gcc_except_table.*)
- PROVIDE (__preinit_array_start = .);
- KEEP (*(.preinit_array))
- PROVIDE (__preinit_array_end = .);
- PROVIDE (__init_array_start = .);
- KEEP (*(SORT(.init_array.*)))
- KEEP (*(.init_array))
- PROVIDE (__init_array_end = .);
- PROVIDE (__fini_array_start = .);
- KEEP (*(.fini_array))
- KEEP (*(SORT(.fini_array.*)))
- PROVIDE (__fini_array_end = .);
- LONG(0); /* Sentinel. */
-
- /* gcc uses crtbegin.o to find the start of the constructors, so
- we make sure it is first. Because this is a wildcard, it
- doesn't matter if the user does not actually link against
- crtbegin.o; the linker won't look for a file to match a
- wildcard. The wildcard also means that it doesn't matter which
- directory crtbegin.o is in. */
- KEEP (*crtbegin*.o(.ctors))
-
- /* We don't want to include the .ctor section from from the
- crtend.o file until after the sorted ctors. The .ctor section
- from the crtend file contains the end of ctors marker and it
- must be last */
- KEEP (*(EXCLUDE_FILE (*crtend*.o ) .ctors))
- KEEP (*(SORT(.ctors.*)))
- KEEP (*(.ctors))
-
- KEEP (*crtbegin*.o(.dtors))
- KEEP (*(EXCLUDE_FILE (*crtend*.o ) .dtors))
- KEEP (*(SORT(.dtors.*)))
- KEEP (*(.dtors))
- } > ROM
-
- .text :
- {
- . = ALIGN(2);
- PROVIDE (_start = .);
- *(.lowtext .text .stub .text.* .gnu.linkonce.t.* .text:*)
- KEEP (*(.text.*personality*))
- /* .gnu.warning sections are handled specially by elf32.em. */
- *(.gnu.warning)
- *(.interp .hash .dynsym .dynstr .gnu.version*)
- PROVIDE (__etext = .);
- PROVIDE (_etext = .);
- PROVIDE (etext = .);
- . = ALIGN(2);
- KEEP (*(.init))
- KEEP (*(.fini))
- } > ROM
-
- .data : {
- . = ALIGN(2);
- PROVIDE (__datastart = .);
-
- KEEP (*(.jcr))
- *(.data.rel.ro.local) *(.data.rel.ro*)
- *(.dynamic)
-
- *(.data .data.* .gnu.linkonce.d.*)
- KEEP (*(.gnu.linkonce.d.*personality*))
- SORT(CONSTRUCTORS)
- *(.data1)
- *(.got.plt) *(.got)
-
- /* We want the small data sections together, so single-instruction offsets
- can access them all, and initialized data all before uninitialized, so
- we can shorten the on-disk segment size. */
- . = ALIGN(2);
- *(.sdata .sdata.* .gnu.linkonce.s.* D_2 D_1)
-
- . = ALIGN(2);
- _edata = .;
- PROVIDE (edata = .);
- PROVIDE (__dataend = .);
- } > RAM AT>ROM
-
- /* Note that crt0 assumes this is a multiple of two; all the
- start/stop symbols are also assumed word-aligned. */
- PROVIDE(__romdatastart = LOADADDR(.data));
- PROVIDE (__romdatacopysize = SIZEOF(.data));
-
- .bss : {
- . = ALIGN(2);
- PROVIDE (__bssstart = .);
- *(.dynbss)
- *(.sbss .sbss.*)
- *(.bss .bss.* .gnu.linkonce.b.*)
- . = ALIGN(2);
- *(COMMON)
- . = ALIGN(2);
- PROVIDE (__bssend = .);
- _end = .;
- PROVIDE (end = .);
- } > RAM
- PROVIDE (__bsssize = SIZEOF(.bss));
-
- .stack (ORIGIN (RAM) + LENGTH(RAM)) :
- {
- PROVIDE (__stack = .);
- *(.stack)
- }
-
- .MP430.attributes 0 :
- {
- KEEP (*(.MSP430.attributes))
- KEEP (*(.gnu.attributes))
- KEEP (*(__TI_build_attributes))
- }
-
- /* The rest are all not normally part of the runtime image. */
-
- /* Stabs debugging sections. */
- .stab 0 : { *(.stab) }
- .stabstr 0 : { *(.stabstr) }
- .stab.excl 0 : { *(.stab.excl) }
- .stab.exclstr 0 : { *(.stab.exclstr) }
- .stab.index 0 : { *(.stab.index) }
- .stab.indexstr 0 : { *(.stab.indexstr) }
- .comment 0 : { *(.comment) }
- /* DWARF debug sections.
- Symbols in the DWARF debugging sections are relative to the beginning
- of the section so we begin them at 0. */
- /* DWARF 1 */
- .debug 0 : { *(.debug) }
- .line 0 : { *(.line) }
- /* GNU DWARF 1 extensions */
- .debug_srcinfo 0 : { *(.debug_srcinfo) }
- .debug_sfnames 0 : { *(.debug_sfnames) }
- /* DWARF 1.1 and DWARF 2 */
- .debug_aranges 0 : { *(.debug_aranges) }
- .debug_pubnames 0 : { *(.debug_pubnames) }
- /* DWARF 2 */
- .debug_info 0 : { *(.debug_info .gnu.linkonce.wi.*) }
- .debug_abbrev 0 : { *(.debug_abbrev) }
- .debug_line 0 : { *(.debug_line) }
- .debug_frame 0 : { *(.debug_frame) }
- .debug_str 0 : { *(.debug_str) }
- .debug_loc 0 : { *(.debug_loc) }
- .debug_macinfo 0 : { *(.debug_macinfo) }
- /* SGI/MIPS DWARF 2 extensions */
- .debug_weaknames 0 : { *(.debug_weaknames) }
- .debug_funcnames 0 : { *(.debug_funcnames) }
- .debug_typenames 0 : { *(.debug_typenames) }
- .debug_varnames 0 : { *(.debug_varnames) }
- /DISCARD/ : { *(.note.GNU-stack) }
-}
diff --git a/libgloss/msp430/msp430xl-sim.ld b/libgloss/msp430/msp430xl-sim.ld
index 14ba083b7..cc451b853 100644
--- a/libgloss/msp430/msp430xl-sim.ld
+++ b/libgloss/msp430/msp430xl-sim.ld
@@ -1,29 +1,35 @@
-/* Copyright (c) 2013 Red Hat, Inc. All rights reserved.
+/* Copyright (c) 2013-2015 Red Hat, Inc. All rights reserved.
- This copyrighted material is made available to anyone wishing to use, modify,
- copy, or redistribute it subject to the terms and conditions of the BSD
- License. This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY expressed or implied, including the implied warranties
- of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. A copy of this license
- is available at http://www.opensource.org/licenses. Any Red Hat trademarks that
- are incorporated in the source code or documentation are not subject to the BSD
- License and may only be used or replicated with the express permission of
- Red Hat, Inc.
+ This copyrighted material is made available to anyone wishing to use,
+ modify, copy, or redistribute it subject to the terms and conditions of
+ the BSD License. This program is distributed in the hope that it will be
+ useful, but WITHOUT ANY WARRANTY expressed or implied, including the
+ implied warranties of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ A copy of this license is available at http://www.opensource.org/licenses.
-*/
+ Any Red Hat trademarks that are incorporated in the source code or
+ documentation are not subject to the BSD License and may only be used or
+ replicated with the express permission of Red Hat, Inc. */
+
+/* Example linker script, for large MSP430X executables. */
-/* Default linker script, for normal executables */
OUTPUT_ARCH(msp430)
ENTRY(_start)
-/* Do we need any of these for elf?
- __DYNAMIC = 0; */
+INCLUDE intr_vectors.ld
-MEMORY {
- RAM (rx) : ORIGIN = 0x00200, LENGTH = 0x0ee00
- LOWROM (w) : ORIGIN = 0x0f000, LENGTH = 0x00800
- ROM (w) : ORIGIN = 0x10000, LENGTH = 0x80000
- RESETVEC (w) : ORIGIN = 0x0fffe, LENGTH = 0x00002
+/* Note - These memory regions are just examples. Real MSP430 MCUs will have
+ different varieties and sizes of RAM, ROM and FLASH. Not all devices will
+ have all of these regions either. Device specific linker scripts are
+ provided by TI, so this file is intended to be used as a guide and so that
+ toolchain tests can be run against the simulator. */
+MEMORY
+{
+ RAM (rw) : ORIGIN = 0x00500, LENGTH = 0x01b00
+ ROM (rx) : ORIGIN = 0x02000, LENGTH = 0x0df00
+ /* The regions from intr_vectors.ld go here. */
+ HIFRAM (rw) : ORIGIN = 0x10000, LENGTH = 0x80000
+ HIROM (rx) : ORIGIN = 0x90000, LENGTH = 0x70000
}
SECTIONS
@@ -31,15 +37,36 @@ SECTIONS
.resetvec :
{
*(.resetvec)
- } > RESETVEC
+ } > VECT31
- .rodata : {
+ .rodata :
+ {
. = ALIGN(2);
*(.plt)
+
+ . = ALIGN(2);
+ *(.lower.rodata.* .lower.rodata)
+
+ /* Note: By default we do not have this line:
+
+ *(.either.rodata.*) *(.either.rodata)
+
+ defined here, or anywhere else in this script. This is deliberate.
+ The algorithm in the linker that automatically places rodata into
+ either the .rodata or the .upper.rodata sections relies upon the
+ fact that the .either.rodata section is not defined, and that the
+ .upper.rodata section is defined. If the .upper.rodata is not
+ defined in this script then the line above should be restored so that
+ code compiled with -mdata-region=either enabled will still work.
+
+ The same reasoning applies to the absence of definitions for the
+ .either.text, .either.data and .either.bss sections as well. */
+
+ . = ALIGN(2);
*(.rodata .rodata.* .gnu.linkonce.r.* .const .const:*)
*(.rodata1)
- *(.eh_frame_hdr)
- KEEP (*(.eh_frame))
+
+ . = ALIGN(2);
KEEP (*(.gcc_except_table)) *(.gcc_except_table.*)
PROVIDE (__preinit_array_start = .);
KEEP (*(.preinit_array))
@@ -52,7 +79,17 @@ SECTIONS
KEEP (*(.fini_array))
KEEP (*(SORT(.fini_array.*)))
PROVIDE (__fini_array_end = .);
- LONG(0); /* Sentinel. */
+
+ } > ROM
+
+ /* Note: This is a separate .rodata section for sections which are
+ read only but which older linkers treat as read-write.
+ This prevents older linkers from marking the entire .rodata
+ section as read-write. */
+ .rodata2 : {
+ . = ALIGN(2);
+ *(.eh_frame_hdr)
+ KEEP (*(.eh_frame))
/* gcc uses crtbegin.o to find the start of the constructors, so
we make sure it is first. Because this is a wildcard, it
@@ -76,15 +113,39 @@ SECTIONS
KEEP (*(.dtors))
} > ROM
- .data : {
+ .upper.rodata :
+ {
+ /* Note: If this section is not defined then please add:
+
+ *(.either.rodata.*) *(.either.rodata)
+
+ to the definition of the .rodata section above. This
+ will allow code compiled with -mdata-region=either to
+ work properly. */
+
+ . = ALIGN(2);
+ *(.upper.rodata.* .upper.rodata)
+ } > HIROM
+
+ .data :
+ {
. = ALIGN(2);
PROVIDE (__datastart = .);
+ *(.lower.data.* .lower.data)
+ . = ALIGN(2);
KEEP (*(.jcr))
*(.data.rel.ro.local) *(.data.rel.ro*)
*(.dynamic)
+ . = ALIGN(2);
*(.data .data.* .gnu.linkonce.d.*)
+
+ /* See the note in .rodata section about why we do not have this line here:
+
+ *(.either.data.* .either.data)
+ */
+
KEEP (*(.gnu.linkonce.d.*personality*))
SORT(CONSTRUCTORS)
*(.data1)
@@ -100,45 +161,224 @@ SECTIONS
_edata = .;
PROVIDE (edata = .);
PROVIDE (__dataend = .);
- } > RAM AT>ROM
- /* Note that crt0 assumes this is a multiple of two; all the
- start/stop symbols are also assumed word-aligned. */
- PROVIDE(__romdatastart = LOADADDR(.data));
- PROVIDE (__romdatacopysize = SIZEOF(.data));
+ /* See the comment in the .upper.data section about the need
+ to copy data from ROM into RAM at program start up. */
+ } > RAM AT> ROM
+
+ /* Note that crt0 assumes that __romdatacopysize is a multiple of two.
+ All the start/stop symbols are also assumed to be word-aligned. */
+ __romdatastart = LOADADDR(.data);
+ __romdatacopysize = SIZEOF(.data);
+
+ /* ------------------- start of .upper.data sections.---------------- */
+ /* Note: If both HIROM and HIFRAM are available then the .upper.data
+ section should look like this:
+
+ . = ALIGN(2);
+ .upper.data :
+ {
+ __upper_data_init = LOADADDR (.upper.data);
+ /* Status word. * /
+ SHORT(1);
+ __high_datastart = .;
+ *(.upper.data.* .upper.data)
+ __high_dataend = .;
+ } > HIFRAM AT> HIROM
+
+ __rom_highdatacopysize = SIZEOF(.upper.data) - 2;
+ __rom_highdatastart = LOADADDR(.upper.data) + 2;
+
+ If only HIFRAM is available then the layout below must look like this:
+
+ .upper.data :
+ {
+ . = ALIGN(2);
+ __high_datastart = .;
+ *(.upper.data.* .upper.data)
+ __high_dataend = .;
+ } > HIFRAM
+
+ __rom_highdatacopysize = SIZEOF(.upper.data);
+
+ .shadow.upper.data :
+ {
+ . = ALIGN(2);
+ __upper_data_init = .;
+ /* Status word. * /
+ SHORT(0);
+ /* Space for the copy of .upper.data. * /
+ . = . + SIZEOF(.upper.data) - 2;
+ } > HIFRAM
+
+ __rom_highdatastart = LOADADDR(.shadow.upper.data) + 2;
+
+ Note - remove the space in this sequence: * / (twice) when you copy one
+ of the script fragments above into your script.
+
+ Note - the symbols defined here are *not* enclosed by the PROVIDE
+ keyword. This is deliberate. The crt0 library provides weak
+ definitions of these symbols and those weak definitions *must* be
+ overriden by the correct values.
+
+ The status word is used to control how the .upper.data section
+ is initialized at application start up. If the word is non-zero
+ then data is copied from __rom_highdatastart to __high_datastart.
+ This corresponds with copying the contents of .upper.data from its
+ load address (HIROM) to its run-time address (HIFRAM) in the first
+ scenario, or from the .shadow.upper.section to the .upper.data in
+ the second scenario.
+
+ If the status word is zero then the data is copied the other way
+ and the word is set to one. This only happens when the second
+ scenario is in play, and only the very first time the application
+ starts running. This makes sure that the .shadow.upper.data section
+ contains a pristine copy of the .upper.data section that can be used
+ to reinitialize the .upper.data section upon device reset.
- .bss : {
+ The status word is necessary as this allows us to have one routine
+ in crt0 that can handle either form of .upper.data layout. IE crt0
+ is linker script agnostic.
+
+ Note - if the .upper.data section is not going to be defined at all
+ then please add this line back into the .data section above:
+
+ *(.either.data.* .either.data)
+ */
+
+ . = ALIGN(2);
+ .upper.data :
+ {
+ __upper_data_init = LOADADDR (.upper.data);
+ /* Status word. */
+ SHORT(1);
+ __high_datastart = .;
+ *(.upper.data.* .upper.data)
+ __high_dataend = .;
+ } > HIFRAM AT> HIROM
+
+ __rom_highdatacopysize = SIZEOF(.upper.data) - 2;
+ __rom_highdatastart = LOADADDR(.upper.data) + 2;
+
+ /* ------------------- end of .upper.data sections.---------------- */
+
+ .bss :
+ {
. = ALIGN(2);
PROVIDE (__bssstart = .);
+ *(.lower.bss.* .lower.bss)
*(.dynbss)
*(.sbss .sbss.*)
*(.bss .bss.* .gnu.linkonce.b.*)
+ /* See the note in .rodata section about why we do not have this line here:
+
+ *(.either.bss.* .either.bss)
+ */
. = ALIGN(2);
*(COMMON)
. = ALIGN(2);
PROVIDE (__bssend = .);
- _end = .;
- PROVIDE (end = .);
} > RAM
PROVIDE (__bsssize = SIZEOF(.bss));
- .stack (ORIGIN (RAM) + LENGTH(RAM)) :
+ /* This section contains data that is not initialised during load
+ *or* application reset. */
+ .noinit (NOLOAD) :
+ {
+ . = ALIGN(2);
+ PROVIDE (__noinit_start = .);
+ *(.noinit)
+ . = ALIGN(2);
+ PROVIDE (__noinit_end = .);
+ } > RAM
+
+ /* This section contains data that *is* initialised during load
+ but *not* on application reset. This section should be in FLASH. */
+ .persistent :
+ {
+ . = ALIGN(2);
+ PROVIDE (__persistent_start = .);
+ *(.persistent)
+ . = ALIGN(2);
+ PROVIDE (__persistent_end = .);
+ } > HIFRAM
+
+ .upper.bss :
+ {
+ /* Note - if this section is not going to be defined then please
+ add this line back into the definition of the .bss section above:
+
+ *(.either.bss.* .either.bss)
+ */
+ . = ALIGN(2);
+ __high_bssstart = .;
+ *(.upper.bss.* .upper.bss)
+ . = ALIGN(2);
+ __high_bssend = .;
+ } > HIFRAM
+ __high_bsssize = SIZEOF(.upper.bss);
+
+ /* We create this section so that "end" will always be in the
+ HIFRAM region (matching .stack below), even if the .upper.bss
+ section is empty. */
+ .heap_start :
+ {
+ . = ALIGN(2);
+ _end = .;
+ PROVIDE (end = .);
+ LONG(0);
+ } > HIFRAM
+
+ /* The __stack_size value of 0x100 is just a guess, but since it is
+ PROVIDEd the user can override it on the command line. It has to be
+ set here, rather than inside the .stack section, as symbols defined
+ inside sections are only evaluated during the final phase of the link,
+ long after the ASSERT is checked. An ASSERT referencing a PROVIDED but
+ not yet evaluated symbol will automatically fail.
+
+ FIXME: It would be nice if this value could be automatically set via
+ gcc's -fstack-usage command line option somehow. */
+ PROVIDE (__stack_size = 0x100);
+
+ /* Note: We place the stack in HIFRAM because then there is less
+ chance that it will collide with allocated data in the RAM region.
+ In scripts targeted at real MCUs however it may be better to place
+ the stack and heap in RAM, as flash does have a limited number of
+ writes before failure.
+
+ Note - if the location of .stack is changed, then be sure to change
+ the definition of .heap_start above as well. */
+ .stack (ORIGIN (HIFRAM) + LENGTH (HIFRAM)) :
{
PROVIDE (__stack = .);
- *(.stack)
+
+ /* Linker section checking ignores empty sections like
+ this one so we have to have our own test here. */
+ ASSERT ((__stack > (_end + __stack_size)),
+ "Error: Too much data - no room left for the stack");
}
- /* This is just for crt0.S */
- .lowtext :
+ .text :
{
PROVIDE (_start = .);
+
. = ALIGN(2);
- *(.lowtext)
- } > LOWROM
- .text :
- {
+ KEEP (*(SORT(.crt_*)))
+
+ . = ALIGN(2);
+ KEEP (*(.lowtext))
+
+ . = ALIGN(2);
+ *(.lower.text.* .lower.text)
+
. = ALIGN(2);
*(.text .stub .text.* .gnu.linkonce.t.* .text:*)
+
+ /* See the note in .rodata section about why we do not have this line here:
+
+ *(.either.text.* .either.text)
+ */
+
KEEP (*(.text.*personality*))
/* .gnu.warning sections are handled specially by elf32.em. */
*(.gnu.warning)
@@ -149,11 +389,24 @@ SECTIONS
. = ALIGN(2);
KEEP (*(.init))
KEEP (*(.fini))
+ KEEP (*(.tm_clone_table))
} > ROM
+ .upper.text :
+ {
+ /* Note - if this section is not going to be included in the script
+ then please add this line back into the definition of the .text
+ section above:
+
+ *(.either.text.* .either.text)
+ */
+ . = ALIGN(2);
+ *(.upper.text.* .upper.text)
+ } > HIROM
+
/* The rest are all not normally part of the runtime image. */
- .MP430.attributes 0 :
+ .MSP430.attributes 0 :
{
KEEP (*(.MSP430.attributes))
KEEP (*(.gnu.attributes))
@@ -171,24 +424,24 @@ SECTIONS
/* DWARF debug sections.
Symbols in the DWARF debugging sections are relative to the beginning
of the section so we begin them at 0. */
- /* DWARF 1 */
+ /* DWARF 1. */
.debug 0 : { *(.debug) }
.line 0 : { *(.line) }
- /* GNU DWARF 1 extensions */
+ /* GNU DWARF 1 extensions. */
.debug_srcinfo 0 : { *(.debug_srcinfo) }
.debug_sfnames 0 : { *(.debug_sfnames) }
- /* DWARF 1.1 and DWARF 2 */
+ /* DWARF 1.1 and DWARF 2. */
.debug_aranges 0 : { *(.debug_aranges) }
.debug_pubnames 0 : { *(.debug_pubnames) }
- /* DWARF 2 */
+ /* DWARF 2. */
.debug_info 0 : { *(.debug_info .gnu.linkonce.wi.*) }
.debug_abbrev 0 : { *(.debug_abbrev) }
- .debug_line 0 : { *(.debug_line) }
+ .debug_line 0 : { *(.debug_line .debug_line.* .debug_line_end ) }
.debug_frame 0 : { *(.debug_frame) }
.debug_str 0 : { *(.debug_str) }
.debug_loc 0 : { *(.debug_loc) }
.debug_macinfo 0 : { *(.debug_macinfo) }
- /* SGI/MIPS DWARF 2 extensions */
+ /* SGI/MIPS DWARF 2 extensions. */
.debug_weaknames 0 : { *(.debug_weaknames) }
.debug_funcnames 0 : { *(.debug_funcnames) }
.debug_typenames 0 : { *(.debug_typenames) }
diff --git a/libgloss/msp430/syscalls.S b/libgloss/msp430/syscalls.S
index 8aa22ae8a..accd20496 100644
--- a/libgloss/msp430/syscalls.S
+++ b/libgloss/msp430/syscalls.S
@@ -64,3 +64,10 @@ _isatty:
getpid:
MOV #42,R12
ret_
+
+ .weak gettimeofday
+ .global gettimeofday
+gettimeofday:
+ MOV #0,R12
+ ret_
+ .size gettimeofday , . - gettimeofday
diff --git a/libgloss/msp430/unlink.c b/libgloss/msp430/unlink.c
new file mode 100644
index 000000000..1c8c6f233
--- /dev/null
+++ b/libgloss/msp430/unlink.c
@@ -0,0 +1,25 @@
+#include <string.h>
+
+#include "cio.h"
+
+signed int
+unlink (const char * name)
+{
+ unsigned len = strlen (name);
+
+ if (len >= CIO_BUF_SIZE)
+ return -1;
+
+ __CIOBUF__.length[0] = len;
+ __CIOBUF__.length[1] = len >> 8;
+ __CIOBUF__.parms[0] = CIO_UNLINK;
+ __CIOBUF__.parms[1] = len;
+ __CIOBUF__.parms[2] = len >> 8;
+ memcpy (__CIOBUF__.buf, name, len);
+
+ _libgloss_cio_hook ();
+
+ return __CIOBUF__.parms[0] + __CIOBUF__.parms[1] * 256;
+}
+
+
diff --git a/libgloss/mt/Makefile.in b/libgloss/mt/Makefile.in
index 031c864ba..d74f6c550 100644
--- a/libgloss/mt/Makefile.in
+++ b/libgloss/mt/Makefile.in
@@ -103,11 +103,11 @@ trap.o: $(srcdir)/trap.S
install: $($(CPU)_INSTALL)
for c in $(CRT0); do \
- $(INSTALL_DATA) $$c $(tooldir)/lib${MULTISUBDIR}/$$c ; \
+ $(INSTALL_DATA) $$c $(DESTDIR)$(tooldir)/lib${MULTISUBDIR}/$$c ; \
done;
- $(INSTALL_DATA) $(SIM_BSP) $(tooldir)/lib${MULTISUBDIR}/$(SIM_BSP)
+ $(INSTALL_DATA) $(SIM_BSP) $(DESTDIR)$(tooldir)/lib${MULTISUBDIR}/$(SIM_BSP)
for c in $(SCRIPTS); do \
- $(INSTALL_DATA) $(srcdir)/$$c $(tooldir)/lib/$$c ; \
+ $(INSTALL_DATA) $(srcdir)/$$c $(DESTDIR)$(tooldir)/lib/$$c ; \
done;
clean mostlyclean:
diff --git a/libgloss/mt/stat.c b/libgloss/mt/stat.c
index 9a6ca7ca0..4f1da73f4 100644
--- a/libgloss/mt/stat.c
+++ b/libgloss/mt/stat.c
@@ -5,7 +5,7 @@
int
-stat (const char *path, struct stat *st)
+stat (const char *__restrict path, struct stat *__restrict st)
{
return TRAP0 (SYS_stat, path, st, 0);
diff --git a/libgloss/nds32/Makefile.in b/libgloss/nds32/Makefile.in
index 6345957a5..99ccae814 100644
--- a/libgloss/nds32/Makefile.in
+++ b/libgloss/nds32/Makefile.in
@@ -68,11 +68,11 @@ CRT1 = crt1.o
-SYSCALLS1 = syscall_exit.o syscall_open.o syscall_close.o syscall_read.o syscall_write.o
-SYSCALLS2 = syscall_lseek.o syscall_unlink.o syscall_getpid.o syscall_kill.o syscall_fstat.o
-SYSCALLS3 = syscall_argvlen.o syscall_argv.o syscall_chdir.o syscall_stat.o syscall_chmod.o
-SYSCALLS4 = syscall_utime.o syscall_time.o syscall_gettimeofday.o syscall_times.o syscall_link.o
-SYSCALLS5 = syscall_rename.o syscall_isatty.o syscall_system.o syscall_sbrk.o
+SYSCALLS1 = _exit.o _open.o _close.o _read.o _write.o
+SYSCALLS2 = _lseek.o _unlink.o _getpid.o _kill.o _fstat.o
+SYSCALLS3 = _argvlen.o _argv.o _chdir.o _stat.o _chmod.o
+SYSCALLS4 = _utime.o _time.o _gettimeofday.o _times.o _link.o
+SYSCALLS5 = _rename.o _isatty.o _system.o _sbrk.o syscall_error_handler.o
SYSCALLS = $(SYSCALLS1) $(SYSCALLS2) $(SYSCALLS3) $(SYSCALLS4) $(SYSCALLS5)
GENERIC_LIBOBJS =
@@ -119,27 +119,28 @@ config.status: configure
# to support SunOS VPATH
crt0.o: crt0.S
crt1.o: crt1.S
-syscall_exit.o: syscall_exit.S
-syscall_open.o: syscall_open.S
-syscall_close.o: syscall_close.S
-syscall_read.o: syscall_read.S
-syscall_write.o: syscall_write.S
-syscall_lseek.o: syscall_lseek.S
-syscall_unlink.o: syscall_unlink.S
-syscall_getpid.o: syscall_getpid.S
-syscall_kill.o: syscall_kill.S
-syscall_fstat.o: syscall_fstat.S
-syscall_argvlen.o: syscall_argvlen.S
-syscall_argv.o: syscall_argv.S
-syscall_chdir.o: syscall_chdir.S
-syscall_stat.o: syscall_stat.S
-syscall_chmod.o: syscall_chmod.S
-syscall_utime.o: syscall_utime.S
-syscall_time.o: syscall_time.S
-syscall_gettimeofday.o: syscall_gettimeofday.S
-syscall_times.o: syscall_times.S
-syscall_link.o: syscall_link.S
-syscall_rename.o: syscall_rename.S
-syscall_isatty.o: syscall_isatty.S
-syscall_system.o: syscall_system.S
-syscall_sbrk.o: syscall_sbrk.S
+_exit.o: _exit.S
+_open.o: _open.S
+_close.o: _close.S
+_read.o: _read.S
+_write.o: _write.S
+_lseek.o: _lseek.S
+_unlink.o: _unlink.S
+_getpid.o: _getpid.S
+_kill.o: _kill.S
+_fstat.o: _fstat.S
+_argvlen.o: _argvlen.S
+_argv.o: _argv.S
+_chdir.o: _chdir.S
+_stat.o: _stat.S
+_chmod.o: _chmod.S
+_utime.o: _utime.S
+_time.o: _time.S
+_gettimeofday.o: _gettimeofday.S
+_times.o: _times.S
+_link.o: _link.S
+_rename.o: _rename.S
+_isatty.o: _isatty.S
+_system.o: _system.S
+_sbrk.o: _sbrk.S
+syscall_error_handler.o: syscall_error_handler.S
diff --git a/libgloss/nds32/syscall_exit.S b/libgloss/nds32/_argv.S
index c886fc410..bd85979a4 100644
--- a/libgloss/nds32/syscall_exit.S
+++ b/libgloss/nds32/_argv.S
@@ -27,13 +27,10 @@ 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 "syscall.h"
+#ifndef __NDS32_VH__
+#include "../syscall.h"
+#include "syscall_extra.h"
+SYS_WRAPPER _argv, SYS_argv
- .section .text
- .global _exit
- .type _exit, @function
- .align 2
-_exit:
- syscall SYS_exit /* Make syscall 'SYS_exit'. */
- .size _exit, .-_exit
+#endif /* not __NDS32_VH__ */
diff --git a/libgloss/nds32/_argvlen.S b/libgloss/nds32/_argvlen.S
new file mode 100644
index 000000000..32401d38f
--- /dev/null
+++ b/libgloss/nds32/_argvlen.S
@@ -0,0 +1,36 @@
+/*
+Copyright (c) 2013 Andes Technology Corporation.
+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 the company 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.
+*/
+#ifndef __NDS32_VH__
+
+#include "../syscall.h"
+#include "syscall_extra.h"
+SYS_WRAPPER _argvlen, SYS_argvlen
+
+#endif /* not __NDS32_VH__ */
diff --git a/libgloss/nds32/_chdir.S b/libgloss/nds32/_chdir.S
new file mode 100644
index 000000000..bb6b32435
--- /dev/null
+++ b/libgloss/nds32/_chdir.S
@@ -0,0 +1,36 @@
+/*
+Copyright (c) 2013 Andes Technology Corporation.
+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 the company 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.
+*/
+#ifndef __NDS32_VH__
+
+#include "../syscall.h"
+#include "syscall_extra.h"
+SYS_WRAPPER _chdir, SYS_chdir
+
+#endif /* not __NDS32_VH__ */
diff --git a/libgloss/nds32/syscall_kill.S b/libgloss/nds32/_chmod.S
index e04c5b9c4..231a18f4b 100644
--- a/libgloss/nds32/syscall_kill.S
+++ b/libgloss/nds32/_chmod.S
@@ -27,27 +27,11 @@ 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.
*/
+
+#ifndef __NDS32_VH__
+
#include "../syscall.h"
#include "syscall_extra.h"
+SYS_WRAPPER _chmod, SYS_chmod
-
- .extern errno
-
- .section .text
- .global _kill
- .type _kill, @function
- .align 2
-_kill:
- /* Make syscall 'SYS_kill'.
- Reture value '-1' stored in $r0 means there is something wrong.
- If there is something wrong, make syscall 'SYS_geterr' to get
- error code to see what exactly happens and store it in errno . */
- syscall SYS_kill
- addi $r1, $r0, 1
- bnez $r1, .Ldone
- syscall SYS_geterr
- s.w $r0, errno
- movi $r0, -1
-.Ldone:
- ret
- .size _kill, .-_kill
+#endif /* not __NDS32_VH__ */
diff --git a/libgloss/nds32/syscall_link.S b/libgloss/nds32/_close.S
index 044b632a0..0a1aec1e6 100644
--- a/libgloss/nds32/syscall_link.S
+++ b/libgloss/nds32/_close.S
@@ -27,27 +27,16 @@ 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 __NDS32_VH__
+
+#include "vh.h"
+.extern _impure_ptr
+TYPE1 _close, VH_CLOSE
+
+#else /* not __NDS32_VH__ */
+
#include "../syscall.h"
#include "syscall_extra.h"
+SYS_WRAPPER _close, SYS_close
-
- .extern errno
-
- .section .text
- .global _link
- .type _link, @function
- .align 2
-_link:
- /* Make syscall 'SYS_link'.
- Reture value '-1' stored in $r0 means there is something wrong.
- If there is something wrong, make syscall 'SYS_geterr' to get
- error code to see what exactly happens and store it in errno . */
- syscall SYS_link
- addi $r1, $r0, 1
- bnez $r1, .Ldone
- syscall SYS_geterr
- s.w $r0, errno
- movi $r0, -1
-.Ldone:
- ret
- .size _link, .-_link
+#endif /* not __NDS32_VH__ */
diff --git a/libgloss/nds32/_exit.S b/libgloss/nds32/_exit.S
new file mode 100644
index 000000000..1a73fa20a
--- /dev/null
+++ b/libgloss/nds32/_exit.S
@@ -0,0 +1,44 @@
+/*
+Copyright (c) 2013 Andes Technology Corporation.
+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 the company 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.
+*/
+#include "vh.h"
+#include "../syscall.h"
+ .text
+ .global _exit
+ .type _exit, @function
+ .align 2
+_exit:
+#ifdef __NDS32_VH__
+ BREAK VH_EXIT /* Generate_Exception(Breakpoint); */
+#else
+ syscall SYS_exit /* Make syscall 'SYS_exit'. */
+#endif
+.L_infinite_loop:
+ b .L_infinite_loop
+ .size _exit, .-_exit
diff --git a/libgloss/nds32/syscall_argv.S b/libgloss/nds32/_fstat.S
index f11247856..7d0cb6e4b 100644
--- a/libgloss/nds32/syscall_argv.S
+++ b/libgloss/nds32/_fstat.S
@@ -27,27 +27,17 @@ 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 __NDS32_VH__
+
+#include "vh.h"
+.extern _impure_ptr
+TYPE1 _fstat, VH_FSTAT
+
+#else /* not __NDS32_VH__ */
+
#include "../syscall.h"
#include "syscall_extra.h"
+SYS_WRAPPER _fstat, SYS_fstat
-
- .extern errno
-
- .section .text
- .global _argv
- .type _argv, @function
- .align 2
-_argv:
- /* Make syscall 'SYS_argv'.
- Reture value '-1' stored in $r0 means there is something wrong.
- If there is something wrong, make syscall 'SYS_geterr' to get
- error code to see what exactly happens and store it in errno . */
- syscall SYS_argv
- addi $r1, $r0, 1
- bnez $r1, .Ldone
- syscall SYS_geterr
- s.w $r0, errno
- movi $r0, -1
-.Ldone:
- ret
- .size _argv, .-_argv
+#endif /* not __NDS32_VH__ */
diff --git a/libgloss/nds32/syscall_getpid.S b/libgloss/nds32/_getpid.S
index f1f25d80b..c8662d20d 100644
--- a/libgloss/nds32/syscall_getpid.S
+++ b/libgloss/nds32/_getpid.S
@@ -27,27 +27,14 @@ 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 "../syscall.h"
-#include "syscall_extra.h"
-
- .extern errno
-
- .section .text
+ .text
.global _getpid
.type _getpid, @function
- .align 2
+ .align 2
_getpid:
- /* Make syscall 'SYS_getpid'.
- Reture value '-1' stored in $r0 means there is something wrong.
- If there is something wrong, make syscall 'SYS_geterr' to get
- error code to see what exactly happens and store it in errno . */
- syscall SYS_getpid
- addi $r1, $r0, 1
- bnez $r1, .Ldone
- syscall SYS_geterr
- s.w $r0, errno
- movi $r0, -1
-.Ldone:
+ /* The getpid() function shall always be successful and
+ no return value is reserved to indicate an error. */
+ movi $r0, 1 /* A minimal implementation, success. */
ret
- .size _getpid, .-_getpid
+ .size _getpid, .-_getpid
diff --git a/libgloss/nds32/syscall_gettimeofday.S b/libgloss/nds32/_gettimeofday.S
index bd995a8f6..e78bd5e19 100644
--- a/libgloss/nds32/syscall_gettimeofday.S
+++ b/libgloss/nds32/_gettimeofday.S
@@ -27,27 +27,22 @@ 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 "../syscall.h"
-#include "syscall_extra.h"
+#ifdef __NDS32_VH__
+#include "vh.h"
+TYPE3 _gettimeofday, VH_GETTIMEOFDAY
- .extern errno
+#else /* not __NDS32_VH__ */
- .section .text
+#include "../syscall.h"
+#include "syscall_extra.h"
+ .text
.global _gettimeofday
.type _gettimeofday, @function
- .align 2
+ .align 2
_gettimeofday:
- /* Make syscall 'SYS_gettimeofday'.
- Reture value '-1' stored in $r0 means there is something wrong.
- If there is something wrong, make syscall 'SYS_geterr' to get
- error code to see what exactly happens and store it in errno . */
syscall SYS_gettimeofday
- addi $r1, $r0, 1
- bnez $r1, .Ldone
- syscall SYS_geterr
- s.w $r0, errno
- movi $r0, -1
-.Ldone:
ret
- .size _gettimeofday, .-_gettimeofday
+ .size _gettimeofday, .-_gettimeofday
+
+#endif /* not __NDS32_VH__ */
diff --git a/libgloss/nds32/syscall_isatty.S b/libgloss/nds32/_isatty.S
index e8f538d95..37776ed7d 100644
--- a/libgloss/nds32/syscall_isatty.S
+++ b/libgloss/nds32/_isatty.S
@@ -27,27 +27,40 @@ 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 "../syscall.h"
-#include "syscall_extra.h"
+/*
+ SYNOPSIS
+ #include <unistd.h>
+ int isatty(int fildes);
+ RETURN VALUE
+ The isatty() function shall return 1 if fildes is associated with
+ a terminal; otherwise, it shall return 0 and may set errno
+ to indicate the error.
+*/
+#ifdef __NDS32_VH__
+#include "vh.h"
+.extern _impure_ptr
+TYPE0 _isatty, VH_ISATTY
- .extern errno
+#else /* not __NDS32_VH__ */
- .section .text
+#include "../syscall.h"
+#include "syscall_extra.h"
+ .text
.global _isatty
.type _isatty, @function
- .align 2
+ .align 2
_isatty:
- /* Make syscall 'SYS_isatty'.
- Reture value '-1' stored in $r0 means there is something wrong.
- If there is something wrong, make syscall 'SYS_geterr' to get
- error code to see what exactly happens and store it in errno . */
- syscall SYS_isatty
- addi $r1, $r0, 1
- bnez $r1, .Ldone
- syscall SYS_geterr
- s.w $r0, errno
- movi $r0, -1
-.Ldone:
+ syscall SYS_isatty /* Make syscall with SWID=`SYS_isatty'.
+ Reture value `0' stored in $r0 means
+ there is something wrong. */
+ bnez $r0, 1f /* Branch if success. */
+ syscall SYS_geterr /* There is something wrong. */
+ l.w $r15, _impure_ptr
+ swi $r0, [$r15] /* Set errno. */
+ move $r0, #0
+1:
ret
- .size _isatty, .-_isatty
+ .size _isatty, .-_isatty
+
+#endif /* not __NDS32_VH__ */
diff --git a/libgloss/nds32/_kill.S b/libgloss/nds32/_kill.S
new file mode 100644
index 000000000..bb8c6ebd3
--- /dev/null
+++ b/libgloss/nds32/_kill.S
@@ -0,0 +1,46 @@
+/*
+Copyright (c) 2013 Andes Technology Corporation.
+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 the company 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.
+*/
+/* Upon successful completion, 0 shall be returned. Otherwise,
+ -1 shall be returned and errno set to indicate the error. */
+ .extern _impure_ptr /* The first element is _errno. */
+ .text
+ .global _kill
+ .type _kill, @function
+ .align 2
+_kill:
+ /* A minimal implementation has no concept of either signals,
+ nor of processes to receive those signals. So this function
+ should always fail with an appropriate value in errno. */
+ movi $r0, #22 /* EINVAL: Invalid argument */
+ l.w $r15, _impure_ptr
+ swi $r0, [$r15]
+ movi $r0, -1 /* Set return value to -1. */
+ ret
+ .size _kill, .-_kill
diff --git a/libgloss/nds32/syscall_argvlen.S b/libgloss/nds32/_link.S
index dd2ca1912..7f6b7f0fa 100644
--- a/libgloss/nds32/syscall_argvlen.S
+++ b/libgloss/nds32/_link.S
@@ -27,27 +27,19 @@ 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 "../syscall.h"
-#include "syscall_extra.h"
-
-
- .extern errno
-
- .section .text
- .global _argvlen
- .type _argvlen, @function
- .align 2
-_argvlen:
- /* Make syscall 'SYS_argvlen'.
- Reture value '-1' stored in $r0 means there is something wrong.
- If there is something wrong, make syscall 'SYS_geterr' to get
- error code to see what exactly happens and store it in errno . */
- syscall SYS_argvlen
- addi $r1, $r0, 1
- bnez $r1, .Ldone
- syscall SYS_geterr
- s.w $r0, errno
- movi $r0, -1
-.Ldone:
+/* Upon successful completion, 0 shall be returned. Otherwise,
+ -1 shall be returned and errno set to indicate the error. */
+ .extern _impure_ptr /* The first element is _errno. */
+ .text
+ .global _link
+ .type _link, @function
+ .align 2
+_link:
+ /* A minimal implementation has no file system, so this function
+ must always fail, with an appropriate value set in errno. */
+ movi $r0, #31 /* EMLINK: Too many links */
+ l.w $r15, _impure_ptr
+ swi $r0, [$r15]
+ movi $r0, -1 /* Set return value to -1. */
ret
- .size _argvlen, .-_argvlen
+ .size _link, .-_link
diff --git a/libgloss/nds32/_lseek.S b/libgloss/nds32/_lseek.S
new file mode 100644
index 000000000..c17e22f8f
--- /dev/null
+++ b/libgloss/nds32/_lseek.S
@@ -0,0 +1,42 @@
+/*
+Copyright (c) 2013 Andes Technology Corporation.
+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 the company 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.
+*/
+#ifdef __NDS32_VH__
+
+#include "vh.h"
+.extern _impure_ptr
+TYPE1 _lseek, VH_LSEEK
+
+#else /* not __NDS32_VH__ */
+
+#include "../syscall.h"
+#include "syscall_extra.h"
+SYS_WRAPPER _lseek, SYS_lseek
+
+#endif /* not __NDS32_VH__ */
diff --git a/libgloss/nds32/_open.S b/libgloss/nds32/_open.S
new file mode 100644
index 000000000..6c80ab043
--- /dev/null
+++ b/libgloss/nds32/_open.S
@@ -0,0 +1,42 @@
+/*
+Copyright (c) 2013 Andes Technology Corporation.
+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 the company 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.
+*/
+#ifdef __NDS32_VH__
+
+#include "vh.h"
+.extern _impure_ptr
+TYPE1 _open, VH_OPEN
+
+#else /* not __NDS32_VH__ */
+
+#include "../syscall.h"
+#include "syscall_extra.h"
+SYS_WRAPPER _open, SYS_open
+
+#endif /* not __NDS32_VH__ */
diff --git a/libgloss/nds32/_read.S b/libgloss/nds32/_read.S
new file mode 100644
index 000000000..ca0c8af3c
--- /dev/null
+++ b/libgloss/nds32/_read.S
@@ -0,0 +1,42 @@
+/*
+Copyright (c) 2013 Andes Technology Corporation.
+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 the company 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.
+*/
+#ifdef __NDS32_VH__
+
+#include "vh.h"
+.extern _impure_ptr
+TYPE1 _read, VH_READ
+
+#else /* not __NDS32_VH__ */
+
+#include "../syscall.h"
+#include "syscall_extra.h"
+SYS_WRAPPER _read, SYS_read
+
+#endif /* not __NDS32_VH__ */
diff --git a/libgloss/nds32/_rename.S b/libgloss/nds32/_rename.S
new file mode 100644
index 000000000..f91c1f60f
--- /dev/null
+++ b/libgloss/nds32/_rename.S
@@ -0,0 +1,42 @@
+/*
+Copyright (c) 2013 Andes Technology Corporation.
+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 the company 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.
+*/
+#ifdef __NDS32_VH__
+
+#include "vh.h"
+.extern _impure_ptr
+TYPE1 _rename, VH_RENAME
+
+#else /* not __NDS32_VH__ */
+
+#include "../syscall.h"
+#include "syscall_extra.h"
+SYS_WRAPPER _rename, SYS_rename
+
+#endif /* not __NDS32_VH__ */
diff --git a/libgloss/nds32/syscall_sbrk.S b/libgloss/nds32/_sbrk.S
index 3c2d9d4f0..dc3ed7bf8 100644
--- a/libgloss/nds32/syscall_sbrk.S
+++ b/libgloss/nds32/_sbrk.S
@@ -30,8 +30,10 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "../syscall.h"
#include "syscall_extra.h"
+ .extern _impure_ptr /* The first element is _errno. */
.extern _end
.global _sbrk
+ .type _sbrk, @function
.text
.align 2
@@ -66,10 +68,12 @@ _sbrk:
.Lerror:
movi $r0, 12
- s.w $r0, errno /* Set error code: 12 (ENOMEM) to errno. */
+ l.w $r15, _impure_ptr
+ swi $r0, [$r15] /* Set errno. */
movi $r0, -1 /* Reture value is -1. */
ret
+ .size _sbrk, .-_sbrk
.section .bss
.align 2
heap_end:
diff --git a/libgloss/nds32/_stat.S b/libgloss/nds32/_stat.S
new file mode 100644
index 000000000..9bb23cea6
--- /dev/null
+++ b/libgloss/nds32/_stat.S
@@ -0,0 +1,42 @@
+/*
+Copyright (c) 2013 Andes Technology Corporation.
+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 the company 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.
+*/
+#ifdef __NDS32_VH__
+
+#include "vh.h"
+.extern _impure_ptr
+TYPE1 _stat, VH_STAT
+
+#else /* not __NDS32_VH__ */
+
+#include "../syscall.h"
+#include "syscall_extra.h"
+SYS_WRAPPER _stat, SYS_stat
+
+#endif /* not __NDS32_VH__ */
diff --git a/libgloss/nds32/_system.S b/libgloss/nds32/_system.S
new file mode 100644
index 000000000..bbd6a785d
--- /dev/null
+++ b/libgloss/nds32/_system.S
@@ -0,0 +1,42 @@
+/*
+Copyright (c) 2013 Andes Technology Corporation.
+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 the company 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.
+*/
+#ifdef __NDS32_VH__
+
+#include "vh.h"
+.extern _impure_ptr
+TYPE1 _system, VH_SYSTEM
+
+#else /* not __NDS32_VH__ */
+
+#include "../syscall.h"
+#include "syscall_extra.h"
+SYS_WRAPPER _system, SYS_system
+
+#endif /* not __NDS32_VH__ */
diff --git a/libgloss/nds32/_time.S b/libgloss/nds32/_time.S
new file mode 100644
index 000000000..43c7ababa
--- /dev/null
+++ b/libgloss/nds32/_time.S
@@ -0,0 +1,36 @@
+/*
+Copyright (c) 2013 Andes Technology Corporation.
+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 the company 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.
+*/
+#ifndef __NDS32_VH__
+
+#include "../syscall.h"
+#include "syscall_extra.h"
+SYS_WRAPPER _time, SYS_time
+
+#endif /* not __NDS32_VH__ */
diff --git a/libgloss/nds32/syscall_times.S b/libgloss/nds32/_times.S
index 7e4a260d0..3343f315b 100644
--- a/libgloss/nds32/syscall_times.S
+++ b/libgloss/nds32/_times.S
@@ -27,27 +27,19 @@ 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 "../syscall.h"
-#include "syscall_extra.h"
-
-
- .extern errno
-
- .section .text
+/* If times() fails, (clock_t)-1 shall be returned and errno set
+ to indicate the error. */
+ .extern _impure_ptr /* The first element is _errno. */
+ .text
.global _times
.type _times, @function
- .align 2
+ .align 2
_times:
- /* Make syscall 'SYS_times'.
- Reture value '-1' stored in $r0 means there is something wrong.
- If there is something wrong, make syscall 'SYS_geterr' to get
- error code to see what exactly happens and store it in errno . */
- syscall SYS_times
- addi $r1, $r0, 1
- bnez $r1, .Ldone
- syscall SYS_geterr
- s.w $r0, errno
- movi $r0, -1
-.Ldone:
+ /* A minimal implementation need not offer any timing information,
+ so should always fail with an appropriate value in errno. */
+ movi $r0, #13 /* EACCES: Permission denied */
+ l.w $r15, _impure_ptr
+ swi $r0, [$r15]
+ movi $r0, -1 /* Set return value to -1. */
ret
- .size _times, .-_times
+ .size _times, .-_times
diff --git a/libgloss/nds32/_unlink.S b/libgloss/nds32/_unlink.S
new file mode 100644
index 000000000..bb5989c3f
--- /dev/null
+++ b/libgloss/nds32/_unlink.S
@@ -0,0 +1,43 @@
+/*
+Copyright (c) 2013 Andes Technology Corporation.
+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 the company 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.
+*/
+
+#ifdef __NDS32_VH__
+
+#include "vh.h"
+.extern _impure_ptr
+TYPE1 _unlink, VH_UNLINK
+
+#else /* not __NDS32_VH__ */
+
+#include "../syscall.h"
+#include "syscall_extra.h"
+SYS_WRAPPER _unlink, SYS_unlink
+
+#endif /* not __NDS32_VH__ */
diff --git a/libgloss/nds32/_utime.S b/libgloss/nds32/_utime.S
new file mode 100644
index 000000000..014aa1aaa
--- /dev/null
+++ b/libgloss/nds32/_utime.S
@@ -0,0 +1,36 @@
+/*
+Copyright (c) 2013 Andes Technology Corporation.
+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 the company 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.
+*/
+#ifndef __NDS32_VH__
+
+#include "../syscall.h"
+#include "syscall_extra.h"
+SYS_WRAPPER _utime, SYS_utime
+
+#endif /* not __NDS32_VH__ */
diff --git a/libgloss/nds32/_write.S b/libgloss/nds32/_write.S
new file mode 100644
index 000000000..f0d8651ca
--- /dev/null
+++ b/libgloss/nds32/_write.S
@@ -0,0 +1,42 @@
+/*
+Copyright (c) 2013 Andes Technology Corporation.
+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 the company 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.
+*/
+#ifdef __NDS32_VH__
+
+#include "vh.h"
+.extern _impure_ptr
+TYPE1 _write, VH_WRITE
+
+#else /* not __NDS32_VH__ */
+
+#include "../syscall.h"
+#include "syscall_extra.h"
+SYS_WRAPPER _write, SYS_write
+
+#endif /* not __NDS32_VH__ */
diff --git a/libgloss/nds32/crt0.S b/libgloss/nds32/crt0.S
index d12be761f..68a6f76d4 100644
--- a/libgloss/nds32/crt0.S
+++ b/libgloss/nds32/crt0.S
@@ -1,5 +1,5 @@
/*
-Copyright (c) 2013 Andes Technology Corporation.
+Copyright (c) 2013-2014 Andes Technology Corporation.
All rights reserved.
Redistribution and use in source and binary forms, with or without
@@ -36,6 +36,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
##
##==============================================================================
+#include "syscall_extra.h"
##------------------------------------------------------------------------------
## Vector table setup
@@ -48,54 +49,131 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
##------------------------------------------------------------------------------
.section .text
.weak _SDA_BASE_
- .weak _FP_BASE_
+ .weak _ITB_BASE_
+ .weak _arg_init
+ .weak __pre_c_init
+ .weak __post_c_init
+ .weak _call_exit
.global _start
.type _start, @function
.align 2
_start:
-.L_fp_gp_lp_init:
- /* Initialization for $fp, $gp, and $lp. The _SDA_BASE_ location
- stands for Small Data Access. */
- la $fp, _FP_BASE_
+ /* The initialization sequence really does matter !!!
+ The global pointer must be
+ initialized precedence over all others. */
+
+.L_init_gp:
+ /* Initialization for global pointer. The symbol _SDA_BASE_ is
+ determined by Linker. SDA stands for Small Data Access. */
la $gp, _SDA_BASE_
- movi $lp, #0
-.L_stack_init:
- /* Initialization for $sp and make sure it is 8-byte aligned. */
+#if __NDS32_EXT_EX9__
+.L_init_itb:
+ /* Initialization for Instruction Table Base (ITB).
+ The symbol _ITB_BASE_ is determined by Linker.
+ Set $ITB only if MSC_CFG.EIT (cr4.b'24) is set. */
+ mfsr $r0, $MSC_CFG
+ srli $r0, $r0, 24
+ andi $r0, $r0, 0x1
+ beqz $r0, 1f /* Fall through ? */
+ la $r0, _ITB_BASE_
+ mtusr $r0, $ITB
+1:
+#endif
+
+.L_init_sp:
+ /* Initialization for stack pointer. The symbol _stack is defined
+ in linker script. Make sure $sp is 8-byte aligned. */
la $sp, _stack
+#if __NDS32_ISA_V3__
+ bitci $sp, $sp, #7
+#else
movi $r0, #-8 /* Set $r0 as 0xFFFFFFF8. */
and $sp, $sp, $r0
-
-.L_bss_clear:
- /* Clear bss section. */
- la $r3, _end
- la $r0, _edata
- beq $r0, $r3, .L_call_main /* Branch if no bss. */
- sub $r1, $r3, $r0 /* Size to be clear. */
-
- /* Set $r2 as how many words to be clear.
- Set $r1 as how many bytes are less than a woard to be clear. */
- srli $r2, $r1, #2
- andi $r1, $r1, #3
- beqz $r3, .Lbyte_clear
-
- la $r4, #0x00000000
+#endif
+
+#if __NDS32_EXT_FPU_SP__ || __NDS32_EXT_FPU_DP__
+.L_init_fpu:
+ /* Initialize FPU
+ Set FUCOP_CTL.CP0EN (fucpr.b'0). */
+ mfsr $r0, $FUCOP_CTL
+ ori $r0, $r0, 0x1
+ mtsr $r0, $FUCOP_CTL
+ dsb
+ /* According to [bugzilla #9425], set flush-to-zero mode.
+ That is, set $FPCSR.DNZ(b'12) = 1. */
+ FMFCSR $r0
+ ori $r0, $r0, 0x1000
+ FMTCSR $r0
+ dsb
+#endif
+
+.L_pre_c_init:
+ ! call __pre_c_init if provided
+ ! sample __pre_c_init is in BSP
+ la $r15, __pre_c_init ! load address of __pre_c_init
+ beqz $r15, .L_zero_out_bss ! check existence of __pre_c_init
+ jral $r15 ! pre-c-runtime initialization
+
+.L_zero_out_bss:
+ /* Zero out the bss section.
+ Equivalence C code for follow part:
+ if (_end == _edata) goto .L_post_c_init
+ unsinged int *ptr = _edata;
+ while (ptr != _end)
+ *ptr++ = 0
+ $r0 = ptr/_edata
+ $r1 = _end
+ $r2 = 0
+ */
+ la $r0, _edata
+ la $r1, _end
+ movi $r2, #0
+ beq $r0, $r1, .L_post_c_init /* Branch if no bss. */
.Lword_clear:
- swi.bi $r4, [$r0], #4
- addi $r2, $r2, #-1
- bnez $r2, .Lword_clear /* Loop again ? */
- beqz $r1, .Lend_bss
-
-.Lbyte_clear:
- sbi.bi $r4, [$r0], #1
- addi $r1, $r1, #-1
- bnez $r1, .Lbyte_clear
-.Lend_bss:
-
+ swi.bi $r2, [$r0], #4
+ bne $r0, $r1, .Lword_clear
+
+.L_post_c_init:
+ ! call __post_c_init if provided
+ ! no sample __post_c_init is provided
+ la $r15, __post_c_init ! load address of __post_c_init
+ beqz $r15, .L_arg_init ! check existence of __post_c_init
+ jral $r15 ! post-c-runtime initialization
+
+.L_arg_init:
+ ! argc/argv initialization if necessary
+ la $r7, _arg_init ! get address of _arg_init
+ beqz $r7, .L_clean_reg ! if there isn't _arg_init, go main
+ addi $sp, $sp, -512 ! allocate space for command line
+ ! and arguments
+ move $r6, $sp ! r6 = buffer addr of cmd line
+ move $r0, $r6 ! r0 = buffer addr of cmd line
+ syscall SYS_getcmdline ! get cmd line
+ move $r0, $r6 ! r0 = buffer addr of cmd line
+ addi $r1, $r6, 256 ! r1 = argv
+ jral $r7 ! init argc/argv
+ addi $r1, $r6, 256 ! r1 = argv
+ b .L_call_main
+
+.L_clean_reg:
+ /* Prepare argc/argv/env for main function.
+ Since there is no operating system so far,
+ we set $r0, $r1, and $r2 to be zero.
+ Note: $r2 already set to zero in .L_zero_out_bss: code fragment. */
+ movi $r0, 0
+ movi $r1, 0
+ movi $r2, 0
.L_call_main:
- la $r15, main
- jral $r15
+ /* Call 'main'. */
+ bal main
+
+ /* Call _call_exit. */
+ ! call _call_exit if necessary; default implementation is in crtexit.c
+ la $r15, _call_exit ! load address of _call_exit
+ beqz $r15, .L_terminate_program ! no _call_exit? go exit
+ jral $r15 ! _call_exit will never return
.L_terminate_program:
/* There are two ways to terminate program:
@@ -106,11 +184,10 @@ _start:
Currently, we use option 2 as a solution to follow C99 5.1.2.2.3,
but aware that general exit() will do some cleanup procedures
which may result in large-memory-footprints. */
- la $r15, exit
- jral $r15
+ bal exit
.L_forever_loop:
/* Should never return here. */
- b .L_forever_loop
+ b .L_forever_loop
.size _start, .-_start
diff --git a/libgloss/nds32/crt1.S b/libgloss/nds32/crt1.S
index 26aef5b51..ec8b86683 100644
--- a/libgloss/nds32/crt1.S
+++ b/libgloss/nds32/crt1.S
@@ -1,5 +1,5 @@
/*
-Copyright (c) 2013 Andes Technology Corporation.
+Copyright (c) 2013-2014 Andes Technology Corporation.
All rights reserved.
Redistribution and use in source and binary forms, with or without
@@ -36,6 +36,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
##
##==============================================================================
+#include "syscall_extra.h"
##------------------------------------------------------------------------------
## Vector table setup
@@ -48,61 +49,139 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
##------------------------------------------------------------------------------
.section .text
.weak _SDA_BASE_
- .weak _FP_BASE_
+ .weak _ITB_BASE_
+ .weak _arg_init
+ .weak __pre_c_init
+ .weak __post_c_init
+ .weak _call_exit
.global _start
.type _start, @function
.align 2
_start:
-.L_fp_gp_lp_init:
- /* Initialization for $fp, $gp, and $lp. The _SDA_BASE_ location
- stands for Small Data Access. */
- la $fp, _FP_BASE_
+ /* The initialization sequence really does matter !!!
+ The global pointer must be
+ initialized precedence over all others. */
+
+.L_init_gp:
+ /* Initialization for global pointer. The symbol _SDA_BASE_ is
+ determined by Linker. SDA stands for Small Data Access. */
la $gp, _SDA_BASE_
- movi $lp, #0
-.L_stack_init:
- /* Initialization for $sp and make sure it is 8-byte aligned. */
+#if __NDS32_EXT_EX9__
+.L_init_itb:
+ /* Initialization for Instruction Table Base (ITB).
+ The symbol _ITB_BASE_ is determined by Linker.
+ Set $ITB only if MSC_CFG.EIT (cr4.b'24) is set. */
+ mfsr $r0, $MSC_CFG
+ srli $r0, $r0, 24
+ andi $r0, $r0, 0x1
+ beqz $r0, 1f /* Fall through ? */
+ la $r0, _ITB_BASE_
+ mtusr $r0, $ITB
+1:
+#endif
+
+.L_init_sp:
+ /* Initialization for stack pointer. The symbol _stack is defined
+ in linker script. Make sure $sp is 8-byte aligned. */
la $sp, _stack
+#if __NDS32_ISA_V3__
+ bitci $sp, $sp, #7
+#else
movi $r0, #-8 /* Set $r0 as 0xFFFFFFF8. */
and $sp, $sp, $r0
-
-.L_bss_clear:
- /* Clear bss section. */
- la $r3, _end
- la $r0, _edata
- beq $r0, $r3, .L_call_main /* Branch if no bss. */
- sub $r1, $r3, $r0 /* Size to be clear. */
-
- /* Set $r2 as how many words to be clear.
- Set $r1 as how many bytes are less than a woard to be clear. */
- srli $r2, $r1, #2
- andi $r1, $r1, #3
- beqz $r3, .Lbyte_clear
-
- la $r4, #0x00000000
+#endif
+
+#if __NDS32_EXT_FPU_SP__ || __NDS32_EXT_FPU_DP__
+.L_init_fpu:
+ /* Initialize FPU
+ Set FUCOP_CTL.CP0EN (fucpr.b'0). */
+ mfsr $r0, $FUCOP_CTL
+ ori $r0, $r0, 0x1
+ mtsr $r0, $FUCOP_CTL
+ dsb
+ /* According to [bugzilla #9425], set flush-to-zero mode.
+ That is, set $FPCSR.DNZ(b'12) = 1. */
+ FMFCSR $r0
+ ori $r0, $r0, 0x1000
+ FMTCSR $r0
+ dsb
+#endif
+
+.L_pre_c_init:
+ ! call __pre_c_init if provided
+ ! sample __pre_c_init is in BSP
+ la $r15, __pre_c_init ! load address of __pre_c_init
+ beqz $r15, .L_zero_out_bss ! check existence of __pre_c_init
+ jral $r15 ! pre-c-runtime initialization
+
+.L_zero_out_bss:
+ /* Zero out the bss section.
+ Equivalence C code for follow part:
+ if (_end == _edata) goto .L_call_main
+ unsinged int *ptr = _edata;
+ while (ptr != _end)
+ *ptr++ = 0
+ $r0 = ptr/_edata
+ $r1 = _end
+ $r2 = 0
+ */
+ la $r0, _edata
+ la $r1, _end
+ movi $r2, #0
+ beq $r0, $r1, .L_cpp_init /* Branch if no bss. */
.Lword_clear:
- swi.bi $r4, [$r0], #4
- addi $r2, $r2, #-1
- bnez $r2, .Lword_clear /* Loop again ? */
- beqz $r1, .Lend_bss
-
-.Lbyte_clear:
- sbi.bi $r4, [$r0], #1
- addi $r1, $r1, #-1
- bnez $r1, .Lbyte_clear
-.Lend_bss:
-
+ swi.bi $r2, [$r0], #4
+ bne $r0, $r1, .Lword_clear
-.L_call_main:
+.L_cpp_init:
/* Call '_init' to invoke constructors. */
jal _init
/* Register '_fini' into atexit() to invoke destructors when
exit() has been reached. */
la $r0, _fini
jal atexit
+
+.L_post_c_init:
+ ! call __post_c_init if provided
+ ! no sample __post_c_init is provided
+ la $r15, __post_c_init ! load address of __post_c_init
+ beqz $r15, .L_arg_init ! check existence of __post_c_init
+ jral $r15 ! post-c-runtime initialization
+
+.L_arg_init:
+ ! argc/argv initialization if necessary
+ la $r7, _arg_init ! get address of _arg_init
+ beqz $r7, .L_clean_reg ! if there isn't _arg_init, go main
+ addi $sp, $sp, -512 ! allocate space for command line
+ ! and arguments
+ move $r6, $sp ! r6 = buffer addr of cmd line
+ move $r0, $r6 ! r0 = buffer addr of cmd line
+ syscall SYS_getcmdline ! get cmd line
+ move $r0, $r6 ! r0 = buffer addr of cmd line
+ addi $r1, $r6, 256 ! r1 = argv
+ jral $r7 ! init argc/argv
+ addi $r1, $r6, 256 ! r1 = argv
+ b .L_call_main
+
+.L_clean_reg:
+ /* Prepare argc/argv/env for main function.
+ Since there is no operating system so far,
+ we set $r0, $r1, and $r2 to be zero.
+ Note: $r2 already set to zero in .L_zero_out_bss: code fragment. */
+ movi $r0, 0
+ movi $r1, 0
+ movi $r2, 0
+
+.L_call_main:
/* Call 'main'. */
- la $r15, main
- jral $r15
+ bal main
+
+ /* Call _call_exit. */
+ ! call _call_exit if necessary; default implementation is in crtexit.c
+ la $r15, _call_exit ! load address of _call_exit
+ beqz $r15, .L_terminate_program ! no _call_exit? go exit
+ jral $r15 ! _call_exit will never return
.L_terminate_program:
/* There are two ways to terminate program:
@@ -113,11 +192,11 @@ _start:
Currently, we use option 2 as a solution to follow C99 5.1.2.2.3,
but aware that general exit() will do some cleanup procedures
which may result in large-memory-footprints. */
- la $r15, exit
- jral $r15
+
+ bal exit
.L_forever_loop:
/* Should never return here. */
- b .L_forever_loop
+ b .L_forever_loop
.size _start, .-_start
diff --git a/libgloss/nds32/syscall_chmod.S b/libgloss/nds32/syscall_chmod.S
deleted file mode 100644
index afd549b5a..000000000
--- a/libgloss/nds32/syscall_chmod.S
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
-Copyright (c) 2013 Andes Technology Corporation.
-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 the company 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.
-*/
-#include "../syscall.h"
-#include "syscall_extra.h"
-
-
- .extern errno
-
- .section .text
- .global _chmod
- .type _chmod, @function
- .align 2
-_chmod:
- /* Make syscall 'SYS_chmod'.
- Reture value '-1' stored in $r0 means there is something wrong.
- If there is something wrong, make syscall 'SYS_geterr' to get
- error code to see what exactly happens and store it in errno . */
- syscall SYS_chmod
- addi $r1, $r0, 1
- bnez $r1, .Ldone
- syscall SYS_geterr
- s.w $r0, errno
- movi $r0, -1
-.Ldone:
- ret
- .size _chmod, .-_chmod
diff --git a/libgloss/nds32/syscall_close.S b/libgloss/nds32/syscall_close.S
deleted file mode 100644
index c1a7efa5a..000000000
--- a/libgloss/nds32/syscall_close.S
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
-Copyright (c) 2013 Andes Technology Corporation.
-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 the company 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.
-*/
-#include "../syscall.h"
-#include "syscall_extra.h"
-
-
- .extern errno
-
- .section .text
- .global _close
- .type _close, @function
- .align 2
-_close:
- /* Make syscall 'SYS_close'.
- Reture value '-1' stored in $r0 means there is something wrong.
- If there is something wrong, make syscall 'SYS_geterr' to get
- error code to see what exactly happens and store it in errno . */
- syscall SYS_close
- addi $r1, $r0, 1
- bnez $r1, .Ldone
- syscall SYS_geterr
- s.w $r0, errno
- movi $r0, -1
-.Ldone:
- ret
- .size _close, .-_close
diff --git a/libgloss/nds32/syscall_chdir.S b/libgloss/nds32/syscall_error_handler.S
index 5309e2b9b..2b65c6807 100644
--- a/libgloss/nds32/syscall_chdir.S
+++ b/libgloss/nds32/syscall_error_handler.S
@@ -27,27 +27,26 @@ 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.
*/
+#ifndef __NDS32_VH__
+
#include "../syscall.h"
#include "syscall_extra.h"
- .extern errno
-
- .section .text
- .global _chdir
- .type _chdir, @function
- .align 2
-_chdir:
- /* Make syscall 'SYS_chdir'.
- Reture value '-1' stored in $r0 means there is something wrong.
- If there is something wrong, make syscall 'SYS_geterr' to get
- error code to see what exactly happens and store it in errno . */
- syscall SYS_chdir
+ .extern _impure_ptr /* The first element is _errno. */
+ .text
+ .global __syscall_error_handler
+ .type __syscall_error_handler, @function
+ .hidden __syscall_error_handler
+ .align 2
+__syscall_error_handler:
addi $r1, $r0, 1
- bnez $r1, .Ldone
- syscall SYS_geterr
- s.w $r0, errno
- movi $r0, -1
-.Ldone:
+ bnez $r1, 1f /* Branch if success. */
+ syscall SYS_geterr /* There is something wrong. */
+ l.w $r15, _impure_ptr
+ swi $r0, [$r15] /* Set errno. */
+ move $r0, -1
+1:
ret
- .size _chdir, .-_chdir
+ .size __syscall_error_handler, .-__syscall_error_handler
+#endif /* not __NDS32_VH__ */
diff --git a/libgloss/nds32/syscall_extra.h b/libgloss/nds32/syscall_extra.h
index f2ab2d562..7c69489ca 100644
--- a/libgloss/nds32/syscall_extra.h
+++ b/libgloss/nds32/syscall_extra.h
@@ -32,10 +32,28 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
/* These are additional syscalls for nds32 target. */
-#define SYS_rename 3001
-#define SYS_isatty 3002
-#define SYS_system 3003
-
-#define SYS_geterr 6001
+#define SYS_rename 3001
+#define SYS_isatty 3002
+#define SYS_system 3003
+
+#define SYS_geterr 6001
+#define SYS_getcmdline 6002
+
+
+/* Define macros that generate assembly output. */
+.macro SYS_WRAPPER name num
+ .text
+ .global \name
+ .type \name, @function
+ .align 2
+\name:
+ /* Make syscall with arg=`\num'.
+ Reture value `-1' stored in $r0 means there is something wrong.
+ If there is something wrong, make syscall to get `SYS_geterr' to get
+ error code to see what exactly happens and store it in errno . */
+ syscall \num /* Make syscall with arg=`\num'. */
+ j __syscall_error_handler
+ .size \name, .-\name
+.endm
#endif /* _SYSCALL_EXTRA_H */
diff --git a/libgloss/nds32/syscall_fstat.S b/libgloss/nds32/syscall_fstat.S
deleted file mode 100644
index a3ab279a6..000000000
--- a/libgloss/nds32/syscall_fstat.S
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
-Copyright (c) 2013 Andes Technology Corporation.
-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 the company 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.
-*/
-#include "../syscall.h"
-#include "syscall_extra.h"
-
-
- .extern errno
-
- .section .text
- .global _fstat
- .type _fstat, @function
- .align 2
-_fstat:
- /* Make syscall 'SYS_fstat'.
- Reture value '-1' stored in $r0 means there is something wrong.
- If there is something wrong, make syscall 'SYS_geterr' to get
- error code to see what exactly happens and store it in errno . */
- syscall SYS_fstat
- addi $r1, $r0, 1
- bnez $r1, .Ldone
- syscall SYS_geterr
- s.w $r0, errno
- movi $r0, -1
-.Ldone:
- ret
- .size _fstat, .-_fstat
diff --git a/libgloss/nds32/syscall_lseek.S b/libgloss/nds32/syscall_lseek.S
deleted file mode 100644
index 3515a4787..000000000
--- a/libgloss/nds32/syscall_lseek.S
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
-Copyright (c) 2013 Andes Technology Corporation.
-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 the company 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.
-*/
-#include "../syscall.h"
-#include "syscall_extra.h"
-
-
- .extern errno
-
- .section .text
- .global _lseek
- .type _lseek, @function
- .align 2
-_lseek:
- /* Make syscall 'SYS_lseek'.
- Reture value '-1' stored in $r0 means there is something wrong.
- If there is something wrong, make syscall 'SYS_geterr' to get
- error code to see what exactly happens and store it in errno . */
- syscall SYS_lseek
- addi $r1, $r0, 1
- bnez $r1, .Ldone
- syscall SYS_geterr
- s.w $r0, errno
- movi $r0, -1
-.Ldone:
- ret
- .size _lseek, .-_lseek
diff --git a/libgloss/nds32/syscall_open.S b/libgloss/nds32/syscall_open.S
deleted file mode 100644
index d160b07d3..000000000
--- a/libgloss/nds32/syscall_open.S
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
-Copyright (c) 2013 Andes Technology Corporation.
-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 the company 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.
-*/
-#include "../syscall.h"
-#include "syscall_extra.h"
-
-
- .extern errno
-
- .section .text
- .global _open
- .type _open, @function
- .align 2
-_open:
- /* Make syscall 'SYS_open'.
- Reture value '-1' stored in $r0 means there is something wrong.
- If there is something wrong, make syscall 'SYS_geterr' to get
- error code to see what exactly happens and store it in errno . */
- syscall SYS_open
- addi $r1, $r0, 1
- bnez $r1, .Ldone
- syscall SYS_geterr
- s.w $r0, errno
- movi $r0, -1
-.Ldone:
- ret
- .size _open, .-_open
diff --git a/libgloss/nds32/syscall_rename.S b/libgloss/nds32/syscall_rename.S
deleted file mode 100644
index 6b07cdad1..000000000
--- a/libgloss/nds32/syscall_rename.S
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
-Copyright (c) 2013 Andes Technology Corporation.
-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 the company 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.
-*/
-#include "../syscall.h"
-#include "syscall_extra.h"
-
-
- .extern errno
-
- .section .text
- .global _rename
- .type _rename, @function
- .align 2
-_rename:
- /* Make syscall 'SYS_rename'.
- Reture value '-1' stored in $r0 means there is something wrong.
- If there is something wrong, make syscall 'SYS_geterr' to get
- error code to see what exactly happens and store it in errno . */
- syscall SYS_rename
- addi $r1, $r0, 1
- bnez $r1, .Ldone
- syscall SYS_geterr
- s.w $r0, errno
- movi $r0, -1
-.Ldone:
- ret
- .size _rename, .-_rename
diff --git a/libgloss/nds32/syscall_stat.S b/libgloss/nds32/syscall_stat.S
deleted file mode 100644
index b7679b4a6..000000000
--- a/libgloss/nds32/syscall_stat.S
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
-Copyright (c) 2013 Andes Technology Corporation.
-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 the company 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.
-*/
-#include "../syscall.h"
-#include "syscall_extra.h"
-
-
- .extern errno
-
- .section .text
- .global _stat
- .type _stat, @function
- .align 2
-_stat:
- /* Make syscall 'SYS_stat'.
- Reture value '-1' stored in $r0 means there is something wrong.
- If there is something wrong, make syscall 'SYS_geterr' to get
- error code to see what exactly happens and store it in errno . */
- syscall SYS_stat
- addi $r1, $r0, 1
- bnez $r1, .Ldone
- syscall SYS_geterr
- s.w $r0, errno
- movi $r0, -1
-.Ldone:
- ret
- .size _stat, .-_stat
diff --git a/libgloss/nds32/syscall_system.S b/libgloss/nds32/syscall_system.S
deleted file mode 100644
index ce4388a7a..000000000
--- a/libgloss/nds32/syscall_system.S
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
-Copyright (c) 2013 Andes Technology Corporation.
-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 the company 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.
-*/
-#include "../syscall.h"
-#include "syscall_extra.h"
-
-
- .extern errno
-
- .section .text
- .global _system
- .type _system, @function
- .align 2
-_system:
- /* Make syscall 'SYS_system'.
- Reture value '-1' stored in $r0 means there is something wrong.
- If there is something wrong, make syscall 'SYS_geterr' to get
- error code to see what exactly happens and store it in errno . */
- syscall SYS_system
- addi $r1, $r0, 1
- bnez $r1, .Ldone
- syscall SYS_geterr
- s.w $r0, errno
- movi $r0, -1
-.Ldone:
- ret
- .size _system, .-_system
diff --git a/libgloss/nds32/syscall_time.S b/libgloss/nds32/syscall_time.S
deleted file mode 100644
index 3fee97d63..000000000
--- a/libgloss/nds32/syscall_time.S
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
-Copyright (c) 2013 Andes Technology Corporation.
-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 the company 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.
-*/
-#include "../syscall.h"
-#include "syscall_extra.h"
-
-
- .extern errno
-
- .section .text
- .global _time
- .type _time, @function
- .align 2
-_time:
- /* Make syscall 'SYS_time'.
- Reture value '-1' stored in $r0 means there is something wrong.
- If there is something wrong, make syscall 'SYS_geterr' to get
- error code to see what exactly happens and store it in errno . */
- syscall SYS_time
- addi $r1, $r0, 1
- bnez $r1, .Ldone
- syscall SYS_geterr
- s.w $r0, errno
- movi $r0, -1
-.Ldone:
- ret
- .size _time, .-_time
diff --git a/libgloss/nds32/syscall_unlink.S b/libgloss/nds32/syscall_unlink.S
deleted file mode 100644
index 17607062d..000000000
--- a/libgloss/nds32/syscall_unlink.S
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
-Copyright (c) 2013 Andes Technology Corporation.
-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 the company 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.
-*/
-#include "../syscall.h"
-#include "syscall_extra.h"
-
-
- .extern errno
-
- .section .text
- .global _unlink
- .type _unlink, @function
- .align 2
-_unlink:
- /* Make syscall 'SYS_unlink'.
- Reture value '-1' stored in $r0 means there is something wrong.
- If there is something wrong, make syscall 'SYS_geterr' to get
- error code to see what exactly happens and store it in errno . */
- syscall SYS_unlink
- addi $r1, $r0, 1
- bnez $r1, .Ldone
- syscall SYS_geterr
- s.w $r0, errno
- movi $r0, -1
-.Ldone:
- ret
- .size _unlink, .-_unlink
diff --git a/libgloss/nds32/syscall_utime.S b/libgloss/nds32/syscall_utime.S
deleted file mode 100644
index 7090d359e..000000000
--- a/libgloss/nds32/syscall_utime.S
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
-Copyright (c) 2013 Andes Technology Corporation.
-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 the company 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.
-*/
-#include "../syscall.h"
-#include "syscall_extra.h"
-
-
- .extern errno
-
- .section .text
- .global _utime
- .type _utime, @function
- .align 2
-_utime:
- /* Make syscall 'SYS_utime'.
- Reture value '-1' stored in $r0 means there is something wrong.
- If there is something wrong, make syscall 'SYS_geterr' to get
- error code to see what exactly happens and store it in errno . */
- syscall SYS_utime
- addi $r1, $r0, 1
- bnez $r1, .Ldone
- syscall SYS_geterr
- s.w $r0, errno
- movi $r0, -1
-.Ldone:
- ret
- .size _utime, .-_utime
diff --git a/libgloss/nds32/syscall_write.S b/libgloss/nds32/syscall_write.S
deleted file mode 100644
index 0b10f7e5f..000000000
--- a/libgloss/nds32/syscall_write.S
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
-Copyright (c) 2013 Andes Technology Corporation.
-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 the company 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.
-*/
-#include "../syscall.h"
-#include "syscall_extra.h"
-
-
- .extern errno
-
- .section .text
- .global _write
- .type _write, @function
- .align 2
-_write:
- /* Make syscall 'SYS_write'.
- Reture value '-1' stored in $r0 means there is something wrong.
- If there is something wrong, make syscall 'SYS_geterr' to get
- error code to see what exactly happens and store it in errno . */
- syscall SYS_write
- addi $r1, $r0, 1
- bnez $r1, .Ldone
- syscall SYS_geterr
- s.w $r0, errno
- movi $r0, -1
-.Ldone:
- ret
- .size _write, .-_write
diff --git a/libgloss/nds32/vh.h b/libgloss/nds32/vh.h
new file mode 100644
index 000000000..ca3a43f30
--- /dev/null
+++ b/libgloss/nds32/vh.h
@@ -0,0 +1,126 @@
+#ifndef _VH_H
+#define _VH_H
+
+/*
+BREAK #SWID definition:
+0x00 – 0x1F: Free to use
+0x20 – 0x1FF: Reserved for EX9
+0x0200 – 0x7EFF: Free to use
+0x7F00 – 0x7FFF: Reserved for virtual hosting
+*/
+/* These are #SWID defined for Virtual Hosting. */
+#define VH_FOPEN 0x7F00
+#define VH_FREOPEN 0x7F01
+#define VH_FCLOSE 0x7F02
+#define VH_FFLUSH 0x7F03
+#define VH_FREAD 0x7F04
+#define VH_FWRITE 0x7F05
+#define VH_FGETC 0x7F06
+#define VH_FGETS 0x7F07
+#define VH_FPUTC 0x7F08
+#define VH_FPUTS 0x7F09
+#define VH_UNGETC 0x7F0A
+#define VH_FTELL 0x7F0B
+#define VH_FSEEK 0x7F0C
+#define VH_REWIND 0x7F0D
+#define VH_CLEARERR 0x7F0E
+#define VH_FEOF 0x7F0F
+#define VH_FERROR 0x7F10
+#define VH_REMOVE 0x7F11
+#define VH_TMPFILE 0x7F12
+/* From here, define Low-level routines. */
+#define VH_EXIT 0x7F20
+#define VH_OPEN 0x7F21
+#define VH_CLOSE 0x7F22
+#define VH_READ 0x7F23
+#define VH_WRITE 0x7F24
+#define VH_LSEEK 0x7F25
+#define VH_UNLINK 0x7F26
+#define VH_RENAME 0x7F27
+#define VH_FSTAT 0x7F28
+#define VH_STAT 0x7F29
+#define VH_GETTIMEOFDAY 0x7F2A
+#define VH_ISATTY 0x7F2B
+#define VH_SYSTEM 0x7F2C
+#define VH_GETERR 0x7F2D /* The method we get errno. */
+#define VH_GETPID 0x7F2E
+#define VH_KILL 0x7F2F
+#define VH_TIMES 0x7F30
+
+
+/* Define macros that generate assembly output.
+ Generate a System Call exception to notify GDB
+ to handle this virtual I/O routine. */
+
+.macro TYPE0 name num
+/* If r0 is not NULL(0), set errno. */
+ .text
+ .global \name
+ .type \name, @function
+ .align 2
+\name:
+ BREAK \num /* Generate_Exception(Breakpoint); */
+ bnez $r0, 1f /* Branch if success.
+ r0 value is not NULL(0). */
+ BREAK VH_GETERR
+ l.w $r15, _impure_ptr
+ swi $r0, [$r15] /* Set errno. */
+ move $r0, 0 /* Set return value as 0. */
+1:
+ ret
+ .size \name, .-\name
+.endm
+
+.macro TYPE1 name num
+/* If r0 is EOF(-1), set errno. */
+ .text
+ .global \name
+ .type \name, @function
+ .align 2
+\name:
+ BREAK \num /* Generate_Exception(Breakpoint); */
+ addi $r15, $r0, 1
+ bnezs8 1f /* Branch if success.
+ r0 value is EOF(-1). */
+ BREAK VH_GETERR
+ l.w $r15, _impure_ptr
+ swi $r0, [$r15] /* Set errno. */
+ move $r0, -1 /* Set return value as -1. */
+1:
+ ret
+ .size \name, .-\name
+.endm
+
+.macro TYPE2 name num
+/* If r0 is less than r2, set errno. */
+ .text
+ .global \name
+ .type \name, @function
+ .align 2
+\name:
+ BREAK \num /* Generate_Exception(Breakpoint); */
+ slt $r15, $r0, $r2 /* If r15 is set, set errno. */
+ beqzs8 1f /* Branch if success.
+ r15 is zero. */
+ move $r4, $r0 /* Keep return value r0. */
+ BREAK VH_GETERR
+ l.w $r15, _impure_ptr
+ swi $r0, [$r15] /* Set errno. */
+ move $r0, $r4 /* Restore r0. */
+1:
+ ret
+ .size \name, .-\name
+.endm
+
+.macro TYPE3 name num
+/* No errors are defined. */
+ .text
+ .global \name
+ .type \name, @function
+ .align 2
+\name:
+ BREAK \num /* Generate_Exception(Breakpoint); */
+ ret
+ .size \name, .-\name
+.endm
+#endif /* _VH_H */
diff --git a/libgloss/or1k/Makefile.in b/libgloss/or1k/Makefile.in
new file mode 100644
index 000000000..f7d138ca7
--- /dev/null
+++ b/libgloss/or1k/Makefile.in
@@ -0,0 +1,146 @@
+# Copyright (c) 1998 Cygnus Support
+#
+# The authors hereby grant permission to use, copy, modify, distribute,
+# and license this software and its documentation for any purpose, provided
+# that existing copyright notices are retained in all copies and that this
+# notice is included verbatim in any distributions. No written agreement,
+# license, or royalty fee is required for any of the authorized uses.
+# Modifications to this software may be copyrighted by their authors
+# and need not follow the licensing terms described here, provided that
+# the new terms are clearly indicated on the first page of each file where
+# they apply.
+
+DESTDIR =
+VPATH = @srcdir@
+srcdir = @srcdir@
+objdir = .
+srcroot = $(srcdir)/../..
+objroot = $(objdir)/../..
+
+prefix = @prefix@
+exec_prefix = @exec_prefix@
+
+host_alias = @host_alias@
+target_alias = @target_alias@
+program_transform_name = @program_transform_name@
+
+bindir = @bindir@
+libdir = @libdir@
+includedir = @includedir@
+tooldir = $(exec_prefix)/$(target_alias)
+
+# Multilib support variables.
+# TOP is used instead of MULTI{BUILD,SRC}TOP.
+MULTIDIRS =
+MULTISUBDIR =
+MULTIDO = true
+MULTICLEAN = true
+
+INSTALL = @INSTALL@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_DATA = @INSTALL_DATA@
+
+SHELL = /bin/sh
+
+CC = @CC@
+AS = @AS@
+AR = @AR@
+LD = @LD@
+RANLIB = @RANLIB@
+
+OBJDUMP = `if [ -f ${objroot}/../binutils/objdump ] ; \
+ then echo ${objroot}/../binutils/objdump ; \
+ else t='$(program_transform_name)'; echo objdump | sed -e $$t ; fi`
+OBJCOPY = `if [ -f ${objroot}/../binutils/objcopy ] ; \
+ then echo ${objroot}/../binutils/objcopy ; \
+ else t='$(program_transform_name)'; echo objcopy | sed -e $$t ; fi`
+
+# object files needed
+COMMON_FILES = syscalls \
+ or1k_uart \
+ outbyte \
+ caches-asm \
+ exceptions \
+ exceptions-asm \
+ interrupts \
+ interrupts-asm \
+ mmu-asm \
+ timer \
+ sbrk \
+ impure \
+ util \
+ sync-asm
+
+LIBOR1K_FILES = $(COMMON_FILES)
+LIBOR1K_OBJS = $(addsuffix .o,$(LIBOR1K_FILES))
+
+BOARDS = atlys \
+ de0_nano \
+ ml501 \
+ optimsoc \
+ or1ksim \
+ or1ksim-uart \
+ ordb1a3pe1500 \
+ ordb2a \
+ orpsocrefdesign
+
+BOARD_LIBS = $(addprefix libboard-,$(addsuffix .a,$(BOARDS)))
+BOARD_OBJS = $(addprefix libboard-,$(addsuffix .o,$(BOARDS)))
+
+GCC_LDFLAGS = `if [ -d ${objroot}/../gcc ] ; \
+ then echo -L${objroot}/../gcc ; fi`
+
+OUTPUTS = libor1k.a crt0.o ${BOARD_LIBS}
+
+# Host specific makefile fragment comes in here.
+@host_makefile_frag@
+
+
+all: ${OUTPUTS}
+
+#
+# here's where we build the library for each target
+#
+
+libor1k.a: $(LIBOR1K_OBJS)
+ ${AR} ${ARFLAGS} $@ $(LIBOR1K_OBJS)
+ ${RANLIB} $@
+
+libboard-%.o: boards/%.S
+ ${CC} ${CFLAGS} -o $@ -c $<
+
+libboard-%.o: boards/%.c
+ ${CC} ${CFLAGS} -o $@ -c $<
+
+libboard-%.a: libboard-%.o
+ ${AR} ${ARFLAGS} $@ $<
+ ${RANLIB} $@
+
+doc:
+
+clean mostlyclean:
+ rm -f $(OUTPUTS) $(BOARD_LIBS) *.i *~ *.o *-test *.srec *.dis *.map *.x
+
+distclean maintainer-clean realclean: clean
+ rm -f Makefile config.status $(OUTPUTS)
+
+.PHONY: install info install-info clean-info
+install:
+ @for outputs in ${OUTPUTS}; do\
+ mkdir -p $(DESTDIR)$(tooldir)/lib${MULTISUBDIR}; \
+ $(INSTALL_DATA) $${outputs} $(DESTDIR)$(tooldir)/lib${MULTISUBDIR}; \
+ done
+ $(INSTALL_DATA) ${srcdir}/include/or1k-support.h $(DESTDIR)$(tooldir)/include/
+ $(INSTALL_DATA) ${srcdir}/include/or1k-sprs.h $(DESTDIR)$(tooldir)/include/
+ $(INSTALL_DATA) ${srcdir}/include/or1k-asm.h $(DESTDIR)$(tooldir)/include/
+ $(INSTALL_DATA) ${srcdir}/include/or1k-nop.h $(DESTDIR)$(tooldir)/include/
+
+info:
+install-info:
+clean-info:
+
+Makefile: Makefile.in config.status @host_makefile_frag_path@
+ $(SHELL) config.status
+
+config.status: configure
+ $(SHELL) config.status --recheck
diff --git a/libgloss/or1k/README b/libgloss/or1k/README
new file mode 100644
index 000000000..e9b0a2048
--- /dev/null
+++ b/libgloss/or1k/README
@@ -0,0 +1,77 @@
+This document describes the internals of the port for OpenRISC
+1000. The API is documented in or1k-support.h as Doxygen comments.
+
+# Data Structures
+
++----------------+ 0x0
+| vectors |
++----------------+
+| text,data,.. |
++----------------+
+| bss |
++----------------+
+| heap |
+| vv |
+| |
+| ^^ |
+| stack(s) |
++----------------+ _or1k_board_mem_base +
+ _or1k_board_mem_size
+
+## Stack and Heap
+
+The stack is allocated at the end of available physical memory which
+is defined by each board as _or1k_board_mem_base and
+_or1k_board_mem_size. The _or1k_stack_top and _or1k_stack_bottom are
+determined by those variables and _or1k_stack_size (which may be
+overwritten in _or1k_board_init_early).
+
+A second stack for exceptions is allocated as we allow exceptions to
+be arbitrary complex and call C functions etc. It is not an option to
+re-use the current software stack as we want to be so generic, that
+this can also be a virtual memory stack at moment of exception. The
+exception starts below the normal software stack and is
+_or1k_exception_stack_size large.
+
+Multicore: For each core a stack and exception stack is allocated and
+the stack pointer set at boot. That is: sp(core0) = _or1k_stack_top,
+sp(core1) = _or1k_stack_top - _or1k_stack_size, etc.
+
+## _or1k_stack_core (multicore only)
+
+An array of pointers to the software stacks (size:
+4*or1k_numcores()). It is dynamically allocated from heap in or1k_init
+by calling sbrk(). The pointers contain the values for stack top
+pointers as described above. This variable is essentially used on boot
+of the slave cores to configure the stack register.
+
+## _or1k_exception_stack_core (multicore only)
+
+An array of pointers to the exception stacks (size:
+4*or1k_numcores()). It is allocated identical as the stack_core
+array. It is loaded whenever an exception occurs to start with a clean
+stack in the exception.
+
+## _or1k_exception_handler_table
+
+A table of function pointers to the handlers of the exceptions. The
+generic exception handler checks if an exception handler is registered
+and calls it. There are 30 exceptions defined (0x0 is not an exception
+vector and 0x100 is reset which is static). This array resides in BSS
+and is therefore initialized as 0 (no handler registered) after start.
+
+Multicore: As the number of course is not known at compile time, the
+variable is a pointer to and array of arrays (cores x 30) which is
+allocated in or1k_init() on heap (using sbrk).
+
+## _or1k_interrupt_handler_table and _or1k_interrupt_handler_table_data_ptr
+
+The interrupt handlers are stored identical to to the exception handler table.
+
+## _or1k_reent
+
+The struct _or1k_reent contains formerly global data and allows for
+reentrancy. In the single core case, this is an allocated object,
+while it is a pointer to an array of structs in the multicore library.
+It is allocated in _or1k_reent_init() on the heap.
+
diff --git a/libgloss/or1k/aclocal.m4 b/libgloss/or1k/aclocal.m4
new file mode 100644
index 000000000..6ba621054
--- /dev/null
+++ b/libgloss/or1k/aclocal.m4
@@ -0,0 +1,409 @@
+# generated automatically by aclocal 1.11.6 -*- Autoconf -*-
+
+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
+# 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation,
+# Inc.
+# This file 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.
+
+# AM_CONDITIONAL -*- Autoconf -*-
+
+# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008
+# Free Software Foundation, Inc.
+#
+# This file 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.
+
+# serial 9
+
+# AM_CONDITIONAL(NAME, SHELL-CONDITION)
+# -------------------------------------
+# Define a conditional.
+AC_DEFUN([AM_CONDITIONAL],
+[AC_PREREQ(2.52)dnl
+ ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])],
+ [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
+AC_SUBST([$1_TRUE])dnl
+AC_SUBST([$1_FALSE])dnl
+_AM_SUBST_NOTMAKE([$1_TRUE])dnl
+_AM_SUBST_NOTMAKE([$1_FALSE])dnl
+m4_define([_AM_COND_VALUE_$1], [$2])dnl
+if $2; then
+ $1_TRUE=
+ $1_FALSE='#'
+else
+ $1_TRUE='#'
+ $1_FALSE=
+fi
+AC_CONFIG_COMMANDS_PRE(
+[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
+ AC_MSG_ERROR([[conditional "$1" was never defined.
+Usually this means the macro was only invoked conditionally.]])
+fi])])
+
+# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009,
+# 2010, 2011 Free Software Foundation, Inc.
+#
+# This file 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.
+
+# serial 12
+
+# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
+# written in clear, in which case automake, when reading aclocal.m4,
+# will think it sees a *use*, and therefore will trigger all it's
+# C support machinery. Also note that it means that autoscan, seeing
+# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
+
+
+# _AM_DEPENDENCIES(NAME)
+# ----------------------
+# See how the compiler implements dependency checking.
+# NAME is "CC", "CXX", "GCJ", or "OBJC".
+# We try a few techniques and use that to set a single cache variable.
+#
+# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
+# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
+# dependency, and given that the user is not expected to run this macro,
+# just rely on AC_PROG_CC.
+AC_DEFUN([_AM_DEPENDENCIES],
+[AC_REQUIRE([AM_SET_DEPDIR])dnl
+AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
+AC_REQUIRE([AM_MAKE_INCLUDE])dnl
+AC_REQUIRE([AM_DEP_TRACK])dnl
+
+ifelse([$1], CC, [depcc="$CC" am_compiler_list=],
+ [$1], CXX, [depcc="$CXX" am_compiler_list=],
+ [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
+ [$1], UPC, [depcc="$UPC" am_compiler_list=],
+ [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'],
+ [depcc="$$1" am_compiler_list=])
+
+AC_CACHE_CHECK([dependency style of $depcc],
+ [am_cv_$1_dependencies_compiler_type],
+[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
+ # We make a subdir and do the tests there. Otherwise we can end up
+ # making bogus files that we don't know about and never remove. For
+ # instance it was reported that on HP-UX the gcc test will end up
+ # making a dummy file named `D' -- because `-MD' means `put the output
+ # in D'.
+ rm -rf conftest.dir
+ mkdir conftest.dir
+ # Copy depcomp to subdir because otherwise we won't find it if we're
+ # using a relative directory.
+ cp "$am_depcomp" conftest.dir
+ cd conftest.dir
+ # We will build objects and dependencies in a subdirectory because
+ # it helps to detect inapplicable dependency modes. For instance
+ # both Tru64's cc and ICC support -MD to output dependencies as a
+ # side effect of compilation, but ICC will put the dependencies in
+ # the current directory while Tru64 will put them in the object
+ # directory.
+ mkdir sub
+
+ am_cv_$1_dependencies_compiler_type=none
+ if test "$am_compiler_list" = ""; then
+ am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
+ fi
+ am__universal=false
+ m4_case([$1], [CC],
+ [case " $depcc " in #(
+ *\ -arch\ *\ -arch\ *) am__universal=true ;;
+ esac],
+ [CXX],
+ [case " $depcc " in #(
+ *\ -arch\ *\ -arch\ *) am__universal=true ;;
+ esac])
+
+ for depmode in $am_compiler_list; do
+ # Setup a source with many dependencies, because some compilers
+ # like to wrap large dependency lists on column 80 (with \), and
+ # we should not choose a depcomp mode which is confused by this.
+ #
+ # We need to recreate these files for each test, as the compiler may
+ # overwrite some of them when testing with obscure command lines.
+ # This happens at least with the AIX C compiler.
+ : > sub/conftest.c
+ for i in 1 2 3 4 5 6; do
+ echo '#include "conftst'$i'.h"' >> sub/conftest.c
+ # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
+ # Solaris 8's {/usr,}/bin/sh.
+ touch sub/conftst$i.h
+ done
+ echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
+
+ # We check with `-c' and `-o' for the sake of the "dashmstdout"
+ # mode. It turns out that the SunPro C++ compiler does not properly
+ # handle `-M -o', and we need to detect this. Also, some Intel
+ # versions had trouble with output in subdirs
+ am__obj=sub/conftest.${OBJEXT-o}
+ am__minus_obj="-o $am__obj"
+ case $depmode in
+ gcc)
+ # This depmode causes a compiler race in universal mode.
+ test "$am__universal" = false || continue
+ ;;
+ nosideeffect)
+ # after this tag, mechanisms are not by side-effect, so they'll
+ # only be used when explicitly requested
+ if test "x$enable_dependency_tracking" = xyes; then
+ continue
+ else
+ break
+ fi
+ ;;
+ msvc7 | msvc7msys | msvisualcpp | msvcmsys)
+ # This compiler won't grok `-c -o', but also, the minuso test has
+ # not run yet. These depmodes are late enough in the game, and
+ # so weak that their functioning should not be impacted.
+ am__obj=conftest.${OBJEXT-o}
+ am__minus_obj=
+ ;;
+ none) break ;;
+ esac
+ if depmode=$depmode \
+ source=sub/conftest.c object=$am__obj \
+ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
+ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
+ >/dev/null 2>conftest.err &&
+ grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
+ grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
+ grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
+ ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
+ # icc doesn't choke on unknown options, it will just issue warnings
+ # or remarks (even with -Werror). So we grep stderr for any message
+ # that says an option was ignored or not supported.
+ # When given -MP, icc 7.0 and 7.1 complain thusly:
+ # icc: Command line warning: ignoring option '-M'; no argument required
+ # The diagnosis changed in icc 8.0:
+ # icc: Command line remark: option '-MP' not supported
+ if (grep 'ignoring option' conftest.err ||
+ grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
+ am_cv_$1_dependencies_compiler_type=$depmode
+ break
+ fi
+ fi
+ done
+
+ cd ..
+ rm -rf conftest.dir
+else
+ am_cv_$1_dependencies_compiler_type=none
+fi
+])
+AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
+AM_CONDITIONAL([am__fastdep$1], [
+ test "x$enable_dependency_tracking" != xno \
+ && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
+])
+
+
+# AM_SET_DEPDIR
+# -------------
+# Choose a directory name for dependency files.
+# This macro is AC_REQUIREd in _AM_DEPENDENCIES
+AC_DEFUN([AM_SET_DEPDIR],
+[AC_REQUIRE([AM_SET_LEADING_DOT])dnl
+AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
+])
+
+
+# AM_DEP_TRACK
+# ------------
+AC_DEFUN([AM_DEP_TRACK],
+[AC_ARG_ENABLE(dependency-tracking,
+[ --disable-dependency-tracking speeds up one-time build
+ --enable-dependency-tracking do not reject slow dependency extractors])
+if test "x$enable_dependency_tracking" != xno; then
+ am_depcomp="$ac_aux_dir/depcomp"
+ AMDEPBACKSLASH='\'
+ am__nodep='_no'
+fi
+AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
+AC_SUBST([AMDEPBACKSLASH])dnl
+_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
+AC_SUBST([am__nodep])dnl
+_AM_SUBST_NOTMAKE([am__nodep])dnl
+])
+
+# Generate code to set up dependency tracking. -*- Autoconf -*-
+
+# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008
+# Free Software Foundation, Inc.
+#
+# This file 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.
+
+#serial 5
+
+# _AM_OUTPUT_DEPENDENCY_COMMANDS
+# ------------------------------
+AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
+[{
+ # Autoconf 2.62 quotes --file arguments for eval, but not when files
+ # are listed without --file. Let's play safe and only enable the eval
+ # if we detect the quoting.
+ case $CONFIG_FILES in
+ *\'*) eval set x "$CONFIG_FILES" ;;
+ *) set x $CONFIG_FILES ;;
+ esac
+ shift
+ for mf
+ do
+ # Strip MF so we end up with the name of the file.
+ mf=`echo "$mf" | sed -e 's/:.*$//'`
+ # Check whether this is an Automake generated Makefile or not.
+ # We used to match only the files named `Makefile.in', but
+ # some people rename them; so instead we look at the file content.
+ # Grep'ing the first line is not enough: some people post-process
+ # each Makefile.in and add a new line on top of each file to say so.
+ # Grep'ing the whole file is not good either: AIX grep has a line
+ # limit of 2048, but all sed's we know have understand at least 4000.
+ if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
+ dirpart=`AS_DIRNAME("$mf")`
+ else
+ continue
+ fi
+ # Extract the definition of DEPDIR, am__include, and am__quote
+ # from the Makefile without running `make'.
+ DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
+ test -z "$DEPDIR" && continue
+ am__include=`sed -n 's/^am__include = //p' < "$mf"`
+ test -z "am__include" && continue
+ am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
+ # When using ansi2knr, U may be empty or an underscore; expand it
+ U=`sed -n 's/^U = //p' < "$mf"`
+ # Find all dependency output files, they are included files with
+ # $(DEPDIR) in their names. We invoke sed twice because it is the
+ # simplest approach to changing $(DEPDIR) to its actual value in the
+ # expansion.
+ for file in `sed -n "
+ s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
+ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
+ # Make sure the directory exists.
+ test -f "$dirpart/$file" && continue
+ fdir=`AS_DIRNAME(["$file"])`
+ AS_MKDIR_P([$dirpart/$fdir])
+ # echo "creating $dirpart/$file"
+ echo '# dummy' > "$dirpart/$file"
+ done
+ done
+}
+])# _AM_OUTPUT_DEPENDENCY_COMMANDS
+
+
+# AM_OUTPUT_DEPENDENCY_COMMANDS
+# -----------------------------
+# This macro should only be invoked once -- use via AC_REQUIRE.
+#
+# This code is only required when automatic dependency tracking
+# is enabled. FIXME. This creates each `.P' file that we will
+# need in order to bootstrap the dependency handling code.
+AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
+[AC_CONFIG_COMMANDS([depfiles],
+ [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
+ [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
+])
+
+# Copyright (C) 2003, 2005 Free Software Foundation, Inc.
+#
+# This file 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.
+
+# serial 2
+
+# Check whether the underlying file-system supports filenames
+# with a leading dot. For instance MS-DOS doesn't.
+AC_DEFUN([AM_SET_LEADING_DOT],
+[rm -rf .tst 2>/dev/null
+mkdir .tst 2>/dev/null
+if test -d .tst; then
+ am__leading_dot=.
+else
+ am__leading_dot=_
+fi
+rmdir .tst 2>/dev/null
+AC_SUBST([am__leading_dot])])
+
+# Check to see how 'make' treats includes. -*- Autoconf -*-
+
+# Copyright (C) 2001, 2002, 2003, 2005, 2009 Free Software Foundation, Inc.
+#
+# This file 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.
+
+# serial 4
+
+# AM_MAKE_INCLUDE()
+# -----------------
+# Check to see how make treats includes.
+AC_DEFUN([AM_MAKE_INCLUDE],
+[am_make=${MAKE-make}
+cat > confinc << 'END'
+am__doit:
+ @echo this is the am__doit target
+.PHONY: am__doit
+END
+# If we don't find an include directive, just comment out the code.
+AC_MSG_CHECKING([for style of include used by $am_make])
+am__include="#"
+am__quote=
+_am_result=none
+# First try GNU make style include.
+echo "include confinc" > confmf
+# Ignore all kinds of additional output from `make'.
+case `$am_make -s -f confmf 2> /dev/null` in #(
+*the\ am__doit\ target*)
+ am__include=include
+ am__quote=
+ _am_result=GNU
+ ;;
+esac
+# Now try BSD make style include.
+if test "$am__include" = "#"; then
+ echo '.include "confinc"' > confmf
+ case `$am_make -s -f confmf 2> /dev/null` in #(
+ *the\ am__doit\ target*)
+ am__include=.include
+ am__quote="\""
+ _am_result=BSD
+ ;;
+ esac
+fi
+AC_SUBST([am__include])
+AC_SUBST([am__quote])
+AC_MSG_RESULT([$_am_result])
+rm -f confinc confmf
+])
+
+# Copyright (C) 2006, 2008, 2010 Free Software Foundation, Inc.
+#
+# This file 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.
+
+# serial 3
+
+# _AM_SUBST_NOTMAKE(VARIABLE)
+# ---------------------------
+# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
+# This macro is traced by Automake.
+AC_DEFUN([_AM_SUBST_NOTMAKE])
+
+# AM_SUBST_NOTMAKE(VARIABLE)
+# --------------------------
+# Public sister of _AM_SUBST_NOTMAKE.
+AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
+
+m4_include([../acinclude.m4])
diff --git a/libgloss/or1k/board.h b/libgloss/or1k/board.h
new file mode 100644
index 000000000..d6b51bf8a
--- /dev/null
+++ b/libgloss/or1k/board.h
@@ -0,0 +1,35 @@
+/* board.h -- board variable definitions for OpenRISC 1000.
+ *
+ * Copyright (c) 2014 Authors
+ *
+ * Contributor Stefan Wallentowitz <stefan.wallentowitz@tum.de>
+ *
+ * The authors hereby grant permission to use, copy, modify, distribute,
+ * and license this software and its documentation for any purpose, provided
+ * that existing copyright notices are retained in all copies and that this
+ * notice is included verbatim in any distributions. No written agreement,
+ * license, or royalty fee is required for any of the authorized uses.
+ * Modifications to this software may be copyrighted by their authors
+ * and need not follow the licensing terms described here, provided that
+ * the new terms are clearly indicated on the first page of each file where
+ * they apply.
+ */
+
+#ifndef __BOARD_H__
+#define __BOARD_H__
+
+#include <stdint.h>
+
+extern void* _or1k_board_mem_base;
+extern uint32_t _or1k_board_mem_size;
+extern uint32_t _or1k_board_clk_freq;
+
+extern uint32_t _or1k_board_uart_base;
+extern uint32_t _or1k_board_uart_baud;
+extern uint32_t _or1k_board_uart_IRQ;
+
+extern void _or1k_board_exit(void);
+extern void _or1k_board_init_early(void);
+extern void _or1k_board_init(void);
+
+#endif // __BOARD_H__
diff --git a/libgloss/or1k/boards/README b/libgloss/or1k/boards/README
new file mode 100644
index 000000000..b6c5abf92
--- /dev/null
+++ b/libgloss/or1k/boards/README
@@ -0,0 +1,65 @@
+# Add a new board
+
+Before adding a new board, you may consider if your board can use another
+board definition and simply overwrite the weak symbols.
+
+If you think it is worth adding a new board, you need to perform the following
+steps:
+
+ * Decide for a meaningful board name (refered to as <board> below). It should
+ be specific enough (not openrisc..), but be rather generic if it may cover
+ similar boards as well.
+
+ * Create a file <board>.S (assembler) or <board>.c (C). Of course, C is easier
+ to write and you can implement everything in C, but there are restrictions:
+
+ * There is an early initialization function. It is called before the C
+ library and even the stack are initialized. A default implementation skips
+ this step, so everything will compile, but if you really need
+ initialization that early you are bound to assembly language.
+
+ * You essentially should not use the C library functions as this may lead to
+ link issues and circular dependencies.
+
+ You can copy board_tmpl.S or board_tmpl.c as starting point for your board.
+
+ * The following symbols must be defined in your board file:
+
+ * _or1k_board_mem_base: Memory base address
+
+ * _or1k_board_mem_size: Memory size
+
+ * _or1k_board_clk_freq: Clock frequency
+
+ * _or1k_board_uart_base: UART base address. Set to 0 if no UART present.
+
+ * _or1k_board_uart_baud: UART baud rate. Only used if UART base is > 0
+
+ * _or1k_board_uart_IRQ: UART interrupt line. Only used if UART base is > 0
+
+ You can define a weak attribute for all of the symbols so that they can
+ be overwritten by the user (more flexibility).
+
+ * The following functions need to be implemented:
+
+ * _or1k_board_init: Is called after C library initialization and UART
+ initialization.
+
+ * _or1k_board_exit: Is called after the program has exited and the C library
+ finished all deconstructions etc.
+
+ Similar to the symbols you can define those functions weak.
+
+ * The following functions can be implemented:
+
+ * _or1k_board_init_early: Only in assembly (see above). Is called before
+ anything is initialized, not even the stack! You can use all registers
+ in this function. The default implementation in crt0.S skips this step,
+ which is fine in most cases. If you decide to implement it, you need to
+ define it with the global attribute to overwrite the default
+ implementation. It is recommended to do so in assembler board files to
+ keep the ability to overwrite the default implementation by the user.
+
+When you are done with your board, add it to libgloss/or1k/Makefile.in to the
+BOARDS variable and compile.
+
diff --git a/libgloss/or1k/boards/atlys.S b/libgloss/or1k/boards/atlys.S
new file mode 100644
index 000000000..544504a1b
--- /dev/null
+++ b/libgloss/or1k/boards/atlys.S
@@ -0,0 +1,55 @@
+/* atlys.S -- Support for the Atlys board.
+ *
+ * Copyright (c) 2012 Authors
+ *
+ * Contributor Stefan Kristiansson <stefan.kristiansson@saunalahti.fi>
+ *
+ * The authors hereby grant permission to use, copy, modify, distribute,
+ * and license this software and its documentation for any purpose, provided
+ * that existing copyright notices are retained in all copies and that this
+ * notice is included verbatim in any distributions. No written agreement,
+ * license, or royalty fee is required for any of the authorized uses.
+ * Modifications to this software may be copyrighted by their authors
+ * and need not follow the licensing terms described here, provided that
+ * the new terms are clearly indicated on the first page of each file where
+ * they apply.
+ */
+
+#include "../include/or1k-asm.h"
+#include "../include/or1k-nop.h"
+
+/*
+ * Define symbols to be used during startup - file is linked at compile time
+ *
+ */
+.weak _or1k_board_mem_base
+.weak _or1k_board_mem_size
+.weak _or1k_board_clk_freq
+
+_or1k_board_mem_base: .long 0x0
+_or1k_board_mem_size: .long 0x2000000
+
+_or1k_board_clk_freq: .long 50000000
+
+/* Peripheral information - Set base to 0 if not present*/
+.weak _or1k_board_uart_base
+.weak _or1k_board_uart_baud
+.weak _or1k_board_uart_IRQ
+
+_or1k_board_uart_base: .long 0x90000000
+_or1k_board_uart_baud: .long 115200
+_or1k_board_uart_IRQ: .long 2
+
+.weak _or1k_board_exit
+_or1k_board_exit:
+ l.nop OR1K_NOP_K_EXIT_QUIET
+.Lexitloop:
+ OR1K_DELAYED_NOP(l.j .Lexitloop)
+
+.global _or1k_board_init_early
+_or1k_board_init_early:
+ OR1K_DELAYED_NOP(l.jr r9)
+
+.weak _or1k_board_init
+_or1k_board_init:
+ OR1K_DELAYED_NOP(l.jr r9)
diff --git a/libgloss/or1k/boards/de0_nano.S b/libgloss/or1k/boards/de0_nano.S
new file mode 100644
index 000000000..28686d1ee
--- /dev/null
+++ b/libgloss/or1k/boards/de0_nano.S
@@ -0,0 +1,57 @@
+/* de0_nano.S -- Support for the DE0 nano board.
+ *
+ * Copyright (c) 2012 Authors
+ *
+ * Contributor Stefan Kristiansson <stefan.kristiansson@saunalahti.fi>
+ *
+ * The authors hereby grant permission to use, copy, modify, distribute,
+ * and license this software and its documentation for any purpose, provided
+ * that existing copyright notices are retained in all copies and that this
+ * notice is included verbatim in any distributions. No written agreement,
+ * license, or royalty fee is required for any of the authorized uses.
+ * Modifications to this software may be copyrighted by their authors
+ * and need not follow the licensing terms described here, provided that
+ * the new terms are clearly indicated on the first page of each file where
+ * they apply.
+ */
+
+#include "../include/or1k-asm.h"
+#include "../include/or1k-nop.h"
+
+/*
+ * Define symbols to be used during startup - file is linked at compile time
+ *
+ */
+.weak _or1k_board_mem_base
+.weak _or1k_board_mem_size
+.weak _or1k_board_clk_freq
+
+_or1k_board_mem_base: .long 0x0
+_or1k_board_mem_size: .long 0x2000000
+
+_or1k_board_clk_freq: .long 50000000
+
+/* Peripheral information - Set base to 0 if not present*/
+.weak _or1k_board_uart_base
+.weak _or1k_board_uart_baud
+.weak _or1k_board_uart_IRQ
+
+_or1k_board_uart_base: .long 0x90000000
+_or1k_board_uart_baud: .long 115200
+_or1k_board_uart_IRQ: .long 2
+
+.weak _or1k_board_exit
+_or1k_board_exit:
+ l.nop OR1K_NOP_K_EXIT_QUIET
+.Lexitloop:
+ OR1K_DELAYED_NOP(l.j .Lexitloop)
+
+.global _or1k_board_init_early
+_or1k_board_init_early:
+ OR1K_DELAYED_NOP(l.jr r9)
+
+.weak _or1k_board_init
+_or1k_board_init:
+ OR1K_DELAYED_NOP(l.jr r9)
+
+
diff --git a/libgloss/or1k/boards/ml501.S b/libgloss/or1k/boards/ml501.S
new file mode 100644
index 000000000..98373d77b
--- /dev/null
+++ b/libgloss/or1k/boards/ml501.S
@@ -0,0 +1,55 @@
+/* ml501.S -- Support for the Xilinx ML501 board.
+ *
+ * Copyright (c) 2011 Authors
+ *
+ * Contributor Julius Baxter <juliusbaxter@gmail.com>
+ *
+ * The authors hereby grant permission to use, copy, modify, distribute,
+ * and license this software and its documentation for any purpose, provided
+ * that existing copyright notices are retained in all copies and that this
+ * notice is included verbatim in any distributions. No written agreement,
+ * license, or royalty fee is required for any of the authorized uses.
+ * Modifications to this software may be copyrighted by their authors
+ * and need not follow the licensing terms described here, provided that
+ * the new terms are clearly indicated on the first page of each file where
+ * they apply.
+ */
+
+#include "../include/or1k-asm.h"
+#include "../include/or1k-nop.h"
+
+/*
+ * Define symbols to be used during startup - file is linked at compile time
+ *
+ */
+.weak _or1k_board_mem_base
+.weak _or1k_board_mem_size
+.weak _or1k_board_clk_freq
+
+_or1k_board_mem_base: .long 0x0
+_or1k_board_mem_size: .long 0x800000
+
+_or1k_board_clk_freq: .long 66666666
+
+/* Peripheral information - Set base to 0 if not present*/
+.weak _or1k_board_uart_base
+.weak _or1k_board_uart_baud
+.weak _or1k_board_uart_IRQ
+
+_or1k_board_uart_base: .long 0x90000000
+_or1k_board_uart_baud: .long 115200
+_or1k_board_uart_IRQ: .long 2
+
+.weak _or1k_board_exit
+_or1k_board_exit:
+ l.nop OR1K_NOP_K_EXIT_QUIET
+.Lexitloop:
+ OR1K_DELAYED_NOP(l.j .Lexitloop)
+
+.global _or1k_board_init_early
+_or1k_board_init_early:
+ OR1K_DELAYED_NOP(l.jr r9)
+
+.weak _or1k_board_init
+_or1k_board_init:
+ OR1K_DELAYED_NOP(l.jr r9)
diff --git a/libgloss/or1k/boards/ml509.S b/libgloss/or1k/boards/ml509.S
new file mode 100644
index 000000000..c31be3bd6
--- /dev/null
+++ b/libgloss/or1k/boards/ml509.S
@@ -0,0 +1,55 @@
+/* ml509.S -- Support for the Xilinx ML509 board (XUPV5).
+ *
+ * Copyright (c) 2014 Authors
+ *
+ * Contributor Matthew Hicks <firefalcon@gmail.com>
+ *
+ * The authors hereby grant permission to use, copy, modify, distribute,
+ * and license this software and its documentation for any purpose, provided
+ * that existing copyright notices are retained in all copies and that this
+ * notice is included verbatim in any distributions. No written agreement,
+ * license, or royalty fee is required for any of the authorized uses.
+ * Modifications to this software may be copyrighted by their authors
+ * and need not follow the licensing terms described here, provided that
+ * the new terms are clearly indicated on the first page of each file where
+ * they apply.
+ */
+
+#include "../include/or1k-asm.h"
+#include "../include/or1k-nop.h"
+
+/*
+ * Define symbols to be used during startup - file is linked at compile time
+ *
+ */
+.weak _or1k_board_mem_base
+.weak _or1k_board_mem_size
+.weak _or1k_board_clk_freq
+
+_or1k_board_mem_base: .long 0x0
+_or1k_board_mem_size: .long 0x08000000
+
+_or1k_board_clk_freq: .long 50000000
+
+/* Peripheral information - Set base to 0 if not present*/
+.weak _or1k_board_uart_base
+.weak _or1k_board_uart_baud
+.weak _or1k_board_uart_IRQ
+
+_or1k_board_uart_base: .long 0x90000000
+_or1k_board_uart_baud: .long 115200
+_or1k_board_uart_IRQ: .long 2
+
+.weak _or1k_board_exit
+_or1k_board_exit:
+ l.nop OR1K_NOP_K_EXIT_QUIET
+.Lexitloop:
+ OR1K_DELAYED_NOP(l.j .Lexitloop)
+
+.global _or1k_board_init_early
+_or1k_board_init_early:
+ OR1K_DELAYED_NOP(l.jr r9)
+
+.weak _or1k_board_init
+_or1k_board_init:
+ OR1K_DELAYED_NOP(l.jr r9)
diff --git a/libgloss/or1k/boards/optimsoc.S b/libgloss/or1k/boards/optimsoc.S
new file mode 100644
index 000000000..824e7b107
--- /dev/null
+++ b/libgloss/or1k/boards/optimsoc.S
@@ -0,0 +1,97 @@
+/* optimsoc.S -- Support for OpTiMSoC systems.
+ *
+ * Copyright (c) 2014 Authors
+ *
+ * Contributor Stefan Wallentowitz <stefan.wallentowitz@saunalahti.fi>
+ *
+ * The authors hereby grant permission to use, copy, modify, distribute,
+ * and license this software and its documentation for any purpose, provided
+ * that existing copyright notices are retained in all copies and that this
+ * notice is included verbatim in any distributions. No written agreement,
+ * license, or royalty fee is required for any of the authorized uses.
+ * Modifications to this software may be copyrighted by their authors
+ * and need not follow the licensing terms described here, provided that
+ * the new terms are clearly indicated on the first page of each file where
+ * they apply.
+ */
+
+#include "../include/or1k-asm.h"
+#include "../include/or1k-nop.h"
+
+#define OPTIMSOC_NA_BASE 0xe0000000
+
+#define OPTIMSOC_NA_REGS OPTIMSOC_NA_BASE + 0x00000
+#define OPTIMSOC_NA_LMEM_SIZE OPTIMSOC_NA_REGS + 0x24
+#define OPTIMSOC_NA_GMEM_SIZE OPTIMSOC_NA_REGS + 0x1c
+
+#define OPTIMSOC_GZLL_STRING 0x677a6c6c
+#define OPTIMSOC_GZLL_IMAGE_LAYOUT 0x2000
+/*
+ * Define symbols to be used during startup - file is linked at compile time
+ *
+ */
+.weak _or1k_board_mem_base
+.weak _or1k_board_mem_size
+.weak _or1k_board_clk_freq
+
+_or1k_board_mem_base: .long 0x0
+_or1k_board_mem_size: .long 0x0
+
+_or1k_board_clk_freq: .long 50000000
+
+.weak _or1k_board_uart_base
+.weak _or1k_board_uart_baud
+.weak _or1k_board_uart_IRQ
+_or1k_board_uart_base: .long 0x0
+_or1k_board_uart_baud: .long 0
+_or1k_board_uart_IRQ: .long 0
+
+.weak _or1k_board_exit
+_or1k_board_exit:
+ l.nop OR1K_NOP_K_EXIT
+.Lexitloop:
+ OR1K_DELAYED_NOP(l.j .Lexitloop)
+
+.extern _or1k_heap_start
+
+.global _or1k_board_init_early
+_or1k_board_init_early:
+#ifndef __OR1K_MULTICORE__
+ l.nop 0x1
+.die:
+ OR1K_DELAYED_NOP(l.j .die)
+#endif
+ l.movhi r1,hi(OPTIMSOC_NA_LMEM_SIZE)
+ l.ori r1,r1,lo(OPTIMSOC_NA_LMEM_SIZE)
+ l.lwz r1,0(r1)
+ l.movhi r2,hi(_or1k_board_mem_size)
+ l.ori r2,r2,lo(_or1k_board_mem_size)
+ l.sw 0(r2),r1
+ // Set stack beyond apps if single image in local memory
+ // Is this a kernel running?
+ l.movhi r3,hi(OPTIMSOC_GZLL_STRING)
+ l.ori r3,r3,lo(OPTIMSOC_GZLL_STRING)
+ l.movhi r4,hi(OPTIMSOC_GZLL_IMAGE_LAYOUT)
+ l.ori r4,r4,lo(OPTIMSOC_GZLL_IMAGE_LAYOUT)
+ l.lwz r5,0(r4)
+ l.sfeq r3,r5
+ // If not, we are done
+ OR1K_DELAYED_NOP(l.bnf ._or1k_board_init_early_done)
+ // Else: are we running with global memory (loading)?
+ l.movhi r6,hi(OPTIMSOC_NA_GMEM_SIZE)
+ l.ori r6,r6,lo(OPTIMSOC_NA_GMEM_SIZE)
+ l.lwz r6,0(r6)
+ l.sfeqi r6,0
+ // If yes, we are done
+ OR1K_DELAYED_NOP(l.bnf ._or1k_board_init_early_done)
+ // Else: Read end of apps
+ l.lwz r7,12(r4)
+ l.movhi r8,hi(_or1k_heap_start)
+ l.ori r8,r8,lo(_or1k_heap_start)
+ l.sw 0(r8),r7
+._or1k_board_init_early_done:
+ OR1K_DELAYED_NOP(l.jr r9)
+
+.weak _or1k_board_init
+_or1k_board_init:
+ OR1K_DELAYED_NOP(l.jr r9)
diff --git a/libgloss/or1k/boards/or1ksim-uart.S b/libgloss/or1k/boards/or1ksim-uart.S
new file mode 100644
index 000000000..561ace375
--- /dev/null
+++ b/libgloss/or1k/boards/or1ksim-uart.S
@@ -0,0 +1,55 @@
+/* or1ksim-uart.S -- Support for or1ksim with UART support.
+ *
+ * Copyright (c) 2011 Authors
+ *
+ * Contributor Julius Baxter <juliusbaxter@gmail.com>
+ *
+ * The authors hereby grant permission to use, copy, modify, distribute,
+ * and license this software and its documentation for any purpose, provided
+ * that existing copyright notices are retained in all copies and that this
+ * notice is included verbatim in any distributions. No written agreement,
+ * license, or royalty fee is required for any of the authorized uses.
+ * Modifications to this software may be copyrighted by their authors
+ * and need not follow the licensing terms described here, provided that
+ * the new terms are clearly indicated on the first page of each file where
+ * they apply.
+ */
+
+#include "../include/or1k-asm.h"
+#include "../include/or1k-nop.h"
+
+/*
+ * Define symbols to be used during startup - file is linked at compile time
+ *
+ */
+
+.weak _or1k_board_mem_base
+.weak _or1k_board_mem_size
+.weak _or1k_board_clk_freq
+
+_or1k_board_mem_base: .long 0x0
+_or1k_board_mem_size: .long 0x800000
+_or1k_board_clk_freq: .long 100000000
+
+/* Peripheral information - Set base to 0 if not present*/
+.weak _or1k_board_uart_base
+.weak _or1k_board_uart_baud
+.weak _or1k_board_uart_IRQ
+
+_or1k_board_uart_base: .long 0x90000000
+_or1k_board_uart_baud: .long 115200
+_or1k_board_uart_IRQ: .long 2
+
+.weak _or1k_board_exit
+_or1k_board_exit:
+ l.nop OR1K_NOP_K_EXIT_QUIET
+.Lexitloop:
+ OR1K_DELAYED_NOP(l.j .Lexitloop)
+
+.global _or1k_board_init_early
+_or1k_board_init_early:
+ OR1K_DELAYED_NOP(l.jr r9)
+
+.weak _or1k_board_init
+_or1k_board_init:
+ OR1K_DELAYED_NOP(l.jr r9)
diff --git a/libgloss/or1k/boards/or1ksim.S b/libgloss/or1k/boards/or1ksim.S
new file mode 100644
index 000000000..946778a9c
--- /dev/null
+++ b/libgloss/or1k/boards/or1ksim.S
@@ -0,0 +1,56 @@
+/* or1ksim.S -- Support for or1ksim.
+ *
+ * Copyright (c) 2011 Authors
+ *
+ * Contributor Julius Baxter <juliusbaxter@gmail.com>
+ *
+ * The authors hereby grant permission to use, copy, modify, distribute,
+ * and license this software and its documentation for any purpose, provided
+ * that existing copyright notices are retained in all copies and that this
+ * notice is included verbatim in any distributions. No written agreement,
+ * license, or royalty fee is required for any of the authorized uses.
+ * Modifications to this software may be copyrighted by their authors
+ * and need not follow the licensing terms described here, provided that
+ * the new terms are clearly indicated on the first page of each file where
+ * they apply.
+ */
+
+#include "../include/or1k-asm.h"
+#include "../include/or1k-nop.h"
+
+/*
+ * Define symbols to be used during startup - file is linked at compile time
+ *
+ */
+.weak _or1k_board_mem_base
+.weak _or1k_board_mem_size
+.weak _or1k_board_clk_freq
+
+_or1k_board_mem_base: .long 0x0
+_or1k_board_mem_size: .long 0x800000
+
+_or1k_board_clk_freq: .long 100000000
+
+/* Peripheral information - Set base to 0 if not present*/
+.weak _or1k_board_uart_base
+.weak _or1k_board_uart_baud
+.weak _or1k_board_uart_IRQ
+
+_or1k_board_uart_base: .long 0x0
+_or1k_board_uart_baud: .long 115200
+_or1k_board_uart_IRQ: .long 13
+
+.weak _or1k_board_exit
+_or1k_board_exit:
+ l.nop OR1K_NOP_K_EXIT_QUIET
+.Lexitloop:
+ OR1K_DELAYED_NOP(l.j .Lexitloop)
+
+.global _or1k_board_init_early
+_or1k_board_init_early:
+ OR1K_DELAYED_NOP(l.jr r9)
+
+.weak _or1k_board_init
+_or1k_board_init:
+ OR1K_DELAYED_NOP(l.jr r9)
+
diff --git a/libgloss/or1k/boards/ordb1a3pe1500.S b/libgloss/or1k/boards/ordb1a3pe1500.S
new file mode 100644
index 000000000..47b8e5423
--- /dev/null
+++ b/libgloss/or1k/boards/ordb1a3pe1500.S
@@ -0,0 +1,55 @@
+/* ordb1a3pe1500.S -- Support for orpsocv2 Actel board.
+ *
+ * Copyright (c) 2011 Authors
+ *
+ * Contributor Julius Baxter <juliusbaxter@gmail.com>
+ *
+ * The authors hereby grant permission to use, copy, modify, distribute,
+ * and license this software and its documentation for any purpose, provided
+ * that existing copyright notices are retained in all copies and that this
+ * notice is included verbatim in any distributions. No written agreement,
+ * license, or royalty fee is required for any of the authorized uses.
+ * Modifications to this software may be copyrighted by their authors
+ * and need not follow the licensing terms described here, provided that
+ * the new terms are clearly indicated on the first page of each file where
+ * they apply.
+ */
+
+#include "../include/or1k-asm.h"
+#include "../include/or1k-nop.h"
+
+/*
+ * Define symbols to be used during startup - file is linked at compile time
+ *
+ */
+.weak _or1k_board_mem_base
+.weak _or1k_board_mem_size
+.weak _or1k_board_clk_freq
+
+_or1k_board_mem_base: .long 0x0
+_or1k_board_mem_size: .long 0x02000000
+
+_or1k_board_clk_freq: .long 20000000
+
+/* Peripheral information - Set base to 0 if not present*/
+.weak _or1k_board_uart_base
+.weak _or1k_board_uart_baud
+.weak _or1k_board_uart_IRQ
+
+_or1k_board_uart_base: .long 0x90000000
+_or1k_board_uart_baud: .long 115200
+_or1k_board_uart_IRQ: .long 2
+
+.weak _or1k_board_exit
+_or1k_board_exit:
+ l.nop OR1K_NOP_K_EXIT_QUIET
+.Lexitloop:
+ OR1K_DELAYED_NOP(l.j .Lexitloop)
+
+.global _or1k_board_init_early
+_or1k_board_init_early:
+ OR1K_DELAYED_NOP(l.jr r9)
+
+.weak _or1k_board_init
+_or1k_board_init:
+ OR1K_DELAYED_NOP(l.jr r9)
diff --git a/libgloss/or1k/boards/ordb2a.S b/libgloss/or1k/boards/ordb2a.S
new file mode 100644
index 000000000..9ba23a3ca
--- /dev/null
+++ b/libgloss/or1k/boards/ordb2a.S
@@ -0,0 +1,55 @@
+/* ordb2a.S -- Support for the new OpenRISC ORPSoC reference design.
+ *
+ * Copyright (c) 2012 Authors
+ *
+ * Contributor Olof Kindgren <olof.kindgren@gmail.com>
+ *
+ * The authors hereby grant permission to use, copy, modify, distribute,
+ * and license this software and its documentation for any purpose, provided
+ * that existing copyright notices are retained in all copies and that this
+ * notice is included verbatim in any distributions. No written agreement,
+ * license, or royalty fee is required for any of the authorized uses.
+ * Modifications to this software may be copyrighted by their authors
+ * and need not follow the licensing terms described here, provided that
+ * the new terms are clearly indicated on the first page of each file where
+ * they apply.
+ */
+
+#include "../include/or1k-asm.h"
+#include "../include/or1k-nop.h"
+
+/*
+ * Define symbols to be used during startup - file is linked at compile time
+ * Olof Kindgren olof at opencores.org
+ */
+.weak _or1k_board_mem_base
+.weak _or1k_board_mem_size
+.weak _or1k_board_clk_freq
+
+_or1k_board_mem_base: .long 0x0
+_or1k_board_mem_size: .long 0x02000000
+
+_or1k_board_clk_freq: .long 50000000
+
+/* Peripheral information - Set base to 0 if not present*/
+.weak _or1k_board_uart_base
+.weak _or1k_board_uart_baud
+.weak _or1k_board_uart_IRQ
+
+_or1k_board_uart_base: .long 0x90000000
+_or1k_board_uart_baud: .long 115200
+_or1k_board_uart_IRQ: .long 2
+
+.weak _or1k_board_exit
+_or1k_board_exit:
+ l.nop OR1K_NOP_K_EXIT_QUIET
+.Lexitloop:
+ OR1K_DELAYED_NOP(l.j .Lexitloop)
+
+.global _or1k_board_init_early
+_or1k_board_init_early:
+ OR1K_DELAYED_NOP(l.jr r9)
+
+.weak _or1k_board_init
+_or1k_board_init:
+ OR1K_DELAYED_NOP(l.jr r9)
diff --git a/libgloss/or1k/boards/orpsocrefdesign.S b/libgloss/or1k/boards/orpsocrefdesign.S
new file mode 100644
index 000000000..331f96be8
--- /dev/null
+++ b/libgloss/or1k/boards/orpsocrefdesign.S
@@ -0,0 +1,55 @@
+/* orpsocrefdesign.S -- Support for the orpsoc reference design.
+ *
+ * Copyright (c) 2011 Authors
+ *
+ * Contributor Julius Baxter <juliusbaxter@gmail.com>
+ *
+ * The authors hereby grant permission to use, copy, modify, distribute,
+ * and license this software and its documentation for any purpose, provided
+ * that existing copyright notices are retained in all copies and that this
+ * notice is included verbatim in any distributions. No written agreement,
+ * license, or royalty fee is required for any of the authorized uses.
+ * Modifications to this software may be copyrighted by their authors
+ * and need not follow the licensing terms described here, provided that
+ * the new terms are clearly indicated on the first page of each file where
+ * they apply.
+ */
+
+#include "../include/or1k-asm.h"
+#include "../include/or1k-nop.h"
+
+/*
+ * Define symbols to be used during startup - file is linked at compile time
+ *
+ */
+.weak _or1k_board_mem_base
+.weak _or1k_board_mem_size
+.weak _or1k_board_clk_freq
+
+_or1k_board_mem_base: .long 0x0
+_or1k_board_mem_size: .long 0x800000
+
+_or1k_board_clk_freq: .long 50000000
+
+/* Peripheral information - Set base to 0 if not present*/
+.weak _or1k_board_uart_base
+.weak _or1k_board_uart_baud
+.weak _or1k_board_uart_IRQ
+
+_or1k_board_uart_base: .long 0
+_or1k_board_uart_baud: .long 115200
+_or1k_board_uart_IRQ: .long 2
+
+.weak _or1k_board_exit
+_or1k_board_exit:
+ l.nop OR1K_NOP_K_EXIT_QUIET
+.Lexitloop:
+ OR1K_DELAYED_NOP(l.j .Lexitloop)
+
+.global _or1k_board_init_early
+_or1k_board_init_early:
+ OR1K_DELAYED_NOP(l.jr r9)
+
+.weak _or1k_board_init
+_or1k_board_init:
+ OR1K_DELAYED_NOP(l.jr r9)
diff --git a/libgloss/or1k/boards/tmpl.S b/libgloss/or1k/boards/tmpl.S
new file mode 100644
index 000000000..523ecef28
--- /dev/null
+++ b/libgloss/or1k/boards/tmpl.S
@@ -0,0 +1,60 @@
+/* tmpl.S -- Template for new boards.
+ *
+ * Copyright (c) 2014 Authors
+ *
+ * Contributor Stefan Wallentowitz <stefan.wallentowitz@saunalahti.fi>
+ *
+ * The authors hereby grant permission to use, copy, modify, distribute,
+ * and license this software and its documentation for any purpose, provided
+ * that existing copyright notices are retained in all copies and that this
+ * notice is included verbatim in any distributions. No written agreement,
+ * license, or royalty fee is required for any of the authorized uses.
+ * Modifications to this software may be copyrighted by their authors
+ * and need not follow the licensing terms described here, provided that
+ * the new terms are clearly indicated on the first page of each file where
+ * they apply.
+ */
+
+#include "../include/or1k-asm.h"
+#include "../include/or1k-nop.h"
+
+/*
+ * Define symbols to be used during startup - file is linked at compile time
+ *
+ */
+.weak _or1k_board_mem_base
+.weak _or1k_board_mem_size
+.weak _or1k_board_clk_freq
+
+// TODO: set memory base here
+_or1k_board_mem_base: .long 0x0
+// TODO: set memory size here
+_or1k_board_mem_size: .long 0x0
+
+// TODO: set board clock frequency here
+_or1k_board_clk_freq: .long 50000000
+
+// TODO: UART configuration
+.weak _or1k_board_uart_base
+.weak _or1k_board_uart_baud
+.weak _or1k_board_uart_IRQ
+_or1k_board_uart_base: .long 0x0
+_or1k_board_uart_baud: .long 0
+_or1k_board_uart_IRQ: .long 0
+
+// TODO: Board exit function, default: loop
+.weak _or1k_board_exit
+_or1k_board_exit:
+ l.nop OR1K_NOP_EXIT_SILENT
+.Lexitloop:
+ OR1K_DELAYED_NOP(l.j .Lexitloop)
+
+// TODO: Early initialization (if really needed!)
+.global _or1k_board_init_early
+_or1k_board_init_early:
+ OR1K_DELAYED_NOP(l.jr r9)
+
+// TODO: Board initialization
+.weak _or1k_board_init
+_or1k_board_init:
+ OR1K_DELAYED_NOP(l.jr r9)
diff --git a/libgloss/or1k/boards/tmpl.c b/libgloss/or1k/boards/tmpl.c
new file mode 100644
index 000000000..ffc725815
--- /dev/null
+++ b/libgloss/or1k/boards/tmpl.c
@@ -0,0 +1,40 @@
+/* tmpl.c -- Template for new boards.
+ *
+ * Copyright (c) 2014 Authors
+ *
+ * Contributor Stefan Wallentowitz <stefan.wallentowitz@saunalahti.fi>
+ *
+ * The authors hereby grant permission to use, copy, modify, distribute,
+ * and license this software and its documentation for any purpose, provided
+ * that existing copyright notices are retained in all copies and that this
+ * notice is included verbatim in any distributions. No written agreement,
+ * license, or royalty fee is required for any of the authorized uses.
+ * Modifications to this software may be copyrighted by their authors
+ * and need not follow the licensing terms described here, provided that
+ * the new terms are clearly indicated on the first page of each file where
+ * they apply.
+ */
+
+// TODO: set memory base here
+unsigned long __attribute__((weak)) _or1k_board_mem_base = 0x0;
+
+// TODO: set memory size here
+unsigned long __attribute__((weak)) _or1k_board_mem_size = 0x0;
+
+// TODO: set board clock frequency here
+unsigned long __attribute__((weak)) _or1k_board_clk_freq = 0x0;
+
+// TODO: UART configuration
+unsigned long __attribute__((weak)) _or1k_board_uart_base = 0x0;
+unsigned long __attribute__((weak)) _or1k_board_uart_baud = 0x0;
+unsigned long __attribute__((weak)) _or1k_board_uart_IRQ = 0x0;
+
+// TODO: Board exit function, default: loop
+void __attribute__((weak)) _or1k_board_exit(void) {
+ while (1) {}
+}
+
+// TODO: Board initialization
+void __attribute__((weak)) _or1k_board_init(void) {
+ return;
+}
diff --git a/libgloss/or1k/caches-asm.S b/libgloss/or1k/caches-asm.S
new file mode 100644
index 000000000..f2ac09660
--- /dev/null
+++ b/libgloss/or1k/caches-asm.S
@@ -0,0 +1,233 @@
+/* caches-asm.S -- cache manipulation for OpenRISC 1000.
+ *
+ * Copyright (c) 2011, 2014 Authors
+ *
+ * Contributor Julius Baxter <juliusbaxter@gmail.com>
+ * Contributor Stefan Wallentowitz <stefan.wallentowitz@tum.de>
+ *
+ * The authors hereby grant permission to use, copy, modify, distribute,
+ * and license this software and its documentation for any purpose, provided
+ * that existing copyright notices are retained in all copies and that this
+ * notice is included verbatim in any distributions. No written agreement,
+ * license, or royalty fee is required for any of the authorized uses.
+ * Modifications to this software may be copyrighted by their authors
+ * and need not follow the licensing terms described here, provided that
+ * the new terms are clearly indicated on the first page of each file where
+ * they apply.
+ */
+
+#include "include/or1k-asm.h"
+#include "include/or1k-sprs.h"
+
+/* -------------------------------------------------------------------------- */
+/*!Function used at reset to clear and enable all caches
+ */
+/* -------------------------------------------------------------------------- */
+ .global _or1k_cache_init
+ .type _or1k_cache_init,@function
+
+_or1k_cache_init:
+ /* Instruction cache enable */
+ /* Check if IC present and skip enabling otherwise */
+ l.mfspr r3,r0,OR1K_SPR_SYS_UPR_ADDR
+ l.andi r4,r3,OR1K_SPR_SYS_UPR_ICP_MASK
+ l.sfeq r4,r0
+ OR1K_DELAYED_NOP(OR1K_INST(l.bf .Lnoic))
+
+ /* Disable IC */
+ l.mfspr r6,r0,OR1K_SPR_SYS_SR_ADDR
+ l.addi r5,r0,-1
+ l.xori r5,r5,OR1K_SPR_SYS_SR_ICE_MASK
+ l.and r5,r6,r5
+ l.mtspr r0,r5,OR1K_SPR_SYS_SR_ADDR
+
+ /* Establish cache block size
+ If BS=0, 16;
+ If BS=1, 32;
+ r14 contain block size
+ */
+ l.mfspr r3,r0,OR1K_SPR_SYS_ICCFGR_ADDR
+ l.andi r4,r3,OR1K_SPR_SYS_ICCFGR_CBS_MASK
+ l.srli r7,r4,7
+ l.ori r8,r0,16
+ l.sll r14,r8,r7
+
+ /* Establish number of cache sets
+ r13 contains number of cache sets
+ r7 contains log(# of cache sets)
+ */
+ l.andi r4,r3,OR1K_SPR_SYS_ICCFGR_NCS_MASK
+ l.srli r7,r4,3
+ l.ori r8,r0,1
+ l.sll r13,r8,r7
+
+ /* Invalidate IC */
+ l.addi r6,r0,0
+ l.sll r5,r14,r7
+
+.Linvi: l.mtspr r0,r6,OR1K_SPR_ICACHE_ICBIR_ADDR
+ l.sfne r6,r5
+ OR1K_DELAYED(
+ OR1K_INST(l.add r6,r6,r14),
+ OR1K_INST(l.bf .Linvi)
+ )
+
+ /* Enable IC */
+ l.mfspr r6,r0,OR1K_SPR_SYS_SR_ADDR
+ l.ori r6,r6,OR1K_SPR_SYS_SR_ICE_MASK
+ l.mtspr r0,r6,OR1K_SPR_SYS_SR_ADDR
+ l.nop
+ l.nop
+ l.nop
+ l.nop
+ l.nop
+ l.nop
+ l.nop
+ l.nop
+
+ /* Data cache enable */
+ /* Check if DC present and skip enabling otherwise */
+.Lnoic: l.mfspr r3,r0,OR1K_SPR_SYS_UPR_ADDR
+ l.andi r4,r3,OR1K_SPR_SYS_UPR_DCP_MASK
+ l.sfeq r4,r0
+ OR1K_DELAYED_NOP(OR1K_INST(l.bf .Lnodc))
+ /* Disable DC */
+ l.mfspr r6,r0,OR1K_SPR_SYS_SR_ADDR
+ l.addi r5,r0,-1
+ l.xori r5,r5,OR1K_SPR_SYS_SR_DCE_MASK
+ l.and r5,r6,r5
+ l.mtspr r0,r5,OR1K_SPR_SYS_SR_ADDR
+ /* Establish cache block size
+ If BS=0, 16;
+ If BS=1, 32;
+ r14 contain block size */
+ l.mfspr r3,r0,OR1K_SPR_SYS_DCCFGR_ADDR
+ l.andi r4,r3,OR1K_SPR_SYS_DCCFGR_CBS_MASK
+ l.srli r7,r4,7
+ l.ori r8,r0,16
+ l.sll r14,r8,r7
+ /* Establish number of cache sets
+ r13 contains number of cache sets
+ r7 contains log(# of cache sets) */
+ l.andi r4,r3,OR1K_SPR_SYS_ICCFGR_NCS_MASK
+ l.srli r7,r4,3
+ l.ori r8,r0,1
+ l.sll r13,r8,r7
+ /* Invalidate DC */
+ l.addi r6,r0,0
+ l.sll r5,r14,r7
+
+.Linvd: l.mtspr r0,r6,OR1K_SPR_DCACHE_DCBIR_ADDR
+ l.sfne r6,r5
+ OR1K_DELAYED(
+ OR1K_INST(l.add r6,r6,r14),
+ OR1K_INST(l.bf .Linvd)
+ )
+ /* Enable DC */
+ l.mfspr r6,r0,OR1K_SPR_SYS_SR_ADDR
+ l.ori r6,r6,OR1K_SPR_SYS_SR_DCE_MASK
+ l.mtspr r0,r6,OR1K_SPR_SYS_SR_ADDR
+
+.Lnodc:
+ /* Return */
+ OR1K_DELAYED_NOP(OR1K_INST(l.jr r9))
+
+/* -------------------------------------------------------------------------- */
+/*!Function to enable instruction cache
+ */
+/* -------------------------------------------------------------------------- */
+
+ .global or1k_icache_enable
+ .type or1k_icache_enable,@function
+
+or1k_icache_enable:
+ /* Enable IC */
+ l.mfspr r13,r0,OR1K_SPR_SYS_SR_ADDR
+ l.ori r13,r13,OR1K_SPR_SYS_SR_ICE_MASK
+ l.mtspr r0,r13,OR1K_SPR_SYS_SR_ADDR
+ l.nop
+ l.nop
+ l.nop
+ l.nop
+ l.nop
+ OR1K_DELAYED_NOP(OR1K_INST(l.jr r9))
+
+/* -------------------------------------------------------------------------- */
+/*!Function to disable instruction cache
+ */
+/* -------------------------------------------------------------------------- */
+ .global or1k_icache_disable
+ .type or1k_icache_disable,@function
+
+or1k_icache_disable:
+ /* Disable IC */
+ l.mfspr r13,r0,OR1K_SPR_SYS_SR_ADDR
+ l.addi r12,r0,-1
+ l.xori r12,r12,OR1K_SPR_SYS_SR_ICE_MASK
+ l.and r12,r13,r12
+ l.mtspr r0,r12,OR1K_SPR_SYS_SR_ADDR
+ OR1K_DELAYED_NOP(OR1K_INST(l.jr r9))
+
+/* -------------------------------------------------------------------------- */
+/*!Function to flush address of instruction cache
+ */
+/* -------------------------------------------------------------------------- */
+ .global or1k_icache_flush
+ .type or1k_icache_flush,@function
+
+or1k_icache_flush:
+ OR1K_DELAYED(
+ OR1K_INST(l.mtspr r0,r3,OR1K_SPR_ICACHE_ICBIR_ADDR),
+ /* Push r3 into IC invalidate reg */
+ OR1K_INST(l.jr r9)
+ )
+
+
+/* -------------------------------------------------------------------------- */
+/*!Function to enable data cache
+ */
+/* -------------------------------------------------------------------------- */
+ .global or1k_dcache_enable
+ .type or1k_dcache_enable,@function
+
+or1k_dcache_enable:
+ /* Enable DC */
+ l.mfspr r13,r0,OR1K_SPR_SYS_SR_ADDR
+ l.ori r13,r13,OR1K_SPR_SYS_SR_DCE_MASK
+ l.mtspr r0,r13,OR1K_SPR_SYS_SR_ADDR
+ l.nop
+ l.nop
+ l.nop
+ l.nop
+ l.nop
+ OR1K_DELAYED_NOP(OR1K_INST(l.jr r9))
+
+/* -------------------------------------------------------------------------- */
+/*!Function to disable data cache
+ */
+/* -------------------------------------------------------------------------- */
+ .global or1k_dcache_disable
+ .type or1k_dcache_disable,@function
+
+or1k_dcache_disable:
+ /* Disable DC */
+ l.mfspr r13,r0,OR1K_SPR_SYS_SR_ADDR
+ l.addi r12,r0,-1
+ l.xori r12,r12,OR1K_SPR_SYS_SR_DCE_MASK
+ l.and r12,r13,r12
+ l.mtspr r0,r12,OR1K_SPR_SYS_SR_ADDR
+ OR1K_DELAYED_NOP(OR1K_INST(l.jr r9))
+
+/* -------------------------------------------------------------------------- */
+/*!Function to flush address of data cache
+ */
+/* -------------------------------------------------------------------------- */
+ .global or1k_dcache_flush
+ .type or1k_dcache_flush,@function
+
+or1k_dcache_flush:
+ OR1K_DELAYED(
+ OR1K_INST(l.mtspr r0,r3,OR1K_SPR_DCACHE_DCBIR_ADDR),
+ /* Push r3 into DC invalidate reg */
+ OR1K_INST(l.jr r9)
+ )
diff --git a/libgloss/or1k/configure b/libgloss/or1k/configure
new file mode 100755
index 000000000..111331325
--- /dev/null
+++ b/libgloss/or1k/configure
@@ -0,0 +1,3892 @@
+#! /bin/sh
+# Guess values for system-dependent variables and create Makefiles.
+# Generated by GNU Autoconf 2.68 for libor1k 0.0.1.
+#
+#
+# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
+# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software
+# Foundation, Inc.
+#
+#
+# This configure script is free software; the Free Software Foundation
+# gives unlimited permission to copy, distribute and modify it.
+## -------------------- ##
+## M4sh Initialization. ##
+## -------------------- ##
+
+# Be more Bourne compatible
+DUALCASE=1; export DUALCASE # for MKS sh
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
+ emulate sh
+ NULLCMD=:
+ # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
+ # is contrary to our usage. Disable this feature.
+ alias -g '${1+"$@"}'='"$@"'
+ setopt NO_GLOB_SUBST
+else
+ case `(set -o) 2>/dev/null` in #(
+ *posix*) :
+ set -o posix ;; #(
+ *) :
+ ;;
+esac
+fi
+
+
+as_nl='
+'
+export as_nl
+# Printing a long string crashes Solaris 7 /usr/bin/printf.
+as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
+as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
+as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
+# Prefer a ksh shell builtin over an external printf program on Solaris,
+# but without wasting forks for bash or zsh.
+if test -z "$BASH_VERSION$ZSH_VERSION" \
+ && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
+ as_echo='print -r --'
+ as_echo_n='print -rn --'
+elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
+ as_echo='printf %s\n'
+ as_echo_n='printf %s'
+else
+ if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
+ as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
+ as_echo_n='/usr/ucb/echo -n'
+ else
+ as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
+ as_echo_n_body='eval
+ arg=$1;
+ case $arg in #(
+ *"$as_nl"*)
+ expr "X$arg" : "X\\(.*\\)$as_nl";
+ arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
+ esac;
+ expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
+ '
+ export as_echo_n_body
+ as_echo_n='sh -c $as_echo_n_body as_echo'
+ fi
+ export as_echo_body
+ as_echo='sh -c $as_echo_body as_echo'
+fi
+
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+ PATH_SEPARATOR=:
+ (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
+ (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
+ PATH_SEPARATOR=';'
+ }
+fi
+
+
+# IFS
+# We need space, tab and new line, in precisely that order. Quoting is
+# there to prevent editors from complaining about space-tab.
+# (If _AS_PATH_WALK were called with IFS unset, it would disable word
+# splitting by setting IFS to empty value.)
+IFS=" "" $as_nl"
+
+# Find who we are. Look in the path if we contain no directory separator.
+as_myself=
+case $0 in #((
+ *[\\/]* ) as_myself=$0 ;;
+ *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
+ done
+IFS=$as_save_IFS
+
+ ;;
+esac
+# We did not find ourselves, most probably we were run as `sh COMMAND'
+# in which case we are not to be found in the path.
+if test "x$as_myself" = x; then
+ as_myself=$0
+fi
+if test ! -f "$as_myself"; then
+ $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
+ exit 1
+fi
+
+# Unset variables that we do not need and which cause bugs (e.g. in
+# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
+# suppresses any "Segmentation fault" message there. '((' could
+# trigger a bug in pdksh 5.2.14.
+for as_var in BASH_ENV ENV MAIL MAILPATH
+do eval test x\${$as_var+set} = xset \
+ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
+done
+PS1='$ '
+PS2='> '
+PS4='+ '
+
+# NLS nuisances.
+LC_ALL=C
+export LC_ALL
+LANGUAGE=C
+export LANGUAGE
+
+# CDPATH.
+(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
+
+if test "x$CONFIG_SHELL" = x; then
+ as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
+ emulate sh
+ NULLCMD=:
+ # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
+ # is contrary to our usage. Disable this feature.
+ alias -g '\${1+\"\$@\"}'='\"\$@\"'
+ setopt NO_GLOB_SUBST
+else
+ case \`(set -o) 2>/dev/null\` in #(
+ *posix*) :
+ set -o posix ;; #(
+ *) :
+ ;;
+esac
+fi
+"
+ as_required="as_fn_return () { (exit \$1); }
+as_fn_success () { as_fn_return 0; }
+as_fn_failure () { as_fn_return 1; }
+as_fn_ret_success () { return 0; }
+as_fn_ret_failure () { return 1; }
+
+exitcode=0
+as_fn_success || { exitcode=1; echo as_fn_success failed.; }
+as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
+as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
+as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
+if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
+
+else
+ exitcode=1; echo positional parameters were not saved.
+fi
+test x\$exitcode = x0 || exit 1"
+ as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
+ as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
+ eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
+ test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1"
+ if (eval "$as_required") 2>/dev/null; then :
+ as_have_required=yes
+else
+ as_have_required=no
+fi
+ if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
+
+else
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+as_found=false
+for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ as_found=:
+ case $as_dir in #(
+ /*)
+ for as_base in sh bash ksh sh5; do
+ # Try only shells that exist, to save several forks.
+ as_shell=$as_dir/$as_base
+ if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
+ { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
+ CONFIG_SHELL=$as_shell as_have_required=yes
+ if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
+ break 2
+fi
+fi
+ done;;
+ esac
+ as_found=false
+done
+$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
+ { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
+ CONFIG_SHELL=$SHELL as_have_required=yes
+fi; }
+IFS=$as_save_IFS
+
+
+ if test "x$CONFIG_SHELL" != x; then :
+ # We cannot yet assume a decent shell, so we have to provide a
+ # neutralization value for shells without unset; and this also
+ # works around shells that cannot unset nonexistent variables.
+ # Preserve -v and -x to the replacement shell.
+ BASH_ENV=/dev/null
+ ENV=/dev/null
+ (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
+ export CONFIG_SHELL
+ case $- in # ((((
+ *v*x* | *x*v* ) as_opts=-vx ;;
+ *v* ) as_opts=-v ;;
+ *x* ) as_opts=-x ;;
+ * ) as_opts= ;;
+ esac
+ exec "$CONFIG_SHELL" $as_opts "$as_myself" ${1+"$@"}
+fi
+
+ if test x$as_have_required = xno; then :
+ $as_echo "$0: This script requires a shell more modern than all"
+ $as_echo "$0: the shells that I found on your system."
+ if test x${ZSH_VERSION+set} = xset ; then
+ $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
+ $as_echo "$0: be upgraded to zsh 4.3.4 or later."
+ else
+ $as_echo "$0: Please tell bug-autoconf@gnu.org about your system,
+$0: including any error possibly output before this
+$0: message. Then install a modern shell, or manually run
+$0: the script under such a shell if you do have one."
+ fi
+ exit 1
+fi
+fi
+fi
+SHELL=${CONFIG_SHELL-/bin/sh}
+export SHELL
+# Unset more variables known to interfere with behavior of common tools.
+CLICOLOR_FORCE= GREP_OPTIONS=
+unset CLICOLOR_FORCE GREP_OPTIONS
+
+## --------------------- ##
+## M4sh Shell Functions. ##
+## --------------------- ##
+# as_fn_unset VAR
+# ---------------
+# Portably unset VAR.
+as_fn_unset ()
+{
+ { eval $1=; unset $1;}
+}
+as_unset=as_fn_unset
+
+# as_fn_set_status STATUS
+# -----------------------
+# Set $? to STATUS, without forking.
+as_fn_set_status ()
+{
+ return $1
+} # as_fn_set_status
+
+# as_fn_exit STATUS
+# -----------------
+# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
+as_fn_exit ()
+{
+ set +e
+ as_fn_set_status $1
+ exit $1
+} # as_fn_exit
+
+# as_fn_mkdir_p
+# -------------
+# Create "$as_dir" as a directory, including parents if necessary.
+as_fn_mkdir_p ()
+{
+
+ case $as_dir in #(
+ -*) as_dir=./$as_dir;;
+ esac
+ test -d "$as_dir" || eval $as_mkdir_p || {
+ as_dirs=
+ while :; do
+ case $as_dir in #(
+ *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
+ *) as_qdir=$as_dir;;
+ esac
+ as_dirs="'$as_qdir' $as_dirs"
+ as_dir=`$as_dirname -- "$as_dir" ||
+$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$as_dir" : 'X\(//\)[^/]' \| \
+ X"$as_dir" : 'X\(//\)$' \| \
+ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$as_dir" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)[^/].*/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+ test -d "$as_dir" && break
+ done
+ test -z "$as_dirs" || eval "mkdir $as_dirs"
+ } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
+
+
+} # as_fn_mkdir_p
+# as_fn_append VAR VALUE
+# ----------------------
+# Append the text in VALUE to the end of the definition contained in VAR. Take
+# advantage of any shell optimizations that allow amortized linear growth over
+# repeated appends, instead of the typical quadratic growth present in naive
+# implementations.
+if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
+ eval 'as_fn_append ()
+ {
+ eval $1+=\$2
+ }'
+else
+ as_fn_append ()
+ {
+ eval $1=\$$1\$2
+ }
+fi # as_fn_append
+
+# as_fn_arith ARG...
+# ------------------
+# Perform arithmetic evaluation on the ARGs, and store the result in the
+# global $as_val. Take advantage of shells that can avoid forks. The arguments
+# must be portable across $(()) and expr.
+if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
+ eval 'as_fn_arith ()
+ {
+ as_val=$(( $* ))
+ }'
+else
+ as_fn_arith ()
+ {
+ as_val=`expr "$@" || test $? -eq 1`
+ }
+fi # as_fn_arith
+
+
+# as_fn_error STATUS ERROR [LINENO LOG_FD]
+# ----------------------------------------
+# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
+# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
+# script with STATUS, using 1 if that was 0.
+as_fn_error ()
+{
+ as_status=$1; test $as_status -eq 0 && as_status=1
+ if test "$4"; then
+ as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
+ fi
+ $as_echo "$as_me: error: $2" >&2
+ as_fn_exit $as_status
+} # as_fn_error
+
+if expr a : '\(a\)' >/dev/null 2>&1 &&
+ test "X`expr 00001 : '.*\(...\)'`" = X001; then
+ as_expr=expr
+else
+ as_expr=false
+fi
+
+if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
+ as_basename=basename
+else
+ as_basename=false
+fi
+
+if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
+ as_dirname=dirname
+else
+ as_dirname=false
+fi
+
+as_me=`$as_basename -- "$0" ||
+$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
+ X"$0" : 'X\(//\)$' \| \
+ X"$0" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X/"$0" |
+ sed '/^.*\/\([^/][^/]*\)\/*$/{
+ s//\1/
+ q
+ }
+ /^X\/\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\/\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+
+# Avoid depending upon Character Ranges.
+as_cr_letters='abcdefghijklmnopqrstuvwxyz'
+as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
+as_cr_Letters=$as_cr_letters$as_cr_LETTERS
+as_cr_digits='0123456789'
+as_cr_alnum=$as_cr_Letters$as_cr_digits
+
+
+ as_lineno_1=$LINENO as_lineno_1a=$LINENO
+ as_lineno_2=$LINENO as_lineno_2a=$LINENO
+ eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
+ test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
+ # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-)
+ sed -n '
+ p
+ /[$]LINENO/=
+ ' <$as_myself |
+ sed '
+ s/[$]LINENO.*/&-/
+ t lineno
+ b
+ :lineno
+ N
+ :loop
+ s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
+ t loop
+ s/-\n.*//
+ ' >$as_me.lineno &&
+ chmod +x "$as_me.lineno" ||
+ { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
+
+ # Don't try to exec as it changes $[0], causing all sort of problems
+ # (the dirname of $[0] is not the place where we might find the
+ # original and so on. Autoconf is especially sensitive to this).
+ . "./$as_me.lineno"
+ # Exit status is that of the last command.
+ exit
+}
+
+ECHO_C= ECHO_N= ECHO_T=
+case `echo -n x` in #(((((
+-n*)
+ case `echo 'xy\c'` in
+ *c*) ECHO_T=' ';; # ECHO_T is single tab character.
+ xy) ECHO_C='\c';;
+ *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
+ ECHO_T=' ';;
+ esac;;
+*)
+ ECHO_N='-n';;
+esac
+
+rm -f conf$$ conf$$.exe conf$$.file
+if test -d conf$$.dir; then
+ rm -f conf$$.dir/conf$$.file
+else
+ rm -f conf$$.dir
+ mkdir conf$$.dir 2>/dev/null
+fi
+if (echo >conf$$.file) 2>/dev/null; then
+ if ln -s conf$$.file conf$$ 2>/dev/null; then
+ as_ln_s='ln -s'
+ # ... but there are two gotchas:
+ # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
+ # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
+ # In both cases, we have to default to `cp -p'.
+ ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
+ as_ln_s='cp -p'
+ elif ln conf$$.file conf$$ 2>/dev/null; then
+ as_ln_s=ln
+ else
+ as_ln_s='cp -p'
+ fi
+else
+ as_ln_s='cp -p'
+fi
+rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
+rmdir conf$$.dir 2>/dev/null
+
+if mkdir -p . 2>/dev/null; then
+ as_mkdir_p='mkdir -p "$as_dir"'
+else
+ test -d ./-p && rmdir ./-p
+ as_mkdir_p=false
+fi
+
+if test -x / >/dev/null 2>&1; then
+ as_test_x='test -x'
+else
+ if ls -dL / >/dev/null 2>&1; then
+ as_ls_L_option=L
+ else
+ as_ls_L_option=
+ fi
+ as_test_x='
+ eval sh -c '\''
+ if test -d "$1"; then
+ test -d "$1/.";
+ else
+ case $1 in #(
+ -*)set "./$1";;
+ esac;
+ case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
+ ???[sx]*):;;*)false;;esac;fi
+ '\'' sh
+ '
+fi
+as_executable_p=$as_test_x
+
+# Sed expression to map a string onto a valid CPP name.
+as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
+
+# Sed expression to map a string onto a valid variable name.
+as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
+
+
+test -n "$DJDIR" || exec 7<&0 </dev/null
+exec 6>&1
+
+# Name of the host.
+# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
+# so uname gets run too.
+ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
+
+#
+# Initializations.
+#
+ac_default_prefix=/usr/local
+ac_clean_files=
+ac_config_libobj_dir=.
+LIBOBJS=
+cross_compiling=no
+subdirs=
+MFLAGS=
+MAKEFLAGS=
+
+# Identity of this package.
+PACKAGE_NAME='libor1k'
+PACKAGE_TARNAME='libor1k'
+PACKAGE_VERSION='0.0.1'
+PACKAGE_STRING='libor1k 0.0.1'
+PACKAGE_BUGREPORT=''
+PACKAGE_URL=''
+
+ac_subst_vars='LTLIBOBJS
+LIBOBJS
+target_makefile_frag_path
+host_makefile_frag_path
+CCASFLAGS
+CCAS
+RANLIB
+LD
+AR
+AS
+am__fastdepCC_FALSE
+am__fastdepCC_TRUE
+CCDEPMODE
+am__nodep
+AMDEPBACKSLASH
+AMDEP_FALSE
+AMDEP_TRUE
+am__quote
+am__include
+DEPDIR
+am__leading_dot
+CC
+INSTALL_DATA
+INSTALL_SCRIPT
+INSTALL_PROGRAM
+target_os
+target_vendor
+target_cpu
+target
+host_os
+host_vendor
+host_cpu
+host
+build_os
+build_vendor
+build_cpu
+build
+target_alias
+host_alias
+build_alias
+LIBS
+ECHO_T
+ECHO_N
+ECHO_C
+DEFS
+mandir
+localedir
+libdir
+psdir
+pdfdir
+dvidir
+htmldir
+infodir
+docdir
+oldincludedir
+includedir
+localstatedir
+sharedstatedir
+sysconfdir
+datadir
+datarootdir
+libexecdir
+sbindir
+bindir
+program_transform_name
+prefix
+exec_prefix
+PACKAGE_URL
+PACKAGE_BUGREPORT
+PACKAGE_STRING
+PACKAGE_VERSION
+PACKAGE_TARNAME
+PACKAGE_NAME
+PATH_SEPARATOR
+SHELL'
+ac_subst_files='host_makefile_frag
+target_makefile_frag'
+ac_user_opts='
+enable_option_checking
+enable_dependency_tracking
+'
+ ac_precious_vars='build_alias
+host_alias
+target_alias
+CCAS
+CCASFLAGS'
+
+
+# Initialize some variables set by options.
+ac_init_help=
+ac_init_version=false
+ac_unrecognized_opts=
+ac_unrecognized_sep=
+# The variables have the same names as the options, with
+# dashes changed to underlines.
+cache_file=/dev/null
+exec_prefix=NONE
+no_create=
+no_recursion=
+prefix=NONE
+program_prefix=NONE
+program_suffix=NONE
+program_transform_name=s,x,x,
+silent=
+site=
+srcdir=
+verbose=
+x_includes=NONE
+x_libraries=NONE
+
+# Installation directory options.
+# These are left unexpanded so users can "make install exec_prefix=/foo"
+# and all the variables that are supposed to be based on exec_prefix
+# by default will actually change.
+# Use braces instead of parens because sh, perl, etc. also accept them.
+# (The list follows the same order as the GNU Coding Standards.)
+bindir='${exec_prefix}/bin'
+sbindir='${exec_prefix}/sbin'
+libexecdir='${exec_prefix}/libexec'
+datarootdir='${prefix}/share'
+datadir='${datarootdir}'
+sysconfdir='${prefix}/etc'
+sharedstatedir='${prefix}/com'
+localstatedir='${prefix}/var'
+includedir='${prefix}/include'
+oldincludedir='/usr/include'
+docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
+infodir='${datarootdir}/info'
+htmldir='${docdir}'
+dvidir='${docdir}'
+pdfdir='${docdir}'
+psdir='${docdir}'
+libdir='${exec_prefix}/lib'
+localedir='${datarootdir}/locale'
+mandir='${datarootdir}/man'
+
+ac_prev=
+ac_dashdash=
+for ac_option
+do
+ # If the previous option needs an argument, assign it.
+ if test -n "$ac_prev"; then
+ eval $ac_prev=\$ac_option
+ ac_prev=
+ continue
+ fi
+
+ case $ac_option in
+ *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
+ *=) ac_optarg= ;;
+ *) ac_optarg=yes ;;
+ esac
+
+ # Accept the important Cygnus configure options, so we can diagnose typos.
+
+ case $ac_dashdash$ac_option in
+ --)
+ ac_dashdash=yes ;;
+
+ -bindir | --bindir | --bindi | --bind | --bin | --bi)
+ ac_prev=bindir ;;
+ -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
+ bindir=$ac_optarg ;;
+
+ -build | --build | --buil | --bui | --bu)
+ ac_prev=build_alias ;;
+ -build=* | --build=* | --buil=* | --bui=* | --bu=*)
+ build_alias=$ac_optarg ;;
+
+ -cache-file | --cache-file | --cache-fil | --cache-fi \
+ | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
+ ac_prev=cache_file ;;
+ -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
+ | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
+ cache_file=$ac_optarg ;;
+
+ --config-cache | -C)
+ cache_file=config.cache ;;
+
+ -datadir | --datadir | --datadi | --datad)
+ ac_prev=datadir ;;
+ -datadir=* | --datadir=* | --datadi=* | --datad=*)
+ datadir=$ac_optarg ;;
+
+ -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
+ | --dataroo | --dataro | --datar)
+ ac_prev=datarootdir ;;
+ -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
+ | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
+ datarootdir=$ac_optarg ;;
+
+ -disable-* | --disable-*)
+ ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
+ # Reject names that are not valid shell variable names.
+ expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
+ as_fn_error $? "invalid feature name: $ac_useropt"
+ ac_useropt_orig=$ac_useropt
+ ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
+ case $ac_user_opts in
+ *"
+"enable_$ac_useropt"
+"*) ;;
+ *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
+ ac_unrecognized_sep=', ';;
+ esac
+ eval enable_$ac_useropt=no ;;
+
+ -docdir | --docdir | --docdi | --doc | --do)
+ ac_prev=docdir ;;
+ -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
+ docdir=$ac_optarg ;;
+
+ -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
+ ac_prev=dvidir ;;
+ -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
+ dvidir=$ac_optarg ;;
+
+ -enable-* | --enable-*)
+ ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
+ # Reject names that are not valid shell variable names.
+ expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
+ as_fn_error $? "invalid feature name: $ac_useropt"
+ ac_useropt_orig=$ac_useropt
+ ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
+ case $ac_user_opts in
+ *"
+"enable_$ac_useropt"
+"*) ;;
+ *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
+ ac_unrecognized_sep=', ';;
+ esac
+ eval enable_$ac_useropt=\$ac_optarg ;;
+
+ -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
+ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
+ | --exec | --exe | --ex)
+ ac_prev=exec_prefix ;;
+ -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
+ | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
+ | --exec=* | --exe=* | --ex=*)
+ exec_prefix=$ac_optarg ;;
+
+ -gas | --gas | --ga | --g)
+ # Obsolete; use --with-gas.
+ with_gas=yes ;;
+
+ -help | --help | --hel | --he | -h)
+ ac_init_help=long ;;
+ -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
+ ac_init_help=recursive ;;
+ -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
+ ac_init_help=short ;;
+
+ -host | --host | --hos | --ho)
+ ac_prev=host_alias ;;
+ -host=* | --host=* | --hos=* | --ho=*)
+ host_alias=$ac_optarg ;;
+
+ -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
+ ac_prev=htmldir ;;
+ -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
+ | --ht=*)
+ htmldir=$ac_optarg ;;
+
+ -includedir | --includedir | --includedi | --included | --include \
+ | --includ | --inclu | --incl | --inc)
+ ac_prev=includedir ;;
+ -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
+ | --includ=* | --inclu=* | --incl=* | --inc=*)
+ includedir=$ac_optarg ;;
+
+ -infodir | --infodir | --infodi | --infod | --info | --inf)
+ ac_prev=infodir ;;
+ -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
+ infodir=$ac_optarg ;;
+
+ -libdir | --libdir | --libdi | --libd)
+ ac_prev=libdir ;;
+ -libdir=* | --libdir=* | --libdi=* | --libd=*)
+ libdir=$ac_optarg ;;
+
+ -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
+ | --libexe | --libex | --libe)
+ ac_prev=libexecdir ;;
+ -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
+ | --libexe=* | --libex=* | --libe=*)
+ libexecdir=$ac_optarg ;;
+
+ -localedir | --localedir | --localedi | --localed | --locale)
+ ac_prev=localedir ;;
+ -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
+ localedir=$ac_optarg ;;
+
+ -localstatedir | --localstatedir | --localstatedi | --localstated \
+ | --localstate | --localstat | --localsta | --localst | --locals)
+ ac_prev=localstatedir ;;
+ -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
+ | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
+ localstatedir=$ac_optarg ;;
+
+ -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
+ ac_prev=mandir ;;
+ -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
+ mandir=$ac_optarg ;;
+
+ -nfp | --nfp | --nf)
+ # Obsolete; use --without-fp.
+ with_fp=no ;;
+
+ -no-create | --no-create | --no-creat | --no-crea | --no-cre \
+ | --no-cr | --no-c | -n)
+ no_create=yes ;;
+
+ -no-recursion | --no-recursion | --no-recursio | --no-recursi \
+ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
+ no_recursion=yes ;;
+
+ -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
+ | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
+ | --oldin | --oldi | --old | --ol | --o)
+ ac_prev=oldincludedir ;;
+ -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
+ | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
+ | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
+ oldincludedir=$ac_optarg ;;
+
+ -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
+ ac_prev=prefix ;;
+ -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
+ prefix=$ac_optarg ;;
+
+ -program-prefix | --program-prefix | --program-prefi | --program-pref \
+ | --program-pre | --program-pr | --program-p)
+ ac_prev=program_prefix ;;
+ -program-prefix=* | --program-prefix=* | --program-prefi=* \
+ | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
+ program_prefix=$ac_optarg ;;
+
+ -program-suffix | --program-suffix | --program-suffi | --program-suff \
+ | --program-suf | --program-su | --program-s)
+ ac_prev=program_suffix ;;
+ -program-suffix=* | --program-suffix=* | --program-suffi=* \
+ | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
+ program_suffix=$ac_optarg ;;
+
+ -program-transform-name | --program-transform-name \
+ | --program-transform-nam | --program-transform-na \
+ | --program-transform-n | --program-transform- \
+ | --program-transform | --program-transfor \
+ | --program-transfo | --program-transf \
+ | --program-trans | --program-tran \
+ | --progr-tra | --program-tr | --program-t)
+ ac_prev=program_transform_name ;;
+ -program-transform-name=* | --program-transform-name=* \
+ | --program-transform-nam=* | --program-transform-na=* \
+ | --program-transform-n=* | --program-transform-=* \
+ | --program-transform=* | --program-transfor=* \
+ | --program-transfo=* | --program-transf=* \
+ | --program-trans=* | --program-tran=* \
+ | --progr-tra=* | --program-tr=* | --program-t=*)
+ program_transform_name=$ac_optarg ;;
+
+ -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
+ ac_prev=pdfdir ;;
+ -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
+ pdfdir=$ac_optarg ;;
+
+ -psdir | --psdir | --psdi | --psd | --ps)
+ ac_prev=psdir ;;
+ -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
+ psdir=$ac_optarg ;;
+
+ -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+ | -silent | --silent | --silen | --sile | --sil)
+ silent=yes ;;
+
+ -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
+ ac_prev=sbindir ;;
+ -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
+ | --sbi=* | --sb=*)
+ sbindir=$ac_optarg ;;
+
+ -sharedstatedir | --sharedstatedir | --sharedstatedi \
+ | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
+ | --sharedst | --shareds | --shared | --share | --shar \
+ | --sha | --sh)
+ ac_prev=sharedstatedir ;;
+ -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
+ | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
+ | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
+ | --sha=* | --sh=*)
+ sharedstatedir=$ac_optarg ;;
+
+ -site | --site | --sit)
+ ac_prev=site ;;
+ -site=* | --site=* | --sit=*)
+ site=$ac_optarg ;;
+
+ -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
+ ac_prev=srcdir ;;
+ -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
+ srcdir=$ac_optarg ;;
+
+ -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
+ | --syscon | --sysco | --sysc | --sys | --sy)
+ ac_prev=sysconfdir ;;
+ -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
+ | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
+ sysconfdir=$ac_optarg ;;
+
+ -target | --target | --targe | --targ | --tar | --ta | --t)
+ ac_prev=target_alias ;;
+ -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
+ target_alias=$ac_optarg ;;
+
+ -v | -verbose | --verbose | --verbos | --verbo | --verb)
+ verbose=yes ;;
+
+ -version | --version | --versio | --versi | --vers | -V)
+ ac_init_version=: ;;
+
+ -with-* | --with-*)
+ ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
+ # Reject names that are not valid shell variable names.
+ expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
+ as_fn_error $? "invalid package name: $ac_useropt"
+ ac_useropt_orig=$ac_useropt
+ ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
+ case $ac_user_opts in
+ *"
+"with_$ac_useropt"
+"*) ;;
+ *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
+ ac_unrecognized_sep=', ';;
+ esac
+ eval with_$ac_useropt=\$ac_optarg ;;
+
+ -without-* | --without-*)
+ ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
+ # Reject names that are not valid shell variable names.
+ expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
+ as_fn_error $? "invalid package name: $ac_useropt"
+ ac_useropt_orig=$ac_useropt
+ ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
+ case $ac_user_opts in
+ *"
+"with_$ac_useropt"
+"*) ;;
+ *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
+ ac_unrecognized_sep=', ';;
+ esac
+ eval with_$ac_useropt=no ;;
+
+ --x)
+ # Obsolete; use --with-x.
+ with_x=yes ;;
+
+ -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
+ | --x-incl | --x-inc | --x-in | --x-i)
+ ac_prev=x_includes ;;
+ -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
+ | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
+ x_includes=$ac_optarg ;;
+
+ -x-libraries | --x-libraries | --x-librarie | --x-librari \
+ | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
+ ac_prev=x_libraries ;;
+ -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
+ | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
+ x_libraries=$ac_optarg ;;
+
+ -*) as_fn_error $? "unrecognized option: \`$ac_option'
+Try \`$0 --help' for more information"
+ ;;
+
+ *=*)
+ ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
+ # Reject names that are not valid shell variable names.
+ case $ac_envvar in #(
+ '' | [0-9]* | *[!_$as_cr_alnum]* )
+ as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
+ esac
+ eval $ac_envvar=\$ac_optarg
+ export $ac_envvar ;;
+
+ *)
+ # FIXME: should be removed in autoconf 3.0.
+ $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
+ expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
+ $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
+ : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
+ ;;
+
+ esac
+done
+
+if test -n "$ac_prev"; then
+ ac_option=--`echo $ac_prev | sed 's/_/-/g'`
+ as_fn_error $? "missing argument to $ac_option"
+fi
+
+if test -n "$ac_unrecognized_opts"; then
+ case $enable_option_checking in
+ no) ;;
+ fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
+ *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
+ esac
+fi
+
+# Check all directory arguments for consistency.
+for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
+ datadir sysconfdir sharedstatedir localstatedir includedir \
+ oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
+ libdir localedir mandir
+do
+ eval ac_val=\$$ac_var
+ # Remove trailing slashes.
+ case $ac_val in
+ */ )
+ ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
+ eval $ac_var=\$ac_val;;
+ esac
+ # Be sure to have absolute directory names.
+ case $ac_val in
+ [\\/$]* | ?:[\\/]* ) continue;;
+ NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
+ esac
+ as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
+done
+
+# There might be people who depend on the old broken behavior: `$host'
+# used to hold the argument of --host etc.
+# FIXME: To remove some day.
+build=$build_alias
+host=$host_alias
+target=$target_alias
+
+# FIXME: To remove some day.
+if test "x$host_alias" != x; then
+ if test "x$build_alias" = x; then
+ cross_compiling=maybe
+ $as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host.
+ If a cross compiler is detected then cross compile mode will be used" >&2
+ elif test "x$build_alias" != "x$host_alias"; then
+ cross_compiling=yes
+ fi
+fi
+
+ac_tool_prefix=
+test -n "$host_alias" && ac_tool_prefix=$host_alias-
+
+test "$silent" = yes && exec 6>/dev/null
+
+
+ac_pwd=`pwd` && test -n "$ac_pwd" &&
+ac_ls_di=`ls -di .` &&
+ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
+ as_fn_error $? "working directory cannot be determined"
+test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
+ as_fn_error $? "pwd does not report name of working directory"
+
+
+# Find the source files, if location was not specified.
+if test -z "$srcdir"; then
+ ac_srcdir_defaulted=yes
+ # Try the directory containing this script, then the parent directory.
+ ac_confdir=`$as_dirname -- "$as_myself" ||
+$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$as_myself" : 'X\(//\)[^/]' \| \
+ X"$as_myself" : 'X\(//\)$' \| \
+ X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$as_myself" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)[^/].*/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+ srcdir=$ac_confdir
+ if test ! -r "$srcdir/$ac_unique_file"; then
+ srcdir=..
+ fi
+else
+ ac_srcdir_defaulted=no
+fi
+if test ! -r "$srcdir/$ac_unique_file"; then
+ test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
+ as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
+fi
+ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
+ac_abs_confdir=`(
+ cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
+ pwd)`
+# When building in place, set srcdir=.
+if test "$ac_abs_confdir" = "$ac_pwd"; then
+ srcdir=.
+fi
+# Remove unnecessary trailing slashes from srcdir.
+# Double slashes in file names in object file debugging info
+# mess up M-x gdb in Emacs.
+case $srcdir in
+*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
+esac
+for ac_var in $ac_precious_vars; do
+ eval ac_env_${ac_var}_set=\${${ac_var}+set}
+ eval ac_env_${ac_var}_value=\$${ac_var}
+ eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
+ eval ac_cv_env_${ac_var}_value=\$${ac_var}
+done
+
+#
+# Report the --help message.
+#
+if test "$ac_init_help" = "long"; then
+ # Omit some internal or obsolete options to make the list less imposing.
+ # This message is too long to be a string in the A/UX 3.1 sh.
+ cat <<_ACEOF
+\`configure' configures libor1k 0.0.1 to adapt to many kinds of systems.
+
+Usage: $0 [OPTION]... [VAR=VALUE]...
+
+To assign environment variables (e.g., CC, CFLAGS...), specify them as
+VAR=VALUE. See below for descriptions of some of the useful variables.
+
+Defaults for the options are specified in brackets.
+
+Configuration:
+ -h, --help display this help and exit
+ --help=short display options specific to this package
+ --help=recursive display the short help of all the included packages
+ -V, --version display version information and exit
+ -q, --quiet, --silent do not print \`checking ...' messages
+ --cache-file=FILE cache test results in FILE [disabled]
+ -C, --config-cache alias for \`--cache-file=config.cache'
+ -n, --no-create do not create output files
+ --srcdir=DIR find the sources in DIR [configure dir or \`..']
+
+Installation directories:
+ --prefix=PREFIX install architecture-independent files in PREFIX
+ [$ac_default_prefix]
+ --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
+ [PREFIX]
+
+By default, \`make install' will install all the files in
+\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
+an installation prefix other than \`$ac_default_prefix' using \`--prefix',
+for instance \`--prefix=\$HOME'.
+
+For better control, use the options below.
+
+Fine tuning of the installation directories:
+ --bindir=DIR user executables [EPREFIX/bin]
+ --sbindir=DIR system admin executables [EPREFIX/sbin]
+ --libexecdir=DIR program executables [EPREFIX/libexec]
+ --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
+ --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
+ --localstatedir=DIR modifiable single-machine data [PREFIX/var]
+ --libdir=DIR object code libraries [EPREFIX/lib]
+ --includedir=DIR C header files [PREFIX/include]
+ --oldincludedir=DIR C header files for non-gcc [/usr/include]
+ --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
+ --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
+ --infodir=DIR info documentation [DATAROOTDIR/info]
+ --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
+ --mandir=DIR man documentation [DATAROOTDIR/man]
+ --docdir=DIR documentation root [DATAROOTDIR/doc/libor1k]
+ --htmldir=DIR html documentation [DOCDIR]
+ --dvidir=DIR dvi documentation [DOCDIR]
+ --pdfdir=DIR pdf documentation [DOCDIR]
+ --psdir=DIR ps documentation [DOCDIR]
+_ACEOF
+
+ cat <<\_ACEOF
+
+Program names:
+ --program-prefix=PREFIX prepend PREFIX to installed program names
+ --program-suffix=SUFFIX append SUFFIX to installed program names
+ --program-transform-name=PROGRAM run sed PROGRAM on installed program names
+
+System types:
+ --build=BUILD configure for building on BUILD [guessed]
+ --host=HOST cross-compile to build programs to run on HOST [BUILD]
+ --target=TARGET configure for building compilers for TARGET [HOST]
+_ACEOF
+fi
+
+if test -n "$ac_init_help"; then
+ case $ac_init_help in
+ short | recursive ) echo "Configuration of libor1k 0.0.1:";;
+ esac
+ cat <<\_ACEOF
+
+Optional Features:
+ --disable-option-checking ignore unrecognized --enable/--with options
+ --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
+ --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
+ --disable-dependency-tracking speeds up one-time build
+ --enable-dependency-tracking do not reject slow dependency extractors
+
+Some influential environment variables:
+ CCAS assembler compiler command (defaults to CC)
+ CCASFLAGS assembler compiler flags (defaults to CFLAGS)
+
+Use these variables to override the choices made by `configure' or to help
+it to find libraries and programs with nonstandard names/locations.
+
+Report bugs to the package provider.
+_ACEOF
+ac_status=$?
+fi
+
+if test "$ac_init_help" = "recursive"; then
+ # If there are subdirs, report their specific --help.
+ for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
+ test -d "$ac_dir" ||
+ { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
+ continue
+ ac_builddir=.
+
+case "$ac_dir" in
+.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
+*)
+ ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
+ # A ".." for each directory in $ac_dir_suffix.
+ ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
+ case $ac_top_builddir_sub in
+ "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
+ *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
+ esac ;;
+esac
+ac_abs_top_builddir=$ac_pwd
+ac_abs_builddir=$ac_pwd$ac_dir_suffix
+# for backward compatibility:
+ac_top_builddir=$ac_top_build_prefix
+
+case $srcdir in
+ .) # We are building in place.
+ ac_srcdir=.
+ ac_top_srcdir=$ac_top_builddir_sub
+ ac_abs_top_srcdir=$ac_pwd ;;
+ [\\/]* | ?:[\\/]* ) # Absolute name.
+ ac_srcdir=$srcdir$ac_dir_suffix;
+ ac_top_srcdir=$srcdir
+ ac_abs_top_srcdir=$srcdir ;;
+ *) # Relative name.
+ ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
+ ac_top_srcdir=$ac_top_build_prefix$srcdir
+ ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
+esac
+ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
+
+ cd "$ac_dir" || { ac_status=$?; continue; }
+ # Check for guested configure.
+ if test -f "$ac_srcdir/configure.gnu"; then
+ echo &&
+ $SHELL "$ac_srcdir/configure.gnu" --help=recursive
+ elif test -f "$ac_srcdir/configure"; then
+ echo &&
+ $SHELL "$ac_srcdir/configure" --help=recursive
+ else
+ $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
+ fi || ac_status=$?
+ cd "$ac_pwd" || { ac_status=$?; break; }
+ done
+fi
+
+test -n "$ac_init_help" && exit $ac_status
+if $ac_init_version; then
+ cat <<\_ACEOF
+libor1k configure 0.0.1
+generated by GNU Autoconf 2.68
+
+Copyright (C) 2010 Free Software Foundation, Inc.
+This configure script is free software; the Free Software Foundation
+gives unlimited permission to copy, distribute and modify it.
+_ACEOF
+ exit
+fi
+
+## ------------------------ ##
+## Autoconf initialization. ##
+## ------------------------ ##
+
+# ac_fn_c_try_compile LINENO
+# --------------------------
+# Try to compile conftest.$ac_ext, and return whether this succeeded.
+ac_fn_c_try_compile ()
+{
+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ rm -f conftest.$ac_objext
+ if { { ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_compile") 2>conftest.err
+ ac_status=$?
+ if test -s conftest.err; then
+ grep -v '^ *+' conftest.err >conftest.er1
+ cat conftest.er1 >&5
+ mv -f conftest.er1 conftest.err
+ fi
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then :
+ ac_retval=0
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_retval=1
+fi
+ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+ as_fn_set_status $ac_retval
+
+} # ac_fn_c_try_compile
+cat >config.log <<_ACEOF
+This file contains any messages produced by compilers while
+running configure, to aid debugging if configure makes a mistake.
+
+It was created by libor1k $as_me 0.0.1, which was
+generated by GNU Autoconf 2.68. Invocation command line was
+
+ $ $0 $@
+
+_ACEOF
+exec 5>>config.log
+{
+cat <<_ASUNAME
+## --------- ##
+## Platform. ##
+## --------- ##
+
+hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
+uname -m = `(uname -m) 2>/dev/null || echo unknown`
+uname -r = `(uname -r) 2>/dev/null || echo unknown`
+uname -s = `(uname -s) 2>/dev/null || echo unknown`
+uname -v = `(uname -v) 2>/dev/null || echo unknown`
+
+/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
+/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
+
+/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
+/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
+/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
+/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
+/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
+/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
+/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
+
+_ASUNAME
+
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ $as_echo "PATH: $as_dir"
+ done
+IFS=$as_save_IFS
+
+} >&5
+
+cat >&5 <<_ACEOF
+
+
+## ----------- ##
+## Core tests. ##
+## ----------- ##
+
+_ACEOF
+
+
+# Keep a trace of the command line.
+# Strip out --no-create and --no-recursion so they do not pile up.
+# Strip out --silent because we don't want to record it for future runs.
+# Also quote any args containing shell meta-characters.
+# Make two passes to allow for proper duplicate-argument suppression.
+ac_configure_args=
+ac_configure_args0=
+ac_configure_args1=
+ac_must_keep_next=false
+for ac_pass in 1 2
+do
+ for ac_arg
+ do
+ case $ac_arg in
+ -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
+ -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+ | -silent | --silent | --silen | --sile | --sil)
+ continue ;;
+ *\'*)
+ ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
+ esac
+ case $ac_pass in
+ 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
+ 2)
+ as_fn_append ac_configure_args1 " '$ac_arg'"
+ if test $ac_must_keep_next = true; then
+ ac_must_keep_next=false # Got value, back to normal.
+ else
+ case $ac_arg in
+ *=* | --config-cache | -C | -disable-* | --disable-* \
+ | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
+ | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
+ | -with-* | --with-* | -without-* | --without-* | --x)
+ case "$ac_configure_args0 " in
+ "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
+ esac
+ ;;
+ -* ) ac_must_keep_next=true ;;
+ esac
+ fi
+ as_fn_append ac_configure_args " '$ac_arg'"
+ ;;
+ esac
+ done
+done
+{ ac_configure_args0=; unset ac_configure_args0;}
+{ ac_configure_args1=; unset ac_configure_args1;}
+
+# When interrupted or exit'd, cleanup temporary files, and complete
+# config.log. We remove comments because anyway the quotes in there
+# would cause problems or look ugly.
+# WARNING: Use '\'' to represent an apostrophe within the trap.
+# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
+trap 'exit_status=$?
+ # Save into config.log some information that might help in debugging.
+ {
+ echo
+
+ $as_echo "## ---------------- ##
+## Cache variables. ##
+## ---------------- ##"
+ echo
+ # The following way of writing the cache mishandles newlines in values,
+(
+ for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
+ eval ac_val=\$$ac_var
+ case $ac_val in #(
+ *${as_nl}*)
+ case $ac_var in #(
+ *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
+$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
+ esac
+ case $ac_var in #(
+ _ | IFS | as_nl) ;; #(
+ BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
+ *) { eval $ac_var=; unset $ac_var;} ;;
+ esac ;;
+ esac
+ done
+ (set) 2>&1 |
+ case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
+ *${as_nl}ac_space=\ *)
+ sed -n \
+ "s/'\''/'\''\\\\'\'''\''/g;
+ s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
+ ;; #(
+ *)
+ sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
+ ;;
+ esac |
+ sort
+)
+ echo
+
+ $as_echo "## ----------------- ##
+## Output variables. ##
+## ----------------- ##"
+ echo
+ for ac_var in $ac_subst_vars
+ do
+ eval ac_val=\$$ac_var
+ case $ac_val in
+ *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
+ esac
+ $as_echo "$ac_var='\''$ac_val'\''"
+ done | sort
+ echo
+
+ if test -n "$ac_subst_files"; then
+ $as_echo "## ------------------- ##
+## File substitutions. ##
+## ------------------- ##"
+ echo
+ for ac_var in $ac_subst_files
+ do
+ eval ac_val=\$$ac_var
+ case $ac_val in
+ *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
+ esac
+ $as_echo "$ac_var='\''$ac_val'\''"
+ done | sort
+ echo
+ fi
+
+ if test -s confdefs.h; then
+ $as_echo "## ----------- ##
+## confdefs.h. ##
+## ----------- ##"
+ echo
+ cat confdefs.h
+ echo
+ fi
+ test "$ac_signal" != 0 &&
+ $as_echo "$as_me: caught signal $ac_signal"
+ $as_echo "$as_me: exit $exit_status"
+ } >&5
+ rm -f core *.core core.conftest.* &&
+ rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
+ exit $exit_status
+' 0
+for ac_signal in 1 2 13 15; do
+ trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
+done
+ac_signal=0
+
+# confdefs.h avoids OS command line length limits that DEFS can exceed.
+rm -f -r conftest* confdefs.h
+
+$as_echo "/* confdefs.h */" > confdefs.h
+
+# Predefined preprocessor variables.
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_NAME "$PACKAGE_NAME"
+_ACEOF
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
+_ACEOF
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_VERSION "$PACKAGE_VERSION"
+_ACEOF
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_STRING "$PACKAGE_STRING"
+_ACEOF
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
+_ACEOF
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_URL "$PACKAGE_URL"
+_ACEOF
+
+
+# Let the site file select an alternate cache file if it wants to.
+# Prefer an explicitly selected file to automatically selected ones.
+ac_site_file1=NONE
+ac_site_file2=NONE
+if test -n "$CONFIG_SITE"; then
+ # We do not want a PATH search for config.site.
+ case $CONFIG_SITE in #((
+ -*) ac_site_file1=./$CONFIG_SITE;;
+ */*) ac_site_file1=$CONFIG_SITE;;
+ *) ac_site_file1=./$CONFIG_SITE;;
+ esac
+elif test "x$prefix" != xNONE; then
+ ac_site_file1=$prefix/share/config.site
+ ac_site_file2=$prefix/etc/config.site
+else
+ ac_site_file1=$ac_default_prefix/share/config.site
+ ac_site_file2=$ac_default_prefix/etc/config.site
+fi
+for ac_site_file in "$ac_site_file1" "$ac_site_file2"
+do
+ test "x$ac_site_file" = xNONE && continue
+ if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
+$as_echo "$as_me: loading site script $ac_site_file" >&6;}
+ sed 's/^/| /' "$ac_site_file" >&5
+ . "$ac_site_file" \
+ || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "failed to load site script $ac_site_file
+See \`config.log' for more details" "$LINENO" 5; }
+ fi
+done
+
+if test -r "$cache_file"; then
+ # Some versions of bash will fail to source /dev/null (special files
+ # actually), so we avoid doing that. DJGPP emulates it as a regular file.
+ if test /dev/null != "$cache_file" && test -f "$cache_file"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
+$as_echo "$as_me: loading cache $cache_file" >&6;}
+ case $cache_file in
+ [\\/]* | ?:[\\/]* ) . "$cache_file";;
+ *) . "./$cache_file";;
+ esac
+ fi
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
+$as_echo "$as_me: creating cache $cache_file" >&6;}
+ >$cache_file
+fi
+
+# Check that the precious variables saved in the cache have kept the same
+# value.
+ac_cache_corrupted=false
+for ac_var in $ac_precious_vars; do
+ eval ac_old_set=\$ac_cv_env_${ac_var}_set
+ eval ac_new_set=\$ac_env_${ac_var}_set
+ eval ac_old_val=\$ac_cv_env_${ac_var}_value
+ eval ac_new_val=\$ac_env_${ac_var}_value
+ case $ac_old_set,$ac_new_set in
+ set,)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
+$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
+ ac_cache_corrupted=: ;;
+ ,set)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
+$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
+ ac_cache_corrupted=: ;;
+ ,);;
+ *)
+ if test "x$ac_old_val" != "x$ac_new_val"; then
+ # differences in whitespace do not lead to failure.
+ ac_old_val_w=`echo x $ac_old_val`
+ ac_new_val_w=`echo x $ac_new_val`
+ if test "$ac_old_val_w" != "$ac_new_val_w"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
+$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
+ ac_cache_corrupted=:
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
+$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
+ eval $ac_var=\$ac_old_val
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
+$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
+$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
+ fi;;
+ esac
+ # Pass precious variables to config.status.
+ if test "$ac_new_set" = set; then
+ case $ac_new_val in
+ *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
+ *) ac_arg=$ac_var=$ac_new_val ;;
+ esac
+ case " $ac_configure_args " in
+ *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
+ *) as_fn_append ac_configure_args " '$ac_arg'" ;;
+ esac
+ fi
+done
+if $ac_cache_corrupted; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
+$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
+ as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
+fi
+## -------------------- ##
+## Main body of script. ##
+## -------------------- ##
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+
+# No shared libraries allowed
+if test "${enable_shared}" = "yes" ; then
+ echo "Shared libraries not supported for cross compiling, ignored"
+fi
+
+# Where are the auxillary tools (confg.sub etc)?
+if test "$srcdir" = "." ; then
+ if test "${with_target_subdir}" != "." ; then
+ libgloss_topdir="${srcdir}/${with_multisrctop}../../.."
+ else
+ libgloss_topdir="${srcdir}/${with_multisrctop}../.."
+ fi
+else
+ libgloss_topdir="${srcdir}/../.."
+fi
+ac_aux_dir=
+for ac_dir in $libgloss_topdir "$srcdir"/$libgloss_topdir; do
+ if test -f "$ac_dir/install-sh"; then
+ ac_aux_dir=$ac_dir
+ ac_install_sh="$ac_aux_dir/install-sh -c"
+ break
+ elif test -f "$ac_dir/install.sh"; then
+ ac_aux_dir=$ac_dir
+ ac_install_sh="$ac_aux_dir/install.sh -c"
+ break
+ elif test -f "$ac_dir/shtool"; then
+ ac_aux_dir=$ac_dir
+ ac_install_sh="$ac_aux_dir/shtool install -c"
+ break
+ fi
+done
+if test -z "$ac_aux_dir"; then
+ as_fn_error $? "cannot find install-sh, install.sh, or shtool in $libgloss_topdir \"$srcdir\"/$libgloss_topdir" "$LINENO" 5
+fi
+
+# These three variables are undocumented and unsupported,
+# and are intended to be withdrawn in a future Autoconf release.
+# They can cause serious problems if a builder's source tree is in a directory
+# whose full name contains unusual characters.
+ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
+ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
+ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
+
+
+
+# Make sure we can run config.sub.
+$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
+ as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
+$as_echo_n "checking build system type... " >&6; }
+if ${ac_cv_build+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_build_alias=$build_alias
+test "x$ac_build_alias" = x &&
+ ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
+test "x$ac_build_alias" = x &&
+ as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
+ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
+ as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
+$as_echo "$ac_cv_build" >&6; }
+case $ac_cv_build in
+*-*-*) ;;
+*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
+esac
+build=$ac_cv_build
+ac_save_IFS=$IFS; IFS='-'
+set x $ac_cv_build
+shift
+build_cpu=$1
+build_vendor=$2
+shift; shift
+# Remember, the first character of IFS is used to create $*,
+# except with old shells:
+build_os=$*
+IFS=$ac_save_IFS
+case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
+$as_echo_n "checking host system type... " >&6; }
+if ${ac_cv_host+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test "x$host_alias" = x; then
+ ac_cv_host=$ac_cv_build
+else
+ ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
+ as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
+$as_echo "$ac_cv_host" >&6; }
+case $ac_cv_host in
+*-*-*) ;;
+*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
+esac
+host=$ac_cv_host
+ac_save_IFS=$IFS; IFS='-'
+set x $ac_cv_host
+shift
+host_cpu=$1
+host_vendor=$2
+shift; shift
+# Remember, the first character of IFS is used to create $*,
+# except with old shells:
+host_os=$*
+IFS=$ac_save_IFS
+case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
+$as_echo_n "checking target system type... " >&6; }
+if ${ac_cv_target+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test "x$target_alias" = x; then
+ ac_cv_target=$ac_cv_host
+else
+ ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
+ as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
+$as_echo "$ac_cv_target" >&6; }
+case $ac_cv_target in
+*-*-*) ;;
+*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
+esac
+target=$ac_cv_target
+ac_save_IFS=$IFS; IFS='-'
+set x $ac_cv_target
+shift
+target_cpu=$1
+target_vendor=$2
+shift; shift
+# Remember, the first character of IFS is used to create $*,
+# except with old shells:
+target_os=$*
+IFS=$ac_save_IFS
+case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
+
+
+# The aliases save the names the user supplied, while $host etc.
+# will get canonicalized.
+test -n "$target_alias" &&
+ test "$program_prefix$program_suffix$program_transform_name" = \
+ NONENONEs,x,x, &&
+ program_prefix=${target_alias}-
+
+test "$program_prefix" != NONE &&
+ program_transform_name="s&^&$program_prefix&;$program_transform_name"
+# Use a double $ so make ignores it.
+test "$program_suffix" != NONE &&
+ program_transform_name="s&\$&$program_suffix&;$program_transform_name"
+# Double any \ or $.
+# By default was `s,x,x', remove it if useless.
+ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
+program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"`
+
+
+# Find a good install program. We prefer a C program (faster),
+# so one script is as good as another. But avoid the broken or
+# incompatible versions:
+# SysV /etc/install, /usr/sbin/install
+# SunOS /usr/etc/install
+# IRIX /sbin/install
+# AIX /bin/install
+# AmigaOS /C/install, which installs bootblocks on floppy discs
+# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
+# AFS /usr/afsws/bin/install, which mishandles nonexistent args
+# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
+# OS/2's system install, which has a completely different semantic
+# ./install, which can be erroneously created by make from ./install.sh.
+# Reject install programs that cannot install multiple files.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
+$as_echo_n "checking for a BSD-compatible install... " >&6; }
+if test -z "$INSTALL"; then
+if ${ac_cv_path_install+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ # Account for people who put trailing slashes in PATH elements.
+case $as_dir/ in #((
+ ./ | .// | /[cC]/* | \
+ /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
+ ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
+ /usr/ucb/* ) ;;
+ *)
+ # OSF1 and SCO ODT 3.0 have their own names for install.
+ # Don't use installbsd from OSF since it installs stuff as root
+ # by default.
+ for ac_prog in ginstall scoinst install; do
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
+ if test $ac_prog = install &&
+ grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
+ # AIX install. It has an incompatible calling convention.
+ :
+ elif test $ac_prog = install &&
+ grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
+ # program-specific install script used by HP pwplus--don't use.
+ :
+ else
+ rm -rf conftest.one conftest.two conftest.dir
+ echo one > conftest.one
+ echo two > conftest.two
+ mkdir conftest.dir
+ if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
+ test -s conftest.one && test -s conftest.two &&
+ test -s conftest.dir/conftest.one &&
+ test -s conftest.dir/conftest.two
+ then
+ ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
+ break 3
+ fi
+ fi
+ fi
+ done
+ done
+ ;;
+esac
+
+ done
+IFS=$as_save_IFS
+
+rm -rf conftest.one conftest.two conftest.dir
+
+fi
+ if test "${ac_cv_path_install+set}" = set; then
+ INSTALL=$ac_cv_path_install
+ else
+ # As a last resort, use the slow shell script. Don't cache a
+ # value for INSTALL within a source directory, because that will
+ # break other packages using the cache if that directory is
+ # removed, or if the value is a relative name.
+ INSTALL=$ac_install_sh
+ fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
+$as_echo "$INSTALL" >&6; }
+
+# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
+# It thinks the first close brace ends the variable substitution.
+test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
+
+test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
+
+test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
+
+
+
+$as_echo "#define HAVE_GNU_LD 1" >>confdefs.h
+
+
+# We always use ELF, define various useful associated things.
+
+$as_echo "#define HAVE_ELF 1" >>confdefs.h
+
+
+# Standard stuff copied from libnosys. For this we'll need to an aclocal.m4
+rm -rf .tst 2>/dev/null
+mkdir .tst 2>/dev/null
+if test -d .tst; then
+ am__leading_dot=.
+else
+ am__leading_dot=_
+fi
+rmdir .tst 2>/dev/null
+
+DEPDIR="${am__leading_dot}deps"
+
+ac_config_commands="$ac_config_commands depfiles"
+
+
+am_make=${MAKE-make}
+cat > confinc << 'END'
+am__doit:
+ @echo this is the am__doit target
+.PHONY: am__doit
+END
+# If we don't find an include directive, just comment out the code.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5
+$as_echo_n "checking for style of include used by $am_make... " >&6; }
+am__include="#"
+am__quote=
+_am_result=none
+# First try GNU make style include.
+echo "include confinc" > confmf
+# Ignore all kinds of additional output from `make'.
+case `$am_make -s -f confmf 2> /dev/null` in #(
+*the\ am__doit\ target*)
+ am__include=include
+ am__quote=
+ _am_result=GNU
+ ;;
+esac
+# Now try BSD make style include.
+if test "$am__include" = "#"; then
+ echo '.include "confinc"' > confmf
+ case `$am_make -s -f confmf 2> /dev/null` in #(
+ *the\ am__doit\ target*)
+ am__include=.include
+ am__quote="\""
+ _am_result=BSD
+ ;;
+ esac
+fi
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5
+$as_echo "$_am_result" >&6; }
+rm -f confinc confmf
+
+# Check whether --enable-dependency-tracking was given.
+if test "${enable_dependency_tracking+set}" = set; then :
+ enableval=$enable_dependency_tracking;
+fi
+
+if test "x$enable_dependency_tracking" != xno; then
+ am_depcomp="$ac_aux_dir/depcomp"
+ AMDEPBACKSLASH='\'
+ am__nodep='_no'
+fi
+ if test "x$enable_dependency_tracking" != xno; then
+ AMDEP_TRUE=
+ AMDEP_FALSE='#'
+else
+ AMDEP_TRUE='#'
+ AMDEP_FALSE=
+fi
+
+
+# Extract the first word of "gcc", so it can be a program name with args.
+set dummy gcc; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_CC+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_CC="gcc"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+$as_echo "$CC" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+
+depcc="$CC" am_compiler_list=
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
+$as_echo_n "checking dependency style of $depcc... " >&6; }
+if ${am_cv_CC_dependencies_compiler_type+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
+ # We make a subdir and do the tests there. Otherwise we can end up
+ # making bogus files that we don't know about and never remove. For
+ # instance it was reported that on HP-UX the gcc test will end up
+ # making a dummy file named `D' -- because `-MD' means `put the output
+ # in D'.
+ rm -rf conftest.dir
+ mkdir conftest.dir
+ # Copy depcomp to subdir because otherwise we won't find it if we're
+ # using a relative directory.
+ cp "$am_depcomp" conftest.dir
+ cd conftest.dir
+ # We will build objects and dependencies in a subdirectory because
+ # it helps to detect inapplicable dependency modes. For instance
+ # both Tru64's cc and ICC support -MD to output dependencies as a
+ # side effect of compilation, but ICC will put the dependencies in
+ # the current directory while Tru64 will put them in the object
+ # directory.
+ mkdir sub
+
+ am_cv_CC_dependencies_compiler_type=none
+ if test "$am_compiler_list" = ""; then
+ am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
+ fi
+ am__universal=false
+ case " $depcc " in #(
+ *\ -arch\ *\ -arch\ *) am__universal=true ;;
+ esac
+
+ for depmode in $am_compiler_list; do
+ # Setup a source with many dependencies, because some compilers
+ # like to wrap large dependency lists on column 80 (with \), and
+ # we should not choose a depcomp mode which is confused by this.
+ #
+ # We need to recreate these files for each test, as the compiler may
+ # overwrite some of them when testing with obscure command lines.
+ # This happens at least with the AIX C compiler.
+ : > sub/conftest.c
+ for i in 1 2 3 4 5 6; do
+ echo '#include "conftst'$i'.h"' >> sub/conftest.c
+ # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
+ # Solaris 8's {/usr,}/bin/sh.
+ touch sub/conftst$i.h
+ done
+ echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
+
+ # We check with `-c' and `-o' for the sake of the "dashmstdout"
+ # mode. It turns out that the SunPro C++ compiler does not properly
+ # handle `-M -o', and we need to detect this. Also, some Intel
+ # versions had trouble with output in subdirs
+ am__obj=sub/conftest.${OBJEXT-o}
+ am__minus_obj="-o $am__obj"
+ case $depmode in
+ gcc)
+ # This depmode causes a compiler race in universal mode.
+ test "$am__universal" = false || continue
+ ;;
+ nosideeffect)
+ # after this tag, mechanisms are not by side-effect, so they'll
+ # only be used when explicitly requested
+ if test "x$enable_dependency_tracking" = xyes; then
+ continue
+ else
+ break
+ fi
+ ;;
+ msvc7 | msvc7msys | msvisualcpp | msvcmsys)
+ # This compiler won't grok `-c -o', but also, the minuso test has
+ # not run yet. These depmodes are late enough in the game, and
+ # so weak that their functioning should not be impacted.
+ am__obj=conftest.${OBJEXT-o}
+ am__minus_obj=
+ ;;
+ none) break ;;
+ esac
+ if depmode=$depmode \
+ source=sub/conftest.c object=$am__obj \
+ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
+ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
+ >/dev/null 2>conftest.err &&
+ grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
+ grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
+ grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
+ ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
+ # icc doesn't choke on unknown options, it will just issue warnings
+ # or remarks (even with -Werror). So we grep stderr for any message
+ # that says an option was ignored or not supported.
+ # When given -MP, icc 7.0 and 7.1 complain thusly:
+ # icc: Command line warning: ignoring option '-M'; no argument required
+ # The diagnosis changed in icc 8.0:
+ # icc: Command line remark: option '-MP' not supported
+ if (grep 'ignoring option' conftest.err ||
+ grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
+ am_cv_CC_dependencies_compiler_type=$depmode
+ break
+ fi
+ fi
+ done
+
+ cd ..
+ rm -rf conftest.dir
+else
+ am_cv_CC_dependencies_compiler_type=none
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
+$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; }
+CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
+
+ if
+ test "x$enable_dependency_tracking" != xno \
+ && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then
+ am__fastdepCC_TRUE=
+ am__fastdepCC_FALSE='#'
+else
+ am__fastdepCC_TRUE='#'
+ am__fastdepCC_FALSE=
+fi
+
+
+if test -z "$CC"; then
+ # Extract the first word of "cc", so it can be a program name with args.
+set dummy cc; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_CC+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+ ac_prog_rejected=no
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
+ ac_prog_rejected=yes
+ continue
+ fi
+ ac_cv_prog_CC="cc"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+if test $ac_prog_rejected = yes; then
+ # We found a bogon in the path, so make sure we never use it.
+ set dummy $ac_cv_prog_CC
+ shift
+ if test $# != 0; then
+ # We chose a different compiler from the bogus one.
+ # However, it has the same basename, so the bogon will be chosen
+ # first if we set CC to just the basename; use the full file name.
+ shift
+ ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
+ fi
+fi
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+$as_echo "$CC" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+ test -z "$CC" && as_fn_error $? "no acceptable cc found in \$PATH" "$LINENO" 5
+fi
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using GNU C" >&5
+$as_echo_n "checking whether we are using GNU C... " >&6; }
+if ${ac_cv_c_compiler_gnu+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat > conftest.c <<EOF
+#ifdef __GNUC__
+ yes;
+#endif
+EOF
+if { ac_try='${CC-cc} -E conftest.c'
+ { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; } | egrep yes >/dev/null 2>&1; then
+ ac_cv_c_compiler_gnu=yes
+else
+ ac_cv_c_compiler_gnu=no
+fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
+$as_echo "$ac_cv_c_compiler_gnu" >&6; }
+
+if test $ac_cv_c_compiler_gnu = yes; then
+ GCC=yes
+ ac_test_CFLAGS="${CFLAGS+set}"
+ ac_save_CFLAGS="$CFLAGS"
+ CFLAGS=
+ ac_test_CFLAGS=${CFLAGS+set}
+ac_save_CFLAGS=$CFLAGS
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
+$as_echo_n "checking whether $CC accepts -g... " >&6; }
+if ${ac_cv_prog_cc_g+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_save_c_werror_flag=$ac_c_werror_flag
+ ac_c_werror_flag=yes
+ ac_cv_prog_cc_g=no
+ CFLAGS="-g"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ ac_cv_prog_cc_g=yes
+else
+ CFLAGS=""
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+
+else
+ ac_c_werror_flag=$ac_save_c_werror_flag
+ CFLAGS="-g"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ ac_cv_prog_cc_g=yes
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ ac_c_werror_flag=$ac_save_c_werror_flag
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
+$as_echo "$ac_cv_prog_cc_g" >&6; }
+if test "$ac_test_CFLAGS" = set; then
+ CFLAGS=$ac_save_CFLAGS
+elif test $ac_cv_prog_cc_g = yes; then
+ if test "$GCC" = yes; then
+ CFLAGS="-g -O2"
+ else
+ CFLAGS="-g"
+ fi
+else
+ if test "$GCC" = yes; then
+ CFLAGS="-O2"
+ else
+ CFLAGS=
+ fi
+fi
+ if test "$ac_test_CFLAGS" = set; then
+ CFLAGS="$ac_save_CFLAGS"
+ elif test $ac_cv_prog_cc_g = yes; then
+ CFLAGS="-g -O2"
+ else
+ CFLAGS="-O2"
+ fi
+else
+ GCC=
+ test "${CFLAGS+set}" = set || CFLAGS="-g"
+fi
+
+AS=${AS-as}
+
+AR=${AR-ar}
+
+LD=${LD-ld}
+
+if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
+set dummy ${ac_tool_prefix}ranlib; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_RANLIB+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$RANLIB"; then
+ ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+RANLIB=$ac_cv_prog_RANLIB
+if test -n "$RANLIB"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
+$as_echo "$RANLIB" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_RANLIB"; then
+ ac_ct_RANLIB=$RANLIB
+ # Extract the first word of "ranlib", so it can be a program name with args.
+set dummy ranlib; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_ct_RANLIB"; then
+ ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_ac_ct_RANLIB="ranlib"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
+if test -n "$ac_ct_RANLIB"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
+$as_echo "$ac_ct_RANLIB" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+ if test "x$ac_ct_RANLIB" = x; then
+ RANLIB=":"
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ RANLIB=$ac_ct_RANLIB
+ fi
+else
+ RANLIB="$ac_cv_prog_RANLIB"
+fi
+
+# By default we simply use the C compiler to build assembly code.
+
+test "${CCAS+set}" = set || CCAS=$CC
+test "${CCASFLAGS+set}" = set || CCASFLAGS=$CFLAGS
+
+
+
+
+host_makefile_frag=${srcdir}/../config/default.mh
+target_makefile_frag=${srcdir}/../config/default.mt
+
+host_makefile_frag_path=$host_makefile_frag
+
+
+target_makefile_frag_path=$target_makefile_frag
+
+
+
+ac_config_files="$ac_config_files Makefile"
+
+cat >confcache <<\_ACEOF
+# This file is a shell script that caches the results of configure
+# tests run on this system so they can be shared between configure
+# scripts and configure runs, see configure's option --config-cache.
+# It is not useful on other systems. If it contains results you don't
+# want to keep, you may remove or edit it.
+#
+# config.status only pays attention to the cache file if you give it
+# the --recheck option to rerun configure.
+#
+# `ac_cv_env_foo' variables (set or unset) will be overridden when
+# loading this file, other *unset* `ac_cv_foo' will be assigned the
+# following values.
+
+_ACEOF
+
+# The following way of writing the cache mishandles newlines in values,
+# but we know of no workaround that is simple, portable, and efficient.
+# So, we kill variables containing newlines.
+# Ultrix sh set writes to stderr and can't be redirected directly,
+# and sets the high bit in the cache file unless we assign to the vars.
+(
+ for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
+ eval ac_val=\$$ac_var
+ case $ac_val in #(
+ *${as_nl}*)
+ case $ac_var in #(
+ *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
+$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
+ esac
+ case $ac_var in #(
+ _ | IFS | as_nl) ;; #(
+ BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
+ *) { eval $ac_var=; unset $ac_var;} ;;
+ esac ;;
+ esac
+ done
+
+ (set) 2>&1 |
+ case $as_nl`(ac_space=' '; set) 2>&1` in #(
+ *${as_nl}ac_space=\ *)
+ # `set' does not quote correctly, so add quotes: double-quote
+ # substitution turns \\\\ into \\, and sed turns \\ into \.
+ sed -n \
+ "s/'/'\\\\''/g;
+ s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
+ ;; #(
+ *)
+ # `set' quotes correctly as required by POSIX, so do not add quotes.
+ sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
+ ;;
+ esac |
+ sort
+) |
+ sed '
+ /^ac_cv_env_/b end
+ t clear
+ :clear
+ s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
+ t end
+ s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
+ :end' >>confcache
+if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
+ if test -w "$cache_file"; then
+ if test "x$cache_file" != "x/dev/null"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
+$as_echo "$as_me: updating cache $cache_file" >&6;}
+ if test ! -f "$cache_file" || test -h "$cache_file"; then
+ cat confcache >"$cache_file"
+ else
+ case $cache_file in #(
+ */* | ?:*)
+ mv -f confcache "$cache_file"$$ &&
+ mv -f "$cache_file"$$ "$cache_file" ;; #(
+ *)
+ mv -f confcache "$cache_file" ;;
+ esac
+ fi
+ fi
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
+$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
+ fi
+fi
+rm -f confcache
+
+test "x$prefix" = xNONE && prefix=$ac_default_prefix
+# Let make expand exec_prefix.
+test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
+
+# Transform confdefs.h into DEFS.
+# Protect against shell expansion while executing Makefile rules.
+# Protect against Makefile macro expansion.
+#
+# If the first sed substitution is executed (which looks for macros that
+# take arguments), then branch to the quote section. Otherwise,
+# look for a macro that doesn't take arguments.
+ac_script='
+:mline
+/\\$/{
+ N
+ s,\\\n,,
+ b mline
+}
+t clear
+:clear
+s/^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*([^)]*)\)[ ]*\(.*\)/-D\1=\2/g
+t quote
+s/^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)/-D\1=\2/g
+t quote
+b any
+:quote
+s/[ `~#$^&*(){}\\|;'\''"<>?]/\\&/g
+s/\[/\\&/g
+s/\]/\\&/g
+s/\$/$$/g
+H
+:any
+${
+ g
+ s/^\n//
+ s/\n/ /g
+ p
+}
+'
+DEFS=`sed -n "$ac_script" confdefs.h`
+
+
+ac_libobjs=
+ac_ltlibobjs=
+U=
+for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
+ # 1. Remove the extension, and $U if already installed.
+ ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
+ ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
+ # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
+ # will be set to the directory where LIBOBJS objects are built.
+ as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
+ as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
+done
+LIBOBJS=$ac_libobjs
+
+LTLIBOBJS=$ac_ltlibobjs
+
+
+if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then
+ as_fn_error $? "conditional \"AMDEP\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
+ as_fn_error $? "conditional \"am__fastdepCC\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+
+: "${CONFIG_STATUS=./config.status}"
+ac_write_fail=0
+ac_clean_files_save=$ac_clean_files
+ac_clean_files="$ac_clean_files $CONFIG_STATUS"
+{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
+$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
+as_write_fail=0
+cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
+#! $SHELL
+# Generated by $as_me.
+# Run this file to recreate the current configuration.
+# Compiler output produced by configure, useful for debugging
+# configure, is in config.log if it exists.
+
+debug=false
+ac_cs_recheck=false
+ac_cs_silent=false
+
+SHELL=\${CONFIG_SHELL-$SHELL}
+export SHELL
+_ASEOF
+cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
+## -------------------- ##
+## M4sh Initialization. ##
+## -------------------- ##
+
+# Be more Bourne compatible
+DUALCASE=1; export DUALCASE # for MKS sh
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
+ emulate sh
+ NULLCMD=:
+ # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
+ # is contrary to our usage. Disable this feature.
+ alias -g '${1+"$@"}'='"$@"'
+ setopt NO_GLOB_SUBST
+else
+ case `(set -o) 2>/dev/null` in #(
+ *posix*) :
+ set -o posix ;; #(
+ *) :
+ ;;
+esac
+fi
+
+
+as_nl='
+'
+export as_nl
+# Printing a long string crashes Solaris 7 /usr/bin/printf.
+as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
+as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
+as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
+# Prefer a ksh shell builtin over an external printf program on Solaris,
+# but without wasting forks for bash or zsh.
+if test -z "$BASH_VERSION$ZSH_VERSION" \
+ && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
+ as_echo='print -r --'
+ as_echo_n='print -rn --'
+elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
+ as_echo='printf %s\n'
+ as_echo_n='printf %s'
+else
+ if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
+ as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
+ as_echo_n='/usr/ucb/echo -n'
+ else
+ as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
+ as_echo_n_body='eval
+ arg=$1;
+ case $arg in #(
+ *"$as_nl"*)
+ expr "X$arg" : "X\\(.*\\)$as_nl";
+ arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
+ esac;
+ expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
+ '
+ export as_echo_n_body
+ as_echo_n='sh -c $as_echo_n_body as_echo'
+ fi
+ export as_echo_body
+ as_echo='sh -c $as_echo_body as_echo'
+fi
+
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+ PATH_SEPARATOR=:
+ (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
+ (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
+ PATH_SEPARATOR=';'
+ }
+fi
+
+
+# IFS
+# We need space, tab and new line, in precisely that order. Quoting is
+# there to prevent editors from complaining about space-tab.
+# (If _AS_PATH_WALK were called with IFS unset, it would disable word
+# splitting by setting IFS to empty value.)
+IFS=" "" $as_nl"
+
+# Find who we are. Look in the path if we contain no directory separator.
+as_myself=
+case $0 in #((
+ *[\\/]* ) as_myself=$0 ;;
+ *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
+ done
+IFS=$as_save_IFS
+
+ ;;
+esac
+# We did not find ourselves, most probably we were run as `sh COMMAND'
+# in which case we are not to be found in the path.
+if test "x$as_myself" = x; then
+ as_myself=$0
+fi
+if test ! -f "$as_myself"; then
+ $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
+ exit 1
+fi
+
+# Unset variables that we do not need and which cause bugs (e.g. in
+# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
+# suppresses any "Segmentation fault" message there. '((' could
+# trigger a bug in pdksh 5.2.14.
+for as_var in BASH_ENV ENV MAIL MAILPATH
+do eval test x\${$as_var+set} = xset \
+ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
+done
+PS1='$ '
+PS2='> '
+PS4='+ '
+
+# NLS nuisances.
+LC_ALL=C
+export LC_ALL
+LANGUAGE=C
+export LANGUAGE
+
+# CDPATH.
+(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
+
+
+# as_fn_error STATUS ERROR [LINENO LOG_FD]
+# ----------------------------------------
+# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
+# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
+# script with STATUS, using 1 if that was 0.
+as_fn_error ()
+{
+ as_status=$1; test $as_status -eq 0 && as_status=1
+ if test "$4"; then
+ as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
+ fi
+ $as_echo "$as_me: error: $2" >&2
+ as_fn_exit $as_status
+} # as_fn_error
+
+
+# as_fn_set_status STATUS
+# -----------------------
+# Set $? to STATUS, without forking.
+as_fn_set_status ()
+{
+ return $1
+} # as_fn_set_status
+
+# as_fn_exit STATUS
+# -----------------
+# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
+as_fn_exit ()
+{
+ set +e
+ as_fn_set_status $1
+ exit $1
+} # as_fn_exit
+
+# as_fn_unset VAR
+# ---------------
+# Portably unset VAR.
+as_fn_unset ()
+{
+ { eval $1=; unset $1;}
+}
+as_unset=as_fn_unset
+# as_fn_append VAR VALUE
+# ----------------------
+# Append the text in VALUE to the end of the definition contained in VAR. Take
+# advantage of any shell optimizations that allow amortized linear growth over
+# repeated appends, instead of the typical quadratic growth present in naive
+# implementations.
+if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
+ eval 'as_fn_append ()
+ {
+ eval $1+=\$2
+ }'
+else
+ as_fn_append ()
+ {
+ eval $1=\$$1\$2
+ }
+fi # as_fn_append
+
+# as_fn_arith ARG...
+# ------------------
+# Perform arithmetic evaluation on the ARGs, and store the result in the
+# global $as_val. Take advantage of shells that can avoid forks. The arguments
+# must be portable across $(()) and expr.
+if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
+ eval 'as_fn_arith ()
+ {
+ as_val=$(( $* ))
+ }'
+else
+ as_fn_arith ()
+ {
+ as_val=`expr "$@" || test $? -eq 1`
+ }
+fi # as_fn_arith
+
+
+if expr a : '\(a\)' >/dev/null 2>&1 &&
+ test "X`expr 00001 : '.*\(...\)'`" = X001; then
+ as_expr=expr
+else
+ as_expr=false
+fi
+
+if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
+ as_basename=basename
+else
+ as_basename=false
+fi
+
+if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
+ as_dirname=dirname
+else
+ as_dirname=false
+fi
+
+as_me=`$as_basename -- "$0" ||
+$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
+ X"$0" : 'X\(//\)$' \| \
+ X"$0" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X/"$0" |
+ sed '/^.*\/\([^/][^/]*\)\/*$/{
+ s//\1/
+ q
+ }
+ /^X\/\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\/\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+
+# Avoid depending upon Character Ranges.
+as_cr_letters='abcdefghijklmnopqrstuvwxyz'
+as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
+as_cr_Letters=$as_cr_letters$as_cr_LETTERS
+as_cr_digits='0123456789'
+as_cr_alnum=$as_cr_Letters$as_cr_digits
+
+ECHO_C= ECHO_N= ECHO_T=
+case `echo -n x` in #(((((
+-n*)
+ case `echo 'xy\c'` in
+ *c*) ECHO_T=' ';; # ECHO_T is single tab character.
+ xy) ECHO_C='\c';;
+ *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
+ ECHO_T=' ';;
+ esac;;
+*)
+ ECHO_N='-n';;
+esac
+
+rm -f conf$$ conf$$.exe conf$$.file
+if test -d conf$$.dir; then
+ rm -f conf$$.dir/conf$$.file
+else
+ rm -f conf$$.dir
+ mkdir conf$$.dir 2>/dev/null
+fi
+if (echo >conf$$.file) 2>/dev/null; then
+ if ln -s conf$$.file conf$$ 2>/dev/null; then
+ as_ln_s='ln -s'
+ # ... but there are two gotchas:
+ # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
+ # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
+ # In both cases, we have to default to `cp -p'.
+ ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
+ as_ln_s='cp -p'
+ elif ln conf$$.file conf$$ 2>/dev/null; then
+ as_ln_s=ln
+ else
+ as_ln_s='cp -p'
+ fi
+else
+ as_ln_s='cp -p'
+fi
+rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
+rmdir conf$$.dir 2>/dev/null
+
+
+# as_fn_mkdir_p
+# -------------
+# Create "$as_dir" as a directory, including parents if necessary.
+as_fn_mkdir_p ()
+{
+
+ case $as_dir in #(
+ -*) as_dir=./$as_dir;;
+ esac
+ test -d "$as_dir" || eval $as_mkdir_p || {
+ as_dirs=
+ while :; do
+ case $as_dir in #(
+ *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
+ *) as_qdir=$as_dir;;
+ esac
+ as_dirs="'$as_qdir' $as_dirs"
+ as_dir=`$as_dirname -- "$as_dir" ||
+$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$as_dir" : 'X\(//\)[^/]' \| \
+ X"$as_dir" : 'X\(//\)$' \| \
+ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$as_dir" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)[^/].*/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+ test -d "$as_dir" && break
+ done
+ test -z "$as_dirs" || eval "mkdir $as_dirs"
+ } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
+
+
+} # as_fn_mkdir_p
+if mkdir -p . 2>/dev/null; then
+ as_mkdir_p='mkdir -p "$as_dir"'
+else
+ test -d ./-p && rmdir ./-p
+ as_mkdir_p=false
+fi
+
+if test -x / >/dev/null 2>&1; then
+ as_test_x='test -x'
+else
+ if ls -dL / >/dev/null 2>&1; then
+ as_ls_L_option=L
+ else
+ as_ls_L_option=
+ fi
+ as_test_x='
+ eval sh -c '\''
+ if test -d "$1"; then
+ test -d "$1/.";
+ else
+ case $1 in #(
+ -*)set "./$1";;
+ esac;
+ case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
+ ???[sx]*):;;*)false;;esac;fi
+ '\'' sh
+ '
+fi
+as_executable_p=$as_test_x
+
+# Sed expression to map a string onto a valid CPP name.
+as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
+
+# Sed expression to map a string onto a valid variable name.
+as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
+
+
+exec 6>&1
+## ----------------------------------- ##
+## Main body of $CONFIG_STATUS script. ##
+## ----------------------------------- ##
+_ASEOF
+test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+# Save the log message, to keep $0 and so on meaningful, and to
+# report actual input values of CONFIG_FILES etc. instead of their
+# values after options handling.
+ac_log="
+This file was extended by libor1k $as_me 0.0.1, which was
+generated by GNU Autoconf 2.68. Invocation command line was
+
+ CONFIG_FILES = $CONFIG_FILES
+ CONFIG_HEADERS = $CONFIG_HEADERS
+ CONFIG_LINKS = $CONFIG_LINKS
+ CONFIG_COMMANDS = $CONFIG_COMMANDS
+ $ $0 $@
+
+on `(hostname || uname -n) 2>/dev/null | sed 1q`
+"
+
+_ACEOF
+
+case $ac_config_files in *"
+"*) set x $ac_config_files; shift; ac_config_files=$*;;
+esac
+
+
+
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+# Files that config.status was made for.
+config_files="$ac_config_files"
+config_commands="$ac_config_commands"
+
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+ac_cs_usage="\
+\`$as_me' instantiates files and other configuration actions
+from templates according to the current configuration. Unless the files
+and actions are specified as TAGs, all are instantiated by default.
+
+Usage: $0 [OPTION]... [TAG]...
+
+ -h, --help print this help, then exit
+ -V, --version print version number and configuration settings, then exit
+ --config print configuration, then exit
+ -q, --quiet, --silent
+ do not print progress messages
+ -d, --debug don't remove temporary files
+ --recheck update $as_me by reconfiguring in the same conditions
+ --file=FILE[:TEMPLATE]
+ instantiate the configuration file FILE
+
+Configuration files:
+$config_files
+
+Configuration commands:
+$config_commands
+
+Report bugs to the package provider."
+
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
+ac_cs_version="\\
+libor1k config.status 0.0.1
+configured by $0, generated by GNU Autoconf 2.68,
+ with options \\"\$ac_cs_config\\"
+
+Copyright (C) 2010 Free Software Foundation, Inc.
+This config.status script is free software; the Free Software Foundation
+gives unlimited permission to copy, distribute and modify it."
+
+ac_pwd='$ac_pwd'
+srcdir='$srcdir'
+INSTALL='$INSTALL'
+test -n "\$AWK" || AWK=awk
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+# The default lists apply if the user does not specify any file.
+ac_need_defaults=:
+while test $# != 0
+do
+ case $1 in
+ --*=?*)
+ ac_option=`expr "X$1" : 'X\([^=]*\)='`
+ ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
+ ac_shift=:
+ ;;
+ --*=)
+ ac_option=`expr "X$1" : 'X\([^=]*\)='`
+ ac_optarg=
+ ac_shift=:
+ ;;
+ *)
+ ac_option=$1
+ ac_optarg=$2
+ ac_shift=shift
+ ;;
+ esac
+
+ case $ac_option in
+ # Handling of the options.
+ -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
+ ac_cs_recheck=: ;;
+ --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
+ $as_echo "$ac_cs_version"; exit ;;
+ --config | --confi | --conf | --con | --co | --c )
+ $as_echo "$ac_cs_config"; exit ;;
+ --debug | --debu | --deb | --de | --d | -d )
+ debug=: ;;
+ --file | --fil | --fi | --f )
+ $ac_shift
+ case $ac_optarg in
+ *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
+ '') as_fn_error $? "missing file argument" ;;
+ esac
+ as_fn_append CONFIG_FILES " '$ac_optarg'"
+ ac_need_defaults=false;;
+ --he | --h | --help | --hel | -h )
+ $as_echo "$ac_cs_usage"; exit ;;
+ -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+ | -silent | --silent | --silen | --sile | --sil | --si | --s)
+ ac_cs_silent=: ;;
+
+ # This is an error.
+ -*) as_fn_error $? "unrecognized option: \`$1'
+Try \`$0 --help' for more information." ;;
+
+ *) as_fn_append ac_config_targets " $1"
+ ac_need_defaults=false ;;
+
+ esac
+ shift
+done
+
+ac_configure_extra_args=
+
+if $ac_cs_silent; then
+ exec 6>/dev/null
+ ac_configure_extra_args="$ac_configure_extra_args --silent"
+fi
+
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+if \$ac_cs_recheck; then
+ set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
+ shift
+ \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
+ CONFIG_SHELL='$SHELL'
+ export CONFIG_SHELL
+ exec "\$@"
+fi
+
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+exec 5>>config.log
+{
+ echo
+ sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
+## Running $as_me. ##
+_ASBOX
+ $as_echo "$ac_log"
+} >&5
+
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+#
+# INIT-COMMANDS
+#
+AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"
+srcdir=${srcdir}
+target=${target}
+with_multisubdir=${with_multisubdir}
+ac_configure_args="${ac_configure_args} --enable-multilib"
+CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
+libgloss_topdir=${libgloss_topdir}
+
+
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+
+# Handling of arguments.
+for ac_config_target in $ac_config_targets
+do
+ case $ac_config_target in
+ "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
+ "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
+
+ *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
+ esac
+done
+
+
+# If the user did not use the arguments to specify the items to instantiate,
+# then the envvar interface is used. Set only those that are not.
+# We use the long form for the default assignment because of an extremely
+# bizarre bug on SunOS 4.1.3.
+if $ac_need_defaults; then
+ test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
+ test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
+fi
+
+# Have a temporary directory for convenience. Make it in the build tree
+# simply because there is no reason against having it here, and in addition,
+# creating and moving files from /tmp can sometimes cause problems.
+# Hook for its removal unless debugging.
+# Note that there is a small window in which the directory will not be cleaned:
+# after its creation but before its name has been assigned to `$tmp'.
+$debug ||
+{
+ tmp= ac_tmp=
+ trap 'exit_status=$?
+ : "${ac_tmp:=$tmp}"
+ { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
+' 0
+ trap 'as_fn_exit 1' 1 2 13 15
+}
+# Create a (secure) tmp directory for tmp files.
+
+{
+ tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
+ test -d "$tmp"
+} ||
+{
+ tmp=./conf$$-$RANDOM
+ (umask 077 && mkdir "$tmp")
+} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
+ac_tmp=$tmp
+
+# Set up the scripts for CONFIG_FILES section.
+# No need to generate them if there are no CONFIG_FILES.
+# This happens for instance with `./config.status config.h'.
+if test -n "$CONFIG_FILES"; then
+
+if $AWK 'BEGIN { getline <"/dev/null" }' </dev/null 2>/dev/null; then
+ ac_cs_awk_getline=:
+ ac_cs_awk_pipe_init=
+ ac_cs_awk_read_file='
+ while ((getline aline < (F[key])) > 0)
+ print(aline)
+ close(F[key])'
+ ac_cs_awk_pipe_fini=
+else
+ ac_cs_awk_getline=false
+ ac_cs_awk_pipe_init="print \"cat <<'|#_!!_#|' &&\""
+ ac_cs_awk_read_file='
+ print "|#_!!_#|"
+ print "cat " F[key] " &&"
+ '$ac_cs_awk_pipe_init
+ # The final `:' finishes the AND list.
+ ac_cs_awk_pipe_fini='END { print "|#_!!_#|"; print ":" }'
+fi
+ac_cr=`echo X | tr X '\015'`
+# On cygwin, bash can eat \r inside `` if the user requested igncr.
+# But we know of no other shell where ac_cr would be empty at this
+# point, so we can use a bashism as a fallback.
+if test "x$ac_cr" = x; then
+ eval ac_cr=\$\'\\r\'
+fi
+ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
+if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
+ ac_cs_awk_cr='\\r'
+else
+ ac_cs_awk_cr=$ac_cr
+fi
+
+echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
+_ACEOF
+
+# Create commands to substitute file output variables.
+{
+ echo "cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1" &&
+ echo 'cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&' &&
+ echo "$ac_subst_files" | sed 's/.*/F["&"]="$&"/' &&
+ echo "_ACAWK" &&
+ echo "_ACEOF"
+} >conf$$files.sh &&
+. ./conf$$files.sh ||
+ as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
+rm -f conf$$files.sh
+
+{
+ echo "cat >conf$$subs.awk <<_ACEOF" &&
+ echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
+ echo "_ACEOF"
+} >conf$$subs.sh ||
+ as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
+ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
+ac_delim='%!_!# '
+for ac_last_try in false false false false false :; do
+ . ./conf$$subs.sh ||
+ as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
+
+ ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
+ if test $ac_delim_n = $ac_delim_num; then
+ break
+ elif $ac_last_try; then
+ as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
+ else
+ ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
+ fi
+done
+rm -f conf$$subs.sh
+
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
+_ACEOF
+sed -n '
+h
+s/^/S["/; s/!.*/"]=/
+p
+g
+s/^[^!]*!//
+:repl
+t repl
+s/'"$ac_delim"'$//
+t delim
+:nl
+h
+s/\(.\{148\}\)..*/\1/
+t more1
+s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
+p
+n
+b repl
+:more1
+s/["\\]/\\&/g; s/^/"/; s/$/"\\/
+p
+g
+s/.\{148\}//
+t nl
+:delim
+h
+s/\(.\{148\}\)..*/\1/
+t more2
+s/["\\]/\\&/g; s/^/"/; s/$/"/
+p
+b
+:more2
+s/["\\]/\\&/g; s/^/"/; s/$/"\\/
+p
+g
+s/.\{148\}//
+t delim
+' <conf$$subs.awk | sed '
+/^[^""]/{
+ N
+ s/\n//
+}
+' >>$CONFIG_STATUS || ac_write_fail=1
+rm -f conf$$subs.awk
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+_ACAWK
+cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
+ for (key in S) S_is_set[key] = 1
+ FS = ""
+ \$ac_cs_awk_pipe_init
+}
+{
+ line = $ 0
+ nfields = split(line, field, "@")
+ substed = 0
+ len = length(field[1])
+ for (i = 2; i < nfields; i++) {
+ key = field[i]
+ keylen = length(key)
+ if (S_is_set[key]) {
+ value = S[key]
+ line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
+ len += length(value) + length(field[++i])
+ substed = 1
+ } else
+ len += 1 + keylen
+ }
+ if (nfields == 3 && !substed) {
+ key = field[2]
+ if (F[key] != "" && line ~ /^[ ]*@.*@[ ]*$/) {
+ \$ac_cs_awk_read_file
+ next
+ }
+ }
+ print line
+}
+\$ac_cs_awk_pipe_fini
+_ACAWK
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
+ sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
+else
+ cat
+fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
+ || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
+_ACEOF
+
+# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
+# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
+# trailing colons and then remove the whole line if VPATH becomes empty
+# (actually we leave an empty line to preserve line numbers).
+if test "x$srcdir" = x.; then
+ ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
+h
+s///
+s/^/:/
+s/[ ]*$/:/
+s/:\$(srcdir):/:/g
+s/:\${srcdir}:/:/g
+s/:@srcdir@:/:/g
+s/^:*//
+s/:*$//
+x
+s/\(=[ ]*\).*/\1/
+G
+s/\n//
+s/^[^=]*=[ ]*$//
+}'
+fi
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+fi # test -n "$CONFIG_FILES"
+
+
+eval set X " :F $CONFIG_FILES :C $CONFIG_COMMANDS"
+shift
+for ac_tag
+do
+ case $ac_tag in
+ :[FHLC]) ac_mode=$ac_tag; continue;;
+ esac
+ case $ac_mode$ac_tag in
+ :[FHL]*:*);;
+ :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
+ :[FH]-) ac_tag=-:-;;
+ :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
+ esac
+ ac_save_IFS=$IFS
+ IFS=:
+ set x $ac_tag
+ IFS=$ac_save_IFS
+ shift
+ ac_file=$1
+ shift
+
+ case $ac_mode in
+ :L) ac_source=$1;;
+ :[FH])
+ ac_file_inputs=
+ for ac_f
+ do
+ case $ac_f in
+ -) ac_f="$ac_tmp/stdin";;
+ *) # Look for the file first in the build tree, then in the source tree
+ # (if the path is not absolute). The absolute path cannot be DOS-style,
+ # because $ac_f cannot contain `:'.
+ test -f "$ac_f" ||
+ case $ac_f in
+ [\\/$]*) false;;
+ *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
+ esac ||
+ as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
+ esac
+ case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
+ as_fn_append ac_file_inputs " '$ac_f'"
+ done
+
+ # Let's still pretend it is `configure' which instantiates (i.e., don't
+ # use $as_me), people would be surprised to read:
+ # /* config.h. Generated by config.status. */
+ configure_input='Generated from '`
+ $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
+ `' by configure.'
+ if test x"$ac_file" != x-; then
+ configure_input="$ac_file. $configure_input"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
+$as_echo "$as_me: creating $ac_file" >&6;}
+ fi
+ # Neutralize special characters interpreted by sed in replacement strings.
+ case $configure_input in #(
+ *\&* | *\|* | *\\* )
+ ac_sed_conf_input=`$as_echo "$configure_input" |
+ sed 's/[\\\\&|]/\\\\&/g'`;; #(
+ *) ac_sed_conf_input=$configure_input;;
+ esac
+
+ case $ac_tag in
+ *:-:* | *:-) cat >"$ac_tmp/stdin" \
+ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
+ esac
+ ;;
+ esac
+
+ ac_dir=`$as_dirname -- "$ac_file" ||
+$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$ac_file" : 'X\(//\)[^/]' \| \
+ X"$ac_file" : 'X\(//\)$' \| \
+ X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$ac_file" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)[^/].*/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+ as_dir="$ac_dir"; as_fn_mkdir_p
+ ac_builddir=.
+
+case "$ac_dir" in
+.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
+*)
+ ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
+ # A ".." for each directory in $ac_dir_suffix.
+ ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
+ case $ac_top_builddir_sub in
+ "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
+ *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
+ esac ;;
+esac
+ac_abs_top_builddir=$ac_pwd
+ac_abs_builddir=$ac_pwd$ac_dir_suffix
+# for backward compatibility:
+ac_top_builddir=$ac_top_build_prefix
+
+case $srcdir in
+ .) # We are building in place.
+ ac_srcdir=.
+ ac_top_srcdir=$ac_top_builddir_sub
+ ac_abs_top_srcdir=$ac_pwd ;;
+ [\\/]* | ?:[\\/]* ) # Absolute name.
+ ac_srcdir=$srcdir$ac_dir_suffix;
+ ac_top_srcdir=$srcdir
+ ac_abs_top_srcdir=$srcdir ;;
+ *) # Relative name.
+ ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
+ ac_top_srcdir=$ac_top_build_prefix$srcdir
+ ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
+esac
+ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
+
+
+ case $ac_mode in
+ :F)
+ #
+ # CONFIG_FILE
+ #
+
+ case $INSTALL in
+ [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
+ *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
+ esac
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+# If the template does not know about datarootdir, expand it.
+# FIXME: This hack should be removed a few years after 2.60.
+ac_datarootdir_hack=; ac_datarootdir_seen=
+ac_sed_dataroot='
+/datarootdir/ {
+ p
+ q
+}
+/@datadir@/p
+/@docdir@/p
+/@infodir@/p
+/@localedir@/p
+/@mandir@/p'
+case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
+*datarootdir*) ac_datarootdir_seen=yes;;
+*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
+$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+ ac_datarootdir_hack='
+ s&@datadir@&$datadir&g
+ s&@docdir@&$docdir&g
+ s&@infodir@&$infodir&g
+ s&@localedir@&$localedir&g
+ s&@mandir@&$mandir&g
+ s&\\\${datarootdir}&$datarootdir&g' ;;
+esac
+_ACEOF
+
+# Neutralize VPATH when `$srcdir' = `.'.
+# Shell code in configure.ac might set extrasub.
+# FIXME: do we really want to maintain this feature?
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+ac_sed_extra="$ac_vpsub
+$extrasub
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+:t
+/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
+s|@configure_input@|$ac_sed_conf_input|;t t
+s&@top_builddir@&$ac_top_builddir_sub&;t t
+s&@top_build_prefix@&$ac_top_build_prefix&;t t
+s&@srcdir@&$ac_srcdir&;t t
+s&@abs_srcdir@&$ac_abs_srcdir&;t t
+s&@top_srcdir@&$ac_top_srcdir&;t t
+s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
+s&@builddir@&$ac_builddir&;t t
+s&@abs_builddir@&$ac_abs_builddir&;t t
+s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
+s&@INSTALL@&$ac_INSTALL&;t t
+$ac_datarootdir_hack
+"
+eval sed \"\$ac_sed_extra\" "$ac_file_inputs" |
+if $ac_cs_awk_getline; then
+ $AWK -f "$ac_tmp/subs.awk"
+else
+ $AWK -f "$ac_tmp/subs.awk" | $SHELL
+fi \
+ >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
+
+test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
+ { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
+ { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
+ "$ac_tmp/out"`; test -z "$ac_out"; } &&
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
+which seems to be undefined. Please make sure it is defined" >&5
+$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
+which seems to be undefined. Please make sure it is defined" >&2;}
+
+ rm -f "$ac_tmp/stdin"
+ case $ac_file in
+ -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
+ *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
+ esac \
+ || as_fn_error $? "could not create $ac_file" "$LINENO" 5
+ ;;
+
+
+ :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
+$as_echo "$as_me: executing $ac_file commands" >&6;}
+ ;;
+ esac
+
+
+ case $ac_file$ac_mode in
+ "depfiles":C) test x"$AMDEP_TRUE" != x"" || {
+ # Autoconf 2.62 quotes --file arguments for eval, but not when files
+ # are listed without --file. Let's play safe and only enable the eval
+ # if we detect the quoting.
+ case $CONFIG_FILES in
+ *\'*) eval set x "$CONFIG_FILES" ;;
+ *) set x $CONFIG_FILES ;;
+ esac
+ shift
+ for mf
+ do
+ # Strip MF so we end up with the name of the file.
+ mf=`echo "$mf" | sed -e 's/:.*$//'`
+ # Check whether this is an Automake generated Makefile or not.
+ # We used to match only the files named `Makefile.in', but
+ # some people rename them; so instead we look at the file content.
+ # Grep'ing the first line is not enough: some people post-process
+ # each Makefile.in and add a new line on top of each file to say so.
+ # Grep'ing the whole file is not good either: AIX grep has a line
+ # limit of 2048, but all sed's we know have understand at least 4000.
+ if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
+ dirpart=`$as_dirname -- "$mf" ||
+$as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$mf" : 'X\(//\)[^/]' \| \
+ X"$mf" : 'X\(//\)$' \| \
+ X"$mf" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$mf" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)[^/].*/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+ else
+ continue
+ fi
+ # Extract the definition of DEPDIR, am__include, and am__quote
+ # from the Makefile without running `make'.
+ DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
+ test -z "$DEPDIR" && continue
+ am__include=`sed -n 's/^am__include = //p' < "$mf"`
+ test -z "am__include" && continue
+ am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
+ # When using ansi2knr, U may be empty or an underscore; expand it
+ U=`sed -n 's/^U = //p' < "$mf"`
+ # Find all dependency output files, they are included files with
+ # $(DEPDIR) in their names. We invoke sed twice because it is the
+ # simplest approach to changing $(DEPDIR) to its actual value in the
+ # expansion.
+ for file in `sed -n "
+ s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
+ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
+ # Make sure the directory exists.
+ test -f "$dirpart/$file" && continue
+ fdir=`$as_dirname -- "$file" ||
+$as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$file" : 'X\(//\)[^/]' \| \
+ X"$file" : 'X\(//\)$' \| \
+ X"$file" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$file" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)[^/].*/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+ as_dir=$dirpart/$fdir; as_fn_mkdir_p
+ # echo "creating $dirpart/$file"
+ echo '# dummy' > "$dirpart/$file"
+ done
+ done
+}
+ ;;
+ "Makefile":F) . ${libgloss_topdir}/config-ml.in ;;
+
+ esac
+done # for ac_tag
+
+
+as_fn_exit 0
+_ACEOF
+ac_clean_files=$ac_clean_files_save
+
+test $ac_write_fail = 0 ||
+ as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
+
+
+# configure is writing to config.log, and then calls config.status.
+# config.status does its own redirection, appending to config.log.
+# Unfortunately, on DOS this fails, as config.log is still kept open
+# by configure, so config.status won't be able to write to it; its
+# output is simply discarded. So we exec the FD to /dev/null,
+# effectively closing config.log, so it can be properly (re)opened and
+# appended to by config.status. When coming back to configure, we
+# need to make the FD available again.
+if test "$no_create" != yes; then
+ ac_cs_success=:
+ ac_config_status_args=
+ test "$silent" = yes &&
+ ac_config_status_args="$ac_config_status_args --quiet"
+ exec 5>/dev/null
+ $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
+ exec 5>>config.log
+ # Use ||, not &&, to avoid exiting from the if with $? = 1, which
+ # would make configure fail if this is the last instruction.
+ $ac_cs_success || as_fn_exit 1
+fi
+if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
+$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
+fi
diff --git a/libgloss/or1k/configure.in b/libgloss/or1k/configure.in
new file mode 100644
index 000000000..5337a4db0
--- /dev/null
+++ b/libgloss/or1k/configure.in
@@ -0,0 +1,81 @@
+# Makefile for libgloss/or1k
+
+# 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 HOLDER 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. */
+
+# Process this file with autoconf to produce a configure script
+
+AC_PREREQ(2.59)
+AC_INIT(libor1k,0.0.1)
+
+# No shared libraries allowed
+if test "${enable_shared}" = "yes" ; then
+ echo "Shared libraries not supported for cross compiling, ignored"
+fi
+
+# Where are the auxillary tools (confg.sub etc)?
+if test "$srcdir" = "." ; then
+ if test "${with_target_subdir}" != "." ; then
+ libgloss_topdir="${srcdir}/${with_multisrctop}../../.."
+ else
+ libgloss_topdir="${srcdir}/${with_multisrctop}../.."
+ fi
+else
+ libgloss_topdir="${srcdir}/../.."
+fi
+AC_CONFIG_AUX_DIR($libgloss_topdir)
+
+AC_CANONICAL_SYSTEM
+AC_ARG_PROGRAM
+
+AC_PROG_INSTALL
+
+AC_DEFINE(HAVE_GNU_LD, 1, [Using GNU ld])
+
+# We always use ELF, define various useful associated things.
+AC_DEFINE(HAVE_ELF, 1, [Using ELF format])
+
+# Standard stuff copied from libnosys. For this we'll need to an aclocal.m4
+LIB_AC_PROG_CC
+AS=${AS-as}
+AC_SUBST(AS)
+AR=${AR-ar}
+AC_SUBST(AR)
+LD=${LD-ld}
+AC_SUBST(LD)
+AC_PROG_RANLIB
+LIB_AM_PROG_AS
+
+host_makefile_frag=${srcdir}/../config/default.mh
+target_makefile_frag=${srcdir}/../config/default.mt
+
+dnl We have to assign the same value to other variables because autoconf
+dnl doesn't provide a mechanism to substitute a replacement keyword with
+dnl arbitrary data or pathnames.
+dnl
+host_makefile_frag_path=$host_makefile_frag
+AC_SUBST(host_makefile_frag_path)
+AC_SUBST_FILE(host_makefile_frag)
+target_makefile_frag_path=$target_makefile_frag
+AC_SUBST(target_makefile_frag_path)
+AC_SUBST_FILE(target_makefile_frag)
+
+AC_CONFIG_FILES(Makefile,
+. ${libgloss_topdir}/config-ml.in,
+srcdir=${srcdir}
+target=${target}
+with_multisubdir=${with_multisubdir}
+ac_configure_args="${ac_configure_args} --enable-multilib"
+CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
+libgloss_topdir=${libgloss_topdir}
+)
+AC_OUTPUT \ No newline at end of file
diff --git a/libgloss/or1k/crt0.S b/libgloss/or1k/crt0.S
new file mode 100644
index 000000000..84adba1e3
--- /dev/null
+++ b/libgloss/or1k/crt0.S
@@ -0,0 +1,671 @@
+/* crt0.S -- startup file for OpenRISC 1000.
+ *
+ * Copyright (c) 2011, 2014 Authors
+ *
+ * Contributor Julius Baxter <juliusbaxter@gmail.com>
+ * Contributor Stefan Wallentowitz <stefan.wallentowitz@tum.de>
+ *
+ * The authors hereby grant permission to use, copy, modify, distribute,
+ * and license this software and its documentation for any purpose, provided
+ * that existing copyright notices are retained in all copies and that this
+ * notice is included verbatim in any distributions. No written agreement,
+ * license, or royalty fee is required for any of the authorized uses.
+ * Modifications to this software may be copyrighted by their authors
+ * and need not follow the licensing terms described here, provided that
+ * the new terms are clearly indicated on the first page of each file where
+ * they apply.
+ */
+
+/* -------------------------------------------------------------------------- */
+/* Coding convention:
+ Assembly is hard to read per se, so please follow the following coding
+ conventions to keep it consistent and ease reading:
+ * internal jump labels start with L, no identation
+ * assemble lines have one tab identation
+ * attributes (.section, .global, ..) are indented with one tab
+ * code is structured using tabs, i.e., use 'l.sw\t0(r1),r1' with a single
+ tab. libgloss assumes 8 space tab width, so that might look unstructured
+ with tab widths below 6. Nevertheless don't use spaces or two tabs.
+ * no space after comma
+ * use the defined macros if possible as they reduce errors
+ * use OR1K_INST with OR1K_DELAYED(_NOP)
+ * OR1K_DELAYED is multiline for better readability, the inner parts are
+ indented with another tab.
+ * COMMENT! Try to accompy every line with a meaningful comment. If possible
+ use pseudo code to describe the code. Also mention intentions and not only
+ the obvious things.. */
+/* -------------------------------------------------------------------------- */
+
+#include "include/or1k-asm.h"
+#include "include/or1k-sprs.h"
+
+/* -------------------------------------------------------------------------- */
+// Stack definitions
+/* -------------------------------------------------------------------------- */
+
+// Stacks
+// Memory layout:
+// +--------------------+ <- board_mem_base+board_mem_size/exception_stack_top
+// | exception stack(s) |
+// +--------------------+ <- stack_top
+// | stack(s) |
+// +--------------------+ <- stack_bottom
+// | heap |
+// +--------------------+
+// | text, data, bss.. |
+// +--------------------+
+
+// Reserved stack size
+#define STACK_SIZE 8192
+
+// Reserved stack size for exceptions (can usually be smaller than normal stack)
+#define EXCEPTION_STACK_SIZE 8192
+
+// Size of space required to store state
+// This value must match that in the support library or1k_exception_handler
+// function
+#define EXCEPTION_STACK_FRAME 136
+
+#define REDZONE 128
+
+ .extern _or1k_stack_top /* points to the next address after the stack */
+ .extern _or1k_stack_bottom /* points to the last address in the stack */
+ .extern _or1k_exception_stack_top
+ .extern _or1k_exception_stack_bottom
+ .extern _or1k_exception_level /* Nesting level of exceptions */
+
+ .section .data
+ .global _or1k_stack_size /* reserved stack size */
+ .global _or1k_exception_stack_size
+ .global _or1k_exception_level
+
+_or1k_stack_size: .word STACK_SIZE
+_or1k_exception_stack_size: .word EXCEPTION_STACK_SIZE
+
+#ifdef __OR1K_MULTICORE__
+ .extern _or1k_stack_core
+ .extern _or1k_exception_stack_core
+#endif
+
+#define SHADOW_REG(x) (OR1K_SPR_SYS_GPR_BASE + 32 + x)
+
+/* -------------------------------------------------------------------------- */
+/*!Macro to handle exceptions.
+
+ Load NPC into r3, EPCR into r4
+ */
+/* -------------------------------------------------------------------------- */
+
+#define GPR_BUF_OFFSET(x) (x << 2)
+
+#ifndef __OR1K_MULTICORE__
+#define CALL_EXCEPTION_HANDLER(id) \
+ /* Store current stack pointer to address 4 */ \
+ l.sw 0x4(r0),r1; \
+ /* Load address of exception nesting level */ \
+ l.movhi r1,hi(_or1k_exception_level); \
+ l.ori r1,r1,lo(_or1k_exception_level); \
+ /* Load the current nesting level */ \
+ l.lwz r1,0(r1); \
+ /* Set flag if this is the outer (first) exception */ \
+ l.sfeq r1,r0; \
+ /* Branch to the code for nested exceptions */ \
+ OR1K_DELAYED_NOP( \
+ OR1K_INST(l.bnf .Lnested_##id) \
+ ); \
+ /* Load top of the exception stack */ \
+ l.movhi r1,hi(_or1k_exception_stack_top); \
+ l.ori r1,r1,lo(_or1k_exception_stack_top); \
+ OR1K_DELAYED( \
+ /* Load value from array to stack pointer */ \
+ OR1K_INST(l.lwz r1,0(r1)), \
+ /* and jump over the nested code */ \
+ OR1K_INST(l.j .Lnesting_done_##id) \
+ ); \
+.Lnested_##id: \
+ /* Load back the stack pointer */ \
+ l.lwz r1,0x4(r0); \
+ /* Add redzone, nesting needs this */ \
+ l.addi r1,r1,-REDZONE; \
+.Lnesting_done_##id: \
+ /* Reserve red zone and context space */ \
+ l.addi r1,r1,-EXCEPTION_STACK_FRAME; \
+ /* Store GPR3 in context */ \
+ l.sw GPR_BUF_OFFSET(3)(r1),r3; \
+ /* Load back software's stack pointer */ \
+ l.lwz r3,0x4(r0); \
+ /* Store this in the context */ \
+ l.sw GPR_BUF_OFFSET(1)(r1),r3; \
+ /* Store GPR4 in the context */ \
+ l.sw GPR_BUF_OFFSET(4)(r1),r4; \
+ /* Load address of the exception level */ \
+ l.movhi r3,hi(_or1k_exception_level); \
+ l.ori r3,r3,lo(_or1k_exception_level); \
+ /* Load current value */ \
+ l.lwz r4,0(r3); \
+ /* Increment level */ \
+ l.addi r4,r4,1; \
+ /* Store back */ \
+ l.sw 0(r3),r4; \
+ /* Copy the current program counter as first */ \
+ /* argument for the exception handler. This */ \
+ /* is then used to determine the exception. */ \
+ l.mfspr r3,r0,OR1K_SPR_SYS_NPC_ADDR; \
+ OR1K_DELAYED( \
+ /* Copy program counter of exception as */ \
+ /* second argument to the exception handler */ \
+ OR1K_INST(l.mfspr r4,r0,OR1K_SPR_SYS_EPCR_BASE),\
+ /* Jump to exception handler. This will rfe */ \
+ OR1K_INST(l.j _or1k_exception_handler) \
+ )
+#else
+#define CALL_EXCEPTION_HANDLER(id) \
+ /* Store current stack pointer to shadow reg */ \
+ l.mtspr r0,r1,SHADOW_REG(1); \
+ /* Store current GPR3 for temporary use */ \
+ l.mtspr r0,r3,SHADOW_REG(2); \
+ /* Store current GPR2 for the level pointer */ \
+ l.mtspr r0,r4,SHADOW_REG(3); \
+ /* Load nesting level of exceptions */ \
+ l.movhi r4,hi(_or1k_exception_level); \
+ l.ori r4,r4,lo(_or1k_exception_level); \
+ /* Load array pointer */ \
+ l.lwz r4,0(r4); \
+ /* Get core id */ \
+ l.mfspr r3,r0,OR1K_SPR_SYS_COREID_ADDR; \
+ /* Generate offset */ \
+ l.slli r3,r3,2; \
+ /* Generate core nesting level address */ \
+ l.add r4,r4,r3; \
+ /* Load nesting level */ \
+ l.lwz r3,0(r4); \
+ /* Increment nesting level */ \
+ l.addi r3,r3,1; \
+ /* Write back nesting level */ \
+ l.sw 0(r4),r3; \
+ /* Set flag if this is the outer (first) exception */ \
+ l.sfeqi r3,1; \
+ /* Branch to the code for nested exceptions */ \
+ OR1K_DELAYED_NOP( \
+ OR1K_INST(l.bnf .Lnested_##id) \
+ ); \
+ /* Load pointer to exception stack array */ \
+ l.movhi r1,hi(_or1k_exception_stack_core); \
+ l.ori r1,r1,lo(_or1k_exception_stack_core); \
+ l.lwz r1,0(r1); \
+ /* Get core id */ \
+ l.mfspr r3,r0,OR1K_SPR_SYS_COREID_ADDR; \
+ /* Calculate offset in array */ \
+ l.slli r3,r3,2; \
+ l.add r1,r1,r3; \
+ OR1K_DELAYED( \
+ /* Load value from array to stack pointer */ \
+ OR1K_INST(l.lwz r1,0(r1)), \
+ /* and jump over nested exception pointer */ \
+ OR1K_INST(l.j .Lnesting_done_##id) \
+ ); \
+.Lnested_##id: \
+ /* The stack pointer is still active */ \
+ /* Add redzone, nesting needs this */ \
+ l.addi r1,r1,-REDZONE; \
+.Lnesting_done_##id: \
+ /* Reserve context space */ \
+ l.addi r1,r1,-EXCEPTION_STACK_FRAME; \
+ /* Load back software's stack pointer */ \
+ l.mfspr r3,r0,SHADOW_REG(1); \
+ /* Store this in the context */ \
+ l.sw GPR_BUF_OFFSET(1)(r1),r3; \
+ /* Load back GPR3 */ \
+ l.mfspr r3,r0,SHADOW_REG(2); \
+ /* Store this in the context */ \
+ l.sw GPR_BUF_OFFSET(3)(r1),r3; \
+ /* Load back GPR4 */ \
+ l.mfspr r4,r0,SHADOW_REG(3); \
+ /* Store GPR4 in the context */ \
+ l.sw GPR_BUF_OFFSET(4)(r1),r4; \
+ /* Copy the current program counter as first */ \
+ /* argument for the exception handler. This */ \
+ /* is then used to determine the exception. */ \
+ l.mfspr r3,r0,OR1K_SPR_SYS_NPC_ADDR; \
+ OR1K_DELAYED( \
+ /* Copy program counter of exception as */ \
+ /* second argument to the exception handler */ \
+ OR1K_INST(l.mfspr r4,r0,OR1K_SPR_SYS_EPCR_BASE),\
+ /* Jump to exception handler. This will rfe */ \
+ OR1K_INST(l.j _or1k_exception_handler) \
+ )
+#endif
+
+/* -------------------------------------------------------------------------- */
+/*!Exception vectors */
+/* -------------------------------------------------------------------------- */
+ .section .vectors,"ax"
+
+ /* 0x100: RESET exception */
+ .org 0x100
+_or1k_reset:
+ l.movhi r0,0
+#ifdef __OR1K_MULTICORE__
+ // This is a hack that relies on the fact, that all cores start at the
+ // same time and they are similarily fast
+ l.sw 0x4(r0),r0
+ // Similarly, we use address 8 to signal how many cores have exit'ed
+ l.sw 0x8(r0),r0
+#endif
+ l.movhi r1,0
+ l.movhi r2,0
+ l.movhi r3,0
+ l.movhi r4,0
+ l.movhi r5,0
+ l.movhi r6,0
+ l.movhi r7,0
+ l.movhi r8,0
+ l.movhi r9,0
+ l.movhi r10,0
+ l.movhi r11,0
+ l.movhi r12,0
+ l.movhi r13,0
+ l.movhi r14,0
+ l.movhi r15,0
+ l.movhi r16,0
+ l.movhi r17,0
+ l.movhi r18,0
+ l.movhi r19,0
+ l.movhi r20,0
+ l.movhi r21,0
+ l.movhi r22,0
+ l.movhi r23,0
+ l.movhi r24,0
+ l.movhi r25,0
+ l.movhi r26,0
+ l.movhi r27,0
+ l.movhi r28,0
+ l.movhi r29,0
+ l.movhi r30,0
+ l.movhi r31,0
+
+ /* Clear status register, set supervisor mode */
+ l.ori r1,r0,OR1K_SPR_SYS_SR_SM_MASK
+ l.mtspr r0,r1,OR1K_SPR_SYS_SR_ADDR
+ /* Clear timer mode register*/
+ l.mtspr r0,r0,OR1K_SPR_TICK_TTMR_ADDR
+ /* Jump to program initialisation code */
+ LOAD_SYMBOL_2_GPR(r4, _or1k_start)
+ OR1K_DELAYED_NOP(OR1K_INST(l.jr r4))
+
+ .org 0x200
+ CALL_EXCEPTION_HANDLER(2)
+
+ /* 0x300: Data Page Fault exception */
+ .org 0x300
+ CALL_EXCEPTION_HANDLER(3)
+
+ /* 0x400: Insn Page Fault exception */
+ .org 0x400
+ CALL_EXCEPTION_HANDLER(4)
+
+ /* 0x500: Timer exception */
+ .org 0x500
+ CALL_EXCEPTION_HANDLER(5)
+
+ /* 0x600: Aligment exception */
+ .org 0x600
+ CALL_EXCEPTION_HANDLER(6)
+
+ /* 0x700: Illegal insn exception */
+ .org 0x700
+ CALL_EXCEPTION_HANDLER(7)
+
+ /* 0x800: External interrupt exception */
+ .org 0x800
+ CALL_EXCEPTION_HANDLER(8)
+
+ /* 0x900: DTLB miss exception */
+ .org 0x900
+ CALL_EXCEPTION_HANDLER(9)
+
+ /* 0xa00: ITLB miss exception */
+ .org 0xa00
+ CALL_EXCEPTION_HANDLER(10)
+
+ /* 0xb00: Range exception */
+ .org 0xb00
+ CALL_EXCEPTION_HANDLER(11)
+
+ /* 0xc00: Syscall exception */
+ .org 0xc00
+ CALL_EXCEPTION_HANDLER(12)
+
+ /* 0xd00: Floating point exception */
+ .org 0xd00
+ CALL_EXCEPTION_HANDLER(13)
+
+ /* 0xe00: Trap exception */
+ .org 0xe00
+ CALL_EXCEPTION_HANDLER(14)
+
+ /* 0xf00: Reserved exceptions */
+ .org 0xf00
+ CALL_EXCEPTION_HANDLER(15)
+
+ .org 0x1000
+ CALL_EXCEPTION_HANDLER(16)
+
+ .org 0x1100
+ CALL_EXCEPTION_HANDLER(17)
+
+ .org 0x1200
+ CALL_EXCEPTION_HANDLER(18)
+
+ .org 0x1300
+ CALL_EXCEPTION_HANDLER(19)
+
+ .org 0x1400
+ CALL_EXCEPTION_HANDLER(20)
+
+ .org 0x1500
+ CALL_EXCEPTION_HANDLER(21)
+
+ .org 0x1600
+ CALL_EXCEPTION_HANDLER(22)
+
+ .org 0x1700
+ CALL_EXCEPTION_HANDLER(23)
+
+ .org 0x1800
+ CALL_EXCEPTION_HANDLER(24)
+
+ .org 0x1900
+ CALL_EXCEPTION_HANDLER(25)
+
+ .org 0x1a00
+ CALL_EXCEPTION_HANDLER(26)
+
+ .org 0x1b00
+ CALL_EXCEPTION_HANDLER(27)
+
+ .org 0x1c00
+ CALL_EXCEPTION_HANDLER(28)
+
+ .org 0x1d00
+ CALL_EXCEPTION_HANDLER(29)
+
+ .org 0x1e00
+ CALL_EXCEPTION_HANDLER(30)
+
+ .org 0x1f00
+ CALL_EXCEPTION_HANDLER(31)
+
+ /* Pad to the end */
+ .org 0x1ffc
+ l.nop
+
+/* -------------------------------------------------------------------------- */
+/*!Main entry point
+
+ This is the initialization code of the library. It performs these steps:
+
+ * Call early board initialization:
+ Before anything happened, the board support may do some very early
+ initialization. This is at maximum some very basic stuff that would
+ otherwise prevent the following code from functioning. Other initialization
+ of peripherals etc. is done later (before calling main).
+ See the description below and README.board for details.
+
+ * Initialize the stacks:
+ Two stacks are configured: The system stack is used by the software and
+ the exception stack is used when an exception occurs. We added this as
+ this should be flexible with respect to the usage of virtual memory.
+
+ * Activate the caches:
+ If available the caches are initiliazed and activated.
+
+ * Clear BSS:
+ The BSS are essentially the uninitialized C variables. They are set to 0
+ by default. This is performed by this function.
+
+ * Initialize the impure data structure:
+ Similarly, we need two library contexts, one for the normal software and
+ one that is used during exceptions. The impure data structure holds
+ the context information of the library. The called C function will setup
+ both data structures. There is furthermore a pointer to the currently
+ active impure data structure, which is initially set to the normal one.
+
+ * Initialize or1k support library reentrant data structures
+
+ * Initialize constructors:
+ Call the static and global constructors
+
+ * Set up destructors to call from exit
+ The library will call the function set via atexit() during exit(). We set
+ it to call the _fini function which performs destruction.
+
+ * Call board initialization:
+ The board initialization can perform board specific initializations such as
+ configuring peripherals etc.
+
+ * Jump to main
+ Call main with argc = 0 and *argv[] = 0
+
+ * Call exit after main returns
+ Now we call exit()
+
+ * Loop forever
+ We are dead.
+*/
+
+/* -------------------------------------------------------------------------- */
+ .section .text
+
+ /* Following externs from board-specific object passed at link time */
+ .extern _or1k_board_mem_base
+ .extern _or1k_board_mem_size
+ .extern _or1k_board_uart_base
+
+ /* The early board initialization may for example read the memory size and
+ set the mem_base and mem_size or do some preliminary board
+ initialization. As we do not have a stack at this time, the function may
+ not use the stack (and therefore be a or call a C function. But it can
+ safely use all registers.
+
+ We define a default implementation, which allows board files in C. As
+ described above, this can only be used in assembly (board_*.S) as at
+ the early stage not stack is available. A board that needs early
+ initialization can overwrite the function with .global _board_init_early.
+
+ Recommendation: Only use when you really need it! */
+ .weak _or1k_board_init_early
+_or1k_board_init_early:
+ OR1K_DELAYED_NOP(OR1K_INST(l.jr r9))
+
+ /* The board initialization is then called after the C library and UART
+ are initialized. It can then be used to configure UART or other
+ devices before the actual main function is called. */
+ .extern _or1k_board_init
+
+ .global _or1k_start
+ .type _or1k_start,@function
+_or1k_start:
+ /* It is good to initialize and enable the caches before we do anything,
+ otherwise the cores will continuously access the bus during the wait
+ time for the boot barrier (0x4).
+ Fortunately or1k_cache_init does not need a stack */
+ OR1K_DELAYED_NOP(OR1K_INST(l.jal _or1k_cache_init))
+
+#ifdef __OR1K_MULTICORE__
+ // All but core 0 have to wait
+ l.mfspr r1, r0, OR1K_SPR_SYS_COREID_ADDR
+ l.sfeq r1, r0
+ OR1K_DELAYED_NOP(OR1K_INST(l.bf .Lcore0))
+.Lspin:
+ /* r1 will be used by the other cores to check for the boot variable
+ Check if r1 is still zero, core 0 will set it to 1 once it booted
+ As the cache is already turned on, this will not create traffic on
+ the bus, but the change is snooped by cache coherency then */
+ l.lwz r1,0x4(r0)
+ l.sfeq r1, r0
+ OR1K_DELAYED_NOP(OR1K_INST(l.bf .Lspin))
+
+ /* Initialize core i stack */
+ // _or1k_stack_core is the array of stack pointers
+ LOAD_SYMBOL_2_GPR(r2,_or1k_stack_core)
+ // Load the base address
+ l.lwz r2,0(r2)
+ // Generate offset in array
+ l.mfspr r1,r0,OR1K_SPR_SYS_COREID_ADDR
+ l.slli r1,r1,2
+ // Add to array base
+ l.add r2,r2,r1
+ // Load pointer to the stack top and set frame pointer
+ l.lwz r1,0(r2)
+ l.or r2,r1,r1
+
+ // The slave cores are done, jump to main part
+ OR1K_DELAYED_NOP(OR1K_INST(l.j .Linit_done));
+
+ /* Only core 0 executes the initialization code */
+.Lcore0:
+#endif
+ /* Call early board initialization */
+ OR1K_DELAYED_NOP(OR1K_INST(l.jal _or1k_board_init_early))
+
+ /* Clear BSS */
+.Lclear_bss:
+ LOAD_SYMBOL_2_GPR(r3,__bss_start)
+ LOAD_SYMBOL_2_GPR(r4,end)
+
+.Lclear_bss_loop:
+ l.sw (0)(r3),r0
+ l.sfltu r3,r4
+ OR1K_DELAYED(
+ OR1K_INST(l.addi r3,r3,4),
+ OR1K_INST(l.bf .Lclear_bss_loop)
+ )
+
+ /* Initialise stack and frame pointer (set to same value) */
+ LOAD_SYMBOL_2_GPR(r1,_or1k_board_mem_base)
+ l.lwz r1,0(r1)
+ LOAD_SYMBOL_2_GPR(r2,_or1k_board_mem_size)
+ l.lwz r2,0(r2)
+ l.add r1,r1,r2
+
+ /* Store exception stack top address */
+ LOAD_SYMBOL_2_GPR(r3,_or1k_exception_stack_top)
+ l.sw 0(r3),r1
+
+ /* Store exception stack bottom address */
+ // calculate bottom address
+ // r3 = *exception stack size
+ LOAD_SYMBOL_2_GPR(r3,_or1k_exception_stack_size)
+ // r3 = exception stack size
+ l.lwz r3,0(r3)
+#ifdef __OR1K_MULTICORE__
+ l.mfspr r4,r0,OR1K_SPR_SYS_NUMCORES_ADDR
+ l.mul r3,r4,r3
+#endif
+ // r4 = exception stack top - exception stack size = exception stack bottom
+ l.sub r4,r1,r3
+ // r5 = *exception stack bottom
+ LOAD_SYMBOL_2_GPR(r5,_or1k_exception_stack_bottom)
+ // store
+ l.sw 0(r5),r4
+
+ // Move stack pointer accordingly
+ l.or r1,r0,r4
+ l.or r2,r1,r1
+
+ /* Store stack top address */
+ LOAD_SYMBOL_2_GPR(r3,_or1k_stack_top)
+ l.sw 0(r3),r1
+
+ /* Store stack bottom address */
+ // calculate bottom address
+ // r3 = stack size
+ LOAD_SYMBOL_2_GPR(r3,_or1k_stack_size)
+ l.lwz r3,0(r3)
+#ifdef __OR1K_MULTICORE__
+ l.mfspr r4, r0, OR1K_SPR_SYS_NUMCORES_ADDR
+ l.mul r3, r4, r3
+#endif
+ // r4 = stack top - stack size = stack bottom
+ // -> stack bottom
+ l.sub r4,r1,r3
+ // r5 = *exception stack bottom
+ LOAD_SYMBOL_2_GPR(r5,_or1k_stack_bottom)
+ // store to variable
+ l.sw 0(r5),r4
+
+ /* Reinitialize the or1k support library */
+ OR1K_DELAYED_NOP(OR1K_INST(l.jal _or1k_init))
+
+ /* Reinitialize the reentrancy structure */
+ OR1K_DELAYED_NOP(OR1K_INST(l.jal _or1k_libc_impure_init))
+
+ /* Call global and static constructors */
+ OR1K_DELAYED_NOP(OR1K_INST(l.jal _init))
+
+ /* Set up destructors to be called from exit if main ever returns */
+ l.movhi r3,hi(_fini)
+ OR1K_DELAYED(
+ OR1K_INST(l.ori r3,r3,lo(_fini)),
+ OR1K_INST(l.jal atexit)
+ )
+
+ /* Check if UART is to be initialised */
+ LOAD_SYMBOL_2_GPR(r4,_or1k_board_uart_base)
+ l.lwz r4,0(r4)
+ /* Is base set? If not, no UART */
+ l.sfne r4,r0
+ l.bnf .Lskip_uart
+ l.or r3,r0,r0
+ OR1K_DELAYED_NOP(OR1K_INST(l.jal _or1k_uart_init))
+
+.Lskip_uart:
+ /* Board initialization */
+ OR1K_DELAYED_NOP(OR1K_INST(l.jal _or1k_board_init))
+
+#ifdef __OR1K_MULTICORE__
+ // Start other cores
+ l.ori r3, r0, 1
+ l.sw 0x4(r0), r3
+#endif
+
+.Linit_done:
+ /* Jump to main program entry point (argc = argv = envp = 0) */
+ l.or r3,r0,r0
+ l.or r4,r0,r0
+ OR1K_DELAYED(
+ OR1K_INST(l.or r5,r0,r0),
+ OR1K_INST(l.jal main)
+ )
+
+#ifdef __OR1K_MULTICORE__
+.incrementexit:
+ /* Atomically increment number of finished cores */
+ l.lwa r3,0x8(r0)
+ l.addi r3,r3,1
+ l.swa 0x8(r0),r3
+ OR1K_DELAYED_NOP(OR1K_INST(l.bnf .incrementexit));
+ /* Compare to number of cores in this cluster */
+ l.mfspr r4,r0, OR1K_SPR_SYS_NUMCORES_ADDR
+ /* Compare to number of finished tasks */
+ l.sfeq r3,r4
+ /* Last core needs to desctruct library etc. */
+ OR1K_DELAYED_NOP(OR1K_INST(l.bf .exitcorelast));
+ OR1K_DELAYED(
+ OR1K_INST(l.addi r3,r11,0),
+ OR1K_INST(l.jal _exit)
+ )
+.exitcorelast:
+#endif
+ /* If program exits, call exit routine */
+ OR1K_DELAYED(
+ OR1K_INST(l.addi r3,r11,0),
+ OR1K_INST(l.jal exit)
+ )
+
+ /* Loop forever */
+.Lloop_forever:
+ OR1K_DELAYED_NOP(OR1K_INST(l.j .Lloop_forever))
+
+ .size _or1k_start,.-_or1k_start
diff --git a/libgloss/or1k/exceptions-asm.S b/libgloss/or1k/exceptions-asm.S
new file mode 100644
index 000000000..4dd4d106a
--- /dev/null
+++ b/libgloss/or1k/exceptions-asm.S
@@ -0,0 +1,230 @@
+/* exceptions-asm.S -- exception handling for OpenRISC 1000.
+ *
+ * Copyright (c) 2011, 2014 Authors
+ *
+ * Contributor Julius Baxter <juliusbaxter@gmail.com>
+ * Contributor Stefan Wallentowitz <stefan.wallentowitz@tum.de>
+ *
+ * The authors hereby grant permission to use, copy, modify, distribute,
+ * and license this software and its documentation for any purpose, provided
+ * that existing copyright notices are retained in all copies and that this
+ * notice is included verbatim in any distributions. No written agreement,
+ * license, or royalty fee is required for any of the authorized uses.
+ * Modifications to this software may be copyrighted by their authors
+ * and need not follow the licensing terms described here, provided that
+ * the new terms are clearly indicated on the first page of each file where
+ * they apply.
+ */
+
+#include "include/or1k-asm.h"
+#include "include/or1k-sprs.h"
+
+/* -------------------------------------------------------------------------- */
+/*!Generic exception handler function
+ */
+/* -------------------------------------------------------------------------- */
+// Warning - this must be the same as specified in crt0.S
+#define EXCEPTION_STACK_SIZE 136
+
+ .extern _or1k_exception_handler_table
+ .extern _or1k_exception_level
+
+/* -------------------------------------------------------------------------- */
+/*!Function to call appropriate exception handler
+ */
+/* -------------------------------------------------------------------------- */
+ .section .text
+ .global _or1k_exception_handler
+ .type _or1k_exception_handler,@function
+
+ /*
+ r3 = address of exception vector
+ r4 = address where exception occurred
+ */
+
+#define GPR_BUF_OFFSET(x) (x << 2)
+
+_or1k_exception_handler:
+ /* Store remainder of state (r3,r4 stored in vector entry)*/
+ l.sw GPR_BUF_OFFSET(2)(r1),r2
+ l.sw GPR_BUF_OFFSET(5)(r1),r5
+ l.sw GPR_BUF_OFFSET(6)(r1),r6
+ l.sw GPR_BUF_OFFSET(7)(r1),r7
+ l.sw GPR_BUF_OFFSET(8)(r1),r8
+ l.sw GPR_BUF_OFFSET(9)(r1),r9
+ l.sw GPR_BUF_OFFSET(10)(r1),r10
+ l.sw GPR_BUF_OFFSET(11)(r1),r11
+ l.sw GPR_BUF_OFFSET(12)(r1),r12
+ l.sw GPR_BUF_OFFSET(13)(r1),r13
+ l.sw GPR_BUF_OFFSET(14)(r1),r14
+ l.sw GPR_BUF_OFFSET(15)(r1),r15
+ l.sw GPR_BUF_OFFSET(16)(r1),r16
+ l.sw GPR_BUF_OFFSET(17)(r1),r17
+ l.sw GPR_BUF_OFFSET(18)(r1),r18
+ l.sw GPR_BUF_OFFSET(19)(r1),r19
+ l.sw GPR_BUF_OFFSET(20)(r1),r20
+ l.sw GPR_BUF_OFFSET(21)(r1),r21
+ l.sw GPR_BUF_OFFSET(22)(r1),r22
+ l.sw GPR_BUF_OFFSET(23)(r1),r23
+ l.sw GPR_BUF_OFFSET(24)(r1),r24
+ l.sw GPR_BUF_OFFSET(25)(r1),r25
+ l.sw GPR_BUF_OFFSET(26)(r1),r26
+ l.sw GPR_BUF_OFFSET(27)(r1),r27
+ l.sw GPR_BUF_OFFSET(28)(r1),r28
+ l.sw GPR_BUF_OFFSET(29)(r1),r29
+ l.sw GPR_BUF_OFFSET(30)(r1),r30
+ l.sw GPR_BUF_OFFSET(31)(r1),r31
+ l.mfspr r14,r0,OR1K_SPR_SYS_EPCR_BASE
+ l.sw 0x80(r1),r14
+ l.mfspr r14,r0,OR1K_SPR_SYS_ESR_BASE
+ l.sw 0x84(r1),r14
+
+ /* Replace impure pointer for exception */
+ l.movhi r20,hi(_or1k_exception_impure_ptr)
+ l.ori r20,r20,lo(_or1k_exception_impure_ptr)
+#ifdef __OR1K_MULTICORE__
+ l.lwz r20,0(r20)
+ l.mfspr r22,r0,OR1K_SPR_SYS_COREID_ADDR
+ l.slli r22,r22,2
+ l.add r20,r20,r22
+#endif
+ l.lwz r20,0(r20)
+
+ l.movhi r21,hi(_or1k_current_impure_ptr)
+ l.ori r21,r21,lo(_or1k_current_impure_ptr)
+#ifdef __OR1K_MULTICORE__
+ l.lwz r21,0(r21)
+ l.add r21,r21,r22
+#endif
+ l.sw 0(r21),r20
+
+ /* Determine offset in table of exception handler using r3*/
+ l.andi r13,r3,0xff00
+ l.srli r13,r13,6
+ /* Substract 2 words, as we have no vector at 0 and no reset handler */
+ l.addi r13,r13,-8
+ /* r13 now contains offset in or1k_exception_handler_table for
+ function
+ */
+ /* Get or1k_exception_handler_table address */
+ l.movhi r14,hi(_or1k_exception_handler_table)
+ l.ori r14,r14,lo(_or1k_exception_handler_table)
+#ifdef __OR1K_MULTICORE__
+ /* Read the address of the array of cores */
+ /* r14 = (*or1k_exception_handler_table) */
+ l.lwz r14,0(r14)
+ /* Generate core offset in array (off = coreid*30*4 = coreid*120) */
+ /* r15 = coreid */
+ l.mfspr r15,r0,OR1K_SPR_SYS_COREID_ADDR
+ /* r16 = coreid * 128 */
+ l.slli r16,r15,7
+ /* r15 = coreid * 8 */
+ l.slli r15,r15,3
+ /* r15 = coreid*128 - coreid*8 = coreid*120 = off */
+ l.sub r15,r16,r15
+ /* r14 = (*or1k_exception_handler_table)[coreid] = r14 + off */
+ l.add r14,r14,r15
+#endif
+ /* r14 now contains base of exception handler table */
+ /* add offset of exception vector */
+ l.add r14,r14,r13
+ /* load handler address from table */
+ l.lwz r13, 0(r14)
+
+ /* Check to see if this handler has been set yet */
+ l.sfne r13,r0
+ OR1K_DELAYED_NOP(OR1K_INST(l.bnf exception_exit))
+
+ /* Call exception handler, copy EPCR to r3 */
+ OR1K_DELAYED(
+ OR1K_INST(l.or r3,r4,r4),
+ OR1K_INST(l.jalr r13)
+ )
+
+ /* Restore impure pointer */
+ l.movhi r20,hi(_or1k_impure_ptr)
+ l.ori r20,r20,lo(_or1k_impure_ptr)
+#ifdef __OR1K_MULTICORE__
+ l.lwz r20,0(r20)
+ l.mfspr r22,r0,OR1K_SPR_SYS_COREID_ADDR
+ l.slli r22,r22,2
+ l.add r20,r20,r22
+#endif
+ l.lwz r20,0(r20)
+
+ l.movhi r21,hi(_or1k_current_impure_ptr)
+ l.ori r21,r21,lo(_or1k_current_impure_ptr)
+#ifdef __OR1K_MULTICORE__
+ l.lwz r21,0(r21)
+ l.add r21,r21,r22
+#endif
+ l.sw 0(r21),r20
+
+ /* Decrement the exception nesting level */
+ // Load the exception level entry
+ l.movhi r2,hi(_or1k_exception_level)
+ l.ori r2,r2,lo(_or1k_exception_level)
+#ifdef __OR1K_MULTICORE__
+ // In multicore this is the pointer to an array
+ // Load pointer value
+ l.lwz r2,0(r2)
+ // Add word offset of this core's nesting level
+ l.add r2,r2,r22
+#endif
+ // Load the nesting level entry
+ l.lwz r3,0(r2)
+ // Decrement nesting level
+ l.addi r3,r3,-1
+ // Store back the nesting level
+ l.sw 0(r2),r3
+
+ /* Restore state */
+ l.lwz r2,0x80(r1)
+ l.mtspr r0,r2,OR1K_SPR_SYS_EPCR_BASE
+
+ l.lwz r2,0x84(r1)
+ l.mtspr r0,r2,OR1K_SPR_SYS_ESR_BASE
+
+ l.lwz r2,GPR_BUF_OFFSET(2)(r1)
+ l.lwz r3,GPR_BUF_OFFSET(3)(r1)
+ l.lwz r4,GPR_BUF_OFFSET(4)(r1)
+ l.lwz r5,GPR_BUF_OFFSET(5)(r1)
+ l.lwz r6,GPR_BUF_OFFSET(6)(r1)
+ l.lwz r7,GPR_BUF_OFFSET(7)(r1)
+ l.lwz r8,GPR_BUF_OFFSET(8)(r1)
+ l.lwz r9,GPR_BUF_OFFSET(9)(r1)
+ l.lwz r10,GPR_BUF_OFFSET(10)(r1)
+ l.lwz r11,GPR_BUF_OFFSET(11)(r1)
+ l.lwz r12,GPR_BUF_OFFSET(12)(r1)
+ l.lwz r13,GPR_BUF_OFFSET(13)(r1)
+ l.lwz r14,GPR_BUF_OFFSET(14)(r1)
+ l.lwz r15,GPR_BUF_OFFSET(15)(r1)
+ l.lwz r16,GPR_BUF_OFFSET(16)(r1)
+ l.lwz r17,GPR_BUF_OFFSET(17)(r1)
+ l.lwz r18,GPR_BUF_OFFSET(18)(r1)
+ l.lwz r19,GPR_BUF_OFFSET(19)(r1)
+ l.lwz r20,GPR_BUF_OFFSET(20)(r1)
+ l.lwz r21,GPR_BUF_OFFSET(21)(r1)
+ l.lwz r22,GPR_BUF_OFFSET(22)(r1)
+ l.lwz r23,GPR_BUF_OFFSET(23)(r1)
+ l.lwz r24,GPR_BUF_OFFSET(24)(r1)
+ l.lwz r25,GPR_BUF_OFFSET(25)(r1)
+ l.lwz r26,GPR_BUF_OFFSET(26)(r1)
+ l.lwz r27,GPR_BUF_OFFSET(27)(r1)
+ l.lwz r28,GPR_BUF_OFFSET(28)(r1)
+ l.lwz r29,GPR_BUF_OFFSET(29)(r1)
+ l.lwz r30,GPR_BUF_OFFSET(30)(r1)
+ l.lwz r31,GPR_BUF_OFFSET(31)(r1)
+
+ // Restore original stack
+ l.lwz r1,GPR_BUF_OFFSET(1)(r1)
+
+ l.rfe
+ l.nop
+
+exception_exit:
+ /* Exception handler not set, exit */
+ OR1K_DELAYED(
+ OR1K_INST(l.or r3,r4,r4),
+ OR1K_INST(l.jal exit)
+ )
diff --git a/libgloss/or1k/exceptions.c b/libgloss/or1k/exceptions.c
new file mode 100644
index 000000000..8240d09d2
--- /dev/null
+++ b/libgloss/or1k/exceptions.c
@@ -0,0 +1,21 @@
+#include "include/or1k-support.h"
+
+#include "or1k-internals.h"
+
+#ifdef __OR1K_MULTICORE__
+or1k_exception_handler_table_t *_or1k_exception_handler_table;
+#else
+or1k_exception_handler_table_t _or1k_exception_handler_table;
+#endif
+
+void or1k_exception_handler_add(int id, or1k_exception_handler_fptr handler)
+{
+ // Subtract 2 as we do not have a vector at 0 and reset is static
+ id = id - 2;
+#ifdef __OR1K_MULTICORE__
+ _or1k_exception_handler_table[or1k_coreid()][id] = handler;
+
+#else
+ _or1k_exception_handler_table[id] = handler;
+#endif
+}
diff --git a/libgloss/or1k/impure.c b/libgloss/or1k/impure.c
new file mode 100644
index 000000000..e94fd637c
--- /dev/null
+++ b/libgloss/or1k/impure.c
@@ -0,0 +1,123 @@
+/* impure.c. Handling of re-entrancy data structure for OpenRISC 1000.
+
+ Copyright (C) 2014, Authors
+
+ Contributor Stefan Wallentowitz <stefan.wallentowitz@tum.de>
+
+ * The authors hereby grant permission to use, copy, modify, distribute,
+ * and license this software and its documentation for any purpose, provided
+ * that existing copyright notices are retained in all copies and that this
+ * notice is included verbatim in any distributions. No written agreement,
+ * license, or royalty fee is required for any of the authorized uses.
+ * Modifications to this software may be copyrighted by their authors
+ * and need not follow the licensing terms described here, provided that
+ * the new terms are clearly indicated on the first page of each file where
+ * they apply.
+ */
+
+#include <reent.h>
+#include "or1k-internals.h"
+
+#include <string.h>
+
+/* As an exception handler may also use the library, it is better to use
+ * a different re-entrancy data structure for the exceptions.
+ * This data structure is configured here and as part of the exception
+ * handler (or1k_exception_handler) temporarily replaces the software's
+ * impure data pointer.
+ *
+ * During initialization, the libraries standard _impure_data and the exception
+ * impure data (_exception_impure_data) are initialized. Afterwards,
+ * the current value _current_impure_ptr is set to _impure_ptr.
+ *
+ * At runtime __getreent is called to return the current reentrancy pointer,
+ * which is stored in _current_impure_ptr.
+ *
+ * In the or1k_exception_handler the _current_impure_ptr is set to point to
+ * _exception_impure_ptr. After the exception handler returned, it is set back
+ * to _impure_ptr.
+ */
+
+/* Link in the external impure_data structure */
+extern struct _reent *__ATTRIBUTE_IMPURE_PTR__ _impure_ptr;
+
+#ifdef __OR1K_MULTICORE__
+struct _reent **_or1k_impure_ptr;
+struct _reent **_or1k_exception_impure_ptr;
+struct _reent **_or1k_current_impure_ptr;
+#else
+struct _reent *__ATTRIBUTE_IMPURE_PTR__ _or1k_impure_ptr;
+
+/* Create exception impure data structure */
+static struct _reent _or1k_exception_impure_data = _REENT_INIT (_or1k_exception_impure_data);
+
+/* Link to the exception impure data structure */
+struct _reent *__ATTRIBUTE_IMPURE_PTR__ _or1k_exception_impure_ptr = &_or1k_exception_impure_data;
+
+/* Link to the currently used data structure. */
+struct _reent *__ATTRIBUTE_IMPURE_PTR__ _or1k_current_impure_ptr;
+#endif
+
+#ifdef __OR1K_MULTICORE__
+#define OR1K_LIBC_GETREENT _or1k_current_impure_ptr[or1k_coreid()]
+#else
+#define OR1K_LIBC_GETREENT _or1k_current_impure_ptr
+#endif
+
+void
+_or1k_libc_impure_init (void)
+{
+#ifdef __OR1K_MULTICORE__
+ uint32_t c;
+
+ _or1k_impure_ptr = _sbrk_r(0, sizeof(struct _reent*) * or1k_numcores());
+ _or1k_exception_impure_ptr = _sbrk_r(0, sizeof(struct _reent*) * or1k_numcores());
+ _or1k_current_impure_ptr = _sbrk_r(0, sizeof(struct _reent*) * or1k_numcores());
+
+ _or1k_impure_ptr[0] = _impure_ptr;
+ _REENT_INIT_PTR(_impure_ptr);
+ for (c = 1; c < or1k_numcores(); c++) {
+ _or1k_impure_ptr[c] = _sbrk_r(0, sizeof(struct _reent));
+ _REENT_INIT_PTR(_or1k_impure_ptr[c]);
+ }
+
+ for (c = 0; c < or1k_numcores(); c++) {
+ _or1k_exception_impure_ptr[c] = _sbrk_r(0, sizeof(struct _reent));
+ _REENT_INIT_PTR(_or1k_exception_impure_ptr[c]);
+ }
+
+ for (c = 0; c < or1k_numcores(); c++) {
+ _or1k_current_impure_ptr[c] = _or1k_impure_ptr[c];
+ }
+#else
+ // Initialize both impure data structures
+ _REENT_INIT_PTR (_impure_ptr);
+ _REENT_INIT_PTR (_or1k_exception_impure_ptr);
+
+ // Use the standard impure ptr during normal software run
+ _or1k_impure_ptr = _impure_ptr;
+
+ // Set current to standard impure pointer
+ _or1k_current_impure_ptr = _impure_ptr;
+#endif
+}
+
+struct _reent*
+_or1k_libc_getreent(void) {
+ return OR1K_LIBC_GETREENT;
+}
+
+#ifdef __OR1K_MULTICORE__
+struct _or1k_reent (*_or1k_reent)[];
+#else
+struct _or1k_reent _or1k_reent;
+#endif
+
+void
+_or1k_reent_init(void)
+{
+#ifdef __OR1K_MULTICORE__
+ size_t memsize = sizeof(struct _or1k_reent) * or1k_numcores();
+ _or1k_reent = (struct _or1k_reent*) _sbrk_r(0, memsize);
+#endif
+}
diff --git a/libgloss/or1k/include/or1k-asm.h b/libgloss/or1k/include/or1k-asm.h
new file mode 100644
index 000000000..c218c64fe
--- /dev/null
+++ b/libgloss/or1k/include/or1k-asm.h
@@ -0,0 +1,83 @@
+/* or1k-asm.h -- OR1K assembly helper macros
+
+ Copyright (c) 2014 OpenRISC Project Maintainers
+ Copyright (C) 2012-2014 Peter Gavin <pgavin@gmail.com>
+ All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following condition
+ is met:
+
+ 1. Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+
+ 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 HOLDER 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.
+
+ */
+
+#ifndef OR1K_ASM_H
+#define OR1K_ASM_H
+
+/* The purpose of the OR1K_INST macro is simply to protect the commas
+ embedded within an instruction from the C preprocessor. An entire
+ instruction can be safely embedded within its arguments, including
+ an arbitrary number of commas, and it will be reproduced
+ exactly. */
+#define OR1K_INST(...) __VA_ARGS__
+
+/* OR1K_DELAYED takes two arguments which must be instructions. They
+ should be wrapped in OR1K_INST if the instructions require commas.
+ The second argument should be a jump or branch instruction. If we
+ are assembling the code in delay-slot mode (e.g., for the standard
+ OR1K) the first instruction will be emitted in the delay slot of
+ the second instruction. In no-delay-slot mode they will be emitted
+ in order. If we are using compat-delay mode, they will be emitted
+ in order, but an l.nop instruction will be emitted immediately
+ after. */
+
+/* OR1K_DELAYED_NOP takes a single argument, which should be a
+ branch/jump instruction. In delay-slot or compat-delay modes, the
+ instruction will be emitted with an l.nop in its delay slot. In
+ no-delay mode, the instruction will be emitted by itself. */
+
+#if defined(__OR1K_NODELAY__)
+
+#define OR1K_DELAYED(a, b) a; b
+#define OR1K_DELAYED_NOP(a) a
+
+/* Go ahead and emit the .nodelay directive when in no-delay mode, so
+ that the flags are appropriately set in the binary. */
+.nodelay
+
+#elif defined(__OR1K_DELAY__)
+
+#define OR1K_DELAYED(a, b) b; a
+#define OR1K_DELAYED_NOP(a) a; l.nop
+
+#elif defined(__OR1K_DELAY_COMPAT__)
+
+#define OR1K_DELAYED(a, b) a; b; l.nop
+#define OR1K_DELAYED_NOP(a) a; l.nop
+
+#else
+
+#error One of __OR1K_NODELAY__, __OR1K_DELAY__, or __OR1K_DELAY_COMPAT__ must be defined
+
+#endif
+
+#define LOAD_SYMBOL_2_GPR(gpr,symbol) \
+ .global symbol ; \
+ l.movhi gpr, hi(symbol) ; \
+ l.ori gpr, gpr, lo(symbol)
+#endif
diff --git a/libgloss/or1k/include/or1k-nop.h b/libgloss/or1k/include/or1k-nop.h
new file mode 100644
index 000000000..0d432dad4
--- /dev/null
+++ b/libgloss/or1k/include/or1k-nop.h
@@ -0,0 +1,35 @@
+/* or1k-asm.h -- OR1K assembly helper macros
+
+ Copyright (c) 2014 OpenRISC Project Maintainers
+ All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following condition
+ is met:
+
+ 1. Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+
+ 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 HOLDER 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.
+ */
+
+#ifndef __OR1K_NOP_H__
+#define __OR1K_NOP_H__
+
+#define OR1K_NOP_K_NOP 0x0
+#define OR1K_NOP_K_EXIT 0x1
+#define OR1K_NOP_K_PUTC 0x4
+#define OR1K_NOP_K_EXIT_QUIET 0xc
+
+#endif
diff --git a/libgloss/or1k/include/or1k-sprs.h b/libgloss/or1k/include/or1k-sprs.h
new file mode 100644
index 000000000..8d1fe5ed9
--- /dev/null
+++ b/libgloss/or1k/include/or1k-sprs.h
@@ -0,0 +1,2417 @@
+/* or1k-sprs.h -- OR1K SPR definitions
+ Copyright (c) 2014 OpenRISC Project Maintainers
+ All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following condition
+ is met:
+
+ 1. Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+
+ 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 HOLDER 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.
+ */
+
+/*
+ * Generated from revision 4cab27375dd07cd890d5493e11446cc06ca8265e
+ * on Tue Nov 18 14:35:33 2014
+ */
+
+#ifndef _OR1K_SPRS_H_
+#define _OR1K_SPRS_H_
+
+#define OR1K_SPR_GROUP_BITS 5
+#define OR1K_SPR_GROUP_LSB 11
+#define OR1K_SPR_GROUP_MSB 15
+#define OR1K_SPR_INDEX_BITS 11
+#define OR1K_SPR_INDEX_LSB 0
+#define OR1K_SPR_INDEX_MSB 10
+
+#ifdef __ASSEMBLER__
+#define OR1K_UNSIGNED(x) x
+#else
+#define OR1K_UNSIGNED(x) x##U
+#endif
+
+
+/****************/
+/* System Group */
+/****************/
+#define OR1K_SPR_SYS_GROUP 0x00
+
+/* Version Register */
+#define OR1K_SPR_SYS_VR_INDEX OR1K_UNSIGNED(0x000)
+#define OR1K_SPR_SYS_VR_ADDR OR1K_UNSIGNED(0x0000)
+
+/* Revision */
+#define OR1K_SPR_SYS_VR_REV_LSB 0
+#define OR1K_SPR_SYS_VR_REV_MSB 5
+#define OR1K_SPR_SYS_VR_REV_BITS 6
+#define OR1K_SPR_SYS_VR_REV_MASK OR1K_UNSIGNED(0x0000003f)
+#define OR1K_SPR_SYS_VR_REV_GET(X) (((X) >> 0) & OR1K_UNSIGNED(0x0000003f))
+#define OR1K_SPR_SYS_VR_REV_SET(X, Y) (((X) & OR1K_UNSIGNED(0xffffffc0)) | ((Y) << 0))
+
+/* Updated Version Registers Present */
+#define OR1K_SPR_SYS_VR_UVRP_OFFSET 6
+#define OR1K_SPR_SYS_VR_UVRP_MASK 0x00000040
+#define OR1K_SPR_SYS_VR_UVRP_GET(X) (((X) >> 6) & 0x1)
+#define OR1K_SPR_SYS_VR_UVRP_SET(X, Y) (((X) & OR1K_UNSIGNED(0xffffffbf)) | ((!!(Y)) << 6))
+
+/* Configuration Template */
+#define OR1K_SPR_SYS_VR_CFG_LSB 16
+#define OR1K_SPR_SYS_VR_CFG_MSB 23
+#define OR1K_SPR_SYS_VR_CFG_BITS 8
+#define OR1K_SPR_SYS_VR_CFG_MASK OR1K_UNSIGNED(0x00ff0000)
+#define OR1K_SPR_SYS_VR_CFG_GET(X) (((X) >> 16) & OR1K_UNSIGNED(0x000000ff))
+#define OR1K_SPR_SYS_VR_CFG_SET(X, Y) (((X) & OR1K_UNSIGNED(0xff00ffff)) | ((Y) << 16))
+
+/* Version */
+#define OR1K_SPR_SYS_VR_VER_LSB 24
+#define OR1K_SPR_SYS_VR_VER_MSB 31
+#define OR1K_SPR_SYS_VR_VER_BITS 8
+#define OR1K_SPR_SYS_VR_VER_MASK OR1K_UNSIGNED(0xff000000)
+#define OR1K_SPR_SYS_VR_VER_GET(X) (((X) >> 24) & OR1K_UNSIGNED(0x000000ff))
+#define OR1K_SPR_SYS_VR_VER_SET(X, Y) (((X) & OR1K_UNSIGNED(0x00ffffff)) | ((Y) << 24))
+
+
+/* Unit Present Register */
+#define OR1K_SPR_SYS_UPR_INDEX OR1K_UNSIGNED(0x001)
+#define OR1K_SPR_SYS_UPR_ADDR OR1K_UNSIGNED(0x0001)
+
+/* UPR Present */
+#define OR1K_SPR_SYS_UPR_UP_OFFSET 0
+#define OR1K_SPR_SYS_UPR_UP_MASK 0x00000001
+#define OR1K_SPR_SYS_UPR_UP_GET(X) (((X) >> 0) & 0x1)
+#define OR1K_SPR_SYS_UPR_UP_SET(X, Y) (((X) & OR1K_UNSIGNED(0xfffffffe)) | ((!!(Y)) << 0))
+
+/* Data Cache Present */
+#define OR1K_SPR_SYS_UPR_DCP_OFFSET 1
+#define OR1K_SPR_SYS_UPR_DCP_MASK 0x00000002
+#define OR1K_SPR_SYS_UPR_DCP_GET(X) (((X) >> 1) & 0x1)
+#define OR1K_SPR_SYS_UPR_DCP_SET(X, Y) (((X) & OR1K_UNSIGNED(0xfffffffd)) | ((!!(Y)) << 1))
+
+/* Instruction Cache Present */
+#define OR1K_SPR_SYS_UPR_ICP_OFFSET 2
+#define OR1K_SPR_SYS_UPR_ICP_MASK 0x00000004
+#define OR1K_SPR_SYS_UPR_ICP_GET(X) (((X) >> 2) & 0x1)
+#define OR1K_SPR_SYS_UPR_ICP_SET(X, Y) (((X) & OR1K_UNSIGNED(0xfffffffb)) | ((!!(Y)) << 2))
+
+/* Data MMU Present */
+#define OR1K_SPR_SYS_UPR_DMP_OFFSET 3
+#define OR1K_SPR_SYS_UPR_DMP_MASK 0x00000008
+#define OR1K_SPR_SYS_UPR_DMP_GET(X) (((X) >> 3) & 0x1)
+#define OR1K_SPR_SYS_UPR_DMP_SET(X, Y) (((X) & OR1K_UNSIGNED(0xfffffff7)) | ((!!(Y)) << 3))
+
+/* Instruction MMU Present */
+#define OR1K_SPR_SYS_UPR_IMP_OFFSET 4
+#define OR1K_SPR_SYS_UPR_IMP_MASK 0x00000010
+#define OR1K_SPR_SYS_UPR_IMP_GET(X) (((X) >> 4) & 0x1)
+#define OR1K_SPR_SYS_UPR_IMP_SET(X, Y) (((X) & OR1K_UNSIGNED(0xffffffef)) | ((!!(Y)) << 4))
+
+/* MAC Present */
+#define OR1K_SPR_SYS_UPR_MP_OFFSET 5
+#define OR1K_SPR_SYS_UPR_MP_MASK 0x00000020
+#define OR1K_SPR_SYS_UPR_MP_GET(X) (((X) >> 5) & 0x1)
+#define OR1K_SPR_SYS_UPR_MP_SET(X, Y) (((X) & OR1K_UNSIGNED(0xffffffdf)) | ((!!(Y)) << 5))
+
+/* Debug Unit Present */
+#define OR1K_SPR_SYS_UPR_DUP_OFFSET 6
+#define OR1K_SPR_SYS_UPR_DUP_MASK 0x00000040
+#define OR1K_SPR_SYS_UPR_DUP_GET(X) (((X) >> 6) & 0x1)
+#define OR1K_SPR_SYS_UPR_DUP_SET(X, Y) (((X) & OR1K_UNSIGNED(0xffffffbf)) | ((!!(Y)) << 6))
+
+/* Performance Counters Unit Present */
+#define OR1K_SPR_SYS_UPR_PCUP_OFFSET 7
+#define OR1K_SPR_SYS_UPR_PCUP_MASK 0x00000080
+#define OR1K_SPR_SYS_UPR_PCUP_GET(X) (((X) >> 7) & 0x1)
+#define OR1K_SPR_SYS_UPR_PCUP_SET(X, Y) (((X) & OR1K_UNSIGNED(0xffffff7f)) | ((!!(Y)) << 7))
+
+/* Power Management Present */
+#define OR1K_SPR_SYS_UPR_PICP_OFFSET 8
+#define OR1K_SPR_SYS_UPR_PICP_MASK 0x00000100
+#define OR1K_SPR_SYS_UPR_PICP_GET(X) (((X) >> 8) & 0x1)
+#define OR1K_SPR_SYS_UPR_PICP_SET(X, Y) (((X) & OR1K_UNSIGNED(0xfffffeff)) | ((!!(Y)) << 8))
+
+/* Programmable Interrupt Controller Present */
+#define OR1K_SPR_SYS_UPR_PMP_OFFSET 9
+#define OR1K_SPR_SYS_UPR_PMP_MASK 0x00000200
+#define OR1K_SPR_SYS_UPR_PMP_GET(X) (((X) >> 9) & 0x1)
+#define OR1K_SPR_SYS_UPR_PMP_SET(X, Y) (((X) & OR1K_UNSIGNED(0xfffffdff)) | ((!!(Y)) << 9))
+
+/* Tick Timer Present */
+#define OR1K_SPR_SYS_UPR_TTP_OFFSET 10
+#define OR1K_SPR_SYS_UPR_TTP_MASK 0x00000400
+#define OR1K_SPR_SYS_UPR_TTP_GET(X) (((X) >> 10) & 0x1)
+#define OR1K_SPR_SYS_UPR_TTP_SET(X, Y) (((X) & OR1K_UNSIGNED(0xfffffbff)) | ((!!(Y)) << 10))
+
+/* Custom Units Present */
+#define OR1K_SPR_SYS_UPR_CUP_LSB 24
+#define OR1K_SPR_SYS_UPR_CUP_MSB 31
+#define OR1K_SPR_SYS_UPR_CUP_BITS 8
+#define OR1K_SPR_SYS_UPR_CUP_MASK OR1K_UNSIGNED(0xff000000)
+#define OR1K_SPR_SYS_UPR_CUP_GET(X) (((X) >> 24) & OR1K_UNSIGNED(0x000000ff))
+#define OR1K_SPR_SYS_UPR_CUP_SET(X, Y) (((X) & OR1K_UNSIGNED(0x00ffffff)) | ((Y) << 24))
+
+
+/* CPU Configuration Register */
+#define OR1K_SPR_SYS_CPUCFGR_INDEX OR1K_UNSIGNED(0x002)
+#define OR1K_SPR_SYS_CPUCFGR_ADDR OR1K_UNSIGNED(0x0002)
+
+/* Number of Shadow GPR Files */
+#define OR1K_SPR_SYS_CPUCFGR_NSGF_LSB 0
+#define OR1K_SPR_SYS_CPUCFGR_NSGF_MSB 3
+#define OR1K_SPR_SYS_CPUCFGR_NSGF_BITS 4
+#define OR1K_SPR_SYS_CPUCFGR_NSGF_MASK OR1K_UNSIGNED(0x0000000f)
+#define OR1K_SPR_SYS_CPUCFGR_NSGF_GET(X) (((X) >> 0) & OR1K_UNSIGNED(0x0000000f))
+#define OR1K_SPR_SYS_CPUCFGR_NSGF_SET(X, Y) (((X) & OR1K_UNSIGNED(0xfffffff0)) | ((Y) << 0))
+
+/* Custom GPR File */
+#define OR1K_SPR_SYS_CPUCFGR_CGF_OFFSET 4
+#define OR1K_SPR_SYS_CPUCFGR_CGF_MASK 0x00000010
+#define OR1K_SPR_SYS_CPUCFGR_CGF_GET(X) (((X) >> 4) & 0x1)
+#define OR1K_SPR_SYS_CPUCFGR_CGF_SET(X, Y) (((X) & OR1K_UNSIGNED(0xffffffef)) | ((!!(Y)) << 4))
+
+/* ORBIS32 Supported */
+#define OR1K_SPR_SYS_CPUCFGR_OB32S_OFFSET 5
+#define OR1K_SPR_SYS_CPUCFGR_OB32S_MASK 0x00000020
+#define OR1K_SPR_SYS_CPUCFGR_OB32S_GET(X) (((X) >> 5) & 0x1)
+#define OR1K_SPR_SYS_CPUCFGR_OB32S_SET(X, Y) (((X) & OR1K_UNSIGNED(0xffffffdf)) | ((!!(Y)) << 5))
+
+/* ORBIS64 Supported */
+#define OR1K_SPR_SYS_CPUCFGR_OB64S_OFFSET 6
+#define OR1K_SPR_SYS_CPUCFGR_OB64S_MASK 0x00000040
+#define OR1K_SPR_SYS_CPUCFGR_OB64S_GET(X) (((X) >> 6) & 0x1)
+#define OR1K_SPR_SYS_CPUCFGR_OB64S_SET(X, Y) (((X) & OR1K_UNSIGNED(0xffffffbf)) | ((!!(Y)) << 6))
+
+/* ORFPX32 Supported */
+#define OR1K_SPR_SYS_CPUCFGR_OF32S_OFFSET 7
+#define OR1K_SPR_SYS_CPUCFGR_OF32S_MASK 0x00000080
+#define OR1K_SPR_SYS_CPUCFGR_OF32S_GET(X) (((X) >> 7) & 0x1)
+#define OR1K_SPR_SYS_CPUCFGR_OF32S_SET(X, Y) (((X) & OR1K_UNSIGNED(0xffffff7f)) | ((!!(Y)) << 7))
+
+/* ORFPX64 Supported */
+#define OR1K_SPR_SYS_CPUCFGR_OF64S_OFFSET 8
+#define OR1K_SPR_SYS_CPUCFGR_OF64S_MASK 0x00000100
+#define OR1K_SPR_SYS_CPUCFGR_OF64S_GET(X) (((X) >> 8) & 0x1)
+#define OR1K_SPR_SYS_CPUCFGR_OF64S_SET(X, Y) (((X) & OR1K_UNSIGNED(0xfffffeff)) | ((!!(Y)) << 8))
+
+/* ORVDX64 Supported */
+#define OR1K_SPR_SYS_CPUCFGR_OV64S_OFFSET 9
+#define OR1K_SPR_SYS_CPUCFGR_OV64S_MASK 0x00000200
+#define OR1K_SPR_SYS_CPUCFGR_OV64S_GET(X) (((X) >> 9) & 0x1)
+#define OR1K_SPR_SYS_CPUCFGR_OV64S_SET(X, Y) (((X) & OR1K_UNSIGNED(0xfffffdff)) | ((!!(Y)) << 9))
+
+/* No Delay-Slot */
+#define OR1K_SPR_SYS_CPUCFGR_ND_OFFSET 10
+#define OR1K_SPR_SYS_CPUCFGR_ND_MASK 0x00000400
+#define OR1K_SPR_SYS_CPUCFGR_ND_GET(X) (((X) >> 10) & 0x1)
+#define OR1K_SPR_SYS_CPUCFGR_ND_SET(X, Y) (((X) & OR1K_UNSIGNED(0xfffffbff)) | ((!!(Y)) << 10))
+
+/* Architecture Version Register Present */
+#define OR1K_SPR_SYS_CPUCFGR_AVRP_OFFSET 11
+#define OR1K_SPR_SYS_CPUCFGR_AVRP_MASK 0x00000800
+#define OR1K_SPR_SYS_CPUCFGR_AVRP_GET(X) (((X) >> 11) & 0x1)
+#define OR1K_SPR_SYS_CPUCFGR_AVRP_SET(X, Y) (((X) & OR1K_UNSIGNED(0xfffff7ff)) | ((!!(Y)) << 11))
+
+/* Exception Vector Base Address Register Present */
+#define OR1K_SPR_SYS_CPUCFGR_EVBARP_OFFSET 12
+#define OR1K_SPR_SYS_CPUCFGR_EVBARP_MASK 0x00001000
+#define OR1K_SPR_SYS_CPUCFGR_EVBARP_GET(X) (((X) >> 12) & 0x1)
+#define OR1K_SPR_SYS_CPUCFGR_EVBARP_SET(X, Y) (((X) & OR1K_UNSIGNED(0xffffefff)) | ((!!(Y)) << 12))
+
+/* Implementation-Specific Registers (ISR0-7) Present */
+#define OR1K_SPR_SYS_CPUCFGR_ISRP_OFFSET 13
+#define OR1K_SPR_SYS_CPUCFGR_ISRP_MASK 0x00002000
+#define OR1K_SPR_SYS_CPUCFGR_ISRP_GET(X) (((X) >> 13) & 0x1)
+#define OR1K_SPR_SYS_CPUCFGR_ISRP_SET(X, Y) (((X) & OR1K_UNSIGNED(0xffffdfff)) | ((!!(Y)) << 13))
+
+/* Arithmetic Exception Control/Status Registers Present */
+#define OR1K_SPR_SYS_CPUCFGR_AECSRP_OFFSET 14
+#define OR1K_SPR_SYS_CPUCFGR_AECSRP_MASK 0x00004000
+#define OR1K_SPR_SYS_CPUCFGR_AECSRP_GET(X) (((X) >> 14) & 0x1)
+#define OR1K_SPR_SYS_CPUCFGR_AECSRP_SET(X, Y) (((X) & OR1K_UNSIGNED(0xffffbfff)) | ((!!(Y)) << 14))
+
+
+/* Data MMU Configuration Register */
+#define OR1K_SPR_SYS_DMMUCFGR_INDEX OR1K_UNSIGNED(0x003)
+#define OR1K_SPR_SYS_DMMUCFGR_ADDR OR1K_UNSIGNED(0x0003)
+
+/* Number of TLB Ways */
+#define OR1K_SPR_SYS_DMMUCFGR_NTW_LSB 0
+#define OR1K_SPR_SYS_DMMUCFGR_NTW_MSB 1
+#define OR1K_SPR_SYS_DMMUCFGR_NTW_BITS 2
+#define OR1K_SPR_SYS_DMMUCFGR_NTW_MASK OR1K_UNSIGNED(0x00000003)
+#define OR1K_SPR_SYS_DMMUCFGR_NTW_GET(X) (((X) >> 0) & OR1K_UNSIGNED(0x00000003))
+#define OR1K_SPR_SYS_DMMUCFGR_NTW_SET(X, Y) (((X) & OR1K_UNSIGNED(0xfffffffc)) | ((Y) << 0))
+
+/* Number of TLB Sets */
+#define OR1K_SPR_SYS_DMMUCFGR_NTS_LSB 2
+#define OR1K_SPR_SYS_DMMUCFGR_NTS_MSB 4
+#define OR1K_SPR_SYS_DMMUCFGR_NTS_BITS 3
+#define OR1K_SPR_SYS_DMMUCFGR_NTS_MASK OR1K_UNSIGNED(0x0000001c)
+#define OR1K_SPR_SYS_DMMUCFGR_NTS_GET(X) (((X) >> 2) & OR1K_UNSIGNED(0x00000007))
+#define OR1K_SPR_SYS_DMMUCFGR_NTS_SET(X, Y) (((X) & OR1K_UNSIGNED(0xffffffe3)) | ((Y) << 2))
+
+/* Number of ATB Entries */
+#define OR1K_SPR_SYS_DMMUCFGR_NAE_LSB 5
+#define OR1K_SPR_SYS_DMMUCFGR_NAE_MSB 7
+#define OR1K_SPR_SYS_DMMUCFGR_NAE_BITS 3
+#define OR1K_SPR_SYS_DMMUCFGR_NAE_MASK OR1K_UNSIGNED(0x000000e0)
+#define OR1K_SPR_SYS_DMMUCFGR_NAE_GET(X) (((X) >> 5) & OR1K_UNSIGNED(0x00000007))
+#define OR1K_SPR_SYS_DMMUCFGR_NAE_SET(X, Y) (((X) & OR1K_UNSIGNED(0xffffff1f)) | ((Y) << 5))
+
+/* Control Register Implemented */
+#define OR1K_SPR_SYS_DMMUCFGR_CRI_OFFSET 8
+#define OR1K_SPR_SYS_DMMUCFGR_CRI_MASK 0x00000100
+#define OR1K_SPR_SYS_DMMUCFGR_CRI_GET(X) (((X) >> 8) & 0x1)
+#define OR1K_SPR_SYS_DMMUCFGR_CRI_SET(X, Y) (((X) & OR1K_UNSIGNED(0xfffffeff)) | ((!!(Y)) << 8))
+
+/* Protection Register Implemented */
+#define OR1K_SPR_SYS_DMMUCFGR_PRI_OFFSET 9
+#define OR1K_SPR_SYS_DMMUCFGR_PRI_MASK 0x00000200
+#define OR1K_SPR_SYS_DMMUCFGR_PRI_GET(X) (((X) >> 9) & 0x1)
+#define OR1K_SPR_SYS_DMMUCFGR_PRI_SET(X, Y) (((X) & OR1K_UNSIGNED(0xfffffdff)) | ((!!(Y)) << 9))
+
+/* TLB Entry Invalidate Register Implemented */
+#define OR1K_SPR_SYS_DMMUCFGR_TEIRI_OFFSET 10
+#define OR1K_SPR_SYS_DMMUCFGR_TEIRI_MASK 0x00000400
+#define OR1K_SPR_SYS_DMMUCFGR_TEIRI_GET(X) (((X) >> 10) & 0x1)
+#define OR1K_SPR_SYS_DMMUCFGR_TEIRI_SET(X, Y) (((X) & OR1K_UNSIGNED(0xfffffbff)) | ((!!(Y)) << 10))
+
+/* Hardware TLB Reload */
+#define OR1K_SPR_SYS_DMMUCFGR_HTR_OFFSET 11
+#define OR1K_SPR_SYS_DMMUCFGR_HTR_MASK 0x00000800
+#define OR1K_SPR_SYS_DMMUCFGR_HTR_GET(X) (((X) >> 11) & 0x1)
+#define OR1K_SPR_SYS_DMMUCFGR_HTR_SET(X, Y) (((X) & OR1K_UNSIGNED(0xfffff7ff)) | ((!!(Y)) << 11))
+
+/* DTLB reloaded in software */
+#define OR1K_SPR_SYS_DMMUCFGR_HTR_SW 0
+/* DTLB reloaded in hardware */
+#define OR1K_SPR_SYS_DMMUCFGR_HTR_HW 1
+
+/* Instruction MMU Configuration Register */
+#define OR1K_SPR_SYS_IMMUCFGR_INDEX OR1K_UNSIGNED(0x004)
+#define OR1K_SPR_SYS_IMMUCFGR_ADDR OR1K_UNSIGNED(0x0004)
+
+/* Number of TLB Ways */
+#define OR1K_SPR_SYS_IMMUCFGR_NTW_LSB 0
+#define OR1K_SPR_SYS_IMMUCFGR_NTW_MSB 1
+#define OR1K_SPR_SYS_IMMUCFGR_NTW_BITS 2
+#define OR1K_SPR_SYS_IMMUCFGR_NTW_MASK OR1K_UNSIGNED(0x00000003)
+#define OR1K_SPR_SYS_IMMUCFGR_NTW_GET(X) (((X) >> 0) & OR1K_UNSIGNED(0x00000003))
+#define OR1K_SPR_SYS_IMMUCFGR_NTW_SET(X, Y) (((X) & OR1K_UNSIGNED(0xfffffffc)) | ((Y) << 0))
+
+/* Number of TLB Sets */
+#define OR1K_SPR_SYS_IMMUCFGR_NTS_LSB 2
+#define OR1K_SPR_SYS_IMMUCFGR_NTS_MSB 4
+#define OR1K_SPR_SYS_IMMUCFGR_NTS_BITS 3
+#define OR1K_SPR_SYS_IMMUCFGR_NTS_MASK OR1K_UNSIGNED(0x0000001c)
+#define OR1K_SPR_SYS_IMMUCFGR_NTS_GET(X) (((X) >> 2) & OR1K_UNSIGNED(0x00000007))
+#define OR1K_SPR_SYS_IMMUCFGR_NTS_SET(X, Y) (((X) & OR1K_UNSIGNED(0xffffffe3)) | ((Y) << 2))
+
+/* Number of ATB Entries */
+#define OR1K_SPR_SYS_IMMUCFGR_NAE_LSB 5
+#define OR1K_SPR_SYS_IMMUCFGR_NAE_MSB 7
+#define OR1K_SPR_SYS_IMMUCFGR_NAE_BITS 3
+#define OR1K_SPR_SYS_IMMUCFGR_NAE_MASK OR1K_UNSIGNED(0x000000e0)
+#define OR1K_SPR_SYS_IMMUCFGR_NAE_GET(X) (((X) >> 5) & OR1K_UNSIGNED(0x00000007))
+#define OR1K_SPR_SYS_IMMUCFGR_NAE_SET(X, Y) (((X) & OR1K_UNSIGNED(0xffffff1f)) | ((Y) << 5))
+
+/* Control Register Implemented */
+#define OR1K_SPR_SYS_IMMUCFGR_CRI_OFFSET 8
+#define OR1K_SPR_SYS_IMMUCFGR_CRI_MASK 0x00000100
+#define OR1K_SPR_SYS_IMMUCFGR_CRI_GET(X) (((X) >> 8) & 0x1)
+#define OR1K_SPR_SYS_IMMUCFGR_CRI_SET(X, Y) (((X) & OR1K_UNSIGNED(0xfffffeff)) | ((!!(Y)) << 8))
+
+/* Protection Register Implemented */
+#define OR1K_SPR_SYS_IMMUCFGR_PRI_OFFSET 9
+#define OR1K_SPR_SYS_IMMUCFGR_PRI_MASK 0x00000200
+#define OR1K_SPR_SYS_IMMUCFGR_PRI_GET(X) (((X) >> 9) & 0x1)
+#define OR1K_SPR_SYS_IMMUCFGR_PRI_SET(X, Y) (((X) & OR1K_UNSIGNED(0xfffffdff)) | ((!!(Y)) << 9))
+
+/* TLB Entry Invalidate Register Implemented */
+#define OR1K_SPR_SYS_IMMUCFGR_TEIRI_OFFSET 10
+#define OR1K_SPR_SYS_IMMUCFGR_TEIRI_MASK 0x00000400
+#define OR1K_SPR_SYS_IMMUCFGR_TEIRI_GET(X) (((X) >> 10) & 0x1)
+#define OR1K_SPR_SYS_IMMUCFGR_TEIRI_SET(X, Y) (((X) & OR1K_UNSIGNED(0xfffffbff)) | ((!!(Y)) << 10))
+
+/* Hardware TLB Reload */
+#define OR1K_SPR_SYS_IMMUCFGR_HTR_OFFSET 11
+#define OR1K_SPR_SYS_IMMUCFGR_HTR_MASK 0x00000800
+#define OR1K_SPR_SYS_IMMUCFGR_HTR_GET(X) (((X) >> 11) & 0x1)
+#define OR1K_SPR_SYS_IMMUCFGR_HTR_SET(X, Y) (((X) & OR1K_UNSIGNED(0xfffff7ff)) | ((!!(Y)) << 11))
+
+/* DTLB reloaded in software */
+#define OR1K_SPR_SYS_IMMUCFGR_HTR_SW 0
+/* DTLB reloaded in hardware */
+#define OR1K_SPR_SYS_IMMUCFGR_HTR_HW 1
+
+/* Data Cache Configuration Register */
+#define OR1K_SPR_SYS_DCCFGR_INDEX OR1K_UNSIGNED(0x005)
+#define OR1K_SPR_SYS_DCCFGR_ADDR OR1K_UNSIGNED(0x0005)
+
+/* Number of Cache Ways */
+#define OR1K_SPR_SYS_DCCFGR_NCW_LSB 0
+#define OR1K_SPR_SYS_DCCFGR_NCW_MSB 2
+#define OR1K_SPR_SYS_DCCFGR_NCW_BITS 3
+#define OR1K_SPR_SYS_DCCFGR_NCW_MASK OR1K_UNSIGNED(0x00000007)
+#define OR1K_SPR_SYS_DCCFGR_NCW_GET(X) (((X) >> 0) & OR1K_UNSIGNED(0x00000007))
+#define OR1K_SPR_SYS_DCCFGR_NCW_SET(X, Y) (((X) & OR1K_UNSIGNED(0xfffffff8)) | ((Y) << 0))
+
+/* Number of Cache Sets */
+#define OR1K_SPR_SYS_DCCFGR_NCS_LSB 3
+#define OR1K_SPR_SYS_DCCFGR_NCS_MSB 6
+#define OR1K_SPR_SYS_DCCFGR_NCS_BITS 4
+#define OR1K_SPR_SYS_DCCFGR_NCS_MASK OR1K_UNSIGNED(0x00000078)
+#define OR1K_SPR_SYS_DCCFGR_NCS_GET(X) (((X) >> 3) & OR1K_UNSIGNED(0x0000000f))
+#define OR1K_SPR_SYS_DCCFGR_NCS_SET(X, Y) (((X) & OR1K_UNSIGNED(0xffffff87)) | ((Y) << 3))
+
+/* Cache Block Size */
+#define OR1K_SPR_SYS_DCCFGR_CBS_OFFSET 7
+#define OR1K_SPR_SYS_DCCFGR_CBS_MASK 0x00000080
+#define OR1K_SPR_SYS_DCCFGR_CBS_GET(X) (((X) >> 7) & 0x1)
+#define OR1K_SPR_SYS_DCCFGR_CBS_SET(X, Y) (((X) & OR1K_UNSIGNED(0xffffff7f)) | ((!!(Y)) << 7))
+
+/* 16 Bytes */
+#define OR1K_SPR_SYS_DCCFGR_CBS_16 0
+/* 32 Bytes */
+#define OR1K_SPR_SYS_DCCFGR_CBS_32 1
+/* Cache Write Strategy */
+#define OR1K_SPR_SYS_DCCFGR_CWS_OFFSET 8
+#define OR1K_SPR_SYS_DCCFGR_CWS_MASK 0x00000100
+#define OR1K_SPR_SYS_DCCFGR_CWS_GET(X) (((X) >> 8) & 0x1)
+#define OR1K_SPR_SYS_DCCFGR_CWS_SET(X, Y) (((X) & OR1K_UNSIGNED(0xfffffeff)) | ((!!(Y)) << 8))
+
+/* Write Through */
+#define OR1K_SPR_SYS_DCCFGR_CWS_WT 0
+/* Write Back */
+#define OR1K_SPR_SYS_DCCFGR_CWS_WB 1
+/* Cache Control Register Implemented */
+#define OR1K_SPR_SYS_DCCFGR_CCRI_OFFSET 9
+#define OR1K_SPR_SYS_DCCFGR_CCRI_MASK 0x00000200
+#define OR1K_SPR_SYS_DCCFGR_CCRI_GET(X) (((X) >> 9) & 0x1)
+#define OR1K_SPR_SYS_DCCFGR_CCRI_SET(X, Y) (((X) & OR1K_UNSIGNED(0xfffffdff)) | ((!!(Y)) << 9))
+
+/* Cache Block Invalidate Register Implemented */
+#define OR1K_SPR_SYS_DCCFGR_CBIRI_OFFSET 10
+#define OR1K_SPR_SYS_DCCFGR_CBIRI_MASK 0x00000400
+#define OR1K_SPR_SYS_DCCFGR_CBIRI_GET(X) (((X) >> 10) & 0x1)
+#define OR1K_SPR_SYS_DCCFGR_CBIRI_SET(X, Y) (((X) & OR1K_UNSIGNED(0xfffffbff)) | ((!!(Y)) << 10))
+
+/* Cache Block Prefetch Register Implemented */
+#define OR1K_SPR_SYS_DCCFGR_CBPRI_OFFSET 11
+#define OR1K_SPR_SYS_DCCFGR_CBPRI_MASK 0x00000800
+#define OR1K_SPR_SYS_DCCFGR_CBPRI_GET(X) (((X) >> 11) & 0x1)
+#define OR1K_SPR_SYS_DCCFGR_CBPRI_SET(X, Y) (((X) & OR1K_UNSIGNED(0xfffff7ff)) | ((!!(Y)) << 11))
+
+/* Cache Block Lock Register Implemented */
+#define OR1K_SPR_SYS_DCCFGR_CBLRI_OFFSET 12
+#define OR1K_SPR_SYS_DCCFGR_CBLRI_MASK 0x00001000
+#define OR1K_SPR_SYS_DCCFGR_CBLRI_GET(X) (((X) >> 12) & 0x1)
+#define OR1K_SPR_SYS_DCCFGR_CBLRI_SET(X, Y) (((X) & OR1K_UNSIGNED(0xffffefff)) | ((!!(Y)) << 12))
+
+/* Cache Block Flush Register Implemented */
+#define OR1K_SPR_SYS_DCCFGR_CBFRI_OFFSET 13
+#define OR1K_SPR_SYS_DCCFGR_CBFRI_MASK 0x00002000
+#define OR1K_SPR_SYS_DCCFGR_CBFRI_GET(X) (((X) >> 13) & 0x1)
+#define OR1K_SPR_SYS_DCCFGR_CBFRI_SET(X, Y) (((X) & OR1K_UNSIGNED(0xffffdfff)) | ((!!(Y)) << 13))
+
+/* Cache Block Write-back Register Implemented */
+#define OR1K_SPR_SYS_DCCFGR_CBWBRI_OFFSET 14
+#define OR1K_SPR_SYS_DCCFGR_CBWBRI_MASK 0x00004000
+#define OR1K_SPR_SYS_DCCFGR_CBWBRI_GET(X) (((X) >> 14) & 0x1)
+#define OR1K_SPR_SYS_DCCFGR_CBWBRI_SET(X, Y) (((X) & OR1K_UNSIGNED(0xffffbfff)) | ((!!(Y)) << 14))
+
+
+/* Instruction Cache Configuration Register */
+#define OR1K_SPR_SYS_ICCFGR_INDEX OR1K_UNSIGNED(0x006)
+#define OR1K_SPR_SYS_ICCFGR_ADDR OR1K_UNSIGNED(0x0006)
+
+/* Number of Cache Ways */
+#define OR1K_SPR_SYS_ICCFGR_NCW_LSB 0
+#define OR1K_SPR_SYS_ICCFGR_NCW_MSB 2
+#define OR1K_SPR_SYS_ICCFGR_NCW_BITS 3
+#define OR1K_SPR_SYS_ICCFGR_NCW_MASK OR1K_UNSIGNED(0x00000007)
+#define OR1K_SPR_SYS_ICCFGR_NCW_GET(X) (((X) >> 0) & OR1K_UNSIGNED(0x00000007))
+#define OR1K_SPR_SYS_ICCFGR_NCW_SET(X, Y) (((X) & OR1K_UNSIGNED(0xfffffff8)) | ((Y) << 0))
+
+/* Number of Cache Sets */
+#define OR1K_SPR_SYS_ICCFGR_NCS_LSB 3
+#define OR1K_SPR_SYS_ICCFGR_NCS_MSB 6
+#define OR1K_SPR_SYS_ICCFGR_NCS_BITS 4
+#define OR1K_SPR_SYS_ICCFGR_NCS_MASK OR1K_UNSIGNED(0x00000078)
+#define OR1K_SPR_SYS_ICCFGR_NCS_GET(X) (((X) >> 3) & OR1K_UNSIGNED(0x0000000f))
+#define OR1K_SPR_SYS_ICCFGR_NCS_SET(X, Y) (((X) & OR1K_UNSIGNED(0xffffff87)) | ((Y) << 3))
+
+/* Cache Block Size */
+#define OR1K_SPR_SYS_ICCFGR_CBS_OFFSET 7
+#define OR1K_SPR_SYS_ICCFGR_CBS_MASK 0x00000080
+#define OR1K_SPR_SYS_ICCFGR_CBS_GET(X) (((X) >> 7) & 0x1)
+#define OR1K_SPR_SYS_ICCFGR_CBS_SET(X, Y) (((X) & OR1K_UNSIGNED(0xffffff7f)) | ((!!(Y)) << 7))
+
+/* 16 Bytes */
+#define OR1K_SPR_SYS_ICCFGR_CBS_16 0
+/* 32 Bytes */
+#define OR1K_SPR_SYS_ICCFGR_CBS_32 1
+/* Cache Control Register Implemented */
+#define OR1K_SPR_SYS_ICCFGR_CCRI_OFFSET 9
+#define OR1K_SPR_SYS_ICCFGR_CCRI_MASK 0x00000200
+#define OR1K_SPR_SYS_ICCFGR_CCRI_GET(X) (((X) >> 9) & 0x1)
+#define OR1K_SPR_SYS_ICCFGR_CCRI_SET(X, Y) (((X) & OR1K_UNSIGNED(0xfffffdff)) | ((!!(Y)) << 9))
+
+/* Cache Block Invalidate Register Implemented */
+#define OR1K_SPR_SYS_ICCFGR_CBIRI_OFFSET 10
+#define OR1K_SPR_SYS_ICCFGR_CBIRI_MASK 0x00000400
+#define OR1K_SPR_SYS_ICCFGR_CBIRI_GET(X) (((X) >> 10) & 0x1)
+#define OR1K_SPR_SYS_ICCFGR_CBIRI_SET(X, Y) (((X) & OR1K_UNSIGNED(0xfffffbff)) | ((!!(Y)) << 10))
+
+/* Cache Block Prefetch Register Implemented */
+#define OR1K_SPR_SYS_ICCFGR_CBPRI_OFFSET 11
+#define OR1K_SPR_SYS_ICCFGR_CBPRI_MASK 0x00000800
+#define OR1K_SPR_SYS_ICCFGR_CBPRI_GET(X) (((X) >> 11) & 0x1)
+#define OR1K_SPR_SYS_ICCFGR_CBPRI_SET(X, Y) (((X) & OR1K_UNSIGNED(0xfffff7ff)) | ((!!(Y)) << 11))
+
+/* Cache Block Lock Register Implemented */
+#define OR1K_SPR_SYS_ICCFGR_CBLRI_OFFSET 12
+#define OR1K_SPR_SYS_ICCFGR_CBLRI_MASK 0x00001000
+#define OR1K_SPR_SYS_ICCFGR_CBLRI_GET(X) (((X) >> 12) & 0x1)
+#define OR1K_SPR_SYS_ICCFGR_CBLRI_SET(X, Y) (((X) & OR1K_UNSIGNED(0xffffefff)) | ((!!(Y)) << 12))
+
+
+/* Debug Configuration Register */
+#define OR1K_SPR_SYS_DCFGR_INDEX OR1K_UNSIGNED(0x007)
+#define OR1K_SPR_SYS_DCFGR_ADDR OR1K_UNSIGNED(0x0007)
+
+/* Number of Debug Pairs */
+#define OR1K_SPR_SYS_DCFGR_NDP_LSB 0
+#define OR1K_SPR_SYS_DCFGR_NDP_MSB 2
+#define OR1K_SPR_SYS_DCFGR_NDP_BITS 3
+#define OR1K_SPR_SYS_DCFGR_NDP_MASK OR1K_UNSIGNED(0x00000007)
+#define OR1K_SPR_SYS_DCFGR_NDP_GET(X) (((X) >> 0) & OR1K_UNSIGNED(0x00000007))
+#define OR1K_SPR_SYS_DCFGR_NDP_SET(X, Y) (((X) & OR1K_UNSIGNED(0xfffffff8)) | ((Y) << 0))
+
+/* Watchpoint Counters Implemented */
+#define OR1K_SPR_SYS_DCFGR_WPCI_OFFSET 3
+#define OR1K_SPR_SYS_DCFGR_WPCI_MASK 0x00000008
+#define OR1K_SPR_SYS_DCFGR_WPCI_GET(X) (((X) >> 3) & 0x1)
+#define OR1K_SPR_SYS_DCFGR_WPCI_SET(X, Y) (((X) & OR1K_UNSIGNED(0xfffffff7)) | ((!!(Y)) << 3))
+
+
+/* Performance Counters Configuration */
+#define OR1K_SPR_SYS_PCCFGR_INDEX OR1K_UNSIGNED(0x008)
+#define OR1K_SPR_SYS_PCCFGR_ADDR OR1K_UNSIGNED(0x0008)
+
+/* Number of Performance Counters */
+#define OR1K_SPR_SYS_PCCFGR_NPC_LSB 0
+#define OR1K_SPR_SYS_PCCFGR_NPC_MSB 2
+#define OR1K_SPR_SYS_PCCFGR_NPC_BITS 3
+#define OR1K_SPR_SYS_PCCFGR_NPC_MASK OR1K_UNSIGNED(0x00000007)
+#define OR1K_SPR_SYS_PCCFGR_NPC_GET(X) (((X) >> 0) & OR1K_UNSIGNED(0x00000007))
+#define OR1K_SPR_SYS_PCCFGR_NPC_SET(X, Y) (((X) & OR1K_UNSIGNED(0xfffffff8)) | ((Y) << 0))
+
+
+/* Version Register 2 */
+#define OR1K_SPR_SYS_VR2_INDEX OR1K_UNSIGNED(0x009)
+#define OR1K_SPR_SYS_VR2_ADDR OR1K_UNSIGNED(0x0009)
+
+/* Version */
+#define OR1K_SPR_SYS_VR2_VER_LSB 0
+#define OR1K_SPR_SYS_VR2_VER_MSB 23
+#define OR1K_SPR_SYS_VR2_VER_BITS 24
+#define OR1K_SPR_SYS_VR2_VER_MASK OR1K_UNSIGNED(0x00ffffff)
+#define OR1K_SPR_SYS_VR2_VER_GET(X) (((X) >> 0) & OR1K_UNSIGNED(0x00ffffff))
+#define OR1K_SPR_SYS_VR2_VER_SET(X, Y) (((X) & OR1K_UNSIGNED(0xff000000)) | ((Y) << 0))
+
+/* CPU Identification Number */
+#define OR1K_SPR_SYS_VR2_CPUID_LSB 24
+#define OR1K_SPR_SYS_VR2_CPUID_MSB 31
+#define OR1K_SPR_SYS_VR2_CPUID_BITS 8
+#define OR1K_SPR_SYS_VR2_CPUID_MASK OR1K_UNSIGNED(0xff000000)
+#define OR1K_SPR_SYS_VR2_CPUID_GET(X) (((X) >> 24) & OR1K_UNSIGNED(0x000000ff))
+#define OR1K_SPR_SYS_VR2_CPUID_SET(X, Y) (((X) & OR1K_UNSIGNED(0x00ffffff)) | ((Y) << 24))
+
+
+/* Architecture Version Register */
+#define OR1K_SPR_SYS_AVR_INDEX OR1K_UNSIGNED(0x00a)
+#define OR1K_SPR_SYS_AVR_ADDR OR1K_UNSIGNED(0x000a)
+
+/* Major Architecture Version Number */
+#define OR1K_SPR_SYS_AVR_REV_LSB 8
+#define OR1K_SPR_SYS_AVR_REV_MSB 15
+#define OR1K_SPR_SYS_AVR_REV_BITS 8
+#define OR1K_SPR_SYS_AVR_REV_MASK OR1K_UNSIGNED(0x0000ff00)
+#define OR1K_SPR_SYS_AVR_REV_GET(X) (((X) >> 8) & OR1K_UNSIGNED(0x000000ff))
+#define OR1K_SPR_SYS_AVR_REV_SET(X, Y) (((X) & OR1K_UNSIGNED(0xffff00ff)) | ((Y) << 8))
+
+/* Minor Architecture Version Number */
+#define OR1K_SPR_SYS_AVR_MIN_LSB 16
+#define OR1K_SPR_SYS_AVR_MIN_MSB 23
+#define OR1K_SPR_SYS_AVR_MIN_BITS 8
+#define OR1K_SPR_SYS_AVR_MIN_MASK OR1K_UNSIGNED(0x00ff0000)
+#define OR1K_SPR_SYS_AVR_MIN_GET(X) (((X) >> 16) & OR1K_UNSIGNED(0x000000ff))
+#define OR1K_SPR_SYS_AVR_MIN_SET(X, Y) (((X) & OR1K_UNSIGNED(0xff00ffff)) | ((Y) << 16))
+
+/* Architecture Revision Number */
+#define OR1K_SPR_SYS_AVR_MAJ_LSB 24
+#define OR1K_SPR_SYS_AVR_MAJ_MSB 31
+#define OR1K_SPR_SYS_AVR_MAJ_BITS 8
+#define OR1K_SPR_SYS_AVR_MAJ_MASK OR1K_UNSIGNED(0xff000000)
+#define OR1K_SPR_SYS_AVR_MAJ_GET(X) (((X) >> 24) & OR1K_UNSIGNED(0x000000ff))
+#define OR1K_SPR_SYS_AVR_MAJ_SET(X, Y) (((X) & OR1K_UNSIGNED(0x00ffffff)) | ((Y) << 24))
+
+
+/* Exception Vector Base Address Register */
+#define OR1K_SPR_SYS_EVBAR_INDEX OR1K_UNSIGNED(0x00b)
+#define OR1K_SPR_SYS_EVBAR_ADDR OR1K_UNSIGNED(0x000b)
+
+/* Exception Vector Base Address */
+#define OR1K_SPR_SYS_EVBAR_EVBA_LSB 13
+#define OR1K_SPR_SYS_EVBAR_EVBA_MSB 31
+#define OR1K_SPR_SYS_EVBAR_EVBA_BITS 19
+#define OR1K_SPR_SYS_EVBAR_EVBA_MASK OR1K_UNSIGNED(0xffffe000)
+#define OR1K_SPR_SYS_EVBAR_EVBA_GET(X) (((X) >> 13) & OR1K_UNSIGNED(0x0007ffff))
+#define OR1K_SPR_SYS_EVBAR_EVBA_SET(X, Y) (((X) & OR1K_UNSIGNED(0x00001fff)) | ((Y) << 13))
+
+
+/* Arithmetic Exception Control Register */
+#define OR1K_SPR_SYS_AECR_INDEX OR1K_UNSIGNED(0x00c)
+#define OR1K_SPR_SYS_AECR_ADDR OR1K_UNSIGNED(0x000c)
+
+/* Carry on Add Exception Enabled */
+#define OR1K_SPR_SYS_AECR_CYADDE_OFFSET 0
+#define OR1K_SPR_SYS_AECR_CYADDE_MASK 0x00000001
+#define OR1K_SPR_SYS_AECR_CYADDE_GET(X) (((X) >> 0) & 0x1)
+#define OR1K_SPR_SYS_AECR_CYADDE_SET(X, Y) (((X) & OR1K_UNSIGNED(0xfffffffe)) | ((!!(Y)) << 0))
+
+/* Overflow on Add Exception Enabled */
+#define OR1K_SPR_SYS_AECR_OVADDE_OFFSET 1
+#define OR1K_SPR_SYS_AECR_OVADDE_MASK 0x00000002
+#define OR1K_SPR_SYS_AECR_OVADDE_GET(X) (((X) >> 1) & 0x1)
+#define OR1K_SPR_SYS_AECR_OVADDE_SET(X, Y) (((X) & OR1K_UNSIGNED(0xfffffffd)) | ((!!(Y)) << 1))
+
+/* Carry on Multiply Exception Enabled */
+#define OR1K_SPR_SYS_AECR_CYMULE_OFFSET 2
+#define OR1K_SPR_SYS_AECR_CYMULE_MASK 0x00000004
+#define OR1K_SPR_SYS_AECR_CYMULE_GET(X) (((X) >> 2) & 0x1)
+#define OR1K_SPR_SYS_AECR_CYMULE_SET(X, Y) (((X) & OR1K_UNSIGNED(0xfffffffb)) | ((!!(Y)) << 2))
+
+/* Overflow on Multiply Exception Enabled */
+#define OR1K_SPR_SYS_AECR_OVMULE_OFFSET 3
+#define OR1K_SPR_SYS_AECR_OVMULE_MASK 0x00000008
+#define OR1K_SPR_SYS_AECR_OVMULE_GET(X) (((X) >> 3) & 0x1)
+#define OR1K_SPR_SYS_AECR_OVMULE_SET(X, Y) (((X) & OR1K_UNSIGNED(0xfffffff7)) | ((!!(Y)) << 3))
+
+/* Divide by Zero Exception Enabled */
+#define OR1K_SPR_SYS_AECR_DBZE_OFFSET 4
+#define OR1K_SPR_SYS_AECR_DBZE_MASK 0x00000010
+#define OR1K_SPR_SYS_AECR_DBZE_GET(X) (((X) >> 4) & 0x1)
+#define OR1K_SPR_SYS_AECR_DBZE_SET(X, Y) (((X) & OR1K_UNSIGNED(0xffffffef)) | ((!!(Y)) << 4))
+
+/* Carry on MAC Addition Exception Enabled */
+#define OR1K_SPR_SYS_AECR_CYMACADDE_OFFSET 5
+#define OR1K_SPR_SYS_AECR_CYMACADDE_MASK 0x00000020
+#define OR1K_SPR_SYS_AECR_CYMACADDE_GET(X) (((X) >> 5) & 0x1)
+#define OR1K_SPR_SYS_AECR_CYMACADDE_SET(X, Y) (((X) & OR1K_UNSIGNED(0xffffffdf)) | ((!!(Y)) << 5))
+
+/* Overflow on MAC Addition Exception Enabled */
+#define OR1K_SPR_SYS_AECR_OVMACADDE_OFFSET 6
+#define OR1K_SPR_SYS_AECR_OVMACADDE_MASK 0x00000040
+#define OR1K_SPR_SYS_AECR_OVMACADDE_GET(X) (((X) >> 6) & 0x1)
+#define OR1K_SPR_SYS_AECR_OVMACADDE_SET(X, Y) (((X) & OR1K_UNSIGNED(0xffffffbf)) | ((!!(Y)) << 6))
+
+
+/* Arithmetic Exception Status Register */
+#define OR1K_SPR_SYS_AESR_INDEX OR1K_UNSIGNED(0x00d)
+#define OR1K_SPR_SYS_AESR_ADDR OR1K_UNSIGNED(0x000d)
+
+/* Carry on Add Exception */
+#define OR1K_SPR_SYS_AESR_CYADDE_OFFSET 0
+#define OR1K_SPR_SYS_AESR_CYADDE_MASK 0x00000001
+#define OR1K_SPR_SYS_AESR_CYADDE_GET(X) (((X) >> 0) & 0x1)
+#define OR1K_SPR_SYS_AESR_CYADDE_SET(X, Y) (((X) & OR1K_UNSIGNED(0xfffffffe)) | ((!!(Y)) << 0))
+
+/* Overflow on Add Exception */
+#define OR1K_SPR_SYS_AESR_OVADDE_OFFSET 1
+#define OR1K_SPR_SYS_AESR_OVADDE_MASK 0x00000002
+#define OR1K_SPR_SYS_AESR_OVADDE_GET(X) (((X) >> 1) & 0x1)
+#define OR1K_SPR_SYS_AESR_OVADDE_SET(X, Y) (((X) & OR1K_UNSIGNED(0xfffffffd)) | ((!!(Y)) << 1))
+
+/* Carry on Multiply Exception */
+#define OR1K_SPR_SYS_AESR_CYMULE_OFFSET 2
+#define OR1K_SPR_SYS_AESR_CYMULE_MASK 0x00000004
+#define OR1K_SPR_SYS_AESR_CYMULE_GET(X) (((X) >> 2) & 0x1)
+#define OR1K_SPR_SYS_AESR_CYMULE_SET(X, Y) (((X) & OR1K_UNSIGNED(0xfffffffb)) | ((!!(Y)) << 2))
+
+/* Overflow on Multiply Exception */
+#define OR1K_SPR_SYS_AESR_OVMULE_OFFSET 3
+#define OR1K_SPR_SYS_AESR_OVMULE_MASK 0x00000008
+#define OR1K_SPR_SYS_AESR_OVMULE_GET(X) (((X) >> 3) & 0x1)
+#define OR1K_SPR_SYS_AESR_OVMULE_SET(X, Y) (((X) & OR1K_UNSIGNED(0xfffffff7)) | ((!!(Y)) << 3))
+
+/* Divide by Zero Exception */
+#define OR1K_SPR_SYS_AESR_DBZE_OFFSET 4
+#define OR1K_SPR_SYS_AESR_DBZE_MASK 0x00000010
+#define OR1K_SPR_SYS_AESR_DBZE_GET(X) (((X) >> 4) & 0x1)
+#define OR1K_SPR_SYS_AESR_DBZE_SET(X, Y) (((X) & OR1K_UNSIGNED(0xffffffef)) | ((!!(Y)) << 4))
+
+/* Carry on MAC Addition Exception */
+#define OR1K_SPR_SYS_AESR_CYMACADDE_OFFSET 5
+#define OR1K_SPR_SYS_AESR_CYMACADDE_MASK 0x00000020
+#define OR1K_SPR_SYS_AESR_CYMACADDE_GET(X) (((X) >> 5) & 0x1)
+#define OR1K_SPR_SYS_AESR_CYMACADDE_SET(X, Y) (((X) & OR1K_UNSIGNED(0xffffffdf)) | ((!!(Y)) << 5))
+
+/* Overflow on MAC Addition Exception */
+#define OR1K_SPR_SYS_AESR_OVMACADDE_OFFSET 6
+#define OR1K_SPR_SYS_AESR_OVMACADDE_MASK 0x00000040
+#define OR1K_SPR_SYS_AESR_OVMACADDE_GET(X) (((X) >> 6) & 0x1)
+#define OR1K_SPR_SYS_AESR_OVMACADDE_SET(X, Y) (((X) & OR1K_UNSIGNED(0xffffffbf)) | ((!!(Y)) << 6))
+
+
+/* Next Program Counter */
+#define OR1K_SPR_SYS_NPC_INDEX OR1K_UNSIGNED(0x010)
+#define OR1K_SPR_SYS_NPC_ADDR OR1K_UNSIGNED(0x0010)
+
+
+/* Supervision Register */
+#define OR1K_SPR_SYS_SR_INDEX OR1K_UNSIGNED(0x011)
+#define OR1K_SPR_SYS_SR_ADDR OR1K_UNSIGNED(0x0011)
+
+/* Supervisor Mode */
+#define OR1K_SPR_SYS_SR_SM_OFFSET 0
+#define OR1K_SPR_SYS_SR_SM_MASK 0x00000001
+#define OR1K_SPR_SYS_SR_SM_GET(X) (((X) >> 0) & 0x1)
+#define OR1K_SPR_SYS_SR_SM_SET(X, Y) (((X) & OR1K_UNSIGNED(0xfffffffe)) | ((!!(Y)) << 0))
+
+/* Tick Timer Exception Enabled */
+#define OR1K_SPR_SYS_SR_TEE_OFFSET 1
+#define OR1K_SPR_SYS_SR_TEE_MASK 0x00000002
+#define OR1K_SPR_SYS_SR_TEE_GET(X) (((X) >> 1) & 0x1)
+#define OR1K_SPR_SYS_SR_TEE_SET(X, Y) (((X) & OR1K_UNSIGNED(0xfffffffd)) | ((!!(Y)) << 1))
+
+/* Interrupt Exception Enabled */
+#define OR1K_SPR_SYS_SR_IEE_OFFSET 2
+#define OR1K_SPR_SYS_SR_IEE_MASK 0x00000004
+#define OR1K_SPR_SYS_SR_IEE_GET(X) (((X) >> 2) & 0x1)
+#define OR1K_SPR_SYS_SR_IEE_SET(X, Y) (((X) & OR1K_UNSIGNED(0xfffffffb)) | ((!!(Y)) << 2))
+
+/* Data Cache Enabled */
+#define OR1K_SPR_SYS_SR_DCE_OFFSET 3
+#define OR1K_SPR_SYS_SR_DCE_MASK 0x00000008
+#define OR1K_SPR_SYS_SR_DCE_GET(X) (((X) >> 3) & 0x1)
+#define OR1K_SPR_SYS_SR_DCE_SET(X, Y) (((X) & OR1K_UNSIGNED(0xfffffff7)) | ((!!(Y)) << 3))
+
+/* Instruction Cache Enabled */
+#define OR1K_SPR_SYS_SR_ICE_OFFSET 4
+#define OR1K_SPR_SYS_SR_ICE_MASK 0x00000010
+#define OR1K_SPR_SYS_SR_ICE_GET(X) (((X) >> 4) & 0x1)
+#define OR1K_SPR_SYS_SR_ICE_SET(X, Y) (((X) & OR1K_UNSIGNED(0xffffffef)) | ((!!(Y)) << 4))
+
+/* Data MMU Enabled */
+#define OR1K_SPR_SYS_SR_DME_OFFSET 5
+#define OR1K_SPR_SYS_SR_DME_MASK 0x00000020
+#define OR1K_SPR_SYS_SR_DME_GET(X) (((X) >> 5) & 0x1)
+#define OR1K_SPR_SYS_SR_DME_SET(X, Y) (((X) & OR1K_UNSIGNED(0xffffffdf)) | ((!!(Y)) << 5))
+
+/* Instruction MMU Enabled */
+#define OR1K_SPR_SYS_SR_IME_OFFSET 6
+#define OR1K_SPR_SYS_SR_IME_MASK 0x00000040
+#define OR1K_SPR_SYS_SR_IME_GET(X) (((X) >> 6) & 0x1)
+#define OR1K_SPR_SYS_SR_IME_SET(X, Y) (((X) & OR1K_UNSIGNED(0xffffffbf)) | ((!!(Y)) << 6))
+
+/* Little Endian Enabled */
+#define OR1K_SPR_SYS_SR_LEE_OFFSET 7
+#define OR1K_SPR_SYS_SR_LEE_MASK 0x00000080
+#define OR1K_SPR_SYS_SR_LEE_GET(X) (((X) >> 7) & 0x1)
+#define OR1K_SPR_SYS_SR_LEE_SET(X, Y) (((X) & OR1K_UNSIGNED(0xffffff7f)) | ((!!(Y)) << 7))
+
+/* CID Enable */
+#define OR1K_SPR_SYS_SR_CE_OFFSET 8
+#define OR1K_SPR_SYS_SR_CE_MASK 0x00000100
+#define OR1K_SPR_SYS_SR_CE_GET(X) (((X) >> 8) & 0x1)
+#define OR1K_SPR_SYS_SR_CE_SET(X, Y) (((X) & OR1K_UNSIGNED(0xfffffeff)) | ((!!(Y)) << 8))
+
+/* Flag */
+#define OR1K_SPR_SYS_SR_F_OFFSET 9
+#define OR1K_SPR_SYS_SR_F_MASK 0x00000200
+#define OR1K_SPR_SYS_SR_F_GET(X) (((X) >> 9) & 0x1)
+#define OR1K_SPR_SYS_SR_F_SET(X, Y) (((X) & OR1K_UNSIGNED(0xfffffdff)) | ((!!(Y)) << 9))
+
+/* Carry */
+#define OR1K_SPR_SYS_SR_CY_OFFSET 10
+#define OR1K_SPR_SYS_SR_CY_MASK 0x00000400
+#define OR1K_SPR_SYS_SR_CY_GET(X) (((X) >> 10) & 0x1)
+#define OR1K_SPR_SYS_SR_CY_SET(X, Y) (((X) & OR1K_UNSIGNED(0xfffffbff)) | ((!!(Y)) << 10))
+
+/* Overflow */
+#define OR1K_SPR_SYS_SR_OV_OFFSET 11
+#define OR1K_SPR_SYS_SR_OV_MASK 0x00000800
+#define OR1K_SPR_SYS_SR_OV_GET(X) (((X) >> 11) & 0x1)
+#define OR1K_SPR_SYS_SR_OV_SET(X, Y) (((X) & OR1K_UNSIGNED(0xfffff7ff)) | ((!!(Y)) << 11))
+
+/* Overflow Exception Enabled */
+#define OR1K_SPR_SYS_SR_OVE_OFFSET 12
+#define OR1K_SPR_SYS_SR_OVE_MASK 0x00001000
+#define OR1K_SPR_SYS_SR_OVE_GET(X) (((X) >> 12) & 0x1)
+#define OR1K_SPR_SYS_SR_OVE_SET(X, Y) (((X) & OR1K_UNSIGNED(0xffffefff)) | ((!!(Y)) << 12))
+
+/* Delay-slot Exception */
+#define OR1K_SPR_SYS_SR_DSX_OFFSET 13
+#define OR1K_SPR_SYS_SR_DSX_MASK 0x00002000
+#define OR1K_SPR_SYS_SR_DSX_GET(X) (((X) >> 13) & 0x1)
+#define OR1K_SPR_SYS_SR_DSX_SET(X, Y) (((X) & OR1K_UNSIGNED(0xffffdfff)) | ((!!(Y)) << 13))
+
+/* Exception Prefix High */
+#define OR1K_SPR_SYS_SR_EPH_OFFSET 14
+#define OR1K_SPR_SYS_SR_EPH_MASK 0x00004000
+#define OR1K_SPR_SYS_SR_EPH_GET(X) (((X) >> 14) & 0x1)
+#define OR1K_SPR_SYS_SR_EPH_SET(X, Y) (((X) & OR1K_UNSIGNED(0xffffbfff)) | ((!!(Y)) << 14))
+
+/* Fixed One */
+#define OR1K_SPR_SYS_SR_FO_OFFSET 15
+#define OR1K_SPR_SYS_SR_FO_MASK 0x00008000
+#define OR1K_SPR_SYS_SR_FO_GET(X) (((X) >> 15) & 0x1)
+#define OR1K_SPR_SYS_SR_FO_SET(X, Y) (((X) & OR1K_UNSIGNED(0xffff7fff)) | ((!!(Y)) << 15))
+
+/* SPR User Mode Read Access */
+#define OR1K_SPR_SYS_SR_SUMRA_OFFSET 16
+#define OR1K_SPR_SYS_SR_SUMRA_MASK 0x00010000
+#define OR1K_SPR_SYS_SR_SUMRA_GET(X) (((X) >> 16) & 0x1)
+#define OR1K_SPR_SYS_SR_SUMRA_SET(X, Y) (((X) & OR1K_UNSIGNED(0xfffeffff)) | ((!!(Y)) << 16))
+
+/* Context ID */
+#define OR1K_SPR_SYS_SR_CID_LSB 28
+#define OR1K_SPR_SYS_SR_CID_MSB 31
+#define OR1K_SPR_SYS_SR_CID_BITS 4
+#define OR1K_SPR_SYS_SR_CID_MASK OR1K_UNSIGNED(0xf0000000)
+#define OR1K_SPR_SYS_SR_CID_GET(X) (((X) >> 28) & OR1K_UNSIGNED(0x0000000f))
+#define OR1K_SPR_SYS_SR_CID_SET(X, Y) (((X) & OR1K_UNSIGNED(0x0fffffff)) | ((Y) << 28))
+
+
+/* Previous Program Counter */
+#define OR1K_SPR_SYS_PPC_INDEX OR1K_UNSIGNED(0x012)
+#define OR1K_SPR_SYS_PPC_ADDR OR1K_UNSIGNED(0x0012)
+
+
+/* Floating Point Control Status Register */
+#define OR1K_SPR_SYS_FPCSR_INDEX OR1K_UNSIGNED(0x014)
+#define OR1K_SPR_SYS_FPCSR_ADDR OR1K_UNSIGNED(0x0014)
+
+/* Floating Point Exception Enabled */
+#define OR1K_SPR_SYS_FPCSR_FPEE_OFFSET 0
+#define OR1K_SPR_SYS_FPCSR_FPEE_MASK 0x00000001
+#define OR1K_SPR_SYS_FPCSR_FPEE_GET(X) (((X) >> 0) & 0x1)
+#define OR1K_SPR_SYS_FPCSR_FPEE_SET(X, Y) (((X) & OR1K_UNSIGNED(0xfffffffe)) | ((!!(Y)) << 0))
+
+/* Rounding Mode */
+#define OR1K_SPR_SYS_FPCSR_RM_LSB 1
+#define OR1K_SPR_SYS_FPCSR_RM_MSB 2
+#define OR1K_SPR_SYS_FPCSR_RM_BITS 2
+#define OR1K_SPR_SYS_FPCSR_RM_MASK OR1K_UNSIGNED(0x00000006)
+#define OR1K_SPR_SYS_FPCSR_RM_GET(X) (((X) >> 1) & OR1K_UNSIGNED(0x00000003))
+#define OR1K_SPR_SYS_FPCSR_RM_SET(X, Y) (((X) & OR1K_UNSIGNED(0xfffffff9)) | ((Y) << 1))
+
+/* Round to nearest */
+#define OR1K_SPR_SYS_FPCSR_RM_NEAREST 0
+/* Round to zero */
+#define OR1K_SPR_SYS_FPCSR_RM_ZERO 1
+/* Round to infinity+ */
+#define OR1K_SPR_SYS_FPCSR_RM_INFPLUS 2
+/* Round to infinity- */
+#define OR1K_SPR_SYS_FPCSR_RM_INFMINUS 3
+/* Overflow Flag */
+#define OR1K_SPR_SYS_FPCSR_OVF_OFFSET 3
+#define OR1K_SPR_SYS_FPCSR_OVF_MASK 0x00000008
+#define OR1K_SPR_SYS_FPCSR_OVF_GET(X) (((X) >> 3) & 0x1)
+#define OR1K_SPR_SYS_FPCSR_OVF_SET(X, Y) (((X) & OR1K_UNSIGNED(0xfffffff7)) | ((!!(Y)) << 3))
+
+/* Underflow Flag */
+#define OR1K_SPR_SYS_FPCSR_UNF_OFFSET 4
+#define OR1K_SPR_SYS_FPCSR_UNF_MASK 0x00000010
+#define OR1K_SPR_SYS_FPCSR_UNF_GET(X) (((X) >> 4) & 0x1)
+#define OR1K_SPR_SYS_FPCSR_UNF_SET(X, Y) (((X) & OR1K_UNSIGNED(0xffffffef)) | ((!!(Y)) << 4))
+
+/* SNAN Flag */
+#define OR1K_SPR_SYS_FPCSR_SNF_OFFSET 5
+#define OR1K_SPR_SYS_FPCSR_SNF_MASK 0x00000020
+#define OR1K_SPR_SYS_FPCSR_SNF_GET(X) (((X) >> 5) & 0x1)
+#define OR1K_SPR_SYS_FPCSR_SNF_SET(X, Y) (((X) & OR1K_UNSIGNED(0xffffffdf)) | ((!!(Y)) << 5))
+
+/* QNAN Flag */
+#define OR1K_SPR_SYS_FPCSR_QNF_OFFSET 6
+#define OR1K_SPR_SYS_FPCSR_QNF_MASK 0x00000040
+#define OR1K_SPR_SYS_FPCSR_QNF_GET(X) (((X) >> 6) & 0x1)
+#define OR1K_SPR_SYS_FPCSR_QNF_SET(X, Y) (((X) & OR1K_UNSIGNED(0xffffffbf)) | ((!!(Y)) << 6))
+
+/* Zero Flag */
+#define OR1K_SPR_SYS_FPCSR_ZF_OFFSET 7
+#define OR1K_SPR_SYS_FPCSR_ZF_MASK 0x00000080
+#define OR1K_SPR_SYS_FPCSR_ZF_GET(X) (((X) >> 7) & 0x1)
+#define OR1K_SPR_SYS_FPCSR_ZF_SET(X, Y) (((X) & OR1K_UNSIGNED(0xffffff7f)) | ((!!(Y)) << 7))
+
+/* Inexact Flag */
+#define OR1K_SPR_SYS_FPCSR_IXF_OFFSET 8
+#define OR1K_SPR_SYS_FPCSR_IXF_MASK 0x00000100
+#define OR1K_SPR_SYS_FPCSR_IXF_GET(X) (((X) >> 8) & 0x1)
+#define OR1K_SPR_SYS_FPCSR_IXF_SET(X, Y) (((X) & OR1K_UNSIGNED(0xfffffeff)) | ((!!(Y)) << 8))
+
+/* Invalid Flag */
+#define OR1K_SPR_SYS_FPCSR_IVF_OFFSET 9
+#define OR1K_SPR_SYS_FPCSR_IVF_MASK 0x00000200
+#define OR1K_SPR_SYS_FPCSR_IVF_GET(X) (((X) >> 9) & 0x1)
+#define OR1K_SPR_SYS_FPCSR_IVF_SET(X, Y) (((X) & OR1K_UNSIGNED(0xfffffdff)) | ((!!(Y)) << 9))
+
+/* Infinity Flag */
+#define OR1K_SPR_SYS_FPCSR_INF_OFFSET 10
+#define OR1K_SPR_SYS_FPCSR_INF_MASK 0x00000400
+#define OR1K_SPR_SYS_FPCSR_INF_GET(X) (((X) >> 10) & 0x1)
+#define OR1K_SPR_SYS_FPCSR_INF_SET(X, Y) (((X) & OR1K_UNSIGNED(0xfffffbff)) | ((!!(Y)) << 10))
+
+/* Divide by Zero Flag */
+#define OR1K_SPR_SYS_FPCSR_DZF_OFFSET 11
+#define OR1K_SPR_SYS_FPCSR_DZF_MASK 0x00000800
+#define OR1K_SPR_SYS_FPCSR_DZF_GET(X) (((X) >> 11) & 0x1)
+#define OR1K_SPR_SYS_FPCSR_DZF_SET(X, Y) (((X) & OR1K_UNSIGNED(0xfffff7ff)) | ((!!(Y)) << 11))
+
+
+/* Implementation-specific Registers */
+#define OR1K_SPR_SYS_ISR_BASE OR1K_UNSIGNED(0x015)
+#define OR1K_SPR_SYS_ISR_COUNT OR1K_UNSIGNED(0x008)
+#define OR1K_SPR_SYS_ISR_STEP OR1K_UNSIGNED(0x001)
+#define OR1K_SPR_SYS_ISR_INDEX(N) (OR1K_SPR_SYS_ISR_BASE + ((N) * OR1K_SPR_SYS_ISR_STEP))
+#define OR1K_SPR_SYS_ISR_ADDR(N) ((OR1K_SPR_SYS_GROUP << OR1K_SPR_GROUP_LSB) | OR1K_SPR_SYS_ISR_INDEX(N))
+
+
+/* Exception PC Registers */
+#define OR1K_SPR_SYS_EPCR_BASE OR1K_UNSIGNED(0x020)
+#define OR1K_SPR_SYS_EPCR_COUNT OR1K_UNSIGNED(0x010)
+#define OR1K_SPR_SYS_EPCR_STEP OR1K_UNSIGNED(0x001)
+#define OR1K_SPR_SYS_EPCR_INDEX(N) (OR1K_SPR_SYS_EPCR_BASE + ((N) * OR1K_SPR_SYS_EPCR_STEP))
+#define OR1K_SPR_SYS_EPCR_ADDR(N) ((OR1K_SPR_SYS_GROUP << OR1K_SPR_GROUP_LSB) | OR1K_SPR_SYS_EPCR_INDEX(N))
+
+
+/* Exception Effective Address Registers */
+#define OR1K_SPR_SYS_EEAR_BASE OR1K_UNSIGNED(0x030)
+#define OR1K_SPR_SYS_EEAR_COUNT OR1K_UNSIGNED(0x010)
+#define OR1K_SPR_SYS_EEAR_STEP OR1K_UNSIGNED(0x001)
+#define OR1K_SPR_SYS_EEAR_INDEX(N) (OR1K_SPR_SYS_EEAR_BASE + ((N) * OR1K_SPR_SYS_EEAR_STEP))
+#define OR1K_SPR_SYS_EEAR_ADDR(N) ((OR1K_SPR_SYS_GROUP << OR1K_SPR_GROUP_LSB) | OR1K_SPR_SYS_EEAR_INDEX(N))
+
+
+/* Exception Supervision Registers */
+#define OR1K_SPR_SYS_ESR_BASE OR1K_UNSIGNED(0x040)
+#define OR1K_SPR_SYS_ESR_COUNT OR1K_UNSIGNED(0x010)
+#define OR1K_SPR_SYS_ESR_STEP OR1K_UNSIGNED(0x001)
+#define OR1K_SPR_SYS_ESR_INDEX(N) (OR1K_SPR_SYS_ESR_BASE + ((N) * OR1K_SPR_SYS_ESR_STEP))
+#define OR1K_SPR_SYS_ESR_ADDR(N) ((OR1K_SPR_SYS_GROUP << OR1K_SPR_GROUP_LSB) | OR1K_SPR_SYS_ESR_INDEX(N))
+
+/* Supervisor Mode */
+#define OR1K_SPR_SYS_ESR_SM_OFFSET 0
+#define OR1K_SPR_SYS_ESR_SM_MASK 0x00000001
+#define OR1K_SPR_SYS_ESR_SM_GET(X) (((X) >> 0) & 0x1)
+#define OR1K_SPR_SYS_ESR_SM_SET(X, Y) (((X) & OR1K_UNSIGNED(0xfffffffe)) | ((!!(Y)) << 0))
+
+/* Tick Timer Exception Enabled */
+#define OR1K_SPR_SYS_ESR_TEE_OFFSET 1
+#define OR1K_SPR_SYS_ESR_TEE_MASK 0x00000002
+#define OR1K_SPR_SYS_ESR_TEE_GET(X) (((X) >> 1) & 0x1)
+#define OR1K_SPR_SYS_ESR_TEE_SET(X, Y) (((X) & OR1K_UNSIGNED(0xfffffffd)) | ((!!(Y)) << 1))
+
+/* Interrupt Exception Enabled */
+#define OR1K_SPR_SYS_ESR_IEE_OFFSET 2
+#define OR1K_SPR_SYS_ESR_IEE_MASK 0x00000004
+#define OR1K_SPR_SYS_ESR_IEE_GET(X) (((X) >> 2) & 0x1)
+#define OR1K_SPR_SYS_ESR_IEE_SET(X, Y) (((X) & OR1K_UNSIGNED(0xfffffffb)) | ((!!(Y)) << 2))
+
+/* Data Cache Enabled */
+#define OR1K_SPR_SYS_ESR_DCE_OFFSET 3
+#define OR1K_SPR_SYS_ESR_DCE_MASK 0x00000008
+#define OR1K_SPR_SYS_ESR_DCE_GET(X) (((X) >> 3) & 0x1)
+#define OR1K_SPR_SYS_ESR_DCE_SET(X, Y) (((X) & OR1K_UNSIGNED(0xfffffff7)) | ((!!(Y)) << 3))
+
+/* Instruction Cache Enabled */
+#define OR1K_SPR_SYS_ESR_ICE_OFFSET 4
+#define OR1K_SPR_SYS_ESR_ICE_MASK 0x00000010
+#define OR1K_SPR_SYS_ESR_ICE_GET(X) (((X) >> 4) & 0x1)
+#define OR1K_SPR_SYS_ESR_ICE_SET(X, Y) (((X) & OR1K_UNSIGNED(0xffffffef)) | ((!!(Y)) << 4))
+
+/* Data MMU Enabled */
+#define OR1K_SPR_SYS_ESR_DME_OFFSET 5
+#define OR1K_SPR_SYS_ESR_DME_MASK 0x00000020
+#define OR1K_SPR_SYS_ESR_DME_GET(X) (((X) >> 5) & 0x1)
+#define OR1K_SPR_SYS_ESR_DME_SET(X, Y) (((X) & OR1K_UNSIGNED(0xffffffdf)) | ((!!(Y)) << 5))
+
+/* Instruction MMU Enabled */
+#define OR1K_SPR_SYS_ESR_IME_OFFSET 6
+#define OR1K_SPR_SYS_ESR_IME_MASK 0x00000040
+#define OR1K_SPR_SYS_ESR_IME_GET(X) (((X) >> 6) & 0x1)
+#define OR1K_SPR_SYS_ESR_IME_SET(X, Y) (((X) & OR1K_UNSIGNED(0xffffffbf)) | ((!!(Y)) << 6))
+
+/* Little Endian Enabled */
+#define OR1K_SPR_SYS_ESR_LEE_OFFSET 7
+#define OR1K_SPR_SYS_ESR_LEE_MASK 0x00000080
+#define OR1K_SPR_SYS_ESR_LEE_GET(X) (((X) >> 7) & 0x1)
+#define OR1K_SPR_SYS_ESR_LEE_SET(X, Y) (((X) & OR1K_UNSIGNED(0xffffff7f)) | ((!!(Y)) << 7))
+
+/* CID Enable */
+#define OR1K_SPR_SYS_ESR_CE_OFFSET 8
+#define OR1K_SPR_SYS_ESR_CE_MASK 0x00000100
+#define OR1K_SPR_SYS_ESR_CE_GET(X) (((X) >> 8) & 0x1)
+#define OR1K_SPR_SYS_ESR_CE_SET(X, Y) (((X) & OR1K_UNSIGNED(0xfffffeff)) | ((!!(Y)) << 8))
+
+/* Flag */
+#define OR1K_SPR_SYS_ESR_F_OFFSET 9
+#define OR1K_SPR_SYS_ESR_F_MASK 0x00000200
+#define OR1K_SPR_SYS_ESR_F_GET(X) (((X) >> 9) & 0x1)
+#define OR1K_SPR_SYS_ESR_F_SET(X, Y) (((X) & OR1K_UNSIGNED(0xfffffdff)) | ((!!(Y)) << 9))
+
+/* Carry */
+#define OR1K_SPR_SYS_ESR_CY_OFFSET 10
+#define OR1K_SPR_SYS_ESR_CY_MASK 0x00000400
+#define OR1K_SPR_SYS_ESR_CY_GET(X) (((X) >> 10) & 0x1)
+#define OR1K_SPR_SYS_ESR_CY_SET(X, Y) (((X) & OR1K_UNSIGNED(0xfffffbff)) | ((!!(Y)) << 10))
+
+/* Overflow */
+#define OR1K_SPR_SYS_ESR_OV_OFFSET 11
+#define OR1K_SPR_SYS_ESR_OV_MASK 0x00000800
+#define OR1K_SPR_SYS_ESR_OV_GET(X) (((X) >> 11) & 0x1)
+#define OR1K_SPR_SYS_ESR_OV_SET(X, Y) (((X) & OR1K_UNSIGNED(0xfffff7ff)) | ((!!(Y)) << 11))
+
+/* Overflow Exception Enabled */
+#define OR1K_SPR_SYS_ESR_OVE_OFFSET 12
+#define OR1K_SPR_SYS_ESR_OVE_MASK 0x00001000
+#define OR1K_SPR_SYS_ESR_OVE_GET(X) (((X) >> 12) & 0x1)
+#define OR1K_SPR_SYS_ESR_OVE_SET(X, Y) (((X) & OR1K_UNSIGNED(0xffffefff)) | ((!!(Y)) << 12))
+
+/* Delay-slot Exception */
+#define OR1K_SPR_SYS_ESR_DSX_OFFSET 13
+#define OR1K_SPR_SYS_ESR_DSX_MASK 0x00002000
+#define OR1K_SPR_SYS_ESR_DSX_GET(X) (((X) >> 13) & 0x1)
+#define OR1K_SPR_SYS_ESR_DSX_SET(X, Y) (((X) & OR1K_UNSIGNED(0xffffdfff)) | ((!!(Y)) << 13))
+
+/* Exception Prefix High */
+#define OR1K_SPR_SYS_ESR_EPH_OFFSET 14
+#define OR1K_SPR_SYS_ESR_EPH_MASK 0x00004000
+#define OR1K_SPR_SYS_ESR_EPH_GET(X) (((X) >> 14) & 0x1)
+#define OR1K_SPR_SYS_ESR_EPH_SET(X, Y) (((X) & OR1K_UNSIGNED(0xffffbfff)) | ((!!(Y)) << 14))
+
+/* Fixed One */
+#define OR1K_SPR_SYS_ESR_FO_OFFSET 15
+#define OR1K_SPR_SYS_ESR_FO_MASK 0x00008000
+#define OR1K_SPR_SYS_ESR_FO_GET(X) (((X) >> 15) & 0x1)
+#define OR1K_SPR_SYS_ESR_FO_SET(X, Y) (((X) & OR1K_UNSIGNED(0xffff7fff)) | ((!!(Y)) << 15))
+
+/* SPR User Mode Read Access */
+#define OR1K_SPR_SYS_ESR_SUMRA_OFFSET 16
+#define OR1K_SPR_SYS_ESR_SUMRA_MASK 0x00010000
+#define OR1K_SPR_SYS_ESR_SUMRA_GET(X) (((X) >> 16) & 0x1)
+#define OR1K_SPR_SYS_ESR_SUMRA_SET(X, Y) (((X) & OR1K_UNSIGNED(0xfffeffff)) | ((!!(Y)) << 16))
+
+/* Context ID */
+#define OR1K_SPR_SYS_ESR_CID_LSB 28
+#define OR1K_SPR_SYS_ESR_CID_MSB 31
+#define OR1K_SPR_SYS_ESR_CID_BITS 4
+#define OR1K_SPR_SYS_ESR_CID_MASK OR1K_UNSIGNED(0xf0000000)
+#define OR1K_SPR_SYS_ESR_CID_GET(X) (((X) >> 28) & OR1K_UNSIGNED(0x0000000f))
+#define OR1K_SPR_SYS_ESR_CID_SET(X, Y) (((X) & OR1K_UNSIGNED(0x0fffffff)) | ((Y) << 28))
+
+
+/* Core identifier (multicore) */
+#define OR1K_SPR_SYS_COREID_INDEX OR1K_UNSIGNED(0x080)
+#define OR1K_SPR_SYS_COREID_ADDR OR1K_UNSIGNED(0x0080)
+
+
+/* Number of cores (multicore) */
+#define OR1K_SPR_SYS_NUMCORES_INDEX OR1K_UNSIGNED(0x081)
+#define OR1K_SPR_SYS_NUMCORES_ADDR OR1K_UNSIGNED(0x0081)
+
+
+/* General Purpose Registers */
+#define OR1K_SPR_SYS_GPR_BASE OR1K_UNSIGNED(0x400)
+#define OR1K_SPR_SYS_GPR_COUNT OR1K_UNSIGNED(0x100)
+#define OR1K_SPR_SYS_GPR_STEP OR1K_UNSIGNED(0x001)
+#define OR1K_SPR_SYS_GPR_INDEX(N) (OR1K_SPR_SYS_GPR_BASE + ((N) * OR1K_SPR_SYS_GPR_STEP))
+#define OR1K_SPR_SYS_GPR_ADDR(N) ((OR1K_SPR_SYS_GROUP << OR1K_SPR_GROUP_LSB) | OR1K_SPR_SYS_GPR_INDEX(N))
+
+
+/******************/
+/* Data MMU Group */
+/******************/
+#define OR1K_SPR_DMMU_GROUP 0x01
+
+/* Instruction MMU Control Register */
+#define OR1K_SPR_DMMU_DMMUCR_INDEX OR1K_UNSIGNED(0x000)
+#define OR1K_SPR_DMMU_DMMUCR_ADDR OR1K_UNSIGNED(0x0800)
+
+/* DTLB Flush */
+#define OR1K_SPR_DMMU_DMMUCR_DTF_OFFSET 0
+#define OR1K_SPR_DMMU_DMMUCR_DTF_MASK 0x00000001
+#define OR1K_SPR_DMMU_DMMUCR_DTF_GET(X) (((X) >> 0) & 0x1)
+#define OR1K_SPR_DMMU_DMMUCR_DTF_SET(X, Y) (((X) & OR1K_UNSIGNED(0xfffffffe)) | ((!!(Y)) << 0))
+
+/* Page Table Base Pointer */
+#define OR1K_SPR_DMMU_DMMUCR_PTBP_LSB 10
+#define OR1K_SPR_DMMU_DMMUCR_PTBP_MSB 31
+#define OR1K_SPR_DMMU_DMMUCR_PTBP_BITS 22
+#define OR1K_SPR_DMMU_DMMUCR_PTBP_MASK OR1K_UNSIGNED(0xfffffc00)
+#define OR1K_SPR_DMMU_DMMUCR_PTBP_GET(X) (((X) >> 10) & OR1K_UNSIGNED(0x003fffff))
+#define OR1K_SPR_DMMU_DMMUCR_PTBP_SET(X, Y) (((X) & OR1K_UNSIGNED(0x000003ff)) | ((Y) << 10))
+
+
+/* Data MMU Protection Register */
+#define OR1K_SPR_DMMU_DMMUPR_INDEX OR1K_UNSIGNED(0x001)
+#define OR1K_SPR_DMMU_DMMUPR_ADDR OR1K_UNSIGNED(0x0801)
+
+/* Supervisor Read Enable 1 */
+#define OR1K_SPR_DMMU_DMMUPR_SRE1_OFFSET 0
+#define OR1K_SPR_DMMU_DMMUPR_SRE1_MASK 0x00000001
+#define OR1K_SPR_DMMU_DMMUPR_SRE1_GET(X) (((X) >> 0) & 0x1)
+#define OR1K_SPR_DMMU_DMMUPR_SRE1_SET(X, Y) (((X) & OR1K_UNSIGNED(0xfffffffe)) | ((!!(Y)) << 0))
+
+/* Supervisor Write Enable 1 */
+#define OR1K_SPR_DMMU_DMMUPR_SWE1_OFFSET 1
+#define OR1K_SPR_DMMU_DMMUPR_SWE1_MASK 0x00000002
+#define OR1K_SPR_DMMU_DMMUPR_SWE1_GET(X) (((X) >> 1) & 0x1)
+#define OR1K_SPR_DMMU_DMMUPR_SWE1_SET(X, Y) (((X) & OR1K_UNSIGNED(0xfffffffd)) | ((!!(Y)) << 1))
+
+/* User Read Enable 1 */
+#define OR1K_SPR_DMMU_DMMUPR_URE1_OFFSET 2
+#define OR1K_SPR_DMMU_DMMUPR_URE1_MASK 0x00000004
+#define OR1K_SPR_DMMU_DMMUPR_URE1_GET(X) (((X) >> 2) & 0x1)
+#define OR1K_SPR_DMMU_DMMUPR_URE1_SET(X, Y) (((X) & OR1K_UNSIGNED(0xfffffffb)) | ((!!(Y)) << 2))
+
+/* User Write Enable 1 */
+#define OR1K_SPR_DMMU_DMMUPR_UWE1_OFFSET 3
+#define OR1K_SPR_DMMU_DMMUPR_UWE1_MASK 0x00000008
+#define OR1K_SPR_DMMU_DMMUPR_UWE1_GET(X) (((X) >> 3) & 0x1)
+#define OR1K_SPR_DMMU_DMMUPR_UWE1_SET(X, Y) (((X) & OR1K_UNSIGNED(0xfffffff7)) | ((!!(Y)) << 3))
+
+/* Supervisor Read Enable 2 */
+#define OR1K_SPR_DMMU_DMMUPR_SRE2_OFFSET 4
+#define OR1K_SPR_DMMU_DMMUPR_SRE2_MASK 0x00000010
+#define OR1K_SPR_DMMU_DMMUPR_SRE2_GET(X) (((X) >> 4) & 0x1)
+#define OR1K_SPR_DMMU_DMMUPR_SRE2_SET(X, Y) (((X) & OR1K_UNSIGNED(0xffffffef)) | ((!!(Y)) << 4))
+
+/* Supervisor Write Enable 2 */
+#define OR1K_SPR_DMMU_DMMUPR_SWE2_OFFSET 5
+#define OR1K_SPR_DMMU_DMMUPR_SWE2_MASK 0x00000020
+#define OR1K_SPR_DMMU_DMMUPR_SWE2_GET(X) (((X) >> 5) & 0x1)
+#define OR1K_SPR_DMMU_DMMUPR_SWE2_SET(X, Y) (((X) & OR1K_UNSIGNED(0xffffffdf)) | ((!!(Y)) << 5))
+
+/* User Read Enable 2 */
+#define OR1K_SPR_DMMU_DMMUPR_URE2_OFFSET 6
+#define OR1K_SPR_DMMU_DMMUPR_URE2_MASK 0x00000040
+#define OR1K_SPR_DMMU_DMMUPR_URE2_GET(X) (((X) >> 6) & 0x1)
+#define OR1K_SPR_DMMU_DMMUPR_URE2_SET(X, Y) (((X) & OR1K_UNSIGNED(0xffffffbf)) | ((!!(Y)) << 6))
+
+/* User Write Enable 2 */
+#define OR1K_SPR_DMMU_DMMUPR_UWE2_OFFSET 7
+#define OR1K_SPR_DMMU_DMMUPR_UWE2_MASK 0x00000080
+#define OR1K_SPR_DMMU_DMMUPR_UWE2_GET(X) (((X) >> 7) & 0x1)
+#define OR1K_SPR_DMMU_DMMUPR_UWE2_SET(X, Y) (((X) & OR1K_UNSIGNED(0xffffff7f)) | ((!!(Y)) << 7))
+
+/* Supervisor Read Enable 3 */
+#define OR1K_SPR_DMMU_DMMUPR_SRE3_OFFSET 8
+#define OR1K_SPR_DMMU_DMMUPR_SRE3_MASK 0x00000100
+#define OR1K_SPR_DMMU_DMMUPR_SRE3_GET(X) (((X) >> 8) & 0x1)
+#define OR1K_SPR_DMMU_DMMUPR_SRE3_SET(X, Y) (((X) & OR1K_UNSIGNED(0xfffffeff)) | ((!!(Y)) << 8))
+
+/* Supervisor Write Enable 3 */
+#define OR1K_SPR_DMMU_DMMUPR_SWE3_OFFSET 9
+#define OR1K_SPR_DMMU_DMMUPR_SWE3_MASK 0x00000200
+#define OR1K_SPR_DMMU_DMMUPR_SWE3_GET(X) (((X) >> 9) & 0x1)
+#define OR1K_SPR_DMMU_DMMUPR_SWE3_SET(X, Y) (((X) & OR1K_UNSIGNED(0xfffffdff)) | ((!!(Y)) << 9))
+
+/* User Read Enable 3 */
+#define OR1K_SPR_DMMU_DMMUPR_URE3_OFFSET 10
+#define OR1K_SPR_DMMU_DMMUPR_URE3_MASK 0x00000400
+#define OR1K_SPR_DMMU_DMMUPR_URE3_GET(X) (((X) >> 10) & 0x1)
+#define OR1K_SPR_DMMU_DMMUPR_URE3_SET(X, Y) (((X) & OR1K_UNSIGNED(0xfffffbff)) | ((!!(Y)) << 10))
+
+/* User Write Enable 3 */
+#define OR1K_SPR_DMMU_DMMUPR_UWE3_OFFSET 11
+#define OR1K_SPR_DMMU_DMMUPR_UWE3_MASK 0x00000800
+#define OR1K_SPR_DMMU_DMMUPR_UWE3_GET(X) (((X) >> 11) & 0x1)
+#define OR1K_SPR_DMMU_DMMUPR_UWE3_SET(X, Y) (((X) & OR1K_UNSIGNED(0xfffff7ff)) | ((!!(Y)) << 11))
+
+/* Supervisor Read Enable 4 */
+#define OR1K_SPR_DMMU_DMMUPR_SRE4_OFFSET 12
+#define OR1K_SPR_DMMU_DMMUPR_SRE4_MASK 0x00001000
+#define OR1K_SPR_DMMU_DMMUPR_SRE4_GET(X) (((X) >> 12) & 0x1)
+#define OR1K_SPR_DMMU_DMMUPR_SRE4_SET(X, Y) (((X) & OR1K_UNSIGNED(0xffffefff)) | ((!!(Y)) << 12))
+
+/* Supervisor Write Enable 4 */
+#define OR1K_SPR_DMMU_DMMUPR_SWE4_OFFSET 13
+#define OR1K_SPR_DMMU_DMMUPR_SWE4_MASK 0x00002000
+#define OR1K_SPR_DMMU_DMMUPR_SWE4_GET(X) (((X) >> 13) & 0x1)
+#define OR1K_SPR_DMMU_DMMUPR_SWE4_SET(X, Y) (((X) & OR1K_UNSIGNED(0xffffdfff)) | ((!!(Y)) << 13))
+
+/* User Read Enable 4 */
+#define OR1K_SPR_DMMU_DMMUPR_URE4_OFFSET 14
+#define OR1K_SPR_DMMU_DMMUPR_URE4_MASK 0x00004000
+#define OR1K_SPR_DMMU_DMMUPR_URE4_GET(X) (((X) >> 14) & 0x1)
+#define OR1K_SPR_DMMU_DMMUPR_URE4_SET(X, Y) (((X) & OR1K_UNSIGNED(0xffffbfff)) | ((!!(Y)) << 14))
+
+/* User Write Enable 4 */
+#define OR1K_SPR_DMMU_DMMUPR_UWE4_OFFSET 15
+#define OR1K_SPR_DMMU_DMMUPR_UWE4_MASK 0x00008000
+#define OR1K_SPR_DMMU_DMMUPR_UWE4_GET(X) (((X) >> 15) & 0x1)
+#define OR1K_SPR_DMMU_DMMUPR_UWE4_SET(X, Y) (((X) & OR1K_UNSIGNED(0xffff7fff)) | ((!!(Y)) << 15))
+
+/* Supervisor Read Enable 5 */
+#define OR1K_SPR_DMMU_DMMUPR_SRE5_OFFSET 16
+#define OR1K_SPR_DMMU_DMMUPR_SRE5_MASK 0x00010000
+#define OR1K_SPR_DMMU_DMMUPR_SRE5_GET(X) (((X) >> 16) & 0x1)
+#define OR1K_SPR_DMMU_DMMUPR_SRE5_SET(X, Y) (((X) & OR1K_UNSIGNED(0xfffeffff)) | ((!!(Y)) << 16))
+
+/* Supervisor Write Enable 5 */
+#define OR1K_SPR_DMMU_DMMUPR_SWE5_OFFSET 17
+#define OR1K_SPR_DMMU_DMMUPR_SWE5_MASK 0x00020000
+#define OR1K_SPR_DMMU_DMMUPR_SWE5_GET(X) (((X) >> 17) & 0x1)
+#define OR1K_SPR_DMMU_DMMUPR_SWE5_SET(X, Y) (((X) & OR1K_UNSIGNED(0xfffdffff)) | ((!!(Y)) << 17))
+
+/* User Read Enable 5 */
+#define OR1K_SPR_DMMU_DMMUPR_URE5_OFFSET 18
+#define OR1K_SPR_DMMU_DMMUPR_URE5_MASK 0x00040000
+#define OR1K_SPR_DMMU_DMMUPR_URE5_GET(X) (((X) >> 18) & 0x1)
+#define OR1K_SPR_DMMU_DMMUPR_URE5_SET(X, Y) (((X) & OR1K_UNSIGNED(0xfffbffff)) | ((!!(Y)) << 18))
+
+/* User Write Enable 5 */
+#define OR1K_SPR_DMMU_DMMUPR_UWE5_OFFSET 19
+#define OR1K_SPR_DMMU_DMMUPR_UWE5_MASK 0x00080000
+#define OR1K_SPR_DMMU_DMMUPR_UWE5_GET(X) (((X) >> 19) & 0x1)
+#define OR1K_SPR_DMMU_DMMUPR_UWE5_SET(X, Y) (((X) & OR1K_UNSIGNED(0xfff7ffff)) | ((!!(Y)) << 19))
+
+/* Supervisor Read Enable 6 */
+#define OR1K_SPR_DMMU_DMMUPR_SRE6_OFFSET 20
+#define OR1K_SPR_DMMU_DMMUPR_SRE6_MASK 0x00100000
+#define OR1K_SPR_DMMU_DMMUPR_SRE6_GET(X) (((X) >> 20) & 0x1)
+#define OR1K_SPR_DMMU_DMMUPR_SRE6_SET(X, Y) (((X) & OR1K_UNSIGNED(0xffefffff)) | ((!!(Y)) << 20))
+
+/* Supervisor Write Enable 6 */
+#define OR1K_SPR_DMMU_DMMUPR_SWE6_OFFSET 21
+#define OR1K_SPR_DMMU_DMMUPR_SWE6_MASK 0x00200000
+#define OR1K_SPR_DMMU_DMMUPR_SWE6_GET(X) (((X) >> 21) & 0x1)
+#define OR1K_SPR_DMMU_DMMUPR_SWE6_SET(X, Y) (((X) & OR1K_UNSIGNED(0xffdfffff)) | ((!!(Y)) << 21))
+
+/* User Read Enable 6 */
+#define OR1K_SPR_DMMU_DMMUPR_URE6_OFFSET 22
+#define OR1K_SPR_DMMU_DMMUPR_URE6_MASK 0x00400000
+#define OR1K_SPR_DMMU_DMMUPR_URE6_GET(X) (((X) >> 22) & 0x1)
+#define OR1K_SPR_DMMU_DMMUPR_URE6_SET(X, Y) (((X) & OR1K_UNSIGNED(0xffbfffff)) | ((!!(Y)) << 22))
+
+/* User Write Enable 6 */
+#define OR1K_SPR_DMMU_DMMUPR_UWE6_OFFSET 23
+#define OR1K_SPR_DMMU_DMMUPR_UWE6_MASK 0x00800000
+#define OR1K_SPR_DMMU_DMMUPR_UWE6_GET(X) (((X) >> 23) & 0x1)
+#define OR1K_SPR_DMMU_DMMUPR_UWE6_SET(X, Y) (((X) & OR1K_UNSIGNED(0xff7fffff)) | ((!!(Y)) << 23))
+
+/* Supervisor Read Enable 7 */
+#define OR1K_SPR_DMMU_DMMUPR_SRE7_OFFSET 24
+#define OR1K_SPR_DMMU_DMMUPR_SRE7_MASK 0x01000000
+#define OR1K_SPR_DMMU_DMMUPR_SRE7_GET(X) (((X) >> 24) & 0x1)
+#define OR1K_SPR_DMMU_DMMUPR_SRE7_SET(X, Y) (((X) & OR1K_UNSIGNED(0xfeffffff)) | ((!!(Y)) << 24))
+
+/* Supervisor Write Enable 7 */
+#define OR1K_SPR_DMMU_DMMUPR_SWE7_OFFSET 25
+#define OR1K_SPR_DMMU_DMMUPR_SWE7_MASK 0x02000000
+#define OR1K_SPR_DMMU_DMMUPR_SWE7_GET(X) (((X) >> 25) & 0x1)
+#define OR1K_SPR_DMMU_DMMUPR_SWE7_SET(X, Y) (((X) & OR1K_UNSIGNED(0xfdffffff)) | ((!!(Y)) << 25))
+
+/* User Read Enable 7 */
+#define OR1K_SPR_DMMU_DMMUPR_URE7_OFFSET 26
+#define OR1K_SPR_DMMU_DMMUPR_URE7_MASK 0x04000000
+#define OR1K_SPR_DMMU_DMMUPR_URE7_GET(X) (((X) >> 26) & 0x1)
+#define OR1K_SPR_DMMU_DMMUPR_URE7_SET(X, Y) (((X) & OR1K_UNSIGNED(0xfbffffff)) | ((!!(Y)) << 26))
+
+/* User Write Enable 7 */
+#define OR1K_SPR_DMMU_DMMUPR_UWE7_OFFSET 27
+#define OR1K_SPR_DMMU_DMMUPR_UWE7_MASK 0x08000000
+#define OR1K_SPR_DMMU_DMMUPR_UWE7_GET(X) (((X) >> 27) & 0x1)
+#define OR1K_SPR_DMMU_DMMUPR_UWE7_SET(X, Y) (((X) & OR1K_UNSIGNED(0xf7ffffff)) | ((!!(Y)) << 27))
+
+
+/* Data TLB Entry Invalidate Register */
+#define OR1K_SPR_DMMU_DTLBEIR_INDEX OR1K_UNSIGNED(0x002)
+#define OR1K_SPR_DMMU_DTLBEIR_ADDR OR1K_UNSIGNED(0x0802)
+
+
+/* Data ATB Match Registers */
+#define OR1K_SPR_DMMU_DATBMR_BASE OR1K_UNSIGNED(0x004)
+#define OR1K_SPR_DMMU_DATBMR_COUNT OR1K_UNSIGNED(0x004)
+#define OR1K_SPR_DMMU_DATBMR_STEP OR1K_UNSIGNED(0x001)
+#define OR1K_SPR_DMMU_DATBMR_INDEX(N) (OR1K_SPR_DMMU_DATBMR_BASE + ((N) * OR1K_SPR_DMMU_DATBMR_STEP))
+#define OR1K_SPR_DMMU_DATBMR_ADDR(N) ((OR1K_SPR_DMMU_GROUP << OR1K_SPR_GROUP_LSB) | OR1K_SPR_DMMU_DATBMR_INDEX(N))
+
+/* Valid */
+#define OR1K_SPR_DMMU_DATBMR_V_OFFSET 0
+#define OR1K_SPR_DMMU_DATBMR_V_MASK 0x00000001
+#define OR1K_SPR_DMMU_DATBMR_V_GET(X) (((X) >> 0) & 0x1)
+#define OR1K_SPR_DMMU_DATBMR_V_SET(X, Y) (((X) & OR1K_UNSIGNED(0xfffffffe)) | ((!!(Y)) << 0))
+
+/* Context ID */
+#define OR1K_SPR_DMMU_DATBMR_CID_LSB 1
+#define OR1K_SPR_DMMU_DATBMR_CID_MSB 4
+#define OR1K_SPR_DMMU_DATBMR_CID_BITS 4
+#define OR1K_SPR_DMMU_DATBMR_CID_MASK OR1K_UNSIGNED(0x0000001e)
+#define OR1K_SPR_DMMU_DATBMR_CID_GET(X) (((X) >> 1) & OR1K_UNSIGNED(0x0000000f))
+#define OR1K_SPR_DMMU_DATBMR_CID_SET(X, Y) (((X) & OR1K_UNSIGNED(0xffffffe1)) | ((Y) << 1))
+
+/* Page Size */
+#define OR1K_SPR_DMMU_DATBMR_PS_OFFSET 5
+#define OR1K_SPR_DMMU_DATBMR_PS_MASK 0x00000020
+#define OR1K_SPR_DMMU_DATBMR_PS_GET(X) (((X) >> 5) & 0x1)
+#define OR1K_SPR_DMMU_DATBMR_PS_SET(X, Y) (((X) & OR1K_UNSIGNED(0xffffffdf)) | ((!!(Y)) << 5))
+
+/* Virtual Page Number */
+#define OR1K_SPR_DMMU_DATBMR_VPN_LSB 10
+#define OR1K_SPR_DMMU_DATBMR_VPN_MSB 31
+#define OR1K_SPR_DMMU_DATBMR_VPN_BITS 22
+#define OR1K_SPR_DMMU_DATBMR_VPN_MASK OR1K_UNSIGNED(0xfffffc00)
+#define OR1K_SPR_DMMU_DATBMR_VPN_GET(X) (((X) >> 10) & OR1K_UNSIGNED(0x003fffff))
+#define OR1K_SPR_DMMU_DATBMR_VPN_SET(X, Y) (((X) & OR1K_UNSIGNED(0x000003ff)) | ((Y) << 10))
+
+
+/* Data ATB Translate Registers */
+#define OR1K_SPR_DMMU_DATBTR_BASE OR1K_UNSIGNED(0x008)
+#define OR1K_SPR_DMMU_DATBTR_COUNT OR1K_UNSIGNED(0x004)
+#define OR1K_SPR_DMMU_DATBTR_STEP OR1K_UNSIGNED(0x001)
+#define OR1K_SPR_DMMU_DATBTR_INDEX(N) (OR1K_SPR_DMMU_DATBTR_BASE + ((N) * OR1K_SPR_DMMU_DATBTR_STEP))
+#define OR1K_SPR_DMMU_DATBTR_ADDR(N) ((OR1K_SPR_DMMU_GROUP << OR1K_SPR_GROUP_LSB) | OR1K_SPR_DMMU_DATBTR_INDEX(N))
+
+/* Cache Coherency */
+#define OR1K_SPR_DMMU_DATBTR_CC_OFFSET 0
+#define OR1K_SPR_DMMU_DATBTR_CC_MASK 0x00000001
+#define OR1K_SPR_DMMU_DATBTR_CC_GET(X) (((X) >> 0) & 0x1)
+#define OR1K_SPR_DMMU_DATBTR_CC_SET(X, Y) (((X) & OR1K_UNSIGNED(0xfffffffe)) | ((!!(Y)) << 0))
+
+/* Cache Inhibit */
+#define OR1K_SPR_DMMU_DATBTR_CI_OFFSET 1
+#define OR1K_SPR_DMMU_DATBTR_CI_MASK 0x00000002
+#define OR1K_SPR_DMMU_DATBTR_CI_GET(X) (((X) >> 1) & 0x1)
+#define OR1K_SPR_DMMU_DATBTR_CI_SET(X, Y) (((X) & OR1K_UNSIGNED(0xfffffffd)) | ((!!(Y)) << 1))
+
+/* Write-back Cache */
+#define OR1K_SPR_DMMU_DATBTR_WBC_OFFSET 2
+#define OR1K_SPR_DMMU_DATBTR_WBC_MASK 0x00000004
+#define OR1K_SPR_DMMU_DATBTR_WBC_GET(X) (((X) >> 2) & 0x1)
+#define OR1K_SPR_DMMU_DATBTR_WBC_SET(X, Y) (((X) & OR1K_UNSIGNED(0xfffffffb)) | ((!!(Y)) << 2))
+
+/* Weakly-ordered Memory */
+#define OR1K_SPR_DMMU_DATBTR_WOM_OFFSET 3
+#define OR1K_SPR_DMMU_DATBTR_WOM_MASK 0x00000008
+#define OR1K_SPR_DMMU_DATBTR_WOM_GET(X) (((X) >> 3) & 0x1)
+#define OR1K_SPR_DMMU_DATBTR_WOM_SET(X, Y) (((X) & OR1K_UNSIGNED(0xfffffff7)) | ((!!(Y)) << 3))
+
+/* Accessed */
+#define OR1K_SPR_DMMU_DATBTR_A_OFFSET 4
+#define OR1K_SPR_DMMU_DATBTR_A_MASK 0x00000010
+#define OR1K_SPR_DMMU_DATBTR_A_GET(X) (((X) >> 4) & 0x1)
+#define OR1K_SPR_DMMU_DATBTR_A_SET(X, Y) (((X) & OR1K_UNSIGNED(0xffffffef)) | ((!!(Y)) << 4))
+
+/* Dirty */
+#define OR1K_SPR_DMMU_DATBTR_D_OFFSET 5
+#define OR1K_SPR_DMMU_DATBTR_D_MASK 0x00000020
+#define OR1K_SPR_DMMU_DATBTR_D_GET(X) (((X) >> 5) & 0x1)
+#define OR1K_SPR_DMMU_DATBTR_D_SET(X, Y) (((X) & OR1K_UNSIGNED(0xffffffdf)) | ((!!(Y)) << 5))
+
+/* Supervisor Read Enable */
+#define OR1K_SPR_DMMU_DATBTR_SRE_OFFSET 6
+#define OR1K_SPR_DMMU_DATBTR_SRE_MASK 0x00000040
+#define OR1K_SPR_DMMU_DATBTR_SRE_GET(X) (((X) >> 6) & 0x1)
+#define OR1K_SPR_DMMU_DATBTR_SRE_SET(X, Y) (((X) & OR1K_UNSIGNED(0xffffffbf)) | ((!!(Y)) << 6))
+
+/* Supervisor Write Enable */
+#define OR1K_SPR_DMMU_DATBTR_SWE_OFFSET 7
+#define OR1K_SPR_DMMU_DATBTR_SWE_MASK 0x00000080
+#define OR1K_SPR_DMMU_DATBTR_SWE_GET(X) (((X) >> 7) & 0x1)
+#define OR1K_SPR_DMMU_DATBTR_SWE_SET(X, Y) (((X) & OR1K_UNSIGNED(0xffffff7f)) | ((!!(Y)) << 7))
+
+/* User Read Enable */
+#define OR1K_SPR_DMMU_DATBTR_URE_OFFSET 8
+#define OR1K_SPR_DMMU_DATBTR_URE_MASK 0x00000100
+#define OR1K_SPR_DMMU_DATBTR_URE_GET(X) (((X) >> 8) & 0x1)
+#define OR1K_SPR_DMMU_DATBTR_URE_SET(X, Y) (((X) & OR1K_UNSIGNED(0xfffffeff)) | ((!!(Y)) << 8))
+
+/* User Write Enable */
+#define OR1K_SPR_DMMU_DATBTR_UWE_OFFSET 9
+#define OR1K_SPR_DMMU_DATBTR_UWE_MASK 0x00000200
+#define OR1K_SPR_DMMU_DATBTR_UWE_GET(X) (((X) >> 9) & 0x1)
+#define OR1K_SPR_DMMU_DATBTR_UWE_SET(X, Y) (((X) & OR1K_UNSIGNED(0xfffffdff)) | ((!!(Y)) << 9))
+
+/* Physical Page Number */
+#define OR1K_SPR_DMMU_DATBTR_PPN_LSB 10
+#define OR1K_SPR_DMMU_DATBTR_PPN_MSB 31
+#define OR1K_SPR_DMMU_DATBTR_PPN_BITS 22
+#define OR1K_SPR_DMMU_DATBTR_PPN_MASK OR1K_UNSIGNED(0xfffffc00)
+#define OR1K_SPR_DMMU_DATBTR_PPN_GET(X) (((X) >> 10) & OR1K_UNSIGNED(0x003fffff))
+#define OR1K_SPR_DMMU_DATBTR_PPN_SET(X, Y) (((X) & OR1K_UNSIGNED(0x000003ff)) | ((Y) << 10))
+
+
+/* Data TLB */
+#define OR1K_SPR_DMMU_DTLBW_BASE OR1K_UNSIGNED(0x200)
+#define OR1K_SPR_DMMU_DTLBW_COUNT OR1K_UNSIGNED(0x004)
+#define OR1K_SPR_DMMU_DTLBW_STEP OR1K_UNSIGNED(0x100)
+#define OR1K_SPR_DMMU_DTLBW_SUBBASE(N0) (OR1K_SPR_DMMU_DTLBW_BASE + ((N0)*OR1K_SPR_DMMU_DTLBW_STEP))
+
+/* Data TLB Match Registers */
+#define OR1K_SPR_DMMU_DTLBW_MR_BASE OR1K_UNSIGNED(0x000)
+#define OR1K_SPR_DMMU_DTLBW_MR_COUNT OR1K_UNSIGNED(0x080)
+#define OR1K_SPR_DMMU_DTLBW_MR_STEP OR1K_UNSIGNED(0x001)
+
+#define OR1K_SPR_DMMU_DTLBW_MR_INDEX(N0, N1) (OR1K_SPR_DMMU_DTLBW_SUBBASE(N0) + OR1K_SPR_DMMU_DTLBW_MR_BASE + ((N1) * OR1K_SPR_DMMU_DTLBW_MR_STEP))
+#define OR1K_SPR_DMMU_DTLBW_MR_ADDR(N0, N1) ((OR1K_SPR_DMMU_GROUP << OR1K_SPR_GROUP_LSB) | OR1K_SPR_DMMU_DTLBW_MR_INDEX(N0, N1))
+
+/* Valid */
+#define OR1K_SPR_DMMU_DTLBW_MR_V_OFFSET 0
+#define OR1K_SPR_DMMU_DTLBW_MR_V_MASK 0x00000001
+#define OR1K_SPR_DMMU_DTLBW_MR_V_GET(X) (((X) >> 0) & 0x1)
+#define OR1K_SPR_DMMU_DTLBW_MR_V_SET(X, Y) (((X) & OR1K_UNSIGNED(0xfffffffe)) | ((!!(Y)) << 0))
+
+/* Page Level 1 */
+#define OR1K_SPR_DMMU_DTLBW_MR_PL1_OFFSET 1
+#define OR1K_SPR_DMMU_DTLBW_MR_PL1_MASK 0x00000002
+#define OR1K_SPR_DMMU_DTLBW_MR_PL1_GET(X) (((X) >> 1) & 0x1)
+#define OR1K_SPR_DMMU_DTLBW_MR_PL1_SET(X, Y) (((X) & OR1K_UNSIGNED(0xfffffffd)) | ((!!(Y)) << 1))
+
+/* Context ID */
+#define OR1K_SPR_DMMU_DTLBW_MR_CID_LSB 2
+#define OR1K_SPR_DMMU_DTLBW_MR_CID_MSB 5
+#define OR1K_SPR_DMMU_DTLBW_MR_CID_BITS 4
+#define OR1K_SPR_DMMU_DTLBW_MR_CID_MASK OR1K_UNSIGNED(0x0000003c)
+#define OR1K_SPR_DMMU_DTLBW_MR_CID_GET(X) (((X) >> 2) & OR1K_UNSIGNED(0x0000000f))
+#define OR1K_SPR_DMMU_DTLBW_MR_CID_SET(X, Y) (((X) & OR1K_UNSIGNED(0xffffffc3)) | ((Y) << 2))
+
+/* Least Recently Used */
+#define OR1K_SPR_DMMU_DTLBW_MR_LRU_LSB 6
+#define OR1K_SPR_DMMU_DTLBW_MR_LRU_MSB 7
+#define OR1K_SPR_DMMU_DTLBW_MR_LRU_BITS 2
+#define OR1K_SPR_DMMU_DTLBW_MR_LRU_MASK OR1K_UNSIGNED(0x000000c0)
+#define OR1K_SPR_DMMU_DTLBW_MR_LRU_GET(X) (((X) >> 6) & OR1K_UNSIGNED(0x00000003))
+#define OR1K_SPR_DMMU_DTLBW_MR_LRU_SET(X, Y) (((X) & OR1K_UNSIGNED(0xffffff3f)) | ((Y) << 6))
+
+/* Virtual Page Number */
+#define OR1K_SPR_DMMU_DTLBW_MR_VPN_LSB 13
+#define OR1K_SPR_DMMU_DTLBW_MR_VPN_MSB 31
+#define OR1K_SPR_DMMU_DTLBW_MR_VPN_BITS 19
+#define OR1K_SPR_DMMU_DTLBW_MR_VPN_MASK OR1K_UNSIGNED(0xffffe000)
+#define OR1K_SPR_DMMU_DTLBW_MR_VPN_GET(X) (((X) >> 13) & OR1K_UNSIGNED(0x0007ffff))
+#define OR1K_SPR_DMMU_DTLBW_MR_VPN_SET(X, Y) (((X) & OR1K_UNSIGNED(0x00001fff)) | ((Y) << 13))
+
+/* Data TLB Translate Registers */
+#define OR1K_SPR_DMMU_DTLBW_TR_BASE OR1K_UNSIGNED(0x080)
+#define OR1K_SPR_DMMU_DTLBW_TR_COUNT OR1K_UNSIGNED(0x080)
+#define OR1K_SPR_DMMU_DTLBW_TR_STEP OR1K_UNSIGNED(0x001)
+
+#define OR1K_SPR_DMMU_DTLBW_TR_INDEX(N0, N1) (OR1K_SPR_DMMU_DTLBW_SUBBASE(N0) + OR1K_SPR_DMMU_DTLBW_TR_BASE + ((N1) * OR1K_SPR_DMMU_DTLBW_TR_STEP))
+#define OR1K_SPR_DMMU_DTLBW_TR_ADDR(N0, N1) ((OR1K_SPR_DMMU_GROUP << OR1K_SPR_GROUP_LSB) | OR1K_SPR_DMMU_DTLBW_TR_INDEX(N0, N1))
+
+/* Cache Coherency */
+#define OR1K_SPR_DMMU_DTLBW_TR_CC_OFFSET 0
+#define OR1K_SPR_DMMU_DTLBW_TR_CC_MASK 0x00000001
+#define OR1K_SPR_DMMU_DTLBW_TR_CC_GET(X) (((X) >> 0) & 0x1)
+#define OR1K_SPR_DMMU_DTLBW_TR_CC_SET(X, Y) (((X) & OR1K_UNSIGNED(0xfffffffe)) | ((!!(Y)) << 0))
+
+/* Cache Inhibit */
+#define OR1K_SPR_DMMU_DTLBW_TR_CI_OFFSET 1
+#define OR1K_SPR_DMMU_DTLBW_TR_CI_MASK 0x00000002
+#define OR1K_SPR_DMMU_DTLBW_TR_CI_GET(X) (((X) >> 1) & 0x1)
+#define OR1K_SPR_DMMU_DTLBW_TR_CI_SET(X, Y) (((X) & OR1K_UNSIGNED(0xfffffffd)) | ((!!(Y)) << 1))
+
+/* Write-back Cache */
+#define OR1K_SPR_DMMU_DTLBW_TR_WBC_OFFSET 2
+#define OR1K_SPR_DMMU_DTLBW_TR_WBC_MASK 0x00000004
+#define OR1K_SPR_DMMU_DTLBW_TR_WBC_GET(X) (((X) >> 2) & 0x1)
+#define OR1K_SPR_DMMU_DTLBW_TR_WBC_SET(X, Y) (((X) & OR1K_UNSIGNED(0xfffffffb)) | ((!!(Y)) << 2))
+
+/* Weakly-ordered Memory */
+#define OR1K_SPR_DMMU_DTLBW_TR_WOM_OFFSET 3
+#define OR1K_SPR_DMMU_DTLBW_TR_WOM_MASK 0x00000008
+#define OR1K_SPR_DMMU_DTLBW_TR_WOM_GET(X) (((X) >> 3) & 0x1)
+#define OR1K_SPR_DMMU_DTLBW_TR_WOM_SET(X, Y) (((X) & OR1K_UNSIGNED(0xfffffff7)) | ((!!(Y)) << 3))
+
+/* Accessed */
+#define OR1K_SPR_DMMU_DTLBW_TR_A_OFFSET 4
+#define OR1K_SPR_DMMU_DTLBW_TR_A_MASK 0x00000010
+#define OR1K_SPR_DMMU_DTLBW_TR_A_GET(X) (((X) >> 4) & 0x1)
+#define OR1K_SPR_DMMU_DTLBW_TR_A_SET(X, Y) (((X) & OR1K_UNSIGNED(0xffffffef)) | ((!!(Y)) << 4))
+
+/* Dirty */
+#define OR1K_SPR_DMMU_DTLBW_TR_D_OFFSET 5
+#define OR1K_SPR_DMMU_DTLBW_TR_D_MASK 0x00000020
+#define OR1K_SPR_DMMU_DTLBW_TR_D_GET(X) (((X) >> 5) & 0x1)
+#define OR1K_SPR_DMMU_DTLBW_TR_D_SET(X, Y) (((X) & OR1K_UNSIGNED(0xffffffdf)) | ((!!(Y)) << 5))
+
+/* User Read Enable */
+#define OR1K_SPR_DMMU_DTLBW_TR_URE_OFFSET 6
+#define OR1K_SPR_DMMU_DTLBW_TR_URE_MASK 0x00000040
+#define OR1K_SPR_DMMU_DTLBW_TR_URE_GET(X) (((X) >> 6) & 0x1)
+#define OR1K_SPR_DMMU_DTLBW_TR_URE_SET(X, Y) (((X) & OR1K_UNSIGNED(0xffffffbf)) | ((!!(Y)) << 6))
+
+/* User Write Enable */
+#define OR1K_SPR_DMMU_DTLBW_TR_UWE_OFFSET 7
+#define OR1K_SPR_DMMU_DTLBW_TR_UWE_MASK 0x00000080
+#define OR1K_SPR_DMMU_DTLBW_TR_UWE_GET(X) (((X) >> 7) & 0x1)
+#define OR1K_SPR_DMMU_DTLBW_TR_UWE_SET(X, Y) (((X) & OR1K_UNSIGNED(0xffffff7f)) | ((!!(Y)) << 7))
+
+/* Supervisor Read Enable */
+#define OR1K_SPR_DMMU_DTLBW_TR_SRE_OFFSET 8
+#define OR1K_SPR_DMMU_DTLBW_TR_SRE_MASK 0x00000100
+#define OR1K_SPR_DMMU_DTLBW_TR_SRE_GET(X) (((X) >> 8) & 0x1)
+#define OR1K_SPR_DMMU_DTLBW_TR_SRE_SET(X, Y) (((X) & OR1K_UNSIGNED(0xfffffeff)) | ((!!(Y)) << 8))
+
+/* Supervisor Write Enable */
+#define OR1K_SPR_DMMU_DTLBW_TR_SWE_OFFSET 9
+#define OR1K_SPR_DMMU_DTLBW_TR_SWE_MASK 0x00000200
+#define OR1K_SPR_DMMU_DTLBW_TR_SWE_GET(X) (((X) >> 9) & 0x1)
+#define OR1K_SPR_DMMU_DTLBW_TR_SWE_SET(X, Y) (((X) & OR1K_UNSIGNED(0xfffffdff)) | ((!!(Y)) << 9))
+
+/* Physical Page Number */
+#define OR1K_SPR_DMMU_DTLBW_TR_PPN_LSB 13
+#define OR1K_SPR_DMMU_DTLBW_TR_PPN_MSB 31
+#define OR1K_SPR_DMMU_DTLBW_TR_PPN_BITS 19
+#define OR1K_SPR_DMMU_DTLBW_TR_PPN_MASK OR1K_UNSIGNED(0xffffe000)
+#define OR1K_SPR_DMMU_DTLBW_TR_PPN_GET(X) (((X) >> 13) & OR1K_UNSIGNED(0x0007ffff))
+#define OR1K_SPR_DMMU_DTLBW_TR_PPN_SET(X, Y) (((X) & OR1K_UNSIGNED(0x00001fff)) | ((Y) << 13))
+
+
+/*************************/
+/* Instruction MMU Group */
+/*************************/
+#define OR1K_SPR_IMMU_GROUP 0x02
+
+/* Instruction MMU Control Register */
+#define OR1K_SPR_IMMU_IMMUCR_INDEX OR1K_UNSIGNED(0x000)
+#define OR1K_SPR_IMMU_IMMUCR_ADDR OR1K_UNSIGNED(0x1000)
+
+/* ITLB Flush */
+#define OR1K_SPR_IMMU_IMMUCR_ITF_OFFSET 0
+#define OR1K_SPR_IMMU_IMMUCR_ITF_MASK 0x00000001
+#define OR1K_SPR_IMMU_IMMUCR_ITF_GET(X) (((X) >> 0) & 0x1)
+#define OR1K_SPR_IMMU_IMMUCR_ITF_SET(X, Y) (((X) & OR1K_UNSIGNED(0xfffffffe)) | ((!!(Y)) << 0))
+
+/* Page Table Base Pointer */
+#define OR1K_SPR_IMMU_IMMUCR_PTBP_LSB 10
+#define OR1K_SPR_IMMU_IMMUCR_PTBP_MSB 31
+#define OR1K_SPR_IMMU_IMMUCR_PTBP_BITS 22
+#define OR1K_SPR_IMMU_IMMUCR_PTBP_MASK OR1K_UNSIGNED(0xfffffc00)
+#define OR1K_SPR_IMMU_IMMUCR_PTBP_GET(X) (((X) >> 10) & OR1K_UNSIGNED(0x003fffff))
+#define OR1K_SPR_IMMU_IMMUCR_PTBP_SET(X, Y) (((X) & OR1K_UNSIGNED(0x000003ff)) | ((Y) << 10))
+
+
+/* Instruction MMU Protection Register */
+#define OR1K_SPR_IMMU_IMMUPR_INDEX OR1K_UNSIGNED(0x001)
+#define OR1K_SPR_IMMU_IMMUPR_ADDR OR1K_UNSIGNED(0x1001)
+
+/* Supervisor Execute Enable 1 */
+#define OR1K_SPR_IMMU_IMMUPR_SXE1_OFFSET 0
+#define OR1K_SPR_IMMU_IMMUPR_SXE1_MASK 0x00000001
+#define OR1K_SPR_IMMU_IMMUPR_SXE1_GET(X) (((X) >> 0) & 0x1)
+#define OR1K_SPR_IMMU_IMMUPR_SXE1_SET(X, Y) (((X) & OR1K_UNSIGNED(0xfffffffe)) | ((!!(Y)) << 0))
+
+/* User Execute Enable 1 */
+#define OR1K_SPR_IMMU_IMMUPR_UXE1_OFFSET 1
+#define OR1K_SPR_IMMU_IMMUPR_UXE1_MASK 0x00000002
+#define OR1K_SPR_IMMU_IMMUPR_UXE1_GET(X) (((X) >> 1) & 0x1)
+#define OR1K_SPR_IMMU_IMMUPR_UXE1_SET(X, Y) (((X) & OR1K_UNSIGNED(0xfffffffd)) | ((!!(Y)) << 1))
+
+/* Supervisor Execute Enable 2 */
+#define OR1K_SPR_IMMU_IMMUPR_SXE2_OFFSET 2
+#define OR1K_SPR_IMMU_IMMUPR_SXE2_MASK 0x00000004
+#define OR1K_SPR_IMMU_IMMUPR_SXE2_GET(X) (((X) >> 2) & 0x1)
+#define OR1K_SPR_IMMU_IMMUPR_SXE2_SET(X, Y) (((X) & OR1K_UNSIGNED(0xfffffffb)) | ((!!(Y)) << 2))
+
+/* User Execute Enable 2 */
+#define OR1K_SPR_IMMU_IMMUPR_UXE2_OFFSET 3
+#define OR1K_SPR_IMMU_IMMUPR_UXE2_MASK 0x00000008
+#define OR1K_SPR_IMMU_IMMUPR_UXE2_GET(X) (((X) >> 3) & 0x1)
+#define OR1K_SPR_IMMU_IMMUPR_UXE2_SET(X, Y) (((X) & OR1K_UNSIGNED(0xfffffff7)) | ((!!(Y)) << 3))
+
+/* Supervisor Execute Enable 3 */
+#define OR1K_SPR_IMMU_IMMUPR_SXE3_OFFSET 4
+#define OR1K_SPR_IMMU_IMMUPR_SXE3_MASK 0x00000010
+#define OR1K_SPR_IMMU_IMMUPR_SXE3_GET(X) (((X) >> 4) & 0x1)
+#define OR1K_SPR_IMMU_IMMUPR_SXE3_SET(X, Y) (((X) & OR1K_UNSIGNED(0xffffffef)) | ((!!(Y)) << 4))
+
+/* User Execute Enable 3 */
+#define OR1K_SPR_IMMU_IMMUPR_UXE3_OFFSET 5
+#define OR1K_SPR_IMMU_IMMUPR_UXE3_MASK 0x00000020
+#define OR1K_SPR_IMMU_IMMUPR_UXE3_GET(X) (((X) >> 5) & 0x1)
+#define OR1K_SPR_IMMU_IMMUPR_UXE3_SET(X, Y) (((X) & OR1K_UNSIGNED(0xffffffdf)) | ((!!(Y)) << 5))
+
+/* Supervisor Execute Enable 4 */
+#define OR1K_SPR_IMMU_IMMUPR_SXE4_OFFSET 6
+#define OR1K_SPR_IMMU_IMMUPR_SXE4_MASK 0x00000040
+#define OR1K_SPR_IMMU_IMMUPR_SXE4_GET(X) (((X) >> 6) & 0x1)
+#define OR1K_SPR_IMMU_IMMUPR_SXE4_SET(X, Y) (((X) & OR1K_UNSIGNED(0xffffffbf)) | ((!!(Y)) << 6))
+
+/* User Execute Enable 4 */
+#define OR1K_SPR_IMMU_IMMUPR_UXE4_OFFSET 7
+#define OR1K_SPR_IMMU_IMMUPR_UXE4_MASK 0x00000080
+#define OR1K_SPR_IMMU_IMMUPR_UXE4_GET(X) (((X) >> 7) & 0x1)
+#define OR1K_SPR_IMMU_IMMUPR_UXE4_SET(X, Y) (((X) & OR1K_UNSIGNED(0xffffff7f)) | ((!!(Y)) << 7))
+
+/* Supervisor Execute Enable 5 */
+#define OR1K_SPR_IMMU_IMMUPR_SXE5_OFFSET 8
+#define OR1K_SPR_IMMU_IMMUPR_SXE5_MASK 0x00000100
+#define OR1K_SPR_IMMU_IMMUPR_SXE5_GET(X) (((X) >> 8) & 0x1)
+#define OR1K_SPR_IMMU_IMMUPR_SXE5_SET(X, Y) (((X) & OR1K_UNSIGNED(0xfffffeff)) | ((!!(Y)) << 8))
+
+/* User Execute Enable 5 */
+#define OR1K_SPR_IMMU_IMMUPR_UXE5_OFFSET 9
+#define OR1K_SPR_IMMU_IMMUPR_UXE5_MASK 0x00000200
+#define OR1K_SPR_IMMU_IMMUPR_UXE5_GET(X) (((X) >> 9) & 0x1)
+#define OR1K_SPR_IMMU_IMMUPR_UXE5_SET(X, Y) (((X) & OR1K_UNSIGNED(0xfffffdff)) | ((!!(Y)) << 9))
+
+/* Supervisor Execute Enable 6 */
+#define OR1K_SPR_IMMU_IMMUPR_SXE6_OFFSET 10
+#define OR1K_SPR_IMMU_IMMUPR_SXE6_MASK 0x00000400
+#define OR1K_SPR_IMMU_IMMUPR_SXE6_GET(X) (((X) >> 10) & 0x1)
+#define OR1K_SPR_IMMU_IMMUPR_SXE6_SET(X, Y) (((X) & OR1K_UNSIGNED(0xfffffbff)) | ((!!(Y)) << 10))
+
+/* User Execute Enable 6 */
+#define OR1K_SPR_IMMU_IMMUPR_UXE6_OFFSET 11
+#define OR1K_SPR_IMMU_IMMUPR_UXE6_MASK 0x00000800
+#define OR1K_SPR_IMMU_IMMUPR_UXE6_GET(X) (((X) >> 11) & 0x1)
+#define OR1K_SPR_IMMU_IMMUPR_UXE6_SET(X, Y) (((X) & OR1K_UNSIGNED(0xfffff7ff)) | ((!!(Y)) << 11))
+
+/* Supervisor Execute Enable 7 */
+#define OR1K_SPR_IMMU_IMMUPR_SXE7_OFFSET 12
+#define OR1K_SPR_IMMU_IMMUPR_SXE7_MASK 0x00001000
+#define OR1K_SPR_IMMU_IMMUPR_SXE7_GET(X) (((X) >> 12) & 0x1)
+#define OR1K_SPR_IMMU_IMMUPR_SXE7_SET(X, Y) (((X) & OR1K_UNSIGNED(0xffffefff)) | ((!!(Y)) << 12))
+
+/* User Execute Enable 7 */
+#define OR1K_SPR_IMMU_IMMUPR_UXE7_OFFSET 13
+#define OR1K_SPR_IMMU_IMMUPR_UXE7_MASK 0x00002000
+#define OR1K_SPR_IMMU_IMMUPR_UXE7_GET(X) (((X) >> 13) & 0x1)
+#define OR1K_SPR_IMMU_IMMUPR_UXE7_SET(X, Y) (((X) & OR1K_UNSIGNED(0xffffdfff)) | ((!!(Y)) << 13))
+
+
+/* Instruction TLB Entry Invalidate Register */
+#define OR1K_SPR_IMMU_ITLBEIR_INDEX OR1K_UNSIGNED(0x002)
+#define OR1K_SPR_IMMU_ITLBEIR_ADDR OR1K_UNSIGNED(0x1002)
+
+
+/* Instruction ATB Match Registers */
+#define OR1K_SPR_IMMU_IATBMR_BASE OR1K_UNSIGNED(0x004)
+#define OR1K_SPR_IMMU_IATBMR_COUNT OR1K_UNSIGNED(0x004)
+#define OR1K_SPR_IMMU_IATBMR_STEP OR1K_UNSIGNED(0x001)
+#define OR1K_SPR_IMMU_IATBMR_INDEX(N) (OR1K_SPR_IMMU_IATBMR_BASE + ((N) * OR1K_SPR_IMMU_IATBMR_STEP))
+#define OR1K_SPR_IMMU_IATBMR_ADDR(N) ((OR1K_SPR_IMMU_GROUP << OR1K_SPR_GROUP_LSB) | OR1K_SPR_IMMU_IATBMR_INDEX(N))
+
+/* Valid */
+#define OR1K_SPR_IMMU_IATBMR_V_OFFSET 0
+#define OR1K_SPR_IMMU_IATBMR_V_MASK 0x00000001
+#define OR1K_SPR_IMMU_IATBMR_V_GET(X) (((X) >> 0) & 0x1)
+#define OR1K_SPR_IMMU_IATBMR_V_SET(X, Y) (((X) & OR1K_UNSIGNED(0xfffffffe)) | ((!!(Y)) << 0))
+
+/* Context ID */
+#define OR1K_SPR_IMMU_IATBMR_CID_LSB 1
+#define OR1K_SPR_IMMU_IATBMR_CID_MSB 4
+#define OR1K_SPR_IMMU_IATBMR_CID_BITS 4
+#define OR1K_SPR_IMMU_IATBMR_CID_MASK OR1K_UNSIGNED(0x0000001e)
+#define OR1K_SPR_IMMU_IATBMR_CID_GET(X) (((X) >> 1) & OR1K_UNSIGNED(0x0000000f))
+#define OR1K_SPR_IMMU_IATBMR_CID_SET(X, Y) (((X) & OR1K_UNSIGNED(0xffffffe1)) | ((Y) << 1))
+
+/* Page Size */
+#define OR1K_SPR_IMMU_IATBMR_PS_OFFSET 5
+#define OR1K_SPR_IMMU_IATBMR_PS_MASK 0x00000020
+#define OR1K_SPR_IMMU_IATBMR_PS_GET(X) (((X) >> 5) & 0x1)
+#define OR1K_SPR_IMMU_IATBMR_PS_SET(X, Y) (((X) & OR1K_UNSIGNED(0xffffffdf)) | ((!!(Y)) << 5))
+
+/* Virtual Page Number */
+#define OR1K_SPR_IMMU_IATBMR_VPN_LSB 10
+#define OR1K_SPR_IMMU_IATBMR_VPN_MSB 31
+#define OR1K_SPR_IMMU_IATBMR_VPN_BITS 22
+#define OR1K_SPR_IMMU_IATBMR_VPN_MASK OR1K_UNSIGNED(0xfffffc00)
+#define OR1K_SPR_IMMU_IATBMR_VPN_GET(X) (((X) >> 10) & OR1K_UNSIGNED(0x003fffff))
+#define OR1K_SPR_IMMU_IATBMR_VPN_SET(X, Y) (((X) & OR1K_UNSIGNED(0x000003ff)) | ((Y) << 10))
+
+
+/* Instruction ATB Translate Registers */
+#define OR1K_SPR_IMMU_IATBTR_BASE OR1K_UNSIGNED(0x008)
+#define OR1K_SPR_IMMU_IATBTR_COUNT OR1K_UNSIGNED(0x004)
+#define OR1K_SPR_IMMU_IATBTR_STEP OR1K_UNSIGNED(0x001)
+#define OR1K_SPR_IMMU_IATBTR_INDEX(N) (OR1K_SPR_IMMU_IATBTR_BASE + ((N) * OR1K_SPR_IMMU_IATBTR_STEP))
+#define OR1K_SPR_IMMU_IATBTR_ADDR(N) ((OR1K_SPR_IMMU_GROUP << OR1K_SPR_GROUP_LSB) | OR1K_SPR_IMMU_IATBTR_INDEX(N))
+
+/* Cache Coherency */
+#define OR1K_SPR_IMMU_IATBTR_CC_OFFSET 0
+#define OR1K_SPR_IMMU_IATBTR_CC_MASK 0x00000001
+#define OR1K_SPR_IMMU_IATBTR_CC_GET(X) (((X) >> 0) & 0x1)
+#define OR1K_SPR_IMMU_IATBTR_CC_SET(X, Y) (((X) & OR1K_UNSIGNED(0xfffffffe)) | ((!!(Y)) << 0))
+
+/* Cache Inhibit */
+#define OR1K_SPR_IMMU_IATBTR_CI_OFFSET 1
+#define OR1K_SPR_IMMU_IATBTR_CI_MASK 0x00000002
+#define OR1K_SPR_IMMU_IATBTR_CI_GET(X) (((X) >> 1) & 0x1)
+#define OR1K_SPR_IMMU_IATBTR_CI_SET(X, Y) (((X) & OR1K_UNSIGNED(0xfffffffd)) | ((!!(Y)) << 1))
+
+/* Write-back Cache */
+#define OR1K_SPR_IMMU_IATBTR_WBC_OFFSET 2
+#define OR1K_SPR_IMMU_IATBTR_WBC_MASK 0x00000004
+#define OR1K_SPR_IMMU_IATBTR_WBC_GET(X) (((X) >> 2) & 0x1)
+#define OR1K_SPR_IMMU_IATBTR_WBC_SET(X, Y) (((X) & OR1K_UNSIGNED(0xfffffffb)) | ((!!(Y)) << 2))
+
+/* Weakly-ordered Memory */
+#define OR1K_SPR_IMMU_IATBTR_WOM_OFFSET 3
+#define OR1K_SPR_IMMU_IATBTR_WOM_MASK 0x00000008
+#define OR1K_SPR_IMMU_IATBTR_WOM_GET(X) (((X) >> 3) & 0x1)
+#define OR1K_SPR_IMMU_IATBTR_WOM_SET(X, Y) (((X) & OR1K_UNSIGNED(0xfffffff7)) | ((!!(Y)) << 3))
+
+/* Accessed */
+#define OR1K_SPR_IMMU_IATBTR_A_OFFSET 4
+#define OR1K_SPR_IMMU_IATBTR_A_MASK 0x00000010
+#define OR1K_SPR_IMMU_IATBTR_A_GET(X) (((X) >> 4) & 0x1)
+#define OR1K_SPR_IMMU_IATBTR_A_SET(X, Y) (((X) & OR1K_UNSIGNED(0xffffffef)) | ((!!(Y)) << 4))
+
+/* Dirty */
+#define OR1K_SPR_IMMU_IATBTR_D_OFFSET 5
+#define OR1K_SPR_IMMU_IATBTR_D_MASK 0x00000020
+#define OR1K_SPR_IMMU_IATBTR_D_GET(X) (((X) >> 5) & 0x1)
+#define OR1K_SPR_IMMU_IATBTR_D_SET(X, Y) (((X) & OR1K_UNSIGNED(0xffffffdf)) | ((!!(Y)) << 5))
+
+/* Supervisor Execute Enable */
+#define OR1K_SPR_IMMU_IATBTR_SRE_OFFSET 6
+#define OR1K_SPR_IMMU_IATBTR_SRE_MASK 0x00000040
+#define OR1K_SPR_IMMU_IATBTR_SRE_GET(X) (((X) >> 6) & 0x1)
+#define OR1K_SPR_IMMU_IATBTR_SRE_SET(X, Y) (((X) & OR1K_UNSIGNED(0xffffffbf)) | ((!!(Y)) << 6))
+
+/* User Execute Enable */
+#define OR1K_SPR_IMMU_IATBTR_URE_OFFSET 7
+#define OR1K_SPR_IMMU_IATBTR_URE_MASK 0x00000080
+#define OR1K_SPR_IMMU_IATBTR_URE_GET(X) (((X) >> 7) & 0x1)
+#define OR1K_SPR_IMMU_IATBTR_URE_SET(X, Y) (((X) & OR1K_UNSIGNED(0xffffff7f)) | ((!!(Y)) << 7))
+
+/* Physical Page Number */
+#define OR1K_SPR_IMMU_IATBTR_PPN_LSB 10
+#define OR1K_SPR_IMMU_IATBTR_PPN_MSB 31
+#define OR1K_SPR_IMMU_IATBTR_PPN_BITS 22
+#define OR1K_SPR_IMMU_IATBTR_PPN_MASK OR1K_UNSIGNED(0xfffffc00)
+#define OR1K_SPR_IMMU_IATBTR_PPN_GET(X) (((X) >> 10) & OR1K_UNSIGNED(0x003fffff))
+#define OR1K_SPR_IMMU_IATBTR_PPN_SET(X, Y) (((X) & OR1K_UNSIGNED(0x000003ff)) | ((Y) << 10))
+
+
+/* Instruction TLB */
+#define OR1K_SPR_IMMU_ITLBW_BASE OR1K_UNSIGNED(0x200)
+#define OR1K_SPR_IMMU_ITLBW_COUNT OR1K_UNSIGNED(0x004)
+#define OR1K_SPR_IMMU_ITLBW_STEP OR1K_UNSIGNED(0x100)
+#define OR1K_SPR_IMMU_ITLBW_SUBBASE(N0) (OR1K_SPR_IMMU_ITLBW_BASE + ((N0)*OR1K_SPR_IMMU_ITLBW_STEP))
+
+/* Instruction TLB Match Registers */
+#define OR1K_SPR_IMMU_ITLBW_MR_BASE OR1K_UNSIGNED(0x000)
+#define OR1K_SPR_IMMU_ITLBW_MR_COUNT OR1K_UNSIGNED(0x080)
+#define OR1K_SPR_IMMU_ITLBW_MR_STEP OR1K_UNSIGNED(0x001)
+
+#define OR1K_SPR_IMMU_ITLBW_MR_INDEX(N0, N1) (OR1K_SPR_IMMU_ITLBW_SUBBASE(N0) + OR1K_SPR_IMMU_ITLBW_MR_BASE + ((N1) * OR1K_SPR_IMMU_ITLBW_MR_STEP))
+#define OR1K_SPR_IMMU_ITLBW_MR_ADDR(N0, N1) ((OR1K_SPR_IMMU_GROUP << OR1K_SPR_GROUP_LSB) | OR1K_SPR_IMMU_ITLBW_MR_INDEX(N0, N1))
+
+/* Valid */
+#define OR1K_SPR_IMMU_ITLBW_MR_V_OFFSET 0
+#define OR1K_SPR_IMMU_ITLBW_MR_V_MASK 0x00000001
+#define OR1K_SPR_IMMU_ITLBW_MR_V_GET(X) (((X) >> 0) & 0x1)
+#define OR1K_SPR_IMMU_ITLBW_MR_V_SET(X, Y) (((X) & OR1K_UNSIGNED(0xfffffffe)) | ((!!(Y)) << 0))
+
+/* Page Level 1 */
+#define OR1K_SPR_IMMU_ITLBW_MR_PL1_OFFSET 1
+#define OR1K_SPR_IMMU_ITLBW_MR_PL1_MASK 0x00000002
+#define OR1K_SPR_IMMU_ITLBW_MR_PL1_GET(X) (((X) >> 1) & 0x1)
+#define OR1K_SPR_IMMU_ITLBW_MR_PL1_SET(X, Y) (((X) & OR1K_UNSIGNED(0xfffffffd)) | ((!!(Y)) << 1))
+
+/* Context ID */
+#define OR1K_SPR_IMMU_ITLBW_MR_CID_LSB 2
+#define OR1K_SPR_IMMU_ITLBW_MR_CID_MSB 5
+#define OR1K_SPR_IMMU_ITLBW_MR_CID_BITS 4
+#define OR1K_SPR_IMMU_ITLBW_MR_CID_MASK OR1K_UNSIGNED(0x0000003c)
+#define OR1K_SPR_IMMU_ITLBW_MR_CID_GET(X) (((X) >> 2) & OR1K_UNSIGNED(0x0000000f))
+#define OR1K_SPR_IMMU_ITLBW_MR_CID_SET(X, Y) (((X) & OR1K_UNSIGNED(0xffffffc3)) | ((Y) << 2))
+
+/* Least Recently Used */
+#define OR1K_SPR_IMMU_ITLBW_MR_LRU_LSB 6
+#define OR1K_SPR_IMMU_ITLBW_MR_LRU_MSB 7
+#define OR1K_SPR_IMMU_ITLBW_MR_LRU_BITS 2
+#define OR1K_SPR_IMMU_ITLBW_MR_LRU_MASK OR1K_UNSIGNED(0x000000c0)
+#define OR1K_SPR_IMMU_ITLBW_MR_LRU_GET(X) (((X) >> 6) & OR1K_UNSIGNED(0x00000003))
+#define OR1K_SPR_IMMU_ITLBW_MR_LRU_SET(X, Y) (((X) & OR1K_UNSIGNED(0xffffff3f)) | ((Y) << 6))
+
+/* Virtual Page Number */
+#define OR1K_SPR_IMMU_ITLBW_MR_VPN_LSB 13
+#define OR1K_SPR_IMMU_ITLBW_MR_VPN_MSB 31
+#define OR1K_SPR_IMMU_ITLBW_MR_VPN_BITS 19
+#define OR1K_SPR_IMMU_ITLBW_MR_VPN_MASK OR1K_UNSIGNED(0xffffe000)
+#define OR1K_SPR_IMMU_ITLBW_MR_VPN_GET(X) (((X) >> 13) & OR1K_UNSIGNED(0x0007ffff))
+#define OR1K_SPR_IMMU_ITLBW_MR_VPN_SET(X, Y) (((X) & OR1K_UNSIGNED(0x00001fff)) | ((Y) << 13))
+
+/* Instruction TLB Translate Registers */
+#define OR1K_SPR_IMMU_ITLBW_TR_BASE OR1K_UNSIGNED(0x080)
+#define OR1K_SPR_IMMU_ITLBW_TR_COUNT OR1K_UNSIGNED(0x080)
+#define OR1K_SPR_IMMU_ITLBW_TR_STEP OR1K_UNSIGNED(0x001)
+
+#define OR1K_SPR_IMMU_ITLBW_TR_INDEX(N0, N1) (OR1K_SPR_IMMU_ITLBW_SUBBASE(N0) + OR1K_SPR_IMMU_ITLBW_TR_BASE + ((N1) * OR1K_SPR_IMMU_ITLBW_TR_STEP))
+#define OR1K_SPR_IMMU_ITLBW_TR_ADDR(N0, N1) ((OR1K_SPR_IMMU_GROUP << OR1K_SPR_GROUP_LSB) | OR1K_SPR_IMMU_ITLBW_TR_INDEX(N0, N1))
+
+/* Cache Coherency */
+#define OR1K_SPR_IMMU_ITLBW_TR_CC_OFFSET 0
+#define OR1K_SPR_IMMU_ITLBW_TR_CC_MASK 0x00000001
+#define OR1K_SPR_IMMU_ITLBW_TR_CC_GET(X) (((X) >> 0) & 0x1)
+#define OR1K_SPR_IMMU_ITLBW_TR_CC_SET(X, Y) (((X) & OR1K_UNSIGNED(0xfffffffe)) | ((!!(Y)) << 0))
+
+/* Cache Inhibit */
+#define OR1K_SPR_IMMU_ITLBW_TR_CI_OFFSET 1
+#define OR1K_SPR_IMMU_ITLBW_TR_CI_MASK 0x00000002
+#define OR1K_SPR_IMMU_ITLBW_TR_CI_GET(X) (((X) >> 1) & 0x1)
+#define OR1K_SPR_IMMU_ITLBW_TR_CI_SET(X, Y) (((X) & OR1K_UNSIGNED(0xfffffffd)) | ((!!(Y)) << 1))
+
+/* Write-back Cache */
+#define OR1K_SPR_IMMU_ITLBW_TR_WBC_OFFSET 2
+#define OR1K_SPR_IMMU_ITLBW_TR_WBC_MASK 0x00000004
+#define OR1K_SPR_IMMU_ITLBW_TR_WBC_GET(X) (((X) >> 2) & 0x1)
+#define OR1K_SPR_IMMU_ITLBW_TR_WBC_SET(X, Y) (((X) & OR1K_UNSIGNED(0xfffffffb)) | ((!!(Y)) << 2))
+
+/* Weakly-ordered Memory */
+#define OR1K_SPR_IMMU_ITLBW_TR_WOM_OFFSET 3
+#define OR1K_SPR_IMMU_ITLBW_TR_WOM_MASK 0x00000008
+#define OR1K_SPR_IMMU_ITLBW_TR_WOM_GET(X) (((X) >> 3) & 0x1)
+#define OR1K_SPR_IMMU_ITLBW_TR_WOM_SET(X, Y) (((X) & OR1K_UNSIGNED(0xfffffff7)) | ((!!(Y)) << 3))
+
+/* Accessed */
+#define OR1K_SPR_IMMU_ITLBW_TR_A_OFFSET 4
+#define OR1K_SPR_IMMU_ITLBW_TR_A_MASK 0x00000010
+#define OR1K_SPR_IMMU_ITLBW_TR_A_GET(X) (((X) >> 4) & 0x1)
+#define OR1K_SPR_IMMU_ITLBW_TR_A_SET(X, Y) (((X) & OR1K_UNSIGNED(0xffffffef)) | ((!!(Y)) << 4))
+
+/* Dirty */
+#define OR1K_SPR_IMMU_ITLBW_TR_D_OFFSET 5
+#define OR1K_SPR_IMMU_ITLBW_TR_D_MASK 0x00000020
+#define OR1K_SPR_IMMU_ITLBW_TR_D_GET(X) (((X) >> 5) & 0x1)
+#define OR1K_SPR_IMMU_ITLBW_TR_D_SET(X, Y) (((X) & OR1K_UNSIGNED(0xffffffdf)) | ((!!(Y)) << 5))
+
+/* User Execute Enable */
+#define OR1K_SPR_IMMU_ITLBW_TR_UXE_OFFSET 6
+#define OR1K_SPR_IMMU_ITLBW_TR_UXE_MASK 0x00000040
+#define OR1K_SPR_IMMU_ITLBW_TR_UXE_GET(X) (((X) >> 6) & 0x1)
+#define OR1K_SPR_IMMU_ITLBW_TR_UXE_SET(X, Y) (((X) & OR1K_UNSIGNED(0xffffffbf)) | ((!!(Y)) << 6))
+
+/* Supervisor Execute Enable */
+#define OR1K_SPR_IMMU_ITLBW_TR_SXE_OFFSET 7
+#define OR1K_SPR_IMMU_ITLBW_TR_SXE_MASK 0x00000080
+#define OR1K_SPR_IMMU_ITLBW_TR_SXE_GET(X) (((X) >> 7) & 0x1)
+#define OR1K_SPR_IMMU_ITLBW_TR_SXE_SET(X, Y) (((X) & OR1K_UNSIGNED(0xffffff7f)) | ((!!(Y)) << 7))
+
+/* Physical Page Number */
+#define OR1K_SPR_IMMU_ITLBW_TR_PPN_LSB 13
+#define OR1K_SPR_IMMU_ITLBW_TR_PPN_MSB 31
+#define OR1K_SPR_IMMU_ITLBW_TR_PPN_BITS 19
+#define OR1K_SPR_IMMU_ITLBW_TR_PPN_MASK OR1K_UNSIGNED(0xffffe000)
+#define OR1K_SPR_IMMU_ITLBW_TR_PPN_GET(X) (((X) >> 13) & OR1K_UNSIGNED(0x0007ffff))
+#define OR1K_SPR_IMMU_ITLBW_TR_PPN_SET(X, Y) (((X) & OR1K_UNSIGNED(0x00001fff)) | ((Y) << 13))
+
+
+/********************/
+/* Data Cache Group */
+/********************/
+#define OR1K_SPR_DCACHE_GROUP 0x03
+
+/* Data Cache Control Register */
+#define OR1K_SPR_DCACHE_DCCR_INDEX OR1K_UNSIGNED(0x000)
+#define OR1K_SPR_DCACHE_DCCR_ADDR OR1K_UNSIGNED(0x1800)
+
+/* Enable Ways */
+#define OR1K_SPR_DCACHE_DCCR_EW_LSB 0
+#define OR1K_SPR_DCACHE_DCCR_EW_MSB 7
+#define OR1K_SPR_DCACHE_DCCR_EW_BITS 8
+#define OR1K_SPR_DCACHE_DCCR_EW_MASK OR1K_UNSIGNED(0x000000ff)
+#define OR1K_SPR_DCACHE_DCCR_EW_GET(X) (((X) >> 0) & OR1K_UNSIGNED(0x000000ff))
+#define OR1K_SPR_DCACHE_DCCR_EW_SET(X, Y) (((X) & OR1K_UNSIGNED(0xffffff00)) | ((Y) << 0))
+
+
+/* Data Cache Block Prefetch Register */
+#define OR1K_SPR_DCACHE_DCBPR_INDEX OR1K_UNSIGNED(0x001)
+#define OR1K_SPR_DCACHE_DCBPR_ADDR OR1K_UNSIGNED(0x1801)
+
+
+/* Data Cache Block Flush Register */
+#define OR1K_SPR_DCACHE_DCBFR_INDEX OR1K_UNSIGNED(0x002)
+#define OR1K_SPR_DCACHE_DCBFR_ADDR OR1K_UNSIGNED(0x1802)
+
+
+/* Data Cache Block Invalidate Register */
+#define OR1K_SPR_DCACHE_DCBIR_INDEX OR1K_UNSIGNED(0x003)
+#define OR1K_SPR_DCACHE_DCBIR_ADDR OR1K_UNSIGNED(0x1803)
+
+
+/* Data Cache Block Write-back Register */
+#define OR1K_SPR_DCACHE_DCBWR_INDEX OR1K_UNSIGNED(0x004)
+#define OR1K_SPR_DCACHE_DCBWR_ADDR OR1K_UNSIGNED(0x1804)
+
+
+/* Data Cache Block Lock Register */
+#define OR1K_SPR_DCACHE_DCBLR_INDEX OR1K_UNSIGNED(0x005)
+#define OR1K_SPR_DCACHE_DCBLR_ADDR OR1K_UNSIGNED(0x1805)
+
+
+/***************************/
+/* Instruction Cache Group */
+/***************************/
+#define OR1K_SPR_ICACHE_GROUP 0x04
+
+/* Instruction Cache Control Register */
+#define OR1K_SPR_ICACHE_ICCR_INDEX OR1K_UNSIGNED(0x000)
+#define OR1K_SPR_ICACHE_ICCR_ADDR OR1K_UNSIGNED(0x2000)
+
+/* Enable Ways */
+#define OR1K_SPR_ICACHE_ICCR_EW_LSB 0
+#define OR1K_SPR_ICACHE_ICCR_EW_MSB 7
+#define OR1K_SPR_ICACHE_ICCR_EW_BITS 8
+#define OR1K_SPR_ICACHE_ICCR_EW_MASK OR1K_UNSIGNED(0x000000ff)
+#define OR1K_SPR_ICACHE_ICCR_EW_GET(X) (((X) >> 0) & OR1K_UNSIGNED(0x000000ff))
+#define OR1K_SPR_ICACHE_ICCR_EW_SET(X, Y) (((X) & OR1K_UNSIGNED(0xffffff00)) | ((Y) << 0))
+
+
+/* Instruction Cache Block Prefetch Register */
+#define OR1K_SPR_ICACHE_ICBPR_INDEX OR1K_UNSIGNED(0x001)
+#define OR1K_SPR_ICACHE_ICBPR_ADDR OR1K_UNSIGNED(0x2001)
+
+
+/* Instruction Cache Block Invalidate Register */
+#define OR1K_SPR_ICACHE_ICBIR_INDEX OR1K_UNSIGNED(0x002)
+#define OR1K_SPR_ICACHE_ICBIR_ADDR OR1K_UNSIGNED(0x2002)
+
+
+/* Instruction Cache Block Lock Register */
+#define OR1K_SPR_ICACHE_ICBLR_INDEX OR1K_UNSIGNED(0x003)
+#define OR1K_SPR_ICACHE_ICBLR_ADDR OR1K_UNSIGNED(0x2003)
+
+
+/*********************************/
+/* Multiply and Accumulate Group */
+/*********************************/
+#define OR1K_SPR_MAC_GROUP 0x05
+
+/* MAC Result Low Word */
+#define OR1K_SPR_MAC_MACLO_INDEX OR1K_UNSIGNED(0x001)
+#define OR1K_SPR_MAC_MACLO_ADDR OR1K_UNSIGNED(0x2801)
+
+
+/* MAC Result High Word */
+#define OR1K_SPR_MAC_MACHI_INDEX OR1K_UNSIGNED(0x002)
+#define OR1K_SPR_MAC_MACHI_ADDR OR1K_UNSIGNED(0x2802)
+
+
+/***************/
+/* Debug Group */
+/***************/
+#define OR1K_SPR_DEBUG_GROUP 0x06
+
+/* Debug Value Registers */
+#define OR1K_SPR_DEBUG_DVR_BASE OR1K_UNSIGNED(0x000)
+#define OR1K_SPR_DEBUG_DVR_COUNT OR1K_UNSIGNED(0x008)
+#define OR1K_SPR_DEBUG_DVR_STEP OR1K_UNSIGNED(0x001)
+#define OR1K_SPR_DEBUG_DVR_INDEX(N) (OR1K_SPR_DEBUG_DVR_BASE + ((N) * OR1K_SPR_DEBUG_DVR_STEP))
+#define OR1K_SPR_DEBUG_DVR_ADDR(N) ((OR1K_SPR_DEBUG_GROUP << OR1K_SPR_GROUP_LSB) | OR1K_SPR_DEBUG_DVR_INDEX(N))
+
+
+/* Debug Control Registers */
+#define OR1K_SPR_DEBUG_DCR_BASE OR1K_UNSIGNED(0x008)
+#define OR1K_SPR_DEBUG_DCR_COUNT OR1K_UNSIGNED(0x008)
+#define OR1K_SPR_DEBUG_DCR_STEP OR1K_UNSIGNED(0x001)
+#define OR1K_SPR_DEBUG_DCR_INDEX(N) (OR1K_SPR_DEBUG_DCR_BASE + ((N) * OR1K_SPR_DEBUG_DCR_STEP))
+#define OR1K_SPR_DEBUG_DCR_ADDR(N) ((OR1K_SPR_DEBUG_GROUP << OR1K_SPR_GROUP_LSB) | OR1K_SPR_DEBUG_DCR_INDEX(N))
+
+/* DVR/DCR Present */
+#define OR1K_SPR_DEBUG_DCR_DP_OFFSET 0
+#define OR1K_SPR_DEBUG_DCR_DP_MASK 0x00000001
+#define OR1K_SPR_DEBUG_DCR_DP_GET(X) (((X) >> 0) & 0x1)
+#define OR1K_SPR_DEBUG_DCR_DP_SET(X, Y) (((X) & OR1K_UNSIGNED(0xfffffffe)) | ((!!(Y)) << 0))
+
+/* Compare Condition */
+#define OR1K_SPR_DEBUG_DCR_CC_LSB 1
+#define OR1K_SPR_DEBUG_DCR_CC_MSB 3
+#define OR1K_SPR_DEBUG_DCR_CC_BITS 3
+#define OR1K_SPR_DEBUG_DCR_CC_MASK OR1K_UNSIGNED(0x0000000e)
+#define OR1K_SPR_DEBUG_DCR_CC_GET(X) (((X) >> 1) & OR1K_UNSIGNED(0x00000007))
+#define OR1K_SPR_DEBUG_DCR_CC_SET(X, Y) (((X) & OR1K_UNSIGNED(0xfffffff1)) | ((Y) << 1))
+
+/* Masked */
+#define OR1K_SPR_DEBUG_DCR_CC_MASKED 0
+/* Equal */
+#define OR1K_SPR_DEBUG_DCR_CC_EQ 1
+/* Less than */
+#define OR1K_SPR_DEBUG_DCR_CC_LT 2
+/* Less than or equal */
+#define OR1K_SPR_DEBUG_DCR_CC_LTE 3
+/* Greater than */
+#define OR1K_SPR_DEBUG_DCR_CC_GT 4
+/* Greater than or equal */
+#define OR1K_SPR_DEBUG_DCR_CC_GTE 5
+/* Not equal */
+#define OR1K_SPR_DEBUG_DCR_CC_NEQ 6
+/* Signed Comparison */
+#define OR1K_SPR_DEBUG_DCR_SC_OFFSET 4
+#define OR1K_SPR_DEBUG_DCR_SC_MASK 0x00000010
+#define OR1K_SPR_DEBUG_DCR_SC_GET(X) (((X) >> 4) & 0x1)
+#define OR1K_SPR_DEBUG_DCR_SC_SET(X, Y) (((X) & OR1K_UNSIGNED(0xffffffef)) | ((!!(Y)) << 4))
+
+/* Compare To */
+#define OR1K_SPR_DEBUG_DCR_CT_LSB 5
+#define OR1K_SPR_DEBUG_DCR_CT_MSB 7
+#define OR1K_SPR_DEBUG_DCR_CT_BITS 3
+#define OR1K_SPR_DEBUG_DCR_CT_MASK OR1K_UNSIGNED(0x000000e0)
+#define OR1K_SPR_DEBUG_DCR_CT_GET(X) (((X) >> 5) & OR1K_UNSIGNED(0x00000007))
+#define OR1K_SPR_DEBUG_DCR_CT_SET(X, Y) (((X) & OR1K_UNSIGNED(0xffffff1f)) | ((Y) << 5))
+
+/* Comparison disabled */
+#define OR1K_SPR_DEBUG_DCR_CT_DISABLED 0
+/* Instruction fetch EA */
+#define OR1K_SPR_DEBUG_DCR_CT_FEA 1
+/* Load EA */
+#define OR1K_SPR_DEBUG_DCR_CT_LEA 2
+/* Store EA */
+#define OR1K_SPR_DEBUG_DCR_CT_SEA 3
+/* Load data */
+#define OR1K_SPR_DEBUG_DCR_CT_LD 4
+/* Store data */
+#define OR1K_SPR_DEBUG_DCR_CT_SD 5
+/* Load/store EA */
+#define OR1K_SPR_DEBUG_DCR_CT_LSEA 6
+/* Load/store data */
+#define OR1K_SPR_DEBUG_DCR_CT_LSD 7
+
+/* Debug Mode Register 1 */
+#define OR1K_SPR_DEBUG_DMR1_INDEX OR1K_UNSIGNED(0x010)
+#define OR1K_SPR_DEBUG_DMR1_ADDR OR1K_UNSIGNED(0x3010)
+
+/* Chain Watchpoint 0 */
+#define OR1K_SPR_DEBUG_DMR1_CW0_LSB 0
+#define OR1K_SPR_DEBUG_DMR1_CW0_MSB 1
+#define OR1K_SPR_DEBUG_DMR1_CW0_BITS 2
+#define OR1K_SPR_DEBUG_DMR1_CW0_MASK OR1K_UNSIGNED(0x00000003)
+#define OR1K_SPR_DEBUG_DMR1_CW0_GET(X) (((X) >> 0) & OR1K_UNSIGNED(0x00000003))
+#define OR1K_SPR_DEBUG_DMR1_CW0_SET(X, Y) (((X) & OR1K_UNSIGNED(0xfffffffc)) | ((Y) << 0))
+
+/* Chain Watchpoint 1 */
+#define OR1K_SPR_DEBUG_DMR1_CW1_LSB 2
+#define OR1K_SPR_DEBUG_DMR1_CW1_MSB 3
+#define OR1K_SPR_DEBUG_DMR1_CW1_BITS 2
+#define OR1K_SPR_DEBUG_DMR1_CW1_MASK OR1K_UNSIGNED(0x0000000c)
+#define OR1K_SPR_DEBUG_DMR1_CW1_GET(X) (((X) >> 2) & OR1K_UNSIGNED(0x00000003))
+#define OR1K_SPR_DEBUG_DMR1_CW1_SET(X, Y) (((X) & OR1K_UNSIGNED(0xfffffff3)) | ((Y) << 2))
+
+/* Chain Watchpoint 2 */
+#define OR1K_SPR_DEBUG_DMR1_CW2_LSB 4
+#define OR1K_SPR_DEBUG_DMR1_CW2_MSB 5
+#define OR1K_SPR_DEBUG_DMR1_CW2_BITS 2
+#define OR1K_SPR_DEBUG_DMR1_CW2_MASK OR1K_UNSIGNED(0x00000030)
+#define OR1K_SPR_DEBUG_DMR1_CW2_GET(X) (((X) >> 4) & OR1K_UNSIGNED(0x00000003))
+#define OR1K_SPR_DEBUG_DMR1_CW2_SET(X, Y) (((X) & OR1K_UNSIGNED(0xffffffcf)) | ((Y) << 4))
+
+/* Chain Watchpoint 3 */
+#define OR1K_SPR_DEBUG_DMR1_CW3_LSB 6
+#define OR1K_SPR_DEBUG_DMR1_CW3_MSB 7
+#define OR1K_SPR_DEBUG_DMR1_CW3_BITS 2
+#define OR1K_SPR_DEBUG_DMR1_CW3_MASK OR1K_UNSIGNED(0x000000c0)
+#define OR1K_SPR_DEBUG_DMR1_CW3_GET(X) (((X) >> 6) & OR1K_UNSIGNED(0x00000003))
+#define OR1K_SPR_DEBUG_DMR1_CW3_SET(X, Y) (((X) & OR1K_UNSIGNED(0xffffff3f)) | ((Y) << 6))
+
+/* Chain Watchpoint 4 */
+#define OR1K_SPR_DEBUG_DMR1_CW4_LSB 9
+#define OR1K_SPR_DEBUG_DMR1_CW4_MSB 9
+#define OR1K_SPR_DEBUG_DMR1_CW4_BITS 1
+#define OR1K_SPR_DEBUG_DMR1_CW4_MASK OR1K_UNSIGNED(0x00000200)
+#define OR1K_SPR_DEBUG_DMR1_CW4_GET(X) (((X) >> 9) & OR1K_UNSIGNED(0x00000001))
+#define OR1K_SPR_DEBUG_DMR1_CW4_SET(X, Y) (((X) & OR1K_UNSIGNED(0xfffffdff)) | ((Y) << 9))
+
+/* Chain Watchpoint 5 */
+#define OR1K_SPR_DEBUG_DMR1_CW5_LSB 10
+#define OR1K_SPR_DEBUG_DMR1_CW5_MSB 11
+#define OR1K_SPR_DEBUG_DMR1_CW5_BITS 2
+#define OR1K_SPR_DEBUG_DMR1_CW5_MASK OR1K_UNSIGNED(0x00000c00)
+#define OR1K_SPR_DEBUG_DMR1_CW5_GET(X) (((X) >> 10) & OR1K_UNSIGNED(0x00000003))
+#define OR1K_SPR_DEBUG_DMR1_CW5_SET(X, Y) (((X) & OR1K_UNSIGNED(0xfffff3ff)) | ((Y) << 10))
+
+/* Chain Watchpoint 6 */
+#define OR1K_SPR_DEBUG_DMR1_CW6_LSB 12
+#define OR1K_SPR_DEBUG_DMR1_CW6_MSB 13
+#define OR1K_SPR_DEBUG_DMR1_CW6_BITS 2
+#define OR1K_SPR_DEBUG_DMR1_CW6_MASK OR1K_UNSIGNED(0x00003000)
+#define OR1K_SPR_DEBUG_DMR1_CW6_GET(X) (((X) >> 12) & OR1K_UNSIGNED(0x00000003))
+#define OR1K_SPR_DEBUG_DMR1_CW6_SET(X, Y) (((X) & OR1K_UNSIGNED(0xffffcfff)) | ((Y) << 12))
+
+/* Chain Watchpoint 7 */
+#define OR1K_SPR_DEBUG_DMR1_CW7_LSB 14
+#define OR1K_SPR_DEBUG_DMR1_CW7_MSB 15
+#define OR1K_SPR_DEBUG_DMR1_CW7_BITS 2
+#define OR1K_SPR_DEBUG_DMR1_CW7_MASK OR1K_UNSIGNED(0x0000c000)
+#define OR1K_SPR_DEBUG_DMR1_CW7_GET(X) (((X) >> 14) & OR1K_UNSIGNED(0x00000003))
+#define OR1K_SPR_DEBUG_DMR1_CW7_SET(X, Y) (((X) & OR1K_UNSIGNED(0xffff3fff)) | ((Y) << 14))
+
+/* Chain Watchpoint 8 */
+#define OR1K_SPR_DEBUG_DMR1_CW8_LSB 16
+#define OR1K_SPR_DEBUG_DMR1_CW8_MSB 17
+#define OR1K_SPR_DEBUG_DMR1_CW8_BITS 2
+#define OR1K_SPR_DEBUG_DMR1_CW8_MASK OR1K_UNSIGNED(0x00030000)
+#define OR1K_SPR_DEBUG_DMR1_CW8_GET(X) (((X) >> 16) & OR1K_UNSIGNED(0x00000003))
+#define OR1K_SPR_DEBUG_DMR1_CW8_SET(X, Y) (((X) & OR1K_UNSIGNED(0xfffcffff)) | ((Y) << 16))
+
+/* Chain Watchpoint 9 */
+#define OR1K_SPR_DEBUG_DMR1_CW9_LSB 18
+#define OR1K_SPR_DEBUG_DMR1_CW9_MSB 19
+#define OR1K_SPR_DEBUG_DMR1_CW9_BITS 2
+#define OR1K_SPR_DEBUG_DMR1_CW9_MASK OR1K_UNSIGNED(0x000c0000)
+#define OR1K_SPR_DEBUG_DMR1_CW9_GET(X) (((X) >> 18) & OR1K_UNSIGNED(0x00000003))
+#define OR1K_SPR_DEBUG_DMR1_CW9_SET(X, Y) (((X) & OR1K_UNSIGNED(0xfff3ffff)) | ((Y) << 18))
+
+/* Single-step Trace */
+#define OR1K_SPR_DEBUG_DMR1_ST_OFFSET 22
+#define OR1K_SPR_DEBUG_DMR1_ST_MASK 0x00400000
+#define OR1K_SPR_DEBUG_DMR1_ST_GET(X) (((X) >> 22) & 0x1)
+#define OR1K_SPR_DEBUG_DMR1_ST_SET(X, Y) (((X) & OR1K_UNSIGNED(0xffbfffff)) | ((!!(Y)) << 22))
+
+/* Branch Trace */
+#define OR1K_SPR_DEBUG_DMR1_BT_OFFSET 23
+#define OR1K_SPR_DEBUG_DMR1_BT_MASK 0x00800000
+#define OR1K_SPR_DEBUG_DMR1_BT_GET(X) (((X) >> 23) & 0x1)
+#define OR1K_SPR_DEBUG_DMR1_BT_SET(X, Y) (((X) & OR1K_UNSIGNED(0xff7fffff)) | ((!!(Y)) << 23))
+
+
+/* Debug Mode Register 2 */
+#define OR1K_SPR_DEBUG_DMR2_INDEX OR1K_UNSIGNED(0x011)
+#define OR1K_SPR_DEBUG_DMR2_ADDR OR1K_UNSIGNED(0x3011)
+
+/* Watchpoint Counter Enable 0 */
+#define OR1K_SPR_DEBUG_DMR2_WCE0_OFFSET 0
+#define OR1K_SPR_DEBUG_DMR2_WCE0_MASK 0x00000001
+#define OR1K_SPR_DEBUG_DMR2_WCE0_GET(X) (((X) >> 0) & 0x1)
+#define OR1K_SPR_DEBUG_DMR2_WCE0_SET(X, Y) (((X) & OR1K_UNSIGNED(0xfffffffe)) | ((!!(Y)) << 0))
+
+/* Watchpoint Counter Enable 1 */
+#define OR1K_SPR_DEBUG_DMR2_WCE1_OFFSET 1
+#define OR1K_SPR_DEBUG_DMR2_WCE1_MASK 0x00000002
+#define OR1K_SPR_DEBUG_DMR2_WCE1_GET(X) (((X) >> 1) & 0x1)
+#define OR1K_SPR_DEBUG_DMR2_WCE1_SET(X, Y) (((X) & OR1K_UNSIGNED(0xfffffffd)) | ((!!(Y)) << 1))
+
+/* Assign Watchpoints to Counter */
+#define OR1K_SPR_DEBUG_DMR2_AWTC_LSB 2
+#define OR1K_SPR_DEBUG_DMR2_AWTC_MSB 11
+#define OR1K_SPR_DEBUG_DMR2_AWTC_BITS 10
+#define OR1K_SPR_DEBUG_DMR2_AWTC_MASK OR1K_UNSIGNED(0x00000ffc)
+#define OR1K_SPR_DEBUG_DMR2_AWTC_GET(X) (((X) >> 2) & OR1K_UNSIGNED(0x000003ff))
+#define OR1K_SPR_DEBUG_DMR2_AWTC_SET(X, Y) (((X) & OR1K_UNSIGNED(0xfffff003)) | ((Y) << 2))
+
+/* Watchpoints Generating Breakpoint */
+#define OR1K_SPR_DEBUG_DMR2_WGB_LSB 12
+#define OR1K_SPR_DEBUG_DMR2_WGB_MSB 21
+#define OR1K_SPR_DEBUG_DMR2_WGB_BITS 10
+#define OR1K_SPR_DEBUG_DMR2_WGB_MASK OR1K_UNSIGNED(0x003ff000)
+#define OR1K_SPR_DEBUG_DMR2_WGB_GET(X) (((X) >> 12) & OR1K_UNSIGNED(0x000003ff))
+#define OR1K_SPR_DEBUG_DMR2_WGB_SET(X, Y) (((X) & OR1K_UNSIGNED(0xffc00fff)) | ((Y) << 12))
+
+/* Watchpoints Breakpoint Status */
+#define OR1K_SPR_DEBUG_DMR2_WBS_LSB 22
+#define OR1K_SPR_DEBUG_DMR2_WBS_MSB 31
+#define OR1K_SPR_DEBUG_DMR2_WBS_BITS 10
+#define OR1K_SPR_DEBUG_DMR2_WBS_MASK OR1K_UNSIGNED(0xffc00000)
+#define OR1K_SPR_DEBUG_DMR2_WBS_GET(X) (((X) >> 22) & OR1K_UNSIGNED(0x000003ff))
+#define OR1K_SPR_DEBUG_DMR2_WBS_SET(X, Y) (((X) & OR1K_UNSIGNED(0x003fffff)) | ((Y) << 22))
+
+
+/* Debug Watchpoint Counter Registers */
+#define OR1K_SPR_DEBUG_DCWR_BASE OR1K_UNSIGNED(0x012)
+#define OR1K_SPR_DEBUG_DCWR_COUNT OR1K_UNSIGNED(0x002)
+#define OR1K_SPR_DEBUG_DCWR_STEP OR1K_UNSIGNED(0x001)
+#define OR1K_SPR_DEBUG_DCWR_INDEX(N) (OR1K_SPR_DEBUG_DCWR_BASE + ((N) * OR1K_SPR_DEBUG_DCWR_STEP))
+#define OR1K_SPR_DEBUG_DCWR_ADDR(N) ((OR1K_SPR_DEBUG_GROUP << OR1K_SPR_GROUP_LSB) | OR1K_SPR_DEBUG_DCWR_INDEX(N))
+
+
+/* Debug Stop Register */
+#define OR1K_SPR_DEBUG_DSR_INDEX OR1K_UNSIGNED(0x014)
+#define OR1K_SPR_DEBUG_DSR_ADDR OR1K_UNSIGNED(0x3014)
+
+/* Reset Exception */
+#define OR1K_SPR_DEBUG_DSR_RSTE_OFFSET 0
+#define OR1K_SPR_DEBUG_DSR_RSTE_MASK 0x00000001
+#define OR1K_SPR_DEBUG_DSR_RSTE_GET(X) (((X) >> 0) & 0x1)
+#define OR1K_SPR_DEBUG_DSR_RSTE_SET(X, Y) (((X) & OR1K_UNSIGNED(0xfffffffe)) | ((!!(Y)) << 0))
+
+/* Bus Error Exception */
+#define OR1K_SPR_DEBUG_DSR_BUSEE_OFFSET 1
+#define OR1K_SPR_DEBUG_DSR_BUSEE_MASK 0x00000002
+#define OR1K_SPR_DEBUG_DSR_BUSEE_GET(X) (((X) >> 1) & 0x1)
+#define OR1K_SPR_DEBUG_DSR_BUSEE_SET(X, Y) (((X) & OR1K_UNSIGNED(0xfffffffd)) | ((!!(Y)) << 1))
+
+/* Data Page Fault Exception */
+#define OR1K_SPR_DEBUG_DSR_DPFE_OFFSET 2
+#define OR1K_SPR_DEBUG_DSR_DPFE_MASK 0x00000004
+#define OR1K_SPR_DEBUG_DSR_DPFE_GET(X) (((X) >> 2) & 0x1)
+#define OR1K_SPR_DEBUG_DSR_DPFE_SET(X, Y) (((X) & OR1K_UNSIGNED(0xfffffffb)) | ((!!(Y)) << 2))
+
+/* Instruction Page Fault Exception */
+#define OR1K_SPR_DEBUG_DSR_IPFE_OFFSET 3
+#define OR1K_SPR_DEBUG_DSR_IPFE_MASK 0x00000008
+#define OR1K_SPR_DEBUG_DSR_IPFE_GET(X) (((X) >> 3) & 0x1)
+#define OR1K_SPR_DEBUG_DSR_IPFE_SET(X, Y) (((X) & OR1K_UNSIGNED(0xfffffff7)) | ((!!(Y)) << 3))
+
+/* Tick Timer Exception */
+#define OR1K_SPR_DEBUG_DSR_TTE_OFFSET 4
+#define OR1K_SPR_DEBUG_DSR_TTE_MASK 0x00000010
+#define OR1K_SPR_DEBUG_DSR_TTE_GET(X) (((X) >> 4) & 0x1)
+#define OR1K_SPR_DEBUG_DSR_TTE_SET(X, Y) (((X) & OR1K_UNSIGNED(0xffffffef)) | ((!!(Y)) << 4))
+
+/* Alignment Exception */
+#define OR1K_SPR_DEBUG_DSR_AE_OFFSET 5
+#define OR1K_SPR_DEBUG_DSR_AE_MASK 0x00000020
+#define OR1K_SPR_DEBUG_DSR_AE_GET(X) (((X) >> 5) & 0x1)
+#define OR1K_SPR_DEBUG_DSR_AE_SET(X, Y) (((X) & OR1K_UNSIGNED(0xffffffdf)) | ((!!(Y)) << 5))
+
+/* Illegal Instruction Exception */
+#define OR1K_SPR_DEBUG_DSR_IIE_OFFSET 6
+#define OR1K_SPR_DEBUG_DSR_IIE_MASK 0x00000040
+#define OR1K_SPR_DEBUG_DSR_IIE_GET(X) (((X) >> 6) & 0x1)
+#define OR1K_SPR_DEBUG_DSR_IIE_SET(X, Y) (((X) & OR1K_UNSIGNED(0xffffffbf)) | ((!!(Y)) << 6))
+
+/* Interrupt Exception */
+#define OR1K_SPR_DEBUG_DSR_INTE_OFFSET 7
+#define OR1K_SPR_DEBUG_DSR_INTE_MASK 0x00000080
+#define OR1K_SPR_DEBUG_DSR_INTE_GET(X) (((X) >> 7) & 0x1)
+#define OR1K_SPR_DEBUG_DSR_INTE_SET(X, Y) (((X) & OR1K_UNSIGNED(0xffffff7f)) | ((!!(Y)) << 7))
+
+/* DTLB Miss Exception */
+#define OR1K_SPR_DEBUG_DSR_DME_OFFSET 8
+#define OR1K_SPR_DEBUG_DSR_DME_MASK 0x00000100
+#define OR1K_SPR_DEBUG_DSR_DME_GET(X) (((X) >> 8) & 0x1)
+#define OR1K_SPR_DEBUG_DSR_DME_SET(X, Y) (((X) & OR1K_UNSIGNED(0xfffffeff)) | ((!!(Y)) << 8))
+
+/* ITLB Miss Exception */
+#define OR1K_SPR_DEBUG_DSR_IME_OFFSET 9
+#define OR1K_SPR_DEBUG_DSR_IME_MASK 0x00000200
+#define OR1K_SPR_DEBUG_DSR_IME_GET(X) (((X) >> 9) & 0x1)
+#define OR1K_SPR_DEBUG_DSR_IME_SET(X, Y) (((X) & OR1K_UNSIGNED(0xfffffdff)) | ((!!(Y)) << 9))
+
+/* Range Exception */
+#define OR1K_SPR_DEBUG_DSR_RE_OFFSET 10
+#define OR1K_SPR_DEBUG_DSR_RE_MASK 0x00000400
+#define OR1K_SPR_DEBUG_DSR_RE_GET(X) (((X) >> 10) & 0x1)
+#define OR1K_SPR_DEBUG_DSR_RE_SET(X, Y) (((X) & OR1K_UNSIGNED(0xfffffbff)) | ((!!(Y)) << 10))
+
+/* System Call Exception */
+#define OR1K_SPR_DEBUG_DSR_SCE_OFFSET 11
+#define OR1K_SPR_DEBUG_DSR_SCE_MASK 0x00000800
+#define OR1K_SPR_DEBUG_DSR_SCE_GET(X) (((X) >> 11) & 0x1)
+#define OR1K_SPR_DEBUG_DSR_SCE_SET(X, Y) (((X) & OR1K_UNSIGNED(0xfffff7ff)) | ((!!(Y)) << 11))
+
+/* Floating Point Exception */
+#define OR1K_SPR_DEBUG_DSR_FPE_OFFSET 12
+#define OR1K_SPR_DEBUG_DSR_FPE_MASK 0x00001000
+#define OR1K_SPR_DEBUG_DSR_FPE_GET(X) (((X) >> 12) & 0x1)
+#define OR1K_SPR_DEBUG_DSR_FPE_SET(X, Y) (((X) & OR1K_UNSIGNED(0xffffefff)) | ((!!(Y)) << 12))
+
+/* Trap Exception */
+#define OR1K_SPR_DEBUG_DSR_TE_OFFSET 13
+#define OR1K_SPR_DEBUG_DSR_TE_MASK 0x00002000
+#define OR1K_SPR_DEBUG_DSR_TE_GET(X) (((X) >> 13) & 0x1)
+#define OR1K_SPR_DEBUG_DSR_TE_SET(X, Y) (((X) & OR1K_UNSIGNED(0xffffdfff)) | ((!!(Y)) << 13))
+
+
+/* Debug Reason Register */
+#define OR1K_SPR_DEBUG_DRR_INDEX OR1K_UNSIGNED(0x015)
+#define OR1K_SPR_DEBUG_DRR_ADDR OR1K_UNSIGNED(0x3015)
+
+/* Reset Exception */
+#define OR1K_SPR_DEBUG_DRR_RSTE_OFFSET 0
+#define OR1K_SPR_DEBUG_DRR_RSTE_MASK 0x00000001
+#define OR1K_SPR_DEBUG_DRR_RSTE_GET(X) (((X) >> 0) & 0x1)
+#define OR1K_SPR_DEBUG_DRR_RSTE_SET(X, Y) (((X) & OR1K_UNSIGNED(0xfffffffe)) | ((!!(Y)) << 0))
+
+/* Bus Error Exception */
+#define OR1K_SPR_DEBUG_DRR_BUSEE_OFFSET 1
+#define OR1K_SPR_DEBUG_DRR_BUSEE_MASK 0x00000002
+#define OR1K_SPR_DEBUG_DRR_BUSEE_GET(X) (((X) >> 1) & 0x1)
+#define OR1K_SPR_DEBUG_DRR_BUSEE_SET(X, Y) (((X) & OR1K_UNSIGNED(0xfffffffd)) | ((!!(Y)) << 1))
+
+/* Data Page Fault Exception */
+#define OR1K_SPR_DEBUG_DRR_DPFE_OFFSET 2
+#define OR1K_SPR_DEBUG_DRR_DPFE_MASK 0x00000004
+#define OR1K_SPR_DEBUG_DRR_DPFE_GET(X) (((X) >> 2) & 0x1)
+#define OR1K_SPR_DEBUG_DRR_DPFE_SET(X, Y) (((X) & OR1K_UNSIGNED(0xfffffffb)) | ((!!(Y)) << 2))
+
+/* Instruction Page Fault Exception */
+#define OR1K_SPR_DEBUG_DRR_IPFE_OFFSET 3
+#define OR1K_SPR_DEBUG_DRR_IPFE_MASK 0x00000008
+#define OR1K_SPR_DEBUG_DRR_IPFE_GET(X) (((X) >> 3) & 0x1)
+#define OR1K_SPR_DEBUG_DRR_IPFE_SET(X, Y) (((X) & OR1K_UNSIGNED(0xfffffff7)) | ((!!(Y)) << 3))
+
+/* Tick Timer Exception */
+#define OR1K_SPR_DEBUG_DRR_TTE_OFFSET 4
+#define OR1K_SPR_DEBUG_DRR_TTE_MASK 0x00000010
+#define OR1K_SPR_DEBUG_DRR_TTE_GET(X) (((X) >> 4) & 0x1)
+#define OR1K_SPR_DEBUG_DRR_TTE_SET(X, Y) (((X) & OR1K_UNSIGNED(0xffffffef)) | ((!!(Y)) << 4))
+
+/* Alignment Exception */
+#define OR1K_SPR_DEBUG_DRR_AE_OFFSET 5
+#define OR1K_SPR_DEBUG_DRR_AE_MASK 0x00000020
+#define OR1K_SPR_DEBUG_DRR_AE_GET(X) (((X) >> 5) & 0x1)
+#define OR1K_SPR_DEBUG_DRR_AE_SET(X, Y) (((X) & OR1K_UNSIGNED(0xffffffdf)) | ((!!(Y)) << 5))
+
+/* Illegal Instruction Exception */
+#define OR1K_SPR_DEBUG_DRR_IIE_OFFSET 6
+#define OR1K_SPR_DEBUG_DRR_IIE_MASK 0x00000040
+#define OR1K_SPR_DEBUG_DRR_IIE_GET(X) (((X) >> 6) & 0x1)
+#define OR1K_SPR_DEBUG_DRR_IIE_SET(X, Y) (((X) & OR1K_UNSIGNED(0xffffffbf)) | ((!!(Y)) << 6))
+
+/* Interrupt Exception */
+#define OR1K_SPR_DEBUG_DRR_INTE_OFFSET 7
+#define OR1K_SPR_DEBUG_DRR_INTE_MASK 0x00000080
+#define OR1K_SPR_DEBUG_DRR_INTE_GET(X) (((X) >> 7) & 0x1)
+#define OR1K_SPR_DEBUG_DRR_INTE_SET(X, Y) (((X) & OR1K_UNSIGNED(0xffffff7f)) | ((!!(Y)) << 7))
+
+/* DTLB Miss Exception */
+#define OR1K_SPR_DEBUG_DRR_DME_OFFSET 8
+#define OR1K_SPR_DEBUG_DRR_DME_MASK 0x00000100
+#define OR1K_SPR_DEBUG_DRR_DME_GET(X) (((X) >> 8) & 0x1)
+#define OR1K_SPR_DEBUG_DRR_DME_SET(X, Y) (((X) & OR1K_UNSIGNED(0xfffffeff)) | ((!!(Y)) << 8))
+
+/* ITLB Miss Exception */
+#define OR1K_SPR_DEBUG_DRR_IME_OFFSET 9
+#define OR1K_SPR_DEBUG_DRR_IME_MASK 0x00000200
+#define OR1K_SPR_DEBUG_DRR_IME_GET(X) (((X) >> 9) & 0x1)
+#define OR1K_SPR_DEBUG_DRR_IME_SET(X, Y) (((X) & OR1K_UNSIGNED(0xfffffdff)) | ((!!(Y)) << 9))
+
+/* Range Exception */
+#define OR1K_SPR_DEBUG_DRR_RE_OFFSET 10
+#define OR1K_SPR_DEBUG_DRR_RE_MASK 0x00000400
+#define OR1K_SPR_DEBUG_DRR_RE_GET(X) (((X) >> 10) & 0x1)
+#define OR1K_SPR_DEBUG_DRR_RE_SET(X, Y) (((X) & OR1K_UNSIGNED(0xfffffbff)) | ((!!(Y)) << 10))
+
+/* System Call Exception */
+#define OR1K_SPR_DEBUG_DRR_SCE_OFFSET 11
+#define OR1K_SPR_DEBUG_DRR_SCE_MASK 0x00000800
+#define OR1K_SPR_DEBUG_DRR_SCE_GET(X) (((X) >> 11) & 0x1)
+#define OR1K_SPR_DEBUG_DRR_SCE_SET(X, Y) (((X) & OR1K_UNSIGNED(0xfffff7ff)) | ((!!(Y)) << 11))
+
+/* Floating Point Exception */
+#define OR1K_SPR_DEBUG_DRR_FPE_OFFSET 12
+#define OR1K_SPR_DEBUG_DRR_FPE_MASK 0x00001000
+#define OR1K_SPR_DEBUG_DRR_FPE_GET(X) (((X) >> 12) & 0x1)
+#define OR1K_SPR_DEBUG_DRR_FPE_SET(X, Y) (((X) & OR1K_UNSIGNED(0xffffefff)) | ((!!(Y)) << 12))
+
+/* Trap Exception */
+#define OR1K_SPR_DEBUG_DRR_TE_OFFSET 13
+#define OR1K_SPR_DEBUG_DRR_TE_MASK 0x00002000
+#define OR1K_SPR_DEBUG_DRR_TE_GET(X) (((X) >> 13) & 0x1)
+#define OR1K_SPR_DEBUG_DRR_TE_SET(X, Y) (((X) & OR1K_UNSIGNED(0xffffdfff)) | ((!!(Y)) << 13))
+
+
+/******************************/
+/* Performance Counters Group */
+/******************************/
+#define OR1K_SPR_PERF_GROUP 0x07
+
+/* Performance Counters Count Registers */
+#define OR1K_SPR_PERF_PCCR_BASE OR1K_UNSIGNED(0x000)
+#define OR1K_SPR_PERF_PCCR_COUNT OR1K_UNSIGNED(0x008)
+#define OR1K_SPR_PERF_PCCR_STEP OR1K_UNSIGNED(0x001)
+#define OR1K_SPR_PERF_PCCR_INDEX(N) (OR1K_SPR_PERF_PCCR_BASE + ((N) * OR1K_SPR_PERF_PCCR_STEP))
+#define OR1K_SPR_PERF_PCCR_ADDR(N) ((OR1K_SPR_PERF_GROUP << OR1K_SPR_GROUP_LSB) | OR1K_SPR_PERF_PCCR_INDEX(N))
+
+
+/* Performance Counters Mode Registers */
+#define OR1K_SPR_PERF_PCMR_BASE OR1K_UNSIGNED(0x008)
+#define OR1K_SPR_PERF_PCMR_COUNT OR1K_UNSIGNED(0x008)
+#define OR1K_SPR_PERF_PCMR_STEP OR1K_UNSIGNED(0x001)
+#define OR1K_SPR_PERF_PCMR_INDEX(N) (OR1K_SPR_PERF_PCMR_BASE + ((N) * OR1K_SPR_PERF_PCMR_STEP))
+#define OR1K_SPR_PERF_PCMR_ADDR(N) ((OR1K_SPR_PERF_GROUP << OR1K_SPR_GROUP_LSB) | OR1K_SPR_PERF_PCMR_INDEX(N))
+
+
+/**************************/
+/* Power Management Group */
+/**************************/
+#define OR1K_SPR_POWER_GROUP 0x08
+
+/* Power Management Register */
+#define OR1K_SPR_POWER_PMR_INDEX OR1K_UNSIGNED(0x000)
+#define OR1K_SPR_POWER_PMR_ADDR OR1K_UNSIGNED(0x4000)
+
+
+/*******************************************/
+/* Programmable Interrupt Controller Group */
+/*******************************************/
+#define OR1K_SPR_PIC_GROUP 0x09
+
+/* PIC Mask Register */
+#define OR1K_SPR_PIC_PICMR_INDEX OR1K_UNSIGNED(0x000)
+#define OR1K_SPR_PIC_PICMR_ADDR OR1K_UNSIGNED(0x4800)
+
+
+/* PIC Status Register */
+#define OR1K_SPR_PIC_PICSR_INDEX OR1K_UNSIGNED(0x002)
+#define OR1K_SPR_PIC_PICSR_ADDR OR1K_UNSIGNED(0x4802)
+
+
+/********************/
+/* Tick Timer Group */
+/********************/
+#define OR1K_SPR_TICK_GROUP 0x0a
+
+/* Tick Timer Mode Register */
+#define OR1K_SPR_TICK_TTMR_INDEX OR1K_UNSIGNED(0x000)
+#define OR1K_SPR_TICK_TTMR_ADDR OR1K_UNSIGNED(0x5000)
+
+/* Time Period */
+#define OR1K_SPR_TICK_TTMR_TP_LSB 0
+#define OR1K_SPR_TICK_TTMR_TP_MSB 27
+#define OR1K_SPR_TICK_TTMR_TP_BITS 28
+#define OR1K_SPR_TICK_TTMR_TP_MASK OR1K_UNSIGNED(0x0fffffff)
+#define OR1K_SPR_TICK_TTMR_TP_GET(X) (((X) >> 0) & OR1K_UNSIGNED(0x0fffffff))
+#define OR1K_SPR_TICK_TTMR_TP_SET(X, Y) (((X) & OR1K_UNSIGNED(0xf0000000)) | ((Y) << 0))
+
+/* Interrupt Pending */
+#define OR1K_SPR_TICK_TTMR_IP_OFFSET 28
+#define OR1K_SPR_TICK_TTMR_IP_MASK 0x10000000
+#define OR1K_SPR_TICK_TTMR_IP_GET(X) (((X) >> 28) & 0x1)
+#define OR1K_SPR_TICK_TTMR_IP_SET(X, Y) (((X) & OR1K_UNSIGNED(0xefffffff)) | ((!!(Y)) << 28))
+
+/* Interrupt Enable */
+#define OR1K_SPR_TICK_TTMR_IE_OFFSET 29
+#define OR1K_SPR_TICK_TTMR_IE_MASK 0x20000000
+#define OR1K_SPR_TICK_TTMR_IE_GET(X) (((X) >> 29) & 0x1)
+#define OR1K_SPR_TICK_TTMR_IE_SET(X, Y) (((X) & OR1K_UNSIGNED(0xdfffffff)) | ((!!(Y)) << 29))
+
+/* Mode */
+#define OR1K_SPR_TICK_TTMR_MODE_LSB 30
+#define OR1K_SPR_TICK_TTMR_MODE_MSB 31
+#define OR1K_SPR_TICK_TTMR_MODE_BITS 2
+#define OR1K_SPR_TICK_TTMR_MODE_MASK OR1K_UNSIGNED(0xc0000000)
+#define OR1K_SPR_TICK_TTMR_MODE_GET(X) (((X) >> 30) & OR1K_UNSIGNED(0x00000003))
+#define OR1K_SPR_TICK_TTMR_MODE_SET(X, Y) (((X) & OR1K_UNSIGNED(0x3fffffff)) | ((Y) << 30))
+
+/* Disabled */
+#define OR1K_SPR_TICK_TTMR_MODE_DISABLE 0
+/* Restart counting when TTMR[TP]==TTCR */
+#define OR1K_SPR_TICK_TTMR_MODE_RESTART 1
+/* Stop counting when TTMR[TP]==TTCR */
+#define OR1K_SPR_TICK_TTMR_MODE_STOP 2
+/* Continue counting when TTMR[TP]==TTCR */
+#define OR1K_SPR_TICK_TTMR_MODE_CONTINUE 3
+
+/* Tick Timer Count Register */
+#define OR1K_SPR_TICK_TTCR_INDEX OR1K_UNSIGNED(0x001)
+#define OR1K_SPR_TICK_TTCR_ADDR OR1K_UNSIGNED(0x5001)
+
+
+/*****************************/
+/* Floating Point Unit Group */
+/*****************************/
+#define OR1K_SPR_FPU_GROUP 0x0b
+
+#endif
diff --git a/libgloss/or1k/include/or1k-support.h b/libgloss/or1k/include/or1k-support.h
new file mode 100644
index 000000000..c29b064be
--- /dev/null
+++ b/libgloss/or1k/include/or1k-support.h
@@ -0,0 +1,665 @@
+/* Copyright (c) 2014 Authors
+ *
+ * Contributor Julius Baxter <julius.baxter@orsoc.se>
+ * Contributor Stefan Wallentowitz <stefan.wallentowitz@tum.de>
+ *
+ * The authors hereby grant permission to use, copy, modify, distribute,
+ * and license this software and its documentation for any purpose, provided
+ * that existing copyright notices are retained in all copies and that this
+ * notice is included verbatim in any distributions. No written agreement,
+ * license, or royalty fee is required for any of the authorized uses.
+ * Modifications to this software may be copyrighted by their authors
+ * and need not follow the licensing terms described here, provided that
+ * the new terms are clearly indicated on the first page of each file where
+ * they apply.
+ */
+
+/* -------------------------------------------------------------------------- */
+/* This program is commented throughout in a fashion suitable for processing
+with Doxygen. */
+/* -------------------------------------------------------------------------- */
+
+#include <stdint.h>
+
+#ifndef __OR1K_SUPPORT_H__
+#define __OR1K_SUPPORT_H__
+
+/*!
+* \defgroup or1k_macros OR1K macros
+* @{
+*/
+
+/*!
+* Access byte-sized memory mapped register
+*
+* Used to access a byte-sized memory mapped register. It avoids usage errors
+* when not defining register addresses volatile and handles casting correctly.
+*
+* Example for both read and write:
+*
+* \code
+* uint8_t status = REG8(IPBLOCK_STATUS_REG_ADDR);
+* REG8(IPBLOCK_ENABLE) = 1;
+* \endcode
+*
+* \param add Register address
+*/
+#define REG8(add) *((volatile unsigned char *) (add))
+
+/*!
+* Access halfword-sized memory mapped register
+*
+* Used to access a 16 byte-sized memory mapped register. It avoids usage errors
+* when not defining register addresses volatile and handles casting correctly.
+*
+* See REG8() for an example.
+*
+* \param add Register address
+*/
+#define REG16(add) *((volatile unsigned short *) (add))
+
+/*!
+* Access word-sized memory mapped register
+*
+* Used to access a word-sized memory mapped register. It avoids usage errors
+* when not defining register addresses volatile and handles casting correctly.
+*
+* See REG8() for an example.
+*
+* \param add Register address
+*/
+#define REG32(add) *((volatile unsigned long *) (add))
+/*!
+* @}
+*/
+
+/*!
+* \defgroup or1k_interrupts OR1K interrupt control
+*
+* Interrupt control function prototypes
+*
+* @{
+*/
+
+/*! Function pointer to interrupt handler functions */
+typedef void (*or1k_interrupt_handler_fptr)(void* data);
+
+/*!
+* Add interrupt handler for interrupt line
+*
+* Registers a callback function for a certain interrupt line.
+*
+* \param line Interrupt line/id to register a handler for
+* \param handler Handler to register
+* \param data Data value passed to the handler
+*/
+void or1k_interrupt_handler_add(uint32_t line,
+ or1k_interrupt_handler_fptr handler,
+ void* data);
+
+/*!
+* Enable interrupts from a given line
+*
+* Unmask the given interrupt line. It is also important to enable interrupts
+* in general, e.g., using or1k_interrupts_enable().
+*
+* \param line Interrupt line to enable
+*/
+void or1k_interrupt_enable(int line);
+
+/*!
+* Disable interrupts from a given line
+*
+* Mask given interrupt line. It can be unmasked using or1k_interrupt_enable().
+*
+* \param line Interrupt line to disable
+*/
+void or1k_interrupt_disable(int line);
+
+/*!
+* Disable interrupts
+*
+* This disables the interrupt exception. This is sufficient to disable all
+* interrupts. It does not change the mask register (which is modified using
+* or1k_interrupt_enable() and or1k_interrupt_disable()).
+*
+* The interrupt exception can be enabled using or1k_interrupts_enable().
+*
+* Finally, the status of the interrupt exception enable flag is returned by
+* this function. That allows to call this function even if interrupts are
+* already disabled. To restore the value of the interrupt exception enable
+* flag, use the or1k_interrupts_restore() function. That way you avoid to
+* accidentally enable interrupts. Example:
+*
+* \code
+* void f() {
+* uint32_t interrupt_status = or1k_interrupts_disable();
+* // do something
+* or1k_interrupts_restore(status);
+* }
+* \endcode
+*
+* This code will preserve the original status of the interrupt enable flag.
+*
+* \return Interrupt exception enable flag before call
+*/
+uint32_t or1k_interrupts_disable(void);
+
+/*!
+* Enable interrupt exception
+*
+* Enable the interrupt exception. Beside the interrupt exception, it is also
+* necessary to enable the individual interrupt lines using
+* or1k_interrupt_enable().
+*
+* You should avoid using this function together with or1k_interrupts_disable()
+* to guard atomic blocks as it unconditionally enables the interrupt
+* exception (see documentation of or1k_interrupts_disable()).
+*/
+void or1k_interrupts_enable(void);
+
+/*!
+* Restore interrupt exception enable flag
+*
+* This function restores the given status to the processor.
+* or1k_interrupts_restore(0) is identical to or1k_interrupts_disable() and
+* or1k_interrupts_restore(SPR_SR_IEE) is identical to or1k_interrupts_enable().
+*
+* It is for example used to guard an atomic block and restore the original
+* status of the interrupt exception enable flag as returned by
+* or1k_interrupts_disable(). See the documentation of or1k_interrupts_disable()
+* for a usage example.
+*
+* \param status Status of the flag to restore
+*/
+void or1k_interrupts_restore(uint32_t status);
+
+/*!
+ * Disable timer and interrupt exception
+ *
+ * This function disables the timer and interrupt exception to guard critical
+ * sections. It returns the status of the enable bits before the critical
+ * section, that is restored with or1k_critical_end().
+ *
+ * Example:
+ * \code
+ * ...
+ * uint32_t status = or1k_critical_start();
+ * // critical part
+ * or1k_critical_end(status);
+ * ...
+ * \endcode
+ *
+ * \return Status of timer and interrupt exception at time of call
+ */
+uint32_t or1k_critical_begin();
+
+/*!
+ * Enable timer and interrupt exception
+ *
+ * Restore the timer and interrupt exception enable. The restore value is the
+ * return value from or1k_critical_start().
+ *
+ * \param restore Interrupt and timer exception enable restore value
+ */
+void or1k_critical_end(uint32_t restore);
+/*!
+* @}
+*/
+
+/*!
+* \defgroup or1k_exception Exception handling
+* @{
+*/
+/*! Function pointer to an exception handler function */
+typedef void (*or1k_exception_handler_fptr)(void);
+
+/*!
+* Register exception handler
+*
+* Register an exception handler for the given exception id. This handler is
+* in the following then called when the exception occurs. You can thereby
+* individually handle those exceptions.
+*
+* \param id Exception id
+* \param handler Handler callback
+*/
+void or1k_exception_handler_add(int id, or1k_exception_handler_fptr handler);
+/*!
+* @}
+*/
+
+/*!
+* \defgroup or1k_spr SPR access
+* @{
+*/
+
+/*!
+* Move value to special purpose register
+*
+* Move data value to a special purpose register
+*
+* \param spr SPR identifier, see spr-defs.h for macros
+* \param value value to move to SPR
+*/
+static inline void or1k_mtspr (uint32_t spr, uint32_t value)
+{
+ __asm__ __volatile__ ("l.mtspr\t\t%0,%1,0": : "r" (spr), "r" (value));
+}
+
+/*!
+* Copy value from special purpose register
+*
+* Copy a data value from the given special purpose register.
+*
+* \param spr SPR identifier, see spr-defs.h for macros
+* \return SPR data value
+*/
+static inline uint32_t or1k_mfspr (uint32_t spr) {
+ uint32_t value;
+ __asm__ __volatile__ ("l.mfspr\t\t%0,%1,0" : "=r" (value) : "r" (spr));
+ return value;
+}
+/*!
+* @}
+*/
+
+/*!
+* \defgroup or1k_util Miscellaneous utility functions
+*
+* @{
+*/
+
+/*!
+* Report value to simulator
+*
+* Uses the built-in simulator functionality.
+*
+* \param value Value to report
+*/
+void or1k_report (unsigned long int value);
+
+/*!
+* Get (pseudo) random number
+*
+* This should return pseudo-random numbers, based on a Galois LFSR.
+*
+* \return (Pseudo) Random number
+*/
+unsigned long int or1k_rand(void);
+
+/*!
+ * Register UART callback
+ *
+ * This function sets a callback function that is called when a character is
+ * received via UART. The callback function has no return and a gets the
+ * character as parameter. When a character is received, the function is called.
+ *
+ * Example (UART echo):
+ * \code
+ * void uart_in(char c) {
+ * printf("%c", c); // Echo
+ * }
+ *
+ * int main() {
+ * or1k_uart_set_read_cb(&uart_in);
+ * or1k_interrupts_enable();
+ *
+ * while (1) {}
+ * }
+ * \endcode
+ */
+void or1k_uart_set_read_cb(void (*cb)(char c));
+/*!
+* @}
+*/
+
+/*!
+* \defgroup or1k_cache Cache control
+*
+* @{
+*/
+
+/*!
+* Enable instruction cache
+*/
+void or1k_icache_enable(void);
+
+/*!
+* Disable instruction cache
+*/
+void or1k_icache_disable(void);
+
+/*!
+* Flush instruction cache
+*
+* Invalidate instruction cache entry
+*
+* \param entry Entry to invalidate
+*/
+void or1k_icache_flush(uint32_t entry);
+
+/*!
+* Enable data cache
+*/
+void or1k_dcache_enable(void);
+
+/*!
+* Disable data cache
+*/
+void or1k_dcache_disable(void);
+
+/*!
+* Flush data cache
+*
+* Invalidate data cache entry
+*
+* \param entry Entry to invalidate
+*/
+void or1k_dcache_flush(unsigned long entry);
+/*!
+* @}
+*/
+
+/*!
+* \defgroup or1k_mmu MMU control
+* @{
+*/
+
+/*!
+* Enable instruction MMU
+*/
+void or1k_immu_enable(void);
+
+/*!
+* Disable instruction MMU
+*/
+void or1k_immu_disable(void);
+
+/*!
+* Enable data MMU
+*/
+void or1k_dmmu_enable(void);
+
+/*!
+* Disable data MMU
+*/
+void or1k_dmmu_disable(void);
+/*!
+* @}
+*/
+
+/*!
+* \defgroup or1k_timer Timer control
+*
+* The tick timer can be used for time measurement, operating system scheduling
+* etc. By default it is initialized to continuously count the ticks of a
+* certain period after calling or1k_timer_init(). The period can later be
+* changed using or1k_timer_set_period().
+*
+* The timer is controlled using or1k_timer_enable(), or1k_timer_disable(),
+* or1k_timer_restore(), or1k_timer_pause(). After initialization it is required
+* to enable the timer the first time using or1k_timer_enable().
+* or1k_timer_disable() only disables the tick timer interrupts, it does not
+* disable the timer counting. If you plan to use a pair of or1k_timer_disable()
+* and or1k_timer_enable() to protect sections of your code against interrupts
+* you should use or1k_timer_disable() and or1k_timer_restore(), as it may be
+* possible that the timer interrupt was not enabled before disabling it,
+* enable would then start it unconditionally. or1k_timer_pause() pauses the
+* counting.
+*
+* In the default mode you can get the tick value using or1k_timer_get_ticks()
+* and reset this value using or1k_timer_reset_ticks().
+*
+* Example for using the default mode:
+*
+* \code
+* int main() {
+* uint32_t ticks = 0;
+* uint32_t timerstate;
+* or1k_timer_init(100);
+* or1k_timer_enable();
+* while (1) {
+* while (ticks == or1k_timer_get_ticks()) { }
+* timerstate = or1k_timer_disable();
+* // do something atomar
+* or1k_timer_restore(timerstate);
+* if (ticks == 100) {
+* printf("A second elapsed\n");
+* or1k_timer_reset_ticks();
+* ticks = 0;
+* }
+* }
+* }
+* \endcode
+*
+* It is possible to change the mode of the tick timer using
+* or1k_timer_set_mode(). Allowed values are the correct bit pattern (including
+* the bit positions) for the TTMR register, it is recommended to use the macros
+* defined in spr-defs.h. For example, implementing an operating system with
+* scheduling decisions of varying duration favors the implementation of single
+* run tick timer. Here, each quantum is started before leaving the operating
+* system kernel. The counter can be restarted with or1k_timer_reset().
+* Example:
+*
+* \code
+* void tick_handler(void) {
+* // Make schedule decision
+* // and set new thread
+* or1k_timer_reset();
+* // End of exception, new thread will run
+* }
+*
+* int main() {
+* // Configure operating system and start threads..
+*
+* // Configure timer
+* or1k_timer_init(50);
+* or1k_timer_set_handler(&tick_handler);
+* or1k_timer_set_mode(SPR_TTMR_SR);
+* or1k_timer_enable();
+*
+* // Schedule first thread and die..
+* }
+* \endcode
+*
+* @{
+*/
+
+/*!
+* Initialize tick timer
+*
+* This initializes the tick timer in default mode (see \ref or1k_timer for
+* details).
+*
+* \param hz Initial period of the tick timer
+* \return 0 if successful, -1 if timer not present
+*/
+int or1k_timer_init(unsigned int hz);
+
+/*!
+* Set period of timer
+*
+* Set the period of the timer to a value in Hz. The frequency from the board
+* support package is used to determine the match value.
+*/
+void or1k_timer_set_period(uint32_t hz);
+
+/*!
+* Replace the timer interrupt handler
+*
+* By default the tick timer is used to handle timer ticks. The user can replace
+* this with an own handler for example when implementing an operating system.
+*
+* \param handler The callback function pointer to the handler
+*/
+void or1k_timer_set_handler(void (*handler)(void));
+
+/*!
+* Set timer mode
+*
+* The timer has different modes (see architecture manual). The default is to
+* automatically restart counting (SPR_TTMR_RT), others are single run
+* (SPR_TTMR_SR) and continuous run (SPR_TTMR_CR).
+*
+* \param mode a valid mode (use definitions from spr-defs.h as it is important
+* that those are also at the correct position in the bit field!)
+*/
+void or1k_timer_set_mode(uint32_t mode);
+
+/*!
+* Enable timer interrupt
+*
+* Enable the timer interrupt exception, independent of the status before.
+* If you want to enable the timer conditionally, for example to implement a
+* non-interruptible sequence of code, you should use or1k_timer_restore(). See
+* the description of or1k_timer_disable() for more details.
+*
+* The enable will also restore the mode if the timer was paused previously.
+*/
+void or1k_timer_enable(void);
+
+/*!
+* Disable timer interrupt
+*
+* This disables the timer interrupt exception and returns the state of the
+* interrupt exception enable flag before the call. This can be used with
+* or1k_timer_restore() to implement sequences of code that are not allowed to
+* be interrupted. Using or1k_timer_enable() will unconditionally enable the
+* interrupt independent of the state before calling or1k_timer_disable().
+* For an example see \ref or1k_timer.
+*
+* \return Status of timer interrupt before call
+*/
+uint32_t or1k_timer_disable(void);
+
+/*!
+* Restore timer interrupt exception flag
+*
+* Restores the timer interrupt exception flag as returned by
+* or1k_timer_disable(). See the description of or1k_timer_disable() and \ref
+* or1k_timer for details and an example.
+*
+* \param sr_tee Status of timer interrupt
+*/
+void or1k_timer_restore(uint32_t sr_tee);
+
+/*!
+* Pause timer counter
+*
+* Pauses the counter of the tick timer. The counter will hold its current value
+* and it can be started again with or1k_timer_enable() which will restore the
+* configured mode.
+*/
+void or1k_timer_pause(void);
+
+/*!
+* Reset timer counter
+*/
+void or1k_timer_reset(void);
+
+/*!
+* Get timer ticks
+*
+* Get the global ticks of the default configuration. This will increment the
+* tick counter according to the preconfigured period.
+*
+* \return Current value of ticks
+*/
+unsigned long or1k_timer_get_ticks(void);
+
+/*!
+* Reset timer ticks
+*
+* Resets the timer ticks in default configuration to 0.
+*/
+void or1k_timer_reset_ticks(void);
+/*!
+* @}
+*/
+
+/*!
+ * \defgroup or1k_multicore Multicore and Synchronization Support
+ *
+ * @{
+ */
+
+/*!
+ * Compiled with multicore support
+ *
+ * \return 1 if compiled with multicore support, 0 otherwise
+ */
+uint32_t or1k_has_multicore_support(void);
+
+/*!
+ * Read core identifier
+ *
+ * \return Core identifier
+ */
+uint32_t or1k_coreid(void);
+
+/*!
+ * Read number of cores
+ *
+ * \return Total number of cores
+ */
+uint32_t or1k_numcores(void);
+
+/*!
+ * Load linked
+ *
+ * Load a value from the given address and link it. If the following
+ * or1k_sync_sc() goes to the same address and there was no conflicting access
+ * between loading and storing, the value is written back, else the write fails.
+ *
+ * \param address Address to load value from
+ * \return Value read from the address
+ */
+uint32_t or1k_sync_ll(void *address);
+
+/**
+ * Store conditional
+ *
+ * Conditionally store a value to the address. The address must have been read
+ * before using or1k_sync_ll() and there must be no other load link after that,
+ * otherwise this will always fail. In case there was no other write to the same
+ * address in between the load link and the store conditional, the store is
+ * successful, otherwise it will also fail.
+ *
+ * \param address Address to conditionally store to
+ * \param value Value to write to address
+ * \return 1 if success, 0 if fail
+ */
+int or1k_sync_sc(void *address, uint32_t value);
+
+/*!
+ * Compare and Swap
+ *
+ * Loads a data item from the memory and compares a given value to it. If the
+ * values match, a new value is written to the memory, if they mismatch, the
+ * operation is aborted. The whole operation is atomic, i.e., it is guaranteed
+ * that no other core changes the value between the read and the write.
+ *
+ * \param address Address to operate on
+ * \param compare Compare value
+ * \param swap New value to write
+ * \return The value read from memory (can be used to check for success)
+ */
+uint32_t or1k_sync_cas(void *address, uint32_t compare, uint32_t swap);
+
+/*!
+ * Test and Set Lock
+ *
+ * Check for a lock on an address. This means, if there is 0 at an address it
+ * will overwrite it with 1 and return 0. If the lock was already set (value
+ * 1 read from address), the function returns 1. The operation is atomic.
+ *
+ * \param address Address of the lock
+ * \return 0 if success, 1 if failed
+ */
+int or1k_sync_tsl(void *address);
+/*!
+ * @}
+ */
+
+#endif /* __NEWLIB_OR1K_SUPPORT_H__ */
diff --git a/libgloss/or1k/interrupts-asm.S b/libgloss/or1k/interrupts-asm.S
new file mode 100644
index 000000000..82b796f51
--- /dev/null
+++ b/libgloss/or1k/interrupts-asm.S
@@ -0,0 +1,162 @@
+/* interrupts-asm.S -- interrupt handling for OpenRISC 1000.
+ *
+ * Copyright (c) 2011, 2012, 2014 Authors
+ *
+ * Contributor Julius Baxter <juliusbaxter@gmail.com>
+ * Contributor Stefan Kristiansson <stefan.kristiansson@saunalahti.fi>
+ * Contributor Stefan Wallentowitz <stefan.wallentowitz@tum.de>
+ *
+ * The authors hereby grant permission to use, copy, modify, distribute,
+ * and license this software and its documentation for any purpose, provided
+ * that existing copyright notices are retained in all copies and that this
+ * notice is included verbatim in any distributions. No written agreement,
+ * license, or royalty fee is required for any of the authorized uses.
+ * Modifications to this software may be copyrighted by their authors
+ * and need not follow the licensing terms described here, provided that
+ * the new terms are clearly indicated on the first page of each file where
+ * they apply.
+ */
+
+/* -------------------------------------------------------------------------- */
+/*!Generic interrupt handler function for or1k
+ */
+/* -------------------------------------------------------------------------- */
+
+#include "include/or1k-asm.h"
+#include "include/or1k-sprs.h"
+
+ .extern _or1k_interrupt_handler_table
+ .extern _or1k_interrupt_handler_data_ptr_table
+
+/* -------------------------------------------------------------------------- */
+/*!Function to call appropriate interrupt handler
+ */
+/* -------------------------------------------------------------------------- */
+
+ .section .text
+ .global _or1k_interrupt_handler
+ .type _or1k_interrupt_handler,@function
+
+_or1k_interrupt_handler:
+ /* Make room on stack, save link address register */
+ l.addi r1,r1,-4
+ l.sw 0(r1),r9
+
+ /* Read PICSR */
+ l.mfspr r20,r0,OR1K_SPR_PIC_PICSR_ADDR
+
+ /* Load handler table base address */
+ // Needs to be callee-saved register
+ l.movhi r16,hi(_or1k_interrupt_handler_table)
+ l.ori r16,r16,lo(_or1k_interrupt_handler_table)
+ /* Load data pointer table base address */
+ // Needs to be callee-saved register
+ l.movhi r18,hi(_or1k_interrupt_handler_data_ptr_table)
+ l.ori r18,r18,lo(_or1k_interrupt_handler_data_ptr_table)
+#ifdef __OR1K_MULTICORE__
+ /* Read the addresses of the arrays of cores */
+ /* r7 = (*or1k_interrupt_handler_table) */
+ l.lwz r16,0(r16)
+ /* r12 = (*or1k_interrupt_handler_data_ptr_table) */
+ l.lwz r18,0(r18)
+ /* Generate offset in arrays */
+ /* r14 = coreid */
+ l.mfspr r14,r0,OR1K_SPR_SYS_COREID_ADDR
+ /* r14 = coreid*32*4 = off */
+ l.slli r14,r14,7
+ /* r7 = (*or1k_exception_handler_table)[coreid] */
+ l.add r16,r16,r14
+ /* r12 = (*or1k_exception_handler_table)[coreid] */
+ l.add r18,r18,r14
+#endif
+
+.L0:
+ /* Find first set bit in PICSR */
+ l.ff1 r4,r20
+ /* Any bits set? */
+ l.sfne r4,r0
+ /* If none, finish */
+ OR1K_DELAYED_NOP(OR1K_INST(l.bnf .L2))
+ /* What is IRQ function table offset? */
+ l.addi r22,r4,-1
+ l.slli r6,r22,2
+ /* Add this to table bases */
+ l.add r14,r6,r16
+ l.add r13,r6,r18
+
+ /* Fetch handler function address */
+ l.lwz r14,0(r14)
+
+ /* Double check it's valid, compare against INTERRUPT_HANDLER_NOT_SET */
+ l.sfne r14,r0
+ /* Skip if no handler: TODO: Indicate interrupt fired but no handler*/
+ OR1K_DELAYED_NOP(OR1K_INST(l.bnf .L1))
+
+ /* Call handler, load data pointer */
+ OR1K_DELAYED(
+ OR1K_INST(l.lwz r3,0(r13)),
+ OR1K_INST(l.jalr r14)
+ )
+
+.L1:
+ /* Clear bit from PICSR, return to start of checking loop */
+ l.ori r6,r0,1
+ l.sll r6,r6,r22
+ OR1K_DELAYED(
+ OR1K_INST(l.xor r20,r20,r6),
+ OR1K_INST(l.j .L0)
+ )
+
+.L2:
+ /* Finish up - write PICSR back, restore r9*/
+ l.lwz r9,0(r1)
+ l.mtspr r0,r20,OR1K_SPR_PIC_PICSR_ADDR
+ OR1K_DELAYED(
+ OR1K_INST(l.addi r1,r1,4),
+ OR1K_INST(l.jr r9)
+ )
+
+/* -------------------------------------------------------------------------- */
+/*!Function to enable an interrupt handler in the PICMR
+ */
+/* -------------------------------------------------------------------------- */
+ .global or1k_interrupt_enable
+ .type or1k_interrupt_enable,@function
+
+ /* r3 should have IRQ line for peripheral */
+or1k_interrupt_enable:
+ l.addi r1,r1,-4
+ l.sw 0(r1),r4
+ l.ori r4,r0,0x1
+ l.sll r4,r4,r3
+ l.mfspr r3,r0,OR1K_SPR_PIC_PICMR_ADDR
+ l.or r3,r3,r4
+ l.mtspr r0,r3,OR1K_SPR_PIC_PICMR_ADDR
+ l.lwz r4,0(r1)
+ OR1K_DELAYED(
+ OR1K_INST(l.addi r1,r1,4),
+ OR1K_INST(l.jr r9)
+ )
+
+/* -------------------------------------------------------------------------- */
+/*!Function to disable an interrupt handler in the PICMR
+ */
+/* -------------------------------------------------------------------------- */
+ .global or1k_interrupt_disable
+ .type or1k_interrupt_disable,@function
+
+ /* r3 should have IRQ line for peripheral */
+or1k_interrupt_disable:
+ l.addi r1,r1,-4
+ l.sw 0(r1),r4
+ l.ori r4,r0,0x1
+ l.sll r4,r4,r3
+ l.xori r4,r4,0xffff
+ l.mfspr r3,r0,OR1K_SPR_PIC_PICMR_ADDR
+ l.and r3,r3,r4
+ l.mtspr r0,r3,OR1K_SPR_PIC_PICMR_ADDR
+ l.lwz r4,0(r1)
+ OR1K_DELAYED(
+ OR1K_INST(l.addi r1,r1,4),
+ OR1K_INST(l.jr r9)
+ )
diff --git a/libgloss/or1k/interrupts.c b/libgloss/or1k/interrupts.c
new file mode 100644
index 000000000..6badc497c
--- /dev/null
+++ b/libgloss/or1k/interrupts.c
@@ -0,0 +1,69 @@
+/* interrupts.c -- interrupt handling for OpenRISC 1000.
+ *
+ * Copyright (c) 2014 Authors
+ *
+ * Contributor Stefan Wallentowitz <stefan.wallentowitz@tum.de>
+ *
+ * The authors hereby grant permission to use, copy, modify, distribute,
+ * and license this software and its documentation for any purpose, provided
+ * that existing copyright notices are retained in all copies and that this
+ * notice is included verbatim in any distributions. No written agreement,
+ * license, or royalty fee is required for any of the authorized uses.
+ * Modifications to this software may be copyrighted by their authors
+ * and need not follow the licensing terms described here, provided that
+ * the new terms are clearly indicated on the first page of each file where
+ * they apply.
+ */
+
+#include "include/or1k-support.h"
+#include "include/or1k-sprs.h"
+#include <stdint.h>
+
+#include "or1k-internals.h"
+
+#ifdef __OR1K_MULTICORE__
+or1k_interrupt_handler_table_t *_or1k_interrupt_handler_table;
+or1k_interrupt_handler_data_ptr_table_t *_or1k_interrupt_handler_data_ptr_table;
+#else
+or1k_interrupt_handler_table_t _or1k_interrupt_handler_table;
+or1k_interrupt_handler_data_ptr_table_t _or1k_interrupt_handler_data_ptr_table;
+#endif
+
+void or1k_interrupt_handler_add(uint32_t id,
+ or1k_interrupt_handler_fptr handler,
+ void *data_ptr)
+{
+#ifdef __OR1K_MULTICORE__
+ _or1k_interrupt_handler_table[or1k_coreid()][id] = handler;
+ _or1k_interrupt_handler_data_ptr_table[or1k_coreid()][id] = (uint32_t) data_ptr;
+#else
+ _or1k_interrupt_handler_table[id] = handler;
+ _or1k_interrupt_handler_data_ptr_table[id] = (uint32_t) data_ptr;
+#endif
+}
+
+void
+or1k_interrupts_enable(void)
+{
+ uint32_t sr = or1k_mfspr(OR1K_SPR_SYS_SR_ADDR);
+ sr = OR1K_SPR_SYS_SR_IEE_SET(sr, 1);
+ or1k_mtspr(OR1K_SPR_SYS_SR_ADDR, sr);
+}
+
+uint32_t
+or1k_interrupts_disable(void)
+{
+ uint32_t oldsr, newsr;
+ oldsr= or1k_mfspr(OR1K_SPR_SYS_SR_ADDR);
+ newsr = OR1K_SPR_SYS_SR_IEE_SET(oldsr, 0);
+ or1k_mtspr(OR1K_SPR_SYS_SR_ADDR, newsr);
+ return OR1K_SPR_SYS_SR_IEE_GET(oldsr);
+}
+
+void
+or1k_interrupts_restore(uint32_t sr_iee)
+{
+ uint32_t sr = or1k_mfspr(OR1K_SPR_SYS_SR_ADDR);
+ sr = OR1K_SPR_SYS_SR_IEE_SET(sr, sr_iee);
+ or1k_mtspr(OR1K_SPR_SYS_SR_ADDR, sr);
+}
diff --git a/libgloss/or1k/mmu-asm.S b/libgloss/or1k/mmu-asm.S
new file mode 100644
index 000000000..535824ccb
--- /dev/null
+++ b/libgloss/or1k/mmu-asm.S
@@ -0,0 +1,67 @@
+/* mmu-asm.S -- MMU handling for OpenRISC 1000.
+ *
+ * Copyright (c) 2011, 2014 Authors
+ *
+ * Contributor Julius Baxter <juliusbaxter@gmail.com>
+ * Contributor Stefan Wallentowitz <stefan.wallentowitz@tum.de>
+ *
+ * The authors hereby grant permission to use, copy, modify, distribute,
+ * and license this software and its documentation for any purpose, provided
+ * that existing copyright notices are retained in all copies and that this
+ * notice is included verbatim in any distributions. No written agreement,
+ * license, or royalty fee is required for any of the authorized uses.
+ * Modifications to this software may be copyrighted by their authors
+ * and need not follow the licensing terms described here, provided that
+ * the new terms are clearly indicated on the first page of each file where
+ * they apply.
+ */
+
+/* -------------------------------------------------------------------------- */
+/*!Function to control MMU
+ */
+/* -------------------------------------------------------------------------- */
+
+#include "include/or1k-asm.h"
+#include "include/or1k-sprs.h"
+
+/* MMU control functions always switch MMU control with a l.rfe to return
+ from function */
+ .section .text
+
+ .global or1k_dmmu_enable
+or1k_dmmu_enable:
+ l.mfspr r3,r0,OR1K_SPR_SYS_SR_ADDR
+ l.ori r3,r3,OR1K_SPR_SYS_SR_DME_MASK
+ l.mtspr r0,r3,OR1K_SPR_SYS_ESR_BASE
+ l.mtspr r0,r9,OR1K_SPR_SYS_EPCR_BASE
+ OR1K_DELAYED_NOP(OR1K_INST(l.rfe))
+
+
+ .global or1k_dmmu_disable
+or1k_dmmu_disable:
+ l.ori r3,r0,OR1K_SPR_SYS_SR_DME_MASK
+ l.xori r4,r3,0xffff
+ l.mfspr r3,r0,OR1K_SPR_SYS_SR_ADDR
+ l.and r3,r4,r3
+ l.mtspr r0,r3,OR1K_SPR_SYS_ESR_BASE
+ l.mtspr r0,r9,OR1K_SPR_SYS_EPCR_BASE
+ OR1K_DELAYED_NOP(OR1K_INST(l.rfe))
+
+
+ .global or1k_immu_enable
+or1k_immu_enable:
+ l.mfspr r3,r0,OR1K_SPR_SYS_SR_ADDR
+ l.ori r3,r3,OR1K_SPR_SYS_SR_IME_MASK
+ l.mtspr r0,r3,OR1K_SPR_SYS_ESR_BASE
+ l.mtspr r0,r9,OR1K_SPR_SYS_EPCR_BASE
+ OR1K_DELAYED_NOP(OR1K_INST(l.rfe))
+
+ .global or1k_immu_disable
+or1k_immu_disable:
+ l.ori r3,r0,OR1K_SPR_SYS_SR_IME_MASK
+ l.xori r4,r3,0xffff
+ l.mfspr r3,r0,OR1K_SPR_SYS_SR_ADDR
+ l.and r3,r4,r3
+ l.mtspr r0,r3,OR1K_SPR_SYS_ESR_BASE
+ l.mtspr r0,r9,OR1K_SPR_SYS_EPCR_BASE
+ OR1K_DELAYED_NOP(OR1K_INST(l.rfe))
diff --git a/libgloss/or1k/or1k-internals.h b/libgloss/or1k/or1k-internals.h
new file mode 100644
index 000000000..3aabdb05d
--- /dev/null
+++ b/libgloss/or1k/or1k-internals.h
@@ -0,0 +1,67 @@
+#ifndef __OR1K_INTERNAL_H__
+#define __OR1K_INTERNAL_H__
+
+#include <stdint.h>
+#include <string.h>
+
+#include "include/or1k-support.h"
+
+extern uint8_t* _or1k_stack_top;
+extern size_t _or1k_stack_size;
+extern uint8_t* _or1k_stack_bottom;
+
+extern uint8_t* _or1k_exception_stack_top;
+extern size_t _or1k_exception_stack_size;
+extern uint8_t* _or1k_exception_stack_bottom;
+
+#ifdef __OR1K_MULTICORE__
+extern uint8_t* *_or1k_stack_core;
+extern uint8_t* *_or1k_exception_stack_core;
+#endif
+
+
+// The first two vectors are not used (address 0 and reset)
+#define OR1K_NUM_EXCEPTIONS 30
+
+typedef or1k_exception_handler_fptr or1k_exception_handler_table_t[OR1K_NUM_EXCEPTIONS];
+
+#ifdef __OR1K_MULTICORE__
+extern or1k_exception_handler_table_t *_or1k_exception_handler_table;
+#else
+extern or1k_exception_handler_table_t _or1k_exception_handler_table;
+#endif
+
+typedef or1k_interrupt_handler_fptr or1k_interrupt_handler_table_t[32];
+typedef void* or1k_interrupt_handler_data_ptr_table_t[32];
+
+#ifdef __OR1K_MULTICORE__
+extern or1k_interrupt_handler_table_t *_or1k_interrupt_handler_table;
+extern or1k_interrupt_handler_data_ptr_table_t *_or1k_interrupt_handler_data_ptr_table;
+#else
+extern or1k_interrupt_handler_table_t _or1k_interrupt_handler_table;
+extern or1k_interrupt_handler_data_ptr_table_t _or1k_interrupt_handler_data_ptr_table;
+#endif
+
+extern void _or1k_interrupt_handler(void);
+
+struct _or1k_reent {
+ /* Tick timer variable */
+ volatile uint32_t or1k_timer_ticks;
+
+ /* Tick rate storage */
+ uint32_t or1k_timer_period;
+ uint32_t or1k_timer_mode;
+};
+
+
+#ifdef __OR1K_MULTICORE__
+extern struct _or1k_reent (*_or1k_reent)[];
+#define OR1K_REENT (*_or1k_reent)[or1k_coreid()]
+#else
+extern struct _or1k_reent _or1k_reent;
+#define OR1K_REENT _or1k_reent
+#endif
+
+extern void _or1k_reent_init();
+
+#endif
diff --git a/libgloss/or1k/or1k_uart.c b/libgloss/or1k/or1k_uart.c
new file mode 100644
index 000000000..0a991e6ba
--- /dev/null
+++ b/libgloss/or1k/or1k_uart.c
@@ -0,0 +1,167 @@
+/* or1k_uart.c -- UART implementation for OpenRISC 1000.
+ *
+ *Copyright (c) 2014 Authors
+ *
+ * Contributor Stefan Wallentowitz <stefan.wallentowitz@tum.de>
+ * Contributor Olof Kindgren <olof.kindgren@gmail.com>
+ *
+ * The authors hereby grant permission to use, copy, modify, distribute,
+ * and license this software and its documentation for any purpose, provided
+ * that existing copyright notices are retained in all copies and that this
+ * notice is included verbatim in any distributions. No written agreement,
+ * license, or royalty fee is required for any of the authorized uses.
+ * Modifications to this software may be copyrighted by their authors
+ * and need not follow the licensing terms described here, provided that
+ * the new terms are clearly indicated on the first page of each file where
+ * they apply.
+ */
+
+#include "include/or1k-support.h"
+#include "or1k_uart.h"
+
+#include <stdint.h>
+
+// Register interface
+#define RB _or1k_board_uart_base + 0 // Receiver Buffer (R)
+#define THR _or1k_board_uart_base + 0 // Transmitter Holding Register (W)
+#define IER _or1k_board_uart_base + 1 // Interrupt Enable Register (RW)
+#define IIR _or1k_board_uart_base + 2 // Interrupt Identification Register (R)
+#define FCR _or1k_board_uart_base + 2 // FIFO Control Register (W)
+#define LCR _or1k_board_uart_base + 3 // Line Control Register (RW)
+#define MCR _or1k_board_uart_base + 4 // Modem Control Register (W)
+#define LSR _or1k_board_uart_base + 5 // Line Status Register (R)
+#define MSR _or1k_board_uart_base + 6 // Modem Status Register (R)
+
+// Divisor Register (Accessed when DLAB bit in LCR is set)
+#define DLB1 _or1k_board_uart_base + 0 // Divisor Latch LSB (RW)
+#define DLB2 _or1k_board_uart_base + 1 // Divisor Latch MSB (RW)
+
+// Interrupt Enable Register bits
+#define IER_RDAI 0 // Receiver Data Available Interrupt
+#define IER_TEI 1 // Transmitter Holding Register Empty Interrupt
+#define IER_RLSI 2 // Receiver Line Status Interrupt
+#define IER_MSI 3 // Modem Status Interrupt
+
+// Interrupt Identification Register Values
+#define IIR_RLS 0xC6 // Receiver Line Status
+#define IIR_RDA 0xC4 // Receiver Data Available
+#define IIR_TO 0xCC // Timeout
+#define IIR_THRE 0xC2 // Transmitter Holding Register Empty
+#define IIT_MS 0xC0 // Modem Status
+
+// FIFO Control Register bits
+#define FCR_CLRRECV 0x1 // Clear receiver FIFO
+#define FCR_CLRTMIT 0x2 // Clear transmitter FIFO
+
+// FIFO Control Register bit 7-6 values
+#define FCR_TRIG_1 0x0 // Trigger level 1 byte
+#define FCR_TRIG_4 0x40 // Trigger level 4 bytes
+#define FCR_TRIG_8 0x80 // Trigger level 8 bytes
+#define FCR_TRIG_14 0xC0 // Trigger level 14 bytes
+
+// Line Control Reigster values and bits
+#define LCR_BPC_5 0x0 // 5 bits per character
+#define LCR_BPC_6 0x1 // 6 bits per character
+#define LCR_BPC_7 0x2 // 7 bits per character
+#define LCR_BPC_8 0x3 // 8 bits per character
+#define LCR_SB_1 0x0 // 1 stop bit
+#define LCR_SB_2 0x4 // 1.5 stop bits (LCR_BPC_5) or 2 stop bits (else)
+#define LCR_PE 0x8 // Parity Enabled
+#define LCR_EPS 0x10 // Even Parity Select
+#define LCR_SP 0x20 // Stick Parity
+#define LCR_BC 0x40 // Break Control
+#define LCR_DLA 0x80 // Divisor Latch Access
+
+// Line Status Register
+#define LSR_DR 0x0 // Data Ready
+#define LSR_OE 0x2 // Overrun Error
+#define LSR_PE 0x4 // Parity Error
+#define LSR_FE 0x8 // Framing Error
+#define LSR_BI 0x10 // Break Interrupt
+#define LSR_TFE 0x20 // Transmitter FIFO Empty
+#define LSR_TEI 0x40 // Transmitter Empty Indicator
+
+/**
+ * The registered callback function
+ */
+void (*_or1k_uart_read_cb)(char c);
+
+/**
+ * This is the interrupt handler that is registered for the callback
+ * function.
+ */
+void _or1k_uart_interrupt_handler(uint32_t data)
+{
+ uint8_t iir = REG8(IIR);
+
+ // Check if this is a read fifo or timeout interrupt, bit 0
+ // indicates pending interrupt and the other bits are IIR_RDA
+ // or IIR_TO
+ if (!(iir & 0x1) || ((iir & 0xfe) != IIR_RDA) ||
+ ((iir & 0xfe) != IIR_TO)) {
+ return;
+ }
+
+ // Read character and call callback function
+ _or1k_uart_read_cb(REG8(RB));
+}
+
+int _or1k_uart_init(void)
+{
+ uint16_t divisor;
+
+ // Is uart present?
+ if (!_or1k_board_uart_base) {
+ return -1;
+ }
+
+ // Reset the callback function
+ _or1k_uart_read_cb = 0;
+
+ // Calculate and set divisor
+ divisor = _or1k_board_clk_freq / (_or1k_board_uart_baud * 16);
+ REG8(LCR) = LCR_DLA;
+ REG8(DLB1) = divisor & 0xff;
+ REG8(DLB2) = divisor >> 8;
+
+ // Set line control register:
+ // - 8 bits per character
+ // - 1 stop bit
+ // - No parity
+ // - Break disabled
+ // - Disallow access to divisor latch
+ REG8(LCR) = LCR_BPC_8;
+
+ // Reset FIFOs and set trigger level to 14 bytes
+ REG8(FCR) = FCR_CLRRECV | FCR_CLRTMIT | FCR_TRIG_14;
+
+ // Disable all interrupts
+ REG8(IER) = 0;
+
+ return 0;
+}
+
+void _or1k_uart_write(char c)
+{
+ // Wait until FIFO is empty
+ while (!(REG8(LSR) & LSR_TFE)) {}
+
+ // Write character to device
+ REG8(THR) = c;
+}
+
+void or1k_uart_set_read_cb(void (*cb)(char c))
+{
+ // Set callback function
+ _or1k_uart_read_cb = cb;
+
+ // Enable interrupt
+ REG8(IER) = 1 << IER_RDAI;
+
+ // Add the interrupt handler that calls the callback function
+ or1k_interrupt_handler_add(_or1k_board_uart_IRQ,
+ _or1k_uart_interrupt_handler, 0);
+
+ // Enable UART interrupt
+ or1k_interrupt_enable(_or1k_board_uart_IRQ);
+}
diff --git a/libgloss/or1k/or1k_uart.h b/libgloss/or1k/or1k_uart.h
new file mode 100644
index 000000000..4cbb68350
--- /dev/null
+++ b/libgloss/or1k/or1k_uart.h
@@ -0,0 +1,43 @@
+/* or1k_uart.h -- UART definitions for OpenRISC 1000.
+ *
+ * Copyright (c) 2014 Authors
+ *
+ * Contributor Stefan Wallentowitz <stefan.wallentowitz@tum.de>
+ *
+ * The authors hereby grant permission to use, copy, modify, distribute,
+ * and license this software and its documentation for any purpose, provided
+ * that existing copyright notices are retained in all copies and that this
+ * notice is included verbatim in any distributions. No written agreement,
+ * license, or royalty fee is required for any of the authorized uses.
+ * Modifications to this software may be copyrighted by their authors
+ * and need not follow the licensing terms described here, provided that
+ * the new terms are clearly indicated on the first page of each file where
+ * they apply.
+ */
+
+/* This is the generic board support for the OpenCores UART device, internal
+ * header. */
+
+#include <stdint.h>
+
+#include "board.h"
+
+/**
+ * Registered callback function
+ */
+extern void (*_or1k_uart_read_cb)(char c);
+
+/**
+ * The UART interrupt handler
+ */
+void _or1k_uart_interrupt_handler(uint32_t data);
+
+/**
+ * Initialize UART
+ */
+int _or1k_uart_init(void);
+
+/**
+ * Write character to UART
+ */
+void _or1k_uart_write(char c);
diff --git a/libgloss/or1k/outbyte.S b/libgloss/or1k/outbyte.S
new file mode 100644
index 000000000..2cd514855
--- /dev/null
+++ b/libgloss/or1k/outbyte.S
@@ -0,0 +1,34 @@
+/* outbyte.S -- Write one byte for OpenRISC 1000.
+ *
+ * Copyright (c) 2014 Authors
+ *
+ * Contributor Stefan Wallentowitz <stefan.wallentowitz@tum.de>
+ *
+ * The authors hereby grant permission to use, copy, modify, distribute,
+ * and license this software and its documentation for any purpose, provided
+ * that existing copyright notices are retained in all copies and that this
+ * notice is included verbatim in any distributions. No written agreement,
+ * license, or royalty fee is required for any of the authorized uses.
+ * Modifications to this software may be copyrighted by their authors
+ * and need not follow the licensing terms described here, provided that
+ * the new terms are clearly indicated on the first page of each file where
+ * they apply.
+ */
+
+#include "include/or1k-asm.h"
+
+.global _or1k_outbyte
+
+.text
+_or1k_outbyte:
+ LOAD_SYMBOL_2_GPR(r4,_or1k_board_uart_base)
+ l.lwz r4, 0(r4)
+ l.sfeq r4, r0
+ OR1K_DELAYED_NOP(l.bf .Lnouart)
+.Luart:
+ OR1K_DELAYED_NOP(l.j _or1k_uart_write)
+.Lnouart:
+ OR1K_DELAYED(
+ OR1K_INST(l.nop 0x4),
+ OR1K_INST(l.jr r9)
+ )
diff --git a/libgloss/or1k/sbrk.c b/libgloss/or1k/sbrk.c
new file mode 100644
index 000000000..0c3e66e87
--- /dev/null
+++ b/libgloss/or1k/sbrk.c
@@ -0,0 +1,53 @@
+/* sbrk.c -- allocate space on heap on OpenRISC 1000.
+ *
+ * Copyright (c) 2014 Authors
+ *
+ * Contributor Stefan Wallentowitz <stefan.wallentowitz@tum.de>
+ *
+ * The authors hereby grant permission to use, copy, modify, distribute,
+ * and license this software and its documentation for any purpose, provided
+ * that existing copyright notices are retained in all copies and that this
+ * notice is included verbatim in any distributions. No written agreement,
+ * license, or royalty fee is required for any of the authorized uses.
+ * Modifications to this software may be copyrighted by their authors
+ * and need not follow the licensing terms described here, provided that
+ * the new terms are clearly indicated on the first page of each file where
+ * they apply.
+ */
+
+#include <reent.h>
+
+#include "include/or1k-support.h"
+
+extern uint32_t end; /* Set by linker. */
+uint32_t _or1k_heap_start = &end;
+uint32_t _or1k_heap_end;
+
+void *
+_sbrk_r (struct _reent * reent, ptrdiff_t incr)
+{
+ uint32_t prev_heap_end;
+
+ // This needs to be atomic
+
+ // Disable interrupts on this core
+ uint32_t sr_iee = or1k_interrupts_disable();
+ uint32_t sr_tee = or1k_timer_disable();
+
+ // Initialize heap end to end if not initialized before
+ or1k_sync_cas((void*) &_or1k_heap_end, 0, (uint32_t) _or1k_heap_start);
+
+ do {
+ // Read previous heap end
+ prev_heap_end = _or1k_heap_end;
+ // and try to set it to the new value as long as it has changed
+ } while (or1k_sync_cas((void*) &_or1k_heap_end,
+ (uint32_t) prev_heap_end,
+ (uint32_t) (prev_heap_end + incr)) != (uint32_t) prev_heap_end);
+
+ // Restore interrupts on this core
+ or1k_timer_restore(sr_tee);
+ or1k_interrupts_restore(sr_iee);
+
+ return (void*) prev_heap_end;
+}
diff --git a/libgloss/or1k/sync-asm.S b/libgloss/or1k/sync-asm.S
new file mode 100644
index 000000000..911e2552f
--- /dev/null
+++ b/libgloss/or1k/sync-asm.S
@@ -0,0 +1,135 @@
+#include "include/or1k-asm.h"
+#include "include/or1k-sprs.h"
+
+ .section .text
+
+
+ .global or1k_has_multicore_support
+ .type or1k_has_multicore_support,@function
+or1k_has_multicore_support:
+#ifdef __OR1K_MULTICORE__
+ // Return 1
+ OR1K_DELAYED(
+ OR1K_INST(l.ori r11,r0,1),
+ OR1K_INST(l.jr r9)
+ )
+#else
+ // Return 0
+ OR1K_DELAYED(
+ OR1K_INST(l.or r11,r0,r0),
+ OR1K_INST(l.jr r9)
+ )
+#endif
+
+ .global or1k_coreid
+ .type or1k_coreid,@function
+or1k_coreid:
+#ifdef __OR1K_MULTICORE__
+ // Return SPR with core identifier
+ OR1K_DELAYED(
+ OR1K_INST(l.mfspr r11,r0,OR1K_SPR_SYS_COREID_ADDR),
+ OR1K_INST(l.jr r9)
+ )
+#else
+ // Return 0
+ OR1K_DELAYED(
+ OR1K_INST(l.or r11,r0,r0),
+ OR1K_INST(l.jr r9)
+ )
+#endif
+
+ .global or1k_numcores
+ .type or1k_numcores,@function
+or1k_numcores:
+#ifdef __OR1K_MULTICORE__
+ // Return SPR with number of cores
+ OR1K_DELAYED(
+ OR1K_INST(l.mfspr r11,r0,OR1K_SPR_SYS_NUMCORES_ADDR),
+ OR1K_INST(l.jr r9)
+ )
+#else
+ // Return 1
+ OR1K_DELAYED(
+ OR1K_INST(l.ori r11,r0,1),
+ OR1K_INST(l.jr r9)
+ )
+#endif
+
+ .global or1k_sync_ll
+ .type or1k_sync_ll,@function
+or1k_sync_ll:
+#ifdef __OR1K_MULTICORE__
+ // Load word atomic
+ OR1K_DELAYED(
+ OR1K_INST(l.lwa r11, 0(r3)),
+ OR1K_INST(l.jr r9)
+ )
+#else
+ // Simply load word, TODO: throw exception? which?
+ OR1K_DELAYED(
+ OR1K_INST(l.lwz r11, 0(r3)),
+ OR1K_INST(l.jr r9)
+ )
+#endif
+
+ .global or1k_sync_sc
+ .type or1k_sync_sc,@function
+or1k_sync_sc:
+#ifdef __OR1K_MULTICORE__
+ // swa sets the flag if it was succesfull
+ // Store the value to address and set flag
+ l.swa 0(r3),r4
+ OR1K_DELAYED(
+ // Set return to success speculatively (may go to delay slot)
+ OR1K_INST(l.ori r11,r0,1),
+ // If the swa was successfull, jump to end
+ OR1K_INST(l.bf .or1k_sync_sc_done)
+ )
+ // If the swa was not successfull, set
+ l.or r11,r0,r0
+.or1k_sync_sc_done:
+ OR1K_DELAYED_NOP(OR1K_INST(l.jr r9))
+#else
+ // Simply store word, TODO: throw exception? which?
+ OR1K_DELAYED(
+ OR1K_INST(l.sw 0(r3),r4),
+ OR1K_INST(l.jr r9)
+ )
+#endif
+
+
+ .global or1k_sync_cas
+ .type or1k_sync_sc,@function
+or1k_sync_cas:
+#ifdef __OR1K_MULTICORE__
+ /* Load linked address value to return register */
+ l.lwa r11,0(r3)
+ /* Compare value to parameter */
+ l.sfeq r11,r4
+ /* If not equal: abort and return the read value */
+ OR1K_DELAYED_NOP(OR1K_INST(l.bnf .or1k_sync_cas_done))
+ /* If compare was successfull: try writing */
+ l.swa 0(r3),r5
+ /* If writing was not successful: restart */
+ OR1K_DELAYED_NOP(OR1K_INST(l.bnf or1k_sync_cas))
+.or1k_sync_cas_done:
+ /* Return value is the original read value */
+ OR1K_DELAYED_NOP(OR1K_INST(l.jr r9))
+#else
+ // Non-atomic CAS, TODO: throw exception? which?
+ l.lwz r11,0(r3)
+ l.sfeq r11,r4
+ OR1K_DELAYED_NOP(OR1K_INST(l.bnf .or1k_sync_cas_done))
+ l.sw 0(r3),r5
+.or1k_sync_cas_done:
+ OR1K_DELAYED_NOP(OR1K_INST(l.jr r9))
+#endif
+
+ .global or1k_sync_tsl
+ .type or1k_sync_tsl,@function
+or1k_sync_tsl:
+ l.or r4,r0,r0
+ OR1K_DELAYED(
+ OR1K_INST(l.addi r5,r0,1),
+ OR1K_INST(l.j or1k_sync_cas)
+ )
diff --git a/libgloss/or1k/syscalls.c b/libgloss/or1k/syscalls.c
new file mode 100644
index 000000000..690d21ad1
--- /dev/null
+++ b/libgloss/or1k/syscalls.c
@@ -0,0 +1,160 @@
+/* syscalls.c -- reentrant syscalls for OpenRISC 1000.
+ *
+ * Copyright (c) 2011, 2014 Authors
+ *
+ * Contributor Julius Baxter <juliusbaxter@gmail.com>
+ * Contributor Stefan Wallentowitz <stefan.wallentowitz@tum.de>
+ *
+ * The authors hereby grant permission to use, copy, modify, distribute,
+ * and license this software and its documentation for any purpose, provided
+ * that existing copyright notices are retained in all copies and that this
+ * notice is included verbatim in any distributions. No written agreement,
+ * license, or royalty fee is required for any of the authorized uses.
+ * Modifications to this software may be copyrighted by their authors
+ * and need not follow the licensing terms described here, provided that
+ * the new terms are clearly indicated on the first page of each file where
+ * they apply.
+ */
+
+#include <errno.h>
+#include <reent.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <sys/time.h>
+#include "board.h"
+
+/* Write is actually the only thing we provide. All other are stubs.. */
+
+extern void _or1k_outbyte(char c);
+
+_ssize_t
+_write_r(struct _reent * reent, int fd, const void *buf, size_t nbytes)
+{
+ int i;
+ char* b = (char*) buf;
+
+ for (i = 0; i < nbytes; i++) {
+ if (*(b + i) == '\n') {
+ _or1k_outbyte ('\r');
+ }
+ _or1k_outbyte (*(b + i));
+ }
+ return (nbytes);
+}
+
+void
+_exit(int rc)
+{
+ _or1k_board_exit();
+ while (1) {}
+}
+
+int
+_close_r(struct _reent *reent, int fildes)
+{
+ reent->_errno = ENOSYS;
+ return -1;
+}
+
+char *__env[1] = { 0 };
+char **environ = __env;
+
+int
+_execve_r(struct _reent *reent, const char *name, char * const *argv,
+ char * const *env)
+{
+ reent->_errno = ENOSYS;
+ return -1;
+}
+
+int
+_fork_r(struct _reent *reent)
+{
+ errno = ENOSYS;
+ return -1;
+}
+
+int
+_fstat_r(struct _reent *reent, int fildes, struct stat *st)
+{
+ reent->_errno = ENOSYS;
+ return -1;
+}
+
+int
+_getpid_r(struct _reent *reent)
+{
+ reent->_errno = ENOSYS;
+ return -1;
+}
+
+int
+_gettimeofday(struct _reent *reent, struct timeval *ptimeval, void *ptimezone)
+{
+ reent->_errno = ENOSYS;
+ return -1;
+}
+
+int
+_isatty_r(struct _reent *reent, int file)
+{
+ reent->_errno = ENOSYS;
+ return 0;
+}
+
+int
+_kill_r(struct _reent *reent, int pid, int sig)
+{
+ reent->_errno = ENOSYS;
+ return -1;
+}
+
+int
+_link_r(struct _reent *reent, const char *existing, const char *new)
+{
+ reent->_errno = ENOSYS;
+ return -1;
+}
+
+_off_t
+_lseek_r(struct _reent *reent, int file, _off_t ptr, int dir)
+{
+ errno = ENOSYS;
+ return -1;
+}
+
+int
+_open(struct _reent *reent, char *file, int flags, int mode)
+{
+ reent->_errno = ENOSYS;
+ return -1;
+}
+
+_ssize_t
+_read_r(struct _reent *reent, int file, void *ptr, size_t len)
+{
+ reent->_errno = ENOSYS;
+ return -1;
+}
+
+int
+_readlink_r(struct _reent *reent, const char *path, char *buf, size_t bufsize)
+{
+ reent->_errno = ENOSYS;
+ return -1;
+}
+
+int
+_stat_r(struct _reent *reent, const char *path, struct stat *buf)
+{
+ reent->_errno = EIO;
+ return -1;
+}
+
+int
+_unlink_r(struct _reent *reent, const char * path)
+{
+ reent->_errno = EIO;
+ return (-1);
+}
+
diff --git a/libgloss/or1k/timer.c b/libgloss/or1k/timer.c
new file mode 100644
index 000000000..db45d3aad
--- /dev/null
+++ b/libgloss/or1k/timer.c
@@ -0,0 +1,186 @@
+/* timer.c -- tick timer functions for OpenRISC 1000.
+ *
+ * Copyright (c) 2011, 2014 Authors
+ *
+ * Contributor Julius Baxter <juliusbaxter@gmail.com>
+ * Contributor Stefan Wallentowitz <stefan.wallentowitz@tum.de>
+ *
+ * The authors hereby grant permission to use, copy, modify, distribute,
+ * and license this software and its documentation for any purpose, provided
+ * that existing copyright notices are retained in all copies and that this
+ * notice is included verbatim in any distributions. No written agreement,
+ * license, or royalty fee is required for any of the authorized uses.
+ * Modifications to this software may be copyrighted by their authors
+ * and need not follow the licensing terms described here, provided that
+ * the new terms are clearly indicated on the first page of each file where
+ * they apply.
+ */
+
+#include "include/or1k-support.h"
+#include "include/or1k-sprs.h"
+
+#include "or1k-internals.h"
+#include "board.h"
+
+/* --------------------------------------------------------------------------*/
+/*!Tick timer interrupt handler
+
+ Increment timer ticks counter, reload TTMR
+ */
+/* --------------------------------------------------------------------------*/
+void
+_or1k_timer_interrupt_handler(void)
+{
+ OR1K_REENT.or1k_timer_ticks++;
+ uint32_t ttmr = or1k_mfspr(OR1K_SPR_TICK_TTMR_ADDR);
+ ttmr = OR1K_SPR_TICK_TTMR_IE_SET(ttmr, 1);
+ ttmr = OR1K_SPR_TICK_TTMR_MODE_SET(ttmr, OR1K_SPR_TICK_TTMR_MODE_RESTART);
+ ttmr = OR1K_SPR_TICK_TTMR_IP_SET(ttmr, 0);
+ or1k_mtspr(OR1K_SPR_TICK_TTMR_ADDR, ttmr);
+}
+
+/* --------------------------------------------------------------------------*/
+/*!Enable tick timer
+
+ Install handler, calculate TTMR period, reset tick counter
+
+ @param[in] hz Rate at which to trigger timer ticks */
+/* --------------------------------------------------------------------------*/
+int
+or1k_timer_init(unsigned int hz)
+{
+ uint32_t upr = or1k_mfspr(OR1K_SPR_SYS_UPR_ADDR);
+ if (OR1K_SPR_SYS_UPR_TTP_GET(upr) == 0) {
+ return -1;
+ }
+
+ /* Set this, for easy access when reloading */
+ uint32_t period = (_or1k_board_clk_freq/hz) & OR1K_SPR_TICK_TTMR_TP_MASK;
+ OR1K_REENT.or1k_timer_period = period;
+ or1k_mtspr(OR1K_SPR_TICK_TTMR_ADDR, period);
+
+ /* Reset timer tick counter */
+ OR1K_REENT.or1k_timer_ticks = 0;
+
+ /* Install handler */
+ or1k_exception_handler_add(0x5, _or1k_timer_interrupt_handler);
+ OR1K_REENT.or1k_timer_mode = OR1K_SPR_TICK_TTMR_MODE_RESTART;
+
+ /* Reset counter register */
+ or1k_mtspr(OR1K_SPR_TICK_TTCR_ADDR, 0);
+
+ return 0;
+}
+
+void
+or1k_timer_set_period(uint32_t hz)
+{
+ uint32_t period = (_or1k_board_clk_freq/hz) & OR1K_SPR_TICK_TTMR_TP_MASK;
+ uint32_t ttmr = or1k_mfspr(OR1K_SPR_TICK_TTMR_ADDR);
+ ttmr = OR1K_SPR_TICK_TTMR_TP_SET(ttmr, period);
+ or1k_mtspr(OR1K_SPR_TICK_TTMR_ADDR, ttmr);
+ OR1K_REENT.or1k_timer_period = period;
+}
+
+void
+or1k_timer_set_handler(void (*handler)(void))
+{
+ or1k_exception_handler_add(0x5, handler);
+}
+
+void
+or1k_timer_set_mode(uint32_t mode)
+{
+ // Store mode in variable
+ OR1K_REENT.or1k_timer_mode = mode;
+
+ uint32_t ttmr = or1k_mfspr(OR1K_SPR_TICK_TTMR_ADDR);
+ // If the timer is currently running, we also change the mode
+ if (OR1K_SPR_TICK_TTMR_MODE_GET(ttmr) != 0) {
+ ttmr = OR1K_SPR_TICK_TTMR_MODE_SET(ttmr, mode);
+ or1k_mtspr(OR1K_SPR_TICK_TTMR_ADDR, ttmr);
+ }
+}
+
+/* --------------------------------------------------------------------------*/
+/*!Enable tick timer
+
+ Enable timer interrupt, install handler, load TTMR
+ */
+/* --------------------------------------------------------------------------*/
+void
+or1k_timer_enable(void)
+{
+ uint32_t ttmr = or1k_mfspr(OR1K_SPR_TICK_TTMR_ADDR);
+ ttmr = OR1K_SPR_TICK_TTMR_IE_SET(ttmr, 1);
+ ttmr = OR1K_SPR_TICK_TTMR_MODE_SET(ttmr, OR1K_REENT.or1k_timer_mode);
+ or1k_mtspr(OR1K_SPR_TICK_TTMR_ADDR, ttmr);
+
+ uint32_t sr = or1k_mfspr(OR1K_SPR_SYS_SR_ADDR);
+ sr = OR1K_SPR_SYS_SR_TEE_SET(sr, 1);
+ or1k_mtspr(OR1K_SPR_SYS_SR_ADDR, sr);
+}
+
+/* --------------------------------------------------------------------------*/
+/*!Disable tick timer
+
+ Disable timer interrupt in SR
+ */
+/* --------------------------------------------------------------------------*/
+uint32_t
+or1k_timer_disable(void)
+{
+ uint32_t oldsr = or1k_mfspr(OR1K_SPR_SYS_SR_ADDR);
+ uint32_t sr = OR1K_SPR_SYS_SR_TEE_SET(oldsr, 0);
+ or1k_mtspr(OR1K_SPR_SYS_SR_ADDR, sr);
+ return OR1K_SPR_SYS_SR_TEE_GET(oldsr);
+}
+
+void
+or1k_timer_restore(uint32_t sr_tee)
+{
+ uint32_t sr = or1k_mfspr(OR1K_SPR_SYS_SR_ADDR);
+ sr = OR1K_SPR_SYS_SR_TEE_SET(sr, sr_tee);
+ or1k_mtspr(OR1K_SPR_SYS_SR_ADDR, sr);
+}
+
+void
+or1k_timer_pause(void)
+{
+ uint32_t ttmr = or1k_mfspr(OR1K_SPR_TICK_TTMR_ADDR);
+ ttmr = OR1K_SPR_TICK_TTMR_MODE_SET(ttmr, OR1K_SPR_TICK_TTMR_MODE_DISABLE);
+ or1k_mtspr(OR1K_SPR_TICK_TTMR_ADDR, ttmr);
+}
+
+void
+or1k_timer_reset(void)
+{
+ uint32_t ttmr = or1k_mfspr(OR1K_SPR_TICK_TTMR_ADDR);
+ ttmr = OR1K_SPR_TICK_TTMR_IP_SET(ttmr, 0);
+ or1k_mtspr(OR1K_SPR_TICK_TTMR_ADDR, ttmr);
+ or1k_mtspr(OR1K_SPR_TICK_TTCR_ADDR, 0);
+}
+
+/* --------------------------------------------------------------------------*/
+/*!Get tick timer
+
+ Return value of tick timer
+ */
+/* --------------------------------------------------------------------------*/
+unsigned long
+or1k_timer_get_ticks(void)
+{
+ return OR1K_REENT.or1k_timer_ticks;
+}
+
+/* --------------------------------------------------------------------------*/
+/*!Reset tick timer
+
+ Clear value of tick timer
+ */
+/* --------------------------------------------------------------------------*/
+void
+or1k_timer_reset_ticks(void)
+{
+ OR1K_REENT.or1k_timer_ticks = 0;
+}
diff --git a/libgloss/or1k/util.c b/libgloss/or1k/util.c
new file mode 100644
index 000000000..d2ee84d56
--- /dev/null
+++ b/libgloss/or1k/util.c
@@ -0,0 +1,97 @@
+/* util.c -- Utility functions for OpenRISC 1000.
+ *
+ * Copyright (c) 2014 Authors
+ *
+ * Contributor Julius Baxter <julius.baxter@orsoc.se>
+ * Contributor Stefan Wallentowitz <stefan.wallentowitz@tum.de>
+ *
+ * The authors hereby grant permission to use, copy, modify, distribute,
+ * and license this software and its documentation for any purpose, provided
+ * that existing copyright notices are retained in all copies and that this
+ * notice is included verbatim in any distributions. No written agreement,
+ * license, or royalty fee is required for any of the authorized uses.
+ * Modifications to this software may be copyrighted by their authors
+ * and need not follow the licensing terms described here, provided that
+ * the new terms are clearly indicated on the first page of each file where
+ * they apply.
+ */
+
+#include <stdint.h>
+#include <stddef.h>
+#include <reent.h>
+
+#include "or1k-internals.h"
+
+#ifdef __OR1K_MULTICORE__
+// Define pointers to arrays
+uint8_t* *_or1k_stack_core;
+uint8_t* *_or1k_exception_stack_core;
+uint32_t* *_or1k_exception_level;
+#else
+// Define scalar
+uint32_t _or1k_exception_level;
+#endif
+
+uint8_t* _or1k_stack_top;
+uint8_t* _or1k_stack_bottom;
+
+uint8_t* _or1k_exception_stack_top;
+uint8_t* _or1k_exception_stack_bottom;
+
+void _or1k_init() {
+#ifdef __OR1K_MULTICORE__
+ uint32_t c;
+
+ // Initialize stacks
+ _or1k_stack_core = _sbrk_r(0, sizeof(uint8_t*) * or1k_numcores());
+ _or1k_exception_stack_core = _sbrk_r(0, sizeof(uint8_t*) * or1k_numcores());
+
+ _or1k_stack_core[0] = _or1k_stack_top;
+ _or1k_exception_stack_core[0] = _or1k_exception_stack_top;
+
+ for (c = 1; c < or1k_numcores(); c++) {
+ _or1k_stack_core[c] = _or1k_stack_core[c-1] - _or1k_stack_size;
+ _or1k_exception_stack_core[c] = _or1k_exception_stack_core[c-1] -
+ _or1k_exception_stack_size;
+ }
+
+ size_t exc_size = sizeof(void*) * or1k_numcores() * OR1K_NUM_EXCEPTIONS;
+ _or1k_exception_handler_table = _sbrk_r(0, exc_size);
+
+ size_t int_size = sizeof(void*) * or1k_numcores() * 32;
+ size_t intdata_size = sizeof(void*) * or1k_numcores() * 32;
+ _or1k_interrupt_handler_table = _sbrk_r(0, int_size);
+ _or1k_interrupt_handler_data_ptr_table = _sbrk_r(0, intdata_size);
+#endif
+
+ _or1k_reent_init();
+
+#ifdef __OR1K_MULTICORE__
+ for (c = 0; c < or1k_numcores(); c++) {
+ _or1k_exception_handler_table[c][6] = _or1k_interrupt_handler;
+ }
+#else
+ _or1k_exception_handler_table[6] = _or1k_interrupt_handler;
+#endif
+
+#ifdef __OR1K_MULTICORE__
+ _or1k_exception_level = _sbrk_r(0, 4 * or1k_numcores());
+ for (c = 0; c < or1k_numcores(); c++) {
+ _or1k_exception_level[c] = 0;
+ }
+#else
+ _or1k_exception_level = 0;
+#endif
+}
+
+uint32_t or1k_critical_begin() {
+ uint32_t iee = or1k_interrupts_disable();
+ uint32_t tee = or1k_timer_disable();
+ return (iee << 1) | tee;
+}
+
+void or1k_critical_end(uint32_t restore) {
+ or1k_timer_restore(restore & 0x1);
+ or1k_interrupts_restore((restore >> 1) & 0x1);
+}
+
diff --git a/libgloss/rl78/Makefile.in b/libgloss/rl78/Makefile.in
index bdb634032..4662d45cb 100644
--- a/libgloss/rl78/Makefile.in
+++ b/libgloss/rl78/Makefile.in
@@ -67,6 +67,7 @@ SIM_OBJS = \
close.o \
read.o \
write.o \
+ swrite.o \
lseek.o \
unlink.o \
getpid.o \
@@ -135,11 +136,11 @@ write.o : $(SDEPS)
install: $(CRT) $(SIM_BSP) $(SCRIPTS)
for c in $(CRT) $(SIM_BSP); do \
- $(INSTALL_DATA) $$c $(tooldir)/lib${MULTISUBDIR}/$$c ;\
+ $(INSTALL_DATA) $$c $(DESTDIR)$(tooldir)/lib${MULTISUBDIR}/$$c ;\
done
for c in $(SCRIPTS); do \
b=`basename $$c`; \
- $(INSTALL_DATA) $$c $(tooldir)/lib${MULTISUBDIR}/$$b ;\
+ $(INSTALL_DATA) $$c $(DESTDIR)$(tooldir)/lib${MULTISUBDIR}/$$b ;\
done
clean mostlyclean:
diff --git a/libgloss/rl78/crt0.S b/libgloss/rl78/crt0.S
index d5a07df90..649178c46 100644
--- a/libgloss/rl78/crt0.S
+++ b/libgloss/rl78/crt0.S
@@ -147,55 +147,47 @@ _start:
;; block move to initialize .data
- ;; we're copying from 00:[_romdatastart] to 0F:[_datastart]
- ;; and our data is not in the mirrored area.
mov es, #0
-
- sel rb0 ; bank 0
- movw hl, #__datastart
- movw de, #__romdatastart
- sel rb1 ; bank 1
- movw ax, #__romdatacopysize
- shrw ax,1
-1:
+ movw bc, #__romdatacopysize
+1:
+ movw ax, bc
cmpw ax, #0
bz $1f
- decw ax
- sel rb0 ; bank 0
- movw ax, es:[de]
- movw [hl], ax
- incw de
- incw de
- incw hl
- incw hl
- sel rb1
+ decw bc
+ decw bc
+ movw ax, es:__romdatastart[bc]
+ movw __datastart[bc], ax
br $1b
-1:
- sel rb0 ; bank 0
+1:
+
+ mov es, #0
+ movw bc, #__romsaddrcopysize
+1:
+ movw ax, bc
+ cmpw ax, #0
+ bz $1f
+ decw bc
+ decw bc
+ movw ax, es:__romsaddrstart[bc]
+ movw __saddrstart[bc], ax
+ br $1b
+1:
;; block fill to .bss
- sel rb0 ; bank 0
- movw hl, #__bssstart
- movw ax, #0
- sel rb1 ; bank 1
- movw ax, #__bsssize
- shrw ax,1
+ movw bc, #__bsssize
+ movw ax, #0
+ cmpw ax, bc
+ bz $_bss_zero_done
1:
- cmpw ax, #0
- bz $1f
- decw ax
- sel rb0 ; bank 0
- movw [hl], ax
- incw hl
- incw hl
- sel rb1
- br $1b
-1:
- sel rb0 ; bank 0
-
+ decw bc
+ decw bc
+ movw __bssstart[bc], ax
+ cmpw ax, bc
+ bnz $1b
+_bss_zero_done:
call !!__rl78_init
diff --git a/libgloss/rl78/rl78-sim.ld b/libgloss/rl78/rl78-sim.ld
index f69fb95d5..dece2c6bc 100644
--- a/libgloss/rl78/rl78-sim.ld
+++ b/libgloss/rl78/rl78-sim.ld
@@ -43,8 +43,10 @@ MEMORY {
IVEC (r) : ORIGIN = 0x00004, LENGTH = 0x0007c
OPT (r) : ORIGIN = 0x000c0, LENGTH = 0x00004
ROM (r) : ORIGIN = 0x000d8, LENGTH = 0x7ff28
- RAM (w) : ORIGIN = 0xf8000, LENGTH = 0x07ee0
- STACK (w) : ORIGIN = 0xffee0, LENGTH = 0x00002
+/* The G10 variant needs to use RAM for virtual registers. */
+ RAM (w) : ORIGIN = 0xf8000, LENGTH = 0x07e20
+ STACK (w) : ORIGIN = 0xffe20, LENGTH = 0x00002
+ SADDR (w) : ORIGIN = 0xffe20, LENGTH = 0x000a0
}
SECTIONS
@@ -64,7 +66,7 @@ SECTIONS
/* CubeSuite always starts at 0xd8. */
.csstart : {
- *(.csstart)
+ KEEP (*(.csstart))
} > ROM
/* For code that must be in the first 64k, or could fill unused
@@ -120,11 +122,36 @@ SECTIONS
} > RAM
PROVIDE (__bsssize = SIZEOF(.bss));
+ /* The __stack_size value of 0x100 is just a guess, but since it is
+ PROVIDEd the user can override it on the command line. It has to be
+ set here, rather than inside the .stack section, as symbols defined
+ inside sections are only evaluated during the final phase of the link,
+ long after the ASSERT is checked. An ASSERT referencing a PROVIDED but
+ not yet evaluated symbol will automatically fail.
+
+ FIXME: It would be nice if this value could be automatically set via
+ gcc's -fstack-usage command line option somehow. */
+ PROVIDE (__stack_size = 0x100);
+
.stack (ORIGIN (STACK)) :
{
PROVIDE (__stack = .);
*(.stack)
+
+ /* Linker section checking ignores empty sections like
+ this one so we have to have our own test here. */
+ ASSERT ((__stack > (_end + __stack_size)),
+ "Error: Too much data - no room left for the stack");
}
+
+ .saddr : {
+ . = ALIGN(2);
+ PROVIDE (__saddrstart = .);
+ *(.saddr)
+ . = ALIGN(2);
+ } >SADDR AT>ROM
+ PROVIDE(__romsaddrstart = LOADADDR(.saddr));
+ PROVIDE (__romsaddrcopysize = SIZEOF(.saddr));
.rodata (MAX(__romdatastart + __romdatacopysize, 0x1000)) : {
. = ALIGN(2);
@@ -169,6 +196,10 @@ SECTIONS
KEEP (*(.dtors))
} > ROM
+ .frodata : {
+ *(.frodata)
+ } > ROM
+
.text :
{
PROVIDE (_start = .);
@@ -186,6 +217,7 @@ SECTIONS
} > ROM
/* The rest are all not normally part of the runtime image. */
+ PROVIDE (__rl78_abs__ = 0);
/* Stabs debugging sections. */
.stab 0 : { *(.stab) }
@@ -210,7 +242,7 @@ SECTIONS
/* DWARF 2 */
.debug_info 0 : { *(.debug_info .gnu.linkonce.wi.*) }
.debug_abbrev 0 : { *(.debug_abbrev) }
- .debug_line 0 : { *(.debug_line) }
+ .debug_line 0 : { *(.debug_line .debug_line.* .debug_line_end ) }
.debug_frame 0 : { *(.debug_frame) }
.debug_str 0 : { *(.debug_str) }
.debug_loc 0 : { *(.debug_loc) }
diff --git a/libgloss/rl78/rl78-sys.h b/libgloss/rl78/rl78-sys.h
index 281dad07f..a51e6fcdc 100644
--- a/libgloss/rl78/rl78-sys.h
+++ b/libgloss/rl78/rl78-sys.h
@@ -31,23 +31,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include "syscall.h"
-
-r8 = 0xffef0
-r9 = 0xffef1
-r10 = 0xffef2
-r11 = 0xffef3
-r12 = 0xffef4
-r13 = 0xffef5
-r14 = 0xffef6
-r15 = 0xffef7
-r16 = 0xffee8
-r17 = 0xffee9
-r18 = 0xffeea
-r19 = 0xffeeb
-r20 = 0xffeec
-r21 = 0xffeed
-r22 = 0xffeee
-r23 = 0xffeef
+#include "vregs.h"
#define SYS__exit SYS_exit
diff --git a/libgloss/rl78/rl78.ld b/libgloss/rl78/rl78.ld
index f062e2c90..0485bc680 100644
--- a/libgloss/rl78/rl78.ld
+++ b/libgloss/rl78/rl78.ld
@@ -43,8 +43,10 @@ MEMORY {
IVEC (r) : ORIGIN = 0x00004, LENGTH = 0x0007c
OPT (r) : ORIGIN = 0x000c0, LENGTH = 0x00004
ROM (r) : ORIGIN = 0x000d8, LENGTH = 0x0ff28
- RAM (w) : ORIGIN = 0xfef00, LENGTH = 0x00fe0
- STACK (w) : ORIGIN = 0xffee0, LENGTH = 0x00002
+/* The G10 variant needs to use RAM for virtual registers. */
+ RAM (w) : ORIGIN = 0xfef00, LENGTH = 0x00f20
+ STACK (w) : ORIGIN = 0xffe20, LENGTH = 0x00002
+ SADDR (w) : ORIGIN = 0xffe20, LENGTH = 0x000a0
}
SECTIONS
@@ -64,7 +66,7 @@ SECTIONS
/* CubeSuite always starts at 0xd8. */
.csstart : {
- *(.csstart)
+ KEEP (*(.csstart))
} > ROM
/* For code that must be in the first 64k, or could fill unused
@@ -120,12 +122,37 @@ SECTIONS
} > RAM
PROVIDE (__bsssize = SIZEOF(.bss));
+ /* The __stack_size value of 0x100 is just a guess, but since it is
+ PROVIDEd the user can override it on the command line. It has to be
+ set here, rather than inside the .stack section, as symbols defined
+ inside sections are only evaluated during the final phase of the link,
+ long after the ASSERT is checked. An ASSERT referencing a PROVIDED but
+ not yet evaluated symbol will automatically fail.
+
+ FIXME: It would be nice if this value could be automatically set via
+ gcc's -fstack-usage command line option somehow. */
+ PROVIDE (__stack_size = 0x100);
+
.stack (ORIGIN (STACK)) :
{
PROVIDE (__stack = .);
*(.stack)
+
+ /* Linker section checking ignores empty sections like
+ this one so we have to have our own test here. */
+ ASSERT ((__stack > (_end + __stack_size)),
+ "Error: Too much data - no room left for the stack");
}
+ .saddr : {
+ . = ALIGN(2);
+ PROVIDE (__saddrstart = .);
+ *(.saddr)
+ . = ALIGN(2);
+ } >SADDR AT>ROM
+ PROVIDE(__romsaddrstart = LOADADDR(.saddr));
+ PROVIDE (__romsaddrcopysize = SIZEOF(.saddr));
+
.rodata (MAX(__romdatastart + __romdatacopysize, 0x2000)) : {
. = ALIGN(2);
*(.plt)
@@ -169,6 +196,10 @@ SECTIONS
KEEP (*(.dtors))
} > ROM
+ .frodata : {
+ *(.frodata)
+ } > ROM
+
.text :
{
PROVIDE (_start = .);
@@ -187,6 +218,9 @@ SECTIONS
/* The rest are all not normally part of the runtime image. */
+ /* The rest are all not normally part of the runtime image. */
+ PROVIDE (__rl78_abs__ = 0);
+
/* Stabs debugging sections. */
.stab 0 : { *(.stab) }
.stabstr 0 : { *(.stabstr) }
@@ -210,7 +244,7 @@ SECTIONS
/* DWARF 2 */
.debug_info 0 : { *(.debug_info .gnu.linkonce.wi.*) }
.debug_abbrev 0 : { *(.debug_abbrev) }
- .debug_line 0 : { *(.debug_line) }
+ .debug_line 0 : { *(.debug_line .debug_line.* .debug_line_end ) }
.debug_frame 0 : { *(.debug_frame) }
.debug_str 0 : { *(.debug_str) }
.debug_loc 0 : { *(.debug_loc) }
diff --git a/libgloss/rl78/swrite.S b/libgloss/rl78/swrite.S
new file mode 100644
index 000000000..a9f4158bc
--- /dev/null
+++ b/libgloss/rl78/swrite.S
@@ -0,0 +1,41 @@
+/*
+
+Copyright (c) 2011 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.
+
+*/
+
+#include "rl78-sys.h"
+
+
+ .global __SYS_write
+ .type __SYS_write, @function
+__SYS_write:
+ SYSCALL(SYS_write)
+ .size __SYS_write, . - __SYS_write
+
diff --git a/libgloss/rl78/vregs.h b/libgloss/rl78/vregs.h
new file mode 100644
index 000000000..fa488fabc
--- /dev/null
+++ b/libgloss/rl78/vregs.h
@@ -0,0 +1,56 @@
+
+; real
+; GAS defines r0..r7 as aliases for real registers; we want the saddr
+; forms here.
+r_0 = 0xffef8
+r_1 = 0xffef9
+r_2 = 0xffefa
+r_3 = 0xffefb
+r_4 = 0xffefc
+r_5 = 0xffefd
+r_6 = 0xffefe
+r_7 = 0xffeff
+
+#ifdef __RL78_G10__
+
+; clobberable
+r8 = 0xffec8
+r9 = 0xffec9
+r10 = 0xffeca
+r11 = 0xffecb
+r12 = 0xffecc
+r13 = 0xffecd
+r14 = 0xffece
+r15 = 0xffecf
+; preserved
+r16 = 0xffed0
+r17 = 0xffed1
+r18 = 0xffed2
+r19 = 0xffed3
+r20 = 0xffed4
+r21 = 0xffed5
+r22 = 0xffed6
+r23 = 0xffed7
+
+#else
+
+; clobberable
+r8 = 0xffef0
+r9 = 0xffef1
+r10 = 0xffef2
+r11 = 0xffef3
+r12 = 0xffef4
+r13 = 0xffef5
+r14 = 0xffef6
+r15 = 0xffef7
+; preserved
+r16 = 0xffee8
+r17 = 0xffee9
+r18 = 0xffeea
+r19 = 0xffeeb
+r20 = 0xffeec
+r21 = 0xffeed
+r22 = 0xffeee
+r23 = 0xffeef
+
+#endif
diff --git a/libgloss/rl78/write.c b/libgloss/rl78/write.c
index 2adeb94f1..849470c94 100644
--- a/libgloss/rl78/write.c
+++ b/libgloss/rl78/write.c
@@ -85,18 +85,22 @@ tputc (char c)
SDR00 = c;
}
+/* defaults to 0 unless open() is linked in */
+int _open_present;
+
int
_write(int fd, char *ptr, int len)
{
int rv = len;
+ if (_open_present && fd > 2)
+ return _SYS_write (fd, ptr, len);
+
if (!initted)
init_uart0 ();
while (len != 0)
{
- if (*ptr == '\n')
- tputc ('\r');
tputc (*ptr);
ptr ++;
len --;
diff --git a/libgloss/rx/crt0.S b/libgloss/rx/crt0.S
index 222742352..6d7089d4d 100644
--- a/libgloss/rx/crt0.S
+++ b/libgloss/rx/crt0.S
@@ -40,11 +40,24 @@ _start:
mov #__stack, r0
mvtc #__vectors, intb
+ /* Copy the .data section from ROM into RAM. */
mov #__datastart, r1
mov #__romdatastart, r2
mov #__romdatacopysize, r3
+#ifdef __RX_DISALLOW_STRING_INSNS__
+ cmp #0, r3
+ beq 2f
+
+1: mov.b [r2+], r5
+ mov.b r5, [r1+]
+ sub #1, r3
+ bne 1b
+2:
+#else
smovf
+#endif
+ /* Initialise the contents of the .bss section. */
mov #__bssstart, r1
mov #0, r2
mov #__bsssize, r3
diff --git a/libgloss/rx/rx-sim.ld b/libgloss/rx/rx-sim.ld
index 4acc6cb87..a9bbf1fec 100644
--- a/libgloss/rx/rx-sim.ld
+++ b/libgloss/rx/rx-sim.ld
@@ -155,10 +155,26 @@ SECTIONS
} > RAM
PROVIDE (__bsssize = SIZEOF(.bss) / 4);
+ /* The __stack_size value of 0x100 is just a guess, but since it is
+ PROVIDEd the user can override it on the command line. It has to be
+ set here, rather than inside the .stack section, as symbols defined
+ inside sections are only evaluated during the final phase of the link,
+ long after the ASSERT is checked. An ASSERT referencing a PROVIDED but
+ not yet evaluated symbol will automatically fail.
+
+ FIXME: It would be nice if this value could be automatically set via
+ gcc's -fstack-usage command line option somehow. */
+ PROVIDE (__stack_size = 0x100);
+
.stack (ORIGIN (STACK)) :
{
PROVIDE (__stack = .);
*(.stack)
+
+ /* Linker section checking ignores empty sections like
+ this one so we have to have our own test here. */
+ ASSERT ((__stack > (_end + __stack_size)),
+ "Error: Too much data - no room left for the stack");
} > STACK
/* Providing one of these symbols in your code is sufficient to have
@@ -188,6 +204,7 @@ SECTIONS
}
/* The rest are all not normally part of the runtime image. */
+ .note : { *(.note) }
/* Stabs debugging sections. */
.stab 0 : { *(.stab) }
@@ -212,7 +229,7 @@ SECTIONS
/* DWARF 2 */
.debug_info 0 : { *(.debug_info .gnu.linkonce.wi.*) }
.debug_abbrev 0 : { *(.debug_abbrev) }
- .debug_line 0 : { *(.debug_line) }
+ .debug_line 0 : { *(.debug_line .debug_line.* .debug_line_end ) }
.debug_frame 0 : { *(.debug_frame) }
.debug_str 0 : { *(.debug_str) }
.debug_loc 0 : { *(.debug_loc) }
@@ -222,5 +239,10 @@ SECTIONS
.debug_funcnames 0 : { *(.debug_funcnames) }
.debug_typenames 0 : { *(.debug_typenames) }
.debug_varnames 0 : { *(.debug_varnames) }
+ /* DWARF 3 */
+ .debug_pubtypes 0 : { *(.debug_pubtypes) }
+ .debug_ranges 0 : { *(.debug_ranges) }
+ /* DWARF Extension. */
+ .debug_macro 0 : { *(.debug_macro) }
/DISCARD/ : { *(.note.GNU-stack) }
}
diff --git a/libgloss/rx/rx.ld b/libgloss/rx/rx.ld
index 7aa263acc..1a56d8daf 100644
--- a/libgloss/rx/rx.ld
+++ b/libgloss/rx/rx.ld
@@ -159,10 +159,26 @@ SECTIONS
} > RAM
PROVIDE (__bsssize = SIZEOF(.bss) / 4);
+ /* The __stack_size value of 0x100 is just a guess, but since it is
+ PROVIDEd the user can override it on the command line. It has to be
+ set here, rather than inside the .stack section, as symbols defined
+ inside sections are only evaluated during the final phase of the link,
+ long after the ASSERT is checked. An ASSERT referencing a PROVIDED but
+ not yet evaluated symbol will automatically fail.
+
+ FIXME: It would be nice if this value could be automatically set via
+ gcc's -fstack-usage command line option somehow. */
+ PROVIDE (__stack_size = 0x100);
+
.stack (ORIGIN (STACK)) :
{
PROVIDE (__stack = .);
*(.stack)
+
+ /* Linker section checking ignores empty sections like
+ this one so we have to have our own test here. */
+ ASSERT ((__stack > (_end + __stack_size)),
+ "Error: Too much data - no room left for the stack");
}
/* Providing one of these symbols in your code is sufficient to have
@@ -192,6 +208,7 @@ SECTIONS
}
/* The rest are all not normally part of the runtime image. */
+ .note : { *(.note) }
/* Stabs debugging sections. */
.stab 0 : { *(.stab) }
@@ -216,7 +233,7 @@ SECTIONS
/* DWARF 2 */
.debug_info 0 : { *(.debug_info .gnu.linkonce.wi.*) }
.debug_abbrev 0 : { *(.debug_abbrev) }
- .debug_line 0 : { *(.debug_line) }
+ .debug_line 0 : { *(.debug_line .debug_line.* .debug_line_end ) }
.debug_frame 0 : { *(.debug_frame) }
.debug_str 0 : { *(.debug_str) }
.debug_loc 0 : { *(.debug_loc) }
@@ -226,5 +243,10 @@ SECTIONS
.debug_funcnames 0 : { *(.debug_funcnames) }
.debug_typenames 0 : { *(.debug_typenames) }
.debug_varnames 0 : { *(.debug_varnames) }
+ /* DWARF 3 */
+ .debug_pubtypes 0 : { *(.debug_pubtypes) }
+ .debug_ranges 0 : { *(.debug_ranges) }
+ /* DWARF Extension. */
+ .debug_macro 0 : { *(.debug_macro) }
/DISCARD/ : { *(.note.GNU-stack) }
}
diff --git a/libgloss/sparc/crt0.S b/libgloss/sparc/crt0.S
index 90e18c513..501abf8ed 100644
--- a/libgloss/sparc/crt0.S
+++ b/libgloss/sparc/crt0.S
@@ -14,6 +14,9 @@
* they apply.
*/
#include "asm.h"
+
+.register %g2, #scratch
+.register %g3, #scratch
.data
.align 8
diff --git a/libgloss/sparc/cygmon-crt0.S b/libgloss/sparc/cygmon-crt0.S
index 272c00db3..576c61d87 100644
--- a/libgloss/sparc/cygmon-crt0.S
+++ b/libgloss/sparc/cygmon-crt0.S
@@ -21,6 +21,9 @@
#else
#define SAVE_SIZE -64
#endif
+
+.register %g2, #scratch
+.register %g3, #scratch
.data
.align 8
diff --git a/libgloss/sparc/erc32-crt0.S b/libgloss/sparc/erc32-crt0.S
index 8f8b1ea9c..10b4fbc58 100644
--- a/libgloss/sparc/erc32-crt0.S
+++ b/libgloss/sparc/erc32-crt0.S
@@ -6,6 +6,9 @@
#include "asm.h"
+ .register %g2, #scratch
+ .register %g3, #scratch
+
.data
.align 8
SYM(environ):
diff --git a/libgloss/sparc/traps.S b/libgloss/sparc/traps.S
index b3cc96692..96674d66e 100644
--- a/libgloss/sparc/traps.S
+++ b/libgloss/sparc/traps.S
@@ -15,6 +15,9 @@
#include "asm.h"
#include "slite.h"
+ .register %g2, #scratch
+ .register %g3, #scratch
+
.text
.align 4
diff --git a/libgloss/spu/lstat.c b/libgloss/spu/lstat.c
index 3a1189ec8..f34e0a344 100644
--- a/libgloss/spu/lstat.c
+++ b/libgloss/spu/lstat.c
@@ -44,7 +44,7 @@ typedef struct
} syscall_stat_t;
int
-lstat (const char *pathname, struct stat *pstat)
+lstat (const char *__restrict pathname, struct stat *__restrict pstat)
{
syscall_stat_t sys;
struct jsre_stat pjstat;
diff --git a/libgloss/v850/crt0.S b/libgloss/v850/crt0.S
index c9c93e72d..8d44f8896 100644
--- a/libgloss/v850/crt0.S
+++ b/libgloss/v850/crt0.S
@@ -24,6 +24,12 @@ _start:
movhi 2, r0, r6
ldsr r6, fpsr
#endif
+ // FIXME: We currently assume that the data sections
+ // are loaded in place - ie that they do not need to
+ // moved from eg ROM into RAM. If that is not true
+ // then extra code needs to be added here.
+
+ // Initialise the .bss section.
mov hilo(_edata), r6
mov hilo(_end), r7
.L0:
@@ -52,6 +58,9 @@ _start:
movhi hi(__gp), r0, gp
movea lo(__gp), gp, gp
+ // FIXME: See note about not moving the data sections above.
+
+ // Initialise the .bss section.
movhi hi(_edata), r0, r6
movea lo(_edata), r6, r6
movhi hi(_end), r0, r7
diff --git a/libgloss/v850/sim.ld b/libgloss/v850/sim.ld
index 8f6649acb..48da1150b 100644
--- a/libgloss/v850/sim.ld
+++ b/libgloss/v850/sim.ld
@@ -158,6 +158,9 @@ SECTIONS
}
_end = . ;
PROVIDE (end = .);
+
+ .note.renesas 0 : { KEEP(*(.note.renesas)) }
+
/* Stabs debugging sections. */
.stab 0 : { *(.stab) }
.stabstr 0 : { *(.stabstr) }
diff --git a/libgloss/visium/Makefile.in b/libgloss/visium/Makefile.in
new file mode 100644
index 000000000..bd430b286
--- /dev/null
+++ b/libgloss/visium/Makefile.in
@@ -0,0 +1,129 @@
+# Copyright (c) 1998 Cygnus Support
+#
+# The authors hereby grant permission to use, copy, modify, distribute,
+# and license this software and its documentation for any purpose, provided
+# that existing copyright notices are retained in all copies and that this
+# notice is included verbatim in any distributions. No written agreement,
+# license, or royalty fee is required for any of the authorized uses.
+# Modifications to this software may be copyrighted by their authors
+# and need not follow the licensing terms described here, provided that
+# the new terms are clearly indicated on the first page of each file where
+# they apply.
+
+DESTDIR =
+VPATH = @srcdir@
+srcdir = @srcdir@
+objdir = .
+srcroot = $(srcdir)/../..
+objroot = $(objdir)/../..
+
+prefix = @prefix@
+exec_prefix = @exec_prefix@
+
+host_alias = @host_alias@
+target_alias = @target_alias@
+program_transform_name = @program_transform_name@
+
+bindir = @bindir@
+libdir = @libdir@
+tooldir = $(exec_prefix)/$(target_alias)
+
+# Multilib support variables.
+# TOP is used instead of MULTI{BUILD,SRC}TOP.
+MULTIDIRS =
+MULTISUBDIR =
+MULTIDO = true
+MULTICLEAN = true
+
+INSTALL = @INSTALL@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_DATA = @INSTALL_DATA@
+
+SHELL = /bin/sh
+
+CC = @CC@
+
+AS = @AS@
+
+AR = @AR@
+
+LD = @LD@
+
+RANLIB = @RANLIB@
+
+OBJDUMP = `t='$(program_transform_name)'; echo objdump | sed -e $$t`
+OBJCOPY = `t='$(program_transform_name)'; echo objcopy | sed -e $$t`
+
+# Generic object files common to some targets.
+# These are LIBGLOSS stubs and minimal functionality in SBRK, READ and WRITE.
+OBJS = close.o fstat.o getpid.o isatty.o kill.o lseek.o open.o \
+ print.o putnum.o read.o stat.o unlink.o write.o
+
+# Object files specific to particular targets.
+SERIALOBJS = ${OBJS} _exit.o gettod.o sbrk.o serial-inbyte.o serial-outbyte.o
+
+# These go with the hosted file I/O libraries with a version of syscalls.
+HOSTEDOBJS = getpid.o kill.o io-gdb.o io-stubs.o sbrk.o
+
+SCRIPTS =
+BSP = crt0.o libserial.a libsim.a libdebug.a
+
+# Host specific makefile fragment comes in here.
+@host_makefile_frag@
+
+all: ${BSP}
+
+#
+# here's where we build the board support packages for each target
+#
+
+libserial.a: $(SERIALOBJS)
+ $(AR) $(ARFLAGS) $@ $^
+ $(RANLIB) $@
+
+libsim.a: ${HOSTEDOBJS} sim-syscalls.o
+ ${AR} ${ARFLAGS} $@ $^
+ ${RANLIB} $@
+
+libdebug.a: ${HOSTEDOBJS} debug-syscalls.o
+ ${AR} ${ARFLAGS} $@ $^
+ ${RANLIB} $@
+
+sim-syscalls.o: syscalls.c syscall.h io.h
+ ${CC} ${CFLAGS_FOR_TARGET} ${CFLAGS} -DTARGET_SIM -c -o $@ $<
+
+debug-syscalls.o: syscalls.c syscall.h io.h
+ ${CC} ${CFLAGS_FOR_TARGET} ${CFLAGS} -c -o $@ $<
+
+$(OBJS): %.o: ../%.c
+ ${CC} ${CFLAGS_FOR_TARGET} ${CFLAGS} -c -o $@ $<
+
+doc:
+
+clean mostlyclean:
+ rm -f a.out core *.i *~ *.o *-test *.srec *.dis *.map *.x
+
+distclean maintainer-clean realclean: clean
+ rm -f Makefile config.status a.out
+
+.PHONY: install info install-info clean-info
+install:
+ @for bsp in ${BSP}; do\
+ $(INSTALL_DATA) $${bsp} $(DESTDIR)$(tooldir)/lib${MULTISUBDIR}; \
+ done
+ @for script in ${SCRIPTS}; do\
+ $(INSTALL_DATA) $(srcdir)/$${script}.ld $(DESTDIR)$(tooldir)/lib${MULTISUBDIR}/$${script}.ld; \
+ done
+
+info:
+install-info:
+clean-info:
+
+# target specific makefile fragment comes in here.
+@target_makefile_frag@
+
+Makefile: Makefile.in config.status @host_makefile_frag_path@ @target_makefile_frag_path@
+ $(SHELL) config.status
+
+config.status: configure
+ $(SHELL) config.status --recheck
diff --git a/libgloss/visium/_exit.c b/libgloss/visium/_exit.c
new file mode 100644
index 000000000..307045db1
--- /dev/null
+++ b/libgloss/visium/_exit.c
@@ -0,0 +1,41 @@
+/* _exit.c for the Visium processor.
+
+ Copyright (c) 2015 Rolls-Royce Controls and Data Services Limited.
+ 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 Rolls-Royce Controls and Data Services Limited 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. */
+
+void _exit (int) __attribute__ ((__noreturn__));
+
+void
+_exit (int code)
+{
+ asm volatile ("stop 0,%0" : : "r" (code & 0xff));
+
+ /* Should never reach this point. Since this function is not supposed to
+ return, pretend to get stuck in a loop. */
+ while (1)
+ ;
+}
diff --git a/libgloss/visium/aclocal.m4 b/libgloss/visium/aclocal.m4
new file mode 100644
index 000000000..29da09d78
--- /dev/null
+++ b/libgloss/visium/aclocal.m4
@@ -0,0 +1,344 @@
+# generated automatically by aclocal 1.9.6 -*- Autoconf -*-
+
+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
+# 2005 Free Software Foundation, Inc.
+# This file 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.
+
+# AM_CONDITIONAL -*- Autoconf -*-
+
+# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005
+# Free Software Foundation, Inc.
+#
+# This file 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.
+
+# serial 7
+
+# AM_CONDITIONAL(NAME, SHELL-CONDITION)
+# -------------------------------------
+# Define a conditional.
+AC_DEFUN([AM_CONDITIONAL],
+[AC_PREREQ(2.52)dnl
+ ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])],
+ [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
+AC_SUBST([$1_TRUE])
+AC_SUBST([$1_FALSE])
+if $2; then
+ $1_TRUE=
+ $1_FALSE='#'
+else
+ $1_TRUE='#'
+ $1_FALSE=
+fi
+AC_CONFIG_COMMANDS_PRE(
+[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
+ AC_MSG_ERROR([[conditional "$1" was never defined.
+Usually this means the macro was only invoked conditionally.]])
+fi])])
+
+
+# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005
+# Free Software Foundation, Inc.
+#
+# This file 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.
+
+# serial 8
+
+# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
+# written in clear, in which case automake, when reading aclocal.m4,
+# will think it sees a *use*, and therefore will trigger all it's
+# C support machinery. Also note that it means that autoscan, seeing
+# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
+
+
+# _AM_DEPENDENCIES(NAME)
+# ----------------------
+# See how the compiler implements dependency checking.
+# NAME is "CC", "CXX", "GCJ", or "OBJC".
+# We try a few techniques and use that to set a single cache variable.
+#
+# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
+# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
+# dependency, and given that the user is not expected to run this macro,
+# just rely on AC_PROG_CC.
+AC_DEFUN([_AM_DEPENDENCIES],
+[AC_REQUIRE([AM_SET_DEPDIR])dnl
+AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
+AC_REQUIRE([AM_MAKE_INCLUDE])dnl
+AC_REQUIRE([AM_DEP_TRACK])dnl
+
+ifelse([$1], CC, [depcc="$CC" am_compiler_list=],
+ [$1], CXX, [depcc="$CXX" am_compiler_list=],
+ [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
+ [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'],
+ [depcc="$$1" am_compiler_list=])
+
+AC_CACHE_CHECK([dependency style of $depcc],
+ [am_cv_$1_dependencies_compiler_type],
+[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
+ # We make a subdir and do the tests there. Otherwise we can end up
+ # making bogus files that we don't know about and never remove. For
+ # instance it was reported that on HP-UX the gcc test will end up
+ # making a dummy file named `D' -- because `-MD' means `put the output
+ # in D'.
+ mkdir conftest.dir
+ # Copy depcomp to subdir because otherwise we won't find it if we're
+ # using a relative directory.
+ cp "$am_depcomp" conftest.dir
+ cd conftest.dir
+ # We will build objects and dependencies in a subdirectory because
+ # it helps to detect inapplicable dependency modes. For instance
+ # both Tru64's cc and ICC support -MD to output dependencies as a
+ # side effect of compilation, but ICC will put the dependencies in
+ # the current directory while Tru64 will put them in the object
+ # directory.
+ mkdir sub
+
+ am_cv_$1_dependencies_compiler_type=none
+ if test "$am_compiler_list" = ""; then
+ am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
+ fi
+ for depmode in $am_compiler_list; do
+ # Setup a source with many dependencies, because some compilers
+ # like to wrap large dependency lists on column 80 (with \), and
+ # we should not choose a depcomp mode which is confused by this.
+ #
+ # We need to recreate these files for each test, as the compiler may
+ # overwrite some of them when testing with obscure command lines.
+ # This happens at least with the AIX C compiler.
+ : > sub/conftest.c
+ for i in 1 2 3 4 5 6; do
+ echo '#include "conftst'$i'.h"' >> sub/conftest.c
+ # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
+ # Solaris 8's {/usr,}/bin/sh.
+ touch sub/conftst$i.h
+ done
+ echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
+
+ case $depmode in
+ nosideeffect)
+ # after this tag, mechanisms are not by side-effect, so they'll
+ # only be used when explicitly requested
+ if test "x$enable_dependency_tracking" = xyes; then
+ continue
+ else
+ break
+ fi
+ ;;
+ none) break ;;
+ esac
+ # We check with `-c' and `-o' for the sake of the "dashmstdout"
+ # mode. It turns out that the SunPro C++ compiler does not properly
+ # handle `-M -o', and we need to detect this.
+ if depmode=$depmode \
+ source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
+ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
+ $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
+ >/dev/null 2>conftest.err &&
+ grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
+ grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
+ ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
+ # icc doesn't choke on unknown options, it will just issue warnings
+ # or remarks (even with -Werror). So we grep stderr for any message
+ # that says an option was ignored or not supported.
+ # When given -MP, icc 7.0 and 7.1 complain thusly:
+ # icc: Command line warning: ignoring option '-M'; no argument required
+ # The diagnosis changed in icc 8.0:
+ # icc: Command line remark: option '-MP' not supported
+ if (grep 'ignoring option' conftest.err ||
+ grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
+ am_cv_$1_dependencies_compiler_type=$depmode
+ break
+ fi
+ fi
+ done
+
+ cd ..
+ rm -rf conftest.dir
+else
+ am_cv_$1_dependencies_compiler_type=none
+fi
+])
+AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
+AM_CONDITIONAL([am__fastdep$1], [
+ test "x$enable_dependency_tracking" != xno \
+ && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
+])
+
+
+# AM_SET_DEPDIR
+# -------------
+# Choose a directory name for dependency files.
+# This macro is AC_REQUIREd in _AM_DEPENDENCIES
+AC_DEFUN([AM_SET_DEPDIR],
+[AC_REQUIRE([AM_SET_LEADING_DOT])dnl
+AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
+])
+
+
+# AM_DEP_TRACK
+# ------------
+AC_DEFUN([AM_DEP_TRACK],
+[AC_ARG_ENABLE(dependency-tracking,
+[ --disable-dependency-tracking speeds up one-time build
+ --enable-dependency-tracking do not reject slow dependency extractors])
+if test "x$enable_dependency_tracking" != xno; then
+ am_depcomp="$ac_aux_dir/depcomp"
+ AMDEPBACKSLASH='\'
+fi
+AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
+AC_SUBST([AMDEPBACKSLASH])
+])
+
+# Generate code to set up dependency tracking. -*- Autoconf -*-
+
+# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005
+# Free Software Foundation, Inc.
+#
+# This file 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.
+
+#serial 3
+
+# _AM_OUTPUT_DEPENDENCY_COMMANDS
+# ------------------------------
+AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
+[for mf in $CONFIG_FILES; do
+ # Strip MF so we end up with the name of the file.
+ mf=`echo "$mf" | sed -e 's/:.*$//'`
+ # Check whether this is an Automake generated Makefile or not.
+ # We used to match only the files named `Makefile.in', but
+ # some people rename them; so instead we look at the file content.
+ # Grep'ing the first line is not enough: some people post-process
+ # each Makefile.in and add a new line on top of each file to say so.
+ # So let's grep whole file.
+ if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then
+ dirpart=`AS_DIRNAME("$mf")`
+ else
+ continue
+ fi
+ # Extract the definition of DEPDIR, am__include, and am__quote
+ # from the Makefile without running `make'.
+ DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
+ test -z "$DEPDIR" && continue
+ am__include=`sed -n 's/^am__include = //p' < "$mf"`
+ test -z "am__include" && continue
+ am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
+ # When using ansi2knr, U may be empty or an underscore; expand it
+ U=`sed -n 's/^U = //p' < "$mf"`
+ # Find all dependency output files, they are included files with
+ # $(DEPDIR) in their names. We invoke sed twice because it is the
+ # simplest approach to changing $(DEPDIR) to its actual value in the
+ # expansion.
+ for file in `sed -n "
+ s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
+ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
+ # Make sure the directory exists.
+ test -f "$dirpart/$file" && continue
+ fdir=`AS_DIRNAME(["$file"])`
+ AS_MKDIR_P([$dirpart/$fdir])
+ # echo "creating $dirpart/$file"
+ echo '# dummy' > "$dirpart/$file"
+ done
+done
+])# _AM_OUTPUT_DEPENDENCY_COMMANDS
+
+
+# AM_OUTPUT_DEPENDENCY_COMMANDS
+# -----------------------------
+# This macro should only be invoked once -- use via AC_REQUIRE.
+#
+# This code is only required when automatic dependency tracking
+# is enabled. FIXME. This creates each `.P' file that we will
+# need in order to bootstrap the dependency handling code.
+AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
+[AC_CONFIG_COMMANDS([depfiles],
+ [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
+ [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
+])
+
+# Copyright (C) 2003, 2005 Free Software Foundation, Inc.
+#
+# This file 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.
+
+# serial 2
+
+# Check whether the underlying file-system supports filenames
+# with a leading dot. For instance MS-DOS doesn't.
+AC_DEFUN([AM_SET_LEADING_DOT],
+[rm -rf .tst 2>/dev/null
+mkdir .tst 2>/dev/null
+if test -d .tst; then
+ am__leading_dot=.
+else
+ am__leading_dot=_
+fi
+rmdir .tst 2>/dev/null
+AC_SUBST([am__leading_dot])])
+
+# Check to see how 'make' treats includes. -*- Autoconf -*-
+
+# Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc.
+#
+# This file 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.
+
+# serial 3
+
+# AM_MAKE_INCLUDE()
+# -----------------
+# Check to see how make treats includes.
+AC_DEFUN([AM_MAKE_INCLUDE],
+[am_make=${MAKE-make}
+cat > confinc << 'END'
+am__doit:
+ @echo done
+.PHONY: am__doit
+END
+# If we don't find an include directive, just comment out the code.
+AC_MSG_CHECKING([for style of include used by $am_make])
+am__include="#"
+am__quote=
+_am_result=none
+# First try GNU make style include.
+echo "include confinc" > confmf
+# We grep out `Entering directory' and `Leaving directory'
+# messages which can occur if `w' ends up in MAKEFLAGS.
+# In particular we don't look at `^make:' because GNU make might
+# be invoked under some other name (usually "gmake"), in which
+# case it prints its new name instead of `make'.
+if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then
+ am__include=include
+ am__quote=
+ _am_result=GNU
+fi
+# Now try BSD make style include.
+if test "$am__include" = "#"; then
+ echo '.include "confinc"' > confmf
+ if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
+ am__include=.include
+ am__quote="\""
+ _am_result=BSD
+ fi
+fi
+AC_SUBST([am__include])
+AC_SUBST([am__quote])
+AC_MSG_RESULT([$_am_result])
+rm -f confinc confmf
+])
+
+m4_include([../acinclude.m4])
diff --git a/libgloss/visium/configure b/libgloss/visium/configure
new file mode 100755
index 000000000..f1bb39a11
--- /dev/null
+++ b/libgloss/visium/configure
@@ -0,0 +1,3145 @@
+#! /bin/sh
+# Guess values for system-dependent variables and create Makefiles.
+# Generated by GNU Autoconf 2.59.
+#
+# Copyright (C) 2003 Free Software Foundation, Inc.
+# This configure script is free software; the Free Software Foundation
+# gives unlimited permission to copy, distribute and modify it.
+## --------------------- ##
+## M4sh Initialization. ##
+## --------------------- ##
+
+# Be Bourne compatible
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
+ emulate sh
+ NULLCMD=:
+ # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
+ # is contrary to our usage. Disable this feature.
+ alias -g '${1+"$@"}'='"$@"'
+elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
+ set -o posix
+fi
+DUALCASE=1; export DUALCASE # for MKS sh
+
+# Support unset when possible.
+if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
+ as_unset=unset
+else
+ as_unset=false
+fi
+
+
+# Work around bugs in pre-3.0 UWIN ksh.
+$as_unset ENV MAIL MAILPATH
+PS1='$ '
+PS2='> '
+PS4='+ '
+
+# NLS nuisances.
+for as_var in \
+ LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
+ LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
+ LC_TELEPHONE LC_TIME
+do
+ if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
+ eval $as_var=C; export $as_var
+ else
+ $as_unset $as_var
+ fi
+done
+
+# Required to use basename.
+if expr a : '\(a\)' >/dev/null 2>&1; then
+ as_expr=expr
+else
+ as_expr=false
+fi
+
+if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
+ as_basename=basename
+else
+ as_basename=false
+fi
+
+
+# Name of the executable.
+as_me=`$as_basename "$0" ||
+$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
+ X"$0" : 'X\(//\)$' \| \
+ X"$0" : 'X\(/\)$' \| \
+ . : '\(.\)' 2>/dev/null ||
+echo X/"$0" |
+ sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
+ /^X\/\(\/\/\)$/{ s//\1/; q; }
+ /^X\/\(\/\).*/{ s//\1/; q; }
+ s/.*/./; q'`
+
+
+# PATH needs CR, and LINENO needs CR and PATH.
+# Avoid depending upon Character Ranges.
+as_cr_letters='abcdefghijklmnopqrstuvwxyz'
+as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
+as_cr_Letters=$as_cr_letters$as_cr_LETTERS
+as_cr_digits='0123456789'
+as_cr_alnum=$as_cr_Letters$as_cr_digits
+
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+ echo "#! /bin/sh" >conf$$.sh
+ echo "exit 0" >>conf$$.sh
+ chmod +x conf$$.sh
+ if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
+ PATH_SEPARATOR=';'
+ else
+ PATH_SEPARATOR=:
+ fi
+ rm -f conf$$.sh
+fi
+
+
+ as_lineno_1=$LINENO
+ as_lineno_2=$LINENO
+ as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
+ test "x$as_lineno_1" != "x$as_lineno_2" &&
+ test "x$as_lineno_3" = "x$as_lineno_2" || {
+ # Find who we are. Look in the path if we contain no path at all
+ # relative or not.
+ case $0 in
+ *[\\/]* ) as_myself=$0 ;;
+ *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
+done
+
+ ;;
+ esac
+ # We did not find ourselves, most probably we were run as `sh COMMAND'
+ # in which case we are not to be found in the path.
+ if test "x$as_myself" = x; then
+ as_myself=$0
+ fi
+ if test ! -f "$as_myself"; then
+ { echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2
+ { (exit 1); exit 1; }; }
+ fi
+ case $CONFIG_SHELL in
+ '')
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for as_base in sh bash ksh sh5; do
+ case $as_dir in
+ /*)
+ if ("$as_dir/$as_base" -c '
+ as_lineno_1=$LINENO
+ as_lineno_2=$LINENO
+ as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
+ test "x$as_lineno_1" != "x$as_lineno_2" &&
+ test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then
+ $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
+ $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
+ CONFIG_SHELL=$as_dir/$as_base
+ export CONFIG_SHELL
+ exec "$CONFIG_SHELL" "$0" ${1+"$@"}
+ fi;;
+ esac
+ done
+done
+;;
+ esac
+
+ # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
+ # uniformly replaced by the line number. The first 'sed' inserts a
+ # line-number line before each line; the second 'sed' does the real
+ # work. The second script uses 'N' to pair each line-number line
+ # with the numbered line, and appends trailing '-' during
+ # substitution so that $LINENO is not a special case at line end.
+ # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
+ # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-)
+ sed '=' <$as_myself |
+ sed '
+ N
+ s,$,-,
+ : loop
+ s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
+ t loop
+ s,-$,,
+ s,^['$as_cr_digits']*\n,,
+ ' >$as_me.lineno &&
+ chmod +x $as_me.lineno ||
+ { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
+ { (exit 1); exit 1; }; }
+
+ # Don't try to exec as it changes $[0], causing all sort of problems
+ # (the dirname of $[0] is not the place where we might find the
+ # original and so on. Autoconf is especially sensible to this).
+ . ./$as_me.lineno
+ # Exit status is that of the last command.
+ exit
+}
+
+
+case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
+ *c*,-n*) ECHO_N= ECHO_C='
+' ECHO_T=' ' ;;
+ *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
+ *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
+esac
+
+if expr a : '\(a\)' >/dev/null 2>&1; then
+ as_expr=expr
+else
+ as_expr=false
+fi
+
+rm -f conf$$ conf$$.exe conf$$.file
+echo >conf$$.file
+if ln -s conf$$.file conf$$ 2>/dev/null; then
+ # We could just check for DJGPP; but this test a) works b) is more generic
+ # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
+ if test -f conf$$.exe; then
+ # Don't use ln at all; we don't have any links
+ as_ln_s='cp -p'
+ else
+ as_ln_s='ln -s'
+ fi
+elif ln conf$$.file conf$$ 2>/dev/null; then
+ as_ln_s=ln
+else
+ as_ln_s='cp -p'
+fi
+rm -f conf$$ conf$$.exe conf$$.file
+
+if mkdir -p . 2>/dev/null; then
+ as_mkdir_p=:
+else
+ test -d ./-p && rmdir ./-p
+ as_mkdir_p=false
+fi
+
+as_executable_p="test -f"
+
+# Sed expression to map a string onto a valid CPP name.
+as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
+
+# Sed expression to map a string onto a valid variable name.
+as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
+
+
+# IFS
+# We need space, tab and new line, in precisely that order.
+as_nl='
+'
+IFS=" $as_nl"
+
+# CDPATH.
+$as_unset CDPATH
+
+
+# Name of the host.
+# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
+# so uname gets run too.
+ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
+
+exec 6>&1
+
+#
+# Initializations.
+#
+ac_default_prefix=/usr/local
+ac_config_libobj_dir=.
+cross_compiling=no
+subdirs=
+MFLAGS=
+MAKEFLAGS=
+SHELL=${CONFIG_SHELL-/bin/sh}
+
+# Maximum number of lines to put in a shell here document.
+# This variable seems obsolete. It should probably be removed, and
+# only ac_max_sed_lines should be used.
+: ${ac_max_here_lines=38}
+
+# Identity of this package.
+PACKAGE_NAME=
+PACKAGE_TARNAME=
+PACKAGE_VERSION=
+PACKAGE_STRING=
+PACKAGE_BUGREPORT=
+
+ac_unique_file="syscalls.c"
+ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CC am__leading_dot DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE AS AR LD RANLIB ac_ct_RANLIB CCAS CCASFLAGS host_makefile_frag_path target_makefile_frag_path part_specific_obj LIBOBJS LTLIBOBJS'
+ac_subst_files='host_makefile_frag target_makefile_frag'
+
+# Initialize some variables set by options.
+ac_init_help=
+ac_init_version=false
+# The variables have the same names as the options, with
+# dashes changed to underlines.
+cache_file=/dev/null
+exec_prefix=NONE
+no_create=
+no_recursion=
+prefix=NONE
+program_prefix=NONE
+program_suffix=NONE
+program_transform_name=s,x,x,
+silent=
+site=
+srcdir=
+verbose=
+x_includes=NONE
+x_libraries=NONE
+
+# Installation directory options.
+# These are left unexpanded so users can "make install exec_prefix=/foo"
+# and all the variables that are supposed to be based on exec_prefix
+# by default will actually change.
+# Use braces instead of parens because sh, perl, etc. also accept them.
+bindir='${exec_prefix}/bin'
+sbindir='${exec_prefix}/sbin'
+libexecdir='${exec_prefix}/libexec'
+datadir='${prefix}/share'
+sysconfdir='${prefix}/etc'
+sharedstatedir='${prefix}/com'
+localstatedir='${prefix}/var'
+libdir='${exec_prefix}/lib'
+includedir='${prefix}/include'
+oldincludedir='/usr/include'
+infodir='${prefix}/info'
+mandir='${prefix}/man'
+
+ac_prev=
+for ac_option
+do
+ # If the previous option needs an argument, assign it.
+ if test -n "$ac_prev"; then
+ eval "$ac_prev=\$ac_option"
+ ac_prev=
+ continue
+ fi
+
+ ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
+
+ # Accept the important Cygnus configure options, so we can diagnose typos.
+
+ case $ac_option in
+
+ -bindir | --bindir | --bindi | --bind | --bin | --bi)
+ ac_prev=bindir ;;
+ -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
+ bindir=$ac_optarg ;;
+
+ -build | --build | --buil | --bui | --bu)
+ ac_prev=build_alias ;;
+ -build=* | --build=* | --buil=* | --bui=* | --bu=*)
+ build_alias=$ac_optarg ;;
+
+ -cache-file | --cache-file | --cache-fil | --cache-fi \
+ | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
+ ac_prev=cache_file ;;
+ -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
+ | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
+ cache_file=$ac_optarg ;;
+
+ --config-cache | -C)
+ cache_file=config.cache ;;
+
+ -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
+ ac_prev=datadir ;;
+ -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
+ | --da=*)
+ datadir=$ac_optarg ;;
+
+ -disable-* | --disable-*)
+ ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
+ # Reject names that are not valid shell variable names.
+ expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
+ { echo "$as_me: error: invalid feature name: $ac_feature" >&2
+ { (exit 1); exit 1; }; }
+ ac_feature=`echo $ac_feature | sed 's/-/_/g'`
+ eval "enable_$ac_feature=no" ;;
+
+ -enable-* | --enable-*)
+ ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
+ # Reject names that are not valid shell variable names.
+ expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
+ { echo "$as_me: error: invalid feature name: $ac_feature" >&2
+ { (exit 1); exit 1; }; }
+ ac_feature=`echo $ac_feature | sed 's/-/_/g'`
+ case $ac_option in
+ *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
+ *) ac_optarg=yes ;;
+ esac
+ eval "enable_$ac_feature='$ac_optarg'" ;;
+
+ -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
+ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
+ | --exec | --exe | --ex)
+ ac_prev=exec_prefix ;;
+ -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
+ | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
+ | --exec=* | --exe=* | --ex=*)
+ exec_prefix=$ac_optarg ;;
+
+ -gas | --gas | --ga | --g)
+ # Obsolete; use --with-gas.
+ with_gas=yes ;;
+
+ -help | --help | --hel | --he | -h)
+ ac_init_help=long ;;
+ -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
+ ac_init_help=recursive ;;
+ -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
+ ac_init_help=short ;;
+
+ -host | --host | --hos | --ho)
+ ac_prev=host_alias ;;
+ -host=* | --host=* | --hos=* | --ho=*)
+ host_alias=$ac_optarg ;;
+
+ -includedir | --includedir | --includedi | --included | --include \
+ | --includ | --inclu | --incl | --inc)
+ ac_prev=includedir ;;
+ -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
+ | --includ=* | --inclu=* | --incl=* | --inc=*)
+ includedir=$ac_optarg ;;
+
+ -infodir | --infodir | --infodi | --infod | --info | --inf)
+ ac_prev=infodir ;;
+ -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
+ infodir=$ac_optarg ;;
+
+ -libdir | --libdir | --libdi | --libd)
+ ac_prev=libdir ;;
+ -libdir=* | --libdir=* | --libdi=* | --libd=*)
+ libdir=$ac_optarg ;;
+
+ -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
+ | --libexe | --libex | --libe)
+ ac_prev=libexecdir ;;
+ -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
+ | --libexe=* | --libex=* | --libe=*)
+ libexecdir=$ac_optarg ;;
+
+ -localstatedir | --localstatedir | --localstatedi | --localstated \
+ | --localstate | --localstat | --localsta | --localst \
+ | --locals | --local | --loca | --loc | --lo)
+ ac_prev=localstatedir ;;
+ -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
+ | --localstate=* | --localstat=* | --localsta=* | --localst=* \
+ | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
+ localstatedir=$ac_optarg ;;
+
+ -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
+ ac_prev=mandir ;;
+ -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
+ mandir=$ac_optarg ;;
+
+ -nfp | --nfp | --nf)
+ # Obsolete; use --without-fp.
+ with_fp=no ;;
+
+ -no-create | --no-create | --no-creat | --no-crea | --no-cre \
+ | --no-cr | --no-c | -n)
+ no_create=yes ;;
+
+ -no-recursion | --no-recursion | --no-recursio | --no-recursi \
+ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
+ no_recursion=yes ;;
+
+ -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
+ | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
+ | --oldin | --oldi | --old | --ol | --o)
+ ac_prev=oldincludedir ;;
+ -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
+ | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
+ | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
+ oldincludedir=$ac_optarg ;;
+
+ -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
+ ac_prev=prefix ;;
+ -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
+ prefix=$ac_optarg ;;
+
+ -program-prefix | --program-prefix | --program-prefi | --program-pref \
+ | --program-pre | --program-pr | --program-p)
+ ac_prev=program_prefix ;;
+ -program-prefix=* | --program-prefix=* | --program-prefi=* \
+ | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
+ program_prefix=$ac_optarg ;;
+
+ -program-suffix | --program-suffix | --program-suffi | --program-suff \
+ | --program-suf | --program-su | --program-s)
+ ac_prev=program_suffix ;;
+ -program-suffix=* | --program-suffix=* | --program-suffi=* \
+ | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
+ program_suffix=$ac_optarg ;;
+
+ -program-transform-name | --program-transform-name \
+ | --program-transform-nam | --program-transform-na \
+ | --program-transform-n | --program-transform- \
+ | --program-transform | --program-transfor \
+ | --program-transfo | --program-transf \
+ | --program-trans | --program-tran \
+ | --progr-tra | --program-tr | --program-t)
+ ac_prev=program_transform_name ;;
+ -program-transform-name=* | --program-transform-name=* \
+ | --program-transform-nam=* | --program-transform-na=* \
+ | --program-transform-n=* | --program-transform-=* \
+ | --program-transform=* | --program-transfor=* \
+ | --program-transfo=* | --program-transf=* \
+ | --program-trans=* | --program-tran=* \
+ | --progr-tra=* | --program-tr=* | --program-t=*)
+ program_transform_name=$ac_optarg ;;
+
+ -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+ | -silent | --silent | --silen | --sile | --sil)
+ silent=yes ;;
+
+ -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
+ ac_prev=sbindir ;;
+ -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
+ | --sbi=* | --sb=*)
+ sbindir=$ac_optarg ;;
+
+ -sharedstatedir | --sharedstatedir | --sharedstatedi \
+ | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
+ | --sharedst | --shareds | --shared | --share | --shar \
+ | --sha | --sh)
+ ac_prev=sharedstatedir ;;
+ -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
+ | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
+ | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
+ | --sha=* | --sh=*)
+ sharedstatedir=$ac_optarg ;;
+
+ -site | --site | --sit)
+ ac_prev=site ;;
+ -site=* | --site=* | --sit=*)
+ site=$ac_optarg ;;
+
+ -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
+ ac_prev=srcdir ;;
+ -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
+ srcdir=$ac_optarg ;;
+
+ -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
+ | --syscon | --sysco | --sysc | --sys | --sy)
+ ac_prev=sysconfdir ;;
+ -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
+ | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
+ sysconfdir=$ac_optarg ;;
+
+ -target | --target | --targe | --targ | --tar | --ta | --t)
+ ac_prev=target_alias ;;
+ -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
+ target_alias=$ac_optarg ;;
+
+ -v | -verbose | --verbose | --verbos | --verbo | --verb)
+ verbose=yes ;;
+
+ -version | --version | --versio | --versi | --vers | -V)
+ ac_init_version=: ;;
+
+ -with-* | --with-*)
+ ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
+ # Reject names that are not valid shell variable names.
+ expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
+ { echo "$as_me: error: invalid package name: $ac_package" >&2
+ { (exit 1); exit 1; }; }
+ ac_package=`echo $ac_package| sed 's/-/_/g'`
+ case $ac_option in
+ *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
+ *) ac_optarg=yes ;;
+ esac
+ eval "with_$ac_package='$ac_optarg'" ;;
+
+ -without-* | --without-*)
+ ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
+ # Reject names that are not valid shell variable names.
+ expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
+ { echo "$as_me: error: invalid package name: $ac_package" >&2
+ { (exit 1); exit 1; }; }
+ ac_package=`echo $ac_package | sed 's/-/_/g'`
+ eval "with_$ac_package=no" ;;
+
+ --x)
+ # Obsolete; use --with-x.
+ with_x=yes ;;
+
+ -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
+ | --x-incl | --x-inc | --x-in | --x-i)
+ ac_prev=x_includes ;;
+ -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
+ | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
+ x_includes=$ac_optarg ;;
+
+ -x-libraries | --x-libraries | --x-librarie | --x-librari \
+ | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
+ ac_prev=x_libraries ;;
+ -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
+ | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
+ x_libraries=$ac_optarg ;;
+
+ -*) { echo "$as_me: error: unrecognized option: $ac_option
+Try \`$0 --help' for more information." >&2
+ { (exit 1); exit 1; }; }
+ ;;
+
+ *=*)
+ ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
+ # Reject names that are not valid shell variable names.
+ expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
+ { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
+ { (exit 1); exit 1; }; }
+ ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
+ eval "$ac_envvar='$ac_optarg'"
+ export $ac_envvar ;;
+
+ *)
+ # FIXME: should be removed in autoconf 3.0.
+ echo "$as_me: WARNING: you should use --build, --host, --target" >&2
+ expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
+ echo "$as_me: WARNING: invalid host type: $ac_option" >&2
+ : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
+ ;;
+
+ esac
+done
+
+if test -n "$ac_prev"; then
+ ac_option=--`echo $ac_prev | sed 's/_/-/g'`
+ { echo "$as_me: error: missing argument to $ac_option" >&2
+ { (exit 1); exit 1; }; }
+fi
+
+# Be sure to have absolute paths.
+for ac_var in exec_prefix prefix
+do
+ eval ac_val=$`echo $ac_var`
+ case $ac_val in
+ [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
+ *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
+ { (exit 1); exit 1; }; };;
+ esac
+done
+
+# Be sure to have absolute paths.
+for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \
+ localstatedir libdir includedir oldincludedir infodir mandir
+do
+ eval ac_val=$`echo $ac_var`
+ case $ac_val in
+ [\\/$]* | ?:[\\/]* ) ;;
+ *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
+ { (exit 1); exit 1; }; };;
+ esac
+done
+
+# There might be people who depend on the old broken behavior: `$host'
+# used to hold the argument of --host etc.
+# FIXME: To remove some day.
+build=$build_alias
+host=$host_alias
+target=$target_alias
+
+# FIXME: To remove some day.
+if test "x$host_alias" != x; then
+ if test "x$build_alias" = x; then
+ cross_compiling=maybe
+ echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
+ If a cross compiler is detected then cross compile mode will be used." >&2
+ elif test "x$build_alias" != "x$host_alias"; then
+ cross_compiling=yes
+ fi
+fi
+
+ac_tool_prefix=
+test -n "$host_alias" && ac_tool_prefix=$host_alias-
+
+test "$silent" = yes && exec 6>/dev/null
+
+
+# Find the source files, if location was not specified.
+if test -z "$srcdir"; then
+ ac_srcdir_defaulted=yes
+ # Try the directory containing this script, then its parent.
+ ac_confdir=`(dirname "$0") 2>/dev/null ||
+$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$0" : 'X\(//\)[^/]' \| \
+ X"$0" : 'X\(//\)$' \| \
+ X"$0" : 'X\(/\)' \| \
+ . : '\(.\)' 2>/dev/null ||
+echo X"$0" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+ /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+ /^X\(\/\/\)$/{ s//\1/; q; }
+ /^X\(\/\).*/{ s//\1/; q; }
+ s/.*/./; q'`
+ srcdir=$ac_confdir
+ if test ! -r $srcdir/$ac_unique_file; then
+ srcdir=..
+ fi
+else
+ ac_srcdir_defaulted=no
+fi
+if test ! -r $srcdir/$ac_unique_file; then
+ if test "$ac_srcdir_defaulted" = yes; then
+ { echo "$as_me: error: cannot find sources ($ac_unique_file) in $ac_confdir or .." >&2
+ { (exit 1); exit 1; }; }
+ else
+ { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
+ { (exit 1); exit 1; }; }
+ fi
+fi
+(cd $srcdir && test -r ./$ac_unique_file) 2>/dev/null ||
+ { echo "$as_me: error: sources are in $srcdir, but \`cd $srcdir' does not work" >&2
+ { (exit 1); exit 1; }; }
+srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
+ac_env_build_alias_set=${build_alias+set}
+ac_env_build_alias_value=$build_alias
+ac_cv_env_build_alias_set=${build_alias+set}
+ac_cv_env_build_alias_value=$build_alias
+ac_env_host_alias_set=${host_alias+set}
+ac_env_host_alias_value=$host_alias
+ac_cv_env_host_alias_set=${host_alias+set}
+ac_cv_env_host_alias_value=$host_alias
+ac_env_target_alias_set=${target_alias+set}
+ac_env_target_alias_value=$target_alias
+ac_cv_env_target_alias_set=${target_alias+set}
+ac_cv_env_target_alias_value=$target_alias
+ac_env_CCAS_set=${CCAS+set}
+ac_env_CCAS_value=$CCAS
+ac_cv_env_CCAS_set=${CCAS+set}
+ac_cv_env_CCAS_value=$CCAS
+ac_env_CCASFLAGS_set=${CCASFLAGS+set}
+ac_env_CCASFLAGS_value=$CCASFLAGS
+ac_cv_env_CCASFLAGS_set=${CCASFLAGS+set}
+ac_cv_env_CCASFLAGS_value=$CCASFLAGS
+
+#
+# Report the --help message.
+#
+if test "$ac_init_help" = "long"; then
+ # Omit some internal or obsolete options to make the list less imposing.
+ # This message is too long to be a string in the A/UX 3.1 sh.
+ cat <<_ACEOF
+\`configure' configures this package to adapt to many kinds of systems.
+
+Usage: $0 [OPTION]... [VAR=VALUE]...
+
+To assign environment variables (e.g., CC, CFLAGS...), specify them as
+VAR=VALUE. See below for descriptions of some of the useful variables.
+
+Defaults for the options are specified in brackets.
+
+Configuration:
+ -h, --help display this help and exit
+ --help=short display options specific to this package
+ --help=recursive display the short help of all the included packages
+ -V, --version display version information and exit
+ -q, --quiet, --silent do not print \`checking...' messages
+ --cache-file=FILE cache test results in FILE [disabled]
+ -C, --config-cache alias for \`--cache-file=config.cache'
+ -n, --no-create do not create output files
+ --srcdir=DIR find the sources in DIR [configure dir or \`..']
+
+_ACEOF
+
+ cat <<_ACEOF
+Installation directories:
+ --prefix=PREFIX install architecture-independent files in PREFIX
+ [$ac_default_prefix]
+ --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
+ [PREFIX]
+
+By default, \`make install' will install all the files in
+\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
+an installation prefix other than \`$ac_default_prefix' using \`--prefix',
+for instance \`--prefix=\$HOME'.
+
+For better control, use the options below.
+
+Fine tuning of the installation directories:
+ --bindir=DIR user executables [EPREFIX/bin]
+ --sbindir=DIR system admin executables [EPREFIX/sbin]
+ --libexecdir=DIR program executables [EPREFIX/libexec]
+ --datadir=DIR read-only architecture-independent data [PREFIX/share]
+ --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
+ --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
+ --localstatedir=DIR modifiable single-machine data [PREFIX/var]
+ --libdir=DIR object code libraries [EPREFIX/lib]
+ --includedir=DIR C header files [PREFIX/include]
+ --oldincludedir=DIR C header files for non-gcc [/usr/include]
+ --infodir=DIR info documentation [PREFIX/info]
+ --mandir=DIR man documentation [PREFIX/man]
+_ACEOF
+
+ cat <<\_ACEOF
+
+Program names:
+ --program-prefix=PREFIX prepend PREFIX to installed program names
+ --program-suffix=SUFFIX append SUFFIX to installed program names
+ --program-transform-name=PROGRAM run sed PROGRAM on installed program names
+
+System types:
+ --build=BUILD configure for building on BUILD [guessed]
+ --host=HOST cross-compile to build programs to run on HOST [BUILD]
+ --target=TARGET configure for building compilers for TARGET [HOST]
+_ACEOF
+fi
+
+if test -n "$ac_init_help"; then
+
+ cat <<\_ACEOF
+
+Optional Features:
+ --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
+ --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
+ --disable-dependency-tracking speeds up one-time build
+ --enable-dependency-tracking do not reject slow dependency extractors
+
+Some influential environment variables:
+ CCAS assembler compiler command (defaults to CC)
+ CCASFLAGS assembler compiler flags (defaults to CFLAGS)
+
+Use these variables to override the choices made by `configure' or to help
+it to find libraries and programs with nonstandard names/locations.
+
+_ACEOF
+fi
+
+if test "$ac_init_help" = "recursive"; then
+ # If there are subdirs, report their specific --help.
+ ac_popdir=`pwd`
+ for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
+ test -d $ac_dir || continue
+ ac_builddir=.
+
+if test "$ac_dir" != .; then
+ ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
+ # A "../" for each directory in $ac_dir_suffix.
+ ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
+else
+ ac_dir_suffix= ac_top_builddir=
+fi
+
+case $srcdir in
+ .) # No --srcdir option. We are building in place.
+ ac_srcdir=.
+ if test -z "$ac_top_builddir"; then
+ ac_top_srcdir=.
+ else
+ ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
+ fi ;;
+ [\\/]* | ?:[\\/]* ) # Absolute path.
+ ac_srcdir=$srcdir$ac_dir_suffix;
+ ac_top_srcdir=$srcdir ;;
+ *) # Relative path.
+ ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
+ ac_top_srcdir=$ac_top_builddir$srcdir ;;
+esac
+
+# Do not use `cd foo && pwd` to compute absolute paths, because
+# the directories may not exist.
+case `pwd` in
+.) ac_abs_builddir="$ac_dir";;
+*)
+ case "$ac_dir" in
+ .) ac_abs_builddir=`pwd`;;
+ [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
+ *) ac_abs_builddir=`pwd`/"$ac_dir";;
+ esac;;
+esac
+case $ac_abs_builddir in
+.) ac_abs_top_builddir=${ac_top_builddir}.;;
+*)
+ case ${ac_top_builddir}. in
+ .) ac_abs_top_builddir=$ac_abs_builddir;;
+ [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
+ *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
+ esac;;
+esac
+case $ac_abs_builddir in
+.) ac_abs_srcdir=$ac_srcdir;;
+*)
+ case $ac_srcdir in
+ .) ac_abs_srcdir=$ac_abs_builddir;;
+ [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
+ *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
+ esac;;
+esac
+case $ac_abs_builddir in
+.) ac_abs_top_srcdir=$ac_top_srcdir;;
+*)
+ case $ac_top_srcdir in
+ .) ac_abs_top_srcdir=$ac_abs_builddir;;
+ [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
+ *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
+ esac;;
+esac
+
+ cd $ac_dir
+ # Check for guested configure; otherwise get Cygnus style configure.
+ if test -f $ac_srcdir/configure.gnu; then
+ echo
+ $SHELL $ac_srcdir/configure.gnu --help=recursive
+ elif test -f $ac_srcdir/configure; then
+ echo
+ $SHELL $ac_srcdir/configure --help=recursive
+ elif test -f $ac_srcdir/configure.ac ||
+ test -f $ac_srcdir/configure.in; then
+ echo
+ $ac_configure --help
+ else
+ echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
+ fi
+ cd $ac_popdir
+ done
+fi
+
+test -n "$ac_init_help" && exit 0
+if $ac_init_version; then
+ cat <<\_ACEOF
+
+Copyright (C) 2003 Free Software Foundation, Inc.
+This configure script is free software; the Free Software Foundation
+gives unlimited permission to copy, distribute and modify it.
+_ACEOF
+ exit 0
+fi
+exec 5>config.log
+cat >&5 <<_ACEOF
+This file contains any messages produced by compilers while
+running configure, to aid debugging if configure makes a mistake.
+
+It was created by $as_me, which was
+generated by GNU Autoconf 2.59. Invocation command line was
+
+ $ $0 $@
+
+_ACEOF
+{
+cat <<_ASUNAME
+## --------- ##
+## Platform. ##
+## --------- ##
+
+hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
+uname -m = `(uname -m) 2>/dev/null || echo unknown`
+uname -r = `(uname -r) 2>/dev/null || echo unknown`
+uname -s = `(uname -s) 2>/dev/null || echo unknown`
+uname -v = `(uname -v) 2>/dev/null || echo unknown`
+
+/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
+/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
+
+/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
+/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
+/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
+hostinfo = `(hostinfo) 2>/dev/null || echo unknown`
+/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
+/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
+/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
+
+_ASUNAME
+
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ echo "PATH: $as_dir"
+done
+
+} >&5
+
+cat >&5 <<_ACEOF
+
+
+## ----------- ##
+## Core tests. ##
+## ----------- ##
+
+_ACEOF
+
+
+# Keep a trace of the command line.
+# Strip out --no-create and --no-recursion so they do not pile up.
+# Strip out --silent because we don't want to record it for future runs.
+# Also quote any args containing shell meta-characters.
+# Make two passes to allow for proper duplicate-argument suppression.
+ac_configure_args=
+ac_configure_args0=
+ac_configure_args1=
+ac_sep=
+ac_must_keep_next=false
+for ac_pass in 1 2
+do
+ for ac_arg
+ do
+ case $ac_arg in
+ -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
+ -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+ | -silent | --silent | --silen | --sile | --sil)
+ continue ;;
+ *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
+ ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
+ esac
+ case $ac_pass in
+ 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
+ 2)
+ ac_configure_args1="$ac_configure_args1 '$ac_arg'"
+ if test $ac_must_keep_next = true; then
+ ac_must_keep_next=false # Got value, back to normal.
+ else
+ case $ac_arg in
+ *=* | --config-cache | -C | -disable-* | --disable-* \
+ | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
+ | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
+ | -with-* | --with-* | -without-* | --without-* | --x)
+ case "$ac_configure_args0 " in
+ "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
+ esac
+ ;;
+ -* ) ac_must_keep_next=true ;;
+ esac
+ fi
+ ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
+ # Get rid of the leading space.
+ ac_sep=" "
+ ;;
+ esac
+ done
+done
+$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
+$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; }
+
+# When interrupted or exit'd, cleanup temporary files, and complete
+# config.log. We remove comments because anyway the quotes in there
+# would cause problems or look ugly.
+# WARNING: Be sure not to use single quotes in there, as some shells,
+# such as our DU 5.0 friend, will then `close' the trap.
+trap 'exit_status=$?
+ # Save into config.log some information that might help in debugging.
+ {
+ echo
+
+ cat <<\_ASBOX
+## ---------------- ##
+## Cache variables. ##
+## ---------------- ##
+_ASBOX
+ echo
+ # The following way of writing the cache mishandles newlines in values,
+{
+ (set) 2>&1 |
+ case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
+ *ac_space=\ *)
+ sed -n \
+ "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
+ s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
+ ;;
+ *)
+ sed -n \
+ "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
+ ;;
+ esac;
+}
+ echo
+
+ cat <<\_ASBOX
+## ----------------- ##
+## Output variables. ##
+## ----------------- ##
+_ASBOX
+ echo
+ for ac_var in $ac_subst_vars
+ do
+ eval ac_val=$`echo $ac_var`
+ echo "$ac_var='"'"'$ac_val'"'"'"
+ done | sort
+ echo
+
+ if test -n "$ac_subst_files"; then
+ cat <<\_ASBOX
+## ------------- ##
+## Output files. ##
+## ------------- ##
+_ASBOX
+ echo
+ for ac_var in $ac_subst_files
+ do
+ eval ac_val=$`echo $ac_var`
+ echo "$ac_var='"'"'$ac_val'"'"'"
+ done | sort
+ echo
+ fi
+
+ if test -s confdefs.h; then
+ cat <<\_ASBOX
+## ----------- ##
+## confdefs.h. ##
+## ----------- ##
+_ASBOX
+ echo
+ sed "/^$/d" confdefs.h | sort
+ echo
+ fi
+ test "$ac_signal" != 0 &&
+ echo "$as_me: caught signal $ac_signal"
+ echo "$as_me: exit $exit_status"
+ } >&5
+ rm -f core *.core &&
+ rm -rf conftest* confdefs* conf$$* $ac_clean_files &&
+ exit $exit_status
+ ' 0
+for ac_signal in 1 2 13 15; do
+ trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
+done
+ac_signal=0
+
+# confdefs.h avoids OS command line length limits that DEFS can exceed.
+rm -rf conftest* confdefs.h
+# AIX cpp loses on an empty file, so make sure it contains at least a newline.
+echo >confdefs.h
+
+# Predefined preprocessor variables.
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_NAME "$PACKAGE_NAME"
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_VERSION "$PACKAGE_VERSION"
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_STRING "$PACKAGE_STRING"
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
+_ACEOF
+
+
+# Let the site file select an alternate cache file if it wants to.
+# Prefer explicitly selected file to automatically selected ones.
+if test -z "$CONFIG_SITE"; then
+ if test "x$prefix" != xNONE; then
+ CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
+ else
+ CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
+ fi
+fi
+for ac_site_file in $CONFIG_SITE; do
+ if test -r "$ac_site_file"; then
+ { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
+echo "$as_me: loading site script $ac_site_file" >&6;}
+ sed 's/^/| /' "$ac_site_file" >&5
+ . "$ac_site_file"
+ fi
+done
+
+if test -r "$cache_file"; then
+ # Some versions of bash will fail to source /dev/null (special
+ # files actually), so we avoid doing that.
+ if test -f "$cache_file"; then
+ { echo "$as_me:$LINENO: loading cache $cache_file" >&5
+echo "$as_me: loading cache $cache_file" >&6;}
+ case $cache_file in
+ [\\/]* | ?:[\\/]* ) . $cache_file;;
+ *) . ./$cache_file;;
+ esac
+ fi
+else
+ { echo "$as_me:$LINENO: creating cache $cache_file" >&5
+echo "$as_me: creating cache $cache_file" >&6;}
+ >$cache_file
+fi
+
+# Check that the precious variables saved in the cache have kept the same
+# value.
+ac_cache_corrupted=false
+for ac_var in `(set) 2>&1 |
+ sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
+ eval ac_old_set=\$ac_cv_env_${ac_var}_set
+ eval ac_new_set=\$ac_env_${ac_var}_set
+ eval ac_old_val="\$ac_cv_env_${ac_var}_value"
+ eval ac_new_val="\$ac_env_${ac_var}_value"
+ case $ac_old_set,$ac_new_set in
+ set,)
+ { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
+echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
+ ac_cache_corrupted=: ;;
+ ,set)
+ { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
+echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
+ ac_cache_corrupted=: ;;
+ ,);;
+ *)
+ if test "x$ac_old_val" != "x$ac_new_val"; then
+ { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
+echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
+ { echo "$as_me:$LINENO: former value: $ac_old_val" >&5
+echo "$as_me: former value: $ac_old_val" >&2;}
+ { echo "$as_me:$LINENO: current value: $ac_new_val" >&5
+echo "$as_me: current value: $ac_new_val" >&2;}
+ ac_cache_corrupted=:
+ fi;;
+ esac
+ # Pass precious variables to config.status.
+ if test "$ac_new_set" = set; then
+ case $ac_new_val in
+ *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
+ ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
+ *) ac_arg=$ac_var=$ac_new_val ;;
+ esac
+ case " $ac_configure_args " in
+ *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
+ *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
+ esac
+ fi
+done
+if $ac_cache_corrupted; then
+ { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
+echo "$as_me: error: changes in the environment can compromise the build" >&2;}
+ { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
+echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
+ { (exit 1); exit 1; }; }
+fi
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+if test "${enable_shared}" = "yes" ; then
+ echo "Shared libraries not supported for cross compiling, ignored"
+fi
+
+if test "$srcdir" = "." ; then
+ if test "${with_target_subdir}" != "." ; then
+ libgloss_topdir="${srcdir}/${with_multisrctop}../../.."
+ else
+ libgloss_topdir="${srcdir}/${with_multisrctop}../.."
+ fi
+else
+ libgloss_topdir="${srcdir}/../.."
+fi
+ac_aux_dir=
+for ac_dir in $libgloss_topdir $srcdir/$libgloss_topdir; do
+ if test -f $ac_dir/install-sh; then
+ ac_aux_dir=$ac_dir
+ ac_install_sh="$ac_aux_dir/install-sh -c"
+ break
+ elif test -f $ac_dir/install.sh; then
+ ac_aux_dir=$ac_dir
+ ac_install_sh="$ac_aux_dir/install.sh -c"
+ break
+ elif test -f $ac_dir/shtool; then
+ ac_aux_dir=$ac_dir
+ ac_install_sh="$ac_aux_dir/shtool install -c"
+ break
+ fi
+done
+if test -z "$ac_aux_dir"; then
+ { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in $libgloss_topdir $srcdir/$libgloss_topdir" >&5
+echo "$as_me: error: cannot find install-sh or install.sh in $libgloss_topdir $srcdir/$libgloss_topdir" >&2;}
+ { (exit 1); exit 1; }; }
+fi
+ac_config_guess="$SHELL $ac_aux_dir/config.guess"
+ac_config_sub="$SHELL $ac_aux_dir/config.sub"
+ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
+
+
+# Make sure we can run config.sub.
+$ac_config_sub sun4 >/dev/null 2>&1 ||
+ { { echo "$as_me:$LINENO: error: cannot run $ac_config_sub" >&5
+echo "$as_me: error: cannot run $ac_config_sub" >&2;}
+ { (exit 1); exit 1; }; }
+
+echo "$as_me:$LINENO: checking build system type" >&5
+echo $ECHO_N "checking build system type... $ECHO_C" >&6
+if test "${ac_cv_build+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_cv_build_alias=$build_alias
+test -z "$ac_cv_build_alias" &&
+ ac_cv_build_alias=`$ac_config_guess`
+test -z "$ac_cv_build_alias" &&
+ { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5
+echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
+ { (exit 1); exit 1; }; }
+ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
+ { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_build_alias failed" >&5
+echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed" >&2;}
+ { (exit 1); exit 1; }; }
+
+fi
+echo "$as_me:$LINENO: result: $ac_cv_build" >&5
+echo "${ECHO_T}$ac_cv_build" >&6
+build=$ac_cv_build
+build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
+build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
+build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
+
+
+echo "$as_me:$LINENO: checking host system type" >&5
+echo $ECHO_N "checking host system type... $ECHO_C" >&6
+if test "${ac_cv_host+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_cv_host_alias=$host_alias
+test -z "$ac_cv_host_alias" &&
+ ac_cv_host_alias=$ac_cv_build_alias
+ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
+ { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_host_alias failed" >&5
+echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
+ { (exit 1); exit 1; }; }
+
+fi
+echo "$as_me:$LINENO: result: $ac_cv_host" >&5
+echo "${ECHO_T}$ac_cv_host" >&6
+host=$ac_cv_host
+host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
+host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
+host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
+
+
+echo "$as_me:$LINENO: checking target system type" >&5
+echo $ECHO_N "checking target system type... $ECHO_C" >&6
+if test "${ac_cv_target+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_cv_target_alias=$target_alias
+test "x$ac_cv_target_alias" = "x" &&
+ ac_cv_target_alias=$ac_cv_host_alias
+ac_cv_target=`$ac_config_sub $ac_cv_target_alias` ||
+ { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_target_alias failed" >&5
+echo "$as_me: error: $ac_config_sub $ac_cv_target_alias failed" >&2;}
+ { (exit 1); exit 1; }; }
+
+fi
+echo "$as_me:$LINENO: result: $ac_cv_target" >&5
+echo "${ECHO_T}$ac_cv_target" >&6
+target=$ac_cv_target
+target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
+target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
+target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
+
+
+# The aliases save the names the user supplied, while $host etc.
+# will get canonicalized.
+test -n "$target_alias" &&
+ test "$program_prefix$program_suffix$program_transform_name" = \
+ NONENONEs,x,x, &&
+ program_prefix=${target_alias}-
+test "$program_prefix" != NONE &&
+ program_transform_name="s,^,$program_prefix,;$program_transform_name"
+# Use a double $ so make ignores it.
+test "$program_suffix" != NONE &&
+ program_transform_name="s,\$,$program_suffix,;$program_transform_name"
+# Double any \ or $. echo might interpret backslashes.
+# By default was `s,x,x', remove it if useless.
+cat <<\_ACEOF >conftest.sed
+s/[\\$]/&&/g;s/;s,x,x,$//
+_ACEOF
+program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
+rm conftest.sed
+
+
+# Find a good install program. We prefer a C program (faster),
+# so one script is as good as another. But avoid the broken or
+# incompatible versions:
+# SysV /etc/install, /usr/sbin/install
+# SunOS /usr/etc/install
+# IRIX /sbin/install
+# AIX /bin/install
+# AmigaOS /C/install, which installs bootblocks on floppy discs
+# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
+# AFS /usr/afsws/bin/install, which mishandles nonexistent args
+# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
+# OS/2's system install, which has a completely different semantic
+# ./install, which can be erroneously created by make from ./install.sh.
+echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
+echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6
+if test -z "$INSTALL"; then
+if test "${ac_cv_path_install+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ # Account for people who put trailing slashes in PATH elements.
+case $as_dir/ in
+ ./ | .// | /cC/* | \
+ /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
+ ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \
+ /usr/ucb/* ) ;;
+ *)
+ # OSF1 and SCO ODT 3.0 have their own names for install.
+ # Don't use installbsd from OSF since it installs stuff as root
+ # by default.
+ for ac_prog in ginstall scoinst install; do
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
+ if test $ac_prog = install &&
+ grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
+ # AIX install. It has an incompatible calling convention.
+ :
+ elif test $ac_prog = install &&
+ grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
+ # program-specific install script used by HP pwplus--don't use.
+ :
+ else
+ ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
+ break 3
+ fi
+ fi
+ done
+ done
+ ;;
+esac
+done
+
+
+fi
+ if test "${ac_cv_path_install+set}" = set; then
+ INSTALL=$ac_cv_path_install
+ else
+ # As a last resort, use the slow shell script. We don't cache a
+ # path for INSTALL within a source directory, because that will
+ # break other packages using the cache if that directory is
+ # removed, or if the path is relative.
+ INSTALL=$ac_install_sh
+ fi
+fi
+echo "$as_me:$LINENO: result: $INSTALL" >&5
+echo "${ECHO_T}$INSTALL" >&6
+
+# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
+# It thinks the first close brace ends the variable substitution.
+test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
+
+test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
+
+test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
+
+
+rm -rf .tst 2>/dev/null
+mkdir .tst 2>/dev/null
+if test -d .tst; then
+ am__leading_dot=.
+else
+ am__leading_dot=_
+fi
+rmdir .tst 2>/dev/null
+
+DEPDIR="${am__leading_dot}deps"
+
+ ac_config_commands="$ac_config_commands depfiles"
+
+
+am_make=${MAKE-make}
+cat > confinc << 'END'
+am__doit:
+ @echo done
+.PHONY: am__doit
+END
+# If we don't find an include directive, just comment out the code.
+echo "$as_me:$LINENO: checking for style of include used by $am_make" >&5
+echo $ECHO_N "checking for style of include used by $am_make... $ECHO_C" >&6
+am__include="#"
+am__quote=
+_am_result=none
+# First try GNU make style include.
+echo "include confinc" > confmf
+# We grep out `Entering directory' and `Leaving directory'
+# messages which can occur if `w' ends up in MAKEFLAGS.
+# In particular we don't look at `^make:' because GNU make might
+# be invoked under some other name (usually "gmake"), in which
+# case it prints its new name instead of `make'.
+if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then
+ am__include=include
+ am__quote=
+ _am_result=GNU
+fi
+# Now try BSD make style include.
+if test "$am__include" = "#"; then
+ echo '.include "confinc"' > confmf
+ if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
+ am__include=.include
+ am__quote="\""
+ _am_result=BSD
+ fi
+fi
+
+
+echo "$as_me:$LINENO: result: $_am_result" >&5
+echo "${ECHO_T}$_am_result" >&6
+rm -f confinc confmf
+
+# Check whether --enable-dependency-tracking or --disable-dependency-tracking was given.
+if test "${enable_dependency_tracking+set}" = set; then
+ enableval="$enable_dependency_tracking"
+
+fi;
+if test "x$enable_dependency_tracking" != xno; then
+ am_depcomp="$ac_aux_dir/depcomp"
+ AMDEPBACKSLASH='\'
+fi
+
+
+if test "x$enable_dependency_tracking" != xno; then
+ AMDEP_TRUE=
+ AMDEP_FALSE='#'
+else
+ AMDEP_TRUE='#'
+ AMDEP_FALSE=
+fi
+
+
+
+# Extract the first word of "gcc", so it can be a program name with args.
+set dummy gcc; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_CC+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_CC="gcc"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+ echo "$as_me:$LINENO: result: $CC" >&5
+echo "${ECHO_T}$CC" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+
+depcc="$CC" am_compiler_list=
+
+echo "$as_me:$LINENO: checking dependency style of $depcc" >&5
+echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6
+if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
+ # We make a subdir and do the tests there. Otherwise we can end up
+ # making bogus files that we don't know about and never remove. For
+ # instance it was reported that on HP-UX the gcc test will end up
+ # making a dummy file named `D' -- because `-MD' means `put the output
+ # in D'.
+ mkdir conftest.dir
+ # Copy depcomp to subdir because otherwise we won't find it if we're
+ # using a relative directory.
+ cp "$am_depcomp" conftest.dir
+ cd conftest.dir
+ # We will build objects and dependencies in a subdirectory because
+ # it helps to detect inapplicable dependency modes. For instance
+ # both Tru64's cc and ICC support -MD to output dependencies as a
+ # side effect of compilation, but ICC will put the dependencies in
+ # the current directory while Tru64 will put them in the object
+ # directory.
+ mkdir sub
+
+ am_cv_CC_dependencies_compiler_type=none
+ if test "$am_compiler_list" = ""; then
+ am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
+ fi
+ for depmode in $am_compiler_list; do
+ # Setup a source with many dependencies, because some compilers
+ # like to wrap large dependency lists on column 80 (with \), and
+ # we should not choose a depcomp mode which is confused by this.
+ #
+ # We need to recreate these files for each test, as the compiler may
+ # overwrite some of them when testing with obscure command lines.
+ # This happens at least with the AIX C compiler.
+ : > sub/conftest.c
+ for i in 1 2 3 4 5 6; do
+ echo '#include "conftst'$i'.h"' >> sub/conftest.c
+ # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
+ # Solaris 8's {/usr,}/bin/sh.
+ touch sub/conftst$i.h
+ done
+ echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
+
+ case $depmode in
+ nosideeffect)
+ # after this tag, mechanisms are not by side-effect, so they'll
+ # only be used when explicitly requested
+ if test "x$enable_dependency_tracking" = xyes; then
+ continue
+ else
+ break
+ fi
+ ;;
+ none) break ;;
+ esac
+ # We check with `-c' and `-o' for the sake of the "dashmstdout"
+ # mode. It turns out that the SunPro C++ compiler does not properly
+ # handle `-M -o', and we need to detect this.
+ if depmode=$depmode \
+ source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
+ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
+ $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
+ >/dev/null 2>conftest.err &&
+ grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
+ grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
+ ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
+ # icc doesn't choke on unknown options, it will just issue warnings
+ # or remarks (even with -Werror). So we grep stderr for any message
+ # that says an option was ignored or not supported.
+ # When given -MP, icc 7.0 and 7.1 complain thusly:
+ # icc: Command line warning: ignoring option '-M'; no argument required
+ # The diagnosis changed in icc 8.0:
+ # icc: Command line remark: option '-MP' not supported
+ if (grep 'ignoring option' conftest.err ||
+ grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
+ am_cv_CC_dependencies_compiler_type=$depmode
+ break
+ fi
+ fi
+ done
+
+ cd ..
+ rm -rf conftest.dir
+else
+ am_cv_CC_dependencies_compiler_type=none
+fi
+
+fi
+echo "$as_me:$LINENO: result: $am_cv_CC_dependencies_compiler_type" >&5
+echo "${ECHO_T}$am_cv_CC_dependencies_compiler_type" >&6
+CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
+
+
+
+if
+ test "x$enable_dependency_tracking" != xno \
+ && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then
+ am__fastdepCC_TRUE=
+ am__fastdepCC_FALSE='#'
+else
+ am__fastdepCC_TRUE='#'
+ am__fastdepCC_FALSE=
+fi
+
+
+if test -z "$CC"; then
+ # Extract the first word of "cc", so it can be a program name with args.
+set dummy cc; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_CC+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+ ac_prog_rejected=no
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
+ ac_prog_rejected=yes
+ continue
+ fi
+ ac_cv_prog_CC="cc"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
+if test $ac_prog_rejected = yes; then
+ # We found a bogon in the path, so make sure we never use it.
+ set dummy $ac_cv_prog_CC
+ shift
+ if test $# != 0; then
+ # We chose a different compiler from the bogus one.
+ # However, it has the same basename, so the bogon will be chosen
+ # first if we set CC to just the basename; use the full file name.
+ shift
+ ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
+ fi
+fi
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+ echo "$as_me:$LINENO: result: $CC" >&5
+echo "${ECHO_T}$CC" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+ test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable cc found in \$PATH" >&5
+echo "$as_me: error: no acceptable cc found in \$PATH" >&2;}
+ { (exit 1); exit 1; }; }
+fi
+
+echo "$as_me:$LINENO: checking whether we are using GNU C" >&5
+echo $ECHO_N "checking whether we are using GNU C... $ECHO_C" >&6
+if test "${ac_cv_c_compiler_gnu+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat > conftest.c <<EOF
+#ifdef __GNUC__
+ yes;
+#endif
+EOF
+if { ac_try='${CC-cc} -E conftest.c'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } | egrep yes >/dev/null 2>&1; then
+ ac_cv_c_compiler_gnu=yes
+else
+ ac_cv_c_compiler_gnu=no
+fi
+fi
+echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
+echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
+
+if test $ac_cv_c_compiler_gnu = yes; then
+ GCC=yes
+ ac_test_CFLAGS="${CFLAGS+set}"
+ ac_save_CFLAGS="$CFLAGS"
+ CFLAGS=
+ ac_test_CFLAGS=${CFLAGS+set}
+ac_save_CFLAGS=$CFLAGS
+CFLAGS="-g"
+echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
+echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
+if test "${ac_cv_prog_cc_g+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_prog_cc_g=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_prog_cc_g=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
+echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
+if test "$ac_test_CFLAGS" = set; then
+ CFLAGS=$ac_save_CFLAGS
+elif test $ac_cv_prog_cc_g = yes; then
+ if test "$GCC" = yes; then
+ CFLAGS="-g -O2"
+ else
+ CFLAGS="-g"
+ fi
+else
+ if test "$GCC" = yes; then
+ CFLAGS="-O2"
+ else
+ CFLAGS=
+ fi
+fi
+ if test "$ac_test_CFLAGS" = set; then
+ CFLAGS="$ac_save_CFLAGS"
+ elif test $ac_cv_prog_cc_g = yes; then
+ CFLAGS="-g -O2"
+ else
+ CFLAGS="-O2"
+ fi
+else
+ GCC=
+ test "${CFLAGS+set}" = set || CFLAGS="-g"
+fi
+
+AS=${AS-as}
+
+AR=${AR-ar}
+
+LD=${LD-ld}
+
+if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
+set dummy ${ac_tool_prefix}ranlib; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_RANLIB+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$RANLIB"; then
+ ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
+fi
+fi
+RANLIB=$ac_cv_prog_RANLIB
+if test -n "$RANLIB"; then
+ echo "$as_me:$LINENO: result: $RANLIB" >&5
+echo "${ECHO_T}$RANLIB" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+fi
+if test -z "$ac_cv_prog_RANLIB"; then
+ ac_ct_RANLIB=$RANLIB
+ # Extract the first word of "ranlib", so it can be a program name with args.
+set dummy ranlib; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$ac_ct_RANLIB"; then
+ ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_RANLIB="ranlib"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
+ test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":"
+fi
+fi
+ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
+if test -n "$ac_ct_RANLIB"; then
+ echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
+echo "${ECHO_T}$ac_ct_RANLIB" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+ RANLIB=$ac_ct_RANLIB
+else
+ RANLIB="$ac_cv_prog_RANLIB"
+fi
+
+# By default we simply use the C compiler to build assembly code.
+
+test "${CCAS+set}" = set || CCAS=$CC
+test "${CCASFLAGS+set}" = set || CCASFLAGS=$CFLAGS
+
+
+
+
+host_makefile_frag=${srcdir}/../config/default.mh
+
+host_makefile_frag_path=$host_makefile_frag
+
+
+target_makefile_frag_path=$target_makefile_frag
+
+
+
+
+ ac_config_files="$ac_config_files Makefile"
+
+cat >confcache <<\_ACEOF
+# This file is a shell script that caches the results of configure
+# tests run on this system so they can be shared between configure
+# scripts and configure runs, see configure's option --config-cache.
+# It is not useful on other systems. If it contains results you don't
+# want to keep, you may remove or edit it.
+#
+# config.status only pays attention to the cache file if you give it
+# the --recheck option to rerun configure.
+#
+# `ac_cv_env_foo' variables (set or unset) will be overridden when
+# loading this file, other *unset* `ac_cv_foo' will be assigned the
+# following values.
+
+_ACEOF
+
+# The following way of writing the cache mishandles newlines in values,
+# but we know of no workaround that is simple, portable, and efficient.
+# So, don't put newlines in cache variables' values.
+# Ultrix sh set writes to stderr and can't be redirected directly,
+# and sets the high bit in the cache file unless we assign to the vars.
+{
+ (set) 2>&1 |
+ case `(ac_space=' '; set | grep ac_space) 2>&1` in
+ *ac_space=\ *)
+ # `set' does not quote correctly, so add quotes (double-quote
+ # substitution turns \\\\ into \\, and sed turns \\ into \).
+ sed -n \
+ "s/'/'\\\\''/g;
+ s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
+ ;;
+ *)
+ # `set' quotes correctly as required by POSIX, so do not add quotes.
+ sed -n \
+ "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
+ ;;
+ esac;
+} |
+ sed '
+ t clear
+ : clear
+ s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
+ t end
+ /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
+ : end' >>confcache
+if diff $cache_file confcache >/dev/null 2>&1; then :; else
+ if test -w $cache_file; then
+ test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
+ cat confcache >$cache_file
+ else
+ echo "not updating unwritable cache $cache_file"
+ fi
+fi
+rm -f confcache
+
+test "x$prefix" = xNONE && prefix=$ac_default_prefix
+# Let make expand exec_prefix.
+test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
+
+# VPATH may cause trouble with some makes, so we remove $(srcdir),
+# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
+# trailing colons and then remove the whole line if VPATH becomes empty
+# (actually we leave an empty line to preserve line numbers).
+if test "x$srcdir" = x.; then
+ ac_vpsub='/^[ ]*VPATH[ ]*=/{
+s/:*\$(srcdir):*/:/;
+s/:*\${srcdir}:*/:/;
+s/:*@srcdir@:*/:/;
+s/^\([^=]*=[ ]*\):*/\1/;
+s/:*$//;
+s/^[^=]*=[ ]*$//;
+}'
+fi
+
+# Transform confdefs.h into DEFS.
+# Protect against shell expansion while executing Makefile rules.
+# Protect against Makefile macro expansion.
+#
+# If the first sed substitution is executed (which looks for macros that
+# take arguments), then we branch to the quote section. Otherwise,
+# look for a macro that doesn't take arguments.
+cat >confdef2opt.sed <<\_ACEOF
+t clear
+: clear
+s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*([^)]*)\)[ ]*\(.*\),-D\1=\2,g
+t quote
+s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\),-D\1=\2,g
+t quote
+d
+: quote
+s,[ `~#$^&*(){}\\|;'"<>?],\\&,g
+s,\[,\\&,g
+s,\],\\&,g
+s,\$,$$,g
+p
+_ACEOF
+# We use echo to avoid assuming a particular line-breaking character.
+# The extra dot is to prevent the shell from consuming trailing
+# line-breaks from the sub-command output. A line-break within
+# single-quotes doesn't work because, if this script is created in a
+# platform that uses two characters for line-breaks (e.g., DOS), tr
+# would break.
+ac_LF_and_DOT=`echo; echo .`
+DEFS=`sed -n -f confdef2opt.sed confdefs.h | tr "$ac_LF_and_DOT" ' .'`
+rm -f confdef2opt.sed
+
+
+ac_libobjs=
+ac_ltlibobjs=
+for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
+ # 1. Remove the extension, and $U if already installed.
+ ac_i=`echo "$ac_i" |
+ sed 's/\$U\././;s/\.o$//;s/\.obj$//'`
+ # 2. Add them.
+ ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext"
+ ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo'
+done
+LIBOBJS=$ac_libobjs
+
+LTLIBOBJS=$ac_ltlibobjs
+
+
+if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then
+ { { echo "$as_me:$LINENO: error: conditional \"AMDEP\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+echo "$as_me: error: conditional \"AMDEP\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
+ { { echo "$as_me:$LINENO: error: conditional \"am__fastdepCC\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+echo "$as_me: error: conditional \"am__fastdepCC\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+
+: ${CONFIG_STATUS=./config.status}
+ac_clean_files_save=$ac_clean_files
+ac_clean_files="$ac_clean_files $CONFIG_STATUS"
+{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
+echo "$as_me: creating $CONFIG_STATUS" >&6;}
+cat >$CONFIG_STATUS <<_ACEOF
+#! $SHELL
+# Generated by $as_me.
+# Run this file to recreate the current configuration.
+# Compiler output produced by configure, useful for debugging
+# configure, is in config.log if it exists.
+
+debug=false
+ac_cs_recheck=false
+ac_cs_silent=false
+SHELL=\${CONFIG_SHELL-$SHELL}
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF
+## --------------------- ##
+## M4sh Initialization. ##
+## --------------------- ##
+
+# Be Bourne compatible
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
+ emulate sh
+ NULLCMD=:
+ # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
+ # is contrary to our usage. Disable this feature.
+ alias -g '${1+"$@"}'='"$@"'
+elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
+ set -o posix
+fi
+DUALCASE=1; export DUALCASE # for MKS sh
+
+# Support unset when possible.
+if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
+ as_unset=unset
+else
+ as_unset=false
+fi
+
+
+# Work around bugs in pre-3.0 UWIN ksh.
+$as_unset ENV MAIL MAILPATH
+PS1='$ '
+PS2='> '
+PS4='+ '
+
+# NLS nuisances.
+for as_var in \
+ LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
+ LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
+ LC_TELEPHONE LC_TIME
+do
+ if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
+ eval $as_var=C; export $as_var
+ else
+ $as_unset $as_var
+ fi
+done
+
+# Required to use basename.
+if expr a : '\(a\)' >/dev/null 2>&1; then
+ as_expr=expr
+else
+ as_expr=false
+fi
+
+if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
+ as_basename=basename
+else
+ as_basename=false
+fi
+
+
+# Name of the executable.
+as_me=`$as_basename "$0" ||
+$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
+ X"$0" : 'X\(//\)$' \| \
+ X"$0" : 'X\(/\)$' \| \
+ . : '\(.\)' 2>/dev/null ||
+echo X/"$0" |
+ sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
+ /^X\/\(\/\/\)$/{ s//\1/; q; }
+ /^X\/\(\/\).*/{ s//\1/; q; }
+ s/.*/./; q'`
+
+
+# PATH needs CR, and LINENO needs CR and PATH.
+# Avoid depending upon Character Ranges.
+as_cr_letters='abcdefghijklmnopqrstuvwxyz'
+as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
+as_cr_Letters=$as_cr_letters$as_cr_LETTERS
+as_cr_digits='0123456789'
+as_cr_alnum=$as_cr_Letters$as_cr_digits
+
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+ echo "#! /bin/sh" >conf$$.sh
+ echo "exit 0" >>conf$$.sh
+ chmod +x conf$$.sh
+ if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
+ PATH_SEPARATOR=';'
+ else
+ PATH_SEPARATOR=:
+ fi
+ rm -f conf$$.sh
+fi
+
+
+ as_lineno_1=$LINENO
+ as_lineno_2=$LINENO
+ as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
+ test "x$as_lineno_1" != "x$as_lineno_2" &&
+ test "x$as_lineno_3" = "x$as_lineno_2" || {
+ # Find who we are. Look in the path if we contain no path at all
+ # relative or not.
+ case $0 in
+ *[\\/]* ) as_myself=$0 ;;
+ *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
+done
+
+ ;;
+ esac
+ # We did not find ourselves, most probably we were run as `sh COMMAND'
+ # in which case we are not to be found in the path.
+ if test "x$as_myself" = x; then
+ as_myself=$0
+ fi
+ if test ! -f "$as_myself"; then
+ { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5
+echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;}
+ { (exit 1); exit 1; }; }
+ fi
+ case $CONFIG_SHELL in
+ '')
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for as_base in sh bash ksh sh5; do
+ case $as_dir in
+ /*)
+ if ("$as_dir/$as_base" -c '
+ as_lineno_1=$LINENO
+ as_lineno_2=$LINENO
+ as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
+ test "x$as_lineno_1" != "x$as_lineno_2" &&
+ test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then
+ $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
+ $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
+ CONFIG_SHELL=$as_dir/$as_base
+ export CONFIG_SHELL
+ exec "$CONFIG_SHELL" "$0" ${1+"$@"}
+ fi;;
+ esac
+ done
+done
+;;
+ esac
+
+ # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
+ # uniformly replaced by the line number. The first 'sed' inserts a
+ # line-number line before each line; the second 'sed' does the real
+ # work. The second script uses 'N' to pair each line-number line
+ # with the numbered line, and appends trailing '-' during
+ # substitution so that $LINENO is not a special case at line end.
+ # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
+ # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-)
+ sed '=' <$as_myself |
+ sed '
+ N
+ s,$,-,
+ : loop
+ s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
+ t loop
+ s,-$,,
+ s,^['$as_cr_digits']*\n,,
+ ' >$as_me.lineno &&
+ chmod +x $as_me.lineno ||
+ { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5
+echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;}
+ { (exit 1); exit 1; }; }
+
+ # Don't try to exec as it changes $[0], causing all sort of problems
+ # (the dirname of $[0] is not the place where we might find the
+ # original and so on. Autoconf is especially sensible to this).
+ . ./$as_me.lineno
+ # Exit status is that of the last command.
+ exit
+}
+
+
+case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
+ *c*,-n*) ECHO_N= ECHO_C='
+' ECHO_T=' ' ;;
+ *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
+ *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
+esac
+
+if expr a : '\(a\)' >/dev/null 2>&1; then
+ as_expr=expr
+else
+ as_expr=false
+fi
+
+rm -f conf$$ conf$$.exe conf$$.file
+echo >conf$$.file
+if ln -s conf$$.file conf$$ 2>/dev/null; then
+ # We could just check for DJGPP; but this test a) works b) is more generic
+ # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
+ if test -f conf$$.exe; then
+ # Don't use ln at all; we don't have any links
+ as_ln_s='cp -p'
+ else
+ as_ln_s='ln -s'
+ fi
+elif ln conf$$.file conf$$ 2>/dev/null; then
+ as_ln_s=ln
+else
+ as_ln_s='cp -p'
+fi
+rm -f conf$$ conf$$.exe conf$$.file
+
+if mkdir -p . 2>/dev/null; then
+ as_mkdir_p=:
+else
+ test -d ./-p && rmdir ./-p
+ as_mkdir_p=false
+fi
+
+as_executable_p="test -f"
+
+# Sed expression to map a string onto a valid CPP name.
+as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
+
+# Sed expression to map a string onto a valid variable name.
+as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
+
+
+# IFS
+# We need space, tab and new line, in precisely that order.
+as_nl='
+'
+IFS=" $as_nl"
+
+# CDPATH.
+$as_unset CDPATH
+
+exec 6>&1
+
+# Open the log real soon, to keep \$[0] and so on meaningful, and to
+# report actual input values of CONFIG_FILES etc. instead of their
+# values after options handling. Logging --version etc. is OK.
+exec 5>>config.log
+{
+ echo
+ sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
+## Running $as_me. ##
+_ASBOX
+} >&5
+cat >&5 <<_CSEOF
+
+This file was extended by $as_me, which was
+generated by GNU Autoconf 2.59. Invocation command line was
+
+ CONFIG_FILES = $CONFIG_FILES
+ CONFIG_HEADERS = $CONFIG_HEADERS
+ CONFIG_LINKS = $CONFIG_LINKS
+ CONFIG_COMMANDS = $CONFIG_COMMANDS
+ $ $0 $@
+
+_CSEOF
+echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5
+echo >&5
+_ACEOF
+
+# Files that config.status was made for.
+if test -n "$ac_config_files"; then
+ echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
+fi
+
+if test -n "$ac_config_headers"; then
+ echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
+fi
+
+if test -n "$ac_config_links"; then
+ echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
+fi
+
+if test -n "$ac_config_commands"; then
+ echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
+fi
+
+cat >>$CONFIG_STATUS <<\_ACEOF
+
+ac_cs_usage="\
+\`$as_me' instantiates files from templates according to the
+current configuration.
+
+Usage: $0 [OPTIONS] [FILE]...
+
+ -h, --help print this help, then exit
+ -V, --version print version number, then exit
+ -q, --quiet do not print progress messages
+ -d, --debug don't remove temporary files
+ --recheck update $as_me by reconfiguring in the same conditions
+ --file=FILE[:TEMPLATE]
+ instantiate the configuration file FILE
+
+Configuration files:
+$config_files
+
+Configuration commands:
+$config_commands
+
+Report bugs to <bug-autoconf@gnu.org>."
+_ACEOF
+
+cat >>$CONFIG_STATUS <<_ACEOF
+ac_cs_version="\\
+config.status
+configured by $0, generated by GNU Autoconf 2.59,
+ with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
+
+Copyright (C) 2003 Free Software Foundation, Inc.
+This config.status script is free software; the Free Software Foundation
+gives unlimited permission to copy, distribute and modify it."
+srcdir=$srcdir
+INSTALL="$INSTALL"
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF
+# If no file are specified by the user, then we need to provide default
+# value. By we need to know if files were specified by the user.
+ac_need_defaults=:
+while test $# != 0
+do
+ case $1 in
+ --*=*)
+ ac_option=`expr "x$1" : 'x\([^=]*\)='`
+ ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
+ ac_shift=:
+ ;;
+ -*)
+ ac_option=$1
+ ac_optarg=$2
+ ac_shift=shift
+ ;;
+ *) # This is not an option, so the user has probably given explicit
+ # arguments.
+ ac_option=$1
+ ac_need_defaults=false;;
+ esac
+
+ case $ac_option in
+ # Handling of the options.
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF
+ -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
+ ac_cs_recheck=: ;;
+ --version | --vers* | -V )
+ echo "$ac_cs_version"; exit 0 ;;
+ --he | --h)
+ # Conflict between --help and --header
+ { { echo "$as_me:$LINENO: error: ambiguous option: $1
+Try \`$0 --help' for more information." >&5
+echo "$as_me: error: ambiguous option: $1
+Try \`$0 --help' for more information." >&2;}
+ { (exit 1); exit 1; }; };;
+ --help | --hel | -h )
+ echo "$ac_cs_usage"; exit 0 ;;
+ --debug | --d* | -d )
+ debug=: ;;
+ --file | --fil | --fi | --f )
+ $ac_shift
+ CONFIG_FILES="$CONFIG_FILES $ac_optarg"
+ ac_need_defaults=false;;
+ --header | --heade | --head | --hea )
+ $ac_shift
+ CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
+ ac_need_defaults=false;;
+ -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+ | -silent | --silent | --silen | --sile | --sil | --si | --s)
+ ac_cs_silent=: ;;
+
+ # This is an error.
+ -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1
+Try \`$0 --help' for more information." >&5
+echo "$as_me: error: unrecognized option: $1
+Try \`$0 --help' for more information." >&2;}
+ { (exit 1); exit 1; }; } ;;
+
+ *) ac_config_targets="$ac_config_targets $1" ;;
+
+ esac
+ shift
+done
+
+ac_configure_extra_args=
+
+if $ac_cs_silent; then
+ exec 6>/dev/null
+ ac_configure_extra_args="$ac_configure_extra_args --silent"
+fi
+
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF
+if \$ac_cs_recheck; then
+ echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
+ exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
+fi
+
+_ACEOF
+
+cat >>$CONFIG_STATUS <<_ACEOF
+#
+# INIT-COMMANDS section.
+#
+
+AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"
+srcdir=${srcdir}
+target=${target}
+with_multisubdir=${with_multisubdir}
+ac_configure_args="${ac_configure_args} --enable-multilib"
+CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
+libgloss_topdir=${libgloss_topdir}
+
+
+_ACEOF
+
+
+
+cat >>$CONFIG_STATUS <<\_ACEOF
+for ac_config_target in $ac_config_targets
+do
+ case "$ac_config_target" in
+ # Handling of arguments.
+ "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
+ "depfiles" ) CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
+ *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
+echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
+ { (exit 1); exit 1; }; };;
+ esac
+done
+
+# If the user did not use the arguments to specify the items to instantiate,
+# then the envvar interface is used. Set only those that are not.
+# We use the long form for the default assignment because of an extremely
+# bizarre bug on SunOS 4.1.3.
+if $ac_need_defaults; then
+ test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
+ test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
+fi
+
+# Have a temporary directory for convenience. Make it in the build tree
+# simply because there is no reason to put it here, and in addition,
+# creating and moving files from /tmp can sometimes cause problems.
+# Create a temporary directory, and hook for its removal unless debugging.
+$debug ||
+{
+ trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
+ trap '{ (exit 1); exit 1; }' 1 2 13 15
+}
+
+# Create a (secure) tmp directory for tmp files.
+
+{
+ tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` &&
+ test -n "$tmp" && test -d "$tmp"
+} ||
+{
+ tmp=./confstat$$-$RANDOM
+ (umask 077 && mkdir $tmp)
+} ||
+{
+ echo "$me: cannot create a temporary directory in ." >&2
+ { (exit 1); exit 1; }
+}
+
+_ACEOF
+
+cat >>$CONFIG_STATUS <<_ACEOF
+
+#
+# CONFIG_FILES section.
+#
+
+# No need to generate the scripts if there are no CONFIG_FILES.
+# This happens for instance when ./config.status config.h
+if test -n "\$CONFIG_FILES"; then
+ # Protect against being on the right side of a sed subst in config.status.
+ sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
+ s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
+s,@SHELL@,$SHELL,;t t
+s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
+s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
+s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
+s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
+s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
+s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
+s,@exec_prefix@,$exec_prefix,;t t
+s,@prefix@,$prefix,;t t
+s,@program_transform_name@,$program_transform_name,;t t
+s,@bindir@,$bindir,;t t
+s,@sbindir@,$sbindir,;t t
+s,@libexecdir@,$libexecdir,;t t
+s,@datadir@,$datadir,;t t
+s,@sysconfdir@,$sysconfdir,;t t
+s,@sharedstatedir@,$sharedstatedir,;t t
+s,@localstatedir@,$localstatedir,;t t
+s,@libdir@,$libdir,;t t
+s,@includedir@,$includedir,;t t
+s,@oldincludedir@,$oldincludedir,;t t
+s,@infodir@,$infodir,;t t
+s,@mandir@,$mandir,;t t
+s,@build_alias@,$build_alias,;t t
+s,@host_alias@,$host_alias,;t t
+s,@target_alias@,$target_alias,;t t
+s,@DEFS@,$DEFS,;t t
+s,@ECHO_C@,$ECHO_C,;t t
+s,@ECHO_N@,$ECHO_N,;t t
+s,@ECHO_T@,$ECHO_T,;t t
+s,@LIBS@,$LIBS,;t t
+s,@build@,$build,;t t
+s,@build_cpu@,$build_cpu,;t t
+s,@build_vendor@,$build_vendor,;t t
+s,@build_os@,$build_os,;t t
+s,@host@,$host,;t t
+s,@host_cpu@,$host_cpu,;t t
+s,@host_vendor@,$host_vendor,;t t
+s,@host_os@,$host_os,;t t
+s,@target@,$target,;t t
+s,@target_cpu@,$target_cpu,;t t
+s,@target_vendor@,$target_vendor,;t t
+s,@target_os@,$target_os,;t t
+s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
+s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
+s,@INSTALL_DATA@,$INSTALL_DATA,;t t
+s,@CC@,$CC,;t t
+s,@am__leading_dot@,$am__leading_dot,;t t
+s,@DEPDIR@,$DEPDIR,;t t
+s,@am__include@,$am__include,;t t
+s,@am__quote@,$am__quote,;t t
+s,@AMDEP_TRUE@,$AMDEP_TRUE,;t t
+s,@AMDEP_FALSE@,$AMDEP_FALSE,;t t
+s,@AMDEPBACKSLASH@,$AMDEPBACKSLASH,;t t
+s,@CCDEPMODE@,$CCDEPMODE,;t t
+s,@am__fastdepCC_TRUE@,$am__fastdepCC_TRUE,;t t
+s,@am__fastdepCC_FALSE@,$am__fastdepCC_FALSE,;t t
+s,@AS@,$AS,;t t
+s,@AR@,$AR,;t t
+s,@LD@,$LD,;t t
+s,@RANLIB@,$RANLIB,;t t
+s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
+s,@CCAS@,$CCAS,;t t
+s,@CCASFLAGS@,$CCASFLAGS,;t t
+s,@host_makefile_frag_path@,$host_makefile_frag_path,;t t
+s,@target_makefile_frag_path@,$target_makefile_frag_path,;t t
+s,@part_specific_obj@,$part_specific_obj,;t t
+s,@LIBOBJS@,$LIBOBJS,;t t
+s,@LTLIBOBJS@,$LTLIBOBJS,;t t
+/@host_makefile_frag@/r $host_makefile_frag
+s,@host_makefile_frag@,,;t t
+/@target_makefile_frag@/r $target_makefile_frag
+s,@target_makefile_frag@,,;t t
+CEOF
+
+_ACEOF
+
+ cat >>$CONFIG_STATUS <<\_ACEOF
+ # Split the substitutions into bite-sized pieces for seds with
+ # small command number limits, like on Digital OSF/1 and HP-UX.
+ ac_max_sed_lines=48
+ ac_sed_frag=1 # Number of current file.
+ ac_beg=1 # First line for current file.
+ ac_end=$ac_max_sed_lines # Line after last line for current file.
+ ac_more_lines=:
+ ac_sed_cmds=
+ while $ac_more_lines; do
+ if test $ac_beg -gt 1; then
+ sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
+ else
+ sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
+ fi
+ if test ! -s $tmp/subs.frag; then
+ ac_more_lines=false
+ else
+ # The purpose of the label and of the branching condition is to
+ # speed up the sed processing (if there are no `@' at all, there
+ # is no need to browse any of the substitutions).
+ # These are the two extra sed commands mentioned above.
+ (echo ':t
+ /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
+ if test -z "$ac_sed_cmds"; then
+ ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
+ else
+ ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
+ fi
+ ac_sed_frag=`expr $ac_sed_frag + 1`
+ ac_beg=$ac_end
+ ac_end=`expr $ac_end + $ac_max_sed_lines`
+ fi
+ done
+ if test -z "$ac_sed_cmds"; then
+ ac_sed_cmds=cat
+ fi
+fi # test -n "$CONFIG_FILES"
+
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF
+for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
+ # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
+ case $ac_file in
+ - | *:- | *:-:* ) # input from stdin
+ cat >$tmp/stdin
+ ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
+ ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
+ *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
+ ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
+ * ) ac_file_in=$ac_file.in ;;
+ esac
+
+ # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
+ ac_dir=`(dirname "$ac_file") 2>/dev/null ||
+$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$ac_file" : 'X\(//\)[^/]' \| \
+ X"$ac_file" : 'X\(//\)$' \| \
+ X"$ac_file" : 'X\(/\)' \| \
+ . : '\(.\)' 2>/dev/null ||
+echo X"$ac_file" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+ /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+ /^X\(\/\/\)$/{ s//\1/; q; }
+ /^X\(\/\).*/{ s//\1/; q; }
+ s/.*/./; q'`
+ { if $as_mkdir_p; then
+ mkdir -p "$ac_dir"
+ else
+ as_dir="$ac_dir"
+ as_dirs=
+ while test ! -d "$as_dir"; do
+ as_dirs="$as_dir $as_dirs"
+ as_dir=`(dirname "$as_dir") 2>/dev/null ||
+$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$as_dir" : 'X\(//\)[^/]' \| \
+ X"$as_dir" : 'X\(//\)$' \| \
+ X"$as_dir" : 'X\(/\)' \| \
+ . : '\(.\)' 2>/dev/null ||
+echo X"$as_dir" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+ /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+ /^X\(\/\/\)$/{ s//\1/; q; }
+ /^X\(\/\).*/{ s//\1/; q; }
+ s/.*/./; q'`
+ done
+ test ! -n "$as_dirs" || mkdir $as_dirs
+ fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
+echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
+ { (exit 1); exit 1; }; }; }
+
+ ac_builddir=.
+
+if test "$ac_dir" != .; then
+ ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
+ # A "../" for each directory in $ac_dir_suffix.
+ ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
+else
+ ac_dir_suffix= ac_top_builddir=
+fi
+
+case $srcdir in
+ .) # No --srcdir option. We are building in place.
+ ac_srcdir=.
+ if test -z "$ac_top_builddir"; then
+ ac_top_srcdir=.
+ else
+ ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
+ fi ;;
+ [\\/]* | ?:[\\/]* ) # Absolute path.
+ ac_srcdir=$srcdir$ac_dir_suffix;
+ ac_top_srcdir=$srcdir ;;
+ *) # Relative path.
+ ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
+ ac_top_srcdir=$ac_top_builddir$srcdir ;;
+esac
+
+# Do not use `cd foo && pwd` to compute absolute paths, because
+# the directories may not exist.
+case `pwd` in
+.) ac_abs_builddir="$ac_dir";;
+*)
+ case "$ac_dir" in
+ .) ac_abs_builddir=`pwd`;;
+ [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
+ *) ac_abs_builddir=`pwd`/"$ac_dir";;
+ esac;;
+esac
+case $ac_abs_builddir in
+.) ac_abs_top_builddir=${ac_top_builddir}.;;
+*)
+ case ${ac_top_builddir}. in
+ .) ac_abs_top_builddir=$ac_abs_builddir;;
+ [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
+ *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
+ esac;;
+esac
+case $ac_abs_builddir in
+.) ac_abs_srcdir=$ac_srcdir;;
+*)
+ case $ac_srcdir in
+ .) ac_abs_srcdir=$ac_abs_builddir;;
+ [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
+ *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
+ esac;;
+esac
+case $ac_abs_builddir in
+.) ac_abs_top_srcdir=$ac_top_srcdir;;
+*)
+ case $ac_top_srcdir in
+ .) ac_abs_top_srcdir=$ac_abs_builddir;;
+ [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
+ *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
+ esac;;
+esac
+
+
+ case $INSTALL in
+ [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
+ *) ac_INSTALL=$ac_top_builddir$INSTALL ;;
+ esac
+
+ if test x"$ac_file" != x-; then
+ { echo "$as_me:$LINENO: creating $ac_file" >&5
+echo "$as_me: creating $ac_file" >&6;}
+ rm -f "$ac_file"
+ fi
+ # Let's still pretend it is `configure' which instantiates (i.e., don't
+ # use $as_me), people would be surprised to read:
+ # /* config.h. Generated by config.status. */
+ if test x"$ac_file" = x-; then
+ configure_input=
+ else
+ configure_input="$ac_file. "
+ fi
+ configure_input=$configure_input"Generated from `echo $ac_file_in |
+ sed 's,.*/,,'` by configure."
+
+ # First look for the input files in the build tree, otherwise in the
+ # src tree.
+ ac_file_inputs=`IFS=:
+ for f in $ac_file_in; do
+ case $f in
+ -) echo $tmp/stdin ;;
+ [\\/$]*)
+ # Absolute (can't be DOS-style, as IFS=:)
+ test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
+echo "$as_me: error: cannot find input file: $f" >&2;}
+ { (exit 1); exit 1; }; }
+ echo "$f";;
+ *) # Relative
+ if test -f "$f"; then
+ # Build tree
+ echo "$f"
+ elif test -f "$srcdir/$f"; then
+ # Source tree
+ echo "$srcdir/$f"
+ else
+ # /dev/null tree
+ { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
+echo "$as_me: error: cannot find input file: $f" >&2;}
+ { (exit 1); exit 1; }; }
+ fi;;
+ esac
+ done` || { (exit 1); exit 1; }
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF
+ sed "$ac_vpsub
+$extrasub
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF
+:t
+/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
+s,@configure_input@,$configure_input,;t t
+s,@srcdir@,$ac_srcdir,;t t
+s,@abs_srcdir@,$ac_abs_srcdir,;t t
+s,@top_srcdir@,$ac_top_srcdir,;t t
+s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t
+s,@builddir@,$ac_builddir,;t t
+s,@abs_builddir@,$ac_abs_builddir,;t t
+s,@top_builddir@,$ac_top_builddir,;t t
+s,@abs_top_builddir@,$ac_abs_top_builddir,;t t
+s,@INSTALL@,$ac_INSTALL,;t t
+" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
+ rm -f $tmp/stdin
+ if test x"$ac_file" != x-; then
+ mv $tmp/out $ac_file
+ else
+ cat $tmp/out
+ rm -f $tmp/out
+ fi
+
+ # Run the commands associated with the file.
+ case $ac_file in
+ Makefile ) . ${libgloss_topdir}/config-ml.in ;;
+ esac
+done
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF
+
+#
+# CONFIG_COMMANDS section.
+#
+for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
+ ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
+ ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
+ ac_dir=`(dirname "$ac_dest") 2>/dev/null ||
+$as_expr X"$ac_dest" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$ac_dest" : 'X\(//\)[^/]' \| \
+ X"$ac_dest" : 'X\(//\)$' \| \
+ X"$ac_dest" : 'X\(/\)' \| \
+ . : '\(.\)' 2>/dev/null ||
+echo X"$ac_dest" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+ /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+ /^X\(\/\/\)$/{ s//\1/; q; }
+ /^X\(\/\).*/{ s//\1/; q; }
+ s/.*/./; q'`
+ { if $as_mkdir_p; then
+ mkdir -p "$ac_dir"
+ else
+ as_dir="$ac_dir"
+ as_dirs=
+ while test ! -d "$as_dir"; do
+ as_dirs="$as_dir $as_dirs"
+ as_dir=`(dirname "$as_dir") 2>/dev/null ||
+$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$as_dir" : 'X\(//\)[^/]' \| \
+ X"$as_dir" : 'X\(//\)$' \| \
+ X"$as_dir" : 'X\(/\)' \| \
+ . : '\(.\)' 2>/dev/null ||
+echo X"$as_dir" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+ /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+ /^X\(\/\/\)$/{ s//\1/; q; }
+ /^X\(\/\).*/{ s//\1/; q; }
+ s/.*/./; q'`
+ done
+ test ! -n "$as_dirs" || mkdir $as_dirs
+ fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
+echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
+ { (exit 1); exit 1; }; }; }
+
+ ac_builddir=.
+
+if test "$ac_dir" != .; then
+ ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
+ # A "../" for each directory in $ac_dir_suffix.
+ ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
+else
+ ac_dir_suffix= ac_top_builddir=
+fi
+
+case $srcdir in
+ .) # No --srcdir option. We are building in place.
+ ac_srcdir=.
+ if test -z "$ac_top_builddir"; then
+ ac_top_srcdir=.
+ else
+ ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
+ fi ;;
+ [\\/]* | ?:[\\/]* ) # Absolute path.
+ ac_srcdir=$srcdir$ac_dir_suffix;
+ ac_top_srcdir=$srcdir ;;
+ *) # Relative path.
+ ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
+ ac_top_srcdir=$ac_top_builddir$srcdir ;;
+esac
+
+# Do not use `cd foo && pwd` to compute absolute paths, because
+# the directories may not exist.
+case `pwd` in
+.) ac_abs_builddir="$ac_dir";;
+*)
+ case "$ac_dir" in
+ .) ac_abs_builddir=`pwd`;;
+ [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
+ *) ac_abs_builddir=`pwd`/"$ac_dir";;
+ esac;;
+esac
+case $ac_abs_builddir in
+.) ac_abs_top_builddir=${ac_top_builddir}.;;
+*)
+ case ${ac_top_builddir}. in
+ .) ac_abs_top_builddir=$ac_abs_builddir;;
+ [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
+ *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
+ esac;;
+esac
+case $ac_abs_builddir in
+.) ac_abs_srcdir=$ac_srcdir;;
+*)
+ case $ac_srcdir in
+ .) ac_abs_srcdir=$ac_abs_builddir;;
+ [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
+ *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
+ esac;;
+esac
+case $ac_abs_builddir in
+.) ac_abs_top_srcdir=$ac_top_srcdir;;
+*)
+ case $ac_top_srcdir in
+ .) ac_abs_top_srcdir=$ac_abs_builddir;;
+ [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
+ *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
+ esac;;
+esac
+
+
+ { echo "$as_me:$LINENO: executing $ac_dest commands" >&5
+echo "$as_me: executing $ac_dest commands" >&6;}
+ case $ac_dest in
+ depfiles ) test x"$AMDEP_TRUE" != x"" || for mf in $CONFIG_FILES; do
+ # Strip MF so we end up with the name of the file.
+ mf=`echo "$mf" | sed -e 's/:.*$//'`
+ # Check whether this is an Automake generated Makefile or not.
+ # We used to match only the files named `Makefile.in', but
+ # some people rename them; so instead we look at the file content.
+ # Grep'ing the first line is not enough: some people post-process
+ # each Makefile.in and add a new line on top of each file to say so.
+ # So let's grep whole file.
+ if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then
+ dirpart=`(dirname "$mf") 2>/dev/null ||
+$as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$mf" : 'X\(//\)[^/]' \| \
+ X"$mf" : 'X\(//\)$' \| \
+ X"$mf" : 'X\(/\)' \| \
+ . : '\(.\)' 2>/dev/null ||
+echo X"$mf" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+ /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+ /^X\(\/\/\)$/{ s//\1/; q; }
+ /^X\(\/\).*/{ s//\1/; q; }
+ s/.*/./; q'`
+ else
+ continue
+ fi
+ # Extract the definition of DEPDIR, am__include, and am__quote
+ # from the Makefile without running `make'.
+ DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
+ test -z "$DEPDIR" && continue
+ am__include=`sed -n 's/^am__include = //p' < "$mf"`
+ test -z "am__include" && continue
+ am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
+ # When using ansi2knr, U may be empty or an underscore; expand it
+ U=`sed -n 's/^U = //p' < "$mf"`
+ # Find all dependency output files, they are included files with
+ # $(DEPDIR) in their names. We invoke sed twice because it is the
+ # simplest approach to changing $(DEPDIR) to its actual value in the
+ # expansion.
+ for file in `sed -n "
+ s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
+ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
+ # Make sure the directory exists.
+ test -f "$dirpart/$file" && continue
+ fdir=`(dirname "$file") 2>/dev/null ||
+$as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$file" : 'X\(//\)[^/]' \| \
+ X"$file" : 'X\(//\)$' \| \
+ X"$file" : 'X\(/\)' \| \
+ . : '\(.\)' 2>/dev/null ||
+echo X"$file" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+ /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+ /^X\(\/\/\)$/{ s//\1/; q; }
+ /^X\(\/\).*/{ s//\1/; q; }
+ s/.*/./; q'`
+ { if $as_mkdir_p; then
+ mkdir -p $dirpart/$fdir
+ else
+ as_dir=$dirpart/$fdir
+ as_dirs=
+ while test ! -d "$as_dir"; do
+ as_dirs="$as_dir $as_dirs"
+ as_dir=`(dirname "$as_dir") 2>/dev/null ||
+$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$as_dir" : 'X\(//\)[^/]' \| \
+ X"$as_dir" : 'X\(//\)$' \| \
+ X"$as_dir" : 'X\(/\)' \| \
+ . : '\(.\)' 2>/dev/null ||
+echo X"$as_dir" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+ /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+ /^X\(\/\/\)$/{ s//\1/; q; }
+ /^X\(\/\).*/{ s//\1/; q; }
+ s/.*/./; q'`
+ done
+ test ! -n "$as_dirs" || mkdir $as_dirs
+ fi || { { echo "$as_me:$LINENO: error: cannot create directory $dirpart/$fdir" >&5
+echo "$as_me: error: cannot create directory $dirpart/$fdir" >&2;}
+ { (exit 1); exit 1; }; }; }
+
+ # echo "creating $dirpart/$file"
+ echo '# dummy' > "$dirpart/$file"
+ done
+done
+ ;;
+ esac
+done
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF
+
+{ (exit 0); exit 0; }
+_ACEOF
+chmod +x $CONFIG_STATUS
+ac_clean_files=$ac_clean_files_save
+
+
+# configure is writing to config.log, and then calls config.status.
+# config.status does its own redirection, appending to config.log.
+# Unfortunately, on DOS this fails, as config.log is still kept open
+# by configure, so config.status won't be able to write to it; its
+# output is simply discarded. So we exec the FD to /dev/null,
+# effectively closing config.log, so it can be properly (re)opened and
+# appended to by config.status. When coming back to configure, we
+# need to make the FD available again.
+if test "$no_create" != yes; then
+ ac_cs_success=:
+ ac_config_status_args=
+ test "$silent" = yes &&
+ ac_config_status_args="$ac_config_status_args --quiet"
+ exec 5>/dev/null
+ $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
+ exec 5>>config.log
+ # Use ||, not &&, to avoid exiting from the if with $? = 1, which
+ # would make configure fail if this is the last instruction.
+ $ac_cs_success || { (exit 1); exit 1; }
+fi
+
+
+
diff --git a/libgloss/visium/configure.in b/libgloss/visium/configure.in
new file mode 100644
index 000000000..33c1872c7
--- /dev/null
+++ b/libgloss/visium/configure.in
@@ -0,0 +1,58 @@
+# Process this file with autoconf to produce a configure script.
+AC_PREREQ(2.59)
+AC_INIT(syscalls.c)
+
+if test "${enable_shared}" = "yes" ; then
+ echo "Shared libraries not supported for cross compiling, ignored"
+fi
+
+if test "$srcdir" = "." ; then
+ if test "${with_target_subdir}" != "." ; then
+ libgloss_topdir="${srcdir}/${with_multisrctop}../../.."
+ else
+ libgloss_topdir="${srcdir}/${with_multisrctop}../.."
+ fi
+else
+ libgloss_topdir="${srcdir}/../.."
+fi
+AC_CONFIG_AUX_DIR($libgloss_topdir)
+
+AC_CANONICAL_SYSTEM
+AC_ARG_PROGRAM
+
+AC_PROG_INSTALL
+
+LIB_AC_PROG_CC
+AS=${AS-as}
+AC_SUBST(AS)
+AR=${AR-ar}
+AC_SUBST(AR)
+LD=${LD-ld}
+AC_SUBST(LD)
+AC_PROG_RANLIB
+LIB_AM_PROG_AS
+
+host_makefile_frag=${srcdir}/../config/default.mh
+
+dnl We have to assign the same value to other variables because autoconf
+dnl doesn't provide a mechanism to substitute a replacement keyword with
+dnl arbitrary data or pathnames.
+dnl
+host_makefile_frag_path=$host_makefile_frag
+AC_SUBST(host_makefile_frag_path)
+AC_SUBST_FILE(host_makefile_frag)
+target_makefile_frag_path=$target_makefile_frag
+AC_SUBST(target_makefile_frag_path)
+AC_SUBST_FILE(target_makefile_frag)
+AC_SUBST(part_specific_obj)
+
+AC_CONFIG_FILES(Makefile,
+. ${libgloss_topdir}/config-ml.in,
+srcdir=${srcdir}
+target=${target}
+with_multisubdir=${with_multisubdir}
+ac_configure_args="${ac_configure_args} --enable-multilib"
+CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
+libgloss_topdir=${libgloss_topdir}
+)
+AC_OUTPUT
diff --git a/libgloss/visium/crt0.S b/libgloss/visium/crt0.S
new file mode 100644
index 000000000..bb1448962
--- /dev/null
+++ b/libgloss/visium/crt0.S
@@ -0,0 +1,88 @@
+/* crt0.S for the Visium processor.
+
+ Copyright (c) 2015 Rolls-Royce Controls and Data Services Limited.
+ 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 Rolls-Royce Controls and Data Services Limited 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. */
+
+ .weak _get_cmdline
+ .text
+ .align 4
+ .global __start
+__start:
+ /* Initialize the stack pointer. */
+ moviu r1,%u _estack
+ movil r1,%l _estack
+ move.l r23,r1
+
+ /* Terminate the frame chain. */
+ moviq r22,0
+
+ /* Zero the .bss segment. */
+ moviu r1,%u __bss_start
+ movil r1,%l __bss_start
+ moviu r2,%u __bss_end
+ movil r2,%l __bss_end
+.L0:
+ cmp.l r1,r1
+ brr eq,.L1
+ nop
+ write.b (r1),r0
+ brr tr,.L0
+ addi r1,1
+.L1:
+ /* Register __fini (destructors) with atexit. */
+ moviu r1,%u __fini
+ moviu r2,%u atexit
+ movil r2,%l atexit
+ bra tr,r2,r21
+ movil r1,%l __fini
+
+ /* Call __init (constructors). */
+ moviu r1,%u __init
+ movil r1,%l __init
+ bra tr,r1,r21
+ nop
+
+ /* Set up argc and argv. */
+ moviu r3,%u _get_cmdline
+ movil r3,%l _get_cmdline
+ cmp.l r3,r0
+ moviq r1,0
+ bra ne,r3,r21
+ moviq r2,0
+
+ /* Call the main program. */
+ moviu r3,%u main
+ movil r3,%l main
+ bra tr,r3,r21
+ nop
+
+ /* Call exit in case the main program didn't. */
+ moviu r2,%u exit
+ movil r2,%l exit
+ bra tr,r2,r21
+ nop
+ .end
diff --git a/libgloss/visium/gettod.c b/libgloss/visium/gettod.c
new file mode 100644
index 000000000..0ff7d1d4c
--- /dev/null
+++ b/libgloss/visium/gettod.c
@@ -0,0 +1,45 @@
+/* stub functions for the Visium processor.
+
+ Copyright (c) 2015 Rolls-Royce Controls and Data Services Limited.
+ 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 Rolls-Royce Controls and Data Services Limited 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 <sys/time.h>
+#include <time.h>
+#include <errno.h>
+
+int gettimeofday (struct timeval *__p, void *__tz)
+{
+ errno = ENOSYS;
+ return -1;
+}
+
+clock_t
+clock (void)
+{
+ errno = ENOSYS;
+ return (clock_t) -1;
+}
diff --git a/libgloss/visium/io-gdb.c b/libgloss/visium/io-gdb.c
new file mode 100644
index 000000000..4f16b2f7b
--- /dev/null
+++ b/libgloss/visium/io-gdb.c
@@ -0,0 +1,140 @@
+/*
+ * hosted io support for GDB's remote fileio protocol
+ *
+ * Copyright (c) 2006 CodeSourcery Inc
+ *
+ * The authors hereby grant permission to use, copy, modify, distribute,
+ * and license this software and its documentation for any purpose, provided
+ * that existing copyright notices are retained in all copies and that this
+ * notice is included verbatim in any distributions. No written agreement,
+ * license, or royalty fee is required for any of the authorized uses.
+ * Modifications to this software may be copyrighted by their authors
+ * and need not follow the licensing terms described here, provided that
+ * the new terms are clearly indicated on the first page of each file where
+ * they apply.
+ */
+
+#include "io.h"
+#include <fcntl.h>
+#include <unistd.h>
+#include <errno.h>
+
+gdb_mode_t
+__hosted_to_gdb_mode_t (mode_t m)
+{
+ gdb_mode_t result = 0;
+ if (m & S_IFREG)
+ result |= GDB_S_IFREG;
+ if (m & S_IFDIR)
+ result |= GDB_S_IFDIR;
+ if (m & S_IRUSR)
+ result |= GDB_S_IRUSR;
+ if (m & S_IWUSR)
+ result |= GDB_S_IWUSR;
+ if (m & S_IXUSR)
+ result |= GDB_S_IXUSR;
+ if (m & S_IRGRP)
+ result |= GDB_S_IRGRP;
+ if (m & S_IWGRP)
+ result |= GDB_S_IWGRP;
+ if (m & S_IXGRP)
+ result |= GDB_S_IXGRP;
+ if (m & S_IROTH)
+ result |= GDB_S_IROTH;
+ if (m & S_IWOTH)
+ result |= GDB_S_IWOTH;
+ if (m & S_IXOTH)
+ result |= GDB_S_IXOTH;
+ return result;
+}
+
+int32_t
+__hosted_to_gdb_open_flags (int f)
+{
+ int32_t result = 0;
+ if (f & O_RDONLY)
+ result |= GDB_O_RDONLY;
+ if (f & O_WRONLY)
+ result |= GDB_O_WRONLY;
+ if (f & O_RDWR)
+ result |= GDB_O_RDWR;
+ if (f & O_APPEND)
+ result |= GDB_O_APPEND;
+ if (f & O_CREAT)
+ result |= GDB_O_CREAT;
+ if (f & O_TRUNC)
+ result |= GDB_O_TRUNC;
+ if (f & O_EXCL)
+ result |= GDB_O_EXCL;
+ return result;
+}
+
+int32_t
+__hosted_to_gdb_lseek_flags (int f)
+{
+ if (f == SEEK_CUR)
+ return GDB_SEEK_CUR;
+ else if (f == SEEK_END)
+ return GDB_SEEK_END;
+ else
+ return GDB_SEEK_SET;
+}
+
+void
+__hosted_from_gdb_stat (const struct gdb_stat *gs,
+ struct stat *s)
+{
+ s->st_dev = gs->st_dev;
+ s->st_ino = gs->st_ino;
+ s->st_mode = gs->st_mode;
+ s->st_nlink = gs->st_nlink;
+ s->st_uid = gs->st_uid;
+ s->st_gid = gs->st_gid;
+ s->st_rdev = gs->st_rdev;
+ s->st_size = gs->st_size;
+ s->st_blksize = gs->st_blksize;
+ s->st_blocks = gs->st_blocks;
+ s->st_atime = gs->st_atime;
+ s->st_mtime = gs->st_mtime;
+ s->st_ctime = gs->st_ctime;
+}
+
+void
+__hosted_from_gdb_timeval (const struct gdb_timeval *gt,
+ struct timeval *t)
+{
+ t->tv_sec = gt->tv_sec;
+ t->tv_usec = gt->tv_usec;
+}
+
+int
+__hosted_from_gdb_errno (int32_t err)
+{
+ switch (err)
+ {
+ case 0: return 0;
+ case GDB_EPERM: return EPERM;
+ case GDB_ENOENT: return ENOENT;
+ case GDB_EINTR: return EINTR;
+ case GDB_EBADF: return EBADF;
+ case GDB_EACCES: return EACCES;
+ case GDB_EFAULT: return EFAULT;
+ case GDB_EBUSY: return EBUSY;
+ case GDB_EEXIST: return EEXIST;
+ case GDB_ENODEV: return ENODEV;
+ case GDB_ENOTDIR: return ENOTDIR;
+ case GDB_EISDIR: return EISDIR;
+ case GDB_EINVAL: return EINVAL;
+ case GDB_ENFILE: return ENFILE;
+ case GDB_EMFILE: return EMFILE;
+ case GDB_EFBIG: return EFBIG;
+ case GDB_ENOSPC: return ENOSPC;
+ case GDB_ESPIPE: return ESPIPE;
+ case GDB_EROFS: return EROFS;
+ case GDB_ENAMETOOLONG: return ENAMETOOLONG;
+ case GDB_EUNKNOWN:
+ default:
+ return EIO;
+ }
+}
+
diff --git a/libgloss/visium/io-stubs.c b/libgloss/visium/io-stubs.c
new file mode 100644
index 000000000..6baac09fd
--- /dev/null
+++ b/libgloss/visium/io-stubs.c
@@ -0,0 +1,180 @@
+/* I/O stub functions for the Visium processor.
+
+ Copyright (c) 2015 Rolls-Royce Controls and Data Services Limited.
+ 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 Rolls-Royce Controls and Data Services Limited 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 <sys/types.h>
+#include <sys/stat.h>
+#include <sys/times.h>
+#include <fcntl.h>
+#include <time.h>
+#include <unistd.h>
+#include <utime.h>
+#include <errno.h>
+
+struct DIR;
+
+int
+chdir (const char *path)
+{
+ errno = ENOSYS;
+ return -1;
+}
+
+int
+chmod (const char *path, mode_t mode)
+{
+ errno = ENOSYS;
+ return -1;
+}
+
+int
+closedir (struct DIR *dirp)
+{
+ errno = ENOSYS;
+ return -1;
+}
+
+int
+execv (const char *path, char *const argv[])
+{
+ errno = ENOSYS;
+ return -1;
+}
+
+int
+fcntl (int fd, int cmd, ...)
+{
+ errno = ENOSYS;
+ return -1;
+}
+
+int
+fork (void)
+{
+ errno = EAGAIN;
+ return -1;
+}
+
+char *
+getcwd (char *buf, size_t size)
+{
+ buf[0] = 0;
+ return buf;
+}
+
+pid_t
+getppid (void)
+{
+ errno = ENOSYS;
+ return -1;
+}
+
+int
+link (const char *old, const char *new)
+{
+ errno = EMLINK;
+ return -1;
+}
+
+int
+nanosleep (const struct timespec *requested_time,
+ struct timespec *remaining)
+{
+ remaining->tv_sec = 0;
+ remaining->tv_nsec = 0;
+ return 0;
+}
+
+struct DIR *
+opendir (const char *dirname)
+{
+ errno = ENOSYS;
+ return NULL;
+}
+
+struct dirent *
+readdir (struct DIR *dirp)
+{
+ errno = ENOSYS;
+ return NULL;
+}
+
+ssize_t
+readlink (const char *__path, char *__buf, size_t __buflen)
+{
+ errno = ENOSYS;
+ return -1;
+}
+
+int
+rmdir (const char *path)
+{
+ errno = ENOSYS;
+ return -1;
+}
+
+int
+symlink (const char *name1, const char *name2)
+{
+ errno = ENOSYS;
+ return -1;
+}
+
+clock_t
+times (struct tms *buf)
+{
+ errno = ENOSYS;
+ return -1;
+}
+
+char *
+ttyname (int fildes)
+{
+ return "";
+}
+
+int
+utime (const char *path, const struct utimbuf *times)
+{
+ errno = ENOSYS;
+ return -1;
+}
+
+int
+wait (int *status)
+{
+ errno = ENOSYS;
+ return -1;
+}
+
+pid_t
+waitpid (pid_t pid, int *stat_loc, int options)
+{
+ errno = ENOSYS;
+ return -1;
+}
diff --git a/libgloss/visium/io.h b/libgloss/visium/io.h
new file mode 100644
index 000000000..a1bb879fb
--- /dev/null
+++ b/libgloss/visium/io.h
@@ -0,0 +1,141 @@
+/*
+ * hosted io support.
+ *
+ * Copyright (c) 2006 CodeSourcery Inc
+ *
+ * The authors hereby grant permission to use, copy, modify, distribute,
+ * and license this software and its documentation for any purpose, provided
+ * that existing copyright notices are retained in all copies and that this
+ * notice is included verbatim in any distributions. No written agreement,
+ * license, or royalty fee is required for any of the authorized uses.
+ * Modifications to this software may be copyrighted by their authors
+ * and need not follow the licensing terms described here, provided that
+ * the new terms are clearly indicated on the first page of each file where
+ * they apply.
+ */
+
+#include <stdint.h>
+#include <sys/types.h>
+#include <sys/time.h>
+#include <sys/stat.h>
+
+#define HOSTED_EXIT 0
+#define HOSTED_INIT_SIM 1
+#define HOSTED_OPEN 2
+#define HOSTED_CLOSE 3
+#define HOSTED_READ 4
+#define HOSTED_WRITE 5
+#define HOSTED_LSEEK 6
+#define HOSTED_RENAME 7
+#define HOSTED_UNLINK 8
+#define HOSTED_STAT 9
+#define HOSTED_FSTAT 10
+#define HOSTED_GETTIMEOFDAY 11
+#define HOSTED_ISATTY 12
+#define HOSTED_SYSTEM 13
+
+/* This function is provided by the board's BSP, because the precise
+ mechanism of informing gdb is board specific. */
+extern int __io_hosted (int func, void *args);
+
+/* Protocol specific representation of datatypes, as specified in D.9.11
+ * of the GDB manual.
+ * Note that since the m68k is big-endian, we can use native
+ * representations of integer datatypes in structured datatypes. */
+
+typedef uint32_t gdb_mode_t;
+typedef uint32_t gdb_time_t;
+
+struct gdb_stat {
+ uint32_t st_dev; /* device */
+ uint32_t st_ino; /* inode */
+ gdb_mode_t st_mode; /* protection */
+ uint32_t st_nlink; /* number of hard links */
+ uint32_t st_uid; /* user ID of owner */
+ uint32_t st_gid; /* group ID of owner */
+ uint32_t st_rdev; /* device type (if inode device) */
+ uint64_t st_size; /* total size, in bytes */
+ uint64_t st_blksize; /* blocksize for filesystem I/O */
+ uint64_t st_blocks; /* number of blocks allocated */
+ gdb_time_t st_atime; /* time of last access */
+ gdb_time_t st_mtime; /* time of last modification */
+ gdb_time_t st_ctime; /* time of last change */
+};
+
+struct gdb_timeval {
+ gdb_time_t tv_sec; /* second */
+ uint64_t tv_usec; /* microsecond */
+};
+
+
+/* Parameters are passed between the library and the debugging stub
+ * in a fixed-size buffer.
+ */
+
+typedef uint32_t gdb_parambuf_t[4];
+
+/* open flags */
+
+#define GDB_O_RDONLY 0x0
+#define GDB_O_WRONLY 0x1
+#define GDB_O_RDWR 0x2
+#define GDB_O_APPEND 0x8
+#define GDB_O_CREAT 0x200
+#define GDB_O_TRUNC 0x400
+#define GDB_O_EXCL 0x800
+
+/* mode_t values */
+
+#define GDB_S_IFREG 0100000
+#define GDB_S_IFDIR 040000
+#define GDB_S_IRUSR 0400
+#define GDB_S_IWUSR 0200
+#define GDB_S_IXUSR 0100
+#define GDB_S_IRGRP 040
+#define GDB_S_IWGRP 020
+#define GDB_S_IXGRP 010
+#define GDB_S_IROTH 04
+#define GDB_S_IWOTH 02
+#define GDB_S_IXOTH 01
+
+/* errno values */
+
+#define GDB_EPERM 1
+#define GDB_ENOENT 2
+#define GDB_EINTR 4
+#define GDB_EBADF 9
+#define GDB_EACCES 13
+#define GDB_EFAULT 14
+#define GDB_EBUSY 16
+#define GDB_EEXIST 17
+#define GDB_ENODEV 19
+#define GDB_ENOTDIR 20
+#define GDB_EISDIR 21
+#define GDB_EINVAL 22
+#define GDB_ENFILE 23
+#define GDB_EMFILE 24
+#define GDB_EFBIG 27
+#define GDB_ENOSPC 28
+#define GDB_ESPIPE 29
+#define GDB_EROFS 30
+#define GDB_ENAMETOOLONG 91
+#define GDB_EUNKNOWN 9999
+
+/* lseek flags */
+
+#define GDB_SEEK_SET 0
+#define GDB_SEEK_CUR 1
+#define GDB_SEEK_END 2
+
+
+/* conversion functions */
+
+extern gdb_mode_t __hosted_to_gdb_mode_t (mode_t m);
+extern int32_t __hosted_to_gdb_open_flags (int f);
+extern int32_t __hosted_to_gdb_lseek_flags (int f);
+
+extern void __hosted_from_gdb_stat (const struct gdb_stat *gs,
+ struct stat *s);
+extern void __hosted_from_gdb_timeval (const struct gdb_timeval *gt,
+ struct timeval *t);
+extern int __hosted_from_gdb_errno (int32_t err);
diff --git a/libgloss/visium/sbrk.c b/libgloss/visium/sbrk.c
new file mode 100644
index 000000000..61b1b8d64
--- /dev/null
+++ b/libgloss/visium/sbrk.c
@@ -0,0 +1,56 @@
+/* sbrk.c for the Visium processor.
+
+ Copyright (c) 2015 Rolls-Royce Controls and Data Services Limited.
+ 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 Rolls-Royce Controls and Data Services Limited 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 <unistd.h>
+#include <errno.h>
+#include <string.h>
+
+/* These labels are set in the linker script, to mark the start and end of the
+ memory reserved for the heap. */
+extern unsigned char _sheap [];
+extern unsigned char _eheap [];
+
+void *
+sbrk (ptrdiff_t nbytes)
+{
+ static unsigned char *heap_ptr = _sheap;
+
+ if (0 <= nbytes && heap_ptr + nbytes < _eheap)
+ {
+ void *base = (void *)heap_ptr;
+
+ heap_ptr += nbytes;
+ memset (base, 0, nbytes);
+
+ return base;
+ }
+
+ errno = ENOMEM;
+ return (void *)-1;
+}
diff --git a/libgloss/visium/serial-inbyte.c b/libgloss/visium/serial-inbyte.c
new file mode 100644
index 000000000..579c9699b
--- /dev/null
+++ b/libgloss/visium/serial-inbyte.c
@@ -0,0 +1,47 @@
+/* Serial Input for the Visium processor.
+
+ Copyright (c) 2015 Rolls-Royce Controls and Data Services Limited.
+ 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 Rolls-Royce Controls and Data Services Limited 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. */
+
+char
+inbyte (void)
+{
+#ifdef __VISIUM_ARCH_MCM__
+ volatile int *const rxdata = (int *) 0x20003920;
+ volatile int *const rxqs = (int *) 0x20003930;
+#else
+ volatile int *const rxdata = (int *) 0x20001a20;
+ volatile int *const rxqs = (int *) 0x20001a30;
+#endif
+ int bytes_in_fifo = 0;
+
+ while (!bytes_in_fifo)
+ bytes_in_fifo = *rxqs;
+
+ /* Read one character. */
+ return (*rxdata) & 0xff;
+}
diff --git a/libgloss/visium/serial-outbyte.c b/libgloss/visium/serial-outbyte.c
new file mode 100644
index 000000000..f1005f6bd
--- /dev/null
+++ b/libgloss/visium/serial-outbyte.c
@@ -0,0 +1,39 @@
+/* Serial Output for the Visium processor.
+
+ Copyright (c) 2015 Rolls-Royce Controls and Data Services Limited.
+ 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 Rolls-Royce Controls and Data Services Limited 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. */
+
+void
+outbyte (char byte)
+{
+#ifdef __VISIUM_ARCH_MCM__
+ volatile int *const txadata = (int *) 0x2000391c;
+#else
+ volatile int *const txadata = (int *) 0x20001a1c;
+#endif
+ *txadata = byte;
+}
diff --git a/libgloss/visium/syscall.h b/libgloss/visium/syscall.h
new file mode 100644
index 000000000..4ca103cba
--- /dev/null
+++ b/libgloss/visium/syscall.h
@@ -0,0 +1,48 @@
+/* syscall.h for the Visium processor.
+
+ Copyright (c) 2015 Rolls-Royce Controls and Data Services Limited.
+ 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 Rolls-Royce Controls and Data Services Limited 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. */
+
+#ifndef LIBGLOSS_SYSCALL_H
+#define LIBGLOSS_SYSCALL_H
+
+#define SYS_null 1
+#define SYS_exit 2
+#define SYS_open 3
+#define SYS_close 4
+#define SYS_read 5
+#define SYS_write 6
+#define SYS_lseek 7
+#define SYS_rename 8
+#define SYS_unlink 9
+#define SYS_fstat 10
+#define SYS_stat 11
+#define SYS_gettimeofday 12
+#define SYS_isatty 13
+#define SYS_system 14
+
+#endif
diff --git a/libgloss/visium/syscalls.c b/libgloss/visium/syscalls.c
new file mode 100644
index 000000000..de0ec16fb
--- /dev/null
+++ b/libgloss/visium/syscalls.c
@@ -0,0 +1,341 @@
+/* system calls for the Visium processor.
+
+ Copyright (c) 2015 Rolls-Royce Controls and Data Services Limited.
+ 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 Rolls-Royce Controls and Data Services Limited 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 <sys/types.h>
+#include <sys/stat.h>
+#include <sys/time.h>
+#include <fcntl.h>
+#include <unistd.h>
+#include <errno.h>
+#include <stdarg.h>
+#include <string.h>
+#include "io.h"
+#include "syscall.h"
+
+#ifdef TARGET_SIM
+struct file_register2
+{
+ unsigned action;
+ unsigned p1, p2, p3, p4;
+ unsigned error;
+ unsigned retval;
+};
+
+extern struct file_register2 _sim_fileio_register;
+
+static volatile struct file_register2 *const fileio = &_sim_fileio_register;
+
+static int
+do_syscall (unsigned action, unsigned p1, unsigned p2,
+ unsigned p3, unsigned p4, int *error)
+{
+ fileio->p1 = p1;
+ fileio->p2 = p2;
+ fileio->p3 = p3;
+ fileio->p4 = p4;
+ fileio->action = action;
+
+ *error = (int) fileio->error;
+ return (int) fileio->retval;
+}
+#else
+static int
+do_syscall (unsigned action, unsigned p1, unsigned p2,
+ unsigned p3, unsigned p4, int *error)
+{
+ int ret;
+ int err;
+
+ /* There is a two instruction delay after the software interrupt is
+ initiated, to allow it to take effect. */
+
+ asm volatile ("\n\
+ move.l r1,%3\n\
+ move.l r2,%4\n\
+ move.l r3,%5\n\
+ moviu r5,%%u 0x20002208\n\
+ movil r5,%%l 0x20002208\n\
+ move.l r4,%6\n\
+ write.l (r5),%2\n\
+ nop\n\
+ nop\n\
+ move.l %0,r1\n\
+ move.l %1,r2"
+ : "=r" (ret), "=r" (err)
+ : "r" (action), "r" (p1), "r" (p2), "r" (p3), "r" (p4)
+ : "r1", "r2", "r3", "r4", "r5");
+
+ *error = err;
+ return ret;
+}
+#endif
+
+int
+close (int fildes)
+{
+ int status;
+ int error;
+
+ status = do_syscall (SYS_close, fildes, 0, 0, 0, &error);
+
+ if (status < 0)
+ errno = __hosted_from_gdb_errno (error);
+
+ return status;
+}
+
+void _exit (int) __attribute ((__noreturn__));
+
+void
+_exit (int code)
+{
+#ifdef TARGET_SIM
+ asm volatile ("stop 0,%0" : : "r" (code & 0xff));
+#else
+ int error;
+ do_syscall (SYS_exit, code, 0, 0, 0, &error);
+#endif
+
+ /* Should never reach this point. Since this function is not supposed to
+ return, pretend to get stuck in a loop. */
+ while (1)
+ ;
+}
+
+#ifdef TARGET_SIM
+extern long long _sim_cmdline_header;
+
+long long
+_get_cmdline (void)
+{
+ return _sim_cmdline_header;
+}
+#endif
+
+int
+fstat (int fildes, struct stat *st)
+{
+ struct gdb_stat gst;
+ int status;
+ int error;
+
+ status = do_syscall (SYS_fstat, fildes, (unsigned) &gst, 0, 0, &error);
+
+ if (status < 0)
+ errno = __hosted_from_gdb_errno (error);
+ else
+ __hosted_from_gdb_stat (&gst, st);
+
+ return status;
+}
+
+int
+gettimeofday (struct timeval *__p, void *__tz)
+{
+ struct timeval *tv = __p;
+ struct timezone *tz = __tz;
+ struct gdb_timeval gtv;
+ int status;
+ int error;
+
+ status = do_syscall (SYS_gettimeofday, (unsigned) &gtv, 0, 0, 0, &error);
+
+ /* The timezone argument is not really supported so:
+ Local time is GMT, no daylight saving */
+ if (tz)
+ {
+ tz->tz_minuteswest = 0;
+ tz->tz_dsttime = 0;
+ }
+
+ if (status < 0)
+ errno = __hosted_from_gdb_errno (error);
+ else
+ __hosted_from_gdb_timeval (&gtv, tv);
+
+ return status;
+}
+
+int
+isatty (int fildes)
+{
+ int status;
+ int error;
+
+ status = do_syscall (SYS_isatty, fildes, 0, 0, 0, &error);
+
+ if (status == 0)
+ errno = __hosted_from_gdb_errno (error);
+
+ return status;
+}
+
+off_t
+lseek (int fildes, off_t offset, int whence)
+{
+ off_t ret;
+ int error;
+
+ ret = do_syscall (SYS_lseek, fildes, offset,
+ __hosted_to_gdb_lseek_flags (whence), 0, &error);
+
+ if (ret == (off_t)-1)
+ errno = __hosted_from_gdb_errno (error);
+
+ return ret;
+}
+
+int
+open (const char *path, int oflag, ...)
+{
+ mode_t mode = 0;
+ int status;
+ int error;
+ int len = strlen (path) + 1;
+
+ if (oflag & O_CREAT)
+ {
+ va_list ap;
+ va_start (ap, oflag);
+ mode = va_arg (ap, mode_t);
+ va_end (ap);
+ }
+
+ status = do_syscall (SYS_open, (unsigned) path, len,
+ __hosted_to_gdb_open_flags (oflag),
+ __hosted_to_gdb_mode_t (mode), &error);
+
+ if (status < 0)
+ errno = __hosted_from_gdb_errno (error);
+
+ return status;
+}
+
+int
+read (int fildes, void *buf, size_t nbyte)
+{
+ int status;
+ int error;
+
+ status = do_syscall (SYS_read, fildes, (unsigned) buf, nbyte, 0, &error);
+
+ if (status < 0)
+ errno = __hosted_from_gdb_errno (error);
+
+ return status;
+}
+
+int
+rename (const char *old, const char *new)
+{
+ int status;
+ int error;
+ int oldlen = strlen (old) + 1;
+ int newlen = strlen (new) + 1;
+
+ status = do_syscall (SYS_rename, (unsigned) old, oldlen, (unsigned) new,
+ newlen, &error);
+
+ if (status < 0)
+ errno = __hosted_from_gdb_errno (error);
+
+ return status;
+}
+
+int
+stat (const char *path, struct stat *st)
+{
+ struct gdb_stat gst;
+ int status;
+ int error;
+ int len = strlen (path) + 1;
+
+ status = do_syscall (SYS_stat, (unsigned) path, len, (unsigned) &gst, 0,
+ &error);
+
+ if (status < 0)
+ errno = __hosted_from_gdb_errno (error);
+ else
+ __hosted_from_gdb_stat (&gst, st);
+
+ return status;
+}
+
+int
+system (const char *string)
+{
+ int status;
+ int error;
+ int len = strlen (string) + 1;
+
+ status = do_syscall (SYS_system, (unsigned) string, len, 0, 0, &error);
+
+ return status;
+}
+
+int
+unlink (const char *path)
+{
+ int status;
+ int error;
+ int len = strlen (path) + 1;
+
+ status = do_syscall (SYS_unlink, (unsigned) path, len, 0, 0, &error);
+
+ if (status < 0)
+ errno = __hosted_from_gdb_errno (error);
+
+ return status;
+}
+
+int
+write (int fildes, const void *buf, size_t nbyte)
+{
+ int status;
+ int error;
+
+ status = do_syscall (SYS_write, fildes, (unsigned) buf, nbyte, 0, &error);
+
+ if (status < 0)
+ errno = __hosted_from_gdb_errno (error);
+
+ return status;
+}
+
+extern clock_t _sim_clock;
+
+clock_t
+clock (void)
+{
+#ifdef TARGET_SIM
+ return _sim_clock;
+#else
+ return (clock_t) -1;
+#endif
+}
diff --git a/libtool.m4 b/libtool.m4
index 8a14e2b22..24d13f344 100644
--- a/libtool.m4
+++ b/libtool.m4
@@ -1006,7 +1006,7 @@ _LT_EOF
case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
10.0,*86*-darwin8*|10.0,*-darwin[[91]]*)
_lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
- 10.[[012]]*)
+ 10.[[012]][[,.]]*)
_lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
10.*)
_lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
@@ -1220,7 +1220,7 @@ ia64-*-hpux*)
rm -rf conftest*
;;
-x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \
+x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \
s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
# Find out which ABI we are using.
echo 'int i;' > conftest.$ac_ext
@@ -1241,7 +1241,10 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
;;
esac
;;
- ppc64-*linux*|powerpc64-*linux*)
+ powerpc64le-*linux*)
+ LD="${LD-ld} -m elf32lppclinux"
+ ;;
+ powerpc64-*linux*)
LD="${LD-ld} -m elf32ppclinux"
;;
s390x-*linux*)
@@ -1260,7 +1263,10 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
x86_64-*linux*)
LD="${LD-ld} -m elf_x86_64"
;;
- ppc*-*linux*|powerpc*-*linux*)
+ powerpcle-*linux*)
+ LD="${LD-ld} -m elf64lppc"
+ ;;
+ powerpc-*linux*)
LD="${LD-ld} -m elf64ppc"
;;
s390*-*linux*|s390*-*tpf*)
@@ -4224,7 +4230,7 @@ m4_if([$1], [CXX], [
if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
_LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
else
- _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
+ _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "L")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
fi
;;
pw32*)
@@ -4453,7 +4459,7 @@ _LT_EOF
if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
&& test "$tmp_diet" = no
then
- tmp_addflag=
+ tmp_addflag=' $pic_flag'
tmp_sharedflag='-shared'
case $cc_basename,$host_cpu in
pgcc*) # Portland Group C compiler
@@ -4635,7 +4641,7 @@ _LT_EOF
if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
_LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
else
- _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
+ _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "L")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
fi
aix_use_runtimelinking=no
@@ -5519,8 +5525,8 @@ if test "$_lt_caught_CXX_error" != yes; then
# Check if GNU C++ uses GNU ld as the underlying linker, since the
# archiving commands below assume that GNU ld is being used.
if test "$with_gnu_ld" = yes; then
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
- _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+ _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
diff --git a/ltmain.sh b/ltmain.sh
index a03433f17..9503ec85d 100644
--- a/ltmain.sh
+++ b/ltmain.sh
@@ -976,7 +976,7 @@ func_enable_tag ()
case $host in
- *cygwin* | *mingw* | *pw32* | *cegcc*)
+ *cygwin* | *mingw* | *pw32* | *cegcc* | *solaris2* )
# don't eliminate duplications in $postdeps and $predeps
opt_duplicate_compiler_generated_deps=:
;;
diff --git a/missing b/missing
index 28055d2ae..f62bbae30 100755
--- a/missing
+++ b/missing
@@ -1,11 +1,10 @@
#! /bin/sh
-# Common stub for a few missing GNU programs while installing.
+# Common wrapper for a few potentially missing GNU programs.
-scriptversion=2009-04-28.21; # UTC
+scriptversion=2013-10-28.13; # UTC
-# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005, 2006,
-# 2008, 2009 Free Software Foundation, Inc.
-# Originally by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996.
+# Copyright (C) 1996-2014 Free Software Foundation, Inc.
+# Originally written by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -26,69 +25,40 @@ scriptversion=2009-04-28.21; # UTC
# the same distribution terms that you use for the rest of that program.
if test $# -eq 0; then
- echo 1>&2 "Try \`$0 --help' for more information"
+ echo 1>&2 "Try '$0 --help' for more information"
exit 1
fi
-run=:
-sed_output='s/.* --output[ =]\([^ ]*\).*/\1/p'
-sed_minuso='s/.* -o \([^ ]*\).*/\1/p'
-
-# In the cases where this matters, `missing' is being run in the
-# srcdir already.
-if test -f configure.ac; then
- configure_ac=configure.ac
-else
- configure_ac=configure.in
-fi
+case $1 in
-msg="missing on your system"
+ --is-lightweight)
+ # Used by our autoconf macros to check whether the available missing
+ # script is modern enough.
+ exit 0
+ ;;
-case $1 in
---run)
- # Try to run requested program, and just exit if it succeeds.
- run=
- shift
- "$@" && exit 0
- # Exit code 63 means version mismatch. This often happens
- # when the user try to use an ancient version of a tool on
- # a file that requires a minimum version. In this case we
- # we should proceed has if the program had been absent, or
- # if --run hadn't been passed.
- if test $? = 63; then
- run=:
- msg="probably too old"
- fi
- ;;
+ --run)
+ # Back-compat with the calling convention used by older automake.
+ shift
+ ;;
-h|--h|--he|--hel|--help)
echo "\
$0 [OPTION]... PROGRAM [ARGUMENT]...
-Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an
-error status if there is no known handling for PROGRAM.
+Run 'PROGRAM [ARGUMENT]...', returning a proper advice when this fails due
+to PROGRAM being missing or too old.
Options:
-h, --help display this help and exit
-v, --version output version information and exit
- --run try to run the given command, and emulate it if it fails
Supported PROGRAM values:
- aclocal touch file \`aclocal.m4'
- autoconf touch file \`configure'
- autoheader touch file \`config.h.in'
- autom4te touch the output file, or create a stub one
- automake touch all \`Makefile.in' files
- bison create \`y.tab.[ch]', if possible, from existing .[ch]
- flex create \`lex.yy.c', if possible, from existing .c
- help2man touch the output file
- lex create \`lex.yy.c', if possible, from existing .c
- makeinfo touch the output file
- tar try tar, gnutar, gtar, then tar without non-portable flags
- yacc create \`y.tab.[ch]', if possible, from existing .[ch]
+ aclocal autoconf autoheader autom4te automake makeinfo
+ bison yacc flex lex help2man
-Version suffixes to PROGRAM as well as the prefixes \`gnu-', \`gnu', and
-\`g' are ignored when checking the name.
+Version suffixes to PROGRAM as well as the prefixes 'gnu-', 'gnu', and
+'g' are ignored when checking the name.
Send bug reports to <bug-automake@gnu.org>."
exit $?
@@ -100,272 +70,141 @@ Send bug reports to <bug-automake@gnu.org>."
;;
-*)
- echo 1>&2 "$0: Unknown \`$1' option"
- echo 1>&2 "Try \`$0 --help' for more information"
+ echo 1>&2 "$0: unknown '$1' option"
+ echo 1>&2 "Try '$0 --help' for more information"
exit 1
;;
esac
-# normalize program name to check for.
-program=`echo "$1" | sed '
- s/^gnu-//; t
- s/^gnu//; t
- s/^g//; t'`
-
-# Now exit if we have it, but it failed. Also exit now if we
-# don't have it and --version was passed (most likely to detect
-# the program). This is about non-GNU programs, so use $1 not
-# $program.
-case $1 in
- lex*|yacc*)
- # Not GNU programs, they don't have --version.
- ;;
-
- tar*)
- if test -n "$run"; then
- echo 1>&2 "ERROR: \`tar' requires --run"
- exit 1
- elif test "x$2" = "x--version" || test "x$2" = "x--help"; then
- exit 1
- fi
- ;;
-
- *)
- if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
- # We have it, but it failed.
- exit 1
- elif test "x$2" = "x--version" || test "x$2" = "x--help"; then
- # Could not run --version or --help. This is probably someone
- # running `$TOOL --version' or `$TOOL --help' to check whether
- # $TOOL exists and not knowing $TOOL uses missing.
- exit 1
- fi
- ;;
-esac
-
-# If it does not exist, or fails to run (possibly an outdated version),
-# try to emulate it.
-case $program in
- aclocal*)
- echo 1>&2 "\
-WARNING: \`$1' is $msg. You should only need it if
- you modified \`acinclude.m4' or \`${configure_ac}'. You might want
- to install the \`Automake' and \`Perl' packages. Grab them from
- any GNU archive site."
- touch aclocal.m4
- ;;
-
- autoconf*)
- echo 1>&2 "\
-WARNING: \`$1' is $msg. You should only need it if
- you modified \`${configure_ac}'. You might want to install the
- \`Autoconf' and \`GNU m4' packages. Grab them from any GNU
- archive site."
- touch configure
- ;;
-
- autoheader*)
- echo 1>&2 "\
-WARNING: \`$1' is $msg. You should only need it if
- you modified \`acconfig.h' or \`${configure_ac}'. You might want
- to install the \`Autoconf' and \`GNU m4' packages. Grab them
- from any GNU archive site."
- files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}`
- test -z "$files" && files="config.h"
- touch_files=
- for f in $files; do
- case $f in
- *:*) touch_files="$touch_files "`echo "$f" |
- sed -e 's/^[^:]*://' -e 's/:.*//'`;;
- *) touch_files="$touch_files $f.in";;
- esac
- done
- touch $touch_files
- ;;
-
- automake*)
- echo 1>&2 "\
-WARNING: \`$1' is $msg. You should only need it if
- you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'.
- You might want to install the \`Automake' and \`Perl' packages.
- Grab them from any GNU archive site."
- find . -type f -name Makefile.am -print |
- sed 's/\.am$/.in/' |
- while read f; do touch "$f"; done
- ;;
-
- autom4te*)
- echo 1>&2 "\
-WARNING: \`$1' is needed, but is $msg.
- You might have modified some files without having the
- proper tools for further handling them.
- You can get \`$1' as part of \`Autoconf' from any GNU
- archive site."
-
- file=`echo "$*" | sed -n "$sed_output"`
- test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
- if test -f "$file"; then
- touch $file
- else
- test -z "$file" || exec >$file
- echo "#! /bin/sh"
- echo "# Created by GNU Automake missing as a replacement of"
- echo "# $ $@"
- echo "exit 0"
- chmod +x $file
- exit 1
- fi
- ;;
-
- bison*|yacc*)
- echo 1>&2 "\
-WARNING: \`$1' $msg. You should only need it if
- you modified a \`.y' file. You may need the \`Bison' package
- in order for those modifications to take effect. You can get
- \`Bison' from any GNU archive site."
- rm -f y.tab.c y.tab.h
- if test $# -ne 1; then
- eval LASTARG="\${$#}"
- case $LASTARG in
- *.y)
- SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'`
- if test -f "$SRCFILE"; then
- cp "$SRCFILE" y.tab.c
- fi
- SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'`
- if test -f "$SRCFILE"; then
- cp "$SRCFILE" y.tab.h
- fi
- ;;
- esac
- fi
- if test ! -f y.tab.h; then
- echo >y.tab.h
- fi
- if test ! -f y.tab.c; then
- echo 'main() { return 0; }' >y.tab.c
- fi
- ;;
-
- lex*|flex*)
- echo 1>&2 "\
-WARNING: \`$1' is $msg. You should only need it if
- you modified a \`.l' file. You may need the \`Flex' package
- in order for those modifications to take effect. You can get
- \`Flex' from any GNU archive site."
- rm -f lex.yy.c
- if test $# -ne 1; then
- eval LASTARG="\${$#}"
- case $LASTARG in
- *.l)
- SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'`
- if test -f "$SRCFILE"; then
- cp "$SRCFILE" lex.yy.c
- fi
- ;;
- esac
- fi
- if test ! -f lex.yy.c; then
- echo 'main() { return 0; }' >lex.yy.c
- fi
- ;;
-
- help2man*)
- echo 1>&2 "\
-WARNING: \`$1' is $msg. You should only need it if
- you modified a dependency of a manual page. You may need the
- \`Help2man' package in order for those modifications to take
- effect. You can get \`Help2man' from any GNU archive site."
-
- file=`echo "$*" | sed -n "$sed_output"`
- test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
- if test -f "$file"; then
- touch $file
- else
- test -z "$file" || exec >$file
- echo ".ab help2man is required to generate this page"
- exit $?
- fi
- ;;
-
- makeinfo*)
- echo 1>&2 "\
-WARNING: \`$1' is $msg. You should only need it if
- you modified a \`.texi' or \`.texinfo' file, or any other file
- indirectly affecting the aspect of the manual. The spurious
- call might also be the consequence of using a buggy \`make' (AIX,
- DU, IRIX). You might want to install the \`Texinfo' package or
- the \`GNU make' package. Grab either from any GNU archive site."
- # The file to touch is that specified with -o ...
- file=`echo "$*" | sed -n "$sed_output"`
- test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
- if test -z "$file"; then
- # ... or it is the one specified with @setfilename ...
- infile=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'`
- file=`sed -n '
- /^@setfilename/{
- s/.* \([^ ]*\) *$/\1/
- p
- q
- }' $infile`
- # ... or it is derived from the source name (dir/f.texi becomes f.info)
- test -z "$file" && file=`echo "$infile" | sed 's,.*/,,;s,.[^.]*$,,'`.info
- fi
- # If the file does not exist, the user really needs makeinfo;
- # let's fail without touching anything.
- test -f $file || exit 1
- touch $file
- ;;
-
- tar*)
- shift
-
- # We have already tried tar in the generic part.
- # Look for gnutar/gtar before invocation to avoid ugly error
- # messages.
- if (gnutar --version > /dev/null 2>&1); then
- gnutar "$@" && exit 0
- fi
- if (gtar --version > /dev/null 2>&1); then
- gtar "$@" && exit 0
- fi
- firstarg="$1"
- if shift; then
- case $firstarg in
- *o*)
- firstarg=`echo "$firstarg" | sed s/o//`
- tar "$firstarg" "$@" && exit 0
- ;;
- esac
- case $firstarg in
- *h*)
- firstarg=`echo "$firstarg" | sed s/h//`
- tar "$firstarg" "$@" && exit 0
- ;;
- esac
- fi
-
- echo 1>&2 "\
-WARNING: I can't seem to be able to run \`tar' with the given arguments.
- You may want to install GNU tar or Free paxutils, or check the
- command line arguments."
- exit 1
- ;;
-
- *)
- echo 1>&2 "\
-WARNING: \`$1' is needed, and is $msg.
- You might have modified some files without having the
- proper tools for further handling them. Check the \`README' file,
- it often tells you about the needed prerequisites for installing
- this package. You may also peek at any GNU archive site, in case
- some other package would contain this missing \`$1' program."
- exit 1
- ;;
-esac
+# Run the given program, remember its exit status.
+"$@"; st=$?
+
+# If it succeeded, we are done.
+test $st -eq 0 && exit 0
+
+# Also exit now if we it failed (or wasn't found), and '--version' was
+# passed; such an option is passed most likely to detect whether the
+# program is present and works.
+case $2 in --version|--help) exit $st;; esac
+
+# Exit code 63 means version mismatch. This often happens when the user
+# tries to use an ancient version of a tool on a file that requires a
+# minimum version.
+if test $st -eq 63; then
+ msg="probably too old"
+elif test $st -eq 127; then
+ # Program was missing.
+ msg="missing on your system"
+else
+ # Program was found and executed, but failed. Give up.
+ exit $st
+fi
-exit 0
+perl_URL=http://www.perl.org/
+flex_URL=http://flex.sourceforge.net/
+gnu_software_URL=http://www.gnu.org/software
+
+program_details ()
+{
+ case $1 in
+ aclocal|automake)
+ echo "The '$1' program is part of the GNU Automake package:"
+ echo "<$gnu_software_URL/automake>"
+ echo "It also requires GNU Autoconf, GNU m4 and Perl in order to run:"
+ echo "<$gnu_software_URL/autoconf>"
+ echo "<$gnu_software_URL/m4/>"
+ echo "<$perl_URL>"
+ ;;
+ autoconf|autom4te|autoheader)
+ echo "The '$1' program is part of the GNU Autoconf package:"
+ echo "<$gnu_software_URL/autoconf/>"
+ echo "It also requires GNU m4 and Perl in order to run:"
+ echo "<$gnu_software_URL/m4/>"
+ echo "<$perl_URL>"
+ ;;
+ esac
+}
+
+give_advice ()
+{
+ # Normalize program name to check for.
+ normalized_program=`echo "$1" | sed '
+ s/^gnu-//; t
+ s/^gnu//; t
+ s/^g//; t'`
+
+ printf '%s\n' "'$1' is $msg."
+
+ configure_deps="'configure.ac' or m4 files included by 'configure.ac'"
+ case $normalized_program in
+ autoconf*)
+ echo "You should only need it if you modified 'configure.ac',"
+ echo "or m4 files included by it."
+ program_details 'autoconf'
+ ;;
+ autoheader*)
+ echo "You should only need it if you modified 'acconfig.h' or"
+ echo "$configure_deps."
+ program_details 'autoheader'
+ ;;
+ automake*)
+ echo "You should only need it if you modified 'Makefile.am' or"
+ echo "$configure_deps."
+ program_details 'automake'
+ ;;
+ aclocal*)
+ echo "You should only need it if you modified 'acinclude.m4' or"
+ echo "$configure_deps."
+ program_details 'aclocal'
+ ;;
+ autom4te*)
+ echo "You might have modified some maintainer files that require"
+ echo "the 'autom4te' program to be rebuilt."
+ program_details 'autom4te'
+ ;;
+ bison*|yacc*)
+ echo "You should only need it if you modified a '.y' file."
+ echo "You may want to install the GNU Bison package:"
+ echo "<$gnu_software_URL/bison/>"
+ ;;
+ lex*|flex*)
+ echo "You should only need it if you modified a '.l' file."
+ echo "You may want to install the Fast Lexical Analyzer package:"
+ echo "<$flex_URL>"
+ ;;
+ help2man*)
+ echo "You should only need it if you modified a dependency" \
+ "of a man page."
+ echo "You may want to install the GNU Help2man package:"
+ echo "<$gnu_software_URL/help2man/>"
+ ;;
+ makeinfo*)
+ echo "You should only need it if you modified a '.texi' file, or"
+ echo "any other file indirectly affecting the aspect of the manual."
+ echo "You might want to install the Texinfo package:"
+ echo "<$gnu_software_URL/texinfo/>"
+ echo "The spurious makeinfo call might also be the consequence of"
+ echo "using a buggy 'make' (AIX, DU, IRIX), in which case you might"
+ echo "want to install GNU make:"
+ echo "<$gnu_software_URL/make/>"
+ ;;
+ *)
+ echo "You might have modified some files without having the proper"
+ echo "tools for further handling them. Check the 'README' file, it"
+ echo "often tells you about the needed prerequisites for installing"
+ echo "this package. You may also peek at any GNU archive site, in"
+ echo "case some other package contains this missing '$1' program."
+ ;;
+ esac
+}
+
+give_advice "$1" | sed -e '1s/^/WARNING: /' \
+ -e '2,$s/^/ /' >&2
+
+# Propagate the correct exit status (expected to be 127 for a program
+# not found, 63 for a program that failed due to version mismatch).
+exit $st
# Local variables:
# eval: (add-hook 'write-file-hooks 'time-stamp)
diff --git a/mkinstalldirs b/mkinstalldirs
index 4191a45db..55d537f87 100755
--- a/mkinstalldirs
+++ b/mkinstalldirs
@@ -81,9 +81,9 @@ case $dirmode in
echo "mkdir -p -- $*"
exec mkdir -p -- "$@"
else
- # On NextStep and OpenStep, the `mkdir' command does not
+ # On NextStep and OpenStep, the 'mkdir' command does not
# recognize any option. It will interpret all options as
- # directories to create, and then abort because `.' already
+ # directories to create, and then abort because '.' already
# exists.
test -d ./-p && rmdir ./-p
test -d ./--version && rmdir ./--version
diff --git a/move-if-change b/move-if-change
index e7ba25e31..88d957456 100755
--- a/move-if-change
+++ b/move-if-change
@@ -2,13 +2,13 @@
# Like mv $1 $2, but if the files are the same, just delete $1.
# Status is zero if successful, nonzero otherwise.
-VERSION='2011-01-28 20:09'; # UTC
+VERSION='2012-01-06 07:23'; # UTC
# The definition above must lie within the first 8 lines in order
# for the Emacs time-stamp write hook (at end) to update it.
# If you change this file with Emacs, please let the write hook
# do its job. Otherwise, update this string manually.
-# Copyright (C) 2002-2007, 2009-2011 Free Software Foundation, Inc.
+# Copyright (C) 2002-2014 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -32,7 +32,7 @@ If SOURCE is different than DEST, then move it to DEST; else remove SOURCE.
--help display this help and exit
--version output version information and exit
-The variable CMPPROG can be used to specify an alternative to \`cmp'.
+The variable CMPPROG can be used to specify an alternative to 'cmp'.
Report bugs to <bug-gnulib@gnu.org>."
diff --git a/newlib/ChangeLog b/newlib/ChangeLog
index 25d30d08c..62f63d500 100644
--- a/newlib/ChangeLog
+++ b/newlib/ChangeLog
@@ -1,25121 +1 @@
-2013-08-19 Meador Inge <meadori@codesourcery.com>
-
- * libc/stdlib/__atexit.c (__register_exitproc): NULL-ify
- _on_exit_args_ptr when creating a new _atexit structure while
- _REENT_SMALL is defined.
-
-2013-08-12 Bin Cheng <bin.cheng@arm.com>
-
- * libc/configure.in (--enable-newlib-wchar-orient): Remove.
- * libc/configure: Regenerated.
- * libc/stdio/Makefile.am (NEWLIB_WIDE_ORIENT): Remove.
- * libc/stdio/Makefile.in: Regenerated.
-
-2013-08-12 Yufeng Zhang <Yufeng.Zhang@arm.com>
-
- * libc/sys/arm/crt0.S: Remove 'start'.
-
-2013-08-08 Freddie Chopin <freddie_chopin@op.pl>
-
- * libc/string/strncat.c: Fix typo in documentation.
-
-2013-08-01 Corinna Vinschen <vinschen@redhat.com>
-
- * libc/include/stdio_ext.h (__fbufsize): Define as inline function for
- gcc, as macro otherwise.
- (__freading): Ditto.
- (__fwriting): Ditto.
- (__freadable): Ditto.
- (__fwriteable): Ditto.
- (__flbf): Ditto.
- (__fpending): Ditto.
-
-2013-07-23 Sahil Patnayakuni <sahilp@rtems.org>
-
- * libc/sys/linux/include/netdb.h, libc/sys/linux/net/getaddrinfo.c,
- libc/sys/linux/net/getnameinfo.c: Add restrict keyword to getnameinfo()
- and getaddrinfo() to increase standards compliance and match glibc.
-
-2013-07-23 Sahil Patnayakuni <sahilp@rtems.org>
-
- * libc/include/string.h, libc/string/memccpy.c, libc/string/memcpy.c,
- libc/string/stpcpy.c, libc/string/stpncpy.c, libc/string/strcat.c,
- libc/string/strncat.c, libc/string/strncpy.c, libc/string/strtok.c,
- libc/string/strtok_r.c, libc/string/strxfrm.c
- libc/machine/microblaze/strcpy.c, libc/machine/xscale/memcpy.c,
- libc/machine/cris/memcpy.c: Add __restrict to prototype to
- increase standards compliance.
-
-2013-07-18 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
-
- * libc/sys/arm/syscalls.c (do_AngelSWI): Delete.
- * libc/sys/arm/libcfuncs.c (do_AngelSWI): Delete.
- * libc/sys/arm/swi.h: Copy over from libgloss.
-
-2013-07-17 Janis Johnson <janisjo@codesourcery.com>
-
- * libc/machine/powerpc/configure.in: Remove extra_sources; fix
- extra_objs for powerpc*-*altivec.
- * libc/machine/powerpc/Makefile.am: Define EXTRA_lib_a_SOURCES.
- * libc/machine/powerpc/configure: Regenerated.
- * libc/machine/powerpc/Makefile.in: Regenerated.
-
-2013-07-16 David Holsgrove <david.holsgrove@xilinx.com>
-
- * configure.host: Change to microblaze*.
- * libc/include/machine/ieeefp.h: Add __MICROBLAZEEL__.
- * libc/machine/microblaze/mb_endian.h: New file.
- * newlib/libc/machine/microblaze/strcmp.c: Add little endian support.
- * newlib/libc/machine/microblaze/strcpy.c: Likewise.
- * newlib/libc/machine/microblaze/strlen.c: Likewise.
-
-2013-07-09 Sabrina Ni <sabrina@andestech.com>
-
- * libc/machine/nds32/Makefile.am (lib_a_SOURCES): Add abort.c, memcpy.S,
- memset.S, strcmp.S, and strcpy.S.
- * libc/machine/nds32/Makefile.in: Regenerated.
- * libc/machine/nds32/{abort.c, memcpy.S, memset.S, strcmp.S, strcpy.S}:
- New.
-
-2013-07-09 Sabrina Ni <sabrina@andestech.com>
-
- * configure.host (machine_dir, syscall_dir, newlib_cflags):
- Add settings for nds32*.
- * libc/include/machine/ieeefp.h (IEEE_BIG_ENDIAN, IEEE_LITTLE_ENDIAN):
- Ditto.
- * libc/include/machine/setjmp.h (JBLEN): Ditto.
- * libc/machine/configure.in: Add nds32 subdir.
- * libc/machine/configure: Regenerated.
- * libc/machine/nds32/Makefile.am: New.
- * libc/machine/nds32/Makefile.in: New (autogenerated).
- * libc/machine/nds32/aclocal.m4: New (autogenerated).
- * libc/machine/nds32/configure.in: New.
- * libc/machine/nds32/configure: New (autogenerated).
- * libc/machine/nds32/setjmp.S: New.
-
-2013-07-09 Sebastian Huber <sebastian.huber@embedded-brains.de>
-
- * libc/include/sys/config.h (__DYNAMIC_REENT__): Define for RTEMS.
-
-2013-07-09 Bin Cheng <bin.cheng@arm.com>
-
- * libc/stdio/fwalk.c (_fwalk): Remove redundant test.
-
-2013-07-05 Yaakov Selkowitz <yselkowitz@users.sourceforge.net>
-
- * libc/include/sys/types.h (u_char): Add redefinition guard.
- (u_short, u_int, u_long, caddr_t, daddr_t): Ditto.
-
-2013-07-02 Joey Ye <joey.ye@arm.com>
-
- Lite exit support.
- * README: Add information about lite-exit.
- * acconfig.h (_LITE_EXIT): New macro.
- * configure.in (enable-lite-exit): New option.
- (_LITE_EXIT): Define new macro.
- * configure: Regenerated.
- * newlib.hin (_LITE_EXIT): New macro.
- * libc/stdlib/__atexit.c [_LITE_EXIT]: Add dummy explicit
- reference to __call_exitprocs.
- * libc/stdlib/cxa_atexit.c [_LITE_EXIT]: Make __register_exitproc a
- weak reference.
- * libc/stdlib/exit.c (exit)[_LITE_EXIT]: Remove TWS and weakly reference
- __call_exitprocs.
-
-2013-07-02 Jeff Johnston <jjohnstn@redhat.com>
-
- * libc/include/sys/reent.h: Fix typo in comment.
-
-2013-07-01 Will Newton <will.newton@linaro.org>
-
- * libc/machine/arm/memcpy-armv7a.S: Adjust entry to
- aligned loop to improve misaligned copy performance.
-
-2013-06-26 Jeff Johnston <jjohnstn@redhat.com>
-
- * libc/include/stdio.h: Specify std streams always in terms
- of _REENT.
- * libc/include/wchar.h: Ditto.
- * libc/include/sys/reent.h: Remove _RENT_ONLY check around
- setting of _REENT macro.
-
-2013-06-24 Yaakov Selkowitz <yselkowitz@users.sourceforge.net>
-
- * libc/include/string.h (rawmemchr): Declare.
- * libc/string/Makefile.am (ELIX_4_SOURCES): Add rawmemchr.c.
- (CHEWOUT_FILES): Add rawmemchr.def.
- * libc/string/Makefile.in: Regenerate.
- * libc/string/rawmemchr.c: New file.
-
-2013-06-24 Terraneo Federico <fede.tft@hotmail.it>
-
- * libc/reent/reent.c (_reclaim_reent): Free also _misc and
- _signal_buf.
-
-2013-06-24 Terraneo Federico <fede.tft@hotmail.it>
-
- * libc/include/sys/reent.h (_ATEXIT_INIT_PTR): Remove.
- (_REENT_INIT_ATEXIT_PTR): Remove.
- (_REENT_INIT_PTR): Reduce code size if _REENT_SMALL.
-
-2013-06-21 Will Newton <will.newton@linaro.org>
-
- * libc/machine/arm/strlen-armv7.S: Import latest strlen
- code from Linaro cortex-strings.
-
-2013-06-21 Will Newton <will.newton@linaro.org>
-
- * MAINTAINERS: Add Will Newton to Write After Approval.
-
-2013-06-19 Bin Cheng <bin.cheng@arm.com>
-
- * acconfig.h (_UNBUF_STREAM_OPT): Undefine.
- * newlib.hin (_UNBUF_STREAM_OPT): Undefine.
- * configure.in (--enable-newlib-unbuf-stream-opt): New option.
- * configure: Regenerate.
- * libc/stdio/vfprintf.c (_VFPRINTF_R): Don't do optimization on
- unbuffered stream files.
- * libc/stdio/vfwprintf.c (_VFWPRINTF_R): Likewise.
- * README: Add description about the option.
-
-2013-06-19 Terraneo Federico <fede.tft@hotmail.it>
-
- * libc/posix/readdir_r.c: Fix potential read past dirp->dd_buf.
-
-2013-06-13 Bir Cheng <bin.cheng@arm.com>
-
- * README: Add description for NEWLIB's feature customizing
- configuration options.
-
-2013-06-10 Terraneo Federico <fede.tft@hotmail.it>
-
- * libc/stdlib/gdtoa-gethex.c (__hexdig): Constify.
- (hexdig_init): Remove.
- (__hexdig_fun): New function.
- hexdig_init, added __hexdig_fun
- (gethex): Call __get_hexdig macro rather than hexdig.
- * libc/stdlib/gdtoa-hexnan.c (hexnan): Constify fpi argument.
- Call __get_hexdig macro rather than hexdig.
- * libc/stdlib/ldtoa.c: Throughout constify functions arguments where
- required by constifying the following arrays.
- (ezero): Constify.
- (eone): Constify.
- (ermsg): Constify.
- (etens): Constify.
- (emtens): Constify.
- (nan113): Constify.
- (nan64): Constify.
- (nan53): Constify.
- (nan24): Constify.
- * libc/stdlib/mprec.h (__get_hexdig): Define.
- (gethex): Constify args in declaration where appropriate.
- (hexnan): Ditto.
- (hexdig_init): Remove declaration.
- (__hexdig_fun): Declare.
- * libc/stdlib/strtod.c (fpi): Constify.
- (fpinan): Constify.
-
-2013-06-07 Sebastian Huber <sebastian.huber@embedded-brains.de>
-
- * libc/include/sys/cdefs.h (__has_extension): New define.
- (__has_feature): Likewise.
- (__has_include): Likewise.
- (__has_builtin): Likewise.
- * libc/include/stdatomic.h: New.
-
-2013-06-05 Joey Ye <joey.ye@arm.com>
-
- * libc/machine/arm/strcmp.S: Use local labels.
-
-2013-06-03 Joey Ye <joey.ye@arm.com>
-
- * libc/machine/arm/Makefile.am (MEMCPY_DEP): New define.
- ($(lpfx)memcpy.o, $(lpfx)memcpy.obj): Depend on MEMCPY_DEP.
- * libc/machine/arm/Makefile.in: Regenerated.
- * newlib/libc/machine/arm/memcpy-stub.c: Exclude armv7-m/armv7e-m.
- * newlib/libc/machine/arm/memcpy-armv7m.S: New.
- * newlib/libc/machine/arm/memcpy.S: Replace with wrapper code. Old
- code moved to ...
- * newlib/libc/machine/arm/memcpy-armv7a.S: ... here. Remove
- redundant architecture check.
-
-2013-05-30 Jeff Johnston <jjohnstn@redhat.com>
-
- * libc/machine/powerpc/times.c: Moved to libgloss/rs6000.
- * libc/machine/powerpc/Makefile.am: Remove times.c.
- * libc/machine/powerpc/Makefile.in: Regenerated.
-
-2013-05-29 Joey Ye <joey.ye@arm.com>
- Bin Cheng <bin.cheng@arm.com>
-
- * configure.in (--enable-newlib-nano-malloc): New option.
- * configure: Regenerated.
- * libc/configure.in (--enable-newlib-nano-malloc): New option.
- * libc/configure: Regenerated.
- * libc/stdlib/Makefile.am (NEWLIB_NANO_MALLOC): Use.
- * libc/stdlib/Makefile.in: Regenerated.
- * libc/stdlib/nano-mallocr.c: New file, implementing nano
- version malloc family functions.
-
-2013-05-28 Richard Earnshaw <rearnsha@arm.com>
-
- * libc/machine/arm/strcpy.S: Explicitly set build attributes when
- building for thumb1 targets.
-
-2013-05-22 Corinna Vinschen <vinschen@redhat.com>
-
- * libc/ctype/isalnum.c: Correct domain of definition to SUSv4 wording.
- * libc/ctype/isalpha.c: Ditto.
- * libc/ctype/isblank.c: Ditto.
- * libc/ctype/iscntrl.c: Ditto.
- * libc/ctype/isdigit.c: Ditto.
- * libc/ctype/islower.c: Ditto.
- * libc/ctype/isprint.c: Ditto.
- * libc/ctype/ispunct.c: Ditto.
- * libc/ctype/isxdigit.c: Ditto.
-
-2013-05-22 Corinna Vinschen <vinschen@redhat.com>
-
- * libc/include/sys/cdefs.h (_Static_assert): Accommodate gcc >= 4.6.
-
-2013-05-16 Sebastian Huber <sebastian.huber@embedded-brains.de>
-
- * libc/reent/reent.c (_wrapup_reent): Remove.
-
-2013-05-13 DJ Delorie <dj@delorie.com>
- Nick Clifton <nickc@redhat.com>
-
- * MAINTAINERS (msp430): Add.
- * configure.host (msp430): Add.
- * libc/include/machine/ieeefp.h: Add MSP430 support.
- * libc/include/machine/setjmp.h: Likewise.
- * libc/include/sys/config.h: Likewise.
- * libc/machine/configure.in (msp430): Add.
- * libc/machine/configure: Regenerate.
- * libc/machine/msp430: New directory.
-
-2013-05-10 Freddie Chopin <freddie_chopin@op.pl>
-
- * configure.in: Fix help text for disable-newlib-atexit-dynamic-alloc option.
- * configure: Regenerated.
-
-2013-05-07 Sebastian Huber <sebastian.huber@embedded-brains.de>
-
- * libc/include/sys/config.h (_REENT_GLOBAL_ATEXIT): Define for
- RTEMS.
- * libc/include/sys/reent.h (_reent): Use _REENT_GLOBAL_ATEXIT.
- (_global_atexit): Declare if _REENT_GLOBAL_ATEXIT is defined.
- * libc/reent/reent.c (_reclaim_reent): Remove atexit cleanup if
- _REENT_GLOBAL_ATEXIT is defined.
- (_wrapup_reent): Remove atexit handling if _REENT_GLOBAL_ATEXIT
- is defined.
- * libc/stdlib/__atexit.c (_global_atexit0): Define if
- _REENT_GLOBAL_ATEXIT is defined.
- * libc/stdlib/__call_atexit.c (_global_atexit): Define if
- _REENT_GLOBAL_ATEXIT is defined.
-
-2013-05-07 Sebastian Huber <sebastian.huber@embedded-brains.de>
-
- * libc/include/sys/reent.h (_ATEXIT_INIT): Define.
- (_ATEXIT_INIT_PTR): Likewise.
- (_REENT_INIT_ATEXIT): Likewise.
- (_REENT_INIT_ATEXIT_PTR): Likewise.
- (_GLOBAL_ATEXIT): Likewise.
- * libc/stdlib/__atexit.c (_GLOBAL_ATEXIT0): Define.
- (__register_exitproc): Use _GLOBAL_ATEXIT and _GLOBAL_ATEXIT0.
- * libc/stdlib/__call_atexit.c (__call_exitprocs): Likewise.
-
-2013-05-07 Sebastian Huber <sebastian.huber@embedded-brains.de>
-
- * libc/stdlib/__atexit.c (__atexit_lock): Declare.
- * libc/stdlib/__call_atexit.c (__atexit_lock): Define.
-
-2013-05-06 Sandra Loosemore <sandra@codesourcery.com>
-
- * configure.host (machine_dir, sys_dir, syscall_dir, newlib_cflags):
- Add settings for nios2*.
- * libc/include/machine/ieeefp.h (IEEE_BIG_ENDIAN, IEEE_LITTLE_ENDIAN):
- Likewise.
- * libc/include/machine/setjmp.h (JBLEN, JBTYPE): Likewise.
- * libc/machine/configure.in: Add nios2 subdir.
- * libc/machine/configure: Regenerated.
- * libc/machine/nios2/Makefile.am: New.
- * libc/machine/nios2/Makefile.in: New (autogenerated).
- * libc/machine/nios2/aclocal.m4: New (copied from mips version).
- * libc/machine/nios2/configure.in: New.
- * libc/machine/nios2/configure: New (autogenerated).
- * libc/machine/nios2/setjmp.s: New.
-
-2013-04-29 Sebastian Huber <sebastian.huber@embedded-brains.de>
-
- * libc/stdio/local.h (CHECK_INIT): Evaluate argument only once.
- (CHECK_STD_INIT): Likewise.
- * libc/stdio/fgetc.c (fgetc): Use local variable for _REENT.
- * libc/stdio/fgetwc.c (fwgetc): Likewise.
- * libc/stdio/fgetws.c (fgetws): Likewise.
- * libc/stdio/fputc.c (fputc): Likewise.
- * libc/stdio/fputwc.c (fputwc): Likewise.
- * libc/stdio/fputws.c (fputws): Likewise.
- * libc/stdio/getc.c (getc): Likewise.
- * libc/stdio/getchar.c (_getchar_r): Likewise.
- * libc/stdio/putc.c (putc): Likewise.
- * libc/stdio/putchar.c (putchar): Likewise.
- * libc/stdio/scanf.c (scanf): Likewise.
- * libc/stdio/setvbuf.c (setvbuf): Likewise.
- * libc/stdio/ungetwc.c (ungetwc): Likewise.
- * libc/stdio/vfscanf.c (VFSCANF): Likewise.
- * libc/stdio/vfwscanf.c (VFWSCANF): Likewise.
- * libc/stdio/viprintf.c (viprintf): Likewise.
- * libc/stdio/viscanf.c (viscanf): Likewise.
- * libc/stdio/vprintf.c (vprintf): Likewise.
- * libc/stdio/vscanf.c (vscanf): Likewise.
- * libc/stdio/vwprintf.c (vwprintf): Likewise.
- * libc/stdio/vwscanf.c (vwscanf): Likewise.
- * libc/stdio/wscanf.c (wscanf): Likewise.
- * libc/stdlib/ecvtbuf.c (fcvtbuf): Likewise.
- (fcvtbuf): Likewise.
- (ecvtbuf): Likewise.
- (ecvtbuf): Likewise.
- * libc/stdlib/mblen.c (mblen): Likewise.
- * libc/stdlib/mbrlen.c (mbrlen): Likewise.
- * libc/stdlib/mbrtowc.c (mbrtowc): Likewise.
- * libc/stdlib/mbtowc.c (mbtowc): Likewise.
- * libc/stdlib/rand.c (srand): Likewise.
- (rand): Likewise.
- * libc/stdlib/wcrtomb.c (wcrtomb): Likewise.
- * libc/stdlib/wctob.c (wctob): Likewise.
- * libc/stdlib/wctomb.c (wctomb): Likewise.
- * libc/string/strtok.c (strtok): Likewise.
- * libc/time/asctime.c (asctime): Likewise.
- * libc/time/gmtime.c (gmtime): Likewise.
- * libc/time/lcltime.c (lcltime): Likewise.
-
-2013-04-29 Sebastian Huber <sebastian.huber@embedded-brains.de>
-
- * libc/include/sys/reent.h (_REENT_INIT_PTR): Reduce code size.
-
-2013-04-29 Freddie Chopin <freddie_chopin@op.pl>
-
- * libc/libc.texinfo: Fix @ references and change ifinfo to be
- ifnottexinfo.
- * libm/libm.texinfo: Ditto.
-
-2013-04-25 Sebastian Huber <sebastian.huber@embedded-brains.de>
-
- * libc/stdio/local.h (_STDIO_CLOSE_PER_REENT_STD_STREAMS): New define.
- * libc/stdio/findfp.c (_STDIO_CLOSE_PER_REENT_STD_STREAMS): Use define.
-
-2013-04-24 Corinna Vinschen <vinschen@redhat.com>
- Nick Clifton <nickc@redhat.com>
-
- * libc/stdlib/strtod.c: Manual update to latest algorithm from NetBSD.
-
-2013-04-23 Corinna Vinschen <vinschen@redhat.com>
-
- Port newlib to x86_64-pc-cygwin.
- * libc/include/sys/features.h: Redefine compilation environment
- definitions for Cygwin to cover 64 bit Cygwin.
- * libc/ctype/ctype_.c (_ctype_): Fix definition for 64 bit Cygwin.
- * libc/include/machine/setjmp.h: Change definition of _JBLEN to allow
- different values for 32 bit and 64 bit Cygwin.
- * libc/include/reent.h (stat64): Define as stat under Cygwin, instead
- of as __stat64. Undef stat64 if not building Newlib.
- * libc/include/sys/stat.h (stat64): Define as stat under Cygwin.
-
-2013-04-22 Sebastian Huber <sebastian.huber@embedded-brains.de>
-
- * libc/include/sys/cdefs.h: Align with latest FreeBSD file header.
- * libc/include/sys/features.h (__GNUC_PREREQ__): Define.
-
-2013-04-19 Corinna Vinschen <vinschen@redhat.com>
-
- * newlib/libc/search/hash.c: Revert patch from 2012-08-08.
-
-2013-04-16 Sebastian Huber <sebastian.huber@embedded-brains.de>
-
- * libc/sys/rtems/sys/queue.h: Delete file.
- * libc/include/sys/cdefs.h (__containerof): New define.
- (__DEQUALIFY): Likewise.
- * libc/include/sys/queue.h (TRACEBUF_INITIALIZER): Likewise.
- (TRACEBUF): Likewise.
- (LIST_FOREACH_SAFE): Likewise.
- (LIST_PREV): Likewise.
- (LIST_SWAP): Likewise.
- (QMD_LIST_CHECK_HEAD): Likewise.
- (QMD_LIST_CHECK_NEXT): Likewise.
- (QMD_LIST_CHECK_PREV): Likewise.
- (QMD_SAVELINK): Likewise.
- (QMD_TAILQ_CHECK_HEAD): Likewise.
- (QMD_TAILQ_CHECK_NEXT): Likewise.
- (QMD_TAILQ_CHECK_PREV): Likewise.
- (QMD_TAILQ_CHECK_TAIL): Likewise.
- (QMD_TRACE_ELEM): Likewise.
- (QMD_TRACE_HEAD): Likewise.
- (SLIST_FOREACH_PREVPTR): Likewise.
- (SLIST_FOREACH_SAFE): Likewise.
- (SLIST_REMOVE_AFTER): Likewise.
- (SLIST_SWAP): Likewise.
- (STAILQ_FOREACH_SAFE): Likewise.
- (STAILQ_REMOVE_AFTER): Likewise.
- (STAILQ_SWAP): Likewise.
- (TAILQ_FOREACH_REVERSE_SAFE): Likewise.
- (TAILQ_FOREACH_SAFE): Likewise.
- (TAILQ_SWAP): Likewise.
- (TRASHIT): Likewise.
- (SLIST_REMOVE): Use SLIST_REMOVE_AFTER().
- (STAILQ_LAST): Use __containerof().
- (STAILQ_REMOVE): Use STAILQ_REMOVE_AFTER().
-
-2013-04-12 Will Newton <will.newton@linaro.org>
-
- * libc/machine/arm/memcpy-stub.c: Use generic memcpy if unaligned
- access is not enabled.
- * libc/machine/arm/memcpy.S: Faster memcpy implementation for
- Cortex A15 cores using NEON and VFP if available.
-
-2013-04-12 Bin Cheng <bin.cheng@arm.com>
-
- * acconfig.h (_WCHAR_ORIENT): Undef
- * newlib.hin (_WCHAR_ORIENT): Undef
- * configure.in (--enable-newlib-wchar-orient): New option.
- * configure: Regenerated.
- * libc/configure.in (--enable-newlib-wchar-orient): New option.
- * libc/configure: Regenerated.
- * libc/stdio/Makefile.am (NEWLIB_WIDE_ORIENT): Use.
- * libc/stdio/Makefile.in: Regenerated.
- * libc/stdio/local.h (ORIENT): Use _WCHAR_ORIENT to control
- the definition. Add alternative definition.
- * libc/stdio/vfprintf.c (__sfputs_r, __sprint_r): Use _WCHAR_ORIENT
- to control the wide char output.
-
-2012-04-11 Jon TURNEY <jon.turney@dronecode.org.uk>
-
- * libc/include/stdlib.h (strtof, strtoll, strtoull, strtold): Also
- prototype if C++11 or later.
-
-2013-04-10 Bin Cheng <bin.cheng@arm.com>
-
- * acconfig.h (_FSEEK_OPTIMIZATION): Undef
- * newlib.hin (_FSEEK_OPTIMIZATION): Undef
- * configure.in (--disable-newlib-fseek-optimization): New option.
- * configure: Regenerated.
- * libc/stdio/fflush.c (__sflush_r): Use _FSEEK_OPTIMIZATION to
- control fseek optimization.
- * libc/stdio/fseeko.c (_fseeko_r): Ditto.
- * libc/stdio/makebuf.c (__smakebuf_r): Ditto.
- * libc/stdio64/fseeko64.c (_fseeko64_r): Ditto.
-
-2013-04-08 Matthew Gretton-Dann <matthew.gretton-dann@linaro.org>
-
- * libc/stdio/vfieeefp.h (ldieee): Fix typo.
-
-2013-04-02 Sebastian Huber <sebastian.huber@embedded-brains.de>
-
- * libc/posix/scandir.c (DIRSIZ): Use offsetof instead of magic
- number.
-
-2013-03-27 Bin Cheng <bin.cheng@arm.com>
-
- * acconfig.h (_FVWRITE_IN_STREAMIO): Undefine.
- * newlib.hin (_FVWRITE_IN_STREAMIO): Undefine.
- * configure.in (--disable-newlib-fvwrite-in-streamio): New option.
- * configure: Regenerated.
- * libc/stdio/fputs.c (_fputs_r): Use _FVWRITE_IN_STREAMIO to
- control __sfvwrite_r. Add alternative implementation.
- * libc/stdio/fputws.c (_fputws_r): Ditto.
- * libc/stdio/fwrite.c (_fwrite_r): Ditto.
- * libc/stdio/puts.c (_puts_r): Ditto.
- * libc/stdio/vfprintf.c (__ssputs_r, __sfputs_r): New function.
- (_VFPRINTF_R): Use _FVWRITE_IN_STREAMIO to control vector buffer.
- (__SPRINT): Use _FVWRITE_IN_STREAMIO to control macro definition.
- * libc/stdio/vfwprintf.c (_VFWPRINTF_R): Use _FVWRITE_IN_STREAMIO
- to control vector buffer.
-
-2013-03-26 Sebastian Huber <sebastian.huber@embedded-brains.de>
-
- * libc/stdio/local.h (_STDIO_WITH_THREAD_CANCELLATION_SUPPORT):
- New define.
- * libc/stdio/fclose.c: Use
- _STDIO_WITH_THREAD_CANCELLATION_SUPPORT.
- * libc/stdio/freopen.c: Likewise.
- * libc/stdio64/freopen64.c: Likewise.
-
-2013-03-15 Sebastian Huber <sebastian.huber@embedded-brains.de>
-
- * newlib/libc/stdio/findfp.c (glue_with_file): New.
- (__sfmoreglue): Use glue_with_file to avoid alignment problems.
-
-2013-02-28 Corinna Vinschen <vinschen@redhat.com>
-
- * libc/include/machine/setjmp.h (sigjmp_buf): Fix definition of
- sigjmp_buf size if _JBTYPE is defined.
-
-2013-02-26 Corinna Vinschen <vinschen@redhat.com>
-
- * libc/include/malloc.h (struct mallinfo): Convert type of all members
- to size_t to match all targets.
-
-2013-02-20 Yaakov Selkowitz <yselkowitz@users.sourceforge.net>
- Joseph S. Myers <joseph@codesourcery.com>
-
- * libc/include/sys/_types.h (_ssize_t): Define as signed equivalent of
- size_t with GCC.
-
-2013-02-19 Steve Ellcey <sellcey@mips.com>
-
- * libc/machine/mips/memcpy.S: Fix USE_PREFETCH check.
-
-2013-02-01 Nick Clifton <nickc@redhat.com>
-
- * libc/sys/sysnecv850/crt0.S: Add recognition of the e3v5
- architecture variant.
-
-2013-01-22 Joel Sherrill <joel.sherrill@oarcorp.com>
-
- * libc/include/pthread.h: Add PTHREAD_RWLOCK_INITIALIZER.
- Fix typo on PTHREAD_COJND_INITIALIZER.
-
-2013-01-17 Marcus Shawcroft <marcus.shawcroft@linaro.org>
-
- * libc/machine/aarch64/strncmp.S: Correct arithmetic for
- argument N values close to the maximum representable
- value in an unsigned 64 bit value.
-
-2013-01-17 Marcus Shawcroft <marcus.shawcroft@linaro.org>
-
- * libc/machine/aarch64/strnlen.S: Correct arithmetic for
- argument N values close to the maximum representable
- value in an unsigned 64 bit value.
-
-2013-01-15 Nick Clifton <nickc@redhat.com>
-
- * libc/sys/sysnecv850/crt0.S (_start): Enable FPU for the
- V850e2v3.
-
-2013-01-12 Corinna Vinschen <vinschen@redhat.com>
-
- * libc/include/string.h: Fix preprocessor expressions using
- _XOPEN_SOURCE.
-
-2013-01-11 Corinna Vinschen <vinschen@redhat.com>
-
- * libc/stdio/vfwprintf.c (_VFWPRINTF_R): Add code to correctly handle
- 's' format specifier on not _MB_CAPABLE targets. Fix a formatting
- glitch in _MB_CAPABLE enabled code. Add a missing 'L' specifier.
-
-2013-01-10 Marcus Shawcroft <marcus.shawcroft@linaro.org>
-
- * libc/machine/aarch64/Makefile.am (lib_a_SOURCES): Add
- memcmp-stub.c and memcmp.S
- * libc/machine/aarch64/Makefile.in: Regenerated.
- * libc/machine/aarch64/memcmp-stub.c: New file.
- * libc/machine/aarch64/memcmp.S: New file.
-
-2013-01-10 Marcus Shawcroft <marcus.shawcroft@linaro.org>
-
- * libc/machine/aarch64/Makefile.am (lib_a_SOURCES): Add
- strnlen-stub.c and strnlen.S
- * libc/machine/aarch64/Makefile.in: Regenerated.
- * libc/machine/aarch64/strnlen-stub.c: New file.
- * libc/machine/aarch64/strnlen.S: New file.
-
-2013-01-10 Marcus Shawcroft <marcus.shawcroft@linaro.org>
-
- * libc/machine/aarch64/Makefile.am (lib_a_SOURCES):
- Add strlen.S and strlen-stub.c.
- * libc/machine/aarch64/Makefile.in: Regenerated.
- * libc/machine/aarch64/strlen-stub.c: New file.
- * libc/machine/aarch64/strlen.S: New file.
-
-2013-01-10 Marcus Shawcroft <marcus.shawcroft@linaro.org>
-
- * libc/machine/aarch64/Makefile.am (lib_a_SOURCES):
- Add memmove.S and memmove-stub.c.
- * libc/machine/aarch64/Makefile.in: Regenerated.
- * libc/machine/aarch64/memmove-stub.c: New file.
- * libc/machine/aarch64/memmove.S: New file.
-
-2013-01-10 Marcus Shawcroft <marcus.shawcroft@linaro.org>
-
- * libc/machine/aarch64/Makefile.am (lib_a_SOURCES): Re-ordered.
- Add strncmp.S and strncmp-stub.c.
- * libc/machine/aarch64/Makefile.in: Regenerated.
- * libc/machine/aarch64/strncmp-stub.c: New file.
- * libc/machine/aarch64/strncmp.S: New file.
-
-2013-01-10 Marcus Shawcroft <marcus.shawcroft@linaro.org>
-
- * libc/machine/aarch64/Makefile.am (lib_a_SOURCES): Add
- memcpy.c memcpy-stub.c memset.S memset-stub.c strcmp.S
- strcmp-stub.c.
- * libc/machine/aarch64/Makefile.in: Regenerated.
- * libc/machine/aarch64/memcpy-stub.c: New file.
- * libc/machine/aarch64/memcpy.S: New file.
- * libc/machine/aarch64/memset-stub.c: New file.
- * libc/machine/aarch64/memset.S: New file.
- * libc/machine/aarch64/strcmp.S: New file.
- * libc/machine/aarch64/strcmp-stub.c: New file.
-
-2013-01-08 Jeff Johnston <jjohnstn@redhat.com>
-
- * MAINTAINERS: Add Richard Earnshaw as Arm co-maintainer
- and add Richard and Marcus Shawcroft as aarch64 maintainers.
-
-2013-01-07 Steve Ellcey <sellcey@mips.com>
-
- * libc/machine/mips/memcpy.S (memcpy): Check if _MIPS_SIM is set.
-
-2012-12-20 Jeff Johnston <jjohnstn@redhat.com>
-
- * NEWS: Update with 2.0.0 info.
- * README: Ditto.
- * acinclude.m4: Change version number to 2.0.0.
- * aclocal.m4: Regenerated.
- * configure: Ditto.
- * Makefile.in: Regenerated.
- * doc/aclocal.m4: Ditto.
- * doc/configure: Ditto.
- * libc/*/aclocal.m4: Ditto.
- * libc/*/configure: Ditto.
- * libc/libc.texinfo: Ditto.
- * libm/*/aclocal.m4: Ditto.
- * libm/*/configure: Ditto.
- * libm/libm.texinfo: Ditto.
- * libc/sys/linux/shared.ld: Add VERS_2.0
-
-2012-12-19 Corinna Vinschen <vinschen@redhat.com>
-
- * libc/stdlib/strtod.c (_strtod_r): Revert change from 2011-05-16.
-
-2012-12-18 Jeff Johnston <jjohnstn@redhat.com>
-
- * libc/include/math.h: Remove the log2f macro.
-
-2012-12-18 Craig Howland <howland@LGSInnovations.com>
-
- * libc/include/math.h: Add recognition of values 1 and 2 for
- FLT_EVAL_METHOD.
-
-2012-12-18 Corinna Vinschen <vinschen@redhat.com>
-
- * libc/stdio/puts.c (_puts_r): Fix typo in previous patch. Add local
- variable fp for better readability.
-
-2012-12-17 Jeff Johnston <jjohnstn@redhat.com>
-
- * libc/stdio/puts.c: Add fp locking and use _stdout_r macro
- to refer to the stream rather than stdout.
-
-2012-12-14 Yufeng Zhang <yufeng.zhang@arm.com>
-
- * libc/machine/aarch64/machine/_types.h: New file; define _ssize_t
- as long.
-
-2012-12-11 Steve Ellcey <sellcey@mips.com>
-
- * libc/machine/mips/memcpy.c: Remove.
- * libc/machine/mips/memcpy.S: New.
- * libc/machine/mips/Makefile.am (lib_a_CCASFLAGS): Add
- -D_COMPILING_NEWLIB.
- (lib_a_CFLAGS): Ditto.
-
-2012-12-04 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
-
- * configure.host: Define libm_machine_dir value for arm.
- * libm/machine/configure.in: Add arm to libm machines list.
- * libm/machine/configure: Regenerate.
- * libm/machine/arm/Makefile.am: New file.
- * libm/machine/arm/Makefile.in: Generated.
- * libm/machine/arm/aclocal.m4: Generated.
- * libm/machine/arm/configure: Generated.
- * libm/machine/arm/configure.in: New file.
- * libm/machine/arm/s_ceil.c: Likewise.
- * libm/machine/arm/s_floor.c: Likewise.
- * libm/machine/arm/s_nearbyint.c: Likewise.
- * libm/machine/arm/s_rint.c: Likewise.
- * libm/machine/arm/s_round.c: Likewise.
- * libm/machine/arm/s_trunc.c: Likewise.
- * libm/machine/arm/sf_ceil.c: Likewise.
- * libm/machine/arm/sf_floor.c: Likewise.
- * libm/machine/arm/sf_nearbyint.c: Likewise.
- * libm/machine/arm/sf_rint.c: Likewise.
- * libm/machine/arm/sf_round.c: Likewise.
- * libm/machine/arm/sf_trunc.c: Likewise.
-
-2012-11-30 Greta Yorsh <Greta.Yorsh@arm.com>
-
- * libc/machine/arm/strcmp.S (compute_return_value): Fix return value.
- * testsuite/newlib.string/strcmp-1.c (main): Add new test cases.
-
-2012-11-29 Sebastian Huber <sebastian.huber@embedded-brains.de>
-
- * libc/include/sys/reent.h (__sFILE): Change type of _offset
- from int to _off_t.
- * libc/stdio/ftell.c: Use _ftello_r().
- * libc/stdio/ftello.c: Copy implementation from previous
- _ftell_r().
- * libc/stdio/fseek.c: Use _fseeko_r().
- * libc/stdio/fseeko.c: Copy implementation from previous
- _fseek_r().
-
-2012-11-26 Sebastian Huber <sebastian.huber@embedded-brains.de>
-
- * libc/include/inttypes.h: Add and use __INTTYPES_EXP().
-
-2012-11-23 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
-
- * libm/machine/aarch64/configure.in: Change comment to say libm
- instead of libc.
-
-2012-11-12 Steve Ellcey <sellcey@mips.com>
-
- * libc/machine/mips/machine/asm.h: New.
- * libc/machine/mips/machine/regdef.h: Update register definitions
- for different ABI's.
-
-2012-11-11 Christopher Faylor <me.cygwin2012@cgf.cx>
-
- * libc/include/sys/time.h: Avoid guarding other than timeval
- declaration with _TIMEVAL_DEFINED. Move timeval related macros under
- _TIMEVAL_DEFINED control.
-
-2012-11-01 Corinna Vinschen <vinschen@redhat.com>
-
- * libc/include/locale.h (NULL): Fetch definition via stddef.h.
- * libc/include/stdio.h (NULL): Ditto.
- * libc/include/stdlib.h (NULL): Ditto.
- * libc/include/string.h (NULL): Ditto.
- * libc/include/wchar.h (NULL): Ditto.
- * libc/include/rpc/types.h (NULL): Ditto.
- * libc/include/time.h (NULL): Ditto. Include stddef.h earlier.
-
-2012-10-27 Anthony Green <green@moxielogic.com>
-
- * libc/machine/moxie/setjmp.S (setjmp): Minor optimization.
-
-2012-10-26 Corinna Vinschen <vinschen@redhat.com>
-
- * libc/include/sys/signal.h (sigset_t): Don't define when building
- for Cygwin.
-
-2012-10-24 Jeff Johnston <jjohnstn@redhat.com>
-
- * configure.in: Comment out the --enable-newlib-fp-hw option
- as the mathfp library is inaccurate and should not be used.
- * Makefile.am: Add comment regarding the mathfp directory.
- * configure: Regenerated.
- * Makefile.in: Ditto.
- * libm/mathfp/README: New file that details why the mathfp
- directory is not used.
-
-2012-10-22 Jon TURNEY <jon.turney@dronecode.org.uk>
-
- * libc/include/string.h (strdup, strndup): Declare if not
- __STRICT_ANSI__ or _XOPEN_SOURCE is defined appropriately.
-
-2012-10-22 Jon TURNEY <jon.turney@dronecode.org.uk>
-
- * libc/include/stdlib.h (strtof, strtoll, strtoull, strtold):Prototype
- if not __STRICT_ANSI__ or stdc version C99 or greater.
-
-2012-10-21 Hans-Peter Nilsson <hp@bitrange.com>
-
- * libc/sys/mmixware/sbrk.c (_sbrk): Drop unused extern declaration
- of "end". Mark allocated memory by applying PRELD.
-
-2012-10-16 Gregory Pietsch <gpietsch@comcast.net>
-
- * libc/stdlib/getopt.c (getopt_internal): Align handling of colon to
- SUSv4 requirements.
- (__getopt_long_r): Fix formatting.
-
-2012-10-16 Corinna Vinschen <vinschen@redhat.com>
-
- * libc/stdio/vfprintf.c (__sbprintf): Fix comment.
-
-2012-10-16 Aurelien Jacobs <aurel@gnuage.org>
-
- * libc/include/assert.h (static_assert): Define.
-
-2012-10-16 Corinna Vinschen <vinschen@redhat.com>
-
- * libc/include/sys/features.h (__GNUC_PREREQ): Define. Use
- throughout in place of explicit GNUC version checks.
- * libc/include/_ansi.h (_NOINLINE): Define.
- (_NOINLINE_STATIC): Define.
- * libc/stdio/vfprintf.c (__sbprintf): Define _NOINLINE_STATIC.
-
-2012-10-09 Peter Rosin <peda@lysator.liu.se>
-
- * libc/posix/wordfree.c (wordfree): The wrong words are freed
- when WRDE_DOOFFS is in use. Restructure the code so that the memory
- needed to be freed is instead kept in an internal linked list...
- * libc/posix/wordexp2.h: ...as defined here...
- * libc/posix/wordexp.c (wordexp): ...and build this internal
- linked list here, avoiding wasteful strdup calls in the process.
-
-2012-10-09 Peter Rosin <peda@lysator.liu.se>
-
- * libc/posix/wordexp.c (wordexp): Return WRDE_NOSPACE on resource
- allocation failure. Cleanup leftover resources when failing.
-
-2012-10-09 Peter Rosin <peda@lysator.liu.se>
-
- * libc/posix/wordexp.c (wordexp): Handle expanded words longer
- than 500 bytes.
-
-2012-10-09 Peter Rosin <peda@lysator.liu.se>
-
- * libc/posix/wordexp.c (wordexp): Don't leak file streams.
-
-2012-10-03 DJ Delorie <dj@redhat.com>
-
- * libc/machine/rl78/setjmp.S: Convert from CPP macros to GAS
- macros, to avoid dependence on the line separation character.
-
-2012-10-01 DJ Delorie <dj@redhat.com>
-
- * libc/sys/sysnecv850/sbrk.c (_sbrk): Change heap_start to be an
- array of undefined size, to avoid problems when compiled with
- -msda=4.
-
-2012-10-01 Jeff Johnston <jjohnstn@redhat.com>
-
- * README: replace sources.redhat.com with sourceware.org.
- * HOWTO: Ditto.
-
-2012-09-26 Ian Bolton <ian.bolton@arm.com>
- Jim MacArthur <jim.macarthur@arm.com>
- Marcus Shawcroft <marcus.shawcroft@arm.com>
- Nigel Stephens <nigel.stephens@arm.com>
- Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
- Richard Earnshaw <rearnsha@arm.com>
- Sofiane Naci <sofiane.naci@arm.com>
- Tejas Belagod <tejas.belagod@arm.com>
- Yufeng Zhang <yufeng.zhang@arm.com>
-
- * configure.host: Add AArch64.
- * libc/include/machine/ieeefp.h: Add AArch64.
- * libc/include/machine/setjmp.h: Add AArch64.
- * libc/include/machine/time.h: Add AArch64.
- * libc/include/sys/config.h: Add AArch64.
- * libc/machine/aarch64/Makefile.am: New file.
- * libc/machine/aarch64/Makefile.in: Generated.
- * libc/machine/aarch64/aclocal.m4: Generated.
- * libc/machine/aarch64/configure: Generated.
- * libc/machine/aarch64/configure.in: New file.
- * libc/machine/aarch64/setjmp.S: New file.
- * libc/machine/configure.in: Add AArch64.
- * libc/machine/configure: Re-generated.
- * libm/machine/aarch64/Makefile.am: New file.
- * libm/machine/aarch64/Makefile.in: Generated.
- * libm/machine/aarch64/aclocal.m4: Generated.
- * libm/machine/aarch64/configure: Generated.
- * libm/machine/aarch64/configure.in: New file.
- * libm/machine/aarch64/s_ceil.c: New file.
- * libm/machine/aarch64/s_floor.c: New file.
- * libm/machine/aarch64/s_fma.c: New file.
- * libm/machine/aarch64/s_fmax.c: New file.
- * libm/machine/aarch64/s_fmin.c: New file.
- * libm/machine/aarch64/s_llrint.c: New file.
- * libm/machine/aarch64/s_llround.c: New file.
- * libm/machine/aarch64/s_lrint.c: New file.
- * libm/machine/aarch64/s_lround.c: New file.
- * libm/machine/aarch64/s_nearbyint.c: New file.
- * libm/machine/aarch64/s_rint.c: New file.
- * libm/machine/aarch64/s_round.c: New file.
- * libm/machine/aarch64/s_trunc.c: New file.
- * libm/machine/aarch64/sf_ceil.c: New file.
- * libm/machine/aarch64/sf_floor.c: New file.
- * libm/machine/aarch64/sf_fma.c: New file.
- * libm/machine/aarch64/sf_fmax.c: New file.
- * libm/machine/aarch64/sf_fmin.c: New file.
- * libm/machine/aarch64/sf_llrint.c: New file.
- * libm/machine/aarch64/sf_llround.c: New file.
- * libm/machine/aarch64/sf_lrint.c: New file.
- * libm/machine/aarch64/sf_lround.c: New file.
- * libm/machine/aarch64/sf_nearbyint.c: New file.
- * libm/machine/aarch64/sf_rint.c: New file.
- * libm/machine/aarch64/sf_round.c: New file.
- * libm/machine/aarch64/sf_trunc.c: New file.
- * libm/machine/configure.in: Add AArch64.
- * libm/machine/configure: Re-generated.
-
-2012-09-26 Michael Hope <michael.hope@linaro.org>
-
- * doc/makedoc.c (dup_): Rename to avoid colliding with dup(2).
-
-2012-09-13 Anthony Green <green@moxielogic.com>
-
- * libc/include/machine/ieeefp.h (__IEEE_BIG_ENDIAN): Add bi-endian
- support for moxie.
-
-2012-08-23 Christopher Faylor <me.cygwin2012@cgf.cx>
-
- * libc/stdio/flags.c (__sflags): Guard against using O_BINARY on
- systems which do not provide it.
-
-2012-08-21 Christopher Faylor <me.cygwin2012@cgf.cx>
-
- * libc/stdio/flags.c (__sflags): Rewrite recognition of extended mode
- flags to just loop over more allowed flags. Support glibc 'e' flag on
- systems defining _GLIBC_EXTENSION. Support C11 'x' flag.
-
-2012-08-10 Corinna Vinschen <vinschen@redhat.com>
-
- * libc/stdlib/btowc.c (btowc): Cast to avoid compiler warning.
- * libc/search/hash_buf.c (__get_buf): Initialize local vars to avoid
- compiler warning.
- * libc/stdio/fgets.c (_fgets_r): Ditto.
- * libc/time/strftime.c (strftime): Ditto.
-
-2012-08-10 Corinna Vinschen <vinschen@redhat.com>
-
- * libc/stdio/vfwprintf.c (_VFWPRINTF_R): Fix guard around state to
- allow usage in !FLOATING_POINT && _WANT_IO_C99_FORMATS case.
-
-2012-08-08 Eric Blake <eblake@redhat.com>
-
- * libc/posix/engine.c(dissect): Guard diagnostic pragma for right
- versions of GCC only.
- * libc/string/strcasestr.c: Ditto.
-
-2012-08-08 Corinna Vinschen <vinschen@redhat.com>
-
- Throughout, run newlib with -Wall -Werror option and fix bugs and
- compiler warnings found this way.
-
- * libc/stdio/freopen.c (_freopen_r): Fix bug setting _flags.
-
- * libc/include/stdio.h (_rename): Define when building newlib.
- * libc/include/sys/signal.h (_kill): Ditto.
- * libc/include/sys/stat.h (_mkdir): Ditto.
- * libc/include/sys/time.h (_gettimeofday): Ditto.
- * libc/include/sys/times.h (_times): Ditto.
- * libc/include/sys/wait.h (_wait): Ditto.
- * libc/locale/lmessages.c (empty): Don't define for Cygwin.
- * libc/locale/lmonetary.c (cnv): Ditto.
- * libc/locale/nl_langinfo.c (nl_langinfo): Ditto for variable s.
- * libc/posix/collate.c: Throughout cast to avoid compiler warning.
- * libc/posix/engine.c (matcher): Initialize dp to avoid compiler
- warning.
- (dissect): Deliberately silence gcc compiler warning. Add comment to
- explain why.
- * libc/posix/glob.c: Disable on Cygwin. Explain why.
- * libc/posix/regcomp.c: Fix "uninitialized" compiler warnings.
- * libc/posix/wordexp.c (wordexp): Remove num_bytes variable since result
- is never used.
- * libc/posix/popen.c (popen): Ditto for variable last.
- * libc/reent/mkdirr.c: Include sys/stat.h.
- * libc/reent/renamer.c: Include stdio.h.
- * libc/search/hash.c: Throughout use underscored variants of the stat
- function family.
- (init_hash): Add missing definition for the __USE_INTERNAL_STAT64 case.
- * libc/search/hash_bigkey.c (__big_insert): Add parenthesis to avoid
- compiler warning.
- * libc/search/hash_page.c (overflow_page): Initalize freep to NULL to
- avoid compiler warning.
- * libc/stdio/asiprintf.c (_asiprintf_r): Cast unsigned char * to char *
- to avoid compiler warning.
- (asiprintf): Ditto.
- * libc/stdio/asprintf.c (_asprintf_r): Ditto.
- (asprintf): Ditto.
- * libc/stdio/vasiprintf.c (_vasiprintf_r): Ditto.
- * libc/stdio/vasprintf.c (_vasprintf_r): Ditto.
- * libc/stdio/mktemp.c (_gettemp): Cast to unsigned char in call to
- isdigit to avoid compiler warning.
- * libc/stdio/vfprintf.c (_VFPRINTF_R): Initialize variables used for
- grouping to avoid compiler warning. Only define and set nseps and
- nrepeats if they are really used.
- * libc/stdio/vfwprintf.c (_VFWPRINTF_R): Ditto. Only define state if
- it is really used.
- * libc/stdio/vfscanf.c (u_char): Revert to be defined as unsigned char.
- (__SVFSCANF_R): Cast fmt in call to __mbtowc.
- * libc/stdlib/mbtowc_r.c (JIS_state_table): Disable when building
- Cygwin.
- (JIS_action_table): Ditto.
- * libc/stdlib/wctomb_r.c (__utf8_wctomb): Add parenthesis to avoid
- compiler warning.
- * libc/string/strcasestr.c: Deliberately silence gcc compiler warning.
- Add comment to explain why.
- * libc/time/strptime.c (strptime): Cast to unsigned char in calls to
- isspace to avoid compiler warning.
- * libm/math/e_atan2.c (__ieee754_atan2): Add parenthesis to avoid
- compiler warning.
- * libm/math/e_exp.c (__ieee754_exp): Initialize k to 0 to avoid
- compiler warning. Drop setting it to 0 later.
- * libm/math/ef_exp.c (__ieee754_expf): Ditto.
- * libm/math/e_pow.c (__ieee754_pow): Add braces to avoid compiler
- warning.
- * libm/math/ef_pow.c (__ieee754_powf): Ditto.
- * libm/math/er_lgamma.c (__ieee754_lgamma_r): Initialize nadj to 0 to
- avoid compiler warning.
- * libm/math/erf_lgamma.c (__ieee754_lgammaf_r): Ditto.
- * libm/math/e_rem_pio2.c (__ieee754_rem_pio2): Ditto for variable z.
- * libm/common/sf_round.c (roundf): Remove signbit variable since result
- is never used.
-
-2012-08-07 Corinna Vinschen <vinschen@redhat.com>
-
- * libc/stdlib/mprec.h (Storeinc): Add parenthesis to avoid compiler
- warning.
-
-2012-07-30 Kevin Buettner <kevinb@redhat.com>
-
- * libc/sys/sysnecv850/crt0.S (_start): Use v850e-specific
- start up code for v850e2 and v850e2v3 too.
-
-2012-07-20 Eric Blake <eblake@redhat.com>
-
- * libc/posix/readdir.c (readdir): Drop bogus attempt to catch
- bogus pointers.
-
-2012-07-18 Ralf Corsépius <ralf.corsepius@rtems.org>
-
- * libc/sys/rtems/machine/_types.h (_ssize_t): Use signed int for
- __v850__, __851__.
-
-2012-07-17 Ralf Corsépius <ralf.corsepius@rtems.org>
-
- * libc/search/hcreate_r.c (hdestroy_r): #ifdef 0 unused vars ie, idx.
-
-2012-07-16 Ralf Corsépius <ralf.corsepius@rtems.org>
-
- * libc/posix/telldir.c: Conditionally build dd_hash_lock.
-
-2012-07-13 Ralf Corsépius <ralf.corsepius@rtems.org>
-
- * libc/sys/rtems/machine/_types.h (_ssize_t): Add __ARM_EABI__,
- __v850__, __851__.
-
-2012-07-09 Corinna Vinschen <vinschen@redhat.com>
-
- * libc/stdio/fileno.c (fileno): Check if f is a valid stream. If not,
- return -1 and set errno to EBADF per POSIX.
-
-2012-07-06 Corinna Vinschen <vinschen@redhat.com>
-
- Allow building of Cygwin using Mingw64 SDK headers:
- * libc/include/sys/time.h: Drop _WINSOCK_H guard. Just use
- _TIMEVAL_DEFINED instead.
- * libc/include/sys/types.h: Check for _WINSOCKAPI_ along with
- _WINSOCK_H.
- * libc/include/sys/unistd.h: Ditto.
-
-2012-06-28 Matthew Gretton-Dann <matthew.gretton-dann@arm.com>
-
- * doc/Makefile.am (makedoc): Use LDFLAGS_FOR_BUILD not LDFLAGS.
- * doc/Makefile.in: Regenerate.
-
-2012-06-26 Christopher Faylor <me.newlib2012@cgf.cx>
-
- * libc/include/sys/types.h: Don't use the same preprocessor guard for
- time_t, timespec, and itimerspec. Add a separate guard specifically
- for timespec and always unconditionally define itimerspec.
-
-2012-06-05 Corinna Vinschen <vinschen@redhat.com>
-
- * libc/stdio/findfp.c (__sinit): Avoid infinite recursion on
- _REENT_SMALL targets. Add comment to explain.
-
-2012-05-31 Corinna Vinschen <vinschen@redhat.com>
-
- * libc/stdio/local.h (_newlib_sfp_lock_exit): Fix typo in non-pthread
- version.
-
-2012-05-30 Corinna Vinschen <vinschen@redhat.com>
-
- * libc/stdio/fgetws.c (_fgetws_r): Call _mbsnrtowcs_r rather than
- _mbsrtowcs_r and restrict number of wide chars to n - 1.
-
-2012-05-30 Corinna Vinschen <vinschen@redhat.com>
-
- * libc/stdio/local.h (_newlib_flockfile_start): New macro to
- secure stream related critical section against thread cancellation.
- (_newlib_flockfile_exit): Ditto.
- (_newlib_sfp_lock_end): Ditto.
- (_newlib_sfp_lock_start): Ditto for the list of streams.
- (_newlib_sfp_lock_exit): Ditto.
- (_newlib_sfp_lock_end): Ditto.
- Use aforementioned macros in place of _flockfile/_funlockfile
- and __sfp_lock_acquire/__sfp_lock_release throughout the code.
- * libc/stdio/fclose.c: Explicitely disable and re-enable thread
- cancellation. Explain why.
- * libc/stdio/freopen.c: Ditto.
- * libc/stdio64/freopen64.c: Ditto.
-
-2012-05-21 Sandeep Kumar Singh <Sandeep.Singh2@kpitcummins.com>
-
- * libc/machine/cr16/sys/asm.h: Added some missing instructions
- and removed few unsupported instructions of cr16 target.
-
-2012-05-10 Yaakov Selkowitz <yselkowitz@users.sourceforge.net>
-
- * libc/include/string.h (memrchr): Declare.
- * libc/string/Makefile.am (ELIX_4_SOURCES): Add memrchr.c.
- (CHEWOUT_FILES): Add memrchr.def.
- * libc/string/Makefile.in: Regenerate.
- * libc/string/memrchr.c: New file.
-
-2012-05-10 Joel Sherrill <joel.sherrill@oarcorp.com>
-
- * libc/sys/rtems/machine/_types.h: Add Microblaze.
-
-2012-05-09 Joel Sherrill <joel.sherrill@oarcorp.com>
-
- * libc/sys/rtems/crt0.c: Add stubs for access(), ftruncate(),
- _getpid_r(), geteuid(), getgid, _getgid_r, getpid(), getppid(),
- and _getpid_r().
-
-2012-05-03 Greta Yorsh <Greta.Yorsh@arm.com>
-
- * testsuite/newlib.string/strcmp-1.c (LONG_TEST): New macro.
- (MAX_BLOCK_SIZE): Use small value when LONG_TEST is not set.
- (MAX_DIFF, MAX_LEN, MAX_ZEROS) Likewise.
-
-2012-03-29 Corinna Vinschen <vinschen@redhat.com>
-
- * libc/locale/locale.c (__mb_cur_max): On Cygwin, align default value
- with default UTF-8 charset.
-
-2012-03-26 Corinna Vinschen <vinschen@redhat.com>
-
- * libc/stdio/findfp.c (__sinit): Set __sdidinit last.
-
-2012-03-09 Jeff Johnston <jjohnstn@redhat.com>
-
- * libc/include/machine/setjmp-dj.h: Modify license to include
- modification in clause as permitted by DJ Delorie.
- * libc/machine/arm/access.c: Ditto.
- * libc/machine/i386/setjmp.S: Ditto.
- * libc/sys/h8300hms/sys/file.h: Ditto.
- * libc/sys/linux/machine/i386/setjmp.S: Ditto.
- * libc/sys/sysmec/access.c: Ditto.
- * libc/sys/sysnecv850/access.c: Ditto.
-
-2012-03-02 Jeff Johnston <jjohnstn@redhat.com>
-
- * libc/posix/readdir_r.c: Fix return code when end of
- directory is reached.
-
-2012-02-23 Dan Egnor <egnor@ofb.net>
-
- * configure.host: Accept "arm*" host spec instead of just "arm".
-
-2012-02-21 Jeremy Bennett <jeremy.bennett@embecosm.com>
- Alan Lehotsky <apl@alum.mit.edu>
- Joern Rennecke <joern.rennecke@embecosm.com>
-
- * configure.host: Add Epiphany support.
- * libc/include/machine/ieeefp.h: Likewise.
- * libc/include/machine/setjmp.h: Likewise.
- * libc/machine/configure.in, libc/sys/configure.in: Likewise.
- * libc/machine/configure, libc/sys/configure: Regenerate.
- * libc/machine/epiphany, libc/sys/epiphany: New directories.
- * NEWS: Mention addition of Epiphany.
-
-2012-02-15 Christopher Faylor <me.newlib2012@cgf.cx>
-
- * configure.host: Fix typo: xdir_dir -> xdr_dir.
-
-2012-02-09 Eric Blake <eblake@redhat.com>
-
- * libc/include/_ansi.h (_ELIDABLE_INLINE): Fix C99 mode.
-
-2012-02-09 Sebastian Huber <sebastian.huber@embedded-brains.de>
-
- * libc/sys/rtems/sys/utime.h: Include <sys/types.h> to provide a
- definition of time_t.
-
-2012-02-08 Greta Yorsh <Greta.Yorsh@arm.com>
-
- * libc/machine/arm/strcmp.S: New File.
- * libc/machine/arm/strcmp.c: Deleted.
- * libc/machine/arm/Makefile.am: Replaces strcmp.c with strcmp.S
- * libc/machine/arm/Makefile.in: Regenerated.
- * testsuite/newlib.string/strcmp-1.c: New file.
-
-2012-02-07 Corinna Vinschen <vinschen@redhat.com>
-
- * libc/include/inttypes.h: Redefine pointer type macros.
-
-2012-01-13 Yaakov Selkowitz <yselkowitz@users.sourceforge.net>
-
- * libc/stdio/sprintf.c: Document 'm' conversion specifier.
- * libc/stdio/swprintf.c: Ditto.
- * libc/stdio/vfprintf.c (_VFPRINTF_R) [_GLIBC_EXTENSION]: Handle 'm'
- conversion specifier.
- * libc/stdio/vfwprintf.c (_VFWPRINTF_R) [_GLIBC_EXTENSION]: Ditto.
-
-2012-01-12 Yaakov Selkowitz <yselkowitz@users.sourceforge.net>
-
- * libc/include/tgmath.h: New header.
-
-2012-01-09 Yaakov Selkowitz <yselkowitz@users.sourceforge.net>
-
- * libc/include/sys/unistd.h [__CYGWIN__] (get_current_dir_name):
- Declare.
-
-2012-01-09 Yaakov Selkowitz <yselkowitz@users.sourceforge.net>
-
- * libc/include/complex.h: Fix "/*" within comment warning.
-
-2012-01-09 Corinna Vinschen <vinschen@redhat.com>
-
- * libc/include/process.h: Remove Cygwin-only header.
-
-2012-01-03 Viachaslau Kulakouski <Viachaslau.Kulakouski@oracle.com>
-
- * libc/stdlib/__atexit.c: Refer to __atexit_lock instead of lock.
-
-2011-12-20 Aleksandr Platonov <pam@oktetlabs.ru>
-
- * libc/stdio/fvwrite.c (__sfvwrite_r): Set __SMBF flag to avoid double
- free in fclose. Enhance comment.
-
-2011-12-19 Jeff Johnston <jjohnstn@redhat.com>
-
- * NEWS: Update with 1.20.0 info.
- * README: Ditto.
- * acinclude.m4: Change version number to 1.20.0.
- * aclocal.m4: Regenerated.
- * configure: Ditto.
- * Makefile.in: Regenerated.
- * doc/aclocal.m4: Ditto.
- * doc/configure: Ditto.
- * libc/*/aclocal.m4: Ditto.
- * libc/*/configure: Ditto.
- * libc/libc.texinfo: Ditto.
- * libm/*/aclocal.m4: Ditto.
- * libm/*/configure: Ditto.
- * libm/libm.texinfo: Ditto.
- * libc/sys/linux/shared.ld: Add VERS_1.20
-
-2011-12-13 Richard Earnshaw <rearnsha@arm.com>
- Thomas Klein <th.r.klein@web.de>
-
- * libc/sys/arm/crt0.S: Manually set the target architecture
- when compiling for Thumb1 on EABI targets.
- Don't use SWI on M-profile cores.
- Avoid v6-only Thumb-1 MOV instruction.
-
-2011-12-12 Akio Idehara <zbe64533@gmail.com>
-
- * libc/time/strftime.c (get_era_info): Fix off-by-one error in month
- calculation.
-
-2011-12-06 Chris Johns <chrisj@rtems.org>
-
- * libc/iconv/Makefile.am (stmp-def): Use $(MAKE) rather than make.
- * libc/iconv/Makefile.in: Regenerate.
-
-2011-11-28 DJ Delorie <dj@redhat.com>
-
- * configure.host: Add rl78.
- * libc/include/machine/ieeefp.h: Add rl78 support.
- * libc/include/machine/setjmp.h: Add rl78 support.
- * libc/machine/configure.in: Add rl78.
- * libc/machine/rl78: New directory.
- * MAINTAINERS (rl78): Add myself as RL78 maintainer.
-
-2011-11-08 Corinna Vinschen <vinschen@redhat.com>
-
- * libc/iconv/ccs/Makefile.am: Add missing backslash.
- * libc/iconv/ccs/Makefile.in: Regenerate.
-
-2011-10-18 Dr David Alan Gilbert <david.gilbert@linaro.org>
-
- * libc/machine/arm/Makefile.am (lib_a_SOURCES): Add memchr-stub.c,
- memchr.S.
- * libc/machine/arm/arm_asm.h: Add ifdef to allow it to be included
- in .S files.
- * libc/machine/arm/memchr-stub.c: New file - just selects what to
- compile.
- * libc/machine/arm/memchr.S: New file - ARMv6t2/v7 version.
-
- * libc/machine/arm/Makefile.am (lib_a_SOURCES): Add strlen-armv7.S.
- * libc/machine/arm/strlen-armv7.S: New file.
- * libc/machine/arm/strlen.c: Add ifdef optimised code so it isn't
- for v7 or 6t2.
-
- * libc/machine/arm/Makefile.in: Regenerate.
-
-2011-10-11 Steven Abner <pheonix@zoomtown.com>
-
- * libc/time/mktm_r.c: (__tzcalc_limits) Fix Julian day calculation.
- * libc/time/mktime.c: (mktime) Fix tm_yday, tm_mday updating when
- timezone causes roll over.
-
-2011-10-10 Nick Clifton <nickc@redhat.com>
-
- * libc/sys/arm/crt0.S: Synchronise with libgloss version.
- * libc/sys/arm/arm.h: Imported from libgloss.
-
-2011-10-04 Greta Yorsh <Greta.Yorsh@arm.com>
-
- * testsuite/newlib.string/memcpy-1.c: New test.
-
-2011-10-04 Nick Clifton <nickc@redhat.com>
-
- * libc/machine/arm/memcpy.S: Fix unaligned access copying.
-
-2011-09-29 Greta Yorsh <Greta.Yorsh@arm.com>
-
- * libc/machine/arm/memcpy.S: New file. Contains a hand coded
- memcpy function optimized for the cortex-a15.
- * libc/machine/arm/memcpy-stub.c: New file.
- * libc/machine/arm/Makefile.am (lib_a_SOURCES): Add memcpy-stub.c,
- memcpy.S.
- * libc/machine/arm/Makefile.in: Regenerate.
-
-2011-09-08 Jeff Johnston <jjohnstn@redhat.com>
-
- * testsuite/lib/flags.exp: Add logic to add the
- srcdir include directory to compile flags.
-
-2011-08-26 Steven Abner <pheonix@zoomtown.com>
-
- * libc/time/mktm_r.c (_mktm_r): Fix previous fix.
-
-2011-08-24 Corinna Vinschen <vinschen@redhat.com>
-
- * libc/time/mktm_r.c (_mktm_r): Fix computing tm_year.
-
-2011-08-23 Ralf Corsépius <ralf.corsepius@rtems.org>
-
- * libc/stdlib/putenv_r.c: Use "strchr" instead of obsolete "index".
- * libc/stdlib/setenv_r.c: Use "memcpy" instead of obsolete "bcopy".
-
-2011-08-23 Ralf Corsépius <ralf.corsepius@rtems.org>
-
- * libc/misc/ffs.c, libc/string/bcmp.c, libc/string/bcopy.c,
- libc/string/bzero.c, libc/string/index.c, libc/string/rindex.c,
- libc/string/strcasecmp.c, libc/string/strncasecmp.c:
- Let synopsis reference "#include <strings.h>".
-
-2011-08-23 Ralf Corsépius <ralf.corsepius@rtems.org>
-
- * libc/posix/regexec.c: Define "nope" only #ifndef NDEBUG.
- * libc/stdio/vfscanf.c: Define "state" only #ifdef _MB_CAPABLE.
- * libc/string/wcwidth.c: Include <wctypes.h> for "iswprint" and
- "iswcntrl".
-
-2011-08-23 Ralf Corsépius <ralf.corsepius@rtems.org>
-
- * libc/sys/rtems/include/limits.h: Compute SSIZE_MAX based on
- __SIZE_MAX__, __SIZEOF_SIZE_T__ and __CHAR_BIT__.
-
-2011-08-22 Ralf Corsépius <ralf.corsepius@rtems.org>
-
- * libc/string/index.c: Include <strings.h> for "index".
- * libc/string/rindex.c: Include <strings.h> for "rindex".
- * libc/string/strcasecmp.c: Include <strings.h> for "strcasecmp".
- Don't include <string.h>.
- * libc/string/strncasecmp.c: Include <strings.h> for "strncasecmp".
- Don't include <string.h>.
- * libc/string/bzero.c: Include <strings.h> for "bzero".
- Don't include <string.h>
- * libc/misc/ffs.c: Include <strings.h> for "ffs".
- Don't include <_ansi.h>.
-
-2011-08-19 Ralf Corsépius <ralf.corsepius@rtems.org>
-
- * libc/sys/rtems/crt0.c: Rework RTEMS_STUB macro.
- Include <unistd.h>.
- Remove C++-style comments.
- Remove hppa, a29k.
- Add clock_gettime, gettimeofday, sched_yield.
-
-2011-08-19 Ralf Corsépius <ralf.corsepius@rtems.org>
-
- * libc/stdio/vasiprintf.c: Include "local.h" for "_svfiprintf_r".
- * libc/stdio/vasprintf.c Include "local.h" for "_svfprintf_r".
- * libc/stdio/vsiprintf.c: Include "local.h" for "_svfiprintf_r".
- * libc/stdio/vsniprintf.c: Include "local.h" for "_svfiprintf_r".
- * libc/stdio/vsnprintf.c: Include "local.h" for "_svfprintf_r"
- * libc/stdio/vsprintf.c: Include "local.h" for "_svfprintf_r"
-
-2011-08-19 Ralf Corsépius <ralf.corsepius@rtems.org>
-
- * libc/string/bcmp.c: Include <strings.h> for "bcmp".
- * libc/string/bcopy.c: Include <strings.h> for "bcopy".
- * libc/string/strcasestr.c: Include <strings.h> for "strncasecmp".
- * libc/time/strptime.c: Include <strings.h> for "strncasecmp".
-
-2011-08-19 Corinna Vinschen <vinschen@redhat.com>
-
- * libc/include/process.h: Remove exec family function declarations.
- Add comment.
- * libc/include/sys/unistd.h (execlpe): Declare for Cygwin.
-
-2011-08-19 Craig Howland <howland@LGSInnovations.com>
-
- * libc/time/mktime.c (validate_structure): Account for tm_mon possibly
- being given as negative.
- (mktime): Set tm_isdst=0 when !daylight.
-
-2011-08-01 Sebastian Huber <sebastian.huber@embedded-brains.de>
-
- * libc/include/sys/types.h: XML and RTEMS define
- _UNIX98_THREAD_MUTEX_ATTRIBUTES and can use the standard
- definitions. This avoids redefinition warnings.
-
-2011-07-26 Ralf Corsépius <ralf.corsepius@rtems.org>
-
- * libc/sys/rtems/sys/dirent.h (scandir):
- Add const to "select" parameter.
-
-2011-07-25 Ralf Corsépius <ralf.corsepius@rtems.org>
-
- * libc/iconv/iconv.tex: Rename node "Introduction" into
- "Introduction to iconv".
-
-2011-07-20 Yaakov Selkowitz <yselkowitz@...>
-
- * libc/include/time.h [_POSIX_CLOCK_SELECTION] (clock_nanosleep):
- Declare.
- * libc/include/sys/features.h [__CYGWIN__] (_POSIX_CLOCK_SELECTION):
- Define.
-
-2011-07-19 Yaakov Selkowitz <yselkowitz@users.sourceforge.net>
-
- * libc/include/sys/unistd.h (_CS_XBS5_WIDTH_RESTRICTED_ENVS): Define.
- (_CS_V6_ENV): Fix definition.
-
-2011-07-19 Ralf Corsépius <ralf.corsepius@rtems.org>
-
- * libc/locale/lmessages.c (_C_messages_locale):
- Move __HAVE_LOCALE_INFO_EXTENDED__ before codeset.
-
-2011-07-19 Matt Johnson <johnso87@crhc.illinois.edu>
-
- * libc/reent/sbrkr.c: Define _sbrk_r independently of the definition
- of MALLOC_PROVIDED.
-
-2011-07-15 Yufeng Zhang <yufeng.zhang@arm.com>
-
- * libc/stdio/vfwprintf.c (wcvt): Add a new parameter len of type
- int. *length is set to the value of (rev - digits) regardless
- of whether _MB_CAPABLE is defined or not. Replace BUF with len
- in calling _mbsnrtowcs_r and also in the loop where _MB_CAPABLE
- is not defined.
- (_VFWPRINTF_R): Call wcvt with an extra argument. Call wcvt
- again with allocated new buffer if buf is not large enough for
- the conversion.
- * testsuite/newlib.stdio/stdio.exp: New.
- * testsuite/newlib.stdio/swprintf.c: Likewise.
-
-2011-07-15 Matt Johnson <johnso87@crhc.illinois.edu>
-
- * libc/stdio/fscanf.c (fscanf): Call _vfscanf_r instead of __svfscanf_r
- to make sure CHECK_INIT is called.
- (_fscanf_r): Ditto.
- * /libc/stdio/scanf.c (scanf): Ditto.
- (_scanf_r): Ditto.
- * libc/stdio/fwscanf.c (fwscanf): Call _vfwscanf_r instead of
- __svfwscanf_r to make sure CHECK_INIT is called.
- (_fwscanf_r): Ditto.
- * libc/stdio/wscanf.c (wscanf): Ditto.
- (_wscanf_r): Ditto.
-
-2011-07-13 Hans-Peter Nilsson <hp@axis.com>
-
- * libm/complex/cacos.c: Use temporaries and correct sequencing
- error in previous reordering change.
-
-2011-06-25 Andreas Becker <becker@se-elektronic.de>
-
- * libc/time/mktime.c (mktime): Lock global timezone info while
- accessing it.
-
-2011-06-14 Philip Munts <phil@munts.net>
-
- * libc/time/asctime_r.c (asctime_r): Replace call to sprintf with call
- to siprintf.
- * libc/time/strftime.c: Define snprintf to sniprintf in multibyte case.
- * libc/time/tzset_r.c: Define sscanf to siscanf.
-
-2011-06-14 Joseph Myers <joseph@codesourcery.com>
-
- * configure.host: Don't handle ep9312, strongarm, xscale and thumb
- target names.
- * libc/machine/configure.in: Don't handle xscale target names.
- * libc/machine/configure: Regenerate.
-
-2011-06-14 Craig Howland <howland@LGSInnovations.com>
-
- * libc/time/tzset_r.c (tzset_r): Correct behavior for changing from
- non-GMT to GMT, when un-setting TZ. Set _timezone and _daylight even
- if no DST is given in TZ.
-
-2011-06-13 Eric Blake <eblake@redhat.com>
-
- * libc/stdio/wsetup.c (__swsetup_r): Set errno on failure.
- * libc/stdio/fvwrite.c (__sfvwrite_r): Simplify.
- * libc/stdio/wbuf.c (__swbuf_r): Likewise.
- * libc/stdio/local.h (cantwrite): Adjust comment.
-
-2011-06-09 Yaakov Selkowitz <yselkowitz@...>
-
- * libc/include/string.h (strdupa): New macro function.
- (strndupa): New macro function.
-
-2011-05-27 Nick Clifton <nickc@redhat.com>
-
- * libc/sys/sysnecv850/sbrk.c (_sbrk): Tidy code.
- Base start of heap on the "heap_start" symbol.
-
-2011-05-25 Eric Blake <eblake@redhat.com>
-
- * libc/string/strerror.c (_strerror_r): Report "Success" for 0.
-
-2011-05-25 Eric Blake <eblake@redhat.com>
-
- * libc/string/strerror.c (strerror): Split body into...
- (_strerror_r): ...new reentrant function.
- * libc/string/u_strerr.c (_user_strerror): Update signature.
- * libc/include/string.h (_strerror_r): New prototype.
- * libc/posix/collate.c (__collate_err): Adjust callers.
- * libc/stdio/perror.c (_perror_r): Likewise.
- * libc/string/strerror_r.c (strerror_r): Likewise.
- * libc/string/xpg_strerror_r.c (__xpg_strerror_r): Likewise.
-
-2011-05-19 Yaakov Selkowitz <yselkowitz@users.sourceforge.net>
-
- * libc/include/stdio_ext.h: New header.
- * libc/stdio/fpurge.c [!__rtems__] (__fpurge): New function.
-
-2011-05-19 Matthew Gretton-Dann <matthew.gretton-dann@arm.com>
-
- * Makefile.am (install-data-local): Fix condition and rm call.
- * Makefile.in: Regenerate.
-
-2011-05-16 Yaakov Selkowitz <yselkowitz@users.sourceforge.net>
-
- * libc/include/time.h (CLOCK_PROCESS_CPUTIME_ID): Rename from
- CLOCK_PROCESS_CPUTIME.
- (CLOCK_THREAD_CPUTIME_ID): Rename from CLOCK_THREAD_CPUTIME.
- * libc/include/sys/features.h [__CYGWIN__] (_POSIX_CPUTIME): Define.
- (_POSIX_THREAD_CPUTIME): Define.
-
-2011-05-16 Christian Bruel <christian.bruel@st.com>
-
- * libc/stdlib/strtod.c (_strtod_r): Fix nf/nd counts to not exceed
- DBL_DIG.
-
-2011-05-15 Corinna Vinschen <vinschen@redhat.com>
-
- * libc/include/sys/features.h (_POSIX_THREAD_ATTR_STACKADDR): Define
- to 200112L for Cygwin.
-
-2011-05-12 Peter Rosin <peda@lysator.liu.se>
-
- * libc/time/strptime.c (strptime): Fill in tm_yday when all of tm_year,
- tm_mon and tm_mday are updated. Fill in tm_mon, tm_mday and tm_wday
- when both of tm_year and tm_yday are updated.
-
-2011-05-12 Peter Rosin <peda@lysator.liu.se>
-
- * libc/time/strptime.c (first_day): Actually return the wday
- of the first day of the year.
-
-2011-05-10 Corinna Vinschen <vinschen@redhat.com>
-
- * libc/locale/lmessages.c (_C_messages_locale): Add missing comma.
-
-2011-05-04 Yaakov Selkowitz <yselkowitz@users.sourceforge.net>
-
- * libc/include/signal.h (psignal): Declare.
- * libc/sys/linux/psignal.c: Move from here...
- * libc/signal/psignal.c: ... to here. Document.
- * libc/sys/linux/Makefile.am (GENERAL_SOURCES): Move psignal.c from here...
- * libc/signal/Makefile.am (LIB_SOURCES): ... to here.
- (CHEWOUT_FILES): Add psignal.def.
- * libc/sys/linux/Makefile.in: Regenerate.
- * libc/signal/Makefile.in: Ditto.
- * libc/signal/signal.tex: Add references to psignal.
-
-2011-05-04 Corinna Vinschen <vinschen@redhat.com>
-
- * libc/locale/lmessages.h (__messages_load_locale): Declare. Remove
- accidental declaration of __numeric_load_locale.
- * libc/locale/locale.c: Include timelocal.h to get declaration of
- __time_load_locale.
- (__set_locale_from_locale_alias): Fix return type.
- (__locale_msgcharset): Avoid compiler warnings.
- (_localeconv_r): Ditto.
-
-2011-05-04 Andy Koppe <andy.koppe@gmail.com>
-
- * libc/locale/locale.c (current_categories): On Cygwin, set LC_CTYPE
- to C.UTF-8 to match initial __wctomb and __mbtowc settings.
- (lc_ctype_charset): On Cygwin, initialize to "UTF-8".
- (loadlocale): Remove unused Cygwin-specifc code.
-
-2011-05-02 Yaakov Selkowitz <yselkowitz@users.sourceforge.net>
-
- * libc/include/sys/features.h [__CYGWIN__] (_POSIX_SPIN_LOCKS): Define.
- * libc/include/sys/types.h: Cygwin provides its own pthread_spinlock_t
- typedef.
-
-2011-04-19 Corinna Vinschen <vinschen@redhat.com>
-
- * libc/include/sys/signal.h (_sig_func_ptr): Define with int parameter
- per POSIX. Explain in comment.
-
-2011-04-15 Eric Blake <eblake@redhat.com>
-
- * libc/string/strchrnul.c (strchrnul): Fix strchrnul.
-
-2011-03-27 Yaakov Selkowitz <yselkowitz@users.sourceforge.net>
-
- * libc/include/string.h (strchrnul): Declare.
- * libc/string/strchrnul.c: New file.
- * libc/string/Makefile.am (ELIX_2_SOURCES): Add strchrnul.c.
- * libc/string/Makefile.in: Regenerate.
-
-2011-03-23 Nick Clifton <nickc@redhat.com>
-
- * libc/machine/frv/setjmp.S: Fix typo in .size directive.
-
-2011-03-21 Kevin Buettner <kevinb@redhat.com>
-
- * libc/sys/sysnecv850/trap.S (___trap0): Fix errno handling.
- * libc/sys/sysnecv850/rename.c: New file.
- * libc/sys/sysnecv850/Makefile.am (lib_a_SOURCES): Add rename.c
- * libc/sys/sysnecv850/Makefile.in: Regenerate.
- * libc/sys/sysnecv850/fstat.c (_fstat): Invoke trap for SYS_fstat.
- * libc/sys/sysnecv850/unlink.c (_unlink): Invoke trap for SYS_unlink.
-
-2011-03-03 Corinna Vinschen <vinschen@redhat.com>
-
- * libc/include/string.h: Include sys/cdefs.h.
-
-2011-03-03 Corinna Vinschen <vinschen@redhat.com>
-
- * libc/include/sys/cdefs.h (__CONCAT1): Define.
- (__CONCAT): Define.
- (__STRING): Define.
- (__XSTRING): Define.
- (__ASMNAME): Define.
- * libc/include/string.h (strerror_r): Use __ASMNAME to take target
- specific label prefixes into account.
-
-2011-03-01 Aaron Landwehr <snaphat@gmail.com>
-
- * libm/complex/cproj.c: Fix typo.
- * libm/complex/cprojf.c: Ditto.
-
-2011-02-22 Corinna Vinschen <vinschen@redhat.com>
-
- * libc/stdio/fmemopen.c (fmemopen): Fix EINVAL condition. Avoid SEGV
- if incoming buffer is NULL.
-
-2011-02-09 Eric Blake <eblake@redhat.com>
-
- * libc/include/string.h (strerror_r): Update declaration.
- * libc/string/strerror.c (strerror): Update documentation.
- * libc/string/strerror_r.c (strerror_r): Always return
- NUL-terminated string; don't overwrite too-short buf.
- * libc/string/xpg_strerror_r.c (__xpg_strerror_r): Implement POSIX
- variant.
- * libc/string/Makefile.am (GENERAL_SOURCES): Build new file.
- * libc/string/Makefile.in: Regenerate.
-
-2011-01-28 Corinna Vinschen <vinschen@redhat.com>
-
- * libc/stdio/fclose.c: Only use sfp lock to guard non-atomic
- changes of flags and fp lock.
- * libc/stdio/freopen.c: Ditto.
- * libc/stdio64/freopen64.c: Ditto.
- * libc/stdio/fgetc.c: Revert change from 2009-04-24, remove sfp locks
- which guard entire function to avoid potential deadlocks when using
- stdio functions in multiple thraeds.
- * libc/stdio/fgets.c: Ditto.
- * libc/stdio/fgetwc.c: Ditto.
- * libc/stdio/fgetws.c: Ditto.
- * libc/stdio/fread.c: Ditto.
- * libc/stdio/fseek.c: Ditto.
- * libc/stdio/getc.c: Ditto.
- * libc/stdio/getdelim.c: Ditto.
- * libc/stdio/gets.c: Ditto.
- * libc/stdio/vfscanf.c: Ditto.
- * libc/stdio/vfwscanf.c: Ditto.
-
- * libc/stdio/fflush.c (_fflush_r): Split out core functionality into
- new function __sflush_r. Just lock file and call __sflush_r from here.
- * libc/stdio/fwalk.c (_fwalk): Remove static helper function and move
- functionality back into main function. Don't walk a file with flags
- value of 1. Add comment.
- (_fwalk_reent): Ditto.
- * libc/stdio/local.h (__sflush_r): Declare.
- * libc/stdio/refill.c (__srefill): Before calling fwalk, set flags
- value to 1 so this file pointer isn't walked. Revert flags afterwards
- and call __sflush_r for this fp if necessary. Add comments.
-
-2011-01-27 Corinna Vinschen <vinschen@redhat.com>
-
- * libc/include/sys/features.h: Define __STDC_ISO_10646__ for Cygwin.
- * libc/include/wchar.h: Include features.h.
-
-2011-01-15 Yaakov Selkowitz <yselkowitz@users.sourceforge.net>
-
- * libc/include/sys/types.h (ulong): Add typedef.
-
-2011-01-12 Ralf Corsépius <ralf.corsepius@rtems.org>
-
- * libm/math/w_tgamma.c: Only build ifndef _DOUBLE_IS_32BITS.
- * libm/math/wf_tgamma.c: Map tgamma to tgammaf, ifdef _DOUBLE_IS_32BITS.
-
-2011-01-12 Jeff Johnston <jjohnstn@redhat.com>
-
- * configure.host: Add noinclude variable to allow specification
- of header files to remove from installation.
- * acinclude.m4: Provide NO_INCLUDE_LIST variable based on
- noinclude variable in configure.host.
- * configure: Regenerated.
- * Makefile.am: Remove all header files in NO_INCLUDE_LIST.
- * Makefile.in: Regenerated.
-
-2011-01-12 Yaakov Selkowitz <yselkowitz@users.sourceforge.net>
-
- * libc/sys/linux/sys/signal.h (sig_t): Move from here...
- * libc/include/signal.h (sig_t): ...to here.
-
-2011-01-10 Corinna Vinschen <vinschen@redhat.com>
-
- * libc/machine/mips/strlen.c (strlen): Add delay slot for R3000.
-
-2011-01-10 Joel Sherrill <joel.sherrill@oarcorp.com>
-
- * libc/include/string.h: Make strsignal() available unconditionally.
-
-2011-01-07 Ralf Corsepius <ralf.corsepius@rtems.org>
-
- * libc/sys/rtems/crt0.c: Adjust free() and calloc() to match their
- public decls.
-
-2011-01-05 Ralf Corsepius <ralf.corsepius@rtems.org>
-
- * Makefile.am: Move cleaning targ-include to clean-local.
- * Makefile.in: Regenerate.
-
-2011-01-05 Ralf Corsepius <ralf.corsepius@rtems.org>
-
- * libc/stdio/open_memstream.c (internal_open_memstream_r):
- Don't limit c->max to 64*1024 on targets with SIZE_MAX < 64*1024.
-
-2011-01-05 Ralf Corsepius <ralf.corsepius@rtems.org>
-
- * libc/xdr/xdr.c: Fix typos in #errors.
-
-2011-01-05 Ralf Corsepius <ralf.corsepius@rtems.org>
-
- * libc/xdr/xdr_private.h: Include <stdint.h>
- * libc/xdr/xdr_rec.c: Include limits.h
-
-2011-01-05 Ralf Corsepius <ralf.corsepius@rtems.org>
-
- * libc/Makefile.am (SUBDEFS): Remove redundant posix/stmp-def.
- * libc/Makefile.in: Regenerate.
-
-2011-01-05 Ralf Corsepius <ralf.corsepius@rtems.org>
-
- * libc/configure.in: Remove redundant posix_dir processing.
- * libc/configure: Regenerate.
-
-2010-12-31 Ralf Corsepius <ralf.corsepius@rtems.org>
-
- * MAINTAINERS: Change corinna@vinchen.de to corinna@vinschen.de.
-
-2010-12-26 Christopher Faylor <me+cygwin@cgf.cx>
-
- * libc/include/sys/errno.h (program_invocation_name): Declare.
- (program_invocation_short_name): Ditto.
-
-2010-12-16 Jeff Johnston <jjohnstn@redhat.com>
-
- * NEWS: Update with 1.19.0 info.
- * README: Ditto.
- * MAINTAINERS: Update.
- * acinclude.m4: Change version number to 1.19.0.
- * aclocal.m4: Regenerated.
- * configure: Ditto.
- * Makefile.am: Fix stmp-targ-include target.
- * Makefile.in: Regenerated.
- * doc/aclocal.m4: Ditto.
- * doc/configure: Ditto.
- * libc/*/aclocal.m4: Ditto.
- * libc/*/configure: Ditto.
- * libc/libc.texinfo: Ditto.
- * libm/*/aclocal.m4: Ditto.
- * libm/*/configure: Ditto.
- * libm/libm.texinfo: Ditto.
- * libc/sys/linux/shared.ld: Add VERS_1.19
-
-2010-12-14 Jeff Johnston <jjohnstn@redhat.com>
-
- * Makefile.am: Add support to copy all sub-directories of the
- sys/SYS_DIR/include directory, if they contain header files.
- * Makefile.in: Regenerated.
-
-2010-12-08 Jeff Johnston <jjohnstn@redhat.com>
-
- * libm/mathfp/sf_logarithm.c: Change isfinitef reference to isfinite.
-
-2010-12-08 Ralf Corsepius <ralf.corsepius@rtems.org>
-
- * include/sys/types.h: Add #if defined(__rtems__) around
- pthread_attr_t.guardsize.
-
-2010-12-08 Joel Sherrill <joel@OARcorp.com>
-
- * include/pthread.h: Add pthread_attr_setstack, pthread_attr_getstack,
- pthread_attr_getguardsize, pthread_attr_setguardsize.
- * include/sys/types.h (pthread_attr_t): Add guardsize.
-
-2010-12-08 Corinna Vinschen <corinna@vinschen.de>
-
- * libc/include/strings.h: Don't include locale.h.
-
-2010-12-07 Eric Blake <eblake@redhat.com>
-
- * libc/include/strings.h: Don't declare removed functions when
- requesting POSIX 2008 compliance.
-
-2010-12-07 Jeff Johnston <jjohnstn@redhat.com>
-
- * libc/stdlib/strtod.c (_strtod_r): Fix code to handle case whereby
- _DOUBLE_IS_32BITS is set and DBL_DIGS is 6 instead of 15.
-
-2010-12-07 Ralf Corsépius <ralf.corsepius@rtems.org>
-
- * libc/include/strings.h: New (split-out from string.h).
-
-2010-12-03 Craig Howland <howland@LGSInnovations.com>
-
- * libc/include/math.h: Missing from previous checkin.
-
-2010-12-02 Craig Howland <howland@LGSInnovations.com>
-
- * libm/common/s_log2.c: Change from using M_LOG2_E to M_LN2 define
- (from math.h--the latter is POSIX, the former non-standard).
- * libm/common/sf_log2.c: Ditto. Change cast for M_LN2 from float to
- float_t (in case all math not done in float).
- * libc/include/math.h: Ditto (same 2 things as sf_log2.c).
-
-2010-12-02 Jayant Sonar jayant.sonar@kpitcummins.com
- Kaushik Phatak kaushik.phatak@kpitcummins.com
-
- * configure.host: Add CR16 support.
- * libc/include/machine/ieeefp.h: Ditto.
- * libc/include/machine/setjmp.h: Ditto.
- * libc/include/sys/config.h: Ditto.
- * libc/machine/configure.in: Ditto
- * libc/machine/configure: Regenerated
- * libc/machine/cr16/aclocal.m4: New.
- * libc/machine/cr16/configure.in: New
- * libc/machine/cr16/configure: New
- * libc/machine/cr16/getenv.c: New
- * libc/machine/cr16/Makefile.am: New
- * libc/machine/cr16/Makefile.in: New
- * libc/machine/cr16/setjmp.S: New
- * libc/machine/cr16/sys/asm.h: New
- * libc/machine/cr16/sys/libh.h: New
- * libc/machine/cr16/sys/syscall.h: New
-
-2010-11-29 Ralf Corsépius <ralf.corsepius@rtems.org>
-
- * libm/complex/catan.c, libm/complex/catanf.c,
- libm/complex/ctan.c, libm/complex/ctanf.c:
- Use HUGE_VAL instead of MAXNUM.
-
-2010-11-25 Ralf Corsépius <ralf.corsepius@rtems.org>
-
- * libm/complex/cargf.c: Use crealf instead of creal.
-
-2010-11-19 Andy Koppe <andy.koppe@gmail.com>
-
- * libc/locale/locale.c (loadlocale): Recognise the "cjknarrow"
- modifier on "C.<charset>" locales too.
-
-2010-11-18 Andy Koppe <andy.koppe@gmail.com>
-
- * libc/locale/locale.c (loadlocale): Fix width of CJK ambigous
- characters to 1 for singlebyte charsets and 2 for non-Unicode
- multibyte charsets. Change documentation accordingly.
-
-2010-11-17 Bernd Schmidt <bernds@codesourcery.com>
-
- * configure.host (newlib_cflags): For tic6x, add -DCLOCK_PROVIDED.
-
-2010-11-16 Andrew Makhorin <mao@gnu.org>
-
- * libc/machine/i386/setjmp.S (longjmp): Per POSIX, return 1 if second
- argument is 0.
-
-2010-11-16 Ralf Corsépius <ralf.corsepius@rtems.org>
-
- * libc/include/sys/types.h: Add _mode_t for __rtems__.
- * libc/sys/rtems/machine/_types.h: Provide _mode_t, _fpos_t, _off_t.
- Add _ssize_t for 64bit sparc.
- Let arm, i386, m68k, mips, PPC, sparc use 64bit _off_t, _fpos_t.
-
-2010-11-16 Ralf Corsépius <ralf.corsepius@rtems.org>
-
- * configure.host: Add -D_COMPILING_NEWLIB to newlib_cflags.
-
-2010-11-04 Ralf Corsépius <ralf.corsepius@rtems.org>
-
- * libm/complex/cacos.c: Reorder function calls to work around ICE
- in arm/thumb-gcc.
-
-2010-10-27 Maurice Baijens <maurice.baijens@ellips.nl>
-
- * libc/stdlib/strtol.c: Make sure signed characters are not
- sign-extended when converted to int and passed to ctype macros.
- * libc/stdlib/strtoul.c: Ditto.
- * libc/stdlib/strtoll_r.c: Ditto.
- * libc/stdlib/strtoull_r.c: Ditto.
-
-2010-10-18 Marco Atzeri <marco_atzeri@yahoo.it>
-
- * libm/Makefile.am: added complex functions documentation
- * libm/libm.texinfo: ditto
- * libm/complex/Makefile.am: Ditto
- * libm/complex/complex.tex: Ditto
- * libm/complex/(cabs.c, cacos.c, cacosh.c, carg.c,
- casin.c, casinh.c, catan.c, catanh.c, ccos.c, ccosh.c,
- cexp.c, cimag.c, clog.c, conj.c, cpow.c, cproj.c, creal.c,
- csin.c, csinh.c, csqrt.c, ctan.c, ctanh.c): Ditto
- * libm/Makefile.in: Regenerate
- * libm/complex/Makefile.in: Ditto
-
-2010-10-14 Craig Howland <howland@LGSInnovations.com>
-
- * libc/include/math.h: Delete cabs() and cabs() prototypes
- (c.f. 2010-10-08 change by Corinna).
-
-2010-10-08 Bernd Schmidt <bernds@codesourcery.com>
- Joseph Myers <joseph@codesourcery.com>
-
- * configure.host: Handle tic6x targets.
- * libc/include/machine/ieeefp.h: Define endianness for C6X.
- * libc/include/machine/setjmp.h: Add __TMS320C6X__ case.
- * libc/machine/configure.in: Handle tic6x targets.
- * libc/machine/configure: Regenerate.
- * libc/machine/tic6x/Makefile.am, libc/machine/tic6x/configure.in,
- libc/machine/tic6x/setjmp.S: New.
- * libc/machine/tic6x/Makefile.in, libc/machine/tic6x/aclocal.m4,
- libc/machine/tic6x/configure: New (generated).
-
-2010-10-08 Ralf Corsépius <ralf.corsepius@rtems.org>
-
- * libc/include/sys/unistd.h: Declare getsid, setegid, seteuid for RTEMS.
-
-2010-10-08 Ralf Corsépius <ralf.corsepius@rtems.org>
-
- * libm/common/sf_llrint.c, libm/common/sf_round.c: Add explicit casts
- to __uint32_t to avoid overflows on implicit casts.
-
-2010-10-08 Ralf Corsépius <ralf.corsepius@rtems.org>
-
- * libm/complex/complex.tex: Add empty stub.
-
-2010-10-08 Corinna Vinschen <corinna@vinschen.de>
-
- * libm/math/w_cabs.c: Delete.
- * libm/math/wf_cabs.c: Delete.
- * libm/math/Makefile.am (src): Remove w_cabs.c.
- (fsrc): Remove wf_cabs.c.
- * libm/math/Makefile.in: Regenerate.
-
-2010-10-08 Marco Atzeri <marco_atzeri@yahoo.it>
-
- * libc/include/complex.h: New complex header.
- * libm/common/fdlibm.h: Added ifdef _COMPLEX_H.
- * libm/complex/*: New complex functions imported from NetBSD.
- * libm/Makefile.am: Added complex subdir.
- * libm/Makefile.in: Regenerate.
- * libm/configure.in: Added complex subdir.
- * libm/configure: Regenerate.
-
-2010-10-06 Eric Blake <eblake@redhat.com>
-
- * lib/str-two-way.h (two_way_long_needle): Avoid bug with long
- periodic needle having false positive. Affects memmem, strstr,
- strcasestr.
-
-2010-09-21 Craig Howland <howland@LGSInnovations.com>
-
- * libc/string/memcpy.c: Do not assign size_t parameter to int.
- Use parameter directly, instead.
- * libc/string/memccpy.c: Likewise.
- * libc/string/mempcpy.c: Likewise.
- * libc/string/memmove.c: Likewise.
-
-2010-09-09 Kevin Buettner <kevinb@redhat.com>
-
- * libc/sys/sysnecv850/Makefile.am (lib_a_SOURCES): Provide an
- empty definition.
- * libc/sys/sysnecv850/Makefile.in: Regenerate.
-
-2010-08-25 Sebastian Huber <sebastian.huber@embedded-brains.de>
-
- * libc/posix/opendir.c (opendir): Fix potential memory leak.
-
-2010-08-10 Yaakov Selkowitz <yselkowitz@users.sourceforge.net>
-
- * libc/include/sys/dir.h: New BSD-compatibility header.
-
-2010-08-02 Yaakov Selkowitz <yselkowitz@users.sourceforge.net>
-
- * libc/include/sys/features.h: Define _POSIX_MONOTONIC_CLOCK for Cygwin.
-
-2010-08-06 Corinna Vinschen <corinna@vinschen.de>
-
- * libc/include/sys/stat.h: Move all POSIX-defined symbolic constants
- out of `#ifndef _POSIX_SOURCE' guard.
-
-2010-08-03 Craig Howland <howland@LGSInnovations.com>
-
- * libm/common/s_lrint.c (lrint): Annotate shift operations with
- possible shift amount ranges, and use SAFE_RIGHT_SHIFT to avoid
- undefined behaviour.
- * libm/common/s_llrint.c (llrint): Likewise.
- * libm/common/s_lround.c (lround): Correct some comments on ranges.
- * libm/common/s_llround.c (llround): Likewise.
-
-2010-07-30 Anthony Green <green@moxielogic.com>
-
- * libc/sys/rtems/machine/_types.h: Add moxie support.
-
-2010-07-23 Naveen.H.S <naveenh1@kpitcummins.com>
- Gina Verlekar <gina.verlekar@kpitcummins.com>
-
- * configure.host: Compact v850* support and add
- check for newlib_may_supply_syscalls.
- * libc/sys/sysnecv850/Makefile.am: Add support for
- '--disable-newlib-supplied-syscalls' option.
- * libc/sys/sysnecv850/Makefile.in: Regenerated.
-
-2010-07-20 Dave Korn <dave.korn.cygwin@gmail.com>
-
- * libm/common/fdlibm.h (SAFE_LEFT_SHIFT): New macro definition.
- (SAFE_RIGHT_SHIFT): Likewise.
- * libm/common/s_llround.c (llround): Annotate shift operations with
- possible shift amount ranges, and use SAFE_RIGHT_SHIFT to avoid
- undefined behaviour.
- * libm/common/s_lround.c (lround): Likewise.
-
-2010-07-19 Eric Blake <eblake@redhat.com>
-
- * libc/stdio/mktemp.c (_gettemp): Add parameter, all callers
- changed.
- (mkostemp, _mkostemp_r, mkostemps, _mkostemps_r): New interfaces,
- for ELIX level 4.
- * libc/include/stdlib.h (mktemp): Avoid namespace issues.
- (mkostemp, mkostemps): Declare.
-
-2010-07-13 Corinna Vinschen <corinna@vinschen.de>
-
- * libc/include/signal.h (sighandler_t): Only define if _POSIX_SOURCE
- is undefined.
-
-2010-07-06 Corinna Vinschen <corinna@vinschen.de>
-
- * libc/posix/rewinddir.c (rewinddir): Remove incorrect cast to off_t.
- * libc/sys/rtems/sys/dirent.h (_seekdir): Add prototype.
- * libc/sys/linux/sys/dirent.h (_seekdir): Fix prototype to use long
- rather than off_t.
-
-2010-07-01 Yaakov Selkowitz <yselkowitz@users.sourceforge.net>
-
- * libc/include/signal.h (sighandler_t): Add typedef.
-
-2010-06-29 Antony King <antony.king@st.com>
-
- * libc/ctype/ctype_.c (__ctype_ptr): Reinstate definition (guarded by
- _NEED_OLD_CTYPE_PTR_DEFINITION) for backwards compatibility with newlib
- 1.16.0 and earlier.
-
-2010-06-28 Yaakov Selkowitz <yselkowitz@users.sourceforge.net>
-
- * libc/include/sys/stat.h: Add ACCESSPERMS, ALLPERMS, and DEFFILEMODE.
-
-2010-06-18 Pavel Pisa <ppisa4lists@pikron.com>
-
- * libc/include/machine/ieeefp.h[__arm__][!__VFP_FP__]: Set to
- __IEEE_BIG_ENDIAN and set __IEEE_BYTES_LITTLE_ENDIAN appropriately
- based on __ARMEL flag.
- * libc/include/machine/endian.h: To set byte order to LITTLE_ENDIAN,
- check for __IEEE_LITTLE_ENDIAN or __IEEE_BYTES_LITTLE_ENDIAN.
-
-2010-06-09 Paul Brook <paul@codesourcery.com>
-
- * libc/include/sys/reent.h (_reent): Adjust _REENT_SMALL to be
- binary compatible with normal layout.
- (_REENT_INIT): Adjust to match struct layout.
-
-2010-06-08 Jeff Johnston <jjohnstn@redhat.com>
-
- * libc/include/wordexp.h: Add __cplusplus wrapper.
-
-2010-06-08 Jeff Johnston <jjohnstn@redhat.com>
-
- * configure.in: Add test for enable-newlib-register-fini
- to set the _WANT_REGISTER_FINI flag.
- * configure: Regenerated.
- * Makefile.in: Ditto.
- * newlib.hin: Add _WANT_REGISTER_FINI flag.
- * libc/stdlib/__call_atexit.c: Add test for
- _WANT_REGISTER_FINI to enable the register_fini function.
-
-2010-06-04 Mark Mitchell <mark@codesourcery.com>
-
- * libc/stdlib/__call_atexit.c (__libc_fini): Declare.
- (register_fini): New function.
- * libc/misc/init.c (_fini): Remove.
- (__libc_fini_array): Likewise.
- * libc/misc/fini.c: New file.
- * libc/misc/Makefile.am (LIB_SOURCES): Add fini.c.
- * libc/misc/Makefile.in: Regenerate.
-
-2010-05-31 Kazu Hirata <kazu@codesourcery.com>
-
- * libc/stdlib/mallocr.c (malloc_extend_top): Backport the
- difference between versions 2.6.4 and 2.6.5.
-
-2010-05-18 Christopher Faylor <me+cygwin@cgf.cx>
-
- * libc/string/strsignal.c (strsignal): Avoid duplicate case statement
- where SIGPWR == SIGLOST.
-
-2010-05-11 Jeff Johnston <jjohnstn@redhat.com>
-
- * libc/stdlib/__call_atexit.c: Fix lock to be of type
- _LOCK_RECURSIVE_T as recursive usage is needed.
-
-2010-05-11 Jeff Johnston <jjohnstn@redhat.com>
-
- * libc/locale/locale.c (loadlocale): Fix dangling
- switch statement caused by __HAVE_LOCALE_INFO__ not being
- defined.
-
-2010-05-11 Joel Sherrill <joel.sherrill@oarcorp.com>
-
- * libc/string/strsignal.c: New file.
- * libc/string/Makefile.am: Add support for strsignal.
- * libc/string/strings.tex: Ditto.
- * libc/string/Makefile.in: Regenerated.
-
-2010-05-05 DJ Delorie <dj@redhat.com>
-
- * libc/Makefile.am (stmp-sigset, stmp-iconvset, stmp-extra,
- stmp-stdio64, stmp-posix,stmp-targetdep): Use unique temporary
- file names to allow for parallel installs.
- (CLEANFILES): Add new temporary file names.
- * libc/Makefile.in: Regenerate.
-
-2010-05-03 Corinna Vinschen <corinna@vinschen.de>
-
- * libc/locale/lctype.c: Include <string.h> and "setlocale.h".
- (_C_ctype_locale): Add braces to initializer.
- (__ctype_load_locale): Fix compiler warnings in non-Cygwin case.
- * libc/locale/nl_langinfo.c (nl_langinfo): Expose _NL_CTYPE_MB_CUR_MAX
- case only if __HAVE_LOCALE_INFO__ is defined.
-
-2010-05-02 Corinna Vinschen <corinna@vinschen.de>
-
- * libc/stdlib/wctob.c (wctob): Reorganize and fix WEOF check. Rename
- pwc to pmb and convert to array to avoid buffer overflow. Rename c to
- wc. Check wc for WEOF instead of for EOF. Return first byte of pmb if
- __wctomb conversion returned exactly one byte, EOF otherwise.
-
-2010-04-30 Corinna Vinschen <corinna@vinschen.de>
-
- * libc/include/langinfo.h: Fix #endif positioning.
-
-2010-04-28 Corinna Vinschen <corinna@vinschen.de>
-
- Extend locale support to maintain wide char values of native strings
- if __HAVE_LOCALE_INFO_EXTENDED__ is defined.
- * libc/include/langinfo.h (enum __nl_item): New type. Define all
- native values accessible through nl_langinfo. Define previously
- existing POSIX-compatible values as macros as well.
- * libc/include/stdlib.h (__mb_cur_max): Drop declaration.
- (__locale_mb_cur_max): Declare.
- (MB_CUR_MAX): Re-define calling __locale_mb_cur_max.
- * libc/locale/Makefile.am (ELIX_SOURCES): Add lctype.c.
- * libc/locale/Makefile.in: Regenerate.
- * libc/locale/lctype.c: New file to define and load LC_CTYPE category.
- * libc/locale/lctype.h: New file, matching header.
- * libc/locale/lmessages.c (_C_messages_locale): Add default values for
- wide char members.
- (__messages_load_locale): Add _C_messages_locale in call to
- __set_lc_messages_from_win.
- * libc/locale/lmessages.h (struct lc_messages_T): Add wide char members.
- * libc/locale/lmonetary.c (_C_monetary_locale): Add default values for
- wide char members.
- (__monetary_load_locale): Add _C_monetary_locale in call to
- __set_lc_monetary_from_win.
- * libc/locale/lmonetary.h (struct lc_monetary_T): Add wide char members.
- Add numerical values for international currency formatting per
- POSIX-1.2008, if __HAVE_LOCALE_INFO_EXTENDED__ is defined.
- * libc/locale/lnumeric.c (_C_numeric_locale): Add default values for
- wide char members.
- (__numeric_load_locale): Add _C_numeric_locale in call to
- __set_lc_numeric_from_win.
- * libc/locale/lnumeric.h (struct lc_numeric_T): Add wide char members.
- * libc/locale/locale.c (loadlocale): Return doing nothing if category
- locale didn't change. Convert category if chain to switch statement.
- Call __ctype_load_locale in LC_CTYPE case.
- (__locale_charset): Add (but disable for now) returning codeset from
- __get_current_ctype_locale.
- (__locale_mb_cur_max): Add (but disable for now) returning mb_cur_max
- from __get_current_ctype_locale.
- (__locale_msgcharset): Add returning codeset from
- __get_current_messages_locale.
- (_localeconv_r): Accommodate int_XXX values.
- * libc/locale/nl_langinfo.c (nl_ext): New array to define what is to
- be returned for non-POSIX values.
- (nl_Langinfo): Return correct codeset for each locale category. Return
- extended values if __HAVE_LOCALE_INFO_EXTENDED__ is defined.
- * libc/locale/timelocal.c (_C_time_locale): Add default values for
- wide char members.
- (__time_load_locale): Add _C_time_locale in call to
- __set_lc_time_from_win.
- * libc/locale/timelocal.h (struct lc_time_T): Add wide char members.
- * libc/stdio/vfwprintf.c (_VFWPRINTF_R): Use wide char decimal point
- and thousands_sep if __HAVE_LOCALE_INFO_EXTENDED__ is defined.
- * libc/time/strftime.c: Rework to accommodate availability of wide char
- strings in LC_TIME category if __HAVE_LOCALE_INFO_EXTENDED__ is defined.
-
-2010-04-22 DJ Delorie <dj@redhat.com>
-
- * libc/Makefile.am (SUBDEFS): Add LIBC_POSIX_DEF.
- (libc.info): Add posix.texi.
- (libc.dvi): Likewise.
- (stmp-posix): New.
- (posix.texi): New.
- (libc_TEXINFOS): Add posix.texi.
- * libc/configure.in (LIBC_POSIX_LIB, LIBC_POSIX_DEF): Add
- tests.
- * libc/libc.texinfo: Include posix.texi
- * libc/locale/locale.c: Fix texinfo typo.
- * libc/time/strftime.c: Fix texinfo typo.
-
- * libc/configure: Regenerate.
- * libc/Makefile.in: Regenerate.
- * libc/argz/Makefile.in: Regenerate.
- * libc/ctype/Makefile.in: Regenerate.
- * libc/errno/Makefile.in: Regenerate.
- * libc/iconv/Makefile.in: Regenerate.
- * libc/iconv/ccs/Makefile.in: Regenerate.
- * libc/iconv/ccs/binary/Makefile.in: Regenerate.
- * libc/iconv/ces/Makefile.in: Regenerate.
- * libc/iconv/lib/Makefile.in: Regenerate.
- * libc/locale/Makefile.in: Regenerate.
- * libc/misc/Makefile.in: Regenerate.
- * libc/posix/Makefile.in: Regenerate.
- * libc/reent/Makefile.in: Regenerate.
- * libc/search/Makefile.in: Regenerate.
- * libc/signal/Makefile.in: Regenerate.
- * libc/stdio/Makefile.in: Regenerate.
- * libc/stdio64/Makefile.in: Regenerate.
- * libc/stdlib/Makefile.in: Regenerate.
- * libc/string/Makefile.in: Regenerate.
- * libc/syscalls/Makefile.in: Regenerate.
- * libc/time/Makefile.in: Regenerate.
- * libc/unix/Makefile.in: Regenerate.
- * libc/xdr/Makefile.in: Regenerate.
-
-2010-04-06 Dave Korn <dave.korn.cygwin@googlemail.com>
-
- * libc/stdlib/__atexit.c (__atexit_lock): Initialise as recursive
- rather than non-recursive lock type.
- (__register_exitproc): Use recursive locking APIs on it.
- * libc/stdlib/__call_atexit.c (__call_exitprocs): Likewise.
-
-2010-04-06 Corinna Vinschen <corinna@vinschen.de>
-
- * libc/stdlib/btowc.c (btowc): Reorganize EOF check. Fix incorrect
- return value if input byte is ASCII NUL.
-
-2010-04-01 Joel Sherrill <joel.sherrill@oarcorp.com>
-
- * libc/include/sched.h: Include prototypes for
- sched_* methods.
- * libc/include/sys/sched.h: Update to POSIX
- 1003.1b-2008. Rework constants to allow sharing
- between RTEMS and Cygwin.
-
-2010-03-27 Corinna Vinschen <corinna@vinschen.de>
-
- * libc/locale/locale.c (loadlocale): Optimize "EUC" charset check.
- Cygwin only: Allow GB2312 and EUC-CN as alternative codeset names
- for GBK. Add to documentation.
- * libc/locale/nl_langinfo.c (nl_langinfo): On Cygwin, translate EUCCN
- to GB2312.
-
-2010-03-17 Craig Howland <howland@LGSInnovations.com>
-
- * libc/include/sys/features.h: Allow for _XOPEN_SOURCE to have an
- empty definition. Also add support for values of 500 or less.
-
-2010-03-09 Jeff Johnston <jjohnstn@redhat.com>
-
- * libc/posix/telldir.c (dd_loccnt): Change start index to be 1
- instead of 0.
- (_seekdir): A loc of 0 now means rewind dir.
-
-2010-03-08 Craig Howland <howland@LGSInnovations.com>
-
- * libm/common/s_rint.c: Fix error when integral part had 18 bits and
- fraction had bits set beyond first radix bit. Also, make 2-part
- adjustment consistent with 1-part adjustment when adjusting fractional
- bits.
- * libm/common/sf_rint.c: Make fractional-bit adjustment consistent
- with s_rint.c by setting 0b.01 instead of 0b.001.
-
-2010-03-05 Craig Howland <howland@LGSInnovations.com>
-
- * libm/math/ef_sqrt.c: Delete unused variable sign.
- * libc/stdlib/getenv.c: Delete "char *_findenv_r ();", as is not a
- proper prototype, and is properly prototyped in stdlib.h, anyway.
- * libc/stdlib/getenv_r.c: Ditto.
- * libc/search/hash.c: Add _DEFUN to __hash_open() declaration; add
- #define __DBINTERFACE_PRIVATE to activate prototypes from db_local.h.
- * libc/search/db_local.h: Correct __hash_open() prototype.
- * libc/sys/linux/cmath/math_private.h: Eliminate compiler warnings:
- Remove #define INFINITY (redefines from math.h); remove #define __isnanf
- and #define __isinff isinff.
-
-2010-03-02 Craig Howland <howland@LGSInnovations.com>
-
- * libc/include/sys/features.h: Add POSIX.1-permitted definition of
- _POSIX_C_SOURCE if not already defined and _XOPEN_SOURCE has an
- appropriate value. Specifically, check for POSIX.1-2008 & 2001 values.
- * libc/include/sys/config.h: Add #include <sys/features.h> so that all
- includes get the new check added to it.
-
-2010-03-02 Charles Wilson <cygwin@cwilson.fastmail.fm>
-
- * libc/xdr/README: Correct grammatical errors.
- * libc/include/rpc/types.h: Add public types used
- by RPC implementations.
- * libc/include/rpc/xdr.h: Add defines used by RPC
- implementations.
- * libc/xdr/Makefile.am: Eliminate automake warning.
- * libc/xdr/Makefile.in: Regenerate.
-
-2010-03-02 Corinna Vinschen <corinna@vinschen.de>
-
- * libc/xdr/Makefile.in: Regenerate.
-
-2010-03-02 Charles Wilson <cygwin@cwilson.fastmail.fm>
-
- Add eXtensible Data Record (XDR) support
- * configure.host: Build libc/xdr only on cygwin.
- * Makefile.am: Install xdr headers.
- * libc/configure.in: Support new libc/xdr subdirectory.
- * libc/Makefile.am: Support new libc/xdr subdirectory.
- * libc/include/rpc/types.h: New.
- * libc/include/rpc/xdr.h: New.
- * libc/xdr/README: New.
- * libc/xdr/Makefile.am: New.
- * libc/xdr/dummy.c: New.
- * libc/xdr/xdr.c: New.
- * libc/xdr/xdr_array.c: New.
- * libc/xdr/xdr_float.c: New.
- * libc/xdr/xdr_float_vax.c: New.
- * libc/xdr/xdr_mem.c: New.
- * libc/xdr/xdr_private.c: New.
- * libc/xdr/xdr_private.h: New.
- * libc/xdr/xdr_rec.c: New.
- * libc/xdr/xdr_reference.c: New.
- * libc/xdr/xdr_sizeof.c: New.
- * libc/xdr/xdr_stdio.c: New.
-
- Regenerate using ac-2.63 and am-1.11.1
- * libc/xdr/Makefile.in: New.
- * Makefile.in: Regenerate.
- * libc/configure: Regenerate.
- * libc/Makefile.in: Regenerate.
- * libc/argz/Makefile.in: Regenerate.
- * libc/ctype/Makefile.in: Regenerate.
- * libc/errno/Makefile.in: Regenerate.
- * libc/iconv/ccs/binary/Makefile.in: Regenerate.
- * libc/iconv/ccs/Makefile.in: Regenerate.
- * libc/iconv/ces/Makefile.in: Regenerate.
- * libc/iconv/lib/Makefile.in: Regenerate.
- * libc/iconv/Makefile.in: Regenerate.
- * libc/locale/Makefile.in: Regenerate.
- * libc/misc/Makefile.in: Regenerate.
- * libc/posix/Makefile.in: Regenerate.
- * libc/reent/Makefile.in: Regenerate.
- * libc/search/Makefile.in: Regenerate.
- * libc/signal/Makefile.in: Regenerate.
- * libc/stdio/Makefile.in: Regenerate.
- * libc/stdio64/Makefile.in: Regenerate.
- * libc/stdlib/Makefile.in: Regenerate.
- * libc/string/Makefile.in: Regenerate.
- * libc/syscalls/Makefile.in: Regenerate.
- * libc/time/Makefile.in: Regenerate.
- * libc/unix/Makefile.in: Regenerate.
-
-2010-02-26 Craig Howland <howland@LGSInnovations.com>
-
- * libm/common/s_ilogb.c: Fix typo in comments that causes doc
- generation to fail.
-
-2010-02-26 Corinna Vinschen <corinna@vinschen.de>
-
- * libc/time/strftime.c: Add support for era and alt_digits data from
- LC_TIME locale category. Conditionalize using _WANT_C99_TIME_FORMATS
- flag.
- (STRTOUL): Define differently for building strftime or wcsftime.
- (STRCPY): Ditto.
- (STRCHR): Ditto.
- (STRLEN): Ditto.
- (CHECK_LENGTH): Define to simplify code.
- (era_info_t): New type to store era info.
- (get_era_info): New function to fetch era info matching incoming
- struct tm.
- (free_era_info): New function to free era info.
- (alt_digits_t): New type to store alternative digits.
- (get_alt_digits): New function to convert alt_digits string into
- alt_digits_t structure.
- (free_alt_digits): New function to free alt_digits info.
- (conv_to_alt_digits): New function to convert unsigned value into
- alternative digits.
- (strftime): Conditionalize on _WANT_C99_TIME_FORMATS. If
- _WANT_C99_TIME_FORMATS is defined, define as just a wrapper function
- providing era_info and alt_digits pointers and call ...
- (__strftime): Rename from strftime and make static if
- _WANT_C99_TIME_FORMATS is defined. Add parameters for era_info and
- alt_digits pointers. Handle conversion modifiers according to
- POSIX-1.2008. Redefine %F and %Y according to POSIX. Add default case
- to allow to bail out on invalid conversion specifiers.
- * libc/include/sys/config.h: Move Cygwin build flags to Cygwin's
- config.h.
-
- * libc/include/stdio.h: Remove __CYGWIN_USE_BIG_TYPES__ condition.
-
-2010-02-25 Corinna Vinschen <corinna@vinschen.de>
-
- * libc/locale/locale.c (loadlocale): Fix typo in comment.
-
-2010-02-25 Corinna Vinschen <corinna@vinschen.de>
-
- * libc/locale/locale.c: Throughout, extensively comment on the
- reason for using __CYGWIN__.
- (lconv): Remove _CONST entirely.
- (loadlocale): Guard calls to function loading locale-specific
- category data with __HAVE_LOCALE_INFO__ rather than __CYGWIN__.
- * libc/sys/config.h (__HAVE_LOCALE_INFO__): Define for Cygwin.
-
-2010-02-24 Charles Wilson <...>
-
- Work around issues with new libtool files in ..
- * configure.in: Unconditionally call _LT_PROG_ECHO_BACKSLASH.
- * iconvdata/configure.in: Ditto.
- * libc/configure.in: Ditto.
- * libc/machine/configure.in: Ditto.
- * libc/machine/i386/configure.in: Ditto.
- * libc/sys/configure.in: Ditto.
- * libc/sys/linux/configure.in: Ditto.
- * libc/sys/linux/linuxthreads/configure.in: Ditto.
- * libc/sys/linux/linuxthreads/machine/configure.in: Ditto.
- * libc/sys/linux/linuxthreads/machine/i386/configure.in: Ditto.
- * libc/sys/linux/machine/configure.in: Ditto.
- * libc/sys/linux/machine/i386/configure.in: Ditto.
- * libm/configure.in: Ditto.
- * libm/machine/configure.in: Ditto.
- * libm/machine/i386/configure.in: Ditto.
- * libc/machine/sh/configure.in: Ditto. Also, call
- AC_NO_EXECUTABLES before NEWLIB_CONFIGURE.
- * aclocal.m4: Regenerated.
- * configure: Ditto.
- * Makefile.in: Ditto.
- * doc/aclocal.m4: Ditto.
- * doc/Makefile.in: Ditto.
- * libc/*/aclocal.m4: Ditto.
- * libc/*/Makefile.in: Ditto.
- * libc/*/configure: Ditto.
- * libm/*/aclocal.m4: Ditto.
- * libm/*/Makefile.in: Ditto.
- * libm/*/configure: Ditto.
-
-2010-02-24 Jeff Johnston <jjohnstn@redhat.com>
-
- * libc/stdlib/__call_exit.c: Add include of sys/lock.h.
-
-2010-02-23 Jeff Johnston <jjohnstn@redhat.com>
-
- * libc/include/sys/types.h: Fix __XMK__ sectioning and remove
- redundant code section for __XMK__.
-
-2010-02-22 Corinna Vinschen <corinna@vinschen.de>
-
- * libc/include/langinfo.h (_NL_TIME_DATE_FMT): Define new nl_item
- value for LC_TIME entry date_fmt.
- (_DATE_FMT): Define "official" GNU name same as _NL_TIME_DATE_FMT.
- * libc/locale/nl_langinfo.c (nl_langinfo): Add case for _DATE_FMT.
-
-2010-02-18 Corinna Vinschen <corinna@vinschen.de>
-
- * libc/ctype/iswalpha.c (iswalpha): Update to Unicode 5.2.
- * libc/ctype/iswprint.c (iswprint): Ditto.
- * libc/ctype/iswpunct.c (iswpunct): Drop standalone implementation.
- Define in terms of other wctype functions instead.
- * libc/ctype/towlower.c (towlower): Update to Unicode 5.2. Add comment
- to explain how to fetch the data from the Unicode database.
- * libc/ctype/towupper.c (towupper): Ditto.
- * libc/ctype/utf8alpha.h: Ditto.
- * libc/ctype/utf8print.h: Ditto.
- * libc/ctype/utf8punct.h: Remove.
- * libc/ctype/iswcntrl.c (iswcntrl): Add comment to explain how to
- fetch the data from the Unicode database.
-
-2010-02-18 Corinna Vinschen <corinna@vinschen.de>
-
- * libc/locale/timelocal.h (struct lc_time_T): Add missing ERA-related
- members.
- * libc/locale/timelocal.c (_C_time_local): Set new members to empty
- strings.
- * libc/locale/nl_langinfo.c (nl_langinfo): Return values from
- __get_current_time_locale() for ERA related requests.
-
-2010-02-16 Corinna Vinschen <corinna@vinschen.de>
-
- * libc/ctype/iswblank.c (iswblank): Remove Unicode characters
- U+00A0 and U+200B. Add Unicode character U+180E. Add comment
- to explain how to generate from Unicode data file.
- * libc/ctype/iswspace.c (iswspace): Ditto.
-
-2010-02-15 Corinna Vinschen <corinna@vinschen.de>
-
- * libc/stdio/vfwprintf.c (_VFWPRINTF_R): Apply previous patch here
- as well.
-
-2010-02-15 Corinna Vinschen <corinna@vinschen.de>
-
- * libc/stdio/vfprintf.c (_VFPRINTF_R): Drop printing a redundant
- decimal point in case the float argument is an integral value.
-
-2010-02-11 Craig Howland <howland@LGSInnovations.com>
-
- * libc/include/machine/ieeefp.h: isfinite macro modified to run faster
- by only calling fpclassify once instead of possibly twice.
-
-2010-02-11 Craig Howland <howland@LGSInnovations.com>
-
- * libm/common/s_ilogb.c: Adjust documentation to reflect new returns
- (see next items) and that ilogb() and ilogbf() are C99/POSIX.
- * libm/common/s_ilogb.c (ilogb): Use C99/POSIX FP_ILOGB0 and
- FP_ILOGBNAN returns for 0 and NAN arguments, respectively, instead of
- the prior -INT_MAX and INT_MAX. The FP_ILOGBx defines in math.h
- presently match the prior hard-codes, so no functional change is
- actually introduced. (Not at this time, nor planned, but the values
- are permitted to be different, so subsequent edits of math.h could
- possibly cause a functional change.)
- * libm/common/sf_ilogb.c (ilogbf): Ditto.
-
-2010-02-09 Daniel Gutson <dgutson@codesourcery.com>
-
- * libc/machine/arm/arm_asm.h (_ISA_THUMB_2): __ARM_ARCH_7EM__
- added to the preprocessor condition.
-
-2010-02-09 Corinna Vinschen <corinna@vinschen.de>
-
- * libc/locale/lmessages.c (__messages_load_locale): Take additional
- parameters for wide char to multibyte conversion. Call
- __set_lc_messages_from_win on Cygwin.
- * libc/locale/lmessages.h: Make C++-safe.
- (__messages_load_locale): Change declaration.
- * libc/locale/lmonetary.c (__monetary_load_locale): Use
- _monetary_locale_buf as buffer pointer.
- * libc/locale/lnumeric.c (__numeric_load_locale): Use
- _numeric_locale_buf as buffer pointer.
- * libc/locale/timelocal.c (__time_load_locale): Use time_locale_buf
- as buffer pointer.
- * libc/locale/locale.c (loadlocale): Enable loading LC_MESSAGES data
- on Cygwin.
-
-2010-02-08 Josef Wolf <jw@raven.inka.de>
-
- * libc/machine/m68k/memcpy.S: MISALIGEND_OK should not be set for
- __mcpu32__.
-
-2010-02-07 Corinna Vinschen <corinna@vinschen.de>
-
- * libc/locale/locale.c: Add Cygwin's /usr/share/locale/locale.alias
- support to documentation.
- (__set_locale_from_locale_alias): Declare when build for Cygwin.
- (loadlocale): On Cygwin, if locale can't be recognized, call
- __set_locale_from_locale_alias to check for locale alias.
- Define FAIL macro to replace `return NULL' statements. Replace
- throughout.
-
-2010-02-07 Corinna Vinschen <corinna@vinschen.de>
-
- * libc/locale/locale.c: Fix typo in documentation. Remove useless
- _MB_CAPABLE guards within other _MB_CAPABLE guards. Add comment
- to remaining #endif's.
-
-2010-02-06 Corinna Vinschen <corinna@vinschen.de>
-
- * libc/ctype/ctype_cp.h (_CTYPE_GEORGIAN_PS_128_254): Define.
- (_CTYPE_GEORGIAN_PS_255): Define.
- (_CTYPE_PT154_128_254): Define.
- (_CTYPE_PT154_255): Define.
- (__ctype_cp): Add array members for above ctype definitions.
- * libc/locale/locale.c (loadlocale): Make TIS-620 charset name
- available for all targets. Add guards for setting the conversion
- function pointers. Add support for GEORGIAN-PS and PT154 charsets.
- Change documentation to reflect current behaviour more closely.
- * libc/locale/nl_langinfo.c (nl_langinfo): On Cygwin, translate
- "CP101" to "GEORGIAN-PS" and "CP102" to "PT154".
- * libc/stdlib/sb_charsets.c (__cp_conv): Add conversion arrays
- for GEORGIAN-PS and PT154.
- (__cp_index): Map invalid Windows codepage number 101 to
- GEORGIAN-PS conversion array, 102 to PT154 conversion array.
-
-2010-02-06 Ralf Corsepius <ralf.corsepius@rtems.org>
-
- * libc/posix/telldir.c: Remove bogus nested prototype of lseek().
-
-2010-02-05 Corinna Vinschen <corinna@vinschen.de>
-
- * libc/locale/locale.c (loadlocale): Handle ISO-8859 and KOI8 charsets
- so that the dashes are optional. Align documentation.
-
-2010-02-05 Corinna Vinschen <corinna@vinschen.de>
-
- * libc/stdio/vfprintf.c: Include locale.h also if _WANT_IO_C99_FORMATS
- is defined. Raise conversion buffer size to make sure it has enough
- room for numbers plus grouping character. Define GROUPING flag.
- (_VFPRINTF_R): Add PRINTANDPAD macro. Handle grouping flag character.
- Handle grouping for decimal integer and float values.
- * libc/stdio/vfwprintf.c: Ditto.
-
-2010-02-01 Christopher Faylor <me+cygwin@cgf.cx>
-
- * libc/stdlib/__atexit.c (__atexit_lock): Define a global lock for
- atexit functions.
- (__register_exitproc): Use __atexit_lock rather than a local static
- lock.
- * libc/stdlib/__call_atexit.c: Ditto.
-
-2010-01-29 Jeff Johnston <jjohnstn@redhat.com>
-
- * libc/search/Makefile.am: Create .def files for bsearch and qsort.
- * libc/search/Makefile.in: Regenerated.
- * libc/stdlib/stdlib.tex: Add bsearch and qsort.
-
-2010-01-24 Corinna Vinschen <corinna@vinschen.de>
-
- * libc/locale/nl_langinfo.c (nl_langinfo): Return "CP932" when using
- SJIS on Cygwin. Explain why.
-
-2010-01-23 Corinna Vinschen <corinna@vinschen.de>
-
- * libc/locale/locale.c (loadlocale): Allow CP932 as alias for SJIS.
- Add to documentation. Add a few comments to #endif's for Cygwin.
-
-2010-01-23 Corinna Vinschen <corinna@vinschen.de>
-
- * libc/locale/locale.c (loadlocale): Disable JIS entirely on Cygwin.
- Allow TIS620 and TIS-620 as aliases for CP874 on Cygwin.
-
-2010-01-22 Corinna Vinschen <corinna@vinschen.de>
-
- * libc/locale/lmonetary.c (__monetary_load_locale): Take additional
- parameters for wide char to multibyte conversion. Call
- __set_lc_monetary_from_win on Cygwin.
- * libc/locale/lmonetary.h: Make C++-safe.
- (__monetary_load_locale): Change declaration.
- * libc/locale/lnumeric.c (__numeric_load_locale): Take additional
- parameters for wide char to multibyte conversion. Call
- __set_lc_numeric_from_win on Cygwin.
- * libc/locale/lnumeric.h: Make C++-safe.
- (__numeric_load_locale): Change declaration.
- * libc/locale/locale.c (lconv): De-constify for Cygwin.
- (__set_charset_from_locale): Rename from
- __set_charset_from_codepage. Take locale as parameter instead of
- a codepage.
- (loadlocale): Allow "EUC-JP" for "EUCJP" and "EUC-KR" for "EUCKR".
- Change documnetation accordingly. Enable LC_COLLATE, LC_MONETARY,
- LC_NUMERIC, and LC_TIME handling on Cygwin.
- (_localeconv_r): On Cygwin, copy values from monetary and numeric
- domain if change has been noted.
- * libc/locale/nl_langinfo.c (nl_langinfo): Accommodate change of
- am/pm layout in struct lc_time_T.
- * libc/locale/timelocal.c (_C_time_locale): Accommodate
- redefinition of am/pm members.
- (__time_load_locale): Take additional parameters for wide char
- to multibyte conversion. Call __set_lc_time_from_win on Cygwin.
- * libc/locale/timelocal.h: Make C++-safe.
- (struct lc_time_T): Convert am and pm to a am_pm array for easier
- consumption by strftime and strptime.
- (__time_load_locale): Change declaration.
- * libc/time/strftime.c: Change documentation to reflect changes to
- strftime. Remove locale constant strings in favor of access to
- locale-specifc data.
- (_ctloc): Define access method for locale-specifc data.
- (TOLOWER): Define for tolower conversion.
- (strftime): Throughout, convert locale-specific formats to use
- locale-specific data. Add GNU-specific "%P" format.
- * libc/time/strptime.c: Remove locale constant strings in favor of
- access to locale-specifc data.
- (_ctloc): Define access method for locale-specifc data.
- (strptime): Throughout, convert locale-specific formats to use
- locale-specific data.
-
-2010-01-20 Corinna Vinschen <corinna@vinschen.de>
-
- * libc/locale/nl_langinfo.c (nl_langinfo): On Cygwin, translate
- often-used charsets into Linux compatible codesets.
-
-2010-01-19 Andy Koppe <andy.koppe@gmail.com>
-
- * libc/stdio/vfscanf.c (__SVFSCANF_R): Fix handling of non-ASCII
- characters and allow invalid bytes in format string.
-
-2010-01-19 Corinna Vinschen <corinna@vinschen.de>
-
- * libc/stdlib/wcstombs_r.c (_wcstombs_r): Handle invalid characters
- correctly also in the s==NULL case.
-
-2010-01-17 Corinna Vinschen <corinna@vinschen.de>
-
- * libc/locale/locale.c (loadlocale): Change comments to refer to
- ISO 639-3 rather than 639-2.
-
-2010-01-17 Corinna Vinschen <corinna@vinschen.de>
-
- * libc/locale/locale.c (loadlocale): Allow three character
- language codes to accommodate ISO 639-2 codes.
-
-2010-01-17 Corinna Vinschen <corinna@vinschen.de>
-
- * libc/locale/locale.c (lc_ctype_charset): Disable defaulting to
- "UTF-8" on Cygwin.
- (lc_message_charset): Ditto.
- (loadlocale): Disable setting charset of the "C" locale to "UTF-8" on
- Cygwin.
- * libc/stdlib/mbtowc_r.c (__mbtowc): Add Cygwin-specific comment.
- * libc/stdlib/wctomb_r.c (__wctomb): Ditto.
-
-2010-01-14 Corinna Vinschen <corinna@vinschen.de>
-
- * libc/include/sys/_default_fcntl.h (O_CLOEXEC): Define as _FNOINHERIT.
- (F_DUPFD_CLOEXEC): Define for Cygwin.
- * libc/include/sys/unistd.h (dup3): Define for Cygwin.
- (pipe2): Ditto.
-
-2010-01-14 Corinna Vinschen <corinna@vinschen.de>
-
- * libc/stdio/vfprintf.c (_VFPRINTF_R): Just wave bytes invalid in
- the current charset through.
-
-2010-01-11 Sebastian Huber <sebastian.huber@embedded-brains.de>
-
- * libc/posix/telldir.c (_cleanupdir): Fixed usage of freed memory.
-
-2010-01-11 Yaakov Selkowitz <yselkowitz@users.sourceforge.net>
-
- * libc/include/math.h (log2, log2f): Disable macro versions for C++,
- as they are incompatible with OpenMP/C++ headers.
-
-2010-01-10 Corinna Vinschen <corinna@vinschen.de>
-
- * libc/stdlib/mbtowc_r.c (__ascii_mbtowc): Disallow conversion of
- non-ASCII chars on Cygwin.
- * libc/stdlib/wctomb_r.c (__ascii_wctomb): Ditto.
-
-2009-12-22 Eric Blake <ebb9@byu.net>
-
- * libc/include/sys/unistd.h (suboptarg, getsubopt): Move...
- * libc/include/stdlib.h: ...here, to match POSIX for getsubopt.
-
-2009-12-17 Jeff Johnston <jjohnstn@redhat.com>
-
- * NEWS: Update with 1.18.0 info.
- * README: Ditto.
- * acinclude.m4: Change version number to 1.18.0.
- * aclocal.m4: Regenerated.
- * configure: Ditto.
- * doc/aclocal.m4: Ditto.
- * doc/configure: Ditto.
- * libc/*/aclocal.m4: Ditto.
- * libc/*/configure: Ditto.
- * libc/libc.texinfo: Ditto.
- * libm/*/aclocal.m4: Ditto.
- * libm/*/configure: Ditto.
- * libm/libm.texinfo: Ditto.
- * libc/sys/linux/shared.ld: Add VERS_1.18
-
-2009-12-17 Jeff Johnston <jjohnstn@redhat.com>
-
- * libc/include/_syslist.h: Add _mkdir transform.
-
-2009-12-17 Jerker Back <jerker.back@gmail.com>
-
- * libc/iconv/lib/local.h[!__GNUC__]: Add alternative version of
- ICONV_ZERO_MB_STATE_T macro.
- * libc/iconv/lib/ucsconv.c (ucs_based_conversion_get_state): Use
- temporary local variable nullstate to hold empty mbstate_t.
-
-2009-12-17 Jerker Back <jerker.back@gmail.com>
-
- * libc/include/_ansi.h: Add new _EXFNPTR macro for using with
- function pointer arguments.
- * libc/iconv/lib/conv.h: Use _EXFNPTR rather than _EXPARM macro.
- * libc/iconv/lib/ucsconv.h: Ditto.
- * libc/include/stdlib.h: Use new _EXFNPTR macro for function pointers.
- * libc/include/sys/reent.h: Ditto.
- * libc/include/sys/unistd.h: Ditto.
- * libc/search/bsearch.c: Ditto.
- * libc/stdio/fseek.c: Ditto.
- * libc/stdio64/fseeko64.c: Ditto.
- * libc/stdlib/atexit.c: Ditto.
- * libc/stdlib/on_exit.c: Ditto.
-
-2009-12-17 Ralf Corsépius <ralf.corsepius@rtems.org>
-
- * libc/include/machine/ieeefp.h: Rework __IEEE_*_ENDIAN handling.
- * libc/machine/arm/machine/endian.h: Remove (Conflicts with
- libc/include/machine/endian.h)
-
-2009-12-17 Ralf Corsépius <ralf.corsepius@rtems.org>
-
- * libc/include/machine/setjmp.h: Set up _JBLEN #ifdef __m68k__.
-
-2009-12-17 Ralf Corsepius <ralf.corsepius@rtems.org>
-
- * libc/include/pthread.h: Add pthread_atfork, pthread_rwlock_unlock
- * libc/include/sys/stat.h: Use struct timespec st_*tim,
- blksize_t st_blksize, blkcnt_t st_blocks.
- Add st_*time compatibility macros.
-
-2009-12-16 Joel Sherrill <joel.sherrill@oarcorp.com>
-
- * libc/sys/rtems/machine/param.h: Only use sizeof(double) -1
- for ALIGNBYTES on SPARC.
-
-2009-12-16 Jeff Johnston <jjohnstn@redhat.com>
-
- * libc/include/sys/errno.h: Move EHOSTDOWN, EPFNOSUPPORT,
- and ETOOMANYREFS into general list as they are referenced
- by OpenGroup and needed by RTEMS.
-
-2009-12-16 Ralf Corsépius <ralf.corsepius@rtems.org>
-
- * libc/search/hcreate.c: Don't include <sys/queue.h> (Unused).
-
-2009-12-16 Ralf Corsépius <ralf.corsepius@rtems.org>
-
- * libc/sys/rtems/machine/_types.h: New (Derived from
- machine/_default_types.h).
- * libc/sys/rtems/crt0.c: Rework. Introduce macro RTEMS_STUB.
- * libc/sys/rtems/sys/param.h:
- Update copyright notice from FreeBSD.
- Remove HZ.
- Add #include <sys/priority.h>
- Remove priority handling (moved to sys/priority.h).
- Remove CLBYTES (Unused, abandoned in BSD).
- * libc/sys/rtems/sys/queue.h: Update copyright (from FreeBSD).
- Remove CIRCLEQ_*.
-
-2009-12-15 Conny Marco Menebrocker <c-m-m@gmx.de>
-
- * libc/machine/xc16x/Makefile.am: Fix typo and refer
- to puts.c instead of putc.c.
- * libc/machine/xc16x/Makefile.in: Regenerated.
-
-2009-12-14 Maxim Kuvyrkov <maxim@codesourcery.com>
-
- * libc/machine/m68k/memcpy.S: Patch to support
- boards which do not support unaligned read/write.
-
-2009-12-10 Conny Marco Menebrocker <c-m-m@gmx.de>
-
- * configure.host: Add xc16x support.
- * libc/include/machine/ieeefp.h: Ditto.
- * libc/include/sys/config.h: Ditto.
- * libc/machine/configure.in: Ditto.
- * libc/machine/Makefile.in: Regenerated.
- * libc/machine/aclocal.m4: Ditto.
- * libc/machine/configure: Ditto.
- * libc/machine/xc16x/Makefile.am: New file.
- * libc/machine/xc16x/Makefile.in: Ditto.
- * libc/machine/xc16x/aclocal.m4: Ditto.
- * libc/machine/xc16x/configure: Ditto.
- * libc/machine/xc16x/configure.in: Ditto.
- * libc/machine/xc16x/putchar.c: Ditto.
- * libc/machine/xc16x/puts.c: Ditto.
- * libc/machine/xc16x/setjmp.S: Ditto.
-
-2009-12-08 Eric Blake <ebb9@byu.net>
-
- Fix some *at declarations.
- * libc/include/stdio.h (symlinkat): Move this...
- * libc/include/sys/_default_fcntl.h (unlinkat): ...and this...
- * libc/include/sys/unistd.h (symlinkat, unlinkat): ...here, to
- match POSIX.
-
-2009-12-03 Craig Howland <howland@LGSInnovations.com>
-
- * libc/stdlib/strtod.c: Correct "NO_REENT" to "_REENT_ONLY".
- * libc/stdlib/wcstod.c: Ditto.
- * libc/stdlib/dtoastub.c: Ditto.
-
-2009-11-23 Corinna Vinschen <corinna@vinschen.de>
-
- Use NetBSD fix for CVE-2009-0689 security vulnerability.
- * libc/include/sys/reent.h (_Kmax): Define here based on the sizeof
- size_t, as in latest NetBSD.
- * libc/reent/reent.c (_reclaim_reent): Use _Kmax rather than constant
- value 15.
- * libc/stdlib/mprec.c (_Kmax): Don't define here. Explain why.
-
-2009-11-20 Nick Clifton <nickc@redhat.com>
-
- * libc/machine/rx/strncat.S (_strncat): Replace use of r6
- (call-saved) with r14 (call-used).
-
-2009-11-18 Dave Korn <dave.korn.cygwin@googlemail.com>
-
- * libm/machine/i386/f_tan.S (_f_tan): Free fp stack register
- containing useless constant before advancing fp sp over it.
- (_f_tanf): Likewise.
-
-2009-11-18 Corinna Vinschen <corinna@vinschen.de>
-
- * libc/stdio/vfprintf.c: Include ../stdlib/local.h. Replace call to
- _mbtowc_r with direct call to __mbtowc.
- * libc/stdio/vfscanf.c: Ditto.
- * libc/stdlib/btowc.c: Include local.h. Replace call to _mbtowc_r
- with direct call to __mbtowc.
- * libc/stdlib/mblen.c: Ditto.
- * libc/stdlib/mblen_r.c: Ditto.
- * libc/stdlib/mbrtowc.c: Ditto.
- * libc/stdlib/mbstowcs_r.c: Ditto.
- * libc/stdlib/mbtowc.c: Ditto.
- * libc/stdlib/wcrtomb.c: Include local.h. Replace call to _wctomb_r
- with direct call to __wctomb.
- * libc/stdlib/wcsnrtombs.c: Ditto.
- (_wcsnrtombs_r): Ditto.
- * libc/stdlib/wcstombs_r.c: Ditto.
- * libc/stdlib/wctob.c: Ditto.
- * libc/stdlib/wctomb.c: Ditto.
-
- * libc/stdlib/mbrtowc.c (mbrtowc): Implement independently from
- _mbrtowc_r, unless PREFER_SIZE_OVER_SPEED or __OPTIMIZE_SIZE__ are
- defined.
- * libc/stdlib/wcrtomb.c (wcrtomb): Implement independently from
- _wcrtomb_r, unless PREFER_SIZE_OVER_SPEED or __OPTIMIZE_SIZE__ are
- defined.
-
- * libc/stdlib/mbtowc_r.c (__utf8_mbtowc): Drop unnecessary test for
- ch >= 0.
-
-2009-11-17 Yaakov Selkowitz <yselkowitz@users.sourceforge.net>
-
- * libm/common/fdlibm.h (logb, logbf): Move decls from here...
- * libc/include/math.h (logb, logbf): ...to here.
-
-2009-11-06 Jon Turney <jon.turney@dronecode.org.uk>
-
- * libc/include/ctype.h (__ctype_lookup): Fix precedence.
-
-2009-10-30 Corinna Vinschen <corinna@vinschen.de>
-
- * libc/stdio/fflush.c (_fflush_r): Store old errno to check for
- low-level seek error condition. Restore old errno in case of
- success. Don't use new position after seek as error condition,
- rather check for return value of -1 and errno. Handle EINVAL
- just like ESPIPE. Only set fp->_offset if errno is 0.
-
-2009-10-27 Nick Clifton <nickc@redhat.com>
-
- * MAINTAINERS (ARM): Add myself as an ARM maintainer.
-
-2009-10-26 DJ Delorie <dj@redhat.com>
-
- * configure.host: Add support for RX architecture.
- * libc/include/machine/ieeefp.h: Likewise.
- * libc/include/machine/setjmp.h: Likewise.
- * libc/include/machine/configure.in: Likewise.
- * libc/include/machine/configure: Regenerate.
- * libc/machine/rx: New directory.
- * libc/machine/rx/*: New files to support RX architecture.
-
-2009-10-24 Eric Blake <ebb9@byu.net>
-
- * libc/include/ctype.h (__ctype_lookup): New macro.
- (isalpha, isupper, islower, isdigit, isxdigit, isspace, ispunct)
- (isalnum, isprint, isgraph, iscntrl, isblank): Use it to fix bug
- on 64-bit machines.
-
-2009-10-20 Jeff Johnston <jjohnstn@redhat.com>
-
- * configure.host: Don't set -O2 flag in newlib_cflags. Leave
- that to CFLAGS.
- * acinclude.m4: Don't reset CFLAGS before calling _AC_PROG_CC_G
- as it sets the same flags as we are using.
- * aclocal.m4: Regenerated.
- * configure: Ditto.
- * Makefile.in: Ditto.
- * iconvdata/aclocal.m4: Ditto.
- * iconvdata/configure: Ditto.
- * iconvdata/Makefile.in: Ditto.
- * doc/aclocal.m4: Ditto.
- * doc/configure: Ditto.
- * doc/Makefile.in: Ditto.
- * libc/aclocal.m4: Ditto.
- * libc/configure: Ditto.
- * libc/Makefile.in: Ditto.
- * libc/*Makefile.in: Ditto.
- * libc/*aclocal.m4: Ditto.
- * libc/*configure: Ditto.
- * libm/*Makefile.in: Ditto.
- * libm/*aclocal.m4: Ditto.
- * libm/*configure: Ditto.
-
-2009-10-16 Jeff Johnston <jjohnstn@redhat.com>
-
- * libc/include/sys/config.h[__CYGWIN__]: Set __USE_XOPEN2K flag
- if not __STRICT_ANSI__ or stdc version C99 or greater.
- * libc/include/stdio.h[__STRICT_ANSI__]: Add __USE_XOPEN2K check
- for fseeko and ftello prototypes.
-
-2009-10-15 Corinna Vinschen <corinna@vinschen.de>
-
- * libc/include/wchar.h (struct tm0: Declare as incomplete type.
-
-2009-10-15 Corinna Vinschen <corinna@vinschen.de>
-
- * libc/locale/nl_langinfo.c (nl_langinfo): Add Cygwin-specific temporary
- exception for KOI8 charsets.
-
-2009-10-13 Eric Blake <ebb9@byu.net>
-
- * libc/include/sys/unistd.h: Add _PC*, _CS*, and _SC* constants
- new to POSIX 2008.
-
-2009-10-13 Yaakov Selkowitz <yselkowitz@users.sourceforge.net>
-
- * libc/include/sys/signal.h: Include <sys/types.h> always.
- [__CYGWIN__, __rtems__]: Define kill first argument as pid_t per
- standards.
-
-2009-10-09 Dave Korn <dave.korn@artimi.com>
-
- * libc/include/sys/time.h (_TIMEVAL_DEFINED): Define when
- defining struct timeval.
-
-2009-10-09 Corinna Vinschen <corinna@vinschen.de>
-
- * libc/locale/locale.c (DEFAULT_LOCALE): New define.
- (__default_locale): New global variable set to the default locale.
- (__get_locale_env): Return __default_locale rather than fixed "C".
-
-2009-10-08 Jeff Johnston <jjohnstn@redhat.com>
-
- * configure.host: For RTEMS, define HAVE_ASSERT_FUNC.
- * libc/stdlib/assert.c (_assert_func): Do not specify
- __assert_func if HAVE_ASSERT_FUNC flag is set.
-
-2009-10-08 Eric Blake <ebb9@byu.net>
-
- * libc/include/getopt.h (__getopt_r, __getopt_long_r)
- (__getopt_long_only_r): Protect declarations, to avoid compiler
- warning.
-
-2009-10-07 Corinna Vinschen <corinna@vinschen.de>
-
- * libc/locale/nl_langinfo.c (nl_langinfo): Just return current locale
- charset on Cygwin.
-
-2009-10-03 Corinna Vinschen <corinna@vinschen.de>
-
- * libc/stdlib/mbtowc_r.c (__utf8_mbtowc): Allow CESU-8 surrogate
- value encoding.
- * libc/stdlib/wctomb_r.c (__utf8_mbtowc): Allow CESU-8 surrogate
- value decoding.
-
-2009-09-29 Corinna Vinschen <corinna@vinschen.de>
-
- * libc/locale/locale.c (loadlocale): Allow "C." same as "C-" as locale
- prefix. Add some words to documentation.
-
-2009-09-29 Corinna Vinschen <corinna@vinschen.de>
-
- * libc/stdlib/sb_charsets.c: Throughout, translate undefined
- characters to their corresponding Windows Unicode value.
-
-2009-09-28 Michael Eager <eager@eagercon.com>
-
- * configure.host: Add microblaze.
- * libc/include/machine/ieeefp.h [MICROBLAZE]: Define __IEEE_BIG_ENDIAN.
- * libc/include/machine/setjmp.h [MICROBLAZE]: Define _JBLEN, _JBTYPE.
- * libc/include/sys/config.h [MICROBLAZE]: Define _REENT_SMALL,
- _UNIX98_THREAD_MUTEX_ATTRIBUTES.
- * libc/include/sys/types.h: Treat XMK like rtems, define
- PTHREAD_MUTEX_NORMAL, PTHREAD_MUTEX_ERRORCHECK, PTHREAD_MUTEX_RECURSIVE,
- PTHREAD_MUTEX_DEFAULT, PTHREAD_STACK_MIN, define stuct pthread_attr_s.
- * libc/machine/configure.in: Add microblaze.
- * libc/machine/configure: Add microblaze (not regenerated).
- * libc/machine/microblaze/configure.in: NEW.
- * libc/machine/microblaze/configure: Generate.
- * libc/machine/microblaze/Makefile.am: NEW.
- * libc/machine/microblaze/Makefile.in: Generate.
- * libc/machine/microblaze/{abort.c, strcmp.c, strcpy.c, strlen.c,
- mallocr.c, longjmp.S, setjmp.S}: NEW.
- * libc/stdlib/mallocr.c [MICROBLAZE]: Don't declare sbrk prototype,
- mALLOc(): return malloc value.
-
-2009-09-27 Corinna Vinschen <corinna@vinschen.de>
-
- * libc/locale/locale.c (lc_ctype_charset): Set to "UTF-8" on Cygwin.
- (lc_message_charset): Ditto.
- (loadlocale): Set charset of the "C" locale to "UTF-8" on Cygwin.
- * libc/stdlib/mbtowc_r.c (__mbtowc): Default to __utf8_mbtowc on
- Cygwin.
- * libc/stdlib/wctomb_r.c (__wctomb): Default to __utf8_wctomb on
- Cygwin.
-
-2009-09-26 Eric Blake <ebb9@byu.net>
-
- * libc/include/sys/unistd.h (execvpe, fexecve) [__CYGWIN__]:
- Add declarations.
-
-2009-09-24 Eric Blake <ebb9@byu.net>
-
- * libc/include/sys/unistd.h (eaccess, euidaccess) [__CYGWIN__]:
- Add declarations.
-
-2009-09-23 Corinna Vinschen <corinna@vinschen.de>
-
- * libc/locale/locale.c: Drop Cygwin-specific windows.h include.
- (loadlocale): Call __set_charset_from_codepage with 0 codepage.
-
-2009-09-22 Ralf Corsépius <ralf.corsepius@rtems.org>
-
- * libc/include/stdlib.h: Add posix_memalign.
-
-2009-09-22 Ralf Corsépius <ralf.corsepius@rtems.org>
-
- * configure.host (*-rtems*): Remove -DMISSING_SYSCALL_NAMES.
- Add -DHAVE_BLKSIZE, -D_NO_WORDEXP -D_NO_POPEN.
-
-2009-09-22 Ralf Corsépius <ralf.corsepius@rtems.org>
-
- * configure.host (m32c): Move setting -DABORT_PROVIDED to second
- "case $host".
-
-2009-09-18 Christopher Faylor <me+cygwin@cgf.cx>
-
- * libc/include/sys/unistd.h: Declare getpagesize as returning
- POSIX-mandated int.
- * libc/sys/linux/sys/unistd.h: Ditto.
-
-2009-08-31 Takaki Makino <t@snowelm.com>
-
- * libm/machine/i386/f_pow.c(_f_pow): Alter ASM so it works with
- newer gcc versions.
- * libm/maachine/i386/f_powf.c(_f_powf): Ditto.
-
-2009-08-25 Andy Koppe <andy.koppe@gmail.com>
-
- * libc/stdlib/sb_charsets.c (__micro_atoi): Allow five-digit codepage
- numbers.
- * libc/locale/locale.c (loadlocale): Set MB_CUR_MAX to 1 for KOI8
- charsets.
- * libc/stdlib/local.h (__cp_conv): Remove incorrect number of codepages.
-
-2009-08-24 Corinna Vinschen <corinna@vinschen.de>
-
- * libc/locale/locale.c: Update documentation.
- (loadlocale): Map "KOI8-R" and "KOI8-U" to CP20866 and CP21866.
-
-2009-08-24 Andy Koppe <andy.koppe@gmail.com>
-
- * libc/stdlib/sb_charsets.c (__cp_conv): Add KOI8-R (Russian, CP20866)
- and KOI8-U (Ukrainian, CP21866) to Windows codepage conversion tables.
- * libc/ctype/ctype_cp.h (__ctype_cp): Likewise for ctype tables.
-
-2009-08-24 Andy Koppe <andy.koppe@gmail.com>
-
- * libc/ctype/iswspace.c (iswspace): Include "non-breaking
- space" (U+00A0).
- * libc/ctype/iswblank.c (iswblank): Likewise.
-
-2009-08-21 Corinna Vinschen <corinna@vinschen.de>
-
- * libc/locale/locale.c (loadlocale): Throughout check charset string
- case insensitive and store internal charset string uppercased. Allow
- "UTF8" additionally to "UTF-8". Add this change to documentation.
-
-2009-08-21 Eric Blake <ebb9@byu.net>
-
- * libc/include/iconv.h (iconv): Match POSIX prototype.
- * libc/iconv/lib/iconv.c (iconv): Likewise.
-
-2009-08-21 Craig Howland <howland@LGSInnovations.com>
-
- * libm/common/s_remquo.c (remquo): Fix sign of quotient when |x|==|y|.
- * libc/stdio/mktemp.c: Add #include <stdlib.h> for function prototypes.
-
-2009-08-19 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
-
- * iconvdata/Makefile.am (all): Remove.
- * libc/sys/a29khif/Makefile.am (all-am): Rename from ...
- (all): ... this.
- * libc/sys/arc/Makefile.am: Likewise.
- * libc/sys/arm/Makefile.am: Likewise.
- * libc/sys/d10v/Makefile.am: Likewise.
- * libc/sys/decstation/Makefile.am: Likewise.
- * libc/sys/h8300hms/Makefile.am: Likewise.
- * libc/sys/h8500hms/Makefile.am: Likewise.
- * libc/sys/linux/Makefile.am: Likewise.
- * libc/sys/linux/machine/i386/Makefile.am: Likewise.
- * libc/sys/m88kbug/Makefile.am: Likewise.
- * libc/sys/mmixware/Makefile.am: Likewise.
- * libc/sys/netware/Makefile.am: Likewise.
- * libc/sys/rdos/Makefile.am: Likewise.
- * libc/sys/rtems/Makefile.am: Likewise.
- * libc/sys/sh/Makefile.am: Likewise.
- * libc/sys/sparc64/Makefile.am: Likewise.
- * libc/sys/sun4/Makefile.am: Likewise.
- * libc/sys/sysmec/Makefile.am: Likewise.
- * libc/sys/sysnec810/Makefile.am: Likewise.
- * libc/sys/sysnecv850/Makefile.am: Likewise.
- * libc/sys/sysvi386/Makefile.am: Likewise.
- * libc/sys/sysvnecv70/Makefile.am: Likewise.
- * libc/sys/tic80/Makefile.am: Likewise.
- * libc/sys/w65/Makefile.am: Likewise.
- * libc/sys/z8ksim/Makefile.am: Likewise.
- * iconvdata/Makefile.in: Regenerate.
- * libc/sys/a29khif/Makefile.in: Likewise.
- * libc/sys/arc/Makefile.in: Likewise.
- * libc/sys/arm/Makefile.in: Likewise.
- * libc/sys/d10v/Makefile.in: Likewise.
- * libc/sys/decstation/Makefile.in: Likewise.
- * libc/sys/h8300hms/Makefile.in: Likewise.
- * libc/sys/h8500hms/Makefile.in: Likewise.
- * libc/sys/linux/Makefile.in: Likewise.
- * libc/sys/linux/machine/i386/Makefile.in: Likewise.
- * libc/sys/m88kbug/Makefile.in: Likewise.
- * libc/sys/mmixware/Makefile.in: Likewise.
- * libc/sys/netware/Makefile.in: Likewise.
- * libc/sys/rdos/Makefile.in: Likewise.
- * libc/sys/rtems/Makefile.in: Likewise.
- * libc/sys/sh/Makefile.in: Likewise.
- * libc/sys/sparc64/Makefile.in: Likewise.
- * libc/sys/sun4/Makefile.in: Likewise.
- * libc/sys/sysmec/Makefile.in: Likewise.
- * libc/sys/sysnec810/Makefile.in: Likewise.
- * libc/sys/sysnecv850/Makefile.in: Likewise.
- * libc/sys/sysvi386/Makefile.in: Likewise.
- * libc/sys/sysvnecv70/Makefile.in: Likewise.
- * libc/sys/tic80/Makefile.in: Likewise.
- * libc/sys/w65/Makefile.in: Likewise.
- * libc/sys/z8ksim/Makefile.in: Likewise.
-
- * configure.in (newlib_cv_ldbl_eq_dbl): Rename cache variable
- from newlib_ldbl_eq_dbl.
- * configure: Regenerate.
-
-2009-08-19 Eric Blake <ebb9@byu.net>
-
- * libc/Makefile.am (SUBDEFS): Correctly build popen docs.
- * libc/libc.texinfo (Top): Add posix node to menu.
-
-2009-08-18 Jeff Johnston <jjohnstn@redhat.com>
-
- * newlib.hin: Add comment regarding file being manually edited.
- * Makefile.am: Add no-op rule for newlib.hin.
- * Makefile.in: Regenerated.
-
-2009-08-18 Jeff Johnston <jjohnstn@redhat.com>
-
- * acconfig.h: Add templates for _HAVE_LONG_DOUBLE and _LDBL_EQ_DBL.
-
-2009-08-18 Eric Blake <ebb9@byu.net>
-
- * libc/posix/popen.c (popen): Fix documented prototype.
-
- Improve popen compatibility with glibc.
- * libc/posix/popen.c (popen): The 2006-08-22 change to use
- FD_CLOEXEC disagrees with other implementations; instead, use
- pidlist to work even when fcntl is not available. Meanwhile,
- support the 'e' modifier to set CLOEXEC, as in glibc. Drop
- cygwin-specific code, now that cygwin has its own version.
- * libc/posix/Makefile.am (CHEWOUT_FILES): Document popen.
- * libc/posix/posix.tex: New file.
-
-2009-08-17 Craig Howland <howland@LGSInnovations.com>
-
- * libc/string/wcsncpy.c (wcsncpy): Re-write function based on small
- version of strncpy() (fixing two bugs).
-
-2009-08-13 Corinna Vinschen <corinna@vinschen.de>
-
- * libc/stdio/mktemp.c (mkdtemp): Fix typo in function name.
-
-2009-08-12 Jeff Johnston <jjohnstn@redhat.com>
-
- * libc/stdio/mktemp.c (_gettemp): Do not call _mkdir_r unless
- HAVE_MKDIR is defined.
-
-2009-08-12 Hans-Peter Nilsson <hp@axis.com>
-
- * libc/include/reent.h: Add prototype and definition of _mkdir_r.
- * libc/reent/Makefile.am (GENERAL_SOURCES): Add mkdirr.c.
- (CHEWOUT_FILES): Add mkdirr.def.
- * libc/reent/Makefile.in: Regenerate.
- * libc/reent/mkdirr.c: New file.
-
-2009-08-10 Jeff Johnston <jjohnstn@redhat.com>
-
- * libc/stdlib/wcstombs.c: Change documentation to specify size_t
- return type instead of int.
-
-2009-07-29 Jeff Johnston <jjohnstn@redhat.com>
-
- * libc/stdlib/a64l.c: Fix to use 'a' instead of 'A' in calculation
- when a lower-case character is detected.
-
-2009-07-29 Corinna Vinschen <corinna@vinschen.de>
-
- * libc/stdlib/mbtowc_r.c (__utf8_mbtowc): Rework UTF-16 surrogate
- pair handling to be more bullet-proof even with incomplete UTF-8
- sequences. Add check for 4 byte sequences resulting in values
- outside the valid Unicode range. Add a comment to clarify checking
- for invalid CESU-8 sequences.
-
-2009-07-28 Corinna Vinschen <corinna@vinschen.de>
-
- * libc/stdlib/mbtowc_r.c (__utf8_mbtowc): Fix incrementing n in case
- of handling incomplete sequences.
-
-2009-07-22 Eric Blake <ebb9@byu.net>
-
- Avoid a fault from locking a closed standard file.
- * libc/stdio/fflush.c (_fflush_r): Give up early if stream has
- been previously closed.
-
-2009-07-09 Craig Howland <howland@LGSInnovations.com>
-
- * libm/math/ef_scalb.c: Replace isnanf() (pre-C99 function call) with
- isnan() (C99 macro).
- * libm/math/wf_log.c: Ditto.
- * libm/math/wf_j0.c: Ditto.
- * libm/math/wf_sqrt.c: Ditto.
- * libm/math/wf_pow.c: Ditto.
- * libm/math/wf_fmod.c: Ditto.
- * libm/math/wf_remainder.c: Ditto.
- * libm/math/wf_scalb.c: Ditto.
- * libm/math/wf_atanh.c: Ditto.
- * libm/math/wf_cosh.c: Ditto.
- * libm/math/wf_acos.c: Ditto.
- * libm/math/wf_acosh.c: Ditto.
- * libm/math/wf_jn.c: Ditto.
- * libm/math/wf_log10.c: Ditto.
- * libm/math/wf_asin.c: Ditto.
- * libm/math/wf_j1.c: Ditto.
- * libm/common/sf_isnan.c: Add #include <ieeefp.h>, fix comment.
- * libm/common/sf_isinf.c: Add #include <ieeefp.h>, adjust comment to
- match that from s_isinf.c.
- * libc/include/machine/ieeefp.h: Simplify isinf and isnan macros to
- remove un-necessary extension use (in a similar manner to as was
- recently done in math.h).
- * libc/include/math.h: Remove isnanf and isinff prototypes (are in
- ieeefp.h).
- * libm/machine/spu/sf_isinf.c: Fix comment (remove <math.h>).
-
-2009-07-06 Joel Sherrill <joel.sherrill@oarcorp.com>
-
- * libc/include/sys/features.h: Enable UNIX98 mutex attributes
- for RTEMS.
-
-2009-07-03 Eric Blake <ebb9@byu.net>
-
- Add mkdtemp, mkstemps.
- * libc/stdio/mktemp.c: Fix documentation.
- (_gettemp): Add domkdir and length parameters. Check for
- insufficient 'X' suffix. Drop cygwin-specific code.
- (_mkstemp_r, _mktemp_r, mkstemp, mktemp): Adjust clients.
- (_mkdtemp_r, _mkstemps_r, mkdtemp, mkstemps): New functions.
- * libc/include/stdlib.h (_mkdtemp_r, _mkstemps_r, mkdtemp)
- (mkstemps): Declare them.
-
- Add fpurge.
- * libc/stdio/fpurge.c (fpurge, _fpurge_r): New file.
- * libc/stdio/Makefile.am (ELIX_4_SOURCES, CHEWOUT_FILES, fpurge):
- Build it.
- * libc/stdio/Makefile.in: Regenerated.
- * libc/include/stdio.h (fpurge, _fpurge_r): New declarations.
- * libc/stdio/stdio.tex: Build documentation.
-
-2009-06-23 Jeff Johnston <jjohnstn@redhat.com>
-
- * Makefile.am (MATHOBJS_IN_LIBC): Add s_fpclassify and
- sf_fpclassify as these are now used for infinity testing.
- * Makefile.in: Regenerated.
-
-2009-06-19 Joel Sherrill <joel.sherrill@oarcorp.com>
-
- * libc/sys/rtems/machine/param.h: Change ALIGNBYTES
- so it can point to an aligned structure or double.
-
-2009-06-18 Corinna Vinschen <corinna@vinschen.de>
-
- * libc/locale/locale.c (loadlocale): Add handling of "@cjknarrow"
- modifier on _MB_CAPABLE targets. Add comment to explain. Improve
- documentation.
-
-2009-06-17 Michael Eager <eager@eagercon.com>
-
- * libc/include/pthread.h: Support XMK (Xilinx) BSP, add RTEMS to
- PTHREAD_MUTEX_NORMAL.
- * libc/include/sys/features.h: Same.
- * libc/include/sys/types.h: Same.
-
-2009-06-16 Corinna Vinschen <corinna@vinschen.de>
-
- * libc/include/locale.h (struct lconv): Add missing members required
- by POSIX.1-2008.
- * libc/locale/locale.c (lconv): Initialize new members to default
- values in "C" locale.
-
-2009-06-16 Corinna Vinschen <corinna@vinschen.de>
-
- * libc/stdio/vfprintf.c (_VFPRINTF_R): Use actual length of
- radix char instead of assuming length 1.
- * libc/stdlib/gdtoa-gethex.c: Remove use of USE_LOCALE.
- (gethex): Allow multibyte decimal point.
- Fix compiler warnings due to different signedness of pointer types.
- * libc/stdlib/strtod.c: Remove use of USE_LOCALE.
- (_strtod_r): Allow multibyte decimal point.
- * libc/stdlib/wcstod.c (_wcstod_r): Evaluate correct wide char
- endptr position if the decimal point is a multibyte char.
-
-2009-06-16 Craig Howland <howland@LGSInnovations.com>
-
- * libc/ctype/local.h (__locale_charset): Add arguments to
- prototype
- * libc/stdlib/local.h (__locale_charset): Ditto.
-
-2009-06-16 Craig Howland <howland@LGSInnovations.com>
-
- * libc/include/math.h: Simplify fpclassify, isinf, isnan, and signbit
- macros to remove un-necessary extension use. isinf and isnan also
- changed to use fpclassify. isfinite macro modified to run faster by
- only calling fpclassify once instead of possibly twice.
-
-2009-06-09 Corinna Vinschen <corinna@vinschen.de>
-
- * libc/ctype/tolower.c (tolower): Cast conversion result from
- mbtowc/wctomb to unsigned char to avoid negative return values.
- * libc/ctype/toupper.c (toupper): Ditto.
-
-2009-06-03 IWAMURO Motonori <deenheart@gmail.com>
-
- * libc/string/wcwidth.c: Optimize for speed.
-
-2009-06-03 Corinna Vinschen <corinna@vinschen.de>
-
- * libc/locale/locale.c (lc_ctype_cjk_lang): New static int.
- (loadlocale): In case of setting LC_CTYPE, set lc_ctype_cjk_lang
- to 1 if the language is "jp", "ko", or "zh", to 0 otherwise.
- (__locale_cjk_lang): New function.
- * libc/string/local.h (__locale_cjk_lang): Declare.
- * libc/string/wcwidth.c: Fix comments.
- (__wcwidth): Handle CJK Ambiguous Width characters according
- to setting returned by __locale_cjk_lang.
-
-2009-06-02 Richard Earnshaw <rearnsha@arm.com>
-
- * libc/include/sys/config.h: Remove specification of _REENT_SMALL for
- thumb2.
-
-2009-06-02 IWAMURO Motonori <deenheart@gmail.com>
-
- * libc/ctype/jp2uc.c: Skip all definition if defined __CYGWIN__.
- (__jp2uc): Change the scope to static function.
- * libc/ctype/local.h (_jp2uc): Define as macro if defined __CYGWIN__.
- * libc/string/local.h (_jp2uc): Include ../ctype/local.h.
-
-2009-05-27 Neal H. Walfield <neal@gnu.org>
-
- * libc/include/machine/setjmp.h (sigjmp_buf): Size according to
- _JBTYPE and the size of sigset_t.
-
-2009-05-15 Craig Howland <howland@LGSInnovations.com>
-
- * configure.in: Add configuration test for long double type existing
- and set flag _HAVE_LONG_DOUBLE if true. Fix INIT_ARRAY (.init_array)
- and _LDBL_EQ_DBL tests to not link so that will work with
- cross-compilers.
- * configure: Regenerated.
- * Makefile.in: Ditto.
- * newlib.hin: Add _HAVE_LONG_DOUBLE flag.
- * libc/include/math.h: Change non-builtin defines for HUGE_VAL,
- HUGE_VALF, and HUGE_VALL to be constant expressions. Add definitions
- for the non-builtin case for INFINITY and NAN. Gate HUGE_VALL and
- union __ldmath definitions with (new) _HAVE_LONG_DOUBLE.
- *libm/common/s_infconst.c: Change definitions to use values from
- float.h instead of non-so-portable integer forms. Mark as being
- deprecated (because now removed from math.h, are not used anywhere
- in Newlib, itself).
-
-2009-05-15 Corinna Vinschen <corinna@vinschen.de>
-
- * libc/string/local.h: New file.
- * libc/string/wcswidth.c (wcswidth): Convert japanese wide
- characters to Unicode here. Handle surrogate pairs for UTF-16
- systems. Call __wcwidth rather than wcwidth.
- * libc/string/wcwidth.c: New implementation using Markus Kuhn's
- wcwidth implementation for Unicode.
- (bisearch): New static function.
- (__wcwidth): New function. Take wint_t rather than wchar_t as
- parameter to allow full Unicode handling on UTF-16 systems.
- Move old wcwidth implementation here for non-multibyte aware
- systems.
- (wcwidth): Convert japanese wide characters to Unicode here.
- Call __wcwidth rather than using iswprint/iswcntrl.
-
-2009-05-14 Corinna Vinschen <corinna@vinschen.de>
-
- * libc/ctype/local.h (JP_JIS, JP_SJIS, JP_EUCJP): Move definition
- to jp2uc.c.
- (__jp2uc): Remove declaration.
- (_jp2uc): Declare.
- * libc/ctype/jp2uc.c (JP_JIS, JP_SJIS, JP_EUCJP): Define.
- (__jp2uc): Remove Cygwin special case.
- (_jp2uc): New function. On Cygwin, just return c.
- * libc/ctype/iswalpha.c (iswalpha): Just call _jp2uc.
- * libc/ctype/iswblank.c (iswblank): Ditto.
- * libc/ctype/iswcntrl.c (iswcntrl): Ditto.
- * libc/ctype/iswprint.c (iswprint): Ditto.
- * libc/ctype/iswpunct.c (iswpunt): Ditto.
- * libc/ctype/iswspace.c (iswspace): Ditto.
- * libc/ctype/towlower.c (towlower): Ditto.
- * libc/ctype/towupper.c (towupper): Ditto.
-
-2009-05-13 Paul Brook <paul@codesourcery.com>
-
- * libc/machine/arm/setjmp.S: Don't bother saving IP. Copy SP to
- IP before saving. Likewise when restoring.
-
-2009-05-13 Paul Brook <paul@codesourcery.com>
-
- * libc/machine/arm/setjmp.S: Add ARMv6-M implementation.
-
-2009-05-13 Corinna Vinschen <corinna@vinschen.de>
-
- * libc/locale/locale.c (setlocale): Don't build on Cygwin.
-
-2009-05-11 Craig Howland <howland@LGSInnovations.com>
-
- * libm/machine/i386/f_llrint.c: Remove llrint() definition.
- * libm/machine/i386/f_llrintf.c: Remove llrintf() definition.
-
-2009-05-08 Nick Clifton <nickc@redhat.com>
-
- * MAINTAINERS: Add myself as a maintainer for the MN10300 and to
- the write-after-approval list.
-
-2009-04-30 Anthony Green <green@moxielogic.com>
-
- * MAINTAINERS: Add myself as moxie maintainer and to the
- write-after-approval list.
-
-2009-04-30 Eric Blake <ebb9@byu.net>
-
- Allow gcc warning for toupper even with extended charsets.
- * libc/include/ctype.h (toupper, tolower)
- [_MB_EXTENDED_CHARSETS_ISO]: Allow gcc warning when called with
- 'char' even when we must call the function for correct behavior.
- [!_MB_EXTENDED_CHARSETS_ISO]: Fix regression in result type.
-
-2009-04-24 Jeff johnston <jjohnstn@redhat.com>
-
- * libc/stdio/fgetc.c: Make sure sfp lock is acquired before the
- file lock and released before the file lock to avoid a deadlock
- scenario.
- * libc/stdio/fgets.c: Ditto.
- * libc/stdio/fgetwc.c: Ditto.
- * libc/stdio/fgetws.c: Ditto.
- * libc/stdio/fread.c: Ditto.
- * libc/stdio/fseek.c: Ditto.
- * libc/stdio/getc.c: Ditto.
- * libc/stdio/getdelim.c: Ditto.
- * libc/stdio/gets.c: Ditto.
-
-2009-04-24 Jeff johnston <jjohnstn@redhat.com>
-
- * configure.in: Add configuration test for long double equals dbl
- and set flag _LDBL_EQ_DBL if true.
- * configure: Regenerated.
- * newlib.hin: Add _LDBL_EQ_DBL flag.
- * libc/include/math.h: Use _LDBL_EQ_DBL flag instead of
- _HAVE_LDBL_MATH.
- * libc/include/stdlib.h: Use _LDBL_EQ_DBL flag instead of
- _HAVE_LDBL_STDLIB.
- * libc/common/local.h: Remove _LDBL_EQ_DBL flag setting.
- * libc/stdlib/local.h: Ditto.
-
-2009-04-24 Joseph Myers <joseph@codesourcery.com>
-
- * libc/include/stdint.h (UINTPTR_MAX): Define to __UINTPTR_MAX__
- if __UINTPTR_MAX__ defined.
-
-2009-04-24 Eric Blake <ebb9@byu.net>
-
- Be namespace clean in ctype.h.
- * libc/include/ctype.h (_tolower, _toupper, isalpha, isupper)
- (islower, isdigit, isxdigit, isspace, ispunct, isalnum)
- (isprint, isgraph, iscntrl, isblank, toupper, tolower)
- (isascii, toascii): Don't use 'c' as macro parameter name.
-
- Trigger gcc warning if isFoo macros are called with plain char.
- * libc/include/ctype.h (isalpha, isupper, islower, isdigit)
- (isxdigit, isspace, ispunct, isalnum, isprint, isgraph)
- (iscntrl, isblank, toupper, tolower): Rewrite to let 'gcc -Wall'
- warn when user calls macro with a char argument.
-
-2009-04-23 Mike Burgess <wizardsguild@earthlink.net>
-
- * libc/string/strcasecmp.c: Optimized rewrite.
- * libc/string/strncasecmp.c: Fix description.
- * libc/string/strlwr.c: Avoid passing signed char to tolower.
- * libc/string/strupr.c: Avoid passing signed char to tolower.
-
-2009-04-23 Paul Brook <paul@codesourcery.com>
- Kazu Hirata <kazu@codesourcery.com>
-
- * libc/stdlib/__atexit.c (__register_exitproc): Use weak reference
- to malloc. Allocate dynamically only if it is present.
- * libc/stdlib/__call_atexit.c (__call_exitprocs): Use weak
- reference to free. Call free only if it is present.
-
-2009-04-22 Anthony Green <green@moxielogic.com>
-
- * configure.host: Add moxie support.
- * libc/machine/configure.in: Add moxie support.
- * libc/machine/configure: Rebuilt.
- * libc/machine/moxie/aclocal.m4: New file.
- * libc/machine/moxie/configure: New file.
- * libc/machine/moxie/configure.in: New file.
- * libc/machine/moxie/Makefile.am: New file.
- * libc/machine/moxie/Makefile.in: New file.
- * libc/machine/moxie/setjmp.S: New file.
- * libc/include/machine/setjmp.h (_JBLEN): Define for moxie.
- * libc/include/machine/ieeefp.h: Add moxie support.
-
-2009-04-22 Kazu Hirata <kazu@codesourcery.com>
-
- * libc/stdio/local.h (__chclass, __state_table, __action_table):
- Add extern to the declarations.
- * libc/stdlib/local.h (__iso_8859_conv, __cp_conv): Likewise.
-
-2009-04-21 Corinna Vinschen <corinna@vinschen.de>
-
- * libc/ctype/ctype_.c (_CTYPE_DATA_128_255): Rename from
- _CTYPE_DATA_128_256.
- * libc/ctype/ctype_cp.h: Split off all character class values for
- character 255 from the rest of the definitions.
- (__ctype_cp): Use the new definitions. Make sure that the table
- always contains 0 for EOF (-1).
- * libc/ctype/ctype_iso.h: Ditto.
-
-2009-04-21 Sandra Loosemore <sandra@codesourcery.com>
-
- * libc/reent/impure.c (__sf_fake_stdin, __sf_fake_stdout)
- (__sf_fake_stderr): Declare locally with weak attribute.
-
-2009-04-21 Mark Mitchell <mark@codesourcery.com>
-
- * libc/include/_ansi.h: Move C++ defines to top of file.
- (_NOTHROW): New macro.
- (_EXFUN_NOTHROW): Likewise.
- * libc/include/stdlib.h (calloc): Declare with _EXFUN_NOTHROW.
- (free): Likewise.
- (malloc): Likewise.
- (realloc): Likewise.
- (_malloc_r): Likewise.
- (_callor_r): Likewise.
- (_free_r): Likewise.
- (_realloc_r): Likewise.
-
-2009-04-20 Jeff johnston <jjohnstn@redhat.com>
-
- * libc/include/math.h: Change _LDBL_EQ_DBL flag usage to
- be _HAVE_LDBL_MATH.
- * libc/include/stdlib.h: Change _LDBL_EQ_DBL flag usage to
- be _HAVE_LDBL_STDLIB.
-
-2009-04-17 Jeff johnston <jjohnstn@redhat.com>
-
- * libc/include/machine/ieeefp.h (_LDBL_EQ_DBL): Remove.
- * libc/stdlib/local.h (_LDBL_EQ_DBL): Add.
- * libc/stdlib/strtold.c: Include local.h.
- * libc/stdlib/wcstold.c: Likewise.
- * libm/common/atanl.c: Likewise.
- * libm/common/cosl.c: Likewise.
- * libm/common/sinl.c: Likewise.
- * libm/common/modfl.c: Likewise.
- * libm/common/frexpl.c: Likewise.
- * libm/common/tanhl.c: Likewise.
- * libm/common/tanl.c: Likewise.
- * libm/common/expm1l.c: Likewise.
- * libm/common/log1pl.c: Likewise.
- * libm/common/ceill.c: Likewise.
- * libm/common/fabsl.c: Likewise.
- * libm/common/floorl.c: Likewise.
- * libm/common/acosl.c: Likewise.
- * libm/common/asinl.c: Likewise.
- * libm/common/atan2l.c: Likewise.
- * libm/common/coshl.c: Likewise.
- * libm/common/expl.c: Likewise.
- * libm/common/fmodl.c: Likewise.
- * libm/common/hypotl.c: Likewise.
- * libm/common/ldexpl.c: Likewise.
- * libm/common/log10l.c: Likewise.
- * libm/common/logl.c: Likewise.
- * libm/common/powl.c: Likewise.
- * libm/common/sqrtl.c: Likewise.
- * libm/common/copysignl.c: Likewise.
- * libm/common/ilogbl.c: Likewise.
- * libm/common/nanl.c: Likewise.
- * libm/common/cbrtl.c: Likewise.
- * libm/common/asinhl.c: Likewise.
- * libm/common/nextafterl.c: Likewise.
- * libm/common/rintl.c: Likewise.
- * libm/common/scalbnl.c: Likewise.
- * libm/common/exp2l.c: Likewise.
- * libm/common/fdiml.c: Likewise.
- * libm/common/fmal.c: Likewise.
- * libm/common/fmaxl.c: Likewise.
- * libm/common/fminl.c: Likewise.
- * libm/common/lrintl.c: Likewise.
- * libm/common/lroundl.c: Likewise.
- * libm/common/nearbyintl.c: Likewise.
- * libm/common/remquol.c: Likewise.
- * libm/common/roundl.c: Likewise.
- * libm/common/scalblnl.c: Likewise.
- * libm/common/truncl.c: Likewise.
- * libm/common/acoshl.c: Likewise.
- * libm/common/atanhl.c: Likewise.
- * libm/common/erfcl.c: Likewise.
- * libm/common/erfl.c: Likewise.
- * libm/common/lgammal.c: Likewise.
- * libm/common/remainderl.c: Likewise.
- * libm/common/tgammal.c: Likewise.
- * libm/common/sinhl.c: Likewise.
- * libm/common/llroundl.c: Likewise.
- * libm/common/llrintl.c: Likewise.
- * libm/common/local.h: New file with _LDBL_EQ_DBL macro.
-
-2009-04-17 Ken Werner <ken.werner@de.ibm.com>
-
- * libc/include/machine/ieeefp.h: _LDBL_EQ_DBL check fixed.
- * libc/include/math.h (llrintl): Declare.
- * libm/common/llrintl.c: New File.
- * libm/common/Makefile.am: New File added.
- * libm/common/Makefile.in: Regenerate.
-
-2009-04-17 Ken Werner <ken.werner@de.ibm.com>
-
- * libc/configure.in: Change AC_TRY_COMPILE to AC_TRY_COMMAND to
- avoid executable test.
- * libc/configure: Regenerate.
-
-2009-04-17 Jeff johnston <jjohnstn@redhat.com>
-
- * configure.in: Remove _HAVE_ARRAY_ALIASING check.
- * configure: Regenerated.
- * Makefile.in: Regenerated.
- * newlib.hin: Remove _HAVE_ARRAY_ALIASING flag.
- * libc/ctype/ctype_.c: Do not check for _HAVE_ARRAY_ALIASING.
- * libm/configure.in: Change AC_TRY_COMPILE to AC_TRY_COMMAND to
- avoid executable test.
- * libm/configure: Regenerated.
-
-2009-04-16 Jeff johnston <jjohnstn@redhat.com>
-
- * libc/misc/init.c (__libc_fini_array): Process fini_array in
- reverse order as compliant with the ELF specification.
-
-2009-04-16 Ken Werner <ken.werner@de.ibm.com>
-
- * libc/machine/spu/Makefile.am: Add new File.
- * libc/machine/spu/Makefile.in: Regenerate.
- * libc/machine/spu/fdopen.c: New file.
-
-2009-04-16 Hans-Peter Nilsson <hp@axis.com>
-
- * libc/include/stdint.h (INTPTR_MIN, INTPTR_MAX, UINTPTR_MAX): Define.
-
-2009-04-16 Ken Werner <ken.werner@de.ibm.com>
-
- * libm/libm.texinfo: Add long double function support chapter.
- * libc/include/machine/ieeefp.h: Add _LDBL_EQ_DBL define.
- * libc/include/stdlib.h: Include <machine/ieeefp.h>.
- (strtold, wcstold): Declare.
- * libc/stdlib/strtold.c: New File.
- * libc/stdlib/wcstold.c: Likewise.
- * libc/configure.in: Add long double check.
- * libc/configure: Regenerate.
- * libc/stdlib/Makefile.am: Add strtold.c and wcstold.c.
- * libc/stdlib/Makefile.in: Regenerate.
- * libc/include/math.h (atanl, cosl, sinl, tanl, tanhl): Declare.
- (frexpl, modfl, ceill, fabsl, floorl, log1pl, expm1l, acosl): Ditto.
- (asinl, atan2l, coshl, sinhl, expl, ldexpl, logl, log10l, powl): Ditto.
- (sqrtl, fmodl, hypotl, copysignl, nanl, ilogbl, asinhl, cbrt): Ditto.
- (nextafterl, rintl, scalbnl, exp2l, scalblnl, tgammal): Ditto.
- (nearbyintl, lrintl, llrintl, roundl, lroundl, llround): Ditto.
- (llroundl, truncl, remquol, fdiml, fmaxl, fminl, fmal, acoshl): Ditto.
- (atanhl, remainderl, lgammal, erfl, erfcl): Ditto.
- * libm/common/atanl.c: New File.
- * libm/common/cosl.c: Likewise.
- * libm/common/sinl.c: Likewise.
- * libm/common/modfl.c: Likewise.
- * libm/common/frexpl.c: Likewise.
- * libm/common/tanhl.c: Likewise.
- * libm/common/tanl.c: Likewise.
- * libm/common/expm1l.c: Likewise.
- * libm/common/log1pl.c: Likewise.
- * libm/common/ceill.c: Likewise.
- * libm/common/fabsl.c: Likewise.
- * libm/common/floorl.c: Likewise.
- * libm/common/acosl.c: Likewise.
- * libm/common/asinl.c: Likewise.
- * libm/common/atan2l.c: Likewise.
- * libm/common/coshl.c: Likewise.
- * libm/common/expl.c: Likewise.
- * libm/common/fmodl.c: Likewise.
- * libm/common/hypotl.c: Likewise.
- * libm/common/ldexpl.c: Likewise.
- * libm/common/log10l.c: Likewise.
- * libm/common/logl.c: Likewise.
- * libm/common/powl.c: Likewise.
- * libm/common/sqrtl.c: Likewise.
- * libm/common/copysignl.c: Likewise.
- * libm/common/ilogbl.c: Likewise.
- * libm/common/nanl.c: Likewise.
- * libm/common/cbrtl.c: Likewise.
- * libm/common/asinhl.c: Likewise.
- * libm/common/nextafterl.c: Likewise.
- * libm/common/rintl.c: Likewise.
- * libm/common/scalbnl.c: Likewise.
- * libm/common/exp2l.c: Likewise.
- * libm/common/fdiml.c: Likewise.
- * libm/common/fmal.c: Likewise.
- * libm/common/fmaxl.c: Likewise.
- * libm/common/fminl.c: Likewise.
- * libm/common/lrintl.c: Likewise.
- * libm/common/lroundl.c: Likewise.
- * libm/common/nearbyintl.c: Likewise.
- * libm/common/remquol.c: Likewise.
- * libm/common/roundl.c: Likewise.
- * libm/common/scalblnl.c: Likewise.
- * libm/common/truncl.c: Likewise.
- * libm/common/acoshl.c: Likewise.
- * libm/common/atanhl.c: Likewise.
- * libm/common/erfcl.c: Likewise.
- * libm/common/erfl.c: Likewise.
- * libm/common/lgammal.c: Likewise.
- * libm/common/remainderl.c: Likewise.
- * libm/common/tgammal.c: Likewise.
- * libm/common/sinhl.c: Likewise.
- * libm/common/llroundl.c: Likewise.
- * libm/configure.in: Add long double check.
- * libm/configure: Regenerate.
- * libm/common/Makefile.am: Add new files.
- * libm/common/Makefile.in: Regenerate.
-
-2009-04-09 Corinna Vinschen <corinna@vinschen.de>
-
- * libc/ctype/ctype_.c (_CTYPE_DATA_0_127): Remove _B flag from TAB.
- * libc/ctype/ctype_cp.h: Mark non-cased letters in tables for codepages
- 720, 862, 874, 1255, and 1256 to _U|_L. Fix a couple of incorrect
- class mappings.
- * libc/ctype/ctype_iso.h: Mark non-cased letters in ISO-8859 tables
- 6, 8, and 11 to _U|_L. Fix a couple of incorrect class mappings.
- * libc/ctype/isblank.c (isblank): Special case TAB.
- * libc/ctype/islower.c (islower): Check explicitely for _L flag only
- in (_U|_L).
- * libc/ctype/isupper.c (isupper): Ditto, but check for _U flag.
- * libc/include/ctype.h (islower): Same in macro.
- (isupper): Ditto.
- (isblank): Special case TAB. Redefine macro for GCC only.
-
-2009-04-09 Corinna Vinschen <corinna@vinschen.de>
-
- * libc/stdlib/local.h (__mbtowc): Declare extern.
- (__wctomb): Ditto.
-
-2009-04-09 Corinna Vinschen <corinna@vinschen.de>
-
- * libc/stdlib/mbctype.h (_iseucjp1): Like _iseucjp, but also
- recognizes 0x8e and 0x8f lead bytes.
- (_iseucjp2): Rename from _iseucjp.
- * libc/stdlib/mbtowc_r.c (__eucjp_mbtowc): Convert JIS-X-0212
- triplebyte sequences as well.
- * libc/stdlib/wctomb_r.c (__eucjp_wctomb): Convert to JIS-X-0212
- triplebyte sequences as well.
-
-2009-04-08 Ken Werner <ken.werner@de.ibm.com>
-
- * configure.in: Add square brackets for the array aliasing conftest.
- * configure: Regenerate.
-
-2009-04-06 Mike Burgess <wizardsguild@earthlink.net>
-
- * libc/string/strncasecmp.c: Optimized rewrite.
-
-2009-04-06 Ken Werner <ken.werner@de.ibm.com>
-
- * libc/include/sys/features.h: Undefine _POSIX_TIMERS for spu.
- * libc/include/machine/time.h (nanosleep): Declare.
-
-2009-04-06 Corinna Vinschen <corinna@vinschen.de>
-
- * libc/locale/locale.c (loadlocale): Set mbc_max to 3 for EUCJP.
-
-2009-04-04 Corinna Vinschen <corinna@vinschen.de>
-
- * libc/stdlib/wcstombs.c: Fix datatypes in documentation.
-
-2009-04-04 Corinna Vinschen <corinna@vinschen.de>
-
- * libc/include/stdio.h (_ELIDABLE_INLINE): Move definition from here...
- * libc/include/_ansi.h (_ELIDABLE_INLINE): ..to here.
-
-2009-04-03 Yaakov Selkowitz <yselkowitz@users.sourceforge.net>
-
- * libc/include/stdio.h [__SCLE] (__sgetc_r): Prototype before define
- to avoid a warning with -Wmissing-prototypes.
-
-2009-04-03 Ken Werner <ken.werner@de.ibm.com>
-
- * libc/machine/spu/mmap_ea.c (mmap_ea): Check length argument.
-
-2009-04-03 Ken Werner <ken.werner@de.ibm.com>
-
- * libc/machine/spu/sys/linux_syscalls.h: include <sys/types.h>
- (linux_getpid, linux_gettid): Declare.
-
-2009-04-03 Ken Werner <ken.werner@de.ibm.com>
-
- * libc/machine/spu/spu-gmon.c: Tweaks to support simultaneous SPU
- profiling.
-
-2009-04-03 Ken Werner <ken.werner@de.ibm.com>
-
- * libc/include/math.h: Remove duplicate copysign prototype.
- Fix __math_68881 define typo. Guard functions of the rint family.
-
-2009-04-03 Craig Howland <howland@LGSInnovations.com>
-
- * libm/common/s_llrint.c: New file, implementing llrint().
- * libm/common/sf_llrint.c: New file, implementing llrintf().
- * libm/common/Makefile.am: Add s_llrint.c (src); sf_llrint.c (fsrc).
- * libm/common/Makefile.in: Regenerate.
-
-2009-04-02 Corinna Vinschen <corinna@vinschen.de>
-
- * libc/ctype/ctype_c.c: Move inclusion of ctype_iso.h and
- ctype_cp.h out of ALLOW_NEGATIVE_CTYPE_INDEX case.
- (__ctype_ptr__): Constify in !_MB_CAPABLE case. Otherwise,
- de-constify in !ALLOW_NEGATIVE_CTYPE_INDEX case, too. Add comment.
- (__set_ctype): Set __ctype_ptr__ pointer according to definition
- of ALLOW_NEGATIVE_CTYPE_INDEX.
- * libc/include/ctype.h (__ctype_ptr__): Constify in !_MB_CAPABLE case.
-
-2009-03-31 Corinna Vinschen <corinna@vinschen.de>
-
- * libc/ctype/Makefile.am: Remove _tolower.c and _toupper.c
- source files. Add a dependency rule for ctype_o to note
- changes in ctype_iso.h and ctype_cp.h.
- * libc/ctype/Makefile.in: Regenerate.
- * libc/ctype/_tolower.c: Remove file.
- * libc/ctype/_toupper.c: Remove file.
- * libc/ctype/ctype_.c: Make sure ALLOW_NEGATIVE_CTYPE_INDEX
- is always defined on Cygwin.
- (_ctype_b): Don't make `static const' on Cygwin.
- (ctype_iso.h): Include if _MB_EXTENDED_CHARSETS_ISO is set.
- (ctype_cp.h): Include if _MB_EXTENDED_CHARSETS_WINDOWS is set.
- (__ctype_ptr): Drop definition.
- (__ctype_ptr__): De-constify. Mark as __EXPORT symbol.
- (_ctype_): Add Cygwin-specifc asm define.
- (__set_ctype): New function to set __ctype_ptr__ according to
- current charset.
- * libc/ctype/ctype_cp.h: New file containing Windows codepage
- specific character class tables.
- * libc/ctype/ctype_iso.h: New file containing ISO-8859-x
- specific character class tables.
- * libc/ctype/tolower.c (tolower): Reimplement to support any singlebyte
- charset if one of the extended charsets is enabled.
- * libc/ctype/toupper.c (toupper): Ditto.
- * libc/include/ctype.h (_tolower): Define as macro per POSIX.
- (_toupper): Ditto.
- (__ctype_ptr__): De-constify.
- (toupper): Disable macro on systems supporting extended charsets.
- (tolower): Ditto.
- * libc/include/sys/config.h (__EXPORT): Define empty if not defined.
- * libc/locale/locale.c (__mb_cur_max): Mark as __EXPORT symbol.
- (__set_ctype): Declare unconditionally.
- (loadlocale): Remove __CYGWIN__ guard around __set_ctype call.
-
-2009-03-26 Corinna Vinschen <corinna@vinschen.de>
-
- * libc/locale/locale.c (loadlocale): Revert to charset "GBK" instead
- of "GB2312". Fix documentation accordingly.
-
-2009-03-26 Corinna Vinschen <corinna@vinschen.de>
-
- * libc/ctype/ctype_.c (_CTYPE_DATA_0_127): Mark TAB as blank character.
- * libc/ctype/isblank.c: Replace hardcoded test with test for having _B
- marker in ctype array.
- * libc/include/ctype.h (isblank): Add macro.
-
-2009-03-25 Craig Howland <howland@LGSInnovations.com>
-
- * libc/include/math.h: (llround, llroundf): Declare.
- * libm/common/s_llround.c: New file, implementing llround().
- * libm/common/sf_llround.c: New file, implementing llroundf().
- * libm/common/sf_lround.c: Remove spurious cast in _DOUBLE_IS_32BITS
- version of function.
- * libm/common/sf_lrint.c: Ditto.
- * libm/common/sf_logb.c: Corrected return for subnormal argument
- by replacing existing function with a version created from sf_ilogb.c.
- * libm/common/s_logb.c: Ditto, except starting point s_ilogb.c. Also
- added documentation for logb() and logbf().
- * libm/common/s_signbit.c: Add signbit() documentation.
- * libm/common/s_log2.c: Update return values to match what w_log2.c has,
- since log2 uses log(); add note about being derived instead of direct.
- * libm/common/sf_fma.c: Add casts to attempt to get correct results,
- as well as comments pointing out problems with the implementation.
- * libm/common/s_fma.c: Add fma() and fmaf() documentation.
- * libm/common/sf_remquo.c: Incorrect quotient returns for large values
- corrected by discarding existing function and replacing with Sun
- verion, with some enhancements.
- * libm/common/s_remquo.c: Ditto. Add remquo() and remquof()
- documentation.
- * libm/common/s_fmax.c: Add fmax() and fmaxf() documentation.
- * libm/common/s_fmin.c: Add fmin() and fminf() documentation.
- * libm/common/s_fdim.c: Return NAN for NAN arg, add fdim() and fdimf()
- documentation.
- * libm/common/sf_fdim.c: Return NAN for NAN arg, HUGE_VALF for inf arg.
- * libm/common/s_trunc.c: Add trunc() and truncf() documentation.
- * libm/common/s_rint.c: Add rint() and rintf() documentation.
- * libm/common/s_round.c: Add round() and roundf() documentation.
- * libm/common/s_scalbn.c: Add scalbln() and scalblnf() documentation.
- * libm/common/s_infinity.c: Add infinity() and infinityf()
- documentation.
- * libm/common/s_lround.c: Add lround(), lroundf(), llround(), and
- llroundf() documentation.
- * libm/common/s_lrint.c: Add lrint(), lrintf(), llrint(), and llrintf()
- documentation.
- * libm/common/isgreater.c: New file for documenting math.h function-like
- macros isgreater(), isgreaterequal(), isless(), islessequal(),
- islessgreater(), and isunordered().
- * libm/common/s_isnan.c: Add documentation for function-like macros
- fpclassify(), isfinite(), isinf(), isnan(), and isnormal().
- * libm/common/s_nearbyint.c: Add nearbyint() and nearbyintf()
- documentation.
- * libm/common/Makefile.am: Add s_llround.c (src); sf_llround.c (fsrc);
- s_fdim.def, s_fma.def, s_fmax.def, s_fmin.def,
- s_logb.def, s_lrint.def, s_lround.def, s_nearbyint.def, s_remquo.def,
- s_rint.def, s_round.def, s_signbit.def, s_trunc.def, and
- isgreater.def (chobj);
- re-name all existing chew files (chobj) to match source file base
- names (put in underscores), delete all special targets for chew files
- (leaving all to be generated by rule).
- * libm/common/Makefile.in: regenerate.
- * libm/math/w_exp2.c: Add "base 2" to documentation description (and
- delete TRAD_SYNOPSIS).
- * libm/math/w_gamma.c: Add tgamma() and tgammaf() documentation, along
- with some history behind the function names.
- * libm/math/math.tex: Add includes for newly-added documentation (see
- .def additions to common/Makefile.am and math/Makefile.am in this
- ChangeLog list), adjusted existing .def file names to match source file
- base names (added underscores); add mention of HUGE_VALF; rename
- "Version of library" section to "Error Handling" and add some text
- about floating-point exception; added section "Standards Compliance And
- Portability".
- * libm/math/Makefile.am: Add w_exp2.def (chobj);
- re-name all existing chew files (chobj) to match source file base
- names, delete all special targets for chew files (leaving all to be
- generated by rule).
- * libm/math/Makefile.in: regenerated
- * doc/makedoc.c: Change silent ignoring of commands < 5 characters
- to a failure when reading macro file for commands < 4 characters;
- add -v (verbose) option for printing some debugging information;
- get rid of spurious translation of "@*" to "*" (no source files used @*,
- so no existing doc pages were affected); clean up some compiler
- warnings.
- * doc/doc.str: add BUGS and SEEALSO sections (to match texi2pod.pl
- which has them); Remove ITEM command (redundant with makedoc built-in
- "o", not used in any present source file so nothing is lost, anyway).
- * HOWTO: New file to hold information for maintainers regarding how
- to do things. Initial sections on documentation and ELIX levels.
-
-2009-03-25 Richard Earnshaw <rearnsha@arm.com>
-
- * libc/machine/arm/strcmp.c (strcmp_unaligned): Correctly
- detect the nul-byte in a big-endian string.
-
-2009-03-25 Jeff Johnston <jjohnstn@redhat.com>
-
- * libc/string/wcsdup.c: Fix documentation error.
- * libc/string/Makefile.am: Fix CHEWOUT files to contain
- wcsdup.def rather than wcsdup.
- * libc/string/Makefile.in: Regenerated.
-
-2009-03-25 Corinna Vinschen <corinna@vinschen.de>
-
- * libc/locale/locale.c (loadlocale): Only change __wctomb and __mbtowc
- pointers if category is LC_CTYPE.
-
-2009-03-25 Corinna Vinschen <corinna@vinschen.de>
-
- * libc/locale/locale.c (loadlocale): Rename charset "GBK" to
- "GB2312". Fix documentation accordingly.
-
-2009-03-24 Corinna Vinschen <corinna@vinschen.de>
-
- * libc/locale/locale.c (loadlocale): Rename charset "CP949" to
- "eucKR". Fix documentation accordingly.
-
-2009-03-24 Corinna Vinschen <corinna@vinschen.de>
-
- * libc/locale/locale.c (loadlocale): Allow charset starting with 'e'
- for "eucJP" charset support.
-
-2009-03-24 Jeff Johnston <jjohnstn@redhat.com>
-
- * libc/include/sys/errno.h: Move EFTYPE to general usage because
- it is used in libc/search.
-
-2009-03-24 Corinna Vinschen <corinna@vinschen.de>
-
- * libc/ctype/iswalpha.c: Handle all wchar_t as unicode on
- _MB_CAPABLE systems.
- * libc/ctype/iswblank.c: Ditto.
- * libc/ctype/iswcntrl.c: Ditto.
- * libc/ctype/iswprint.c: Ditto.
- * libc/ctype/iswpunct.c: Ditto.
- * libc/ctype/iswspace.c: Ditto.
- * libc/ctype/jp2uc.c (__jp2uc): On Cygwin, just return c.
- Explain why.
- * libc/ctype/towlower.c: Ditto.
- * libc/ctype/towupper.c: Ditto.
- * libc/include/sys/config.h: Define _MB_EXTENDED_CHARSETS_ISO
- and _MB_EXTENDED_CHARSETS_WINDOWS if _MB_EXTENDED_CHARSETS_ALL is
- defined. Define _MB_EXTENDED_CHARSETS_ALL on Cygwin only for now.
- * libc/include/sys/reent.h (struct _reent): Mark _current_category
- and _current_locale as unused.
- * libc/locale/locale.c: Add new charset support to documentation.
- Include ../stdio/local.h from here.
- (lc_ctype_charset): Set to "ASCII" by default.
- (lc_message_charset): Ditto.
- (_setlocale_r): Don't set _current_category and _current_locale.
- (loadlocale): Add Cygwin codepage support. On _MB_CAPABLE
- systems, set __mbtowc and __wctomb function pointers to function
- corresponding with current charset. Don't allow non-existant
- ISO-8859-12 charset. Add support for Windows singlebyte codepages.
- On Cygwin, add support for GBK, CP949, and BIG5. On Cygwin,
- call __set_ctype() in case the catorgy is LC_CTYPE. Don't set
- _current_category and _current_locale.
- * libc/stdlib/Makefile.am (GENERAL_SOURCES): Add sb_charsets.c.
- * libc/stdlib/Makefile.in: Regenerate.
- * libc/stdlib/local.h: Add prototype for __locale_charset.
- Add prototypes for __mbtowc and __wctomb pointers.
- Add prototypes for charset-specific _wctomb_r and _mbtowc_r
- functions.
- Declare tables and functions from sb_charsets.c.
- * libc/stdlib/mbtowc_r.c (__mbtowc): Define. Set to __ascii_mbtowc
- by default.
- (_mbtowc_r): Just call __mbtowc from here.
- (__ascii_mbtowc): New function.
- (__iso_mbtowc): New function.
- (__cp_mbtowc): New function.
- (__utf8_mbtowc): New function.
- (__sjis_mbtowc): New function. Disable on Cygwin.
- (__eucjp_mbtowc): New function. Disable on Cygwin.
- (__jis_mbtowc): New function. Disable on Cygwin.
- * libc/stdlib/sb_charsets.c: New file, adding singlebyte to UTF
- conversion tables for all ISO and CP charsets.
- (__iso_8859_index): New function.
- (__cp_index): New function.
- * libc/stdlib/wctomb_r.c (__wctomb): Define. Set to __ascii_wctomb
- by default.
- (_wctomb_r): Just call __wctomb from here.
- (__ascii_wctomb): New function.
- (__utf8_wctomb): New function.
- (__sjis_wctomb): New function. Disable on Cygwin.
- (__eucjp_wctomb): New function. Disable on Cygwin.
- (__jis_wctomb): New function. Disable on Cygwin.
- (__iso_wctomb): New function.
- (__cp_wctomb): New function.
-
-2009-03-23 Richard Earnshaw <rearnsha@arm.com>
-
- * libc/machine/arm/strcmp.c (strcmp): Treat char as unsigned.
-
-2009-03-23 Corinna Vinschen <corinna@vinschen.de>
-
- * libc/locale/locale.c (loadlocale): Fix typo in language and
- territory evaluation.
-
-2009-03-20 Jeff Johnston <jjohnstn@redhat.com>
-
- * libc/include/sys/errno.h: Protect various non-standard errnos
- with either __LINUX_ERRNO_EXTENSIONS__ or __CYGWIN__.
- * libc/include/sys/config.h[__CYGWIN__]: Define
- __LINUX_ERRNO_EXTENSIONS__.
-
-2009-03-19 Corinna Vinschen <corinna@vinschen.de>
-
- * libc/stdlib/mbtowc_r.c (_mbtowc_r): Return EILSEQ in case of an
- invalid character sequence.
-
- * libc/stdlib/mbtowc_r.c (_mbtowc_r): Fix compiler warning due to
- missing declaration of __locale_charset.
- * libc/stdlib/wctomb_r.c (_wctomb_r): Ditto.
-
-2009-03-18 Yaakov Selkowitz <yselkowitz@users.sourceforge.net>
-
- * libm/common/s_log2.c: New file.
- * libm/common/sf_log2.c: Ditto.
- * libm/common/Makefile.am: Add s_log2.c and sf_log2.c.
- * libm/common/Makefile.in: Regenerated.
- * libc/include/math.h: Add log2 and log2f function prototypes.
-
-2009-03-17 Corinna Vinschen <corinna@vinschen.de>
-
- * libc/stdlib/mbstowcs_r.c (_mbstowcs_r): Handle NULL destination
- string correctly.
-
-2009-03-16 Mark Mitchell <mark@codesourcery.com>
-
- * libc/machine/arm/strlen.c (strlen): Fix defect in Thumb-2 mode.
-
-2009-03-16 Richard Earnshaw <rearnsha@arm.com>
-
- * libc/machine/arm/strlen.c (strlen): Correctly detect
- end-of-string.
- * libc/machine/arm/strcpy.c (strcpy): Likewise.
- * libc/machine/arm/strcmp.c (strcmp, strcmp_unaligned): Likewise.
-
-2009-03-15 Yaakov Selkowitz <yselkowitz@users.sourceforge.net>
-
- * libc/include/sys/errno.h (ESTRPIPE): Define.
- * libc/string/strerror.c (strerror): Decode it.
-
-2009-03-15 Corinna Vinschen <corinna@vinschen.de>
-
- * libc/include/wchar.h (wcsdup, _wcsdup_r): Declare.
- * libc/string/Makefile.am: Add wcsdup.c.
- * libc/string/Makefile.in: Regenerate.
- * libc/string/strings.tex: Add wcsdup documentation reference.
- * libc/string/wcsdup.c: New file.
-
-2009-03-14 Corinna Vinschen <corinna@vinschen.de>
-
- * libc/include/stdlib.h (_mkstemp_r, _mktemp_r): Move out of
- !_REENT_ONLY section.
-
-2009-03-14 Corinna Vinschen <corinna@vinschen.de>
-
- * libc/include/stdio.h (_mkstemp_r, _mktemp_r): Move declarations
- to stdlib.h.
- * libc/include/stdlib.h (mktemp, _mktemp_r): Warn when using.
- * libc/stdio/mktemp.c: Explain the security risk when using
- mktemp.
-
-2009-03-12 Craig Howland <howland@LGSInnovations.com>
-
- * libc/time/time.tex (wcsftime.def): Include.
- * libc/time/wcsftime.c: Clean up documentation a little.
-
-2009-03-12 Craig Howland <howland@LGSInnovations.com>
-
- * libc/stdio/swscanf.c: Some documentation corrections.
-
-2009-03-12 Craig Howland <howland@LGSInnovations.com>
-
- * libc/stdio/swprintf.c (_swprintf_r, swprintf):
- correct how terminating L'\0' is added;
- change return to match standard for when output does not fit;
- some corrections and enhancements to the docs.
- * libc/stdio/vswprintf.c (_vswprintf_r): ditto, except for docs.
- * libc/stdio/vfwprintf.c: some corrections to the docs and some
- enhancements to comments. (No code changes.)
- * libc/time/strftime.c: Correct some problems that made wcsftime()
- not work correctly: work properly with swprintf returns that are
- different from snprintf returns, correct test vector lengths for
- when sizeof(wchar_t) > 1.
- * libc/stdio/sprintf.c: Some documentation and comment corrections and
- enhancements to match those done to swprintf.c.
-
-2009-03-11 Corinna Vinschen <corinna@vinschen.de>
-
- * libc/include/wchar.h (wcscasecmp, wcsncasecmp): Declare.
- * libc/string/Makefile.am: Add wcscasecmp.c, wcsncasecmp.c
- * libc/stdio/Makefile.in: Regenerate.
- * libc/string/strings.tex: Add new documentation references.
- * libc/string/wcscasecmp.c: New file.
- * libc/string/wcsncasecmp.c: New file.
-
-2009-03-11 Corinna Vinschen <corinna@vinschen.de>
-
- * libc/include/wchar.h (fwscanf, swscanf, vfwscanf, vswscanf, vwscanf,
- wscanf): Declare.
- (_fwscanf_r, _swscanf_r, _vfwscanf_r, _vswscanf_r, _vwscanf_r,
- _wscanf_r): Declare.
- * libc/stdio/Makefile.am: Add new wscanf files.
- * libc/stdio/Makefile.in: Regenerate.
- * libc/stdio/fwscanf.c: New file.
- * libc/stdio/local.h (__svfwscanf_r, __ssvfwscanf_r, __svfiwscanf_r,
- __ssvfiwscanf_r): Declare.
- * libc/stdio/stdio.tex: Add new documentation references.
- * libc/stdio/swscanf.c: New file.
- * libc/stdio/vfwscanf.c: New file.
- * libc/stdio/vswscanf.c: New file.
- * libc/stdio/vwscanf.c: New file.
- * libc/stdio/wscanf.c: New file.
-
- * libc/stdio/vfscanf.c (_sungetc_r): Make externaly available. Only
- define if INTEGER_ONLY is defined. Declare otherwise.
- (__ssrefill_r): Ditto.
- (_sfread_r): Ditto.
-
- Remove static eofread/eofread1 functions and use __seofread
- function instead, throughout.
- * libc/stdio/local.h (__seofread): Declare.
- * libc/stdio/stdio.c (__seofread): Define.
-
- * libc/stdio/fgetwc.c (__fgetwc): Fix compiler warning.
- * libc/stdio/fgetws.c (_fgetws_r): Ditto.
- * libc/stdio/fread.c (_fread_r): Ditto.
- * libc/stdio/vfprintf.c: Ditto.
- * libc/stdio/vswprintf.c: Ditto.
-
-2009-03-09 Brooks Moses <brooks@codesourcery.com>
-
- * libc/machine/arm/arm_asm.h: Fix typo.
-
-2009-03-09 Craig Howland <howland@LGSInnovations.com>
-
- * libc/time/strftime.c: Adapt for dual-purpose use so not only
- defines strftime(), but can also define wcsftime(); add optional
- test package; speed up %Y handling.
- * libc/time/wcsftime.c: New file, defining wcsftime() (albeit
- indirectly by including strftime.c) and its documentation.
- * libc/time/time.tex: Enhance tm_isdst explanation, change strftime
- description to match modified description in strftime.c
- * libc/time/Makefile.am: Add wcsftime.c and wcsftime.def. Add a rule
- so that wcsftime.o gets rebuilt when strftime changes.
- * libc/time/Makefile.in: Regenerate.
- * libc/include/wchar.h (wcsftime): Declare.
-
-2009-03-06 Hans-Erik Floryd <hans-erik.floryd@rt-labs.com>,
- Corinna Vinschen <corinna@vinschen.de>
-
- * libc/reent/reent.c (_reclaim_reent): Make a block from MP-related
- statements in _REENT_SMALL case. Check if _atexit is not NULL before
- dereferencing it.
- (_wrapup_reent): Check if _atexit is not NULL before dereferencing it.
-
-2009-03-06 Corinna Vinschen <corinna@vinschen.de>
-
- * libc/include/stdio.h (__VALIST): Guard against multiple definition.
- * libc/include/wchar.h: Include stdarg.h.
- (__VALIST): Define conditionally.
- (fwprintf, swprintf, vfwprintf, vswprintf, vwprintf, wprintf): Declare.
- (_fwprintf_r, _swprintf_r, _vfwprintf_r, _vswprintf_r, _vwprintf_r,
- _wprintf_r): Declare.
- * libc/stdio/Makefile.am: Add new files.
- * libc/stdio/Makefile.in: Regenerate.
- * libc/stdio/fwprintf.c: New file.
- * libc/stdio/local.h (_svfwprintf_r, _svfiwprintf_r): Declare.
- (__CH_CLASS, __STATE, __ACTION): Move definition from vfprintf.c here
- and move to the __ namespace.
- (__chclass, __state_table, __action_table): Declare.
- * libc/stdio/stdio.tex: Add new documentation references.
- * libc/stdio/swprintf.c: New file.
- * libc/stdio/vfprintf.c (__SPRINT): New macro to call the right
- __sprint_r function according to compilation unit. Use throughout.
- (__ssprint_r): Rename STRING_ONLY variant from __sprint_r.
- Make externaly available. Only define if INTEGER_ONLY is defined.
- (__sprint_r): Make externaly available. Only define if INTEGER_ONLY
- is defined. Handle stream orientation.
- (__sbprintf): Copy FILE's _flags2 member as well.
- (__chclass, __state_table, __action_table): Prepend __ to name and
- make externally available.
- * libc/stdio/vfwprintf.c: New file.
- * libc/stdio/vswprintf.c: New file.
- * libc/stdio/vwprintf.c: New file.
- * libc/stdio/wprintf.c: New file.
-
-2009-03-03 Corinna Vinschen <corinna@vinschen.de>
-
- * libc/locale/locale.c (_setlocale_r): New implementation based on
- FreeBSD's setlocale.
- (currentlocale): New helper function.
- (loadlocale): Ditto.
- (__locale_charset): New function.
- (__locale_msgcharset): Rename from __locale_charset.
- * libc/ctype/local.h (__lc_ctype): Remove declaration.
- (__locale_charset): Declare.
- * libc/ctype/iswalpha.c (iswalpha): Call __locale_charset instead of
- using __lc_ctype directly. Only compare against the charset alone.
- * libc/ctype/iswblank.c (iswblank): Ditto.
- * libc/ctype/iswcntrl.c (iswcntrl): Ditto.
- * libc/ctype/iswprint.c (iswprint): Ditto.
- * libc/ctype/iswpunct.c (iswpunct): Ditto.
- * libc/ctype/iswspace.c (iswspace): Ditto.
- * libc/ctype/towlower.c (towlower): Ditto.
- * libc/ctype/towupper.c (towupper): Ditto.
- * libc/stdlib/mbtowc_r.c (_mbtowc_r): Ditto.
- * libc/stdlib/wctomb_r.c (_wctomb_r): Ditto.
- * libc/sys/linux/intl/loadmsgcat.c (_nl_init_domain_conv): Call
- __locale_msgcharset instead of __locale_charset.
-
-2009-03-02 Jeff Johnston <jjohnstn@redhat.com>
-
- * libc/stdlib/wctomb_r.c (_wctomb_r): When checking single-byte
- charset, cast wchar to size_t in case wchar_t is signed.
- * libc/stdlib/wctomb.c (wctomb): Add similar single-byte check.
-
-2009-03-02 Corinna Vinschen <corinna@vinschen.de>
-
- * libc/stdlib/wctomb_r.c (_wctomb_r): Return EILSEQ in case of an
- invalid wchar. Return -1 if wchar doesn't fit into singlebyte
- value in case of using a singlebyte charset.
-
-2009-02-26 Brooks Moses <brooks@codesourcery.com>
-
- * libc/machine/arm/strcpy.c: Add missing comma.
-
-2009-02-26 Ralf Corsepius <ralf.corsepius@rtems.org>
-
- * libc/machine/lm32/configure.in: Let
- AC_CONFIG_SRCDIR point to setjmp.S instead of setjmp.s
- * libs/machine/lm32/configure: Regenerate.
-
-2009-02-25 Brooks Moses <brooks@codesourcery.com>
-
- * libc/stdlib/Makefile.am (CHEWOUT_FILES): Add
- mbsnrtowcs.def, wcsnrtombs.def.
- * libc/stdlib/Makefile.in: Regenerate.
- * libc/stdlib/stdlib.tex (@menu): Use correct section
- names for mbsrtowcs, wcsrtombs.
- * libc/stdlib/wcstod.c: Remove stray character in
- documentation.
-
-2009-02-25 Corinna Vinschen <corinna@vinschen.de>
-
- * libc/stdlib/mbtowc_r.c (_mbtowc_r): Remove conversion of 5 and 6
- byte UTF-8 sequences since they are invalid in the Unicode standard.
- Handle surrogate pairs in case of wchar_t == UTF-16.
- * libc/stdlib/wctomb_r.c (_wctomb_r): Don't convert invalid Unicode
- wchar_t values beyond 0x10ffff into UTF-8 chars. Handle surrogate
- pairs in case of wchar_t == UTF-16.
-
-2009-02-24 Kevin Buettner <kevinb@redhat.com>
-
- * libc/stdio/open_memstream.c (stdint.h): Include.
-
-2009-02-23 Craig Howland <howland@LGSInnovations.com>
-
- * libc/unix/ttyname.c: Remove ttyname_r() (to a new file to avoid
- coupling ttyname_r() and ttyname() due to the latter's large buffer).
- * libc/unix/ttyname_r.c: New file to hold ttyname_r(), previously in
- ttyname.c.
- * libc/unix/ttyname.h: New file (common size definition for the 2
- ttyname*c files that are now split).
- * libc/unix/Makefile.am (ELIX_2_SOURCES): Add ttyname_r.c.
- * libc/unix/Makefile.in: Regenerate.
-
-2009-02-19 Corinna Vinschen <corinna@vinschen.de>
-
- * libc/include/wchar.h (mbsnrtowcs): Declare.
- (_mbsnrtowcs_r): Declare.
- (wcsnrtombs): Declare.
- (_wcsnrtombs_r): Declare.
- * libc/stdlib/Makefile.am (ELIX_2_SOURCES): Add mbsnrtowcs.c
- and wcsnrtombs.c.
- * libc/stdlib/Makefile.in: Regenerate.
- * libc/stdlib/mbsnrtowcs.c: New file, implementing _mbsnrtowcs_r
- and mbsnrtowcs. Document mbsnrtowcs and mbsrtowcs.
- * libc/stdlib/mbsrtowcs.c (_mbsrtowcs_r): Just call _mbsnrtowcs_r.
- (mbsrtowcs): Ditto.
- * libc/stdlib/wcsnrtombs.c: New file, implementing _wcsnrtombs_r
- and wcsnrtombs. Document wcsrtombs and wcsnrtombs.
- * libc/stdlib/wcsrtombs.c (_wcsrtombs_r): Just call _wcsnrtombs_r.
- (wcsrtombs): Ditto.
- * libc/stdlib/stdlib.tex: Accommodate new documentation.
-
-2009-02-18 Jeff Johnston <jjohnstn@redhat.com>
-
- * libc/stdio/open_memstream.c (internal_open_memstream_r): Fix max
- buffer size to be in wchar_t units if wide == 1 is passed in. In
- this case, also initialize the first character of the buffer to be
- wide char null.
- (_open_wmemstream_r): Cast buf to be (char **) to avoid warning.
- * libc/stdlib/mbtowc_r.c (_mbtowc_r): Change all occurences of
- incrementing the size_t value n to first check that n is not already
- size_t -1. Fix some compiler warnings.
- * libc/stdlib/wcstod.c: Add includes for <wctype.h> and <math.h>.
-
-2009-02-18 Corinna Vinschen <corinna@vinschen.de>
-
- * libc/stdio/open_memstream.c: Add open_wmemstream to doumentation.
- (struct memstream): Add wide element.
- Change saved to a union to take char and wchar_t values.
- (memwriter): Accommodate wide-oriented oeprations.
- (memseeker): Ditto.
- (memseeker64): Ditto.
- (memcloser): Ditto.
- (internal_open_memstream_r): New static function. Take functionality
- from former _open_memstream_r and handle additional "wide" parameter.
- (_open_memstream_r): Just call internal_open_memstream_r with wide==-1
- from here.
- (_open_wmemstream_r): New function.
- (open_wmemstream): Ditto.
- * libc/include/wchar.h (open_wmemstream): Declare.
- (_open_wmemstream_r): Declare.
-
-2009-02-16 Corinna Vinschen <corinna@vinschen.de>
-
- * libc/stdio/fputwc.c: Fix typo in man page info.
-
-2009-02-12 Corinna Vinschen <corinna@vinschen.de>
-
- * libc/include/wchar.h (_wcstod_r): Declare.
- (_wcstof_r): Declare.
- (wcstod): Declare.
- (wcstof): Declare.
- * libc/stdlib/Makefile.am (GENERAL_SOURCES): Add wcstod.c.
- (CHEWOUT_FILES): Add wcstod.def.
- * libc/stdlib/Makefile.in: Regenerate.
- * libc/stdlib/stdlib.tex: Add wcstod.
- * libc/stdlib/wcstod.c: New file.
-
-2009-02-05 Neal H. Walfield <neal@gnu.org>
-
- * libc/machine/x86_64/memcpy.S (memcpy): Don't use the red zone.
-
-2009-01-28 Jeff Johnston <jjohnstn@redhat.com>
-
- * libc/stdio/vfscanf.c (__SVFSCANF_R): Add additional check for
- inf and nan processing to not proceed if we have already collected
- zeroes.
-
-2009-01-26 DJ Delorie <dj@redhat.com>
-
- * configure.host (m32c-*-*): Add long long I/O support by default.
-
-2009-01-21 Richard Earnshaw <rearnsha@arm.com>
-
- * libc/machine/arm/arm_asm.h: New file.
- * libc/machine/arm/strlen.c: New file.
- * libc/machine/arm/strcpy.c: New file.
- * libc/machine/arm/strcmp.c: New file.
- * libc/machine/arm/Makefile.am: Add new string routines.
-
-2009-01-19 Neal H. Walfield <neal@gnu.org>
-
- * libc/include/stdint.h (INT64_C, UINT64_C, INTMAX_C, UINTMAX_C)
- [__have_long64 && __have_longlong64]: Use L and UL, not LL and ULL.
- * libc/include/inttypes.h (__PRI64, __SCN64, __PRIMAX, __SCNMAX,
- __PRIPTR, __SCNPTR) [__have_long64 && __have_longlong64]: Use l,
- not ll.
-
-2009-01-12 Nathan Froyd <froydnj@codesourcery.com>
-
- * libc/machine/powerpc/vfscanf.c (__sccl): Remove declaration.
-
-2009-01-12 Jeff Johnston <jjohnstn@redhat.com>
-
- * libc/stdio/fwalk.c (__fwalk, __fwalk_reent): Remove locking of
- each fp. Let the function being called lock the fp, if necessary.
-
-2009-01-07 Kazu Hirata <kazu@codesourcery.com>
-
- * libc/include/sys/stdio.h (_flockfile, _funlockfile): Fix typos.
-
-2009-01-05 Craig Howland <howland@LGSInnovations.com>
-
- * libc/stdio/fwide.c: Correct typo in TRAD_SYNOPSIS for _fwide_r.
-
-2008-12-19 Jeff Johnston <jjohnstn@redhat.com>
-
- * NEWS: Update with 1.17.0 info.
- * README: Ditto.
- * acinclude.m4: Change version number to 1.17.0.
- * aclocal.m4: Regenerated.
- * configure: Ditto.
- * doc/aclocal.m4: Ditto.
- * doc/configure: Ditto.
- * libc/*/aclocal.m4: Ditto.
- * libc/*/configure: Ditto.
- * libc/libc.texinfo: Ditto.
- * libm/*/aclocal.m4: Ditto.
- * libm/*/configure: Ditto.
- * libm/libm.texinfo: Ditto.
- * libc/sys/linux/shared.ld: Add VERS_1.17
-
-2008-12-17 Jon Beniston <jon@beniston.com>
-
- * configure.host: Set syscall_dir for lm32 target.
-
-2008-12-15 Jeff Johnston <jjohnstn@redhat.com>
-
- * libc/stdio/stdio.tex: Remove putwc and getwc references as they
- are included as part of fputwc and fgetwc, respectively.
-
-2008-12-12 Craig Howland <howland@LGSInnovations.com>
-
- * libc/include/wchar.h: Added wcstok() declaration.
- * libc/string/wcstok.c: New file, implementing wcstok.
- * libc/string/Makefile.am: Add wcstok support.
- * libc/string/wcstrings.tex: Ditto.
- * libc/string/Makefile.in: Regenerated.
-
-2008-12-12 Ralf Corsepius <ralf.corsepius@rtems.org>
-
- * libc/stdio/fputws.c: Fix documentation.
- * libc/stdio/getwchar.c: Ditto.
- * libc/stdio/putwchar.c: Ditto.
-
-2008-12-12 Ralf Corsepius <ralf.corsepius@rtems.org>
-
- * libc/include/sys/features.h: Set RTEMS's _POSIX_MONOTONIC_CLOCK to
- 200112L (SUSv3 compliance).
- Comment out RTEMS's _POSIX_SHARED_MEMORY_OBJECTS (Unsupported).
-
-2008-12-12 Ralf Corsepius <ralf.corsepius@rtems.org>
-
- * libc/sys/rtems/crt0.c: Add stubs for getdents(), nanosleep(),
- _execve(), _exit().
-
-2008-12-12 Ralf Corsepius <ralf.corsepius@rtems.org>
-
- * configure.host: Let *rtems* default to c99-formats.
-
-2008-12-12 Craig Howland <howland@LGSInnovations.com>
-
- * libc/stdio/freopen.c: Add <string.h> for memset prototype.
- * libc/stdio/fseek.c: Ditto.
- * libc/stdio/fwide.c: Add <wchar.h> for fwide prototype.
-
-2008-12-11 Jeff Johnston <jjohnstn@redhat.com>
-
- * libc/include/sys/time.h (gettimeofday): Change prototype so
- 2nd parameter is void *, matching SUSV2.
- * libc/syscalls/sysgettod.c (gettimeofday): Ditto.
-
-2008-12-11 Jukka Pietarinen <jukka.pietarinen@mrf.fi>
-
- * configure.host: Add lm32
- * libc/include/machine/ieeefp.h: Add __lm32__
- * libc/include/machine/setjmp.h: Add __lm32__
- * libc/machine/configure.in: Add lm32
- * libc/machine/configure: Regenerated.
- * libc/machine/lm32/aclocal.m4: New file.
- * libc/machine/lm32/configure.in: Ditto.
- * libc/machine/lm32/configure: Ditto.
- * libc/machine/lm32/Makefile.am: Ditto.
- * libc/machine/lm32/Makefile.in: Ditto.
- * libc/machine/lm32/setjmp.s: Ditto.
-
-2008-12-11 Craig Howland <howland@LGSInnovations.com>
-
- * libc/include/sys/lock.h: Add void cast to avoid "statement has no
- effect" warnings from gcc.
- * libc/include/sys/stdio.h: Ditto.
- * libc/include/sys/time.h: Correct gettimeofday() prototype.
- * libc/stdlib/__exp10.c: Add #include "std.h" for function prototype.
- * libc/stdlib/__ten_mu.c: Ditto.
- * libc/stdlib/std.h: Correct __exp10's ANSI prototype.
- * libc/stdlib/ldtoa.c: Change eiisinf definition to ANSI form. (Are
- already others in file without _ansi method, so did not bother.)
- * libc/stdlib/system.c: Use _ansi forms for function prototypes and
- definitions.
- * libc/time/mktime.c: Ditto.
- * libc/misc/__dprintf.c: Ditto.
- * libc/include/stdio.h: Add function prototypes for _fgetc_r,
- _fgetpos_r, _fsetpos_r, _freopen_r, _rewind_r, freopen64, _freopen64_r,
- _funopen_r, and _fopencookie_r.
- * libc/include/reent.h: Add function prototype for _stat64_r, align
- _execve_r prototype with POSIX definition for execve.
- * libc/reent/execr.c: Align function prototype with POSIX definition.
- * libc/stdio/asniprintf.c: Add #include "local.h".
- * libc/stdio/vasniprintf.c: Ditto.
- * libc/stdio/fread.c: Remove unused variable newcount.
- * libc/stdio/local.h: Add function prototype for __sccl.
- * libc/stdio/open_memstream.c: Remove unused variable flags.
- * libc/stdio/vfscanf.c: Proper prototyping for ccfn, remove prototype
- for __sccl since now in local.h.
- * libc/string/memcpy.c: Add #include <string.h> (for real and for
- traditional synopsis), remove extraneous stddef.h and limits.h.
- * libc/syscalls/sysclose.c: Add #include <unistd.h>.
- * libc/syscalls/sysfork.c: Ditto.
- * libc/syscalls/sysgetpid.c: Ditto.
- * libc/syscalls/sysexecve.c: Add #include <unistd.h>, align function
- prototype with POSIX definition.
- * libc/syscalls/sysfstat.c: Add #include <sys/stat.h>.
- * libc/syscalls/sysgettod.c: Correct sys/times.h to sys/time.h.
- * libc/syscalls/syskill.c: Add #include <signal.h>.
- * libc/syscalls/syslink.c: Add #include <unistd.h>, fix prototype.
- * libc/syscalls/sysunlink.c: Ditto.
- * libc/syscalls/sysstat.c: Add #include <sys/stat.h>, fix prototype.
- * libc/syscalls/syswait.c: Add #include <sys/wait.h>, fix prototype.
-
-2008-12-10 Corinna Vinschen <corinna@vinschen.de>
-
- Implement basic wide char stdio functionality, based on FreeBSD.
- * libc/include/stdio.h (__SORD): Define.
- (__SWID): Define.
- * libc/include/wchar.h: Add declarations for new wide char functions.
- (getwc): Define as macro.
- (getwchar): Ditto.
- (putwc): Ditto.
- (putwchar): Ditto.
- * libc/include/sys/reent.h (struct __sFILE): Add _mbstate member.
- (struct __sFILE64): Ditto.
- * libc/stdio/Makefile.am (ELIX_4_SOURCES): Add fgetwc.c, fgetws.c,
- fputwc.c, fputws.c, fwide.c, getwc.c, getwchar.c, putwc.c, putwchar.c
- and ungetwc.c.
- (CHEWOUT_FILES): Add fgetwc.def, fgetws.def, fputwc.def, fputws.def,
- fwide.def, getwc.def, getwchar.def, putwc.def, putwchar.def and
- ungetwc.def.
- Add header dependency rules for the new files.
- * libc/stdio/Makefile.in: Regenerate.
- * libc/stdio/fgetwc.c: New file, implementing fgetwc and _fgetwc_r.
- * libc/stdio/fgetws.c: New file, implementing fgetws and _fgetws_r.
- * libc/stdio/findfp.c (std): Initialize FILE's _mbstate member.
- (__sfmoreglue): Ditto.
- * libc/stdio/fputs.c (_fputs_r): Set stream orientation.
- * libc/stdio/fputwc.c: New file, implementing fputwc and _fputwc_r.
- * libc/stdio/fputws.c: New file, implementing fputws and _fputws_r.
- * libc/stdio/fread.c (_fread_r): Set stream orientation.
- * libc/stdio/freopen.c (_freopen_r): Reset stream orientation. Reset
- _mbstate.
- * libc/stdio/fseek.c (_fseek_r): Reset _mbstate.
- * libc/stdio/fwide.c: New file, implementing fwide and _fwide_r.
- * libc/stdio/fwrite.c (_fwrite_r): Set stream orientation.
- * libc/stdio/getwc.c: New file, implementing getwc and _getwc_r.
- * libc/stdio/getwchar.c: New file, implementing getwchar and
- _getwchar_r.
- * libc/stdio/local.h (ORIENT): New macro.
- * libc/stdio/puts.c (_puts_r): Set stream orientation.
- * libc/stdio/putwc.c: New file, implementing putwc and _putwc_r.
- * libc/stdio/putwchar.c: New file, implementing putwchar and
- _putwchar_r.
- * libc/stdio/refill.c (__srefill_r): Set stream orientation.
- * libc/stdio/stdio.tex: Add documentation for new functions.
- * libc/stdio/ungetc.c (_ungetc_r): Set stream orientation.
- * libc/stdio/ungetwc.c: New file, implementing ungetwc and _ungetwc_r.
- * libc/stdio/vfscanf.c (__SVFSCANF_R): Set stream orientation.
- * libc/stdio/wbuf.c (__swbuf_r): Ditto.
-
-2008-12-10 Joseph Myers <joseph@codesourcery.com>
-
- * libc/include/stdint.h (INT32_MIN, INT32_MAX, UINT32_MAX,
- INT_LEAST32_MIN, INT_LEAST32_MAX, UINT_LEAST32_MAX): Define to
- constants with "long" types where appropriate.
- (INT_FAST8_MIN, INT_FAST8_MAX, UINT_FAST8_MAX, INT_FAST16_MIN,
- INT_FAST16_MAX, UINT_FAST16_MAX, INT_FAST32_MIN, INT_FAST32_MAX,
- UINT_FAST32_MAX, INT_FAST64_MIN, INT_FAST64_MAX, UINT_FAST64_MAX):
- Correct to match logic for defining corresponding types.
- (INTMAX_MAX, INTMAX_MIN, UINTMAX_MAX): Define.
- (SIZE_MAX): Define using __SIZE_MAX__ if available.
- (PTRDIFF_MAX): Define using __PTRDIFF_MAX__ if available.
- (PTRDIFF_MIN): Define in terms of PTRDIFF_MAX.
- (WCHAR_MAX, WCHAR_MIN, WINT_MAX, WINT_MIN): Define.
- (UINT8_C, UINT16_C): Define to give signed values if corresponding
- types would promote to int.
-
-2008-12-04 Corinna Vinschen <corinna@vinschen.de>
-
- * libc/include/sys/features.h (_POSIX_V6_ILP32_OFF32): Always define.
- (_POSIX_V6_LP64_OFF64): Ditto.
- (_POSIX_V6_LPBIG_OFFBIG): Ditto.
-
-2008-11-28 Jeff Johnston <jjohnstn@redhat.com>
-
- * libc/sys/linux/inode.c: Include <dirent.h> instead of
- <linux/dirent.h>.
- * libc/sys/linux/io64.c: Add weak alias for _stat64.
-
-2008-11-27 Ralf Corsepius <ralf.corsepius@rtems.org>
-
- * libc/posix/telldir.c: Use #if !defined() instead of #ifndef
- to fix GCC warning.
-
-2008-11-27 Ken Werner <ken.werner@de.ibm.com>
-
- * libc/machine/spu/Makefile.am: Add spu-mcount.S spu-gmon.c.
- * libc/machine/spu/Makefile.in: Regenerated.
- * libc/machine/spu/spu-gmon.c: New file.
- * libc/machine/spu/spu-mcount.S: New file.
-
-2008-11-27 Joel Sherrill <joel.sherrill@oarcorp.com>
-
- * configure.host (*-rtems*): Turn on using portion of unix subdirectory.
-
-2008-11-27 Craig Howland <howland@LGSInnovations.com>
-
- * libc/argz/argz_add.c: Added #include <argz.h> to get function
- prototypes.
- * libc/argz/argz_append.c: Ditto.
- * libc/argz/argz_count.c: Ditto.
- * libc/argz/argz_create.c: Ditto.
- * libc/argz/argz_create_sep.c: Ditto.
- * libc/argz/argz_delete.c: Ditto.
- * libc/argz/argz_next.c: Ditto.
- * libc/argz/argz_stringify.c: Ditto
- * libc/stdlib/strtod.c: Added #include <stdlib.h> to get function
- prototypes.
- * libc/stdlib/wcstoul.c: Added #include <wchar.h> to get function
- prototypes, corrected traditional usage comment.
- * libc/include/wchar.h: Added _mbsrtowcs_r() prototype.
-
-2008-11-26 Ken Werner <ken.werner@de.ibm.com>
-
- * libm/machine/spu/headers/acosd2.h: Rebase against current simdmath.
- * libm/machine/spu/headers/asind2.h: Likewise.
- * libm/machine/spu/headers/asinhf4.h: Likewise.
- * libm/machine/spu/headers/divd2.h: Likewise.
- * libm/machine/spu/headers/erf_utils.h: Likewise.
- * libm/machine/spu/headers/erfcd2.h: Likewise.
- * libm/machine/spu/headers/erfcf4.h: Likewise.
- * libm/machine/spu/headers/erfd2.h: Likewise.
- * libm/machine/spu/headers/recipd2.h: Likewise.
-
-2008-11-25 Corinna Vinschen <corinna@vinschen.de>
-
- * libc/stdio/gets.c (_gets_r): Lock stdin here and call
- __sgetc_r instead of _getchar_r.
-
-2008-11-24 Craig Howland <howland@LGSInnovations.com>
-
- * libc/stdlib/wcstoull_r.c: Add EINVAL return for bad base value,
- include wchar.h for prototype, remove extraneous includes, use
- C99/POSIX ULLONG_MAX (but allow for poor limits.h).
- * libc/stdlib/wcstoull.c: Fix usage comments (mistakes and to add
- base value check noted above), remove extraneous includes.
- * libc/stdio/asnprintf.c: Add #include "local.h" to get function
- prototype for _svfprintf_r().
- * libc/stdio/vasnprintf.c: Ditto.
- * libc/stdio/local.h: Add function prototype for __submore().
- * libc/include/stdio.h: Add function prototypes for _fseeko_r and
- _ftello_r.
- * libc/posix/namespace.h: Commented out define for write to
- eliminate write() prototype being missing for collate.c (which is
- the only file that presently includes namespace.h).
- * libc/include/reent.h: Added _rename_r.
- * libc/reent/renamer.c: Corrected function prototypes in synopses.
- * libc/locale/ldpart.c: Use struct stat64 when calling fstat64.
-
-2008-11-24 Jeff Johnston <jjohnstn@redhat.com>
-
- * libc/search/hash_func.c: Comment out unused static hash functions.
- * libc/reent/stat64r.c: New file.
- * libc/reent/Makefile.am: Add stat64r.c support.
- * libc/reent/Makefile.in: Regenerated.
-
-2008-11-24 Joel Sherrill <joel.sherrill@oarcorp.com>
-
- * libc/posix/scandir.c: Fix memory leaks.
-
-2008-11-24 Joel Sherrill <joel.sherrill@oarcorp.com>
-
- * libc/posix/Makefile.am: Compile readdir_r.c not readdir.c twice.
- * libc/posix/Makefile.in: Regenerated.
-
-2008-11-24 Corinna Vinschen <corinna@vinschen.de>
-
- * libc/include/stdio.h (__SMOD): Remove definition of unused flag.
- * libc/include/sys/reent.h (struct __sFILE): Add _flags2 member.
- * libc/stdio/findfp.c (std): Initialize _flags2.
- (__sfp): Ditto.
- * libc/stdio/refill.c (__srefill_r): Drop resetting __SMOD flag.
- * libc/stdio/vfscanf.c (__ssrefill_r): Ditto.
- * libc/stdio/fseek.c (_fseek_r): Drop checking __SMOD flag.
- * libc/stdio64/fseeko64.c (_fseeko64_r): Ditto.
-
-2008-11-20 Ken Werner <ken.werner@de.ibm.com>
-
- * libc/machine/spu/sys/linux_syscalls.h: Additional syscall defines to
- be in sync with current kernels.
-
-2008-11-20 Ken Werner <ken.werner@de.ibm.com>
- Patrick Mansfield <patmans@us.ibm.com>
- Joel Schopp <jschopp@austin.ibm.com>
-
- * libc/machine/spu/configure.in: Add __ea detection.
- * libc/machine/spu/Makefile.am: Add new files.
- * libc/machine/spu/include/ea.h: New file.
- * libc/machine/spu/ea_internal.h: Likewise.
- * libc/machine/spu/sys/mman.h: Likewise.
- * libc/machine/spu/mmap_ea.c: Likewise.
- * libc/machine/spu/munmap_ea.c: Likewise.
- * libc/machine/spu/mremap_ea.c: Likewise.
- * libc/machine/spu/msync_ea.c: Likewise.
- * libc/machine/spu/memchr_ea.c: Likewise.
- * libc/machine/spu/memcmp_ea.c: Likewise.
- * libc/machine/spu/memcpy_ea.c: Likewise.
- * libc/machine/spu/memmove_ea.c: Likewise.
- * libc/machine/spu/memset_ea.c: Likewise.
- * libc/machine/spu/malloc_ea.c: Likewise.
- * libc/machine/spu/realloc_ea.c: Likewise.
- * libc/machine/spu/calloc_ea.c: Likewise.
- * libc/machine/spu/free_ea.c: Likewise.
- * libc/machine/spu/posix_memalign_ea.c: Likewise.
- * libc/machine/spu/strcat_ea.c: Likewise.
- * libc/machine/spu/strchr_ea.c: Likewise.
- * libc/machine/spu/strcmp_ea.c: Likewise.
- * libc/machine/spu/strcpy_ea.c: Likewise.
- * libc/machine/spu/strcspn_ea.c: Likewise.
- * libc/machine/spu/strlen_ea.c: Likewise.
- * libc/machine/spu/strncat_ea.c: Likewise.
- * libc/machine/spu/strncmp_ea.c: Likewise.
- * libc/machine/spu/strncpy_ea.c: Likewise.
- * libc/machine/spu/strpbrk_ea.c: Likewise.
- * libc/machine/spu/strrchr_ea.c: Likewise.
- * libc/machine/spu/strspn_ea.c: Likewise.
- * libc/machine/spu/strstr_ea.c: Likewise.
- * libc/machine/spu/read_ea.c: Likewise.
- * libc/machine/spu/pread_ea.c: Likewise.
- * libc/machine/spu/readv_ea.c: Likewise.
- * libc/machine/spu/write_ea.c: Likewise.
- * libc/machine/spu/pwrite_ea.c: Likewise.
- * libc/machine/spu/writev_ea.c: Likewise.
-
-2008-11-19 Joel Sherrill <joel.sherrill@oarcorp.com>
-
- * libc/include/sys/config.h[__mips__]: Don't bother
- setting __ATTRIBUTE_IMPURE_PTR__ here.
- [__rtems__][__mips__]: No need to undef the __ATTRIBUTE_IMPURE_PTR__
- macro anymore.
-
-2008-11-19 Jeff Johnston <jjohnstn@redhat.com>
-
- * libc/sys/linux/bits/dirent.h: New header file.
- * libc/sys/linux/sys/dirent.h: Include <bits/dirent.h> instead of
- <linux/dirent.h>.
- * libc/posix/Makefile.am: Remove reallocf.
- * libc/posix/Makefile.in: Regenerated.
- * libc/posix/reallocf.c: Moved to...
- * libc/stdlib/reallocf.c: Here
- * libc/stdlib/malloc.c: Add reallocf documentation.
- * libc/include/stdlib.h: Add reallocf and _reallocf_r prototypes.
- * libc/stdlib/Makefile.am: Add reallocf.
- * libc/stdlib/Makefile.in: Regenerated.
- * libc/posix/_isatty.c: Set errno.
-
-2008-11-19 Craig Howland <howland@LGSInnovations.com>
-
- * libc/unix/collate.c (__collate_err): simplify to remove unnecessary
- strdup() and strlen() calls, also getting rid of a compiler warning.
-
-2008-11-19 Ralf Corsepius <ralf.corsepius@rtems.org>
-
- * libc/include/sys/config.h: Don't put
- __ATTRIBUTE_IMPURE_PTR__ into .sdata section for mips-rtems.
-
-2008-11-19 Ralf Corsepius <ralf.corsepius@rtems.org>
-
- * libc/posix/runetype.h: Add include of stddef.h and remove
- defining standard types: size_t and wchar_t.
-
-2008-11-19 Ralf Corsepius <ralf.corsepius@rtems.org>
-
- * libc/include/pthread.h: Remove prototypes for
- pthread_attr_getcputime and pthread_attr_setcputime which
- were proposed but never approved by the POSIX standard.
-
-2008-11-18 Joel Sherrill <joel.sherrill@oarcorp.com>
-
- * libc/unix/ttyname.c: Use isatty() instead of tcgetattr().
-
-2008-11-18 Jeff Johnston <jjohnstn@redhat.com>
-
- * libc/unix/basename.c: Add !_NO_BASENAME flag check so code can be
- ignored if desired by a platform.
- * libc/unix/dirname.c: Ditto except replace BASENAME with file name.
- * libc/unix/getcwd.c: Ditto.
- * libc/unix/getlogin.c: Ditto.
- * libc/unix/getpass.c: Ditto.
- * libc/unix/getpwent.c: Ditto.
- * libc/unix/getut.c: Ditto.
- * libc/unix/pread.c: Ditto.
- * libc/unix/pwrite.c: Ditto.
- * libc/unix/sigset.c: Ditto.
-
-2008-11-18 Craig Howland <howland@LGSInnovations.com>
-
- * libc/unix/ttyname.c: Add ttyname_r and change ttyname to use
- ttyname_r.
-
-2008-11-17 Joel Sherrill <joel.sherrill@oarcorp.com>
-
- * configure.host: RTEMS now uses posix subdirectory.
-
-2008-11-17 Joel Sherrill <joel.sherrill@oarcorp.com>
-
- * sys/rtems/include/limits.h: Add _POSIX2_RE_DUP_MAX.
- * sys/rtems/sys/param.h: sys/rtprio.h not needed.
-
-2008-10-31 Jeff Johnston <jjohnstn@redhat.com>
-
- * libc/stdio/diprintf.c: Modify documentation so eclipse newlib
- libhover docs generate properly.
- * libc/stdio/dprintf.c: Ditto.
- * libc/stdio/fflush.c: Ditto.
- * libc/stdio/fopencookie.c: Ditto.
- * libc/stdio/fread.c: Ditto.
- * libc/stdio/fsetpos.c: Ditto.
- * libc/stdio/getc_u.c: Ditto.
- * libc/stdio/getchar_u.c: Ditto.
- * libc/stdio/putc_u.c: Ditto.
- * libc/stdio/putchar_u.c: Ditto.
- * libc/stdio/remove.c: Ditto.
- * libc/stdio/siprintf.c: Ditto.
- * libc/stdio/siscanf.c: Ditto.
- * libc/stdio/sprintf.c: Ditto.
- * libc/stdio/sscanf.c: Ditto.
- * libc/stdio/vfprintf.c: Ditto.
- * libc/stdio/vfscanf.c: Ditto.
- * libc/stdio/viprintf.c: Ditto.
- * libc/stdio/viscanf.c: Ditto.
- * libc/stdlib/calloc.c: Ditto.
- * libc/stdlib/efgcvt.c: Ditto.
- * libc/stdlib/envlock.c: Ditto.
- * libc/time/asctime.c: Ditto.
- * libc/time/ctime.c: Ditto.
- * libc/time/gmtime.c: Ditto.
- * libc/time/lcltime.c: Ditto.
- * libc/time/tzset.c: Ditto.
- * libc/stdlib/envlock.h: Moved to libc/include.
-
-2008-10-31 Jeff Johnston <jjohnstn@redhat.com>
-
- * libc/include/limits.h: Add ARG_MAX, PATH_MAX, and _POSIX2_RE_DUP_MAX.
- * libc/include/envlock.h: New file.
- * libc/include/fnmatch.h: Ditto.
- * libc/include/glob.h: Ditto.
- * libc/include/regex.h: Ditto.
- * libc/include/wordexp.h: Ditto.
- * libc/posix/Makefile.am: Add new files moved from
- libc/sys/linux/stdlib.
- * libc/posix/Makefile.in: Regenerated.
- * libc/posix/COPYRIGHT: New file moved from libc/sys/linux/stdlib.
- * libc/posix/cclass.h: Ditto.
- * libc/posix/cname.h: Ditto.
- * libc/posix/collate.c: Ditto.
- * libc/posix/collate.h: Ditto.
- * libc/posix/collcmp.c: Ditto.
- * libc/posix/engine.c: Ditto.
- * libc/posix/fnmatch.3: Ditto.
- * libc/posix/glob.3: Ditto.
- * libc/posix/fnmatch.c: Ditto.
- * libc/posix/glob.c: Ditto.
- * libc/posix/namespace.h: Ditto.
- * libc/posix/reallocf.c: Ditto.
- * libc/posix/regcomp.c: Ditto.
- * libc/posix/regerror.c: Ditto.
- * libc/posix/regex.3: Ditto.
- * libc/posix/regex2.h: Ditto.
- * libc/posix/regexec.c: Ditto.
- * libc/posix/regfree.c: Ditto.
- * libc/posix/rune.h: Ditto.
- * libc/posix/runetype.h: Ditto.
- * libc/posix/scandir.c: Remove advertising clause which is not in
- effect.
- * libc/posix/sysexits.h: Ditto.
- * libc/posix/un-namespace.h: Ditto.
- * libc/posix/utils.h: Ditto.
- * libc/posix/wordexp.c: Ditto.
- * libc/posix/wordfree.c: Ditto.
- * libc/posix/execl.c: Add !_NO_EXECVE flag check.
- * libc/posix/execle.c: Ditto.
- * libc/posix/execlp.c: Ditto.
- * libc/posix/execv.c: Ditto.
- * libc/posix/execve.c: Ditto.
- * libc/posix/execvp.c: Ditto.
- * libc/posix/popen.c: Add !_NO_POPEN flag check.
- * libc/sys/linux/configure: Regenerated.
- * libc/sys/linux/configure.in: Remove stdlib.
- * libc/sys/linux/include/limits.h: Add include of linux/limits.h.
- * libc/sys/linux/stdlib/Makefile.am: Removed.
- * libc/sys/linux/stdlib/Makefile.in: Ditto.
- * libc/sys/linux/stdlib/COPYRIGHT: Moved to libc/posix.
- * libc/sys/linux/stdlib/cclass.h: Ditto.
- * libc/sys/linux/stdlib/cname.h: Ditto.
- * libc/sys/linux/stdlib/collate.c: Ditto.
- * libc/sys/linux/stdlib/collate.h: Ditto.
- * libc/sys/linux/stdlib/collcmp.c: Ditto.
- * libc/sys/linux/stdlib/engine.c: Ditto.
- * libc/sys/linux/stdlib/fnmatch.3: Ditto.
- * libc/sys/linux/stdlib/fnmatch.c: Ditto.
- * libc/sys/linux/stdlib/glob.3: Ditto.
- * libc/sys/linux/stdlib/glob.c: Ditto.
- * libc/sys/linux/stdlib/reallocf.c: Ditto.
- * libc/sys/linux/stdlib/regcomp.c: Ditto.
- * libc/sys/linux/stdlib/regerror.c: Ditto.
- * libc/sys/linux/stdlib/regex.3: Ditto.
- * libc/sys/linux/stdlib/regex2.h: Ditto.
- * libc/sys/linux/stdlib/regexec.c: Ditto.
- * libc/sys/linux/stdlib/regfree.c: Ditto.
- * libc/sys/linux/stdlib/utils.h: Ditto.
- * libc/sys/linux/stdlib/wordexp.c: Ditto.
- * libc/sys/linux/stdlib/wordfree.c: Ditto.
-
-2008-10-16 Joel Sherrill <joel.sherrill@oarcorp.com>
-
- * libc/include/sys/unistd.h: RTEMS follows standard for sync().
-
-2008-10-16 Joel Sherrill <joel.sherrill@oarcorp.com>
-
- * libc/include/time.h: Add CLOCK_MONOTONIC.
- * libc/include/sys/features.h: Define
- _POSIX_MONOTONIC_CLOCK for RTEMS.
-
-2008-10-15 Jeff Johnston <jjohnstn@redhat.com>
-
- * newlib.hin: Restore to previous 1.14 version which has no
- PACKAGE_ macros.
-
-2008-10-15 Joel Sherrill <joel.sherrill@oarcorp.com>
-
- * libc/include/sys/unistd.h: Enable ttyname_r() for RTEMS.
-
-2008-10-15 Craig Howland <howland@LGSInnovations.com>
-
- * libc/include/ctype.h (isblank): isblank is C99.
- * libc/ctype/isblank.c (isblank comments): ditto. isblank does not
- have a macro version (as was claimed in the description).
-
-2008-10-15 Jeff Johnston <jjohnstn@redhat.com>
-
- * libc/stdio/vfscanf.c (__ssvfiscanf_r): Do not support %lc, %C, %ls or
- %S conversions when the EL/IX level is 1.
-
-2008-10-06 Eric Blake <ebb9@byu.net>
-
- * libc/stdlib/ldtoa.c (etoasc): Fix rounding to even when fraction
- is 0.5 or 0.75.
-
-2008-10-06 Craig Howland <howland@LGSInnovations.com>
-
- * libc/time/tzset_r.c (_tzset_r): Change US default start/end dates to
- 2007 law revision of start in 2nd Sunday in March, end 1st Sun in Nov.
-
-2008-10-02 Jeff Johnston <jjohnstn@redhat.com>
-
- * libc/string/str-two-way.h (critical_factorization): Cast the index
- operation to ensure unsigned rollover occurs when adding to SIZE_MAX.
-
-2008-10-02 Jeff Johnston <jjohnstn@redhat.com>
-
- * libc/sys/linux/include/stdint.h (SIZE_MAX): Fix value which should
- be size of size_t, not int.
- (SIZE_MIN): Remove.
- * libc/sys/linux/sys/stdint.h: Ditto.
-
-2008-10-02 Jeff Johnston <jjohnstn@redhat.com>
-
- * libc/include/sys/reent.h[_REENT_SMALL](_REENT_INIT_RAND48): Add
- initialization of _rand_next to 1.
-
-2008-09-29 Peter O'Gorman <pogma@thewrittenword.com>
- Steve Ellcey <sje@cup.hp.com>
-
- * configure: Regenerate for new libtool.
- * aclocal.m4: Ditto.
- * Makefile.in: Ditto.
- * newlib.hin: Ditto.
- * doc/Makefile.in: Ditto.
- * doc/configure: Ditto.
- * iconvdata/Makefile.in: Ditto.
- * iconvdata/aclocal.m4: Ditto.
- * iconvdata/configure: Ditto.
- * libc/Makefile.in: Ditto.
- * libc/aclocal.m4: Ditto.
- * libc/configure: Ditto.
- * libc/argz/Makefile.in: Ditto.
- * libc/ctype/Makefile.in: Ditto.
- * libc/errno/Makefile.in: Ditto.
- * libc/iconv/Makefile.in: Ditto.
- * libc/iconv/ccs/Makefile.in: Ditto.
- * libc/iconv/ccs/binary/Makefile.in: Ditto.
- * libc/iconv/ces/Makefile.in: Ditto.
- * libc/iconv/lib/Makefile.in: Ditto.
- * libc/locale/Makefile.in: Ditto.
- * libc/machine/Makefile.in: Ditto.
- * libc/machine/aclocal.m4: Ditto.
- * libc/machine/configure: Ditto.
- * libc/machine/a29k/Makefile.in: Ditto.
- * libc/machine/a29k/configure: Ditto.
- * libc/machine/arm/Makefile.in: Ditto.
- * libc/machine/arm/configure: Ditto.
- * libc/machine/bfin/Makefile.in: Ditto.
- * libc/machine/bfin/configure: Ditto.
- * libc/machine/cris/Makefile.in: Ditto.
- * libc/machine/cris/configure: Ditto.
- * libc/machine/crx/Makefile.in: Ditto.
- * libc/machine/crx/configure: Ditto.
- * libc/machine/d10v/Makefile.in: Ditto.
- * libc/machine/d10v/configure: Ditto.
- * libc/machine/d30v/Makefile.in: Ditto.
- * libc/machine/d30v/configure: Ditto.
- * libc/machine/fr30/Makefile.in: Ditto.
- * libc/machine/fr30/configure: Ditto.
- * libc/machine/frv/Makefile.in: Ditto.
- * libc/machine/frv/configure: Ditto.
- * libc/machine/h8300/Makefile.in: Ditto.
- * libc/machine/h8300/configure: Ditto.
- * libc/machine/h8500/Makefile.in: Ditto.
- * libc/machine/h8500/configure: Ditto.
- * libc/machine/hppa/Makefile.in: Ditto.
- * libc/machine/hppa/configure: Ditto.
- * libc/machine/i386/Makefile.in: Ditto.
- * libc/machine/i386/aclocal.m4: Ditto.
- * libc/machine/i386/configure: Ditto.
- * libc/machine/i960/Makefile.in: Ditto.
- * libc/machine/i960/configure: Ditto.
- * libc/machine/iq2000/Makefile.in: Ditto.
- * libc/machine/iq2000/configure: Ditto.
- * libc/machine/m32c/Makefile.in: Ditto.
- * libc/machine/m32c/configure: Ditto.
- * libc/machine/m32r/Makefile.in: Ditto.
- * libc/machine/m32r/configure: Ditto.
- * libc/machine/m68hc11/Makefile.in: Ditto.
- * libc/machine/m68hc11/configure: Ditto.
- * libc/machine/m68k/Makefile.in: Ditto.
- * libc/machine/m68k/configure: Ditto.
- * libc/machine/m88k/Makefile.in: Ditto.
- * libc/machine/m88k/configure: Ditto.
- * libc/machine/mep/Makefile.in: Ditto.
- * libc/machine/mep/configure: Ditto.
- * libc/machine/mips/Makefile.in: Ditto.
- * libc/machine/mips/configure: Ditto.
- * libc/machine/mn10200/Makefile.in: Ditto.
- * libc/machine/mn10200/configure: Ditto.
- * libc/machine/mn10300/Makefile.in: Ditto.
- * libc/machine/mn10300/configure: Ditto.
- * libc/machine/mt/Makefile.in: Ditto.
- * libc/machine/mt/configure: Ditto.
- * libc/machine/necv70/Makefile.in: Ditto.
- * libc/machine/necv70/configure: Ditto.
- * libc/machine/powerpc/Makefile.in: Ditto.
- * libc/machine/powerpc/configure: Ditto.
- * libc/machine/sh/Makefile.in: Ditto.
- * libc/machine/sh/configure: Ditto.
- * libc/machine/sparc/Makefile.in: Ditto.
- * libc/machine/sparc/configure: Ditto.
- * libc/machine/spu/Makefile.in: Ditto.
- * libc/machine/spu/configure: Ditto.
- * libc/machine/tic4x/Makefile.in: Ditto.
- * libc/machine/tic4x/configure: Ditto.
- * libc/machine/tic80/Makefile.in: Ditto.
- * libc/machine/tic80/configure: Ditto.
- * libc/machine/v850/Makefile.in: Ditto.
- * libc/machine/v850/configure: Ditto.
- * libc/machine/w65/Makefile.in: Ditto.
- * libc/machine/w65/configure: Ditto.
- * libc/machine/x86_64/Makefile.in: Ditto.
- * libc/machine/x86_64/configure: Ditto.
- * libc/machine/xscale/Makefile.in: Ditto.
- * libc/machine/xscale/configure: Ditto.
- * libc/machine/xstormy16/Makefile.in: Ditto.
- * libc/machine/xstormy16/configure: Ditto.
- * libc/machine/z8k/Makefile.in: Ditto.
- * libc/machine/z8k/configure: Ditto.
- * libc/misc/Makefile.in: Ditto.
- * libc/posix/Makefile.in: Ditto.
- * libc/reent/Makefile.in: Ditto.
- * libc/search/Makefile.in: Ditto.
- * libc/signal/Makefile.in: Ditto.
- * libc/stdio/Makefile.in: Ditto.
- * libc/stdio64/Makefile.in: Ditto.
- * libc/stdlib/Makefile.in: Ditto.
- * libc/string/Makefile.in: Ditto.
- * libc/sys/Makefile.in: Ditto.
- * libc/sys/aclocal.m4: Ditto.
- * libc/sys/configure: Ditto.
- * libc/sys/a29khif/Makefile.in: Ditto.
- * libc/sys/a29khif/configure: Ditto.
- * libc/sys/arc/Makefile.in: Ditto.
- * libc/sys/arc/configure: Ditto.
- * libc/sys/arm/Makefile.in: Ditto.
- * libc/sys/arm/configure: Ditto.
- * libc/sys/d10v/Makefile.in: Ditto.
- * libc/sys/d10v/configure: Ditto.
- * libc/sys/decstation/Makefile.in: Ditto.
- * libc/sys/decstation/configure: Ditto.
- * libc/sys/h8300hms/Makefile.in: Ditto.
- * libc/sys/h8300hms/configure: Ditto.
- * libc/sys/h8500hms/Makefile.in: Ditto.
- * libc/sys/h8500hms/configure: Ditto.
- * libc/sys/linux/Makefile.in: Ditto.
- * libc/sys/linux/aclocal.m4: Ditto.
- * libc/sys/linux/configure: Ditto.
- * libc/sys/linux/argp/Makefile.in: Ditto.
- * libc/sys/linux/cmath/Makefile.in: Ditto.
- * libc/sys/linux/dl/Makefile.in: Ditto.
- * libc/sys/linux/iconv/Makefile.in: Ditto.
- * libc/sys/linux/intl/Makefile.in: Ditto.
- * libc/sys/linux/linuxthreads/Makefile.in: Ditto.
- * libc/sys/linux/linuxthreads/aclocal.m4: Ditto.
- * libc/sys/linux/linuxthreads/configure: Ditto.
- * libc/sys/linux/linuxthreads/machine/Makefile.in: Ditto.
- * libc/sys/linux/linuxthreads/machine/aclocal.m4: Ditto.
- * libc/sys/linux/linuxthreads/machine/configure: Ditto.
- * libc/sys/linux/linuxthreads/machine/i386/Makefile.in: Ditto.
- * libc/sys/linux/linuxthreads/machine/i386/aclocal.m4: Ditto.
- * libc/sys/linux/linuxthreads/machine/i386/configure: Ditto.
- * libc/sys/linux/machine/Makefile.in: Ditto.
- * libc/sys/linux/machine/aclocal.m4: Ditto.
- * libc/sys/linux/machine/configure: Ditto.
- * libc/sys/linux/machine/i386/Makefile.in: Ditto.
- * libc/sys/linux/machine/i386/aclocal.m4: Ditto.
- * libc/sys/linux/machine/i386/configure: Ditto.
- * libc/sys/linux/net/Makefile.in: Ditto.
- * libc/sys/linux/stdlib/Makefile.in: Ditto.
- * libc/sys/m88kbug/Makefile.in: Ditto.
- * libc/sys/m88kbug/configure: Ditto.
- * libc/sys/mmixware/Makefile.in: Ditto.
- * libc/sys/mmixware/configure: Ditto.
- * libc/sys/netware/Makefile.in: Ditto.
- * libc/sys/netware/configure: Ditto.
- * libc/sys/rdos/Makefile.in: Ditto.
- * libc/sys/rdos/configure: Ditto.
- * libc/sys/rtems/Makefile.in: Ditto.
- * libc/sys/rtems/configure: Ditto.
- * libc/sys/sh/Makefile.in: Ditto.
- * libc/sys/sh/configure: Ditto.
- * libc/sys/sparc64/Makefile.in: Ditto.
- * libc/sys/sparc64/configure: Ditto.
- * libc/sys/sun4/Makefile.in: Ditto.
- * libc/sys/sun4/configure: Ditto.
- * libc/sys/sysmec/Makefile.in: Ditto.
- * libc/sys/sysmec/configure: Ditto.
- * libc/sys/sysnec810/Makefile.in: Ditto.
- * libc/sys/sysnec810/configure: Ditto.
- * libc/sys/sysnecv850/Makefile.in: Ditto.
- * libc/sys/sysnecv850/configure: Ditto.
- * libc/sys/sysvi386/Makefile.in: Ditto.
- * libc/sys/sysvi386/configure: Ditto.
- * libc/sys/sysvnecv70/Makefile.in: Ditto.
- * libc/sys/sysvnecv70/configure: Ditto.
- * libc/sys/tic80/Makefile.in: Ditto.
- * libc/sys/tic80/configure: Ditto.
- * libc/sys/w65/Makefile.in: Ditto.
- * libc/sys/w65/configure: Ditto.
- * libc/sys/z8ksim/Makefile.in: Ditto.
- * libc/sys/z8ksim/configure: Ditto.
- * libc/syscalls/Makefile.in: Ditto.
- * libc/time/Makefile.in: Ditto.
- * libc/unix/Makefile.in: Ditto.
- * libm/Makefile.in: Ditto.
- * libm/aclocal.m4: Ditto.
- * libm/configure: Ditto.
- * libm/common/Makefile.in: Ditto.
- * libm/machine/Makefile.in: Ditto.
- * libm/machine/aclocal.m4: Ditto.
- * libm/machine/configure: Ditto.
- * libm/machine/i386/Makefile.in: Ditto.
- * libm/machine/i386/aclocal.m4: Ditto.
- * libm/machine/i386/configure: Ditto.
- * libm/machine/spu/Makefile.in: Ditto.
- * libm/machine/spu/configure: Ditto.
- * libm/math/Makefile.in: Ditto.
- * libm/mathfp/Makefile.in: Ditto.
-
-2008-09-26 Craig Howland <howland@LGSInnovations.com>
-
- * libc/stdlib/getenv_r.c (_getenv_r): Modify to not match if name
- contains an equal sign.
-
-2008-09-25 Raphael Derossa Pereira <raphaelpereira@gmail.com>
-
- * libc/include/pthread.h[_UNIX98_THREAD_MUTEX_ATTRIBUTES]: Add
- new pthread_mutexattr_gettype and pthread_mutexattr_settype
- prototypes.
- * libc/include/sys/types.h[_UNIX98_THREAD_MUTEX_ATTRIBUTES]: Add
- new mutex type values.
- (pthread_mutexattr_t)[_UNIX98_THREAD_MUTEX_ATTRIBUTES]: Add type
- field.
-
-2008-09-24 Jeff Johnston <jjohnstn@redhat.com>
-
- * libc/stdlib/setenv_r.c (_unsetenv_r): Modify to return -1 only if
- name is NULL, empty, or contains equal sign.
-
-2008-09-24 Pawel Veselov <pawel.veselov@gmail.com>
-
- Fix setenv/getenv/unsetenv to be OpenGroup compliant:
- * libc/include/stdlib.h (unsetenv, _unsetenv_r): Redefine with integer
- return types.
- * libc/stdlib/getenv_r.c (_findenv_r): Do no special processing with
- names that contain equal chars.
- * libc/stdlib/setenv.c: Redefine _unsetenv_r as returning int.
- * libc/stdlib/setenv_r.c (_setenv_r): Return -1 and set errno to
- EINVAL if name contains an equal sign. Do not remove any equal signs
- from the value.
- (_unsetenv_r): Modified to return int. Return -1 and set EINVAL
- if name contains equal sign. Return -1 if no variable(s) were found
- and return 0 otherwise.
-
-2008-09-19 Eric Blake <ebb9@byu.net>
-
- Supply missing POSIX errno values.
- * libc/include/sys/errno.h (ENOTRECOVERABLE, EOWNERDEAD): Define.
- * libc/string/strerror.c (strerror): Decode them, and ECANCELED.
-
-2008-09-10 Ken Werner <ken.werner@de.ibm.com>
-
- * libc/machine/spu/strcpy.h: Add missing header.
- * libc/machine/spu/spu_timer_slih.c: Remove unused Variable.
- * libm/machine/spu/headers/lgammaf4.h: Add type cast.
-
-2008-09-08 Jeff Johnston <jjohnstn@redhat.com>
-
- * libc/sys/linux/dl/atomicity.h (exchange_and_add): Fix asm
- statement to use "m" instead of "0".
- (atomic_add): Ditto.
- * libc/sys/linux/linuxthreads/spinlock.c (__pthread_release): Ditto.
- * libc/sys/linux/net/getaddrinfo.c: Add limit.h include.
- * libc/sys/linux/stdlib/glob.c: Ditto.
-
-2008-09-04 Ken Werner <ken.werner@de.ibm.com>
-
- * libm/machine/spu/headers/acosd2.h: Duplicated preamble text removed.
- * libm/machine/spu/headers/acosf4.h: Likewise.
- * libm/machine/spu/headers/acoshd2.h: Likewise.
- * libm/machine/spu/headers/acoshf4.h: Likewise.
- * libm/machine/spu/headers/asind2.h: Likewise.
- * libm/machine/spu/headers/asinf4.h: Likewise.
- * libm/machine/spu/headers/asinhd2.h: Likewise.
- * libm/machine/spu/headers/asinhf4.h: Likewise.
- * libm/machine/spu/headers/atan2d2.h: Likewise.
- * libm/machine/spu/headers/atan2f4.h: Likewise.
- * libm/machine/spu/headers/atand2.h: Likewise.
- * libm/machine/spu/headers/atanf4.h: Likewise.
- * libm/machine/spu/headers/atanhd2.h: Likewise.
- * libm/machine/spu/headers/atanhf4.h: Likewise.
- * libm/machine/spu/headers/cos_sin.h: Likewise.
- * libm/machine/spu/headers/cosd2.h: Likewise.
- * libm/machine/spu/headers/cosf4.h: Likewise.
- * libm/machine/spu/headers/coshd2.h: Likewise.
- * libm/machine/spu/headers/coshf4.h: Likewise.
- * libm/machine/spu/headers/divd2.h: Likewise.
- * libm/machine/spu/headers/divf4.h: Likewise.
- * libm/machine/spu/headers/erf_utils.h: Likewise.
- * libm/machine/spu/headers/erfcd2.h: Likewise.
- * libm/machine/spu/headers/erfcf4.h: Likewise.
- * libm/machine/spu/headers/erfd2.h: Likewise.
- * libm/machine/spu/headers/erff4.h: Likewise.
- * libm/machine/spu/headers/exp2d2.h: Likewise.
- * libm/machine/spu/headers/exp2f4.h: Likewise.
- * libm/machine/spu/headers/expd2.h: Likewise.
- * libm/machine/spu/headers/expf4.h: Likewise.
- * libm/machine/spu/headers/expm1d2.h: Likewise.
- * libm/machine/spu/headers/expm1f4.h: Likewise.
- * libm/machine/spu/headers/floord2.h: Likewise.
- * libm/machine/spu/headers/floorf4.h: Likewise.
- * libm/machine/spu/headers/hypotd2.h: Likewise.
- * libm/machine/spu/headers/hypotf4.h: Likewise.
- * libm/machine/spu/headers/isnand2.h: Likewise.
- * libm/machine/spu/headers/isnanf4.h: Likewise.
- * libm/machine/spu/headers/ldexpd2.h: Likewise.
- * libm/machine/spu/headers/ldexpf4.h: Likewise.
- * libm/machine/spu/headers/lgammad2.h: Likewise.
- * libm/machine/spu/headers/lgammaf4.h: Likewise.
- * libm/machine/spu/headers/log10d2.h: Likewise.
- * libm/machine/spu/headers/log1pd2.h: Likewise.
- * libm/machine/spu/headers/log1pf4.h: Likewise.
- * libm/machine/spu/headers/log2d2.h: Likewise.
- * libm/machine/spu/headers/log2f4.h: Likewise.
- * libm/machine/spu/headers/logbf4.h: Likewise.
- * libm/machine/spu/headers/logd2.h: Likewise.
- * libm/machine/spu/headers/logf4.h: Likewise.
- * libm/machine/spu/headers/nearbyintf4.h: Likewise.
- * libm/machine/spu/headers/nextafterd2.h: Likewise.
- * libm/machine/spu/headers/nextafterf4.h: Likewise.
- * libm/machine/spu/headers/powd2.h: Likewise.
- * libm/machine/spu/headers/powf4.h: Likewise.
- * libm/machine/spu/headers/recipd2.h: Likewise.
- * libm/machine/spu/headers/recipf4.h: Likewise.
- * libm/machine/spu/headers/rintf4.h: Likewise.
- * libm/machine/spu/headers/scalbnf4.h: Likewise.
- * libm/machine/spu/headers/signbitd2.h: Likewise.
- * libm/machine/spu/headers/sincosd2.h: Likewise.
- * libm/machine/spu/headers/sincosf4.h: Likewise.
- * libm/machine/spu/headers/sind2.h: Likewise.
- * libm/machine/spu/headers/sinf4.h: Likewise.
- * libm/machine/spu/headers/sinhd2.h: Likewise.
- * libm/machine/spu/headers/sinhf4.h: Likewise.
- * libm/machine/spu/headers/sqrtd2.h: Likewise.
- * libm/machine/spu/headers/sqrtf4.h: Likewise.
- * libm/machine/spu/headers/tand2.h: Likewise.
- * libm/machine/spu/headers/tanf4.h: Likewise.
- * libm/machine/spu/headers/tanhd2.h: Likewise.
- * libm/machine/spu/headers/tanhf4.h: Likewise.
- * libm/machine/spu/headers/tgammad2.h: Likewise.
- * libm/machine/spu/headers/tgammaf4.h: Likewise.
- * libm/machine/spu/headers/truncd2.h: Likewise.
- * libm/machine/spu/headers/truncf4.h: Likewise.
- * libm/machine/spu/headers/simdmath.h: Likewise.
-
-2008-09-04 Ken Werner <ken.werner@de.ibm.com>
-
- * libm/machine/spu/headers/acoshf4.h: Rebase against current simdmath.
- * libm/machine/spu/headers/asinhd2.h: Likewise.
- * libm/machine/spu/headers/atanhd2.h: Likewise.
- * libm/machine/spu/headers/atanhf4.h: Likewise.
- * libm/machine/spu/headers/erff4.h: Likewise.
- * libm/machine/spu/headers/expd2.h: Likewise.
- * libm/machine/spu/headers/ldexpd2.h: Likewise.
- * libm/machine/spu/headers/lgammaf4.h: Likewise.
- * libm/machine/spu/headers/logbf4.h: Likewise.
- * libm/machine/spu/headers/nextafterd2.h: Likewise.
- * libm/machine/spu/headers/nextafterf4.h: Likewise.
- * libm/machine/spu/headers/recipd2.h: Likewise.
- * libm/machine/spu/headers/simdmath.h: Likewise.
- * libm/machine/spu/headers/acoshd2.: Likewise.
-
-2008-09-04 Ken Werner <ken.werner@de.ibm.com>
-
- * libm/machine/spu/headers/cbrt.h: cbrt_factors[] declared.
- * libm/machine/spu/headers/cbrtf.h: Likewise.
-
-2008-09-01 Ken Werner <ken.werner@de.ibm.com>
-
- * libc/machine/spu/include/spu_timer.h: spu_timebase function added.
- * libc/machine/spu/spu_timebase.c: New file.
- * libc/machine/spu/Makefile.am: Add new file.
- * libc/machine/spu/Makefile.in: Regenerated.
-
-2008-08-28 Craig Howland <howland@LGSInnovations.com>
-
- * libc/time/mktime.c (mktime): Fix tm_isdst value usage (allowing
- any positive value from user (per std) rather than depending
- upon 1).
-
-2008-08-28 Corinna Vinschen <corinna@vinschen.de>
-
- * libc/stdlib/wcsrtombs.c (_wcsrtombs_r): Optimize condition
- for accepting a converted character.
-
-2008-08-27 Sandra Loosemore <sandra@codesourcery.com>
-
- * libc/libc.texinfo: Remove "LOCAL KLUGE" that prevents it
- from building pdfs.
- * libm/libm.texinfo: Likewise.
-
-2008-08-27 Corinna Vinschen <corinna@vinschen.de>
-
- * libc/stdlib/wcsrtombs.c (_wcsrtombs_r): Fix condition for
- accepting a converted character and continuing the loop.
-
-2008-07-24 Jeff Johnston <jjohnstn@redhat.com>
-
- * libc/include/ctype.h (_ctype_): Restore for C++ backward
- compatability only.
-
-2008-07-21 Jeff Johnston <jjohnstn@redhat.com>
-
- * libc/ctype/ctype_.c: Add new pointer __ctype_ptr__ which is one
- less than the old __ctype_ptr.
- * libc/ctype/isalnum.c: Use __ctype_ptr__.
- * libc/ctype/isalpha.c: Ditto.
- * libc/ctype/iscntrl.c: Ditto.
- * libc/ctype/isdigit.c: Ditto.
- * libc/ctype/islower.c: Ditto.
- * libc/ctype/isprint.c: Ditto.
- * libc/ctype/ispunct.c: Ditto.
- * libc/ctype/isspace.c: Ditto.
- * libc/ctype/isupper.c: Ditto.
- * libc/ctype/isxdigit.c: Ditto.
- * libc/include/ctype.h: Change ctype macros to use new __ctype_ptr__
- and add declaration of __ctype_ptr__. Remove older ctype table pointers
- from here even though they can still work.
-
-2008-07-18 Ken Werner <ken.werner@de.ibm.com>
-
- * libc/machine/spu/strcpy.h: Fix error in previous patch.
-
-2008-07-17 Jeff Johnston <jjohnstn@redhat.com>
-
- * libc/include/assert.h (__ASSERT_FUNC): Define to __FUNCTION__ when
- __STDC_VERSION__ < 199901L and __GNUC__ >= 2.
-
-2008-07-17 Ken Werner <ken.werner@de.ibm.com>
-
- * libc/machine/spu/strcpy.h: Pad null bytes if necessary.
-
-2008-07-08 Kenji Tanaka <tanaka.ken2@jp.panasonic.com>
-
- * libc/machine/mn10300/memset.S: Fix bug where return value is
- incorrectly set if number of bytes set is a multiple of 4.
-
-2008-07-07 Hans-Peter Nilsson <hp@axis.com>
-
- * libc/machine/mips/strncpy.c: Include stdint.h to get uintptr_t.
- (strncpy): Cast src to uintptr_t before checking alignment with "&".
-
-2008-07-02 Jeff Johnston <jjohnstn@redhat.com>
-
- * libc/argz/argz_count.c: Include stddef.h to get size_t.
- * libc/argz/argz_extract.c: Ditto.
- * libc/argz/argz_stringify.c: Ditto.
- * libc/search/hash.h: Ditto.
- * libc/sys/linux/include/sched.h: Ditto.
- * libc/sys/linux/sys/types.h: Ditto.
-
-2008-07-02 Jeff Johnston <jjohnstn@redhat.com>
-
- * libc/machine/mips/strncpy.c (strncpy): Fix logic so unaligned
- source data is taken care of before loop unrolling.
-
-2008-06-25 Hans-Peter Nilsson <hp@axis.com>
-
- Fix strict-aliasing issues with _strtod_r and Storeinc.
- * libc/stdlib/strtod.c (_strtod_r): Change local variables aadj,
- rv, rv0 from double to type U. Use accessor macros dval, dword0
- and dword1 for all accesses except for the ULtod call, where rv.i
- replaces the pointer cast.
- * libc/stdlib/mprec.h (U): Rename member L to i for easier re-use
- of access macros. Tweak comment.
- Remove #ifdef'd YES_ALIAS code.
- (dword0, dword1, dval): Define in terms of uncast union member
- access. Ditto for _DOUBLE_IS_32BITS variants.
- (Storeinc): Replace aliasing-flawed microoptimized definition with
- alternative suggested in comment. Remove now stale comment.
-
-2008-06-21 Corinna Vinschen <corinna@vinschen.de>
-
- * libc/include/machine/setjmp.h (_longjmp): Define as function on
- Cygwin.
- (_setjmp): Ditto.
-
-2008-06-18 Eric Blake <ebb9@byu.net>
-
- Per Posix, strsignal returns non-const char*.
- * libc/include/string.h (strsignal): Fix return type.
-
-2008-06-17 Ken Werner <ken.werner@de.ibm.com>
-
- * libc/machine/spu/sys/linux_syscalls.h: New file to add Linux syscall
- support.
-
-2008-06-16 Ken Werner <ken.werner@de.ibm.com>
-
- * libc/machine/spu/sys/dirent.h: Add extern "C" specifier if C++.
- * libc/machine/spu/sys/sched.h: Likewise.
- * libc/machine/spu/sys/syscall.h: Likewise.
-
-2008-06-16 Ken Werner <ken.werner@de.ibm.com>
-
- * libc/machine/spu/mk_syscalls: Provide .type and .size directives
- in generated assembler files.
- * libc/machine/spu/fprintf.S: Regenerate.
- * libc/machine/spu/fscanf.S: Regenerate.
- * libc/machine/spu/printf.S: Regenerate.
- * libc/machine/spu/scanf.S: Regenerate.
- * libc/machine/spu/snprintf.S: Regenerate.
- * libc/machine/spu/sprintf.S: Regenerate.
- * libc/machine/spu/sscanf.S: Regenerate.
- * libc/machine/spu/stack_reg_va.S (__stack_reg_va): Provide .type
- and .size directives.
- * libc/machine/spu/setjmp.S (setjmp): Likewise.
- (longjmp): Likewise.
-
-2008-06-11 Jeff Johnston <jjohnstn@redhat.com>
-
- * libc/include/machine/_default_types.h: Fix GNUC check to
- handle 4.0 and greater.
-
-2008-06-09 Ken Werner <ken.werner@de.ibm.com>
-
- * libc/machine/spu/Makefile.am: Add new files.
- * libc/machine/spu/Makefile.in: Likewise.
- * libc/machine/spu/include/spu_timer.h: New file to add timer support
- using interrupts.
- * libc/machine/spu/spu_clock_stop.c: Likewise.
- * libc/machine/spu/spu_clock_svcs.c: Likewise.
- * libc/machine/spu/spu_timer_flih.S: Likewise.
- * libc/machine/spu/spu_timer_free.c: Likewise.
- * libc/machine/spu/spu_timer_internal.h: Likewise.
- * libc/machine/spu/spu_timer_slih.c: Likewise.
- * libc/machine/spu/spu_timer_slih_reg.c: Likewise.
- * libc/machine/spu/spu_timer_stop.c: Likewise.
- * libc/machine/spu/spu_timer_svcs.c: Likewise.
-
-2008-06-09 Ken Werner <ken.werner@de.ibm.com>
-
- * libc/machine/spu/strcat.c: Return value fixed.
- * libc/machine/spu/strncat.c: Likewise.
-
-2008-05-28 Eric Blake <ebb9@byu.net>
-
- Fix bug in previous patch.
- * libc/machine/i386/memset.S (memset): Mask second arg correctly.
-
-2008-05-27 Jeff Johnston <jjohnstn@redhat.com>
-
- * libc/string/memset.c: Fix documented prototype to remove
- erroneous const attribute on first parameter.
-
-2008-05-26 Eric Blake <ebb9@byu.net>
-
- Optimize the generic and x86 memchr.
- * libc/string/memchr.c (memchr) [!__OPTIMIZE_SIZE__]:
- Pre-align pointer so unaligned searches aren't penalized.
- * libc/machine/i386/memchr.S (memchr) [!__OPTIMIZE_SIZE__]: Word
- operations are faster than repnz byte searches.
-
-2008-05-26 Eric Blake <ebb9@byu.net>
-
- Optimize the generic and x86 memset.
- * libc/string/memset.c (memset) [!__OPTIMIZE_SIZE__]:
- Pre-align pointer so unaligned stores aren't penalized.
- * libc/machine/i386/memset.S (memset) [!__OPTIMIZE_SIZE__]:
- Pre-align pointer so unaligned stores aren't penalized. Prefer
- 8-byte over 4-byte alignment. Reduce register pressure.
-
-2008-05-26 Eric Blake <ebb9@byu.net>
-
- Optimize the generic and x86 strlen.
- * libc/string/strlen.c (strlen) [!__OPTIMIZE_SIZE__]: Pre-align
- data so unaligned searches aren't penalized.
- * libc/machine/i386/strlen.S (strlen) [!__OPTIMIZE_SIZE__]:
- Word operations are faster than repnz byte searches.
-
-2008-05-23 Corinna Vinschen <corinna@vinschen.de>
-
- * libc/include/sys/_default_fcntl.h: Include <sys/time.h> on Cygwin.
-
-2008-05-22 Jeff Johnston <jjohnstn@redhat.com>
-
- * libc/include/sys/reent.h: Add _h_errno field.
- * libc/sys/linux/libc-symbols.h: Add default stubs for new libc macros
- now used in net directory.
- * libc/sys/linux/bits/libc-lock.h: Always define _IO_MTSAFE_IO.
- * libc/sys/linux/include/hesiod.h: Add needed macros for new code
- in net directory.
- * libc/sys/linux/include/netdb.h: Ditto.
- * libc/sys/linux/include/resolv.h: Ditto.
- * libc/sys/linux/include/stdint.h: Ditto.
- * libc/sys/linux/include/arpa/nameser.h: Ditto.
- * libc/sys/linux/include/net/ethernet.h: Ditto.
- * libc/sys/linux/include/net/if_ppp.h: Ditto.
- * libc/sys/linux/include/netinet/if_ether.h: Ditto.
- * libc/sys/linux/machine/i386/get_clockfreq.c: Remove static memmem.
- * libc/sys/linux/machine/i386/include/endian.h: Protect macros with
- flags to avoid duplicate definition.
- * libc/sys/linux/machine/i386/include/param.h: Ditto.
- * libc/sys/linux/net/Makefile.am: Modified to account for removed and
- added files.
- * libc/sys/linux/net/Makefile.in: Regenerated.
- * libc/sys/linux/net/base64.c: Replaced with glibc version of code.
- * libc/sys/linux/net/getaddrinfo.c: Ditto.
- * libc/sys/linux/net/getnameinfo.c: Ditto.
- * libc/sys/linux/net/getproto.c: Ditto.
- * libc/sys/linux/net/getservent.c: Ditto.
- * libc/sys/linux/net/inet_netof.c: Ditto.
- * libc/sys/linux/net/inet_lnaof.c: Ditto.
- * libc/sys/linux/net/ns_name.c: Ditto.
- * libc/sys/linux/net/ns_netint.c: Ditto.
- * libc/sys/linux/net/inet_ntoa.c: Ditto.
- * libc/sys/linux/net/ns_parse.c: Ditto.
- * libc/sys/linux/net/ns_print.c: Ditto.
- * libc/sys/linux/net/ns_ttl.c: Ditto.
- * libc/sys/linux/net/nsap_addr.c: Ditto.
- * libc/sys/linux/net/rcmd.c: Ditto.
- * libc/sys/linux/net/res_comp.c: Ditto.
- * libc/sys/linux/net/res_data.c: Ditto.
- * libc/sys/linux/net/res_debug.c: Ditto.
- * libc/sys/linux/net/res_init.c: Ditto.
- * libc/sys/linux/net/res_mkquery.c: Ditto.
- * libc/sys/linux/net/res_query.c: Ditto.
- * libc/sys/linux/net/res_send.c: Ditto.
- * libc/sys/linux/net/send.c: Ditto.
- * libc/sys/linux/stdlib/collate.c: Ditto.
- * libc/sys/linux/sys/ioctl.h: Ditto.
- * libc/sys/linux/sys/socket.h: Ditto.
- * libc/sys/linux/sys/unistd.h: Ditto.
- * libc/sys/linux/iconv/iconvconfig.c: Removed either because no longer
- used or because licensing includes advertising clause that cannot be
- ignored.
- * libc/sys/linux/iconv/strtab.c: Ditto.
- * libc/sys/linux/include/libc_private.h: Ditto.
- * libc/sys/linux/include/nsswitch.h: Ditto.
- * libc/sys/linux/include/net/if_atm.h: Ditto.
- * libc/sys/linux/include/net/if_media.h: Ditto.
- * libc/sys/linux/include/net/if_pppvar.h: Ditto.
- * libc/sys/linux/include/netinet/if_atm.h: Ditto.
- * libc/sys/linux/include/netinet/ip_flow.h: Ditto.
- * libc/sys/linux/intl/locale.alias: Ditto.
- * libc/sys/linux/net/addr2ascii.3: Ditto.
- * libc/sys/linux/net/bindresvport.c: Ditto.
- * libc/sys/linux/net/byteorder.3: Ditto.
- * libc/sys/linux/net/res_config.h: Ditto.
- * libc/sys/linux/net/ether_addr.c: Ditto.
- * libc/sys/linux/net/ethers.3: Ditto.
- * libc/sys/linux/net/getaddrinfo.3: Ditto.
- * libc/sys/linux/net/gethostbydns.c: Ditto.
- * libc/sys/linux/net/gethostbyht.c: Ditto.
- * libc/sys/linux/net/gethostbyname.3: Ditto.
- * libc/sys/linux/net/gethostbynis.c: Ditto.
- * libc/sys/linux/net/gethostnamadr.c: Ditto.
- * libc/sys/linux/net/getifaddrs.3: Ditto.
- * libc/sys/linux/net/getifaddrs.c: Ditto.
- * libc/sys/linux/net/getipnodebyname.3: Ditto.
- * libc/sys/linux/net/getnameinfo.3: Ditto.
- * libc/sys/linux/net/getnetbydns.c: Ditto.
- * libc/sys/linux/net/getnetbyht.c: Ditto.
- * libc/sys/linux/net/getnetbynis.c: Ditto.
- * libc/sys/linux/net/getnetent.3: Ditto.
- * libc/sys/linux/net/getnetnamadr.c: Ditto.
- * libc/sys/linux/net/getprotoent.3: Ditto.
- * libc/sys/linux/net/getprotoent.c: Ditto.
- * libc/sys/linux/net/getprotoname.c: Ditto.
- * libc/sys/linux/net/getservbyname.c: Ditto.
- * libc/sys/linux/net/getservbyport.c: Ditto.
- * libc/sys/linux/net/getservent.3: Ditto.
- * libc/sys/linux/net/herror.c: Ditto.
- * libc/sys/linux/net/hesiod.3: Ditto.
- * libc/sys/linux/net/hesiod.c: Ditto.
- * libc/sys/linux/net/if_indextoname.3: Ditto.
- * libc/sys/linux/net/inet.3: Ditto.
- * libc/sys/linux/net/inet6_option_space.3: Ditto.
- * libc/sys/linux/net/inet6_rthdr_space.3: Ditto.
- * libc/sys/linux/net/inet_makeaddr.c: Ditto.
- * libc/sys/linux/net/inet_net.3: Ditto.
- * libc/sys/linux/net/inet_network.c: Ditto.
- * libc/sys/linux/net/innetgr-stub.c: Ditto.
- * libc/sys/linux/net/ip6opt.c: Ditto.
- * libc/sys/linux/net/iso_addr.3: Ditto.
- * libc/sys/linux/net/iso_addr.c: Ditto.
- * libc/sys/linux/net/linkaddr.3: Ditto.
- * libc/sys/linux/net/linkaddr.c: Ditto.
- * libc/sys/linux/net/map_v4v6.c: Ditto.
- * libc/sys/linux/net/name6.c: Ditto.
- * libc/sys/linux/net/namespace.h: Ditto.
- * libc/sys/linux/net/ns.3: Ditto.
- * libc/sys/linux/net/ns_addr.c: Ditto.
- * libc/sys/linux/net/ns_ntoa.c: Ditto.
- * libc/sys/linux/net/nsdispatch.3: Ditto.
- * libc/sys/linux/net/nsdispatch.c: Ditto.
- * libc/sys/linux/net/nslexer.c: Ditto.
- * libc/sys/linux/net/nslexer.l: Ditto.
- * libc/sys/linux/net/nsparser.c: Ditto.
- * libc/sys/linux/net/nsparser.h: Ditto.
- * libc/sys/linux/net/nsparser.y: Ditto.
- * libc/sys/linux/net/rcmd.3: Ditto.
- * libc/sys/linux/net/rcmdsh.3: Ditto.
- * libc/sys/linux/net/res_mkupdate.c: Ditto.
- * libc/sys/linux/net/res_update.c: Ditto.
- * libc/sys/linux/net/resolver.3: Ditto.
- * libc/sys/linux/net/rthdr.c: Ditto.
- * libc/sys/linux/net/vars.c: Ditto.
- * libc/sys/linux/shlib-compat.h: New file.
- * libc/sys/linux/machine/i386/atomic.h: Ditto.
- * libc/sys/linux/net/XXX-lookup.c: Ditto.
- * libc/sys/linux/net/alias-lookup.c: Ditto.
- * libc/sys/linux/net/res_libc.c: Ditto.
- * libc/sys/linux/net/aliases.h: Ditto.
- * libc/sys/linux/net/check_pf.c: Ditto.
- * libc/sys/linux/net/databases.def: Ditto.
- * libc/sys/linux/net/digits_dots.c: Ditto.
- * libc/sys/linux/net/ether_aton.c: Ditto.
- * libc/sys/linux/net/ether_aton_r.c: Ditto.
- * libc/sys/linux/net/ether_hton.c: Ditto.
- * libc/sys/linux/net/ether_line.c: Ditto.
- * libc/sys/linux/net/ether_ntoa.c: Ditto.
- * libc/sys/linux/net/ether_ntoa_r.c: Ditto.
- * libc/sys/linux/net/ether_ntoh.c: Ditto.
- * libc/sys/linux/net/etherent.h: Ditto.
- * libc/sys/linux/net/ethers-lookup.c: Ditto.
- * libc/sys/linux/net/function.def: Ditto.
- * libc/sys/linux/net/getXXbyYY.c: Ditto.
- * libc/sys/linux/net/getXXbyYY_r.c: Ditto.
- * libc/sys/linux/net/getXXent.c: Ditto.
- * libc/sys/linux/net/getXXent_r.c: Ditto.
- * libc/sys/linux/net/getaliasent.c: Ditto.
- * libc/sys/linux/net/getaliasent_r.c: Ditto.
- * libc/sys/linux/net/getaliasname.c: Ditto.
- * libc/sys/linux/net/getaliasname_r.c: Ditto.
- * libc/sys/linux/net/gethstbyad.c: Ditto.
- * libc/sys/linux/net/gethstbyad_r.c: Ditto.
- * libc/sys/linux/net/gethstbynm.c: Ditto.
- * libc/sys/linux/net/gethstbynm2.c: Ditto.
- * libc/sys/linux/net/gethstbynm2_r.c: Ditto.
- * libc/sys/linux/net/gethstbynm_r.c: Ditto.
- * libc/sys/linux/net/gethstent.c: Ditto.
- * libc/sys/linux/net/gethstent_r.c: Ditto.
- * libc/sys/linux/net/getnetbyad.c: Ditto.
- * libc/sys/linux/net/getnetbyad_r.c: Ditto.
- * libc/sys/linux/net/getnetbynm.c: Ditto.
- * libc/sys/linux/net/getnetbynm_r.c: Ditto.
- * libc/sys/linux/net/getnetent.c: Ditto.
- * libc/sys/linux/net/getnetent_r.c: Ditto.
- * libc/sys/linux/net/getnetgrent.c: Ditto.
- * libc/sys/linux/net/getnetgrent_r.c: Ditto.
- * libc/sys/linux/net/getnssent.c: Ditto.
- * libc/sys/linux/net/getnssent_r.c: Ditto.
- * libc/sys/linux/net/getproto_r.c: Ditto.
- * libc/sys/linux/net/getprtent.c: Ditto.
- * libc/sys/linux/net/getprtent_r.c: Ditto.
- * libc/sys/linux/net/getprtname.c: Ditto.
- * libc/sys/linux/net/getprtname_r.c: Ditto.
- * libc/sys/linux/net/getrpcbyname.c: Ditto.
- * libc/sys/linux/net/getrpcbyname_r.c: Ditto.
- * libc/sys/linux/net/getrpcbynumber.c: Ditto.
- * libc/sys/linux/net/getrpcbynumber_r.c: Ditto.
- * libc/sys/linux/net/getrpcent.c: Ditto.
- * libc/sys/linux/net/getrpcent_r.c: Ditto.
- * libc/sys/linux/net/getservent_r.c: Ditto.
- * libc/sys/linux/net/getsrvbynm.c: Ditto.
- * libc/sys/linux/net/getsrvbynm_r.c: Ditto.
- * libc/sys/linux/net/getsrvbypt.c: Ditto.
- * libc/sys/linux/net/getsrvbypt_r.c: Ditto.
- * libc/sys/linux/net/grp-lookup.c: Ditto.
- * libc/sys/linux/net/herrno.c: Ditto.
- * libc/sys/linux/net/hosts-lookup.c: Ditto.
- * libc/sys/linux/net/ifaddrs.h: Ditto.
- * libc/sys/linux/net/ifreq.c: Ditto.
- * libc/sys/linux/net/ifreq.h: Ditto.
- * libc/sys/linux/net/in6_addr.c: Ditto.
- * libc/sys/linux/net/inet6_option.c: Ditto.
- * libc/sys/linux/net/inet_mkadr.c: Ditto.
- * libc/sys/linux/net/inet_net.c: Ditto.
- * libc/sys/linux/net/key-lookup.c: Ditto.
- * libc/sys/linux/net/local.h: Ditto.
- * libc/sys/linux/net/netgroup.h: Ditto.
- * libc/sys/linux/net/netgrp-lookup.c: Ditto.
- * libc/sys/linux/net/network-lookup.c: Ditto.
- * libc/sys/linux/net/not-cancel.h: Ditto.
- * libc/sys/linux/net/ns_samedomain.c: Ditto.
- * libc/sys/linux/net/nscd-types.h: Ditto.
- * libc/sys/linux/net/nss.h: Ditto.
- * libc/sys/linux/net/nsswitch.c: Ditto.
- * libc/sys/linux/net/nsswitch.h: Ditto.
- * libc/sys/linux/net/opensock.c: Ditto.
- * libc/sys/linux/net/proto-lookup.c: Ditto.
- * libc/sys/linux/net/pwd-lookup.c: Ditto.
- * libc/sys/linux/net/res_debug.h: Ditto.
- * libc/sys/linux/net/res_hconf.c: Ditto.
- * libc/sys/linux/net/res_hconf.h: Ditto.
- * libc/sys/linux/net/rexec.c: Ditto.
- * libc/sys/linux/net/rpc-lookup.c: Ditto.
- * libc/sys/linux/net/ruserpass.c: Ditto.
- * libc/sys/linux/net/service-lookup.c: Ditto.
- * libc/sys/linux/net/spwd-lookup.c: Ditto.
- * libc/sys/linux/net/nscd/nscd-client.h: Ditto.
- * libc/sys/linux/net/nscd/nscd_proto.h: Ditto.
-
-2008-05-21 Eric Blake <ebb9@byu.net>
-
- Optimize the generic strchr.
- * libc/string/strchr.c (strchr) [!__OPTIMIZE_SIZE__]: Pre-align
- data so unaligned searches aren't penalized. Special-case
- searching for 0.
-
- Optimize strchr for x86.
- * libc/machine/i386/strchr.S (strchr) [!__OPTIMIZE_SIZE__]:
- Pre-align data so unaligned searches aren't penalized.
- Special-case searching for 0.
-
-2008-05-20 Nick Clifton <nickc@redhat.com>
-
- * libc/sys/sysnecv850/crt0.S (___dso_handle): Define (weak).
-
-2008-05-20 DJ Delorie <dj@redhat.com>
-
- * libc/sys/sysnecv850/isatty.c (_isatty): Renamed from isatty.
-
-2008-05-14 Jeff Johnston <jjohnstn@redhat.com>
-
- * libc/include/sys/reent.h: Change _REENT_INIT... macros to
- access macro parameter with parentheses around it.
-
-2008-04-26 Mark Mitchell <mark@codesourcery.com>
-
- * libc/include/stdint.h (SIZE_MIN): Remove.
- (SIZE_MAX): Define.
- * testsuite/newlib.stdlib/stdlib.exp: New.
- * testsuite/newlib.stdlib/size_max.c: Likewise.
-
-2008-04-29 Eric Blake <ebb9@byu.net>
-
- Fix 2008-04-14 regression in asprintf(ptr,"").
- * libc/stdio/asnprintf.c (asnprintf, _asnprintf_r): Avoid stdio
- baggage.
- * libc/stdio/asniprintf.c (asniprintf, _asniprintf_r): Likewise.
- * libc/stdio/asiprintf.c (asiprintf, _asiprintf_r): Likewise.
- * libc/stdio/vasniprintf.c (_vasniprintf_r): Likewise.
- * libc/stdio/vsnprintf.c (_vsnprintf_r): Likewise.
- * libc/stdio/vfprintf.c (_VFPRINTF_R) [STRING_ONLY]: Always malloc
- an initial buffer for asprintf.
-
-2008-04-24 Corinna Vinschen <corinna@vinschen.de>
-
- * libc/include/sys/stat.h: Guard at-functions with !__INSIDE_CYGWIN__.
- (fstatat): Fix type of third parameter.
-
-2008-04-25 Nick Clifton <nickc@redhat.com>
-
- * libc/machine/arm/setjmp.S: Fix thumb2 support.
-
-2008-04-24 Nick Clifton <nickc@redhat.com>
-
- * libc/include/machine/ieeefp.h: Fix typo: _DOUBLE_IS_32_BITS
- should be _DOUBLE_IS_32BITS.
-
-2008-04-24 Corinna Vinschen <corinna@vinschen.de>
-
- * libc/include/sys/stat.h (UTIME_NOW): Define for Cygwin.
- (UTIME_OMIT): Ditto.
- (utimensat): Declare for Cygwin.
- (futimens): Ditto.
-
-2008-04-23 Ken Werner <ken.werner@de.ibm.com>
-
- * libc/include/_ansi.h: _LONG_LONG renamed to _LONG_LONG_TYPE.
- * libc/include/math.h: Likewise.
-
-2008-04-23 Corinna Vinschen <corinna@vinschen.de>
-
- * libc/include/stdio.h (renameat): Declare for Cygwin.
- (symlinkat): Ditto.
- * libc/include/sys/unistd.h (readlink): Align declaration to POSIX.
- (faccessat): Declare for Cygwin.
- (fchownat): Ditto.
- (linkat): Ditto.
- (readlinkat): Ditto.
- * libc/include/sys/_default_fcntl.h (AT_FDCWD): Define for Cygwin.
- (AT_EACCESS): Ditto.
- (AT_SYMLINK_NOFOLLOW): Ditto.
- (AT_SYMLINK_FOLLOW): Ditto.
- (AT_REMOVEDIR): Ditto.
- (futimesat): Declare for Cygwin.
- (openat): Ditto.
- (unlinkat): Ditto.
- * libc/include/sys/stat.h (fchmodat): Ditto.
- (fstatat): Ditto.
- (mkdirat): Ditto.
- (mkfifoat): Ditto.
- (mknodat): Ditto.
-
-2008-04-22 Nick Clifton <nickc@redhat.com>
-
- * libc/machine/arm/setjmp.S: Add support for thumb2 multiple
- register load/store instructions.
-
-2008-04-16 Patrick Mansfield <patmans@us.ibm.com>
-
- * libc/machine/spu/sys/errno.h: Use _impure_data, not _reent_data.
-
-2008-04-16 Patrick Mansfield <patmans@us.ibm.com>
-
- * libc/machine/spu/impure.c: Add missing underscore to impure_data.
-
-2008-04-14 Patrick Mansfield <patmans@us.ibm.com>
-
- * libc/machine/spu/impure.c: New file, supply a non-static _impure_data.
- * libc/machine/spu/Makefile.am: Add new file impure.c.
- * libc/machine/spu/Makefile.in: Regenerate.
- * libc/machine/spu/sys/errno.h: Define errno to be _reent_data._errno.
-
-2008-04-14 Jeff Johnston <jjohnstn@redhat.com>
-
- * libc/stdio/Makefile.am: Build vfprintf.c and vfscanf.c with
- -DSTRING_ONLY defined with and without -DINTEGER_ONLY defined
- to build special versions for sprintf/sscanf family functions.
- * libc/stdio/Makefile.in: Regenerated.
- * libc/stdio/vfprintf.c[STRING_ONLY][INTEGER_ONLY](_VFPRINTF_R):
- Redefine to be _svfiprintf_r which is optimized to work with siprintf
- family of functions (i.e. no I/O) and does not support floating-point.
- [STRING_ONLY][!INTEGER_ONLY](_VFPRINTF_R): Redefine to be
- _svfprintf_r which is optimized to work with sprintf family of
- functions and not use I/O.
- [STRING_ONLY](__sprint_r): New string only version of static function.
- designed to work with sprintf family of functions.
- * libc/stdio/vfscanf.c[STRING_ONLY][INTEGER_ONLY](_SVFSCANF_R):
- Redefine to be _ssvfiscanf_r which is optimized to work with siscanf
- family of functions (i.e. no I/O) and no float-point support.
- [STRING_ONLY][!INTEGER_ONLY](_SVFSCANF_R): Redefine to be
- __ssvfscanf_r which is optimized to work with sscanf family of
- functions and does not require I/O functions.
- * libc/stdio/asprintf.c: Call _svfprintf_r instead of _vfprintf_r.
- * libc/stdio/snprintf.c: Ditto.
- * libc/stdio/sprintf.c: Ditto.
- * libc/stdio/vasnprintf.c: Ditto.
- * libc/stdio/vasprintf.c: Ditto.
- * libc/stdio/siprintf.c: Call _svfiprintf_r instead of _vfiprintf_r.
- * libc/stdio/sniprintf.c: Ditto.
- * libc/stdio/vasiprintf.c: Ditto.
- * libc/stdio/vsiprintf.c: Ditto.
- * libc/stdio/vsniprintf.c: Ditto.
- * libc/stdio/vsprintf.c: Ditto.
- * libc/stdio/local.h: Add prototypes for _svfprintf_r, _svfiprintf_r,
- _ssvfscanf_r, and _ssvfiscanf_r.
- * libc/stdio/sscanf.c: Call _ssvfscanf_r instead of _svfscanf_r.
- * libc/stdio/vsscanf.c: Ditto.
- * libc/stdio/siscanf.c: Call _ssvfiscanf_r instead of _svfiscanf_r.
- * libc/stdio/vsiscanf.c: Ditto.
-
-2008-04-04 DJ Delorie <dj@redhat.com>
-
- * libm/machine/spu/configure: Regenerate with autoconf 2.61.
- * libc/sys/configure: Regenerate with autoconf 2.61.
- * libc/machine/configure: Regenerate with autoconf 2.61.
-
-2008-04-01 Patrick Mansfield <patmans@us.ibm.com>
-
- * libc/machine/spu/memcmp.c: New file for SPU optimized memcmp.
- * libc/machine/spu/strncmp.h: New file supply _strncmp_internal.
- * libc/machine/spu/Makefile.am: Add memcmp.c.
- * libc/machine/spu/Makefile.in: Rebuild.
- * libc/machine/spu/strncmp.c: Use _strncmp_internal.
-
-2008-04-01 Patrick Mansfield <patmans@us.ibm.com>
-
- * configure.host: Build SPU with -DREENTRANT_SYSCALLS_PROVIDED and
- -DMISSING_SYSCALL_NAMES.
-
-2008-04-01 Patrick Mansfield <patmans@us.ibm.com>
-
- * libc/machine/spu/Makefile.am: Add assert.c.
- * libc/machine/spu/Makefile.in: Regenerate.
- * libc/machine/spu/assert.c: New file.
-
-2008-03-27 Patrick Mansfield <patmans@us.ibm.com>
-
- * libc/include/reent.h: Define _func_r functions in this file to
- func if REENTRANT_SYSCALLS_PROVIDED and MISSING_SYSCALL_NAMES are
- defined.
-
-2008-03-27 Corinna Vinschen <corinna@vinschen.de>
-
- * libc/include/sys/unistd.h: Declare lockf(2) and define lockf
- constants when building for Cygwin.
-
-2008-03-11 Jeff Johnston <jjohnstn@redhat.com>
-
- * libc/stdio/rgetc.c (__srget_r): Invoke CHECK_INIT to ensure
- stdin gets resolved properly before refilling.
-
-2008-03-07 Jeff Johnston <jjohnstn@redhat.com>
-
- * libc/include/getopt.h: Hide newlib extensions under
- the __need_getopt_newlib flag.
- * libc/stdlib/getopt.c: #define __need_getopt_newlib before including
- getopt.h. Put entire code under !HAVE_GETOPT to support platforms
- with their own getopt implementation.
- * configure.host: Specify HAVE_GETOPT for x86-linux.
-
-2008-03-07 Jeff Johnston <jjohnstn@redhat.com>
-
- * libc/include/sys/reent.h(_REENT_SMALL_CHECK_INIT): Specify
- this macro completely instead of referring to CHECK_STD_INIT which
- is only found in libc/stdio/local.h.
- * libc/stdio/dprintf.c: Add include of local.h.
- * libc/stdio/vdprintf.c: Ditto.
- * libc/stdio/vdiprintf.c: Ditto.
-
-2008-03-04 Eric Blake <ebb9@byu.net>
-
- Fix strtod("nan()", ptr).
- * libc/stdlib/gdtoa-hexnan.c (hexnan): When the optional
- n-char-sequence is omitted, still parse the ().
-
-2008-03-03 Eric Blake <ebb9@byu.net>
-
- Fix ftell bug after ungetc.
- * libc/stdio/ftell.c (_ftell_r): Don't flush ungetc buffer on
- ftell.
- * libc/stdio64/ftello64.c (_ftello64_r): Likewise.
- * libc/stdio/fflush.c (_fflush_r): Clear unget buffer when
- repositioning underlying fd offset.
-
-2008-03-02 Jeff Johnston <jjohnstn@redhat.com>
-
- * libc/include/getopt.h (no_argument): Added for glibc compatibility.
- (required_argument, optional_argument): Ditto.
-
-2008-02-29 Gregory Pietsch <gpietsch@comcast.net>
-
- * libc/stdlib/getopt.c (getopt_internal): Rewrite to accept
- data area so as to support reentrant calls. Change all callers
- to fill in data area with global values and restore any changes
- to the global values after call.
- (__getopt_r, __getopt_long_r, __getopt_long_only_r): New routines
- to support reentrancy that add a data area argument.
- * libc/include/getopt.h: Add new _r routines and provide macros
- so they can be called with using double-underscores.
-
-2008-02-21 Eric Blake <ebb9@byu.net>
-
- Fix strtod("-0x", NULL).
- * libc/stdlib/strtod.c (_strtod_r): Fall back to 0 if hex parse
- fails.
-
-2008-02-12 Jeff Johnston <jjohnstn@redhat.com>
-
- * libc/machine/powerpc/vfprintf.c (_VFPRINTF_R): Prepare
- for user specifying --disable-newlib-io-long-long on configure.
- Call _fflush_r instead of fflush. For _mbtowc_r, pass the
- reentrant pointer passed in rather than _REENT.
-
-2008-02-12 Peter Rosin <peda@lysator.liu.se>
-
- * libc/stdlib/getopt.c (getopt_internal): Handle optional
- arguments better for long options and short options not
- appearing as the first option in a sequence.
-
-2008-02-11 Patrick Mansfield <patmans@us.ibm.com>
-
- * libc/machine/spu/straddr.h: New file, supplies _straddr.
- * libc/machine/spu/strcat.c: Use _straddr and _strcpy.
- * libc/machine/spu/strcpy.c: Use _strcpy.
- * libc/machine/spu/strcpy.h: Supply _strcpy for optimized SPU
- str[n]cpy and str[n]cat.
- * libc/machine/spu/strncat.c: Use _straddr and _strcpy.
- * libc/machine/spu/strncpy.c: Use _strcpy.
-
-2008-02-11 Patrick Mansfield <patmans@us.ibm.com>
-
- * libc/machine/spu/strlen.c: Remove the len variable and unneeded
- calculation of its value.
-
-2008-01-25 Hans-Peter Nilsson <hp@bitrange.com>
-
- * libc/sys/mmixware/isatty.c (_isatty): Renamed from isatty.
- Make ISO C.
-
-2008-01-21 DJ Delorie <dj@redhat.com>
-
- * libc/sys/sh/syscalls.c (_isatty): New.
-
-2008-01-21 Neal H. Walfield <neal@gnu.org>
-
- * Makefile.am (crt1.o): Use correct source.
- * Makefile.in: Regenerated.
-
-2008-01-15 Eric Blake <ebb9@byu.net>
-
- * libc/string/Makefile.am (ELIX_2_SOURCES): Fix definition.
- * libc/string/Makefile: Regenerate.
-
-2008-01-15 Corinna Vinschen <corinna@vinschen.de>
-
- * libc/include/machine/setjmp.h (__SIGMASK_FUNC): Define as
- pthread_sigmask or sigprocmask depending on _POSIX_THREADS.
- (sigsetjmp): Use __SIGMASK_FUNC.
- (siglongjmp): Ditto.
- (_setjmp): Define as macro.
- (_longjmp): Ditto.
-
-2008-01-11 Eric Blake <ebb9@byu.net>
-
- Make strstr and strcasestr O(n), not O(n^2); add memmem.
- * libc/string/str-two-way.h: New file.
- * libc/string/memmem.c (memmem): New file.
- * libc/include/string.h (memmem): Declare for all platforms.
- * libc/string/strstr.c (strstr): Provide O(n) implementation when
- not optimizing for space.
- * libc/string/strcasestr.c (strcasestr): Likewise.
- * libc/string/Makefile.am (ELIX_SOURCES): Rename to...
- (ELIX_2_SOURCES): ...this.
- (ELIX_4_SOURCES): New category, for memmem.
- (lib_a_SOURCES, libstring_la_SOURCES): Build new file.
- (CHEWOUT_FILES): Build documentation for memmem.
- * libc/string/strings.tex: Include new docs.
-
-2008-01-08 Jeff Johnston <jjohnstn@redhat.com>
-
- * libc/machine/m68k/memcpy.S: Remove % from register references
- as this is already handled by m68kasm.h.
- * libc/machine/m68k/memset.S: Ditto.
-
-2008-01-07 Jeff Johnston <jjohnstn@redhat.com>
-
- * libc/machine/m68k/m68kasm.h: New file.
- * libc/machine/m68k/setjmp.S: Remove common definitions and
- place in m68kasm.h. Include "m68kasm.h".
- * libc/machine/m68k/memcpy.S: Include "m68kasm.h" and use
- SYM() macro when referencing function name.
- * libc/machine/m68k/memset.S: Ditto.
-
-2008-01-03 Jeff Johnston <jjohnstn@redhat.com>
-
- Make isatty syscall handling consistent with other newlib syscalls.
-
- * libc/include/_syslist.h: Add _isatty.
- * libc/include/reent.h: Add _isatty_r.
- * libc/include/sys/unistd.h: Add _isatty.
- * libc/posix/Makefile.am: Add new _isatty.c file.
- * libc/posix/Makefile.in: Regenerated.
- * libc/posix/_isatty.c: New file.
- * libc/posix/isatty.c: Changed to call _isatty().
- * libc/reent/Makefile.am: Add new isattyr.c file.
- * libc/reent/Makefile.in: Regenerated.
- * libc/reent/isattyr.c: New file.
- * libc/stdio/freopen.c: Changed to call _isatty_r().
- * libc/stdio/makebuf.c: Ditto.
- * libc/sys/a29khif/_isatty.S: Change isatty to _isatty.
- * libc/sys/arc/isatty.c: Ditto.
- * libc/sys/arm/syscalls.c: Ditto.
- * libc/sys/d10v/syscalls.c: Ditto.
- * libc/sys/h8300hms/syscalls.c: Ditto.
- * libc/sys/h8500hms/syscalls.c: Ditto.
- * libc/sys/linux/Makefile.am: Add new isatty.c file.
- * libc/sys/linux/Makefile.in: Regenerated.
- * libc/sys/linux/isatty.c: New file.
- * libc/syscalls/Makefile.am: Add new sysisatty.c file.
- * libc/syscalls/Makefile.in: Regenerated.
- * libc/syscalls/sysisatty.c: New file.
-
-2008-01-02 Jeff Johnston <jjohnstn@redhat.com>
-
- * libc/syscalls/sysclose.c: Always call reentrant version of the
- underlying syscall since one is guaranteed to exist in libc/reent.
- * libc/syscalls/sysexecve.c: Ditto.
- * libc/syscalls/sysfcntl.c: Ditto.
- * libc/syscalls/sysfork.c: Ditto.
- * libc/syscalls/sysfstat.c: Ditto.
- * libc/syscalls/sysgetpid.c: Ditto.
- * libc/syscalls/sysgettod.c: Ditto.
- * libc/syscalls/syskill.c: Ditto.
- * libc/syscalls/syslink.c: Ditto.
- * libc/syscalls/syslseek.c: Ditto.
- * libc/syscalls/sysopen.c: Ditto.
- * libc/syscalls/sysread.c: Ditto.
- * libc/syscalls/syssbrk.c: Ditto.
- * libc/syscalls/sysstat.c: Ditto.
- * libc/syscalls/systimes.c: Ditto.
- * libc/syscalls/sysunlink.c: Ditto.
- * libc/syscalls/syswait.c: Ditto.
- * libc/syscalls/syswrite.c: Ditto.
-
-2007-12-19 Jeff Johnston <jjohnstn@redhat.com>
-
- * NEWS: Update with 1.16.0 info.
- * README: Ditto.
- * acinclude.m4: Change version number to 1.16.0.
- * aclocal.m4: Regenerated.
- * configure: Ditto.
- * doc/aclocal.m4: Ditto.
- * doc/configure: Ditto.
- * libc/*/aclocal.m4: Ditto.
- * libc/*/configure: Ditto.
- * libc/libc.texinfo: Ditto.
- * libm/*/aclocal.m4: Ditto.
- * libm/*/configure: Ditto.
- * libm/libm.texinfo: Ditto.
- * libc/sys/linux/shared.ld: Add VERS_1.16.
-
-2007-12-19 Jeff Johnston <jjohnstn@redhat.com>
-
- * libc/string/strcasestr.c: Remove id macro.
- * libc/sys/linux/linuxthreads/attr.c: Fix up sched_priority
- field reference to be __sched_priority.
- * libc/sys/linux/linuxthreads/joinrace.c: Ditto.
- * libc/sys/linux/linuxthreads/manager.c: Ditto.
- * libc/sys/linux/stdlib/collate.c: Remove id macro.
- * libc/sys/linux/stdlib/collcmp.c: Ditto.
- * libc/sys/linux/stdlib/engine.c: Ditto.
- * libc/sys/linux/stdlib/fnmatch.c: Ditto.
- * libc/sys/linux/stdlib/glob.c: Ditto.
- * libc/sys/linux/stdlib/reallocf.c: Ditto.
- * libc/sys/linux/stdlib/regcomp.c: Ditto.
- * libc/sys/linux/stdlib/regerror.c: Ditto.
- * libc/sys/linux/stdlib/regexec.c: Ditto.
- * libc/sys/linux/stdlib/regfree.c: Ditto.
- * libc/sys/linux/sys/cdefs.h: Replace with latest version.
- * libc/sys/linux/include/argp.h: Ditto.
- * libc/sys/linux/sys/libc-lock.h: New file.
- * libc/sys/linux/sys/stdint.h: Ditto.
- * libc/sys/linux/include/sched.h: New file.
-
-2007-12-19 Dave Korn <dave.korn@artimi.com>
- Jeff Johnston <jjohnstn@redhhat.com>
-
- * libc/include/_ansi.h: Add _LONG_LONG definition.
- * libc/include/math.h (llrint, llrintf, rintl, lrintl, llrintl): Add
- prototypes.
- * libc/machine/i386/machine/fastmath.h: Add support for new i386
- fast math versions of rint, lrint, and llrint family functions.
- * libm/machine/i386/Makefile.am: Add new files.
- * libm/machine/i386/Makefile.in: Regenerated.
- * libm/machine/i386/f_llrint.c, libm/machine/i386/f_lrint.c,
- libm/machine/i386/f_rint.c, libm/machine/i386/f_llrintf.c,
- libm/machine/i386/f_lrintf.c, libm/machine/i386/f_rintf.c,
- libm/machine/i386/f_llrintl.c, libm/machine/i386/f_lrintl.c,
- libm/machine/i386/f_rintl.c: New files with fast math implementations.
-
-2007-12-19 Jeff Johnston <jjohnstn@redhat.com>
-
- * libc/include/sys/features.h: Add checks for C90 compilers using
- -ansi.
-
-2007-12-19 Corinna Vinschen <corinna@vinschen.de>
-
- * libc/include/wchar.h: Add prototypes for wcpcpy and wcpncpy.
- * libc/string/Makefile.am (ELIX_SOURCES): Add wcpcpy.c and
- wcpncpy.c.
- (CHEWOUT_FILES): Add wcpcpy.def and wcpncpy.def.
- * libc/string/Makefile.in: Regenerate.
- * libc/string/wcpcpy.c: New file.
- * libc/string/wcpncpy.c: New file.
- * libc/string/wcstrings.tex: Add wcpcpy and wcpncpy.
-
-2007-12-19 Corinna Vinschen <corinna@vinschen.de>
-
- * libc/stdio/vfprintf.c (_VFPRINTF_R): Use correct pointer in call to
- _wcsrtombs_r.
-
-2007-11-19 Nick Clifton <nickc@redhat.com>
-
- * libc/machine/mn10300/Makefile.am (CCASFLAGS): Add -Wa,--gdwarf-2.
- * libc/machine/mn10300/Makefile.in: Regenerate.
- * libc/machine/mn10300/memchar.S: Remove redundant labels. Add
- .debug_frame section.
- * libc/machine/mn10300/memcmp.S: Likewise.
- * libc/machine/mn10300/memcpy.S: Likewise.
- * libc/machine/mn10300/memset.S: Likewise.
- * libc/machine/mn10300/strchr.S: Likewise.
- * libc/machine/mn10300/strcmp.S: Likewise.
- * libc/machine/mn10300/strcpy.S: Likewise.
- * libc/machine/mn10300/strlen.S: Likewise.
-
-2007-11-15 Jeff Johnston <jjohnstn@redhat.com>
-
- * libc/include/sys/_default_fcntl.h: New header file that
- is the default version of sys/fcntl.h.
- * libc/include/sys/fcntl.h: Changed to simply include
- sys/_default_fcntl.h.
- * libc/sys/arm/sys/fcntl.h: New file that includes
- sys/_default_fcntl.h and defines O_BINARY.
-
-2007-11-08 Corinna Vinschen <corinna@vinschen.de>
-
- * libc/include/sys/unistd.h: Remove Cygwin definition of MAXPATHLEN.
-
-2007-11-07 Dave Brolley <brolley@redhat.com>
-
- * libc/machine/configure: Regenerated to pick up mep-elf changes.
-
- * Contribute mep-elf from Red Hat
- 2006-10-27 DJ Delorie <dj@redhat.com>
-
- * libc/include/machine/setjmp.h: Add MeP support.
-
- 2003-04-17 DJ Delorie <dj@redhat.com>
-
- * configure.host (mep-*-*): Support "long long" type.
-
- 2001-06-06 DJ Delorie <dj@redhat.com>
-
- * libc/include/machine/ieeefp.h (mep): Support little endian too.
-
- 2001-05-14 DJ Delorie <dj@redhat.com>
-
- * configure.host: Add mep's machine_dir.
- * libc/include/setjmp.h: Add mep support.
- * libc/machine/mep: New.
- * libc/machine/mep/setjmp.S: New, support mep's setjmp/longjmp.
-
- 2001-05-04 DJ Delorie <dj@redhat.com>
-
- * configure.host: Add mep.
- * libc/include/machine/ieeefp.h: Ditto.
-
-2007-10-31 DJ Delorie <dj@redhat.com>
-
- * libc/signal/signal.c (_raise_r): Don't attempt to initialize the
- signal table, just use a default, in case initialization cause
- recursion.
-
-2007-10-23 Jeff Johnston <jjohnstn@redhat.com>
-
- * libc/stdlib/wcstombs_r.c: Add SUSV2 support for calculating
- size if output buffer is NULL.
-
-2007-10-17 Jeff Johnston <jjohnstn@redhat.com>
-
- * libm/mathfp/s_logarithm.c: Fix error introduced by previous
- fix when handling negative input values. Make function
- consistent with math directory and glibc version such that
- inf and nan values return inf and nan respectively with no
- errno setting.
- * libm/mathfp/sf_logarithm.c: Ditto.
- * libm/math/w_log.c: Set errno to ERANGE when input is 0.0.
- * libm/math/wf_log.c: Ditto.
- * libm/math/w_log10.c: Ditto.
- * libm/math/wf_log10.c: Ditto.
-
-2007-10-17 Jeff Johnston <jjohnstn@redhat.com>
-
- * libm/mathfp/s_logarithm.c: Fix case where input is 0 to
- return -inf.
- * libm/mathfp/sf_logarithm.c: Ditto.
-
-2007-10-17 Jeff Johnston <jjohnstn@redhat.com>
-
- * libc/machine/i386/machine/fastmath.h: New file.
-
-2007-10-13 Eric Blake <ebb9@byu.net>
-
- * libc/stdio/vfprintf.c (_VFPRINTF_R) [__OPTIMIZE_SIZE__]:
- Correctly nest else within conditionals.
- Reported by Artur Lipowski.
-
-2007-10-09 Nick Clifton <nickc@redhat.com>
-
- * libc/sys/linux/dl/do-lookup.h (FCT): Support symbols with
- the STT_COMMON type.
-
-2007-10-09 Ben Elliston <bje@au.ibm.com>
-
- * libm/machine/spu/headers/acosd2.h: Include spu_intrinsics.h
- before simdmath.h to get a definition for `vector'.
- * libm/machine/spu/headers/asind2.h: Likewise.
-
-2007-09-28 Patrick Mansfield <patmans@us.ibm.com>
-
- * libm/machine/spu/headers/dom_chkd_less_than.h: New file.
- * libm/machine/spu/headers/dom_chkd_negone_one.h: Ditto.
- * libm/machine/spu/headers/dom_chkf_less_than.h: Ditto.
- * libm/machine/spu/headers/dom_chkf_negone_one.h: Ditto.
- * libm/machine/spu/headers/acos.h: Add domain check.
- * libm/machine/spu/headers/acosf.h: Ditto.
- * libm/machine/spu/headers/acosh.h: Ditto.
- * libm/machine/spu/headers/acoshf.h: Ditto.
- * libm/machine/spu/headers/asin.h: Ditto.
- * libm/machine/spu/headers/asinf.h: Ditto.
- * libm/machine/spu/headers/atanh.h: Ditto.
- * libm/machine/spu/headers/atanhf.h: Ditto.
- * libm/machine/spu/headers/fmod.h: Ditto.
- * libm/machine/spu/headers/fmodf.h: Ditto.
- * libm/machine/spu/headers/log.h: Ditto.
- * libm/machine/spu/headers/log10.h: Ditto.
- * libm/machine/spu/headers/log1p.h: Ditto.
- * libm/machine/spu/headers/log1pf.h: Ditto.
- * libm/machine/spu/headers/log2.h: Ditto.
- * libm/machine/spu/headers/log2f.h: Ditto.
- * libm/machine/spu/headers/sqrt.h: Ditto.
- * libm/machine/spu/headers/sqrtf.h: Ditto.
- * libm/machine/spu/headers/tgamma.h: Ditto.
- * libm/machine/spu/headers/tgammaf.h: Ditto.
-
-2007-09-28 Patrick Mansfield <patmans@us.ibm.com>
-
- * libm/machine/spu/Makefile.am: Add new C files.
- * libm/machine/spu/Makefile.in: Regenerate.
- * libm/machine/spu/headers/acos.h: New file.
- * libm/machine/spu/headers/acosd2.h: Ditto.
- * libm/machine/spu/headers/acosf.h: Ditto.
- * libm/machine/spu/headers/acosf4.h: Ditto.
- * libm/machine/spu/headers/acosh.h: Ditto.
- * libm/machine/spu/headers/acoshd2.h: Ditto.
- * libm/machine/spu/headers/acoshf.h: Ditto.
- * libm/machine/spu/headers/acoshf4.h: Ditto.
- * libm/machine/spu/headers/asin.h: Ditto.
- * libm/machine/spu/headers/asind2.h: Ditto.
- * libm/machine/spu/headers/asinf.h: Ditto.
- * libm/machine/spu/headers/asinf4.h: Ditto.
- * libm/machine/spu/headers/asinh.h: Ditto.
- * libm/machine/spu/headers/asinhd2.h: Ditto.
- * libm/machine/spu/headers/asinhf.h: Ditto.
- * libm/machine/spu/headers/asinhf4.h: Ditto.
- * libm/machine/spu/headers/atan.h: Ditto.
- * libm/machine/spu/headers/atan2.h: Ditto.
- * libm/machine/spu/headers/atan2d2.h: Ditto.
- * libm/machine/spu/headers/atan2f.h: Ditto.
- * libm/machine/spu/headers/atan2f4.h: Ditto.
- * libm/machine/spu/headers/atand2.h: Ditto.
- * libm/machine/spu/headers/atanf4.h: Ditto.
- * libm/machine/spu/headers/atanh.h: Ditto.
- * libm/machine/spu/headers/atanhd2.h: Ditto.
- * libm/machine/spu/headers/atanhf.h: Ditto.
- * libm/machine/spu/headers/atanhf4.h: Ditto.
- * libm/machine/spu/headers/cos.h: Ditto.
- * libm/machine/spu/headers/cos_sin.h: Ditto.
- * libm/machine/spu/headers/cosd2.h: Ditto.
- * libm/machine/spu/headers/cosf.h: Ditto.
- * libm/machine/spu/headers/cosf4.h: Ditto.
- * libm/machine/spu/headers/cosh.h: Ditto.
- * libm/machine/spu/headers/coshd2.h: Ditto.
- * libm/machine/spu/headers/coshf.h: Ditto.
- * libm/machine/spu/headers/coshf4.h: Ditto.
- * libm/machine/spu/headers/divd2.h: Ditto.
- * libm/machine/spu/headers/divf4.h: Ditto.
- * libm/machine/spu/headers/erf.h: Ditto.
- * libm/machine/spu/headers/erf_utils.h: Ditto.
- * libm/machine/spu/headers/erfc.h: Ditto.
- * libm/machine/spu/headers/erfcd2.h: Ditto.
- * libm/machine/spu/headers/erfcf.h: Ditto.
- * libm/machine/spu/headers/erfcf4.h: Ditto.
- * libm/machine/spu/headers/erfd2.h: Ditto.
- * libm/machine/spu/headers/erff.h: Ditto.
- * libm/machine/spu/headers/erff4.h: Ditto.
- * libm/machine/spu/headers/exp.h: Ditto.
- * libm/machine/spu/headers/exp2.h: Ditto.
- * libm/machine/spu/headers/exp2d2.h: Ditto.
- * libm/machine/spu/headers/exp2f4.h: Ditto.
- * libm/machine/spu/headers/expd2.h: Ditto.
- * libm/machine/spu/headers/expf4.h: Ditto.
- * libm/machine/spu/headers/expm1.h: Ditto.
- * libm/machine/spu/headers/expm1d2.h: Ditto.
- * libm/machine/spu/headers/expm1f.h: Ditto.
- * libm/machine/spu/headers/expm1f4.h: Ditto.
- * libm/machine/spu/headers/floord2.h: Ditto.
- * libm/machine/spu/headers/floorf4.h: Ditto.
- * libm/machine/spu/headers/hypot.h: Ditto.
- * libm/machine/spu/headers/hypotd2.h: Ditto.
- * libm/machine/spu/headers/hypotf.h: Ditto.
- * libm/machine/spu/headers/hypotf4.h: Ditto.
- * libm/machine/spu/headers/isnan.h: Ditto.
- * libm/machine/spu/headers/isnand2.h: Ditto.
- * libm/machine/spu/headers/isnanf.h: Ditto.
- * libm/machine/spu/headers/isnanf4.h: Ditto.
- * libm/machine/spu/headers/ldexpd2.h: Ditto.
- * libm/machine/spu/headers/ldexpf4.h: Ditto.
- * libm/machine/spu/headers/lgamma.h: Ditto.
- * libm/machine/spu/headers/lgammad2.h: Ditto.
- * libm/machine/spu/headers/lgammaf.h: Ditto.
- * libm/machine/spu/headers/lgammaf4.h: Ditto.
- * libm/machine/spu/headers/log.h: Ditto.
- * libm/machine/spu/headers/log10.h: Ditto.
- * libm/machine/spu/headers/log10d2.h: Ditto.
- * libm/machine/spu/headers/log1p.h: Ditto.
- * libm/machine/spu/headers/log1pd2.h: Ditto.
- * libm/machine/spu/headers/log1pf.h: Ditto.
- * libm/machine/spu/headers/log1pf4.h: Ditto.
- * libm/machine/spu/headers/log2.h: Ditto.
- * libm/machine/spu/headers/log2d2.h: Ditto.
- * libm/machine/spu/headers/log2f4.h: Ditto.
- * libm/machine/spu/headers/logbf.h: Ditto.
- * libm/machine/spu/headers/logbf4.h: Ditto.
- * libm/machine/spu/headers/logd2.h: Ditto.
- * libm/machine/spu/headers/logf4.h: Ditto.
- * libm/machine/spu/headers/nearbyintf.h: Ditto.
- * libm/machine/spu/headers/nearbyintf4.h: Ditto.
- * libm/machine/spu/headers/nextafter.h: Ditto.
- * libm/machine/spu/headers/nextafterd2.h: Ditto.
- * libm/machine/spu/headers/nextafterf.h: Ditto.
- * libm/machine/spu/headers/nextafterf4.h: Ditto.
- * libm/machine/spu/headers/pow.h: Ditto.
- * libm/machine/spu/headers/powd2.h: Ditto.
- * libm/machine/spu/headers/powf.h: Ditto.
- * libm/machine/spu/headers/powf4.h: Ditto.
- * libm/machine/spu/headers/recipd2.h: Ditto.
- * libm/machine/spu/headers/recipf4.h: Ditto.
- * libm/machine/spu/headers/rintf.h: Ditto.
- * libm/machine/spu/headers/rintf4.h: Ditto.
- * libm/machine/spu/headers/scalbnf4.h: Ditto.
- * libm/machine/spu/headers/signbit.h: Ditto.
- * libm/machine/spu/headers/signbitd2.h: Ditto.
- * libm/machine/spu/headers/simdmath.h: Ditto.
- * libm/machine/spu/headers/sin.h: Ditto.
- * libm/machine/spu/headers/sincos.h: Ditto.
- * libm/machine/spu/headers/sincosd2.h: Ditto.
- * libm/machine/spu/headers/sincosf.h: Ditto.
- * libm/machine/spu/headers/sincosf4.h: Ditto.
- * libm/machine/spu/headers/sind2.h: Ditto.
- * libm/machine/spu/headers/sinf.h: Ditto.
- * libm/machine/spu/headers/sinf4.h: Ditto.
- * libm/machine/spu/headers/sinh.h: Ditto.
- * libm/machine/spu/headers/sinhd2.h: Ditto.
- * libm/machine/spu/headers/sinhf.h: Ditto.
- * libm/machine/spu/headers/sinhf4.h: Ditto.
- * libm/machine/spu/headers/sqrtd2.h: Ditto.
- * libm/machine/spu/headers/sqrtf.h: Ditto.
- * libm/machine/spu/headers/sqrtf4.h: Ditto.
- * libm/machine/spu/headers/tan.h: Ditto.
- * libm/machine/spu/headers/tand2.h: Ditto.
- * libm/machine/spu/headers/tanf.h: Ditto.
- * libm/machine/spu/headers/tanf4.h: Ditto.
- * libm/machine/spu/headers/tanh.h: Ditto.
- * libm/machine/spu/headers/tanhd2.h: Ditto.
- * libm/machine/spu/headers/tanhf.h: Ditto.
- * libm/machine/spu/headers/tanhf4.h: Ditto.
- * libm/machine/spu/headers/tgamma.h: Ditto.
- * libm/machine/spu/headers/tgammad2.h: Ditto.
- * libm/machine/spu/headers/tgammaf.h: Ditto.
- * libm/machine/spu/headers/tgammaf4.h: Ditto.
- * libm/machine/spu/headers/truncd2.h: Ditto.
- * libm/machine/spu/headers/truncf4.h: Ditto.
- * libm/machine/spu/log2.c: Ditto.
- * libm/machine/spu/s_asinh.c: Ditto.
- * libm/machine/spu/s_atan.c: Ditto.
- * libm/machine/spu/s_cos.c: Ditto.
- * libm/machine/spu/s_erf.c: Ditto.
- * libm/machine/spu/s_expm1.c: Ditto.
- * libm/machine/spu/s_isnan.c: Ditto.
- * libm/machine/spu/s_log1p.c: Ditto.
- * libm/machine/spu/s_nextafter.c: Ditto.
- * libm/machine/spu/s_sin.c: Ditto.
- * libm/machine/spu/s_tan.c: Ditto.
- * libm/machine/spu/s_tanh.c: Ditto.
- * libm/machine/spu/sf_asinh.c: Ditto.
- * libm/machine/spu/sf_cos.c: Ditto.
- * libm/machine/spu/sf_erf.c: Ditto.
- * libm/machine/spu/sf_expm1.c: Ditto.
- * libm/machine/spu/sf_log1p.c: Ditto.
- * libm/machine/spu/sf_logb.c: Ditto.
- * libm/machine/spu/sf_nearbyint.c: Ditto.
- * libm/machine/spu/sf_nextafter.c: Ditto.
- * libm/machine/spu/sf_rint.c: Ditto.
- * libm/machine/spu/sf_sin.c: Ditto.
- * libm/machine/spu/sf_tan.c: Ditto.
- * libm/machine/spu/sf_tanh.c: Ditto.
- * libm/machine/spu/w_acos.c: Ditto.
- * libm/machine/spu/w_acosh.c: Ditto.
- * libm/machine/spu/w_asin.c: Ditto.
- * libm/machine/spu/w_atan2.c: Ditto.
- * libm/machine/spu/w_atanh.c: Ditto.
- * libm/machine/spu/w_cosh.c: Ditto.
- * libm/machine/spu/w_exp.c: Ditto.
- * libm/machine/spu/w_exp2.c: Ditto.
- * libm/machine/spu/w_hypot.c: Ditto.
- * libm/machine/spu/w_lgamma.c: Ditto.
- * libm/machine/spu/w_log.c: Ditto.
- * libm/machine/spu/w_log10.c: Ditto.
- * libm/machine/spu/w_pow.c: Ditto.
- * libm/machine/spu/w_sincos.c: Ditto.
- * libm/machine/spu/w_sinh.c: Ditto.
- * libm/machine/spu/w_tgamma.c: Ditto.
- * libm/machine/spu/wf_acos.c: Ditto.
- * libm/machine/spu/wf_acosh.c: Ditto.
- * libm/machine/spu/wf_asin.c: Ditto.
- * libm/machine/spu/wf_atan2.c: Ditto.
- * libm/machine/spu/wf_atanh.c: Ditto.
- * libm/machine/spu/wf_cosh.c: Ditto.
- * libm/machine/spu/wf_hypot.c: Ditto.
- * libm/machine/spu/wf_lgamma.c: Ditto.
- * libm/machine/spu/wf_pow.c: Ditto.
- * libm/machine/spu/wf_sincos.c: Ditto.
- * libm/machine/spu/wf_sinh.c: Ditto.
- * libm/machine/spu/wf_sqrt.c: Ditto.
- * libm/machine/spu/wf_tgamma.c: Ditto.
-
-2007-09-28 Patrick Mansfield <patmans@us.ibm.com>
-
- * configure.host: Define _POSIX_MODE to match the existing vector
- math code, as we don't support the matherr callout.
- * libm/machine/spu/Makefile.am: New file.
- * libm/machine/spu/Makefile.in: Auto-generated.
- * libm/machine/spu/headers/atanf.h: New file.
- * libm/machine/spu/headers/cbrt.h: Ditto.
- * libm/machine/spu/headers/cbrtf.h: Ditto.
- * libm/machine/spu/headers/ceil.h: Ditto.
- * libm/machine/spu/headers/ceilf.h: Ditto.
- * libm/machine/spu/headers/copysign.h: Ditto.
- * libm/machine/spu/headers/copysignf.h: Ditto.
- * libm/machine/spu/headers/exp2f.h: Ditto.
- * libm/machine/spu/headers/expf.h: Ditto.
- * libm/machine/spu/headers/fabs.h: Ditto.
- * libm/machine/spu/headers/fabsf.h: Ditto.
- * libm/machine/spu/headers/fdim.h: Ditto.
- * libm/machine/spu/headers/fdimf.h: Ditto.
- * libm/machine/spu/headers/floor.h: Ditto.
- * libm/machine/spu/headers/floorf.h: Ditto.
- * libm/machine/spu/headers/fma.h: Ditto.
- * libm/machine/spu/headers/fmaf.h: Ditto.
- * libm/machine/spu/headers/fmax.h: Ditto.
- * libm/machine/spu/headers/fmaxf.h: Ditto.
- * libm/machine/spu/headers/fmin.h: Ditto.
- * libm/machine/spu/headers/fminf.h: Ditto.
- * libm/machine/spu/headers/fmod.h: Ditto.
- * libm/machine/spu/headers/fmodf.h: Ditto.
- * libm/machine/spu/headers/frexp.h: Ditto.
- * libm/machine/spu/headers/frexpf.h: Ditto.
- * libm/machine/spu/headers/ilogb.h: Ditto.
- * libm/machine/spu/headers/ilogbf.h: Ditto.
- * libm/machine/spu/headers/ldexp.h: Ditto.
- * libm/machine/spu/headers/ldexpf.h: Ditto.
- * libm/machine/spu/headers/llrint.h: Ditto.
- * libm/machine/spu/headers/llrintf.h: Ditto.
- * libm/machine/spu/headers/llround.h: Ditto.
- * libm/machine/spu/headers/llroundf.h: Ditto.
- * libm/machine/spu/headers/log10f.h: Ditto.
- * libm/machine/spu/headers/log2f.h: Ditto.
- * libm/machine/spu/headers/logf.h: Ditto.
- * libm/machine/spu/headers/lrint.h: Ditto.
- * libm/machine/spu/headers/lrintf.h: Ditto.
- * libm/machine/spu/headers/lround.h: Ditto.
- * libm/machine/spu/headers/lroundf.h: Ditto.
- * libm/machine/spu/headers/nearbyint.h: Ditto.
- * libm/machine/spu/headers/remainder.h: Ditto.
- * libm/machine/spu/headers/remainderf.h: Ditto.
- * libm/machine/spu/headers/remquo.h: Ditto.
- * libm/machine/spu/headers/remquof.h: Ditto.
- * libm/machine/spu/headers/rint.h: Ditto.
- * libm/machine/spu/headers/round.h: Ditto.
- * libm/machine/spu/headers/roundf.h: Ditto.
- * libm/machine/spu/headers/scalbn.h: Ditto.
- * libm/machine/spu/headers/scalbnf.h: Ditto.
- * libm/machine/spu/headers/sqrt.h: Ditto.
- * libm/machine/spu/headers/trunc.h: Ditto.
- * libm/machine/spu/headers/truncf.h: Ditto.
- * libm/machine/spu/headers/vec_literal.h: Ditto.
- * libm/machine/spu/llrint.c: Ditto.
- * libm/machine/spu/llrintf.c: Ditto.
- * libm/machine/spu/llround.c: Ditto.
- * libm/machine/spu/llroundf.c: Ditto.
- * libm/machine/spu/log2f.c: Ditto.
- * libm/machine/spu/s_cbrt.c: Ditto.
- * libm/machine/spu/s_ceil.c: Ditto.
- * libm/machine/spu/s_copysign.c: Ditto.
- * libm/machine/spu/s_fabs.c: Ditto.
- * libm/machine/spu/s_fdim.c: Ditto.
- * libm/machine/spu/s_floor.c: Ditto.
- * libm/machine/spu/s_fma.c: Ditto.
- * libm/machine/spu/s_fmax.c: Ditto.
- * libm/machine/spu/s_fmin.c: Ditto.
- * libm/machine/spu/s_frexp.c: Ditto.
- * libm/machine/spu/s_ilogb.c: Ditto.
- * libm/machine/spu/s_ldexp.c: Ditto.
- * libm/machine/spu/s_lrint.c: Ditto.
- * libm/machine/spu/s_lround.c: Ditto.
- * libm/machine/spu/s_nearbyint.c: Ditto.
- * libm/machine/spu/s_remquo.c: Ditto.
- * libm/machine/spu/s_rint.c: Ditto.
- * libm/machine/spu/s_round.c: Ditto.
- * libm/machine/spu/s_scalbn.c: Ditto.
- * libm/machine/spu/s_trunc.c: Ditto.
- * libm/machine/spu/sf_atan.c: Ditto.
- * libm/machine/spu/sf_cbrt.c: Ditto.
- * libm/machine/spu/sf_ceil.c: Ditto.
- * libm/machine/spu/sf_copysign.c: Ditto.
- * libm/machine/spu/sf_fabs.c: Ditto.
- * libm/machine/spu/sf_fdim.c: Ditto.
- * libm/machine/spu/sf_floor.c: Ditto.
- * libm/machine/spu/sf_fma.c: Ditto.
- * libm/machine/spu/sf_fmax.c: Ditto.
- * libm/machine/spu/sf_fmin.c: Ditto.
- * libm/machine/spu/sf_frexp.c: Ditto.
- * libm/machine/spu/sf_ilogb.c: Ditto.
- * libm/machine/spu/sf_ldexp.c: Ditto.
- * libm/machine/spu/sf_lrint.c: Ditto.
- * libm/machine/spu/sf_lround.c: Ditto.
- * libm/machine/spu/sf_remquo.c: Ditto.
- * libm/machine/spu/sf_round.c: Ditto.
- * libm/machine/spu/sf_scalbn.c: Ditto.
- * libm/machine/spu/sf_trunc.c: Ditto.
- * libm/machine/spu/w_fmod.c: Ditto.
- * libm/machine/spu/w_remainder.c: Ditto.
- * libm/machine/spu/w_sqrt.c: Ditto.
- * libm/machine/spu/wf_exp.c: Ditto.
- * libm/machine/spu/wf_exp2.c: Ditto.
- * libm/machine/spu/wf_fmod.c: Ditto.
- * libm/machine/spu/wf_log.c: Ditto.
- * libm/machine/spu/wf_log10.c: Ditto.
- * libm/machine/spu/wf_remainder.c: Ditto.
-
-2007-09-21 Patrick Mansfield <patmans@us.ibm.com>
-
- * libc/machine/spu/sys/uio.h: New file for readv and writev use.
-
-2007-09-21 Patrick Mansfield <patmans@us.ibm.com>
-
- * libc/include/sched.h: New file, just include sys/sched.h.
- * libc/machine/spu/sys/sched.h: New file, has just sched_yield
- prototype.
- * libc/machine/spu/sys/utime.h: New file, has utime prototype and
- struct utimbuf definition.
-
-2007-09-21 Patrick Mansfield <patmans@us.ibm.com>
-
- * libc/machine/spu/sys/dirent.h: New file, add prototypes and SPU
- specific struct and typedef.
-
-2007-09-18 Patrick Mansfield <patmans@us.ibm.com>
-
- * libc/include/sys/types.h: Use __dev_t, __uid_t, and __gid_t to
- typedef dev_t, gid_t, and uid_t.
- * libc/include/sys/_types.h: Move previous dev_t, uid_t and gid_t
- types.h code to here, but typedef __dev_t, __uid_t, and __gid_t instead.
- Change to lower case for all __foo_t_defined names.
- * libc/machine/spu/machine/_types.h: Add SPU specific __dev_t,
- __uid_t, and __gid_t making them all four bytes. Change to lower case
- for all __foo_t_defined names.
-
-2007-09-18 Jeff Johnston <jjohnstn@redhat.com>
-
- * libc/reent/renamer.c: New file.
- * libc/reent/Makefile.am: Add new file.
- * libc/reent/Makefile.in: Regenerated.
- * libc/stdio/rename.c: Break out _rename_r code into reent/renamer.c
- and add check for rename syscall.
-
-2007-09-17 Eric Blake <ebb9@byu.net>
-
- Obey POSIX on printf("%.s", (char*)NULL).
- * libc/stdio/vfprintf.c (_VFPRINTF_R): Take precision into account
- for %s on NULL. Skip NULL check when optimizing for size.
-
-2007-09-07 Jeff Johnston <jjohnstn@redhat.com>
-
- * libc/include/sys/_types.h: Protect all types with flag
- checks to allow definition in machine/_types.h.
-
-2007-09-07 Jeff Johnston <jjohnstn@redhat.com>
-
- * libc/sys/linux/sys/_types.h: Add _fpos_t and _fpos64_t
- definitions in light of the previous change.
-
-2007-09-07 Patrick Mansfield <patmans@us.ibm.com>
-
- * libc/include/machine/_default_types.h: New file, contains what
- was previously in libc/include/machine/_types.h.
- * libc/include/machine/_types.h: Now only includes
- machine/_default_types.h.
- * libc/include/sys/reent.h: Remove _fpos_t and _fpos64_t.
- * libc/include/sys/_types.h: Move _fpos_t and _fpos64_t to here,
- with conditional declarations.
- * libc/machine/spu/machine/_types.h: New file, add SPU specific
- typedefs for _fpos_t and _fpos64_t.
-
-2007-09-07 Jeff Johnston <jjohnstn@redhat.com>
-
- * libc/include/math.h (_M_LOG2E): Replace with..
- (_M_LOG2_E): New macro.
- (log2, log2f, M_LOG2_E): Use _M_LOG2_E.
-
-2007-09-06 Brian Dessent <brian@dessent.net>
-
- * libc/reent/getreent.c: Allow for case where __getreent is
- defined as a macro.
-
-2007-09-06 Jeff Johnston <jjohnstn@redhat.com>
-
- * libc/include/math.h (_M_LOG2E): New log2 of e macro.
- (log2): Use _M_LOG2E instead of M_LOG2E.
- (log2f): Ditto.
- (M_LOG2E): Define to be _M_LOG2E.
-
-2007-09-04 Kazunori Asayama <asayama@sm.sony.co.jp>
-
- * libm/math/wf_tgamma.c: Add missing include.
-
-2007-08-31 Antony King <antony.king@st.com>
-
- * libc/stdlib/mprec.h [_DOUBLE_IS_32BITS}: Define IEEE_Arith
- bits and redefine associated dword0 macro (rvalue issue).
- * libc/stdio/vfieeefp.h: Ditto.
- * libc/stdlib/strtod.c: Add checks for _DOUBLE_IS_32BITS
- to prevent setting dword1 which is an rvalue only.
-
-2007-08-28 Hans Kester <hans.kester@ellips.nl>
-
- * configure.host: Added support for x86_64.
- * libc/include/machine/ieeefp.h: Define __IEEE_LITTLE_ENDIAN for x86_64.
- * libc/include/machine/setjmp.h: Define _JBTYPE and _JBLEN for x86_64.
- * libc/machine/x86_64/aclocal.m4: Generated.
- * libc/machine/x86_64/configure.in: New.
- * libc/machine/x86_64/configure: Generated.
- * libc/machine/x86_64/Makefile.am: New.
- * libc/machine/x86_64/Makefile.in: Generated.
- * libc/machine/x86_64/setjmp.S: New.
- * libc/machine/x86_64/memcpy.S: New.
- * libc/machine/x86_64/memset.S: New.
- * libc/machine/configure.in: Added support for x86_64.
- * libc/machine/configure: Regenerated.
-
-2007-08-24 Jeff Johnston <jjohnstn@redhat.com>
-
- * libm/common/sf_lround.c (lroundf): Cast sizeof calculation
- to int before comparing it to a signed int value.
-
-2007-08-24 Hans-Peter Nilsson <hp@axis.com>
-
- * libc/machine/cris/sys/errno.h (ECANCELED, ENOKEY, EKEYEXPIRED)
- (EKEYREVOKED, EKEYREJECTED, EOWNERDEAD, ENOTRECOVERABLE, ENOTSUP):
- Define.
-
-2007-08-23 Hidetaka Takano <hidetaka.takano@glb.toshiba.co.jp>
-
- Reduce the memory consumption of variable argument functions
- for SPU (cell):
- * libc/machine/spu/Makefile.am: Replace printf/scanf family C sources
- to assembler sources.
- * libc/machine/spu/Makefile.in: Regenerated.
- * libc/machine/spu/stdio.c: Add __check_init function wrapping
- CHECK_INIT macro to use from assembler routines.
- * libc/machine/spu/c99ppe.h: Add definitions for assembler code.
- * libc/machine/spu/fiprintf.S: New file.
- * libc/machine/spu/fiscanf.S: Ditto.
- * libc/machine/spu/fprintf.S: Ditto.
- * libc/machine/spu/fscanf.S: Ditto.
- * libc/machine/spu/iprintf.S: Ditto.
- * libc/machine/spu/iscanf.S: Ditto.
- * libc/machine/spu/printf.S: Ditto.
- * libc/machine/spu/scanf.S: Ditto.
- * libc/machine/spu/siprintf.S: Ditto.
- * libc/machine/spu/siscanf.S: Ditto.
- * libc/machine/spu/sniprintf.S: Ditto.
- * libc/machine/spu/snprintf.S: Ditto.
- * libc/machine/spu/sprintf.S: Ditto.
- * libc/machine/spu/sscanf.S: Ditto.
- * libc/machine/spu/stack_reg_va.S: Ditto.
- * libc/machine/spu/syscall.def: Ditto. (for maintenance)
- * libc/machine/spu/mk_syscalls: Ditto. (for maintenance)
- * libc/machine/spu/fiprintf.c: Removed. (Replaced by .S)
- * libc/machine/spu/fiscanf.c: Ditto.
- * libc/machine/spu/fprintf.c: Ditto.
- * libc/machine/spu/fscanf.c: Ditto.
- * libc/machine/spu/iprintf.c: Ditto.
- * libc/machine/spu/iscanf.c: Ditto.
- * libc/machine/spu/printf.c: Ditto.
- * libc/machine/spu/scanf.c: Ditto.
- * libc/machine/spu/siprintf.c: Ditto.
- * libc/machine/spu/siscanf.c: Ditto.
- * libc/machine/spu/sniprintf.c: Ditto.
- * libc/machine/spu/snprintf.c: Ditto.
- * libc/machine/spu/sprintf.c: Ditto.
- * libc/machine/spu/sscanf.c: Ditto.
-
-2007-08-03 Ralf Corsepius <ralf.corsepius@rtems.org>
-
- * libc/include/tar.h: New.
-
-2007-08-03 Jeff Johnston <jjohnstn@redhat.com>
-
- * libc/sys/linux/intl/Makefile.am: Change stpcpy reference to
- lcl_stpcpy to avoid conflict with new stpcpy.c in libc/string.
- * libc/sys/linux/intl/Makefile.in: Regenerated.
- * libc/sys/linux/intl/stpcpy.c: Renamed to...
- * libc/sys/linux/intl/lcl_stpcpy.c: ..this.
-
-2007-08-02 Eric Blake <ebb9@byu.net>
-
- Implement fmemopen and open_memstream.
- * libc/stdio/fmemopen.c (_fmemopen_r, fmemopen): New file.
- * libc/stdio/open_memstream.c (_open_memstream_r, open_memstream):
- New file.
- * libc/stdio/fopencookie.c (fcwriter): Minor optimization.
- * libc/include/stdio.h (dprintf, vdprintf): Group all POSIX 200x
- functions together.
- (fmemopen, open_memstream): Declare new functions.
- * libc/stdio/stdio.tex: Document them.
- * libc/stdio/Makefile.am (ELIX_4_SOURCES, CHEWOUT_FILES): Add
- fmemopen and open_memstream.
- * libc/stdio/Makefile.in: Regenerate.
-
-2007-07-31 Eric Blake <ebb9@byu.net>
-
- More POSIX stream corner cases.
- * libc/stdio/findfp.c (__sinit): Open stderr read/write.
- * libc/stdio/fdopen.c (_fdopen_r): Set O_APPEND on fd when
- requested.
- * libc/stdio64/fdopen64.c (_fdopen64_r): Likewise.
-
-2007-07-18 Eric Blake <ebb9@byu.net>
-
- Fix 'make info'.
- * libc/stdio/stdio.tex: Add missing include.
- * libc/stdio/vfprintf.c: Use expected node name.
- * libc/stdio/vfscanf.c: Likewise.
- * libc/stdio/sscanf.c: Likewise.
- * libc/stdio/sprintf.c: Likewise.
- * libc/stdio/siscanf.c: Likewise.
- * libc/stdio/siprintf.c: Likewise.
- * libc/stdio/fopencookie.c: Quote raw {}.
- Reported by DJ Delorie.
-
-2007-07-13 Eric Blake <ebb9@byu.net>
-
- Fix fflush issues.
- * libc/stdio/fflush.c (_fflush_r): New function.
- (fflush): Fix reentrancy and large offset behavior.
- * libc/include/stdio.h (_fflush_r): Add prototype.
- * libc/stdio/fclose.c (_fclose_r): All fflush callers changed.
- * libc/stdio/freopen.c (_freopen_r): Likewise.
- * libc/stdio/fseek.c (_fseek_r): Likewise.
- * libc/stdio/ftell.c (_ftell_r): Likewise.
- * libc/stdio/fvwrite.c (__sfvwrite_r): Likewise.
- * libc/stdio/refill.c (__srefill_r): Likewise.
- * libc/stdio/setvbuf.c (setvbuf): Likewise.
- * libc/stdio/ungetc.c (_ungetc_r): Likewise.
- * libc/stdio/vfprintf.c (__sbprintf): Likewise.
- * libc/stdio/wbuf.c (__swbuf_r): Likewise.
- * libc/stdio64/freopen64.c (_freopen64_r): Likewise.
- * libc/stdio64/fseeko64.c (_fseeko64_r): Likewise. Defer to
- 32-bit version if not large file.
- * libc/stdio64/ftello64.c (_ftello64_r): Likewise.
- * libc/stdio64/tmpfile64.c (_tmpfile64_r): Avoid compile warning.
-
- Documentation updates.
- * libc/stdio/ungetc.c: Document ungetc.
- * libc/stdio/Makefile.am (CHEWOUT_FILES): Sort, match current list
- of files with documentation.
- * libc/stdio/Makefile.in: Regenerate.
- * libc/stdio/stdio.tex: Sort and update stdio documentation index.
-
-2007-07-11 Jeff Johnston <jjohnstn@redhat.com>
-
- * libc/include/math.h: Fix so C99 functions/macros are accessible
- when -std=c99 is used when compiling and not when using C89.
-
-2007-07-06 Corinna Vinschen <corinna@vinschen.de>
-
- * libc/include/wchar.h: Declare wcstol, wcstoll, wcstoul,
- wcstoull, _wcstol_r, _wcstoll_r, _wcstoul_r and _wcstoull_r.
- * libc/stdlib/Makefile.am (GENERAL_SOURCES): Add wcstol.c and wcstoul.c.
- (EXTENDED_SOURCES): Add wcstoll.c, wcstoll_r.c, wcstoull.c and
- wcstoull_r.c.
- (CHEWOUT_FILES): Add .def files accordingly.
- * libc/stdlib/Makefile.in: Regenerate.
- * libc/stdlib/stdlib.tex: Add documentation links for above functions.
- * libc/stdlib/strtoll.c: Fix portability note.
- * libc/stdlib/strtoull.c: Ditto.
- * libc/stdlib/wcstol.c: New file.
- * libc/stdlib/wcstoll.c: New file.
- * libc/stdlib/wcstoll_r.c: New file.
- * libc/stdlib/wcstoul.c: New file.
- * libc/stdlib/wcstoull.c: New file.
- * libc/stdlib/wcstoull_r.c: New file.
-
-2007-07-06 Jeff Johnston <jjohnstn@redhat.com>
-
- * libc/include/sys/time.h (gettimeofday): Change to proper
- prototype where second parameter is void *.
- * libc/reent/gettimeofdayr.c (_gettimeofday_r): Change prototype
- accordingly.
- * libc/include/reent.h: Fix prototype for _gettimeofday_r.
- * libc/sys/arm/syscalls.c: Fix gettimeofday function signature.
- * libc/sys/rdos/gettod.c: Ditto.
- * libc/sys/sh/syscalls.c: Ditto.
- * libc/time/time.c (time): Change call to _gettimeofday_r
- to pass NULL as 2nd argument.
-
-2007-07-06 Jeff Johnston <jjohnstn@redhat.com>
-
- * libc/sys/linux/intl/dcigettext.c: Define HAVE_STPCPY.
- * libc/sys/linux/intl/l10nflist.c: Ditto.
-
-2007-07-04 Corinna Vinschen <corinna@vinschen.de>
-
- * libc/include/wchar.h: Add prototype for wcsxfrm.
- * libc/string/Makefile.am (GENERAL_SOURCES): Add wcsxfrm.c.
- (CHEWOUT_FILES): Add wcsxfrm.def.
- * libc/string/Makefile.in: Regenerate.
- * libc/string/wcsxfrm.c: New file.
- * libc/string/wcstrings.tex: Add wcsxfrm.
-
-2007-06-28 Corinna Vinschen <corinna@vinschen.de>
-
- * libc/include/string.h: Add prototypes for stpcpy and stpncpy.
- * libc/string/Makefile.am (ELIX_SOURCES): Add stpcpy.c and
- stpncpy.c.
- (CHEWOUT_FILES): Add stpcpy.def and stpncpy.def.
- * libc/string/Makefile.in: Regenerate.
- * libc/string/stpcpy.c: New file.
- * libc/string/stpncpy.c: New file.
- * libc/string/strings.tex: Add stpcpy and stpncpy.
-
-2007-06-27 Eric Blake <ebb9@byu.net>
-
- Support __func__ in assert, as required by C99.
- * libc/stdlib/assert.c (__assert_func): New function.
- (__assert): Use __assert_func.
- * libc/include/assert.h (assert) [!NDEBUG]: Use __assert_func when
- possible.
-
-2007-06-20 Patrick Mansfield <patmans@us.ibm.com>
-
- * libc/machine/spu/perror.c: Pass errno as the second argument to
- the assist call.
-
-2007-06-20 Patrick Mansfield <patmans@us.ibm.com>
-
- * libc/include/sys/unistd.h[__SPU__]: Add lockf prototype and related
- defines; expose ftruncate, truncate and sync prototypes.
-
-2007-06-20 Patrick Mansfield <patmans@us.ibm.com>
-
- * libc/include/sys/unistd.h[__SPU__]: Make fchdir prototype visible.
- * libc/include/sys/stat.h[__SPU__]: Make mknod and lstat prototypes
- visible.
-
-2007-06-15 Patrick Mansfield <patmans@us.ibm.com>
-
- * libc/machine/spu/Makefile.am: Remove mktemp.c, it was left in
- from a dropped patch.
- * libc/machine/spu/Makefile.in: Regenerate.
-
-2007-06-13 Patrick Mansfield <patmans@us.ibm.com>
-
- * libc/machine/spu/creat.c: New file copied from libc/posix/creat.c,
- it just calls open with appropriate arguments.
- * libc/machine/spu/Makefile.am: Add creat.c.
- * libc/machine/spu/Makefile.in: Regenerate.
-
-2007-06-13 Jeff Johnston <jjohnstn@redhat.com>
-
- * libc/machine/spu/Makefile.am: Re-add back setjmp.S which
- I accidentally dropped.
- * libc/machine/spu/Makefile.in: Regenerated.
-
-2007-06-13 Patrick Mansfield <patmans@us.ibm.com>
-
- * libc/include/sys/features.h: Define _POSIX_TIMERS for spu.
- * libc/include/sys/unistd.h: Change usleep prototype to Posix
- form and move outside of OS flag checks.
- * libc/machine/spu/Makefile.am: Add sleep and usleep.
- * libc/machine/spu/Makefile.in: Regenerate.
- * libc/machine/spu/sleep.c: Copy libc/posix/sleep.c.
- * libc/machine/spu/usleep.c: Copy libc/posix/usleep.c.
-
-2007-06-11 Corinna Vinschen <corinna@vinschen.de>
-
- * libc/include/sys/unistd.h: Declare confstr for Cygwin.
- Define confstr constants for Cygwin. Add comment.
-
-2007-06-10 Hans-Peter Nilsson <hp@bitrange.com>
-
- * libc/sys/mmixware/access.c (access): Do not try to use a magic
- file-handle and a direct syscall, just use _open.
- * libc/sys/mmixware/sys/syscall.h (TMPFNO): Remove this magic
- file-handle.
-
- * libc/sys/mmixware/_exit.c (_exit): Update comment about
- passing on the exit value.
-
-2007-06-08 Jeff Johnston <jjohnstn@redhat.com>
-
- * libc/string/strcasestr.c: New file.
- * libc/include/string.h: Add strcasestr.
- * libc/string/strings.tex: Add strcasestr.
- * libc/string/Makefile.am: Ditto.
- * libc/string/Makefile.in: Regenerated.
-
-2007-06-06 Christian Groessler <chris@groessler.org>
-
- * libc/stdlib/ldtoa (_ldcheck): Make sure the setting of
- rnd is done after the last local variable declaration.
-
-2007-06-06 Jeff Johnston <jjohnstn@redhat.com>
-
- * libc/stdlib/mprec.h[Just_16]: Make sure that Pack_16 is defined.
-
-2007-06-05 Christian Groessler <chris@groessler.org>
-
- * libc/argz/argz_insert.c (argz_insert): Move delta variable
- declaration to top of function in keeping with C89 standard.
-
-2007-06-04 Eric Blake <ebb9@byu.net>
-
- Implement funopen, fopencookie.
- * libc/include/sys/reent.h (struct __sFILE, struct __sFILE64):
- Switch to reentrant callbacks.
- * libc/include/stdio.h (funopen): Fix declaration.
- (fopencookie): Declare.
- * libc/stdio/local.h (__sread, __swrite, __sseek, __sclose)
- (__sseek64, __swrite64): Fix prototypes.
- [__SCLE]: Pull in setmode declaration.
- * libc/stdio/stdio.c (__sread, __swrite, __sseek, __sclose): Fix
- reentrancy.
- * libc/stdio64/stdio64.c (__sseek64_r, __swrite64_r): Delete.
- (__sseek64, __swrite64): Fix reentrancy.
- * libc/stdio/fseek.c (_fseek_r): Account for overflow, and fix
- reentrancy.
- * libc/stdio/ftell.c (_ftell_r): Likewise.
- * libc/stdio/flags.c (__sflags): Don't lose __SAPP on "a+".
- * libc/stdio/fclose.c (_fclose_r): Fix reentrancy.
- * libc/stdio/freopen.c (_freopen_r): Likewise.
- * libc/stdio/fvwrite.c (__sfvwrite_r): Likewise.
- * libc/stdio/refill.c (__srefill_r): Likewise.
- * libc/stdio/siscanf.c (eofread): Likewise.
- * libc/stdio/sscanf.c (eofread): Likewise.
- * libc/stdio/vsiscanf.c (eofread1): Likewise.
- * libc/stdio/vsscanf.c (eofread1): Likewise.
- * libc/stdio64/freopen64.c (_freopen64_r): Likewise.
- * libc/stdio64/fseeko64.c (_fseeko64_r): Likewise.
- * libc/stdio64/ftello64.c (_ftello64_r): Likewise.
- * libc/stdio/fflush.c (fflush): Improve reentrancy, although more
- could be fixed.
- * libc/stdio/fopencookie.c (_fopencookie_r, fopencookie): New file.
- * libc/stdio/funopen.c (_funopen_r, funopen): New file.
- * libc/stdio/Makefile.am (ELIX_4_SOURCES, CHEWOUT_FILES): Build
- new files.
- * libc/stdio/Makefile.in: Regenerate.
-
-2007-05-29 Eric Blake <ebb9@byu.net>
-
- Avoid more compiler warnings.
- * libc/stdlib/btowc.c: Add missing header.
- * libc/stdlib/getopt.c (getopt_internal): Initialize variable.
- * libc/stdlib/system.c (do_system) [__CYGWIN__]: Add declaration.
- * libc/stdlib/wctob.c: Add missing header.
- * libc/string/strcpy.c (strcpy): Avoid warnings.
- * libc/string/strrchr.c (strrchr): Likewise.
-
-2007-05-29 Corinna Vinschen <corinna@vinschen.de>
-
- * libc/argz/argz_add_sep.c (argz_add_sep): Handle empty string
- argument.
- * libc/argz/argz_append.c (argz_append): Handle empty buf argument.
- * libc/argz/argz_create_sep.c (argz_create_sep): Return (NULL, 0)
- on empty input strings.
- * libc/argz/argz_extract.c (argz_extract): Check argz_len before
- looping through argz.
- * libc/argz/argz_stringify.c (argz_stringify): Ditto.
-
-2007-05-27 Brian Dessent <brian@dessent.net>
-
- * libc/stdio/vfprintf.c (_VFPRINTF_R): Populate 'ox' when
- handling %p.
-
-2007-05-25 Eric Blake <ebb9@byu.net>
-
- * libc/stdio/rewind.c (rewind): Fix regression of 2003-08-22.
-
-2007-05-24 Steve Ellcey <sje@cup.hp.com>
- Charles Wilson <libtool@cwilson.fastmail.fm>
-
- * libtool.m4: removed
- * configure.in: invoke _LD_DECL_SED before conditionally initializing
- libtool. Move AC_PROG_AWK outside conditional.
- * libc/sys/linux/configure.in: Ditto.
- * libc/sys/linux/linuxthreads/configure.in: Ditto.
- * libc/sys/linux/linuxthreads/machine/i386/configure.in: Ditto.
- * libc/sys/linux/machine/i386/configure.in: Ditto.
-
- * iconvdata/configure.in: invoke _LD_DECL_SED before conditionally
- initializing libtool.
- * libc/configure.in: Ditto.
- * libc/machine/configure.in: Ditto.
- * libc/machine/i386/configure.in: Ditto.
- * libc/sys/configure.in: Ditto.
- * libc/sys/linux/linuxthreads/machine/configure.in: Ditto.
- * libc/sys/linux/machine/configure.in: Ditto.
- * libm/configure.in: Ditto.
- * libm/machine/configure.in: Ditto.
-
- * Makefile.am: Ensure toplevel is included in ACLOCAL_AMFLAGS.
- * doc/Makefile.am: Ditto.
- * iconvdata/Makefile.am: Ditto.
- * libc/Makefile.am: Ditto.
- * libc/machine/Makefile.am: Ditto.
- * libc/machine/a29k/Makefile.am: Ditto.
- * libc/machine/arm/Makefile.am: Ditto.
- * libc/machine/bfin/Makefile.am: Ditto.
- * libc/machine/cris/Makefile.am: Ditto.
- * libc/machine/crx/Makefile.am: Ditto.
- * libc/machine/d10v/Makefile.am: Ditto.
- * libc/machine/d30v/Makefile.am: Ditto.
- * libc/machine/fr30/Makefile.am: Ditto.
- * libc/machine/frv/Makefile.am: Ditto.
- * libc/machine/h8300/Makefile.am: Ditto.
- * libc/machine/h8500/Makefile.am: Ditto.
- * libc/machine/hppa/Makefile.am: Ditto.
- * libc/machine/i386/Makefile.am: Ditto.
- * libc/machine/i960/Makefile.am: Ditto.
- * libc/machine/iq2000/Makefile.am: Ditto.
- * libc/machine/m32c/Makefile.am: Ditto.
- * libc/machine/m32r/Makefile.am: Ditto.
- * libc/machine/m68hc11/Makefile.am: Ditto.
- * libc/machine/m68k/Makefile.am: Ditto.
- * libc/machine/m88k/Makefile.am: Ditto.
- * libc/machine/mips/Makefile.am: Ditto.
- * libc/machine/mn10200/Makefile.am: Ditto.
- * libc/machine/mn10300/Makefile.am: Ditto.
- * libc/machine/mt/Makefile.am: Ditto.
- * libc/machine/necv70/Makefile.am: Ditto.
- * libc/machine/powerpc/Makefile.am: Ditto.
- * libc/machine/sh/Makefile.am: Ditto.
- * libc/machine/sparc/Makefile.am: Ditto.
- * libc/machine/spu/Makefile.am: Ditto.
- * libc/machine/tic4x/Makefile.am: Ditto.
- * libc/machine/tic80/Makefile.am: Ditto.
- * libc/machine/v850/Makefile.am: Ditto.
- * libc/machine/w65/Makefile.am: Ditto.
- * libc/machine/xscale/Makefile.am: Ditto.
- * libc/machine/xstormy16/Makefile.am: Ditto.
- * libc/machine/z8k/Makefile.am: Ditto.
- * libc/sys/Makefile.am: Ditto.
- * libc/sys/a29khif/Makefile.am: Ditto.
- * libc/sys/arc/Makefile.am: Ditto.
- * libc/sys/arm/Makefile.am: Ditto.
- * libc/sys/d10v/Makefile.am: Ditto.
- * libc/sys/decstation/Makefile.am: Ditto.
- * libc/sys/h8300hms/Makefile.am: Ditto.
- * libc/sys/h8500hms/Makefile.am: Ditto.
- * libc/sys/linux/Makefile.am: Ditto.
- * libc/sys/linux/linuxthreads/Makefile.am: Ditto.
- * libc/sys/linux/linuxthreads/machine/Makefile.am: Ditto.
- * libc/sys/linux/linuxthreads/machine/i386/Makefile.am: Ditto.
- * libc/sys/linux/machine/Makefile.am: Ditto.
- * libc/sys/linux/machine/i386/Makefile.am: Ditto.
- * libc/sys/m88kbug/Makefile.am: Ditto.
- * libc/sys/mmixware/Makefile.am: Ditto.
- * libc/sys/netware/Makefile.am: Ditto.
- * libc/sys/rdos/Makefile.am: Ditto.
- * libc/sys/rtems/Makefile.am: Ditto.
- * libc/sys/sh/Makefile.am: Ditto.
- * libc/sys/sparc64/Makefile.am: Ditto.
- * libc/sys/sun4/Makefile.am: Ditto.
- * libc/sys/sysmec/Makefile.am: Ditto.
- * libc/sys/sysnec810/Makefile.am: Ditto.
- * libc/sys/sysnecv850/Makefile.am: Ditto.
- * libc/sys/sysvi386/Makefile.am: Ditto.
- * libc/sys/sysvnecv70/Makefile.am: Ditto.
- * libc/sys/tic80/Makefile.am: Ditto.
- * libc/sys/w65/Makefile.am: Ditto.
- * libc/sys/z8ksim/Makefile.am: Ditto.
- * libm/Makefile.am: Ditto.
- * libm/machine/Makefile.am: Ditto.
- * libm/machine/i386/Makefile.am: Ditto.
- * libm/machine/spu/Makefile.am: Ditto.
-
- * aclocal.m4: Regenerate.
- * iconvdata/aclocal.m4: Regenerate.
- * libc/aclocal.m4: Regenerate.
- * libc/machine/aclocal.m4: Regenerate.
- * libc/machine/i386/aclocal.m4: Regenerate.
- * libc/sys/aclocal.m4: Regenerate.
- * libc/sys/linux/aclocal.m4: Regenerate.
- * libc/sys/linux/linuxthreads/aclocal.m4: Regenerate.
- * libc/sys/linux/linuxthreads/machine/aclocal.m4: Regenerate.
- * libc/sys/linux/linuxthreads/machine/i386/aclocal.m4: Regenerate.
- * libc/sys/linux/machine/aclocal.m4: Regenerate.
- * libc/sys/linux/machine/i386/aclocal.m4: Regenerate.
- * libm/aclocal.m4: Regenerate.
- * libm/machine/aclocal.m4: Regenerate.
- * libm/machine/i386/aclocal.m4: Regenerate.
-
- * Makefile.in: Regenerate.
- * doc/Makefile.in: Regenerate.
- * iconvdata/Makefile.in: Regenerate.
- * libc/Makefile.in: Regenerate.
- * libc/argz/Makefile.in: Regenerate.
- * libc/ctype/Makefile.in: Regenerate.
- * libc/errno/Makefile.in: Regenerate.
- * libc/iconv/Makefile.in: Regenerate.
- * libc/iconv/ccs/Makefile.in: Regenerate.
- * libc/iconv/ccs/binary/Makefile.in: Regenerate.
- * libc/iconv/ces/Makefile.in: Regenerate.
- * libc/iconv/lib/Makefile.in: Regenerate.
- * libc/locale/Makefile.in: Regenerate.
- * libc/machine/Makefile.in: Regenerate.
- * libc/machine/a29k/Makefile.in: Regenerate.
- * libc/machine/arm/Makefile.in: Regenerate.
- * libc/machine/bfin/Makefile.in: Regenerate.
- * libc/machine/cris/Makefile.in: Regenerate.
- * libc/machine/crx/Makefile.in: Regenerate.
- * libc/machine/d10v/Makefile.in: Regenerate.
- * libc/machine/d30v/Makefile.in: Regenerate.
- * libc/machine/fr30/Makefile.in: Regenerate.
- * libc/machine/frv/Makefile.in: Regenerate.
- * libc/machine/h8300/Makefile.in: Regenerate.
- * libc/machine/h8500/Makefile.in: Regenerate.
- * libc/machine/hppa/Makefile.in: Regenerate.
- * libc/machine/i386/Makefile.in: Regenerate.
- * libc/machine/i960/Makefile.in: Regenerate.
- * libc/machine/iq2000/Makefile.in: Regenerate.
- * libc/machine/m32c/Makefile.in: Regenerate.
- * libc/machine/m32r/Makefile.in: Regenerate.
- * libc/machine/m68hc11/Makefile.in: Regenerate.
- * libc/machine/m68k/Makefile.in: Regenerate.
- * libc/machine/m88k/Makefile.in: Regenerate.
- * libc/machine/mips/Makefile.in: Regenerate.
- * libc/machine/mn10200/Makefile.in: Regenerate.
- * libc/machine/mn10300/Makefile.in: Regenerate.
- * libc/machine/mt/Makefile.in: Regenerate.
- * libc/machine/necv70/Makefile.in: Regenerate.
- * libc/machine/powerpc/Makefile.in: Regenerate.
- * libc/machine/sh/Makefile.in: Regenerate.
- * libc/machine/sparc/Makefile.in: Regenerate.
- * libc/machine/spu/Makefile.in: Regenerate.
- * libc/machine/tic4x/Makefile.in: Regenerate.
- * libc/machine/tic80/Makefile.in: Regenerate.
- * libc/machine/v850/Makefile.in: Regenerate.
- * libc/machine/w65/Makefile.in: Regenerate.
- * libc/machine/xscale/Makefile.in: Regenerate.
- * libc/machine/xstormy16/Makefile.in: Regenerate.
- * libc/machine/z8k/Makefile.in: Regenerate.
- * libc/misc/Makefile.in: Regenerate.
- * libc/posix/Makefile.in: Regenerate.
- * libc/reent/Makefile.in: Regenerate.
- * libc/search/Makefile.in: Regenerate.
- * libc/signal/Makefile.in: Regenerate.
- * libc/stdio/Makefile.in: Regenerate.
- * libc/stdio64/Makefile.in: Regenerate.
- * libc/stdlib/Makefile.in: Regenerate.
- * libc/string/Makefile.in: Regenerate.
- * libc/sys/Makefile.in: Regenerate.
- * libc/sys/a29khif/Makefile.in: Regenerate.
- * libc/sys/arc/Makefile.in: Regenerate.
- * libc/sys/arm/Makefile.in: Regenerate.
- * libc/sys/d10v/Makefile.in: Regenerate.
- * libc/sys/decstation/Makefile.in: Regenerate.
- * libc/sys/h8300hms/Makefile.in: Regenerate.
- * libc/sys/h8500hms/Makefile.in: Regenerate.
- * libc/sys/linux/Makefile.in: Regenerate.
- * libc/sys/linux/argp/Makefile.in: Regenerate.
- * libc/sys/linux/cmath/Makefile.in: Regenerate.
- * libc/sys/linux/dl/Makefile.in: Regenerate.
- * libc/sys/linux/iconv/Makefile.in: Regenerate.
- * libc/sys/linux/intl/Makefile.in: Regenerate.
- * libc/sys/linux/linuxthreads/Makefile.in: Regenerate.
- * libc/sys/linux/linuxthreads/machine/Makefile.in: Regenerate.
- * libc/sys/linux/linuxthreads/machine/i386/Makefile.in: Regenerate.
- * libc/sys/linux/machine/Makefile.in: Regenerate.
- * libc/sys/linux/machine/i386/Makefile.in: Regenerate.
- * libc/sys/linux/net/Makefile.in: Regenerate.
- * libc/sys/linux/stdlib/Makefile.in: Regenerate.
- * libc/sys/m88kbug/Makefile.in: Regenerate.
- * libc/sys/mmixware/Makefile.in: Regenerate.
- * libc/sys/netware/Makefile.in: Regenerate.
- * libc/sys/rdos/Makefile.in: Regenerate.
- * libc/sys/rtems/Makefile.in: Regenerate.
- * libc/sys/sh/Makefile.in: Regenerate.
- * libc/sys/sparc64/Makefile.in: Regenerate.
- * libc/sys/sun4/Makefile.in: Regenerate.
- * libc/sys/sysmec/Makefile.in: Regenerate.
- * libc/sys/sysnec810/Makefile.in: Regenerate.
- * libc/sys/sysnecv850/Makefile.in: Regenerate.
- * libc/sys/sysvi386/Makefile.in: Regenerate.
- * libc/sys/sysvnecv70/Makefile.in: Regenerate.
- * libc/sys/tic80/Makefile.in: Regenerate.
- * libc/sys/w65/Makefile.in: Regenerate.
- * libc/sys/z8ksim/Makefile.in: Regenerate.
- * libc/syscalls/Makefile.in: Regenerate.
- * libc/time/Makefile.in: Regenerate.
- * libc/unix/Makefile.in: Regenerate.
- * libm/Makefile.in: Regenerate.
- * libm/common/Makefile.in: Regenerate.
- * libm/machine/Makefile.in: Regenerate.
- * libm/machine/i386/Makefile.in: Regenerate.
- * libm/machine/spu/Makefile.in: Regenerate.
- * libm/math/Makefile.in: Regenerate.
- * libm/mathfp/Makefile.in: Regenerate.
-
- * configure: Regenerate.
- * iconvdata/configure: Regenerate.
- * libc/configure: Regenerate.
- * libc/machine/configure: Regenerate.
- * libc/machine/i386/configure: Regenerate.
- * libc/sys/configure: Regenerate.
- * libc/sys/linux/configure: Regenerate.
- * libc/sys/linux/linuxthreads/configure: Regenerate.
- * libc/sys/linux/linuxthreads/machine/configure: Regenerate.
- * libc/sys/linux/linuxthreads/machine/i386/configure: Regenerate.
- * libc/sys/linux/machine/configure: Regenerate.
- * libc/sys/linux/machine/i386/configure: Regenerate.
- * libm/configure: Regenerate.
- * libm/machine/configure: Regenerate.
- * libm/machine/i386/configure: Regenerate.
-
-2007-05-23 Eric Blake <ebb9@byu.net>
-
- * libc/stdio/vfprintf.c (_VFPRINTF_R): Don't truncate %p when
- sizeof(void*) is 8 but sizeof(long) is 4.
- * libc/stdio/vfscanf.c (__SVFSCANF_R): Likewise. Fix %i scanning
- of "-0x". Support "-nan" and "inf" for %e. Audit usage of ungetc
- to fix reentrancy and bug on encoding error in multibyte locales.
- Always return EOF on read error.
-
-2007-05-23 Patrick Mansfield <patmans@us.ibm.com>
-
- * libc/machine/spu/sys/syscall.h: Update the __send_to_ppe
- prototype.
- * libc/machine/spu/fclose.c: Use the __send_to_ppe return value
- instead of the slot 0 value, remove any now unused variables, and
- for some cases, now store the result in an int vs int*.
- * libc/machine/spu/feof.c: Ditto.
- * libc/machine/spu/ferror.c: Ditto.
- * libc/machine/spu/fflush.c: Ditto.
- * libc/machine/spu/fgetc.c: Ditto.
- * libc/machine/spu/fgetpos.c: Ditto.
- * libc/machine/spu/fgets.c: Ditto.
- * libc/machine/spu/fileno.c: Ditto.
- * libc/machine/spu/fopen.c: Ditto.
- * libc/machine/spu/fprintf.c: Ditto.
- * libc/machine/spu/fputc.c: Ditto.
- * libc/machine/spu/fputs.c: Ditto.
- * libc/machine/spu/fread.c: Ditto.
- * libc/machine/spu/freopen.c: Ditto.
- * libc/machine/spu/fscanf.c: Ditto.
- * libc/machine/spu/fseek.c: Ditto.
- * libc/machine/spu/fsetpos.c: Ditto.
- * libc/machine/spu/ftell.c: Ditto.
- * libc/machine/spu/fwrite.c: Ditto.
- * libc/machine/spu/getc.c: Ditto.
- * libc/machine/spu/getchar.c: Ditto.
- * libc/machine/spu/gets.c: Ditto.
- * libc/machine/spu/printf.c: Ditto.
- * libc/machine/spu/putc.c: Ditto.
- * libc/machine/spu/putchar.c: Ditto.
- * libc/machine/spu/puts.c: Ditto.
- * libc/machine/spu/remove.c: Ditto.
- * libc/machine/spu/rename.c: Ditto.
- * libc/machine/spu/scanf.c: Ditto.
- * libc/machine/spu/setvbuf.c: Ditto.
- * libc/machine/spu/snprintf.c: Ditto.
- * libc/machine/spu/sprintf.c: Ditto.
- * libc/machine/spu/sscanf.c: Ditto.
- * libc/machine/spu/tmpfile.c: Ditto.
- * libc/machine/spu/tmpnam.c: Ditto.
- * libc/machine/spu/ungetc.c: Ditto.
- * libc/machine/spu/vfprintf.c: Ditto.
- * libc/machine/spu/vfscanf.c: Ditto.
- * libc/machine/spu/vprintf.c: Ditto.
- * libc/machine/spu/vscanf.c: Ditto.
- * libc/machine/spu/vsnprintf.c: Ditto.
- * libc/machine/spu/vsprintf.c: Ditto.
- * libc/machine/spu/vsscanf.c: Ditto.
-
-2007-05-23 Eric Blake <ebb9@byu.net>
-
- * libc/stdio/vfscanf.c (__SVFSCANF_R): Support scanf(%1$s).
- Avoid warning when !FLOATING_POINT.
- * libc/stdio/vfprintf.c (_VFPRINTF_R): Simplify _NO_POS_ARGS
- slightly.
-
-2007-05-23 Corinna Vinschen <vinschen@redhat.com>
-
- * libc/argz/argz_create_sep.c (argz_create_sep): Initialize *argz_len
- to zero.
- * libc/include/argz.h: Guard against multiple inclusion. Guard for
- use with C++.
-
-2007-05-18 Eric Blake <ebb9@byu.net>
-
- * libc/stdio/vfprintf.c [_WANT_IO_LONG_LONG]: Allow non-gcc
- compilers.
- * libc/stdio/vfscanf.c: Likewise.
-
-2007-05-17 Cary R. <cygcary <at> yahoo.com>
-
- * libm/math/w_atan2.c: Fix atan2 to be consistent with glibc
- (atan2(+0,-0), atan2(-0,-0) and atan(-0,+0))
- * libm/math/wf_atan2.c: Ditto.
-
-2007-05-17 Yaakov Selkowitz <yselkowitz <at> users.sourceforge.net>
-
- * libm/common/Makefile.am: Add support for exp10, exp10f,
- pow10, and pow10f functions.
- * libm/common/Makefile.in: Regenerated.
- * libm/common/s_pow10.c: New file.
- * libm/common/sf_pow10.c: Ditto.
- * libm/common/s_exp10.c: Ditto.
- * libm/common/sf_exp10.c: Ditto.
- * libc/include/math.h [!pow10]: New pow10 prototype.
- [!pow10f]: New pow10f prototype.
- [!exp10]: New exp10 prototype.
- [!exp10f]: New exp10f prototype.
-
-2007-05-17 Charles Wilson <cygwin@...>
-
- * stdio/tmpfile.c: Include <sys/stat.h>.
- * stdio64/tmpfile64.c: Ditto.
-
-2007-05-16 Eric Blake <ebb9@byu.net>
-
- Close security hole in tmpfile.
- * libc/stdio/tmpfile.c (_tmpfile_r): Avoid window between filename
- generation and opening the fd.
- * libc/stdio64/tmpfile64.c (_tmpfile64_r): Likewise.
-
- * libc/include/math.h (INFINITY, NAN, FP_ILOGB0, FP_ILOGBNAN)
- (MATH_ERRNO, MATH_ERREXCEPT, math_errhandling): Add macros
- required by POSIX.
- * libc/stdlib/ldtoa.c (USE_INFINITY): Rename from INFINITY, to
- avoid clash with <math.h>.
-
- * libc/stdlib/wctomb_r.c (_wctomb_r): Avoid gcc warnings on cygwin.
- * libc/search/hash.c (__hash_open): Likewise.
-
-2007-05-14 Eric Blake <ebb9@byu.net>
-
- Reduce stack size of *printf.
- * libc/stdio/vfprintf.c (_VFPRINTF_R): Fix use of decimal point
- in %f. Avoid malloc when possible for %S.
- (BUF): Improve stack locality by using smaller size.
- (MAXEXPLEN, _PRINTF_FLOAT_TYPE): Define.
- (exponent): Use smaller stack size.
-
-2007-05-11 Eric Blake <ebb9@byu.net>
-
- Minimize printf/scanf size on platforms that don't need C99.
- * acconfig.h (_WANT_IO_C99_FORMATS): New macro.
- * newlib.hin (_WANT_IO_C99_FORMATS): Likewise.
- * configure.in (newlib-io-c99-formats): New configure option.
- (_WANT_IO_C99_FORMATS): Define appropriately.
- * configure.host (*-linux*, cygwin): Default c99-formats to yes.
- * libc/stdio/vfprintf.c (_VFPRINTF_R) [!_WANT_IO_C99_FORMATS]:
- Cripple ' flag; hh, z, j, t sizes; a, A, F, C, S specifiers.
- * libc/stdio/vfscanf.c (_VFSCANF_R) [!_WANT_IO_C99_FORMATS]:
- Likewise.
- * configure: Regenerate.
-
- * libc/stdio/vfprintf.c (_VFPRINTF_R, cvt, exponent, chclass)
- (get_arg): Support '%a' and '%A'.
-
-2007-05-09 Eric Blake <ebb9@byu.net>
-
- Allow zero size with non-null buf in *asnprintf.
- * libc/stdio/asnprintf.c (_asnprintf_r, asnprintf): Avoid free'ing
- user's buf.
- * libc/stdio/asniprintf.c (_asniprintf_r, asniprintf): Likewise.
- * libc/stdio/vasniprintf.c (_vasniprintf_r): Likewise.
- * libc/stdio/vasnprintf.c (_vasnprintf_r): Likewise.
-
-2007-05-07 Charles Wilson <cygwin@...>
-
- * libc/stdio/vfprintf.c: Fix typo in comments that breaks docs.
-
-2007-05-03 Eric Blake <ebb9@byu.net>
-
- Add support for asnprintf, and improve *printf documentation.
- * libc/stdio/Makefile.am (ELIX_SOURCES): Rename...
- (ELIX_2_SOURCES): ...to this.
- (ELIX_4_SOURCES): Add new variable. Build asnprintf.
- (GENERAL_SOURCES): Move dprintf to ELIX_4_SOURCES.
- (CHEWOUT_FILES): Include diprintf in documentation.
- * libc/stdio/Makefile.in: Regenerate.
- * libc/stdio/diprintf.c: Improve documentation.
- * libc/stdio/dprintf.c: Likewise.
- * libc/stdio/siprintf.c: Likewise.
- * libc/stdio/sprintf.c: Likewise.
- * libc/stdio/vfprintf.c: Likewise.
- * libc/stdio/viprintf.c: Likewise.
- * libc/stdio/vsniprintf.c: Consolidate documentation.
- * libc/stdio/asiprintf.c: Refer to documentation.
- * libc/stdio/asprintf.c: Likewise.
- * libc/stdio/fiprintf.c: Likewise.
- * libc/stdio/fprintf.c: Likewise.
- * libc/stdio/iprintf.c: Likewise.
- * libc/stdio/printf.c: Likewise.
- * libc/stdio/sniprintf.c: Likewise.
- * libc/stdio/vdiprintf.c: Likewise.
- * libc/stdio/vdprintf.c: Likewise.
- * libc/stdio/vsiprintf.c: Likewise.
- * libc/stdio/fvwrite.c (__sfvwrite_r): Handle asnprintf.
- * libc/stdio/asniprintf.c (asniprintf, _asniprintf_r): New file.
- * libc/stdio/asnprintf.c (asnprintf, _asnprintf_r): New file.
- * libc/stdio/vasniprintf.c (vasniprintf, _vasniprintf_r): New
- file.
- * libc/stdio/vasnprintf.c (vasnprintf, _vasnprintf_r): New file.
- * libc/stdio/vdprintf.c (_vdprintf_r): Rewrite to avoid malloc in
- typical case.
- * libc/stdio/vdiprintf.c (_vdiprintf_r): Likewise.
- * libc/include/stdio.h: Add prototypes for new functions; sort
- existing functions.
-
-2007-05-03 Kazu Hirata <kazu@codesourcery.com>
-
- * libc/machine/m68k/Makefile.am (lib_a_SOURCES): Add memcpy.S
- and memset.S.
- * libc/machine/m68k/Makefile.in: Regenerate.
- * libc/machine/m68k/memcpy.S: Use sub.l followed by dbra.
- * libc/machine/m68k/memset.S: Likewise.
-
-2007-05-01 Eric Blake <ebb9@byu.net>
-
- * libc/stdio64/local64.h: Delete, move contents to...
- * libc/stdio/local.h: ...here.
- * libc/stdio64/fdopen64.c: Update includes.
- * libc/stdio64/fopen64.c: Likewise.
- * libc/stdio64/freopen64.c: Likewise.
- * libc/stdio64/fseeko64.c: Likewise.
- * libc/stdio64/ftello64.c: Likewise.
- * libc/stdio/findfp.c (std) [__LARGE64_FILES]: Open stdin, stdout,
- and stderr with 64-bit offset.
- * libc/stdio/fseek.c (_fseek_r): Avoid compile warning.
- * libc/stdio/makebuf.c (__smakebuf_r): Likewise.
- * libc/stdio/mktemp.c (_gettemp): Likewise.
-
-2007-05-01 Cary R. <cygcary <at> yahoo.com>
-
- * libm/math/e_pow.c: Fix to be consistent with glibc with regards
- to treatment of NaN and +-inf arguments.
- * libm/math/ef_pow.c: Ditto.
- * libm/math/w_pow.c: Ditto.
- * libm/math/wf_pow.c: Ditto.
- * libm/math/w_acos.c: Fix domain errors to return NaN.
- * libm/math/w_asin.c: Ditto.
- * libm/math/wf_acos.c: Ditto.
- * libm/math/wf_asin.c: Ditto.
- * libm/math/w_log.c: Fix to return NaN for negative number inputs.
- * libm/math/wf_log.c: Ditto.
- * libm/math/wf_log10.c: Ditto.
- * libm/math/w_log10.c: Ditto.
-
-2007-04-27 Jeff Johnston <jjohnstn@redhat.com>
-
- * libc/machine/m68k/Makefile.am: Temporarily remove
- memcpy.S and memset.S until logic can be confirmed for
- !(__mcoldfile__) case.
- * libc/machine/m68k/Makefile.in: Regenerated.
-
-2007-04-27 Kazu Hirata <kazu@codesourcery.com>
-
- * libc/machine/m68k/Makefile.am (lib_a_SOURCES): Add memcpy.S
- and memset.S.
- * libc/machine/m68k/Makefile.in: Regenerate.
- * libc/machine/m68k/memcpy.S, libc/machine/m68k/memset.S: New.
-
-2007-04-26 Patrick Mansfield <patmans@us.ibm.com>
-
- * libc/include/ieeefp.h: use prefixed __ieeefp_ macros that can be
- overridden via machine/ieeefp.h.
- * libc/include/machine/ieeefp.h: Add SPU specific C99 and ieeefp
- macros for isnan and related macros.
- * libc/include/math.h: Allow C99 isfinite, isinf, and isnan to be
- overridden via machine/ieeefp.h.
- * libm/machine/spu/Makefile.am: Add new files.
- * libm/machine/spu/Makefile.in: Autogenerate with new files.
- * libm/machine/spu/sf_fpclassify.c: Add SPU specific __fpclassifyf.
- * libm/machine/spu/sf_finite.c: Add SPU specific finitef.
- * libm/machine/spu/sf_isinf.c: Add SPU specific isinff.
- * libm/machine/spu/sf_isinff.c: Add SPU specific __isinff.
- * libm/machine/spu/sf_isnan.c: Add SPU specific isnanf.
- * libm/machine/spu/sf_isnanf.c: Add SPU specific __isnanf.
- * libm/machine/spu/sf_nan.c: Add SPU specific nanf.
-
-2007-04-25 Jeff Johnston <jjohnstn@redhat.com>
-
- * libm/common/s_fpclassify.c (__fpclassifyf): Move this to...
- * libm/common/sf_fpclassify.c: ...here. New file.
- * libm/common/Makefile.am: Add sf_fpclassify.c.
- * libm/common/Makefile.in: Regenerated.
-
-2007-04-25 Patrick Mansfield <patmans@us.ibm.com>
-
- * libc/machine/spu/sys/errno.h: New file, so spu errno values match
- ppu linux values. This file is a copy of the cris/sys/errno.h plus
- a few changes (see spu errno.h comments).
-
-2007-04-25 Eric Blake <ebb9@byu.net>
-
- * libc/stdio/vfprintf.c (get_arg): Support %1$lc. Simplify types
- that promote to int.
-
-2007-04-25 Patrick Mansfield <patmans@us.ibm.com>
-
- * libm/machine/spu/headers/feholdexcept.h: Use *envp not env so
- we clear the proper bits in the fpscr, and don't set some random ones.
-
-2007-04-24 Eric Blake <ebb9@byu.net>
-
- * libc/stdio/vfprintf.c (_VFPRINTF_R): Don't zero pad on infinity
- or NaN with %05f.
-
- * libc/stdio/vfprintf.c (_VFPRINTF_R): Avoid multibyte when not
- _MB_CAPABLE.
-
- * libc/include/limits.h (NL_ARGMAX): Define a default value.
- * libc/stdio/vfprintf.c (MAX_POS_ARGS): Define in terms of
- NL_ARGMAX, if present.
-
-2007-04-23 Brian Dessent <brian@dessent.net>
-
- * libc/stdio/vfprintf.c (_vfprintf_r): When the alternate-form flag
- has been specified with types 'f', 'F', 'g', or 'G', ensure the
- trailing decimal is printed.
-
-2007-04-23 Ralf Wildenhues <Ralf.Wildenhues <at> gmx.de>
-
- * confsubdir.m4 (AC_CONFIG_SUBDIRS, _AC_OUTPUT_SUBDIRS): New
- file. Override Autoconf-2.59's version of these macros with
- fixed handling of multiple adjacent whitespace in arguments.
- * aclocal.m4: Regenerated forcefully.
- * configure: Ditto.
- * Makefile.in: Ditto.
- * libc/*Makefile.in: Ditto.
- * libc/*aclocal.m4: Ditto.
- * libc/*configure: Ditto.
- * libm/*Makefile.in: Ditto.
- * libm/*aclocal.m4: Ditto.
- * libm/*configure: Ditto.
-
-2007-04-23 Jeff Johnston <jjohnstn@redhat.com>
-
- * libc/sys/arc/dummy.S: Dummy file to force .S.o suffix rule.
- * libc/sys/arc/Makefile.am: Add dummy.S to EXTRA_lib_a_SOURCES
- and set lib_a_CCASFLAGS so crto.o will use .S.o default suffix rule.
- * libc/sys/arc/Makefile.in: Regenerated.
-
-2007-04-17 Brian Dessent <brian@dessent.net>
-
- * libc/stdio/sscanf.c: Update documentation comments.
- * libc/stdio/vfscanf.c (__SVFSCANF_R): Handle j, t, and z modifiers.
-
-2007-04-12 Eric Blake <ebb9@byu.net>
-
- * libc/stdio/vfprintf.c (_VFPRINTF_F, cvt): Don't confuse %F with %e.
- (chclass): Recognize 'F', 'X', 'n', and not 'W'.
- (get_arg): Handle %1$F, %1$n.
-
-2007-04-10 Eric Blake <ebb9@byu.net>
-
- * libc/include/stdio.h (_ELIDABLE_INLINE): Work even when using
- CFLAGS=-O0.
-
-2007-04-09 Eric Blake <ebb9@byu.net>
-
- * libc/include/stdio.h: Add gcc format attributes to printf and
- scanf families.
-
-2007-04-09 Joel Schopp <jschopp@austin.ibm.com>
-
- * libc/machine/spu/strxfrm.c: Fix strxfrm so we still copy data
- even if the passed in length n is shorter than the source string.
- This matches both the non-spu specific and the glibc strxfrm
- behaviour.
-
-2007-04-04 Mark Mitchell <mark@codesourcery.com>
-
- * libc/stdlib/__call_atexit.c (__call_exitprocs): Handle atexit
- functions registering additional atexit functions.
-
- * testsuite/lib/flags.exp (newlib_include_flags): Drop
- -I${newlib_dir}.
-
-2007-04-04 Patrick Mansfield <patmans@us.ibm.com>
-
- * libc/machine/spu/sys/syscall.h: New file for __send_to_ppe
- prototype.
- * libc/machine/spu/c99ppe.h: Remove static version of send_to_ppe.
- * libc/machine/spu/clearerr.c: Call __send_to_ppe vs send_to_ppe.
- * libc/machine/spu/fclose.c: Ditto.
- * libc/machine/spu/feof.c: Ditto.
- * libc/machine/spu/ferror.c: Ditto.
- * libc/machine/spu/fflush.c: Ditto.
- * libc/machine/spu/fgetc.c: Ditto.
- * libc/machine/spu/fgetpos.c: Ditto.
- * libc/machine/spu/fgets.c: Ditto.
- * libc/machine/spu/fileno.c: Ditto.
- * libc/machine/spu/fopen.c: Ditto.
- * libc/machine/spu/fprintf.c: Ditto.
- * libc/machine/spu/fputc.c: Ditto.
- * libc/machine/spu/fputs.c: Ditto.
- * libc/machine/spu/fread.c: Ditto.
- * libc/machine/spu/freopen.c: Ditto.
- * libc/machine/spu/fscanf.c: Ditto.
- * libc/machine/spu/fseek.c: Ditto.
- * libc/machine/spu/fsetpos.c: Ditto.
- * libc/machine/spu/ftell.c: Ditto.
- * libc/machine/spu/fwrite.c: Ditto.
- * libc/machine/spu/getc.c: Ditto.
- * libc/machine/spu/getchar.c: Ditto.
- * libc/machine/spu/gets.c: Ditto.
- * libc/machine/spu/perror.c: Ditto.
- * libc/machine/spu/printf.c: Ditto.
- * libc/machine/spu/putc.c: Ditto.
- * libc/machine/spu/putchar.c: Ditto.
- * libc/machine/spu/puts.c: Ditto.
- * libc/machine/spu/remove.c: Ditto.
- * libc/machine/spu/rename.c: Ditto.
- * libc/machine/spu/rewind.c: Ditto.
- * libc/machine/spu/scanf.c: Ditto.
- * libc/machine/spu/setbuf.c: Ditto.
- * libc/machine/spu/setvbuf.c: Ditto.
- * libc/machine/spu/snprintf.c: Ditto.
- * libc/machine/spu/sprintf.c: Ditto.
- * libc/machine/spu/sscanf.c: Ditto.
- * libc/machine/spu/tmpfile.c: Ditto.
- * libc/machine/spu/tmpnam.c: Ditto.
- * libc/machine/spu/ungetc.c: Ditto.
- * libc/machine/spu/vfprintf.c: Ditto.
- * libc/machine/spu/vfscanf.c: Ditto.
- * libc/machine/spu/vprintf.c: Ditto.
- * libc/machine/spu/vscanf.c: Ditto.
- * libc/machine/spu/vsnprintf.c: Ditto.
- * libc/machine/spu/vsprintf.c: Ditto.
- * libc/machine/spu/vsscanf.c: Ditto.
-
-2007-04-04 Jeff Johnston <jjohnstn@redhat.com>
-
- * libc/argz/argz_insert.c: Add stddef.h to get ptrdiff_t type.
-
-2007-04-04 Eric Blake <ebb9@byu.net>
-
- * libc/stdio/asiprintf.c (_asiprintf_r): Fix reentrancy.
- (asiprintf): Avoid overhead.
- * libc/stdio/asprintf.c (_asprintf_r): Fix reentrancy.
- (asprintf): Avoid overhead.
- * libc/stdio/diprintf.c (_diprintf_r, diprintf): New file.
- * libc/stdio/dprintf.c (_dprintf_r, dprintf): Use _DEFUN.
- * libc/stdio/fiprintf.c (_fiprintf_r): Add reentrant version.
- (fiprintf): Avoid overhead.
- * libc/stdio/fprintf.c (_fprintf_r): Add reentrant version.
- (fprintf): Avoid overhead.
- * libc/stdio/iprintf.c (_iprintf_r): Use _DEFUN.
- (iprintf): Avoid overhead.
- * libc/stdio/printf.c (_printf_r): Use _DEFUN.
- (printf): Avoid overhead.
- * libc/stdio/vasiprintf.c (vasiprintf): Reduce binary size.
- * libc/stdio/vasprintf.c (vasprintf): Reduce binary size.
- * libc/stdio/vdiprintf.c (_vdiprintf_r, vdiprintf): New file.
- * libc/stdio/vdprintf.c (vdprintf): Avoid overhead.
- * libc/stdio/vsiprintf.c (vsiprintf): Reduce binary size.
- * libc/stdio/vsniprintf.c (vsniprintf): Reduce binary size.
- * libc/stdio/vsnprintf.c (vsnprintf): Reduce binary size.
- * libc/stdio/vsprintf.c (vsprintf): Reduce binary size.
- * libc/stdio/Makefile.am (GENERAL_SOURCES): Add diprintf.c,
- vdiprintf.c.
- * libc/include/stdio.h (diprintf, _diprintf_r, vdiprintf)
- (_vdiprintf_r, _fiprintf_r, _vfiprintf_r): Add prototypes.
-
-2007-03-30 Dave Korn <dave.korn@artimi.com>
-
- * libc/include/stdio.h (_ELIDABLE_INLINE): New macro to conceal
- conflicting inline semantics between C99 and GNU89.
- (__sgetc_r): Replace static inline with _ELIDABLE_INLINE to be
- compatible with -fkeep-inline-functions usage.
- (__sputc_r): Likewise for consistency even though disabled.
-
-2007-03-29 Nick Clifton <nickc@redhat.com>
-
- Reflect changes made to generic vfprintf.c:
- * libc/machine/powerpc/vfprintf.c (__sprint): Rename to __sprint_r
- and add a "struct reent *" argument.
- (__sbprintf): Rename to __sbprintf_r, add a "struct reent *"
- argument and call _VFPRINTF_R instead of VFPRINTF.
- (_VFPRINTF_R): Add data pointer to call to cantwrite().
- Fix uses of __sprint() and __sbprintf.
-
-2007-03-20 Nick Clifton <nickc@redhat.com>
-
- Reflect changes made to generic vfprintf.c:
- * libc/machine/powerpc/vfprintf.c (__sprint): Rename to __sprint_r
- and add a "struct reent *" argument.
- (__sbprintf): Rename to __sbprintf_r, add a "struct reent *"
- argument and call _VFPRINTF_R instead of VFPRINTF.
- (_VFPRINTF_R): Add data pointer to call to cantwrite().
- Fix uses of __sprint() and __sbprintf.
-
-2007-03-16 Charles Wilson <cygwin@...>
-
- * libc/argz/argz_insert.c: "before" pointer is
- invalid after *argz realloc. Compute offset
- between "before" and *argz, and use it after
- reallocation instead.
-
-2007-03-16 Eric Blake <ebb9@byu.net>
-
- * libc/stdio64/fseek064.c (_fseeko64_r): Fix reentrancy.
- * libc/stdio64/freopen64.c (_freopen64_r): Ditto.
-
-2007-03-15 Jeff Johnston <jjohnstn@redhat.com>
-
- * configure.in: Add new --enable-newlib-reent-small option.
- * configure: Regenerated.
- * acconfig.h: Add _WANT_REENT_SMALL.
- * newlib.hin: Regenerated minus PACKAGE macros to add
- _WANT_REENT_SMALL macro.
- * libc/include/sys/config.h[_WANT_REENT_SMALL]: Set _REENT_SMALL
- if not already set.
- * libc/stdio/fflush.c[_REENT_SMALL]: Return immediately if
- there is no buffer.
- * libc/stdio/local.h[_REENT_SMALL]: Fix CHECK_INIT macro to
- use reentrant pointer passed in when resetting the file
- pointer to one of the std streams.
-
-2007-03-15 Eric Blake <ebb9@byu.net>
-
- * libc/stdio/local.h (cantwrite, FREEUB, FREELB): Make reentrant.
- (__smakebuf): Rename...
- (__smakebuf_r): to this.
- * libc/stdio/fvwrite.h (__swsetup_r): Rename, from __swsetup.
- * libc/stdio/makebuf.c (__smakebuf): Detect failed asprint
- allocation, then rename...
- (__smakebuf_r): ...to this and fix reentrancy.
- * libc/stdio/wsetup.c (__swsetup): Detect failed asprintf
- allocation, then rename...
- (__swsetup_r): ...to this and fix reentrancy.
- * libc/stdio/fseek.c (_fseek_r): Fix reentrancy.
- * libc/stdio/refill.c (__srefill_r): Likewise.
- * libc/stdio/fclose.c (_fclose_r): Likewise.
- * libc/stdio/fread.c (_fread_r): Likewise.
- * libc/stdio/freopen.c (_freopen_r): Likewise.
- * libc/stdio/wbuf.c (__swbuf_r): Likewise.
- * libc/stdio64/fseeko64.c (_fseeko64_r): Likewise.
- * libc/stdio/fvwrite.c (__sfvwrite_r): Set errno properly on
- failed asprintf allocation, and fix reentrancy.
- * libc/stdio/snprintf.c (snprintf, _snprintf_r): Report overflow,
- as required by POSIX.
- * libc/stdio/sniprintf.c (sniprintf, _sniprintf_r): Likewise.
- * libc/stdio/vsnprintf.c (vsnprintf, _vsnprintf_r): Likewise.
- * libc/stdio/vsniprintf.c (vsniprintf, _vsniprintf_r): Likewise.
-
-2007-03-12 Eric Blake <ebb9@byu.net>
-
- * libc/stdio/fvwrite.c (__sfvwrite_r): Fix reentrancy.
- * libc/stdio/vasprintf.c (vasprintf, _vasprintf_r): Pass failed
- allocation to caller.
- * libc/stdio/asprintf.c (_asprintf_r, asprintf): Likewise.
- * libc/stdio/asiprintf.c (_asiprintf_r, asiprintf): Likewise.
- * libc/stdio/vasiprintf.c (vasiprintf, _vasiprintf_r): Likewise.
-
-2007-02-23 Jeff Johnston <jjohnstn@redhat.com>
-
- * libm/math/w_pow.c: Fix typo in documentation comment.
-
-2007-02-21 Patrick Mansfield <patmans@us.ibm.com>
-
- * libc/reent/timer.c: Removed (split into two new files).
- * libc/reent/timesr.c: New file for _times_r.
- * libc/reent/gettimeofdayr.c: New file out _gettimeofday_r.
- * reent/Makefile.in: Remove timer.c, add timesr.c and
- gettimeofdayr.c.
- * libc/reent/Makefile.am: Regenerate.
-
-2007-02-20 Patrick Mansfield <patmans@us.ibm.com>
-
- * configure.host: Build SPU with default_newlib_atexit_dynamic_alloc="no".
-
-2007-02-20 Kazunori Asayama <asayama@sm.sony.co.jp>
-
- * libc/machine/spu/Makefile.am: Add new objects.
- * libc/machine/spu/Makefile.in: Regenerated.
- * libc/machine/spu/fiprintf.c: New file. Add implementation of
- integer-only version.
- * libc/machine/spu/fiscanf.c: Ditto.
- * libc/machine/spu/iprintf.c: Ditto.
- * libc/machine/spu/iscanf.c: Ditto.
- * libc/machine/spu/siprintf.c: Ditto.
- * libc/machine/spu/siscanf.c: Ditto.
- * libc/machine/spu/sniprintf.c: Ditto.
- * libc/machine/spu/vfiprintf.c: Ditto.
- * libc/machine/spu/vfiscanf.c: Ditto.
- * libc/machine/spu/viprintf.c: Ditto.
- * libc/machine/spu/viscanf.c: Ditto.
- * libc/machine/spu/vsiprintf.c: Ditto.
- * libc/machine/spu/vsiscanf.c: Ditto.
- * libc/machine/spu/vsniprintf.c: Ditto.
- * libc/machine/spu/fprintf.c: Add support for integer-only
- version.
- * libc/machine/spu/fscanf.c: Ditto.
- * libc/machine/spu/printf.c: Ditto.
- * libc/machine/spu/scanf.c: Ditto.
- * libc/machine/spu/snprintf.c: Ditto.
- * libc/machine/spu/sprintf.c: Ditto.
- * libc/machine/spu/sscanf.c: Ditto.
- * libc/machine/spu/vfprintf.c: Ditto.
- * libc/machine/spu/vfscanf.c: Ditto.
- * libc/machine/spu/vprintf.c: Ditto.
- * libc/machine/spu/vscanf.c: Ditto.
- * libc/machine/spu/vsnprintf.c: Ditto.
- * libc/machine/spu/vsprintf.c: Ditto.
- * libc/machine/spu/vsscanf.c: Ditto.
-
-2007-02-20 Kazunori Asayama <asayama@sm.sony.co.jp>
-
- * libc/include/stdio.h: Add declaration for vsiprintf.
-
-2007-02-14 Patrick Mansfield <patmans@us.ibm.com>
-
- Add a floating point environment for SPU (cell):
-
- * configure.host: add libm_machine_dir=spu.
- * libm/machine/configure: Add spu.
- * libm/machine/configure.in: regenerated with spu added.
- * libc/machine/spu/include/fenv.h: New file.
- * libc/machine/spu/sys/fenv.h: Ditto.
- * libm/machine/spu/Makefile.am: Ditto.
- * libm/machine/spu/Makefile.in: Ditto.
- * libm/machine/spu/aclocal.m4: Ditto.
- * libm/machine/spu/configure: Ditto.
- * libm/machine/spu/configure.in: Ditto.
- * libm/machine/spu/fe_dfl_env.c: Ditto.
- * libm/machine/spu/feclearexcept.c: Ditto.
- * libm/machine/spu/fegetenv.c: Ditto.
- * libm/machine/spu/fegetexceptflag.c: Ditto.
- * libm/machine/spu/fegetround.c: Ditto.
- * libm/machine/spu/feholdexcept.c: Ditto.
- * libm/machine/spu/feraiseexcept.c: Ditto.
- * libm/machine/spu/fesetenv.c: Ditto.
- * libm/machine/spu/fesetexceptflag.c: Ditto.
- * libm/machine/spu/fesetround.c: Ditto.
- * libm/machine/spu/fetestexcept.c: Ditto.
- * libm/machine/spu/feupdateenv.c: Ditto.
- * libm/machine/spu/headers/feclearexcept.h: Ditto.
- * libm/machine/spu/headers/fefpscr.h: Ditto.
- * libm/machine/spu/headers/fegetenv.h: Ditto.
- * libm/machine/spu/headers/fegetexceptflag.h: Ditto.
- * libm/machine/spu/headers/fegetround.h: Ditto.
- * libm/machine/spu/headers/feholdexcept.h: Ditto.
- * libm/machine/spu/headers/feraiseexcept.h: Ditto.
- * libm/machine/spu/headers/fesetenv.h: Ditto.
- * libm/machine/spu/headers/fesetexceptflag.h: Ditto.
- * libm/machine/spu/headers/fesetround.h: Ditto.
- * libm/machine/spu/headers/fetestexcept.h: Ditto.
- * libm/machine/spu/headers/feupdateenv.h: Ditto.
-
-2007-02-14 Corinna Vinschen <corinna@vinschen.de>
-
- * libc/include/sys/features.h: Add _POSIX_MESSAGE_PASSING for
- Cygwin.
-
-2007-02-08 Corinna Vinschen <corinna@vinschen.de>
-
- * libc/include/sys/features.h: Add _POSIX_SHARED_MEMORY_OBJECTS for
- Cygwin. Fix value of _POSIX_SEMAPHORES. Fix formatting.
-
-2007-02-07 Corinna Vinschen <corinna@vinschen.de>
-
- * libc/include/sys/features.h: Add definition of all supported
- _POSIX_xxx values for Cygwin.
- * libc/include/sys/types.h (pthread_rwlock_t): Omit definition
- on Cygwin.
- (pthread_rwlockattr_t): Ditto.
- * libc/include/sys/unistd.h: Define all _SC_xxx values as
- required by SUSv3. Unify formatting.
-
-2007-02-02 Ralf Corsépius <ralf.corsepius@rtems.org>
-
- * libc/include/sys/errno.h: Add ECANCELED.
-
-2007-02-01 Joel Schopp <jschopp@austin.ibm.com>
- Kazunori Asayama <asayama@sm.sony.co.jp>
-
- * libc/machine/spu/Makefile.am: Add objects.
- * libc/machine/spu/Makefile.in: Regenerated.
- * libc/machine/spu/vsscanf.c: New file. Add a stdio function
- implementation.
- * libc/machine/spu/snprintf.c: Ditto.
- * libc/machine/spu/sprintf.c: Ditto.
- * libc/machine/spu/sscanf.c: Ditto.
- * libc/machine/spu/remove.c: Ditto.
- * libc/machine/spu/rename.c: Ditto.
- * libc/machine/spu/tmpnam.c: Ditto.
- * libc/machine/spu/vsnprintf.c: Add initialization routine of
- stdio stuffs.
- * libc/machine/spu/vsprintf.c: Ditto.
-
-2007-02-01 Joel Schopp <jschopp@austin.ibm.com>
- Kazunori Asayama <asayama@sm.sony.co.jp>
-
- * configure.host: Enable SPU specific stdio directory.
- * libc/machine/spu/Makefile.am: Add objects.
- * libc/machine/spu/Makefile.in: Regenerated.
- * libc/machine/spu/c99ppe.h: Add macros and function
- declarations to initialize SPU specific stdio stuffs.
- * libc/machine/spu/stdio.c: Add functions to manage Cell SPU
- specific FILE structures.
- * libc/machine/spu/perror.c: Add initialization routine of
- stdio stuffs.
- * libc/machine/spu/printf.c: Ditto.
- * libc/machine/spu/putchar.c: Ditto.
- * libc/machine/spu/puts.c: Ditto.
- * libc/machine/spu/vprintf.c: Ditto.
- * libc/machine/spu/clearerr.c: New file. Add a stdio function
- implementation.
- * libc/machine/spu/feof.c: Ditto.
- * libc/machine/spu/ferror.c: Ditto.
- * libc/machine/spu/fileno.c: Ditto.
- * libc/machine/spu/fopen.c: Ditto.
- * libc/machine/spu/fclose.c: Ditto.
- * libc/machine/spu/freopen.c: Ditto.
- * libc/machine/spu/fflush.c: Ditto.
- * libc/machine/spu/fseek.c: Ditto.
- * libc/machine/spu/ftell.c: Ditto.
- * libc/machine/spu/rewind.c: Ditto.
- * libc/machine/spu/fgetpos.c: Ditto.
- * libc/machine/spu/fsetpos.c: Ditto.
- * libc/machine/spu/fread.c: Ditto.
- * libc/machine/spu/fwrite.c: Ditto.
- * libc/machine/spu/getc.c: Ditto.
- * libc/machine/spu/getchar.c: Ditto.
- * libc/machine/spu/gets.c: Ditto.
- * libc/machine/spu/fgetc.c: Ditto.
- * libc/machine/spu/fgets.c: Ditto.
- * libc/machine/spu/ungetc.c: Ditto.
- * libc/machine/spu/putc.c: Ditto.
- * libc/machine/spu/fputc.c: Ditto.
- * libc/machine/spu/fputs.c: Ditto.
- * libc/machine/spu/vfprintf.c: Ditto.
- * libc/machine/spu/vfscanf.c: Ditto.
- * libc/machine/spu/fprintf.c: Ditto.
- * libc/machine/spu/fscanf.c: Ditto.
- * libc/machine/spu/scanf.c: Ditto.
- * libc/machine/spu/vscanf.c: Ditto.
- * libc/machine/spu/setbuf.c: Ditto.
- * libc/machine/spu/setvbuf.c: Ditto.
- * libc/machine/spu/tmpfile.c: Ditto.
-
-2007-02-01 Jeff Johnston <jjohnstn@redhat.com>
-
- * libc/include/sys/config.h[__SPU__]: Define __CUSTOM_FILE_IO__.
- * libc/include/stdio.h[!__CUSTOM_FILE_IO__]: Add flag check
- around stdio macros that manipulate fields in the normal file
- structure.
- * libc/include/sys/reent.h[__CUSTOM_FILE_IO__]: Include
- <sys/custom_file.h> to define custom FILE structure.
- * libc/include/sys/custom_file.h: New default header file
- that generates error if not overridden when __CUSTOM_FILE_IO__ set.
- * libc/machine/spu/sys/custom_file.h: New file.
-
-2007-01-31 Kazunori Asayama <asayama@sm.sony.co.jp>
-
- * configure.host: Define stdio directory as a variable.
- * libc/Makefile.am: Define stdio related names
- as macros.
- * libc/configure.in: Add detection routine of stdio directory.
- * libc/Makefile.in: Regenerated.
- * libc/configure: Ditto.
- * libc/argz/Makefile.in: Ditto.
- * libc/ctype/Makefile.in: Ditto.
- * libc/errno/Makefile.in: Ditto.
- * libc/iconv/Makefile.in: Ditto.
- * libc/iconv/ccs/Makefile.in: Ditto.
- * libc/iconv/ccs/binary/Makefile.in: Ditto.
- * libc/iconv/ces/Makefile.in: Ditto.
- * libc/iconv/lib/Makefile.in: Ditto.
- * libc/locale/Makefile.in: Ditto.
- * libc/misc/Makefile.in: Ditto.
- * libc/posix/Makefile.in: Ditto.
- * libc/reent/Makefile.in: Ditto.
- * libc/search/Makefile.in: Ditto.
- * libc/signal/Makefile.in: Ditto.
- * libc/stdio/Makefile.in: Ditto.
- * libc/stdio64/Makefile.in: Ditto.
- * libc/stdlib/Makefile.in: Ditto.
- * libc/string/Makefile.in: Ditto.
- * libc/syscalls/Makefile.in: Ditto.
- * libc/time/Makefile.in: Ditto.
- * libc/unix/Makefile.in: Ditto.
-
-2007-01-30 Ben Elliston <bje@au.ibm.com>
-
- * libc/machine/spu/vsnprintf.c (c99_vsnprintf_t): Const-qualify
- fmt member.
- * libc/machine/spu/printf.c (c99_printf_t): Likewise.
- (printf): Pass fmt to va_start to suppress a warning.
-
- * libc/search/hash.c (init_hash): Make `info' parameter const.
-
-2007-01-19 Kazunori Asayama <asayama@sm.sony.co.jp>
-
- * libc/machine/spu/c99ppe.h: Replace vector with __vector.
- * libc/machine/spu/vec_literal.h: Ditto.
- * libc/machine/spu/strncmp.c: Ditto.
-
-2007-01-15 Joseph Myers <joseph@codesourcery.com>
- Kazu Hirata <kazu@codesourcery.com>
-
- * libc/machine/powerpc/setjmp.S (setjmp, longjmp): Add support
- for E500V1 and E500V2.
-
-2007-01-11 Jeff Johnston <jjohnstn@redhat.com>
-
- * libm/configure.in: Always configure machine directory.
- * libm/Makefile.am: Make machine subdirectory part of SUBDIRS
- unconditionally.
- * libm/configure: Regenerated.
- * libm/Makefile.in: Ditto.
- * libm/*/Makefile.in: Ditto.
-
-2007-01-05 Brian Ford <Brian.Ford@FlightSafety.com>
-
- * configure.host (*-*-cygwin*): Define HAVE_BLKSIZE.
-
-2007-01-02 Ben Elliston <bje@au.ibm.com>
-
- * doc/makedoc.c: Include <stdlib.h>.
- (malloc, realloc): Remove extern declarations.
-
-2006-12-18 Jeff Johnston <jjohnstn@redhat.com>
-
- * NEWS: Update with 1.15.0 info.
- * README: Ditto.
- * acinclude.m4: Change version number to 1.15.0.
- * aclocal.m4: Regenerated.
- * configure: Ditto.
- * doc/aclocal.m4: Ditto.
- * doc/configure: Ditto.
- * libc/*/aclocal.m4: Ditto.
- * libc/*/configure: Ditto.
- * libc/libc.texinfo: Ditto.
- * libm/*/aclocal.m4: Ditto.
- * libm/*/configure: Ditto.
- * libm/libm.texinfo: Ditto.
- * libc/sys/linux/shared.ld: Add VERS_1.15.
-
-2006-12-18 Kazu Hirata <kazu@codesourcery.com>
-
- Merge from newlib-csl-20060320-branch:
- 2006-12-01 Nathan Sidwell <nathan@codesourcery.com>
- Kazu Hirata <kazu@codesourcery.com>
-
- * configure.host: Recognize fido.
-
-2006-12-18 Joel Schopp <jschopp@austin.ibm.com>
-
- * libc/machine/spu/c99ppe.h: New file
- * libc/machine/spu/perror.c: New file to override libc/stdio version.
- * libc/machine/spu/printf.c: New file
- * libc/machine/spu/putchar.c: New file
- * libc/machine/spu/puts.c: New file
- * libc/machine/spu/vprintf.c: New file
- * libc/machine/spu/vsnprintf.c: New file
- * libc/machine/spu/vsprintf.c: New file
- * libc/machine/spu/Makefile.am: Add new targets.
- * libc/machine/spu/Makefile.in: Regenerated.
-
-2006-12-18 Jeff Johnston <jjohnstn@redhat.com>
-
- * aclocal.m4 */aclocal.m4: Regenerated using aclocal 1.9.6.
- * Makefile.in */Makefile.in: Regenerated using automake 1.9.6.
-
-2006-12-18 Jeff Johnston <jjohnstn@redhat.com>
-
- * libc/stdlib/mallocr.c (malloc_extend_top): Add patch from
- 2.6.5 version of Doug Lea's malloc which is the basis of
- this code.
-
-2006-12-18 Kazunori Asayama <asayama@sm.sony.co.jp>
-
- * libc/include/machine/setjmp.h[__SPU__]: Replace vector with __vector.
-
-2006-12-14 Jeff Johnston <jjohnstn@redhat.com>
- Eric Blake <ebb9@byu.net>
-
- * libc/stdio/fflush.c (fflush): On seekable streams, always flush
- read but unused data.
- * libc/stdio/fclose.c (_fclose_r): Always flush streams, since
- even read streams may have side effects that must happen.
-
-2006-12-13 Joel Schopp <jschopp@austin.ibm.com>
-
- * libc/machine/spu/setjmp.S: Fix to handle registers past 115
- correctly.
-
-2006-12-13 Joel Schopp <jschopp@austin.ibm.com>
-
- * libc/include/alloca.h: Add undef alloca to work with xlc.
-
-2006-12-12 Joel Schopp <jschopp@austin.ibm.com>
-
- * libc/include/machine/setjmp.h[__SPU__]: Redefine _JBTYPE for
- cell spu.
-
-2006-12-04 Kazunori Asayama <asayama@sm.sony.co.jp>
-
- * libc/machine/spu/strncpy.c: Add padding.
-
-2006-12-04 Kazunori Asayama <asayama@sm.sony.co.jp>
-
- * testsuite/newlib.string/tstring.c:
-
-2006-12-01 Kazunori Asayama <asayama@sm.sony.co.jp>
-
- * libc/machine/spu/strchr.c: Fix mask for misaligned string.
- * libc/machine/spu/strrchr.c: Ditto.
-
-2006-11-30 Lev Bishop <lev.bishop@gmail.com>
-
- * libc/include/math.h: Allow C99 functions/macros to be
- defined for C++ even when __STRICT_ANSI__.
-
-2006-11-29 Jeff Johnston <jjohnstn@redhat.com>
-
- * libc/stdio/makebuf.c (__smakebuf): If dealing with
- an asprintf-family buffer, make the default initial size 64.
-
-2006-11-29 Eric Blake <ebb9@byu.net>
-
- * libc/stdio/fvwrite.c (__sfvwrite_r): Avoid off-by-one error in
- asprintf, as well as quadratic realloc behavior.
-
-2006-11-29 Kazunori Asayama <asayama@sm.sony.co.jpi
-
- * libc/machine/spu/memset.c: Fix type of explicit cast.
- * libc/machine/spu/strncmp.c: Add explicit cast.
- * libc/machine/spu/strrchr.c: Ditto.
- * libc/machine/spu/strspn.c: Ditto.
-
-2006-11-22 Luca Barbato <lu_zero@gentoo.org>
-
- * libc/machine/spu/memcpy.c: Use spu_splats, explicit cast.
- * libc/machine/spu/memmove.c: Use spu_splats, explicit cast.
- * libc/machine/spu/memset.c: Use spu_splats, remove apple-cast.
- * libc/machine/spu/strchr.c: Use spu_splats, remove apple-cast.
- * libc/machine/spu/strncat.c: Explicit cast.
- * libc/machine/spu/strncmp.c: Use spu_splats.
- * libc/machine/spu/strncpy.c: Explicit cast.
- * libc/machine/spu/strrchr.c: Use spu_splats.
- * libc/machine/spu/strspn.c: Use spu_splats.
-
-2006-11-15 Till Straumann <strauman@slac.stanford.edu>
-
- * libc/time/tzset_r.c (_tzset_r): Initialize local variable.
-
-2006-11-14 Eric Blake <ebb9@byu.net>
-
- * libc/stdio/vfprintf.c (_vfprintf_r): Support ' flag.
- (chclass): ' is a flag. j, t, and z are modifiers.
-
-2006-11-08 Jie Zhang <jie.zhang@analog.com>
-
- * configure.host: Add support for bfin.
- * libc/include/machine/ieeefp.h: Define __IEEE_LITTLE_ENDIAN for bfin.
- * libc/include/machine/setjmp.h: Define _JBLEN for bfin.
- * libc/machine/bfin/aclocal.m4: Generate.
- * libc/machine/bfin/configure.in: New.
- * libc/machine/bfin/configure: Generate.
- * libc/machine/bfin/Makefile.am: New.
- * libc/machine/bfin/Makefile.in: Generate.
- * libc/machine/bfin/setjmp.S: New.
- * libc/machine/bfin/longjmp.S: New.
- * libc/machine/configure.in: Add bfin support.
- * libc/machine/configure: Generate.
-
-2006-11-07 Corinna Vinschen <corinna@vinschen.de>
-
- * libc/include/sys/unistd.h (_SC_STREAM_MAX): Define on Cygwin.
- (_PC_FILESIZEBITS): Add definition.
- (_PC_2_SYMLINKS): Ditto.
- (_PC_SYMLINK_MAX): Ditto.
-
-2006-10-27 Joel Schopp <jschopp@austin.ibm.com>
-
- * libc/machine/spu/memcpy.c: Override generic function with vectorized
- version optimized for the cell spu.
- * libc/machine/spu/memmove.c: Ditto.
- * libc/machine/spu/memset.c: Ditto.
- * libc/machine/spu/strcat.c: Ditto.
- * libc/machine/spu/strchr.c: Ditto.
- * libc/machine/spu/strcmp.c: Ditto.
- * libc/machine/spu/strcpy.c: Ditto.
- * libc/machine/spu/strcspn.c: Ditto.
- * libc/machine/spu/strlen.c: Ditto.
- * libc/machine/spu/strncat.c: Ditto.
- * libc/machine/spu/strncmp.c: Ditto.
- * libc/machine/spu/strncpy.c: Ditto.
- * libc/machine/spu/strpbrk.c: Ditto.
- * libc/machine/spu/strrchr.c: Ditto.
- * libc/machine/spu/strspn.c: Ditto.
- * libc/machine/spu/strxfrm.c: Ditto.
- * libc/machine/spu/vec_literal.h: Add abstraction of vector literals,
- removing altivec style initializers.
- * libc/machine/spu/Makefile.am: Add new files to list so they build
- * libc/machine/spu/Makefile.in: Regenerate from new Makefile.am
-
-2006-10-27 Jeff Johnston <jjohnstn@redhat.com>
-
- * README: Add a brief section on how to regenerate
- configuration files in newlib.
-
-2006-10-25 Vladimir Prus <vladimir@codesourcery.com>
-
- * libc/include/math.h: (exception): Add a comment
- telling fixincludes that we handle C vs. C++ issue.
-
-2006-10-11 Yang Tse <yangsita@gmail.com>
-
- * libc/include/machine/setjmp.h: Use __extension__ keyword for gcc's
- braced-groups.
-
-2006-10-11 Corinna Vinschen <corinna@vinschen.de>
-
- * libc/reent/reeent.c (_reclaim_reent): Free _REENT_MP_RESULT.
-
-2006-09-26 Jeff Johnston <jjohnstn@redhat.com>
-
- * libc/include/stdio.h[_REENT_SMALL]: Do not allow macros
- for clearerr, feof, or fileno.
- * libc/include/sys/reent.h[_REENT_SMALL](struct _reent): Change
- the dummy std stream scheme to use pointers to const external
- fake files, one for each standard stream.
- * libc/stdio/local.h (CHECK_INIT): Change to take a file pointer
- argument. For _REENT_SMALL, reset the file pointer if it
- matches one of the fake std stream pointers.
- * libc/stdio/clearerr.c: Fix CHECK_INIT macro to add file pointer
- argument.
- * libc/stdio/fclose.c: Ditto.
- * libc/stdio/feof.c: Ditto.
- * libc/stdio/ferror.c: Ditto.
- * libc/stdio/fflush.c: Ditto.
- * libc/stdio/fgetc.c: Ditto.
- * libc/stdio/fgets.c: Ditto.
- * libc/stdio/fileno.c: Ditto.
- * libc/stdio/findfp.c: Ditto.
- * libc/stdio/fputc.c: Ditto.
- * libc/stdio/fputs.c: Ditto.
- * libc/stdio/fread.c: Ditto.
- * libc/stdio/freopen.c: Ditto.
- * libc/stdio/fseek.c: Ditto.
- * libc/stdio/ftell.c: Ditto.
- * libc/stdio/fwrite.c: Ditto.
- * libc/stdio/getc.c: Ditto.
- * libc/stdio/getdelim.c: Ditto.
- * libc/stdio/putc.c: Ditto.
- * libc/stdio/refill.c: Ditto.
- * libc/stdio/setvbuf.c: Ditto.
- * libc/stdio/ungetc.c: Ditto.
- * libc/stdio/vfprintf.c: Ditto.
- * libc/stdio/vfscanf.c: Ditto.
- * libc/stdio/wbuf.c: Ditto.: Ditto.
- * libc/stdio/wsetup.c: Ditto.
- * libc/stdio64/freopen64.c: Ditto.
- * libc/stdio64/fseeko64.c: Ditto.
- * libc/stdio64/ftello64.c: Ditto.
- * libc/machine/powerpc/vfprintf.c: Ditto.
- * libc/machine/powerpc/vfscanf.c: Ditto.
-
-2006-09-22 Paul Brook <paul@codesourcery.com>
-
- * libc/include/sys/reent.h: Define and use __reent_assert.
-
-2006-09-13 Joel Sherrill <joel@oarcorp.com>
-
- * libc/include/pthread.h: Add pthread barriers,
- rwlocks, and spinlocks. Change const to
- _CONST and prefix parameter names with
- an underscore.
- * libc/include/sys/types.h: Add id and attribute
- types for barriers, wrlocks, and spinlocks.
- * libc/include/sys/features.h: Enable barriers,
- wrlocks, and spinlocks for RTEMS.
-
-2006-09-13 Patrick Mansfield <patmans@us.ibm.com>
-
- * libc/include/math.h: Remove _CONST from _LIB_VERSION, as it is
- supposed to be writable.
- * libm/common/s_lib_ver.c: Ditto.
-
-2006-09-12 Paul Brook <paul@codesourcery.com>
-
- * libc/stdlib/rand.c (srand): Add _REENT_CHECK_RAND48.
-
-2006-09-07 Masaki Muranaka <monaka@monami-software.com>
-
-
- * libc/machine/xstormy16/Makefile.am:
- Add $(lpfx) prefix to LIBADD objects.
- lib_a_DEPENDENCIES uses the value of lib_a_LIBADD.
- * libc/machine/xstormy16/Makefile.in: Regenerated.
-
-2006-09-06 Eric Blake <ebb9@byu.net>
-
- * libc/stdio/vfprintf.c (_vfprintf_r, get_arg): Add 'hh', 'j',
- 't', and 'z' modifiers.
-
-2006-09-01 Kazu Hirata <kazu@codesourcery.com>
-
- Merge from newlib-csl-20060320-branch:
- 2006-05-22 Sandra Loosemore <sandra@codesourcery.com>
-
- * configure.host: Tell it we have _rename and _system when
- building m68k-unknown-elf.
-
-2006-08-29 Paul Brook <paul@codesourcery.com>
-
- * libc/include/sys/config.h: Define _REENT_SMALL for Thumb-2.
-
-2006-08-27 Joel Sherrill <joel.sherrill@OARcorp.com>
-
- * libc/sys/rtems/machine/sys/param.h: Conditionalize definition of
- BLKDEV_IOSIZE and MAXPHYS so it will fit into small memory targets.
- This is needed to build all AVR and H8300 RTEMS multilib variants.
-
-2006-08-23 Kazunori Asayama <asayama@sm.sony.co.jp>
-
- * libc/machine/configure.in: Add configuration for SPU.
- * libc/machine/configure: Regenerated.
- * libc/machine/spu/memcpy.c: Include string.h.
-
-2006-08-22 Eric Blake <ebb9@byu.net>
-
- * libc/posix/popen.c (popen): Don't close output end of pipe in
- child if stdout was closed on entry.
- [HAVE_FCNTL]: In parent, mark file as close-on-exec, per POSIX.
-
-2006-08-19 Ramana Radhakrishnan <ramana.r@gmail.com>
-
- * sys/types.h: Correct syntax error caused by missing '\' on #ifdef
- line.
-
-2006-08-17 Brian Ford <Brian.Ford@FlightSafety.com>
-
- * libc/time/gmtime.c: Correct man page; clock is not a
- local time and no conversion occurs.
-
-2006-08-16 Joel Schopp <jschopp@austin.ibm.com>
-
- * configure.host (newlib_cflags) [spu]: Add special compiler
- options to reduce size.
-
-2006-08-16 Joel Schopp <jschopp@austin.ibm.com>
-
- * configure.host: Add spu support.
- * libc/include/stdint.h: Ditto.
- * libc/include/machine/ieeefp.h: Ditto.
- * libc/include/machine/setjmp.h: Ditto.
- * libc/include/sys/config.h: Ditto.
- * libc/include/sys/types.h: Ditto.
- * libc/machine/spu/Makefile.am: New file.
- * libc/machine/spu/Makefile.in: Ditto.
- * libc/machine/spu/aclocal.m4: Ditto.
- * libc/machine/spu/configure: Ditto.
- * libc/machine/spu/configure.in: Ditto.
- * libc/machine/spu/memcpy.c: Ditto.
- * libc/machine/spu/setjmp.S: Ditto.
-
-2006-08-03 J"orn Rennecke <joern.rennecke@st.com>
-
- * dtoa.c (dtoa_r): Handle the denormalized _DOUBLE_IS_32BITS case
- properly.
-
-2006-08-01 Jeff Johnston <jjohnstn@redhat.com>
-
- * libc/Makefile.am: Add libc_TEXINFOS dependency on
- generated .texi files.
- * libm/Makefile.am: Add libm_TEXINFOS dependency on
- generated .texi files.
- * libc/Makefile.in: Regenerated.
- * libm/Makefile.in: Ditto.
-
-2006-08-01 Thiemo Seufer <ths@mips.com>
- Nigel Stephens <nigel@mips.com>
-
- * libc/include/sys/config.h (__ATTRIBUTE_IMPURE_PTR__): For MIPS
- define this to force _impure_ptr to live in the .sdata section.
-
-2006-07-31 Jeff Johnston <jjohnstn@redhat.com>
-
- * acinclude.m4: Check for readelf tool.
- * configure.in: Use ${READELF} instead of hard-coding.
- * Regenerate all aclocal.m4, Makefile.in, and configure files.
-
-2006-07-31 Jeff Johnston <jjohnstn@redhat.com>
-
- * libc/sys/linux/mmap.c: Remove include of sys/mman.h
- to avoid conflict with newer glibc's revision of mremap.
-
-2006-07-05 Jeff Johnston <jjohnstn@redhat.com>
-
- * libc/stdlib/mprec.h [_DOUBLE_IS_32BITS]: Turn off C99 hex
- floating-point format support. Also redefine
- dword0 and dword1 macros.
- * libc/stdlib/strtod.c: Add checks for _DOUBLE_IS_32BITS
- to prevent setting dword1 which is an rvalue only.
-
-2006-06-22 Jeff Johnston <jjohnstn@redhat.com>
-
- * libc/stdlib/Makefile.am: Add new gdtoa routines.
- * libc/stdlib/Makefile.in: Regenerated.
- * libc/stdlib/gd_qnan.h: New file.
- * libc/stdlib/gdtoa-gethex.c: Ditto.
- * libc/stdlib/gdtoa-hexnan.c: Ditto.
- * libc/stdlib/gdtoa.h: Ditto.
- * libc/stdlib/mprec.c: Add new helper routines needed by
- the new gdtoa code.
- * libc/stdlib/mprec.h: Integrate some defines and prototypes
- used by gdtoa routines here.
- * libc/stdlib/strtod.c: Rebased on David M. Gay's gdtoa-strtod.c
- which adds C99 support such as nan, inf, and hexadecimal input
- format.
-
-2006-06-15 Corinna Vinschen <corinna@vinschen.de>
-
- * libc/include/stdio.h (__sgetc_r): Fix typo.
- * libc/stdio/fread.c (_fread_r): Convert crlf calls to crlf_r.
- * libc/stdio/rget.c (__srbuf): Reinstantiate.
- * libc/stdio/wbuf.c (__swbuf): Ditto.
-
-2006-06-14 Jeff Johnston <jjohnstn@redhat.com>
-
- * libc/include/stdio.h: Add new reentrant I/O prototypes for
- read/write functions. Change getc/putc macros to have reentrant underlying
- macros/functions. This includes __sgetc_raw_r, __sgetc_r, and __sputc_r.
- * libc/stdio/fgetc.c: Fix and/or add reentrant version to call
- new reentrant I/O functions/macros for reading/writing.
- * libc/stdio/fgets.c: Ditto.
- * libc/stdio/fputc.c: Ditto.
- * libc/stdio/fputs.c: Ditto.
- * libc/stdio/fread.c: Ditto.
- * libc/stdio/fseek.c: Ditto.
- * libc/stdio64/fseeko64.c: Ditto.
- * libc/stdio/fwrite.c: Ditto.
- * libc/stdio/getc.c: Ditto.
- * libc/stdio/getc_u.c: Ditto.
- * libc/stdio/getchar.c: Ditto.
- * libc/stdio/getchar_u.c: Ditto.
- * libc/stdio/putc.c: Ditto.
- * libc/stdio/putc_u.c: Ditto.
- * libc/stdio/putchar.c: Ditto.
- * libc/stdio/puts.c: Ditto.
- * libc/stdio/vfprintf.c: Ditto.
- * libc/stdio/vfscanf.c: Ditto.
- * libc/stdio/fvwrite.c: Change __sfvwrite into reentrant __sfvwrite_r.
- Change all previous callers of __sfvwrite. Set errno to EBADF and
- set error flag on if attempt is made to write to file that does not
- allow writing.
- * libc/stdio/fvwrite.h: Fix new reentrant prototypes.
- * libc/stdio/local.h: Ditto.
- * libc/stdio/refill.c: Turn __srefill into reentrant __srefill_r.
- Set errno to EBADF and the error flag on if attempt is made to
- read unreadable file. Change all previous callers of __srefill.
- * libc/stdio/rget.c
- * libc/stdio/wbuf.c: Turn __swbuf into reentrant __swbuf_r. Change
- all previous callers of __swbuf.
- * libc/sys/linux/machine/i386/huge_val.h: Ifdef out file contents since
- huge value macros are already defined correctly for i386 by <math.h>.
-
-2006-06-13 Sandra Loosemore <sandra@codesourcery.com>
-
- * /libc/sys/arm/syscalls.c (_unlink, isatty, _system, _rename):
- Make them do something useful in the ARM_RDI_MONITOR case.
-
-2006-06-07 Fred Fish <fnf@specifix.com>
-
- * libc/search/hash_bigkey.c (MIN,MAX): Remove
- defines that are already supplied by <sys/param.h>.
-
-2006-06-07 Fred Fish <fnf@specifix.com>
-
- * configure.host: Remove references to HAVE_GETTIMEOFDAY.
-
-2006-06-05 Shaun Jackman <sjackman@gmail.com>
-
- * libc/posix/Makefile.am (GENERAL_SOURCES): Add sleep.c and
- usleep.c.
- * libc/posix/Makefile.in: Regenerate.
- * libc/posix/sleep.c: New file.
- * libc/posix/usleep.c: Ditto.
-
-2006-06-05 Shaun Jackman <sjackman@gmail.com>
-
- * configure.host (newlib_cflags) [arm, thumb, xscale]: Remove
- -DABORT_PROVIDED flag.
- * newlib/libc/sys/arm/syscalls.c (kill, exit): Sync with libgloss.
- * newlib/libc/sys/arm/libcfunc.c (abort): Ditto.
-
-2006-06-05 Jeff Johnston <jjohnstn@redhat.com>
-
- * Makefile.am (AM_MAKEFLAGS): Pass CCASFLAGS.
- * Makefile.in: Regenerated.
- * libc/machine/sh/Makefile.am (AM_CCASFLAGS): Remove
- extraneous CFLAGS reference now that CCASFLAGS are being extended
- properly via multilib.
- * libc/machine/sh/Makefile.in: Regenerated.
-
-2006-06-02 Shaun Jackman <sjackman@gmail.com>
-
- * libc/unix/sigset.c: Undefine sigfillset, sigdelset, and
- sigismember.
-
-2006-05-23 Jeff Johnston <jjohnstn@redhat.com>
-
- * libc/misc/dprintf.c: Removed.
- * libc/misc/__dprintf.c: Renamed from dprintf.c.
- * libc/misc/Makefile.am: Changed appropriately for rename.
- * libc/misc/Makefile.in: Regenerated.
-
-2006-05-23 Jeff Johnston <jjohnstn@redhat.com>
-
- * libc/include/stdio.h: Protect dprintf prototype
- with #ifndef dprintf so as to not interfere with
- historical code defining their own dprintf macro.
-
-2006-05-18 Jeff Johnston <jjohnstn@redhat.com>
-
- * libc/include/stdio.h: Add prototypes for fiscanf,
- iscanf, and siscanf.
-
-2006-05-11 J"orn Rennecke <joern.rennecke@st.com>
-
- * acinclude.m4 (_NEWLIB_VERSION): Rename to:
- (DEF_NEWLIB_VERSION).
- * configure.in (_NEWLIB_VERSION): Use NEWLIB_VERSION.
- * configure: Regenerate.
-
-2006-05-09 Jeff Johnston <jjohnstn@redhat.com>
-
- * libc/ctype/Makefile.am: Add $(ELIX_SOURCES) to
- lib_a_SOURCES.
- * libc/ctype/Makefile.in: Regenerated.
-
-2006-05-09 Kazu Hirata <kazu@codesourcery.com>
-
- * libc/machine/arm/Makefile.am: Fix a typo.
- * libc/machine/arm/Makefile.in: Regenerated.
-
-2006-05-08 J"orn Rennecke <joern.rennecke@st.com>
-
- * libc/machine/sh/Makefile.am (AM_CCASFLAGS): Add $(CFLAGS).
- * libc/machine/sh/Makefile.in: Regenerate.
-
-2006-05-03 J"orn Rennecke <joern.rennecke@st.com>
-
- * libc/sys/sh/Makefile.am (AM_CCASFLAGS): Add $(CFLAGS).
- * libc/sys/sh/Makefile.in (AM_CCASFLAGS): Likewise.
-
-2006-05-02 Jeff Johnston <jjohnstn@redhat.com>
-
- * libc/sys/sysnec810/Makefile.am: Specify .S files instead of
- .s.
- * libc/sys/sysnec810/Makefile.in: Regenerated.
- * libc/sys/sysnec810/crt0.S: Renamed from .s file.
- * libc/sys/sysnec810/io.S: Ditto.
- * libc/sys/sysnec810/crt0.s: Renamed to .S file.
- * libc/sys/sysnec810/io.s: Ditto.
-
-2006-05-01 Jeff Johnston <jjohnstn@redhat.com>
-
- * libc/argz/Makefile.am: Prefix any objects specified with $(lpfx). If source file can
- be specified instead of object, do so.
- * libc/ctype/Makefile.am: Ditto.
- * libc/iconv/ccs/Makefile.am: Ditto.
- * libc/iconv/ces/Makefile.am: Ditto.
- * libc/iconv/lib/Makefile.am: Ditto.
- * libc/locale/Makefile.am: Ditto.
- * libc/posix/Makefile.am: Ditto.
- * libc/reent/Makefile.am: Ditto.
- * libc/search/Makefile.am: Ditto.
- * libc/stdio/Makefile.am: Ditto.
- * libc/stdio64/Makefile.am: Ditto.
- * libc/stdlib/Makefile.am: Ditto.
- * libc/string/Makefile.am: Ditto.
- * libc/syscalls/Makefile.am: Ditto.
- * libc/unix/Makefile.am: Ditto.
- * libc/machine/a29k/Makefile.am: Specify lib_a_CCASFLAGS so .S files will get
- prefix added automatically. Any specified rules must use $(lpfx) for
- object file names.
- * libc/machine/arm/Makefile.am: Ditto.
- * libc/machine/cris/Makefile.am: Ditto.
- * libc/machine/crx/Makefile.am: Ditto.
- * libc/machine/d10v/Makefile.am: Ditto.
- * libc/machine/d30v/Makefile.am: Ditto.
- * libc/machine/fr30/Makefile.am: Ditto.
- * libc/machine/frv/Makefile.am: Ditto.
- * libc/machine/h8300/Makefile.am: Ditto.
- * libc/machine/h8500/Makefile.am: Ditto.
- * libc/machine/hppa/Makefile.am: Ditto.
- * libc/machine/i386/Makefile.am: Ditto.
- * libc/machine/i960/Makefile.am: Ditto.
- * libc/machine/iq2000/Makefile.am: Ditto.
- * libc/machine/m32c/Makefile.am: Ditto.
- * libc/machine/m32r/Makefile.am: Ditto.
- * libc/machine/m68hc11/Makefile.am: Ditto.
- * libc/machine/m68k/Makefile.am: Ditto.
- * libc/machine/m88k/Makefile.am: Ditto.
- * libc/machine/mips/Makefile.am: Ditto.
- * libc/machine/mn10200/Makefile.am: Ditto.
- * libc/machine/mn10300/Makefile.am: Ditto.
- * libc/machine/mt/Makefile.am: Ditto.
- * libc/machine/necv70/Makefile.am: Ditto.
- * libc/machine/powerpc/Makefile.am: Ditto.
- * libc/machine/sh/Makefile.am: Ditto.
- * libc/machine/sh/Makefile.in: Ditto.
- * libc/machine/sparc/Makefile.am: Ditto.
- * libc/machine/tic4x/Makefile.am: Ditto.
- * libc/machine/tic80/Makefile.am: Ditto.
- * libc/machine/v850/Makefile.am: Ditto.
- * libc/machine/w65/Makefile.am: Ditto.
- * libc/machine/xscale/Makefile.am: Ditto.
- * libc/machine/xstormy16/Makefile.am: Ditto.
- * libc/machine/z8k/Makefile.am: Ditto.
- * libc/sys/a29khif/Makefile.am: Ditto.
- * libc/sys/arm/Makefile.am: Ditto.
- * libc/sys/d10v/Makefile.am: Ditto.
- * libc/sys/h8300hms/Makefile.am: Ditto.
- * libc/sys/h8500hms/Makefile.am: Ditto.
- * libc/sys/linux/Makefile.am: Ditto.
- * libc/sys/linux/linuxthreads/Makefile.am: Ditto.
- * libc/sys/linux/net/Makefile.am: Ditto.
- * libc/sys/linux/stdlib/Makefile.am: Ditto.
- * libc/sys/m88kbug/Makefile.am: Ditto.
- * libc/sys/mmixware/Makefile.am: Ditto.
- * libc/sys/rdos/Makefile.am: Ditto.
- * libc/sys/rtems/Makefile.am: Ditto.
- * libc/sys/sh/Makefile.am: Ditto.
- * libc/sys/sun4/Makefile.am: Ditto.
- * libc/sys/sysmec/Makefile.am: Ditto.
- * libc/sys/sysnec810/Makefile.am: Ditto.
- * libc/sys/sysnecv850/Makefile.am: Ditto.
- * libc/sys/sysvi386/Makefile.am: Ditto.
- * libc/sys/sysvnecv70/Makefile.am: Ditto.
- * libc/sys/tic80/Makefile.am: Ditto.
- * libc/sys/w65/Makefile.am: Ditto.
- * libc/sys/z8ksim/Makefile.am: Ditto.
- * libc/machine/necv70/fastmath.S: Renamed from .s file.
- * libc/machine/necv70/setjmp.S: Ditto.
- * libc/machine/necv70/fastmath.s: Removed.
- * libc/machine/necv70/setjmp.s: Ditto.
- * libc/machine/w65/*.S: New files renamed from .s files.
- * libc/machine/w65/*.s: Renamed and removed.
- * libc/sys/a29khif/*.S: New files renamed from .s files.
- * libc/sys/a29khif/*.s: Renamed and removed.
- * libc/sys/sysvi386/*.S: New files renamed from .s files.
- * libc/sys/sysvi386/*.s: Renamed and removed.
- * libc/sys/sysvnecv70/*.S: New files renamed from .s files.
- * libc/sys/sysvnecv70/*.s: Renamed and removed.
- * libc/*Makefile.in: Regenerated as appropriate.
-
-2006-04-24 DJ Delorie <dj@redhat.com>
-
- * libc/machine/sh/configure.in: Avoid link tests.
- * libc/machine/sh/configure: Regenerate.
-
-2006-04-18 Jeff Johnston <jjohnstn@redhat.com>
-
- * libc/include/sys/signal.h (sigdelset, sigfillset, sigismember): New macros.
- (sigaddset, sigemptyset): Add return code.
-
-2006-04-13 Ralf Corsepius <ralf.corsepius@rtems.org>
-
- * acinclude.m4: New _NEWLIB_VERSION.
- * acinclude.m4(NEWLIB_CONFIGURE): AC_REQUIRE(_NEWLIB_VERSION).
- Use AC_CANONICAL_HOST instead of AC_CANONICAL_SYSTEM.
- Use new form of AC_INIT_AUTOMAKE.
- * configure.in: AC_PREREQ(2.59).
- Use autoconf-2.5.x version of AC_INIT.
- Use AC_CONFIG_FILES and autoconf-2.5x AC_OUTPUT instead of
- autoconf-2.13's AC_OUTPUT.
- * libm/configure.in: Ditto.
- * libm/machine/configure.in: Ditto.
- * libm/machine/i386/configure.in: Ditto.
- * libc/configure.in: Ditto.
- * libc/machine/a29k/configure.in: Ditto.
- * libc/machine/arm/configure.in: Ditto.
- * libc/machine/configure.in: Ditto.
- * libc/machine/mn10300/configure.in: Ditto.
- * libc/machine/powerpc/configure.in: Ditto.
- * libc/machine/z8k/configure.in: Ditto.
- * libc/machine/h8300/configure.in: Ditto.
- * libc/machine/mips/configure.in: Ditto.
- * libc/machine/crx/configure.in: Ditto.
- * libc/machine/m68hc11/configure.in: Ditto.
- * libc/machine/h8500/configure.in: Ditto.
- * libc/machine/xscale/configure.in: Ditto.
- * libc/machine/d10v/configure.in: Ditto.
- * libc/machine/fr30/configure.in: Ditto.
- * libc/machine/sh/configure.in: Ditto.
- * libc/machine/tic80/configure.in: Ditto.
- * libc/machine/m32r/configure.in: Ditto.
- * libc/machine/xstormy16/configure.in: Ditto.
- * libc/machine/i386/configure.in: Ditto.
- * libc/machine/d30v/configure.in: Ditto.
- * libc/machine/mn10200/configure.in: Ditto.
- * libc/machine/frv/configure.in: Ditto.
- * libc/machine/mt/configure.in: Ditto.
- * libc/machine/i960/configure.in: Ditto.
- * libc/machine/v850/configure.in: Ditto.
- * libc/machine/necv70/configure.in: Ditto.
- * libc/machine/tic4x/configure.in: Ditto.
- * libc/machine/cris/configure.in: Ditto.
- * libc/machine/m68k/configure.in: Ditto.
- * libc/machine/m32c/configure.in: Ditto.
- * libc/machine/hppa/configure.in: Ditto.
- * libc/machine/w65/configure.in: Ditto.
- * libc/machine/iq2000/configure.in: Ditto.
- * libc/machine/sparc/configure.in: Ditto.
- * libc/machine/m88k/configure.in: Ditto.
- * libc/sys/linux/configure.in: Ditto.
- * libc/sys/linux/machine/configure.in: Ditto.
- * libc/sys/linux/machine/i386/configure.in: Ditto.
- * libc/sys/linux/linuxthreads/configure.in: Ditto.
- * libc/sys/linux/linuxthreads/machine/configure.in: Ditto.
- * libc/sys/linux/linuxthreads/machine/i386/configure.in: Ditto.
- * libc/sys/arm/configure.in: Ditto.
- * libc/sys/configure.in: Ditto.
- * libc/sys/decstation/configure.in: Ditto.
- * libc/sys/a29khif/configure.in: Ditto.
- * libc/sys/sysnecv850/configure.in: Ditto.
- * libc/sys/d10v/configure.in: Ditto.
- * libc/sys/netware/configure.in: Ditto.
- * libc/sys/mmixware/configure.in: Ditto.
- * libc/sys/h8500hms/configure.in: Ditto.
- * libc/sys/sh/configure.in: Ditto.
- * libc/sys/tic80/configure.in: Ditto.
- * libc/sys/rdos/configure.in: Ditto.
- * libc/sys/sysmec/configure.in: Ditto.
- * libc/sys/sysvi386/configure.in: Ditto.
- * libc/sys/h8300hms/configure.in: Ditto.
- * libc/sys/sparc64/configure.in: Ditto.
- * libc/sys/arc/configure.in: Ditto.
- * libc/sys/sysnec810/configure.in: Ditto.
- * libc/sys/m88kbug/configure.in: Ditto.
- * libc/sys/sysvnecv70/configure.in: Ditto.
- * libc/sys/z8ksim/configure.in: Ditto.
- * libc/sys/rtems/configure.in: Ditto.
- * libc/sys/w65/configure.in: Ditto.
- * libc/sys/sun4/configure.in: Ditto.
- * doc/configure.in: Ditto.
- * iconvdata/configure.in: Ditto.
- * configure.in: Use AC_CONFIG_HEADER instead of AM_CONFIG_HEADER.
-
-2006-04-11 Jeff Johnston <jjohnstn@redhat.com>
-
- * acinclude.m4: Properly add square brackets for
- AC_DEFUN macros. Rewrite LIB_AC_PROG_CC to remove
- macros no longer available. Add LIB_AM_PROG_AS to
- remove prereq of AC_PROG_CC. Add LIB_AC_PROG_CC_GNU
- macro. Substitute lpfx (library object prefix).
- * configure.host: Set lpfx depending on whether
- libtool is used or not.
- * configure.in: Individually specify libc and libm
- to AC_CONFIG_SUBDIRS. Add square bracket quoting as
- necessary.
- * Makefile.am: Use $(lpfx) to get object names for
- math-library functions that should also be in libc.
- * libc/machine/configure.in: Use case statement to determine
- AC_CONFIG_SUBDIRS statement.
- * libc/sys/linux/linuxthreads/machine/configure.in: Ditto.
- * libc/sys/linux/machine/configure.in: Ditto.
- * libc/sys/configure.in: Ditto.
- * libm/machine/configure.in: Ditto.
- * libc/sys/linux/configure.in: Fix up AC_CONFIG_SUBDIRS.
- * libm/configure.in: Add AM_CONDITIONAL statement
- for HAVE_LIBM_MACHINE_DIR.
- * libc/machine/a29k/Makefile.am: Modified to work with
- latest automake. Change includes setting AM_CCASFLAGS
- so building .S files will properly pick up flags used
- to build C files.
- * libc/machine/arm/Makefile.am: Ditto.
- * libc/machine/crx/Makefile.am: Ditto.
- * libc/machine/d10v/Makefile.am: Ditto.
- * libc/machine/d30v/Makefile.am: Ditto.
- * libc/machine/fr30/Makefile.am: Ditto.
- * libc/machine/frv/Makefile.am: Ditto.
- * libc/machine/h8300/Makefile.am: Ditto.
- * libc/machine/h8500/Makefile.am: Ditto.
- * libc/machine/hppa/Makefile.am: Ditto.
- * libc/machine/i386/Makefile.am: Ditto.
- * libc/machine/iq2000/Makefile.am: Ditto.
- * libc/machine/m32c/Makefile.am: Ditto.
- * libc/machine/m32r/Makefile.am: Ditto.
- * libc/machine/m68hc11/Makefile.am: Ditto.
- * libc/machine/m68k/Makefile.am: Ditto.
- * libc/machine/m88k/Makefile.am: Ditto.
- * libc/machine/mips/Makefile.am: Ditto.
- * libc/machine/mn10200/Makefile.am: Ditto.
- * libc/machine/mn10300/Makefile.am: Ditto.
- * libc/machine/mt/Makefile.am: Ditto.
- * libc/machine/necv70/Makefile.am: Ditto.
- * libc/machine/powerpc/Makefile.am: Ditto.
- * libc/machine/sh/Makefile.am: Ditto.
- * libc/machine/sparc/Makefile.am: Ditto.
- * libc/machine/tic4x/Makefile.am: Ditto.
- * libc/machine/tic80/Makefile.am: Ditto.
- * libc/machine/v850/Makefile.am: Ditto.
- * libc/machine/w65/Makefile.am: Ditto.
- * libc/machine/xscale/Makefile.am: Ditto.
- * libc/machine/xstormy16/Makefile.am: Ditto.
- * libc/machine/z8k/Makefile.am: Ditto.
- * libc/sys/a29khif/Makefile.am: Ditto.
- * libc/sys/arc/Makefile.am: Ditto.
- * libc/sys/arm/Makefile.am: Ditto.
- * libc/sys/d10v/Makefile.am: Ditto.
- * libc/sys/decstation/Makefile.am: Ditto.
- * libc/sys/h8300hms/Makefile.am: Ditto.
- * libc/sys/h8500hms/Makefile.am: Ditto.
- * libc/sys/linux/linuxthreads/machine/i386/Makefile.am: Ditto.
- * libc/sys/linux/machine/i386/Makefile.am: Ditto.
- * libc/sys/m88kbug/Makefile.am: Ditto.
- * libc/sys/mmixware/Makefile.am: Ditto.
- * libc/sys/netware/Makefile.am: Ditto.
- * libc/sys/rdos/Makefile.am: Ditto.
- * libc/sys/rtems/Makefile.am: Ditto.
- * libc/sys/sh/Makefile.am: Ditto.
- * libc/sys/sparc64/Makefile.am: Ditto.
- * libc/sys/sysmec/Makefile.am: Ditto.
- * libc/sys/sysnec810/Makefile.am: Ditto.
- * libc/sys/sysnecv850/Makefile.am: Ditto.
- * libc/sys/sysvi386/Makefile.am: Ditto.
- * libc/sys/sysvnecv70/Makefile.am: Ditto.
- * libc/sys/tic80/Makefile.am: Ditto.
- * libc/sys/w65/Makefile.am: Ditto.
- * libc/sys/z8ksim/Makefile.am: Ditto.
- * libm/machine/i386/Makefile.am: Ditto.
- * libc/sys/arm/Makefile.am: Ditto plus add EXTRA sources including
- trap.S so that automake will generate a .S.o suffix rule.
- * libc/argz/Makefile.am: Modified to work with
- latest automake. Change includes adding lib_a_CFLAGS
- so automake doesn't complain about libtool and non-libtool
- libraries sharing objects.
- * libc/ctype/Makefile.am: Ditto.
- * libc/errno/Makefile.am: Ditto.
- * libc/iconv/ccs/Makefile.am: Ditto.
- * libc/iconv/ces/Makefile.am: Ditto.
- * libc/iconv/lib/Makefile.am: Ditto.
- * libc/locale/Makefile.am: Ditto.
- * libc/misc/Makefile.am: Ditto.
- * libc/posix/Makefile.am: Ditto.
- * libc/reent/Makefile.am: Ditto.
- * libc/search/Makefile.am: Ditto.
- * libc/signal/Makefile.am: Ditto.
- * libc/stdio/Makefile.am: Ditto.
- * libc/stdio64/Makefile.am: Ditto.
- * libc/stdlib/Makefile.am: Ditto.
- * libc/string/Makefile.am: Ditto.
- * libc/sys/linux/Makefile.am: Ditto.
- * libc/sys/linux/argp/Makefile.am: Ditto.
- * libc/sys/linux/cmath/Makefile.am: Ditto.
- * libc/sys/linux/dl/Makefile.am: Ditto.
- * libc/sys/linux/iconv/Makefile.am: Ditto.
- * libc/sys/linux/intl/Makefile.am: Ditto.
- * libc/sys/linux/linuxthreads/Makefile.am: Ditto.
- * libc/sys/linux/net/Makefile.am: Ditto.
- * libc/sys/linux/stdlib/Makefile.am: Ditto.
- * libc/syscalls/Makefile.am: Ditto.
- * libc/time/Makefile.am: Ditto.
- * libc/unix/Makefile.am: Ditto.
- * libm/Makefile.am: Ditto.
- * libm/common/Makefile.am: Ditto.
- * libm/math/Makefile.am: Ditto.
- * libm/mathfp/Makefile.am: Ditto.
- * Regenerate all aclocal.m4, Makefile.in, and configure files.
-
-2006-04-07 Jeff Johnston <jjohnstn@redhat.com>
-
- * libc/time/time.c (time): Do not check for HAVE_GETTIMEOFDAY
- anymore. Assume there is a gettimeofday syscall.
-
-2006-03-29 Shaun Jackman <sjackman@gmail.com>
-
- * libc/sys/linux/include/netinet/ip.h: Include netinet/in_systm.h
- for the declaration of n_long.
-
-2006-03-29 Shaun Jackman <sjackman@gmail.com>
-
- * libc/sys/linux/include/net/if.h: Include sys/socket.h for
- struct sockaddr.
- (IFF_SMART): Replace this define with IFF_NOTRAILERS.
- (IFF_CANTCHANGE): Replace IFF_SMART reference with IFF_NOTRAILERS.
- (IFF_NOTRAILERS): New define.
- (struct ifreq): Add ifru_netmask.
- (ifr_netmask): New define.
-
-2006-03-29 Shaun Jackman <sjackman@gmail.com>
-
- * libc/sys/linux/sys/ioccom.h (ioctl): Change declaration to
- match sys/ioctl.h.
-
-2006-03-29 Shaun Jackman <sjackman@gmail.com>
-
- * libtool.m4: Set lt_cv_deplibs_check_method=pass_all for
- linux-newlib libc implementations.
-
-2006-03-29 Eric Blake <ebb9@byu.net>
-
- * libc/stdio/freopen.c (_freopen_r) [__SCLE]: Fix typo.
- * libc/stdio64/freopen64.c (_freopen64_r) [__SCLE]: Likewise.
-
-2006-03-29 Jeff Johnston <jjohnstn@redhat.com>
-
- * libc/sys/linux/io.c (__mknod): Fix declaration of
- syscall to pass a dev_t as third argument rather than
- a pointer to dev_t.
-
-2006-03-29 Jeff Johnston <jjohnstn@redhat.com>
-
- * libc/sys/linux/net/name6.c: Fix struct references.
-
-2006-03-22 Mark Mitchell <mark@codesourcery.com>
-
- * configure.host: Allow hosts to set the default
- newlib_atexit_dynamic_alloc value.
- * configure.in: Likewise.
- * configure: Regenerated.
-
-2006-03-20 Mark Mitchell <mark@codesourcery.com>
-
- * acconfig.h (_ATEXIT_DYNAMIC_ALLOC): Undef.
- * configure.in (--disable-newlib-atexit-dynamic-alloc): New
- option.
- * configure: Regenerated.
- * newlib.hin: Regenerated.
- * libc/stdlib/__atexit.c (__register_exitproc): Don't call malloc
- if _ATEXIT_DYNAMIC_ALLOC is undefined.
- * libc/stdlib/__call_atexit.c (__call_exitprocs): Don't call free
- if _ATEXIT_DYNAMIC_ALLOC is undefined.
-
-2006-03-17 Jeff Johnston <jjohnstn@redhat.com>
-
- * libc/sys/linux/linuxthreads/config.h: Remove definition
- of UINT32_C.
-
-2006-03-15 Jeff Johnston <jjohnstn@redhat.com>
-
- * libc/stdio/wsetup.c (__swsetup): Don't make a buffer
- for a string I/O file that isn't using the asprintf family.
-
-2006-03-07 Eric Blake <ebb9@byu.net>
-
- * libc/stdio/freopen.c (_freopen_r) [HAVE_FCNTL]: For NULL
- filename, allow read-only or write-only FILE atop O_RDWR file
- descriptor.
- * libc/stdio64/freopen64.c (_freopen64_r) [HAVE_FCNTL]: Likewise.
-
-2006-03-07 Jeff Johnston <jjohnstn@redhat.com>
-
- * libm/common/sf_isinf.c[_DOUBLE_IS_32BITS]: Undef isinf.
- * libm/common/sf_isnan.c[_DOUBLE_IS_32BITS]: Undef isnan.
-
-2006-03-02 Jeff Johnston <jjohnstn@redhat.com>
-
- * libm/math/math.tex: Fix reference to sisnan.def which
- is now in common subdirectory.
- * libm/mathfp/mathfp.tex: Ditto.
-
-2006-02-27 Jeff Johnston <jjohnstn@redhat.com>
-
- * Makefile.am (MATHOBJS_IN_LIBC): Add s_isinfd, sf_isinff,
- s_isnand, and sf_isnanf object files.
- * Makefile.in: Regenerated.
- * libc/include/ieeefp.h: Undef isnan and isinf to avoid
- conflict if <math.h> has previously been included.
- * libc/include/math.h
- * libc/include/math.h: Make isnan and isinf macros to
- conform to C99.
- (__isinfd, __isinff, __isnand, __isnanf): New functions.
- * libm/common/Makefile.am: Add new s_isinfd, s_isnand, sf_isinff,
- and sf_isnanf files. Also support s_isnan, sf_isnan, s_isinf, and
- sf_isinf files which have been moved from math/mathfp directories.
- * libm/common/Makefile.in: Regenerated.
- * libm/common/s_isinfd.c: New file.
- * libm/common/s_isnand.c: Ditto.
- * libm/common/sf_isinff.c: Ditto.
- * libm/common/sf_isnanf.c: Ditto.
- * libm/common/s_isinf.c: Moved from libm/math directory.
- * libm/common/s_isnan.c: Ditto.
- * libm/common/sf_isinf.c: Ditto.
- * libm/common/sf_isnan.c: Ditto.
- * libm/math/Makefile.am: Remove isinf and isnan family functions
- which have been moved into common directory.
- * libm/mathfp/Makefile.am: Ditto.
- * libm/math/Makefile.in: Regenerated.
- * libm/mathfp/Makefile.in: Ditto.
- * libm/math/s_isinf.c: Removed.
- * libm/math/s_isnan.c: Ditto.
- * libm/math/sf_isinf.c: Ditto.
- * libm/math/sf_isnan.c: Ditto.
- * libm/mathfp/s_isinf.c: Ditto.
- * libm/mathfp/s_isnan.c: Ditto.
- * libm/mathfp/sf_isinf.c: Ditto.
- * libm/mathfp/sf_isnan.c: Ditto.
-
-2006-02-20 Jeff Johnston <jjohnstn@redhat.com>
-
- * libc/stdio/fflush.c (fflush): For an fflush on a read-only
- stream, turn off fseek/rewind optimization as per POSIX/SUSv3.
- * libc/stdio/fseek.c (_fseek_r): After a successful unoptimized
- seek, turn off the __SNPT no-optimization flag.
-
-2006-02-16 Jeff Johnston <jjohnstn@redhat.com>
-
- * libc/sys/linux/aio.c: Define _GNU_SOURCE so struct aioinit
- will be defined.
- * libc/sys/linux/sys/types.h: Move <sys/config.h> ahead of
- <features.h> to preset special flags.
-
-2006-02-15 Corinna Vinschen <corinna@vinschen.de>
-
- * libc/include/sys/time.h (struct timeval): Change member types
- according to SUSv3.
- * libc/include/sys/types.h (useconds_t): Change to unsigned
- according to SUSv3.
- (suseconds_t): Define type.
-
-2006-02-13 Jeff Johnston <jjohnstn@redhat.com>
- David Carne <davidcarne@gmail.com>
-
- * libc/string/strndup_r.c (_strndup_r): Use strnlen logic
- instead of strlen to determine number of bytes to copy.
- * libc/string/strnlen.c (strnlen): Fix so check for max limit occurs
- before looking at storage location.
-
-2006-02-07 Paul Brook <paul@codesourcery.com>
-
- * libc/machine/arm/setjmp.S: Add Thumb-2 support.
- * libc/sys/arm/crt0.S: Add Thumb-2 startup code.
- * libc/sys/arm/libcfunc.c (do_AngelSWI): Use AngelSWIInsn.
- * libc/sys/arm/swi.h (AngelSWIInsn, AngelSWIAsm): Define.
- * libc/sys/arm/trap.S: Disable for Thumb-2.
-
-2006-01-31 Leif Ekblad <leif@rdos.net>
-
- * configure.host: RDOS support added
- * libc/include/sys/config.h: Ditto.
- * libc/sys/rdos/Makefile.am, libc/sys/rdos/Makefile.in: New files.
- * libc/sys/rdos/aclocal.m4, libc/sys/rdos/chown.c: Ditto.
- * libc/sys/rdos/close.c, libc/sys/rdos/config.h: Ditto.
- * libc/sys/rdos/configure, libc/sys/rdos/configure.in: Ditto.
- * libc/sys/rdos/crt0.S, libc/sys/rdos/execve.c: Ditto.
- * libc/sys/rdos/fork.c, libc/sys/rdos/fstat.c: Ditto.
- * libc/sys/rdos/getenv.c, libc/sys/rdos/getpid.c: Ditto.
- * libc/sys/rdos/gettod.c, libc/sys/rdos/isatty.c: Ditto.
- * libc/sys/rdos/kill.c, libc/sys/rdos/link.c: Ditto.
- * libc/sys/rdos/lseek.c, libc/sys/rdos/open.c: Ditto.
- * libc/sys/rdos/rdos.S, libc/sys/rdos/rdos.h: Ditto.
- * libc/sys/rdos/rdoshelp.c, libc/sys/rdos/read.c: Ditto.
- * libc/sys/rdos/readlink.c, libc/sys/rdos/sbrk.c: Ditto.
- * libc/sys/rdos/stat.c, libc/sys/rdos/symlink.c: Ditto.
- * libc/sys/rdos/times.c, libc/sys/rdos/unlink.c: Ditto.
- * libc/sys/rdos/user.def, libc/sys/rdos/wait.c: Ditto.
- * libc/sys/rdos/write.c: Ditto.
-
-2006-01-24 Jeff Johnston <jjohnstn@redhat.com>
-
- * acinclude.m4: Add nodefine to AM_INIT_AUTOMAKE macro invocation
- so as not to define PACKAGE and VERSION in newlib.h.
- * aclocal.m4: Regenerated.
- * configure: Ditto.
- * newlib.hin: Ditto.
-
-2006-01-20 Jeff Johnston <jjohnstn@redhat.com>
-
- * acconfig.h: New file to generate newlib.hin from.
- * newlib.hin: Regenerated.
- * stamp-h.in: Regenerated.
- * Makefile.am: Add ACLOCAL_AMFLAGS so aclocal can be
- called automatically.
- * Makefile.in: Regenerated.
- * acinclude.m4: Add proper comment for hack in previous change.
- * aclocal.m4 */aclocal.m4: Regenerated.
- * configure */configure: Regenerated.
-
-2006-01-11 Jeff Johnston <jjohnstn@redhat.com>
-
- * acinclude.m4: Add hack to prevent INSTALL in subdirs
- from being set to "../".
- * Makefile.am: Pass INSTALL in AM_MAKEFLAGS.
- * aclocal.m4: Regenerated.
- * configure: Ditto.
- * Makefile.in: Ditto.
- * doc/aclocal.m4: Ditto.
- * doc/configure: Ditto.
- * iconvdata/aclocal.m4: Ditto.
- * iconvdata/configure: Ditto.
- * libc/*/aclocal.m4: Ditto.
- * libc/*/configure: Ditto.
- * libc/libc.texinfo: Ditto.
- * libm/*/aclocal.m4: Ditto.
- * libm/*/configure: Ditto.
-
-2006-01-10 Eric Blake <ebb9@byu.net>
-
- * libc/stdio/freopen.c (_freopen_r): Fix use of oflags.
- * libc/stdio64/freopen64.c (_freopen64_r): Likewise.
-
-2006-01-10 Jeff Johnston <jjohnstn@redhat.com>
-
- * libm/mathfp/s_frexp.c: Check for special values on
- the original input, not the manipulated output value.
- * libm/mathfp/sf_frexp.c: Ditto.
- * libm/mathfp/s_atangent.c: Don't use local value branch
- when checking for quadrant.
- * libm/mathfp/sf_atangent.c: Ditto.
-
-2006-01-09 Jeff Johnston <jjohnstn@redhat.com>
-
- * libc/stdio/freopen.c: Switch to use isatty instead of _isatty.
- * libc/stdio64/freopen64.c: Ditto.
-
-2006-01-09 Eric Blake <ebb9@byu.net>
-
- * libc/stdio/freopen.c (_freopen_r): Accept NULL filename.
- * libc/stdio64/freopen64.c (_freopen64_r): Likewise.
-
-2006-01-06 Jeff Johnston <jjohnstn@redhat.com>
-
- * libc/sys/linux/include/getopt.h: Add macros needed by
- new version of getopt.c in libc/stdlib.
-
-2006-01-04 Gregory Pietsch <gpietsch@comcast.net>
-
- * libc/stdlib/getopt.c: Replaced with version
- that adds getopt_long and getopt_long_only support.
- * libc/include/getopt.h: New file.
-
-2005-12-16 Jeff Johnston <jjohnstn@redhat.com>
-
- * NEWS: Update with 1.14.0 info.
- * README: Ditto.
- * acinclude.m4: Change version number to 1.14.0.
- * aclocal.m4: Regenerated.
- * configure: Ditto.
- * doc/aclocal.m4: Ditto.
- * doc/configure: Ditto.
- * libc/*/aclocal.m4: Ditto.
- * libc/*/configure: Ditto.
- * libc/libc.texinfo: Ditto.
- * libm/*/aclocal.m4: Ditto.
- * libm/*/configure: Ditto.
- * libm/libm.texinfo: Ditto.
- * libc/sys/linux/shared.ld: Add VERS_1.14.
-
-2005-12-16 Jeff Johnston <jjohnstn@redhat.com>
-
- * libc/sys/linux/sys/stat.h: Change *stat64 prototypes to
- take a pointer to struct stat64 rather than struct stat.
-
-2005-12-16 Ralf Corsepius <ralf.corsepius@rtems.org>
-
- * libc/include/stdint.h: Prefer long over int for int32_t.
- Use __have_long32 to set up int32_t.
- * libc/include/inttypes.h: Use "#if xxx" instead of "#ifdef xxx"
- (Sync with stdint.h).
-
-2005-12-14 Corinna Vinschen <corinna@vinschen.de>
-
- * libc/include/sys/fcntl.h: Define O_SYNC unconditionally. Fix
- typo in O_NDELAY comment.
-
-2005-12-13 Nathan Sidwell <nathan@codesourcery.com>
-
- * libc/include/machine/ieeefp.h (__mt__): Renamed from __ms1__.
- * libc/include/machine/setjmp.h (__mt__): Likewise.
- * libc/machine/mt/setjmp.S: Rename ms1 reference to mt.
- * libc/machine/configure.in: Ditto.
-
-2005-12-12 Nathan Sidwell <nathan@codesourcery.com>
-
- * configure.host: Replace ms1 arch with mt arch.
- * libc/machine/mt: Renamed from ms1 dir.
-
-2005-12-08 Shaun Jackman <sjackman@gmail.com>
-
- * libc/include/sys/types.h: Remove the ifdef armour around
- standard POSIX types.
-
-2005-12-06 Ralf Corsepius <ralf.corsepius@rtems.org>
-
- * libc/sys/rtems/crt0.c: Add rtems_gxx_key_create,
- rtems_gxx_key_delete, rtems_gxx_getspecific,
- rtems_gxx_setspecific, rtems_gxx_mutex_trylock,
- rtems_gxx_recursive_mutex_init, rtems_gxx_recursive_mutex_lock,
- rtems_gxx_recursive_mutex_trylock, rtems_gxx_recursive_mutex_unlock.
-
-2005-12-05 Christopher Faylor <cgf@timesys.com>
-
- * libc/include/stdlib.h: Move cygwin declarations to cygwin-specific
- file. Declare unsetenv and _unsetenv_r when not cygwin.
-
-2005-11-18 Jeff Johnston <jjohnstn@redhat.com>
-
- * libc/time/strptime.c (strptime): Don't abort for %c and %Z.
- Treat %c as "%a %b %e %H:%M:%S %Y" and ignore %Z.
-
-2005-11-18 Christopher Faylor <cgf@timesys.com>
-
- * include/sys/time.h: Move more cygwin stuff to cygwin-specific header.
-
-2005-11-18 Christopher Faylor <cgf@timesys.com>
-
- * include/time.h: Remove more cygwin-specific stuff.
-
-2005-11-18 Christopher Faylor <cgf@timesys.com>
-
- * include/time.h: Move cygwin declarations to cygwin-specific header.
- * include/sys/time.h: Rename cygwin include to "sys_time.h".
-
-2005-11-17 Jeff Johnston <jjohnstn@redhat.com>
-
- * libc/sys/linux/dl/dl-local.h: New file based on old dlfcn.h
- in libc/sys/linux/include.
- * libc/sys/linux/dl/dlfcn.h: Moved to libc/sys/linux/include.
- * libc/sys/linux/dl/ldsodefs.h: Include dl-local.h instead of dlfcn.h.
- * libc/sys/linux/include/dlfcn.h: Replaced with dlfcn.h formerly
- in libc/sys/linux/dl.
-
-2005-11-11 Christopher Faylor <cgf@timesys.com>
-
- * libc/include/sys/time.h: For cygwin, use general header rather than
- specific "sys/select.h".
-
-2005-11-08 Tom Walsh <tom@openhardware.net>
-
- * libc/time/tzvars.c: New file.
- * libc/time/tzset_r.c: Moved globals into tzvars.c
- so other time functions needn't link in __tzset_r and its
- dependencies.
- * libc/time/Makefile.am: Add the new file.
- * libc/time/Makefile.in: Regenerated.
-
-2005-11-08 Christopher Faylor <cgf@timesys.com>
-
- * libc/include/string.h: Add cygwin-specific function declaration.
-
-2005-11-07 Corinna Vinschen <corinna@vinschen.de>
-
- * libc/include/ieeefp.h: Add C++ guards.
-
-2005-11-03 Jeff Johnston <jjohnstn@redhat.com>
-
- * libc/unix/getcwd.c: Don't use non-reentrant syscall names.
- * libc/unix/getlogin.c: Ditto.
- * libc/unix/getpass.c: Ditto.
- * libc/unix/getut.c: Ditto.
- * libc/unix/ttyname.c: Ditto.
-
-2005-11-03 Shaun Jackman <sjackman@gmail.com>
-
- * libc/include/sys/unistd.h (readlink, symlink): Provide these
- prototypes by default.
- * libc/sys/linux/include/unistd.h (readlink): Remove this
- prototype.
- * libc/sys/linux/sys/unistd.h (readlink, symlink): New
- prototypes.
-
-2005-11-01 Ralf Corsepius <ralf.corsepius@rtems.org>
-
- * libc/include/stdint.h: Cleanup #if vs. #ifdef.
-
-2005-10-31 Darin Johnson <darin@usa.net>
-
- * libm/mathfp/s_mathcnst.c: Fix endian-ness check to be
- correct for constants.
-
-2005-10-28 Bob Wilson <bob.wilson@acm.org>
-
- * libc/stdio/siprintf.c: Wrap long lines in ANSI_SYNOPSIS.
- * libc/stdio/siscanf.c: Likewise.
- * libc/stdio/sprintf.c: Likewise.
- * libc/stdio/sscanf.c: Likewise.
- * libc/stdio/vfprintf.c: Likewise.
- * libc/stdio/vfscanf.c: Likewise.
- * libc/stdio/viprintf.c: Likewise.
- * libc/stdio/viscanf.c: Likewise.
-
-2005-10-28 Bob Wilson <bob.wilson@acm.org>
-
- * libc/sys.tex (Stubs): Format examples consistently. Change sbrk
- example to use "_end" symbol instead of "end". Change write example
- to use "outbyte" instead of "writechar".
-
-2005-10-28 Bob Wilson <bob.wilson@acm.org>
-
- * libc/ctype/ctype.tex: Use hyphens as appropriate, but not otherwise.
- * libc/ctype/islower.c: Likewise.
- * libc/ctype/isupper.c: Likewise.
- * libc/ctype/iswalnum.c: Likewise.
- * libc/ctype/iswalpha.c: Likewise.
- * libc/ctype/iswblank.c: Likewise.
- * libc/ctype/iswcntrl.c: Likewise.
- * libc/ctype/iswdigit.c: Likewise.
- * libc/ctype/iswgraph.c: Likewise.
- * libc/ctype/iswlower.c: Likewise.
- * libc/ctype/iswprint.c: Likewise.
- * libc/ctype/iswpunct.c: Likewise.
- * libc/ctype/iswspace.c: Likewise.
- * libc/ctype/iswupper.c: Likewise.
- * libc/ctype/iswxdigit.c: Likewise.
- * libc/ctype/tolower.c: Likewise.
- * libc/ctype/toupper.c: Likewise.
- * libc/ctype/towctrans.c: Likewise.
- * libc/ctype/towlower.c: Likewise.
- * libc/ctype/towupper.c: Likewise.
- * libc/string/strcasecmp.c: Likewise.
- * libc/string/strcoll.c: Likewise.
- * libc/string/strings.tex: Likewise.
- * libc/string/strlwr.c: Likewise.
- * libc/string/strncasecmp.c: Likewise.
- * libc/string/strupr.c: Likewise.
- * libc/string/wcscoll.c: Likewise.
- * libc/string/wcslcat.c: Likewise.
- * libc/string/wcslcpy.c: Likewise.
- * libc/string/wcsnlen.c: Likewise.
- * libc/string/wcsstr.c: Likewise.
- * libc/string/wcstrings.tex: Likewise.
- * libc/string/wmemchr.c: Likewise.
- * libc/string/wmemcmp.c: Likewise.
- * libc/string/wmemcpy.c: Likewise.
- * libc/string/wmemmove.c: Likewise.
- * libc/string/wmemset.c: Likewise.
-
-2005-10-28 Bob Wilson <bob.wilson@acm.org>
-
- * libc/misc/unctrl.c: Replace FUNCTION description.
- * libc/signal/signal.c: Remove documentation for raise and _raise_r.
- * libc/stdio/getdelim.c: Fix spelling errors.
- * libc/stdio/getw.c: Put RETURNS on a separate line. Fix punctuation.
- * libc/stdio/putw.c: Likewise.
- * libc/stdlib/a64l.c: Fix formatting, spelling and punctuation in
- documentation.
- * libc/stdlib/assert.c: Do not capitalize FUNCTION description.
- * libc/stdlib/efgcvt.c: Add spaces to FUNCTION description.
- * libc/stdlib/envlock.c: Use em-dash in FUNCTION description.
- * libc/stdlib/mlock.c: Likewise.
- * libc/stdlib/mstats.c: Likewise.
- * libc/time/tzlock.c: Likewise.
- * libc/stdlib/rand.c: Use "multi-threaded" and "thread-safe" in NOTES.
- * libc/stdlib/rand48.c: Remove extra space in FUNCTION description
- and hyphenate "pseudo-random".
- * libc/string/bcmp.c: Remove extra blank lines in documentation.
- * libc/string/strncat.c: Likewise.
- * libc/string/memchr.c: Remove extra ">" character in documentation.
- * libc/string/strcspn.c: Use "characters" instead of "chars".
- * libc/string/strpbrk.c: Likewise.
- * libc/string/strerror_r.c: Capitalize "GNU".
- * libc/string/strnlen.c: Likewise.
- * libc/string/strtok.c: Fix formatting, spelling and punctuation in
- documentation. Use "multi-threaded" and "thread-safe" in NOTES.
- * libc/string/wcscat.c: Split PORTABILITY into two paragraphs.
- * libc/string/wcschr.c: Likewise.
- * libc/string/wcscmp.c: Likewise.
- * libc/string/wcscpy.c: Likewise.
- * libc/string/wcscspn.c: Likewise.
- * libc/string/wcslen.c: Likewise.
- * libc/string/wcsncat.c: Likewise.
- * libc/string/wcsncmp.c: Likewise.
- * libc/string/wcsncpy.c: Likewise.
- * libc/string/wcsnlen.c: Likewise.
- * libc/string/wcspbrk.c: Likewise.
- * libc/string/wcsrchr.c: Likewise.
- * libc/string/wcsspn.c: Likewise.
- * libc/string/wmemchr.c: Likewise.
- * libc/string/wmemcmp.c: Likewise.
- * libc/string/wmemcpy.c: Likewise.
- * libc/string/wmemset.c: Likewise.
- * libc/string/wmemmove.c: Likewise. Also fix FUNCTION description.
- * libc/string/wcswidth.c: Formatting and punctuation in documentation.
- * libc/string/wcwidth.c: Likewise.
- * libm/common/s_modf.c: Remove extra period from documentation.
- * libm/math/s_isnan.c: Fix formatting, grammar and punctuation in
- documentation.
- * libm/mathfp/s_isnan.c: Likewise.
- * libm/math/s_ldexp.c: Fix punctuation.
- * libm/mathfp/s_ldexp.c: Likewise.
- * libm/math/w_log.c: Likewise.
- * libm/mathfp/s_logarithm.c: Likewise.
- * libm/math/w_j0.c: Add spaces to FUNCTION description.
- * libm/mathfp/w_jn.c: Likewise.
-
-2005-10-26 Shaun Jackman <sjackman@gmail.com>
-
- * libc/posix/scandir.c (scandir): Update the function
- prototype to match the header.
- * libc/sys/linux/linuxthreads/bits/libc-lock.h: Remove an
- extraneous #endif.
- * libc/sys/linux/sys/lock.h: Do not include
- machine/weakalias.h, since it's not used by this file.
-
-2005-10-26 Jeff Johnston <jjohnstn@redhat.com>
-
- * libc/Makefile.am: Reorder SUBLIBS so machine and sys
- directories can override properly.
-
-2005-10-20 Jeff Johnston <jjohnstn@redhat.com>
-
- * libc/include/math.h (HUGE_VAL, HUGE_VALF, HUGE_VALL): When
- gcc is 3.3 or greater, use special gcc builtins.
-
-2005-10-20 Corinna Vinschen <corinna@vinschen.de>
-
- * libc/include/sys/time.h: Declare futimes and lutimes for Cygwin.
-
-2005-10-18 Corinna Vinschen <corinna@vinschen.de>
-
- * libc/include/sys/features.h: Define _POSIX_MEMLOCK_RANGE for Cygwin.
-
-2005-10-14 Jeff Johnston <jjohnstn@redhat.com>
-
- * libc/include/math.h (HUGE_VALF, HUGE_VALL): New.
- * libm/common/Makefile.am: Add s_infconst.c support.
- * libm/common/Makefile.in: Regenerated.
- * libm/common/s_infconst.c: New file with float and
- long double infinity support added.
- * libm/math/Makefile.am: Remove s_infconst.c support.
- * libm/math/Makefile.in: Regenerated.
- * libm/math/s_infconst.c: Moved to common directory.
- * libm/mathfp/Makefile.am: Remove s_infconst.c support.
- * libm/mathfp/Makefile.in: Regenerated.
- * libm/mathfp/s_infconst.c: Moved to common directory.
-
-2005-10-14 Jeff Johnston <jjohnstn@redhat.com>
-
- * libc/sys/linux/net/gethostbydns.c (dprintf): Rename to
- dbgprintf to prevent conflict with new dprintf function.
-
-2005-10-14 Jeff Johnston <jjohnstn@redhat.com>
-
- * libc/stdio/vfprintf.c (_VFPRINTF_R): Fix up "inf" and
- "nan" processing for systems that have long double support.
-
-2005-10-14 Jeff Johnston <jjohnstn@redhat.com>
-
- * libc/sys/linux/sys/types.h (int8_t): Add type.
-
-2005-10-14 Bob Wilson <bob.wilson@acm.org>
-
- * libm/common/Makefile.am (doc): Do not append to $(TARGETDOC).
- * libm/common/Makefile.in: Regenerate.
- * libm/common/common.tex: Delete file.
- * libm/math/math.tex: Include .def files from common/.
- * libm/mathfp/mathfp.tex: Likewise.
-
-2005-10-14 Bob Wilson <bob.wilson@acm.org>
-
- * libc/libc.texinfo (Top): Surround this node with @ifnottex
- instead of @ifinfo. Update menu to add Introduction and match
- SUBDIRS order.
- (Introduction): New section.
-
-2005-10-14 Bob Wilson <bob.wilson@acm.org>
-
- * libc/reent/reent.tex (Reentrancy): Replace "Cygnus C Library"
- with "Red Hat newlib C Library".
- * libc/sys.tex (Stubs): Likewise.
- * libm/math/math.tex (Math): Likewise.
- * libm/mathfp/mathfp.tex (Math): Likewise.
-
-2005-10-11 Shaun Jackman <sjackman@gmail.com>
-
- * libc/include/stdio.h (dprintf): New declaration.
- (vdprintf): Ditto.
- * libc/stdio/Makefile.am (GENERAL_SOURCES): Add dprintf.c
- and vdprintf.c.
- * libc/stdio/Makefile.in: Regenerate.
- * libc/stdio/dprintf.c: New file.
- * libc/stdio/vdprintf.c: New file.
- * libc/stdio/stdio.tex (dprintf): New entry.
-
-2005-10-11 David Weatherford <weath@tensilica.com>
-
- * libc/stdio/vfprintf.c (_VFPRINTF_R): Recognize 'F' format.
- Print "inf" and "nan" in lowercase for e/f/g formats and in
- uppercase for E/F/G formats.
-
-2005-10-07 Bob Wilson <bob.wilson@acm.org>
-
- * libc/stdlib/mallocr.c (mALLOc, rEALLOCc, mEMALIGn): Set errno
- to ENOMEM on failure.
-
-2005-10-06 Ralf Corsepius <ralf.corsepius@rtems.org>
-
- * libc/include/stdint.h: Add [u]int_fast<N>_t types.
-
-2005-10-04 Ralf Corsepius <ralf.corsepius@rtems.org>
-
- * libc/include/stdint.h: Move magic to set __have_long* to the
- beginning. Use #if __have* instead of #if defined(__have*).
- Minor typo fixes.
-
-2005-10-04 James E Wilson <wilson@specifix.com>
-
- * libc/include/sys/dirent.h (_DIRENT_H_): Delete #include_next. Add
- #error.
-
-2005-10-03 Jeff Johnston <jjohnstn@redhat.com>
-
- * libc/sys/linux/include/stdint.h: Include <sys/types.h> and
- incorporate Ralf's change below.
-
-2005-10-03 Ralf Corsepius <ralf.corsepius@rtems.org>
-
- * libc/include/stdint.h:
- Use __INTMAX_TYPE__ to derive intmax_t.
- Use __UINTMAX_TYPE__ to derive uintmax_t.
- Fix minor typo.
-
-2005-09-27 Ralf Corsepius <ralf.corsepius@rtems.org>
-
- * libc/include/stdint.h: Correct __STDINT_EXP macro incorrectly
- handling GCC >= 4.
-
-2005-09-20 Jeff Johnston <jjohnstn@redhat.com>
-
- * libc/sys/linux/include/stdint.h: Update to match functionality
- of generic newlib stdint.h.
-
-2005-09-20 Jeff Johnston <jjohnstn@redhat.com>
-
- * libc/include/stdint.h (__EXP): Rename to __STDINT_EXP
- and do not #undef the macro after it is used. Fix typos.
- Also change 64-bit constants to use the __have_long64 and
- __have_longlong64 flags to determine if long or long long
- constants should be used.
- * libc/include/inttypes.h: Include stddef.h to get wchar_t
- type defined.
-
-2005-09-20 Shaun Jackman <sjackman@gmail.com>
-
- * libc/include/stdint.h: Fix typo in names of
- LEAST macros.
-
-2005-09-20 Jeff Johnston <jjohnstn@redhat.com>
-
- * libc/sys/rtems/include/inttypes.h: Moved to...
- * libc/include/inttypes.h: ...here.
-
-2005-09-19 Jeff Johnston <jjohnstn@redhat.com>
-
- * libc/sys/rtems/include/stdint.h: Moved to...
- * libc/include/stdint.h: ...here.
-
-2005-09-08 Jeff Johnston <jjohnstn@redhat.com>
-
- * Makefile.am: Add include files under bits sub-directory.
- * Makefile.in: Regenerated.
- * libc/sys/linux/argp/argp-fs-xinl.c: Set __OPTIMIZE__ to
- actual value of 1 to be compatible with newer glibc headers.
- * libc/sys/linux/sys/cdefs.h: Fix to be compatible with newer
- glibc headers.
- * libc/sys/linux/sys/dirent.h: Ditto.
- * libc/sys/linux/argp/argp-xinl.c: Ditto.
- * libc/sys/linux/dl/dl-runtime.c: Make sure fixup and
- profile_fixup routines are marked used so they won't be
- optimized away.
- * libc/sys/linux/dl/dl-cache.c: Don't use weak_extern macro
- to mark functions as weak.
- * libc/sys/linux/dl/dl-open.c: Ditto.
- * libc/sys/linux/iconv/gconv_open.c: Fix to obey new gcc4
- rules about lvalues.
- * libc/sys/linux/iconv/gconv_simple.c: Ditto.
- * libc/sys/linux/linuxthreads/bits/libc-lock.h: Don't use
- weak_extern macro to mark functions as weak. Instead always
- use #pragma weak.
- * iconvdata/jis0208.h: Fix to work with gcc4.
- * libc/sys/linux/dl/dl-load.c: Ditto.
- * libc/sys/linux/dl/dl-reloc.c: Ditto.
- * libc/sys/linux/dl/do-rel.h: Ditto.
- * libc/sys/linux/dl/dynamic-link.h: Ditto.
- * libc/sys/linux/include/ltdl.h: Ditto.
- * libc/sys/linux/machine/i386/dl-machine.h: Ditto.
- * libc/sys/linux/machine/i386/weakalias.h: Ditto.
- * libc/sys/linux/net/ns_ntoa.c: Ditto.
- * libc/sys/linux/bits/initspin.h: New file.
- * libc/sys/linux/bits/libc-lock.h: Ditto.
- * libc/sys/linux/bits/pthreadtypes.h: Ditto.
- * libc/sys/linux/bits/typesizes.h: Ditto.
-
-2005-09-08 Eric Blake <ebb9@byu.net>
-
- * libc/argz/argz_insert.c (argz_insert): Don't die with EINVAL when
- before is NULL.
-
-2005-09-08 Brian Dessent <brian@dessent.net>
-
- * sf_lrint.c (lrintf): Mask 'i0' correctly when extracting
- mantissa.
- * s_lrint.c: Ditto.
-
-2005-09-02 Jeff Johnston <jjohnstn@redhat.com>
-
- * libc/include/stdio.h: Add prototype for viprintf.
-
-2005-09-01 Jeff Johnston <jjohnstn@redhat.com>
-
- * libm/mathfp/s_pow.c: (pow): Change code so 0 raised to
- any positive power results in 0.
- * libm/mathfp/sf_pow.c (powf): Ditto.
-
-2005-08-31 Paul Brook <paul@codesourcery.com>
-
- * configure.host: Set have_crt0 to no for Arm targts when not
- providing syscalls. Set sys_dir=arm unconditionally.
- Default have_crt0 based on sys_dir.
- * configure.in: Use have_crt0.
- * libc/configure.in: Ditto.
- * libc/sys/configure.in: Ditto.
- * configure: Regenerate.
- * libc/configure: Regenerate.
- * libc/sys/configure: Regenerate.
- * libc/sys/arm/Makefile.am (lib_a_SOURCES): Add aeabi_atexit.c.
- Only build other files when providing syscalls.
- * libc/sys/arm/Makefile.in: Regenerate.
- * libc/sys/arm/aeabi_atexit.c: New file.
-
-2005-08-26 Christopher Faylor <cgf@timesys.com>
-
- * libc/include/string.h: Revert previous change.
-
-2005-08-25 Christopher Faylor <cgf@timesys.com>
-
- * libc/include/string.h: For Cygwin, Define strerror_r as per ISO C.
-
-2005-08-22 Shaun Jackman <sjackman@gmail.com>
-
- * libc/include/_syslist.h: If HAVE_OPENDIR is not defined,
- define _opendir as opendir, _readdir as readdir, and
- _closedir as closedir so that the implementations in
- libc/posix will be used.
-
-2005-08-10 DJ Delorie <dj@redhat.com>
-
- * MAINTAINERS (CPU Ports): Add CPU port maintainer section.
-
-2005-08-10 Stephen Huw Clarke <stephen.clarke@st.com>
-
- * libm/common/sf_fmax.c: Fix to properly handle NaNs.
- * libm/common/s_max.c: Ditto.
- * libm/common/sf_fmin.c: Ditto.
- * libm/common/s_min.c: Ditto.
-
-2005-08-10 DJ Delorie <dj@redhat.com>
-
- * configure.host: Add m32c support.
- * libc/include/machine/ieeefp.h: Likewise.
- * libc/include/machine/setjmp.h: Likewise.
- * libc/include/sys/config.h: Likewise.
- * libc/machine/m32c: New directory, Renesas R8C/M16C/M32C support.
- * libc/machine/m32c/aclocal.m4: New file.
- * libc/machine/m32c/configure: Ditto.
- * libc/machine/m32c/configure.in: Ditto.
- * libc/machine/m32c/Makefile.am: Ditto.
- * libc/machine/m32c/Makefile.in: Ditto.
- * libc/machine/m32c/setjmp.S: Ditto.
-
-2005-08-02 Bob Wilson <bob.wilson@acm.org>
-
- * libm/math/ef_hypot.c (__ieee754_hypotf): Add missing exponent bias
- to the value for 2^126.
-
-2005-07-26 Hans-Peter Nilsson <hp@bitrange.com>
-
- * libc/machine/cris/libcdtor.c (defaultors): Mark artificially as
- used.
-
-2005-07-20 Bob Wilson <bob.wilson@acm.org>
- Darin Petkov <darin@tensilica.com>
-
- * libm/math/ef_atan2.c (pi, pi_lo): Use round-to-nearest value of pi.
-
-2005-07-19 Paul Brook <paul@codesourcery.com>
-
- * libc/sys/arm/crt0.S: Ensure doubleword stack alignment.
-
-2005-07-18 Joseph S. Myers <joseph@codesourcery.com>
-
- * testsuite/lib/checkoutput.exp (newlib_check_output): Use test
- names after PASS and FAIL which do not depend on source directory
- name or on whether test passed or failed.
- * testsuite/lib/passfail.exp (newlib_pass_fail): Likewise.
-
-2005-07-08 Ola Hugosson <Ola.Hugosson@anoto.com>
-
- * libc/string/wcsspn.c (wcsspn): Add missing increment of q.
-
-2005-07-07 Shaun Jackman <sjackman@gmail.com>
-
- * libc/unix/ttyname.c (ttyname): Avoid calling _closedir
- twice for the same directory. _closedir calls free, and freeing
- the same pointer twice may cause a crash.
-
-2005-07-06 Aldy Hernandez <aldyh@redhat.com>
-
- * configure.host: Added entry for ms1*.
- * libc/include/machine/ieeefp.h: Handle ms1.
- * libc/include/machine/setjmp.h (_JBLEN): Define for ms1.
- * libc/machine/ms1/aclocal.m4: New.
- * libc/machine/ms1/configure: New.
- * libc/machine/ms1/configure.in: New.
- * libc/machine/ms1/Makefile.am: New.
- * libc/machine/ms1/Makefile.in: New.
- * libc/machine/ms1/setjmp.S: New.
-
-2005-07-04 Mark Mitchell <mark@codesourcery.com>
-
- * Makefile.am (site.exp): Set tmpdir.
- * Makefile.in: Regenerated.
- * testsuite/lib/checkoutput.exp (newlib_check_output): Put
- executables in $tmpdir.
- * testsuite/lib/flags.exp (libgloss_link_flags): Use the original
- libgloss version if not running in the build directory.
- * testsuite/lib/newlib.exp (newlib_init): Put testglue.o in
- $tmpdir.
- * testsuite/lib/passfail.exp (newlib_pass_fail): Put executables
- in $tmpdir.
-
-2005-06-28 Dave Korn <dave.korn@artimi.com>
-
- * libm/common/s_lrint.c (lrint): Fix signed-vs-unsigned comparison
- and miscalculation caused by fp representation of zero.
- * libm/common/sf_lrint.c (lrintf): Likewise.
-
-2005-06-16 Christopher Faylor <cgf@timesys.com>
-
- * libc/stdio/vfprintf.c (cvt): Don't rely on pointer aliasing to
- determine characteristics of long double. Use a union instead.
- * ldtoa.c (_ldtoa_r): Ditto.
- (_ldcheck): Ditto.
- (_strtold): Ditto.
- (union uconv): New union.
-
-2005-06-03 Jeff Johnston <jjohnstn@redhat.com>
-
- * libc/stdlib/mallocr.c (MALLOC_COPY): Switch to use memmove
- instead of memcpy.
-
-2005-05-12 Jeff Johnston <jjohnstn@redhat.com>
-
- * configure.host (mn10300-*): Add long long I/O support by default.
-
-2005-05-12 Jeff Johnston <jjohnstn@redhat.com>
-
- * libc/sys/linux/getpwuid.c: Removed.
- * libc/sys/linux/getpwnam.c: Removed.
- * libc/sys/linux/getpwent.c: New file containing logic
- from files removed above. This allows overriding of file
- in libc/unix.
- * libc/sys/linux/Makefile.am: Support changes above.
- * libc/sys/linux/Makefile.in: Regenerated.
-
-2005-04-28 Jeff Johnston <jjohnstn@redhat.com>
-
- * libc/stdio/vfscanf.c (__svfscanf_r): Fix code thinko
- when checking for multiple flags.
-
-2005-04-18 Hans-Peter Nilsson <hp@axis.com>
-
- * configure.host <cris-*-* | crisv32-*-*>: Set
- default_newlib_io_long_long="yes".
-
-2005-04-08 Jeff Johnston <jjohnstn@redhat.com>
-
- * libc/include/libgen.h: New file.
-
-2005-04-08 Shaun Jackman <sjackman@gmail.com>
-
- * libc/unix/Makefile.am: Add support for basename and dirname.
- * libc/unix/Makefile.in: Regenerated.
- * libc/unix/basename.c: New file.
- * libc/unix/dirname.c: New file.
-
-2005-04-07 Shaun Jackman <sjackman@gmail.com>
-
- * libc/sys/linux/inode.c (lchown): New function.
-
-2005-04-07 Shaun Jackman <sjackman@gmail.com>
-
- * libc/unix/Makefile.am (LIB_OBJS): Include all the ELIX objects if no
- ELIX level is defined.
- * libc/unix/Makefile.in: Regenerated.
-
-2005-04-05 Dave Korn <dave.korn@artimi.com>
-
- * libc/stdio/vfscanf.c (__svfscanf_r): If an error occurs processing
- something that looks like a "NaN", put back the characters processed.
-
-2005-04-01 Corinna Vinschen <corinna@vinschen.de>
-
- * libc/stdlib/strtod.c (_strtod_r): Never change s00.
-
-2005-03-23 Christopher Faylor <cgf@timesys.com>
-
- * configure.host: For cygwin, redefine CC with cygwin include directory
- first to mimic the behavior of the top-level configury. Move include
- directory out of newlib_cflags.
-
-2005-03-22 Jeff Johnston <jjohnstn@redhat.com>
-
- * configure.host: For arc, set -DREENTRANT_SYSCALLS_PROVIDED flag on.
- * libc/sys/arc/syscalls.c: Change functions to use __errno_r rather
- than errno.
-
-2005-03-22 Christopher Faylor <cgf@timesys.com>
-
- * libc/include/machine/_types.h: Make trivial change to comment to
- avoid a spurious warning from gcc.
-
-2005-03-21 Nicholas Wourms <nwourms@netscape.net>
-
- * libc/stdio/vfprintf.c: Move newlib.h before _WANT_IO_POS_ARGS test,
- since _WANT_IO_POS_ARGS is now defined in there. Remove duplicate
- reent.h include.
-
-2005-03-18 Hans-Peter Nilsson <hp@axis.com>
- Corinna Vinschen <corinna@vinschen.de>
-
- * libc/include/ctype.h: Remove invalid +1 offset from
- ctype macro references to __ctype_ptr.
- (_ctype_): Move declaration outside #ifndef __cplusplus.
-
-2005-03-18 Corinna Vinschen <corinna@vinschen.de>
-
- * libc/include/machine/setjmp.h (sigsetjmp): Use GCC extension to
- evaluate first parameter only once.
- (siglongjmp): Ditto.
-
-2005-03-17 Jeff Johnston <jjohnstn@redhat.com>
-
- * configure.in: Add new check to see if compiler supports
- aliasing of arrays and define _HAVE_ARRAY_ALIASING if true.
- * configure: Regenerated.
- * Makefile.in: Ditto.
- * newlib.hin: Add _HAVE_ARRAY_ALIASING.
- * libc/ctype/ctype_.c: Check for _HAVE_ARRAY_ALIASING before
- aliasing the _ctype_ array to _ctype_b.
- * libc/include/ctype.h: Change macros to use __ctype_ptr. Mark
- _ctype_ as deprecated.
-
-2005-03-17 Hans-Peter Nilsson <hp@axis.com>
-
- * configure.host (newlib_cflags) <cris-*-*, crisv32-*-*>: Add
- -DCOMPACT_CTYPE.
-
-2005-03-06 Ralf Corsepius <ralf.corsepius@rtems.org>
-
- * libc/sys/rtems/include/inttypes.h: New file.
- * libc/sys/rtems/include/stdint.h: Ditto.
-
-2005-03-06 Ralf Corsepius <ralf.corsepius@rtems.org>
-
- * libc/string/memcmp.c: Fix to avoid pointer signedness warning.
-
-2005-03-06 Ralf Corsepius <ralf.corsepius@rtems.org>
-
- * libc/include/machine/_types.h: New file.
- * libc/include/sys/types.h: Do not check for __rtems__
- when including <machine/_types.h>. Remove some redundant
- declarations now that <machine/_types.h> is included.
- * libc/sys/rtems/machine/_types.h: Removed. Replaced with
- shared header file.
-
-2005-02-25 Ralf Corsepius <ralf.corsepius@rtems.org>
-
- * libm/common/fdlibm.h (FLT_UWORD_MAX, FLT_UWORD_HALF_MAX): Add
- L qualifier for these long constants.
-
-2005-02-25 Eric Blake <ebb9@byu.net>
-
- * libc/include/time.h (__tzrule_struct): Make offset long, since
- a 16-bit int overflows on a 12-hour offset.
- * libc/sys/linux/include/time.h: Ditto.
- * libc/time/mktime.c (mktime): Use new type of __tzrule.offset.
- * libc/time/mktm_r.c: Ditto.
- * libc/time/gettzinfo.c: Ditto.
- * libc/time/strftime.c (strftime): Fix '%x' to deal with negative
- years. Fix '%z' to use long, not int.
-
-2005-02-24 Ralf Corsepius <ralf.corsepius@rtems.org>
-
- * libm/common/s_fpclassify.c: Use __uint32_t instead of int to
- manipulate float values in integer form.
- * libm/common/sf_round.c: Ditto.
-
-2005-02-24 Ralf Corsepius <ralf.corsepius@rtems.org>
-
- * libc/include/sys/types.h [__rtems__]: Include new
- header file machine/_types.h.
- * libc/include/machine/types.h: Ditto.
- * libc/sys/rtems/machine/_types.h: New file.
-
-2005-02-23 Corinna Vinschen <corinna@vinschen.de>
-
- * libc/include/time.h (_timezone): Change to long also for Cygwin.
- (timezone): Drop cast from definition.
-
-2005-02-23 Jeff Johnston <jjohnstn@redhat.com>
-
- * libc/include/time.h [!CYGWIN](_timezone): Change to long.
- (__tzrule_type, __tzinfo_type): New types.
- (__gettzinfo): New function.
- * libc/sys/linux/include/time.h: Ditto.
- * libc/time/Makefile.am: Add gettzinfo.c.
- * libc/time/Makefile.in: Regenerated.
- * libc/time/local.h: Moved __tzrule_type to time.h.
- * libc/time/mktime.c: Call __gettzinfo to reference
- __tznorth, __tzyear, and __tzrule array.
- * libc/time/mktm_r.c: Ditto.
- * libc/time/strftime.c: Ditto.
- * libc/time/tzset_r.c: Ditto. Also remove definition
- of __tzrule which is now in gettzinfo.c. Change _timezone
- references to not cast to time_t.
- * libc/time/gettzinfo.c: New file.
-
-2005-02-23 Corinna Vinschen <corinna@vinschen.de>
-
- * libc/include/sys/unistd.h: Define getpeereid for Cygwin.
-
-2005-02-22 Corinna Vinschen <corinna@vinschen.de>
-
- * libc/include/sys/unistd.h: Define fdatasync also for Cygwin.
-
-2005-02-16 Eric Blake <ebb9@byu.net>
-
- * libc/time/time.tex: Improve the documentation.
- * libc/time/strftime.c: Improve the documentation.
- (iso_year_adjust): New helper function.
- (strftime): Simplify '%E' and '%O'. Change '%c' to use
- recursion. Fix '%C', '%y', and '%Y' to deal with years with more
- than 4 characters. Combine '%d' and '%e'. Implement '%D', '%F',
- '%g', '%G', '%n', '%R', '%t', '%T', '%u', '%V', '%X', and '%z'.
- Avoid core dumps on valid inputs (maxsize == 0, or
- tim_p->tm_isdst > 1).
-
-2005-02-08 Corinna Vinschen <corinna@vinschen.de>
-
- * libc/include/pwd.h (struct passwd): Change pw_uid and pw_gid
- members to uid_t and gid_t according to SUSv3.
- * libc/include/sys/time.h (utimes): Change second parameter
- to const according to SUSv3.
-
-2005-02-07 Antony King <antony.king@st.com>
-
- * libc/stdio/clearerr.c (clearerr): Ensure CHECK_INIT() is
- called before _flockfile to prevent lock object use before
- initialisation. _REENT_SMALL_CHECK_INIT() and CHECK_INIT()
- take a struct _reent * instead of a FILE *.
- * libc/stdio/fclose.c (_fclose_r): Ditto.
- * libc/stdio/feof.c (feof): Ditto.
- * libc/stdio/ferror.c (ferror): Ditto.
- * libc/stdio/fflush.c (fflush): Ditto.
- * libc/stdio/fgetc.c (fgetc): Ditto.
- * libc/stdio/fgets.c (fgets): Ditto.
- * libc/stdio/fileno.c (fileno): Ditto.
- * libc/stdio/fputc.c (fputc): Ditto.
- * libc/stdio/fputs.c (fputs): Ditto.
- * libc/stdio/fread.c (fread): Ditto.
- * libc/stdio/freopen.c (_freopen_r): Ditto.
- * libc/stdio/fseek.c (_fseek_r): Ditto.
- * libc/stdio/ftell.c (_ftell_r): Ditto.
- * libc/stdio/fwrite.c (fwrite): Ditto.
- * libc/stdio/getc.c (getc): Ditto.
- * libc/stdio/getdelim.c (__getdelim): Ditto.
- * libc/stdio/putc.c (putc): Ditto.
- * libc/stdio/setvbuf.c (setvbuf): Ditto.
- * libc/stdio/ungetc.c (_ungetc_r): Ditto.
- * libc/stdio/vfprintf.c (_VFPRINTF_R): Ditto.
- * libc/stdio64/freopen64.c (_freopen64_r): Ditto.
- * libc/stdio64/fseeko64.c (_fseeko64_r): Ditto.
- * libc/stdio64/ftello64.c (_ftello64_r): Ditto.
- * libc/stdio/local.h (CHECK_INIT): Argument is now a struct
- _reent * instead of a FILE * and so replace incorrect use of
- _REENT with argument.
- * libc/sys/arm/syscalls.c (CHECK_INIT): Ditto.
- * libc/stdio/getchar.c (getchar): _REENT_SMALL_CHECK_INIT() and
- CHECK_INIT() take a struct _reent * instead of a FILE *.
- * libc/stdio/iprintf.c (iprintf, _iprintf_r): Ditto.
- * libc/stdio/iscanf.c (iscanf, _iscanf_r): Ditto.
- * libc/stdio/perror.c (perror): Ditto.
- * libc/stdio/printf.c (printf, _printf_r): Ditto.
- * libc/stdio/putchar.c (putchar): Ditto.
- * libc/stdio/puts.c (puts): Ditto.
- * libc/stdio/refill.c (__srefill): Ditto.
- * libc/stdio/scanf.c (scanf, _scanf_r): Ditto.
- * libc/stdio/vfscanf.c (VFSCANF, _VFSCANF_R): Ditto.
- * libc/stdio/viprintf.c (viprintf, _viprintf_r): Ditto.
- * libc/stdio/viscanf.c (viscanf, _viscanf_r): Ditto.
- * libc/stdio/vprintf.c (vprintf, _vprintf_r): Ditto.
- * libc/stdio/vscanf.c (vscanf, _vscanf_r): Ditto.
- * libc/stdio/wbuf.c (__swbuf): Ditto.
- * libc/stdio/wsetup.c (__swsetup): Ditto.
- * libc/stdlib/mallocr.c (malloc_stats): Ditto.
- * libc/stdlib/mstats.c (_mstats_r): Ditto.
- * libc/include/sys/reent.h (_REENT_SMALL_CHECK_INIT): Ditto.
- * libc/machine/powerpc/vfscanf.c (vfscanf): Ditto.
- * libc/stdio/fgetpos.c (_fgetpos_r): Removed unnecessary calls
- to _flockfile and _funlockfile; rely on locking in _ftell_r.
- * libc/stdio64/fgetpos64.c (_fgetpos64_r): Ditto (_ftello64_r).
- * libc/machine/powerpc/vfprintf.c (__sbprintf): Removed unnecessary
- initialision of _data field in FILE structure.
- * libc/machine/powerpc/vfprintf.c (VFPRINTF): Added CHECK_INIT() call.
-
-2005-02-07 Jeff Johnston <jjohnstn@redhat.com>
-
- * libc/stdio/findfp.c (__sinit): Protect with new lock.
- (__sinit_lock): New lock.
- (__sinit_lock_acquire, __sinit_lock_release): New functions.
- * libc/stdio/local.h: Add reference to new __sinit locking
- functions.
-
-2005-02-07 Jeff Johnston <jjohnstn@redhat.com>
-
- * libc/include/math.h (isfinite, isnormal, isunordered): Change
- input variable names to avoid mixups with nesting macros.
-
-2005-01-27 Hans-Peter Nilsson <hp@axis.com>
-
- * configure.host: Add support for cris-*-* and crisv32-*-*.
- * libc/include/machine/ieeefp.h: Ditto.
- * libc/include/machine/setjmp.h: Ditto.
- * libc/machine/cris/configure.in, libc/machine/cris/Makefile.am,
- libc/machine/cris/libcdtor.c, libc/machine/cris/setjmp.c,
- libc/machine/cris/memmove.c, libc/machine/cris/memcpy.c,
- libc/machine/cris/memset.c, libc/machine/cris/include/pthread.h,
- libc/machine/cris/sys/signal.h, libc/machine/cris/sys/fcntl.h,
- libc/machine/cris/sys/errno.h, libc/machine/cris/aclocal.m4,
- libc/machine/cris/configure, libc/machine/cris/Makefile.in: New
- files.
-
-2005-01-27 Hans-Peter Nilsson <hp@axis.com>
-
- * testsuite/newlib.string/memmove1.c: New test.
-
-2005-01-27 Hans-Peter Nilsson <hp@axis.com>
-
- * testsuite/include/check.h: Include stdlib.h.
-
-2005-01-27 Hans-Peter Nilsson <hp@axis.com>
-
- * Makefile.am (stmp-targ-include): Support include header files
- from machine directories.
- (install-data-local): Ditto.
- * Makefile.in: Regenerate.
-
-2005-01-24 Jeff Johnston <jjohnstn@redhat.com>
-
- * libc/include/string.h: Remove Linux-specific declaration of
- strsignal and add #include <sys/string.h>.
- * libc/include/sys/string.h: New file.
- * libc/include/sys/linux/sys/string.h: New file with strsignal
- declaration deleted above.
-
-2005-01-20 Jeff Johnston <jjohnstn@redhat.com>
-
- * libc/time/strftime.c (strftime): Change %r and %x to be compliant
- to POSIX standard for "C" locale. Allow %E and %O modifiers
- to be ignored as long as they precede valid specifiers according
- to POSIX.
-
-2005-01-19 Shaun Jackman <sjackman@gmail.com>
-
- * libc/stdlib/setenv_r.c (_setenv_r): Call tzset() if the TZ
- environment variable is set.
-
-2005-01-19 Shaun Jackman <sjackman@gmail.com>
-
- * tzset_r.c (_tzname): Add a comma.
-
-2005-01-18 Aldy Hernandez <aldyh@redhat.com>
-
- * libc/machine/powerpc/vfprintf.c: Use _REENT when calling
- _VFPRINTF_R.
-
-2005-01-07 Paul Brook <paul@codesourcery.com>
-
- * configure.in: Add test for .init_array.
- * configure: Regenerate.
- * newlib.hin: Add HAVE_INITFINI_ARRAY.
- * libc/misc/Makefile.am: Add init.c
- * libc/misc/Makefile.in: Regenerate.
- * libc/misc/init.c: New file.
- * libc/sys/arm/crt0.S: Call __libc_{init,fini}_array instead of
- _init/_fini if they exist.
-
-2005-01-06 Jeff Johnston <jjohnstn@redhat.com>
-
- * libc/stdlib/strtod.c (_strtod_r): Add NaN support.
- * (strtof): Ditto.
- * libc/stdio/vfscanf.c (__svfscanf_r): Ditto.
- * Makefile.am (MATHOBJS_IN_LIBC): Add s_nan and sf_nan
- functions for use by strtod and strtof.
- * Makefile.in: Regenerated.
-
-2005-01-06 Hans-Peter Nilsson <hp@axis.com>
-
- * libc/stdio/ftell.c (ftell_r): Add parenthesis for __SWR
- bit-test in combination with NULL test.
-
-2005-01-06 Hans-Peter Nilsson <hp@axis.com>
-
- * README: Fix typo of LGPL. Change "license" to "copyright".
-
-2004-12-17 Jeff Johnston <jjohnstn@redhat.com>
-
- * NEWS: Update with 1.13.0 info.
- * README: Ditto.
- * acinclude.m4: Change version number to 1.13.0.
- * aclocal.m4: Regenerated.
- * configure: Ditto.
- * doc/aclocal.m4: Ditto.
- * doc/configure: Ditto.
- * libc/*/aclocal.m4: Ditto.
- * libc/*/configure: Ditto.
- * libc/libc.texinfo: Ditto.
- * libm/*/aclocal.m4: Ditto.
- * libm/*/configure: Ditto.
- * libm/libm.texinfo: Ditto.
- * libc/sys/linux/shared.ld: Add VERS_1.13.
-
-2004-12-17 Christian Groessler <chris@groessler.org>
-
- * libc/machine/z8k/memcmp.S: New file.
- * libc/machine/z8k/memcpy.S: Ditto.
- * libc/machine/z8k/memmove.S: Ditto.
- * libc/machine/z8k/memset.S: Ditto.
- * libc/machine/z8k/Makefile.am: Add new files.
- * libc/machine/z8k/Makefile.in: Regenerated.
- * libc/machine/z8k/setjmp.S: Fix indirect register usage in Z8002
- part. Implement Z8002 stdcall version.
-
-2004-12-13 Jeff Johnston <jjohnstn@redhat.com>
-
- * libc/stdio/fread.c (fread): For unbuffered I/O, attempt
- a low-level read if we don't get the full amount of bytes so
- EOF or error flags will be set.
-
-2004-12-09 Alex Mogilnikov <alx@intellectronika.ru>
-
- * libc/time/tzset_r (_tzset_r): Properly skip over
- '/' when it is detected.
-
-2004-12-08 Alex Mogilnikov <alx@intellectronika.ru>
-
- * libc/time/tzset_r (_tzset_r): Fix loop.
-
-2004-12-08 Alex Mogilnikov <alx@intellectronika.ru>
-
- * libc/time/mktm_r (_mktm_r): Fix overflow calculation for
- m_day.
- (__tzcalc_limits): Fix reference to month array to be zero-based.
-
-2004-12-07 Jeff Johnston <jjohnstn@redhat.com>
-
- * libc/sys/linux/sys/unistd.h: Add prototypes for ftruncate, truncate,
- and usleep.
-
-2004-12-03 Jeff Johnston <jjohnstn@redhat.com>
-
- * Makefile.am (libc_la_LDFLAGS): Add -lgcc to handle any
- libgcc dependencies.
- (libm_la_LDFLAGS): Ditto.
- * Makefile.in: Regenerated.
-
-2004-12-03 Shaun Jackman <sjackman@gmail.com>
-
- * libc/sys/linux/linuxthreads/Makefile.am (install-data-local): Fix
- our link to use readlink so as to preserve any relative link created
- by install-toollibLIBRARIES.
- * libc/sys/linux/linuxthreads/Makefile.in: Regenerated.
-
-2004-12-02 Shaun Jackman <sjackman@gmail.com>
-
- * libc/sys/linux/stdlib/glob.c: Include <sys/types.h> which defines
- time_t before including sys/stat.h, which uses it.
- * libc/sys/linux/sys/stat.h: Include <sys/types.h> and
- <linux/time.h> just prior to definition of __KERNEL__ so as to
- allow building on Debian Linux where otherwise, mktime would
- be redefined.
-
-2004-11-26 Paul Brook <paul@codesourcery.com>
-
- * libc/sys/arm/crt0.S (_start): Add .cantunwind annotation.
-
-2004-11-24 Jeff Johnston <jjohnstn@redhat.com>
-
- * libc/include/stdlib.h (putenv, _putenv_r): Change to remove
- const for value string parameter to match Single Unix and glibc.
- * libc/stdlib/putenv.c: Ditto.
- * libc/stdlib/putenv_r.c: Ditto.
-
-2004-11-24 Jeff Johnston <jjohnstn@redhat.com>
-
- * libc/stdio/Makefile.am: Fix missing vfscanf.
- * libc/stdio/Makefile.in: Regenerated.
-
-2004-11-23 Jeff Johnston <jjohnstn@redhat.com>
-
- * libc/include/stdio.h: Add new iprintf and iscanf variants. Also
- do some reordering.
- * libc/machine/powerpc/vfscanf.c: Remove __sccl function.
- * libc/stdio/Makefile.am: Add support for new iprintf and iscanf
- family functions.
- * libc/stdio/Makefile.in: Regenerated.
- * libc/stdio/fiprintf.c: Remove doc to siprintf.c.
- * libc/stdio/iprintf.c: Ditto.
- * libc/stdio/local.h (__svfiscanf_r): New prototype.
- * libc/stdio/siprintf.c: Add docs for various iprintf family functions.
- * libc/stdio/sniprintf.c: Move docs to siprintf.c.
- * libc/stdio/stdio.tex: Add new functions.
- * libc/stdio/vfscanf.c: Split out __sccl function to separate
- file and add special name defines so this file can be used
- to build vfiscanf.o.
- * libc/stdio/asiprintf.c: New file.
- * libc/stdio/fiscanf.c: Ditto.
- * libc/stdio/iscanf.c: Ditto.
- * libc/stdio/sccl.c: Ditto.
- * libc/stdio/siscanf.c: Ditto.
- * libc/stdio/vasiprintf.c: Ditto.
- * libc/stdio/viprintf.c: Ditto.
- * libc/stdio/viscanf.c: Ditto.
- * libc/stdio/vsiprintf.c: Ditto.
- * libc/stdio/vsiscanf.c: Ditto.
- * libc/stdio/vsniprintf.c: Ditto.
-
-2004-11-19 Shaun Jackman <sjackman@gmail.com>
-
- * libc/include/stdio.h: Add sniprintf.
- * libc/stdio/Makefile.am: Add sniprintf.c.
- * libc/stdio/Makefile.in: Regenerated.
- * libc/stdio/sniprintf.c: New file.
- * libc/stdio/stdio.tex: Add sniprintf.
-
-2004-11-17 Christopher Faylor <cgf@timesys.com>
-
- * libc/stdio/refill.c (__srefill): Try again after EOF on Cygwin. Clear
- EOF flag if successful.
-
-2004-10-28 Christopher Faylor <cgf@timesys.com>
-
- * libc/include/sys/signal.h: Move <signal.h> include to bottom of file
- so that all relevant definitions have been performed for use in the
- include.
-
-2004-10-26 Jason Tishler <jason@tishler.net>
-
- * libc/stdio/fread.c (fread): Fix return value for unbuffered
- fread.
-
-2004-10-25 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
-
- * libc/include/machine/setjmp.h: Add AVR support.
- * libc/sys/rtems/crt0.S [__AVR__]: Add __stack.
-
-2004-10-08 Jeff Johnston <jjohnstn@redhat.com>
-
- * libc/include/sys/signal.h: If <signal.h> didn't include
- this header file, include <signal.h> to account for
- applications that take advantage that the two header
- files are the same in glibc.
-
-2004-10-05 Tomer Levi <Tomer.Levi@nsc.com>
-
- * configure.host: Add support for crx.
- * libc/include/machine/ieeefp.h: Ditto.
- * libc/include/machine/setjmp.h: Ditto.
- * libc/machine/crx/Makefile.am: New file.
- * libc/machine/crx/configure.in: Ditto.
- * libc/machine/crx/setjmp.S: Ditto.
- * libc/machine/crx/getenv.c: Ditto.
- * libc/machine/crx/aclocal.m4: Generate.
- * libc/machine/crx/configure: Ditto.
- * libc/machine/crx/Makefile.in: Ditto.
- * libc/machine/crx/sys/asm.h: New file.
- * libc/machine/crx/sys/libh.h: Ditto.
- * libc/machine/crx/sys/syscall.h: Ditto.
-
-2004-10-05 Jeff Johnston <jjohnstn@redhat.com>
-
- * Makefile.am (stmp-targ-include): Support sys header files
- from machine directories.
- * Makefile.in: Regenerated.
-
-2004-10-04 Jeff Johnston <jjohnstn@redhat.com>
-
- * libc/stdio/vfscanf.c (__svfscanf_r): For int conversions,
- count skipped zero characters as part of the nread count for %n.
- * libc/machine/powerpc/vfscanf.c: Ditto.
-
-2004-09-24 Jeff Johnston <jjohnstn@redhat.com>
-
- * libc/stdio/local.h: Include <stdlib.h>.
-
-2004-09-24 Corinna Vinschen <corinna@vinschen.de>
-
- * libc/stdio/fread.c (fread): Include <malloc.h>.
-
-2004-09-22 Jeff Johnston <jjohnstn@redhat.com>
-
- * libc/stdio/fread.c (fread): For non-space-optimized case,
- add special code for unbuffered files to use user buffer and
- only require one low-level system read.
-
-2004-09-21 Ian Lance Taylor <ian@wasabisystems.com>
-
- * libc/machine/xscale/setjmp.S: New file, copied from
- libc/machine/arm/setjmp.S.
- * libc/machine/xscale/Makefile.am (lib_a_SOURCES): Add setjmp.S.
- * libc/machine/xscale/Makefile.in: Regenerate.
-
-2004-09-16 Antony King <antony.king@st.com>
-
- * libc/include/sys/lock.h: Replaced empty {} with (0) to conform
- with locking API.
- * libc/include/sys/stdio.h: (_flockfile)[!_SINGLE_THREAD]: Add
- check for__SSTR in _flags and if set, skip lock request.
- (_funlockfile)[!SINGLE_THREAD]: Ditto.
- * libc/stdio/local.h (CHECK_INIT): Added check that _REENT is
- not NULL.
- * libc/stdio/siprintf.c (siprintf, _siprintf_r): Added missing
- initialisation of _file to -1 in local FILE.
- * libc/stdio/snprintf.c (snprintf, _snprintf_r): Ditto.
- * libc/stdio/sscanf.c (sscanf, _sscanf_r): Ditto.
- * libc/stdio/vsnprintf.c (vsnprintf, _vsnprintf_r): Ditto.
- * libc/stdio/vsscanf.c (_vsscanf_r): Ditto.
- * libc/stdio/sscanf.c (sscanf, _sscanf_r): Added __SSTR flag to
- _flags in local FILE to prevent locking.
- * libc/stdio/vsscanf.c (_vsscanf_r): Ditto.
-
-2004-09-16 Antony King <antony.king@st.com>
-
- * libc/stdio/fwalk.c (_fwalk): Remove check for _GLOBAL_REENT
- and only walk the reentrancy parameter.
- (_fwalk_reent): Ditto.
- * libc/stdlib/exit.c: Remove out of date _REENT_ONLY check.
-
-2004-09-16 Antony King <antony.king@st.com>
-
- * libc/stdio64/freopen64.c: Remove casting of fp lock to
- _LOCK_RECURSIVE_T.
-
-2004-09-16 Antony King <antony.king@st.com>
-
- * libc/time/tzlock.c: Add default stubs that use generic
- locking code.
-
-2004-09-16 Antony King <antony.king@st.com>
-
- * libc/ctype/ctype.tex: Added missing documentation.
- * libc/stdio/stdio.tex Ditto.
- * libc/stdlib/stdlib.tex Ditto.
- * libc/string/strings.tex Ditto.
- * libc/time/time.tex: Ditto.
- * libc/stdio/setbuffer.c: Removed setlinebuf documentation.
-
-2004-09-15 Corinna Vinschen <vinschen@redhat.com>
-
- * libc/reent/impure.c (reent_data): Define as alias to impure_data
- when building for Cygwin.
- * libc/include/sys/reent.h (_GLOBAL_REENT): Revert definition to
- _global_impure_ptr.
-
-2004-09-15 Jeff Johnston <jjohnstn@redhat.com>
-
- * configure.host: Reverting 2004-09-14 change as fix has occurred on
- Cygwin side.
- * configure.in: Ditto.
- * libc/configure.in: Ditto.
- * libc/sys/configure.in: Ditto.
- * configure: Ditto.
- * libc/configure: Ditto.
- * libc/sys/configure: Ditto.
- * libc/include/sys/reent.h: Ditto.
- * libc/stdlib/__atexit.c: Ditto.
- * libc/stdlib/__call_atexit.c: Ditto.
- * libc/stdlib/cxa_atexit.c: Ditto.
- * libc/stdlib/cxa_finalize.c: Ditto.
- * libc/sys/cygwin/Makefile.am: Removed again.
- * libc/sys/cygwin/Makefile.in: Ditto.
- * libc/sys/cygwin/aclocal.m4: Ditto.
- * libc/sys/cygwin/configure: Ditto.
- * libc/sys/cygwin/configure.in: Ditto.
- * libc/sys/cygwin/dummy.c: Ditto.
- * libc/sys/cygwin/sys/reent.h: Ditto.
-
-2004-09-14 Jeff Johnston <jjohnstn@redhat.com>
-
- * configure.host: Add Cygwin sys directory.
- * configure.in: Do not set CRT0 for cygwin.
- * libc/configure.in: Ditto.
- * libc/sys/configure.in: Ditto.
- * configure: Regenerated.
- * libc/configure: Ditto.
- * libc/sys/configure: Ditto.
- * libc/include/sys/reent.h: Add __REENT_HAS_CXA_SUPPORT flag.
- * libc/stdlib/__atexit.c: Keep cxa support protected by new
- __REENT_HAS_CXA_SUPPORT flag.
- * libc/stdlib/__call_atexit.c: Ditto.
- * libc/stdlib/cxa_atexit.c: Ditto.
- * libc/stdlib/cxa_finalize.c: Ditto.
- * libc/sys/cygwin/Makefile.am: New file.
- * libc/sys/cygwin/Makefile.in: Ditto.
- * libc/sys/cygwin/aclocal.m4: Ditto.
- * libc/sys/cygwin/configure: Ditto.
- * libc/sys/cygwin/configure.in: Ditto.
- * libc/sys/cygwin/dummy.c: Ditto.
- * libc/sys/cygwin/sys/reent.h: Ditto. This file is stabilized
- version of reent.h.
-
-2004-09-13 Artem B. Bityuckiy <dedekind@oktetlabs.ru>
-
- * libc/iconv/iconv.tex: Updated with new content.
- * libc/iconv/lib/iconvnls.c: Reference ICONV_DEFAULT_NLSPATH
- instead of NLS_DEFAULT_NLSPATH.
- * libc/iconv/lib/iconvnls.h: Fix typo.
- * libc/include/sys/iconvnls.h: New file.
-
-2004-09-09 Paul Brook <paul@codesourcery.com>
-
- * libc/include/sys/reent.h (struct _on_exit_args): Add _dso_handle
- and _is_cxa.
- (struct _atexit): Add _next when _REENT_SMALL.
- (struct _reent): Add _atexit0 when _REENT_SMALL.
- (_REENT_INIT_PTR): Adjust.
- * libc/stdlib/Makefile.am (GENERAL_SOURCES): Add __atexit.c and
- __call_exit.c.
- (EXTENDED_SOURCES): Add cxa_atexit.c and cxa_finalize.c.
- * libc/stdlib/Makefile.in: Regenerate.
- * libc/stdlib/__atexit.c: New file.
- * libc/stdlib/__call_atexit.c: New file.
- * libc/stdlib/atexit.h: Remove old definitions. Add new.
- * libc/stdlib/atexit.c (atexit): Use __register_exitproc.
- * libc/stdlib/cxa_atexit.c: New file.
- * libc/stdlib/cxa_finalize.c: New file.
- * libc/stdlib/exit.c (exit): Use __call_exitprocs.
- * libc/stdlib/on_exit.c (on_exit): Use __register_exitproc.
- 2004-09-09 Jeff Johnston <jjohnstn@redhat.com>
- * libc/reent/reent.c [_REENT_SMALL]: Fix reference to
- _on_exit_args_ptr.
-
-2004-08-23 Jeff Johnston <jjohnstn@redhat.com>
-
- * libc/include/sys/unistd.h (getpass): Change prototype to use
- const instead of __const.
-
-2004-08-16 Nathan Sidwell <nathan@codesourcery.com>
-
- * libc/stdio/vfscanf.c (_NO_LONGLONG): Move out of FLOATING_POINT
- #if.
-
-2004-08-12 Jeff Johnston <jjohnstn@redhat.com>
-
- * libc/sys/linux/sys/types.h (u64): New typedef to allow building
- on linux systems with glibc 2.3.3 installed.
- * libc/sys/linux/dl/dl-runtime.c: Fix prototypes for fixup and
- profile_fixup so newlib can build on fc3 system.
-
-2004-07-30 Alexandre Oliva <aoliva@redhat.com>
-
- Introduce SH2a support.
- 2004-03-16 Corinna Vinschen <vinschen@redhat.com>
- * libc/include/machine/ieeefp.h: Define _DOUBLE_IS_32BITS for
- __SH2A_SINGLE_ONLY__, too.
- * libc/machine/sh/asm.h: Define DELAYED_BRANCHES for __SH2A__, too.
- 2004-02-24 Corinna Vinschen <vinschen@redhat.com>
- * libc/sys/sh/crt0.S (start_l): Support sh2a-nofpu. Fix comments.
- 2004-02-10 DJ Delorie <dj@redhat.com>
- * libc/sys/sh/crt0.S (start_l): Support sh2a.
-
-2004-07-29 Jeff Johnston <jjohnstn@redhat.com>
-
- * libc/time/strptime.c: Correct full-name of "March" typo.
-
-2004-07-16 Anil Paranjpe <anilp1@kpitcummins.com>
-
- * configure.host (h8300*-*-*): Default long long printing support.
-
-2004-07-16 Jeff Johnston <jjohnstn@redhat.com>
-
- * libc/stdio/fvwrite.c (_sfvwrite): For asprintf family
- calls, if realloc fails, free up buffer as it is no longer
- used.
-
-2004-07-07 Artem B. Bityuckiy <dedekind@oktetlabs.ru>
-
- * libc/iconv/iconv.tex: Updated to represent recent changes.
- * libc/iconv/lib/iconv.c: Documentation updated.
-
-2004-07-07 Nick Clifton <nickc@redhat.com>
-
- * configure.host (newlib_cflags): Define PREFER_SIZE_OVER_SPEED
- for xStormy16.
-
-2004-07-06 Chris Demetriou <cgd@broadcom.com>
-
- * configure.host (mips*-*-elf*): Default long long printing
- support.
-
-2004-07-05 Jeff Johnston <jjohnstn@redhat.com>
-
- * libc/Makefile.am (libc.dvi): Add target and specify
- same dependencies as libc.info.
- * libc/Makefile.in: Regenerated.
- * libm/Makefile.am (libm.dvi): Add target and specify
- same dependencies as libm.info.
- * libm/Makefile.in: Regenerated.
-
-2004-06-29 Artem B. Bityuckiy <dedekind@oktetlabs.ru>
-
- * acinclude.m4: Move --enable-newlib-iconv option back here.
- * configure.in: Remove --enable-newlib-iconv option. Don't
- tie iconv support to --enable-newlib-mb.
- * aclocal.m4: Regenerated.
- * configure: Ditto.
- * doc/aclocal.m4, doc/configure: Ditto.
- * iconvdata/aclocal.m4, iconvdata/configure: Ditto.
- * libm/*/aclocal.m4: Ditto.
- * libm/*/configure: Ditto.
- * libc/*/aclocal.m4: Ditto.
- * libc/*/configure: Ditto.
-
-2004-06-25 Artem B. Bityuckiy <dedekind@oktetlabs.ru>
-
- * acinclude.m4: Move iconv options into configure.in.
- * aclocal.m4: Regenerated.
- * configure: Ditto.
- * configure.in: Add iconv options.
- * newlib.hin: Add new iconv encodings and remove deleted ones.
- * doc/aclocal.m4: Regenerated.
- * doc/configure: Ditto.
- * iconvdata/aclocal.m4: Ditto.
- * iconvdata/configure: Ditto.
- * libc/iconv: Design change. New size-optimized ccs format.
- * libc/iconv/AUTHORS: Removed.
- * libc/iconv/COPYING: Ditto.
- * libc/iconv/README.ORIGINAL: Ditto.
- * libc/iconv/README.TODO: Ditto.
- * libc/iconv/charset.aliases: Ditto.
- * libc/iconv/encoding.aliases: New file.
- * libc/iconv/Makefile.am: Updated.
- * libc/iconv/Makefile.in: Regenerated.
- * libc/iconv/iconv.tex: Updated.
- * libc/iconv/ccs/Makefile.am: Ditto.
- * libc/iconv/ccs/Makefile.in: Regenerated.
- * libc/iconv/ccs/big5.c: Updated.
- * libc/iconv/ccs/cns11643_plane1.c: Ditto.
- * libc/iconv/ccs/cns11643_plane14.c: Ditto.
- * libc/iconv/ccs/cns11643_plane2.c: Ditto.
- * libc/iconv/ccs/cp775.c: Ditto.
- * libc/iconv/ccs/cp850.c: Ditto.
- * libc/iconv/ccs/cp852.c: Ditto.
- * libc/iconv/ccs/cp855.c: Ditto.
- * libc/iconv/ccs/cp866.c: Ditto.
- * libc/iconv/ccs/iso_8859_1.c: Ditto.
- * libc/iconv/ccs/README.CCS.SOURCES: Removed.
- * libc/iconv/ccs/gb_2312_80.c: Ditto.
- * libc/iconv/ccs/iconv_mktbl: Ditto.
- * libc/iconv/ccs/jis_x0201.c: Ditto.
- * libc/iconv/ccs/jis_x0208_1983.c: Ditto.
- * libc/iconv/ccs/shift_jis.c: Ditto.
- * libc/iconv/ccs/us_ascii.c: Ditto.
- * libc/iconv/ccs/ccs.h: New file.
- * libc/iconv/ccs/ccsbi.c: Ditto.
- * libc/iconv/ccs/ccsbi.h: Ditto.
- * libc/iconv/ccs/ccsnames.h: Ditto.
- * libc/iconv/ccs/iso_8859_10.c: Ditto.
- * libc/iconv/ccs/iso_8859_11.c: Ditto.
- * libc/iconv/ccs/iso_8859_13.c: Ditto.
- * libc/iconv/ccs/iso_8859_14.c: Ditto.
- * libc/iconv/ccs/iso_8859_3.c: Ditto.
- * libc/iconv/ccs/iso_8859_6.c: Ditto.
- * libc/iconv/ccs/iso_8859_7.c: Ditto.
- * libc/iconv/ccs/iso_8859_8.c: Ditto.
- * libc/iconv/ccs/iso_8859_9.c: Ditto.
- * libc/iconv/ccs/iso_ir_111.c: Ditto.
- * libc/iconv/ccs/jis_x0201_1976.c: Ditto.
- * libc/iconv/ccs/jis_x0208_1990.c: Ditto.
- * libc/iconv/ccs/koi8_ru.c: Ditto.
- * libc/iconv/ccs/koi8_uni.c: Ditto.
- * libc/iconv/ccs/mktbl.pl: Ditto.
- * libc/iconv/ccs/win_1250.c: Ditto.
- * libc/iconv/ccs/win_1251.c: Ditto.
- * libc/iconv/ccs/win_1252.c: Ditto.
- * libc/iconv/ccs/win_1253.c: Ditto.
- * libc/iconv/ccs/win_1254.c: Ditto.
- * libc/iconv/ccs/win_1255.c: Ditto.
- * libc/iconv/ccs/win_1256.c: Ditto.
- * libc/iconv/ccs/win_1257.c: Ditto.
- * libc/iconv/ccs/win_1258.c: Ditto.
- * libc/iconv/ccs/iso_8859_15.c: Updated.
- * libc/iconv/ccs/iso_8859_2.c: Ditto.
- * libc/iconv/ccs/iso_8859_4.c: Ditto.
- * libc/iconv/ccs/iso_8859_5.c: Ditto.
- * libc/iconv/ccs/jis_x0212_1990.c: Ditto.
- * libc/iconv/ccs/koi8_r.c: Ditto.
- * libc/iconv/ccs/koi8_u.c: Ditto.
- * libc/iconv/ccs/ksx1001.c: Ditto.
- * libc/iconv/ccs/binary/gb_2312_80.cct: Removed.
- * libc/iconv/ccs/binary/jis_x0201.cct: Ditto.
- * libc/iconv/ccs/binary/shift_jis.cct: Ditto.
- * libc/iconv/ccs/binary/us_ascii.cct: Ditto.
- * libc/iconv/ccs/binary/jis_x0208_1983.cct: Ditto.
- * libc/iconv/ccs/binary/Makefile.am: Updated.
- * libc/iconv/ccs/binary/Makefile.in: Regenerated.
- * libc/iconv/ccs/binary/big5.cct: Updated.
- * libc/iconv/ccs/binary/cns11643_plane1.cct: Ditto.
- * libc/iconv/ccs/binary/cns11643_plane14.cct: Ditto.
- * libc/iconv/ccs/binary/cns11643_plane2.cct: Ditto.
- * libc/iconv/ccs/binary/cp775.cct: Updated.: Ditto.
- * libc/iconv/ccs/binary/cp850.cct: Ditto.: Ditto.
- * libc/iconv/ccs/binary/cp852.cct: Ditto.: Ditto.
- * libc/iconv/ccs/binary/cp855.cct: Ditto.: Ditto.
- * libc/iconv/ccs/binary/cp866.cct: Ditto.: Ditto.
- * libc/iconv/ccs/binary/iso_8859_1.cct: Ditto.
- * libc/iconv/ccs/binary/iso_8859_15.cct: Ditto.
- * libc/iconv/ccs/binary/iso_8859_4.cct: Ditto.
- * libc/iconv/ccs/binary/iso_8859_5.cct: Ditto.
- * libc/iconv/ccs/binary/iso_8859_2.cct: Ditto.
- * libc/iconv/ccs/binary/jis_x0212_1990.cct: Ditto.
- * libc/iconv/ccs/binary/koi8_r.cct: Ditto.
- * libc/iconv/ccs/binary/koi8_u.cct: Ditto.
- * libc/iconv/ccs/binary/ksx1001.cct: Ditto.
- * libc/iconv/ccs/binary/iso_8859_10.cct: New file.
- * libc/iconv/ccs/binary/iso_8859_11.cct: Ditto.
- * libc/iconv/ccs/binary/iso_8859_13.cct: Ditto.
- * libc/iconv/ccs/binary/iso_8859_14.cct: Ditto.
- * libc/iconv/ccs/binary/iso_8859_3.cct: Ditto.
- * libc/iconv/ccs/binary/iso_8859_6.cct: Ditto.
- * libc/iconv/ccs/binary/iso_8859_7.cct: Ditto.
- * libc/iconv/ccs/binary/iso_8859_8.cct: Ditto.
- * libc/iconv/ccs/binary/iso_8859_9.cct: Ditto.
- * libc/iconv/ccs/binary/iso_ir_111.cct: Ditto.
- * libc/iconv/ccs/binary/jis_x0201_1976.cct: Ditto.
- * libc/iconv/ccs/binary/jis_x0208_1990.cct: Ditto.
- * libc/iconv/ccs/binary/koi8_ru.cct: Ditto.
- * libc/iconv/ccs/binary/koi8_uni.cct: Ditto.
- * libc/iconv/ccs/binary/win_1250.cct: Ditto.
- * libc/iconv/ccs/binary/win_1251.cct: Ditto.
- * libc/iconv/ccs/binary/win_1252.cct: Ditto.
- * libc/iconv/ccs/binary/win_1253.cct: Ditto.
- * libc/iconv/ccs/binary/win_1254.cct: Ditto.
- * libc/iconv/ccs/binary/win_1255.cct: Ditto.
- * libc/iconv/ccs/binary/win_1256.cct: Ditto.
- * libc/iconv/ccs/binary/win_1257.cct: Ditto.
- * libc/iconv/ccs/binary/win_1258.cct: Ditto.
- * libc/iconv/ces/Makefile.am: Updated.
- * libc/iconv/ces/Makefile.in: Regenerated.
- * libc/iconv/ces/ucs-2-internal.c: Updated.
- * libc/iconv/ces/ucs-4-internal.c: Ditto.
- * libc/iconv/ces/utf-16.c: Ditto.
- * libc/iconv/ces/utf-8.c: Ditto.
- * libc/iconv/ces/cesbi.c: New file.
- * libc/iconv/ces/cesbi.h: Ditto.
- * libc/iconv/ces/cesdeps.h: Ditto.
- * libc/iconv/ces/euc.c: Ditto.
- * libc/iconv/ces/mkdeps.pl: Ditto.
- * libc/iconv/ces/table-pcs.c: Ditto.
- * libc/iconv/ces/table.c: Ditto.
- * libc/iconv/ces/ucs-2.c: Ditto.
- * libc/iconv/ces/ucs-4.c: Ditto.
- * libc/iconv/ces/us-ascii.c: Ditto.
- * libc/iconv/ces/euc-jp.c: Removed.
- * libc/iconv/ces/euc-kr.c: Ditto.
- * libc/iconv/ces/euc-tw.c: Ditto.
- * libc/iconv/ces/gb2312.c: Ditto.
- * libc/iconv/ces/iso-10646-ucs-2.: Ditto.c
- * libc/iconv/ces/iso-10646-ucs-4.c: Ditto.
- * libc/iconv/lib/Makefile.am: Updated.
- * libc/iconv/lib/Makefile.in: Regenerated.
- * libc/iconv/lib/endian.h: Updated.
- * libc/iconv/lib/iconv.c: Ditto.
- * libc/iconv/lib/local.h: Ditto.
- * libc/iconv/lib/aliases.c: Removed.
- * libc/iconv/lib/bialiasesi.c: Ditto.
- * libc/iconv/lib/biccs.c: Ditto.
- * libc/iconv/lib/bices.c: Ditto.
- * libc/iconv/lib/ccs.c: Ditto.
- * libc/iconv/lib/ces.c: Ditto.
- * libc/iconv/lib/ces_euc.c: Ditto.
- * libc/iconv/lib/ces_iso2022.c: Ditto.
- * libc/iconv/lib/ces_table.c: Ditto.
- * libc/iconv/lib/converter.c: Ditto.
- * libc/iconv/lib/deps.h: Ditto.
- * libc/iconv/lib/loaddata.c: Ditto.
- * libc/iconv/lib/aliasesbi.c: New file.
- * libc/iconv/lib/aliasesi.c: Ditto.
- * libc/iconv/lib/conv.h: Ditto.
- * libc/iconv/lib/encnames.h: Ditto.
- * libc/iconv/lib/encoding.deps: Ditto.
- * libc/iconv/lib/iconvnls.c: Ditto.
- * libc/iconv/lib/iconvnls.h: Ditto.
- * libc/iconv/lib/nullconv.c: Ditto.
- * libc/iconv/lib/ucsconv.c: Ditto.
- * libc/iconv/lib/ucsconv.h: Ditto.
- * libc/include/iconv.h: Update copyright.
- * libc/*/aclocal.m4: Regenerated.
- * libc/*/configure: Ditto.
- * libm/*/aclocal.m4: Ditto.
- * libm/*/configure: Ditto.
-
-2004-06-22 Alexandre Oliva <aoliva@redhat.com>
-
- * libc/include/machine/setjmp.h [__H8300__] (_JBTYPE): Define,
- instead of typedefing jmp_buf.
-
- 2003-07-02 Richard Sandiford <rsandifo@redhat.com>
- * libc/machine/h8300/Makefile.am (lib_a_SOURCES): Add h8sx_strcpy.S.
- * libc/machine/h8300/defines.h (LEN): New macro.
- * libc/machine/h8300/memcpy.S: Add h8sx version.
- * libc/machine/h8300/memset.S: Likewise.
- * libc/machine/h8300/strcmp.S: Likewise.
- * libc/machine/h8300/setjmp.S: Use h8sx move instructions.
- * libc/machine/h8300/h8sx_strcpy.S: New file.
- 2003-06-30 Richard Sandiford <rsandifo@redhat.com>
- * libc/include/machine/ieeefp.h: Extend __H8300S__ handling to
- __H8300SX__.
- * libc/include/machine/setjmp.h: Likewise.
- * libc/include/sys/config.h: Likewise.
- * libc/machine/h8300/defines.h: Likewise.
- * libc/machine/h8300/setjmp.S: Likewise.
- * libc/machine/h8300/strcmp.S: Likewise.
- * libc/sys/h8300hms/close.S: Likewise.
- * libc/sys/h8300hms/fstat.S: Likewise.
- * libc/sys/h8300hms/lseek.S: Likewise.
- * libc/sys/h8300hms/read.S: Likewise.
- * libc/sys/h8300hms/write.S: Likewise.
- * libc/sys/h8300hms/crt0.S: Likewise.
- * libc/machine/h8300/setarch.h: Use .h8300sx or .h8300sxn if
- __H8300SX__ is defined.
- * libc/sys/h8300hms/setarch.h: Likewise.
-
-2004-06-17 Jeff Johnston <jjohnstn@redhat.com>
-
- * libc/include/sys/reent.h (_GLOBAL_REENT): Back
- out change which set _GLOBAL_REENT to _global_impure_ptr until
- we understand why Cygwin breaks because of it.
-
-2004-06-14 Jeff Johnston <jjohnstn@redhat.com>
-
- * libc/sys/linux/machine/i386/syscall.h: For now, set up
- __syscall_return macro for systems with vsyscall.
-
-2004-06-11 Antony King <antony.king@st.com>
-
- * libc/include/sys/_types.h: Include <sys/lock.h> and change
- _flock_t to be of type _LOCK_RECURSIVE_T.
- * libc/include/sys/reent.h: (_REENT_INIT): Reformat.
- (_REENT_INIT_PTR): Ditto. Use memset where appropriate.
- (_global_impure_ptr): New declaration.
- (_GLOBAL_REENT): Change to be _global_impure_ptr.
- * libc/include/sys/stdio.h: Include <sys/lock.h> and
- <sys/reent.h>.
- (_flockfile)[!_SINGLE_THREAD]: Add code for lock call.
- (_funlockfile)[!SINGLE_THREAD]: Ditto.
- * libc/reent/impure.c: Set _global_impure_ptr to _impure_ptr.
- * libc/stdio/fclose.c: Remove casting of fp lock to
- _LOCK_RECURSIVE_T.
- * libc/stdio/findfp.c: Ditto.
- * libc/stdio/fopen.c: Ditto.
- * libc/stdio/freopen.c: Ditto.
- * libc/stdio/vfprintf.c: Ditto.
- * libc/stdio64/fopen64.c: Ditto.
- * libc/stdlib/envlock.c: Add default stubs that use generic
- locking code.
- * libc/stdlib/mlock.c: Ditto.
-
- Jeff Johnston <jjohnstn@redhat.com>
- * libc/sys/linux/sys/_types.h (__flock_mutex_t): New subtype.
- (_flock_t): Change to be a struct containing a single member
- named mutex which is of type __flock_mutex_t.
-
-2004-06-09 Jeff Johnston <jjohnstn@redhat.com>
-
- * libc/sys/linux/Makefile.am: Change siglist.inc to be generated
- from /usr/include/asm/signal.h instead of kernel sources. Also
- default max to 32 if not found in header file.
- * libc/sys/linux/Makefile.in: Regenerated.
- * libc/sys/linux/machine/i386/socketcall.h: Fix for Fedora Core 2
- systems where __syscall_return is not defined.
- * libc/sys/linux/machine/i386/syscall.h: Change for Fedora Core 2
- systems to use syscall() function instead of assembler interrupt.
-
-2004-06-09 Toralf Lund <toralf@procaptura.com>
-
- * libc/sys/arm/setjmp.S, libc/sys/arm/access.c: Move
- files from libc/sys/arm to libc/machine/arm.
- * libc/machine/arm/Makefile.am, libc/machine/arm/Makefile.in: Add
- library build support for files moved from libc/sys/arm.
- * libc/sys/arm/Makefile.am, libc/sys/arm/Makefile.in: Remove
- references to access and setjmp.
- * configure.host: Add checks for newlib_may_supply_syscalls to
- determine whether or not to use sys/arm directory and use
- special compiler flags: ARM_RDI_MONITOR and ARM_RDP_MONITOR.
-
-2004-06-02 Jeff Johnston <jjohnstn@redhat.com>
-
- * libc/stdio/vfscanf.c (__svfscanf_r): For CT_INT conversions,
- reset digit flags appropriately after we have discovered "0x".
- * libc/machine/powerpc/vfscanf.c (__svfscanf_r): Ditto.
-
-2004-05-27 Jeff Johnston <jjohnstn@redhat.com>
-
- * libc/stdio/vfprintf.c (_VFPRINTF): Move file locking
- from here ...
- (_VFPRINTF_R): ... to here so all I/O printf routines
- are covered.
-
-2004-05-26 Jeff Johnston <jjohnstn@redhat.com>
-
- * libc/search/hash_buf.c: Protect MAX and MIN macros from
- redefinition.
- * libc/search/hash.c: Ditto.
-
-2004-05-25 Artem B. Bityuckiy <abitytsky@softminecorp.com>
-
- * newlib.hin: (_WANT_IO_POS_ARGS): New define.
- (_WANT_IO_LONG_LONG): Ditto.
- (_WANT_IO_LONG_DOUBLE): Ditto.
- * configure.in: Add new configuration options
- --enable-newlib-io-long-long and --enable-newlib-io-long-double
- which tie to new defines in newlib.hin.
- * configure: Regenerated.
- * configure.host: Add checks for new configuration options. Also
- fix up check for --enable-newlib-io-pos-args so configuration
- option will override any default for a given platform.
- Remove defining compiler flags for the _WANT_IO* options.
- * libc/stdio/vfprintf.c: Change to use new newlib.hin defines
- instead of looking for old compiler flags.
- * libc/stdio/vfscanf.c: Ditto.
- * libc/stdio/vfieeefp.h: Ditto.
- * libc/machine/powerpc/vfprintf.c: Ditto.
- * libc/machine/powerpc/vfscanf.c: Ditto.
-
-2004-05-25 Jeff Johnston <jjohnstn@redhat.com>
-
- * testsuite/include/check.h: Add include of <stdio.h>.
-
-2004-05-17 Corinna Vinschen <corinna@vinschen.de>
-
- * libc/include/grp.h: Declare getgrnam_r and getgrgid_r also on Cygwin.
-
-2004-05-11 Artem B. Bityuckiy <abitytsky@softminecorp.com>
-
- * libc/stdio/vfprintf.c (VFPRINTF_R): Use _free_r instead
- of free.
-
-2004-05-07 Artem B. Bityuckiy <abitytsky@softminecorp.com>
-
- * libc/stdio/iprintf.c (_iprintf_r): Fix old-style argument
- list for reentrant pointer. Call _vfiprintf_r.
- * libc/stdio/siprintf.c (_siprintf_r): New function.
- * libc/stdio/vfprintf.c (__sbprintf): Add reetrant struct
- pointer argument. Change all callers. Call _VFPRINTF_R.
- * libc/include/stdio.h (_siprintf_r, _vfiprintf_r): New
- prototypes.
-
-2004-05-07 Jeff Johnston <jjohnstn@redhat.com>
-
- * libc/include/sys/param.h: Remove endian info and include
- <machine/endian.h> instead.
- * libc/include/machine/endian.h: New file.
- * libc/include/machine/param.h: Ditto.
- * libc/machine/arm/machine/endian.h: Ditto.
- * libc/machine/arm/machine/param.h: Ditto.
- * libc/sys/arm/sys/param.h: Removed.
- * libc/sys/sysvi386/sys/param.h: Ditto.
- * libc/sys/rtems/sys/param.h: Modified to include <machine/endian.h>.
-
-2004-05-03 Artem B. Bityuckiy <abitytsky@softminecorp.com>
-
- * libc/stdio/vfprintf.c (_VFPRINTF_R): Set error flag when
- multibyte functions return failure for %C, %S, %lc, and %ls
- format specifiers.
-
-2004-05-03 Artem B. Bityuckiy <abitytsky@softminecorp.com>
-
- * testsuite/include/check.h (CHECK): Add flush of stdout.
-
-2004-05-03 Artem B. Bityuckiy <abitytsky@softminecorp.com>
-
- * libc/include/stdio.h (_ungetc_r): New prototype.
- * libc/stdio/ungetc.c (_ungetc_r): New reentrant function.
- (__submore): Add reentrant struct pointer argument.
- (ungetc): Change to call _ungetc_r.
-
-2004-04-28 Artem B. Bityuckiy <abitytsky@softminecorp.com>
-
- * libc/stdio/local.h (_fwalk_reent): Specify prototype of
- function pointer argument.
- * libc/stdio/fwalk.c (_fwalk, _fwalk_reent): Change prototypes
- to specify function pointer arguments.
- (__fwalk, __fwalk_reent): Ditto.
-
-2004-04-26 Aldy Hernandez <aldyh@redhat.com>
-
- * libc/machine/powerpc/vfscanf.c (__svfscanf_r): Fix typo in
- CT_INT case.
-
-2004-04-23 Artem B. Bityuckiy <abitytsky@softminecorp.com>
-
- * configure.in: Define _MB_CAPABLE if mb supported.
- * configure: Regenerated.
- * configure.host: Remove manual setting of MB_CAPABLE compiler
- flag.
- * newlib.hin: Add _MB_CAPABLE flag.
- * libc/ctype/iswalpha.c, libc/ctype/iswblank.c: Include <newlib.h>
- and check for _MB_CAPABLE flag instead of MB_CAPABLE.
- * libc/ctype/iswcntrl.c, libc/ctype/iswprint.c: Ditto.
- * libc/ctype/iswpunct.c, libc/ctype/iswspace.c: Ditto.
- * libc/ctype/jp2uc.c: Ditto.
- * libc/ctype/towlower.c, libc/ctype/towupper.c: Ditto.
- * libc/locale/locale.c: Ditto
- * libc/machine/powerpc/vfscanf.c: Ditto
- * libc/stdio/vfprintf.c, libc/stdio/vfscanf.c: Ditto
- * libc/stdlib/mblen.c: Ditto
- * libc/stdlib/mblen_r.c, libc/stdlib/mbrlen.c: Ditto
- * libc/stdlib/mbrtowc.c, libc/stdlib/mbsrtowcs.c: Ditto
- * libc/stdlib/mbstowcs.c, libc/stdlib/mbtowc.c: Ditto
- * libc/stdlib/mbtowc_r.c, libc/stdlib/wcrtomb.c: Ditto
- * libc/stdlib/wcsrtombs.c, libc/stdlib/wcstombs.c: Ditto
- * libc/stdlib/wctomb.c, libc/sys/linux/intl/dcigettext.c: Ditto
- * libc/sys/linux/intl/explodename.c: Ditto
- * libc/sys/linux/intl/finddomain.c: Ditto
- * libc/sys/linux/intl/l10nflist.c: Ditto
- * libc/sys/linux/intl/loadmsgcat.c: Ditto
- * libc/sys/linux/intl/localealias.c: Ditto
-
-2004-04-23 Jeff Johnston <jjohnstn@redhat.com>
-
- * libc/machine/powerpc/vfscanf.c (NNZDIGITS): New define.
- (__svfscanf_r): In integer conversions, leave out leading zeroes
- which are not part of a base prefix.
- Keep track of width truncation to fit into buf, not counting left-out
- zeroes against width till the truncation has been compensated for.
- This is based on Joern's patch of 04/21 for libc/stdio/vfscanf.c.
-
-2004-04-23 Jeff Johnston <jjohnstn@redhat.com>
-
- * libc/include/stdio.h: (_ftell_r, _fseek_r): New prototypes.
-
-2004-04-23 Artem B. Bityuckiy <abitytsky@softminecorp.com>
-
- * libc/stdio/asprintf.c libc/stdio/clearerr.c,
- libc/stdio/fclose.c libc/stdio/fcloseall.c libc/stdio/fdopen.c,
- libc/stdio/feof.c libc/stdio/ferror.c libc/stdio/fflush.c,
- libc/stdio/fgetc.c libc/stdio/fgetpos.c libc/stdio/fgets.c,
- libc/stdio/fileno.c libc/stdio/findfp.c libc/stdio/fiprintf.c,
- libc/stdio/flags.c libc/stdio/fopen.c libc/stdio/fprintf.c,
- libc/stdio/fputc.c libc/stdio/fputs.c libc/stdio/fread.c,
- libc/stdio/freopen.c libc/stdio/fscanf.c libc/stdio/fseek.c,
- libc/stdio/fseeko.c libc/stdio/fsetpos.c libc/stdio/ftell.c,
- libc/stdio/ftello.c libc/stdio/fvwrite.c libc/stdio/fwalk.c,
- libc/stdio/fwrite.c libc/stdio/getc.c libc/stdio/getc_u.c,
- libc/stdio/getchar.c libc/stdio/getchar_u.c,
- libc/stdio/getdelim.c libc/stdio/getline.c libc/stdio/gets.c,
- libc/stdio/getw.c libc/stdio/iprintf.c libc/stdio/local.h,
- libc/stdio/makebuf.c libc/stdio/mktemp.c libc/stdio/perror.c,
- libc/stdio/printf.c libc/stdio/putc.c libc/stdio/putc_u.c,
- libc/stdio/putchar.c libc/stdio/putchar_u.c libc/stdio/puts.c,
- libc/stdio/putw.c libc/stdio/refill.c libc/stdio/remove.c,
- libc/stdio/rename.c libc/stdio/rewind.c libc/stdio/rget.c,
- libc/stdio/scanf.c libc/stdio/setbuf.c libc/stdio/setbuffer.c,
- libc/stdio/setlinebuf.c libc/stdio/setvbuf.c,
- libc/stdio/siprintf.c libc/stdio/snprintf.c,
- libc/stdio/sprintf.c libc/stdio/sscanf.c libc/stdio/stdio.c,
- libc/stdio/tmpfile.c libc/stdio/tmpnam.c libc/stdio/ungetc.c,
- libc/stdio/vasprintf.c libc/stdio/vfieeefp.h,
- libc/stdio/vfprintf.c libc/stdio/vfscanf.c,
- libc/stdio/vprintf.c libc/stdio/vscanf.c,
- libc/stdio/vsnprintf.c libc/stdio/vsprintf.c,
- libc/stdio/vsscanf.c libc/stdio/wbuf.c,
- libc/stdio/wsetup.c: Perform minor formatting changes. Move
- copyright notices to top of file, ensure that <_ansi.h> is
- included, be consistent with open parentheses, use _DEFUN macro,
- include "local.h" where needed, and remove various compiler
- warnings.
-
-2004-04-21 J"orn Rennecke <joern.rennecke@superh.com>
-
- * libc/stdio/vfscanf.c (NNZDIGITS): New define.
- (__svfscanf_r): In integer conversions, leave out leading zeroes
- which are not part of a base prefix.
- Keep track of width truncation to fit into buf, not counting left-out
- zeroes against width till the truncation has been compensated for.
-
-2004-04-20 Corinna Vinschen <corinna@vinschen.de>
-
- * libc/include/sys/unistd.h (ttyname_r): Add missing comma.
-
-2004-04-20 Corinna Vinschen <corinna@vinschen.de>
-
- * libc/include/sys/unistd.h (ttyname_r): Add declaration for Cygwin.
-
-2004-04-10 Corinna Vinschen <corinna@vinschen.de>
-
- * libc/include/sys/unistd.h (sync): Define void on Cygwin according
- to SUSv3.
-
-2004-04-08 Artem B. Bityuckiy <abitytsky@softminecorp.com>
-
- * libc/stdio/fclose.c (_fclose_r): New function.
- * libc/stdio/freopen.c (_freopen_r): Call _fclose_r.
- * libc/stdio/fcloseall.c (_fcloseall_r): Call _fwalk_reent.
- * libc/stdio64/freopen64.c (_freopen64_r): Use _fclose_r.
- * libc/include/stdio.h (_fclose_r): New prototype.
- * libc/stdio/fopen.c: Fix typo in comment.
-
-2004-04-08 Jeff Johnston <jjohnstn@redhat.com>
-
- * libc/stdio/fwalk.c (_fwalk_reent): New version of _fwalk
- to handle _r reentrant functions.
-
-2004-04-08 Eric Christopher <echristo@redhat.com>
-
- * libc/include/machine/setjmp.h: Fix endif locations.
-
-2004-04-01 Artem B. Bityuckiy <abitytsky@softminecorp.com>
-
- * libc/time/strptime.c: Add standard includes to avoid
- warning messages at compilation time.
-
-2004-04-01 Jeff Johnston <jjohnstn@redhat.com>
-
- * libc/stdio/vfscanf.c (__svfscanf_r): Add locking/unlocking
- of file.
-
-2004-03-30 Jeff Johnston <jjohnstn@redhat.com>
-
- * libc/machine/h8300/Makefile.am: Reformat slightly.
- * libc/machine/h8300/Makefile.in: Regenerate.
-
-2004-03-30 Thomas Pfaff <tpfaff@gmx.net>
-
- * libc/stdio/findfp.c (__fp_lock_all): Add call to
- __sfp_lock_acquire.
- (__fp_unlock_all): Add call to __sfp_lock_release.
-
-2004-03-25 Thomas Pfaff <tpfaff@gmx.net>
-
- * libc/stdio/fclose.c (fclose): Protect file pointer list when
- releasing a file.
- * libc/stdio/fcloseall.c (_fcloseall_r): Close all files via
- fwalk.
- * libc/stdio/fdopen.c (_fdopen_r): Add calls to
- _flockfile/_funlockfile.
- * libc/stdio/findfp.c: Move __sfp_lock. Change __sfp_lock type
- to recursive.
- Change __lock_acquire/__lock_release calls for __sfp_lock to
- __sfp_lock_acquire/__sfp_lock_release throughout.
- (std): Make sure that file lock is only initialized once.
- (__sfp): Move _file initialization. Initialize file lock.
- (__sfp_lock_acquire): New function.
- (__sfp_lock_release): Ditto.
- (__fp_lock_all): Remove __sfp_lock_acquire call.
- (__fp_unlock_all): Remove __sfp_lock_release call.
- * libc/stdio/fopen.c (_fopen_r): Protect file pointer list.
- Add calls to _flockfile/_funlockfile. Remove
- __lock_init_recursive call.
- * libc/stdio/freopen.c (_freopen_r): Protect file pointer list.
- * libc/stdio/fwalk.c (__fwalk): New static function.
- (_fwalk): Protect file pointer list. Use __fwalk to walk through
- file pointers.
- * libc/stdio/local.h: Add defines for
- __sfp_lock_acquire/__sfp_lock_release when
- single threaded. Add function prototypes otherwise.
- * libc/stdio64/fdopen64.c (_fdopen64_r): Add calls to
- _flockfile/_funlockfile.
- * libc/stdio/fopen64.c (_fopen64_r): Protect file pointer list.
- Add calls to _flockfile/_funlockfile. Remove
- __lock_init_recursive call.
- * libc/stdio/freopen64.c (_freopen64_r): Protect file pointer
- list.
-
-2004-03-25 Jeff Johnston <jjohnstn@redhat.com>
-
- * libc/sys/linux/sys/lock.h: Turn on __USE_GNU flag if not already
- defined. Change __LOCK_RECURSIVE_INIT to be __LOCK_INIT_RECURSIVE.
- * libc/sys/linux/dl/dl-support.c: Change __LOCK_RECURSIVE_INIT
- to be __LOCK_INIT_RECURSIVE.
-
-2004-03-11 Kazu Hirata <kazu@cs.umass.edu>
-
- * libc/sys/h8300hms/Makefile.am (lib_a_SOURCES): Replace
- _exit.c with _exit.S.
- * libc/sys/h8300hms/Makefile.in: Regenerate.
- * libc/sys/h8300hms/_exit.c: Remove.
- * libc/sys/h8300hms/_exit.S: New.
-
-2004-03-09 Thomas Pfaff <tpfaff@gmx.net>
-
- * libc/stdio/findfp.c (__sfp): Rename lock to __sfp_lock.
- Change __sfp_lock to static global.
- (__fp_lock): New static function.
- (__fp_unlock): Ditto.
- (__fp_lock_all): New function.
- (__fp_unlock_all): Ditto.
-
-2004-02-10 Christopher Faylor <cgf@redhat.com>
-
- * libm/mathfp/er_gamma.c (gamma): Add new non-reentrant function.
- * libm/mathfp/er_lgamma.c (lgamma): Ditto.
- * libm/mathfp/erf_gamma.c (gammaf): Ditto.
- * libm/mathfp/erf_lgamma.c (lgammaf): Ditto.
-
-2004-02-09 Christopher Faylor <cgf@redhat.com>
-
- * libc/include/time.h (TIMER_RELTIME): New define.
-
-2004-02-09 Jeff Johnston <jjohnstn@redhat.com>
-
- * libc/stdlib/Makefile.am: Add mallstatsr to LIBADD_OBJS.
- * libc/stdlib/Makefile.in: Regenerated.
-
-2004-02-08 Christopher Faylor <cgf@redhat.com>
-
- * libc/include/sys/features.h: Add _POSIX_TIMERS define for __CYGWIN__.
- * libc/include/sys/reent.h (__getreent): Protect against possibly being
- defined.
- * libc/include/sys/unistd.h (fdatasync): Don't define for __CYGWIN__.
-
-2004-02-05 Paul Brook <paul@codesourcery.com>
-
- * libc/include/machine/ieeefp.h[__arm__][__VFP_FP__]: Set
- IEEE_{BIG,LITTLE} based on __ARMEL__ flag.
-
-2004-02-02 Jeff Johnston <jjohnstn@redhat.com>
-
- * NEWS: Update with 1.12.0 info.
- * README: Ditto.
- * acinclude.m4: Change version number to 1.12.0.
- * aclocal.m4: Regenerated.
- * configure: Ditto.
- * doc/aclocal.m4: Ditto.
- * doc/configure: Ditto.
- * libc/*/aclocal.m4: Ditto.
- * libc/*/configure: Ditto.
- * libc/libc.texinfo: Ditto.
- * libm/*/aclocal.m4: Ditto.
- * libm/*/configure: Ditto.
- * libm/libm.texinfo: Ditto.
- * libc/sys/linux/shared.ld: Add VERS_1.12.
-
-2004-02-02 Joel Sherrill <joel@oarcorp.com>
-
- * configure.host: Add support for tic4x.
- * libc/include/machine/ieeefp.h: Ditto.
- * libc/include/machine/setjmp.h: Ditto.
- * libc/machine/tic4x/Makefile.am: New file.
- * libc/machine/tic4x/configure.in: Ditto.
- * libc/machine/tic4x/setjmp.S: Ditto.
- * libc/machine/tic4x/aclocal.m4: Generated.
- * libc/machine/tic4x/configure: Ditto.
- * libc/machine/tic4x/Makefile.in: Ditto.
-
-2004-01-30 Jeff Johnston <jjohnstn@redhat.com>
-
- * libc/stdio/fwalk.c (_fwalk.c): Don't traverse the
- file chain on the passed in reentrancy struct if it
- is _GLOBAL_REENT.
-
-2004-01-30 Artem B. Bityuckiy <abitytsky@softminecorp.com>
- Jeff Johnston <jjohnstn@redhat.com>
-
- * libc/iconv/iconv.tex: Updated with more information.
-
-2004-01-30 Thomas Pfaff <tpfaff@gmx.net>
- Jeff Johnston <jjohnstn@redhat.com>
-
- * libc/stdio/fwalk.c (_fwalk): Traverse the given reentrancy
- struct for std streams and traverse the global reeentrancy
- struct for all other streams.
-
-2004-01-27 Jeff Johnston <jjohnstn@redhat.com>
-
- * libc/stdlib/atexit.c: Protect global atexit list with a
- lock when newlib is multithreaded.
-
-2004-01-27 Artem B. Bityuckiy <abitytsky@softminecorp.com>
-
- * configure.in: Add support to generate iconv converter flags
- for newlib.h
- * newlib.hin: Add iconv converter flags.
- * configure: Regenerated.
- * libc/Makefile.in: Ditto.
- * libc/configure.in: Moved iconv converter parsing logic to
- top level newlib configure.in.
- * libc/configure: Regenerated.
- * libc/iconv/Makefile.in: Ditto.
- * libc/iconv/README.TODO
- * libc/iconv/charset.aliases: Remove wrong BE aliases for
- UCS2/UCS4/UTF8.
- * libc/iconv/ccs/Makefile.am: Remove C flag setting now that
- newlib.h can be used.
- * libc/iconv/ces/Makefile.am: Ditto.
- * libc/iconv/lib/Makefile.am: Ditto.
- * libc/iconv/ccs/Makefile.in: Regenerated.
- * libc/iconv/ces/Makefile.in: Ditto.
- * libc/iconv/lib/Makefile.in: Ditto.
- * libc/iconv/ccs/README.CCS.SOURCES: Updated.
- * libc/iconv/ccs/iconv_mktbl: Don't write junk strings to binaries.
- * libc/iconv/ccs/big5.c: Switch to use new underscored flags
- defined in newlib.h.
- * libc/iconv/ccs/cns11643_plane1.c: Ditto.
- * libc/iconv/ccs/cns11643_plane14.c: Ditto.
- * libc/iconv/ccs/cns11643_plane2.c: Ditto.
- * libc/iconv/ccs/cp775.c: Ditto.
- * libc/iconv/ccs/cp850.c: Ditto.
- * libc/iconv/ccs/cp852.c: Ditto.
- * libc/iconv/ccs/cp855.c: Ditto.
- * libc/iconv/ccs/cp866.c: Ditto.
- * libc/iconv/ccs/gb_2312_80.c: Ditto.
- * libc/iconv/ccs/iso_8859_1.c: Ditto.
- * libc/iconv/ccs/iso_8859_15.c: Ditto.
- * libc/iconv/ccs/iso_8859_2.c: Ditto.
- * libc/iconv/ccs/iso_8859_4.c: Ditto.
- * libc/iconv/ccs/iso_8859_5.c: Ditto.
- * libc/iconv/ccs/jis_x0201.c: Ditto.
- * libc/iconv/ccs/jis_x0208_1983.c: Ditto.
- * libc/iconv/ccs/jis_x0212_1990.c: Ditto.
- * libc/iconv/ccs/koi8_r.c: Ditto.
- * libc/iconv/ccs/koi8_u.c: Ditto.
- * libc/iconv/ccs/ksx1001.c: Ditto.
- * libc/iconv/ccs/shift_jis.c: Ditto.
- * libc/iconv/ccs/us_ascii.c: Ditto.
- * libc/iconv/ccs/binary/big5.cct: Newly generated.
- * libc/iconv/ccs/binary/cns11643_plane1.cct: Ditto.
- * libc/iconv/ccs/binary/cns11643_plane14.cct: Ditto.
- * libc/iconv/ccs/binary/cns11643_plane2.cct: Ditto.
- * libc/iconv/ccs/binary/cp775.cct: Ditto.
- * libc/iconv/ccs/binary/cp850.cct: Ditto.
- * libc/iconv/ccs/binary/cp852.cct: Ditto.
- * libc/iconv/ccs/binary/cp855.cct: Ditto.
- * libc/iconv/ccs/binary/cp866.cct: Ditto.
- * libc/iconv/ccs/binary/gb_2312_80.cct: Ditto.
- * libc/iconv/ccs/binary/iso_8859_1.cct: Ditto.
- * libc/iconv/ccs/binary/iso_8859_15.cct: Ditto.
- * libc/iconv/ccs/binary/iso_8859_2.cct: Ditto.
- * libc/iconv/ccs/binary/iso_8859_4.cct: Ditto.
- * libc/iconv/ccs/binary/iso_8859_5.cct: Ditto.
- * libc/iconv/ccs/binary/jis_x0201.cct: Ditto.
- * libc/iconv/ccs/binary/jis_x0208_1983.cct: Ditto.
- * libc/iconv/ccs/binary/jis_x0212_1990.cct: Ditto.
- * libc/iconv/ccs/binary/koi8_r.cct: Ditto.
- * libc/iconv/ccs/binary/koi8_u.cct: Ditto.
- * libc/iconv/ccs/binary/ksx1001.cct: Ditto.
- * libc/iconv/ccs/binary/shift_jis.cct: Ditto.
- * libc/iconv/ccs/binary/us_ascii.cct: Ditto.
- * libc/iconv/lib/bialiasesi.c: Sync with charset.aliases.
- * libc/iconv/ces/euc-jp.c: Use newlib.h macros.
- * libc/iconv/ces/euc-kr.c: Ditto.
- * libc/iconv/ces/euc-tw.c: Ditto.
- * libc/iconv/ces/gb2312.c: Ditto.
- * libc/iconv/ces/iso-10646-ucs-2.c: Ditto.
- * libc/iconv/ces/iso-10646-ucs-4.c: Ditto.
- * libc/iconv/ces/ucs-2-internal.c: Ditto.
- * libc/iconv/ces/ucs-4-internal.c: Ditto.
- * libc/iconv/ces/utf-16.c: Ditto.
- * libc/iconv/ces/utf-8.c: Ditto.
- * libc/iconv/lib/aliases.c: Ditto.
- * libc/iconv/lib/biccs.c: Ditto.
- * libc/iconv/lib/bices.c: Ditto.
- * libc/iconv/lib/ccs.c: Ditto.
- * libc/iconv/lib/ces.c: Ditto.
- * libc/iconv/lib/ces_euc.c: Ditto.
- * libc/iconv/lib/ces_iso2022.c: Ditto.
- * libc/iconv/lib/ces_table.c: Ditto.
- * libc/iconv/lib/converter.c: Ditto.
- * libc/iconv/lib/deps.h: Ditto.
- * libc/iconv/lib/endian.h: Ditto.
- * libc/iconv/lib/iconv.c: Ditto.
- * libc/iconv/lib/loaddata.c: Ditto.
- * libc/iconv/lib/local.h: Include newlib.h.
- * libc/argz/Makefile.in: Regenerated.
- * libc/ctype/Makefile.in: Ditto.
- * libc/errno/Makefile.in: Ditto.
- * libc/iconv/ccs/binary/Makefile.in: Ditto.
- * libc/locale/Makefile.in: Ditto.
- * libc/misc/Makefile.in: Ditto.
- * libc/posix/Makefile.in: Ditto.
- * libc/reent/Makefile.in: Ditto.
- * libc/search/Makefile.in: Ditto.
- * libc/signal/Makefile.in: Ditto.
- * libc/stdio/Makefile.in: Ditto.
- * libc/stdio64/Makefile.in: Ditto.
- * libc/stdlib/Makefile.in: Ditto.
- * libc/string/Makefile.in: Ditto.
- * libc/syscalls/Makefile.in: Ditto.
- * libc/time/Makefile.in: Ditto.
- * libc/unix/Makefile.in: Ditto.
- * testsuite/newlib.iconv/iconv.exp: New file.
- * testsuite/newlib.iconv/iconvjp.c: Ditto.
- * testsuite/newlib.iconv/iconvnm.c: Ditto.
- * testsuite/newlib.iconv/iconvru.c: Ditto.
-
-2004-01-23 Artem B. Bityuckiy <abitytsky@softminecorp.com>
-
- * acinclude.m4 (--enable-newlib-iconv): New configuration option.
- (--enable-newlib-builtin-converters): Ditto.
- * configure.in: Add code to set _ICONV_ENABLED flag.
- Set _MB_LEN_MAX to 1 if not mb enabled.
- * configure: Regenerated.
- * aclocal.m4: Ditto.
- * Makefile.in: Ditto.
- * newlib.hin: Add _ICONV_ENABLED flag.
- * libc/Makefile.am: Add support for iconv.
- * libc/configure.in: Ditto.
- * libc/Makefile.in: Regenerated.
- * libc/aclocal.m4: Ditto.
- * libc/configure: Ditto.
- * libc/libc.texinfo: Add iconv documentation.
- * libc/iconv/AUTHORS, libc/iconv/COPYING, libc/iconv/Makefile.am,
- libc/iconv/Makefile.in, libc/iconv/README.ORIGINAL,
- libc/iconv/README.TODO, libc/iconv/charset.aliases,
- libc/iconv/iconv.tex, libc/iconv/ccs/Makefile.am,
- libc/iconv/ccs/Makefile.in, libc/iconv/ccs/README.CCS.SOURCES,
- libc/iconv/ccs/big5.c, libc/iconv/ccs/cns11643_plane1.c,
- libc/iconv/ccs/cns11643_plane14.c, libc/iconv/ccs/cns11643_plane2.c,
- libc/iconv/ccs/cp775.c, libc/iconv/ccs/cp850.c,
- libc/iconv/ccs/cp852.c, libc/iconv/ccs/cp855.c,
- libc/iconv/ccs/cp866.c, libc/iconv/ccs/gb_2312_80.c,
- libc/iconv/ccs/iconv_mktbl, libc/iconv/ccs/iso_8859_1.c,
- libc/iconv/ccs/iso_8859_15.c, libc/iconv/ccs/iso_8859_2.c,
- libc/iconv/ccs/iso_8859_4.c, libc/iconv/ccs/iso_8859_5.c,
- libc/iconv/ccs/jis_x0201.c, libc/iconv/ccs/jis_x0208_1983.c,
- libc/iconv/ccs/jis_x0212_1990.c, libc/iconv/ccs/koi8_r.c,
- libc/iconv/ccs/koi8_u.c, libc/iconv/ccs/ksx1001.c,
- libc/iconv/ccs/shift_jis.c, libc/iconv/ccs/us_ascii.c,
- libc/iconv/ccs/binary/Makefile.am, libc/iconv/ccs/binary/Makefile.in,
- libc/iconv/ccs/binary/big5.cct,
- libc/iconv/ccs/binary/cns11643_plane1.cct,
- libc/iconv/ccs/binary/cns11643_plane14.cct,
- libc/iconv/ccs/binary/cns11643_plane2.cct,
- libc/iconv/ccs/binary/cp775.cct, libc/iconv/ccs/binary/cp850.cct,
- libc/iconv/ccs/binary/cp852.cct, libc/iconv/ccs/binary/cp855.cct,
- libc/iconv/ccs/binary/cp866.cct, libc/iconv/ccs/binary/gb_2312_80.cct,
- libc/iconv/ccs/binary/iso_8859_1.cct,
- libc/iconv/ccs/binary/iso_8859_15.cct,
- libc/iconv/ccs/binary/iso_8859_2.cct,
- libc/iconv/ccs/binary/iso_8859_4.cct,
- libc/iconv/ccs/binary/iso_8859_5.cct,
- libc/iconv/ccs/binary/jis_x0201.cct,
- libc/iconv/ccs/binary/jis_x0208_1983.cct,
- libc/iconv/ccs/binary/jis_x0212_1990.cct,
- libc/iconv/ccs/binary/koi8_r.cct, libc/iconv/ccs/binary/koi8_u.cct,
- libc/iconv/ccs/binary/ksx1001.cct,
- libc/iconv/ccs/binary/shift_jis.cct,
- libc/iconv/ccs/binary/us_ascii.cct,
- libc/iconv/ces/Makefile.am, libc/iconv/ces/Makefile.in,
- libc/iconv/ces/euc-jp.c, libc/iconv/ces/euc-kr.c,
- libc/iconv/ces/euc-tw.c, libc/iconv/ces/gb2312.c,
- libc/iconv/ces/iso-10646-ucs-2.c, libc/iconv/ces/iso-10646-ucs-4.c,
- libc/iconv/ces/ucs-2-internal.c, libc/iconv/ces/ucs-4-internal.c,
- libc/iconv/ces/utf-16.c, libc/iconv/ces/utf-8.c,
- libc/iconv/lib/Makefile.am, libc/iconv/lib/Makefile.in,
- libc/iconv/lib/aliases.c, libc/iconv/lib/bialiasesi.c,
- libc/iconv/lib/biccs.c, libc/iconv/lib/bices.c,
- libc/iconv/lib/ccs.c, libc/iconv/lib/ces.c,
- libc/iconv/lib/ces_euc.c, libc/iconv/lib/ces_iso2022.c,
- libc/iconv/lib/ces_table.c, libc/iconv/lib/converter.c,
- libc/iconv/lib/deps.h, libc/iconv/lib/endian.h,
- libc/iconv/lib/iconv.c, libc/iconv/lib/loaddata.c,
- libc/iconv/lib/local.h, libc/include/iconv.h: New files.
- * libc/sys/linux/include/iconv.h: Ditto.
- * libc/include/sys/_types.h (_iconv_t): Added.
- * doc/aclocal.m4: Regenerated.
- * doc/configure: Ditto.
- * doc/Makefile.in: Ditto.
- * iconvdata/Makefile.in: Ditto.
- * iconvdata/aclocal.m4: Ditto.
- * iconvdata/configure: Ditto.
- * libc/*aclocal.m4: Ditto.
- * libc/*Makefile.in: Ditto.
- * libc/*configure: Ditto.
- * libm/*aclocal.m4: Ditto.
- * libm/*Makefile.in: Ditto.
- * libm/*configure: Ditto.
-
-2004-01-22 Thomas Pfaff <tpfaff@gmx.net>
-
- * libc/stdio/findfp.c (__sfp): Protect global FILE pointer list
- by a lock when newlib is multithreaded.
-
-2004-01-21 Jeff Johnston <jjohnstn@redhat.com>
-
- * libc/stdlib/mbrtowc.c (_mbrtowc_r): Fix case where s is null
- pointer to match C99 spec.
- * libc/stdlib/mbsrtowcs.c (_mbsrtowc_r): Fix to ignore len when
- dst is NULL. Also fix to not alter src pointer when dst is NULL
- and call _mbrtowc_r instead of _mbtowc_r.
- * libc/stdlib/wcsrtombs.c (_wcsrtombs_r): Call _wcrtomb_r instead
- of _wctomb_r.
-
-2004-01-19 Thomas Pfaff <tpfaff@gmx.net>
-
- * libc/stdio/fclose.c (fclose): Release FILE as the last step.
- * libc/stdio/freopen.c (freopen): Ditto.
-
-2004-01-16 Christopher Faylor <cgf@redhat.com>
-
- * libc/stdio/vfprintf.c: Add sys/lock.h include.
-
-2004-01-16 Thomas Pfaff <tpfaff@gmx.net>
-
- * libc/stdio/findfp.c (__sfp): Remove unnecessary memset.
- * libc/stdio/vfprintf.c (__sbprintf): Ditto.
- Add calls to __lock_init_recursive and __lock_close_recursive
- instead.
-
-2004-01-15 Thomas Pfaff <tpfaff@gmx.net>
-
- * libc/stdio/fclose.c: Include sys/lock.h.
- (fclose): Destroy lock when file is closed.
- * libc/stdio/findfp.c (__sfp): Initialize file pointers _lock
- member.
- * libc/stdio/freopen.c: Include sys/lock.h.
- (_freopen_r): Destroy lock when file is closed.
- * libc/stdio/vfprintf.c (__sbprintf): Initialize file pointers
- _lock member.
-
-2004-01-08 Joel Sherrill <joel@oarcorp.com>
-
- * libc/ctype/iswctype.c, include/sys/reent.h, libc/stdlib/a64l.c:
- Remove warnings.
-
-2004-01-08 Joel Sherrill <joel@oarcorp.com>
-
- * libc/sys/rtems/sys/queue.h: New file.
- * libc/include/sys/signal.h: Reflect renumbering of signals to
- fit into 32-bit mask.
- * libc/include/sys/unistd.h: Add fdatasync() prototype.
- * libc/sys/rtems/crt0.c: Add more symbols which may be implicitly
- required. In particular, add the reentrant variants of libc calls.
- * libc/sys/rtems/sys/dirent.h: Add scandir() prototype.
-
-2004-01-06 Mark Mitchell <mark@codesourcery.com>
-
- * libc/sys/arm/syscalls.c (unistd.h): Include it.
- (remap_handle): Use STDIN_FILENO instead of __sfileno(stdin).
- Similarly for stdout and stderr.
-
-2004-01-06 Jeff Johnston <jjohnstn@redhat.com>
-
- * libc/libc.texinfo: Correct escape character for @ sign
- so file will be processed by make info. Update copyright years.
- * libm/libm.texinfo: Ditto.
-
-2003-12-05 Jeff Johnston <jjohnstn@redhat.com>
-
- * libc/include/sys/stat.h: No longer include stat-dj.h.
- * libc/include/sys/stat-dj.h: Removed.
-
-2003-12-05 Jeff Johnston <jjohnstn@redhat.com>
-
- * libc/include/wchar.h: Include <sys/reent.h>.
-
-2003-12-05 Christopher Faylor <cgf@redhat.com>
-
- * libc/stdlib/mbrlen.c: Change include order to prevent compiler errors
- when defining _mbrtowc.
- * libc/stdlib/mbsinit.c: Ditto.
- * libc/stdlib/mbsrtowcs.c: Ditto.
- * libc/stdlib/wcrtomb.c: Ditto.
- * libc/stdlib/wcsrtombs.c: Ditto.
- * libc/stdlib/wctob.c: Ditto.
-
-2003-12-05 Christopher Faylor <cgf@redhat.com>
-
- * libc/stdlib/mbrlen.c: Change include order to prevent compiler
- errors when defining _mbrtowc.
- * libc/stdlib/mbsinit.c: Ditto.
- * libc/stdlib/mbsrtowcs.c: Ditto.
-
-2003-12-05 Christopher Faylor <cgf@redhat.com>
-
- * libc/stdlib/mbrtowc.c: Change include order to prevent compiler
- errors when defining _mbrtowc.
-
-2003-12-04 Artem B. Bityuckiy <abitytsky@softminecorp.com>
-
- * libc/stdio/vfprintf.c (_VFPRINTF_R): Use _r versions
- of mb routines for %lc and %ls support.
- * libc/stdio/vfscanf.c (_svfscanf_r): Add %lc, %C,
- %ls, and %S support. Remove CYGNUS_NEC markers and
- code within.
-
-2003-12-04 Jeff Johnston <jjohnstn@redhat.com>
-
- * libc/include/wchar.h: Add prototypes for _mbrtowc_r,
- _wcrtomb_r, and _wcsrtombs_r.
-
-2003-12-01 Corinna Vinschen <corinna@vinschen.de>
-
- * libc/include/sys/fcntl.h: Don't define struct flock when on
- Cygwin. This is done in winsup/cygwin/include/cygwin/types.h now.
-
-2003-11-28 Christopher Faylor <cgf@redhat.com>
-
- * libc/include/sys/signal.h: Use system specific signal file when
- building on cygwin.
-
-2003-11-27 Jeff Johnston <jjohnstn@redhat.com>
-
- * libc/include/stdlib.h (_atoi_r): New prototype.
- * libc/stdlib/atoi.c (_atoi_r): New reentrant function.
-
-2003-11-27 Jeff Johnston <jjohnstn@redhat.com>
-
- * libc/include/stdlib.h (_atoll_r, _atol_r): New prototypes.
- * libc/stdlib/atol.c (_atol_r): New reentrant function.
- * libc/stdlib/atoll.c (_atoll_r): Ditto.
-
-2003-11-27 Artem B. Bityuckiy <abitytsky@softminecorp.com>
- Jeff Johnston <jjohnstn@redhat.com>
-
- * libc/include/stdlib.h (lldiv_t): New type.
- (atoll, llabs, lldiv): New prototypes.
- * libc/stdlib/Makefile.am: Add support for atoll, llabs, and lldiv.
- * libc/stdlib/stdlib.tex: Ditto.
- * libc/stdlib/Makefile.in: Regenerated.
- * libc/stdlib/atoll.c: New file.
- * libc/stdlib/llabs.c: Ditto.
- * libc/stdlib/lldiv.c: Ditto.
-
-2003-11-26 Corinna Vinschen <corinna@vinschen.de>
-
- * libc/include/fcntl.h: Declare syscalls only when building newlib.
- * libc/include/unistd.h: Ditto.
- * libc/include/stat.h: Ditto. Also declare struct stat64.
-
-2003-11-24 Artem B. Bityuckiy <abitytsky@softminecorp.com>
-
- * libc/stdio/vfprintf.c (_VFPRINTF_R): Fix check for 'C' format
- specifier to use ch instead of *fmt.
-
-2003-11-21 Artem B. Bityuckiy <abitytsky@softminecorp.com>
-
- * libc/stdio/vfprintf.c (_VFPRINTF_R, get_arg): Move mb-specific
- code within checks for MB_CAPABLE. For non-mb-capable platforms,
- use simple byte logic.
-
-2003-11-21 Jeff Johnston <jjohnstn@redhat.com>
-
- * libc/stdio/vfscanf.c (__svfscanf_r)[!_NO_LONGDBL]: Don't use
- _strtold routine for processing floats and doubles since it
- is not as fast as _strtod_r.
-
-2003-11-20 Dhananjay Deshpande <dhananjayd@kpitcummins.com>
-
- * libc/machine/h8300/defines.h : Correct pointer register defines
- for normal mode.
- * libc/machine/h8300/memcpy.S : Use add/sub instead of adds/subs
- for normal mode.
- * libc/machine/h8300/reg_memcpy.S : Likewise.
- * libc/machine/h8300/reg_memset.S : Likewise.
- * libc/machine/h8300/strcmp.S : Likewise.
-
-2003-11-19 Nicholas Wourms <nwourms@netscape.net>
-
- * configure.host: Enable positional arguments for printf
- family for Cygwin.
- * libc/stdio/vfprintf.c (_VFPRINTF_R): Remove extraneous
- pointer reference for quad_ptr_t.
-
-2003-11-19 Jeff Johnston <jjohnstn@redhat.com>
-
- * libc/stdio/scanf.c: Don't include local.h more than once.
-
-2003-11-18 Corinna Vinschen <corinna@vinschen.de>
-
- * libc/include/sys/fcntl.h: Declare _open64.
- * libc/include/sys/stat.h: Declare _fstat64.
- * libc/include/sys/unistd.h: Declare _lseek64.
-
-2003-11-17 Corinna Vinschen <corinna@vinschen.de>
-
- * libc/include/stdlib.h (getprogname): Declare for Cygwin.
- (setprogname): Ditto.
-
-2003-11-10 Jeff Johnston <jjohnstn@redhat.com>
-
- * libc/machine/powerpc/ufix64toa.c (_ufix64to_r): Fix shifts
- to use (Ebits + 1) which accounts for the sign-bit.
-
-2003-11-07 Jeff Johnston <jjohnstn@redhat.com>
-
- * configure.host: Remove -DLOOSE_KERNEL_NAMES flag for linux
- x86 build.
- * iconvdata/Makefile.am: Make dependent on newlib's configure.host
- and set up default flags to pass to aclocal.
- * iconvdata/Makefile.in: Regenerated.
- * libc/sys/linux/Makefile.am: Add _ELIX_LEVEL_4 getlogin, getpwnam,
- and getpwuid routines.
- * libc/sys/linux/Makefile.in: Regenerated.
- * libc/sys/linux/getlogin.c: New stub file to allow x86-linux
- applications to link with newlib's shared libc library.
- * libc/sys/linux/getpwnam.c: Ditto.
- * libc/sys/linux/getpwuid.c: Ditto.
- * libc/sys/linux/sys/types.h: Include <features.h> and supply types
- that were formerly supplied by /usr/include/linux/types.h with
- kernel types.
- * testsuite/newlib.wctype/twctype.c: Fix testcase to properly
- test _ELIX_LEVEL macro.
-
-2003-11-07 Jeff Johnston <jjohnstn@redhat.com>
-
- * libc/stdio/vfprintf.c (_VFPRINTF_R): Fix typos that should be
- referring to _NO_LONGLONG macro.
-
-2003-11-06 Jeff Johnston <jjohnstn@redhat.com>
-
- * libc/sys/linux/linuxthreads/td_init.c: Replace function name
- in LOG() macro so this will compile on gcc 3.4 and up.
- * libc/sys/linux/linuxthreads/td_log.c: Ditto.
- * libc/sys/linux/linuxthreads/td_ta_clear_event.c: Ditto.
- * libc/sys/linux/linuxthreads/td_ta_delete.c: Ditto.
- * libc/sys/linux/linuxthreads/td_ta_enable_stats.c: Ditto.
- * libc/sys/linux/linuxthreads/td_ta_event_addr.c: Ditto.
- * libc/sys/linux/linuxthreads/td_ta_event_getmsg.c: Ditto.
- * libc/sys/linux/linuxthreads/td_ta_get_nthreads.c: Ditto.
- * libc/sys/linux/linuxthreads/td_ta_get_ph.c: Ditto.
- * libc/sys/linux/linuxthreads/td_ta_get_stats.c: Ditto.
- * libc/sys/linux/linuxthreads/td_ta_map_id2thr.c: Ditto.
- * libc/sys/linux/linuxthreads/td_ta_map_lwp2thr.c: Ditto.
- * libc/sys/linux/linuxthreads/td_ta_new.c: Ditto.
- * libc/sys/linux/linuxthreads/td_ta_reset_stats.c: Ditto.
- * libc/sys/linux/linuxthreads/td_ta_set_event.c: Ditto.
- * libc/sys/linux/linuxthreads/td_ta_setconcurrency.c: Ditto.
- * libc/sys/linux/linuxthreads/td_ta_thr_iter.c: Ditto.
- * libc/sys/linux/linuxthreads/td_ta_tsd_iter.c: Ditto.
- * libc/sys/linux/linuxthreads/td_thr_clear_event.c: Ditto.
- * libc/sys/linux/linuxthreads/td_thr_dbresume.c: Ditto.
- * libc/sys/linux/linuxthreads/td_thr_dbsuspend.c: Ditto.
- * libc/sys/linux/linuxthreads/td_thr_event_enable.c: Ditto.
- * libc/sys/linux/linuxthreads/td_thr_event_getmsg.c: Ditto.
- * libc/sys/linux/linuxthreads/td_thr_get_info.c: Ditto.
- * libc/sys/linux/linuxthreads/td_thr_getfpregs.c: Ditto.
- * libc/sys/linux/linuxthreads/td_thr_getgregs.c: Ditto.
- * libc/sys/linux/linuxthreads/td_thr_getxregs.c: Ditto.
- * libc/sys/linux/linuxthreads/td_thr_getxregsize.c: Ditto.
- * libc/sys/linux/linuxthreads/td_thr_set_event.c: Ditto.
- * libc/sys/linux/linuxthreads/td_thr_setfpregs.c: Ditto.
- * libc/sys/linux/linuxthreads/td_thr_setgregs.c: Ditto.
- * libc/sys/linux/linuxthreads/td_thr_setprio.c: Ditto.
- * libc/sys/linux/linuxthreads/td_thr_setsigpending.c: Ditto.
- * libc/sys/linux/linuxthreads/td_thr_setxregs.c: Ditto.
- * libc/sys/linux/linuxthreads/td_thr_sigsetmask.c: Ditto.
- * libc/sys/linux/linuxthreads/td_thr_tsd.c: Ditto.
- * libc/sys/linux/linuxthreads/td_thr_validate.c: Ditto.
-
-2003-11-05 Jeff Johnston <jjohnstn@redhat.com>
- Artem B. Bityuckiy <abitytsky@softminecorp.com>
-
- * libc/stdio/vfprintf.c (_VFPRINTF_R): Add support for
- %ls, %S, %lc, and %C format specifiers.
- (get_arg): Ditto.
- * libc/stdio/sprintf.c: Add documentation regarding new
- format specifiers added in vfprintf.c.
-
-2003-11-05 Jeff Johnston <jjohnstn@redhat.com>
-
- * libc/stdlib/wcsrtombs.c (_wcsrtombs_r): Numerous fixes
- to make code work as specified in standard.
-
-2003-10-23 Jeff Johnston <jjohnstn@redhat.com>
-
- * configure.in: Use absolute newlib basedir when forming
- CC_FOR_NEWLIB include options.
- * configure: Regenerated.
-
-2003-10-23 Artem B. Bityuckiy <abitytsky@softminecorp.com>
-
- * libc/string/wcsnlen.c: New file.
- * libc/include/wchar.h: Add wcsnlen prototype.
- * libc/string/Makefile.am: Add wcsnlen support.
- * libc/string/Makefile.in: Regenerated.
- * libc/string/wcstrings.tex: Add wcsnlen documentation.
-
-2003-10-22 Richard Sandiford <rsandifo@redhat.com>
-
- * libc/stdlib/exit.c (exit): Handle null _GLOBAL_REENT->_atexits.
-
-2003-10-20 Bob Wilson <bob.wilson@acm.org>
-
- * libc/locale/locale.c: Use double quotes in code.
- * libc/locale/locale.tex: Likewise.
- * libc/libc.texinfo: Hyphenate "floating-point".
- * libc/machine/necv70/necv70.tex: Likewise.
- * libc/stdio/sprintf.c: Likewise.
- * libc/stdio/sscanf.c: Likewise.
- * libc/stdlib/atof.c: Likewise.
- * libc/stdlib/ldtoa.c: Fix comment typo.
- * libc/stdlib/div.c: Use @ifnottex instead of @ifinfo.
- * libc/stdlib/ldiv.c: Likewise.
- * libm/common/s_expm1.c: Likewise.
- * libm/common/s_ilogb.c: Hyphenate "floating-point". Use "nonzero".
- * libm/common/s_infinity: Hyphenate "double- and single-precision".
- * libm/common/s_nan.c: Likewise. Also correct the FUNCTION summary.
- * libm/common/s_nextafter.c: Fix typo. Hyphenate "double-precision"
- and "floating-point".
- * libm/common/s_scalbn.c: Correct the FUNCTION summary.
- * libm/math/e_pow.c: Fix comment typo.
- * libm/math/math.tex: Hyphenate "single-precision" and "floating-point".
- * libm/math/s_asinh.c: Use @ifnottex instead of @ifinfo.
- * libm/math/s_atan.c: Likewise.
- * libm/math/s_frexp.c: Likewise. Also use "nonzero".
- * libm/math/s_isnan.c: Hyphenate "single-precision" and
- "floating-point". Use "nonzero".
- * libm/math/s_ldexp.c: Use @ifnottex instead of @ifinfo.
- * libm/math/w_acos.c: Likewise.
- * libm/math/w_acosh.c: Likewise.
- * libm/math/w_asin.c: Likewise.
- * libm/math/w_atan2.c: Likewise.
- * libm/math/w_atanh.c: Likewise.
- * libm/math/w_cosh.c: Likewise.
- * libm/math/w_exp.c: Likewise.
- * libm/math/w_exp2.c: Likewise. Add missing @end and missing @tex
- version of 2^x in the description.
- * libm/math/w_fmod.c: Use @ifnottex instead of @ifinfo.
- * libm/math/w_gamma.c: Likewise.
- * libm/math/w_hypot.c: Likewise.
- * libm/math/w_j0.c: Likewise.
- * libm/math/w_sinh.c: Likewise.
- * libm/math/w_pow.c: Replace "exp1.0nt" with "exponent".
- * libm/mathfp/mathfp.tex: Hyphenate "single-precision" and
- "floating-point".
- * libm/mathfp/e_acosh.c: Use @ifnottex instead of @ifinfo.
- * libm/mathfp/e_atanh.c: Likewise.
- * libm/mathfp/e_hypot.c: Likewise.
- * libm/mathfp/er_lgamma.c: Likewise.
- * libm/mathfp/s_acos.c: Likewise.
- * libm/mathfp/s_asine.c: Likewise.
- * libm/mathfp/s_asinh.c: Likewise.
- * libm/mathfp/s_atan.c: Likewise.
- * libm/mathfp/s_atan2.c: Likewise.
- * libm/mathfp/s_atangent.c: Likewise.
- * libm/mathfp/s_cosh.c: Likewise.
- * libm/mathfp/s_exp.c: Likewise.
- * libm/mathfp/s_fmod.c: Likewise.
- * libm/mathfp/s_frexp.c: Likewise. Also use "nonzero".
- * libm/mathfp/s_isnan.c: Hyphenate "single-precision" and
- "floating-point". Use "nonzero".
- * libm/math/s_pow.c: Replace "exp1.0nt" with "exponent".
- * libm/mathfp/s_ldexp.c: Use @ifnottex instead of @ifinfo.
- * libm/mathfp/s_sineh.c: Likewise.
- * libm/mathfp/w_jn.c: Likewise.
-
-2003-10-15 Alexandre Oliva <aoliva@redhat.com>
-
- * Makefile.am: Add $(MAKE) comments to multido and multiclean
- lines, to enable parallel make.
- * Makefile.in: Rebuilt.
-
-2003-10-14 Christopher Faylor <cgf@redhat.com>
-
- * libc/time/clock.c: Clarify documentation of return value when no
- measurement is available.
-
-2003-09-29 Ian Lance Taylor <ian@wasabisystems.com>
-
- * libm/configure.in: Check libm_machine_dir, not machine_dir.
- * libm/configure: Regenerate.
- * libm/Makefile.in: Ditto.
-
-2003-09-29 J"orn Rennecke <joern.rennecke@superh.com>
-
- * libc/machine/sh/strncpy.S: New file.
- * libc/machine/sh/Makefile.am: Add entry & rule for new file.
- * libc/machine/sh/Makefile.in: Regenerate.
-
-2003-09-11 James E Wilson <wilson@specifixinc.com>
-
- * MAINTAINERS: Update my e-mail address.
-
-2003-09-10 Corinna Vinschen <corinna@vinschen.de>
-
- * libc/include/sys/unistd.h: Declare function daemon for Cygwin.
-
-2003-09-09 Jeff Johnston <jjohnstn@redhat.com>
-
- * libc/machine/powerpc/fix64.h: Fix typo for _simdldcheck
- prototype.
- * libc/machine/powerpc/simdldtoa.c: Remove prototype for
- _simdldcheck(). Also add unsigned cast for index variable in
- for loop using sizeof operators.
- * libc/machine/powerpc/strtoufix32.c: Remove unused variable.
- * libc/machine/powerpc/strtosfix64.c: Fix call to _simdldcheck.
- * libc/machine/powerpc/strtoufix64.c (_strtoufix64_r): Ditto
- plus fix shift calculation for determining if there is a
- carry from word2.
-
-2003-09-09 Corinna Vinschen <corinna@vinschen.de>
-
- * libc/include/grp.h: Don't define setgrfile, group_from_gid and
- setgroupent for Cygwin.
-
-2003-09-05 Jeff Johnston <jjohnstn@redhat.com>
-
- * libc/stdlib/exit.c (exit): Setting of struct _atexit ptr p
- is different for _REENT_SMALL than when using regular reent
- struct.
-
-2003-09-05 Ben Elliston <bje@wasabisystems.com>
-
- * libc/ctype/wctype.c (_DEFUN): Remove empty default case, as
- modern versions of GCC issue a warning.
-
- * libc/machine/xscale/memcmp.c (memcmp): Strip trailing whitespace
- after continuation characters that induces a warning from modern
- versions of GCC.
-
-2003-09-04 Ben Elliston <bje@wasabisystems.com>
-
- * libc/stdlib/mstats.c[_ELIX_LEVEL]: Fix guards. #ifndef FOO ||
- FOO >= 2 is invalid; use #if !defined (FOO) || FOO >= 2 instead.
-
-2003-09-02 Thomas Pfaff <tpfaff@gmx.net>
-
- * libc/stdlib/atexit.c: Rename _REENT to _GLOBAL_REENT throughout.
- * libc/stdlib/exit.c : Ditto.
- * libc/stdlib/on_exit.c: Ditto.
-
-2003-08-27 Corinna Vinschen <corinna@vinschen.de>
-
- * libc/include/reent.h: Define stat64 as __stat64 when
- compiling newlib for Cygwin.
-
-2003-08-26 Jeff Johnston <jjohnstn@redhat.com>
-
- * libc/include/sys/stat.h[__CYGWIN__]: Only define stat64 as
- __stat64 when compiling newlib.
-
-2003-08-26 Jeff Johnston <jjohnstn@redhat.com>
-
- * libc/include/stdio.h: Allow the io64 function prototypes for
- Cygwin when compiling newlib.
- * libc/include/sys/stat.h[__CYGWIN__]: Define stat64 as __stat64
- to expose the Cygwin struct __stat64 type.
- * libc/stdio64/fseeko64.c: Use _fstat64_r and pass a struct stat64
- pointer.
- * libc/stdio64/tmpfile64.c(_tmpfile64_r): Call _fopen64_r.
-
-2003-08-23 Christopher Faylor <cgf@redhat.com>
-
- * libc/stdio64/fseeko64.c (fseeko64_r): Rename second fseeko64_r
- definition to fseeko64.
-
-2003-08-22 Jeff Johnston <jjohnstn@redhat.com>
-
- * libc/include/sys/reent.h: Add _GLOBAL_REENT macro.
- * libc/stdio: Globally remove/replace all references to fp->_data.
- Replace with _REENT or _GLOBAL_REENT where appropriate.
- * libc/stdio/asprintf.c: Ditto.
- * libc/stdio/fclose.c: Ditto.
- * libc/stdio/fvwrite.c: Ditto.
- * libc/stdio/makebuf.c: Ditto.
- * libc/stdio/refill.c: Ditto.
- * libc/stdio/local.h: Ditto.
- * libc/stdio/setvbuf.c: Ditto.
- * libc/stdio/sscanf.c: Ditto.
- * libc/stdio/stdio.c: Ditto.
- * libc/stdio/ungetc.c: Ditto.
- * libc/stdio/vfscanf.c: Ditto.
- * libc/stdio/vsscanf.c: Ditto.
- * libc/stdio/fopen.c: Ditto. Also use _fseek_r in _fopen_r.
- * libc/stdio/vasprintf.c: Ditto. Also call _vfprintf_r directly.
- * libc/stdio/vsnprintf.c: Ditto.
- * libc/stdio/vsprintf.c: Ditto.
- * libc/stdio/fcloseall.c(fcloseall): Use _GLOBAL_REENT macro
- instead of _REENT to walk file list.
- * libc/stdio/fflush.c: Ditto.
- * libc/stdio/fgetpos.c: Add reentrant version and have regular
- version call reentrant version with _REENT argument.
- * libc/stdio/fsetpos.c: Ditto.
- * libc/stdio/fseek.c: Ditto.
- * libc/stdio/fseeko.c: Ditto.
- * libc/stdio/ftell.c: Ditto.
- * libc/stdio/ftello.c: Ditto.
- * libc/stdio/freopen.c: Ditto.
- * libc/stdio/findfp.c: Use _GLOBAL_REENT pointer when adding
- new files to chain. Also use _GLOBAL_REENT pointer for
- cleaning up.
- * libc/stdio/fiprintf.c: Reformatted to minimize duplicate code.
- * libc/stdio/siprintf.c: Ditto.
- * libc/stdio/iprintf.c: Ditto.
- * libc/stdio/fprintf.c: Ditto.
- * libc/stdio/printf.c: Ditto.
- * libc/stdio/snprintf.c: Call _vfprintf_r directly.
- * libc/stdio/sprintf.c: Ditto.
- * libc/stdio/vprintf.c: Ditto. Also add _REENT_ONLY check.
- * libc/stdio/rewind.c: Call _fseek_r directly.
- * libc/stdio/tmpfile.c: Call _fopen_r and _remove_r directly.
- * libc/stdio/vfprintf.c (_VFPRINTF_R): Change _r routines to use
- data pointer.
- (get_arg): Add extra struct _reent pointer argument.
- * libc/stdio64/fgetpos64.c: Add _r versions, remove any reference
- to fp->_data.
- * libc/stdio64/fopen64.c: Ditto.
- * libc/stdio64/freopen64.c: Ditto.
- * libc/stdio64/fsetpos64.c: Ditto.
- * libc/stdio64/ftello64.c: Ditto.
- * libc/stdio64/local64.h: Ditto.
- * libc/stdio64/stdio64.c: Ditto.
- * libc/stdio64/fseeko64.c: Ditto plus use _fstat_r instead of
- _fstat64_r for the meantime.
-
-2003-08-19 Jeff Johnston <jjohnstn@redhat.com>
-
- * libc/stdlib/mallocr.c (mALLOc, rEALLOc, mEMEALIGn): Enhance
- overflow detection.
-
-2003-08-13 Aldy Hernandez <aldyh@redhat.com>
-
- * libc/machine/powerpc/machine/stdlib.h: Wrap SPE functions in
- extern "C".
-
-2003-08-13 Jeff Johnston <jjohnstn@redhat.com>
-
- * libc/include/math.h: Add prototypes for __signbitf and
- __signbitd.
-
-2003-07-31 Jeff Johnston <jjohnstn@redhat.com>
-
- * libc/ctype/iswalpha.c: Fix calls to __jp2uc to pass the
- correct type of conversion when dealing with EUCJP or SJIS.
- * libc/ctype/iswblank.c: Ditto.
- * libc/ctype/iswcntrl.c: Ditto.
- * libc/ctype/iswprint.c: Ditto.
- * libc/ctype/iswpunct.c: Ditto.
- * libc/ctype/iswspace.c: Ditto.
- * libc/ctype/towlower.c: Ditto.
- * libc/ctype/towupper.c: Ditto.
-
-2003-07-31 Nick Clifton <nickc@redhat.com>
-
- * libc/sys/sysnecv850/crt0.S (_start): Allocate 4 slots on stack
- before calling main, in case it saves its argument registers.
- Remove reference to deleted v850ea port.
- * configure.host: Remove reference to deleted v850ea port.
- Do not use -mv850 when building for v850e target. This
- prevents the ctbp system register from being initialised.
-
-2003-07-29 Honda Hiroki <hhonda@ipflex.com>
-
- * libc/stdio/vfprintf.c: Set output size to 1 when
- we have %f format with precision 0 and # flag not specified.
-
-2003-07-29 Alexandre Oliva <aoliva@redhat.com>
-
- * libc/machine/mn10300/setjmp.S: Never emit both .am33 and
- .am33_2.
-
-2003-07-25 Christopher Faylor <cgf@redhat.com>
-
- * libc/stdio64/fdopen64.c: Include sys/lock.h.
-
-2003-07-25 Christopher Faylor <cgf@redhat.com>
-
- * configure.host: Find cygwin include directory, when appropriate.
-
-2003-07-24 Christopher Faylor <cgf@redhat.com>
-
- * libc/stdio64/fdopen64.c: New file.
- * libc/stdio64/Makefile.am (LIB_OBJS): Add fdopen64.o
- * libc/stdio64/Makefile.in: Regenerate.
- * libc/include/stdio.h (fdopen64): Define.
- * libc/include/stdio.h (_fdopen64_r): Ditto.
-
-2003-07-10 Alexandre Oliva <aoliva@redhat.com>
-
- 2000-04-27 Alexandre Oliva <aoliva@cygnus.com>
- * libc/include/machine/setjmp.h (_JBLEN, AM33/2.0): Set to 26.
- * libc/machine/mn10300/setjmp.S (setjmp, longjmp): Save and
- restore callee-saved FP registers.
-
-2003-07-10 J"orn Rennecke <joern.rennecke@superh.com>
-
- * libc/include/sys/unistd.h (ftruncate, truncate): Also declare
- for __sh__.
- * libc/sys/sh/Makefile.am (lib_a_SOURCES): Add ftruncate.c and
- truncate.c.
- * libc/sys/sh/Makefile.in: Regenerate.
- * libc/sys/sh/sys/syscall.h: (SYS_truncate, SYS_ftruncate): Define.
- * libc/sys/sh/ftruncate.c: New file.
- * libc/sys/sh/truncate.c: Likewise.
-
-2003-07-09 Alexandre Oliva <aoliva@redhat.com>
-
- * libc/include/math.h (nan, nanf): Update prototype to C99.
- * libm/common/s_nan.c (nan): Likewise.
- * libm/common/s_nanf.c (nanf, nan): Likewise.
- * libc/sys/linux/cmath/math_private.h (nan, nanf): Likewise.
-
-2003-07-07 Jeff Johnston <jjohnstn@redhat.com>
-
- * libc/include/stdbool.h: Removed as this is defined by gcc.
-
-2003-07-03 Shaun Jackman <sjackman@pathwayconnect.com>
-
- * libc/include/stdbool.h: New header file defined by C99.
-
-2003-07-02 Jeff Johnston <jjohnstn@redhat.com>
-
- * libc/include/sys/types.h (int8_t): Make signed.
-
-2003-07-02 Jeff Johnston <jjohnstn@redhat.com>
-
- * libc/sys/linux/include/mqueue.h: Add include of <sys/fcntl.h>.
-
-2003-06-27 Jose Goncalves <jose.goncalves@inov.pt>
-
- * libc/sys/linux/mq_open.c (mq_open): Only set created flag
- on if we actually created the shared memory file exclusively.
-
-2003-06-27 Joe Vornehm <joev@mitre.org>
-
- * libm/common/s_fpclassify.c (__fpclassifyf): Fix
- comparisons to account for unsigned internal value w.
-
-2003-06-26 Jeff Johnston <jjohnstn@redhat.com>
-
- * libc/sys/linux/mq_open.c (mq_open): Must allocate rdbuf and
- wrbuf for a non-creating open.
-
-2003-06-24 Kazu Hirata <kazu@cs.umass.edu>
-
- * libc/machine/h8300/setarch.h: New.
- * libc/machine/h8300/memcpy.S: Use it.
- * libc/machine/h8300/memset.S: Likewise.
- * libc/machine/h8300/reg_memcpy.S: Likewise.
- * libc/machine/h8300/reg_memset.S: Likewise.
- * libc/machine/h8300/setjmp.S: Likewise.
- * libc/machine/h8300/strcmp.S: Likewise.
-
-2003-06-24 Richard Sandiford <rsandifo@redhat.com>
-
- * libc/sys/h8300hms/crt0.S (_start): Fix register sizes in call
- to atexit().
-
-2003-06-20 Jeff Johnston <jjohnstn@redhat.com>
-
- * configure.host (iq2000): Add tabs.
-
-2003-06-20 Jeff Johnston <jjohnstn@redhat.com>
-
- * libc/include/sys/reent.h (_REENT_INIT_PTR): Fix macros
- to handle latest on_exit change.
- * libc/sys/linux/Makefile.am: Remove special compilation
- for malloc.c and mcheck.c.
- * libc/sys/linux/Makefile.in: Regenerated.
- * libc/sys/linux/mntent.c: Add definition of _LIBC flag
- after including <features.h>.
- * libc/sys/linux/mcheck.c: Ditto.
- * libc/sys/linux/malloc.c: Ditto plus define _GNU_SOURCE
- for <features.h>.
- * libc/sys/linux/intl/Makefile.am: Remove -D_LIBC and
- add -DNOT_IN_libc to C flags.
- * libc/sys/linux/intl/Makefile.in: Regenerated.
- * libc/sys/linux/intl/config.h: Add definition of _LIBC.
- * libc/sys/linux/linuxthreads/semaphore.h: Include
- <bits/pthreadtypes.h>.
- * libc/sys/linux/sys/dirent.h: Define _LIBC and NOT_IN_libc after
- including <features.h>.
- * libc/sys/linux/sys/lock.h: Ditto.
-
-2003-06-11 Nick Clifton <nickc@redhat.com>
-
- * libc/reent/reent.c (reclaim_reent): Fix typo in code to free
- _on_exit_args_ptr.
-
-2003-06-10 Stan Cox <scox@redhat.com>
- Anthony Green <green@redhat.com>
-
- * configure.host: Add iq2000 support.
- * newlib/libc/include/machine/ieeefp.h: Ditto.
- * newlib/libc/include/machine/setjmp.h: Ditto.
- * libc/machine/iq2000, libc/machine/iq2000/setjmp.S,
- libc/machine/iq2000/aclocal.m4, libc/machine/iq2000/configure,
- libc/machine/iq2000/configure.in, libc/machine/iq2000/Makefile.am,
- libc/machine/iq2000/Makefile.in: New files.
-
-2003-06-10 Richard Sandiford <rsandifo@redhat.com>
-
- * libc/sys/h8300hms/setarch.h: New file.
- * libc/sys/h8300hms/close.S, libc/sys/h8300hms/fstat.S,
- libc/sys/h8300hms/lseek.S, libc/sys/h8300hms/open.S,
- libc/sys/h8300hms/read.S, libc/sys/h8300hms/stat.S,
- libc/sys/h8300hms/write.S, libc/sys/h8300hms/crt0.S: Use it.
-
-2003-06-06 Jeff Johnston <jjohnstn@redhat.com>
-
- * libc/argz/argz_add.c: Change to use _DEFUN macro for function
- definition.
- * libc/argz/argz_add_sep.c: Ditto.
- * libc/argz/argz_append.c libc/argz/argz_count.c: Ditto.
- * libc/argz/argz_create.c libc/argz/argz_create_sep.c: Ditto.
- * libc/argz/argz_delete.c libc/argz/argz_extract.c: Ditto.
- * libc/argz/argz_insert.c libc/argz/argz_next.c: Ditto.
- * libc/argz/argz_replace.c libc/argz/argz_stringify.c: Ditto.
- * libc/argz/envz_add.c libc/argz/envz_entry.c: Ditto.
- * libc/argz/envz_get.c libc/argz/envz_merge.c: Ditto.
- * libc/argz/envz_remove.c libc/argz/envz_strip.c: Ditto.
- * libc/locale/nl_langinfo.c libc/misc/ffs.c: Ditto.
- * libc/posix/closedir.c libc/posix/creat.c: Ditto.
- * libc/posix/execl.c libc/posix/execle.c: Ditto.
- * libc/posix/execlp.c libc/posix/execve.c: Ditto.
- * libc/posix/isatty.c libc/posix/opendir.c: Ditto.
- * libc/posix/popen.c libc/posix/readdir.c: Ditto.
- * libc/posix/readdir_r.c libc/posix/rewinddir.c: Ditto.
- * libc/posix/scandir.c libc/posix/seekdir.c: Ditto.
- * libc/posix/telldir.c libc/search/hcreate.c: Ditto.
- * libc/search/tdelete.c libc/search/tdestroy.c: Ditto.
- * libc/search/tfind.c libc/search/tsearch.c: Ditto.
- * libc/search/twalk.c libc/signal/signal.c: Ditto.
-
-2003-06-05 Nick Clifton <nickc@redhat.com>
-
- * libc/include/sys/reent.h (struct _on_exit_args): New
- structure containing fields used by the on_exit() function.
- (struct _atexit): Include struct _on_exit_args. For
- _REENT_SMALL do his via a pointer that is initialised when
- needed.
- * libc/reent/reent.c (_reclaim_reent): Free the _on_exit_args
- structure, if one has been allocated.
- * libc/stdlib/atexit.c (atexit): Update indirection to
- _fntypes field.
- * libc/stdlib/on_exit.c (on_exit): Indirect via the
- _on_exit_args structure. For _REENT_SMALL, allocate a
- structure if one does not exist.
- * libc/stdlib/exit.c (exit): Indirect via the _on_exit_args
- structure.
-
-2003-06-04 Jeff Johnston <jjohnstn@redhat.com>
-
- * libc/sys/linux/net/Makefile.am: Remove extraneous markers.
- * libc/sys/linux/net/Makefile.in: Regenerated.
-
-2003-06-03 Jeff Johnston <jjohnstn@redhat.com>
-
- * libc/reent/execr.c: Use _DEFUN macro for function declaration.
- * libc/reent/fcntlr.c: Ditto.
- * libc/reent/fstat64r.c: Ditto.
- * libc/reent/linkr.c: Ditto.
- * libc/reent/lseek64r.c: Ditto.
- * libc/reent/lseekr.c: Ditto.
- * libc/reent/openr.c: Ditto.
- * libc/reent/readr.c: Ditto.
- * libc/reent/reent.c: Ditto.
- * libc/reent/sbrkr.c: Ditto.
- * libc/reent/signalr.c: Ditto.
- * libc/reent/signgam.c: Ditto.
- * libc/reent/statr.c: Ditto.
- * libc/reent/timer.c: Ditto.
- * libc/reent/unlinkr.c: Ditto.
- * libc/reent/writer.c: Ditto.
- * libc/syscalls/sysclose.c: Ditto.
- * libc/syscalls/sysexecve.c: Ditto.
- * libc/syscalls/sysfcntl.c: Ditto.
- * libc/syscalls/sysfork.c: Ditto.
- * libc/syscalls/sysfstat.c: Ditto.
- * libc/syscalls/sysgetpid.c: Ditto.
- * libc/syscalls/sysgettod.c: Ditto.
- * libc/syscalls/syskill.c: Ditto.
- * libc/syscalls/syslink.c: Ditto.
- * libc/syscalls/syslseek.c: Ditto.
- * libc/syscalls/sysopen.c: Ditto.
- * libc/syscalls/sysread.c: Ditto.
- * libc/syscalls/syssbrk.c: Ditto.
- * libc/syscalls/sysstat.c: Ditto.
- * libc/syscalls/systimes.c: Ditto.
- * libc/syscalls/sysunlink.c: Ditto.
- * libc/syscalls/syswait.c: Ditto.
- * libc/syscalls/syswrite.c: Ditto.
-
-2003-06-03 Till Straumann <strauman@SLAC.Stanford.EDU>
-
- * libc/time/tzset_r.c: Change local variables that are
- set via sscanf using the %h format specifier to be unsigned short
- instead of int.
-
-2003-05-30 Kelley Cook <kelleycook@wideopenwest.com>
-
- * configure.host: Allow i[34567]86 variant.
- * configure.in: Likewise.
- * README: Likewise to the docs.
- * configure: Regenerated.
- * Makefile.in: Ditto.
-
-2003-05-28 Jeff Johnston <jjohnstn@redhat.com>
- Tom Fitzsimmons <fitzsim@redhat.com>
-
- * configure.in: Add iconvdata support for x86 linux.
- * configure: Regenerated.
- * libc/sys/linux/Makefile.am: Add EL/IX level 3 network, dynamic
- library, iconv, and linuxthreads support.
- * libc/sys/linux/configure.in: Ditto.
- * libc/sys/linux/Makefile.in: Regenerated.
- * libc/sys/linux/configure: Ditto.
- * iconvdata/EUC-JP.irreversible: New file.
- * iconvdata/Makefile.am: Ditto.
- * iconvdata/Makefile.in: Ditto.
- * iconvdata/SJIS.irreversible: Ditto.
- * iconvdata/aclocal.m4: Ditto.
- * iconvdata/configure: Ditto.
- * iconvdata/configure.in: Ditto.
- * iconvdata/dummy.c: Ditto.
- * iconvdata/euc-jp.c: Ditto.
- * iconvdata/gconv-modules: Ditto.
- * iconvdata/jis0201.c: Ditto.
- * iconvdata/jis0201.h: Ditto.
- * iconvdata/jis0208.c: Ditto.
- * iconvdata/jis0208.h: Ditto.
- * iconvdata/jis0212.c: Ditto.
- * iconvdata/jis0212.h: Ditto.
- * iconvdata/sjis.c: Ditto.
- * libc/include/errno.h: Protect definition of error_t.
- * libc/sys/linux/gethostid.c: New file.
- * libc/sys/linux/sethostid.c: Ditto.
- * libc/sys/linux/dl/Makefile.am: Ditto.
- * libc/sys/linux/dl/Makefile.in: Ditto.
- * libc/sys/linux/dl/abi-tag.h: Ditto.
- * libc/sys/linux/dl/atomicity.h: Ditto.
- * libc/sys/linux/dl/dl-addr.c: Ditto.
- * libc/sys/linux/dl/dl-cache.c: Ditto.
- * libc/sys/linux/dl/dl-cache.h: Ditto.
- * libc/sys/linux/dl/dl-close.c: Ditto.
- * libc/sys/linux/dl/dl-debug.c: Ditto.
- * libc/sys/linux/dl/dl-deps.c: Ditto.
- * libc/sys/linux/dl/dl-dst.h: Ditto.
- * libc/sys/linux/dl/dl-error.c: Ditto.
- * libc/sys/linux/dl/dl-fini.c: Ditto.
- * libc/sys/linux/dl/dl-init.c: Ditto.
- * libc/sys/linux/dl/dl-iteratephdr.c: Ditto.
- * libc/sys/linux/dl/dl-libc.c: Ditto.
- * libc/sys/linux/dl/dl-librecon.h: Ditto.
- * libc/sys/linux/dl/dl-load.c: Ditto.
- * libc/sys/linux/dl/dl-lookup.c: Ditto.
- * libc/sys/linux/dl/dl-lookupcfg.h: Ditto.
- * libc/sys/linux/dl/dl-minimal.c: Ditto.
- * libc/sys/linux/dl/dl-misc.c: Ditto.
- * libc/sys/linux/dl/dl-object.c: Ditto.
- * libc/sys/linux/dl/dl-open.c: Ditto.
- * libc/sys/linux/dl/dl-osinfo.h: Ditto.
- * libc/sys/linux/dl/dl-profile.c: Ditto.
- * libc/sys/linux/dl/dl-profstub.c: Ditto.
- * libc/sys/linux/dl/dl-reloc.c: Ditto.
- * libc/sys/linux/dl/dl-runtime.c: Ditto.
- * libc/sys/linux/dl/dl-support.c: Ditto.
- * libc/sys/linux/dl/dl-sym.c: Ditto.
- * libc/sys/linux/dl/dl-version.c: Ditto.
- * libc/sys/linux/dl/dlfcn.h: Ditto.
- * libc/sys/linux/dl/do-lookup.h: Ditto.
- * libc/sys/linux/dl/do-rel.h: Ditto.
- * libc/sys/linux/dl/dynamic-link.h: Ditto.
- * libc/sys/linux/dl/kernel-features.h: Ditto.
- * libc/sys/linux/dl/ldsodefs.h: Ditto.
- * libc/sys/linux/dl/libintl.h: Ditto.
- * libc/sys/linux/dl/trusted-dirs.h: Ditto.
- * libc/sys/linux/dl/unsecvars.h: Ditto.
- * libc/sys/linux/iconv/Makefile.am: Ditto.
- * libc/sys/linux/iconv/Makefile.in: Ditto.
- * libc/sys/linux/iconv/categories.def: Ditto.
- * libc/sys/linux/iconv/dummy-repertoire.c: Ditto.
- * libc/sys/linux/iconv/gconv.c: Ditto.
- * libc/sys/linux/iconv/gconv_builtin.c: Ditto.
- * libc/sys/linux/iconv/gconv_builtin.h: Ditto.
- * libc/sys/linux/iconv/gconv_cache.c: Ditto.
- * libc/sys/linux/iconv/gconv_charset.h: Ditto.
- * libc/sys/linux/iconv/gconv_close.c: Ditto.
- * libc/sys/linux/iconv/gconv_conf.c: Ditto.
- * libc/sys/linux/iconv/gconv_db.c: Ditto.
- * libc/sys/linux/iconv/gconv_dl.c: Ditto.
- * libc/sys/linux/iconv/gconv_int.h: Ditto.
- * libc/sys/linux/iconv/gconv_open.c: Ditto.
- * libc/sys/linux/iconv/gconv_simple.c: Ditto.
- * libc/sys/linux/iconv/gconv_trans.c: Ditto.
- * libc/sys/linux/iconv/hash-string.h: Ditto.
- * libc/sys/linux/iconv/iconv.c: Ditto.
- * libc/sys/linux/iconv/iconv.h: Ditto.
- * libc/sys/linux/iconv/iconv_charmap.c: Ditto.
- * libc/sys/linux/iconv/iconv_close.c: Ditto.
- * libc/sys/linux/iconv/iconv_open.c: Ditto.
- * libc/sys/linux/iconv/iconvconfig.c: Ditto.
- * libc/sys/linux/iconv/iconvconfig.h: Ditto.
- * libc/sys/linux/iconv/loadinfo.h: Ditto.
- * libc/sys/linux/iconv/localeinfo.h: Ditto.
- * libc/sys/linux/iconv/loop.c: Ditto.
- * libc/sys/linux/iconv/skeleton.c: Ditto.
- * libc/sys/linux/iconv/strtab.c: Ditto.
- * libc/sys/linux/include/dl-hash.h: Ditto.
- * libc/sys/linux/include/dlfcn.h: Ditto.
- * libc/sys/linux/include/fnmatch.h: Ditto.
- * libc/sys/linux/include/gconv.h: Ditto.
- * libc/sys/linux/include/glob.h: Ditto.
- * libc/sys/linux/include/hesiod.h: Ditto.
- * libc/sys/linux/include/ifaddrs.h: Ditto.
- * libc/sys/linux/include/libc_private.h: Ditto.
- * libc/sys/linux/include/link.h: Ditto.
- * libc/sys/linux/include/namespace.h: Ditto.
- * libc/sys/linux/include/netconfig.h: Ditto.
- * libc/sys/linux/include/netdb.h: Ditto.
- * libc/sys/linux/include/nsswitch.h: Ditto.
- * libc/sys/linux/include/regex.h: Ditto.
- * libc/sys/linux/include/resolv.h: Ditto.
- * libc/sys/linux/include/rune.h: Ditto.
- * libc/sys/linux/include/runetype.h: Ditto.
- * libc/sys/linux/include/semaphore.h: Ditto.
- * libc/sys/linux/include/setlocale.h: Ditto.
- * libc/sys/linux/include/un-namespace.h: Ditto.
- * libc/sys/linux/include/wordexp.h: Ditto.
- * libc/sys/linux/include/arpa/ftp.h: Ditto.
- * libc/sys/linux/include/arpa/inet.h: Ditto.
- * libc/sys/linux/include/arpa/nameser.h: Ditto.
- * libc/sys/linux/include/arpa/nameser_compat.h: Ditto.
- * libc/sys/linux/include/arpa/telnet.h: Ditto.
- * libc/sys/linux/include/arpa/tftp.h: Ditto.
- * libc/sys/linux/include/net/bpf.h: Ditto.
- * libc/sys/linux/include/net/bpf_compat.h: Ditto.
- * libc/sys/linux/include/net/bpfdesc.h: Ditto.
- * libc/sys/linux/include/net/bridge.h: Ditto.
- * libc/sys/linux/include/net/ethernet.h: Ditto.
- * libc/sys/linux/include/net/fddi.h: Ditto.
- * libc/sys/linux/include/net/if.h: Ditto.
- * libc/sys/linux/include/net/if_arc.h: Ditto.
- * libc/sys/linux/include/net/if_arp.h: Ditto.
- * libc/sys/linux/include/net/if_atm.h: Ditto.
- * libc/sys/linux/include/net/if_dl.h: Ditto.
- * libc/sys/linux/include/net/if_gif.h: Ditto.
- * libc/sys/linux/include/net/if_ieee80211.h: Ditto.
- * libc/sys/linux/include/net/if_llc.h: Ditto.
- * libc/sys/linux/include/net/if_media.h: Ditto.
- * libc/sys/linux/include/net/if_mib.h: Ditto.
- * libc/sys/linux/include/net/if_ppp.h: Ditto.
- * libc/sys/linux/include/net/if_pppvar.h: Ditto.
- * libc/sys/linux/include/net/if_slvar.h: Ditto.
- * libc/sys/linux/include/net/if_sppp.h: Ditto.
- * libc/sys/linux/include/net/if_stf.h: Ditto.
- * libc/sys/linux/include/net/if_tap.h: Ditto.
- * libc/sys/linux/include/net/if_tapvar.h: Ditto.
- * libc/sys/linux/include/net/if_tun.h: Ditto.
- * libc/sys/linux/include/net/if_tunvar.h: Ditto.
- * libc/sys/linux/include/net/if_types.h: Ditto.
- * libc/sys/linux/include/net/if_var.h: Ditto.
- * libc/sys/linux/include/net/if_vlan_var.h: Ditto.
- * libc/sys/linux/include/net/intrq.h: Ditto.
- * libc/sys/linux/include/net/iso88025.h: Ditto.
- * libc/sys/linux/include/net/net_osdep.h: Ditto.
- * libc/sys/linux/include/net/netisr.h: Ditto.
- * libc/sys/linux/include/net/pfil.h: Ditto.
- * libc/sys/linux/include/net/pfkeyv2.h: Ditto.
- * libc/sys/linux/include/net/ppp_comp.h: Ditto.
- * libc/sys/linux/include/net/ppp_defs.h: Ditto.
- * libc/sys/linux/include/net/radix.h: Ditto.
- * libc/sys/linux/include/net/raw_cb.h: Ditto.
- * libc/sys/linux/include/net/route.h: Ditto.
- * libc/sys/linux/include/net/slcompress.h: Ditto.
- * libc/sys/linux/include/net/slip.h: Ditto.
- * libc/sys/linux/include/net/zlib.h: Ditto.
- * libc/sys/linux/include/netinet/icmp6.h: Ditto.
- * libc/sys/linux/include/netinet/icmp_var.h: Ditto.
- * libc/sys/linux/include/netinet/if_atm.h: Ditto.
- * libc/sys/linux/include/netinet/if_ether.h: Ditto.
- * libc/sys/linux/include/netinet/igmp.h: Ditto.
- * libc/sys/linux/include/netinet/igmp_var.h: Ditto.
- * libc/sys/linux/include/netinet/in.h: Ditto.
- * libc/sys/linux/include/netinet/in_gif.h: Ditto.
- * libc/sys/linux/include/netinet/in_pcb.h: Ditto.
- * libc/sys/linux/include/netinet/in_systm.h: Ditto.
- * libc/sys/linux/include/netinet/in_var.h: Ditto.
- * libc/sys/linux/include/netinet/ip.h: Ditto.
- * libc/sys/linux/include/netinet/ip6.h: Ditto.
- * libc/sys/linux/include/netinet/ip_dummynet.h: Ditto.
- * libc/sys/linux/include/netinet/ip_ecn.h: Ditto.
- * libc/sys/linux/include/netinet/ip_encap.h: Ditto.
- * libc/sys/linux/include/netinet/ip_flow.h: Ditto.
- * libc/sys/linux/include/netinet/ip_fw.h: Ditto.
- * libc/sys/linux/include/netinet/ip_icmp.h: Ditto.
- * libc/sys/linux/include/netinet/ip_mroute.h: Ditto.
- * libc/sys/linux/include/netinet/ip_var.h: Ditto.
- * libc/sys/linux/include/netinet/ipprotosw.h: Ditto.
- * libc/sys/linux/include/netinet/tcp.h: Ditto.
- * libc/sys/linux/include/netinet/tcp_debug.h: Ditto.
- * libc/sys/linux/include/netinet/tcp_fsm.h: Ditto.
- * libc/sys/linux/include/netinet/tcp_seq.h: Ditto.
- * libc/sys/linux/include/netinet/tcp_timer.h: Ditto.
- * libc/sys/linux/include/netinet/tcp_var.h: Ditto.
- * libc/sys/linux/include/netinet/tcpip.h: Ditto.
- * libc/sys/linux/include/netinet/udp.h: Ditto.
- * libc/sys/linux/include/netinet/udp_var.h: Ditto.
- * libc/sys/linux/include/netinet6/ah.h: Ditto.
- * libc/sys/linux/include/netinet6/ah6.h: Ditto.
- * libc/sys/linux/include/netinet6/esp.h: Ditto.
- * libc/sys/linux/include/netinet6/esp6.h: Ditto.
- * libc/sys/linux/include/netinet6/esp_rijndael.h: Ditto.
- * libc/sys/linux/include/netinet6/icmp6.h: Ditto.
- * libc/sys/linux/include/netinet6/in6.h: Ditto.
- * libc/sys/linux/include/netinet6/in6_gif.h: Ditto.
- * libc/sys/linux/include/netinet6/in6_ifattach.h: Ditto.
- * libc/sys/linux/include/netinet6/in6_pcb.h: Ditto.
- * libc/sys/linux/include/netinet6/in6_prefix.h: Ditto.
- * libc/sys/linux/include/netinet6/in6_var.h: Ditto.
- * libc/sys/linux/include/netinet6/ip6.h: Ditto.
- * libc/sys/linux/include/netinet6/ip6_ecn.h: Ditto.
- * libc/sys/linux/include/netinet6/ip6_fw.h: Ditto.
- * libc/sys/linux/include/netinet6/ip6_mroute.h: Ditto.
- * libc/sys/linux/include/netinet6/ip6_var.h: Ditto.
- * libc/sys/linux/include/netinet6/ip6protosw.h: Ditto.
- * libc/sys/linux/include/netinet6/ipcomp.h: Ditto.
- * libc/sys/linux/include/netinet6/ipcomp6.h: Ditto.
- * libc/sys/linux/include/netinet6/ipsec.h: Ditto.
- * libc/sys/linux/include/netinet6/ipsec6.h: Ditto.
- * libc/sys/linux/include/netinet6/mld6_var.h: Ditto.
- * libc/sys/linux/include/netinet6/nd6.h: Ditto.
- * libc/sys/linux/include/netinet6/pim6.h: Ditto.
- * libc/sys/linux/include/netinet6/pim6_var.h: Ditto.
- * libc/sys/linux/include/netinet6/raw_ip6.h: Ditto.
- * libc/sys/linux/include/netinet6/scope6_var.h: Ditto.
- * libc/sys/linux/include/netinet6/tcp6_var.h: Ditto.
- * libc/sys/linux/include/netinet6/udp6_var.h: Ditto.
- * libc/sys/linux/include/netns/idp.h: Ditto.
- * libc/sys/linux/include/netns/idp_var.h: Ditto.
- * libc/sys/linux/include/netns/ns.h: Ditto.
- * libc/sys/linux/include/netns/ns_error.h: Ditto.
- * libc/sys/linux/include/netns/ns_if.h: Ditto.
- * libc/sys/linux/include/netns/ns_pcb.h: Ditto.
- * libc/sys/linux/include/netns/sp.h: Ditto.
- * libc/sys/linux/include/netns/spidp.h: Ditto.
- * libc/sys/linux/include/netns/spp_debug.h: Ditto.
- * libc/sys/linux/include/netns/spp_timer.h: Ditto.
- * libc/sys/linux/include/netns/spp_var.h: Ditto.
- * libc/sys/linux/include/rpc/Makefile: Ditto.
- * libc/sys/linux/include/rpc/auth.h: Ditto.
- * libc/sys/linux/include/rpc/auth_des.h: Ditto.
- * libc/sys/linux/include/rpc/auth_kerb.h: Ditto.
- * libc/sys/linux/include/rpc/auth_unix.h: Ditto.
- * libc/sys/linux/include/rpc/clnt.h: Ditto.
- * libc/sys/linux/include/rpc/clnt_soc.h: Ditto.
- * libc/sys/linux/include/rpc/clnt_stat.h: Ditto.
- * libc/sys/linux/include/rpc/des.h: Ditto.
- * libc/sys/linux/include/rpc/des_crypt.h: Ditto.
- * libc/sys/linux/include/rpc/nettype.h: Ditto.
- * libc/sys/linux/include/rpc/pmap_clnt.h: Ditto.
- * libc/sys/linux/include/rpc/pmap_prot.h: Ditto.
- * libc/sys/linux/include/rpc/pmap_rmt.h: Ditto.
- * libc/sys/linux/include/rpc/raw.h: Ditto.
- * libc/sys/linux/include/rpc/rpc.h: Ditto.
- * libc/sys/linux/include/rpc/rpc_com.h: Ditto.
- * libc/sys/linux/include/rpc/rpc_msg.h: Ditto.
- * libc/sys/linux/include/rpc/rpcb_clnt.h: Ditto.
- * libc/sys/linux/include/rpc/rpcb_prot.h: Ditto.
- * libc/sys/linux/include/rpc/rpcb_prot.x: Ditto.
- * libc/sys/linux/include/rpc/rpcent.h: Ditto.
- * libc/sys/linux/include/rpc/svc.h: Ditto.
- * libc/sys/linux/include/rpc/svc_auth.h: Ditto.
- * libc/sys/linux/include/rpc/svc_dg.h: Ditto.
- * libc/sys/linux/include/rpc/svc_soc.h: Ditto.
- * libc/sys/linux/include/rpc/types.h: Ditto.
- * libc/sys/linux/include/rpc/xdr.h: Ditto.
- * libc/sys/linux/intl/Makefile.am: Ditto.
- * libc/sys/linux/intl/Makefile.in: Ditto.
- * libc/sys/linux/intl/bindtextdom.c: Ditto.
- * libc/sys/linux/intl/catgets.c: Ditto.
- * libc/sys/linux/intl/catgetsinfo.h: Ditto.
- * libc/sys/linux/intl/config.h: Ditto.
- * libc/sys/linux/intl/dcgettext.c: Ditto.
- * libc/sys/linux/intl/dcigettext.c: Ditto.
- * libc/sys/linux/intl/dcngettext.c: Ditto.
- * libc/sys/linux/intl/dgettext.c: Ditto.
- * libc/sys/linux/intl/dngettext.c: Ditto.
- * libc/sys/linux/intl/explodename.c: Ditto.
- * libc/sys/linux/intl/finddomain.c: Ditto.
- * libc/sys/linux/intl/gettext.c: Ditto.
- * libc/sys/linux/intl/gettext.h: Ditto.
- * libc/sys/linux/intl/gettextP.h: Ditto.
- * libc/sys/linux/intl/hash-string.h: Ditto.
- * libc/sys/linux/intl/l10nflist.c: Ditto.
- * libc/sys/linux/intl/loadinfo.h: Ditto.
- * libc/sys/linux/intl/loadmsgcat.c: Ditto.
- * libc/sys/linux/intl/locale.alias: Ditto.
- * libc/sys/linux/intl/localealias.c: Ditto.
- * libc/sys/linux/intl/ngettext.c: Ditto.
- * libc/sys/linux/intl/open_catalog.c: Ditto.
- * libc/sys/linux/intl/plural.c: Ditto.
- * libc/sys/linux/intl/plural.y: Ditto.
- * libc/sys/linux/intl/stpcpy.c: Ditto.
- * libc/sys/linux/intl/textdomain.c: Ditto.
- * libc/sys/linux/linuxthreads/LICENSE: Ditto.
- * libc/sys/linux/linuxthreads/Makefile.am: Ditto.
- * libc/sys/linux/linuxthreads/Makefile.in: Ditto.
- * libc/sys/linux/linuxthreads/aclocal.m4: Ditto.
- * libc/sys/linux/linuxthreads/attr.c: Ditto.
- * libc/sys/linux/linuxthreads/barrier.c: Ditto.
- * libc/sys/linux/linuxthreads/bp-sym.h: Ditto.
- * libc/sys/linux/linuxthreads/cancel.c: Ditto.
- * libc/sys/linux/linuxthreads/condvar.c: Ditto.
- * libc/sys/linux/linuxthreads/config.h: Ditto.
- * libc/sys/linux/linuxthreads/configure: Ditto.
- * libc/sys/linux/linuxthreads/configure.in: Ditto.
- * libc/sys/linux/linuxthreads/defs.awk: Ditto.
- * libc/sys/linux/linuxthreads/ecmutex.c: Ditto.
- * libc/sys/linux/linuxthreads/events.c: Ditto.
- * libc/sys/linux/linuxthreads/getcpuclockid.c: Ditto.
- * libc/sys/linux/linuxthreads/getreent.c: Ditto.
- * libc/sys/linux/linuxthreads/internals.h: Ditto.
- * libc/sys/linux/linuxthreads/join.c: Ditto.
- * libc/sys/linux/linuxthreads/joinrace.c: Ditto.
- * libc/sys/linux/linuxthreads/kernel-features.h: Ditto.
- * libc/sys/linux/linuxthreads/libc-internal.h: Ditto.
- * libc/sys/linux/linuxthreads/libc-symbols.h: Ditto.
- * libc/sys/linux/linuxthreads/linuxthreads.texi: Ditto.
- * libc/sys/linux/linuxthreads/lockfile.c: Ditto.
- * libc/sys/linux/linuxthreads/manager.c: Ditto.
- * libc/sys/linux/linuxthreads/mq_notify.c: Ditto.
- * libc/sys/linux/linuxthreads/mutex.c: Ditto.
- * libc/sys/linux/linuxthreads/no-tsd.c: Ditto.
- * libc/sys/linux/linuxthreads/oldsemaphore.c: Ditto.
- * libc/sys/linux/linuxthreads/posix-timer.h: Ditto.
- * libc/sys/linux/linuxthreads/prio.c: Ditto.
- * libc/sys/linux/linuxthreads/proc_service.h: Ditto.
- * libc/sys/linux/linuxthreads/pt-machine.c: Ditto.
- * libc/sys/linux/linuxthreads/ptclock_gettime.c: Ditto.
- * libc/sys/linux/linuxthreads/ptclock_settime.c: Ditto.
- * libc/sys/linux/linuxthreads/ptfork.c: Ditto.
- * libc/sys/linux/linuxthreads/pthread.c: Ditto.
- * libc/sys/linux/linuxthreads/ptlongjmp.c: Ditto.
- * libc/sys/linux/linuxthreads/queue.h: Ditto.
- * libc/sys/linux/linuxthreads/reent.c: Ditto.
- * libc/sys/linux/linuxthreads/reqsyscalls.c: Ditto.
- * libc/sys/linux/linuxthreads/restart.h: Ditto.
- * libc/sys/linux/linuxthreads/rwlock.c: Ditto.
- * libc/sys/linux/linuxthreads/semaphore.c: Ditto.
- * libc/sys/linux/linuxthreads/semaphore.h: Ditto.
- * libc/sys/linux/linuxthreads/shlib-compat.h: Ditto.
- * libc/sys/linux/linuxthreads/signals.c: Ditto.
- * libc/sys/linux/linuxthreads/specific.c: Ditto.
- * libc/sys/linux/linuxthreads/spinlock.c: Ditto.
- * libc/sys/linux/linuxthreads/spinlock.h: Ditto.
- * libc/sys/linux/linuxthreads/sysctl.c: Ditto.
- * libc/sys/linux/linuxthreads/td_init.c: Ditto.
- * libc/sys/linux/linuxthreads/td_log.c: Ditto.
- * libc/sys/linux/linuxthreads/td_symbol_list.c: Ditto.
- * libc/sys/linux/linuxthreads/td_ta_clear_event.c: Ditto.
- * libc/sys/linux/linuxthreads/td_ta_delete.c: Ditto.
- * libc/sys/linux/linuxthreads/td_ta_enable_stats.c: Ditto.
- * libc/sys/linux/linuxthreads/td_ta_event_addr.c: Ditto.
- * libc/sys/linux/linuxthreads/td_ta_event_getmsg.c: Ditto.
- * libc/sys/linux/linuxthreads/td_ta_get_nthreads.c: Ditto.
- * libc/sys/linux/linuxthreads/td_ta_get_ph.c: Ditto.
- * libc/sys/linux/linuxthreads/td_ta_get_stats.c: Ditto.
- * libc/sys/linux/linuxthreads/td_ta_map_id2thr.c: Ditto.
- * libc/sys/linux/linuxthreads/td_ta_map_lwp2thr.c: Ditto.
- * libc/sys/linux/linuxthreads/td_ta_new.c: Ditto.
- * libc/sys/linux/linuxthreads/td_ta_reset_stats.c: Ditto.
- * libc/sys/linux/linuxthreads/td_ta_set_event.c: Ditto.
- * libc/sys/linux/linuxthreads/td_ta_setconcurrency.c: Ditto.
- * libc/sys/linux/linuxthreads/td_ta_thr_iter.c: Ditto.
- * libc/sys/linux/linuxthreads/td_ta_tsd_iter.c: Ditto.
- * libc/sys/linux/linuxthreads/td_thr_clear_event.c: Ditto.
- * libc/sys/linux/linuxthreads/td_thr_dbresume.c: Ditto.
- * libc/sys/linux/linuxthreads/td_thr_dbsuspend.c: Ditto.
- * libc/sys/linux/linuxthreads/td_thr_event_enable.c: Ditto.
- * libc/sys/linux/linuxthreads/td_thr_event_getmsg.c: Ditto.
- * libc/sys/linux/linuxthreads/td_thr_get_info.c: Ditto.
- * libc/sys/linux/linuxthreads/td_thr_getfpregs.c: Ditto.
- * libc/sys/linux/linuxthreads/td_thr_getgregs.c: Ditto.
- * libc/sys/linux/linuxthreads/td_thr_getxregs.c: Ditto.
- * libc/sys/linux/linuxthreads/td_thr_getxregsize.c: Ditto.
- * libc/sys/linux/linuxthreads/td_thr_set_event.c: Ditto.
- * libc/sys/linux/linuxthreads/td_thr_setfpregs.c: Ditto.
- * libc/sys/linux/linuxthreads/td_thr_setgregs.c: Ditto.
- * libc/sys/linux/linuxthreads/td_thr_setprio.c: Ditto.
- * libc/sys/linux/linuxthreads/td_thr_setsigpending.c: Ditto.
- * libc/sys/linux/linuxthreads/td_thr_setxregs.c: Ditto.
- * libc/sys/linux/linuxthreads/td_thr_sigsetmask.c: Ditto.
- * libc/sys/linux/linuxthreads/td_thr_tsd.c: Ditto.
- * libc/sys/linux/linuxthreads/td_thr_validate.c: Ditto.
- * libc/sys/linux/linuxthreads/testrtsig.h: Ditto.
- * libc/sys/linux/linuxthreads/thread_db.h: Ditto.
- * libc/sys/linux/linuxthreads/thread_dbP.h: Ditto.
- * libc/sys/linux/linuxthreads/timer_create.c: Ditto.
- * libc/sys/linux/linuxthreads/timer_delete.c: Ditto.
- * libc/sys/linux/linuxthreads/timer_getoverr.c: Ditto.
- * libc/sys/linux/linuxthreads/timer_gettime.c: Ditto.
- * libc/sys/linux/linuxthreads/timer_routines.c: Ditto.
- * libc/sys/linux/linuxthreads/timer_settime.c: Ditto.
- * libc/sys/linux/linuxthreads/tst-cancel.c: Ditto.
- * libc/sys/linux/linuxthreads/tst-context.c: Ditto.
- * libc/sys/linux/linuxthreads/tststack.c: Ditto.
- * libc/sys/linux/linuxthreads/unload.c: Ditto.
- * libc/sys/linux/linuxthreads/weaks.c: Ditto.
- * libc/sys/linux/linuxthreads/wrapsyscall.c: Ditto.
- * libc/sys/linux/linuxthreads/bits/initspin.h: Ditto.
- * libc/sys/linux/linuxthreads/bits/libc-lock.h: Ditto.
- * libc/sys/linux/linuxthreads/bits/libc-tsd.h: Ditto.
- * libc/sys/linux/linuxthreads/bits/local_lim.h: Ditto.
- * libc/sys/linux/linuxthreads/bits/posix_opt.h: Ditto.
- * libc/sys/linux/linuxthreads/bits/pthreadtypes.h: Ditto.
- * libc/sys/linux/linuxthreads/bits/sigthread.h: Ditto.
- * libc/sys/linux/linuxthreads/machine/Makefile.am: Ditto.
- * libc/sys/linux/linuxthreads/machine/Makefile.in: Ditto.
- * libc/sys/linux/linuxthreads/machine/aclocal.m4: Ditto.
- * libc/sys/linux/linuxthreads/machine/configure: Ditto.
- * libc/sys/linux/linuxthreads/machine/configure.in: Ditto.
- * libc/sys/linux/linuxthreads/machine/generic/generic-sysd: Ditto.ep.h
- * libc/sys/linux/linuxthreads/machine/i386/Makefile.am: Ditto.
- * libc/sys/linux/linuxthreads/machine/i386/Makefile.in: Ditto.
- * libc/sys/linux/linuxthreads/machine/i386/aclocal.m4: Ditto.
- * libc/sys/linux/linuxthreads/machine/i386/bp-asm.h: Ditto.
- * libc/sys/linux/linuxthreads/machine/i386/clone.S: Ditto.
- * libc/sys/linux/linuxthreads/machine/i386/configure: Ditto.
- * libc/sys/linux/linuxthreads/machine/i386/configure.in: Ditto.
- * libc/sys/linux/linuxthreads/machine/i386/i386-sysdep.S: Ditto.
- * libc/sys/linux/linuxthreads/machine/i386/i386-sysdep.h: Ditto.
- * libc/sys/linux/linuxthreads/machine/i386/pspinlock.c: Ditto.
- * libc/sys/linux/linuxthreads/machine/i386/pt-machine.h: Ditto.
- * libc/sys/linux/linuxthreads/machine/i386/sigcontextinfo.h: Ditto.
- * libc/sys/linux/linuxthreads/machine/i386/stackinfo.h: Ditto.
- * libc/sys/linux/linuxthreads/machine/i386/sysdep.S: Ditto.
- * libc/sys/linux/linuxthreads/machine/i386/sysdep.h: Ditto.
- * libc/sys/linux/linuxthreads/machine/i386/useldt.h: Ditto.
- * libc/sys/linux/machine/i386/dl-machine.h: Ditto.
- * libc/sys/linux/net/Makefile.am: Ditto.
- * libc/sys/linux/net/Makefile.in: Ditto.
- * libc/sys/linux/net/addr2ascii.3: Ditto.
- * libc/sys/linux/net/addr2ascii.c: Ditto.
- * libc/sys/linux/net/ascii2addr.c: Ditto.
- * libc/sys/linux/net/base64.c: Ditto.
- * libc/sys/linux/net/bindresvport.c: Ditto.
- * libc/sys/linux/net/byteorder.3: Ditto.
- * libc/sys/linux/net/ether_addr.c: Ditto.
- * libc/sys/linux/net/ethers.3: Ditto.
- * libc/sys/linux/net/getaddrinfo.3: Ditto.
- * libc/sys/linux/net/getaddrinfo.c: Ditto.
- * libc/sys/linux/net/gethostbydns.c: Ditto.
- * libc/sys/linux/net/gethostbyht.c: Ditto.
- * libc/sys/linux/net/gethostbyname.3: Ditto.
- * libc/sys/linux/net/gethostbynis.c: Ditto.
- * libc/sys/linux/net/gethostnamadr.c: Ditto.
- * libc/sys/linux/net/getifaddrs.3: Ditto.
- * libc/sys/linux/net/getifaddrs.c: Ditto.
- * libc/sys/linux/net/getipnodebyname.3: Ditto.
- * libc/sys/linux/net/getnameinfo.3: Ditto.
- * libc/sys/linux/net/getnameinfo.c: Ditto.
- * libc/sys/linux/net/getnetbydns.c: Ditto.
- * libc/sys/linux/net/getnetbyht.c: Ditto.
- * libc/sys/linux/net/getnetbynis.c: Ditto.
- * libc/sys/linux/net/getnetent.3: Ditto.
- * libc/sys/linux/net/getnetnamadr.c: Ditto.
- * libc/sys/linux/net/getproto.c: Ditto.
- * libc/sys/linux/net/getprotoent.3: Ditto.
- * libc/sys/linux/net/getprotoent.c: Ditto.
- * libc/sys/linux/net/getprotoname.c: Ditto.
- * libc/sys/linux/net/getservbyname.c: Ditto.
- * libc/sys/linux/net/getservbyport.c: Ditto.
- * libc/sys/linux/net/getservent.3: Ditto.
- * libc/sys/linux/net/getservent.c: Ditto.
- * libc/sys/linux/net/herror.c: Ditto.
- * libc/sys/linux/net/hesiod.3: Ditto.
- * libc/sys/linux/net/hesiod.c: Ditto.
- * libc/sys/linux/net/if_indextoname.3: Ditto.
- * libc/sys/linux/net/ifname.c: Ditto.
- * libc/sys/linux/net/inet.3: Ditto.
- * libc/sys/linux/net/inet6_option_s: Ditto.pace.3
- * libc/sys/linux/net/inet6_rthdr_space.3: Ditto.
- * libc/sys/linux/net/inet_addr.c: Ditto.
- * libc/sys/linux/net/inet_lnaof.c: Ditto.
- * libc/sys/linux/net/inet_makeaddr.c: Ditto.
- * libc/sys/linux/net/inet_net.3: Ditto.
- * libc/sys/linux/net/inet_net_ntop.c: Ditto.
- * libc/sys/linux/net/inet_net_pton.c: Ditto.
- * libc/sys/linux/net/inet_neta.c: Ditto.
- * libc/sys/linux/net/inet_netof.c: Ditto.
- * libc/sys/linux/net/inet_network.c: Ditto.
- * libc/sys/linux/net/inet_ntoa.c: Ditto.
- * libc/sys/linux/net/inet_ntop.c: Ditto.
- * libc/sys/linux/net/inet_pton.c: Ditto.
- * libc/sys/linux/net/innetgr-stub.c: Ditto.
- * libc/sys/linux/net/ip6opt.c: Ditto.
- * libc/sys/linux/net/iso_addr.3: Ditto.
- * libc/sys/linux/net/iso_addr.c: Ditto.
- * libc/sys/linux/net/issetugid-stub.c: Ditto.
- * libc/sys/linux/net/linkaddr.3: Ditto.
- * libc/sys/linux/net/linkaddr.c: Ditto.
- * libc/sys/linux/net/map_v4v6.c: Ditto.
- * libc/sys/linux/net/name6.c: Ditto.
- * libc/sys/linux/net/namespace.h: Ditto.
- * libc/sys/linux/net/ns.3: Ditto.
- * libc/sys/linux/net/ns_addr.c: Ditto.
- * libc/sys/linux/net/ns_name.c: Ditto.
- * libc/sys/linux/net/ns_netint.c: Ditto.
- * libc/sys/linux/net/ns_ntoa.c: Ditto.
- * libc/sys/linux/net/ns_parse.c: Ditto.
- * libc/sys/linux/net/ns_print.c: Ditto.
- * libc/sys/linux/net/ns_ttl.c: Ditto.
- * libc/sys/linux/net/nsap_addr.c: Ditto.
- * libc/sys/linux/net/nsdispatch.3: Ditto.
- * libc/sys/linux/net/nsdispatch.c: Ditto.
- * libc/sys/linux/net/nslexer.c: Ditto.
- * libc/sys/linux/net/nslexer.l: Ditto.
- * libc/sys/linux/net/nsparser.c: Ditto.
- * libc/sys/linux/net/nsparser.h: Ditto.
- * libc/sys/linux/net/nsparser.y: Ditto.
- * libc/sys/linux/net/rcmd.3: Ditto.
- * libc/sys/linux/net/rcmd.c: Ditto.
- * libc/sys/linux/net/rcmdsh.3: Ditto.
- * libc/sys/linux/net/rcmdsh.c: Ditto.
- * libc/sys/linux/net/recv.c: Ditto.
- * libc/sys/linux/net/res_comp.c: Ditto.
- * libc/sys/linux/net/res_config.h: Ditto.
- * libc/sys/linux/net/res_data.c: Ditto.
- * libc/sys/linux/net/res_debug.c: Ditto.
- * libc/sys/linux/net/res_init.c: Ditto.
- * libc/sys/linux/net/res_mkquery.c: Ditto.
- * libc/sys/linux/net/res_mkupdate.c: Ditto.
- * libc/sys/linux/net/res_query.c: Ditto.
- * libc/sys/linux/net/res_send.c: Ditto.
- * libc/sys/linux/net/res_update.c: Ditto.
- * libc/sys/linux/net/resolver.3: Ditto.
- * libc/sys/linux/net/rthdr.c: Ditto.
- * libc/sys/linux/net/send.c: Ditto.
- * libc/sys/linux/net/un-namespace.h: Ditto.
- * libc/sys/linux/net/vars.c: Ditto.
- * libc/sys/linux/stdlib/COPYRIGHT: Ditto.
- * libc/sys/linux/stdlib/Makefile.am: Ditto.
- * libc/sys/linux/stdlib/Makefile.in: Ditto.
- * libc/sys/linux/stdlib/cclass.h: Ditto.
- * libc/sys/linux/stdlib/cname.h: Ditto.
- * libc/sys/linux/stdlib/collate.c: Ditto.
- * libc/sys/linux/stdlib/collate.h: Ditto.
- * libc/sys/linux/stdlib/collcmp.c: Ditto.
- * libc/sys/linux/stdlib/engine.c: Ditto.
- * libc/sys/linux/stdlib/fnmatch.3: Ditto.
- * libc/sys/linux/stdlib/fnmatch.c: Ditto.
- * libc/sys/linux/stdlib/glob.3: Ditto.
- * libc/sys/linux/stdlib/glob.c: Ditto.
- * libc/sys/linux/stdlib/reallocf.c: Ditto.
- * libc/sys/linux/stdlib/regcomp.c: Ditto.
- * libc/sys/linux/stdlib/regerror.c: Ditto.
- * libc/sys/linux/stdlib/regex.3: Ditto.
- * libc/sys/linux/stdlib/regex2.h: Ditto.
- * libc/sys/linux/stdlib/regexec.c: Ditto.
- * libc/sys/linux/stdlib/regfree.c: Ditto.
- * libc/sys/linux/stdlib/utils.h: Ditto.
- * libc/sys/linux/stdlib/wordexp.c: Ditto.
- * libc/sys/linux/stdlib/wordfree.c: Ditto.
- * libc/sys/linux/sys/dlfcn.h: Ditto.
- * libc/sys/linux/sys/elfclass.h: Ditto.
- * libc/sys/linux/sys/event.h: Ditto.
- * libc/sys/linux/sys/ioccom.h: Ditto.
- * libc/sys/linux/sys/libc-tsd.h: Ditto.
- * libc/sys/linux/sys/link.h: Ditto.
- * libc/sys/linux/sys/lock.h: Ditto.
- * libc/sys/linux/sys/param.h: Ditto.
- * libc/sys/linux/sys/socket.h: Ditto.
- * libc/sys/linux/sys/sockio.h: Ditto.
-
-2003-05-28 Dhananjay Deshpande <dhananjayd@kpitcummins.com>
-
- * newlib/libc/machine/h8300/memcpy.S: Use .h8300hn and .h8300sn for
- normal mode
- * newlib/libc/machine/h8300/memset.S: Likewise
- * newlib/lib/machine/h8300/reg_memcpy.S: Likewise
- * newlib/lib/machine/h8300/reg_memset.S: Likewise
- * newlib/lib/machine/h8300/setjmp.S: Likewise
- * newlib/lib/machine/h8300/strcmp.S: Likewise
- * newlib/lib/sys/h8300hms/crt0.S: Likewise
-
-2003-05-13 Corinna Vinschen <corinna@vinschen.de>
-
- * libc/ctype/ctype_.c: Remove checks for deprecated __CYGWIN32__.
- * libc/include/stdio.h: Ditto.
- * libc/include/sys/config.h: Ditto.
- * libc/stdio/mktemp.c: Ditto.
-
-2003-05-13 Corinna Vinschen <corinna@vinschen.de>
-
- * libc/locale/ldpart.c (__part_load_locale): Substitute
- __CYGWIN_USE_BIG_TYPES__ by __USE_INTERNAL_STAT64.
- * libc/search/hash.c (__hash_open): Ditto.
- (init_hash): Ditto.
- * libc/stdio/fseek.c (fseek): Ditto.
- * libc/stdio/makebuf.c (__smakebuf): Ditto.
- * libc/stdio/mktemp.c (_gettemp): Ditto.
-
-2003-05-12 Corinna Vinschen <corinna@vinschen.de>
-
- * libc/include/stdio.h: Change one __CYGWIN__ to __CYGWIN32__.
-
-2003-05-12 Corinna Vinschen <corinna@vinschen.de>
-
- * configure.host: Accomodate removing the libc/sys/cygwin dir.
- * libc/locale/ldpart.c (__part_load_locale): Use 64 bit stat call
- if __CYGWIN_USE_BIG_TYPES__ is set.
- * libc/search/hash.c (__hash_open): Ditto.
- (init_hash): Ditto.
- * libc/stdio/fseek.c (fseek): Ditto.
- * libc/stdio/makebuf.c (__smakebuf): Ditto.
- * libc/stdio/mktemp.c (_gettemp): Ditto.
- * libc/sys/cygwin/Makefile.am: Remove.
- * libc/sys/cygwin/Makefile.in: Remove.
- * libc/sys/cygwin/aclocal.m4: Remove.
- * libc/sys/cygwin/configure: Remove.
- * libc/sys/cygwin/configure.in: Remove.
- * libc/sys/cygwin/crt0.c: Move to winsup/cygwin directory.
- * libc/sys/cygwin/sys/dirent.h: Move to winsup/cygwin/include/sys
- directory.
- * libc/sys/cygwin/sys/param.h: Ditto.
- * libc/sys/cygwin/sys/utime.h: Ditto.
- * libc/sys/cygwin/sys/utmp.h: Ditto.
-
-2003-05-11 Corinna Vinschen <corinna@vinschen.de>
-
- * libc/include/sys/types.h: Don't define key_t for Cygwin.
-
-2003-05-10 Christopher Faylor <cgf@redhat.com>
-
- * libc/sys/cygwin/sys/dirent.h (struct dirent): Accommodate (slightly)
- 64 bit inodes.
-
-2003-05-09 Corinna Vinschen <corinna@vinschen.de>
-
- * libc/include/sys/config.h: Remove all Cygwin specific configuration.
- Include cygwin/config.h instead.
-
-2003-04-16 Jeff Johnston <jjohnstn@redhat.com>
-
- * newlib/libc/machine/powerpc (ato*fix*.c,strto*fix*.c): Shield
- all code with #ifdef __SPE__ test.
- * newlib/libc/machine/powerpc (simdldtoa.c, ufix64toa.c): Ditto.
-
-2003-04-15 Chris January <chris@atomice.net>
-
- * newlib/libc/include/sys/unistd.h: add declaration for gethostid on
- Cygwin.
-
-2003-04-09 J"orn Rennecke <joern.rennecke@superh.com>
-
- * libc/machine/sh/memset.S: Avoid clobbering volatile
- objects following a tiny to-be-set array in the same quadword.
-
-2001-04-09 Corinna Vinschen <corinna@vinschen.de>
-
- * libc/include/wchar.h: Add definitions for wcswidth and wcwidth.
- * libc/string/Makefile.am: Add wcswidth.c and wcwidth.c
- * libc/string/Makefile.in: Regenerated.
- * libc/string/wcswidth.c: New file.
- * libc/string/wcwidth.c: New file.
- * libc/string/wcstrings.tex: Add wcswidth and wcwidth.
-
-Thu Apr 3 14:01:16 2003 J"orn Rennecke <joern.rennecke@superh.com>
-
- * libc/machine/sh/memset.S: Fix problem with alloco region
- exceeding destination region for length >= 88 bytes, start
- & 0x16 == 0, end & 0x1f == 18.
-
-2001-04-03 Corinna Vinschen <corinna@vinschen.de>
-
- * libc/string/wcscoll.c: Fix comment.
-
-2001-04-02 Corinna Vinschen <corinna@vinschen.de>
-
- * libc/include/wchar.h: Add definition for wcscoll.
- * libc/string/Makefile.am: Add wcscoll.c.
- * libc/string/Makefile.in: Regenerated.
- * libc/string/wcscoll.c: New file.
- * libc/string/wcstrings.tex: Add wcscoll.
-
-2003-04-01 Corinna Vinschen <corinna@vinschen.de>
-
- * libc/stdio/sscanf.c: Update flags description.
- * libc/stdio/vfscanf.c: Add CHAR flag value to denote 8 bit target
- type.
- (__svfscanf_r): Add 'hh' and 'll' handling.
-
-2003-04-01 Corinna Vinschen <corinna@vinschen.de>
-
- * libc/sys/cygwin/sys/dirent.h (struct DIR): Change type of
- __d_position member to _off_t.
-
-2003-03-20 Jeff Johnston <jjohnstn@redhat.com>
-
- * libc/stdio/vfscanf.c (__svfscanf_r): For floating point conversion,
- count all characters used to create number against maximum width.
- * libc/machine/powerpc/vfscanf.c (__svfscanf_r): Ditto.
-
-2003-03-18 D.Venkatasubramanian <dvenkat@noida.hcltech.com>
-
- * libc/include/sys/h8300hms/crt0.S[__SIMULATOR__]: Add commandline
- support.
- * configure.host (h8300*-*-*): Added comment regarding -D__SIMULATOR__
- flag to support simulator only extensions.
-
-2003-03-17 Bob Cassels <bcassels@abinitio.com>
-
- * libc/string/wcschr.c: (wcschr): Look for character first,
- then for end of string, so you can do wcschr(x, '\0').
-
-2003-03-10 Corinna Vinschen <corinna@vinschen.de>
-
- * libc/include/stdio.h: Declare fgetpos, fsetpos, fseeko and ftello
- with internal (_fpos_t and _off_t) datatypes when compiling newlib.
- * libc/include/sys/unistd.h: Declare _lseek using _off_t.
- * libc/reent/lseekr.c (_lseek_r): Use _off_t instead of off_t.
- * libc/stdio/fseeko.c (fseeko): Ditto.
- * libc/stdio/ftello.c (ftello): Ditto.
- * libc/stdio/stdio.c (__swrite): Ditto.
- (__sseek): Ditto.
- * libc/stdio/fgetpos.c (fgetpos): Use _fpos_t instead of fpos_t.
- * libc/stdio/fseek.c (fseek): Ditto.
- * libc/stdio/fsetpos.c (fsetpos): Ditto.
- * libc/stdio/ftell.c (ftell): Ditto.
- * libc/stdio/local.h: Declare __sseek using _off_t.
-
-2003-03-09 Corinna Vinschen <corinna@vinschen.de>
-
- * libc/reent/lseekr.c (lseek_r): Use _off_t instead of off_t.
-
-2003-03-09 Corinna Vinschen <corinna@vinschen.de>
-
- * libc/include/sys/config.h: Define __CYGWIN_USE_BIG_TYPES__ for
- Cygwin.
-
-2003-03-09 Corinna Vinschen <corinna@vinschen.de>
-
- * libc/include/pwd.h: Add guards to avoid type clashes when compiling
- Cygwin.
- * libc/include/sys/stat.h: Ditto.
- * libc/include/sys/unistd.h: Ditto.
- * libc/sys/cygwin/sys/dirent.h: Ditto.
-
-2003-03-07 Christopher Faylor <cgf@redhat.com>
-
- * libc/include/sys/unistd.h: Guard getopt.h call to force only
- declaration of getopt and avoid getopt_long declaration.
- * libc/sys/cygwin/include/unistd.h: Remove.
-
-2003-03-07 Corinna Vinschen <corinna@vinschen.de>
-
- * configure.host: Define stdio64_dir for Cygwin.
- * libc/include/stdio.h: Change definition of fpos_t to fulfill
- Cygwin 64bit file access requirements.
- Drop definition of f*64() functions when compiled for Cygwin.
- * libc/include/sys/config.h: Define __LARGE64_FILES for Cygwin.
- * libc/reent/lseek64r.c: Use _off64_t instead of off64_t.
- * libc/stdio64/local64.h: Use _fpos64_t instead of fpos64_t.
-
-2003-03-07 Jeff Johnston <jjohnstn@redhat.com>
-
- * libc/include/sys/reent.h: Remove extraneous _sig_func
- declaration.
-
-2003-02-25 D.Venkatasubramanian <dvenkat@noida.hcltech.com>
-
- * libc/sys/h8300hms/Makefile.am: Add support for new files.
- * libc/sys/h8300hms/Makefile.in: Regenerated.
- * libc/sys/h8300hms/close.S: New file.
- * libc/sys/h8300hms/fstat.S: Ditto.
- * libc/sys/h8300hms/lseek.S: Ditto.
- * libc/sys/h8300hms/open.S: Ditto.
- * libc/sys/h8300hms/stat.S: Ditto.
- * libc/sys/h8300hms/read.S: New file to replace read.c.
- * libc/sys/h8300hms/read.c: Removed.
- * libc/sys/h8300hms/syscalls.c: Removed functions _open,
- _lseek, _close, _stat, _fstat.
- * libc/sys/h8300hms/write.S: New file to replace write.c.
- * libc/sys/h8300hms/write.c: Removed.
-
-2003-02-20 Nick Clifton <nickc@redhat.com>
-
- * Add support for Cirrus Maverick ARM co-processor:
-
- 2000-09-13 Aldy Hernandez <aldyh@redhat.com>
-
- * libc/include/machine/ieeefp.h: Set IEEE_BIG_ENDIAN or
- IEEE_LITTLE_ENDIAN depending on endian mode (cirrus).
-
- 2000-08-11 Aldy Hernandez <aldyh@redhat.com>
-
- * configure.host: set sys_dir, syscall_dir, and
- newlib_cflags for ep9312 host.
-
- * configure.host: Restore alpha sorting of entries in case
- statements.
-
-2003-02-19 Jeff Johnston <jjohnstn@redhat.com>
-
- * libc/stdlib/mallocr.c (unlink): Revert 02/18 fix.
-
-2003-02-18 Christian Groessler <chris@groessler.org>
-
- * libc/machine/z8k/setjmp.S (_setjmp / _longjmp): Fix to
- support z8001 segmented mode.
-
-2003-02-18 Earnie Boyd <earnie@users.sf.net>
-
- * libc/stdlib/mallocr.c (unlink): Don't assign a value to a pointer
- with a NULL value.
-
-2003-02-10 Christopher Faylor <cgf@redhat.com>
-
- * libc/include/sys/types.h: Don't define __MS_types__ for Cygwin.
- Don't define some types under cygwin.
-
-2003-02-07 Jeff Johnston <jjohnstn@redhat.com>
-
- * acinclude.m4 (--disable-newlib-supplied-syscalls): New configuration
- option to allow disabling of syscalls being supplied in newlib.
- * aclocal.m4: Regenerated.
- * configure: Ditto.
- * configure.host: Add support of new configuration option and add
- -D__NO_SYSCALLS__ if newlib supplied syscalls are disabled.
- * doc/aclocal.m4: Regenerated.
- * doc/configure: Ditto.
- * libc/*aclocal.m4: Ditto.
- * libc/*configure: Ditto.
- * libm/*aclocal.m4: Ditto.
- * libm/*configure: Ditto.
- * libc/sys/arm/Makefile.am: Don't build syscalls.o if new option
- is disabled.
- * libc/sys/arm/Makefile.in: Regenerated.
-
-2003-02-05 Jonathan Larmour <jifl@eCosCentric.com>
-
- * libc/stdio/vsprintf.c (vsprintf, _vsprintf_r): Set _file fd to
- -1 to be sure it cannot later match a valid file fd causing
- isatty() to return 1.
- * libc/stdio/asprintf.c (asprintf, _asprintf_r): Ditto.
- * libc/stdio/sprintf.c (sprintf, _sprintf_r): Ditto.
- * libc/stdio/vasprintf.c (vasprintf, _vasprintf_r): Ditto.
-
-2003-02-03 Jeff Johnston <jjohnstn@redhat.com>
-
- * libc/stdlib/ldtoa.c (_ldtoa_r): Fix code to allocate the format
- buffer based on the precision, after we have processed the input value
- in a local buffer and know its relative magnitude.
-
-2003-01-31 Michael Snyder <msnyder@redhat.com>
-
- * libc/sys/h8300hms/_exit.c (_exit, __exit): Slip a magic cookie
- into registers r1 and r2, so that the simulator can distinguish
- this trap from a breakpoint trap. Copied from libgloss.
-
-2003-01-31 Michael Snyder <msnyder@redhat.com>
-
- * libc/sys/h8300hms/crt0.S (_start): Change local label
- from .loop to .Loop, so that ld and gdb will ignore it.
-
-2003-01-29 Jason Tishler <jason@tishler.net>
-
- * libc/include/time.h: Declare nanosleep() under Cygwin.
-
-2003-01-24 Nick Clifton <nickc@redhat.com>
-
- * Add sh2e support:
-
- 2002-04-02 Alexandre Oliva <aoliva@redhat.com>
-
- * libc/machine/sh/asm.h: Added __SH2E__ next to __SH3E__.
- * libc/machine/sh/setjmp.S: Likewise.
- * libc/include/machine/ieeefp.h: Likewise.
-
-2003-01-24 Corinna Vinschen <corinna@vinschen.de>
-
- * libc/include/sys/unistd.h: Add setregid and setreuid declarations
- for Cygwin.
-
-2003-01-21 Anita Kulkarni <anitak@kpit.com>
-
- * libc/time/difftime.c : Typecast the result to double.
-
-2003-01-20 Christopher Faylor <cgf@redhat.com>
-
- * libc/include/sys/unistd.h: Add rresvport declaration for cygwin.
-
-2003-01-18 Nick Clifton <nickc@redhat.com>
-
- * libc/include/machine/ieeefp.h : Define __IEEE_BIG_ENDIAN,
- __SMALL_BITFIELDS and _DOUBLE_IS_32BITS for IP2K.
-
-2003-01-16 Joel Sherrill <joel@OARcorp.com>
-
- * libc/sys/rtems/include/limits.h, libc/sys/rtems/sys/param.h,
- libc/sys/rtems/sys/syslimits.h: Update to be in sync with what
- constants are defined in each file in the shared versions in
- libc/include.
- * libc/sys/rtems/crt0.c: Define extra symbols on SH and HP-PA to
- autoconf can link programs.
- * libc/include/machine/types.h: Explicitly specify signed on
- intXX_t types to ensure they are signed.
-
-2003-01-14 Christopher Faylor <cgf@redhat.com>
-
- * libc/time/strftime.c (strftime): Add '%h' and '%l, %k' GNU
- extensions.
-
-2003-01-08 Richard Sandiford <rsandifo@redhat.com>
-
- * configure.host (mips64vr-elf, mips64vrel-elf): New config.
-
-2003-01-07 Charles Wilson <cwilson@ece.gatech.edu>
-
- * libc/stdio/sprintf.c: fix typo
- * libc/stdio/vfprintf.c: fix typo
-
-2003-01-07 Jeff Johnston <jjohnstn@redhat.com>
-
- * configure.host: Support long double I/O for x86-linux.
- * libc/stdlib/ldtoa.c (_ldtoa_r): Fix code to allocate a buffer
- large enough to hold formatted result.
- * libc/machine/powerpc/simdldtoa.c (_simdldtoa_r): Ditto.
-
-2003-01-06 Charles Wilson <cwilson@ece.gatech.edu>
-
- * Makefile.am: Add vasprintf.
- * Makefile.in: Regenerated.
-
-2003-01-06 Charles Wilson <cwilson@ece.gatech.edu>
-
- * asprintf.c (_asprintf_r): insure both declarations
- are the same.
-
-2002-12-28 Christopher Faylor <cgf@redhat.com>
-
- * libc/include/sys/unistd.h: Under cygwin, just include getopt.h rather
- than defining getopt directly.
-
-2002-12-20 Jeff Johnston <jjohnstn@redhat.com>
-
- * NEWS: Update with 1.11.0 info.
- * README: Ditto.
- * acinclude.m4: Change version number to 1.11.0.
- * aclocal.m4: Regenerated.
- * configure: Ditto.
- * doc/aclocal.m4: Ditto.
- * doc/configure: Ditto.
- * libc/*/aclocal.m4: Ditto.
- * libc/*/configure: Ditto.
- * libc/libc.texinfo: Ditto.
- * libm/*/aclocal.m4: Ditto.
- * libm/*/configure: Ditto.
- * libm/libm.texinfo: Ditto.
- * libc/sys/linux/shared.ld: Add VERS_1.11.
-
-2002-12-20 Jeff Johnston <jjohnstn@redhat.com>
-
- * libc/machine/i386/f_atan2.S: Change copyright from Cygnus
- Solutions to Red Hat Inc.
- * libc/machine/i386/f_atan2f.S: Ditto.
- * libc/machine/i386/f_exp.c: Ditto.
- * libc/machine/i386/f_expf.c: Ditto.
- * libc/machine/i386/f_frexp.S: Ditto.
- * libc/machine/i386/f_frexpf.S: Ditto.
- * libc/machine/i386/f_ldexp.S: Ditto.
- * libc/machine/i386/f_ldexpf.S: Ditto.
- * libc/machine/i386/f_log.S: Ditto.
- * libc/machine/i386/f_log10.S: Ditto.
- * libc/machine/i386/f_log10f.S: Ditto.
- * libc/machine/i386/f_logf.S: Ditto.
- * libc/machine/i386/f_pow.c: Ditto.
- * libc/machine/i386/f_powf.c: Ditto.
- * libc/machine/i386/f_tan.S: Ditto.
- * libc/machine/i386/f_tanf.S: Ditto.
- * libc/machine/i386/memchr.S: Ditto.
- * libc/machine/i386/memcmp.S: Ditto.
- * libc/machine/i386/memcpy.S: Ditto.
- * libc/machine/i386/memmove.S: Ditto.
- * libc/machine/i386/memset.S: Ditto.
- * libc/machine/i386/strchr.S: Ditto.
- * libc/machine/i386/strlen.S: Ditto.
- * libm/machine/i386/f_atan2.S: Ditto.
- * libm/machine/i386/f_atan2f.S: Ditto.
- * libm/machine/i386/f_exp.c: Ditto.
- * libm/machine/i386/f_expf.c: Ditto.
- * libm/machine/i386/f_frexp.S: Ditto.
- * libm/machine/i386/f_frexpf.S: Ditto.
- * libm/machine/i386/f_ldexp.S: Ditto.
- * libm/machine/i386/f_ldexpf.S: Ditto.
- * libm/machine/i386/f_log.S: Ditto.
- * libm/machine/i386/f_log10.S: Ditto.
- * libm/machine/i386/f_log10f.S: Ditto.
- * libm/machine/i386/f_logf.S: Ditto.
- * libm/machine/i386/f_pow.c: Ditto.
- * libm/machine/i386/f_powf.c: Ditto.
- * libm/machine/i386/f_tan.S: Ditto.
- * libm/machine/i386/f_tanf.S: Ditto.
-
-2002-12-20 Jeff Johnston <jjohnstn@redhat.com>
-
- * libc/stdlib/environ.c: Update license to Red Hat.
- * libc/machine/hppa/setjmp.S: Ditto.
- * libm/test/Makefile.in: Ditto.
-
-2002-12-19 Jeff Johnston <jjohnstn@redhat.com>
-
- * configure.host: Remove references to go32.
- * libc/sys/go32/*: Removed.
-
-2002-12-16 Kazu Hirata <kazu@cs.umass.edu>
-
- * libc/include/sys/config.h: Change setting of INT_MAX
- and UINT_MAX, to use __INT_MAX__ for __H8300__, __H8300H__,
- __H8300S__. Also consolidate flag settings for these
- platforms.
-
-2002-12-10 Joel Sherrill <joel@OARcorp.com>
-
- * libc/include/machine/setjmp.h: Make sure _JBLEN is defined
- for i386-rtems targets.
-
-2002-12-06 Jeff Johnston <jjohnstn@redhat.com>
-
- * libc/include/stdlib.h (strtof): New prototype (from C99).
- (strtodf): Changed from prototype to macro which redefines
- to strtof.
- * libc/stdlib/atof.c: Change documentation to refer to strtof
- instead of strtodf.
- * libc/stdlib/atoff.c (atoff): Change to call strtof instead of
- strtodf.
- * libc/stdlib/strtod.c (strtodf): Renamed to strtof.
- (strtof): New function.
- * libm/test/convert.c (test_strtodf): Renamed to test_strtof which
- calls strtof.
-
-2002-11-27 Christopher Faylor <cgf@redhat.com>
-
- * libc/string/memset.c (memset): Fix comment.
-
-2002-11-26 Christopher Faylor <cgf@redhat.com>
-
- * libc/string/memset.c (memset): Move initialization of 'd' earlier in
- function.
-
-2002-11-25 Christopher Faylor <cgf@redhat.com>
-
- * libc/string/memset.c (memset): Minor optimization: Use new 'd'
- variable, introduced below, everywhere.
-
-2002-11-25 Kazu Hirata <kazu@cs.umass.edu>
-
- * libc/string/memset.c (memset): Make it safe even if
- sizeof (int) = 2.
-
-2002-11-22 Joe Buehler <jbuehler@hekimian.com>
-
- * configure.in: Change check for libc/include in ${CC} to
- use an intermediate value so as to work with different shells.
- * configure: Regenerated.
- * Makefile.in: Ditto.
-
-2002-11-22 Vijay L. Khuspe <vijayk1@kpit.com>
-
- * libc/sys/h8300hms/read.c: Add support for normal mode
- architecture.
-
-2002-11-20 Ryo Tsuruta <ryo@kitanet.ne.jp>
-
- * libc/machine/h8300/setjmp.S (setjmp, longjmp): Combine common
- code for __H8300H__ and __H8300S__. Also return 32-bit return code
- when -mint32 is used.
-
-2002-11-18 Nick Clifton <nickc@redhat.com>
-
- * libc/sys/arm/crt0.S: Add NULL to end of argv array.
-
-2002-11-14 Jeff Johnston <jjohnstn@redhat.com>
-
- * testsuite/lib/passfail.exp (newlib_pass_fail): Changed to
- only issue one pass/fail message for a compile/link/execute.
- * testsuite/newlib.elix/elix.exp: New file.
- * testsuite/newlib.elix/tmmap.c: Ditto.
-
-2002-11-06 Christopher Faylor <cgf@redhat.com>
-
- * libc/stdlib/malign.c: Don't compile if MALLOC_PROVIDED.
- * libc/stdlib/mlock.c: Ditto.
- * libc/stdlib/msize.c: Ditto.
- * libc/stdlib/msize.c: Ditto.
- * libc/stdlib/mtrim.c: Ditto.
- * libc/stdlib/valloc.c: Ditto.
-
-2002-11-12 Jeff Johnston <jjohnstn@redhat.com>
-
- * libc/stdlib/ldtoa.c (e64toe): When checking the exponent
- for inf/nan, make sure that the check ignores the sign bit.
-
-2002-11-07 Joel Sherrill <joel@OARcorp.com>
-
- * libc/sys/rtems/machine: New directory.
- * libc/sys/rtems/machine/limits.h, libc/sys/rtems/machine/param.h,
- libc/sys/rtems/sys/param.h, libc/sys/rtems/sys/syslimits.h,
- libc/sys/rtems/sys/utime.h: New files added to make *-rtems newlib
- targets more BSD like when installed without requiring files to
- be overwritten at install point when RTEMS itself is installed.
- * Makefile.am: Pick up system dependent machine .h files such as
- might be found on a BSD-ish system.
- * Makefile.in: Regenerate.
- * libc/include/machine/types.h: When on an RTEMS target, define a
- few BSD flavor types.
-
-2002-11-06 Sergey Okhapkin <sos@prospect.com.ru>
-
- * include/utmp.h: Define WTMP_FILE. Define and use UT_IDLEN.
-
-2002-11-06 Kazuhiro Fujieda <fujieda@jaist.ac.jp>
-
- * libc/include/wchar.h: Use _{BEGIN,END}_STD_C instead of extern "C".
- * libc/include/wctype.h: Ditto.
-
-2002-11-04 Jeff Johnston <jjohnstn@redhat.com>
-
- * libc/include/wchar.h: Add extern "C" specifier if C++.
- * libc/include/wctype.h: Ditto.
-
-2002-10-18 Jeff Johnston <jjohnstn@redhat.com>
-
- * testsuite/newlib.wctype/tiswctype.c: New test case.
- * testsuite/newlib.wctype/twctrans.c: Ditto.
-
-2002-10-18 Jeff Johnston <jjohnstn@redhat.com>
-
- * libc/sys/linux/machine/i386/include/endian.h: New file.
- * libc/sys/linux/machine/i386/include/param.h: Ditto.
-
-2002-10-18 Jeff Johnston <jjohnstn@redhat.com>
-
- * libm/machine/i386/aclocal.m4: Regenerated.
- * libm/machine/i386/configure: Ditto.
-
-2002-10-18 Jeff Johnston <jjohnstn@redhat.com>
-
- * testsuite/include/check.h: New header file to use with
- test cases.
- * testsuite/lib/newlib.exp: Add testsuite/include directory
- to list of header files to use.
- * testsuite/newlib.wctype/twctype.c: New test case for iswctype fns.
- * testsuite/newlib.wctype/wctype.exp: New file.
-
-2002-10-11 Graham Stott <graham.stott@btinternet.com>
- Richard Sandiford <rsandifo@redhat.com>
-
- * libc/include/sys/config.h (SIZE_T_SMALLER_THAN_LONG): Undefine.
- * libc/stdlib/mallocr.c (long_sub_size_t): Define in a way that
- doesn't require the SIZE_T_SMALLER_THAN_LONG macro.
-
-2002-10-07 Joel Sherrill <joel@OARcorp.com>
-
- * libc/sys/rtems/crt0.c: Add even more symbols so gcc() can link
- dummy programs.
-
-2002-10-07 Joel Sherrill <joel@OARcorp.com>
-
- * libc/include/pthread.h: Define PTHREAD_CANCELED.
-
-2002-10-07 Joel Sherrill <joel@OARcorp.com>
-
- * libc/machine/hppa/DEFS.h, libc/machine/hppa/pcc_prefix.s,
- libc/machine/hppa/setjmp.S, libc/machine/hppa/DEFS.h: Make this
- compile with current GNU tools.
-
-2002-10-07 Jeff Johnston <jjohnstn@redhat.com>
-
- * Makefile.am: Add EXTRA_DIRS to allow future dependencies on
- the build library.
- * configure.in: Ditto.
- * Makefile.in: Regenerated.
- * configure: Ditto.
- * libc/sys/linux/Makefile.am: Add EXTRA_SUBDIRS and EXTRA_SUBLIBS
- for specifying configured libraries/directories.
- * libc/sys/linux/configure.in: Ditto.
- * libc/sys/linux/Makefile.in: Regenerated.
- * libc/sys/linux/configure: Ditto.
-
-2002-10-03 Jeff Johnston <jjohnstn@redhat.com>
-
- * libc/include/reent.h: Update documentation at start of file.
-
-2002-09-27 Jim Wilson <wilson@redhat.com>
-
- * libc/sys/sysnecv850/crt0.S (start): Delete v850 code for initializing
- the ctbp register.
-
-2002-09-27 Jeff Johnston <jjohnstn@redhat.com>
-
- * libc/ctype/jp2uc.c: Change to use multiple arrays in jp2uc.h.
- Also convert to EUCJP before using arrays. For values not in
- the conversion arrays, return WEOF.
- * libc/ctype/jp2uc.h: Change from one array to a number of
- arrays to account for the fact that the originating table
- is not contiguous for the input values since some are invalid.
-
-2002-09-24 Jeff Johnston <jjohnstn@redhat.com>
-
- * libc/time/ctime.c: Fix prototype documentation.
-
-2002-09-24 Corinna Vinschen <corinna@vinschen.de>
-
- * libc/include/sys/errno.h: Add EOVERFLOW.
-
-2002-09-20 Jeff Johnston <jjohnstn@redhat.com>
-
- * libc/include/wctype.h: New file.
-
-2002-09-20 Jeff Johnston <jjohnstn@redhat.com>
-
- * libc/ctype/Makefile.am: Add new files.
- * libc/ctype/Makefile.in: Regenerated.
- * libc/ctype/ctype.tex: Add new iswxxxx, towxxxx, wctype,
- and wctrans functions to documentation index.
- * libc/ctype/iswalnum.c: New file.
- * libc/ctype/iswalpha.c: Ditto.
- * libc/ctype/iswblank.c: Ditto.
- * libc/ctype/iswcntrl.c: Ditto.
- * libc/ctype/iswctype.c: Ditto.
- * libc/ctype/iswdigit.c: Ditto.
- * libc/ctype/iswgraph.c: Ditto.
- * libc/ctype/iswlower.c: Ditto.
- * libc/ctype/iswprint.c: Ditto.
- * libc/ctype/iswpunct.c: Ditto.
- * libc/ctype/iswspace.c: Ditto.
- * libc/ctype/iswupper.c: Ditto.
- * libc/ctype/iswxdigit.c: Ditto.
- * libc/ctype/jp2uc.c: Ditto.
- * libc/ctype/jp2uc.h: Ditto.
- * libc/ctype/local.h: Ditto.
- * libc/ctype/towctrans.c: Ditto.
- * libc/ctype/towlower.c: Ditto.
- * libc/ctype/towupper.c: Ditto.
- * libc/ctype/utf8alpha.h: Ditto.
- * libc/ctype/utf8print.h: Ditto.
- * libc/ctype/utf8punct.h: Ditto.
- * libc/ctype/wctrans.c: Ditto.
- * libc/ctype/wctype.c: Ditto.
- * libc/locale/locale.c (__lc_ctype): New external array to
- replace static lc_ctype array.
- * libc/stdlib/mbtowc_r.c: Use __lc_ctype to check current lc_ctype
- rather than reentrancy structure's _current_locale field.
- * libc/stdlib/wctomb_r.c: Ditto.
-
-2002-09-20 Jeff Johnston <jjohnstn@redhat.com>
-
- * configure.host: Minor comment and formatting changes.
- * libc/Makefile.am: Add libc_la_DEPENDENCIES.
- * libc/Makefile.in: Regenerated.
- * libc/include/sys/config.h: Minor format change.
-
-2002-09-19 Jeff Johnston <jjohnstn@redhat.com>
-
- * libc/syscalls/sysfcntl.c (fcntl): Fix typo in preprocessor
- statement comment.
-
-2002-09-19 Jeff Johnston <jjohnstn@redhat.com>
-
- * libc/posix/opendir.c (opendir): Change code to check
- for HAVE_FCNTL before calling fcntl.
- * libc/search/hash.c (hash_open): Ditto.
- * libc/search/hash_page.c (open_tmp): Ditto.
- * libc/reent/Makefile.am: Add fcntlr.c.
- * libc/reent/Makefile.in: Regenerated.
- * libc/reent/fcntlr.c: New file.
- * libc/stdio/fdopen.c (_fdopen_r): Change to call _fcntl_r
- instead of _fcntl when HAVE_FCNTL flag is set.
- * libc/syscalls/sysfcntl.c (fcntl): Check for HAVE_FCNTL flag
- to see if _fcntl or _fcntl_r should be called. If flag is not
- set, default to ENOSYS stub.
-
-2002-09-16 Jeff Johnston <jjohnstn@redhat.com>
-
- * libc/include/wchar.h (mbstate_t): Change protective flag to
- be _MBSTATE_T.
- * libc/include/sys/_types.h (_mbstate_t): Remove protective flag.
- [__CYGWIN__]: Remove special code that defines mbstate_t and WEOF
- for Cygwin.
- * libc/sys/linux/sys/_types.h (_mbstate_t): Remove protective flag.
-
-2002-09-11 Jeff Johnston <jjohnstn@redhat.com>
-
- * acinclude.m4 (enable-newlib-mb): Change check to
- default newlib_mb variable to empty string rather than "no".
- * configure.host: Remove hard-coding of -DMB_CAPABLE for
- x86-linux and Cygwin. Add code to check for newlib_mb
- being unset in which case set to "yes" for x86-linux and
- Cygwin. Change check for newlib_mb being "yes" to allow
- for an empty string.
- * configure.in (_MB_LEN_MAX): New AC_DEFINE.
- * newlib.hin (_MB_LEN_MAX): New define to configure.
- * aclocal.m4: Regenerated.
- * configure: Ditto.
- * libc/include/limits.h: New file.
- * libc/sys/linux/include/limits.h: Ditto.
- * doc/aclocal.m4 doc/configure libc/aclocal.m4
- libc/configure libc/machine/aclocal.m4
- libc/machine/configure libc/machine/a29k/aclocal.m4
- libc/machine/a29k/configure libc/machine/arm/aclocal.m4
- libc/machine/arm/configure libc/machine/d10v/aclocal.m4
- libc/machine/d10v/configure libc/machine/d30v/aclocal.m4
- libc/machine/d30v/configure libc/machine/fr30/aclocal.m4
- libc/machine/fr30/configure libc/machine/frv/aclocal.m4
- libc/machine/frv/configure libc/machine/h8300/aclocal.m4
- libc/machine/h8300/configure libc/machine/h8500/aclocal.m4
- libc/machine/h8500/configure libc/machine/hppa/aclocal.m4
- libc/machine/hppa/configure libc/machine/i386/aclocal.m4
- libc/machine/i386/configure libc/machine/i960/aclocal.m4
- libc/machine/i960/configure libc/machine/m32r/aclocal.m4
- libc/machine/m32r/configure libc/machine/m68hc11/aclocal.m4
- libc/machine/m68hc11/configure libc/machine/m68k/aclocal.m4
- libc/machine/m68k/configure libc/machine/m88k/aclocal.m4
- libc/machine/m88k/configure libc/machine/mips/aclocal.m4
- libc/machine/mips/configure libc/machine/mn10200/aclocal.m4
- libc/machine/mn10200/configure libc/machine/mn10300/aclocal.m4
- libc/machine/mn10300/configure libc/machine/necv70/aclocal.m4
- libc/machine/necv70/configure libc/machine/powerpc/aclocal.m4
- libc/machine/powerpc/configure libc/machine/sh/aclocal.m4
- libc/machine/sh/configure libc/machine/sparc/aclocal.m4
- libc/machine/sparc/configure libc/machine/tic80/aclocal.m4
- libc/machine/tic80/configure libc/machine/v850/aclocal.m4
- libc/machine/v850/configure libc/machine/w65/aclocal.m4
- libc/machine/w65/configure libc/machine/xscale/aclocal.m4
- libc/machine/xscale/configure
- libc/machine/xstormy16/aclocal.m4
- libc/machine/xstormy16/configure libc/machine/z8k/aclocal.m4
- libc/machine/z8k/configure libc/sys/aclocal.m4
- libc/sys/configure libc/sys/a29khif/aclocal.m4
- libc/sys/a29khif/configure libc/sys/arc/aclocal.m4
- libc/sys/arc/configure libc/sys/arm/aclocal.m4
- libc/sys/arm/configure libc/sys/cygwin/aclocal.m4
- libc/sys/cygwin/configure libc/sys/d10v/aclocal.m4
- libc/sys/d10v/configure libc/sys/decstation/aclocal.m4
- libc/sys/decstation/configure libc/sys/go32/aclocal.m4
- libc/sys/go32/configure libc/sys/h8300hms/aclocal.m4
- libc/sys/h8300hms/configure libc/sys/h8500hms/aclocal.m4
- libc/sys/h8500hms/configure libc/sys/idt/aclocal.m4
- libc/sys/idt/configure libc/sys/linux/aclocal.m4
- libc/sys/linux/configure
- libc/sys/linux/machine/aclocal.m4
- libc/sys/linux/machine/configure
- libc/sys/linux/machine/i386/aclocal.m4
- libc/sys/linux/machine/i386/configure
- libc/sys/m88kbug/aclocal.m4 libc/sys/m88kbug/configure
- libc/sys/mmixware/aclocal.m4 libc/sys/mmixware/configure
- libc/sys/netware/aclocal.m4 libc/sys/netware/configure
- libc/sys/rtems/aclocal.m4 libc/sys/rtems/configure
- libc/sys/sh/aclocal.m4 libc/sys/sh/configure
- libc/sys/sparc64/aclocal.m4 libc/sys/sparc64/configure
- libc/sys/sun4/aclocal.m4 libc/sys/sun4/configure
- libc/sys/sysmec/aclocal.m4 libc/sys/sysmec/configure
- libc/sys/sysnec810/aclocal.m4 libc/sys/sysnec810/configure
- libc/sys/sysnecv850/aclocal.m4 libc/sys/sysnecv850/configure
- libc/sys/sysvi386/aclocal.m4 libc/sys/sysvi386/configure
- libc/sys/sysvnecv70/aclocal.m4 libc/sys/sysvnecv70/configure
- libc/sys/tic80/aclocal.m4 libc/sys/tic80/configure
- libc/sys/w65/aclocal.m4 libc/sys/w65/configure
- libc/sys/z8ksim/aclocal.m4 libc/sys/z8ksim/configure
- libm/aclocal.m4 libm/configure: Regenerated.
-
-2002-09-09 Jeff Johnston <jjohnstn@redhat.com>
-
- * libc/sys/linux/machine/i386/crt0.c (_start): Remove
- code that clears the .bss section.
-
-2002-09-09 Jeff Johnston <jjohnstn@redhat.com>
-
- * libc/include/sys/_types.h (_mbstate_t): Changed to use
- unsigned char internally.
- * libc/sys/linux/sys/_types.h: Ditto.
- * libc/include/sys/reent.h
- * libc/stdlib/mblen.c (mblen): Use function-specific state
- value from default reentrancy structure.
- * libc/stdlib/mblen_r.c (_mblen_r): If return code from
- _mbtowc_r is less than 0, reset state __count value and
- return -1.
- * libc/stdlib/mbrlen.c (mbrlen): If the input state pointer
- is NULL, use the function-specific pointer provided in the
- default reentrancy structure.
- * libc/stdlib/mbrtowc.c: Add reentrant form of function.
- If input state pointer is NULL, use function-specific area
- provided in reentrancy structure.
- * libc/stdlib/mbsrtowcs.c: Ditto.
- * libc/stdlib/wcrtomb.c: Ditto.
- * libc/stdlib/wcsrtombs.c: Ditto.
- * libc/stdlib/mbstowcs.c: Reformat.
- * libc/stdlib/wcstombs.c: Ditto.
- * libc/stdlib/mbstowcs_r.c (_mbstowcs_r): If an error occurs,
- reset the state's __count value and return -1.
- * libc/stdlib/mbtowc.c: Ditto.
- * libc/stdlib/mbtowc_r.c (_mbtowc_r): Add restartable functionality.
- If number of bytes is used up before completing a valid multibyte
- character, return -2 and save the state.
- * libc/stdlib/wctomb_r.c (_wctomb_r): Define __state as __count
- and change some __count references to __state for clarity.
-
-2002-09-06 Jeff Johnston <jjohnstn@redhat.com>
-
- * libc/include/sys/config.h (MB_LEN_MAX): Removed as this
- is defined by <limits.h>.
-
-2002-09-05 Kazuhiro Fujieda <fujieda@jaist.ac.jp>
-
- * libc/include/wchar.h (WCHAR_MAX): Only define if not already
- defined.
-
-2002-09-04 Kazuhiro Fujieda <fujieda@jaist.ac.jp>
-
- * libc/include/sys/config.h: Define accordingly __WCHAR_MAX__.
- * libc/include/wchar.h: Define WCHAR_MIN as 0 and WCHAR_MAX as
- __WCHAR_MAX__ or 0x7fffffffu.
- * libc/string/wcscmp.c: Delete wrong and unnecessary type cast.
- * libc/string/wcsncmp.c: Ditto.
-
-2002-09-03 Jeff Johnston <jjohnstn@redhat.com>
-
- * libc/string/wcschr.c: Add include of <stddef.h>.
- * libc/string/wcspbrk.c: Ditto.
- * libc/string/wcsrchr.c: Ditto.
- * libc/string/wcsstr.c: Ditto.
-
-2002-09-03 Jeff Johnston <jjohnstn@redhat.com>
-
- * libc/include/sys/_types.h (_flock_t): Added.
- * libc/include/sys/lock.h (__lock_try_acquire): New interface.
- (__lock_try_acquire_recursive): Ditto.
- * libc/include/sys/reent.h (__sFILE, __sFILE64): Add new
- _lock field.
- * libc/stdio/findfp.c (std)[!__SINGLE_THREAD__]: Initialize _lock
- field.
- * libc/stdio/fopen.c (_fopen_r)[!__SINGLE_THREAD__]: Ditto.
- * libc/stdio64/fopen64.c (_fopen64_r)[!__SINGLE_THREAD__]: Ditto.
- * libc/sys/linux/include/time.h (struct timespec): Moved from
- <sys/types.h> and added check for __need_timespec flag so type
- can be defined by itself.
- * libc/sys/linux/sys/_types.h (_flock_t): New type.
- * libc/sys/linux/sys/types.h (struct timespec): Moved to
- <time.h>.
-
-2002-08-29 Thomas Fitzsimmons <fitzsim@redhat.com>
-
- * libc/sys/linux/argp: New directory.
- * libc/sys/linux/getopt.c: New file.
- * libc/sys/linux/getopt1.c: New file.
- * libc/sys/linux/getoptlong.c: Remove file.
- * libc/sys/linux/include/argp.h: New file.
- * libc/sys/linux/Makefile.am: Define argp_dir and ARGP_LIB,
- based on ELIX level.
- (SUBDIRS): Add argp_dir.
- (SUBLIBS): Add ARGP_LIB.
- (ELIX_2_OBJS): Add getopt.$(oext), getopt1.$(oext), remove
- getopt_long.$(oext).
- * libc/sys/linux/configure.in (AC_OUTPUT): Add argp/Makefile.
-
-2002-08-29 Jeff Johnston <jjohnstn@redhat.com>
-
- * libc/libc.texinfo: Add node reference to wide-character strings.
- * libc/string/wcstrings.tex: New file.
- * libc/string/strtok_r.c: Remove outdated advertising clause.
- * libc/string/Makefile.am (doc): Add wide-character string
- chapter to documentation.
- * libc/string/Makefile.in: Regenerated.
-
-2002-08-29 Kazuhiro Fujieda <fujieda@jaist.ac.jp>
-
- * libc/include/wchar.h: Define NULL. Define WEOF more general
- way. Declare functions in newlib manner.
- * libc/stdlib/Makefile.am: Delete wmem*.c
- * libc/stdlib/Makefile.in: Regenerated.
- * libc/stdlib/wmemchr.c: Delete.
- * libc/stdlib/wmemcmp.c: Ditto.
- * libc/stdlib/wmemcpy.c: Ditto.
- * libc/stdlib/wmemmove.c: Ditto.
- * libc/stdlib/wmemset.c: Ditto.
- * libc/string/Makefile.am: Add wmem*.c and wcs*.c.
- * libc/string/Makefile.in: Regenerated.
- * libc/string/wcscat.c: New file derived from the NetBSD C Library.
- * libc/string/wcschr.c: Ditto.
- * libc/string/wcscmp.c: Ditto.
- * libc/string/wcscpy.c: Ditto.
- * libc/string/wcscspn.c: Ditto.
- * libc/string/wcslcat.c: Ditto.
- * libc/string/wcslcpy.c: Ditto.
- * libc/string/wcslen.c: Ditto.
- * libc/string/wcsncat.c: Ditto.
- * libc/string/wcsncmp.c: Ditto.
- * libc/string/wcsncpy.c: Ditto.
- * libc/string/wcspbrk.c: Ditto.
- * libc/string/wcsrchr.c: Ditto.
- * libc/string/wcsspn.c: Ditto.
- * libc/string/wcsstr.c: Ditto.
- * libc/string/wmemchr.c: Ditto.
- * libc/string/wmemcmp.c: Ditto.
- * libc/string/wmemcpy.c: Ditto.
- * libc/string/wmemmove.c: Ditto.
- * libc/string/wmemset.c: Ditto.
-
-2002-08-29 Jeff Johnston <jjohnstn@redhat.com>
-
- * libc/locale/locale.c (_setlocale_r)[MB_CAPABLE]: Fix so
- default locale "" is accepted for LC_CTYPE or LC_MESSAGES
- and is treated as if "C" was specified.
-
-2002-08-28 Jeff Johnston <jjohnstn@redhat.com>
-
- * Makefile.am (install-data-local): Move install of build
- newlib.h after installing headers in libc/include so as to
- overwrite default newlib.h.
- * Makefile.in: Regenerated.
-
-2002-08-28 Jeff Johnston <jjohnstn@redhat.com>
-
- * libc/include/newlib.h: New file for tools that use newlib
- headers but don't build newlib first (e.g. gcc).
-
-2002-08-28 Jeff Johnston <jjohnstn@redhat.com>
-
- * libc/stdlib/wmemchr.c: Explicitly include <_ansi.h>.
- * libc/stdlib/wmemcmp.c: Ditto.
- * libc/stdlib/wmemcpy.c: Ditto.
- * libc/stdlib/wmemmove.c: Ditto.
- * libc/stdlib/wmemset.c: Ditto.
-
-2002-08-27 Egor Duda <deo@logos-m.ru>
-
- * libc/stdlib/wmemchr.c: New file.
- * libc/stdlib/wmemcmp.c: Ditto.
- * libc/stdlib/wmemcpy.c: Ditto.
- * libc/stdlib/wmemmove.c: Ditto.
- * libc/stdlib/wmemset.c: Ditto.
- * libc/stdlib/Makefile.am (GENERAL_SOURCES): Add new files.
- * configure.host: Default -DMB_CAPABLE for cygwin.
- * libc/include/wchar.h: Declare wmemchr(), wmemcmp(), wmemcpy(),
- wmemmove() and wmemset(). Add include of <_ansi.h>.
- * libc/stdlib/Makefile.in: Regenerate.
-
-2002-08-27 Jeff Johnston <jjohnstn@redhat.com>
-
- * configure.host: Remove _ELIX_LEVEL flag setting.
- * Makefile.am(stmp-targ-include): Copy newlib.h to targ-include.
- (install-data-local): Install newlib.h.
- * Makefile.in: Regenerated.
- * aclocal.m4: Ditto.
- * configure: Ditto.
- * configure.in: Add AM_CONFIG_HEADER to generate newlib.h based on
- newlib.hin. Add AC_DEFINE_UNQUOTED entries for _ELIX_LEVEL
- and _NEWLIB_VERSION to fill in newlib.h header file entries.
- In AC_OUTPUT statement, unset ac_file so multilib support does
- not use last ac_file temporary used in newlib.h configuration.
- * libc/include/_ansi.h: Include <newlib.h>.
- * newlib.hin: New template file for newlib.h.
- * stamp-h.in: New file.
-
-2002-08-26 Wu Yongwei <adah@netstd.com>
-
- * time.h (timezonevar): Change "#if" to "#ifdef".
-
-2002-08-26 Jeff Johnston <jjohnstn@redhat.com>
-
- * Makefile.am(LIBC_OBJECTLISTS): Add STDIO64_OBJECTLIST.
- * Makefile.in: Regenerated.
- * acinclude.m4: Add support for --enable-newlib-elix-level option.
- * aclocal.m4: Regenerated.
- * configure: Ditto.
- * configure.host: Add code to define _ELIX_LEVEL if
- --enable-newlib-elix-level option is used.
- * configure.in:
- * libc/aclocal.m4: Regenerated.
- * libc/configure: Ditto.
- * libc/argz/Makefile.am: Add EL/IX level checking.
- * libc/argz/Makefile.in: Regenerated.
- * libc/argz/dummy.c: New file.
- * libc/ctype/Makefile.am: Add EL/IX level checking.
- * libc/ctype/Makefile.in: Regenerated.
- * libc/locale/Makefile.am: Add EL/IX level checking.
- * libc/locale/Makefile.in: Regenerated.
- * libc/posix/Makefile.am: Add EL/IX level checking.
- * libc/posix/Makefile.in: Regenerated.
- * libc/posix/telldir.c: Add EL/IX level checking.
- * libc/reent/Makefile.am: Ditto.
- * libc/reent/fstat64r.c: Ditto.
- * libc/reent/lseek64r.c: Ditto.
- * libc/reent/open64r.c: Ditto.
- * libc/reent/Makefile.in: Regenerated.
- * libc/search/Makefile.am: Add EL/IX level checking.
- * libc/search/Makefile.in: Regenerated.
- * libc/stdio/Makefile.am: Add EL/IX level checking.
- * libc/stdio/Makefile.in: Regenerated.
- * libc/stdio64/Makefile.am: Add EL/IX level checking.
- * libc/stdio64/Makefile.in: Regenerated.
- * libc/stdio64/dummy.c: New file.
- * libc/stdio64/fgetpos64.c: Fix so _LARGE64_FILES macro is checked
- after first include.
- * libc/stdio64/fopen64.c: Ditto.
- * libc/stdio64/freopen64.c: Ditto.
- * libc/stdio64/fseeko64.c: Ditto.
- * libc/stdio64/fsetpos64.c: Ditto.
- * libc/stdio64/ftello64.c: Ditto.
- * libc/stdio64/tmpfile64.c: Ditto.
- * libc/stdlib/Makefile.am: Add EL/IX level checking.
- * libc/stdlib/Makefile.in: Regenerated.
- * libc/stdlib/mstats.c: Add EL/IX level checking.
- * libc/string/Makefile.am: Ditto.
- * libc/string/Makefile.in: Regenerated.
- * libc/sys/linux/Makefile.am: Add EL/IX level checking.
- * libc/sys/linux/Makefile.in: Regenerated.
- * libc/sys/linux/aclocal.m4: Ditto.
- * libc/sys/linux/configure: Ditto.
- * libc/sys/linux/aio.c: Add EL/IX level checking.
- * libc/sys/linux/ftok.c: Ditto.
- * libc/sys/linux/getdate.c: Ditto.
- * libc/sys/linux/ids.c: Ditto.
- * libc/sys/linux/inode.c: Ditto.
- * libc/sys/linux/io.c: Ditto.
- * libc/sys/linux/process.c: Ditto.
- * libc/sys/linux/resource.c: Ditto.
- * libc/sys/linux/sched.c: Ditto.
- * libc/sys/linux/sig.c: Ditto.
- * libc/sys/linux/termios.c: Ditto.
- * libc/sys/linux/wait.c: Ditto plus add __waitpid and
- __libc___waitpid weak aliases.
- * libc/sys/linux/machine/i386/syscall.h: Add new _base macros
- that generate the code for a syscall, but do not create a
- weak alias.
- * libc/syscalls/Makefile.am: Add EL/IX level checking.
- * libc/syscalls/Makefile.in: Regenerated.
- * libc/time/tzset_r.c: Change to replace strdup with equivalent
- functionality.
- * libc/unix/Makefile.am: Add EL/IX level checking.
- * libc/unix/Makefile.in: Regenerated.
-
-2002-08-26 Christopher Faylor <cgf@redhat.com>
-
- * libc/include/malloc.h: On cygwin, define malloc _r functions as
- wrapper macros to standard malloc functions.
- * libc/include/stdlib.h: Ditto.
- * configure.host: Always define MALLOC_PROVIDED on cygwin.
-
-2002-08-22 Thomas Fitzsimmons <fitzsim@redhat.com>
-
- * libc/include/langinfo.h: New file.
- * libc/include/wchar.h: Likewise.
- * libc/include/sys/syslimits.h: Likewise.
- * libc/locale/fix_grouping.c: Likewise.
- * libc/locale/ldpart.c: Likewise.
- * libc/locale/ldpart.h: Likewise.
- * libc/locale/lmessages.c: Likewise.
- * libc/locale/lmessages.h: Likewise.
- * libc/locale/lmonetary.c: Likewise.
- * libc/locale/lmonetary.h: Likewise.
- * libc/locale/lnumeric.c: Likewise.
- * libc/locale/lnumeric.h: Likewise.
- * libc/locale/nl_langinfo.3: Likewise.
- * libc/locale/nl_langinfo.c: Likewise.
- * libc/locale/timelocal.c: Likewise.
- * libc/locale/timelocal.h: Likewise.
- * libc/stdlib/btowc.c: Likewise.
- * libc/stdlib/mbrlen.c: Likewise.
- * libc/stdlib/mbrtowc.c: Likewise.
- * libc/stdlib/mbsinit.c: Likewise.
- * libc/stdlib/mbsrtowcs.c: Likewise.
- * libc/stdlib/wcrtomb.c: Likewise.
- * libc/stdlib/wcsrtombs.c: Likewise.
- * libc/stdlib/wctob.c: Likewise.
- * libc/sys/linux/prof-freq.c: Likewise.
- * libc/sys/linux/profile.c: Likewise.
- * libc/sys/linux/machine/i386/dl-procinfo.c: Likewise.
- * libc/sys/linux/machine/i386/dl-procinfo.h: Likewise.
- * libc/include/stdlib.h: Change re-entrant functions to take
- mbstate_t pointers.
- * libc/include/sys/_types.h: Define _mbstate_t.
- * libc/include/sys/config.h (MB_LEN_MAX): New macro.
- * libc/include/sys/errno.h (EILSEQ): New error code.
- * libc/include/sys/reent.h: Include wchar.h. Change reentrant
- structure to use mbstate_t.
- * libc/locale/Makefile.am (LIB_SOURCES): Add new files.
- * libc/machine/powerpc/vfprintf.c: Use mbstate_t.
- * libc/machine/powerpc/vfscanf.c: Likewise.
- * libc/stdio/getdelim.c: Reallocate buffer only when necessary.
- * libc/stdio/vfprintf.c: Likewise.
- * libc/stdio/vfscanf.c: Likewise.
- * libc/stdlib/Makefile.am (LIB_SOURCES): Add new files.
- * libc/stdlib/mblen.c: Use mbstate_t.
- * libc/stdlib/mblen_r.c: Likewise.
- * libc/stdlib/mbstowcs.c: Likewise.
- * libc/stdlib/mbstowcs_r.c: Likewise.
- * libc/stdlib/mbtowc.c: Likewise.
- * libc/stdlib/mbtowc_r.c: Likewise.
- * libc/stdlib/wcstombs.c: Likewise.
- * libc/stdlib/wcstombs_r.c: Likewise.
- * libc/stdlib/wctomb_r.c: Likewise.
- * libc/sys/linux/Makefile.am (LIB_SOURCES): Add prof-freq.c and
- profile.c.
- * libc/sys/linux/machine/i386/Makefile.am (LIB_SOURCES): Add
- dl-procinfo.c.
- * libc/sys/linux/sys/errno.h (EILSEQ): New error code.
- * libc/sys/linux/sys/types.h (off_t): Define type.
- * testsuite/newlib.locale/UTF-8.c: Change locale name from UTF-8
- to C-UTF-8.
- * testsuite/newlib.locale/UTF-8.exp: Likewise.
-
-2002-08-20 Casper S. Hornstrup <chorns@users.sourceforge.net>
-
- * libc/stdlib/mallocr.c: #include windows.h on Win32.
- (AlignPage): Continue macro on next line.
-
-2002-08-19 Jeff Johnston <jjohnstn@redhat.com>
-
- * libc/sys/linux/include/pthread.h: New file.
-
-2002-08-19 Jeff Johnston <jjohnstn@redhat.com>
-
- * libc/include/sys/types.h: Support __need_inttypes macro
- that only sets the __intxx and __uintxx types.
- * libc/machine/powerpc/Makefile.am: Add stdlib to include directories
- to get mprec.h.
- * libc/machine/powerpc/Makefile.in: Regenerated.
- * libc/machine/powerpc/vfprintf.c: Fix state variable type.
- * libc/machine/powerpc/vfscanf.c: Fix state variable type. Remove
- redundant fixed-point conversion prototypes.
- * libc/machine/powerpc/machine/stdlib.h[__SPE__]: Include <sys/types.h>
- after setting __need_inttypes.
-
-2002-08-18 Christopher Faylor <cgf@redhat.com>
-
- * libc/include/sys/unistd.h: Add getsid declaration for cygwin.
-
-2002-08-17 Jeff Johnston <jjohnstn@redhat.com>
-
- * libc/include/sys/config.h[__PPC__][__SPE__]: Set
- _LONG_DOUBLE to double.
-
-2002-08-17 Jeff Johnston <jjohnstn@redhat.com>
-
- * configure.host: Add powerpc*-*-eabispe* configuration.
- * libc/machine/powerpc/atosfix16.c: New fixed-point conversion file.
- * libc/machine/powerpc/atosfix32.c: Ditto.
- * libc/machine/powerpc/atosfix64.c: Ditto.
- * libc/machine/powerpc/atoufix16.c: Ditto.
- * libc/machine/powerpc/atoufix32.c: Ditto.
- * libc/machine/powerpc/atoufix64.c: Ditto.
- * libc/machine/powerpc/fix64.h: Ditto.
- * libc/machine/powerpc/simdldtoa.c: Ditto.
- * libc/machine/powerpc/strtosfix16.c: Ditto.
- * libc/machine/powerpc/strtosfix32.c: Ditto.
- * libc/machine/powerpc/strtosfix64.c: Ditto.
- * libc/machine/powerpc/strtoufix16.c: Ditto.
- * libc/machine/powerpc/strtoufix32.c: Ditto.
- * libc/machine/powerpc/strtoufix64.c: Ditto.
- * libc/machine/powerpc/ufix64toa.c: Ditto.
- * libc/machine/powerpc/configure.in: Add check for
- powerpc*-eabispe and add fixed-point conversion functions.
- * libc/machine/powerpc/configure: Regenerated.
- * libc/machine/powerpc/vfprintf.c[__SPE__]: Add support for
- %r and %R format specifiers which handle fixed-point data.
- * libc/machine/powerpc/vfscanf.c[__SPE__]: Ditto.
- * libc/machine/powerpc/machine/stdlib.h[__SPE__]: Add fixed-point
- function prototypes.
-
-2002-08-17 Jeff Johnston <jjohnstn@redhat.com>
-
- * Makefile.am: Move cmath stuff into libc/sys/linux.
- * Makefile.in: Regenerated.
- * configure.host: Default -DMB_CAPABLE for x86-linux.
- * libc/include/reent.h: Define _sbrk to take signed int argument.
- * libc/include/sys/unistd.h: Ditto for _sbrk_r and sbrk.
- * libc/locale/locale.c[MB_CAPABLE]: Add LC_MESSAGES support and
- make locale name checking more efficient. Also allow "C-ISO-8859-1"
- locale for LC_CTYPE and LC_MESSAGES.
- * libc/reent/sbrkr.c: Change prototype to take ptrdiff_t.
- * libc/sys/linux/brk.c: Change sbrk prototype.
- * libc/sys/linux/include/time.h: Remove Cygwin stuff and
- include <sys/features.h>.
- (CLOCK_THREAD_CPUTIME): Renamed to CLOCK_THREAD_CPUTIME_ID.
- (CLOCK_PROCESS_CPUTIME): Renamed to CLOCK_PROCESS_CPUTIME_ID.
- * libc/sys/linux/sys/cdefs.h: Replace with glibc sys/cdefs.h
- with a few local additions.
- * libc/sys/linux/sys/features.h: New file.
- * libc/sys/linux/sys/unistd.h: Change _sbrk_r and sbrk prototypes
- to take signed argument.
- * libc/syscalls/syssbrk.c: Change sbrk, _sbrk_r, and _sbrk
- prototypes to take signed size argument.
-
-2002-08-16 Thomas Fitzsimmons <fitzsim@redhat.com>
-
- * libc/sys/linux/cmath: New directory.
- * libc/sys/linux/include/cmathcalls.h: New file.
- * libc/sys/linux/include/complex.h: New file.
- * libc/sys/linux/machine/i386/huge_val.h: New file
- * libm/math/w_sincos.c: New file
- * libm/math/wf_sincos.c: New file
- * libm/mathfp/s_sincos.c: New file
- * libm/mathfp/sf_sincos.c: New file
- * Makefile.am (LIBC_OBJECTLISTS): Add cmath/objectlist.awk.in.
- * libc/include/math.h: Add sincos and sincosf declarations.
- * libc/sys/linux/Makefile.am (SUBDIRS): Add cmath.
- (SUBLIBS): Likewise.
- * libc/sys/linux/configure.in (AC_OUTPUT): Add cmath.
- * libm/math/Makefile.am (src): Add w_sincos.c.
- (fsrc): Add wf_sincos.c.
- * libm/mathfp/Makefile.am (src): Add s_sincos.c
- (fsrc): Add sf_sincos.c.
-
-2002-08-12 Jeff Johnston <jjohnstn@redhat.com>
-
- * libc/sys/linux/machine/i386/crt0.c (__bss_start,_end):
- Declare as extern chars and use the address operator to
- properly use values set in linker script.
-
-2002-08-09 Jason Tishler <jason@tishler.net>
-
- * libc/stdlib/mallocr.c: Include <limits.h>.
- (request2size): Change macro to do
- unsigned long comparisons and avoid signed overflow.
- (mALLOc): Add overflow check for the number of bytes to allocate.
- (rEALLOc): Ditto.
-
-2002-08-09 Jeff Johnston <jjohnstn@redhat.com>
-
- * configure.host: Add check for --enable-newlib-io-pos-args
- and define WANT_IO_POS_ARGS flag if enabled. Define
- the flag by default for x86-linux configurations.
- * configure.in: Add support for --enable-newlib-io-pos-args.
- * libc/configure.in: Ditto.
- * configure: Regenerated.
- * libc/configure: Ditto.
- * libc/stdio/Makefile.am: Specify -fshort-enums for compiling
- vfprintf.c and vfiprintf.c.
- * libc/stdio/Makefile.in: Regenerated.
- * libc/stdio/vfprintf.c: Add positional argument support that
- is enabled by compiling with -DWANT_IO_POS_ARGS.
-
-2002-08-07 Richard Sandiford <rsandifo@redhat.com>
-
- * libc/include/machine/setjmp.h: For mips, define _JBLEN based
- based on __mips_soft_float rather than __mips64.
- * libc/machine/mips/setjmp.S: Provide hard and soft float versions
- of both 32-bit and 64-bit code.
-
-2002-08-04 Christopher Faylor <cgf@redhat.com>
-
- * libc/stdio/popen.c (popen): Allow "rb", "rt", "wb", and "wt"
- arguments for popen to match similar functionality in fopen.
-
-2002-07-29 Pierre Humblet <pierre.humblet@ieee.org>
-
- * libc/include/sys/unistd.h: Add setgroups prototype for Cygwin.
-
-2002-07-29 Jeff Johnston <jjohnstn@redhat.com>
-
- * libc/sys/linux/Makefile.am: Add aio64.c.
- * libc/sys/linux/Makefile.in: Regenerated.
- * libc/sys/linux/aio.c (aio_init): ENOSYS stub added.
- * libc/sys/linux/aio64.c: New file.
-
-2002-07-26 Jeff Johnston <jjohnstn@redhat.com>
-
- * libc/include/sys/param.h (MAX, MIN): Added macros.
- * libc/sys/linux/Makefile.am: Add new files.
- * libc/sys/linux/Makefile.in: Regenerated.
- * libc/sys/linux/sys/stat.h: Add *stat64 prototypes.
- * libc/sys/linux/inode.c (fchdir): Added syscall.
- * libc/sys/linux/ftw.c: New file.
- * libc/sys/linux/ftw64.c: Ditto.
- * libc/sys/linux/getwd.c: Ditto.
- * libc/sys/linux/scandir64.c: Ditto.
- * libc/sys/linux/strverscmp.c: Ditto.
- * libc/sys/linux/versionsort.c: Ditto.
- * libc/sys/linux/versionsort64.c: Ditto.
-
-2002-07-26 Jeff Johnston <jjohnstn@redhat.com>
-
- * libc/string/strings.tex: Fix typo for memccpy.
-
-2002-07-25 Jeff Johnston <jjohnstn@redhat.com>
-
- * libc/sys/linux/io64.c (truncate64, ftruncate64): Added.
- * libc/sys/linux/sys/types.h (off64_t): Definition added.
-
-2002-07-25 Jeff Johnston <jjohnstn@redhat.com>
-
- * libc/sys/linux/Makefile.am: Add fclean.c.
- * libc/sys/linux/Makefile.in: Regenerated.
- * libc/sys/linux/fclean.c: New file.
-
-2002-07-25 Jeff Johnston <jjohnstn@redhat.com>
-
- * libc/sys/linux/Makefile.am: Add confstr.c.
- * libc/sys/linux/Makefile.in: Regenerated.
- * libc/sys/linux/confstr.c: New file.
- * libc/sys/linux/confstr.h: Ditto.
- * libc/sys/linux/sys/unistd.h: Include <features.h> and
- <bits/environments.h>.
-
-2002-07-25 Jeff Johnston <jjohnstn@redhat.com>
-
- * libc/sys/linux/config.h (__set_errno): Macro definition removed.
- * libc/sys/linux/fpathconf.c (__set_errno): Ditto.
- * libc/sys/linux/libc-internal.h (__set_errno): Ditto.
- * libc/sys/linux/pathconf.c (__set_errno): Ditto.
- * libc/sys/linux/ttyname_r.c (__set_errno): Ditto.
- * libc/sys/linux/sys/errno.h (__set_errno): Macro definition added.
-
-2002-07-24 Jeff Johnston <jjohnstn@redhat.com>
-
- * libc/sys/linux/Makefile.am: Add new files.
- * libc/sys/linux/Makefile.in: Regenerated.
- * libc/sys/linux/fstab.c: New file.
- * libc/sys/linux/fstatvfs.c: Ditto.
- * libc/sys/linux/fstatvfs64.c: Ditto.
- * libc/sys/linux/internal_statvfs.c: Ditto.
- * libc/sys/linux/mntent.c: Ditto.
- * libc/sys/linux/mntent_r.c: Ditto.
- * libc/sys/linux/statvfs.c: Ditto.
- * libc/sys/linux/statvfs64.c: Ditto.
- * libc/sys/linux/include/paths.h: Ditto.
- * libc/sys/linux/inode.c (statfs, fstatfs): New syscalls
- with double-underscore weak-aliases.
- * libc/sys/linux/sys/stat.h: Add *stat64 prototypes.
-
-2002-07-24 Jeff Johnston <jjohnstn@redhat.com>
-
- * libc/include/signal.h (SIG_IGN, SIG_DFL, SIG_ERR): Change
- to use _sig_func_ptr type casted constants.
- (_sig_func_ptr): Typedef moved to sys/signal.h.
- * libc/include/sys/signal.h (_sig_func_ptr): Typedef added.
- For __rtems, use POSIX definition, otherwise default to ANSI.
- * libc/sys/linux/sys/signal.h (_sig_func_ptr): Typedef added.
-
-2002-07-24 Stephane Carrez <stcarrez@nerim.fr>
-
- * configure.host: Recognize m6811-elf and m6812-elf targets.
- * libc/include/machine/setjmp.h (_JBLEN): Define for 68hc11/68hc12.
- * libc/include/machine/ieeefp.h (__IEEE_BIG_ENDIAN): Define for 68HC11.
- (_DOUBLE_IS_32BITS): Define when compiling with -fshort-double.
- * libc/include/sys/config.h (INT_MAX, UINT_MAX): Define
- according to __INT_MAX__.
- (_POINTER_INT): Define to short.
- * libc/machine/m68hc11/Makefile.am: New file.
- * libc/machine/m68hc11/Makefile.in: New file.
- * libc/machine/m68hc11/configure.in: New file.
- * libc/machine/m68hc11/configure: New file.
- * libc/machine/m68hc11/aclocal.m4: New file.
- * libc/machine/m68hc11/setjmp.S: New file.
-
-2002-07-23 Jeff Johnston <jjohnstn@redhat.com>
-
- * libc/include/string.h: Add mempcpy, strndup, and _strndup_r
- prototypes.
- * libc/stdlib/Makefile.am: Remove strdup.c and strdup_r.c.
- * libc/stdlib/Makefile.in: Regenerated.
- * libc/stdlib/strdup.c: Removed.
- * libc/stdlib/strdup_r.c: Removed.
- * libc/string/Makefile.am: Add strdup.c, strdup_r.c, memccpy.c,
- mempcpy.c, strndup.c, and strndup_r.c.
- * libc/string/Makefile.in: Regenerated.
- * libc/string/memccpy.c: New file.
- * libc/string/mempcpy.c: Ditto.
- * libc/string/strndup.c: Ditto.
- * libc/string/strndup_r.c: Ditto.
- * libc/string/strdup.c: New file moved from stdlib.
- * libc/string/strdup_r.c: Ditto.
- * libc/string/strings.tex: Add memccpy and mempcpy documentation.
-
-2002-07-23 Jeff Johnston <jjohnstn@redhat.com>
-
- * libc/include/stdio.h: Move fcloseall prototype within
- #ifndef _REENT_ONLY section.
- * libc/sys/linux/Makefile.am: Add new files.
- * libc/sys/linux/Makefile.in: Regenerated.
- * libc/sys/linux/sys/stdio.h: Add ctermid prototype.
- * libc/sys/linux/sys/unistd.h: Add ttyname_r prototype.
- * libc/sys/linux/sys/types.h: Add ino64_t type.
- * libc/sys/linux/ctermid.c: New file.
- * libc/sys/linux/ttyname_r.c: Ditto.
- * libc/sys/linux/readdir64.c: Ditto.
-
-2002-07-22 Jeff Johnston <jjohnstn@redhat.com>
-
- * libc/include/stdio.h (fcloseall, _fcloseall_r): Added prototypes.
- * libc/stdio/Makefile.am: Added fcloseall.c support.
- * libc/stdio/Makefile.in: Regenerated.
- * libc/stdio/fcloseall.c: New file.
- * libc/stdio64/Makefile.am: Remove missing .def references.
- * libc/stdio64/Makefile.in: Regenerated.
-
-2002-07-22 Jeff Johnston <jjohnstn@redhat.com>
-
- * libc/machine/powerpc/time.c: Removed..renamed to times.c.
- * libc/machine/powerpc/times.c: New file.
- * libc/machine/powerpc/Makefile.am: Change time.c to times.c.
- * libc/machine/powerpc/Makefile.in: Regenerated.
-
-2002-07-22 Aldy Hernandez <aldyh@redhat.com>
-
- * libc/machine/powerpc/time.c: New file.
- * libc/machine/powerpc/Makefile.am (lib_a_SOURCES): Add
- time.c.
- * libc/machine/powerpc/Makefile.in: Regenerated.
-
-2002-07-22 Thomas Fitzsimmons <fitzsim@redhat.com>
-
- * libc/libc.texinfo: Change copyright notices to Red Hat from
- Cygnus.
- * libm/libm.texinfo: Likewise.
- * README: Change docs URL to
- http://sources.redhat.com/newlib/docs.html.
-
-2002-07-19 Jeff Johnston <jjohnstn@redhat.com>
-
- * libc/sys/linux/Makefile.am: Add pathconf.c and fpathconf.c.
- * libc/sys/linux/Makefile.in: Regenerated.
- * libc/sys/linux/inode.c: Add chmod, fchmod, and chown syscalls.
- * libc/sys/linux/io.c: Add ftruncate syscall.
- * libc/sys/linux/fpathconf.c: New file.
- * libc/sys/linux/pathconf.c: Ditto.
- * libc/sys/linux/linux_fsinfo.h: Ditto.
- * libc/sys/linux/sys/unistd.h: Ditto.
-
-2002-07-19 Jeff Johnston <jjohnstn@redhat.com>
-
- * libc/stdio64/Makefile.am: Remove missing files.
- * libc/stdio64/Makefile.in: Regenerated.
-
-2002-07-19 Jeff Johnston <jjohnstn@redhat.com>
-
- * libc/include/sys/config.h[__i386__][__linux__]: Define
- _LARGE64FILE_SOURCE to 1.
- * libc/sys/linux/Makefile.am: Add getrlimit64.c and setrlimit64.c.
- * libc/sys/linux/Makefile.in: Regenerated.
- * libc/sys/linux/resource.c: Add __getrlimit and __setrlimit aliases.
- * libc/sys/linux/sys/linux_time.h: Protect struct timeval definition.
- * libc/sys/linux/sys/resource.h: Include <bits/resource.h> instead
- of <linux/resource.h>.
- * libc/sys/linux/getrlimit64.c: New file.
- * libc/sys/linux/setrlimit64.c: Ditto.
-
-2002-07-19 Thomas Fitzsimmons <fitzsim@redhat.com>
-
- * libc/argz/argz_replace.c: Include buf_findstr.h.
- * libc/argz/buf_findstr.c: Likewise.
- * libc/argz/envz_entry.c: Include buf_findstr.h. Cast return
- value to (char *).
- * libc/argz/envz_get.c: Likewise.
- * libc/include/sys/unistd.h: Add getopt and getsubopt declarations.
- * libc/stdlib/Makefile.am (LIB_SOURCES): Add getsubopt.c.
- * libc/stdlib/getsubopt.3: New file.
- * libc/stdlib/getsubopt.c: New file.
- * libc/sys/linux/machine/i386/socketcall.h (__sockcall_base):
- Change esp to ebp.
-
-2002-07-17 Jeff Johnston <jjohnstn@redhat.com>
-
- * configure.host(stdio64_dir): New setting that is used to
- enable building of new stdio64 directory.
- * libc/Makefile.am[HAVE_STDIO64_DIR]: Add support for
- large files.
- (stmp-stdio64,stdio64.texi): New targets to optionally add in
- stdio64 info to info files.
- * libc/Makefile.in: Regenerated.
- * libc/configure: Ditto.
- * libc/configure.in: Add configuration variables that are set
- when stdio64 is selected as subdir in configure.host.
- * libc/libc.texinfo: Add optional menu item for Stdio64, based
- on whether STDIO64 flag is set or not.
- * libc/sys.tex: Add optional stdio64 syscalls based on whether
- STDIO64 flag is set or not.
- * libc/include/reent.h[__LARGE64_FILES]: Add new stdio64
- _r sycall routines.
- * libc/include/stdio.h[__LARGE64_FILES]: Add new stdio64 prototypes.
- (FILE): Typedef'd to __FILE instead of struct __sFILE directly.
- (__SL64): New file flag indicating file is opened via fopen64.
- * libc/include/sys/_types.h(_off64_t): Added.
- * libc/include/sys/config.h: For x86-linux, define __LARGE64_FILES.
- * libc/include/sys/reent.h(struct __sFILE64): New file structure
- for 64-bit offset large file support.
- (__FILE): New intermediate type either set to struct __sFILE64 or
- struct __sFILE, depending on whether __LARGE64_FILES is set or not.
- * libc/reent/Makefile.am[HAVE_STDIO64_DIR]: Add new files.
- * libc/reent/Makefile.in: Regenerated.
- * libc/reent/fstat64r.c: New file.
- * libc/reent/lseek64r.c: Ditto.
- * libc/reent/open64r.c: Ditto.
- * libc/reent/reent.tex: Optionally add stdio64 reentrant syscalls
- based on whether STDIO64 flag is set.
- * libc/stdio/stdio.tex: Add blank line.
- * libc/stdio64/Makefile.am: New file.
- * libc/stdio64/Makefile.in: Ditto.
- * libc/stdio64/fgetpos64.c: Ditto.
- * libc/stdio64/fopen64.: Ditto.
- * libc/stdio64/freopen64.c: Ditto.
- * libc/stdio64/fseeko64.c: Ditto.
- * libc/stdio64/fsetpos64.c: Ditto.
- * libc/stdio64/ftello64.c: Ditto.
- * libc/stdio64/local64.h: Ditto.
- * libc/stdio64/stdio64.c: Ditto.
- * libc/stdio64/stdio64.tex: Ditto.
- * libc/stdio64/tmpfile64.c: Ditto.
- * libc/sys/linux/io64.c: Add weak aliases for lseek64, fstat64, and
- open64.
-
-2002-07-16 Jeff Johnston <jjohnstn@redhat.com>
-
- * libc/Makefile.am (stmp-extra): New target to set makeinfo flag
- if LIBC_EXTRA_LIB is present.
- * libc/Makefile.in: Regenerated.
- * libc/libc.texinfo: Add blank line.
- * libc/argz/Makefile.am: Add doc support.
- * libc/search/Makefile.am: Ditto.
- * libc/argz/Makefile.in: Regenerated.
- * libc/search/Makefile.in: Ditto.
- * libc/misc/misc.tex: Add ffs function.
- * libc/stdio/ftell.c: Fix missing doc delimeter in description.
-
-2002-07-15 Jeff Johnston <jjohnstn@redhat.com>
-
- * libc/include/sys/config.h[__H8300__]: Replace __SMALL_BITFIELDS
- definition that was removed in error.
-
-2002-07-15 Jeff Johnston <jjohnstn@redhat.com>
-
- * libc/include/machine/ieeefp.h: Change to only define
- floating point defines (e.g one of __IEEE_BIG_ENDIAN or
- __IEEE_LITTLE_ENDIAN must be defined for each platform).
- * libc/include/sys/config.h: Include <machine/ieeefp.h> and
- remove redundant floating point definitions.
-
-2002-07-15 Jeff Johnston <jjohnstn@redhat.com>
-
- * libc/sys/linux/callocr.c: Fix so code references
- calloc.
-
-2002-07-15 Jeff Johnston <jjohnstn@redhat.com>
-
- * libc/sys/linux/Makefile.am: Add new files.
- * libc/sys/linux/Makefile.in: Regenerated.
- * libc/sys/linux/bp-sym.h: Moved to include directory.
- * libc/sys/linux/mmap.c: Add weak aliases: __mmap, __munmap, __mremap.
- * libc/sys/linux/inode.c: Set _LIBC to 1.
- * libc/sys/linux/mq_close.c: Ditto.
- * libc/sys/linux/mq_getattr.c: Ditto.
- * libc/sys/linux/mq_open.c: Ditto.
- * libc/sys/linux/mq_receive.c: Ditto.
- * libc/sys/linux/mq_send.c: Ditto.
- * libc/sys/linux/mq_setattr.c: Ditto.
- * libc/sys/linux/mq_unlink.c: Ditto.
- * libc/sys/linux/calloc.c: New file.
- * libc/sys/linux/callocr.c: Ditto.
- * libc/sys/linux/cfreer.c: Ditto.
- * libc/sys/linux/config.h: Ditto.
- * libc/sys/linux/free.c: Ditto.
- * libc/sys/linux/freer.c: Ditto.
- * libc/sys/linux/msize.c: Ditto.
- * libc/sys/linux/msizer.c: Ditto.
- * libc/sys/linux/mstats.c: Ditto.
- * libc/sys/linux/mtrim.c: Ditto.
- * libc/sys/linux/mtrimr.c: Ditto.
- * libc/sys/linux/pvallocr.c: Ditto.
- * libc/sys/linux/realloc.c: Ditto.
- * libc/sys/linux/reallocr.c: Ditto.
- * libc/sys/linux/thread-m.h: Ditto.
- * libc/sys/linux/vallocr.c: Ditto.
- * libc/sys/linux/bp-checks.h: Ditto.
- * libc/sys/linux/libc-symbols.h: Ditto.
- * libc/sys/linux/libc-tsd.h: Ditto.
- * libc/sys/linux/libintl.h: Ditto.
- * libc/sys/linux/malign.c: Ditto.
- * libc/sys/linux/malignr.c: Ditto.
- * libc/sys/linux/mallinfor.c: Ditto.
- * libc/sys/linux/malloc.c: Ditto.
- * libc/sys/linux/mallocr.c: Ditto.
- * libc/sys/linux/malloptr.c: Ditto.
- * libc/sys/linux/mallstatsr.c: Ditto.
- * libc/sys/linux/mcheck.c: Ditto.
- * libc/sys/linux/mhooks.h: Ditto.
- * libc/sys/linux/include/bp-sym.h: Ditto.
- * libc/sys/linux/include/malloc.h: Ditto.
- * libc/sys/linux/include/mcheck.h: Ditto.
- * libc/sys/linux/linuxthreads/machine/i386/Makefile.am: Remove
- getpagesize.c.
- * libc/sys/linux/linuxthreads/machine/i386/Makefile.in: Regenerated.
- * libc/sys/linux/linuxthreads/machine/i386/getpagesize.c: Moved.
- * libc/sys/linux/machine/i386/getpagesize.c: New file.
- * libc/sys/linux/machine/i386/Makefile.am: Add getpagesize.c.
- * libc/sys/linux/machine/i386/Makefile.in: Regenerated.
- * libc/sys/linux/machine/i386/sysdep.h: New file.
- * libc/sys/linux/machine/i386/weakalias.h: Add weak_function support.
- * libc/sys/linux/sys/dirent.h: Set _LIBC to 1.
- * libc/sys/linux/sys/lock.h: Include <machine/weakalias.h>.
-
-2002-07-12 Jeff Johnston <jjohnstn@redhat.com>
-
- * libc/sys/linux/include/mqueue.h: Change to use <bits/siginfo.h>
- instead of <asm/siginfo.h>.
- * libc/sys/linux/sys/signal.h: Change to include various linux
- <bits/xxx.h> header files, rather than <linux/signal.h> so as
- to work with multiple releases of glibc header files.
-
-2002-07-11 Chris Demetriou <cgd@broadcom.com>
-
- * testsuite/newlib.search/hsearchtest.c: New file to test
- newlib/libc/search.
- * testsuite/newlib.search/hsearchtest.exp: Likewise.
-
-2002-07-10 Florian Schrack <florian.schrack@freenet.de>
-
- * libc/sys/mmixware/read.c: Use SYS_Fgets syscall if dealing with
- a terminal.
- * libc/sys/mmixware/sys/syscall.h (SYS_Fgets): Definition added.
-
-2002-07-08 Jeff Johnston <jjohnstn@redhat.com>
-
- * libc/include/math.h (MAXFLOAT): Added.
-
-Mon Jul 8 13:55:23 2002 J"orn Rennecke <joern.rennecke@superh.com>
-
- * libc/machine/sh/Makefile.am (lib_a_SOURCES):
- Make strcmp.S unconditional.
- * libc/machine/sh/Makefile.in: Regenerate.
- * libc/machine/sh/asm.h (DELAYED_BRANCHES, SL): Also for __SH5__ .
- * strcmp.S (strcmp): Add SHmedia variant. Use different registers
- for SHcompact.
-
-2002-07-04 Jeff Johnston <jjohnstn@redhat.com>
-
- * libc/sys/linux/inode.c: Fix utime prototype and add _LIBC
- define before including <sys/lock.h>.
-
-2002-07-04 Jeff Johnston <jjohnstn@redhat.com>
-
- * libc/include/utime.h: Add include of <_ansi.h>.
- * libc/sys/linux/Makefile.am: Add utimes.c.
- * libc/sys/linux/Makefile.in: Regenerated.
- * libc/sys/linux/inode.c(__umask): New static routine.
- (umask): Written to use __umask and attempt to thread lock.
- (getumask): New function written to use __umask and thread lock.
- * libc/sys/linux/utimes.c: New file.
- * libc/sys/linux/sys/time.h: Fix utimes prototype.
- * libc/sys/linux/sys/utime.h: New file.
-
-2002-07-04 Thomas Fitzsimmons <fitzsim@redhat.com>
-
- * libtool.m4: New file.
- * libc/sys/linux/process.c: Implement vfork in terms of fork,
- rather than as a syscall.
-
-2002-07-04 Jeff Johnston <jjohnstn@redhat.com>
-
- * libc/include/stdio.h: Add new prototypes.
- * libc/stdio/Makefile.am: Add fseeko.c and ftello.c.
- * libc/stdio/Makefile.in: Regenerated.
- * libc/stdio/fseek.c: Add fseeko documentation.
- * libc/stdio/ftell.c: Add ftello documentation.
- * libc/stdio/fseeko.c: New file.
- * libc/stdio/ftello.c: New file.
-
-2002-07-04 Jeff Johnston <jjohnstn@redhat.com>
-
- * libc/stdio/Makefile.am: Add asprintf.c and vasprintf.c.
- * libc/stdio/Makefile.in: Regenerated.
- * libc/stdio/asprintf.c: New file.
- * libc/stdio/vasprintf.c: Ditto.
- * libc/stdio/fvwrite.c: Add code to dynamically reallocate
- the buffer for asprintf support.
- * libc/stdio/sprintf.c: Add asprintf documentation.
- * libc/stdio/vfprintf.c: Add vasprintf documentation.
- * libc/include/stdio.h: Add new prototypes.
-
-2002-07-02 Thomas Fitzsimmons <fitzsim@redhat.com>
-
- * libc/search/hcreate.c: Remove advertising clause from license.
- * libc/search/hcreate_r.c: Likewise.
-
-2002-07-02 Chris Demetriou <cgd@broadcom.com>
-
- * libc/include/sys/config.h (__IEEE_LITTLE_ENDIAN)
- (__IEEE_BIG_ENDIAN): Define appropriately for MIPS.
- Check that one of them is defined and error out if not.
- Add any platforms defined in <machine/ieeefp.h> that are missing.
- * libc/search/hash.h (DB_BYTE_ORDER, DB_BIG_ENDIAN)
- (DB_LITTLE_ENDIAN): New defines.
- * libc/search/hash.c: Replace all incorrect checks for
- _IEEE_LITTLE_ENDIAN with tests of BYTE_ORDER, and all uses of
- BYTE_ORDER, LITTLE_ENDIAN, and BIG_ENDIAN with DB_* versions.
- * libc/search/hash_page.c: Likewise.
-
-2002-06-28 Thomas Fitzsimmons <fitzsim@redhat.com>
-
- * libm/mathfp/sf_pow.c (powf): Change k from int to float.
-
-2002-06-27 Benjamin Kosnik <bkoz@redhat.com>
-
- * libc/include/stdio.h: Untangle, add _BEGIN_STD_C and _END_STD_C.
- * libc/include/time.h: Same.
- * libc/include/string.h: Same.
- * libc/include/stdlib.h: Same.
- * libc/include/signal.h: Same.
- * libc/include/setjmp.h: Same.
- * libc/include/math.h: Same.
- * libc/include/locale.h: Same.
- * libc/include/ctype.h: Same.
- * libc/include/machine/setjmp.h: Same.
- * libc/include/_ansi.h (_BEGIN_STD_C): Add.
- (_END_STD_C): Add.
-
-2002-06-27 Jeff Johnston <jjohnstn@redhat.com>
-
- * libc/include/sys/_types.h: Define _ssize_t as int if int is
- 32-bits, otherwise define it as long.
- * libc/include/sys/types.h: Include <_ansi.h> and <sys/_types.h>
- and define ssize_t as _ssize_t.
- * libc/reent/readr.c: Change return type to _ssize_t.
- * libc/reent/writer.c: Ditto.
- * libc/sys/linux/Makefile.am: Add aio.c.
- * libc/sys/linux/Makefile.in: Regenerated.
- * libc/sys/linux/aio.c: New file.
- * libc/sys/linux/sys/cdefs.h: Add __restrict_arr definition.
- * libm/common/fdlibm.h: Undef __P before defining it.
-
-2002-06-27 Thomas Fitzsimmons <fitzsim@redhat.com>
-
- * libm/mathfp/s_pow.c (pow): Fix checks on variable k. Add
- exponent_is_even_int variable. Handle case where x is
- negative, and y is an odd integer.
- * libm/mathfp/sf_pow.c (powf): Likewise.
-
- * libm/mathfp/er_lgamma.c: Remove __kernel references.
- * libm/mathfp/erf_lgamma.c: Likewise.
- * libm/mathfp/s_tgamma.c: Likewise.
- * libm/mathfp/sf_tgamma.c: Likewise.
-
-2002-06-27 Jeff Johnston <jjohnstn@redhat.com>
-
- * libc/sys/linux/Makefile.am: Add new clock routines.
- * libc/sys/linux/Makefile.in: Regenerated.
- * libc/sys/linux/clock_getres.c: New file.
- * libc/sys/linux/clock_gettime.c: Ditto.
- * libc/sys/linux/clock_settime.c: Ditto.
- * libc/sys/linux/hp-timing.h: Ditto.
- * libc/sys/linux/libc-internal.h: Ditto.
- * libc/sys/linux/sysconf.c: Fix typo.
- * libc/sys/linux/include/time.h: Add include of <sys/linux_time.h>.
- * libc/sys/linux/machine/hp-timing.h: New file.
- * libc/sys/linux/machine/i386/Makefile.am: Add new files.
- * libc/sys/linux/machine/i386/Makefile.in: Regenerated.
- * libc/sys/linux/machine/i386/get_clockfreq.c: New file.
- * libc/sys/linux/machine/i386/hp-timing.c: Ditto.
- * libc/sys/linux/machine/i386/hp-timing.h: Ditto.
- * libc/sys/linux/sys/linux_time.h: New file.
- * libc/sys/linux/sys/time.h: Remove include of <linux/time.h> and
- replace with <sys/linux_time.h>.
-
-Wed Jun 26 16:33:25 2002 J"orn Rennecke <joern.rennecke@superh.com>
-
- * libc/sys/sh/crt0.S: Remove vestigial .section directive.
-
-2002-06-25 Jeff Johnston <jjohnstn@redhat.com>
-
- * libc/sys/linux/Makefile.am: Consolidate additional items under
- ADD_OBJS.
- * libc/sys/linux/Makefile.in: Regenerated.
-
-2002-06-25 Jeff Johnston <jjohnstn@redhat.com>
-
- * libc/sys/linux/sethostname.c: New file.
- * libc/sys/linux/Makefile.am: Add sethostname.c support.
- * libc/sys/linux/Makefile.in: Regenerated.
-
-2002-06-24 Thomas Fitzsimmons <fitzsim@redhat.com>
-
- * libc/search/db_local.h: New file.
- * libc/include/db.h: Remove.
- * libc/search/Makefile.am (LIB_SOURCES): Add db_local.h.
- * libc/search/hash.c (MIN,MAX): Add macros. Change <db.h> to
- "db_local.h".
- * libc/search/hash_bigkey.c: Likewise.
- * libc/search/hash_buf.c: Likewise.
- * libc/search/hash_func.c: Likewise.
- * libc/search/hash_log2.c: Likewise.
- * libc/search/hash_page.c: Likewise.
-
-2002-06-24 J"orn Rennecke <joern.rennecke@superh.com>
-
- * libc/machine/sh/strlen.S: New file.
- * libc/machine/sh/Makefile.am (lib_a_SOURCES): Add rule for it.
- * libc/machine/sh/Makefile.am: Regenerate.
-
-2002-06-24 Jeff Johnston <jjohnstn@redhat.com>
-
- * libc/sys/linux/gethostname.c: Change name to __gethostname and
- add gethostname alias.
-
-2002-06-24 Jeff Johnston <jjohnstn@redhat.com>
-
- * libc/include/math.h: Remove <sys/types.h>.
- (__dmath): Use __ULong instead of __uint32_t.
- * libc/include/sys/reent.h: If long or int is not 32-bits,
- include <sys/types.h> to get definitions for __int32_t and __uint32_t.
- * libc/stdlib/mprec.h: Include <sys/types.h> to get integer defs.
- * libm/common/fdlibm.h: Ditto.
-
-2002-06-24 Thomas Fitzsimmons <fitzsim@redhat.com>
-
- * libc/include/ndbm.h: Remove.
- * libc/search/ndbm.c: Remove.
-
-2002-06-24 WATANABE Hirofumi <eban@os.rim.or.jp>
-
- * libc/stdio/fseek.c (fseek): Fix braces.
-
-2002-06-21 Corinna Vinschen <corinna@vinschen.de>
-
- * libc/time/strftime.c (strftime): Add %e format specifier.
-
-2002-06-21 Thomas Fitzsimmons <fitzsim@redhat.com>
-
- * libc/search/hash.h (LITTLE_ENDIAN, BIG_ENDIAN): Define if not
- previously defined.
-
-2002-06-21 Richard Earnshaw (rearnsha@arm.com)
-
- * libc/sys/arm/sys/param.h (BIG_ENDIAN, LITTLE_ENDIAN): Define.
- (BYTE_ORDER): Define as appropriate for the target.
-
-2002-06-21 Jeff Johnston <jjohnstn@redhat.com>
-
- * libc/include/sys/config.h[__linux__]: Set _READ_WRITE_RETURN_TYPE
- to _ssize_t.
- * libc/sys/linux/io.c (read, write): Change to return ssize_t.
-
-2002-06-21 Jeff Johnston <jjohnstn@redhat.com>
-
- * libc/include/stdio.h (__getline, __getdelim): New prototypes.
- * libc/include/time.h [HAVE_GETDATE](getdate, getdate_r): Ditto.
- [HAVE_GETDATE](getdate_err): New error code.
- * libc/stdio/Makefile.am: Add support for getline.c and getdelim.c.
- * libc/stdio/Makefile.in: Regenerated.
- * libc/stdio/getdelim.c: New file.
- * libc/stdio/getline.c: Ditto.
- * libc/sys/linux/Makefile.am: Add support for getdate.c, getdate_err.c
- and ntp_gettime.c. Also add AM_CFLAGS to point to libc/stdio.
- * libc/sys/linux/Makefile.in: Regenerated.
- * libc/sys/linux/getdate.c: New file.
- * libc/sys/linux/getdate_err.c: Ditto.
- * libc/sys/linux/ntp_gettime.c: Ditto.
- * libc/sys/linux/time.c (adjtimex, ntp_adjtime): New functions.
- * libc/sys/linux/sys/stdio.h (getline, getdelim): New macros.
-
-2002-06-21 Jeff Johnston <jjohnstn@redhat.com>
-
- * libc/include/math.h: Add <sys/types.h> to get _uint32_t definition.
- * libc/include/machine/types.h: Skip __off_t, __pid_t, and
- __loff_t definitions if special _HAVE_SYSTYPES macro defined.
- * libc/include/sys/config.h: Removed _uint*, _int* definitions.
- * libc/include/sys/param.h: Remove i386 case which is handled
- by default case.
- (BIG_ENDIAN, LITTLE_ENDIAN): Protect
- definitions in case they are already defined.
- (BYTE_ORDER): Add default case using _IEEE_BIG_ENDIAN and
- _IEEE_LITTLE_ENDIAN flags.
- * libc/include/sys/reent.h: Change __uint32_t references to
- use _ULong instead.
- (_REENT_GETDATE_REENT_P): New macro.
- * libc/include/sys/types.h (__int16_t, __uint16_t): Added.
- (__int32_t, __uint32_t, __int64_t, __uint64_t): Ditto.
- * libc/search/hash.h: Add default setting of BYTE_ORDER,
- LITTLE_ENDIAN, and BIG_ENDIAN, if not already defined.
- * libc/sys/linux/sys/types.h: Include <sys/_types.h>. Define
- ssize_t based on _ssize_t. Remove __socklen_t, __uintptr_t,
- pid_t, off_t, loff_t, caddr_t, and daddr_t type
- definitions which are done by subsequent glibc headers.
- Add macro definitions to prevent subsequent header files from
- defining pid_t, off_t, ssize_t, and key_t. Move uintptr_t and
- intptr_t to after glibc definitions of types they are based on.
-
-2002-06-21 Jeff Johnston <jjohnstn@redhat.com>
-
- * libc/include/errno.h: Protect from multiple inclusion.
-
-2002-06-21 Nick Clifton <nickc@cambridge.redhat.com>
-
- * libc/sys/arm/swi.h (ADP_Stopped_RunTimeError): Set correct value.
-
-2002-06-20 Thomas Fitzsimmons <fitzsim@redhat.com>
-
- * Makefile.am (LIB_OBJECTLISTS): Add
- libc/search/objectlist.awk.in.
- * libc/Makefile.am (SUBDIRS): Add search.
- (SUBLIBS): Add search/libsearch.la.
- * libc/configure.in (AC_OUTPUT): Add search/Makefile.
- * libc/search: New directory.
- * libc/search/Makefile.am: New file.
- * libc/search/extern.h: New file.
- * libc/search/hash.c: New file.
- * libc/search/hash.h: New file.
- * libc/search/hash_bigkey.c: New file.
- * libc/search/hash_buf.c: New file.
- * libc/search/hash_func.c: New file.
- * libc/search/hash_log2.c: New file.
- * libc/search/hash_page.c: New file.
- * libc/search/hcreate.3: New file.
- * libc/search/hcreate.c: New file.
- * libc/search/hcreate_r.c: New file.
- * libc/search/ndbm.c: New file.
- * libc/search/page.h: New file.
- * libc/search/tdelete.c: New file.
- * libc/search/tdestroy.c: New file.
- * libc/search/tfind.c: New file.
- * libc/search/tsearch.3: New file.
- * libc/search/tsearch.c: New file.
- * libc/search/twalk.c: New file.
- * libc/include/db.h: New file.
- * libc/include/ndbm.h: New file.
- * libc/include/search.h: New file.
- * libc/include/sys/queue.h: New file.
- * libc/include/sys/cdefs.h: New file.
- * libc/include/sys/param.h
- [__IEEE_LITTLE_ENDIAN,__IEEE_BIG_ENDIAN]: Set BYTE_ORDER to
- LITTLE_ENDIAN or BIG_ENDIAN.
- * libc/include/sys/errno.h (EFTYPE): New macro.
- * libc/search/bsearch.c: Move from libc/stdlib.
- * libc/search/qsort.c: Likewise.
- * libc/stdlib/Makefile.am (LIB_SOURCES): Remove bsearch.c and
- qsort.c.
- (CHEWOUT_FILES): Remove bsearch.def and qsort.def.
- * libc/stdlib/stdlib.tex: Remove references to bsearch and qsort.
-
-2002-06-19 Jeff Johnston <jjohnstn@redhat.com>
-
- * libc/sys/linux/Makefile.am: Add support for message queue routines,
- ipc routines, and ftok.
- * libc/sys/linux/Makefile.in: Regenerated.
- * libc/sys/linux/ftok.c: New file.
- * libc/sys/linux/ipc.c: Ditto.
- * libc/sys/linux/mq_close.c: Ditto.
- * libc/sys/linux/mq_getattr.c: Ditto.
- * libc/sys/linux/mq_notify.c: Ditto.
- * libc/sys/linux/mq_open.c: Ditto.
- * libc/sys/linux/mq_receive.c: Ditto.
- * libc/sys/linux/mq_send.c: Ditto.
- * libc/sys/linux/mq_setattr.c: Ditto.
- * libc/sys/linux/mq_unlink.c: Ditto.
- * libc/sys/linux/mqlocal.h: Ditto.
- * libc/sys/linux/include/mqueue.h: Ditto.
- * libc/sys/linux/sys/types.h: Define __gid_t_defined and
- __uid_t_defined.
-
-2002-06-19 J"orn Rennecke <joern.rennecke@superh.com>
-
- * libm/common/sf_lround.c (round): Change name to: (lround).
- * libm/common/sf_remquo.c (remquo): Pass all arguemnts to
- remquof.
-
-2002-06-18 Thomas Fitzsimmons <fitzsim@redhat.com>
-
- * testsuite/lib/passfail.exp (newlib_pass_fail_all): New
- procedure.
- (newlib_pass_fail): Change to compile and run only one file.
- * testsuite/newlib.locale/locale.exp: Use new
- newlib_pass_fail_all procedure.
- * testsuite/newlib.string/string.exp: Likewise.
-
-2002-06-18 Dave Brolley <brolley@redhat.com>
-
- From Catherine Moore, Michael Meissner, Richard Sandiford:
- * libc/include/machine/setjmp.h (_JBLEN): Define for __frv__.
- (_JBTYPE): Ditto.
- * libc/include/sys/config.h (__IEEE_BIG_ENDIAN): Ditto.
- (__ATTRIBUTE_IMPURE_PTR__): Ditto.
- * libc/include/machine/ieeefp.h (__IEEE_BIG_ENDIAN): Ditto.
- * configure.host: Support frv-*-*.
- * libc/machine/frv/Makefile.am: New file.
- * libc/machine/frv/configure.in: New file.
- * libc/machine/frv/setjmp.S: New file.
-
-2002-06-18 Thomas Fitzsimmons <fitzsim@redhat.com>
-
- * libc/include/ctype.h: Remove isblank macro.
-
- * libc/ctype/Makefile.am (LIB_SOURCES): Add isblank.c.
- * libc/ctype/isblank.c: New file.
- * libc/include/ctype.h [!__STRICT_ANSI__]: Add isblank
- declaration. Add isblank macro.
-
-2002-06-18 Jeff Johnston <jjohnstn@redhat.com>
-
- * testsuite/newlib.stdlib/atexit.c: New file.
- * testsuite/newlib.stdlib/atexit.exp: Ditto.
- * testsuite/newlib.string/tstring.c: Change default start size
- to something more reasonable for embedded platforms.
-
-2002-06-14 Thomas Fitzsimmons <fitzsim@redhat.com>
-
- * libc/sys/linux/sys/errno.h (EFTYPE): Add macro.
-
- * libc/argz: New directory.
- * libc/argz/*: New files.
- * libc/argz/argz_add.c: New file.
- * libc/argz/argz_add_sep.c: New file.
- * libc/argz/argz_append.c: New file.
- * libc/argz/argz_count.c: New file.
- * libc/argz/argz_create.c: New file.
- * libc/argz/argz_create_sep.c: New file.
- * libc/argz/argz_delete.c: New file.
- * libc/argz/argz_extract.c: New file.
- * libc/argz/argz_insert.c: New file.
- * libc/argz/argz_next.c: New file.
- * libc/argz/argz_replace.c: New file.
- * libc/argz/argz_stringify.c: New file.
- * libc/argz/buf_findstr.c: New file.
- * libc/argz/envz_add.c: New file.
- * libc/argz/envz_entry.c: New file.
- * libc/argz/envz_get.c: New file.
- * libc/argz/envz_merge.c: New file.
- * libc/argz/envz_remove.c: New file.
- * libc/argz/envz_strip.c: New file.
- * libc/include/argz.h: New file.
- * libc/include/envz.h: New file.
- * Makefile.am (LIBC_OBJECTLISTS): Add
- libc/argz/objectlist.awk.in.
- * libc/Makefile.am (SUBDIRS): Add argz.
- (SUBLIBS): Add argz/libargz.la.
- * libc/configure.in (AC_OUTPUT): Add argz/Makefile.
- * libc/include/errno.h: Add error_t typedef.
-
-2002-06-13 Jeff Johnston <jjohnstn@redhat.com>
-
- * libc/include/stdlib.h: Add _Exit prototype.
- * libc/stdlib/Makefile.am: Add _Exit.c support.
- * libc/stdlib/Makefile.in: Ditto.
- * libc/stdlib/_Exit.c: New file.
-
-2002-06-13 Stephen L. Moshier <steve@moshier.net>
-
- * libm/math/e_pow.c (__ieee754_pow): Fix case whereby
- x is close to -1.0 and y is very large to use ax (absolute value)
- instead of x.
- * libm/math/ef_pow.c (__ieee754_powf): Ditto.
-
-Thu Jun 13 19:23:40 2002 J"orn Rennecke <joern.rennecke@superh.com>
-
- * libc/machine/sh/strcpy.S (strcpy, __SHMEDIA__ code):
- Fix clobbering bytes before destination if src and dst have same
- non-zero misalignment.
-
- * libc/machine/sh/memset.S (memset, __SHMEDIA__ code):
- Fixed bug in writing end of set region.
-
-2002-06-10 Christopher Faylor <cgf@redhat.com>
-
- * libc/include/process.h: Remove cygwin-only sexec* declarations. Fix
- spawnve declaration.
-
-2002-06-06 Thomas Fitzsimmons <fitzsim@redhat.com>
-
- * libm/common/s_fdim.c: New file.
- * libm/common/s_fma.c: Likewise.
- * libm/common/s_fmax.c: Likewise.
- * libm/common/s_fmin.c: Likewise.
- * libm/common/s_fpclassify.c: Likewise.
- * libm/common/s_lrint.c: Likewise.
- * libm/common/s_lround.c: Likewise.
- * libm/common/s_nearbyint.c: Likewise.
- * libm/common/s_remquo.c: Likewise.
- * libm/common/s_round.c: Likewise.
- * libm/common/s_scalbln.c: Likewise.
- * libm/common/s_signbit.c: Likewise.
- * libm/common/s_trunc.c: Likewise.
- * libm/common/sf_fdim.c: Likewise.
- * libm/common/sf_fma.c: Likewise.
- * libm/common/sf_fmax.c: Likewise.
- * libm/common/sf_fmin.c: Likewise.
- * libm/common/sf_lrint.c: Likewise.
- * libm/common/sf_lround.c: Likewise.
- * libm/common/sf_nearbyint.c: Likewise.
- * libm/common/sf_remquo.c: Likewise.
- * libm/common/sf_round.c: Likewise.
- * libm/common/sf_scalbln.c: Likewise.
- * libm/common/sf_trunc.c: Likewise.
- * libm/math/w_exp2.c: Likewise.
- * libm/math/w_tgamma.c: Likewise.
- * libm/math/wf_exp2.c: Likewise.
- * libm/math/wf_tgamma.c: Likewise.
- * libm/mathfp/s_exp2.c: Likewise.
- * libm/mathfp/s_tgamma.c: Likewise.
- * libm/mathfp/sf_exp2.c: Likewise.
- * libm/mathfp/sf_tgamma.c: Likewise.
- * libm/math/er_gamma.c: Fix return value.
- * libm/math/erf_gamma.c: Likewise.
- * libm/mathfp/er_gamma.c: Likewise.
- * libm/mathfp/erf_gamma.c: Likewise.
- * libc/include/math.h (!__STRICT_ANSI__): Include ISOC99-specific
- declarations and macros.
- Regenerated all Makefile.in, aclocal.m4 and configure files to
- use new libtool macros in top-level libtool.m4
-
-2002-06-05 Jeff Johnston <jjohnstn@redhat.com>
-
- * libc/include/string.h[__linux__]: Add strsignal prototype.
- * libc/include/sys/lock.h: New file with default locking support.
- * libc/include/sys/reent.h: Add signal buffer support for strsignal
- and psignal.
- * libc/posix/Makefile.am: Add support for readdir_r.c.
- * libc/posix/Makefile.in: Regenerated.
- * libc/posix/closedir.c: Add locking support and hash table cleanup.
- * libc/posix/opendir.c: Add lock support.
- * libc/posix/readdir.c: Ditto.
- * libc/posix/rewinddir.c: Ditto.
- * libc/posix/scandir.c: Ditto.
- * libc/posix/seekdir.c: Ditto.
- * libc/posix/telldir.c: Ditto plus add _cleanupdir routine to
- clean up leftover hash table entries.
- * libc/posix/readdir_r.c: New file.
- * libc/sys/linux/Makefile.am: Add psignal.c and strsignal.c support.
- * libc/sys/linux/Makefile.in: Regenerated.
- * libc/sys/linux/sys/dirent.h: Add dd_lock to DIR structure.
- * libc/sys/linux/sys/signal.h: Add psignal prototype.
- * libc/sys/linux/psignal.c: New file.
- * libc/sys/linux/strsignal.c: Ditto.
-
-2002-06-03 Corinna Vinschen <corinna@vinschen.de>
-
- * libc/include/sys/types.h: Don't define dev_t when compiling for
- Cygwin.
-
-2002-05-31 Jeff Johnston <jjohnstn@redhat.com>
-
- * libc/sys/linux/Makefile.am: Add sig.c and sigaction.c. Also
- make siglist.inc dependent on sig.c instead of signal.c.
- * libc/sys/linux/Makefile.in: Regenerated.
- * libc/sys/linux/sig.c: Rename from signal.c and change code to
- use NSIG instead of _NSIG.
- * libc/sys/linux/sigaction.c: New file.
- * libc/sys/linux/signal.c: Changed to be linux signal() function
- so as to override regular newlib default signal.c.
- * libc/sys/linux/machine/i386/Makefile.am: Remove sigset.c.
- * libc/sys/linux/machine/i386/Makefile.in: Regenerated.
- * libc/sys/linux/machine/i386/sigset.c: Moved to linux main directory.
- * libc/sys/linux/sigset.c: Moved from machine/i386 directory.
- * libc/sys/linux/sys/signal.h: Redefine NSIG to _NSIG and override
- default linux sigset_t typedef by defining it equal to __sigset_t.
- * libc/unix/sigset.c: Add check so code isn't compiled on systems
- with a sigset_t that isn't implemented with a single int.
-
-2002-05-30 Jeff Johnston <jjohnstn@redhat.com>
-
- * libc/sys/linux/Makefile.am: Add support for new files.
- * libc/sys/linux/Makefile.in: Regenerated.
- * libc/sys/linux/ids.c: Add __getuid weak alias for getuid.
- * libc/sys/linux/signal.c: Change to use real-time syscalls for
- sigsuspend, sigprocmask, and sigpending. Also remove sigaction as
- it is in a separate file now.
- * libc/sys/linux/machine/i386/Makefile.am
- * libc/sys/linux/machine/i386/Makefile.in
- * libc/sys/linux/sys/signal.h: Add include of <bits/signum.h>.
- * libc/sys/linux/sigaction.c: New file.
- * libc/sys/linux/sigqueue.c: Ditto.
- * libc/sys/linux/sigwait.c: Ditto.
- * libc/sys/linux/machine/i386/sigaction.c: Ditto.
- * libc/sys/linux/kernel_sigaction.h: Ditto.
-
-2002-05-28 Jeff Johnston <jjohnstn@redhat.com>
-
- * libc/sys/linux/Makefile.am: Add support for cfspeed.c and
- tcsendbrk.c.
- * libc/sys/linux/Makefile.in: Regenerated.
- * libc/sys/linux/termios.c: Add tcflow(), tcflush(),
- tcgetpgrp(), and tcsetpgrp() functions.
- * libc/sys/linux/sys/termios.h: Add include of machine/termios.h
- to get __MAX_BAUD rate.
- * libc/sys/linux/machine/i386/include/termios.h: New file.
- * libc/include/machine/termios.h: Ditto.
- * libc/sys/linux/cfspeed.c: Ditto.
- * libc/sys/linux/tcsendbrk.c: Ditto.
-
-2002-05-24 Jeff Johnston <jjohnstn@redhat.com>
-
- * libc/include/string.h: Add strnlen and strerror_r prototypes.
- * libc/string/Makefile.am: Add strnlen.c and strerror_r.c support.
- * libc/string/Makefile.in: Regenerated.
- * libc/string/strerror_r.c: New file.
- * libc/string/strnlen.c: New file.
- * libc/sys/linux/Makefile.am: Add rename.c.
- * libc/sys/linux/Makefile.in: Regenerated.
- * libc/sys/linux/rename.c: New file to override default rename.
-
-2002-05-24 Thomas Fitzsimmons <fitzsim@redhat.com>
-
- * libc/sys/linux/sys/cdefs.h: Add __weak_reference macros.
- * libc/sys/linux/sys/time.h: Add conversion macros.
- * libc/sys/linux/sys/types.h: Add FD_ macros. Include <bits/types.h>.
- * libc/sys/linux/ids.c: Add setresuid and syslog syscalls.
- * libc/sys/linux/gethostname.c: New file.
- * libc/sys/linux/seteuid.c: New file.
- * libc/sys/linux/sysctl.c: New file.
-
-2002-05-23 Jeff Johnston <jjohnstn@redhat.com>
-
- * libc/string/Makefile.am: Add support for strsep.c.
- * libc/string/Makefile.in: Regenerated.
- * libc/string/strsep.c: New file.
- * libc/string/strtok.c: Change to call __strtok_r service routine.
- * libc/string/strtok_r.c: Add __strtok_r routine which takes
- additional flag parameter regarding whether to skip leading delimeters.
- Change strtok_r to call __strtok_r.
-
-2002-05-23 Gareth Pearce <tilps@hotmail.com>
-
- * libc/stdio/Makefile.am: Modify to add setbuffer.c and setlinebuf.c.
- * libc/stdio/Makefile.in: Regenerated.
- * libc/stdio/setbuffer.c: New file.
- * libc/stdio/setlinebuf.c: New file.
-
-2002-05-23 Jeff Johnston <jjohnstn@redhat.com>
-
- * libc/sys/linux/Makefile.am: Add resource.c.
- * libc/sys/linux/Makefile.in: Regenerated.
- * libc/sys/linux/resource.c: New file.
- * libc/sys/linux/time.c: Add settimeofday, getitimer, and setitimer.
- * libc/sys/linux/machine/i386/Makefile.am: Remove syscalls.c.
- * libc/sys/linux/machine/i386/Makefile.in: Regenerated.
- * libc/sys/linux/machine/i386/syscalls.c: Removed as functions
- are now found in libc/sys/linux/resource.c.
-
-2002-05-23 Jeff Johnston <jjohnstn@redhat.com>
-
- * libc/include/string.h (bcmp, bcopy, bzero): Change prototypes
- to use void * pointers and comply with Single Unix spec.
- * libc/string/bcmp.c: Change to use void * instead of char *.
- * libc/string/bcopy.c: Ditto.
- * libc/string/bzero.c: Ditto.
-
-2002-05-22 Jeff Johnston <jjohnstn@redhat.com>
-
- * libc/sys/linux/shm_open.c: New file.
- * libc/sys/linux/shm_unlink.c: Ditto.
- * libc/sys/linux/Makefile.am: Add support for shm_open.c and
- shm_unlink.c.
- * libc/sys/linux/Makefile.in: Regenerated.
- * libc/sys/linux/sys/types.h: Add some additional checks to see
- if clock_t or time_t is already defined.
-
-2002-05-22 Jeff Johnston <jjohnstn@redhat.com>
-
- * Makefile.am: Don't pass $toollibdir down directly in
- AM_MAKEFLAGS as it causes all multilibs to use the same toollibdir.
- Pass it under the name: top_toollibdir.
- * Makefile.in: Regenerated.
-
-2002-05-22 Corinna Vinschen <vinschen@redhat.com>
-
- * libc/include/sys/types.h: Revert previous patch.
-
-2002-05-22 Corinna Vinschen <vinschen@redhat.com>
-
- * libc/include/sys/types.h: Include cygwin/types.h always under
- Cygwin, not only if _POSIX_THREADS is defined.
-
-2002-05-21 Dhananjay Deshpande <dhananjayd@kpit.com>
-
- * configure.host: Specify sys_dir=h8300hms for h8300-*-coff* target.
-
-2002-05-17 Jeff Johnston <jjohnstn@redhat.com>
-
- * Makefile.am: Copy and install headers from sys/machine/include
- directory. Also pass $toollibdir to lower-level directories.
- * Makefile.in: Regenerated.
- * libc/include/stdio.h[!_REENT_ONLY]: Change stdin, stdout, and
- stderr to use _REENT macro instead of _impure_ptr directly.
- * libc/include/sys/config.h[__i386__][__linux__]: Define
- __DYNAMIC_REENT__.
- * libc/include/sys/reent.h[!_REENT_ONLY]: Change _REENT macro to be
- call to __getreent() function if !__SINGLE_THREAD__ and
- __DYNAMIC_REENT__ is set.
- * libc/reent/Makefile.am: Add support for getreent.c.
- * libc/reent/Makefile.in: Regenerated.
- * libc/string/strerror.c: Add check if EOPNOTSUPP and ENOTSUP are same.
- * libc/sys/linux/Makefile.am: Add support for new files.
- * libc/sys/linux/configure.in: Add $EXTRA_DIRS variable.
- * libc/sys/linux/Makefile.in: Regenerated.
- * libc/sys/linux/configure: Ditto.
- * libc/sys/linux/io.c: Add poll syscall. Also weak-alias
- __close, __read, __write, __poll, __open, __lseek, __fcntl from
- their __libc_ counterparts.
- * libc/sys/linux/io64.c: Add __libc_ prefix to lseek64 and open64
- and weak-alias to regular names.
- * libc/sys/linux/pread64.c: Rename to __libc_pread64 and weak-alias
- to pread64 and __pread64.
- * libc/sys/linux/process.c: Weak_alias __libc_getpid to __getpid.
- * libc/sys/linux/pwrite64.c: Rename to __libc_pwrite64 and
- weak-alias to pwrite64.
- * libc/sys/linux/sched.c: Weak-alias __libc_sched_getparam,
- __libc_sched_getscheduler, __libc_sched_get_priority_max,
- __libc_sched_get_priority_min, and __libc_sched_setschedule to
- name with __ instead of __libc_.
- * libc/sys/linux/siglongjmp.c: Include <machine/weakalias.h>.
- Rename siglongjmp to __libc_siglongjmp and weak-alias to siglongjmp.
- Call __libc_longjmp instead of longjmp, from __libc_siglongjmp.
- * libc/sys/linux/signal.c: Rename raise to __libc_raise and weak-alias
- to raise.
- * libc/sys/linux/socket.c: Weak-alias __libc_connect to __connect and
- __libc_send to __send.
- * libc/sys/linux/time.c: Weak-alias __libc_gettimeofday to
- __gettimeofday.
- * libc/sys/linux/wait.c: Rename wait to __libc_wait and weak-alias
- it to wait. Rename wait3 to __libc_wait3 and weak-alias it to wait3.
- * libc/sys/linux/include/setjmp.h: Use __jmp_buf in sigjmp_buf
- type and typedef __jmp_buf to jmp_buf.
- * libc/sys/linux/machine/i386/Makefile.am: Add syscalls.c and
- setjmp.S.
- * libc/sys/linux/machine/i386/Makefile.in: Regenerated.
- * libc/sys/linux/machine/i386/crt0.c: Add support to clear .bss
- section.
- * libc/sys/linux/machine/i386/socketcall.h: Change to use __libc_
- prefix for function macros and then use weak_alias() to regular names.
- * libc/sys/linux/machine/i386/syscall.h: Ditto.
- * libc/sys/linux/sys/errno.h: Define EOPNOTSUP to be ENOTSUP.
- * libc/sys/linux/sys/stdio.h: Define _flockfile and _funlockfile
- to be flockfile() and funlockfile() respectively.
- * libc/sys/linux/sys/types.h
- * libc/reent/getreent.c: New file.
- * libc/sys/linux/flockfile.c: Ditto.
- * libc/sys/linux/funlockfile.c: Ditto.
- * libc/sys/linux/getreent.c: Ditto.
- * libc/sys/linux/pread.c: Ditto.
- * libc/sys/linux/pwrite.c: Ditto.
- * libc/sys/linux/raise.c: Ditto.
- * libc/sys/linux/system.c: Ditto.
- * libc/sys/linux/tcdrain.c: Ditto.
- * libc/sys/linux/machine/i386/i386mach.h: Ditto.
- * libc/sys/linux/machine/i386/setjmp.S: Ditto.
- * libc/sys/linux/machine/i386/syscalls.c: Ditto.
- * libc/sys/linux/machine/i386/weakalias.h: Ditto.
- * libc/sys/linux/machine/i386/include/setjmp.h: Ditto.
-
-2002-05-14 Dhananjay Deshpande <dhananjayd@kpit.com>
-
- * newlib/libc/sys/h8300hms/Makeile.am (lib_a_SOURCES): Add read.c.
- * newlib/libc/sys/h8300hms/read.c: New file. Magic trap 0xC8 for sim.
- * newlib/libc/sys/h8300hms/syscalls.c: Move _read() to read.c.
- * newlib/libs/sys/h8300hms/sys/syscall.h: New file.
-
-Thu May 16 17:24:57 2002 J"orn Rennecke <joern.rennecke@superh.com>
-
- * libc/machine/sh/strcpy.S (strcpy): Replace LITTLE_ENDIAN with
- __LITTLE_ENDIAN__. make sure r0 has right value at first loop
- exit point.
-
-2002-05-15 Thomas Fitzsimmons <fitzsim@redhat.com>
-
- * testsuite/lib/newlib.exp: Add newlib_include_flags to compile
- options when testing natively on i[3456]86-*-linux.
-
- * testsuite/lib/checkoutput.exp (newlib_check_output): Output
- only one pass or fail per test file. Trim \r's from output
- values received from test programs. Remove support for named
- tests.
- * testsuite/newlib.locale/UTF-8.exp: Update to support new
- newlib_check_output behaviour.
- * testsuite/newlib.locale/UTF-8.c: Likewise.
-
-2002-05-15 Jeff Johnston <jjohnstn@redhat.com>
-
- * libc/include/stdlib.h: Add on_exit prototype.
- * libc/include/sys/reent.h (struct _atexit): Add argument array
- and bits to track type of exit routine to support both on_exit
- and atexit.
- (_REENT_INIT_PTR): Add missing fields that won't be zeroed out
- by default and change the setting of the atexit structure.
- (_REENT_INIT)[!_REENT_SMALL]: Remove extraneous end brace.
- * libc/stdlib/on_exit.c: New file.
- * libc/stdlib/Makefile.am: Add support for on_exit.
- * libc/stdlib/Makefile.in: Regenerated.
- * libc/stdlib/atexit.c: Change to initialize types field.
- * libc/stdlib/exit.c: Change to look at types field for each
- exit routine and either call an atexit-style or an on_exit-style
- routine accordingly.
-
-2002-05-13 Jeff Johnston <jjohnstn@redhat.com>
-
- * libc/machine/powerpc/vfprintf.c(__VFPRINTF_R)[__ALTIVEC__]: Don't
- allow v specifier with n or L specifiers. For vector c format,
- move tmp declaration to the top.
-
-2002-05-13 Jeff Johnston <jjohnstn@redhat.com>
-
- * libc/machine/powerpc/vfprintf.c(__VFPRINTF_R)[__ALTIVEC__]: Restore
- the original format specifier when looping for vectors to compensate
- for any changes made in vector %g format processing.
- Also add syntax checking for various invalid scenarios
- involving vector format extensions.
- * libc/machine/powerpc/vfscanf.c(__VFSCANF_R)[__ALTIVEC__]: Fix
- return code setting for vector formats. Also treat vector
- separator mismatch as a match error instead of an input error.
- Perform some syntax checking for vector formats.
-
-2002-05-10 Mark Bradshaw <bradshaw@staff.crosswalk.com>
-
- * libc/include/string.h (!__STRICT_ANSI__): Add strlcat and strlcpy.
- * libc/string/Makefile.am: Add strlcat.c and strlcpy.c.
- * libc/string/strlcat.c: New file.
- * libc/string/strlcpy.c: New file.
-
-2002-05-10 Jeff Johnston <jjohnstn@redhat.com>
-
- * libc/string/strchr.c: Fix comment typo.
-
-2002-05-08 Thomas Fitzsimmons <fitzsim@redhat.com>
-
- * acinclude.m4: Add support for --enable-newlib-multithread.
- * configure.host (newlib_cflags): Add -D__SINGLE_THREAD__ if
- --enable-newlib-multithread=no.
-
- * libc/stdio/getc_u.c: New file.
- * libc/stdio/getchar_u.c: New file.
- * libc/stdio/putc_u.c: New file.
- * libc/stdio/putchar_u.c: New file.
- * libc/include/stdio.h: Add declarations for getc_unlocked,
- getchar_unlocked, putc_unlocked and putchar_unlocked.
- * libc/stdio/Makefile.am (LIB_SOURCES): Add new files.
- (CHEWOUT_FILES): Add new files' .def's.
- * libc/stdio/putchar.c (_putchar_r): Replace __sputc with putc.
-
-Wed May 8 17:47:35 2002 J"orn Rennecke <joern.rennecke@superh.com>
-
- * libc/machine/sh/memset.S (memset, __SHMEDIA__ code):
- Also handle as single quad word when destination ends at last
- byte of first quad word. Fix byte selection in single quad code.
-
-2002-05-07 Thomas Fitzsimmons <fitzsim@redhat.com>
-
- * libc/include/sys/stdio.h: New file.
- * libc/sys/linux/sys/stdio.h: New file.
- * libc/include/stdio.h: Add declarations for flockfile,
- ftrylockfile, and funlockfile. Include <sys/stdio.h>.
- * libc/stdio/clearerr.c: Add file locking.
- * libc/stdio/fclose.c: Likewise.
- * libc/stdio/feof.c: Likewise.
- * libc/stdio/ferror.c: Likewise.
- * libc/stdio/fflush.c: Likewise.
- * libc/stdio/fgetc.c: Likewise.
- * libc/stdio/fgetpos.c: Likewise.
- * libc/stdio/fgets.c: Likewise.
- * libc/stdio/fileno.c: Likewise.
- * libc/stdio/fputc.c: Likewise.
- * libc/stdio/fputs.c: Likewise.
- * libc/stdio/fread.c: Likewise.
- * libc/stdio/freopen.c: Likewise.
- * libc/stdio/fseek.c: Likewise.
- * libc/stdio/ftell.c: Likewise.
- * libc/stdio/fwrite.c: Likewise.
- * libc/stdio/getc.c: Likewise.
- * libc/stdio/putc.c: Likewise.
- * libc/stdio/setvbuf.c: Likewise.
- * libc/stdio/ungetc.c: Likewise.
- * libc/stdio/vfprintf.c: Likewise.
-
-2002-05-06 Jeff Johnston <jjohnstn@redhat.com>
-
- * libc/machine/powerpc/vfprintf.c[__ALTIVEC__]: Add vector
- support for 'p' format. Fix code to print bytes for vector
- integer formats that do not specify 'h' or 'l'.
- * libc/machine/powerpc/vfscanf.c[__ALTIVEC__]: Add vector support
- for 'p' specifier. Fix code to scan 16 bytes for vector integer
- formats that do not specify 'h' or 'l'.
-
- * libc/include/stdlib.h (a64l, l64a, _l64a_r): Added prototypes.
-
-2002-05-06 Nick Clifton <nickc@cambridge.redhat.com>
-
- * libc/sys/arm/syscalls.c (_rename): Add parameter names.
- (_sbrk): Add cast of return value.
-
-2002-05-06 Jeff Johnston <jjohnstn@redhat.com>
-
- * libc/include/sys/reent.h (_l64a_buf): New reentrant area.
- (_REENT_L64A_BUF): New macro for accessing area.
- * libc/stdlib/Makefile.am: Add a64l.c and l64a.c.
- * libc/stdlib/Makefile.in: Regenerated.
- * libc/stdlib/a64l.c: New file.
- * libc/stdlib/l64a.c: New file.
-
-2002-05-06 Jeff Johnston <jjohnstn@redhat.com>
-
- * libc/unix/pread.c: Fix typo for _pread_r.
- * libc/unix/pwrite.c: Fix type for _pwrite_r.
- * libc/sys/linux/pread64.c: Fix typo for read syscall.
- * libc/sys/linux/pwrite64.c: Fix typo for write syscall.
-
-2002-05-03 Christopher Faylor <cgf@redhat.com>
-
- * libc/include/sys/unistd.h: Define getdomainname under cygwin.
-
-2002-05-03 Thomas Fitzsimmons <fitzsim@redhat.com>
-
- * configure.in (CC_FOR_NEWLIB): Change -isystem's to -I's.
-
-2002-05-01 Christopher Faylor <cgf@redhat.com>
-
- * utmp.h: Define more UNIX constants.
-
-2002-05-01 Thomas Fitzsimmons <fitzsim@redhat.com>
-
- * Makefile.am: Add support for checking multilibs.
-
- * libc/Makefile.am (SUBLIBS): Add LIBC_EXTRA_LIB.
- (SUBDEFS): Add LIBC_EXTRA_DEF.
- * libc/configure.in (LIBC_EXTRA_LIB): New variable.
- (LIBC_EXTRA_DEF): Likewise.
- (extra_dir): Likewise.
- * libc/machine/xscale/machine: New directory.
- * libc/machine/xscale/machine/profile.h: New file.
-
- * Makefile.am (site.exp): Remove newlib_cflags. Add
- multibuildtop.
- * testsuite/newlib.locale/UTF-8.c: Change fprintf's to printf's.
- * testsuite/lib/flags.exp: New file.
- * testsuite/lib/newlib.exp: Load flags.exp.
- (newlib_target_compile): Remove libgloss directory references.
- (newlib_init): Remove newlib_cflags references.
-
-2002-04-30 Thomas Fitzsimmons <fitzsim@redhat.com>
-
- * testsuite/lib/newlib.exp (newlib_target_compile): Change
- method of finding libgloss_target_dir.
-
- * Makefile.am (site.exp): Change host_alias, host_triplet,
- target_alias, target_triplet to refer to gcc's host and target
- variables (newlib's build and host variables).
- * testsuite/lib/newlib.exp (newlib_init): Change build
- references to host references, host references to target
- references to reflect Makefile.am changes.
- (newlib_target_compile): Likewise.
- (newlib_finish): Likewise.
-
-2002-04-29 Jeff Johnston <jjohnstn@redhat.com>
-
- * libc/sys/linux/io64.c (fstat64, lstat64): New syscalls added.
-
-2002-04-29 Jonathan Larmour <jlarmour@redhat.com>
-
- * libc/sys/arm/syscalls.c (_rename): New function. Just a stub.
- (_system): New function. Ditto.
- * libc/stdlib/system.c (_system_r): Call _system if HAVE_SYSTEM.
- * configure.host: define HAVE_SYSTEM and HAVE_RENAME for xscale
- targets.
-
-2002-04-29 Jeff Johnston <jjohnstn@redhat.com>
-
- * libc/include/sys/unistd.h (pread, pwrite): Added prototypes.
- * libc/unix/Makefile.am: Add pread.c and pwrite.c.
- * libc/sys/linux/Makefile.am: Add pread64.c and pwrite64.c.
- * libc/sys/linux/Makefile.in: Regenerated.
- * libc/unix/Makefile.in: Ditto.
- * libc/sys/linux/pread64.c: New file.
- * libc/sys/linux/pwrite64.c: Ditto.
- * libc/unix/pread.c: Ditto.
- * libc/unix/pwrite.c: Ditto.
-
-2002-04-26 Jeff Johnston <jjohnstn@redhat.com>
-
- * libc/sys/linux/Makefile.am: Add io64.c.
- * libc/sys/linux/Makefile.in: Regenerated.
- * libc/sys/linux/io.c(mkfifo, fsync, fdatasync): Added syscalls.
- * libc/sys/linux/signal.c (sigwaitinfo, sigtimedwait): Ditto.
- * libc/sys/linux/io64.c: New file.
-
-2002-04-26 Jeff Johnston <jjohnstn@redhat.com>
-
- * configure.in (CC_FOR_NEWLIB): New variable that
- bases on $(CC) and adds targ-include and libc/include as
- -isystem directives if they are not already part of $(CC).
- * Makefile.am (AM_MAKEFLAGS): Change setting of CC to equal
- $(CC_FOR_NEWLIB).
- * configure: Regenerated.
- * Makefile.in: Ditto.
-
-2002-04-25 Jeff Johnston <jjohnstn@redhat.com>
-
- * libc/sys/linux/Makefile.am: Add support for sched.c.
- * libc/sys/linux/Makefile.in: Regenerated.
- * libc/sys/linux/sched.c: New file.
- * libc/sys/linux/sys/types.h: Add struct timespec.
-
-2002-04-25 Thomas Fitzsimmons <fitzsim@redhat.com>
-
- * configure.in (CC_FOR_BUILD): Set to gcc whether
- cross-compiling or not.
- (CC): Add -isystem's for targ-include and libc/include when they
- do not already appear in CC.
-
-2002-04-24 Thomas Fitzsimmons <fitzsim@redhat.com>
-
- * Makefile.am (check-DEJAGNU): New target.
- (site.exp): Likewise.
- * acinclude.m4 (NEWLIB_CONFIGURE): Replace AC_CANONICAL_HOST
- with AC_CANONICAL_SYSTEM. Remove AC_CANONICAL_BUILD.
- * libc/locale/locale.c (_setlocale_r): Add UTF-8 support.
- * libc/stdlib/mbtowc_r.c (_mbtowc_r): Likewise.
- * libc/stdlib/wctomb_r.c (_wctomb_r): Likewise.
- * testsuite: New directory.
- * testsuite/config: Likewise.
- * testsuite/lib: Likewise.
- * testsuite/newlib.locale: Likewise.
- * testsuite/newlib.string: Likewise.
- * testsuite/config/default.exp: New file.
- * testsuite/lib/checkoutput.exp: New file.
- * testsuite/lib/newlib.exp: New file.
- * testsuite/lib/passfail.exp: New file.
- * testsuite/newlib.locale/UTF-8.c: New file.
- * testsuite/newlib.locale/UTF-8.exp: New file.
- * testsuite/newlib.locale/locale.exp: New file.
- * testsuite/newlib.string/string.exp: New file.
- * testsuite/newlib.string/tstring.c: New file.
-
-2002-04-23 Jeff Johnston <jjohnstn@redhat.com>
-
- * libc/include/machine/types.h (__pid_t, __off_t, __loff_t): Added.
- * libc/sys/linux/Makefile.am: Add support for mmap.c.
- * libc/sys/linux/Makefile.in: Regenerated.
- * libc/sys/linux/mmap.c: New file.
- * libc/sys/linux/machine/i386/syscall.h: Add _syscall6 macro.
- * libc/sys/linux/sys/types.h (pid_t, off_t, loff_t): Added.
-
-2002-04-22 Thomas Fitzsimmons <fitzsim@redhat.com>
-
- * acinclude.m4 (newlib_cflags): Remove include directories that
- are already specified in the top-level configure.in's FLAGS_FOR_TARGET.
-
-2002-04-19 Bill Siegmund <ctc-dsl@pacbell.net>
-
- * libc/machine/xscale/memchr.c: Don't use multi-line strings.
- * libc/machine/xscale/memcmp.c: Ditto.
- * libc/machine/xscale/memcpy.c: Ditto.
- * libc/machine/xscale/memmove.c: Ditto.
- * libc/machine/xscale/memset.c: Ditto.
- * libc/machine/xscale/strchr.c: Ditto.
- * libc/machine/xscale/strcmp.c: Ditto.
- * libc/machine/xscale/strcpy.c: Ditto.
- * libc/machine/xscale/strlen.c: Ditto.
-
-2002-04-19 Alexandre Oliva <aoliva@redhat.com>
-
- * libc/include/sys/config.h: Remove include of <limits.h>.
- (__INT_MAX__, __LONG_MAX__): Define like GCC's limits.h would
- define INT_MAX and LONG_MAX. Use them in tests.
-
-2002-04-19 Jeff Johnston <jjohnstn@redhat.com>
-
- * configure.host: Add support for powerpc-eabialtivec*.
- * libc/include/malloc.h: Add include of <machine/malloc.h>.
- * libc/include/stdlib.h: Add include of <machine/stdlib.h>.
- * libc/include/machine/malloc.h: New file.
- * libc/include/machine/stdlib.h: Ditto.
- * libc/include/machine/setjmp.h: Add support for powerpc altivec.
- * libc/machine/powerpc/Makefile.am: Add conditional objects and
- sources based on configuration.
- * libc/machine/powerpc/Makefile.in: Regenerated.
- * libc/machine/powerpc/configure: Ditto.
- * libc/machine/powerpc/configure.in: Add check for
- powerpc-eabialtivec* in which case add in additional source files.
- * libc/machine/powerpc/setjmp.S: Add altivec support.
- * libc/machine/powerpc/vec_calloc.c: New file.
- * libc/machine/powerpc/vec_free.c: Ditto.
- * libc/machine/powerpc/vec_malloc.c: Ditto.
- * libc/machine/powerpc/vec_mallocr.c: Ditto.
- * libc/machine/powerpc/vec_realloc.c: Ditto.
- * libc/machine/powerpc/machine/malloc.h: Ditto.
- * libc/machine/powerpc/machine/stdlib.h: Ditto.
- * libc/machine/powerpc/vfprintf.c: New file that is vfprintf.c
- with added altivec format specifiers.
- * libc/machine/powerpc/vfscanf.c: New file that is vfscanf.c with
- added altivec format specifiers.
-
-2002-04-19 Joel Sherrill <joel@OARcorp.com>
-
- * libs/sys/rtems/crt0.c: Satisfy gcc's references to libc functions
- while autoconf is trying to link main(){}.
-
-2002-04-17 Jeff Johnston <jjohnstn@redhat.com>
-
- * libc/sys/linux/signal.c: Remove include of <bits/sigset.h>.
- * libc/sys/linux/sys/signal.h: Add include of <bits/sigset.h>.
-
-2002-04-17 Jeff Johnston <jjohnstn@redhat.com>
-
- * libc/time/time.tex: Add tzset info.
-
-2002-04-17 Jeff Johnston <jjohnstn@redhat.com>
-
- * libc/include/time.h (tzset, _tzset_r): Added prototypes.
- (strptime): Moved prototype to be within !__STRICT_ANSI__.
- (_tzname, _daylight, _timezone): No long __CYGWIN__ only.
- (tzname): Defined for all platforms.
- (daylight, timezone): Defined only for CYGWIN.
- * libc/sys/linux/machine/i386/crt0.c: Add call to tzset() after
- environment set up.
- * libc/stdlib/setenv_r.c (_setenv_r): Call tzset() if the TZ
- environment variable is set.
- * libc/time/Makefile.am: Add support for tzset.c, tzlock.c, and
- tzset_r.c.
- * libc/time/Makefile.in: Regenerated.
- * libc/time/gmtime.c (gmtime): Changed to call gmtime_r.
- * libc/time/gmtime_r.c (gmtime_r): Changed to call _mktm_r.
- * libc/time/lcltime_r.c (lcltime_r): Ditto.
- * libc/time/local.h: New local header file.
- * libc/time/mktime.c (mktime): Add timezone support.
- * libc/time/mktm_r.c: New file which is the common engine
- for gmtime_r and lcltime_r. This code has timezone support.
- * libc/time/strftime.c (strftime): Add %Z timezone support.
- * libc/time/tzlock.c: New file containing timezone lock stubs.
- * libc/time/tzset.c: New file containing tzset() routine.
- * libc/time/tzset_r.c: New file containing _tzset_r and
- internal routine for calculating timezone changes for specified year.
-
-2002-04-17 Thomas Fitzsimmons <fitzsim@redhat.com>
-
- * configure.in (CRT0_DIR): Set to libc/.
- (CRT1_DIR): Set to ${crt1_dir}/ if crt1_dir is non-empty.
- * Makefile.am: Change all occurrences of $(CRT0_DIR)/$(CRT0) to
- $(CRT0_DIR)$(CRT0) to prevent make warnings. Likewise for
- $(CRT1_DIR)/$(CRT1).
- * libc/machine/xstormy16/Makefile.in: Regenerated.
- * libc/machine/xstormy16/aclocal.m4: Regenerated.
- * libc/machine/xstormy16/configure: Regenerated.
-
-2002-04-13 Alexandre Oliva <aoliva@redhat.com>
-
- * libc/stdlib/mallocr.c (malloc_extend_top): If correction sbrk
- fails, don't bail out, and try to correct next time.
-
- * libc/include/sys/config.h: Include limits.h.
-
-2002-04-12 Eric Norum <eric.norum@usask.com>
-
- * libc/sys/rtems/crt0.c (rtems_gxx_mutex_init): Dummy
- routine to allow autoconf to determine that building executables
- for rtems works.
- (rtems_gxx_mutex_lock, rtems_gxx_mutex_unlock): Ditto.
- (rtems_gxx_mutex_once): Ditto.
-
-2002-04-09 Tom Rix <trix@redhat.com>
-
- * libc/include/sys/reent.h (_REENT_INIT_PTR): Fix typo.
-
-2002-04-09 Mark Bradshaw <bradshaw@staff.crosswalk.com>
-
- * libc/include/time.h: Fix strptime declaration.
- * libc/time/Makefile.am: Add strptime.c.
- * libc/time/Makefile.in: Regenerated.
- * libc/time/strptime.c: New file.
-
-2002-04-08 Jeff Johnston <jjohnstn@redhat.com>
-
- * libc/sys/linux/include/setjmp.h: Add sigjmp_buf type,
- siglongjmp prototype, and sigsetjmp macro definition.
- * libc/sys/linux/siglongjmp.c: New file.
- * libc/sys/linux/Makefile.am: Add support for siglongjmp.
- * libc/sys/linux/Makefile.in: Regenerated.
-
-2002-04-04 Jeff Johnston <jjohnstn@redhat.com>
-
- * Makefile.am: Add support for installing crt1.o if one exists.
- * configure.host: Specify crt1.o for linux.
- * configure.in: Expose CRT1 and CRT1_DIR for Makefile.am to use.
- * Makefile.in: Regenerated.
- * configure: Ditto.
- * libc/include/sys/unistd.h (_SC_STREAM_MAX, _SC_PRIORITY_SCHEDULING):
- Added for non-Cygwin, non-RTEMS configurations.
- * libc/sys/linux/Makefile.am: Add support for crt1 and sysconf.
- * libc/sys/linux/Makefile.in: Regenerated.
- * libc/sys/linux/crt1.c: New empty file to override one defaulted
- by gcc. This fixes problem with reconfiguring linux newlib build.
- * libc/sys/linux/sysconf.c: New file.
-
-2002-04-03 Jeff Johnston <jjohnstn@redhat.com>
-
- * configure.host: Add support for machine subdirectory of
- sys subdirectory.
- * configure.in: Add check for sys machine subdirectory.
- * Makefile.am: Ditto.
- * configure: Regenerated.
- * Makefile.in: Ditto.
- * libc/sys/linux/crt0.c: Moved to machine/i386 directory.
- * libc/sys/linux/sys/syscall.h: Ditto.
- * libc/sys/linux/sleep.c: New file.
- * libc/sys/linux/socket.c: Ditto.
- * libc/sys/linux/sockops.h: Ditto.
- * libc/sys/linux/stack.c: Ditto.
- * libc/sys/linux/usleep.c: Ditto.
- * libc/sys/linux/machine/Makefile.am: Ditto.
- * libc/sys/linux/machine/Makefile.in: Ditto.
- * libc/sys/linux/machine/aclocal.m4: Ditto.
- * libc/sys/linux/machine/configure: Ditto.
- * libc/sys/linux/machine/configure.in: Ditto.
- * libc/sys/linux/machine/i386/Makefile.am: Ditto.
- * libc/sys/linux/machine/i386/Makefile.in: Ditto.
- * libc/sys/linux/machine/i386/aclocal.m4: Ditto.
- * libc/sys/linux/machine/i386/configure: Ditto.
- * libc/sys/linux/machine/i386/configure.in: Ditto.
- * libc/sys/linux/machine/i386/crt0.c: Ditto.
- * libc/sys/linux/machine/i386/sigset.c: Ditto.
- * libc/sys/linux/machine/i386/sigstack.h: Ditto.
- * libc/sys/linux/machine/i386/socketcall.h: Ditto.
- * libc/sys/linux/machine/i386/syscall.h: Ditto.
- * libc/sys/linux/sys/select.h: Ditto.
- * libc/sys/linux/configure.in: Add support for machine directory.
- * libc/sys/linux/Makefile.am: Ditto plus add new files above.
- * libc/sys/linux/Makefile.in: Regenerated.
- * libc/sys/linux/configure: Ditto.
- * libc/sys/linux/brk.c: Use machine/syscall.h instead of sys/syscall.h.
- * libc/sys/linux/inode.c: Ditto.
- * libc/sys/linux/linux.c: Ditto.
- * libc/sys/linux/process.c: Ditto.
- * libc/sys/linux/systat.c: Ditto.
- * libc/sys/linux/time.c: Ditto.
- * libc/sys/linux/wait.c: Ditto.
- * libc/sys/linux/ids.c: Change header plus add setfsgid/setfsuid.
- * libc/sys/linux/io.c: Change header plus add readv/writev.
- * libc/sys/linux/signal.c: Change header plus change sigsuspend to
- use __sigsuspend syscall.
- * libc/sys/linux/select.c: Change header plus change select to
- use _newselect syscall.
- * libc/sys/linux/sys/cdefs.h: Add a number of standard definitions
- used by glibc header files.
- * libc/sys/linux/sys/types.h: Add __socklen_t and __useconds_t
- types.
-
-2002-04-01 Jeff Johnston <jjohnstn@redhat.com>
-
- * libc/include/sys/reent.h (_REENT_INIT_PTR): New macro for
- initializing a struct _reent that has been dynamically allocated.
- (_REENT_CHECK_MISC): New macro that checks _misc struct for
- _REENT_SMALL and does nothing otherwise.
- (_REENT_STRTOK_LAST): New macro for reentrant strtok.
- (_REENT_MBLEN_STATE): New macro for reentrant mblen.
- (_REENT_MBTOWC_STATE): New macro for reentrant mbtowc.
- (_REENT_WCTOMB_STATE): New macro for reentrant wctomb.
- [_REENT_SMALL](struct _misc_reent): New structure containing
- miscellaneous reentrant areas needed by newlib.
- [_REENT_SMALL](struct _reent): Add _misc pointer.
- [_REENT_SMALL](_REENT_INIT_MISC): New macro.
- * libc/string/strtok (strtok): Change to use _REENT_CHECK_MISC
- and _REENT_STRTOK_LAST macros.
- * libc/stdlib/mblen (mblen): Change to use _REENT_CHECK_MISC
- and _REENT_MBLEN_STATE macros.
- * libc/stdlib/mbtowc (mbtowc): Change to use _REENT_CHECK_MISC
- and _REENT_MBTOWC_STATE macros.
- * libc/stdlib/wctomb (wctomb): Change to use _REENT_CHECK_MISC
- and _REENT_WCTOMB_STATE macros.
-
-2002-04-01 Till Straumann <strauman@SLAC.Stanford.EDU>
-
- * libc/stdlib/getenv_r.c (_findenv_r): Add missing ENV_UNLOCK.
-
-Wed Mar 27 07:34:44 2002 Jason Tishler <jason@tishler.net>
-
- * libc/include/sys/features.h (_POSIX_SEMAPHORES): New Cygwin define.
-
-Tue Mar 26 17:17:10 2002 J"orn Rennecke <joern.rennecke@superh.com>
-
- * libc/machine/sh/memcpy.S (Large): Fix alignment rounding.
- Store high part of leading bytes too.
-
-2002-03-22 Richard Sandiford <rsandifo@redhat.com>
-
- * libm/math/ef_hypot.c: Increase scale factor to 68.
-
-2002-03-13 Alexandre Oliva <aoliva@redhat.com>
-
- * libc/machine/mips/strlen.c (strlen) [__mips16]: Fix off-by-two
- error.
-
-2002-03-12 Jeff Johnston <jjohnstn@redhat.com>
-
- * libc/sys/go32/access.c: Change license to relaxed license
- used in identical file throughout newlib/libgloss.
-
-2002-03-12 Richard Earnshaw <rearnsha@arm.com>
-
- * libc/sys/arm/access.c: New file.
- * libc/sys/arm/Makefile.am (lib_a_SOURCES): Add access.c.
- * libc/sys/arm/Makefile.in: Regenerate.
- * libc/sys/arm/syscalls.c (_stat): New function.
-
-2002-03-11 Michael Meissner <meissner@redhat.com>
-
- * libc/machine/mips/Makefile.am (lib_a_SOURCES): Add Mips specific
- variants strlen.c, strcmp.c, strncpy.c, memset.c and memcpy.c.
- * libc/machine/mips/Makefile.in: Regenerate.
- * libc/machine/mips/memcpy.c: New file, optimized for MIPS.
- * libc/machine/mips/memset.c: Dito.
- * libc/machine/mips/strcmp.c: Dito.
- * libc/machine/mips/strlen.c: Dito.
- * libc/machine/mips/strncmp.c: Dito.
-
-2002-03-06 Jeff Johnston <jjohnstn@redhat.com>
-
- * libc/machine/i386/Makefile.am: Add $(oext) for setjmp
- object so it works for shared library or statici library.
-2002-04-17 Jeff Johnston <jjohnstn@redhat.com>
-
- * libc/include/time.h (tzset, _tzset_r): Added prototypes.
- (strptime): Moved prototype to be within !__STRICT_ANSI__.
- (_tzname, _daylight, _timezone): No long __CYGWIN__ only.
- (tzname): Defined for all platforms.
- (daylight, timezone): Defined only for CYGWIN.
- * libc/sys/linux/machine/i386/crt0.c: Add call to tzset() after
- environment set up.
- * libc/stdlib/setenv_r.c (_setenv_r): Call tzset() if the TZ
- environment variable is set.
- * libc/time/Makefile.am: Add support for tzset.c, tzlock.c, and
- tzset_r.c.
- * libc/time/Makefile.in: Regenerated.
- * libc/time/gmtime.c (gmtime): Changed to call gmtime_r.
- * libc/time/gmtime_r.c (gmtime_r): Changed to call _mktm_r.
- * libc/time/lcltime_r.c (lcltime_r): Ditto.
- * libc/time/local.h: New local header file.
- * libc/time/mktime.c (mktime): Add timezone support.
- * libc/time/mktm_r.c: New file which is the common engine
- for gmtime_r and lcltime_r. This code has timezone support.
- * libc/time/strftime.c (strftime): Add %Z timezone support.
- * libc/time/tzlock.c: New file containing timezone lock stubs.
- * libc/time/tzset.c: New file containing tzset() routine.
- * libc/time/tzset_r.c: New file containing _tzset_r and
- internal routine for calculating timezone changes for specified year.
-
-2002-04-17 Thomas Fitzsimmons <fitzsim@redhat.com>
-
- * configure.in (CRT0_DIR): Set to libc/.
- (CRT1_DIR): Set to ${crt1_dir}/ if crt1_dir is non-empty.
- * Makefile.am: Change all occurrences of $(CRT0_DIR)/$(CRT0) to
- $(CRT0_DIR)$(CRT0) to prevent make warnings. Likewise for
- $(CRT1_DIR)/$(CRT1).
- * libc/machine/xstormy16/Makefile.in: Regenerated.
- * libc/machine/xstormy16/aclocal.m4: Regenerated.
- * libc/machine/xstormy16/configure: Regenerated.
-
-2002-04-13 Alexandre Oliva <aoliva@redhat.com>
-
- * libc/stdlib/mallocr.c (malloc_extend_top): If correction sbrk
- fails, don't bail out, and try to correct next time.
-
- * libc/include/sys/config.h: Include limits.h.
-
-2002-04-12 Eric Norum <eric.norum@usask.com>
-
- * libc/sys/rtems/crt0.c (rtems_gxx_mutex_init): Dummy
- routine to allow autoconf to determine that building executables
- for rtems works.
- (rtems_gxx_mutex_lock, rtems_gxx_mutex_unlock): Ditto.
- (rtems_gxx_mutex_once): Ditto.
-
-2002-04-09 Tom Rix <trix@redhat.com>
-
- * libc/include/sys/reent.h (_REENT_INIT_PTR): Fix typo.
-
-2002-04-09 Mark Bradshaw <bradshaw@staff.crosswalk.com>
-
- * libc/include/time.h: Fix strptime declaration.
- * libc/time/Makefile.am: Add strptime.c.
- * libc/time/Makefile.in: Regenerated.
- * libc/time/strptime.c: New file.
-
-2002-04-08 Jeff Johnston <jjohnstn@redhat.com>
-
- * libc/sys/linux/include/setjmp.h: Add sigjmp_buf type,
- siglongjmp prototype, and sigsetjmp macro definition.
- * libc/sys/linux/siglongjmp.c: New file.
- * libc/sys/linux/Makefile.am: Add support for siglongjmp.
- * libc/sys/linux/Makefile.in: Regenerated.
-
-2002-04-04 Jeff Johnston <jjohnstn@redhat.com>
-
- * Makefile.am: Add support for installing crt1.o if one exists.
- * configure.host: Specify crt1.o for linux.
- * configure.in: Expose CRT1 and CRT1_DIR for Makefile.am to use.
- * Makefile.in: Regenerated.
- * configure: Ditto.
- * libc/include/sys/unistd.h (_SC_STREAM_MAX, _SC_PRIORITY_SCHEDULING):
- Added for non-Cygwin, non-RTEMS configurations.
- * libc/sys/linux/Makefile.am: Add support for crt1 and sysconf.
- * libc/sys/linux/Makefile.in: Regenerated.
- * libc/sys/linux/crt1.c: New empty file to override one defaulted
- by gcc. This fixes problem with reconfiguring linux newlib build.
- * libc/sys/linux/sysconf.c: New file.
-
-2002-04-03 Jeff Johnston <jjohnstn@redhat.com>
-
- * configure.host: Add support for machine subdirectory of
- sys subdirectory.
- * configure.in: Add check for sys machine subdirectory.
- * Makefile.am: Ditto.
- * configure: Regenerated.
- * Makefile.in: Ditto.
- * libc/sys/linux/crt0.c: Moved to machine/i386 directory.
- * libc/sys/linux/sys/syscall.h: Ditto.
- * libc/sys/linux/sleep.c: New file.
- * libc/sys/linux/socket.c: Ditto.
- * libc/sys/linux/sockops.h: Ditto.
- * libc/sys/linux/stack.c: Ditto.
- * libc/sys/linux/usleep.c: Ditto.
- * libc/sys/linux/machine/Makefile.am: Ditto.
- * libc/sys/linux/machine/Makefile.in: Ditto.
- * libc/sys/linux/machine/aclocal.m4: Ditto.
- * libc/sys/linux/machine/configure: Ditto.
- * libc/sys/linux/machine/configure.in: Ditto.
- * libc/sys/linux/machine/i386/Makefile.am: Ditto.
- * libc/sys/linux/machine/i386/Makefile.in: Ditto.
- * libc/sys/linux/machine/i386/aclocal.m4: Ditto.
- * libc/sys/linux/machine/i386/configure: Ditto.
- * libc/sys/linux/machine/i386/configure.in: Ditto.
- * libc/sys/linux/machine/i386/crt0.c: Ditto.
- * libc/sys/linux/machine/i386/sigset.c: Ditto.
- * libc/sys/linux/machine/i386/sigstack.h: Ditto.
- * libc/sys/linux/machine/i386/socketcall.h: Ditto.
- * libc/sys/linux/machine/i386/syscall.h: Ditto.
- * libc/sys/linux/sys/select.h: Ditto.
- * libc/sys/linux/configure.in: Add support for machine directory.
- * libc/sys/linux/Makefile.am: Ditto plus add new files above.
- * libc/sys/linux/Makefile.in: Regenerated.
- * libc/sys/linux/configure: Ditto.
- * libc/sys/linux/brk.c: Use machine/syscall.h instead of sys/syscall.h.
- * libc/sys/linux/inode.c: Ditto.
- * libc/sys/linux/linux.c: Ditto.
- * libc/sys/linux/process.c: Ditto.
- * libc/sys/linux/systat.c: Ditto.
- * libc/sys/linux/time.c: Ditto.
- * libc/sys/linux/wait.c: Ditto.
- * libc/sys/linux/ids.c: Change header plus add setfsgid/setfsuid.
- * libc/sys/linux/io.c: Change header plus add readv/writev.
- * libc/sys/linux/signal.c: Change header plus change sigsuspend to
- use __sigsuspend syscall.
- * libc/sys/linux/select.c: Change header plus change select to
- use _newselect syscall.
- * libc/sys/linux/sys/cdefs.h: Add a number of standard definitions
- used by glibc header files.
- * libc/sys/linux/sys/types.h: Add __socklen_t and __useconds_t
- types.
-
-2002-04-01 Jeff Johnston <jjohnstn@redhat.com>
-
- * libc/include/sys/reent.h (_REENT_INIT_PTR): New macro for
- initializing a struct _reent that has been dynamically allocated.
- (_REENT_CHECK_MISC): New macro that checks _misc struct for
- _REENT_SMALL and does nothing otherwise.
- (_REENT_STRTOK_LAST): New macro for reentrant strtok.
- (_REENT_MBLEN_STATE): New macro for reentrant mblen.
- (_REENT_MBTOWC_STATE): New macro for reentrant mbtowc.
- (_REENT_WCTOMB_STATE): New macro for reentrant wctomb.
- [_REENT_SMALL](struct _misc_reent): New structure containing
- miscellaneous reentrant areas needed by newlib.
- [_REENT_SMALL](struct _reent): Add _misc pointer.
- [_REENT_SMALL](_REENT_INIT_MISC): New macro.
- * libc/string/strtok (strtok): Change to use _REENT_CHECK_MISC
- and _REENT_STRTOK_LAST macros.
- * libc/stdlib/mblen (mblen): Change to use _REENT_CHECK_MISC
- and _REENT_MBLEN_STATE macros.
- * libc/stdlib/mbtowc (mbtowc): Change to use _REENT_CHECK_MISC
- and _REENT_MBTOWC_STATE macros.
- * libc/stdlib/wctomb (wctomb): Change to use _REENT_CHECK_MISC
- and _REENT_WCTOMB_STATE macros.
-
-2002-04-01 Till Straumann <strauman@SLAC.Stanford.EDU>
-
- * libc/stdlib/getenv_r.c (_findenv_r): Add missing ENV_UNLOCK.
-
-Wed Mar 27 07:34:44 2002 Jason Tishler <jason@tishler.net>
-
- * libc/include/sys/features.h (_POSIX_SEMAPHORES): New Cygwin define.
-
-Tue Mar 26 17:17:10 2002 J"orn Rennecke <joern.rennecke@superh.com>
-
- * libc/machine/sh/memcpy.S (Large): Fix alignment rounding.
- Store high part of leading bytes too.
-
-2002-03-22 Richard Sandiford <rsandifo@redhat.com>
-
- * libm/math/ef_hypot.c: Increase scale factor to 68.
-
-2002-03-13 Alexandre Oliva <aoliva@redhat.com>
-
- * libc/machine/mips/strlen.c (strlen) [__mips16]: Fix off-by-two
- error.
-
-2002-03-12 Jeff Johnston <jjohnstn@redhat.com>
-
- * libc/sys/go32/access.c: Change license to relaxed license
- used in identical file throughout newlib/libgloss.
-
-2002-03-12 Richard Earnshaw <rearnsha@arm.com>
-
- * libc/sys/arm/access.c: New file.
- * libc/sys/arm/Makefile.am (lib_a_SOURCES): Add access.c.
- * libc/sys/arm/Makefile.in: Regenerate.
- * libc/sys/arm/syscalls.c (_stat): New function.
-
-2002-03-11 Michael Meissner <meissner@redhat.com>
-
- * libc/machine/mips/Makefile.am (lib_a_SOURCES): Add Mips specific
- variants strlen.c, strcmp.c, strncpy.c, memset.c and memcpy.c.
- * libc/machine/mips/Makefile.in: Regenerate.
- * libc/machine/mips/memcpy.c: New file, optimized for MIPS.
- * libc/machine/mips/memset.c: Dito.
- * libc/machine/mips/strcmp.c: Dito.
- * libc/machine/mips/strlen.c: Dito.
- * libc/machine/mips/strncmp.c: Dito.
-
-2002-03-06 Jeff Johnston <jjohnstn@redhat.com>
-
- * libc/machine/i386/Makefile.am: Add $(oext) for setjmp
- object so it works for shared library or statici library.
- * libc/machine/i386/Makefile.in: Regenerated.
-
-Wed Mar 6 10:24:26 2002 J"orn Rennecke <joern.rennecke@superh.com>
-
- * libc/machine/sh/Makefile.am (lib_a_SOURCES, SH64 case):
- Add memcpy.S, memset.S and strcpy.S.
- * libc/machine/sh/Makefile.in: Regenerate.
- * libc/machine/sh/asm.h (_ENTRY): Set SH5 alignment to 8 bytes.
- (SHHI, SHLO): Define.
- * libc/machine/sh/memset.S: Add code for SH5.
- * libc/machine/sh/memset.S: Likewise.
- * libc/machine/sh/strcpy.S: Likewise.
-
-2002-02-27 Jeff Johnston <jjohnstn@redhat.com>
-
- * configure.host: Add check for --disable-newlib-io-float
- configuration option and add -DNO_FLOATING_POINT to newlib cflags
- if appropriate.
- * acinclude.m4: Added --disable-newlib-io-float option.
- * aclocal.m4: Regenerated.
- * configure: Ditto.
- * doc/aclocal.m4 doc/configure libc/aclocal.m4 libc/configure
- * libc/*/aclocal.m4 libc/*/configure
- * libm/*/aclocal.m4 libm/*/configure: Ditto.
- * libc/stdio/vfprintf.c [!INTEGER_ONLY]: Only set FLOATING_POINT
- if NO_FLOATING_POINT flag is not defined.
-
-2002-02-25 Jeff Johnston <jjohnstn@redhat.com>
-
- * libc/include/sys/config.h: Add __extension__ in front of
- long long references.
-
-2002-02-23 Corinna Vinschen <corinna@vinschen.de>
-
- * libc/include/sys/stat.h (_fstat): Don't declare when compiling Cygwin.
- (_stat): Ditto.
-
-2002-02-23 Corinna Vinschen <corinna@vinschen.de>
-
- * libc/sys/cygwin/sys/dirent.h (struct __DIR): Use __off32_t instead
- of off_t.
-
-2002-02-20 Nick Clifton <nickc@cambridge.redhat.com>
-
- * libc/machine/xscale/strchr.c (strchr): Add 'r1' to the list of
- clobbered registers.
-
-2002-02-19 Thomas Fitzsimmons <fitzsim@redhat.com>
-
- * configure.host (newlib_cflags): When host is in m68* add
- -DCOMPACT_CTYPE.
-
-2002-02-15 Jeff Johnston <jjohnstn@redhat.com>
-
- * libc/include/sys/config.h: Add definitions for
- __int16_t, __uint16_t, __int64_t, and __uint64_t.
-
-2002-02-12 Hans-Peter Nilsson <hp@bitrange.com>
-
- * libc/sys/mmixware/link.c: New.
- * libc/sys/mmixware/sys/syscall.h (TRAP1i, I3f): Make asm
- volatile.
- * libc/sys/mmixware/times.c (_times): Renamed from times.
- * libc/sys/mmixware/open.c (_open): Attempt to handle O_APPEND
- properly by reading previous contents, not through BinaryReadWrite.
- * libc/sys/mmixware/Makefile.am (lib_a_SOURCES): Add link.c
- * libc/sys/mmixware/Makefile.in: Regenerate.
-
-2002-02-10 Corinna Vinschen <corinna@vinschen.de>
-
- * libc/include/grp.h: Don't declare group functions when compiling
- Cygwin.
-
-2002-02-09 Corinna Vinschen <corinna@vinschen.de>
-
- * libc/include/grp.h: Include Cygwin specific header.
- * libc/include/sys/stat.h: Ditto. Don't define `struct stat'
- when compiling for Cygwin.
- * libc/include/sys/types.h: Don't define off_t, uid_t
- and gid_t when compiling for Cygwin.
-
-2002-02-08 matthew green <mrg@redhat.com>
-
- * libc/include/sys/reent.h (_REENT_CHECK_EMERGENCY): Allocate
- _REENT_EMERGENCY_SIZE, not sizeof(char *).
-
-2002-02-08 Alexandre Oliva <aoliva@redhat.com>
-
- Contribute sh64-elf.
- 2001-03-13 Alexandre Oliva <aoliva@redhat.com>
- * configure.host (newlib_cflags) [sh*-*-*]: Enable long long
- support in printf.
- 2001-01-29 Alexandre Oliva <aoliva@redhat.com>
- * libc/machine/sh/setjmp.S [SH5]: Switch to SHmedia mode before
- any labels.
- 2001-01-24 Alexandre Oliva <aoliva@redhat.com>
- * libc/sys/sh/trap.S (___trap34) [SH5]: Don't trash r2.
- 2000-12-16 Alexandre Oliva <aoliva@redhat.com>
- * libc/machine/sh/configure.in: Rework conditionals.
- * libc/machine/sh/Makefile.am: Likewise.
- * libc/machine/sh/configure, libc/machine/sh/Makefile.in: Rebuilt.
- 2000-12-01 Alexandre Oliva <aoliva@redhat.com>
- * configure.host: Match `sh*'.
- * libc/include/machine/setjmp.h: Define for SH5.
- * libc/machine/sh/configure.in: Detect SH5.
- * libc/machine/sh/configure: Rebuilt.
- * libc/machine/sh/Makefile.am: Use only setjmp.S for SH5.
- * libc/machine/sh/Makefile.in: Rebuilt.
- * libc/machine/sh/asm.h: Adjust for SH5.
- * libc/machine/sh/setjmp.S: Implement in SHmedia.
- * libc/sys/sh/crt0.S: Likewise.
- * libc/sys/sh/trap.S: Likewise.
-
-2002-02-07 Jeff Johnston <jjohnstn@redhat.com>
-
- * libc/machine/i386/Makefile.am: (mach_add_src): Remove.
- (mach_add_obj): Conditionally set to setjmp.o or nothing.
- (LIB_SOURCES): Remove $(mach_add_src).
- (lib_a_LIBADD, lib_a_DEPENDENCIES): Add and set to $(mach_add_src).
- (lib_la_LIBADD, lib_la_DEPENDENCIES): Ditto.
- * libc/machine/i386/Makefile.in: Regenerate.
-
-2002-02-05 Manik Raina <manik@cisco.com>
-
- * libc/misc/dprintf.c (parse_number): #if 0 unused function.
- * libc/stdlib/ldtoa.c (_ldcheck): Remove unused local variables
- s, p, k, and outstr.
- * libc/stdlib/dtoa.c (_dtoa_r): Initialize mlo.
-
-2002-02-04 Jeff Johnston <jjohnstn@redhat.com>
-
- * libc/include/sys/reent.h [(!_REENT_SMALL]: Add
- _REENT_CHECK_EMERGENCY macro.
-
-2002-02-03 matthew green <mrg@redhat.com>
-
- * libc/reent/signgam.c (__signgam): Fix error in previous.
-
-2002-02-02 matthew green <mrg@redhat.com>
-
- * libc/include/sys/config.h (_REENT_SMALL): Define for Xstormy16.
-
- * libc/reent/reent.c (_reclaim_reent): Clean for _REENT_SMALL case.
- * libc/reent/reent.tex: Add blurb about _REENT_SMALL.
- * libc/include/sys/reent.h (struct _reent): Completely new version
- for _REENT_SMALL.
- (_REENT_INIT): New defines, different defintion depending on _REENT_SMALL.
- (_REENT_CHECK, _REENT_CHECK_TM): Likewise.
- (_REENT_CHECK_ASCTIME_BUF, _REENT_INIT_RAND48): Likewise.
- (_REENT_CHECK_RAND48, _REENT_INIT_MP, _REENT_CHECK_MP): Likewise.
- (_REENT_CHECK_EMERGENCY, _REENT_SIGNGAM, _REENT_RAND_NEXT): Likewise.
- (_REENT_RAND48_SEED, _REENT_RAND48_MULT, _REENT_RAND48_ADD): Likewise.
- (_REENT_MP_RESULT, _REENT_MP_RESULT_K, _REENT_MP_P5S): Likewise.
- (_REENT_MP_FREELIST, _REENT_ASCTIME_BUF, _REENT_TM): Likewise.
- (_REENT_EMERGENCY): Likewise.
-
- * libc/include/sys/reent.h (struct __sFILE_fake): New struct, same as
- the start of the real __sFILE, used for stdin, stdout and stderr until
- they are setup properly.
- (struct __sFILE): Move location of _data in _REENT_SMALL case.
- * libc/stdio/findfp.c (__sinit): Rearrange for _REENT_SMALL case by
- allocated stdin, stdout and stderr.
- * libc/stdio/getchar.c (_getchar_r): Call _REENT_SMALL_CHECK_INIT().
- * libc/stdio/iprintf.c (iprintf, _iprintf_r): Likewise.
- * libc/stdio/perror.c (_perror_r): Likewise.
- * libc/stdio/printf.c (printf, _printf_r): Likewise.
- * libc/stdio/putchar.c (_putchar_r): Likewise.
- * libc/stdio/puts.c (_puts_r): Likewise.
- * libc/stdio/scanf.c (scanf, _scanf_r): Likewise.
- * libc/stdio/vprintf.c (vprintf): Likewise.
- * libc/stdio/vscanf.c (vscanf, _vscanf_r): Likewise.
-
- * libc/stdio/tmpnam.c (_tmpnam_r): Use _REENT_EMERGENCY().
-
- * libc/reent/reent.c (_wrapup_reent): Adjust for _REENT_SMALL atexit.
- * libc/include/sys/reent.h (_atexit): Limit atexit() entries to 32
- for _REENT_SMALL.
- * libc/stdlib/atexit.c (atexit): Rearrange for _REENT_SMALL case.
- * libc/stdlib/exit.c (exit): Rearrange for _REENT_SMALL case.
-
- * libc/include/sys/reent.h (struct _rand48): Keep _rand_next if
- _REENT_SMALL.
- * libc/stdlib/drand48.c (_drand48_r): Call _REENT_CHECK_RAND48().
- * libc/stdlib/lcong48.c (_lcong48_r): Likewise.
- * libc/stdlib/lrand48.c (_lrand48_r): Likewise.
- * libc/stdlib/mrand48.c (_mrand48_r): Likewise.
- * libc/stdlib/rand48.c (__dorand48): Likewise.
- * libc/stdlib/seed48.c (_seed48_r): Likewise.
- * libc/stdlib/srand48.c (_srand48_r): Likewise.
- * libc/stdlib/rand48.h (__rand48_seed, __rand48_mult, __rand48_add): Define
- as _REENT_RAND48_SEED(), _REENT_RAND48_MULT() and _REENT_RAND48_ADD().
- * libc/stdlib/dtoa.c (_dtoa_r): Call _REENT_CHECK_MP(). Use
- _REENT_MP_RESULT() and _REENT_MP_RESULT_K().
- * libc/stdlib/ldtoa.c (_ldtoa_r): Likewise.
- * libc/stdlib/rand.c (srand): Use _REENT_RAND_NEXT().
- * libc/stdlib/rand.c (rand): Likewise.
-
- * libc/stdlib/mallocr.c (malloc_stats): Call _REENT_SMALL_CHECK_INIT().
- * libc/stdlib/mstats.c (_mstats_r): Call _REENT_SMALL_CHECK_INIT().
-
- * libc/stdlib/mprec.c (Balloc): Call _REENT_CHECK_MP. Use
- _REENT_MP_FREELIST() and _REENT_MP_P5S.
- * libc/include/sys/reent.h (struct _mprec): New structure.
-
- * libc/include/sys/reent.h (struct _reent): Rename _strtok_last to
- _unused_strtok_last.
- * libc/string/strtok.c (strtok): Use a local static variable.
-
- * libc/include/sys/reent.h (_REENT_ASCTIME_SIZE): New define.
- (_REENT_EMERGENCY_SIZE): Likewise.
- * libc/time/asctime.c (asctime): Call _REENT_CHECK_ASCTIME_BUF(). Use
- _REENT_ASCTIME_BUF().
- * libc/time/lcltime.c (localtime): Call _REENT_CHECK_TM(). Use
- _REENT_TM().
-
- * libc/include/math.h (__singam_r): Use _REENT_SIGNGAM().
- * libc/reent/signgam.c (__signgam): Use _REENT_SIGNGAM().
- * libm/math/w_gamma.c (gamma): Use _REENT_SIGNGAM().
- * libm/math/w_lgamma.c (lgamma): Use _REENT_SIGNGAM().
- * libm/math/wf_gamma.c (gammaf): Use _REENT_SIGNGAM().
- * libm/math/wf_lgamma.c (lgammaf): Use _REENT_SIGNGAM().
-
-2002-02-01 Geoffrey Keating <geoffk@redhat.com>
-
- * configure.host (xstormy16): Don't use the generic malloc.
- * libc/machine/xstormy16/Makefile.am: Build tiny-malloc.
- * libc/machine/xstormy16/Makefile.in: Regenerate.
- * libc/machine/xstormy16/mallocr.c: New file.
- * libc/machine/xstormy16/tiny-malloc.c: New file.
-
-2002-01-28 Thomas Fitzsimmons <fitzsim@redhat.com>
-
- * libc/include/sys/signal.h [__CYGWIN__]: Issue error message
- when _CYGWIN_TYPES_H is not defined.
-
-2002-01-24 Thomas Fitzsimmons <fitzsim@redhat.com>
-
- * libc/include/sys/signal.h: Revert 2002-01-23 change.
-
-2002-01-23 Thomas Fitzsimmons <fitzsim@redhat.com>
-
- * libc/include/sys/signal.h: Remove pthread_kill declaration
- when __CYGWIN__ is defined.
-
-2002-01-18 Mark Bradshaw <bradshaw@staff.crosswalk.com>
-
- * libc/include/time.h: Add prototype for strptime for Cygwin.
-
-2002-01-17 Nick Clifton <nickc@cambridge.redhat.com>
-
- * libc/machine/xscale/memset.c (memset): Fix bug when len == 1 and
- dst was not word aligned.
-
- * libc/sys/arm/syscalls.c (_sbrk): Return -1 rather than aborting
- if too much memory is requested.
-
-2002-01-11 Jeff Johnston <jjohnstn@redhat.com>
-
- * libc/stdio/vfscanf.c (__svfscanf_r): Change loop that
- reads blanks from the input file to break if EOF reached
- rather than end processing.
-
-2002-01-07 Jeff Johnston <jjohnstn@redhat.com>
-
- * MAINTAINERS: Change e-mail addresses to refer to redhat domain.
-
-2002-01-07 Alan Matsuoka <alanm@redhat.com>
-
- * libc/include/machine/ieeefp.h: Configure d10v doubles to
- be 32 bits if __DOUBLE__ == 32 otherwise doubles are 64 bits.
- libc/include/sys/config.h: Ditto.
-
-2001-12-28 Corinna Vinschen <corinna@vinschen.de>
-
- * libc/sys/cygwin/sys/utmp.h: Add definition of UTMP_FILE.
-
-2001-12-22 Geoffrey Keating <geoffk@redhat.com>
- Catherine Moore <clm@redhat.com>
- Richard Henderson <rth@redhat.com>
- Corinna Vinschen <vinschen@redhat.com>
-
- * configure.host: Add support for xstormy16.
- * libc/include/machine/ieeefp.h: Add support for xstormy16.
- * libc/include/machine/setjmp.h: Add support for xstormy16.
- * libc/include/sys/config.h: Add support for xstormy16.
- * libc/machine/xstormy16/Makefile.am: New file.
- * libc/machine/xstormy16/Makefile.in: New file.
- * libc/machine/xstormy16/aclocal.m4: New file.
- * libc/machine/xstormy16/configure: New file.
- * libc/machine/xstormy16/configure.in: New file.
- * libc/machine/xstormy16/setjmp.S: New file.
-
-2001-12-19 Thomas Fitzsimmons <fitzsim@redhat.com>
-
- * libm/machine/configure.in (HAVE_LIBM_MACHINE_DIR): New conditional.
- * libm/machine/Makefile.am [HAVE_LIBM_MACHINE_DIR] (LIBM_MACHLIB): New variable.
-
-2001-12-19 Corinna Vinschen <corinna@vinschen.de>
-
- * libm/machine/Makefile.am: Change rules to create correct lib.a.
- * libm/machine/Makefile.in: Regenerated through automake.
-
-2001-12-18 Thomas Fitzsimmons <fitzsim@redhat.com>
-
- * Makefile.am (DOCDIR): Force to empty string when doc
- directory is not present.
-
-2001-12-18 Thomas Fitzsimmons <fitzsim@redhat.com>
-
- * libc/machine/i386/f_*: Move to libm/machine/i386.
-
-2001-12-18 Joel Sherrill <joel@OARcorp.com>
-
- * libm/machine/Makefile.am: Add dummy doc stub so
- "make info" works.
-
-2001-12-17 Joel Sherrill <joel@OARcorp.com>
-
- * libc/include/sys/types.h (ino_t): RTEMS uses long also.
-
-2001-12-17 Thomas Fitzsimmons <fitzsim@redhat.com>
-
- * libc/stdlib/Makefile.am (LIB_COMPILE): Change to equal
- $(COMPILE) rather than $(CC).
- * libc/stdio/Makefile.am (LIB_COMPILE): Likewise.
- (vfprintf.$(oext)): Remove $(INCLUDES), made redundant by
- $(LIB_COMPILE) change.
- (vfiprintf.$(oext)): Likewise.
-
-2001-12-17 Corinna Vinschen <vinschen@redhat.de>
-
- * libc/sys/cygwin/include/unistd.h: Add __UNISTD_GETOPT_ to allow
- conditionalized including of getopt stuff.
-
-2001-12-14 Thomas Fitzsimmons <fitzsim@redhat.com>
-
- * libc/stdio/Makefile.am (vfprintf.$(oext)): Add $(INCLUDES) to
- compile line.
- (vfiprintf.$(oext)): Likewise.
-
-2001-12-13 Thomas Fitzsimmons <fitzsim@redhat.com>
-
- * Makefile.shared: New file.
- * libc/sys/linux/shared.ld: New file.
- * libm/machine/*: New files.
- * libm/machine/i386/*: New files.
- * Makefile.am: Add libtool support. Change math and mathfp
- references to variables.
- * configure.host: Add variables for libtool support. Add
- libm_machine_dir variable.
- * configure.in: Add objectlist variables, for libtool
- support. Add CC_FOR_BUILD tests.
- * libc/Makefile.am: Add libtool support. Change crt0.o
- reference to be a variable reference.
- * libc/configure.in: Add libtool support. Change sublib
- names to be lib${subdir}.la when using libtool.
- * libc/ctype/Makefile.am: Add libtool support.
- * libc/errno/Makefile.am: Likewise.
- * libc/locale/Makefile.am: Likewise.
- * libc/machine/Makefile.am: Likewise.
- * libc/machine/configure.in: Likewise.
- * libc/machine/i386/Makefile.am: Likewise.
- * libc/machine/i386/configure.in: Likewise.
- * libc/misc/Makefile.am: Likewise.
- * libc/posix/Makefile.am: Likewise.
- * libc/reent/Makefile.am: Likewise.
- * libc/signal/Makefile.am: Likewise.
- * libc/stdio/Makefile.am: Likewise.
- * libc/stdlib/Makefile.am: Likewise.
- * libc/string/Makefile.am: Likewise.
- * libc/sys/Makefile.am: Likewise.
- * libc/sys/configure.in: Likewise.
- * libc/sys/linux/Makefile.am: Add libtool support. Change
- awk reference to a variable reference. Change signal.h
- reference to a variable reference.
- * libc/sys/linux/configure.in: Add libtool support.
- * libc/syscalls/Makefile.am: Likewise.
- * libc/time/Makefile.am: Likewise.
- * libc/unix/Makefile.am: Likewise.
- * libm/Makefile.am: Add libtool support. Change math and
- mathfp references to variables.
- * libm/configure.in: Add libtool support. Add
- LIBM_MACHINE_LIB variable.
- * libm/common/Makefile.am: Add libtool support.
- * libm/math/Makefile.am: Likewise.
- * libm/mathfp/Makefile.am: Likewise.
- Regenerate all Makefile.in, aclocal.m4, and configure.
-
-2001-12-13 Anita Kulkarni <anitak@kpit.com>
-
- * libc/sys/sh/crt0.S: Remove stack symbol definition 0xdeaddead.
-
-2001-12-06 John Peacock <jpeacock@rowman.com>
-
- * libc/include/sys/unistd.h: Correct ualarm declaration.
-
-2001-12-05 Nick Clifton <nickc@cambridge.redhat.com>
-
- * libc/sys/arm/crt0.S: For __USES_INITFINI__ preserve the argument
- vector before calling the initialisation functions.
-
-2001-11-29 Christopher Faylor <cgf@redhat.com>
-
- * libc/include/dirent.h: Protect against multiple inclusion.
-
-2001-11-27 Christopher Faylor <cgf@redhat.com>
-
- * libc/include/sys/types.h: Define useconds_t.
- * libc/include/sys/ulimit.h: Declare ualarm.
-
-2001-11-21 Christopher Faylor <cgf@redhat.com>
-
- * libc/sys/cygwin/sys/dirent.h (DIR): Add another internal element.
-
-2001-11-19 Hans-Peter Nilsson <hp@bitrange.com>
-
- * libc/sys/mmixware/*: Tweak license header in all source files.
-
-2001-11-12 Corinna Vinschen <vinschen@redhat.com>
-
- * libc/include/alloca.h: Move libc/sys/linux/include/alloca.h
- to here. Rearrange for general inclusion by stdlib.h.
- * libc/include/stdlib.h: Include <alloca.h> if __STRICT_ANSI__
- isn't defined.
- * libc/sys/linux/include/alloca.h: Move to libc/include.
-
-2001-11-12 Anthony Green <green@redhat.com>
-
- * libc/sys/arm/crt0.S (__stack_base__): New symbol.
-
-2001-11-13 Hans-Peter Nilsson <hp@bitrange.com>
-
- * libc/sys/mmixware/*: Correct spacing in all source files.
- * libc/sys/mmixware/syscall.h: Move misplaced file...
- * libc/sys/mmixware/sys/syscall.h: ...here.
-
-2001-11-12 Hans-Peter Nilsson <hp@bitrange.com>
-
- * libc/include/machine/ieeefp.h: Add support for mmix target.
- * libc/include/machine/setjmp.h: Ditto.
- * configure.host: Ditto.
- * libc/sys/mmixware/Makefile.am, libc/sys/mmixware/_exit.c,
- libc/sys/mmixware/access.c, libc/sys/mmixware/aclocal.m4,
- libc/sys/mmixware/chmod.c, libc/sys/mmixware/chown.c,
- libc/sys/mmixware/close.c, libc/sys/mmixware/configure.in,
- libc/sys/mmixware/creat.c, libc/sys/mmixware/crt0.c,
- libc/sys/mmixware/execv.c, libc/sys/mmixware/execve.c,
- libc/sys/mmixware/fork.c, libc/sys/mmixware/fstat.c,
- libc/sys/mmixware/getpid.c, libc/sys/mmixware/gettime.c,
- libc/sys/mmixware/isatty.c, libc/sys/mmixware/kill.c,
- libc/sys/mmixware/lseek.c, libc/sys/mmixware/open.c,
- libc/sys/mmixware/pipe.c, libc/sys/mmixware/read.c,
- libc/sys/mmixware/sbrk.c, libc/sys/mmixware/setjmp.S,
- libc/sys/mmixware/stat.c, libc/sys/mmixware/sys/syscall.h,
- libc/sys/mmixware/time.c, libc/sys/mmixware/times.c,
- libc/sys/mmixware/unlink.c, libc/sys/mmixware/utime.c,
- libc/sys/mmixware/wait.c, libc/sys/mmixware/write.c: New files.
- * libc/sys/mmixware/configure, libc/sys/mmixware/Makefile.in,
- libc/sys/mmixware/aclocal.m4: Generate.
-
-2001-11-05 Corinna Vinschen <corinna@vinschen.de>
-
- * libc/include/sys/unistd.h: Add prototypes for endusershell(),
- getusershell(), iruserok(), revoke(), ruserok() and setusershell()
- when __CYGWIN__ is defined.
- * libc/sys/cygwin/sys/utmp.h: Add prototypes for login_tty() and
- logwtmp().
-
-2001-11-01 Arati Dikey <aratidikey@hotmail.com>
-
- * libm/mathfp/sf_isinf.c (isinff): Change to use _DEFUN macro.
- [_DOUBLE_IS_32BITS](isinf): New function that calls isinff.
- * libm/mathfp/sf_isnan.c (isnanf): Change to use _DEFUN macro.
- [_DOUBLE_IS_32BITS](isnan): New function that calls isnanf.
-
-2001-10-24 Christopher Faylor <cgf@redhat.com>
-
- * libc/stdio/fseek.c: Reset pointer to buffer base
- when forced to seek outside of current buffer contents.
- This prevents the code from erroneously thinking there is
- anything in the current buffer.
-
-2001-10-22 Geoffrey Keating <geoffk@redhat.com>
-
- * libc/include/math.h: The C++ standard adds the single-precision
- versions of the elementary functions.
-
-2001-10-22 Christopher Faylor <cgf@redhat.com>
-
- * libc/posix/execvp.c: Remove obsolete CYGWIN32 considerations
- throughout.
- * signal.h: Change comment to reflect __CYGWIN__ rather than __CYGWIN32__.
- * popen.c (popen): Use __CYGWIN_ rather than __CYGWIN32__.
- * system.c (_system_r): Ditto.
-
-2001-10-17 Corinna Vinschen <corinna@vinschen.de>
-
- * libc/include/sys/unistd.h: Add prototype for fchdir() when
- __CYGWIN__ or __rtems__ is defined.
-
-2001-10-01 Charles Wilson <cwilson@ece.gatech.edu>
-
- * libc/include/stdlib.h: add declarations for
- _strtoull_r, _strtoll_r, strtoull, and strtoll.
- * libc/stdio/local.h: remove declarations of
- __strtoull_r and __strtoll_r.
- * libc/stdio/vfscanf.c(__svfscanf_r): call
- _strtoull_r instead of __strtoull_r. Ditto
- _strtoll_r vs. __strtoll_r.
- * libc/stdlib/Makefile.am: add new files to
- .c list and .def list
- * libc/stdlib/Makefile.in: regenerate
- * libc/stdlib/strtoll_r.c: rename __strtoll_r
- as _strtoll_r
- * libc/stdlib/strtoull_r.c: rename __strtoull_r
- as _strtoull_r
- * libc/stdlib/strtoull.c: new file
- * libc/stdlib/strtoll.c: new file
-
-Mon Sep 17 17:29:47 2001 Christopher Faylor <cgf@cygnus.com>
-
- * libc/include/process.h: Add getpid() declaration.
-
-2001-09-14 Nick Clifton <nickc@cambridge.redhat.com>
-
- * libc/sys/arm/crt0.S: Add calls to _init and _fini (via atexit)
- for new style arm/elf ctor/dtor handling.
- Minor formatting tidy up.
-
-2001-09-13 Jeff Johnston <jjohnstn@redhat.com>
-
- * libc/stdlib/Makefile.am: Add support to build strtoll_r.c
- and strtoull_r.c.
- * libc/stdlib/Makefile.in: Regenerated.
- * libc/stdlib/strtoll_r.c: New file.
- * libc/stdlib/strtoull_r.c: New file.
- * libc/stdio/local.h: Add prototypes for long long string
- conversion routines.
- * libc/stdio/vfscanf.c (__svfscanf_r): Add optional long long support
- tied to %L integer conversion specifier.
-
-Thu Sep 13 08:49:49 2001 Jason Tishler <jason@tishler.net>
-
- * strftime.c (strftime): Fix "%W" implementation to properly handle
- Mondays too.
-
-2001-09-07 Jeff Law <law@redhat.com>
-
- * libc/sys/h8300hms/crt0.S: For H8/300H and H8/S, load address of
- __fini with "mov.l" instead of "mov.w".
-
-2001-09-05 Corinna Vinschen <corinna@vinschen.de>
-
- * libc/sys/cygwin/include/unistd.h: New file, wrapping sys/unistd.h
- and getopt.h.
-
-2001-09-04 Jason Merrill <jason_merrill@redhat.com>
-
- * libc/sys/h8300hms/crt0.S: Support ELF initialization.
-
-2001-09-03 Corinna Vinschen <corinna@vinschen.de>
-
- * libc/sys/cygwin/sys/dirent.h (struct dirent): Add version number
- field.
- (__DIRENT_VERSION): New define.
-
-2001-09-03 Corinna Vinschen <corinna@vinschen.de>
-
- * libc/sys/cygwin/sys/dirent.h (struct dirent): Add `d_fd' member.
- Shrink __d_reserved accordingly to keep structure size.
- (dirfd): Declare external.
-
-2001-08-29 Joel Sherrill <joel@OARcorp.com>
-
- * libc/include/sys/unistd.h: Prototype chroot() for RTEMS.
-
-2001-08-29 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
-
- * libc/machine/i386/f_atan2.S, libc/machine/i386/f_atan2f.S,
- libc/machine/i386/f_exp.c, libc/machine/i386/f_expf.c,
- libc/machine/i386/f_frexp.S, libc/machine/i386/f_frexpf.S,
- libc/machine/i386/f_ldexp.S, libc/machine/i386/f_ldexpf.S,
- libc/machine/i386/f_log.S, libc/machine/i386/f_log10.S,
- libc/machine/i386/f_log10f.S, libc/machine/i386/f_logf.S,
- libc/machine/i386/f_pow.c, libc/machine/i386/f_powf.c,
- libc/machine/i386/f_tan.S, libc/machine/i386/f_tanf.S:
- Add conditional compilation to avoid HW FPU instructions
- when compiled for soft-float.
-
-2001-08-29 Jeff Johnston <jjohnstn@redhat.com>
-
- * Makefile.am: Add check for ln failing when creating libg.a
- so that cp gets used as a backup.
- * Makefile.in: Regenerated.
-
-2001-08-29 Jeff Johnston <jjohnstn@redhat.com>
-
- * libc/include/sys/reent.h: Add include of <sys/_types.h>.
- No longer include time.h. Add struct __tm to use for
- _localtime_buf in the reentrant structure. Add a
- _NULL definition to use in initializing the reentrant struct.
- * libc/include/sys/config.h: For CYGWIN32 and RTEMS, change
- the _READ_WRITE_RETURN_TYPE to _ssize_t which is found in
- <sys/_types.h>.
- * libc/include/sys/unistd.h: Include <sys/_types.h>.
- * libc/time/lcltime.c (localtime): Cast the reentrant struct
- _localtime_buf to be struct tm *.
-
-Wed Aug 29 14:17:38 2001 J"orn Rennecke <amylaar@redhat.com>
-
- * configure.host (h8300-*-elf*, h8500-*-elf*): New cases.
- * libc/sys/h8300hms/crt1.c (__main): Don't reference __ctors /
- __ctors_end.
- * libc/sys/h8300hms/syscalls.c: Include errno.h.
- (_unlink): New stub function.
-
-Sat Aug 25 22:22:25 2001 Christopher Faylor <cgf@cygnus.com>
-
- * libc/include/sys/errno.h: Add a cautionary comment.
-
-2001-08-21 Jeff Johnston <jjohnstn@redhat.com>
-
- * libc/stdlib/mallocr.c [!defined(MALLOC_ALIGNMENT)]: Add conditional
- for SIZE_SZ so that alignment ends up a minimum of 8.
-
-Mon Aug 13 22:26:01 2001 Christopher Faylor <cgf@cygnus.com>
-
- * libc/include/machine/setjmp.h: Protect sigsetjmp/siglongjmp macro
- arguments.
-
- * libc/include/sys/errno.h: Declare sys_errlist and sys_nerr, under
- Cygwin.
-
-2001-08-13 Jeff Johnston <jjohnstn@redhat.com>
-
- * libc/include/malloc.h (M_MXFAST, M_NLBLKS, M_GRAIN, M_KEEP): New
- macro constants for mallopt options.
- (M_TRIM_THRESHOLD, M_TOP_PAD, M_MMAP_THRESHOLD, M_MMAP_MAX): Ditto.
-
-2001-08-02 Jeff Johnston <jjohnstn@redhat.com>
-
- * libc/include/stdio.h (BUFSIZ): Define to __BUFSIZ__ if provided,
- otherwise default.
-
-2001-07-12 Aldy Hernandez <aldyh@redhat.com>
-
- * libc/machine/mips/setjmp.S: Allow mips16 and mips64 to coexist.
-
-2001-06-27 Nick Clifton <nickc@cambridge.redhat.com>
-
- * libc/include/machine/ieeefp.h (__IEEE_BYTES_LITTLE_ENDIAN):
- Define for little endian ARMs.
-
- * libc/stdlib/mprec.h (Storeinc): Use little endian version if
- __IEEE_BYTES_LITTLE_ENDIAN is defined.
-
-2001-06-11 Danny Smith <dannysmith@users.sourceforge.net>
-
- * /libc/include/ctype.h (is* and to* macros): Do not define if C++.
-
-2001-06-11 Egor Duda <deo@logos-m.ru>
-
- * libc/ctype/ctype_.c: When compiled with gcc on platforms
- with signed char, make _ctype_[-128] ... _ctype[-1] refer to
- initialized memory region. Platform can define COMPACT_CTYPE
- to avoid allocation of the additional 128 bytes of data.
- Add pointer to _ctype_ array. Always initialize all _ctype_
- array elements.
-
-2001-06-08 Jonathan Larmour <jlarmour@redhat.com>
-
- * libc/stdlib/mbtowc_r.c (_mbtowc_r): Avoid dereferencing
- NULL pointer.
-
-2001-05-28 Nick Clifton <nickc@cambridge.redhat.com>
-
- * libc/stdio/vfprintf.c (_VFPRINTF_R): Handle printf ("%#.0o",0)
-
-2001-05-25 Nick Clifton <nickc@cambridge.redhat.com>
-
- * libc/machine/xscale/memcmp.c: Fix bug when both pointers have
- matching, non-word alignment, and the length is <= 4 but more than
- enough to move them over a word boundary.
- Add comments explaining what each instruction does.
-
-Mon May 7 20:39:25 2001 Christopher Faylor <cgf@cygnus.com>
-
- * libc/include/sys/stat.h: Revert March 3, Cygwin change.
- * libc/include/sys/unistd.h: Ditto.
-
-2001-05-04 Earnie Boyd <earnie@users.sourceforge.net>
-
- * libc/string/strrchr.c: Use strchr for the speed improvements.
-
-2001-05-01 Jeff Johnston <jjohnstn@redhat.com>
-
- * libc/stdio/findfp (__sinit)[HAVE_FCNTL]: For platforms that have
- real file systems, let __smakebuf() determine if line buffering
- should be used for stdout.
-
-2001-04-27 Jeff Johnston <jjohnstn@redhat.com>
-
- * libc/stdio/vfscanf.c (__svfscanf_r): Initialize new_exp local var.
-
-2001-04-27 Jeff Johnston <jjohnstn@redhat.com>
-
- * libc/include/stdlib.h: Add prototype for _strtod_r.
-
-2001-04-24 Charles Wilson <cwilson@ece.gatech.edu
-
- * libc/stdio/vprintf.c (vprintf): fix signature to use _DEFUN
- * libc/stdio/vprintf.c (_vprintf_r): new function
- * libc/stdio/vsnprintf.c (vsnprintf): fix signature to use _DEFUN
- * libc/stdio/vsnprintf.c (_vsnprintf_r): fix signature to use
- _DEFUN, and call _vfprintf_r, not vfprintf.
- * libc/stdio/vsprintf.c (vsprintf.c): fix signature to use _DEFUN
- * libc/stdio/vsprintf.c (_vsprintf_r): fix signature to use
- _DEFUN, and call _vfprintf_r, not vfprintf.
-
-2001-04-22 Earnie Boyd <earnie@users.sourceforge.net>
-
- * libc/include/sys/unistd.h [X_OK]: Use better protection against
- Cygwin X_OK definitions in sys/file.h.
-
-Fri Apr 20 23:17:51 2001 Christopher Faylor <cgf@cygnus.com>
-
- * libc/include/sys/time.h: Define timercmp and other macros for
- __CYGWIN__, too.
-
-2001-04-20 Jeff Johnston <jjohnstn@redhat.com>
-
- * acinclude.m4: Added --enable-malloc-debugging configure flag.
- * configure.host: For Cygwin specify -DMALLOC_PROVIDED if
- --enable-malloc-debugging selected.
- * aclocal.m4 configure: Regenerated.
- libm/aclocal.m4 libm/configure: Ditto.
- * libc/aclocal.m4 libc/configure: Ditto.
- * libc/machine/aclocal.m4 libc/machine/configure: Ditto.
- * libc/machine/*/aclocal.m4 libc/machine/*/configure: Ditto.
- * libc/sys/aclocal.m4 libc/sys/configure: Ditto.
- * libc/sys/*/aclocal.m4 libc/sys/*/configure: Ditto.
- * doc/aclocal.m4 doc/configure: Ditto.
-
-2001-04-20 Jeff Johnston <jjohnstn@redhat.com>
-
- * libc/include/stdio.h[!_REENT_ONLY]: Moved various functions together
- into one list.
- [!__STRICT_ANSI__]: Moved non-ANSI I/O functions in this list.
- (vfscanf, vscanf, vsscanf, _vfscanf_r, _vscanf_r, _vsscanf_r): New
- function prototypes.
- (_fscanf_r, _sscanf_r): Ditto.
- * libc/include/stdlib.h: Added _strtod_r prototype.
- * libc/stdio/Makefile.am: Add new v*scanf functions.
- * libc/stdio/Makefile.in: Regenerate.
- * libc/stdio/fscanf.c: Reorganized so HAVE_STDC only affects prototype
- and code is shared. Added reentrant _fscanf_r which calls __svfscanf_r.
- * libc/stdio/scanf.c: Changed to call __svfscanf_r.
- * libc/stdio/sscanf.c: Changed documentation to add reentrant routines.
- (sscanf): Changed to call __svfscanf_r with _REENT argument.
- (_sscanf_r): New routine.
- * libc/stdio/local.h: Removed __svfscanf prototype and replaced it
- with __svfscanf_r prototype.
- * libc/stdio/vfscanf.c (vfscanf, _vfscanf_r: New
- routines.
- (__svfscanf_r): Reentrant version of __svfscanf which takes reetrancy
- structure as argument as calls reentrant versions of helper functions
- (e.g. _strtol_r, _strtoul_r). Also replaced calls to atol and atof
- to _strtol_r and _strtod_r respectively.
- * libc/stdio/vfscanf.c: Also changed __svfscanf to call __svfscanf_r.
- * libc/stdlib/strtod.c (strtod): Changed to call _strtod_r with
- _REENT argument.
- * libc/stdio/vscanf.c: New file.
- * libc/stdio/vsscanf.c: Ditto.
-
-2001-04-19 Robert Collins <rbtcollins@hotmail.com>
-
- * include/time.h[__CYGWIN__]: Define tzname to _tzname if not defined.
- Define daylight to _daylight if it is not defined
- Prepare a variable export of timezone based on timezonevariable.
- (Cannot be used with the timezone() function.)
-
-2001-04-17 Stephen L. Moshier <moshier@moshier.ne.mediaone.net>
-
- * newlib/libm/math/ef_asin.c (pio2_hi, pio2_lo, pio4_hi):
- Correct the numerical values.
-
-2001-04-13 Robert Collins <rbtcollins@hotmail.com>
-
- * libc/include/sys/unistd.h: Add pthread_atfork (Cygwin only).
-
-Thu Apr 12 23:11:00 2001 Corinna Vinschen <corinna@vinschen.de>
-
- * libc/include/sys/errno.h: Add ECASECLASH to indicate case clash
- on case insensitve file systems.
-
-2001-04-12 Robert Collins <rbtcollins@hotmail.com>
-
- * libc/include/sys/features.h: Add appropriate defines for Cygwin
- pthread support.
- * libc/include/sys/signal.h: Remove unneeded __CYGWIN__ protection.
- * libc/include/sys/types.h: Protect __CYGWIN__ from the rtems pthreads
- types. Include <cygwin/types.h> for the cygwin specific typedefs.
-
-2001-04-04 Richard Sandiford <rsandifo@redhat.com>
-
- * libc/include/machine/ieeefp.h: Comment about new configuration
- macros _FLT_LARGEST_EXPONENT_IS_NORMAL and _FLT_NO_DENORMALS.
- * libm/common/fdlib.h: Define new macros for testing floats.
- * libm/common/sf_*: Use them.
- * libm/math/ef_*: Likewise.
- * libm/math/sf_*: Likewise.
-
-2001-03-29 Jeff Johnston <jjohnstn@redhat.com>
-
- * libc/sys/arm/setjmp.S: Added .code 16 specifier for thumb-mode
- prolog to by-pass possible assembler error.
-
-2001-03-21 Egor Duda <deo@logos-m.ru>
-
- Allow building internal stubs for non-reentrant syscalls
- if target provides its own malloc
- * libc/reent/reent.c (errno): Move definition here.
- * libc/reent/sbrkr.c: From here.
-
-2001-03-20 Danny Smith <dannysmith@users.sourceforge.net>
-
- * libc/include/sys/types.h (BSD int typedefs): Guard with
- _BSDTYPES_DEFINED rather than _WINSOCK_H.
- (fd_set): Add !defined __USE_W32_SOCKETS to guard; define
- _SYS_TYPES_FD_SET.
- * libc/include/sys/unistd.h (gethostname): Don't declare if defined
- (_WINSOCK_H) || defined (__USE_W32_SOCKETS).
-
-Sat Mar 17 18:30:00 2001 Corinna Vinschen <corinna@vinschen.de>
-
- * libc/include/sys/unistd.h: Add _PC_POSIX_PERMISSONS and
- _PC_POSIX_SECURITY constants for Cygwin.
-
-Wed Mar 14 9:34:00 2001 Corinna Vinschen <corinna@vinschen.de>
-
- * libc/sys/cygwin/crt0.c: Add copyright hint.
- * libc/sys/cygwin/sys/dirent.h: Ditto.
- * libc/sys/cygwin/sys/param.h: Ditto.
- * libc/sys/cygwin/sys/utime.h: Ditto.
- * libc/sys/cygwin/sys/utmp.h: Ditto.
-
-2001-03-13 Alexandre Oliva <aoliva@redhat.com>
-
- * libc/stdio/vfprintf.c (QUADINT) [_NO_LONGLONG]: Make it
- equivalent to LONGINT.
-
-2001-03-08 Richard Sandiford <rsandifo@redhat.com>
-
- * (libc/include/machine/setjmp.h): Use 23 long long ints for a
- jmpbuf on MIPS64 targets.
- * (libc/machine/mips/setjmp.S): Add MIPS64 version.
-
-Wed Mar 7 16:02:07 2001 Christopher Faylor <cgf@cygnus.com>
-
- * libc/include/sys/config.h: Use ssize_t for Cygwin read/write
- declarations.
-
-Mon Mar 5 21:48:54 2001 J"orn Rennecke <amylaar@redhat.com>
-
- * libc/include/sys/config.h (_READ_WRITE_RETURN_TYPE): Define.
- For RTEMS, define to be ssize_t. Default to int if not defined.
- * libc/stdio/sscanf.c (eofread): Return _READ_WRITE_RETURN_TYPE.
- * libc/stdio/stdio.c (__sread, __swrite): Likewise.
- * libc/stdio/local.h (__sread, __swrite): Likewise.
- * libc/include/sys/reent.h (_read, _write): Likewise.
- * libc/include/sys/unistd.h (read, write, _read, _write): Likewise.
- * libc/syscalls/sysread.c (read): Likewise.
- * libc/syscalls/syswrite.c (write): Likewise.
-
-2001-03-05 Jeff Johnston <jjohnstn@redhat.com>
-
- * libc/time/mktime.c: Add L suffix to _SEC_IN_xxxx constants.
-
-Sat Mar 3 00:34:14 2001 Christopher Faylor <cgf@cygnus.com>
-
- * libc/include/sys/stat.h: Use special defines for executable stat bits
- when compiling for Cygwin.
- * libc/include/sys/unistd.h: Use special define for X_OK when compiling
- for Cygwin.
-
-2001-03-02 Jeff Johnston <jjohnstn@redhat.com>
-
- * libc/string/strtok.c: Add #undef of __STRICT_ANSI__ so prototype
- of strtok_r is always defined.
-
-2001-03-02 Jeff Johnston <jjohnstn@redhat.com>
-
- * libc/include/machine/ansi.h: New dummy header file.
-
-2001-02-22 Jeff Johnston <jjohnstn@redhat.com>
-
- * libc/include/machine/setjmp-dj.h: With DJ Delorie's permission,
- changed the copyright information to allow free modification of the
- file with no reference to "copying.dj".
- * libc/include/sys/stat-dj.h: Ditto.
- * libc/machine/i386/setjmp.S: Ditto.
- * libc/sys/h8300hms/sys/file.h: Ditto.
- * libc/sys/sysmec/access.c: Ditto.
- * libc/sys/sysnecv850/access.c: Ditto.
- * libc/stdio/mktemp.c: Fixed typo for the word copyright.
- * libc/stdlib/getenv_r.c: Ditto.
- * libc/stdlib/putenv_r.c: Ditto.
- * libc/stdlib/setenv_r.c: Ditto.
- * libc/stdlib/getenv.c: Removed DJ reference since any possible
- modifications will now be in the _r version of this file.
- * libc/stdlib/putenv.c: Ditto.
- * libc/stdlib/setenv.c: Ditto.
- * libc/sys/go32/copying.dj: Removed DJ's address which is no longer
- valid. Added a reference to DJ's web page that contains his address.
- * libc/sys/go32/*.s: Removed references to DJ's old address.
- * libc/sys/go32/*.c: Ditto.
- * libc/sys/go32/*.h: Ditto.
- * libc/sys/go32/*.S: Ditto.
- * libc/sys/go32/sys/*.h: Ditto.
-
-2001-02-21 Jeff Johnston <jjohnstn@redhat.com>
-
- * libc/stdio/fdopen.c (fdopen): Protect calls to _fcntl() with
- HAVE_FCNTL flag check.
- * configure.host: Define HAVE_FCNTL for Cygwin, go32, RTEMS, sparc64,
- powerpcle, x86 netware, x86 sco, x86 Linux and Vxworks.
-
-Thu Feb 15 01:39:51 2001 Christopher Faylor <cgf@cygnus.com>
-
- * libc/include/sys/signal.h: Always include sys/types.h under Cygwin.
-
-2001-02-14 Kazuhiro Fujieda <fujieda@jaist.ac.jp>
-
- * libc/include/stdlib.h: Add declarations of rand48 functions and
- their reentrant versions.
- * libc/include/sys/reent.h: Move macros from rand48.h. Add
- struct _rand48 for shared parameters of rand48 functions.
- (struct _reent): Add a variable _r48 of struct _rand48.
- (_REENT_INIT): Add _r48 initialization.
- * libc/stdlib/Makefile.am (lib_a_SOURCES): Add rand48 functions.
- (CHEWOUT_FILES): Add rand48.def.
- * libc/stdlib/Makefile.am: Add dependencies for rand48 functions.
- * libc/stdlib/Makefile.in: Regenerated.
- * libc/stdlib/drand48.c (drand48, _drand48_r): Derived from the
- NetBSD C library.
- * libc/stdlib/erand48.c (erand48, _erand48_r): Ditto.
- * libc/stdlib/jrand48.c (jrand48, _jrand48_r): Ditto.
- * libc/stdlib/lcong48.c (lcong48, _lcong48_r): Ditto.
- * libc/stdlib/lrand48.c (lrand48, _lrand48_r): Ditto.
- * libc/stdlib/mrand48.c (mrand48, _mrand48_r): Ditto.
- * libc/stdlib/nrand48.c (nrand48, _nrand48_r): Ditto.
- * libc/stdlib/seed48.c (seed48, _seed48_r): Ditto.
- * libc/stdlib/srand48.c (srand48, _srand48_r): Ditto.
- * libc/stdlib/rand48.c (__dorand48): Ditto.
- * libc/stdlib/rand48.h: Ditto, and modify declarations of global
- parameters into macros referring them in the reentrant structure.
-
-2001-02-12 Jeff Johnston <jjohnstn@redhat.com>
-
- * libc/include/sys/stat.h: Add mknod for Cygwin now that
- Cygwin definition has correct prototype.
-
-2001-02-08 Jeff Johnston <jjohnstn@redhat.com>
-
- * libc/include/sys/stat.h: Must revert change for mknod
- for CYGWIN until winsup/cygwin/syscalls.cc changes mknod
- prototype.
-
-2001-02-08 Jeff Johnston <jjohnstn@redhat.com>
-
- * libc/include/stdio.h: Revert putw prototype.
-
-2001-02-08 Edward M. Lee <tailbert@yahoo.com>
-
- * libc/include/grp.h: add prototype for initgroups.
- * libc/include/stdio.h: fix prototype for putw.
- * libc/include/sys/signal.h: add prototype for killpg.
- * libc/include/sys/stat.h: enable mknod/lstat for CYGWIN.
- * libc/include/sys/unistd.h: add prototypes for getpgid, setpgrp,
- vhangup and remove duplicate sysconf prototype.
-
-2001-02-07 Jeff Johnston <jjohnstn@redhat.com>
-
- * libc/sys/rtems/sys/types.h: Removed.
-
-2001-02-05 Charles Wilson <cwilson@ece.gatech.edu>
-
- * libc/include/locale.h: add LC_MESSAGES definition
-
-2001-02-01 Alexandre Oliva <aoliva@redhat.com>
-
- * libc/sys/sh/sys/syscall.h (SYS_get_argc, SYS_get_argN_len,
- SYS_get_argN):
- * libc/sys/sh/syscalls.c (__setup_argv_for_main,
- __setup_argv_and_call_main): New.
-
-2001-01-31 Jeff Johnston <jjohnstn@redhat.com>
-
- * libc/include/stdio.h (FILENAME_MAX): Changed to use __FILENAME_MAX__
- if defined.
- (FOPEN_MAX): Changed to use __FOPEN_MAX__ if defined.
- (L_tmpnam): Changed to use __L_tmpnam__ if defined.
- * libc/include/sys/config.h: Changed to set __FILENAME_MAX__
- appropriately for Cygwin and RTEMS so not to exceed PATH_MAX.
-
-Mon Jan 29 23:03:06 2001 Christopher Faylor <cgf@cygnus.com>
-
- * libc/stdlib/mallocr.c: Undefine windows preprocessor variables when
- compiling under Cygwin.
-
-2001-01-29 Jeff Johnston <jjohnstn@redhat.com>
-
- * libc/include/math.h (signgam): Change to errno-like solution
- using a function to return the address of the real signgam.
- * libc/reent/signgam.c: New file containing __signgam().
- * libc/reent/Makefile.am: Added signgam.c to list of files.
- * libc/reent/Makefile.in: Regenerated.
-
-2001-01-25 Alexandre Oliva <aoliva@redhat.com>
-
- * libc/sys/sh/syscalls.c (_times): New.
-
- * configure.host (sh*-*-*): Add -DHAVE_GETTIMEOFDAY to newlib_cflags.
- * libc/sys/sh/syscalls.c (_gettimeofday): New.
-
-2001-01-23 Jeff Johnston <jjohnstn@redhat.com>
-
- * libc/include/math.h (signgam): Regress previous fix as
- it does not handle programs with extern int signgam in them.
-
-2001-01-23 Jeff Johnston <jjohnstn@redhat.com>
-
- * libc/include/math.h (signgam): Changed to a macro refering to
- its location in the reentrant structure.
-
-2001-01-23 Jeff Johnston <jjohnstn@redhat.com>
-
- * libc/stdio/vfprintf.c (_VFPRINTF_R): Modification to fix
- that suppressed . for %.0f, 0.1. Check now looks if there
- are padding zeroes (expt) in addition to any digits (ndig) to
- print.
-
-2001-01-18 Jeff Johnston <jjohnstn@redhat.com>
-
- * libc/sys/arc/Makefile.am: New file.
- * libc/sys/arc/Makefile.in: Ditto.
- * libc/sys/arc/aclocal.m4: Ditto.
- * libc/sys/arc/configure: Ditto.
- * libc/sys/arc/configure.in: Ditto.
- * libc/sys/arc/crt0.S: Ditto.
- * libc/sys/arc/isatty.c: Ditto.
- * libc/sys/arc/mem-layout.c: Ditto.
- * libc/sys/arc/sbrk.c: Ditto.
- * libc/sys/arc/syscalls.c: Ditto.
- * libc/sys/arc/sys/syscall.h: Ditto.
-
-Wed Jan 17 23:20:56 2001 Christopher Faylor <cgf@cygnus.com>
-
- * libc/include/sys/unistd.h: Use correct declaration for setdtablesize.
-
-Fri Jan 12 00:34:31 2001 Christopher Faylor <cgf@cygnus.com>
-
- * libc/include/sys/signal.h: Add some SA_* defines for Cygwin.
-
-Thu Jan 11 20:42:06 2001 Earnie Boyd <earnie_boyd@yahoo.com>
-
- * libc/include/sys/features.h: __CYGWIN__ preferred over __CYGWIN32__
-
-2001-01-09 Nick Clifton <nickc@redhat.com>
-
- * configure.host (v859): Remove unsupported compiler options.
-
-Fri Jan 5 19:57:00 EST 2001 Aaron J. Grier <aaron@frye.com>
-
- * src/newlib/configure.host (*-*-rtems*): add printf long long
- support for RTEMS.
-
-2000-12-19 Graham Stott <grahams@redhat.com>
-
- * libc/machine/xscale/memcmp.c (memcmp): Add clobber for "lr".
-
-Wed Dec 14 Jeff Johnston <jjohnstn@redhat.com>
-
- * configure.host: Turn on long double I/O for Cygwin.
-
-Wed Dec 14 Jeff Johnston <jjohnstn@redhat.com>
-
- * MAINTAINERS: Removed Ranjith.
- * NEWS: Updated for 1.9.0.
- * README: Updated.
- * acinclude.m4: Updated to release 1.9.0.
- * aclocal.m4 configure
- doc/aclocal.m4 doc/configure libc/aclocal.m4 libc/configure
- libc/machine/aclocal.m4 libc/machine/configure
- libc/machine/a29k/aclocal.m4 libc/machine/a29k/configure
- libc/machine/arm/aclocal.m4 libc/machine/arm/configure
- libc/machine/d10v/aclocal.m4 libc/machine/d10v/configure
- libc/machine/d30v/aclocal.m4 libc/machine/d30v/configure
- libc/machine/fr30/aclocal.m4 libc/machine/fr30/configure
- libc/machine/h8300/aclocal.m4 libc/machine/h8300/configure
- libc/machine/h8500/aclocal.m4 libc/machine/h8500/configure
- libc/machine/hppa/aclocal.m4 libc/machine/hppa/configure
- libc/machine/i386/aclocal.m4 libc/machine/i386/configure
- libc/machine/i960/aclocal.m4 libc/machine/i960/configure
- libc/machine/m32r/aclocal.m4 libc/machine/m32r/configure
- libc/machine/m68k/aclocal.m4 libc/machine/m68k/configure
- libc/machine/m88k/aclocal.m4 libc/machine/m88k/configure
- libc/machine/mips/aclocal.m4 libc/machine/mips/configure
- libc/machine/mn10200/aclocal.m4 libc/machine/mn10200/configure
- libc/machine/mn10300/aclocal.m4 libc/machine/mn10300/configure
- libc/machine/necv70/aclocal.m4 libc/machine/necv70/configure
- libc/machine/powerpc/aclocal.m4 libc/machine/powerpc/configure
- libc/machine/sh/aclocal.m4 libc/machine/sh/configure
- libc/machine/sparc/aclocal.m4 libc/machine/sparc/configure
- libc/machine/tic80/aclocal.m4 libc/machine/tic80/configure
- libc/machine/v850/aclocal.m4 libc/machine/v850/configure
- libc/machine/w65/aclocal.m4 libc/machine/w65/configure
- libc/machine/xscale/aclocal.m4 libc/machine/xscale/configure
- libc/machine/z8k/aclocal.m4 libc/machine/z8k/configure
- libc/sys/aclocal.m4 libc/sys/configure
- libc/sys/a29khif/aclocal.m4 libc/sys/a29khif/configure
- libc/sys/arm/aclocal.m4 libc/sys/arm/configure
- libc/sys/cygwin/aclocal.m4 libc/sys/cygwin/configure
- libc/sys/d10v/aclocal.m4 libc/sys/d10v/configure
- libc/sys/decstation/aclocal.m4 libc/sys/decstation/configure
- libc/sys/go32/aclocal.m4 libc/sys/go32/configure
- libc/sys/h8300hms/aclocal.m4 libc/sys/h8300hms/configure
- libc/sys/h8500hms/aclocal.m4 libc/sys/h8500hms/configure
- libc/sys/linux/aclocal.m4 libc/sys/linux/configure
- libc/sys/m88kbug/aclocal.m4 libc/sys/m88kbug/configure
- libc/sys/netware/aclocal.m4 libc/sys/netware/configure
- libc/sys/rtems/aclocal.m4 libc/sys/rtems/configure
- libc/sys/sh/aclocal.m4 libc/sys/sh/configure
- libc/sys/sparc64/aclocal.m4 libc/sys/sparc64/configure
- libc/sys/sun4/aclocal.m4 libc/sys/sun4/configure
- libc/sys/sysmec/aclocal.m4 libc/sys/sysmec/configure
- libc/sys/sysnec810/aclocal.m4 libc/sys/sysnec810/configure
- libc/sys/sysnecv850/aclocal.m4 libc/sys/sysnecv850/configure
- libc/sys/sysvi386/aclocal.m4 libc/sys/sysvi386/configure
- libc/sys/sysvnecv70/aclocal.m4 libc/sys/sysvnecv70/configure
- libc/sys/tic80/aclocal.m4 libc/sys/tic80/configure
- libc/sys/w65/aclocal.m4 libc/sys/w65/configure
- libc/sys/z8ksim/aclocal.m4 libc/sys/z8ksim/configure
- libm/aclocal.m4 libm/configure: Regenerated.
-
-Wed Dec 13 11:52:00 2000 Corinna Vinschen <vinschen@cygnus.com>
-
- * libc/include/sys/unistd.h: Add declarations for `chroot' and `getwd'
- when __CYGWIN__ is defined.
-
-2000-12-13 Jeff Johnston <jjohnstn@redhat.com>
-
- * libc/stdlib/ldtoa.c (_ldcheck): New routine
- that categorizes a long double as NaN, Infinity, or other.
- * libc/stdio/vfprintf.c [WANT_IO_LONG_DBL](_VFPRINTF_R): Removed
- isinfl and isnanl static routines which were i386-specific. Changed
- calls to the two removed routines to a single _ldcheck call.
- * libc/stdio/vfieeefp.h (ldieee): Fixed missing semi-colons.
-
-2000-12-13 Jeff Johnston <jjohnstn@redhat.com>
-
- * Makefile.am: Fixed install-data-local target to use
- $(mkinstalldirs) for the installed header files to ensure
- the directories exist before copying.
- * Makefile.in: Regenerated.
-
-2000-12-12 Jeff Johnston <jjohnstn@redhat.com>
-
- * libc/include/sys/unistd.h: Restored Cygwin _SC
- constants and moved new constants appropriately
- so Cygwin will build.
-
-2000-12-11 Joel Sherrill <joel@OARcorp.com>
-
- * Merge RTEMS specific .h files into main libc/include.
- * libc/sys/rtems/include/signal.h: Removed.
- * libc/sys/rtems/include/time.h: Removed.
- * libc/sys/rtems/sys/features.h: Removed.
- * libc/sys/rtems/sys/sched.h: Removed.
- * libc/sys/rtems/sys/siginfo.h: Removed.
- * libc/sys/rtems/sys/signal.h: Removed.
- * libc/sys/rtems/sys/time.h: Removed.
- * libc/sys/rtems/sys/times.h: Removed.
- definitions for time_t and clock_t since these are
- no longer in time.h.
- * libc/include/pthread.h: New file.
- * libc/include/sys/sched.h: New file.
- * libc/include/sys/features.h: New file.
- * libc/include/time.h: Removed duplicate definition of clock_t
- and time_t, get them from <sys/types.h> instead. Add prototypes
- for POSIX clock and timer functionality.
- * libc/sys/linux/sys/types.h: Changed to include
- * libc/include/machine/types.h: Add _CLOCKID_T_ and _TIMER_T_.
- * libc/include/sys/signal.h: Add more complete set of POSIX
- signal functionality including real-time and threaded signals.
- * libc/include/sys/types.h: Add clock_t, time_t, struct
- timespec, and struct itimerspec. Centralizing these makes
- things cleaner. RTEMS uses 64-bit dev_t.
- Added numerous primitive definitions
- for pthreads including macros, pthread_attr_t,
- pthread_mutexattr_t, pthread_condattr_t, pthread_key_t,
- pthread_once_t, and pthread_t.
- * libc/include/sys/unistd.h: Added getlogin_r() prototype.
- If RTEMS follow POSIX on read(), write() and sbrk() prototype.
- Feature flags removed and moved to new file <sys/features.h>.
- Full set of POSIX sysconf() constants
-
-2000-12-08 Werner Almesberger <Werner.Almesberger@epfl.ch>
-
- * configure.host: Added x86 linux target.
- * libc/unix/getpass.c (_PATH_PASSWD, _PASSWORD_LEN): Default
- definitions provided if not already defined.
- * libc/sys/linux/crt0.c: New file.
- * libc/sys/linux/Makefile.am: Ditto.
- * libc/sys/linux/Makefile.in: Ditto.
- * libc/sys/linux/aclocal.m4: Ditto.
- * libc/sys/linux/brk.c: Ditto.
- * libc/sys/linux/configure: Ditto.
- * libc/sys/linux/configure.in: Ditto.
- * libc/sys/linux/getoptlong.c: Ditto.
- * libc/sys/linux/ids.c: Ditto.
- * libc/sys/linux/inode.c: Ditto.
- * libc/sys/linux/io.c: Ditto.
- * libc/sys/linux/linux.c: Ditto.
- * libc/sys/linux/process.c: Ditto.
- * libc/sys/linux/realpath.c: Ditto.
- * libc/sys/linux/select.c: Ditto.
- * libc/sys/linux/signal.c: Ditto.
- * libc/sys/linux/systat.c: Ditto.
- * libc/sys/linux/termios.c: Ditto.
- * libc/sys/linux/time.c: Ditto.
- * libc/sys/linux/wait.c: Ditto.
- * libc/sys/linux/include/alloca.h: Ditto.
- * libc/sys/linux/include/getopt.h: Ditto.
- * libc/sys/linux/include/stdint.h: Ditto.
- * libc/sys/linux/include/unistd.h: Ditto.
- * libc/sys/linux/sys/cdefs.h: Ditto.
- * libc/sys/linux/sys/dirent.h: Ditto.
- * libc/sys/linux/sys/errno.h: Ditto.
- * libc/sys/linux/sys/fcntl.h: Ditto.
- * libc/sys/linux/sys/file.h: Ditto.
- * libc/sys/linux/sys/ioctl.h: Ditto.
- * libc/sys/linux/sys/resource.h: Ditto.
- * libc/sys/linux/sys/signal.h: Ditto.
- * libc/sys/linux/sys/stat.h: Ditto.
- * libc/sys/linux/sys/syscall.h: Ditto.
- * libc/sys/linux/sys/termios.h: Ditto.
- * libc/sys/linux/sys/time.h: Ditto.
- * libc/sys/linux/sys/types.h: Ditto.
- * libc/sys/linux/sys/utmp.h: Ditto.
- * libc/sys/linux/sys/utsname.h: Ditto.
- * libc/sys/linux/sys/wait.h: Ditto.
-
-2000-12-08 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
-
- * Makefile.am: $(INSTALL), $(INSTALL_DATA), and $(INSTALL_PROGRAM)
- can be a relative path to $(top_srcdir)/install.sh so ensure the
- autoconf detected settings are properly passed recursively.
- Similarly, add AM_MAKEFLAGS to FLAGS_TO_PASS so they also get passed
- properly to subdirectories.
- * Makefile.in: Regenerated.
-
-2000-12-07 Jay Kulpinski <jskulpin@eng01.gdds.com>
-
- * libc/stdio/vfprintf.c: Minor modification to avoid requiring
- a floating point register unless really printing a floating
- point number.
-
-2000-12-07 Jeff Johnston <jjohnstn@redhat.com>
-
- * libc/stdlib/ldtoa.c: Removed include of alloca.h.
- Also removed \r's.
- (asctoeg): Replaced alloca call with stack array and malloc
- when storage exceeds reasonable limit.
- (e53toe): Fixed einfin calls missing ldp parameter.
- (eiisinf): Hide behind check for LDBL_MANT_DIG == 64.
-
-2000-12-06 Jeff Johnston <jjohnstn@redhat.com>
-
-
- * libc/stdio/vfscanf.c: Fix typo for _NO_LONGDBL macro.
-
-2000-12-06 Jeff Johnston <jjohnstn@redhat.com>
-
- * libc/stdlib/Makefile.am: Added ldtoa.c to list of sources.
- * libc/stdlib/Makefile.in: Regenerated.
- * libc/stdio/floatio.h: Added suitable MAXEXP for long double.
- * libc/stdio/vfieeefp.h: Added long double bit structures.
- * libc/stdio/vfprintf.c[WANT_IO_LONG_DBL]: Added long double support.
- [WANT_IO_LONG_DBL](isinfl, isnanl): New static long double routines.
- (exponent): Changed expbuf to reasonable maximum instead of MAXEXP.
- * libc/stdio/vfscanf.c[WANT_IO_LONG_DBL]: Added long double support.
- * libc/stdlib/ldtoa.c: New file containing _ldtoa_r and
- _strtold routines used for conversions between character
- and long double.
-
-Wed Dec 6 12:01:00 2000 Corinna Vinschen <vinschen@cygnus.com>
-
- * libc/include/stdlib.h: Add declarations for `mkstemp' and `mktemp'.
-
-2000-12-04 Joel Sherrill <joel@OARcorp.com>
-
- * libc/include/machine/time.h: RTEMS systems can configure clock
- tick rate so use sysconf() to ask.
-
-2000-12-04 Joel Sherrill <joel@OARcorp.com>
-
- * libc/include/sys/times.h: Add reference to POSIX standard.
-
-2000-12-04 Joel Sherrill <joel@OARcorp.com>
-
- * libc/include/sys/time.h: Added BSD timer manipulation macros
- used by RTEMS code.
-
-2000-12-04 Joel Sherrill <joel@OARcorp.com>
-
- * libc/sys/rtems/crt0.c: Add stubs for functions implicitly
- referenced by code generated by gcc 2.8.1.
- (a29k): Add stubs for V_SPILL, V_FILL, V_BSD_OS, V_EPI_OS to
- satisfy gcc.
-
-2000-12-04 Joel Sherrill <joel@OARcorp.com>
-
- * libc/stdlib/system.c: Avoid compiling do_system() for RTEMS.
-
-2000-12-04 Joel Sherrill <joel@OARcorp.com>
-
- * libc/include/ieeefp.h: Added entries for OpenCores CPUs.
-
-2000-12-04 Joel Sherrill <joel@OARcorp.com>
-
- * configure.host (or16, or32): New entries for OpenCores
- OpenRisc CPUs.
- (*-*-rtems*): Add -DNO_EXEC.
-
-2000-12-04 Keith Outwater <vac4050@cae597.rsc.raytheon.com>
-
- * libc/include/sys/errno.h: Added comments on many error numbers.
- * libc/string/strerror.c: Added some more strings.
-
-2000-11-30 Jeff Johnston <jjohnstn@redhat.com>
-
- * libc/sys/sh/syscalls.c (_link): New stub.
-
-2000-11-29 Nick Clifton <nickc@redhat.com>
-
- * configure.host: Add xscale target.
- * libc/machine/xscale: New directory.
- * libc/machine/xscale/Makefile.am: New file.
- * libc/machine/xscale/Makefile.in: New file.
- * libc/machine/xscale/aclocal.m4: New file.
- * libc/machine/xscale/configure: New file.
- * libc/machine/xscale/configure.in: New file.
- * libc/machine/xscale/memchr.S: New file.
- * libc/machine/xscale/memcmp.S: New file.
- * libc/machine/xscale/memcpy.S: New file.
- * libc/machine/xscale/memmove.S: New file.
- * libc/machine/xscale/memset.S: New file.
- * libc/machine/xscale/strchr.S: New file.
- * libc/machine/xscale/strcmp.S: New file.
- * libc/machine/xscale/strcpy.S: New file.
- * libc/machine/xscale/strlen.S: New file.
-
-Sat Nov 25 11:24:00 2000 Corinna Vinschen <vinschen@cygnus.com>
-
- * libc/include/sys/types.h: Change i to `__i' in FD_ZERO macro to
- avoid compiler warnings.
-
-2000-11-22 Michael Meissner <meissner@redhat.com>
-
- * libc/posix/execl.c (execl): Don't reference environ directly,
- reference it only via a static pointer to avoid problems with some
- shared library systems and with different uses of small data where
- the user specifies his own version of environ.
- * libc/posix/execv.c (execv): Ditto.
- * libc/stdlib/getenv_r.c (_findenv_r): Ditto.
- * libc/stdlib/setenv_r.c (_setenv_r,_unsetenv_r): Ditto.
- * libc/stdlib/system.c (system, !cygwin32 case): Ditto.
-
- * libc/stdlib/getenv.c (environ): Delete unused reference to
- environ.
-
- * libc/stdlib/getenv_r.c: Make initial comment friendlier to emacs
- colorization.
- * libc/stdlib/system.c: Ditto.
-
-Tue Nov 21 20:32:21 2000 Christopher Faylor <cgf@cygnus.com>
-
- * libc/sys/cygwin/sys/dirent.h: Change definition to avoid necessity of
- including windows headers.
-
-2000-11-20 Jeff Johnston <jjohnstn@redhat.com>
-
- * libc/include/sys/unistd.h: Removed definition of MAXNAMLEN.
- * libc/include/dirent.h: Added definition of MAXNAMLEN if
- not defined by sys/dirent.h.
- * libc/posix/execvp.c: Added include of dirent.h to get
- MAXNAMLEN value which used to be in unistd.h.
-
-Mon Nov 6 12:56:00 2000 Corinna Vinschen <vinschen@cygnus.com>
-
- * libc/include/sys/types.h: Change type of i to `size_t' in
- FD_ZERO macro to avoid compiler warnings.
-
-Sun Oct 29 20:06:41 2000 Christopher Faylor <cgf@cygnus.com>
-
- * libc/include/stdlib.h: Avoid declaring cfree under Cygwin.
- * libc/include/malloc.h: Ditto. Also remove obsolete declaration.
-
-Tue Oct 24 20:16:00 2000 Corinna Vinschen <vinschen@cygnus.com>
-
- * libc/include/sys/unistd.h: Add defines for sysconf values
- _SC_NPROCESSORS_CONF, _SC_NPROCESSORS_ONLN, _SC_PHYS_PAGES and
- _SC_AVPHYS_PAGES.
-
-Mon Oct 9 20:26:33 2000 Christopher Faylor <cgf@cygnus.com>
-
- * libc/include/sys/unistd.h: Add getdtablesize and setdtablesize
- declarations for __CYGWIN__.
-
-2000-09-19 Geoffrey Keating <geoffk@cygnus.com>
-
- * libc/signal/signal.c (__sigtramp_r): ISO C requires
- case labels to be integral constant expressions, so
- use an if/else tree instead.
- (_raise_r): Likewise.
-
-2000-09-13 Jeff Johnston <jjohnstn@redhat.com>
-
- * libc/machine/v850/setjmp.S: Fixed tab problems caused by
- clipping patch from e-mail reader.
-
-2000-09-13 Will Cohen <wcohen@redhat.com>
-
- * libc/machine/v850/setjmp.S (_setjmp): Save r1 rather than r0.
- Added return value 0.
- (_longjmp): Allow longjmp to return value of second argument
- passed to it.
-
-2000-09-06 Jeff Johnston <jjohnstn@redhat.com>
-
- * libc/include/sys/types.h (FD_ZERO): Remove call to bzero and
- inline code to prevent having to include another header file.
-
-Wed Sep 6 15:06:40 2000 Christopher Faylor <cgf@cygnus.com>
-
- * Makefile.am: Fix space vs. tab problem in install-data-local.
- * Makefile.in: Regenerate.
-
-Wed Sep 6 13:49:51 2000 Christopher Faylor <cgf@cygnus.com>
-
- * libc/include/_ansi.h (_EXFUN): Define specially for __CYGWIN__.
- (_EXPARM): New macro for defining a function parameter.
- * libc/include/stdlib.h: Use _EXPARM.
- * libc/stdlib/mallocr.c: Don't build cfree for Cygwin.
-
-2000-09-05 Manfred Hollstein <manfredh@redhat.com>
-
- * Makefile.am (install-data-local): Use optional $(DESTDIR) where
- required, as documented in the gnu coding standards.
- * Makefile.in: Regenerate.
-
-2000-09-05 Jeff Johnston <jjohnstn@redhat.com>
-
- * libc/include/fcntl.h (_FNDELAY): Changed to be _FNONBLOCK to
- make O_NDELAY and O_NONBLOCK have the same value.
-
-2000-08-30 Kazu Hirata <kazu@hxi.com>
-
- * libc/sys/h8300hms/crt0.S: Optimize for both speed and code size.
-
-2000-08-30 Werner Almesberger <Werner.Almesberger@epfl.ch>
-
- * libc/posix/execve.c: included unistd.h for "_execve" prototype.
- * libc/misc/unctrl.c libc/sys/sysvi386/crt0.c (sccsid): changed
- "#ifndef lint" to "#if defined(LIBC_SCCS) && !defined(lint)" like
- everywhere else.
-
-2000-08-30 Geoffrey Keating <geoffk@cygnus.com>
-
- * libc/string/swab.c: Specify that it's defined in <unistd.h>.
- * libc/include/string.h: Don't include <sys/types.h>,
- as it causes really bad namespace pollution. Don't declare
- swab(), it is properly declared in unistd.h.
-
-2000-08-29 Werner Almesberger <Werner.Almesberger@epfl.ch>
-
- * libc/unix/getpwent.c (getpwnam, getpwuid, getpwent): removed
- (broken) support for non-existent /etc/passwd field "comment".
-
-2000-08-27 Werner Almesberger <Werner.Almesberger@epfl.ch>
-
- * libc/posix/scandir.c (DIRSIZ, scandir): use struct dirent.d_namlen
- only if _DIRENT_HAVE_D_NAMLEN is defined.
- (alphasort): aligned prototype with
- libc/sys/cygwin/sys/dirent.h and simplified function body.
- * libc/posix/telldir.c (telldir): changed "telldir" prototype to
- long telldir (DIR *) as mentioned in annex B of POSIX.1
-
-2000-08-27 Werner Almesberger <Werner.Almesberger@epfl.ch>
-
- * libc/machine/i386/i386mach.h: added SOTYPE_FUNCTION to set type
- of global entry points if _I386MACH_NEED_SOTYPE_FUNCTION is defined;
- Added __CLI and __STI macros (controlled via
- _I386MACH_ALLOW_HW_INTERRUPTS macro).
- * libc/machine/i386/f_atan2.S libc/machine/i386/f_atan2f.S
- libc/machine/i386/f_frexp.S libc/machine/i386/f_frexpf.S
- libc/machine/i386/f_ldexp.S libc/machine/i386/f_ldexpf.S
- libc/machine/i386/f_log.S libc/machine/i386/f_log10.S
- libc/machine/i386/f_log10f.S libc/machine/i386/f_logf.S
- libc/machine/i386/f_tan.S libc/machine/i386/f_tanf.S
- libc/machine/i386/memchr.S libc/machine/i386/memcmp.S
- libc/machine/i386/memcpy.S libc/machine/i386/memmove.S
- libc/machine/i386/memset.S libc/machine/i386/setjmp.S
- libc/machine/i386/strchr.S libc/machine/i386/strlen.S:
- (that's libc/machine/i386/*.S) added SOTYPE_FUNCTION(symbol)
- for all global entry points.
- * libc/machine/i386/setjmp.S: removed code replicated in
- libc/machine/i386/i386mach.h and included i386mach.h instead;
- Use __CLI and __STI instead of cli and sti.
-
-2000-08-25 DJ Delorie <dj@redhat.com>
-
- * libc/include/sys/unistd.h (environ): this one isn't from the
- DLL, no __IMPORT
-
-Fri Aug 25 13:37:11 2000 Christopher Faylor <cgf@cygnus.com>
-
- * libc/stdlib/system.c (do_system): Eliminate explicit declaration of
- environ when compiling under cygwin since it is already declared in
- unistd.h.
-
-2000-08-23 Werner Almesberger <Werner.Almesberger@epfl.ch>
-
- * libc/stdlib/mprec.c (ulp, b2d, d2b): changed a few expressions
- like x << y-z to the equivalent x << (y-z).
- (d2b): changed if statements with assignment to perform the
- assignment prior to the if check.
- * libc/reent/reent.c: included stdlib.h for "_free_r" prototype.
- * libc/unix/getpass.c (getpass): moved "echo" assignment out of if.
- * libc/unix/ttyname.c: included string.h for "strcpy" prototype.
- * libc/unix/getcwd.c (ISDOT): added parentheses to clarify && and ||
- precedence.
- * libc/include/sys/unistd.h: added "vfork" prototype (for popen.c).
- Added "_execve" prototype (for execl.c, execle.c, execv.c, and
- execve.c).
- * libc/posix/popen.c (popen): added parentheses to clarify && and ||
- precedence.
- * libm/math/e_cosh.c (__ieee754_cosh): changed parentheses to
- clarify && and || precendence (and to remove pascalism).
- * libm/math/e_sinh.c (__ieee754_sinh): Ditto.
- * libm/math/s_infconst.c: added another pair of braces to all
- initializers for __infinity (need three: for __infinity[1] array,
- for union __dmath, and for i[2]).
-
-2000-08-23 Werner Almesberger <Werner.Almesberger@epfl.ch>
-
- * libc/stdlib/abort.c: changed description: uses "raise" instead of
- "getpid" and "kill"; added: uses "write" and "_exit".
- Also included unistd.h for "_exit" prototype.
- * libc/stdlib/system.c: included unistd.h for "execve" prototype,
- reent.h for "_fork_r" and "_wait_r" prototypes.
- (do_system): changed extern char *environ[] to POSIX-friendly
- extern char **environ.
- * libc/stdlib/wctomb_r.c: included string.h for "strlen" and "strcmp"
- prototypes.
- * libc/stdlib/remove.c: included reent.h for "_unlink_r" prototype.
- * libc/reent/execr.c: included sys/wait.h for "wait" prototype.
- * libc/reent/fstatr.c: included sys/stat.h for "fstat" prototype.
- * libc/reent/openr.c: included fcntl.h for "open" prototype.
- * libc/reent/signalr.c: included signal.h for "kill" prototype,
- unistd.h for "getpid" prototype.
- * libc/reent/statr.c: included sys/stat.h for "stat" prototype.
- * libc/reent/timer.c: included sys/time.h for "gettimeofday" prototype.
- * libc/unix/getut.c (utmpname): removed local, incorrect "strdup"
- prototype. Also included stdlib.h for "abort", string.h for
- "strdup" and "strncmp" prototypes.
- * libc/unix/getlogin.c: included string.h for "strncmp", "memset", and
- "strncpy", unistd.h for "read" and "close" prototypes.
- * libc/posix/execvp.c: included string.h for "strchr", "strlen", and
- "strcat" prototypes.
-
-2000-08-23 Werner Almesberger <Wernen Almesberger@epfl.ch>
-
- * libc/stdio/stdio.c (__swrite): declare "oldmode" only if it's
- used later (ifdef __SCLE)
- * libc/stdio/vfscanf.c (__svfscanf): declare "state" only if it's
- used later (ifdef MB_CAPABLE)
- * libc/string/memset.c (memset): removed unused variables "count"
- and "unaligned_addr"
- * libc/locale/locale.c (_setlocale_r): declare "lc_ctype" and
- "last_lc_ctype" only of they're used later (ifdef MB_CAPABLE)
- * libc/unix/getpwent.c (getpwnam): removed unused variables "uid"
- and "gid"
-
-2000-08-23 Werner Almesberger <Werner.Almesberger@epfl.ch>
-
- * libc/stdlib/envlock.c: changed documented "__env_lock" and
- "__env_unlock" prototype from "void *" or "char *" to
- "struct _reent *" to match real function. Also added include
- of envlock.h.
- * libc/stdlib/mlock.c: changed documented "__malloc_lock" and
- "__malloc_unlock" prototype from "void *" or "char *" to
- "struct _reent *" to match real function.
- * libc/stdlib/envlock.h: added "__env_lock" and "__env_unlock"
- prototypes (for getenv_r.c and setenv_r.c).
-
-2000-08-22 Werner Almesberger <Werner.Almesberger@epfl.ch>
-
- * libc/unix/getut.c (utmpname): added _CONST to reflect common use
- and prototype in cygwin's utmp.h
-
-2000-08-16 Eric Fifer <efifer@sanwaint.com>
-
- * libc/stdio/vfprintf.c (_vfprintf_r): suppress . with "%.0f", 0.1
-
-2000-08-09 Nick Clifton <nickc@cygnus.com>
-
- * libc/sys/arm/setjmp.S: Recode to clean up function prologues and
- epilogue and to allow the functions to be used in a Thumb based
- toolchain.
-
-2000-08-08 Jeff Johnston <jjohnstn@redhat.com>
-
- * libc/stdio/snprintf.c (snprintf, _snprintf_r): Fixed code
- so size of 0 results in nothing being written to string.
- Also fixed code so that when size is non-zero, there is only
- a maximum of size - 1 characters written to the array and
- a nul terminator is appended at the end.
- * libc/stdio/vsnprintf.c (vsnprintf, _vsnprintf_r): Ditto.
-
-2000-08-01 DJ Delorie <dj@redhat.com>
-
- * libc/include/sys/config.h: define __IMPORT appropriately
- * libc/include/ctype.h (_ctype_): use __IMPORT
- * libc/include/math.h (__infinity, signam, _LIB_VERSION): ditto
- * libc/include/math.h (__mb_cur_max): ditto
- * libc/include/time.h (_timezone, _daylight, _tzname): ditto
- * libc/include/unctrl.h (__unctrl, __unctrllen): ditto
- * libc/include/errno.h (_sys_errlist, _sys_nerr): ditto
- * libc/include/unistd.h (environ): ditto
-
-2000-07-28 Michael Meissner <meissner@redhat.com>
-
- * libc/include/math.h (__infinity): Declare as an array without
- bounds to get around small data support. Rewrite Cygwin support
- to be more general.
- * libm/math/s_infconst.c (__infinity): Ditto.
- * libm/mathfp/s_infconst.c (__infinity): Ditto.
-
-Thu Jul 27 10:46:01 2000 Christopher Faylor <cgf@cygnus.com>
-
- * libc/include/math.h: Use appropriate dll import linkage for
- __infinity under Cygwin.
-
-2000-07-13 DJ Delorie <dj@cygnus.com>
-
- * libc/stdio/vfprintf.c: pad 0.0 correctly with %e
-
-Wed Jun 28 14:08:00 2000 Keith Walker <keith.walker@arm.com>
-
- * libc/sys/arm/crt0.S (.LC30): Added missing length parameter
- to argument list for AngelSWI_Reason_GetCmdLine.
-
-Tue Jun 27 15:49:00 2000 Marek Michalkiewicz <marekm@linux.org.pl>
-
- * configure.host: Add support for AVR target.
- * libc/include/machine/ieeefp.h: Likewise.
- * libc/include/sys/config.h: Likewise.
-
-Thu Jun 22 18:35:00 2000 Ranjith Kumaran <ranjith@cygnus.com>
-
- * README: Newlib 1.8.2 must be built in a separate directory
- than the sources.
-
-Tue Jun 20 14:30:00 2000 Jeff Johnston <jjohnstn@cygnus.com>
-
- * libc/include/sys/reent.h (_rand_next): Added __extension__
- qualifier as long long type is not strict ANSI.
- * libc/stdlib/rand.c (rand): Added __extension__ qualifier
- to long long constant.
-
-Fri Jun 16 23:02:00 2000 Corinna Vinschen <corinna@vinschen.de>
-
- * libc/include/sys/unistd.h: Add prototypes for `seteuid' and
- `setegid' provided by Cygwin.
-
-Thu Jun 15 0:21:00 2000 Corinna Vinschen <corinna@vinschen.de>
-
- * libc/stdio/fdopen.c: Take explicit given bin/textmode into
- account for Cygwin.
-
-Fri Jun 9 14:28:00 2000 Jeff Johnston <jjohnstn@cygnus.com>
-
- * libc/include/sys/reent.h (_rand_next): Changed to
- unsigned long long and moved to end of _reent struct in _new union.
- (_REENT_INIT): Changed to move _rand_next initialization.
- * libc/stdlib/rand.c (rand): Changed to use unsigned long long
- linear congruential algorithm that is used by DJGPP.
-
-Thu Jun 8 21:18:00 2000 Ranjith Kumaran <ranjith@cygnus.com>
-
- * libc/include/stdlib.h: Set RAND_MAX to __RAND_MAX.
- * libc/include/sys/config.h: Define __RAND_MAX.
-
-Thu Jun 8 17:54:00 2000 Jeff Johnston <jjohnstn@cygnus.com>
-
- * libc/stdlib/rand_r.c: New algorithm that meets minimal
- standard.
-
-Fri Jun 2 23:02:11 2000 Christopher Faylor <cgf@cygnus.com>
-
- * libc/include/string.h: Work around problem with strsignal and gdb.
-
-Tue May 30 13:13:01 2000 Christopher Faylor <cgf@cygnus.com>
-
- * libc/include/ctype.h: __CYGWIN32__ -> __CYGWIN__
- * libc/include/malloc.h: Ditto.
- * libc/include/process.h: Ditto.
- * libc/include/stdio.h: Ditto.
- * libc/include/stdlib.h: Ditto.
- * libc/include/time.h: Ditto.
- * libc/include/machine/setjmp.h: Ditto.
- * libc/include/sys/errno.h: Ditto.
- * libc/include/sys/signal.h: Ditto.
- * libc/include/sys/stat.h: Ditto.
- * libc/include/sys/time.h: Ditto.
- * libc/include/sys/unistd.h: Ditto.
- * libc/include/string.h: Ditto. strsignal should return a const char *.
-
-2000-05-26 Marek Michalkiewicz <marekm@linux.org.pl>
-
- * libm/common/s_expm1.c (expm1): Add curly braces, avoid warnings.
- * libm/common/s_log1p.c (log1p): Likewise.
- * libm/common/s_scalbn.c (scalbn): Likewise.
- * libm/math/e_log.c: Likewise.
- * libm/math/e_asin.c: Likewise.
- * libm/math/ef_asin.c: Likewise.
- * libm/math/e_j0.c (pzero, qzero): Remove redundant test.
- * libm/math/e_j1.c (pone, qone): Likewise.
- * libm/math/ef_j0.c (pzerof, qzerof): Likewise.
- * libm/math/ef_j1.c (ponef, qonef): Likewise.
- * libm/mathfp/e_j0.c (pzero, qzero): Likewise.
- * libm/mathfp/e_j1.c (pone, qone): Likewise.
- * libm/mathfp/ef_j0.c (pzerof, qzerof): Likewise.
- * libm/mathfp/ef_j1.c (ponef, qonef): Likewise.
-
-2000-05-19 DJ Delorie <dj@cygnus.com>
-
- * libc/stdio/stdio.c (__stextmode): new, see if file is text mode
- (__sread): always read in binary mode
- (__swrite): always write in binary mode
- * libc/include/stdio.h: no getc/putc macros for cygwin; causes
- compatibility issues with different dll versions
- * libc/stdio/fopen.c: use __stextmode
- * libc/stdio/fdopen.c: ditto
- * libc/stdio/freopen.c: ditto
- * libc/stdio/findfp.c: set up __SCLE for std{in,out,err}
- * libc/stdio/local.h: declare __stextmode
-
-2000-05-18 DJ Delorie <dj@cygnus.com>
-
- * libc/stdio/fgets.c (fgets): perform CRLF conversions if __SCLE
-
-Mon May 15 18:54:00 2000 Jeff Johnston <jjohnstn@cygnus.com>
-
- * libc/include/ctype.h: Changed tolower and toupper macros
- to use __extension__ to prevent pedantic warnings.
-
-Mon May 15 14:26:00 2000 Joel Sherrill <joel@oarcorp.com>
-
- * libc/sys/rtems/sys/time.h: Add macros for manipulating timeval
- structures.
-
-Wed May 10 19:24:53 2000 Jim Wilson <wilson@cygnus.com>
-
- * libc/include/machine/ieeefp.h: Add ia64 support.
- * configure.host: Likewise.
-
-Wed May 10 13:52:24 2000 Egor Duda <deo@logos-m.ru>
-
- * libc/time/asctime_r.c (asctime_r): Change output format. Day of
- month is now padded with space, not zero. This now conforms to
- ANSI standard.
-
-Wed May 03 17:57:00 2000 Corinna Vinschen <corinna@vinschen.de>
-
- * libc/include/sys/errno.h: Add define for ENOSHARE ("No such
- host or network path") used by cygwin. Add some comments.
-
-Tue May 02 23:45:48 2000 DJ Delorie <dj@cygnus.com>
-
- * libc/include/stdio.h (FILE): define __SCLE for "convert line
- endings" for Cygwin.
- (__sgetc): convert line endings if needed
- (__sputc): ditto
- * libc/stdio/fdopen.c (_fdopen_r): Remember if we opened in text mode
- * libc/stdio/fopen.c (_fopen_r): ditto
- * libc/stdio/freopen.c (freopen): ditto
- * libc/stdio/fread.c (fread): perform CRLF conversions if __SCLE
- * libc/stdio/fvwrite.c (__sfvwrite): ditto
-
-Thu Apr 27 07:45:48 2000 Alexandre Oliva <aoliva@cygnus.com>
-
- * libc/machine/mn10300/setjmp.S (setjmp, longjmp): Use
- post-increment when it is worth it, spacewise.
-
-Mon Apr 17 12:46:00 2000 Marek Michalkiewicz <marekm@linux.org.pl>
-
- * libc/signal/signal.c (_signal_r) : Removed unused local variable temp.
- * libc/stdio/findfp.c (std): Added declaration of flags and file.
- * libc/stdio/mktemp.c (_gettemp, _mkstemp_r, mkstemp): Added int
- return type.
- * libc/stdio/putchar.c (putchar): Added return statement.
- * libc/stdio/refill.c (lflush): Added correct parentheses.
- * libc/stdio/vfprintf.c (_VFPRINTF_R): Ditto.
- * libc/stdio/vfscanf.c (__svfscanf): Changed sprintf call which
- prints long value to use l qualifier.
- * libc/stdlib/dtoa.c (_dtoa_r): Added parentheses to remove warning
- messages and initialized local values: ilim, ilim1, and spec_case.
- * libc/stdlib/ecvtbuf.c (print_e): Removed unused variable dp.
- * libc/stdlib/mbctype.h (_issjis1, _issjis2): Added parentheses.
- * libc/stdlib/mprec.c: Ditto.
- * libc/stdlib/setenv_r.c: Ditto.
- * libc/stdlib/strtod.c: Ditto.
- * libc/stdlib/strtol.c: Ditto.
- * libc/stdlib/strtoul.c: Ditto.
- * libm/common/sf_expm1.c: Added curly braces to if else clauses.
- * libm/common/sf_log1p.c: Ditto.
- * libm/common/sf_scalbn.c: Ditto.
- * libm/math/ef_log.c: Ditto.
-
-Sun Apr 16 12:45:00 2000 Corinna Vinschen <corinna@vinschen.de>
-
- * libc/posix/execvp.c (execvp): Check path for
- trailing slash.
-
-Fri Mar 31 20:39:00 2000 Corinna Vinschen <corinna@vinschen.de>
-
- * libc/include/sys/unistd.h: Add prototypes for
- fchmod, fchown, lchown.
-
-Fri Mar 24 15:34:00 2000 Jeff Johnston <jjohnstn@cygnus.com>
-
- * acinclude.m4: Changed release to 1.8.2.
- * aclocal.m4 configure doc/aclocal.m4 doc/configure
- libc/aclocal.m4 libc/configure libc/machine/aclocal.m4
- libc/machine/configure libc/machine/a29k/aclocal.m4
- libc/machine/a29k/configure libc/machine/arm/aclocal.m4
- libc/machine/arm/configure libc/machine/d10v/aclocal.m4
- libc/machine/d10v/configure libc/machine/d30v/aclocal.m4
- libc/machine/d30v/configure libc/machine/fr30/aclocal.m4
- libc/machine/fr30/configure libc/machine/h8300/aclocal.m4
- libc/machine/h8300/configure libc/machine/h8500/aclocal.m4
- libc/machine/h8500/configure libc/machine/hppa/aclocal.m4
- libc/machine/hppa/configure libc/machine/i386/aclocal.m4
- libc/machine/i386/configure libc/machine/i960/aclocal.m4
- libc/machine/i960/configure libc/machine/m32r/aclocal.m4
- libc/machine/m32r/configure libc/machine/m68k/aclocal.m4
- libc/machine/m68k/configure libc/machine/m88k/aclocal.m4
- libc/machine/m88k/configure libc/machine/mips/aclocal.m4
- libc/machine/mips/configure libc/machine/mn10200/aclocal.m4
- libc/machine/mn10200/configure libc/machine/mn10300/aclocal.m4
- libc/machine/mn10300/configure libc/machine/necv70/aclocal.m4
- libc/machine/necv70/configure libc/machine/powerpc/aclocal.m4
- libc/machine/powerpc/configure libc/machine/sh/aclocal.m4
- libc/machine/sh/configure libc/machine/sparc/aclocal.m4
- libc/machine/sparc/configure libc/machine/tic80/aclocal.m4
- libc/machine/tic80/configure libc/machine/v850/aclocal.m4
- libc/machine/v850/configure libc/machine/w65/aclocal.m4
- libc/machine/w65/configure libc/machine/z8k/aclocal.m4
- libc/machine/z8k/configure libc/sys/aclocal.m4
- libc/sys/aclocal.m4 libc/sys/configure
- libc/sys/a29khif/aclocal.m4 libc/sys/a29khif/configure
- libc/sys/arm/aclocal.m4 libc/sys/arm/configure
- libc/sys/cygwin/aclocal.m4 libc/sys/cygwin/configure
- libc/sys/d10v/aclocal.m4 libc/sys/d10v/configure
- libc/sys/decstation/aclocal.m4 libc/sys/decstation/configure
- libc/sys/go32/aclocal.m4 libc/sys/go32/configure
- libc/sys/h8300hms/aclocal.m4 libc/sys/h8300hms/configure
- libc/sys/h8500hms/aclocal.m4 libc/sys/h8500hms/configure
- libc/sys/m88kbug/aclocal.m4 libc/sys/m88kbug/configure
- libc/sys/netware/aclocal.m4 libc/sys/netware/configure
- libc/sys/rtems/aclocal.m4 libc/sys/rtems/configure
- libc/sys/sh/aclocal.m4 libc/sys/sh/configure
- libc/sys/sparc64/aclocal.m4 libc/sys/sparc64/configure
- libc/sys/sun4/aclocal.m4 libc/sys/sun4/configure
- libc/sys/sysmec/aclocal.m4 libc/sys/sysmec/configure
- libc/sys/sysnec810/aclocal.m4 libc/sys/sysnec810/configure
- libc/sys/sysnecv850/aclocal.m4 libc/sys/sysnecv850/configure
- libc/sys/sysvi386/aclocal.m4 libc/sys/sysvi386/configure
- libc/sys/sysvnecv70/aclocal.m4 libc/sys/sysvnecv70/configure
- libc/sys/tic80/aclocal.m4 libc/sys/tic80/configure
- libc/sys/w65/aclocal.m4 libc/sys/w65/configure
- libc/sys/z8ksim/aclocal.m4 libc/sys/z8ksim/configure
- libm/aclocal.m4 libm/configure: Regenerated.
-
-2000-03-24 Nick Clifton <nickc@cygnus.com>
-
- * libc/sys/arm/syscalls.c: Fix compile time warnings.
- (do_AngelSWI): Add "cc" to list o registers clobbered.
-
-Thu Mar 22 14:57:00 2000 Fernando Nasser <fnasser@redhat.com>
-
- * libc/sys/arm/syscalls.c (do_AngelSWI): Prevent registers with valid
- information to be clobbered by an Angel C library support syscall.
-
-Tue Mar 21 19:08:00 2000 Jeff Johnston <jjohnstn@cygnus.com>
-
- * libc/stdlib/envlock.c: Fixed comment typo.
-
-Fri Mar 17 15:37:00 2000 Jeff Johnston <jjohnstn@cygnus.com>
-
- * libc/stdio/vfscanf.c (__svfscanf): Fixed floating point
- code to update nread as each character is processed instead
- of using buffer contents which throw away leading zeroes.
-
-Mon Mar 13 15:22:00 2000 Sergei Organov <osv@javad.ru>
-
- * libm/mathfp/sf_sqrt.c: Change _DOUBLE_IS_32BITS sqrt call to sqrtf.
-
-Fri Mar 10 16:09:20 2000 Jeff Johnston <jjohnstn@cygnus.com>
-
- * libc/include/string.h: Include <sys/types.h>.
-
-Fri Mar 10 14:53:50 2000 Alexandre Oliva <oliva@lsd.ic.unicamp.br>
-
- * libc/stdio/putw.c (putw): Return 0 on success, to be compliant
- with XSH5, not SVID.
-
-Thu Mar 9 17:20:41 2000 Jeff Johnston <jjohnstn@cygnus.com>
-
- * libc/include/string.h: Changed last argument back to ssize_t
- to make it compatible with XPG4 definition which is
- defined in <unistd.h>. There is a conflict in the SVID 3
- and XPG4 definitions and newlib will settle with XPG4.
- * libc/string/swab.c: Ditto.
-
-Wed Mar 8 17:11:41 2000 Jeff Johnston <jjohnstn@cygnus.com>
-
- * libc/include/string.h: Changed last argument to size_t.
- * libc/string/swab.c: Changed last argument to size_t.
-
-Wed Mar 8 00:46:41 2000 Alexandre Oliva <oliva@lsd.ic.unicamp.br>
-
- * libc/reent/Makefile.am (lib_a_SOURCES): Added unlinkr.c.
- (CHEWOUT_FILES): Added unlinkr.def.
- * libc/reent/Makefile.in: Rebuilt.
- * libc/sys.tex: Include unlinkr.def.
- * libc/reent/linkr.c (_unlink_r): Moved to...
- * libc/reent/unlinkr.c: ... new file.
-
-Wed Mar 8 00:43:07 2000 Alexandre Oliva <oliva@lsd.ic.unicamp.br>
-
- * libc/string/Makefile.am (lib_a_SOURCES): Added swab.c.
- (CHEWOUT_FILES): Added swab.def.
- * libc/string/Makefile.in: Rebuilt.
- * libc/string/string.tex: Include swab.def.
- * libc/include/string.h (swab): Declare.
- * libc/string/swab.c: New file.
-
-Wed Mar 8 00:38:35 2000 Alexandre Oliva <oliva@lsd.ic.unicamp.br>
-
- * libc/stdio/Makefile.am (lib_a_SOURCES): Added getw.c and putw.c.
- (CHEWOUT_FILES): Added getw.def and putw.def.
- * libc/stdio/Makefile.in: Rebuilt.
- * libc/stdio/stdio.tex: Include getw.def and putw.def.
- * libc/stdio/getw.c: New file.
- * libc/stdio/putw.c: New file.
-
-Fri Feb 25 14:50:50 2000 Jeff Johnston <jjohnstn@cygnus.com>
-
- * libc/stdio/flags.c (__sflags): Added check that mode[1]
- is non-null before looking at mode[2].
-
-Thu Feb 24 11:43:00 2000 Ran Cabell <rcabell@norfolk.infi.net>
-
- * libm/mathfp/sf_atan2.c: Fix atan2 typo for _DOUBLE_IS_32_BITS.
- * libm/mathfp/sf_atan.c: Ditto.
-
-Thu Feb 24 11:39:00 2000 Joel Sherrill <joel@OARcorp.com>
-
- * libc/include/sys/stat.h: Add RTEMS prototype for lstat.
-
-Tue Feb 22 14:37:00 2000 Ran Cabell <rcabell@norfolk.infi.net>
-
- * libm/mathfp/sf_exp.c: Corrected _DOUBLE_IS_32_BITS to be
- _DOUBLE_IS_32BITS.
-
-Mon Feb 21 11:43:50 2000 Jeff Johnston <jjohnstn@cygnus.com>
-
- * libc/stdio/vfprintf.c (VFPRINTF): Added CHECK_INIT
- call prior to calling _VFPRINTF_R so reentrant data area is set.
- (_VFPRINTF_R): Removed now extraneous CHECK_INIT call.
-
-Thu Feb 17 01:42:50 2000 J"orn Rennecke <amylaar@cygnus.co.uk>
-
- * libc/stdio/vfscanf.c (limits.h): #include.
- (MAX_LONG_LEN): #define.
- (__svfscanf): Handle floating point numbers with arbitrary amounts
- of leading zeroes.
-
-2000-02-15 Nick Clifton <nickc@cygnus.com>
-
- * libc/sys/arm/syscalls.c (_fstat): Initialise all fields to
- zero. Set the blocksize to 1024/
-
-Thu Jan 20 18:57:00 2000 Fernando Nasser <fnasser@redhat.com>
-
- * setvbuf.c (setvbuf): Set size to BUFSIZ when passed a zero size
- with line buffering.
-
-Mon Jan 10 18:43:00 2000 Jeff Johnston <jjohnstn@cygnus.com>
-
- * acinclude.m4: Changed include directory for winsup headers.
- * aclocal.m4 configure libc/aclocal.m4
- libc/configure libc/ctype/Makefile.in libc/errno/Makefile.in
- libc/locale/Makefile.in libc/machine/aclocal.m4
- libc/machine/configure libc/machine/a29k/aclocal.m4
- libc/machine/a29k/configure libc/machine/arm/aclocal.m4
- libc/machine/arm/configure libc/machine/d10v/aclocal.m4
- libc/machine/d10v/configure libc/machine/d30v/aclocal.m4
- libc/machine/d30v/configure libc/machine/fr30/aclocal.m4
- libc/machine/fr30/configure
- libc/machine/h8300/aclocal.m4
- libc/machine/h8300/configure libc/machine/h8500/aclocal.m4
- libc/machine/h8500/configure libc/machine/hppa/aclocal.m4
- libc/machine/hppa/configure libc/machine/i386/aclocal.m4
- libc/machine/i386/configure libc/machine/i960/aclocal.m4
- libc/machine/i960/configure libc/machine/m32r/aclocal.m4
- libc/machine/m32r/configure libc/machine/m68k/aclocal.m4
- libc/machine/m68k/configure libc/machine/m88k/aclocal.m4
- libc/machine/m88k/configure libc/machine/mips/aclocal.m4
- libc/machine/mips/configure libc/machine/mn10200/aclocal.m4
- libc/machine/mn10200/configure libc/machine/mn10300/aclocal.m4
- libc/machine/mn10300/configure libc/machine/necv70/aclocal.m4
- libc/machine/necv70/configure libc/machine/powerpc/aclocal.m4
- libc/machine/powerpc/configure
- libc/machine/sh/aclocal.m4
- libc/machine/sh/configure libc/machine/sparc/aclocal.m4
- libc/machine/sparc/configure
- libc/machine/tic80/aclocal.m4 libc/machine/tic80/configure
- libc/machine/v850/aclocal.m4 libc/machine/v850/configure
- libc/machine/w65/aclocal.m4 libc/machine/w65/configure
- libc/machine/z8k/aclocal.m4 libc/machine/z8k/configure
- libc/misc/Makefile.in libc/posix/Makefile.in
- libc/reent/Makefile.in
- libc/signal/Makefile.in
- libc/string/Makefile.in libc/sys/aclocal.m4 libc/sys/configure
- libc/sys/a29khif/aclocal.m4 libc/sys/a29khif/configure
- libc/sys/arm/Makefile.in libc/sys/arm/aclocal.m4
- libc/sys/arm/configure libc/sys/cygwin/aclocal.m4
- libc/sys/cygwin/configure libc/sys/d10v/Makefile.in
- libc/sys/d10v/aclocal.m4 libc/sys/d10v/configure
- libc/sys/decstation/aclocal.m4 libc/sys/decstation/configure
- libc/sys/go32/aclocal.m4 libc/sys/go32/configure
- libc/sys/h8300hms/aclocal.m4 libc/sys/h8300hms/configure
- libc/sys/h8500hms/aclocal.m4 libc/sys/h8500hms/configure
- libc/sys/m88kbug/aclocal.m4 libc/sys/m88kbug/configure
- libc/sys/netware/aclocal.m4 libc/sys/netware/configure
- libc/sys/rtems/aclocal.m4 libc/sys/rtems/configure
- libc/sys/sh/Makefile.in libc/sys/sh/aclocal.m4
- libc/sys/sh/configure libc/sys/sparc64/aclocal.m4
- libc/sys/sparc64/configure libc/sys/sun4/aclocal.m4
- libc/sys/sun4/configure libc/sys/sysmec/aclocal.m4
- libc/sys/sysmec/configure libc/sys/sysnec810/aclocal.m4
- libc/sys/sysnec810/configure libc/sys/sysnecv850/aclocal.m4
- libc/sys/sysnecv850/configure libc/sys/sysvi386/aclocal.m4
- libc/sys/sysvi386/configure libc/sys/sysvnecv70/aclocal.m4
- libc/sys/sysvnecv70/configure libc/sys/tic80/aclocal.m4
- libc/sys/tic80/configure libc/sys/w65/aclocal.m4
- libc/sys/w65/configure libc/sys/z8ksim/aclocal.m4
- libc/sys/z8ksim/configure libc/syscalls/Makefile.in
- libc/time/Makefile.in libc/unix/Makefile.in libm/aclocal.m4
- libm/configure: Regenerated.
-
-Mon Jan 10 18:43:46 2000 Jeff Johnston <jjohnstn@cygnus.com>
-
- * libc/stdlib/putenv_r.c (_putenv_r): New file.
- * libc/stdlib/strdup_r.c (_strdup_r): New file.
- * libc/include/string.h: Added _strdup_r.
- * libc/stdlib/putenv.c: Added call to reentrant version.
- * libc/stdlib/strdup.c: Ditto.
- * libc/stdlib/Makefile.am: Added _putenv_r and _unsetenv_r.
- * libc/include/stdlib.h: Ditto.
- * libc/stdlib/Makefile.in: Regenerated.
- * libc/string/Makefile.in: Regenerated.
- * libc/stdlib/setenv.c: Added reentrant version of unsetenv.
- * libc/stdlib/setenv_r.c: Added unsetenv_r and changed memory
- management calls to reentrant versions.
- * libc/stdlib/wcstombs.c: Added #ifndef _REENT_ONLY wrapper.
- * libc/stdlib/wctomb.c: Ditto.
- * libc/stdlib/mblen.c: Ditto.
- * libc/stdlib/mbstowcs.c: Ditto.
- * libc/stdlib/mbtowc.c: Ditto.
- * libc/stdlib/getenv.c: Ditto.
- * libc/reent/reent.tex: Added references to _putenv_r, _setenv_r,
- and _strdup_r.
-
-Thu Jan 6 15:33:46 2000 Christopher Faylor <cgf@cygnus.com>
-
- patch from Corinna Vinschen <corinna@vinschen.de>
- * libc/sys/cygwin/sys/param.h: Define NGROUP_MAX as 16.
-
-Mon Jan 03 14:36:00 2000 Sergei Organov <osv@javad.ru>
-
- * libm/mathfp/s_atangent.c: Fix exponent calculation.
- * libm/mathfp/s_ldexp.c: Ditto.
- * libm/mathfp/sf_atangent.c: Ditto.
- * libm/mathfp/sf_ldexp.c: Ditto.
-
-Tue Dec 14 5:42:00 1999 Ranjith Kumaran <ranjith@cygnus.com>
-
- * libc/machine/i960/setjmp.S: fix typo leaving .link_pix uncommented
- * libc/include/locale.h: define NULL to be 0.
-
-Tue Dec 7 15:41:45 1999 Jim Wilson <wilson@cygnus.com>
-
- * libc/sys/sh/syscalls.c (stack_ptr): Move definition before first
- function.
-
-Wed Dec 1 17:39:29 1999 Jeffrey A Law (law@cygnus.com)
-
- * libc/machine/mn10300/setjmp.S: Handle am33.
-
-1999-11-26 Nick Clifton <nickc@cygnus.com>
-
- * libc/sys/arm/syscalls.c: Add function prototypes.
- (stack_ptr): Move declaration before function definitions.
-
-Sat Nov 20 17:13:00 1999 Ranjith Kumaran <ranjith@cygnus.com>
-
- * NEWS: Updated version information.
- * README: Ditto.
-
-Tue Nov 09 12:19:21 1999 Jeff Johnston <jjohnstn@cygnus.com>
-
- * libc/machine/i386/strchr.S: Fixed alignment test.
-
-Thu Oct 28 05:30:46 1999 Andrew Cagney <cagney@makita.cygnus.com>
-
- * libc/sys/d10v/crt0.S (_start): Construct a real stack frame.
-
-Thu Oct 28 15:29:11 1999 Andrew Cagney <cagney@b1.cygnus.com>
-
- * libc/sys/d10v/crt0.S (_start): Initialize both SPI and SPU
- ensuring that there is space between the two.
-
-Thu Oct 14 13:39:21 1999 Christopher Faylor <cgf@cygnus.com>
-
- * libc/stdio/flags.c: Conditionalize check for 't' for cygwin case
- only.
-
-1999-10-08 Vadim Egorov <egorovv@1c.ru>
-
- * libc/include/stdlib.h: add ptsname, grantpt, unlockpt to cygwin
- section
-
-Sat Oct 2 02:02:00 MEST 1999 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
-
- * libc/machine/sh/asm.h: Added __SH4_SINGLE__ to DELAYED_BRANCHES
- * libc/machine/sh/memcpy.S: Fix line wrapping in SL macro
-
-Fri Oct 1 13:17:59 CDT 1999 <joel@OARcorp.com>
- * libc/include/grp.h: Added getgrnam_r and getgrgid_r prototypes
- per POSIX 1003.1b.
- * libc/include/pwd.h: Added getpwnam_r and getpwuid_r prototypes
- per POSIX 1003.1b.
-
-1999-09-13 DJ Delorie <dj@cygnus.com>
-
- * libc/stdio/mktemp.c (_gettemp): on cygwin, check for EACCESS
- also.
-
-Thu Sep 9 15:31:00 1999 Jeff Johnston <jjohnstn@cygnus.com>
-
- * setvbuf.c (setvbuf): When mallocing a buffer of size BUFSIZ,
- also note BUFSIZ as its size.
-
-Tue Sep 7 17:15:00 1999 Joel Sherrill <joel@OARcorp.com>
-
- * configure.host: Corrected feature defines for RTEMS.
- * libc/include/sys/stat.h: Added protototype for RTEMS mknod.
- * libc/include/sys/stat.h: mkfifo() should take const path arg.
- * libc/include/sys/unistd.h: pathconf() should take const path arg.
- Enabled usleep(), ftruncate(), and truncate() prototypes for RTEMS.
- Added defines for _POSIX_JOB_CONTROL, _POSIX_SAVED_IDS, and
- _POSIX_VERSION for RTEMS. Added defines for _PC_ASYNC_IO,
- _PC_PRIO_IO, and _PC_SYNC_IO.
- * libc/machine/m68k/Makefile.am: Added strcpy.c and strlen.c.
- * libc/machine/m68k/Makefile.in: Regenerated.
- * libc/machine/m68k/strcpy.c: New file.
- * libc/machine/m68k/strlen.c: New file.
- * libc/stdio/tmpnam.c: Always make the returned name usable.
- * libc/sys/rtems/crt0.c: New version that passes all autoconf tests.
- * libc/sys/rtems/sys/dirent.h: New file.
- * libc/sys/rtems/sys/types.h: Added dev_t.
-
-Tue Sep 7 17:15:00 1999 Jay Kulpinski <jskulpin@eng01.gdds.com>
-
- * libc/stdlib/mprec.c: Fixed unitialized variable problem.
-
-Fri Sep 3 12:35:20 1999 Jeff Johnston <jjohnstn@cygnus.com>
-
- * libc/stdio/ftell.c (ftell): Backing off Joern's fix and
- my patch.
-
-Thu Sep 2 22:05:20 1999 Christopher Faylor <cgf@cygnus.com>
-
- patch from Jeff Johnston <jjohnstn@cygnus.com>
- * libc/stdio/ftell.c (ftell): Avoid using buffer position when the
- buffer is not in a useful state.
-
-1999-09-01 Nick Clifton <nickc@cygnus.com>
-
- * libc/sys/arm/syscalls.c (_link): Add stub.
-
-Fri Aug 27 23:09:09 1999 J"orn Rennecke <amylaar@cygnus.co.uk>
-
- * ftell.c (ftell): Use actual position within buffer for text mode.
- * findfp.c (std): Initialize ptr->_bf._size.
-
-Wed Aug 18 18:48:02 1999 Christopher Faylor <cgf@cygnus.com>
-
- * libc/include/sys/unistd.h: Add nice() declaration.
-
-1999-08-09 Nick Clifton <nickc@cygnus.com>
-
- * libc/sys/arm/crt0.S (change_mode): Rename to __change_mode and
- declare as a thumb function so that the disassembler will see the
- mode change.
-
-Thu Aug 5 17:37:00 1999 Ranjith Kumaran <ranjith@cygnus.com>
-
- * libc/reent/reent.tex: Updated list of reentrant functions.
-
-1999-07-09 Michael Meissner <meissner@cygnus.com>
-
- * libc/include/stdlib.h (_findenv{,_r}): Add prototypes.
-
-Tue Jul 6 10:46:24 1999 Jeff Johnston <jjohnstn@cygnus.com>
-
- * libc/stdio/sprintf.c: Moved snprintf and _snprintf_r to
- separate file.
- * libc/stdio/snprintf.c: New file.
- * libc/stdio/vsprintf.c: Moved vsnprintf and _vsnprintf_r to
- separate file.
- * libc/stdio/vsnprintf.c: New file.
- * libc/stdio/Makefile.am: Added snprintf.c and vsnprintf.c.
- * libc/stdio/Makefile.in: Regenerated.
-
-Mon Jul 5 14:43:24 1999 Christopher Faylor <cgf@cygnus.com>
-
- Patch submitted by Egor Duda <deo@logos-m.ru>:
- * libc/include/stdio.h: Add declarations for *nprintf.
- * libc/stdio/sprintf.c (snprintf): New function.
- (_snprintf_r): New function.
- * libc/stdio/vsprintf.c (vsnprintf): New function.
- (_vnsprintf_r): New function.
-
-Wed Jun 30 16:36:27 1999 Jeff Johnston <jjohnstn@cygnus.com>
-
- * libc/Makefile.am (stmp-targetdep): Remove extraneous blank.
- * libm/Makefile.am (stmp-targetdep): Ditto.
- * libc/Makefile.in: Regenerated.
- * libm/Makefile.in: Ditto.
-
-Fri Jun 25 10:49:27 1999 Jeff Johnston <jjohnstn@cygnus.com>
-
- * libc/Makefile.am (stmp-targetdep): Ignore "." in SUBDIRS.
- * libm/Makefile.am (stmp-targetdep): Ditto.
- * libc/Makefile.in: Regenerated.
- * libm/Makefile.in: Ditto.
-
-Thu June 03 16:25:00 1999 Jeff Johnston <jjohnstn@cygnus.com>
-
- * Makefile.am: Removed dependencies on all-recursive and added "."
- to the SUBDIRS list to prevent infinite recursion from occurring.
- Also removed any references to EXTRA_DATA.
- * libc/Makefile.am: Ditto.
- * libc/machine/Makefile.am: Ditto.
- * libc/machine/i386/Makefile.am: Ditto.
- * libm/Makefile.am: Ditto.
- * libc/sys/Makefile.am: Ditto.
- * Makefile.in: Regenerated.
- * aclocal.m4: Ditto.
- * configure: Ditto.
- * doc/Makefile.in: Ditto.
- * doc/aclocal.m4: Ditto.
- * doc/configure: Ditto.
- * libc/Makefile.in: Ditto.
- * libc/aclocal.m4: Ditto.
- * libc/configure: Ditto.
- * libc/machine/Makefile.in: Ditto.
- * libc/machine/aclocal.m4: Ditto.
- * libc/machine/configure: Ditto.
- * libc/machine/mn10300/Makefile.in: Ditto.
- * libc/machine/mn10300/aclocal.m4: Ditto.
- * libc/machine/mn10300/configure: Ditto.
- * libc/sys/Makefile.in: Ditto.
- * libc/sys/aclocal.m4: Ditto.
- * libc/sys/configure: Ditto.
- * libm/Makefile.in: Ditto.
- * libm/aclocal.m4: Ditto.
- * libm/configure: Ditto.
-
-Thu June 03 16:20:00 1999 Ranjith Kumaran <ranjith@cygnus.com>
-
- * libc/include/stdlib/stdlib.tex: Add link to env_lock.
-
-Fri May 28 17:09:00 1999 Ranjith Kumaran <ranjith@cygnus.com>
-
- * libc/include/stdlib.h: Add reentrant routines.
- * libc/stdlib/Makefile.am: Add reentrant routines.
- * libc/stdlib/Makefile.in: Ditto.
- * libc/stdlib/envlock.c: New file.
- * libc/stdlib/envlock.h: New file.
- * libc/stdlib/getenv.c: Modify to call reentrant routine.
- * libc/stdlib/getenv_r.c: New file.
- * libc/stdlib/mblen.c: Modify to call reentrant routine.
- * libc/stdlib/mblen_r.c: New file.
- * libc/stdlib/setenv.c: Modify to call reentrant routine.
- * libc/stdlib/setenv_r.c: New file.
- * libc/stdlib/stdlib.tex: Add reentrant routines.
-
-Mon May 17 22:01:38 1999 Christopher Faylor <cgf@cygnus.com>
-
- * libc/include/sys/types.h: Define __MS_types__ whenever
- cygwin or win32.
-
-Sun May 16 16:02:41 1999 Christopher Faylor <cgf@cygnus.com>
-
- * libc/include/machine/ieeefp.h: Always default to little
- endian if Windows, regardless of architecture.
- * libc/include/machine/sethmp.h: Define JBLEN if CYGWIN
- regardless of architecture.
-
-Mon May 3 11:49:18 1999 Geoffrey Noer <noer@cygnus.com>
-
- * libc/include/machine/setjmp.h: Accept CYGWIN define, even if
- _WIN32 isn't defined.
-
-Mon May 3 11:41:51 1999 Jeff Johnston <jjohnstn@cygnus.com>
-
- * libm/common/s_rint.c (rint): Add volatile qualifier for
- intermediate value w.
- * libm/common/sf_rint.c (rintf): Ditto.
-
-Thu Apr 29 20:34:27 1999 Jeff Johnston <jjohnstn@cygnus.com>
-
- * libc/sys/arm/syscalls.c (remap_handle): Added check to
- ensure that std streams are initialized before being referenced.
-
-1999-04-27 Jason Molenda (jsm@bugshack.cygnus.com)
-
- * README: Update reference to newlib@cygnus.com new
- newlib@sourceware.cygnus.com address.
-
-Mon Apr 26 18:17:33 1999 Geoffrey Noer <noer@cygnus.com>
-
- * libc/include/sys/types.h: Define MS_types if CYGWIN is defined.
- * libc/include/sys/fcntl.h: Define _O_BINARY et al if CYGWIN is
- defined, even if _WIN32 isn't defined.
-
-Sat Apr 24 19:59:55 1999 Christopher Faylor <cgf@cygnus.com>
-
- * libc/include/sys/fcntl.h: Correct _O_CREATE to _O_CREAT.
-
-Wed Apr 21 18:01:00 1999 Ranjith Kumaran <ranjith@cygnus.com>
-
- * libc/include/sys/reent.h: Change Long and ULong to __Long and
- __ULong.
- * libc/stdlib/dtoa.c: Ditto.
- * libc/stdlib/mprec.c: Ditto.
- * libc/stdlib/mprec.h: Ditto.
- * libc/stdlib/strtod.c: Ditto.
-
-1999-04-21 Nick Clifton <nickc@cygnus.com>
-
- * configure.host (mcore): Remove mcore machine directory.
-
-1999-04-18 Nick Clifton <nickc@cygnus.com>
-
- * libc/include/machine/ieeefp.h: Add support for mcore target.
- * libc/include/machine/setjmp.h: Add support for mcore target.
- * configure.host: Add support for mcore target.
-
-1999-04-13 Mark Salter <msalter@cygnus.com>
-
- * libc/sys/arm/libcfunc.c: Moved isatty to syscall.c
- * libc/sys/arm/syscalls.c: Added isatty.
-
-Wed Apr 07 16:06:04 1999 Jeff Johnston <jjohnstn@cygnus.com>
-
- * libc/stdlib/ecvtbuf.c (fcvtbuf): Fixed code to properly
- insert zeroes after significant digits.
-
-Wed Mar 17 22:06:04 1999 Jeff Johnston <jjohnstn@cygnus.com>
-
- * libc/stdio/vfprintf.c (cvt): Changed floating point
- cvt routine to use union used by dtoa to properly determine
- if the sign bit is on or not.
- * libc/stdio/vfieeefp.h: New file
-
-Wed Mar 17 17:35:04 1999 Jeff Johnston <jjohnstn@cygnus.com>
-
- * aclocal.m4: Regenerated.
- * configure: Regenerated.
-
-Wed Mar 17 16:35:04 1999 Jeff Johnston <jjohnstn@cygnus.com>
-
- * libc/machine/i386/Makefile.am (lib_a_SOURCES): Added missing
- f_tanf reference.
- * libc/machine/i386/Makefile.in: Regenerated.
-
-Tue Mar 16 14:56:36 1999 Jeff Johnston <jjohnstn@cygnus.com>
-
- * acinclude.m4: Changed to work with new automake.
- * configure: Regenerated.
- * libc/machine/i386/aclocal.m4: Regenerated.
- * libc/machine/i386/configure: Regenerated.
-
-Tue Mar 16 13:55:36 1999 Corinna Vinschen <corinna.vinschen@cityweb.de>
-
- * libc/sys/cygwin/sys/dirent.h: Add additional prototypes
- for telldir() and seekdir(). Rename unused structure element
- for use with these two routines.
-
-Fri Mar 12 19:11:58 1999 Jeff Johnston <jjohnstn@cygnus.com>
-
- * libc/time/mktime.c (validate_structure): Multiple fixes to
- code to handle cases where input fields are outside valid ranges.
- * libc/stdlib/div.c (div): Modified invalid rounding check.
- * libc/stdlib/ldiv.c (ldiv): Ditto.
-
-Thu Mar 11 21:32:13 1999 Jeff Johnston <jjohnstn@cygnus.com>
-
- * libc/machine/i386/memcpy.S: Performance rewrite.
- * libc/machine/i386/memmove.S: Ditto.
- * libc/machine/i386/i386mach.h: Added more register definitions.
- * libc/include/math.h: Include <machine/fastmath.h> if -ffast-math
- option used.
- * libc/include/machine/fastmath.h: Add definitions for x86
- fast-math routines.
-
-Wed Mar 10 17:56:00 1999 Ranjith Kumaran <ranjith@cygnus.com>
-
- * libc/stdlib/strtod.c: Change from unsigned long to ULong.
-
-Tue Mar 9 14:31:58 1999 Geoffrey Noer <noer@cygnus.com>
-
- Adjust newlib headers for new Cygwin Win32 API header files:
- * libc/include/sys/time.h: Check _WINSOCK_H rather than
- _GNU_H_WINDOWS32_SOCKETS.
- * libc/include/sys/types.h: Ditto.
-
-Tue Mar 09 15:55:00 1999 Ranjith Kumaran <ranjith@cygnus.com>
-
- *include/sys/reent.h: Add checks for size of Bigint element Long.
- *libc/dtoa.c: Change routines to use generic Long type.
- *libc/mprec.c: Change routines to use generic Long type.
- *libc/mprec.h: Change routines to use generic Long type.
-
-Tue Mar 02 18:07:49 1999 Ranjith Kumaran <ranjith@cygnus.com>
-
- * libc/Makefile.am: Add .def files.
- * libc/Makefile.in: Regenerate.
- * libc/e_acosh.c: Documentation update.
- * libc/e_atanh.c: Documentation update.
- * libc/e_hypot.c: Documentation update.
- * libc/e_remainder.c: Documentation update.
- * libc/er_lgamma.c: Documentation update.
- * libc/mathfp.tex: Documentation update.
- * libc/s_acos.c: Documentation update.
- * libc/s_atan.c: Documentation update.
- * libc/s_atan2.c: Documentation update.
- * libc/s_cosh.c: Documentation update.
- * libc/s_fmod.c: Documentation update.
- * libc/s_isnan.c: Documentation update.
- * libc/s_log10.c: Documentation update.
- * libc/s_pow.c: Documentation update.
- * libc/w_jn.c: Documentation update.
-
-Sun Feb 28 23:18:49 1999 Geoffrey Noer <noer@cygnus.com>
-
- * aclocal.m4: Regenerate.
- * configure: Regenerate.
-
-Tue Feb 23 13:57:26 1999 Jeff Johnston <jjohnstn@cygnus.com>
-
- * libc/machine/mn10300/setjmp.S (_longjmp): Fixed longjmp
- to return 1 if user specified return code is 0.
- * libc/machine/mn10200/setjmp.S (_longjmp): Ditto.
-
-Thu Feb 18 11:13:28 1999 Jeff Johnston <jjohnstn@cygnus.com>
-
- * libc/machine/mn10200/setjmp.S (_setjmp/_longjmp): Fixed setjmp
- to save the return address. Fixed longjmp to return to the original
- calling address of setjmp and to return the user specified return code
- rather than default to 1.
- * libc/machine/mn10300/setjmp.S (_setjmp/_longjmp): Ditto.
-
-Mon Feb 15 17:48:17 1999 Jeff Johnston <jjohnstn@cygnus.com>
-
- * libc/stdlib/mprec.h (mult): Define mult to be _multiply instead of _mult.
-
-1999-02-10 Nick Clifton <nickc@cygnus.com>
-
- * libc/sys/arm/syscalls.c (initialise_monitor_handles): Make block
- volatile so that its assignments will not be discarded.
-
-Wed Feb 10 17:19:40 1999 Jeff Johnston <jjohnstn@cygnus.com>
-
- * libc/include/_ansi.h: Corrected _STRICT_ANSI reference to
- be __STRICT_ANSI__ which is generated by compiler.
- * libc/include/ctype.h: Ditto.
- * libc/include/math.h: Ditto.
- * libc/include/stdio.h: Ditto.
- * libc/include/stdlib.h: Ditto.
- * libc/include/string.h: Ditto.
- * libc/include/sys/signal.h: Ditto.
-
-1999-02-08 Nick Clifton <nickc@cygnus.com>
-
- * configure.host: Add support for StrongARM target.
-
-Fri Feb 5 11:13:14 1999 Jeff Johnston <jjohnstn@cygnus.com>
-
- * libc/string/strncpy.c (strncpy): Removed redundant code
- that was copying bytes if data unaligned.
-
-1999-02-02 Brendan Kehoe <brendan@cygnus.com>
-
- * libc/stdlib/Makefile.{am,in} (CHEWOUT_FILES): Add mblen.def,
- mbstowcs.def, and wcstombs.def.
-
-Sat Jan 30 02:36:33 1999 Christopher Faylor <cgf@cygnus.com>
-
- * libc/include/sys/errno.h: Add Cygwin errno.
- * libc/stdio/flags.c: Don't default to O_TEXT if no other flag
- is specified.
-
-1999-01-29 Nick Clifton <nickc@cygnus.com>
-
- * libc/sys/arm/syscalls.c: Move C library functions into seperate
- file.
-
- * libc/sys/arm/libcfunc.c: New file containing C library functions
- from syscalls.c
-
- * libc/sys/arm/Makefile.am (lib_a_SOURCES): Add libcfuncs.c
- * libc/sys/arm/Makefile.in (lib_a_SOURCES): Regenerate.
-
-
-1999-01-27 Michael Meissner <meissner@cygnus.com>
-
- * libc/include/machine/setjmp.h (D30V _JBLEN/_JBTYPE): Use double
- type, and cut size in half so that the jmp_buf array is guaranteed
- to be aligned on a 64-bit boundary.
-
-Mon Jan 25 12:05:38 1999 Jeff Johnston <jjohnstn@cygnus.com>
-
- * libc/string/strings.tex: Added information about
- strcasecmp and strncasecmp.
- * libc/stdlib/stdlib.tex: Added missing information
- about mblen, mbstowcs, and wcstombs.
- * libc/string/strchr.c: Changed how mask is built to use
- shift operators so register will be used instead of storage.
-
-1999-01-22 DJ Delorie <dj@cygnus.com>
-
- * libc/include/stdlib.h: don't use dllimport if we're building
- newlib, since it's inside cygwin.dll
-
-Fri Jan 22 14:57:18 1999 Christopher Faylor <cgf@cygnus.com>
-
- * libc/ctype/ctype_.c: Need to use __declspec(dllexport) for
- _ctype_ under cygwin.
-
-Fri Jan 22 09:50:19 1999 Christopher Faylor <cgf@cygnus.com>
-
- * include/stdlib.h: Fix typo from previous checkin.
-
-Thu Jan 21 22:42:21 1999 Christopher Faylor <cgf@cygnus.com>
-
- * include/ctype.h: Use __declspec(dllimport) method for exporting
- variable from cygwin DLL.
- * include/time.h: Ditto.
- * sys/errno.h: Ditto.
- * include/stdlib.h: Export __mb_cur_max from cygwin DLL.
- * libc/locale/locale.c: Use __declspec(dllexport) method for
- exporting variable from cygwin DLL.
-
-Sat Jan 16 13:29:54 1999 Christopher Faylor <cgf@cygnus.com>
-
- * libc/stdio/setvbuf.c: Always clean up when _IONBF or possible
- access of bogus pointer will result in SIGSEGV.
-
-1999-01-07 Nick Clifton <nickc@cygnus.com>
-
- * libc/sys/arm/setjmp.S: Use C macros to cope with the possibility
- of an underscore prefix to function names.
-
-Fri Jan 8 19:00:07 1999 Jeff Johnston <jjohnstn@cygnus.com>
-
- * libc/machine/i386/i386mach.h (__REG_PREFIX__): Create new
- define __REG_PREFIX__ instead of using __REGISTER_PREFIX__.
-
-1998-12-31 Michael Meissner <meissner@cygnus.com>
-
- * libc/machine/i386/i386mach.h (__REGISTER_PREFIX__): Only define
- to `%' if not already defined.
-
-1998-12-30 Michael Meissner <meissner@cygnus.com>
-
- * libc/stdio/tmpnam.c (_tempnam_r): Make directory and prefix
- arguments const char *, not char *.
- * libc/include/stdio.h (_tempnam_r): Ditto.
-
- * libc/include/sys/reent.h (struct _reent): The _sig_func type
- points to a function taking an integer, not void.
-
-Tue Dec 29 14:35:53 1998 Christopher Faylor <cgf@cygnus.com>
-
- * configure.host: Add a define for Cygwin builds.
- * libc/include/ctype.h: Don't use dll imported variables in newlib.
-
-Mon Dec 28 09:19:56 1998 Christopher Faylor <cgf@cygnus.com>
-
- * libc/include/ctype.h: Define _ctype_ as dll imported variable
- for use with Cygwin.
- * libc/include/sys/errno.h: Define _sys_errlist and _sys_nerr as
- dll imported variables for use with Cygwin.
- * libc/ctype/ctype_.c: Undefine _ctype_ in case it has been defined
- as a dll imported variable for Cygwin.
-
-Sat Dec 26 00:13:53 1998 Christopher Faylor <cgf@cygnus.com>
-
- * libc/include/sys/unistd.h: Add proto for getpass.
-
-Fri Dec 18 19:28:19 1998 Geoffrey Noer <noer@cygnus.com>
-
- * libc/sys/cygwin/sys/dirent.h: add protos for scandir and
- alphasort.
-
-Fri Dec 18 16:33:25 1998 Geoffrey Noer <noer@cygnus.com>
-
- * libc/posix/execvp.c (execvp): call cygwin_posix_path_list_p,
- not posix_path_list_p.
-
-1998-12-15 Nick Clifton <nickc@cygnus.com>
-
- * libc/string/memchr.c: Treat 'c' argument as an unsigned byte not
- a signed int.
-
-1998-12-13 Nick Clifton <nickc@cygnus.com>
-
- * libc/include/machine/setjmp.h (_JBLEN): Set to 10.
-
-1998-12-12 Nick Clifton <nickc@cygnus.com>
-
- * libc/machine/fr30/setjmp.S: New file, supplied by Mark Slater
- <msalter@cygnus.com>
- * libc/machine/fr30/Makefile.am: Add build of setjmp.S
- * libc/machine/fr30/Makefile.in: Regenerated.
-
-1998-12-11 Nick Clifton <nickc@cygnus.com>
-
- * configure.host: Remove use of libc/sys for FR30 port.
- * libc/sys/fr30: Remove directory (replaced by libgloss).
-
-1998-12-10 Ken Raeburn <raeburn@cygnus.com>
-
- * libc/string/strcat.c (ALIGNED): Sense of result was reversed.
- * libc/string/strncat.c (ALIGNED): Ditto.
-
-Wed Dec 9 14:37:57 1998 Geoffrey Noer <noer@cygnus.com>
-
- * libc/include/sys/time.h: include sys/types.h
-
-Tue Dec 8 15:53:18 1998 Jeff Johnston <jjohnstn@cygnus.com>
-
- * libc/machine/i386/memcmp.S (memcmp): Fix for unequal
- comparison found when checking word at a time.
-
-1998-12-04 Nick Clifton <nickc@cygnus.com>
-
- * libc/sys/fr30/crt0.s (_start): Initialise frame pointer.
-
-1998-12-03 Nick Clifton <nickc@cygnus.com>
-
- * libc/sys/fr30/syscalls.c (_times): New function stub.
-
-Thu Dec 3 15:59:19 1998 Jeff Johnston <jjohnstn@cygnus.com>
-
- * configure.host (mach_add_setjmp): Replaced mach_add_objs
- with mach_add_setjmp flag which indicates if setjmp should
- be added to the machine directory objects.
- * acinclude.m4: Removed reference to mach_add_objs.
- * aclocal.m4: Regenerated.
- * Makefile.in: Regenerated.
- * configure: Regenerated.
- * libc/aclocal.m4: Regenerated.
- * libc/Makefile.in: Regenerated.
- * libc/configure: Regenerated.
- * libc/machine/aclocal.m4: Regenerated.
- * libc/machine/Makefile.in: Regenerated.
- * libc/machine/configure: Regenerated.
- * libc/machine/i386/aclocal.m4: Regenerated.
- * libc/machine/i386/Makefile.am: Altered to selectively add
- setjmp.S to the src files list.
- * libc/machine/i386/Makefile.in: Regenerated.
- * libc/machine/i386/configure.in: Altered to test mach_add_setjmp.
- * libc/machine/i386/configure: Regenerated.
-
-1998-12-02 Nick Clifton <nickc@cygnus.com>
-
- * libc/sys/fr30/crt0.s (_start): Fix function names.
-
- * libc/machine/fr30: New directory
- * libc/machine/fr30/Makefile.am: New file.
- * libc/machine/fr30/Makefile.in: New generated file.
- * libc/machine/fr30/configure.in: New file.
- * libc/machine/fr30/configure: New generated file.
- * libc/machine/fr30/aclocal.m4: New generated file.
- * libc/sys/fr30/Makefile.am: New file.
- * libc/sys/fr30/Makefile.in: New generated file.
- * libc/sys/fr30/configure.in: New file.
- * libc/sys/fr30/configure: New generated file.
- * libc/sys/fr30/syscalls.c: New file.
-
-Tue Dec 1 16:28:56 1998 Geoffrey Noer <noer@cygnus.com>
-
- * libc/sys/cygwin/sys/utmp.h: new file, moved from winsup/include.
-
-1998-12-01 Ken Raeburn <raeburn@cygnus.com>
-
- * libc/time/strftime.c (strftime): Also handle %y for years before
- 1900.
-
-Tue Dec 1 13:26:07 1998 Christopher Faylor <cgf@cygnus.com>
-
- * libc/string/strcasecmp.c (strcasecmp): Adhere to standard
- UNIX convention. Perform tolower on characters before comparing
- them rather than use toupper.
- * libc/string/strncasecmp.c (strncasecmp): Ditto.
-
-Mon Nov 30 16:24:19 1998 Jeff Johnston <jjohnstn@cygnus.com>
-
- * configure.host: Added using i386 machine directory
- for all x86 cross-compiler and configuring
- which added object files to use via new "mach_add_objs" variable.
- * configure: Regenerated.
- * libc/configure: Regenerated.
- * libc/Makefile.in: Regenerated.
- * libc/aclocal.m4: Regenerated.
- * libc/ctype/Makefile.in: Regenerated.
- * libc/errno/Makefile.in: Regenerated.
- * libc/locale/Makefile.in: Regenerated.
- * libc/machine/Makefile.in: Regenerated.
- * libc/machine/aclocal.m4: Regenerated.
- * libc/machine/configure: Regenerated.
- * libc/posix/Makefile.in: Regenerated.
- * libc/reent/Makefile.in: Regenerated.
- * libc/signal/Makefile.in: Regenerated.
- * libc/stdio/Makefile.in: Regenerated.
- * libc/stdlib/Makefile.in: Regenerated.
- * libc/string/Makefile.in: Regenerated.
- * libc/string/memmove.c: Optimized code to use memcpy
- logic when performing a non-destructive copy.
- * libc/string/strncmp.c: Altered code to allow building
- optimized for size or speed.
- * libc/syscalls/Makefile.in: Regenerated.
- * libc/time/Makefile.in: Regenerated.
- * libc/unix/Makefile.in: Regenerated.
- * libc/machine/i386/Makefile.am: Added new files and reference
- to "mach_add_objs" to indicate optional object files.
- * libc/machine/i386/Makefile.in: Regenerated.
- * libc/machine/i386/aclocal.m4: Regenerated.
- * libc/machine/i386/configure: Regenerated.
- * libc/machine/i386/memchr.S: New file that implements
- function in Intel assembler.
- * libc/machine/i386/memcmp.S: ditto.
- * libc/machine/i386/memcpy.S: ditto.
- * libc/machine/i386/memmove.S: ditto.
- * libc/machine/i386/memset.S: ditto.
- * libc/machine/i386/strchr.S: ditto.
- * libc/machine/i386/strlen.S: ditto.
- * libc/machine/i386/f_atan2.S: New file that implements
- fast version of math function to be used by compiler when
- --ffast_math compile option is used.
- * libc/machine/i386/f_atan2f.S: ditto.
- * libc/machine/i386/f_exp.c: ditto.
- * libc/machine/i386/f_expf.c: ditto.
- * libc/machine/i386/f_frexp.S: ditto.
- * libc/machine/i386/f_frexpf.S: ditto.
- * libc/machine/i386/f_ldexp.S: ditto.
- * libc/machine/i386/f_ldexpf.S: ditto.
- * libc/machine/i386/f_log.S: ditto.
- * libc/machine/i386/f_logf.S: ditto.
- * libc/machine/i386/f_log10.S: ditto.
- * libc/machine/i386/f_log10f.S: ditto.
- * libc/machine/i386/f_math.h: New file.
- * libc/machine/i386/f_pow.c: ditto.
- * libc/machine/i386/f_powf.S: ditto.
- * libc/machine/i386/f_tan.S: ditto.
- * libc/machine/i386/f_tan.S: ditto.
- * libc/machine/i386/i386mach.h: New file.
-
-Mon Nov 30 13:02:17 1998 Christopher Faylor <cgf@cygnus.com>
-
- patch from Mumit Khan <khan@xraylith.wisc.edu>
- * libc/include/stdio.h (tempnam): Add prototype.
- * libc/stdio/tmpnam.c (_tempnam_r): Handle NULL prefix.
- (tempnam): Adhere to prototype.
-
-Thu Nov 26 00:21:32 1998 Christopher Faylor <cgf@cygnus.com>
-
- * Makefile.am: Add default for AR_FLAGS.
- * Makefile.in: Regenerate.
-
-Tue Nov 24 18:48:56 1998 Geoffrey Noer <noer@cygnus.com>
-
- * libc/include/time.h: move __cplusplus wrapper after includes
- * libc/include/sys/time.h: ditto. If Cygwin, include
- sys/select.h.
- * libc/include/sys/types.h: lose "32" in comment about Cygwin.
-
-1998-11-23 Ken Raeburn <raeburn@cygnus.com>
-
- * libc/time/strftime.c (strftime): Handle %y after year 2000.
-
-Wed Nov 18 12:22:41 1998 Nick Clifton <nickc@cygnus.com>
-
- * libc/sys/fr30/crt0.s (_start): Switch over to using int #9 as
- abnormnal end-of-crt0 marker.
-
-Tue Nov 17 16:27:58 1998 Nick Clifton <nickc@cygnus.com>
-
- * libc/sys/fr30/crt0.s: New file/directory.
- * libc/include/machine/setjmp.h: Add FR30 target.
- * libc/include/machine/ieeefp.h: Add FR30 target.
- * configure.host: Add FR30 target.
-
-Mon Nov 16 23:15:00 1998 Ranjith Kumaran <ranjith@cygnus.com>
-
- * libm/math: Files that are duplicated in common directory removed.
- * libm/math/fdlibm.h: Removed.
- * libm/math/s_cbrt.c: Removed.
- * libm/math/s_copysign.c: Removed.
- * libm/math/s_expm1.c: Removed.
- * libm/math/s_finite.c: Removed.
- * libm/math/s_ilogb.c: Removed.
- * libm/math/s_infinity.c: Removed.
- * libm/math/s_lib_ver.c: Removed.
- * libm/math/s_log1p.c: Removed.
- * libm/math/s_logb.c: Removed.
- * libm/math/s_matherr.c: Removed.
- * libm/math/s_modf.c: Removed.
- * libm/math/s_nan.c: Removed.
- * libm/math/s_nextafter.c: Removed.
- * libm/math/s_rint.c: Removed.
- * libm/math/s_scalbn.c: Removed.
- * libm/math/sf_cbrt.c: Removed.
- * libm/math/sf_copysign.c: Removed.
- * libm/math/sf_expm1.c: Removed.
- * libm/math/sf_finite.c: Removed.
- * libm/math/sf_ilogb.c: Removed.
- * libm/math/sf_infinity.c: Removed.
- * libm/math/sf_log1p.c: Removed.
- * libm/math/sf_logb.c: Removed.
- * libm/math/sf_modf.c: Removed.
- * libm/math/sf_nan.c: Removed.
- * libm/math/sf_nextafter.c: Removed.
- * libm/math/sf_rint.c: Removed.
- * libm/math/sf_scalbn.c: Removed.
- * libm/math/Makefile.am: Removed references to deleted files (above).
- * libm/math/Makefile.in: Regenerated.
- * libm/Makefile.am: Added common directory to math.
- * libm/Makefile.in: Regenerated.
-
-Mon Nov 2 23:12:00 1998 Ranjith Kumaran <ranjith@cygnus.com>
-
- * libm/mathfp: Add non-ANSI functions.
- * libm/mathfp/e_acosh.c acosh(): New file.
- * libm/mathfp/e_atanh.c atanh(): New file.
- * libm/mathfp/e_hypot.c hypot(): New file.
- * libm/mathfp/e_j0.c j0(): New file.
- * libm/mathfp/e_j1.c j1(): New file.
- * libm/mathfp/e_remainder.c remainder(): New file.
- * libm/mathfp/e_scalb.c scalb(): New file.
- * libm/mathfp/ef_acosh.c acoshf(): New file.
- * libm/mathfp/ef_atanh.c atanhf(): New file.
- * libm/mathfp/ef_hypot.c hypotf(): New file.
- * libm/mathfp/ef_j0.c j0f(): New file.
- * libm/mathfp/ef_j1.c j1f(): New file.
- * libm/mathfp/ef_remainder.c remainderf(): New file.
- * libm/mathfp/ef_scalb.c scalbf(): New file.
- * libm/mathfp/er_gamma.c gamma_r: New file.
- * libm/mathfp/er_lgamma.c lgamma_r(): New file.
- * libm/mathfp/erf_gamma.c gamma_rf(): New file.
- * libm/mathfp/erf_lgamma.c lgamma_rf(): New file.
- * libm/mathfp/w_cabs.c cabs(): New file.
- * libm/mathfp/w_drem.c drem(): New file.
- * libm/mathfp/w_jn.c jn(): New file.
- * libm/mathfp/wf_cabs.c cabsf(): New file.
- * libm/mathfp/wf_drem.c dremf(): New file.
- * libm/mathfp/wf_jn.c jnf(): New file.
-
-Mon Nov 2 16:43:18 1998 Geoffrey Noer <noer@cygnus.com>
-
- * libc/sys/cygwin32: remove directory and contents
- * libc/sys/cygwin: and add back, losing the "32".
- * configure.host: check for cygwin* instead of cygwin32.
- * acinclude.m4: ditto.
- * aclocal.m4: regenerate with aclocal
- * configure: regenerate with autoconf
-
-Tue Oct 20 17:28:28 1998 Geoffrey Noer <noer@cygnus.com>
-
- * libc/stdio/tmpnam.c (_tempnam_r): not enough memory allocated
- for length
-
-Tue Oct 20 18:49:05 1998 Jeff Johnston <jjohnstn@cygnus.com>
-
- * libc/include/sys/reent.h (struct _reent): Added variables _rand_next, _strtok_last,
- _asctime_buf, _localtime_buf and _gamma_signgam to struct reent
- to make rand/srand, strtok, asctime, localtime, w_gamma,
- w_lgamma, wf_gamma, and wf_lgamma reentrant. Included
- time.h to bring in struct tm definition.
- * libc/stdlib/rand.c (rand, srand): Don't emit functions 'rand' and 'srand' if
- '_REENT_ONLY' is set. Used variable '_rand_next' from struct reent.
- * libc/stdlib/strtok.c (strtok): Used variable '_strtok_last' from struct reent
- instead of static variable.
- * libc/stdlib/asctime.c (asctime): Used variable '_asctime_buf' from
- struct reent instead of static variable.
- * libc/stdlib/lcltime.c (localtime): Used variable '_localtime_buf' from
- struct reent instead of static variable.
- * libm/math/Makefile.am: Removed s_signgam.o.
- * libm/math/Makefile.in: Regenerated.
- * libm/math/w_gamma.c (gamma): Used variable '_gamma_signgam' from
- struct reent instead of global variable 'signgam'.
- * libm/math/w_lgamma.c (lgamma): Likewise.
- * libm/math/wf_gamma.c (gammaf): Likewise.
- * libm/math/wf_lgamma.c (lgammaf): Likewise.
- * libm/math/s_signgam.c: Removed.
- * libc/include/unctrl.h: Defined arrays __unctrl and __unctrllen
- to be const.
- * libc/misc/unctrl.c: Defined arrays __unctrl and __unctrllen
- to be const.
- * libc/reent/Makefile.am: Added dependence for impure.o on impure.c and
- libc/include/reent.h.
- * libc/reent/Makefile.in: Regenerated.
- * libc/stdio/vfprintf.c (_vfprintf_r): Defined arrays 'blanks' and 'zeroes'
- to be const.
- * libc/stdlib/mbtowc_r.c (_mbtowc_r): Defined arrays 'JIS_state_table' and
- 'JIS_action_table' to be const.
- * libm/math/s_lib_ver.c: define variable _LIB_VERSION to be const.
-
-Mon Oct 12 00:26:33 1998 Christopher Faylor <cgf@cygnus.com>
-
- * acinclude.m4: $with_target_subdir should default to '.'
- or confusion results when configuring in same directory as sources.
- * Regenerate all aclocal.m4 and configure files.
-
-Fri Oct 9 16:27:36 1998 Jeff Johnston <jjohnstn@cygnus.com>
-
- * libc/stdlib/mallocr.c: Added 16 byte alignment support which
- can be set by defining MALLOC_ALIGNMENT=16. Also added support
- for platforms where sizeof(size_t) < sizeof(long) via
- SIZE_T_SMALLER_THAN_LONG macro.
-
-Wed Oct 7 14:02:40 1998 Jeff Johnston <jjohnstn@cygnus.com>
-
- * libc/include/time.h (CLOCKS_PER_SEC): Change CLOCKS_PER_SEC
- to refer to _CLOCKS_PER_SEC_ and added including <machine/time.h>
- which sets _CLOCKS_PER_SEC_ for selected machines.
- * libc/include/machine/time.h: New file.
-
-Tue Oct 6 16:08:05 1998 Jeff Johnston <jjohnstn@cygnus.com>
-
- * libc/syscalls/sysexecve.c: New file.
- * libc/syscalls/sysgettod.c: New file.
- * libc/syscalls/systimes.c: New file.
- * libc/syscalls/Makefile.am: Added new objects.
- * libc/syscalls/Makefile.in: Regenerated.
- * libc/include/_syslist.h (_execve): Moved define in file.
- * libc/include/reent.h: Added _execve_r declaration.
- * libc/Makefile.in: Regenerated.
- * libc/ctype/Makefile.in: Regenerated.
- * libc/errno/Makefile.in: Regenerated.
- * libc/locale/Makefile.in: Regenerated.
- * libc/machine/Makefile.in: Regenerated.
- * libc/misc/Makefile.in: Regenerated.
- * libc/posix/Makefile.in: Regenerated.
- * libc/reent/Makefile.in: Regenerated.
- * libc/reent/execr.c (_execve_r): Added _execve_r function.
- * libc/signal/Makefile.in: Regenerated.
- * libc/stdio/Makefile.in: Regenerated.
- * libc/time/Makefile.in: Regenerated.
- * libc/unix/Makefile.in: Regenerated.
- * libm/mathfp/Makefile.in: Regenerated.
-
-Tue Oct 6 14:14:05 1998 Jeff Johnston <jjohnstn@cygnus.com>
-
- * libc/string/Makefile.in: Regenerated.
- * libc/string/memchr.c (memchr): Moved code to reduce object size.
- * libc/string/memcpy.c (memcpy): Ditto.
- * libc/string/memcmp.c (memcmp): Ditto.
- * libc/string/memset.c (memset): Ditto.
- * libc/string/strchr.c (strchr): Ditto.
- * libc/string/strcmp.c (strcmp): Ditto.
- * libc/string/strcpy.c (strcpy): Ditto.
- * libc/string/strlen.c (strlen): Ditto.
-
-Tue Oct 6 13:58:05 1998 Jeff Johnston <jjohnstn@cygnus.com>
-
- * libm/acinclude.m4: Removed since newlib/acinclude.m4 can be used
- to generate aclocal.m4.
- * libm/Makefile.in: Regenerated.
- * libm/aclocal.m4: Regenerated.
- * libm/configure: Regenerated.
- * libm/math/Makefile.in: Regenerated.
- * libm/mathfp/Makefile.in: Regenerated.
-
-1998-09-25 Mark Salter <msalter@cygnus.com>
-
- * libc/include/machine/setjmp.h: Fixed test for mn10300 and mn10200
- by adding leading and trailing underscores to symbol names.
-
-Tue Sep 22 15:33:41 1998 Christopher Faylor <cgf@cygnus.com>
-
- * Makefile.in: Add default for AR_FLAGS.
-
-Tue Sep 22 15:02:49 1998 Christopher Faylor <cgf@cygnus.com>
-
- patch from ian@airs.com (Ian Taylor):
- * acinclude.m4: Run AC_CANONICAL_BUILD explicitly before
- NEWLIB_CONFIGURE so AC_CANONICAL_HOST will be run before it
- is needed for detecting the build machine. Required for
- cygwin native builds.
-
- * Regenerate all aclocal.m4 and configure files.
-
-Mon Sep 21 14:44:16 1998 Nick Clifton <nickc@cygnus.com>
-
- * libc/sys/arm/crt0.S: Prepend a period to all local labels that
- used to start with LC.
-
-Thu Sep 17 18:18:11 1998 J"orn Rennecke <amylaar@cygnus.co.uk>
-
- * libc/machine/sh/setjmp.S (setjmp): Handle __SH4* like __SH3E__ .
- (longjmp): Likewise.
-
-Thu Sep 17 16:25:33 1998 J"orn Rennecke <amylaar@cygnus.co.uk>
-
- * libc/machine/sh/memset.S (memset): Move copy from r4 to r4 before
- the test for small number of bytes.
-
-Thu Sep 10 11:40:00 1998 Ranjith Kumaran <ranjith@cygnus.com>
-
- * Makefile.am: Add --enable-newlib-hw-fp check. This builds the new
- math library that uses floating point algorithms instead of the old
- libm.
- * Makefile.in: Regenerate with automake version 1.3b.
- * configure: Rebuild.
- * libm/Makefile.in: Regenerate with automake version 1.3b.
- * libm/aclocal.m4: Regenerate.
- * libm/configure: Rebuild.
- * libm/configure.in: Add newlib_hw_fp definition and mathfp directory.
- * libm/acinclude.m4: Define macros for configure.in.
- * libm/config.h.in: Generate.
- * libm/mathfp/Makefile.am: New file.
- * libm/mathfp/Makefile.in: Generate.
- * libm/mathfp/s_acos.c (acos): New file.
- * libm/mathfp/s_asin.c (asin): New file.
- * libm/mathfp/s_asine.c (asine): New file.
- * libm/mathfp/s_atan.c (atan): New file.
- * libm/mathfp/s_atan2.c (atan2): New file.
- * libm/mathfp/s_atangent.c (atangent): New file.
- * libm/mathfp/s_ceil.c (ceil): New file.
- * libm/mathfp/s_copysign.c (copysign): New file.
- * libm/mathfp/s_cos.c (cos): New file.
- * libm/mathfp/s_cosh.c (cosh): New file.
- * libm/mathfp/s_exp.c (exp): New file.
- * libm/mathfp/s_fabs.c (fabs): New file.
- * libm/mathfp/s_finite.c (finite): New file.
- * libm/mathfp/s_floor.c (floor): New file.
- * libm/mathfp/s_fmod.c (fmod): New file.
- * libm/mathfp/s_frexp.c (frexp): New file.
- * libm/mathfp/s_infconst.c: New file.
- * libm/mathfp/s_isinf (isinf).c: New file.
- * libm/mathfp/s_isnan.c (isnan): New file.
- * libm/mathfp/s_ispos.c (ispos): New file.
- * libm/mathfp/s_ldexp.c (ldexp): New file.
- * libm/mathfp/s_log.c (log): New file.
- * libm/mathfp/s_log10.c (log10): New file.
- * libm/mathfp/s_logarithm.c (logarithm): New file.
- * libm/mathfp/s_mathcnst.c: New file.
- * libm/mathfp/s_modf (modf).c: New file.
- * libm/mathfp/s_numtest.c (numtest): New file.
- * libm/mathfp/s_pow.c (pow): New file.
- * libm/mathfp/s_scalbn.c (scalbn): New file.
- * libm/mathfp/s_sin (sin).c: New file.
- * libm/mathfp/s_sine.c (sine): New file.
- * libm/mathfp/s_sineh.c (sineh): New file.
- * libm/mathfp/s_sinf.c (sinf): New file.
- * libm/mathfp/s_sinh.c (sinh): New file.
- * libm/mathfp/s_sqrt.c (sqrt): New file.
- * libm/mathfp/s_tan.c (tan): New file.
- * libm/mathfp/s_tanh.c (tanh): New file.
- * libm/mathfp/sf_acos.c (acosf): New file.
- * libm/mathfp/sf_asin.c (asinf): New file.
- * libm/mathfp/sf_asine.c (asinef): New file.
- * libm/mathfp/sf_atan.c (atanf): New file.
- * libm/mathfp/sf_atan2.c (atan2f): New file.
- * libm/mathfp/sf_atangent.c (atangent): New file.
- * libm/mathfp/sf_ceil.c (ceilf): New file.
- * libm/mathfp/sf_copysign.c (copysignf): New file.
- * libm/mathfp/sf_cos.c (cosf): New file.
- * libm/mathfp/sf_cosh.c (coshf): New file.
- * libm/mathfp/sf_exp.c (expf): New file.
- * libm/mathfp/sf_fabs.c (fabsf): New file.
- * libm/mathfp/sf_finite.c (finitef): New file.
- * libm/mathfp/sf_floor.c (floorf): New file.
- * libm/mathfp/sf_fmod.c (fmodf): New file.
- * libm/mathfp/sf_frexp.c (frexpf): New file.
- * libm/mathfp/sf_isinf.c (isinff): New file.
- * libm/mathfp/sf_isnan.c (isnanf): New file.
- * libm/mathfp/sf_ispos.c (isposf): New file.
- * libm/mathfp/sf_ldexp.c (ldexpf): New file.
- * libm/mathfp/sf_log.c (logf): New file.
- * libm/mathfp/sf_log10.c (log10f): New file.
- * libm/mathfp/sf_logarithm.c (logarithmf): New file.
- * libm/mathfp/sf_modf.c (modff): New file.
- * libm/mathfp/sf_numtest.c (numtestf): New file.
- * libm/mathfp/sf_pow.c (powf): New file.
- * libm/mathfp/sf_scalbn.c (scalbnf): New file.
- * libm/mathfp/sf_sin.c (sinf): New file.
- * libm/mathfp/sf_sine.c (sinef): New file.
- * libm/mathfp/sf_sineh.c (sinehf): New file.
- * libm/mathfp/sf_sinh.c (sinhf): New file.
- * libm/mathfp/sf_sqrt.c (sqrtf): New file.
- * libm/mathfp/sf_tan.c (tanf): New file.
- * libm/mathfp/sf_tanh.c (tanhf): New file.
- * libm/mathfp/zmath.h: New file.
-
-Wed Sep 2 02:49:03 1998 J"orn Rennecke <amylaar@cygnus.co.uk>
-
- * libc/machine/sh/strcmp.S (L_char_loop): Re-load r0 at loop
- exit if it has been overwritten by pre-fetching in delay slot.
-
-1998-09-01 Michael Meissner <meissner@cygnus.com>
-
- * Makefile.am (tooldir): Add in host_alias, so that multilib
- libraries are installed in the directory the compiler looks in.
- * Makefile.in: Regenerate.
-
- * libc/stdlib/Makefile.in: Regenerate with automake version 1.3b.
-
-Mon Aug 31 11:39:31 1998 Jeff Johnston <jjohnstn@cygnus.com>
-
- * libc/machine/mn10300/memcpy.S (_memcpy): Move alignment test
- ahead of test for number of bytes being moved.
-
-Thu Aug 27 14:07:53 1998 Christopher Faylor <cgf@cygnus.com>
-
- * libc/include/sys/unistd.h: Nothing special needed for
- _exit under cygwin.
-
-Wed Aug 26 15:05:21 1998 Nick Clifton <nickc@cygnus.com>
-
- * libc/sys/arm/syscalls.c (_sbrk): Rename '_end' to 'end' to
- conform to user label naming conventions.
-
-Mon Aug 24 14:46:19 1998 Geoffrey Noer <noer@cygnus.com>
-
- * libc/sys/cygwin32/sys/utime.h: variable names in
- protos should start with two leading underscores
- * libc/include/string.h: ditto
- * libc/include/sys/signal.h: ditto
- * libc/include/sys/stat.h: ditto
- * libc/include/sys/time.h: ditto
- * libc/include/sys/unistd.h: ditto
- * libc/include/ctype.h: ditto
- * libc/include/stdlib.h: ditto
- * libc/include/sys/reent.h: struct _atexit function ptr takes a
- void, same with _sig_func.
-
-Fri Aug 21 14:44:14 1998 Jeff Johnston <jjohnstn@cygnus.com>
-
- * libc/stdlib/mbtowc_r.c (_mbtowc_r): Added preprocessor checks
- for MB_CAPABLE to reduce code size when newlib is not configured
- with --enable-newlib-mb.
- * libc/stdlib/Makefile.am: Specified -fshort-enums when building
- mbtowc_r.o to minimize size.
- * libc/stdlib/Makefile.in: Rebuild.
-
-Wed Aug 19 16:20:13 1998 Jim Wilson <wilson@cygnus.com>
-
- * libc/sys/sparc64/Makefile.am (.S_r.o, .c_r.o): Change -DREENTRANT
- to -DREENT.
- * libc/sys/sparc64/Makefile.in: Rebuild.
-
-Tue Aug 18 22:38:29 1998 Ian Lance Taylor <ian@cygnus.com>
-
- * Makefile.am (MAKEOVERRIDES): Define.
- * Makefile.in: Rebuild.
-
-Tue Aug 18 12:38:47 1998 Jim Wilson <wilson@cygnus.com>
-
- * libc/sys/sparc64/sys/stat.h (stat): Add const.
-
-Mon Aug 17 22:27:06 1998 Ian Lance Taylor <ian@cygnus.com>
-
- * acinclude.m4 (NEWLIB_CONFIGURE): Use top_builddir in
- newlib_cflags when looking for targ-include.
- * */aclocal.m4, */configure: Rebuild.
-
-Fri Jul 31 10:57:42 1998 Catherine Moore <clm@cygnus.com>
-
- * libc/sys/arm/syscalls.c (_sbrk): Change "__end__"
- to "_end".
-
-Wed Jul 29 00:02:01 1998 Mark Alexander <marka@cygnus.com>
-
- * libc/include/sys/config.h: Define __IEEE_LITTLE_ENDIAN
- on SPARCs with little-endian data.
- * libc/include/machine/ieeefp.h: Ditto.
-
-Wed Jul 22 18:00:10 1998 Ian Lance Taylor <ian@cygnus.com>
-
- * acinclude.m4: Handle a relative srcdir correctly when setting
- newlib_cflags.
- * */aclocal.m4, */configure: Rebuild.
-
-Wed Jul 22 17:11:33 1998 Jeff Johnston <jjohnstn@cygnus.com>
-
- * libm/math/wrf_lgamma.c (lgammaf_r): Initialize exc.err to 0 and
- also set exc.arg1, exc.arg2 appropriately in case matherr is supplied.
- * libm/math/wrf_gamma.c (gammaf_r): ditto
- * libm/math/wr_lgamma.c (lgamma_r): ditto
- * libm/math/wr_gamma.c (gamma_r): ditto
- * libm/math/wf_sqrt.c (sqrtf): ditto
- * libm/math/wf_sinh.c (sinhf): ditto
- * libm/math/wf_scalb.c (scalbf): ditto
- * libm/math/wf_remainder.c (remainderf): ditto
- * libm/math/wf_pow.c (powf): ditto
- * libm/math/wf_log10.c (log10f): ditto
- * libm/math/wf_log.c (logf): ditto
- * libm/math/wf_lgamma.c (lgammaf): ditto
- * libm/math/wf_jn.c (jnf, ynf): ditto
- * libm/math/wf_j1.c (j1f, y1f): ditto
- * libm/math/wf_j0.c (j0f, y0f): ditto
- * libm/math/wf_hypot.c (hypotf): ditto
- * libm/math/wf_gamma.c (gammaf): ditto
- * libm/math/wf_fmod.c (fmodf): ditto
- * libm/math/wf_exp.c (expf): ditto
- * libm/math/wf_cosh.c (coshf): ditto
- * libm/math/wf_atanh.c (atanhf): ditto
- * libm/math/wf_atan2f.c (atan2f): ditto
- * libm/math/wf_asin.c (asinf): ditto
- * libm/math/wf_acosh.c (acoshf): ditto
- * libm/math/wf_acos.c (acosf): ditto
- * libm/math/w_sqrt.c (sqrt): ditto
- * libm/math/w_sinh.c (sinh): ditto
- * libm/math/w_scalb.c (scalb): ditto
- * libm/math/w_remainder.c (remainder): ditto
- * libm/math/w_pow.c (pow): ditto
- * libm/math/w_log10.c (log10): ditto
- * libm/math/w_log.c (log): ditto
- * libm/math/w_lgamma.c (lgamma): ditto
- * libm/math/w_jn.c (jn, yn): ditto
- * libm/math/w_j1.c (j1, y1): ditto
- * libm/math/w_j0.c (j0, y0): ditto
- * libm/math/w_hypot.c (hypot): ditto
- * libm/math/w_gamma.c (gamma): ditto
- * libm/math/w_fmod.c (fmod): ditto
- * libm/math/w_exp.c (exp): ditto
- * libm/math/w_cosh.c (cosh): ditto
- * libm/math/w_atanh.c (atanh): ditto
- * libm/math/w_atan2f.c (atan2): ditto
- * libm/math/w_asin.c (asin): ditto
- * libm/math/w_acosh.c (acosh): ditto
- * libm/math/w_acos.c (acos): ditto
-
-Tue Jul 21 12:34:54 1998 Ian Lance Taylor <ian@cygnus.com>
-
- * libm/math/Makefile.am (src): Add w_cabs.c and w_drem.c.
- (fsrc): Add wf_cabs.c and wf_drem.c.
- * libm/math/Makefile.in: Rebuild.
-
- * Makefile.am (AM_MAKEFLAGS): Add CFLAGS_FOR_BUILD. Remove some
- unused directory variables. Remove duplicate CFLAGS.
- * Makefile.in: Rebuild.
-
- * doc/Makefile.am ($(MKDOC)): Don't use $(CFLAGS) when building
- with $(CC_FOR_BUILD).
- (makedoc.o): Likewise.
- * doc/Makefile.in: Rebuild.
-
- * libc/sys/cygwin32/Makefile.am (EXTRA_LIBRARIES): Define, to
- force a definition of COMPILE.
- (libfoo_a_SOURCES): Define.
- * libc/sys/cygwin32/Makefile.in: Rebuild.
- * libc/sys/tic80/Makefile.am (EXTRA_LIBRARIES): Define, to
- force a definition of COMPILE.
- (libfoo_a_SOURCES): Define.
- * libc/sys/tic80/Makefile.in: Rebuild.
-
-Mon Jul 20 20:49:24 1998 Christopher Faylor <cgf@cygnus.com>
-
- * libc/include/sys/fcntl.h: Add O_NOINHERIT, Win32-specific
- flag.
-
-Fri Jul 17 16:13:16 1998 Ian Lance Taylor <ian@cygnus.com>
-
- * Build using autoconf and automake. Added many Makefile.am and
- configure.in files, plus generated files. Old configure.in files
- and all old Makefile.in files completely replaced. Removed
- host/any. Added acinclude.m4 and configure.host.
-
-Sat Jul 11 18:14:49 1998 Felix Lee <flee@cygnus.com>
-
- * libc/stdio/vfprintf.c: enable long long support, sometimes.
- * configure.in (*-*-cygwin32): add -DWANT_PRINTF_LONG_LONG.
-
-Tue Jul 7 01:51:55 1998 J"orn Rennecke <amylaar@cygnus.co.uk>
-
- * libc/machine/sh/strcmp.S, libc/machine/sh/strcpy.S: New files.
- * libc/machine/sh/Makefile.in: Add rules for new files.
-
-Tue Jul 7 01:40:55 1998 J"orn Rennecke <amylaar@cygnus.co.uk>
-
- * libc/machine/sh/asm.h (SL, DELAYED_BRANCHES): Define.
- * libc/machine/sh/memset.S (memset): Remove uses of dt; shorten code.
- * libc/machine/sh/memcpy.S (SL, DELAYED_BRANCHES): Don't define.
-
-Thu Jul 2 10:33:16 1998 Nick Clifton <nickc@cygnus.com>
-
- * libc/sys/arm/syscalls.c (_exit): Add comment, noting that exit
- code is ignored.
-
-Wed Jun 24 13:56:54 1998 Jeff Johnston <jjohnstn@cygnus.com>
-
- * libc/stdio/tmpnam.c (_tmpnam_r): Changed routine to use
- internal static buffer when s is NULL, as prescribed by ANSI.
-
-1998-06-22 Vladimir N. Makarov <vmakarov@cygnus.com>
-
- * libc/sys/h8300hms/Makefile.in (OFILES): malloc.o has been
- removed.
- * libc/sys/h8300hms/malloc.c: has been removed. Now malloc.c from
- libc/stdlib will be used for h8300hms.
-
-Thu Jun 18 16:56:05 1998 Jeff Johnston <jjohnstn@cygnus.com>
-
- * libc/machine/mn10300/strlen.S (_strlen): New optimized assembler
- version that can be built either for speed or size.
- * libc/machine/mn10300/memset.S (_memset): ditto
- * libc/machine/mn10300/memchr.S (_memchr): ditto
- * libc/machine/mn10300/memcpy.S (_memcpy): ditto
- * libc/machine/mn10300/memcmp.S (_memcmp): ditto
- * libc/machine/mn10300/strchr.S (_strchr): ditto
- * libc/machine/mn10300/strcmp.S (_strcmp): ditto
- * libc/machine/mn10300/strcpy.S (_strcpy): ditto
- * libc/machine/mn10300/Makefile.in: Added entries for
- memchr.o, memcmp.o, memcpy.o, memset.o, strchr.o,
- strcmp.o, strcpy.o, and strlen.o.
-
-Wed Jun 17 12:50:26 1998 Mark Alexander <marka@cygnus.com>
-
- * configure.in: Don't use libc/sys/sysmec for MN10200; it's
- been replaced with libgloss/mn10200.
-
-Fri Jun 12 14:34:39 1998 Michael Meissner <meissner@cygnus.com>
-
- * libc/string/strchr.c (strchr): Make s a constant pointer to
- avoid warning.
-
-Tue Jun 9 16:29:30 1998 Jason Molenda (crash@bugshack.cygnus.com)
-
- * configure.in (target == arm* or thumb*): Define ARM_RDI_MONITOR
- instead of ARM_RDP_MONITOR (sys/libc/arm/crt0.S to assume Angel
- board SWIs instead of Demon board SWIs).
-
-Thu Jun 4 12:16:46 1998 Michael Meissner <meissner@cygnus.com>
-
- * libc/string/strncat.c (strncat): Make -Os act the same as
- PREFER_SIZE_OVER_SPEED being defined.
-
-Wed Jun 3 17:52:33 1998 Michael Meissner <meissner@cygnus.com>
-
- * libc/string/memchr.c (memchr): Make -Os act the same as
- PREFER_SIZE_OVER_SPEED being defined.
- * libc/string/memcmp.c (memcmp): Ditto.
- * libc/string/memcpy.c (memcpy): Ditto.
- * libc/string/memset.c (memset): Ditto.
- * libc/string/strcat.c (strcat): Ditto.
- * libc/string/strchr.c (strchr): Ditto.
- * libc/string/strcmp.c (strcmp): Ditto.
- * libc/string/strcpy.c (strcpy): Ditto.
- * libc/string/strlen.c (strlen): Ditto.
- * libc/string/strncat.c (strncat): Ditto.
- * libc/string/strncmp.c (strncmp): Ditto.
- * libc/string/strncpy.c (strncpy): Ditto.
-
-Mon Jun 1 15:25:07 1998 Geoffrey Noer <noer@cygnus.com>
-
- * libc/include/sys/itimer.h: remove
- * libc/include/sys/time.h: itimer stuff should be here
-
-Mon Jun 1 16:31:29 1998 Jeff Johnston <jjohnstn@cygnus.com>
-
- * libc/stdio/vfprintf.c (cvt): Changed code to look at sign
- bit instead of comparing to 0 so -0.0 can be printed correctly.
-
-Sat May 30 09:33:51 1998 J"orn Rennecke <amylaar@cygnus.co.uk>
-
- * libc/stdlib/mprec.c (b2d): Inilialize d in non-VAX case too.
-
-Fri May 29 22:25:10 1998 Geoffrey Noer <noer@cygnus.com>
-
- * libc/include/sys/unistd.h: fix sync() proto
- * libc/include/sys/fcntl.h: remove _close which is already
- defined in unistd.h.
- * libc/include/sys/time.h: add getitimer proto
-
-Fri May 29 16:10:28 1998 Geoffrey Noer <noer@cygnus.com>
-
- * libc/string/strchr.c: convert arg to unsigned char
- * libc/include/stdlib.h: add protos for random, srandom
- * libc/include/sys/stat.h: add lstat proto
- * libc/include/sys/time.h: add setitimer proto
- * libc/include/sys/unistd.h: add readlink, symlink protos
- * libc/include/process.h: instead of including windows.h and using
- HANDLEs in sexec protos, just use void *s. Need to include
- sys/types.h.
-
-Fri May 29 03:04:29 1998 Geoffrey Noer <noer@cygnus.com>
-
- * libc/include/sys/fcntl.h: add _close proto for Cygwin32
-
-Thu May 28 16:34:21 1998 Geoffrey Noer <noer@cygnus.com>
-
- * libc/include/process.h: add secure exec protos
-
-Wed May 27 13:54:51 1998 Jeffrey A Law (law@cygnus.com)
-
- * libc/stdlib/dtoa.c (_dtoa_r): Use "double_union" for variables
- which are accessed as both doubles and integers.
- * libc/stdlib/mprec.c (ulp, b2d, ratio): Likewise.
- * libc/stdlib/strtod.c (_strtod_r): Likewise.
- * libc/stdlib/mprec.h: Add "union double_union" and change
- word0/word1 macros to use it.
-
-Tue May 26 18:04:21 1998 Geoffrey Noer <noer@cygnus.com>
-
- * libc/include/sys/signal.h: add __cplusplus wrapper
-
-Tue May 26 15:10:22 1998 Geoffrey Noer <noer@cygnus.com>
-
- * libc/include/sys/utime.h: new generic file that gets replaced by
- libc/sys/SYSDIR/sys/utime.h on systems that support the utime
- function.
- * sys/cygwin32/sys/utime.h: use _EXFUN in utime proto
- * libc/include/time.h: remove duplicate utime proto
- * libc/include/utime.h: add comment
-
-Sun May 24 23:56:20 1998 Christopher Faylor <cgf@cygnus.com>
-
- * libc/include/sys/time.h: Add missing include to
- allow use of _EXFUN. Remove times function that is
- already defined in times.h.
-
-Sun May 24 01:32:14 1998 Christopher Faylor <cgf@cygnus.com>
-
- * libc/include/time.h: Fix typo in tzset.
-
-Fri May 22 17:00:48 1998 Geoffrey Noer <noer@cygnus.com>
-
- * libc/include/sys/time.h: add missing Cygwin32 function protos
- * libc/include/sys/unistd.h: ditto
- * libc/include/time.h: ditto
-
-Wed May 20 20:35:11 1998 Geoffrey Noer <noer@cygnus.com>
-
- * libc/sys/cygwin32/sys/param.h: add protected NULL def, remove
- FIXME.
- * libc/include/sys/types.h: add a new __MS_types__ section
- to define vm_offset_t, vm_size_t, int32_t et al, register_t,
- __BIT_TYPES_DEFINED__.
-
-Wed May 20 18:49:21 1998 Geoffrey Noer <noer@cygnus.com>
-
- * libc/sys/cygwin32/sys/param.h: move here from winsup/include/sys
- since it overrides the one in libc/include/sys. Also, start
- including types.h.
-
-Wed May 20 14:45:40 1998 Geoffrey Noer <noer@cygnus.com>
-
- * libm/math/Makefile.in: add s_signgam.o to obj list
-
-Tue May 19 11:57:11 1998 Jeff Johnston <jjohnstn@cygnus.com>
-
- * libc/include/sys/reent.h (_REENT_INIT): Initialize current locale to "C".
-
-Mon May 18 22:36:12 1998 Christopher Faylor <cgf@cygnus.com>
-
- * libc/include/sys/signal.h: cygwin32 exports sig{empty,add}set,
- so don't use defines.
-
-Mon May 18 19:01:02 1998 Michael Meissner <meissner@cygnus.com>
-
- * libc/sys/d10v/crt0.S: Use correct stab for 16-bit ints.
-
-Sun May 17 18:40:32 1998 Frank Ch. Eigler <fche@cygnus.com>
-
- * libc/stdlib/mbtowc_r.c (_mbtowc_r): Accept a NULL
- _current_locale as default locale.
-
-Sat May 16 21:59:59 1998 Bob Manson <manson@charmed.cygnus.com>
-
- * libc/stdlib/mallocr.c (mALLOc): Add explicit tests for
- insufficient space in a chunk.
-
-Tue May 12 14:41:01 1998 Jeff Johnston <jjohnstn@cygnus.com>
-
- * configure.in (links): Added check for --enable-newlib-mb configure
- option which defines the MB_CAPABLE macro.
- * libc/locale/locale.c (_setlocale_r): Added support for setting
- LC_CTYPE to "C-JIS", "C-SJIS" or "C-EUCJP", when MB_CAPABLE is
- defined.
- * libc/stdlib/mbtowc_r.c (_mbtowc_r): New function _mbtowc_r that
- implements mbtowc() with multibyte support for JIS, SJIS, and EUC-JP.
- * libc/stdlib/wctomb_r.c (_wctomb_r): New function _wctomb_r that
- implements wctomb() with multibyte support for JIS, SJIS, and EUC-JP.
- * libc/stdlib/mbstowcs_r.c (_mbstowcs_r): New function _mbstowcs_r that
- implements mbstowcs() with multibyte support for JIS, SJIS, and EUC-JP.
- * libc/stdlib/wcstombs_r.c (_wcstombs_r): New function _wcstomb_r that implements
- wcstombs() with multibyte support for JIS, SJIS, and EUC-JP.
- * libc/stdlib/Makefile.in: Added new multibyte
- routines: _mbtowc_r(), _wctomb_r(), _mbstowcs_r(), and _wcstombs_r().
- * libc/include/stdlib.h: Added declarations of _mbtowc_r(), _wctomb_r(),
- _mbstowcs_r(), and _wcstombs_r().
- * libc/stdlib/mbctype.h: New internal header file that contains macros to test
- for JIS, SJIS, and EUC-JP characters.
- * libc/stdlib/mblen.c (mblen): Added code to call _mbtowc_r() if
- MB_CAPABLE defined.
- * libc/stdlib/mbtowc.c (mbtowc): Added code to call _mbtowc_r() if
- MB_CAPABLE defined.
- * libc/stdlib/wctomb.c (wctomb): Added code to call _wctomb_r() if
- MB_CAPABLE defined.
- * libc/stdlib/mbstowcs.c (mbstowcs): Added code to call _mbstowcs_r()
- if MB_CAPABLE defined.
- * libc/stdlib/wcstombs.c (wcstombs): Added code to call _wcstombs_r()
- if MB_CAPABLE defined.
- * libc/stdio/vfscanf.c (__svfscanf): Added multibyte tolerance
- to the format string processing when MB_CAPABLE.
- * libc/stdio/vfprintf.c (_VFPRINTF_R): Changed mbtowc() call to
- call _mbtowc_r().
-
-Tue May 5 16:07:23 1998 Nick Clifton <nickc@cygnus.com>
-
- The following modifications are courtesy of Anthony Thompson,
- athompson@cambridge.arm.com:
- * libc/sys/arm/syscalls.c: Initialise and track stdin/out/err for
- boith RDI and RDP monitors.
- * libc/sys/arm/crt0.S: Call initialise_monitor_handles() for both
- RDI and RDP monitors.
-
-Wed Apr 29 15:22:15 1998 Jeff Johnston <jjohnstn@cygnus.com>
-
- * configure.in (links): Added -DHAVE_GETTIMEOFDAY for arm and thumb.
- * libc/sys/arm/syscalls.c (_gettimeofday _times): Added functions.
- (_swiopen): Fixed open flags to treat write with append as just append.
- (_swilseek): Fixed lseek support to properly handle offsets from SEEK_END.
- * libc/sys/arm/sys/param.h: New file to override param.h for ARM.
-
-Fri Apr 24 18:00:09 1998 J"orn Rennecke <amylaar@cygnus.co.uk>
-
- * libc/machine/sh/memcpy.S (L_odddst, big endian version):
- When needing to transfer an initial 2-byte-word, store as
- two single bytes.
-
-Wed Apr 22 17:56:03 1998 J"orn Rennecke <amylaar@cygnus.co.uk>
-
- * libc/sys/sh/crt0.S (start): Handle __SH4_SINGLE_ONLY__ like
- __SH3E__ .
- * libc/machine/sh/memcpy.S (DELAYED_BRANCHES, SL): Likewise.
- * libc/include/machine/ieeefp.h (_DOUBLE_IS_32BITS): Likewise.
-
-Wed Apr 22 12:28:03 1998 Michael Meissner <meissner@cygnus.com>
-
- * configure.in (target_cflags): If --enable-target-optspace, use
- -Os to compile newlib rather than -O2. Default to using -Os for
- d10v, d30v and m32r if --{enable,disable}-target-optspace is not
- used.
-
-Tue Apr 21 23:13:34 1998 Geoffrey Noer <noer@cygnus.com>
-
- * libc/include/machine/setjmp.h: change sigsetjmp and
- siglongjmp definitions to use an array instead of a struct
- for __CYGWIN32__
-
-Tue Apr 14 11:47:47 1998 Doug Evans <devans@canuck.cygnus.com>
-
- * libc/reent/impure.c (__ATTRIBUTE_IMPURE_DATA__): Fix spelling.
-
-Mon Apr 6 15:05:08 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
-
- * libc/string/strxfrm.c: fix to get correct return value
-
-Wed Apr 1 16:09:05 1998 Nick Clifton <nickc@cygnus.com>
-
- * libc/sys/arm/crt0.S: Set top of RAM to be 0x800000 for PE
- builds. Make mode change labels global so that they will be seen
- by the debugger.
-
-Wed Mar 18 09:45:10 1998 Nick Clifton <nickc@cygnus.com>
-
- * configure.in (links): Do not use ARM debiugging protocols for PE
- builds.
-
- * libc/sys/arm/syscalls.c (_sbrk): Add "_sbrk: " to error
- message.
-
-Fri Mar 13 11:24:34 1998 Jeff Johnston <jjohnstn@cygnus.com>
-
- * libc/stdio/findfp.c (__sinit): Made stdout default to
- line buffered mode as defined by ANSI.
-
-Tue Mar 10 11:41:26 1997 Bob Manson <manson@charmed.cygnus.com>
-
- * libc/include/sys/itimer.h: New file.
-
- * libc/signal/signal.c (__sigtramp_r,__sigtramp): New functions.
-
-Mon Mar 9 14:19:26 1998 J"orn Rennecke <amylaar@cygnus.co.uk>
-
- * libc/machine/sh/memcpy.S: (_memcpy): Fix for execute/memcpy-1.c
- failure.
-
-Fri Feb 27 13:56:10 1998 Michael Meissner <meissner@cygnus.com>
-
- * libc/machine/d30v/setjmp.S (longjmp): Fix order of parallel
- insns.
-
-Wed Feb 25 09:29:54 1998 Nick Clifton <nickc@cygnus.com>
-
- * libc/sys/arm/syscalls.c (_open): Add varags to conform to prototype.
-
-Tue Feb 24 18:00:13 1998 Michael Meissner <meissner@cygnus.com>
-
- * libc/machine/d30v/{setjmp.S,Makefile.in}: New files for D30V
- support.
-
- * libc/include/machine/setjmp.h: Add D30V support.
-
- * configure.in (d30v-*): Add d30v machine directory.
-
-Mon Feb 23 09:32:58 1998 Mark Alexander <marka@cygnus.com>
-
- * configure.in: Don't use libc/sys/sysmec for MN10300; it's
- been replaced with libgloss/mn10300.
-
-Sat Feb 21 17:44:43 1998 Geoffrey Noer <noer@cygnus.com>
-
- * libc/stdlib/mallocr.c: remove __malloc_copy routine now that
- it is no longer needed.
-
-Thu Feb 19 16:15:10 1998 Geoffrey Noer <noer@cygnus.com>
-
- * libc/include/sys/signal.h: add sigpause proto for Cygwin32
-
-Wed Feb 18 23:51:08 1998 Geoffrey Noer <noer@cygnus.com>
-
- * libc/stdio/fdopen.c (fdopen): Make all writes go to the end of
- the file when O_APPEND is set, wherever the EOF happens to be at
- that time.
-
-Wed Feb 18 23:25:02 1998 Geoffrey Noer <noer@cygnus.com>
-
- patch from cgf@bbc.com (Christopher Faylor):
- * libc/stdio/freopen.c (freopen): Conform to standard UNIX
- convention of closing fp prior to attempting to open the file
- argument. This allows correct operation when reopening
- stdin/stdout/stderr. Replaces last freopen.c patch.
-
-Wed Feb 18 16:27:40 1998 Geoffrey Noer <noer@cygnus.com>
-
- patch from cgf@bbc.com (Christopher Faylor):
- * libc/stdio/freopen.c: freopen was not preserving the fd
- of the stream being operated on. This confuses programs that
- expect that the handles for stdout and stderr will be 1 and 2.
-
-Mon Feb 16 23:34:07 1998 Andrew Cagney <cagney@b1.cygnus.com>
-
- * libc/sys/d10v/crt0.S (_start): Set PSW{SW} - select SPU.
-
-Thu Feb 12 15:09:20 1998 Ranjith Kumaran <ranjith@cygnus.com>
-
- * libc/sys/go32/longjmp.S: Fix longjmp to not return 0.
-
-Wed Feb 11 17:50:45 1998 Jeff Johnston <jjohnstn@cygnus.com>
-
- * libc/machine/powerpc/setjmp.S (setjmp, longjmp): Alignment code
- altered to not use a branch. Also added hint that last
- bclr in longjmp will likely result in branch.
-
-
-Mon Feb 9 03:44:02 1998 Geoffrey Noer <noer@cygnus.com>
-
- * libc/sys/cygwin32/crt0.c: add missing args to main() extern
-
-Fri Feb 6 16:32:32 1998 Nick Clifton <nickc@cygnus.com>
-
- * libc/sys/sysnecv850/crt0.S (_start): Initialise _ctbp even for
- v850 builds.
-
- * configure.in: Add -msmall-sld to target_cflags for v850 builds.
-
-Wed Feb 4 16:56:20 1998 Jeff Johnston <jjohnstn@cygnus.com>
-
- * libc/machine/powerpc/setjmp.S (longjmp): Fixed code
- that loads FR14 to specify offset of 8 rather than 4
- so it loads from offset 96 (where setjmp stored it).
-
-Tue Feb 3 18:08:34 1998 Jeff Johnston <jjohnstn@cygnus.com>
-
- * libc/machine/sh/memcpy.S: (_memcpy): Update to
- latest version supplied by customer.
- * libc/machine/sh/memset.S (_memset): Ditto.
-
-Mon Feb 2 16:20:39 1998 Nick Clifton <nickc@cygnus.com>
-
- * libc/sys/sysnecv850/Makefile.in (OFILES): Add link.o (for
- PR14730).
-
-Mon Feb 2 15:13:26 1998 Geoffrey Noer <noer@cygnus.com>
-
- * libc/include/string.h: remove redefinition of ffs
-
-Wed Jan 28 13:30:14 1998 Geoffrey Noer <noer@cygnus.com>
-
- * libc/include/sys/signal.h: include _ansi.h so _EXFUN is
- defined
-
-Wed Jan 28 10:38:34 1998 Jeff Johnston <jjohnstn@cygnus.com>
-
- * libc/machine/tic80/setjmp.S: Adding _setjmp to allow
- TI Libraries to link to libc.a
-
-Sat Jan 24 10:15:56 1998 Michael Meissner <meissner@cygnus.com>
-
- * libc/include/sys/fcntl.h (_open,_fcntl): Add prototypes.
- * libc/include/sys/stat.h (_{,f}stat): Ditto.
- * libc/include/sys/wait.h (_wait): Ditto.
- * libc/include/sys/unistd.h (_close,_fork,_getpid): Ditto.
- (_link,_lseek,_read,_sbrk,_unlink,_write): Ditto.
-
-Fri Jan 23 11:32:10 1998 Michael Meissner <meissner@cygnus.com>
-
- * libc/machine/d10v/setjmp.S: Change to new ABI. Add simple
- minded stabs so function name shows up when running the simulator
- with -t.
- * libc/sys/d10v/{crt0,trap}.S: Ditto.
-
-Thu Jan 22 15:57:14 1998 Fred Fish <fnf@cygnus.com>
-
- * libc/sys/d10v/trap.S: Change syscalls to use trap 15.
- * libc/sys/d10v/crt0.S: Use R6 where we used to use R2.
- Use R5 where we used to use R3.
-
-Wed Jan 21 14:22:23 1998 Bill Moyer <billm@cygnus.com>
-
- * libc/stdlib/getopt.c (getopt): replaced __progname
- with nargv[0] to improve portability to imbedded systems.
-
-Thu Jan 15 12:32:38 1998 Nick Clifton <nickc@cygnus.com>
-
- * libc/sys/arm/syscalls.c (initialise_angel_handles): Applied
- patch supplied by Tont.Thompson@arm.com to fix the creation of the
- stdout file.
-
-Wed Jan 14 13:00:19 1998 Ian Lance Taylor <ian@cygnus.com>
-
- * libc/stdio/tmpnam.c (worker): Generate a different file name
- each time.
-
- * libc/posix/popen.c (popen): If __CYGWIN32__, and execing /bin/sh
- fails, try an execlp for sh.
-
- * host/any (INCLUDES): If target_os is cygwin32, then add a -I
- option for the winsup include directory.
-
-Wed Jan 7 17:02:58 1998 Nick Clifton <nickc@cygnus.com>
-
- * libc/sys/arm/syscalls.c: Applied patches for Angel based remote
- debugging interface from Tony.Thompson@arm.com.
-
- * libc/sys/arm/crt0.S (_mainCRTStartup): ditto.
- * libc/sys/arm/swi.h: ditto.
-
-Tue Jan 6 14:15:10 1998 Geoffrey Noer <noer@cygnus.com>
-
- * libc/sys/cygwin32/sys/dirent.h: add __d_dirhash field to
- DIR struct used for readdir hashes.
-
-Thu Jan 1 11:22:22 1998 Jeffrey A Law (law@cygnus.com)
-
- * libc/string/strchr.c: Use "unsigned chars" as necessary.
-
-Wed Dec 31 04:25:30 1997 Jeffrey A Law (law@cygnus.com)
-
- * libc/stdlib/mallocr.c (idx2binblock): Don't lose on 16bit
- integer targets.
-
-Sat Dec 13 15:11:06 1997 Ian Lance Taylor <ian@cygnus.com>
-
- * libc/stdlib/mallocr.c (__malloc_copy): New function, compiled if
- INTERNAL_NEWLIB and __CYGWIN32__ and DEFINE_MALLOC.
- * libc/include/malloc.h: Add extern "C" if __cplusplus.
- (__malloc_copy): Declare.
-
-Wed Dec 10 12:15:54 1997 Ian Lance Taylor <ian@cygnus.com>
-
- * libc/stdlib/mallocr.c: If INTERNAL_NEWLIB, include
- <sys/config.h>.
- (POINTER_UINT): Define.
- (DEFAULT_TRIM_THRESHOLD): Mark constants as long.
- (MALLOC_ALIGNMENT): Don't define if already defined.
- (malloc_extend_top): Cast pointers to POINTER_UINT, not unsigned
- long.
-
-Tue Dec 9 19:23:42 1997 Michael Meissner <meissner@cygnus.com>
-
- * libc/string/memset.c (memset): Fiddle with code so that the long
- value being stored is not a stack value. Unroll storing longs 4
- times.
-
-Tue Dec 9 14:13:18 1997 Jeff Johnston <jjohnstn@cygnus.com>
-
- * Reduce code size for libm modules.
- * libm/math/w_sqrt.c (sqrt): Remove call to kernel_standard
- and simply move code into sqrt.
- * libm/math/wrf_lgamma.c (lgammaf_r): Likewise.
- * libm/math/wr_lgamma.c (lgamma_r): Likewise.
- * libm/math/wrf_gamma.c (gammaf_r): Likewise.
- * libm/math/wr_gamma.c (gamma_r): Likewise.
- * libm/math/wf_sinh.c (sinfh): Likewise.
- * libm/math/w_sinh.c (sinh): Likewise.
- * libm/math/wf_scalb.c (scalbf): Likewise.
- * libm/math/w_scalb.c (scalb): Likewise.
- * libm/math/wf_remainder.c (remainderf): Likewise.
- * libm/math/w_remainder.c (remainder): Likewise.
- * libm/math/wf_pow.c (powf): Likewise.
- * libm/math/w_pow.c (pow): Likewise.
- * libm/math/wf_log10.c (log10f): Likewise.
- * libm/math/w_log10.c (log10): Likewise.
- * libm/math/wf_log.c (logf): Likewise.
- * libm/math/w_log.c (log): Likewise.
- * libm/math/w_lgamma.c (lgamma): Likewise.
- * libm/math/wf_lgamma.c (lgammaf): Likewise.
- * libm/math/wf_jn.c (jnf): Likewise.
- * libm/math/w_jn.c (jn): Likewise.
- * libm/math/wf_j1.c (j1f): Likewise.
- * libm/math/w_j1.c (j1): Likewise.
- * libm/math/wf_j0.c (j0f): Likewise.
- * libm/math/w_j0.c (j0): Likewise.
- * libm/math/wf_hypot.c (hypotf): Likewise.
- * libm/math/w_hypot.c (hypot): Likewise.
- * libm/math/wf_gamma.c (gammaf): Likewise.
- * libm/math/w_gamma.c (gamma): Likewise.
- * libm/math/wf_fmod.c (fmodf): Likewise.
- * libm/math/w_fmod.c (fmod): Likewise.
- * libm/math/wf_exp.c (expf): Likewise.
- * libm/math/w_exp.c (exp): Likewise.
- * libm/math/wf_cosh.c (coshf): Likewise.
- * libm/math/w_cosh.c (cosh): Likewise.
- * libm/math/wf_atanh.c (atanhf): Likewise.
- * libm/math/w_atanh.c (atanh): Likewise.
- * libm/math/wf_atan2.c (atan2f): Likewise.
- * libm/math/w_atan2.c (atan2): Likewise.
- * libm/math/wf_asin.c (asinf): Likewise.
- * libm/math/w_asin.c (asin): Likewise.
- * libm/math/wf_acosh.c (acoshf): Likewise.
- * libm/math/w_acosh.c (acosh): Likewise.
- * libm/math/wf_acos.c (asocf): Likewise.
- * libm/math/w_acos.c (acos): Likewise.
- * libm/math/wf_sqrt.c (sqrtf): Likewise.
- * libm/math/k_standard.c (_k_standard): Don't require SVID behavior
- for embedded systems.
-
-Mon Dec 8 12:12:58 1997 Ian Lance Taylor <ian@cygnus.com>
-
- * libc/stdlib/mallocr.c (malloc_extend_top): Add patch from Doug
- Lea in case of a foreign sbrk.
-
-Fri Dec 5 23:27:28 1997 Ian Lance Taylor <ian@cygnus.com>
-
- Incorporate Doug Lea's malloc:
- * libc/stdlib/mallocr.c: Completely replaced.
- * libc/stdlib/malloc.c: Document malloc_usable_size and memalign.
- (realloc): Remove.
- * libc/stdlib/calloc.c (calloc): Just call _calloc_r.
- * libc/stdlib/mstats.c: Document mallinfo, malloc_stats, and
- mallopt.
- (mallinfo, malloc_stats, mallopt): New functions.
- (_mstats_r): Just call _malloc_stats_r.
- * libc/stdlib/malign.c: New file.
- * libc/stdlib/mlock.c: New file.
- * libc/stdlib/msize.c: New file.
- * libc/stdlib/mtrim.c: New file.
- * libc/stdlib/realloc.c: New file.
- * libc/stdlib/valloc.c: New file.
- * libc/stdlib/malloc.h: Remove.
- * libc/stdlib/callocr.c: Remove.
- * libc/stdlib/Makefile.in (OFILES): Add cfreer.o, freer.o,
- malign.o, malignr.o, mallinfor.o, malloptr.o, mallstatsr.o,
- mlock.o, msize.o, msizer.o, mtrim.o, pvallocr.o, realloc.o,
- reallocr.o, valloc.o, vallocr.o.
- (CHEWOUT_FILES): Add mlock.def, mstats.def.
- (MALLOC_CFLAGS): New variable.
- (mallocr.o): New target, build from mallocr.c.
- (freer.o, reallocr.o, callocr.o, cfreer.o, malignr.o): Likewise.
- (vallocr.o, pvallocr.o, mallinfor.o, mallstatsr.o): Likewise.
- (msizer.o, malloptr.o): Likewise.
- (malign.o, mlock.o, msize.o, mtrim.o, realloc.o): New targets.
- (valloc.o): New target.
- * libc/stdlib/stdlib.tex: Include mlock.def and mstats.def.
- * libc/include/malloc.h: Declare struct mallinfo, and new
- routines.
- * libc/include/stdlib.h (cfree): Correct declaration.
-
-Tue Dec 2 10:12:16 1997 Nick Clifton <nickc@cygnus.com>
-
- * libc/include/machine/setjmp.h: Add support for Thumb target.
-
- * libc/include/machine/ieeefp.h: Add support for Thumb target.
-
- * configure.in (links): Add support for Thumb target.
-
-Wed Nov 26 09:56:17 1997 Nick Clifton <nickc@cygnus.com>
-
- * libc/sys/arm/setjmp.S: Updated with version from branch.
-
-Thu Nov 20 01:21:43 1997 Geoffrey Noer <noer@cygnus.com>
-
- * libc/include/stdio.h: add POSIX-required define L_ctermid
- for ctermid
-
-Wed Nov 19 16:11:40 1997 Michael Meissner <meissner@cygnus.com>
-
- * configure.in (d30v-*-*): Define ABORT_MESSAGE, SMALL_MEMORY, in
- addition to MISSING_SYSCALL_NAMES.
-
-Mon Nov 17 20:05:05 1997 J"orn Rennecke <amylaar@cygnus.co.uk>
-
- * libc/include/sys/config.h: (UINT_MAX, for D10V): Make unsigned.
-
-Mon Nov 10 22:26:55 1997 Geoffrey Noer <noer@cygnus.com>
-
- * libc/include/string.h: change strsignal proto to return
- a char *. This eliminates compile problems in gdb resulting
- from gdb's definition of strsignal in defs.h.
-
-Mon Nov 10 17:11:08 1997 Geoffrey Noer <noer@cygnus.com>
-
- * libc/sys/cygwin32/sys/utime.h: new (moved here from
- winsup/include) so as not to conflict with the one in
- libc/include.
- * libc/include/string.h: add protos for strsignal, strtosigno
-
-Mon Nov 10 13:49:54 1997 Michael Meissner <meissner@cygnus.com>
-
- * libc/include/sys/config.h: Define __IEEE_BIG_ENDIAN if d30v.
-
- * configure.in (d30v-*-*): Add configuration.
-
-Thu Oct 30 14:01:23 1997 Nick Clifton <nickc@cygnus.com>
-
- * configure.in (links): Add -DARM_RD[P|I]_MONITOR to target_cflags
- to select which kind of debug monitor is in use for an ARM target.
-
- * libc/sys/arm/crt0.S: New version: Supports Thumb startups and
- Angel and Demon debug monitors. Part of this code was supplied by
- Tony Thompson at ARM: athompso@arm.com.
-
-Fri Oct 24 18:57:05 1997 Jeffrey A Law (law@cygnus.com)
-
- * strncat.c (strncat): Don't call strncpy; strncay has the wrong
- semantics when the count is greater than the length of the second
- source string.
-
-Thu Oct 23 01:37:41 1997 Geoffrey Noer <noer@cygnus.com>
-
- * libc/include/sys/signal.h: reorder CYGWIN32 signal numbers
- * libc/include/sys/unistd.h: add protos for usleep, truncate,
- truncate and ftruncate take off_t, not size_t
-
-Tue Oct 21 18:42:00 1997 Jim Wilson <wilson@cygnus.com>
-
- * libc/string/strcat.c (strcat): Add missing comment end.
- * libc/string/strncat.c (strncat): Likewise.
-
-Tue Oct 21 17:23:34 1997 Nick Clifton <nickc@cygnus.com>
-
- * configure.in (links): Define PREFER_SIZE_OVER_SPEED for v850
- targets.
- * libc/string/{memchr.c, memcmp.c, memcpy.c}: Add space
- optimised version which is selected if PREFER_SIZE_OVER_SPEED is
- defined.
- * libc/string/{memset.c, strcat.c, strchr.c}: Likewise.
- * libc/string/{strcmp.c, strcpy.c, strlen.c}: Likewise.
- * libc/string/{strncat.c, strncmp.c, strncpy.c}: Likewise.
-
-Mon Oct 13 15:12:35 1997 Ian Lance Taylor <ian@cygnus.com>
-
- * libc/include/sys/param.h (BIG_ENDIAN): Define if __i386__.
- (LITTLE_ENDIAN, BYTE_ORDER): Likewise.
-
-Thu Oct 9 13:54:44 1997 Doug Evans <dje@canuck.cygnus.com>
-
- * libc/machine/i386/setjmp.S: New file.
- * libc/machine/i386/Makefile.in: Delete COPYOFILES.
- (OFILES): Add setjmp.o.
- (setjmp.o): Add rule for.
- * configure.in: Don't set machine_dir for *-*-{go32,sco*,cygwin32}.
-
-Tue Oct 7 14:01:29 1997 Bill Moyer (billm@cygnus.com)
- Jeffrey A Law (law@cygnus.com)
-
- * libc/string/{memchr.c, memcmp.c, memcpy.c}: Reimplement to run faster.
- * libc/string/{memset.c, strcat.c, strchr.c}: Likewise.
- * libc/string/{strcmp.c, strcpy.c, strlen.c}: Likewise.
- * libc/string/{strncat.c, strncmp.c, strncpy.c}: Likewise.
-
-Mon Oct 6 14:07:59 1997 Nick Clifton <nickc@cygnus.com>
-
- * libc/sys/sysnecv850/Makefile.in (crt0.o trap.o): Explicit
- rules.
-
- * libc/include/sys/config.h: Use __v850 to select v850
- endianness.
-
- * libc/include/machine/setjmp.h: Use __v850 to select v850 jump
- buffer size.
-
- * libc/include/machine/ieeefp.h: Use __v850 to select v850
- endianness.
-
-Thu Sep 25 14:11:37 1997 Geoffrey Noer <noer@cygnus.com>
-
- * libc/stdlib/setenv.c: change unsetenv definition to match
- style of setenv (with _DEFUN). The string should be a const.
- * libc/include/stdlib.h: unsetenv proto should return void.
-
-Tue Sep 23 18:17:20 1997 Geoffrey Noer <noer@cygnus.com>
-
- * libc/include/stdlib.h: define unsetenv proto for __CYGWIN32__
-
-Thu Sep 18 12:50:15 1997 Angela Marie Thomas (angela@cygnus.com)
-
- * libc/stdio/glue.h: remove.
- * libc/stdio/findfp.c, libc/stdio/fwalk.c: remove #include "glue.h"
- * libc/stdio/Makefile.in: remove glue.h dependencies
-
-Wed Sep 17 17:42:27 1997 Nick Clifton <nickc@cygnus.com>
-
- * libc/sys/sysnecv850/crt0.S: Created V850e version.
-
-Tue Sep 9 10:40:57 1997 Doug Evans <dje@canuck.cygnus.com>
-
- * configure.in (target_cpu): Add `arc'.
-
-Tue Sep 9 10:40:42 1997 Joel Sherrill <joel@OARcorp.com>
-
- * newlib/configure.in (*-*-rtems*): Add -DSIGNAL_PROVIDED and
- -DREENTRANT_SYSCALLS_PROVIDED to the target_cflags.
- * newlib/libc/include/sys/errno.h: Add ENOTSUP.
- * newlib/libc/reent/reent.c: Add _wrapup_reent.
- * newlib/libc/sys/rtems/sys/types.h: Avoid redefinitions for go32.
-
-Sun Sep 7 16:41:41 1997 Gavin Koch <gavin@cygnus.com>
-
- * libc/machine/mips/setjmp.S: Handle mips16 builds.
-
-Thu Aug 21 20:05:38 1997 Ian Lance Taylor <ian@cygnus.com>
-
- * libc/include/stdio.h (siprintf): Declare.
-
-Mon Aug 18 11:19:13 1997 Nick Clifton <nickc@cygnus.com>
-
- * libc/sys/sysnecv850/Makefile.in (.c.o): Add rule that includes
- TARGET_CFLAGS and NEWLIB_FLAGS.
-
-Mon Aug 18 11:15:43 1997 Nick Clifton <nickc@cygnus.com>
-
- * configure.in (links): Add support for v850ea target.
-
-Mon Aug 18 11:15:43 1997 Nick Clifton <nickc@cygnus.com>
-
- * configure.in (links): Add support for v850e target.
-
-Wed Aug 13 19:16:54 1997 Nick Clifton <nickc@cygnus.com>
-
- * libc/sys/sysnecv850/crt0.S: Remove initial setting of r0 to 0.
-
-Mon Aug 11 15:49:54 1997 Doug Evans <dje@canuck.cygnus.com>
-
- * configure.in (arc-*-*): Add support for.
- * libc/include/machine/ieeefp.h (__arc__): Add support for the ARC.
-
-Fri Jul 25 17:37:41 1997 J"orn Rennecke <amylaar@cygnus.co.uk>
-
- * libc/sys/sh/crt0.S (start): Add fpscr initialization for SH4.
-
-Thu Jul 24 18:32:17 1997 Geoffrey Noer <noer@cygnus.com>
-
- * libc/stdlib/bsearch.c (bsearch): remove last unneeded
- comparison which accesses invalid memory when the key is
- larger than the last member of the array.
- * libc/include/machine/setjmp.h: add sigsetjmp, siglongjmp
- for CYGWIN32
- * libc/include/sys/unistd.h: add _POSIX defines for CYGWIN32
-
-Tue Jul 22 16:03:06 1997 Ian Lance Taylor <ian@cygnus.com>
-
- * libc/include/stdlib.h (realpath): Declare if __CYGWIN32__ and
- not _STRICT_ANSI.
-
-Thu Jul 10 15:11:52 1997 Doug Evans <dje@canuck.cygnus.com>
-
- * libm/math/k_standard.c (__kernel_standard): Call fflush(stdout)
- ifndef _USE_WRITE, instead of ifdef _USE_WRITE.
-
-Thu Jul 10 16:00:09 1997 Mike Meissner <meissner@cygnus.com>
-
- * libc/machine/tic80/setjmp.S (setjmp,longjmp): Use ld.d and st.d
- to load/store memory.
-
-Mon Jul 7 17:38:17 1997 Ian Lance Taylor <ian@cygnus.com>
-
- * libc/include/sys/fcntl.h: Define _O_* symbols with leading
- underscores if _WIN32.
-
-Wed Jul 2 10:07:20 1997 Doug Evans <dje@canuck.cygnus.com>
-
- * libm/math/k_standard.c (__kernel_standard): Delete reentrancy
- support ifdef _USE_WRITE missed in last change.
- From Anders Blomdell <anders.blomdell@control.lth.se>.
-
-Wed Jun 25 10:18:49 1997 Doug Evans <dje@canuck.cygnus.com>
-
- * libc/stdio/tmpnam.c (worker): Handle _open_r being stubbed out.
- (_tmpnam_r, _tempnam_r): Update.
-
-Wed Jun 25 00:16:55 1997 Mark Alexander <marka@cygnus.com>
-
- * libc/machine/sparc/setjmp.S: New file.
- * libc/machine/sparc/Makefile.in: Add setjmp.
- * libc/include/machine/setjmp.h: Increase jmpbuf size for sparc.
-
-Tue Jun 24 23:27:38 1997 Mark Alexander <marka@cygnus.com>
-
- * libc/include/machine/setjmp.h: Use __TIC80__ instead of __tic80__.
-
-Tue Jun 24 14:53:40 1997 Doug Evans <dje@canuck.cygnus.com>
-
- From Joel Sherrill <joel@oarcorp.com>.
- * libc/stdlib/getenv.c (_findenv): Avoid dereferencing null `environ'.
-
- Add rtems support. From Joel Sherrill <joel@oarcorp.com>.
- * configure.in: Recognize *-*-rtems*.
- * libc/sys/rtems/{Makefile.in,crt0.c,dummysys.c}: New files.
- * libc/sys/rtems/sys/{features.h,sched.h,siginfo.h,signal.h,
- time.h,times.h,types.h}: New files.
- * libc/sys/rtems/include/{limits.h,signal.h,time.h}. New files.
-
-Fri Jun 20 11:13:16 1997 Geoffrey Noer <noer@cygnus.com>
-
- patch from sos@prospect.com.ru (Sergey Okhapkin):
- * include/sys/wait.h: correct operator precidence bug
- in WIFSIGNALED
-
-Wed Jun 18 22:08:27 1997 Geoffrey Noer <noer@cygnus.com>
-
- * libc/include/stdlib.h: remove unsetenv proto since it conflicts
- with newlib's unsetenv function
- * libc/sys/cygwin32/sys: new directory for includes
- * libc/sys/cygwin32/sys/dirent.h: move cygwin32's dirent.h
- here from winsup/include/sys
-
-Mon Jun 16 21:02:22 1997 Geoffrey Noer <noer@cygnus.com>
-
- * libc/include/sys/unistd.h: _exit should only be
- labelled noreturn when not __CYGWIN32__
- * libc/include/stdlib.h: for __CYGWIN32__, add proto for unsetenv
- * libc/include/sys/signal.h: add SIGIO to _WIN32 list and
- increment NSIG
-
-Thu Jun 12 18:52:41 1997 Ian Lance Taylor <ian@cygnus.com>
-
- * libc/include/sys/time.h: Only define timeval and timezone if
- _GNU_H_WINDOWS32_SOCKETS is not defined.
- * libc/include/sys/stat.h: If _WIN32, define _S_IFMT, etc.
-
-Wed Jun 11 09:46:26 1997 Jeffrey A Law (law@cygnus.com)
-
- * libc/machine/mn10200/setjmp.S: Implement setjmp/longjmp
- * libc/machine/mn10300/setjmp.S: Likewise.
-
- * libc/sys/sysmec/crt0.S: Use "call" instead of "calls" for
- the mn10300 (more relaxing opportunities).
-
-Tue Jun 10 17:24:45 1997 Mike Meissner <meissner@cygnus.com>
-
- * configure.in (powerpc*-*-{eabi,elf,linux,rtems,sysv,solaris}):
- Build libraries with -mstrict-align.
-
-Fri Jun 6 14:07:59 1997 Ian Lance Taylor <ian@cygnus.com>
-
- * libc/string/strlwr.c: New file.
- * libc/string/strupr.c: New file.
- * libc/include/string.h: Declare strlwr and strupr.
- * libc/string/Makefile.in (OFILES): Add strlwr.o and strupr.o.
- (CHEWOUT_FILES): Add strlwr.def and strupr.def.
- (strlwr.o, strupr.o): New targets.
- * libc/string/strings.tex: Include strlwr and strupr docs.
-
- * libc/include/sys/types.h: Don't define u_char, et. al., if
- _GNU_H_WINDOWS32_SOCKETS is defined. Likewise for fd_set,
- et. al. Make FD_SETSIZE default 64 rather than 60. Define
- _types_fd_set rather than fd_set, and define fd_set as a macro.
-
- * libc/include/malloc.h: New file.
-
- * libc/include/string.h: Define strcmpi, stricmp, strncmpi, and
- strnicmp if they are not already defined.
-
- * libc/include/time.h: If __CYGWIN32__, declare tzset and define
- _timezone, _daylight, and _tzname.
-
-Wed Jun 4 12:51:16 1997 Doug Evans <dje@canuck.cygnus.com>
-
- * configure.in: Sort all configuration tables.
-
- From Joel Sherrill <joel@oarcorp.com>
- * Makefile.in (stmp-targ-include): Copy $(sys_dir)/include/*.h.
-
-Tue Jun 3 14:47:46 1997 Ian Lance Taylor <ian@cygnus.com>
-
- * libc/include/sys/signal.h: Don't include <sys/types.h>. Just
- use int when declaring kill.
-
- * libc/include/sys/timeb.h: New file.
-
-Mon Jun 2 12:06:58 1997 Geoffrey Noer <noer@cirdan.cygnus.com>
-
- * libc/include/sys/time.h: add itimer support for Cygwin32
-
-Mon May 19 11:56:46 1997 Mike Meissner <meissner@cygnus.com>
-
- * libc/stdlib/abort.c (abort): If ABORT_MESSAGE is defined, write
- out a message that abort was called to stderr.
-
-Fri May 16 15:02:59 1997 Bob Manson <manson@charmed.cygnus.com>
-
- * libc/sys/sysmec/fstat.c (_fstat): Set st_blksize to 4096
- so that libio doesn't freak.
-
- * libc/sys/sysmec/sbrk.c (_sbrk): The argument is a size_t, not
- int.
-
- * libc/stdlib/mallocr.c (_morecore_r): Use size_t for
- memory sizes, not int.
-
-Wed May 14 21:16:58 1997 Bob Manson <manson@charmed.cygnus.com>
-
- * libm/math/ef_hypot.c: Use long constants where
- appropriate.
- * libm/math/ef_sqrt.c: Ditto.
-
- * libc/sys/sysmec/times.c(_times): Change to times.
-
- * libc/sys/sysmec/read.c(_read): The third argument is
- size_t.
- * libc/sys/sysmec/write.c (_write): Ditto.
-
- * libc/sys/sysmec/lseek.c: Include unistd.h for off_t.
- (_lseek): It's off_t for the second argument.
-
-Wed May 14 15:23:36 1997 Mike Meissner <meissner@cygnus.com>
-
- * libc/include/sys/config.h (__IEEE_LITTLE_ENDIAN): Define here,
- as well as machine/ieeefp.h.
-
-Thu May 8 15:47:25 1997 Geoffrey Noer <noer@cygnus.com>
-
- * libc/include/sys/signal.h: add signal protos for winsup
- functions (when __CYGWIN32__), include types.h
- * libc/include/sys/types.h: Change __go32_types__ internal
- define to __MS_types__ since it's used for more than just
- GO32 configs. Define this if GO32, __MSDOS__, or _WIN32 are
- defined.
- * libc/include/sys/unistd.h: add ftruncate proto for
- winsup functions (when __CYGWIN32__)
-
-Fri Apr 25 10:10:16 1997 Doug Evans <dje@canuck.cygnus.com>
-
- * libc/sys/h8300hms/sbrk.c (stack_ptr): Add definition.
-
-Thu Apr 24 15:46:51 1997 Mike Stump <mrs@cygnus.com>
-
- * libc/include/machine/setjmp.h: Add tic80 support.
- * libc/machine/tic80/setjmp.S: Likewise.
-
-Tue Apr 22 16:54:40 1997 Geoffrey Noer <noer@pizza.cygnus.com>
-
- * libc/sys/cygwin32/crt0.c: Add reference to main() so we can
- link programs from libraries only (such as in the X11
- distribution)
-
-Mon Apr 21 15:02:12 1997 Fred Fish <fnf@cygnus.com>
-
- * libc/sys/arm/syscalls.c (signal): Remove stub, signal()
- supplied elsewhere in newlib.
-
-Mon Apr 14 16:25:55 1997 Ian Lance Taylor <ian@cygnus.com>
-
- * Makefile.in (INSTALL): Change install.sh to install-sh.
-
-Fri Apr 11 17:04:02 1997 Jason Molenda (crash@godzilla.cygnus.co.jp)
-
- * README: update WWW address for on-line documentation.
-
-Wed Apr 9 00:38:13 1997 Geoffrey Noer <noer@cygnus.com>
-
- * libc/include/sys/signal.h: for _WIN32, define SIGCONT and
- increment NSIG
-
-Mon Apr 7 23:54:00 1997 Jeffrey A Law (law@cygnus.com)
-
- * libc/sys/sysmec/crt0.S: Update for new calling conventions on the
- mn10300.
- * libc/sys/sysmec/trap.S: Don't compare a register to itself.
-
-Tue Mar 25 08:47:43 1997 Jeffrey A Law (law@cygnus.com)
-
- * libc/sys/arm/syscalls.c: Fix/add stack/heap collision detection.
- * libc/sys/d10v/syscalls.c: Likewise.
- * libc/sys/h8300hms/sbrk.c: Likewise.
- * libc/sys/h8500hms/syscalls.c: Likewise.
- * libc/sys/m88kbug/syscalls.c: Likewise.
- * libc/sys/sh/syscalls.c: Likewise.
- * libc/sys/sysmec/sbrk.c: Likewise.
- * libc/sys/sysnecv850/sbrk.c: Likewise.
- * libc/sys/w65/syscalls.c: Likewise.
- * libc/sys.tex: Update sbrk sample code to include stack/heap collision.
-
-Tue Mar 18 14:14:34 1997 Jeffrey A Law (law@cygnus.com)
-
- * libc/sys/sysmec/trap.S: Use "syscall" to trigger an
- emulated syscall instead of "trap".
-
-Fri Mar 14 11:26:13 1997 Michael Meissner <meissner@cygnus.com>
-
- * libc/sys/d10v/trap.S (__trap0): Use trap 15 for system calls,
- not trap 0.
-
-Sun Mar 9 23:27:04 1997 Doug Evans <dje@seba.cygnus.com>
-
- * configure.in (m32r-*-*): Add -msdata=sdata to target_cflags.
-
-Sat Mar 8 09:05:01 1997 Fred Fish <fnf@cygnus.com>
-
- * libc/machine/arm/Makefile.in: Fix comment, is for "arm"
- not "sh".
- * libc/machine/m32r/Makefile.in: Fix comment, is for "m32r"
- not "d10v".
- * libc/sys/tic80/crt0.c: New file for TIc80.
- * libc/sys/tic80/Makefile.in: New file for TIc80.
- * libc/machine/tic80/Makefile.in: New file for TIc80.
-
-Wed Mar 5 11:32:12 1997 J.T. Conklin <jtc@cygnus.com>
-
- * libc/machine/sh/memcpy.S: New file.
- * libc/machine/sh/memset.S: New file.
- * libc/machine/sh/Makefile.in (OFILES): Add memcpy.o and memset.o
-
-Thu Feb 27 16:27:55 1997 Fred Fish <fnf@cygnus.com>
-
- * libc/include/machine/ieeefp.h (_IEEE_LITTLE_ENDIAN): Define
- for TIc80.
-
-Wed Feb 26 13:43:39 1997 Jeffrey A Law (law@cygnus.com)
-
- * libc/sys/sysmec/crt0.S: Handle new calling conventions for
- the mn10200.
-
-Wed Feb 26 07:11:03 1997 Michael Meissner <meissner@cygnus.com>
-
- * libc/machine/powerpc/setjmp.S (longjmp): Correct return status
- (patch from andrew@pogo.WV.TEK.COM).
-
-Fri Feb 14 11:49:28 1997 Doug Evans <dje@canuck.cygnus.com>
-
- * libc/machine/m32r/setjmp.S (setjmp): Save r12.
- (longjmp): Restore r12. Fix code that handles returning 1 if passed 0.
-
-Mon Feb 10 10:02:34 1997 Fred Fish <fnf@cygnus.com>
-
- * configure.in: Add cases for "tic80" to set machine_dir,
- sys_dir, and syscall_dir.
-
-Sun Feb 2 17:57:15 1997 Geoffrey Noer <noer@cygnus.com>
-
- * libc/sys/cygwin32/crt0.c: initialize floating pt registers
-
-Wed Jan 29 15:57:38 1997 Geoffrey Noer <noer@cygnus.com>
-
- * libc/include/math.h: avoid conflicts with ANSI C++ <exception>
-
-Mon Jan 27 12:50:01 1997 Doug Evans <dje@seba.cygnus.com>
-
- * libc/machine/m32r/setjmp.S: Use proper comment delimiter.
- Use proper constant prefix.
-
-Fri Jan 24 10:59:04 1997 Jeffrey A Law (law@cygnus.com)
-
- * libc/sys/sysmec/*.c: Don't cast args to syscall to integers,
- that loses on the mn10200 where ints and pointers are different
- sizes.
-
-Tue Jan 14 13:29:55 PST 1997 Jeremy Allison <jra@cygnus.com>
-
- * configure.in: Added -DSIGNAL_PROVIDED to cygwin32
- target as signal is provided in winsup.
-
-Tue Jan 14 11:10:13 1997 Jeremy Allison <jra@cygnus.com>
-
- * libc/include/sys/process.h: Corrected const definitions
- in spawn functions. Added cwait.
-
-Thu Jan 2 12:22:41 1997 Jeffrey A Law (law@cygnus.com)
-
- * libc/include/machine/ieeefp.h: mn10200 uses 16bit ints and 32bit
- doubles.
- * libc/include/sys/config.h: Similarly.
-
-Tue Dec 31 18:36:14 1996 Michael Meissner <meissner@tiktok.cygnus.com>
-
- * configure.in (sparc-sun-sunos*): Add -DSIGNAL_PROVIDED to the
- target_cflags.
- (i[3456]86-*-sco*): Ditto.
-
- * libc/signal/Makefile.in (OFILES): Add signal.o.
- (CFILES): Add signal.c.
-
- * libc/signal/raise.c (_raise_r): Only compile code if
- SIGNAL_PROVIDED is defined.
-
- * libc/signal/signal.c: Redo whole file so that it works with
- current newlib. Use _kill_r if no signal handler provided.
-
- * libc/sys/{go32,sparc64,sysmec}/Makefile.in: Delete raise and
- signal stubs.
- * libc/sys/sysvnecv70/Makefile.in: Ditto.
- * libc/sys/sysnecv850/Makefile.in: Ditto.
-
- * libc/sys/{go32,sparc64}/signal.c: Delete, stub no longer used.
- * libc/sys/sysmec/{raise,signal}.c: Ditto.
- * libc/sys/sysvnecv70/signal.s: Ditto.
- * libc/sys/sysnecv850/raise.c: Ditto.
-
- * libc/sys/sysnecv850/kill.c (_kill): Encode signal # so that
- simulator and debugger can tell the difference between a signal
- being raised and an exit system call.
-
- * NEWS: Document software signals being provided.
-
-Mon Dec 23 11:54:19 1996 Michael Meissner <meissner@tiktok.cygnus.com>
-
- * libc/reent/impure.c (_REENT_ATTR): Delete in favor of
- __ATTRIBUTE_IMPURE_PTR__. Move PowerPC definition to
- include/sys/config.h.
- (impure_data): Use __ATTRIBUTE_IMPURE_DATA__ for attributes.
- Change from 'inpure_data'.
- (_impure_ptr): Use __ATTRIBUTE_IMPURE_PTR__ for attributes. Use
- &impure_data, not &inpure_data.
-
- * libc/include/sys/config.h (__ATTRIBUTE_IMPURE_PTR__): If PowerPC
- and and System V ABI, define so that _impure_ptr lives in the
- .sdata section.
-
-Sun Dec 22 23:33:05 1996 Michael Meissner <meissner@tiktok.cygnus.com>
-
- * libc/include/sys/reent.h (__ATTRIBUTE_IMPURE_PTR__): Define as
- nothing if not defined.
- (_impure_ptr): Use __ATTRIBUTRE_IMPURE_PTR__, so a machine can set
- its attributes.
-
- * libc/include/sys/config.h (__ATTRIBUTE_IMPURE_PTR__):
-
-Wed Dec 18 10:12:04 1996 Jeffrey A Law (law@cygnus.com)
-
- * libc/sys/sysmec/crt0.S: Fix mn10200 stuff.
- * libc/sys/sysmec/trap.s: Handle mn10200 too.
- * libc/machine/mn10200/setjmp.S: Fix mn10200 stuff.
-
-Mon Dec 16 10:05:36 1996 Jeffrey A Law (law@cygnus.com)
-
- * libc/sys/sysmec/crt0.S: Handle mn10200 too.
-
-Fri Dec 13 11:05:20 1996 Jeremy Allison <jra@cygnus.com>
-
- * libc/include/sys/errno.h: Added net errno's.
-
-Wed Dec 11 16:24:25 1996 Michael Meissner <meissner@tiktok.cygnus.com>
-
- * libc/misc/ffs.c: New file to support ffs function for GCC test
- gcc.c-torture/execute/960909-1.c.
-
- * libc/misc/Makefile.in ({O,CHEWOUT_}FILES): Add ffs.
-
-Sat Dec 7 10:12:37 1996 Jeffrey A Law (law@cygnus.com)
-
- * libc/sys/sysmec/crt0.S: Handle underscore prefix.
- * libc/sys/sysmec/trap.S: Likewise.
-
-Fri Dec 6 15:08:49 1996 Jim Wilson <wilson@cygnus.com>
-
- * configure.in (mips*vr4300*-*-*): Delete use of sys/vr4300.
- * libc/sys/vr4300/{Makefile.in,crt0.S,syscalls.c}: Delete.
-
-Wed Dec 4 16:25:27 1996 Jeffrey A Law (law@cygnus.com)
-
- * libc/sys/sysmec/signal.c: Dummy file.
- * libc/sys/sysmec/Makefile.in: Build it.
-
-Wed Nov 27 13:10:18 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * libc/machine/mips/machine/regdef.h: Define pc as $pc for
- mips16.
-
-Mon Nov 25 09:58:28 1996 Jeffrey A Law (law@cygnus.com)
-
- * libc/sys/sysmec/{crt0.S,trap0.S}: Actually try to implement
- c-startup and simulator traps.
-
-
- * libc/sys/sysmec/crt0.S: Remove bogus '_' symbol prefixing
- * libc/sys/sysmec/trap0.S: Likewise.
-
-Sat Nov 23 09:01:03 1996 Michael Meissner <meissner@tiktok.cygnus.com>
-
- * libc/stdlib/mallocr.c (ROUND_TO): If SMALL_MEMORY, set to 0x7 to
- round to double word alignment.
- (_morecore_r): Combine rounding up pointers to both ROUND_TO and 8
- byte alignment.
-
- * libc/include/sys/config.h (__IEEE_BIG_ENDIAN): Define if d10v.
-
- * libc/sys/d10v/syscalls.c (_sbrk): Add better checks for running
- out of memory.
-
-Mon Nov 18 13:08:26 1996 Jeffrey A Law (law@cygnus.com)
-
- * configure.in: Handle mn10200 and mn10300.
- * libc/include/machine/{ieeefp.h,setjmp.h}: Likewise.
- * libc/include/sys/config.h: Likewise.
- * libc/sys/sysmec: New directory for mec stuff.
- * libc/machine/mn10300: New directory for mn10300 stuff.
- * libc/machine/mn10200: Similarly for mn10200 stuff.
-
-Fri Nov 15 16:41:41 1996 Doug Evans <dje@canuck.cygnus.com>
-
- * libc/sys/arm/crt0.S: Use .text, not .section .text.
- * libc/sys/arm/syscalls.c: Rewrite to set errno properly.
-
- * libc/include/sys/types.h (_ST_INT32): New macro, local to file.
- (nlink_t): Change type from unsigned int to unsigned short.
- (mode_t): Ensure size is 32 bits even if int is 16.
- * libc/include/sys/stat.h (st_nlink): Change type to nlink_t.
- (st_spare[123]): Change type from int to long.
-
-Fri Nov 15 11:41:50 1996 Michael Meissner <meissner@tiktok.cygnus.com>
-
- * libc/sys/d10v/syscalls.c (_sbrk): Align initial heap_end to 8
- byte boundary.
-
- * configure.in (d10v*): Define SMALL_MEMORY.
-
-Mon Nov 11 10:30:44 1996 Michael Meissner <meissner@tiktok.cygnus.com>
-
- * configure.in (powerpc*-{eabi,elf,linux,rtem,sysv,solaris}*): Add
- -mrelocatable-lib and -mno-eabi flags.
-
-Mon Nov 11 09:01:39 1996 Jeffrey A Law (law@cygnus.com)
-
- * libc/machine/h8300/memcpy.S: Fix comments to reflect reality.
- Fix handling of mis-aligned source operand when both the
- destination & length are properly aligned.
-
-Wed Oct 30 09:41:11 1996 Jeffrey A Law (law@cygnus.com)
-
- * libc/sys/sysnecv850/Makefile.in (OFILES): Add
- times.o, time.o and gettime.o
- * libc/sys/sysnecv850/{time.c, times.c, gettime.c}: New files.
- * libc/sys/sysnecv850/sys/syscall.h: Add SYS_times and
- SYS_gettimeofday.
-
-Tue Oct 29 13:40:09 1996 Jeffrey A Law (law@cygnus.com)
-
- * libc/sys/sysnecv850/Makefile.in (OFILES): Add access.o
- * libc/sys/sysnecv850/access.c: New file.
-
-Mon Oct 21 19:47:02 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * libc/sys/vr4300/Makefile.in (clean): Remove $(OFILES).
-
- * libc/stdlib/mprec.h (word0, word1): Use __uint32_t, not unsigned
- long.
-
-Mon Oct 21 14:43:07 1996 Jeffrey A Law (law@cygnus.com)
-
- * libc/sys/sysnecv850/crt0.S: Initialize ep and gp registers.
-
-Thu Oct 17 11:47:16 1996 Doug Evans <dje@seba.cygnus.com>
-
- * libc/include/machine/{ieeefp.h,setjmp.h}: Add m32r support.
- * libc/include/sys/config.h: Add m32r support.
-
-Wed Oct 16 23:08:05 1996 Jeffrey A Law (law@cygnus.com)
-
- * libc/sys/sysnecv850/v850.ld: Remove. It doesn't belong
- here.
-
-Wed Oct 16 21:18:07 1996 Mark Alexander <marka@cygnus.com>
-
- * libc/include/machine/setjmp.h: Add D10v support.
-
-Tue Oct 15 22:28:26 1996 Jeffrey A Law (law@cygnus.com)
-
- * configure.in: Configure the "libc/syscalls" directory for
- the v850.
-
- * libc/sys/sysnecv850/{close.c, execve.c, fork.c}: Add missing '_'.
- * libc/sys/sysnecv850/{fstat.c, getpid.c, kill.c}: Likewise.
- * libc/sys/sysnecv850/{lseek.c, open.c, read.c}: Likewise.
- * libc/sys/sysnecv850/{sbrk.c, stat.c, unlink.c}: Likewise.
- * libc/sys/sysnecv850/{wait.c, write.c}: Likewise.
-
-Tue Oct 15 16:24:39 1996 Stu Grossman (grossman@critters.cygnus.com)
-
- * libc/sys/sysnecv850/crt0.S (start): Allocate spill space on
- stack for args for main and other routines. Zero out args for
- main.
-
- * libc/sys/sysnecv850/v850.ld: New. Linker script to layout memory
- correctly.
-
-Tue Oct 15 11:51:42 1996 Michael Meissner <meissner@tiktok.cygnus.com>
-
- * libc/stdio/findfp.c (std): Remove extraneous ';' after
- function.
-
- * libc/sys/d10v/sys/syscall.h (SYS_kill): Add.
-
- * libc/sys/d10v/{syscalls.c,trap.S} (_kill,_getpid): Make these
- real system calls now.
-
- * libc/stdio/setvbuf (setvbuf): Cast pointers to _POINTER_INT
- before casting them to int.
- * libc/stdio/tmpnam.c (_tempnam_r): Ditto.
-
- * libc/stdlib/mallocr.c (_morecore_r): Use _POINTER_INT when
- aligning pointer.
- * libc/string/memset.c (memset): Ditto.
-
- * libc/stdio/vfscanf.c (__svfscanf): When converting to pointer,
- first convert ints to _POINTER_INT to eliminate GCC warning.
-
- * libc/stdio/vfprintf.c (_vfprintf_r): Use _POINTER_INT when
- processing %p.
-
- * libm/math/ef_scalb.c (__ieee754_scalbf): Cut down range to 32000
- from 65000 if ints are only 16 bits.
-
- * libm/math/sf_scalbn.c (scalbnf): Cut down overflow test to 30000
- from 50000 if ints are only 16 bits.
-
- * libc/include/sys/config.h (_POINTER_INT): New macro, to give an
- int type that is the same size as a pointer.
-
- * libc/misc/dprintf.c (__dprintf): Use _POINTER_INT when
- processing %p.
- (get_number): Explicitly cast number to long before shifting by 16
- or 24, in case ints are short.
-
- * libc/include/sys/config.h (_POINTER_INT): Define as short.
-
-Wed Oct 9 16:54:32 1996 Jeremy Allison <jra@cygnus.com>
-
- * libc/string.h: Added ffs, removed swab.
- * libc/sys/errno.h: Added EOPNOTSUPP.
- * libc/sys/unistd.h: Added swab.
-
-Thu Oct 3 17:08:50 1996 Jeremy Allison <jra@cygnus.com>
-
- * libc/include/sys/stat.h: Added fchmod.
- * libc/include/sys/unistd.h: Added fsync.
-
-Tue Oct 1 17:34:08 1996 Jeremy Allison <jra@cygnus.com>
-
- * libc/include/sys/errno.h: Added defines for EPFNOSUPPORT (96)
- and ECONNRESET (104) for cygwin32.
-
-Tue Oct 1 16:24:05 1996 Gavin Koch <gavin@cygnus.com>
-
- * libc/sys/sysnecv850/_exit.c: added _do_dtors to
- do the static destructors.
-
-Mon Sep 30 15:59:05 1996 Stu Grossman (grossman@critters.cygnus.com)
-
- * libc/sys/sysnecv850/trap.S: Change I/O to use trap 31.
-
-Mon Sep 30 12:02:50 1996 Doug Evans <dje@canuck.cygnus.com>
-
- * libc/machine/m32r/{Makefile.in,setjmp.S}: New files.
- * configure.in: Recognize m32r-*-*.
-
-Mon Sep 30 00:34:41 1996 James G. Smith <jsmith@cygnus.co.uk>
-
- * libc/sys/arm/trap.S (__rt_stkovf_split_big,
- __rt_stkovf_split_small): Added default software stack overflow
- handlers, which just call SWI_Exit.
- * libc/sys/arm/crt0.S (_mainCRTStartup): Simple software stack
- limit initialisation.
-
-Fri Sep 27 13:08:03 1996 Mark Alexander <marka@cygnus.com>
-
- * libc/sys/d10v/{trap.S,sys/syscall.h}: Add time() function.
-
-Fri Sep 27 12:32:00 1996 Jeremy Allison <jra@cygnus.com>
-
- * libc/include/sys/types.h: Added ssize_t definition.
-
-Wed Sep 25 14:52:18 1996 Michael Meissner <meissner@tiktok.cygnus.com>
-
- * libc/machine/d10v/setjmp.S: Use ';' for comments.
- * libc/sys/d10v/{crt0.S,trap.S}: Ditto.
-
- * libc/machine/d10v/setjmp.S (longjmp): Use exef0t || instead of
- branch around a single ldi instruction.
-
- * libc/sys/d10v/crt0.S (_start): Use auto-increment to zero bss.
- Call exit, instead of just issuing a stop instruction.
-
-Sun Sep 22 17:26:55 1996 Michael Meissner <meissner@tiktok.cygnus.com>
-
- * libc/sys/d10v/{trap.S,syscalls.c}: Add -mint32 support.
-
-Fri Sep 20 13:23:12 1996 Michael Meissner <meissner@tiktok.cygnus.com>
-
- * libc/stdlib/mprec.h: Explicitly declare all large constants as
- longs, and then cast them to __uint32_t.
-
- * libc/include/sys/config.h: Protect against multiple inclusions.
-
-Tue Sep 17 13:10:33 1996 Mark Alexander <marka@cygnus.com>
-
- * configure.in (d10v*): Set syscall_dir.
-
-Sun Sep 15 10:41:59 1996 Mark Alexander <marka@cygnus.com>
-
- * libc/sys/d10v/crt0.S: Set stack pointer.
-
-Thu Sep 12 13:02:38 1996 Mark Alexander <marka@cygnus.com>
-
- * libc/sys/d10v/{trap.S, syscalls.c}: Rewrite most system calls
- in assembly for efficiency. Change calling convention to allow
- long ints to be returned.
-
-Wed Sep 11 10:28:18 1996 Michael Meissner <meissner@tiktok.cygnus.com>
-
- * libc/machine/v850/Makefile.in (setjmp.o): Fix dependency.
-
-Thu Sep 5 19:23:06 1996 Doug Evans <dje@canuck.cygnus.com>
-
- * libc/posix/execvp.c (execvp): Don't search PATH if file has '/'.
- Handle empty entries in $PATH.
-
-Tue Sep 03 18:15:02 1996 Mark Alexander <marka@cygnus.com>
-
- * libc/machine/d10v/setjmp.S: Make it really work.
-
-Tue Sep 3 12:16:26 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * libc/sys/sh/crt0.S: If __ELF__, use ELF section attributes for
- the .stack section.
-
-Tue Sep 3 10:08:45 1996 Jeffrey A Law (law@cygnus.com)
-
- * sys/sysnecv850/sys/file.h: Remove.
- * sys/sysnecv850/sys/syscall.h: New file.
- * sys/sysnecv850/{misc.c,syscalls.c,malloc.c}: Deleted.
- * sys/sysnecv850/{chmod.c, chown.c, close.c, creat.c} New files.
- * sys/sysnecv850/{execv.c, execve.c, fork.c, fstat.c} New files.
- * sys/sysnecv850/{getpid.c, isatty.c, kill.c, lseek.c} New files.
- * sys/sysnecv850/{open.c, pipe.c, raise.c, read.c} New files.
- * sys/sysnecv850/{stat.c, unlink.c, utime.c, wait.c} New files.
- * sys/sysnec850/trap.S: New file.
- * sys/sysnecv850/{_exit.c, write.c}: Use new TRAP0 mechanism for
- syscalls.
- * sys/sysnecv850/crt0.S: Use cmp/bl, not tst/bz.
- * sys/sysnec850/sbrk.c: New version.
-
-Sun Sep 1 20:08:27 1996 Jeffrey A Law (law@cygnus.com)
-
- * sys/sysnecv850/crt0.S: Fix order of comparison args. Loop
- as long as r6 is less than r7.
-
-Sun Sep 1 13:54:19 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * Makefile.in (mostlyclean): Separate from clean target. Don't
- remove *.a or targ-include.
- * libc/machine/sparc/Makefile.in (mostlyclean): New target.
-
-Sun Sep 1 11:35:26 1996 Michael Meissner <meissner@tiktok.cygnus.com>
-
- * libc/include/machine/ieeefp.h (_DOUBLE_IS_32BITS): Define for
- d10v.
- (__SMALL_BITFIELDS): Ditto.
-
- * libc/include/sys/config.h (_DOUBLE_IS_32BITS): Define for d10v.
-
-Sat Aug 31 16:42:36 1996 Jeffrey A Law (law@cygnus.com)
-
- * libc/sys/sysnecv850/misc.c (raise, getpid, kill): Remove '_'
- prefix.
-
- * libc/sys/sysnecv850/sbrk.c (sbrk): Remove '_' prefix.
- * libc/sys/sysnecv850/syscalls.c (read, lseek, close): Likewise.
- * libc/sys/sysnecv850/syscalls.c (fstat, open, close): Likewise.
- * libc/sys/sysnecv850/write.c (write): Likewise.
-
- * libc/sys/sysnecv850/crt0.S: Don't try to zero out an empty
- .bss.
-
-Fri Aug 30 11:18:45 1996 Michael Meissner <meissner@tiktok.cygnus.com>
-
- * libc/include/sys/config.h: Define INT_MAX, UINT_MAX
- appropriately for D10V, depending on -mint16/-mint32.
-
-Thu Aug 29 16:09:37 1996 Mark Alexander <marka@cygnus.com>
-
- * configure.in: Add cases for D10V.
-
-Thu Aug 29 17:03:23 1996 Michael Meissner <meissner@tiktok.cygnus.com>
-
- * configure.in (i[345]86-*-*): Recognize i686 for pentium pro.
-
-Wed Aug 28 21:05:52 1996 Jeffrey A Law (law@cygnus.com)
-
- * libc/include/machine/ieeefp.h: Fix typo.
-
-Wed Aug 28 19:47:55 1996 Mark Alexander <marka@cygnus.com>
-
- * libc/sys/d10v: New directory for D10V stuff.
- * libc/include/machine/ieeefp.h: Add D10V defines.
-
-Mon Aug 26 13:34:58 1996 Doug Evans <dje@canuck.cygnus.com>
-
- * libc/include/sys/errno.h: Add winsup/include/sys/errno.h values:
- ELOOP, ENOBUFS, EAFNOSUPPORT, EPROTOTYPE, ENOTSOCK, ENOPROTOOPT,
- ESHUTDOWN, ECONNREFUSED, EADDRINUSE, ECONNABORTED, EWOULDBLOCK.
- * libc/string/strerror.c (strerror): Add them.
-
-Thu Aug 22 16:38:19 1996 Jeffrey A Law (law@cygnus.com)
-
- * libc/sys/sysnecv850: New directory for v850 stuff.
-
- * libc/machine/v850: New directory for v850 stuff.
- * libc/machine/v850/setjmp.S: setjmp/longjmp support.
-
- * configure.in: Add support for the v850.
-
- * libc/include/machine/ieeefp.h: Add v850 defines.
- * libc/include/machine/setjmp.h: Likewise.
- * libc/include/sys/config.h: Add v850 defines.
-
-Sat Aug 17 04:06:36 1996 Geoffrey Noer <noer@cygnus.com>
-
- * libc/include/machine/ieeefp.h
- * libc/include/machine/setjmp.h
- * libc/include/sys/fcntl.h
- * libc/include/sys/signal.h
- * libc/include/sys/types.h
- * libc/stdlib/system.c:
- Fix preprocessor defines to match new scheme (_WIN32 for WIN32
- API availability, __CYGWIN32__ for cygwin32 environment specific).
-
-Thu Aug 15 17:09:21 1996 Geoffrey Noer <noer@cygnus.com>
-
- * libc/include/stdlib.h: add multibyte character functions. Add
- __eprintf for assert.
-
-Thu Aug 15 11:15:40 1996 Michael Meissner <meissner@tiktok.cygnus.com>
-
- * libc/stdlib/malloc.h (MALLOC_ALIGNMENT): Use either pointer
- arithmetic or __alignof__ to properly get the alignment, instead
- of hardwiring it to 4.
-
-Wed Aug 14 23:43:28 1996 Geoffrey Noer <noer@cygnus.com>
-
- * libc/stdio/fseek.c: add fflush call to adjust seek offset
- on append stream (fix from NetBSD sources), adjust curoff offset
- for ungetc's benefit.
- * libc/stdio/ftell.c: adjust curoff offset for ungetc's benefit.
- * libc/stdio/rewind.c: replace code with up to date NetBSD
- code to undo hacks made to work around above problem of not
- having fflush call mentioned above
-
-Fri Aug 2 18:28:07 1996 J.T. Conklin <jtc@rtl.cygnus.com>
-
- * libc/reent/{closer.c, execr.c, fstatr.c, linkr.c, lseekr.c,
- openr.c, readr.c, sbrkr.c, signalr.c, statr.c, timer.c, writer.c}:
- Partially revert last changes. The thread specific errno is set
- iff if the underlying syscall fails and the global errno is not
- zero.
-
-Fri Jul 19 11:41:52 1996 J.T. Conklin <jtc@rtl.cygnus.com>
-
- * libc/reent/filer.c: Removed files, all functions have split out
- into their own files.
- * libc/reent/{closer.c, lseekr.c, openr.c, readr.c, writer.c}:
- New files containing functions formally in filer.c
- * libc/reent/Makefile.in: Updated for above change.
-
- * libc/reent/execr.c (_fork_r, _wait_r): Set errno if underlying
- syscall fails, not if errno is changed.
- * libc/reent/filer.c (_open_r, _close_r, _lseek_r, _read_r,
- _write_r): Likewise.
- * libc/reent/fstatr.c (_fstat_r): Likewise.
- * libc/reent/linkr.c (_link_r, _unlink_r): Likewise.
- * libc/reent/sbrkr.c (_sbrk_r): Likewise.
- * libc/reent/signalr.c (_kill_r): Likewise.
- * libc/reent/statr.c (_stat_r): Likewise.
- * libc/reent/timer.c (_gettimeofday_r): Likewise.
-
- * libc/reent/{execr.c, filer.c, fstatr.c, linkr.c, sbrkr.c,
- signalr.c, statr.c, timer.c} (errno): declare extern rather
- than as a common.
-
- * libc/stdio/vfprintf.c (__sbprintf): Use the VFPRINTF macro
- instead of calling vfprintf so that i*printf will not require
- floating point support code.
-
-Mon Jul 15 16:50:59 1996 Doug Evans <dje@canuck.cygnus.com>
-
- * libc/posix/execvp.c (execvp): Use posix_path_list_p to determine
- path delimiter.
- * libc/include/sys/unistd.h (_SC_PATH_RULES): Delete.
- (_PATH_RULES_{UNKNOWN,WIN32,POSIX}): Delete.
-
-Thu Jul 11 14:34:14 1996 Geoffrey Noer <noer@cygnus.com>
-
- * libc/include/signal.h: _sig_func_ptr function takes an int
- * libc/include/sys/signal.h: sa_handler function takes an int
-
-Tue Jul 9 21:22:32 1996 Jeffrey A Law (law@cygnus.com)
-
- * libc/include/machine/ieeefp.h: Simplify H8/S support.
- * libc/include/sys/config.h: Add missing H8/S conditional.
-
-Sun Jun 30 12:05:46 1996 Doug Evans <dje@canuck.cygnus.com>
-
- * libc/include/sys/unistd.h (MAXPATHLEN): Add cygwin32 value.
-
-Wed Jun 26 09:57:54 1996 Jeffrey A Law (law@cygnus.com)
-
- * libc/include/machine/setjmp.h: Handle H8/S.
- * libc/include/machine/ieeefp.h: Likewise.
- * libc/include/sys/config.h: Likewise.
- * libc/machine/h8300/{defines.h, memcpy.S, memset.S}: Likewise.
- * libc/machine/h8300/{reg_memcpy.S, reg_memset.S}: Likewise.
- * libc/machine/h8300/{strcmp.S, setjmp.S}: Likewise.
- * libc/sys/h8300hms/crt0.S: Likewise.
-
-Tue Jun 25 23:15:45 1996 Jason Molenda (crash@godzilla.cygnus.co.jp)
-
- * Makefile.in (datadir): Set to $(prefix)/share.
- (oldincludedir, docdir): Removed.
- * doc/Makefile.in (datadir): Set to $(prefix)/share.
- (oldincludedir, docdir): Removed.
- * libc/Makefile.in (datadir): Set to $(prefix)/share.
- (oldincludedir, docdir): Removed.
- * libm/Makefile.in (datadir): Set to $(prefix)/share.
- (oldincludedir, docdir): Removed.
-
-Fri Jun 21 19:24:41 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * libc/include/sys/reent.h (_REENT_INIT): Update for change to
- _reent struct.
-
-Wed Jun 19 14:00:09 1996 Doug Evans <dje@canuck.cygnus.com>
-
- * libc/posix/execvp.c: Delete _WIN32 support. For __CYGWIN32__
- fetch current path rules with sysconf and handler posix/win32
- appropriately.
-
- * libc/include/sys/unistd.h (_PATH_RULES{,_POSIX,_WIN32}): Define.
-
- * libc/include/process.h: Prepend '_' to P_{WAIT,NOWAIT,OVERLAY}.
- (WAIT_CHILD): Always define.
-
-Sat Jun 15 17:50:42 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * libc/stdlib/eprintf.c: New file.
- * libc/stdlib/Makefile.in (OFILES): Add eprintf.o.
- (eprintf.o): New target.
-
-Thu Jun 13 16:44:32 1996 Doug Evans <dje@canuck.cygnus.com>
-
- * libc/sys/cygwin32/crt0.c (__cygwin_crt0_bp): New global.
- (mainCRTStartup): Do int3 if __cygwin_crt0_bp non-zero.
-
-Thu Jun 13 17:45:17 1996 Mike Meissner <meissner@rtl.cygnus.com>
-
- * libc/include/machine/ieeefp.h: Add support for AIX and Windows
- NT in PowerPC endianess cases.
-
-Tue Jun 11 12:26:28 1996 Michael Meissner <meissner@tiktok.cygnus.com>
-
- * libc/include/machine/ieeefp.h: Clean up PowerPC endianess.
-
-Thu Jun 6 11:34:20 1996 Michael Meissner <meissner@tiktok.cygnus.com>
-
- * libc/string/strtok.c: Fix doc typo.
-
-Mon Jun 3 11:30:00 1996 J.T. Conklin <jtc@rtl.cygnus.com>
-
- * libc/include/sys/reent.h (struct _reent): Removed _asctime,
- _next, _scanpoint, _signgam fields.
-
- * libc/include/stdlib.h (rand_r): Added new declaration.
- (_rand_r, _srand_r): Removed declarations.
- * libc/stdlib/rand.c (_rand_r, _srand_r): Removed, these functions
- have been made obsolete by rand_r.
- * libc/stdlib/rand_r.c: New file, rand_r function as specified
- by POSIX.1c.
-
- * libc/string/strtok.c: Update documentation to describe
- strtok_r().
-
-Sat Jun 1 23:50:39 1996 Michael Meissner <meissner@cygnus.com>
-
- * libc/include/sys/stat.h (stat structure): Use the expanded stat
- structure on Solaris, and PowerPC systems even though __svr4__ is
- defined.
-
-Tue May 28 13:02:42 1996 Doug Evans <dje@canuck.cygnus.com>
-
- * libc/sys/go32/sys/errno.h (ENOSYS,ESPIPE): Keep values <= 255.
-
-Fri May 17 10:34:44 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * host/any: Use ../.. rather than .. to get to the main build
- directory. This matches the current layout of the build
- directory.
-
-Wed May 15 15:52:27 1996 Jeffrey A Law (law@cygnus.com)
-
- * libc/machine/h8300/__main.S: Delete. No longer needed.
- * libc/machine/h8300/Makefile.in: Corresponding changes.
- * libc/sys/h8300hms/crt1.c: New file.
- * libc/sys/h8300hms/Makefile.in: Corresponding changes.
- * libc/sys/h8300hms/crt0.s: Call __main.
-
- * libc/sys/h8300hms/crt0.S: Use temporary label names
- for branch targets.
-
-Mon May 13 14:26:30 1996 Doug Evans <dje@canuck.cygnus.com>
-
- * libc/stdio/fopen.c (_fopen_r): Fix arguments to fseek.
-
-Fri May 3 16:38:23 1996 Michael Meissner <meissner@tiktok.cygnus.com>
-
- * libc/reent/impure.c (_impure_ptr): Force the impure pointer into
- .sdata on the PowerPC so that we can link newlib with code
- compiled with -msdata.
-
-Mon Apr 29 21:38:02 1996 Doug Evans <dje@canuck.cygnus.com>
-
- * libc/sys/arm/syscalls.c (_sbrk): Rename end to __end__.
-
-Thu Apr 25 06:38:59 1996 Michael Meissner <meissner@cygnus.com>
-
- * libc/sys/cygwin32/crt0.c (mainCRTStartup): On PowerPC, set the
- exception handler to __cygwin_exception_handler.
-
-Tue Apr 23 15:14:20 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * libc/include/machine/setjmp.h: Check _AM29K, not ___AM29K__.
-
-Sun Apr 21 12:11:51 1996 Doug Evans <dje@blues.cygnus.com>
-
- * libm/math/Makefile.in ({w,wf}_cabs.o,{w,wf}_drem.o): Add rule for
- SunOS VPATH.
- * libc/stdlib/Makefile.in (atoff.o,atol.o,mblen.o,mbstowcs.o,
- wcstombs.o): Likewise.
-
-Thu Apr 18 12:37:01 1996 Doug Evans <dje@canuck.cygnus.com>
-
- * libc/stdlib/environ.c (initial_env): New static local.
- (environ): Point to `initial_env'.
-
- * libc/include/machine/setjmp.h: Clean up.
- (__H8300H__,__PPC__): Define _JBTYPE.
- (__arm__): Provide entry for.
- (sigjmp_buf): Delete.
- (jmp_buf): Use _JBTYPE if defined, otherwise int.
-
-Thu Apr 18 12:10:52 1996 Jeffrey A Law (law@cygnus.com)
-
- * libc/machine/h8300/strcmp.S: Sign extend the result to
- 32bits so we don't lose with -mint32.
-
-Sun Apr 14 19:59:52 1996 Doug Evans <dje@canuck.cygnus.com>
-
- * libc/sys/go32/sys/errno.h: New file.
- * libc/sys/go32/Makefile.in (stat.o): Depend on stat.c.
- * libc/sys/go32/gerrno.s (syscall_error): Call __errno to get
- errno's address (make compatible with rest of newlib).
- * libc/sys/go32/stat.c (fixinode): Set errno upon failure.
- * libc/string/strerror.c (strerror): Surround each case with #ifdef.
-
-Thu Mar 28 13:44:42 1996 Doug Evans <dje@canuck.cygnus.com>
-
- * libc/machine/sparc/{scan.c,shuffle.c}: New files.
- * libc/machine/sparc/Makefile.in: Build them.
- * libc/machine/sparc/machine/sparclet.h: New file.
-
-Mon Mar 25 15:29:14 1996 J.T. Conklin <jtc@rtl.cygnus.com>
-
- * libc/machine/sh/asm.h: New file.
- * libc/machine/sh/setjmp.S: Only save clobbered registers. Added
- support for SH3e's FP registers. Use asm.h.
-
-Mon Mar 25 11:59:23 1996 Jeffrey A Law (law@cygnus.com)
-
- * libc/stdio/vfprintf.c (cvt): Accept a reent structure
- as first argument. Call _dtoa_r and pass the reent structure
- instead of calling __dtoa.
-
-Fri Mar 22 13:59:37 1996 Jeffrey A Law (law@cygnus.com)
-
- * libc/include/sys/config.h: Define DOUBLE_IS_32BITS for
- the h8300, h8500, and others. Add comments for some rather
- dubious code.
-
-Thu Mar 14 18:04:43 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * Makefile.in (check): Check that testsuite exists before cd.
-
-Tue Mar 12 11:46:47 1996 Michael Meissner <meissner@tiktok.cygnus.com>
-
- * libc/include/string.h (strsep): Correct prototype.
-
-Mon Mar 11 09:55:19 1996 Doug Evans <dje@charmed.cygnus.com>
-
- * libc/sys/h8300/_exit.c (_exit,__exit): Set r0 to 0 before `sleep'.
- * libc/sys/h8300/misc.c (_kill): Set r0 to indicate abort and `sleep'.
- * libc/sys/h8300/crt0.S (_start): Call exit instead of `sleep'.
-
-Wed Mar 6 11:51:55 1996 Doug Evans <dje@charmed.cygnus.com>
-
- * libc/posix/{creat.c,isatty.c}: New files.
- * libc/posix/Makefile.in (OFILES): Add creat.o, isatty.o.
-
- * libc/sys/sparc64/crt0.S (environ): Delete.
- (.LHaveBias): Renamed from HaveBias.
-
-Thu Feb 15 10:48:37 1996 Doug Evans <dje@charmed.cygnus.com>
-
- * libc/stdlib/mallocr.c (etext): Move decl inside ifdef WARN_VLIMIT.
- (_morecore_r): Delete SBRK_IS_ALLOC support.
-
-Tue Feb 13 09:44:09 1996 Michael Meissner <meissner@tiktok.cygnus.com>
-
- * libc/sys/cygwin32/Makefile.in (lib.a): Make lib.a with a dummy
- module rather than touch, so we don't get warning messages when
- all of the libraries are combined into libc.a.
-
-Tue Feb 13 06:32:07 1996 Doug Evans <dje@charmed.cygnus.com>
-
- * libc/sys/sparclite/{Makefile.in,crt0.s}: Deleted.
- crt0.s replaced by version in libgloss.
-
-Mon Feb 5 15:17:51 1996 J.T. Conklin <jtc@rtl.cygnus.com>
-
- * libc/reent/Makefile.in (OFILES): Add impure.o.
- * libc/reent/impure.o: New file, define initial reentrancy struct.
- * libc/reent/reent.c: Remove above definition.
-
- * libm/math/sf_asinh.c: Fix typo.
-
- * Makefile.in (MATHOBJS_IN_LIBC): Removed sr_ldexp.o and
- srf_ldexp.o.
-
- * libm/libm.texinfo: Change documentation to reflect changes
- in reentrancy model.
- * libm/math/w_gamma.c: Likewise.
-
-Wed Jan 31 18:49:45 1996 Steve Chamberlain <sac@slash.cygnus.com>
-
- * configure.in (*-*-cygwin32): New.
- (*-*-win32): Deleted.
- * libc/sys/win32 renamed libc/sys/cygwin32.
-
-Tue Jan 30 22:09:03 1996 Michael Meissner <meissner@tiktok.cygnus.com>
-
- * libc/include/sys/file.h: New include file.
-
-Fri Jan 26 15:52:54 1996 Steve Chamberlain <sac@slash.cygnus.com>
-
- * libc/include/machine/setjmp.h: Increase size of PPC jmp_buf.
-
-Tue Jan 23 17:49:16 1996 Steve Chamberlain <sac@slash.cygnus.com>
-
- * libc/include/sys/wait.h (WIFSIGNALED): Fix.
-
-Tue Jan 16 09:28:10 1996 Michael Meissner <meissner@tiktok.cygnus.com>
-
- * doc/makedoc.c (realloc): Declare at file scope.
- (catchar): Not here.
-
-Wed Dec 27 15:45:23 1995 Doug Evans <dje@canuck.cygnus.com>
-
- * Makefile.in (VERSION): Update to 1.7.0.
- * {libc,libm}/Makefile.in (VERSION): Likewise.
- * configure.in: Minor clean up of multilib stuff.
-
- From David Johnson <davidj@ICSI.Berkeley.EDU>
- * {libc,libm}/Makefile.in (lib[cm].a): Delete library first.
-
- * libc/stdlib/environ.c: New file.
- * libc/stdlib/Makefile.in (OFILES): Build it.
- * libc/sys/h8500hms/crt0.c (environ): Deleted.
- * libc/sys/m88kbug/crt0.c (environ): Deleted.
- * libc/sys/z8ksim/crt0.c (environ): Deleted.
- * libc/sys/netware/environ.c: Deleted.
-
-Tue Dec 19 15:24:46 1995 Kim Knuttila <krk@cygnus.com>
-
- * configure.in (links): set sys_dir, posix_dir, syscall_dir
-
-Wed Dec 13 04:16:25 1995 Michael Meissner <meissner@wogglebug.tiac.net>
-
- * doc/makedoc.c (init_string_with_size,nextword): Move malloc
- declaration out to external scope and declare it PTR, not char *.
-
-Mon Dec 11 17:35:12 1995 steve chamberlain <sac@slash.cygnus.com>
-
- * libc/include/sys/unistd.h (getpagesize): New declaration.
- (_SC_PAGESIZE): New definition.
- * libc/include/time.h (CLK_TCK): Defined as CLOCKS_PER_SEC.
- * libc/configure.in (i[345]86-*-win32): Remove -DNO_FORK.
-
-Fri Dec 1 16:48:46 1995 James G. Smith <jsmith@cygnus.co.uk>
-
- * libc/sys/vr4300/syscalls.c (sbrk): Fixed memory
- addressing. System call returns size, not (last address + 1).
-
-Thu Nov 30 15:05:26 1995 J.T. Conklin <jtc@rtl.cygnus.com>
-
- * libm/math/*.c: Removed _foo_r() reentrancy API.
- * libc/include/math.h: Removed _foo_r prototypes and macros.
-
- * libm/math/*.c: On systems with IEEE single precision "doubles"
- move foo() -> foof() wrapper code from the files that implement
- the standard IEEE double precision functions to the files that
- implement IEEE single precision functions. (ie. On those systems
- sin is moved from s_sin.c to sf_sin.c). There should eventually
- be use of a C extension (like gcc's alias attribute) so that the
- wrappers are not needed at all.
-
- * libc/sys/sysnec810/sbrk.c: Cast &end to char * to get around
- strict NEC V810 compiler.
- * libc/misc/dprintf.c (getnumber): Cast char * to unsigned char *
- for same reason.
-
-Wed Nov 29 14:25:05 1995 J.T. Conklin <jtc@rtl.cygnus.com>
-
- * libc/stdlib/strtol.c (_strtol_r): Replaced with implementation
- from NetBSD C library.
- * libc/stdlib/strtoul.c (_strtoul_r): Likewise.
-
- * libc/stdlib/assert.c (__assert): Renamed from __assertfail
- and adapted from implementation I wrote for NetBSD C library.
- The difference is __assert doesn't take a format argument,
- so that there won't be multiple copies of the same string
- constant in the executable if assertions are enabled in
- more than one source module.
- * libc/include/assert.h (assert): Changed to call __assert.
-
-Tue Nov 28 16:54:26 1995 J.T. Conklin <jtc@rtl.cygnus.com>
-
- * libc/stdlib/strtod.c (_strtod_r): Changed to not assign to
- word1 on systems with 32 bit doubles.
- * libc/stdlib/qsort.c (qsort): Cast some void *'s to char *'s
- so that we can do arithmetic on them.
- * libc/misc/dprintf.c: Changed to support stdarg.h for ANSI
- compilers.
-
-Tue Nov 28 16:03:32 1995 Doug Evans <dje@canuck.cygnus.com>
-
- * libc/sys/arm/crt0.S: Zero bss.
-
-Fri Nov 24 16:09:23 1995 Doug Evans <dje@deneb.cygnus.com>
-
- * libc/include/unctrl.h: New file.
- * libc/misc/{Makefile.in,dprintf.c,unctrl.c,misc.tex}: New files.
- * configure.in (subdirs): Add libc/misc.
- * libc/Makefile.in (SUBDIRS): Add misc.
- (SUBLIBS): Add misc/lib.a.
-
- * libc/include/sys/reent.h (struct _reent): Make __sf last member.
-
-Wed Nov 22 19:49:47 1995 Doug Evans <dje@deneb.cygnus.com>
-
- * libc/stdio/vfprintf.c (__sbprintf): Init fake._data.
- (_vfprintf_r): Call CHECK_INIT.
-
-Tue Nov 14 02:52:12 1995 Doug Evans <dje@canuck.cygnus.com>
-
- * Makefile.in (MULTITOP): Delete.
- (MULTISRCTOP, MULTIBUILDTOP): Add.
- * configure.in: Delete call to cfg-ml-com.in. Call config-ml.in
- instead of cfg-ml-pos.in.
-
-Wed Nov 8 01:24:08 1995 James G. Smith <jsmith@pasanda.cygnus.co.uk>
-
- * libc/sys/vr4300/syscalls.c: Added clean version of sbrk().
- * libc/sys/vr4300/crt0.S: Cleaned up. Added check for FPU
- presence.
-
-Thu Nov 2 22:25:06 1995 Michael Meissner <meissner@tiktok.cygnus.com>
-
- * libc/string/strtok.c: Include string.h to pick up strtok_r
- prototype.
-
-Wed Nov 1 18:54:11 1995 Jason Molenda (crash@phydeaux.cygnus.com)
-
- * libc/string/strtok.c: include <_ansi.h>.
- * libc/time/asctime_r.c: `reresult' -> `result'.
-
-Wed Nov 1 14:35:52 1995 J.T. Conklin <jtc@rtl.cygnus.com>
-
- * libc/time/{ctime.c, gmtime.c, lcltime.c}: Wrap functions
- in #ifndef _REENT_ONLY ... #endif conditional.
-
- * libc/include/string.h (_strtok_r): Remove declaration.
- * libc/include/time.h (_asctime_r): Remove declaration.
- * libc/string/strtok.c (_strtok_r): Removed.
- * libc/time/asctime.c (_asctime_r): Removed.
-
- * libc/string/Makefile.in (OFILES): Add new object.
- * libc/string/strtok_r.c: New file. strtok_r function as
- specified by POSIX.1c, adapted from strtok implementation
- from NetBSD C library.
- * libc/string/strtok.c (strtok): Reimplemented in terms of
- strtok_r.
-
- * libc/time/Makefile.in (OFILES): Add new objects.
- * libc/time/{asctime_r.c, ctime_r.c, gmtime_r.c, lcltime_r.c}:
- New files, reentrant time functions specified by POSIX.1c.
- * libc/time/{asctime.c, ctime.c, gmtime.c, lcltime.c}: Non-
- reentrant time functions re-written in terms of reentrant
- functions.
- * libc/time/lcltime.c: Renamed from localtime.c
-
- * libc/include/time.h: Add prototypes for asctime_r, ctime_r,
- gmtime_r, and localtime_r.
-
-Sat Oct 28 14:34:31 1995 steve chamberlain <sac@slash.cygnus.com>
-
- * libc/sys/win32/crt0.c (mainCRTStartup): Call cygwin_crt0.
- * libc/include/sys/unistd.h (getlogin): Revert change of
- Oct 19.
- * libc/include/sys/signal.h (sigprocmask): Change prototype
- so it compiles with c++.
-
-Wed Oct 25 15:43:18 1995 Michael Meissner <meissner@cygnus.com>
-
- * libc/include/machine/setjmp.h (PowerPC _JBLEN): Consider it a
- PowerPC if __PPC__ is defined. Bump jump_buf length to 62 ints,
- to give some room in case we need to align the jmp_buf.
-
- * libc/machine/powerpc/setjmp.S (setjmp, longjmp): Rewrite to use
- the new ppc-asm.h include file the compiler provides to specify
- function prologue/epilogue. Eliminate saves of the xer and ctr
- registers, which are volatile. Before starting to save registers,
- align to 8 byte boundary.
-
-Mon Oct 23 11:20:51 1995 James G. Smith <jsmith@pasanda.cygnus.co.uk>
-
- * libc/sys/vr4300/syscalls.c: Added empty kill() function,
- referenced by standard libraries.
-
-Thu Oct 19 21:39:47 1995 Fred Fish <fnf@cygnus.com>
-
- * libc/unix/Makefile.in, libc/string/Makefile.in,
- libc/stdio/Makefile.in, libc/reent/Makefile.in,
- libc/posix/Makefile.in:
- Remove tabs from otherwise empty line. Confuses some
- older non-GNU versions of "make".
-
-Thu Oct 19 16:32:17 1995 steve chamberlain <sac@slash.cygnus.com>
-
- * libc/sys/unistd.h (getlogin): Returns const char *.
-
-Wed Oct 18 12:57:50 1995 steve chamberlain <sac@slash.cygnus.com>
-
- * libc/include/fcntl.h (O_BINARY, O_TEXT): New.
- * libc/include/errno.h: Moved into and include...
- * libc/include/sys/errno.h: New file.
- * libc/include/sys/wait.h: New file.
- * libc/stdio/rename.c (_rename_r): Use _rename system call if available.
- * libc/sys/win32/*: Moved out.
- * libc/sys/win32/crt0.c: Rewritten to cope with shared library.
- * configure.in (i[345]86-*-win32): HAVE_RENAME
-
-Wed Oct 18 09:58:27 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
-
- * libc/unix/sigset.c (sigemptyset, sigaddset): Prefix #undef to
- avoid macro expansion for these two names.
-
-Tue Oct 17 08:45:33 1995 Doug Evans <dje@canuck.cygnus.com>
-
- * libc/machine/h8500/psi.S: r6 renamed to fp.
-
-Sun Oct 15 12:58:10 1995 Michael Meissner <meissner@wogglebug.tiac.net>
-
- * configure.in (powerpc*): No longer need to define
- NO_LONGLONG_POINTERS to supress warnings.
-
-Sat Oct 14 12:55:08 1995 Jim Wilson <wilson@chestnut.cygnus.com>
-
- * libc/reent/reent.c (_reclaim_reent): Call cleanup indirectly
- through PTR instead of directly.
-
- * libc/sys/sh/crt0.S: Clean up formatting. Delete unused
- non-standard constructor support.
-
-Thu Oct 12 11:39:42 1995 J.T. Conklin <jtc@rtl.cygnus.com>
-
- * libc/stdlib/dtoa.c (_dtoa_r): Set result pointer to the
- address of the Bigint instead of the address of its _x field,
- as the size the result buffer was calculated accordingly.
- Fix from Jim Wilson <wilson@chestnut@cygnus.com>.
-
- * libc/stdlib/{div.c, ldiv.c}: Replaced with implementation
- from NetBSD C library. No longer special cases division by
- zero (which needs to be done by the application anyway), but
- it doesn't need to call abs() (or labs()) four times either.
-
- * libc/stdlib/qsort.c: Replaced with implementation from
- NetBSD C library.
-
-Tue Oct 10 14:01:10 1995 J.T. Conklin <jtc@rtl.cygnus.com>
-
- * libc/stdio/vfprintf.c: Replaced with implementation from
- NetBSD C library (which is derived from the 4.4BSD C library).
- * libc/stdio/cvt.c: Removed.
- * libc/stdio/Makefile: Updated.
-
-Tue Oct 10 12:15:23 1995 steve chamberlain <sac@slash.cygnus.com>
-
- * libc/sys/win32/syscalls.c (rename): New.
- * libc/sys/win32/include/winkernel.h (MoveFileExA): New.
-
-Fri Oct 6 12:18:43 1995 Jim Wilson <wilson@chestnut.cygnus.com>
-
- * libc/machine/sh/Makefile.in (setjmp.o): Depend on setjmp.S.
- * libc/machine/sh/setjmp.S: Rename from setjmp.s.
-
- * libc/sys/sh/Makefile.in (OFILES, all): Delete setjmp.o.
- (setjmp.o): Delete rule to build setjmp.o.
- * libc/sys/sh/setjmp.S: Delete file.
-
-Fri Oct 6 11:19:05 1995 J.T. Conklin <jtc@rtl.cygnus.com>
-
- * libc/stdlib/mprec.c (d2b): Added support for _DOUBLE_IS_32BITS.
- * libc/stdlib/mprec.h: Fixed constants used for IEEE single float
- format. Added #defines to map d2b, i2b, low0bits, lshift, mult,
- pow5mult and s2b to identifiers with leading underscores.
- * libc/stdlib/Makefile.in: Add mprec.h as a dependency to dtoa.o,
- ecvtbuf.o, mprec.o and strtod.o. Sort dependencies.
-
-Thu Oct 5 17:27:30 1995 steve chamberlain <sac@slash.cygnus.com>
-
- * libc/sys/posix/popen.c (sys/types.h): Include.
-
-Thu Oct 5 16:33:01 1995 Doug Evans <dje@canuck.cygnus.com>
-
- * libc/sys/win32/syscalls.h (fhandler): New struct.
- (__lookup_fhandler, __lookup_fhandler_hook): Declare.
- (__fhandler_normal): Declare.
- (hinfo): New member op_handlers.
- * libc/sys/win32/syscalls.c (__read): Don't validate fd.
- (__write): Likewise.
- (_read, _write, _open, _close, _lseek): Validate fd here.
- Move file type specific stuff to foo_normal.
- (read_normal, write_normal, open_normal, close_normal, lseek_normal):
- New functions.
- (__lookup_fhandler): New function.
- (__lookup_fhandler_hook, __fhandler_normal): New variables.
-
- From anders.blomdell@control.lth.se (Anders Blomdell)
- * libc/sys/win32/crt0.c (vfork_init): Unset __FD_TABLE__.
- Don't touch standard handles.
- * libc/sys/win32/spawn.c (_spawn): Use STARTF_USESTDHANDLES.
- (_execve): Only create __FD_TABLE__ if necessary.
- * libc/sys/win32/include/winkernel.h (STARTF_*): Define.
-
-Thu Oct 5 14:25:14 1995 steve chamberlain <sac@slash.cygnus.com>
-
- * libc/sys/win32/sys/termios.h (FLUSHO): New.
- * libc/sys/win32/include/win*.h: Moved a load of prototypes around.
- * libc/sys/win32/pipe.c (_fctnl): Ignore F_SETFL without errors.
- * libc/sys/win32/exception.c (ehandler3): set strace when a signal
- without a handler is received.
- * libc/sys/win32/Makefile.in: Remove --nodelete.
- * libc/sys/win32/resouce.c (gettimeofday): New.
- * libc/sys/win32/syscalls.c (path_to_real_path): New.
- * libc/sys/win32/syscalls.h (include/wincon.h): Don't include.
-
-Wed Oct 4 13:10:35 1995 Doug Evans <dje@canuck.cygnus.com>
-
- * libc/sys/win32/dirsearch.c (opendir): stat real path name.
- Don't append "/*" to search pattern if trailing '/' already there,
- append "*".
- * libc/sys/win32/spawn.c (_spawn): CreateProcess doesn't seem to
- like /'s, convert them to \'s. Handle //<drive>/ path names.
- Add space for quoted \'s in arg string. Print translated prog name
- and original prog name.
- (_execve): Handle parent doing exec a teensy bit better.
- * libc/sys/win32/syscalls.h (__path_to_real_path): Update prototype.
- * libc/sys/win32/syscalls.c (__path_to_real_path): Don't assume
- path needs conversion, handle both cases. Delete `const' from result.
- (hash_path_name): New function.
- (_open): Call it.
- (_stat): Likewise. Fill in more fields for directories.
- * libc/sys/win32/wait.c (_wait): Explicitly pass -1 to waitpid.
- (wait_for_any): Fix trace message.
- (waitpid): Explicitly test for intpid == 0.
-
- From anders.blomdell@control.lth.se (Anders Blomdell)
- * libc/sys/win32/spawn.c (__vfork_get_empty_entry): zero fill result
- so `next' is valid.
-
-Sat Sep 30 15:00:15 1995 Jason Molenda (crash@phyeaux.cygnus.com)
-
- * libc/sys/win32/spawn.c (_spawn): Make quoting rules more
- complicated.
-
-Sat Sep 30 10:25:57 1995 Jason Molenda (crash@phydeaux.cygnus.com)
-
- * libc/include/_ansi.h: set _HAVE_STDC if __STDC__ is defined
- at all, not just == 1.
- * libm/math/wf_acos.c (acosf): check for _HAVE_STDC, not __STDC__.
-
-Sat Sep 30 04:30:09 1995 Jason Molenda (crash@phydeaux.cygnus.com)
-
- * libc/sys/win32/include/winbase.h: include <wintypes.h> and <winnt.h>
- * libc/sys/win32/include/wintypes.h: include <winnt.h>
- * libc/sys/win32/include/winnt.h: avoid multiple inclusion of this
- file.
-
-Fri Sep 29 01:49:17 1995 steve chamberlain <sac@slash.cygnus.com>
-
- * libc/sys/syscalls.c (getcwd): Fix off by one error.
-
- * libc/sys/signal.c (sleep): Fill it in.
- * libc/sys/termios.c (tcflush): Use PurgeComm
- (tcsetattr): Set some more of the bits.
- * libc/sys/include/winkernel.h: Add PurgeComm and Sleep.
-
-Fri Sep 29 04:33:53 1995 Doug Evans <dje@deneb.cygnus.com>
-
- * libc/sys/arm/crt0.S (fp): Initialize to 0.
- Conditionally include .idata$3 stuff ifdef __pe__.
-
-Fri Sep 29 01:49:17 1995 steve chamberlain <sac@slash.cygnus.com>
-
- * libc/sys/win32/crt0.c (hmap_init): Call __init_hinfo.
- * libc/sys/win32/pipe.c (pipe): Ditto.
- * libc/sys/win32/syscalls.c (__read): Use new vtime and vmin fields.
- * libc/sys/win32/syscalls.h (hinfo): vtime, vmin are new.
- * libc/sys/win32/termios.c (tcsetattr): Init new fields.
- (tcgetattr): Contents are new.
- * libc/sys/win32/include/winkernel.h (DCB): New.
- (GetCommState, SetCommState): New.
-
-Thu Sep 28 16:29:09 1995 Doug Evans <dje@deneb.cygnus.com>
-
- * libc/sys/arm/crt0.S (_start): Define.
-
-Thu Sep 28 12:26:45 1995 steve chamberlain <sac@slash.cygnus.com>
-
- * libc/sys/arm/crt0.S: Move stack to top of RAM on PIE board.
- * libc/sys/arm/syscalls.c (_read, _write): Use the SWI properly.
-
- * libc/sys/win32/sysconf.c: New
- * libc/sys/win32/sys/winadvapi.h: New
- * libc/sys/win32/syscalls.h (hinfo): Added timeout_len, w_binary, r_binary.
- * libc/sys/win32/crt0.c (hmap_init): Initialize new fields.
- * libc/sys/win32/pipe.c (pipe): Ditto.
- * libc/sys/win32/signal.c (_raise): New.
- (_kill): Moved from spawn.c
- * libc/sys/win32/spawn.c (kill): Moved to signal.c
- * libc/sys/win32/syscalls.c (__read): Use new fields.
- (_open): Ditto.
- * libc/sys/win32/termios.c (tcflush, tcsetattr, tcgetattr): Fill in.
- * libc/sys/win32/exceptions.c (__stack_trace): Keep going for longer.
- * libc/include/sys/unistd.h (rmdir): Takes const path.
- * libc/include/sys/stat.h (mkdir): Takes const path.
- * libc/include/sys/signal.h (SIGTTOU, SIGTTIN): New for win32.
-
-Thu Sep 28 10:11:27 1995 Doug Evans <dje@canuck.cygnus.com>
-
- * libc/sys/win32/spawn.c (_spawn): Fix quoting.
-
- Add support for specifying paths as //<drive>/foo/bar.
- * libc/sys/win32/syscalls.h (__path_needs_conversion_p): Declare.
- (__path_to_real_path): Declare.
- (PATH_TO_REAL_PATH): New macro.
- * libc/sys/win32/syscalls.c (__win32_pid_to_posix_pid): Minor cleanup.
- (__path_needs_conversion_p, __path_to_real_path): New functions.
- (_open): Fix test for error return from CreateFileA.
- Handle new path syntax.
- (_link, mkdir, rmdir, getcwd, chdir, stat): Handle new path syntax.
- * libc/sys/win32/dirsearch.c (opendir): Likewise.
-
-Wed Sep 27 16:36:46 1995 steve chamberlain <sac@slash.cygnus.com>
-
- * libc/sys/win32/include/*.h: Reorganized
- * libc/sys/win32/include/WINREADME: New.
- * libc/sys/win32/Makefile.in (DLLS): Build version.a.
- * libc/sys/win32/*.c: Fix for new include scheme.
- * libc/sys/win32/crt0.c (__this_uinfo_buf, __this_uinfo): New.
- * libc/sys/win32/getlogin.c (getlogin): Use uinfo.
- * libc/sys/win32/passwd.c (*): Fix.
- * libc/sys/win32/syscalls.c (get[e|][g|u]id): Use passwd info.
- (_stat): Get directory owner and permissions right.
- * libc/sys/win32/syscalls.h (uinfo): New.
- * libc/sys/win32/version.def: Remove leading underscores.
-
-Tue Sep 26 18:18:47 1995 Jason Molenda (crash@phydeaux.cygnus.com)
-
- * libc/sys/win32/key.c: include "include/wincon.h".
-
-Tue Sep 26 07:21:48 1995 steve chamberlain <sac@slash.cygnus.com>
-
- * libc/sys/win32/{key, stubs}.c: New.
- * libc/sys/win32/Makefile: Adjust to cope.
- * libc/sys/win32/crt0.c (vfork_init_first): Cope with -ve pids.
- (environ_init): Change env names to upper case.
- * libc/sys/win32/dirsearch.c (readdir): Don't fill in inode number.
- * libc/sys/win32/passwd.c (*): Fill in the functions.
- * libc/sys/win32/pipe.c (_fcntl): F_GETFL returns O_RDWR.
- * libc/sys/win32/spawn.c (_spawn): Cope with -ve pids.
- * libc/sys/win32/syscalls.c (__win32_pid_to_posix_pid): New function.
- (_open): Initialze hmap->execable_p too.
- * libc/sys/win32/syscalls.c (getuid, getgid, geteuid, getegid): Return from macros.
- (_fstat): Fill in permissions.
- * libc/sys/win32/syscalls.h (hinfo): Add execable_p.
-
-Fri Sep 22 13:47:27 1995 Doug Evans <dje@canuck.cygnus.com>
-
- * configure.in (cfg-ml-com.in invocation): Use ${with_multilib_top}
- if defined.
- (cfg-ml-pos.in invocation): Likewise.
-
-Fri Sep 22 11:43:44 1995 J.T. Conklin <jtc@rtl.cygnus.com>
-
- * Makefile.in (MATHOBJS_IN_LIBC): Added s_isinf.o, sf_isinf.o,
- s_isnan.o and sf_isnan.o.
-
-Wed Sep 20 14:50:19 1995 Ian Lance Taylor <ian@cygnus.com>
-
- * All Makefile.in files: added maintainer-clean target as a
- synonym for realclean.
-
-Wed Sep 20 11:02:50 1995 Jeff Law (law@snake.cs.utah.edu)
-
- * libc/include/machine/setjmp.h: Add hppa support.
- * libc/machine/hppa/setjmp.S: New file with setjmp/longjmp
- support.
- * libc/machine/hppa/Makefile.in: Related changes.
-
-Tue Sep 19 12:09:01 1995 J.T. Conklin <jtc@blues.cygnus.com>
-
- * configure.in (machine_dir): Don't set for v810-*-*.
-
-Fri Sep 15 20:22:08 1995 Jason Molenda (crash@phydeaux.cygnus.com)
-
- * libc/sys/win32/crt0.c (passover): Change to handle MKS quoting
- conventions correctly.
-
-Thu Sep 14 13:37:22 1995 J.T. Conklin <jtc@blues.cygnus.com>
-
- * libc/stdio/puts.c: Update documentation of return value to match
- ANSI standard.
-
-Thu Sep 14 01:52:37 1995 Doug Evans <dje@canuck.cygnus.com>
-
- Fix file descriptor inheritance.
- * libc/sys/win32/syscalls.h (CHILD_P): Define again.
- (NOT_OPEN_FD): Fix.
- * libc/sys/win32/spawn.c (vfork0): Only create inheritable handle if
- close-on-exec flag not set. Initialize child's entire fd table.
- * libc/sys/win32/syscalls.c (_open): Only create inheritable handle if
- CHILD_P.
- * libc/sys/win32/pipe.c (pipe): Only create new handle as inheritable
- if CHILD_P. Initialize entire hmap entry.
- (dup): Only create new handle as inheritable if CHILD_P.
- (dup2): Likewise. Properly initialize hmap entry.
-
- * libc/sys/win32/spawn.c (_execve): Don't pass _P_SEARCH_PATH to
- _spawn.
- (_exit): Use CHILD_P.
- * libc/sys/win32/syscalls.c (_fstat): Fix call to memset.
- (_stat): Likewise.
-
-Mon Sep 11 23:09:39 1995 Jason Molenda (crash@phydeaux.cygnus.com)
-
- * libc/sys/win32/crt0.c (passover): fix up the state table.
- * libc/posix/popen.c: Added.
- * libc/posix/Makefile.in: compile popen.c.
-
-Mon Sep 11 11:43:38 1995 J.T. Conklin <jtc@cygnus.com>
-
- * libc/include/machine/ieeefp.h: On the h8/300, h8/300h and
- h8/500 define _DOUBLE_IS_32BITS.
-
-Sat Sep 9 17:55:54 1995 Doug Evans <dje@canuck.cygnus.com>
-
- Get vfork/exec/spawn/cwait/wait working again.
- * libc/sys/win32/syscalls.h (VFORK_NEWBORN_PSEUDO_PID): Define.
- (procinfo): New member vfork_level.
- * libc/sys/win32/crt0.c (__vfork_next_pid): Delete.
- (vfork_init_first): Use GetCurrentProcessId to get pid.
- Initialize vfork_level.
- (vfork_init): Delete __PID__.
- (environ_init): New function. Undo patch of Aug 19, Posix says
- environment variables are case sensitive.
- (mainCRTStartup): Call it.
- * libc/sys/win32/spawn.c (__vfork_next_pid): Delete.
- (my_longjump: Make static.
- (_spawn): New argument `h'. Delete setting of __PID__.
- Delete local `idx'. Look for chars that need quotes, rather than
- ones that don't. Set handle of created process in `h'.
- Result is process id if created task.
- (allocate_spawn_entry): New function.
- (spawnvp, spawnv): Call it. Store handle and pid in procinfo entry.
- (_execve): Set __FD_TABLE__ before spawning child.
- Scan our fd table when passing fds, not our parent's.
- Store handle and pid in procinfo entry.
- (vfork0): Ensure strace message always printed.
- Set child pid to VFORK_NEWBORN_PSEUDO_PID.
- (vfork): Don't clobber result of vfork0.
- * libc/sys/win32/wait.c (cwait): Fix non-error result (is pid).
- (wait_for_any): Ignore processes in state FORK_STATE_VFORK_0.
-
- * libc/sys/win32/syscalls.h (procinfo): New members `handle_valid_p'
- and `exit_code'.
- * libc/sys/win32/spawn.c (allocate_spawn_entry): Initialize them.
- (vfork0): Likewise. Distinguish children, grandchildren, etc. by
- adding vfork level to pseudo-pid.
- (vfork1): If not root, set state back to FORK_STATE_VFORK_0.
- (spawnvp, spawnv, _execve): Set handle_valid_p if success.
- (_exit): If child, set exit code.
- (__vfork_record_death): Only close process handle if valid.
- * libc/sys/win32/wait.c (wait_for_single): Watch for children that
- didn't exec.
- (wait_for_any): Likewise. Start scan after root entry.
-
-Fri Sep 8 18:48:02 1995 Jason Molenda (crash@phydeaux.cygnus.com)
-
- * libc/include/sys/types.h (off_t): off_t back to 32 bits.
- * libc/include/sys/_types.h (_off_t): _off_t back to 32 bits.
- * libc/sys/win32/syscalls.c (_fstat): st_size is lower 32-bits
- of actual file length.
-
- * libc/sys/win32/sys/wait.h: include <sys/types.h>.
- * libc/include/paths.h: _PATH_BSHELL added.
- * libc/include/sys/unistd.h: define STDIN_FILENO, STDOUT_FILENO,
- and STDERR_FILENO.
-
-Thu Sep 7 21:02:22 1995 Jason Molenda (crash@phydeaux.cygnus.com)
-
- * libc/include/ar.h: Added.
- * libc/include/sys/types.h: ino_t goes back to 32-bits.
- * libc/sys/win32/syscalls.h (hinfo): added .namehash field.
- * libc/sys/win32/syscalls.c (_open): compute .namehash based
- on filename.
- (_fstat): use .namehash for inode number of the fd.
-
-Thu Sep 7 12:57:19 1995 steve chamberlain <sac@slash.cygnus.com>
-
- * libc/sys/win32/{console,ioctl,pipe,spawn,syscalls,wait}.? (*):
- Change hinfo to __this_procinfo.
- * libc/sys/win32/crt0.c: Remove procinfo_list.
-
-Wed Sep 6 18:38:26 1995 Jason Molenda (crash@phydeaux.cygnus.com)
-
- * libc/include/sys/types.h (ino_t): Define ino_t correctly for
- win32 environment.
-
-Wed Sep 6 18:09:29 1995 Jason Molenda (crash@phydeaux.cygnus.com)
-
- * libc/sys/win32/include/grp.h: Removed.
- * libc/sys/include/grp.h: Added.
- * libc/sys/win32/grp.c: Include <grp.h>.
-
-Wed Sep 6 16:52:48 1995 steve chamberlain <sac@slash.cygnus.com>
-
- * libc/include/sys/signal.h (__need_MAX_SIGNALS): Removed.
- (sigset_t, sigaction, SIG_SETMASK, SIG_BLOCK, SIG_UNBLOCK):
- Defined for all but strict ANSI.
- * libc/include/sys/reent.h (__need_MAX_SIGNALS): Removed.
- * libc/include/machine/setjmp.h: Get win32 _JBLEN right.
- * libc/signal/signal.c (_signal_r): Changed from using
- _MAX_SIGNALS to NSIG.
- * libc/sys/win32/crt0.c (__current_pid, __parent_hmap, __child_hmap,
- __hmap): Deleted.
- (__strace, __vfork_next_pid): New.
- (__exe_suffix): Default to 1.
- (passover, table): Understand quoted arguments.
- (vfork_init_first): New.
- (vfork_init): Initialize new process structure.
- (mainCRTStartup): Pass environ to main.
- * exceptions.c (__sig_mask): New
- (ehandler3): Ignore signals in mask.
- (really_exit): Remove CHILD_P test.
- * pipe.c (pipe, dup, dup2): Use new process and file structure.
- * resource.c (getrusage): Ditto.
- * signal.c (sigprocmask): New.
- * spawn.c (*): Rewritten.
- * syscalls.c (*): Use new process and file structure.
- (find_unused_handle): New.
- * syscalls.h (MAX_HANDLES): Deleted.
- (hinfo): Removed child_created_p.
- (MAX_CHILDREN): Deleted.
- (vfork_jmp_info, procinfo): New.
- * wait.c (*): Mostly new.
- * sys/strace.h (_STRACE_PARANOID): New.
- * sys/param.h: New file.
-
-Wed Sep 6 17:03:53 1995 Jason Molenda (crash@phydeaux.cygnus.com)
-
- * libc/include/sys/stat.h: add S_BLKSIZE.
- * libc/include/sys/_types.h: _off_t is a 64-bit type under win32.
- * libc/include/sys/types.h: define off_t and ino_t to be 64 bit
- types under win32.
- (mode_t): add a #else to avoid multiple definitons.
-
- * libc/sys/win32/Makefile.in: add grp.c.
- * libc/sys/win32/grp.c: include grp.h correctly.
- * libc/sys/win32/syscalls.c (_fstat): set almost all of the fields
- of the st structure with real information.
- * libc/sys/win32 (dirent): d_ino is of type ino_t.
-
-Wed Sep 6 10:41:34 1995 Doug Evans <dje@canuck.cygnus.com>
-
- * libc/include/sys/types.h (mode_t): Correct for svr4 sparc's
- and (maybe) sparc64.
- (nlink_t): Provide typedef.
-
-Tue Sep 5 18:46:05 1995 Jason Molenda (crash@phydeaux.cygnus.com)
-
- * libc/sys/win32/grp.c: New file.
- * libc/sys/win32/include/grp.h: New file.
-
-Tue Sep 5 13:47:27 1995 J.T. Conklin <jtc@rtl.cygnus.com>
-
- * libc/include/machine/ieeefp.h: Added whitespace to make this
- file easier to maintain.
- On the sh, define either __IEEE_BIG_ENDIAN or __IEEE_LITTLE_ENDIAN
- depending on the value of __LITTLE_ENDIAN__.
- On the sh3e, define _DOUBLE_IS_32BITS.
-
-Fri Sep 1 15:35:18 1995 James G. Smith <jsmith@beauty.cygnus.com>
-
- * libc/sys/vr4300/syscalls.c: Added missing support
- routines. _raise() and getpid().
-
-Fri Sep 1 14:12:48 1995 James G. Smith <jsmith@rtl.cygnus.com>
-
- * configure.in (mips*vr4300*-*-elf): Fixed silly mistake
-
-Fri Sep 1 08:42:11 1995 James G. Smith <jsmith@beauty.cygnus.com>
-
- * configure.in (mips*vr4300*-idt-*) Add support for RISQ monitor
- and VR4300 processor.
- * libc/sys/vr4300: Add directory.
- * libc/sys/vr4300/{Makefile.in, crt0.S, syscalls.c}: Add SIM
- monitor run-time support.
-
-Thu Aug 31 09:16:52 1995 J.T. Conklin <jtc@rtl.cygnus.com>
-
- * libc/stdlib/Makefile.in (CHEWOUT_FILES): Removed atol.def.
- * libc/stdlib/stdlib.tex: Don't include atol.def.
-
-Wed Aug 30 20:38:28 1995 Jason Molenda (crash@phydeaux.cygnus.com)
-
- * libc/sys/win32/uname.c (uname): hardcode processor as `i386'.
-
-Wed Aug 30 10:48:08 1995 steve chamberlain <sac@slash.cygnus.com>
-
- * libc/ctype/Makefile.in: Fill in _to* dependencies.
-
-Tue Aug 29 17:14:29 1995 steve chamberlain <sac@slash.cygnus.com>
-
- * libc/sys/win32/{dirsearch.c,sys/dirent.h}: Fix namespace problems.
- * libc/sys/win32/sys/dirent.h (struct dirent): Added d_ino.
- * libc/sys/win32/strace.c (__sys_printf): Increase size of buffer.
- * libc/sys/win32/smallprint.c (__small_vsprintf): Remove debug.
- * libc/sys/win32/dirsearch.c (readdir): Set d_ino.
-
-Tue Aug 29 19:00:09 1995 Jason Molenda (crash@phydeaux.cygnus.com)
-
- * libc/stdlib/atol.c (atol): DEFUN -> _DEFUN.
-
-Tue Aug 29 16:08:09 1995 J.T. Conklin <jtc@rtl.cygnus.com>
-
- * libc/stdlib/Makefile.in (OFILES): Added atoff.o and atol.o.
- * libc/stdlib/atoff.c: New file.
- * libc/stdlib/atof.c (atoff): Moved to atoff.c.
- * libc/stdlib/atoi.c (atol): Removed.
- * libc/stdlib/atol.c: Removed duplicate documentation.
-
- * libc/include/ctype.h (_tolower, _toupper): Moved inside
- #ifndef _STRICT_ANSI conditional.
- * libc/ctype/Makefile.in (OFILES): Added _tolower.o and _toupper.o
- * libc/ctype/_tolower.c: New file.
- * libc/ctype/_toupper.c: New file.
- * libc/ctype/tolower.c (_tolower): Moved to _tolower.c.
- * libc/ctype/toupper.c (_toupper): Moved to _toupper.c.
- * libc/ctype/toascii.c (_toascii): Removed.
-
-Tue Aug 29 12:17:32 1995 Doug Evans <dje@canuck.cygnus.com>
-
- * libc/sys/sparc64/sys/types.h: Deleted.
-
-Mon Aug 28 22:06:08 1995 Jason Molenda (crash@phydeaux.cygnus.com)
-
- * libc/sys/win32/uname.c (uname): change `Windows/NT' to `Windows_NT'
- and recognize Windows_95 systems.
-
-Mon Aug 28 19:50:54 1995 Jason Molenda (crash@phydeaux.cygnus.com)
-
- * libc/sys/win32/crt0.c (vfork_init, hmap_init): standard I/O fds
- and passed fds should be opened in text mode.
-
-Mon Aug 28 18:51:22 1995 Jason Molenda (crash@phydeaux.cygnus.com)
-
- * libc/sys/win32/crt0.c (vfork_init): mark passed fds as used
- in __hmap, set to binary mode by default.
-
-Tue Aug 22 14:12:37 1995 J.T. Conklin <jtc@rtl.cygnus.com>
-
- * libc/sys/sh/syscalls.c: Updated all functions to call __trap34.
- * libc/sys/sh/trap.S (__trap34): Renamed from __trap3. Use trap
- vector 34.
-
-Sat Aug 19 18:25:37 1995 steve chamberlain <sac@slash.cygnus.com>
-
- * Makefile.in (install): Install all libraries found in the
- top level. If there's a sys/<type>/include directory,
- install those headers into include.
-
- * libc/sys/win32/kernel.def351: Delete
- * libc/sys/win32/{comctl32.def, comdlg32.def, ctl3d32.def,
- glaux.def, glu32.def, largeint.def, libc.def, libcmt.def,
- lz32.def, mgmtapi.def, mpr.def, msacm32.def, msvcrt.def,
- nddeapi.def, netapi32.def, odbc32.def, odbccp32.def, oldnames.def,
- ole32.def, oleaut32.def, opengl32.def, rasapi32.def, rpcndr.def,
- rpcns4.def, rpcrt4.def, scrnsave.def, shell32.def, snmp.def,
- uuid.def, vdmdbg.def, version.def, vfw32.def, win32spl.def,
- winmm.def, winspool.def, winstrm.def, wsock32.def}: New.
-
- * libc/sys/win32/Makefile.in: Update for new files and new dlltool options.
- * libc/sys/win32/crt0.c: Force all env names to upper case.
- * libc/sys/win32/sys/win*.h -> libc/sys/win32/include
- * libc/sys/win32/*.c: Headers have moved.
- * libs/sys/win32/*.[ch]: Test for open_p rather than BAD_HANDLE,
- __vfork_child_idx is now __vfork_child_ptr.
-
- * posix/execvp (execvp): Don't crash if no PATH envname.
-
-Fri Aug 18 12:22:59 1995 J.T. Conklin <jtc@rtl.cygnus.com>
-
- * libc/include/sys/reent.h (_Bigint): Removed _reclaim field.
- * libc/reent/reent.c (_reclaim_reent): Free Bigint's by going
- through the _freelist instead of through the _reclaim list.
- * libc/stdlib/mprec.c (_Balloc): Don't put new node on _reclaim list.
- * libc/stdlib/mprec.c (_Bcopy): Make like version in master dtoa.c
- sources.
-
-Thu Aug 17 11:03:27 1995 J.T. Conklin <jtc@rtl.cygnus.com>
-
- * libc/machine/h8500/setjmp.S: New file.
- * libc/include/machine/setjmp.h: Updated for H8/500.
-
-Wed Aug 16 16:19:11 1995 steve chamberlain <sac@slash.cygnus.com>
-
- * libc/sys/win32/syscalls.c (_open): More stracing.
- (_stat): Open the file in O_BINARY.
-
-Wed Aug 16 15:49:01 1995 J.T. Conklin <jtc@rtl.cygnus.com>
-
- * libc/machine/h8300/setjmp.S: New file.
- * libc/include/machine/setjmp.h: Updated for H8/300 and H8/300H.
-
-Tue Aug 15 10:31:09 1995 Doug Evans <dje@canuck.cygnus.com>
-
- * libc/sys/win32/crt0.c (__exe_suffix): New global.
- (mainCRTStartup): Set __exe_suffix from LIBC_EXE_SUFFIX.
- * libc/sys/win32/spawn.c (_spawn): Add .exe suffix based on
- __exe_suffix. Free fd_tab after setting env variable.
- (spawnv,_execve): Update.
- * libc/sys/win32/syscalls.h (__exe_suffix): Declare.
- * libc/sys/win32/smallprint.c (puts,putn): New (static) functions.
- (__small_vfprintf): New function.
- * libc/sys/win32/strace.c (__sys_printf): Call __small_vfprintf.
- * libc/sys/win32/wait.c (cwait): Validate argument.
-
- * libc/sys/win32/syscalls.c (queue_file_deletion): Add trace message.
- (process_deletion_queue): Likewise.
-
- * libc/sys/win32/Makefile.in (lib.a): Don't call $(RANLIB).
-
-Mon Aug 14 10:14:10 1995 steve chamberlain <sac@slash.cygnus.com>
-
- * libc/sys/win32: Copyrights and gratuitous indenting.
-
-Mon Aug 14 01:32:58 1995 Doug Evans <dje@canuck.cygnus.com>
-
- * libc/sys/win32/syscalls.c (queue_file_deletion): Finish.
- (process_deletion_queue): Likewise.
- (__close_all_files): New function.
- (_close): Only queue file deletion if really a file.
- * libc/sys/win32/spawn.c (_spawn): Only ensure .exe suffix if
- _P_APPEND_EXE.
- (_exit): Call __close_all_files.
-
- * libc/stdlib/system.c: #include <errno.h>.
- (_system_r): Fix results in -DNO_EXEC case.
-
- * libc/sys/win32/sys/dirent.h (DIR): New member __d_dirname.
- Reorganize structure.
- * libc/sys/win32/dirsearch.c (opendir): Use stat to determine
- if argument is valid. Save directory name in DIR. malloc space
- for dirent struct separately.
- * libc/sys/win32/syscalls.c (stat): Fix test for directory.
-
- * libc/include/errno.h (ENAMETOOLONG): Define.
- * libc/string/strerror.c (strerror): Reword ENFILE.
- Add ENOSYS, ENMFILE, ENOTEMPTY, ENAMETOOLONG.
-
-Sun Aug 13 22:42:25 1995 Doug Evans <dje@canuck.cygnus.com>
-
- * libc/sys/win32/crt0.c (__progname): New global.
- (mainCRTStartup): Support strace=bitmask,filename.
- * libc/sys/win32/dirsearch.c (all fns): Add trace messages.
- * libc/sys/win32/syscalls.c (_write): Print parent trace message
- if error.
- (getcwd): Handle len too small. Convert '\\' to '/'.
- * libc/sys/win32/sys/fcntl.h (O_RDWR): = O_RDONLY|O_WRONLY.
- Add prototypes for open, creat, fcntl.
- (O_APPEND): Change value to conform to Microsoft's value.
- * libc/sys/win32/sys/strace.h (_STRACE): Protect in do/while.
-
- * libc/stdlib/getopt.c: New file.
- * libc/stdlib/Makefile.in: Build it.
-
-Sat Aug 12 12:17:14 1995 Doug Evans <dje@canuck.cygnus.com>
-
- * libc/posix/execvp.c (execvp): Watch for DOS drives ifdef _WIN32.
- Fix scanning of $PATH.
- * libc/posix/exec*.c: Call _execve, not execve.
- * libc/posix/execve.c: New file.
- * libc/posix/Makefile.in (OFILES): Add execve.o.
-
- * libc/sys/win32/sys/strace.h (_STRACE_ALL, _STRACE_UHOH,
- _STRACE_STARTUP, _STRACE_SYSCALL): More bit masks of things to trace.
- (_STRACE): If level==0, always print. Handle new bit mask scheme.
- * libc/sys/win32/crt0.c: Update _STRACE calls.
- * libc/sys/win32/{pipe.c,resource.c,spawn.c,syscalls.c,wait.c}: Ditto.
-
- * libc/sys/win32/smallprint.c (rn): Fix digit list.
-
- * libc/sys/win32/syscalls.c (__really_exit): Move from here,
- * libc/sys/win32/exceptions.c (really_exit): to here. Avoid recursion.
- * libc/sys/win32/spawn.c (spawnvp): Pass `prog' as image name.
- Print __seterrno trace message first.
- (_execve): Renamed from execve.
- (vfork): Update __strace usage.
- (__vfork_child_pid): Deleted.
- (__vfork_children, __vfork_child_idx): New globals.
- (_spawnvp): New function.
- (spawnvp, spawnv, _execve): Call _spawnvp.
- (init_child): Record child in __vfork_children.
- (__vfork_get_entry, __vfork_record_death): New functions.
- * libc/sys/win32/crt0.c (mainCRTStartup): Initialize __vfork_children.
- * libc/sys/win32/kernel32.def (WaitForMultipleObjects): Define.
- * libc/sys/win32/syscalls.h (CHILD_P): New macro. All files updated.
- (MAX_CHILDREN, CHILD_INTERIM_PID): Define.
- (children): New typedef.
- (__vfork_children,__vfork_child_idx): Declare.
- (__vfork_get_entry,__vfork_record_death): Declare.
- * libc/sys/win32/wait.c (wait_for_single,wait_for_any): New functions.
- (waitpid): Handle pid == -1.
- * libc/sys/win32/sys/wintypes.h (WaitForMultipleObjects): Declare.
- * configure.in (i386-win32): Add -DNO_FORK.
- * libc/syscalls/sysfork.c (fork): Don't define for NO_FORK.
- * libc/reent/execr.c (_fork_r): Likewise.
- * libc/stdlib/system.c (do_system): New function.
- If WIN32, try to get shell path from $SH_PATH, use vfork.
- (_system_r): Return 1 for (s == NULL) if WIN32 or unix,
- otherwise return 0.
-
-Sat Aug 12 11:08:00 1995 steve chamberlain <sac@slash.cygnus.com>
-
- * libc/stdlib/{mallocr.c, mstats.c}: Move mstats from mallocr to mstats.c.
- * libc/sys/win32/fcntl.h: Don't include self.
- * libc/sys/win32/sys/strace.h (_STRACE_WM, _strace_wm): New.
- * libc/sys/win32/sys/winbase.h: (GetUserName) New.
- * libc/sys/win32/sys/wincon.h (HANDLER_ROUTINE): Define correctly.
- * libc/sys/win32/sys/wintypes.h (GetFileType, GetCurrentProcess, CloseHandle,
- SetFilePointer, CreateFileA, GetFileInformationByHandle, GetStdHandle):
- Correct prototypes.
- * libc/sys/win32/strace.c: New file.
- * libc/sys/win32/smallprint.c: New file.
- * libc/sys/win32/crt0.c (func): Delete.
- (mainCRTStartup): Fix alloca usage. Set handles explictly.
- * libc/sys/win32/dirsearch.c: Clean up handle usage, fix calls to __seterrno.
- * libc/sys/win32/exceptions.c: Lint.
- * libc/sys/win32/{ioctl.c, pipe.c, resource.c, spawn.c, cwait.c, syscalls.c}:
- Clean up handle usage.
- * libc/sys/win32/syscalls.c (__sys_printf): Moved into strace.c
- (open.c): Default file type is text.
- * libc/sys/win32/uname.c (uname): Use __small_sprintf.
- * libc/sys/win32/advapi32.def: New
-
-Fri Aug 11 17:11:52 1995 Doug Evans <dje@canuck.cygnus.com>
-
- * configure.in (posix_dir, libc_posix_lib): New variables.
- Define LIBC_POSIX_LIB in makefile to be $libc_posix_lib.
- (i[345]86-*-win32): Define posix_dir.
- Delete -DNO_EXEC. Define -DHAVE_OPENDIR.
- (if unix_dir): Fix typo.
- * libc/posix/{Makefile.in,closedir,opendir,readdir,rewinddir,
- scandir,seekdir,telldir}: New files.
- * libc/posix/{execl.c,execle.c,execlp.c,execv.c,execvp.c}: Move here
- from libc/unix.
- * libc/Makefile.in (LIBC_POSIX_LIB): Define.
- (SUBDIRS): Add posix.
- (SUBLIBS): Add $(LIBC_POSIX_LIB).
-
- * libc/include/sys/signal.h (SIGCHLD): Add for _WIN32.
- (NSIG): Increase to 21.
- * libc/include/sys/unistd.h (pid_t): Move from here,
- * libc/include/sys/types.h (pid_t): to here.
-
- * libc/sys/win32/syscalls.h: #include "sys/strace.h".
- (__ptrace): Delete.
- (hinfo): New members close_exec_p, child_created_p.
- (struct exception_list): Define.
- (__hmap): Redefine as pointer to table.
- (__parent_hmap, __child_hmap): New globals.
- (__set_errno, __really_exit): Declare.
- (__vfork_child_pid): Declare.
- * libc/sys/win32/crt0.c (__strace, __trace_file): New global.
- (__orig_stdin, __orig_stdout, __orig_stderr): New globals.
- (__parent_hmap, __child_hmap): New globals.
- (__hmap): Redefine as pointer to active map.
- (__get_console): New function.
- (mainCRTStartup): Change leading '=' in environ vars to '!'.
- (env __FD_TABLE__): Watch for this and initialize our fd/handle
- mapping table from it if defined.
- (argv, envp): Dump if __strace >= 4.
- (main): Call here.
- * libc/sys/win32/exceptions.c (myp): Redefine.
- (__syscalls_b): Delete.
- (__stack_trace): New function.
- (ehandler3): Update to use _STRACE. Print stack trace.
- Call __really_exit instead of exit.
- (init_exceptions): Delete args argc,argv. New arg mine.
- * libc/sys/win32/kernel32.def (CreatePipe, DuplicateHandle, FindClose,
- FindFirstFileA, FindNextFileA, GetComputerNameA,
- GetEnvironmentVariableA, ReadFile, SetEnvironmentVariableA): Define.
- * libc/sys/win32/signal.c (signal): Validate arg.
- (alarm, sleep): Define as stubs for now.
- * libc/sys/win32/syscalls.c (all fns): Update to use _STRACE.
- (__syscalls_b, errno): Delete.
- (__vfork_child_pid, __vfork_jmp_buf): New globals.
- (__seterrno): Handle more errors.
- (__sys_printf): Renamed from _ptrace.
- (__really_exit): New function.
- (queue_file_deletion, process_deletion_queue): New functions.
- (__resume_parent): New function.
- (_unlink): Handle trying to delete open file.
- (__totime_t): Renamed from totime_t.
- (setsid, __read, __write): New functions.
- (cwait, spawnvp, R, D, getrusage, _execve, _fork, _wait): Delete.
- * libc/sys/win32/{dirsearch.c,getlogin.c,misc.c,resource.c,passwd.c,
- times.c,spawn.c,pipe.c,wait.c,termios.c,ioctl.c,uname.c}: New files.
- * libc/sys/win32/console.c: Update to new definition of __hmap.
- * libc/sys/win32/Makefile.in: Build new files.
- * libc/sys/win32/sys/{dirent.h,winerror.h,wait.h,termios.h}: New files.
- * libc/sys/win32/sys/{ioctl.h,utsname.h}: New files.
- * libc/sys/win32/sys/strace.h: Renamed from ptrace.h.
- * libc/sys/win32/sys/wintypes.h (GetCurrentDirectoryA): Fix prototype.
-
-Thu Aug 10 16:32:52 1995 Doug Evans <dje@canuck.cygnus.com>
-
- * libc/sys/h8500hms/misc.c (kill): Handle SIGABRT.
-
-Thu Aug 10 12:07:38 1995 J.T. Conklin <jtc@rtl.cygnus.com>
-
- * libc/stdlib/{dtoa.c, strtod.c}: Merged assorted changes that
- have been made to the master dtoa.c sources (from netlib.att.com)
- since they were integrated into newlib in early 1992. Fixes
- problems with storage leaks and handling of numbers with very
- negative exponents.
-
-Wed Aug 9 14:18:39 1995 J.T. Conklin <jtc@rtl.cygnus.com>
-
- * Makefile.in (all): set rootpre and srcrootpre before calling
- sub-makes.
-
-Tue Aug 8 17:20:45 1995 steve chamberlain <sac@slash.cygnus.com>
-
- * libc/sys/win32/crt0.c: Change __hmap usage.
- * libc/sys/win32/exceptions.c: Use _ptrace call.
- * libc/sys/win32/syscalls.c: Use _ptrace call.
- (read, write): Cope with DOS style CRLF when in TEXT mode.
- * libc/sys/win32/syscalls.h: Declare hinfo struct.
- * libc/sys/win32/user32.def: Get DefWindowProc arg list right.
- * libc/sys/win32/sys/fcntl.h, ptrace.h: New.
- * libc/sys/win32/sys/windows.h: Fill in rest of messages.
- * libc/sys/win32/sys/wintypes.h: Fix attribute syntax.
-
-Mon Aug 7 13:04:54 1995 J.T. Conklin <jtc@rtl.cygnus.com>
-
- * libc/include/math.h (cabs, cabsf, drem, dremf): New declarations.
-
- * libm/math/{w_cabs.c, wf_cabs.c, w_drem.c, wf_drem.c}: New files,
- wrappers for hypot() and remainder() for BSD libm compatibility.
- These are public domain implementations written by me for the
- NetBSD libm some time ago. Note cabs() is required by ucbtest.
- * libm/math/Makefile.in (obj): Added w_cabs.o and w_drem.o.
- (fobj): Added wf_cabs.o and wf_drem.o.
-
-Thu Aug 3 08:13:05 1995 J.T. Conklin <jtc@rtl.cygnus.com>
-
- * libc/sys/h8500hms/misc.c: New file.
- * libc/sys/h8500hms/Makefile.in (OFILES): Add misc.o.
-
-Wed Aug 2 16:46:27 1995 J.T. Conklin <jtc@rtl.cygnus.com>
-
- * libc/time/localtime.c (localtime): Fix problem with leap year
- handling. Stole algorithm from Arthur David Olson's tz code.
-
-Mon Jul 31 10:21:54 1995 steve chamberlain <sac@slash.cygnus.com>
-
- * configure.in: (z8k-*sim): Renamed z8k-*-coff.
-
- * libc/sys/z8ksim/glue.c (_getpid, _kill): New
- (_exit): Use argument.
-
-Fri Jul 28 15:17:04 1995 Doug Evans <dje@canuck.cygnus.com>
-
- * libc/sys/win32/sys/winbase.h (_WINBASE_H): Define.
-
-Wed Jul 26 16:24:19 1995 steve chamberlain <sac@slash.cygnus.com>
-
- * libc/sys/sh/trap.S (perrno): Align correctly. (pr 7532)
-
-Mon Jul 24 13:42:52 1995 J.T. Conklin <jtc@rtl.cygnus.com>
-
- * configure.in (sparc*): Add -DMALLOC_ALIGNMENT=8 to
- target_cflags.
-
-Mon Jul 24 11:42:07 1995 steve chamberlain <sac@slash.cygnus.com>
-
- * libc/sys/win32/crt0.c (mainCRTStartup): Look for
- ptrace with case insensitivity
- * libc/sys/win32/{user32.def, gdi32.def, exceptions.c, screen.c,
- sys/winbase.h, sys/windows.h, sys/wintypes.h, sys/winuser.h}:
- New files.
-
-Fri Jul 21 11:22:26 1995 Doug Evans <dje@canuck.cygnus.com>
-
- * Makefile.in: Multilib support moved to ../cfg-ml-{com,pos}.in.
- (MULTITOP, MULTIDIRS, MULTISUBDIR, MULTIDO, MULTICLEAN): New variables.
- (all, install, *clean): Use new multilib support.
- * configure.in: Multilib support moved to ../cfg-ml-{com,pos}.in.
-
-Fri Jul 21 07:11:42 1995 steve chamberlain <sac@slash.cygnus.com>
-
- * libc/include/sys/signal.h (__WIN32__): New.
-
- * configure.in (i386-*-win32): Remobe SBRK_IS_ALLOC.
-
- * libc/stdlib/mprec.c (Balloc): Fix trampling problem.
- (ulp, b2d): Handle 32 bit doubles.
- * libc/stdlib/mprec.h: Handle 32 bit doubles.
- * libc/stdlib/strtod.c (_strtod_r): Ditto.
-
-Fri Jul 14 08:24:58 1995 steve chamberlain <sac@slash.cygnus.com>
-
- from medp@primag.co.uk:
- * libc/stdio/setvbuf.c (setvbuf): Fix line buffering on
- dynamically allocated buffers.
-
-Thu Jul 20 10:11:03 1995 Fred Fish <fnf@fishbowl>
-
- * libc/include/sys/unistd.h (_exit): Add _ATTRIBUTE ((noreturn)).
- * libc/stdlib/exit.c (unistd.h): Include to pick up _exit() declaration.
-
-Thu Jul 20 10:16:25 1995 Michael Meissner <meissner@tiktok.cygnus.com>
-
- * configure.in (powerpc): Fix previous fix.
-
-Wed Jul 19 14:08:55 1995 Michael Meissner <meissner@tiktok.cygnus.com>
-
- * configure.in (powerpc-*eabiaix*): Update PowerPC multilib
- directories for this target.
-
-Wed Jul 19 00:34:30 1995 Jeffrey A. Law <law@rtl.cygnus.com>
-
- * configure.in (hppa): Add machine_dir definition.
- * libc/machine/hppa: New directory with PA specific implementations
- of the basic memory/string functions.
-
-Tue Jul 18 21:16:00 1995 Michael Meissner <meissner@tiktok.cygnus.com>
-
- * configure.in: Update current PowerPC multilib directories.
- Split big and little endian configurations.
-
-Tue Jul 18 11:55:33 1995 Ian Lance Taylor <ian@cygnus.com>
-
- * configure.in: Add --enable-single-float option to configure to
- control use of MIPS single-float directories. Default to yes.
-
- * Makefile.in (all): Don't recurse into multilib directory if it
- does not exist.
-
-Mon Jul 17 15:51:30 1995 J.T. Conklin <jtc@rtl.cygnus.com>
-
- * libc/sys/sh/syscalls.c: Fix typo.
-
-Mon Jul 3 14:38:52 1995 Steve Chamberlain <sac@slash.cygnus.com>
-
- * Makefile.in, libc/Makefile.in, libc/sys/Makefile.in:
- Pass down DLLTOOL.
- * libc/include/process.h: Define WAIT_CHILD.
- * libc/include/types.h: Get sizes right for win32.
- * configure.in (i386-*-pe): Becomes i386-win32.
- * libc/sys/win32/{crt0.c, kernel32.def, longjmp.c, setjmp.c, syscalls.c
- wintypes.h,sys/file.h,sys/resource.h}: Second pass.
- * libc/stdlib/mallocr.c: Don't round up memory block if SBRK_IS_ALLOC
- is defined.
-
-Wed Jun 28 18:34:54 1995 Steve Chamberlain <sac@slash.cygnus.com>
-
- * configure.in (i[345]86-*-pe): New target (NT).
- * host/any: DLLTOOL new.
- * libc/sys/win32/{crt0.c, kernel32.def, longjmp.c, setjmp.c, syscalls.c
- wintypes.h,sys/file.h,sys/resource.h}: Preliminary support for
- WIN32 (just enough to cross host the comp-tools).
-
-Thu Jun 22 11:45:18 1995 Doug Evans <dje@canuck.cygnus.com>
-
- * libc/machine/h8300/{cmpsi.S,ucmpsi.S,divhi3.S,mulhi3.S,mulsi3.S}:
- Deleted. These files live in gcc/config/h8300/lib1funcs.asm now.
-
-Mon Jun 19 11:40:40 1995 Doug Evans <dje@canuck.cygnus.com>
-
- * libc/include/machine/ieeefp.h (arm): Change to always be
- __IEEE_BIG_ENDIAN (even on little endian ARM's).
-
-Thu Jun 8 14:22:28 1995 Steve Chamberlain <sac@slash.cygnus.com>
-
- * libc/sys/crt0.S: Initialze sp, and call exit after main.
- * libc/sys/syscalls.c (abort): New.
- * configure.in (arm): Define ABORT_PROVIDED.
-
-Wed Jun 7 14:04:35 1995 J.T. Conklin <jtc@rtl.cygnus.com>
-
- * configure.in (powerpc): Define multidirs.
-
-Mon Jun 5 16:10:13 1995 Doug Evans <dje@canuck.cygnus.com>
-
- * libc/sys/arm/crt0.S: Add __USER_LABEL_PREFIX__ support.
-
-Thu Jun 1 10:51:47 1995 Sean Eric Fagan <sef@cygnus.com>
-
- * configure.in (sparclite): Delete target_cflags. Define multidirs.
-
-Wed May 24 14:23:25 1995 Steve Chamberlain <sac@slash.cygnus.com>
-
- * configure.in, libc/include/machine/ieeefp.h: Modified
- for arm:
- libc/machine/arm/*, libc/sys/arm/*: New
-
-Tue May 23 13:53:07 1995 J.T. Conklin <jtc@rtl.cygnus.com>
-
- * libc/include/machine/ieeefp.h: Use __PPC__ instead of
- __powerpc__ when determining endianness.
-
-Wed May 10 07:55:56 1995 J.T. Conklin <jtc@rtl.cygnus.com>
-
- * configure.in (m68*): Add multidir for the m68332.
-
- * host/any (CC): Fix typo in last change.
-
-Fri Apr 14 22:20:31 1995 Ken Raeburn <raeburn@cujo.cygnus.com>
-
- * libc/include/sys/config.h: Test __m68k__ instead of __m68000__
- when determining endianness.
- * libc/include/machine/ieeefp.h: Ditto.
- * libc/machine/m68k/setjmp.S: Use '&' instead of '#' for immediate
- operands.
-
-Fri Apr 14 14:14:29 1995 Doug Evans <dje@chestnut.cygnus.com>
-
- * libc/include/errno.h (ENOTEMPTY): Define.
-
-Thu Apr 6 12:21:20 1995 J.T. Conklin <jtc@rtl.cygnus.com>
-
- * configure.in (sparc-sun-sunos*): Add -DMALLOC_ALIGNMENT=8 to
- target_cflags.
-
- * libc/sys/sun4/Makefile.in (COPYOFILES): Added rem.o, multiply.o,
- and umultiply.o.
-
- * libc/stdio/tmpnam.c (worker): Unconditionally increment count
- instead of only when open succeeds. ANSI requires that multiple
- calls to tmpnam() result in different files.
-
- * libc/sys/sun4/Makefile.in (COPYRENAMEOFILES): New macro, list of
- objects pulled in from /lib/libc.a that must be renamed before
- being pulled into newlib. /lib/libc.a's div.o conflicted with
- newlib's file with the same name.
-
- * libc/stdlib/ldiv.c (ldiv): Call labs() instead of abs().
-
- * host/any (CC, AS, AR, RANLIB): Changed so that executables in
- the build tree will only be used if the executables are present
- (instead of just the Makefiles).
-
- * libc/include/stdlib.h (mblen, mbtowc, wctomb, mbstowcs,
- wcstombs): Define.
- * libc/stdlib/{mblen.c, mbstowcs.c, wcstombs.c}: New files, null
- versions of these functions that I orignally wrote for the
- NetBSD C library.
- * libc/stdlib/{mbtowc.c, wctomb.c}: Replaced functions with
- versions I wrote for NetBSD.
-
-Wed Mar 29 12:42:42 1995 Kung Hsu <kung@mexican.cygnus.com>
-
- * libc/sys/sparclite/Makefile.in: add crt0.s and make info.
- * libc/sys/sparclite/crt0.s: ditto.
-
-Tue Mar 28 20:28:03 1995 Rob Savoye <rob@rtl.cygnus.com>
-
- * configure.in: Add soft-float for proelf.
-
-Mon Mar 27 12:07:56 1995 Steve Chamberlain <sac@bang.hack.com>
-
- * libc/stdlib/mprec.h (Bcopy): Copy the right number
- of bytes.
-
-Mon Mar 27 11:24:22 1995 Doug Evans <dje@chestnut.cygnus.com>
-
- * Makefile.in (all): Depend on `force'.
- * configure.in (syscall_dir): Renamed from fake_sys_dir.
- (libc_syscall_lib): Renamed from libc_fake_sys_lib.
- (LIBC_SYSCALL_LIB): Renamed from LIBC_FAKE_SYS_LIB.
- * libc/Makefile.in: Likewise.
- * libc/include/reent.h: Update syscall references.
- (_fcntl_r): Add prototype.
- * libc/syscalls/*.c #include <reent.h>.
- (*) Call reentrant version if REENTRANT_SYSCALLS_PROVIDED.
-
-Mon Mar 20 16:57:39 1995 Doug Evans <dje@deneb.cygnus.com>
-
- * libc/include/sys/stat-dj.h (S_ISBLK): Define.
- (S_ISCHR, S_ISDIR, S_ISFIFO, S_ISREG): Define.
- * libc/include/sys/stat.h (stat-dj.h): Include ifdef MSDOS.
- (time.h, sys/types.h): Always include (even if MSDOS).
- (stat): Fix prototype.
-
-Fri Mar 10 11:30:38 1995 Ian Lance Taylor <ian@cygnus.com>
-
- * configure.in (i[345]86-*-go32): Compile with -DNO_EXEC.
-
-Mon Feb 27 18:00:39 1995 Jim Wilson <wilson@chestnut.cygnus.com>
-
- * libc/machine/h8500/psi.S (EXTPSIHI_RN_SN): Ifdef out.
-
-Mon Feb 13 16:10:03 1995 Ian Lance Taylor <ian@cygnus.com>
-
- * libc/include/regdef.h: New file.
- * libc/machine/mips/machine/regdef.h: New file.
-
-Mon Feb 6 15:24:29 1995 Doug Evans <dje@canuck.cygnus.com>
-
- * libc/sys/sparc64/sys/fcntl.h (open): Add ellipsis.
-
-Fri Jan 27 13:52:10 1995 Steve Chamberlain <sac@splat>
-
- * libc/sys/sh/crt0.S: Pass main's return to exit.
- * libc/sys/sh/trap.S: Put errno in the right place.
-
-Tue Jan 24 18:57:56 1995 Ian Lance Taylor <ian@sanguine.cygnus.com>
-
- * libm/math/e_rem_pio2.c (__ieee754_rem_pio2): Integrate change
- from fdlibm 5.2: handle |x| < 3pi/4 more efficiently.
- * libm/math/ef_rem_pio2.c: Likewise.
- * libm/math/e_log10.c: Remove unused static one.
- * libm/math/ef_log10.c: Likewise.
- * libm/math/s_frexp.c: Likewise.
- * libm/math/sf_frexp.c: Likewise.
-
-Sun Jan 22 21:26:14 1995 Steve Chamberlain <sac@splat>
-
- * libc/sys/go32/Makefile.in, clock.S, dir.c, setjmp.S, stat.c,
- longjmp.S: Upgraded.
- * libc/sys/go32/sys/setjmp.h: Upgraded.
- * libc/sys/go32/sys/go32.h, dpmi.h: New files.
-
-Fri Jan 20 18:33:18 1995 Ian Lance Taylor <ian@sanguine.cygnus.com>
-
- * configure.in: Add many entries to multidirs for mips targets.
-
-Wed Jan 18 10:19:25 1995 J.T. Conklin <jtc@rtl.cygnus.com>
-
- * libm/math/e_jn.c (__ieee754_yn): Integrate change from fdlibm
- 5.2 which fixes bug where jn(-1,x) is three times larger than
- the actual answer.
- * libm/math/ef_jn.c (__ieee754_ynf): Likewise.
-
-Sun Jan 15 21:48:58 1995 Steve Chamberlain <sac@splat>
-
- * libc/sys/w65/sys/syscalls.h: New file
- * libc/include/machine/ieeefp.h: W65 support.
- * libc/include/sys/config.h: Ditto.
- * libc/machine/w65/Makefile.in, cmpsi, divsi3, lshrhi.s, mulsi3.c,
- sdivhi3.s, smulhi3.s, udivhi3.s, umodhi3.s: New files.
- * libc/sys/w65/Makefile.in, crt0.c, syscalls.c, trap.c: New files.
-
-Wed Jan 11 15:59:01 1995 Ian Lance Taylor <ian@sanguine.cygnus.com>
-
- * libc/sys/Makefile.in (lib.a, crt0.o): Depend upon subs.
-
-Tue Jan 3 15:57:03 1995 Rob Savoye <rob@darkstar.cygnus.com>
-
- * Makefile.in, configure.in: Remove any references to the old
- "stub" dir.
-
-Thu Dec 22 10:42:08 1994 Ian Lance Taylor <ian@sanguine.cygnus.com>
-
- * libc/syscalls/sysopen.c: Write _HAVE_STDC version of open, which
- uses ... in prototype.
-
-
-Wed Nov 30 08:39:42 1994 Ian Lance Taylor <ian@rtl.cygnus.com>
-
- * libc/sys/a29khif/sys/libconfig.h: Remove.
- * libc/sys/go32/sys/libconfig.h: Remove.
- * libc/sys/sun4/sys/libconfig.h: Remove.
- * libc/sys/sysvi386/sys/libconfig.h: Remove.
- * libc/sys/sysvnecv70/sys/libconfig.h: Remove.
- * libc/sys/sparc64/sys/libconfig.h: Remove.
-
- * libc/include/_ansi.h (_FLOAT_ARG, _FLOAT_RET): Don't define.
- * libc/include/sys/config.h (_FLOAT_ARG, _FLOAT_RET): Likewise.
- * libc/include/math.h: Change all uses of _FLOAT_RET and
- _FLOAT_ARG to float.
- * libm/test/math.c: Likewise.
- * testsuite/libm.sac/math.c: Likewise.
- * testsuite/libm.sac/working/math.c: Likewise.
-
-Wed Nov 23 22:39:28 1994 Steve Chamberlain (sac@jonny.cygnus.com)
-
- * libc/sys/sh/trap.s,crt0.s,setjmp.s: Renamed with .S so that
- gcc calls gas with endian option.
- * configure.in (sh): Build little endian version too.
-
-Wed Nov 16 18:21:45 1994 Ian Lance Taylor <ian@sanguine.cygnus.com>
-
- * configure.in: Configure big and little endian versions for MIPS
- targets.
-
-Sat Nov 12 21:12:51 1994 Doug Evans <dje@canuck.cygnus.com>
-
- * libc/include/limits.h: Deleted.
- * libc/include/machine/limits.h: Deleted.
-
-Thu Nov 10 15:32:44 1994 Rob Savoye <rob@rtl.cygnus.com>
-
- * ChangeLog: Remove stub directory. This has all been rewritten
- and moved to devo/libgloss.
-
-Thu Sep 29 18:31:04 1994 Ian Lance Taylor <ian@sanguine.cygnus.com>
-
- * Makefile.in (dvi): Add to info target, use $@ in sub make.
- (docs): Merge into info target.
- * libm/Makefile.in (dvi): Add $(srcdir).
- * libm/math/Makefile.in (chobjs): Remove underscores from file
- names. Texinfo doesn't like them.
- (wacos.def, ...): Add explicit targets for all .def files.
- * libm/math/math.tex: Remove underscores from @include file names.
- * doc/Makefile.in (dvi): Add dummy target.
- * testsuite/Makefile.in (dvi): Add dummy target.
-
-Mon Sep 26 21:17:46 1994 Doug Evans (dje@canuck.cygnus.com)
-
- * Makefile.in (VERSION): Define. For net newlib releases.
-
-Thu Sep 22 19:01:26 1994 Doug Evans (dje@canuck.cygnus.com)
-
- * README: New file.
-
-Mon Sep 19 16:35:23 1994 Jim Wilson (wilson@sphagnum.cygnus.com)
-
- * libc/stdlib/ecvtbuf.c (_gcvt): Undo last change.
-
-Mon Sep 19 11:44:23 1994 Ian Lance Taylor (ian@sanguine.cygnus.com)
-
- * libc/stdlib/setenv.c (_findenv): Declare.
-
- * libc/include/sys/fcntl.h: Fix declarations of open, creat, and
- fcntl to not use _EXFUN, and change string parameters to open and
- creat to be ``const char *''.
- * libc/sys/sparc64/sys/fcntl.h: Likewise.
- * libc/sys/sparc64/creat.c (creat): Make PATH const.
- * libc/syscalls/sysopen.c: Include <fcntl.h>.
- (open) Make _FILE const.
- * libc/sys/z8ksim/glue.c (_open): Make BUF const.
- (_creat): Make PATH const.
- * libc/sys/h8300hms/syscalls.c (_open): Make PATH const.
- * libc/sys/h8500hms/syscalls.c (_open): Likewise.
- * libc/sys/m88kbug/syscalls.c (open): Likewise.
- * libc/sys/sh/syscalls.c (_open): Likewise.
- * stub/shared/glue.c (open): Make BUF const.
- * stub/ex93x/syscalls.c (open): Make FILENAME const.
-
-Thu Sep 8 16:39:12 1994 Steve Chamberlain (sac@jonny.cygnus.com)
-
- * libc/include/errno.h: Add ENMFILE
- * libc/include/sys/config.h: Support Z8000.
- * libc/include/sys/signal.h: New signals for go32.
- * libc/machine/h8500/psi.S (__addpsir0r0): New function
- * libc/machine/h8500/cmpsi.S (__ucmppsi2): New function
- * libc/machine/sh/sdivsi3.s (__sdivsi3): Rewritten.
- * libc/stdlib/mallocr.c (_morecore_r): Minimum chunk
- size is variable, depending upon CHUNK_POWER.
- * libc/sys/go32/*.c: Upgrade to new go32 stuff.
-
-Sun Sep 4 17:42:43 1994 Jim Wilson (wilson@sphagnum.cygnus.com)
-
- * libc/stdlib/ecvtbuf.c (_gcvt): Output '-' for negative numbers.
-
-Fri Sep 2 10:56:01 1994 Ian Lance Taylor (ian@sanguine.cygnus.com)
-
- * libc/include/_ansi.h (_PARAMS): Don't define if already defined.
-
-Wed Aug 24 11:11:03 1994 Ian Lance Taylor (ian@sanguine.cygnus.com)
-
- * configure.in: Change i[34]86 to i[345]86.
-
- * libc/include/math.h: Don't define HUGE_VAL if it is already
- defined.
-
-Wed Aug 17 15:18:02 1994 Ian Lance Taylor (ian@sanguine.cygnus.com)
-
- * testsuite/libm.sac/test_erfc.c: Correct some result values.
- * testsuite/libm.sac/test_gammaf.c: Likewise.
- * testsuite/libm.sac/test_sin.c: Likewise.
- * testsuite/libm.sac/test_tanh.c: Likewise.
-
-Tue Aug 16 16:12:53 1994 Ian Lance Taylor (ian@sanguine.cygnus.com)
-
- * libc/include/machine/ieeefp.h: Don't try set endianness if it is
- already set. Define typedefs __int32_t and __uint32_t.
- * libc/include/math.h: Include <machine/ieeefp.h>.
- (union __dmath): Use __uint32_t.
- * libm/math/fdlibm.h, libm/math/*.c: Use __int32_t and __uint32_t
- instead of int and unsigned int.
-
-Thu Aug 11 15:16:09 1994 Ian Lance Taylor (ian@sanguine.cygnus.com)
-
- Replace the math library with the SunPRO fdlibm package.
- * libm/math: Completely changed all files.
- * libm/ieeefp: Remove contents and directory.
- * libm/Makefile.in (LIBM_FP_LIB): Remove.
- (SUBDIRS): Just set to math/lib.a.
- * libm/libm.texinfo: Updated for new library.
- * libc/include/math.h: Extensive changes for new math library.
- * libc/include/ieeefp.h (isnanf, isinff, finitef): Change argument
- from _FLOAT_ARG to float.
- (maxpowtwo, maxpowtwof): Don't declare.
- * configure.in (fp_dir): Removed; was always ieeefp anyhow.
- (libm_fp_lib): Removed.
- * Makefile.in (MATHOBJS_IN_LIBC): Updated with new file names.
- * testsuite/libm.paranoia/Makefile.in (check): Correct --srcdir
- argument to ${RUNTEST}.
- * testsuite/libm.sac/Makefile.in (LOCAL_CFLAGS): Define.
- (.c.o): New rule.
- (RUNTESTFLAGS): Set CC and CFLAGS.
- (TESTS): Remove test_log2 and test_log2f.
- (${TESTS}): Pass ${LOCAL_CFLAGS}, not ${CFLAGS}.
- * testsuite/libm.sac/math.c (run_vector_1): Use float, not
- _FLOAT_ARG, for single precision argument type.
- * testsuite/libm.sac/sac.exp: Treat an error in bit 63 as an
- expected failure. Close the input pipe.
- * testsuite/libm.sac/test.c (test_sok, test_iok, test_scok):
- Correct misspelling of inaccurate.
- (test_mok): Use ``inaccurate'', not ``wrong''.
- * testsuite/libm.sac/{test_acos.c, test_acosh.c, test_asin.c,
- test_asinh.c, test_atan.c, test_atanh.c, test_ceil.c,
- test_ceilf.c, test_cos.c, test_cosh.c, test_erf.c, test_erf.c,
- test_fabs.c, test_floor.c, test_floorf.c, test_fmod.c,
- test_fmodf.c, test_gamma.c, test_log1p.c, test_log1pf.c,
- test_yn.c): Correct many result values. Many are still wrong.
-
- * libc/stdlib/ecvtbuf.c (print_e): If _dtoa_r sets decpt to 9999,
- just copy the string.
- (_gcvt): Always return the buffer.
-
-Tue Aug 9 13:43:23 1994 J.T. Conklin (jtc@phishhead.cygnus.com)
-
- * bcopy.c: fixed documentation, bcopy was not specified by ANSI.
-
-Wed Aug 3 05:39:41 1994 D. V. Henkel-Wallace (gumby@cygnus.com)
-
- * libc/include/sys/reent.h: (struct _Bigint): add _reclaim
- structure.
- (struct _reent): add _p5s, _cvtlen, _cvtbuf.
- (_reclaim_reent): declare new entry point.
- * libc/reent/reent.c (cleanup_glue, _reclaim_reent): new
- functions.
-
- * libc/stdlib/mprec.c (Balloc): Keep track of every struct bigint
- ever allocated, so that we can later reclaim them all.
- (pow5mult): make reentrant.
-
- * libc/stdlib/ecvtbuf.c (fcvtbuf, ecvtbuf): extend these functions
- so that when given NULL as a buffer, return a pointer to static
- space in the rent structure. This is not documented behaviour;
- it's only to support ecvt and fcvt, which aren't ANSI anyway.
- * libc/stdlib/efgcvt.c (fcvt, ecvt) Use new functionality (and
- therefore become reentrant).
-
- * libc/stdlib/dtoastub.c: remove spurious inclusion of mprec.h.
-
-Mon Aug 1 16:52:24 1994 Ian Lance Taylor (ian@sanguine.cygnus.com)
-
- * libc/include/machine/ieeefp.h: Check _AM29K, not ___AM29K__.
-
-Thu Jul 28 15:40:21 1994 J.T. Conklin (jtc@phishhead.cygnus.com)
-
- * Makefile.in: Make link to libg.a after libc.a; this is needed
- for the testsuites to build executables when everything comes
- from the tree.
-
-Mon Jun 27 17:14:29 1994 Bill Cox (bill@rtl.cygnus.com)
-
- * libc/Makefile.in: Add a VERSION variable so we can keep track.
- * libm/Makefile.in: Add a VERSION variable so we can keep track.
-
-Wed Jun 22 10:26:00 1994 Ian Lance Taylor (ian@sanguine.cygnus.com)
-
- * libc/include/stdio.h: Use __VALIST, not va_list.
-
-Tue May 17 15:43:28 1994 Bill Cox (bill@rtl.cygnus.com)
-
- * testsuite/config/unix-libm.exp, testsuite/lib/libm.exp,
- testsuite/libm.sac/execute.exp:
- Replace error proc calls with perror calls.
-
-Wed May 11 09:25:28 1994 Doug Evans (dje@canuck.cygnus.com)
-
- * libc/include/*.h: #include "_ansi.h" instead of <_ansi.h>.
- * libc/include/time.h: #define NULL as 0L.
-
-Mon May 9 18:41:20 1994 Doug Evans (dje@canuck.cygnus.com)
-
- * host/any (INCLUDES): Delete -I of gcc/include, gcc -B takes
- care of it.
-
-Mon May 9 18:39:39 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * libc/include/sys/signal.h: Check for __GO32__, not __i386__ and
- not __unix__.
-
-Sat May 7 17:07:36 1994 Steve Chamberlain (sac@cygnus.com)
-
- * configure.in (TARGET_CFLAGS): Set -O2 as default.
- (z8k-*-*): Use syscalls fake sys dir.
- * libc/sys/z8k/glue.c: Rename syscalls.
- * libc/sys/go32/Makefile.in: Use new routines.
- * libc/machine/Makefile.in: Fix typo in ln stuff.
-
-Thu May 5 13:47:48 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * Makefile.in (libm.a, crt0.o): Use cp if ln fails.
- * libc/Makefile.in (crt0.o): Likewise.
- * libc/machine/Makefile.in (lib.a): Likewise.
- * libc/sys/Makefile.in (lib.a, crt0.o): Likewise.
-
- All Makefile.in files: Added mostlyclean, realclean and distclean
- targets.
-
- * Makefile.in: Don't bother to unexport XTRAFLAGS or
- XTRAFLAGS_FOR_TARGET, since they are no longer passed down from
- the top level Makefile.
-
-Tue Apr 26 15:10:34 1994 Doug Evans (dje@canuck.cygnus.com)
-
- * libc/sys/sparc64/sys/stat.h: New file.
- * libc/sys/sparc64/sys/time.h: New file.
- * libc/sys/sparc64/sys/types.h: New file.
-
-Fri Apr 22 12:58:24 1994 Stan Shebs (shebs@andros.cygnus.com)
-
- * stub/ex93x/crt0.s (start): Add code to clear bss.
-
-Wed Apr 13 10:34:58 1994 Doug Evans (dje@canuck.cygnus.com)
-
- * libc/include/sys/types.h (time_t): Properly protect inside
- #ifndef __time_t_defined.
-
- * libc/stdio/fileno.c: New file.
- * libc/stdio/Makefile.in (OFILES, CHEWOUT_FILES): Add fileno.
- (fileno.o): Add dependency.
- * libc/include/stdio.h (__sgetc): Rename never to _never.
- (fileno macro): Disable, needs to do CHECK_INIT first.
-
-Mon Apr 11 17:37:09 1994 Bill Cox (bill@rtl.cygnus.com)
-
- * testsuite/Makefile.in (EXPECT, RUNTEST): Set these for the check
- goal.
-
- * testsuite/Makefile.in (check): Set TCL_LIBRARY for runtest.
- * testsuite/libm.paranoia/Makefile.in (check): Set TCL_LIBRARY for
- runtest.
- * testsuite/libm.sac/Makefile.in (check): Set TCL_LIBRARY for
- runtest.
-
-Sat Apr 9 16:18:09 1994 Doug Evans (dje@cygnus.com)
-
- * libc/sys/sparc64/sys/fcntl.h: New file, define solaris versions
- of the various constants.
-
-Thu Apr 7 21:19:07 1994 Mark Eichin (eichin@cygnus.com)
-
- * libc/include/math.h: #ifndef __math_68881 around things which
- conflict with the (gcc-provided) inline functions in
- gcc/ginclude/math-68881.h.
-
-Thu Apr 7 02:50:43 1994 Doug Evans (dje@cygnus.com)
-
- * libc/include/_syslist.h (_gettimeofday): Define.
- (_times): Ditto.
- * libc/include/reent.h: #include <machine/types.h> to get _CLOCK_T_.
- (struct tms, timeval, timezone): Declare.
- (_gettimeofday_r, _times_r): Declare.
- * libc/include/time.h (_CLOCK_T_): Don't #undef. Remove
- #ifdef _CLOCK_T_ surrounding definition of clock_t.
- (time_t): Add multiple definition protection, __time_t_defined.
- * libc/include/sys/time.h: Don't #include <time.h>.
- Always define struct timezone (remove #ifndef _TIME_H_).
- * libc/include/sys/times.h (_CLOCK_T_): Don't #undef. Remove
- #ifdef _CLOCK_T_ surrounding definition of clock_t.
- * libc/reent/Makefile.in (OFILES): Add timer.o.
- (CHEWOUT_FILES): Add timer.def. Add timer.o/timer.c dependence.
- * libc/reent/timer.c: New file.
- * libc/time/clock.c: #include <reent.h>.
- (clock): Call _times_r instead of times.
- * libc/time/time.c (HAVE_GETTIMEOFDAY): Renamed from
- HAVE_GET_TIME_OF_DAY.
- Add comment regarding supporting OS routine(s) required (for docs).
- #include <reent.h>.
- (time): Call _gettimeofday_r instead of gettimeofday.
- * libc/time/asctime.c: Fix comment regarding supporting OS routines.
- * libc/time/ctime.c: Ditto.
- * libc/time/strftime.c: Ditto.
- * libc/sys/sparc64/Makefile.in (TEMPLATE_SFILES): Remove gettimeofday.
- (TEMPLATE_SFILES_R): Define here. Also define times.
- Add times_r.o/times.S dependence.
- (time2.c, junk.c): Deleted.
- * libc/sys/sparc64/time2.c: Deleted.
- * configure.in (sparc64-*-*): Define HAVE_GETTIMEOFDAY.
-
- * libc/stdio/mktemp.c (_getpid_r): Renamed from _getpid.
- * libc/stdio/tmpnam.c (_getpid_r): Ditto.
- * libc/sys/sparc64/junk.c: Deleted.
-
-Mon Mar 21 16:51:03 1994 Doug Evans (dje@canuck.cygnus.com)
-
- * libc/sys/sparc64/Makefile.in: Add times syscall.
- * libc/sys/sparc64/crt0.S: Handle stack bias at run time so we can
- be used with and without it. Add comment clarifying Medium/Anywhere
- model requirements.
- * libc/sys/sparc64/sigsetjmp.S (setjmp, longjmp): Add svr4 support.
- * libc/sys/sparc64/sys/syscall.h (SYS_times): Define for sunos4
- even if obsolete.
-
-Sun Mar 20 15:51:47 1994 Doug Evans (dje@cygnus.com)
-
- * configure.in (target_cflags): Move init.
- (sparc64-*-*): Define HAVE_BLKSIZE.
-
-Wed Mar 9 10:44:52 1994 Doug Evans (dje@canuck.cygnus.com)
-
- * libc/include/sys/_types.h: New file.
- * libc/include/reent.h: #include it.
- Add comment describing REENTRANT_SYSCALLS_PROVIDED and
- MISSING_SYSCALL_NAMES.
- Sort syscalls.
- * libc/include/_syslist.h: Remove _raise.
- * libc/reent/signalr.c: New file.
- * libc/reent/Makefile.in: Compile it.
- * libc/signal/signal.c: Only use ifdef SIMULATED_SIGNALS.
- Add doc for raise and _raise_r.
- * libc/signal/raise.c: Only use ifndef SIMULATED_SIGNALS.
- (raise): Call _raise_r.
- (_raise_r): Call _getpid_r and _kill_r.
- * libc/stdlib/abort.c: Remove inclusion of stdio.h and _syslist.h.
- (abort): Loop forever calling raise and _exit.
-
-Mon Mar 7 14:40:08 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * configure.in: Remove extraneous echo.
-
-Thu Mar 3 12:14:22 1994 Doug Evans (dje@canuck.cygnus.com)
-
- * libc/sys/sparc64/sys/dirent.h (MAXNAMLEN): #undef to avoid
- collision with unistd.h, and fix for svr4.
-
-Wed Mar 2 13:55:25 1994 Doug Evans (dje@canuck.cygnus.com)
-
- * libc/stdio/local.h (_llicvt): Declare.
- (CVT_BUF_SIZE): Define (and buffer size from 512 to 128).
- * libc/stdio/cvt.c: Include "local.h" to get CVT_BUF_SIZE.
- (_llicvt): Define.
- (_sicvt): Fix function header (`value' is short).
- * libc/stdio/vfprintf.c (_vfprintf_r): Use CVT_BUF_SIZE.
- Add printing of long long's support.
- Add printing of 8 byte pointer support.
-
-Fri Feb 11 21:52:11 1994 Steve Chamberlain (sac@sphagnum.cygnus.com)
-
- * libc/sys/sh/syscalls.c (pipe, execv, wait, fork, utime, chown,
- stat, chmod): New hooks.
- (sbrk): Abort if stack and heap collide.
- * libc/machine/sh/udivsi3, libc/machine/sh/sdivsi3 Modified to
- shortcut when given small args.
- * libc/machine/sh/setjmp.s: Rewritten.
- * libc/machine/sh/strcmp.s (strcmp): New function takes advantage
- of cmp/str instruction.
-
-Wed Feb 9 15:12:35 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * configure.in: Accept powerpc* as a CPU type, using fp_dir ieeefp
- and machine_dir powerpc.
- * libc/include/machine/setjmp.h, libc/include/machine/ieeefp.h:
- Add cases for __powerpc__.
- * libc/machine/powerpc/Makefile.in, libc/machine/powerpc/setjmp.S:
- New files.
-
- * libc/include/stdio.h (_iprintf_r): Declare correctly.
-
-Thu Jan 27 10:36:27 1994 Steve Chamberlain (sac@cygnus.com)
-
- * libc/stdlib/callocr.c: New file with _calloc_r in it.
- * libc/stdlib/calloc.c (calloc_r): Now in callocr.c
-
-Thu Jan 20 15:14:37 1994 Doug Evans (dje@canuck.cygnus.com)
-
- * libc/stdlib/ecvtbuf.c (print_f): Remove local "done".
- (print_e): More comments to describe args, etc.
- "type" arg may now be 'g' or 'G' for %g/G format --> remove
- trailing blanks.
- (_gcvt): Remove locals decpt, sign, end, p, done.
- More comments for print_e invocation.
- Pass "type" to print_e as is (g/G).
-
-Wed Jan 19 16:34:18 1994 Rob Savoye (rob@darkstar.cygnus.com)
-
- * stub/shared/m68k-crt0.S: Changed so it compiles (and runs) on a
- stock m68000.
-
-Mon Jan 17 15:41:53 1994 Doug Evans (dje@canuck.cygnus.com)
-
- * libc/stdlib/mallocr.c (_morecore_r): Fix aligning of pointer so it
- works with any sized pointer, including ones bigger than ints and
- longs.
-
-Thu Jan 6 14:53:21 1994 Doug Evans (dje@canuck.cygnus.com)
-
- * libc/sys/sparc64/{time2.c,utime.S,utime2.c}: New files.
-
-Sat Dec 11 16:17:20 1993 Steve Chamberlain (sac@thepub.cygnus.com)
-
- * libc/include/stdlib.h (_calloc_r): Add prototype.
- * libc/machine/h8500/negsi2.c: New file.
- * libc/machine/h8500/divsi3.c: Prevent overflow when dividing v
- large unsigned numbers.
- * libc/machine/h8500/cmpsi.c: Add cmppsi.
- * libc/stdlib/mallocr.c (morecore_r): Fix aligning pointers so it
- works when sizeof(size_t) != sizeof(char *).
- * libc/stdlib/mprec.c (Balloc): Call calloc rather than malloc to
- get play area
- * libc/stdlib/mprec.h: Define Just_16 if generating for z8000.
-
-Mon Dec 6 15:59:53 1993 Doug Evans (dje@rtl.cygnus.com)
-
- * libc/include/assert.h (assert): Handle -traditional.
-
-Tue Nov 16 15:49:24 1993 Mark Eichin (eichin@cygnus.com)
-
- * Makefile.in: added ; after every "fi" and "done" that wasn't at
- the end of a line (ie. anything before a backslash continuation)
- so that bash handles them.
-
-Tue Nov 16 12:31:57 1993 david d `zoo' zuhn (zoo@rtl.cygnus.com)
-
- * libc/sys/go32/lstat.s: new file, copied from stat.s and renamed
- stat to lstat
-
-Mon Nov 15 15:50:43 1993 Steve Chamberlain (sac@jonny.cygnus.com)
-
- * libc/sys/sh/crt0.s, libc/sys/sh/trap.s,
- libc/machine/sh/sdivsi3.s, libc/machine/sh/setjmp.s,
- libc/machine/sh/udivsi3.s: Use new calling convention.
-
-Mon Nov 15 15:25:38 1993 Mark Eichin (eichin@cygnus.com)
-
- * libc/include/sys/unistd.h, libc/include/sys/stat.h: ANSI-fy
- chmod, access, chdir, chown by making _path const. Also fix _amode
- param of access.
-
-Fri Nov 12 20:25:28 1993 Mark Eichin (eichin@cygnus.com)
-
- * libc/sys/a29khif/_tmpnam.s (_tmpnam): renamed function to
- _khif_tmpnam, because it doesn't comply with ANSI but may be
- useful anyway. Real tmpnam was already in libc/stdio, and was
- colliding with this one (pr 2176.)
- * libc/sys/a29khif/stubs.s (tmpnam): removed tmpnam. This file is
- the wrong idea anyhow.
-
-Mon Nov 8 07:50:16 1993 Doug Evans (dje@canuck.cygnus.com)
-
- * configure.in: Remove h8300h, we have multilib now.
-
-Fri Nov 5 12:37:27 1993 Mark Eichin (eichin@cygnus.com)
-
- * libc/string/strcasecmp.c, libc/string/strncasecmp.c: new
- functions, to get preference over the ones in libiberty (since we
- provide correct declarations in <string.h>.
- * libc/string/Makefile.in: add support for strncasecmp,
- strcasecmp.
-
-Fri Nov 5 09:05:45 1993 D. V. Henkel-Wallace (gumby@blues.cygnus.com)
-
- * Change netware config not to look for cpu explicitly.
-
-Thu Nov 4 14:21:25 1993 Doug Evans (dje@canuck.cygnus.com)
-
- * libc/sys/sparc64/{creat.c,junk.c}: New files.
- * libc/sys/sparc64/Makefile.in: Add dependencies.
-
-Wed Nov 3 10:42:49 1993 Doug Evans (dje@canuck.cygnus.com)
-
- * configure.in: Clean up v9 a bit, new "os" aoutv8.
-
-Tue Nov 2 10:00:44 1993 D. V. Henkel-Wallace (gumby@cygnus.com)
-
- * libc/include/sys/reent.h: make structure smaller by allocating
- some stuff when needed.
- * libc/signal/signal.c: allocate as needed
- * libc/stdio/findfp.c,stdio/local.h: ditto
- * libc/stdlib/mprec.c: ditto
-
- * libc/time/localtime.c: don't return a dangling stack ptr.
-
-Wed Sep 29 20:42:34 1993 Rob Savoye (rob@darkstar.cygnus.com)
-
- * stub/mvme135/crt0.S, stub/mvme135/glue.c: Moved to stub/generic.
-
-Wed Sep 29 16:27:49 1993 K. Richard Pixley (rich@sendai.cygnus.com)
-
- * libc/include/stdio.h (__sputc): comment out static inline which
- confuses coff toolchains.
-
-Thu Sep 2 16:31:36 1993 Mark Eichin (eichin@cygnus.com)
-
- * libc/sys/a29khif/{_close.s, _fstat.s, _lseek.s, _sbrk.s,
- _write.s, getpid.c, kill.c, read.s}:
- * libc/sys/a29khif/stubs.s: eliminated stubs that already go
- through the syscalls directory.
-
-Fri Oct 29 13:59:58 1993 Jeffrey Wheat (cassidy@cygnus.com)
-
- * configure.in: fixed double quote gotcha.
-
-Wed Oct 27 15:27:09 1993 Rob Savoye (rob@darkstar.cygnus.com)
-
- * stub/ex931: stub library for sparclite board.
- * stub/idp: Renamed from mc68ec. Added contructor table
- stuff to linker script.
- * stub/mvme135: Renamed from m68kmvme. Added contructor table
- stuff to linker script.
-
-Tue Oct 26 17:01:23 1993 K. Richard Pixley (rich@sendai.cygnus.com)
-
- * configure.in: Configure testsuites only if they exist.
-
-Tue Oct 26 12:37:11 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * configure.in: Don't set machine_dir for i386 until there is
- something in libc/machine/i386 to compile. For i[34]86-*-netware*
- use sys/netware, don't use signal, define NO_EXEC, ABORT_PROVIDED,
- CLOCK_PROVIDED and MALLOC_PROVIDED.
-
- * libc/sys/netware: New directory. Contains simplistic and
- probably incorrect stubs for NetWare. Should be enough to load
- the library.
- * libc/sys/netware/crt0.c, libc/sys/netware/environ.c,
- libc/sys/netware/getpid.c, libc/sys/netware/link.c: New NetWare
- stub files.
-
- * libc/reent/execr.c: Don't use if NO_EXEC is defined.
- * libc/reent/sbrkr.c: Don't use if MALLOC_PROVIDED is defined.
- * libc/stdlib/abort.c: Don't use if ABORT_PROVIDED is defined.
- * libc/time/clock.c: Don't use if CLOCK_PROVIDED is defined.
-
-Mon Oct 25 16:48:08 1993 Roland H. Pesch (pesch@cygnus.com)
-
- * testsuite/Makefile.in: add "docs" dummy target for consistency
- with rest of newlib; turn "info" and "install-info" into dummy
- targets, since they wouldn't have worked. (Depended on
- nonexistent "doc" subdir.)
-
-Fri Oct 22 20:37:32 1993 david d `zoo' zuhn (zoo@rtl.cygnus.com)
-
- * configure.in: handle mips* instead of mips
-
-Thu Oct 21 08:57:24 1993 Ian Lance Taylor (ian@cygnus.com)
-
- * libc/include/sys/dirent.h: New file. If it is not overridden by
- a version of libc/sys/*/sys/dirent.h, it includes the next
- <dirent.h> file in case there is one lurking somewhere.
-
-Fri Oct 15 14:17:40 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * libc/stdlib/strtoul.c (_strtoul_r): Several changes for ANSI
- compliance, namely: Accept a minus sign. Consider a single 0 with
- a radix of 0 as being a conversion. Determine overflow correctly.
- If an overflow occurs, set *ptr to the end of the number, not the
- middle.
- * lib/stdlib/strtol.c (_strtol_r): Determine overflow correctly.
-
-Thu Oct 14 21:49:52 1993 Doug Evans (dje@canuck.cygnus.com)
-
- * libc/machine/h8300/divsi3.S (divmodsi4): Fix h8300h case.
-
-Fri Oct 1 17:17:34 1993 Doug Evans (dje@canuck.cygnus.com)
-
- * Makefile.in (INSTALL): Use $srcrootpre.
- (crt0.o): Replace $< with $(CRT0_DIR)/$(CRT0), Sun make
- can't handle it.
- * libc/Makefile.in (crt0.o): Spell out $<, Sun make can't handle
- it.
- * libc/sys/Makefile.in (crt0.o, lib.a): Ditto.
- * stub/Makefile.in (crt0.o, TARGETLIB): Ditto.
- * libc/sys/sparc64/Makefile.in (isatty.o): Sun VPATH lossage.
- * libm/math/Makefile.in (matherr.o): Ditto.
-
-Thu Sep 30 11:09:17 1993 Steve Chamberlain (sac@phydeaux.cygnus.com)
-
- * configure.in: Build multidirs for z8k.
- * libc/include/stdlib.h (_strtoul_r): add prototype.
- * libc/include/machine/limits.h: Get INT_MIN right for all the z8k family.
- * libc/include/machine/setjmp.h: Add for z8k.
- * libc/machine/z8k/{mulsi.o, udivsi3.o, umodsi3.o, modsi3.o} obsolete.
- * libc/sys/z8ksim/glue.c: tidy up.
-
-Mon Sep 20 14:04:46 1993 Doug Evans (dje@canuck.cygnus.com)
-
- * libc/unix/{execl.c execle.c execlp.c execv.c execvp.c}:
- New files. Requires execve system call.
- * libc/unix/Makefile.in: Use them.
- * libc/sys/sparc64/{execl.c execle.c execlp.c execv.c execvp.c}:
- Deleted, moved to libc/unix.
- * libc/sys/sparc64/Makefile.in: Remove them.
-
-Mon Sep 20 10:38:32 1993 Doug Evans (dje@canuck.cygnus.com)
-
- * libc/sys/sparc64/{template.S template_r.S}: New files.
- * libc/sys/sparc64/Makefile.in: Build source for trivial syscalls
- from templates.
- * libc/sys/sparc64/{chdir.S chmod.S close.S dup.S fcntl.S
- fork.S fstat.S lseek.S link.S mkdir.S open.S pipe.S read.S rmdir.S
- umask.S unlink.S wait4.S write.S}: Removed, now built from
- templates.
-
-Sun Sep 19 14:52:57 1993 Doug Evans (dje@canuck.cygnus.com)
-
- * libc/time/time.c: #include <_ansi.h>.
-
-Sun Sep 19 13:43:25 1993 Doug Evans (dje@canuck.cygnus.com)
-
- * configure.in (sparc64-*-*): Remove -D__SIZE_TYPE__.
-
-Mon Sep 13 13:52:16 1993 K. Richard Pixley (rich@sendai.cygnus.com)
-
- * configure.in: match m8* rather than m88k so that m88110 is
- recognized as well.
-
-Tue Sep 7 12:19:32 1993 Doug Evans (dje@canuck.cygnus.com)
-
- * libc/sys/h8300hms/{Makefile.in, _exit.c, misc.c}:
- Renamed exit.c to _exit.c to avoid collision with stdlib/exit.c.
- misc.c: New file.
-
- * configure.in: Add multilib support to h8300.
-
-Mon Sep 6 14:07:06 1993 Doug Evans (dje@canuck.cygnus.com)
-
- * libc/stdlib/abort.c (abort): Remove _VOLATILE from return type.
- * libc/include/_ansi.h (_ATTRIBUTE): New macro for __attribute__.
- * libc/include/stdlib.h (exit, abort): Add noreturn attribute.
-
-Mon Sep 6 14:24:18 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- * configure.in: Corrected multidirs for sparc target.
-
-Mon Aug 30 15:56:44 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
-
- Support for building newlib multiple times with different
- compilation flags.
- * configure.in: Only configure doc at top level. Set multidirs
- when appropriate for target, unless not at top level. If
- multidirs is set, independently configure each subdirectory.
- Adjust TOP, MULTIDIRS and MULTISUBDIR appropriately in Makefile.
- * Makefile.in (MULTIDIRS, MULTISUBDIR): New variables,
- automagically set by configure.in.
- (all): If MULTIDIRS is set, build multiple copies of libraries.
- (install): If MULTIDIRS is set, install multiple copies of
- libraries. Install in $(tooldir)/lib/$(MULTISUBDIR). If
- MULTISUBDIR is set, don't bother to install header files.
- * host/any (INCLUDES, CHEW): Use $(SRCTOP) rather than $(TOP) from
- ${srcrootpre}.
- * stub/configure.in: Set MULTISUBDIR appropriately.
- * stub/Makefile.in (install): Install in
- $(tooldir)/lib/$(MULTISUBDIR).
- * All Makefile.in files: Define SRCTOP as well as TOP.
-
-Mon Aug 30 10:34:24 1993 Doug Evans (dje@canuck.cygnus.com)
-
- * libc/machine/h8300/{mulhi3.S, divhi3.S}: Comment out if h8300h.
- * libc/machine/h8300/{mulsi3.S, divsi3.S}: Add h8300h support.
-
-Thu Aug 26 19:38:12 1993 Doug Evans (dje@canuck.cygnus.com)
-
- * libc/sys/h8300hms/exit.c (_exit): New function.
-
-Wed Aug 25 16:31:48 1993 K. Richard Pixley (rich@sendai.cygnus.com)
-
- * configure.in: recognize m88110.
-
-Fri Aug 20 16:46:23 1993 K. Richard Pixley (rich@sendai.cygnus.com)
-
- * libc/sys/m88kbug/crt0.c: pretty up, remove extraneous comments,
- prototype main and call with args.
-
-Fri Jul 30 16:52:47 1993 K. Richard Pixley (rich@cygnus.com)
-
- First real try at system traps for m88k-bug.
- * libc/sys/m88kbug/syscalls.c: many changes. Convert from stubs
- to real trap calls.
- * libc/sys/m88kbug/sys/systraps.h: new file.
-
-Tue Jul 27 16:31:16 1993 K. Richard Pixley (rich@sendai.cygnus.com)
-
- Patches to fix info building when target does not use sys
- directory.
- * libc/Makefile.in (targetdep.tex): add sys.tex separately.
- * libc/sys.tex, libc/sys/sys.tex: moved from libc/sys/sys.tex to
- libc/sys.tex.
- * libc/sys/Makefile.in (doc): do nothing.
-
-Mon Jul 26 17:08:11 1993 K. Richard Pixley (rich@sendai.cygnus.com)
-
- * libc/Makefile.in (CRT0): new macro.
- (all): depend on $(CRT0) rather than crt0.o.
-
- * configure.in: fix libc_sys_dir -> libc_sys_lib thinko.
- do not default crt0, instead, set crt0 and crt0_dir based on
- sys_dir and stub_dir.
-
- * Makefile.in (CRT0_DIR): new macro.
- (all): depend on $(CRT0) rather than crt0.o which may not exist.
- (crt0.o): depend on $(CRT0_DIR)/$(CRT0) rather than simply
- $(CRT0).
- ($(CRT0)): recur by cd'ing into $(CRT0_DIR).
-
-Sun Jul 25 17:51:51 MDT 1993 Jeffrey Wheat (cassidy@cygnus.com)
-
- * testsuite/lib/libm.exp:
- added code to support compiling and linking of tests for
- libm.sac (paranoia to be added next) and processing the
- pass or failure of the tests.
-
- * testsuite/config/unix-libm.exp:
- platform specific proc's for dealing with compiler, linker
- and the way we execute and process the test results.
-
- * testsuite/libm.sac/execute.exp:
- generic framework for the sac tests. the config and lib
- expect code for specific platforms tie it all together.
-
- * testsuite/libm.sac/test_is.c:
- changed the output of the test to be consistant with the
- other tests. parsing of pass nad fail messages is now fixed.
-
-Fri Jul 23 19:20:07 1993 Per Bothner (bothner@kalessin)
-
- * libc/include/{assert.h, ctype.h, dirent.h, errno.h, fastmath.h,
- locale.h, math.h, pwd.h, reent.h, setjmp.h, signal.h, stdio.h,
- stdlib.h, string.h, termios.h, time.h, utime.h, utmp.h}: For C++:
- #ifdef __cplusplus, surround by extern ""C { ... }.
- * libc/include/assert.h: Do *not* protect assert.h against
- multiple inclusion! Also, #undef it before #define, to allow
- redefinition.
- * libc/include/stdio.h (getlogin, cuserid): Removed. These
- should be only in unistd.h.
-
- * libc/include/sys/{fcntl.h, reent.h, stat.h, time.h, times.h,
- unistd.h}: For C++: #ifdef __cplusplus, surround by extern ""C {
- ... }.
-
-Fri Jul 23 10:15:33 1993 Doug Evans (dje@canuck.cygnus.com)
-
- * libc/machine/sparc/Makefile.in: Must create a library, even
- if empty.
-
-Wed Jul 21 16:00:37 1993 K. Richard Pixley (rich@sendai.cygnus.com)
-
- * configure.in: set machine_dir for m88k. edit crt0 definition
- into makefiles.
-
- * Makefile.in, libc/Makefile.in (crt0): pull up from lower directories.
-
- * libc/Makefile.in (all): also build crt0.o.
-
- * libc/machine/i386/Makefile.in, libc/machine/sparc/Makefile.in,
- libc/machine/z8k/Makefile.in, libm/Makefile.in (clean): no need
- to remove CRT0.
-
- * libc/machine/m88k/Makefile.in (TOP, TARGETLIB): removed.
- (all): reworked to build in place.
- (clean): remove lib.a
- (Makefile): remove redundant ./, call $(SHELL) rather than sh.
-
- * libc/sys/m88kbug/crt0.c (start): renamed to _start.
- (_start): key off edata rather than _start_bss.
-
-Wed Jul 21 14:29:47 1993 david d `zoo' zuhn (zoo@cygnus.com)
-
- * libc/include/sys/unistd.h, libc/include/reent.h,
- libc/reent/sbrkr.c: change sbrk to return void* instead of char*.
-
-Tue Jul 20 13:19:18 1993 K. Richard Pixley (rich@sendai.cygnus.com)
-
- * libm/Makefile.in, libc/Makefile.in ($(SUBDIRS)): dollar escape a dollar sign.
-
- * Makefile.in (libc.a): break into two rules, one for libc.a and
- one for libc/libc.a. Force subdirs current before rebuilding
- library.
- (libm.a): break into two rules, one for libm.a and one for
- libm/libm.a. Force subdirs current before rebuilding library.
-
- * libc/Makefile.in (SUBLIBS): fix typo.
-
- * libc/sys/Makefile.in (all): force descent into subdirs, then
- rebuild library iff out of of date.
-
-Fri Jul 16 17:47:57 1993 K. Richard Pixley (rich@sendai.cygnus.com)
-
- Rework so that library is built and then finished rather than
- being built on each invocation of make.
-
- * host/any (machine_dir, sys_dir, signal_dir): these are not
- shared and have been moved to their associated Makefile.in's.
- (AR_FLAGS): switch to qc which is faster.
- * configure.in: no longer assign machine_dir for m88k. set
- stub_dir, stub_lib, & crt0 for m68k*-unknown-{aout,coff}. If
- stub_dir set, then add to configdirs. add comment about silly
- configuration.
- (configdirs): drop stub. It will be added only
- when needed.
- (libm_fp_lib, libc_unix_lib, libc_signal_lib, libc_machine_lib,
- libc_sys_dir, fake_sys_dir, libc_fake_sys_lib, stub_dir,
- stub_lib, crt0): new variables for tailoring lower level
- makefiles. Assign accordingly and edit into makefiles.
- * libm/Makefile.in: updated copyright.
- (TARGETLIB): removed.
- (FLAGS_TO_PASS): removed TARGETLIB, machine_dir, sys_dir.
- (SUBDIRS): removed TARGETDEP_DIRS.
- (LIBM_FP_LIB, SUBLIBS): new macros.
- (all): reworked.
- (force): new target to force rebuilds.
- (Makefile): call $(SHELL) rather than sh. drop redundant ./
- * libc/sys/a29khif/Makefile.in, libc/sys/decstation/Makefile.in,
- libc/sys/go32/Makefile.in, libc/sys/h8300hms/Makefile.in,
- libc/sys/h8500hms/Makefile.in, libc/sys/m88kbug/Makefile.in,
- libc/sys/sh/Makefile.in, libc/sys/sparc64/Makefile.in,
- libc/sys/sun4/Makefile.in, libc/sys/sysvi386/Makefile.in,
- libc/sys/sysvnecv70/Makefile.in, libc/sys/z8ksim/Makefile.in,
- stub/m68kmvme/Makefile.in: updated copyright.
- (TARGETLIB, TARGETCRT0, CRT0): macros removed.
- (all): reworked. made this the default rule.
- (clean): also remove lib.a.
- (Makefile): call $(SHELL) rather than sh. drop redundant ./
- * stub/Makefile.in: updated copyright.
- (TARGETLIB, TARGETCRT0, CRT0, TOP): removed.
- (stub_lib): new macro.
- (FLAGS_TO_PASS): removed TARGETLIB, stub_dir, TARGETCRT0. Added
- RANLIB.
- (all): reworked.
- (clean, install): assume stub_dir exists.
- (Makefile): depend on configure.in. call $(SHELL) rather than
- sh. drop redundant ./
- * stub/configure.in (stublib): new macro, assign it, edit it into
- makefiles.
- * Makefile, libc/Makefile.in, doc/Makefile.in, libc/sys/Makefile.in:
- updated copyright.
- (all): reworked.
- (Makefile): call $(SHELL) rather than sh. drop redundant ./
- * libc/Makefile.in (TARGETCRT0): removed.
- (FLAGS_TO_PASS): dropped TARGETLIB, machine_dir, sys_dir,
- TARGETCRT0.
- (SUBDIRS): drop TARGETDEP_DIRS.
- (LIBC_SIGNAL_LIB, LIBC_SYS_LIB, LIBC_MACHINE_LIB, LIBC_UNIX_LIB,
- LIBC_FAKE_SYS_LIB, SUBLIBS): new macros for configuration.
- (force): new target to force rebuilds.
- * libc/sys/Makefile.in (TARGETCRT0, sys_dir): removed.
- (FLAGS_TO_PASS): TARGETLIB, machine_dir, sys_dir, TARGETCRT0
- removed.
- (clean): assume sys_dir always exists.
- * libm/test/Makefile.in (Makefile): call $(SHELL) rather than sh.
- drop redundant ./
- * libc/ctype/Makefile.in, libc/errno/Makefile.in,
- libc/locale/Makefile.in, libc/machine/Makefile.in,
- libc/machine/a29k/Makefile.in, libc/machine/h8300/Makefile.in,
- libc/machine/h8500/Makefile.in, libc/machine/i386/Makefile.in,
- libc/machine/i960/Makefile.in, libc/machine/m68k/Makefile.in,
- libc/machine/mips/Makefile.in, libc/machine/necv70/Makefile.in,
- libc/machine/sh/Makefile.in, libc/machine/sparc/Makefile.in,
- libc/machine/z8k/Makefile.in, libc/reent/Makefile.in,
- libc/signal/Makefile.in, libc/stdio/Makefile.in,
- libc/stdlib/Makefile.in, libc/string/Makefile.in,
- libc/sys/Makefile.in, libc/syscalls/Makefile.in,
- libc/time/Makefile.in, libc/unix/Makefile.in,
- libm/ieeefp/Makefile.in, libm/math/Makefile.in: updated copyright.
- (TARGETLIB): removed.
- (all): reworked.
- (clean): also remove lib.a.
- (Makefile): call $(SHELL) rather than sh. drop redundant ./
- * Makefile.in: (machine_dir, sys_dir, stub_dir, stub_lib, CRT0):
- new macros.
- (SUBDIRS): moved to follow frag inclusion, change stub to
- stub_dir.
- (FLAGS_TO_PASS): removed machine_dir, sys_dir, signal_dir which
- are now set in the libc Makefile.
- * libc/machine/Makefile.in (TARGETCRT0, machine_dir): removed.
- (FLAGS_TO_PASS): removed TARGETLIB, machine_dir, sys_dir,
- TARGETCRT0.
- (force): new target to force rebuilds.
- * stub/configure.in: determine and set stub_lib for for Makefile.
-
-Thu Jul 15 12:01:27 1993 Doug Evans (dje@canuck.cygnus.com)
-
- * libc/sys/h8300hms/Makefile.in: Make `all' the default target.
- crt0.s renamed to crt0.S.
- * libc/sys/h8300hms/crt0.S: Add h8/300h support.
-
- * libc/machine/h8300/Makefile.in: Make `all' the default target.
- * libc/machine/h8300/{cmpsi.S,ucmpsi.S}: #ifdef out entire file if
- h8300h.
- * libc/machine/h8300/defines.h: Add macros to handle pointers for
- h8300 (16 bits) and h8300h (32 bits).
- * libc/machine/h8300/{divsi3.S,mulsi3.S,memcpy.S,memset.S,
- reg_memcpy.S,reg_memset.S,strcmp.S}: Add h8300h support.
-
-Thu Jul 15 10:13:29 1993 Ian Lance Taylor (ian@cygnus.com)
-
- * libc/machine/m88k/setjmp.S, Makefile.in: New files; a simple
- implementation of setjmp and longjmp for the m88k.
- * libc/include/machine/setjmp.h: Added __m88000__ case.
-
-Wed Jul 14 10:10:30 1993 Doug Evans (dje@canuck.cygnus.com)
-
- * configure.in: Recognize h8300h as variant of h8300.
-
-Tue Jul 13 12:24:11 1993 Steve Chamberlain (sac@phydeaux.cygnus.com)
-
- * libc/include/sys/unistd.h (read, write): get prototypes right.
- (sbrk): New prototype.
- * libc/reent/sbrkr.c (sbrkr): Use correct sbrk prototype.
- * libc/stdio/local.h: Include unistd.h.
- * libc/machine/h8300/syscalls.c: Names have changed.
-
-Mon Jul 12 18:08:42 1993 K. Richard Pixley (rich@cygnus.com)
-
- * configure.in: add sys_dir assignment for m88k-bug.
-
-Thu Jul 8 09:16:21 1993 Doug Evans (dje@canuck.cygnus.com)
-
- * libc/sys/sparc64/sys/syscallasm.h: New macros to handle either
- a.out or elf.
- * libc/sys/sparc64: all *.S files: Use new macros.
- * libc/sys/sparc64/isatty.c: New file.
- * libc/sys/sparc64/Makefile.in: Stop using /lib/libc.a for
- functions beyond what newlib provides.
-
-Thu Jul 8 09:11:28 1993 Doug Evans (dje@canuck.cygnus.com)
-
- * libc/include/sys/stat.h: Move st_atime so not doubly defined for
- svr4.
-
-Thu Jul 8 09:09:16 1993 Doug Evans (dje@canuck.cygnus.com)
-
- * libc/include/machine/ieeefp.h: Add support for h8/300h.
-
-Fri Jul 2 10:11:20 1993 K. Richard Pixley (rich@cygnus.com)
-
- * configure.in: add m88k.
- * libc/include/machine/ieeefp.h: add case for m88k. Also add
- sanity check so no one else need ever chase what I did to find
- this.
-
- * libm/math/Makefile.in (FAKEC): added atanf.c log1pf.c scalbnf.c.
-
-Fri Jul 2 09:15:21 1993 Ian Lance Taylor (ian@cygnus.com)
-
- * doc/makedoc.c: Include <ctype.h>.
-
-Wed Jun 30 09:35:06 1993 Doug Evans (dje@canuck.cygnus.com)
-
- * libc/Makefile.in (FLAGS_TO_PASS): Add TARGET_ASFLAGS.
- * libc/sys/Makefile.in (FLAGS_TO_PASS): Add TARGET_ASFLAGS.
- * libc/machine/Makefile.in (FLAGS_TO_PASS): Add TARGET_ASFLAGS.
-
- * libm/test/Makefile.in (all): Link with ../../lib[cm].a.
-
-Sun Jun 27 17:05:20 1993 Doug Evans (dje@sphagnum.cygnus.com)
-
- * libc/include/errno.h (ENOSYS): Added.
-
- * libc/unix/getpwd.c (getcwd): Fix typo (_up -> up).
-
-Mon Jun 21 09:03:32 1993 Steve Chamberlain (sac@phydeaux.cygnus.com)
-
- * libc/stdio/fflush.c (fflush): Check for reent struct
- initialization.
- * libc/stdio/fdopen.c (fdopen): Avoid namespace conflict.
-
-Fri Jun 18 16:06:05 1993 Mark Eichin (eichin@rtl.cygnus.com)
-
- * libc/stdlib/dtoastub.c: new file -- move user callable "dtoa"
- out of dtoa.c so it doesn't pollute the namespace.
- * libc/include/_syslist.h: new file -- mappings from _function to
- function, for systems where we can't win (by default, all of them,
- until we start updating system calls.)
- * libc/syscalls: new directory -- stubs for exporting _function
- names as unmodified function names.
- * libc/configure.in: add MISSING_SYSCALL_NAMES to enable
- _syslist.h on all platforms by default, but put hooks in for
- fake_sys_dir so we can include it when we've renamed the system
- calls.
- * libc/reent/execr.c libc/reent/filer.c libc/reent/fstatr.c
- libc/reent/linkr.c libc/reent/sbrkr.c libc/reent/statr.c
- libc/signal/raise.c libc/signal/signal.c libc/stdio/fdopen.c
- libc/stdio/mktemp.c libc/stdio/tmpnam.c libc/stdlib/abort.c
- libc/stdlib/system.c libc/unix/getcwd.c libc/unix/getlogin.c
- libc/unix/getpass.c libc/unix/getut.c libc/unix/ttyname.c: change
- non ANSI functions to call _function.
-
-Wed Jun 9 09:48:26 1993 Ian Lance Taylor (ian@cygnus.com)
-
- * libc/stdlib/strtoul.c (_strtoul_r): Handle leading 0 correctly
- when base 16 is specified. Don't accept non-digits if radix > 10.
-
-Thu Jun 3 10:01:15 1993 Doug Evans (dje@canuck.cygnus.com)
-
- * libc/include/math.h: Rename xxx_r fns to _xxx_r.
-
-Wed Jun 2 16:54:16 1993 Jim Wilson (wilson@sphagnum.cygnus.com)
-
- * libc/include/sys/stat.h: Surround text after #endif with
- comments.
-
-Wed Jun 2 12:47:32 1993 Ian Lance Taylor (ian@cygnus.com)
-
- * libc/stdlib/mallocr.c: If MALLOC_PROVIDED is defined, just make
- _malloc_r, _realloc_r, and free_r call the corresponding
- non-reentrant functions.
-
- * libm/math/modf.c (modf): We now take the address of ipart, so
- don't make it a register variable.
-
-Tue Jun 1 18:25:54 1993 Doug Evans (dje@canuck.cygnus.com)
-
- * libm/math/*: Rename all xxx_r fns to _xxx_r.
-
-Wed May 26 22:06:35 1993 Roland H. Pesch (pesch@cygnus.com)
-
- * libc/libc.texinfo and embedded docn throughout: formatting
- improvements, minor rephrasing for clarity, and improved
- reentrancy docn.
-
-Sun May 23 17:29:49 1993 Steve Chamberlain (sac@thepub.cygnus.com)
-
- * libm/ieeefp/infinity.c (maxpowtwof): Fix initialzation bug.
-
- * libc/stdio/cvt.c (_licvt): Print the right value on machines
- where sizeof(int) != sizeof(long).
-
-Fri May 21 22:09:32 1993 Roland H. Pesch (pesch@fowanton.cygnus.com)
-
- * libc/reent/execr.c, libc/reent/filer.c, libc/reent/linkr.c,
- libc/reent/sbrkr.c, libc/reent/statr.c, libc/stdio/tmpnam.c,
- libc/stdlib/atol.c, libc/stdlib/rand.c, libc/string/strpbrk.c,
- libc/string/strspn.c, libm/ieeefp/isnan.c, libm/math/bessel.c,
- libm/math/matherr.c: changes for better docn formatting (info).
-
- * libc/libc.texinfo, libc/ctype/ctype.tex, libc/locale/locale/tex,
- libc/reent/reent.tex, libc/signal/signal.tex,
- libc/stdio/stdio.tex, libc/stdlib/stdlib.tex,
- libc/string/strings.tex, libc/sys/sys.tex, libc/time/time.tex,
- libm/libm.texinfo, libm/ieeefp/ieeefp.tex, libm/math/math.tex: use
- makeinfo node defaulting to get better Info file node structure.
- (Requires recent sac change to doc/makedoc.c and doc/doc.str.)
- Also include a few formerly missing sections (subroutines).
-
- * doc/doc.str: delete fossil expansion for "func"
-
- * default.menu, no-signal.menu: delete.
-
- * Makefile.in, libc/Makefile.in, configure.in, host/any: simplify
- method used to adjust doc for missing "signals" chapter when
- signal_dir is empty.
-
-Thu May 20 21:38:37 MDT 1993 Jeffrey Wheat (cassidy@cygnus.com)
-
- * configure.in: added testsuite/libm.sac
-
-Wed May 19 14:52:34 1993 Doug Evans (dje@thepub.cygnus.com)
-
- * libc/sys/sparc64/crt0.S: Set %g4 to 0 (to test Medium/Anywhere
- code model).
-
-Tue May 18 13:17:21 1993 Ian Lance Taylor (ian@cygnus.com)
-
- * libm/Makefile.in: Use $(MAKE) rather than make, and define
- MAKEOVERRIDES to be empty.
-
-Mon May 17 08:42:44 1993 Ian Lance Taylor (ian@cygnus.com)
-
- * configure.in: Don't build mips-*-* with -msoft-float, since that
- makes it incompatible with hard floating point.
-
-Mon May 17 00:03:35 MDT 1993 Jeffrey Wheat (cassidy@cygnus.com)
-
- * Makefile.in: added recursive 'make check'
-
-Thu May 13 16:24:18 MDT 1993 Jeffrey Wheat (cassidy@cygnus.com)
-
- * configure.in: added ./testsuite ./testsuite/libm.paranoia
- * ./testsuite/Makefile.in: created
- * ./testsuite/libm.paranoia: paranoia tests added
-
-Thu May 13 10:30:24 1993 Ian Lance Taylor (ian@cygnus.com)
-
- * configure.in: For mips-*-* set machine_dir to mips.
-
- * libc/machine/mips: New directory.
- * libc/machine/mips/Makefile.in: New file.
- * libc/machine/mips/setjmp.S: New file; simplistic MIPS version of
- setjmp and longjmp.
- * libc/include/machine/setjmp.h: Added __mips__ case.
-
- * libc/machine/lmips: Removed unused and useless directory.
-
-Mon May 3 10:22:31 1993 Ian Lance Taylor (ian@cygnus.com)
-
- * configure.in: Accept i486-*-sco* as well as i386-*-sco*.
-
-Thu Apr 15 15:16:44 1993 Doug Evans (dje@canuck.cygnus.com)
-
- * libc/sys/sparc64/crt0.S: Add comment (%g1 contains atexit arg at
- start up).
-
-Fri Apr 9 13:32:26 1993 Ian Lance Taylor (ian@cygnus.com)
-
- * libc/include/machine/setjmp-dj.h: Use _SETJMP_DJ_H rather than
- SETJMP_H.
-
-Thu Apr 8 10:07:18 1993 Doug Evans (dje@canuck.cygnus.com)
-
- * libm/test/convert.c: structure member errno -> errno_val.
- Must include <errno.h> to use errno, it's a macro now.
- * libm/test/math.c: Ditto.
- * libm/test/math2.c: Include errno.h.
- * libm/test/string.c: Ditto.
- * libm/test/test.h: structure member errno -> errno_val.
- Remove extern int errno decl.
-
-Thu Apr 8 07:56:33 1993 Ian Lance Taylor (ian@cygnus.com)
-
- * libc/stdio/Makefile.in: Added dependencies on local header
- files.
- * libc/stdio/std.h, libc/stdio/vfprintf.h: Removed unused header
- files.
-
-Wed Apr 7 16:19:32 1993 Ian Lance Taylor (ian@cygnus.com)
-
- * libc/include/machine/ieeefp.h: Added __MIPSEB__ case.
-
-Wed Apr 7 10:55:21 1993 Doug Evans (dje@canuck.cygnus.com)
-
- * libc/stdio/siprintf.c libc/stdio/sscanf.c libc/stdio/vsprintf.c:
- Initialize _data.
-
- * libc/stdio/vfprintf.c: No need to declare _icvt, _licvt, _sicvt.
- * libc/stdio/local.h: Add prototype for _licvt.
-
- * libc/stdio/ungetc.c (__submore): Use _malloc_r,_realloc_r
- instead of malloc,reealloc.
-
- * libc/stdlib/local.h: New file.
- * libc/stdlib/efgcvt.c: #include local.h.
- (gcvt): Fix call to _gcvt.
- * libc/stdlib/ecvtbuf.c: #include local.h.
-
- * libc/stdlib/Makefile.in: new files mallocr.c mstats.c.
- * libc/stdlib/mallocr.c mstats.c malloc.h: New files.
- * libc/stdlib/malloc.c: main routines moved to mallocr.c.
-
- * libc/stdlib/atexit.c: moved global data to struct _reent.
- * libc/stdlib/exit.c: use struct _atexit in struct _reent.
-
- * libc/reent/reent.c (inpure_data): _REENT_INIT macro modified.
-
-Wed Apr 7 09:41:50 1993 Doug Evans (dje@canuck.cygnus.com)
-
- * libc/include/sys/reent.h: Stuff required by ANSI headers moved
- here from ../reent.h.
-
-Tue Apr 6 12:56:01 1993 Ian Lance Taylor (ian@cygnus.com)
-
- * Makefile.in (MATHOBJS_IN_LIBC): List of object files which
- should be provided in both libc.a and libm.a.
- (libc.a): Depend on targ-include and libm.a. Copy
- $(MATHOBJS_IN_LIBC) from libm.a to libc.a.
- (libm.a): Depend on targ-include.
- * configure.in (subdirs): Removed libc/math.
-
-Mon Apr 5 10:18:16 1993 Steve Chamberlain (sac@thepub.cygnus.com)
-
- * libm/ieeefp/infinity.c (maxpowtwo): Fix initialization bug.
-
-Sat Apr 3 11:06:07 1993 Doug Evans (dje@canuck.cygnus.com)
-
- * libc/include/{errno.h, math.h, stdio.h, stdlib.h}: Use
- sys/reent.h instead of reent.h.
- * libc/include/reent.h: Split into two parts: stuff needed by ANSI
- headers moved to sys/reent.h.
- * libc/include/signal.h: _MAX_SIGNALS moved to sys/signal.h.
- * libc/include/sys/signal.h: Define _MAX_SIGNALS if
- __need__MAX_SIGNALS defined.
- * libc/include/stdio.h: struct __sFILE moved to sys/reent.h.
- std{in,out,err} refer to new _std{in,out,err} members.
-
-Fri Apr 2 11:27:12 1993 Doug Evans (dje@canuck.cygnus.com)
-
- * libc/include/sys/signal.h: #define _SYS_SIGNAL_H for general
- case.
-
-Fri Apr 2 09:41:10 1993 Doug Evans (dje@canuck.cygnus.com)
-
- * libc/sys/sparc64/execve.S (execve): Insert nop in delay slot,
- rather than whatever macro seterrno() has.
-
-Thu Apr 1 16:47:08 1993 Doug Evans (dje@canuck.cygnus.com)
-
- * libc/locale/locale.c: Reentrant routines _r_xxx renamed to
- _xxx_r. struct reent_struct renamed to struct _reent for ANSI.
-
- * libc/include/machine/fastmath.h: Use _HAVE_STDC instead of
- __STDC__.
-
- * libc/reent/{execr.c, filer.c, fstatr.c, linkr.c, reent.c,
- reent.tex, sbrkr.c, statr.c}: _r_xxx reentrant routines renamed to
- _xxx_r. struct reent_struct renamed to struct _reent for ANSI.
-
- * libc/signal/signal.c: Reentrant routines _r_xxx renamed to
- _xxx_r. struct reent_struct renamed to struct _reent for ANSI.
-
- * libc/stdio/{fclose.c, fdopen.c, findfp.c, fiprintf.c, flags.c,
- fopen.c, fprintf.c, freopen.c, fscanf.c, fseek.c, ftell.c,
- fwalk.c, getchar.c, gets.c, iprintf.c, local.h, makebuf.c,
- mktemp.c, perror.c, printf.c, putchar.c, puts.c, refill.c,
- remove.c, rename.c, scanf.c, setvbuf.c, siprintf.c, sprintf.c,
- sscanf.c, stdio.c, tmpfile.c, tmpnam.c, vfprintf.c, vfprintf.h,
- vfscanf.c, vprintf.c, vsprintf.c}: Reentrant routines _r_xxx
- renamed to _xxx_r. struct reent_struct renamed to struct _reent
- for ANSI. structure members given leading "_" for ANSI. Use
- _HAVE_STDC instead of __STDC__ and _HAVE_STDARG.
-
- * libc/stdlib/{__adjust.c, calloc.c, dtoa.c, ecvtbuf.c, malloc.c,
- mprec.c, mprec.h, rand.c, std.h, strtod.c, strtol.c, strtoul.c,
- system.c}: Reentrant routines _r_xxx renamed to _xxx_r. struct
- reent_struct renamed to struct _reent for ANSI.
- Structure members given leading "_" for ANSI.
- _CONST --> const in prototypes.
- Use _HAVE_STDC instead of __STDC__.
-
- * libc/string/strtok.c: Reentrant routines _r_xxx renamed to
- _xxx_r.
- struct reent_struct renamed to struct _reent for ANSI.
- Structure members given leading "_" for ANSI.
-
- * libc/time/asctime.c: Reentrant routines _r_xxx renamed to
- _xxx_r.
- struct reent_struct renamed to struct _reent for ANSI.
-
- * libm/math/{acos.h, acosh.h, asin.c, asinh.h, atanh.h, bessel.h,
- cbrt.h, cosh.h, erf.c, erf.h, error.c, exp.c, fmod.c, frexp.h,
- gamma.h, hypot.h, ldexp.c, log.h, log10.c, log1p.c log2.c,
- mathimpl.h, pow.c, remainder.c, sincos.c, sinh.h, sqrt.h, tan.c,
- tanh.h}: struct reent_struct renamed to struct _reent for ANSI.
-
- * libc/include/{_ansi.h, ctype.h, math.h, reent.h, locale.h,
- signal.h, stdio.h, stdlib.h, string.h, time.h}:
- Use _HAVE_STDC instead of __STDC__ and _HAVE_STDARG.
- #ifndef _STRICT_ANSI non-ANSI routines.
- Reentrant routines renamed from _r_xxx to _xxx_r.
- No need to use _STRICT_ANSI on _xxx_r reentrant routines.
- Use _STRICT_ANSI instead of __STRICT_ANSI, _ANSI_SOURCE, etc.
- Clean up namespace (structure members have leading "_").
- struct reent_struct renamed to struct _reent for ANSI compliance.
- _CONST --> const in function prototypes.
-
- * libc/include/string.h: Add NULL and size_t.
-
- * libc/sys/sparc64/Makefile.in: New syscall routines for link,
- unlink, wait, wait4. Reentrant syscall routines close, fork,
- fstat, link, lseek, open, read, sbrk, stat, unlink, wait, wait4,
- write.
- * libc/sys/sparc64/cerror.S (cerror_r): New routine.
- * libc/sys/sparc64/{close.S, fork.S, fstat.S, link.S, lseek.S,
- open.S, read.S, sbrk.S, stat.S, unlink.S, wait.S, wait4.S,
- write.S}: Define reentrant versions.
- * libc/sys/sparc64/sys/syscallasm.h (defsyscall_r): New macro for
- reentrant syscalls.
-
- * libc/sys/sparc64/crt0.S (start): Fix initialization of environ.
-
- * libc/include/stdlib.h (RAND_MAX): Fix value.
-
-Thu Apr 1 12:28:30 1993 Ian Lance Taylor (ian@cygnus.com)
-
- * libc/sys/a29khif/_main.c: Removed unnecessary file.
- * libc/sys/a29khif/Makefile.in (OFILES): Removed _main.c, moved
- VPATH support targets after all: target.
-
- * stub/mvme135/mvme.S: Renamed exceptionhandler to
- exceptionHandler, which is what mvme135-stub.c expects.
-
-Wed Mar 31 17:42:03 1993 Doug Evans (dje@cygnus.com)
-
- * libc/stdio/tmpnam.c (worker): Fix test for _r_open() failure.
-
- * libc/unix/getpass.c (getpass): Use stdin,stderr instead of
- def_stdin/def_stderr (latter removed from stdio.h to make it ANSI
- compliant).
-
-Tue Mar 30 09:58:21 1993 Doug Evans (dje@canuck.cygnus.com)
-
- * libc/reent/execr.c (_r_wait): Re-order args to make reent_struct
- first.
- libc/reent/filer.c (_r_open, _r_close, _r_lseek, _r_read,
- _r_write): Ditto.
- libc/reent/fstatr.c (_r_fstat): Ditto.
- libc/reent/linkr.c (_r_link, _r_unlink): Ditto.
- libc/reent/sbrkr.c (_r_sbrk): Ditto.
- libc/reent/statr.c (_r_stat): Ditto.
-
- * libc/stdio/fopen.c (_r_fopen): Re-order args to _r_open.
- * libc/stdio/freopen.c (freopen): Ditto for _r_open, _r_free.
- * libc/stdio/fseek.c (fseek): Ditto for _r_fseek.
- * libc/stdio/makebuf.c (__smakebuf): Ditto for _r_fstat.
- * libc/stdio/mktemp.c (_gettemp): Ditto for _r_stat, _r_open.
- * libc/stdio/remove.c (_r_remove): Ditto for _r_unlink.
- * libc/stdio/rename.c (_r_rename): Ditto for _r_link, _r_unlink.
- * libc/stdio/stdio.c (__sread): Ditto for _r_read.
- (__swrite): Ditto for _r_lseek, _r_write.
- (__sseek): Ditto for _r_lseek.
- (__close): Ditto for _r_close.
- * libc/stdio/tmpnam.c (worker): Ditto for _r_open, _r_close.
-
- * libc/stdlib/malloc.c (_r_morecore): Re-order args to _r_sbrk.
- * libc/stdlib/system.c (_r_system): Ditto for _r_wait.
-
- * libc/include/reent.h: Re-order arguments to _r_xxx syscall fns
- to make reent_struct the first argument (and thus consistent with
- the rest of newlib).
-
- * stub/mvme135/mvme135-stub.c (initializeRemcomErrorFrame): Remove
- reference to __STDC__.
-
-Mon Mar 29 12:34:32 1993 Doug Evans (dje@canuck.cygnus.com)
-
- * libc/stdlib/exit.c (exit): Use _REENT->__cleanup instead of
- global __cleanup.
-
-Wed Mar 24 11:54:35 1993 Doug Evans (dje@canuck.cygnus.com)
-
- * libc/stdio/freopen.c (freopen): Ensure stdio is initialized
- first.
- libc/stdio/fclose.c (fclose): Ditto.
-
-Tue Mar 23 01:26:52 1993 Doug Evans (dje@rtl.cygnus.com)
-
- * Run through indent and rename reentrant routines for ANSI.
- libc/stdio/{clearerr.c cvt.c fclose.c fdopen.c feof.c ferror.c
- fflush.c fgetc.c fgetpos.c fgets.c findfp.c fiprintf.c flags.c
- fopen.c fprintf.c fputc.c fputs.c fread.c freopen.c fscanf.c
- fseek.c fsetpos.c ftell.c fvwrite.c fwalk.c fwrite.c getc.c
- getchar.c gets.c iprintf.c makebuf.c mktemp.c perror.c printf.c
- putc.c putchar.c puts.c refill.c remove.c rename.c rewind.c rget.c
- scanf.c setbuf.c setvbuf.c siprintf.c sprintf.c sscanf.c stdio.c
- tmpfile.c tmpnam.c ungetc.c vfprintf.c vfscanf.c vprintf.c
- vsprintf.c wbuf.c wsetup.c local.h}
-
- * libc/locale/locale.c: Reformat and rename for ANSI, GNU style.
-
- * Run through indent and rename xxx_r fns to _r_xxx for ANSI.
- libc/stdlib/{__adjust.c __exp10.c __ten_mu.c abort.c abs.c
- assert.c atexit.c atof.c atoi.c atol.c bsearch.c calloc.c div.c
- dtoa.c ecvtbuf.c efgcvt.c exit.c getenv.c labs.c ldiv.c malloc.c
- mbtowc.c mprec.c putenv.c qsort.c rand.c setenv.c strdup.c
- strtod.c strtol.c strtoul.c system.c wctomb.c mprec.h}
-
- * Run through indent.
- libc/string/{bcmp.c bcopy.c bzero.c index.c memchr.c memcmp.c
- memcpy.c memmove.c memset.c rindex.c strcat.c strchr.c strcmp.c
- strcoll.c strcpy.c strcspn.c strerror.c strlen.c strncat.c
- strncmp.c strncpy.c strpbrk.c strrchr.c strspn.c strstr.c strtok.c
- strxfrm.c}
-
- * libc/time/{asctime.c clock.c ctime.c difftime.c gmtime.c
- localtime.c mktime.c strftime.c time.c}:
- Run through indent and rename xxx_r (reentrant) fns to _r_xxx for ANSI.
-
- * Reformatting + renaming (for ANSI, GNU style, consistency).
- libc/include/{_ansi.h, assert.h, ctype.h, errno.h, fastmath.h,
- ieeefp.h, locale.h, math.h, paths.h, pwd.h, reent.h, setjmp.h,
- signal.h, stdio.h, stdlib.h, string.h, time.h, unistd.h}
-
-Fri Mar 19 11:28:01 1993 Doug Evans (dje@cygnus.com)
-
- * libc/include/stdio.h (stdin_r): Fix.
-
-Fri Mar 19 09:43:48 1993 Ian Lance Taylor (ian@cygnus.com)
-
- * Makefile.in: Unexport some variables to keep GNU make from
- putting them in the environment and using up needed ARG_MAX space
- (a hack is used to let this work with older makes as well).
-
-Tue Mar 16 15:11:08 1993 Ian Lance Taylor (ian@cygnus.com)
-
- * Makefile.in: Use $(MAKE) rather than make.
- (MAKEOVERRIDES): Define to be empty.
- (FLAGS_TO_PASS): Don't pass down LD (it's not used).
- (libc.a, libm.a): Depend on targ-include.
- * host/any (LD): Don't define.
- (INCLUDES): Use targ-include.
- * stub/Makefile.in (MAKEOVERRIDES): Define to be empty.
- (FLAGS_TO_PASS): Don't pass down LD (it's not used).
- * libc/Makefile.in: Use $(MAKE) rather than make.
- (MAKEOVERRIDES): Define to be empty.
- (FLAGS_TO_PASS): Don't pass LD (it's not used).
- (all): Rewrote to be slightly smaller.
- * libc/machine/Makefile.in, libc/sys/Makefile.in (MAKEOVERRIDES):
- Define to be empty.
- (FLAGS_TO_PASS): Don't pass LD (it's not used).
- * libm/Makefile.in (FLAGS_TO_PASS): Don't pass LD (it's not used).
-
-Mon Mar 15 08:45:41 1993 Ian Lance Taylor (ian@cygnus.com)
-
- * libc/sys/go32/gerrno.s: Renamed from errno.s to avoid conflict
- with errno/errno.c.
-
-Fri Mar 12 09:46:54 1993 Ian Lance Taylor (ian@cygnus.com)
-
- * Changes for reentrancy.
- libc/stdio/fdopen.c, libc/stdio/freopen.c, libc/stdio/perror.c:
- Use ptr->_errno, not errno.
- libc/stdio/mktemp.c (mkstemp_r, mktemp_r): New functions.
- libc/stdio/remove.c (remove_r): New function.
- libc/stdio/rename.c (rename_r): New function.
- libc/stdio/fopen.c, libc/stdio/freopen.c, libc/stdio/fseek.c,
- libc/stdio/makebuf.c, libc/stdio/mktemp.c, libc/stdio/remove.c,
- libc/stdio/rename.c, libc/stdio/stdio.c, libc/stdio/tmpnam.c: Use
- reentrant versions of system calls.
- libc/stdio/gets.c: Call getchar_f, not nonexistent getchar_r.
- libc/stdio/scanf.c: Use stdin_r, not nonexistent stdin_n.
- libc/stdio/tmpfile.c: Use tmpnam_f, not nonexistent tmpnam_r.
- libc/stdio/findfp.c: Include <string.h>.
- libc/stdio/fread.c, libc/stdio/rget.c, libc/stdio/scanf.c: Include
- "local.h".
- libc/stdio/wbuf.c: Include "fvwrite.h"
-
- * libc/stdlib/{dtoa.c, ecvtbuf.c, mprec.c, strtod.c}: Include
- <string.h>.
- libc/stdlib/malloc.c: Call sbrk_r rather than sbrk.
- (NULL): Don't define if already defined.
- libc/stdlib/system.c: Call reentrant versions of system calls.
- (system_r): New function.
-
- * Changes for reentrancy.
- libc/include/_ansi.h (_PARAMS): New macro.
- libc/include/errno.h: Define errno as a macro that calls __errno.
- (__errno_r): New macro for reentrant code.
- libc/include/math.h: Include reent.h. Declare many reentrant
- functions.
- (signgam): Now a macro, not a variable.
- (struct exception): Added err field.
- libc/include/reent.h: Don't declare __sglue. Added function
- declarations.
- (struct reent_struct): Moved errno to beginning. Added _signgam.
- libc/include/stdio.h, libc/include/stdlib.h: Added function
- declarations.
-
- * More reentrancy hacking.
- libc/errno/errno.c (__errno): New function.
- libc/reent/execr.c, libc/reent/filer.c, libc/reent/fstatr.c,
- libc/reent/linkr.c, libc/reent/sbrkr.c, libc/reent/statr.c: New
- files.
-
- * Added many new reentrant functions to libm/math/*.
- libm/math/error.c (__matherror): Added reent_struct pointer
- argument. Changed all callers.
- libm/math/gamma.c (signgam): Removed. Set ptr->_signgam, instead.
- libm/math/exp.h, libm/math/pow.h, libm/math/sincos.h,
- libm/math/tan.h: Removed obsolete unused header files.
-
- * libc/sys/a29khif/stubs.s: Use register lr0, not v0.
-
- * libc/sys/sun/Makefile.in (COPYOFILES): Don't pull in errno.o.
-
-Mon Mar 8 16:43:43 1993 Steve Chamberlain (sac@thepub.cygnus.com)
-
- * libc/sys/a29khif/stubs.s: clobber safe register, and fill all
- delay slots.
-
-Tue Mar 2 14:47:00 1993 Jeffrey Osier (jeffrey@fowanton.cygnus.com)
-
- * libc/libc.texinfo: comment out reentrancy chapter (duh)
-
-Tue Mar 2 14:34:16 1993 Jeffrey Osier (jeffrey@fowanton.cygnus.com)
-
- * libc/reent/reent.tex: New file. (text from
- newlib/libc/libc.texinfo)
- * libc/stdio/tmpnam.c: fixed doc typo
- * libc/stdlib/rand.c: fixed doc typo
-
-Tue Mar 2 14:34:16 1993 Jeffrey Osier (jeffrey@fowanton.cygnus.com)
-
- * libc/reent/reent.tex: New file. (text from
- newlib/libc/libc.texinfo)
-
-Fri Feb 26 12:20:54 1993 Steve Chamberlain (sac@thepub.cygnus.com)
-
- support for reentrancy
- * libc/reent/reent.c, libc/reent/Makefile.in, libc/reent/reent.c:
- new files
- * libc/errno/errno.c, libc/include/ieeefp.h,
- libc/include/locale.h, libc/include/reent.h,
- libc/include/signal.h, libc/include/stdio.h,
- libc/include/stdlib.h, libc/include/string.h, libc/include/time.h,
- libc/signal/signal.c libc/stdio/cvt.c, libc/stdio/fclose.c,
- libc/stdio/fdopen.c, libc/stdio/fflush.c, libc/stdio/fgets.c,
- libc/stdio/findfp.c, libc/stdio/flags.c, libc/stdio/fopen.c,
- libc/stdio/fputc.c, libc/stdio/freopen.c, libc/stdio/fseek.c,
- libc/stdio/ftell.c, libc/stdio/fwalk.c, libc/stdio/getchar.c,
- libc/stdio/gets.c, libc/stdio/glue.h, libc/stdio/iprintf.c,
- libc/stdio/local.h, libc/stdio/makebuf.c, libc/stdio/perror.c,
- libc/stdio/printf.c, libc/stdio/putchar.c, libc/stdio/puts.c,
- libc/stdio/refill.c, libc/stdio/scanf.c, libc/stdio/setvbuf.c,
- libc/stdio/sprintf.c, libc/stdio/tmpfile.c, libc/stdio/tmpnam.c,
- libc/stdio/ungetc.c, libc/stdio/vfprintf.c, libc/stdio/vfprintf.h,
- libc/stdio/vfscanf.c, libc/stdio/vprintf.c, libc/stdio/wsetup.c,
- libc/stdlib/__adjust.c, libc/stdlib/__exp10.c,
- libc/stdlib/assert.c, libc/stdlib/atexit.c, libc/stdlib/atol.c,
- libc/stdlib/dtoa.c, libc/stdlib/ecvtbuf.c, libc/stdlib/malloc.c,
- libc/stdlib/mprec.c, libc/stdlib/mprec.h, libc/stdlib/rand.c,
- libc/stdlib/setenv.c, libc/stdlib/std.h, libc/stdlib/strtod.c,
- libc/stdlib/strtol.c, libc/stdlib/strtoul.c, libc/string/strtok.c,
- libc/time/asctime.c, libc/time/localtime.c, libc/time/mktime.c,
- libc/time/strftime.c: modify to provide reentracy.
-
- new routines:
- strtok_r, asctime_r, fdopen_r, _cleanup_r, fopen_r, iprintf_r,
- perror_r, printf_r, putchar_r, puts_r, scanf_r, sprintf_r,
- tmpfile_r, vfiprintf_r, vfprintf_r, strtod_r, dtoa_r, rand_r,
- srand_r, strtoul_r,strtol_r, free_r, malloc_r, morecore_r,
- mstats_r, realloc_r, localeconv_r, setlocale_r
-
-Wed Feb 17 20:17:15 1993 Mark Eichin (eichin@cygnus.com)
-
- * libc/include/machine/ieeefp.h, libc/include/machine/setjmp.h,
- libc/include/sys/config.h, libc/include/sys/signal.h,
- libc/include/sys/stat.h, libc/include/sys/types.h: For compiler
- provided macros (such as m68000), use the ansi version
- (__m68000__) so that the library can be used with code compiled
- -ansi. In particular, m68000, mc68000, _AM29K, i386, MIPSEL, unix,
- and sparc.
-
-Wed Feb 17 13:01:34 1993 Jim Wilson (wilson@sphagnum.cygnus.com)
-
- * configure.in (sparc*): Don't set -fsoft-float for sparc
- configurations. Do set -fsoft-float for sparclite configurations.
-
-Fri Feb 12 16:25:52 1993 Roland H. Pesch (pesch@fowanton.cygnus.com)
-
- * default.menu, no-signal.menu: alternate forms of libc main menu
- (in newlib rather than newlib/libc due to configuration restrictions)
-
- * configure.in: select one of the two menus above, link to
- libc.menu
-
- * libc/libc.texinfo: include menu from separate file
-
-Fri Feb 12 12:50:06 1993 Ian Lance Taylor (ian@cygnus.com)
-
- * Makefile.in (FLAGS_TO_PASS): Put INSTALL back in.
- (info): Split long shell command in half.
- * libc/Makefile.in (info, targetdep.tex): Don't pass everything to
- sub-makes, just CHEW and TARGETDOC.
- (targetdep.tex): Removed now special handling of sys and machine
- subdirectories, made obsolete some time ago.
- * libc/machine/Makefile.in (doc): Don't pass everything to
- sub-make, just CHEW and TARGETDOC.
- (Makefile): New target.
- * libc/sys/Makefile.in (Makefile): New target.
-
-Thu Feb 11 15:25:15 1993 Ian Lance Taylor (ian@cygnus.com)
-
- * Makefile.in (here and most subdirectories): Only pass down CHEW
- and TARGETDOC when making info, not for other targets.
-
- * Makefile.in (here and most subdirectories), host/any: Use $(AR)
- $(AR_FLAGS) rather than $(ARUPDATE).
-
-Wed Feb 10 11:57:52 1993 Ian Lance Taylor (ian@cygnus.com)
-
- * Try to reduce command line length:
- * Makefile.in (FLAGS_TO_PASS): don't pass down exec_prefix,
- CC_FOR_BUILD, CFLAGS_FOR_BUILD, INSTALL or CHEW.
- (info, docs): pass CC_FOR_BUILD and CFLAGS_FOR_BUILD to doc.
- (info): Pass CHEW to other subdirs.
-
-Tue Feb 9 14:01:42 1993 Mark Eichin (eichin@cygnus.com)
-
- * configure.in: add signal_dir, like unix_dir, but by default it
- is set to "signal" so that a29khif can turn it off (since a29khif
- has raise() as part of machine-specific signal.s.)
-
-Fri Jan 15 12:09:50 1993 Steve Chamberlain (sac@thepub.cygnus.com)
-
- * libc/sys/config.h, libc/machine/ieeefp.h: add Z8000 support
- * libc/stdio/Makefile.in: pass CFLAGS so vfiprintf.c gets built
- correctly.
- * libc/stdio/fdopen.c, libc/stdio/fgets.c, libc/stdio/fscanf.c,
- libc/stdio/vfprintf: type lint.
- * libc/sys/z8ksim/crt0.c (start): Z8001/Z8002 independent
- initialzation code.
- * libc/sys/z8ksim/glue.c: Z8001/Z8002 clean system calls.
-
-Tue Dec 29 10:15:33 1992 Ian Lance Taylor (ian@cygnus.com)
-
- * stub/mvme135/mvme135-asm.S: new file.
- stub/mvme135mvme135-stub.c: moved all assembler routines into
- mvme135-asm.S.
- stub/mvme135/Makefile.in: build mvme135-stub.o.
-
-Mon Dec 28 12:40:43 1992 Ian Lance Taylor (ian@cygnus.com)
-
- * Makefile.in: don't pass down $(CPP); use $(CC) -E in
- sub-Makefiles instead, to try to avoid line length limitations.
-
-Mon Dec 21 18:36:13 1992 Per Bothner (bothner@rtl.cygnus.com)
-
- * libc/include/unistd.h (read, write): Use void* instead of
- char*.
-
-Thu Dec 17 13:49:46 1992 Mark Eichin (eichin@cygnus.com)
-
- * stub/go32/resetpc: sample script to send a reset packet to the
- stub
-
- * stub/go32/I386STUB.C: new file, gdb/i386stub.c modified for the
- DOS environment, which compiles with Turbo C.
-
- * stub/go32/DSER32.LNK: new file, linker commands for serial
- remote stub.
-
- * stub/go32/CONTROL.C: turn off debug_mode, add CYGNUS tag line to
- start up message to identify version; call set_debug_traps.
-
- * stub/go32/DEBUG.C: turn off debug_mode (so stub doesn't need any
- keyboard interaction); call handle_exception() in go_til_stop,
- rather than return, so that the remote stub gets control.
-
- * stub/go32/MAKEFILE: fixed to actually use DOS commands (del and
- rename, rather than mv), set flags that work with current Turbo C,
- including using the /3 flag; also, add commands to build dser32.
-
- * stub/go32/DEBUG32.LNK, stub/go32/GO32.LNK: fix paths to match
- default Turbo C installation (\tc rather than \usr)
-
- * stub/go32/MONO.C (printf): current Turbo C uses "..." instead of
- "&..."
-
-Mon Dec 14 09:37:33 1992 Steve Chamberlain (sac@thepub.cygnus.com)
-
- * libc/include/math.h: added _DOUBLE_IS_32BITS checks
-
-Thu Nov 12 22:31:04 1992 Steve Chamberlain (sac@thepub.cygnus.com)
-
- * libc/stdio/cvt.c (licvt): new function to convert ints when
- sizeof(int) != sizeof(long).
-
- * libc/include/stdio.h: added prototype for iprintf.
- * libc/include/machine/limits.h machine/ieeefp.h: z8k stuff
-
-Tue Nov 10 12:18:12 1992 Ian Lance Taylor (ian@cygnus.com)
-
- * libc/machine/m68k/setjmp.S: use __USER_LABEL_PREFIX__ and
- __REGISTER_PREFIX__.
-
-Mon Nov 2 13:50:14 1992 Ian Lance Taylor (ian@cygnus.com)
-
- * libc/sys/m68kbare: moved into stub directory.
-
-Mon Nov 2 13:40:42 1992 Ian Lance Taylor (ian@cygnus.com)
-
- * configure.in, Makefile.in: created new directory stub, to hold
- sample code for specific targets.
-
-Wed Oct 28 02:19:55 1992 Mark Eichin (eichin@cygnus.com)
-
- * restored libc/sys/go32/sys/fcntl.h, to override incorrect values
- in the unified libc/include/sys/fcntl.h.
-
-Wed Oct 21 13:55:58 1992 Doug Evans (dje@rtl.cygnus.com)
-
- * libc/stdlib/ecvtbuf.c: (print_f,_gcvt): printf("%f", 0.01)
- printed .01, not 0.01.
-
-Mon Oct 19 11:05:55 1992 Ian Lance Taylor (ian@cygnus.com)
-
- * configure.in: compile with -m68000 for m68* targets.
-
-Sun Oct 18 05:29:05 1992 Mark Eichin (eichin@cygnus.com)
-
- * libm/math/remainder.c (remainder): document the svr4 and sunos
- references used to construct the function.
-
-Sat Oct 17 21:46:16 1992 Mark Eichin (eichin@cygnus.com)
-
- * libm/math/remainder.c (rint, remainder): fix old typos.
- * libm/math/Makefile.in: actually build remainder.c (functions
- rint and remainder, from SysVr4 Programmer's Guide floor(3m) man
- page.)
-
-Thu Oct 15 07:48:05 1992 Ian Lance Taylor (ian@cygnus.com)
-
- * libc/string/bcopy.c: BSD version works on overlapping strings,
- so ours should too.
-
- * libc/stdlib/system.c: always invoke /bin/sh, not getenv
- ("SHELL").
-
-Wed Oct 14 11:07:11 1992 Ian Lance Taylor (ian@cygnus.com)
-
- * Makefile.in (docs): new target.
-
-Wed Oct 14 07:44:25 1992 Ian Lance Taylor (ian@cygnus.com)
-
- * libc/include/sys/times.h: define clock_t as required by POSIX.
- libc/include/time.h: protect clock_t from multiple definitions.
-
-Wed Oct 7 11:02:21 1992 Mark Eichin (eichin at tweedledumber.cygnus.com)
-
- * libm/math/sqrt.h (sqrt): actually, the final version of fp-bit
- does not need more than the original three iterations to get
- within 1 ulp. (Paranoia tests for rounding to better than that,
- but further iterations *don't* help, only more subtle changes
- can.)
-
-Tue Oct 6 09:22:12 1992 Ian Lance Taylor (ian@cygnus.com)
-
- * libc/sys/vxworks68, libc/sys/vxworks960: removed, since they
- were doing nothing useful.
-
-Tue Oct 6 08:48:13 1992 Ian Lance Taylor (ian@cygnus.com)
-
- * configure.in: define MALLOC_PROVIDED for vxworks targets;
- removed sys_dir settings of vxworks68 and vxworks960.
- host/any: don't pass -nostdinc to gcc, since newlib no longer
- provides all required header files.
-
- * libc/stdlib/malloc.c: only compile this file if MALLOC_PROVIDED
- is not defined; this provides a hook for VxWorks.
-
-Mon Oct 5 03:44:57 1992 Mark Eichin (eichin at tweedledumber.cygnus.com)
-
- * libc/stdio/setvbuf.c (setvbuf): while ANSI does say to malloc a
- buffer if buf is NULL, don't do it here -- it is already being
- done by makebuf elsewhere in stdio.
-
-Fri Oct 2 13:12:07 1992 Ian Lance Taylor (ian@cygnus.com)
-
- * libc/sys/a29khif/Makefile.in: assemble Steve's list of stubs so
- that C programs can call functions without using initial
- underscores.
-
-Thu Oct 1 09:37:47 1992 Ian Lance Taylor (ian@cygnus.com)
-
- * libc/stdlib/abort.c (abort): call exit, in case kill returns.
-
-Wed Sep 30 08:22:18 1992 Ian Lance Taylor (ian@cygnus.com)
-
- * configure.in: set TARGET_CFLAGS for certain CPU types to
- -msoft-float.
-
-Tue Sep 29 21:09:32 1992 david d `zoo' zuhn (zoo at cirdan.cygnus.com)
-
- * libc/sys/m68kbare/glue.c: use <_ansi.h> instead of <ansidecl.h>
-
-Mon Sep 28 14:58:44 1992 Ian Lance Taylor (ian@cygnus.com)
-
- * configure.in: added sys_dir m68kbare for m68k*-unknown-aout and
- m68k*-unknown-coff.
-
-Fri Sep 25 08:33:21 1992 Ian Lance Taylor (ian@cygnus.com)
-
- * libc/include/stdio.h: define __need___va_list before including
- <stdarg.h>, to avoid defining va_arg, et. al.
-
-Tue Sep 22 13:47:00 1992 Ian Lance Taylor (ian@cygnus.com)
-
- * libc/sys/Makefile.in: handle the case of an empty $(sys_dir)
- (don't cd to the user's home directory).
-
- * libc/Makefile.in: replaced all instances of $(MAKE) with make.
- In general this is the wrong thing to do, but I can't get around
- GNU make's insistence on passing command line arguments any other
- way.
-
-Tue Sep 22 10:12:44 1992 Ian Lance Taylor (ian@cygnus.com)
-
- * configure.in: always configure the libc/sys directory, since it
- now provides a required documentation file.
-
- * Makefile.in: replaced all instances of $(MAKE) with make. In
- general this is the wrong thing to do, but I can't get around GNU
- make's insistence on passing command line arguments any other way.
-
-Mon Sep 21 22:42:26 1992 Ian Lance Taylor (ian@tweedledumbest.cygnus.com)
-
- * libc/stdlib/ecvtbuf.c (_gcvt): string for 0 was not null
- terminated.
-
- * libc/stdio/local.h: include <stdarg.h> to define va_list.
- libc/stdio/vsprintf.c: include <stdarg.h> rather than <varargs.h>.
-
- * libc/include/float.h, libc/include/stdarg.h,
- libc/include/stddef.h, libc/include/varargs.h: removed; use gcc
- versions instead.
- libc/include/stdio.h: get size_t from <stddef.h>, and va_list from
- <stdarg.h>, not from <machine/types.h>. Protect definition of
- NULL.
- libc/include/time.h: get size_t from stddef.h. Protect definition
- of NULL.
- libc/include/machine/limits.h: override gcc <limits.h> by defining
- _LIMITS_H___. Don't define CLK_TCK. Copied in gcc <limits.h> to
- get correct INT_MIN and LONG_LONG values.
- libc/include/machine/types.h: don't define ptrdiff_t, wchar_t,
- size_t or va_list at all; they're now gotten from stddef.h
- instead.
- libc/include/machine/varargs.h: removed; use gcc version instead.
- libc/include/sys/types.h: explicitly include <machine/types.h>.
-
- * libm/math/sqrt.h: using the fp-bit routines appears to require
- more iterations.
-
- * Makefile.in, host/any: let system include files override machine
- include files.
-
-Sat Sep 19 21:10:06 1992 Mark Eichin (eichin at tweedledumber.cygnus.com)
-
- * libc/include/machine/types.h: allow __*_TYPE__ from cpp to
- override _*_T_ definitions defaulted here.
-
-Tue Sep 15 11:14:46 1992 Ian Lance Taylor (ian@cygnus.com)
-
- * Makefile.in (install): install the include files in
- $(tooldir)/include, not $(exec_prefix)/include.
-
-Fri Sep 11 15:48:43 1992 Ian Lance Taylor (ian@cygnus.com)
-
- * Makefile.in (install): fixed typo, and changed install to not
- force rebuild of libc.a and libm.a.
-
-Thu Sep 10 10:46:09 1992 Ian Lance Taylor (ian@cygnus.com)
-
- * libc/sys/a29khif/*: Changed all .include's to include
- sys/sysmac.h, not plain sysmac.h. The header files live in sys so
- that they will be installed for the user.
-
- * Makefile.in (all): create targ-include, a directory holding the
- machine and system specific header files during the build.
- (install): fixed installation of machine and system specific
- header files.
-
- * Makefile.in: fixed comment.
- host/any: change .s.o rule to use $(AS) rather than $(CC), so that
- we can pass $(INCLUDES) to it.
-
-Thu Sep 10 10:13:13 1992 Ian Lance Taylor (ian@cygnus.com)
-
- * libc/include/sys/param.h: new generic file, which may be
- overridden for specific systems.
-
- * libc/include/sys/signal.h: define all ANSI signal names, and
- NSIG (which is not ANSI) for a29k.
-
-Tue Sep 8 09:04:30 1992 Ian Lance Taylor (ian@cygnus.com)
-
- * Makefile.in: don't pass down arguments the lower level makes
- will not need.
- * libc/Makefile.in: recurse directly, rather than using subdir_do,
- in hopes of avoiding argument length limits.
- * libm/Makefile.in: recurse directly, rather using subdir_do, in
- hopes of avoiding argument length limits.
-
-Tue Sep 8 08:27:22 1992 Ian Lance Taylor (ian@cygnus.com)
-
- * libc/include/sys/fcntl.h: include <sys/types.h> to ensure that
- mode_t is defined.
-
-Mon Sep 7 14:02:07 1992 Ian Lance Taylor (ian@cygnus.com)
-
- * Fixed make info and make install-info for newlib, changing most
- Makefile.in and several *.tex files. Moved doc directory from
- libc to top level.
-
- * libc/time/mktime.c (_DAYS_IN_MONTH): actually, not const.
- Should be rewritten.
-
- * libc/string/strings.tex: renamed node index to node index
- function, so that it does not conflict with the top level index
- node.
-
- * libc/include/sys/config.h: define __IEEE_BIG_ENDIAN for h8300.
-
-Fri Sep 4 02:34:06 1992 Ian Lance Taylor (ian@cygnus.com)
-
- * Overhauled general configuration for newlib. Eliminated all
- target dependent Makefile fragments. Create libraries in newlib
- rather than newlib/libc and newlib/libm. Use CC, et. al., rather
- than CROSS_CC, et. al. Broke make docs; will fix later.
-
- * libc/time/localtime.c (_DAYS_IN_MONTH): actually, not const.
- Should be rewritten.
-
-Tue Sep 1 15:21:14 1992 Ian Lance Taylor (ian@cygnus.com)
-
- * libc/configure.in: cleaned up somewhat; switch on ${target}
- rather than ${target_alias}.
- * libm/configure.in: cleaned up somewhat; switch on ${target}
- rather than ${target_alias}.
-
- * libc/ctype/ctype_.c: marked _ctype_ array _CONST.
- * libc/include/ctype.h: marked _ctype_ as _CONST.
-
- * libc/locale/locale.c (lconv, localeconv): marked static lconv as
- _CONST.
-
- * libc/stdio/cvt.c, libc/stdio/findfp.c (__sfmoreglue),
- libc/stdio/vfscanf.c (__svfscanf): made static variables const.
- libc/stdio/gets.c (gets): removed non-ANSI warning message.
- libc/stdio/tmpnam.c (tmpnam): removed unneeded filename variable.
-
- * libc/stdlib/mprec.h, libc/stdlib/mprec.c (pow5mult, tens,
- bigtens, tinytens): marked arrays _CONST.
- libc/stdlib/qsort.c (swap): if __GNUC__, use _builtin_alloca
- rather than a static variable.
-
- * libc/time/asctime.c (asctime), libc/time/localtime.c
- (_DAYS_IN_MONTH), libc/time/mktime.c (_DAYS_IN_MONTH,
- _DAYS_BEFORE_MONTH), libc/time/strftime.c (dname_len, dname,
- mname_len, mname): Marked static arrays _CONST.
-
- * libm/math/gamma.h: made local variables non-static.
-
- * libm/math/acos.h, libm/math/bessel.c, libm/math/erf.c,
- libm/math/exp.c, libm/math/gamma.h: marked static arrays as
- _CONST.
-
- * libm/math/constants.c: removed file, because the constants it
- defined were never referenced.
- libm/math/Makefile.in: removed references to constants.c.
- libm/math/mathimpl.h: removed declarations of constants.
-
-Wed Aug 26 21:09:06 1992 Ian Lance Taylor (ian@cygnus.com)
-
- * libc/include/machine/varargs.h: only call __builtin_saveregs if
- it is sensibly defined in libgcc2. Checks preprocessor defines,
- which is not a good solution.
-
- * libm/sqrt.c: sqrt(Infinity) should not be a domain error.
-
- * libm/frexp.c: handle denormalized numbers as arguments.
-
- * libm/math/Makefile.in: added some dependencies for .c files
- which include local .h files.
-
-Mon Aug 24 12:57:58 1992 Ian Lance Taylor (ian@cygnus.com)
-
- * libc/configure.in: set target_alias for OSE*. Replace
- target_makefile_frag if it is blank.
-
- * libc/Makefile.in: make sure everything is passed to subsidiary
- makes; create all directories when installing.
-
- * libm/ieeefp/Makefile.in, libm/math/Makefile.in: use
- CROSS_ARUPDATE instead of AR.
-
- * libm/configure.in: set target_alias for OSE*. Replace
- target_makefile_frag if it is blank.
-
- * libm/Makefile.in: make sure everything is passed to subsidiary
- makes; create all directories when installing.
-
-Thu Aug 20 15:11:51 1992 Mark Eichin (eichin@cygnus.com)
-
- * add following change from libc copy.
-
-Wed Aug 19 18:54:49 1992 Roland H. Pesch (pesch@fowanton.cygnus.com)
-
- * libc/libc.texinfo: make copyright disclaimers appear on back of
- title page; make format of same slightly less ugly; avoid using
- underbars in section headings (avoids nasty texinfo bug in table
- of contents).
-
- * libc/ctype/tolower.c, libc/ctype/toupper.c: (doc changes in
- comments only) avoid using underbars in section headings
-
- * libc/ieeefp/ieeefp.tex: include doc from fpsticky, infinity,
- isnan ieeefp/fpmask.c, ieeefp/fpround.c, ieeefp/fpsticky.c (doc
- changes in comments only): shorten headings ieeefp/infinity.c,
- ieeefp/isnan.c: (doc, comments only) more informative headings
-
- * libc/math/bessel.c: (doc, comments only) shorten heading
-
- * libc/stdlib/efgcvt.c, libc/stdlib/mbtowc.c, libc/stdlib/wctomb.c
- (doc, comments only) shorten headings
-
- * libc/time/localtime.c (doc, comments only): shorten headings
-
- * libm/ieeefp/ieeefp.tex: include doc from fpsticky, infinity,
- isnan
- libm/ieeefp/fpmask.c, libm/ieeefp/fpround.c,
- libm/ieeefp/fpsticky.c (doc changes in comments only): shorten
- headings
- libm/ieeefp/infinity.c, libm/ieeefp/isnan.c: (doc, comments
- only) more informative headings
- * libm/math/bessel.c: (doc, comments only) shorten heading
-
-Wed Aug 19 07:06:37 1992 Mark Eichin (eichin at tweedledumber.cygnus.com)
-
- * .../Makefile.in: use CROSS_ARUPDATE consistently.
- * config/*.mt: define CROSS_AR as well as CROSS_ARUPDATE
- * config/*.mt: define CROSS_CPP based on CROSS_CC, not /lib/cpp.
- * .../Makefile.in: get rid of .c.o rule - if TOP is correctly
- defined, the one from the .mt file will be correct.
- * libc/include/machine, libc/include/sys: created, and populated
- with common files from machine/*/machine. ifdefs were used for
- most, typically by handling exceptions first and then filling in
- defaults. Files with D.J. Delorie copyright #included rather than
- copied. Most files in include/sys really were the same in the
- original.
- * libc/include/...: cleaned up use of _EXFUN.
- * libc/stdlib/mprec.c: mprec.h doesn't get installed, so include
- it with double quotes, not angles.
-
-Mon Aug 10 11:43:20 1992 Ian Lance Taylor (ian@dumbest.cygnus.com)
-
- * libc/Makefile.in: always create installation directories.
-
-Sun Aug 9 22:45:48 1992 david d `zoo' zuhn (zoo at cirdan.cygnus.com)
-
- * libc/configure.in: handle host properly (using canonical
- triples), better error message for the case of target not found
-
-Thu May 28 01:56:37 1992 Michael Tiemann (tiemann@rtl.cygnus.com)
-
- * libc/Makefile.in (insincdir): Ensure this directory exists
- before attempting installation.
-
-Fri May 1 18:16:42 1992 Steve Chamberlain (sac@thepub.cygnus.com)
-
- * libc/stdlib/assert.c: now calls abort like it should
- * libc/sys/a29khif: many many patches for 29khif work
- * libc/machine/i386: gnulib2 expanded there.
-
-Tue Apr 28 19:08:37 1992 Steve Chamberlain (sac@thepub.cygnus.com)
-
- Added accurate fp conversion routines to stdlib, moved dcvt from
- stdio to stdlib and called it ecvtbuf:
- * libc/stdlib/mprec.c, mprec.h: new files for multiprec arithmetic
- * libc/stdlib/Makefile.in, efgcvt.c, strtod.c: modified to use new
- routines
- * libc/libc.texinfo: Modifed to include the copyright info from
- the mprec files
- * libc/stdlib/efgcvt.c: now xref to ecvtbuf in stdlib.
- * libc/test/ : many vector which tested for the implementation
- defined returns of strange conversion requests have been updated
- to relflect the new implementation
-
-Mon Apr 27 13:41:33 1992 Roland H. Pesch (pesch@fowanton.cygnus.com)
-
- * libc/libc.texinfo: new chapter on variable arg lists
- (stdarg.h/varargs.h)
- * libc/libc.texinfo: new title
- * libc/time/gmtime.c, libc/time/localtime./c, libc/time/mktime.c:
- (doc only) shorter headings for better formatting.
-
-Fri Apr 24 11:26:48 1992 Roland H. Pesch (pesch@fowanton.cygnus.com)
-
- * libc/libc.texinfo: three more info menu entries
- * libc/locale/locale.tex: new chapter
- * libc/locale/locale.c: new doc for setlocale, localeconv
- * libc/locale/Makefile.in: use new locale doc
- * libc/signal/signal.tex: new chapter
- * libc/signal/raise.c, libc/signal/signal.c: new doc
- * libc/signal/Makefile.in: use new doc
- * libc/time/time.tex: new chapter
- * libc/time/asctime.c libc/time/clock.c libc/time/ctime.c
- libc/time/difftime.c libc/time/gmtime.c libc/time/localtime.c
- libc/time/mktime.c libc/time/strftime.c libc/time/time.c: new doc
- * libc/time/Makefile.in: use new doc
-
-Tue Apr 21 14:48:50 1992 Steve Chamberlain (sac@thepub.cygnus.com)
-
- * libm/math/log1p.c: split to use the new function way of float
- function definition. math/log1p.h deleted
- * libm/math/scalb.c: obsolete and deleted
- * libm/math/scalbn.c: created from part log1p.c
- * libm/math/Makefile.in: know about log1p and scalbn
-
-Tue Apr 21 12:32:21 1992 Roland H. Pesch (pesch@fowanton.cygnus.com)
-
- * libc/ctype/isupper.c: revise doc;
- libc/ctype/ctype.tex: use doc from isupper.c
-
- * libc/string/bzero.c: new doc
-
-Mon Apr 20 14:19:42 1992 Roland H. Pesch (pesch@fowanton.cygnus.com)
-
- * libc/stdlib/system.c, libc/stdlib/exit.c, libc/stdlib/abort.c:
- new doc
- * libc/stdlib/Makefile.in: extract new doc
- * libc/stdlib/stdlib.tex: use new doc
-
- * libc/string/strerror.c: expanded doc.
-
- * libc/stdio/Makefile.in: extract doc from more files
- * libc/stdio/fopen.c, libc/stdio/perror.c, libc/stdio/remove.c,
- libc/stdio/rename.c, libc/stdio/rewind.c, libc/stdio/setbuf.c,
- libc/stdio/setvbuf.c, libc/stdio/sprintf.c, libc/stdio/tmpfile.c,
- libc/stdio/tmpnam.c, libc/stdio/vfprintf.c, libc/stdio/vprintf.c,
- libc/stdio/vsprintf.c: new doc
- * libc/stdio/stdio.tex: use new doc
-
-Mon Apr 20 09:38:17 1992 Steve Chamberlain (sac@thepub.cygnus.com)
-
- * libc/config/ebmon29k: added CROSS_CPP rule and other fixes
- * libc/include/ieeefp.h: fixed ansi conflict with isnanf, isinff,
- finitef functions.
- * libc/sys/a29khif/sys/*.h: ansidecl.h was renamed to _ansi.h some
- time ago.
-
- * libc/stdio/stdio.h: added P_tmpdir for /tmp (SVID thing)
- * libc/stdio/setbuf.c: added ansi style definition.
- * libc/stdio/setvbuf.c: added ansi definition, now mallocs own
- buffer if none provided.
- * libc/stdio/tmpfile.c: lint
- * libc/stdio/tmpnam.c (worker): created. (tmpnam): mallocs buffer
- rather than using static, also make sure file isn't already
- present. Uses P_tmpdir. (tempnam): rewritten to use new
- subroutine, and uses P_tmpdir.
- * libc/stdio/siprintf.c: created
-
-Mon Apr 13 09:12:58 1992 Steve Chamberlain (sac@thepub.cygnus.com)
-
- Release 1.03 for NEC, major mods. Main differences from release
- 1.02::
-
- More tests in test/:
- * jn_vec.c, jnf_vec.c, yn_vec.c, ynf_vec.c, log2_vec.c,
- log2f_vec.c, atan2_vec.c, atan2f_vec.c: new test vectors.
- * test_ieee.c: tests for ieee flags & masks - get/set rounding,
- get/set mask, get/set sticky and get/set roundtoi. Tests
- that setting the bits changes the way arithmetic is done.
- * string.c: added test to make sure memcmp does it with unsigned
- chars.
- * test.c: cleaned up and removed lint.
- * sprint_vec, sprint_ivec.c, convert.c, conv_vec.c, iconf_vec.c,
- dvec.c: tests for string to value conversions, sprintf, scanf,
- atof, atoff, strtod, strtodf, atoi, atol, strtol, ecvtbuf, ecvt,
- ecvtf, fcvtbuf, fcvt, fcvtf, gcvt, gcvtf. Some attention paid to
- rounding in sprintf too.
- * test_is.c: tests for isalnum, isalpha, isascii, iscntrl,
- isdigit, isgraph, islower, isprint, ispunct, isspace, isupper,
- isxdigit, toascii, tolower, toupper, _tolower, _toupper in macro
- and function form.
- * math2.c: test for frexp, frexpf, ldexp, ldexpf, modf modff, pow,
- powf
-
- In the library:
- * libc/stdlib/div.c, libc/stdlib/ldiv.c, libc/stdlib/strtod.c,
- libc/stdlib/strtol.c, libc/stdlib/stroul.c, libc/stdlib/abs.c,
- libc/stdlib/bsearch.c, libc/stdlib/calloc.c, libc/stdlib/getenv.c,
- libc/stdlib/labs.c, libc/stdlib/malloc.c: new documentation
- * libc/stdlib/efgcvt.c: rewritten to use new _dcvt routines rather
- than sprintf.
- * libc/stdio/dcvt.c: rewritten to make more useful elsewhere.
- * Method of producting float versions of double functions has
- changed, functions will be modified gradually. So far:
- libm/math/exp.c, libm/math/pow.c, libm/math/modf.c,
- libm/math/sincos.c, libm/math/fmod.c, libm/math/tan.c have been
- altered
- * libc/string/memcmp.c: now uses unsigned chars
- * libc/string/bcmp.c, libc/string/strcpy.c,
- libc/stsring/strxfrm.c: fixed doc
- * libc/sys/sysvnecv70.tex: fix example of sbrk code
-
-Local Variables:
-version-control: never
-End:
+Deprecated. See git log instead.
diff --git a/newlib/ChangeLog-2015 b/newlib/ChangeLog-2015
new file mode 100644
index 000000000..736def6b8
--- /dev/null
+++ b/newlib/ChangeLog-2015
@@ -0,0 +1,27735 @@
+2015-12-21 Freddie Chopin <freddie.chopin@gmail.com>
+
+ * libc/stdlib/__atexit.c (__register_exitproc): Fix for
+ _ATEXIT_DYNAMIC_ALLOC.
+
+2015-12-21 Freddie Chopin <freddie.chopin@gmail.com>
+
+ * libc/stdlib/on_exit_args.{c,h}: New files.
+ * libc/stdlib/Makefile.am: Add new source file.
+ * libc/stdlib/Makefile.in: Regenerate.
+ * libc/stdlib/__atexit.c (__register_exitproc): Initialize
+ _on_exit_args_ptr field of _GLOBAL_ATEXIT on first run.
+ * libc/stdlib/on_exit.c: Force linking of static instance of
+ _on_exit_args.
+ * libc/stdlib/cxa_atexit.c: Likewise.
+
+2015-12-17 Anton Kolesov <Anton.Kolesov@synopsys.com>
+
+ * libc/machine/arc/asm.h: Define new GCC definition for old compiler.
+ * libc/machine/arc/memcmp-bs-norm.S: Use new GCC defines to detect
+ processor features.
+ * libc/machine/arc/memcmp.S: Likewise.
+ * libc/machine/arc/memcpy-archs.S: Likewise.
+ * libc/machine/arc/memcpy-bs.S: Likewise.
+ * libc/machine/arc/memcpy.S: Likewise. * libc/machine/arc/memset-archs.S: Likewise.
+ * libc/machine/arc/memset-archs.S: Likewise.
+ * libc/machine/arc/memset-bs.S: Likewise.
+ * libc/machine/arc/memset.S: Likewise.
+ * libc/machine/arc/setjmp.S: Likewise.
+ * libc/machine/arc/strchr-bs-norm.S: Likewise.
+ * libc/machine/arc/strchr-bs.S: Likewise.
+ * libc/machine/arc/strchr.S: Likewise.
+ * libc/machine/arc/strcmp-archs.S: Likewise.
+ * libc/machine/arc/strcmp.S: Likewise.
+ * libc/machine/arc/strcpy-bs-arc600.S: Likewise.
+ * libc/machine/arc/strcpy-bs.S: Likewise.
+ * libc/machine/arc/strcpy.S: Likewise.
+ * libc/machine/arc/strlen-bs-norm.S: Likewise.
+ * libc/machine/arc/strlen-bs.S: Likewise.
+ * libc/machine/arc/strlen.S: Likewise.
+ * libc/machine/arc/strncpy-bs.S: Likewise.
+ * libc/machine/arc/strncpy.S: Likewise.
+
+2015-12-17 Corinna Vinschen <corinna@vinschen.de>
+
+ * libc/include/sys/types.h: Remove including <sys/select.h>.
+
+2015-12-14 Sebastian Huber <sebastian.huber@embedded-brains.de>
+
+ * libc/include/sys/reent.h (_REENT_INIT_PTR_ZEROED): New.
+ (_REENT_INIT_PTR): Define only once and use _REENT_INIT_PTR_ZEROED().
+
+2015-12-14 Sebastian Huber <sebastian.huber@embedded-brains.de>
+
+ * libc/include/sys/_sigset.h: New.
+ * libc/include/sys/select.h: Do not include <sys/types.h> and
+ <sys/time.h> to avoid cyclic header file dependencies. Include
+ specialized header files instead.
+ (sigset_t): Conditionally define.
+ * libc/include/sys/signal.h (sigset_t): Likewise.
+ * libc/include/sys/time.h: Include <sys/select.h> if
+ __BSD_VISIBLE.
+ * libc/include/sys/types.h: Likewise.
+
+2015-12-12 Freddie Chopin <freddie.chopin@gmail.com>
+
+ * libc/stdlib/__atexit.c (__register_exitproc): Always release
+ lock before return.
+
+2015-12-09 Thomas Preud'homme <thomas.preudhomme@arm.com>
+
+ * libm/machine/arm/s_ceil.c: Also check that 64bit FP instructions are
+ available in the guard.
+ * libm/machine/arm/s_floor.c: Likewise.
+ * libm/machine/arm/s_nearbyint.c: Likewise.
+ * libm/machine/arm/s_rint.c: Likewise.
+ * libm/machine/arm/s_round.c: Likewise.
+ * libm/machine/arm/s_trunc.c: Likewise.
+
+2015-12-08 Corinna Vinschen <corinna@vinschen.de>
+
+ * libc/stdio/fclose.c (_fclose_r): Make _flockfile/_funlockfile calls
+ dependent on __SNLK flag.
+ * libc/stdio/findfp.c (__fp_lock): Ditto.
+ (__fp_unlock): Ditto.
+ * libc/stdio/freopen.c (_freopen_r): Ditto.
+ * libc/stdio64/freopen64.c (_freopen64_r): Ditto.
+
+2015-12-08 Corinna Vinschen <corinna@vinschen.de>
+
+ * libc/stdio/freopen.c (_freopen_r): Only reset __SWID bit per SUSv4.
+ * libc/stdio64/freopen64.c (_freopen64_r): Add missing resetting of
+ flag values and _mbstate.
+
+2015-12-07 Nick Withers <nick.withers@anu.edu.au>
+
+ * libc/sys/arm/sys/param.h (NBBY): Define if not already defined.
+ * libc/sys/rtems/include/sys/param.h (NBBY): Define.
+
+2015-12-07 Corinna Vinschen <corinna@vinschen.de>
+
+ * libc/include/sys/types.h: Move definitions of NBBY and howmany to
+ sys/param.h. Move definitions of select(2) macros to sys/select.h.
+ * libc/include/sys/param.h: See above.
+ * libc/include/sys/select.h: Move Cygwin's sys/select.h here.
+
+2015-11-26 Corinna Vinschen <corinna@vinschen.de>
+
+ * libc/stdlib/strtodg.c: Add ifdef to check _HAVE_LONG_DOUBLE and
+ _LDBL_EQ_DBL.
+
+2015-11-24 Steve Ellcey <sellcey@imgtec.com>
+
+ * libc/stdlib/strtorx.c: Fix ifdef to check _LDBL_EQ_DBL.
+
+2015-11-23 Marcus Shawcroft <marcus.shawcroft@arm.com>
+
+ * libc/machine/arm/strlen-stub.c: Adjust strlen-armv7.S selection logic.
+ * libc/machine/arm/strlen.S: Likewise.
+
+2015-11-23 Marcus Shawcroft <marcus.shawcroft@arm.com>
+
+ * libc/machine/arm/strlen-stub.c: Move T2 -O2 implementation to...
+ * libc/machine/arm/strlen-thumb2-Os.S: New file.
+ * libc/machine/arm/strlen.S: Include strlen-thumb2-Os.S.
+
+2015-11-21 Corinna Vinschen <corinna@vinschen.de>
+
+ * libc/stdlib/strtodg.c: Define USE_LOCALE.
+ (_strtodg_r): Handle multibyte decimal point.
+
+2015-11-20 Corinna Vinschen <corinna@vinschen.de>
+
+ * libc/stdlib/Makefile.am (GENERAL_SOURCES): Add strtodg.c and
+ strtorx.c.
+ * libc/stdlib/Makefile.in: Regenerate.
+ * libc/stdlib/strtodg.c: New file implementing generic string to long
+ double conversion.
+ * libc/stdlib/strtorx.c: New file, implementing IEEE format string to
+ long double conversion.
+ * libc/stdlib/mprec.h (_strtodg_r): Declare.
+ (_strtorx_r): Declare.
+ * libc/stdlib/gdtoa.h (__UShort): Define.
+ * libc/stdlib/strtold.c (__flt_rounds): Define for i386 and x86_64
+ target.
+ (FLT_ROUNDS): Define, as 0 on platforms missing a __flt_rounds
+ function.
+ (_strtold_r): Converted from strtold. Call _strtorx_r on targets
+ supporting distinct long doubles.
+ (strtold): Just call _strtold_r.
+ * libc/include/stdlib.h (_strtold_r): Declare.
+ * libc/stdlib/ldtoa.c (_strtold): Comment out. Explain why.
+ * libc/stdio/vfscanf.c (__SVFSCANF_R): Call _strtold_r instead of
+ _strtold.
+ * libc/machine/powerpc/vfscanf.c (__svfscanf_r): Ditto.
+
+2015-11-20 Corinna Vinschen <corinna@vinschen.de>
+
+ * libc/stdlib/strtod.c (match): Move from here...
+ * libc/stdlib/gdtoa-hexnan.c (match): ...to here.
+ * libc/stdlib/mprec.h (match): Declare and add __match define.
+
+2015-11-20 Corinna Vinschen <corinna@vinschen.de>
+
+ * libc/stdlib/wcstold.c (_strtold): Drop unused declaration.
+
+2015-11-19 Yaakov Selkowitz <yselkowi@redhat.com>
+
+ * libc/stdlib/stdlib.tex: Fix typo in rpmatch reference.
+
+2015-11-19 Corinna Vinschen <corinna@vinschen.de>
+
+ * libc/stdlib/ldtoa.c: Convert to GNU style so as not to get crazy
+ reading the code.
+
+2015-11-19 Corinna Vinschen <corinna@vinschen.de>
+
+ * libc/stdlib/rpmatch.c: Include sys/types.h to make GCC happy.
+
+2015-11-12 Jon Turney <jon.turney@dronecode.org.uk>
+
+ * libc/stdio/sprintf.c: Simplify documentation markup.
+ * libc/stdio/swprintf.c: Ditto.
+
+2015-11-12 Jon Turney <jon.turney@dronecode.org.uk>
+
+ * libc/stdio/sscanf.c: Improve documentation markup.
+ * libc/stdio/swscanf.c: Ditto.
+
+2015-11-17 Yaakov Selkowitz <yselkowi@redhat.com>
+
+ * libc/include/stdlib.h (rpmatch): Declare.
+ * libc/stdlib/Makefile.am (ELIX_4_SOURCES): Add rpmatch.c.
+ (CHEWOUT_FILES): Add rpmatch.def.
+ * libc/stdlib/Makefile.in: Regenerate.
+ * libc/stdlib/rpmatch.c: New file.
+ * libc/stdlib/stdlib.tex: Add references to rpmatch.
+
+2015-11-13 Marcus Shawcroft <marcus.shawcroft@arm.com>
+
+ * libc/machine/arm/strlen-stub.c: Move T1 -O2 implementation to...
+ * libc/machine/arm/strlen-thumb1-Os.S: New file.
+ * libc/machine/arm/strlen.S: Include strlen-thumb1-Os.S.
+
+2015-11-13 Marcus Shawcroft <marcus.shawcroft@arm.com>
+
+ * libc/machine/arm/Makefile.am: Adding strlen.S.
+ * libc/machine/arm/Makefile.in: Regenerate.
+ * libc/machine/arm/strlen.S: New.
+ * libc/machine/arm/strlen-stub.c: Rewrite #if condition.
+ * libc/machine/arm/strlen-armv7.S: Remove surrounding #if.
+
+2015-11-13 Marcus Shawcroft <marcus.shawcroft@arm.com>
+
+ * libc/machine/arm/Makefile.am: Rename strlen.c to strlen-stub.c
+ * libc/machine/arm/Makefile.in: Regenerate.
+ * libc/machine/arm/strlen.c: Rename to...
+ * libc/machine/arm/strlen-stub.c: ... this.
+
+2015-11-13 Marcus Shawcroft <marcus.shawcroft@arm.com>
+
+ * libc/machine/arm/Makefile.am: Drop STRLEN_SRC and STRLEN_OBJ.
+ Adding strlen.c.
+ * libc/machine/arm/configure.in (HAVE_THUMB1, OPT_SIZE): Remove.
+ * libc/machine/arm/strlen.c: Include ../../string/strlen.c.
+ * libc/machine/arm/configure: Regenerate.
+ * libc/machine/arm/Makefile.in: Regenerate.
+
+2015-11-13 Marcus Shawcroft <marcus.shawcroft@arm.com>
+
+ * libc/machine/arm/strlen.c: Refactor nested #if.
+
+2015-11-12 Anton Kolesov <Anton.Kolesov@synopsys.com>
+
+ * configure.host: Add ARC support.
+ * libc/include/machine/setjmp.h: Likewise.
+ * libc/machine/configure: Likewise.
+ * libc/machine/configure.in: Likewise.
+ * libc/machine/arc/Makefile.am: Likewise.
+ * libc/machine/arc/Makefile.in: Likewise.
+ * libc/machine/arc/aclocal.m4: Likewise.
+ * libc/machine/arc/asm.h: Likewise.
+ * libc/machine/arc/configure: Likewise.
+ * libc/machine/arc/configure.in: Likewise.
+ * libc/machine/arc/memcmp-bs-norm.S: Likewise.
+ * libc/machine/arc/memcmp-stub.c: Likewise.
+ * libc/machine/arc/memcmp.S: Likewise.
+ * libc/machine/arc/memcpy-archs.S: Likewise.
+ * libc/machine/arc/memcpy-bs.S: Likewise.
+ * libc/machine/arc/memcpy-stub.c: Likewise.
+ * libc/machine/arc/memcpy.S: Likewise.
+ * libc/machine/arc/memset-archs.S: Likewise.
+ * libc/machine/arc/memset-bs.S: Likewise.
+ * libc/machine/arc/memset-stub.c: Likewise.
+ * libc/machine/arc/memset.S: Likewise.
+ * libc/machine/arc/setjmp.S: Likewise.
+ * libc/machine/arc/strchr-bs-norm.S: Likewise.
+ * libc/machine/arc/strchr-bs.S: Likewise.
+ * libc/machine/arc/strchr-stub.c: Likewise.
+ * libc/machine/arc/strchr.S: Likewise.
+ * libc/machine/arc/strcmp-archs.S: Likewise.
+ * libc/machine/arc/strcmp-stub.c: Likewise.
+ * libc/machine/arc/strcmp.S: Likewise.
+ * libc/machine/arc/strcpy-bs-arc600.S: Likewise.
+ * libc/machine/arc/strcpy-bs.S: Likewise.
+ * libc/machine/arc/strcpy-stub.c: Likewise.
+ * libc/machine/arc/strcpy.S: Likewise.
+ * libc/machine/arc/strlen-bs-norm.S: Likewise.
+ * libc/machine/arc/strlen-bs.S: Likewise.
+ * libc/machine/arc/strlen-stub.c: Likewise.
+ * libc/machine/arc/strlen.S: Likewise.
+ * libc/machine/arc/strncpy-bs.S: Likewise.
+ * libc/machine/arc/strncpy-stub.c: Likewise.
+ * libc/machine/arc/strncpy.S: Likewise.
+
+2015-11-12 Anton Kolesov <Anton.Kolesov@synopsys.com>
+
+ * configure.host: Remove ARC system.
+ * libc/sys/configure: Likewise.
+ * libc/sys/configure.in: Likewise.
+ * libc/sys/arc/Makefile.am: Likewise.
+ * libc/sys/arc/Makefile.in: Likewise.
+ * libc/sys/arc/aclocal.m4: Likewise.
+ * libc/sys/arc/configure: Likewise.
+ * libc/sys/arc/configure.in: Likewise.
+ * libc/sys/arc/crt0.S: Likewise.
+ * libc/sys/arc/dummy.S: Likewise.
+ * libc/sys/arc/isatty.c: Likewise.
+ * libc/sys/arc/mem-layout.c: Likewise.
+ * libc/sys/arc/sbrk.c: Likewise.
+ * libc/sys/arc/sys/syscall.h: Likewise.
+ * libc/sys/arc/syscalls.c: Likewise.
+
+2015-11-12 Marcus Shawcroft <marcus.shawcroft@arm.com>
+
+ * testsuite/lib/flags.exp (libgloss_link_flags): Drop multilibtop
+ from target_build_path.
+
+2015-11-06 Jon Turney <jon.turney@dronecode.org.uk>
+
+ * doc/makedoc.c (iscommand): Only allow commands to have trailing
+ spaces, not space separated words.
+
+2015-11-06 Jon Turney <jon.turney@dronecode.org.uk>
+
+ * libm/mathfp/s_acos.c: Fix QUICKREF.
+ * libm/mathfp/e_acosh.c: Ditto.
+ * libm/math/w_asin.c: Ditto.
+ * libm/mathfp/e_acosh.c: Ditto.
+ * libm/mathfp/s_acos.c: Ditto.
+
+2015-11-06 Jon Turney <jon.turney@dronecode.org.uk>
+
+ * doc/doc.str: Fix INTERNAL_DEFINITION, INTERNAL_FUNCTION and
+ INTERNAL.
+
+2015-11-12 Wilco Dijkstra <wdijkstr@arm.com>
+
+ * newlib/libc/machine/aarch64/memcpy.S (memcpy): Further tuning for
+ performance.
+
+2015-11-12 Joseph Myers <joseph@codesourcery.com>
+
+ * libc/machine/arm/strcmp-arm-tiny.S: Use .cfi_sections
+ .debug_frame.
+ * libc/machine/arm/strcmp-armv4.S: Likewise.
+ * libc/machine/arm/strcmp-armv4t.S: Likewise.
+ * libc/machine/arm/strcmp-armv6.S: Likewise.
+ * libc/machine/arm/strcmp-armv6m.S: Likewise.
+ * libc/machine/arm/strcmp-armv7.S: Likewise.
+ * libc/machine/arm/strcmp-armv7m.S: Likewise.
+
+2015-11-06 Marcus Shawcroft <marcus.shawcroft@arm.com>
+
+ * libc/machine/arm/Makefile.am: Drop MEMCHR_SRC and MEMCHR_OBJ.
+ * libc/machine/arm/Makefile.in: Regenerate.
+ * libc/machine/arm/memchr-stub.c: New.
+ * libc/machine/arm/memchr.S: Adjust comments. Include memchr.c and
+ acle-compat.h. Make .arch directive architecture dependent.
+ * libc/machine/arm/configure.in (HAVE_ARMV7): Remove.
+ * libc/machine/arm/configure: Regenerate.
+
+2015-11-06 Marcus Shawcroft <marcus.shawcroft@arm.com>
+
+ * libc/machine/arm/Makefile.am: Drop MEMCPY_SRC and MEMCPY_OBJ.
+ * libc/machine/arm/Makefile.in: Regenerate.
+ * libc/machine/arm/configure.in: Remove HAVE_ARMV8A, HAVE_ARMV7A and
+ HAVE_ARM7M.
+ * libc/machine/arm/configure: Regenerate.
+ * libc/machine/arm/memcpy-stub.c: New.
+ * libc/machine/arm/memcpy.c: Adjust copyright year. Adjust comments.
+ Include acle-compat.h.
+
+2015-11-06 Olivier Martin <olivier@labapart.com>
+
+ * libc/include/stdlib.h (mktemp): Change attribute to deprecated.
+ (_mktemp_r): Ditto.
+
+2015-11-03 Marcus Shawcroft <marcus.shawcroft@arm.com>
+
+ * libc/machine/arm/configure.in: Check for __ARM_ARCH_8A__.
+ * libc/machine/arm/memcpy.S: Handle __ARM_ARCH_8A__.
+ * libc/machine/arm/Makefile.am: Consider HAVE_ARMV8A in memcpy
+ selection.
+ * libc/machine/arm/Makefile.in: Regenerate.
+ * libc/machine/arm/configure: Regenerate.
+
+2015-11-02 Jon Turney <jon.turney@dronecode.org.uk>
+
+ * HOWTO: Update.
+ * Makefile.shared: Move documentation rules to here...
+ * libc/argz/Makefile.am: ... from here ...
+ * libc/ctype/Makefile.am: ... and here.
+ * libc/errno/Makefile.am: Ditto.
+ * libc/iconv/Makefile.am: Ditto.
+ * libc/iconv/ccs/Makefile.am : Ditto.
+ * libc/iconv/ces/Makefile.am: Ditto.
+ * libc/iconv/lib/Makefile.am: Ditto.
+ * libc/locale/Makefile.am: Ditto.
+ * libc/misc/Makefile.am: Ditto.
+ * libc/posix/Makefile.am: Ditto.
+ * libc/reent/Makefile.am: Ditto.
+ * libc/search/Makefile.am: Ditto.
+ * libc/stdio/Makefile.am: Ditto.
+ * libc/stdio64/Makefile.am: Ditto.
+ * libc/stdlib/Makefile.am : Ditto.
+ * libc/string/Makefile.am: Ditto.
+ * libc/syscalls/Makefile.am: Ditto.
+ * libc/time/Makefile.am : Ditto.
+ * libc/unix/Makefile.am: Ditto.
+ * libc/xdr/Makefile.am: Ditto.
+ * libm/common/Makefile.am: Ditto.
+ * libm/complex/Makefile.am: Ditto.
+ * libm/math/Makefile.am: Ditto.
+ * libm/mathfp/Makefile.am: Ditto.
+
+2015-11-02 Jon Turney <jon.turney@dronecode.org.uk>
+
+ * libc/time/wcsftime.c: Consistently use an em-dash in FUNCTION
+summary.
+ * libm/common/isgreater.c: Ditto.
+ * libm/common/s_fdim.c: Ditto.
+ * libm/common/s_fma.c: Ditto.
+ * libm/common/s_fmax.c: Ditto.
+ * libm/common/s_fmin.c: Ditto.
+ * libm/common/s_infinity.c: Ditto.
+ * libm/common/s_isnan.c: Ditto.
+ * libm/common/s_log2.c: Ditto.
+ * libm/common/s_logb.c: Ditto.
+ * libm/common/s_lrint.c: Ditto.
+ * libm/common/s_lround.c: Ditto.
+ * libm/common/s_nearbyint.c: Ditto.
+ * libm/common/s_remquo.c: Ditto.
+ * libm/common/s_rint.c: Ditto.
+ * libm/common/s_round.c: Ditto.
+ * libm/common/s_scalbn.c: Ditto.
+ * libm/common/s_signbit.c: Ditto.
+ * libm/common/s_trunc.c: Ditto.
+ * libm/math/w_exp2.c: Ditto.
+ * libm/math/w_gamma.c: Ditto.
+
+2015-11-02 Jon Turney <jon.turney@dronecode.org.uk>
+
+ * libc/stdio/fseek.c: Add missing semicolons to prototypes in
+ SYNOPSIS.
+ * libc/stdio/fwide.c: Ditto.
+ * libc/stdio64/fseeko64.c: Ditto.
+ * libc/string/strtok.c: Ditto.
+ * libc/string/wcstok.c: Ditto.
+ * libm/math/w_cosh.c: Ditto.
+ * libm/math/w_fmod.c: Ditto.
+ * libm/mathfp/s_cosh.c: Ditto.
+ * libm/mathfp/s_fmod.c: Ditto.
+
+2015-11-02 Steve Ellcey <sellcey@imgtec.com>
+
+ * libc/machine/mips/memcpy.S (memcpy): Add word copies for small
+ aligned data.
+
+2015-10-30 Sebastian Huber <sebastian.huber@embedded-brains.de>
+
+ * libc/include/pthread.h: Include <sched.h> instead of <sys/sched.h>.
+
+2015-10-26 Brian Inglis <Brian.Inglis@SystematicSw.ab.ca>
+
+ * libc/time/strftime.c (__strftime): add support for %s (seconds from
+ Unix epoch). Fix whitespaces.
+
+2015-10-19 Nick Clifton <nickc@redhat.com>
+
+ * libc/include/sys/_intsup.h: Add support for 16-bit and 20-bit
+ pointers.
+
+2015-10-14 Sebastian Huber <sebastian.huber@embedded-brains.de>
+
+ * libc/stdlib/Makefile.am (GENERAL_SOURCES): Add alloc_aligned.c.c.
+ * libc/stdlib/Makefile.in: Regenerate.
+ * libc/stdlib/aligned_alloc.c: New.
+
+2015-10-14 Sebastian Huber <sebastian.huber@embedded-brains.de>
+
+ * libc/include/stdlib.h (alloc_aligned): Declare.
+
+2015-10-14 Sebastian Huber <sebastian.huber@embedded-brains.de>
+
+ * libc/include/stdlib.h (at_quick_exit): Declare.
+ (quick_exit): Likewise.
+ * libc/stdlib/Makefile.am (GENERAL_SOURCES): Add
+ quick_exit.c.
+ * libc/stdlib/Makefile.in: Regenerate.
+ * libc/stdlib/quick_exit.c: New.
+
+2015-10-13 Sebastian Huber <sebastian.huber@embedded-brains.de>
+
+ * libc/include/threads.h: New.
+ * libc/sys/rtems/include/machine/_threads.h: Likewise.
+
+2015-10-13 Sebastian Huber <sebastian.huber@embedded-brains.de>
+
+ * libc/include/sys/cdefs.h: Synchronize with latest FreeBSD
+ version.
+
+2015-10-13 Sebastian Huber <sebastian.huber@embedded-brains.de>
+
+ * libc/include/sys/cdefs.h: Add style changes of latest FreeBSD
+ version.
+
+2015-10-08 Nick Clifton <nickc@redhat.com>
+
+ * libc/include/machine/setjmp.h (_JBLEN): Define for IA64.
+
+2015-09-22 James Bowman <james.bowman@ftdichip.com>
+
+ * configure.host (ft32): minimise newlib code size
+
+2015-09-04 James Bowman <james.bowman@ftdichip.com>
+
+ * configure.host: Add ft32 support.
+ * libc/include/machine/ieeefp.h: Ditto.
+ * libc/include/machine/setjmp.h: Ditto.
+ * libc/machine/configure.in: Ditto.
+ * libc/machine/configure: Ditto.
+ * libc/machine/ft32/Makefile.am: New file.
+ * libc/machine/ft32/Makefile.in: Ditto.
+ * libc/machine/ft32/aclocal.m4: Ditto.
+ * libc/machine/ft32/configure.in: Ditto.
+ * libc/machine/ft32/configure: Ditto.
+ * libc/machine/ft32/memcpy.S: Ditto.
+ * libc/machine/ft32/memset.S: Ditto.
+ * libc/machine/ft32/setjmp.S: Ditto.
+ * libc/machine/ft32/stpcmp.S: Ditto.
+ * libc/machine/ft32/strcmp.S: Ditto.
+ * libc/machine/ft32/strcpy.S: Ditto.
+ * libc/machine/ft32/strlen.S: Ditto.
+
+2015-09-03 Hans-Peter Nilsson <hp@axis.com>
+
+ * libc/machine/cris/sys/signal.h (kill): Declare.
+
+2015-08-29 Corinna Vinschen <corinna@vinschen.de>
+
+ * include/sys/unistd.h (_SC_LEVEL*): Add cache-related variables as
+ on Linux.
+
+2015-08-27 Markus Eisenmann <meisenmann.lba@fh-salzburg.ac.at>
+
+ * libc/machine/arm/strlen-armv7.S: Fix prepocessor check to avoid
+ double definition of strlen.
+
+2015-08-27 Andre Vieira <andre.simoesdiasvieira@arm.com>
+
+ * libc/include/sys/_intsup.h: Defined new __INTxx, __FASTxx and
+ __LEASTxx macro's to hold information regarding the respective types
+ print and scan formats.
+ * libc/include/inttypes.h: Defined LEAST and FAST specific PRI and SCN
+ macro's as these are not always the same as the INT variants. Used the
+ new __INTxx, __FASTxx and __LEASTxx macro's in their corresponding PRI
+ and SCN macros.
+
+2015-08-07 Stefan Wallentowitz <stefan.wallentowitz@tum.de>
+
+ * libc/sys/or1k/mlock.c: Fix exception enable saving
+
+2015-08-03 Shoichi Sakon <s-sakon@ap.jp.nec.com>
+
+ * libc/stdio/vfwscanf.c (__SVFWSCANF_R): Convert wrong usage of va_arg
+ to GET_ARG in %lc, %ls nad %l[] cases. Fix unterminated string in %l[]
+ case.
+
+2015-07-30 Sebastian Huber <sebastian.huber@embedded-brains.de>
+
+ * libc/sys/rtems/include/sys/lock.h (__LOCK_INIT_RECURSIVE): Use
+ proper type.
+
+2015-07-30 Wilco Dijkstra <wdijkstr@arm.com>
+
+ * libc/machine/aarch64/memset.S (memset): Rewrite.
+
+2015-07-28 Sebastian Huber <sebastian.huber@embedded-brains.de>
+
+ libc/sys/rtems/machine/_types.h: Move to ...
+ libc/sys/rtems/include/machine/_types.h: ... here.
+ libc/sys/rtems/machine/limits.h: Move to ...
+ libc/sys/rtems/include/machine/limits.h: ... here.
+ libc/sys/rtems/machine/param.h: Move to ...
+ libc/sys/rtems/include/machine/param.h: ... here.
+ libc/sys/rtems/sys/cpuset.h: Move to ...
+ libc/sys/rtems/include/sys/cpuset.h: ... here.
+ libc/sys/rtems/sys/dirent.h: Move to ...
+ libc/sys/rtems/include/sys/dirent.h: ... here.
+ libc/sys/rtems/sys/param.h: Move to ...
+ libc/sys/rtems/include/sys/param.h: ... here.
+ libc/sys/rtems/sys/syslimits.h: Move to ...
+ libc/sys/rtems/include/sys/syslimits.h: ... here.
+ libc/sys/rtems/sys/utime.h: Move to ...
+ libc/sys/rtems/include/sys/utime.h: ... here.
+
+2015-07-28 Sebastian Huber <sebastian.huber@embedded-brains.de>
+
+ * libc/sys/rtems/include/sys/lock.h: New.
+
+2015-07-21 Corinna Vinschen <corinna@vinschen.de>
+
+ * libc/include/machine/setjmp.h (siglongjmp): Declare as function on
+ Cygwin.
+ (sigsetjmp): Ditto.
+ (_longjmp): Mark as noreturn function on Cygwin.
+
+2015-07-15 Wilco Dijkstra <wdijkstr@arm.com>
+
+ * libc/machine/aarch64/memset.S (memset):
+ Revert: Rewrite of optimized memset.
+
+2015-07-13 Wilco Dijkstra <wdijkstr@arm.com>
+
+ * libc/machine/aarch64/memset.S (memset):
+ Rewrite of optimized memset.
+
+2015-07-13 Wilco Dijkstra <wdijkstr@arm.com>
+
+ * libc/machine/aarch64/memcpy.S (memcpy):
+ Rewrite of optimized memcpy.
+
+2015-07-13 Wilco Dijkstra <wdijkstr@arm.com>
+
+ * libc/machine/aarch64/memove.S (memmove):
+ Rewrite of optimized memmove.
+
+2015-07-06 Yaakov Selkowitz <yselkowi@redhat.com>
+
+ * libc/include/libgen.h (basename): Define as __xpg_basename
+ for source compatibility with glibc.
+ Declare with __ASMNAME("basename") for ABI compatibility.
+ * libc/include/string.h (basename): Define as basename for
+ source compatibility with glibc.
+ Declare with __ASMNAME("__gnu_basename") for ABI compatibility.
+
+2015-07-06 Corinna Vinschen <corinna@vinschen.de>
+
+ * libc/include/sys/time.h: Explicitely include sys/cdefs.h.
+ * libc/include/sys/types.h: Ditto. Guard BSD convenience base types
+ with __BSD_VISIBLE rather than !_POSIX_SOURCE.
+
+2015-07-01 Sebastian Huber <sebastian.huber@embedded-brains.de>
+
+ * libc/stdio/fputs.c (_puts_r): Add missing CHECK_INIT().
+ * libc/stdio/gets.c (_gets_r): Add missing _REENT_SMALL_CHECK_INIT() and
+ CHECK_INIT(). Use _stdin_r() to get the file pointer instead of stdin.
+
+2015-06-29 Jon Turney <jon.turney@dronecode.org.uk>
+
+ * libc/ctype/Makefile.in: Regenerate.
+ * libc/posix/Makefile.in: Ditto.
+ * libc/stdio/Makefile.in: Ditto.
+ * libc/stdio64/Makefile.in: Ditto.
+ * libc/stdlib/Makefile.in: Ditto.
+ * libc/string/Makefile.in: Ditto.
+
+2015-06-23 Jon Turney <jon.turney@dronecode.org.uk>
+
+ * libc/ctype/Makefile.am (CHEWOUT_FILES): Add isblank.def.
+ * libc/ctype/ctype.tex: Include isblank and add to menu.
+ * libc/posix/Makefile.am (CHEWOUT_FILES): Add posix_spawn.def.
+ * libc/posix/posix.tex: Include posix_spawn and add to menu.
+ * libc/stdio64/Makefile.am (CHEWOUT_FILES): Add fdopen.def.
+ * libc/stdio64/stdio64.tex: Include fdopen64 and add to menu.
+ * libc/stdio64/fdopen64.c: Improve one-line description.
+ * libc/string/Makefile.am (CHEWOUT_FILES): Add strchrnul.def.
+ * libc/string/strings.tex: Include strchrnul and add to menu.
+
+2015-06-23 Jon Turney <jon.turney@dronecode.org.uk>
+
+ * libc/stdlib/stdlib.tex: Include itoa and utoa, and add to menu.
+ * libc/string/strings.tex: Include memrchr and rawmemchr, and add
+ to menu.
+ * libm/math/math.tex: Include exp10 and pow10, and add to menu.
+ * libm/common/s_exp10.c: Improve one-line description.
+ * libm/common/s_exp10.c: Ditto.
+
+2015-06-23 Jon Turney <jon.turney@dronecode.org.uk>
+
+ * libc/stdlib/Makefile.am (CHEWOUT_FILES): Remove $(MALLOCR).def.
+ * libc/stdio/Makefile.am (CHEWOUT_FILES): Remove getwc.def and
+ putwc.def.
+
+2015-06-23 Jon Turney <jon.turney@dronecode.org.uk>
+
+ * libc/locale/locale.c: Fix mismatched parentheses in
+ documentation.
+ * libc/locale/locale.tex: Ditto.
+ * libc/stdio/fgetwc.c: Ditto.
+
+2015-06-23 Jon Turney <jon.turney@dronecode.org.uk>
+
+ * libc/stdlib/efgcvt.c: Fix typo-ed function names in
+ documentation.
+ * libc/stdlib/stdlib.tex: Fix function name in menu to match.
+
+2015-06-23 Jon Turney <jon.turney@dronecode.org.uk>
+
+ * libc/stdio/fread.c: Fix inconsistent use of '.' to separate
+ function names in FUNCTION mark up.
+
+2015-06-23 Jon Turney <jon.turney@dronecode.org.uk>
+
+ * libc/stdlib/llabs.c: Mark up parameter name in ANSI_SYNOPSIS.
+ * libc/time/tzset.c: Add and mark up parameter in SYNOPSIS.
+ * libm/common/s_nan.c: Ditto.
+
+2015-06-23 Jon Turney <jon.turney@dronecode.org.uk>
+
+ * libc/stdio/getchar_u.c: Fix a non-ANSI prototype in SYNOPSIS.
+
+2015-06-23 Jon Turney <jon.turney@dronecode.org.uk>
+
+ * libc/string/wcscpy.c: Remove stray ',' from prototype in
+ ANSI_SYNOPSIS.
+ * libc/string/wcpcpy.c: Ditto.
+
+2015-06-23 Jon Turney <jon.turney@dronecode.org.uk>
+
+ * libc/stdlib/itoa.c: Fix makedoc markup.
+ * libc/stdlib/wcsnrtombs.c: Ditto.
+
+2015-06-23 Jon Turney <jon.turney@dronecode.org.uk>
+
+ * libc/signal/signal.tex: Use texinfo not makedoc markup.
+ * libc/stdio/stdio.tex: Ditto.
+
+2015-06-22 Corinna Vinschen <corinna@vinschen.de>
+
+ * libc/include/sys/signal.h: Include forgotten sys/cdefs.h.
+
+2015-06-20 Corinna Vinschen <corinna@vinschen.de>
+
+ * libc/include/sys/signal.h: Move altstack macros completely
+ outside of rtems block.
+
+2015-06-19 Corinna Vinschen <corinna@vinschen.de>
+
+ * libc/include/sys/signal.h: Define SS_ONSTACK and SS_DISABLE
+ unconditionally.
+ (sigaltstack): Enable prototype on Cygwin.
+
+2015-06-15 Freddie Chopin <freddie_chopin@op.pl>
+
+ * libc/time/gmtime_r.c (gmtime_r): use faster algorithm from
+ civil_from_days() by Howard Hinnant
+
+2015-06-01 Hale Wang <hale.wang@arm.com>
+
+ * libc/machine/arm/aeabi_memmove-arm.S (__aeabi_memmove): Update the
+ assembler implementation.
+ * libc/machine/arm/aeabi_memmove-thumb.S (__aeabi_memmove): Ditto.
+ * libc/machine/arm/aeabi_memmove-thumb2.S (__aeabi_memmove): Ditto.
+ * libc/machine/arm/aeabi_memset-arm.S (__aeabi_memset): Ditto.
+ * libc/machine/arm/aeabi_memset-thumb.S (__aeabi_memset): Ditto.
+ * libc/machine/arm/aeabi_memset-thumb2.S (__aeabi_memset): Ditto.
+
+2015-06-01 Szabolcs Nagy <szabolcs.nagy@arm.com>
+
+ * libm/machine/aarch64/e_sqrt.c: New file.
+ * libm/machine/aarch64/ef_sqrt.c: New file.
+ * libm/machine/aarch64/s_fabs.c: New file.
+ * libm/machine/aarch64/sf_fabs.c: New file.
+ * libm/machine/aarch64/Makefile.in: Add new source files.
+ * libm/machine/aarch64/Makefile.am: Regenerate.
+
+2015-05-31 David Stacey <drstacey@tiscali.co.uk>
+
+ * libc/argz/argz_replace.c (argz_replace): Correct behaviour when memory
+ is exhausted.
+
+2015-05-28 Corinna Vinschen <vinschen@redhat.com>
+
+ * libc/include/sys/wait.h: Fix comment.
+
+2015-05-27 David Stacey <drstacey@tiscali.co.uk>
+
+ * libc/argz/argz_replace.c: Fix potential memory leak.
+
+2015-05-26 DJ Delorie <dj@redhat.com>
+
+ * libm/math/e_sqrt.c (__ieee754_sqrt): Don't truncate constant to
+ "int".
+
+2015-05-13 Nick Clifton <nickc@redhat.com>
+
+ * libm/common/s_signbit.c (__signbitf): Fix for 16-bit targets.
+ (__signbitd): Likewise.
+
+2015-05-02 Corinna Vinschen <vinschen@redhat.com>
+
+ * libc/include/sys/time.h: Include sys/select.h on Cygwin. Explain why.
+
+2015-04-29 Corinna Vinschen <vinschen@redhat.com>
+
+ * libc/include/sys/config.h: Move evaluation of _UINTPTR_EQ_ULONG and
+ _UINTPTR_EQ_ULONGLONG from here...
+ * libc/include/sys/_intsup.h: ...to here. Rename to _INTPTR_EQ_LONG
+ and _INTPTR_EQ_LONGLONG to refer to signed base type. Add test for
+ base type of int32_t and set _INT32_EQ_LONG accordingly.
+ * libc/include/stdint.h: Change checks for __have_long32 to checks
+ for _INT32_EQ_LONG.
+ * libc/include/inttypes.h: Ditto. Accommodate aforementioned name
+ change.
+
+2015-04-22 Corinna Vinschen <vinschen@redhat.com>
+
+ * libc/include/libgen.h (basename): Drop defining _BASENAME_DEFINED.
+ Always define macro basename. Add comment to explain why.
+ * libc/include/string.h (basename): Check for basename instead of
+ _BASENAME_DEFINED. Drop __GNUC__ branch, always use basename macro.
+ Change comment to explain why. Add nonnull function attribute.
+
+2015-04-09 Nick Clifton <nickc@redhat.com>
+
+ * libc/machine/rx/memchr.S: Add non-string insn using version.
+ * libc/machine/rx/memcpy.S: Likewise.
+ * libc/machine/rx/memmove.S: Likewise.
+ * libc/machine/rx/mempcpy.S: Likewise.
+ * libc/machine/rx/strcat.S: Likewise.
+ * libc/machine/rx/strcmp.S: Likewise.
+ * libc/machine/rx/strcpy.S: Likewise.
+ * libc/machine/rx/strlen.S: Likewise.
+ * libc/machine/rx/strncat.S: Likewise.
+ * libc/machine/rx/strncmp.S: Likewise.
+ * libc/machine/rx/strncpy.S: Likewise.
+
+2015-04-01 Corinna Vinschen <vinschen@redhat.com>
+
+ * libc/include/stdint.h: Throughout add parens around MIN/MAX values.
+
+2015-04-01 Sebastian Huber <sebastian.huber@embedded-brains.de>
+
+ * libc/include/sys/_stdint.h: New file.
+ * libc/include/stdint.h (int8_t): Move to <sys/_stdint.h>.
+ (uint8_t): Likewise.
+ (int16_t): Likewise.
+ (uint16_t): Likewise.
+ (int32_t): Likewise.
+ (uint32_t): Likewise.
+ (int64_t): Likewise.
+ (uint64_t): Likewise.
+ (intptr_t): Likewise.
+ (uintptr_t): Likewise.
+ * libc/include/sys/types.h: Include <sys/_stdint.h>.
+ * libc/sys/rtems/machine/_types.h: Remove <stdint.h> include.
+ * libc/sys/time.h>: Replace __uint32_t with uint32_t and
+ __uint64_t with uint64_t.
+
+2015-04-01 Jon TURNEY <jon.turney@dronecode.org.uk>
+
+ * libc/include/sys/signal.h (stack_t): Make typedef generally
+ available.
+
+2015-04-01 Corinna Vinschen <vinschen@redhat.com>
+
+ * libc/stdlib/wctomb_r.c (__utf8_wctomb): Fix check for handling a
+ lone high surrogate.
+
+2015-03-31 Corinna Vinschen <vinschen@redhat.com>
+
+ * libc/time/lcltime_r.c (localtime_r): Call _tzset_unlocked inside
+ TZ lock.
+ * libc/time/mktime.c (mktime): Ditto.
+ * libc/time/strftime.c (strftime, wcsftime): Ditto. Guard against
+ calling _tzset_unlocked more than once (baring recursion).
+
+2015-03-31 Corinna Vinschen <vinschen@redhat.com>
+
+ * libc/time/local.h (_tzset_unlocked_r): Add prototype.
+ (_tzset_unlocked): Ditto.
+ * libc/time/tzset.c (_tzset_unlocked): New function, call
+ _tzset_unlocked_r.
+ (tzset): Lock and call _tzset_unlocked_r.
+ * libc/time/tzset_r (_tzset_unlocked_r): Remove locking and rename
+ from _tzset_r.
+ (_tzset_r): Lock and call _tzset_unlocked_r.
+
+2015-03-30 Craig Howland <howland@LGSInnovations.com>
+
+ * libc/stdlib/setenv_r.c (_setenv_r): Remove tzset() call for TZ
+ definition.
+ * libc/time/lcltime_r.c (localtime_r): Add tzset() call
+ * libc/time/mktime.c (mktime): Ditto.
+ * libc/time/strftime.c (strftime, wcsftime): Ditto.
+
+2015-03-30 Yaakov Selkowitz <yselkowi@redhat.com>
+
+ * libc/time/strftime.c (strftime) <%Z>: Initialize tznam to NULL.
+ Use _tzname as fallback if TM_ZONE is NULL.
+
+2015-03-30 Yaakov Selkowitz <yselkowi@redhat.com>
+
+ * libc/include/libgen.h (_BASENAME_DEFINED): Define.
+ * libc/include/string.h (basename): Declare.
+ * libc/string/Makefile.am (ELIX_4_SOURCES): Add gnu_basename.c.
+ * libc/string/Makefile.in: Regenerate.
+ * libc/string/gnu_basename.c: New file.
+
+2015-03-23 Sebastian Huber <sebastian.huber@embedded-brains.de>
+
+ * libc/include/sys/tree.h: New file.
+
+2013-03-23 Joel Sherrill <joel.sherrill@oarcorp.com>
+
+ * newlib.hin: Remove _UINTPTR_EQ_ULONG and _UINTPTR_EQ_ULONGLONG.
+
+2015-03-23 Joel Sherrill <joel.sherrill@oarcorp.com
+
+ * configure.in: Delete logic to determine _UINTPTR_EQ_ULONGLONG
+ and _UINTPTR_EQ_ULONG at configuration time.
+ *libc/include/sys/config.h: Add logic to determine
+ _UINTPTR_EQ_ULONGLONG and _UINTPTR_EQ_ULONG at compilation time.
+ * libc/include/inttypes.h: Add include of <sys/config.h>.
+ * configure: Regenerated.
+
+2015-03-19 Steve Ellcey <sellcey@imgtec.com>
+
+ * libc/include/sys/time.h: Replace uint32_t and uint64_t
+ with __uint32_t and __uint64_t.
+
+2015-03-13 Jon TURNEY <jon.turney@dronecode.org.uk>
+
+ * libc/libc.texinfo: Fix directory entry.
+ * libm/libm.texinfo: Ditto.
+
+2015-03-13 Corinna Vinschen <vinschen@redhat.com>
+
+ * libc/include/sys/time.h: Drop including cygwin/sys_time.h on Cygwin.
+
+2015-03-13 Sebastian Huber <sebastian.huber@embedded-brains.de>
+
+ * libc/include/machine/_types.h (__suseconds_t): Define.
+ * libc/include/sys/_timeval.h: Import from FreeBSD and add
+ MinGW-w64 compatibility.
+ (timerclear): Copy from FreeBSD <sys/time.h>.
+ (timerisset): Likewise.
+ (timercmp): Likewise.
+ (timeradd): Likewise.
+ (timersub): Likewise.
+ * libc/include/sys/time.h: (bintime, ...) Import from FreeBSD.
+ (timespecclear, ...): Likewise.
+ (inittodr, ...): Likewise.
+ (timerclear): Delete.
+ (timerisset): Likewise.
+ (timercmp): Likewise.
+ (timeradd): Likewise.
+ (timersub): Likewise.
+ (futimes): Declare if __BSD_VISIBLE.
+ (futimesat): Likewise.
+ (lutimes): Likewise.
+ (setitimer): Declare unconditionally.
+ (gettimeofday): Declare if __XSI_VISIBLE.
+ * libc/include/sys/types.h (sbintime_t): Define.
+ (suseconds_t): Define conditionally via __suseconds_t.
+
+2015-03-12 Sebastian Huber <sebastian.huber@embedded-brains.de>
+
+ * libc/sys/rtems/include/semaphore.h: Import from FreeBSD.
+
+2015-03-11 Sebastian Huber <sebastian.huber@embedded-brains.de>
+
+ * libc/include/sys/_timespec.h: Import from FreeBSD.
+ * libc/include/sys/timespec.h: Likewise.
+ * libc/include/time.h: Include <sys/timespec.h>.
+ * libc/include/sys/types.h (timespec): Delete.
+ (itimerspec): Likewise.
+ * libc/include/machine/time.h: Include <sys/_timespec.h>.
+ * libc/include/sys/sched.h: Likewise.
+ * libc/include/sys/signal.h: Likewise.
+ * libc/include/sys/stat.h: Likewise.
+
+2015-03-11 Nick Clifton <nickc@redhat.com>
+
+ * testsuite/newlib.stdio/swprintf.c (main): Change size of value
+ used to initialise 'val' variable so that it will compile on
+ targets with 32-bit doubles.
+
+2015-03-05 Craig Howland <howland@LGSInnovations.com>
+
+ * libc/include/stdio.h (FILE): Protect typedef from redefinition.
+ * libc/include/wchar.h: Ditto.
+
+2015-02-25 Gedare Bloom <gedare@rtems.org>
+
+ * libc/include/machine/time.h (_CLOCKS_PER_SEC_): redefine for RTEMS.
+
+2015-03-03 Steve Ellcey <sellcey@imgtec.com>
+
+ * libc/machine/mips/memset.S: Add support for mips32r6/mips64r6.
+
+2015-03-03 Steve Ellcey <sellcey@imgtec.com>
+
+ * libc/machine/mips/memcpy.S: Add support for mips32r6/mips64r6.
+
+2015-02-26 Steve Ellcey <sellcey@imgtec.com>
+
+ * libc/machine/mips/memcpy.S: Fix macro indentation and typos in
+ comments.
+
+2015-02-24 Jon TURNEY <jon.turney@dronecode.org.uk>
+
+ * libc/include/sys/cdefs.h (_GNU_SOURCE): Move check so it has an
+ effect when _XOPEN_SOURCE is also defined.
+
+2015-02-17 Hale Wang <hale.wang@arm.com>
+
+ * libc/machine/arm/aeabi_memclr.c: New file to support
+ aeabi_memclr.
+ * libc/machine/arm/aeabi_memset.c: New file to support
+ aeabi_memset.
+ * libc/machine/arm/aeabi_memset-soft.S: Ditto.
+ * libc/machine/arm/aeabi_memset-arm.S: Ditto.
+ * libc/machine/arm/aeabi_memset-thumb.S: Ditto.
+ * libc/machine/arm/aeabi_memset-thumb2.S: Ditto.
+ * libc/machine/arm/Makefile.am: Add dependencies.
+ * libc/machine/arm/Makefile.in: Regenerated.
+
+2015-02-17 Hale Wang <hale.wang@arm.com>
+
+ * libc/machine/arm/aeabi_memmove.c: New file to support
+ aeabi_memmove.
+ * libc/machine/arm/aeabi_memmove-soft.S: Ditto.
+ * libc/machine/arm/aeabi_memmove-arm.S: Ditto.
+ * libc/machine/arm/aeabi_memmove-thumb.S: Ditto.
+ * libc/machine/arm/aeabi_memmove-thumb2.S: Ditto.
+ * libc/machine/arm/Makefile.am: Add dependencies.
+ * libc/machine/arm/Makefile.in: Regenerated.
+
+2015-02-06 Nick Clifton <nickc@redhat.com>
+
+ * libc/include/complex.h (cabsl): Add prototype.
+ (cimagl): Add prototype.
+ (creall): Add prototype.
+ * libc/include/ieeefp.h: Include float.h.
+ (EXT_EXPBITS, EXT_FRACHBITS, EXT_FRACLBITS)
+ (EXT_EXP_INFNAN. EXT_EXP_BIAS, EXT_FRACBITS): Define.
+ (struct ieee_ext, union ieee_ext_u): New types for long double
+ support.
+ * libc/include/math.h (finitel): Add prototype.
+ (hypotl): Add prototype.
+ (sqrtl): Add prototype.
+ * libm/common/Makefile.am (lsrc): Add sl_finite.c.
+ * libm/common/Makefile.in: Regenerate.
+ * libm/common/fdlibm.h (__ieee754_hypotl): Add prototype.
+ * libm/common/hypotl.c (hypotl): Add implementation for when long
+ double is larger than double.
+ * libm/common/sqrtl.c (sqrtl): Likewise.
+ * libm/common/sl_finite.c: New file. Adds implementation of the
+ finitel function.
+ * libm/complex/Makefile.am (lsrc): Define.
+ (libcomplex_la_SOURCES): Add lsrc.
+ (lib_a_SOURCES): Add lsrc.
+ * libm/complex/Makefile.in: Regenerate.
+ * libm/complex/cabs.c: Add documentation of cabsl function.
+ * libm/complex/cimag.c: Add documentation of cimagl function.
+ * libm/complex/creall.c: Add documentation of creall function.
+ * libm/complex/cabsl.c: New file. Adds implementation of the
+ cabsl function.
+ * libm/complex/cimagl.c: New file. Adds implementation of the
+ cimagl function.
+ * libm/complex/creall.c: New file. Adds implementation of the
+ creall function.
+ * libm/math/Makefile.am (lsrc): Define.
+ (libmath_la_SOURCES): Add lsrc.
+ (lib_a_SOURCES): Add lsrc.
+ * libm/math/Makefile.in: Regenerate.
+ * libm/math/el_hypot.c: New file. Adds implementation of the
+ __ieee754_hypotl function.
+
+2015-02-04 Corinna Vinschen <vinschen@redhat.com>
+
+ * libc/include/wchar.h (wcstold): Drop _LDBL_EQ_DBL requirement for
+ declaration.
+
+2015-01-29 Nick Clifton <nickc@redhat.com>
+
+ * libc/stdlib/wcstold.c (wcstold): Add implementation for when
+ long double is not the same as double.
+
+2015-01-28 Christian Eggers <ceggers@gmx.de>
+
+ * libc/include/sys/time.h: #include <sys/cdefs.h> for __BSD_VISIBLE.
+
+2015-01-23 Corinna Vinschen <vinschen@redhat.com>
+
+ Complete action from 2001-12-18:
+ * libc/machine/i386/f_*: Remove duplicate files.
+
+2015-01-22 Yaakov Selkowitz <yselkowi@redhat.com>
+
+ * libc/sys/sparc64/sys/time.h: #include <sys/types.h> for time_t.
+
+2015-01-22 Stefan Wallentowitz <stefan.wallentowitz@tum.de>
+
+ * libc/sys/or1k/mlock.c: Fix dependency on libgloss.
+
+2015-01-21 Eric Botcazou <ebotcazou@adacore.com>
+
+ * configure.host: Add Visium support.
+ * libc/machine/configure.in: Likewise.
+ * libc/machine/configure: Regenerate.
+ * libc/machine/visium/: New directory.
+ * libc/include/machine/setjmp.h (_JBLEN): Define for Visium.
+ * libc/include/machine/ieeefp.h (__IEEE_BIG_ENDIAN): Likewise.
+ * libc/include/machine/time.h (_CLOCKS_PER_SEC_): Likewise.
+
+2015-01-20 Stefan Wallentowitz <stefan.wallentowitz@tum.de>
+
+ * libc/sys/configure.in: Add OpenRISC.
+ * libc/sys/configure: Regenerate.
+
+2015-01-20 Wilco Dijkstra <wdijkstr@arm.com>
+
+ * libc/machine/aarch64/strlen.S (strlen): Improve performance.
+
+2015-01-20 Stefan Wallentowitz <stefan.wallentowitz@tum.de>
+
+ * configure.host: Add extra system for OpenRISC baremetal.
+
+2015-01-14 Joel Sherrill <joel.sherrill@oarcorp.com>
+
+ * libc/include/sys/unistd.h [__BSD_VISIBLE]: Add issetugid() prototype.
+
+2015-01-14 Joel Sherrill <joel.sherrill@oarcorp.com>
+
+ * doc/makedoc.c: Use uintptr_t to avoid int/pointer size warnings
+
+2015-01-14 Stefan Wallentowitz <stefan.wallentowitz@tum.de>
+
+ * configure.host: Add extra system for OpenRISC baremetal
+ * libc/include/sys/config.h: Dynamic reentrancy for or1k sys targets
+ * libc/sys/or1k/: New system for or1k baremetal
+ * libc/sys/or1k/Makefile.am: New file
+ * libc/sys/or1k/Makefile.in: New file
+ * libc/sys/or1k/aclocal.m4: New file
+ * libc/sys/or1k/configure.in: New file
+ * libc/sys/or1k/configure: New file
+ * libc/sys/or1k/getreent.S: New file
+ * libc/sys/or1k/mlock.S: New file
+ * libc/sys/or1k/or1k-asm.S: New file
+
+2015-01-12 Renlin Li <renlin.li@arm.com>
+
+ * testsuite/newlib.wctype/tiswctype.c (main): Use wide character type
+ function.
+
+2015-01-08 Corinna Vinschen <vinschen@redhat.com>
+
+ * libc/time/strftime.c (__strftime): Utilize __TM_GMTOFF and __TM_ZONE
+ on systems where available. On Cygwin, call function to get values.
+ Add comment to explain why. Drop TZ_LOCK/TZ_UNLOCK in 'z' case since
+ it's not necessary. In 'Z' case, add a comment to document a potential
+ codeset problem.
+
+2015-01-08 Renlin Li <renlin.li@arm.com>
+
+ * testsuite/newlib.wctype/twctrans.c (main): Use towlower and towupper.
+
+2015-01-06 Richard Earnshaw <rearnsha@arm.com>
+
+ * libc/machine/aarch64/strcpy.S (strcpy): Further performance
+ improvements. Adjust to allow building as stpcpy.
+ * libc/machine/aarch64/stpcpy.S: New file.
+ * libc/machine/aarch64/stpcpy-stub.c: New file.
+ * libc/machine/aarch64/Makefile.am (lib_a_SOURCES): Build stpcpy.
+ * libc/machine/aarch64/Makefile.in: Regenerated.
+
+2014-12-26 Freddie Chopin <freddie_chopin@op.pl>
+
+ * libc/include/sys/features.h: update newlib version and copyright year
+
+2014-12-18 Jeff Johnston <jjohnstn@redhat.com>
+
+ * NEWS: Update with 2.2.0 info.
+ * README: Ditto.
+ * acinclude.m4: Change version number to 2.2.0.
+ * libc/libc.texinfo: Ditto.
+ * libm/libm.texinfo: Ditto.
+ * configure: Regenerated.
+ * Makefile.in: Regenerated.
+ * doc/configure: Ditto.
+ * libc/*/configure: Ditto.
+ * libm/*/configure: Ditto.
+ * libc/sys/linux/shared.ld: Add VERS_2.2
+
+2014-12-18 Yaakov Selkowitz <yselkowi@redhat.com>
+
+ Implement BSD/GNU unlocked stdio extensions.
+ * libc/include/stdio.h (clearerr_unlocked, feof_unlocked,
+ ferror_unlocked, fflush_unlocked, fgetc_unlocked, fgets_unlocked,
+ fileno_unlocked, fputc_unlocked, fputs_unlocked, fread_unlocked,
+ fwrite_unlocked): Declare.
+ * libc/include/wchar.h (fgetwc_unlocked, fgetws_unlocked,
+ fputwc_unlocked, fputws_unlocked, getwc_unlocked, getwchar_unlocked,
+ putwc_unlocked, putwchar_unlocked): Declare.
+ * libc/stdio/Makefile.am (ELIX_4_SOURCES): Add clearerr_u.c,
+ feof_u.c, ferror_u.c, fflush_u.c, fgetc_u.c, fgets_u.c, fgetwc_u.c,
+ fgetws_u.c, fileno_u.c, fputc_u.c, fputs_u.c, fputwc_u.c, fputws_u.c,
+ fread_u.c, fwrite_u.c, getwc_u.c, getwchar_u.c, putwc_u.c, putwchar_u.c.
+ Add necessary dependencies.
+ * libc/stdio/Makefile.in: Regenerate.
+ * libc/stdio/clearerr.c: Document unlocked variant.
+ * libc/stdio/clearerr_u.c: New file.
+ * libc/stdio/feof.c: Document unlocked variant.
+ * libc/stdio/feof_u.c: New file.
+ * libc/stdio/ferror.c: Document unlocked variant.
+ * libc/stdio/ferror_u.c: New file.
+ * libc/stdio/fflush.c: Add __IMPL_UNLOCKED__ overrides.
+ Document unlocked variants.
+ * libc/stdio/fflush_u.c: New file.
+ * libc/stdio/fgetc.c: Document unlocked variants.
+ * libc/stdio/fgetc_u.c: New file.
+ * libc/stdio/fgets.c: Add __IMPL_UNLOCKED__ overrides.
+ Document unlocked variants.
+ * libc/stdio/fgets_u.c: New file.
+ * libc/stdio/fgetwc.c: Document unlocked variants.
+ (__fgetwc): Make non-static.
+ * libc/stdio/fgetwc_u.c: New file.
+ * libc/stdio/fgetws.c: Add __IMPL_UNLOCKED__ overrides.
+ Document unlocked variants.
+ * libc/stdio/fgetws_u.c: New file.
+ * libc/stdio/fileno.c: Document unlocked variant.
+ * libc/stdio/fileno_u.c: New file.
+ * libc/stdio/fputc.c: Document unlocked variants.
+ * libc/stdio/fputc_u.c: New file.
+ * libc/stdio/fputs.c: Add __IMPL_UNLOCKED__ overrides.
+ Document unlocked variants.
+ * libc/stdio/fputs_u.c: New file.
+ * libc/stdio/fputwc.c: Document unlocked variants.
+ (__fputwc): Make non-static.
+ * libc/stdio/fputwc_u.c: New file.
+ * libc/stdio/fputws.c: Add __IMPL_UNLOCKED__ overrides.
+ Document unlocked variants.
+ * libc/stdio/fputws_u.c: New file.
+ * libc/stdio/fread.c: Add __IMPL_UNLOCKED__ overrides.
+ Document unlocked variants.
+ * libc/stdio/fread_u.c: New file.
+ * libc/stdio/fwrite.c: Add __IMPL_UNLOCKED__ overrides.
+ Document unlocked variants.
+ * libc/stdio/fwrite_u.c: New file.
+ * libc/stdio/getwc_u.c: New file.
+ * libc/stdio/getwchar.c: Document unlocked variants.
+ * libc/stdio/getwchar_u.c: New file.
+ * libc/stdio/local.h: Define locking macros as empty ifdef
+ __IMPL_UNLOCKED__.
+ (__fgetwc, __fputwc): Declare.
+ * libc/stdio/putwc_u.c: New file.
+ * libc/stdio/putwchar.c: Document unlocked variants.
+ * libc/stdio/putwchar_u.c: New file.
+
+2014-12-18 Corinna Vinschen <vinschen@redhat.com>
+
+ * stdio.tex: Add menu entries for __fsetlocking and stdio_ext.
+ * stdio_ext.c: Add "stdio_ext" to synopsis.
+
+2014-12-16 DJ Delorie <dj@redhat.com>
+
+ * libc/stdlib/nano-mallocr.c (ALIGN_TO): Do not assume that
+ integers are as big as pointers.
+
+2014-12-16 Richard Earnshaw <rearnsha@arm.com>
+
+ * libc/machine/aarch64/strcpy.S: Improve handling of short strings.
+
+2014-12-16 Jon Beniston <jon@beniston.com>
+
+ * libc/include/stdlib.h (__itoa): Declare prototype.
+ (__utoa): Ditto.
+ (itoa): Ditto, non-strict-ANSI only.
+ (utoa): Ditto.
+ * libc/stdlib/Makefile.am: Add itoa.c and utoa.c.
+ * libc/stdlib/Makefile.in: Regenerate.
+ * libc/stdlib/itoa.c: New file.
+ * libc/stdlib/utoa.c: New file.
+
+2014-12-15 Jonathan Roelofs <jonathan@codesourcery.com>
+
+ * libc/include/math.h: Add log2l,logbl,nexttowardf,
+ * nexttoward,nexttowardl
+ * libm/common/Makefile.am: Reference new files
+ * libm/common/Makefile.in: Reference new files
+ * libm/common/log2l.c: New File
+ * libm/common/logbl.c: Likewise
+ * libm/common/nexttowardf.c: Likewise
+ * libm/common/nexttoward.c: Likewise
+ * libm/common/nexttowardl.c: Likewise
+
+2014-12-15 Yaakov Selkowitz <yselkowi@redhat.com>
+
+ * libc/include/stdio.h (__SNLK): Define.
+ * libc/include/stdio_ext.h (FSETLOCKING_QUERY, FSETLOCKING_INTERNAL,
+ FSETLOCKING_BYCALLER): Define.
+ (__fsetlocking): Declare.
+ * libc/stdio/Makefile.am: Build fsetlocking.c.
+ * libc/stdio/Makefile.in: Regenerate.
+ * libc/stdio/fsetlocking.c: New file.
+ * libc/stdio/local.h (_newlib_flockfile_start): Make _flockfile
+ call dependent on __SNLK flag.
+ (_newlib_flockfile_exit, _newlib_flockfile_end): Ditto for
+ _funlockfile calls.
+ Define all locking macros as empty if __SINGLE_THREAD__.
+ * libc/stdio/stdio.tex: Include fsetlocking.def.
+
+2014-12-15 Nick Hung <nick@andestech.com>
+
+ * newlib/libc/include/machine/setjmp.h: Add FPU support.
+ * newlib/libc/machine/nds32/setjmp.S: Add FPU support.
+
+2014-12-15 Nick Hung <nick@andestech.com>
+
+ * configure.host: Add libm nds32 machine directory.
+ * libm/machine/configure: Regenerated.
+ * libm/machine/configure.in: Add nds32 AC_CONFIG.
+ * libm/machine/nds32/Makefile.am: New file.
+ * libm/machine/nds32/Makefile.in: Generated.
+ * libm/machine/nds32/aclocal.m4: Generated.
+ * libm/machine/nds32/configure: Generated.
+ * libm/machine/nds32/configure.in: New file.
+ * libm/machine/nds32/w_sqrt.S: New file.
+ * libm/machine/nds32/wf_sqrt.S: New file.
+
+2014-12-15 Corinna Vinschen <vinschen@redhat.com>
+
+ * libc/include/stdlib.h: Include sys/cdefs.h to avoid undefined
+ __ASMNAME.
+
+2014-12-12 Stefan Wallentowitz <stefan.wallentowitz@tum.de>
+
+ * configure.host: or1knd support, OpenRISC without delay slot
+ * libc/include/machine/setjmp.h: Add or1knd
+ * libc/machine/or1k/setjmp.S: Optional delay slot
+
+2014-12-12 Stefan Wallentowitz <stefan.wallentowitz@tum.de>
+
+ * libc/machine/or1k/setjmp.S: Remove save/restore of r3-r8
+
+2014-12-11 Jonathan Roelofs <jonathan@codesourcery.com>
+ Corinna Vinschen <vinschen@redhat.com>
+
+ * libc/include/stdio.h: Fix type signature of __sfeof and __sferror
+ for C++.
+
+2014-12-11 Yaakov Selkowitz <yselkowi@redhat.com>
+
+ * libc/include/stdio_ext.h: Rename __fwriteable to __fwritable.
+ [!__GNUC__]: Declare real functions for the macros, and make
+ the macros conditional on !__cplusplus.
+ * libc/stdio/Makefile.am (ELIX_4_SOURCES): Add stdio_ext.c.
+ (CHEWOUT_FILES): Add stdio_ext.def.
+ * libc/stdio/Makefile.in: Regenerate.
+ * libc/stdio/stdio.tex: Include stdio_ext.def.
+ * libc/stdio/stdio_ext.c: New file.
+
+2014-12-04 Corinna Vinschen <vinschen@redhat.com>
+
+ * libc/include/stdio_ext.h: Remove excess "inline".
+
+2014-12-10 Richard Earnshaw <rearnsha@arm.com>
+
+ * libc/machine/aarch64/strchrnul.S (vrepmask): Use a call-clobbered
+ register.
+
+2014-12-08 Richard Earnshaw <rearnsha@arm.com>
+
+ * libc/machine/aarch64/strrchr.S: New file.
+ * libc/machine/aarch64/strrchr-stub.c: New file.
+ * libc/machine/aarch64/Makefile.am: Add them to build list.
+ * libc/machine/aarch64/Makefile.in: Regenerated.
+
+2014-12-07 Freddie Chopin <freddie_chopin@op.pl>
+
+ * libc/time/gmtime_r.c (gmtime_r): Fixed bug in calculations for dates
+ after year 2069 or before year 1901. Ideas for solution taken from
+ musl's __secs_to_tm()
+
+2014-12-05 Yaakov Selkowitz <yselkowi@redhat.com>
+
+ * libc/include/stdlib.h (__bsd_qsort_r): Declare.
+ (qsort_r): Declare.
+ * libc/search/Makefile.am (ELIX_2_SOURCES): Rename from ELIX_SOURCES.
+ (ELIX_4_SOURCES): Define. Add bsd_qsort_r.c and qsort_r.c.
+ (libsearch_la_SOURCES): Adapt accordingly.
+ (lib_a_SOURCES): Adapt accordingly.
+ (CHEWOUT_FILES): Add qsort_r.def.
+ * libc/search/Makefile.in: Regenerate.
+ * libc/search/bsd_qsort_r.c: New file.
+ * libc/search/qsort.c: Update from FreeBSD HEAD. Adapt for both BSD
+ and GNU qsort_r flavors.
+ * libc/search/qsort_r.c: New file.
+
+2014-12-04 Ulrich Weigand <uweigand@de.ibm.com>
+ Corinna Vinschen <vinschen@redhat.com>
+
+ * libc/include/sys/signal.h [__SPU__] (kill): Declare.
+
+2014-12-03 Jeff Johnston <jjohnstn@redhat.com>
+
+ * libc/include/inttypes.h: Only enable the 8-bit scanning macros
+ if _WANT_IO_C99_FORMATS is defined by configuration. Add comment
+ on why.
+
+2014-11-28 Matthew Fortune <matthew.fortune@imgtec.com>
+
+ * libc/include/machine/setjmp.h [__mips__]: Remove __mips_fpr == 64
+ from the 64-bit _JBTYPE definition.
+ * libc/machine/mips/setjmp.S: Re-work the o32 FP64 support to match
+ the now one-and-only supported o32 FP64 ABI extension. Also
+ support o32 FPXX.
+
+2014-11-26 Hale Wang <hale.wang@arm.com>
+
+ * libc/machine/arm/strcmp-armv6m.S: New file.
+ * libc/machine/arm/strcmp.S: Add new wrapper.
+ * libc/machine/arm/Makefile.am: Add dependencies.
+ * libc/machine/arm/Makefile.in: Regenerated.
+
+2014-11-25 Corinna Vinschen <vinschen@redhat.com>
+
+ * libc/include/sys/_default_fcntl.h: Move all Cygwin-specific open
+ flags from Cygwin's fcntl.h here. Remove check for WIN32. Remove
+ Windows-specific macros.
+
+2014-11-23 Joel Sherrill <joel.sherrill@oarcorp.com>
+
+ * libc/include/sys/resource.h: Add prototype for getrusage()
+ to <sys/resource.h>
+
+2014-11-21 Nick Clifton <nickc@redhat.com>
+
+ PR target/63901
+ * configure.host (msp430): Add -mhwmult=none to newlib_cflags.
+
+2014-11-20 Peter A. Bigot <pab@pabigot.com>
+
+ * libc/stdio/nano-vfprintf_i.c (_printf_i): Use LONGINT when void* is
+ larger than an int.
+
+2014-11-20 Sebastian Huber <sebastian.huber@embedded-brains.de>
+
+ * libc/sys/rtems/sys/syslimits.h (NGROUPS_MAX): Adjust value so
+ that NGROUPS is even.
+
+2014-11-12 Jon Beniston <jon@beniston.com>
+
+ * libc/stdlib/strtod.c (sulp): Cast to int32_t to avoid overflow.
+ * libc/time/gmtime_r.c (DAYS_PER_*_YEARS): Convert to long constants
+ to avoid overflow.
+
+2014-11-10 Richard Earnshaw <rearnsha@arm.com>
+
+ * libc/machine/aarch64/strcpy.S: New file.
+ * libc/machine/aarch64/strcpy-stub.S: New file.
+ * libc/machine/aarch64/Makefile.am (lib_a_SOURCES): Add new files.
+ * libc/machine/aarch64/Makefile.in: Regenerate.
+
+2014-11-06 Joel Sherrill <joel.sherrill@oarcorp.com>
+
+ * configure.in: Add autoconf test to determine size of uintptr_t.
+ * newlib.hin: Add new autoconf feature variables.
+ * libc/include/inttypes.h: Use new feature variables.
+ * configure: Regenerate.
+
+2014-11-06 Terry Guo <terry.guo@arm.com>
+
+ * libc/stdio/nano-vfprintf_i.c (_printf_i): Use Newlib approach to
+ handle string that might be not nul-terminated.
+ * testsuite/newlib.stdio/nulprintf.c: New test.
+
+2014-10-29 Jon Turney <jon.turney@dronecode.org.uk>
+
+ * libc/include/string.h: Correct guard for strcasecmp().
+
+2014-10-29 Terry Guo <terry.guo@arm.com>
+
+ * libc/stdio/vfprintf.c (_VFPRINTF_R): Remove unnecessary comparison.
+
+2014-10-27 Sebastian Huber <sebastian.huber@embedded-brains.de>
+
+ * libc/include/sys/unistd.h (sethostname): Declare if
+ requested.
+
+2014-10-20 Freddie Chopin <freddie_chopin@op.pl>
+
+ * libc/time/gmtime_r.c (gmtime_r): Remove dead code.
+
+2014-10-16 Sebastian Huber <sebastian.huber@embedded-brains.de>
+
+ * libc/unix/getcwd.c (getcwd): Close directory also in case of an error.
+
+2014-10-10 Thomas Uhle <thomas.uhle@eas.iis.fraunhofer.de>
+
+ * libc/include/_ansi.h: _LONG_LONG_TYPE definition removed.
+ * libc/include/math.h: _LONG_LONG_TYPE replaced by "long long".
+ Guards for C99 and C++11 functions fixed.
+ * libc/include/stdlib.h: Guards for C99 and C++11 functions fixed.
+
+2014-10-09 Sebastian Huber <sebastian.huber@embedded-brains.de>
+
+ * libc/include/stdint.h: Include <sys/_intsup.h>.
+ (__STDINT_EXP): Delete.
+ (__have_long32): Likewise.
+ (__have_long64): Likewise.
+ (__have_longlong64): Likewise.
+ * libc/include/sys/_intsup.h: New file.
+ (__STDINT_EXP): Move from libc/include/stdint.h.
+ (__have_long32): Likewise.
+ (__have_long64): Likewise.
+ (__have_longlong64): Likewise.
+ * libc/include/inttypes.h: Include <sys/_intsup.h>.
+ (__INTTYPES_EXP): Delete and use __STDINT_EXP() instead.
+
+2014-10-09 Freddie Chopin <freddie_chopin@op.pl>
+
+ * libc/string/memccpy.c (memccpy): Fix warning about signed-unsigned
+ comparison
+ * libc/string/memchr.c (memchr): Ditto.
+ * libc/string/memrchr.c (memrchr): Ditto.
+ * libc/string/memset.c: (memset): Ditto.
+ * libc/string/rawmemchr.c (rawmemchr): Ditto.
+ * libc/string/local.h (__locale_cjk_lang): Fix "function declaration
+ isn't a prototype" warning.
+ * libc/string/strcasestr.c (strcasestr): Ditto.
+ * libc/string/u_strerr.c (_user_strerror): Fix "unused parameter"
+ warnings.
+ * libc/string/rawmemchr.c (rawmemchr): Fix comment type
+ "// ..." -> "/* ... */".
+
+2014-10-08 Steve Ellcey <sellcey@mips.com>
+
+ * newlib/libc/machine/mips/strcmp.c: Remove.
+ * newlib/libc/machine/mips/strcmp.S: New.
+ * newlib/libc/machine/mips/Makefile.am (lib_a_SOURCES):
+ Replace strcmp.c with strcmp.S
+ * newlib/libc/machine/mips/Makefile.in: Regenerate.
+
+2014-10-08 Corinna Vinschen <vinschen@redhat.com>
+
+ * libc/include/string.h (ffsl): Declare as GNU function.
+ (ffsll): Ditto.
+
+2014-09-17 Jeff Johnston <jjohnstn@redhat.com>
+
+ * libc/include/sys/features.h: Add __NEWLIB__ and
+ __NEWLIB_MINOR__ macros.
+
+2014-09-17 Joel Sherrill <joel.sherrill@oarcorp.com>
+ Thomas Uhle <thomas.uhle@eas.iis.fraunhofer.de>
+
+ * libc/include/string.h: Correct guard for strnlen().
+
+2014-09-15 Jeff Johnston <jjohnstn@redhat.com>
+
+ * libc/time/month_lengths.c: Fix to define __month_lengths.
+
+2014-09-12 Jeff Johnston <jjohnstn@redhat.com>
+
+ * libc/time/tzcalc_limits.c: Fix __month_lengths reference.
+
+2014-09-12 Jeff Johnston <jjohnstn@redhat.com>
+
+ * libc/time/month_lengths.c: Actually add file this time.
+ * libc/time/tzcalc_limits.c: Ditto.
+
+2014-09-11 Freddie Chopin <freddie_chopin@op.pl>
+
+ * libc/time/month_lengths.c: New file with __month_lengths array
+ (previously mon_lengths array in mktm_r.c)
+ * libc/time/tzcalc_limits.c: New file with __tzcalc_limits() from
+ mktm_r.c
+ * libc/time/lcltime_r.c (localtime_r): Simplify by changing call to
+ _mktm_r() with call to gmtime_r() and code moved from _mktm_r() which
+ was used to do time zone adjustments
+ * libc/time/gmtime_r.c (gmtime_r): Simplify by moving all relevant
+ code from _mktm_r(), breaking all dependencies on time zone related
+ functions
+ * libc/time/mktm_r.c: Delete file
+ * libc/time/local.h: Update accordingly - remove declaration of
+ _mktm_r(), add declaration of __month_lengths[]
+ * libc/time/Makefile.am: Modify accordingly.
+ * libc/time/Makefile.in: Regenerate.
+
+2014-09-08 Freddie Chopin <freddie_chopin@op.pl>
+
+ * libc/machine/arm/Makefile.am: Fix typo.
+ * libc/machine/arm/Makefile.in: Regenerated.
+
+2014-09-05 Hale Wang <hale.wang@arm.com>
+
+ * libc/machine/arm/memchr.S: Clean up the wrapper.
+ * libc/machine/arm/memcpy.S: Likewise.
+ * libc/machine/arm/memchr-stub.c: Delete this redundant file.
+ * libc/machine/arm/memcpy-stub.c: Likewise.
+ * libc/machine/arm/strcmp.S: Add speed-preferred wrapper.
+ * libc/machine/arm/strlen.S: Likewise.
+ * libc/machine/arm/Makefile.am: Add dependencies.
+ * libc/machine/arm/Makefile.in: Regenerated.
+ * libc/machine/arm/configure.in: Add dependencies.
+ * libc/machine/arm/configure: Regenerated.
+
+2014-09-05 Bin Cheng <bin.cheng@arm.com>
+
+ * libc/stdio/findfp.c (_cleanup_r): Call _fflush_r when configuration
+ option "--enable-lite-exit" is in effect. Refactor the code.
+
+2014-09-05 Bin Cheng <bin.cheng@arm.com>
+
+ * libc/stdio/fwalk.c (_fwalk_reent): Remove redundant test.
+
+2014-09-04 Freddie Chopin <freddie_chopin@op.pl>
+
+ * libc/time/mktm_r.c (_mktm_r): Optimize speed.
+
+2014-09-04 Freddie Chopin <freddie_chopin@op.pl>
+
+ * libc/time/clock.c (clock): Fix warnings about signed-unsigned
+ comparisons.
+ * libc/time/strftime.c (strftime): Likewise.
+ * libc/time/strptime.c (match_string): Fix warning about discarding
+ 'restrict' qualifier from pointer target type.
+
+2014-09-04 Hale Wang <hale.wang@arm.com>
+
+ * libc/machine/arm/aeabi_memcpy.c: New file.
+ * libc/machine/arm/aeabi_memcpy-armv7a.S: New file.
+ * libc/machine/arm/Makefile.am: Add dependencies.
+ * libc/machine/arm/Makefile.in: Regenerated.
+
+2014-08-27 DJ Delorie <dj@redhat.com>
+
+ * libc/include/math.h (frexpl): Remove parameter name.
+
+2014-08-19 Richard Earnshaw <rearnsha@arm.com>
+
+ * libc/machine/aarch64/memchr.S: Add check for zero-sized buffer.
+
+2014-08-18 Corinna Vinschen <vinschen@redhat.com>
+
+ * libc/include/sys/signal.h: Declare sigaltstack for RTEMS only.
+
+2014-08-18 Jeff Johnston <jjohnstn@redhat.com>
+
+ * libc/include/sys/config.h[__m68k__]: Set _READ_WRITE_RETURN_TYPE
+ to _ssize_t to match underlying code in libgloss.
+
+2014-08-18 Joel Sherrill <joel.sherrill@oarcorp.com>
+
+ * libc/include/string.h: Improve language and OS standard guards.
+
+2014-08-18 Joel Sherrill <joel.sherrill@oarcorp.com>
+
+ * libc/include/sys/signal.h: Add sigaltstack() support.
+
+2014-08-14 Bin Cheng <bin.cheng@arm.com>
+
+ * libc/stdio/findfp.c (std): Don't inline when optimizing for code size.
+
+2014-08-04 Jon TURNEY <jon.turney@dronecode.org.uk>
+
+ * libc/include/math.h: Also define M_PI etc. if _XOPEN_SOURCE is
+ defined appropriately.
+
+2014-08-01 Eric Blake <eblake@redhat.com>
+
+ * libc/machine/spu/spu_timer_internal.h: Decorate attribute names
+ with __, for namespace safety.
+ * libc/machine/xscale/machine/profile.h: Likewise.
+ * libc/include/stdlib.h: Likewise.
+ * libc/include/_ansi.h: Likewise.
+ * libc/include/sys/unistd.h: Likewise.
+ * libc/sys/linux/linuxthreads/libc-symbols.h: Likewise.
+ * libc/sys/linux/linuxthreads/internals.h: Likewise.
+ * libc/sys/linux/machine/i386/weakalias.h: Likewise.
+ * libc/sys/linux/machine/i386/dl-procinfo.h: Likewise.
+ * libc/sys/linux/machine/i386/dl-machine.h: Likewise.
+ * libc/sys/linux/libc-symbols.h: Likewise.
+ * libc/sys/linux/iconv/gconv_charset.h: Likewise.
+ * libc/sys/linux/include/resolv.h: Likewise.
+ * libc/sys/linux/sys/unistd.h: Likewise.
+ * libc/sys/linux/dl/atomicity.h: Likewise.
+ * libc/sys/linux/dl/dynamic-link.h: Likewise.
+ * libc/sys/linux/dl/ldsodefs.h: Likewise.
+
+2014-07-30 Corinna Vinschen <vinschen@redhat.com>
+
+ * libc/string/strerror.c: Fix documentation so makedoc doesn't
+ stumble over a sole EAGAIN.
+
+2014-07-27 Anthony Green <green@moxielogic.com>
+
+ * configure.host: Add moxie-*-moxiebox target.
+
+2014-07-22 Joel Sherrill <joel.sherrill@oarcorp.com>
+
+ * libc/include/sys/time.h: Add prototype for adjtime() and
+ wrap it and settimeofday() prototype with __BSD_VISIBLE.
+
+2014-07-17 Hesham ALMatary <heshamelmatary@gmail.com>
+
+ * configure.host: Remove or16 and or32 targets and add or1k.
+ * libc/include/machine/ieeefp.h: Replace or32 with or1k.
+ * libc/machine/configure.in: Add or1k subdirectory.
+ * libc/machine/configure: Regenerate.
+ * libc/machine/or1k/configure.in: New file.
+ * libc/machine/or1k/configure: New file.
+ * libc/machine/or1k/Makefile.am: New file.
+ * libc/machine/or1k/Makefile.in: New file.
+ * libc/machine/or1k/setjmp.S: New file.
+
+2014-07-14 Nick Withers <nick.withers@anu.edu.au>
+
+ * libc/include/sys/errno.h: Fix comments.
+ * libc/string/strerror.c: Fix documentation.
+ (_strerror_r): Handle ENETRESET, EILSEQ, ENODATA, ECONNRESET,
+ EADDRNOTAVAIL, EOVERFLOW. Fix strings for EMFILE and EDOM.
+
+2014-07-11 Kévin Petit <kevin.petit@arm.com>
+
+ * libc/machine/aarch64/memchr.S: New file.
+ * libc/machine/aarch64/memchr-stub.c: New file.
+ * libc/machine/aarch64/Makefile.am: Add the new files.
+ * libc/machine/aarch64/Makefile.in: Regenerated.
+
+2014-07-07 Pavel Pisa <pisa@cmp.felk.cvut.cz>
+ Richard Earnshaw <rearnsha@arm.com>
+
+ * libc/machine/arm/memchr.S (.arch): Require revision ARMv6t2.
+
+2014-07-07 Corinna Vinschen <vinschen@redhat.com>
+
+ * configure.in (--enable-newlib-nano-formatted-io): Set to "no"
+ by default.
+ * configure: Regenerated.
+
+2014-07-04 Bin Cheng <bin.cheng@arm.com>
+
+ * README (--enable-newlib-nano-formatted-io): Describe.
+ * acconfig.h (_NANO_FORMATTED_IO): Undef.
+ * newlib.hin (_NANO_FORMATTED_IO): Undef.
+ * configure.in (--enable-newlib-nano-formatted-io): New option.
+ * configure: Regenerated.
+ * libc/configure.in (--enable-newlib-nano-formatted-io): New option.
+ * libc/configure: Regenerated.
+ * libc/stdio/Makefile.am (NEWLIB_NANO_FORMATTED_IO): Support new
+ configuration option.
+ * libc/stdio/Makefile.in: Regenerated.
+ * libc/stdio/asnprintf.c (_asniprintf_r, asniprintf): Use
+ _NANO_FORMATTED_IO to declare alias prototypes.
+ * libc/stdio/asprintf.c (_asiprintf_r, asiprintf): Ditto.
+ * libc/stdio/dprintf.c (_diprintf_r, diprintf): Ditto.
+ * libc/stdio/fprintf.c (_fiprintf_r, fiprintf): Ditto.
+ * libc/stdio/fscanf.c (fiscanf, _fiscanf_r): Ditto.
+ * libc/stdio/printf.c (_iprintf_r, iprintf): Ditto.
+ * libc/stdio/scanf.c (iscanf, _iscanf_r): Ditto.
+ * libc/stdio/snprintf.c (_sniprintf_r, sniprintf): Ditto.
+ * libc/stdio/sprintf.c (_siprintf_r, siprintf): Ditto.
+ * libc/stdio/sscanf.c (siscanf, _siscanf_r): Ditto.
+ * libc/stdio/vasnprintf.c (_vasniprintf_r, vasniprintf): Ditto.
+ * libc/stdio/vasprintf.c (vasiprintf, _vasiprintf_r): Ditto.
+ * libc/stdio/vdprintf.c (_vdiprintf_r, vdiprintf): Ditto.
+ * libc/stdio/vprintf.c (viprintf, _viprintf_r): Ditto.
+ * libc/stdio/vscanf.c (viscanf, _viscanf_r): Ditto.
+ * libc/stdio/vsnprintf.c (vsniprintf, _vsniprintf_r): Ditto.
+ * libc/stdio/vsprintf.c (vsiprintf, _vsiprintf_r): Ditto.
+ * libc/stdio/vsscanf.c (vsiscanf, _vsiscanf_r): Ditto.
+ * libc/stdio/nano-vfprintf.c: New file.
+ * libc/stdio/nano-vfprintf_float.c: New file.
+ * libc/stdio/nano-vfprintf_i.c: New file.
+ * libc/stdio/nano-vfprintf_local.h: New file.
+ * libc/stdio/nano-vfscanf.c: New file.
+ * libc/stdio/nano-vfscanf_float.c: New file.
+ * libc/stdio/nano-vfscanf_i.c: New file.
+ * libc/stdio/nano-vfscanf_local.h: New file.
+
+2014-06-23 Corinna Vinschen <vinschen@redhat.com>
+
+ * libc/argz/envz_merge.c (envz_merge): Fix memory leak (Cygwin Coverity
+ Scan CID 60023).
+ * libc/ctype/iswalpha.c (iswalpha): Add bounds check to avoid
+ out-of-bounds read from utf8 tables (CID 59949).
+ * libc/locale/ldpart.c (__part_load_locale): Add 1 byte to size of lbuf.
+ Write NUL into the last byte to accommodate split_lines (CID 60047).
+
+2014-06-11 Richard Earnshaw <rearnsha@arm.com>
+
+ * libc/machine/aarch64/strchrnul.S: New file.
+ * libc/machine/aarch64/strchrnul-stub.c: New file.
+ * libc/machine/aarch64/Makefile.am: Add them to build list.
+ * libc/machine/aarch64/Makefile.in: Regenerated.
+
+2014-06-10 Richard Earnshaw <rearnsha@arm.com>
+
+ * libc/machine/aarch64/strchr.S: New file.
+ * libc/machine/aarch64/strchr-stub.c: New file.
+ * libc/machine/aarch64/Makefile.am: Add them to build list.
+ * libc/machine/aarch64/Makefile.in: Regenerated.
+
+2014-06-09 DJ Delorie <dj@redhat.com>
+
+ * configure.host (default_newlib_nano_malloc): New.
+ (msp430): Set it.
+ * configure.in (newlib_nano_malloc): Leave unset if not set by
+ the user.
+ * configure: Regenerate.
+ * libc/configure.in (NEWLIB_NANO_MALLOC): Set after running
+ configure.host.
+ (newlib_nano_malloc): Leave unset if not set by the user.
+ * libc/configure: Regenerate.
+
+2014-05-15 Daniel Cederman <cederman@gaisler.com>
+
+ * libc/machine/sparc/setjmp.S (longjmp): Use register g1 instead of g6.
+
+2014-05-14 Kaushik Phatak <Kaushik.Phatak@kpit.com>
+
+ * libc/include/machine/ieeefp.h: Define _DOUBLE_IS_32BITS when double
+ options is not __RL78_64BIT_DOUBLES__.
+
+2014-05-12 Corinna Vinschen <vinschen@redhat.com>
+
+ * libc/include/stdint.h (WCHAR_MIN): Copy definition from wchar.h.
+ (WCHAR_MAX): Ditto.
+ * libc/include/wchar.h (WCHAR_MIN): Add comment.
+ (WCHAR_MAX): Ditto.
+
+2014-05-09 Corinna Vinschen <vinschen@redhat.com>
+
+ * libc/include/stdio.h (tempnam): Declare as __BSD_VISIBLE or
+ __XSI_VISIBLE or if __POSIX_VISIBLE >= 200112.
+
+2014-05-09 Corinna Vinschen <vinschen@redhat.com>
+
+ * libc/include/stdio.h (fcloseall): Declare as __GNU_VISIBLE only.
+ (renameat): Drop explicit __CYGWIN__ dependency.
+
+2014-05-05 Corinna Vinschen <vinschen@redhat.com>
+
+ * libc/include/stdio.h: Declare various C99 printf/scanf functions for
+ C++11, too.
+
+2014-04-22 Richard Earnshaw <rearnsha@arm.com>
+
+ * libc/machine/arm/strcmp-arm-tiny.S: New file.
+ * libc/machine/arm/strcmp-armv4.S: New file.
+ * libc/machine/arm/strcmp-armv4t.S: New file.
+ * libc/machine/arm/strcmp-armv6.S: New file.
+ * libc/machine/arm/strcmp-armv7.S: New file.
+ * libc/machine/arm/strcmp-armv7m.S: New file.
+ * libc/machine/arm/strcmp.S: Replace with wrapper for various
+ implementations.
+ * libc/machine/arm/Makefile.am (strcmp.o, strcmp.obj): Add
+ dependencies.
+ * libc/machine/arm/Makefile.in: Regenerated.
+
+2014-04-14 Sebastian Huber <sebastian.huber@embedded-brains.de>
+
+ * libc/sys/rtems/sys/cpuset.h (CPU_SET_S): Add const qualifier.
+ (CPU_SET): Likewise.
+
+2014-04-09 DJ Delorie <dj@redhat.com>
+
+ * libc/machine/rl78/setjmp.S: Add RL78/G10 support.
+
+2014-04-04 Ashish Kapania <akapania@ti.com>
+
+ * configure.host (sys_dir, newlib_cflags): Set sys_dir to tirtos and use
+ -D__DYNAMIC_REENT__ and -DMALLOC_PROVIDED compiler options for TIRTOS
+ target.
+ * libc/stdio/local.h (_STDIO_CLOSE_PER_REENT_STD_STREAMS): Change #ifdef
+ to not define this macro when __tirtos__ is defined.
+ * libc/sys/tirtos : Add support for TIRTOS.
+ * libc/sys/tirtos/Makefile.am, libc/sys/tirtos/lock.c: New files.
+ * libc/sys/tirtos/configure.in, libc/sys/tirtos/include/sys/lock.h: Ditto.
+
+2014-03-27 Richard Earnshaw <rearnsha@arm.com>
+
+ * libc/machine/arm/acle-compat.h: New file.
+ * libc/machine/arm/arm_asm.h: Use it.
+
+2014-03-21 Maciej W. Rozycki <macro@codesourcery.com>
+
+ * libc/stdlib/gd_qnan.h (f_QNAN, d_QNAN0, d_QNAN1): Add MIPS
+ versions.
+ (ld_QNAN0, ld_QNAN1, ld_QNAN2, ld_QNAN3): Don't define for MIPS.
+ (ldus_QNAN0, ldus_QNAN1, ldus_QNAN2, ldus_QNAN3, ldus_QNAN4):
+ Likewise.
+ * libc/stdlib/ldtoa.c (nan113, nan64, nan53, nan24): Add MIPS
+ versions.
+ (enan): Handle legacy MIPS payloads.
+ * libm/common/s_nan.c (nan): Use __builtin_nan if supported by
+ the compiler.
+ * libm/common/sf_nan.c (nanf): Likewise.
+
+2014-03-21 Sabrina Ni <sabrinanitw@gmail.com>
+
+ * libc/machine/nds32/configure: Regenerated.
+ * libc/machine/nds32/configure.in: Add AC_NOEXECUTABLES.
+
+2014-03-21 Sabrina Ni <sabrinanitw@gmail.com>
+
+ * libc/machine/nds32/Makefile.am: Use C code implemented memcpy,
+ memset for 'ISA V3M'.
+ * libc/machine/nds32/Makefile.in: Generated.
+ * libc/machine/nds32/configure: Generated.
+ * libc/machine/nds32/configure.in: Detect IS_NDS32_ISA_V3M.
+
+2014-03-21 Sabrina Ni <sabrinanitw@gmail.com>
+
+ * libc/machine/nds32/setjmp.S: Keep jmp_buff sync with GDB.
+
+2014-03-21 Sabrina Ni <sabrinanitw@gmail.com>
+
+ * libc/machine/nds32/setjmp.S: Optimize.
+
+2014-03-07 Corinna Vinschen <vinschen@redhat.com>
+ Jeff Johnston <jjohnstn@redhat.com>
+
+ * libc/include/stdlib.h (strtold): Define if _HAVE_LONG_DOUBLE is
+ defined.
+ * libc/stdlib/strtold.c (strtold): Ditto. Call strtod on systems
+ with long double == double, _strtold otherwise.
+
+2014-03-05 Corinna Vinschen <vinschen@redhat.com>
+
+ * libc/include/time.h (__TM_GMTOFF): Remove Cygwin-specific definition.
+ (__TM_ZONE): Ditto.
+
+2014-03-05 Corinna Vinschen <vinschen@redhat.com>
+
+ * libc/include/time.h (__TM_GMTOFF): Define on Cygwin.
+ (__TM_ZONE): Ditto.
+ (struct tm): Add __TM_GMTOFF and __TM_ZONE members if they are defined.
+
+2014-03-04 Ed Nelson <ed@nelson305.com>
+
+ * libc/include/machine/_default_types.h: Define unsigned type using
+ signed type macros in case unsigned type macros are not available.
+
+2014-02-20 Agustin Henze <tin@sluc.org.ar>
+
+ * libm/complex/complex.tex: Fix wrong syntax in documentation.
+ * libm/math/math.tex: Ditto.
+
+2014-02-20 Corinna Vinschen <vinschen@redhat.com>
+
+ * libc/stdio/open_memstream.c (internal_open_memstream_r): Initialize
+ c->pos to 0.
+
+2014-02-11 Joey Ye <joey.ye@arm.com>
+
+ * libc/sys/arm/syscalls.c (_sbrk): Define as weak symbols.
+ (_read, _write): Ditto.
+
+2014-02-09 Corinna Vinschen <vinschen@redhat.com>
+
+ * libc/include/pwd.h: Include <sys/cdefs.h>.
+ * libc/include/grp.h: Ditto.
+
+2014-02-04 Matthias Braun <matze@braunis.de>
+
+ * libm/mathfp/sf_numtest.c: Fix NaN/Inf detection logic.
+
+2014-01-20 Corinna Vinschen <vinschen@redhat.com>
+
+ * libc/include/setjmp.h (longjmp): Fix copy/paste error.
+
+2014-01-19 Corinna Vinschen <vinschen@redhat.com>
+
+ * libc/include/setjmp.h (longjmp): Mark "noreturn" when building with
+ GCC.
+
+2014-01-17 Corinna Vinschen <vinschen@redhat.com>
+
+ * libc/include/pwd.h: Use __foo_VISIBLE macros from sys/cdefs.h.
+ (setpassent): Declare.
+
+2014-01-17 Sebastian Huber <sebastian.huber@embedded-brains.de>
+
+ * libc/include/sys/_default_fcntl.h (LOCK_SH): Define.
+ (LOCK_EX): Likewise.
+ (LOCK_NB): Likewise.
+ (LOCK_UN): Likewise.
+ (flock): Declare.
+
+2014-01-17 Corinna Vinschen <vinschen@redhat.com>
+
+ Introduce _STDIO_BSD_SEMANTICS flag to switch fclose/exit file flushing
+ semantics from POSIX to BSD.
+ * libc/stdio/fclose.c (_fclose_r): Conditionalize file flushing on
+ _STDIO_BSD_SEMANTICS. Call __sflush_r rather than _fflush_r. Add
+ comment.
+ * libc/stdio/fflush.c (__sflushw_r): New function, only available
+ if _STDIO_BSD_SEMANTICS is defined.
+ * libc/stdio/findfp.c (_cleanup_r): Call _fwalk_reent rather than
+ _fwalk. Conditionalize cleanup function call on _STDIO_BSD_SEMANTICS.
+ Add comments. Add FIXME.
+ * libc/stdio/local.h (__sflushw_r): Declare if _STDIO_BSD_SEMANTICS is
+ defined.
+
+2014-01-06 Sebastian Huber <sebastian.huber@embedded-brains.de>
+
+ * libc/include/sys/_default_fcntl.h (AT_FDCWD): Define according
+ to POSIX.
+ (AT_EACCESS): Likewise.
+ (AT_SYMLINK_NOFOLLOW): Likewise.
+ (AT_SYMLINK_FOLLOW): Likewise.
+ (AT_REMOVEDIR): Likewise.
+ (openat): Declare according to POSIX.
+ * libc/include/stdio.h (renameat): Likewise.
+ * libc/include/sys/stat.h (fchmodat): Likewise.
+ (fstatat): Likewise.
+ (mkdirat): Likewise.
+ (mkfifoat): Likewise.
+ (mknodat): Likewise.
+ (utimensat): Likewise.
+ (futimens): Likewise.
+ * libc/include/sys/unistd.h (faccessat): Likewise.
+ (fchownat): Likewise.
+ (linkat): Likewise.
+ (readlinkat): Likewise.
+ (symlinkat): Likewise.
+ (unlinkat): Likewise.
+
+2014-01-06 Mike Frysinger <vapier@gentoo.org>
+
+ * libc/search/hash.c (hash_delete): Change __uint32_t to u_int.
+ (hash_get): Likewise.
+ (hash_put): Likewise.
+ (hash_seq): Likewise.
+ (hash_sync): Likewise.
+
+2014-01-06 Mike Frysinger <vapier@gentoo.org>
+
+ * libc/ctype/jp2uc.c: Include string.h.
+
+2013-12-23 Jeff Johnston <jjohnstn@redhat.com>
+
+ * NEWS: Update with 2.1.0 info.
+ * README: Ditto.
+ * acinclude.m4: Change version number to 2.1.0.
+ * aclocal.m4: Regenerated.
+ * configure: Ditto.
+ * Makefile.in: Regenerated.
+ * doc/aclocal.m4: Ditto.
+ * doc/configure: Ditto.
+ * libc/*/aclocal.m4: Ditto.
+ * libc/*/configure: Ditto.
+ * libc/libc.texinfo: Ditto.
+ * libm/*/aclocal.m4: Ditto.
+ * libm/*/configure: Ditto.
+ * libm/libm.texinfo: Ditto.
+ * libc/sys/linux/shared.ld: Add VERS_2.1
+
+2013-12-22 JF Bastien <jfb@chromium.org>
+
+ * libc/include/limits.h: Define LLONG_MIN, LLONG_MAX and ULLONG_MAX
+ for C++11 too.
+ * libc/include/stdlib.h: Define struct lldiv_t, _Exit, atoll, llabs
+ and lldiv for C99 and C++11. Move wcstold to wchar.h.
+ * libc/include/wchar.h: Define WCHAR_MIN and WCHAR_MAX according to
+ __WCHAR_UNSIGNED__ if it is provided, and correct the limit when
+ unsigned (to 32 all-1 bits, not 31). Define FILE as in stdio.h.
+ Move wcstold from stdlib.h here.
+
+2013-12-20 Nick Clifton <nickc@redhat.com>
+
+ * configure.host (newlib_cflags): Use -Os, -ffunction-sections and
+ -fdata-sections for RL78.
+
+2013-12-19 Corinna Vinschen <vinschen@redhat.com>
+
+ * libc/stdio/vfwscanf.c (__SVFWSCANF_R): Fix fetching decimal_point in
+ !_MB_CAPABLE as well as in !__HAVE_LOCALE_INFO_EXTENDED__ case.
+
+2013-12-18 Corinna Vinschen <vinschen@redhat.com>
+
+ * libc/stdio/vfscanf.c (BUF): Change definition to take multibyte
+ decimal point into account.
+ (__SVFSCANF_R): Handle radix char language-dependent
+ per POSIX.
+ * libc/stdio/vfwscanf.c (__SVFWSCANF_R): Ditto.
+
+2013-12-10 Jeff Johnston <jjohnstn@redhat.com>
+
+ * acconfig.h: Add _HAVE_CC_INHIBIT_LOOP_TO_LIBCALL.
+ * newlib.hin: Ditto.
+ * configure: Regenerate.
+ * configure.in: Add setting of _HAVE_CC_INHIBIT_LOOP_TO_LIBCALL.
+ * libc/string/local.h: Add check for _HAVE_CC_INHIBIT_LOOP_TO_LIBCALL
+ and set __inhibit_loop_to_libcall macro appropriately.
+ * libc/string/memmove.c: Use __inhibit_loop_to_libcall macro in
+ function declaration.
+ * libc/string/memset.c: Ditto.
+
+2013-12-10 Chirayu Desai <chirayudesai1@gmail.com>
+
+ * libc/sys/rtems/include/limits.h: Update page size to match
+ libc/sys/rtems/machine/param.h.
+
+2013-12-03 Sebastian Huber <sebastian.huber@embedded-brains.de>
+
+ * libc/sys/rtems/sys/cpuset.h: Use __inline instead of inline.
+
+2013-12-03 Sebastian Huber <sebastian.huber@embedded-brains.de>
+
+ * libc/include/machine/_default_types.h: Move extern "C" after
+ header includes. Include <sys/features.h> for
+ __GNUC_PREREQ__().
+ (__u?int.*_t): Define via GCC provided __U?INT.*_TYPE__ if
+ available.
+ (__intptr_t): Define.
+ (__uintptr_t): Likewise.
+ * libc/include/stdint.h: Include <machine/_default_types.h>
+ instead of <_ansi.h>.
+ (u?int.*_t): Define via __u?int.*_t provided by
+ <machine/_default_types.h>.
+ (u?int_fast.*_t): Define via GCC provided
+ __U?INT_FAST.*_TYPE__ if available.
+ (U?INT.*(MIN|MAX)): Define via GCC provided __U?INT.*(MIN|MAX)__
+ if available.
+ (U?INT.*_C): Define via GCC provided __U?INT.*_C if available.
+ * libc/include/sys/cdefs.h: Use <machine/_default_types.h>
+ instead of <stdint.h>.
+ * libc/sys/rtems/sys/cpuset.h: Likewise.
+ * libc/sys/rtems/machine/_types.h: Include <stdint.h> for
+ FreeBSD compatibility.
+
+2013-11-29 Sebastian Huber <sebastian.huber@embedded-brains.de>
+
+ * libc/include/pthread.h (pthread_cleanup_push): Delete prototype
+ and add macro of the same name.
+ (pthread_cleanup_pop): Likewise.
+ (_pthread_cleanup_context): Define.
+ (_pthread_cleanup_push): Likewise.
+ (_pthread_cleanup_pop): Likewise.
+ (pthread_cleanup_push_defer_np): Define if _GNU_SOURCE is defined.
+ (pthread_cleanup_pop_restore_np): Likewise.
+ (_pthread_cleanup_push_defer): Likewise.
+ (_pthread_cleanup_pop_restore): Likewise.
+
+2013-11-29 Jennifer Averett <jennifer.averett@oarcorp.com>
+
+ * libc/include/pthread.h (pthread_attr_setaffinity_np):
+ Add pthread SMP affinity attributes to methods to RTEMS for
+ compatibility with GNU/Linux.
+ (pthread_attr_getaffinity_np): Likewise.
+ (pthread_setaffinity_np): Likewise.
+ (pthread_getaffinity_np): Likewise.
+ (pthread_getattr_np): Add for GNU/Linux compatibility.
+ * libc/include/sys/types.h: Add cpuset to pthread_attr_t for RTEMS.
+ * libc/include/sys/cdefs.h (_GNU_SOURCE): Defining _GNU_SOURCE
+ turns on all _XXX_VISBLE feature flags.
+
+2013-11-27 Sebastian Huber <sebastian.huber@embedded-brains.de>
+
+ * libc/sys/rtems/cpusetalloc.c: New file.
+ * libc/sys/rtems/cpusetfree.c: Likewise.
+ * libc/sys/rtems/Makefile.am (lib_a_SOURCES): Add new files.
+ * libc/sys/rtems/Makefile.in: Regenerate.
+ * libc/sys/rtems/sys/cpuset.h: Delete #if 0 block. Include
+ <stddef.h> for size_t.
+ (_NCPUBITS): Avoid NBBY and assume 8 bits per char.
+ (__cpuset_mask): Use int instead of size_t parameter for Linux
+ compatibility.
+ (__cpuset_index): Likewise.
+ (__cpuset_alloc): Declare.
+ (__cpuset_free): Likewise.
+ (CPU_ALLOC_SIZE): Likewise.
+ (CPU_ALLOC): Define.
+ (CPU_FREE): Likewise.
+ (CPU_ZERO_S): Likewise.
+ (CPU_FILL_S): Likewise.
+ (CPU_SET_S): Likewise.
+ (CPU_CLR_S): Likewise.
+ (CPU_ISSET_S): Likewise.
+ (CPU_COUNT_S): Likewise.
+ (CPU_AND_S): Likewise.
+ (CPU_OR_S): Likewise.
+ (CPU_XOR_S): Likewise.
+ (CPU_NAND_S): Likewise.
+ (CPU_EQUAL_S): Likewise.
+ (CPU_ZERO): Use CPU_ZERO_S().
+ (CPU_FILL): Use CPU_FILL_S().
+ (CPU_SET): Use CPU_SET_S().
+ (CPU_CLR): Use CPU_CLR_S().
+ (CPU_ISSET): Use CPU_ISSET_S().
+ (CPU_COUNT): Use CPU_COUNT_S().
+ (CPU_AND): Use CPU_AND_S().
+ (CPU_OR): Use CPU_OR_S().
+ (CPU_XOR): Use CPU_XOR_S().
+ (CPU_NAND): Use CPU_NAND_S().
+ (CPU_EQUAL): Use CPU_EQUAL_S().
+ (CPU_CMP): Delete superfluous const qualifier.
+ (CPU_EMPTY): Likewise.
+
+2013-11-27 Matheus Almeida <Matheus.Almeida@imgtec.com>
+
+ * libc/machine/mips/setjmp.S: Fix definition of macro FPR_LAYOUT
+ for ABI == N32.
+
+2013-11-26 Matheus Almeida <Matheus.Almeida@imgtec.com>
+
+ * libc/include/machine/setjmp.h: Add support for __mips_fpr being
+ 64 and treat it the same as if __mips64 is set.
+ * libc/machine/mips/setjmp.S: Ditto, plus add checks for _MIPS_SIM
+ being _ABIN32 and _ABI64.
+
+2013-11-26 Joel Sherrill <joel.sherrill@oarcorp.com>
+
+ * libc/machine/powerpc/vfscanf.c, libc/stdio/fgetpos.c,
+ libc/stdio/fgets.c, libc/stdio/fputs.c, libc/stdio/fread.c,
+ libc/stdio/freopen.c, libc/stdio/fwrite.c, libc/stdio/sscanf.c,
+ libc/stdlib/mbstowcs.c, libc/stdlib/mbtowc.c,
+ libc/stdlib/strtod.c, libc/stdlib/strtol.c, libc/stdlib/strtoll.c,
+ libc/stdlib/strtoul.c, libc/stdlib/strtoull.c,
+ libc/stdlib/wcstombs.c: Fix documentation prototypes which were
+ over eighty columns.
+
+2013-11-26 Julio Gutierrez <jgutleyva@gmail.com>
+
+ *libc/include/wchar.h: Add restrict keyword.
+ *libc/stdio/fgetws.c (fgetws): ditto.
+ *libc/stdio/fputws.c (fputws): ditto.
+ *libc/stdio/fwprintf.c (fwprintf): ditto.
+ *libc/stdio/fwscanf.c (fwscanf): ditto.
+ *libc/stdio/swprintf.c (swprintf): ditto.
+ *libc/stdio/swscanf.c (swscanf): ditto.
+ *libc/stdio/vfwprintf.c (vfwprintf): ditto.
+ *libc/stdio/vfwscanf.c (vfwscanf): ditto.
+ *libc/stdio/vswprintf.c (vswprintf): ditto.
+ *libc/stdio/vswscanf.c (vswscanf): ditto.
+ *libc/stdio/vwprintf.c (vwprintf): ditto.
+ *libc/stdio/vwscanf.c (vwscanf): ditto.
+ *libc/stdio/wprintf.c (wprintf): ditto.
+ *libc/stdio/wscanf.c (wscanf): ditto.
+ *libc/stdlib/mbrlen.c (mbrlen): ditto.
+ *libc/stdlib/mbrtowc.c (mbrtowc): ditto.
+ *libc/stdlib/mbsnrtowcs.c (mbsnrtowcs): ditto.
+ *libc/stdlib/mbsrtowcs.c (mbsrtowcs): ditto.
+ *libc/stdlib/wcrtomb.c (wcrtomb): ditto.
+ *libc/stdlib/wcsnrtombs.c (wcsnrtombs): ditto.
+ *libc/stdlib/wcsrtombs.c (wcsrtombs): ditto.
+ *libc/stdlib/wcstod.c (wcstod): ditto.
+ *libc/stdlib/wcstol.c (wcstol): ditto.
+ *libc/stdlib/wcstold.c (wcstold): ditto.
+ *libc/stdlib/wcstoll.c (wcstoll): ditto.
+ *libc/stdlib/wcstoul.c (wcstoul): ditto.
+ *libc/stdlib/wcstoull.c (cstoull): ditto.
+ *libc/string/wcpcpy.c (wcpcpy): ditto.
+ *libc/string/wcpncpy.c (wcpncpy): ditto.
+ *libc/string/wcscat.c (wcscat): ditto.
+ *libc/string/wcscpy.c (wcscpy): ditto.
+ *libc/string/wcsncat.c (wcsncat): ditto.
+ *libc/string/wcsncpy.c (wcsncpy): ditto.
+ *libc/string/wcsstr.c (wcsstr): ditto.
+ *libc/string/wcstok.c (wcstok): ditto.
+ *libc/string/wcsxfrm.c (wcsxfrm): ditto.
+ *libc/string/wmemcpy.c (wmemcpy): ditto.
+
+2013-11-26 Corinna Vinschen <vinschen@redhat.com>
+
+ * libc/posix/posix_spawn.c: Drop using namespace.h.
+
+2013-11-26 Corinna Vinschen <vinschen@redhat.com>
+
+ * libc/posix/posix_spawn.c: Eliminate OS function calls not present
+ in newlib or Cygwin.
+ (process_spawnattr): Use sigprocmask rather than _sigprocmask. Use
+ sigaction rather than _sigaction.
+ (process_file_actions_entry): Use dup2 rather than _dup2.
+ (do_posix_spawn): Use execvpe rather than _execvpe. Use waitpid
+ rather than _waitpid.
+
+2013-11-25 Joel Sherrill <joel.sherrill@oarcorp.com>
+
+ * libc/iconv/lib/iconv.c, libc/time/strftime.c: Change "restrict<" to
+ "restrict <" to fix formatting.
+
+2013-11-25 Corinna Vinschen <vinschen@redhat.com>
+
+ * libc/include/spawn.h (posix_spawn_file_actions_destroy): Fix typo
+ in function name.
+ * libc/posix/posix_spawn.c (posix_spawn_file_actions_destroy): Ditto.
+
+2013-11-25 Sahil Patnayakuni <sahil.patnayakuni@gmail.com>
+
+ * libc/include/time.h (time): Add restrict keyword.
+ * libc/include/wchar.h (wcsftime): Add restrict keyword.
+ * libc/time/asctime_r.c (asctime_r): Same.
+ * libc/time/gmtime_r.c (gmtime_r): Same.
+ * libc/time/lcltime_r.c (lcltime_r): Same.
+ * libc/time/strftime.c (strftime): Same.
+ * libc/time/strptime.c (strptime): Same.
+ * libc/sys/linux/linuxthreads/timer_create.c (timer_create): Same.
+ * libc/sys/linux/linuxthreads/timer_settime.c (timer_settime): Same.
+2013-11-23 Bryan Dunsmore <dunsmoreb@gmail.com>
+
+ * libc/include/wordexp.h (wordexp): Add restrict keyword.
+ * libc/posix/wordexp.c (wordexp): Ditto.
+
+2013-11-22 Bryan Dunsmore <dunsmoreb@gmail.com>
+
+ * libc/include/sys/time.h (gettimeofday): Add restrict keyword.
+ (setitimer): Likewise.
+ * libc/sys/rdos/gettod.c (gettimeofday): Likewise.
+ * libc/sys/rtems/crt0.c (gettimeofday): Likewise.
+
+2013-11-22 Chirayu Desai <chirayudesai1@gmail.com>
+
+ * libc/include/sys/unistd.h (readlink): Add restrict keyword.
+ (readlinkat): Ditto.
+ (swab): Ditto.
+ * libc/sys/rdos/readlink.c (readlink): Ditto.
+ * libc/string/swab.c (swab): Ditto.
+
+2013-11-21 Daniel Ramirez <javamonn@gmail.com>
+
+ * libc/sys/linux/statvfs.c (statvfs): Added restrict keyword.
+
+2013-11-21 Joel Sherrill <joel.sherrill@oarcorp.com>
+
+ * libc/sys/rdos/chown.c, libc/sys/rdos/close.c, libc/sys/rdos/execve.c,
+ libc/sys/rdos/fork.c, libc/sys/rdos/fstat.c, libc/sys/rdos/getpid.c,
+ libc/sys/rdos/gettod.c, libc/sys/rdos/isatty.c, libc/sys/rdos/kill.c,
+ libc/sys/rdos/link.c, libc/sys/rdos/lseek.c, libc/sys/rdos/open.c,
+ libc/sys/rdos/rdos.h, libc/sys/rdos/read.c, libc/sys/rdos/readlink.c,
+ libc/sys/rdos/sbrk.c, libc/sys/rdos/stat.c, libc/sys/rdos/symlink.c,
+ libc/sys/rdos/times.c, libc/sys/rdos/unlink.c, libc/sys/rdos/wait.c,
+ libc/sys/rdos/write.c: Convert from DOS to UNIX CRLF.
+
+2013-11-21 Julio Gutierrez <jgutleyva@gmail.com>
+
+ * libc/include/glob.h (glob): Add restrict keyword.
+ * libc/posix/glob.c (glob): Ditto.
+
+2013-11-21 Joel Sherrill <joel.sherrill@oarcorp.com>
+
+ * libc/posix/readdir_r.c: Add restrict keyword.
+ * libc/machine/spu/sys/dirent.h, libc/sys/decstation/sys/dirent.h,
+ libc/sys/linux/sys/dirent.h, libc/sys/rtems/sys/dirent.h,
+ libc/sys/sparc64/sys/dirent.h, libc/sys/sun4/sys/dirent.h,
+ libc/sys/sysvi386/sys/dirent.h: Add readdir_r() prototype.
+
+2013-11-21 Joel Sherrill <joel.sherrill@oarcorp.com>
+
+ * libc/sys/rdos/stat.c: Remove stray +.
+
+2013-11-21 Daniel Ramirez <javamonn@gmail.com>
+
+ * libc/include/sys/stat.h, libc/sys/linux/sys/stat.h,
+ libc/sys/m88kbug/syscalls.c, libc/sys/rdos/stat.c,
+ libc/sys/sparc64/sys/stat.h: Add restrict keyword.
+
+2013-11-20 Daniel Ramirez <javamonn@gmail.com>
+
+ * libc/include/search.h, libc/search/tdelete.c: Add restrict keyword.
+
+2013-11-20 Chirayu Desai <chirayudesai1@gmail.com>
+
+ * libc/include/regex.h, libc/posix/regcomp.c,
+ libc/posix/regerror.c, libc/posix/regex.3
+ libc/posix/regexec.c: Add restrict keyword.
+
+2013-11-20 Daniel Ramirez <javamonn@gmail.com>
+
+ * libc/iconv/lib/iconv.c, libc/include/iconv.h,
+ libc/sys/linux/iconv/iconv.c: Add restrict keyword.
+
+2013-11-20 Corinna Vinschen <vinschen@redhat.com>
+
+ * libc/include/stdlib.h: Declare realpath only if !__STRICT_ANSI__.
+
+2013-11-19 Jennifer Averett <jennifer.averett@oarcorp.com>
+
+ * libc/sys/rtems/sys/cpuset.h: New file.
+
+2013-11-19 Joel Sherrill <joel.sherrill@oarcorp.com>
+
+ * libc/include/stdlib.h: Add prototype of realpath().
+ * libc/sys/linux/realpath.c: Add restrict keyword.
+
+2013-11-19 Joel Sherrill <joel.sherrill@oarcorp.com>
+
+ * libm/common/modfl.c: Add cast to remove compiler warning.
+
+2013-11-19 Terraneo Federico <fede.tft@hotmail.it>
+
+ * libc/posix/closedir.c: Fix use after free.
+ Remove useless test dd_fd != -1
+ * libc/posix/readdir.c: Remove useless test dd_fd == -1
+ * libc/posix/readdir_r.c: Ditto.
+
+2013-11-18 Sahil Patnayakuni <sahilp@oarcorp.com>
+
+ * libc/include/stdio.h, libc/machine/powerpc/vfscanf.c,
+ libc/machine/spu/fgetpos.c, libc/machine/spu/fgets.c,
+ libc/machine/spu/fopen.c, libc/machine/spu/fputs.c,
+ libc/machine/spu/fread.c, libc/machine/spu/freopen.c,
+ libc/machine/spu/fwrite.c, libc/machine/spu/setbuf.c,
+ libc/machine/spu/vfprintf.c, libc/machine/spu/vfscanf.c,
+ libc/machine/spu/vsnprintf.c, libc/machine/spu/vsprintf.c,
+ libc/machine/spu/vsscanf.c, libc/stdio/asnprintf.c,
+ libc/stdio/asprintf.c, libc/stdio/dprintf.c,
+ libc/stdio/fgetpos.c, libc/stdio/fgets.c,
+ libc/stdio/fmemopen.c, libc/stdio/fopen.c,
+ libc/stdio/fprintf.c, libc/stdio/fputs.c,
+ libc/stdio/fread.c, libc/stdio/freopen.c,
+ libc/stdio/fscanf.c, libc/stdio/fwrite.c,
+ libc/stdio/printf.c, libc/stdio/scanf.c,
+ libc/stdio/setbuf.c, libc/stdio/snprintf.c,
+ libc/stdio/sprintf.c, libc/stdio/sscanf.c,
+ libc/stdio/vdprintf.c, libc/stdio/vprintf.c,
+ libc/stdio/vscanf.c, libc/stdio/vsnprintf.c,
+ libc/stdio/vsprintf.c, libc/stdio/vsscanf.c: Add restrict keyword.
+
+2013-11-18 Sahil Patnayakuni <sahilp@oarcorp.com>
+
+ * libc/include/stdlib.h, libc/stdlib/mbstowcs.c,
+ libc/stdlib/mbstowcs_r.c, libc/stdlib/mbtowc.c,
+ libc/stdlib/mbtowc_r.c, libc/stdlib/strtod.c,
+ libc/stdlib/strtol.c, libc/stdlib/strtold.c,
+ libc/stdlib/strtoll.c, libc/stdlib/strtoll_r.c,
+ libc/stdlib/strtoul.c, libc/stdlib/strtoull.c,
+ libc/stdlib/strtoull_r.c, libc/stdlib/wcstombs.c,
+ libc/stdlib/wcstombs_r.c: Add restrict keyword.
+
+2013-11-18 Marcus Shawcroft <marcus.shawcroft@arm.com>
+
+ * libc/include/sys/unistd.h (ftruncate, truncate): Define
+ for __arm__.
+
+2013-11-13 Gregory Pietsch <gpietsch@comcast.net>
+
+ * newlib/libc/stdlib/getopt.c (getopt_internal): Add missing braces.
+
+2013-11-13 Freddie Chopin <freddie_chopin@op.pl>
+
+ * newlib/libc/include/getopt.h (struct option): name field should be
+ "const char *".
+ * newlib/libc/stdlib/getopt.c (getopt_internal): Use fputs()/fputc()
+ instead of fprintf() to save code space. Fix signed/unsigned
+ comparison.
+
+2013-11-12 Sebastian Huber <sebastian.huber@embedded-brains.de>
+
+ * libc/libc/stdlib/getopt.c (getopt_internal): Fix NULL pointer access.
+
+2013-11-08 Terry Guo <terry.guo@arm.com>
+
+ * libm/libm.texinfo: Rename node Index to Document Index.
+
+2013-11-08 Corinna Vinschen <vinschen@redhat.com>
+
+ * libc/libc.texinfo: Rename node Library Index to Document Index.
+
+2013-11-04 Terraneo Federico <fede.tft@hotmail.it>
+
+ * libc/stdio/fvwrite.c: Allow writing in larger chunks for fully
+ buffered and unbuffered files, to improve write performance.
+
+2013-10-31 Terraneo Federico <fede.tft@hotmail.it>
+
+ * libc/stdio/fvwrite.h: change type of uio_resid from int to size_t to
+ fix fwrite() of > 2GByte buffers.
+
+2013-10-30 Joey Ye <joey.ye@arm.com>
+
+ Implement malloc_stats for nano.
+ * libc/stdlib/nano-mallocr.c (RONECALL): New parameter macro.
+ (sbrk_start): New variable.
+ (current_mallinfo, free_list): Forward declaration of data.
+ (chunk): Define size as long type.
+ (mallinfo): Synchronize with latest malloc.h.
+ (nano_*): Forward declaration of functions.
+ (get_chunk_from_ptr): Defined to static inline.
+ (nano_mallinfo): Implement this function.
+ (nano_malloc_stats): Implement this function.
+
+2013-10-30 Sebastian Huber <sebastian.huber@embedded-brains.de>
+
+ * libc/include/machine/_default_types.h: Revert change from 2013-10-10.
+
+2013-10-24 Hans-Peter Nilsson <hp@axis.com>
+
+ * libc/include/stdio.h [!__LARGE64_FILES] (funopen): Fix typo
+ in last change.
+
+2013-10-23 Corinna Vinschen <vinschen@redhat.com>
+
+ * libc/include/stdio.h (funopen): Change prototype of
+ __readfn and __writefn parameter to match new definition of
+ FILE's _read and _write methods.
+ (_funopen_r): Ditto.
+ (funopen): Ditto.
+ (_funopen_r): Ditto.
+ * libc/include/sys/config.h (_READ_WRITE_BUFSIZE_TYPE) Define
+ as type int if not already defined. Add comment to explain.
+ * libc/include/sys/reent.h: Include stddef.h.
+ (struct __sFILE): Change type of last parameter in declaration
+ of _read and _write methods to _READ_WRITE_BUFSIZE_TYPE.
+ (struct __sFILE64): Ditto.
+ * libc/stdio/local.h (__sread): Declare with last parameter set
+ to _READ_WRITE_BUFSIZE_TYPE.
+ (__seofread): Ditto.
+ (__swrite): Ditto.
+ (__swrite64): Ditto.
+ * libc/stdio/fvwrite.c (__sfvwrite_r): Change type of local
+ variables w and s to _READ_WRITE_RETURN_TYPE.
+ * libc/stdio/fflush.c (__sflush_r): Change type of local variables
+ n and t to _READ_WRITE_BUFSIZE_TYPE and _READ_WRITE_RETURN_TYPE.
+ Add local variables flags to keep _flags value.
+ * libc/stdio/fmemopen.c (fmemreader): Align to above change.
+ (fmemwriter): Ditto.
+ * libc/stdio/fopencookie.c (fcreader): Ditto.
+ (fcwriter): Ditto.
+ * libc/stdio/funopen.c (funread): Ditto.
+ (funwrite): Ditto.
+ (funreader): Ditto.
+ (funwriter): Ditto.
+ * libc/stdio/open_memstream.c (memwriter): Ditto.
+ * libc/stdio/stdio.c (__sread): Ditto.
+ (__seofread): Ditto.
+ (__swrite): Ditto.
+ * libc/stdio64/stdio64.c (__swrite64): Ditto.
+
+2013-10-18 Joey Ye <joey.ye@arm.com>
+
+ * configure.in (enable-newlib-global-atexit): New option.
+ * configure: Regenerated.
+ * newlib.hin (_REENT_GLOBAL_ATEXIT): Place-holder.
+ * README (enable-newlib-global-atexit): Description for
+ new option.
+
+2013-10-18 Sebastian Huber <sebastian.huber@embedded-brains.de>
+
+ * libc/include/sys/unistd.h (MAXPATHLEN): Delete.
+ * libc/include/sys/param.h (MAXPATHLEN): Define.
+ * libc/sys/rtems/sys/param.h (MAXPATHLEN): Likewise.
+ * libc/unix/getcwd.c: Include <sys/param.h> for MAXPATHLEN.
+
+2013-10-10 Sebastian Huber <sebastian.huber@embedded-brains.de>
+
+ * libc/libc/sys/rtems/sys/param.h: Update some parameters to
+ the latest FreeBSD values.
+
+2013-10-10 Sebastian Huber <sebastian.huber@embedded-brains.de>
+
+ * libc/sys/rtems/machine/_types.h (_HAVE_SYSTYPES): Define.
+
+2013-10-10 Sebastian Huber <sebastian.huber@embedded-brains.de>
+
+ * libc/sys/rtems/include/limits.h (_POSIX_HOST_NAME_MAX):
+ Define.
+
+2013-10-10 Sebastian Huber <sebastian.huber@embedded-brains.de>
+
+ * libc/sys/rtems/machine/_types.h (__dev_t): Define.
+ (__dev_t_defined) Likewise.
+ * libc/include/sys/_types.h (__dev_t): Delete RTEMS specific
+ definition.
+
+2013-10-10 Sebastian Huber <sebastian.huber@embedded-brains.de>
+
+ * libc/sys/rtems/machine/_types.h (_ssize_t): Delete.
+ (__ssize_t_defined) Likewise.
+
+2013-10-30 Sebastian Huber <sebastian.huber@embedded-brains.de>
+
+ * libc/include/machine/_default_types.h: Revert change from 2013-10-10.
+
+2013-10-10 Sebastian Huber <sebastian.huber@embedded-brains.de>
+
+ * libc/include/machine/_default_types.h (__int8_t): Define via
+ <stdint.h> provided type.
+ (__uint8_t): Likewise.
+ (__int8_least_t): Likewise.
+ (__uint8_least_t): Likewise.
+ (__int16_t): Likewise.
+ (__uint16_t): Likewise.
+ (__int16_least_t): Likewise.
+ (__uint16_least_t): Likewise.
+ (__int32_t): Likewise.
+ (__uint32_t): Likewise.
+ (__int32_least_t): Likewise.
+ (__uint32_least_t): Likewise.
+ (__int64_t): Likewise.
+ (__uint64_t): Likewise.
+
+2013-10-10 Sebastian Huber <sebastian.huber@embedded-brains.de>
+
+ * libc/include/paths.h (_PATH_DEVNULL): Define.
+ (_PATH_DEVZERO): Likewise.
+
+2013-10-09 Marcus Shawcroft <marcus.shawcroft@arm.com>
+
+ * testsuite/newlib.wctype/twctype.c (main): Update
+ iswprint(0xce2) test case.
+
+2013-10-03 Steve Ellcey <sellcey@mips.com>
+
+ * libc/machine/mips/memset.c: Remove.
+ * libc/machine/mips/memset.S: New.
+ * libc/machine/mips/Makefile.am: Change memset.c to memset.S
+ * libc/machine/mips/Makefile.in: Regenerate.
+
+2013-10-01 Petr Hosek <phosek@chromium.org>
+
+ * configure.host: Disable new posix_spawn function for all
+ users of posix dir except Cygwin.
+ * libc/posix/Makefile.am: Add support for new posix_spawn function.
+ * libc/posix/Makefile.in: Regenerate.
+ * libc/posix/posix_spawn.c: New file.
+ * libc/include/spawn.h: Ditto.
+
+2013-09-13 Joey Ye <joey.ye@arm.com>
+
+ * libc/stdlib/nano-mallocr.c (nano_allopt): Typo fixed to ...
+ (nano_mallopt): ... this.
+
+2013-09-12 Sebastian Huber <sebastian.huber@embedded-brains.de>
+
+ * libc/include/sys/cdefs.h: Synchronize with latest FreeBSD
+ version.
+ * libc/include/stdatomic.h: Likewise.
+
+2013-09-08 Yaakov Selkowitz <yselkowitz@users.sourceforge.net>
+
+ * libc/include/search.h (__compar_fn_t): Add typedef.
+ (tdelete, tfind, tsearch): Use it.
+ * libc/include/stdlib.h (__compar_fn_t): Add typedef.
+ (bsearch, qsort): Use it.
+
+2013-08-19 Meador Inge <meadori@codesourcery.com>
+
+ * libc/stdlib/__atexit.c (__register_exitproc): NULL-ify
+ _on_exit_args_ptr when creating a new _atexit structure while
+ _REENT_SMALL is defined.
+
+2013-08-12 Bin Cheng <bin.cheng@arm.com>
+
+ * libc/configure.in (--enable-newlib-wchar-orient): Remove.
+ * libc/configure: Regenerated.
+ * libc/stdio/Makefile.am (NEWLIB_WIDE_ORIENT): Remove.
+ * libc/stdio/Makefile.in: Regenerated.
+
+2013-08-12 Yufeng Zhang <Yufeng.Zhang@arm.com>
+
+ * libc/sys/arm/crt0.S: Remove 'start'.
+
+2013-08-08 Freddie Chopin <freddie_chopin@op.pl>
+
+ * libc/string/strncat.c: Fix typo in documentation.
+
+2013-08-01 Corinna Vinschen <vinschen@redhat.com>
+
+ * libc/include/stdio_ext.h (__fbufsize): Define as inline function for
+ gcc, as macro otherwise.
+ (__freading): Ditto.
+ (__fwriting): Ditto.
+ (__freadable): Ditto.
+ (__fwriteable): Ditto.
+ (__flbf): Ditto.
+ (__fpending): Ditto.
+
+2013-07-23 Sahil Patnayakuni <sahilp@rtems.org>
+
+ * libc/sys/linux/include/netdb.h, libc/sys/linux/net/getaddrinfo.c,
+ libc/sys/linux/net/getnameinfo.c: Add restrict keyword to getnameinfo()
+ and getaddrinfo() to increase standards compliance and match glibc.
+
+2013-07-23 Sahil Patnayakuni <sahilp@rtems.org>
+
+ * libc/include/string.h, libc/string/memccpy.c, libc/string/memcpy.c,
+ libc/string/stpcpy.c, libc/string/stpncpy.c, libc/string/strcat.c,
+ libc/string/strncat.c, libc/string/strncpy.c, libc/string/strtok.c,
+ libc/string/strtok_r.c, libc/string/strxfrm.c
+ libc/machine/microblaze/strcpy.c, libc/machine/xscale/memcpy.c,
+ libc/machine/cris/memcpy.c: Add __restrict to prototype to
+ increase standards compliance.
+
+2013-07-18 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
+
+ * libc/sys/arm/syscalls.c (do_AngelSWI): Delete.
+ * libc/sys/arm/libcfuncs.c (do_AngelSWI): Delete.
+ * libc/sys/arm/swi.h: Copy over from libgloss.
+
+2013-07-17 Janis Johnson <janisjo@codesourcery.com>
+
+ * libc/machine/powerpc/configure.in: Remove extra_sources; fix
+ extra_objs for powerpc*-*altivec.
+ * libc/machine/powerpc/Makefile.am: Define EXTRA_lib_a_SOURCES.
+ * libc/machine/powerpc/configure: Regenerated.
+ * libc/machine/powerpc/Makefile.in: Regenerated.
+
+2013-07-16 David Holsgrove <david.holsgrove@xilinx.com>
+
+ * configure.host: Change to microblaze*.
+ * libc/include/machine/ieeefp.h: Add __MICROBLAZEEL__.
+ * libc/machine/microblaze/mb_endian.h: New file.
+ * newlib/libc/machine/microblaze/strcmp.c: Add little endian support.
+ * newlib/libc/machine/microblaze/strcpy.c: Likewise.
+ * newlib/libc/machine/microblaze/strlen.c: Likewise.
+
+2013-07-09 Sabrina Ni <sabrina@andestech.com>
+
+ * libc/machine/nds32/Makefile.am (lib_a_SOURCES): Add abort.c, memcpy.S,
+ memset.S, strcmp.S, and strcpy.S.
+ * libc/machine/nds32/Makefile.in: Regenerated.
+ * libc/machine/nds32/{abort.c, memcpy.S, memset.S, strcmp.S, strcpy.S}:
+ New.
+
+2013-07-09 Sabrina Ni <sabrina@andestech.com>
+
+ * configure.host (machine_dir, syscall_dir, newlib_cflags):
+ Add settings for nds32*.
+ * libc/include/machine/ieeefp.h (IEEE_BIG_ENDIAN, IEEE_LITTLE_ENDIAN):
+ Ditto.
+ * libc/include/machine/setjmp.h (JBLEN): Ditto.
+ * libc/machine/configure.in: Add nds32 subdir.
+ * libc/machine/configure: Regenerated.
+ * libc/machine/nds32/Makefile.am: New.
+ * libc/machine/nds32/Makefile.in: New (autogenerated).
+ * libc/machine/nds32/aclocal.m4: New (autogenerated).
+ * libc/machine/nds32/configure.in: New.
+ * libc/machine/nds32/configure: New (autogenerated).
+ * libc/machine/nds32/setjmp.S: New.
+
+2013-07-09 Sebastian Huber <sebastian.huber@embedded-brains.de>
+
+ * libc/include/sys/config.h (__DYNAMIC_REENT__): Define for RTEMS.
+
+2013-07-09 Bin Cheng <bin.cheng@arm.com>
+
+ * libc/stdio/fwalk.c (_fwalk): Remove redundant test.
+
+2013-07-05 Yaakov Selkowitz <yselkowitz@users.sourceforge.net>
+
+ * libc/include/sys/types.h (u_char): Add redefinition guard.
+ (u_short, u_int, u_long, caddr_t, daddr_t): Ditto.
+
+2013-07-02 Joey Ye <joey.ye@arm.com>
+
+ Lite exit support.
+ * README: Add information about lite-exit.
+ * acconfig.h (_LITE_EXIT): New macro.
+ * configure.in (enable-lite-exit): New option.
+ (_LITE_EXIT): Define new macro.
+ * configure: Regenerated.
+ * newlib.hin (_LITE_EXIT): New macro.
+ * libc/stdlib/__atexit.c [_LITE_EXIT]: Add dummy explicit
+ reference to __call_exitprocs.
+ * libc/stdlib/cxa_atexit.c [_LITE_EXIT]: Make __register_exitproc a
+ weak reference.
+ * libc/stdlib/exit.c (exit)[_LITE_EXIT]: Remove TWS and weakly reference
+ __call_exitprocs.
+
+2013-07-02 Jeff Johnston <jjohnstn@redhat.com>
+
+ * libc/include/sys/reent.h: Fix typo in comment.
+
+2013-07-01 Will Newton <will.newton@linaro.org>
+
+ * libc/machine/arm/memcpy-armv7a.S: Adjust entry to
+ aligned loop to improve misaligned copy performance.
+
+2013-06-26 Jeff Johnston <jjohnstn@redhat.com>
+
+ * libc/include/stdio.h: Specify std streams always in terms
+ of _REENT.
+ * libc/include/wchar.h: Ditto.
+ * libc/include/sys/reent.h: Remove _RENT_ONLY check around
+ setting of _REENT macro.
+
+2013-06-24 Yaakov Selkowitz <yselkowitz@users.sourceforge.net>
+
+ * libc/include/string.h (rawmemchr): Declare.
+ * libc/string/Makefile.am (ELIX_4_SOURCES): Add rawmemchr.c.
+ (CHEWOUT_FILES): Add rawmemchr.def.
+ * libc/string/Makefile.in: Regenerate.
+ * libc/string/rawmemchr.c: New file.
+
+2013-06-24 Terraneo Federico <fede.tft@hotmail.it>
+
+ * libc/reent/reent.c (_reclaim_reent): Free also _misc and
+ _signal_buf.
+
+2013-06-24 Terraneo Federico <fede.tft@hotmail.it>
+
+ * libc/include/sys/reent.h (_ATEXIT_INIT_PTR): Remove.
+ (_REENT_INIT_ATEXIT_PTR): Remove.
+ (_REENT_INIT_PTR): Reduce code size if _REENT_SMALL.
+
+2013-06-21 Will Newton <will.newton@linaro.org>
+
+ * libc/machine/arm/strlen-armv7.S: Import latest strlen
+ code from Linaro cortex-strings.
+
+2013-06-21 Will Newton <will.newton@linaro.org>
+
+ * MAINTAINERS: Add Will Newton to Write After Approval.
+
+2013-06-19 Bin Cheng <bin.cheng@arm.com>
+
+ * acconfig.h (_UNBUF_STREAM_OPT): Undefine.
+ * newlib.hin (_UNBUF_STREAM_OPT): Undefine.
+ * configure.in (--enable-newlib-unbuf-stream-opt): New option.
+ * configure: Regenerate.
+ * libc/stdio/vfprintf.c (_VFPRINTF_R): Don't do optimization on
+ unbuffered stream files.
+ * libc/stdio/vfwprintf.c (_VFWPRINTF_R): Likewise.
+ * README: Add description about the option.
+
+2013-06-19 Terraneo Federico <fede.tft@hotmail.it>
+
+ * libc/posix/readdir_r.c: Fix potential read past dirp->dd_buf.
+
+2013-06-13 Bir Cheng <bin.cheng@arm.com>
+
+ * README: Add description for NEWLIB's feature customizing
+ configuration options.
+
+2013-06-10 Terraneo Federico <fede.tft@hotmail.it>
+
+ * libc/stdlib/gdtoa-gethex.c (__hexdig): Constify.
+ (hexdig_init): Remove.
+ (__hexdig_fun): New function.
+ hexdig_init, added __hexdig_fun
+ (gethex): Call __get_hexdig macro rather than hexdig.
+ * libc/stdlib/gdtoa-hexnan.c (hexnan): Constify fpi argument.
+ Call __get_hexdig macro rather than hexdig.
+ * libc/stdlib/ldtoa.c: Throughout constify functions arguments where
+ required by constifying the following arrays.
+ (ezero): Constify.
+ (eone): Constify.
+ (ermsg): Constify.
+ (etens): Constify.
+ (emtens): Constify.
+ (nan113): Constify.
+ (nan64): Constify.
+ (nan53): Constify.
+ (nan24): Constify.
+ * libc/stdlib/mprec.h (__get_hexdig): Define.
+ (gethex): Constify args in declaration where appropriate.
+ (hexnan): Ditto.
+ (hexdig_init): Remove declaration.
+ (__hexdig_fun): Declare.
+ * libc/stdlib/strtod.c (fpi): Constify.
+ (fpinan): Constify.
+
+2013-06-07 Sebastian Huber <sebastian.huber@embedded-brains.de>
+
+ * libc/include/sys/cdefs.h (__has_extension): New define.
+ (__has_feature): Likewise.
+ (__has_include): Likewise.
+ (__has_builtin): Likewise.
+ * libc/include/stdatomic.h: New.
+
+2013-06-05 Joey Ye <joey.ye@arm.com>
+
+ * libc/machine/arm/strcmp.S: Use local labels.
+
+2013-06-03 Joey Ye <joey.ye@arm.com>
+
+ * libc/machine/arm/Makefile.am (MEMCPY_DEP): New define.
+ ($(lpfx)memcpy.o, $(lpfx)memcpy.obj): Depend on MEMCPY_DEP.
+ * libc/machine/arm/Makefile.in: Regenerated.
+ * newlib/libc/machine/arm/memcpy-stub.c: Exclude armv7-m/armv7e-m.
+ * newlib/libc/machine/arm/memcpy-armv7m.S: New.
+ * newlib/libc/machine/arm/memcpy.S: Replace with wrapper code. Old
+ code moved to ...
+ * newlib/libc/machine/arm/memcpy-armv7a.S: ... here. Remove
+ redundant architecture check.
+
+2013-05-30 Jeff Johnston <jjohnstn@redhat.com>
+
+ * libc/machine/powerpc/times.c: Moved to libgloss/rs6000.
+ * libc/machine/powerpc/Makefile.am: Remove times.c.
+ * libc/machine/powerpc/Makefile.in: Regenerated.
+
+2013-05-29 Joey Ye <joey.ye@arm.com>
+ Bin Cheng <bin.cheng@arm.com>
+
+ * configure.in (--enable-newlib-nano-malloc): New option.
+ * configure: Regenerated.
+ * libc/configure.in (--enable-newlib-nano-malloc): New option.
+ * libc/configure: Regenerated.
+ * libc/stdlib/Makefile.am (NEWLIB_NANO_MALLOC): Use.
+ * libc/stdlib/Makefile.in: Regenerated.
+ * libc/stdlib/nano-mallocr.c: New file, implementing nano
+ version malloc family functions.
+
+2013-05-28 Richard Earnshaw <rearnsha@arm.com>
+
+ * libc/machine/arm/strcpy.S: Explicitly set build attributes when
+ building for thumb1 targets.
+
+2013-05-22 Corinna Vinschen <vinschen@redhat.com>
+
+ * libc/ctype/isalnum.c: Correct domain of definition to SUSv4 wording.
+ * libc/ctype/isalpha.c: Ditto.
+ * libc/ctype/isblank.c: Ditto.
+ * libc/ctype/iscntrl.c: Ditto.
+ * libc/ctype/isdigit.c: Ditto.
+ * libc/ctype/islower.c: Ditto.
+ * libc/ctype/isprint.c: Ditto.
+ * libc/ctype/ispunct.c: Ditto.
+ * libc/ctype/isxdigit.c: Ditto.
+
+2013-05-22 Corinna Vinschen <vinschen@redhat.com>
+
+ * libc/include/sys/cdefs.h (_Static_assert): Accommodate gcc >= 4.6.
+
+2013-05-16 Sebastian Huber <sebastian.huber@embedded-brains.de>
+
+ * libc/reent/reent.c (_wrapup_reent): Remove.
+
+2013-05-13 DJ Delorie <dj@delorie.com>
+ Nick Clifton <nickc@redhat.com>
+
+ * MAINTAINERS (msp430): Add.
+ * configure.host (msp430): Add.
+ * libc/include/machine/ieeefp.h: Add MSP430 support.
+ * libc/include/machine/setjmp.h: Likewise.
+ * libc/include/sys/config.h: Likewise.
+ * libc/machine/configure.in (msp430): Add.
+ * libc/machine/configure: Regenerate.
+ * libc/machine/msp430: New directory.
+
+2013-05-10 Freddie Chopin <freddie_chopin@op.pl>
+
+ * configure.in: Fix help text for disable-newlib-atexit-dynamic-alloc option.
+ * configure: Regenerated.
+
+2013-05-07 Sebastian Huber <sebastian.huber@embedded-brains.de>
+
+ * libc/include/sys/config.h (_REENT_GLOBAL_ATEXIT): Define for
+ RTEMS.
+ * libc/include/sys/reent.h (_reent): Use _REENT_GLOBAL_ATEXIT.
+ (_global_atexit): Declare if _REENT_GLOBAL_ATEXIT is defined.
+ * libc/reent/reent.c (_reclaim_reent): Remove atexit cleanup if
+ _REENT_GLOBAL_ATEXIT is defined.
+ (_wrapup_reent): Remove atexit handling if _REENT_GLOBAL_ATEXIT
+ is defined.
+ * libc/stdlib/__atexit.c (_global_atexit0): Define if
+ _REENT_GLOBAL_ATEXIT is defined.
+ * libc/stdlib/__call_atexit.c (_global_atexit): Define if
+ _REENT_GLOBAL_ATEXIT is defined.
+
+2013-05-07 Sebastian Huber <sebastian.huber@embedded-brains.de>
+
+ * libc/include/sys/reent.h (_ATEXIT_INIT): Define.
+ (_ATEXIT_INIT_PTR): Likewise.
+ (_REENT_INIT_ATEXIT): Likewise.
+ (_REENT_INIT_ATEXIT_PTR): Likewise.
+ (_GLOBAL_ATEXIT): Likewise.
+ * libc/stdlib/__atexit.c (_GLOBAL_ATEXIT0): Define.
+ (__register_exitproc): Use _GLOBAL_ATEXIT and _GLOBAL_ATEXIT0.
+ * libc/stdlib/__call_atexit.c (__call_exitprocs): Likewise.
+
+2013-05-07 Sebastian Huber <sebastian.huber@embedded-brains.de>
+
+ * libc/stdlib/__atexit.c (__atexit_lock): Declare.
+ * libc/stdlib/__call_atexit.c (__atexit_lock): Define.
+
+2013-05-06 Sandra Loosemore <sandra@codesourcery.com>
+
+ * configure.host (machine_dir, sys_dir, syscall_dir, newlib_cflags):
+ Add settings for nios2*.
+ * libc/include/machine/ieeefp.h (IEEE_BIG_ENDIAN, IEEE_LITTLE_ENDIAN):
+ Likewise.
+ * libc/include/machine/setjmp.h (JBLEN, JBTYPE): Likewise.
+ * libc/machine/configure.in: Add nios2 subdir.
+ * libc/machine/configure: Regenerated.
+ * libc/machine/nios2/Makefile.am: New.
+ * libc/machine/nios2/Makefile.in: New (autogenerated).
+ * libc/machine/nios2/aclocal.m4: New (copied from mips version).
+ * libc/machine/nios2/configure.in: New.
+ * libc/machine/nios2/configure: New (autogenerated).
+ * libc/machine/nios2/setjmp.s: New.
+
+2013-04-29 Sebastian Huber <sebastian.huber@embedded-brains.de>
+
+ * libc/stdio/local.h (CHECK_INIT): Evaluate argument only once.
+ (CHECK_STD_INIT): Likewise.
+ * libc/stdio/fgetc.c (fgetc): Use local variable for _REENT.
+ * libc/stdio/fgetwc.c (fwgetc): Likewise.
+ * libc/stdio/fgetws.c (fgetws): Likewise.
+ * libc/stdio/fputc.c (fputc): Likewise.
+ * libc/stdio/fputwc.c (fputwc): Likewise.
+ * libc/stdio/fputws.c (fputws): Likewise.
+ * libc/stdio/getc.c (getc): Likewise.
+ * libc/stdio/getchar.c (_getchar_r): Likewise.
+ * libc/stdio/putc.c (putc): Likewise.
+ * libc/stdio/putchar.c (putchar): Likewise.
+ * libc/stdio/scanf.c (scanf): Likewise.
+ * libc/stdio/setvbuf.c (setvbuf): Likewise.
+ * libc/stdio/ungetwc.c (ungetwc): Likewise.
+ * libc/stdio/vfscanf.c (VFSCANF): Likewise.
+ * libc/stdio/vfwscanf.c (VFWSCANF): Likewise.
+ * libc/stdio/viprintf.c (viprintf): Likewise.
+ * libc/stdio/viscanf.c (viscanf): Likewise.
+ * libc/stdio/vprintf.c (vprintf): Likewise.
+ * libc/stdio/vscanf.c (vscanf): Likewise.
+ * libc/stdio/vwprintf.c (vwprintf): Likewise.
+ * libc/stdio/vwscanf.c (vwscanf): Likewise.
+ * libc/stdio/wscanf.c (wscanf): Likewise.
+ * libc/stdlib/ecvtbuf.c (fcvtbuf): Likewise.
+ (fcvtbuf): Likewise.
+ (ecvtbuf): Likewise.
+ (ecvtbuf): Likewise.
+ * libc/stdlib/mblen.c (mblen): Likewise.
+ * libc/stdlib/mbrlen.c (mbrlen): Likewise.
+ * libc/stdlib/mbrtowc.c (mbrtowc): Likewise.
+ * libc/stdlib/mbtowc.c (mbtowc): Likewise.
+ * libc/stdlib/rand.c (srand): Likewise.
+ (rand): Likewise.
+ * libc/stdlib/wcrtomb.c (wcrtomb): Likewise.
+ * libc/stdlib/wctob.c (wctob): Likewise.
+ * libc/stdlib/wctomb.c (wctomb): Likewise.
+ * libc/string/strtok.c (strtok): Likewise.
+ * libc/time/asctime.c (asctime): Likewise.
+ * libc/time/gmtime.c (gmtime): Likewise.
+ * libc/time/lcltime.c (lcltime): Likewise.
+
+2013-04-29 Sebastian Huber <sebastian.huber@embedded-brains.de>
+
+ * libc/include/sys/reent.h (_REENT_INIT_PTR): Reduce code size.
+
+2013-04-29 Freddie Chopin <freddie_chopin@op.pl>
+
+ * libc/libc.texinfo: Fix @ references and change ifinfo to be
+ ifnottexinfo.
+ * libm/libm.texinfo: Ditto.
+
+2013-04-25 Sebastian Huber <sebastian.huber@embedded-brains.de>
+
+ * libc/stdio/local.h (_STDIO_CLOSE_PER_REENT_STD_STREAMS): New define.
+ * libc/stdio/findfp.c (_STDIO_CLOSE_PER_REENT_STD_STREAMS): Use define.
+
+2013-04-24 Corinna Vinschen <vinschen@redhat.com>
+ Nick Clifton <nickc@redhat.com>
+
+ * libc/stdlib/strtod.c: Manual update to latest algorithm from NetBSD.
+
+2013-04-23 Corinna Vinschen <vinschen@redhat.com>
+
+ Port newlib to x86_64-pc-cygwin.
+ * libc/include/sys/features.h: Redefine compilation environment
+ definitions for Cygwin to cover 64 bit Cygwin.
+ * libc/ctype/ctype_.c (_ctype_): Fix definition for 64 bit Cygwin.
+ * libc/include/machine/setjmp.h: Change definition of _JBLEN to allow
+ different values for 32 bit and 64 bit Cygwin.
+ * libc/include/reent.h (stat64): Define as stat under Cygwin, instead
+ of as __stat64. Undef stat64 if not building Newlib.
+ * libc/include/sys/stat.h (stat64): Define as stat under Cygwin.
+
+2013-04-22 Sebastian Huber <sebastian.huber@embedded-brains.de>
+
+ * libc/include/sys/cdefs.h: Align with latest FreeBSD file header.
+ * libc/include/sys/features.h (__GNUC_PREREQ__): Define.
+
+2013-04-19 Corinna Vinschen <vinschen@redhat.com>
+
+ * newlib/libc/search/hash.c: Revert patch from 2012-08-08.
+
+2013-04-16 Sebastian Huber <sebastian.huber@embedded-brains.de>
+
+ * libc/sys/rtems/sys/queue.h: Delete file.
+ * libc/include/sys/cdefs.h (__containerof): New define.
+ (__DEQUALIFY): Likewise.
+ * libc/include/sys/queue.h (TRACEBUF_INITIALIZER): Likewise.
+ (TRACEBUF): Likewise.
+ (LIST_FOREACH_SAFE): Likewise.
+ (LIST_PREV): Likewise.
+ (LIST_SWAP): Likewise.
+ (QMD_LIST_CHECK_HEAD): Likewise.
+ (QMD_LIST_CHECK_NEXT): Likewise.
+ (QMD_LIST_CHECK_PREV): Likewise.
+ (QMD_SAVELINK): Likewise.
+ (QMD_TAILQ_CHECK_HEAD): Likewise.
+ (QMD_TAILQ_CHECK_NEXT): Likewise.
+ (QMD_TAILQ_CHECK_PREV): Likewise.
+ (QMD_TAILQ_CHECK_TAIL): Likewise.
+ (QMD_TRACE_ELEM): Likewise.
+ (QMD_TRACE_HEAD): Likewise.
+ (SLIST_FOREACH_PREVPTR): Likewise.
+ (SLIST_FOREACH_SAFE): Likewise.
+ (SLIST_REMOVE_AFTER): Likewise.
+ (SLIST_SWAP): Likewise.
+ (STAILQ_FOREACH_SAFE): Likewise.
+ (STAILQ_REMOVE_AFTER): Likewise.
+ (STAILQ_SWAP): Likewise.
+ (TAILQ_FOREACH_REVERSE_SAFE): Likewise.
+ (TAILQ_FOREACH_SAFE): Likewise.
+ (TAILQ_SWAP): Likewise.
+ (TRASHIT): Likewise.
+ (SLIST_REMOVE): Use SLIST_REMOVE_AFTER().
+ (STAILQ_LAST): Use __containerof().
+ (STAILQ_REMOVE): Use STAILQ_REMOVE_AFTER().
+
+2013-04-12 Will Newton <will.newton@linaro.org>
+
+ * libc/machine/arm/memcpy-stub.c: Use generic memcpy if unaligned
+ access is not enabled.
+ * libc/machine/arm/memcpy.S: Faster memcpy implementation for
+ Cortex A15 cores using NEON and VFP if available.
+
+2013-04-12 Bin Cheng <bin.cheng@arm.com>
+
+ * acconfig.h (_WCHAR_ORIENT): Undef
+ * newlib.hin (_WCHAR_ORIENT): Undef
+ * configure.in (--enable-newlib-wchar-orient): New option.
+ * configure: Regenerated.
+ * libc/configure.in (--enable-newlib-wchar-orient): New option.
+ * libc/configure: Regenerated.
+ * libc/stdio/Makefile.am (NEWLIB_WIDE_ORIENT): Use.
+ * libc/stdio/Makefile.in: Regenerated.
+ * libc/stdio/local.h (ORIENT): Use _WCHAR_ORIENT to control
+ the definition. Add alternative definition.
+ * libc/stdio/vfprintf.c (__sfputs_r, __sprint_r): Use _WCHAR_ORIENT
+ to control the wide char output.
+
+2012-04-11 Jon TURNEY <jon.turney@dronecode.org.uk>
+
+ * libc/include/stdlib.h (strtof, strtoll, strtoull, strtold): Also
+ prototype if C++11 or later.
+
+2013-04-10 Bin Cheng <bin.cheng@arm.com>
+
+ * acconfig.h (_FSEEK_OPTIMIZATION): Undef
+ * newlib.hin (_FSEEK_OPTIMIZATION): Undef
+ * configure.in (--disable-newlib-fseek-optimization): New option.
+ * configure: Regenerated.
+ * libc/stdio/fflush.c (__sflush_r): Use _FSEEK_OPTIMIZATION to
+ control fseek optimization.
+ * libc/stdio/fseeko.c (_fseeko_r): Ditto.
+ * libc/stdio/makebuf.c (__smakebuf_r): Ditto.
+ * libc/stdio64/fseeko64.c (_fseeko64_r): Ditto.
+
+2013-04-08 Matthew Gretton-Dann <matthew.gretton-dann@linaro.org>
+
+ * libc/stdio/vfieeefp.h (ldieee): Fix typo.
+
+2013-04-02 Sebastian Huber <sebastian.huber@embedded-brains.de>
+
+ * libc/posix/scandir.c (DIRSIZ): Use offsetof instead of magic
+ number.
+
+2013-03-27 Bin Cheng <bin.cheng@arm.com>
+
+ * acconfig.h (_FVWRITE_IN_STREAMIO): Undefine.
+ * newlib.hin (_FVWRITE_IN_STREAMIO): Undefine.
+ * configure.in (--disable-newlib-fvwrite-in-streamio): New option.
+ * configure: Regenerated.
+ * libc/stdio/fputs.c (_fputs_r): Use _FVWRITE_IN_STREAMIO to
+ control __sfvwrite_r. Add alternative implementation.
+ * libc/stdio/fputws.c (_fputws_r): Ditto.
+ * libc/stdio/fwrite.c (_fwrite_r): Ditto.
+ * libc/stdio/puts.c (_puts_r): Ditto.
+ * libc/stdio/vfprintf.c (__ssputs_r, __sfputs_r): New function.
+ (_VFPRINTF_R): Use _FVWRITE_IN_STREAMIO to control vector buffer.
+ (__SPRINT): Use _FVWRITE_IN_STREAMIO to control macro definition.
+ * libc/stdio/vfwprintf.c (_VFWPRINTF_R): Use _FVWRITE_IN_STREAMIO
+ to control vector buffer.
+
+2013-03-26 Sebastian Huber <sebastian.huber@embedded-brains.de>
+
+ * libc/stdio/local.h (_STDIO_WITH_THREAD_CANCELLATION_SUPPORT):
+ New define.
+ * libc/stdio/fclose.c: Use
+ _STDIO_WITH_THREAD_CANCELLATION_SUPPORT.
+ * libc/stdio/freopen.c: Likewise.
+ * libc/stdio64/freopen64.c: Likewise.
+
+2013-03-15 Sebastian Huber <sebastian.huber@embedded-brains.de>
+
+ * newlib/libc/stdio/findfp.c (glue_with_file): New.
+ (__sfmoreglue): Use glue_with_file to avoid alignment problems.
+
+2013-02-28 Corinna Vinschen <vinschen@redhat.com>
+
+ * libc/include/machine/setjmp.h (sigjmp_buf): Fix definition of
+ sigjmp_buf size if _JBTYPE is defined.
+
+2013-02-26 Corinna Vinschen <vinschen@redhat.com>
+
+ * libc/include/malloc.h (struct mallinfo): Convert type of all members
+ to size_t to match all targets.
+
+2013-02-20 Yaakov Selkowitz <yselkowitz@users.sourceforge.net>
+ Joseph S. Myers <joseph@codesourcery.com>
+
+ * libc/include/sys/_types.h (_ssize_t): Define as signed equivalent of
+ size_t with GCC.
+
+2013-02-19 Steve Ellcey <sellcey@mips.com>
+
+ * libc/machine/mips/memcpy.S: Fix USE_PREFETCH check.
+
+2013-02-01 Nick Clifton <nickc@redhat.com>
+
+ * libc/sys/sysnecv850/crt0.S: Add recognition of the e3v5
+ architecture variant.
+
+2013-01-22 Joel Sherrill <joel.sherrill@oarcorp.com>
+
+ * libc/include/pthread.h: Add PTHREAD_RWLOCK_INITIALIZER.
+ Fix typo on PTHREAD_COJND_INITIALIZER.
+
+2013-01-17 Marcus Shawcroft <marcus.shawcroft@linaro.org>
+
+ * libc/machine/aarch64/strncmp.S: Correct arithmetic for
+ argument N values close to the maximum representable
+ value in an unsigned 64 bit value.
+
+2013-01-17 Marcus Shawcroft <marcus.shawcroft@linaro.org>
+
+ * libc/machine/aarch64/strnlen.S: Correct arithmetic for
+ argument N values close to the maximum representable
+ value in an unsigned 64 bit value.
+
+2013-01-15 Nick Clifton <nickc@redhat.com>
+
+ * libc/sys/sysnecv850/crt0.S (_start): Enable FPU for the
+ V850e2v3.
+
+2013-01-12 Corinna Vinschen <vinschen@redhat.com>
+
+ * libc/include/string.h: Fix preprocessor expressions using
+ _XOPEN_SOURCE.
+
+2013-01-11 Corinna Vinschen <vinschen@redhat.com>
+
+ * libc/stdio/vfwprintf.c (_VFWPRINTF_R): Add code to correctly handle
+ 's' format specifier on not _MB_CAPABLE targets. Fix a formatting
+ glitch in _MB_CAPABLE enabled code. Add a missing 'L' specifier.
+
+2013-01-10 Marcus Shawcroft <marcus.shawcroft@linaro.org>
+
+ * libc/machine/aarch64/Makefile.am (lib_a_SOURCES): Add
+ memcmp-stub.c and memcmp.S
+ * libc/machine/aarch64/Makefile.in: Regenerated.
+ * libc/machine/aarch64/memcmp-stub.c: New file.
+ * libc/machine/aarch64/memcmp.S: New file.
+
+2013-01-10 Marcus Shawcroft <marcus.shawcroft@linaro.org>
+
+ * libc/machine/aarch64/Makefile.am (lib_a_SOURCES): Add
+ strnlen-stub.c and strnlen.S
+ * libc/machine/aarch64/Makefile.in: Regenerated.
+ * libc/machine/aarch64/strnlen-stub.c: New file.
+ * libc/machine/aarch64/strnlen.S: New file.
+
+2013-01-10 Marcus Shawcroft <marcus.shawcroft@linaro.org>
+
+ * libc/machine/aarch64/Makefile.am (lib_a_SOURCES):
+ Add strlen.S and strlen-stub.c.
+ * libc/machine/aarch64/Makefile.in: Regenerated.
+ * libc/machine/aarch64/strlen-stub.c: New file.
+ * libc/machine/aarch64/strlen.S: New file.
+
+2013-01-10 Marcus Shawcroft <marcus.shawcroft@linaro.org>
+
+ * libc/machine/aarch64/Makefile.am (lib_a_SOURCES):
+ Add memmove.S and memmove-stub.c.
+ * libc/machine/aarch64/Makefile.in: Regenerated.
+ * libc/machine/aarch64/memmove-stub.c: New file.
+ * libc/machine/aarch64/memmove.S: New file.
+
+2013-01-10 Marcus Shawcroft <marcus.shawcroft@linaro.org>
+
+ * libc/machine/aarch64/Makefile.am (lib_a_SOURCES): Re-ordered.
+ Add strncmp.S and strncmp-stub.c.
+ * libc/machine/aarch64/Makefile.in: Regenerated.
+ * libc/machine/aarch64/strncmp-stub.c: New file.
+ * libc/machine/aarch64/strncmp.S: New file.
+
+2013-01-10 Marcus Shawcroft <marcus.shawcroft@linaro.org>
+
+ * libc/machine/aarch64/Makefile.am (lib_a_SOURCES): Add
+ memcpy.c memcpy-stub.c memset.S memset-stub.c strcmp.S
+ strcmp-stub.c.
+ * libc/machine/aarch64/Makefile.in: Regenerated.
+ * libc/machine/aarch64/memcpy-stub.c: New file.
+ * libc/machine/aarch64/memcpy.S: New file.
+ * libc/machine/aarch64/memset-stub.c: New file.
+ * libc/machine/aarch64/memset.S: New file.
+ * libc/machine/aarch64/strcmp.S: New file.
+ * libc/machine/aarch64/strcmp-stub.c: New file.
+
+2013-01-08 Jeff Johnston <jjohnstn@redhat.com>
+
+ * MAINTAINERS: Add Richard Earnshaw as Arm co-maintainer
+ and add Richard and Marcus Shawcroft as aarch64 maintainers.
+
+2013-01-07 Steve Ellcey <sellcey@mips.com>
+
+ * libc/machine/mips/memcpy.S (memcpy): Check if _MIPS_SIM is set.
+
+2012-12-20 Jeff Johnston <jjohnstn@redhat.com>
+
+ * NEWS: Update with 2.0.0 info.
+ * README: Ditto.
+ * acinclude.m4: Change version number to 2.0.0.
+ * aclocal.m4: Regenerated.
+ * configure: Ditto.
+ * Makefile.in: Regenerated.
+ * doc/aclocal.m4: Ditto.
+ * doc/configure: Ditto.
+ * libc/*/aclocal.m4: Ditto.
+ * libc/*/configure: Ditto.
+ * libc/libc.texinfo: Ditto.
+ * libm/*/aclocal.m4: Ditto.
+ * libm/*/configure: Ditto.
+ * libm/libm.texinfo: Ditto.
+ * libc/sys/linux/shared.ld: Add VERS_2.0
+
+2012-12-19 Corinna Vinschen <vinschen@redhat.com>
+
+ * libc/stdlib/strtod.c (_strtod_r): Revert change from 2011-05-16.
+
+2012-12-18 Jeff Johnston <jjohnstn@redhat.com>
+
+ * libc/include/math.h: Remove the log2f macro.
+
+2012-12-18 Craig Howland <howland@LGSInnovations.com>
+
+ * libc/include/math.h: Add recognition of values 1 and 2 for
+ FLT_EVAL_METHOD.
+
+2012-12-18 Corinna Vinschen <vinschen@redhat.com>
+
+ * libc/stdio/puts.c (_puts_r): Fix typo in previous patch. Add local
+ variable fp for better readability.
+
+2012-12-17 Jeff Johnston <jjohnstn@redhat.com>
+
+ * libc/stdio/puts.c: Add fp locking and use _stdout_r macro
+ to refer to the stream rather than stdout.
+
+2012-12-14 Yufeng Zhang <yufeng.zhang@arm.com>
+
+ * libc/machine/aarch64/machine/_types.h: New file; define _ssize_t
+ as long.
+
+2012-12-11 Steve Ellcey <sellcey@mips.com>
+
+ * libc/machine/mips/memcpy.c: Remove.
+ * libc/machine/mips/memcpy.S: New.
+ * libc/machine/mips/Makefile.am (lib_a_CCASFLAGS): Add
+ -D_COMPILING_NEWLIB.
+ (lib_a_CFLAGS): Ditto.
+
+2012-12-04 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
+
+ * configure.host: Define libm_machine_dir value for arm.
+ * libm/machine/configure.in: Add arm to libm machines list.
+ * libm/machine/configure: Regenerate.
+ * libm/machine/arm/Makefile.am: New file.
+ * libm/machine/arm/Makefile.in: Generated.
+ * libm/machine/arm/aclocal.m4: Generated.
+ * libm/machine/arm/configure: Generated.
+ * libm/machine/arm/configure.in: New file.
+ * libm/machine/arm/s_ceil.c: Likewise.
+ * libm/machine/arm/s_floor.c: Likewise.
+ * libm/machine/arm/s_nearbyint.c: Likewise.
+ * libm/machine/arm/s_rint.c: Likewise.
+ * libm/machine/arm/s_round.c: Likewise.
+ * libm/machine/arm/s_trunc.c: Likewise.
+ * libm/machine/arm/sf_ceil.c: Likewise.
+ * libm/machine/arm/sf_floor.c: Likewise.
+ * libm/machine/arm/sf_nearbyint.c: Likewise.
+ * libm/machine/arm/sf_rint.c: Likewise.
+ * libm/machine/arm/sf_round.c: Likewise.
+ * libm/machine/arm/sf_trunc.c: Likewise.
+
+2012-11-30 Greta Yorsh <Greta.Yorsh@arm.com>
+
+ * libc/machine/arm/strcmp.S (compute_return_value): Fix return value.
+ * testsuite/newlib.string/strcmp-1.c (main): Add new test cases.
+
+2012-11-29 Sebastian Huber <sebastian.huber@embedded-brains.de>
+
+ * libc/include/sys/reent.h (__sFILE): Change type of _offset
+ from int to _off_t.
+ * libc/stdio/ftell.c: Use _ftello_r().
+ * libc/stdio/ftello.c: Copy implementation from previous
+ _ftell_r().
+ * libc/stdio/fseek.c: Use _fseeko_r().
+ * libc/stdio/fseeko.c: Copy implementation from previous
+ _fseek_r().
+
+2012-11-26 Sebastian Huber <sebastian.huber@embedded-brains.de>
+
+ * libc/include/inttypes.h: Add and use __INTTYPES_EXP().
+
+2012-11-23 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
+
+ * libm/machine/aarch64/configure.in: Change comment to say libm
+ instead of libc.
+
+2012-11-12 Steve Ellcey <sellcey@mips.com>
+
+ * libc/machine/mips/machine/asm.h: New.
+ * libc/machine/mips/machine/regdef.h: Update register definitions
+ for different ABI's.
+
+2012-11-11 Christopher Faylor <me.cygwin2012@cgf.cx>
+
+ * libc/include/sys/time.h: Avoid guarding other than timeval
+ declaration with _TIMEVAL_DEFINED. Move timeval related macros under
+ _TIMEVAL_DEFINED control.
+
+2012-11-01 Corinna Vinschen <vinschen@redhat.com>
+
+ * libc/include/locale.h (NULL): Fetch definition via stddef.h.
+ * libc/include/stdio.h (NULL): Ditto.
+ * libc/include/stdlib.h (NULL): Ditto.
+ * libc/include/string.h (NULL): Ditto.
+ * libc/include/wchar.h (NULL): Ditto.
+ * libc/include/rpc/types.h (NULL): Ditto.
+ * libc/include/time.h (NULL): Ditto. Include stddef.h earlier.
+
+2012-10-27 Anthony Green <green@moxielogic.com>
+
+ * libc/machine/moxie/setjmp.S (setjmp): Minor optimization.
+
+2012-10-26 Corinna Vinschen <vinschen@redhat.com>
+
+ * libc/include/sys/signal.h (sigset_t): Don't define when building
+ for Cygwin.
+
+2012-10-24 Jeff Johnston <jjohnstn@redhat.com>
+
+ * configure.in: Comment out the --enable-newlib-fp-hw option
+ as the mathfp library is inaccurate and should not be used.
+ * Makefile.am: Add comment regarding the mathfp directory.
+ * configure: Regenerated.
+ * Makefile.in: Ditto.
+ * libm/mathfp/README: New file that details why the mathfp
+ directory is not used.
+
+2012-10-22 Jon TURNEY <jon.turney@dronecode.org.uk>
+
+ * libc/include/string.h (strdup, strndup): Declare if not
+ __STRICT_ANSI__ or _XOPEN_SOURCE is defined appropriately.
+
+2012-10-22 Jon TURNEY <jon.turney@dronecode.org.uk>
+
+ * libc/include/stdlib.h (strtof, strtoll, strtoull, strtold):Prototype
+ if not __STRICT_ANSI__ or stdc version C99 or greater.
+
+2012-10-21 Hans-Peter Nilsson <hp@bitrange.com>
+
+ * libc/sys/mmixware/sbrk.c (_sbrk): Drop unused extern declaration
+ of "end". Mark allocated memory by applying PRELD.
+
+2012-10-16 Gregory Pietsch <gpietsch@comcast.net>
+
+ * libc/stdlib/getopt.c (getopt_internal): Align handling of colon to
+ SUSv4 requirements.
+ (__getopt_long_r): Fix formatting.
+
+2012-10-16 Corinna Vinschen <vinschen@redhat.com>
+
+ * libc/stdio/vfprintf.c (__sbprintf): Fix comment.
+
+2012-10-16 Aurelien Jacobs <aurel@gnuage.org>
+
+ * libc/include/assert.h (static_assert): Define.
+
+2012-10-16 Corinna Vinschen <vinschen@redhat.com>
+
+ * libc/include/sys/features.h (__GNUC_PREREQ): Define. Use
+ throughout in place of explicit GNUC version checks.
+ * libc/include/_ansi.h (_NOINLINE): Define.
+ (_NOINLINE_STATIC): Define.
+ * libc/stdio/vfprintf.c (__sbprintf): Define _NOINLINE_STATIC.
+
+2012-10-09 Peter Rosin <peda@lysator.liu.se>
+
+ * libc/posix/wordfree.c (wordfree): The wrong words are freed
+ when WRDE_DOOFFS is in use. Restructure the code so that the memory
+ needed to be freed is instead kept in an internal linked list...
+ * libc/posix/wordexp2.h: ...as defined here...
+ * libc/posix/wordexp.c (wordexp): ...and build this internal
+ linked list here, avoiding wasteful strdup calls in the process.
+
+2012-10-09 Peter Rosin <peda@lysator.liu.se>
+
+ * libc/posix/wordexp.c (wordexp): Return WRDE_NOSPACE on resource
+ allocation failure. Cleanup leftover resources when failing.
+
+2012-10-09 Peter Rosin <peda@lysator.liu.se>
+
+ * libc/posix/wordexp.c (wordexp): Handle expanded words longer
+ than 500 bytes.
+
+2012-10-09 Peter Rosin <peda@lysator.liu.se>
+
+ * libc/posix/wordexp.c (wordexp): Don't leak file streams.
+
+2012-10-03 DJ Delorie <dj@redhat.com>
+
+ * libc/machine/rl78/setjmp.S: Convert from CPP macros to GAS
+ macros, to avoid dependence on the line separation character.
+
+2012-10-01 DJ Delorie <dj@redhat.com>
+
+ * libc/sys/sysnecv850/sbrk.c (_sbrk): Change heap_start to be an
+ array of undefined size, to avoid problems when compiled with
+ -msda=4.
+
+2012-10-01 Jeff Johnston <jjohnstn@redhat.com>
+
+ * README: replace sources.redhat.com with sourceware.org.
+ * HOWTO: Ditto.
+
+2012-09-26 Ian Bolton <ian.bolton@arm.com>
+ Jim MacArthur <jim.macarthur@arm.com>
+ Marcus Shawcroft <marcus.shawcroft@arm.com>
+ Nigel Stephens <nigel.stephens@arm.com>
+ Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
+ Richard Earnshaw <rearnsha@arm.com>
+ Sofiane Naci <sofiane.naci@arm.com>
+ Tejas Belagod <tejas.belagod@arm.com>
+ Yufeng Zhang <yufeng.zhang@arm.com>
+
+ * configure.host: Add AArch64.
+ * libc/include/machine/ieeefp.h: Add AArch64.
+ * libc/include/machine/setjmp.h: Add AArch64.
+ * libc/include/machine/time.h: Add AArch64.
+ * libc/include/sys/config.h: Add AArch64.
+ * libc/machine/aarch64/Makefile.am: New file.
+ * libc/machine/aarch64/Makefile.in: Generated.
+ * libc/machine/aarch64/aclocal.m4: Generated.
+ * libc/machine/aarch64/configure: Generated.
+ * libc/machine/aarch64/configure.in: New file.
+ * libc/machine/aarch64/setjmp.S: New file.
+ * libc/machine/configure.in: Add AArch64.
+ * libc/machine/configure: Re-generated.
+ * libm/machine/aarch64/Makefile.am: New file.
+ * libm/machine/aarch64/Makefile.in: Generated.
+ * libm/machine/aarch64/aclocal.m4: Generated.
+ * libm/machine/aarch64/configure: Generated.
+ * libm/machine/aarch64/configure.in: New file.
+ * libm/machine/aarch64/s_ceil.c: New file.
+ * libm/machine/aarch64/s_floor.c: New file.
+ * libm/machine/aarch64/s_fma.c: New file.
+ * libm/machine/aarch64/s_fmax.c: New file.
+ * libm/machine/aarch64/s_fmin.c: New file.
+ * libm/machine/aarch64/s_llrint.c: New file.
+ * libm/machine/aarch64/s_llround.c: New file.
+ * libm/machine/aarch64/s_lrint.c: New file.
+ * libm/machine/aarch64/s_lround.c: New file.
+ * libm/machine/aarch64/s_nearbyint.c: New file.
+ * libm/machine/aarch64/s_rint.c: New file.
+ * libm/machine/aarch64/s_round.c: New file.
+ * libm/machine/aarch64/s_trunc.c: New file.
+ * libm/machine/aarch64/sf_ceil.c: New file.
+ * libm/machine/aarch64/sf_floor.c: New file.
+ * libm/machine/aarch64/sf_fma.c: New file.
+ * libm/machine/aarch64/sf_fmax.c: New file.
+ * libm/machine/aarch64/sf_fmin.c: New file.
+ * libm/machine/aarch64/sf_llrint.c: New file.
+ * libm/machine/aarch64/sf_llround.c: New file.
+ * libm/machine/aarch64/sf_lrint.c: New file.
+ * libm/machine/aarch64/sf_lround.c: New file.
+ * libm/machine/aarch64/sf_nearbyint.c: New file.
+ * libm/machine/aarch64/sf_rint.c: New file.
+ * libm/machine/aarch64/sf_round.c: New file.
+ * libm/machine/aarch64/sf_trunc.c: New file.
+ * libm/machine/configure.in: Add AArch64.
+ * libm/machine/configure: Re-generated.
+
+2012-09-26 Michael Hope <michael.hope@linaro.org>
+
+ * doc/makedoc.c (dup_): Rename to avoid colliding with dup(2).
+
+2012-09-13 Anthony Green <green@moxielogic.com>
+
+ * libc/include/machine/ieeefp.h (__IEEE_BIG_ENDIAN): Add bi-endian
+ support for moxie.
+
+2012-08-23 Christopher Faylor <me.cygwin2012@cgf.cx>
+
+ * libc/stdio/flags.c (__sflags): Guard against using O_BINARY on
+ systems which do not provide it.
+
+2012-08-21 Christopher Faylor <me.cygwin2012@cgf.cx>
+
+ * libc/stdio/flags.c (__sflags): Rewrite recognition of extended mode
+ flags to just loop over more allowed flags. Support glibc 'e' flag on
+ systems defining _GLIBC_EXTENSION. Support C11 'x' flag.
+
+2012-08-10 Corinna Vinschen <vinschen@redhat.com>
+
+ * libc/stdlib/btowc.c (btowc): Cast to avoid compiler warning.
+ * libc/search/hash_buf.c (__get_buf): Initialize local vars to avoid
+ compiler warning.
+ * libc/stdio/fgets.c (_fgets_r): Ditto.
+ * libc/time/strftime.c (strftime): Ditto.
+
+2012-08-10 Corinna Vinschen <vinschen@redhat.com>
+
+ * libc/stdio/vfwprintf.c (_VFWPRINTF_R): Fix guard around state to
+ allow usage in !FLOATING_POINT && _WANT_IO_C99_FORMATS case.
+
+2012-08-08 Eric Blake <eblake@redhat.com>
+
+ * libc/posix/engine.c(dissect): Guard diagnostic pragma for right
+ versions of GCC only.
+ * libc/string/strcasestr.c: Ditto.
+
+2012-08-08 Corinna Vinschen <vinschen@redhat.com>
+
+ Throughout, run newlib with -Wall -Werror option and fix bugs and
+ compiler warnings found this way.
+
+ * libc/stdio/freopen.c (_freopen_r): Fix bug setting _flags.
+
+ * libc/include/stdio.h (_rename): Define when building newlib.
+ * libc/include/sys/signal.h (_kill): Ditto.
+ * libc/include/sys/stat.h (_mkdir): Ditto.
+ * libc/include/sys/time.h (_gettimeofday): Ditto.
+ * libc/include/sys/times.h (_times): Ditto.
+ * libc/include/sys/wait.h (_wait): Ditto.
+ * libc/locale/lmessages.c (empty): Don't define for Cygwin.
+ * libc/locale/lmonetary.c (cnv): Ditto.
+ * libc/locale/nl_langinfo.c (nl_langinfo): Ditto for variable s.
+ * libc/posix/collate.c: Throughout cast to avoid compiler warning.
+ * libc/posix/engine.c (matcher): Initialize dp to avoid compiler
+ warning.
+ (dissect): Deliberately silence gcc compiler warning. Add comment to
+ explain why.
+ * libc/posix/glob.c: Disable on Cygwin. Explain why.
+ * libc/posix/regcomp.c: Fix "uninitialized" compiler warnings.
+ * libc/posix/wordexp.c (wordexp): Remove num_bytes variable since result
+ is never used.
+ * libc/posix/popen.c (popen): Ditto for variable last.
+ * libc/reent/mkdirr.c: Include sys/stat.h.
+ * libc/reent/renamer.c: Include stdio.h.
+ * libc/search/hash.c: Throughout use underscored variants of the stat
+ function family.
+ (init_hash): Add missing definition for the __USE_INTERNAL_STAT64 case.
+ * libc/search/hash_bigkey.c (__big_insert): Add parenthesis to avoid
+ compiler warning.
+ * libc/search/hash_page.c (overflow_page): Initalize freep to NULL to
+ avoid compiler warning.
+ * libc/stdio/asiprintf.c (_asiprintf_r): Cast unsigned char * to char *
+ to avoid compiler warning.
+ (asiprintf): Ditto.
+ * libc/stdio/asprintf.c (_asprintf_r): Ditto.
+ (asprintf): Ditto.
+ * libc/stdio/vasiprintf.c (_vasiprintf_r): Ditto.
+ * libc/stdio/vasprintf.c (_vasprintf_r): Ditto.
+ * libc/stdio/mktemp.c (_gettemp): Cast to unsigned char in call to
+ isdigit to avoid compiler warning.
+ * libc/stdio/vfprintf.c (_VFPRINTF_R): Initialize variables used for
+ grouping to avoid compiler warning. Only define and set nseps and
+ nrepeats if they are really used.
+ * libc/stdio/vfwprintf.c (_VFWPRINTF_R): Ditto. Only define state if
+ it is really used.
+ * libc/stdio/vfscanf.c (u_char): Revert to be defined as unsigned char.
+ (__SVFSCANF_R): Cast fmt in call to __mbtowc.
+ * libc/stdlib/mbtowc_r.c (JIS_state_table): Disable when building
+ Cygwin.
+ (JIS_action_table): Ditto.
+ * libc/stdlib/wctomb_r.c (__utf8_wctomb): Add parenthesis to avoid
+ compiler warning.
+ * libc/string/strcasestr.c: Deliberately silence gcc compiler warning.
+ Add comment to explain why.
+ * libc/time/strptime.c (strptime): Cast to unsigned char in calls to
+ isspace to avoid compiler warning.
+ * libm/math/e_atan2.c (__ieee754_atan2): Add parenthesis to avoid
+ compiler warning.
+ * libm/math/e_exp.c (__ieee754_exp): Initialize k to 0 to avoid
+ compiler warning. Drop setting it to 0 later.
+ * libm/math/ef_exp.c (__ieee754_expf): Ditto.
+ * libm/math/e_pow.c (__ieee754_pow): Add braces to avoid compiler
+ warning.
+ * libm/math/ef_pow.c (__ieee754_powf): Ditto.
+ * libm/math/er_lgamma.c (__ieee754_lgamma_r): Initialize nadj to 0 to
+ avoid compiler warning.
+ * libm/math/erf_lgamma.c (__ieee754_lgammaf_r): Ditto.
+ * libm/math/e_rem_pio2.c (__ieee754_rem_pio2): Ditto for variable z.
+ * libm/common/sf_round.c (roundf): Remove signbit variable since result
+ is never used.
+
+2012-08-07 Corinna Vinschen <vinschen@redhat.com>
+
+ * libc/stdlib/mprec.h (Storeinc): Add parenthesis to avoid compiler
+ warning.
+
+2012-07-30 Kevin Buettner <kevinb@redhat.com>
+
+ * libc/sys/sysnecv850/crt0.S (_start): Use v850e-specific
+ start up code for v850e2 and v850e2v3 too.
+
+2012-07-20 Eric Blake <eblake@redhat.com>
+
+ * libc/posix/readdir.c (readdir): Drop bogus attempt to catch
+ bogus pointers.
+
+2012-07-18 Ralf Corsépius <ralf.corsepius@rtems.org>
+
+ * libc/sys/rtems/machine/_types.h (_ssize_t): Use signed int for
+ __v850__, __851__.
+
+2012-07-17 Ralf Corsépius <ralf.corsepius@rtems.org>
+
+ * libc/search/hcreate_r.c (hdestroy_r): #ifdef 0 unused vars ie, idx.
+
+2012-07-16 Ralf Corsépius <ralf.corsepius@rtems.org>
+
+ * libc/posix/telldir.c: Conditionally build dd_hash_lock.
+
+2012-07-13 Ralf Corsépius <ralf.corsepius@rtems.org>
+
+ * libc/sys/rtems/machine/_types.h (_ssize_t): Add __ARM_EABI__,
+ __v850__, __851__.
+
+2012-07-09 Corinna Vinschen <vinschen@redhat.com>
+
+ * libc/stdio/fileno.c (fileno): Check if f is a valid stream. If not,
+ return -1 and set errno to EBADF per POSIX.
+
+2012-07-06 Corinna Vinschen <vinschen@redhat.com>
+
+ Allow building of Cygwin using Mingw64 SDK headers:
+ * libc/include/sys/time.h: Drop _WINSOCK_H guard. Just use
+ _TIMEVAL_DEFINED instead.
+ * libc/include/sys/types.h: Check for _WINSOCKAPI_ along with
+ _WINSOCK_H.
+ * libc/include/sys/unistd.h: Ditto.
+
+2012-06-28 Matthew Gretton-Dann <matthew.gretton-dann@arm.com>
+
+ * doc/Makefile.am (makedoc): Use LDFLAGS_FOR_BUILD not LDFLAGS.
+ * doc/Makefile.in: Regenerate.
+
+2012-06-26 Christopher Faylor <me.newlib2012@cgf.cx>
+
+ * libc/include/sys/types.h: Don't use the same preprocessor guard for
+ time_t, timespec, and itimerspec. Add a separate guard specifically
+ for timespec and always unconditionally define itimerspec.
+
+2012-06-05 Corinna Vinschen <vinschen@redhat.com>
+
+ * libc/stdio/findfp.c (__sinit): Avoid infinite recursion on
+ _REENT_SMALL targets. Add comment to explain.
+
+2012-05-31 Corinna Vinschen <vinschen@redhat.com>
+
+ * libc/stdio/local.h (_newlib_sfp_lock_exit): Fix typo in non-pthread
+ version.
+
+2012-05-30 Corinna Vinschen <vinschen@redhat.com>
+
+ * libc/stdio/fgetws.c (_fgetws_r): Call _mbsnrtowcs_r rather than
+ _mbsrtowcs_r and restrict number of wide chars to n - 1.
+
+2012-05-30 Corinna Vinschen <vinschen@redhat.com>
+
+ * libc/stdio/local.h (_newlib_flockfile_start): New macro to
+ secure stream related critical section against thread cancellation.
+ (_newlib_flockfile_exit): Ditto.
+ (_newlib_sfp_lock_end): Ditto.
+ (_newlib_sfp_lock_start): Ditto for the list of streams.
+ (_newlib_sfp_lock_exit): Ditto.
+ (_newlib_sfp_lock_end): Ditto.
+ Use aforementioned macros in place of _flockfile/_funlockfile
+ and __sfp_lock_acquire/__sfp_lock_release throughout the code.
+ * libc/stdio/fclose.c: Explicitely disable and re-enable thread
+ cancellation. Explain why.
+ * libc/stdio/freopen.c: Ditto.
+ * libc/stdio64/freopen64.c: Ditto.
+
+2012-05-21 Sandeep Kumar Singh <Sandeep.Singh2@kpitcummins.com>
+
+ * libc/machine/cr16/sys/asm.h: Added some missing instructions
+ and removed few unsupported instructions of cr16 target.
+
+2012-05-10 Yaakov Selkowitz <yselkowitz@users.sourceforge.net>
+
+ * libc/include/string.h (memrchr): Declare.
+ * libc/string/Makefile.am (ELIX_4_SOURCES): Add memrchr.c.
+ (CHEWOUT_FILES): Add memrchr.def.
+ * libc/string/Makefile.in: Regenerate.
+ * libc/string/memrchr.c: New file.
+
+2012-05-10 Joel Sherrill <joel.sherrill@oarcorp.com>
+
+ * libc/sys/rtems/machine/_types.h: Add Microblaze.
+
+2012-05-09 Joel Sherrill <joel.sherrill@oarcorp.com>
+
+ * libc/sys/rtems/crt0.c: Add stubs for access(), ftruncate(),
+ _getpid_r(), geteuid(), getgid, _getgid_r, getpid(), getppid(),
+ and _getpid_r().
+
+2012-05-03 Greta Yorsh <Greta.Yorsh@arm.com>
+
+ * testsuite/newlib.string/strcmp-1.c (LONG_TEST): New macro.
+ (MAX_BLOCK_SIZE): Use small value when LONG_TEST is not set.
+ (MAX_DIFF, MAX_LEN, MAX_ZEROS) Likewise.
+
+2012-03-29 Corinna Vinschen <vinschen@redhat.com>
+
+ * libc/locale/locale.c (__mb_cur_max): On Cygwin, align default value
+ with default UTF-8 charset.
+
+2012-03-26 Corinna Vinschen <vinschen@redhat.com>
+
+ * libc/stdio/findfp.c (__sinit): Set __sdidinit last.
+
+2012-03-09 Jeff Johnston <jjohnstn@redhat.com>
+
+ * libc/include/machine/setjmp-dj.h: Modify license to include
+ modification in clause as permitted by DJ Delorie.
+ * libc/machine/arm/access.c: Ditto.
+ * libc/machine/i386/setjmp.S: Ditto.
+ * libc/sys/h8300hms/sys/file.h: Ditto.
+ * libc/sys/linux/machine/i386/setjmp.S: Ditto.
+ * libc/sys/sysmec/access.c: Ditto.
+ * libc/sys/sysnecv850/access.c: Ditto.
+
+2012-03-02 Jeff Johnston <jjohnstn@redhat.com>
+
+ * libc/posix/readdir_r.c: Fix return code when end of
+ directory is reached.
+
+2012-02-23 Dan Egnor <egnor@ofb.net>
+
+ * configure.host: Accept "arm*" host spec instead of just "arm".
+
+2012-02-21 Jeremy Bennett <jeremy.bennett@embecosm.com>
+ Alan Lehotsky <apl@alum.mit.edu>
+ Joern Rennecke <joern.rennecke@embecosm.com>
+
+ * configure.host: Add Epiphany support.
+ * libc/include/machine/ieeefp.h: Likewise.
+ * libc/include/machine/setjmp.h: Likewise.
+ * libc/machine/configure.in, libc/sys/configure.in: Likewise.
+ * libc/machine/configure, libc/sys/configure: Regenerate.
+ * libc/machine/epiphany, libc/sys/epiphany: New directories.
+ * NEWS: Mention addition of Epiphany.
+
+2012-02-15 Christopher Faylor <me.newlib2012@cgf.cx>
+
+ * configure.host: Fix typo: xdir_dir -> xdr_dir.
+
+2012-02-09 Eric Blake <eblake@redhat.com>
+
+ * libc/include/_ansi.h (_ELIDABLE_INLINE): Fix C99 mode.
+
+2012-02-09 Sebastian Huber <sebastian.huber@embedded-brains.de>
+
+ * libc/sys/rtems/sys/utime.h: Include <sys/types.h> to provide a
+ definition of time_t.
+
+2012-02-08 Greta Yorsh <Greta.Yorsh@arm.com>
+
+ * libc/machine/arm/strcmp.S: New File.
+ * libc/machine/arm/strcmp.c: Deleted.
+ * libc/machine/arm/Makefile.am: Replaces strcmp.c with strcmp.S
+ * libc/machine/arm/Makefile.in: Regenerated.
+ * testsuite/newlib.string/strcmp-1.c: New file.
+
+2012-02-07 Corinna Vinschen <vinschen@redhat.com>
+
+ * libc/include/inttypes.h: Redefine pointer type macros.
+
+2012-01-13 Yaakov Selkowitz <yselkowitz@users.sourceforge.net>
+
+ * libc/stdio/sprintf.c: Document 'm' conversion specifier.
+ * libc/stdio/swprintf.c: Ditto.
+ * libc/stdio/vfprintf.c (_VFPRINTF_R) [_GLIBC_EXTENSION]: Handle 'm'
+ conversion specifier.
+ * libc/stdio/vfwprintf.c (_VFWPRINTF_R) [_GLIBC_EXTENSION]: Ditto.
+
+2012-01-12 Yaakov Selkowitz <yselkowitz@users.sourceforge.net>
+
+ * libc/include/tgmath.h: New header.
+
+2012-01-09 Yaakov Selkowitz <yselkowitz@users.sourceforge.net>
+
+ * libc/include/sys/unistd.h [__CYGWIN__] (get_current_dir_name):
+ Declare.
+
+2012-01-09 Yaakov Selkowitz <yselkowitz@users.sourceforge.net>
+
+ * libc/include/complex.h: Fix "/*" within comment warning.
+
+2012-01-09 Corinna Vinschen <vinschen@redhat.com>
+
+ * libc/include/process.h: Remove Cygwin-only header.
+
+2012-01-03 Viachaslau Kulakouski <Viachaslau.Kulakouski@oracle.com>
+
+ * libc/stdlib/__atexit.c: Refer to __atexit_lock instead of lock.
+
+2011-12-20 Aleksandr Platonov <pam@oktetlabs.ru>
+
+ * libc/stdio/fvwrite.c (__sfvwrite_r): Set __SMBF flag to avoid double
+ free in fclose. Enhance comment.
+
+2011-12-19 Jeff Johnston <jjohnstn@redhat.com>
+
+ * NEWS: Update with 1.20.0 info.
+ * README: Ditto.
+ * acinclude.m4: Change version number to 1.20.0.
+ * aclocal.m4: Regenerated.
+ * configure: Ditto.
+ * Makefile.in: Regenerated.
+ * doc/aclocal.m4: Ditto.
+ * doc/configure: Ditto.
+ * libc/*/aclocal.m4: Ditto.
+ * libc/*/configure: Ditto.
+ * libc/libc.texinfo: Ditto.
+ * libm/*/aclocal.m4: Ditto.
+ * libm/*/configure: Ditto.
+ * libm/libm.texinfo: Ditto.
+ * libc/sys/linux/shared.ld: Add VERS_1.20
+
+2011-12-13 Richard Earnshaw <rearnsha@arm.com>
+ Thomas Klein <th.r.klein@web.de>
+
+ * libc/sys/arm/crt0.S: Manually set the target architecture
+ when compiling for Thumb1 on EABI targets.
+ Don't use SWI on M-profile cores.
+ Avoid v6-only Thumb-1 MOV instruction.
+
+2011-12-12 Akio Idehara <zbe64533@gmail.com>
+
+ * libc/time/strftime.c (get_era_info): Fix off-by-one error in month
+ calculation.
+
+2011-12-06 Chris Johns <chrisj@rtems.org>
+
+ * libc/iconv/Makefile.am (stmp-def): Use $(MAKE) rather than make.
+ * libc/iconv/Makefile.in: Regenerate.
+
+2011-11-28 DJ Delorie <dj@redhat.com>
+
+ * configure.host: Add rl78.
+ * libc/include/machine/ieeefp.h: Add rl78 support.
+ * libc/include/machine/setjmp.h: Add rl78 support.
+ * libc/machine/configure.in: Add rl78.
+ * libc/machine/rl78: New directory.
+ * MAINTAINERS (rl78): Add myself as RL78 maintainer.
+
+2011-11-08 Corinna Vinschen <vinschen@redhat.com>
+
+ * libc/iconv/ccs/Makefile.am: Add missing backslash.
+ * libc/iconv/ccs/Makefile.in: Regenerate.
+
+2011-10-18 Dr David Alan Gilbert <david.gilbert@linaro.org>
+
+ * libc/machine/arm/Makefile.am (lib_a_SOURCES): Add memchr-stub.c,
+ memchr.S.
+ * libc/machine/arm/arm_asm.h: Add ifdef to allow it to be included
+ in .S files.
+ * libc/machine/arm/memchr-stub.c: New file - just selects what to
+ compile.
+ * libc/machine/arm/memchr.S: New file - ARMv6t2/v7 version.
+
+ * libc/machine/arm/Makefile.am (lib_a_SOURCES): Add strlen-armv7.S.
+ * libc/machine/arm/strlen-armv7.S: New file.
+ * libc/machine/arm/strlen.c: Add ifdef optimised code so it isn't
+ for v7 or 6t2.
+
+ * libc/machine/arm/Makefile.in: Regenerate.
+
+2011-10-11 Steven Abner <pheonix@zoomtown.com>
+
+ * libc/time/mktm_r.c: (__tzcalc_limits) Fix Julian day calculation.
+ * libc/time/mktime.c: (mktime) Fix tm_yday, tm_mday updating when
+ timezone causes roll over.
+
+2011-10-10 Nick Clifton <nickc@redhat.com>
+
+ * libc/sys/arm/crt0.S: Synchronise with libgloss version.
+ * libc/sys/arm/arm.h: Imported from libgloss.
+
+2011-10-04 Greta Yorsh <Greta.Yorsh@arm.com>
+
+ * testsuite/newlib.string/memcpy-1.c: New test.
+
+2011-10-04 Nick Clifton <nickc@redhat.com>
+
+ * libc/machine/arm/memcpy.S: Fix unaligned access copying.
+
+2011-09-29 Greta Yorsh <Greta.Yorsh@arm.com>
+
+ * libc/machine/arm/memcpy.S: New file. Contains a hand coded
+ memcpy function optimized for the cortex-a15.
+ * libc/machine/arm/memcpy-stub.c: New file.
+ * libc/machine/arm/Makefile.am (lib_a_SOURCES): Add memcpy-stub.c,
+ memcpy.S.
+ * libc/machine/arm/Makefile.in: Regenerate.
+
+2011-09-08 Jeff Johnston <jjohnstn@redhat.com>
+
+ * testsuite/lib/flags.exp: Add logic to add the
+ srcdir include directory to compile flags.
+
+2011-08-26 Steven Abner <pheonix@zoomtown.com>
+
+ * libc/time/mktm_r.c (_mktm_r): Fix previous fix.
+
+2011-08-24 Corinna Vinschen <vinschen@redhat.com>
+
+ * libc/time/mktm_r.c (_mktm_r): Fix computing tm_year.
+
+2011-08-23 Ralf Corsépius <ralf.corsepius@rtems.org>
+
+ * libc/stdlib/putenv_r.c: Use "strchr" instead of obsolete "index".
+ * libc/stdlib/setenv_r.c: Use "memcpy" instead of obsolete "bcopy".
+
+2011-08-23 Ralf Corsépius <ralf.corsepius@rtems.org>
+
+ * libc/misc/ffs.c, libc/string/bcmp.c, libc/string/bcopy.c,
+ libc/string/bzero.c, libc/string/index.c, libc/string/rindex.c,
+ libc/string/strcasecmp.c, libc/string/strncasecmp.c:
+ Let synopsis reference "#include <strings.h>".
+
+2011-08-23 Ralf Corsépius <ralf.corsepius@rtems.org>
+
+ * libc/posix/regexec.c: Define "nope" only #ifndef NDEBUG.
+ * libc/stdio/vfscanf.c: Define "state" only #ifdef _MB_CAPABLE.
+ * libc/string/wcwidth.c: Include <wctypes.h> for "iswprint" and
+ "iswcntrl".
+
+2011-08-23 Ralf Corsépius <ralf.corsepius@rtems.org>
+
+ * libc/sys/rtems/include/limits.h: Compute SSIZE_MAX based on
+ __SIZE_MAX__, __SIZEOF_SIZE_T__ and __CHAR_BIT__.
+
+2011-08-22 Ralf Corsépius <ralf.corsepius@rtems.org>
+
+ * libc/string/index.c: Include <strings.h> for "index".
+ * libc/string/rindex.c: Include <strings.h> for "rindex".
+ * libc/string/strcasecmp.c: Include <strings.h> for "strcasecmp".
+ Don't include <string.h>.
+ * libc/string/strncasecmp.c: Include <strings.h> for "strncasecmp".
+ Don't include <string.h>.
+ * libc/string/bzero.c: Include <strings.h> for "bzero".
+ Don't include <string.h>
+ * libc/misc/ffs.c: Include <strings.h> for "ffs".
+ Don't include <_ansi.h>.
+
+2011-08-19 Ralf Corsépius <ralf.corsepius@rtems.org>
+
+ * libc/sys/rtems/crt0.c: Rework RTEMS_STUB macro.
+ Include <unistd.h>.
+ Remove C++-style comments.
+ Remove hppa, a29k.
+ Add clock_gettime, gettimeofday, sched_yield.
+
+2011-08-19 Ralf Corsépius <ralf.corsepius@rtems.org>
+
+ * libc/stdio/vasiprintf.c: Include "local.h" for "_svfiprintf_r".
+ * libc/stdio/vasprintf.c Include "local.h" for "_svfprintf_r".
+ * libc/stdio/vsiprintf.c: Include "local.h" for "_svfiprintf_r".
+ * libc/stdio/vsniprintf.c: Include "local.h" for "_svfiprintf_r".
+ * libc/stdio/vsnprintf.c: Include "local.h" for "_svfprintf_r"
+ * libc/stdio/vsprintf.c: Include "local.h" for "_svfprintf_r"
+
+2011-08-19 Ralf Corsépius <ralf.corsepius@rtems.org>
+
+ * libc/string/bcmp.c: Include <strings.h> for "bcmp".
+ * libc/string/bcopy.c: Include <strings.h> for "bcopy".
+ * libc/string/strcasestr.c: Include <strings.h> for "strncasecmp".
+ * libc/time/strptime.c: Include <strings.h> for "strncasecmp".
+
+2011-08-19 Corinna Vinschen <vinschen@redhat.com>
+
+ * libc/include/process.h: Remove exec family function declarations.
+ Add comment.
+ * libc/include/sys/unistd.h (execlpe): Declare for Cygwin.
+
+2011-08-19 Craig Howland <howland@LGSInnovations.com>
+
+ * libc/time/mktime.c (validate_structure): Account for tm_mon possibly
+ being given as negative.
+ (mktime): Set tm_isdst=0 when !daylight.
+
+2011-08-01 Sebastian Huber <sebastian.huber@embedded-brains.de>
+
+ * libc/include/sys/types.h: XML and RTEMS define
+ _UNIX98_THREAD_MUTEX_ATTRIBUTES and can use the standard
+ definitions. This avoids redefinition warnings.
+
+2011-07-26 Ralf Corsépius <ralf.corsepius@rtems.org>
+
+ * libc/sys/rtems/sys/dirent.h (scandir):
+ Add const to "select" parameter.
+
+2011-07-25 Ralf Corsépius <ralf.corsepius@rtems.org>
+
+ * libc/iconv/iconv.tex: Rename node "Introduction" into
+ "Introduction to iconv".
+
+2011-07-20 Yaakov Selkowitz <yselkowitz@...>
+
+ * libc/include/time.h [_POSIX_CLOCK_SELECTION] (clock_nanosleep):
+ Declare.
+ * libc/include/sys/features.h [__CYGWIN__] (_POSIX_CLOCK_SELECTION):
+ Define.
+
+2011-07-19 Yaakov Selkowitz <yselkowitz@users.sourceforge.net>
+
+ * libc/include/sys/unistd.h (_CS_XBS5_WIDTH_RESTRICTED_ENVS): Define.
+ (_CS_V6_ENV): Fix definition.
+
+2011-07-19 Ralf Corsépius <ralf.corsepius@rtems.org>
+
+ * libc/locale/lmessages.c (_C_messages_locale):
+ Move __HAVE_LOCALE_INFO_EXTENDED__ before codeset.
+
+2011-07-19 Matt Johnson <johnso87@crhc.illinois.edu>
+
+ * libc/reent/sbrkr.c: Define _sbrk_r independently of the definition
+ of MALLOC_PROVIDED.
+
+2011-07-15 Yufeng Zhang <yufeng.zhang@arm.com>
+
+ * libc/stdio/vfwprintf.c (wcvt): Add a new parameter len of type
+ int. *length is set to the value of (rev - digits) regardless
+ of whether _MB_CAPABLE is defined or not. Replace BUF with len
+ in calling _mbsnrtowcs_r and also in the loop where _MB_CAPABLE
+ is not defined.
+ (_VFWPRINTF_R): Call wcvt with an extra argument. Call wcvt
+ again with allocated new buffer if buf is not large enough for
+ the conversion.
+ * testsuite/newlib.stdio/stdio.exp: New.
+ * testsuite/newlib.stdio/swprintf.c: Likewise.
+
+2011-07-15 Matt Johnson <johnso87@crhc.illinois.edu>
+
+ * libc/stdio/fscanf.c (fscanf): Call _vfscanf_r instead of __svfscanf_r
+ to make sure CHECK_INIT is called.
+ (_fscanf_r): Ditto.
+ * /libc/stdio/scanf.c (scanf): Ditto.
+ (_scanf_r): Ditto.
+ * libc/stdio/fwscanf.c (fwscanf): Call _vfwscanf_r instead of
+ __svfwscanf_r to make sure CHECK_INIT is called.
+ (_fwscanf_r): Ditto.
+ * libc/stdio/wscanf.c (wscanf): Ditto.
+ (_wscanf_r): Ditto.
+
+2011-07-13 Hans-Peter Nilsson <hp@axis.com>
+
+ * libm/complex/cacos.c: Use temporaries and correct sequencing
+ error in previous reordering change.
+
+2011-06-25 Andreas Becker <becker@se-elektronic.de>
+
+ * libc/time/mktime.c (mktime): Lock global timezone info while
+ accessing it.
+
+2011-06-14 Philip Munts <phil@munts.net>
+
+ * libc/time/asctime_r.c (asctime_r): Replace call to sprintf with call
+ to siprintf.
+ * libc/time/strftime.c: Define snprintf to sniprintf in multibyte case.
+ * libc/time/tzset_r.c: Define sscanf to siscanf.
+
+2011-06-14 Joseph Myers <joseph@codesourcery.com>
+
+ * configure.host: Don't handle ep9312, strongarm, xscale and thumb
+ target names.
+ * libc/machine/configure.in: Don't handle xscale target names.
+ * libc/machine/configure: Regenerate.
+
+2011-06-14 Craig Howland <howland@LGSInnovations.com>
+
+ * libc/time/tzset_r.c (tzset_r): Correct behavior for changing from
+ non-GMT to GMT, when un-setting TZ. Set _timezone and _daylight even
+ if no DST is given in TZ.
+
+2011-06-13 Eric Blake <eblake@redhat.com>
+
+ * libc/stdio/wsetup.c (__swsetup_r): Set errno on failure.
+ * libc/stdio/fvwrite.c (__sfvwrite_r): Simplify.
+ * libc/stdio/wbuf.c (__swbuf_r): Likewise.
+ * libc/stdio/local.h (cantwrite): Adjust comment.
+
+2011-06-09 Yaakov Selkowitz <yselkowitz@...>
+
+ * libc/include/string.h (strdupa): New macro function.
+ (strndupa): New macro function.
+
+2011-05-27 Nick Clifton <nickc@redhat.com>
+
+ * libc/sys/sysnecv850/sbrk.c (_sbrk): Tidy code.
+ Base start of heap on the "heap_start" symbol.
+
+2011-05-25 Eric Blake <eblake@redhat.com>
+
+ * libc/string/strerror.c (_strerror_r): Report "Success" for 0.
+
+2011-05-25 Eric Blake <eblake@redhat.com>
+
+ * libc/string/strerror.c (strerror): Split body into...
+ (_strerror_r): ...new reentrant function.
+ * libc/string/u_strerr.c (_user_strerror): Update signature.
+ * libc/include/string.h (_strerror_r): New prototype.
+ * libc/posix/collate.c (__collate_err): Adjust callers.
+ * libc/stdio/perror.c (_perror_r): Likewise.
+ * libc/string/strerror_r.c (strerror_r): Likewise.
+ * libc/string/xpg_strerror_r.c (__xpg_strerror_r): Likewise.
+
+2011-05-19 Yaakov Selkowitz <yselkowitz@users.sourceforge.net>
+
+ * libc/include/stdio_ext.h: New header.
+ * libc/stdio/fpurge.c [!__rtems__] (__fpurge): New function.
+
+2011-05-19 Matthew Gretton-Dann <matthew.gretton-dann@arm.com>
+
+ * Makefile.am (install-data-local): Fix condition and rm call.
+ * Makefile.in: Regenerate.
+
+2011-05-16 Yaakov Selkowitz <yselkowitz@users.sourceforge.net>
+
+ * libc/include/time.h (CLOCK_PROCESS_CPUTIME_ID): Rename from
+ CLOCK_PROCESS_CPUTIME.
+ (CLOCK_THREAD_CPUTIME_ID): Rename from CLOCK_THREAD_CPUTIME.
+ * libc/include/sys/features.h [__CYGWIN__] (_POSIX_CPUTIME): Define.
+ (_POSIX_THREAD_CPUTIME): Define.
+
+2011-05-16 Christian Bruel <christian.bruel@st.com>
+
+ * libc/stdlib/strtod.c (_strtod_r): Fix nf/nd counts to not exceed
+ DBL_DIG.
+
+2011-05-15 Corinna Vinschen <vinschen@redhat.com>
+
+ * libc/include/sys/features.h (_POSIX_THREAD_ATTR_STACKADDR): Define
+ to 200112L for Cygwin.
+
+2011-05-12 Peter Rosin <peda@lysator.liu.se>
+
+ * libc/time/strptime.c (strptime): Fill in tm_yday when all of tm_year,
+ tm_mon and tm_mday are updated. Fill in tm_mon, tm_mday and tm_wday
+ when both of tm_year and tm_yday are updated.
+
+2011-05-12 Peter Rosin <peda@lysator.liu.se>
+
+ * libc/time/strptime.c (first_day): Actually return the wday
+ of the first day of the year.
+
+2011-05-10 Corinna Vinschen <vinschen@redhat.com>
+
+ * libc/locale/lmessages.c (_C_messages_locale): Add missing comma.
+
+2011-05-04 Yaakov Selkowitz <yselkowitz@users.sourceforge.net>
+
+ * libc/include/signal.h (psignal): Declare.
+ * libc/sys/linux/psignal.c: Move from here...
+ * libc/signal/psignal.c: ... to here. Document.
+ * libc/sys/linux/Makefile.am (GENERAL_SOURCES): Move psignal.c from here...
+ * libc/signal/Makefile.am (LIB_SOURCES): ... to here.
+ (CHEWOUT_FILES): Add psignal.def.
+ * libc/sys/linux/Makefile.in: Regenerate.
+ * libc/signal/Makefile.in: Ditto.
+ * libc/signal/signal.tex: Add references to psignal.
+
+2011-05-04 Corinna Vinschen <vinschen@redhat.com>
+
+ * libc/locale/lmessages.h (__messages_load_locale): Declare. Remove
+ accidental declaration of __numeric_load_locale.
+ * libc/locale/locale.c: Include timelocal.h to get declaration of
+ __time_load_locale.
+ (__set_locale_from_locale_alias): Fix return type.
+ (__locale_msgcharset): Avoid compiler warnings.
+ (_localeconv_r): Ditto.
+
+2011-05-04 Andy Koppe <andy.koppe@gmail.com>
+
+ * libc/locale/locale.c (current_categories): On Cygwin, set LC_CTYPE
+ to C.UTF-8 to match initial __wctomb and __mbtowc settings.
+ (lc_ctype_charset): On Cygwin, initialize to "UTF-8".
+ (loadlocale): Remove unused Cygwin-specifc code.
+
+2011-05-02 Yaakov Selkowitz <yselkowitz@users.sourceforge.net>
+
+ * libc/include/sys/features.h [__CYGWIN__] (_POSIX_SPIN_LOCKS): Define.
+ * libc/include/sys/types.h: Cygwin provides its own pthread_spinlock_t
+ typedef.
+
+2011-04-19 Corinna Vinschen <vinschen@redhat.com>
+
+ * libc/include/sys/signal.h (_sig_func_ptr): Define with int parameter
+ per POSIX. Explain in comment.
+
+2011-04-15 Eric Blake <eblake@redhat.com>
+
+ * libc/string/strchrnul.c (strchrnul): Fix strchrnul.
+
+2011-03-27 Yaakov Selkowitz <yselkowitz@users.sourceforge.net>
+
+ * libc/include/string.h (strchrnul): Declare.
+ * libc/string/strchrnul.c: New file.
+ * libc/string/Makefile.am (ELIX_2_SOURCES): Add strchrnul.c.
+ * libc/string/Makefile.in: Regenerate.
+
+2011-03-23 Nick Clifton <nickc@redhat.com>
+
+ * libc/machine/frv/setjmp.S: Fix typo in .size directive.
+
+2011-03-21 Kevin Buettner <kevinb@redhat.com>
+
+ * libc/sys/sysnecv850/trap.S (___trap0): Fix errno handling.
+ * libc/sys/sysnecv850/rename.c: New file.
+ * libc/sys/sysnecv850/Makefile.am (lib_a_SOURCES): Add rename.c
+ * libc/sys/sysnecv850/Makefile.in: Regenerate.
+ * libc/sys/sysnecv850/fstat.c (_fstat): Invoke trap for SYS_fstat.
+ * libc/sys/sysnecv850/unlink.c (_unlink): Invoke trap for SYS_unlink.
+
+2011-03-03 Corinna Vinschen <vinschen@redhat.com>
+
+ * libc/include/string.h: Include sys/cdefs.h.
+
+2011-03-03 Corinna Vinschen <vinschen@redhat.com>
+
+ * libc/include/sys/cdefs.h (__CONCAT1): Define.
+ (__CONCAT): Define.
+ (__STRING): Define.
+ (__XSTRING): Define.
+ (__ASMNAME): Define.
+ * libc/include/string.h (strerror_r): Use __ASMNAME to take target
+ specific label prefixes into account.
+
+2011-03-01 Aaron Landwehr <snaphat@gmail.com>
+
+ * libm/complex/cproj.c: Fix typo.
+ * libm/complex/cprojf.c: Ditto.
+
+2011-02-22 Corinna Vinschen <vinschen@redhat.com>
+
+ * libc/stdio/fmemopen.c (fmemopen): Fix EINVAL condition. Avoid SEGV
+ if incoming buffer is NULL.
+
+2011-02-09 Eric Blake <eblake@redhat.com>
+
+ * libc/include/string.h (strerror_r): Update declaration.
+ * libc/string/strerror.c (strerror): Update documentation.
+ * libc/string/strerror_r.c (strerror_r): Always return
+ NUL-terminated string; don't overwrite too-short buf.
+ * libc/string/xpg_strerror_r.c (__xpg_strerror_r): Implement POSIX
+ variant.
+ * libc/string/Makefile.am (GENERAL_SOURCES): Build new file.
+ * libc/string/Makefile.in: Regenerate.
+
+2011-01-28 Corinna Vinschen <vinschen@redhat.com>
+
+ * libc/stdio/fclose.c: Only use sfp lock to guard non-atomic
+ changes of flags and fp lock.
+ * libc/stdio/freopen.c: Ditto.
+ * libc/stdio64/freopen64.c: Ditto.
+ * libc/stdio/fgetc.c: Revert change from 2009-04-24, remove sfp locks
+ which guard entire function to avoid potential deadlocks when using
+ stdio functions in multiple thraeds.
+ * libc/stdio/fgets.c: Ditto.
+ * libc/stdio/fgetwc.c: Ditto.
+ * libc/stdio/fgetws.c: Ditto.
+ * libc/stdio/fread.c: Ditto.
+ * libc/stdio/fseek.c: Ditto.
+ * libc/stdio/getc.c: Ditto.
+ * libc/stdio/getdelim.c: Ditto.
+ * libc/stdio/gets.c: Ditto.
+ * libc/stdio/vfscanf.c: Ditto.
+ * libc/stdio/vfwscanf.c: Ditto.
+
+ * libc/stdio/fflush.c (_fflush_r): Split out core functionality into
+ new function __sflush_r. Just lock file and call __sflush_r from here.
+ * libc/stdio/fwalk.c (_fwalk): Remove static helper function and move
+ functionality back into main function. Don't walk a file with flags
+ value of 1. Add comment.
+ (_fwalk_reent): Ditto.
+ * libc/stdio/local.h (__sflush_r): Declare.
+ * libc/stdio/refill.c (__srefill): Before calling fwalk, set flags
+ value to 1 so this file pointer isn't walked. Revert flags afterwards
+ and call __sflush_r for this fp if necessary. Add comments.
+
+2011-01-27 Corinna Vinschen <vinschen@redhat.com>
+
+ * libc/include/sys/features.h: Define __STDC_ISO_10646__ for Cygwin.
+ * libc/include/wchar.h: Include features.h.
+
+2011-01-15 Yaakov Selkowitz <yselkowitz@users.sourceforge.net>
+
+ * libc/include/sys/types.h (ulong): Add typedef.
+
+2011-01-12 Ralf Corsépius <ralf.corsepius@rtems.org>
+
+ * libm/math/w_tgamma.c: Only build ifndef _DOUBLE_IS_32BITS.
+ * libm/math/wf_tgamma.c: Map tgamma to tgammaf, ifdef _DOUBLE_IS_32BITS.
+
+2011-01-12 Jeff Johnston <jjohnstn@redhat.com>
+
+ * configure.host: Add noinclude variable to allow specification
+ of header files to remove from installation.
+ * acinclude.m4: Provide NO_INCLUDE_LIST variable based on
+ noinclude variable in configure.host.
+ * configure: Regenerated.
+ * Makefile.am: Remove all header files in NO_INCLUDE_LIST.
+ * Makefile.in: Regenerated.
+
+2011-01-12 Yaakov Selkowitz <yselkowitz@users.sourceforge.net>
+
+ * libc/sys/linux/sys/signal.h (sig_t): Move from here...
+ * libc/include/signal.h (sig_t): ...to here.
+
+2011-01-10 Corinna Vinschen <vinschen@redhat.com>
+
+ * libc/machine/mips/strlen.c (strlen): Add delay slot for R3000.
+
+2011-01-10 Joel Sherrill <joel.sherrill@oarcorp.com>
+
+ * libc/include/string.h: Make strsignal() available unconditionally.
+
+2011-01-07 Ralf Corsepius <ralf.corsepius@rtems.org>
+
+ * libc/sys/rtems/crt0.c: Adjust free() and calloc() to match their
+ public decls.
+
+2011-01-05 Ralf Corsepius <ralf.corsepius@rtems.org>
+
+ * Makefile.am: Move cleaning targ-include to clean-local.
+ * Makefile.in: Regenerate.
+
+2011-01-05 Ralf Corsepius <ralf.corsepius@rtems.org>
+
+ * libc/stdio/open_memstream.c (internal_open_memstream_r):
+ Don't limit c->max to 64*1024 on targets with SIZE_MAX < 64*1024.
+
+2011-01-05 Ralf Corsepius <ralf.corsepius@rtems.org>
+
+ * libc/xdr/xdr.c: Fix typos in #errors.
+
+2011-01-05 Ralf Corsepius <ralf.corsepius@rtems.org>
+
+ * libc/xdr/xdr_private.h: Include <stdint.h>
+ * libc/xdr/xdr_rec.c: Include limits.h
+
+2011-01-05 Ralf Corsepius <ralf.corsepius@rtems.org>
+
+ * libc/Makefile.am (SUBDEFS): Remove redundant posix/stmp-def.
+ * libc/Makefile.in: Regenerate.
+
+2011-01-05 Ralf Corsepius <ralf.corsepius@rtems.org>
+
+ * libc/configure.in: Remove redundant posix_dir processing.
+ * libc/configure: Regenerate.
+
+2010-12-31 Ralf Corsepius <ralf.corsepius@rtems.org>
+
+ * MAINTAINERS: Change corinna@vinchen.de to corinna@vinschen.de.
+
+2010-12-26 Christopher Faylor <me+cygwin@cgf.cx>
+
+ * libc/include/sys/errno.h (program_invocation_name): Declare.
+ (program_invocation_short_name): Ditto.
+
+2010-12-16 Jeff Johnston <jjohnstn@redhat.com>
+
+ * NEWS: Update with 1.19.0 info.
+ * README: Ditto.
+ * MAINTAINERS: Update.
+ * acinclude.m4: Change version number to 1.19.0.
+ * aclocal.m4: Regenerated.
+ * configure: Ditto.
+ * Makefile.am: Fix stmp-targ-include target.
+ * Makefile.in: Regenerated.
+ * doc/aclocal.m4: Ditto.
+ * doc/configure: Ditto.
+ * libc/*/aclocal.m4: Ditto.
+ * libc/*/configure: Ditto.
+ * libc/libc.texinfo: Ditto.
+ * libm/*/aclocal.m4: Ditto.
+ * libm/*/configure: Ditto.
+ * libm/libm.texinfo: Ditto.
+ * libc/sys/linux/shared.ld: Add VERS_1.19
+
+2010-12-14 Jeff Johnston <jjohnstn@redhat.com>
+
+ * Makefile.am: Add support to copy all sub-directories of the
+ sys/SYS_DIR/include directory, if they contain header files.
+ * Makefile.in: Regenerated.
+
+2010-12-08 Jeff Johnston <jjohnstn@redhat.com>
+
+ * libm/mathfp/sf_logarithm.c: Change isfinitef reference to isfinite.
+
+2010-12-08 Ralf Corsepius <ralf.corsepius@rtems.org>
+
+ * include/sys/types.h: Add #if defined(__rtems__) around
+ pthread_attr_t.guardsize.
+
+2010-12-08 Joel Sherrill <joel@OARcorp.com>
+
+ * include/pthread.h: Add pthread_attr_setstack, pthread_attr_getstack,
+ pthread_attr_getguardsize, pthread_attr_setguardsize.
+ * include/sys/types.h (pthread_attr_t): Add guardsize.
+
+2010-12-08 Corinna Vinschen <corinna@vinschen.de>
+
+ * libc/include/strings.h: Don't include locale.h.
+
+2010-12-07 Eric Blake <eblake@redhat.com>
+
+ * libc/include/strings.h: Don't declare removed functions when
+ requesting POSIX 2008 compliance.
+
+2010-12-07 Jeff Johnston <jjohnstn@redhat.com>
+
+ * libc/stdlib/strtod.c (_strtod_r): Fix code to handle case whereby
+ _DOUBLE_IS_32BITS is set and DBL_DIGS is 6 instead of 15.
+
+2010-12-07 Ralf Corsépius <ralf.corsepius@rtems.org>
+
+ * libc/include/strings.h: New (split-out from string.h).
+
+2010-12-03 Craig Howland <howland@LGSInnovations.com>
+
+ * libc/include/math.h: Missing from previous checkin.
+
+2010-12-02 Craig Howland <howland@LGSInnovations.com>
+
+ * libm/common/s_log2.c: Change from using M_LOG2_E to M_LN2 define
+ (from math.h--the latter is POSIX, the former non-standard).
+ * libm/common/sf_log2.c: Ditto. Change cast for M_LN2 from float to
+ float_t (in case all math not done in float).
+ * libc/include/math.h: Ditto (same 2 things as sf_log2.c).
+
+2010-12-02 Jayant Sonar jayant.sonar@kpitcummins.com
+ Kaushik Phatak kaushik.phatak@kpitcummins.com
+
+ * configure.host: Add CR16 support.
+ * libc/include/machine/ieeefp.h: Ditto.
+ * libc/include/machine/setjmp.h: Ditto.
+ * libc/include/sys/config.h: Ditto.
+ * libc/machine/configure.in: Ditto
+ * libc/machine/configure: Regenerated
+ * libc/machine/cr16/aclocal.m4: New.
+ * libc/machine/cr16/configure.in: New
+ * libc/machine/cr16/configure: New
+ * libc/machine/cr16/getenv.c: New
+ * libc/machine/cr16/Makefile.am: New
+ * libc/machine/cr16/Makefile.in: New
+ * libc/machine/cr16/setjmp.S: New
+ * libc/machine/cr16/sys/asm.h: New
+ * libc/machine/cr16/sys/libh.h: New
+ * libc/machine/cr16/sys/syscall.h: New
+
+2010-11-29 Ralf Corsépius <ralf.corsepius@rtems.org>
+
+ * libm/complex/catan.c, libm/complex/catanf.c,
+ libm/complex/ctan.c, libm/complex/ctanf.c:
+ Use HUGE_VAL instead of MAXNUM.
+
+2010-11-25 Ralf Corsépius <ralf.corsepius@rtems.org>
+
+ * libm/complex/cargf.c: Use crealf instead of creal.
+
+2010-11-19 Andy Koppe <andy.koppe@gmail.com>
+
+ * libc/locale/locale.c (loadlocale): Recognise the "cjknarrow"
+ modifier on "C.<charset>" locales too.
+
+2010-11-18 Andy Koppe <andy.koppe@gmail.com>
+
+ * libc/locale/locale.c (loadlocale): Fix width of CJK ambigous
+ characters to 1 for singlebyte charsets and 2 for non-Unicode
+ multibyte charsets. Change documentation accordingly.
+
+2010-11-17 Bernd Schmidt <bernds@codesourcery.com>
+
+ * configure.host (newlib_cflags): For tic6x, add -DCLOCK_PROVIDED.
+
+2010-11-16 Andrew Makhorin <mao@gnu.org>
+
+ * libc/machine/i386/setjmp.S (longjmp): Per POSIX, return 1 if second
+ argument is 0.
+
+2010-11-16 Ralf Corsépius <ralf.corsepius@rtems.org>
+
+ * libc/include/sys/types.h: Add _mode_t for __rtems__.
+ * libc/sys/rtems/machine/_types.h: Provide _mode_t, _fpos_t, _off_t.
+ Add _ssize_t for 64bit sparc.
+ Let arm, i386, m68k, mips, PPC, sparc use 64bit _off_t, _fpos_t.
+
+2010-11-16 Ralf Corsépius <ralf.corsepius@rtems.org>
+
+ * configure.host: Add -D_COMPILING_NEWLIB to newlib_cflags.
+
+2010-11-04 Ralf Corsépius <ralf.corsepius@rtems.org>
+
+ * libm/complex/cacos.c: Reorder function calls to work around ICE
+ in arm/thumb-gcc.
+
+2010-10-27 Maurice Baijens <maurice.baijens@ellips.nl>
+
+ * libc/stdlib/strtol.c: Make sure signed characters are not
+ sign-extended when converted to int and passed to ctype macros.
+ * libc/stdlib/strtoul.c: Ditto.
+ * libc/stdlib/strtoll_r.c: Ditto.
+ * libc/stdlib/strtoull_r.c: Ditto.
+
+2010-10-18 Marco Atzeri <marco_atzeri@yahoo.it>
+
+ * libm/Makefile.am: added complex functions documentation
+ * libm/libm.texinfo: ditto
+ * libm/complex/Makefile.am: Ditto
+ * libm/complex/complex.tex: Ditto
+ * libm/complex/(cabs.c, cacos.c, cacosh.c, carg.c,
+ casin.c, casinh.c, catan.c, catanh.c, ccos.c, ccosh.c,
+ cexp.c, cimag.c, clog.c, conj.c, cpow.c, cproj.c, creal.c,
+ csin.c, csinh.c, csqrt.c, ctan.c, ctanh.c): Ditto
+ * libm/Makefile.in: Regenerate
+ * libm/complex/Makefile.in: Ditto
+
+2010-10-14 Craig Howland <howland@LGSInnovations.com>
+
+ * libc/include/math.h: Delete cabs() and cabs() prototypes
+ (c.f. 2010-10-08 change by Corinna).
+
+2010-10-08 Bernd Schmidt <bernds@codesourcery.com>
+ Joseph Myers <joseph@codesourcery.com>
+
+ * configure.host: Handle tic6x targets.
+ * libc/include/machine/ieeefp.h: Define endianness for C6X.
+ * libc/include/machine/setjmp.h: Add __TMS320C6X__ case.
+ * libc/machine/configure.in: Handle tic6x targets.
+ * libc/machine/configure: Regenerate.
+ * libc/machine/tic6x/Makefile.am, libc/machine/tic6x/configure.in,
+ libc/machine/tic6x/setjmp.S: New.
+ * libc/machine/tic6x/Makefile.in, libc/machine/tic6x/aclocal.m4,
+ libc/machine/tic6x/configure: New (generated).
+
+2010-10-08 Ralf Corsépius <ralf.corsepius@rtems.org>
+
+ * libc/include/sys/unistd.h: Declare getsid, setegid, seteuid for RTEMS.
+
+2010-10-08 Ralf Corsépius <ralf.corsepius@rtems.org>
+
+ * libm/common/sf_llrint.c, libm/common/sf_round.c: Add explicit casts
+ to __uint32_t to avoid overflows on implicit casts.
+
+2010-10-08 Ralf Corsépius <ralf.corsepius@rtems.org>
+
+ * libm/complex/complex.tex: Add empty stub.
+
+2010-10-08 Corinna Vinschen <corinna@vinschen.de>
+
+ * libm/math/w_cabs.c: Delete.
+ * libm/math/wf_cabs.c: Delete.
+ * libm/math/Makefile.am (src): Remove w_cabs.c.
+ (fsrc): Remove wf_cabs.c.
+ * libm/math/Makefile.in: Regenerate.
+
+2010-10-08 Marco Atzeri <marco_atzeri@yahoo.it>
+
+ * libc/include/complex.h: New complex header.
+ * libm/common/fdlibm.h: Added ifdef _COMPLEX_H.
+ * libm/complex/*: New complex functions imported from NetBSD.
+ * libm/Makefile.am: Added complex subdir.
+ * libm/Makefile.in: Regenerate.
+ * libm/configure.in: Added complex subdir.
+ * libm/configure: Regenerate.
+
+2010-10-06 Eric Blake <eblake@redhat.com>
+
+ * lib/str-two-way.h (two_way_long_needle): Avoid bug with long
+ periodic needle having false positive. Affects memmem, strstr,
+ strcasestr.
+
+2010-09-21 Craig Howland <howland@LGSInnovations.com>
+
+ * libc/string/memcpy.c: Do not assign size_t parameter to int.
+ Use parameter directly, instead.
+ * libc/string/memccpy.c: Likewise.
+ * libc/string/mempcpy.c: Likewise.
+ * libc/string/memmove.c: Likewise.
+
+2010-09-09 Kevin Buettner <kevinb@redhat.com>
+
+ * libc/sys/sysnecv850/Makefile.am (lib_a_SOURCES): Provide an
+ empty definition.
+ * libc/sys/sysnecv850/Makefile.in: Regenerate.
+
+2010-08-25 Sebastian Huber <sebastian.huber@embedded-brains.de>
+
+ * libc/posix/opendir.c (opendir): Fix potential memory leak.
+
+2010-08-10 Yaakov Selkowitz <yselkowitz@users.sourceforge.net>
+
+ * libc/include/sys/dir.h: New BSD-compatibility header.
+
+2010-08-02 Yaakov Selkowitz <yselkowitz@users.sourceforge.net>
+
+ * libc/include/sys/features.h: Define _POSIX_MONOTONIC_CLOCK for Cygwin.
+
+2010-08-06 Corinna Vinschen <corinna@vinschen.de>
+
+ * libc/include/sys/stat.h: Move all POSIX-defined symbolic constants
+ out of `#ifndef _POSIX_SOURCE' guard.
+
+2010-08-03 Craig Howland <howland@LGSInnovations.com>
+
+ * libm/common/s_lrint.c (lrint): Annotate shift operations with
+ possible shift amount ranges, and use SAFE_RIGHT_SHIFT to avoid
+ undefined behaviour.
+ * libm/common/s_llrint.c (llrint): Likewise.
+ * libm/common/s_lround.c (lround): Correct some comments on ranges.
+ * libm/common/s_llround.c (llround): Likewise.
+
+2010-07-30 Anthony Green <green@moxielogic.com>
+
+ * libc/sys/rtems/machine/_types.h: Add moxie support.
+
+2010-07-23 Naveen.H.S <naveenh1@kpitcummins.com>
+ Gina Verlekar <gina.verlekar@kpitcummins.com>
+
+ * configure.host: Compact v850* support and add
+ check for newlib_may_supply_syscalls.
+ * libc/sys/sysnecv850/Makefile.am: Add support for
+ '--disable-newlib-supplied-syscalls' option.
+ * libc/sys/sysnecv850/Makefile.in: Regenerated.
+
+2010-07-20 Dave Korn <dave.korn.cygwin@gmail.com>
+
+ * libm/common/fdlibm.h (SAFE_LEFT_SHIFT): New macro definition.
+ (SAFE_RIGHT_SHIFT): Likewise.
+ * libm/common/s_llround.c (llround): Annotate shift operations with
+ possible shift amount ranges, and use SAFE_RIGHT_SHIFT to avoid
+ undefined behaviour.
+ * libm/common/s_lround.c (lround): Likewise.
+
+2010-07-19 Eric Blake <eblake@redhat.com>
+
+ * libc/stdio/mktemp.c (_gettemp): Add parameter, all callers
+ changed.
+ (mkostemp, _mkostemp_r, mkostemps, _mkostemps_r): New interfaces,
+ for ELIX level 4.
+ * libc/include/stdlib.h (mktemp): Avoid namespace issues.
+ (mkostemp, mkostemps): Declare.
+
+2010-07-13 Corinna Vinschen <corinna@vinschen.de>
+
+ * libc/include/signal.h (sighandler_t): Only define if _POSIX_SOURCE
+ is undefined.
+
+2010-07-06 Corinna Vinschen <corinna@vinschen.de>
+
+ * libc/posix/rewinddir.c (rewinddir): Remove incorrect cast to off_t.
+ * libc/sys/rtems/sys/dirent.h (_seekdir): Add prototype.
+ * libc/sys/linux/sys/dirent.h (_seekdir): Fix prototype to use long
+ rather than off_t.
+
+2010-07-01 Yaakov Selkowitz <yselkowitz@users.sourceforge.net>
+
+ * libc/include/signal.h (sighandler_t): Add typedef.
+
+2010-06-29 Antony King <antony.king@st.com>
+
+ * libc/ctype/ctype_.c (__ctype_ptr): Reinstate definition (guarded by
+ _NEED_OLD_CTYPE_PTR_DEFINITION) for backwards compatibility with newlib
+ 1.16.0 and earlier.
+
+2010-06-28 Yaakov Selkowitz <yselkowitz@users.sourceforge.net>
+
+ * libc/include/sys/stat.h: Add ACCESSPERMS, ALLPERMS, and DEFFILEMODE.
+
+2010-06-18 Pavel Pisa <ppisa4lists@pikron.com>
+
+ * libc/include/machine/ieeefp.h[__arm__][!__VFP_FP__]: Set to
+ __IEEE_BIG_ENDIAN and set __IEEE_BYTES_LITTLE_ENDIAN appropriately
+ based on __ARMEL flag.
+ * libc/include/machine/endian.h: To set byte order to LITTLE_ENDIAN,
+ check for __IEEE_LITTLE_ENDIAN or __IEEE_BYTES_LITTLE_ENDIAN.
+
+2010-06-09 Paul Brook <paul@codesourcery.com>
+
+ * libc/include/sys/reent.h (_reent): Adjust _REENT_SMALL to be
+ binary compatible with normal layout.
+ (_REENT_INIT): Adjust to match struct layout.
+
+2010-06-08 Jeff Johnston <jjohnstn@redhat.com>
+
+ * libc/include/wordexp.h: Add __cplusplus wrapper.
+
+2010-06-08 Jeff Johnston <jjohnstn@redhat.com>
+
+ * configure.in: Add test for enable-newlib-register-fini
+ to set the _WANT_REGISTER_FINI flag.
+ * configure: Regenerated.
+ * Makefile.in: Ditto.
+ * newlib.hin: Add _WANT_REGISTER_FINI flag.
+ * libc/stdlib/__call_atexit.c: Add test for
+ _WANT_REGISTER_FINI to enable the register_fini function.
+
+2010-06-04 Mark Mitchell <mark@codesourcery.com>
+
+ * libc/stdlib/__call_atexit.c (__libc_fini): Declare.
+ (register_fini): New function.
+ * libc/misc/init.c (_fini): Remove.
+ (__libc_fini_array): Likewise.
+ * libc/misc/fini.c: New file.
+ * libc/misc/Makefile.am (LIB_SOURCES): Add fini.c.
+ * libc/misc/Makefile.in: Regenerate.
+
+2010-05-31 Kazu Hirata <kazu@codesourcery.com>
+
+ * libc/stdlib/mallocr.c (malloc_extend_top): Backport the
+ difference between versions 2.6.4 and 2.6.5.
+
+2010-05-18 Christopher Faylor <me+cygwin@cgf.cx>
+
+ * libc/string/strsignal.c (strsignal): Avoid duplicate case statement
+ where SIGPWR == SIGLOST.
+
+2010-05-11 Jeff Johnston <jjohnstn@redhat.com>
+
+ * libc/stdlib/__call_atexit.c: Fix lock to be of type
+ _LOCK_RECURSIVE_T as recursive usage is needed.
+
+2010-05-11 Jeff Johnston <jjohnstn@redhat.com>
+
+ * libc/locale/locale.c (loadlocale): Fix dangling
+ switch statement caused by __HAVE_LOCALE_INFO__ not being
+ defined.
+
+2010-05-11 Joel Sherrill <joel.sherrill@oarcorp.com>
+
+ * libc/string/strsignal.c: New file.
+ * libc/string/Makefile.am: Add support for strsignal.
+ * libc/string/strings.tex: Ditto.
+ * libc/string/Makefile.in: Regenerated.
+
+2010-05-05 DJ Delorie <dj@redhat.com>
+
+ * libc/Makefile.am (stmp-sigset, stmp-iconvset, stmp-extra,
+ stmp-stdio64, stmp-posix,stmp-targetdep): Use unique temporary
+ file names to allow for parallel installs.
+ (CLEANFILES): Add new temporary file names.
+ * libc/Makefile.in: Regenerate.
+
+2010-05-03 Corinna Vinschen <corinna@vinschen.de>
+
+ * libc/locale/lctype.c: Include <string.h> and "setlocale.h".
+ (_C_ctype_locale): Add braces to initializer.
+ (__ctype_load_locale): Fix compiler warnings in non-Cygwin case.
+ * libc/locale/nl_langinfo.c (nl_langinfo): Expose _NL_CTYPE_MB_CUR_MAX
+ case only if __HAVE_LOCALE_INFO__ is defined.
+
+2010-05-02 Corinna Vinschen <corinna@vinschen.de>
+
+ * libc/stdlib/wctob.c (wctob): Reorganize and fix WEOF check. Rename
+ pwc to pmb and convert to array to avoid buffer overflow. Rename c to
+ wc. Check wc for WEOF instead of for EOF. Return first byte of pmb if
+ __wctomb conversion returned exactly one byte, EOF otherwise.
+
+2010-04-30 Corinna Vinschen <corinna@vinschen.de>
+
+ * libc/include/langinfo.h: Fix #endif positioning.
+
+2010-04-28 Corinna Vinschen <corinna@vinschen.de>
+
+ Extend locale support to maintain wide char values of native strings
+ if __HAVE_LOCALE_INFO_EXTENDED__ is defined.
+ * libc/include/langinfo.h (enum __nl_item): New type. Define all
+ native values accessible through nl_langinfo. Define previously
+ existing POSIX-compatible values as macros as well.
+ * libc/include/stdlib.h (__mb_cur_max): Drop declaration.
+ (__locale_mb_cur_max): Declare.
+ (MB_CUR_MAX): Re-define calling __locale_mb_cur_max.
+ * libc/locale/Makefile.am (ELIX_SOURCES): Add lctype.c.
+ * libc/locale/Makefile.in: Regenerate.
+ * libc/locale/lctype.c: New file to define and load LC_CTYPE category.
+ * libc/locale/lctype.h: New file, matching header.
+ * libc/locale/lmessages.c (_C_messages_locale): Add default values for
+ wide char members.
+ (__messages_load_locale): Add _C_messages_locale in call to
+ __set_lc_messages_from_win.
+ * libc/locale/lmessages.h (struct lc_messages_T): Add wide char members.
+ * libc/locale/lmonetary.c (_C_monetary_locale): Add default values for
+ wide char members.
+ (__monetary_load_locale): Add _C_monetary_locale in call to
+ __set_lc_monetary_from_win.
+ * libc/locale/lmonetary.h (struct lc_monetary_T): Add wide char members.
+ Add numerical values for international currency formatting per
+ POSIX-1.2008, if __HAVE_LOCALE_INFO_EXTENDED__ is defined.
+ * libc/locale/lnumeric.c (_C_numeric_locale): Add default values for
+ wide char members.
+ (__numeric_load_locale): Add _C_numeric_locale in call to
+ __set_lc_numeric_from_win.
+ * libc/locale/lnumeric.h (struct lc_numeric_T): Add wide char members.
+ * libc/locale/locale.c (loadlocale): Return doing nothing if category
+ locale didn't change. Convert category if chain to switch statement.
+ Call __ctype_load_locale in LC_CTYPE case.
+ (__locale_charset): Add (but disable for now) returning codeset from
+ __get_current_ctype_locale.
+ (__locale_mb_cur_max): Add (but disable for now) returning mb_cur_max
+ from __get_current_ctype_locale.
+ (__locale_msgcharset): Add returning codeset from
+ __get_current_messages_locale.
+ (_localeconv_r): Accommodate int_XXX values.
+ * libc/locale/nl_langinfo.c (nl_ext): New array to define what is to
+ be returned for non-POSIX values.
+ (nl_Langinfo): Return correct codeset for each locale category. Return
+ extended values if __HAVE_LOCALE_INFO_EXTENDED__ is defined.
+ * libc/locale/timelocal.c (_C_time_locale): Add default values for
+ wide char members.
+ (__time_load_locale): Add _C_time_locale in call to
+ __set_lc_time_from_win.
+ * libc/locale/timelocal.h (struct lc_time_T): Add wide char members.
+ * libc/stdio/vfwprintf.c (_VFWPRINTF_R): Use wide char decimal point
+ and thousands_sep if __HAVE_LOCALE_INFO_EXTENDED__ is defined.
+ * libc/time/strftime.c: Rework to accommodate availability of wide char
+ strings in LC_TIME category if __HAVE_LOCALE_INFO_EXTENDED__ is defined.
+
+2010-04-22 DJ Delorie <dj@redhat.com>
+
+ * libc/Makefile.am (SUBDEFS): Add LIBC_POSIX_DEF.
+ (libc.info): Add posix.texi.
+ (libc.dvi): Likewise.
+ (stmp-posix): New.
+ (posix.texi): New.
+ (libc_TEXINFOS): Add posix.texi.
+ * libc/configure.in (LIBC_POSIX_LIB, LIBC_POSIX_DEF): Add
+ tests.
+ * libc/libc.texinfo: Include posix.texi
+ * libc/locale/locale.c: Fix texinfo typo.
+ * libc/time/strftime.c: Fix texinfo typo.
+
+ * libc/configure: Regenerate.
+ * libc/Makefile.in: Regenerate.
+ * libc/argz/Makefile.in: Regenerate.
+ * libc/ctype/Makefile.in: Regenerate.
+ * libc/errno/Makefile.in: Regenerate.
+ * libc/iconv/Makefile.in: Regenerate.
+ * libc/iconv/ccs/Makefile.in: Regenerate.
+ * libc/iconv/ccs/binary/Makefile.in: Regenerate.
+ * libc/iconv/ces/Makefile.in: Regenerate.
+ * libc/iconv/lib/Makefile.in: Regenerate.
+ * libc/locale/Makefile.in: Regenerate.
+ * libc/misc/Makefile.in: Regenerate.
+ * libc/posix/Makefile.in: Regenerate.
+ * libc/reent/Makefile.in: Regenerate.
+ * libc/search/Makefile.in: Regenerate.
+ * libc/signal/Makefile.in: Regenerate.
+ * libc/stdio/Makefile.in: Regenerate.
+ * libc/stdio64/Makefile.in: Regenerate.
+ * libc/stdlib/Makefile.in: Regenerate.
+ * libc/string/Makefile.in: Regenerate.
+ * libc/syscalls/Makefile.in: Regenerate.
+ * libc/time/Makefile.in: Regenerate.
+ * libc/unix/Makefile.in: Regenerate.
+ * libc/xdr/Makefile.in: Regenerate.
+
+2010-04-06 Dave Korn <dave.korn.cygwin@googlemail.com>
+
+ * libc/stdlib/__atexit.c (__atexit_lock): Initialise as recursive
+ rather than non-recursive lock type.
+ (__register_exitproc): Use recursive locking APIs on it.
+ * libc/stdlib/__call_atexit.c (__call_exitprocs): Likewise.
+
+2010-04-06 Corinna Vinschen <corinna@vinschen.de>
+
+ * libc/stdlib/btowc.c (btowc): Reorganize EOF check. Fix incorrect
+ return value if input byte is ASCII NUL.
+
+2010-04-01 Joel Sherrill <joel.sherrill@oarcorp.com>
+
+ * libc/include/sched.h: Include prototypes for
+ sched_* methods.
+ * libc/include/sys/sched.h: Update to POSIX
+ 1003.1b-2008. Rework constants to allow sharing
+ between RTEMS and Cygwin.
+
+2010-03-27 Corinna Vinschen <corinna@vinschen.de>
+
+ * libc/locale/locale.c (loadlocale): Optimize "EUC" charset check.
+ Cygwin only: Allow GB2312 and EUC-CN as alternative codeset names
+ for GBK. Add to documentation.
+ * libc/locale/nl_langinfo.c (nl_langinfo): On Cygwin, translate EUCCN
+ to GB2312.
+
+2010-03-17 Craig Howland <howland@LGSInnovations.com>
+
+ * libc/include/sys/features.h: Allow for _XOPEN_SOURCE to have an
+ empty definition. Also add support for values of 500 or less.
+
+2010-03-09 Jeff Johnston <jjohnstn@redhat.com>
+
+ * libc/posix/telldir.c (dd_loccnt): Change start index to be 1
+ instead of 0.
+ (_seekdir): A loc of 0 now means rewind dir.
+
+2010-03-08 Craig Howland <howland@LGSInnovations.com>
+
+ * libm/common/s_rint.c: Fix error when integral part had 18 bits and
+ fraction had bits set beyond first radix bit. Also, make 2-part
+ adjustment consistent with 1-part adjustment when adjusting fractional
+ bits.
+ * libm/common/sf_rint.c: Make fractional-bit adjustment consistent
+ with s_rint.c by setting 0b.01 instead of 0b.001.
+
+2010-03-05 Craig Howland <howland@LGSInnovations.com>
+
+ * libm/math/ef_sqrt.c: Delete unused variable sign.
+ * libc/stdlib/getenv.c: Delete "char *_findenv_r ();", as is not a
+ proper prototype, and is properly prototyped in stdlib.h, anyway.
+ * libc/stdlib/getenv_r.c: Ditto.
+ * libc/search/hash.c: Add _DEFUN to __hash_open() declaration; add
+ #define __DBINTERFACE_PRIVATE to activate prototypes from db_local.h.
+ * libc/search/db_local.h: Correct __hash_open() prototype.
+ * libc/sys/linux/cmath/math_private.h: Eliminate compiler warnings:
+ Remove #define INFINITY (redefines from math.h); remove #define __isnanf
+ and #define __isinff isinff.
+
+2010-03-02 Craig Howland <howland@LGSInnovations.com>
+
+ * libc/include/sys/features.h: Add POSIX.1-permitted definition of
+ _POSIX_C_SOURCE if not already defined and _XOPEN_SOURCE has an
+ appropriate value. Specifically, check for POSIX.1-2008 & 2001 values.
+ * libc/include/sys/config.h: Add #include <sys/features.h> so that all
+ includes get the new check added to it.
+
+2010-03-02 Charles Wilson <cygwin@cwilson.fastmail.fm>
+
+ * libc/xdr/README: Correct grammatical errors.
+ * libc/include/rpc/types.h: Add public types used
+ by RPC implementations.
+ * libc/include/rpc/xdr.h: Add defines used by RPC
+ implementations.
+ * libc/xdr/Makefile.am: Eliminate automake warning.
+ * libc/xdr/Makefile.in: Regenerate.
+
+2010-03-02 Corinna Vinschen <corinna@vinschen.de>
+
+ * libc/xdr/Makefile.in: Regenerate.
+
+2010-03-02 Charles Wilson <cygwin@cwilson.fastmail.fm>
+
+ Add eXtensible Data Record (XDR) support
+ * configure.host: Build libc/xdr only on cygwin.
+ * Makefile.am: Install xdr headers.
+ * libc/configure.in: Support new libc/xdr subdirectory.
+ * libc/Makefile.am: Support new libc/xdr subdirectory.
+ * libc/include/rpc/types.h: New.
+ * libc/include/rpc/xdr.h: New.
+ * libc/xdr/README: New.
+ * libc/xdr/Makefile.am: New.
+ * libc/xdr/dummy.c: New.
+ * libc/xdr/xdr.c: New.
+ * libc/xdr/xdr_array.c: New.
+ * libc/xdr/xdr_float.c: New.
+ * libc/xdr/xdr_float_vax.c: New.
+ * libc/xdr/xdr_mem.c: New.
+ * libc/xdr/xdr_private.c: New.
+ * libc/xdr/xdr_private.h: New.
+ * libc/xdr/xdr_rec.c: New.
+ * libc/xdr/xdr_reference.c: New.
+ * libc/xdr/xdr_sizeof.c: New.
+ * libc/xdr/xdr_stdio.c: New.
+
+ Regenerate using ac-2.63 and am-1.11.1
+ * libc/xdr/Makefile.in: New.
+ * Makefile.in: Regenerate.
+ * libc/configure: Regenerate.
+ * libc/Makefile.in: Regenerate.
+ * libc/argz/Makefile.in: Regenerate.
+ * libc/ctype/Makefile.in: Regenerate.
+ * libc/errno/Makefile.in: Regenerate.
+ * libc/iconv/ccs/binary/Makefile.in: Regenerate.
+ * libc/iconv/ccs/Makefile.in: Regenerate.
+ * libc/iconv/ces/Makefile.in: Regenerate.
+ * libc/iconv/lib/Makefile.in: Regenerate.
+ * libc/iconv/Makefile.in: Regenerate.
+ * libc/locale/Makefile.in: Regenerate.
+ * libc/misc/Makefile.in: Regenerate.
+ * libc/posix/Makefile.in: Regenerate.
+ * libc/reent/Makefile.in: Regenerate.
+ * libc/search/Makefile.in: Regenerate.
+ * libc/signal/Makefile.in: Regenerate.
+ * libc/stdio/Makefile.in: Regenerate.
+ * libc/stdio64/Makefile.in: Regenerate.
+ * libc/stdlib/Makefile.in: Regenerate.
+ * libc/string/Makefile.in: Regenerate.
+ * libc/syscalls/Makefile.in: Regenerate.
+ * libc/time/Makefile.in: Regenerate.
+ * libc/unix/Makefile.in: Regenerate.
+
+2010-02-26 Craig Howland <howland@LGSInnovations.com>
+
+ * libm/common/s_ilogb.c: Fix typo in comments that causes doc
+ generation to fail.
+
+2010-02-26 Corinna Vinschen <corinna@vinschen.de>
+
+ * libc/time/strftime.c: Add support for era and alt_digits data from
+ LC_TIME locale category. Conditionalize using _WANT_C99_TIME_FORMATS
+ flag.
+ (STRTOUL): Define differently for building strftime or wcsftime.
+ (STRCPY): Ditto.
+ (STRCHR): Ditto.
+ (STRLEN): Ditto.
+ (CHECK_LENGTH): Define to simplify code.
+ (era_info_t): New type to store era info.
+ (get_era_info): New function to fetch era info matching incoming
+ struct tm.
+ (free_era_info): New function to free era info.
+ (alt_digits_t): New type to store alternative digits.
+ (get_alt_digits): New function to convert alt_digits string into
+ alt_digits_t structure.
+ (free_alt_digits): New function to free alt_digits info.
+ (conv_to_alt_digits): New function to convert unsigned value into
+ alternative digits.
+ (strftime): Conditionalize on _WANT_C99_TIME_FORMATS. If
+ _WANT_C99_TIME_FORMATS is defined, define as just a wrapper function
+ providing era_info and alt_digits pointers and call ...
+ (__strftime): Rename from strftime and make static if
+ _WANT_C99_TIME_FORMATS is defined. Add parameters for era_info and
+ alt_digits pointers. Handle conversion modifiers according to
+ POSIX-1.2008. Redefine %F and %Y according to POSIX. Add default case
+ to allow to bail out on invalid conversion specifiers.
+ * libc/include/sys/config.h: Move Cygwin build flags to Cygwin's
+ config.h.
+
+ * libc/include/stdio.h: Remove __CYGWIN_USE_BIG_TYPES__ condition.
+
+2010-02-25 Corinna Vinschen <corinna@vinschen.de>
+
+ * libc/locale/locale.c (loadlocale): Fix typo in comment.
+
+2010-02-25 Corinna Vinschen <corinna@vinschen.de>
+
+ * libc/locale/locale.c: Throughout, extensively comment on the
+ reason for using __CYGWIN__.
+ (lconv): Remove _CONST entirely.
+ (loadlocale): Guard calls to function loading locale-specific
+ category data with __HAVE_LOCALE_INFO__ rather than __CYGWIN__.
+ * libc/sys/config.h (__HAVE_LOCALE_INFO__): Define for Cygwin.
+
+2010-02-24 Charles Wilson <...>
+
+ Work around issues with new libtool files in ..
+ * configure.in: Unconditionally call _LT_PROG_ECHO_BACKSLASH.
+ * iconvdata/configure.in: Ditto.
+ * libc/configure.in: Ditto.
+ * libc/machine/configure.in: Ditto.
+ * libc/machine/i386/configure.in: Ditto.
+ * libc/sys/configure.in: Ditto.
+ * libc/sys/linux/configure.in: Ditto.
+ * libc/sys/linux/linuxthreads/configure.in: Ditto.
+ * libc/sys/linux/linuxthreads/machine/configure.in: Ditto.
+ * libc/sys/linux/linuxthreads/machine/i386/configure.in: Ditto.
+ * libc/sys/linux/machine/configure.in: Ditto.
+ * libc/sys/linux/machine/i386/configure.in: Ditto.
+ * libm/configure.in: Ditto.
+ * libm/machine/configure.in: Ditto.
+ * libm/machine/i386/configure.in: Ditto.
+ * libc/machine/sh/configure.in: Ditto. Also, call
+ AC_NO_EXECUTABLES before NEWLIB_CONFIGURE.
+ * aclocal.m4: Regenerated.
+ * configure: Ditto.
+ * Makefile.in: Ditto.
+ * doc/aclocal.m4: Ditto.
+ * doc/Makefile.in: Ditto.
+ * libc/*/aclocal.m4: Ditto.
+ * libc/*/Makefile.in: Ditto.
+ * libc/*/configure: Ditto.
+ * libm/*/aclocal.m4: Ditto.
+ * libm/*/Makefile.in: Ditto.
+ * libm/*/configure: Ditto.
+
+2010-02-24 Jeff Johnston <jjohnstn@redhat.com>
+
+ * libc/stdlib/__call_exit.c: Add include of sys/lock.h.
+
+2010-02-23 Jeff Johnston <jjohnstn@redhat.com>
+
+ * libc/include/sys/types.h: Fix __XMK__ sectioning and remove
+ redundant code section for __XMK__.
+
+2010-02-22 Corinna Vinschen <corinna@vinschen.de>
+
+ * libc/include/langinfo.h (_NL_TIME_DATE_FMT): Define new nl_item
+ value for LC_TIME entry date_fmt.
+ (_DATE_FMT): Define "official" GNU name same as _NL_TIME_DATE_FMT.
+ * libc/locale/nl_langinfo.c (nl_langinfo): Add case for _DATE_FMT.
+
+2010-02-18 Corinna Vinschen <corinna@vinschen.de>
+
+ * libc/ctype/iswalpha.c (iswalpha): Update to Unicode 5.2.
+ * libc/ctype/iswprint.c (iswprint): Ditto.
+ * libc/ctype/iswpunct.c (iswpunct): Drop standalone implementation.
+ Define in terms of other wctype functions instead.
+ * libc/ctype/towlower.c (towlower): Update to Unicode 5.2. Add comment
+ to explain how to fetch the data from the Unicode database.
+ * libc/ctype/towupper.c (towupper): Ditto.
+ * libc/ctype/utf8alpha.h: Ditto.
+ * libc/ctype/utf8print.h: Ditto.
+ * libc/ctype/utf8punct.h: Remove.
+ * libc/ctype/iswcntrl.c (iswcntrl): Add comment to explain how to
+ fetch the data from the Unicode database.
+
+2010-02-18 Corinna Vinschen <corinna@vinschen.de>
+
+ * libc/locale/timelocal.h (struct lc_time_T): Add missing ERA-related
+ members.
+ * libc/locale/timelocal.c (_C_time_local): Set new members to empty
+ strings.
+ * libc/locale/nl_langinfo.c (nl_langinfo): Return values from
+ __get_current_time_locale() for ERA related requests.
+
+2010-02-16 Corinna Vinschen <corinna@vinschen.de>
+
+ * libc/ctype/iswblank.c (iswblank): Remove Unicode characters
+ U+00A0 and U+200B. Add Unicode character U+180E. Add comment
+ to explain how to generate from Unicode data file.
+ * libc/ctype/iswspace.c (iswspace): Ditto.
+
+2010-02-15 Corinna Vinschen <corinna@vinschen.de>
+
+ * libc/stdio/vfwprintf.c (_VFWPRINTF_R): Apply previous patch here
+ as well.
+
+2010-02-15 Corinna Vinschen <corinna@vinschen.de>
+
+ * libc/stdio/vfprintf.c (_VFPRINTF_R): Drop printing a redundant
+ decimal point in case the float argument is an integral value.
+
+2010-02-11 Craig Howland <howland@LGSInnovations.com>
+
+ * libc/include/machine/ieeefp.h: isfinite macro modified to run faster
+ by only calling fpclassify once instead of possibly twice.
+
+2010-02-11 Craig Howland <howland@LGSInnovations.com>
+
+ * libm/common/s_ilogb.c: Adjust documentation to reflect new returns
+ (see next items) and that ilogb() and ilogbf() are C99/POSIX.
+ * libm/common/s_ilogb.c (ilogb): Use C99/POSIX FP_ILOGB0 and
+ FP_ILOGBNAN returns for 0 and NAN arguments, respectively, instead of
+ the prior -INT_MAX and INT_MAX. The FP_ILOGBx defines in math.h
+ presently match the prior hard-codes, so no functional change is
+ actually introduced. (Not at this time, nor planned, but the values
+ are permitted to be different, so subsequent edits of math.h could
+ possibly cause a functional change.)
+ * libm/common/sf_ilogb.c (ilogbf): Ditto.
+
+2010-02-09 Daniel Gutson <dgutson@codesourcery.com>
+
+ * libc/machine/arm/arm_asm.h (_ISA_THUMB_2): __ARM_ARCH_7EM__
+ added to the preprocessor condition.
+
+2010-02-09 Corinna Vinschen <corinna@vinschen.de>
+
+ * libc/locale/lmessages.c (__messages_load_locale): Take additional
+ parameters for wide char to multibyte conversion. Call
+ __set_lc_messages_from_win on Cygwin.
+ * libc/locale/lmessages.h: Make C++-safe.
+ (__messages_load_locale): Change declaration.
+ * libc/locale/lmonetary.c (__monetary_load_locale): Use
+ _monetary_locale_buf as buffer pointer.
+ * libc/locale/lnumeric.c (__numeric_load_locale): Use
+ _numeric_locale_buf as buffer pointer.
+ * libc/locale/timelocal.c (__time_load_locale): Use time_locale_buf
+ as buffer pointer.
+ * libc/locale/locale.c (loadlocale): Enable loading LC_MESSAGES data
+ on Cygwin.
+
+2010-02-08 Josef Wolf <jw@raven.inka.de>
+
+ * libc/machine/m68k/memcpy.S: MISALIGEND_OK should not be set for
+ __mcpu32__.
+
+2010-02-07 Corinna Vinschen <corinna@vinschen.de>
+
+ * libc/locale/locale.c: Add Cygwin's /usr/share/locale/locale.alias
+ support to documentation.
+ (__set_locale_from_locale_alias): Declare when build for Cygwin.
+ (loadlocale): On Cygwin, if locale can't be recognized, call
+ __set_locale_from_locale_alias to check for locale alias.
+ Define FAIL macro to replace `return NULL' statements. Replace
+ throughout.
+
+2010-02-07 Corinna Vinschen <corinna@vinschen.de>
+
+ * libc/locale/locale.c: Fix typo in documentation. Remove useless
+ _MB_CAPABLE guards within other _MB_CAPABLE guards. Add comment
+ to remaining #endif's.
+
+2010-02-06 Corinna Vinschen <corinna@vinschen.de>
+
+ * libc/ctype/ctype_cp.h (_CTYPE_GEORGIAN_PS_128_254): Define.
+ (_CTYPE_GEORGIAN_PS_255): Define.
+ (_CTYPE_PT154_128_254): Define.
+ (_CTYPE_PT154_255): Define.
+ (__ctype_cp): Add array members for above ctype definitions.
+ * libc/locale/locale.c (loadlocale): Make TIS-620 charset name
+ available for all targets. Add guards for setting the conversion
+ function pointers. Add support for GEORGIAN-PS and PT154 charsets.
+ Change documentation to reflect current behaviour more closely.
+ * libc/locale/nl_langinfo.c (nl_langinfo): On Cygwin, translate
+ "CP101" to "GEORGIAN-PS" and "CP102" to "PT154".
+ * libc/stdlib/sb_charsets.c (__cp_conv): Add conversion arrays
+ for GEORGIAN-PS and PT154.
+ (__cp_index): Map invalid Windows codepage number 101 to
+ GEORGIAN-PS conversion array, 102 to PT154 conversion array.
+
+2010-02-06 Ralf Corsepius <ralf.corsepius@rtems.org>
+
+ * libc/posix/telldir.c: Remove bogus nested prototype of lseek().
+
+2010-02-05 Corinna Vinschen <corinna@vinschen.de>
+
+ * libc/locale/locale.c (loadlocale): Handle ISO-8859 and KOI8 charsets
+ so that the dashes are optional. Align documentation.
+
+2010-02-05 Corinna Vinschen <corinna@vinschen.de>
+
+ * libc/stdio/vfprintf.c: Include locale.h also if _WANT_IO_C99_FORMATS
+ is defined. Raise conversion buffer size to make sure it has enough
+ room for numbers plus grouping character. Define GROUPING flag.
+ (_VFPRINTF_R): Add PRINTANDPAD macro. Handle grouping flag character.
+ Handle grouping for decimal integer and float values.
+ * libc/stdio/vfwprintf.c: Ditto.
+
+2010-02-01 Christopher Faylor <me+cygwin@cgf.cx>
+
+ * libc/stdlib/__atexit.c (__atexit_lock): Define a global lock for
+ atexit functions.
+ (__register_exitproc): Use __atexit_lock rather than a local static
+ lock.
+ * libc/stdlib/__call_atexit.c: Ditto.
+
+2010-01-29 Jeff Johnston <jjohnstn@redhat.com>
+
+ * libc/search/Makefile.am: Create .def files for bsearch and qsort.
+ * libc/search/Makefile.in: Regenerated.
+ * libc/stdlib/stdlib.tex: Add bsearch and qsort.
+
+2010-01-24 Corinna Vinschen <corinna@vinschen.de>
+
+ * libc/locale/nl_langinfo.c (nl_langinfo): Return "CP932" when using
+ SJIS on Cygwin. Explain why.
+
+2010-01-23 Corinna Vinschen <corinna@vinschen.de>
+
+ * libc/locale/locale.c (loadlocale): Allow CP932 as alias for SJIS.
+ Add to documentation. Add a few comments to #endif's for Cygwin.
+
+2010-01-23 Corinna Vinschen <corinna@vinschen.de>
+
+ * libc/locale/locale.c (loadlocale): Disable JIS entirely on Cygwin.
+ Allow TIS620 and TIS-620 as aliases for CP874 on Cygwin.
+
+2010-01-22 Corinna Vinschen <corinna@vinschen.de>
+
+ * libc/locale/lmonetary.c (__monetary_load_locale): Take additional
+ parameters for wide char to multibyte conversion. Call
+ __set_lc_monetary_from_win on Cygwin.
+ * libc/locale/lmonetary.h: Make C++-safe.
+ (__monetary_load_locale): Change declaration.
+ * libc/locale/lnumeric.c (__numeric_load_locale): Take additional
+ parameters for wide char to multibyte conversion. Call
+ __set_lc_numeric_from_win on Cygwin.
+ * libc/locale/lnumeric.h: Make C++-safe.
+ (__numeric_load_locale): Change declaration.
+ * libc/locale/locale.c (lconv): De-constify for Cygwin.
+ (__set_charset_from_locale): Rename from
+ __set_charset_from_codepage. Take locale as parameter instead of
+ a codepage.
+ (loadlocale): Allow "EUC-JP" for "EUCJP" and "EUC-KR" for "EUCKR".
+ Change documnetation accordingly. Enable LC_COLLATE, LC_MONETARY,
+ LC_NUMERIC, and LC_TIME handling on Cygwin.
+ (_localeconv_r): On Cygwin, copy values from monetary and numeric
+ domain if change has been noted.
+ * libc/locale/nl_langinfo.c (nl_langinfo): Accommodate change of
+ am/pm layout in struct lc_time_T.
+ * libc/locale/timelocal.c (_C_time_locale): Accommodate
+ redefinition of am/pm members.
+ (__time_load_locale): Take additional parameters for wide char
+ to multibyte conversion. Call __set_lc_time_from_win on Cygwin.
+ * libc/locale/timelocal.h: Make C++-safe.
+ (struct lc_time_T): Convert am and pm to a am_pm array for easier
+ consumption by strftime and strptime.
+ (__time_load_locale): Change declaration.
+ * libc/time/strftime.c: Change documentation to reflect changes to
+ strftime. Remove locale constant strings in favor of access to
+ locale-specifc data.
+ (_ctloc): Define access method for locale-specifc data.
+ (TOLOWER): Define for tolower conversion.
+ (strftime): Throughout, convert locale-specific formats to use
+ locale-specific data. Add GNU-specific "%P" format.
+ * libc/time/strptime.c: Remove locale constant strings in favor of
+ access to locale-specifc data.
+ (_ctloc): Define access method for locale-specifc data.
+ (strptime): Throughout, convert locale-specific formats to use
+ locale-specific data.
+
+2010-01-20 Corinna Vinschen <corinna@vinschen.de>
+
+ * libc/locale/nl_langinfo.c (nl_langinfo): On Cygwin, translate
+ often-used charsets into Linux compatible codesets.
+
+2010-01-19 Andy Koppe <andy.koppe@gmail.com>
+
+ * libc/stdio/vfscanf.c (__SVFSCANF_R): Fix handling of non-ASCII
+ characters and allow invalid bytes in format string.
+
+2010-01-19 Corinna Vinschen <corinna@vinschen.de>
+
+ * libc/stdlib/wcstombs_r.c (_wcstombs_r): Handle invalid characters
+ correctly also in the s==NULL case.
+
+2010-01-17 Corinna Vinschen <corinna@vinschen.de>
+
+ * libc/locale/locale.c (loadlocale): Change comments to refer to
+ ISO 639-3 rather than 639-2.
+
+2010-01-17 Corinna Vinschen <corinna@vinschen.de>
+
+ * libc/locale/locale.c (loadlocale): Allow three character
+ language codes to accommodate ISO 639-2 codes.
+
+2010-01-17 Corinna Vinschen <corinna@vinschen.de>
+
+ * libc/locale/locale.c (lc_ctype_charset): Disable defaulting to
+ "UTF-8" on Cygwin.
+ (lc_message_charset): Ditto.
+ (loadlocale): Disable setting charset of the "C" locale to "UTF-8" on
+ Cygwin.
+ * libc/stdlib/mbtowc_r.c (__mbtowc): Add Cygwin-specific comment.
+ * libc/stdlib/wctomb_r.c (__wctomb): Ditto.
+
+2010-01-14 Corinna Vinschen <corinna@vinschen.de>
+
+ * libc/include/sys/_default_fcntl.h (O_CLOEXEC): Define as _FNOINHERIT.
+ (F_DUPFD_CLOEXEC): Define for Cygwin.
+ * libc/include/sys/unistd.h (dup3): Define for Cygwin.
+ (pipe2): Ditto.
+
+2010-01-14 Corinna Vinschen <corinna@vinschen.de>
+
+ * libc/stdio/vfprintf.c (_VFPRINTF_R): Just wave bytes invalid in
+ the current charset through.
+
+2010-01-11 Sebastian Huber <sebastian.huber@embedded-brains.de>
+
+ * libc/posix/telldir.c (_cleanupdir): Fixed usage of freed memory.
+
+2010-01-11 Yaakov Selkowitz <yselkowitz@users.sourceforge.net>
+
+ * libc/include/math.h (log2, log2f): Disable macro versions for C++,
+ as they are incompatible with OpenMP/C++ headers.
+
+2010-01-10 Corinna Vinschen <corinna@vinschen.de>
+
+ * libc/stdlib/mbtowc_r.c (__ascii_mbtowc): Disallow conversion of
+ non-ASCII chars on Cygwin.
+ * libc/stdlib/wctomb_r.c (__ascii_wctomb): Ditto.
+
+2009-12-22 Eric Blake <ebb9@byu.net>
+
+ * libc/include/sys/unistd.h (suboptarg, getsubopt): Move...
+ * libc/include/stdlib.h: ...here, to match POSIX for getsubopt.
+
+2009-12-17 Jeff Johnston <jjohnstn@redhat.com>
+
+ * NEWS: Update with 1.18.0 info.
+ * README: Ditto.
+ * acinclude.m4: Change version number to 1.18.0.
+ * aclocal.m4: Regenerated.
+ * configure: Ditto.
+ * doc/aclocal.m4: Ditto.
+ * doc/configure: Ditto.
+ * libc/*/aclocal.m4: Ditto.
+ * libc/*/configure: Ditto.
+ * libc/libc.texinfo: Ditto.
+ * libm/*/aclocal.m4: Ditto.
+ * libm/*/configure: Ditto.
+ * libm/libm.texinfo: Ditto.
+ * libc/sys/linux/shared.ld: Add VERS_1.18
+
+2009-12-17 Jeff Johnston <jjohnstn@redhat.com>
+
+ * libc/include/_syslist.h: Add _mkdir transform.
+
+2009-12-17 Jerker Back <jerker.back@gmail.com>
+
+ * libc/iconv/lib/local.h[!__GNUC__]: Add alternative version of
+ ICONV_ZERO_MB_STATE_T macro.
+ * libc/iconv/lib/ucsconv.c (ucs_based_conversion_get_state): Use
+ temporary local variable nullstate to hold empty mbstate_t.
+
+2009-12-17 Jerker Back <jerker.back@gmail.com>
+
+ * libc/include/_ansi.h: Add new _EXFNPTR macro for using with
+ function pointer arguments.
+ * libc/iconv/lib/conv.h: Use _EXFNPTR rather than _EXPARM macro.
+ * libc/iconv/lib/ucsconv.h: Ditto.
+ * libc/include/stdlib.h: Use new _EXFNPTR macro for function pointers.
+ * libc/include/sys/reent.h: Ditto.
+ * libc/include/sys/unistd.h: Ditto.
+ * libc/search/bsearch.c: Ditto.
+ * libc/stdio/fseek.c: Ditto.
+ * libc/stdio64/fseeko64.c: Ditto.
+ * libc/stdlib/atexit.c: Ditto.
+ * libc/stdlib/on_exit.c: Ditto.
+
+2009-12-17 Ralf Corsépius <ralf.corsepius@rtems.org>
+
+ * libc/include/machine/ieeefp.h: Rework __IEEE_*_ENDIAN handling.
+ * libc/machine/arm/machine/endian.h: Remove (Conflicts with
+ libc/include/machine/endian.h)
+
+2009-12-17 Ralf Corsépius <ralf.corsepius@rtems.org>
+
+ * libc/include/machine/setjmp.h: Set up _JBLEN #ifdef __m68k__.
+
+2009-12-17 Ralf Corsepius <ralf.corsepius@rtems.org>
+
+ * libc/include/pthread.h: Add pthread_atfork, pthread_rwlock_unlock
+ * libc/include/sys/stat.h: Use struct timespec st_*tim,
+ blksize_t st_blksize, blkcnt_t st_blocks.
+ Add st_*time compatibility macros.
+
+2009-12-16 Joel Sherrill <joel.sherrill@oarcorp.com>
+
+ * libc/sys/rtems/machine/param.h: Only use sizeof(double) -1
+ for ALIGNBYTES on SPARC.
+
+2009-12-16 Jeff Johnston <jjohnstn@redhat.com>
+
+ * libc/include/sys/errno.h: Move EHOSTDOWN, EPFNOSUPPORT,
+ and ETOOMANYREFS into general list as they are referenced
+ by OpenGroup and needed by RTEMS.
+
+2009-12-16 Ralf Corsépius <ralf.corsepius@rtems.org>
+
+ * libc/search/hcreate.c: Don't include <sys/queue.h> (Unused).
+
+2009-12-16 Ralf Corsépius <ralf.corsepius@rtems.org>
+
+ * libc/sys/rtems/machine/_types.h: New (Derived from
+ machine/_default_types.h).
+ * libc/sys/rtems/crt0.c: Rework. Introduce macro RTEMS_STUB.
+ * libc/sys/rtems/sys/param.h:
+ Update copyright notice from FreeBSD.
+ Remove HZ.
+ Add #include <sys/priority.h>
+ Remove priority handling (moved to sys/priority.h).
+ Remove CLBYTES (Unused, abandoned in BSD).
+ * libc/sys/rtems/sys/queue.h: Update copyright (from FreeBSD).
+ Remove CIRCLEQ_*.
+
+2009-12-15 Conny Marco Menebrocker <c-m-m@gmx.de>
+
+ * libc/machine/xc16x/Makefile.am: Fix typo and refer
+ to puts.c instead of putc.c.
+ * libc/machine/xc16x/Makefile.in: Regenerated.
+
+2009-12-14 Maxim Kuvyrkov <maxim@codesourcery.com>
+
+ * libc/machine/m68k/memcpy.S: Patch to support
+ boards which do not support unaligned read/write.
+
+2009-12-10 Conny Marco Menebrocker <c-m-m@gmx.de>
+
+ * configure.host: Add xc16x support.
+ * libc/include/machine/ieeefp.h: Ditto.
+ * libc/include/sys/config.h: Ditto.
+ * libc/machine/configure.in: Ditto.
+ * libc/machine/Makefile.in: Regenerated.
+ * libc/machine/aclocal.m4: Ditto.
+ * libc/machine/configure: Ditto.
+ * libc/machine/xc16x/Makefile.am: New file.
+ * libc/machine/xc16x/Makefile.in: Ditto.
+ * libc/machine/xc16x/aclocal.m4: Ditto.
+ * libc/machine/xc16x/configure: Ditto.
+ * libc/machine/xc16x/configure.in: Ditto.
+ * libc/machine/xc16x/putchar.c: Ditto.
+ * libc/machine/xc16x/puts.c: Ditto.
+ * libc/machine/xc16x/setjmp.S: Ditto.
+
+2009-12-08 Eric Blake <ebb9@byu.net>
+
+ Fix some *at declarations.
+ * libc/include/stdio.h (symlinkat): Move this...
+ * libc/include/sys/_default_fcntl.h (unlinkat): ...and this...
+ * libc/include/sys/unistd.h (symlinkat, unlinkat): ...here, to
+ match POSIX.
+
+2009-12-03 Craig Howland <howland@LGSInnovations.com>
+
+ * libc/stdlib/strtod.c: Correct "NO_REENT" to "_REENT_ONLY".
+ * libc/stdlib/wcstod.c: Ditto.
+ * libc/stdlib/dtoastub.c: Ditto.
+
+2009-11-23 Corinna Vinschen <corinna@vinschen.de>
+
+ Use NetBSD fix for CVE-2009-0689 security vulnerability.
+ * libc/include/sys/reent.h (_Kmax): Define here based on the sizeof
+ size_t, as in latest NetBSD.
+ * libc/reent/reent.c (_reclaim_reent): Use _Kmax rather than constant
+ value 15.
+ * libc/stdlib/mprec.c (_Kmax): Don't define here. Explain why.
+
+2009-11-20 Nick Clifton <nickc@redhat.com>
+
+ * libc/machine/rx/strncat.S (_strncat): Replace use of r6
+ (call-saved) with r14 (call-used).
+
+2009-11-18 Dave Korn <dave.korn.cygwin@googlemail.com>
+
+ * libm/machine/i386/f_tan.S (_f_tan): Free fp stack register
+ containing useless constant before advancing fp sp over it.
+ (_f_tanf): Likewise.
+
+2009-11-18 Corinna Vinschen <corinna@vinschen.de>
+
+ * libc/stdio/vfprintf.c: Include ../stdlib/local.h. Replace call to
+ _mbtowc_r with direct call to __mbtowc.
+ * libc/stdio/vfscanf.c: Ditto.
+ * libc/stdlib/btowc.c: Include local.h. Replace call to _mbtowc_r
+ with direct call to __mbtowc.
+ * libc/stdlib/mblen.c: Ditto.
+ * libc/stdlib/mblen_r.c: Ditto.
+ * libc/stdlib/mbrtowc.c: Ditto.
+ * libc/stdlib/mbstowcs_r.c: Ditto.
+ * libc/stdlib/mbtowc.c: Ditto.
+ * libc/stdlib/wcrtomb.c: Include local.h. Replace call to _wctomb_r
+ with direct call to __wctomb.
+ * libc/stdlib/wcsnrtombs.c: Ditto.
+ (_wcsnrtombs_r): Ditto.
+ * libc/stdlib/wcstombs_r.c: Ditto.
+ * libc/stdlib/wctob.c: Ditto.
+ * libc/stdlib/wctomb.c: Ditto.
+
+ * libc/stdlib/mbrtowc.c (mbrtowc): Implement independently from
+ _mbrtowc_r, unless PREFER_SIZE_OVER_SPEED or __OPTIMIZE_SIZE__ are
+ defined.
+ * libc/stdlib/wcrtomb.c (wcrtomb): Implement independently from
+ _wcrtomb_r, unless PREFER_SIZE_OVER_SPEED or __OPTIMIZE_SIZE__ are
+ defined.
+
+ * libc/stdlib/mbtowc_r.c (__utf8_mbtowc): Drop unnecessary test for
+ ch >= 0.
+
+2009-11-17 Yaakov Selkowitz <yselkowitz@users.sourceforge.net>
+
+ * libm/common/fdlibm.h (logb, logbf): Move decls from here...
+ * libc/include/math.h (logb, logbf): ...to here.
+
+2009-11-06 Jon Turney <jon.turney@dronecode.org.uk>
+
+ * libc/include/ctype.h (__ctype_lookup): Fix precedence.
+
+2009-10-30 Corinna Vinschen <corinna@vinschen.de>
+
+ * libc/stdio/fflush.c (_fflush_r): Store old errno to check for
+ low-level seek error condition. Restore old errno in case of
+ success. Don't use new position after seek as error condition,
+ rather check for return value of -1 and errno. Handle EINVAL
+ just like ESPIPE. Only set fp->_offset if errno is 0.
+
+2009-10-27 Nick Clifton <nickc@redhat.com>
+
+ * MAINTAINERS (ARM): Add myself as an ARM maintainer.
+
+2009-10-26 DJ Delorie <dj@redhat.com>
+
+ * configure.host: Add support for RX architecture.
+ * libc/include/machine/ieeefp.h: Likewise.
+ * libc/include/machine/setjmp.h: Likewise.
+ * libc/include/machine/configure.in: Likewise.
+ * libc/include/machine/configure: Regenerate.
+ * libc/machine/rx: New directory.
+ * libc/machine/rx/*: New files to support RX architecture.
+
+2009-10-24 Eric Blake <ebb9@byu.net>
+
+ * libc/include/ctype.h (__ctype_lookup): New macro.
+ (isalpha, isupper, islower, isdigit, isxdigit, isspace, ispunct)
+ (isalnum, isprint, isgraph, iscntrl, isblank): Use it to fix bug
+ on 64-bit machines.
+
+2009-10-20 Jeff Johnston <jjohnstn@redhat.com>
+
+ * configure.host: Don't set -O2 flag in newlib_cflags. Leave
+ that to CFLAGS.
+ * acinclude.m4: Don't reset CFLAGS before calling _AC_PROG_CC_G
+ as it sets the same flags as we are using.
+ * aclocal.m4: Regenerated.
+ * configure: Ditto.
+ * Makefile.in: Ditto.
+ * iconvdata/aclocal.m4: Ditto.
+ * iconvdata/configure: Ditto.
+ * iconvdata/Makefile.in: Ditto.
+ * doc/aclocal.m4: Ditto.
+ * doc/configure: Ditto.
+ * doc/Makefile.in: Ditto.
+ * libc/aclocal.m4: Ditto.
+ * libc/configure: Ditto.
+ * libc/Makefile.in: Ditto.
+ * libc/*Makefile.in: Ditto.
+ * libc/*aclocal.m4: Ditto.
+ * libc/*configure: Ditto.
+ * libm/*Makefile.in: Ditto.
+ * libm/*aclocal.m4: Ditto.
+ * libm/*configure: Ditto.
+
+2009-10-16 Jeff Johnston <jjohnstn@redhat.com>
+
+ * libc/include/sys/config.h[__CYGWIN__]: Set __USE_XOPEN2K flag
+ if not __STRICT_ANSI__ or stdc version C99 or greater.
+ * libc/include/stdio.h[__STRICT_ANSI__]: Add __USE_XOPEN2K check
+ for fseeko and ftello prototypes.
+
+2009-10-15 Corinna Vinschen <corinna@vinschen.de>
+
+ * libc/include/wchar.h (struct tm0: Declare as incomplete type.
+
+2009-10-15 Corinna Vinschen <corinna@vinschen.de>
+
+ * libc/locale/nl_langinfo.c (nl_langinfo): Add Cygwin-specific temporary
+ exception for KOI8 charsets.
+
+2009-10-13 Eric Blake <ebb9@byu.net>
+
+ * libc/include/sys/unistd.h: Add _PC*, _CS*, and _SC* constants
+ new to POSIX 2008.
+
+2009-10-13 Yaakov Selkowitz <yselkowitz@users.sourceforge.net>
+
+ * libc/include/sys/signal.h: Include <sys/types.h> always.
+ [__CYGWIN__, __rtems__]: Define kill first argument as pid_t per
+ standards.
+
+2009-10-09 Dave Korn <dave.korn@artimi.com>
+
+ * libc/include/sys/time.h (_TIMEVAL_DEFINED): Define when
+ defining struct timeval.
+
+2009-10-09 Corinna Vinschen <corinna@vinschen.de>
+
+ * libc/locale/locale.c (DEFAULT_LOCALE): New define.
+ (__default_locale): New global variable set to the default locale.
+ (__get_locale_env): Return __default_locale rather than fixed "C".
+
+2009-10-08 Jeff Johnston <jjohnstn@redhat.com>
+
+ * configure.host: For RTEMS, define HAVE_ASSERT_FUNC.
+ * libc/stdlib/assert.c (_assert_func): Do not specify
+ __assert_func if HAVE_ASSERT_FUNC flag is set.
+
+2009-10-08 Eric Blake <ebb9@byu.net>
+
+ * libc/include/getopt.h (__getopt_r, __getopt_long_r)
+ (__getopt_long_only_r): Protect declarations, to avoid compiler
+ warning.
+
+2009-10-07 Corinna Vinschen <corinna@vinschen.de>
+
+ * libc/locale/nl_langinfo.c (nl_langinfo): Just return current locale
+ charset on Cygwin.
+
+2009-10-03 Corinna Vinschen <corinna@vinschen.de>
+
+ * libc/stdlib/mbtowc_r.c (__utf8_mbtowc): Allow CESU-8 surrogate
+ value encoding.
+ * libc/stdlib/wctomb_r.c (__utf8_mbtowc): Allow CESU-8 surrogate
+ value decoding.
+
+2009-09-29 Corinna Vinschen <corinna@vinschen.de>
+
+ * libc/locale/locale.c (loadlocale): Allow "C." same as "C-" as locale
+ prefix. Add some words to documentation.
+
+2009-09-29 Corinna Vinschen <corinna@vinschen.de>
+
+ * libc/stdlib/sb_charsets.c: Throughout, translate undefined
+ characters to their corresponding Windows Unicode value.
+
+2009-09-28 Michael Eager <eager@eagercon.com>
+
+ * configure.host: Add microblaze.
+ * libc/include/machine/ieeefp.h [MICROBLAZE]: Define __IEEE_BIG_ENDIAN.
+ * libc/include/machine/setjmp.h [MICROBLAZE]: Define _JBLEN, _JBTYPE.
+ * libc/include/sys/config.h [MICROBLAZE]: Define _REENT_SMALL,
+ _UNIX98_THREAD_MUTEX_ATTRIBUTES.
+ * libc/include/sys/types.h: Treat XMK like rtems, define
+ PTHREAD_MUTEX_NORMAL, PTHREAD_MUTEX_ERRORCHECK, PTHREAD_MUTEX_RECURSIVE,
+ PTHREAD_MUTEX_DEFAULT, PTHREAD_STACK_MIN, define stuct pthread_attr_s.
+ * libc/machine/configure.in: Add microblaze.
+ * libc/machine/configure: Add microblaze (not regenerated).
+ * libc/machine/microblaze/configure.in: NEW.
+ * libc/machine/microblaze/configure: Generate.
+ * libc/machine/microblaze/Makefile.am: NEW.
+ * libc/machine/microblaze/Makefile.in: Generate.
+ * libc/machine/microblaze/{abort.c, strcmp.c, strcpy.c, strlen.c,
+ mallocr.c, longjmp.S, setjmp.S}: NEW.
+ * libc/stdlib/mallocr.c [MICROBLAZE]: Don't declare sbrk prototype,
+ mALLOc(): return malloc value.
+
+2009-09-27 Corinna Vinschen <corinna@vinschen.de>
+
+ * libc/locale/locale.c (lc_ctype_charset): Set to "UTF-8" on Cygwin.
+ (lc_message_charset): Ditto.
+ (loadlocale): Set charset of the "C" locale to "UTF-8" on Cygwin.
+ * libc/stdlib/mbtowc_r.c (__mbtowc): Default to __utf8_mbtowc on
+ Cygwin.
+ * libc/stdlib/wctomb_r.c (__wctomb): Default to __utf8_wctomb on
+ Cygwin.
+
+2009-09-26 Eric Blake <ebb9@byu.net>
+
+ * libc/include/sys/unistd.h (execvpe, fexecve) [__CYGWIN__]:
+ Add declarations.
+
+2009-09-24 Eric Blake <ebb9@byu.net>
+
+ * libc/include/sys/unistd.h (eaccess, euidaccess) [__CYGWIN__]:
+ Add declarations.
+
+2009-09-23 Corinna Vinschen <corinna@vinschen.de>
+
+ * libc/locale/locale.c: Drop Cygwin-specific windows.h include.
+ (loadlocale): Call __set_charset_from_codepage with 0 codepage.
+
+2009-09-22 Ralf Corsépius <ralf.corsepius@rtems.org>
+
+ * libc/include/stdlib.h: Add posix_memalign.
+
+2009-09-22 Ralf Corsépius <ralf.corsepius@rtems.org>
+
+ * configure.host (*-rtems*): Remove -DMISSING_SYSCALL_NAMES.
+ Add -DHAVE_BLKSIZE, -D_NO_WORDEXP -D_NO_POPEN.
+
+2009-09-22 Ralf Corsépius <ralf.corsepius@rtems.org>
+
+ * configure.host (m32c): Move setting -DABORT_PROVIDED to second
+ "case $host".
+
+2009-09-18 Christopher Faylor <me+cygwin@cgf.cx>
+
+ * libc/include/sys/unistd.h: Declare getpagesize as returning
+ POSIX-mandated int.
+ * libc/sys/linux/sys/unistd.h: Ditto.
+
+2009-08-31 Takaki Makino <t@snowelm.com>
+
+ * libm/machine/i386/f_pow.c(_f_pow): Alter ASM so it works with
+ newer gcc versions.
+ * libm/maachine/i386/f_powf.c(_f_powf): Ditto.
+
+2009-08-25 Andy Koppe <andy.koppe@gmail.com>
+
+ * libc/stdlib/sb_charsets.c (__micro_atoi): Allow five-digit codepage
+ numbers.
+ * libc/locale/locale.c (loadlocale): Set MB_CUR_MAX to 1 for KOI8
+ charsets.
+ * libc/stdlib/local.h (__cp_conv): Remove incorrect number of codepages.
+
+2009-08-24 Corinna Vinschen <corinna@vinschen.de>
+
+ * libc/locale/locale.c: Update documentation.
+ (loadlocale): Map "KOI8-R" and "KOI8-U" to CP20866 and CP21866.
+
+2009-08-24 Andy Koppe <andy.koppe@gmail.com>
+
+ * libc/stdlib/sb_charsets.c (__cp_conv): Add KOI8-R (Russian, CP20866)
+ and KOI8-U (Ukrainian, CP21866) to Windows codepage conversion tables.
+ * libc/ctype/ctype_cp.h (__ctype_cp): Likewise for ctype tables.
+
+2009-08-24 Andy Koppe <andy.koppe@gmail.com>
+
+ * libc/ctype/iswspace.c (iswspace): Include "non-breaking
+ space" (U+00A0).
+ * libc/ctype/iswblank.c (iswblank): Likewise.
+
+2009-08-21 Corinna Vinschen <corinna@vinschen.de>
+
+ * libc/locale/locale.c (loadlocale): Throughout check charset string
+ case insensitive and store internal charset string uppercased. Allow
+ "UTF8" additionally to "UTF-8". Add this change to documentation.
+
+2009-08-21 Eric Blake <ebb9@byu.net>
+
+ * libc/include/iconv.h (iconv): Match POSIX prototype.
+ * libc/iconv/lib/iconv.c (iconv): Likewise.
+
+2009-08-21 Craig Howland <howland@LGSInnovations.com>
+
+ * libm/common/s_remquo.c (remquo): Fix sign of quotient when |x|==|y|.
+ * libc/stdio/mktemp.c: Add #include <stdlib.h> for function prototypes.
+
+2009-08-19 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
+
+ * iconvdata/Makefile.am (all): Remove.
+ * libc/sys/a29khif/Makefile.am (all-am): Rename from ...
+ (all): ... this.
+ * libc/sys/arc/Makefile.am: Likewise.
+ * libc/sys/arm/Makefile.am: Likewise.
+ * libc/sys/d10v/Makefile.am: Likewise.
+ * libc/sys/decstation/Makefile.am: Likewise.
+ * libc/sys/h8300hms/Makefile.am: Likewise.
+ * libc/sys/h8500hms/Makefile.am: Likewise.
+ * libc/sys/linux/Makefile.am: Likewise.
+ * libc/sys/linux/machine/i386/Makefile.am: Likewise.
+ * libc/sys/m88kbug/Makefile.am: Likewise.
+ * libc/sys/mmixware/Makefile.am: Likewise.
+ * libc/sys/netware/Makefile.am: Likewise.
+ * libc/sys/rdos/Makefile.am: Likewise.
+ * libc/sys/rtems/Makefile.am: Likewise.
+ * libc/sys/sh/Makefile.am: Likewise.
+ * libc/sys/sparc64/Makefile.am: Likewise.
+ * libc/sys/sun4/Makefile.am: Likewise.
+ * libc/sys/sysmec/Makefile.am: Likewise.
+ * libc/sys/sysnec810/Makefile.am: Likewise.
+ * libc/sys/sysnecv850/Makefile.am: Likewise.
+ * libc/sys/sysvi386/Makefile.am: Likewise.
+ * libc/sys/sysvnecv70/Makefile.am: Likewise.
+ * libc/sys/tic80/Makefile.am: Likewise.
+ * libc/sys/w65/Makefile.am: Likewise.
+ * libc/sys/z8ksim/Makefile.am: Likewise.
+ * iconvdata/Makefile.in: Regenerate.
+ * libc/sys/a29khif/Makefile.in: Likewise.
+ * libc/sys/arc/Makefile.in: Likewise.
+ * libc/sys/arm/Makefile.in: Likewise.
+ * libc/sys/d10v/Makefile.in: Likewise.
+ * libc/sys/decstation/Makefile.in: Likewise.
+ * libc/sys/h8300hms/Makefile.in: Likewise.
+ * libc/sys/h8500hms/Makefile.in: Likewise.
+ * libc/sys/linux/Makefile.in: Likewise.
+ * libc/sys/linux/machine/i386/Makefile.in: Likewise.
+ * libc/sys/m88kbug/Makefile.in: Likewise.
+ * libc/sys/mmixware/Makefile.in: Likewise.
+ * libc/sys/netware/Makefile.in: Likewise.
+ * libc/sys/rdos/Makefile.in: Likewise.
+ * libc/sys/rtems/Makefile.in: Likewise.
+ * libc/sys/sh/Makefile.in: Likewise.
+ * libc/sys/sparc64/Makefile.in: Likewise.
+ * libc/sys/sun4/Makefile.in: Likewise.
+ * libc/sys/sysmec/Makefile.in: Likewise.
+ * libc/sys/sysnec810/Makefile.in: Likewise.
+ * libc/sys/sysnecv850/Makefile.in: Likewise.
+ * libc/sys/sysvi386/Makefile.in: Likewise.
+ * libc/sys/sysvnecv70/Makefile.in: Likewise.
+ * libc/sys/tic80/Makefile.in: Likewise.
+ * libc/sys/w65/Makefile.in: Likewise.
+ * libc/sys/z8ksim/Makefile.in: Likewise.
+
+ * configure.in (newlib_cv_ldbl_eq_dbl): Rename cache variable
+ from newlib_ldbl_eq_dbl.
+ * configure: Regenerate.
+
+2009-08-19 Eric Blake <ebb9@byu.net>
+
+ * libc/Makefile.am (SUBDEFS): Correctly build popen docs.
+ * libc/libc.texinfo (Top): Add posix node to menu.
+
+2009-08-18 Jeff Johnston <jjohnstn@redhat.com>
+
+ * newlib.hin: Add comment regarding file being manually edited.
+ * Makefile.am: Add no-op rule for newlib.hin.
+ * Makefile.in: Regenerated.
+
+2009-08-18 Jeff Johnston <jjohnstn@redhat.com>
+
+ * acconfig.h: Add templates for _HAVE_LONG_DOUBLE and _LDBL_EQ_DBL.
+
+2009-08-18 Eric Blake <ebb9@byu.net>
+
+ * libc/posix/popen.c (popen): Fix documented prototype.
+
+ Improve popen compatibility with glibc.
+ * libc/posix/popen.c (popen): The 2006-08-22 change to use
+ FD_CLOEXEC disagrees with other implementations; instead, use
+ pidlist to work even when fcntl is not available. Meanwhile,
+ support the 'e' modifier to set CLOEXEC, as in glibc. Drop
+ cygwin-specific code, now that cygwin has its own version.
+ * libc/posix/Makefile.am (CHEWOUT_FILES): Document popen.
+ * libc/posix/posix.tex: New file.
+
+2009-08-17 Craig Howland <howland@LGSInnovations.com>
+
+ * libc/string/wcsncpy.c (wcsncpy): Re-write function based on small
+ version of strncpy() (fixing two bugs).
+
+2009-08-13 Corinna Vinschen <corinna@vinschen.de>
+
+ * libc/stdio/mktemp.c (mkdtemp): Fix typo in function name.
+
+2009-08-12 Jeff Johnston <jjohnstn@redhat.com>
+
+ * libc/stdio/mktemp.c (_gettemp): Do not call _mkdir_r unless
+ HAVE_MKDIR is defined.
+
+2009-08-12 Hans-Peter Nilsson <hp@axis.com>
+
+ * libc/include/reent.h: Add prototype and definition of _mkdir_r.
+ * libc/reent/Makefile.am (GENERAL_SOURCES): Add mkdirr.c.
+ (CHEWOUT_FILES): Add mkdirr.def.
+ * libc/reent/Makefile.in: Regenerate.
+ * libc/reent/mkdirr.c: New file.
+
+2009-08-10 Jeff Johnston <jjohnstn@redhat.com>
+
+ * libc/stdlib/wcstombs.c: Change documentation to specify size_t
+ return type instead of int.
+
+2009-07-29 Jeff Johnston <jjohnstn@redhat.com>
+
+ * libc/stdlib/a64l.c: Fix to use 'a' instead of 'A' in calculation
+ when a lower-case character is detected.
+
+2009-07-29 Corinna Vinschen <corinna@vinschen.de>
+
+ * libc/stdlib/mbtowc_r.c (__utf8_mbtowc): Rework UTF-16 surrogate
+ pair handling to be more bullet-proof even with incomplete UTF-8
+ sequences. Add check for 4 byte sequences resulting in values
+ outside the valid Unicode range. Add a comment to clarify checking
+ for invalid CESU-8 sequences.
+
+2009-07-28 Corinna Vinschen <corinna@vinschen.de>
+
+ * libc/stdlib/mbtowc_r.c (__utf8_mbtowc): Fix incrementing n in case
+ of handling incomplete sequences.
+
+2009-07-22 Eric Blake <ebb9@byu.net>
+
+ Avoid a fault from locking a closed standard file.
+ * libc/stdio/fflush.c (_fflush_r): Give up early if stream has
+ been previously closed.
+
+2009-07-09 Craig Howland <howland@LGSInnovations.com>
+
+ * libm/math/ef_scalb.c: Replace isnanf() (pre-C99 function call) with
+ isnan() (C99 macro).
+ * libm/math/wf_log.c: Ditto.
+ * libm/math/wf_j0.c: Ditto.
+ * libm/math/wf_sqrt.c: Ditto.
+ * libm/math/wf_pow.c: Ditto.
+ * libm/math/wf_fmod.c: Ditto.
+ * libm/math/wf_remainder.c: Ditto.
+ * libm/math/wf_scalb.c: Ditto.
+ * libm/math/wf_atanh.c: Ditto.
+ * libm/math/wf_cosh.c: Ditto.
+ * libm/math/wf_acos.c: Ditto.
+ * libm/math/wf_acosh.c: Ditto.
+ * libm/math/wf_jn.c: Ditto.
+ * libm/math/wf_log10.c: Ditto.
+ * libm/math/wf_asin.c: Ditto.
+ * libm/math/wf_j1.c: Ditto.
+ * libm/common/sf_isnan.c: Add #include <ieeefp.h>, fix comment.
+ * libm/common/sf_isinf.c: Add #include <ieeefp.h>, adjust comment to
+ match that from s_isinf.c.
+ * libc/include/machine/ieeefp.h: Simplify isinf and isnan macros to
+ remove un-necessary extension use (in a similar manner to as was
+ recently done in math.h).
+ * libc/include/math.h: Remove isnanf and isinff prototypes (are in
+ ieeefp.h).
+ * libm/machine/spu/sf_isinf.c: Fix comment (remove <math.h>).
+
+2009-07-06 Joel Sherrill <joel.sherrill@oarcorp.com>
+
+ * libc/include/sys/features.h: Enable UNIX98 mutex attributes
+ for RTEMS.
+
+2009-07-03 Eric Blake <ebb9@byu.net>
+
+ Add mkdtemp, mkstemps.
+ * libc/stdio/mktemp.c: Fix documentation.
+ (_gettemp): Add domkdir and length parameters. Check for
+ insufficient 'X' suffix. Drop cygwin-specific code.
+ (_mkstemp_r, _mktemp_r, mkstemp, mktemp): Adjust clients.
+ (_mkdtemp_r, _mkstemps_r, mkdtemp, mkstemps): New functions.
+ * libc/include/stdlib.h (_mkdtemp_r, _mkstemps_r, mkdtemp)
+ (mkstemps): Declare them.
+
+ Add fpurge.
+ * libc/stdio/fpurge.c (fpurge, _fpurge_r): New file.
+ * libc/stdio/Makefile.am (ELIX_4_SOURCES, CHEWOUT_FILES, fpurge):
+ Build it.
+ * libc/stdio/Makefile.in: Regenerated.
+ * libc/include/stdio.h (fpurge, _fpurge_r): New declarations.
+ * libc/stdio/stdio.tex: Build documentation.
+
+2009-06-23 Jeff Johnston <jjohnstn@redhat.com>
+
+ * Makefile.am (MATHOBJS_IN_LIBC): Add s_fpclassify and
+ sf_fpclassify as these are now used for infinity testing.
+ * Makefile.in: Regenerated.
+
+2009-06-19 Joel Sherrill <joel.sherrill@oarcorp.com>
+
+ * libc/sys/rtems/machine/param.h: Change ALIGNBYTES
+ so it can point to an aligned structure or double.
+
+2009-06-18 Corinna Vinschen <corinna@vinschen.de>
+
+ * libc/locale/locale.c (loadlocale): Add handling of "@cjknarrow"
+ modifier on _MB_CAPABLE targets. Add comment to explain. Improve
+ documentation.
+
+2009-06-17 Michael Eager <eager@eagercon.com>
+
+ * libc/include/pthread.h: Support XMK (Xilinx) BSP, add RTEMS to
+ PTHREAD_MUTEX_NORMAL.
+ * libc/include/sys/features.h: Same.
+ * libc/include/sys/types.h: Same.
+
+2009-06-16 Corinna Vinschen <corinna@vinschen.de>
+
+ * libc/include/locale.h (struct lconv): Add missing members required
+ by POSIX.1-2008.
+ * libc/locale/locale.c (lconv): Initialize new members to default
+ values in "C" locale.
+
+2009-06-16 Corinna Vinschen <corinna@vinschen.de>
+
+ * libc/stdio/vfprintf.c (_VFPRINTF_R): Use actual length of
+ radix char instead of assuming length 1.
+ * libc/stdlib/gdtoa-gethex.c: Remove use of USE_LOCALE.
+ (gethex): Allow multibyte decimal point.
+ Fix compiler warnings due to different signedness of pointer types.
+ * libc/stdlib/strtod.c: Remove use of USE_LOCALE.
+ (_strtod_r): Allow multibyte decimal point.
+ * libc/stdlib/wcstod.c (_wcstod_r): Evaluate correct wide char
+ endptr position if the decimal point is a multibyte char.
+
+2009-06-16 Craig Howland <howland@LGSInnovations.com>
+
+ * libc/ctype/local.h (__locale_charset): Add arguments to
+ prototype
+ * libc/stdlib/local.h (__locale_charset): Ditto.
+
+2009-06-16 Craig Howland <howland@LGSInnovations.com>
+
+ * libc/include/math.h: Simplify fpclassify, isinf, isnan, and signbit
+ macros to remove un-necessary extension use. isinf and isnan also
+ changed to use fpclassify. isfinite macro modified to run faster by
+ only calling fpclassify once instead of possibly twice.
+
+2009-06-09 Corinna Vinschen <corinna@vinschen.de>
+
+ * libc/ctype/tolower.c (tolower): Cast conversion result from
+ mbtowc/wctomb to unsigned char to avoid negative return values.
+ * libc/ctype/toupper.c (toupper): Ditto.
+
+2009-06-03 IWAMURO Motonori <deenheart@gmail.com>
+
+ * libc/string/wcwidth.c: Optimize for speed.
+
+2009-06-03 Corinna Vinschen <corinna@vinschen.de>
+
+ * libc/locale/locale.c (lc_ctype_cjk_lang): New static int.
+ (loadlocale): In case of setting LC_CTYPE, set lc_ctype_cjk_lang
+ to 1 if the language is "jp", "ko", or "zh", to 0 otherwise.
+ (__locale_cjk_lang): New function.
+ * libc/string/local.h (__locale_cjk_lang): Declare.
+ * libc/string/wcwidth.c: Fix comments.
+ (__wcwidth): Handle CJK Ambiguous Width characters according
+ to setting returned by __locale_cjk_lang.
+
+2009-06-02 Richard Earnshaw <rearnsha@arm.com>
+
+ * libc/include/sys/config.h: Remove specification of _REENT_SMALL for
+ thumb2.
+
+2009-06-02 IWAMURO Motonori <deenheart@gmail.com>
+
+ * libc/ctype/jp2uc.c: Skip all definition if defined __CYGWIN__.
+ (__jp2uc): Change the scope to static function.
+ * libc/ctype/local.h (_jp2uc): Define as macro if defined __CYGWIN__.
+ * libc/string/local.h (_jp2uc): Include ../ctype/local.h.
+
+2009-05-27 Neal H. Walfield <neal@gnu.org>
+
+ * libc/include/machine/setjmp.h (sigjmp_buf): Size according to
+ _JBTYPE and the size of sigset_t.
+
+2009-05-15 Craig Howland <howland@LGSInnovations.com>
+
+ * configure.in: Add configuration test for long double type existing
+ and set flag _HAVE_LONG_DOUBLE if true. Fix INIT_ARRAY (.init_array)
+ and _LDBL_EQ_DBL tests to not link so that will work with
+ cross-compilers.
+ * configure: Regenerated.
+ * Makefile.in: Ditto.
+ * newlib.hin: Add _HAVE_LONG_DOUBLE flag.
+ * libc/include/math.h: Change non-builtin defines for HUGE_VAL,
+ HUGE_VALF, and HUGE_VALL to be constant expressions. Add definitions
+ for the non-builtin case for INFINITY and NAN. Gate HUGE_VALL and
+ union __ldmath definitions with (new) _HAVE_LONG_DOUBLE.
+ *libm/common/s_infconst.c: Change definitions to use values from
+ float.h instead of non-so-portable integer forms. Mark as being
+ deprecated (because now removed from math.h, are not used anywhere
+ in Newlib, itself).
+
+2009-05-15 Corinna Vinschen <corinna@vinschen.de>
+
+ * libc/string/local.h: New file.
+ * libc/string/wcswidth.c (wcswidth): Convert japanese wide
+ characters to Unicode here. Handle surrogate pairs for UTF-16
+ systems. Call __wcwidth rather than wcwidth.
+ * libc/string/wcwidth.c: New implementation using Markus Kuhn's
+ wcwidth implementation for Unicode.
+ (bisearch): New static function.
+ (__wcwidth): New function. Take wint_t rather than wchar_t as
+ parameter to allow full Unicode handling on UTF-16 systems.
+ Move old wcwidth implementation here for non-multibyte aware
+ systems.
+ (wcwidth): Convert japanese wide characters to Unicode here.
+ Call __wcwidth rather than using iswprint/iswcntrl.
+
+2009-05-14 Corinna Vinschen <corinna@vinschen.de>
+
+ * libc/ctype/local.h (JP_JIS, JP_SJIS, JP_EUCJP): Move definition
+ to jp2uc.c.
+ (__jp2uc): Remove declaration.
+ (_jp2uc): Declare.
+ * libc/ctype/jp2uc.c (JP_JIS, JP_SJIS, JP_EUCJP): Define.
+ (__jp2uc): Remove Cygwin special case.
+ (_jp2uc): New function. On Cygwin, just return c.
+ * libc/ctype/iswalpha.c (iswalpha): Just call _jp2uc.
+ * libc/ctype/iswblank.c (iswblank): Ditto.
+ * libc/ctype/iswcntrl.c (iswcntrl): Ditto.
+ * libc/ctype/iswprint.c (iswprint): Ditto.
+ * libc/ctype/iswpunct.c (iswpunt): Ditto.
+ * libc/ctype/iswspace.c (iswspace): Ditto.
+ * libc/ctype/towlower.c (towlower): Ditto.
+ * libc/ctype/towupper.c (towupper): Ditto.
+
+2009-05-13 Paul Brook <paul@codesourcery.com>
+
+ * libc/machine/arm/setjmp.S: Don't bother saving IP. Copy SP to
+ IP before saving. Likewise when restoring.
+
+2009-05-13 Paul Brook <paul@codesourcery.com>
+
+ * libc/machine/arm/setjmp.S: Add ARMv6-M implementation.
+
+2009-05-13 Corinna Vinschen <corinna@vinschen.de>
+
+ * libc/locale/locale.c (setlocale): Don't build on Cygwin.
+
+2009-05-11 Craig Howland <howland@LGSInnovations.com>
+
+ * libm/machine/i386/f_llrint.c: Remove llrint() definition.
+ * libm/machine/i386/f_llrintf.c: Remove llrintf() definition.
+
+2009-05-08 Nick Clifton <nickc@redhat.com>
+
+ * MAINTAINERS: Add myself as a maintainer for the MN10300 and to
+ the write-after-approval list.
+
+2009-04-30 Anthony Green <green@moxielogic.com>
+
+ * MAINTAINERS: Add myself as moxie maintainer and to the
+ write-after-approval list.
+
+2009-04-30 Eric Blake <ebb9@byu.net>
+
+ Allow gcc warning for toupper even with extended charsets.
+ * libc/include/ctype.h (toupper, tolower)
+ [_MB_EXTENDED_CHARSETS_ISO]: Allow gcc warning when called with
+ 'char' even when we must call the function for correct behavior.
+ [!_MB_EXTENDED_CHARSETS_ISO]: Fix regression in result type.
+
+2009-04-24 Jeff johnston <jjohnstn@redhat.com>
+
+ * libc/stdio/fgetc.c: Make sure sfp lock is acquired before the
+ file lock and released before the file lock to avoid a deadlock
+ scenario.
+ * libc/stdio/fgets.c: Ditto.
+ * libc/stdio/fgetwc.c: Ditto.
+ * libc/stdio/fgetws.c: Ditto.
+ * libc/stdio/fread.c: Ditto.
+ * libc/stdio/fseek.c: Ditto.
+ * libc/stdio/getc.c: Ditto.
+ * libc/stdio/getdelim.c: Ditto.
+ * libc/stdio/gets.c: Ditto.
+
+2009-04-24 Jeff johnston <jjohnstn@redhat.com>
+
+ * configure.in: Add configuration test for long double equals dbl
+ and set flag _LDBL_EQ_DBL if true.
+ * configure: Regenerated.
+ * newlib.hin: Add _LDBL_EQ_DBL flag.
+ * libc/include/math.h: Use _LDBL_EQ_DBL flag instead of
+ _HAVE_LDBL_MATH.
+ * libc/include/stdlib.h: Use _LDBL_EQ_DBL flag instead of
+ _HAVE_LDBL_STDLIB.
+ * libc/common/local.h: Remove _LDBL_EQ_DBL flag setting.
+ * libc/stdlib/local.h: Ditto.
+
+2009-04-24 Joseph Myers <joseph@codesourcery.com>
+
+ * libc/include/stdint.h (UINTPTR_MAX): Define to __UINTPTR_MAX__
+ if __UINTPTR_MAX__ defined.
+
+2009-04-24 Eric Blake <ebb9@byu.net>
+
+ Be namespace clean in ctype.h.
+ * libc/include/ctype.h (_tolower, _toupper, isalpha, isupper)
+ (islower, isdigit, isxdigit, isspace, ispunct, isalnum)
+ (isprint, isgraph, iscntrl, isblank, toupper, tolower)
+ (isascii, toascii): Don't use 'c' as macro parameter name.
+
+ Trigger gcc warning if isFoo macros are called with plain char.
+ * libc/include/ctype.h (isalpha, isupper, islower, isdigit)
+ (isxdigit, isspace, ispunct, isalnum, isprint, isgraph)
+ (iscntrl, isblank, toupper, tolower): Rewrite to let 'gcc -Wall'
+ warn when user calls macro with a char argument.
+
+2009-04-23 Mike Burgess <wizardsguild@earthlink.net>
+
+ * libc/string/strcasecmp.c: Optimized rewrite.
+ * libc/string/strncasecmp.c: Fix description.
+ * libc/string/strlwr.c: Avoid passing signed char to tolower.
+ * libc/string/strupr.c: Avoid passing signed char to tolower.
+
+2009-04-23 Paul Brook <paul@codesourcery.com>
+ Kazu Hirata <kazu@codesourcery.com>
+
+ * libc/stdlib/__atexit.c (__register_exitproc): Use weak reference
+ to malloc. Allocate dynamically only if it is present.
+ * libc/stdlib/__call_atexit.c (__call_exitprocs): Use weak
+ reference to free. Call free only if it is present.
+
+2009-04-22 Anthony Green <green@moxielogic.com>
+
+ * configure.host: Add moxie support.
+ * libc/machine/configure.in: Add moxie support.
+ * libc/machine/configure: Rebuilt.
+ * libc/machine/moxie/aclocal.m4: New file.
+ * libc/machine/moxie/configure: New file.
+ * libc/machine/moxie/configure.in: New file.
+ * libc/machine/moxie/Makefile.am: New file.
+ * libc/machine/moxie/Makefile.in: New file.
+ * libc/machine/moxie/setjmp.S: New file.
+ * libc/include/machine/setjmp.h (_JBLEN): Define for moxie.
+ * libc/include/machine/ieeefp.h: Add moxie support.
+
+2009-04-22 Kazu Hirata <kazu@codesourcery.com>
+
+ * libc/stdio/local.h (__chclass, __state_table, __action_table):
+ Add extern to the declarations.
+ * libc/stdlib/local.h (__iso_8859_conv, __cp_conv): Likewise.
+
+2009-04-21 Corinna Vinschen <corinna@vinschen.de>
+
+ * libc/ctype/ctype_.c (_CTYPE_DATA_128_255): Rename from
+ _CTYPE_DATA_128_256.
+ * libc/ctype/ctype_cp.h: Split off all character class values for
+ character 255 from the rest of the definitions.
+ (__ctype_cp): Use the new definitions. Make sure that the table
+ always contains 0 for EOF (-1).
+ * libc/ctype/ctype_iso.h: Ditto.
+
+2009-04-21 Sandra Loosemore <sandra@codesourcery.com>
+
+ * libc/reent/impure.c (__sf_fake_stdin, __sf_fake_stdout)
+ (__sf_fake_stderr): Declare locally with weak attribute.
+
+2009-04-21 Mark Mitchell <mark@codesourcery.com>
+
+ * libc/include/_ansi.h: Move C++ defines to top of file.
+ (_NOTHROW): New macro.
+ (_EXFUN_NOTHROW): Likewise.
+ * libc/include/stdlib.h (calloc): Declare with _EXFUN_NOTHROW.
+ (free): Likewise.
+ (malloc): Likewise.
+ (realloc): Likewise.
+ (_malloc_r): Likewise.
+ (_callor_r): Likewise.
+ (_free_r): Likewise.
+ (_realloc_r): Likewise.
+
+2009-04-20 Jeff johnston <jjohnstn@redhat.com>
+
+ * libc/include/math.h: Change _LDBL_EQ_DBL flag usage to
+ be _HAVE_LDBL_MATH.
+ * libc/include/stdlib.h: Change _LDBL_EQ_DBL flag usage to
+ be _HAVE_LDBL_STDLIB.
+
+2009-04-17 Jeff johnston <jjohnstn@redhat.com>
+
+ * libc/include/machine/ieeefp.h (_LDBL_EQ_DBL): Remove.
+ * libc/stdlib/local.h (_LDBL_EQ_DBL): Add.
+ * libc/stdlib/strtold.c: Include local.h.
+ * libc/stdlib/wcstold.c: Likewise.
+ * libm/common/atanl.c: Likewise.
+ * libm/common/cosl.c: Likewise.
+ * libm/common/sinl.c: Likewise.
+ * libm/common/modfl.c: Likewise.
+ * libm/common/frexpl.c: Likewise.
+ * libm/common/tanhl.c: Likewise.
+ * libm/common/tanl.c: Likewise.
+ * libm/common/expm1l.c: Likewise.
+ * libm/common/log1pl.c: Likewise.
+ * libm/common/ceill.c: Likewise.
+ * libm/common/fabsl.c: Likewise.
+ * libm/common/floorl.c: Likewise.
+ * libm/common/acosl.c: Likewise.
+ * libm/common/asinl.c: Likewise.
+ * libm/common/atan2l.c: Likewise.
+ * libm/common/coshl.c: Likewise.
+ * libm/common/expl.c: Likewise.
+ * libm/common/fmodl.c: Likewise.
+ * libm/common/hypotl.c: Likewise.
+ * libm/common/ldexpl.c: Likewise.
+ * libm/common/log10l.c: Likewise.
+ * libm/common/logl.c: Likewise.
+ * libm/common/powl.c: Likewise.
+ * libm/common/sqrtl.c: Likewise.
+ * libm/common/copysignl.c: Likewise.
+ * libm/common/ilogbl.c: Likewise.
+ * libm/common/nanl.c: Likewise.
+ * libm/common/cbrtl.c: Likewise.
+ * libm/common/asinhl.c: Likewise.
+ * libm/common/nextafterl.c: Likewise.
+ * libm/common/rintl.c: Likewise.
+ * libm/common/scalbnl.c: Likewise.
+ * libm/common/exp2l.c: Likewise.
+ * libm/common/fdiml.c: Likewise.
+ * libm/common/fmal.c: Likewise.
+ * libm/common/fmaxl.c: Likewise.
+ * libm/common/fminl.c: Likewise.
+ * libm/common/lrintl.c: Likewise.
+ * libm/common/lroundl.c: Likewise.
+ * libm/common/nearbyintl.c: Likewise.
+ * libm/common/remquol.c: Likewise.
+ * libm/common/roundl.c: Likewise.
+ * libm/common/scalblnl.c: Likewise.
+ * libm/common/truncl.c: Likewise.
+ * libm/common/acoshl.c: Likewise.
+ * libm/common/atanhl.c: Likewise.
+ * libm/common/erfcl.c: Likewise.
+ * libm/common/erfl.c: Likewise.
+ * libm/common/lgammal.c: Likewise.
+ * libm/common/remainderl.c: Likewise.
+ * libm/common/tgammal.c: Likewise.
+ * libm/common/sinhl.c: Likewise.
+ * libm/common/llroundl.c: Likewise.
+ * libm/common/llrintl.c: Likewise.
+ * libm/common/local.h: New file with _LDBL_EQ_DBL macro.
+
+2009-04-17 Ken Werner <ken.werner@de.ibm.com>
+
+ * libc/include/machine/ieeefp.h: _LDBL_EQ_DBL check fixed.
+ * libc/include/math.h (llrintl): Declare.
+ * libm/common/llrintl.c: New File.
+ * libm/common/Makefile.am: New File added.
+ * libm/common/Makefile.in: Regenerate.
+
+2009-04-17 Ken Werner <ken.werner@de.ibm.com>
+
+ * libc/configure.in: Change AC_TRY_COMPILE to AC_TRY_COMMAND to
+ avoid executable test.
+ * libc/configure: Regenerate.
+
+2009-04-17 Jeff johnston <jjohnstn@redhat.com>
+
+ * configure.in: Remove _HAVE_ARRAY_ALIASING check.
+ * configure: Regenerated.
+ * Makefile.in: Regenerated.
+ * newlib.hin: Remove _HAVE_ARRAY_ALIASING flag.
+ * libc/ctype/ctype_.c: Do not check for _HAVE_ARRAY_ALIASING.
+ * libm/configure.in: Change AC_TRY_COMPILE to AC_TRY_COMMAND to
+ avoid executable test.
+ * libm/configure: Regenerated.
+
+2009-04-16 Jeff johnston <jjohnstn@redhat.com>
+
+ * libc/misc/init.c (__libc_fini_array): Process fini_array in
+ reverse order as compliant with the ELF specification.
+
+2009-04-16 Ken Werner <ken.werner@de.ibm.com>
+
+ * libc/machine/spu/Makefile.am: Add new File.
+ * libc/machine/spu/Makefile.in: Regenerate.
+ * libc/machine/spu/fdopen.c: New file.
+
+2009-04-16 Hans-Peter Nilsson <hp@axis.com>
+
+ * libc/include/stdint.h (INTPTR_MIN, INTPTR_MAX, UINTPTR_MAX): Define.
+
+2009-04-16 Ken Werner <ken.werner@de.ibm.com>
+
+ * libm/libm.texinfo: Add long double function support chapter.
+ * libc/include/machine/ieeefp.h: Add _LDBL_EQ_DBL define.
+ * libc/include/stdlib.h: Include <machine/ieeefp.h>.
+ (strtold, wcstold): Declare.
+ * libc/stdlib/strtold.c: New File.
+ * libc/stdlib/wcstold.c: Likewise.
+ * libc/configure.in: Add long double check.
+ * libc/configure: Regenerate.
+ * libc/stdlib/Makefile.am: Add strtold.c and wcstold.c.
+ * libc/stdlib/Makefile.in: Regenerate.
+ * libc/include/math.h (atanl, cosl, sinl, tanl, tanhl): Declare.
+ (frexpl, modfl, ceill, fabsl, floorl, log1pl, expm1l, acosl): Ditto.
+ (asinl, atan2l, coshl, sinhl, expl, ldexpl, logl, log10l, powl): Ditto.
+ (sqrtl, fmodl, hypotl, copysignl, nanl, ilogbl, asinhl, cbrt): Ditto.
+ (nextafterl, rintl, scalbnl, exp2l, scalblnl, tgammal): Ditto.
+ (nearbyintl, lrintl, llrintl, roundl, lroundl, llround): Ditto.
+ (llroundl, truncl, remquol, fdiml, fmaxl, fminl, fmal, acoshl): Ditto.
+ (atanhl, remainderl, lgammal, erfl, erfcl): Ditto.
+ * libm/common/atanl.c: New File.
+ * libm/common/cosl.c: Likewise.
+ * libm/common/sinl.c: Likewise.
+ * libm/common/modfl.c: Likewise.
+ * libm/common/frexpl.c: Likewise.
+ * libm/common/tanhl.c: Likewise.
+ * libm/common/tanl.c: Likewise.
+ * libm/common/expm1l.c: Likewise.
+ * libm/common/log1pl.c: Likewise.
+ * libm/common/ceill.c: Likewise.
+ * libm/common/fabsl.c: Likewise.
+ * libm/common/floorl.c: Likewise.
+ * libm/common/acosl.c: Likewise.
+ * libm/common/asinl.c: Likewise.
+ * libm/common/atan2l.c: Likewise.
+ * libm/common/coshl.c: Likewise.
+ * libm/common/expl.c: Likewise.
+ * libm/common/fmodl.c: Likewise.
+ * libm/common/hypotl.c: Likewise.
+ * libm/common/ldexpl.c: Likewise.
+ * libm/common/log10l.c: Likewise.
+ * libm/common/logl.c: Likewise.
+ * libm/common/powl.c: Likewise.
+ * libm/common/sqrtl.c: Likewise.
+ * libm/common/copysignl.c: Likewise.
+ * libm/common/ilogbl.c: Likewise.
+ * libm/common/nanl.c: Likewise.
+ * libm/common/cbrtl.c: Likewise.
+ * libm/common/asinhl.c: Likewise.
+ * libm/common/nextafterl.c: Likewise.
+ * libm/common/rintl.c: Likewise.
+ * libm/common/scalbnl.c: Likewise.
+ * libm/common/exp2l.c: Likewise.
+ * libm/common/fdiml.c: Likewise.
+ * libm/common/fmal.c: Likewise.
+ * libm/common/fmaxl.c: Likewise.
+ * libm/common/fminl.c: Likewise.
+ * libm/common/lrintl.c: Likewise.
+ * libm/common/lroundl.c: Likewise.
+ * libm/common/nearbyintl.c: Likewise.
+ * libm/common/remquol.c: Likewise.
+ * libm/common/roundl.c: Likewise.
+ * libm/common/scalblnl.c: Likewise.
+ * libm/common/truncl.c: Likewise.
+ * libm/common/acoshl.c: Likewise.
+ * libm/common/atanhl.c: Likewise.
+ * libm/common/erfcl.c: Likewise.
+ * libm/common/erfl.c: Likewise.
+ * libm/common/lgammal.c: Likewise.
+ * libm/common/remainderl.c: Likewise.
+ * libm/common/tgammal.c: Likewise.
+ * libm/common/sinhl.c: Likewise.
+ * libm/common/llroundl.c: Likewise.
+ * libm/configure.in: Add long double check.
+ * libm/configure: Regenerate.
+ * libm/common/Makefile.am: Add new files.
+ * libm/common/Makefile.in: Regenerate.
+
+2009-04-09 Corinna Vinschen <corinna@vinschen.de>
+
+ * libc/ctype/ctype_.c (_CTYPE_DATA_0_127): Remove _B flag from TAB.
+ * libc/ctype/ctype_cp.h: Mark non-cased letters in tables for codepages
+ 720, 862, 874, 1255, and 1256 to _U|_L. Fix a couple of incorrect
+ class mappings.
+ * libc/ctype/ctype_iso.h: Mark non-cased letters in ISO-8859 tables
+ 6, 8, and 11 to _U|_L. Fix a couple of incorrect class mappings.
+ * libc/ctype/isblank.c (isblank): Special case TAB.
+ * libc/ctype/islower.c (islower): Check explicitely for _L flag only
+ in (_U|_L).
+ * libc/ctype/isupper.c (isupper): Ditto, but check for _U flag.
+ * libc/include/ctype.h (islower): Same in macro.
+ (isupper): Ditto.
+ (isblank): Special case TAB. Redefine macro for GCC only.
+
+2009-04-09 Corinna Vinschen <corinna@vinschen.de>
+
+ * libc/stdlib/local.h (__mbtowc): Declare extern.
+ (__wctomb): Ditto.
+
+2009-04-09 Corinna Vinschen <corinna@vinschen.de>
+
+ * libc/stdlib/mbctype.h (_iseucjp1): Like _iseucjp, but also
+ recognizes 0x8e and 0x8f lead bytes.
+ (_iseucjp2): Rename from _iseucjp.
+ * libc/stdlib/mbtowc_r.c (__eucjp_mbtowc): Convert JIS-X-0212
+ triplebyte sequences as well.
+ * libc/stdlib/wctomb_r.c (__eucjp_wctomb): Convert to JIS-X-0212
+ triplebyte sequences as well.
+
+2009-04-08 Ken Werner <ken.werner@de.ibm.com>
+
+ * configure.in: Add square brackets for the array aliasing conftest.
+ * configure: Regenerate.
+
+2009-04-06 Mike Burgess <wizardsguild@earthlink.net>
+
+ * libc/string/strncasecmp.c: Optimized rewrite.
+
+2009-04-06 Ken Werner <ken.werner@de.ibm.com>
+
+ * libc/include/sys/features.h: Undefine _POSIX_TIMERS for spu.
+ * libc/include/machine/time.h (nanosleep): Declare.
+
+2009-04-06 Corinna Vinschen <corinna@vinschen.de>
+
+ * libc/locale/locale.c (loadlocale): Set mbc_max to 3 for EUCJP.
+
+2009-04-04 Corinna Vinschen <corinna@vinschen.de>
+
+ * libc/stdlib/wcstombs.c: Fix datatypes in documentation.
+
+2009-04-04 Corinna Vinschen <corinna@vinschen.de>
+
+ * libc/include/stdio.h (_ELIDABLE_INLINE): Move definition from here...
+ * libc/include/_ansi.h (_ELIDABLE_INLINE): ..to here.
+
+2009-04-03 Yaakov Selkowitz <yselkowitz@users.sourceforge.net>
+
+ * libc/include/stdio.h [__SCLE] (__sgetc_r): Prototype before define
+ to avoid a warning with -Wmissing-prototypes.
+
+2009-04-03 Ken Werner <ken.werner@de.ibm.com>
+
+ * libc/machine/spu/mmap_ea.c (mmap_ea): Check length argument.
+
+2009-04-03 Ken Werner <ken.werner@de.ibm.com>
+
+ * libc/machine/spu/sys/linux_syscalls.h: include <sys/types.h>
+ (linux_getpid, linux_gettid): Declare.
+
+2009-04-03 Ken Werner <ken.werner@de.ibm.com>
+
+ * libc/machine/spu/spu-gmon.c: Tweaks to support simultaneous SPU
+ profiling.
+
+2009-04-03 Ken Werner <ken.werner@de.ibm.com>
+
+ * libc/include/math.h: Remove duplicate copysign prototype.
+ Fix __math_68881 define typo. Guard functions of the rint family.
+
+2009-04-03 Craig Howland <howland@LGSInnovations.com>
+
+ * libm/common/s_llrint.c: New file, implementing llrint().
+ * libm/common/sf_llrint.c: New file, implementing llrintf().
+ * libm/common/Makefile.am: Add s_llrint.c (src); sf_llrint.c (fsrc).
+ * libm/common/Makefile.in: Regenerate.
+
+2009-04-02 Corinna Vinschen <corinna@vinschen.de>
+
+ * libc/ctype/ctype_c.c: Move inclusion of ctype_iso.h and
+ ctype_cp.h out of ALLOW_NEGATIVE_CTYPE_INDEX case.
+ (__ctype_ptr__): Constify in !_MB_CAPABLE case. Otherwise,
+ de-constify in !ALLOW_NEGATIVE_CTYPE_INDEX case, too. Add comment.
+ (__set_ctype): Set __ctype_ptr__ pointer according to definition
+ of ALLOW_NEGATIVE_CTYPE_INDEX.
+ * libc/include/ctype.h (__ctype_ptr__): Constify in !_MB_CAPABLE case.
+
+2009-03-31 Corinna Vinschen <corinna@vinschen.de>
+
+ * libc/ctype/Makefile.am: Remove _tolower.c and _toupper.c
+ source files. Add a dependency rule for ctype_o to note
+ changes in ctype_iso.h and ctype_cp.h.
+ * libc/ctype/Makefile.in: Regenerate.
+ * libc/ctype/_tolower.c: Remove file.
+ * libc/ctype/_toupper.c: Remove file.
+ * libc/ctype/ctype_.c: Make sure ALLOW_NEGATIVE_CTYPE_INDEX
+ is always defined on Cygwin.
+ (_ctype_b): Don't make `static const' on Cygwin.
+ (ctype_iso.h): Include if _MB_EXTENDED_CHARSETS_ISO is set.
+ (ctype_cp.h): Include if _MB_EXTENDED_CHARSETS_WINDOWS is set.
+ (__ctype_ptr): Drop definition.
+ (__ctype_ptr__): De-constify. Mark as __EXPORT symbol.
+ (_ctype_): Add Cygwin-specifc asm define.
+ (__set_ctype): New function to set __ctype_ptr__ according to
+ current charset.
+ * libc/ctype/ctype_cp.h: New file containing Windows codepage
+ specific character class tables.
+ * libc/ctype/ctype_iso.h: New file containing ISO-8859-x
+ specific character class tables.
+ * libc/ctype/tolower.c (tolower): Reimplement to support any singlebyte
+ charset if one of the extended charsets is enabled.
+ * libc/ctype/toupper.c (toupper): Ditto.
+ * libc/include/ctype.h (_tolower): Define as macro per POSIX.
+ (_toupper): Ditto.
+ (__ctype_ptr__): De-constify.
+ (toupper): Disable macro on systems supporting extended charsets.
+ (tolower): Ditto.
+ * libc/include/sys/config.h (__EXPORT): Define empty if not defined.
+ * libc/locale/locale.c (__mb_cur_max): Mark as __EXPORT symbol.
+ (__set_ctype): Declare unconditionally.
+ (loadlocale): Remove __CYGWIN__ guard around __set_ctype call.
+
+2009-03-26 Corinna Vinschen <corinna@vinschen.de>
+
+ * libc/locale/locale.c (loadlocale): Revert to charset "GBK" instead
+ of "GB2312". Fix documentation accordingly.
+
+2009-03-26 Corinna Vinschen <corinna@vinschen.de>
+
+ * libc/ctype/ctype_.c (_CTYPE_DATA_0_127): Mark TAB as blank character.
+ * libc/ctype/isblank.c: Replace hardcoded test with test for having _B
+ marker in ctype array.
+ * libc/include/ctype.h (isblank): Add macro.
+
+2009-03-25 Craig Howland <howland@LGSInnovations.com>
+
+ * libc/include/math.h: (llround, llroundf): Declare.
+ * libm/common/s_llround.c: New file, implementing llround().
+ * libm/common/sf_llround.c: New file, implementing llroundf().
+ * libm/common/sf_lround.c: Remove spurious cast in _DOUBLE_IS_32BITS
+ version of function.
+ * libm/common/sf_lrint.c: Ditto.
+ * libm/common/sf_logb.c: Corrected return for subnormal argument
+ by replacing existing function with a version created from sf_ilogb.c.
+ * libm/common/s_logb.c: Ditto, except starting point s_ilogb.c. Also
+ added documentation for logb() and logbf().
+ * libm/common/s_signbit.c: Add signbit() documentation.
+ * libm/common/s_log2.c: Update return values to match what w_log2.c has,
+ since log2 uses log(); add note about being derived instead of direct.
+ * libm/common/sf_fma.c: Add casts to attempt to get correct results,
+ as well as comments pointing out problems with the implementation.
+ * libm/common/s_fma.c: Add fma() and fmaf() documentation.
+ * libm/common/sf_remquo.c: Incorrect quotient returns for large values
+ corrected by discarding existing function and replacing with Sun
+ verion, with some enhancements.
+ * libm/common/s_remquo.c: Ditto. Add remquo() and remquof()
+ documentation.
+ * libm/common/s_fmax.c: Add fmax() and fmaxf() documentation.
+ * libm/common/s_fmin.c: Add fmin() and fminf() documentation.
+ * libm/common/s_fdim.c: Return NAN for NAN arg, add fdim() and fdimf()
+ documentation.
+ * libm/common/sf_fdim.c: Return NAN for NAN arg, HUGE_VALF for inf arg.
+ * libm/common/s_trunc.c: Add trunc() and truncf() documentation.
+ * libm/common/s_rint.c: Add rint() and rintf() documentation.
+ * libm/common/s_round.c: Add round() and roundf() documentation.
+ * libm/common/s_scalbn.c: Add scalbln() and scalblnf() documentation.
+ * libm/common/s_infinity.c: Add infinity() and infinityf()
+ documentation.
+ * libm/common/s_lround.c: Add lround(), lroundf(), llround(), and
+ llroundf() documentation.
+ * libm/common/s_lrint.c: Add lrint(), lrintf(), llrint(), and llrintf()
+ documentation.
+ * libm/common/isgreater.c: New file for documenting math.h function-like
+ macros isgreater(), isgreaterequal(), isless(), islessequal(),
+ islessgreater(), and isunordered().
+ * libm/common/s_isnan.c: Add documentation for function-like macros
+ fpclassify(), isfinite(), isinf(), isnan(), and isnormal().
+ * libm/common/s_nearbyint.c: Add nearbyint() and nearbyintf()
+ documentation.
+ * libm/common/Makefile.am: Add s_llround.c (src); sf_llround.c (fsrc);
+ s_fdim.def, s_fma.def, s_fmax.def, s_fmin.def,
+ s_logb.def, s_lrint.def, s_lround.def, s_nearbyint.def, s_remquo.def,
+ s_rint.def, s_round.def, s_signbit.def, s_trunc.def, and
+ isgreater.def (chobj);
+ re-name all existing chew files (chobj) to match source file base
+ names (put in underscores), delete all special targets for chew files
+ (leaving all to be generated by rule).
+ * libm/common/Makefile.in: regenerate.
+ * libm/math/w_exp2.c: Add "base 2" to documentation description (and
+ delete TRAD_SYNOPSIS).
+ * libm/math/w_gamma.c: Add tgamma() and tgammaf() documentation, along
+ with some history behind the function names.
+ * libm/math/math.tex: Add includes for newly-added documentation (see
+ .def additions to common/Makefile.am and math/Makefile.am in this
+ ChangeLog list), adjusted existing .def file names to match source file
+ base names (added underscores); add mention of HUGE_VALF; rename
+ "Version of library" section to "Error Handling" and add some text
+ about floating-point exception; added section "Standards Compliance And
+ Portability".
+ * libm/math/Makefile.am: Add w_exp2.def (chobj);
+ re-name all existing chew files (chobj) to match source file base
+ names, delete all special targets for chew files (leaving all to be
+ generated by rule).
+ * libm/math/Makefile.in: regenerated
+ * doc/makedoc.c: Change silent ignoring of commands < 5 characters
+ to a failure when reading macro file for commands < 4 characters;
+ add -v (verbose) option for printing some debugging information;
+ get rid of spurious translation of "@*" to "*" (no source files used @*,
+ so no existing doc pages were affected); clean up some compiler
+ warnings.
+ * doc/doc.str: add BUGS and SEEALSO sections (to match texi2pod.pl
+ which has them); Remove ITEM command (redundant with makedoc built-in
+ "o", not used in any present source file so nothing is lost, anyway).
+ * HOWTO: New file to hold information for maintainers regarding how
+ to do things. Initial sections on documentation and ELIX levels.
+
+2009-03-25 Richard Earnshaw <rearnsha@arm.com>
+
+ * libc/machine/arm/strcmp.c (strcmp_unaligned): Correctly
+ detect the nul-byte in a big-endian string.
+
+2009-03-25 Jeff Johnston <jjohnstn@redhat.com>
+
+ * libc/string/wcsdup.c: Fix documentation error.
+ * libc/string/Makefile.am: Fix CHEWOUT files to contain
+ wcsdup.def rather than wcsdup.
+ * libc/string/Makefile.in: Regenerated.
+
+2009-03-25 Corinna Vinschen <corinna@vinschen.de>
+
+ * libc/locale/locale.c (loadlocale): Only change __wctomb and __mbtowc
+ pointers if category is LC_CTYPE.
+
+2009-03-25 Corinna Vinschen <corinna@vinschen.de>
+
+ * libc/locale/locale.c (loadlocale): Rename charset "GBK" to
+ "GB2312". Fix documentation accordingly.
+
+2009-03-24 Corinna Vinschen <corinna@vinschen.de>
+
+ * libc/locale/locale.c (loadlocale): Rename charset "CP949" to
+ "eucKR". Fix documentation accordingly.
+
+2009-03-24 Corinna Vinschen <corinna@vinschen.de>
+
+ * libc/locale/locale.c (loadlocale): Allow charset starting with 'e'
+ for "eucJP" charset support.
+
+2009-03-24 Jeff Johnston <jjohnstn@redhat.com>
+
+ * libc/include/sys/errno.h: Move EFTYPE to general usage because
+ it is used in libc/search.
+
+2009-03-24 Corinna Vinschen <corinna@vinschen.de>
+
+ * libc/ctype/iswalpha.c: Handle all wchar_t as unicode on
+ _MB_CAPABLE systems.
+ * libc/ctype/iswblank.c: Ditto.
+ * libc/ctype/iswcntrl.c: Ditto.
+ * libc/ctype/iswprint.c: Ditto.
+ * libc/ctype/iswpunct.c: Ditto.
+ * libc/ctype/iswspace.c: Ditto.
+ * libc/ctype/jp2uc.c (__jp2uc): On Cygwin, just return c.
+ Explain why.
+ * libc/ctype/towlower.c: Ditto.
+ * libc/ctype/towupper.c: Ditto.
+ * libc/include/sys/config.h: Define _MB_EXTENDED_CHARSETS_ISO
+ and _MB_EXTENDED_CHARSETS_WINDOWS if _MB_EXTENDED_CHARSETS_ALL is
+ defined. Define _MB_EXTENDED_CHARSETS_ALL on Cygwin only for now.
+ * libc/include/sys/reent.h (struct _reent): Mark _current_category
+ and _current_locale as unused.
+ * libc/locale/locale.c: Add new charset support to documentation.
+ Include ../stdio/local.h from here.
+ (lc_ctype_charset): Set to "ASCII" by default.
+ (lc_message_charset): Ditto.
+ (_setlocale_r): Don't set _current_category and _current_locale.
+ (loadlocale): Add Cygwin codepage support. On _MB_CAPABLE
+ systems, set __mbtowc and __wctomb function pointers to function
+ corresponding with current charset. Don't allow non-existant
+ ISO-8859-12 charset. Add support for Windows singlebyte codepages.
+ On Cygwin, add support for GBK, CP949, and BIG5. On Cygwin,
+ call __set_ctype() in case the catorgy is LC_CTYPE. Don't set
+ _current_category and _current_locale.
+ * libc/stdlib/Makefile.am (GENERAL_SOURCES): Add sb_charsets.c.
+ * libc/stdlib/Makefile.in: Regenerate.
+ * libc/stdlib/local.h: Add prototype for __locale_charset.
+ Add prototypes for __mbtowc and __wctomb pointers.
+ Add prototypes for charset-specific _wctomb_r and _mbtowc_r
+ functions.
+ Declare tables and functions from sb_charsets.c.
+ * libc/stdlib/mbtowc_r.c (__mbtowc): Define. Set to __ascii_mbtowc
+ by default.
+ (_mbtowc_r): Just call __mbtowc from here.
+ (__ascii_mbtowc): New function.
+ (__iso_mbtowc): New function.
+ (__cp_mbtowc): New function.
+ (__utf8_mbtowc): New function.
+ (__sjis_mbtowc): New function. Disable on Cygwin.
+ (__eucjp_mbtowc): New function. Disable on Cygwin.
+ (__jis_mbtowc): New function. Disable on Cygwin.
+ * libc/stdlib/sb_charsets.c: New file, adding singlebyte to UTF
+ conversion tables for all ISO and CP charsets.
+ (__iso_8859_index): New function.
+ (__cp_index): New function.
+ * libc/stdlib/wctomb_r.c (__wctomb): Define. Set to __ascii_wctomb
+ by default.
+ (_wctomb_r): Just call __wctomb from here.
+ (__ascii_wctomb): New function.
+ (__utf8_wctomb): New function.
+ (__sjis_wctomb): New function. Disable on Cygwin.
+ (__eucjp_wctomb): New function. Disable on Cygwin.
+ (__jis_wctomb): New function. Disable on Cygwin.
+ (__iso_wctomb): New function.
+ (__cp_wctomb): New function.
+
+2009-03-23 Richard Earnshaw <rearnsha@arm.com>
+
+ * libc/machine/arm/strcmp.c (strcmp): Treat char as unsigned.
+
+2009-03-23 Corinna Vinschen <corinna@vinschen.de>
+
+ * libc/locale/locale.c (loadlocale): Fix typo in language and
+ territory evaluation.
+
+2009-03-20 Jeff Johnston <jjohnstn@redhat.com>
+
+ * libc/include/sys/errno.h: Protect various non-standard errnos
+ with either __LINUX_ERRNO_EXTENSIONS__ or __CYGWIN__.
+ * libc/include/sys/config.h[__CYGWIN__]: Define
+ __LINUX_ERRNO_EXTENSIONS__.
+
+2009-03-19 Corinna Vinschen <corinna@vinschen.de>
+
+ * libc/stdlib/mbtowc_r.c (_mbtowc_r): Return EILSEQ in case of an
+ invalid character sequence.
+
+ * libc/stdlib/mbtowc_r.c (_mbtowc_r): Fix compiler warning due to
+ missing declaration of __locale_charset.
+ * libc/stdlib/wctomb_r.c (_wctomb_r): Ditto.
+
+2009-03-18 Yaakov Selkowitz <yselkowitz@users.sourceforge.net>
+
+ * libm/common/s_log2.c: New file.
+ * libm/common/sf_log2.c: Ditto.
+ * libm/common/Makefile.am: Add s_log2.c and sf_log2.c.
+ * libm/common/Makefile.in: Regenerated.
+ * libc/include/math.h: Add log2 and log2f function prototypes.
+
+2009-03-17 Corinna Vinschen <corinna@vinschen.de>
+
+ * libc/stdlib/mbstowcs_r.c (_mbstowcs_r): Handle NULL destination
+ string correctly.
+
+2009-03-16 Mark Mitchell <mark@codesourcery.com>
+
+ * libc/machine/arm/strlen.c (strlen): Fix defect in Thumb-2 mode.
+
+2009-03-16 Richard Earnshaw <rearnsha@arm.com>
+
+ * libc/machine/arm/strlen.c (strlen): Correctly detect
+ end-of-string.
+ * libc/machine/arm/strcpy.c (strcpy): Likewise.
+ * libc/machine/arm/strcmp.c (strcmp, strcmp_unaligned): Likewise.
+
+2009-03-15 Yaakov Selkowitz <yselkowitz@users.sourceforge.net>
+
+ * libc/include/sys/errno.h (ESTRPIPE): Define.
+ * libc/string/strerror.c (strerror): Decode it.
+
+2009-03-15 Corinna Vinschen <corinna@vinschen.de>
+
+ * libc/include/wchar.h (wcsdup, _wcsdup_r): Declare.
+ * libc/string/Makefile.am: Add wcsdup.c.
+ * libc/string/Makefile.in: Regenerate.
+ * libc/string/strings.tex: Add wcsdup documentation reference.
+ * libc/string/wcsdup.c: New file.
+
+2009-03-14 Corinna Vinschen <corinna@vinschen.de>
+
+ * libc/include/stdlib.h (_mkstemp_r, _mktemp_r): Move out of
+ !_REENT_ONLY section.
+
+2009-03-14 Corinna Vinschen <corinna@vinschen.de>
+
+ * libc/include/stdio.h (_mkstemp_r, _mktemp_r): Move declarations
+ to stdlib.h.
+ * libc/include/stdlib.h (mktemp, _mktemp_r): Warn when using.
+ * libc/stdio/mktemp.c: Explain the security risk when using
+ mktemp.
+
+2009-03-12 Craig Howland <howland@LGSInnovations.com>
+
+ * libc/time/time.tex (wcsftime.def): Include.
+ * libc/time/wcsftime.c: Clean up documentation a little.
+
+2009-03-12 Craig Howland <howland@LGSInnovations.com>
+
+ * libc/stdio/swscanf.c: Some documentation corrections.
+
+2009-03-12 Craig Howland <howland@LGSInnovations.com>
+
+ * libc/stdio/swprintf.c (_swprintf_r, swprintf):
+ correct how terminating L'\0' is added;
+ change return to match standard for when output does not fit;
+ some corrections and enhancements to the docs.
+ * libc/stdio/vswprintf.c (_vswprintf_r): ditto, except for docs.
+ * libc/stdio/vfwprintf.c: some corrections to the docs and some
+ enhancements to comments. (No code changes.)
+ * libc/time/strftime.c: Correct some problems that made wcsftime()
+ not work correctly: work properly with swprintf returns that are
+ different from snprintf returns, correct test vector lengths for
+ when sizeof(wchar_t) > 1.
+ * libc/stdio/sprintf.c: Some documentation and comment corrections and
+ enhancements to match those done to swprintf.c.
+
+2009-03-11 Corinna Vinschen <corinna@vinschen.de>
+
+ * libc/include/wchar.h (wcscasecmp, wcsncasecmp): Declare.
+ * libc/string/Makefile.am: Add wcscasecmp.c, wcsncasecmp.c
+ * libc/stdio/Makefile.in: Regenerate.
+ * libc/string/strings.tex: Add new documentation references.
+ * libc/string/wcscasecmp.c: New file.
+ * libc/string/wcsncasecmp.c: New file.
+
+2009-03-11 Corinna Vinschen <corinna@vinschen.de>
+
+ * libc/include/wchar.h (fwscanf, swscanf, vfwscanf, vswscanf, vwscanf,
+ wscanf): Declare.
+ (_fwscanf_r, _swscanf_r, _vfwscanf_r, _vswscanf_r, _vwscanf_r,
+ _wscanf_r): Declare.
+ * libc/stdio/Makefile.am: Add new wscanf files.
+ * libc/stdio/Makefile.in: Regenerate.
+ * libc/stdio/fwscanf.c: New file.
+ * libc/stdio/local.h (__svfwscanf_r, __ssvfwscanf_r, __svfiwscanf_r,
+ __ssvfiwscanf_r): Declare.
+ * libc/stdio/stdio.tex: Add new documentation references.
+ * libc/stdio/swscanf.c: New file.
+ * libc/stdio/vfwscanf.c: New file.
+ * libc/stdio/vswscanf.c: New file.
+ * libc/stdio/vwscanf.c: New file.
+ * libc/stdio/wscanf.c: New file.
+
+ * libc/stdio/vfscanf.c (_sungetc_r): Make externaly available. Only
+ define if INTEGER_ONLY is defined. Declare otherwise.
+ (__ssrefill_r): Ditto.
+ (_sfread_r): Ditto.
+
+ Remove static eofread/eofread1 functions and use __seofread
+ function instead, throughout.
+ * libc/stdio/local.h (__seofread): Declare.
+ * libc/stdio/stdio.c (__seofread): Define.
+
+ * libc/stdio/fgetwc.c (__fgetwc): Fix compiler warning.
+ * libc/stdio/fgetws.c (_fgetws_r): Ditto.
+ * libc/stdio/fread.c (_fread_r): Ditto.
+ * libc/stdio/vfprintf.c: Ditto.
+ * libc/stdio/vswprintf.c: Ditto.
+
+2009-03-09 Brooks Moses <brooks@codesourcery.com>
+
+ * libc/machine/arm/arm_asm.h: Fix typo.
+
+2009-03-09 Craig Howland <howland@LGSInnovations.com>
+
+ * libc/time/strftime.c: Adapt for dual-purpose use so not only
+ defines strftime(), but can also define wcsftime(); add optional
+ test package; speed up %Y handling.
+ * libc/time/wcsftime.c: New file, defining wcsftime() (albeit
+ indirectly by including strftime.c) and its documentation.
+ * libc/time/time.tex: Enhance tm_isdst explanation, change strftime
+ description to match modified description in strftime.c
+ * libc/time/Makefile.am: Add wcsftime.c and wcsftime.def. Add a rule
+ so that wcsftime.o gets rebuilt when strftime changes.
+ * libc/time/Makefile.in: Regenerate.
+ * libc/include/wchar.h (wcsftime): Declare.
+
+2009-03-06 Hans-Erik Floryd <hans-erik.floryd@rt-labs.com>,
+ Corinna Vinschen <corinna@vinschen.de>
+
+ * libc/reent/reent.c (_reclaim_reent): Make a block from MP-related
+ statements in _REENT_SMALL case. Check if _atexit is not NULL before
+ dereferencing it.
+ (_wrapup_reent): Check if _atexit is not NULL before dereferencing it.
+
+2009-03-06 Corinna Vinschen <corinna@vinschen.de>
+
+ * libc/include/stdio.h (__VALIST): Guard against multiple definition.
+ * libc/include/wchar.h: Include stdarg.h.
+ (__VALIST): Define conditionally.
+ (fwprintf, swprintf, vfwprintf, vswprintf, vwprintf, wprintf): Declare.
+ (_fwprintf_r, _swprintf_r, _vfwprintf_r, _vswprintf_r, _vwprintf_r,
+ _wprintf_r): Declare.
+ * libc/stdio/Makefile.am: Add new files.
+ * libc/stdio/Makefile.in: Regenerate.
+ * libc/stdio/fwprintf.c: New file.
+ * libc/stdio/local.h (_svfwprintf_r, _svfiwprintf_r): Declare.
+ (__CH_CLASS, __STATE, __ACTION): Move definition from vfprintf.c here
+ and move to the __ namespace.
+ (__chclass, __state_table, __action_table): Declare.
+ * libc/stdio/stdio.tex: Add new documentation references.
+ * libc/stdio/swprintf.c: New file.
+ * libc/stdio/vfprintf.c (__SPRINT): New macro to call the right
+ __sprint_r function according to compilation unit. Use throughout.
+ (__ssprint_r): Rename STRING_ONLY variant from __sprint_r.
+ Make externaly available. Only define if INTEGER_ONLY is defined.
+ (__sprint_r): Make externaly available. Only define if INTEGER_ONLY
+ is defined. Handle stream orientation.
+ (__sbprintf): Copy FILE's _flags2 member as well.
+ (__chclass, __state_table, __action_table): Prepend __ to name and
+ make externally available.
+ * libc/stdio/vfwprintf.c: New file.
+ * libc/stdio/vswprintf.c: New file.
+ * libc/stdio/vwprintf.c: New file.
+ * libc/stdio/wprintf.c: New file.
+
+2009-03-03 Corinna Vinschen <corinna@vinschen.de>
+
+ * libc/locale/locale.c (_setlocale_r): New implementation based on
+ FreeBSD's setlocale.
+ (currentlocale): New helper function.
+ (loadlocale): Ditto.
+ (__locale_charset): New function.
+ (__locale_msgcharset): Rename from __locale_charset.
+ * libc/ctype/local.h (__lc_ctype): Remove declaration.
+ (__locale_charset): Declare.
+ * libc/ctype/iswalpha.c (iswalpha): Call __locale_charset instead of
+ using __lc_ctype directly. Only compare against the charset alone.
+ * libc/ctype/iswblank.c (iswblank): Ditto.
+ * libc/ctype/iswcntrl.c (iswcntrl): Ditto.
+ * libc/ctype/iswprint.c (iswprint): Ditto.
+ * libc/ctype/iswpunct.c (iswpunct): Ditto.
+ * libc/ctype/iswspace.c (iswspace): Ditto.
+ * libc/ctype/towlower.c (towlower): Ditto.
+ * libc/ctype/towupper.c (towupper): Ditto.
+ * libc/stdlib/mbtowc_r.c (_mbtowc_r): Ditto.
+ * libc/stdlib/wctomb_r.c (_wctomb_r): Ditto.
+ * libc/sys/linux/intl/loadmsgcat.c (_nl_init_domain_conv): Call
+ __locale_msgcharset instead of __locale_charset.
+
+2009-03-02 Jeff Johnston <jjohnstn@redhat.com>
+
+ * libc/stdlib/wctomb_r.c (_wctomb_r): When checking single-byte
+ charset, cast wchar to size_t in case wchar_t is signed.
+ * libc/stdlib/wctomb.c (wctomb): Add similar single-byte check.
+
+2009-03-02 Corinna Vinschen <corinna@vinschen.de>
+
+ * libc/stdlib/wctomb_r.c (_wctomb_r): Return EILSEQ in case of an
+ invalid wchar. Return -1 if wchar doesn't fit into singlebyte
+ value in case of using a singlebyte charset.
+
+2009-02-26 Brooks Moses <brooks@codesourcery.com>
+
+ * libc/machine/arm/strcpy.c: Add missing comma.
+
+2009-02-26 Ralf Corsepius <ralf.corsepius@rtems.org>
+
+ * libc/machine/lm32/configure.in: Let
+ AC_CONFIG_SRCDIR point to setjmp.S instead of setjmp.s
+ * libs/machine/lm32/configure: Regenerate.
+
+2009-02-25 Brooks Moses <brooks@codesourcery.com>
+
+ * libc/stdlib/Makefile.am (CHEWOUT_FILES): Add
+ mbsnrtowcs.def, wcsnrtombs.def.
+ * libc/stdlib/Makefile.in: Regenerate.
+ * libc/stdlib/stdlib.tex (@menu): Use correct section
+ names for mbsrtowcs, wcsrtombs.
+ * libc/stdlib/wcstod.c: Remove stray character in
+ documentation.
+
+2009-02-25 Corinna Vinschen <corinna@vinschen.de>
+
+ * libc/stdlib/mbtowc_r.c (_mbtowc_r): Remove conversion of 5 and 6
+ byte UTF-8 sequences since they are invalid in the Unicode standard.
+ Handle surrogate pairs in case of wchar_t == UTF-16.
+ * libc/stdlib/wctomb_r.c (_wctomb_r): Don't convert invalid Unicode
+ wchar_t values beyond 0x10ffff into UTF-8 chars. Handle surrogate
+ pairs in case of wchar_t == UTF-16.
+
+2009-02-24 Kevin Buettner <kevinb@redhat.com>
+
+ * libc/stdio/open_memstream.c (stdint.h): Include.
+
+2009-02-23 Craig Howland <howland@LGSInnovations.com>
+
+ * libc/unix/ttyname.c: Remove ttyname_r() (to a new file to avoid
+ coupling ttyname_r() and ttyname() due to the latter's large buffer).
+ * libc/unix/ttyname_r.c: New file to hold ttyname_r(), previously in
+ ttyname.c.
+ * libc/unix/ttyname.h: New file (common size definition for the 2
+ ttyname*c files that are now split).
+ * libc/unix/Makefile.am (ELIX_2_SOURCES): Add ttyname_r.c.
+ * libc/unix/Makefile.in: Regenerate.
+
+2009-02-19 Corinna Vinschen <corinna@vinschen.de>
+
+ * libc/include/wchar.h (mbsnrtowcs): Declare.
+ (_mbsnrtowcs_r): Declare.
+ (wcsnrtombs): Declare.
+ (_wcsnrtombs_r): Declare.
+ * libc/stdlib/Makefile.am (ELIX_2_SOURCES): Add mbsnrtowcs.c
+ and wcsnrtombs.c.
+ * libc/stdlib/Makefile.in: Regenerate.
+ * libc/stdlib/mbsnrtowcs.c: New file, implementing _mbsnrtowcs_r
+ and mbsnrtowcs. Document mbsnrtowcs and mbsrtowcs.
+ * libc/stdlib/mbsrtowcs.c (_mbsrtowcs_r): Just call _mbsnrtowcs_r.
+ (mbsrtowcs): Ditto.
+ * libc/stdlib/wcsnrtombs.c: New file, implementing _wcsnrtombs_r
+ and wcsnrtombs. Document wcsrtombs and wcsnrtombs.
+ * libc/stdlib/wcsrtombs.c (_wcsrtombs_r): Just call _wcsnrtombs_r.
+ (wcsrtombs): Ditto.
+ * libc/stdlib/stdlib.tex: Accommodate new documentation.
+
+2009-02-18 Jeff Johnston <jjohnstn@redhat.com>
+
+ * libc/stdio/open_memstream.c (internal_open_memstream_r): Fix max
+ buffer size to be in wchar_t units if wide == 1 is passed in. In
+ this case, also initialize the first character of the buffer to be
+ wide char null.
+ (_open_wmemstream_r): Cast buf to be (char **) to avoid warning.
+ * libc/stdlib/mbtowc_r.c (_mbtowc_r): Change all occurences of
+ incrementing the size_t value n to first check that n is not already
+ size_t -1. Fix some compiler warnings.
+ * libc/stdlib/wcstod.c: Add includes for <wctype.h> and <math.h>.
+
+2009-02-18 Corinna Vinschen <corinna@vinschen.de>
+
+ * libc/stdio/open_memstream.c: Add open_wmemstream to doumentation.
+ (struct memstream): Add wide element.
+ Change saved to a union to take char and wchar_t values.
+ (memwriter): Accommodate wide-oriented oeprations.
+ (memseeker): Ditto.
+ (memseeker64): Ditto.
+ (memcloser): Ditto.
+ (internal_open_memstream_r): New static function. Take functionality
+ from former _open_memstream_r and handle additional "wide" parameter.
+ (_open_memstream_r): Just call internal_open_memstream_r with wide==-1
+ from here.
+ (_open_wmemstream_r): New function.
+ (open_wmemstream): Ditto.
+ * libc/include/wchar.h (open_wmemstream): Declare.
+ (_open_wmemstream_r): Declare.
+
+2009-02-16 Corinna Vinschen <corinna@vinschen.de>
+
+ * libc/stdio/fputwc.c: Fix typo in man page info.
+
+2009-02-12 Corinna Vinschen <corinna@vinschen.de>
+
+ * libc/include/wchar.h (_wcstod_r): Declare.
+ (_wcstof_r): Declare.
+ (wcstod): Declare.
+ (wcstof): Declare.
+ * libc/stdlib/Makefile.am (GENERAL_SOURCES): Add wcstod.c.
+ (CHEWOUT_FILES): Add wcstod.def.
+ * libc/stdlib/Makefile.in: Regenerate.
+ * libc/stdlib/stdlib.tex: Add wcstod.
+ * libc/stdlib/wcstod.c: New file.
+
+2009-02-05 Neal H. Walfield <neal@gnu.org>
+
+ * libc/machine/x86_64/memcpy.S (memcpy): Don't use the red zone.
+
+2009-01-28 Jeff Johnston <jjohnstn@redhat.com>
+
+ * libc/stdio/vfscanf.c (__SVFSCANF_R): Add additional check for
+ inf and nan processing to not proceed if we have already collected
+ zeroes.
+
+2009-01-26 DJ Delorie <dj@redhat.com>
+
+ * configure.host (m32c-*-*): Add long long I/O support by default.
+
+2009-01-21 Richard Earnshaw <rearnsha@arm.com>
+
+ * libc/machine/arm/arm_asm.h: New file.
+ * libc/machine/arm/strlen.c: New file.
+ * libc/machine/arm/strcpy.c: New file.
+ * libc/machine/arm/strcmp.c: New file.
+ * libc/machine/arm/Makefile.am: Add new string routines.
+
+2009-01-19 Neal H. Walfield <neal@gnu.org>
+
+ * libc/include/stdint.h (INT64_C, UINT64_C, INTMAX_C, UINTMAX_C)
+ [__have_long64 && __have_longlong64]: Use L and UL, not LL and ULL.
+ * libc/include/inttypes.h (__PRI64, __SCN64, __PRIMAX, __SCNMAX,
+ __PRIPTR, __SCNPTR) [__have_long64 && __have_longlong64]: Use l,
+ not ll.
+
+2009-01-12 Nathan Froyd <froydnj@codesourcery.com>
+
+ * libc/machine/powerpc/vfscanf.c (__sccl): Remove declaration.
+
+2009-01-12 Jeff Johnston <jjohnstn@redhat.com>
+
+ * libc/stdio/fwalk.c (__fwalk, __fwalk_reent): Remove locking of
+ each fp. Let the function being called lock the fp, if necessary.
+
+2009-01-07 Kazu Hirata <kazu@codesourcery.com>
+
+ * libc/include/sys/stdio.h (_flockfile, _funlockfile): Fix typos.
+
+2009-01-05 Craig Howland <howland@LGSInnovations.com>
+
+ * libc/stdio/fwide.c: Correct typo in TRAD_SYNOPSIS for _fwide_r.
+
+2008-12-19 Jeff Johnston <jjohnstn@redhat.com>
+
+ * NEWS: Update with 1.17.0 info.
+ * README: Ditto.
+ * acinclude.m4: Change version number to 1.17.0.
+ * aclocal.m4: Regenerated.
+ * configure: Ditto.
+ * doc/aclocal.m4: Ditto.
+ * doc/configure: Ditto.
+ * libc/*/aclocal.m4: Ditto.
+ * libc/*/configure: Ditto.
+ * libc/libc.texinfo: Ditto.
+ * libm/*/aclocal.m4: Ditto.
+ * libm/*/configure: Ditto.
+ * libm/libm.texinfo: Ditto.
+ * libc/sys/linux/shared.ld: Add VERS_1.17
+
+2008-12-17 Jon Beniston <jon@beniston.com>
+
+ * configure.host: Set syscall_dir for lm32 target.
+
+2008-12-15 Jeff Johnston <jjohnstn@redhat.com>
+
+ * libc/stdio/stdio.tex: Remove putwc and getwc references as they
+ are included as part of fputwc and fgetwc, respectively.
+
+2008-12-12 Craig Howland <howland@LGSInnovations.com>
+
+ * libc/include/wchar.h: Added wcstok() declaration.
+ * libc/string/wcstok.c: New file, implementing wcstok.
+ * libc/string/Makefile.am: Add wcstok support.
+ * libc/string/wcstrings.tex: Ditto.
+ * libc/string/Makefile.in: Regenerated.
+
+2008-12-12 Ralf Corsepius <ralf.corsepius@rtems.org>
+
+ * libc/stdio/fputws.c: Fix documentation.
+ * libc/stdio/getwchar.c: Ditto.
+ * libc/stdio/putwchar.c: Ditto.
+
+2008-12-12 Ralf Corsepius <ralf.corsepius@rtems.org>
+
+ * libc/include/sys/features.h: Set RTEMS's _POSIX_MONOTONIC_CLOCK to
+ 200112L (SUSv3 compliance).
+ Comment out RTEMS's _POSIX_SHARED_MEMORY_OBJECTS (Unsupported).
+
+2008-12-12 Ralf Corsepius <ralf.corsepius@rtems.org>
+
+ * libc/sys/rtems/crt0.c: Add stubs for getdents(), nanosleep(),
+ _execve(), _exit().
+
+2008-12-12 Ralf Corsepius <ralf.corsepius@rtems.org>
+
+ * configure.host: Let *rtems* default to c99-formats.
+
+2008-12-12 Craig Howland <howland@LGSInnovations.com>
+
+ * libc/stdio/freopen.c: Add <string.h> for memset prototype.
+ * libc/stdio/fseek.c: Ditto.
+ * libc/stdio/fwide.c: Add <wchar.h> for fwide prototype.
+
+2008-12-11 Jeff Johnston <jjohnstn@redhat.com>
+
+ * libc/include/sys/time.h (gettimeofday): Change prototype so
+ 2nd parameter is void *, matching SUSV2.
+ * libc/syscalls/sysgettod.c (gettimeofday): Ditto.
+
+2008-12-11 Jukka Pietarinen <jukka.pietarinen@mrf.fi>
+
+ * configure.host: Add lm32
+ * libc/include/machine/ieeefp.h: Add __lm32__
+ * libc/include/machine/setjmp.h: Add __lm32__
+ * libc/machine/configure.in: Add lm32
+ * libc/machine/configure: Regenerated.
+ * libc/machine/lm32/aclocal.m4: New file.
+ * libc/machine/lm32/configure.in: Ditto.
+ * libc/machine/lm32/configure: Ditto.
+ * libc/machine/lm32/Makefile.am: Ditto.
+ * libc/machine/lm32/Makefile.in: Ditto.
+ * libc/machine/lm32/setjmp.s: Ditto.
+
+2008-12-11 Craig Howland <howland@LGSInnovations.com>
+
+ * libc/include/sys/lock.h: Add void cast to avoid "statement has no
+ effect" warnings from gcc.
+ * libc/include/sys/stdio.h: Ditto.
+ * libc/include/sys/time.h: Correct gettimeofday() prototype.
+ * libc/stdlib/__exp10.c: Add #include "std.h" for function prototype.
+ * libc/stdlib/__ten_mu.c: Ditto.
+ * libc/stdlib/std.h: Correct __exp10's ANSI prototype.
+ * libc/stdlib/ldtoa.c: Change eiisinf definition to ANSI form. (Are
+ already others in file without _ansi method, so did not bother.)
+ * libc/stdlib/system.c: Use _ansi forms for function prototypes and
+ definitions.
+ * libc/time/mktime.c: Ditto.
+ * libc/misc/__dprintf.c: Ditto.
+ * libc/include/stdio.h: Add function prototypes for _fgetc_r,
+ _fgetpos_r, _fsetpos_r, _freopen_r, _rewind_r, freopen64, _freopen64_r,
+ _funopen_r, and _fopencookie_r.
+ * libc/include/reent.h: Add function prototype for _stat64_r, align
+ _execve_r prototype with POSIX definition for execve.
+ * libc/reent/execr.c: Align function prototype with POSIX definition.
+ * libc/stdio/asniprintf.c: Add #include "local.h".
+ * libc/stdio/vasniprintf.c: Ditto.
+ * libc/stdio/fread.c: Remove unused variable newcount.
+ * libc/stdio/local.h: Add function prototype for __sccl.
+ * libc/stdio/open_memstream.c: Remove unused variable flags.
+ * libc/stdio/vfscanf.c: Proper prototyping for ccfn, remove prototype
+ for __sccl since now in local.h.
+ * libc/string/memcpy.c: Add #include <string.h> (for real and for
+ traditional synopsis), remove extraneous stddef.h and limits.h.
+ * libc/syscalls/sysclose.c: Add #include <unistd.h>.
+ * libc/syscalls/sysfork.c: Ditto.
+ * libc/syscalls/sysgetpid.c: Ditto.
+ * libc/syscalls/sysexecve.c: Add #include <unistd.h>, align function
+ prototype with POSIX definition.
+ * libc/syscalls/sysfstat.c: Add #include <sys/stat.h>.
+ * libc/syscalls/sysgettod.c: Correct sys/times.h to sys/time.h.
+ * libc/syscalls/syskill.c: Add #include <signal.h>.
+ * libc/syscalls/syslink.c: Add #include <unistd.h>, fix prototype.
+ * libc/syscalls/sysunlink.c: Ditto.
+ * libc/syscalls/sysstat.c: Add #include <sys/stat.h>, fix prototype.
+ * libc/syscalls/syswait.c: Add #include <sys/wait.h>, fix prototype.
+
+2008-12-10 Corinna Vinschen <corinna@vinschen.de>
+
+ Implement basic wide char stdio functionality, based on FreeBSD.
+ * libc/include/stdio.h (__SORD): Define.
+ (__SWID): Define.
+ * libc/include/wchar.h: Add declarations for new wide char functions.
+ (getwc): Define as macro.
+ (getwchar): Ditto.
+ (putwc): Ditto.
+ (putwchar): Ditto.
+ * libc/include/sys/reent.h (struct __sFILE): Add _mbstate member.
+ (struct __sFILE64): Ditto.
+ * libc/stdio/Makefile.am (ELIX_4_SOURCES): Add fgetwc.c, fgetws.c,
+ fputwc.c, fputws.c, fwide.c, getwc.c, getwchar.c, putwc.c, putwchar.c
+ and ungetwc.c.
+ (CHEWOUT_FILES): Add fgetwc.def, fgetws.def, fputwc.def, fputws.def,
+ fwide.def, getwc.def, getwchar.def, putwc.def, putwchar.def and
+ ungetwc.def.
+ Add header dependency rules for the new files.
+ * libc/stdio/Makefile.in: Regenerate.
+ * libc/stdio/fgetwc.c: New file, implementing fgetwc and _fgetwc_r.
+ * libc/stdio/fgetws.c: New file, implementing fgetws and _fgetws_r.
+ * libc/stdio/findfp.c (std): Initialize FILE's _mbstate member.
+ (__sfmoreglue): Ditto.
+ * libc/stdio/fputs.c (_fputs_r): Set stream orientation.
+ * libc/stdio/fputwc.c: New file, implementing fputwc and _fputwc_r.
+ * libc/stdio/fputws.c: New file, implementing fputws and _fputws_r.
+ * libc/stdio/fread.c (_fread_r): Set stream orientation.
+ * libc/stdio/freopen.c (_freopen_r): Reset stream orientation. Reset
+ _mbstate.
+ * libc/stdio/fseek.c (_fseek_r): Reset _mbstate.
+ * libc/stdio/fwide.c: New file, implementing fwide and _fwide_r.
+ * libc/stdio/fwrite.c (_fwrite_r): Set stream orientation.
+ * libc/stdio/getwc.c: New file, implementing getwc and _getwc_r.
+ * libc/stdio/getwchar.c: New file, implementing getwchar and
+ _getwchar_r.
+ * libc/stdio/local.h (ORIENT): New macro.
+ * libc/stdio/puts.c (_puts_r): Set stream orientation.
+ * libc/stdio/putwc.c: New file, implementing putwc and _putwc_r.
+ * libc/stdio/putwchar.c: New file, implementing putwchar and
+ _putwchar_r.
+ * libc/stdio/refill.c (__srefill_r): Set stream orientation.
+ * libc/stdio/stdio.tex: Add documentation for new functions.
+ * libc/stdio/ungetc.c (_ungetc_r): Set stream orientation.
+ * libc/stdio/ungetwc.c: New file, implementing ungetwc and _ungetwc_r.
+ * libc/stdio/vfscanf.c (__SVFSCANF_R): Set stream orientation.
+ * libc/stdio/wbuf.c (__swbuf_r): Ditto.
+
+2008-12-10 Joseph Myers <joseph@codesourcery.com>
+
+ * libc/include/stdint.h (INT32_MIN, INT32_MAX, UINT32_MAX,
+ INT_LEAST32_MIN, INT_LEAST32_MAX, UINT_LEAST32_MAX): Define to
+ constants with "long" types where appropriate.
+ (INT_FAST8_MIN, INT_FAST8_MAX, UINT_FAST8_MAX, INT_FAST16_MIN,
+ INT_FAST16_MAX, UINT_FAST16_MAX, INT_FAST32_MIN, INT_FAST32_MAX,
+ UINT_FAST32_MAX, INT_FAST64_MIN, INT_FAST64_MAX, UINT_FAST64_MAX):
+ Correct to match logic for defining corresponding types.
+ (INTMAX_MAX, INTMAX_MIN, UINTMAX_MAX): Define.
+ (SIZE_MAX): Define using __SIZE_MAX__ if available.
+ (PTRDIFF_MAX): Define using __PTRDIFF_MAX__ if available.
+ (PTRDIFF_MIN): Define in terms of PTRDIFF_MAX.
+ (WCHAR_MAX, WCHAR_MIN, WINT_MAX, WINT_MIN): Define.
+ (UINT8_C, UINT16_C): Define to give signed values if corresponding
+ types would promote to int.
+
+2008-12-04 Corinna Vinschen <corinna@vinschen.de>
+
+ * libc/include/sys/features.h (_POSIX_V6_ILP32_OFF32): Always define.
+ (_POSIX_V6_LP64_OFF64): Ditto.
+ (_POSIX_V6_LPBIG_OFFBIG): Ditto.
+
+2008-11-28 Jeff Johnston <jjohnstn@redhat.com>
+
+ * libc/sys/linux/inode.c: Include <dirent.h> instead of
+ <linux/dirent.h>.
+ * libc/sys/linux/io64.c: Add weak alias for _stat64.
+
+2008-11-27 Ralf Corsepius <ralf.corsepius@rtems.org>
+
+ * libc/posix/telldir.c: Use #if !defined() instead of #ifndef
+ to fix GCC warning.
+
+2008-11-27 Ken Werner <ken.werner@de.ibm.com>
+
+ * libc/machine/spu/Makefile.am: Add spu-mcount.S spu-gmon.c.
+ * libc/machine/spu/Makefile.in: Regenerated.
+ * libc/machine/spu/spu-gmon.c: New file.
+ * libc/machine/spu/spu-mcount.S: New file.
+
+2008-11-27 Joel Sherrill <joel.sherrill@oarcorp.com>
+
+ * configure.host (*-rtems*): Turn on using portion of unix subdirectory.
+
+2008-11-27 Craig Howland <howland@LGSInnovations.com>
+
+ * libc/argz/argz_add.c: Added #include <argz.h> to get function
+ prototypes.
+ * libc/argz/argz_append.c: Ditto.
+ * libc/argz/argz_count.c: Ditto.
+ * libc/argz/argz_create.c: Ditto.
+ * libc/argz/argz_create_sep.c: Ditto.
+ * libc/argz/argz_delete.c: Ditto.
+ * libc/argz/argz_next.c: Ditto.
+ * libc/argz/argz_stringify.c: Ditto
+ * libc/stdlib/strtod.c: Added #include <stdlib.h> to get function
+ prototypes.
+ * libc/stdlib/wcstoul.c: Added #include <wchar.h> to get function
+ prototypes, corrected traditional usage comment.
+ * libc/include/wchar.h: Added _mbsrtowcs_r() prototype.
+
+2008-11-26 Ken Werner <ken.werner@de.ibm.com>
+
+ * libm/machine/spu/headers/acosd2.h: Rebase against current simdmath.
+ * libm/machine/spu/headers/asind2.h: Likewise.
+ * libm/machine/spu/headers/asinhf4.h: Likewise.
+ * libm/machine/spu/headers/divd2.h: Likewise.
+ * libm/machine/spu/headers/erf_utils.h: Likewise.
+ * libm/machine/spu/headers/erfcd2.h: Likewise.
+ * libm/machine/spu/headers/erfcf4.h: Likewise.
+ * libm/machine/spu/headers/erfd2.h: Likewise.
+ * libm/machine/spu/headers/recipd2.h: Likewise.
+
+2008-11-25 Corinna Vinschen <corinna@vinschen.de>
+
+ * libc/stdio/gets.c (_gets_r): Lock stdin here and call
+ __sgetc_r instead of _getchar_r.
+
+2008-11-24 Craig Howland <howland@LGSInnovations.com>
+
+ * libc/stdlib/wcstoull_r.c: Add EINVAL return for bad base value,
+ include wchar.h for prototype, remove extraneous includes, use
+ C99/POSIX ULLONG_MAX (but allow for poor limits.h).
+ * libc/stdlib/wcstoull.c: Fix usage comments (mistakes and to add
+ base value check noted above), remove extraneous includes.
+ * libc/stdio/asnprintf.c: Add #include "local.h" to get function
+ prototype for _svfprintf_r().
+ * libc/stdio/vasnprintf.c: Ditto.
+ * libc/stdio/local.h: Add function prototype for __submore().
+ * libc/include/stdio.h: Add function prototypes for _fseeko_r and
+ _ftello_r.
+ * libc/posix/namespace.h: Commented out define for write to
+ eliminate write() prototype being missing for collate.c (which is
+ the only file that presently includes namespace.h).
+ * libc/include/reent.h: Added _rename_r.
+ * libc/reent/renamer.c: Corrected function prototypes in synopses.
+ * libc/locale/ldpart.c: Use struct stat64 when calling fstat64.
+
+2008-11-24 Jeff Johnston <jjohnstn@redhat.com>
+
+ * libc/search/hash_func.c: Comment out unused static hash functions.
+ * libc/reent/stat64r.c: New file.
+ * libc/reent/Makefile.am: Add stat64r.c support.
+ * libc/reent/Makefile.in: Regenerated.
+
+2008-11-24 Joel Sherrill <joel.sherrill@oarcorp.com>
+
+ * libc/posix/scandir.c: Fix memory leaks.
+
+2008-11-24 Joel Sherrill <joel.sherrill@oarcorp.com>
+
+ * libc/posix/Makefile.am: Compile readdir_r.c not readdir.c twice.
+ * libc/posix/Makefile.in: Regenerated.
+
+2008-11-24 Corinna Vinschen <corinna@vinschen.de>
+
+ * libc/include/stdio.h (__SMOD): Remove definition of unused flag.
+ * libc/include/sys/reent.h (struct __sFILE): Add _flags2 member.
+ * libc/stdio/findfp.c (std): Initialize _flags2.
+ (__sfp): Ditto.
+ * libc/stdio/refill.c (__srefill_r): Drop resetting __SMOD flag.
+ * libc/stdio/vfscanf.c (__ssrefill_r): Ditto.
+ * libc/stdio/fseek.c (_fseek_r): Drop checking __SMOD flag.
+ * libc/stdio64/fseeko64.c (_fseeko64_r): Ditto.
+
+2008-11-20 Ken Werner <ken.werner@de.ibm.com>
+
+ * libc/machine/spu/sys/linux_syscalls.h: Additional syscall defines to
+ be in sync with current kernels.
+
+2008-11-20 Ken Werner <ken.werner@de.ibm.com>
+ Patrick Mansfield <patmans@us.ibm.com>
+ Joel Schopp <jschopp@austin.ibm.com>
+
+ * libc/machine/spu/configure.in: Add __ea detection.
+ * libc/machine/spu/Makefile.am: Add new files.
+ * libc/machine/spu/include/ea.h: New file.
+ * libc/machine/spu/ea_internal.h: Likewise.
+ * libc/machine/spu/sys/mman.h: Likewise.
+ * libc/machine/spu/mmap_ea.c: Likewise.
+ * libc/machine/spu/munmap_ea.c: Likewise.
+ * libc/machine/spu/mremap_ea.c: Likewise.
+ * libc/machine/spu/msync_ea.c: Likewise.
+ * libc/machine/spu/memchr_ea.c: Likewise.
+ * libc/machine/spu/memcmp_ea.c: Likewise.
+ * libc/machine/spu/memcpy_ea.c: Likewise.
+ * libc/machine/spu/memmove_ea.c: Likewise.
+ * libc/machine/spu/memset_ea.c: Likewise.
+ * libc/machine/spu/malloc_ea.c: Likewise.
+ * libc/machine/spu/realloc_ea.c: Likewise.
+ * libc/machine/spu/calloc_ea.c: Likewise.
+ * libc/machine/spu/free_ea.c: Likewise.
+ * libc/machine/spu/posix_memalign_ea.c: Likewise.
+ * libc/machine/spu/strcat_ea.c: Likewise.
+ * libc/machine/spu/strchr_ea.c: Likewise.
+ * libc/machine/spu/strcmp_ea.c: Likewise.
+ * libc/machine/spu/strcpy_ea.c: Likewise.
+ * libc/machine/spu/strcspn_ea.c: Likewise.
+ * libc/machine/spu/strlen_ea.c: Likewise.
+ * libc/machine/spu/strncat_ea.c: Likewise.
+ * libc/machine/spu/strncmp_ea.c: Likewise.
+ * libc/machine/spu/strncpy_ea.c: Likewise.
+ * libc/machine/spu/strpbrk_ea.c: Likewise.
+ * libc/machine/spu/strrchr_ea.c: Likewise.
+ * libc/machine/spu/strspn_ea.c: Likewise.
+ * libc/machine/spu/strstr_ea.c: Likewise.
+ * libc/machine/spu/read_ea.c: Likewise.
+ * libc/machine/spu/pread_ea.c: Likewise.
+ * libc/machine/spu/readv_ea.c: Likewise.
+ * libc/machine/spu/write_ea.c: Likewise.
+ * libc/machine/spu/pwrite_ea.c: Likewise.
+ * libc/machine/spu/writev_ea.c: Likewise.
+
+2008-11-19 Joel Sherrill <joel.sherrill@oarcorp.com>
+
+ * libc/include/sys/config.h[__mips__]: Don't bother
+ setting __ATTRIBUTE_IMPURE_PTR__ here.
+ [__rtems__][__mips__]: No need to undef the __ATTRIBUTE_IMPURE_PTR__
+ macro anymore.
+
+2008-11-19 Jeff Johnston <jjohnstn@redhat.com>
+
+ * libc/sys/linux/bits/dirent.h: New header file.
+ * libc/sys/linux/sys/dirent.h: Include <bits/dirent.h> instead of
+ <linux/dirent.h>.
+ * libc/posix/Makefile.am: Remove reallocf.
+ * libc/posix/Makefile.in: Regenerated.
+ * libc/posix/reallocf.c: Moved to...
+ * libc/stdlib/reallocf.c: Here
+ * libc/stdlib/malloc.c: Add reallocf documentation.
+ * libc/include/stdlib.h: Add reallocf and _reallocf_r prototypes.
+ * libc/stdlib/Makefile.am: Add reallocf.
+ * libc/stdlib/Makefile.in: Regenerated.
+ * libc/posix/_isatty.c: Set errno.
+
+2008-11-19 Craig Howland <howland@LGSInnovations.com>
+
+ * libc/unix/collate.c (__collate_err): simplify to remove unnecessary
+ strdup() and strlen() calls, also getting rid of a compiler warning.
+
+2008-11-19 Ralf Corsepius <ralf.corsepius@rtems.org>
+
+ * libc/include/sys/config.h: Don't put
+ __ATTRIBUTE_IMPURE_PTR__ into .sdata section for mips-rtems.
+
+2008-11-19 Ralf Corsepius <ralf.corsepius@rtems.org>
+
+ * libc/posix/runetype.h: Add include of stddef.h and remove
+ defining standard types: size_t and wchar_t.
+
+2008-11-19 Ralf Corsepius <ralf.corsepius@rtems.org>
+
+ * libc/include/pthread.h: Remove prototypes for
+ pthread_attr_getcputime and pthread_attr_setcputime which
+ were proposed but never approved by the POSIX standard.
+
+2008-11-18 Joel Sherrill <joel.sherrill@oarcorp.com>
+
+ * libc/unix/ttyname.c: Use isatty() instead of tcgetattr().
+
+2008-11-18 Jeff Johnston <jjohnstn@redhat.com>
+
+ * libc/unix/basename.c: Add !_NO_BASENAME flag check so code can be
+ ignored if desired by a platform.
+ * libc/unix/dirname.c: Ditto except replace BASENAME with file name.
+ * libc/unix/getcwd.c: Ditto.
+ * libc/unix/getlogin.c: Ditto.
+ * libc/unix/getpass.c: Ditto.
+ * libc/unix/getpwent.c: Ditto.
+ * libc/unix/getut.c: Ditto.
+ * libc/unix/pread.c: Ditto.
+ * libc/unix/pwrite.c: Ditto.
+ * libc/unix/sigset.c: Ditto.
+
+2008-11-18 Craig Howland <howland@LGSInnovations.com>
+
+ * libc/unix/ttyname.c: Add ttyname_r and change ttyname to use
+ ttyname_r.
+
+2008-11-17 Joel Sherrill <joel.sherrill@oarcorp.com>
+
+ * configure.host: RTEMS now uses posix subdirectory.
+
+2008-11-17 Joel Sherrill <joel.sherrill@oarcorp.com>
+
+ * sys/rtems/include/limits.h: Add _POSIX2_RE_DUP_MAX.
+ * sys/rtems/sys/param.h: sys/rtprio.h not needed.
+
+2008-10-31 Jeff Johnston <jjohnstn@redhat.com>
+
+ * libc/stdio/diprintf.c: Modify documentation so eclipse newlib
+ libhover docs generate properly.
+ * libc/stdio/dprintf.c: Ditto.
+ * libc/stdio/fflush.c: Ditto.
+ * libc/stdio/fopencookie.c: Ditto.
+ * libc/stdio/fread.c: Ditto.
+ * libc/stdio/fsetpos.c: Ditto.
+ * libc/stdio/getc_u.c: Ditto.
+ * libc/stdio/getchar_u.c: Ditto.
+ * libc/stdio/putc_u.c: Ditto.
+ * libc/stdio/putchar_u.c: Ditto.
+ * libc/stdio/remove.c: Ditto.
+ * libc/stdio/siprintf.c: Ditto.
+ * libc/stdio/siscanf.c: Ditto.
+ * libc/stdio/sprintf.c: Ditto.
+ * libc/stdio/sscanf.c: Ditto.
+ * libc/stdio/vfprintf.c: Ditto.
+ * libc/stdio/vfscanf.c: Ditto.
+ * libc/stdio/viprintf.c: Ditto.
+ * libc/stdio/viscanf.c: Ditto.
+ * libc/stdlib/calloc.c: Ditto.
+ * libc/stdlib/efgcvt.c: Ditto.
+ * libc/stdlib/envlock.c: Ditto.
+ * libc/time/asctime.c: Ditto.
+ * libc/time/ctime.c: Ditto.
+ * libc/time/gmtime.c: Ditto.
+ * libc/time/lcltime.c: Ditto.
+ * libc/time/tzset.c: Ditto.
+ * libc/stdlib/envlock.h: Moved to libc/include.
+
+2008-10-31 Jeff Johnston <jjohnstn@redhat.com>
+
+ * libc/include/limits.h: Add ARG_MAX, PATH_MAX, and _POSIX2_RE_DUP_MAX.
+ * libc/include/envlock.h: New file.
+ * libc/include/fnmatch.h: Ditto.
+ * libc/include/glob.h: Ditto.
+ * libc/include/regex.h: Ditto.
+ * libc/include/wordexp.h: Ditto.
+ * libc/posix/Makefile.am: Add new files moved from
+ libc/sys/linux/stdlib.
+ * libc/posix/Makefile.in: Regenerated.
+ * libc/posix/COPYRIGHT: New file moved from libc/sys/linux/stdlib.
+ * libc/posix/cclass.h: Ditto.
+ * libc/posix/cname.h: Ditto.
+ * libc/posix/collate.c: Ditto.
+ * libc/posix/collate.h: Ditto.
+ * libc/posix/collcmp.c: Ditto.
+ * libc/posix/engine.c: Ditto.
+ * libc/posix/fnmatch.3: Ditto.
+ * libc/posix/glob.3: Ditto.
+ * libc/posix/fnmatch.c: Ditto.
+ * libc/posix/glob.c: Ditto.
+ * libc/posix/namespace.h: Ditto.
+ * libc/posix/reallocf.c: Ditto.
+ * libc/posix/regcomp.c: Ditto.
+ * libc/posix/regerror.c: Ditto.
+ * libc/posix/regex.3: Ditto.
+ * libc/posix/regex2.h: Ditto.
+ * libc/posix/regexec.c: Ditto.
+ * libc/posix/regfree.c: Ditto.
+ * libc/posix/rune.h: Ditto.
+ * libc/posix/runetype.h: Ditto.
+ * libc/posix/scandir.c: Remove advertising clause which is not in
+ effect.
+ * libc/posix/sysexits.h: Ditto.
+ * libc/posix/un-namespace.h: Ditto.
+ * libc/posix/utils.h: Ditto.
+ * libc/posix/wordexp.c: Ditto.
+ * libc/posix/wordfree.c: Ditto.
+ * libc/posix/execl.c: Add !_NO_EXECVE flag check.
+ * libc/posix/execle.c: Ditto.
+ * libc/posix/execlp.c: Ditto.
+ * libc/posix/execv.c: Ditto.
+ * libc/posix/execve.c: Ditto.
+ * libc/posix/execvp.c: Ditto.
+ * libc/posix/popen.c: Add !_NO_POPEN flag check.
+ * libc/sys/linux/configure: Regenerated.
+ * libc/sys/linux/configure.in: Remove stdlib.
+ * libc/sys/linux/include/limits.h: Add include of linux/limits.h.
+ * libc/sys/linux/stdlib/Makefile.am: Removed.
+ * libc/sys/linux/stdlib/Makefile.in: Ditto.
+ * libc/sys/linux/stdlib/COPYRIGHT: Moved to libc/posix.
+ * libc/sys/linux/stdlib/cclass.h: Ditto.
+ * libc/sys/linux/stdlib/cname.h: Ditto.
+ * libc/sys/linux/stdlib/collate.c: Ditto.
+ * libc/sys/linux/stdlib/collate.h: Ditto.
+ * libc/sys/linux/stdlib/collcmp.c: Ditto.
+ * libc/sys/linux/stdlib/engine.c: Ditto.
+ * libc/sys/linux/stdlib/fnmatch.3: Ditto.
+ * libc/sys/linux/stdlib/fnmatch.c: Ditto.
+ * libc/sys/linux/stdlib/glob.3: Ditto.
+ * libc/sys/linux/stdlib/glob.c: Ditto.
+ * libc/sys/linux/stdlib/reallocf.c: Ditto.
+ * libc/sys/linux/stdlib/regcomp.c: Ditto.
+ * libc/sys/linux/stdlib/regerror.c: Ditto.
+ * libc/sys/linux/stdlib/regex.3: Ditto.
+ * libc/sys/linux/stdlib/regex2.h: Ditto.
+ * libc/sys/linux/stdlib/regexec.c: Ditto.
+ * libc/sys/linux/stdlib/regfree.c: Ditto.
+ * libc/sys/linux/stdlib/utils.h: Ditto.
+ * libc/sys/linux/stdlib/wordexp.c: Ditto.
+ * libc/sys/linux/stdlib/wordfree.c: Ditto.
+
+2008-10-16 Joel Sherrill <joel.sherrill@oarcorp.com>
+
+ * libc/include/sys/unistd.h: RTEMS follows standard for sync().
+
+2008-10-16 Joel Sherrill <joel.sherrill@oarcorp.com>
+
+ * libc/include/time.h: Add CLOCK_MONOTONIC.
+ * libc/include/sys/features.h: Define
+ _POSIX_MONOTONIC_CLOCK for RTEMS.
+
+2008-10-15 Jeff Johnston <jjohnstn@redhat.com>
+
+ * newlib.hin: Restore to previous 1.14 version which has no
+ PACKAGE_ macros.
+
+2008-10-15 Joel Sherrill <joel.sherrill@oarcorp.com>
+
+ * libc/include/sys/unistd.h: Enable ttyname_r() for RTEMS.
+
+2008-10-15 Craig Howland <howland@LGSInnovations.com>
+
+ * libc/include/ctype.h (isblank): isblank is C99.
+ * libc/ctype/isblank.c (isblank comments): ditto. isblank does not
+ have a macro version (as was claimed in the description).
+
+2008-10-15 Jeff Johnston <jjohnstn@redhat.com>
+
+ * libc/stdio/vfscanf.c (__ssvfiscanf_r): Do not support %lc, %C, %ls or
+ %S conversions when the EL/IX level is 1.
+
+2008-10-06 Eric Blake <ebb9@byu.net>
+
+ * libc/stdlib/ldtoa.c (etoasc): Fix rounding to even when fraction
+ is 0.5 or 0.75.
+
+2008-10-06 Craig Howland <howland@LGSInnovations.com>
+
+ * libc/time/tzset_r.c (_tzset_r): Change US default start/end dates to
+ 2007 law revision of start in 2nd Sunday in March, end 1st Sun in Nov.
+
+2008-10-02 Jeff Johnston <jjohnstn@redhat.com>
+
+ * libc/string/str-two-way.h (critical_factorization): Cast the index
+ operation to ensure unsigned rollover occurs when adding to SIZE_MAX.
+
+2008-10-02 Jeff Johnston <jjohnstn@redhat.com>
+
+ * libc/sys/linux/include/stdint.h (SIZE_MAX): Fix value which should
+ be size of size_t, not int.
+ (SIZE_MIN): Remove.
+ * libc/sys/linux/sys/stdint.h: Ditto.
+
+2008-10-02 Jeff Johnston <jjohnstn@redhat.com>
+
+ * libc/include/sys/reent.h[_REENT_SMALL](_REENT_INIT_RAND48): Add
+ initialization of _rand_next to 1.
+
+2008-09-29 Peter O'Gorman <pogma@thewrittenword.com>
+ Steve Ellcey <sje@cup.hp.com>
+
+ * configure: Regenerate for new libtool.
+ * aclocal.m4: Ditto.
+ * Makefile.in: Ditto.
+ * newlib.hin: Ditto.
+ * doc/Makefile.in: Ditto.
+ * doc/configure: Ditto.
+ * iconvdata/Makefile.in: Ditto.
+ * iconvdata/aclocal.m4: Ditto.
+ * iconvdata/configure: Ditto.
+ * libc/Makefile.in: Ditto.
+ * libc/aclocal.m4: Ditto.
+ * libc/configure: Ditto.
+ * libc/argz/Makefile.in: Ditto.
+ * libc/ctype/Makefile.in: Ditto.
+ * libc/errno/Makefile.in: Ditto.
+ * libc/iconv/Makefile.in: Ditto.
+ * libc/iconv/ccs/Makefile.in: Ditto.
+ * libc/iconv/ccs/binary/Makefile.in: Ditto.
+ * libc/iconv/ces/Makefile.in: Ditto.
+ * libc/iconv/lib/Makefile.in: Ditto.
+ * libc/locale/Makefile.in: Ditto.
+ * libc/machine/Makefile.in: Ditto.
+ * libc/machine/aclocal.m4: Ditto.
+ * libc/machine/configure: Ditto.
+ * libc/machine/a29k/Makefile.in: Ditto.
+ * libc/machine/a29k/configure: Ditto.
+ * libc/machine/arm/Makefile.in: Ditto.
+ * libc/machine/arm/configure: Ditto.
+ * libc/machine/bfin/Makefile.in: Ditto.
+ * libc/machine/bfin/configure: Ditto.
+ * libc/machine/cris/Makefile.in: Ditto.
+ * libc/machine/cris/configure: Ditto.
+ * libc/machine/crx/Makefile.in: Ditto.
+ * libc/machine/crx/configure: Ditto.
+ * libc/machine/d10v/Makefile.in: Ditto.
+ * libc/machine/d10v/configure: Ditto.
+ * libc/machine/d30v/Makefile.in: Ditto.
+ * libc/machine/d30v/configure: Ditto.
+ * libc/machine/fr30/Makefile.in: Ditto.
+ * libc/machine/fr30/configure: Ditto.
+ * libc/machine/frv/Makefile.in: Ditto.
+ * libc/machine/frv/configure: Ditto.
+ * libc/machine/h8300/Makefile.in: Ditto.
+ * libc/machine/h8300/configure: Ditto.
+ * libc/machine/h8500/Makefile.in: Ditto.
+ * libc/machine/h8500/configure: Ditto.
+ * libc/machine/hppa/Makefile.in: Ditto.
+ * libc/machine/hppa/configure: Ditto.
+ * libc/machine/i386/Makefile.in: Ditto.
+ * libc/machine/i386/aclocal.m4: Ditto.
+ * libc/machine/i386/configure: Ditto.
+ * libc/machine/i960/Makefile.in: Ditto.
+ * libc/machine/i960/configure: Ditto.
+ * libc/machine/iq2000/Makefile.in: Ditto.
+ * libc/machine/iq2000/configure: Ditto.
+ * libc/machine/m32c/Makefile.in: Ditto.
+ * libc/machine/m32c/configure: Ditto.
+ * libc/machine/m32r/Makefile.in: Ditto.
+ * libc/machine/m32r/configure: Ditto.
+ * libc/machine/m68hc11/Makefile.in: Ditto.
+ * libc/machine/m68hc11/configure: Ditto.
+ * libc/machine/m68k/Makefile.in: Ditto.
+ * libc/machine/m68k/configure: Ditto.
+ * libc/machine/m88k/Makefile.in: Ditto.
+ * libc/machine/m88k/configure: Ditto.
+ * libc/machine/mep/Makefile.in: Ditto.
+ * libc/machine/mep/configure: Ditto.
+ * libc/machine/mips/Makefile.in: Ditto.
+ * libc/machine/mips/configure: Ditto.
+ * libc/machine/mn10200/Makefile.in: Ditto.
+ * libc/machine/mn10200/configure: Ditto.
+ * libc/machine/mn10300/Makefile.in: Ditto.
+ * libc/machine/mn10300/configure: Ditto.
+ * libc/machine/mt/Makefile.in: Ditto.
+ * libc/machine/mt/configure: Ditto.
+ * libc/machine/necv70/Makefile.in: Ditto.
+ * libc/machine/necv70/configure: Ditto.
+ * libc/machine/powerpc/Makefile.in: Ditto.
+ * libc/machine/powerpc/configure: Ditto.
+ * libc/machine/sh/Makefile.in: Ditto.
+ * libc/machine/sh/configure: Ditto.
+ * libc/machine/sparc/Makefile.in: Ditto.
+ * libc/machine/sparc/configure: Ditto.
+ * libc/machine/spu/Makefile.in: Ditto.
+ * libc/machine/spu/configure: Ditto.
+ * libc/machine/tic4x/Makefile.in: Ditto.
+ * libc/machine/tic4x/configure: Ditto.
+ * libc/machine/tic80/Makefile.in: Ditto.
+ * libc/machine/tic80/configure: Ditto.
+ * libc/machine/v850/Makefile.in: Ditto.
+ * libc/machine/v850/configure: Ditto.
+ * libc/machine/w65/Makefile.in: Ditto.
+ * libc/machine/w65/configure: Ditto.
+ * libc/machine/x86_64/Makefile.in: Ditto.
+ * libc/machine/x86_64/configure: Ditto.
+ * libc/machine/xscale/Makefile.in: Ditto.
+ * libc/machine/xscale/configure: Ditto.
+ * libc/machine/xstormy16/Makefile.in: Ditto.
+ * libc/machine/xstormy16/configure: Ditto.
+ * libc/machine/z8k/Makefile.in: Ditto.
+ * libc/machine/z8k/configure: Ditto.
+ * libc/misc/Makefile.in: Ditto.
+ * libc/posix/Makefile.in: Ditto.
+ * libc/reent/Makefile.in: Ditto.
+ * libc/search/Makefile.in: Ditto.
+ * libc/signal/Makefile.in: Ditto.
+ * libc/stdio/Makefile.in: Ditto.
+ * libc/stdio64/Makefile.in: Ditto.
+ * libc/stdlib/Makefile.in: Ditto.
+ * libc/string/Makefile.in: Ditto.
+ * libc/sys/Makefile.in: Ditto.
+ * libc/sys/aclocal.m4: Ditto.
+ * libc/sys/configure: Ditto.
+ * libc/sys/a29khif/Makefile.in: Ditto.
+ * libc/sys/a29khif/configure: Ditto.
+ * libc/sys/arc/Makefile.in: Ditto.
+ * libc/sys/arc/configure: Ditto.
+ * libc/sys/arm/Makefile.in: Ditto.
+ * libc/sys/arm/configure: Ditto.
+ * libc/sys/d10v/Makefile.in: Ditto.
+ * libc/sys/d10v/configure: Ditto.
+ * libc/sys/decstation/Makefile.in: Ditto.
+ * libc/sys/decstation/configure: Ditto.
+ * libc/sys/h8300hms/Makefile.in: Ditto.
+ * libc/sys/h8300hms/configure: Ditto.
+ * libc/sys/h8500hms/Makefile.in: Ditto.
+ * libc/sys/h8500hms/configure: Ditto.
+ * libc/sys/linux/Makefile.in: Ditto.
+ * libc/sys/linux/aclocal.m4: Ditto.
+ * libc/sys/linux/configure: Ditto.
+ * libc/sys/linux/argp/Makefile.in: Ditto.
+ * libc/sys/linux/cmath/Makefile.in: Ditto.
+ * libc/sys/linux/dl/Makefile.in: Ditto.
+ * libc/sys/linux/iconv/Makefile.in: Ditto.
+ * libc/sys/linux/intl/Makefile.in: Ditto.
+ * libc/sys/linux/linuxthreads/Makefile.in: Ditto.
+ * libc/sys/linux/linuxthreads/aclocal.m4: Ditto.
+ * libc/sys/linux/linuxthreads/configure: Ditto.
+ * libc/sys/linux/linuxthreads/machine/Makefile.in: Ditto.
+ * libc/sys/linux/linuxthreads/machine/aclocal.m4: Ditto.
+ * libc/sys/linux/linuxthreads/machine/configure: Ditto.
+ * libc/sys/linux/linuxthreads/machine/i386/Makefile.in: Ditto.
+ * libc/sys/linux/linuxthreads/machine/i386/aclocal.m4: Ditto.
+ * libc/sys/linux/linuxthreads/machine/i386/configure: Ditto.
+ * libc/sys/linux/machine/Makefile.in: Ditto.
+ * libc/sys/linux/machine/aclocal.m4: Ditto.
+ * libc/sys/linux/machine/configure: Ditto.
+ * libc/sys/linux/machine/i386/Makefile.in: Ditto.
+ * libc/sys/linux/machine/i386/aclocal.m4: Ditto.
+ * libc/sys/linux/machine/i386/configure: Ditto.
+ * libc/sys/linux/net/Makefile.in: Ditto.
+ * libc/sys/linux/stdlib/Makefile.in: Ditto.
+ * libc/sys/m88kbug/Makefile.in: Ditto.
+ * libc/sys/m88kbug/configure: Ditto.
+ * libc/sys/mmixware/Makefile.in: Ditto.
+ * libc/sys/mmixware/configure: Ditto.
+ * libc/sys/netware/Makefile.in: Ditto.
+ * libc/sys/netware/configure: Ditto.
+ * libc/sys/rdos/Makefile.in: Ditto.
+ * libc/sys/rdos/configure: Ditto.
+ * libc/sys/rtems/Makefile.in: Ditto.
+ * libc/sys/rtems/configure: Ditto.
+ * libc/sys/sh/Makefile.in: Ditto.
+ * libc/sys/sh/configure: Ditto.
+ * libc/sys/sparc64/Makefile.in: Ditto.
+ * libc/sys/sparc64/configure: Ditto.
+ * libc/sys/sun4/Makefile.in: Ditto.
+ * libc/sys/sun4/configure: Ditto.
+ * libc/sys/sysmec/Makefile.in: Ditto.
+ * libc/sys/sysmec/configure: Ditto.
+ * libc/sys/sysnec810/Makefile.in: Ditto.
+ * libc/sys/sysnec810/configure: Ditto.
+ * libc/sys/sysnecv850/Makefile.in: Ditto.
+ * libc/sys/sysnecv850/configure: Ditto.
+ * libc/sys/sysvi386/Makefile.in: Ditto.
+ * libc/sys/sysvi386/configure: Ditto.
+ * libc/sys/sysvnecv70/Makefile.in: Ditto.
+ * libc/sys/sysvnecv70/configure: Ditto.
+ * libc/sys/tic80/Makefile.in: Ditto.
+ * libc/sys/tic80/configure: Ditto.
+ * libc/sys/w65/Makefile.in: Ditto.
+ * libc/sys/w65/configure: Ditto.
+ * libc/sys/z8ksim/Makefile.in: Ditto.
+ * libc/sys/z8ksim/configure: Ditto.
+ * libc/syscalls/Makefile.in: Ditto.
+ * libc/time/Makefile.in: Ditto.
+ * libc/unix/Makefile.in: Ditto.
+ * libm/Makefile.in: Ditto.
+ * libm/aclocal.m4: Ditto.
+ * libm/configure: Ditto.
+ * libm/common/Makefile.in: Ditto.
+ * libm/machine/Makefile.in: Ditto.
+ * libm/machine/aclocal.m4: Ditto.
+ * libm/machine/configure: Ditto.
+ * libm/machine/i386/Makefile.in: Ditto.
+ * libm/machine/i386/aclocal.m4: Ditto.
+ * libm/machine/i386/configure: Ditto.
+ * libm/machine/spu/Makefile.in: Ditto.
+ * libm/machine/spu/configure: Ditto.
+ * libm/math/Makefile.in: Ditto.
+ * libm/mathfp/Makefile.in: Ditto.
+
+2008-09-26 Craig Howland <howland@LGSInnovations.com>
+
+ * libc/stdlib/getenv_r.c (_getenv_r): Modify to not match if name
+ contains an equal sign.
+
+2008-09-25 Raphael Derossa Pereira <raphaelpereira@gmail.com>
+
+ * libc/include/pthread.h[_UNIX98_THREAD_MUTEX_ATTRIBUTES]: Add
+ new pthread_mutexattr_gettype and pthread_mutexattr_settype
+ prototypes.
+ * libc/include/sys/types.h[_UNIX98_THREAD_MUTEX_ATTRIBUTES]: Add
+ new mutex type values.
+ (pthread_mutexattr_t)[_UNIX98_THREAD_MUTEX_ATTRIBUTES]: Add type
+ field.
+
+2008-09-24 Jeff Johnston <jjohnstn@redhat.com>
+
+ * libc/stdlib/setenv_r.c (_unsetenv_r): Modify to return -1 only if
+ name is NULL, empty, or contains equal sign.
+
+2008-09-24 Pawel Veselov <pawel.veselov@gmail.com>
+
+ Fix setenv/getenv/unsetenv to be OpenGroup compliant:
+ * libc/include/stdlib.h (unsetenv, _unsetenv_r): Redefine with integer
+ return types.
+ * libc/stdlib/getenv_r.c (_findenv_r): Do no special processing with
+ names that contain equal chars.
+ * libc/stdlib/setenv.c: Redefine _unsetenv_r as returning int.
+ * libc/stdlib/setenv_r.c (_setenv_r): Return -1 and set errno to
+ EINVAL if name contains an equal sign. Do not remove any equal signs
+ from the value.
+ (_unsetenv_r): Modified to return int. Return -1 and set EINVAL
+ if name contains equal sign. Return -1 if no variable(s) were found
+ and return 0 otherwise.
+
+2008-09-19 Eric Blake <ebb9@byu.net>
+
+ Supply missing POSIX errno values.
+ * libc/include/sys/errno.h (ENOTRECOVERABLE, EOWNERDEAD): Define.
+ * libc/string/strerror.c (strerror): Decode them, and ECANCELED.
+
+2008-09-10 Ken Werner <ken.werner@de.ibm.com>
+
+ * libc/machine/spu/strcpy.h: Add missing header.
+ * libc/machine/spu/spu_timer_slih.c: Remove unused Variable.
+ * libm/machine/spu/headers/lgammaf4.h: Add type cast.
+
+2008-09-08 Jeff Johnston <jjohnstn@redhat.com>
+
+ * libc/sys/linux/dl/atomicity.h (exchange_and_add): Fix asm
+ statement to use "m" instead of "0".
+ (atomic_add): Ditto.
+ * libc/sys/linux/linuxthreads/spinlock.c (__pthread_release): Ditto.
+ * libc/sys/linux/net/getaddrinfo.c: Add limit.h include.
+ * libc/sys/linux/stdlib/glob.c: Ditto.
+
+2008-09-04 Ken Werner <ken.werner@de.ibm.com>
+
+ * libm/machine/spu/headers/acosd2.h: Duplicated preamble text removed.
+ * libm/machine/spu/headers/acosf4.h: Likewise.
+ * libm/machine/spu/headers/acoshd2.h: Likewise.
+ * libm/machine/spu/headers/acoshf4.h: Likewise.
+ * libm/machine/spu/headers/asind2.h: Likewise.
+ * libm/machine/spu/headers/asinf4.h: Likewise.
+ * libm/machine/spu/headers/asinhd2.h: Likewise.
+ * libm/machine/spu/headers/asinhf4.h: Likewise.
+ * libm/machine/spu/headers/atan2d2.h: Likewise.
+ * libm/machine/spu/headers/atan2f4.h: Likewise.
+ * libm/machine/spu/headers/atand2.h: Likewise.
+ * libm/machine/spu/headers/atanf4.h: Likewise.
+ * libm/machine/spu/headers/atanhd2.h: Likewise.
+ * libm/machine/spu/headers/atanhf4.h: Likewise.
+ * libm/machine/spu/headers/cos_sin.h: Likewise.
+ * libm/machine/spu/headers/cosd2.h: Likewise.
+ * libm/machine/spu/headers/cosf4.h: Likewise.
+ * libm/machine/spu/headers/coshd2.h: Likewise.
+ * libm/machine/spu/headers/coshf4.h: Likewise.
+ * libm/machine/spu/headers/divd2.h: Likewise.
+ * libm/machine/spu/headers/divf4.h: Likewise.
+ * libm/machine/spu/headers/erf_utils.h: Likewise.
+ * libm/machine/spu/headers/erfcd2.h: Likewise.
+ * libm/machine/spu/headers/erfcf4.h: Likewise.
+ * libm/machine/spu/headers/erfd2.h: Likewise.
+ * libm/machine/spu/headers/erff4.h: Likewise.
+ * libm/machine/spu/headers/exp2d2.h: Likewise.
+ * libm/machine/spu/headers/exp2f4.h: Likewise.
+ * libm/machine/spu/headers/expd2.h: Likewise.
+ * libm/machine/spu/headers/expf4.h: Likewise.
+ * libm/machine/spu/headers/expm1d2.h: Likewise.
+ * libm/machine/spu/headers/expm1f4.h: Likewise.
+ * libm/machine/spu/headers/floord2.h: Likewise.
+ * libm/machine/spu/headers/floorf4.h: Likewise.
+ * libm/machine/spu/headers/hypotd2.h: Likewise.
+ * libm/machine/spu/headers/hypotf4.h: Likewise.
+ * libm/machine/spu/headers/isnand2.h: Likewise.
+ * libm/machine/spu/headers/isnanf4.h: Likewise.
+ * libm/machine/spu/headers/ldexpd2.h: Likewise.
+ * libm/machine/spu/headers/ldexpf4.h: Likewise.
+ * libm/machine/spu/headers/lgammad2.h: Likewise.
+ * libm/machine/spu/headers/lgammaf4.h: Likewise.
+ * libm/machine/spu/headers/log10d2.h: Likewise.
+ * libm/machine/spu/headers/log1pd2.h: Likewise.
+ * libm/machine/spu/headers/log1pf4.h: Likewise.
+ * libm/machine/spu/headers/log2d2.h: Likewise.
+ * libm/machine/spu/headers/log2f4.h: Likewise.
+ * libm/machine/spu/headers/logbf4.h: Likewise.
+ * libm/machine/spu/headers/logd2.h: Likewise.
+ * libm/machine/spu/headers/logf4.h: Likewise.
+ * libm/machine/spu/headers/nearbyintf4.h: Likewise.
+ * libm/machine/spu/headers/nextafterd2.h: Likewise.
+ * libm/machine/spu/headers/nextafterf4.h: Likewise.
+ * libm/machine/spu/headers/powd2.h: Likewise.
+ * libm/machine/spu/headers/powf4.h: Likewise.
+ * libm/machine/spu/headers/recipd2.h: Likewise.
+ * libm/machine/spu/headers/recipf4.h: Likewise.
+ * libm/machine/spu/headers/rintf4.h: Likewise.
+ * libm/machine/spu/headers/scalbnf4.h: Likewise.
+ * libm/machine/spu/headers/signbitd2.h: Likewise.
+ * libm/machine/spu/headers/sincosd2.h: Likewise.
+ * libm/machine/spu/headers/sincosf4.h: Likewise.
+ * libm/machine/spu/headers/sind2.h: Likewise.
+ * libm/machine/spu/headers/sinf4.h: Likewise.
+ * libm/machine/spu/headers/sinhd2.h: Likewise.
+ * libm/machine/spu/headers/sinhf4.h: Likewise.
+ * libm/machine/spu/headers/sqrtd2.h: Likewise.
+ * libm/machine/spu/headers/sqrtf4.h: Likewise.
+ * libm/machine/spu/headers/tand2.h: Likewise.
+ * libm/machine/spu/headers/tanf4.h: Likewise.
+ * libm/machine/spu/headers/tanhd2.h: Likewise.
+ * libm/machine/spu/headers/tanhf4.h: Likewise.
+ * libm/machine/spu/headers/tgammad2.h: Likewise.
+ * libm/machine/spu/headers/tgammaf4.h: Likewise.
+ * libm/machine/spu/headers/truncd2.h: Likewise.
+ * libm/machine/spu/headers/truncf4.h: Likewise.
+ * libm/machine/spu/headers/simdmath.h: Likewise.
+
+2008-09-04 Ken Werner <ken.werner@de.ibm.com>
+
+ * libm/machine/spu/headers/acoshf4.h: Rebase against current simdmath.
+ * libm/machine/spu/headers/asinhd2.h: Likewise.
+ * libm/machine/spu/headers/atanhd2.h: Likewise.
+ * libm/machine/spu/headers/atanhf4.h: Likewise.
+ * libm/machine/spu/headers/erff4.h: Likewise.
+ * libm/machine/spu/headers/expd2.h: Likewise.
+ * libm/machine/spu/headers/ldexpd2.h: Likewise.
+ * libm/machine/spu/headers/lgammaf4.h: Likewise.
+ * libm/machine/spu/headers/logbf4.h: Likewise.
+ * libm/machine/spu/headers/nextafterd2.h: Likewise.
+ * libm/machine/spu/headers/nextafterf4.h: Likewise.
+ * libm/machine/spu/headers/recipd2.h: Likewise.
+ * libm/machine/spu/headers/simdmath.h: Likewise.
+ * libm/machine/spu/headers/acoshd2.: Likewise.
+
+2008-09-04 Ken Werner <ken.werner@de.ibm.com>
+
+ * libm/machine/spu/headers/cbrt.h: cbrt_factors[] declared.
+ * libm/machine/spu/headers/cbrtf.h: Likewise.
+
+2008-09-01 Ken Werner <ken.werner@de.ibm.com>
+
+ * libc/machine/spu/include/spu_timer.h: spu_timebase function added.
+ * libc/machine/spu/spu_timebase.c: New file.
+ * libc/machine/spu/Makefile.am: Add new file.
+ * libc/machine/spu/Makefile.in: Regenerated.
+
+2008-08-28 Craig Howland <howland@LGSInnovations.com>
+
+ * libc/time/mktime.c (mktime): Fix tm_isdst value usage (allowing
+ any positive value from user (per std) rather than depending
+ upon 1).
+
+2008-08-28 Corinna Vinschen <corinna@vinschen.de>
+
+ * libc/stdlib/wcsrtombs.c (_wcsrtombs_r): Optimize condition
+ for accepting a converted character.
+
+2008-08-27 Sandra Loosemore <sandra@codesourcery.com>
+
+ * libc/libc.texinfo: Remove "LOCAL KLUGE" that prevents it
+ from building pdfs.
+ * libm/libm.texinfo: Likewise.
+
+2008-08-27 Corinna Vinschen <corinna@vinschen.de>
+
+ * libc/stdlib/wcsrtombs.c (_wcsrtombs_r): Fix condition for
+ accepting a converted character and continuing the loop.
+
+2008-07-24 Jeff Johnston <jjohnstn@redhat.com>
+
+ * libc/include/ctype.h (_ctype_): Restore for C++ backward
+ compatability only.
+
+2008-07-21 Jeff Johnston <jjohnstn@redhat.com>
+
+ * libc/ctype/ctype_.c: Add new pointer __ctype_ptr__ which is one
+ less than the old __ctype_ptr.
+ * libc/ctype/isalnum.c: Use __ctype_ptr__.
+ * libc/ctype/isalpha.c: Ditto.
+ * libc/ctype/iscntrl.c: Ditto.
+ * libc/ctype/isdigit.c: Ditto.
+ * libc/ctype/islower.c: Ditto.
+ * libc/ctype/isprint.c: Ditto.
+ * libc/ctype/ispunct.c: Ditto.
+ * libc/ctype/isspace.c: Ditto.
+ * libc/ctype/isupper.c: Ditto.
+ * libc/ctype/isxdigit.c: Ditto.
+ * libc/include/ctype.h: Change ctype macros to use new __ctype_ptr__
+ and add declaration of __ctype_ptr__. Remove older ctype table pointers
+ from here even though they can still work.
+
+2008-07-18 Ken Werner <ken.werner@de.ibm.com>
+
+ * libc/machine/spu/strcpy.h: Fix error in previous patch.
+
+2008-07-17 Jeff Johnston <jjohnstn@redhat.com>
+
+ * libc/include/assert.h (__ASSERT_FUNC): Define to __FUNCTION__ when
+ __STDC_VERSION__ < 199901L and __GNUC__ >= 2.
+
+2008-07-17 Ken Werner <ken.werner@de.ibm.com>
+
+ * libc/machine/spu/strcpy.h: Pad null bytes if necessary.
+
+2008-07-08 Kenji Tanaka <tanaka.ken2@jp.panasonic.com>
+
+ * libc/machine/mn10300/memset.S: Fix bug where return value is
+ incorrectly set if number of bytes set is a multiple of 4.
+
+2008-07-07 Hans-Peter Nilsson <hp@axis.com>
+
+ * libc/machine/mips/strncpy.c: Include stdint.h to get uintptr_t.
+ (strncpy): Cast src to uintptr_t before checking alignment with "&".
+
+2008-07-02 Jeff Johnston <jjohnstn@redhat.com>
+
+ * libc/argz/argz_count.c: Include stddef.h to get size_t.
+ * libc/argz/argz_extract.c: Ditto.
+ * libc/argz/argz_stringify.c: Ditto.
+ * libc/search/hash.h: Ditto.
+ * libc/sys/linux/include/sched.h: Ditto.
+ * libc/sys/linux/sys/types.h: Ditto.
+
+2008-07-02 Jeff Johnston <jjohnstn@redhat.com>
+
+ * libc/machine/mips/strncpy.c (strncpy): Fix logic so unaligned
+ source data is taken care of before loop unrolling.
+
+2008-06-25 Hans-Peter Nilsson <hp@axis.com>
+
+ Fix strict-aliasing issues with _strtod_r and Storeinc.
+ * libc/stdlib/strtod.c (_strtod_r): Change local variables aadj,
+ rv, rv0 from double to type U. Use accessor macros dval, dword0
+ and dword1 for all accesses except for the ULtod call, where rv.i
+ replaces the pointer cast.
+ * libc/stdlib/mprec.h (U): Rename member L to i for easier re-use
+ of access macros. Tweak comment.
+ Remove #ifdef'd YES_ALIAS code.
+ (dword0, dword1, dval): Define in terms of uncast union member
+ access. Ditto for _DOUBLE_IS_32BITS variants.
+ (Storeinc): Replace aliasing-flawed microoptimized definition with
+ alternative suggested in comment. Remove now stale comment.
+
+2008-06-21 Corinna Vinschen <corinna@vinschen.de>
+
+ * libc/include/machine/setjmp.h (_longjmp): Define as function on
+ Cygwin.
+ (_setjmp): Ditto.
+
+2008-06-18 Eric Blake <ebb9@byu.net>
+
+ Per Posix, strsignal returns non-const char*.
+ * libc/include/string.h (strsignal): Fix return type.
+
+2008-06-17 Ken Werner <ken.werner@de.ibm.com>
+
+ * libc/machine/spu/sys/linux_syscalls.h: New file to add Linux syscall
+ support.
+
+2008-06-16 Ken Werner <ken.werner@de.ibm.com>
+
+ * libc/machine/spu/sys/dirent.h: Add extern "C" specifier if C++.
+ * libc/machine/spu/sys/sched.h: Likewise.
+ * libc/machine/spu/sys/syscall.h: Likewise.
+
+2008-06-16 Ken Werner <ken.werner@de.ibm.com>
+
+ * libc/machine/spu/mk_syscalls: Provide .type and .size directives
+ in generated assembler files.
+ * libc/machine/spu/fprintf.S: Regenerate.
+ * libc/machine/spu/fscanf.S: Regenerate.
+ * libc/machine/spu/printf.S: Regenerate.
+ * libc/machine/spu/scanf.S: Regenerate.
+ * libc/machine/spu/snprintf.S: Regenerate.
+ * libc/machine/spu/sprintf.S: Regenerate.
+ * libc/machine/spu/sscanf.S: Regenerate.
+ * libc/machine/spu/stack_reg_va.S (__stack_reg_va): Provide .type
+ and .size directives.
+ * libc/machine/spu/setjmp.S (setjmp): Likewise.
+ (longjmp): Likewise.
+
+2008-06-11 Jeff Johnston <jjohnstn@redhat.com>
+
+ * libc/include/machine/_default_types.h: Fix GNUC check to
+ handle 4.0 and greater.
+
+2008-06-09 Ken Werner <ken.werner@de.ibm.com>
+
+ * libc/machine/spu/Makefile.am: Add new files.
+ * libc/machine/spu/Makefile.in: Likewise.
+ * libc/machine/spu/include/spu_timer.h: New file to add timer support
+ using interrupts.
+ * libc/machine/spu/spu_clock_stop.c: Likewise.
+ * libc/machine/spu/spu_clock_svcs.c: Likewise.
+ * libc/machine/spu/spu_timer_flih.S: Likewise.
+ * libc/machine/spu/spu_timer_free.c: Likewise.
+ * libc/machine/spu/spu_timer_internal.h: Likewise.
+ * libc/machine/spu/spu_timer_slih.c: Likewise.
+ * libc/machine/spu/spu_timer_slih_reg.c: Likewise.
+ * libc/machine/spu/spu_timer_stop.c: Likewise.
+ * libc/machine/spu/spu_timer_svcs.c: Likewise.
+
+2008-06-09 Ken Werner <ken.werner@de.ibm.com>
+
+ * libc/machine/spu/strcat.c: Return value fixed.
+ * libc/machine/spu/strncat.c: Likewise.
+
+2008-05-28 Eric Blake <ebb9@byu.net>
+
+ Fix bug in previous patch.
+ * libc/machine/i386/memset.S (memset): Mask second arg correctly.
+
+2008-05-27 Jeff Johnston <jjohnstn@redhat.com>
+
+ * libc/string/memset.c: Fix documented prototype to remove
+ erroneous const attribute on first parameter.
+
+2008-05-26 Eric Blake <ebb9@byu.net>
+
+ Optimize the generic and x86 memchr.
+ * libc/string/memchr.c (memchr) [!__OPTIMIZE_SIZE__]:
+ Pre-align pointer so unaligned searches aren't penalized.
+ * libc/machine/i386/memchr.S (memchr) [!__OPTIMIZE_SIZE__]: Word
+ operations are faster than repnz byte searches.
+
+2008-05-26 Eric Blake <ebb9@byu.net>
+
+ Optimize the generic and x86 memset.
+ * libc/string/memset.c (memset) [!__OPTIMIZE_SIZE__]:
+ Pre-align pointer so unaligned stores aren't penalized.
+ * libc/machine/i386/memset.S (memset) [!__OPTIMIZE_SIZE__]:
+ Pre-align pointer so unaligned stores aren't penalized. Prefer
+ 8-byte over 4-byte alignment. Reduce register pressure.
+
+2008-05-26 Eric Blake <ebb9@byu.net>
+
+ Optimize the generic and x86 strlen.
+ * libc/string/strlen.c (strlen) [!__OPTIMIZE_SIZE__]: Pre-align
+ data so unaligned searches aren't penalized.
+ * libc/machine/i386/strlen.S (strlen) [!__OPTIMIZE_SIZE__]:
+ Word operations are faster than repnz byte searches.
+
+2008-05-23 Corinna Vinschen <corinna@vinschen.de>
+
+ * libc/include/sys/_default_fcntl.h: Include <sys/time.h> on Cygwin.
+
+2008-05-22 Jeff Johnston <jjohnstn@redhat.com>
+
+ * libc/include/sys/reent.h: Add _h_errno field.
+ * libc/sys/linux/libc-symbols.h: Add default stubs for new libc macros
+ now used in net directory.
+ * libc/sys/linux/bits/libc-lock.h: Always define _IO_MTSAFE_IO.
+ * libc/sys/linux/include/hesiod.h: Add needed macros for new code
+ in net directory.
+ * libc/sys/linux/include/netdb.h: Ditto.
+ * libc/sys/linux/include/resolv.h: Ditto.
+ * libc/sys/linux/include/stdint.h: Ditto.
+ * libc/sys/linux/include/arpa/nameser.h: Ditto.
+ * libc/sys/linux/include/net/ethernet.h: Ditto.
+ * libc/sys/linux/include/net/if_ppp.h: Ditto.
+ * libc/sys/linux/include/netinet/if_ether.h: Ditto.
+ * libc/sys/linux/machine/i386/get_clockfreq.c: Remove static memmem.
+ * libc/sys/linux/machine/i386/include/endian.h: Protect macros with
+ flags to avoid duplicate definition.
+ * libc/sys/linux/machine/i386/include/param.h: Ditto.
+ * libc/sys/linux/net/Makefile.am: Modified to account for removed and
+ added files.
+ * libc/sys/linux/net/Makefile.in: Regenerated.
+ * libc/sys/linux/net/base64.c: Replaced with glibc version of code.
+ * libc/sys/linux/net/getaddrinfo.c: Ditto.
+ * libc/sys/linux/net/getnameinfo.c: Ditto.
+ * libc/sys/linux/net/getproto.c: Ditto.
+ * libc/sys/linux/net/getservent.c: Ditto.
+ * libc/sys/linux/net/inet_netof.c: Ditto.
+ * libc/sys/linux/net/inet_lnaof.c: Ditto.
+ * libc/sys/linux/net/ns_name.c: Ditto.
+ * libc/sys/linux/net/ns_netint.c: Ditto.
+ * libc/sys/linux/net/inet_ntoa.c: Ditto.
+ * libc/sys/linux/net/ns_parse.c: Ditto.
+ * libc/sys/linux/net/ns_print.c: Ditto.
+ * libc/sys/linux/net/ns_ttl.c: Ditto.
+ * libc/sys/linux/net/nsap_addr.c: Ditto.
+ * libc/sys/linux/net/rcmd.c: Ditto.
+ * libc/sys/linux/net/res_comp.c: Ditto.
+ * libc/sys/linux/net/res_data.c: Ditto.
+ * libc/sys/linux/net/res_debug.c: Ditto.
+ * libc/sys/linux/net/res_init.c: Ditto.
+ * libc/sys/linux/net/res_mkquery.c: Ditto.
+ * libc/sys/linux/net/res_query.c: Ditto.
+ * libc/sys/linux/net/res_send.c: Ditto.
+ * libc/sys/linux/net/send.c: Ditto.
+ * libc/sys/linux/stdlib/collate.c: Ditto.
+ * libc/sys/linux/sys/ioctl.h: Ditto.
+ * libc/sys/linux/sys/socket.h: Ditto.
+ * libc/sys/linux/sys/unistd.h: Ditto.
+ * libc/sys/linux/iconv/iconvconfig.c: Removed either because no longer
+ used or because licensing includes advertising clause that cannot be
+ ignored.
+ * libc/sys/linux/iconv/strtab.c: Ditto.
+ * libc/sys/linux/include/libc_private.h: Ditto.
+ * libc/sys/linux/include/nsswitch.h: Ditto.
+ * libc/sys/linux/include/net/if_atm.h: Ditto.
+ * libc/sys/linux/include/net/if_media.h: Ditto.
+ * libc/sys/linux/include/net/if_pppvar.h: Ditto.
+ * libc/sys/linux/include/netinet/if_atm.h: Ditto.
+ * libc/sys/linux/include/netinet/ip_flow.h: Ditto.
+ * libc/sys/linux/intl/locale.alias: Ditto.
+ * libc/sys/linux/net/addr2ascii.3: Ditto.
+ * libc/sys/linux/net/bindresvport.c: Ditto.
+ * libc/sys/linux/net/byteorder.3: Ditto.
+ * libc/sys/linux/net/res_config.h: Ditto.
+ * libc/sys/linux/net/ether_addr.c: Ditto.
+ * libc/sys/linux/net/ethers.3: Ditto.
+ * libc/sys/linux/net/getaddrinfo.3: Ditto.
+ * libc/sys/linux/net/gethostbydns.c: Ditto.
+ * libc/sys/linux/net/gethostbyht.c: Ditto.
+ * libc/sys/linux/net/gethostbyname.3: Ditto.
+ * libc/sys/linux/net/gethostbynis.c: Ditto.
+ * libc/sys/linux/net/gethostnamadr.c: Ditto.
+ * libc/sys/linux/net/getifaddrs.3: Ditto.
+ * libc/sys/linux/net/getifaddrs.c: Ditto.
+ * libc/sys/linux/net/getipnodebyname.3: Ditto.
+ * libc/sys/linux/net/getnameinfo.3: Ditto.
+ * libc/sys/linux/net/getnetbydns.c: Ditto.
+ * libc/sys/linux/net/getnetbyht.c: Ditto.
+ * libc/sys/linux/net/getnetbynis.c: Ditto.
+ * libc/sys/linux/net/getnetent.3: Ditto.
+ * libc/sys/linux/net/getnetnamadr.c: Ditto.
+ * libc/sys/linux/net/getprotoent.3: Ditto.
+ * libc/sys/linux/net/getprotoent.c: Ditto.
+ * libc/sys/linux/net/getprotoname.c: Ditto.
+ * libc/sys/linux/net/getservbyname.c: Ditto.
+ * libc/sys/linux/net/getservbyport.c: Ditto.
+ * libc/sys/linux/net/getservent.3: Ditto.
+ * libc/sys/linux/net/herror.c: Ditto.
+ * libc/sys/linux/net/hesiod.3: Ditto.
+ * libc/sys/linux/net/hesiod.c: Ditto.
+ * libc/sys/linux/net/if_indextoname.3: Ditto.
+ * libc/sys/linux/net/inet.3: Ditto.
+ * libc/sys/linux/net/inet6_option_space.3: Ditto.
+ * libc/sys/linux/net/inet6_rthdr_space.3: Ditto.
+ * libc/sys/linux/net/inet_makeaddr.c: Ditto.
+ * libc/sys/linux/net/inet_net.3: Ditto.
+ * libc/sys/linux/net/inet_network.c: Ditto.
+ * libc/sys/linux/net/innetgr-stub.c: Ditto.
+ * libc/sys/linux/net/ip6opt.c: Ditto.
+ * libc/sys/linux/net/iso_addr.3: Ditto.
+ * libc/sys/linux/net/iso_addr.c: Ditto.
+ * libc/sys/linux/net/linkaddr.3: Ditto.
+ * libc/sys/linux/net/linkaddr.c: Ditto.
+ * libc/sys/linux/net/map_v4v6.c: Ditto.
+ * libc/sys/linux/net/name6.c: Ditto.
+ * libc/sys/linux/net/namespace.h: Ditto.
+ * libc/sys/linux/net/ns.3: Ditto.
+ * libc/sys/linux/net/ns_addr.c: Ditto.
+ * libc/sys/linux/net/ns_ntoa.c: Ditto.
+ * libc/sys/linux/net/nsdispatch.3: Ditto.
+ * libc/sys/linux/net/nsdispatch.c: Ditto.
+ * libc/sys/linux/net/nslexer.c: Ditto.
+ * libc/sys/linux/net/nslexer.l: Ditto.
+ * libc/sys/linux/net/nsparser.c: Ditto.
+ * libc/sys/linux/net/nsparser.h: Ditto.
+ * libc/sys/linux/net/nsparser.y: Ditto.
+ * libc/sys/linux/net/rcmd.3: Ditto.
+ * libc/sys/linux/net/rcmdsh.3: Ditto.
+ * libc/sys/linux/net/res_mkupdate.c: Ditto.
+ * libc/sys/linux/net/res_update.c: Ditto.
+ * libc/sys/linux/net/resolver.3: Ditto.
+ * libc/sys/linux/net/rthdr.c: Ditto.
+ * libc/sys/linux/net/vars.c: Ditto.
+ * libc/sys/linux/shlib-compat.h: New file.
+ * libc/sys/linux/machine/i386/atomic.h: Ditto.
+ * libc/sys/linux/net/XXX-lookup.c: Ditto.
+ * libc/sys/linux/net/alias-lookup.c: Ditto.
+ * libc/sys/linux/net/res_libc.c: Ditto.
+ * libc/sys/linux/net/aliases.h: Ditto.
+ * libc/sys/linux/net/check_pf.c: Ditto.
+ * libc/sys/linux/net/databases.def: Ditto.
+ * libc/sys/linux/net/digits_dots.c: Ditto.
+ * libc/sys/linux/net/ether_aton.c: Ditto.
+ * libc/sys/linux/net/ether_aton_r.c: Ditto.
+ * libc/sys/linux/net/ether_hton.c: Ditto.
+ * libc/sys/linux/net/ether_line.c: Ditto.
+ * libc/sys/linux/net/ether_ntoa.c: Ditto.
+ * libc/sys/linux/net/ether_ntoa_r.c: Ditto.
+ * libc/sys/linux/net/ether_ntoh.c: Ditto.
+ * libc/sys/linux/net/etherent.h: Ditto.
+ * libc/sys/linux/net/ethers-lookup.c: Ditto.
+ * libc/sys/linux/net/function.def: Ditto.
+ * libc/sys/linux/net/getXXbyYY.c: Ditto.
+ * libc/sys/linux/net/getXXbyYY_r.c: Ditto.
+ * libc/sys/linux/net/getXXent.c: Ditto.
+ * libc/sys/linux/net/getXXent_r.c: Ditto.
+ * libc/sys/linux/net/getaliasent.c: Ditto.
+ * libc/sys/linux/net/getaliasent_r.c: Ditto.
+ * libc/sys/linux/net/getaliasname.c: Ditto.
+ * libc/sys/linux/net/getaliasname_r.c: Ditto.
+ * libc/sys/linux/net/gethstbyad.c: Ditto.
+ * libc/sys/linux/net/gethstbyad_r.c: Ditto.
+ * libc/sys/linux/net/gethstbynm.c: Ditto.
+ * libc/sys/linux/net/gethstbynm2.c: Ditto.
+ * libc/sys/linux/net/gethstbynm2_r.c: Ditto.
+ * libc/sys/linux/net/gethstbynm_r.c: Ditto.
+ * libc/sys/linux/net/gethstent.c: Ditto.
+ * libc/sys/linux/net/gethstent_r.c: Ditto.
+ * libc/sys/linux/net/getnetbyad.c: Ditto.
+ * libc/sys/linux/net/getnetbyad_r.c: Ditto.
+ * libc/sys/linux/net/getnetbynm.c: Ditto.
+ * libc/sys/linux/net/getnetbynm_r.c: Ditto.
+ * libc/sys/linux/net/getnetent.c: Ditto.
+ * libc/sys/linux/net/getnetent_r.c: Ditto.
+ * libc/sys/linux/net/getnetgrent.c: Ditto.
+ * libc/sys/linux/net/getnetgrent_r.c: Ditto.
+ * libc/sys/linux/net/getnssent.c: Ditto.
+ * libc/sys/linux/net/getnssent_r.c: Ditto.
+ * libc/sys/linux/net/getproto_r.c: Ditto.
+ * libc/sys/linux/net/getprtent.c: Ditto.
+ * libc/sys/linux/net/getprtent_r.c: Ditto.
+ * libc/sys/linux/net/getprtname.c: Ditto.
+ * libc/sys/linux/net/getprtname_r.c: Ditto.
+ * libc/sys/linux/net/getrpcbyname.c: Ditto.
+ * libc/sys/linux/net/getrpcbyname_r.c: Ditto.
+ * libc/sys/linux/net/getrpcbynumber.c: Ditto.
+ * libc/sys/linux/net/getrpcbynumber_r.c: Ditto.
+ * libc/sys/linux/net/getrpcent.c: Ditto.
+ * libc/sys/linux/net/getrpcent_r.c: Ditto.
+ * libc/sys/linux/net/getservent_r.c: Ditto.
+ * libc/sys/linux/net/getsrvbynm.c: Ditto.
+ * libc/sys/linux/net/getsrvbynm_r.c: Ditto.
+ * libc/sys/linux/net/getsrvbypt.c: Ditto.
+ * libc/sys/linux/net/getsrvbypt_r.c: Ditto.
+ * libc/sys/linux/net/grp-lookup.c: Ditto.
+ * libc/sys/linux/net/herrno.c: Ditto.
+ * libc/sys/linux/net/hosts-lookup.c: Ditto.
+ * libc/sys/linux/net/ifaddrs.h: Ditto.
+ * libc/sys/linux/net/ifreq.c: Ditto.
+ * libc/sys/linux/net/ifreq.h: Ditto.
+ * libc/sys/linux/net/in6_addr.c: Ditto.
+ * libc/sys/linux/net/inet6_option.c: Ditto.
+ * libc/sys/linux/net/inet_mkadr.c: Ditto.
+ * libc/sys/linux/net/inet_net.c: Ditto.
+ * libc/sys/linux/net/key-lookup.c: Ditto.
+ * libc/sys/linux/net/local.h: Ditto.
+ * libc/sys/linux/net/netgroup.h: Ditto.
+ * libc/sys/linux/net/netgrp-lookup.c: Ditto.
+ * libc/sys/linux/net/network-lookup.c: Ditto.
+ * libc/sys/linux/net/not-cancel.h: Ditto.
+ * libc/sys/linux/net/ns_samedomain.c: Ditto.
+ * libc/sys/linux/net/nscd-types.h: Ditto.
+ * libc/sys/linux/net/nss.h: Ditto.
+ * libc/sys/linux/net/nsswitch.c: Ditto.
+ * libc/sys/linux/net/nsswitch.h: Ditto.
+ * libc/sys/linux/net/opensock.c: Ditto.
+ * libc/sys/linux/net/proto-lookup.c: Ditto.
+ * libc/sys/linux/net/pwd-lookup.c: Ditto.
+ * libc/sys/linux/net/res_debug.h: Ditto.
+ * libc/sys/linux/net/res_hconf.c: Ditto.
+ * libc/sys/linux/net/res_hconf.h: Ditto.
+ * libc/sys/linux/net/rexec.c: Ditto.
+ * libc/sys/linux/net/rpc-lookup.c: Ditto.
+ * libc/sys/linux/net/ruserpass.c: Ditto.
+ * libc/sys/linux/net/service-lookup.c: Ditto.
+ * libc/sys/linux/net/spwd-lookup.c: Ditto.
+ * libc/sys/linux/net/nscd/nscd-client.h: Ditto.
+ * libc/sys/linux/net/nscd/nscd_proto.h: Ditto.
+
+2008-05-21 Eric Blake <ebb9@byu.net>
+
+ Optimize the generic strchr.
+ * libc/string/strchr.c (strchr) [!__OPTIMIZE_SIZE__]: Pre-align
+ data so unaligned searches aren't penalized. Special-case
+ searching for 0.
+
+ Optimize strchr for x86.
+ * libc/machine/i386/strchr.S (strchr) [!__OPTIMIZE_SIZE__]:
+ Pre-align data so unaligned searches aren't penalized.
+ Special-case searching for 0.
+
+2008-05-20 Nick Clifton <nickc@redhat.com>
+
+ * libc/sys/sysnecv850/crt0.S (___dso_handle): Define (weak).
+
+2008-05-20 DJ Delorie <dj@redhat.com>
+
+ * libc/sys/sysnecv850/isatty.c (_isatty): Renamed from isatty.
+
+2008-05-14 Jeff Johnston <jjohnstn@redhat.com>
+
+ * libc/include/sys/reent.h: Change _REENT_INIT... macros to
+ access macro parameter with parentheses around it.
+
+2008-04-26 Mark Mitchell <mark@codesourcery.com>
+
+ * libc/include/stdint.h (SIZE_MIN): Remove.
+ (SIZE_MAX): Define.
+ * testsuite/newlib.stdlib/stdlib.exp: New.
+ * testsuite/newlib.stdlib/size_max.c: Likewise.
+
+2008-04-29 Eric Blake <ebb9@byu.net>
+
+ Fix 2008-04-14 regression in asprintf(ptr,"").
+ * libc/stdio/asnprintf.c (asnprintf, _asnprintf_r): Avoid stdio
+ baggage.
+ * libc/stdio/asniprintf.c (asniprintf, _asniprintf_r): Likewise.
+ * libc/stdio/asiprintf.c (asiprintf, _asiprintf_r): Likewise.
+ * libc/stdio/vasniprintf.c (_vasniprintf_r): Likewise.
+ * libc/stdio/vsnprintf.c (_vsnprintf_r): Likewise.
+ * libc/stdio/vfprintf.c (_VFPRINTF_R) [STRING_ONLY]: Always malloc
+ an initial buffer for asprintf.
+
+2008-04-24 Corinna Vinschen <corinna@vinschen.de>
+
+ * libc/include/sys/stat.h: Guard at-functions with !__INSIDE_CYGWIN__.
+ (fstatat): Fix type of third parameter.
+
+2008-04-25 Nick Clifton <nickc@redhat.com>
+
+ * libc/machine/arm/setjmp.S: Fix thumb2 support.
+
+2008-04-24 Nick Clifton <nickc@redhat.com>
+
+ * libc/include/machine/ieeefp.h: Fix typo: _DOUBLE_IS_32_BITS
+ should be _DOUBLE_IS_32BITS.
+
+2008-04-24 Corinna Vinschen <corinna@vinschen.de>
+
+ * libc/include/sys/stat.h (UTIME_NOW): Define for Cygwin.
+ (UTIME_OMIT): Ditto.
+ (utimensat): Declare for Cygwin.
+ (futimens): Ditto.
+
+2008-04-23 Ken Werner <ken.werner@de.ibm.com>
+
+ * libc/include/_ansi.h: _LONG_LONG renamed to _LONG_LONG_TYPE.
+ * libc/include/math.h: Likewise.
+
+2008-04-23 Corinna Vinschen <corinna@vinschen.de>
+
+ * libc/include/stdio.h (renameat): Declare for Cygwin.
+ (symlinkat): Ditto.
+ * libc/include/sys/unistd.h (readlink): Align declaration to POSIX.
+ (faccessat): Declare for Cygwin.
+ (fchownat): Ditto.
+ (linkat): Ditto.
+ (readlinkat): Ditto.
+ * libc/include/sys/_default_fcntl.h (AT_FDCWD): Define for Cygwin.
+ (AT_EACCESS): Ditto.
+ (AT_SYMLINK_NOFOLLOW): Ditto.
+ (AT_SYMLINK_FOLLOW): Ditto.
+ (AT_REMOVEDIR): Ditto.
+ (futimesat): Declare for Cygwin.
+ (openat): Ditto.
+ (unlinkat): Ditto.
+ * libc/include/sys/stat.h (fchmodat): Ditto.
+ (fstatat): Ditto.
+ (mkdirat): Ditto.
+ (mkfifoat): Ditto.
+ (mknodat): Ditto.
+
+2008-04-22 Nick Clifton <nickc@redhat.com>
+
+ * libc/machine/arm/setjmp.S: Add support for thumb2 multiple
+ register load/store instructions.
+
+2008-04-16 Patrick Mansfield <patmans@us.ibm.com>
+
+ * libc/machine/spu/sys/errno.h: Use _impure_data, not _reent_data.
+
+2008-04-16 Patrick Mansfield <patmans@us.ibm.com>
+
+ * libc/machine/spu/impure.c: Add missing underscore to impure_data.
+
+2008-04-14 Patrick Mansfield <patmans@us.ibm.com>
+
+ * libc/machine/spu/impure.c: New file, supply a non-static _impure_data.
+ * libc/machine/spu/Makefile.am: Add new file impure.c.
+ * libc/machine/spu/Makefile.in: Regenerate.
+ * libc/machine/spu/sys/errno.h: Define errno to be _reent_data._errno.
+
+2008-04-14 Jeff Johnston <jjohnstn@redhat.com>
+
+ * libc/stdio/Makefile.am: Build vfprintf.c and vfscanf.c with
+ -DSTRING_ONLY defined with and without -DINTEGER_ONLY defined
+ to build special versions for sprintf/sscanf family functions.
+ * libc/stdio/Makefile.in: Regenerated.
+ * libc/stdio/vfprintf.c[STRING_ONLY][INTEGER_ONLY](_VFPRINTF_R):
+ Redefine to be _svfiprintf_r which is optimized to work with siprintf
+ family of functions (i.e. no I/O) and does not support floating-point.
+ [STRING_ONLY][!INTEGER_ONLY](_VFPRINTF_R): Redefine to be
+ _svfprintf_r which is optimized to work with sprintf family of
+ functions and not use I/O.
+ [STRING_ONLY](__sprint_r): New string only version of static function.
+ designed to work with sprintf family of functions.
+ * libc/stdio/vfscanf.c[STRING_ONLY][INTEGER_ONLY](_SVFSCANF_R):
+ Redefine to be _ssvfiscanf_r which is optimized to work with siscanf
+ family of functions (i.e. no I/O) and no float-point support.
+ [STRING_ONLY][!INTEGER_ONLY](_SVFSCANF_R): Redefine to be
+ __ssvfscanf_r which is optimized to work with sscanf family of
+ functions and does not require I/O functions.
+ * libc/stdio/asprintf.c: Call _svfprintf_r instead of _vfprintf_r.
+ * libc/stdio/snprintf.c: Ditto.
+ * libc/stdio/sprintf.c: Ditto.
+ * libc/stdio/vasnprintf.c: Ditto.
+ * libc/stdio/vasprintf.c: Ditto.
+ * libc/stdio/siprintf.c: Call _svfiprintf_r instead of _vfiprintf_r.
+ * libc/stdio/sniprintf.c: Ditto.
+ * libc/stdio/vasiprintf.c: Ditto.
+ * libc/stdio/vsiprintf.c: Ditto.
+ * libc/stdio/vsniprintf.c: Ditto.
+ * libc/stdio/vsprintf.c: Ditto.
+ * libc/stdio/local.h: Add prototypes for _svfprintf_r, _svfiprintf_r,
+ _ssvfscanf_r, and _ssvfiscanf_r.
+ * libc/stdio/sscanf.c: Call _ssvfscanf_r instead of _svfscanf_r.
+ * libc/stdio/vsscanf.c: Ditto.
+ * libc/stdio/siscanf.c: Call _ssvfiscanf_r instead of _svfiscanf_r.
+ * libc/stdio/vsiscanf.c: Ditto.
+
+2008-04-04 DJ Delorie <dj@redhat.com>
+
+ * libm/machine/spu/configure: Regenerate with autoconf 2.61.
+ * libc/sys/configure: Regenerate with autoconf 2.61.
+ * libc/machine/configure: Regenerate with autoconf 2.61.
+
+2008-04-01 Patrick Mansfield <patmans@us.ibm.com>
+
+ * libc/machine/spu/memcmp.c: New file for SPU optimized memcmp.
+ * libc/machine/spu/strncmp.h: New file supply _strncmp_internal.
+ * libc/machine/spu/Makefile.am: Add memcmp.c.
+ * libc/machine/spu/Makefile.in: Rebuild.
+ * libc/machine/spu/strncmp.c: Use _strncmp_internal.
+
+2008-04-01 Patrick Mansfield <patmans@us.ibm.com>
+
+ * configure.host: Build SPU with -DREENTRANT_SYSCALLS_PROVIDED and
+ -DMISSING_SYSCALL_NAMES.
+
+2008-04-01 Patrick Mansfield <patmans@us.ibm.com>
+
+ * libc/machine/spu/Makefile.am: Add assert.c.
+ * libc/machine/spu/Makefile.in: Regenerate.
+ * libc/machine/spu/assert.c: New file.
+
+2008-03-27 Patrick Mansfield <patmans@us.ibm.com>
+
+ * libc/include/reent.h: Define _func_r functions in this file to
+ func if REENTRANT_SYSCALLS_PROVIDED and MISSING_SYSCALL_NAMES are
+ defined.
+
+2008-03-27 Corinna Vinschen <corinna@vinschen.de>
+
+ * libc/include/sys/unistd.h: Declare lockf(2) and define lockf
+ constants when building for Cygwin.
+
+2008-03-11 Jeff Johnston <jjohnstn@redhat.com>
+
+ * libc/stdio/rgetc.c (__srget_r): Invoke CHECK_INIT to ensure
+ stdin gets resolved properly before refilling.
+
+2008-03-07 Jeff Johnston <jjohnstn@redhat.com>
+
+ * libc/include/getopt.h: Hide newlib extensions under
+ the __need_getopt_newlib flag.
+ * libc/stdlib/getopt.c: #define __need_getopt_newlib before including
+ getopt.h. Put entire code under !HAVE_GETOPT to support platforms
+ with their own getopt implementation.
+ * configure.host: Specify HAVE_GETOPT for x86-linux.
+
+2008-03-07 Jeff Johnston <jjohnstn@redhat.com>
+
+ * libc/include/sys/reent.h(_REENT_SMALL_CHECK_INIT): Specify
+ this macro completely instead of referring to CHECK_STD_INIT which
+ is only found in libc/stdio/local.h.
+ * libc/stdio/dprintf.c: Add include of local.h.
+ * libc/stdio/vdprintf.c: Ditto.
+ * libc/stdio/vdiprintf.c: Ditto.
+
+2008-03-04 Eric Blake <ebb9@byu.net>
+
+ Fix strtod("nan()", ptr).
+ * libc/stdlib/gdtoa-hexnan.c (hexnan): When the optional
+ n-char-sequence is omitted, still parse the ().
+
+2008-03-03 Eric Blake <ebb9@byu.net>
+
+ Fix ftell bug after ungetc.
+ * libc/stdio/ftell.c (_ftell_r): Don't flush ungetc buffer on
+ ftell.
+ * libc/stdio64/ftello64.c (_ftello64_r): Likewise.
+ * libc/stdio/fflush.c (_fflush_r): Clear unget buffer when
+ repositioning underlying fd offset.
+
+2008-03-02 Jeff Johnston <jjohnstn@redhat.com>
+
+ * libc/include/getopt.h (no_argument): Added for glibc compatibility.
+ (required_argument, optional_argument): Ditto.
+
+2008-02-29 Gregory Pietsch <gpietsch@comcast.net>
+
+ * libc/stdlib/getopt.c (getopt_internal): Rewrite to accept
+ data area so as to support reentrant calls. Change all callers
+ to fill in data area with global values and restore any changes
+ to the global values after call.
+ (__getopt_r, __getopt_long_r, __getopt_long_only_r): New routines
+ to support reentrancy that add a data area argument.
+ * libc/include/getopt.h: Add new _r routines and provide macros
+ so they can be called with using double-underscores.
+
+2008-02-21 Eric Blake <ebb9@byu.net>
+
+ Fix strtod("-0x", NULL).
+ * libc/stdlib/strtod.c (_strtod_r): Fall back to 0 if hex parse
+ fails.
+
+2008-02-12 Jeff Johnston <jjohnstn@redhat.com>
+
+ * libc/machine/powerpc/vfprintf.c (_VFPRINTF_R): Prepare
+ for user specifying --disable-newlib-io-long-long on configure.
+ Call _fflush_r instead of fflush. For _mbtowc_r, pass the
+ reentrant pointer passed in rather than _REENT.
+
+2008-02-12 Peter Rosin <peda@lysator.liu.se>
+
+ * libc/stdlib/getopt.c (getopt_internal): Handle optional
+ arguments better for long options and short options not
+ appearing as the first option in a sequence.
+
+2008-02-11 Patrick Mansfield <patmans@us.ibm.com>
+
+ * libc/machine/spu/straddr.h: New file, supplies _straddr.
+ * libc/machine/spu/strcat.c: Use _straddr and _strcpy.
+ * libc/machine/spu/strcpy.c: Use _strcpy.
+ * libc/machine/spu/strcpy.h: Supply _strcpy for optimized SPU
+ str[n]cpy and str[n]cat.
+ * libc/machine/spu/strncat.c: Use _straddr and _strcpy.
+ * libc/machine/spu/strncpy.c: Use _strcpy.
+
+2008-02-11 Patrick Mansfield <patmans@us.ibm.com>
+
+ * libc/machine/spu/strlen.c: Remove the len variable and unneeded
+ calculation of its value.
+
+2008-01-25 Hans-Peter Nilsson <hp@bitrange.com>
+
+ * libc/sys/mmixware/isatty.c (_isatty): Renamed from isatty.
+ Make ISO C.
+
+2008-01-21 DJ Delorie <dj@redhat.com>
+
+ * libc/sys/sh/syscalls.c (_isatty): New.
+
+2008-01-21 Neal H. Walfield <neal@gnu.org>
+
+ * Makefile.am (crt1.o): Use correct source.
+ * Makefile.in: Regenerated.
+
+2008-01-15 Eric Blake <ebb9@byu.net>
+
+ * libc/string/Makefile.am (ELIX_2_SOURCES): Fix definition.
+ * libc/string/Makefile: Regenerate.
+
+2008-01-15 Corinna Vinschen <corinna@vinschen.de>
+
+ * libc/include/machine/setjmp.h (__SIGMASK_FUNC): Define as
+ pthread_sigmask or sigprocmask depending on _POSIX_THREADS.
+ (sigsetjmp): Use __SIGMASK_FUNC.
+ (siglongjmp): Ditto.
+ (_setjmp): Define as macro.
+ (_longjmp): Ditto.
+
+2008-01-11 Eric Blake <ebb9@byu.net>
+
+ Make strstr and strcasestr O(n), not O(n^2); add memmem.
+ * libc/string/str-two-way.h: New file.
+ * libc/string/memmem.c (memmem): New file.
+ * libc/include/string.h (memmem): Declare for all platforms.
+ * libc/string/strstr.c (strstr): Provide O(n) implementation when
+ not optimizing for space.
+ * libc/string/strcasestr.c (strcasestr): Likewise.
+ * libc/string/Makefile.am (ELIX_SOURCES): Rename to...
+ (ELIX_2_SOURCES): ...this.
+ (ELIX_4_SOURCES): New category, for memmem.
+ (lib_a_SOURCES, libstring_la_SOURCES): Build new file.
+ (CHEWOUT_FILES): Build documentation for memmem.
+ * libc/string/strings.tex: Include new docs.
+
+2008-01-08 Jeff Johnston <jjohnstn@redhat.com>
+
+ * libc/machine/m68k/memcpy.S: Remove % from register references
+ as this is already handled by m68kasm.h.
+ * libc/machine/m68k/memset.S: Ditto.
+
+2008-01-07 Jeff Johnston <jjohnstn@redhat.com>
+
+ * libc/machine/m68k/m68kasm.h: New file.
+ * libc/machine/m68k/setjmp.S: Remove common definitions and
+ place in m68kasm.h. Include "m68kasm.h".
+ * libc/machine/m68k/memcpy.S: Include "m68kasm.h" and use
+ SYM() macro when referencing function name.
+ * libc/machine/m68k/memset.S: Ditto.
+
+2008-01-03 Jeff Johnston <jjohnstn@redhat.com>
+
+ Make isatty syscall handling consistent with other newlib syscalls.
+
+ * libc/include/_syslist.h: Add _isatty.
+ * libc/include/reent.h: Add _isatty_r.
+ * libc/include/sys/unistd.h: Add _isatty.
+ * libc/posix/Makefile.am: Add new _isatty.c file.
+ * libc/posix/Makefile.in: Regenerated.
+ * libc/posix/_isatty.c: New file.
+ * libc/posix/isatty.c: Changed to call _isatty().
+ * libc/reent/Makefile.am: Add new isattyr.c file.
+ * libc/reent/Makefile.in: Regenerated.
+ * libc/reent/isattyr.c: New file.
+ * libc/stdio/freopen.c: Changed to call _isatty_r().
+ * libc/stdio/makebuf.c: Ditto.
+ * libc/sys/a29khif/_isatty.S: Change isatty to _isatty.
+ * libc/sys/arc/isatty.c: Ditto.
+ * libc/sys/arm/syscalls.c: Ditto.
+ * libc/sys/d10v/syscalls.c: Ditto.
+ * libc/sys/h8300hms/syscalls.c: Ditto.
+ * libc/sys/h8500hms/syscalls.c: Ditto.
+ * libc/sys/linux/Makefile.am: Add new isatty.c file.
+ * libc/sys/linux/Makefile.in: Regenerated.
+ * libc/sys/linux/isatty.c: New file.
+ * libc/syscalls/Makefile.am: Add new sysisatty.c file.
+ * libc/syscalls/Makefile.in: Regenerated.
+ * libc/syscalls/sysisatty.c: New file.
+
+2008-01-02 Jeff Johnston <jjohnstn@redhat.com>
+
+ * libc/syscalls/sysclose.c: Always call reentrant version of the
+ underlying syscall since one is guaranteed to exist in libc/reent.
+ * libc/syscalls/sysexecve.c: Ditto.
+ * libc/syscalls/sysfcntl.c: Ditto.
+ * libc/syscalls/sysfork.c: Ditto.
+ * libc/syscalls/sysfstat.c: Ditto.
+ * libc/syscalls/sysgetpid.c: Ditto.
+ * libc/syscalls/sysgettod.c: Ditto.
+ * libc/syscalls/syskill.c: Ditto.
+ * libc/syscalls/syslink.c: Ditto.
+ * libc/syscalls/syslseek.c: Ditto.
+ * libc/syscalls/sysopen.c: Ditto.
+ * libc/syscalls/sysread.c: Ditto.
+ * libc/syscalls/syssbrk.c: Ditto.
+ * libc/syscalls/sysstat.c: Ditto.
+ * libc/syscalls/systimes.c: Ditto.
+ * libc/syscalls/sysunlink.c: Ditto.
+ * libc/syscalls/syswait.c: Ditto.
+ * libc/syscalls/syswrite.c: Ditto.
+
+2007-12-19 Jeff Johnston <jjohnstn@redhat.com>
+
+ * NEWS: Update with 1.16.0 info.
+ * README: Ditto.
+ * acinclude.m4: Change version number to 1.16.0.
+ * aclocal.m4: Regenerated.
+ * configure: Ditto.
+ * doc/aclocal.m4: Ditto.
+ * doc/configure: Ditto.
+ * libc/*/aclocal.m4: Ditto.
+ * libc/*/configure: Ditto.
+ * libc/libc.texinfo: Ditto.
+ * libm/*/aclocal.m4: Ditto.
+ * libm/*/configure: Ditto.
+ * libm/libm.texinfo: Ditto.
+ * libc/sys/linux/shared.ld: Add VERS_1.16.
+
+2007-12-19 Jeff Johnston <jjohnstn@redhat.com>
+
+ * libc/string/strcasestr.c: Remove id macro.
+ * libc/sys/linux/linuxthreads/attr.c: Fix up sched_priority
+ field reference to be __sched_priority.
+ * libc/sys/linux/linuxthreads/joinrace.c: Ditto.
+ * libc/sys/linux/linuxthreads/manager.c: Ditto.
+ * libc/sys/linux/stdlib/collate.c: Remove id macro.
+ * libc/sys/linux/stdlib/collcmp.c: Ditto.
+ * libc/sys/linux/stdlib/engine.c: Ditto.
+ * libc/sys/linux/stdlib/fnmatch.c: Ditto.
+ * libc/sys/linux/stdlib/glob.c: Ditto.
+ * libc/sys/linux/stdlib/reallocf.c: Ditto.
+ * libc/sys/linux/stdlib/regcomp.c: Ditto.
+ * libc/sys/linux/stdlib/regerror.c: Ditto.
+ * libc/sys/linux/stdlib/regexec.c: Ditto.
+ * libc/sys/linux/stdlib/regfree.c: Ditto.
+ * libc/sys/linux/sys/cdefs.h: Replace with latest version.
+ * libc/sys/linux/include/argp.h: Ditto.
+ * libc/sys/linux/sys/libc-lock.h: New file.
+ * libc/sys/linux/sys/stdint.h: Ditto.
+ * libc/sys/linux/include/sched.h: New file.
+
+2007-12-19 Dave Korn <dave.korn@artimi.com>
+ Jeff Johnston <jjohnstn@redhhat.com>
+
+ * libc/include/_ansi.h: Add _LONG_LONG definition.
+ * libc/include/math.h (llrint, llrintf, rintl, lrintl, llrintl): Add
+ prototypes.
+ * libc/machine/i386/machine/fastmath.h: Add support for new i386
+ fast math versions of rint, lrint, and llrint family functions.
+ * libm/machine/i386/Makefile.am: Add new files.
+ * libm/machine/i386/Makefile.in: Regenerated.
+ * libm/machine/i386/f_llrint.c, libm/machine/i386/f_lrint.c,
+ libm/machine/i386/f_rint.c, libm/machine/i386/f_llrintf.c,
+ libm/machine/i386/f_lrintf.c, libm/machine/i386/f_rintf.c,
+ libm/machine/i386/f_llrintl.c, libm/machine/i386/f_lrintl.c,
+ libm/machine/i386/f_rintl.c: New files with fast math implementations.
+
+2007-12-19 Jeff Johnston <jjohnstn@redhat.com>
+
+ * libc/include/sys/features.h: Add checks for C90 compilers using
+ -ansi.
+
+2007-12-19 Corinna Vinschen <corinna@vinschen.de>
+
+ * libc/include/wchar.h: Add prototypes for wcpcpy and wcpncpy.
+ * libc/string/Makefile.am (ELIX_SOURCES): Add wcpcpy.c and
+ wcpncpy.c.
+ (CHEWOUT_FILES): Add wcpcpy.def and wcpncpy.def.
+ * libc/string/Makefile.in: Regenerate.
+ * libc/string/wcpcpy.c: New file.
+ * libc/string/wcpncpy.c: New file.
+ * libc/string/wcstrings.tex: Add wcpcpy and wcpncpy.
+
+2007-12-19 Corinna Vinschen <corinna@vinschen.de>
+
+ * libc/stdio/vfprintf.c (_VFPRINTF_R): Use correct pointer in call to
+ _wcsrtombs_r.
+
+2007-11-19 Nick Clifton <nickc@redhat.com>
+
+ * libc/machine/mn10300/Makefile.am (CCASFLAGS): Add -Wa,--gdwarf-2.
+ * libc/machine/mn10300/Makefile.in: Regenerate.
+ * libc/machine/mn10300/memchar.S: Remove redundant labels. Add
+ .debug_frame section.
+ * libc/machine/mn10300/memcmp.S: Likewise.
+ * libc/machine/mn10300/memcpy.S: Likewise.
+ * libc/machine/mn10300/memset.S: Likewise.
+ * libc/machine/mn10300/strchr.S: Likewise.
+ * libc/machine/mn10300/strcmp.S: Likewise.
+ * libc/machine/mn10300/strcpy.S: Likewise.
+ * libc/machine/mn10300/strlen.S: Likewise.
+
+2007-11-15 Jeff Johnston <jjohnstn@redhat.com>
+
+ * libc/include/sys/_default_fcntl.h: New header file that
+ is the default version of sys/fcntl.h.
+ * libc/include/sys/fcntl.h: Changed to simply include
+ sys/_default_fcntl.h.
+ * libc/sys/arm/sys/fcntl.h: New file that includes
+ sys/_default_fcntl.h and defines O_BINARY.
+
+2007-11-08 Corinna Vinschen <corinna@vinschen.de>
+
+ * libc/include/sys/unistd.h: Remove Cygwin definition of MAXPATHLEN.
+
+2007-11-07 Dave Brolley <brolley@redhat.com>
+
+ * libc/machine/configure: Regenerated to pick up mep-elf changes.
+
+ * Contribute mep-elf from Red Hat
+ 2006-10-27 DJ Delorie <dj@redhat.com>
+
+ * libc/include/machine/setjmp.h: Add MeP support.
+
+ 2003-04-17 DJ Delorie <dj@redhat.com>
+
+ * configure.host (mep-*-*): Support "long long" type.
+
+ 2001-06-06 DJ Delorie <dj@redhat.com>
+
+ * libc/include/machine/ieeefp.h (mep): Support little endian too.
+
+ 2001-05-14 DJ Delorie <dj@redhat.com>
+
+ * configure.host: Add mep's machine_dir.
+ * libc/include/setjmp.h: Add mep support.
+ * libc/machine/mep: New.
+ * libc/machine/mep/setjmp.S: New, support mep's setjmp/longjmp.
+
+ 2001-05-04 DJ Delorie <dj@redhat.com>
+
+ * configure.host: Add mep.
+ * libc/include/machine/ieeefp.h: Ditto.
+
+2007-10-31 DJ Delorie <dj@redhat.com>
+
+ * libc/signal/signal.c (_raise_r): Don't attempt to initialize the
+ signal table, just use a default, in case initialization cause
+ recursion.
+
+2007-10-23 Jeff Johnston <jjohnstn@redhat.com>
+
+ * libc/stdlib/wcstombs_r.c: Add SUSV2 support for calculating
+ size if output buffer is NULL.
+
+2007-10-17 Jeff Johnston <jjohnstn@redhat.com>
+
+ * libm/mathfp/s_logarithm.c: Fix error introduced by previous
+ fix when handling negative input values. Make function
+ consistent with math directory and glibc version such that
+ inf and nan values return inf and nan respectively with no
+ errno setting.
+ * libm/mathfp/sf_logarithm.c: Ditto.
+ * libm/math/w_log.c: Set errno to ERANGE when input is 0.0.
+ * libm/math/wf_log.c: Ditto.
+ * libm/math/w_log10.c: Ditto.
+ * libm/math/wf_log10.c: Ditto.
+
+2007-10-17 Jeff Johnston <jjohnstn@redhat.com>
+
+ * libm/mathfp/s_logarithm.c: Fix case where input is 0 to
+ return -inf.
+ * libm/mathfp/sf_logarithm.c: Ditto.
+
+2007-10-17 Jeff Johnston <jjohnstn@redhat.com>
+
+ * libc/machine/i386/machine/fastmath.h: New file.
+
+2007-10-13 Eric Blake <ebb9@byu.net>
+
+ * libc/stdio/vfprintf.c (_VFPRINTF_R) [__OPTIMIZE_SIZE__]:
+ Correctly nest else within conditionals.
+ Reported by Artur Lipowski.
+
+2007-10-09 Nick Clifton <nickc@redhat.com>
+
+ * libc/sys/linux/dl/do-lookup.h (FCT): Support symbols with
+ the STT_COMMON type.
+
+2007-10-09 Ben Elliston <bje@au.ibm.com>
+
+ * libm/machine/spu/headers/acosd2.h: Include spu_intrinsics.h
+ before simdmath.h to get a definition for `vector'.
+ * libm/machine/spu/headers/asind2.h: Likewise.
+
+2007-09-28 Patrick Mansfield <patmans@us.ibm.com>
+
+ * libm/machine/spu/headers/dom_chkd_less_than.h: New file.
+ * libm/machine/spu/headers/dom_chkd_negone_one.h: Ditto.
+ * libm/machine/spu/headers/dom_chkf_less_than.h: Ditto.
+ * libm/machine/spu/headers/dom_chkf_negone_one.h: Ditto.
+ * libm/machine/spu/headers/acos.h: Add domain check.
+ * libm/machine/spu/headers/acosf.h: Ditto.
+ * libm/machine/spu/headers/acosh.h: Ditto.
+ * libm/machine/spu/headers/acoshf.h: Ditto.
+ * libm/machine/spu/headers/asin.h: Ditto.
+ * libm/machine/spu/headers/asinf.h: Ditto.
+ * libm/machine/spu/headers/atanh.h: Ditto.
+ * libm/machine/spu/headers/atanhf.h: Ditto.
+ * libm/machine/spu/headers/fmod.h: Ditto.
+ * libm/machine/spu/headers/fmodf.h: Ditto.
+ * libm/machine/spu/headers/log.h: Ditto.
+ * libm/machine/spu/headers/log10.h: Ditto.
+ * libm/machine/spu/headers/log1p.h: Ditto.
+ * libm/machine/spu/headers/log1pf.h: Ditto.
+ * libm/machine/spu/headers/log2.h: Ditto.
+ * libm/machine/spu/headers/log2f.h: Ditto.
+ * libm/machine/spu/headers/sqrt.h: Ditto.
+ * libm/machine/spu/headers/sqrtf.h: Ditto.
+ * libm/machine/spu/headers/tgamma.h: Ditto.
+ * libm/machine/spu/headers/tgammaf.h: Ditto.
+
+2007-09-28 Patrick Mansfield <patmans@us.ibm.com>
+
+ * libm/machine/spu/Makefile.am: Add new C files.
+ * libm/machine/spu/Makefile.in: Regenerate.
+ * libm/machine/spu/headers/acos.h: New file.
+ * libm/machine/spu/headers/acosd2.h: Ditto.
+ * libm/machine/spu/headers/acosf.h: Ditto.
+ * libm/machine/spu/headers/acosf4.h: Ditto.
+ * libm/machine/spu/headers/acosh.h: Ditto.
+ * libm/machine/spu/headers/acoshd2.h: Ditto.
+ * libm/machine/spu/headers/acoshf.h: Ditto.
+ * libm/machine/spu/headers/acoshf4.h: Ditto.
+ * libm/machine/spu/headers/asin.h: Ditto.
+ * libm/machine/spu/headers/asind2.h: Ditto.
+ * libm/machine/spu/headers/asinf.h: Ditto.
+ * libm/machine/spu/headers/asinf4.h: Ditto.
+ * libm/machine/spu/headers/asinh.h: Ditto.
+ * libm/machine/spu/headers/asinhd2.h: Ditto.
+ * libm/machine/spu/headers/asinhf.h: Ditto.
+ * libm/machine/spu/headers/asinhf4.h: Ditto.
+ * libm/machine/spu/headers/atan.h: Ditto.
+ * libm/machine/spu/headers/atan2.h: Ditto.
+ * libm/machine/spu/headers/atan2d2.h: Ditto.
+ * libm/machine/spu/headers/atan2f.h: Ditto.
+ * libm/machine/spu/headers/atan2f4.h: Ditto.
+ * libm/machine/spu/headers/atand2.h: Ditto.
+ * libm/machine/spu/headers/atanf4.h: Ditto.
+ * libm/machine/spu/headers/atanh.h: Ditto.
+ * libm/machine/spu/headers/atanhd2.h: Ditto.
+ * libm/machine/spu/headers/atanhf.h: Ditto.
+ * libm/machine/spu/headers/atanhf4.h: Ditto.
+ * libm/machine/spu/headers/cos.h: Ditto.
+ * libm/machine/spu/headers/cos_sin.h: Ditto.
+ * libm/machine/spu/headers/cosd2.h: Ditto.
+ * libm/machine/spu/headers/cosf.h: Ditto.
+ * libm/machine/spu/headers/cosf4.h: Ditto.
+ * libm/machine/spu/headers/cosh.h: Ditto.
+ * libm/machine/spu/headers/coshd2.h: Ditto.
+ * libm/machine/spu/headers/coshf.h: Ditto.
+ * libm/machine/spu/headers/coshf4.h: Ditto.
+ * libm/machine/spu/headers/divd2.h: Ditto.
+ * libm/machine/spu/headers/divf4.h: Ditto.
+ * libm/machine/spu/headers/erf.h: Ditto.
+ * libm/machine/spu/headers/erf_utils.h: Ditto.
+ * libm/machine/spu/headers/erfc.h: Ditto.
+ * libm/machine/spu/headers/erfcd2.h: Ditto.
+ * libm/machine/spu/headers/erfcf.h: Ditto.
+ * libm/machine/spu/headers/erfcf4.h: Ditto.
+ * libm/machine/spu/headers/erfd2.h: Ditto.
+ * libm/machine/spu/headers/erff.h: Ditto.
+ * libm/machine/spu/headers/erff4.h: Ditto.
+ * libm/machine/spu/headers/exp.h: Ditto.
+ * libm/machine/spu/headers/exp2.h: Ditto.
+ * libm/machine/spu/headers/exp2d2.h: Ditto.
+ * libm/machine/spu/headers/exp2f4.h: Ditto.
+ * libm/machine/spu/headers/expd2.h: Ditto.
+ * libm/machine/spu/headers/expf4.h: Ditto.
+ * libm/machine/spu/headers/expm1.h: Ditto.
+ * libm/machine/spu/headers/expm1d2.h: Ditto.
+ * libm/machine/spu/headers/expm1f.h: Ditto.
+ * libm/machine/spu/headers/expm1f4.h: Ditto.
+ * libm/machine/spu/headers/floord2.h: Ditto.
+ * libm/machine/spu/headers/floorf4.h: Ditto.
+ * libm/machine/spu/headers/hypot.h: Ditto.
+ * libm/machine/spu/headers/hypotd2.h: Ditto.
+ * libm/machine/spu/headers/hypotf.h: Ditto.
+ * libm/machine/spu/headers/hypotf4.h: Ditto.
+ * libm/machine/spu/headers/isnan.h: Ditto.
+ * libm/machine/spu/headers/isnand2.h: Ditto.
+ * libm/machine/spu/headers/isnanf.h: Ditto.
+ * libm/machine/spu/headers/isnanf4.h: Ditto.
+ * libm/machine/spu/headers/ldexpd2.h: Ditto.
+ * libm/machine/spu/headers/ldexpf4.h: Ditto.
+ * libm/machine/spu/headers/lgamma.h: Ditto.
+ * libm/machine/spu/headers/lgammad2.h: Ditto.
+ * libm/machine/spu/headers/lgammaf.h: Ditto.
+ * libm/machine/spu/headers/lgammaf4.h: Ditto.
+ * libm/machine/spu/headers/log.h: Ditto.
+ * libm/machine/spu/headers/log10.h: Ditto.
+ * libm/machine/spu/headers/log10d2.h: Ditto.
+ * libm/machine/spu/headers/log1p.h: Ditto.
+ * libm/machine/spu/headers/log1pd2.h: Ditto.
+ * libm/machine/spu/headers/log1pf.h: Ditto.
+ * libm/machine/spu/headers/log1pf4.h: Ditto.
+ * libm/machine/spu/headers/log2.h: Ditto.
+ * libm/machine/spu/headers/log2d2.h: Ditto.
+ * libm/machine/spu/headers/log2f4.h: Ditto.
+ * libm/machine/spu/headers/logbf.h: Ditto.
+ * libm/machine/spu/headers/logbf4.h: Ditto.
+ * libm/machine/spu/headers/logd2.h: Ditto.
+ * libm/machine/spu/headers/logf4.h: Ditto.
+ * libm/machine/spu/headers/nearbyintf.h: Ditto.
+ * libm/machine/spu/headers/nearbyintf4.h: Ditto.
+ * libm/machine/spu/headers/nextafter.h: Ditto.
+ * libm/machine/spu/headers/nextafterd2.h: Ditto.
+ * libm/machine/spu/headers/nextafterf.h: Ditto.
+ * libm/machine/spu/headers/nextafterf4.h: Ditto.
+ * libm/machine/spu/headers/pow.h: Ditto.
+ * libm/machine/spu/headers/powd2.h: Ditto.
+ * libm/machine/spu/headers/powf.h: Ditto.
+ * libm/machine/spu/headers/powf4.h: Ditto.
+ * libm/machine/spu/headers/recipd2.h: Ditto.
+ * libm/machine/spu/headers/recipf4.h: Ditto.
+ * libm/machine/spu/headers/rintf.h: Ditto.
+ * libm/machine/spu/headers/rintf4.h: Ditto.
+ * libm/machine/spu/headers/scalbnf4.h: Ditto.
+ * libm/machine/spu/headers/signbit.h: Ditto.
+ * libm/machine/spu/headers/signbitd2.h: Ditto.
+ * libm/machine/spu/headers/simdmath.h: Ditto.
+ * libm/machine/spu/headers/sin.h: Ditto.
+ * libm/machine/spu/headers/sincos.h: Ditto.
+ * libm/machine/spu/headers/sincosd2.h: Ditto.
+ * libm/machine/spu/headers/sincosf.h: Ditto.
+ * libm/machine/spu/headers/sincosf4.h: Ditto.
+ * libm/machine/spu/headers/sind2.h: Ditto.
+ * libm/machine/spu/headers/sinf.h: Ditto.
+ * libm/machine/spu/headers/sinf4.h: Ditto.
+ * libm/machine/spu/headers/sinh.h: Ditto.
+ * libm/machine/spu/headers/sinhd2.h: Ditto.
+ * libm/machine/spu/headers/sinhf.h: Ditto.
+ * libm/machine/spu/headers/sinhf4.h: Ditto.
+ * libm/machine/spu/headers/sqrtd2.h: Ditto.
+ * libm/machine/spu/headers/sqrtf.h: Ditto.
+ * libm/machine/spu/headers/sqrtf4.h: Ditto.
+ * libm/machine/spu/headers/tan.h: Ditto.
+ * libm/machine/spu/headers/tand2.h: Ditto.
+ * libm/machine/spu/headers/tanf.h: Ditto.
+ * libm/machine/spu/headers/tanf4.h: Ditto.
+ * libm/machine/spu/headers/tanh.h: Ditto.
+ * libm/machine/spu/headers/tanhd2.h: Ditto.
+ * libm/machine/spu/headers/tanhf.h: Ditto.
+ * libm/machine/spu/headers/tanhf4.h: Ditto.
+ * libm/machine/spu/headers/tgamma.h: Ditto.
+ * libm/machine/spu/headers/tgammad2.h: Ditto.
+ * libm/machine/spu/headers/tgammaf.h: Ditto.
+ * libm/machine/spu/headers/tgammaf4.h: Ditto.
+ * libm/machine/spu/headers/truncd2.h: Ditto.
+ * libm/machine/spu/headers/truncf4.h: Ditto.
+ * libm/machine/spu/log2.c: Ditto.
+ * libm/machine/spu/s_asinh.c: Ditto.
+ * libm/machine/spu/s_atan.c: Ditto.
+ * libm/machine/spu/s_cos.c: Ditto.
+ * libm/machine/spu/s_erf.c: Ditto.
+ * libm/machine/spu/s_expm1.c: Ditto.
+ * libm/machine/spu/s_isnan.c: Ditto.
+ * libm/machine/spu/s_log1p.c: Ditto.
+ * libm/machine/spu/s_nextafter.c: Ditto.
+ * libm/machine/spu/s_sin.c: Ditto.
+ * libm/machine/spu/s_tan.c: Ditto.
+ * libm/machine/spu/s_tanh.c: Ditto.
+ * libm/machine/spu/sf_asinh.c: Ditto.
+ * libm/machine/spu/sf_cos.c: Ditto.
+ * libm/machine/spu/sf_erf.c: Ditto.
+ * libm/machine/spu/sf_expm1.c: Ditto.
+ * libm/machine/spu/sf_log1p.c: Ditto.
+ * libm/machine/spu/sf_logb.c: Ditto.
+ * libm/machine/spu/sf_nearbyint.c: Ditto.
+ * libm/machine/spu/sf_nextafter.c: Ditto.
+ * libm/machine/spu/sf_rint.c: Ditto.
+ * libm/machine/spu/sf_sin.c: Ditto.
+ * libm/machine/spu/sf_tan.c: Ditto.
+ * libm/machine/spu/sf_tanh.c: Ditto.
+ * libm/machine/spu/w_acos.c: Ditto.
+ * libm/machine/spu/w_acosh.c: Ditto.
+ * libm/machine/spu/w_asin.c: Ditto.
+ * libm/machine/spu/w_atan2.c: Ditto.
+ * libm/machine/spu/w_atanh.c: Ditto.
+ * libm/machine/spu/w_cosh.c: Ditto.
+ * libm/machine/spu/w_exp.c: Ditto.
+ * libm/machine/spu/w_exp2.c: Ditto.
+ * libm/machine/spu/w_hypot.c: Ditto.
+ * libm/machine/spu/w_lgamma.c: Ditto.
+ * libm/machine/spu/w_log.c: Ditto.
+ * libm/machine/spu/w_log10.c: Ditto.
+ * libm/machine/spu/w_pow.c: Ditto.
+ * libm/machine/spu/w_sincos.c: Ditto.
+ * libm/machine/spu/w_sinh.c: Ditto.
+ * libm/machine/spu/w_tgamma.c: Ditto.
+ * libm/machine/spu/wf_acos.c: Ditto.
+ * libm/machine/spu/wf_acosh.c: Ditto.
+ * libm/machine/spu/wf_asin.c: Ditto.
+ * libm/machine/spu/wf_atan2.c: Ditto.
+ * libm/machine/spu/wf_atanh.c: Ditto.
+ * libm/machine/spu/wf_cosh.c: Ditto.
+ * libm/machine/spu/wf_hypot.c: Ditto.
+ * libm/machine/spu/wf_lgamma.c: Ditto.
+ * libm/machine/spu/wf_pow.c: Ditto.
+ * libm/machine/spu/wf_sincos.c: Ditto.
+ * libm/machine/spu/wf_sinh.c: Ditto.
+ * libm/machine/spu/wf_sqrt.c: Ditto.
+ * libm/machine/spu/wf_tgamma.c: Ditto.
+
+2007-09-28 Patrick Mansfield <patmans@us.ibm.com>
+
+ * configure.host: Define _POSIX_MODE to match the existing vector
+ math code, as we don't support the matherr callout.
+ * libm/machine/spu/Makefile.am: New file.
+ * libm/machine/spu/Makefile.in: Auto-generated.
+ * libm/machine/spu/headers/atanf.h: New file.
+ * libm/machine/spu/headers/cbrt.h: Ditto.
+ * libm/machine/spu/headers/cbrtf.h: Ditto.
+ * libm/machine/spu/headers/ceil.h: Ditto.
+ * libm/machine/spu/headers/ceilf.h: Ditto.
+ * libm/machine/spu/headers/copysign.h: Ditto.
+ * libm/machine/spu/headers/copysignf.h: Ditto.
+ * libm/machine/spu/headers/exp2f.h: Ditto.
+ * libm/machine/spu/headers/expf.h: Ditto.
+ * libm/machine/spu/headers/fabs.h: Ditto.
+ * libm/machine/spu/headers/fabsf.h: Ditto.
+ * libm/machine/spu/headers/fdim.h: Ditto.
+ * libm/machine/spu/headers/fdimf.h: Ditto.
+ * libm/machine/spu/headers/floor.h: Ditto.
+ * libm/machine/spu/headers/floorf.h: Ditto.
+ * libm/machine/spu/headers/fma.h: Ditto.
+ * libm/machine/spu/headers/fmaf.h: Ditto.
+ * libm/machine/spu/headers/fmax.h: Ditto.
+ * libm/machine/spu/headers/fmaxf.h: Ditto.
+ * libm/machine/spu/headers/fmin.h: Ditto.
+ * libm/machine/spu/headers/fminf.h: Ditto.
+ * libm/machine/spu/headers/fmod.h: Ditto.
+ * libm/machine/spu/headers/fmodf.h: Ditto.
+ * libm/machine/spu/headers/frexp.h: Ditto.
+ * libm/machine/spu/headers/frexpf.h: Ditto.
+ * libm/machine/spu/headers/ilogb.h: Ditto.
+ * libm/machine/spu/headers/ilogbf.h: Ditto.
+ * libm/machine/spu/headers/ldexp.h: Ditto.
+ * libm/machine/spu/headers/ldexpf.h: Ditto.
+ * libm/machine/spu/headers/llrint.h: Ditto.
+ * libm/machine/spu/headers/llrintf.h: Ditto.
+ * libm/machine/spu/headers/llround.h: Ditto.
+ * libm/machine/spu/headers/llroundf.h: Ditto.
+ * libm/machine/spu/headers/log10f.h: Ditto.
+ * libm/machine/spu/headers/log2f.h: Ditto.
+ * libm/machine/spu/headers/logf.h: Ditto.
+ * libm/machine/spu/headers/lrint.h: Ditto.
+ * libm/machine/spu/headers/lrintf.h: Ditto.
+ * libm/machine/spu/headers/lround.h: Ditto.
+ * libm/machine/spu/headers/lroundf.h: Ditto.
+ * libm/machine/spu/headers/nearbyint.h: Ditto.
+ * libm/machine/spu/headers/remainder.h: Ditto.
+ * libm/machine/spu/headers/remainderf.h: Ditto.
+ * libm/machine/spu/headers/remquo.h: Ditto.
+ * libm/machine/spu/headers/remquof.h: Ditto.
+ * libm/machine/spu/headers/rint.h: Ditto.
+ * libm/machine/spu/headers/round.h: Ditto.
+ * libm/machine/spu/headers/roundf.h: Ditto.
+ * libm/machine/spu/headers/scalbn.h: Ditto.
+ * libm/machine/spu/headers/scalbnf.h: Ditto.
+ * libm/machine/spu/headers/sqrt.h: Ditto.
+ * libm/machine/spu/headers/trunc.h: Ditto.
+ * libm/machine/spu/headers/truncf.h: Ditto.
+ * libm/machine/spu/headers/vec_literal.h: Ditto.
+ * libm/machine/spu/llrint.c: Ditto.
+ * libm/machine/spu/llrintf.c: Ditto.
+ * libm/machine/spu/llround.c: Ditto.
+ * libm/machine/spu/llroundf.c: Ditto.
+ * libm/machine/spu/log2f.c: Ditto.
+ * libm/machine/spu/s_cbrt.c: Ditto.
+ * libm/machine/spu/s_ceil.c: Ditto.
+ * libm/machine/spu/s_copysign.c: Ditto.
+ * libm/machine/spu/s_fabs.c: Ditto.
+ * libm/machine/spu/s_fdim.c: Ditto.
+ * libm/machine/spu/s_floor.c: Ditto.
+ * libm/machine/spu/s_fma.c: Ditto.
+ * libm/machine/spu/s_fmax.c: Ditto.
+ * libm/machine/spu/s_fmin.c: Ditto.
+ * libm/machine/spu/s_frexp.c: Ditto.
+ * libm/machine/spu/s_ilogb.c: Ditto.
+ * libm/machine/spu/s_ldexp.c: Ditto.
+ * libm/machine/spu/s_lrint.c: Ditto.
+ * libm/machine/spu/s_lround.c: Ditto.
+ * libm/machine/spu/s_nearbyint.c: Ditto.
+ * libm/machine/spu/s_remquo.c: Ditto.
+ * libm/machine/spu/s_rint.c: Ditto.
+ * libm/machine/spu/s_round.c: Ditto.
+ * libm/machine/spu/s_scalbn.c: Ditto.
+ * libm/machine/spu/s_trunc.c: Ditto.
+ * libm/machine/spu/sf_atan.c: Ditto.
+ * libm/machine/spu/sf_cbrt.c: Ditto.
+ * libm/machine/spu/sf_ceil.c: Ditto.
+ * libm/machine/spu/sf_copysign.c: Ditto.
+ * libm/machine/spu/sf_fabs.c: Ditto.
+ * libm/machine/spu/sf_fdim.c: Ditto.
+ * libm/machine/spu/sf_floor.c: Ditto.
+ * libm/machine/spu/sf_fma.c: Ditto.
+ * libm/machine/spu/sf_fmax.c: Ditto.
+ * libm/machine/spu/sf_fmin.c: Ditto.
+ * libm/machine/spu/sf_frexp.c: Ditto.
+ * libm/machine/spu/sf_ilogb.c: Ditto.
+ * libm/machine/spu/sf_ldexp.c: Ditto.
+ * libm/machine/spu/sf_lrint.c: Ditto.
+ * libm/machine/spu/sf_lround.c: Ditto.
+ * libm/machine/spu/sf_remquo.c: Ditto.
+ * libm/machine/spu/sf_round.c: Ditto.
+ * libm/machine/spu/sf_scalbn.c: Ditto.
+ * libm/machine/spu/sf_trunc.c: Ditto.
+ * libm/machine/spu/w_fmod.c: Ditto.
+ * libm/machine/spu/w_remainder.c: Ditto.
+ * libm/machine/spu/w_sqrt.c: Ditto.
+ * libm/machine/spu/wf_exp.c: Ditto.
+ * libm/machine/spu/wf_exp2.c: Ditto.
+ * libm/machine/spu/wf_fmod.c: Ditto.
+ * libm/machine/spu/wf_log.c: Ditto.
+ * libm/machine/spu/wf_log10.c: Ditto.
+ * libm/machine/spu/wf_remainder.c: Ditto.
+
+2007-09-21 Patrick Mansfield <patmans@us.ibm.com>
+
+ * libc/machine/spu/sys/uio.h: New file for readv and writev use.
+
+2007-09-21 Patrick Mansfield <patmans@us.ibm.com>
+
+ * libc/include/sched.h: New file, just include sys/sched.h.
+ * libc/machine/spu/sys/sched.h: New file, has just sched_yield
+ prototype.
+ * libc/machine/spu/sys/utime.h: New file, has utime prototype and
+ struct utimbuf definition.
+
+2007-09-21 Patrick Mansfield <patmans@us.ibm.com>
+
+ * libc/machine/spu/sys/dirent.h: New file, add prototypes and SPU
+ specific struct and typedef.
+
+2007-09-18 Patrick Mansfield <patmans@us.ibm.com>
+
+ * libc/include/sys/types.h: Use __dev_t, __uid_t, and __gid_t to
+ typedef dev_t, gid_t, and uid_t.
+ * libc/include/sys/_types.h: Move previous dev_t, uid_t and gid_t
+ types.h code to here, but typedef __dev_t, __uid_t, and __gid_t instead.
+ Change to lower case for all __foo_t_defined names.
+ * libc/machine/spu/machine/_types.h: Add SPU specific __dev_t,
+ __uid_t, and __gid_t making them all four bytes. Change to lower case
+ for all __foo_t_defined names.
+
+2007-09-18 Jeff Johnston <jjohnstn@redhat.com>
+
+ * libc/reent/renamer.c: New file.
+ * libc/reent/Makefile.am: Add new file.
+ * libc/reent/Makefile.in: Regenerated.
+ * libc/stdio/rename.c: Break out _rename_r code into reent/renamer.c
+ and add check for rename syscall.
+
+2007-09-17 Eric Blake <ebb9@byu.net>
+
+ Obey POSIX on printf("%.s", (char*)NULL).
+ * libc/stdio/vfprintf.c (_VFPRINTF_R): Take precision into account
+ for %s on NULL. Skip NULL check when optimizing for size.
+
+2007-09-07 Jeff Johnston <jjohnstn@redhat.com>
+
+ * libc/include/sys/_types.h: Protect all types with flag
+ checks to allow definition in machine/_types.h.
+
+2007-09-07 Jeff Johnston <jjohnstn@redhat.com>
+
+ * libc/sys/linux/sys/_types.h: Add _fpos_t and _fpos64_t
+ definitions in light of the previous change.
+
+2007-09-07 Patrick Mansfield <patmans@us.ibm.com>
+
+ * libc/include/machine/_default_types.h: New file, contains what
+ was previously in libc/include/machine/_types.h.
+ * libc/include/machine/_types.h: Now only includes
+ machine/_default_types.h.
+ * libc/include/sys/reent.h: Remove _fpos_t and _fpos64_t.
+ * libc/include/sys/_types.h: Move _fpos_t and _fpos64_t to here,
+ with conditional declarations.
+ * libc/machine/spu/machine/_types.h: New file, add SPU specific
+ typedefs for _fpos_t and _fpos64_t.
+
+2007-09-07 Jeff Johnston <jjohnstn@redhat.com>
+
+ * libc/include/math.h (_M_LOG2E): Replace with..
+ (_M_LOG2_E): New macro.
+ (log2, log2f, M_LOG2_E): Use _M_LOG2_E.
+
+2007-09-06 Brian Dessent <brian@dessent.net>
+
+ * libc/reent/getreent.c: Allow for case where __getreent is
+ defined as a macro.
+
+2007-09-06 Jeff Johnston <jjohnstn@redhat.com>
+
+ * libc/include/math.h (_M_LOG2E): New log2 of e macro.
+ (log2): Use _M_LOG2E instead of M_LOG2E.
+ (log2f): Ditto.
+ (M_LOG2E): Define to be _M_LOG2E.
+
+2007-09-04 Kazunori Asayama <asayama@sm.sony.co.jp>
+
+ * libm/math/wf_tgamma.c: Add missing include.
+
+2007-08-31 Antony King <antony.king@st.com>
+
+ * libc/stdlib/mprec.h [_DOUBLE_IS_32BITS}: Define IEEE_Arith
+ bits and redefine associated dword0 macro (rvalue issue).
+ * libc/stdio/vfieeefp.h: Ditto.
+ * libc/stdlib/strtod.c: Add checks for _DOUBLE_IS_32BITS
+ to prevent setting dword1 which is an rvalue only.
+
+2007-08-28 Hans Kester <hans.kester@ellips.nl>
+
+ * configure.host: Added support for x86_64.
+ * libc/include/machine/ieeefp.h: Define __IEEE_LITTLE_ENDIAN for x86_64.
+ * libc/include/machine/setjmp.h: Define _JBTYPE and _JBLEN for x86_64.
+ * libc/machine/x86_64/aclocal.m4: Generated.
+ * libc/machine/x86_64/configure.in: New.
+ * libc/machine/x86_64/configure: Generated.
+ * libc/machine/x86_64/Makefile.am: New.
+ * libc/machine/x86_64/Makefile.in: Generated.
+ * libc/machine/x86_64/setjmp.S: New.
+ * libc/machine/x86_64/memcpy.S: New.
+ * libc/machine/x86_64/memset.S: New.
+ * libc/machine/configure.in: Added support for x86_64.
+ * libc/machine/configure: Regenerated.
+
+2007-08-24 Jeff Johnston <jjohnstn@redhat.com>
+
+ * libm/common/sf_lround.c (lroundf): Cast sizeof calculation
+ to int before comparing it to a signed int value.
+
+2007-08-24 Hans-Peter Nilsson <hp@axis.com>
+
+ * libc/machine/cris/sys/errno.h (ECANCELED, ENOKEY, EKEYEXPIRED)
+ (EKEYREVOKED, EKEYREJECTED, EOWNERDEAD, ENOTRECOVERABLE, ENOTSUP):
+ Define.
+
+2007-08-23 Hidetaka Takano <hidetaka.takano@glb.toshiba.co.jp>
+
+ Reduce the memory consumption of variable argument functions
+ for SPU (cell):
+ * libc/machine/spu/Makefile.am: Replace printf/scanf family C sources
+ to assembler sources.
+ * libc/machine/spu/Makefile.in: Regenerated.
+ * libc/machine/spu/stdio.c: Add __check_init function wrapping
+ CHECK_INIT macro to use from assembler routines.
+ * libc/machine/spu/c99ppe.h: Add definitions for assembler code.
+ * libc/machine/spu/fiprintf.S: New file.
+ * libc/machine/spu/fiscanf.S: Ditto.
+ * libc/machine/spu/fprintf.S: Ditto.
+ * libc/machine/spu/fscanf.S: Ditto.
+ * libc/machine/spu/iprintf.S: Ditto.
+ * libc/machine/spu/iscanf.S: Ditto.
+ * libc/machine/spu/printf.S: Ditto.
+ * libc/machine/spu/scanf.S: Ditto.
+ * libc/machine/spu/siprintf.S: Ditto.
+ * libc/machine/spu/siscanf.S: Ditto.
+ * libc/machine/spu/sniprintf.S: Ditto.
+ * libc/machine/spu/snprintf.S: Ditto.
+ * libc/machine/spu/sprintf.S: Ditto.
+ * libc/machine/spu/sscanf.S: Ditto.
+ * libc/machine/spu/stack_reg_va.S: Ditto.
+ * libc/machine/spu/syscall.def: Ditto. (for maintenance)
+ * libc/machine/spu/mk_syscalls: Ditto. (for maintenance)
+ * libc/machine/spu/fiprintf.c: Removed. (Replaced by .S)
+ * libc/machine/spu/fiscanf.c: Ditto.
+ * libc/machine/spu/fprintf.c: Ditto.
+ * libc/machine/spu/fscanf.c: Ditto.
+ * libc/machine/spu/iprintf.c: Ditto.
+ * libc/machine/spu/iscanf.c: Ditto.
+ * libc/machine/spu/printf.c: Ditto.
+ * libc/machine/spu/scanf.c: Ditto.
+ * libc/machine/spu/siprintf.c: Ditto.
+ * libc/machine/spu/siscanf.c: Ditto.
+ * libc/machine/spu/sniprintf.c: Ditto.
+ * libc/machine/spu/snprintf.c: Ditto.
+ * libc/machine/spu/sprintf.c: Ditto.
+ * libc/machine/spu/sscanf.c: Ditto.
+
+2007-08-03 Ralf Corsepius <ralf.corsepius@rtems.org>
+
+ * libc/include/tar.h: New.
+
+2007-08-03 Jeff Johnston <jjohnstn@redhat.com>
+
+ * libc/sys/linux/intl/Makefile.am: Change stpcpy reference to
+ lcl_stpcpy to avoid conflict with new stpcpy.c in libc/string.
+ * libc/sys/linux/intl/Makefile.in: Regenerated.
+ * libc/sys/linux/intl/stpcpy.c: Renamed to...
+ * libc/sys/linux/intl/lcl_stpcpy.c: ..this.
+
+2007-08-02 Eric Blake <ebb9@byu.net>
+
+ Implement fmemopen and open_memstream.
+ * libc/stdio/fmemopen.c (_fmemopen_r, fmemopen): New file.
+ * libc/stdio/open_memstream.c (_open_memstream_r, open_memstream):
+ New file.
+ * libc/stdio/fopencookie.c (fcwriter): Minor optimization.
+ * libc/include/stdio.h (dprintf, vdprintf): Group all POSIX 200x
+ functions together.
+ (fmemopen, open_memstream): Declare new functions.
+ * libc/stdio/stdio.tex: Document them.
+ * libc/stdio/Makefile.am (ELIX_4_SOURCES, CHEWOUT_FILES): Add
+ fmemopen and open_memstream.
+ * libc/stdio/Makefile.in: Regenerate.
+
+2007-07-31 Eric Blake <ebb9@byu.net>
+
+ More POSIX stream corner cases.
+ * libc/stdio/findfp.c (__sinit): Open stderr read/write.
+ * libc/stdio/fdopen.c (_fdopen_r): Set O_APPEND on fd when
+ requested.
+ * libc/stdio64/fdopen64.c (_fdopen64_r): Likewise.
+
+2007-07-18 Eric Blake <ebb9@byu.net>
+
+ Fix 'make info'.
+ * libc/stdio/stdio.tex: Add missing include.
+ * libc/stdio/vfprintf.c: Use expected node name.
+ * libc/stdio/vfscanf.c: Likewise.
+ * libc/stdio/sscanf.c: Likewise.
+ * libc/stdio/sprintf.c: Likewise.
+ * libc/stdio/siscanf.c: Likewise.
+ * libc/stdio/siprintf.c: Likewise.
+ * libc/stdio/fopencookie.c: Quote raw {}.
+ Reported by DJ Delorie.
+
+2007-07-13 Eric Blake <ebb9@byu.net>
+
+ Fix fflush issues.
+ * libc/stdio/fflush.c (_fflush_r): New function.
+ (fflush): Fix reentrancy and large offset behavior.
+ * libc/include/stdio.h (_fflush_r): Add prototype.
+ * libc/stdio/fclose.c (_fclose_r): All fflush callers changed.
+ * libc/stdio/freopen.c (_freopen_r): Likewise.
+ * libc/stdio/fseek.c (_fseek_r): Likewise.
+ * libc/stdio/ftell.c (_ftell_r): Likewise.
+ * libc/stdio/fvwrite.c (__sfvwrite_r): Likewise.
+ * libc/stdio/refill.c (__srefill_r): Likewise.
+ * libc/stdio/setvbuf.c (setvbuf): Likewise.
+ * libc/stdio/ungetc.c (_ungetc_r): Likewise.
+ * libc/stdio/vfprintf.c (__sbprintf): Likewise.
+ * libc/stdio/wbuf.c (__swbuf_r): Likewise.
+ * libc/stdio64/freopen64.c (_freopen64_r): Likewise.
+ * libc/stdio64/fseeko64.c (_fseeko64_r): Likewise. Defer to
+ 32-bit version if not large file.
+ * libc/stdio64/ftello64.c (_ftello64_r): Likewise.
+ * libc/stdio64/tmpfile64.c (_tmpfile64_r): Avoid compile warning.
+
+ Documentation updates.
+ * libc/stdio/ungetc.c: Document ungetc.
+ * libc/stdio/Makefile.am (CHEWOUT_FILES): Sort, match current list
+ of files with documentation.
+ * libc/stdio/Makefile.in: Regenerate.
+ * libc/stdio/stdio.tex: Sort and update stdio documentation index.
+
+2007-07-11 Jeff Johnston <jjohnstn@redhat.com>
+
+ * libc/include/math.h: Fix so C99 functions/macros are accessible
+ when -std=c99 is used when compiling and not when using C89.
+
+2007-07-06 Corinna Vinschen <corinna@vinschen.de>
+
+ * libc/include/wchar.h: Declare wcstol, wcstoll, wcstoul,
+ wcstoull, _wcstol_r, _wcstoll_r, _wcstoul_r and _wcstoull_r.
+ * libc/stdlib/Makefile.am (GENERAL_SOURCES): Add wcstol.c and wcstoul.c.
+ (EXTENDED_SOURCES): Add wcstoll.c, wcstoll_r.c, wcstoull.c and
+ wcstoull_r.c.
+ (CHEWOUT_FILES): Add .def files accordingly.
+ * libc/stdlib/Makefile.in: Regenerate.
+ * libc/stdlib/stdlib.tex: Add documentation links for above functions.
+ * libc/stdlib/strtoll.c: Fix portability note.
+ * libc/stdlib/strtoull.c: Ditto.
+ * libc/stdlib/wcstol.c: New file.
+ * libc/stdlib/wcstoll.c: New file.
+ * libc/stdlib/wcstoll_r.c: New file.
+ * libc/stdlib/wcstoul.c: New file.
+ * libc/stdlib/wcstoull.c: New file.
+ * libc/stdlib/wcstoull_r.c: New file.
+
+2007-07-06 Jeff Johnston <jjohnstn@redhat.com>
+
+ * libc/include/sys/time.h (gettimeofday): Change to proper
+ prototype where second parameter is void *.
+ * libc/reent/gettimeofdayr.c (_gettimeofday_r): Change prototype
+ accordingly.
+ * libc/include/reent.h: Fix prototype for _gettimeofday_r.
+ * libc/sys/arm/syscalls.c: Fix gettimeofday function signature.
+ * libc/sys/rdos/gettod.c: Ditto.
+ * libc/sys/sh/syscalls.c: Ditto.
+ * libc/time/time.c (time): Change call to _gettimeofday_r
+ to pass NULL as 2nd argument.
+
+2007-07-06 Jeff Johnston <jjohnstn@redhat.com>
+
+ * libc/sys/linux/intl/dcigettext.c: Define HAVE_STPCPY.
+ * libc/sys/linux/intl/l10nflist.c: Ditto.
+
+2007-07-04 Corinna Vinschen <corinna@vinschen.de>
+
+ * libc/include/wchar.h: Add prototype for wcsxfrm.
+ * libc/string/Makefile.am (GENERAL_SOURCES): Add wcsxfrm.c.
+ (CHEWOUT_FILES): Add wcsxfrm.def.
+ * libc/string/Makefile.in: Regenerate.
+ * libc/string/wcsxfrm.c: New file.
+ * libc/string/wcstrings.tex: Add wcsxfrm.
+
+2007-06-28 Corinna Vinschen <corinna@vinschen.de>
+
+ * libc/include/string.h: Add prototypes for stpcpy and stpncpy.
+ * libc/string/Makefile.am (ELIX_SOURCES): Add stpcpy.c and
+ stpncpy.c.
+ (CHEWOUT_FILES): Add stpcpy.def and stpncpy.def.
+ * libc/string/Makefile.in: Regenerate.
+ * libc/string/stpcpy.c: New file.
+ * libc/string/stpncpy.c: New file.
+ * libc/string/strings.tex: Add stpcpy and stpncpy.
+
+2007-06-27 Eric Blake <ebb9@byu.net>
+
+ Support __func__ in assert, as required by C99.
+ * libc/stdlib/assert.c (__assert_func): New function.
+ (__assert): Use __assert_func.
+ * libc/include/assert.h (assert) [!NDEBUG]: Use __assert_func when
+ possible.
+
+2007-06-20 Patrick Mansfield <patmans@us.ibm.com>
+
+ * libc/machine/spu/perror.c: Pass errno as the second argument to
+ the assist call.
+
+2007-06-20 Patrick Mansfield <patmans@us.ibm.com>
+
+ * libc/include/sys/unistd.h[__SPU__]: Add lockf prototype and related
+ defines; expose ftruncate, truncate and sync prototypes.
+
+2007-06-20 Patrick Mansfield <patmans@us.ibm.com>
+
+ * libc/include/sys/unistd.h[__SPU__]: Make fchdir prototype visible.
+ * libc/include/sys/stat.h[__SPU__]: Make mknod and lstat prototypes
+ visible.
+
+2007-06-15 Patrick Mansfield <patmans@us.ibm.com>
+
+ * libc/machine/spu/Makefile.am: Remove mktemp.c, it was left in
+ from a dropped patch.
+ * libc/machine/spu/Makefile.in: Regenerate.
+
+2007-06-13 Patrick Mansfield <patmans@us.ibm.com>
+
+ * libc/machine/spu/creat.c: New file copied from libc/posix/creat.c,
+ it just calls open with appropriate arguments.
+ * libc/machine/spu/Makefile.am: Add creat.c.
+ * libc/machine/spu/Makefile.in: Regenerate.
+
+2007-06-13 Jeff Johnston <jjohnstn@redhat.com>
+
+ * libc/machine/spu/Makefile.am: Re-add back setjmp.S which
+ I accidentally dropped.
+ * libc/machine/spu/Makefile.in: Regenerated.
+
+2007-06-13 Patrick Mansfield <patmans@us.ibm.com>
+
+ * libc/include/sys/features.h: Define _POSIX_TIMERS for spu.
+ * libc/include/sys/unistd.h: Change usleep prototype to Posix
+ form and move outside of OS flag checks.
+ * libc/machine/spu/Makefile.am: Add sleep and usleep.
+ * libc/machine/spu/Makefile.in: Regenerate.
+ * libc/machine/spu/sleep.c: Copy libc/posix/sleep.c.
+ * libc/machine/spu/usleep.c: Copy libc/posix/usleep.c.
+
+2007-06-11 Corinna Vinschen <corinna@vinschen.de>
+
+ * libc/include/sys/unistd.h: Declare confstr for Cygwin.
+ Define confstr constants for Cygwin. Add comment.
+
+2007-06-10 Hans-Peter Nilsson <hp@bitrange.com>
+
+ * libc/sys/mmixware/access.c (access): Do not try to use a magic
+ file-handle and a direct syscall, just use _open.
+ * libc/sys/mmixware/sys/syscall.h (TMPFNO): Remove this magic
+ file-handle.
+
+ * libc/sys/mmixware/_exit.c (_exit): Update comment about
+ passing on the exit value.
+
+2007-06-08 Jeff Johnston <jjohnstn@redhat.com>
+
+ * libc/string/strcasestr.c: New file.
+ * libc/include/string.h: Add strcasestr.
+ * libc/string/strings.tex: Add strcasestr.
+ * libc/string/Makefile.am: Ditto.
+ * libc/string/Makefile.in: Regenerated.
+
+2007-06-06 Christian Groessler <chris@groessler.org>
+
+ * libc/stdlib/ldtoa (_ldcheck): Make sure the setting of
+ rnd is done after the last local variable declaration.
+
+2007-06-06 Jeff Johnston <jjohnstn@redhat.com>
+
+ * libc/stdlib/mprec.h[Just_16]: Make sure that Pack_16 is defined.
+
+2007-06-05 Christian Groessler <chris@groessler.org>
+
+ * libc/argz/argz_insert.c (argz_insert): Move delta variable
+ declaration to top of function in keeping with C89 standard.
+
+2007-06-04 Eric Blake <ebb9@byu.net>
+
+ Implement funopen, fopencookie.
+ * libc/include/sys/reent.h (struct __sFILE, struct __sFILE64):
+ Switch to reentrant callbacks.
+ * libc/include/stdio.h (funopen): Fix declaration.
+ (fopencookie): Declare.
+ * libc/stdio/local.h (__sread, __swrite, __sseek, __sclose)
+ (__sseek64, __swrite64): Fix prototypes.
+ [__SCLE]: Pull in setmode declaration.
+ * libc/stdio/stdio.c (__sread, __swrite, __sseek, __sclose): Fix
+ reentrancy.
+ * libc/stdio64/stdio64.c (__sseek64_r, __swrite64_r): Delete.
+ (__sseek64, __swrite64): Fix reentrancy.
+ * libc/stdio/fseek.c (_fseek_r): Account for overflow, and fix
+ reentrancy.
+ * libc/stdio/ftell.c (_ftell_r): Likewise.
+ * libc/stdio/flags.c (__sflags): Don't lose __SAPP on "a+".
+ * libc/stdio/fclose.c (_fclose_r): Fix reentrancy.
+ * libc/stdio/freopen.c (_freopen_r): Likewise.
+ * libc/stdio/fvwrite.c (__sfvwrite_r): Likewise.
+ * libc/stdio/refill.c (__srefill_r): Likewise.
+ * libc/stdio/siscanf.c (eofread): Likewise.
+ * libc/stdio/sscanf.c (eofread): Likewise.
+ * libc/stdio/vsiscanf.c (eofread1): Likewise.
+ * libc/stdio/vsscanf.c (eofread1): Likewise.
+ * libc/stdio64/freopen64.c (_freopen64_r): Likewise.
+ * libc/stdio64/fseeko64.c (_fseeko64_r): Likewise.
+ * libc/stdio64/ftello64.c (_ftello64_r): Likewise.
+ * libc/stdio/fflush.c (fflush): Improve reentrancy, although more
+ could be fixed.
+ * libc/stdio/fopencookie.c (_fopencookie_r, fopencookie): New file.
+ * libc/stdio/funopen.c (_funopen_r, funopen): New file.
+ * libc/stdio/Makefile.am (ELIX_4_SOURCES, CHEWOUT_FILES): Build
+ new files.
+ * libc/stdio/Makefile.in: Regenerate.
+
+2007-05-29 Eric Blake <ebb9@byu.net>
+
+ Avoid more compiler warnings.
+ * libc/stdlib/btowc.c: Add missing header.
+ * libc/stdlib/getopt.c (getopt_internal): Initialize variable.
+ * libc/stdlib/system.c (do_system) [__CYGWIN__]: Add declaration.
+ * libc/stdlib/wctob.c: Add missing header.
+ * libc/string/strcpy.c (strcpy): Avoid warnings.
+ * libc/string/strrchr.c (strrchr): Likewise.
+
+2007-05-29 Corinna Vinschen <corinna@vinschen.de>
+
+ * libc/argz/argz_add_sep.c (argz_add_sep): Handle empty string
+ argument.
+ * libc/argz/argz_append.c (argz_append): Handle empty buf argument.
+ * libc/argz/argz_create_sep.c (argz_create_sep): Return (NULL, 0)
+ on empty input strings.
+ * libc/argz/argz_extract.c (argz_extract): Check argz_len before
+ looping through argz.
+ * libc/argz/argz_stringify.c (argz_stringify): Ditto.
+
+2007-05-27 Brian Dessent <brian@dessent.net>
+
+ * libc/stdio/vfprintf.c (_VFPRINTF_R): Populate 'ox' when
+ handling %p.
+
+2007-05-25 Eric Blake <ebb9@byu.net>
+
+ * libc/stdio/rewind.c (rewind): Fix regression of 2003-08-22.
+
+2007-05-24 Steve Ellcey <sje@cup.hp.com>
+ Charles Wilson <libtool@cwilson.fastmail.fm>
+
+ * libtool.m4: removed
+ * configure.in: invoke _LD_DECL_SED before conditionally initializing
+ libtool. Move AC_PROG_AWK outside conditional.
+ * libc/sys/linux/configure.in: Ditto.
+ * libc/sys/linux/linuxthreads/configure.in: Ditto.
+ * libc/sys/linux/linuxthreads/machine/i386/configure.in: Ditto.
+ * libc/sys/linux/machine/i386/configure.in: Ditto.
+
+ * iconvdata/configure.in: invoke _LD_DECL_SED before conditionally
+ initializing libtool.
+ * libc/configure.in: Ditto.
+ * libc/machine/configure.in: Ditto.
+ * libc/machine/i386/configure.in: Ditto.
+ * libc/sys/configure.in: Ditto.
+ * libc/sys/linux/linuxthreads/machine/configure.in: Ditto.
+ * libc/sys/linux/machine/configure.in: Ditto.
+ * libm/configure.in: Ditto.
+ * libm/machine/configure.in: Ditto.
+
+ * Makefile.am: Ensure toplevel is included in ACLOCAL_AMFLAGS.
+ * doc/Makefile.am: Ditto.
+ * iconvdata/Makefile.am: Ditto.
+ * libc/Makefile.am: Ditto.
+ * libc/machine/Makefile.am: Ditto.
+ * libc/machine/a29k/Makefile.am: Ditto.
+ * libc/machine/arm/Makefile.am: Ditto.
+ * libc/machine/bfin/Makefile.am: Ditto.
+ * libc/machine/cris/Makefile.am: Ditto.
+ * libc/machine/crx/Makefile.am: Ditto.
+ * libc/machine/d10v/Makefile.am: Ditto.
+ * libc/machine/d30v/Makefile.am: Ditto.
+ * libc/machine/fr30/Makefile.am: Ditto.
+ * libc/machine/frv/Makefile.am: Ditto.
+ * libc/machine/h8300/Makefile.am: Ditto.
+ * libc/machine/h8500/Makefile.am: Ditto.
+ * libc/machine/hppa/Makefile.am: Ditto.
+ * libc/machine/i386/Makefile.am: Ditto.
+ * libc/machine/i960/Makefile.am: Ditto.
+ * libc/machine/iq2000/Makefile.am: Ditto.
+ * libc/machine/m32c/Makefile.am: Ditto.
+ * libc/machine/m32r/Makefile.am: Ditto.
+ * libc/machine/m68hc11/Makefile.am: Ditto.
+ * libc/machine/m68k/Makefile.am: Ditto.
+ * libc/machine/m88k/Makefile.am: Ditto.
+ * libc/machine/mips/Makefile.am: Ditto.
+ * libc/machine/mn10200/Makefile.am: Ditto.
+ * libc/machine/mn10300/Makefile.am: Ditto.
+ * libc/machine/mt/Makefile.am: Ditto.
+ * libc/machine/necv70/Makefile.am: Ditto.
+ * libc/machine/powerpc/Makefile.am: Ditto.
+ * libc/machine/sh/Makefile.am: Ditto.
+ * libc/machine/sparc/Makefile.am: Ditto.
+ * libc/machine/spu/Makefile.am: Ditto.
+ * libc/machine/tic4x/Makefile.am: Ditto.
+ * libc/machine/tic80/Makefile.am: Ditto.
+ * libc/machine/v850/Makefile.am: Ditto.
+ * libc/machine/w65/Makefile.am: Ditto.
+ * libc/machine/xscale/Makefile.am: Ditto.
+ * libc/machine/xstormy16/Makefile.am: Ditto.
+ * libc/machine/z8k/Makefile.am: Ditto.
+ * libc/sys/Makefile.am: Ditto.
+ * libc/sys/a29khif/Makefile.am: Ditto.
+ * libc/sys/arc/Makefile.am: Ditto.
+ * libc/sys/arm/Makefile.am: Ditto.
+ * libc/sys/d10v/Makefile.am: Ditto.
+ * libc/sys/decstation/Makefile.am: Ditto.
+ * libc/sys/h8300hms/Makefile.am: Ditto.
+ * libc/sys/h8500hms/Makefile.am: Ditto.
+ * libc/sys/linux/Makefile.am: Ditto.
+ * libc/sys/linux/linuxthreads/Makefile.am: Ditto.
+ * libc/sys/linux/linuxthreads/machine/Makefile.am: Ditto.
+ * libc/sys/linux/linuxthreads/machine/i386/Makefile.am: Ditto.
+ * libc/sys/linux/machine/Makefile.am: Ditto.
+ * libc/sys/linux/machine/i386/Makefile.am: Ditto.
+ * libc/sys/m88kbug/Makefile.am: Ditto.
+ * libc/sys/mmixware/Makefile.am: Ditto.
+ * libc/sys/netware/Makefile.am: Ditto.
+ * libc/sys/rdos/Makefile.am: Ditto.
+ * libc/sys/rtems/Makefile.am: Ditto.
+ * libc/sys/sh/Makefile.am: Ditto.
+ * libc/sys/sparc64/Makefile.am: Ditto.
+ * libc/sys/sun4/Makefile.am: Ditto.
+ * libc/sys/sysmec/Makefile.am: Ditto.
+ * libc/sys/sysnec810/Makefile.am: Ditto.
+ * libc/sys/sysnecv850/Makefile.am: Ditto.
+ * libc/sys/sysvi386/Makefile.am: Ditto.
+ * libc/sys/sysvnecv70/Makefile.am: Ditto.
+ * libc/sys/tic80/Makefile.am: Ditto.
+ * libc/sys/w65/Makefile.am: Ditto.
+ * libc/sys/z8ksim/Makefile.am: Ditto.
+ * libm/Makefile.am: Ditto.
+ * libm/machine/Makefile.am: Ditto.
+ * libm/machine/i386/Makefile.am: Ditto.
+ * libm/machine/spu/Makefile.am: Ditto.
+
+ * aclocal.m4: Regenerate.
+ * iconvdata/aclocal.m4: Regenerate.
+ * libc/aclocal.m4: Regenerate.
+ * libc/machine/aclocal.m4: Regenerate.
+ * libc/machine/i386/aclocal.m4: Regenerate.
+ * libc/sys/aclocal.m4: Regenerate.
+ * libc/sys/linux/aclocal.m4: Regenerate.
+ * libc/sys/linux/linuxthreads/aclocal.m4: Regenerate.
+ * libc/sys/linux/linuxthreads/machine/aclocal.m4: Regenerate.
+ * libc/sys/linux/linuxthreads/machine/i386/aclocal.m4: Regenerate.
+ * libc/sys/linux/machine/aclocal.m4: Regenerate.
+ * libc/sys/linux/machine/i386/aclocal.m4: Regenerate.
+ * libm/aclocal.m4: Regenerate.
+ * libm/machine/aclocal.m4: Regenerate.
+ * libm/machine/i386/aclocal.m4: Regenerate.
+
+ * Makefile.in: Regenerate.
+ * doc/Makefile.in: Regenerate.
+ * iconvdata/Makefile.in: Regenerate.
+ * libc/Makefile.in: Regenerate.
+ * libc/argz/Makefile.in: Regenerate.
+ * libc/ctype/Makefile.in: Regenerate.
+ * libc/errno/Makefile.in: Regenerate.
+ * libc/iconv/Makefile.in: Regenerate.
+ * libc/iconv/ccs/Makefile.in: Regenerate.
+ * libc/iconv/ccs/binary/Makefile.in: Regenerate.
+ * libc/iconv/ces/Makefile.in: Regenerate.
+ * libc/iconv/lib/Makefile.in: Regenerate.
+ * libc/locale/Makefile.in: Regenerate.
+ * libc/machine/Makefile.in: Regenerate.
+ * libc/machine/a29k/Makefile.in: Regenerate.
+ * libc/machine/arm/Makefile.in: Regenerate.
+ * libc/machine/bfin/Makefile.in: Regenerate.
+ * libc/machine/cris/Makefile.in: Regenerate.
+ * libc/machine/crx/Makefile.in: Regenerate.
+ * libc/machine/d10v/Makefile.in: Regenerate.
+ * libc/machine/d30v/Makefile.in: Regenerate.
+ * libc/machine/fr30/Makefile.in: Regenerate.
+ * libc/machine/frv/Makefile.in: Regenerate.
+ * libc/machine/h8300/Makefile.in: Regenerate.
+ * libc/machine/h8500/Makefile.in: Regenerate.
+ * libc/machine/hppa/Makefile.in: Regenerate.
+ * libc/machine/i386/Makefile.in: Regenerate.
+ * libc/machine/i960/Makefile.in: Regenerate.
+ * libc/machine/iq2000/Makefile.in: Regenerate.
+ * libc/machine/m32c/Makefile.in: Regenerate.
+ * libc/machine/m32r/Makefile.in: Regenerate.
+ * libc/machine/m68hc11/Makefile.in: Regenerate.
+ * libc/machine/m68k/Makefile.in: Regenerate.
+ * libc/machine/m88k/Makefile.in: Regenerate.
+ * libc/machine/mips/Makefile.in: Regenerate.
+ * libc/machine/mn10200/Makefile.in: Regenerate.
+ * libc/machine/mn10300/Makefile.in: Regenerate.
+ * libc/machine/mt/Makefile.in: Regenerate.
+ * libc/machine/necv70/Makefile.in: Regenerate.
+ * libc/machine/powerpc/Makefile.in: Regenerate.
+ * libc/machine/sh/Makefile.in: Regenerate.
+ * libc/machine/sparc/Makefile.in: Regenerate.
+ * libc/machine/spu/Makefile.in: Regenerate.
+ * libc/machine/tic4x/Makefile.in: Regenerate.
+ * libc/machine/tic80/Makefile.in: Regenerate.
+ * libc/machine/v850/Makefile.in: Regenerate.
+ * libc/machine/w65/Makefile.in: Regenerate.
+ * libc/machine/xscale/Makefile.in: Regenerate.
+ * libc/machine/xstormy16/Makefile.in: Regenerate.
+ * libc/machine/z8k/Makefile.in: Regenerate.
+ * libc/misc/Makefile.in: Regenerate.
+ * libc/posix/Makefile.in: Regenerate.
+ * libc/reent/Makefile.in: Regenerate.
+ * libc/search/Makefile.in: Regenerate.
+ * libc/signal/Makefile.in: Regenerate.
+ * libc/stdio/Makefile.in: Regenerate.
+ * libc/stdio64/Makefile.in: Regenerate.
+ * libc/stdlib/Makefile.in: Regenerate.
+ * libc/string/Makefile.in: Regenerate.
+ * libc/sys/Makefile.in: Regenerate.
+ * libc/sys/a29khif/Makefile.in: Regenerate.
+ * libc/sys/arc/Makefile.in: Regenerate.
+ * libc/sys/arm/Makefile.in: Regenerate.
+ * libc/sys/d10v/Makefile.in: Regenerate.
+ * libc/sys/decstation/Makefile.in: Regenerate.
+ * libc/sys/h8300hms/Makefile.in: Regenerate.
+ * libc/sys/h8500hms/Makefile.in: Regenerate.
+ * libc/sys/linux/Makefile.in: Regenerate.
+ * libc/sys/linux/argp/Makefile.in: Regenerate.
+ * libc/sys/linux/cmath/Makefile.in: Regenerate.
+ * libc/sys/linux/dl/Makefile.in: Regenerate.
+ * libc/sys/linux/iconv/Makefile.in: Regenerate.
+ * libc/sys/linux/intl/Makefile.in: Regenerate.
+ * libc/sys/linux/linuxthreads/Makefile.in: Regenerate.
+ * libc/sys/linux/linuxthreads/machine/Makefile.in: Regenerate.
+ * libc/sys/linux/linuxthreads/machine/i386/Makefile.in: Regenerate.
+ * libc/sys/linux/machine/Makefile.in: Regenerate.
+ * libc/sys/linux/machine/i386/Makefile.in: Regenerate.
+ * libc/sys/linux/net/Makefile.in: Regenerate.
+ * libc/sys/linux/stdlib/Makefile.in: Regenerate.
+ * libc/sys/m88kbug/Makefile.in: Regenerate.
+ * libc/sys/mmixware/Makefile.in: Regenerate.
+ * libc/sys/netware/Makefile.in: Regenerate.
+ * libc/sys/rdos/Makefile.in: Regenerate.
+ * libc/sys/rtems/Makefile.in: Regenerate.
+ * libc/sys/sh/Makefile.in: Regenerate.
+ * libc/sys/sparc64/Makefile.in: Regenerate.
+ * libc/sys/sun4/Makefile.in: Regenerate.
+ * libc/sys/sysmec/Makefile.in: Regenerate.
+ * libc/sys/sysnec810/Makefile.in: Regenerate.
+ * libc/sys/sysnecv850/Makefile.in: Regenerate.
+ * libc/sys/sysvi386/Makefile.in: Regenerate.
+ * libc/sys/sysvnecv70/Makefile.in: Regenerate.
+ * libc/sys/tic80/Makefile.in: Regenerate.
+ * libc/sys/w65/Makefile.in: Regenerate.
+ * libc/sys/z8ksim/Makefile.in: Regenerate.
+ * libc/syscalls/Makefile.in: Regenerate.
+ * libc/time/Makefile.in: Regenerate.
+ * libc/unix/Makefile.in: Regenerate.
+ * libm/Makefile.in: Regenerate.
+ * libm/common/Makefile.in: Regenerate.
+ * libm/machine/Makefile.in: Regenerate.
+ * libm/machine/i386/Makefile.in: Regenerate.
+ * libm/machine/spu/Makefile.in: Regenerate.
+ * libm/math/Makefile.in: Regenerate.
+ * libm/mathfp/Makefile.in: Regenerate.
+
+ * configure: Regenerate.
+ * iconvdata/configure: Regenerate.
+ * libc/configure: Regenerate.
+ * libc/machine/configure: Regenerate.
+ * libc/machine/i386/configure: Regenerate.
+ * libc/sys/configure: Regenerate.
+ * libc/sys/linux/configure: Regenerate.
+ * libc/sys/linux/linuxthreads/configure: Regenerate.
+ * libc/sys/linux/linuxthreads/machine/configure: Regenerate.
+ * libc/sys/linux/linuxthreads/machine/i386/configure: Regenerate.
+ * libc/sys/linux/machine/configure: Regenerate.
+ * libc/sys/linux/machine/i386/configure: Regenerate.
+ * libm/configure: Regenerate.
+ * libm/machine/configure: Regenerate.
+ * libm/machine/i386/configure: Regenerate.
+
+2007-05-23 Eric Blake <ebb9@byu.net>
+
+ * libc/stdio/vfprintf.c (_VFPRINTF_R): Don't truncate %p when
+ sizeof(void*) is 8 but sizeof(long) is 4.
+ * libc/stdio/vfscanf.c (__SVFSCANF_R): Likewise. Fix %i scanning
+ of "-0x". Support "-nan" and "inf" for %e. Audit usage of ungetc
+ to fix reentrancy and bug on encoding error in multibyte locales.
+ Always return EOF on read error.
+
+2007-05-23 Patrick Mansfield <patmans@us.ibm.com>
+
+ * libc/machine/spu/sys/syscall.h: Update the __send_to_ppe
+ prototype.
+ * libc/machine/spu/fclose.c: Use the __send_to_ppe return value
+ instead of the slot 0 value, remove any now unused variables, and
+ for some cases, now store the result in an int vs int*.
+ * libc/machine/spu/feof.c: Ditto.
+ * libc/machine/spu/ferror.c: Ditto.
+ * libc/machine/spu/fflush.c: Ditto.
+ * libc/machine/spu/fgetc.c: Ditto.
+ * libc/machine/spu/fgetpos.c: Ditto.
+ * libc/machine/spu/fgets.c: Ditto.
+ * libc/machine/spu/fileno.c: Ditto.
+ * libc/machine/spu/fopen.c: Ditto.
+ * libc/machine/spu/fprintf.c: Ditto.
+ * libc/machine/spu/fputc.c: Ditto.
+ * libc/machine/spu/fputs.c: Ditto.
+ * libc/machine/spu/fread.c: Ditto.
+ * libc/machine/spu/freopen.c: Ditto.
+ * libc/machine/spu/fscanf.c: Ditto.
+ * libc/machine/spu/fseek.c: Ditto.
+ * libc/machine/spu/fsetpos.c: Ditto.
+ * libc/machine/spu/ftell.c: Ditto.
+ * libc/machine/spu/fwrite.c: Ditto.
+ * libc/machine/spu/getc.c: Ditto.
+ * libc/machine/spu/getchar.c: Ditto.
+ * libc/machine/spu/gets.c: Ditto.
+ * libc/machine/spu/printf.c: Ditto.
+ * libc/machine/spu/putc.c: Ditto.
+ * libc/machine/spu/putchar.c: Ditto.
+ * libc/machine/spu/puts.c: Ditto.
+ * libc/machine/spu/remove.c: Ditto.
+ * libc/machine/spu/rename.c: Ditto.
+ * libc/machine/spu/scanf.c: Ditto.
+ * libc/machine/spu/setvbuf.c: Ditto.
+ * libc/machine/spu/snprintf.c: Ditto.
+ * libc/machine/spu/sprintf.c: Ditto.
+ * libc/machine/spu/sscanf.c: Ditto.
+ * libc/machine/spu/tmpfile.c: Ditto.
+ * libc/machine/spu/tmpnam.c: Ditto.
+ * libc/machine/spu/ungetc.c: Ditto.
+ * libc/machine/spu/vfprintf.c: Ditto.
+ * libc/machine/spu/vfscanf.c: Ditto.
+ * libc/machine/spu/vprintf.c: Ditto.
+ * libc/machine/spu/vscanf.c: Ditto.
+ * libc/machine/spu/vsnprintf.c: Ditto.
+ * libc/machine/spu/vsprintf.c: Ditto.
+ * libc/machine/spu/vsscanf.c: Ditto.
+
+2007-05-23 Eric Blake <ebb9@byu.net>
+
+ * libc/stdio/vfscanf.c (__SVFSCANF_R): Support scanf(%1$s).
+ Avoid warning when !FLOATING_POINT.
+ * libc/stdio/vfprintf.c (_VFPRINTF_R): Simplify _NO_POS_ARGS
+ slightly.
+
+2007-05-23 Corinna Vinschen <vinschen@redhat.com>
+
+ * libc/argz/argz_create_sep.c (argz_create_sep): Initialize *argz_len
+ to zero.
+ * libc/include/argz.h: Guard against multiple inclusion. Guard for
+ use with C++.
+
+2007-05-18 Eric Blake <ebb9@byu.net>
+
+ * libc/stdio/vfprintf.c [_WANT_IO_LONG_LONG]: Allow non-gcc
+ compilers.
+ * libc/stdio/vfscanf.c: Likewise.
+
+2007-05-17 Cary R. <cygcary <at> yahoo.com>
+
+ * libm/math/w_atan2.c: Fix atan2 to be consistent with glibc
+ (atan2(+0,-0), atan2(-0,-0) and atan(-0,+0))
+ * libm/math/wf_atan2.c: Ditto.
+
+2007-05-17 Yaakov Selkowitz <yselkowitz <at> users.sourceforge.net>
+
+ * libm/common/Makefile.am: Add support for exp10, exp10f,
+ pow10, and pow10f functions.
+ * libm/common/Makefile.in: Regenerated.
+ * libm/common/s_pow10.c: New file.
+ * libm/common/sf_pow10.c: Ditto.
+ * libm/common/s_exp10.c: Ditto.
+ * libm/common/sf_exp10.c: Ditto.
+ * libc/include/math.h [!pow10]: New pow10 prototype.
+ [!pow10f]: New pow10f prototype.
+ [!exp10]: New exp10 prototype.
+ [!exp10f]: New exp10f prototype.
+
+2007-05-17 Charles Wilson <cygwin@...>
+
+ * stdio/tmpfile.c: Include <sys/stat.h>.
+ * stdio64/tmpfile64.c: Ditto.
+
+2007-05-16 Eric Blake <ebb9@byu.net>
+
+ Close security hole in tmpfile.
+ * libc/stdio/tmpfile.c (_tmpfile_r): Avoid window between filename
+ generation and opening the fd.
+ * libc/stdio64/tmpfile64.c (_tmpfile64_r): Likewise.
+
+ * libc/include/math.h (INFINITY, NAN, FP_ILOGB0, FP_ILOGBNAN)
+ (MATH_ERRNO, MATH_ERREXCEPT, math_errhandling): Add macros
+ required by POSIX.
+ * libc/stdlib/ldtoa.c (USE_INFINITY): Rename from INFINITY, to
+ avoid clash with <math.h>.
+
+ * libc/stdlib/wctomb_r.c (_wctomb_r): Avoid gcc warnings on cygwin.
+ * libc/search/hash.c (__hash_open): Likewise.
+
+2007-05-14 Eric Blake <ebb9@byu.net>
+
+ Reduce stack size of *printf.
+ * libc/stdio/vfprintf.c (_VFPRINTF_R): Fix use of decimal point
+ in %f. Avoid malloc when possible for %S.
+ (BUF): Improve stack locality by using smaller size.
+ (MAXEXPLEN, _PRINTF_FLOAT_TYPE): Define.
+ (exponent): Use smaller stack size.
+
+2007-05-11 Eric Blake <ebb9@byu.net>
+
+ Minimize printf/scanf size on platforms that don't need C99.
+ * acconfig.h (_WANT_IO_C99_FORMATS): New macro.
+ * newlib.hin (_WANT_IO_C99_FORMATS): Likewise.
+ * configure.in (newlib-io-c99-formats): New configure option.
+ (_WANT_IO_C99_FORMATS): Define appropriately.
+ * configure.host (*-linux*, cygwin): Default c99-formats to yes.
+ * libc/stdio/vfprintf.c (_VFPRINTF_R) [!_WANT_IO_C99_FORMATS]:
+ Cripple ' flag; hh, z, j, t sizes; a, A, F, C, S specifiers.
+ * libc/stdio/vfscanf.c (_VFSCANF_R) [!_WANT_IO_C99_FORMATS]:
+ Likewise.
+ * configure: Regenerate.
+
+ * libc/stdio/vfprintf.c (_VFPRINTF_R, cvt, exponent, chclass)
+ (get_arg): Support '%a' and '%A'.
+
+2007-05-09 Eric Blake <ebb9@byu.net>
+
+ Allow zero size with non-null buf in *asnprintf.
+ * libc/stdio/asnprintf.c (_asnprintf_r, asnprintf): Avoid free'ing
+ user's buf.
+ * libc/stdio/asniprintf.c (_asniprintf_r, asniprintf): Likewise.
+ * libc/stdio/vasniprintf.c (_vasniprintf_r): Likewise.
+ * libc/stdio/vasnprintf.c (_vasnprintf_r): Likewise.
+
+2007-05-07 Charles Wilson <cygwin@...>
+
+ * libc/stdio/vfprintf.c: Fix typo in comments that breaks docs.
+
+2007-05-03 Eric Blake <ebb9@byu.net>
+
+ Add support for asnprintf, and improve *printf documentation.
+ * libc/stdio/Makefile.am (ELIX_SOURCES): Rename...
+ (ELIX_2_SOURCES): ...to this.
+ (ELIX_4_SOURCES): Add new variable. Build asnprintf.
+ (GENERAL_SOURCES): Move dprintf to ELIX_4_SOURCES.
+ (CHEWOUT_FILES): Include diprintf in documentation.
+ * libc/stdio/Makefile.in: Regenerate.
+ * libc/stdio/diprintf.c: Improve documentation.
+ * libc/stdio/dprintf.c: Likewise.
+ * libc/stdio/siprintf.c: Likewise.
+ * libc/stdio/sprintf.c: Likewise.
+ * libc/stdio/vfprintf.c: Likewise.
+ * libc/stdio/viprintf.c: Likewise.
+ * libc/stdio/vsniprintf.c: Consolidate documentation.
+ * libc/stdio/asiprintf.c: Refer to documentation.
+ * libc/stdio/asprintf.c: Likewise.
+ * libc/stdio/fiprintf.c: Likewise.
+ * libc/stdio/fprintf.c: Likewise.
+ * libc/stdio/iprintf.c: Likewise.
+ * libc/stdio/printf.c: Likewise.
+ * libc/stdio/sniprintf.c: Likewise.
+ * libc/stdio/vdiprintf.c: Likewise.
+ * libc/stdio/vdprintf.c: Likewise.
+ * libc/stdio/vsiprintf.c: Likewise.
+ * libc/stdio/fvwrite.c (__sfvwrite_r): Handle asnprintf.
+ * libc/stdio/asniprintf.c (asniprintf, _asniprintf_r): New file.
+ * libc/stdio/asnprintf.c (asnprintf, _asnprintf_r): New file.
+ * libc/stdio/vasniprintf.c (vasniprintf, _vasniprintf_r): New
+ file.
+ * libc/stdio/vasnprintf.c (vasnprintf, _vasnprintf_r): New file.
+ * libc/stdio/vdprintf.c (_vdprintf_r): Rewrite to avoid malloc in
+ typical case.
+ * libc/stdio/vdiprintf.c (_vdiprintf_r): Likewise.
+ * libc/include/stdio.h: Add prototypes for new functions; sort
+ existing functions.
+
+2007-05-03 Kazu Hirata <kazu@codesourcery.com>
+
+ * libc/machine/m68k/Makefile.am (lib_a_SOURCES): Add memcpy.S
+ and memset.S.
+ * libc/machine/m68k/Makefile.in: Regenerate.
+ * libc/machine/m68k/memcpy.S: Use sub.l followed by dbra.
+ * libc/machine/m68k/memset.S: Likewise.
+
+2007-05-01 Eric Blake <ebb9@byu.net>
+
+ * libc/stdio64/local64.h: Delete, move contents to...
+ * libc/stdio/local.h: ...here.
+ * libc/stdio64/fdopen64.c: Update includes.
+ * libc/stdio64/fopen64.c: Likewise.
+ * libc/stdio64/freopen64.c: Likewise.
+ * libc/stdio64/fseeko64.c: Likewise.
+ * libc/stdio64/ftello64.c: Likewise.
+ * libc/stdio/findfp.c (std) [__LARGE64_FILES]: Open stdin, stdout,
+ and stderr with 64-bit offset.
+ * libc/stdio/fseek.c (_fseek_r): Avoid compile warning.
+ * libc/stdio/makebuf.c (__smakebuf_r): Likewise.
+ * libc/stdio/mktemp.c (_gettemp): Likewise.
+
+2007-05-01 Cary R. <cygcary <at> yahoo.com>
+
+ * libm/math/e_pow.c: Fix to be consistent with glibc with regards
+ to treatment of NaN and +-inf arguments.
+ * libm/math/ef_pow.c: Ditto.
+ * libm/math/w_pow.c: Ditto.
+ * libm/math/wf_pow.c: Ditto.
+ * libm/math/w_acos.c: Fix domain errors to return NaN.
+ * libm/math/w_asin.c: Ditto.
+ * libm/math/wf_acos.c: Ditto.
+ * libm/math/wf_asin.c: Ditto.
+ * libm/math/w_log.c: Fix to return NaN for negative number inputs.
+ * libm/math/wf_log.c: Ditto.
+ * libm/math/wf_log10.c: Ditto.
+ * libm/math/w_log10.c: Ditto.
+
+2007-04-27 Jeff Johnston <jjohnstn@redhat.com>
+
+ * libc/machine/m68k/Makefile.am: Temporarily remove
+ memcpy.S and memset.S until logic can be confirmed for
+ !(__mcoldfile__) case.
+ * libc/machine/m68k/Makefile.in: Regenerated.
+
+2007-04-27 Kazu Hirata <kazu@codesourcery.com>
+
+ * libc/machine/m68k/Makefile.am (lib_a_SOURCES): Add memcpy.S
+ and memset.S.
+ * libc/machine/m68k/Makefile.in: Regenerate.
+ * libc/machine/m68k/memcpy.S, libc/machine/m68k/memset.S: New.
+
+2007-04-26 Patrick Mansfield <patmans@us.ibm.com>
+
+ * libc/include/ieeefp.h: use prefixed __ieeefp_ macros that can be
+ overridden via machine/ieeefp.h.
+ * libc/include/machine/ieeefp.h: Add SPU specific C99 and ieeefp
+ macros for isnan and related macros.
+ * libc/include/math.h: Allow C99 isfinite, isinf, and isnan to be
+ overridden via machine/ieeefp.h.
+ * libm/machine/spu/Makefile.am: Add new files.
+ * libm/machine/spu/Makefile.in: Autogenerate with new files.
+ * libm/machine/spu/sf_fpclassify.c: Add SPU specific __fpclassifyf.
+ * libm/machine/spu/sf_finite.c: Add SPU specific finitef.
+ * libm/machine/spu/sf_isinf.c: Add SPU specific isinff.
+ * libm/machine/spu/sf_isinff.c: Add SPU specific __isinff.
+ * libm/machine/spu/sf_isnan.c: Add SPU specific isnanf.
+ * libm/machine/spu/sf_isnanf.c: Add SPU specific __isnanf.
+ * libm/machine/spu/sf_nan.c: Add SPU specific nanf.
+
+2007-04-25 Jeff Johnston <jjohnstn@redhat.com>
+
+ * libm/common/s_fpclassify.c (__fpclassifyf): Move this to...
+ * libm/common/sf_fpclassify.c: ...here. New file.
+ * libm/common/Makefile.am: Add sf_fpclassify.c.
+ * libm/common/Makefile.in: Regenerated.
+
+2007-04-25 Patrick Mansfield <patmans@us.ibm.com>
+
+ * libc/machine/spu/sys/errno.h: New file, so spu errno values match
+ ppu linux values. This file is a copy of the cris/sys/errno.h plus
+ a few changes (see spu errno.h comments).
+
+2007-04-25 Eric Blake <ebb9@byu.net>
+
+ * libc/stdio/vfprintf.c (get_arg): Support %1$lc. Simplify types
+ that promote to int.
+
+2007-04-25 Patrick Mansfield <patmans@us.ibm.com>
+
+ * libm/machine/spu/headers/feholdexcept.h: Use *envp not env so
+ we clear the proper bits in the fpscr, and don't set some random ones.
+
+2007-04-24 Eric Blake <ebb9@byu.net>
+
+ * libc/stdio/vfprintf.c (_VFPRINTF_R): Don't zero pad on infinity
+ or NaN with %05f.
+
+ * libc/stdio/vfprintf.c (_VFPRINTF_R): Avoid multibyte when not
+ _MB_CAPABLE.
+
+ * libc/include/limits.h (NL_ARGMAX): Define a default value.
+ * libc/stdio/vfprintf.c (MAX_POS_ARGS): Define in terms of
+ NL_ARGMAX, if present.
+
+2007-04-23 Brian Dessent <brian@dessent.net>
+
+ * libc/stdio/vfprintf.c (_vfprintf_r): When the alternate-form flag
+ has been specified with types 'f', 'F', 'g', or 'G', ensure the
+ trailing decimal is printed.
+
+2007-04-23 Ralf Wildenhues <Ralf.Wildenhues <at> gmx.de>
+
+ * confsubdir.m4 (AC_CONFIG_SUBDIRS, _AC_OUTPUT_SUBDIRS): New
+ file. Override Autoconf-2.59's version of these macros with
+ fixed handling of multiple adjacent whitespace in arguments.
+ * aclocal.m4: Regenerated forcefully.
+ * configure: Ditto.
+ * Makefile.in: Ditto.
+ * libc/*Makefile.in: Ditto.
+ * libc/*aclocal.m4: Ditto.
+ * libc/*configure: Ditto.
+ * libm/*Makefile.in: Ditto.
+ * libm/*aclocal.m4: Ditto.
+ * libm/*configure: Ditto.
+
+2007-04-23 Jeff Johnston <jjohnstn@redhat.com>
+
+ * libc/sys/arc/dummy.S: Dummy file to force .S.o suffix rule.
+ * libc/sys/arc/Makefile.am: Add dummy.S to EXTRA_lib_a_SOURCES
+ and set lib_a_CCASFLAGS so crto.o will use .S.o default suffix rule.
+ * libc/sys/arc/Makefile.in: Regenerated.
+
+2007-04-17 Brian Dessent <brian@dessent.net>
+
+ * libc/stdio/sscanf.c: Update documentation comments.
+ * libc/stdio/vfscanf.c (__SVFSCANF_R): Handle j, t, and z modifiers.
+
+2007-04-12 Eric Blake <ebb9@byu.net>
+
+ * libc/stdio/vfprintf.c (_VFPRINTF_F, cvt): Don't confuse %F with %e.
+ (chclass): Recognize 'F', 'X', 'n', and not 'W'.
+ (get_arg): Handle %1$F, %1$n.
+
+2007-04-10 Eric Blake <ebb9@byu.net>
+
+ * libc/include/stdio.h (_ELIDABLE_INLINE): Work even when using
+ CFLAGS=-O0.
+
+2007-04-09 Eric Blake <ebb9@byu.net>
+
+ * libc/include/stdio.h: Add gcc format attributes to printf and
+ scanf families.
+
+2007-04-09 Joel Schopp <jschopp@austin.ibm.com>
+
+ * libc/machine/spu/strxfrm.c: Fix strxfrm so we still copy data
+ even if the passed in length n is shorter than the source string.
+ This matches both the non-spu specific and the glibc strxfrm
+ behaviour.
+
+2007-04-04 Mark Mitchell <mark@codesourcery.com>
+
+ * libc/stdlib/__call_atexit.c (__call_exitprocs): Handle atexit
+ functions registering additional atexit functions.
+
+ * testsuite/lib/flags.exp (newlib_include_flags): Drop
+ -I${newlib_dir}.
+
+2007-04-04 Patrick Mansfield <patmans@us.ibm.com>
+
+ * libc/machine/spu/sys/syscall.h: New file for __send_to_ppe
+ prototype.
+ * libc/machine/spu/c99ppe.h: Remove static version of send_to_ppe.
+ * libc/machine/spu/clearerr.c: Call __send_to_ppe vs send_to_ppe.
+ * libc/machine/spu/fclose.c: Ditto.
+ * libc/machine/spu/feof.c: Ditto.
+ * libc/machine/spu/ferror.c: Ditto.
+ * libc/machine/spu/fflush.c: Ditto.
+ * libc/machine/spu/fgetc.c: Ditto.
+ * libc/machine/spu/fgetpos.c: Ditto.
+ * libc/machine/spu/fgets.c: Ditto.
+ * libc/machine/spu/fileno.c: Ditto.
+ * libc/machine/spu/fopen.c: Ditto.
+ * libc/machine/spu/fprintf.c: Ditto.
+ * libc/machine/spu/fputc.c: Ditto.
+ * libc/machine/spu/fputs.c: Ditto.
+ * libc/machine/spu/fread.c: Ditto.
+ * libc/machine/spu/freopen.c: Ditto.
+ * libc/machine/spu/fscanf.c: Ditto.
+ * libc/machine/spu/fseek.c: Ditto.
+ * libc/machine/spu/fsetpos.c: Ditto.
+ * libc/machine/spu/ftell.c: Ditto.
+ * libc/machine/spu/fwrite.c: Ditto.
+ * libc/machine/spu/getc.c: Ditto.
+ * libc/machine/spu/getchar.c: Ditto.
+ * libc/machine/spu/gets.c: Ditto.
+ * libc/machine/spu/perror.c: Ditto.
+ * libc/machine/spu/printf.c: Ditto.
+ * libc/machine/spu/putc.c: Ditto.
+ * libc/machine/spu/putchar.c: Ditto.
+ * libc/machine/spu/puts.c: Ditto.
+ * libc/machine/spu/remove.c: Ditto.
+ * libc/machine/spu/rename.c: Ditto.
+ * libc/machine/spu/rewind.c: Ditto.
+ * libc/machine/spu/scanf.c: Ditto.
+ * libc/machine/spu/setbuf.c: Ditto.
+ * libc/machine/spu/setvbuf.c: Ditto.
+ * libc/machine/spu/snprintf.c: Ditto.
+ * libc/machine/spu/sprintf.c: Ditto.
+ * libc/machine/spu/sscanf.c: Ditto.
+ * libc/machine/spu/tmpfile.c: Ditto.
+ * libc/machine/spu/tmpnam.c: Ditto.
+ * libc/machine/spu/ungetc.c: Ditto.
+ * libc/machine/spu/vfprintf.c: Ditto.
+ * libc/machine/spu/vfscanf.c: Ditto.
+ * libc/machine/spu/vprintf.c: Ditto.
+ * libc/machine/spu/vscanf.c: Ditto.
+ * libc/machine/spu/vsnprintf.c: Ditto.
+ * libc/machine/spu/vsprintf.c: Ditto.
+ * libc/machine/spu/vsscanf.c: Ditto.
+
+2007-04-04 Jeff Johnston <jjohnstn@redhat.com>
+
+ * libc/argz/argz_insert.c: Add stddef.h to get ptrdiff_t type.
+
+2007-04-04 Eric Blake <ebb9@byu.net>
+
+ * libc/stdio/asiprintf.c (_asiprintf_r): Fix reentrancy.
+ (asiprintf): Avoid overhead.
+ * libc/stdio/asprintf.c (_asprintf_r): Fix reentrancy.
+ (asprintf): Avoid overhead.
+ * libc/stdio/diprintf.c (_diprintf_r, diprintf): New file.
+ * libc/stdio/dprintf.c (_dprintf_r, dprintf): Use _DEFUN.
+ * libc/stdio/fiprintf.c (_fiprintf_r): Add reentrant version.
+ (fiprintf): Avoid overhead.
+ * libc/stdio/fprintf.c (_fprintf_r): Add reentrant version.
+ (fprintf): Avoid overhead.
+ * libc/stdio/iprintf.c (_iprintf_r): Use _DEFUN.
+ (iprintf): Avoid overhead.
+ * libc/stdio/printf.c (_printf_r): Use _DEFUN.
+ (printf): Avoid overhead.
+ * libc/stdio/vasiprintf.c (vasiprintf): Reduce binary size.
+ * libc/stdio/vasprintf.c (vasprintf): Reduce binary size.
+ * libc/stdio/vdiprintf.c (_vdiprintf_r, vdiprintf): New file.
+ * libc/stdio/vdprintf.c (vdprintf): Avoid overhead.
+ * libc/stdio/vsiprintf.c (vsiprintf): Reduce binary size.
+ * libc/stdio/vsniprintf.c (vsniprintf): Reduce binary size.
+ * libc/stdio/vsnprintf.c (vsnprintf): Reduce binary size.
+ * libc/stdio/vsprintf.c (vsprintf): Reduce binary size.
+ * libc/stdio/Makefile.am (GENERAL_SOURCES): Add diprintf.c,
+ vdiprintf.c.
+ * libc/include/stdio.h (diprintf, _diprintf_r, vdiprintf)
+ (_vdiprintf_r, _fiprintf_r, _vfiprintf_r): Add prototypes.
+
+2007-03-30 Dave Korn <dave.korn@artimi.com>
+
+ * libc/include/stdio.h (_ELIDABLE_INLINE): New macro to conceal
+ conflicting inline semantics between C99 and GNU89.
+ (__sgetc_r): Replace static inline with _ELIDABLE_INLINE to be
+ compatible with -fkeep-inline-functions usage.
+ (__sputc_r): Likewise for consistency even though disabled.
+
+2007-03-29 Nick Clifton <nickc@redhat.com>
+
+ Reflect changes made to generic vfprintf.c:
+ * libc/machine/powerpc/vfprintf.c (__sprint): Rename to __sprint_r
+ and add a "struct reent *" argument.
+ (__sbprintf): Rename to __sbprintf_r, add a "struct reent *"
+ argument and call _VFPRINTF_R instead of VFPRINTF.
+ (_VFPRINTF_R): Add data pointer to call to cantwrite().
+ Fix uses of __sprint() and __sbprintf.
+
+2007-03-20 Nick Clifton <nickc@redhat.com>
+
+ Reflect changes made to generic vfprintf.c:
+ * libc/machine/powerpc/vfprintf.c (__sprint): Rename to __sprint_r
+ and add a "struct reent *" argument.
+ (__sbprintf): Rename to __sbprintf_r, add a "struct reent *"
+ argument and call _VFPRINTF_R instead of VFPRINTF.
+ (_VFPRINTF_R): Add data pointer to call to cantwrite().
+ Fix uses of __sprint() and __sbprintf.
+
+2007-03-16 Charles Wilson <cygwin@...>
+
+ * libc/argz/argz_insert.c: "before" pointer is
+ invalid after *argz realloc. Compute offset
+ between "before" and *argz, and use it after
+ reallocation instead.
+
+2007-03-16 Eric Blake <ebb9@byu.net>
+
+ * libc/stdio64/fseek064.c (_fseeko64_r): Fix reentrancy.
+ * libc/stdio64/freopen64.c (_freopen64_r): Ditto.
+
+2007-03-15 Jeff Johnston <jjohnstn@redhat.com>
+
+ * configure.in: Add new --enable-newlib-reent-small option.
+ * configure: Regenerated.
+ * acconfig.h: Add _WANT_REENT_SMALL.
+ * newlib.hin: Regenerated minus PACKAGE macros to add
+ _WANT_REENT_SMALL macro.
+ * libc/include/sys/config.h[_WANT_REENT_SMALL]: Set _REENT_SMALL
+ if not already set.
+ * libc/stdio/fflush.c[_REENT_SMALL]: Return immediately if
+ there is no buffer.
+ * libc/stdio/local.h[_REENT_SMALL]: Fix CHECK_INIT macro to
+ use reentrant pointer passed in when resetting the file
+ pointer to one of the std streams.
+
+2007-03-15 Eric Blake <ebb9@byu.net>
+
+ * libc/stdio/local.h (cantwrite, FREEUB, FREELB): Make reentrant.
+ (__smakebuf): Rename...
+ (__smakebuf_r): to this.
+ * libc/stdio/fvwrite.h (__swsetup_r): Rename, from __swsetup.
+ * libc/stdio/makebuf.c (__smakebuf): Detect failed asprint
+ allocation, then rename...
+ (__smakebuf_r): ...to this and fix reentrancy.
+ * libc/stdio/wsetup.c (__swsetup): Detect failed asprintf
+ allocation, then rename...
+ (__swsetup_r): ...to this and fix reentrancy.
+ * libc/stdio/fseek.c (_fseek_r): Fix reentrancy.
+ * libc/stdio/refill.c (__srefill_r): Likewise.
+ * libc/stdio/fclose.c (_fclose_r): Likewise.
+ * libc/stdio/fread.c (_fread_r): Likewise.
+ * libc/stdio/freopen.c (_freopen_r): Likewise.
+ * libc/stdio/wbuf.c (__swbuf_r): Likewise.
+ * libc/stdio64/fseeko64.c (_fseeko64_r): Likewise.
+ * libc/stdio/fvwrite.c (__sfvwrite_r): Set errno properly on
+ failed asprintf allocation, and fix reentrancy.
+ * libc/stdio/snprintf.c (snprintf, _snprintf_r): Report overflow,
+ as required by POSIX.
+ * libc/stdio/sniprintf.c (sniprintf, _sniprintf_r): Likewise.
+ * libc/stdio/vsnprintf.c (vsnprintf, _vsnprintf_r): Likewise.
+ * libc/stdio/vsniprintf.c (vsniprintf, _vsniprintf_r): Likewise.
+
+2007-03-12 Eric Blake <ebb9@byu.net>
+
+ * libc/stdio/fvwrite.c (__sfvwrite_r): Fix reentrancy.
+ * libc/stdio/vasprintf.c (vasprintf, _vasprintf_r): Pass failed
+ allocation to caller.
+ * libc/stdio/asprintf.c (_asprintf_r, asprintf): Likewise.
+ * libc/stdio/asiprintf.c (_asiprintf_r, asiprintf): Likewise.
+ * libc/stdio/vasiprintf.c (vasiprintf, _vasiprintf_r): Likewise.
+
+2007-02-23 Jeff Johnston <jjohnstn@redhat.com>
+
+ * libm/math/w_pow.c: Fix typo in documentation comment.
+
+2007-02-21 Patrick Mansfield <patmans@us.ibm.com>
+
+ * libc/reent/timer.c: Removed (split into two new files).
+ * libc/reent/timesr.c: New file for _times_r.
+ * libc/reent/gettimeofdayr.c: New file out _gettimeofday_r.
+ * reent/Makefile.in: Remove timer.c, add timesr.c and
+ gettimeofdayr.c.
+ * libc/reent/Makefile.am: Regenerate.
+
+2007-02-20 Patrick Mansfield <patmans@us.ibm.com>
+
+ * configure.host: Build SPU with default_newlib_atexit_dynamic_alloc="no".
+
+2007-02-20 Kazunori Asayama <asayama@sm.sony.co.jp>
+
+ * libc/machine/spu/Makefile.am: Add new objects.
+ * libc/machine/spu/Makefile.in: Regenerated.
+ * libc/machine/spu/fiprintf.c: New file. Add implementation of
+ integer-only version.
+ * libc/machine/spu/fiscanf.c: Ditto.
+ * libc/machine/spu/iprintf.c: Ditto.
+ * libc/machine/spu/iscanf.c: Ditto.
+ * libc/machine/spu/siprintf.c: Ditto.
+ * libc/machine/spu/siscanf.c: Ditto.
+ * libc/machine/spu/sniprintf.c: Ditto.
+ * libc/machine/spu/vfiprintf.c: Ditto.
+ * libc/machine/spu/vfiscanf.c: Ditto.
+ * libc/machine/spu/viprintf.c: Ditto.
+ * libc/machine/spu/viscanf.c: Ditto.
+ * libc/machine/spu/vsiprintf.c: Ditto.
+ * libc/machine/spu/vsiscanf.c: Ditto.
+ * libc/machine/spu/vsniprintf.c: Ditto.
+ * libc/machine/spu/fprintf.c: Add support for integer-only
+ version.
+ * libc/machine/spu/fscanf.c: Ditto.
+ * libc/machine/spu/printf.c: Ditto.
+ * libc/machine/spu/scanf.c: Ditto.
+ * libc/machine/spu/snprintf.c: Ditto.
+ * libc/machine/spu/sprintf.c: Ditto.
+ * libc/machine/spu/sscanf.c: Ditto.
+ * libc/machine/spu/vfprintf.c: Ditto.
+ * libc/machine/spu/vfscanf.c: Ditto.
+ * libc/machine/spu/vprintf.c: Ditto.
+ * libc/machine/spu/vscanf.c: Ditto.
+ * libc/machine/spu/vsnprintf.c: Ditto.
+ * libc/machine/spu/vsprintf.c: Ditto.
+ * libc/machine/spu/vsscanf.c: Ditto.
+
+2007-02-20 Kazunori Asayama <asayama@sm.sony.co.jp>
+
+ * libc/include/stdio.h: Add declaration for vsiprintf.
+
+2007-02-14 Patrick Mansfield <patmans@us.ibm.com>
+
+ Add a floating point environment for SPU (cell):
+
+ * configure.host: add libm_machine_dir=spu.
+ * libm/machine/configure: Add spu.
+ * libm/machine/configure.in: regenerated with spu added.
+ * libc/machine/spu/include/fenv.h: New file.
+ * libc/machine/spu/sys/fenv.h: Ditto.
+ * libm/machine/spu/Makefile.am: Ditto.
+ * libm/machine/spu/Makefile.in: Ditto.
+ * libm/machine/spu/aclocal.m4: Ditto.
+ * libm/machine/spu/configure: Ditto.
+ * libm/machine/spu/configure.in: Ditto.
+ * libm/machine/spu/fe_dfl_env.c: Ditto.
+ * libm/machine/spu/feclearexcept.c: Ditto.
+ * libm/machine/spu/fegetenv.c: Ditto.
+ * libm/machine/spu/fegetexceptflag.c: Ditto.
+ * libm/machine/spu/fegetround.c: Ditto.
+ * libm/machine/spu/feholdexcept.c: Ditto.
+ * libm/machine/spu/feraiseexcept.c: Ditto.
+ * libm/machine/spu/fesetenv.c: Ditto.
+ * libm/machine/spu/fesetexceptflag.c: Ditto.
+ * libm/machine/spu/fesetround.c: Ditto.
+ * libm/machine/spu/fetestexcept.c: Ditto.
+ * libm/machine/spu/feupdateenv.c: Ditto.
+ * libm/machine/spu/headers/feclearexcept.h: Ditto.
+ * libm/machine/spu/headers/fefpscr.h: Ditto.
+ * libm/machine/spu/headers/fegetenv.h: Ditto.
+ * libm/machine/spu/headers/fegetexceptflag.h: Ditto.
+ * libm/machine/spu/headers/fegetround.h: Ditto.
+ * libm/machine/spu/headers/feholdexcept.h: Ditto.
+ * libm/machine/spu/headers/feraiseexcept.h: Ditto.
+ * libm/machine/spu/headers/fesetenv.h: Ditto.
+ * libm/machine/spu/headers/fesetexceptflag.h: Ditto.
+ * libm/machine/spu/headers/fesetround.h: Ditto.
+ * libm/machine/spu/headers/fetestexcept.h: Ditto.
+ * libm/machine/spu/headers/feupdateenv.h: Ditto.
+
+2007-02-14 Corinna Vinschen <corinna@vinschen.de>
+
+ * libc/include/sys/features.h: Add _POSIX_MESSAGE_PASSING for
+ Cygwin.
+
+2007-02-08 Corinna Vinschen <corinna@vinschen.de>
+
+ * libc/include/sys/features.h: Add _POSIX_SHARED_MEMORY_OBJECTS for
+ Cygwin. Fix value of _POSIX_SEMAPHORES. Fix formatting.
+
+2007-02-07 Corinna Vinschen <corinna@vinschen.de>
+
+ * libc/include/sys/features.h: Add definition of all supported
+ _POSIX_xxx values for Cygwin.
+ * libc/include/sys/types.h (pthread_rwlock_t): Omit definition
+ on Cygwin.
+ (pthread_rwlockattr_t): Ditto.
+ * libc/include/sys/unistd.h: Define all _SC_xxx values as
+ required by SUSv3. Unify formatting.
+
+2007-02-02 Ralf Corsépius <ralf.corsepius@rtems.org>
+
+ * libc/include/sys/errno.h: Add ECANCELED.
+
+2007-02-01 Joel Schopp <jschopp@austin.ibm.com>
+ Kazunori Asayama <asayama@sm.sony.co.jp>
+
+ * libc/machine/spu/Makefile.am: Add objects.
+ * libc/machine/spu/Makefile.in: Regenerated.
+ * libc/machine/spu/vsscanf.c: New file. Add a stdio function
+ implementation.
+ * libc/machine/spu/snprintf.c: Ditto.
+ * libc/machine/spu/sprintf.c: Ditto.
+ * libc/machine/spu/sscanf.c: Ditto.
+ * libc/machine/spu/remove.c: Ditto.
+ * libc/machine/spu/rename.c: Ditto.
+ * libc/machine/spu/tmpnam.c: Ditto.
+ * libc/machine/spu/vsnprintf.c: Add initialization routine of
+ stdio stuffs.
+ * libc/machine/spu/vsprintf.c: Ditto.
+
+2007-02-01 Joel Schopp <jschopp@austin.ibm.com>
+ Kazunori Asayama <asayama@sm.sony.co.jp>
+
+ * configure.host: Enable SPU specific stdio directory.
+ * libc/machine/spu/Makefile.am: Add objects.
+ * libc/machine/spu/Makefile.in: Regenerated.
+ * libc/machine/spu/c99ppe.h: Add macros and function
+ declarations to initialize SPU specific stdio stuffs.
+ * libc/machine/spu/stdio.c: Add functions to manage Cell SPU
+ specific FILE structures.
+ * libc/machine/spu/perror.c: Add initialization routine of
+ stdio stuffs.
+ * libc/machine/spu/printf.c: Ditto.
+ * libc/machine/spu/putchar.c: Ditto.
+ * libc/machine/spu/puts.c: Ditto.
+ * libc/machine/spu/vprintf.c: Ditto.
+ * libc/machine/spu/clearerr.c: New file. Add a stdio function
+ implementation.
+ * libc/machine/spu/feof.c: Ditto.
+ * libc/machine/spu/ferror.c: Ditto.
+ * libc/machine/spu/fileno.c: Ditto.
+ * libc/machine/spu/fopen.c: Ditto.
+ * libc/machine/spu/fclose.c: Ditto.
+ * libc/machine/spu/freopen.c: Ditto.
+ * libc/machine/spu/fflush.c: Ditto.
+ * libc/machine/spu/fseek.c: Ditto.
+ * libc/machine/spu/ftell.c: Ditto.
+ * libc/machine/spu/rewind.c: Ditto.
+ * libc/machine/spu/fgetpos.c: Ditto.
+ * libc/machine/spu/fsetpos.c: Ditto.
+ * libc/machine/spu/fread.c: Ditto.
+ * libc/machine/spu/fwrite.c: Ditto.
+ * libc/machine/spu/getc.c: Ditto.
+ * libc/machine/spu/getchar.c: Ditto.
+ * libc/machine/spu/gets.c: Ditto.
+ * libc/machine/spu/fgetc.c: Ditto.
+ * libc/machine/spu/fgets.c: Ditto.
+ * libc/machine/spu/ungetc.c: Ditto.
+ * libc/machine/spu/putc.c: Ditto.
+ * libc/machine/spu/fputc.c: Ditto.
+ * libc/machine/spu/fputs.c: Ditto.
+ * libc/machine/spu/vfprintf.c: Ditto.
+ * libc/machine/spu/vfscanf.c: Ditto.
+ * libc/machine/spu/fprintf.c: Ditto.
+ * libc/machine/spu/fscanf.c: Ditto.
+ * libc/machine/spu/scanf.c: Ditto.
+ * libc/machine/spu/vscanf.c: Ditto.
+ * libc/machine/spu/setbuf.c: Ditto.
+ * libc/machine/spu/setvbuf.c: Ditto.
+ * libc/machine/spu/tmpfile.c: Ditto.
+
+2007-02-01 Jeff Johnston <jjohnstn@redhat.com>
+
+ * libc/include/sys/config.h[__SPU__]: Define __CUSTOM_FILE_IO__.
+ * libc/include/stdio.h[!__CUSTOM_FILE_IO__]: Add flag check
+ around stdio macros that manipulate fields in the normal file
+ structure.
+ * libc/include/sys/reent.h[__CUSTOM_FILE_IO__]: Include
+ <sys/custom_file.h> to define custom FILE structure.
+ * libc/include/sys/custom_file.h: New default header file
+ that generates error if not overridden when __CUSTOM_FILE_IO__ set.
+ * libc/machine/spu/sys/custom_file.h: New file.
+
+2007-01-31 Kazunori Asayama <asayama@sm.sony.co.jp>
+
+ * configure.host: Define stdio directory as a variable.
+ * libc/Makefile.am: Define stdio related names
+ as macros.
+ * libc/configure.in: Add detection routine of stdio directory.
+ * libc/Makefile.in: Regenerated.
+ * libc/configure: Ditto.
+ * libc/argz/Makefile.in: Ditto.
+ * libc/ctype/Makefile.in: Ditto.
+ * libc/errno/Makefile.in: Ditto.
+ * libc/iconv/Makefile.in: Ditto.
+ * libc/iconv/ccs/Makefile.in: Ditto.
+ * libc/iconv/ccs/binary/Makefile.in: Ditto.
+ * libc/iconv/ces/Makefile.in: Ditto.
+ * libc/iconv/lib/Makefile.in: Ditto.
+ * libc/locale/Makefile.in: Ditto.
+ * libc/misc/Makefile.in: Ditto.
+ * libc/posix/Makefile.in: Ditto.
+ * libc/reent/Makefile.in: Ditto.
+ * libc/search/Makefile.in: Ditto.
+ * libc/signal/Makefile.in: Ditto.
+ * libc/stdio/Makefile.in: Ditto.
+ * libc/stdio64/Makefile.in: Ditto.
+ * libc/stdlib/Makefile.in: Ditto.
+ * libc/string/Makefile.in: Ditto.
+ * libc/syscalls/Makefile.in: Ditto.
+ * libc/time/Makefile.in: Ditto.
+ * libc/unix/Makefile.in: Ditto.
+
+2007-01-30 Ben Elliston <bje@au.ibm.com>
+
+ * libc/machine/spu/vsnprintf.c (c99_vsnprintf_t): Const-qualify
+ fmt member.
+ * libc/machine/spu/printf.c (c99_printf_t): Likewise.
+ (printf): Pass fmt to va_start to suppress a warning.
+
+ * libc/search/hash.c (init_hash): Make `info' parameter const.
+
+2007-01-19 Kazunori Asayama <asayama@sm.sony.co.jp>
+
+ * libc/machine/spu/c99ppe.h: Replace vector with __vector.
+ * libc/machine/spu/vec_literal.h: Ditto.
+ * libc/machine/spu/strncmp.c: Ditto.
+
+2007-01-15 Joseph Myers <joseph@codesourcery.com>
+ Kazu Hirata <kazu@codesourcery.com>
+
+ * libc/machine/powerpc/setjmp.S (setjmp, longjmp): Add support
+ for E500V1 and E500V2.
+
+2007-01-11 Jeff Johnston <jjohnstn@redhat.com>
+
+ * libm/configure.in: Always configure machine directory.
+ * libm/Makefile.am: Make machine subdirectory part of SUBDIRS
+ unconditionally.
+ * libm/configure: Regenerated.
+ * libm/Makefile.in: Ditto.
+ * libm/*/Makefile.in: Ditto.
+
+2007-01-05 Brian Ford <Brian.Ford@FlightSafety.com>
+
+ * configure.host (*-*-cygwin*): Define HAVE_BLKSIZE.
+
+2007-01-02 Ben Elliston <bje@au.ibm.com>
+
+ * doc/makedoc.c: Include <stdlib.h>.
+ (malloc, realloc): Remove extern declarations.
+
+2006-12-18 Jeff Johnston <jjohnstn@redhat.com>
+
+ * NEWS: Update with 1.15.0 info.
+ * README: Ditto.
+ * acinclude.m4: Change version number to 1.15.0.
+ * aclocal.m4: Regenerated.
+ * configure: Ditto.
+ * doc/aclocal.m4: Ditto.
+ * doc/configure: Ditto.
+ * libc/*/aclocal.m4: Ditto.
+ * libc/*/configure: Ditto.
+ * libc/libc.texinfo: Ditto.
+ * libm/*/aclocal.m4: Ditto.
+ * libm/*/configure: Ditto.
+ * libm/libm.texinfo: Ditto.
+ * libc/sys/linux/shared.ld: Add VERS_1.15.
+
+2006-12-18 Kazu Hirata <kazu@codesourcery.com>
+
+ Merge from newlib-csl-20060320-branch:
+ 2006-12-01 Nathan Sidwell <nathan@codesourcery.com>
+ Kazu Hirata <kazu@codesourcery.com>
+
+ * configure.host: Recognize fido.
+
+2006-12-18 Joel Schopp <jschopp@austin.ibm.com>
+
+ * libc/machine/spu/c99ppe.h: New file
+ * libc/machine/spu/perror.c: New file to override libc/stdio version.
+ * libc/machine/spu/printf.c: New file
+ * libc/machine/spu/putchar.c: New file
+ * libc/machine/spu/puts.c: New file
+ * libc/machine/spu/vprintf.c: New file
+ * libc/machine/spu/vsnprintf.c: New file
+ * libc/machine/spu/vsprintf.c: New file
+ * libc/machine/spu/Makefile.am: Add new targets.
+ * libc/machine/spu/Makefile.in: Regenerated.
+
+2006-12-18 Jeff Johnston <jjohnstn@redhat.com>
+
+ * aclocal.m4 */aclocal.m4: Regenerated using aclocal 1.9.6.
+ * Makefile.in */Makefile.in: Regenerated using automake 1.9.6.
+
+2006-12-18 Jeff Johnston <jjohnstn@redhat.com>
+
+ * libc/stdlib/mallocr.c (malloc_extend_top): Add patch from
+ 2.6.5 version of Doug Lea's malloc which is the basis of
+ this code.
+
+2006-12-18 Kazunori Asayama <asayama@sm.sony.co.jp>
+
+ * libc/include/machine/setjmp.h[__SPU__]: Replace vector with __vector.
+
+2006-12-14 Jeff Johnston <jjohnstn@redhat.com>
+ Eric Blake <ebb9@byu.net>
+
+ * libc/stdio/fflush.c (fflush): On seekable streams, always flush
+ read but unused data.
+ * libc/stdio/fclose.c (_fclose_r): Always flush streams, since
+ even read streams may have side effects that must happen.
+
+2006-12-13 Joel Schopp <jschopp@austin.ibm.com>
+
+ * libc/machine/spu/setjmp.S: Fix to handle registers past 115
+ correctly.
+
+2006-12-13 Joel Schopp <jschopp@austin.ibm.com>
+
+ * libc/include/alloca.h: Add undef alloca to work with xlc.
+
+2006-12-12 Joel Schopp <jschopp@austin.ibm.com>
+
+ * libc/include/machine/setjmp.h[__SPU__]: Redefine _JBTYPE for
+ cell spu.
+
+2006-12-04 Kazunori Asayama <asayama@sm.sony.co.jp>
+
+ * libc/machine/spu/strncpy.c: Add padding.
+
+2006-12-04 Kazunori Asayama <asayama@sm.sony.co.jp>
+
+ * testsuite/newlib.string/tstring.c:
+
+2006-12-01 Kazunori Asayama <asayama@sm.sony.co.jp>
+
+ * libc/machine/spu/strchr.c: Fix mask for misaligned string.
+ * libc/machine/spu/strrchr.c: Ditto.
+
+2006-11-30 Lev Bishop <lev.bishop@gmail.com>
+
+ * libc/include/math.h: Allow C99 functions/macros to be
+ defined for C++ even when __STRICT_ANSI__.
+
+2006-11-29 Jeff Johnston <jjohnstn@redhat.com>
+
+ * libc/stdio/makebuf.c (__smakebuf): If dealing with
+ an asprintf-family buffer, make the default initial size 64.
+
+2006-11-29 Eric Blake <ebb9@byu.net>
+
+ * libc/stdio/fvwrite.c (__sfvwrite_r): Avoid off-by-one error in
+ asprintf, as well as quadratic realloc behavior.
+
+2006-11-29 Kazunori Asayama <asayama@sm.sony.co.jpi
+
+ * libc/machine/spu/memset.c: Fix type of explicit cast.
+ * libc/machine/spu/strncmp.c: Add explicit cast.
+ * libc/machine/spu/strrchr.c: Ditto.
+ * libc/machine/spu/strspn.c: Ditto.
+
+2006-11-22 Luca Barbato <lu_zero@gentoo.org>
+
+ * libc/machine/spu/memcpy.c: Use spu_splats, explicit cast.
+ * libc/machine/spu/memmove.c: Use spu_splats, explicit cast.
+ * libc/machine/spu/memset.c: Use spu_splats, remove apple-cast.
+ * libc/machine/spu/strchr.c: Use spu_splats, remove apple-cast.
+ * libc/machine/spu/strncat.c: Explicit cast.
+ * libc/machine/spu/strncmp.c: Use spu_splats.
+ * libc/machine/spu/strncpy.c: Explicit cast.
+ * libc/machine/spu/strrchr.c: Use spu_splats.
+ * libc/machine/spu/strspn.c: Use spu_splats.
+
+2006-11-15 Till Straumann <strauman@slac.stanford.edu>
+
+ * libc/time/tzset_r.c (_tzset_r): Initialize local variable.
+
+2006-11-14 Eric Blake <ebb9@byu.net>
+
+ * libc/stdio/vfprintf.c (_vfprintf_r): Support ' flag.
+ (chclass): ' is a flag. j, t, and z are modifiers.
+
+2006-11-08 Jie Zhang <jie.zhang@analog.com>
+
+ * configure.host: Add support for bfin.
+ * libc/include/machine/ieeefp.h: Define __IEEE_LITTLE_ENDIAN for bfin.
+ * libc/include/machine/setjmp.h: Define _JBLEN for bfin.
+ * libc/machine/bfin/aclocal.m4: Generate.
+ * libc/machine/bfin/configure.in: New.
+ * libc/machine/bfin/configure: Generate.
+ * libc/machine/bfin/Makefile.am: New.
+ * libc/machine/bfin/Makefile.in: Generate.
+ * libc/machine/bfin/setjmp.S: New.
+ * libc/machine/bfin/longjmp.S: New.
+ * libc/machine/configure.in: Add bfin support.
+ * libc/machine/configure: Generate.
+
+2006-11-07 Corinna Vinschen <corinna@vinschen.de>
+
+ * libc/include/sys/unistd.h (_SC_STREAM_MAX): Define on Cygwin.
+ (_PC_FILESIZEBITS): Add definition.
+ (_PC_2_SYMLINKS): Ditto.
+ (_PC_SYMLINK_MAX): Ditto.
+
+2006-10-27 Joel Schopp <jschopp@austin.ibm.com>
+
+ * libc/machine/spu/memcpy.c: Override generic function with vectorized
+ version optimized for the cell spu.
+ * libc/machine/spu/memmove.c: Ditto.
+ * libc/machine/spu/memset.c: Ditto.
+ * libc/machine/spu/strcat.c: Ditto.
+ * libc/machine/spu/strchr.c: Ditto.
+ * libc/machine/spu/strcmp.c: Ditto.
+ * libc/machine/spu/strcpy.c: Ditto.
+ * libc/machine/spu/strcspn.c: Ditto.
+ * libc/machine/spu/strlen.c: Ditto.
+ * libc/machine/spu/strncat.c: Ditto.
+ * libc/machine/spu/strncmp.c: Ditto.
+ * libc/machine/spu/strncpy.c: Ditto.
+ * libc/machine/spu/strpbrk.c: Ditto.
+ * libc/machine/spu/strrchr.c: Ditto.
+ * libc/machine/spu/strspn.c: Ditto.
+ * libc/machine/spu/strxfrm.c: Ditto.
+ * libc/machine/spu/vec_literal.h: Add abstraction of vector literals,
+ removing altivec style initializers.
+ * libc/machine/spu/Makefile.am: Add new files to list so they build
+ * libc/machine/spu/Makefile.in: Regenerate from new Makefile.am
+
+2006-10-27 Jeff Johnston <jjohnstn@redhat.com>
+
+ * README: Add a brief section on how to regenerate
+ configuration files in newlib.
+
+2006-10-25 Vladimir Prus <vladimir@codesourcery.com>
+
+ * libc/include/math.h: (exception): Add a comment
+ telling fixincludes that we handle C vs. C++ issue.
+
+2006-10-11 Yang Tse <yangsita@gmail.com>
+
+ * libc/include/machine/setjmp.h: Use __extension__ keyword for gcc's
+ braced-groups.
+
+2006-10-11 Corinna Vinschen <corinna@vinschen.de>
+
+ * libc/reent/reeent.c (_reclaim_reent): Free _REENT_MP_RESULT.
+
+2006-09-26 Jeff Johnston <jjohnstn@redhat.com>
+
+ * libc/include/stdio.h[_REENT_SMALL]: Do not allow macros
+ for clearerr, feof, or fileno.
+ * libc/include/sys/reent.h[_REENT_SMALL](struct _reent): Change
+ the dummy std stream scheme to use pointers to const external
+ fake files, one for each standard stream.
+ * libc/stdio/local.h (CHECK_INIT): Change to take a file pointer
+ argument. For _REENT_SMALL, reset the file pointer if it
+ matches one of the fake std stream pointers.
+ * libc/stdio/clearerr.c: Fix CHECK_INIT macro to add file pointer
+ argument.
+ * libc/stdio/fclose.c: Ditto.
+ * libc/stdio/feof.c: Ditto.
+ * libc/stdio/ferror.c: Ditto.
+ * libc/stdio/fflush.c: Ditto.
+ * libc/stdio/fgetc.c: Ditto.
+ * libc/stdio/fgets.c: Ditto.
+ * libc/stdio/fileno.c: Ditto.
+ * libc/stdio/findfp.c: Ditto.
+ * libc/stdio/fputc.c: Ditto.
+ * libc/stdio/fputs.c: Ditto.
+ * libc/stdio/fread.c: Ditto.
+ * libc/stdio/freopen.c: Ditto.
+ * libc/stdio/fseek.c: Ditto.
+ * libc/stdio/ftell.c: Ditto.
+ * libc/stdio/fwrite.c: Ditto.
+ * libc/stdio/getc.c: Ditto.
+ * libc/stdio/getdelim.c: Ditto.
+ * libc/stdio/putc.c: Ditto.
+ * libc/stdio/refill.c: Ditto.
+ * libc/stdio/setvbuf.c: Ditto.
+ * libc/stdio/ungetc.c: Ditto.
+ * libc/stdio/vfprintf.c: Ditto.
+ * libc/stdio/vfscanf.c: Ditto.
+ * libc/stdio/wbuf.c: Ditto.: Ditto.
+ * libc/stdio/wsetup.c: Ditto.
+ * libc/stdio64/freopen64.c: Ditto.
+ * libc/stdio64/fseeko64.c: Ditto.
+ * libc/stdio64/ftello64.c: Ditto.
+ * libc/machine/powerpc/vfprintf.c: Ditto.
+ * libc/machine/powerpc/vfscanf.c: Ditto.
+
+2006-09-22 Paul Brook <paul@codesourcery.com>
+
+ * libc/include/sys/reent.h: Define and use __reent_assert.
+
+2006-09-13 Joel Sherrill <joel@oarcorp.com>
+
+ * libc/include/pthread.h: Add pthread barriers,
+ rwlocks, and spinlocks. Change const to
+ _CONST and prefix parameter names with
+ an underscore.
+ * libc/include/sys/types.h: Add id and attribute
+ types for barriers, wrlocks, and spinlocks.
+ * libc/include/sys/features.h: Enable barriers,
+ wrlocks, and spinlocks for RTEMS.
+
+2006-09-13 Patrick Mansfield <patmans@us.ibm.com>
+
+ * libc/include/math.h: Remove _CONST from _LIB_VERSION, as it is
+ supposed to be writable.
+ * libm/common/s_lib_ver.c: Ditto.
+
+2006-09-12 Paul Brook <paul@codesourcery.com>
+
+ * libc/stdlib/rand.c (srand): Add _REENT_CHECK_RAND48.
+
+2006-09-07 Masaki Muranaka <monaka@monami-software.com>
+
+
+ * libc/machine/xstormy16/Makefile.am:
+ Add $(lpfx) prefix to LIBADD objects.
+ lib_a_DEPENDENCIES uses the value of lib_a_LIBADD.
+ * libc/machine/xstormy16/Makefile.in: Regenerated.
+
+2006-09-06 Eric Blake <ebb9@byu.net>
+
+ * libc/stdio/vfprintf.c (_vfprintf_r, get_arg): Add 'hh', 'j',
+ 't', and 'z' modifiers.
+
+2006-09-01 Kazu Hirata <kazu@codesourcery.com>
+
+ Merge from newlib-csl-20060320-branch:
+ 2006-05-22 Sandra Loosemore <sandra@codesourcery.com>
+
+ * configure.host: Tell it we have _rename and _system when
+ building m68k-unknown-elf.
+
+2006-08-29 Paul Brook <paul@codesourcery.com>
+
+ * libc/include/sys/config.h: Define _REENT_SMALL for Thumb-2.
+
+2006-08-27 Joel Sherrill <joel.sherrill@OARcorp.com>
+
+ * libc/sys/rtems/machine/sys/param.h: Conditionalize definition of
+ BLKDEV_IOSIZE and MAXPHYS so it will fit into small memory targets.
+ This is needed to build all AVR and H8300 RTEMS multilib variants.
+
+2006-08-23 Kazunori Asayama <asayama@sm.sony.co.jp>
+
+ * libc/machine/configure.in: Add configuration for SPU.
+ * libc/machine/configure: Regenerated.
+ * libc/machine/spu/memcpy.c: Include string.h.
+
+2006-08-22 Eric Blake <ebb9@byu.net>
+
+ * libc/posix/popen.c (popen): Don't close output end of pipe in
+ child if stdout was closed on entry.
+ [HAVE_FCNTL]: In parent, mark file as close-on-exec, per POSIX.
+
+2006-08-19 Ramana Radhakrishnan <ramana.r@gmail.com>
+
+ * sys/types.h: Correct syntax error caused by missing '\' on #ifdef
+ line.
+
+2006-08-17 Brian Ford <Brian.Ford@FlightSafety.com>
+
+ * libc/time/gmtime.c: Correct man page; clock is not a
+ local time and no conversion occurs.
+
+2006-08-16 Joel Schopp <jschopp@austin.ibm.com>
+
+ * configure.host (newlib_cflags) [spu]: Add special compiler
+ options to reduce size.
+
+2006-08-16 Joel Schopp <jschopp@austin.ibm.com>
+
+ * configure.host: Add spu support.
+ * libc/include/stdint.h: Ditto.
+ * libc/include/machine/ieeefp.h: Ditto.
+ * libc/include/machine/setjmp.h: Ditto.
+ * libc/include/sys/config.h: Ditto.
+ * libc/include/sys/types.h: Ditto.
+ * libc/machine/spu/Makefile.am: New file.
+ * libc/machine/spu/Makefile.in: Ditto.
+ * libc/machine/spu/aclocal.m4: Ditto.
+ * libc/machine/spu/configure: Ditto.
+ * libc/machine/spu/configure.in: Ditto.
+ * libc/machine/spu/memcpy.c: Ditto.
+ * libc/machine/spu/setjmp.S: Ditto.
+
+2006-08-03 J"orn Rennecke <joern.rennecke@st.com>
+
+ * dtoa.c (dtoa_r): Handle the denormalized _DOUBLE_IS_32BITS case
+ properly.
+
+2006-08-01 Jeff Johnston <jjohnstn@redhat.com>
+
+ * libc/Makefile.am: Add libc_TEXINFOS dependency on
+ generated .texi files.
+ * libm/Makefile.am: Add libm_TEXINFOS dependency on
+ generated .texi files.
+ * libc/Makefile.in: Regenerated.
+ * libm/Makefile.in: Ditto.
+
+2006-08-01 Thiemo Seufer <ths@mips.com>
+ Nigel Stephens <nigel@mips.com>
+
+ * libc/include/sys/config.h (__ATTRIBUTE_IMPURE_PTR__): For MIPS
+ define this to force _impure_ptr to live in the .sdata section.
+
+2006-07-31 Jeff Johnston <jjohnstn@redhat.com>
+
+ * acinclude.m4: Check for readelf tool.
+ * configure.in: Use ${READELF} instead of hard-coding.
+ * Regenerate all aclocal.m4, Makefile.in, and configure files.
+
+2006-07-31 Jeff Johnston <jjohnstn@redhat.com>
+
+ * libc/sys/linux/mmap.c: Remove include of sys/mman.h
+ to avoid conflict with newer glibc's revision of mremap.
+
+2006-07-05 Jeff Johnston <jjohnstn@redhat.com>
+
+ * libc/stdlib/mprec.h [_DOUBLE_IS_32BITS]: Turn off C99 hex
+ floating-point format support. Also redefine
+ dword0 and dword1 macros.
+ * libc/stdlib/strtod.c: Add checks for _DOUBLE_IS_32BITS
+ to prevent setting dword1 which is an rvalue only.
+
+2006-06-22 Jeff Johnston <jjohnstn@redhat.com>
+
+ * libc/stdlib/Makefile.am: Add new gdtoa routines.
+ * libc/stdlib/Makefile.in: Regenerated.
+ * libc/stdlib/gd_qnan.h: New file.
+ * libc/stdlib/gdtoa-gethex.c: Ditto.
+ * libc/stdlib/gdtoa-hexnan.c: Ditto.
+ * libc/stdlib/gdtoa.h: Ditto.
+ * libc/stdlib/mprec.c: Add new helper routines needed by
+ the new gdtoa code.
+ * libc/stdlib/mprec.h: Integrate some defines and prototypes
+ used by gdtoa routines here.
+ * libc/stdlib/strtod.c: Rebased on David M. Gay's gdtoa-strtod.c
+ which adds C99 support such as nan, inf, and hexadecimal input
+ format.
+
+2006-06-15 Corinna Vinschen <corinna@vinschen.de>
+
+ * libc/include/stdio.h (__sgetc_r): Fix typo.
+ * libc/stdio/fread.c (_fread_r): Convert crlf calls to crlf_r.
+ * libc/stdio/rget.c (__srbuf): Reinstantiate.
+ * libc/stdio/wbuf.c (__swbuf): Ditto.
+
+2006-06-14 Jeff Johnston <jjohnstn@redhat.com>
+
+ * libc/include/stdio.h: Add new reentrant I/O prototypes for
+ read/write functions. Change getc/putc macros to have reentrant underlying
+ macros/functions. This includes __sgetc_raw_r, __sgetc_r, and __sputc_r.
+ * libc/stdio/fgetc.c: Fix and/or add reentrant version to call
+ new reentrant I/O functions/macros for reading/writing.
+ * libc/stdio/fgets.c: Ditto.
+ * libc/stdio/fputc.c: Ditto.
+ * libc/stdio/fputs.c: Ditto.
+ * libc/stdio/fread.c: Ditto.
+ * libc/stdio/fseek.c: Ditto.
+ * libc/stdio64/fseeko64.c: Ditto.
+ * libc/stdio/fwrite.c: Ditto.
+ * libc/stdio/getc.c: Ditto.
+ * libc/stdio/getc_u.c: Ditto.
+ * libc/stdio/getchar.c: Ditto.
+ * libc/stdio/getchar_u.c: Ditto.
+ * libc/stdio/putc.c: Ditto.
+ * libc/stdio/putc_u.c: Ditto.
+ * libc/stdio/putchar.c: Ditto.
+ * libc/stdio/puts.c: Ditto.
+ * libc/stdio/vfprintf.c: Ditto.
+ * libc/stdio/vfscanf.c: Ditto.
+ * libc/stdio/fvwrite.c: Change __sfvwrite into reentrant __sfvwrite_r.
+ Change all previous callers of __sfvwrite. Set errno to EBADF and
+ set error flag on if attempt is made to write to file that does not
+ allow writing.
+ * libc/stdio/fvwrite.h: Fix new reentrant prototypes.
+ * libc/stdio/local.h: Ditto.
+ * libc/stdio/refill.c: Turn __srefill into reentrant __srefill_r.
+ Set errno to EBADF and the error flag on if attempt is made to
+ read unreadable file. Change all previous callers of __srefill.
+ * libc/stdio/rget.c
+ * libc/stdio/wbuf.c: Turn __swbuf into reentrant __swbuf_r. Change
+ all previous callers of __swbuf.
+ * libc/sys/linux/machine/i386/huge_val.h: Ifdef out file contents since
+ huge value macros are already defined correctly for i386 by <math.h>.
+
+2006-06-13 Sandra Loosemore <sandra@codesourcery.com>
+
+ * /libc/sys/arm/syscalls.c (_unlink, isatty, _system, _rename):
+ Make them do something useful in the ARM_RDI_MONITOR case.
+
+2006-06-07 Fred Fish <fnf@specifix.com>
+
+ * libc/search/hash_bigkey.c (MIN,MAX): Remove
+ defines that are already supplied by <sys/param.h>.
+
+2006-06-07 Fred Fish <fnf@specifix.com>
+
+ * configure.host: Remove references to HAVE_GETTIMEOFDAY.
+
+2006-06-05 Shaun Jackman <sjackman@gmail.com>
+
+ * libc/posix/Makefile.am (GENERAL_SOURCES): Add sleep.c and
+ usleep.c.
+ * libc/posix/Makefile.in: Regenerate.
+ * libc/posix/sleep.c: New file.
+ * libc/posix/usleep.c: Ditto.
+
+2006-06-05 Shaun Jackman <sjackman@gmail.com>
+
+ * configure.host (newlib_cflags) [arm, thumb, xscale]: Remove
+ -DABORT_PROVIDED flag.
+ * newlib/libc/sys/arm/syscalls.c (kill, exit): Sync with libgloss.
+ * newlib/libc/sys/arm/libcfunc.c (abort): Ditto.
+
+2006-06-05 Jeff Johnston <jjohnstn@redhat.com>
+
+ * Makefile.am (AM_MAKEFLAGS): Pass CCASFLAGS.
+ * Makefile.in: Regenerated.
+ * libc/machine/sh/Makefile.am (AM_CCASFLAGS): Remove
+ extraneous CFLAGS reference now that CCASFLAGS are being extended
+ properly via multilib.
+ * libc/machine/sh/Makefile.in: Regenerated.
+
+2006-06-02 Shaun Jackman <sjackman@gmail.com>
+
+ * libc/unix/sigset.c: Undefine sigfillset, sigdelset, and
+ sigismember.
+
+2006-05-23 Jeff Johnston <jjohnstn@redhat.com>
+
+ * libc/misc/dprintf.c: Removed.
+ * libc/misc/__dprintf.c: Renamed from dprintf.c.
+ * libc/misc/Makefile.am: Changed appropriately for rename.
+ * libc/misc/Makefile.in: Regenerated.
+
+2006-05-23 Jeff Johnston <jjohnstn@redhat.com>
+
+ * libc/include/stdio.h: Protect dprintf prototype
+ with #ifndef dprintf so as to not interfere with
+ historical code defining their own dprintf macro.
+
+2006-05-18 Jeff Johnston <jjohnstn@redhat.com>
+
+ * libc/include/stdio.h: Add prototypes for fiscanf,
+ iscanf, and siscanf.
+
+2006-05-11 J"orn Rennecke <joern.rennecke@st.com>
+
+ * acinclude.m4 (_NEWLIB_VERSION): Rename to:
+ (DEF_NEWLIB_VERSION).
+ * configure.in (_NEWLIB_VERSION): Use NEWLIB_VERSION.
+ * configure: Regenerate.
+
+2006-05-09 Jeff Johnston <jjohnstn@redhat.com>
+
+ * libc/ctype/Makefile.am: Add $(ELIX_SOURCES) to
+ lib_a_SOURCES.
+ * libc/ctype/Makefile.in: Regenerated.
+
+2006-05-09 Kazu Hirata <kazu@codesourcery.com>
+
+ * libc/machine/arm/Makefile.am: Fix a typo.
+ * libc/machine/arm/Makefile.in: Regenerated.
+
+2006-05-08 J"orn Rennecke <joern.rennecke@st.com>
+
+ * libc/machine/sh/Makefile.am (AM_CCASFLAGS): Add $(CFLAGS).
+ * libc/machine/sh/Makefile.in: Regenerate.
+
+2006-05-03 J"orn Rennecke <joern.rennecke@st.com>
+
+ * libc/sys/sh/Makefile.am (AM_CCASFLAGS): Add $(CFLAGS).
+ * libc/sys/sh/Makefile.in (AM_CCASFLAGS): Likewise.
+
+2006-05-02 Jeff Johnston <jjohnstn@redhat.com>
+
+ * libc/sys/sysnec810/Makefile.am: Specify .S files instead of
+ .s.
+ * libc/sys/sysnec810/Makefile.in: Regenerated.
+ * libc/sys/sysnec810/crt0.S: Renamed from .s file.
+ * libc/sys/sysnec810/io.S: Ditto.
+ * libc/sys/sysnec810/crt0.s: Renamed to .S file.
+ * libc/sys/sysnec810/io.s: Ditto.
+
+2006-05-01 Jeff Johnston <jjohnstn@redhat.com>
+
+ * libc/argz/Makefile.am: Prefix any objects specified with $(lpfx). If source file can
+ be specified instead of object, do so.
+ * libc/ctype/Makefile.am: Ditto.
+ * libc/iconv/ccs/Makefile.am: Ditto.
+ * libc/iconv/ces/Makefile.am: Ditto.
+ * libc/iconv/lib/Makefile.am: Ditto.
+ * libc/locale/Makefile.am: Ditto.
+ * libc/posix/Makefile.am: Ditto.
+ * libc/reent/Makefile.am: Ditto.
+ * libc/search/Makefile.am: Ditto.
+ * libc/stdio/Makefile.am: Ditto.
+ * libc/stdio64/Makefile.am: Ditto.
+ * libc/stdlib/Makefile.am: Ditto.
+ * libc/string/Makefile.am: Ditto.
+ * libc/syscalls/Makefile.am: Ditto.
+ * libc/unix/Makefile.am: Ditto.
+ * libc/machine/a29k/Makefile.am: Specify lib_a_CCASFLAGS so .S files will get
+ prefix added automatically. Any specified rules must use $(lpfx) for
+ object file names.
+ * libc/machine/arm/Makefile.am: Ditto.
+ * libc/machine/cris/Makefile.am: Ditto.
+ * libc/machine/crx/Makefile.am: Ditto.
+ * libc/machine/d10v/Makefile.am: Ditto.
+ * libc/machine/d30v/Makefile.am: Ditto.
+ * libc/machine/fr30/Makefile.am: Ditto.
+ * libc/machine/frv/Makefile.am: Ditto.
+ * libc/machine/h8300/Makefile.am: Ditto.
+ * libc/machine/h8500/Makefile.am: Ditto.
+ * libc/machine/hppa/Makefile.am: Ditto.
+ * libc/machine/i386/Makefile.am: Ditto.
+ * libc/machine/i960/Makefile.am: Ditto.
+ * libc/machine/iq2000/Makefile.am: Ditto.
+ * libc/machine/m32c/Makefile.am: Ditto.
+ * libc/machine/m32r/Makefile.am: Ditto.
+ * libc/machine/m68hc11/Makefile.am: Ditto.
+ * libc/machine/m68k/Makefile.am: Ditto.
+ * libc/machine/m88k/Makefile.am: Ditto.
+ * libc/machine/mips/Makefile.am: Ditto.
+ * libc/machine/mn10200/Makefile.am: Ditto.
+ * libc/machine/mn10300/Makefile.am: Ditto.
+ * libc/machine/mt/Makefile.am: Ditto.
+ * libc/machine/necv70/Makefile.am: Ditto.
+ * libc/machine/powerpc/Makefile.am: Ditto.
+ * libc/machine/sh/Makefile.am: Ditto.
+ * libc/machine/sh/Makefile.in: Ditto.
+ * libc/machine/sparc/Makefile.am: Ditto.
+ * libc/machine/tic4x/Makefile.am: Ditto.
+ * libc/machine/tic80/Makefile.am: Ditto.
+ * libc/machine/v850/Makefile.am: Ditto.
+ * libc/machine/w65/Makefile.am: Ditto.
+ * libc/machine/xscale/Makefile.am: Ditto.
+ * libc/machine/xstormy16/Makefile.am: Ditto.
+ * libc/machine/z8k/Makefile.am: Ditto.
+ * libc/sys/a29khif/Makefile.am: Ditto.
+ * libc/sys/arm/Makefile.am: Ditto.
+ * libc/sys/d10v/Makefile.am: Ditto.
+ * libc/sys/h8300hms/Makefile.am: Ditto.
+ * libc/sys/h8500hms/Makefile.am: Ditto.
+ * libc/sys/linux/Makefile.am: Ditto.
+ * libc/sys/linux/linuxthreads/Makefile.am: Ditto.
+ * libc/sys/linux/net/Makefile.am: Ditto.
+ * libc/sys/linux/stdlib/Makefile.am: Ditto.
+ * libc/sys/m88kbug/Makefile.am: Ditto.
+ * libc/sys/mmixware/Makefile.am: Ditto.
+ * libc/sys/rdos/Makefile.am: Ditto.
+ * libc/sys/rtems/Makefile.am: Ditto.
+ * libc/sys/sh/Makefile.am: Ditto.
+ * libc/sys/sun4/Makefile.am: Ditto.
+ * libc/sys/sysmec/Makefile.am: Ditto.
+ * libc/sys/sysnec810/Makefile.am: Ditto.
+ * libc/sys/sysnecv850/Makefile.am: Ditto.
+ * libc/sys/sysvi386/Makefile.am: Ditto.
+ * libc/sys/sysvnecv70/Makefile.am: Ditto.
+ * libc/sys/tic80/Makefile.am: Ditto.
+ * libc/sys/w65/Makefile.am: Ditto.
+ * libc/sys/z8ksim/Makefile.am: Ditto.
+ * libc/machine/necv70/fastmath.S: Renamed from .s file.
+ * libc/machine/necv70/setjmp.S: Ditto.
+ * libc/machine/necv70/fastmath.s: Removed.
+ * libc/machine/necv70/setjmp.s: Ditto.
+ * libc/machine/w65/*.S: New files renamed from .s files.
+ * libc/machine/w65/*.s: Renamed and removed.
+ * libc/sys/a29khif/*.S: New files renamed from .s files.
+ * libc/sys/a29khif/*.s: Renamed and removed.
+ * libc/sys/sysvi386/*.S: New files renamed from .s files.
+ * libc/sys/sysvi386/*.s: Renamed and removed.
+ * libc/sys/sysvnecv70/*.S: New files renamed from .s files.
+ * libc/sys/sysvnecv70/*.s: Renamed and removed.
+ * libc/*Makefile.in: Regenerated as appropriate.
+
+2006-04-24 DJ Delorie <dj@redhat.com>
+
+ * libc/machine/sh/configure.in: Avoid link tests.
+ * libc/machine/sh/configure: Regenerate.
+
+2006-04-18 Jeff Johnston <jjohnstn@redhat.com>
+
+ * libc/include/sys/signal.h (sigdelset, sigfillset, sigismember): New macros.
+ (sigaddset, sigemptyset): Add return code.
+
+2006-04-13 Ralf Corsepius <ralf.corsepius@rtems.org>
+
+ * acinclude.m4: New _NEWLIB_VERSION.
+ * acinclude.m4(NEWLIB_CONFIGURE): AC_REQUIRE(_NEWLIB_VERSION).
+ Use AC_CANONICAL_HOST instead of AC_CANONICAL_SYSTEM.
+ Use new form of AC_INIT_AUTOMAKE.
+ * configure.in: AC_PREREQ(2.59).
+ Use autoconf-2.5.x version of AC_INIT.
+ Use AC_CONFIG_FILES and autoconf-2.5x AC_OUTPUT instead of
+ autoconf-2.13's AC_OUTPUT.
+ * libm/configure.in: Ditto.
+ * libm/machine/configure.in: Ditto.
+ * libm/machine/i386/configure.in: Ditto.
+ * libc/configure.in: Ditto.
+ * libc/machine/a29k/configure.in: Ditto.
+ * libc/machine/arm/configure.in: Ditto.
+ * libc/machine/configure.in: Ditto.
+ * libc/machine/mn10300/configure.in: Ditto.
+ * libc/machine/powerpc/configure.in: Ditto.
+ * libc/machine/z8k/configure.in: Ditto.
+ * libc/machine/h8300/configure.in: Ditto.
+ * libc/machine/mips/configure.in: Ditto.
+ * libc/machine/crx/configure.in: Ditto.
+ * libc/machine/m68hc11/configure.in: Ditto.
+ * libc/machine/h8500/configure.in: Ditto.
+ * libc/machine/xscale/configure.in: Ditto.
+ * libc/machine/d10v/configure.in: Ditto.
+ * libc/machine/fr30/configure.in: Ditto.
+ * libc/machine/sh/configure.in: Ditto.
+ * libc/machine/tic80/configure.in: Ditto.
+ * libc/machine/m32r/configure.in: Ditto.
+ * libc/machine/xstormy16/configure.in: Ditto.
+ * libc/machine/i386/configure.in: Ditto.
+ * libc/machine/d30v/configure.in: Ditto.
+ * libc/machine/mn10200/configure.in: Ditto.
+ * libc/machine/frv/configure.in: Ditto.
+ * libc/machine/mt/configure.in: Ditto.
+ * libc/machine/i960/configure.in: Ditto.
+ * libc/machine/v850/configure.in: Ditto.
+ * libc/machine/necv70/configure.in: Ditto.
+ * libc/machine/tic4x/configure.in: Ditto.
+ * libc/machine/cris/configure.in: Ditto.
+ * libc/machine/m68k/configure.in: Ditto.
+ * libc/machine/m32c/configure.in: Ditto.
+ * libc/machine/hppa/configure.in: Ditto.
+ * libc/machine/w65/configure.in: Ditto.
+ * libc/machine/iq2000/configure.in: Ditto.
+ * libc/machine/sparc/configure.in: Ditto.
+ * libc/machine/m88k/configure.in: Ditto.
+ * libc/sys/linux/configure.in: Ditto.
+ * libc/sys/linux/machine/configure.in: Ditto.
+ * libc/sys/linux/machine/i386/configure.in: Ditto.
+ * libc/sys/linux/linuxthreads/configure.in: Ditto.
+ * libc/sys/linux/linuxthreads/machine/configure.in: Ditto.
+ * libc/sys/linux/linuxthreads/machine/i386/configure.in: Ditto.
+ * libc/sys/arm/configure.in: Ditto.
+ * libc/sys/configure.in: Ditto.
+ * libc/sys/decstation/configure.in: Ditto.
+ * libc/sys/a29khif/configure.in: Ditto.
+ * libc/sys/sysnecv850/configure.in: Ditto.
+ * libc/sys/d10v/configure.in: Ditto.
+ * libc/sys/netware/configure.in: Ditto.
+ * libc/sys/mmixware/configure.in: Ditto.
+ * libc/sys/h8500hms/configure.in: Ditto.
+ * libc/sys/sh/configure.in: Ditto.
+ * libc/sys/tic80/configure.in: Ditto.
+ * libc/sys/rdos/configure.in: Ditto.
+ * libc/sys/sysmec/configure.in: Ditto.
+ * libc/sys/sysvi386/configure.in: Ditto.
+ * libc/sys/h8300hms/configure.in: Ditto.
+ * libc/sys/sparc64/configure.in: Ditto.
+ * libc/sys/arc/configure.in: Ditto.
+ * libc/sys/sysnec810/configure.in: Ditto.
+ * libc/sys/m88kbug/configure.in: Ditto.
+ * libc/sys/sysvnecv70/configure.in: Ditto.
+ * libc/sys/z8ksim/configure.in: Ditto.
+ * libc/sys/rtems/configure.in: Ditto.
+ * libc/sys/w65/configure.in: Ditto.
+ * libc/sys/sun4/configure.in: Ditto.
+ * doc/configure.in: Ditto.
+ * iconvdata/configure.in: Ditto.
+ * configure.in: Use AC_CONFIG_HEADER instead of AM_CONFIG_HEADER.
+
+2006-04-11 Jeff Johnston <jjohnstn@redhat.com>
+
+ * acinclude.m4: Properly add square brackets for
+ AC_DEFUN macros. Rewrite LIB_AC_PROG_CC to remove
+ macros no longer available. Add LIB_AM_PROG_AS to
+ remove prereq of AC_PROG_CC. Add LIB_AC_PROG_CC_GNU
+ macro. Substitute lpfx (library object prefix).
+ * configure.host: Set lpfx depending on whether
+ libtool is used or not.
+ * configure.in: Individually specify libc and libm
+ to AC_CONFIG_SUBDIRS. Add square bracket quoting as
+ necessary.
+ * Makefile.am: Use $(lpfx) to get object names for
+ math-library functions that should also be in libc.
+ * libc/machine/configure.in: Use case statement to determine
+ AC_CONFIG_SUBDIRS statement.
+ * libc/sys/linux/linuxthreads/machine/configure.in: Ditto.
+ * libc/sys/linux/machine/configure.in: Ditto.
+ * libc/sys/configure.in: Ditto.
+ * libm/machine/configure.in: Ditto.
+ * libc/sys/linux/configure.in: Fix up AC_CONFIG_SUBDIRS.
+ * libm/configure.in: Add AM_CONDITIONAL statement
+ for HAVE_LIBM_MACHINE_DIR.
+ * libc/machine/a29k/Makefile.am: Modified to work with
+ latest automake. Change includes setting AM_CCASFLAGS
+ so building .S files will properly pick up flags used
+ to build C files.
+ * libc/machine/arm/Makefile.am: Ditto.
+ * libc/machine/crx/Makefile.am: Ditto.
+ * libc/machine/d10v/Makefile.am: Ditto.
+ * libc/machine/d30v/Makefile.am: Ditto.
+ * libc/machine/fr30/Makefile.am: Ditto.
+ * libc/machine/frv/Makefile.am: Ditto.
+ * libc/machine/h8300/Makefile.am: Ditto.
+ * libc/machine/h8500/Makefile.am: Ditto.
+ * libc/machine/hppa/Makefile.am: Ditto.
+ * libc/machine/i386/Makefile.am: Ditto.
+ * libc/machine/iq2000/Makefile.am: Ditto.
+ * libc/machine/m32c/Makefile.am: Ditto.
+ * libc/machine/m32r/Makefile.am: Ditto.
+ * libc/machine/m68hc11/Makefile.am: Ditto.
+ * libc/machine/m68k/Makefile.am: Ditto.
+ * libc/machine/m88k/Makefile.am: Ditto.
+ * libc/machine/mips/Makefile.am: Ditto.
+ * libc/machine/mn10200/Makefile.am: Ditto.
+ * libc/machine/mn10300/Makefile.am: Ditto.
+ * libc/machine/mt/Makefile.am: Ditto.
+ * libc/machine/necv70/Makefile.am: Ditto.
+ * libc/machine/powerpc/Makefile.am: Ditto.
+ * libc/machine/sh/Makefile.am: Ditto.
+ * libc/machine/sparc/Makefile.am: Ditto.
+ * libc/machine/tic4x/Makefile.am: Ditto.
+ * libc/machine/tic80/Makefile.am: Ditto.
+ * libc/machine/v850/Makefile.am: Ditto.
+ * libc/machine/w65/Makefile.am: Ditto.
+ * libc/machine/xscale/Makefile.am: Ditto.
+ * libc/machine/xstormy16/Makefile.am: Ditto.
+ * libc/machine/z8k/Makefile.am: Ditto.
+ * libc/sys/a29khif/Makefile.am: Ditto.
+ * libc/sys/arc/Makefile.am: Ditto.
+ * libc/sys/arm/Makefile.am: Ditto.
+ * libc/sys/d10v/Makefile.am: Ditto.
+ * libc/sys/decstation/Makefile.am: Ditto.
+ * libc/sys/h8300hms/Makefile.am: Ditto.
+ * libc/sys/h8500hms/Makefile.am: Ditto.
+ * libc/sys/linux/linuxthreads/machine/i386/Makefile.am: Ditto.
+ * libc/sys/linux/machine/i386/Makefile.am: Ditto.
+ * libc/sys/m88kbug/Makefile.am: Ditto.
+ * libc/sys/mmixware/Makefile.am: Ditto.
+ * libc/sys/netware/Makefile.am: Ditto.
+ * libc/sys/rdos/Makefile.am: Ditto.
+ * libc/sys/rtems/Makefile.am: Ditto.
+ * libc/sys/sh/Makefile.am: Ditto.
+ * libc/sys/sparc64/Makefile.am: Ditto.
+ * libc/sys/sysmec/Makefile.am: Ditto.
+ * libc/sys/sysnec810/Makefile.am: Ditto.
+ * libc/sys/sysnecv850/Makefile.am: Ditto.
+ * libc/sys/sysvi386/Makefile.am: Ditto.
+ * libc/sys/sysvnecv70/Makefile.am: Ditto.
+ * libc/sys/tic80/Makefile.am: Ditto.
+ * libc/sys/w65/Makefile.am: Ditto.
+ * libc/sys/z8ksim/Makefile.am: Ditto.
+ * libm/machine/i386/Makefile.am: Ditto.
+ * libc/sys/arm/Makefile.am: Ditto plus add EXTRA sources including
+ trap.S so that automake will generate a .S.o suffix rule.
+ * libc/argz/Makefile.am: Modified to work with
+ latest automake. Change includes adding lib_a_CFLAGS
+ so automake doesn't complain about libtool and non-libtool
+ libraries sharing objects.
+ * libc/ctype/Makefile.am: Ditto.
+ * libc/errno/Makefile.am: Ditto.
+ * libc/iconv/ccs/Makefile.am: Ditto.
+ * libc/iconv/ces/Makefile.am: Ditto.
+ * libc/iconv/lib/Makefile.am: Ditto.
+ * libc/locale/Makefile.am: Ditto.
+ * libc/misc/Makefile.am: Ditto.
+ * libc/posix/Makefile.am: Ditto.
+ * libc/reent/Makefile.am: Ditto.
+ * libc/search/Makefile.am: Ditto.
+ * libc/signal/Makefile.am: Ditto.
+ * libc/stdio/Makefile.am: Ditto.
+ * libc/stdio64/Makefile.am: Ditto.
+ * libc/stdlib/Makefile.am: Ditto.
+ * libc/string/Makefile.am: Ditto.
+ * libc/sys/linux/Makefile.am: Ditto.
+ * libc/sys/linux/argp/Makefile.am: Ditto.
+ * libc/sys/linux/cmath/Makefile.am: Ditto.
+ * libc/sys/linux/dl/Makefile.am: Ditto.
+ * libc/sys/linux/iconv/Makefile.am: Ditto.
+ * libc/sys/linux/intl/Makefile.am: Ditto.
+ * libc/sys/linux/linuxthreads/Makefile.am: Ditto.
+ * libc/sys/linux/net/Makefile.am: Ditto.
+ * libc/sys/linux/stdlib/Makefile.am: Ditto.
+ * libc/syscalls/Makefile.am: Ditto.
+ * libc/time/Makefile.am: Ditto.
+ * libc/unix/Makefile.am: Ditto.
+ * libm/Makefile.am: Ditto.
+ * libm/common/Makefile.am: Ditto.
+ * libm/math/Makefile.am: Ditto.
+ * libm/mathfp/Makefile.am: Ditto.
+ * Regenerate all aclocal.m4, Makefile.in, and configure files.
+
+2006-04-07 Jeff Johnston <jjohnstn@redhat.com>
+
+ * libc/time/time.c (time): Do not check for HAVE_GETTIMEOFDAY
+ anymore. Assume there is a gettimeofday syscall.
+
+2006-03-29 Shaun Jackman <sjackman@gmail.com>
+
+ * libc/sys/linux/include/netinet/ip.h: Include netinet/in_systm.h
+ for the declaration of n_long.
+
+2006-03-29 Shaun Jackman <sjackman@gmail.com>
+
+ * libc/sys/linux/include/net/if.h: Include sys/socket.h for
+ struct sockaddr.
+ (IFF_SMART): Replace this define with IFF_NOTRAILERS.
+ (IFF_CANTCHANGE): Replace IFF_SMART reference with IFF_NOTRAILERS.
+ (IFF_NOTRAILERS): New define.
+ (struct ifreq): Add ifru_netmask.
+ (ifr_netmask): New define.
+
+2006-03-29 Shaun Jackman <sjackman@gmail.com>
+
+ * libc/sys/linux/sys/ioccom.h (ioctl): Change declaration to
+ match sys/ioctl.h.
+
+2006-03-29 Shaun Jackman <sjackman@gmail.com>
+
+ * libtool.m4: Set lt_cv_deplibs_check_method=pass_all for
+ linux-newlib libc implementations.
+
+2006-03-29 Eric Blake <ebb9@byu.net>
+
+ * libc/stdio/freopen.c (_freopen_r) [__SCLE]: Fix typo.
+ * libc/stdio64/freopen64.c (_freopen64_r) [__SCLE]: Likewise.
+
+2006-03-29 Jeff Johnston <jjohnstn@redhat.com>
+
+ * libc/sys/linux/io.c (__mknod): Fix declaration of
+ syscall to pass a dev_t as third argument rather than
+ a pointer to dev_t.
+
+2006-03-29 Jeff Johnston <jjohnstn@redhat.com>
+
+ * libc/sys/linux/net/name6.c: Fix struct references.
+
+2006-03-22 Mark Mitchell <mark@codesourcery.com>
+
+ * configure.host: Allow hosts to set the default
+ newlib_atexit_dynamic_alloc value.
+ * configure.in: Likewise.
+ * configure: Regenerated.
+
+2006-03-20 Mark Mitchell <mark@codesourcery.com>
+
+ * acconfig.h (_ATEXIT_DYNAMIC_ALLOC): Undef.
+ * configure.in (--disable-newlib-atexit-dynamic-alloc): New
+ option.
+ * configure: Regenerated.
+ * newlib.hin: Regenerated.
+ * libc/stdlib/__atexit.c (__register_exitproc): Don't call malloc
+ if _ATEXIT_DYNAMIC_ALLOC is undefined.
+ * libc/stdlib/__call_atexit.c (__call_exitprocs): Don't call free
+ if _ATEXIT_DYNAMIC_ALLOC is undefined.
+
+2006-03-17 Jeff Johnston <jjohnstn@redhat.com>
+
+ * libc/sys/linux/linuxthreads/config.h: Remove definition
+ of UINT32_C.
+
+2006-03-15 Jeff Johnston <jjohnstn@redhat.com>
+
+ * libc/stdio/wsetup.c (__swsetup): Don't make a buffer
+ for a string I/O file that isn't using the asprintf family.
+
+2006-03-07 Eric Blake <ebb9@byu.net>
+
+ * libc/stdio/freopen.c (_freopen_r) [HAVE_FCNTL]: For NULL
+ filename, allow read-only or write-only FILE atop O_RDWR file
+ descriptor.
+ * libc/stdio64/freopen64.c (_freopen64_r) [HAVE_FCNTL]: Likewise.
+
+2006-03-07 Jeff Johnston <jjohnstn@redhat.com>
+
+ * libm/common/sf_isinf.c[_DOUBLE_IS_32BITS]: Undef isinf.
+ * libm/common/sf_isnan.c[_DOUBLE_IS_32BITS]: Undef isnan.
+
+2006-03-02 Jeff Johnston <jjohnstn@redhat.com>
+
+ * libm/math/math.tex: Fix reference to sisnan.def which
+ is now in common subdirectory.
+ * libm/mathfp/mathfp.tex: Ditto.
+
+2006-02-27 Jeff Johnston <jjohnstn@redhat.com>
+
+ * Makefile.am (MATHOBJS_IN_LIBC): Add s_isinfd, sf_isinff,
+ s_isnand, and sf_isnanf object files.
+ * Makefile.in: Regenerated.
+ * libc/include/ieeefp.h: Undef isnan and isinf to avoid
+ conflict if <math.h> has previously been included.
+ * libc/include/math.h
+ * libc/include/math.h: Make isnan and isinf macros to
+ conform to C99.
+ (__isinfd, __isinff, __isnand, __isnanf): New functions.
+ * libm/common/Makefile.am: Add new s_isinfd, s_isnand, sf_isinff,
+ and sf_isnanf files. Also support s_isnan, sf_isnan, s_isinf, and
+ sf_isinf files which have been moved from math/mathfp directories.
+ * libm/common/Makefile.in: Regenerated.
+ * libm/common/s_isinfd.c: New file.
+ * libm/common/s_isnand.c: Ditto.
+ * libm/common/sf_isinff.c: Ditto.
+ * libm/common/sf_isnanf.c: Ditto.
+ * libm/common/s_isinf.c: Moved from libm/math directory.
+ * libm/common/s_isnan.c: Ditto.
+ * libm/common/sf_isinf.c: Ditto.
+ * libm/common/sf_isnan.c: Ditto.
+ * libm/math/Makefile.am: Remove isinf and isnan family functions
+ which have been moved into common directory.
+ * libm/mathfp/Makefile.am: Ditto.
+ * libm/math/Makefile.in: Regenerated.
+ * libm/mathfp/Makefile.in: Ditto.
+ * libm/math/s_isinf.c: Removed.
+ * libm/math/s_isnan.c: Ditto.
+ * libm/math/sf_isinf.c: Ditto.
+ * libm/math/sf_isnan.c: Ditto.
+ * libm/mathfp/s_isinf.c: Ditto.
+ * libm/mathfp/s_isnan.c: Ditto.
+ * libm/mathfp/sf_isinf.c: Ditto.
+ * libm/mathfp/sf_isnan.c: Ditto.
+
+2006-02-20 Jeff Johnston <jjohnstn@redhat.com>
+
+ * libc/stdio/fflush.c (fflush): For an fflush on a read-only
+ stream, turn off fseek/rewind optimization as per POSIX/SUSv3.
+ * libc/stdio/fseek.c (_fseek_r): After a successful unoptimized
+ seek, turn off the __SNPT no-optimization flag.
+
+2006-02-16 Jeff Johnston <jjohnstn@redhat.com>
+
+ * libc/sys/linux/aio.c: Define _GNU_SOURCE so struct aioinit
+ will be defined.
+ * libc/sys/linux/sys/types.h: Move <sys/config.h> ahead of
+ <features.h> to preset special flags.
+
+2006-02-15 Corinna Vinschen <corinna@vinschen.de>
+
+ * libc/include/sys/time.h (struct timeval): Change member types
+ according to SUSv3.
+ * libc/include/sys/types.h (useconds_t): Change to unsigned
+ according to SUSv3.
+ (suseconds_t): Define type.
+
+2006-02-13 Jeff Johnston <jjohnstn@redhat.com>
+ David Carne <davidcarne@gmail.com>
+
+ * libc/string/strndup_r.c (_strndup_r): Use strnlen logic
+ instead of strlen to determine number of bytes to copy.
+ * libc/string/strnlen.c (strnlen): Fix so check for max limit occurs
+ before looking at storage location.
+
+2006-02-07 Paul Brook <paul@codesourcery.com>
+
+ * libc/machine/arm/setjmp.S: Add Thumb-2 support.
+ * libc/sys/arm/crt0.S: Add Thumb-2 startup code.
+ * libc/sys/arm/libcfunc.c (do_AngelSWI): Use AngelSWIInsn.
+ * libc/sys/arm/swi.h (AngelSWIInsn, AngelSWIAsm): Define.
+ * libc/sys/arm/trap.S: Disable for Thumb-2.
+
+2006-01-31 Leif Ekblad <leif@rdos.net>
+
+ * configure.host: RDOS support added
+ * libc/include/sys/config.h: Ditto.
+ * libc/sys/rdos/Makefile.am, libc/sys/rdos/Makefile.in: New files.
+ * libc/sys/rdos/aclocal.m4, libc/sys/rdos/chown.c: Ditto.
+ * libc/sys/rdos/close.c, libc/sys/rdos/config.h: Ditto.
+ * libc/sys/rdos/configure, libc/sys/rdos/configure.in: Ditto.
+ * libc/sys/rdos/crt0.S, libc/sys/rdos/execve.c: Ditto.
+ * libc/sys/rdos/fork.c, libc/sys/rdos/fstat.c: Ditto.
+ * libc/sys/rdos/getenv.c, libc/sys/rdos/getpid.c: Ditto.
+ * libc/sys/rdos/gettod.c, libc/sys/rdos/isatty.c: Ditto.
+ * libc/sys/rdos/kill.c, libc/sys/rdos/link.c: Ditto.
+ * libc/sys/rdos/lseek.c, libc/sys/rdos/open.c: Ditto.
+ * libc/sys/rdos/rdos.S, libc/sys/rdos/rdos.h: Ditto.
+ * libc/sys/rdos/rdoshelp.c, libc/sys/rdos/read.c: Ditto.
+ * libc/sys/rdos/readlink.c, libc/sys/rdos/sbrk.c: Ditto.
+ * libc/sys/rdos/stat.c, libc/sys/rdos/symlink.c: Ditto.
+ * libc/sys/rdos/times.c, libc/sys/rdos/unlink.c: Ditto.
+ * libc/sys/rdos/user.def, libc/sys/rdos/wait.c: Ditto.
+ * libc/sys/rdos/write.c: Ditto.
+
+2006-01-24 Jeff Johnston <jjohnstn@redhat.com>
+
+ * acinclude.m4: Add nodefine to AM_INIT_AUTOMAKE macro invocation
+ so as not to define PACKAGE and VERSION in newlib.h.
+ * aclocal.m4: Regenerated.
+ * configure: Ditto.
+ * newlib.hin: Ditto.
+
+2006-01-20 Jeff Johnston <jjohnstn@redhat.com>
+
+ * acconfig.h: New file to generate newlib.hin from.
+ * newlib.hin: Regenerated.
+ * stamp-h.in: Regenerated.
+ * Makefile.am: Add ACLOCAL_AMFLAGS so aclocal can be
+ called automatically.
+ * Makefile.in: Regenerated.
+ * acinclude.m4: Add proper comment for hack in previous change.
+ * aclocal.m4 */aclocal.m4: Regenerated.
+ * configure */configure: Regenerated.
+
+2006-01-11 Jeff Johnston <jjohnstn@redhat.com>
+
+ * acinclude.m4: Add hack to prevent INSTALL in subdirs
+ from being set to "../".
+ * Makefile.am: Pass INSTALL in AM_MAKEFLAGS.
+ * aclocal.m4: Regenerated.
+ * configure: Ditto.
+ * Makefile.in: Ditto.
+ * doc/aclocal.m4: Ditto.
+ * doc/configure: Ditto.
+ * iconvdata/aclocal.m4: Ditto.
+ * iconvdata/configure: Ditto.
+ * libc/*/aclocal.m4: Ditto.
+ * libc/*/configure: Ditto.
+ * libc/libc.texinfo: Ditto.
+ * libm/*/aclocal.m4: Ditto.
+ * libm/*/configure: Ditto.
+
+2006-01-10 Eric Blake <ebb9@byu.net>
+
+ * libc/stdio/freopen.c (_freopen_r): Fix use of oflags.
+ * libc/stdio64/freopen64.c (_freopen64_r): Likewise.
+
+2006-01-10 Jeff Johnston <jjohnstn@redhat.com>
+
+ * libm/mathfp/s_frexp.c: Check for special values on
+ the original input, not the manipulated output value.
+ * libm/mathfp/sf_frexp.c: Ditto.
+ * libm/mathfp/s_atangent.c: Don't use local value branch
+ when checking for quadrant.
+ * libm/mathfp/sf_atangent.c: Ditto.
+
+2006-01-09 Jeff Johnston <jjohnstn@redhat.com>
+
+ * libc/stdio/freopen.c: Switch to use isatty instead of _isatty.
+ * libc/stdio64/freopen64.c: Ditto.
+
+2006-01-09 Eric Blake <ebb9@byu.net>
+
+ * libc/stdio/freopen.c (_freopen_r): Accept NULL filename.
+ * libc/stdio64/freopen64.c (_freopen64_r): Likewise.
+
+2006-01-06 Jeff Johnston <jjohnstn@redhat.com>
+
+ * libc/sys/linux/include/getopt.h: Add macros needed by
+ new version of getopt.c in libc/stdlib.
+
+2006-01-04 Gregory Pietsch <gpietsch@comcast.net>
+
+ * libc/stdlib/getopt.c: Replaced with version
+ that adds getopt_long and getopt_long_only support.
+ * libc/include/getopt.h: New file.
+
+2005-12-16 Jeff Johnston <jjohnstn@redhat.com>
+
+ * NEWS: Update with 1.14.0 info.
+ * README: Ditto.
+ * acinclude.m4: Change version number to 1.14.0.
+ * aclocal.m4: Regenerated.
+ * configure: Ditto.
+ * doc/aclocal.m4: Ditto.
+ * doc/configure: Ditto.
+ * libc/*/aclocal.m4: Ditto.
+ * libc/*/configure: Ditto.
+ * libc/libc.texinfo: Ditto.
+ * libm/*/aclocal.m4: Ditto.
+ * libm/*/configure: Ditto.
+ * libm/libm.texinfo: Ditto.
+ * libc/sys/linux/shared.ld: Add VERS_1.14.
+
+2005-12-16 Jeff Johnston <jjohnstn@redhat.com>
+
+ * libc/sys/linux/sys/stat.h: Change *stat64 prototypes to
+ take a pointer to struct stat64 rather than struct stat.
+
+2005-12-16 Ralf Corsepius <ralf.corsepius@rtems.org>
+
+ * libc/include/stdint.h: Prefer long over int for int32_t.
+ Use __have_long32 to set up int32_t.
+ * libc/include/inttypes.h: Use "#if xxx" instead of "#ifdef xxx"
+ (Sync with stdint.h).
+
+2005-12-14 Corinna Vinschen <corinna@vinschen.de>
+
+ * libc/include/sys/fcntl.h: Define O_SYNC unconditionally. Fix
+ typo in O_NDELAY comment.
+
+2005-12-13 Nathan Sidwell <nathan@codesourcery.com>
+
+ * libc/include/machine/ieeefp.h (__mt__): Renamed from __ms1__.
+ * libc/include/machine/setjmp.h (__mt__): Likewise.
+ * libc/machine/mt/setjmp.S: Rename ms1 reference to mt.
+ * libc/machine/configure.in: Ditto.
+
+2005-12-12 Nathan Sidwell <nathan@codesourcery.com>
+
+ * configure.host: Replace ms1 arch with mt arch.
+ * libc/machine/mt: Renamed from ms1 dir.
+
+2005-12-08 Shaun Jackman <sjackman@gmail.com>
+
+ * libc/include/sys/types.h: Remove the ifdef armour around
+ standard POSIX types.
+
+2005-12-06 Ralf Corsepius <ralf.corsepius@rtems.org>
+
+ * libc/sys/rtems/crt0.c: Add rtems_gxx_key_create,
+ rtems_gxx_key_delete, rtems_gxx_getspecific,
+ rtems_gxx_setspecific, rtems_gxx_mutex_trylock,
+ rtems_gxx_recursive_mutex_init, rtems_gxx_recursive_mutex_lock,
+ rtems_gxx_recursive_mutex_trylock, rtems_gxx_recursive_mutex_unlock.
+
+2005-12-05 Christopher Faylor <cgf@timesys.com>
+
+ * libc/include/stdlib.h: Move cygwin declarations to cygwin-specific
+ file. Declare unsetenv and _unsetenv_r when not cygwin.
+
+2005-11-18 Jeff Johnston <jjohnstn@redhat.com>
+
+ * libc/time/strptime.c (strptime): Don't abort for %c and %Z.
+ Treat %c as "%a %b %e %H:%M:%S %Y" and ignore %Z.
+
+2005-11-18 Christopher Faylor <cgf@timesys.com>
+
+ * include/sys/time.h: Move more cygwin stuff to cygwin-specific header.
+
+2005-11-18 Christopher Faylor <cgf@timesys.com>
+
+ * include/time.h: Remove more cygwin-specific stuff.
+
+2005-11-18 Christopher Faylor <cgf@timesys.com>
+
+ * include/time.h: Move cygwin declarations to cygwin-specific header.
+ * include/sys/time.h: Rename cygwin include to "sys_time.h".
+
+2005-11-17 Jeff Johnston <jjohnstn@redhat.com>
+
+ * libc/sys/linux/dl/dl-local.h: New file based on old dlfcn.h
+ in libc/sys/linux/include.
+ * libc/sys/linux/dl/dlfcn.h: Moved to libc/sys/linux/include.
+ * libc/sys/linux/dl/ldsodefs.h: Include dl-local.h instead of dlfcn.h.
+ * libc/sys/linux/include/dlfcn.h: Replaced with dlfcn.h formerly
+ in libc/sys/linux/dl.
+
+2005-11-11 Christopher Faylor <cgf@timesys.com>
+
+ * libc/include/sys/time.h: For cygwin, use general header rather than
+ specific "sys/select.h".
+
+2005-11-08 Tom Walsh <tom@openhardware.net>
+
+ * libc/time/tzvars.c: New file.
+ * libc/time/tzset_r.c: Moved globals into tzvars.c
+ so other time functions needn't link in __tzset_r and its
+ dependencies.
+ * libc/time/Makefile.am: Add the new file.
+ * libc/time/Makefile.in: Regenerated.
+
+2005-11-08 Christopher Faylor <cgf@timesys.com>
+
+ * libc/include/string.h: Add cygwin-specific function declaration.
+
+2005-11-07 Corinna Vinschen <corinna@vinschen.de>
+
+ * libc/include/ieeefp.h: Add C++ guards.
+
+2005-11-03 Jeff Johnston <jjohnstn@redhat.com>
+
+ * libc/unix/getcwd.c: Don't use non-reentrant syscall names.
+ * libc/unix/getlogin.c: Ditto.
+ * libc/unix/getpass.c: Ditto.
+ * libc/unix/getut.c: Ditto.
+ * libc/unix/ttyname.c: Ditto.
+
+2005-11-03 Shaun Jackman <sjackman@gmail.com>
+
+ * libc/include/sys/unistd.h (readlink, symlink): Provide these
+ prototypes by default.
+ * libc/sys/linux/include/unistd.h (readlink): Remove this
+ prototype.
+ * libc/sys/linux/sys/unistd.h (readlink, symlink): New
+ prototypes.
+
+2005-11-01 Ralf Corsepius <ralf.corsepius@rtems.org>
+
+ * libc/include/stdint.h: Cleanup #if vs. #ifdef.
+
+2005-10-31 Darin Johnson <darin@usa.net>
+
+ * libm/mathfp/s_mathcnst.c: Fix endian-ness check to be
+ correct for constants.
+
+2005-10-28 Bob Wilson <bob.wilson@acm.org>
+
+ * libc/stdio/siprintf.c: Wrap long lines in ANSI_SYNOPSIS.
+ * libc/stdio/siscanf.c: Likewise.
+ * libc/stdio/sprintf.c: Likewise.
+ * libc/stdio/sscanf.c: Likewise.
+ * libc/stdio/vfprintf.c: Likewise.
+ * libc/stdio/vfscanf.c: Likewise.
+ * libc/stdio/viprintf.c: Likewise.
+ * libc/stdio/viscanf.c: Likewise.
+
+2005-10-28 Bob Wilson <bob.wilson@acm.org>
+
+ * libc/sys.tex (Stubs): Format examples consistently. Change sbrk
+ example to use "_end" symbol instead of "end". Change write example
+ to use "outbyte" instead of "writechar".
+
+2005-10-28 Bob Wilson <bob.wilson@acm.org>
+
+ * libc/ctype/ctype.tex: Use hyphens as appropriate, but not otherwise.
+ * libc/ctype/islower.c: Likewise.
+ * libc/ctype/isupper.c: Likewise.
+ * libc/ctype/iswalnum.c: Likewise.
+ * libc/ctype/iswalpha.c: Likewise.
+ * libc/ctype/iswblank.c: Likewise.
+ * libc/ctype/iswcntrl.c: Likewise.
+ * libc/ctype/iswdigit.c: Likewise.
+ * libc/ctype/iswgraph.c: Likewise.
+ * libc/ctype/iswlower.c: Likewise.
+ * libc/ctype/iswprint.c: Likewise.
+ * libc/ctype/iswpunct.c: Likewise.
+ * libc/ctype/iswspace.c: Likewise.
+ * libc/ctype/iswupper.c: Likewise.
+ * libc/ctype/iswxdigit.c: Likewise.
+ * libc/ctype/tolower.c: Likewise.
+ * libc/ctype/toupper.c: Likewise.
+ * libc/ctype/towctrans.c: Likewise.
+ * libc/ctype/towlower.c: Likewise.
+ * libc/ctype/towupper.c: Likewise.
+ * libc/string/strcasecmp.c: Likewise.
+ * libc/string/strcoll.c: Likewise.
+ * libc/string/strings.tex: Likewise.
+ * libc/string/strlwr.c: Likewise.
+ * libc/string/strncasecmp.c: Likewise.
+ * libc/string/strupr.c: Likewise.
+ * libc/string/wcscoll.c: Likewise.
+ * libc/string/wcslcat.c: Likewise.
+ * libc/string/wcslcpy.c: Likewise.
+ * libc/string/wcsnlen.c: Likewise.
+ * libc/string/wcsstr.c: Likewise.
+ * libc/string/wcstrings.tex: Likewise.
+ * libc/string/wmemchr.c: Likewise.
+ * libc/string/wmemcmp.c: Likewise.
+ * libc/string/wmemcpy.c: Likewise.
+ * libc/string/wmemmove.c: Likewise.
+ * libc/string/wmemset.c: Likewise.
+
+2005-10-28 Bob Wilson <bob.wilson@acm.org>
+
+ * libc/misc/unctrl.c: Replace FUNCTION description.
+ * libc/signal/signal.c: Remove documentation for raise and _raise_r.
+ * libc/stdio/getdelim.c: Fix spelling errors.
+ * libc/stdio/getw.c: Put RETURNS on a separate line. Fix punctuation.
+ * libc/stdio/putw.c: Likewise.
+ * libc/stdlib/a64l.c: Fix formatting, spelling and punctuation in
+ documentation.
+ * libc/stdlib/assert.c: Do not capitalize FUNCTION description.
+ * libc/stdlib/efgcvt.c: Add spaces to FUNCTION description.
+ * libc/stdlib/envlock.c: Use em-dash in FUNCTION description.
+ * libc/stdlib/mlock.c: Likewise.
+ * libc/stdlib/mstats.c: Likewise.
+ * libc/time/tzlock.c: Likewise.
+ * libc/stdlib/rand.c: Use "multi-threaded" and "thread-safe" in NOTES.
+ * libc/stdlib/rand48.c: Remove extra space in FUNCTION description
+ and hyphenate "pseudo-random".
+ * libc/string/bcmp.c: Remove extra blank lines in documentation.
+ * libc/string/strncat.c: Likewise.
+ * libc/string/memchr.c: Remove extra ">" character in documentation.
+ * libc/string/strcspn.c: Use "characters" instead of "chars".
+ * libc/string/strpbrk.c: Likewise.
+ * libc/string/strerror_r.c: Capitalize "GNU".
+ * libc/string/strnlen.c: Likewise.
+ * libc/string/strtok.c: Fix formatting, spelling and punctuation in
+ documentation. Use "multi-threaded" and "thread-safe" in NOTES.
+ * libc/string/wcscat.c: Split PORTABILITY into two paragraphs.
+ * libc/string/wcschr.c: Likewise.
+ * libc/string/wcscmp.c: Likewise.
+ * libc/string/wcscpy.c: Likewise.
+ * libc/string/wcscspn.c: Likewise.
+ * libc/string/wcslen.c: Likewise.
+ * libc/string/wcsncat.c: Likewise.
+ * libc/string/wcsncmp.c: Likewise.
+ * libc/string/wcsncpy.c: Likewise.
+ * libc/string/wcsnlen.c: Likewise.
+ * libc/string/wcspbrk.c: Likewise.
+ * libc/string/wcsrchr.c: Likewise.
+ * libc/string/wcsspn.c: Likewise.
+ * libc/string/wmemchr.c: Likewise.
+ * libc/string/wmemcmp.c: Likewise.
+ * libc/string/wmemcpy.c: Likewise.
+ * libc/string/wmemset.c: Likewise.
+ * libc/string/wmemmove.c: Likewise. Also fix FUNCTION description.
+ * libc/string/wcswidth.c: Formatting and punctuation in documentation.
+ * libc/string/wcwidth.c: Likewise.
+ * libm/common/s_modf.c: Remove extra period from documentation.
+ * libm/math/s_isnan.c: Fix formatting, grammar and punctuation in
+ documentation.
+ * libm/mathfp/s_isnan.c: Likewise.
+ * libm/math/s_ldexp.c: Fix punctuation.
+ * libm/mathfp/s_ldexp.c: Likewise.
+ * libm/math/w_log.c: Likewise.
+ * libm/mathfp/s_logarithm.c: Likewise.
+ * libm/math/w_j0.c: Add spaces to FUNCTION description.
+ * libm/mathfp/w_jn.c: Likewise.
+
+2005-10-26 Shaun Jackman <sjackman@gmail.com>
+
+ * libc/posix/scandir.c (scandir): Update the function
+ prototype to match the header.
+ * libc/sys/linux/linuxthreads/bits/libc-lock.h: Remove an
+ extraneous #endif.
+ * libc/sys/linux/sys/lock.h: Do not include
+ machine/weakalias.h, since it's not used by this file.
+
+2005-10-26 Jeff Johnston <jjohnstn@redhat.com>
+
+ * libc/Makefile.am: Reorder SUBLIBS so machine and sys
+ directories can override properly.
+
+2005-10-20 Jeff Johnston <jjohnstn@redhat.com>
+
+ * libc/include/math.h (HUGE_VAL, HUGE_VALF, HUGE_VALL): When
+ gcc is 3.3 or greater, use special gcc builtins.
+
+2005-10-20 Corinna Vinschen <corinna@vinschen.de>
+
+ * libc/include/sys/time.h: Declare futimes and lutimes for Cygwin.
+
+2005-10-18 Corinna Vinschen <corinna@vinschen.de>
+
+ * libc/include/sys/features.h: Define _POSIX_MEMLOCK_RANGE for Cygwin.
+
+2005-10-14 Jeff Johnston <jjohnstn@redhat.com>
+
+ * libc/include/math.h (HUGE_VALF, HUGE_VALL): New.
+ * libm/common/Makefile.am: Add s_infconst.c support.
+ * libm/common/Makefile.in: Regenerated.
+ * libm/common/s_infconst.c: New file with float and
+ long double infinity support added.
+ * libm/math/Makefile.am: Remove s_infconst.c support.
+ * libm/math/Makefile.in: Regenerated.
+ * libm/math/s_infconst.c: Moved to common directory.
+ * libm/mathfp/Makefile.am: Remove s_infconst.c support.
+ * libm/mathfp/Makefile.in: Regenerated.
+ * libm/mathfp/s_infconst.c: Moved to common directory.
+
+2005-10-14 Jeff Johnston <jjohnstn@redhat.com>
+
+ * libc/sys/linux/net/gethostbydns.c (dprintf): Rename to
+ dbgprintf to prevent conflict with new dprintf function.
+
+2005-10-14 Jeff Johnston <jjohnstn@redhat.com>
+
+ * libc/stdio/vfprintf.c (_VFPRINTF_R): Fix up "inf" and
+ "nan" processing for systems that have long double support.
+
+2005-10-14 Jeff Johnston <jjohnstn@redhat.com>
+
+ * libc/sys/linux/sys/types.h (int8_t): Add type.
+
+2005-10-14 Bob Wilson <bob.wilson@acm.org>
+
+ * libm/common/Makefile.am (doc): Do not append to $(TARGETDOC).
+ * libm/common/Makefile.in: Regenerate.
+ * libm/common/common.tex: Delete file.
+ * libm/math/math.tex: Include .def files from common/.
+ * libm/mathfp/mathfp.tex: Likewise.
+
+2005-10-14 Bob Wilson <bob.wilson@acm.org>
+
+ * libc/libc.texinfo (Top): Surround this node with @ifnottex
+ instead of @ifinfo. Update menu to add Introduction and match
+ SUBDIRS order.
+ (Introduction): New section.
+
+2005-10-14 Bob Wilson <bob.wilson@acm.org>
+
+ * libc/reent/reent.tex (Reentrancy): Replace "Cygnus C Library"
+ with "Red Hat newlib C Library".
+ * libc/sys.tex (Stubs): Likewise.
+ * libm/math/math.tex (Math): Likewise.
+ * libm/mathfp/mathfp.tex (Math): Likewise.
+
+2005-10-11 Shaun Jackman <sjackman@gmail.com>
+
+ * libc/include/stdio.h (dprintf): New declaration.
+ (vdprintf): Ditto.
+ * libc/stdio/Makefile.am (GENERAL_SOURCES): Add dprintf.c
+ and vdprintf.c.
+ * libc/stdio/Makefile.in: Regenerate.
+ * libc/stdio/dprintf.c: New file.
+ * libc/stdio/vdprintf.c: New file.
+ * libc/stdio/stdio.tex (dprintf): New entry.
+
+2005-10-11 David Weatherford <weath@tensilica.com>
+
+ * libc/stdio/vfprintf.c (_VFPRINTF_R): Recognize 'F' format.
+ Print "inf" and "nan" in lowercase for e/f/g formats and in
+ uppercase for E/F/G formats.
+
+2005-10-07 Bob Wilson <bob.wilson@acm.org>
+
+ * libc/stdlib/mallocr.c (mALLOc, rEALLOCc, mEMALIGn): Set errno
+ to ENOMEM on failure.
+
+2005-10-06 Ralf Corsepius <ralf.corsepius@rtems.org>
+
+ * libc/include/stdint.h: Add [u]int_fast<N>_t types.
+
+2005-10-04 Ralf Corsepius <ralf.corsepius@rtems.org>
+
+ * libc/include/stdint.h: Move magic to set __have_long* to the
+ beginning. Use #if __have* instead of #if defined(__have*).
+ Minor typo fixes.
+
+2005-10-04 James E Wilson <wilson@specifix.com>
+
+ * libc/include/sys/dirent.h (_DIRENT_H_): Delete #include_next. Add
+ #error.
+
+2005-10-03 Jeff Johnston <jjohnstn@redhat.com>
+
+ * libc/sys/linux/include/stdint.h: Include <sys/types.h> and
+ incorporate Ralf's change below.
+
+2005-10-03 Ralf Corsepius <ralf.corsepius@rtems.org>
+
+ * libc/include/stdint.h:
+ Use __INTMAX_TYPE__ to derive intmax_t.
+ Use __UINTMAX_TYPE__ to derive uintmax_t.
+ Fix minor typo.
+
+2005-09-27 Ralf Corsepius <ralf.corsepius@rtems.org>
+
+ * libc/include/stdint.h: Correct __STDINT_EXP macro incorrectly
+ handling GCC >= 4.
+
+2005-09-20 Jeff Johnston <jjohnstn@redhat.com>
+
+ * libc/sys/linux/include/stdint.h: Update to match functionality
+ of generic newlib stdint.h.
+
+2005-09-20 Jeff Johnston <jjohnstn@redhat.com>
+
+ * libc/include/stdint.h (__EXP): Rename to __STDINT_EXP
+ and do not #undef the macro after it is used. Fix typos.
+ Also change 64-bit constants to use the __have_long64 and
+ __have_longlong64 flags to determine if long or long long
+ constants should be used.
+ * libc/include/inttypes.h: Include stddef.h to get wchar_t
+ type defined.
+
+2005-09-20 Shaun Jackman <sjackman@gmail.com>
+
+ * libc/include/stdint.h: Fix typo in names of
+ LEAST macros.
+
+2005-09-20 Jeff Johnston <jjohnstn@redhat.com>
+
+ * libc/sys/rtems/include/inttypes.h: Moved to...
+ * libc/include/inttypes.h: ...here.
+
+2005-09-19 Jeff Johnston <jjohnstn@redhat.com>
+
+ * libc/sys/rtems/include/stdint.h: Moved to...
+ * libc/include/stdint.h: ...here.
+
+2005-09-08 Jeff Johnston <jjohnstn@redhat.com>
+
+ * Makefile.am: Add include files under bits sub-directory.
+ * Makefile.in: Regenerated.
+ * libc/sys/linux/argp/argp-fs-xinl.c: Set __OPTIMIZE__ to
+ actual value of 1 to be compatible with newer glibc headers.
+ * libc/sys/linux/sys/cdefs.h: Fix to be compatible with newer
+ glibc headers.
+ * libc/sys/linux/sys/dirent.h: Ditto.
+ * libc/sys/linux/argp/argp-xinl.c: Ditto.
+ * libc/sys/linux/dl/dl-runtime.c: Make sure fixup and
+ profile_fixup routines are marked used so they won't be
+ optimized away.
+ * libc/sys/linux/dl/dl-cache.c: Don't use weak_extern macro
+ to mark functions as weak.
+ * libc/sys/linux/dl/dl-open.c: Ditto.
+ * libc/sys/linux/iconv/gconv_open.c: Fix to obey new gcc4
+ rules about lvalues.
+ * libc/sys/linux/iconv/gconv_simple.c: Ditto.
+ * libc/sys/linux/linuxthreads/bits/libc-lock.h: Don't use
+ weak_extern macro to mark functions as weak. Instead always
+ use #pragma weak.
+ * iconvdata/jis0208.h: Fix to work with gcc4.
+ * libc/sys/linux/dl/dl-load.c: Ditto.
+ * libc/sys/linux/dl/dl-reloc.c: Ditto.
+ * libc/sys/linux/dl/do-rel.h: Ditto.
+ * libc/sys/linux/dl/dynamic-link.h: Ditto.
+ * libc/sys/linux/include/ltdl.h: Ditto.
+ * libc/sys/linux/machine/i386/dl-machine.h: Ditto.
+ * libc/sys/linux/machine/i386/weakalias.h: Ditto.
+ * libc/sys/linux/net/ns_ntoa.c: Ditto.
+ * libc/sys/linux/bits/initspin.h: New file.
+ * libc/sys/linux/bits/libc-lock.h: Ditto.
+ * libc/sys/linux/bits/pthreadtypes.h: Ditto.
+ * libc/sys/linux/bits/typesizes.h: Ditto.
+
+2005-09-08 Eric Blake <ebb9@byu.net>
+
+ * libc/argz/argz_insert.c (argz_insert): Don't die with EINVAL when
+ before is NULL.
+
+2005-09-08 Brian Dessent <brian@dessent.net>
+
+ * sf_lrint.c (lrintf): Mask 'i0' correctly when extracting
+ mantissa.
+ * s_lrint.c: Ditto.
+
+2005-09-02 Jeff Johnston <jjohnstn@redhat.com>
+
+ * libc/include/stdio.h: Add prototype for viprintf.
+
+2005-09-01 Jeff Johnston <jjohnstn@redhat.com>
+
+ * libm/mathfp/s_pow.c: (pow): Change code so 0 raised to
+ any positive power results in 0.
+ * libm/mathfp/sf_pow.c (powf): Ditto.
+
+2005-08-31 Paul Brook <paul@codesourcery.com>
+
+ * configure.host: Set have_crt0 to no for Arm targts when not
+ providing syscalls. Set sys_dir=arm unconditionally.
+ Default have_crt0 based on sys_dir.
+ * configure.in: Use have_crt0.
+ * libc/configure.in: Ditto.
+ * libc/sys/configure.in: Ditto.
+ * configure: Regenerate.
+ * libc/configure: Regenerate.
+ * libc/sys/configure: Regenerate.
+ * libc/sys/arm/Makefile.am (lib_a_SOURCES): Add aeabi_atexit.c.
+ Only build other files when providing syscalls.
+ * libc/sys/arm/Makefile.in: Regenerate.
+ * libc/sys/arm/aeabi_atexit.c: New file.
+
+2005-08-26 Christopher Faylor <cgf@timesys.com>
+
+ * libc/include/string.h: Revert previous change.
+
+2005-08-25 Christopher Faylor <cgf@timesys.com>
+
+ * libc/include/string.h: For Cygwin, Define strerror_r as per ISO C.
+
+2005-08-22 Shaun Jackman <sjackman@gmail.com>
+
+ * libc/include/_syslist.h: If HAVE_OPENDIR is not defined,
+ define _opendir as opendir, _readdir as readdir, and
+ _closedir as closedir so that the implementations in
+ libc/posix will be used.
+
+2005-08-10 DJ Delorie <dj@redhat.com>
+
+ * MAINTAINERS (CPU Ports): Add CPU port maintainer section.
+
+2005-08-10 Stephen Huw Clarke <stephen.clarke@st.com>
+
+ * libm/common/sf_fmax.c: Fix to properly handle NaNs.
+ * libm/common/s_max.c: Ditto.
+ * libm/common/sf_fmin.c: Ditto.
+ * libm/common/s_min.c: Ditto.
+
+2005-08-10 DJ Delorie <dj@redhat.com>
+
+ * configure.host: Add m32c support.
+ * libc/include/machine/ieeefp.h: Likewise.
+ * libc/include/machine/setjmp.h: Likewise.
+ * libc/include/sys/config.h: Likewise.
+ * libc/machine/m32c: New directory, Renesas R8C/M16C/M32C support.
+ * libc/machine/m32c/aclocal.m4: New file.
+ * libc/machine/m32c/configure: Ditto.
+ * libc/machine/m32c/configure.in: Ditto.
+ * libc/machine/m32c/Makefile.am: Ditto.
+ * libc/machine/m32c/Makefile.in: Ditto.
+ * libc/machine/m32c/setjmp.S: Ditto.
+
+2005-08-02 Bob Wilson <bob.wilson@acm.org>
+
+ * libm/math/ef_hypot.c (__ieee754_hypotf): Add missing exponent bias
+ to the value for 2^126.
+
+2005-07-26 Hans-Peter Nilsson <hp@bitrange.com>
+
+ * libc/machine/cris/libcdtor.c (defaultors): Mark artificially as
+ used.
+
+2005-07-20 Bob Wilson <bob.wilson@acm.org>
+ Darin Petkov <darin@tensilica.com>
+
+ * libm/math/ef_atan2.c (pi, pi_lo): Use round-to-nearest value of pi.
+
+2005-07-19 Paul Brook <paul@codesourcery.com>
+
+ * libc/sys/arm/crt0.S: Ensure doubleword stack alignment.
+
+2005-07-18 Joseph S. Myers <joseph@codesourcery.com>
+
+ * testsuite/lib/checkoutput.exp (newlib_check_output): Use test
+ names after PASS and FAIL which do not depend on source directory
+ name or on whether test passed or failed.
+ * testsuite/lib/passfail.exp (newlib_pass_fail): Likewise.
+
+2005-07-08 Ola Hugosson <Ola.Hugosson@anoto.com>
+
+ * libc/string/wcsspn.c (wcsspn): Add missing increment of q.
+
+2005-07-07 Shaun Jackman <sjackman@gmail.com>
+
+ * libc/unix/ttyname.c (ttyname): Avoid calling _closedir
+ twice for the same directory. _closedir calls free, and freeing
+ the same pointer twice may cause a crash.
+
+2005-07-06 Aldy Hernandez <aldyh@redhat.com>
+
+ * configure.host: Added entry for ms1*.
+ * libc/include/machine/ieeefp.h: Handle ms1.
+ * libc/include/machine/setjmp.h (_JBLEN): Define for ms1.
+ * libc/machine/ms1/aclocal.m4: New.
+ * libc/machine/ms1/configure: New.
+ * libc/machine/ms1/configure.in: New.
+ * libc/machine/ms1/Makefile.am: New.
+ * libc/machine/ms1/Makefile.in: New.
+ * libc/machine/ms1/setjmp.S: New.
+
+2005-07-04 Mark Mitchell <mark@codesourcery.com>
+
+ * Makefile.am (site.exp): Set tmpdir.
+ * Makefile.in: Regenerated.
+ * testsuite/lib/checkoutput.exp (newlib_check_output): Put
+ executables in $tmpdir.
+ * testsuite/lib/flags.exp (libgloss_link_flags): Use the original
+ libgloss version if not running in the build directory.
+ * testsuite/lib/newlib.exp (newlib_init): Put testglue.o in
+ $tmpdir.
+ * testsuite/lib/passfail.exp (newlib_pass_fail): Put executables
+ in $tmpdir.
+
+2005-06-28 Dave Korn <dave.korn@artimi.com>
+
+ * libm/common/s_lrint.c (lrint): Fix signed-vs-unsigned comparison
+ and miscalculation caused by fp representation of zero.
+ * libm/common/sf_lrint.c (lrintf): Likewise.
+
+2005-06-16 Christopher Faylor <cgf@timesys.com>
+
+ * libc/stdio/vfprintf.c (cvt): Don't rely on pointer aliasing to
+ determine characteristics of long double. Use a union instead.
+ * ldtoa.c (_ldtoa_r): Ditto.
+ (_ldcheck): Ditto.
+ (_strtold): Ditto.
+ (union uconv): New union.
+
+2005-06-03 Jeff Johnston <jjohnstn@redhat.com>
+
+ * libc/stdlib/mallocr.c (MALLOC_COPY): Switch to use memmove
+ instead of memcpy.
+
+2005-05-12 Jeff Johnston <jjohnstn@redhat.com>
+
+ * configure.host (mn10300-*): Add long long I/O support by default.
+
+2005-05-12 Jeff Johnston <jjohnstn@redhat.com>
+
+ * libc/sys/linux/getpwuid.c: Removed.
+ * libc/sys/linux/getpwnam.c: Removed.
+ * libc/sys/linux/getpwent.c: New file containing logic
+ from files removed above. This allows overriding of file
+ in libc/unix.
+ * libc/sys/linux/Makefile.am: Support changes above.
+ * libc/sys/linux/Makefile.in: Regenerated.
+
+2005-04-28 Jeff Johnston <jjohnstn@redhat.com>
+
+ * libc/stdio/vfscanf.c (__svfscanf_r): Fix code thinko
+ when checking for multiple flags.
+
+2005-04-18 Hans-Peter Nilsson <hp@axis.com>
+
+ * configure.host <cris-*-* | crisv32-*-*>: Set
+ default_newlib_io_long_long="yes".
+
+2005-04-08 Jeff Johnston <jjohnstn@redhat.com>
+
+ * libc/include/libgen.h: New file.
+
+2005-04-08 Shaun Jackman <sjackman@gmail.com>
+
+ * libc/unix/Makefile.am: Add support for basename and dirname.
+ * libc/unix/Makefile.in: Regenerated.
+ * libc/unix/basename.c: New file.
+ * libc/unix/dirname.c: New file.
+
+2005-04-07 Shaun Jackman <sjackman@gmail.com>
+
+ * libc/sys/linux/inode.c (lchown): New function.
+
+2005-04-07 Shaun Jackman <sjackman@gmail.com>
+
+ * libc/unix/Makefile.am (LIB_OBJS): Include all the ELIX objects if no
+ ELIX level is defined.
+ * libc/unix/Makefile.in: Regenerated.
+
+2005-04-05 Dave Korn <dave.korn@artimi.com>
+
+ * libc/stdio/vfscanf.c (__svfscanf_r): If an error occurs processing
+ something that looks like a "NaN", put back the characters processed.
+
+2005-04-01 Corinna Vinschen <corinna@vinschen.de>
+
+ * libc/stdlib/strtod.c (_strtod_r): Never change s00.
+
+2005-03-23 Christopher Faylor <cgf@timesys.com>
+
+ * configure.host: For cygwin, redefine CC with cygwin include directory
+ first to mimic the behavior of the top-level configury. Move include
+ directory out of newlib_cflags.
+
+2005-03-22 Jeff Johnston <jjohnstn@redhat.com>
+
+ * configure.host: For arc, set -DREENTRANT_SYSCALLS_PROVIDED flag on.
+ * libc/sys/arc/syscalls.c: Change functions to use __errno_r rather
+ than errno.
+
+2005-03-22 Christopher Faylor <cgf@timesys.com>
+
+ * libc/include/machine/_types.h: Make trivial change to comment to
+ avoid a spurious warning from gcc.
+
+2005-03-21 Nicholas Wourms <nwourms@netscape.net>
+
+ * libc/stdio/vfprintf.c: Move newlib.h before _WANT_IO_POS_ARGS test,
+ since _WANT_IO_POS_ARGS is now defined in there. Remove duplicate
+ reent.h include.
+
+2005-03-18 Hans-Peter Nilsson <hp@axis.com>
+ Corinna Vinschen <corinna@vinschen.de>
+
+ * libc/include/ctype.h: Remove invalid +1 offset from
+ ctype macro references to __ctype_ptr.
+ (_ctype_): Move declaration outside #ifndef __cplusplus.
+
+2005-03-18 Corinna Vinschen <corinna@vinschen.de>
+
+ * libc/include/machine/setjmp.h (sigsetjmp): Use GCC extension to
+ evaluate first parameter only once.
+ (siglongjmp): Ditto.
+
+2005-03-17 Jeff Johnston <jjohnstn@redhat.com>
+
+ * configure.in: Add new check to see if compiler supports
+ aliasing of arrays and define _HAVE_ARRAY_ALIASING if true.
+ * configure: Regenerated.
+ * Makefile.in: Ditto.
+ * newlib.hin: Add _HAVE_ARRAY_ALIASING.
+ * libc/ctype/ctype_.c: Check for _HAVE_ARRAY_ALIASING before
+ aliasing the _ctype_ array to _ctype_b.
+ * libc/include/ctype.h: Change macros to use __ctype_ptr. Mark
+ _ctype_ as deprecated.
+
+2005-03-17 Hans-Peter Nilsson <hp@axis.com>
+
+ * configure.host (newlib_cflags) <cris-*-*, crisv32-*-*>: Add
+ -DCOMPACT_CTYPE.
+
+2005-03-06 Ralf Corsepius <ralf.corsepius@rtems.org>
+
+ * libc/sys/rtems/include/inttypes.h: New file.
+ * libc/sys/rtems/include/stdint.h: Ditto.
+
+2005-03-06 Ralf Corsepius <ralf.corsepius@rtems.org>
+
+ * libc/string/memcmp.c: Fix to avoid pointer signedness warning.
+
+2005-03-06 Ralf Corsepius <ralf.corsepius@rtems.org>
+
+ * libc/include/machine/_types.h: New file.
+ * libc/include/sys/types.h: Do not check for __rtems__
+ when including <machine/_types.h>. Remove some redundant
+ declarations now that <machine/_types.h> is included.
+ * libc/sys/rtems/machine/_types.h: Removed. Replaced with
+ shared header file.
+
+2005-02-25 Ralf Corsepius <ralf.corsepius@rtems.org>
+
+ * libm/common/fdlibm.h (FLT_UWORD_MAX, FLT_UWORD_HALF_MAX): Add
+ L qualifier for these long constants.
+
+2005-02-25 Eric Blake <ebb9@byu.net>
+
+ * libc/include/time.h (__tzrule_struct): Make offset long, since
+ a 16-bit int overflows on a 12-hour offset.
+ * libc/sys/linux/include/time.h: Ditto.
+ * libc/time/mktime.c (mktime): Use new type of __tzrule.offset.
+ * libc/time/mktm_r.c: Ditto.
+ * libc/time/gettzinfo.c: Ditto.
+ * libc/time/strftime.c (strftime): Fix '%x' to deal with negative
+ years. Fix '%z' to use long, not int.
+
+2005-02-24 Ralf Corsepius <ralf.corsepius@rtems.org>
+
+ * libm/common/s_fpclassify.c: Use __uint32_t instead of int to
+ manipulate float values in integer form.
+ * libm/common/sf_round.c: Ditto.
+
+2005-02-24 Ralf Corsepius <ralf.corsepius@rtems.org>
+
+ * libc/include/sys/types.h [__rtems__]: Include new
+ header file machine/_types.h.
+ * libc/include/machine/types.h: Ditto.
+ * libc/sys/rtems/machine/_types.h: New file.
+
+2005-02-23 Corinna Vinschen <corinna@vinschen.de>
+
+ * libc/include/time.h (_timezone): Change to long also for Cygwin.
+ (timezone): Drop cast from definition.
+
+2005-02-23 Jeff Johnston <jjohnstn@redhat.com>
+
+ * libc/include/time.h [!CYGWIN](_timezone): Change to long.
+ (__tzrule_type, __tzinfo_type): New types.
+ (__gettzinfo): New function.
+ * libc/sys/linux/include/time.h: Ditto.
+ * libc/time/Makefile.am: Add gettzinfo.c.
+ * libc/time/Makefile.in: Regenerated.
+ * libc/time/local.h: Moved __tzrule_type to time.h.
+ * libc/time/mktime.c: Call __gettzinfo to reference
+ __tznorth, __tzyear, and __tzrule array.
+ * libc/time/mktm_r.c: Ditto.
+ * libc/time/strftime.c: Ditto.
+ * libc/time/tzset_r.c: Ditto. Also remove definition
+ of __tzrule which is now in gettzinfo.c. Change _timezone
+ references to not cast to time_t.
+ * libc/time/gettzinfo.c: New file.
+
+2005-02-23 Corinna Vinschen <corinna@vinschen.de>
+
+ * libc/include/sys/unistd.h: Define getpeereid for Cygwin.
+
+2005-02-22 Corinna Vinschen <corinna@vinschen.de>
+
+ * libc/include/sys/unistd.h: Define fdatasync also for Cygwin.
+
+2005-02-16 Eric Blake <ebb9@byu.net>
+
+ * libc/time/time.tex: Improve the documentation.
+ * libc/time/strftime.c: Improve the documentation.
+ (iso_year_adjust): New helper function.
+ (strftime): Simplify '%E' and '%O'. Change '%c' to use
+ recursion. Fix '%C', '%y', and '%Y' to deal with years with more
+ than 4 characters. Combine '%d' and '%e'. Implement '%D', '%F',
+ '%g', '%G', '%n', '%R', '%t', '%T', '%u', '%V', '%X', and '%z'.
+ Avoid core dumps on valid inputs (maxsize == 0, or
+ tim_p->tm_isdst > 1).
+
+2005-02-08 Corinna Vinschen <corinna@vinschen.de>
+
+ * libc/include/pwd.h (struct passwd): Change pw_uid and pw_gid
+ members to uid_t and gid_t according to SUSv3.
+ * libc/include/sys/time.h (utimes): Change second parameter
+ to const according to SUSv3.
+
+2005-02-07 Antony King <antony.king@st.com>
+
+ * libc/stdio/clearerr.c (clearerr): Ensure CHECK_INIT() is
+ called before _flockfile to prevent lock object use before
+ initialisation. _REENT_SMALL_CHECK_INIT() and CHECK_INIT()
+ take a struct _reent * instead of a FILE *.
+ * libc/stdio/fclose.c (_fclose_r): Ditto.
+ * libc/stdio/feof.c (feof): Ditto.
+ * libc/stdio/ferror.c (ferror): Ditto.
+ * libc/stdio/fflush.c (fflush): Ditto.
+ * libc/stdio/fgetc.c (fgetc): Ditto.
+ * libc/stdio/fgets.c (fgets): Ditto.
+ * libc/stdio/fileno.c (fileno): Ditto.
+ * libc/stdio/fputc.c (fputc): Ditto.
+ * libc/stdio/fputs.c (fputs): Ditto.
+ * libc/stdio/fread.c (fread): Ditto.
+ * libc/stdio/freopen.c (_freopen_r): Ditto.
+ * libc/stdio/fseek.c (_fseek_r): Ditto.
+ * libc/stdio/ftell.c (_ftell_r): Ditto.
+ * libc/stdio/fwrite.c (fwrite): Ditto.
+ * libc/stdio/getc.c (getc): Ditto.
+ * libc/stdio/getdelim.c (__getdelim): Ditto.
+ * libc/stdio/putc.c (putc): Ditto.
+ * libc/stdio/setvbuf.c (setvbuf): Ditto.
+ * libc/stdio/ungetc.c (_ungetc_r): Ditto.
+ * libc/stdio/vfprintf.c (_VFPRINTF_R): Ditto.
+ * libc/stdio64/freopen64.c (_freopen64_r): Ditto.
+ * libc/stdio64/fseeko64.c (_fseeko64_r): Ditto.
+ * libc/stdio64/ftello64.c (_ftello64_r): Ditto.
+ * libc/stdio/local.h (CHECK_INIT): Argument is now a struct
+ _reent * instead of a FILE * and so replace incorrect use of
+ _REENT with argument.
+ * libc/sys/arm/syscalls.c (CHECK_INIT): Ditto.
+ * libc/stdio/getchar.c (getchar): _REENT_SMALL_CHECK_INIT() and
+ CHECK_INIT() take a struct _reent * instead of a FILE *.
+ * libc/stdio/iprintf.c (iprintf, _iprintf_r): Ditto.
+ * libc/stdio/iscanf.c (iscanf, _iscanf_r): Ditto.
+ * libc/stdio/perror.c (perror): Ditto.
+ * libc/stdio/printf.c (printf, _printf_r): Ditto.
+ * libc/stdio/putchar.c (putchar): Ditto.
+ * libc/stdio/puts.c (puts): Ditto.
+ * libc/stdio/refill.c (__srefill): Ditto.
+ * libc/stdio/scanf.c (scanf, _scanf_r): Ditto.
+ * libc/stdio/vfscanf.c (VFSCANF, _VFSCANF_R): Ditto.
+ * libc/stdio/viprintf.c (viprintf, _viprintf_r): Ditto.
+ * libc/stdio/viscanf.c (viscanf, _viscanf_r): Ditto.
+ * libc/stdio/vprintf.c (vprintf, _vprintf_r): Ditto.
+ * libc/stdio/vscanf.c (vscanf, _vscanf_r): Ditto.
+ * libc/stdio/wbuf.c (__swbuf): Ditto.
+ * libc/stdio/wsetup.c (__swsetup): Ditto.
+ * libc/stdlib/mallocr.c (malloc_stats): Ditto.
+ * libc/stdlib/mstats.c (_mstats_r): Ditto.
+ * libc/include/sys/reent.h (_REENT_SMALL_CHECK_INIT): Ditto.
+ * libc/machine/powerpc/vfscanf.c (vfscanf): Ditto.
+ * libc/stdio/fgetpos.c (_fgetpos_r): Removed unnecessary calls
+ to _flockfile and _funlockfile; rely on locking in _ftell_r.
+ * libc/stdio64/fgetpos64.c (_fgetpos64_r): Ditto (_ftello64_r).
+ * libc/machine/powerpc/vfprintf.c (__sbprintf): Removed unnecessary
+ initialision of _data field in FILE structure.
+ * libc/machine/powerpc/vfprintf.c (VFPRINTF): Added CHECK_INIT() call.
+
+2005-02-07 Jeff Johnston <jjohnstn@redhat.com>
+
+ * libc/stdio/findfp.c (__sinit): Protect with new lock.
+ (__sinit_lock): New lock.
+ (__sinit_lock_acquire, __sinit_lock_release): New functions.
+ * libc/stdio/local.h: Add reference to new __sinit locking
+ functions.
+
+2005-02-07 Jeff Johnston <jjohnstn@redhat.com>
+
+ * libc/include/math.h (isfinite, isnormal, isunordered): Change
+ input variable names to avoid mixups with nesting macros.
+
+2005-01-27 Hans-Peter Nilsson <hp@axis.com>
+
+ * configure.host: Add support for cris-*-* and crisv32-*-*.
+ * libc/include/machine/ieeefp.h: Ditto.
+ * libc/include/machine/setjmp.h: Ditto.
+ * libc/machine/cris/configure.in, libc/machine/cris/Makefile.am,
+ libc/machine/cris/libcdtor.c, libc/machine/cris/setjmp.c,
+ libc/machine/cris/memmove.c, libc/machine/cris/memcpy.c,
+ libc/machine/cris/memset.c, libc/machine/cris/include/pthread.h,
+ libc/machine/cris/sys/signal.h, libc/machine/cris/sys/fcntl.h,
+ libc/machine/cris/sys/errno.h, libc/machine/cris/aclocal.m4,
+ libc/machine/cris/configure, libc/machine/cris/Makefile.in: New
+ files.
+
+2005-01-27 Hans-Peter Nilsson <hp@axis.com>
+
+ * testsuite/newlib.string/memmove1.c: New test.
+
+2005-01-27 Hans-Peter Nilsson <hp@axis.com>
+
+ * testsuite/include/check.h: Include stdlib.h.
+
+2005-01-27 Hans-Peter Nilsson <hp@axis.com>
+
+ * Makefile.am (stmp-targ-include): Support include header files
+ from machine directories.
+ (install-data-local): Ditto.
+ * Makefile.in: Regenerate.
+
+2005-01-24 Jeff Johnston <jjohnstn@redhat.com>
+
+ * libc/include/string.h: Remove Linux-specific declaration of
+ strsignal and add #include <sys/string.h>.
+ * libc/include/sys/string.h: New file.
+ * libc/include/sys/linux/sys/string.h: New file with strsignal
+ declaration deleted above.
+
+2005-01-20 Jeff Johnston <jjohnstn@redhat.com>
+
+ * libc/time/strftime.c (strftime): Change %r and %x to be compliant
+ to POSIX standard for "C" locale. Allow %E and %O modifiers
+ to be ignored as long as they precede valid specifiers according
+ to POSIX.
+
+2005-01-19 Shaun Jackman <sjackman@gmail.com>
+
+ * libc/stdlib/setenv_r.c (_setenv_r): Call tzset() if the TZ
+ environment variable is set.
+
+2005-01-19 Shaun Jackman <sjackman@gmail.com>
+
+ * tzset_r.c (_tzname): Add a comma.
+
+2005-01-18 Aldy Hernandez <aldyh@redhat.com>
+
+ * libc/machine/powerpc/vfprintf.c: Use _REENT when calling
+ _VFPRINTF_R.
+
+2005-01-07 Paul Brook <paul@codesourcery.com>
+
+ * configure.in: Add test for .init_array.
+ * configure: Regenerate.
+ * newlib.hin: Add HAVE_INITFINI_ARRAY.
+ * libc/misc/Makefile.am: Add init.c
+ * libc/misc/Makefile.in: Regenerate.
+ * libc/misc/init.c: New file.
+ * libc/sys/arm/crt0.S: Call __libc_{init,fini}_array instead of
+ _init/_fini if they exist.
+
+2005-01-06 Jeff Johnston <jjohnstn@redhat.com>
+
+ * libc/stdlib/strtod.c (_strtod_r): Add NaN support.
+ * (strtof): Ditto.
+ * libc/stdio/vfscanf.c (__svfscanf_r): Ditto.
+ * Makefile.am (MATHOBJS_IN_LIBC): Add s_nan and sf_nan
+ functions for use by strtod and strtof.
+ * Makefile.in: Regenerated.
+
+2005-01-06 Hans-Peter Nilsson <hp@axis.com>
+
+ * libc/stdio/ftell.c (ftell_r): Add parenthesis for __SWR
+ bit-test in combination with NULL test.
+
+2005-01-06 Hans-Peter Nilsson <hp@axis.com>
+
+ * README: Fix typo of LGPL. Change "license" to "copyright".
+
+2004-12-17 Jeff Johnston <jjohnstn@redhat.com>
+
+ * NEWS: Update with 1.13.0 info.
+ * README: Ditto.
+ * acinclude.m4: Change version number to 1.13.0.
+ * aclocal.m4: Regenerated.
+ * configure: Ditto.
+ * doc/aclocal.m4: Ditto.
+ * doc/configure: Ditto.
+ * libc/*/aclocal.m4: Ditto.
+ * libc/*/configure: Ditto.
+ * libc/libc.texinfo: Ditto.
+ * libm/*/aclocal.m4: Ditto.
+ * libm/*/configure: Ditto.
+ * libm/libm.texinfo: Ditto.
+ * libc/sys/linux/shared.ld: Add VERS_1.13.
+
+2004-12-17 Christian Groessler <chris@groessler.org>
+
+ * libc/machine/z8k/memcmp.S: New file.
+ * libc/machine/z8k/memcpy.S: Ditto.
+ * libc/machine/z8k/memmove.S: Ditto.
+ * libc/machine/z8k/memset.S: Ditto.
+ * libc/machine/z8k/Makefile.am: Add new files.
+ * libc/machine/z8k/Makefile.in: Regenerated.
+ * libc/machine/z8k/setjmp.S: Fix indirect register usage in Z8002
+ part. Implement Z8002 stdcall version.
+
+2004-12-13 Jeff Johnston <jjohnstn@redhat.com>
+
+ * libc/stdio/fread.c (fread): For unbuffered I/O, attempt
+ a low-level read if we don't get the full amount of bytes so
+ EOF or error flags will be set.
+
+2004-12-09 Alex Mogilnikov <alx@intellectronika.ru>
+
+ * libc/time/tzset_r (_tzset_r): Properly skip over
+ '/' when it is detected.
+
+2004-12-08 Alex Mogilnikov <alx@intellectronika.ru>
+
+ * libc/time/tzset_r (_tzset_r): Fix loop.
+
+2004-12-08 Alex Mogilnikov <alx@intellectronika.ru>
+
+ * libc/time/mktm_r (_mktm_r): Fix overflow calculation for
+ m_day.
+ (__tzcalc_limits): Fix reference to month array to be zero-based.
+
+2004-12-07 Jeff Johnston <jjohnstn@redhat.com>
+
+ * libc/sys/linux/sys/unistd.h: Add prototypes for ftruncate, truncate,
+ and usleep.
+
+2004-12-03 Jeff Johnston <jjohnstn@redhat.com>
+
+ * Makefile.am (libc_la_LDFLAGS): Add -lgcc to handle any
+ libgcc dependencies.
+ (libm_la_LDFLAGS): Ditto.
+ * Makefile.in: Regenerated.
+
+2004-12-03 Shaun Jackman <sjackman@gmail.com>
+
+ * libc/sys/linux/linuxthreads/Makefile.am (install-data-local): Fix
+ our link to use readlink so as to preserve any relative link created
+ by install-toollibLIBRARIES.
+ * libc/sys/linux/linuxthreads/Makefile.in: Regenerated.
+
+2004-12-02 Shaun Jackman <sjackman@gmail.com>
+
+ * libc/sys/linux/stdlib/glob.c: Include <sys/types.h> which defines
+ time_t before including sys/stat.h, which uses it.
+ * libc/sys/linux/sys/stat.h: Include <sys/types.h> and
+ <linux/time.h> just prior to definition of __KERNEL__ so as to
+ allow building on Debian Linux where otherwise, mktime would
+ be redefined.
+
+2004-11-26 Paul Brook <paul@codesourcery.com>
+
+ * libc/sys/arm/crt0.S (_start): Add .cantunwind annotation.
+
+2004-11-24 Jeff Johnston <jjohnstn@redhat.com>
+
+ * libc/include/stdlib.h (putenv, _putenv_r): Change to remove
+ const for value string parameter to match Single Unix and glibc.
+ * libc/stdlib/putenv.c: Ditto.
+ * libc/stdlib/putenv_r.c: Ditto.
+
+2004-11-24 Jeff Johnston <jjohnstn@redhat.com>
+
+ * libc/stdio/Makefile.am: Fix missing vfscanf.
+ * libc/stdio/Makefile.in: Regenerated.
+
+2004-11-23 Jeff Johnston <jjohnstn@redhat.com>
+
+ * libc/include/stdio.h: Add new iprintf and iscanf variants. Also
+ do some reordering.
+ * libc/machine/powerpc/vfscanf.c: Remove __sccl function.
+ * libc/stdio/Makefile.am: Add support for new iprintf and iscanf
+ family functions.
+ * libc/stdio/Makefile.in: Regenerated.
+ * libc/stdio/fiprintf.c: Remove doc to siprintf.c.
+ * libc/stdio/iprintf.c: Ditto.
+ * libc/stdio/local.h (__svfiscanf_r): New prototype.
+ * libc/stdio/siprintf.c: Add docs for various iprintf family functions.
+ * libc/stdio/sniprintf.c: Move docs to siprintf.c.
+ * libc/stdio/stdio.tex: Add new functions.
+ * libc/stdio/vfscanf.c: Split out __sccl function to separate
+ file and add special name defines so this file can be used
+ to build vfiscanf.o.
+ * libc/stdio/asiprintf.c: New file.
+ * libc/stdio/fiscanf.c: Ditto.
+ * libc/stdio/iscanf.c: Ditto.
+ * libc/stdio/sccl.c: Ditto.
+ * libc/stdio/siscanf.c: Ditto.
+ * libc/stdio/vasiprintf.c: Ditto.
+ * libc/stdio/viprintf.c: Ditto.
+ * libc/stdio/viscanf.c: Ditto.
+ * libc/stdio/vsiprintf.c: Ditto.
+ * libc/stdio/vsiscanf.c: Ditto.
+ * libc/stdio/vsniprintf.c: Ditto.
+
+2004-11-19 Shaun Jackman <sjackman@gmail.com>
+
+ * libc/include/stdio.h: Add sniprintf.
+ * libc/stdio/Makefile.am: Add sniprintf.c.
+ * libc/stdio/Makefile.in: Regenerated.
+ * libc/stdio/sniprintf.c: New file.
+ * libc/stdio/stdio.tex: Add sniprintf.
+
+2004-11-17 Christopher Faylor <cgf@timesys.com>
+
+ * libc/stdio/refill.c (__srefill): Try again after EOF on Cygwin. Clear
+ EOF flag if successful.
+
+2004-10-28 Christopher Faylor <cgf@timesys.com>
+
+ * libc/include/sys/signal.h: Move <signal.h> include to bottom of file
+ so that all relevant definitions have been performed for use in the
+ include.
+
+2004-10-26 Jason Tishler <jason@tishler.net>
+
+ * libc/stdio/fread.c (fread): Fix return value for unbuffered
+ fread.
+
+2004-10-25 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
+
+ * libc/include/machine/setjmp.h: Add AVR support.
+ * libc/sys/rtems/crt0.S [__AVR__]: Add __stack.
+
+2004-10-08 Jeff Johnston <jjohnstn@redhat.com>
+
+ * libc/include/sys/signal.h: If <signal.h> didn't include
+ this header file, include <signal.h> to account for
+ applications that take advantage that the two header
+ files are the same in glibc.
+
+2004-10-05 Tomer Levi <Tomer.Levi@nsc.com>
+
+ * configure.host: Add support for crx.
+ * libc/include/machine/ieeefp.h: Ditto.
+ * libc/include/machine/setjmp.h: Ditto.
+ * libc/machine/crx/Makefile.am: New file.
+ * libc/machine/crx/configure.in: Ditto.
+ * libc/machine/crx/setjmp.S: Ditto.
+ * libc/machine/crx/getenv.c: Ditto.
+ * libc/machine/crx/aclocal.m4: Generate.
+ * libc/machine/crx/configure: Ditto.
+ * libc/machine/crx/Makefile.in: Ditto.
+ * libc/machine/crx/sys/asm.h: New file.
+ * libc/machine/crx/sys/libh.h: Ditto.
+ * libc/machine/crx/sys/syscall.h: Ditto.
+
+2004-10-05 Jeff Johnston <jjohnstn@redhat.com>
+
+ * Makefile.am (stmp-targ-include): Support sys header files
+ from machine directories.
+ * Makefile.in: Regenerated.
+
+2004-10-04 Jeff Johnston <jjohnstn@redhat.com>
+
+ * libc/stdio/vfscanf.c (__svfscanf_r): For int conversions,
+ count skipped zero characters as part of the nread count for %n.
+ * libc/machine/powerpc/vfscanf.c: Ditto.
+
+2004-09-24 Jeff Johnston <jjohnstn@redhat.com>
+
+ * libc/stdio/local.h: Include <stdlib.h>.
+
+2004-09-24 Corinna Vinschen <corinna@vinschen.de>
+
+ * libc/stdio/fread.c (fread): Include <malloc.h>.
+
+2004-09-22 Jeff Johnston <jjohnstn@redhat.com>
+
+ * libc/stdio/fread.c (fread): For non-space-optimized case,
+ add special code for unbuffered files to use user buffer and
+ only require one low-level system read.
+
+2004-09-21 Ian Lance Taylor <ian@wasabisystems.com>
+
+ * libc/machine/xscale/setjmp.S: New file, copied from
+ libc/machine/arm/setjmp.S.
+ * libc/machine/xscale/Makefile.am (lib_a_SOURCES): Add setjmp.S.
+ * libc/machine/xscale/Makefile.in: Regenerate.
+
+2004-09-16 Antony King <antony.king@st.com>
+
+ * libc/include/sys/lock.h: Replaced empty {} with (0) to conform
+ with locking API.
+ * libc/include/sys/stdio.h: (_flockfile)[!_SINGLE_THREAD]: Add
+ check for__SSTR in _flags and if set, skip lock request.
+ (_funlockfile)[!SINGLE_THREAD]: Ditto.
+ * libc/stdio/local.h (CHECK_INIT): Added check that _REENT is
+ not NULL.
+ * libc/stdio/siprintf.c (siprintf, _siprintf_r): Added missing
+ initialisation of _file to -1 in local FILE.
+ * libc/stdio/snprintf.c (snprintf, _snprintf_r): Ditto.
+ * libc/stdio/sscanf.c (sscanf, _sscanf_r): Ditto.
+ * libc/stdio/vsnprintf.c (vsnprintf, _vsnprintf_r): Ditto.
+ * libc/stdio/vsscanf.c (_vsscanf_r): Ditto.
+ * libc/stdio/sscanf.c (sscanf, _sscanf_r): Added __SSTR flag to
+ _flags in local FILE to prevent locking.
+ * libc/stdio/vsscanf.c (_vsscanf_r): Ditto.
+
+2004-09-16 Antony King <antony.king@st.com>
+
+ * libc/stdio/fwalk.c (_fwalk): Remove check for _GLOBAL_REENT
+ and only walk the reentrancy parameter.
+ (_fwalk_reent): Ditto.
+ * libc/stdlib/exit.c: Remove out of date _REENT_ONLY check.
+
+2004-09-16 Antony King <antony.king@st.com>
+
+ * libc/stdio64/freopen64.c: Remove casting of fp lock to
+ _LOCK_RECURSIVE_T.
+
+2004-09-16 Antony King <antony.king@st.com>
+
+ * libc/time/tzlock.c: Add default stubs that use generic
+ locking code.
+
+2004-09-16 Antony King <antony.king@st.com>
+
+ * libc/ctype/ctype.tex: Added missing documentation.
+ * libc/stdio/stdio.tex Ditto.
+ * libc/stdlib/stdlib.tex Ditto.
+ * libc/string/strings.tex Ditto.
+ * libc/time/time.tex: Ditto.
+ * libc/stdio/setbuffer.c: Removed setlinebuf documentation.
+
+2004-09-15 Corinna Vinschen <vinschen@redhat.com>
+
+ * libc/reent/impure.c (reent_data): Define as alias to impure_data
+ when building for Cygwin.
+ * libc/include/sys/reent.h (_GLOBAL_REENT): Revert definition to
+ _global_impure_ptr.
+
+2004-09-15 Jeff Johnston <jjohnstn@redhat.com>
+
+ * configure.host: Reverting 2004-09-14 change as fix has occurred on
+ Cygwin side.
+ * configure.in: Ditto.
+ * libc/configure.in: Ditto.
+ * libc/sys/configure.in: Ditto.
+ * configure: Ditto.
+ * libc/configure: Ditto.
+ * libc/sys/configure: Ditto.
+ * libc/include/sys/reent.h: Ditto.
+ * libc/stdlib/__atexit.c: Ditto.
+ * libc/stdlib/__call_atexit.c: Ditto.
+ * libc/stdlib/cxa_atexit.c: Ditto.
+ * libc/stdlib/cxa_finalize.c: Ditto.
+ * libc/sys/cygwin/Makefile.am: Removed again.
+ * libc/sys/cygwin/Makefile.in: Ditto.
+ * libc/sys/cygwin/aclocal.m4: Ditto.
+ * libc/sys/cygwin/configure: Ditto.
+ * libc/sys/cygwin/configure.in: Ditto.
+ * libc/sys/cygwin/dummy.c: Ditto.
+ * libc/sys/cygwin/sys/reent.h: Ditto.
+
+2004-09-14 Jeff Johnston <jjohnstn@redhat.com>
+
+ * configure.host: Add Cygwin sys directory.
+ * configure.in: Do not set CRT0 for cygwin.
+ * libc/configure.in: Ditto.
+ * libc/sys/configure.in: Ditto.
+ * configure: Regenerated.
+ * libc/configure: Ditto.
+ * libc/sys/configure: Ditto.
+ * libc/include/sys/reent.h: Add __REENT_HAS_CXA_SUPPORT flag.
+ * libc/stdlib/__atexit.c: Keep cxa support protected by new
+ __REENT_HAS_CXA_SUPPORT flag.
+ * libc/stdlib/__call_atexit.c: Ditto.
+ * libc/stdlib/cxa_atexit.c: Ditto.
+ * libc/stdlib/cxa_finalize.c: Ditto.
+ * libc/sys/cygwin/Makefile.am: New file.
+ * libc/sys/cygwin/Makefile.in: Ditto.
+ * libc/sys/cygwin/aclocal.m4: Ditto.
+ * libc/sys/cygwin/configure: Ditto.
+ * libc/sys/cygwin/configure.in: Ditto.
+ * libc/sys/cygwin/dummy.c: Ditto.
+ * libc/sys/cygwin/sys/reent.h: Ditto. This file is stabilized
+ version of reent.h.
+
+2004-09-13 Artem B. Bityuckiy <dedekind@oktetlabs.ru>
+
+ * libc/iconv/iconv.tex: Updated with new content.
+ * libc/iconv/lib/iconvnls.c: Reference ICONV_DEFAULT_NLSPATH
+ instead of NLS_DEFAULT_NLSPATH.
+ * libc/iconv/lib/iconvnls.h: Fix typo.
+ * libc/include/sys/iconvnls.h: New file.
+
+2004-09-09 Paul Brook <paul@codesourcery.com>
+
+ * libc/include/sys/reent.h (struct _on_exit_args): Add _dso_handle
+ and _is_cxa.
+ (struct _atexit): Add _next when _REENT_SMALL.
+ (struct _reent): Add _atexit0 when _REENT_SMALL.
+ (_REENT_INIT_PTR): Adjust.
+ * libc/stdlib/Makefile.am (GENERAL_SOURCES): Add __atexit.c and
+ __call_exit.c.
+ (EXTENDED_SOURCES): Add cxa_atexit.c and cxa_finalize.c.
+ * libc/stdlib/Makefile.in: Regenerate.
+ * libc/stdlib/__atexit.c: New file.
+ * libc/stdlib/__call_atexit.c: New file.
+ * libc/stdlib/atexit.h: Remove old definitions. Add new.
+ * libc/stdlib/atexit.c (atexit): Use __register_exitproc.
+ * libc/stdlib/cxa_atexit.c: New file.
+ * libc/stdlib/cxa_finalize.c: New file.
+ * libc/stdlib/exit.c (exit): Use __call_exitprocs.
+ * libc/stdlib/on_exit.c (on_exit): Use __register_exitproc.
+ 2004-09-09 Jeff Johnston <jjohnstn@redhat.com>
+ * libc/reent/reent.c [_REENT_SMALL]: Fix reference to
+ _on_exit_args_ptr.
+
+2004-08-23 Jeff Johnston <jjohnstn@redhat.com>
+
+ * libc/include/sys/unistd.h (getpass): Change prototype to use
+ const instead of __const.
+
+2004-08-16 Nathan Sidwell <nathan@codesourcery.com>
+
+ * libc/stdio/vfscanf.c (_NO_LONGLONG): Move out of FLOATING_POINT
+ #if.
+
+2004-08-12 Jeff Johnston <jjohnstn@redhat.com>
+
+ * libc/sys/linux/sys/types.h (u64): New typedef to allow building
+ on linux systems with glibc 2.3.3 installed.
+ * libc/sys/linux/dl/dl-runtime.c: Fix prototypes for fixup and
+ profile_fixup so newlib can build on fc3 system.
+
+2004-07-30 Alexandre Oliva <aoliva@redhat.com>
+
+ Introduce SH2a support.
+ 2004-03-16 Corinna Vinschen <vinschen@redhat.com>
+ * libc/include/machine/ieeefp.h: Define _DOUBLE_IS_32BITS for
+ __SH2A_SINGLE_ONLY__, too.
+ * libc/machine/sh/asm.h: Define DELAYED_BRANCHES for __SH2A__, too.
+ 2004-02-24 Corinna Vinschen <vinschen@redhat.com>
+ * libc/sys/sh/crt0.S (start_l): Support sh2a-nofpu. Fix comments.
+ 2004-02-10 DJ Delorie <dj@redhat.com>
+ * libc/sys/sh/crt0.S (start_l): Support sh2a.
+
+2004-07-29 Jeff Johnston <jjohnstn@redhat.com>
+
+ * libc/time/strptime.c: Correct full-name of "March" typo.
+
+2004-07-16 Anil Paranjpe <anilp1@kpitcummins.com>
+
+ * configure.host (h8300*-*-*): Default long long printing support.
+
+2004-07-16 Jeff Johnston <jjohnstn@redhat.com>
+
+ * libc/stdio/fvwrite.c (_sfvwrite): For asprintf family
+ calls, if realloc fails, free up buffer as it is no longer
+ used.
+
+2004-07-07 Artem B. Bityuckiy <dedekind@oktetlabs.ru>
+
+ * libc/iconv/iconv.tex: Updated to represent recent changes.
+ * libc/iconv/lib/iconv.c: Documentation updated.
+
+2004-07-07 Nick Clifton <nickc@redhat.com>
+
+ * configure.host (newlib_cflags): Define PREFER_SIZE_OVER_SPEED
+ for xStormy16.
+
+2004-07-06 Chris Demetriou <cgd@broadcom.com>
+
+ * configure.host (mips*-*-elf*): Default long long printing
+ support.
+
+2004-07-05 Jeff Johnston <jjohnstn@redhat.com>
+
+ * libc/Makefile.am (libc.dvi): Add target and specify
+ same dependencies as libc.info.
+ * libc/Makefile.in: Regenerated.
+ * libm/Makefile.am (libm.dvi): Add target and specify
+ same dependencies as libm.info.
+ * libm/Makefile.in: Regenerated.
+
+2004-06-29 Artem B. Bityuckiy <dedekind@oktetlabs.ru>
+
+ * acinclude.m4: Move --enable-newlib-iconv option back here.
+ * configure.in: Remove --enable-newlib-iconv option. Don't
+ tie iconv support to --enable-newlib-mb.
+ * aclocal.m4: Regenerated.
+ * configure: Ditto.
+ * doc/aclocal.m4, doc/configure: Ditto.
+ * iconvdata/aclocal.m4, iconvdata/configure: Ditto.
+ * libm/*/aclocal.m4: Ditto.
+ * libm/*/configure: Ditto.
+ * libc/*/aclocal.m4: Ditto.
+ * libc/*/configure: Ditto.
+
+2004-06-25 Artem B. Bityuckiy <dedekind@oktetlabs.ru>
+
+ * acinclude.m4: Move iconv options into configure.in.
+ * aclocal.m4: Regenerated.
+ * configure: Ditto.
+ * configure.in: Add iconv options.
+ * newlib.hin: Add new iconv encodings and remove deleted ones.
+ * doc/aclocal.m4: Regenerated.
+ * doc/configure: Ditto.
+ * iconvdata/aclocal.m4: Ditto.
+ * iconvdata/configure: Ditto.
+ * libc/iconv: Design change. New size-optimized ccs format.
+ * libc/iconv/AUTHORS: Removed.
+ * libc/iconv/COPYING: Ditto.
+ * libc/iconv/README.ORIGINAL: Ditto.
+ * libc/iconv/README.TODO: Ditto.
+ * libc/iconv/charset.aliases: Ditto.
+ * libc/iconv/encoding.aliases: New file.
+ * libc/iconv/Makefile.am: Updated.
+ * libc/iconv/Makefile.in: Regenerated.
+ * libc/iconv/iconv.tex: Updated.
+ * libc/iconv/ccs/Makefile.am: Ditto.
+ * libc/iconv/ccs/Makefile.in: Regenerated.
+ * libc/iconv/ccs/big5.c: Updated.
+ * libc/iconv/ccs/cns11643_plane1.c: Ditto.
+ * libc/iconv/ccs/cns11643_plane14.c: Ditto.
+ * libc/iconv/ccs/cns11643_plane2.c: Ditto.
+ * libc/iconv/ccs/cp775.c: Ditto.
+ * libc/iconv/ccs/cp850.c: Ditto.
+ * libc/iconv/ccs/cp852.c: Ditto.
+ * libc/iconv/ccs/cp855.c: Ditto.
+ * libc/iconv/ccs/cp866.c: Ditto.
+ * libc/iconv/ccs/iso_8859_1.c: Ditto.
+ * libc/iconv/ccs/README.CCS.SOURCES: Removed.
+ * libc/iconv/ccs/gb_2312_80.c: Ditto.
+ * libc/iconv/ccs/iconv_mktbl: Ditto.
+ * libc/iconv/ccs/jis_x0201.c: Ditto.
+ * libc/iconv/ccs/jis_x0208_1983.c: Ditto.
+ * libc/iconv/ccs/shift_jis.c: Ditto.
+ * libc/iconv/ccs/us_ascii.c: Ditto.
+ * libc/iconv/ccs/ccs.h: New file.
+ * libc/iconv/ccs/ccsbi.c: Ditto.
+ * libc/iconv/ccs/ccsbi.h: Ditto.
+ * libc/iconv/ccs/ccsnames.h: Ditto.
+ * libc/iconv/ccs/iso_8859_10.c: Ditto.
+ * libc/iconv/ccs/iso_8859_11.c: Ditto.
+ * libc/iconv/ccs/iso_8859_13.c: Ditto.
+ * libc/iconv/ccs/iso_8859_14.c: Ditto.
+ * libc/iconv/ccs/iso_8859_3.c: Ditto.
+ * libc/iconv/ccs/iso_8859_6.c: Ditto.
+ * libc/iconv/ccs/iso_8859_7.c: Ditto.
+ * libc/iconv/ccs/iso_8859_8.c: Ditto.
+ * libc/iconv/ccs/iso_8859_9.c: Ditto.
+ * libc/iconv/ccs/iso_ir_111.c: Ditto.
+ * libc/iconv/ccs/jis_x0201_1976.c: Ditto.
+ * libc/iconv/ccs/jis_x0208_1990.c: Ditto.
+ * libc/iconv/ccs/koi8_ru.c: Ditto.
+ * libc/iconv/ccs/koi8_uni.c: Ditto.
+ * libc/iconv/ccs/mktbl.pl: Ditto.
+ * libc/iconv/ccs/win_1250.c: Ditto.
+ * libc/iconv/ccs/win_1251.c: Ditto.
+ * libc/iconv/ccs/win_1252.c: Ditto.
+ * libc/iconv/ccs/win_1253.c: Ditto.
+ * libc/iconv/ccs/win_1254.c: Ditto.
+ * libc/iconv/ccs/win_1255.c: Ditto.
+ * libc/iconv/ccs/win_1256.c: Ditto.
+ * libc/iconv/ccs/win_1257.c: Ditto.
+ * libc/iconv/ccs/win_1258.c: Ditto.
+ * libc/iconv/ccs/iso_8859_15.c: Updated.
+ * libc/iconv/ccs/iso_8859_2.c: Ditto.
+ * libc/iconv/ccs/iso_8859_4.c: Ditto.
+ * libc/iconv/ccs/iso_8859_5.c: Ditto.
+ * libc/iconv/ccs/jis_x0212_1990.c: Ditto.
+ * libc/iconv/ccs/koi8_r.c: Ditto.
+ * libc/iconv/ccs/koi8_u.c: Ditto.
+ * libc/iconv/ccs/ksx1001.c: Ditto.
+ * libc/iconv/ccs/binary/gb_2312_80.cct: Removed.
+ * libc/iconv/ccs/binary/jis_x0201.cct: Ditto.
+ * libc/iconv/ccs/binary/shift_jis.cct: Ditto.
+ * libc/iconv/ccs/binary/us_ascii.cct: Ditto.
+ * libc/iconv/ccs/binary/jis_x0208_1983.cct: Ditto.
+ * libc/iconv/ccs/binary/Makefile.am: Updated.
+ * libc/iconv/ccs/binary/Makefile.in: Regenerated.
+ * libc/iconv/ccs/binary/big5.cct: Updated.
+ * libc/iconv/ccs/binary/cns11643_plane1.cct: Ditto.
+ * libc/iconv/ccs/binary/cns11643_plane14.cct: Ditto.
+ * libc/iconv/ccs/binary/cns11643_plane2.cct: Ditto.
+ * libc/iconv/ccs/binary/cp775.cct: Updated.: Ditto.
+ * libc/iconv/ccs/binary/cp850.cct: Ditto.: Ditto.
+ * libc/iconv/ccs/binary/cp852.cct: Ditto.: Ditto.
+ * libc/iconv/ccs/binary/cp855.cct: Ditto.: Ditto.
+ * libc/iconv/ccs/binary/cp866.cct: Ditto.: Ditto.
+ * libc/iconv/ccs/binary/iso_8859_1.cct: Ditto.
+ * libc/iconv/ccs/binary/iso_8859_15.cct: Ditto.
+ * libc/iconv/ccs/binary/iso_8859_4.cct: Ditto.
+ * libc/iconv/ccs/binary/iso_8859_5.cct: Ditto.
+ * libc/iconv/ccs/binary/iso_8859_2.cct: Ditto.
+ * libc/iconv/ccs/binary/jis_x0212_1990.cct: Ditto.
+ * libc/iconv/ccs/binary/koi8_r.cct: Ditto.
+ * libc/iconv/ccs/binary/koi8_u.cct: Ditto.
+ * libc/iconv/ccs/binary/ksx1001.cct: Ditto.
+ * libc/iconv/ccs/binary/iso_8859_10.cct: New file.
+ * libc/iconv/ccs/binary/iso_8859_11.cct: Ditto.
+ * libc/iconv/ccs/binary/iso_8859_13.cct: Ditto.
+ * libc/iconv/ccs/binary/iso_8859_14.cct: Ditto.
+ * libc/iconv/ccs/binary/iso_8859_3.cct: Ditto.
+ * libc/iconv/ccs/binary/iso_8859_6.cct: Ditto.
+ * libc/iconv/ccs/binary/iso_8859_7.cct: Ditto.
+ * libc/iconv/ccs/binary/iso_8859_8.cct: Ditto.
+ * libc/iconv/ccs/binary/iso_8859_9.cct: Ditto.
+ * libc/iconv/ccs/binary/iso_ir_111.cct: Ditto.
+ * libc/iconv/ccs/binary/jis_x0201_1976.cct: Ditto.
+ * libc/iconv/ccs/binary/jis_x0208_1990.cct: Ditto.
+ * libc/iconv/ccs/binary/koi8_ru.cct: Ditto.
+ * libc/iconv/ccs/binary/koi8_uni.cct: Ditto.
+ * libc/iconv/ccs/binary/win_1250.cct: Ditto.
+ * libc/iconv/ccs/binary/win_1251.cct: Ditto.
+ * libc/iconv/ccs/binary/win_1252.cct: Ditto.
+ * libc/iconv/ccs/binary/win_1253.cct: Ditto.
+ * libc/iconv/ccs/binary/win_1254.cct: Ditto.
+ * libc/iconv/ccs/binary/win_1255.cct: Ditto.
+ * libc/iconv/ccs/binary/win_1256.cct: Ditto.
+ * libc/iconv/ccs/binary/win_1257.cct: Ditto.
+ * libc/iconv/ccs/binary/win_1258.cct: Ditto.
+ * libc/iconv/ces/Makefile.am: Updated.
+ * libc/iconv/ces/Makefile.in: Regenerated.
+ * libc/iconv/ces/ucs-2-internal.c: Updated.
+ * libc/iconv/ces/ucs-4-internal.c: Ditto.
+ * libc/iconv/ces/utf-16.c: Ditto.
+ * libc/iconv/ces/utf-8.c: Ditto.
+ * libc/iconv/ces/cesbi.c: New file.
+ * libc/iconv/ces/cesbi.h: Ditto.
+ * libc/iconv/ces/cesdeps.h: Ditto.
+ * libc/iconv/ces/euc.c: Ditto.
+ * libc/iconv/ces/mkdeps.pl: Ditto.
+ * libc/iconv/ces/table-pcs.c: Ditto.
+ * libc/iconv/ces/table.c: Ditto.
+ * libc/iconv/ces/ucs-2.c: Ditto.
+ * libc/iconv/ces/ucs-4.c: Ditto.
+ * libc/iconv/ces/us-ascii.c: Ditto.
+ * libc/iconv/ces/euc-jp.c: Removed.
+ * libc/iconv/ces/euc-kr.c: Ditto.
+ * libc/iconv/ces/euc-tw.c: Ditto.
+ * libc/iconv/ces/gb2312.c: Ditto.
+ * libc/iconv/ces/iso-10646-ucs-2.: Ditto.c
+ * libc/iconv/ces/iso-10646-ucs-4.c: Ditto.
+ * libc/iconv/lib/Makefile.am: Updated.
+ * libc/iconv/lib/Makefile.in: Regenerated.
+ * libc/iconv/lib/endian.h: Updated.
+ * libc/iconv/lib/iconv.c: Ditto.
+ * libc/iconv/lib/local.h: Ditto.
+ * libc/iconv/lib/aliases.c: Removed.
+ * libc/iconv/lib/bialiasesi.c: Ditto.
+ * libc/iconv/lib/biccs.c: Ditto.
+ * libc/iconv/lib/bices.c: Ditto.
+ * libc/iconv/lib/ccs.c: Ditto.
+ * libc/iconv/lib/ces.c: Ditto.
+ * libc/iconv/lib/ces_euc.c: Ditto.
+ * libc/iconv/lib/ces_iso2022.c: Ditto.
+ * libc/iconv/lib/ces_table.c: Ditto.
+ * libc/iconv/lib/converter.c: Ditto.
+ * libc/iconv/lib/deps.h: Ditto.
+ * libc/iconv/lib/loaddata.c: Ditto.
+ * libc/iconv/lib/aliasesbi.c: New file.
+ * libc/iconv/lib/aliasesi.c: Ditto.
+ * libc/iconv/lib/conv.h: Ditto.
+ * libc/iconv/lib/encnames.h: Ditto.
+ * libc/iconv/lib/encoding.deps: Ditto.
+ * libc/iconv/lib/iconvnls.c: Ditto.
+ * libc/iconv/lib/iconvnls.h: Ditto.
+ * libc/iconv/lib/nullconv.c: Ditto.
+ * libc/iconv/lib/ucsconv.c: Ditto.
+ * libc/iconv/lib/ucsconv.h: Ditto.
+ * libc/include/iconv.h: Update copyright.
+ * libc/*/aclocal.m4: Regenerated.
+ * libc/*/configure: Ditto.
+ * libm/*/aclocal.m4: Ditto.
+ * libm/*/configure: Ditto.
+
+2004-06-22 Alexandre Oliva <aoliva@redhat.com>
+
+ * libc/include/machine/setjmp.h [__H8300__] (_JBTYPE): Define,
+ instead of typedefing jmp_buf.
+
+ 2003-07-02 Richard Sandiford <rsandifo@redhat.com>
+ * libc/machine/h8300/Makefile.am (lib_a_SOURCES): Add h8sx_strcpy.S.
+ * libc/machine/h8300/defines.h (LEN): New macro.
+ * libc/machine/h8300/memcpy.S: Add h8sx version.
+ * libc/machine/h8300/memset.S: Likewise.
+ * libc/machine/h8300/strcmp.S: Likewise.
+ * libc/machine/h8300/setjmp.S: Use h8sx move instructions.
+ * libc/machine/h8300/h8sx_strcpy.S: New file.
+ 2003-06-30 Richard Sandiford <rsandifo@redhat.com>
+ * libc/include/machine/ieeefp.h: Extend __H8300S__ handling to
+ __H8300SX__.
+ * libc/include/machine/setjmp.h: Likewise.
+ * libc/include/sys/config.h: Likewise.
+ * libc/machine/h8300/defines.h: Likewise.
+ * libc/machine/h8300/setjmp.S: Likewise.
+ * libc/machine/h8300/strcmp.S: Likewise.
+ * libc/sys/h8300hms/close.S: Likewise.
+ * libc/sys/h8300hms/fstat.S: Likewise.
+ * libc/sys/h8300hms/lseek.S: Likewise.
+ * libc/sys/h8300hms/read.S: Likewise.
+ * libc/sys/h8300hms/write.S: Likewise.
+ * libc/sys/h8300hms/crt0.S: Likewise.
+ * libc/machine/h8300/setarch.h: Use .h8300sx or .h8300sxn if
+ __H8300SX__ is defined.
+ * libc/sys/h8300hms/setarch.h: Likewise.
+
+2004-06-17 Jeff Johnston <jjohnstn@redhat.com>
+
+ * libc/include/sys/reent.h (_GLOBAL_REENT): Back
+ out change which set _GLOBAL_REENT to _global_impure_ptr until
+ we understand why Cygwin breaks because of it.
+
+2004-06-14 Jeff Johnston <jjohnstn@redhat.com>
+
+ * libc/sys/linux/machine/i386/syscall.h: For now, set up
+ __syscall_return macro for systems with vsyscall.
+
+2004-06-11 Antony King <antony.king@st.com>
+
+ * libc/include/sys/_types.h: Include <sys/lock.h> and change
+ _flock_t to be of type _LOCK_RECURSIVE_T.
+ * libc/include/sys/reent.h: (_REENT_INIT): Reformat.
+ (_REENT_INIT_PTR): Ditto. Use memset where appropriate.
+ (_global_impure_ptr): New declaration.
+ (_GLOBAL_REENT): Change to be _global_impure_ptr.
+ * libc/include/sys/stdio.h: Include <sys/lock.h> and
+ <sys/reent.h>.
+ (_flockfile)[!_SINGLE_THREAD]: Add code for lock call.
+ (_funlockfile)[!SINGLE_THREAD]: Ditto.
+ * libc/reent/impure.c: Set _global_impure_ptr to _impure_ptr.
+ * libc/stdio/fclose.c: Remove casting of fp lock to
+ _LOCK_RECURSIVE_T.
+ * libc/stdio/findfp.c: Ditto.
+ * libc/stdio/fopen.c: Ditto.
+ * libc/stdio/freopen.c: Ditto.
+ * libc/stdio/vfprintf.c: Ditto.
+ * libc/stdio64/fopen64.c: Ditto.
+ * libc/stdlib/envlock.c: Add default stubs that use generic
+ locking code.
+ * libc/stdlib/mlock.c: Ditto.
+
+ Jeff Johnston <jjohnstn@redhat.com>
+ * libc/sys/linux/sys/_types.h (__flock_mutex_t): New subtype.
+ (_flock_t): Change to be a struct containing a single member
+ named mutex which is of type __flock_mutex_t.
+
+2004-06-09 Jeff Johnston <jjohnstn@redhat.com>
+
+ * libc/sys/linux/Makefile.am: Change siglist.inc to be generated
+ from /usr/include/asm/signal.h instead of kernel sources. Also
+ default max to 32 if not found in header file.
+ * libc/sys/linux/Makefile.in: Regenerated.
+ * libc/sys/linux/machine/i386/socketcall.h: Fix for Fedora Core 2
+ systems where __syscall_return is not defined.
+ * libc/sys/linux/machine/i386/syscall.h: Change for Fedora Core 2
+ systems to use syscall() function instead of assembler interrupt.
+
+2004-06-09 Toralf Lund <toralf@procaptura.com>
+
+ * libc/sys/arm/setjmp.S, libc/sys/arm/access.c: Move
+ files from libc/sys/arm to libc/machine/arm.
+ * libc/machine/arm/Makefile.am, libc/machine/arm/Makefile.in: Add
+ library build support for files moved from libc/sys/arm.
+ * libc/sys/arm/Makefile.am, libc/sys/arm/Makefile.in: Remove
+ references to access and setjmp.
+ * configure.host: Add checks for newlib_may_supply_syscalls to
+ determine whether or not to use sys/arm directory and use
+ special compiler flags: ARM_RDI_MONITOR and ARM_RDP_MONITOR.
+
+2004-06-02 Jeff Johnston <jjohnstn@redhat.com>
+
+ * libc/stdio/vfscanf.c (__svfscanf_r): For CT_INT conversions,
+ reset digit flags appropriately after we have discovered "0x".
+ * libc/machine/powerpc/vfscanf.c (__svfscanf_r): Ditto.
+
+2004-05-27 Jeff Johnston <jjohnstn@redhat.com>
+
+ * libc/stdio/vfprintf.c (_VFPRINTF): Move file locking
+ from here ...
+ (_VFPRINTF_R): ... to here so all I/O printf routines
+ are covered.
+
+2004-05-26 Jeff Johnston <jjohnstn@redhat.com>
+
+ * libc/search/hash_buf.c: Protect MAX and MIN macros from
+ redefinition.
+ * libc/search/hash.c: Ditto.
+
+2004-05-25 Artem B. Bityuckiy <abitytsky@softminecorp.com>
+
+ * newlib.hin: (_WANT_IO_POS_ARGS): New define.
+ (_WANT_IO_LONG_LONG): Ditto.
+ (_WANT_IO_LONG_DOUBLE): Ditto.
+ * configure.in: Add new configuration options
+ --enable-newlib-io-long-long and --enable-newlib-io-long-double
+ which tie to new defines in newlib.hin.
+ * configure: Regenerated.
+ * configure.host: Add checks for new configuration options. Also
+ fix up check for --enable-newlib-io-pos-args so configuration
+ option will override any default for a given platform.
+ Remove defining compiler flags for the _WANT_IO* options.
+ * libc/stdio/vfprintf.c: Change to use new newlib.hin defines
+ instead of looking for old compiler flags.
+ * libc/stdio/vfscanf.c: Ditto.
+ * libc/stdio/vfieeefp.h: Ditto.
+ * libc/machine/powerpc/vfprintf.c: Ditto.
+ * libc/machine/powerpc/vfscanf.c: Ditto.
+
+2004-05-25 Jeff Johnston <jjohnstn@redhat.com>
+
+ * testsuite/include/check.h: Add include of <stdio.h>.
+
+2004-05-17 Corinna Vinschen <corinna@vinschen.de>
+
+ * libc/include/grp.h: Declare getgrnam_r and getgrgid_r also on Cygwin.
+
+2004-05-11 Artem B. Bityuckiy <abitytsky@softminecorp.com>
+
+ * libc/stdio/vfprintf.c (VFPRINTF_R): Use _free_r instead
+ of free.
+
+2004-05-07 Artem B. Bityuckiy <abitytsky@softminecorp.com>
+
+ * libc/stdio/iprintf.c (_iprintf_r): Fix old-style argument
+ list for reentrant pointer. Call _vfiprintf_r.
+ * libc/stdio/siprintf.c (_siprintf_r): New function.
+ * libc/stdio/vfprintf.c (__sbprintf): Add reetrant struct
+ pointer argument. Change all callers. Call _VFPRINTF_R.
+ * libc/include/stdio.h (_siprintf_r, _vfiprintf_r): New
+ prototypes.
+
+2004-05-07 Jeff Johnston <jjohnstn@redhat.com>
+
+ * libc/include/sys/param.h: Remove endian info and include
+ <machine/endian.h> instead.
+ * libc/include/machine/endian.h: New file.
+ * libc/include/machine/param.h: Ditto.
+ * libc/machine/arm/machine/endian.h: Ditto.
+ * libc/machine/arm/machine/param.h: Ditto.
+ * libc/sys/arm/sys/param.h: Removed.
+ * libc/sys/sysvi386/sys/param.h: Ditto.
+ * libc/sys/rtems/sys/param.h: Modified to include <machine/endian.h>.
+
+2004-05-03 Artem B. Bityuckiy <abitytsky@softminecorp.com>
+
+ * libc/stdio/vfprintf.c (_VFPRINTF_R): Set error flag when
+ multibyte functions return failure for %C, %S, %lc, and %ls
+ format specifiers.
+
+2004-05-03 Artem B. Bityuckiy <abitytsky@softminecorp.com>
+
+ * testsuite/include/check.h (CHECK): Add flush of stdout.
+
+2004-05-03 Artem B. Bityuckiy <abitytsky@softminecorp.com>
+
+ * libc/include/stdio.h (_ungetc_r): New prototype.
+ * libc/stdio/ungetc.c (_ungetc_r): New reentrant function.
+ (__submore): Add reentrant struct pointer argument.
+ (ungetc): Change to call _ungetc_r.
+
+2004-04-28 Artem B. Bityuckiy <abitytsky@softminecorp.com>
+
+ * libc/stdio/local.h (_fwalk_reent): Specify prototype of
+ function pointer argument.
+ * libc/stdio/fwalk.c (_fwalk, _fwalk_reent): Change prototypes
+ to specify function pointer arguments.
+ (__fwalk, __fwalk_reent): Ditto.
+
+2004-04-26 Aldy Hernandez <aldyh@redhat.com>
+
+ * libc/machine/powerpc/vfscanf.c (__svfscanf_r): Fix typo in
+ CT_INT case.
+
+2004-04-23 Artem B. Bityuckiy <abitytsky@softminecorp.com>
+
+ * configure.in: Define _MB_CAPABLE if mb supported.
+ * configure: Regenerated.
+ * configure.host: Remove manual setting of MB_CAPABLE compiler
+ flag.
+ * newlib.hin: Add _MB_CAPABLE flag.
+ * libc/ctype/iswalpha.c, libc/ctype/iswblank.c: Include <newlib.h>
+ and check for _MB_CAPABLE flag instead of MB_CAPABLE.
+ * libc/ctype/iswcntrl.c, libc/ctype/iswprint.c: Ditto.
+ * libc/ctype/iswpunct.c, libc/ctype/iswspace.c: Ditto.
+ * libc/ctype/jp2uc.c: Ditto.
+ * libc/ctype/towlower.c, libc/ctype/towupper.c: Ditto.
+ * libc/locale/locale.c: Ditto
+ * libc/machine/powerpc/vfscanf.c: Ditto
+ * libc/stdio/vfprintf.c, libc/stdio/vfscanf.c: Ditto
+ * libc/stdlib/mblen.c: Ditto
+ * libc/stdlib/mblen_r.c, libc/stdlib/mbrlen.c: Ditto
+ * libc/stdlib/mbrtowc.c, libc/stdlib/mbsrtowcs.c: Ditto
+ * libc/stdlib/mbstowcs.c, libc/stdlib/mbtowc.c: Ditto
+ * libc/stdlib/mbtowc_r.c, libc/stdlib/wcrtomb.c: Ditto
+ * libc/stdlib/wcsrtombs.c, libc/stdlib/wcstombs.c: Ditto
+ * libc/stdlib/wctomb.c, libc/sys/linux/intl/dcigettext.c: Ditto
+ * libc/sys/linux/intl/explodename.c: Ditto
+ * libc/sys/linux/intl/finddomain.c: Ditto
+ * libc/sys/linux/intl/l10nflist.c: Ditto
+ * libc/sys/linux/intl/loadmsgcat.c: Ditto
+ * libc/sys/linux/intl/localealias.c: Ditto
+
+2004-04-23 Jeff Johnston <jjohnstn@redhat.com>
+
+ * libc/machine/powerpc/vfscanf.c (NNZDIGITS): New define.
+ (__svfscanf_r): In integer conversions, leave out leading zeroes
+ which are not part of a base prefix.
+ Keep track of width truncation to fit into buf, not counting left-out
+ zeroes against width till the truncation has been compensated for.
+ This is based on Joern's patch of 04/21 for libc/stdio/vfscanf.c.
+
+2004-04-23 Jeff Johnston <jjohnstn@redhat.com>
+
+ * libc/include/stdio.h: (_ftell_r, _fseek_r): New prototypes.
+
+2004-04-23 Artem B. Bityuckiy <abitytsky@softminecorp.com>
+
+ * libc/stdio/asprintf.c libc/stdio/clearerr.c,
+ libc/stdio/fclose.c libc/stdio/fcloseall.c libc/stdio/fdopen.c,
+ libc/stdio/feof.c libc/stdio/ferror.c libc/stdio/fflush.c,
+ libc/stdio/fgetc.c libc/stdio/fgetpos.c libc/stdio/fgets.c,
+ libc/stdio/fileno.c libc/stdio/findfp.c libc/stdio/fiprintf.c,
+ libc/stdio/flags.c libc/stdio/fopen.c libc/stdio/fprintf.c,
+ libc/stdio/fputc.c libc/stdio/fputs.c libc/stdio/fread.c,
+ libc/stdio/freopen.c libc/stdio/fscanf.c libc/stdio/fseek.c,
+ libc/stdio/fseeko.c libc/stdio/fsetpos.c libc/stdio/ftell.c,
+ libc/stdio/ftello.c libc/stdio/fvwrite.c libc/stdio/fwalk.c,
+ libc/stdio/fwrite.c libc/stdio/getc.c libc/stdio/getc_u.c,
+ libc/stdio/getchar.c libc/stdio/getchar_u.c,
+ libc/stdio/getdelim.c libc/stdio/getline.c libc/stdio/gets.c,
+ libc/stdio/getw.c libc/stdio/iprintf.c libc/stdio/local.h,
+ libc/stdio/makebuf.c libc/stdio/mktemp.c libc/stdio/perror.c,
+ libc/stdio/printf.c libc/stdio/putc.c libc/stdio/putc_u.c,
+ libc/stdio/putchar.c libc/stdio/putchar_u.c libc/stdio/puts.c,
+ libc/stdio/putw.c libc/stdio/refill.c libc/stdio/remove.c,
+ libc/stdio/rename.c libc/stdio/rewind.c libc/stdio/rget.c,
+ libc/stdio/scanf.c libc/stdio/setbuf.c libc/stdio/setbuffer.c,
+ libc/stdio/setlinebuf.c libc/stdio/setvbuf.c,
+ libc/stdio/siprintf.c libc/stdio/snprintf.c,
+ libc/stdio/sprintf.c libc/stdio/sscanf.c libc/stdio/stdio.c,
+ libc/stdio/tmpfile.c libc/stdio/tmpnam.c libc/stdio/ungetc.c,
+ libc/stdio/vasprintf.c libc/stdio/vfieeefp.h,
+ libc/stdio/vfprintf.c libc/stdio/vfscanf.c,
+ libc/stdio/vprintf.c libc/stdio/vscanf.c,
+ libc/stdio/vsnprintf.c libc/stdio/vsprintf.c,
+ libc/stdio/vsscanf.c libc/stdio/wbuf.c,
+ libc/stdio/wsetup.c: Perform minor formatting changes. Move
+ copyright notices to top of file, ensure that <_ansi.h> is
+ included, be consistent with open parentheses, use _DEFUN macro,
+ include "local.h" where needed, and remove various compiler
+ warnings.
+
+2004-04-21 J"orn Rennecke <joern.rennecke@superh.com>
+
+ * libc/stdio/vfscanf.c (NNZDIGITS): New define.
+ (__svfscanf_r): In integer conversions, leave out leading zeroes
+ which are not part of a base prefix.
+ Keep track of width truncation to fit into buf, not counting left-out
+ zeroes against width till the truncation has been compensated for.
+
+2004-04-20 Corinna Vinschen <corinna@vinschen.de>
+
+ * libc/include/sys/unistd.h (ttyname_r): Add missing comma.
+
+2004-04-20 Corinna Vinschen <corinna@vinschen.de>
+
+ * libc/include/sys/unistd.h (ttyname_r): Add declaration for Cygwin.
+
+2004-04-10 Corinna Vinschen <corinna@vinschen.de>
+
+ * libc/include/sys/unistd.h (sync): Define void on Cygwin according
+ to SUSv3.
+
+2004-04-08 Artem B. Bityuckiy <abitytsky@softminecorp.com>
+
+ * libc/stdio/fclose.c (_fclose_r): New function.
+ * libc/stdio/freopen.c (_freopen_r): Call _fclose_r.
+ * libc/stdio/fcloseall.c (_fcloseall_r): Call _fwalk_reent.
+ * libc/stdio64/freopen64.c (_freopen64_r): Use _fclose_r.
+ * libc/include/stdio.h (_fclose_r): New prototype.
+ * libc/stdio/fopen.c: Fix typo in comment.
+
+2004-04-08 Jeff Johnston <jjohnstn@redhat.com>
+
+ * libc/stdio/fwalk.c (_fwalk_reent): New version of _fwalk
+ to handle _r reentrant functions.
+
+2004-04-08 Eric Christopher <echristo@redhat.com>
+
+ * libc/include/machine/setjmp.h: Fix endif locations.
+
+2004-04-01 Artem B. Bityuckiy <abitytsky@softminecorp.com>
+
+ * libc/time/strptime.c: Add standard includes to avoid
+ warning messages at compilation time.
+
+2004-04-01 Jeff Johnston <jjohnstn@redhat.com>
+
+ * libc/stdio/vfscanf.c (__svfscanf_r): Add locking/unlocking
+ of file.
+
+2004-03-30 Jeff Johnston <jjohnstn@redhat.com>
+
+ * libc/machine/h8300/Makefile.am: Reformat slightly.
+ * libc/machine/h8300/Makefile.in: Regenerate.
+
+2004-03-30 Thomas Pfaff <tpfaff@gmx.net>
+
+ * libc/stdio/findfp.c (__fp_lock_all): Add call to
+ __sfp_lock_acquire.
+ (__fp_unlock_all): Add call to __sfp_lock_release.
+
+2004-03-25 Thomas Pfaff <tpfaff@gmx.net>
+
+ * libc/stdio/fclose.c (fclose): Protect file pointer list when
+ releasing a file.
+ * libc/stdio/fcloseall.c (_fcloseall_r): Close all files via
+ fwalk.
+ * libc/stdio/fdopen.c (_fdopen_r): Add calls to
+ _flockfile/_funlockfile.
+ * libc/stdio/findfp.c: Move __sfp_lock. Change __sfp_lock type
+ to recursive.
+ Change __lock_acquire/__lock_release calls for __sfp_lock to
+ __sfp_lock_acquire/__sfp_lock_release throughout.
+ (std): Make sure that file lock is only initialized once.
+ (__sfp): Move _file initialization. Initialize file lock.
+ (__sfp_lock_acquire): New function.
+ (__sfp_lock_release): Ditto.
+ (__fp_lock_all): Remove __sfp_lock_acquire call.
+ (__fp_unlock_all): Remove __sfp_lock_release call.
+ * libc/stdio/fopen.c (_fopen_r): Protect file pointer list.
+ Add calls to _flockfile/_funlockfile. Remove
+ __lock_init_recursive call.
+ * libc/stdio/freopen.c (_freopen_r): Protect file pointer list.
+ * libc/stdio/fwalk.c (__fwalk): New static function.
+ (_fwalk): Protect file pointer list. Use __fwalk to walk through
+ file pointers.
+ * libc/stdio/local.h: Add defines for
+ __sfp_lock_acquire/__sfp_lock_release when
+ single threaded. Add function prototypes otherwise.
+ * libc/stdio64/fdopen64.c (_fdopen64_r): Add calls to
+ _flockfile/_funlockfile.
+ * libc/stdio/fopen64.c (_fopen64_r): Protect file pointer list.
+ Add calls to _flockfile/_funlockfile. Remove
+ __lock_init_recursive call.
+ * libc/stdio/freopen64.c (_freopen64_r): Protect file pointer
+ list.
+
+2004-03-25 Jeff Johnston <jjohnstn@redhat.com>
+
+ * libc/sys/linux/sys/lock.h: Turn on __USE_GNU flag if not already
+ defined. Change __LOCK_RECURSIVE_INIT to be __LOCK_INIT_RECURSIVE.
+ * libc/sys/linux/dl/dl-support.c: Change __LOCK_RECURSIVE_INIT
+ to be __LOCK_INIT_RECURSIVE.
+
+2004-03-11 Kazu Hirata <kazu@cs.umass.edu>
+
+ * libc/sys/h8300hms/Makefile.am (lib_a_SOURCES): Replace
+ _exit.c with _exit.S.
+ * libc/sys/h8300hms/Makefile.in: Regenerate.
+ * libc/sys/h8300hms/_exit.c: Remove.
+ * libc/sys/h8300hms/_exit.S: New.
+
+2004-03-09 Thomas Pfaff <tpfaff@gmx.net>
+
+ * libc/stdio/findfp.c (__sfp): Rename lock to __sfp_lock.
+ Change __sfp_lock to static global.
+ (__fp_lock): New static function.
+ (__fp_unlock): Ditto.
+ (__fp_lock_all): New function.
+ (__fp_unlock_all): Ditto.
+
+2004-02-10 Christopher Faylor <cgf@redhat.com>
+
+ * libm/mathfp/er_gamma.c (gamma): Add new non-reentrant function.
+ * libm/mathfp/er_lgamma.c (lgamma): Ditto.
+ * libm/mathfp/erf_gamma.c (gammaf): Ditto.
+ * libm/mathfp/erf_lgamma.c (lgammaf): Ditto.
+
+2004-02-09 Christopher Faylor <cgf@redhat.com>
+
+ * libc/include/time.h (TIMER_RELTIME): New define.
+
+2004-02-09 Jeff Johnston <jjohnstn@redhat.com>
+
+ * libc/stdlib/Makefile.am: Add mallstatsr to LIBADD_OBJS.
+ * libc/stdlib/Makefile.in: Regenerated.
+
+2004-02-08 Christopher Faylor <cgf@redhat.com>
+
+ * libc/include/sys/features.h: Add _POSIX_TIMERS define for __CYGWIN__.
+ * libc/include/sys/reent.h (__getreent): Protect against possibly being
+ defined.
+ * libc/include/sys/unistd.h (fdatasync): Don't define for __CYGWIN__.
+
+2004-02-05 Paul Brook <paul@codesourcery.com>
+
+ * libc/include/machine/ieeefp.h[__arm__][__VFP_FP__]: Set
+ IEEE_{BIG,LITTLE} based on __ARMEL__ flag.
+
+2004-02-02 Jeff Johnston <jjohnstn@redhat.com>
+
+ * NEWS: Update with 1.12.0 info.
+ * README: Ditto.
+ * acinclude.m4: Change version number to 1.12.0.
+ * aclocal.m4: Regenerated.
+ * configure: Ditto.
+ * doc/aclocal.m4: Ditto.
+ * doc/configure: Ditto.
+ * libc/*/aclocal.m4: Ditto.
+ * libc/*/configure: Ditto.
+ * libc/libc.texinfo: Ditto.
+ * libm/*/aclocal.m4: Ditto.
+ * libm/*/configure: Ditto.
+ * libm/libm.texinfo: Ditto.
+ * libc/sys/linux/shared.ld: Add VERS_1.12.
+
+2004-02-02 Joel Sherrill <joel@oarcorp.com>
+
+ * configure.host: Add support for tic4x.
+ * libc/include/machine/ieeefp.h: Ditto.
+ * libc/include/machine/setjmp.h: Ditto.
+ * libc/machine/tic4x/Makefile.am: New file.
+ * libc/machine/tic4x/configure.in: Ditto.
+ * libc/machine/tic4x/setjmp.S: Ditto.
+ * libc/machine/tic4x/aclocal.m4: Generated.
+ * libc/machine/tic4x/configure: Ditto.
+ * libc/machine/tic4x/Makefile.in: Ditto.
+
+2004-01-30 Jeff Johnston <jjohnstn@redhat.com>
+
+ * libc/stdio/fwalk.c (_fwalk.c): Don't traverse the
+ file chain on the passed in reentrancy struct if it
+ is _GLOBAL_REENT.
+
+2004-01-30 Artem B. Bityuckiy <abitytsky@softminecorp.com>
+ Jeff Johnston <jjohnstn@redhat.com>
+
+ * libc/iconv/iconv.tex: Updated with more information.
+
+2004-01-30 Thomas Pfaff <tpfaff@gmx.net>
+ Jeff Johnston <jjohnstn@redhat.com>
+
+ * libc/stdio/fwalk.c (_fwalk): Traverse the given reentrancy
+ struct for std streams and traverse the global reeentrancy
+ struct for all other streams.
+
+2004-01-27 Jeff Johnston <jjohnstn@redhat.com>
+
+ * libc/stdlib/atexit.c: Protect global atexit list with a
+ lock when newlib is multithreaded.
+
+2004-01-27 Artem B. Bityuckiy <abitytsky@softminecorp.com>
+
+ * configure.in: Add support to generate iconv converter flags
+ for newlib.h
+ * newlib.hin: Add iconv converter flags.
+ * configure: Regenerated.
+ * libc/Makefile.in: Ditto.
+ * libc/configure.in: Moved iconv converter parsing logic to
+ top level newlib configure.in.
+ * libc/configure: Regenerated.
+ * libc/iconv/Makefile.in: Ditto.
+ * libc/iconv/README.TODO
+ * libc/iconv/charset.aliases: Remove wrong BE aliases for
+ UCS2/UCS4/UTF8.
+ * libc/iconv/ccs/Makefile.am: Remove C flag setting now that
+ newlib.h can be used.
+ * libc/iconv/ces/Makefile.am: Ditto.
+ * libc/iconv/lib/Makefile.am: Ditto.
+ * libc/iconv/ccs/Makefile.in: Regenerated.
+ * libc/iconv/ces/Makefile.in: Ditto.
+ * libc/iconv/lib/Makefile.in: Ditto.
+ * libc/iconv/ccs/README.CCS.SOURCES: Updated.
+ * libc/iconv/ccs/iconv_mktbl: Don't write junk strings to binaries.
+ * libc/iconv/ccs/big5.c: Switch to use new underscored flags
+ defined in newlib.h.
+ * libc/iconv/ccs/cns11643_plane1.c: Ditto.
+ * libc/iconv/ccs/cns11643_plane14.c: Ditto.
+ * libc/iconv/ccs/cns11643_plane2.c: Ditto.
+ * libc/iconv/ccs/cp775.c: Ditto.
+ * libc/iconv/ccs/cp850.c: Ditto.
+ * libc/iconv/ccs/cp852.c: Ditto.
+ * libc/iconv/ccs/cp855.c: Ditto.
+ * libc/iconv/ccs/cp866.c: Ditto.
+ * libc/iconv/ccs/gb_2312_80.c: Ditto.
+ * libc/iconv/ccs/iso_8859_1.c: Ditto.
+ * libc/iconv/ccs/iso_8859_15.c: Ditto.
+ * libc/iconv/ccs/iso_8859_2.c: Ditto.
+ * libc/iconv/ccs/iso_8859_4.c: Ditto.
+ * libc/iconv/ccs/iso_8859_5.c: Ditto.
+ * libc/iconv/ccs/jis_x0201.c: Ditto.
+ * libc/iconv/ccs/jis_x0208_1983.c: Ditto.
+ * libc/iconv/ccs/jis_x0212_1990.c: Ditto.
+ * libc/iconv/ccs/koi8_r.c: Ditto.
+ * libc/iconv/ccs/koi8_u.c: Ditto.
+ * libc/iconv/ccs/ksx1001.c: Ditto.
+ * libc/iconv/ccs/shift_jis.c: Ditto.
+ * libc/iconv/ccs/us_ascii.c: Ditto.
+ * libc/iconv/ccs/binary/big5.cct: Newly generated.
+ * libc/iconv/ccs/binary/cns11643_plane1.cct: Ditto.
+ * libc/iconv/ccs/binary/cns11643_plane14.cct: Ditto.
+ * libc/iconv/ccs/binary/cns11643_plane2.cct: Ditto.
+ * libc/iconv/ccs/binary/cp775.cct: Ditto.
+ * libc/iconv/ccs/binary/cp850.cct: Ditto.
+ * libc/iconv/ccs/binary/cp852.cct: Ditto.
+ * libc/iconv/ccs/binary/cp855.cct: Ditto.
+ * libc/iconv/ccs/binary/cp866.cct: Ditto.
+ * libc/iconv/ccs/binary/gb_2312_80.cct: Ditto.
+ * libc/iconv/ccs/binary/iso_8859_1.cct: Ditto.
+ * libc/iconv/ccs/binary/iso_8859_15.cct: Ditto.
+ * libc/iconv/ccs/binary/iso_8859_2.cct: Ditto.
+ * libc/iconv/ccs/binary/iso_8859_4.cct: Ditto.
+ * libc/iconv/ccs/binary/iso_8859_5.cct: Ditto.
+ * libc/iconv/ccs/binary/jis_x0201.cct: Ditto.
+ * libc/iconv/ccs/binary/jis_x0208_1983.cct: Ditto.
+ * libc/iconv/ccs/binary/jis_x0212_1990.cct: Ditto.
+ * libc/iconv/ccs/binary/koi8_r.cct: Ditto.
+ * libc/iconv/ccs/binary/koi8_u.cct: Ditto.
+ * libc/iconv/ccs/binary/ksx1001.cct: Ditto.
+ * libc/iconv/ccs/binary/shift_jis.cct: Ditto.
+ * libc/iconv/ccs/binary/us_ascii.cct: Ditto.
+ * libc/iconv/lib/bialiasesi.c: Sync with charset.aliases.
+ * libc/iconv/ces/euc-jp.c: Use newlib.h macros.
+ * libc/iconv/ces/euc-kr.c: Ditto.
+ * libc/iconv/ces/euc-tw.c: Ditto.
+ * libc/iconv/ces/gb2312.c: Ditto.
+ * libc/iconv/ces/iso-10646-ucs-2.c: Ditto.
+ * libc/iconv/ces/iso-10646-ucs-4.c: Ditto.
+ * libc/iconv/ces/ucs-2-internal.c: Ditto.
+ * libc/iconv/ces/ucs-4-internal.c: Ditto.
+ * libc/iconv/ces/utf-16.c: Ditto.
+ * libc/iconv/ces/utf-8.c: Ditto.
+ * libc/iconv/lib/aliases.c: Ditto.
+ * libc/iconv/lib/biccs.c: Ditto.
+ * libc/iconv/lib/bices.c: Ditto.
+ * libc/iconv/lib/ccs.c: Ditto.
+ * libc/iconv/lib/ces.c: Ditto.
+ * libc/iconv/lib/ces_euc.c: Ditto.
+ * libc/iconv/lib/ces_iso2022.c: Ditto.
+ * libc/iconv/lib/ces_table.c: Ditto.
+ * libc/iconv/lib/converter.c: Ditto.
+ * libc/iconv/lib/deps.h: Ditto.
+ * libc/iconv/lib/endian.h: Ditto.
+ * libc/iconv/lib/iconv.c: Ditto.
+ * libc/iconv/lib/loaddata.c: Ditto.
+ * libc/iconv/lib/local.h: Include newlib.h.
+ * libc/argz/Makefile.in: Regenerated.
+ * libc/ctype/Makefile.in: Ditto.
+ * libc/errno/Makefile.in: Ditto.
+ * libc/iconv/ccs/binary/Makefile.in: Ditto.
+ * libc/locale/Makefile.in: Ditto.
+ * libc/misc/Makefile.in: Ditto.
+ * libc/posix/Makefile.in: Ditto.
+ * libc/reent/Makefile.in: Ditto.
+ * libc/search/Makefile.in: Ditto.
+ * libc/signal/Makefile.in: Ditto.
+ * libc/stdio/Makefile.in: Ditto.
+ * libc/stdio64/Makefile.in: Ditto.
+ * libc/stdlib/Makefile.in: Ditto.
+ * libc/string/Makefile.in: Ditto.
+ * libc/syscalls/Makefile.in: Ditto.
+ * libc/time/Makefile.in: Ditto.
+ * libc/unix/Makefile.in: Ditto.
+ * testsuite/newlib.iconv/iconv.exp: New file.
+ * testsuite/newlib.iconv/iconvjp.c: Ditto.
+ * testsuite/newlib.iconv/iconvnm.c: Ditto.
+ * testsuite/newlib.iconv/iconvru.c: Ditto.
+
+2004-01-23 Artem B. Bityuckiy <abitytsky@softminecorp.com>
+
+ * acinclude.m4 (--enable-newlib-iconv): New configuration option.
+ (--enable-newlib-builtin-converters): Ditto.
+ * configure.in: Add code to set _ICONV_ENABLED flag.
+ Set _MB_LEN_MAX to 1 if not mb enabled.
+ * configure: Regenerated.
+ * aclocal.m4: Ditto.
+ * Makefile.in: Ditto.
+ * newlib.hin: Add _ICONV_ENABLED flag.
+ * libc/Makefile.am: Add support for iconv.
+ * libc/configure.in: Ditto.
+ * libc/Makefile.in: Regenerated.
+ * libc/aclocal.m4: Ditto.
+ * libc/configure: Ditto.
+ * libc/libc.texinfo: Add iconv documentation.
+ * libc/iconv/AUTHORS, libc/iconv/COPYING, libc/iconv/Makefile.am,
+ libc/iconv/Makefile.in, libc/iconv/README.ORIGINAL,
+ libc/iconv/README.TODO, libc/iconv/charset.aliases,
+ libc/iconv/iconv.tex, libc/iconv/ccs/Makefile.am,
+ libc/iconv/ccs/Makefile.in, libc/iconv/ccs/README.CCS.SOURCES,
+ libc/iconv/ccs/big5.c, libc/iconv/ccs/cns11643_plane1.c,
+ libc/iconv/ccs/cns11643_plane14.c, libc/iconv/ccs/cns11643_plane2.c,
+ libc/iconv/ccs/cp775.c, libc/iconv/ccs/cp850.c,
+ libc/iconv/ccs/cp852.c, libc/iconv/ccs/cp855.c,
+ libc/iconv/ccs/cp866.c, libc/iconv/ccs/gb_2312_80.c,
+ libc/iconv/ccs/iconv_mktbl, libc/iconv/ccs/iso_8859_1.c,
+ libc/iconv/ccs/iso_8859_15.c, libc/iconv/ccs/iso_8859_2.c,
+ libc/iconv/ccs/iso_8859_4.c, libc/iconv/ccs/iso_8859_5.c,
+ libc/iconv/ccs/jis_x0201.c, libc/iconv/ccs/jis_x0208_1983.c,
+ libc/iconv/ccs/jis_x0212_1990.c, libc/iconv/ccs/koi8_r.c,
+ libc/iconv/ccs/koi8_u.c, libc/iconv/ccs/ksx1001.c,
+ libc/iconv/ccs/shift_jis.c, libc/iconv/ccs/us_ascii.c,
+ libc/iconv/ccs/binary/Makefile.am, libc/iconv/ccs/binary/Makefile.in,
+ libc/iconv/ccs/binary/big5.cct,
+ libc/iconv/ccs/binary/cns11643_plane1.cct,
+ libc/iconv/ccs/binary/cns11643_plane14.cct,
+ libc/iconv/ccs/binary/cns11643_plane2.cct,
+ libc/iconv/ccs/binary/cp775.cct, libc/iconv/ccs/binary/cp850.cct,
+ libc/iconv/ccs/binary/cp852.cct, libc/iconv/ccs/binary/cp855.cct,
+ libc/iconv/ccs/binary/cp866.cct, libc/iconv/ccs/binary/gb_2312_80.cct,
+ libc/iconv/ccs/binary/iso_8859_1.cct,
+ libc/iconv/ccs/binary/iso_8859_15.cct,
+ libc/iconv/ccs/binary/iso_8859_2.cct,
+ libc/iconv/ccs/binary/iso_8859_4.cct,
+ libc/iconv/ccs/binary/iso_8859_5.cct,
+ libc/iconv/ccs/binary/jis_x0201.cct,
+ libc/iconv/ccs/binary/jis_x0208_1983.cct,
+ libc/iconv/ccs/binary/jis_x0212_1990.cct,
+ libc/iconv/ccs/binary/koi8_r.cct, libc/iconv/ccs/binary/koi8_u.cct,
+ libc/iconv/ccs/binary/ksx1001.cct,
+ libc/iconv/ccs/binary/shift_jis.cct,
+ libc/iconv/ccs/binary/us_ascii.cct,
+ libc/iconv/ces/Makefile.am, libc/iconv/ces/Makefile.in,
+ libc/iconv/ces/euc-jp.c, libc/iconv/ces/euc-kr.c,
+ libc/iconv/ces/euc-tw.c, libc/iconv/ces/gb2312.c,
+ libc/iconv/ces/iso-10646-ucs-2.c, libc/iconv/ces/iso-10646-ucs-4.c,
+ libc/iconv/ces/ucs-2-internal.c, libc/iconv/ces/ucs-4-internal.c,
+ libc/iconv/ces/utf-16.c, libc/iconv/ces/utf-8.c,
+ libc/iconv/lib/Makefile.am, libc/iconv/lib/Makefile.in,
+ libc/iconv/lib/aliases.c, libc/iconv/lib/bialiasesi.c,
+ libc/iconv/lib/biccs.c, libc/iconv/lib/bices.c,
+ libc/iconv/lib/ccs.c, libc/iconv/lib/ces.c,
+ libc/iconv/lib/ces_euc.c, libc/iconv/lib/ces_iso2022.c,
+ libc/iconv/lib/ces_table.c, libc/iconv/lib/converter.c,
+ libc/iconv/lib/deps.h, libc/iconv/lib/endian.h,
+ libc/iconv/lib/iconv.c, libc/iconv/lib/loaddata.c,
+ libc/iconv/lib/local.h, libc/include/iconv.h: New files.
+ * libc/sys/linux/include/iconv.h: Ditto.
+ * libc/include/sys/_types.h (_iconv_t): Added.
+ * doc/aclocal.m4: Regenerated.
+ * doc/configure: Ditto.
+ * doc/Makefile.in: Ditto.
+ * iconvdata/Makefile.in: Ditto.
+ * iconvdata/aclocal.m4: Ditto.
+ * iconvdata/configure: Ditto.
+ * libc/*aclocal.m4: Ditto.
+ * libc/*Makefile.in: Ditto.
+ * libc/*configure: Ditto.
+ * libm/*aclocal.m4: Ditto.
+ * libm/*Makefile.in: Ditto.
+ * libm/*configure: Ditto.
+
+2004-01-22 Thomas Pfaff <tpfaff@gmx.net>
+
+ * libc/stdio/findfp.c (__sfp): Protect global FILE pointer list
+ by a lock when newlib is multithreaded.
+
+2004-01-21 Jeff Johnston <jjohnstn@redhat.com>
+
+ * libc/stdlib/mbrtowc.c (_mbrtowc_r): Fix case where s is null
+ pointer to match C99 spec.
+ * libc/stdlib/mbsrtowcs.c (_mbsrtowc_r): Fix to ignore len when
+ dst is NULL. Also fix to not alter src pointer when dst is NULL
+ and call _mbrtowc_r instead of _mbtowc_r.
+ * libc/stdlib/wcsrtombs.c (_wcsrtombs_r): Call _wcrtomb_r instead
+ of _wctomb_r.
+
+2004-01-19 Thomas Pfaff <tpfaff@gmx.net>
+
+ * libc/stdio/fclose.c (fclose): Release FILE as the last step.
+ * libc/stdio/freopen.c (freopen): Ditto.
+
+2004-01-16 Christopher Faylor <cgf@redhat.com>
+
+ * libc/stdio/vfprintf.c: Add sys/lock.h include.
+
+2004-01-16 Thomas Pfaff <tpfaff@gmx.net>
+
+ * libc/stdio/findfp.c (__sfp): Remove unnecessary memset.
+ * libc/stdio/vfprintf.c (__sbprintf): Ditto.
+ Add calls to __lock_init_recursive and __lock_close_recursive
+ instead.
+
+2004-01-15 Thomas Pfaff <tpfaff@gmx.net>
+
+ * libc/stdio/fclose.c: Include sys/lock.h.
+ (fclose): Destroy lock when file is closed.
+ * libc/stdio/findfp.c (__sfp): Initialize file pointers _lock
+ member.
+ * libc/stdio/freopen.c: Include sys/lock.h.
+ (_freopen_r): Destroy lock when file is closed.
+ * libc/stdio/vfprintf.c (__sbprintf): Initialize file pointers
+ _lock member.
+
+2004-01-08 Joel Sherrill <joel@oarcorp.com>
+
+ * libc/ctype/iswctype.c, include/sys/reent.h, libc/stdlib/a64l.c:
+ Remove warnings.
+
+2004-01-08 Joel Sherrill <joel@oarcorp.com>
+
+ * libc/sys/rtems/sys/queue.h: New file.
+ * libc/include/sys/signal.h: Reflect renumbering of signals to
+ fit into 32-bit mask.
+ * libc/include/sys/unistd.h: Add fdatasync() prototype.
+ * libc/sys/rtems/crt0.c: Add more symbols which may be implicitly
+ required. In particular, add the reentrant variants of libc calls.
+ * libc/sys/rtems/sys/dirent.h: Add scandir() prototype.
+
+2004-01-06 Mark Mitchell <mark@codesourcery.com>
+
+ * libc/sys/arm/syscalls.c (unistd.h): Include it.
+ (remap_handle): Use STDIN_FILENO instead of __sfileno(stdin).
+ Similarly for stdout and stderr.
+
+2004-01-06 Jeff Johnston <jjohnstn@redhat.com>
+
+ * libc/libc.texinfo: Correct escape character for @ sign
+ so file will be processed by make info. Update copyright years.
+ * libm/libm.texinfo: Ditto.
+
+2003-12-05 Jeff Johnston <jjohnstn@redhat.com>
+
+ * libc/include/sys/stat.h: No longer include stat-dj.h.
+ * libc/include/sys/stat-dj.h: Removed.
+
+2003-12-05 Jeff Johnston <jjohnstn@redhat.com>
+
+ * libc/include/wchar.h: Include <sys/reent.h>.
+
+2003-12-05 Christopher Faylor <cgf@redhat.com>
+
+ * libc/stdlib/mbrlen.c: Change include order to prevent compiler errors
+ when defining _mbrtowc.
+ * libc/stdlib/mbsinit.c: Ditto.
+ * libc/stdlib/mbsrtowcs.c: Ditto.
+ * libc/stdlib/wcrtomb.c: Ditto.
+ * libc/stdlib/wcsrtombs.c: Ditto.
+ * libc/stdlib/wctob.c: Ditto.
+
+2003-12-05 Christopher Faylor <cgf@redhat.com>
+
+ * libc/stdlib/mbrlen.c: Change include order to prevent compiler
+ errors when defining _mbrtowc.
+ * libc/stdlib/mbsinit.c: Ditto.
+ * libc/stdlib/mbsrtowcs.c: Ditto.
+
+2003-12-05 Christopher Faylor <cgf@redhat.com>
+
+ * libc/stdlib/mbrtowc.c: Change include order to prevent compiler
+ errors when defining _mbrtowc.
+
+2003-12-04 Artem B. Bityuckiy <abitytsky@softminecorp.com>
+
+ * libc/stdio/vfprintf.c (_VFPRINTF_R): Use _r versions
+ of mb routines for %lc and %ls support.
+ * libc/stdio/vfscanf.c (_svfscanf_r): Add %lc, %C,
+ %ls, and %S support. Remove CYGNUS_NEC markers and
+ code within.
+
+2003-12-04 Jeff Johnston <jjohnstn@redhat.com>
+
+ * libc/include/wchar.h: Add prototypes for _mbrtowc_r,
+ _wcrtomb_r, and _wcsrtombs_r.
+
+2003-12-01 Corinna Vinschen <corinna@vinschen.de>
+
+ * libc/include/sys/fcntl.h: Don't define struct flock when on
+ Cygwin. This is done in winsup/cygwin/include/cygwin/types.h now.
+
+2003-11-28 Christopher Faylor <cgf@redhat.com>
+
+ * libc/include/sys/signal.h: Use system specific signal file when
+ building on cygwin.
+
+2003-11-27 Jeff Johnston <jjohnstn@redhat.com>
+
+ * libc/include/stdlib.h (_atoi_r): New prototype.
+ * libc/stdlib/atoi.c (_atoi_r): New reentrant function.
+
+2003-11-27 Jeff Johnston <jjohnstn@redhat.com>
+
+ * libc/include/stdlib.h (_atoll_r, _atol_r): New prototypes.
+ * libc/stdlib/atol.c (_atol_r): New reentrant function.
+ * libc/stdlib/atoll.c (_atoll_r): Ditto.
+
+2003-11-27 Artem B. Bityuckiy <abitytsky@softminecorp.com>
+ Jeff Johnston <jjohnstn@redhat.com>
+
+ * libc/include/stdlib.h (lldiv_t): New type.
+ (atoll, llabs, lldiv): New prototypes.
+ * libc/stdlib/Makefile.am: Add support for atoll, llabs, and lldiv.
+ * libc/stdlib/stdlib.tex: Ditto.
+ * libc/stdlib/Makefile.in: Regenerated.
+ * libc/stdlib/atoll.c: New file.
+ * libc/stdlib/llabs.c: Ditto.
+ * libc/stdlib/lldiv.c: Ditto.
+
+2003-11-26 Corinna Vinschen <corinna@vinschen.de>
+
+ * libc/include/fcntl.h: Declare syscalls only when building newlib.
+ * libc/include/unistd.h: Ditto.
+ * libc/include/stat.h: Ditto. Also declare struct stat64.
+
+2003-11-24 Artem B. Bityuckiy <abitytsky@softminecorp.com>
+
+ * libc/stdio/vfprintf.c (_VFPRINTF_R): Fix check for 'C' format
+ specifier to use ch instead of *fmt.
+
+2003-11-21 Artem B. Bityuckiy <abitytsky@softminecorp.com>
+
+ * libc/stdio/vfprintf.c (_VFPRINTF_R, get_arg): Move mb-specific
+ code within checks for MB_CAPABLE. For non-mb-capable platforms,
+ use simple byte logic.
+
+2003-11-21 Jeff Johnston <jjohnstn@redhat.com>
+
+ * libc/stdio/vfscanf.c (__svfscanf_r)[!_NO_LONGDBL]: Don't use
+ _strtold routine for processing floats and doubles since it
+ is not as fast as _strtod_r.
+
+2003-11-20 Dhananjay Deshpande <dhananjayd@kpitcummins.com>
+
+ * libc/machine/h8300/defines.h : Correct pointer register defines
+ for normal mode.
+ * libc/machine/h8300/memcpy.S : Use add/sub instead of adds/subs
+ for normal mode.
+ * libc/machine/h8300/reg_memcpy.S : Likewise.
+ * libc/machine/h8300/reg_memset.S : Likewise.
+ * libc/machine/h8300/strcmp.S : Likewise.
+
+2003-11-19 Nicholas Wourms <nwourms@netscape.net>
+
+ * configure.host: Enable positional arguments for printf
+ family for Cygwin.
+ * libc/stdio/vfprintf.c (_VFPRINTF_R): Remove extraneous
+ pointer reference for quad_ptr_t.
+
+2003-11-19 Jeff Johnston <jjohnstn@redhat.com>
+
+ * libc/stdio/scanf.c: Don't include local.h more than once.
+
+2003-11-18 Corinna Vinschen <corinna@vinschen.de>
+
+ * libc/include/sys/fcntl.h: Declare _open64.
+ * libc/include/sys/stat.h: Declare _fstat64.
+ * libc/include/sys/unistd.h: Declare _lseek64.
+
+2003-11-17 Corinna Vinschen <corinna@vinschen.de>
+
+ * libc/include/stdlib.h (getprogname): Declare for Cygwin.
+ (setprogname): Ditto.
+
+2003-11-10 Jeff Johnston <jjohnstn@redhat.com>
+
+ * libc/machine/powerpc/ufix64toa.c (_ufix64to_r): Fix shifts
+ to use (Ebits + 1) which accounts for the sign-bit.
+
+2003-11-07 Jeff Johnston <jjohnstn@redhat.com>
+
+ * configure.host: Remove -DLOOSE_KERNEL_NAMES flag for linux
+ x86 build.
+ * iconvdata/Makefile.am: Make dependent on newlib's configure.host
+ and set up default flags to pass to aclocal.
+ * iconvdata/Makefile.in: Regenerated.
+ * libc/sys/linux/Makefile.am: Add _ELIX_LEVEL_4 getlogin, getpwnam,
+ and getpwuid routines.
+ * libc/sys/linux/Makefile.in: Regenerated.
+ * libc/sys/linux/getlogin.c: New stub file to allow x86-linux
+ applications to link with newlib's shared libc library.
+ * libc/sys/linux/getpwnam.c: Ditto.
+ * libc/sys/linux/getpwuid.c: Ditto.
+ * libc/sys/linux/sys/types.h: Include <features.h> and supply types
+ that were formerly supplied by /usr/include/linux/types.h with
+ kernel types.
+ * testsuite/newlib.wctype/twctype.c: Fix testcase to properly
+ test _ELIX_LEVEL macro.
+
+2003-11-07 Jeff Johnston <jjohnstn@redhat.com>
+
+ * libc/stdio/vfprintf.c (_VFPRINTF_R): Fix typos that should be
+ referring to _NO_LONGLONG macro.
+
+2003-11-06 Jeff Johnston <jjohnstn@redhat.com>
+
+ * libc/sys/linux/linuxthreads/td_init.c: Replace function name
+ in LOG() macro so this will compile on gcc 3.4 and up.
+ * libc/sys/linux/linuxthreads/td_log.c: Ditto.
+ * libc/sys/linux/linuxthreads/td_ta_clear_event.c: Ditto.
+ * libc/sys/linux/linuxthreads/td_ta_delete.c: Ditto.
+ * libc/sys/linux/linuxthreads/td_ta_enable_stats.c: Ditto.
+ * libc/sys/linux/linuxthreads/td_ta_event_addr.c: Ditto.
+ * libc/sys/linux/linuxthreads/td_ta_event_getmsg.c: Ditto.
+ * libc/sys/linux/linuxthreads/td_ta_get_nthreads.c: Ditto.
+ * libc/sys/linux/linuxthreads/td_ta_get_ph.c: Ditto.
+ * libc/sys/linux/linuxthreads/td_ta_get_stats.c: Ditto.
+ * libc/sys/linux/linuxthreads/td_ta_map_id2thr.c: Ditto.
+ * libc/sys/linux/linuxthreads/td_ta_map_lwp2thr.c: Ditto.
+ * libc/sys/linux/linuxthreads/td_ta_new.c: Ditto.
+ * libc/sys/linux/linuxthreads/td_ta_reset_stats.c: Ditto.
+ * libc/sys/linux/linuxthreads/td_ta_set_event.c: Ditto.
+ * libc/sys/linux/linuxthreads/td_ta_setconcurrency.c: Ditto.
+ * libc/sys/linux/linuxthreads/td_ta_thr_iter.c: Ditto.
+ * libc/sys/linux/linuxthreads/td_ta_tsd_iter.c: Ditto.
+ * libc/sys/linux/linuxthreads/td_thr_clear_event.c: Ditto.
+ * libc/sys/linux/linuxthreads/td_thr_dbresume.c: Ditto.
+ * libc/sys/linux/linuxthreads/td_thr_dbsuspend.c: Ditto.
+ * libc/sys/linux/linuxthreads/td_thr_event_enable.c: Ditto.
+ * libc/sys/linux/linuxthreads/td_thr_event_getmsg.c: Ditto.
+ * libc/sys/linux/linuxthreads/td_thr_get_info.c: Ditto.
+ * libc/sys/linux/linuxthreads/td_thr_getfpregs.c: Ditto.
+ * libc/sys/linux/linuxthreads/td_thr_getgregs.c: Ditto.
+ * libc/sys/linux/linuxthreads/td_thr_getxregs.c: Ditto.
+ * libc/sys/linux/linuxthreads/td_thr_getxregsize.c: Ditto.
+ * libc/sys/linux/linuxthreads/td_thr_set_event.c: Ditto.
+ * libc/sys/linux/linuxthreads/td_thr_setfpregs.c: Ditto.
+ * libc/sys/linux/linuxthreads/td_thr_setgregs.c: Ditto.
+ * libc/sys/linux/linuxthreads/td_thr_setprio.c: Ditto.
+ * libc/sys/linux/linuxthreads/td_thr_setsigpending.c: Ditto.
+ * libc/sys/linux/linuxthreads/td_thr_setxregs.c: Ditto.
+ * libc/sys/linux/linuxthreads/td_thr_sigsetmask.c: Ditto.
+ * libc/sys/linux/linuxthreads/td_thr_tsd.c: Ditto.
+ * libc/sys/linux/linuxthreads/td_thr_validate.c: Ditto.
+
+2003-11-05 Jeff Johnston <jjohnstn@redhat.com>
+ Artem B. Bityuckiy <abitytsky@softminecorp.com>
+
+ * libc/stdio/vfprintf.c (_VFPRINTF_R): Add support for
+ %ls, %S, %lc, and %C format specifiers.
+ (get_arg): Ditto.
+ * libc/stdio/sprintf.c: Add documentation regarding new
+ format specifiers added in vfprintf.c.
+
+2003-11-05 Jeff Johnston <jjohnstn@redhat.com>
+
+ * libc/stdlib/wcsrtombs.c (_wcsrtombs_r): Numerous fixes
+ to make code work as specified in standard.
+
+2003-10-23 Jeff Johnston <jjohnstn@redhat.com>
+
+ * configure.in: Use absolute newlib basedir when forming
+ CC_FOR_NEWLIB include options.
+ * configure: Regenerated.
+
+2003-10-23 Artem B. Bityuckiy <abitytsky@softminecorp.com>
+
+ * libc/string/wcsnlen.c: New file.
+ * libc/include/wchar.h: Add wcsnlen prototype.
+ * libc/string/Makefile.am: Add wcsnlen support.
+ * libc/string/Makefile.in: Regenerated.
+ * libc/string/wcstrings.tex: Add wcsnlen documentation.
+
+2003-10-22 Richard Sandiford <rsandifo@redhat.com>
+
+ * libc/stdlib/exit.c (exit): Handle null _GLOBAL_REENT->_atexits.
+
+2003-10-20 Bob Wilson <bob.wilson@acm.org>
+
+ * libc/locale/locale.c: Use double quotes in code.
+ * libc/locale/locale.tex: Likewise.
+ * libc/libc.texinfo: Hyphenate "floating-point".
+ * libc/machine/necv70/necv70.tex: Likewise.
+ * libc/stdio/sprintf.c: Likewise.
+ * libc/stdio/sscanf.c: Likewise.
+ * libc/stdlib/atof.c: Likewise.
+ * libc/stdlib/ldtoa.c: Fix comment typo.
+ * libc/stdlib/div.c: Use @ifnottex instead of @ifinfo.
+ * libc/stdlib/ldiv.c: Likewise.
+ * libm/common/s_expm1.c: Likewise.
+ * libm/common/s_ilogb.c: Hyphenate "floating-point". Use "nonzero".
+ * libm/common/s_infinity: Hyphenate "double- and single-precision".
+ * libm/common/s_nan.c: Likewise. Also correct the FUNCTION summary.
+ * libm/common/s_nextafter.c: Fix typo. Hyphenate "double-precision"
+ and "floating-point".
+ * libm/common/s_scalbn.c: Correct the FUNCTION summary.
+ * libm/math/e_pow.c: Fix comment typo.
+ * libm/math/math.tex: Hyphenate "single-precision" and "floating-point".
+ * libm/math/s_asinh.c: Use @ifnottex instead of @ifinfo.
+ * libm/math/s_atan.c: Likewise.
+ * libm/math/s_frexp.c: Likewise. Also use "nonzero".
+ * libm/math/s_isnan.c: Hyphenate "single-precision" and
+ "floating-point". Use "nonzero".
+ * libm/math/s_ldexp.c: Use @ifnottex instead of @ifinfo.
+ * libm/math/w_acos.c: Likewise.
+ * libm/math/w_acosh.c: Likewise.
+ * libm/math/w_asin.c: Likewise.
+ * libm/math/w_atan2.c: Likewise.
+ * libm/math/w_atanh.c: Likewise.
+ * libm/math/w_cosh.c: Likewise.
+ * libm/math/w_exp.c: Likewise.
+ * libm/math/w_exp2.c: Likewise. Add missing @end and missing @tex
+ version of 2^x in the description.
+ * libm/math/w_fmod.c: Use @ifnottex instead of @ifinfo.
+ * libm/math/w_gamma.c: Likewise.
+ * libm/math/w_hypot.c: Likewise.
+ * libm/math/w_j0.c: Likewise.
+ * libm/math/w_sinh.c: Likewise.
+ * libm/math/w_pow.c: Replace "exp1.0nt" with "exponent".
+ * libm/mathfp/mathfp.tex: Hyphenate "single-precision" and
+ "floating-point".
+ * libm/mathfp/e_acosh.c: Use @ifnottex instead of @ifinfo.
+ * libm/mathfp/e_atanh.c: Likewise.
+ * libm/mathfp/e_hypot.c: Likewise.
+ * libm/mathfp/er_lgamma.c: Likewise.
+ * libm/mathfp/s_acos.c: Likewise.
+ * libm/mathfp/s_asine.c: Likewise.
+ * libm/mathfp/s_asinh.c: Likewise.
+ * libm/mathfp/s_atan.c: Likewise.
+ * libm/mathfp/s_atan2.c: Likewise.
+ * libm/mathfp/s_atangent.c: Likewise.
+ * libm/mathfp/s_cosh.c: Likewise.
+ * libm/mathfp/s_exp.c: Likewise.
+ * libm/mathfp/s_fmod.c: Likewise.
+ * libm/mathfp/s_frexp.c: Likewise. Also use "nonzero".
+ * libm/mathfp/s_isnan.c: Hyphenate "single-precision" and
+ "floating-point". Use "nonzero".
+ * libm/math/s_pow.c: Replace "exp1.0nt" with "exponent".
+ * libm/mathfp/s_ldexp.c: Use @ifnottex instead of @ifinfo.
+ * libm/mathfp/s_sineh.c: Likewise.
+ * libm/mathfp/w_jn.c: Likewise.
+
+2003-10-15 Alexandre Oliva <aoliva@redhat.com>
+
+ * Makefile.am: Add $(MAKE) comments to multido and multiclean
+ lines, to enable parallel make.
+ * Makefile.in: Rebuilt.
+
+2003-10-14 Christopher Faylor <cgf@redhat.com>
+
+ * libc/time/clock.c: Clarify documentation of return value when no
+ measurement is available.
+
+2003-09-29 Ian Lance Taylor <ian@wasabisystems.com>
+
+ * libm/configure.in: Check libm_machine_dir, not machine_dir.
+ * libm/configure: Regenerate.
+ * libm/Makefile.in: Ditto.
+
+2003-09-29 J"orn Rennecke <joern.rennecke@superh.com>
+
+ * libc/machine/sh/strncpy.S: New file.
+ * libc/machine/sh/Makefile.am: Add entry & rule for new file.
+ * libc/machine/sh/Makefile.in: Regenerate.
+
+2003-09-11 James E Wilson <wilson@specifixinc.com>
+
+ * MAINTAINERS: Update my e-mail address.
+
+2003-09-10 Corinna Vinschen <corinna@vinschen.de>
+
+ * libc/include/sys/unistd.h: Declare function daemon for Cygwin.
+
+2003-09-09 Jeff Johnston <jjohnstn@redhat.com>
+
+ * libc/machine/powerpc/fix64.h: Fix typo for _simdldcheck
+ prototype.
+ * libc/machine/powerpc/simdldtoa.c: Remove prototype for
+ _simdldcheck(). Also add unsigned cast for index variable in
+ for loop using sizeof operators.
+ * libc/machine/powerpc/strtoufix32.c: Remove unused variable.
+ * libc/machine/powerpc/strtosfix64.c: Fix call to _simdldcheck.
+ * libc/machine/powerpc/strtoufix64.c (_strtoufix64_r): Ditto
+ plus fix shift calculation for determining if there is a
+ carry from word2.
+
+2003-09-09 Corinna Vinschen <corinna@vinschen.de>
+
+ * libc/include/grp.h: Don't define setgrfile, group_from_gid and
+ setgroupent for Cygwin.
+
+2003-09-05 Jeff Johnston <jjohnstn@redhat.com>
+
+ * libc/stdlib/exit.c (exit): Setting of struct _atexit ptr p
+ is different for _REENT_SMALL than when using regular reent
+ struct.
+
+2003-09-05 Ben Elliston <bje@wasabisystems.com>
+
+ * libc/ctype/wctype.c (_DEFUN): Remove empty default case, as
+ modern versions of GCC issue a warning.
+
+ * libc/machine/xscale/memcmp.c (memcmp): Strip trailing whitespace
+ after continuation characters that induces a warning from modern
+ versions of GCC.
+
+2003-09-04 Ben Elliston <bje@wasabisystems.com>
+
+ * libc/stdlib/mstats.c[_ELIX_LEVEL]: Fix guards. #ifndef FOO ||
+ FOO >= 2 is invalid; use #if !defined (FOO) || FOO >= 2 instead.
+
+2003-09-02 Thomas Pfaff <tpfaff@gmx.net>
+
+ * libc/stdlib/atexit.c: Rename _REENT to _GLOBAL_REENT throughout.
+ * libc/stdlib/exit.c : Ditto.
+ * libc/stdlib/on_exit.c: Ditto.
+
+2003-08-27 Corinna Vinschen <corinna@vinschen.de>
+
+ * libc/include/reent.h: Define stat64 as __stat64 when
+ compiling newlib for Cygwin.
+
+2003-08-26 Jeff Johnston <jjohnstn@redhat.com>
+
+ * libc/include/sys/stat.h[__CYGWIN__]: Only define stat64 as
+ __stat64 when compiling newlib.
+
+2003-08-26 Jeff Johnston <jjohnstn@redhat.com>
+
+ * libc/include/stdio.h: Allow the io64 function prototypes for
+ Cygwin when compiling newlib.
+ * libc/include/sys/stat.h[__CYGWIN__]: Define stat64 as __stat64
+ to expose the Cygwin struct __stat64 type.
+ * libc/stdio64/fseeko64.c: Use _fstat64_r and pass a struct stat64
+ pointer.
+ * libc/stdio64/tmpfile64.c(_tmpfile64_r): Call _fopen64_r.
+
+2003-08-23 Christopher Faylor <cgf@redhat.com>
+
+ * libc/stdio64/fseeko64.c (fseeko64_r): Rename second fseeko64_r
+ definition to fseeko64.
+
+2003-08-22 Jeff Johnston <jjohnstn@redhat.com>
+
+ * libc/include/sys/reent.h: Add _GLOBAL_REENT macro.
+ * libc/stdio: Globally remove/replace all references to fp->_data.
+ Replace with _REENT or _GLOBAL_REENT where appropriate.
+ * libc/stdio/asprintf.c: Ditto.
+ * libc/stdio/fclose.c: Ditto.
+ * libc/stdio/fvwrite.c: Ditto.
+ * libc/stdio/makebuf.c: Ditto.
+ * libc/stdio/refill.c: Ditto.
+ * libc/stdio/local.h: Ditto.
+ * libc/stdio/setvbuf.c: Ditto.
+ * libc/stdio/sscanf.c: Ditto.
+ * libc/stdio/stdio.c: Ditto.
+ * libc/stdio/ungetc.c: Ditto.
+ * libc/stdio/vfscanf.c: Ditto.
+ * libc/stdio/vsscanf.c: Ditto.
+ * libc/stdio/fopen.c: Ditto. Also use _fseek_r in _fopen_r.
+ * libc/stdio/vasprintf.c: Ditto. Also call _vfprintf_r directly.
+ * libc/stdio/vsnprintf.c: Ditto.
+ * libc/stdio/vsprintf.c: Ditto.
+ * libc/stdio/fcloseall.c(fcloseall): Use _GLOBAL_REENT macro
+ instead of _REENT to walk file list.
+ * libc/stdio/fflush.c: Ditto.
+ * libc/stdio/fgetpos.c: Add reentrant version and have regular
+ version call reentrant version with _REENT argument.
+ * libc/stdio/fsetpos.c: Ditto.
+ * libc/stdio/fseek.c: Ditto.
+ * libc/stdio/fseeko.c: Ditto.
+ * libc/stdio/ftell.c: Ditto.
+ * libc/stdio/ftello.c: Ditto.
+ * libc/stdio/freopen.c: Ditto.
+ * libc/stdio/findfp.c: Use _GLOBAL_REENT pointer when adding
+ new files to chain. Also use _GLOBAL_REENT pointer for
+ cleaning up.
+ * libc/stdio/fiprintf.c: Reformatted to minimize duplicate code.
+ * libc/stdio/siprintf.c: Ditto.
+ * libc/stdio/iprintf.c: Ditto.
+ * libc/stdio/fprintf.c: Ditto.
+ * libc/stdio/printf.c: Ditto.
+ * libc/stdio/snprintf.c: Call _vfprintf_r directly.
+ * libc/stdio/sprintf.c: Ditto.
+ * libc/stdio/vprintf.c: Ditto. Also add _REENT_ONLY check.
+ * libc/stdio/rewind.c: Call _fseek_r directly.
+ * libc/stdio/tmpfile.c: Call _fopen_r and _remove_r directly.
+ * libc/stdio/vfprintf.c (_VFPRINTF_R): Change _r routines to use
+ data pointer.
+ (get_arg): Add extra struct _reent pointer argument.
+ * libc/stdio64/fgetpos64.c: Add _r versions, remove any reference
+ to fp->_data.
+ * libc/stdio64/fopen64.c: Ditto.
+ * libc/stdio64/freopen64.c: Ditto.
+ * libc/stdio64/fsetpos64.c: Ditto.
+ * libc/stdio64/ftello64.c: Ditto.
+ * libc/stdio64/local64.h: Ditto.
+ * libc/stdio64/stdio64.c: Ditto.
+ * libc/stdio64/fseeko64.c: Ditto plus use _fstat_r instead of
+ _fstat64_r for the meantime.
+
+2003-08-19 Jeff Johnston <jjohnstn@redhat.com>
+
+ * libc/stdlib/mallocr.c (mALLOc, rEALLOc, mEMEALIGn): Enhance
+ overflow detection.
+
+2003-08-13 Aldy Hernandez <aldyh@redhat.com>
+
+ * libc/machine/powerpc/machine/stdlib.h: Wrap SPE functions in
+ extern "C".
+
+2003-08-13 Jeff Johnston <jjohnstn@redhat.com>
+
+ * libc/include/math.h: Add prototypes for __signbitf and
+ __signbitd.
+
+2003-07-31 Jeff Johnston <jjohnstn@redhat.com>
+
+ * libc/ctype/iswalpha.c: Fix calls to __jp2uc to pass the
+ correct type of conversion when dealing with EUCJP or SJIS.
+ * libc/ctype/iswblank.c: Ditto.
+ * libc/ctype/iswcntrl.c: Ditto.
+ * libc/ctype/iswprint.c: Ditto.
+ * libc/ctype/iswpunct.c: Ditto.
+ * libc/ctype/iswspace.c: Ditto.
+ * libc/ctype/towlower.c: Ditto.
+ * libc/ctype/towupper.c: Ditto.
+
+2003-07-31 Nick Clifton <nickc@redhat.com>
+
+ * libc/sys/sysnecv850/crt0.S (_start): Allocate 4 slots on stack
+ before calling main, in case it saves its argument registers.
+ Remove reference to deleted v850ea port.
+ * configure.host: Remove reference to deleted v850ea port.
+ Do not use -mv850 when building for v850e target. This
+ prevents the ctbp system register from being initialised.
+
+2003-07-29 Honda Hiroki <hhonda@ipflex.com>
+
+ * libc/stdio/vfprintf.c: Set output size to 1 when
+ we have %f format with precision 0 and # flag not specified.
+
+2003-07-29 Alexandre Oliva <aoliva@redhat.com>
+
+ * libc/machine/mn10300/setjmp.S: Never emit both .am33 and
+ .am33_2.
+
+2003-07-25 Christopher Faylor <cgf@redhat.com>
+
+ * libc/stdio64/fdopen64.c: Include sys/lock.h.
+
+2003-07-25 Christopher Faylor <cgf@redhat.com>
+
+ * configure.host: Find cygwin include directory, when appropriate.
+
+2003-07-24 Christopher Faylor <cgf@redhat.com>
+
+ * libc/stdio64/fdopen64.c: New file.
+ * libc/stdio64/Makefile.am (LIB_OBJS): Add fdopen64.o
+ * libc/stdio64/Makefile.in: Regenerate.
+ * libc/include/stdio.h (fdopen64): Define.
+ * libc/include/stdio.h (_fdopen64_r): Ditto.
+
+2003-07-10 Alexandre Oliva <aoliva@redhat.com>
+
+ 2000-04-27 Alexandre Oliva <aoliva@cygnus.com>
+ * libc/include/machine/setjmp.h (_JBLEN, AM33/2.0): Set to 26.
+ * libc/machine/mn10300/setjmp.S (setjmp, longjmp): Save and
+ restore callee-saved FP registers.
+
+2003-07-10 J"orn Rennecke <joern.rennecke@superh.com>
+
+ * libc/include/sys/unistd.h (ftruncate, truncate): Also declare
+ for __sh__.
+ * libc/sys/sh/Makefile.am (lib_a_SOURCES): Add ftruncate.c and
+ truncate.c.
+ * libc/sys/sh/Makefile.in: Regenerate.
+ * libc/sys/sh/sys/syscall.h: (SYS_truncate, SYS_ftruncate): Define.
+ * libc/sys/sh/ftruncate.c: New file.
+ * libc/sys/sh/truncate.c: Likewise.
+
+2003-07-09 Alexandre Oliva <aoliva@redhat.com>
+
+ * libc/include/math.h (nan, nanf): Update prototype to C99.
+ * libm/common/s_nan.c (nan): Likewise.
+ * libm/common/s_nanf.c (nanf, nan): Likewise.
+ * libc/sys/linux/cmath/math_private.h (nan, nanf): Likewise.
+
+2003-07-07 Jeff Johnston <jjohnstn@redhat.com>
+
+ * libc/include/stdbool.h: Removed as this is defined by gcc.
+
+2003-07-03 Shaun Jackman <sjackman@pathwayconnect.com>
+
+ * libc/include/stdbool.h: New header file defined by C99.
+
+2003-07-02 Jeff Johnston <jjohnstn@redhat.com>
+
+ * libc/include/sys/types.h (int8_t): Make signed.
+
+2003-07-02 Jeff Johnston <jjohnstn@redhat.com>
+
+ * libc/sys/linux/include/mqueue.h: Add include of <sys/fcntl.h>.
+
+2003-06-27 Jose Goncalves <jose.goncalves@inov.pt>
+
+ * libc/sys/linux/mq_open.c (mq_open): Only set created flag
+ on if we actually created the shared memory file exclusively.
+
+2003-06-27 Joe Vornehm <joev@mitre.org>
+
+ * libm/common/s_fpclassify.c (__fpclassifyf): Fix
+ comparisons to account for unsigned internal value w.
+
+2003-06-26 Jeff Johnston <jjohnstn@redhat.com>
+
+ * libc/sys/linux/mq_open.c (mq_open): Must allocate rdbuf and
+ wrbuf for a non-creating open.
+
+2003-06-24 Kazu Hirata <kazu@cs.umass.edu>
+
+ * libc/machine/h8300/setarch.h: New.
+ * libc/machine/h8300/memcpy.S: Use it.
+ * libc/machine/h8300/memset.S: Likewise.
+ * libc/machine/h8300/reg_memcpy.S: Likewise.
+ * libc/machine/h8300/reg_memset.S: Likewise.
+ * libc/machine/h8300/setjmp.S: Likewise.
+ * libc/machine/h8300/strcmp.S: Likewise.
+
+2003-06-24 Richard Sandiford <rsandifo@redhat.com>
+
+ * libc/sys/h8300hms/crt0.S (_start): Fix register sizes in call
+ to atexit().
+
+2003-06-20 Jeff Johnston <jjohnstn@redhat.com>
+
+ * configure.host (iq2000): Add tabs.
+
+2003-06-20 Jeff Johnston <jjohnstn@redhat.com>
+
+ * libc/include/sys/reent.h (_REENT_INIT_PTR): Fix macros
+ to handle latest on_exit change.
+ * libc/sys/linux/Makefile.am: Remove special compilation
+ for malloc.c and mcheck.c.
+ * libc/sys/linux/Makefile.in: Regenerated.
+ * libc/sys/linux/mntent.c: Add definition of _LIBC flag
+ after including <features.h>.
+ * libc/sys/linux/mcheck.c: Ditto.
+ * libc/sys/linux/malloc.c: Ditto plus define _GNU_SOURCE
+ for <features.h>.
+ * libc/sys/linux/intl/Makefile.am: Remove -D_LIBC and
+ add -DNOT_IN_libc to C flags.
+ * libc/sys/linux/intl/Makefile.in: Regenerated.
+ * libc/sys/linux/intl/config.h: Add definition of _LIBC.
+ * libc/sys/linux/linuxthreads/semaphore.h: Include
+ <bits/pthreadtypes.h>.
+ * libc/sys/linux/sys/dirent.h: Define _LIBC and NOT_IN_libc after
+ including <features.h>.
+ * libc/sys/linux/sys/lock.h: Ditto.
+
+2003-06-11 Nick Clifton <nickc@redhat.com>
+
+ * libc/reent/reent.c (reclaim_reent): Fix typo in code to free
+ _on_exit_args_ptr.
+
+2003-06-10 Stan Cox <scox@redhat.com>
+ Anthony Green <green@redhat.com>
+
+ * configure.host: Add iq2000 support.
+ * newlib/libc/include/machine/ieeefp.h: Ditto.
+ * newlib/libc/include/machine/setjmp.h: Ditto.
+ * libc/machine/iq2000, libc/machine/iq2000/setjmp.S,
+ libc/machine/iq2000/aclocal.m4, libc/machine/iq2000/configure,
+ libc/machine/iq2000/configure.in, libc/machine/iq2000/Makefile.am,
+ libc/machine/iq2000/Makefile.in: New files.
+
+2003-06-10 Richard Sandiford <rsandifo@redhat.com>
+
+ * libc/sys/h8300hms/setarch.h: New file.
+ * libc/sys/h8300hms/close.S, libc/sys/h8300hms/fstat.S,
+ libc/sys/h8300hms/lseek.S, libc/sys/h8300hms/open.S,
+ libc/sys/h8300hms/read.S, libc/sys/h8300hms/stat.S,
+ libc/sys/h8300hms/write.S, libc/sys/h8300hms/crt0.S: Use it.
+
+2003-06-06 Jeff Johnston <jjohnstn@redhat.com>
+
+ * libc/argz/argz_add.c: Change to use _DEFUN macro for function
+ definition.
+ * libc/argz/argz_add_sep.c: Ditto.
+ * libc/argz/argz_append.c libc/argz/argz_count.c: Ditto.
+ * libc/argz/argz_create.c libc/argz/argz_create_sep.c: Ditto.
+ * libc/argz/argz_delete.c libc/argz/argz_extract.c: Ditto.
+ * libc/argz/argz_insert.c libc/argz/argz_next.c: Ditto.
+ * libc/argz/argz_replace.c libc/argz/argz_stringify.c: Ditto.
+ * libc/argz/envz_add.c libc/argz/envz_entry.c: Ditto.
+ * libc/argz/envz_get.c libc/argz/envz_merge.c: Ditto.
+ * libc/argz/envz_remove.c libc/argz/envz_strip.c: Ditto.
+ * libc/locale/nl_langinfo.c libc/misc/ffs.c: Ditto.
+ * libc/posix/closedir.c libc/posix/creat.c: Ditto.
+ * libc/posix/execl.c libc/posix/execle.c: Ditto.
+ * libc/posix/execlp.c libc/posix/execve.c: Ditto.
+ * libc/posix/isatty.c libc/posix/opendir.c: Ditto.
+ * libc/posix/popen.c libc/posix/readdir.c: Ditto.
+ * libc/posix/readdir_r.c libc/posix/rewinddir.c: Ditto.
+ * libc/posix/scandir.c libc/posix/seekdir.c: Ditto.
+ * libc/posix/telldir.c libc/search/hcreate.c: Ditto.
+ * libc/search/tdelete.c libc/search/tdestroy.c: Ditto.
+ * libc/search/tfind.c libc/search/tsearch.c: Ditto.
+ * libc/search/twalk.c libc/signal/signal.c: Ditto.
+
+2003-06-05 Nick Clifton <nickc@redhat.com>
+
+ * libc/include/sys/reent.h (struct _on_exit_args): New
+ structure containing fields used by the on_exit() function.
+ (struct _atexit): Include struct _on_exit_args. For
+ _REENT_SMALL do his via a pointer that is initialised when
+ needed.
+ * libc/reent/reent.c (_reclaim_reent): Free the _on_exit_args
+ structure, if one has been allocated.
+ * libc/stdlib/atexit.c (atexit): Update indirection to
+ _fntypes field.
+ * libc/stdlib/on_exit.c (on_exit): Indirect via the
+ _on_exit_args structure. For _REENT_SMALL, allocate a
+ structure if one does not exist.
+ * libc/stdlib/exit.c (exit): Indirect via the _on_exit_args
+ structure.
+
+2003-06-04 Jeff Johnston <jjohnstn@redhat.com>
+
+ * libc/sys/linux/net/Makefile.am: Remove extraneous markers.
+ * libc/sys/linux/net/Makefile.in: Regenerated.
+
+2003-06-03 Jeff Johnston <jjohnstn@redhat.com>
+
+ * libc/reent/execr.c: Use _DEFUN macro for function declaration.
+ * libc/reent/fcntlr.c: Ditto.
+ * libc/reent/fstat64r.c: Ditto.
+ * libc/reent/linkr.c: Ditto.
+ * libc/reent/lseek64r.c: Ditto.
+ * libc/reent/lseekr.c: Ditto.
+ * libc/reent/openr.c: Ditto.
+ * libc/reent/readr.c: Ditto.
+ * libc/reent/reent.c: Ditto.
+ * libc/reent/sbrkr.c: Ditto.
+ * libc/reent/signalr.c: Ditto.
+ * libc/reent/signgam.c: Ditto.
+ * libc/reent/statr.c: Ditto.
+ * libc/reent/timer.c: Ditto.
+ * libc/reent/unlinkr.c: Ditto.
+ * libc/reent/writer.c: Ditto.
+ * libc/syscalls/sysclose.c: Ditto.
+ * libc/syscalls/sysexecve.c: Ditto.
+ * libc/syscalls/sysfcntl.c: Ditto.
+ * libc/syscalls/sysfork.c: Ditto.
+ * libc/syscalls/sysfstat.c: Ditto.
+ * libc/syscalls/sysgetpid.c: Ditto.
+ * libc/syscalls/sysgettod.c: Ditto.
+ * libc/syscalls/syskill.c: Ditto.
+ * libc/syscalls/syslink.c: Ditto.
+ * libc/syscalls/syslseek.c: Ditto.
+ * libc/syscalls/sysopen.c: Ditto.
+ * libc/syscalls/sysread.c: Ditto.
+ * libc/syscalls/syssbrk.c: Ditto.
+ * libc/syscalls/sysstat.c: Ditto.
+ * libc/syscalls/systimes.c: Ditto.
+ * libc/syscalls/sysunlink.c: Ditto.
+ * libc/syscalls/syswait.c: Ditto.
+ * libc/syscalls/syswrite.c: Ditto.
+
+2003-06-03 Till Straumann <strauman@SLAC.Stanford.EDU>
+
+ * libc/time/tzset_r.c: Change local variables that are
+ set via sscanf using the %h format specifier to be unsigned short
+ instead of int.
+
+2003-05-30 Kelley Cook <kelleycook@wideopenwest.com>
+
+ * configure.host: Allow i[34567]86 variant.
+ * configure.in: Likewise.
+ * README: Likewise to the docs.
+ * configure: Regenerated.
+ * Makefile.in: Ditto.
+
+2003-05-28 Jeff Johnston <jjohnstn@redhat.com>
+ Tom Fitzsimmons <fitzsim@redhat.com>
+
+ * configure.in: Add iconvdata support for x86 linux.
+ * configure: Regenerated.
+ * libc/sys/linux/Makefile.am: Add EL/IX level 3 network, dynamic
+ library, iconv, and linuxthreads support.
+ * libc/sys/linux/configure.in: Ditto.
+ * libc/sys/linux/Makefile.in: Regenerated.
+ * libc/sys/linux/configure: Ditto.
+ * iconvdata/EUC-JP.irreversible: New file.
+ * iconvdata/Makefile.am: Ditto.
+ * iconvdata/Makefile.in: Ditto.
+ * iconvdata/SJIS.irreversible: Ditto.
+ * iconvdata/aclocal.m4: Ditto.
+ * iconvdata/configure: Ditto.
+ * iconvdata/configure.in: Ditto.
+ * iconvdata/dummy.c: Ditto.
+ * iconvdata/euc-jp.c: Ditto.
+ * iconvdata/gconv-modules: Ditto.
+ * iconvdata/jis0201.c: Ditto.
+ * iconvdata/jis0201.h: Ditto.
+ * iconvdata/jis0208.c: Ditto.
+ * iconvdata/jis0208.h: Ditto.
+ * iconvdata/jis0212.c: Ditto.
+ * iconvdata/jis0212.h: Ditto.
+ * iconvdata/sjis.c: Ditto.
+ * libc/include/errno.h: Protect definition of error_t.
+ * libc/sys/linux/gethostid.c: New file.
+ * libc/sys/linux/sethostid.c: Ditto.
+ * libc/sys/linux/dl/Makefile.am: Ditto.
+ * libc/sys/linux/dl/Makefile.in: Ditto.
+ * libc/sys/linux/dl/abi-tag.h: Ditto.
+ * libc/sys/linux/dl/atomicity.h: Ditto.
+ * libc/sys/linux/dl/dl-addr.c: Ditto.
+ * libc/sys/linux/dl/dl-cache.c: Ditto.
+ * libc/sys/linux/dl/dl-cache.h: Ditto.
+ * libc/sys/linux/dl/dl-close.c: Ditto.
+ * libc/sys/linux/dl/dl-debug.c: Ditto.
+ * libc/sys/linux/dl/dl-deps.c: Ditto.
+ * libc/sys/linux/dl/dl-dst.h: Ditto.
+ * libc/sys/linux/dl/dl-error.c: Ditto.
+ * libc/sys/linux/dl/dl-fini.c: Ditto.
+ * libc/sys/linux/dl/dl-init.c: Ditto.
+ * libc/sys/linux/dl/dl-iteratephdr.c: Ditto.
+ * libc/sys/linux/dl/dl-libc.c: Ditto.
+ * libc/sys/linux/dl/dl-librecon.h: Ditto.
+ * libc/sys/linux/dl/dl-load.c: Ditto.
+ * libc/sys/linux/dl/dl-lookup.c: Ditto.
+ * libc/sys/linux/dl/dl-lookupcfg.h: Ditto.
+ * libc/sys/linux/dl/dl-minimal.c: Ditto.
+ * libc/sys/linux/dl/dl-misc.c: Ditto.
+ * libc/sys/linux/dl/dl-object.c: Ditto.
+ * libc/sys/linux/dl/dl-open.c: Ditto.
+ * libc/sys/linux/dl/dl-osinfo.h: Ditto.
+ * libc/sys/linux/dl/dl-profile.c: Ditto.
+ * libc/sys/linux/dl/dl-profstub.c: Ditto.
+ * libc/sys/linux/dl/dl-reloc.c: Ditto.
+ * libc/sys/linux/dl/dl-runtime.c: Ditto.
+ * libc/sys/linux/dl/dl-support.c: Ditto.
+ * libc/sys/linux/dl/dl-sym.c: Ditto.
+ * libc/sys/linux/dl/dl-version.c: Ditto.
+ * libc/sys/linux/dl/dlfcn.h: Ditto.
+ * libc/sys/linux/dl/do-lookup.h: Ditto.
+ * libc/sys/linux/dl/do-rel.h: Ditto.
+ * libc/sys/linux/dl/dynamic-link.h: Ditto.
+ * libc/sys/linux/dl/kernel-features.h: Ditto.
+ * libc/sys/linux/dl/ldsodefs.h: Ditto.
+ * libc/sys/linux/dl/libintl.h: Ditto.
+ * libc/sys/linux/dl/trusted-dirs.h: Ditto.
+ * libc/sys/linux/dl/unsecvars.h: Ditto.
+ * libc/sys/linux/iconv/Makefile.am: Ditto.
+ * libc/sys/linux/iconv/Makefile.in: Ditto.
+ * libc/sys/linux/iconv/categories.def: Ditto.
+ * libc/sys/linux/iconv/dummy-repertoire.c: Ditto.
+ * libc/sys/linux/iconv/gconv.c: Ditto.
+ * libc/sys/linux/iconv/gconv_builtin.c: Ditto.
+ * libc/sys/linux/iconv/gconv_builtin.h: Ditto.
+ * libc/sys/linux/iconv/gconv_cache.c: Ditto.
+ * libc/sys/linux/iconv/gconv_charset.h: Ditto.
+ * libc/sys/linux/iconv/gconv_close.c: Ditto.
+ * libc/sys/linux/iconv/gconv_conf.c: Ditto.
+ * libc/sys/linux/iconv/gconv_db.c: Ditto.
+ * libc/sys/linux/iconv/gconv_dl.c: Ditto.
+ * libc/sys/linux/iconv/gconv_int.h: Ditto.
+ * libc/sys/linux/iconv/gconv_open.c: Ditto.
+ * libc/sys/linux/iconv/gconv_simple.c: Ditto.
+ * libc/sys/linux/iconv/gconv_trans.c: Ditto.
+ * libc/sys/linux/iconv/hash-string.h: Ditto.
+ * libc/sys/linux/iconv/iconv.c: Ditto.
+ * libc/sys/linux/iconv/iconv.h: Ditto.
+ * libc/sys/linux/iconv/iconv_charmap.c: Ditto.
+ * libc/sys/linux/iconv/iconv_close.c: Ditto.
+ * libc/sys/linux/iconv/iconv_open.c: Ditto.
+ * libc/sys/linux/iconv/iconvconfig.c: Ditto.
+ * libc/sys/linux/iconv/iconvconfig.h: Ditto.
+ * libc/sys/linux/iconv/loadinfo.h: Ditto.
+ * libc/sys/linux/iconv/localeinfo.h: Ditto.
+ * libc/sys/linux/iconv/loop.c: Ditto.
+ * libc/sys/linux/iconv/skeleton.c: Ditto.
+ * libc/sys/linux/iconv/strtab.c: Ditto.
+ * libc/sys/linux/include/dl-hash.h: Ditto.
+ * libc/sys/linux/include/dlfcn.h: Ditto.
+ * libc/sys/linux/include/fnmatch.h: Ditto.
+ * libc/sys/linux/include/gconv.h: Ditto.
+ * libc/sys/linux/include/glob.h: Ditto.
+ * libc/sys/linux/include/hesiod.h: Ditto.
+ * libc/sys/linux/include/ifaddrs.h: Ditto.
+ * libc/sys/linux/include/libc_private.h: Ditto.
+ * libc/sys/linux/include/link.h: Ditto.
+ * libc/sys/linux/include/namespace.h: Ditto.
+ * libc/sys/linux/include/netconfig.h: Ditto.
+ * libc/sys/linux/include/netdb.h: Ditto.
+ * libc/sys/linux/include/nsswitch.h: Ditto.
+ * libc/sys/linux/include/regex.h: Ditto.
+ * libc/sys/linux/include/resolv.h: Ditto.
+ * libc/sys/linux/include/rune.h: Ditto.
+ * libc/sys/linux/include/runetype.h: Ditto.
+ * libc/sys/linux/include/semaphore.h: Ditto.
+ * libc/sys/linux/include/setlocale.h: Ditto.
+ * libc/sys/linux/include/un-namespace.h: Ditto.
+ * libc/sys/linux/include/wordexp.h: Ditto.
+ * libc/sys/linux/include/arpa/ftp.h: Ditto.
+ * libc/sys/linux/include/arpa/inet.h: Ditto.
+ * libc/sys/linux/include/arpa/nameser.h: Ditto.
+ * libc/sys/linux/include/arpa/nameser_compat.h: Ditto.
+ * libc/sys/linux/include/arpa/telnet.h: Ditto.
+ * libc/sys/linux/include/arpa/tftp.h: Ditto.
+ * libc/sys/linux/include/net/bpf.h: Ditto.
+ * libc/sys/linux/include/net/bpf_compat.h: Ditto.
+ * libc/sys/linux/include/net/bpfdesc.h: Ditto.
+ * libc/sys/linux/include/net/bridge.h: Ditto.
+ * libc/sys/linux/include/net/ethernet.h: Ditto.
+ * libc/sys/linux/include/net/fddi.h: Ditto.
+ * libc/sys/linux/include/net/if.h: Ditto.
+ * libc/sys/linux/include/net/if_arc.h: Ditto.
+ * libc/sys/linux/include/net/if_arp.h: Ditto.
+ * libc/sys/linux/include/net/if_atm.h: Ditto.
+ * libc/sys/linux/include/net/if_dl.h: Ditto.
+ * libc/sys/linux/include/net/if_gif.h: Ditto.
+ * libc/sys/linux/include/net/if_ieee80211.h: Ditto.
+ * libc/sys/linux/include/net/if_llc.h: Ditto.
+ * libc/sys/linux/include/net/if_media.h: Ditto.
+ * libc/sys/linux/include/net/if_mib.h: Ditto.
+ * libc/sys/linux/include/net/if_ppp.h: Ditto.
+ * libc/sys/linux/include/net/if_pppvar.h: Ditto.
+ * libc/sys/linux/include/net/if_slvar.h: Ditto.
+ * libc/sys/linux/include/net/if_sppp.h: Ditto.
+ * libc/sys/linux/include/net/if_stf.h: Ditto.
+ * libc/sys/linux/include/net/if_tap.h: Ditto.
+ * libc/sys/linux/include/net/if_tapvar.h: Ditto.
+ * libc/sys/linux/include/net/if_tun.h: Ditto.
+ * libc/sys/linux/include/net/if_tunvar.h: Ditto.
+ * libc/sys/linux/include/net/if_types.h: Ditto.
+ * libc/sys/linux/include/net/if_var.h: Ditto.
+ * libc/sys/linux/include/net/if_vlan_var.h: Ditto.
+ * libc/sys/linux/include/net/intrq.h: Ditto.
+ * libc/sys/linux/include/net/iso88025.h: Ditto.
+ * libc/sys/linux/include/net/net_osdep.h: Ditto.
+ * libc/sys/linux/include/net/netisr.h: Ditto.
+ * libc/sys/linux/include/net/pfil.h: Ditto.
+ * libc/sys/linux/include/net/pfkeyv2.h: Ditto.
+ * libc/sys/linux/include/net/ppp_comp.h: Ditto.
+ * libc/sys/linux/include/net/ppp_defs.h: Ditto.
+ * libc/sys/linux/include/net/radix.h: Ditto.
+ * libc/sys/linux/include/net/raw_cb.h: Ditto.
+ * libc/sys/linux/include/net/route.h: Ditto.
+ * libc/sys/linux/include/net/slcompress.h: Ditto.
+ * libc/sys/linux/include/net/slip.h: Ditto.
+ * libc/sys/linux/include/net/zlib.h: Ditto.
+ * libc/sys/linux/include/netinet/icmp6.h: Ditto.
+ * libc/sys/linux/include/netinet/icmp_var.h: Ditto.
+ * libc/sys/linux/include/netinet/if_atm.h: Ditto.
+ * libc/sys/linux/include/netinet/if_ether.h: Ditto.
+ * libc/sys/linux/include/netinet/igmp.h: Ditto.
+ * libc/sys/linux/include/netinet/igmp_var.h: Ditto.
+ * libc/sys/linux/include/netinet/in.h: Ditto.
+ * libc/sys/linux/include/netinet/in_gif.h: Ditto.
+ * libc/sys/linux/include/netinet/in_pcb.h: Ditto.
+ * libc/sys/linux/include/netinet/in_systm.h: Ditto.
+ * libc/sys/linux/include/netinet/in_var.h: Ditto.
+ * libc/sys/linux/include/netinet/ip.h: Ditto.
+ * libc/sys/linux/include/netinet/ip6.h: Ditto.
+ * libc/sys/linux/include/netinet/ip_dummynet.h: Ditto.
+ * libc/sys/linux/include/netinet/ip_ecn.h: Ditto.
+ * libc/sys/linux/include/netinet/ip_encap.h: Ditto.
+ * libc/sys/linux/include/netinet/ip_flow.h: Ditto.
+ * libc/sys/linux/include/netinet/ip_fw.h: Ditto.
+ * libc/sys/linux/include/netinet/ip_icmp.h: Ditto.
+ * libc/sys/linux/include/netinet/ip_mroute.h: Ditto.
+ * libc/sys/linux/include/netinet/ip_var.h: Ditto.
+ * libc/sys/linux/include/netinet/ipprotosw.h: Ditto.
+ * libc/sys/linux/include/netinet/tcp.h: Ditto.
+ * libc/sys/linux/include/netinet/tcp_debug.h: Ditto.
+ * libc/sys/linux/include/netinet/tcp_fsm.h: Ditto.
+ * libc/sys/linux/include/netinet/tcp_seq.h: Ditto.
+ * libc/sys/linux/include/netinet/tcp_timer.h: Ditto.
+ * libc/sys/linux/include/netinet/tcp_var.h: Ditto.
+ * libc/sys/linux/include/netinet/tcpip.h: Ditto.
+ * libc/sys/linux/include/netinet/udp.h: Ditto.
+ * libc/sys/linux/include/netinet/udp_var.h: Ditto.
+ * libc/sys/linux/include/netinet6/ah.h: Ditto.
+ * libc/sys/linux/include/netinet6/ah6.h: Ditto.
+ * libc/sys/linux/include/netinet6/esp.h: Ditto.
+ * libc/sys/linux/include/netinet6/esp6.h: Ditto.
+ * libc/sys/linux/include/netinet6/esp_rijndael.h: Ditto.
+ * libc/sys/linux/include/netinet6/icmp6.h: Ditto.
+ * libc/sys/linux/include/netinet6/in6.h: Ditto.
+ * libc/sys/linux/include/netinet6/in6_gif.h: Ditto.
+ * libc/sys/linux/include/netinet6/in6_ifattach.h: Ditto.
+ * libc/sys/linux/include/netinet6/in6_pcb.h: Ditto.
+ * libc/sys/linux/include/netinet6/in6_prefix.h: Ditto.
+ * libc/sys/linux/include/netinet6/in6_var.h: Ditto.
+ * libc/sys/linux/include/netinet6/ip6.h: Ditto.
+ * libc/sys/linux/include/netinet6/ip6_ecn.h: Ditto.
+ * libc/sys/linux/include/netinet6/ip6_fw.h: Ditto.
+ * libc/sys/linux/include/netinet6/ip6_mroute.h: Ditto.
+ * libc/sys/linux/include/netinet6/ip6_var.h: Ditto.
+ * libc/sys/linux/include/netinet6/ip6protosw.h: Ditto.
+ * libc/sys/linux/include/netinet6/ipcomp.h: Ditto.
+ * libc/sys/linux/include/netinet6/ipcomp6.h: Ditto.
+ * libc/sys/linux/include/netinet6/ipsec.h: Ditto.
+ * libc/sys/linux/include/netinet6/ipsec6.h: Ditto.
+ * libc/sys/linux/include/netinet6/mld6_var.h: Ditto.
+ * libc/sys/linux/include/netinet6/nd6.h: Ditto.
+ * libc/sys/linux/include/netinet6/pim6.h: Ditto.
+ * libc/sys/linux/include/netinet6/pim6_var.h: Ditto.
+ * libc/sys/linux/include/netinet6/raw_ip6.h: Ditto.
+ * libc/sys/linux/include/netinet6/scope6_var.h: Ditto.
+ * libc/sys/linux/include/netinet6/tcp6_var.h: Ditto.
+ * libc/sys/linux/include/netinet6/udp6_var.h: Ditto.
+ * libc/sys/linux/include/netns/idp.h: Ditto.
+ * libc/sys/linux/include/netns/idp_var.h: Ditto.
+ * libc/sys/linux/include/netns/ns.h: Ditto.
+ * libc/sys/linux/include/netns/ns_error.h: Ditto.
+ * libc/sys/linux/include/netns/ns_if.h: Ditto.
+ * libc/sys/linux/include/netns/ns_pcb.h: Ditto.
+ * libc/sys/linux/include/netns/sp.h: Ditto.
+ * libc/sys/linux/include/netns/spidp.h: Ditto.
+ * libc/sys/linux/include/netns/spp_debug.h: Ditto.
+ * libc/sys/linux/include/netns/spp_timer.h: Ditto.
+ * libc/sys/linux/include/netns/spp_var.h: Ditto.
+ * libc/sys/linux/include/rpc/Makefile: Ditto.
+ * libc/sys/linux/include/rpc/auth.h: Ditto.
+ * libc/sys/linux/include/rpc/auth_des.h: Ditto.
+ * libc/sys/linux/include/rpc/auth_kerb.h: Ditto.
+ * libc/sys/linux/include/rpc/auth_unix.h: Ditto.
+ * libc/sys/linux/include/rpc/clnt.h: Ditto.
+ * libc/sys/linux/include/rpc/clnt_soc.h: Ditto.
+ * libc/sys/linux/include/rpc/clnt_stat.h: Ditto.
+ * libc/sys/linux/include/rpc/des.h: Ditto.
+ * libc/sys/linux/include/rpc/des_crypt.h: Ditto.
+ * libc/sys/linux/include/rpc/nettype.h: Ditto.
+ * libc/sys/linux/include/rpc/pmap_clnt.h: Ditto.
+ * libc/sys/linux/include/rpc/pmap_prot.h: Ditto.
+ * libc/sys/linux/include/rpc/pmap_rmt.h: Ditto.
+ * libc/sys/linux/include/rpc/raw.h: Ditto.
+ * libc/sys/linux/include/rpc/rpc.h: Ditto.
+ * libc/sys/linux/include/rpc/rpc_com.h: Ditto.
+ * libc/sys/linux/include/rpc/rpc_msg.h: Ditto.
+ * libc/sys/linux/include/rpc/rpcb_clnt.h: Ditto.
+ * libc/sys/linux/include/rpc/rpcb_prot.h: Ditto.
+ * libc/sys/linux/include/rpc/rpcb_prot.x: Ditto.
+ * libc/sys/linux/include/rpc/rpcent.h: Ditto.
+ * libc/sys/linux/include/rpc/svc.h: Ditto.
+ * libc/sys/linux/include/rpc/svc_auth.h: Ditto.
+ * libc/sys/linux/include/rpc/svc_dg.h: Ditto.
+ * libc/sys/linux/include/rpc/svc_soc.h: Ditto.
+ * libc/sys/linux/include/rpc/types.h: Ditto.
+ * libc/sys/linux/include/rpc/xdr.h: Ditto.
+ * libc/sys/linux/intl/Makefile.am: Ditto.
+ * libc/sys/linux/intl/Makefile.in: Ditto.
+ * libc/sys/linux/intl/bindtextdom.c: Ditto.
+ * libc/sys/linux/intl/catgets.c: Ditto.
+ * libc/sys/linux/intl/catgetsinfo.h: Ditto.
+ * libc/sys/linux/intl/config.h: Ditto.
+ * libc/sys/linux/intl/dcgettext.c: Ditto.
+ * libc/sys/linux/intl/dcigettext.c: Ditto.
+ * libc/sys/linux/intl/dcngettext.c: Ditto.
+ * libc/sys/linux/intl/dgettext.c: Ditto.
+ * libc/sys/linux/intl/dngettext.c: Ditto.
+ * libc/sys/linux/intl/explodename.c: Ditto.
+ * libc/sys/linux/intl/finddomain.c: Ditto.
+ * libc/sys/linux/intl/gettext.c: Ditto.
+ * libc/sys/linux/intl/gettext.h: Ditto.
+ * libc/sys/linux/intl/gettextP.h: Ditto.
+ * libc/sys/linux/intl/hash-string.h: Ditto.
+ * libc/sys/linux/intl/l10nflist.c: Ditto.
+ * libc/sys/linux/intl/loadinfo.h: Ditto.
+ * libc/sys/linux/intl/loadmsgcat.c: Ditto.
+ * libc/sys/linux/intl/locale.alias: Ditto.
+ * libc/sys/linux/intl/localealias.c: Ditto.
+ * libc/sys/linux/intl/ngettext.c: Ditto.
+ * libc/sys/linux/intl/open_catalog.c: Ditto.
+ * libc/sys/linux/intl/plural.c: Ditto.
+ * libc/sys/linux/intl/plural.y: Ditto.
+ * libc/sys/linux/intl/stpcpy.c: Ditto.
+ * libc/sys/linux/intl/textdomain.c: Ditto.
+ * libc/sys/linux/linuxthreads/LICENSE: Ditto.
+ * libc/sys/linux/linuxthreads/Makefile.am: Ditto.
+ * libc/sys/linux/linuxthreads/Makefile.in: Ditto.
+ * libc/sys/linux/linuxthreads/aclocal.m4: Ditto.
+ * libc/sys/linux/linuxthreads/attr.c: Ditto.
+ * libc/sys/linux/linuxthreads/barrier.c: Ditto.
+ * libc/sys/linux/linuxthreads/bp-sym.h: Ditto.
+ * libc/sys/linux/linuxthreads/cancel.c: Ditto.
+ * libc/sys/linux/linuxthreads/condvar.c: Ditto.
+ * libc/sys/linux/linuxthreads/config.h: Ditto.
+ * libc/sys/linux/linuxthreads/configure: Ditto.
+ * libc/sys/linux/linuxthreads/configure.in: Ditto.
+ * libc/sys/linux/linuxthreads/defs.awk: Ditto.
+ * libc/sys/linux/linuxthreads/ecmutex.c: Ditto.
+ * libc/sys/linux/linuxthreads/events.c: Ditto.
+ * libc/sys/linux/linuxthreads/getcpuclockid.c: Ditto.
+ * libc/sys/linux/linuxthreads/getreent.c: Ditto.
+ * libc/sys/linux/linuxthreads/internals.h: Ditto.
+ * libc/sys/linux/linuxthreads/join.c: Ditto.
+ * libc/sys/linux/linuxthreads/joinrace.c: Ditto.
+ * libc/sys/linux/linuxthreads/kernel-features.h: Ditto.
+ * libc/sys/linux/linuxthreads/libc-internal.h: Ditto.
+ * libc/sys/linux/linuxthreads/libc-symbols.h: Ditto.
+ * libc/sys/linux/linuxthreads/linuxthreads.texi: Ditto.
+ * libc/sys/linux/linuxthreads/lockfile.c: Ditto.
+ * libc/sys/linux/linuxthreads/manager.c: Ditto.
+ * libc/sys/linux/linuxthreads/mq_notify.c: Ditto.
+ * libc/sys/linux/linuxthreads/mutex.c: Ditto.
+ * libc/sys/linux/linuxthreads/no-tsd.c: Ditto.
+ * libc/sys/linux/linuxthreads/oldsemaphore.c: Ditto.
+ * libc/sys/linux/linuxthreads/posix-timer.h: Ditto.
+ * libc/sys/linux/linuxthreads/prio.c: Ditto.
+ * libc/sys/linux/linuxthreads/proc_service.h: Ditto.
+ * libc/sys/linux/linuxthreads/pt-machine.c: Ditto.
+ * libc/sys/linux/linuxthreads/ptclock_gettime.c: Ditto.
+ * libc/sys/linux/linuxthreads/ptclock_settime.c: Ditto.
+ * libc/sys/linux/linuxthreads/ptfork.c: Ditto.
+ * libc/sys/linux/linuxthreads/pthread.c: Ditto.
+ * libc/sys/linux/linuxthreads/ptlongjmp.c: Ditto.
+ * libc/sys/linux/linuxthreads/queue.h: Ditto.
+ * libc/sys/linux/linuxthreads/reent.c: Ditto.
+ * libc/sys/linux/linuxthreads/reqsyscalls.c: Ditto.
+ * libc/sys/linux/linuxthreads/restart.h: Ditto.
+ * libc/sys/linux/linuxthreads/rwlock.c: Ditto.
+ * libc/sys/linux/linuxthreads/semaphore.c: Ditto.
+ * libc/sys/linux/linuxthreads/semaphore.h: Ditto.
+ * libc/sys/linux/linuxthreads/shlib-compat.h: Ditto.
+ * libc/sys/linux/linuxthreads/signals.c: Ditto.
+ * libc/sys/linux/linuxthreads/specific.c: Ditto.
+ * libc/sys/linux/linuxthreads/spinlock.c: Ditto.
+ * libc/sys/linux/linuxthreads/spinlock.h: Ditto.
+ * libc/sys/linux/linuxthreads/sysctl.c: Ditto.
+ * libc/sys/linux/linuxthreads/td_init.c: Ditto.
+ * libc/sys/linux/linuxthreads/td_log.c: Ditto.
+ * libc/sys/linux/linuxthreads/td_symbol_list.c: Ditto.
+ * libc/sys/linux/linuxthreads/td_ta_clear_event.c: Ditto.
+ * libc/sys/linux/linuxthreads/td_ta_delete.c: Ditto.
+ * libc/sys/linux/linuxthreads/td_ta_enable_stats.c: Ditto.
+ * libc/sys/linux/linuxthreads/td_ta_event_addr.c: Ditto.
+ * libc/sys/linux/linuxthreads/td_ta_event_getmsg.c: Ditto.
+ * libc/sys/linux/linuxthreads/td_ta_get_nthreads.c: Ditto.
+ * libc/sys/linux/linuxthreads/td_ta_get_ph.c: Ditto.
+ * libc/sys/linux/linuxthreads/td_ta_get_stats.c: Ditto.
+ * libc/sys/linux/linuxthreads/td_ta_map_id2thr.c: Ditto.
+ * libc/sys/linux/linuxthreads/td_ta_map_lwp2thr.c: Ditto.
+ * libc/sys/linux/linuxthreads/td_ta_new.c: Ditto.
+ * libc/sys/linux/linuxthreads/td_ta_reset_stats.c: Ditto.
+ * libc/sys/linux/linuxthreads/td_ta_set_event.c: Ditto.
+ * libc/sys/linux/linuxthreads/td_ta_setconcurrency.c: Ditto.
+ * libc/sys/linux/linuxthreads/td_ta_thr_iter.c: Ditto.
+ * libc/sys/linux/linuxthreads/td_ta_tsd_iter.c: Ditto.
+ * libc/sys/linux/linuxthreads/td_thr_clear_event.c: Ditto.
+ * libc/sys/linux/linuxthreads/td_thr_dbresume.c: Ditto.
+ * libc/sys/linux/linuxthreads/td_thr_dbsuspend.c: Ditto.
+ * libc/sys/linux/linuxthreads/td_thr_event_enable.c: Ditto.
+ * libc/sys/linux/linuxthreads/td_thr_event_getmsg.c: Ditto.
+ * libc/sys/linux/linuxthreads/td_thr_get_info.c: Ditto.
+ * libc/sys/linux/linuxthreads/td_thr_getfpregs.c: Ditto.
+ * libc/sys/linux/linuxthreads/td_thr_getgregs.c: Ditto.
+ * libc/sys/linux/linuxthreads/td_thr_getxregs.c: Ditto.
+ * libc/sys/linux/linuxthreads/td_thr_getxregsize.c: Ditto.
+ * libc/sys/linux/linuxthreads/td_thr_set_event.c: Ditto.
+ * libc/sys/linux/linuxthreads/td_thr_setfpregs.c: Ditto.
+ * libc/sys/linux/linuxthreads/td_thr_setgregs.c: Ditto.
+ * libc/sys/linux/linuxthreads/td_thr_setprio.c: Ditto.
+ * libc/sys/linux/linuxthreads/td_thr_setsigpending.c: Ditto.
+ * libc/sys/linux/linuxthreads/td_thr_setxregs.c: Ditto.
+ * libc/sys/linux/linuxthreads/td_thr_sigsetmask.c: Ditto.
+ * libc/sys/linux/linuxthreads/td_thr_tsd.c: Ditto.
+ * libc/sys/linux/linuxthreads/td_thr_validate.c: Ditto.
+ * libc/sys/linux/linuxthreads/testrtsig.h: Ditto.
+ * libc/sys/linux/linuxthreads/thread_db.h: Ditto.
+ * libc/sys/linux/linuxthreads/thread_dbP.h: Ditto.
+ * libc/sys/linux/linuxthreads/timer_create.c: Ditto.
+ * libc/sys/linux/linuxthreads/timer_delete.c: Ditto.
+ * libc/sys/linux/linuxthreads/timer_getoverr.c: Ditto.
+ * libc/sys/linux/linuxthreads/timer_gettime.c: Ditto.
+ * libc/sys/linux/linuxthreads/timer_routines.c: Ditto.
+ * libc/sys/linux/linuxthreads/timer_settime.c: Ditto.
+ * libc/sys/linux/linuxthreads/tst-cancel.c: Ditto.
+ * libc/sys/linux/linuxthreads/tst-context.c: Ditto.
+ * libc/sys/linux/linuxthreads/tststack.c: Ditto.
+ * libc/sys/linux/linuxthreads/unload.c: Ditto.
+ * libc/sys/linux/linuxthreads/weaks.c: Ditto.
+ * libc/sys/linux/linuxthreads/wrapsyscall.c: Ditto.
+ * libc/sys/linux/linuxthreads/bits/initspin.h: Ditto.
+ * libc/sys/linux/linuxthreads/bits/libc-lock.h: Ditto.
+ * libc/sys/linux/linuxthreads/bits/libc-tsd.h: Ditto.
+ * libc/sys/linux/linuxthreads/bits/local_lim.h: Ditto.
+ * libc/sys/linux/linuxthreads/bits/posix_opt.h: Ditto.
+ * libc/sys/linux/linuxthreads/bits/pthreadtypes.h: Ditto.
+ * libc/sys/linux/linuxthreads/bits/sigthread.h: Ditto.
+ * libc/sys/linux/linuxthreads/machine/Makefile.am: Ditto.
+ * libc/sys/linux/linuxthreads/machine/Makefile.in: Ditto.
+ * libc/sys/linux/linuxthreads/machine/aclocal.m4: Ditto.
+ * libc/sys/linux/linuxthreads/machine/configure: Ditto.
+ * libc/sys/linux/linuxthreads/machine/configure.in: Ditto.
+ * libc/sys/linux/linuxthreads/machine/generic/generic-sysd: Ditto.ep.h
+ * libc/sys/linux/linuxthreads/machine/i386/Makefile.am: Ditto.
+ * libc/sys/linux/linuxthreads/machine/i386/Makefile.in: Ditto.
+ * libc/sys/linux/linuxthreads/machine/i386/aclocal.m4: Ditto.
+ * libc/sys/linux/linuxthreads/machine/i386/bp-asm.h: Ditto.
+ * libc/sys/linux/linuxthreads/machine/i386/clone.S: Ditto.
+ * libc/sys/linux/linuxthreads/machine/i386/configure: Ditto.
+ * libc/sys/linux/linuxthreads/machine/i386/configure.in: Ditto.
+ * libc/sys/linux/linuxthreads/machine/i386/i386-sysdep.S: Ditto.
+ * libc/sys/linux/linuxthreads/machine/i386/i386-sysdep.h: Ditto.
+ * libc/sys/linux/linuxthreads/machine/i386/pspinlock.c: Ditto.
+ * libc/sys/linux/linuxthreads/machine/i386/pt-machine.h: Ditto.
+ * libc/sys/linux/linuxthreads/machine/i386/sigcontextinfo.h: Ditto.
+ * libc/sys/linux/linuxthreads/machine/i386/stackinfo.h: Ditto.
+ * libc/sys/linux/linuxthreads/machine/i386/sysdep.S: Ditto.
+ * libc/sys/linux/linuxthreads/machine/i386/sysdep.h: Ditto.
+ * libc/sys/linux/linuxthreads/machine/i386/useldt.h: Ditto.
+ * libc/sys/linux/machine/i386/dl-machine.h: Ditto.
+ * libc/sys/linux/net/Makefile.am: Ditto.
+ * libc/sys/linux/net/Makefile.in: Ditto.
+ * libc/sys/linux/net/addr2ascii.3: Ditto.
+ * libc/sys/linux/net/addr2ascii.c: Ditto.
+ * libc/sys/linux/net/ascii2addr.c: Ditto.
+ * libc/sys/linux/net/base64.c: Ditto.
+ * libc/sys/linux/net/bindresvport.c: Ditto.
+ * libc/sys/linux/net/byteorder.3: Ditto.
+ * libc/sys/linux/net/ether_addr.c: Ditto.
+ * libc/sys/linux/net/ethers.3: Ditto.
+ * libc/sys/linux/net/getaddrinfo.3: Ditto.
+ * libc/sys/linux/net/getaddrinfo.c: Ditto.
+ * libc/sys/linux/net/gethostbydns.c: Ditto.
+ * libc/sys/linux/net/gethostbyht.c: Ditto.
+ * libc/sys/linux/net/gethostbyname.3: Ditto.
+ * libc/sys/linux/net/gethostbynis.c: Ditto.
+ * libc/sys/linux/net/gethostnamadr.c: Ditto.
+ * libc/sys/linux/net/getifaddrs.3: Ditto.
+ * libc/sys/linux/net/getifaddrs.c: Ditto.
+ * libc/sys/linux/net/getipnodebyname.3: Ditto.
+ * libc/sys/linux/net/getnameinfo.3: Ditto.
+ * libc/sys/linux/net/getnameinfo.c: Ditto.
+ * libc/sys/linux/net/getnetbydns.c: Ditto.
+ * libc/sys/linux/net/getnetbyht.c: Ditto.
+ * libc/sys/linux/net/getnetbynis.c: Ditto.
+ * libc/sys/linux/net/getnetent.3: Ditto.
+ * libc/sys/linux/net/getnetnamadr.c: Ditto.
+ * libc/sys/linux/net/getproto.c: Ditto.
+ * libc/sys/linux/net/getprotoent.3: Ditto.
+ * libc/sys/linux/net/getprotoent.c: Ditto.
+ * libc/sys/linux/net/getprotoname.c: Ditto.
+ * libc/sys/linux/net/getservbyname.c: Ditto.
+ * libc/sys/linux/net/getservbyport.c: Ditto.
+ * libc/sys/linux/net/getservent.3: Ditto.
+ * libc/sys/linux/net/getservent.c: Ditto.
+ * libc/sys/linux/net/herror.c: Ditto.
+ * libc/sys/linux/net/hesiod.3: Ditto.
+ * libc/sys/linux/net/hesiod.c: Ditto.
+ * libc/sys/linux/net/if_indextoname.3: Ditto.
+ * libc/sys/linux/net/ifname.c: Ditto.
+ * libc/sys/linux/net/inet.3: Ditto.
+ * libc/sys/linux/net/inet6_option_s: Ditto.pace.3
+ * libc/sys/linux/net/inet6_rthdr_space.3: Ditto.
+ * libc/sys/linux/net/inet_addr.c: Ditto.
+ * libc/sys/linux/net/inet_lnaof.c: Ditto.
+ * libc/sys/linux/net/inet_makeaddr.c: Ditto.
+ * libc/sys/linux/net/inet_net.3: Ditto.
+ * libc/sys/linux/net/inet_net_ntop.c: Ditto.
+ * libc/sys/linux/net/inet_net_pton.c: Ditto.
+ * libc/sys/linux/net/inet_neta.c: Ditto.
+ * libc/sys/linux/net/inet_netof.c: Ditto.
+ * libc/sys/linux/net/inet_network.c: Ditto.
+ * libc/sys/linux/net/inet_ntoa.c: Ditto.
+ * libc/sys/linux/net/inet_ntop.c: Ditto.
+ * libc/sys/linux/net/inet_pton.c: Ditto.
+ * libc/sys/linux/net/innetgr-stub.c: Ditto.
+ * libc/sys/linux/net/ip6opt.c: Ditto.
+ * libc/sys/linux/net/iso_addr.3: Ditto.
+ * libc/sys/linux/net/iso_addr.c: Ditto.
+ * libc/sys/linux/net/issetugid-stub.c: Ditto.
+ * libc/sys/linux/net/linkaddr.3: Ditto.
+ * libc/sys/linux/net/linkaddr.c: Ditto.
+ * libc/sys/linux/net/map_v4v6.c: Ditto.
+ * libc/sys/linux/net/name6.c: Ditto.
+ * libc/sys/linux/net/namespace.h: Ditto.
+ * libc/sys/linux/net/ns.3: Ditto.
+ * libc/sys/linux/net/ns_addr.c: Ditto.
+ * libc/sys/linux/net/ns_name.c: Ditto.
+ * libc/sys/linux/net/ns_netint.c: Ditto.
+ * libc/sys/linux/net/ns_ntoa.c: Ditto.
+ * libc/sys/linux/net/ns_parse.c: Ditto.
+ * libc/sys/linux/net/ns_print.c: Ditto.
+ * libc/sys/linux/net/ns_ttl.c: Ditto.
+ * libc/sys/linux/net/nsap_addr.c: Ditto.
+ * libc/sys/linux/net/nsdispatch.3: Ditto.
+ * libc/sys/linux/net/nsdispatch.c: Ditto.
+ * libc/sys/linux/net/nslexer.c: Ditto.
+ * libc/sys/linux/net/nslexer.l: Ditto.
+ * libc/sys/linux/net/nsparser.c: Ditto.
+ * libc/sys/linux/net/nsparser.h: Ditto.
+ * libc/sys/linux/net/nsparser.y: Ditto.
+ * libc/sys/linux/net/rcmd.3: Ditto.
+ * libc/sys/linux/net/rcmd.c: Ditto.
+ * libc/sys/linux/net/rcmdsh.3: Ditto.
+ * libc/sys/linux/net/rcmdsh.c: Ditto.
+ * libc/sys/linux/net/recv.c: Ditto.
+ * libc/sys/linux/net/res_comp.c: Ditto.
+ * libc/sys/linux/net/res_config.h: Ditto.
+ * libc/sys/linux/net/res_data.c: Ditto.
+ * libc/sys/linux/net/res_debug.c: Ditto.
+ * libc/sys/linux/net/res_init.c: Ditto.
+ * libc/sys/linux/net/res_mkquery.c: Ditto.
+ * libc/sys/linux/net/res_mkupdate.c: Ditto.
+ * libc/sys/linux/net/res_query.c: Ditto.
+ * libc/sys/linux/net/res_send.c: Ditto.
+ * libc/sys/linux/net/res_update.c: Ditto.
+ * libc/sys/linux/net/resolver.3: Ditto.
+ * libc/sys/linux/net/rthdr.c: Ditto.
+ * libc/sys/linux/net/send.c: Ditto.
+ * libc/sys/linux/net/un-namespace.h: Ditto.
+ * libc/sys/linux/net/vars.c: Ditto.
+ * libc/sys/linux/stdlib/COPYRIGHT: Ditto.
+ * libc/sys/linux/stdlib/Makefile.am: Ditto.
+ * libc/sys/linux/stdlib/Makefile.in: Ditto.
+ * libc/sys/linux/stdlib/cclass.h: Ditto.
+ * libc/sys/linux/stdlib/cname.h: Ditto.
+ * libc/sys/linux/stdlib/collate.c: Ditto.
+ * libc/sys/linux/stdlib/collate.h: Ditto.
+ * libc/sys/linux/stdlib/collcmp.c: Ditto.
+ * libc/sys/linux/stdlib/engine.c: Ditto.
+ * libc/sys/linux/stdlib/fnmatch.3: Ditto.
+ * libc/sys/linux/stdlib/fnmatch.c: Ditto.
+ * libc/sys/linux/stdlib/glob.3: Ditto.
+ * libc/sys/linux/stdlib/glob.c: Ditto.
+ * libc/sys/linux/stdlib/reallocf.c: Ditto.
+ * libc/sys/linux/stdlib/regcomp.c: Ditto.
+ * libc/sys/linux/stdlib/regerror.c: Ditto.
+ * libc/sys/linux/stdlib/regex.3: Ditto.
+ * libc/sys/linux/stdlib/regex2.h: Ditto.
+ * libc/sys/linux/stdlib/regexec.c: Ditto.
+ * libc/sys/linux/stdlib/regfree.c: Ditto.
+ * libc/sys/linux/stdlib/utils.h: Ditto.
+ * libc/sys/linux/stdlib/wordexp.c: Ditto.
+ * libc/sys/linux/stdlib/wordfree.c: Ditto.
+ * libc/sys/linux/sys/dlfcn.h: Ditto.
+ * libc/sys/linux/sys/elfclass.h: Ditto.
+ * libc/sys/linux/sys/event.h: Ditto.
+ * libc/sys/linux/sys/ioccom.h: Ditto.
+ * libc/sys/linux/sys/libc-tsd.h: Ditto.
+ * libc/sys/linux/sys/link.h: Ditto.
+ * libc/sys/linux/sys/lock.h: Ditto.
+ * libc/sys/linux/sys/param.h: Ditto.
+ * libc/sys/linux/sys/socket.h: Ditto.
+ * libc/sys/linux/sys/sockio.h: Ditto.
+
+2003-05-28 Dhananjay Deshpande <dhananjayd@kpitcummins.com>
+
+ * newlib/libc/machine/h8300/memcpy.S: Use .h8300hn and .h8300sn for
+ normal mode
+ * newlib/libc/machine/h8300/memset.S: Likewise
+ * newlib/lib/machine/h8300/reg_memcpy.S: Likewise
+ * newlib/lib/machine/h8300/reg_memset.S: Likewise
+ * newlib/lib/machine/h8300/setjmp.S: Likewise
+ * newlib/lib/machine/h8300/strcmp.S: Likewise
+ * newlib/lib/sys/h8300hms/crt0.S: Likewise
+
+2003-05-13 Corinna Vinschen <corinna@vinschen.de>
+
+ * libc/ctype/ctype_.c: Remove checks for deprecated __CYGWIN32__.
+ * libc/include/stdio.h: Ditto.
+ * libc/include/sys/config.h: Ditto.
+ * libc/stdio/mktemp.c: Ditto.
+
+2003-05-13 Corinna Vinschen <corinna@vinschen.de>
+
+ * libc/locale/ldpart.c (__part_load_locale): Substitute
+ __CYGWIN_USE_BIG_TYPES__ by __USE_INTERNAL_STAT64.
+ * libc/search/hash.c (__hash_open): Ditto.
+ (init_hash): Ditto.
+ * libc/stdio/fseek.c (fseek): Ditto.
+ * libc/stdio/makebuf.c (__smakebuf): Ditto.
+ * libc/stdio/mktemp.c (_gettemp): Ditto.
+
+2003-05-12 Corinna Vinschen <corinna@vinschen.de>
+
+ * libc/include/stdio.h: Change one __CYGWIN__ to __CYGWIN32__.
+
+2003-05-12 Corinna Vinschen <corinna@vinschen.de>
+
+ * configure.host: Accomodate removing the libc/sys/cygwin dir.
+ * libc/locale/ldpart.c (__part_load_locale): Use 64 bit stat call
+ if __CYGWIN_USE_BIG_TYPES__ is set.
+ * libc/search/hash.c (__hash_open): Ditto.
+ (init_hash): Ditto.
+ * libc/stdio/fseek.c (fseek): Ditto.
+ * libc/stdio/makebuf.c (__smakebuf): Ditto.
+ * libc/stdio/mktemp.c (_gettemp): Ditto.
+ * libc/sys/cygwin/Makefile.am: Remove.
+ * libc/sys/cygwin/Makefile.in: Remove.
+ * libc/sys/cygwin/aclocal.m4: Remove.
+ * libc/sys/cygwin/configure: Remove.
+ * libc/sys/cygwin/configure.in: Remove.
+ * libc/sys/cygwin/crt0.c: Move to winsup/cygwin directory.
+ * libc/sys/cygwin/sys/dirent.h: Move to winsup/cygwin/include/sys
+ directory.
+ * libc/sys/cygwin/sys/param.h: Ditto.
+ * libc/sys/cygwin/sys/utime.h: Ditto.
+ * libc/sys/cygwin/sys/utmp.h: Ditto.
+
+2003-05-11 Corinna Vinschen <corinna@vinschen.de>
+
+ * libc/include/sys/types.h: Don't define key_t for Cygwin.
+
+2003-05-10 Christopher Faylor <cgf@redhat.com>
+
+ * libc/sys/cygwin/sys/dirent.h (struct dirent): Accommodate (slightly)
+ 64 bit inodes.
+
+2003-05-09 Corinna Vinschen <corinna@vinschen.de>
+
+ * libc/include/sys/config.h: Remove all Cygwin specific configuration.
+ Include cygwin/config.h instead.
+
+2003-04-16 Jeff Johnston <jjohnstn@redhat.com>
+
+ * newlib/libc/machine/powerpc (ato*fix*.c,strto*fix*.c): Shield
+ all code with #ifdef __SPE__ test.
+ * newlib/libc/machine/powerpc (simdldtoa.c, ufix64toa.c): Ditto.
+
+2003-04-15 Chris January <chris@atomice.net>
+
+ * newlib/libc/include/sys/unistd.h: add declaration for gethostid on
+ Cygwin.
+
+2003-04-09 J"orn Rennecke <joern.rennecke@superh.com>
+
+ * libc/machine/sh/memset.S: Avoid clobbering volatile
+ objects following a tiny to-be-set array in the same quadword.
+
+2001-04-09 Corinna Vinschen <corinna@vinschen.de>
+
+ * libc/include/wchar.h: Add definitions for wcswidth and wcwidth.
+ * libc/string/Makefile.am: Add wcswidth.c and wcwidth.c
+ * libc/string/Makefile.in: Regenerated.
+ * libc/string/wcswidth.c: New file.
+ * libc/string/wcwidth.c: New file.
+ * libc/string/wcstrings.tex: Add wcswidth and wcwidth.
+
+Thu Apr 3 14:01:16 2003 J"orn Rennecke <joern.rennecke@superh.com>
+
+ * libc/machine/sh/memset.S: Fix problem with alloco region
+ exceeding destination region for length >= 88 bytes, start
+ & 0x16 == 0, end & 0x1f == 18.
+
+2001-04-03 Corinna Vinschen <corinna@vinschen.de>
+
+ * libc/string/wcscoll.c: Fix comment.
+
+2001-04-02 Corinna Vinschen <corinna@vinschen.de>
+
+ * libc/include/wchar.h: Add definition for wcscoll.
+ * libc/string/Makefile.am: Add wcscoll.c.
+ * libc/string/Makefile.in: Regenerated.
+ * libc/string/wcscoll.c: New file.
+ * libc/string/wcstrings.tex: Add wcscoll.
+
+2003-04-01 Corinna Vinschen <corinna@vinschen.de>
+
+ * libc/stdio/sscanf.c: Update flags description.
+ * libc/stdio/vfscanf.c: Add CHAR flag value to denote 8 bit target
+ type.
+ (__svfscanf_r): Add 'hh' and 'll' handling.
+
+2003-04-01 Corinna Vinschen <corinna@vinschen.de>
+
+ * libc/sys/cygwin/sys/dirent.h (struct DIR): Change type of
+ __d_position member to _off_t.
+
+2003-03-20 Jeff Johnston <jjohnstn@redhat.com>
+
+ * libc/stdio/vfscanf.c (__svfscanf_r): For floating point conversion,
+ count all characters used to create number against maximum width.
+ * libc/machine/powerpc/vfscanf.c (__svfscanf_r): Ditto.
+
+2003-03-18 D.Venkatasubramanian <dvenkat@noida.hcltech.com>
+
+ * libc/include/sys/h8300hms/crt0.S[__SIMULATOR__]: Add commandline
+ support.
+ * configure.host (h8300*-*-*): Added comment regarding -D__SIMULATOR__
+ flag to support simulator only extensions.
+
+2003-03-17 Bob Cassels <bcassels@abinitio.com>
+
+ * libc/string/wcschr.c: (wcschr): Look for character first,
+ then for end of string, so you can do wcschr(x, '\0').
+
+2003-03-10 Corinna Vinschen <corinna@vinschen.de>
+
+ * libc/include/stdio.h: Declare fgetpos, fsetpos, fseeko and ftello
+ with internal (_fpos_t and _off_t) datatypes when compiling newlib.
+ * libc/include/sys/unistd.h: Declare _lseek using _off_t.
+ * libc/reent/lseekr.c (_lseek_r): Use _off_t instead of off_t.
+ * libc/stdio/fseeko.c (fseeko): Ditto.
+ * libc/stdio/ftello.c (ftello): Ditto.
+ * libc/stdio/stdio.c (__swrite): Ditto.
+ (__sseek): Ditto.
+ * libc/stdio/fgetpos.c (fgetpos): Use _fpos_t instead of fpos_t.
+ * libc/stdio/fseek.c (fseek): Ditto.
+ * libc/stdio/fsetpos.c (fsetpos): Ditto.
+ * libc/stdio/ftell.c (ftell): Ditto.
+ * libc/stdio/local.h: Declare __sseek using _off_t.
+
+2003-03-09 Corinna Vinschen <corinna@vinschen.de>
+
+ * libc/reent/lseekr.c (lseek_r): Use _off_t instead of off_t.
+
+2003-03-09 Corinna Vinschen <corinna@vinschen.de>
+
+ * libc/include/sys/config.h: Define __CYGWIN_USE_BIG_TYPES__ for
+ Cygwin.
+
+2003-03-09 Corinna Vinschen <corinna@vinschen.de>
+
+ * libc/include/pwd.h: Add guards to avoid type clashes when compiling
+ Cygwin.
+ * libc/include/sys/stat.h: Ditto.
+ * libc/include/sys/unistd.h: Ditto.
+ * libc/sys/cygwin/sys/dirent.h: Ditto.
+
+2003-03-07 Christopher Faylor <cgf@redhat.com>
+
+ * libc/include/sys/unistd.h: Guard getopt.h call to force only
+ declaration of getopt and avoid getopt_long declaration.
+ * libc/sys/cygwin/include/unistd.h: Remove.
+
+2003-03-07 Corinna Vinschen <corinna@vinschen.de>
+
+ * configure.host: Define stdio64_dir for Cygwin.
+ * libc/include/stdio.h: Change definition of fpos_t to fulfill
+ Cygwin 64bit file access requirements.
+ Drop definition of f*64() functions when compiled for Cygwin.
+ * libc/include/sys/config.h: Define __LARGE64_FILES for Cygwin.
+ * libc/reent/lseek64r.c: Use _off64_t instead of off64_t.
+ * libc/stdio64/local64.h: Use _fpos64_t instead of fpos64_t.
+
+2003-03-07 Jeff Johnston <jjohnstn@redhat.com>
+
+ * libc/include/sys/reent.h: Remove extraneous _sig_func
+ declaration.
+
+2003-02-25 D.Venkatasubramanian <dvenkat@noida.hcltech.com>
+
+ * libc/sys/h8300hms/Makefile.am: Add support for new files.
+ * libc/sys/h8300hms/Makefile.in: Regenerated.
+ * libc/sys/h8300hms/close.S: New file.
+ * libc/sys/h8300hms/fstat.S: Ditto.
+ * libc/sys/h8300hms/lseek.S: Ditto.
+ * libc/sys/h8300hms/open.S: Ditto.
+ * libc/sys/h8300hms/stat.S: Ditto.
+ * libc/sys/h8300hms/read.S: New file to replace read.c.
+ * libc/sys/h8300hms/read.c: Removed.
+ * libc/sys/h8300hms/syscalls.c: Removed functions _open,
+ _lseek, _close, _stat, _fstat.
+ * libc/sys/h8300hms/write.S: New file to replace write.c.
+ * libc/sys/h8300hms/write.c: Removed.
+
+2003-02-20 Nick Clifton <nickc@redhat.com>
+
+ * Add support for Cirrus Maverick ARM co-processor:
+
+ 2000-09-13 Aldy Hernandez <aldyh@redhat.com>
+
+ * libc/include/machine/ieeefp.h: Set IEEE_BIG_ENDIAN or
+ IEEE_LITTLE_ENDIAN depending on endian mode (cirrus).
+
+ 2000-08-11 Aldy Hernandez <aldyh@redhat.com>
+
+ * configure.host: set sys_dir, syscall_dir, and
+ newlib_cflags for ep9312 host.
+
+ * configure.host: Restore alpha sorting of entries in case
+ statements.
+
+2003-02-19 Jeff Johnston <jjohnstn@redhat.com>
+
+ * libc/stdlib/mallocr.c (unlink): Revert 02/18 fix.
+
+2003-02-18 Christian Groessler <chris@groessler.org>
+
+ * libc/machine/z8k/setjmp.S (_setjmp / _longjmp): Fix to
+ support z8001 segmented mode.
+
+2003-02-18 Earnie Boyd <earnie@users.sf.net>
+
+ * libc/stdlib/mallocr.c (unlink): Don't assign a value to a pointer
+ with a NULL value.
+
+2003-02-10 Christopher Faylor <cgf@redhat.com>
+
+ * libc/include/sys/types.h: Don't define __MS_types__ for Cygwin.
+ Don't define some types under cygwin.
+
+2003-02-07 Jeff Johnston <jjohnstn@redhat.com>
+
+ * acinclude.m4 (--disable-newlib-supplied-syscalls): New configuration
+ option to allow disabling of syscalls being supplied in newlib.
+ * aclocal.m4: Regenerated.
+ * configure: Ditto.
+ * configure.host: Add support of new configuration option and add
+ -D__NO_SYSCALLS__ if newlib supplied syscalls are disabled.
+ * doc/aclocal.m4: Regenerated.
+ * doc/configure: Ditto.
+ * libc/*aclocal.m4: Ditto.
+ * libc/*configure: Ditto.
+ * libm/*aclocal.m4: Ditto.
+ * libm/*configure: Ditto.
+ * libc/sys/arm/Makefile.am: Don't build syscalls.o if new option
+ is disabled.
+ * libc/sys/arm/Makefile.in: Regenerated.
+
+2003-02-05 Jonathan Larmour <jifl@eCosCentric.com>
+
+ * libc/stdio/vsprintf.c (vsprintf, _vsprintf_r): Set _file fd to
+ -1 to be sure it cannot later match a valid file fd causing
+ isatty() to return 1.
+ * libc/stdio/asprintf.c (asprintf, _asprintf_r): Ditto.
+ * libc/stdio/sprintf.c (sprintf, _sprintf_r): Ditto.
+ * libc/stdio/vasprintf.c (vasprintf, _vasprintf_r): Ditto.
+
+2003-02-03 Jeff Johnston <jjohnstn@redhat.com>
+
+ * libc/stdlib/ldtoa.c (_ldtoa_r): Fix code to allocate the format
+ buffer based on the precision, after we have processed the input value
+ in a local buffer and know its relative magnitude.
+
+2003-01-31 Michael Snyder <msnyder@redhat.com>
+
+ * libc/sys/h8300hms/_exit.c (_exit, __exit): Slip a magic cookie
+ into registers r1 and r2, so that the simulator can distinguish
+ this trap from a breakpoint trap. Copied from libgloss.
+
+2003-01-31 Michael Snyder <msnyder@redhat.com>
+
+ * libc/sys/h8300hms/crt0.S (_start): Change local label
+ from .loop to .Loop, so that ld and gdb will ignore it.
+
+2003-01-29 Jason Tishler <jason@tishler.net>
+
+ * libc/include/time.h: Declare nanosleep() under Cygwin.
+
+2003-01-24 Nick Clifton <nickc@redhat.com>
+
+ * Add sh2e support:
+
+ 2002-04-02 Alexandre Oliva <aoliva@redhat.com>
+
+ * libc/machine/sh/asm.h: Added __SH2E__ next to __SH3E__.
+ * libc/machine/sh/setjmp.S: Likewise.
+ * libc/include/machine/ieeefp.h: Likewise.
+
+2003-01-24 Corinna Vinschen <corinna@vinschen.de>
+
+ * libc/include/sys/unistd.h: Add setregid and setreuid declarations
+ for Cygwin.
+
+2003-01-21 Anita Kulkarni <anitak@kpit.com>
+
+ * libc/time/difftime.c : Typecast the result to double.
+
+2003-01-20 Christopher Faylor <cgf@redhat.com>
+
+ * libc/include/sys/unistd.h: Add rresvport declaration for cygwin.
+
+2003-01-18 Nick Clifton <nickc@redhat.com>
+
+ * libc/include/machine/ieeefp.h : Define __IEEE_BIG_ENDIAN,
+ __SMALL_BITFIELDS and _DOUBLE_IS_32BITS for IP2K.
+
+2003-01-16 Joel Sherrill <joel@OARcorp.com>
+
+ * libc/sys/rtems/include/limits.h, libc/sys/rtems/sys/param.h,
+ libc/sys/rtems/sys/syslimits.h: Update to be in sync with what
+ constants are defined in each file in the shared versions in
+ libc/include.
+ * libc/sys/rtems/crt0.c: Define extra symbols on SH and HP-PA to
+ autoconf can link programs.
+ * libc/include/machine/types.h: Explicitly specify signed on
+ intXX_t types to ensure they are signed.
+
+2003-01-14 Christopher Faylor <cgf@redhat.com>
+
+ * libc/time/strftime.c (strftime): Add '%h' and '%l, %k' GNU
+ extensions.
+
+2003-01-08 Richard Sandiford <rsandifo@redhat.com>
+
+ * configure.host (mips64vr-elf, mips64vrel-elf): New config.
+
+2003-01-07 Charles Wilson <cwilson@ece.gatech.edu>
+
+ * libc/stdio/sprintf.c: fix typo
+ * libc/stdio/vfprintf.c: fix typo
+
+2003-01-07 Jeff Johnston <jjohnstn@redhat.com>
+
+ * configure.host: Support long double I/O for x86-linux.
+ * libc/stdlib/ldtoa.c (_ldtoa_r): Fix code to allocate a buffer
+ large enough to hold formatted result.
+ * libc/machine/powerpc/simdldtoa.c (_simdldtoa_r): Ditto.
+
+2003-01-06 Charles Wilson <cwilson@ece.gatech.edu>
+
+ * Makefile.am: Add vasprintf.
+ * Makefile.in: Regenerated.
+
+2003-01-06 Charles Wilson <cwilson@ece.gatech.edu>
+
+ * asprintf.c (_asprintf_r): insure both declarations
+ are the same.
+
+2002-12-28 Christopher Faylor <cgf@redhat.com>
+
+ * libc/include/sys/unistd.h: Under cygwin, just include getopt.h rather
+ than defining getopt directly.
+
+2002-12-20 Jeff Johnston <jjohnstn@redhat.com>
+
+ * NEWS: Update with 1.11.0 info.
+ * README: Ditto.
+ * acinclude.m4: Change version number to 1.11.0.
+ * aclocal.m4: Regenerated.
+ * configure: Ditto.
+ * doc/aclocal.m4: Ditto.
+ * doc/configure: Ditto.
+ * libc/*/aclocal.m4: Ditto.
+ * libc/*/configure: Ditto.
+ * libc/libc.texinfo: Ditto.
+ * libm/*/aclocal.m4: Ditto.
+ * libm/*/configure: Ditto.
+ * libm/libm.texinfo: Ditto.
+ * libc/sys/linux/shared.ld: Add VERS_1.11.
+
+2002-12-20 Jeff Johnston <jjohnstn@redhat.com>
+
+ * libc/machine/i386/f_atan2.S: Change copyright from Cygnus
+ Solutions to Red Hat Inc.
+ * libc/machine/i386/f_atan2f.S: Ditto.
+ * libc/machine/i386/f_exp.c: Ditto.
+ * libc/machine/i386/f_expf.c: Ditto.
+ * libc/machine/i386/f_frexp.S: Ditto.
+ * libc/machine/i386/f_frexpf.S: Ditto.
+ * libc/machine/i386/f_ldexp.S: Ditto.
+ * libc/machine/i386/f_ldexpf.S: Ditto.
+ * libc/machine/i386/f_log.S: Ditto.
+ * libc/machine/i386/f_log10.S: Ditto.
+ * libc/machine/i386/f_log10f.S: Ditto.
+ * libc/machine/i386/f_logf.S: Ditto.
+ * libc/machine/i386/f_pow.c: Ditto.
+ * libc/machine/i386/f_powf.c: Ditto.
+ * libc/machine/i386/f_tan.S: Ditto.
+ * libc/machine/i386/f_tanf.S: Ditto.
+ * libc/machine/i386/memchr.S: Ditto.
+ * libc/machine/i386/memcmp.S: Ditto.
+ * libc/machine/i386/memcpy.S: Ditto.
+ * libc/machine/i386/memmove.S: Ditto.
+ * libc/machine/i386/memset.S: Ditto.
+ * libc/machine/i386/strchr.S: Ditto.
+ * libc/machine/i386/strlen.S: Ditto.
+ * libm/machine/i386/f_atan2.S: Ditto.
+ * libm/machine/i386/f_atan2f.S: Ditto.
+ * libm/machine/i386/f_exp.c: Ditto.
+ * libm/machine/i386/f_expf.c: Ditto.
+ * libm/machine/i386/f_frexp.S: Ditto.
+ * libm/machine/i386/f_frexpf.S: Ditto.
+ * libm/machine/i386/f_ldexp.S: Ditto.
+ * libm/machine/i386/f_ldexpf.S: Ditto.
+ * libm/machine/i386/f_log.S: Ditto.
+ * libm/machine/i386/f_log10.S: Ditto.
+ * libm/machine/i386/f_log10f.S: Ditto.
+ * libm/machine/i386/f_logf.S: Ditto.
+ * libm/machine/i386/f_pow.c: Ditto.
+ * libm/machine/i386/f_powf.c: Ditto.
+ * libm/machine/i386/f_tan.S: Ditto.
+ * libm/machine/i386/f_tanf.S: Ditto.
+
+2002-12-20 Jeff Johnston <jjohnstn@redhat.com>
+
+ * libc/stdlib/environ.c: Update license to Red Hat.
+ * libc/machine/hppa/setjmp.S: Ditto.
+ * libm/test/Makefile.in: Ditto.
+
+2002-12-19 Jeff Johnston <jjohnstn@redhat.com>
+
+ * configure.host: Remove references to go32.
+ * libc/sys/go32/*: Removed.
+
+2002-12-16 Kazu Hirata <kazu@cs.umass.edu>
+
+ * libc/include/sys/config.h: Change setting of INT_MAX
+ and UINT_MAX, to use __INT_MAX__ for __H8300__, __H8300H__,
+ __H8300S__. Also consolidate flag settings for these
+ platforms.
+
+2002-12-10 Joel Sherrill <joel@OARcorp.com>
+
+ * libc/include/machine/setjmp.h: Make sure _JBLEN is defined
+ for i386-rtems targets.
+
+2002-12-06 Jeff Johnston <jjohnstn@redhat.com>
+
+ * libc/include/stdlib.h (strtof): New prototype (from C99).
+ (strtodf): Changed from prototype to macro which redefines
+ to strtof.
+ * libc/stdlib/atof.c: Change documentation to refer to strtof
+ instead of strtodf.
+ * libc/stdlib/atoff.c (atoff): Change to call strtof instead of
+ strtodf.
+ * libc/stdlib/strtod.c (strtodf): Renamed to strtof.
+ (strtof): New function.
+ * libm/test/convert.c (test_strtodf): Renamed to test_strtof which
+ calls strtof.
+
+2002-11-27 Christopher Faylor <cgf@redhat.com>
+
+ * libc/string/memset.c (memset): Fix comment.
+
+2002-11-26 Christopher Faylor <cgf@redhat.com>
+
+ * libc/string/memset.c (memset): Move initialization of 'd' earlier in
+ function.
+
+2002-11-25 Christopher Faylor <cgf@redhat.com>
+
+ * libc/string/memset.c (memset): Minor optimization: Use new 'd'
+ variable, introduced below, everywhere.
+
+2002-11-25 Kazu Hirata <kazu@cs.umass.edu>
+
+ * libc/string/memset.c (memset): Make it safe even if
+ sizeof (int) = 2.
+
+2002-11-22 Joe Buehler <jbuehler@hekimian.com>
+
+ * configure.in: Change check for libc/include in ${CC} to
+ use an intermediate value so as to work with different shells.
+ * configure: Regenerated.
+ * Makefile.in: Ditto.
+
+2002-11-22 Vijay L. Khuspe <vijayk1@kpit.com>
+
+ * libc/sys/h8300hms/read.c: Add support for normal mode
+ architecture.
+
+2002-11-20 Ryo Tsuruta <ryo@kitanet.ne.jp>
+
+ * libc/machine/h8300/setjmp.S (setjmp, longjmp): Combine common
+ code for __H8300H__ and __H8300S__. Also return 32-bit return code
+ when -mint32 is used.
+
+2002-11-18 Nick Clifton <nickc@redhat.com>
+
+ * libc/sys/arm/crt0.S: Add NULL to end of argv array.
+
+2002-11-14 Jeff Johnston <jjohnstn@redhat.com>
+
+ * testsuite/lib/passfail.exp (newlib_pass_fail): Changed to
+ only issue one pass/fail message for a compile/link/execute.
+ * testsuite/newlib.elix/elix.exp: New file.
+ * testsuite/newlib.elix/tmmap.c: Ditto.
+
+2002-11-06 Christopher Faylor <cgf@redhat.com>
+
+ * libc/stdlib/malign.c: Don't compile if MALLOC_PROVIDED.
+ * libc/stdlib/mlock.c: Ditto.
+ * libc/stdlib/msize.c: Ditto.
+ * libc/stdlib/msize.c: Ditto.
+ * libc/stdlib/mtrim.c: Ditto.
+ * libc/stdlib/valloc.c: Ditto.
+
+2002-11-12 Jeff Johnston <jjohnstn@redhat.com>
+
+ * libc/stdlib/ldtoa.c (e64toe): When checking the exponent
+ for inf/nan, make sure that the check ignores the sign bit.
+
+2002-11-07 Joel Sherrill <joel@OARcorp.com>
+
+ * libc/sys/rtems/machine: New directory.
+ * libc/sys/rtems/machine/limits.h, libc/sys/rtems/machine/param.h,
+ libc/sys/rtems/sys/param.h, libc/sys/rtems/sys/syslimits.h,
+ libc/sys/rtems/sys/utime.h: New files added to make *-rtems newlib
+ targets more BSD like when installed without requiring files to
+ be overwritten at install point when RTEMS itself is installed.
+ * Makefile.am: Pick up system dependent machine .h files such as
+ might be found on a BSD-ish system.
+ * Makefile.in: Regenerate.
+ * libc/include/machine/types.h: When on an RTEMS target, define a
+ few BSD flavor types.
+
+2002-11-06 Sergey Okhapkin <sos@prospect.com.ru>
+
+ * include/utmp.h: Define WTMP_FILE. Define and use UT_IDLEN.
+
+2002-11-06 Kazuhiro Fujieda <fujieda@jaist.ac.jp>
+
+ * libc/include/wchar.h: Use _{BEGIN,END}_STD_C instead of extern "C".
+ * libc/include/wctype.h: Ditto.
+
+2002-11-04 Jeff Johnston <jjohnstn@redhat.com>
+
+ * libc/include/wchar.h: Add extern "C" specifier if C++.
+ * libc/include/wctype.h: Ditto.
+
+2002-10-18 Jeff Johnston <jjohnstn@redhat.com>
+
+ * testsuite/newlib.wctype/tiswctype.c: New test case.
+ * testsuite/newlib.wctype/twctrans.c: Ditto.
+
+2002-10-18 Jeff Johnston <jjohnstn@redhat.com>
+
+ * libc/sys/linux/machine/i386/include/endian.h: New file.
+ * libc/sys/linux/machine/i386/include/param.h: Ditto.
+
+2002-10-18 Jeff Johnston <jjohnstn@redhat.com>
+
+ * libm/machine/i386/aclocal.m4: Regenerated.
+ * libm/machine/i386/configure: Ditto.
+
+2002-10-18 Jeff Johnston <jjohnstn@redhat.com>
+
+ * testsuite/include/check.h: New header file to use with
+ test cases.
+ * testsuite/lib/newlib.exp: Add testsuite/include directory
+ to list of header files to use.
+ * testsuite/newlib.wctype/twctype.c: New test case for iswctype fns.
+ * testsuite/newlib.wctype/wctype.exp: New file.
+
+2002-10-11 Graham Stott <graham.stott@btinternet.com>
+ Richard Sandiford <rsandifo@redhat.com>
+
+ * libc/include/sys/config.h (SIZE_T_SMALLER_THAN_LONG): Undefine.
+ * libc/stdlib/mallocr.c (long_sub_size_t): Define in a way that
+ doesn't require the SIZE_T_SMALLER_THAN_LONG macro.
+
+2002-10-07 Joel Sherrill <joel@OARcorp.com>
+
+ * libc/sys/rtems/crt0.c: Add even more symbols so gcc() can link
+ dummy programs.
+
+2002-10-07 Joel Sherrill <joel@OARcorp.com>
+
+ * libc/include/pthread.h: Define PTHREAD_CANCELED.
+
+2002-10-07 Joel Sherrill <joel@OARcorp.com>
+
+ * libc/machine/hppa/DEFS.h, libc/machine/hppa/pcc_prefix.s,
+ libc/machine/hppa/setjmp.S, libc/machine/hppa/DEFS.h: Make this
+ compile with current GNU tools.
+
+2002-10-07 Jeff Johnston <jjohnstn@redhat.com>
+
+ * Makefile.am: Add EXTRA_DIRS to allow future dependencies on
+ the build library.
+ * configure.in: Ditto.
+ * Makefile.in: Regenerated.
+ * configure: Ditto.
+ * libc/sys/linux/Makefile.am: Add EXTRA_SUBDIRS and EXTRA_SUBLIBS
+ for specifying configured libraries/directories.
+ * libc/sys/linux/configure.in: Ditto.
+ * libc/sys/linux/Makefile.in: Regenerated.
+ * libc/sys/linux/configure: Ditto.
+
+2002-10-03 Jeff Johnston <jjohnstn@redhat.com>
+
+ * libc/include/reent.h: Update documentation at start of file.
+
+2002-09-27 Jim Wilson <wilson@redhat.com>
+
+ * libc/sys/sysnecv850/crt0.S (start): Delete v850 code for initializing
+ the ctbp register.
+
+2002-09-27 Jeff Johnston <jjohnstn@redhat.com>
+
+ * libc/ctype/jp2uc.c: Change to use multiple arrays in jp2uc.h.
+ Also convert to EUCJP before using arrays. For values not in
+ the conversion arrays, return WEOF.
+ * libc/ctype/jp2uc.h: Change from one array to a number of
+ arrays to account for the fact that the originating table
+ is not contiguous for the input values since some are invalid.
+
+2002-09-24 Jeff Johnston <jjohnstn@redhat.com>
+
+ * libc/time/ctime.c: Fix prototype documentation.
+
+2002-09-24 Corinna Vinschen <corinna@vinschen.de>
+
+ * libc/include/sys/errno.h: Add EOVERFLOW.
+
+2002-09-20 Jeff Johnston <jjohnstn@redhat.com>
+
+ * libc/include/wctype.h: New file.
+
+2002-09-20 Jeff Johnston <jjohnstn@redhat.com>
+
+ * libc/ctype/Makefile.am: Add new files.
+ * libc/ctype/Makefile.in: Regenerated.
+ * libc/ctype/ctype.tex: Add new iswxxxx, towxxxx, wctype,
+ and wctrans functions to documentation index.
+ * libc/ctype/iswalnum.c: New file.
+ * libc/ctype/iswalpha.c: Ditto.
+ * libc/ctype/iswblank.c: Ditto.
+ * libc/ctype/iswcntrl.c: Ditto.
+ * libc/ctype/iswctype.c: Ditto.
+ * libc/ctype/iswdigit.c: Ditto.
+ * libc/ctype/iswgraph.c: Ditto.
+ * libc/ctype/iswlower.c: Ditto.
+ * libc/ctype/iswprint.c: Ditto.
+ * libc/ctype/iswpunct.c: Ditto.
+ * libc/ctype/iswspace.c: Ditto.
+ * libc/ctype/iswupper.c: Ditto.
+ * libc/ctype/iswxdigit.c: Ditto.
+ * libc/ctype/jp2uc.c: Ditto.
+ * libc/ctype/jp2uc.h: Ditto.
+ * libc/ctype/local.h: Ditto.
+ * libc/ctype/towctrans.c: Ditto.
+ * libc/ctype/towlower.c: Ditto.
+ * libc/ctype/towupper.c: Ditto.
+ * libc/ctype/utf8alpha.h: Ditto.
+ * libc/ctype/utf8print.h: Ditto.
+ * libc/ctype/utf8punct.h: Ditto.
+ * libc/ctype/wctrans.c: Ditto.
+ * libc/ctype/wctype.c: Ditto.
+ * libc/locale/locale.c (__lc_ctype): New external array to
+ replace static lc_ctype array.
+ * libc/stdlib/mbtowc_r.c: Use __lc_ctype to check current lc_ctype
+ rather than reentrancy structure's _current_locale field.
+ * libc/stdlib/wctomb_r.c: Ditto.
+
+2002-09-20 Jeff Johnston <jjohnstn@redhat.com>
+
+ * configure.host: Minor comment and formatting changes.
+ * libc/Makefile.am: Add libc_la_DEPENDENCIES.
+ * libc/Makefile.in: Regenerated.
+ * libc/include/sys/config.h: Minor format change.
+
+2002-09-19 Jeff Johnston <jjohnstn@redhat.com>
+
+ * libc/syscalls/sysfcntl.c (fcntl): Fix typo in preprocessor
+ statement comment.
+
+2002-09-19 Jeff Johnston <jjohnstn@redhat.com>
+
+ * libc/posix/opendir.c (opendir): Change code to check
+ for HAVE_FCNTL before calling fcntl.
+ * libc/search/hash.c (hash_open): Ditto.
+ * libc/search/hash_page.c (open_tmp): Ditto.
+ * libc/reent/Makefile.am: Add fcntlr.c.
+ * libc/reent/Makefile.in: Regenerated.
+ * libc/reent/fcntlr.c: New file.
+ * libc/stdio/fdopen.c (_fdopen_r): Change to call _fcntl_r
+ instead of _fcntl when HAVE_FCNTL flag is set.
+ * libc/syscalls/sysfcntl.c (fcntl): Check for HAVE_FCNTL flag
+ to see if _fcntl or _fcntl_r should be called. If flag is not
+ set, default to ENOSYS stub.
+
+2002-09-16 Jeff Johnston <jjohnstn@redhat.com>
+
+ * libc/include/wchar.h (mbstate_t): Change protective flag to
+ be _MBSTATE_T.
+ * libc/include/sys/_types.h (_mbstate_t): Remove protective flag.
+ [__CYGWIN__]: Remove special code that defines mbstate_t and WEOF
+ for Cygwin.
+ * libc/sys/linux/sys/_types.h (_mbstate_t): Remove protective flag.
+
+2002-09-11 Jeff Johnston <jjohnstn@redhat.com>
+
+ * acinclude.m4 (enable-newlib-mb): Change check to
+ default newlib_mb variable to empty string rather than "no".
+ * configure.host: Remove hard-coding of -DMB_CAPABLE for
+ x86-linux and Cygwin. Add code to check for newlib_mb
+ being unset in which case set to "yes" for x86-linux and
+ Cygwin. Change check for newlib_mb being "yes" to allow
+ for an empty string.
+ * configure.in (_MB_LEN_MAX): New AC_DEFINE.
+ * newlib.hin (_MB_LEN_MAX): New define to configure.
+ * aclocal.m4: Regenerated.
+ * configure: Ditto.
+ * libc/include/limits.h: New file.
+ * libc/sys/linux/include/limits.h: Ditto.
+ * doc/aclocal.m4 doc/configure libc/aclocal.m4
+ libc/configure libc/machine/aclocal.m4
+ libc/machine/configure libc/machine/a29k/aclocal.m4
+ libc/machine/a29k/configure libc/machine/arm/aclocal.m4
+ libc/machine/arm/configure libc/machine/d10v/aclocal.m4
+ libc/machine/d10v/configure libc/machine/d30v/aclocal.m4
+ libc/machine/d30v/configure libc/machine/fr30/aclocal.m4
+ libc/machine/fr30/configure libc/machine/frv/aclocal.m4
+ libc/machine/frv/configure libc/machine/h8300/aclocal.m4
+ libc/machine/h8300/configure libc/machine/h8500/aclocal.m4
+ libc/machine/h8500/configure libc/machine/hppa/aclocal.m4
+ libc/machine/hppa/configure libc/machine/i386/aclocal.m4
+ libc/machine/i386/configure libc/machine/i960/aclocal.m4
+ libc/machine/i960/configure libc/machine/m32r/aclocal.m4
+ libc/machine/m32r/configure libc/machine/m68hc11/aclocal.m4
+ libc/machine/m68hc11/configure libc/machine/m68k/aclocal.m4
+ libc/machine/m68k/configure libc/machine/m88k/aclocal.m4
+ libc/machine/m88k/configure libc/machine/mips/aclocal.m4
+ libc/machine/mips/configure libc/machine/mn10200/aclocal.m4
+ libc/machine/mn10200/configure libc/machine/mn10300/aclocal.m4
+ libc/machine/mn10300/configure libc/machine/necv70/aclocal.m4
+ libc/machine/necv70/configure libc/machine/powerpc/aclocal.m4
+ libc/machine/powerpc/configure libc/machine/sh/aclocal.m4
+ libc/machine/sh/configure libc/machine/sparc/aclocal.m4
+ libc/machine/sparc/configure libc/machine/tic80/aclocal.m4
+ libc/machine/tic80/configure libc/machine/v850/aclocal.m4
+ libc/machine/v850/configure libc/machine/w65/aclocal.m4
+ libc/machine/w65/configure libc/machine/xscale/aclocal.m4
+ libc/machine/xscale/configure
+ libc/machine/xstormy16/aclocal.m4
+ libc/machine/xstormy16/configure libc/machine/z8k/aclocal.m4
+ libc/machine/z8k/configure libc/sys/aclocal.m4
+ libc/sys/configure libc/sys/a29khif/aclocal.m4
+ libc/sys/a29khif/configure libc/sys/arc/aclocal.m4
+ libc/sys/arc/configure libc/sys/arm/aclocal.m4
+ libc/sys/arm/configure libc/sys/cygwin/aclocal.m4
+ libc/sys/cygwin/configure libc/sys/d10v/aclocal.m4
+ libc/sys/d10v/configure libc/sys/decstation/aclocal.m4
+ libc/sys/decstation/configure libc/sys/go32/aclocal.m4
+ libc/sys/go32/configure libc/sys/h8300hms/aclocal.m4
+ libc/sys/h8300hms/configure libc/sys/h8500hms/aclocal.m4
+ libc/sys/h8500hms/configure libc/sys/idt/aclocal.m4
+ libc/sys/idt/configure libc/sys/linux/aclocal.m4
+ libc/sys/linux/configure
+ libc/sys/linux/machine/aclocal.m4
+ libc/sys/linux/machine/configure
+ libc/sys/linux/machine/i386/aclocal.m4
+ libc/sys/linux/machine/i386/configure
+ libc/sys/m88kbug/aclocal.m4 libc/sys/m88kbug/configure
+ libc/sys/mmixware/aclocal.m4 libc/sys/mmixware/configure
+ libc/sys/netware/aclocal.m4 libc/sys/netware/configure
+ libc/sys/rtems/aclocal.m4 libc/sys/rtems/configure
+ libc/sys/sh/aclocal.m4 libc/sys/sh/configure
+ libc/sys/sparc64/aclocal.m4 libc/sys/sparc64/configure
+ libc/sys/sun4/aclocal.m4 libc/sys/sun4/configure
+ libc/sys/sysmec/aclocal.m4 libc/sys/sysmec/configure
+ libc/sys/sysnec810/aclocal.m4 libc/sys/sysnec810/configure
+ libc/sys/sysnecv850/aclocal.m4 libc/sys/sysnecv850/configure
+ libc/sys/sysvi386/aclocal.m4 libc/sys/sysvi386/configure
+ libc/sys/sysvnecv70/aclocal.m4 libc/sys/sysvnecv70/configure
+ libc/sys/tic80/aclocal.m4 libc/sys/tic80/configure
+ libc/sys/w65/aclocal.m4 libc/sys/w65/configure
+ libc/sys/z8ksim/aclocal.m4 libc/sys/z8ksim/configure
+ libm/aclocal.m4 libm/configure: Regenerated.
+
+2002-09-09 Jeff Johnston <jjohnstn@redhat.com>
+
+ * libc/sys/linux/machine/i386/crt0.c (_start): Remove
+ code that clears the .bss section.
+
+2002-09-09 Jeff Johnston <jjohnstn@redhat.com>
+
+ * libc/include/sys/_types.h (_mbstate_t): Changed to use
+ unsigned char internally.
+ * libc/sys/linux/sys/_types.h: Ditto.
+ * libc/include/sys/reent.h
+ * libc/stdlib/mblen.c (mblen): Use function-specific state
+ value from default reentrancy structure.
+ * libc/stdlib/mblen_r.c (_mblen_r): If return code from
+ _mbtowc_r is less than 0, reset state __count value and
+ return -1.
+ * libc/stdlib/mbrlen.c (mbrlen): If the input state pointer
+ is NULL, use the function-specific pointer provided in the
+ default reentrancy structure.
+ * libc/stdlib/mbrtowc.c: Add reentrant form of function.
+ If input state pointer is NULL, use function-specific area
+ provided in reentrancy structure.
+ * libc/stdlib/mbsrtowcs.c: Ditto.
+ * libc/stdlib/wcrtomb.c: Ditto.
+ * libc/stdlib/wcsrtombs.c: Ditto.
+ * libc/stdlib/mbstowcs.c: Reformat.
+ * libc/stdlib/wcstombs.c: Ditto.
+ * libc/stdlib/mbstowcs_r.c (_mbstowcs_r): If an error occurs,
+ reset the state's __count value and return -1.
+ * libc/stdlib/mbtowc.c: Ditto.
+ * libc/stdlib/mbtowc_r.c (_mbtowc_r): Add restartable functionality.
+ If number of bytes is used up before completing a valid multibyte
+ character, return -2 and save the state.
+ * libc/stdlib/wctomb_r.c (_wctomb_r): Define __state as __count
+ and change some __count references to __state for clarity.
+
+2002-09-06 Jeff Johnston <jjohnstn@redhat.com>
+
+ * libc/include/sys/config.h (MB_LEN_MAX): Removed as this
+ is defined by <limits.h>.
+
+2002-09-05 Kazuhiro Fujieda <fujieda@jaist.ac.jp>
+
+ * libc/include/wchar.h (WCHAR_MAX): Only define if not already
+ defined.
+
+2002-09-04 Kazuhiro Fujieda <fujieda@jaist.ac.jp>
+
+ * libc/include/sys/config.h: Define accordingly __WCHAR_MAX__.
+ * libc/include/wchar.h: Define WCHAR_MIN as 0 and WCHAR_MAX as
+ __WCHAR_MAX__ or 0x7fffffffu.
+ * libc/string/wcscmp.c: Delete wrong and unnecessary type cast.
+ * libc/string/wcsncmp.c: Ditto.
+
+2002-09-03 Jeff Johnston <jjohnstn@redhat.com>
+
+ * libc/string/wcschr.c: Add include of <stddef.h>.
+ * libc/string/wcspbrk.c: Ditto.
+ * libc/string/wcsrchr.c: Ditto.
+ * libc/string/wcsstr.c: Ditto.
+
+2002-09-03 Jeff Johnston <jjohnstn@redhat.com>
+
+ * libc/include/sys/_types.h (_flock_t): Added.
+ * libc/include/sys/lock.h (__lock_try_acquire): New interface.
+ (__lock_try_acquire_recursive): Ditto.
+ * libc/include/sys/reent.h (__sFILE, __sFILE64): Add new
+ _lock field.
+ * libc/stdio/findfp.c (std)[!__SINGLE_THREAD__]: Initialize _lock
+ field.
+ * libc/stdio/fopen.c (_fopen_r)[!__SINGLE_THREAD__]: Ditto.
+ * libc/stdio64/fopen64.c (_fopen64_r)[!__SINGLE_THREAD__]: Ditto.
+ * libc/sys/linux/include/time.h (struct timespec): Moved from
+ <sys/types.h> and added check for __need_timespec flag so type
+ can be defined by itself.
+ * libc/sys/linux/sys/_types.h (_flock_t): New type.
+ * libc/sys/linux/sys/types.h (struct timespec): Moved to
+ <time.h>.
+
+2002-08-29 Thomas Fitzsimmons <fitzsim@redhat.com>
+
+ * libc/sys/linux/argp: New directory.
+ * libc/sys/linux/getopt.c: New file.
+ * libc/sys/linux/getopt1.c: New file.
+ * libc/sys/linux/getoptlong.c: Remove file.
+ * libc/sys/linux/include/argp.h: New file.
+ * libc/sys/linux/Makefile.am: Define argp_dir and ARGP_LIB,
+ based on ELIX level.
+ (SUBDIRS): Add argp_dir.
+ (SUBLIBS): Add ARGP_LIB.
+ (ELIX_2_OBJS): Add getopt.$(oext), getopt1.$(oext), remove
+ getopt_long.$(oext).
+ * libc/sys/linux/configure.in (AC_OUTPUT): Add argp/Makefile.
+
+2002-08-29 Jeff Johnston <jjohnstn@redhat.com>
+
+ * libc/libc.texinfo: Add node reference to wide-character strings.
+ * libc/string/wcstrings.tex: New file.
+ * libc/string/strtok_r.c: Remove outdated advertising clause.
+ * libc/string/Makefile.am (doc): Add wide-character string
+ chapter to documentation.
+ * libc/string/Makefile.in: Regenerated.
+
+2002-08-29 Kazuhiro Fujieda <fujieda@jaist.ac.jp>
+
+ * libc/include/wchar.h: Define NULL. Define WEOF more general
+ way. Declare functions in newlib manner.
+ * libc/stdlib/Makefile.am: Delete wmem*.c
+ * libc/stdlib/Makefile.in: Regenerated.
+ * libc/stdlib/wmemchr.c: Delete.
+ * libc/stdlib/wmemcmp.c: Ditto.
+ * libc/stdlib/wmemcpy.c: Ditto.
+ * libc/stdlib/wmemmove.c: Ditto.
+ * libc/stdlib/wmemset.c: Ditto.
+ * libc/string/Makefile.am: Add wmem*.c and wcs*.c.
+ * libc/string/Makefile.in: Regenerated.
+ * libc/string/wcscat.c: New file derived from the NetBSD C Library.
+ * libc/string/wcschr.c: Ditto.
+ * libc/string/wcscmp.c: Ditto.
+ * libc/string/wcscpy.c: Ditto.
+ * libc/string/wcscspn.c: Ditto.
+ * libc/string/wcslcat.c: Ditto.
+ * libc/string/wcslcpy.c: Ditto.
+ * libc/string/wcslen.c: Ditto.
+ * libc/string/wcsncat.c: Ditto.
+ * libc/string/wcsncmp.c: Ditto.
+ * libc/string/wcsncpy.c: Ditto.
+ * libc/string/wcspbrk.c: Ditto.
+ * libc/string/wcsrchr.c: Ditto.
+ * libc/string/wcsspn.c: Ditto.
+ * libc/string/wcsstr.c: Ditto.
+ * libc/string/wmemchr.c: Ditto.
+ * libc/string/wmemcmp.c: Ditto.
+ * libc/string/wmemcpy.c: Ditto.
+ * libc/string/wmemmove.c: Ditto.
+ * libc/string/wmemset.c: Ditto.
+
+2002-08-29 Jeff Johnston <jjohnstn@redhat.com>
+
+ * libc/locale/locale.c (_setlocale_r)[MB_CAPABLE]: Fix so
+ default locale "" is accepted for LC_CTYPE or LC_MESSAGES
+ and is treated as if "C" was specified.
+
+2002-08-28 Jeff Johnston <jjohnstn@redhat.com>
+
+ * Makefile.am (install-data-local): Move install of build
+ newlib.h after installing headers in libc/include so as to
+ overwrite default newlib.h.
+ * Makefile.in: Regenerated.
+
+2002-08-28 Jeff Johnston <jjohnstn@redhat.com>
+
+ * libc/include/newlib.h: New file for tools that use newlib
+ headers but don't build newlib first (e.g. gcc).
+
+2002-08-28 Jeff Johnston <jjohnstn@redhat.com>
+
+ * libc/stdlib/wmemchr.c: Explicitly include <_ansi.h>.
+ * libc/stdlib/wmemcmp.c: Ditto.
+ * libc/stdlib/wmemcpy.c: Ditto.
+ * libc/stdlib/wmemmove.c: Ditto.
+ * libc/stdlib/wmemset.c: Ditto.
+
+2002-08-27 Egor Duda <deo@logos-m.ru>
+
+ * libc/stdlib/wmemchr.c: New file.
+ * libc/stdlib/wmemcmp.c: Ditto.
+ * libc/stdlib/wmemcpy.c: Ditto.
+ * libc/stdlib/wmemmove.c: Ditto.
+ * libc/stdlib/wmemset.c: Ditto.
+ * libc/stdlib/Makefile.am (GENERAL_SOURCES): Add new files.
+ * configure.host: Default -DMB_CAPABLE for cygwin.
+ * libc/include/wchar.h: Declare wmemchr(), wmemcmp(), wmemcpy(),
+ wmemmove() and wmemset(). Add include of <_ansi.h>.
+ * libc/stdlib/Makefile.in: Regenerate.
+
+2002-08-27 Jeff Johnston <jjohnstn@redhat.com>
+
+ * configure.host: Remove _ELIX_LEVEL flag setting.
+ * Makefile.am(stmp-targ-include): Copy newlib.h to targ-include.
+ (install-data-local): Install newlib.h.
+ * Makefile.in: Regenerated.
+ * aclocal.m4: Ditto.
+ * configure: Ditto.
+ * configure.in: Add AM_CONFIG_HEADER to generate newlib.h based on
+ newlib.hin. Add AC_DEFINE_UNQUOTED entries for _ELIX_LEVEL
+ and _NEWLIB_VERSION to fill in newlib.h header file entries.
+ In AC_OUTPUT statement, unset ac_file so multilib support does
+ not use last ac_file temporary used in newlib.h configuration.
+ * libc/include/_ansi.h: Include <newlib.h>.
+ * newlib.hin: New template file for newlib.h.
+ * stamp-h.in: New file.
+
+2002-08-26 Wu Yongwei <adah@netstd.com>
+
+ * time.h (timezonevar): Change "#if" to "#ifdef".
+
+2002-08-26 Jeff Johnston <jjohnstn@redhat.com>
+
+ * Makefile.am(LIBC_OBJECTLISTS): Add STDIO64_OBJECTLIST.
+ * Makefile.in: Regenerated.
+ * acinclude.m4: Add support for --enable-newlib-elix-level option.
+ * aclocal.m4: Regenerated.
+ * configure: Ditto.
+ * configure.host: Add code to define _ELIX_LEVEL if
+ --enable-newlib-elix-level option is used.
+ * configure.in:
+ * libc/aclocal.m4: Regenerated.
+ * libc/configure: Ditto.
+ * libc/argz/Makefile.am: Add EL/IX level checking.
+ * libc/argz/Makefile.in: Regenerated.
+ * libc/argz/dummy.c: New file.
+ * libc/ctype/Makefile.am: Add EL/IX level checking.
+ * libc/ctype/Makefile.in: Regenerated.
+ * libc/locale/Makefile.am: Add EL/IX level checking.
+ * libc/locale/Makefile.in: Regenerated.
+ * libc/posix/Makefile.am: Add EL/IX level checking.
+ * libc/posix/Makefile.in: Regenerated.
+ * libc/posix/telldir.c: Add EL/IX level checking.
+ * libc/reent/Makefile.am: Ditto.
+ * libc/reent/fstat64r.c: Ditto.
+ * libc/reent/lseek64r.c: Ditto.
+ * libc/reent/open64r.c: Ditto.
+ * libc/reent/Makefile.in: Regenerated.
+ * libc/search/Makefile.am: Add EL/IX level checking.
+ * libc/search/Makefile.in: Regenerated.
+ * libc/stdio/Makefile.am: Add EL/IX level checking.
+ * libc/stdio/Makefile.in: Regenerated.
+ * libc/stdio64/Makefile.am: Add EL/IX level checking.
+ * libc/stdio64/Makefile.in: Regenerated.
+ * libc/stdio64/dummy.c: New file.
+ * libc/stdio64/fgetpos64.c: Fix so _LARGE64_FILES macro is checked
+ after first include.
+ * libc/stdio64/fopen64.c: Ditto.
+ * libc/stdio64/freopen64.c: Ditto.
+ * libc/stdio64/fseeko64.c: Ditto.
+ * libc/stdio64/fsetpos64.c: Ditto.
+ * libc/stdio64/ftello64.c: Ditto.
+ * libc/stdio64/tmpfile64.c: Ditto.
+ * libc/stdlib/Makefile.am: Add EL/IX level checking.
+ * libc/stdlib/Makefile.in: Regenerated.
+ * libc/stdlib/mstats.c: Add EL/IX level checking.
+ * libc/string/Makefile.am: Ditto.
+ * libc/string/Makefile.in: Regenerated.
+ * libc/sys/linux/Makefile.am: Add EL/IX level checking.
+ * libc/sys/linux/Makefile.in: Regenerated.
+ * libc/sys/linux/aclocal.m4: Ditto.
+ * libc/sys/linux/configure: Ditto.
+ * libc/sys/linux/aio.c: Add EL/IX level checking.
+ * libc/sys/linux/ftok.c: Ditto.
+ * libc/sys/linux/getdate.c: Ditto.
+ * libc/sys/linux/ids.c: Ditto.
+ * libc/sys/linux/inode.c: Ditto.
+ * libc/sys/linux/io.c: Ditto.
+ * libc/sys/linux/process.c: Ditto.
+ * libc/sys/linux/resource.c: Ditto.
+ * libc/sys/linux/sched.c: Ditto.
+ * libc/sys/linux/sig.c: Ditto.
+ * libc/sys/linux/termios.c: Ditto.
+ * libc/sys/linux/wait.c: Ditto plus add __waitpid and
+ __libc___waitpid weak aliases.
+ * libc/sys/linux/machine/i386/syscall.h: Add new _base macros
+ that generate the code for a syscall, but do not create a
+ weak alias.
+ * libc/syscalls/Makefile.am: Add EL/IX level checking.
+ * libc/syscalls/Makefile.in: Regenerated.
+ * libc/time/tzset_r.c: Change to replace strdup with equivalent
+ functionality.
+ * libc/unix/Makefile.am: Add EL/IX level checking.
+ * libc/unix/Makefile.in: Regenerated.
+
+2002-08-26 Christopher Faylor <cgf@redhat.com>
+
+ * libc/include/malloc.h: On cygwin, define malloc _r functions as
+ wrapper macros to standard malloc functions.
+ * libc/include/stdlib.h: Ditto.
+ * configure.host: Always define MALLOC_PROVIDED on cygwin.
+
+2002-08-22 Thomas Fitzsimmons <fitzsim@redhat.com>
+
+ * libc/include/langinfo.h: New file.
+ * libc/include/wchar.h: Likewise.
+ * libc/include/sys/syslimits.h: Likewise.
+ * libc/locale/fix_grouping.c: Likewise.
+ * libc/locale/ldpart.c: Likewise.
+ * libc/locale/ldpart.h: Likewise.
+ * libc/locale/lmessages.c: Likewise.
+ * libc/locale/lmessages.h: Likewise.
+ * libc/locale/lmonetary.c: Likewise.
+ * libc/locale/lmonetary.h: Likewise.
+ * libc/locale/lnumeric.c: Likewise.
+ * libc/locale/lnumeric.h: Likewise.
+ * libc/locale/nl_langinfo.3: Likewise.
+ * libc/locale/nl_langinfo.c: Likewise.
+ * libc/locale/timelocal.c: Likewise.
+ * libc/locale/timelocal.h: Likewise.
+ * libc/stdlib/btowc.c: Likewise.
+ * libc/stdlib/mbrlen.c: Likewise.
+ * libc/stdlib/mbrtowc.c: Likewise.
+ * libc/stdlib/mbsinit.c: Likewise.
+ * libc/stdlib/mbsrtowcs.c: Likewise.
+ * libc/stdlib/wcrtomb.c: Likewise.
+ * libc/stdlib/wcsrtombs.c: Likewise.
+ * libc/stdlib/wctob.c: Likewise.
+ * libc/sys/linux/prof-freq.c: Likewise.
+ * libc/sys/linux/profile.c: Likewise.
+ * libc/sys/linux/machine/i386/dl-procinfo.c: Likewise.
+ * libc/sys/linux/machine/i386/dl-procinfo.h: Likewise.
+ * libc/include/stdlib.h: Change re-entrant functions to take
+ mbstate_t pointers.
+ * libc/include/sys/_types.h: Define _mbstate_t.
+ * libc/include/sys/config.h (MB_LEN_MAX): New macro.
+ * libc/include/sys/errno.h (EILSEQ): New error code.
+ * libc/include/sys/reent.h: Include wchar.h. Change reentrant
+ structure to use mbstate_t.
+ * libc/locale/Makefile.am (LIB_SOURCES): Add new files.
+ * libc/machine/powerpc/vfprintf.c: Use mbstate_t.
+ * libc/machine/powerpc/vfscanf.c: Likewise.
+ * libc/stdio/getdelim.c: Reallocate buffer only when necessary.
+ * libc/stdio/vfprintf.c: Likewise.
+ * libc/stdio/vfscanf.c: Likewise.
+ * libc/stdlib/Makefile.am (LIB_SOURCES): Add new files.
+ * libc/stdlib/mblen.c: Use mbstate_t.
+ * libc/stdlib/mblen_r.c: Likewise.
+ * libc/stdlib/mbstowcs.c: Likewise.
+ * libc/stdlib/mbstowcs_r.c: Likewise.
+ * libc/stdlib/mbtowc.c: Likewise.
+ * libc/stdlib/mbtowc_r.c: Likewise.
+ * libc/stdlib/wcstombs.c: Likewise.
+ * libc/stdlib/wcstombs_r.c: Likewise.
+ * libc/stdlib/wctomb_r.c: Likewise.
+ * libc/sys/linux/Makefile.am (LIB_SOURCES): Add prof-freq.c and
+ profile.c.
+ * libc/sys/linux/machine/i386/Makefile.am (LIB_SOURCES): Add
+ dl-procinfo.c.
+ * libc/sys/linux/sys/errno.h (EILSEQ): New error code.
+ * libc/sys/linux/sys/types.h (off_t): Define type.
+ * testsuite/newlib.locale/UTF-8.c: Change locale name from UTF-8
+ to C-UTF-8.
+ * testsuite/newlib.locale/UTF-8.exp: Likewise.
+
+2002-08-20 Casper S. Hornstrup <chorns@users.sourceforge.net>
+
+ * libc/stdlib/mallocr.c: #include windows.h on Win32.
+ (AlignPage): Continue macro on next line.
+
+2002-08-19 Jeff Johnston <jjohnstn@redhat.com>
+
+ * libc/sys/linux/include/pthread.h: New file.
+
+2002-08-19 Jeff Johnston <jjohnstn@redhat.com>
+
+ * libc/include/sys/types.h: Support __need_inttypes macro
+ that only sets the __intxx and __uintxx types.
+ * libc/machine/powerpc/Makefile.am: Add stdlib to include directories
+ to get mprec.h.
+ * libc/machine/powerpc/Makefile.in: Regenerated.
+ * libc/machine/powerpc/vfprintf.c: Fix state variable type.
+ * libc/machine/powerpc/vfscanf.c: Fix state variable type. Remove
+ redundant fixed-point conversion prototypes.
+ * libc/machine/powerpc/machine/stdlib.h[__SPE__]: Include <sys/types.h>
+ after setting __need_inttypes.
+
+2002-08-18 Christopher Faylor <cgf@redhat.com>
+
+ * libc/include/sys/unistd.h: Add getsid declaration for cygwin.
+
+2002-08-17 Jeff Johnston <jjohnstn@redhat.com>
+
+ * libc/include/sys/config.h[__PPC__][__SPE__]: Set
+ _LONG_DOUBLE to double.
+
+2002-08-17 Jeff Johnston <jjohnstn@redhat.com>
+
+ * configure.host: Add powerpc*-*-eabispe* configuration.
+ * libc/machine/powerpc/atosfix16.c: New fixed-point conversion file.
+ * libc/machine/powerpc/atosfix32.c: Ditto.
+ * libc/machine/powerpc/atosfix64.c: Ditto.
+ * libc/machine/powerpc/atoufix16.c: Ditto.
+ * libc/machine/powerpc/atoufix32.c: Ditto.
+ * libc/machine/powerpc/atoufix64.c: Ditto.
+ * libc/machine/powerpc/fix64.h: Ditto.
+ * libc/machine/powerpc/simdldtoa.c: Ditto.
+ * libc/machine/powerpc/strtosfix16.c: Ditto.
+ * libc/machine/powerpc/strtosfix32.c: Ditto.
+ * libc/machine/powerpc/strtosfix64.c: Ditto.
+ * libc/machine/powerpc/strtoufix16.c: Ditto.
+ * libc/machine/powerpc/strtoufix32.c: Ditto.
+ * libc/machine/powerpc/strtoufix64.c: Ditto.
+ * libc/machine/powerpc/ufix64toa.c: Ditto.
+ * libc/machine/powerpc/configure.in: Add check for
+ powerpc*-eabispe and add fixed-point conversion functions.
+ * libc/machine/powerpc/configure: Regenerated.
+ * libc/machine/powerpc/vfprintf.c[__SPE__]: Add support for
+ %r and %R format specifiers which handle fixed-point data.
+ * libc/machine/powerpc/vfscanf.c[__SPE__]: Ditto.
+ * libc/machine/powerpc/machine/stdlib.h[__SPE__]: Add fixed-point
+ function prototypes.
+
+2002-08-17 Jeff Johnston <jjohnstn@redhat.com>
+
+ * Makefile.am: Move cmath stuff into libc/sys/linux.
+ * Makefile.in: Regenerated.
+ * configure.host: Default -DMB_CAPABLE for x86-linux.
+ * libc/include/reent.h: Define _sbrk to take signed int argument.
+ * libc/include/sys/unistd.h: Ditto for _sbrk_r and sbrk.
+ * libc/locale/locale.c[MB_CAPABLE]: Add LC_MESSAGES support and
+ make locale name checking more efficient. Also allow "C-ISO-8859-1"
+ locale for LC_CTYPE and LC_MESSAGES.
+ * libc/reent/sbrkr.c: Change prototype to take ptrdiff_t.
+ * libc/sys/linux/brk.c: Change sbrk prototype.
+ * libc/sys/linux/include/time.h: Remove Cygwin stuff and
+ include <sys/features.h>.
+ (CLOCK_THREAD_CPUTIME): Renamed to CLOCK_THREAD_CPUTIME_ID.
+ (CLOCK_PROCESS_CPUTIME): Renamed to CLOCK_PROCESS_CPUTIME_ID.
+ * libc/sys/linux/sys/cdefs.h: Replace with glibc sys/cdefs.h
+ with a few local additions.
+ * libc/sys/linux/sys/features.h: New file.
+ * libc/sys/linux/sys/unistd.h: Change _sbrk_r and sbrk prototypes
+ to take signed argument.
+ * libc/syscalls/syssbrk.c: Change sbrk, _sbrk_r, and _sbrk
+ prototypes to take signed size argument.
+
+2002-08-16 Thomas Fitzsimmons <fitzsim@redhat.com>
+
+ * libc/sys/linux/cmath: New directory.
+ * libc/sys/linux/include/cmathcalls.h: New file.
+ * libc/sys/linux/include/complex.h: New file.
+ * libc/sys/linux/machine/i386/huge_val.h: New file
+ * libm/math/w_sincos.c: New file
+ * libm/math/wf_sincos.c: New file
+ * libm/mathfp/s_sincos.c: New file
+ * libm/mathfp/sf_sincos.c: New file
+ * Makefile.am (LIBC_OBJECTLISTS): Add cmath/objectlist.awk.in.
+ * libc/include/math.h: Add sincos and sincosf declarations.
+ * libc/sys/linux/Makefile.am (SUBDIRS): Add cmath.
+ (SUBLIBS): Likewise.
+ * libc/sys/linux/configure.in (AC_OUTPUT): Add cmath.
+ * libm/math/Makefile.am (src): Add w_sincos.c.
+ (fsrc): Add wf_sincos.c.
+ * libm/mathfp/Makefile.am (src): Add s_sincos.c
+ (fsrc): Add sf_sincos.c.
+
+2002-08-12 Jeff Johnston <jjohnstn@redhat.com>
+
+ * libc/sys/linux/machine/i386/crt0.c (__bss_start,_end):
+ Declare as extern chars and use the address operator to
+ properly use values set in linker script.
+
+2002-08-09 Jason Tishler <jason@tishler.net>
+
+ * libc/stdlib/mallocr.c: Include <limits.h>.
+ (request2size): Change macro to do
+ unsigned long comparisons and avoid signed overflow.
+ (mALLOc): Add overflow check for the number of bytes to allocate.
+ (rEALLOc): Ditto.
+
+2002-08-09 Jeff Johnston <jjohnstn@redhat.com>
+
+ * configure.host: Add check for --enable-newlib-io-pos-args
+ and define WANT_IO_POS_ARGS flag if enabled. Define
+ the flag by default for x86-linux configurations.
+ * configure.in: Add support for --enable-newlib-io-pos-args.
+ * libc/configure.in: Ditto.
+ * configure: Regenerated.
+ * libc/configure: Ditto.
+ * libc/stdio/Makefile.am: Specify -fshort-enums for compiling
+ vfprintf.c and vfiprintf.c.
+ * libc/stdio/Makefile.in: Regenerated.
+ * libc/stdio/vfprintf.c: Add positional argument support that
+ is enabled by compiling with -DWANT_IO_POS_ARGS.
+
+2002-08-07 Richard Sandiford <rsandifo@redhat.com>
+
+ * libc/include/machine/setjmp.h: For mips, define _JBLEN based
+ based on __mips_soft_float rather than __mips64.
+ * libc/machine/mips/setjmp.S: Provide hard and soft float versions
+ of both 32-bit and 64-bit code.
+
+2002-08-04 Christopher Faylor <cgf@redhat.com>
+
+ * libc/stdio/popen.c (popen): Allow "rb", "rt", "wb", and "wt"
+ arguments for popen to match similar functionality in fopen.
+
+2002-07-29 Pierre Humblet <pierre.humblet@ieee.org>
+
+ * libc/include/sys/unistd.h: Add setgroups prototype for Cygwin.
+
+2002-07-29 Jeff Johnston <jjohnstn@redhat.com>
+
+ * libc/sys/linux/Makefile.am: Add aio64.c.
+ * libc/sys/linux/Makefile.in: Regenerated.
+ * libc/sys/linux/aio.c (aio_init): ENOSYS stub added.
+ * libc/sys/linux/aio64.c: New file.
+
+2002-07-26 Jeff Johnston <jjohnstn@redhat.com>
+
+ * libc/include/sys/param.h (MAX, MIN): Added macros.
+ * libc/sys/linux/Makefile.am: Add new files.
+ * libc/sys/linux/Makefile.in: Regenerated.
+ * libc/sys/linux/sys/stat.h: Add *stat64 prototypes.
+ * libc/sys/linux/inode.c (fchdir): Added syscall.
+ * libc/sys/linux/ftw.c: New file.
+ * libc/sys/linux/ftw64.c: Ditto.
+ * libc/sys/linux/getwd.c: Ditto.
+ * libc/sys/linux/scandir64.c: Ditto.
+ * libc/sys/linux/strverscmp.c: Ditto.
+ * libc/sys/linux/versionsort.c: Ditto.
+ * libc/sys/linux/versionsort64.c: Ditto.
+
+2002-07-26 Jeff Johnston <jjohnstn@redhat.com>
+
+ * libc/string/strings.tex: Fix typo for memccpy.
+
+2002-07-25 Jeff Johnston <jjohnstn@redhat.com>
+
+ * libc/sys/linux/io64.c (truncate64, ftruncate64): Added.
+ * libc/sys/linux/sys/types.h (off64_t): Definition added.
+
+2002-07-25 Jeff Johnston <jjohnstn@redhat.com>
+
+ * libc/sys/linux/Makefile.am: Add fclean.c.
+ * libc/sys/linux/Makefile.in: Regenerated.
+ * libc/sys/linux/fclean.c: New file.
+
+2002-07-25 Jeff Johnston <jjohnstn@redhat.com>
+
+ * libc/sys/linux/Makefile.am: Add confstr.c.
+ * libc/sys/linux/Makefile.in: Regenerated.
+ * libc/sys/linux/confstr.c: New file.
+ * libc/sys/linux/confstr.h: Ditto.
+ * libc/sys/linux/sys/unistd.h: Include <features.h> and
+ <bits/environments.h>.
+
+2002-07-25 Jeff Johnston <jjohnstn@redhat.com>
+
+ * libc/sys/linux/config.h (__set_errno): Macro definition removed.
+ * libc/sys/linux/fpathconf.c (__set_errno): Ditto.
+ * libc/sys/linux/libc-internal.h (__set_errno): Ditto.
+ * libc/sys/linux/pathconf.c (__set_errno): Ditto.
+ * libc/sys/linux/ttyname_r.c (__set_errno): Ditto.
+ * libc/sys/linux/sys/errno.h (__set_errno): Macro definition added.
+
+2002-07-24 Jeff Johnston <jjohnstn@redhat.com>
+
+ * libc/sys/linux/Makefile.am: Add new files.
+ * libc/sys/linux/Makefile.in: Regenerated.
+ * libc/sys/linux/fstab.c: New file.
+ * libc/sys/linux/fstatvfs.c: Ditto.
+ * libc/sys/linux/fstatvfs64.c: Ditto.
+ * libc/sys/linux/internal_statvfs.c: Ditto.
+ * libc/sys/linux/mntent.c: Ditto.
+ * libc/sys/linux/mntent_r.c: Ditto.
+ * libc/sys/linux/statvfs.c: Ditto.
+ * libc/sys/linux/statvfs64.c: Ditto.
+ * libc/sys/linux/include/paths.h: Ditto.
+ * libc/sys/linux/inode.c (statfs, fstatfs): New syscalls
+ with double-underscore weak-aliases.
+ * libc/sys/linux/sys/stat.h: Add *stat64 prototypes.
+
+2002-07-24 Jeff Johnston <jjohnstn@redhat.com>
+
+ * libc/include/signal.h (SIG_IGN, SIG_DFL, SIG_ERR): Change
+ to use _sig_func_ptr type casted constants.
+ (_sig_func_ptr): Typedef moved to sys/signal.h.
+ * libc/include/sys/signal.h (_sig_func_ptr): Typedef added.
+ For __rtems, use POSIX definition, otherwise default to ANSI.
+ * libc/sys/linux/sys/signal.h (_sig_func_ptr): Typedef added.
+
+2002-07-24 Stephane Carrez <stcarrez@nerim.fr>
+
+ * configure.host: Recognize m6811-elf and m6812-elf targets.
+ * libc/include/machine/setjmp.h (_JBLEN): Define for 68hc11/68hc12.
+ * libc/include/machine/ieeefp.h (__IEEE_BIG_ENDIAN): Define for 68HC11.
+ (_DOUBLE_IS_32BITS): Define when compiling with -fshort-double.
+ * libc/include/sys/config.h (INT_MAX, UINT_MAX): Define
+ according to __INT_MAX__.
+ (_POINTER_INT): Define to short.
+ * libc/machine/m68hc11/Makefile.am: New file.
+ * libc/machine/m68hc11/Makefile.in: New file.
+ * libc/machine/m68hc11/configure.in: New file.
+ * libc/machine/m68hc11/configure: New file.
+ * libc/machine/m68hc11/aclocal.m4: New file.
+ * libc/machine/m68hc11/setjmp.S: New file.
+
+2002-07-23 Jeff Johnston <jjohnstn@redhat.com>
+
+ * libc/include/string.h: Add mempcpy, strndup, and _strndup_r
+ prototypes.
+ * libc/stdlib/Makefile.am: Remove strdup.c and strdup_r.c.
+ * libc/stdlib/Makefile.in: Regenerated.
+ * libc/stdlib/strdup.c: Removed.
+ * libc/stdlib/strdup_r.c: Removed.
+ * libc/string/Makefile.am: Add strdup.c, strdup_r.c, memccpy.c,
+ mempcpy.c, strndup.c, and strndup_r.c.
+ * libc/string/Makefile.in: Regenerated.
+ * libc/string/memccpy.c: New file.
+ * libc/string/mempcpy.c: Ditto.
+ * libc/string/strndup.c: Ditto.
+ * libc/string/strndup_r.c: Ditto.
+ * libc/string/strdup.c: New file moved from stdlib.
+ * libc/string/strdup_r.c: Ditto.
+ * libc/string/strings.tex: Add memccpy and mempcpy documentation.
+
+2002-07-23 Jeff Johnston <jjohnstn@redhat.com>
+
+ * libc/include/stdio.h: Move fcloseall prototype within
+ #ifndef _REENT_ONLY section.
+ * libc/sys/linux/Makefile.am: Add new files.
+ * libc/sys/linux/Makefile.in: Regenerated.
+ * libc/sys/linux/sys/stdio.h: Add ctermid prototype.
+ * libc/sys/linux/sys/unistd.h: Add ttyname_r prototype.
+ * libc/sys/linux/sys/types.h: Add ino64_t type.
+ * libc/sys/linux/ctermid.c: New file.
+ * libc/sys/linux/ttyname_r.c: Ditto.
+ * libc/sys/linux/readdir64.c: Ditto.
+
+2002-07-22 Jeff Johnston <jjohnstn@redhat.com>
+
+ * libc/include/stdio.h (fcloseall, _fcloseall_r): Added prototypes.
+ * libc/stdio/Makefile.am: Added fcloseall.c support.
+ * libc/stdio/Makefile.in: Regenerated.
+ * libc/stdio/fcloseall.c: New file.
+ * libc/stdio64/Makefile.am: Remove missing .def references.
+ * libc/stdio64/Makefile.in: Regenerated.
+
+2002-07-22 Jeff Johnston <jjohnstn@redhat.com>
+
+ * libc/machine/powerpc/time.c: Removed..renamed to times.c.
+ * libc/machine/powerpc/times.c: New file.
+ * libc/machine/powerpc/Makefile.am: Change time.c to times.c.
+ * libc/machine/powerpc/Makefile.in: Regenerated.
+
+2002-07-22 Aldy Hernandez <aldyh@redhat.com>
+
+ * libc/machine/powerpc/time.c: New file.
+ * libc/machine/powerpc/Makefile.am (lib_a_SOURCES): Add
+ time.c.
+ * libc/machine/powerpc/Makefile.in: Regenerated.
+
+2002-07-22 Thomas Fitzsimmons <fitzsim@redhat.com>
+
+ * libc/libc.texinfo: Change copyright notices to Red Hat from
+ Cygnus.
+ * libm/libm.texinfo: Likewise.
+ * README: Change docs URL to
+ http://sources.redhat.com/newlib/docs.html.
+
+2002-07-19 Jeff Johnston <jjohnstn@redhat.com>
+
+ * libc/sys/linux/Makefile.am: Add pathconf.c and fpathconf.c.
+ * libc/sys/linux/Makefile.in: Regenerated.
+ * libc/sys/linux/inode.c: Add chmod, fchmod, and chown syscalls.
+ * libc/sys/linux/io.c: Add ftruncate syscall.
+ * libc/sys/linux/fpathconf.c: New file.
+ * libc/sys/linux/pathconf.c: Ditto.
+ * libc/sys/linux/linux_fsinfo.h: Ditto.
+ * libc/sys/linux/sys/unistd.h: Ditto.
+
+2002-07-19 Jeff Johnston <jjohnstn@redhat.com>
+
+ * libc/stdio64/Makefile.am: Remove missing files.
+ * libc/stdio64/Makefile.in: Regenerated.
+
+2002-07-19 Jeff Johnston <jjohnstn@redhat.com>
+
+ * libc/include/sys/config.h[__i386__][__linux__]: Define
+ _LARGE64FILE_SOURCE to 1.
+ * libc/sys/linux/Makefile.am: Add getrlimit64.c and setrlimit64.c.
+ * libc/sys/linux/Makefile.in: Regenerated.
+ * libc/sys/linux/resource.c: Add __getrlimit and __setrlimit aliases.
+ * libc/sys/linux/sys/linux_time.h: Protect struct timeval definition.
+ * libc/sys/linux/sys/resource.h: Include <bits/resource.h> instead
+ of <linux/resource.h>.
+ * libc/sys/linux/getrlimit64.c: New file.
+ * libc/sys/linux/setrlimit64.c: Ditto.
+
+2002-07-19 Thomas Fitzsimmons <fitzsim@redhat.com>
+
+ * libc/argz/argz_replace.c: Include buf_findstr.h.
+ * libc/argz/buf_findstr.c: Likewise.
+ * libc/argz/envz_entry.c: Include buf_findstr.h. Cast return
+ value to (char *).
+ * libc/argz/envz_get.c: Likewise.
+ * libc/include/sys/unistd.h: Add getopt and getsubopt declarations.
+ * libc/stdlib/Makefile.am (LIB_SOURCES): Add getsubopt.c.
+ * libc/stdlib/getsubopt.3: New file.
+ * libc/stdlib/getsubopt.c: New file.
+ * libc/sys/linux/machine/i386/socketcall.h (__sockcall_base):
+ Change esp to ebp.
+
+2002-07-17 Jeff Johnston <jjohnstn@redhat.com>
+
+ * configure.host(stdio64_dir): New setting that is used to
+ enable building of new stdio64 directory.
+ * libc/Makefile.am[HAVE_STDIO64_DIR]: Add support for
+ large files.
+ (stmp-stdio64,stdio64.texi): New targets to optionally add in
+ stdio64 info to info files.
+ * libc/Makefile.in: Regenerated.
+ * libc/configure: Ditto.
+ * libc/configure.in: Add configuration variables that are set
+ when stdio64 is selected as subdir in configure.host.
+ * libc/libc.texinfo: Add optional menu item for Stdio64, based
+ on whether STDIO64 flag is set or not.
+ * libc/sys.tex: Add optional stdio64 syscalls based on whether
+ STDIO64 flag is set or not.
+ * libc/include/reent.h[__LARGE64_FILES]: Add new stdio64
+ _r sycall routines.
+ * libc/include/stdio.h[__LARGE64_FILES]: Add new stdio64 prototypes.
+ (FILE): Typedef'd to __FILE instead of struct __sFILE directly.
+ (__SL64): New file flag indicating file is opened via fopen64.
+ * libc/include/sys/_types.h(_off64_t): Added.
+ * libc/include/sys/config.h: For x86-linux, define __LARGE64_FILES.
+ * libc/include/sys/reent.h(struct __sFILE64): New file structure
+ for 64-bit offset large file support.
+ (__FILE): New intermediate type either set to struct __sFILE64 or
+ struct __sFILE, depending on whether __LARGE64_FILES is set or not.
+ * libc/reent/Makefile.am[HAVE_STDIO64_DIR]: Add new files.
+ * libc/reent/Makefile.in: Regenerated.
+ * libc/reent/fstat64r.c: New file.
+ * libc/reent/lseek64r.c: Ditto.
+ * libc/reent/open64r.c: Ditto.
+ * libc/reent/reent.tex: Optionally add stdio64 reentrant syscalls
+ based on whether STDIO64 flag is set.
+ * libc/stdio/stdio.tex: Add blank line.
+ * libc/stdio64/Makefile.am: New file.
+ * libc/stdio64/Makefile.in: Ditto.
+ * libc/stdio64/fgetpos64.c: Ditto.
+ * libc/stdio64/fopen64.: Ditto.
+ * libc/stdio64/freopen64.c: Ditto.
+ * libc/stdio64/fseeko64.c: Ditto.
+ * libc/stdio64/fsetpos64.c: Ditto.
+ * libc/stdio64/ftello64.c: Ditto.
+ * libc/stdio64/local64.h: Ditto.
+ * libc/stdio64/stdio64.c: Ditto.
+ * libc/stdio64/stdio64.tex: Ditto.
+ * libc/stdio64/tmpfile64.c: Ditto.
+ * libc/sys/linux/io64.c: Add weak aliases for lseek64, fstat64, and
+ open64.
+
+2002-07-16 Jeff Johnston <jjohnstn@redhat.com>
+
+ * libc/Makefile.am (stmp-extra): New target to set makeinfo flag
+ if LIBC_EXTRA_LIB is present.
+ * libc/Makefile.in: Regenerated.
+ * libc/libc.texinfo: Add blank line.
+ * libc/argz/Makefile.am: Add doc support.
+ * libc/search/Makefile.am: Ditto.
+ * libc/argz/Makefile.in: Regenerated.
+ * libc/search/Makefile.in: Ditto.
+ * libc/misc/misc.tex: Add ffs function.
+ * libc/stdio/ftell.c: Fix missing doc delimeter in description.
+
+2002-07-15 Jeff Johnston <jjohnstn@redhat.com>
+
+ * libc/include/sys/config.h[__H8300__]: Replace __SMALL_BITFIELDS
+ definition that was removed in error.
+
+2002-07-15 Jeff Johnston <jjohnstn@redhat.com>
+
+ * libc/include/machine/ieeefp.h: Change to only define
+ floating point defines (e.g one of __IEEE_BIG_ENDIAN or
+ __IEEE_LITTLE_ENDIAN must be defined for each platform).
+ * libc/include/sys/config.h: Include <machine/ieeefp.h> and
+ remove redundant floating point definitions.
+
+2002-07-15 Jeff Johnston <jjohnstn@redhat.com>
+
+ * libc/sys/linux/callocr.c: Fix so code references
+ calloc.
+
+2002-07-15 Jeff Johnston <jjohnstn@redhat.com>
+
+ * libc/sys/linux/Makefile.am: Add new files.
+ * libc/sys/linux/Makefile.in: Regenerated.
+ * libc/sys/linux/bp-sym.h: Moved to include directory.
+ * libc/sys/linux/mmap.c: Add weak aliases: __mmap, __munmap, __mremap.
+ * libc/sys/linux/inode.c: Set _LIBC to 1.
+ * libc/sys/linux/mq_close.c: Ditto.
+ * libc/sys/linux/mq_getattr.c: Ditto.
+ * libc/sys/linux/mq_open.c: Ditto.
+ * libc/sys/linux/mq_receive.c: Ditto.
+ * libc/sys/linux/mq_send.c: Ditto.
+ * libc/sys/linux/mq_setattr.c: Ditto.
+ * libc/sys/linux/mq_unlink.c: Ditto.
+ * libc/sys/linux/calloc.c: New file.
+ * libc/sys/linux/callocr.c: Ditto.
+ * libc/sys/linux/cfreer.c: Ditto.
+ * libc/sys/linux/config.h: Ditto.
+ * libc/sys/linux/free.c: Ditto.
+ * libc/sys/linux/freer.c: Ditto.
+ * libc/sys/linux/msize.c: Ditto.
+ * libc/sys/linux/msizer.c: Ditto.
+ * libc/sys/linux/mstats.c: Ditto.
+ * libc/sys/linux/mtrim.c: Ditto.
+ * libc/sys/linux/mtrimr.c: Ditto.
+ * libc/sys/linux/pvallocr.c: Ditto.
+ * libc/sys/linux/realloc.c: Ditto.
+ * libc/sys/linux/reallocr.c: Ditto.
+ * libc/sys/linux/thread-m.h: Ditto.
+ * libc/sys/linux/vallocr.c: Ditto.
+ * libc/sys/linux/bp-checks.h: Ditto.
+ * libc/sys/linux/libc-symbols.h: Ditto.
+ * libc/sys/linux/libc-tsd.h: Ditto.
+ * libc/sys/linux/libintl.h: Ditto.
+ * libc/sys/linux/malign.c: Ditto.
+ * libc/sys/linux/malignr.c: Ditto.
+ * libc/sys/linux/mallinfor.c: Ditto.
+ * libc/sys/linux/malloc.c: Ditto.
+ * libc/sys/linux/mallocr.c: Ditto.
+ * libc/sys/linux/malloptr.c: Ditto.
+ * libc/sys/linux/mallstatsr.c: Ditto.
+ * libc/sys/linux/mcheck.c: Ditto.
+ * libc/sys/linux/mhooks.h: Ditto.
+ * libc/sys/linux/include/bp-sym.h: Ditto.
+ * libc/sys/linux/include/malloc.h: Ditto.
+ * libc/sys/linux/include/mcheck.h: Ditto.
+ * libc/sys/linux/linuxthreads/machine/i386/Makefile.am: Remove
+ getpagesize.c.
+ * libc/sys/linux/linuxthreads/machine/i386/Makefile.in: Regenerated.
+ * libc/sys/linux/linuxthreads/machine/i386/getpagesize.c: Moved.
+ * libc/sys/linux/machine/i386/getpagesize.c: New file.
+ * libc/sys/linux/machine/i386/Makefile.am: Add getpagesize.c.
+ * libc/sys/linux/machine/i386/Makefile.in: Regenerated.
+ * libc/sys/linux/machine/i386/sysdep.h: New file.
+ * libc/sys/linux/machine/i386/weakalias.h: Add weak_function support.
+ * libc/sys/linux/sys/dirent.h: Set _LIBC to 1.
+ * libc/sys/linux/sys/lock.h: Include <machine/weakalias.h>.
+
+2002-07-12 Jeff Johnston <jjohnstn@redhat.com>
+
+ * libc/sys/linux/include/mqueue.h: Change to use <bits/siginfo.h>
+ instead of <asm/siginfo.h>.
+ * libc/sys/linux/sys/signal.h: Change to include various linux
+ <bits/xxx.h> header files, rather than <linux/signal.h> so as
+ to work with multiple releases of glibc header files.
+
+2002-07-11 Chris Demetriou <cgd@broadcom.com>
+
+ * testsuite/newlib.search/hsearchtest.c: New file to test
+ newlib/libc/search.
+ * testsuite/newlib.search/hsearchtest.exp: Likewise.
+
+2002-07-10 Florian Schrack <florian.schrack@freenet.de>
+
+ * libc/sys/mmixware/read.c: Use SYS_Fgets syscall if dealing with
+ a terminal.
+ * libc/sys/mmixware/sys/syscall.h (SYS_Fgets): Definition added.
+
+2002-07-08 Jeff Johnston <jjohnstn@redhat.com>
+
+ * libc/include/math.h (MAXFLOAT): Added.
+
+Mon Jul 8 13:55:23 2002 J"orn Rennecke <joern.rennecke@superh.com>
+
+ * libc/machine/sh/Makefile.am (lib_a_SOURCES):
+ Make strcmp.S unconditional.
+ * libc/machine/sh/Makefile.in: Regenerate.
+ * libc/machine/sh/asm.h (DELAYED_BRANCHES, SL): Also for __SH5__ .
+ * strcmp.S (strcmp): Add SHmedia variant. Use different registers
+ for SHcompact.
+
+2002-07-04 Jeff Johnston <jjohnstn@redhat.com>
+
+ * libc/sys/linux/inode.c: Fix utime prototype and add _LIBC
+ define before including <sys/lock.h>.
+
+2002-07-04 Jeff Johnston <jjohnstn@redhat.com>
+
+ * libc/include/utime.h: Add include of <_ansi.h>.
+ * libc/sys/linux/Makefile.am: Add utimes.c.
+ * libc/sys/linux/Makefile.in: Regenerated.
+ * libc/sys/linux/inode.c(__umask): New static routine.
+ (umask): Written to use __umask and attempt to thread lock.
+ (getumask): New function written to use __umask and thread lock.
+ * libc/sys/linux/utimes.c: New file.
+ * libc/sys/linux/sys/time.h: Fix utimes prototype.
+ * libc/sys/linux/sys/utime.h: New file.
+
+2002-07-04 Thomas Fitzsimmons <fitzsim@redhat.com>
+
+ * libtool.m4: New file.
+ * libc/sys/linux/process.c: Implement vfork in terms of fork,
+ rather than as a syscall.
+
+2002-07-04 Jeff Johnston <jjohnstn@redhat.com>
+
+ * libc/include/stdio.h: Add new prototypes.
+ * libc/stdio/Makefile.am: Add fseeko.c and ftello.c.
+ * libc/stdio/Makefile.in: Regenerated.
+ * libc/stdio/fseek.c: Add fseeko documentation.
+ * libc/stdio/ftell.c: Add ftello documentation.
+ * libc/stdio/fseeko.c: New file.
+ * libc/stdio/ftello.c: New file.
+
+2002-07-04 Jeff Johnston <jjohnstn@redhat.com>
+
+ * libc/stdio/Makefile.am: Add asprintf.c and vasprintf.c.
+ * libc/stdio/Makefile.in: Regenerated.
+ * libc/stdio/asprintf.c: New file.
+ * libc/stdio/vasprintf.c: Ditto.
+ * libc/stdio/fvwrite.c: Add code to dynamically reallocate
+ the buffer for asprintf support.
+ * libc/stdio/sprintf.c: Add asprintf documentation.
+ * libc/stdio/vfprintf.c: Add vasprintf documentation.
+ * libc/include/stdio.h: Add new prototypes.
+
+2002-07-02 Thomas Fitzsimmons <fitzsim@redhat.com>
+
+ * libc/search/hcreate.c: Remove advertising clause from license.
+ * libc/search/hcreate_r.c: Likewise.
+
+2002-07-02 Chris Demetriou <cgd@broadcom.com>
+
+ * libc/include/sys/config.h (__IEEE_LITTLE_ENDIAN)
+ (__IEEE_BIG_ENDIAN): Define appropriately for MIPS.
+ Check that one of them is defined and error out if not.
+ Add any platforms defined in <machine/ieeefp.h> that are missing.
+ * libc/search/hash.h (DB_BYTE_ORDER, DB_BIG_ENDIAN)
+ (DB_LITTLE_ENDIAN): New defines.
+ * libc/search/hash.c: Replace all incorrect checks for
+ _IEEE_LITTLE_ENDIAN with tests of BYTE_ORDER, and all uses of
+ BYTE_ORDER, LITTLE_ENDIAN, and BIG_ENDIAN with DB_* versions.
+ * libc/search/hash_page.c: Likewise.
+
+2002-06-28 Thomas Fitzsimmons <fitzsim@redhat.com>
+
+ * libm/mathfp/sf_pow.c (powf): Change k from int to float.
+
+2002-06-27 Benjamin Kosnik <bkoz@redhat.com>
+
+ * libc/include/stdio.h: Untangle, add _BEGIN_STD_C and _END_STD_C.
+ * libc/include/time.h: Same.
+ * libc/include/string.h: Same.
+ * libc/include/stdlib.h: Same.
+ * libc/include/signal.h: Same.
+ * libc/include/setjmp.h: Same.
+ * libc/include/math.h: Same.
+ * libc/include/locale.h: Same.
+ * libc/include/ctype.h: Same.
+ * libc/include/machine/setjmp.h: Same.
+ * libc/include/_ansi.h (_BEGIN_STD_C): Add.
+ (_END_STD_C): Add.
+
+2002-06-27 Jeff Johnston <jjohnstn@redhat.com>
+
+ * libc/include/sys/_types.h: Define _ssize_t as int if int is
+ 32-bits, otherwise define it as long.
+ * libc/include/sys/types.h: Include <_ansi.h> and <sys/_types.h>
+ and define ssize_t as _ssize_t.
+ * libc/reent/readr.c: Change return type to _ssize_t.
+ * libc/reent/writer.c: Ditto.
+ * libc/sys/linux/Makefile.am: Add aio.c.
+ * libc/sys/linux/Makefile.in: Regenerated.
+ * libc/sys/linux/aio.c: New file.
+ * libc/sys/linux/sys/cdefs.h: Add __restrict_arr definition.
+ * libm/common/fdlibm.h: Undef __P before defining it.
+
+2002-06-27 Thomas Fitzsimmons <fitzsim@redhat.com>
+
+ * libm/mathfp/s_pow.c (pow): Fix checks on variable k. Add
+ exponent_is_even_int variable. Handle case where x is
+ negative, and y is an odd integer.
+ * libm/mathfp/sf_pow.c (powf): Likewise.
+
+ * libm/mathfp/er_lgamma.c: Remove __kernel references.
+ * libm/mathfp/erf_lgamma.c: Likewise.
+ * libm/mathfp/s_tgamma.c: Likewise.
+ * libm/mathfp/sf_tgamma.c: Likewise.
+
+2002-06-27 Jeff Johnston <jjohnstn@redhat.com>
+
+ * libc/sys/linux/Makefile.am: Add new clock routines.
+ * libc/sys/linux/Makefile.in: Regenerated.
+ * libc/sys/linux/clock_getres.c: New file.
+ * libc/sys/linux/clock_gettime.c: Ditto.
+ * libc/sys/linux/clock_settime.c: Ditto.
+ * libc/sys/linux/hp-timing.h: Ditto.
+ * libc/sys/linux/libc-internal.h: Ditto.
+ * libc/sys/linux/sysconf.c: Fix typo.
+ * libc/sys/linux/include/time.h: Add include of <sys/linux_time.h>.
+ * libc/sys/linux/machine/hp-timing.h: New file.
+ * libc/sys/linux/machine/i386/Makefile.am: Add new files.
+ * libc/sys/linux/machine/i386/Makefile.in: Regenerated.
+ * libc/sys/linux/machine/i386/get_clockfreq.c: New file.
+ * libc/sys/linux/machine/i386/hp-timing.c: Ditto.
+ * libc/sys/linux/machine/i386/hp-timing.h: Ditto.
+ * libc/sys/linux/sys/linux_time.h: New file.
+ * libc/sys/linux/sys/time.h: Remove include of <linux/time.h> and
+ replace with <sys/linux_time.h>.
+
+Wed Jun 26 16:33:25 2002 J"orn Rennecke <joern.rennecke@superh.com>
+
+ * libc/sys/sh/crt0.S: Remove vestigial .section directive.
+
+2002-06-25 Jeff Johnston <jjohnstn@redhat.com>
+
+ * libc/sys/linux/Makefile.am: Consolidate additional items under
+ ADD_OBJS.
+ * libc/sys/linux/Makefile.in: Regenerated.
+
+2002-06-25 Jeff Johnston <jjohnstn@redhat.com>
+
+ * libc/sys/linux/sethostname.c: New file.
+ * libc/sys/linux/Makefile.am: Add sethostname.c support.
+ * libc/sys/linux/Makefile.in: Regenerated.
+
+2002-06-24 Thomas Fitzsimmons <fitzsim@redhat.com>
+
+ * libc/search/db_local.h: New file.
+ * libc/include/db.h: Remove.
+ * libc/search/Makefile.am (LIB_SOURCES): Add db_local.h.
+ * libc/search/hash.c (MIN,MAX): Add macros. Change <db.h> to
+ "db_local.h".
+ * libc/search/hash_bigkey.c: Likewise.
+ * libc/search/hash_buf.c: Likewise.
+ * libc/search/hash_func.c: Likewise.
+ * libc/search/hash_log2.c: Likewise.
+ * libc/search/hash_page.c: Likewise.
+
+2002-06-24 J"orn Rennecke <joern.rennecke@superh.com>
+
+ * libc/machine/sh/strlen.S: New file.
+ * libc/machine/sh/Makefile.am (lib_a_SOURCES): Add rule for it.
+ * libc/machine/sh/Makefile.am: Regenerate.
+
+2002-06-24 Jeff Johnston <jjohnstn@redhat.com>
+
+ * libc/sys/linux/gethostname.c: Change name to __gethostname and
+ add gethostname alias.
+
+2002-06-24 Jeff Johnston <jjohnstn@redhat.com>
+
+ * libc/include/math.h: Remove <sys/types.h>.
+ (__dmath): Use __ULong instead of __uint32_t.
+ * libc/include/sys/reent.h: If long or int is not 32-bits,
+ include <sys/types.h> to get definitions for __int32_t and __uint32_t.
+ * libc/stdlib/mprec.h: Include <sys/types.h> to get integer defs.
+ * libm/common/fdlibm.h: Ditto.
+
+2002-06-24 Thomas Fitzsimmons <fitzsim@redhat.com>
+
+ * libc/include/ndbm.h: Remove.
+ * libc/search/ndbm.c: Remove.
+
+2002-06-24 WATANABE Hirofumi <eban@os.rim.or.jp>
+
+ * libc/stdio/fseek.c (fseek): Fix braces.
+
+2002-06-21 Corinna Vinschen <corinna@vinschen.de>
+
+ * libc/time/strftime.c (strftime): Add %e format specifier.
+
+2002-06-21 Thomas Fitzsimmons <fitzsim@redhat.com>
+
+ * libc/search/hash.h (LITTLE_ENDIAN, BIG_ENDIAN): Define if not
+ previously defined.
+
+2002-06-21 Richard Earnshaw (rearnsha@arm.com)
+
+ * libc/sys/arm/sys/param.h (BIG_ENDIAN, LITTLE_ENDIAN): Define.
+ (BYTE_ORDER): Define as appropriate for the target.
+
+2002-06-21 Jeff Johnston <jjohnstn@redhat.com>
+
+ * libc/include/sys/config.h[__linux__]: Set _READ_WRITE_RETURN_TYPE
+ to _ssize_t.
+ * libc/sys/linux/io.c (read, write): Change to return ssize_t.
+
+2002-06-21 Jeff Johnston <jjohnstn@redhat.com>
+
+ * libc/include/stdio.h (__getline, __getdelim): New prototypes.
+ * libc/include/time.h [HAVE_GETDATE](getdate, getdate_r): Ditto.
+ [HAVE_GETDATE](getdate_err): New error code.
+ * libc/stdio/Makefile.am: Add support for getline.c and getdelim.c.
+ * libc/stdio/Makefile.in: Regenerated.
+ * libc/stdio/getdelim.c: New file.
+ * libc/stdio/getline.c: Ditto.
+ * libc/sys/linux/Makefile.am: Add support for getdate.c, getdate_err.c
+ and ntp_gettime.c. Also add AM_CFLAGS to point to libc/stdio.
+ * libc/sys/linux/Makefile.in: Regenerated.
+ * libc/sys/linux/getdate.c: New file.
+ * libc/sys/linux/getdate_err.c: Ditto.
+ * libc/sys/linux/ntp_gettime.c: Ditto.
+ * libc/sys/linux/time.c (adjtimex, ntp_adjtime): New functions.
+ * libc/sys/linux/sys/stdio.h (getline, getdelim): New macros.
+
+2002-06-21 Jeff Johnston <jjohnstn@redhat.com>
+
+ * libc/include/math.h: Add <sys/types.h> to get _uint32_t definition.
+ * libc/include/machine/types.h: Skip __off_t, __pid_t, and
+ __loff_t definitions if special _HAVE_SYSTYPES macro defined.
+ * libc/include/sys/config.h: Removed _uint*, _int* definitions.
+ * libc/include/sys/param.h: Remove i386 case which is handled
+ by default case.
+ (BIG_ENDIAN, LITTLE_ENDIAN): Protect
+ definitions in case they are already defined.
+ (BYTE_ORDER): Add default case using _IEEE_BIG_ENDIAN and
+ _IEEE_LITTLE_ENDIAN flags.
+ * libc/include/sys/reent.h: Change __uint32_t references to
+ use _ULong instead.
+ (_REENT_GETDATE_REENT_P): New macro.
+ * libc/include/sys/types.h (__int16_t, __uint16_t): Added.
+ (__int32_t, __uint32_t, __int64_t, __uint64_t): Ditto.
+ * libc/search/hash.h: Add default setting of BYTE_ORDER,
+ LITTLE_ENDIAN, and BIG_ENDIAN, if not already defined.
+ * libc/sys/linux/sys/types.h: Include <sys/_types.h>. Define
+ ssize_t based on _ssize_t. Remove __socklen_t, __uintptr_t,
+ pid_t, off_t, loff_t, caddr_t, and daddr_t type
+ definitions which are done by subsequent glibc headers.
+ Add macro definitions to prevent subsequent header files from
+ defining pid_t, off_t, ssize_t, and key_t. Move uintptr_t and
+ intptr_t to after glibc definitions of types they are based on.
+
+2002-06-21 Jeff Johnston <jjohnstn@redhat.com>
+
+ * libc/include/errno.h: Protect from multiple inclusion.
+
+2002-06-21 Nick Clifton <nickc@cambridge.redhat.com>
+
+ * libc/sys/arm/swi.h (ADP_Stopped_RunTimeError): Set correct value.
+
+2002-06-20 Thomas Fitzsimmons <fitzsim@redhat.com>
+
+ * Makefile.am (LIB_OBJECTLISTS): Add
+ libc/search/objectlist.awk.in.
+ * libc/Makefile.am (SUBDIRS): Add search.
+ (SUBLIBS): Add search/libsearch.la.
+ * libc/configure.in (AC_OUTPUT): Add search/Makefile.
+ * libc/search: New directory.
+ * libc/search/Makefile.am: New file.
+ * libc/search/extern.h: New file.
+ * libc/search/hash.c: New file.
+ * libc/search/hash.h: New file.
+ * libc/search/hash_bigkey.c: New file.
+ * libc/search/hash_buf.c: New file.
+ * libc/search/hash_func.c: New file.
+ * libc/search/hash_log2.c: New file.
+ * libc/search/hash_page.c: New file.
+ * libc/search/hcreate.3: New file.
+ * libc/search/hcreate.c: New file.
+ * libc/search/hcreate_r.c: New file.
+ * libc/search/ndbm.c: New file.
+ * libc/search/page.h: New file.
+ * libc/search/tdelete.c: New file.
+ * libc/search/tdestroy.c: New file.
+ * libc/search/tfind.c: New file.
+ * libc/search/tsearch.3: New file.
+ * libc/search/tsearch.c: New file.
+ * libc/search/twalk.c: New file.
+ * libc/include/db.h: New file.
+ * libc/include/ndbm.h: New file.
+ * libc/include/search.h: New file.
+ * libc/include/sys/queue.h: New file.
+ * libc/include/sys/cdefs.h: New file.
+ * libc/include/sys/param.h
+ [__IEEE_LITTLE_ENDIAN,__IEEE_BIG_ENDIAN]: Set BYTE_ORDER to
+ LITTLE_ENDIAN or BIG_ENDIAN.
+ * libc/include/sys/errno.h (EFTYPE): New macro.
+ * libc/search/bsearch.c: Move from libc/stdlib.
+ * libc/search/qsort.c: Likewise.
+ * libc/stdlib/Makefile.am (LIB_SOURCES): Remove bsearch.c and
+ qsort.c.
+ (CHEWOUT_FILES): Remove bsearch.def and qsort.def.
+ * libc/stdlib/stdlib.tex: Remove references to bsearch and qsort.
+
+2002-06-19 Jeff Johnston <jjohnstn@redhat.com>
+
+ * libc/sys/linux/Makefile.am: Add support for message queue routines,
+ ipc routines, and ftok.
+ * libc/sys/linux/Makefile.in: Regenerated.
+ * libc/sys/linux/ftok.c: New file.
+ * libc/sys/linux/ipc.c: Ditto.
+ * libc/sys/linux/mq_close.c: Ditto.
+ * libc/sys/linux/mq_getattr.c: Ditto.
+ * libc/sys/linux/mq_notify.c: Ditto.
+ * libc/sys/linux/mq_open.c: Ditto.
+ * libc/sys/linux/mq_receive.c: Ditto.
+ * libc/sys/linux/mq_send.c: Ditto.
+ * libc/sys/linux/mq_setattr.c: Ditto.
+ * libc/sys/linux/mq_unlink.c: Ditto.
+ * libc/sys/linux/mqlocal.h: Ditto.
+ * libc/sys/linux/include/mqueue.h: Ditto.
+ * libc/sys/linux/sys/types.h: Define __gid_t_defined and
+ __uid_t_defined.
+
+2002-06-19 J"orn Rennecke <joern.rennecke@superh.com>
+
+ * libm/common/sf_lround.c (round): Change name to: (lround).
+ * libm/common/sf_remquo.c (remquo): Pass all arguemnts to
+ remquof.
+
+2002-06-18 Thomas Fitzsimmons <fitzsim@redhat.com>
+
+ * testsuite/lib/passfail.exp (newlib_pass_fail_all): New
+ procedure.
+ (newlib_pass_fail): Change to compile and run only one file.
+ * testsuite/newlib.locale/locale.exp: Use new
+ newlib_pass_fail_all procedure.
+ * testsuite/newlib.string/string.exp: Likewise.
+
+2002-06-18 Dave Brolley <brolley@redhat.com>
+
+ From Catherine Moore, Michael Meissner, Richard Sandiford:
+ * libc/include/machine/setjmp.h (_JBLEN): Define for __frv__.
+ (_JBTYPE): Ditto.
+ * libc/include/sys/config.h (__IEEE_BIG_ENDIAN): Ditto.
+ (__ATTRIBUTE_IMPURE_PTR__): Ditto.
+ * libc/include/machine/ieeefp.h (__IEEE_BIG_ENDIAN): Ditto.
+ * configure.host: Support frv-*-*.
+ * libc/machine/frv/Makefile.am: New file.
+ * libc/machine/frv/configure.in: New file.
+ * libc/machine/frv/setjmp.S: New file.
+
+2002-06-18 Thomas Fitzsimmons <fitzsim@redhat.com>
+
+ * libc/include/ctype.h: Remove isblank macro.
+
+ * libc/ctype/Makefile.am (LIB_SOURCES): Add isblank.c.
+ * libc/ctype/isblank.c: New file.
+ * libc/include/ctype.h [!__STRICT_ANSI__]: Add isblank
+ declaration. Add isblank macro.
+
+2002-06-18 Jeff Johnston <jjohnstn@redhat.com>
+
+ * testsuite/newlib.stdlib/atexit.c: New file.
+ * testsuite/newlib.stdlib/atexit.exp: Ditto.
+ * testsuite/newlib.string/tstring.c: Change default start size
+ to something more reasonable for embedded platforms.
+
+2002-06-14 Thomas Fitzsimmons <fitzsim@redhat.com>
+
+ * libc/sys/linux/sys/errno.h (EFTYPE): Add macro.
+
+ * libc/argz: New directory.
+ * libc/argz/*: New files.
+ * libc/argz/argz_add.c: New file.
+ * libc/argz/argz_add_sep.c: New file.
+ * libc/argz/argz_append.c: New file.
+ * libc/argz/argz_count.c: New file.
+ * libc/argz/argz_create.c: New file.
+ * libc/argz/argz_create_sep.c: New file.
+ * libc/argz/argz_delete.c: New file.
+ * libc/argz/argz_extract.c: New file.
+ * libc/argz/argz_insert.c: New file.
+ * libc/argz/argz_next.c: New file.
+ * libc/argz/argz_replace.c: New file.
+ * libc/argz/argz_stringify.c: New file.
+ * libc/argz/buf_findstr.c: New file.
+ * libc/argz/envz_add.c: New file.
+ * libc/argz/envz_entry.c: New file.
+ * libc/argz/envz_get.c: New file.
+ * libc/argz/envz_merge.c: New file.
+ * libc/argz/envz_remove.c: New file.
+ * libc/argz/envz_strip.c: New file.
+ * libc/include/argz.h: New file.
+ * libc/include/envz.h: New file.
+ * Makefile.am (LIBC_OBJECTLISTS): Add
+ libc/argz/objectlist.awk.in.
+ * libc/Makefile.am (SUBDIRS): Add argz.
+ (SUBLIBS): Add argz/libargz.la.
+ * libc/configure.in (AC_OUTPUT): Add argz/Makefile.
+ * libc/include/errno.h: Add error_t typedef.
+
+2002-06-13 Jeff Johnston <jjohnstn@redhat.com>
+
+ * libc/include/stdlib.h: Add _Exit prototype.
+ * libc/stdlib/Makefile.am: Add _Exit.c support.
+ * libc/stdlib/Makefile.in: Ditto.
+ * libc/stdlib/_Exit.c: New file.
+
+2002-06-13 Stephen L. Moshier <steve@moshier.net>
+
+ * libm/math/e_pow.c (__ieee754_pow): Fix case whereby
+ x is close to -1.0 and y is very large to use ax (absolute value)
+ instead of x.
+ * libm/math/ef_pow.c (__ieee754_powf): Ditto.
+
+Thu Jun 13 19:23:40 2002 J"orn Rennecke <joern.rennecke@superh.com>
+
+ * libc/machine/sh/strcpy.S (strcpy, __SHMEDIA__ code):
+ Fix clobbering bytes before destination if src and dst have same
+ non-zero misalignment.
+
+ * libc/machine/sh/memset.S (memset, __SHMEDIA__ code):
+ Fixed bug in writing end of set region.
+
+2002-06-10 Christopher Faylor <cgf@redhat.com>
+
+ * libc/include/process.h: Remove cygwin-only sexec* declarations. Fix
+ spawnve declaration.
+
+2002-06-06 Thomas Fitzsimmons <fitzsim@redhat.com>
+
+ * libm/common/s_fdim.c: New file.
+ * libm/common/s_fma.c: Likewise.
+ * libm/common/s_fmax.c: Likewise.
+ * libm/common/s_fmin.c: Likewise.
+ * libm/common/s_fpclassify.c: Likewise.
+ * libm/common/s_lrint.c: Likewise.
+ * libm/common/s_lround.c: Likewise.
+ * libm/common/s_nearbyint.c: Likewise.
+ * libm/common/s_remquo.c: Likewise.
+ * libm/common/s_round.c: Likewise.
+ * libm/common/s_scalbln.c: Likewise.
+ * libm/common/s_signbit.c: Likewise.
+ * libm/common/s_trunc.c: Likewise.
+ * libm/common/sf_fdim.c: Likewise.
+ * libm/common/sf_fma.c: Likewise.
+ * libm/common/sf_fmax.c: Likewise.
+ * libm/common/sf_fmin.c: Likewise.
+ * libm/common/sf_lrint.c: Likewise.
+ * libm/common/sf_lround.c: Likewise.
+ * libm/common/sf_nearbyint.c: Likewise.
+ * libm/common/sf_remquo.c: Likewise.
+ * libm/common/sf_round.c: Likewise.
+ * libm/common/sf_scalbln.c: Likewise.
+ * libm/common/sf_trunc.c: Likewise.
+ * libm/math/w_exp2.c: Likewise.
+ * libm/math/w_tgamma.c: Likewise.
+ * libm/math/wf_exp2.c: Likewise.
+ * libm/math/wf_tgamma.c: Likewise.
+ * libm/mathfp/s_exp2.c: Likewise.
+ * libm/mathfp/s_tgamma.c: Likewise.
+ * libm/mathfp/sf_exp2.c: Likewise.
+ * libm/mathfp/sf_tgamma.c: Likewise.
+ * libm/math/er_gamma.c: Fix return value.
+ * libm/math/erf_gamma.c: Likewise.
+ * libm/mathfp/er_gamma.c: Likewise.
+ * libm/mathfp/erf_gamma.c: Likewise.
+ * libc/include/math.h (!__STRICT_ANSI__): Include ISOC99-specific
+ declarations and macros.
+ Regenerated all Makefile.in, aclocal.m4 and configure files to
+ use new libtool macros in top-level libtool.m4
+
+2002-06-05 Jeff Johnston <jjohnstn@redhat.com>
+
+ * libc/include/string.h[__linux__]: Add strsignal prototype.
+ * libc/include/sys/lock.h: New file with default locking support.
+ * libc/include/sys/reent.h: Add signal buffer support for strsignal
+ and psignal.
+ * libc/posix/Makefile.am: Add support for readdir_r.c.
+ * libc/posix/Makefile.in: Regenerated.
+ * libc/posix/closedir.c: Add locking support and hash table cleanup.
+ * libc/posix/opendir.c: Add lock support.
+ * libc/posix/readdir.c: Ditto.
+ * libc/posix/rewinddir.c: Ditto.
+ * libc/posix/scandir.c: Ditto.
+ * libc/posix/seekdir.c: Ditto.
+ * libc/posix/telldir.c: Ditto plus add _cleanupdir routine to
+ clean up leftover hash table entries.
+ * libc/posix/readdir_r.c: New file.
+ * libc/sys/linux/Makefile.am: Add psignal.c and strsignal.c support.
+ * libc/sys/linux/Makefile.in: Regenerated.
+ * libc/sys/linux/sys/dirent.h: Add dd_lock to DIR structure.
+ * libc/sys/linux/sys/signal.h: Add psignal prototype.
+ * libc/sys/linux/psignal.c: New file.
+ * libc/sys/linux/strsignal.c: Ditto.
+
+2002-06-03 Corinna Vinschen <corinna@vinschen.de>
+
+ * libc/include/sys/types.h: Don't define dev_t when compiling for
+ Cygwin.
+
+2002-05-31 Jeff Johnston <jjohnstn@redhat.com>
+
+ * libc/sys/linux/Makefile.am: Add sig.c and sigaction.c. Also
+ make siglist.inc dependent on sig.c instead of signal.c.
+ * libc/sys/linux/Makefile.in: Regenerated.
+ * libc/sys/linux/sig.c: Rename from signal.c and change code to
+ use NSIG instead of _NSIG.
+ * libc/sys/linux/sigaction.c: New file.
+ * libc/sys/linux/signal.c: Changed to be linux signal() function
+ so as to override regular newlib default signal.c.
+ * libc/sys/linux/machine/i386/Makefile.am: Remove sigset.c.
+ * libc/sys/linux/machine/i386/Makefile.in: Regenerated.
+ * libc/sys/linux/machine/i386/sigset.c: Moved to linux main directory.
+ * libc/sys/linux/sigset.c: Moved from machine/i386 directory.
+ * libc/sys/linux/sys/signal.h: Redefine NSIG to _NSIG and override
+ default linux sigset_t typedef by defining it equal to __sigset_t.
+ * libc/unix/sigset.c: Add check so code isn't compiled on systems
+ with a sigset_t that isn't implemented with a single int.
+
+2002-05-30 Jeff Johnston <jjohnstn@redhat.com>
+
+ * libc/sys/linux/Makefile.am: Add support for new files.
+ * libc/sys/linux/Makefile.in: Regenerated.
+ * libc/sys/linux/ids.c: Add __getuid weak alias for getuid.
+ * libc/sys/linux/signal.c: Change to use real-time syscalls for
+ sigsuspend, sigprocmask, and sigpending. Also remove sigaction as
+ it is in a separate file now.
+ * libc/sys/linux/machine/i386/Makefile.am
+ * libc/sys/linux/machine/i386/Makefile.in
+ * libc/sys/linux/sys/signal.h: Add include of <bits/signum.h>.
+ * libc/sys/linux/sigaction.c: New file.
+ * libc/sys/linux/sigqueue.c: Ditto.
+ * libc/sys/linux/sigwait.c: Ditto.
+ * libc/sys/linux/machine/i386/sigaction.c: Ditto.
+ * libc/sys/linux/kernel_sigaction.h: Ditto.
+
+2002-05-28 Jeff Johnston <jjohnstn@redhat.com>
+
+ * libc/sys/linux/Makefile.am: Add support for cfspeed.c and
+ tcsendbrk.c.
+ * libc/sys/linux/Makefile.in: Regenerated.
+ * libc/sys/linux/termios.c: Add tcflow(), tcflush(),
+ tcgetpgrp(), and tcsetpgrp() functions.
+ * libc/sys/linux/sys/termios.h: Add include of machine/termios.h
+ to get __MAX_BAUD rate.
+ * libc/sys/linux/machine/i386/include/termios.h: New file.
+ * libc/include/machine/termios.h: Ditto.
+ * libc/sys/linux/cfspeed.c: Ditto.
+ * libc/sys/linux/tcsendbrk.c: Ditto.
+
+2002-05-24 Jeff Johnston <jjohnstn@redhat.com>
+
+ * libc/include/string.h: Add strnlen and strerror_r prototypes.
+ * libc/string/Makefile.am: Add strnlen.c and strerror_r.c support.
+ * libc/string/Makefile.in: Regenerated.
+ * libc/string/strerror_r.c: New file.
+ * libc/string/strnlen.c: New file.
+ * libc/sys/linux/Makefile.am: Add rename.c.
+ * libc/sys/linux/Makefile.in: Regenerated.
+ * libc/sys/linux/rename.c: New file to override default rename.
+
+2002-05-24 Thomas Fitzsimmons <fitzsim@redhat.com>
+
+ * libc/sys/linux/sys/cdefs.h: Add __weak_reference macros.
+ * libc/sys/linux/sys/time.h: Add conversion macros.
+ * libc/sys/linux/sys/types.h: Add FD_ macros. Include <bits/types.h>.
+ * libc/sys/linux/ids.c: Add setresuid and syslog syscalls.
+ * libc/sys/linux/gethostname.c: New file.
+ * libc/sys/linux/seteuid.c: New file.
+ * libc/sys/linux/sysctl.c: New file.
+
+2002-05-23 Jeff Johnston <jjohnstn@redhat.com>
+
+ * libc/string/Makefile.am: Add support for strsep.c.
+ * libc/string/Makefile.in: Regenerated.
+ * libc/string/strsep.c: New file.
+ * libc/string/strtok.c: Change to call __strtok_r service routine.
+ * libc/string/strtok_r.c: Add __strtok_r routine which takes
+ additional flag parameter regarding whether to skip leading delimeters.
+ Change strtok_r to call __strtok_r.
+
+2002-05-23 Gareth Pearce <tilps@hotmail.com>
+
+ * libc/stdio/Makefile.am: Modify to add setbuffer.c and setlinebuf.c.
+ * libc/stdio/Makefile.in: Regenerated.
+ * libc/stdio/setbuffer.c: New file.
+ * libc/stdio/setlinebuf.c: New file.
+
+2002-05-23 Jeff Johnston <jjohnstn@redhat.com>
+
+ * libc/sys/linux/Makefile.am: Add resource.c.
+ * libc/sys/linux/Makefile.in: Regenerated.
+ * libc/sys/linux/resource.c: New file.
+ * libc/sys/linux/time.c: Add settimeofday, getitimer, and setitimer.
+ * libc/sys/linux/machine/i386/Makefile.am: Remove syscalls.c.
+ * libc/sys/linux/machine/i386/Makefile.in: Regenerated.
+ * libc/sys/linux/machine/i386/syscalls.c: Removed as functions
+ are now found in libc/sys/linux/resource.c.
+
+2002-05-23 Jeff Johnston <jjohnstn@redhat.com>
+
+ * libc/include/string.h (bcmp, bcopy, bzero): Change prototypes
+ to use void * pointers and comply with Single Unix spec.
+ * libc/string/bcmp.c: Change to use void * instead of char *.
+ * libc/string/bcopy.c: Ditto.
+ * libc/string/bzero.c: Ditto.
+
+2002-05-22 Jeff Johnston <jjohnstn@redhat.com>
+
+ * libc/sys/linux/shm_open.c: New file.
+ * libc/sys/linux/shm_unlink.c: Ditto.
+ * libc/sys/linux/Makefile.am: Add support for shm_open.c and
+ shm_unlink.c.
+ * libc/sys/linux/Makefile.in: Regenerated.
+ * libc/sys/linux/sys/types.h: Add some additional checks to see
+ if clock_t or time_t is already defined.
+
+2002-05-22 Jeff Johnston <jjohnstn@redhat.com>
+
+ * Makefile.am: Don't pass $toollibdir down directly in
+ AM_MAKEFLAGS as it causes all multilibs to use the same toollibdir.
+ Pass it under the name: top_toollibdir.
+ * Makefile.in: Regenerated.
+
+2002-05-22 Corinna Vinschen <vinschen@redhat.com>
+
+ * libc/include/sys/types.h: Revert previous patch.
+
+2002-05-22 Corinna Vinschen <vinschen@redhat.com>
+
+ * libc/include/sys/types.h: Include cygwin/types.h always under
+ Cygwin, not only if _POSIX_THREADS is defined.
+
+2002-05-21 Dhananjay Deshpande <dhananjayd@kpit.com>
+
+ * configure.host: Specify sys_dir=h8300hms for h8300-*-coff* target.
+
+2002-05-17 Jeff Johnston <jjohnstn@redhat.com>
+
+ * Makefile.am: Copy and install headers from sys/machine/include
+ directory. Also pass $toollibdir to lower-level directories.
+ * Makefile.in: Regenerated.
+ * libc/include/stdio.h[!_REENT_ONLY]: Change stdin, stdout, and
+ stderr to use _REENT macro instead of _impure_ptr directly.
+ * libc/include/sys/config.h[__i386__][__linux__]: Define
+ __DYNAMIC_REENT__.
+ * libc/include/sys/reent.h[!_REENT_ONLY]: Change _REENT macro to be
+ call to __getreent() function if !__SINGLE_THREAD__ and
+ __DYNAMIC_REENT__ is set.
+ * libc/reent/Makefile.am: Add support for getreent.c.
+ * libc/reent/Makefile.in: Regenerated.
+ * libc/string/strerror.c: Add check if EOPNOTSUPP and ENOTSUP are same.
+ * libc/sys/linux/Makefile.am: Add support for new files.
+ * libc/sys/linux/configure.in: Add $EXTRA_DIRS variable.
+ * libc/sys/linux/Makefile.in: Regenerated.
+ * libc/sys/linux/configure: Ditto.
+ * libc/sys/linux/io.c: Add poll syscall. Also weak-alias
+ __close, __read, __write, __poll, __open, __lseek, __fcntl from
+ their __libc_ counterparts.
+ * libc/sys/linux/io64.c: Add __libc_ prefix to lseek64 and open64
+ and weak-alias to regular names.
+ * libc/sys/linux/pread64.c: Rename to __libc_pread64 and weak-alias
+ to pread64 and __pread64.
+ * libc/sys/linux/process.c: Weak_alias __libc_getpid to __getpid.
+ * libc/sys/linux/pwrite64.c: Rename to __libc_pwrite64 and
+ weak-alias to pwrite64.
+ * libc/sys/linux/sched.c: Weak-alias __libc_sched_getparam,
+ __libc_sched_getscheduler, __libc_sched_get_priority_max,
+ __libc_sched_get_priority_min, and __libc_sched_setschedule to
+ name with __ instead of __libc_.
+ * libc/sys/linux/siglongjmp.c: Include <machine/weakalias.h>.
+ Rename siglongjmp to __libc_siglongjmp and weak-alias to siglongjmp.
+ Call __libc_longjmp instead of longjmp, from __libc_siglongjmp.
+ * libc/sys/linux/signal.c: Rename raise to __libc_raise and weak-alias
+ to raise.
+ * libc/sys/linux/socket.c: Weak-alias __libc_connect to __connect and
+ __libc_send to __send.
+ * libc/sys/linux/time.c: Weak-alias __libc_gettimeofday to
+ __gettimeofday.
+ * libc/sys/linux/wait.c: Rename wait to __libc_wait and weak-alias
+ it to wait. Rename wait3 to __libc_wait3 and weak-alias it to wait3.
+ * libc/sys/linux/include/setjmp.h: Use __jmp_buf in sigjmp_buf
+ type and typedef __jmp_buf to jmp_buf.
+ * libc/sys/linux/machine/i386/Makefile.am: Add syscalls.c and
+ setjmp.S.
+ * libc/sys/linux/machine/i386/Makefile.in: Regenerated.
+ * libc/sys/linux/machine/i386/crt0.c: Add support to clear .bss
+ section.
+ * libc/sys/linux/machine/i386/socketcall.h: Change to use __libc_
+ prefix for function macros and then use weak_alias() to regular names.
+ * libc/sys/linux/machine/i386/syscall.h: Ditto.
+ * libc/sys/linux/sys/errno.h: Define EOPNOTSUP to be ENOTSUP.
+ * libc/sys/linux/sys/stdio.h: Define _flockfile and _funlockfile
+ to be flockfile() and funlockfile() respectively.
+ * libc/sys/linux/sys/types.h
+ * libc/reent/getreent.c: New file.
+ * libc/sys/linux/flockfile.c: Ditto.
+ * libc/sys/linux/funlockfile.c: Ditto.
+ * libc/sys/linux/getreent.c: Ditto.
+ * libc/sys/linux/pread.c: Ditto.
+ * libc/sys/linux/pwrite.c: Ditto.
+ * libc/sys/linux/raise.c: Ditto.
+ * libc/sys/linux/system.c: Ditto.
+ * libc/sys/linux/tcdrain.c: Ditto.
+ * libc/sys/linux/machine/i386/i386mach.h: Ditto.
+ * libc/sys/linux/machine/i386/setjmp.S: Ditto.
+ * libc/sys/linux/machine/i386/syscalls.c: Ditto.
+ * libc/sys/linux/machine/i386/weakalias.h: Ditto.
+ * libc/sys/linux/machine/i386/include/setjmp.h: Ditto.
+
+2002-05-14 Dhananjay Deshpande <dhananjayd@kpit.com>
+
+ * newlib/libc/sys/h8300hms/Makeile.am (lib_a_SOURCES): Add read.c.
+ * newlib/libc/sys/h8300hms/read.c: New file. Magic trap 0xC8 for sim.
+ * newlib/libc/sys/h8300hms/syscalls.c: Move _read() to read.c.
+ * newlib/libs/sys/h8300hms/sys/syscall.h: New file.
+
+Thu May 16 17:24:57 2002 J"orn Rennecke <joern.rennecke@superh.com>
+
+ * libc/machine/sh/strcpy.S (strcpy): Replace LITTLE_ENDIAN with
+ __LITTLE_ENDIAN__. make sure r0 has right value at first loop
+ exit point.
+
+2002-05-15 Thomas Fitzsimmons <fitzsim@redhat.com>
+
+ * testsuite/lib/newlib.exp: Add newlib_include_flags to compile
+ options when testing natively on i[3456]86-*-linux.
+
+ * testsuite/lib/checkoutput.exp (newlib_check_output): Output
+ only one pass or fail per test file. Trim \r's from output
+ values received from test programs. Remove support for named
+ tests.
+ * testsuite/newlib.locale/UTF-8.exp: Update to support new
+ newlib_check_output behaviour.
+ * testsuite/newlib.locale/UTF-8.c: Likewise.
+
+2002-05-15 Jeff Johnston <jjohnstn@redhat.com>
+
+ * libc/include/stdlib.h: Add on_exit prototype.
+ * libc/include/sys/reent.h (struct _atexit): Add argument array
+ and bits to track type of exit routine to support both on_exit
+ and atexit.
+ (_REENT_INIT_PTR): Add missing fields that won't be zeroed out
+ by default and change the setting of the atexit structure.
+ (_REENT_INIT)[!_REENT_SMALL]: Remove extraneous end brace.
+ * libc/stdlib/on_exit.c: New file.
+ * libc/stdlib/Makefile.am: Add support for on_exit.
+ * libc/stdlib/Makefile.in: Regenerated.
+ * libc/stdlib/atexit.c: Change to initialize types field.
+ * libc/stdlib/exit.c: Change to look at types field for each
+ exit routine and either call an atexit-style or an on_exit-style
+ routine accordingly.
+
+2002-05-13 Jeff Johnston <jjohnstn@redhat.com>
+
+ * libc/machine/powerpc/vfprintf.c(__VFPRINTF_R)[__ALTIVEC__]: Don't
+ allow v specifier with n or L specifiers. For vector c format,
+ move tmp declaration to the top.
+
+2002-05-13 Jeff Johnston <jjohnstn@redhat.com>
+
+ * libc/machine/powerpc/vfprintf.c(__VFPRINTF_R)[__ALTIVEC__]: Restore
+ the original format specifier when looping for vectors to compensate
+ for any changes made in vector %g format processing.
+ Also add syntax checking for various invalid scenarios
+ involving vector format extensions.
+ * libc/machine/powerpc/vfscanf.c(__VFSCANF_R)[__ALTIVEC__]: Fix
+ return code setting for vector formats. Also treat vector
+ separator mismatch as a match error instead of an input error.
+ Perform some syntax checking for vector formats.
+
+2002-05-10 Mark Bradshaw <bradshaw@staff.crosswalk.com>
+
+ * libc/include/string.h (!__STRICT_ANSI__): Add strlcat and strlcpy.
+ * libc/string/Makefile.am: Add strlcat.c and strlcpy.c.
+ * libc/string/strlcat.c: New file.
+ * libc/string/strlcpy.c: New file.
+
+2002-05-10 Jeff Johnston <jjohnstn@redhat.com>
+
+ * libc/string/strchr.c: Fix comment typo.
+
+2002-05-08 Thomas Fitzsimmons <fitzsim@redhat.com>
+
+ * acinclude.m4: Add support for --enable-newlib-multithread.
+ * configure.host (newlib_cflags): Add -D__SINGLE_THREAD__ if
+ --enable-newlib-multithread=no.
+
+ * libc/stdio/getc_u.c: New file.
+ * libc/stdio/getchar_u.c: New file.
+ * libc/stdio/putc_u.c: New file.
+ * libc/stdio/putchar_u.c: New file.
+ * libc/include/stdio.h: Add declarations for getc_unlocked,
+ getchar_unlocked, putc_unlocked and putchar_unlocked.
+ * libc/stdio/Makefile.am (LIB_SOURCES): Add new files.
+ (CHEWOUT_FILES): Add new files' .def's.
+ * libc/stdio/putchar.c (_putchar_r): Replace __sputc with putc.
+
+Wed May 8 17:47:35 2002 J"orn Rennecke <joern.rennecke@superh.com>
+
+ * libc/machine/sh/memset.S (memset, __SHMEDIA__ code):
+ Also handle as single quad word when destination ends at last
+ byte of first quad word. Fix byte selection in single quad code.
+
+2002-05-07 Thomas Fitzsimmons <fitzsim@redhat.com>
+
+ * libc/include/sys/stdio.h: New file.
+ * libc/sys/linux/sys/stdio.h: New file.
+ * libc/include/stdio.h: Add declarations for flockfile,
+ ftrylockfile, and funlockfile. Include <sys/stdio.h>.
+ * libc/stdio/clearerr.c: Add file locking.
+ * libc/stdio/fclose.c: Likewise.
+ * libc/stdio/feof.c: Likewise.
+ * libc/stdio/ferror.c: Likewise.
+ * libc/stdio/fflush.c: Likewise.
+ * libc/stdio/fgetc.c: Likewise.
+ * libc/stdio/fgetpos.c: Likewise.
+ * libc/stdio/fgets.c: Likewise.
+ * libc/stdio/fileno.c: Likewise.
+ * libc/stdio/fputc.c: Likewise.
+ * libc/stdio/fputs.c: Likewise.
+ * libc/stdio/fread.c: Likewise.
+ * libc/stdio/freopen.c: Likewise.
+ * libc/stdio/fseek.c: Likewise.
+ * libc/stdio/ftell.c: Likewise.
+ * libc/stdio/fwrite.c: Likewise.
+ * libc/stdio/getc.c: Likewise.
+ * libc/stdio/putc.c: Likewise.
+ * libc/stdio/setvbuf.c: Likewise.
+ * libc/stdio/ungetc.c: Likewise.
+ * libc/stdio/vfprintf.c: Likewise.
+
+2002-05-06 Jeff Johnston <jjohnstn@redhat.com>
+
+ * libc/machine/powerpc/vfprintf.c[__ALTIVEC__]: Add vector
+ support for 'p' format. Fix code to print bytes for vector
+ integer formats that do not specify 'h' or 'l'.
+ * libc/machine/powerpc/vfscanf.c[__ALTIVEC__]: Add vector support
+ for 'p' specifier. Fix code to scan 16 bytes for vector integer
+ formats that do not specify 'h' or 'l'.
+
+ * libc/include/stdlib.h (a64l, l64a, _l64a_r): Added prototypes.
+
+2002-05-06 Nick Clifton <nickc@cambridge.redhat.com>
+
+ * libc/sys/arm/syscalls.c (_rename): Add parameter names.
+ (_sbrk): Add cast of return value.
+
+2002-05-06 Jeff Johnston <jjohnstn@redhat.com>
+
+ * libc/include/sys/reent.h (_l64a_buf): New reentrant area.
+ (_REENT_L64A_BUF): New macro for accessing area.
+ * libc/stdlib/Makefile.am: Add a64l.c and l64a.c.
+ * libc/stdlib/Makefile.in: Regenerated.
+ * libc/stdlib/a64l.c: New file.
+ * libc/stdlib/l64a.c: New file.
+
+2002-05-06 Jeff Johnston <jjohnstn@redhat.com>
+
+ * libc/unix/pread.c: Fix typo for _pread_r.
+ * libc/unix/pwrite.c: Fix type for _pwrite_r.
+ * libc/sys/linux/pread64.c: Fix typo for read syscall.
+ * libc/sys/linux/pwrite64.c: Fix typo for write syscall.
+
+2002-05-03 Christopher Faylor <cgf@redhat.com>
+
+ * libc/include/sys/unistd.h: Define getdomainname under cygwin.
+
+2002-05-03 Thomas Fitzsimmons <fitzsim@redhat.com>
+
+ * configure.in (CC_FOR_NEWLIB): Change -isystem's to -I's.
+
+2002-05-01 Christopher Faylor <cgf@redhat.com>
+
+ * utmp.h: Define more UNIX constants.
+
+2002-05-01 Thomas Fitzsimmons <fitzsim@redhat.com>
+
+ * Makefile.am: Add support for checking multilibs.
+
+ * libc/Makefile.am (SUBLIBS): Add LIBC_EXTRA_LIB.
+ (SUBDEFS): Add LIBC_EXTRA_DEF.
+ * libc/configure.in (LIBC_EXTRA_LIB): New variable.
+ (LIBC_EXTRA_DEF): Likewise.
+ (extra_dir): Likewise.
+ * libc/machine/xscale/machine: New directory.
+ * libc/machine/xscale/machine/profile.h: New file.
+
+ * Makefile.am (site.exp): Remove newlib_cflags. Add
+ multibuildtop.
+ * testsuite/newlib.locale/UTF-8.c: Change fprintf's to printf's.
+ * testsuite/lib/flags.exp: New file.
+ * testsuite/lib/newlib.exp: Load flags.exp.
+ (newlib_target_compile): Remove libgloss directory references.
+ (newlib_init): Remove newlib_cflags references.
+
+2002-04-30 Thomas Fitzsimmons <fitzsim@redhat.com>
+
+ * testsuite/lib/newlib.exp (newlib_target_compile): Change
+ method of finding libgloss_target_dir.
+
+ * Makefile.am (site.exp): Change host_alias, host_triplet,
+ target_alias, target_triplet to refer to gcc's host and target
+ variables (newlib's build and host variables).
+ * testsuite/lib/newlib.exp (newlib_init): Change build
+ references to host references, host references to target
+ references to reflect Makefile.am changes.
+ (newlib_target_compile): Likewise.
+ (newlib_finish): Likewise.
+
+2002-04-29 Jeff Johnston <jjohnstn@redhat.com>
+
+ * libc/sys/linux/io64.c (fstat64, lstat64): New syscalls added.
+
+2002-04-29 Jonathan Larmour <jlarmour@redhat.com>
+
+ * libc/sys/arm/syscalls.c (_rename): New function. Just a stub.
+ (_system): New function. Ditto.
+ * libc/stdlib/system.c (_system_r): Call _system if HAVE_SYSTEM.
+ * configure.host: define HAVE_SYSTEM and HAVE_RENAME for xscale
+ targets.
+
+2002-04-29 Jeff Johnston <jjohnstn@redhat.com>
+
+ * libc/include/sys/unistd.h (pread, pwrite): Added prototypes.
+ * libc/unix/Makefile.am: Add pread.c and pwrite.c.
+ * libc/sys/linux/Makefile.am: Add pread64.c and pwrite64.c.
+ * libc/sys/linux/Makefile.in: Regenerated.
+ * libc/unix/Makefile.in: Ditto.
+ * libc/sys/linux/pread64.c: New file.
+ * libc/sys/linux/pwrite64.c: Ditto.
+ * libc/unix/pread.c: Ditto.
+ * libc/unix/pwrite.c: Ditto.
+
+2002-04-26 Jeff Johnston <jjohnstn@redhat.com>
+
+ * libc/sys/linux/Makefile.am: Add io64.c.
+ * libc/sys/linux/Makefile.in: Regenerated.
+ * libc/sys/linux/io.c(mkfifo, fsync, fdatasync): Added syscalls.
+ * libc/sys/linux/signal.c (sigwaitinfo, sigtimedwait): Ditto.
+ * libc/sys/linux/io64.c: New file.
+
+2002-04-26 Jeff Johnston <jjohnstn@redhat.com>
+
+ * configure.in (CC_FOR_NEWLIB): New variable that
+ bases on $(CC) and adds targ-include and libc/include as
+ -isystem directives if they are not already part of $(CC).
+ * Makefile.am (AM_MAKEFLAGS): Change setting of CC to equal
+ $(CC_FOR_NEWLIB).
+ * configure: Regenerated.
+ * Makefile.in: Ditto.
+
+2002-04-25 Jeff Johnston <jjohnstn@redhat.com>
+
+ * libc/sys/linux/Makefile.am: Add support for sched.c.
+ * libc/sys/linux/Makefile.in: Regenerated.
+ * libc/sys/linux/sched.c: New file.
+ * libc/sys/linux/sys/types.h: Add struct timespec.
+
+2002-04-25 Thomas Fitzsimmons <fitzsim@redhat.com>
+
+ * configure.in (CC_FOR_BUILD): Set to gcc whether
+ cross-compiling or not.
+ (CC): Add -isystem's for targ-include and libc/include when they
+ do not already appear in CC.
+
+2002-04-24 Thomas Fitzsimmons <fitzsim@redhat.com>
+
+ * Makefile.am (check-DEJAGNU): New target.
+ (site.exp): Likewise.
+ * acinclude.m4 (NEWLIB_CONFIGURE): Replace AC_CANONICAL_HOST
+ with AC_CANONICAL_SYSTEM. Remove AC_CANONICAL_BUILD.
+ * libc/locale/locale.c (_setlocale_r): Add UTF-8 support.
+ * libc/stdlib/mbtowc_r.c (_mbtowc_r): Likewise.
+ * libc/stdlib/wctomb_r.c (_wctomb_r): Likewise.
+ * testsuite: New directory.
+ * testsuite/config: Likewise.
+ * testsuite/lib: Likewise.
+ * testsuite/newlib.locale: Likewise.
+ * testsuite/newlib.string: Likewise.
+ * testsuite/config/default.exp: New file.
+ * testsuite/lib/checkoutput.exp: New file.
+ * testsuite/lib/newlib.exp: New file.
+ * testsuite/lib/passfail.exp: New file.
+ * testsuite/newlib.locale/UTF-8.c: New file.
+ * testsuite/newlib.locale/UTF-8.exp: New file.
+ * testsuite/newlib.locale/locale.exp: New file.
+ * testsuite/newlib.string/string.exp: New file.
+ * testsuite/newlib.string/tstring.c: New file.
+
+2002-04-23 Jeff Johnston <jjohnstn@redhat.com>
+
+ * libc/include/machine/types.h (__pid_t, __off_t, __loff_t): Added.
+ * libc/sys/linux/Makefile.am: Add support for mmap.c.
+ * libc/sys/linux/Makefile.in: Regenerated.
+ * libc/sys/linux/mmap.c: New file.
+ * libc/sys/linux/machine/i386/syscall.h: Add _syscall6 macro.
+ * libc/sys/linux/sys/types.h (pid_t, off_t, loff_t): Added.
+
+2002-04-22 Thomas Fitzsimmons <fitzsim@redhat.com>
+
+ * acinclude.m4 (newlib_cflags): Remove include directories that
+ are already specified in the top-level configure.in's FLAGS_FOR_TARGET.
+
+2002-04-19 Bill Siegmund <ctc-dsl@pacbell.net>
+
+ * libc/machine/xscale/memchr.c: Don't use multi-line strings.
+ * libc/machine/xscale/memcmp.c: Ditto.
+ * libc/machine/xscale/memcpy.c: Ditto.
+ * libc/machine/xscale/memmove.c: Ditto.
+ * libc/machine/xscale/memset.c: Ditto.
+ * libc/machine/xscale/strchr.c: Ditto.
+ * libc/machine/xscale/strcmp.c: Ditto.
+ * libc/machine/xscale/strcpy.c: Ditto.
+ * libc/machine/xscale/strlen.c: Ditto.
+
+2002-04-19 Alexandre Oliva <aoliva@redhat.com>
+
+ * libc/include/sys/config.h: Remove include of <limits.h>.
+ (__INT_MAX__, __LONG_MAX__): Define like GCC's limits.h would
+ define INT_MAX and LONG_MAX. Use them in tests.
+
+2002-04-19 Jeff Johnston <jjohnstn@redhat.com>
+
+ * configure.host: Add support for powerpc-eabialtivec*.
+ * libc/include/malloc.h: Add include of <machine/malloc.h>.
+ * libc/include/stdlib.h: Add include of <machine/stdlib.h>.
+ * libc/include/machine/malloc.h: New file.
+ * libc/include/machine/stdlib.h: Ditto.
+ * libc/include/machine/setjmp.h: Add support for powerpc altivec.
+ * libc/machine/powerpc/Makefile.am: Add conditional objects and
+ sources based on configuration.
+ * libc/machine/powerpc/Makefile.in: Regenerated.
+ * libc/machine/powerpc/configure: Ditto.
+ * libc/machine/powerpc/configure.in: Add check for
+ powerpc-eabialtivec* in which case add in additional source files.
+ * libc/machine/powerpc/setjmp.S: Add altivec support.
+ * libc/machine/powerpc/vec_calloc.c: New file.
+ * libc/machine/powerpc/vec_free.c: Ditto.
+ * libc/machine/powerpc/vec_malloc.c: Ditto.
+ * libc/machine/powerpc/vec_mallocr.c: Ditto.
+ * libc/machine/powerpc/vec_realloc.c: Ditto.
+ * libc/machine/powerpc/machine/malloc.h: Ditto.
+ * libc/machine/powerpc/machine/stdlib.h: Ditto.
+ * libc/machine/powerpc/vfprintf.c: New file that is vfprintf.c
+ with added altivec format specifiers.
+ * libc/machine/powerpc/vfscanf.c: New file that is vfscanf.c with
+ added altivec format specifiers.
+
+2002-04-19 Joel Sherrill <joel@OARcorp.com>
+
+ * libs/sys/rtems/crt0.c: Satisfy gcc's references to libc functions
+ while autoconf is trying to link main(){}.
+
+2002-04-17 Jeff Johnston <jjohnstn@redhat.com>
+
+ * libc/sys/linux/signal.c: Remove include of <bits/sigset.h>.
+ * libc/sys/linux/sys/signal.h: Add include of <bits/sigset.h>.
+
+2002-04-17 Jeff Johnston <jjohnstn@redhat.com>
+
+ * libc/time/time.tex: Add tzset info.
+
+2002-04-17 Jeff Johnston <jjohnstn@redhat.com>
+
+ * libc/include/time.h (tzset, _tzset_r): Added prototypes.
+ (strptime): Moved prototype to be within !__STRICT_ANSI__.
+ (_tzname, _daylight, _timezone): No long __CYGWIN__ only.
+ (tzname): Defined for all platforms.
+ (daylight, timezone): Defined only for CYGWIN.
+ * libc/sys/linux/machine/i386/crt0.c: Add call to tzset() after
+ environment set up.
+ * libc/stdlib/setenv_r.c (_setenv_r): Call tzset() if the TZ
+ environment variable is set.
+ * libc/time/Makefile.am: Add support for tzset.c, tzlock.c, and
+ tzset_r.c.
+ * libc/time/Makefile.in: Regenerated.
+ * libc/time/gmtime.c (gmtime): Changed to call gmtime_r.
+ * libc/time/gmtime_r.c (gmtime_r): Changed to call _mktm_r.
+ * libc/time/lcltime_r.c (lcltime_r): Ditto.
+ * libc/time/local.h: New local header file.
+ * libc/time/mktime.c (mktime): Add timezone support.
+ * libc/time/mktm_r.c: New file which is the common engine
+ for gmtime_r and lcltime_r. This code has timezone support.
+ * libc/time/strftime.c (strftime): Add %Z timezone support.
+ * libc/time/tzlock.c: New file containing timezone lock stubs.
+ * libc/time/tzset.c: New file containing tzset() routine.
+ * libc/time/tzset_r.c: New file containing _tzset_r and
+ internal routine for calculating timezone changes for specified year.
+
+2002-04-17 Thomas Fitzsimmons <fitzsim@redhat.com>
+
+ * configure.in (CRT0_DIR): Set to libc/.
+ (CRT1_DIR): Set to ${crt1_dir}/ if crt1_dir is non-empty.
+ * Makefile.am: Change all occurrences of $(CRT0_DIR)/$(CRT0) to
+ $(CRT0_DIR)$(CRT0) to prevent make warnings. Likewise for
+ $(CRT1_DIR)/$(CRT1).
+ * libc/machine/xstormy16/Makefile.in: Regenerated.
+ * libc/machine/xstormy16/aclocal.m4: Regenerated.
+ * libc/machine/xstormy16/configure: Regenerated.
+
+2002-04-13 Alexandre Oliva <aoliva@redhat.com>
+
+ * libc/stdlib/mallocr.c (malloc_extend_top): If correction sbrk
+ fails, don't bail out, and try to correct next time.
+
+ * libc/include/sys/config.h: Include limits.h.
+
+2002-04-12 Eric Norum <eric.norum@usask.com>
+
+ * libc/sys/rtems/crt0.c (rtems_gxx_mutex_init): Dummy
+ routine to allow autoconf to determine that building executables
+ for rtems works.
+ (rtems_gxx_mutex_lock, rtems_gxx_mutex_unlock): Ditto.
+ (rtems_gxx_mutex_once): Ditto.
+
+2002-04-09 Tom Rix <trix@redhat.com>
+
+ * libc/include/sys/reent.h (_REENT_INIT_PTR): Fix typo.
+
+2002-04-09 Mark Bradshaw <bradshaw@staff.crosswalk.com>
+
+ * libc/include/time.h: Fix strptime declaration.
+ * libc/time/Makefile.am: Add strptime.c.
+ * libc/time/Makefile.in: Regenerated.
+ * libc/time/strptime.c: New file.
+
+2002-04-08 Jeff Johnston <jjohnstn@redhat.com>
+
+ * libc/sys/linux/include/setjmp.h: Add sigjmp_buf type,
+ siglongjmp prototype, and sigsetjmp macro definition.
+ * libc/sys/linux/siglongjmp.c: New file.
+ * libc/sys/linux/Makefile.am: Add support for siglongjmp.
+ * libc/sys/linux/Makefile.in: Regenerated.
+
+2002-04-04 Jeff Johnston <jjohnstn@redhat.com>
+
+ * Makefile.am: Add support for installing crt1.o if one exists.
+ * configure.host: Specify crt1.o for linux.
+ * configure.in: Expose CRT1 and CRT1_DIR for Makefile.am to use.
+ * Makefile.in: Regenerated.
+ * configure: Ditto.
+ * libc/include/sys/unistd.h (_SC_STREAM_MAX, _SC_PRIORITY_SCHEDULING):
+ Added for non-Cygwin, non-RTEMS configurations.
+ * libc/sys/linux/Makefile.am: Add support for crt1 and sysconf.
+ * libc/sys/linux/Makefile.in: Regenerated.
+ * libc/sys/linux/crt1.c: New empty file to override one defaulted
+ by gcc. This fixes problem with reconfiguring linux newlib build.
+ * libc/sys/linux/sysconf.c: New file.
+
+2002-04-03 Jeff Johnston <jjohnstn@redhat.com>
+
+ * configure.host: Add support for machine subdirectory of
+ sys subdirectory.
+ * configure.in: Add check for sys machine subdirectory.
+ * Makefile.am: Ditto.
+ * configure: Regenerated.
+ * Makefile.in: Ditto.
+ * libc/sys/linux/crt0.c: Moved to machine/i386 directory.
+ * libc/sys/linux/sys/syscall.h: Ditto.
+ * libc/sys/linux/sleep.c: New file.
+ * libc/sys/linux/socket.c: Ditto.
+ * libc/sys/linux/sockops.h: Ditto.
+ * libc/sys/linux/stack.c: Ditto.
+ * libc/sys/linux/usleep.c: Ditto.
+ * libc/sys/linux/machine/Makefile.am: Ditto.
+ * libc/sys/linux/machine/Makefile.in: Ditto.
+ * libc/sys/linux/machine/aclocal.m4: Ditto.
+ * libc/sys/linux/machine/configure: Ditto.
+ * libc/sys/linux/machine/configure.in: Ditto.
+ * libc/sys/linux/machine/i386/Makefile.am: Ditto.
+ * libc/sys/linux/machine/i386/Makefile.in: Ditto.
+ * libc/sys/linux/machine/i386/aclocal.m4: Ditto.
+ * libc/sys/linux/machine/i386/configure: Ditto.
+ * libc/sys/linux/machine/i386/configure.in: Ditto.
+ * libc/sys/linux/machine/i386/crt0.c: Ditto.
+ * libc/sys/linux/machine/i386/sigset.c: Ditto.
+ * libc/sys/linux/machine/i386/sigstack.h: Ditto.
+ * libc/sys/linux/machine/i386/socketcall.h: Ditto.
+ * libc/sys/linux/machine/i386/syscall.h: Ditto.
+ * libc/sys/linux/sys/select.h: Ditto.
+ * libc/sys/linux/configure.in: Add support for machine directory.
+ * libc/sys/linux/Makefile.am: Ditto plus add new files above.
+ * libc/sys/linux/Makefile.in: Regenerated.
+ * libc/sys/linux/configure: Ditto.
+ * libc/sys/linux/brk.c: Use machine/syscall.h instead of sys/syscall.h.
+ * libc/sys/linux/inode.c: Ditto.
+ * libc/sys/linux/linux.c: Ditto.
+ * libc/sys/linux/process.c: Ditto.
+ * libc/sys/linux/systat.c: Ditto.
+ * libc/sys/linux/time.c: Ditto.
+ * libc/sys/linux/wait.c: Ditto.
+ * libc/sys/linux/ids.c: Change header plus add setfsgid/setfsuid.
+ * libc/sys/linux/io.c: Change header plus add readv/writev.
+ * libc/sys/linux/signal.c: Change header plus change sigsuspend to
+ use __sigsuspend syscall.
+ * libc/sys/linux/select.c: Change header plus change select to
+ use _newselect syscall.
+ * libc/sys/linux/sys/cdefs.h: Add a number of standard definitions
+ used by glibc header files.
+ * libc/sys/linux/sys/types.h: Add __socklen_t and __useconds_t
+ types.
+
+2002-04-01 Jeff Johnston <jjohnstn@redhat.com>
+
+ * libc/include/sys/reent.h (_REENT_INIT_PTR): New macro for
+ initializing a struct _reent that has been dynamically allocated.
+ (_REENT_CHECK_MISC): New macro that checks _misc struct for
+ _REENT_SMALL and does nothing otherwise.
+ (_REENT_STRTOK_LAST): New macro for reentrant strtok.
+ (_REENT_MBLEN_STATE): New macro for reentrant mblen.
+ (_REENT_MBTOWC_STATE): New macro for reentrant mbtowc.
+ (_REENT_WCTOMB_STATE): New macro for reentrant wctomb.
+ [_REENT_SMALL](struct _misc_reent): New structure containing
+ miscellaneous reentrant areas needed by newlib.
+ [_REENT_SMALL](struct _reent): Add _misc pointer.
+ [_REENT_SMALL](_REENT_INIT_MISC): New macro.
+ * libc/string/strtok (strtok): Change to use _REENT_CHECK_MISC
+ and _REENT_STRTOK_LAST macros.
+ * libc/stdlib/mblen (mblen): Change to use _REENT_CHECK_MISC
+ and _REENT_MBLEN_STATE macros.
+ * libc/stdlib/mbtowc (mbtowc): Change to use _REENT_CHECK_MISC
+ and _REENT_MBTOWC_STATE macros.
+ * libc/stdlib/wctomb (wctomb): Change to use _REENT_CHECK_MISC
+ and _REENT_WCTOMB_STATE macros.
+
+2002-04-01 Till Straumann <strauman@SLAC.Stanford.EDU>
+
+ * libc/stdlib/getenv_r.c (_findenv_r): Add missing ENV_UNLOCK.
+
+Wed Mar 27 07:34:44 2002 Jason Tishler <jason@tishler.net>
+
+ * libc/include/sys/features.h (_POSIX_SEMAPHORES): New Cygwin define.
+
+Tue Mar 26 17:17:10 2002 J"orn Rennecke <joern.rennecke@superh.com>
+
+ * libc/machine/sh/memcpy.S (Large): Fix alignment rounding.
+ Store high part of leading bytes too.
+
+2002-03-22 Richard Sandiford <rsandifo@redhat.com>
+
+ * libm/math/ef_hypot.c: Increase scale factor to 68.
+
+2002-03-13 Alexandre Oliva <aoliva@redhat.com>
+
+ * libc/machine/mips/strlen.c (strlen) [__mips16]: Fix off-by-two
+ error.
+
+2002-03-12 Jeff Johnston <jjohnstn@redhat.com>
+
+ * libc/sys/go32/access.c: Change license to relaxed license
+ used in identical file throughout newlib/libgloss.
+
+2002-03-12 Richard Earnshaw <rearnsha@arm.com>
+
+ * libc/sys/arm/access.c: New file.
+ * libc/sys/arm/Makefile.am (lib_a_SOURCES): Add access.c.
+ * libc/sys/arm/Makefile.in: Regenerate.
+ * libc/sys/arm/syscalls.c (_stat): New function.
+
+2002-03-11 Michael Meissner <meissner@redhat.com>
+
+ * libc/machine/mips/Makefile.am (lib_a_SOURCES): Add Mips specific
+ variants strlen.c, strcmp.c, strncpy.c, memset.c and memcpy.c.
+ * libc/machine/mips/Makefile.in: Regenerate.
+ * libc/machine/mips/memcpy.c: New file, optimized for MIPS.
+ * libc/machine/mips/memset.c: Dito.
+ * libc/machine/mips/strcmp.c: Dito.
+ * libc/machine/mips/strlen.c: Dito.
+ * libc/machine/mips/strncmp.c: Dito.
+
+2002-03-06 Jeff Johnston <jjohnstn@redhat.com>
+
+ * libc/machine/i386/Makefile.am: Add $(oext) for setjmp
+ object so it works for shared library or statici library.
+2002-04-17 Jeff Johnston <jjohnstn@redhat.com>
+
+ * libc/include/time.h (tzset, _tzset_r): Added prototypes.
+ (strptime): Moved prototype to be within !__STRICT_ANSI__.
+ (_tzname, _daylight, _timezone): No long __CYGWIN__ only.
+ (tzname): Defined for all platforms.
+ (daylight, timezone): Defined only for CYGWIN.
+ * libc/sys/linux/machine/i386/crt0.c: Add call to tzset() after
+ environment set up.
+ * libc/stdlib/setenv_r.c (_setenv_r): Call tzset() if the TZ
+ environment variable is set.
+ * libc/time/Makefile.am: Add support for tzset.c, tzlock.c, and
+ tzset_r.c.
+ * libc/time/Makefile.in: Regenerated.
+ * libc/time/gmtime.c (gmtime): Changed to call gmtime_r.
+ * libc/time/gmtime_r.c (gmtime_r): Changed to call _mktm_r.
+ * libc/time/lcltime_r.c (lcltime_r): Ditto.
+ * libc/time/local.h: New local header file.
+ * libc/time/mktime.c (mktime): Add timezone support.
+ * libc/time/mktm_r.c: New file which is the common engine
+ for gmtime_r and lcltime_r. This code has timezone support.
+ * libc/time/strftime.c (strftime): Add %Z timezone support.
+ * libc/time/tzlock.c: New file containing timezone lock stubs.
+ * libc/time/tzset.c: New file containing tzset() routine.
+ * libc/time/tzset_r.c: New file containing _tzset_r and
+ internal routine for calculating timezone changes for specified year.
+
+2002-04-17 Thomas Fitzsimmons <fitzsim@redhat.com>
+
+ * configure.in (CRT0_DIR): Set to libc/.
+ (CRT1_DIR): Set to ${crt1_dir}/ if crt1_dir is non-empty.
+ * Makefile.am: Change all occurrences of $(CRT0_DIR)/$(CRT0) to
+ $(CRT0_DIR)$(CRT0) to prevent make warnings. Likewise for
+ $(CRT1_DIR)/$(CRT1).
+ * libc/machine/xstormy16/Makefile.in: Regenerated.
+ * libc/machine/xstormy16/aclocal.m4: Regenerated.
+ * libc/machine/xstormy16/configure: Regenerated.
+
+2002-04-13 Alexandre Oliva <aoliva@redhat.com>
+
+ * libc/stdlib/mallocr.c (malloc_extend_top): If correction sbrk
+ fails, don't bail out, and try to correct next time.
+
+ * libc/include/sys/config.h: Include limits.h.
+
+2002-04-12 Eric Norum <eric.norum@usask.com>
+
+ * libc/sys/rtems/crt0.c (rtems_gxx_mutex_init): Dummy
+ routine to allow autoconf to determine that building executables
+ for rtems works.
+ (rtems_gxx_mutex_lock, rtems_gxx_mutex_unlock): Ditto.
+ (rtems_gxx_mutex_once): Ditto.
+
+2002-04-09 Tom Rix <trix@redhat.com>
+
+ * libc/include/sys/reent.h (_REENT_INIT_PTR): Fix typo.
+
+2002-04-09 Mark Bradshaw <bradshaw@staff.crosswalk.com>
+
+ * libc/include/time.h: Fix strptime declaration.
+ * libc/time/Makefile.am: Add strptime.c.
+ * libc/time/Makefile.in: Regenerated.
+ * libc/time/strptime.c: New file.
+
+2002-04-08 Jeff Johnston <jjohnstn@redhat.com>
+
+ * libc/sys/linux/include/setjmp.h: Add sigjmp_buf type,
+ siglongjmp prototype, and sigsetjmp macro definition.
+ * libc/sys/linux/siglongjmp.c: New file.
+ * libc/sys/linux/Makefile.am: Add support for siglongjmp.
+ * libc/sys/linux/Makefile.in: Regenerated.
+
+2002-04-04 Jeff Johnston <jjohnstn@redhat.com>
+
+ * Makefile.am: Add support for installing crt1.o if one exists.
+ * configure.host: Specify crt1.o for linux.
+ * configure.in: Expose CRT1 and CRT1_DIR for Makefile.am to use.
+ * Makefile.in: Regenerated.
+ * configure: Ditto.
+ * libc/include/sys/unistd.h (_SC_STREAM_MAX, _SC_PRIORITY_SCHEDULING):
+ Added for non-Cygwin, non-RTEMS configurations.
+ * libc/sys/linux/Makefile.am: Add support for crt1 and sysconf.
+ * libc/sys/linux/Makefile.in: Regenerated.
+ * libc/sys/linux/crt1.c: New empty file to override one defaulted
+ by gcc. This fixes problem with reconfiguring linux newlib build.
+ * libc/sys/linux/sysconf.c: New file.
+
+2002-04-03 Jeff Johnston <jjohnstn@redhat.com>
+
+ * configure.host: Add support for machine subdirectory of
+ sys subdirectory.
+ * configure.in: Add check for sys machine subdirectory.
+ * Makefile.am: Ditto.
+ * configure: Regenerated.
+ * Makefile.in: Ditto.
+ * libc/sys/linux/crt0.c: Moved to machine/i386 directory.
+ * libc/sys/linux/sys/syscall.h: Ditto.
+ * libc/sys/linux/sleep.c: New file.
+ * libc/sys/linux/socket.c: Ditto.
+ * libc/sys/linux/sockops.h: Ditto.
+ * libc/sys/linux/stack.c: Ditto.
+ * libc/sys/linux/usleep.c: Ditto.
+ * libc/sys/linux/machine/Makefile.am: Ditto.
+ * libc/sys/linux/machine/Makefile.in: Ditto.
+ * libc/sys/linux/machine/aclocal.m4: Ditto.
+ * libc/sys/linux/machine/configure: Ditto.
+ * libc/sys/linux/machine/configure.in: Ditto.
+ * libc/sys/linux/machine/i386/Makefile.am: Ditto.
+ * libc/sys/linux/machine/i386/Makefile.in: Ditto.
+ * libc/sys/linux/machine/i386/aclocal.m4: Ditto.
+ * libc/sys/linux/machine/i386/configure: Ditto.
+ * libc/sys/linux/machine/i386/configure.in: Ditto.
+ * libc/sys/linux/machine/i386/crt0.c: Ditto.
+ * libc/sys/linux/machine/i386/sigset.c: Ditto.
+ * libc/sys/linux/machine/i386/sigstack.h: Ditto.
+ * libc/sys/linux/machine/i386/socketcall.h: Ditto.
+ * libc/sys/linux/machine/i386/syscall.h: Ditto.
+ * libc/sys/linux/sys/select.h: Ditto.
+ * libc/sys/linux/configure.in: Add support for machine directory.
+ * libc/sys/linux/Makefile.am: Ditto plus add new files above.
+ * libc/sys/linux/Makefile.in: Regenerated.
+ * libc/sys/linux/configure: Ditto.
+ * libc/sys/linux/brk.c: Use machine/syscall.h instead of sys/syscall.h.
+ * libc/sys/linux/inode.c: Ditto.
+ * libc/sys/linux/linux.c: Ditto.
+ * libc/sys/linux/process.c: Ditto.
+ * libc/sys/linux/systat.c: Ditto.
+ * libc/sys/linux/time.c: Ditto.
+ * libc/sys/linux/wait.c: Ditto.
+ * libc/sys/linux/ids.c: Change header plus add setfsgid/setfsuid.
+ * libc/sys/linux/io.c: Change header plus add readv/writev.
+ * libc/sys/linux/signal.c: Change header plus change sigsuspend to
+ use __sigsuspend syscall.
+ * libc/sys/linux/select.c: Change header plus change select to
+ use _newselect syscall.
+ * libc/sys/linux/sys/cdefs.h: Add a number of standard definitions
+ used by glibc header files.
+ * libc/sys/linux/sys/types.h: Add __socklen_t and __useconds_t
+ types.
+
+2002-04-01 Jeff Johnston <jjohnstn@redhat.com>
+
+ * libc/include/sys/reent.h (_REENT_INIT_PTR): New macro for
+ initializing a struct _reent that has been dynamically allocated.
+ (_REENT_CHECK_MISC): New macro that checks _misc struct for
+ _REENT_SMALL and does nothing otherwise.
+ (_REENT_STRTOK_LAST): New macro for reentrant strtok.
+ (_REENT_MBLEN_STATE): New macro for reentrant mblen.
+ (_REENT_MBTOWC_STATE): New macro for reentrant mbtowc.
+ (_REENT_WCTOMB_STATE): New macro for reentrant wctomb.
+ [_REENT_SMALL](struct _misc_reent): New structure containing
+ miscellaneous reentrant areas needed by newlib.
+ [_REENT_SMALL](struct _reent): Add _misc pointer.
+ [_REENT_SMALL](_REENT_INIT_MISC): New macro.
+ * libc/string/strtok (strtok): Change to use _REENT_CHECK_MISC
+ and _REENT_STRTOK_LAST macros.
+ * libc/stdlib/mblen (mblen): Change to use _REENT_CHECK_MISC
+ and _REENT_MBLEN_STATE macros.
+ * libc/stdlib/mbtowc (mbtowc): Change to use _REENT_CHECK_MISC
+ and _REENT_MBTOWC_STATE macros.
+ * libc/stdlib/wctomb (wctomb): Change to use _REENT_CHECK_MISC
+ and _REENT_WCTOMB_STATE macros.
+
+2002-04-01 Till Straumann <strauman@SLAC.Stanford.EDU>
+
+ * libc/stdlib/getenv_r.c (_findenv_r): Add missing ENV_UNLOCK.
+
+Wed Mar 27 07:34:44 2002 Jason Tishler <jason@tishler.net>
+
+ * libc/include/sys/features.h (_POSIX_SEMAPHORES): New Cygwin define.
+
+Tue Mar 26 17:17:10 2002 J"orn Rennecke <joern.rennecke@superh.com>
+
+ * libc/machine/sh/memcpy.S (Large): Fix alignment rounding.
+ Store high part of leading bytes too.
+
+2002-03-22 Richard Sandiford <rsandifo@redhat.com>
+
+ * libm/math/ef_hypot.c: Increase scale factor to 68.
+
+2002-03-13 Alexandre Oliva <aoliva@redhat.com>
+
+ * libc/machine/mips/strlen.c (strlen) [__mips16]: Fix off-by-two
+ error.
+
+2002-03-12 Jeff Johnston <jjohnstn@redhat.com>
+
+ * libc/sys/go32/access.c: Change license to relaxed license
+ used in identical file throughout newlib/libgloss.
+
+2002-03-12 Richard Earnshaw <rearnsha@arm.com>
+
+ * libc/sys/arm/access.c: New file.
+ * libc/sys/arm/Makefile.am (lib_a_SOURCES): Add access.c.
+ * libc/sys/arm/Makefile.in: Regenerate.
+ * libc/sys/arm/syscalls.c (_stat): New function.
+
+2002-03-11 Michael Meissner <meissner@redhat.com>
+
+ * libc/machine/mips/Makefile.am (lib_a_SOURCES): Add Mips specific
+ variants strlen.c, strcmp.c, strncpy.c, memset.c and memcpy.c.
+ * libc/machine/mips/Makefile.in: Regenerate.
+ * libc/machine/mips/memcpy.c: New file, optimized for MIPS.
+ * libc/machine/mips/memset.c: Dito.
+ * libc/machine/mips/strcmp.c: Dito.
+ * libc/machine/mips/strlen.c: Dito.
+ * libc/machine/mips/strncmp.c: Dito.
+
+2002-03-06 Jeff Johnston <jjohnstn@redhat.com>
+
+ * libc/machine/i386/Makefile.am: Add $(oext) for setjmp
+ object so it works for shared library or statici library.
+ * libc/machine/i386/Makefile.in: Regenerated.
+
+Wed Mar 6 10:24:26 2002 J"orn Rennecke <joern.rennecke@superh.com>
+
+ * libc/machine/sh/Makefile.am (lib_a_SOURCES, SH64 case):
+ Add memcpy.S, memset.S and strcpy.S.
+ * libc/machine/sh/Makefile.in: Regenerate.
+ * libc/machine/sh/asm.h (_ENTRY): Set SH5 alignment to 8 bytes.
+ (SHHI, SHLO): Define.
+ * libc/machine/sh/memset.S: Add code for SH5.
+ * libc/machine/sh/memset.S: Likewise.
+ * libc/machine/sh/strcpy.S: Likewise.
+
+2002-02-27 Jeff Johnston <jjohnstn@redhat.com>
+
+ * configure.host: Add check for --disable-newlib-io-float
+ configuration option and add -DNO_FLOATING_POINT to newlib cflags
+ if appropriate.
+ * acinclude.m4: Added --disable-newlib-io-float option.
+ * aclocal.m4: Regenerated.
+ * configure: Ditto.
+ * doc/aclocal.m4 doc/configure libc/aclocal.m4 libc/configure
+ * libc/*/aclocal.m4 libc/*/configure
+ * libm/*/aclocal.m4 libm/*/configure: Ditto.
+ * libc/stdio/vfprintf.c [!INTEGER_ONLY]: Only set FLOATING_POINT
+ if NO_FLOATING_POINT flag is not defined.
+
+2002-02-25 Jeff Johnston <jjohnstn@redhat.com>
+
+ * libc/include/sys/config.h: Add __extension__ in front of
+ long long references.
+
+2002-02-23 Corinna Vinschen <corinna@vinschen.de>
+
+ * libc/include/sys/stat.h (_fstat): Don't declare when compiling Cygwin.
+ (_stat): Ditto.
+
+2002-02-23 Corinna Vinschen <corinna@vinschen.de>
+
+ * libc/sys/cygwin/sys/dirent.h (struct __DIR): Use __off32_t instead
+ of off_t.
+
+2002-02-20 Nick Clifton <nickc@cambridge.redhat.com>
+
+ * libc/machine/xscale/strchr.c (strchr): Add 'r1' to the list of
+ clobbered registers.
+
+2002-02-19 Thomas Fitzsimmons <fitzsim@redhat.com>
+
+ * configure.host (newlib_cflags): When host is in m68* add
+ -DCOMPACT_CTYPE.
+
+2002-02-15 Jeff Johnston <jjohnstn@redhat.com>
+
+ * libc/include/sys/config.h: Add definitions for
+ __int16_t, __uint16_t, __int64_t, and __uint64_t.
+
+2002-02-12 Hans-Peter Nilsson <hp@bitrange.com>
+
+ * libc/sys/mmixware/link.c: New.
+ * libc/sys/mmixware/sys/syscall.h (TRAP1i, I3f): Make asm
+ volatile.
+ * libc/sys/mmixware/times.c (_times): Renamed from times.
+ * libc/sys/mmixware/open.c (_open): Attempt to handle O_APPEND
+ properly by reading previous contents, not through BinaryReadWrite.
+ * libc/sys/mmixware/Makefile.am (lib_a_SOURCES): Add link.c
+ * libc/sys/mmixware/Makefile.in: Regenerate.
+
+2002-02-10 Corinna Vinschen <corinna@vinschen.de>
+
+ * libc/include/grp.h: Don't declare group functions when compiling
+ Cygwin.
+
+2002-02-09 Corinna Vinschen <corinna@vinschen.de>
+
+ * libc/include/grp.h: Include Cygwin specific header.
+ * libc/include/sys/stat.h: Ditto. Don't define `struct stat'
+ when compiling for Cygwin.
+ * libc/include/sys/types.h: Don't define off_t, uid_t
+ and gid_t when compiling for Cygwin.
+
+2002-02-08 matthew green <mrg@redhat.com>
+
+ * libc/include/sys/reent.h (_REENT_CHECK_EMERGENCY): Allocate
+ _REENT_EMERGENCY_SIZE, not sizeof(char *).
+
+2002-02-08 Alexandre Oliva <aoliva@redhat.com>
+
+ Contribute sh64-elf.
+ 2001-03-13 Alexandre Oliva <aoliva@redhat.com>
+ * configure.host (newlib_cflags) [sh*-*-*]: Enable long long
+ support in printf.
+ 2001-01-29 Alexandre Oliva <aoliva@redhat.com>
+ * libc/machine/sh/setjmp.S [SH5]: Switch to SHmedia mode before
+ any labels.
+ 2001-01-24 Alexandre Oliva <aoliva@redhat.com>
+ * libc/sys/sh/trap.S (___trap34) [SH5]: Don't trash r2.
+ 2000-12-16 Alexandre Oliva <aoliva@redhat.com>
+ * libc/machine/sh/configure.in: Rework conditionals.
+ * libc/machine/sh/Makefile.am: Likewise.
+ * libc/machine/sh/configure, libc/machine/sh/Makefile.in: Rebuilt.
+ 2000-12-01 Alexandre Oliva <aoliva@redhat.com>
+ * configure.host: Match `sh*'.
+ * libc/include/machine/setjmp.h: Define for SH5.
+ * libc/machine/sh/configure.in: Detect SH5.
+ * libc/machine/sh/configure: Rebuilt.
+ * libc/machine/sh/Makefile.am: Use only setjmp.S for SH5.
+ * libc/machine/sh/Makefile.in: Rebuilt.
+ * libc/machine/sh/asm.h: Adjust for SH5.
+ * libc/machine/sh/setjmp.S: Implement in SHmedia.
+ * libc/sys/sh/crt0.S: Likewise.
+ * libc/sys/sh/trap.S: Likewise.
+
+2002-02-07 Jeff Johnston <jjohnstn@redhat.com>
+
+ * libc/machine/i386/Makefile.am: (mach_add_src): Remove.
+ (mach_add_obj): Conditionally set to setjmp.o or nothing.
+ (LIB_SOURCES): Remove $(mach_add_src).
+ (lib_a_LIBADD, lib_a_DEPENDENCIES): Add and set to $(mach_add_src).
+ (lib_la_LIBADD, lib_la_DEPENDENCIES): Ditto.
+ * libc/machine/i386/Makefile.in: Regenerate.
+
+2002-02-05 Manik Raina <manik@cisco.com>
+
+ * libc/misc/dprintf.c (parse_number): #if 0 unused function.
+ * libc/stdlib/ldtoa.c (_ldcheck): Remove unused local variables
+ s, p, k, and outstr.
+ * libc/stdlib/dtoa.c (_dtoa_r): Initialize mlo.
+
+2002-02-04 Jeff Johnston <jjohnstn@redhat.com>
+
+ * libc/include/sys/reent.h [(!_REENT_SMALL]: Add
+ _REENT_CHECK_EMERGENCY macro.
+
+2002-02-03 matthew green <mrg@redhat.com>
+
+ * libc/reent/signgam.c (__signgam): Fix error in previous.
+
+2002-02-02 matthew green <mrg@redhat.com>
+
+ * libc/include/sys/config.h (_REENT_SMALL): Define for Xstormy16.
+
+ * libc/reent/reent.c (_reclaim_reent): Clean for _REENT_SMALL case.
+ * libc/reent/reent.tex: Add blurb about _REENT_SMALL.
+ * libc/include/sys/reent.h (struct _reent): Completely new version
+ for _REENT_SMALL.
+ (_REENT_INIT): New defines, different defintion depending on _REENT_SMALL.
+ (_REENT_CHECK, _REENT_CHECK_TM): Likewise.
+ (_REENT_CHECK_ASCTIME_BUF, _REENT_INIT_RAND48): Likewise.
+ (_REENT_CHECK_RAND48, _REENT_INIT_MP, _REENT_CHECK_MP): Likewise.
+ (_REENT_CHECK_EMERGENCY, _REENT_SIGNGAM, _REENT_RAND_NEXT): Likewise.
+ (_REENT_RAND48_SEED, _REENT_RAND48_MULT, _REENT_RAND48_ADD): Likewise.
+ (_REENT_MP_RESULT, _REENT_MP_RESULT_K, _REENT_MP_P5S): Likewise.
+ (_REENT_MP_FREELIST, _REENT_ASCTIME_BUF, _REENT_TM): Likewise.
+ (_REENT_EMERGENCY): Likewise.
+
+ * libc/include/sys/reent.h (struct __sFILE_fake): New struct, same as
+ the start of the real __sFILE, used for stdin, stdout and stderr until
+ they are setup properly.
+ (struct __sFILE): Move location of _data in _REENT_SMALL case.
+ * libc/stdio/findfp.c (__sinit): Rearrange for _REENT_SMALL case by
+ allocated stdin, stdout and stderr.
+ * libc/stdio/getchar.c (_getchar_r): Call _REENT_SMALL_CHECK_INIT().
+ * libc/stdio/iprintf.c (iprintf, _iprintf_r): Likewise.
+ * libc/stdio/perror.c (_perror_r): Likewise.
+ * libc/stdio/printf.c (printf, _printf_r): Likewise.
+ * libc/stdio/putchar.c (_putchar_r): Likewise.
+ * libc/stdio/puts.c (_puts_r): Likewise.
+ * libc/stdio/scanf.c (scanf, _scanf_r): Likewise.
+ * libc/stdio/vprintf.c (vprintf): Likewise.
+ * libc/stdio/vscanf.c (vscanf, _vscanf_r): Likewise.
+
+ * libc/stdio/tmpnam.c (_tmpnam_r): Use _REENT_EMERGENCY().
+
+ * libc/reent/reent.c (_wrapup_reent): Adjust for _REENT_SMALL atexit.
+ * libc/include/sys/reent.h (_atexit): Limit atexit() entries to 32
+ for _REENT_SMALL.
+ * libc/stdlib/atexit.c (atexit): Rearrange for _REENT_SMALL case.
+ * libc/stdlib/exit.c (exit): Rearrange for _REENT_SMALL case.
+
+ * libc/include/sys/reent.h (struct _rand48): Keep _rand_next if
+ _REENT_SMALL.
+ * libc/stdlib/drand48.c (_drand48_r): Call _REENT_CHECK_RAND48().
+ * libc/stdlib/lcong48.c (_lcong48_r): Likewise.
+ * libc/stdlib/lrand48.c (_lrand48_r): Likewise.
+ * libc/stdlib/mrand48.c (_mrand48_r): Likewise.
+ * libc/stdlib/rand48.c (__dorand48): Likewise.
+ * libc/stdlib/seed48.c (_seed48_r): Likewise.
+ * libc/stdlib/srand48.c (_srand48_r): Likewise.
+ * libc/stdlib/rand48.h (__rand48_seed, __rand48_mult, __rand48_add): Define
+ as _REENT_RAND48_SEED(), _REENT_RAND48_MULT() and _REENT_RAND48_ADD().
+ * libc/stdlib/dtoa.c (_dtoa_r): Call _REENT_CHECK_MP(). Use
+ _REENT_MP_RESULT() and _REENT_MP_RESULT_K().
+ * libc/stdlib/ldtoa.c (_ldtoa_r): Likewise.
+ * libc/stdlib/rand.c (srand): Use _REENT_RAND_NEXT().
+ * libc/stdlib/rand.c (rand): Likewise.
+
+ * libc/stdlib/mallocr.c (malloc_stats): Call _REENT_SMALL_CHECK_INIT().
+ * libc/stdlib/mstats.c (_mstats_r): Call _REENT_SMALL_CHECK_INIT().
+
+ * libc/stdlib/mprec.c (Balloc): Call _REENT_CHECK_MP. Use
+ _REENT_MP_FREELIST() and _REENT_MP_P5S.
+ * libc/include/sys/reent.h (struct _mprec): New structure.
+
+ * libc/include/sys/reent.h (struct _reent): Rename _strtok_last to
+ _unused_strtok_last.
+ * libc/string/strtok.c (strtok): Use a local static variable.
+
+ * libc/include/sys/reent.h (_REENT_ASCTIME_SIZE): New define.
+ (_REENT_EMERGENCY_SIZE): Likewise.
+ * libc/time/asctime.c (asctime): Call _REENT_CHECK_ASCTIME_BUF(). Use
+ _REENT_ASCTIME_BUF().
+ * libc/time/lcltime.c (localtime): Call _REENT_CHECK_TM(). Use
+ _REENT_TM().
+
+ * libc/include/math.h (__singam_r): Use _REENT_SIGNGAM().
+ * libc/reent/signgam.c (__signgam): Use _REENT_SIGNGAM().
+ * libm/math/w_gamma.c (gamma): Use _REENT_SIGNGAM().
+ * libm/math/w_lgamma.c (lgamma): Use _REENT_SIGNGAM().
+ * libm/math/wf_gamma.c (gammaf): Use _REENT_SIGNGAM().
+ * libm/math/wf_lgamma.c (lgammaf): Use _REENT_SIGNGAM().
+
+2002-02-01 Geoffrey Keating <geoffk@redhat.com>
+
+ * configure.host (xstormy16): Don't use the generic malloc.
+ * libc/machine/xstormy16/Makefile.am: Build tiny-malloc.
+ * libc/machine/xstormy16/Makefile.in: Regenerate.
+ * libc/machine/xstormy16/mallocr.c: New file.
+ * libc/machine/xstormy16/tiny-malloc.c: New file.
+
+2002-01-28 Thomas Fitzsimmons <fitzsim@redhat.com>
+
+ * libc/include/sys/signal.h [__CYGWIN__]: Issue error message
+ when _CYGWIN_TYPES_H is not defined.
+
+2002-01-24 Thomas Fitzsimmons <fitzsim@redhat.com>
+
+ * libc/include/sys/signal.h: Revert 2002-01-23 change.
+
+2002-01-23 Thomas Fitzsimmons <fitzsim@redhat.com>
+
+ * libc/include/sys/signal.h: Remove pthread_kill declaration
+ when __CYGWIN__ is defined.
+
+2002-01-18 Mark Bradshaw <bradshaw@staff.crosswalk.com>
+
+ * libc/include/time.h: Add prototype for strptime for Cygwin.
+
+2002-01-17 Nick Clifton <nickc@cambridge.redhat.com>
+
+ * libc/machine/xscale/memset.c (memset): Fix bug when len == 1 and
+ dst was not word aligned.
+
+ * libc/sys/arm/syscalls.c (_sbrk): Return -1 rather than aborting
+ if too much memory is requested.
+
+2002-01-11 Jeff Johnston <jjohnstn@redhat.com>
+
+ * libc/stdio/vfscanf.c (__svfscanf_r): Change loop that
+ reads blanks from the input file to break if EOF reached
+ rather than end processing.
+
+2002-01-07 Jeff Johnston <jjohnstn@redhat.com>
+
+ * MAINTAINERS: Change e-mail addresses to refer to redhat domain.
+
+2002-01-07 Alan Matsuoka <alanm@redhat.com>
+
+ * libc/include/machine/ieeefp.h: Configure d10v doubles to
+ be 32 bits if __DOUBLE__ == 32 otherwise doubles are 64 bits.
+ libc/include/sys/config.h: Ditto.
+
+2001-12-28 Corinna Vinschen <corinna@vinschen.de>
+
+ * libc/sys/cygwin/sys/utmp.h: Add definition of UTMP_FILE.
+
+2001-12-22 Geoffrey Keating <geoffk@redhat.com>
+ Catherine Moore <clm@redhat.com>
+ Richard Henderson <rth@redhat.com>
+ Corinna Vinschen <vinschen@redhat.com>
+
+ * configure.host: Add support for xstormy16.
+ * libc/include/machine/ieeefp.h: Add support for xstormy16.
+ * libc/include/machine/setjmp.h: Add support for xstormy16.
+ * libc/include/sys/config.h: Add support for xstormy16.
+ * libc/machine/xstormy16/Makefile.am: New file.
+ * libc/machine/xstormy16/Makefile.in: New file.
+ * libc/machine/xstormy16/aclocal.m4: New file.
+ * libc/machine/xstormy16/configure: New file.
+ * libc/machine/xstormy16/configure.in: New file.
+ * libc/machine/xstormy16/setjmp.S: New file.
+
+2001-12-19 Thomas Fitzsimmons <fitzsim@redhat.com>
+
+ * libm/machine/configure.in (HAVE_LIBM_MACHINE_DIR): New conditional.
+ * libm/machine/Makefile.am [HAVE_LIBM_MACHINE_DIR] (LIBM_MACHLIB): New variable.
+
+2001-12-19 Corinna Vinschen <corinna@vinschen.de>
+
+ * libm/machine/Makefile.am: Change rules to create correct lib.a.
+ * libm/machine/Makefile.in: Regenerated through automake.
+
+2001-12-18 Thomas Fitzsimmons <fitzsim@redhat.com>
+
+ * Makefile.am (DOCDIR): Force to empty string when doc
+ directory is not present.
+
+2001-12-18 Thomas Fitzsimmons <fitzsim@redhat.com>
+
+ * libc/machine/i386/f_*: Move to libm/machine/i386.
+
+2001-12-18 Joel Sherrill <joel@OARcorp.com>
+
+ * libm/machine/Makefile.am: Add dummy doc stub so
+ "make info" works.
+
+2001-12-17 Joel Sherrill <joel@OARcorp.com>
+
+ * libc/include/sys/types.h (ino_t): RTEMS uses long also.
+
+2001-12-17 Thomas Fitzsimmons <fitzsim@redhat.com>
+
+ * libc/stdlib/Makefile.am (LIB_COMPILE): Change to equal
+ $(COMPILE) rather than $(CC).
+ * libc/stdio/Makefile.am (LIB_COMPILE): Likewise.
+ (vfprintf.$(oext)): Remove $(INCLUDES), made redundant by
+ $(LIB_COMPILE) change.
+ (vfiprintf.$(oext)): Likewise.
+
+2001-12-17 Corinna Vinschen <vinschen@redhat.de>
+
+ * libc/sys/cygwin/include/unistd.h: Add __UNISTD_GETOPT_ to allow
+ conditionalized including of getopt stuff.
+
+2001-12-14 Thomas Fitzsimmons <fitzsim@redhat.com>
+
+ * libc/stdio/Makefile.am (vfprintf.$(oext)): Add $(INCLUDES) to
+ compile line.
+ (vfiprintf.$(oext)): Likewise.
+
+2001-12-13 Thomas Fitzsimmons <fitzsim@redhat.com>
+
+ * Makefile.shared: New file.
+ * libc/sys/linux/shared.ld: New file.
+ * libm/machine/*: New files.
+ * libm/machine/i386/*: New files.
+ * Makefile.am: Add libtool support. Change math and mathfp
+ references to variables.
+ * configure.host: Add variables for libtool support. Add
+ libm_machine_dir variable.
+ * configure.in: Add objectlist variables, for libtool
+ support. Add CC_FOR_BUILD tests.
+ * libc/Makefile.am: Add libtool support. Change crt0.o
+ reference to be a variable reference.
+ * libc/configure.in: Add libtool support. Change sublib
+ names to be lib${subdir}.la when using libtool.
+ * libc/ctype/Makefile.am: Add libtool support.
+ * libc/errno/Makefile.am: Likewise.
+ * libc/locale/Makefile.am: Likewise.
+ * libc/machine/Makefile.am: Likewise.
+ * libc/machine/configure.in: Likewise.
+ * libc/machine/i386/Makefile.am: Likewise.
+ * libc/machine/i386/configure.in: Likewise.
+ * libc/misc/Makefile.am: Likewise.
+ * libc/posix/Makefile.am: Likewise.
+ * libc/reent/Makefile.am: Likewise.
+ * libc/signal/Makefile.am: Likewise.
+ * libc/stdio/Makefile.am: Likewise.
+ * libc/stdlib/Makefile.am: Likewise.
+ * libc/string/Makefile.am: Likewise.
+ * libc/sys/Makefile.am: Likewise.
+ * libc/sys/configure.in: Likewise.
+ * libc/sys/linux/Makefile.am: Add libtool support. Change
+ awk reference to a variable reference. Change signal.h
+ reference to a variable reference.
+ * libc/sys/linux/configure.in: Add libtool support.
+ * libc/syscalls/Makefile.am: Likewise.
+ * libc/time/Makefile.am: Likewise.
+ * libc/unix/Makefile.am: Likewise.
+ * libm/Makefile.am: Add libtool support. Change math and
+ mathfp references to variables.
+ * libm/configure.in: Add libtool support. Add
+ LIBM_MACHINE_LIB variable.
+ * libm/common/Makefile.am: Add libtool support.
+ * libm/math/Makefile.am: Likewise.
+ * libm/mathfp/Makefile.am: Likewise.
+ Regenerate all Makefile.in, aclocal.m4, and configure.
+
+2001-12-13 Anita Kulkarni <anitak@kpit.com>
+
+ * libc/sys/sh/crt0.S: Remove stack symbol definition 0xdeaddead.
+
+2001-12-06 John Peacock <jpeacock@rowman.com>
+
+ * libc/include/sys/unistd.h: Correct ualarm declaration.
+
+2001-12-05 Nick Clifton <nickc@cambridge.redhat.com>
+
+ * libc/sys/arm/crt0.S: For __USES_INITFINI__ preserve the argument
+ vector before calling the initialisation functions.
+
+2001-11-29 Christopher Faylor <cgf@redhat.com>
+
+ * libc/include/dirent.h: Protect against multiple inclusion.
+
+2001-11-27 Christopher Faylor <cgf@redhat.com>
+
+ * libc/include/sys/types.h: Define useconds_t.
+ * libc/include/sys/ulimit.h: Declare ualarm.
+
+2001-11-21 Christopher Faylor <cgf@redhat.com>
+
+ * libc/sys/cygwin/sys/dirent.h (DIR): Add another internal element.
+
+2001-11-19 Hans-Peter Nilsson <hp@bitrange.com>
+
+ * libc/sys/mmixware/*: Tweak license header in all source files.
+
+2001-11-12 Corinna Vinschen <vinschen@redhat.com>
+
+ * libc/include/alloca.h: Move libc/sys/linux/include/alloca.h
+ to here. Rearrange for general inclusion by stdlib.h.
+ * libc/include/stdlib.h: Include <alloca.h> if __STRICT_ANSI__
+ isn't defined.
+ * libc/sys/linux/include/alloca.h: Move to libc/include.
+
+2001-11-12 Anthony Green <green@redhat.com>
+
+ * libc/sys/arm/crt0.S (__stack_base__): New symbol.
+
+2001-11-13 Hans-Peter Nilsson <hp@bitrange.com>
+
+ * libc/sys/mmixware/*: Correct spacing in all source files.
+ * libc/sys/mmixware/syscall.h: Move misplaced file...
+ * libc/sys/mmixware/sys/syscall.h: ...here.
+
+2001-11-12 Hans-Peter Nilsson <hp@bitrange.com>
+
+ * libc/include/machine/ieeefp.h: Add support for mmix target.
+ * libc/include/machine/setjmp.h: Ditto.
+ * configure.host: Ditto.
+ * libc/sys/mmixware/Makefile.am, libc/sys/mmixware/_exit.c,
+ libc/sys/mmixware/access.c, libc/sys/mmixware/aclocal.m4,
+ libc/sys/mmixware/chmod.c, libc/sys/mmixware/chown.c,
+ libc/sys/mmixware/close.c, libc/sys/mmixware/configure.in,
+ libc/sys/mmixware/creat.c, libc/sys/mmixware/crt0.c,
+ libc/sys/mmixware/execv.c, libc/sys/mmixware/execve.c,
+ libc/sys/mmixware/fork.c, libc/sys/mmixware/fstat.c,
+ libc/sys/mmixware/getpid.c, libc/sys/mmixware/gettime.c,
+ libc/sys/mmixware/isatty.c, libc/sys/mmixware/kill.c,
+ libc/sys/mmixware/lseek.c, libc/sys/mmixware/open.c,
+ libc/sys/mmixware/pipe.c, libc/sys/mmixware/read.c,
+ libc/sys/mmixware/sbrk.c, libc/sys/mmixware/setjmp.S,
+ libc/sys/mmixware/stat.c, libc/sys/mmixware/sys/syscall.h,
+ libc/sys/mmixware/time.c, libc/sys/mmixware/times.c,
+ libc/sys/mmixware/unlink.c, libc/sys/mmixware/utime.c,
+ libc/sys/mmixware/wait.c, libc/sys/mmixware/write.c: New files.
+ * libc/sys/mmixware/configure, libc/sys/mmixware/Makefile.in,
+ libc/sys/mmixware/aclocal.m4: Generate.
+
+2001-11-05 Corinna Vinschen <corinna@vinschen.de>
+
+ * libc/include/sys/unistd.h: Add prototypes for endusershell(),
+ getusershell(), iruserok(), revoke(), ruserok() and setusershell()
+ when __CYGWIN__ is defined.
+ * libc/sys/cygwin/sys/utmp.h: Add prototypes for login_tty() and
+ logwtmp().
+
+2001-11-01 Arati Dikey <aratidikey@hotmail.com>
+
+ * libm/mathfp/sf_isinf.c (isinff): Change to use _DEFUN macro.
+ [_DOUBLE_IS_32BITS](isinf): New function that calls isinff.
+ * libm/mathfp/sf_isnan.c (isnanf): Change to use _DEFUN macro.
+ [_DOUBLE_IS_32BITS](isnan): New function that calls isnanf.
+
+2001-10-24 Christopher Faylor <cgf@redhat.com>
+
+ * libc/stdio/fseek.c: Reset pointer to buffer base
+ when forced to seek outside of current buffer contents.
+ This prevents the code from erroneously thinking there is
+ anything in the current buffer.
+
+2001-10-22 Geoffrey Keating <geoffk@redhat.com>
+
+ * libc/include/math.h: The C++ standard adds the single-precision
+ versions of the elementary functions.
+
+2001-10-22 Christopher Faylor <cgf@redhat.com>
+
+ * libc/posix/execvp.c: Remove obsolete CYGWIN32 considerations
+ throughout.
+ * signal.h: Change comment to reflect __CYGWIN__ rather than __CYGWIN32__.
+ * popen.c (popen): Use __CYGWIN_ rather than __CYGWIN32__.
+ * system.c (_system_r): Ditto.
+
+2001-10-17 Corinna Vinschen <corinna@vinschen.de>
+
+ * libc/include/sys/unistd.h: Add prototype for fchdir() when
+ __CYGWIN__ or __rtems__ is defined.
+
+2001-10-01 Charles Wilson <cwilson@ece.gatech.edu>
+
+ * libc/include/stdlib.h: add declarations for
+ _strtoull_r, _strtoll_r, strtoull, and strtoll.
+ * libc/stdio/local.h: remove declarations of
+ __strtoull_r and __strtoll_r.
+ * libc/stdio/vfscanf.c(__svfscanf_r): call
+ _strtoull_r instead of __strtoull_r. Ditto
+ _strtoll_r vs. __strtoll_r.
+ * libc/stdlib/Makefile.am: add new files to
+ .c list and .def list
+ * libc/stdlib/Makefile.in: regenerate
+ * libc/stdlib/strtoll_r.c: rename __strtoll_r
+ as _strtoll_r
+ * libc/stdlib/strtoull_r.c: rename __strtoull_r
+ as _strtoull_r
+ * libc/stdlib/strtoull.c: new file
+ * libc/stdlib/strtoll.c: new file
+
+Mon Sep 17 17:29:47 2001 Christopher Faylor <cgf@cygnus.com>
+
+ * libc/include/process.h: Add getpid() declaration.
+
+2001-09-14 Nick Clifton <nickc@cambridge.redhat.com>
+
+ * libc/sys/arm/crt0.S: Add calls to _init and _fini (via atexit)
+ for new style arm/elf ctor/dtor handling.
+ Minor formatting tidy up.
+
+2001-09-13 Jeff Johnston <jjohnstn@redhat.com>
+
+ * libc/stdlib/Makefile.am: Add support to build strtoll_r.c
+ and strtoull_r.c.
+ * libc/stdlib/Makefile.in: Regenerated.
+ * libc/stdlib/strtoll_r.c: New file.
+ * libc/stdlib/strtoull_r.c: New file.
+ * libc/stdio/local.h: Add prototypes for long long string
+ conversion routines.
+ * libc/stdio/vfscanf.c (__svfscanf_r): Add optional long long support
+ tied to %L integer conversion specifier.
+
+Thu Sep 13 08:49:49 2001 Jason Tishler <jason@tishler.net>
+
+ * strftime.c (strftime): Fix "%W" implementation to properly handle
+ Mondays too.
+
+2001-09-07 Jeff Law <law@redhat.com>
+
+ * libc/sys/h8300hms/crt0.S: For H8/300H and H8/S, load address of
+ __fini with "mov.l" instead of "mov.w".
+
+2001-09-05 Corinna Vinschen <corinna@vinschen.de>
+
+ * libc/sys/cygwin/include/unistd.h: New file, wrapping sys/unistd.h
+ and getopt.h.
+
+2001-09-04 Jason Merrill <jason_merrill@redhat.com>
+
+ * libc/sys/h8300hms/crt0.S: Support ELF initialization.
+
+2001-09-03 Corinna Vinschen <corinna@vinschen.de>
+
+ * libc/sys/cygwin/sys/dirent.h (struct dirent): Add version number
+ field.
+ (__DIRENT_VERSION): New define.
+
+2001-09-03 Corinna Vinschen <corinna@vinschen.de>
+
+ * libc/sys/cygwin/sys/dirent.h (struct dirent): Add `d_fd' member.
+ Shrink __d_reserved accordingly to keep structure size.
+ (dirfd): Declare external.
+
+2001-08-29 Joel Sherrill <joel@OARcorp.com>
+
+ * libc/include/sys/unistd.h: Prototype chroot() for RTEMS.
+
+2001-08-29 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
+
+ * libc/machine/i386/f_atan2.S, libc/machine/i386/f_atan2f.S,
+ libc/machine/i386/f_exp.c, libc/machine/i386/f_expf.c,
+ libc/machine/i386/f_frexp.S, libc/machine/i386/f_frexpf.S,
+ libc/machine/i386/f_ldexp.S, libc/machine/i386/f_ldexpf.S,
+ libc/machine/i386/f_log.S, libc/machine/i386/f_log10.S,
+ libc/machine/i386/f_log10f.S, libc/machine/i386/f_logf.S,
+ libc/machine/i386/f_pow.c, libc/machine/i386/f_powf.c,
+ libc/machine/i386/f_tan.S, libc/machine/i386/f_tanf.S:
+ Add conditional compilation to avoid HW FPU instructions
+ when compiled for soft-float.
+
+2001-08-29 Jeff Johnston <jjohnstn@redhat.com>
+
+ * Makefile.am: Add check for ln failing when creating libg.a
+ so that cp gets used as a backup.
+ * Makefile.in: Regenerated.
+
+2001-08-29 Jeff Johnston <jjohnstn@redhat.com>
+
+ * libc/include/sys/reent.h: Add include of <sys/_types.h>.
+ No longer include time.h. Add struct __tm to use for
+ _localtime_buf in the reentrant structure. Add a
+ _NULL definition to use in initializing the reentrant struct.
+ * libc/include/sys/config.h: For CYGWIN32 and RTEMS, change
+ the _READ_WRITE_RETURN_TYPE to _ssize_t which is found in
+ <sys/_types.h>.
+ * libc/include/sys/unistd.h: Include <sys/_types.h>.
+ * libc/time/lcltime.c (localtime): Cast the reentrant struct
+ _localtime_buf to be struct tm *.
+
+Wed Aug 29 14:17:38 2001 J"orn Rennecke <amylaar@redhat.com>
+
+ * configure.host (h8300-*-elf*, h8500-*-elf*): New cases.
+ * libc/sys/h8300hms/crt1.c (__main): Don't reference __ctors /
+ __ctors_end.
+ * libc/sys/h8300hms/syscalls.c: Include errno.h.
+ (_unlink): New stub function.
+
+Sat Aug 25 22:22:25 2001 Christopher Faylor <cgf@cygnus.com>
+
+ * libc/include/sys/errno.h: Add a cautionary comment.
+
+2001-08-21 Jeff Johnston <jjohnstn@redhat.com>
+
+ * libc/stdlib/mallocr.c [!defined(MALLOC_ALIGNMENT)]: Add conditional
+ for SIZE_SZ so that alignment ends up a minimum of 8.
+
+Mon Aug 13 22:26:01 2001 Christopher Faylor <cgf@cygnus.com>
+
+ * libc/include/machine/setjmp.h: Protect sigsetjmp/siglongjmp macro
+ arguments.
+
+ * libc/include/sys/errno.h: Declare sys_errlist and sys_nerr, under
+ Cygwin.
+
+2001-08-13 Jeff Johnston <jjohnstn@redhat.com>
+
+ * libc/include/malloc.h (M_MXFAST, M_NLBLKS, M_GRAIN, M_KEEP): New
+ macro constants for mallopt options.
+ (M_TRIM_THRESHOLD, M_TOP_PAD, M_MMAP_THRESHOLD, M_MMAP_MAX): Ditto.
+
+2001-08-02 Jeff Johnston <jjohnstn@redhat.com>
+
+ * libc/include/stdio.h (BUFSIZ): Define to __BUFSIZ__ if provided,
+ otherwise default.
+
+2001-07-12 Aldy Hernandez <aldyh@redhat.com>
+
+ * libc/machine/mips/setjmp.S: Allow mips16 and mips64 to coexist.
+
+2001-06-27 Nick Clifton <nickc@cambridge.redhat.com>
+
+ * libc/include/machine/ieeefp.h (__IEEE_BYTES_LITTLE_ENDIAN):
+ Define for little endian ARMs.
+
+ * libc/stdlib/mprec.h (Storeinc): Use little endian version if
+ __IEEE_BYTES_LITTLE_ENDIAN is defined.
+
+2001-06-11 Danny Smith <dannysmith@users.sourceforge.net>
+
+ * /libc/include/ctype.h (is* and to* macros): Do not define if C++.
+
+2001-06-11 Egor Duda <deo@logos-m.ru>
+
+ * libc/ctype/ctype_.c: When compiled with gcc on platforms
+ with signed char, make _ctype_[-128] ... _ctype[-1] refer to
+ initialized memory region. Platform can define COMPACT_CTYPE
+ to avoid allocation of the additional 128 bytes of data.
+ Add pointer to _ctype_ array. Always initialize all _ctype_
+ array elements.
+
+2001-06-08 Jonathan Larmour <jlarmour@redhat.com>
+
+ * libc/stdlib/mbtowc_r.c (_mbtowc_r): Avoid dereferencing
+ NULL pointer.
+
+2001-05-28 Nick Clifton <nickc@cambridge.redhat.com>
+
+ * libc/stdio/vfprintf.c (_VFPRINTF_R): Handle printf ("%#.0o",0)
+
+2001-05-25 Nick Clifton <nickc@cambridge.redhat.com>
+
+ * libc/machine/xscale/memcmp.c: Fix bug when both pointers have
+ matching, non-word alignment, and the length is <= 4 but more than
+ enough to move them over a word boundary.
+ Add comments explaining what each instruction does.
+
+Mon May 7 20:39:25 2001 Christopher Faylor <cgf@cygnus.com>
+
+ * libc/include/sys/stat.h: Revert March 3, Cygwin change.
+ * libc/include/sys/unistd.h: Ditto.
+
+2001-05-04 Earnie Boyd <earnie@users.sourceforge.net>
+
+ * libc/string/strrchr.c: Use strchr for the speed improvements.
+
+2001-05-01 Jeff Johnston <jjohnstn@redhat.com>
+
+ * libc/stdio/findfp (__sinit)[HAVE_FCNTL]: For platforms that have
+ real file systems, let __smakebuf() determine if line buffering
+ should be used for stdout.
+
+2001-04-27 Jeff Johnston <jjohnstn@redhat.com>
+
+ * libc/stdio/vfscanf.c (__svfscanf_r): Initialize new_exp local var.
+
+2001-04-27 Jeff Johnston <jjohnstn@redhat.com>
+
+ * libc/include/stdlib.h: Add prototype for _strtod_r.
+
+2001-04-24 Charles Wilson <cwilson@ece.gatech.edu
+
+ * libc/stdio/vprintf.c (vprintf): fix signature to use _DEFUN
+ * libc/stdio/vprintf.c (_vprintf_r): new function
+ * libc/stdio/vsnprintf.c (vsnprintf): fix signature to use _DEFUN
+ * libc/stdio/vsnprintf.c (_vsnprintf_r): fix signature to use
+ _DEFUN, and call _vfprintf_r, not vfprintf.
+ * libc/stdio/vsprintf.c (vsprintf.c): fix signature to use _DEFUN
+ * libc/stdio/vsprintf.c (_vsprintf_r): fix signature to use
+ _DEFUN, and call _vfprintf_r, not vfprintf.
+
+2001-04-22 Earnie Boyd <earnie@users.sourceforge.net>
+
+ * libc/include/sys/unistd.h [X_OK]: Use better protection against
+ Cygwin X_OK definitions in sys/file.h.
+
+Fri Apr 20 23:17:51 2001 Christopher Faylor <cgf@cygnus.com>
+
+ * libc/include/sys/time.h: Define timercmp and other macros for
+ __CYGWIN__, too.
+
+2001-04-20 Jeff Johnston <jjohnstn@redhat.com>
+
+ * acinclude.m4: Added --enable-malloc-debugging configure flag.
+ * configure.host: For Cygwin specify -DMALLOC_PROVIDED if
+ --enable-malloc-debugging selected.
+ * aclocal.m4 configure: Regenerated.
+ libm/aclocal.m4 libm/configure: Ditto.
+ * libc/aclocal.m4 libc/configure: Ditto.
+ * libc/machine/aclocal.m4 libc/machine/configure: Ditto.
+ * libc/machine/*/aclocal.m4 libc/machine/*/configure: Ditto.
+ * libc/sys/aclocal.m4 libc/sys/configure: Ditto.
+ * libc/sys/*/aclocal.m4 libc/sys/*/configure: Ditto.
+ * doc/aclocal.m4 doc/configure: Ditto.
+
+2001-04-20 Jeff Johnston <jjohnstn@redhat.com>
+
+ * libc/include/stdio.h[!_REENT_ONLY]: Moved various functions together
+ into one list.
+ [!__STRICT_ANSI__]: Moved non-ANSI I/O functions in this list.
+ (vfscanf, vscanf, vsscanf, _vfscanf_r, _vscanf_r, _vsscanf_r): New
+ function prototypes.
+ (_fscanf_r, _sscanf_r): Ditto.
+ * libc/include/stdlib.h: Added _strtod_r prototype.
+ * libc/stdio/Makefile.am: Add new v*scanf functions.
+ * libc/stdio/Makefile.in: Regenerate.
+ * libc/stdio/fscanf.c: Reorganized so HAVE_STDC only affects prototype
+ and code is shared. Added reentrant _fscanf_r which calls __svfscanf_r.
+ * libc/stdio/scanf.c: Changed to call __svfscanf_r.
+ * libc/stdio/sscanf.c: Changed documentation to add reentrant routines.
+ (sscanf): Changed to call __svfscanf_r with _REENT argument.
+ (_sscanf_r): New routine.
+ * libc/stdio/local.h: Removed __svfscanf prototype and replaced it
+ with __svfscanf_r prototype.
+ * libc/stdio/vfscanf.c (vfscanf, _vfscanf_r: New
+ routines.
+ (__svfscanf_r): Reentrant version of __svfscanf which takes reetrancy
+ structure as argument as calls reentrant versions of helper functions
+ (e.g. _strtol_r, _strtoul_r). Also replaced calls to atol and atof
+ to _strtol_r and _strtod_r respectively.
+ * libc/stdio/vfscanf.c: Also changed __svfscanf to call __svfscanf_r.
+ * libc/stdlib/strtod.c (strtod): Changed to call _strtod_r with
+ _REENT argument.
+ * libc/stdio/vscanf.c: New file.
+ * libc/stdio/vsscanf.c: Ditto.
+
+2001-04-19 Robert Collins <rbtcollins@hotmail.com>
+
+ * include/time.h[__CYGWIN__]: Define tzname to _tzname if not defined.
+ Define daylight to _daylight if it is not defined
+ Prepare a variable export of timezone based on timezonevariable.
+ (Cannot be used with the timezone() function.)
+
+2001-04-17 Stephen L. Moshier <moshier@moshier.ne.mediaone.net>
+
+ * newlib/libm/math/ef_asin.c (pio2_hi, pio2_lo, pio4_hi):
+ Correct the numerical values.
+
+2001-04-13 Robert Collins <rbtcollins@hotmail.com>
+
+ * libc/include/sys/unistd.h: Add pthread_atfork (Cygwin only).
+
+Thu Apr 12 23:11:00 2001 Corinna Vinschen <corinna@vinschen.de>
+
+ * libc/include/sys/errno.h: Add ECASECLASH to indicate case clash
+ on case insensitve file systems.
+
+2001-04-12 Robert Collins <rbtcollins@hotmail.com>
+
+ * libc/include/sys/features.h: Add appropriate defines for Cygwin
+ pthread support.
+ * libc/include/sys/signal.h: Remove unneeded __CYGWIN__ protection.
+ * libc/include/sys/types.h: Protect __CYGWIN__ from the rtems pthreads
+ types. Include <cygwin/types.h> for the cygwin specific typedefs.
+
+2001-04-04 Richard Sandiford <rsandifo@redhat.com>
+
+ * libc/include/machine/ieeefp.h: Comment about new configuration
+ macros _FLT_LARGEST_EXPONENT_IS_NORMAL and _FLT_NO_DENORMALS.
+ * libm/common/fdlib.h: Define new macros for testing floats.
+ * libm/common/sf_*: Use them.
+ * libm/math/ef_*: Likewise.
+ * libm/math/sf_*: Likewise.
+
+2001-03-29 Jeff Johnston <jjohnstn@redhat.com>
+
+ * libc/sys/arm/setjmp.S: Added .code 16 specifier for thumb-mode
+ prolog to by-pass possible assembler error.
+
+2001-03-21 Egor Duda <deo@logos-m.ru>
+
+ Allow building internal stubs for non-reentrant syscalls
+ if target provides its own malloc
+ * libc/reent/reent.c (errno): Move definition here.
+ * libc/reent/sbrkr.c: From here.
+
+2001-03-20 Danny Smith <dannysmith@users.sourceforge.net>
+
+ * libc/include/sys/types.h (BSD int typedefs): Guard with
+ _BSDTYPES_DEFINED rather than _WINSOCK_H.
+ (fd_set): Add !defined __USE_W32_SOCKETS to guard; define
+ _SYS_TYPES_FD_SET.
+ * libc/include/sys/unistd.h (gethostname): Don't declare if defined
+ (_WINSOCK_H) || defined (__USE_W32_SOCKETS).
+
+Sat Mar 17 18:30:00 2001 Corinna Vinschen <corinna@vinschen.de>
+
+ * libc/include/sys/unistd.h: Add _PC_POSIX_PERMISSONS and
+ _PC_POSIX_SECURITY constants for Cygwin.
+
+Wed Mar 14 9:34:00 2001 Corinna Vinschen <corinna@vinschen.de>
+
+ * libc/sys/cygwin/crt0.c: Add copyright hint.
+ * libc/sys/cygwin/sys/dirent.h: Ditto.
+ * libc/sys/cygwin/sys/param.h: Ditto.
+ * libc/sys/cygwin/sys/utime.h: Ditto.
+ * libc/sys/cygwin/sys/utmp.h: Ditto.
+
+2001-03-13 Alexandre Oliva <aoliva@redhat.com>
+
+ * libc/stdio/vfprintf.c (QUADINT) [_NO_LONGLONG]: Make it
+ equivalent to LONGINT.
+
+2001-03-08 Richard Sandiford <rsandifo@redhat.com>
+
+ * (libc/include/machine/setjmp.h): Use 23 long long ints for a
+ jmpbuf on MIPS64 targets.
+ * (libc/machine/mips/setjmp.S): Add MIPS64 version.
+
+Wed Mar 7 16:02:07 2001 Christopher Faylor <cgf@cygnus.com>
+
+ * libc/include/sys/config.h: Use ssize_t for Cygwin read/write
+ declarations.
+
+Mon Mar 5 21:48:54 2001 J"orn Rennecke <amylaar@redhat.com>
+
+ * libc/include/sys/config.h (_READ_WRITE_RETURN_TYPE): Define.
+ For RTEMS, define to be ssize_t. Default to int if not defined.
+ * libc/stdio/sscanf.c (eofread): Return _READ_WRITE_RETURN_TYPE.
+ * libc/stdio/stdio.c (__sread, __swrite): Likewise.
+ * libc/stdio/local.h (__sread, __swrite): Likewise.
+ * libc/include/sys/reent.h (_read, _write): Likewise.
+ * libc/include/sys/unistd.h (read, write, _read, _write): Likewise.
+ * libc/syscalls/sysread.c (read): Likewise.
+ * libc/syscalls/syswrite.c (write): Likewise.
+
+2001-03-05 Jeff Johnston <jjohnstn@redhat.com>
+
+ * libc/time/mktime.c: Add L suffix to _SEC_IN_xxxx constants.
+
+Sat Mar 3 00:34:14 2001 Christopher Faylor <cgf@cygnus.com>
+
+ * libc/include/sys/stat.h: Use special defines for executable stat bits
+ when compiling for Cygwin.
+ * libc/include/sys/unistd.h: Use special define for X_OK when compiling
+ for Cygwin.
+
+2001-03-02 Jeff Johnston <jjohnstn@redhat.com>
+
+ * libc/string/strtok.c: Add #undef of __STRICT_ANSI__ so prototype
+ of strtok_r is always defined.
+
+2001-03-02 Jeff Johnston <jjohnstn@redhat.com>
+
+ * libc/include/machine/ansi.h: New dummy header file.
+
+2001-02-22 Jeff Johnston <jjohnstn@redhat.com>
+
+ * libc/include/machine/setjmp-dj.h: With DJ Delorie's permission,
+ changed the copyright information to allow free modification of the
+ file with no reference to "copying.dj".
+ * libc/include/sys/stat-dj.h: Ditto.
+ * libc/machine/i386/setjmp.S: Ditto.
+ * libc/sys/h8300hms/sys/file.h: Ditto.
+ * libc/sys/sysmec/access.c: Ditto.
+ * libc/sys/sysnecv850/access.c: Ditto.
+ * libc/stdio/mktemp.c: Fixed typo for the word copyright.
+ * libc/stdlib/getenv_r.c: Ditto.
+ * libc/stdlib/putenv_r.c: Ditto.
+ * libc/stdlib/setenv_r.c: Ditto.
+ * libc/stdlib/getenv.c: Removed DJ reference since any possible
+ modifications will now be in the _r version of this file.
+ * libc/stdlib/putenv.c: Ditto.
+ * libc/stdlib/setenv.c: Ditto.
+ * libc/sys/go32/copying.dj: Removed DJ's address which is no longer
+ valid. Added a reference to DJ's web page that contains his address.
+ * libc/sys/go32/*.s: Removed references to DJ's old address.
+ * libc/sys/go32/*.c: Ditto.
+ * libc/sys/go32/*.h: Ditto.
+ * libc/sys/go32/*.S: Ditto.
+ * libc/sys/go32/sys/*.h: Ditto.
+
+2001-02-21 Jeff Johnston <jjohnstn@redhat.com>
+
+ * libc/stdio/fdopen.c (fdopen): Protect calls to _fcntl() with
+ HAVE_FCNTL flag check.
+ * configure.host: Define HAVE_FCNTL for Cygwin, go32, RTEMS, sparc64,
+ powerpcle, x86 netware, x86 sco, x86 Linux and Vxworks.
+
+Thu Feb 15 01:39:51 2001 Christopher Faylor <cgf@cygnus.com>
+
+ * libc/include/sys/signal.h: Always include sys/types.h under Cygwin.
+
+2001-02-14 Kazuhiro Fujieda <fujieda@jaist.ac.jp>
+
+ * libc/include/stdlib.h: Add declarations of rand48 functions and
+ their reentrant versions.
+ * libc/include/sys/reent.h: Move macros from rand48.h. Add
+ struct _rand48 for shared parameters of rand48 functions.
+ (struct _reent): Add a variable _r48 of struct _rand48.
+ (_REENT_INIT): Add _r48 initialization.
+ * libc/stdlib/Makefile.am (lib_a_SOURCES): Add rand48 functions.
+ (CHEWOUT_FILES): Add rand48.def.
+ * libc/stdlib/Makefile.am: Add dependencies for rand48 functions.
+ * libc/stdlib/Makefile.in: Regenerated.
+ * libc/stdlib/drand48.c (drand48, _drand48_r): Derived from the
+ NetBSD C library.
+ * libc/stdlib/erand48.c (erand48, _erand48_r): Ditto.
+ * libc/stdlib/jrand48.c (jrand48, _jrand48_r): Ditto.
+ * libc/stdlib/lcong48.c (lcong48, _lcong48_r): Ditto.
+ * libc/stdlib/lrand48.c (lrand48, _lrand48_r): Ditto.
+ * libc/stdlib/mrand48.c (mrand48, _mrand48_r): Ditto.
+ * libc/stdlib/nrand48.c (nrand48, _nrand48_r): Ditto.
+ * libc/stdlib/seed48.c (seed48, _seed48_r): Ditto.
+ * libc/stdlib/srand48.c (srand48, _srand48_r): Ditto.
+ * libc/stdlib/rand48.c (__dorand48): Ditto.
+ * libc/stdlib/rand48.h: Ditto, and modify declarations of global
+ parameters into macros referring them in the reentrant structure.
+
+2001-02-12 Jeff Johnston <jjohnstn@redhat.com>
+
+ * libc/include/sys/stat.h: Add mknod for Cygwin now that
+ Cygwin definition has correct prototype.
+
+2001-02-08 Jeff Johnston <jjohnstn@redhat.com>
+
+ * libc/include/sys/stat.h: Must revert change for mknod
+ for CYGWIN until winsup/cygwin/syscalls.cc changes mknod
+ prototype.
+
+2001-02-08 Jeff Johnston <jjohnstn@redhat.com>
+
+ * libc/include/stdio.h: Revert putw prototype.
+
+2001-02-08 Edward M. Lee <tailbert@yahoo.com>
+
+ * libc/include/grp.h: add prototype for initgroups.
+ * libc/include/stdio.h: fix prototype for putw.
+ * libc/include/sys/signal.h: add prototype for killpg.
+ * libc/include/sys/stat.h: enable mknod/lstat for CYGWIN.
+ * libc/include/sys/unistd.h: add prototypes for getpgid, setpgrp,
+ vhangup and remove duplicate sysconf prototype.
+
+2001-02-07 Jeff Johnston <jjohnstn@redhat.com>
+
+ * libc/sys/rtems/sys/types.h: Removed.
+
+2001-02-05 Charles Wilson <cwilson@ece.gatech.edu>
+
+ * libc/include/locale.h: add LC_MESSAGES definition
+
+2001-02-01 Alexandre Oliva <aoliva@redhat.com>
+
+ * libc/sys/sh/sys/syscall.h (SYS_get_argc, SYS_get_argN_len,
+ SYS_get_argN):
+ * libc/sys/sh/syscalls.c (__setup_argv_for_main,
+ __setup_argv_and_call_main): New.
+
+2001-01-31 Jeff Johnston <jjohnstn@redhat.com>
+
+ * libc/include/stdio.h (FILENAME_MAX): Changed to use __FILENAME_MAX__
+ if defined.
+ (FOPEN_MAX): Changed to use __FOPEN_MAX__ if defined.
+ (L_tmpnam): Changed to use __L_tmpnam__ if defined.
+ * libc/include/sys/config.h: Changed to set __FILENAME_MAX__
+ appropriately for Cygwin and RTEMS so not to exceed PATH_MAX.
+
+Mon Jan 29 23:03:06 2001 Christopher Faylor <cgf@cygnus.com>
+
+ * libc/stdlib/mallocr.c: Undefine windows preprocessor variables when
+ compiling under Cygwin.
+
+2001-01-29 Jeff Johnston <jjohnstn@redhat.com>
+
+ * libc/include/math.h (signgam): Change to errno-like solution
+ using a function to return the address of the real signgam.
+ * libc/reent/signgam.c: New file containing __signgam().
+ * libc/reent/Makefile.am: Added signgam.c to list of files.
+ * libc/reent/Makefile.in: Regenerated.
+
+2001-01-25 Alexandre Oliva <aoliva@redhat.com>
+
+ * libc/sys/sh/syscalls.c (_times): New.
+
+ * configure.host (sh*-*-*): Add -DHAVE_GETTIMEOFDAY to newlib_cflags.
+ * libc/sys/sh/syscalls.c (_gettimeofday): New.
+
+2001-01-23 Jeff Johnston <jjohnstn@redhat.com>
+
+ * libc/include/math.h (signgam): Regress previous fix as
+ it does not handle programs with extern int signgam in them.
+
+2001-01-23 Jeff Johnston <jjohnstn@redhat.com>
+
+ * libc/include/math.h (signgam): Changed to a macro refering to
+ its location in the reentrant structure.
+
+2001-01-23 Jeff Johnston <jjohnstn@redhat.com>
+
+ * libc/stdio/vfprintf.c (_VFPRINTF_R): Modification to fix
+ that suppressed . for %.0f, 0.1. Check now looks if there
+ are padding zeroes (expt) in addition to any digits (ndig) to
+ print.
+
+2001-01-18 Jeff Johnston <jjohnstn@redhat.com>
+
+ * libc/sys/arc/Makefile.am: New file.
+ * libc/sys/arc/Makefile.in: Ditto.
+ * libc/sys/arc/aclocal.m4: Ditto.
+ * libc/sys/arc/configure: Ditto.
+ * libc/sys/arc/configure.in: Ditto.
+ * libc/sys/arc/crt0.S: Ditto.
+ * libc/sys/arc/isatty.c: Ditto.
+ * libc/sys/arc/mem-layout.c: Ditto.
+ * libc/sys/arc/sbrk.c: Ditto.
+ * libc/sys/arc/syscalls.c: Ditto.
+ * libc/sys/arc/sys/syscall.h: Ditto.
+
+Wed Jan 17 23:20:56 2001 Christopher Faylor <cgf@cygnus.com>
+
+ * libc/include/sys/unistd.h: Use correct declaration for setdtablesize.
+
+Fri Jan 12 00:34:31 2001 Christopher Faylor <cgf@cygnus.com>
+
+ * libc/include/sys/signal.h: Add some SA_* defines for Cygwin.
+
+Thu Jan 11 20:42:06 2001 Earnie Boyd <earnie_boyd@yahoo.com>
+
+ * libc/include/sys/features.h: __CYGWIN__ preferred over __CYGWIN32__
+
+2001-01-09 Nick Clifton <nickc@redhat.com>
+
+ * configure.host (v859): Remove unsupported compiler options.
+
+Fri Jan 5 19:57:00 EST 2001 Aaron J. Grier <aaron@frye.com>
+
+ * src/newlib/configure.host (*-*-rtems*): add printf long long
+ support for RTEMS.
+
+2000-12-19 Graham Stott <grahams@redhat.com>
+
+ * libc/machine/xscale/memcmp.c (memcmp): Add clobber for "lr".
+
+Wed Dec 14 Jeff Johnston <jjohnstn@redhat.com>
+
+ * configure.host: Turn on long double I/O for Cygwin.
+
+Wed Dec 14 Jeff Johnston <jjohnstn@redhat.com>
+
+ * MAINTAINERS: Removed Ranjith.
+ * NEWS: Updated for 1.9.0.
+ * README: Updated.
+ * acinclude.m4: Updated to release 1.9.0.
+ * aclocal.m4 configure
+ doc/aclocal.m4 doc/configure libc/aclocal.m4 libc/configure
+ libc/machine/aclocal.m4 libc/machine/configure
+ libc/machine/a29k/aclocal.m4 libc/machine/a29k/configure
+ libc/machine/arm/aclocal.m4 libc/machine/arm/configure
+ libc/machine/d10v/aclocal.m4 libc/machine/d10v/configure
+ libc/machine/d30v/aclocal.m4 libc/machine/d30v/configure
+ libc/machine/fr30/aclocal.m4 libc/machine/fr30/configure
+ libc/machine/h8300/aclocal.m4 libc/machine/h8300/configure
+ libc/machine/h8500/aclocal.m4 libc/machine/h8500/configure
+ libc/machine/hppa/aclocal.m4 libc/machine/hppa/configure
+ libc/machine/i386/aclocal.m4 libc/machine/i386/configure
+ libc/machine/i960/aclocal.m4 libc/machine/i960/configure
+ libc/machine/m32r/aclocal.m4 libc/machine/m32r/configure
+ libc/machine/m68k/aclocal.m4 libc/machine/m68k/configure
+ libc/machine/m88k/aclocal.m4 libc/machine/m88k/configure
+ libc/machine/mips/aclocal.m4 libc/machine/mips/configure
+ libc/machine/mn10200/aclocal.m4 libc/machine/mn10200/configure
+ libc/machine/mn10300/aclocal.m4 libc/machine/mn10300/configure
+ libc/machine/necv70/aclocal.m4 libc/machine/necv70/configure
+ libc/machine/powerpc/aclocal.m4 libc/machine/powerpc/configure
+ libc/machine/sh/aclocal.m4 libc/machine/sh/configure
+ libc/machine/sparc/aclocal.m4 libc/machine/sparc/configure
+ libc/machine/tic80/aclocal.m4 libc/machine/tic80/configure
+ libc/machine/v850/aclocal.m4 libc/machine/v850/configure
+ libc/machine/w65/aclocal.m4 libc/machine/w65/configure
+ libc/machine/xscale/aclocal.m4 libc/machine/xscale/configure
+ libc/machine/z8k/aclocal.m4 libc/machine/z8k/configure
+ libc/sys/aclocal.m4 libc/sys/configure
+ libc/sys/a29khif/aclocal.m4 libc/sys/a29khif/configure
+ libc/sys/arm/aclocal.m4 libc/sys/arm/configure
+ libc/sys/cygwin/aclocal.m4 libc/sys/cygwin/configure
+ libc/sys/d10v/aclocal.m4 libc/sys/d10v/configure
+ libc/sys/decstation/aclocal.m4 libc/sys/decstation/configure
+ libc/sys/go32/aclocal.m4 libc/sys/go32/configure
+ libc/sys/h8300hms/aclocal.m4 libc/sys/h8300hms/configure
+ libc/sys/h8500hms/aclocal.m4 libc/sys/h8500hms/configure
+ libc/sys/linux/aclocal.m4 libc/sys/linux/configure
+ libc/sys/m88kbug/aclocal.m4 libc/sys/m88kbug/configure
+ libc/sys/netware/aclocal.m4 libc/sys/netware/configure
+ libc/sys/rtems/aclocal.m4 libc/sys/rtems/configure
+ libc/sys/sh/aclocal.m4 libc/sys/sh/configure
+ libc/sys/sparc64/aclocal.m4 libc/sys/sparc64/configure
+ libc/sys/sun4/aclocal.m4 libc/sys/sun4/configure
+ libc/sys/sysmec/aclocal.m4 libc/sys/sysmec/configure
+ libc/sys/sysnec810/aclocal.m4 libc/sys/sysnec810/configure
+ libc/sys/sysnecv850/aclocal.m4 libc/sys/sysnecv850/configure
+ libc/sys/sysvi386/aclocal.m4 libc/sys/sysvi386/configure
+ libc/sys/sysvnecv70/aclocal.m4 libc/sys/sysvnecv70/configure
+ libc/sys/tic80/aclocal.m4 libc/sys/tic80/configure
+ libc/sys/w65/aclocal.m4 libc/sys/w65/configure
+ libc/sys/z8ksim/aclocal.m4 libc/sys/z8ksim/configure
+ libm/aclocal.m4 libm/configure: Regenerated.
+
+Wed Dec 13 11:52:00 2000 Corinna Vinschen <vinschen@cygnus.com>
+
+ * libc/include/sys/unistd.h: Add declarations for `chroot' and `getwd'
+ when __CYGWIN__ is defined.
+
+2000-12-13 Jeff Johnston <jjohnstn@redhat.com>
+
+ * libc/stdlib/ldtoa.c (_ldcheck): New routine
+ that categorizes a long double as NaN, Infinity, or other.
+ * libc/stdio/vfprintf.c [WANT_IO_LONG_DBL](_VFPRINTF_R): Removed
+ isinfl and isnanl static routines which were i386-specific. Changed
+ calls to the two removed routines to a single _ldcheck call.
+ * libc/stdio/vfieeefp.h (ldieee): Fixed missing semi-colons.
+
+2000-12-13 Jeff Johnston <jjohnstn@redhat.com>
+
+ * Makefile.am: Fixed install-data-local target to use
+ $(mkinstalldirs) for the installed header files to ensure
+ the directories exist before copying.
+ * Makefile.in: Regenerated.
+
+2000-12-12 Jeff Johnston <jjohnstn@redhat.com>
+
+ * libc/include/sys/unistd.h: Restored Cygwin _SC
+ constants and moved new constants appropriately
+ so Cygwin will build.
+
+2000-12-11 Joel Sherrill <joel@OARcorp.com>
+
+ * Merge RTEMS specific .h files into main libc/include.
+ * libc/sys/rtems/include/signal.h: Removed.
+ * libc/sys/rtems/include/time.h: Removed.
+ * libc/sys/rtems/sys/features.h: Removed.
+ * libc/sys/rtems/sys/sched.h: Removed.
+ * libc/sys/rtems/sys/siginfo.h: Removed.
+ * libc/sys/rtems/sys/signal.h: Removed.
+ * libc/sys/rtems/sys/time.h: Removed.
+ * libc/sys/rtems/sys/times.h: Removed.
+ definitions for time_t and clock_t since these are
+ no longer in time.h.
+ * libc/include/pthread.h: New file.
+ * libc/include/sys/sched.h: New file.
+ * libc/include/sys/features.h: New file.
+ * libc/include/time.h: Removed duplicate definition of clock_t
+ and time_t, get them from <sys/types.h> instead. Add prototypes
+ for POSIX clock and timer functionality.
+ * libc/sys/linux/sys/types.h: Changed to include
+ * libc/include/machine/types.h: Add _CLOCKID_T_ and _TIMER_T_.
+ * libc/include/sys/signal.h: Add more complete set of POSIX
+ signal functionality including real-time and threaded signals.
+ * libc/include/sys/types.h: Add clock_t, time_t, struct
+ timespec, and struct itimerspec. Centralizing these makes
+ things cleaner. RTEMS uses 64-bit dev_t.
+ Added numerous primitive definitions
+ for pthreads including macros, pthread_attr_t,
+ pthread_mutexattr_t, pthread_condattr_t, pthread_key_t,
+ pthread_once_t, and pthread_t.
+ * libc/include/sys/unistd.h: Added getlogin_r() prototype.
+ If RTEMS follow POSIX on read(), write() and sbrk() prototype.
+ Feature flags removed and moved to new file <sys/features.h>.
+ Full set of POSIX sysconf() constants
+
+2000-12-08 Werner Almesberger <Werner.Almesberger@epfl.ch>
+
+ * configure.host: Added x86 linux target.
+ * libc/unix/getpass.c (_PATH_PASSWD, _PASSWORD_LEN): Default
+ definitions provided if not already defined.
+ * libc/sys/linux/crt0.c: New file.
+ * libc/sys/linux/Makefile.am: Ditto.
+ * libc/sys/linux/Makefile.in: Ditto.
+ * libc/sys/linux/aclocal.m4: Ditto.
+ * libc/sys/linux/brk.c: Ditto.
+ * libc/sys/linux/configure: Ditto.
+ * libc/sys/linux/configure.in: Ditto.
+ * libc/sys/linux/getoptlong.c: Ditto.
+ * libc/sys/linux/ids.c: Ditto.
+ * libc/sys/linux/inode.c: Ditto.
+ * libc/sys/linux/io.c: Ditto.
+ * libc/sys/linux/linux.c: Ditto.
+ * libc/sys/linux/process.c: Ditto.
+ * libc/sys/linux/realpath.c: Ditto.
+ * libc/sys/linux/select.c: Ditto.
+ * libc/sys/linux/signal.c: Ditto.
+ * libc/sys/linux/systat.c: Ditto.
+ * libc/sys/linux/termios.c: Ditto.
+ * libc/sys/linux/time.c: Ditto.
+ * libc/sys/linux/wait.c: Ditto.
+ * libc/sys/linux/include/alloca.h: Ditto.
+ * libc/sys/linux/include/getopt.h: Ditto.
+ * libc/sys/linux/include/stdint.h: Ditto.
+ * libc/sys/linux/include/unistd.h: Ditto.
+ * libc/sys/linux/sys/cdefs.h: Ditto.
+ * libc/sys/linux/sys/dirent.h: Ditto.
+ * libc/sys/linux/sys/errno.h: Ditto.
+ * libc/sys/linux/sys/fcntl.h: Ditto.
+ * libc/sys/linux/sys/file.h: Ditto.
+ * libc/sys/linux/sys/ioctl.h: Ditto.
+ * libc/sys/linux/sys/resource.h: Ditto.
+ * libc/sys/linux/sys/signal.h: Ditto.
+ * libc/sys/linux/sys/stat.h: Ditto.
+ * libc/sys/linux/sys/syscall.h: Ditto.
+ * libc/sys/linux/sys/termios.h: Ditto.
+ * libc/sys/linux/sys/time.h: Ditto.
+ * libc/sys/linux/sys/types.h: Ditto.
+ * libc/sys/linux/sys/utmp.h: Ditto.
+ * libc/sys/linux/sys/utsname.h: Ditto.
+ * libc/sys/linux/sys/wait.h: Ditto.
+
+2000-12-08 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
+
+ * Makefile.am: $(INSTALL), $(INSTALL_DATA), and $(INSTALL_PROGRAM)
+ can be a relative path to $(top_srcdir)/install.sh so ensure the
+ autoconf detected settings are properly passed recursively.
+ Similarly, add AM_MAKEFLAGS to FLAGS_TO_PASS so they also get passed
+ properly to subdirectories.
+ * Makefile.in: Regenerated.
+
+2000-12-07 Jay Kulpinski <jskulpin@eng01.gdds.com>
+
+ * libc/stdio/vfprintf.c: Minor modification to avoid requiring
+ a floating point register unless really printing a floating
+ point number.
+
+2000-12-07 Jeff Johnston <jjohnstn@redhat.com>
+
+ * libc/stdlib/ldtoa.c: Removed include of alloca.h.
+ Also removed \r's.
+ (asctoeg): Replaced alloca call with stack array and malloc
+ when storage exceeds reasonable limit.
+ (e53toe): Fixed einfin calls missing ldp parameter.
+ (eiisinf): Hide behind check for LDBL_MANT_DIG == 64.
+
+2000-12-06 Jeff Johnston <jjohnstn@redhat.com>
+
+
+ * libc/stdio/vfscanf.c: Fix typo for _NO_LONGDBL macro.
+
+2000-12-06 Jeff Johnston <jjohnstn@redhat.com>
+
+ * libc/stdlib/Makefile.am: Added ldtoa.c to list of sources.
+ * libc/stdlib/Makefile.in: Regenerated.
+ * libc/stdio/floatio.h: Added suitable MAXEXP for long double.
+ * libc/stdio/vfieeefp.h: Added long double bit structures.
+ * libc/stdio/vfprintf.c[WANT_IO_LONG_DBL]: Added long double support.
+ [WANT_IO_LONG_DBL](isinfl, isnanl): New static long double routines.
+ (exponent): Changed expbuf to reasonable maximum instead of MAXEXP.
+ * libc/stdio/vfscanf.c[WANT_IO_LONG_DBL]: Added long double support.
+ * libc/stdlib/ldtoa.c: New file containing _ldtoa_r and
+ _strtold routines used for conversions between character
+ and long double.
+
+Wed Dec 6 12:01:00 2000 Corinna Vinschen <vinschen@cygnus.com>
+
+ * libc/include/stdlib.h: Add declarations for `mkstemp' and `mktemp'.
+
+2000-12-04 Joel Sherrill <joel@OARcorp.com>
+
+ * libc/include/machine/time.h: RTEMS systems can configure clock
+ tick rate so use sysconf() to ask.
+
+2000-12-04 Joel Sherrill <joel@OARcorp.com>
+
+ * libc/include/sys/times.h: Add reference to POSIX standard.
+
+2000-12-04 Joel Sherrill <joel@OARcorp.com>
+
+ * libc/include/sys/time.h: Added BSD timer manipulation macros
+ used by RTEMS code.
+
+2000-12-04 Joel Sherrill <joel@OARcorp.com>
+
+ * libc/sys/rtems/crt0.c: Add stubs for functions implicitly
+ referenced by code generated by gcc 2.8.1.
+ (a29k): Add stubs for V_SPILL, V_FILL, V_BSD_OS, V_EPI_OS to
+ satisfy gcc.
+
+2000-12-04 Joel Sherrill <joel@OARcorp.com>
+
+ * libc/stdlib/system.c: Avoid compiling do_system() for RTEMS.
+
+2000-12-04 Joel Sherrill <joel@OARcorp.com>
+
+ * libc/include/ieeefp.h: Added entries for OpenCores CPUs.
+
+2000-12-04 Joel Sherrill <joel@OARcorp.com>
+
+ * configure.host (or16, or32): New entries for OpenCores
+ OpenRisc CPUs.
+ (*-*-rtems*): Add -DNO_EXEC.
+
+2000-12-04 Keith Outwater <vac4050@cae597.rsc.raytheon.com>
+
+ * libc/include/sys/errno.h: Added comments on many error numbers.
+ * libc/string/strerror.c: Added some more strings.
+
+2000-11-30 Jeff Johnston <jjohnstn@redhat.com>
+
+ * libc/sys/sh/syscalls.c (_link): New stub.
+
+2000-11-29 Nick Clifton <nickc@redhat.com>
+
+ * configure.host: Add xscale target.
+ * libc/machine/xscale: New directory.
+ * libc/machine/xscale/Makefile.am: New file.
+ * libc/machine/xscale/Makefile.in: New file.
+ * libc/machine/xscale/aclocal.m4: New file.
+ * libc/machine/xscale/configure: New file.
+ * libc/machine/xscale/configure.in: New file.
+ * libc/machine/xscale/memchr.S: New file.
+ * libc/machine/xscale/memcmp.S: New file.
+ * libc/machine/xscale/memcpy.S: New file.
+ * libc/machine/xscale/memmove.S: New file.
+ * libc/machine/xscale/memset.S: New file.
+ * libc/machine/xscale/strchr.S: New file.
+ * libc/machine/xscale/strcmp.S: New file.
+ * libc/machine/xscale/strcpy.S: New file.
+ * libc/machine/xscale/strlen.S: New file.
+
+Sat Nov 25 11:24:00 2000 Corinna Vinschen <vinschen@cygnus.com>
+
+ * libc/include/sys/types.h: Change i to `__i' in FD_ZERO macro to
+ avoid compiler warnings.
+
+2000-11-22 Michael Meissner <meissner@redhat.com>
+
+ * libc/posix/execl.c (execl): Don't reference environ directly,
+ reference it only via a static pointer to avoid problems with some
+ shared library systems and with different uses of small data where
+ the user specifies his own version of environ.
+ * libc/posix/execv.c (execv): Ditto.
+ * libc/stdlib/getenv_r.c (_findenv_r): Ditto.
+ * libc/stdlib/setenv_r.c (_setenv_r,_unsetenv_r): Ditto.
+ * libc/stdlib/system.c (system, !cygwin32 case): Ditto.
+
+ * libc/stdlib/getenv.c (environ): Delete unused reference to
+ environ.
+
+ * libc/stdlib/getenv_r.c: Make initial comment friendlier to emacs
+ colorization.
+ * libc/stdlib/system.c: Ditto.
+
+Tue Nov 21 20:32:21 2000 Christopher Faylor <cgf@cygnus.com>
+
+ * libc/sys/cygwin/sys/dirent.h: Change definition to avoid necessity of
+ including windows headers.
+
+2000-11-20 Jeff Johnston <jjohnstn@redhat.com>
+
+ * libc/include/sys/unistd.h: Removed definition of MAXNAMLEN.
+ * libc/include/dirent.h: Added definition of MAXNAMLEN if
+ not defined by sys/dirent.h.
+ * libc/posix/execvp.c: Added include of dirent.h to get
+ MAXNAMLEN value which used to be in unistd.h.
+
+Mon Nov 6 12:56:00 2000 Corinna Vinschen <vinschen@cygnus.com>
+
+ * libc/include/sys/types.h: Change type of i to `size_t' in
+ FD_ZERO macro to avoid compiler warnings.
+
+Sun Oct 29 20:06:41 2000 Christopher Faylor <cgf@cygnus.com>
+
+ * libc/include/stdlib.h: Avoid declaring cfree under Cygwin.
+ * libc/include/malloc.h: Ditto. Also remove obsolete declaration.
+
+Tue Oct 24 20:16:00 2000 Corinna Vinschen <vinschen@cygnus.com>
+
+ * libc/include/sys/unistd.h: Add defines for sysconf values
+ _SC_NPROCESSORS_CONF, _SC_NPROCESSORS_ONLN, _SC_PHYS_PAGES and
+ _SC_AVPHYS_PAGES.
+
+Mon Oct 9 20:26:33 2000 Christopher Faylor <cgf@cygnus.com>
+
+ * libc/include/sys/unistd.h: Add getdtablesize and setdtablesize
+ declarations for __CYGWIN__.
+
+2000-09-19 Geoffrey Keating <geoffk@cygnus.com>
+
+ * libc/signal/signal.c (__sigtramp_r): ISO C requires
+ case labels to be integral constant expressions, so
+ use an if/else tree instead.
+ (_raise_r): Likewise.
+
+2000-09-13 Jeff Johnston <jjohnstn@redhat.com>
+
+ * libc/machine/v850/setjmp.S: Fixed tab problems caused by
+ clipping patch from e-mail reader.
+
+2000-09-13 Will Cohen <wcohen@redhat.com>
+
+ * libc/machine/v850/setjmp.S (_setjmp): Save r1 rather than r0.
+ Added return value 0.
+ (_longjmp): Allow longjmp to return value of second argument
+ passed to it.
+
+2000-09-06 Jeff Johnston <jjohnstn@redhat.com>
+
+ * libc/include/sys/types.h (FD_ZERO): Remove call to bzero and
+ inline code to prevent having to include another header file.
+
+Wed Sep 6 15:06:40 2000 Christopher Faylor <cgf@cygnus.com>
+
+ * Makefile.am: Fix space vs. tab problem in install-data-local.
+ * Makefile.in: Regenerate.
+
+Wed Sep 6 13:49:51 2000 Christopher Faylor <cgf@cygnus.com>
+
+ * libc/include/_ansi.h (_EXFUN): Define specially for __CYGWIN__.
+ (_EXPARM): New macro for defining a function parameter.
+ * libc/include/stdlib.h: Use _EXPARM.
+ * libc/stdlib/mallocr.c: Don't build cfree for Cygwin.
+
+2000-09-05 Manfred Hollstein <manfredh@redhat.com>
+
+ * Makefile.am (install-data-local): Use optional $(DESTDIR) where
+ required, as documented in the gnu coding standards.
+ * Makefile.in: Regenerate.
+
+2000-09-05 Jeff Johnston <jjohnstn@redhat.com>
+
+ * libc/include/fcntl.h (_FNDELAY): Changed to be _FNONBLOCK to
+ make O_NDELAY and O_NONBLOCK have the same value.
+
+2000-08-30 Kazu Hirata <kazu@hxi.com>
+
+ * libc/sys/h8300hms/crt0.S: Optimize for both speed and code size.
+
+2000-08-30 Werner Almesberger <Werner.Almesberger@epfl.ch>
+
+ * libc/posix/execve.c: included unistd.h for "_execve" prototype.
+ * libc/misc/unctrl.c libc/sys/sysvi386/crt0.c (sccsid): changed
+ "#ifndef lint" to "#if defined(LIBC_SCCS) && !defined(lint)" like
+ everywhere else.
+
+2000-08-30 Geoffrey Keating <geoffk@cygnus.com>
+
+ * libc/string/swab.c: Specify that it's defined in <unistd.h>.
+ * libc/include/string.h: Don't include <sys/types.h>,
+ as it causes really bad namespace pollution. Don't declare
+ swab(), it is properly declared in unistd.h.
+
+2000-08-29 Werner Almesberger <Werner.Almesberger@epfl.ch>
+
+ * libc/unix/getpwent.c (getpwnam, getpwuid, getpwent): removed
+ (broken) support for non-existent /etc/passwd field "comment".
+
+2000-08-27 Werner Almesberger <Werner.Almesberger@epfl.ch>
+
+ * libc/posix/scandir.c (DIRSIZ, scandir): use struct dirent.d_namlen
+ only if _DIRENT_HAVE_D_NAMLEN is defined.
+ (alphasort): aligned prototype with
+ libc/sys/cygwin/sys/dirent.h and simplified function body.
+ * libc/posix/telldir.c (telldir): changed "telldir" prototype to
+ long telldir (DIR *) as mentioned in annex B of POSIX.1
+
+2000-08-27 Werner Almesberger <Werner.Almesberger@epfl.ch>
+
+ * libc/machine/i386/i386mach.h: added SOTYPE_FUNCTION to set type
+ of global entry points if _I386MACH_NEED_SOTYPE_FUNCTION is defined;
+ Added __CLI and __STI macros (controlled via
+ _I386MACH_ALLOW_HW_INTERRUPTS macro).
+ * libc/machine/i386/f_atan2.S libc/machine/i386/f_atan2f.S
+ libc/machine/i386/f_frexp.S libc/machine/i386/f_frexpf.S
+ libc/machine/i386/f_ldexp.S libc/machine/i386/f_ldexpf.S
+ libc/machine/i386/f_log.S libc/machine/i386/f_log10.S
+ libc/machine/i386/f_log10f.S libc/machine/i386/f_logf.S
+ libc/machine/i386/f_tan.S libc/machine/i386/f_tanf.S
+ libc/machine/i386/memchr.S libc/machine/i386/memcmp.S
+ libc/machine/i386/memcpy.S libc/machine/i386/memmove.S
+ libc/machine/i386/memset.S libc/machine/i386/setjmp.S
+ libc/machine/i386/strchr.S libc/machine/i386/strlen.S:
+ (that's libc/machine/i386/*.S) added SOTYPE_FUNCTION(symbol)
+ for all global entry points.
+ * libc/machine/i386/setjmp.S: removed code replicated in
+ libc/machine/i386/i386mach.h and included i386mach.h instead;
+ Use __CLI and __STI instead of cli and sti.
+
+2000-08-25 DJ Delorie <dj@redhat.com>
+
+ * libc/include/sys/unistd.h (environ): this one isn't from the
+ DLL, no __IMPORT
+
+Fri Aug 25 13:37:11 2000 Christopher Faylor <cgf@cygnus.com>
+
+ * libc/stdlib/system.c (do_system): Eliminate explicit declaration of
+ environ when compiling under cygwin since it is already declared in
+ unistd.h.
+
+2000-08-23 Werner Almesberger <Werner.Almesberger@epfl.ch>
+
+ * libc/stdlib/mprec.c (ulp, b2d, d2b): changed a few expressions
+ like x << y-z to the equivalent x << (y-z).
+ (d2b): changed if statements with assignment to perform the
+ assignment prior to the if check.
+ * libc/reent/reent.c: included stdlib.h for "_free_r" prototype.
+ * libc/unix/getpass.c (getpass): moved "echo" assignment out of if.
+ * libc/unix/ttyname.c: included string.h for "strcpy" prototype.
+ * libc/unix/getcwd.c (ISDOT): added parentheses to clarify && and ||
+ precedence.
+ * libc/include/sys/unistd.h: added "vfork" prototype (for popen.c).
+ Added "_execve" prototype (for execl.c, execle.c, execv.c, and
+ execve.c).
+ * libc/posix/popen.c (popen): added parentheses to clarify && and ||
+ precedence.
+ * libm/math/e_cosh.c (__ieee754_cosh): changed parentheses to
+ clarify && and || precendence (and to remove pascalism).
+ * libm/math/e_sinh.c (__ieee754_sinh): Ditto.
+ * libm/math/s_infconst.c: added another pair of braces to all
+ initializers for __infinity (need three: for __infinity[1] array,
+ for union __dmath, and for i[2]).
+
+2000-08-23 Werner Almesberger <Werner.Almesberger@epfl.ch>
+
+ * libc/stdlib/abort.c: changed description: uses "raise" instead of
+ "getpid" and "kill"; added: uses "write" and "_exit".
+ Also included unistd.h for "_exit" prototype.
+ * libc/stdlib/system.c: included unistd.h for "execve" prototype,
+ reent.h for "_fork_r" and "_wait_r" prototypes.
+ (do_system): changed extern char *environ[] to POSIX-friendly
+ extern char **environ.
+ * libc/stdlib/wctomb_r.c: included string.h for "strlen" and "strcmp"
+ prototypes.
+ * libc/stdlib/remove.c: included reent.h for "_unlink_r" prototype.
+ * libc/reent/execr.c: included sys/wait.h for "wait" prototype.
+ * libc/reent/fstatr.c: included sys/stat.h for "fstat" prototype.
+ * libc/reent/openr.c: included fcntl.h for "open" prototype.
+ * libc/reent/signalr.c: included signal.h for "kill" prototype,
+ unistd.h for "getpid" prototype.
+ * libc/reent/statr.c: included sys/stat.h for "stat" prototype.
+ * libc/reent/timer.c: included sys/time.h for "gettimeofday" prototype.
+ * libc/unix/getut.c (utmpname): removed local, incorrect "strdup"
+ prototype. Also included stdlib.h for "abort", string.h for
+ "strdup" and "strncmp" prototypes.
+ * libc/unix/getlogin.c: included string.h for "strncmp", "memset", and
+ "strncpy", unistd.h for "read" and "close" prototypes.
+ * libc/posix/execvp.c: included string.h for "strchr", "strlen", and
+ "strcat" prototypes.
+
+2000-08-23 Werner Almesberger <Wernen Almesberger@epfl.ch>
+
+ * libc/stdio/stdio.c (__swrite): declare "oldmode" only if it's
+ used later (ifdef __SCLE)
+ * libc/stdio/vfscanf.c (__svfscanf): declare "state" only if it's
+ used later (ifdef MB_CAPABLE)
+ * libc/string/memset.c (memset): removed unused variables "count"
+ and "unaligned_addr"
+ * libc/locale/locale.c (_setlocale_r): declare "lc_ctype" and
+ "last_lc_ctype" only of they're used later (ifdef MB_CAPABLE)
+ * libc/unix/getpwent.c (getpwnam): removed unused variables "uid"
+ and "gid"
+
+2000-08-23 Werner Almesberger <Werner.Almesberger@epfl.ch>
+
+ * libc/stdlib/envlock.c: changed documented "__env_lock" and
+ "__env_unlock" prototype from "void *" or "char *" to
+ "struct _reent *" to match real function. Also added include
+ of envlock.h.
+ * libc/stdlib/mlock.c: changed documented "__malloc_lock" and
+ "__malloc_unlock" prototype from "void *" or "char *" to
+ "struct _reent *" to match real function.
+ * libc/stdlib/envlock.h: added "__env_lock" and "__env_unlock"
+ prototypes (for getenv_r.c and setenv_r.c).
+
+2000-08-22 Werner Almesberger <Werner.Almesberger@epfl.ch>
+
+ * libc/unix/getut.c (utmpname): added _CONST to reflect common use
+ and prototype in cygwin's utmp.h
+
+2000-08-16 Eric Fifer <efifer@sanwaint.com>
+
+ * libc/stdio/vfprintf.c (_vfprintf_r): suppress . with "%.0f", 0.1
+
+2000-08-09 Nick Clifton <nickc@cygnus.com>
+
+ * libc/sys/arm/setjmp.S: Recode to clean up function prologues and
+ epilogue and to allow the functions to be used in a Thumb based
+ toolchain.
+
+2000-08-08 Jeff Johnston <jjohnstn@redhat.com>
+
+ * libc/stdio/snprintf.c (snprintf, _snprintf_r): Fixed code
+ so size of 0 results in nothing being written to string.
+ Also fixed code so that when size is non-zero, there is only
+ a maximum of size - 1 characters written to the array and
+ a nul terminator is appended at the end.
+ * libc/stdio/vsnprintf.c (vsnprintf, _vsnprintf_r): Ditto.
+
+2000-08-01 DJ Delorie <dj@redhat.com>
+
+ * libc/include/sys/config.h: define __IMPORT appropriately
+ * libc/include/ctype.h (_ctype_): use __IMPORT
+ * libc/include/math.h (__infinity, signam, _LIB_VERSION): ditto
+ * libc/include/math.h (__mb_cur_max): ditto
+ * libc/include/time.h (_timezone, _daylight, _tzname): ditto
+ * libc/include/unctrl.h (__unctrl, __unctrllen): ditto
+ * libc/include/errno.h (_sys_errlist, _sys_nerr): ditto
+ * libc/include/unistd.h (environ): ditto
+
+2000-07-28 Michael Meissner <meissner@redhat.com>
+
+ * libc/include/math.h (__infinity): Declare as an array without
+ bounds to get around small data support. Rewrite Cygwin support
+ to be more general.
+ * libm/math/s_infconst.c (__infinity): Ditto.
+ * libm/mathfp/s_infconst.c (__infinity): Ditto.
+
+Thu Jul 27 10:46:01 2000 Christopher Faylor <cgf@cygnus.com>
+
+ * libc/include/math.h: Use appropriate dll import linkage for
+ __infinity under Cygwin.
+
+2000-07-13 DJ Delorie <dj@cygnus.com>
+
+ * libc/stdio/vfprintf.c: pad 0.0 correctly with %e
+
+Wed Jun 28 14:08:00 2000 Keith Walker <keith.walker@arm.com>
+
+ * libc/sys/arm/crt0.S (.LC30): Added missing length parameter
+ to argument list for AngelSWI_Reason_GetCmdLine.
+
+Tue Jun 27 15:49:00 2000 Marek Michalkiewicz <marekm@linux.org.pl>
+
+ * configure.host: Add support for AVR target.
+ * libc/include/machine/ieeefp.h: Likewise.
+ * libc/include/sys/config.h: Likewise.
+
+Thu Jun 22 18:35:00 2000 Ranjith Kumaran <ranjith@cygnus.com>
+
+ * README: Newlib 1.8.2 must be built in a separate directory
+ than the sources.
+
+Tue Jun 20 14:30:00 2000 Jeff Johnston <jjohnstn@cygnus.com>
+
+ * libc/include/sys/reent.h (_rand_next): Added __extension__
+ qualifier as long long type is not strict ANSI.
+ * libc/stdlib/rand.c (rand): Added __extension__ qualifier
+ to long long constant.
+
+Fri Jun 16 23:02:00 2000 Corinna Vinschen <corinna@vinschen.de>
+
+ * libc/include/sys/unistd.h: Add prototypes for `seteuid' and
+ `setegid' provided by Cygwin.
+
+Thu Jun 15 0:21:00 2000 Corinna Vinschen <corinna@vinschen.de>
+
+ * libc/stdio/fdopen.c: Take explicit given bin/textmode into
+ account for Cygwin.
+
+Fri Jun 9 14:28:00 2000 Jeff Johnston <jjohnstn@cygnus.com>
+
+ * libc/include/sys/reent.h (_rand_next): Changed to
+ unsigned long long and moved to end of _reent struct in _new union.
+ (_REENT_INIT): Changed to move _rand_next initialization.
+ * libc/stdlib/rand.c (rand): Changed to use unsigned long long
+ linear congruential algorithm that is used by DJGPP.
+
+Thu Jun 8 21:18:00 2000 Ranjith Kumaran <ranjith@cygnus.com>
+
+ * libc/include/stdlib.h: Set RAND_MAX to __RAND_MAX.
+ * libc/include/sys/config.h: Define __RAND_MAX.
+
+Thu Jun 8 17:54:00 2000 Jeff Johnston <jjohnstn@cygnus.com>
+
+ * libc/stdlib/rand_r.c: New algorithm that meets minimal
+ standard.
+
+Fri Jun 2 23:02:11 2000 Christopher Faylor <cgf@cygnus.com>
+
+ * libc/include/string.h: Work around problem with strsignal and gdb.
+
+Tue May 30 13:13:01 2000 Christopher Faylor <cgf@cygnus.com>
+
+ * libc/include/ctype.h: __CYGWIN32__ -> __CYGWIN__
+ * libc/include/malloc.h: Ditto.
+ * libc/include/process.h: Ditto.
+ * libc/include/stdio.h: Ditto.
+ * libc/include/stdlib.h: Ditto.
+ * libc/include/time.h: Ditto.
+ * libc/include/machine/setjmp.h: Ditto.
+ * libc/include/sys/errno.h: Ditto.
+ * libc/include/sys/signal.h: Ditto.
+ * libc/include/sys/stat.h: Ditto.
+ * libc/include/sys/time.h: Ditto.
+ * libc/include/sys/unistd.h: Ditto.
+ * libc/include/string.h: Ditto. strsignal should return a const char *.
+
+2000-05-26 Marek Michalkiewicz <marekm@linux.org.pl>
+
+ * libm/common/s_expm1.c (expm1): Add curly braces, avoid warnings.
+ * libm/common/s_log1p.c (log1p): Likewise.
+ * libm/common/s_scalbn.c (scalbn): Likewise.
+ * libm/math/e_log.c: Likewise.
+ * libm/math/e_asin.c: Likewise.
+ * libm/math/ef_asin.c: Likewise.
+ * libm/math/e_j0.c (pzero, qzero): Remove redundant test.
+ * libm/math/e_j1.c (pone, qone): Likewise.
+ * libm/math/ef_j0.c (pzerof, qzerof): Likewise.
+ * libm/math/ef_j1.c (ponef, qonef): Likewise.
+ * libm/mathfp/e_j0.c (pzero, qzero): Likewise.
+ * libm/mathfp/e_j1.c (pone, qone): Likewise.
+ * libm/mathfp/ef_j0.c (pzerof, qzerof): Likewise.
+ * libm/mathfp/ef_j1.c (ponef, qonef): Likewise.
+
+2000-05-19 DJ Delorie <dj@cygnus.com>
+
+ * libc/stdio/stdio.c (__stextmode): new, see if file is text mode
+ (__sread): always read in binary mode
+ (__swrite): always write in binary mode
+ * libc/include/stdio.h: no getc/putc macros for cygwin; causes
+ compatibility issues with different dll versions
+ * libc/stdio/fopen.c: use __stextmode
+ * libc/stdio/fdopen.c: ditto
+ * libc/stdio/freopen.c: ditto
+ * libc/stdio/findfp.c: set up __SCLE for std{in,out,err}
+ * libc/stdio/local.h: declare __stextmode
+
+2000-05-18 DJ Delorie <dj@cygnus.com>
+
+ * libc/stdio/fgets.c (fgets): perform CRLF conversions if __SCLE
+
+Mon May 15 18:54:00 2000 Jeff Johnston <jjohnstn@cygnus.com>
+
+ * libc/include/ctype.h: Changed tolower and toupper macros
+ to use __extension__ to prevent pedantic warnings.
+
+Mon May 15 14:26:00 2000 Joel Sherrill <joel@oarcorp.com>
+
+ * libc/sys/rtems/sys/time.h: Add macros for manipulating timeval
+ structures.
+
+Wed May 10 19:24:53 2000 Jim Wilson <wilson@cygnus.com>
+
+ * libc/include/machine/ieeefp.h: Add ia64 support.
+ * configure.host: Likewise.
+
+Wed May 10 13:52:24 2000 Egor Duda <deo@logos-m.ru>
+
+ * libc/time/asctime_r.c (asctime_r): Change output format. Day of
+ month is now padded with space, not zero. This now conforms to
+ ANSI standard.
+
+Wed May 03 17:57:00 2000 Corinna Vinschen <corinna@vinschen.de>
+
+ * libc/include/sys/errno.h: Add define for ENOSHARE ("No such
+ host or network path") used by cygwin. Add some comments.
+
+Tue May 02 23:45:48 2000 DJ Delorie <dj@cygnus.com>
+
+ * libc/include/stdio.h (FILE): define __SCLE for "convert line
+ endings" for Cygwin.
+ (__sgetc): convert line endings if needed
+ (__sputc): ditto
+ * libc/stdio/fdopen.c (_fdopen_r): Remember if we opened in text mode
+ * libc/stdio/fopen.c (_fopen_r): ditto
+ * libc/stdio/freopen.c (freopen): ditto
+ * libc/stdio/fread.c (fread): perform CRLF conversions if __SCLE
+ * libc/stdio/fvwrite.c (__sfvwrite): ditto
+
+Thu Apr 27 07:45:48 2000 Alexandre Oliva <aoliva@cygnus.com>
+
+ * libc/machine/mn10300/setjmp.S (setjmp, longjmp): Use
+ post-increment when it is worth it, spacewise.
+
+Mon Apr 17 12:46:00 2000 Marek Michalkiewicz <marekm@linux.org.pl>
+
+ * libc/signal/signal.c (_signal_r) : Removed unused local variable temp.
+ * libc/stdio/findfp.c (std): Added declaration of flags and file.
+ * libc/stdio/mktemp.c (_gettemp, _mkstemp_r, mkstemp): Added int
+ return type.
+ * libc/stdio/putchar.c (putchar): Added return statement.
+ * libc/stdio/refill.c (lflush): Added correct parentheses.
+ * libc/stdio/vfprintf.c (_VFPRINTF_R): Ditto.
+ * libc/stdio/vfscanf.c (__svfscanf): Changed sprintf call which
+ prints long value to use l qualifier.
+ * libc/stdlib/dtoa.c (_dtoa_r): Added parentheses to remove warning
+ messages and initialized local values: ilim, ilim1, and spec_case.
+ * libc/stdlib/ecvtbuf.c (print_e): Removed unused variable dp.
+ * libc/stdlib/mbctype.h (_issjis1, _issjis2): Added parentheses.
+ * libc/stdlib/mprec.c: Ditto.
+ * libc/stdlib/setenv_r.c: Ditto.
+ * libc/stdlib/strtod.c: Ditto.
+ * libc/stdlib/strtol.c: Ditto.
+ * libc/stdlib/strtoul.c: Ditto.
+ * libm/common/sf_expm1.c: Added curly braces to if else clauses.
+ * libm/common/sf_log1p.c: Ditto.
+ * libm/common/sf_scalbn.c: Ditto.
+ * libm/math/ef_log.c: Ditto.
+
+Sun Apr 16 12:45:00 2000 Corinna Vinschen <corinna@vinschen.de>
+
+ * libc/posix/execvp.c (execvp): Check path for
+ trailing slash.
+
+Fri Mar 31 20:39:00 2000 Corinna Vinschen <corinna@vinschen.de>
+
+ * libc/include/sys/unistd.h: Add prototypes for
+ fchmod, fchown, lchown.
+
+Fri Mar 24 15:34:00 2000 Jeff Johnston <jjohnstn@cygnus.com>
+
+ * acinclude.m4: Changed release to 1.8.2.
+ * aclocal.m4 configure doc/aclocal.m4 doc/configure
+ libc/aclocal.m4 libc/configure libc/machine/aclocal.m4
+ libc/machine/configure libc/machine/a29k/aclocal.m4
+ libc/machine/a29k/configure libc/machine/arm/aclocal.m4
+ libc/machine/arm/configure libc/machine/d10v/aclocal.m4
+ libc/machine/d10v/configure libc/machine/d30v/aclocal.m4
+ libc/machine/d30v/configure libc/machine/fr30/aclocal.m4
+ libc/machine/fr30/configure libc/machine/h8300/aclocal.m4
+ libc/machine/h8300/configure libc/machine/h8500/aclocal.m4
+ libc/machine/h8500/configure libc/machine/hppa/aclocal.m4
+ libc/machine/hppa/configure libc/machine/i386/aclocal.m4
+ libc/machine/i386/configure libc/machine/i960/aclocal.m4
+ libc/machine/i960/configure libc/machine/m32r/aclocal.m4
+ libc/machine/m32r/configure libc/machine/m68k/aclocal.m4
+ libc/machine/m68k/configure libc/machine/m88k/aclocal.m4
+ libc/machine/m88k/configure libc/machine/mips/aclocal.m4
+ libc/machine/mips/configure libc/machine/mn10200/aclocal.m4
+ libc/machine/mn10200/configure libc/machine/mn10300/aclocal.m4
+ libc/machine/mn10300/configure libc/machine/necv70/aclocal.m4
+ libc/machine/necv70/configure libc/machine/powerpc/aclocal.m4
+ libc/machine/powerpc/configure libc/machine/sh/aclocal.m4
+ libc/machine/sh/configure libc/machine/sparc/aclocal.m4
+ libc/machine/sparc/configure libc/machine/tic80/aclocal.m4
+ libc/machine/tic80/configure libc/machine/v850/aclocal.m4
+ libc/machine/v850/configure libc/machine/w65/aclocal.m4
+ libc/machine/w65/configure libc/machine/z8k/aclocal.m4
+ libc/machine/z8k/configure libc/sys/aclocal.m4
+ libc/sys/aclocal.m4 libc/sys/configure
+ libc/sys/a29khif/aclocal.m4 libc/sys/a29khif/configure
+ libc/sys/arm/aclocal.m4 libc/sys/arm/configure
+ libc/sys/cygwin/aclocal.m4 libc/sys/cygwin/configure
+ libc/sys/d10v/aclocal.m4 libc/sys/d10v/configure
+ libc/sys/decstation/aclocal.m4 libc/sys/decstation/configure
+ libc/sys/go32/aclocal.m4 libc/sys/go32/configure
+ libc/sys/h8300hms/aclocal.m4 libc/sys/h8300hms/configure
+ libc/sys/h8500hms/aclocal.m4 libc/sys/h8500hms/configure
+ libc/sys/m88kbug/aclocal.m4 libc/sys/m88kbug/configure
+ libc/sys/netware/aclocal.m4 libc/sys/netware/configure
+ libc/sys/rtems/aclocal.m4 libc/sys/rtems/configure
+ libc/sys/sh/aclocal.m4 libc/sys/sh/configure
+ libc/sys/sparc64/aclocal.m4 libc/sys/sparc64/configure
+ libc/sys/sun4/aclocal.m4 libc/sys/sun4/configure
+ libc/sys/sysmec/aclocal.m4 libc/sys/sysmec/configure
+ libc/sys/sysnec810/aclocal.m4 libc/sys/sysnec810/configure
+ libc/sys/sysnecv850/aclocal.m4 libc/sys/sysnecv850/configure
+ libc/sys/sysvi386/aclocal.m4 libc/sys/sysvi386/configure
+ libc/sys/sysvnecv70/aclocal.m4 libc/sys/sysvnecv70/configure
+ libc/sys/tic80/aclocal.m4 libc/sys/tic80/configure
+ libc/sys/w65/aclocal.m4 libc/sys/w65/configure
+ libc/sys/z8ksim/aclocal.m4 libc/sys/z8ksim/configure
+ libm/aclocal.m4 libm/configure: Regenerated.
+
+2000-03-24 Nick Clifton <nickc@cygnus.com>
+
+ * libc/sys/arm/syscalls.c: Fix compile time warnings.
+ (do_AngelSWI): Add "cc" to list o registers clobbered.
+
+Thu Mar 22 14:57:00 2000 Fernando Nasser <fnasser@redhat.com>
+
+ * libc/sys/arm/syscalls.c (do_AngelSWI): Prevent registers with valid
+ information to be clobbered by an Angel C library support syscall.
+
+Tue Mar 21 19:08:00 2000 Jeff Johnston <jjohnstn@cygnus.com>
+
+ * libc/stdlib/envlock.c: Fixed comment typo.
+
+Fri Mar 17 15:37:00 2000 Jeff Johnston <jjohnstn@cygnus.com>
+
+ * libc/stdio/vfscanf.c (__svfscanf): Fixed floating point
+ code to update nread as each character is processed instead
+ of using buffer contents which throw away leading zeroes.
+
+Mon Mar 13 15:22:00 2000 Sergei Organov <osv@javad.ru>
+
+ * libm/mathfp/sf_sqrt.c: Change _DOUBLE_IS_32BITS sqrt call to sqrtf.
+
+Fri Mar 10 16:09:20 2000 Jeff Johnston <jjohnstn@cygnus.com>
+
+ * libc/include/string.h: Include <sys/types.h>.
+
+Fri Mar 10 14:53:50 2000 Alexandre Oliva <oliva@lsd.ic.unicamp.br>
+
+ * libc/stdio/putw.c (putw): Return 0 on success, to be compliant
+ with XSH5, not SVID.
+
+Thu Mar 9 17:20:41 2000 Jeff Johnston <jjohnstn@cygnus.com>
+
+ * libc/include/string.h: Changed last argument back to ssize_t
+ to make it compatible with XPG4 definition which is
+ defined in <unistd.h>. There is a conflict in the SVID 3
+ and XPG4 definitions and newlib will settle with XPG4.
+ * libc/string/swab.c: Ditto.
+
+Wed Mar 8 17:11:41 2000 Jeff Johnston <jjohnstn@cygnus.com>
+
+ * libc/include/string.h: Changed last argument to size_t.
+ * libc/string/swab.c: Changed last argument to size_t.
+
+Wed Mar 8 00:46:41 2000 Alexandre Oliva <oliva@lsd.ic.unicamp.br>
+
+ * libc/reent/Makefile.am (lib_a_SOURCES): Added unlinkr.c.
+ (CHEWOUT_FILES): Added unlinkr.def.
+ * libc/reent/Makefile.in: Rebuilt.
+ * libc/sys.tex: Include unlinkr.def.
+ * libc/reent/linkr.c (_unlink_r): Moved to...
+ * libc/reent/unlinkr.c: ... new file.
+
+Wed Mar 8 00:43:07 2000 Alexandre Oliva <oliva@lsd.ic.unicamp.br>
+
+ * libc/string/Makefile.am (lib_a_SOURCES): Added swab.c.
+ (CHEWOUT_FILES): Added swab.def.
+ * libc/string/Makefile.in: Rebuilt.
+ * libc/string/string.tex: Include swab.def.
+ * libc/include/string.h (swab): Declare.
+ * libc/string/swab.c: New file.
+
+Wed Mar 8 00:38:35 2000 Alexandre Oliva <oliva@lsd.ic.unicamp.br>
+
+ * libc/stdio/Makefile.am (lib_a_SOURCES): Added getw.c and putw.c.
+ (CHEWOUT_FILES): Added getw.def and putw.def.
+ * libc/stdio/Makefile.in: Rebuilt.
+ * libc/stdio/stdio.tex: Include getw.def and putw.def.
+ * libc/stdio/getw.c: New file.
+ * libc/stdio/putw.c: New file.
+
+Fri Feb 25 14:50:50 2000 Jeff Johnston <jjohnstn@cygnus.com>
+
+ * libc/stdio/flags.c (__sflags): Added check that mode[1]
+ is non-null before looking at mode[2].
+
+Thu Feb 24 11:43:00 2000 Ran Cabell <rcabell@norfolk.infi.net>
+
+ * libm/mathfp/sf_atan2.c: Fix atan2 typo for _DOUBLE_IS_32_BITS.
+ * libm/mathfp/sf_atan.c: Ditto.
+
+Thu Feb 24 11:39:00 2000 Joel Sherrill <joel@OARcorp.com>
+
+ * libc/include/sys/stat.h: Add RTEMS prototype for lstat.
+
+Tue Feb 22 14:37:00 2000 Ran Cabell <rcabell@norfolk.infi.net>
+
+ * libm/mathfp/sf_exp.c: Corrected _DOUBLE_IS_32_BITS to be
+ _DOUBLE_IS_32BITS.
+
+Mon Feb 21 11:43:50 2000 Jeff Johnston <jjohnstn@cygnus.com>
+
+ * libc/stdio/vfprintf.c (VFPRINTF): Added CHECK_INIT
+ call prior to calling _VFPRINTF_R so reentrant data area is set.
+ (_VFPRINTF_R): Removed now extraneous CHECK_INIT call.
+
+Thu Feb 17 01:42:50 2000 J"orn Rennecke <amylaar@cygnus.co.uk>
+
+ * libc/stdio/vfscanf.c (limits.h): #include.
+ (MAX_LONG_LEN): #define.
+ (__svfscanf): Handle floating point numbers with arbitrary amounts
+ of leading zeroes.
+
+2000-02-15 Nick Clifton <nickc@cygnus.com>
+
+ * libc/sys/arm/syscalls.c (_fstat): Initialise all fields to
+ zero. Set the blocksize to 1024/
+
+Thu Jan 20 18:57:00 2000 Fernando Nasser <fnasser@redhat.com>
+
+ * setvbuf.c (setvbuf): Set size to BUFSIZ when passed a zero size
+ with line buffering.
+
+Mon Jan 10 18:43:00 2000 Jeff Johnston <jjohnstn@cygnus.com>
+
+ * acinclude.m4: Changed include directory for winsup headers.
+ * aclocal.m4 configure libc/aclocal.m4
+ libc/configure libc/ctype/Makefile.in libc/errno/Makefile.in
+ libc/locale/Makefile.in libc/machine/aclocal.m4
+ libc/machine/configure libc/machine/a29k/aclocal.m4
+ libc/machine/a29k/configure libc/machine/arm/aclocal.m4
+ libc/machine/arm/configure libc/machine/d10v/aclocal.m4
+ libc/machine/d10v/configure libc/machine/d30v/aclocal.m4
+ libc/machine/d30v/configure libc/machine/fr30/aclocal.m4
+ libc/machine/fr30/configure
+ libc/machine/h8300/aclocal.m4
+ libc/machine/h8300/configure libc/machine/h8500/aclocal.m4
+ libc/machine/h8500/configure libc/machine/hppa/aclocal.m4
+ libc/machine/hppa/configure libc/machine/i386/aclocal.m4
+ libc/machine/i386/configure libc/machine/i960/aclocal.m4
+ libc/machine/i960/configure libc/machine/m32r/aclocal.m4
+ libc/machine/m32r/configure libc/machine/m68k/aclocal.m4
+ libc/machine/m68k/configure libc/machine/m88k/aclocal.m4
+ libc/machine/m88k/configure libc/machine/mips/aclocal.m4
+ libc/machine/mips/configure libc/machine/mn10200/aclocal.m4
+ libc/machine/mn10200/configure libc/machine/mn10300/aclocal.m4
+ libc/machine/mn10300/configure libc/machine/necv70/aclocal.m4
+ libc/machine/necv70/configure libc/machine/powerpc/aclocal.m4
+ libc/machine/powerpc/configure
+ libc/machine/sh/aclocal.m4
+ libc/machine/sh/configure libc/machine/sparc/aclocal.m4
+ libc/machine/sparc/configure
+ libc/machine/tic80/aclocal.m4 libc/machine/tic80/configure
+ libc/machine/v850/aclocal.m4 libc/machine/v850/configure
+ libc/machine/w65/aclocal.m4 libc/machine/w65/configure
+ libc/machine/z8k/aclocal.m4 libc/machine/z8k/configure
+ libc/misc/Makefile.in libc/posix/Makefile.in
+ libc/reent/Makefile.in
+ libc/signal/Makefile.in
+ libc/string/Makefile.in libc/sys/aclocal.m4 libc/sys/configure
+ libc/sys/a29khif/aclocal.m4 libc/sys/a29khif/configure
+ libc/sys/arm/Makefile.in libc/sys/arm/aclocal.m4
+ libc/sys/arm/configure libc/sys/cygwin/aclocal.m4
+ libc/sys/cygwin/configure libc/sys/d10v/Makefile.in
+ libc/sys/d10v/aclocal.m4 libc/sys/d10v/configure
+ libc/sys/decstation/aclocal.m4 libc/sys/decstation/configure
+ libc/sys/go32/aclocal.m4 libc/sys/go32/configure
+ libc/sys/h8300hms/aclocal.m4 libc/sys/h8300hms/configure
+ libc/sys/h8500hms/aclocal.m4 libc/sys/h8500hms/configure
+ libc/sys/m88kbug/aclocal.m4 libc/sys/m88kbug/configure
+ libc/sys/netware/aclocal.m4 libc/sys/netware/configure
+ libc/sys/rtems/aclocal.m4 libc/sys/rtems/configure
+ libc/sys/sh/Makefile.in libc/sys/sh/aclocal.m4
+ libc/sys/sh/configure libc/sys/sparc64/aclocal.m4
+ libc/sys/sparc64/configure libc/sys/sun4/aclocal.m4
+ libc/sys/sun4/configure libc/sys/sysmec/aclocal.m4
+ libc/sys/sysmec/configure libc/sys/sysnec810/aclocal.m4
+ libc/sys/sysnec810/configure libc/sys/sysnecv850/aclocal.m4
+ libc/sys/sysnecv850/configure libc/sys/sysvi386/aclocal.m4
+ libc/sys/sysvi386/configure libc/sys/sysvnecv70/aclocal.m4
+ libc/sys/sysvnecv70/configure libc/sys/tic80/aclocal.m4
+ libc/sys/tic80/configure libc/sys/w65/aclocal.m4
+ libc/sys/w65/configure libc/sys/z8ksim/aclocal.m4
+ libc/sys/z8ksim/configure libc/syscalls/Makefile.in
+ libc/time/Makefile.in libc/unix/Makefile.in libm/aclocal.m4
+ libm/configure: Regenerated.
+
+Mon Jan 10 18:43:46 2000 Jeff Johnston <jjohnstn@cygnus.com>
+
+ * libc/stdlib/putenv_r.c (_putenv_r): New file.
+ * libc/stdlib/strdup_r.c (_strdup_r): New file.
+ * libc/include/string.h: Added _strdup_r.
+ * libc/stdlib/putenv.c: Added call to reentrant version.
+ * libc/stdlib/strdup.c: Ditto.
+ * libc/stdlib/Makefile.am: Added _putenv_r and _unsetenv_r.
+ * libc/include/stdlib.h: Ditto.
+ * libc/stdlib/Makefile.in: Regenerated.
+ * libc/string/Makefile.in: Regenerated.
+ * libc/stdlib/setenv.c: Added reentrant version of unsetenv.
+ * libc/stdlib/setenv_r.c: Added unsetenv_r and changed memory
+ management calls to reentrant versions.
+ * libc/stdlib/wcstombs.c: Added #ifndef _REENT_ONLY wrapper.
+ * libc/stdlib/wctomb.c: Ditto.
+ * libc/stdlib/mblen.c: Ditto.
+ * libc/stdlib/mbstowcs.c: Ditto.
+ * libc/stdlib/mbtowc.c: Ditto.
+ * libc/stdlib/getenv.c: Ditto.
+ * libc/reent/reent.tex: Added references to _putenv_r, _setenv_r,
+ and _strdup_r.
+
+Thu Jan 6 15:33:46 2000 Christopher Faylor <cgf@cygnus.com>
+
+ patch from Corinna Vinschen <corinna@vinschen.de>
+ * libc/sys/cygwin/sys/param.h: Define NGROUP_MAX as 16.
+
+Mon Jan 03 14:36:00 2000 Sergei Organov <osv@javad.ru>
+
+ * libm/mathfp/s_atangent.c: Fix exponent calculation.
+ * libm/mathfp/s_ldexp.c: Ditto.
+ * libm/mathfp/sf_atangent.c: Ditto.
+ * libm/mathfp/sf_ldexp.c: Ditto.
+
+Tue Dec 14 5:42:00 1999 Ranjith Kumaran <ranjith@cygnus.com>
+
+ * libc/machine/i960/setjmp.S: fix typo leaving .link_pix uncommented
+ * libc/include/locale.h: define NULL to be 0.
+
+Tue Dec 7 15:41:45 1999 Jim Wilson <wilson@cygnus.com>
+
+ * libc/sys/sh/syscalls.c (stack_ptr): Move definition before first
+ function.
+
+Wed Dec 1 17:39:29 1999 Jeffrey A Law (law@cygnus.com)
+
+ * libc/machine/mn10300/setjmp.S: Handle am33.
+
+1999-11-26 Nick Clifton <nickc@cygnus.com>
+
+ * libc/sys/arm/syscalls.c: Add function prototypes.
+ (stack_ptr): Move declaration before function definitions.
+
+Sat Nov 20 17:13:00 1999 Ranjith Kumaran <ranjith@cygnus.com>
+
+ * NEWS: Updated version information.
+ * README: Ditto.
+
+Tue Nov 09 12:19:21 1999 Jeff Johnston <jjohnstn@cygnus.com>
+
+ * libc/machine/i386/strchr.S: Fixed alignment test.
+
+Thu Oct 28 05:30:46 1999 Andrew Cagney <cagney@makita.cygnus.com>
+
+ * libc/sys/d10v/crt0.S (_start): Construct a real stack frame.
+
+Thu Oct 28 15:29:11 1999 Andrew Cagney <cagney@b1.cygnus.com>
+
+ * libc/sys/d10v/crt0.S (_start): Initialize both SPI and SPU
+ ensuring that there is space between the two.
+
+Thu Oct 14 13:39:21 1999 Christopher Faylor <cgf@cygnus.com>
+
+ * libc/stdio/flags.c: Conditionalize check for 't' for cygwin case
+ only.
+
+1999-10-08 Vadim Egorov <egorovv@1c.ru>
+
+ * libc/include/stdlib.h: add ptsname, grantpt, unlockpt to cygwin
+ section
+
+Sat Oct 2 02:02:00 MEST 1999 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
+
+ * libc/machine/sh/asm.h: Added __SH4_SINGLE__ to DELAYED_BRANCHES
+ * libc/machine/sh/memcpy.S: Fix line wrapping in SL macro
+
+Fri Oct 1 13:17:59 CDT 1999 <joel@OARcorp.com>
+ * libc/include/grp.h: Added getgrnam_r and getgrgid_r prototypes
+ per POSIX 1003.1b.
+ * libc/include/pwd.h: Added getpwnam_r and getpwuid_r prototypes
+ per POSIX 1003.1b.
+
+1999-09-13 DJ Delorie <dj@cygnus.com>
+
+ * libc/stdio/mktemp.c (_gettemp): on cygwin, check for EACCESS
+ also.
+
+Thu Sep 9 15:31:00 1999 Jeff Johnston <jjohnstn@cygnus.com>
+
+ * setvbuf.c (setvbuf): When mallocing a buffer of size BUFSIZ,
+ also note BUFSIZ as its size.
+
+Tue Sep 7 17:15:00 1999 Joel Sherrill <joel@OARcorp.com>
+
+ * configure.host: Corrected feature defines for RTEMS.
+ * libc/include/sys/stat.h: Added protototype for RTEMS mknod.
+ * libc/include/sys/stat.h: mkfifo() should take const path arg.
+ * libc/include/sys/unistd.h: pathconf() should take const path arg.
+ Enabled usleep(), ftruncate(), and truncate() prototypes for RTEMS.
+ Added defines for _POSIX_JOB_CONTROL, _POSIX_SAVED_IDS, and
+ _POSIX_VERSION for RTEMS. Added defines for _PC_ASYNC_IO,
+ _PC_PRIO_IO, and _PC_SYNC_IO.
+ * libc/machine/m68k/Makefile.am: Added strcpy.c and strlen.c.
+ * libc/machine/m68k/Makefile.in: Regenerated.
+ * libc/machine/m68k/strcpy.c: New file.
+ * libc/machine/m68k/strlen.c: New file.
+ * libc/stdio/tmpnam.c: Always make the returned name usable.
+ * libc/sys/rtems/crt0.c: New version that passes all autoconf tests.
+ * libc/sys/rtems/sys/dirent.h: New file.
+ * libc/sys/rtems/sys/types.h: Added dev_t.
+
+Tue Sep 7 17:15:00 1999 Jay Kulpinski <jskulpin@eng01.gdds.com>
+
+ * libc/stdlib/mprec.c: Fixed unitialized variable problem.
+
+Fri Sep 3 12:35:20 1999 Jeff Johnston <jjohnstn@cygnus.com>
+
+ * libc/stdio/ftell.c (ftell): Backing off Joern's fix and
+ my patch.
+
+Thu Sep 2 22:05:20 1999 Christopher Faylor <cgf@cygnus.com>
+
+ patch from Jeff Johnston <jjohnstn@cygnus.com>
+ * libc/stdio/ftell.c (ftell): Avoid using buffer position when the
+ buffer is not in a useful state.
+
+1999-09-01 Nick Clifton <nickc@cygnus.com>
+
+ * libc/sys/arm/syscalls.c (_link): Add stub.
+
+Fri Aug 27 23:09:09 1999 J"orn Rennecke <amylaar@cygnus.co.uk>
+
+ * ftell.c (ftell): Use actual position within buffer for text mode.
+ * findfp.c (std): Initialize ptr->_bf._size.
+
+Wed Aug 18 18:48:02 1999 Christopher Faylor <cgf@cygnus.com>
+
+ * libc/include/sys/unistd.h: Add nice() declaration.
+
+1999-08-09 Nick Clifton <nickc@cygnus.com>
+
+ * libc/sys/arm/crt0.S (change_mode): Rename to __change_mode and
+ declare as a thumb function so that the disassembler will see the
+ mode change.
+
+Thu Aug 5 17:37:00 1999 Ranjith Kumaran <ranjith@cygnus.com>
+
+ * libc/reent/reent.tex: Updated list of reentrant functions.
+
+1999-07-09 Michael Meissner <meissner@cygnus.com>
+
+ * libc/include/stdlib.h (_findenv{,_r}): Add prototypes.
+
+Tue Jul 6 10:46:24 1999 Jeff Johnston <jjohnstn@cygnus.com>
+
+ * libc/stdio/sprintf.c: Moved snprintf and _snprintf_r to
+ separate file.
+ * libc/stdio/snprintf.c: New file.
+ * libc/stdio/vsprintf.c: Moved vsnprintf and _vsnprintf_r to
+ separate file.
+ * libc/stdio/vsnprintf.c: New file.
+ * libc/stdio/Makefile.am: Added snprintf.c and vsnprintf.c.
+ * libc/stdio/Makefile.in: Regenerated.
+
+Mon Jul 5 14:43:24 1999 Christopher Faylor <cgf@cygnus.com>
+
+ Patch submitted by Egor Duda <deo@logos-m.ru>:
+ * libc/include/stdio.h: Add declarations for *nprintf.
+ * libc/stdio/sprintf.c (snprintf): New function.
+ (_snprintf_r): New function.
+ * libc/stdio/vsprintf.c (vsnprintf): New function.
+ (_vnsprintf_r): New function.
+
+Wed Jun 30 16:36:27 1999 Jeff Johnston <jjohnstn@cygnus.com>
+
+ * libc/Makefile.am (stmp-targetdep): Remove extraneous blank.
+ * libm/Makefile.am (stmp-targetdep): Ditto.
+ * libc/Makefile.in: Regenerated.
+ * libm/Makefile.in: Ditto.
+
+Fri Jun 25 10:49:27 1999 Jeff Johnston <jjohnstn@cygnus.com>
+
+ * libc/Makefile.am (stmp-targetdep): Ignore "." in SUBDIRS.
+ * libm/Makefile.am (stmp-targetdep): Ditto.
+ * libc/Makefile.in: Regenerated.
+ * libm/Makefile.in: Ditto.
+
+Thu June 03 16:25:00 1999 Jeff Johnston <jjohnstn@cygnus.com>
+
+ * Makefile.am: Removed dependencies on all-recursive and added "."
+ to the SUBDIRS list to prevent infinite recursion from occurring.
+ Also removed any references to EXTRA_DATA.
+ * libc/Makefile.am: Ditto.
+ * libc/machine/Makefile.am: Ditto.
+ * libc/machine/i386/Makefile.am: Ditto.
+ * libm/Makefile.am: Ditto.
+ * libc/sys/Makefile.am: Ditto.
+ * Makefile.in: Regenerated.
+ * aclocal.m4: Ditto.
+ * configure: Ditto.
+ * doc/Makefile.in: Ditto.
+ * doc/aclocal.m4: Ditto.
+ * doc/configure: Ditto.
+ * libc/Makefile.in: Ditto.
+ * libc/aclocal.m4: Ditto.
+ * libc/configure: Ditto.
+ * libc/machine/Makefile.in: Ditto.
+ * libc/machine/aclocal.m4: Ditto.
+ * libc/machine/configure: Ditto.
+ * libc/machine/mn10300/Makefile.in: Ditto.
+ * libc/machine/mn10300/aclocal.m4: Ditto.
+ * libc/machine/mn10300/configure: Ditto.
+ * libc/sys/Makefile.in: Ditto.
+ * libc/sys/aclocal.m4: Ditto.
+ * libc/sys/configure: Ditto.
+ * libm/Makefile.in: Ditto.
+ * libm/aclocal.m4: Ditto.
+ * libm/configure: Ditto.
+
+Thu June 03 16:20:00 1999 Ranjith Kumaran <ranjith@cygnus.com>
+
+ * libc/include/stdlib/stdlib.tex: Add link to env_lock.
+
+Fri May 28 17:09:00 1999 Ranjith Kumaran <ranjith@cygnus.com>
+
+ * libc/include/stdlib.h: Add reentrant routines.
+ * libc/stdlib/Makefile.am: Add reentrant routines.
+ * libc/stdlib/Makefile.in: Ditto.
+ * libc/stdlib/envlock.c: New file.
+ * libc/stdlib/envlock.h: New file.
+ * libc/stdlib/getenv.c: Modify to call reentrant routine.
+ * libc/stdlib/getenv_r.c: New file.
+ * libc/stdlib/mblen.c: Modify to call reentrant routine.
+ * libc/stdlib/mblen_r.c: New file.
+ * libc/stdlib/setenv.c: Modify to call reentrant routine.
+ * libc/stdlib/setenv_r.c: New file.
+ * libc/stdlib/stdlib.tex: Add reentrant routines.
+
+Mon May 17 22:01:38 1999 Christopher Faylor <cgf@cygnus.com>
+
+ * libc/include/sys/types.h: Define __MS_types__ whenever
+ cygwin or win32.
+
+Sun May 16 16:02:41 1999 Christopher Faylor <cgf@cygnus.com>
+
+ * libc/include/machine/ieeefp.h: Always default to little
+ endian if Windows, regardless of architecture.
+ * libc/include/machine/sethmp.h: Define JBLEN if CYGWIN
+ regardless of architecture.
+
+Mon May 3 11:49:18 1999 Geoffrey Noer <noer@cygnus.com>
+
+ * libc/include/machine/setjmp.h: Accept CYGWIN define, even if
+ _WIN32 isn't defined.
+
+Mon May 3 11:41:51 1999 Jeff Johnston <jjohnstn@cygnus.com>
+
+ * libm/common/s_rint.c (rint): Add volatile qualifier for
+ intermediate value w.
+ * libm/common/sf_rint.c (rintf): Ditto.
+
+Thu Apr 29 20:34:27 1999 Jeff Johnston <jjohnstn@cygnus.com>
+
+ * libc/sys/arm/syscalls.c (remap_handle): Added check to
+ ensure that std streams are initialized before being referenced.
+
+1999-04-27 Jason Molenda (jsm@bugshack.cygnus.com)
+
+ * README: Update reference to newlib@cygnus.com new
+ newlib@sourceware.cygnus.com address.
+
+Mon Apr 26 18:17:33 1999 Geoffrey Noer <noer@cygnus.com>
+
+ * libc/include/sys/types.h: Define MS_types if CYGWIN is defined.
+ * libc/include/sys/fcntl.h: Define _O_BINARY et al if CYGWIN is
+ defined, even if _WIN32 isn't defined.
+
+Sat Apr 24 19:59:55 1999 Christopher Faylor <cgf@cygnus.com>
+
+ * libc/include/sys/fcntl.h: Correct _O_CREATE to _O_CREAT.
+
+Wed Apr 21 18:01:00 1999 Ranjith Kumaran <ranjith@cygnus.com>
+
+ * libc/include/sys/reent.h: Change Long and ULong to __Long and
+ __ULong.
+ * libc/stdlib/dtoa.c: Ditto.
+ * libc/stdlib/mprec.c: Ditto.
+ * libc/stdlib/mprec.h: Ditto.
+ * libc/stdlib/strtod.c: Ditto.
+
+1999-04-21 Nick Clifton <nickc@cygnus.com>
+
+ * configure.host (mcore): Remove mcore machine directory.
+
+1999-04-18 Nick Clifton <nickc@cygnus.com>
+
+ * libc/include/machine/ieeefp.h: Add support for mcore target.
+ * libc/include/machine/setjmp.h: Add support for mcore target.
+ * configure.host: Add support for mcore target.
+
+1999-04-13 Mark Salter <msalter@cygnus.com>
+
+ * libc/sys/arm/libcfunc.c: Moved isatty to syscall.c
+ * libc/sys/arm/syscalls.c: Added isatty.
+
+Wed Apr 07 16:06:04 1999 Jeff Johnston <jjohnstn@cygnus.com>
+
+ * libc/stdlib/ecvtbuf.c (fcvtbuf): Fixed code to properly
+ insert zeroes after significant digits.
+
+Wed Mar 17 22:06:04 1999 Jeff Johnston <jjohnstn@cygnus.com>
+
+ * libc/stdio/vfprintf.c (cvt): Changed floating point
+ cvt routine to use union used by dtoa to properly determine
+ if the sign bit is on or not.
+ * libc/stdio/vfieeefp.h: New file
+
+Wed Mar 17 17:35:04 1999 Jeff Johnston <jjohnstn@cygnus.com>
+
+ * aclocal.m4: Regenerated.
+ * configure: Regenerated.
+
+Wed Mar 17 16:35:04 1999 Jeff Johnston <jjohnstn@cygnus.com>
+
+ * libc/machine/i386/Makefile.am (lib_a_SOURCES): Added missing
+ f_tanf reference.
+ * libc/machine/i386/Makefile.in: Regenerated.
+
+Tue Mar 16 14:56:36 1999 Jeff Johnston <jjohnstn@cygnus.com>
+
+ * acinclude.m4: Changed to work with new automake.
+ * configure: Regenerated.
+ * libc/machine/i386/aclocal.m4: Regenerated.
+ * libc/machine/i386/configure: Regenerated.
+
+Tue Mar 16 13:55:36 1999 Corinna Vinschen <corinna.vinschen@cityweb.de>
+
+ * libc/sys/cygwin/sys/dirent.h: Add additional prototypes
+ for telldir() and seekdir(). Rename unused structure element
+ for use with these two routines.
+
+Fri Mar 12 19:11:58 1999 Jeff Johnston <jjohnstn@cygnus.com>
+
+ * libc/time/mktime.c (validate_structure): Multiple fixes to
+ code to handle cases where input fields are outside valid ranges.
+ * libc/stdlib/div.c (div): Modified invalid rounding check.
+ * libc/stdlib/ldiv.c (ldiv): Ditto.
+
+Thu Mar 11 21:32:13 1999 Jeff Johnston <jjohnstn@cygnus.com>
+
+ * libc/machine/i386/memcpy.S: Performance rewrite.
+ * libc/machine/i386/memmove.S: Ditto.
+ * libc/machine/i386/i386mach.h: Added more register definitions.
+ * libc/include/math.h: Include <machine/fastmath.h> if -ffast-math
+ option used.
+ * libc/include/machine/fastmath.h: Add definitions for x86
+ fast-math routines.
+
+Wed Mar 10 17:56:00 1999 Ranjith Kumaran <ranjith@cygnus.com>
+
+ * libc/stdlib/strtod.c: Change from unsigned long to ULong.
+
+Tue Mar 9 14:31:58 1999 Geoffrey Noer <noer@cygnus.com>
+
+ Adjust newlib headers for new Cygwin Win32 API header files:
+ * libc/include/sys/time.h: Check _WINSOCK_H rather than
+ _GNU_H_WINDOWS32_SOCKETS.
+ * libc/include/sys/types.h: Ditto.
+
+Tue Mar 09 15:55:00 1999 Ranjith Kumaran <ranjith@cygnus.com>
+
+ *include/sys/reent.h: Add checks for size of Bigint element Long.
+ *libc/dtoa.c: Change routines to use generic Long type.
+ *libc/mprec.c: Change routines to use generic Long type.
+ *libc/mprec.h: Change routines to use generic Long type.
+
+Tue Mar 02 18:07:49 1999 Ranjith Kumaran <ranjith@cygnus.com>
+
+ * libc/Makefile.am: Add .def files.
+ * libc/Makefile.in: Regenerate.
+ * libc/e_acosh.c: Documentation update.
+ * libc/e_atanh.c: Documentation update.
+ * libc/e_hypot.c: Documentation update.
+ * libc/e_remainder.c: Documentation update.
+ * libc/er_lgamma.c: Documentation update.
+ * libc/mathfp.tex: Documentation update.
+ * libc/s_acos.c: Documentation update.
+ * libc/s_atan.c: Documentation update.
+ * libc/s_atan2.c: Documentation update.
+ * libc/s_cosh.c: Documentation update.
+ * libc/s_fmod.c: Documentation update.
+ * libc/s_isnan.c: Documentation update.
+ * libc/s_log10.c: Documentation update.
+ * libc/s_pow.c: Documentation update.
+ * libc/w_jn.c: Documentation update.
+
+Sun Feb 28 23:18:49 1999 Geoffrey Noer <noer@cygnus.com>
+
+ * aclocal.m4: Regenerate.
+ * configure: Regenerate.
+
+Tue Feb 23 13:57:26 1999 Jeff Johnston <jjohnstn@cygnus.com>
+
+ * libc/machine/mn10300/setjmp.S (_longjmp): Fixed longjmp
+ to return 1 if user specified return code is 0.
+ * libc/machine/mn10200/setjmp.S (_longjmp): Ditto.
+
+Thu Feb 18 11:13:28 1999 Jeff Johnston <jjohnstn@cygnus.com>
+
+ * libc/machine/mn10200/setjmp.S (_setjmp/_longjmp): Fixed setjmp
+ to save the return address. Fixed longjmp to return to the original
+ calling address of setjmp and to return the user specified return code
+ rather than default to 1.
+ * libc/machine/mn10300/setjmp.S (_setjmp/_longjmp): Ditto.
+
+Mon Feb 15 17:48:17 1999 Jeff Johnston <jjohnstn@cygnus.com>
+
+ * libc/stdlib/mprec.h (mult): Define mult to be _multiply instead of _mult.
+
+1999-02-10 Nick Clifton <nickc@cygnus.com>
+
+ * libc/sys/arm/syscalls.c (initialise_monitor_handles): Make block
+ volatile so that its assignments will not be discarded.
+
+Wed Feb 10 17:19:40 1999 Jeff Johnston <jjohnstn@cygnus.com>
+
+ * libc/include/_ansi.h: Corrected _STRICT_ANSI reference to
+ be __STRICT_ANSI__ which is generated by compiler.
+ * libc/include/ctype.h: Ditto.
+ * libc/include/math.h: Ditto.
+ * libc/include/stdio.h: Ditto.
+ * libc/include/stdlib.h: Ditto.
+ * libc/include/string.h: Ditto.
+ * libc/include/sys/signal.h: Ditto.
+
+1999-02-08 Nick Clifton <nickc@cygnus.com>
+
+ * configure.host: Add support for StrongARM target.
+
+Fri Feb 5 11:13:14 1999 Jeff Johnston <jjohnstn@cygnus.com>
+
+ * libc/string/strncpy.c (strncpy): Removed redundant code
+ that was copying bytes if data unaligned.
+
+1999-02-02 Brendan Kehoe <brendan@cygnus.com>
+
+ * libc/stdlib/Makefile.{am,in} (CHEWOUT_FILES): Add mblen.def,
+ mbstowcs.def, and wcstombs.def.
+
+Sat Jan 30 02:36:33 1999 Christopher Faylor <cgf@cygnus.com>
+
+ * libc/include/sys/errno.h: Add Cygwin errno.
+ * libc/stdio/flags.c: Don't default to O_TEXT if no other flag
+ is specified.
+
+1999-01-29 Nick Clifton <nickc@cygnus.com>
+
+ * libc/sys/arm/syscalls.c: Move C library functions into seperate
+ file.
+
+ * libc/sys/arm/libcfunc.c: New file containing C library functions
+ from syscalls.c
+
+ * libc/sys/arm/Makefile.am (lib_a_SOURCES): Add libcfuncs.c
+ * libc/sys/arm/Makefile.in (lib_a_SOURCES): Regenerate.
+
+
+1999-01-27 Michael Meissner <meissner@cygnus.com>
+
+ * libc/include/machine/setjmp.h (D30V _JBLEN/_JBTYPE): Use double
+ type, and cut size in half so that the jmp_buf array is guaranteed
+ to be aligned on a 64-bit boundary.
+
+Mon Jan 25 12:05:38 1999 Jeff Johnston <jjohnstn@cygnus.com>
+
+ * libc/string/strings.tex: Added information about
+ strcasecmp and strncasecmp.
+ * libc/stdlib/stdlib.tex: Added missing information
+ about mblen, mbstowcs, and wcstombs.
+ * libc/string/strchr.c: Changed how mask is built to use
+ shift operators so register will be used instead of storage.
+
+1999-01-22 DJ Delorie <dj@cygnus.com>
+
+ * libc/include/stdlib.h: don't use dllimport if we're building
+ newlib, since it's inside cygwin.dll
+
+Fri Jan 22 14:57:18 1999 Christopher Faylor <cgf@cygnus.com>
+
+ * libc/ctype/ctype_.c: Need to use __declspec(dllexport) for
+ _ctype_ under cygwin.
+
+Fri Jan 22 09:50:19 1999 Christopher Faylor <cgf@cygnus.com>
+
+ * include/stdlib.h: Fix typo from previous checkin.
+
+Thu Jan 21 22:42:21 1999 Christopher Faylor <cgf@cygnus.com>
+
+ * include/ctype.h: Use __declspec(dllimport) method for exporting
+ variable from cygwin DLL.
+ * include/time.h: Ditto.
+ * sys/errno.h: Ditto.
+ * include/stdlib.h: Export __mb_cur_max from cygwin DLL.
+ * libc/locale/locale.c: Use __declspec(dllexport) method for
+ exporting variable from cygwin DLL.
+
+Sat Jan 16 13:29:54 1999 Christopher Faylor <cgf@cygnus.com>
+
+ * libc/stdio/setvbuf.c: Always clean up when _IONBF or possible
+ access of bogus pointer will result in SIGSEGV.
+
+1999-01-07 Nick Clifton <nickc@cygnus.com>
+
+ * libc/sys/arm/setjmp.S: Use C macros to cope with the possibility
+ of an underscore prefix to function names.
+
+Fri Jan 8 19:00:07 1999 Jeff Johnston <jjohnstn@cygnus.com>
+
+ * libc/machine/i386/i386mach.h (__REG_PREFIX__): Create new
+ define __REG_PREFIX__ instead of using __REGISTER_PREFIX__.
+
+1998-12-31 Michael Meissner <meissner@cygnus.com>
+
+ * libc/machine/i386/i386mach.h (__REGISTER_PREFIX__): Only define
+ to `%' if not already defined.
+
+1998-12-30 Michael Meissner <meissner@cygnus.com>
+
+ * libc/stdio/tmpnam.c (_tempnam_r): Make directory and prefix
+ arguments const char *, not char *.
+ * libc/include/stdio.h (_tempnam_r): Ditto.
+
+ * libc/include/sys/reent.h (struct _reent): The _sig_func type
+ points to a function taking an integer, not void.
+
+Tue Dec 29 14:35:53 1998 Christopher Faylor <cgf@cygnus.com>
+
+ * configure.host: Add a define for Cygwin builds.
+ * libc/include/ctype.h: Don't use dll imported variables in newlib.
+
+Mon Dec 28 09:19:56 1998 Christopher Faylor <cgf@cygnus.com>
+
+ * libc/include/ctype.h: Define _ctype_ as dll imported variable
+ for use with Cygwin.
+ * libc/include/sys/errno.h: Define _sys_errlist and _sys_nerr as
+ dll imported variables for use with Cygwin.
+ * libc/ctype/ctype_.c: Undefine _ctype_ in case it has been defined
+ as a dll imported variable for Cygwin.
+
+Sat Dec 26 00:13:53 1998 Christopher Faylor <cgf@cygnus.com>
+
+ * libc/include/sys/unistd.h: Add proto for getpass.
+
+Fri Dec 18 19:28:19 1998 Geoffrey Noer <noer@cygnus.com>
+
+ * libc/sys/cygwin/sys/dirent.h: add protos for scandir and
+ alphasort.
+
+Fri Dec 18 16:33:25 1998 Geoffrey Noer <noer@cygnus.com>
+
+ * libc/posix/execvp.c (execvp): call cygwin_posix_path_list_p,
+ not posix_path_list_p.
+
+1998-12-15 Nick Clifton <nickc@cygnus.com>
+
+ * libc/string/memchr.c: Treat 'c' argument as an unsigned byte not
+ a signed int.
+
+1998-12-13 Nick Clifton <nickc@cygnus.com>
+
+ * libc/include/machine/setjmp.h (_JBLEN): Set to 10.
+
+1998-12-12 Nick Clifton <nickc@cygnus.com>
+
+ * libc/machine/fr30/setjmp.S: New file, supplied by Mark Slater
+ <msalter@cygnus.com>
+ * libc/machine/fr30/Makefile.am: Add build of setjmp.S
+ * libc/machine/fr30/Makefile.in: Regenerated.
+
+1998-12-11 Nick Clifton <nickc@cygnus.com>
+
+ * configure.host: Remove use of libc/sys for FR30 port.
+ * libc/sys/fr30: Remove directory (replaced by libgloss).
+
+1998-12-10 Ken Raeburn <raeburn@cygnus.com>
+
+ * libc/string/strcat.c (ALIGNED): Sense of result was reversed.
+ * libc/string/strncat.c (ALIGNED): Ditto.
+
+Wed Dec 9 14:37:57 1998 Geoffrey Noer <noer@cygnus.com>
+
+ * libc/include/sys/time.h: include sys/types.h
+
+Tue Dec 8 15:53:18 1998 Jeff Johnston <jjohnstn@cygnus.com>
+
+ * libc/machine/i386/memcmp.S (memcmp): Fix for unequal
+ comparison found when checking word at a time.
+
+1998-12-04 Nick Clifton <nickc@cygnus.com>
+
+ * libc/sys/fr30/crt0.s (_start): Initialise frame pointer.
+
+1998-12-03 Nick Clifton <nickc@cygnus.com>
+
+ * libc/sys/fr30/syscalls.c (_times): New function stub.
+
+Thu Dec 3 15:59:19 1998 Jeff Johnston <jjohnstn@cygnus.com>
+
+ * configure.host (mach_add_setjmp): Replaced mach_add_objs
+ with mach_add_setjmp flag which indicates if setjmp should
+ be added to the machine directory objects.
+ * acinclude.m4: Removed reference to mach_add_objs.
+ * aclocal.m4: Regenerated.
+ * Makefile.in: Regenerated.
+ * configure: Regenerated.
+ * libc/aclocal.m4: Regenerated.
+ * libc/Makefile.in: Regenerated.
+ * libc/configure: Regenerated.
+ * libc/machine/aclocal.m4: Regenerated.
+ * libc/machine/Makefile.in: Regenerated.
+ * libc/machine/configure: Regenerated.
+ * libc/machine/i386/aclocal.m4: Regenerated.
+ * libc/machine/i386/Makefile.am: Altered to selectively add
+ setjmp.S to the src files list.
+ * libc/machine/i386/Makefile.in: Regenerated.
+ * libc/machine/i386/configure.in: Altered to test mach_add_setjmp.
+ * libc/machine/i386/configure: Regenerated.
+
+1998-12-02 Nick Clifton <nickc@cygnus.com>
+
+ * libc/sys/fr30/crt0.s (_start): Fix function names.
+
+ * libc/machine/fr30: New directory
+ * libc/machine/fr30/Makefile.am: New file.
+ * libc/machine/fr30/Makefile.in: New generated file.
+ * libc/machine/fr30/configure.in: New file.
+ * libc/machine/fr30/configure: New generated file.
+ * libc/machine/fr30/aclocal.m4: New generated file.
+ * libc/sys/fr30/Makefile.am: New file.
+ * libc/sys/fr30/Makefile.in: New generated file.
+ * libc/sys/fr30/configure.in: New file.
+ * libc/sys/fr30/configure: New generated file.
+ * libc/sys/fr30/syscalls.c: New file.
+
+Tue Dec 1 16:28:56 1998 Geoffrey Noer <noer@cygnus.com>
+
+ * libc/sys/cygwin/sys/utmp.h: new file, moved from winsup/include.
+
+1998-12-01 Ken Raeburn <raeburn@cygnus.com>
+
+ * libc/time/strftime.c (strftime): Also handle %y for years before
+ 1900.
+
+Tue Dec 1 13:26:07 1998 Christopher Faylor <cgf@cygnus.com>
+
+ * libc/string/strcasecmp.c (strcasecmp): Adhere to standard
+ UNIX convention. Perform tolower on characters before comparing
+ them rather than use toupper.
+ * libc/string/strncasecmp.c (strncasecmp): Ditto.
+
+Mon Nov 30 16:24:19 1998 Jeff Johnston <jjohnstn@cygnus.com>
+
+ * configure.host: Added using i386 machine directory
+ for all x86 cross-compiler and configuring
+ which added object files to use via new "mach_add_objs" variable.
+ * configure: Regenerated.
+ * libc/configure: Regenerated.
+ * libc/Makefile.in: Regenerated.
+ * libc/aclocal.m4: Regenerated.
+ * libc/ctype/Makefile.in: Regenerated.
+ * libc/errno/Makefile.in: Regenerated.
+ * libc/locale/Makefile.in: Regenerated.
+ * libc/machine/Makefile.in: Regenerated.
+ * libc/machine/aclocal.m4: Regenerated.
+ * libc/machine/configure: Regenerated.
+ * libc/posix/Makefile.in: Regenerated.
+ * libc/reent/Makefile.in: Regenerated.
+ * libc/signal/Makefile.in: Regenerated.
+ * libc/stdio/Makefile.in: Regenerated.
+ * libc/stdlib/Makefile.in: Regenerated.
+ * libc/string/Makefile.in: Regenerated.
+ * libc/string/memmove.c: Optimized code to use memcpy
+ logic when performing a non-destructive copy.
+ * libc/string/strncmp.c: Altered code to allow building
+ optimized for size or speed.
+ * libc/syscalls/Makefile.in: Regenerated.
+ * libc/time/Makefile.in: Regenerated.
+ * libc/unix/Makefile.in: Regenerated.
+ * libc/machine/i386/Makefile.am: Added new files and reference
+ to "mach_add_objs" to indicate optional object files.
+ * libc/machine/i386/Makefile.in: Regenerated.
+ * libc/machine/i386/aclocal.m4: Regenerated.
+ * libc/machine/i386/configure: Regenerated.
+ * libc/machine/i386/memchr.S: New file that implements
+ function in Intel assembler.
+ * libc/machine/i386/memcmp.S: ditto.
+ * libc/machine/i386/memcpy.S: ditto.
+ * libc/machine/i386/memmove.S: ditto.
+ * libc/machine/i386/memset.S: ditto.
+ * libc/machine/i386/strchr.S: ditto.
+ * libc/machine/i386/strlen.S: ditto.
+ * libc/machine/i386/f_atan2.S: New file that implements
+ fast version of math function to be used by compiler when
+ --ffast_math compile option is used.
+ * libc/machine/i386/f_atan2f.S: ditto.
+ * libc/machine/i386/f_exp.c: ditto.
+ * libc/machine/i386/f_expf.c: ditto.
+ * libc/machine/i386/f_frexp.S: ditto.
+ * libc/machine/i386/f_frexpf.S: ditto.
+ * libc/machine/i386/f_ldexp.S: ditto.
+ * libc/machine/i386/f_ldexpf.S: ditto.
+ * libc/machine/i386/f_log.S: ditto.
+ * libc/machine/i386/f_logf.S: ditto.
+ * libc/machine/i386/f_log10.S: ditto.
+ * libc/machine/i386/f_log10f.S: ditto.
+ * libc/machine/i386/f_math.h: New file.
+ * libc/machine/i386/f_pow.c: ditto.
+ * libc/machine/i386/f_powf.S: ditto.
+ * libc/machine/i386/f_tan.S: ditto.
+ * libc/machine/i386/f_tan.S: ditto.
+ * libc/machine/i386/i386mach.h: New file.
+
+Mon Nov 30 13:02:17 1998 Christopher Faylor <cgf@cygnus.com>
+
+ patch from Mumit Khan <khan@xraylith.wisc.edu>
+ * libc/include/stdio.h (tempnam): Add prototype.
+ * libc/stdio/tmpnam.c (_tempnam_r): Handle NULL prefix.
+ (tempnam): Adhere to prototype.
+
+Thu Nov 26 00:21:32 1998 Christopher Faylor <cgf@cygnus.com>
+
+ * Makefile.am: Add default for AR_FLAGS.
+ * Makefile.in: Regenerate.
+
+Tue Nov 24 18:48:56 1998 Geoffrey Noer <noer@cygnus.com>
+
+ * libc/include/time.h: move __cplusplus wrapper after includes
+ * libc/include/sys/time.h: ditto. If Cygwin, include
+ sys/select.h.
+ * libc/include/sys/types.h: lose "32" in comment about Cygwin.
+
+1998-11-23 Ken Raeburn <raeburn@cygnus.com>
+
+ * libc/time/strftime.c (strftime): Handle %y after year 2000.
+
+Wed Nov 18 12:22:41 1998 Nick Clifton <nickc@cygnus.com>
+
+ * libc/sys/fr30/crt0.s (_start): Switch over to using int #9 as
+ abnormnal end-of-crt0 marker.
+
+Tue Nov 17 16:27:58 1998 Nick Clifton <nickc@cygnus.com>
+
+ * libc/sys/fr30/crt0.s: New file/directory.
+ * libc/include/machine/setjmp.h: Add FR30 target.
+ * libc/include/machine/ieeefp.h: Add FR30 target.
+ * configure.host: Add FR30 target.
+
+Mon Nov 16 23:15:00 1998 Ranjith Kumaran <ranjith@cygnus.com>
+
+ * libm/math: Files that are duplicated in common directory removed.
+ * libm/math/fdlibm.h: Removed.
+ * libm/math/s_cbrt.c: Removed.
+ * libm/math/s_copysign.c: Removed.
+ * libm/math/s_expm1.c: Removed.
+ * libm/math/s_finite.c: Removed.
+ * libm/math/s_ilogb.c: Removed.
+ * libm/math/s_infinity.c: Removed.
+ * libm/math/s_lib_ver.c: Removed.
+ * libm/math/s_log1p.c: Removed.
+ * libm/math/s_logb.c: Removed.
+ * libm/math/s_matherr.c: Removed.
+ * libm/math/s_modf.c: Removed.
+ * libm/math/s_nan.c: Removed.
+ * libm/math/s_nextafter.c: Removed.
+ * libm/math/s_rint.c: Removed.
+ * libm/math/s_scalbn.c: Removed.
+ * libm/math/sf_cbrt.c: Removed.
+ * libm/math/sf_copysign.c: Removed.
+ * libm/math/sf_expm1.c: Removed.
+ * libm/math/sf_finite.c: Removed.
+ * libm/math/sf_ilogb.c: Removed.
+ * libm/math/sf_infinity.c: Removed.
+ * libm/math/sf_log1p.c: Removed.
+ * libm/math/sf_logb.c: Removed.
+ * libm/math/sf_modf.c: Removed.
+ * libm/math/sf_nan.c: Removed.
+ * libm/math/sf_nextafter.c: Removed.
+ * libm/math/sf_rint.c: Removed.
+ * libm/math/sf_scalbn.c: Removed.
+ * libm/math/Makefile.am: Removed references to deleted files (above).
+ * libm/math/Makefile.in: Regenerated.
+ * libm/Makefile.am: Added common directory to math.
+ * libm/Makefile.in: Regenerated.
+
+Mon Nov 2 23:12:00 1998 Ranjith Kumaran <ranjith@cygnus.com>
+
+ * libm/mathfp: Add non-ANSI functions.
+ * libm/mathfp/e_acosh.c acosh(): New file.
+ * libm/mathfp/e_atanh.c atanh(): New file.
+ * libm/mathfp/e_hypot.c hypot(): New file.
+ * libm/mathfp/e_j0.c j0(): New file.
+ * libm/mathfp/e_j1.c j1(): New file.
+ * libm/mathfp/e_remainder.c remainder(): New file.
+ * libm/mathfp/e_scalb.c scalb(): New file.
+ * libm/mathfp/ef_acosh.c acoshf(): New file.
+ * libm/mathfp/ef_atanh.c atanhf(): New file.
+ * libm/mathfp/ef_hypot.c hypotf(): New file.
+ * libm/mathfp/ef_j0.c j0f(): New file.
+ * libm/mathfp/ef_j1.c j1f(): New file.
+ * libm/mathfp/ef_remainder.c remainderf(): New file.
+ * libm/mathfp/ef_scalb.c scalbf(): New file.
+ * libm/mathfp/er_gamma.c gamma_r: New file.
+ * libm/mathfp/er_lgamma.c lgamma_r(): New file.
+ * libm/mathfp/erf_gamma.c gamma_rf(): New file.
+ * libm/mathfp/erf_lgamma.c lgamma_rf(): New file.
+ * libm/mathfp/w_cabs.c cabs(): New file.
+ * libm/mathfp/w_drem.c drem(): New file.
+ * libm/mathfp/w_jn.c jn(): New file.
+ * libm/mathfp/wf_cabs.c cabsf(): New file.
+ * libm/mathfp/wf_drem.c dremf(): New file.
+ * libm/mathfp/wf_jn.c jnf(): New file.
+
+Mon Nov 2 16:43:18 1998 Geoffrey Noer <noer@cygnus.com>
+
+ * libc/sys/cygwin32: remove directory and contents
+ * libc/sys/cygwin: and add back, losing the "32".
+ * configure.host: check for cygwin* instead of cygwin32.
+ * acinclude.m4: ditto.
+ * aclocal.m4: regenerate with aclocal
+ * configure: regenerate with autoconf
+
+Tue Oct 20 17:28:28 1998 Geoffrey Noer <noer@cygnus.com>
+
+ * libc/stdio/tmpnam.c (_tempnam_r): not enough memory allocated
+ for length
+
+Tue Oct 20 18:49:05 1998 Jeff Johnston <jjohnstn@cygnus.com>
+
+ * libc/include/sys/reent.h (struct _reent): Added variables _rand_next, _strtok_last,
+ _asctime_buf, _localtime_buf and _gamma_signgam to struct reent
+ to make rand/srand, strtok, asctime, localtime, w_gamma,
+ w_lgamma, wf_gamma, and wf_lgamma reentrant. Included
+ time.h to bring in struct tm definition.
+ * libc/stdlib/rand.c (rand, srand): Don't emit functions 'rand' and 'srand' if
+ '_REENT_ONLY' is set. Used variable '_rand_next' from struct reent.
+ * libc/stdlib/strtok.c (strtok): Used variable '_strtok_last' from struct reent
+ instead of static variable.
+ * libc/stdlib/asctime.c (asctime): Used variable '_asctime_buf' from
+ struct reent instead of static variable.
+ * libc/stdlib/lcltime.c (localtime): Used variable '_localtime_buf' from
+ struct reent instead of static variable.
+ * libm/math/Makefile.am: Removed s_signgam.o.
+ * libm/math/Makefile.in: Regenerated.
+ * libm/math/w_gamma.c (gamma): Used variable '_gamma_signgam' from
+ struct reent instead of global variable 'signgam'.
+ * libm/math/w_lgamma.c (lgamma): Likewise.
+ * libm/math/wf_gamma.c (gammaf): Likewise.
+ * libm/math/wf_lgamma.c (lgammaf): Likewise.
+ * libm/math/s_signgam.c: Removed.
+ * libc/include/unctrl.h: Defined arrays __unctrl and __unctrllen
+ to be const.
+ * libc/misc/unctrl.c: Defined arrays __unctrl and __unctrllen
+ to be const.
+ * libc/reent/Makefile.am: Added dependence for impure.o on impure.c and
+ libc/include/reent.h.
+ * libc/reent/Makefile.in: Regenerated.
+ * libc/stdio/vfprintf.c (_vfprintf_r): Defined arrays 'blanks' and 'zeroes'
+ to be const.
+ * libc/stdlib/mbtowc_r.c (_mbtowc_r): Defined arrays 'JIS_state_table' and
+ 'JIS_action_table' to be const.
+ * libm/math/s_lib_ver.c: define variable _LIB_VERSION to be const.
+
+Mon Oct 12 00:26:33 1998 Christopher Faylor <cgf@cygnus.com>
+
+ * acinclude.m4: $with_target_subdir should default to '.'
+ or confusion results when configuring in same directory as sources.
+ * Regenerate all aclocal.m4 and configure files.
+
+Fri Oct 9 16:27:36 1998 Jeff Johnston <jjohnstn@cygnus.com>
+
+ * libc/stdlib/mallocr.c: Added 16 byte alignment support which
+ can be set by defining MALLOC_ALIGNMENT=16. Also added support
+ for platforms where sizeof(size_t) < sizeof(long) via
+ SIZE_T_SMALLER_THAN_LONG macro.
+
+Wed Oct 7 14:02:40 1998 Jeff Johnston <jjohnstn@cygnus.com>
+
+ * libc/include/time.h (CLOCKS_PER_SEC): Change CLOCKS_PER_SEC
+ to refer to _CLOCKS_PER_SEC_ and added including <machine/time.h>
+ which sets _CLOCKS_PER_SEC_ for selected machines.
+ * libc/include/machine/time.h: New file.
+
+Tue Oct 6 16:08:05 1998 Jeff Johnston <jjohnstn@cygnus.com>
+
+ * libc/syscalls/sysexecve.c: New file.
+ * libc/syscalls/sysgettod.c: New file.
+ * libc/syscalls/systimes.c: New file.
+ * libc/syscalls/Makefile.am: Added new objects.
+ * libc/syscalls/Makefile.in: Regenerated.
+ * libc/include/_syslist.h (_execve): Moved define in file.
+ * libc/include/reent.h: Added _execve_r declaration.
+ * libc/Makefile.in: Regenerated.
+ * libc/ctype/Makefile.in: Regenerated.
+ * libc/errno/Makefile.in: Regenerated.
+ * libc/locale/Makefile.in: Regenerated.
+ * libc/machine/Makefile.in: Regenerated.
+ * libc/misc/Makefile.in: Regenerated.
+ * libc/posix/Makefile.in: Regenerated.
+ * libc/reent/Makefile.in: Regenerated.
+ * libc/reent/execr.c (_execve_r): Added _execve_r function.
+ * libc/signal/Makefile.in: Regenerated.
+ * libc/stdio/Makefile.in: Regenerated.
+ * libc/time/Makefile.in: Regenerated.
+ * libc/unix/Makefile.in: Regenerated.
+ * libm/mathfp/Makefile.in: Regenerated.
+
+Tue Oct 6 14:14:05 1998 Jeff Johnston <jjohnstn@cygnus.com>
+
+ * libc/string/Makefile.in: Regenerated.
+ * libc/string/memchr.c (memchr): Moved code to reduce object size.
+ * libc/string/memcpy.c (memcpy): Ditto.
+ * libc/string/memcmp.c (memcmp): Ditto.
+ * libc/string/memset.c (memset): Ditto.
+ * libc/string/strchr.c (strchr): Ditto.
+ * libc/string/strcmp.c (strcmp): Ditto.
+ * libc/string/strcpy.c (strcpy): Ditto.
+ * libc/string/strlen.c (strlen): Ditto.
+
+Tue Oct 6 13:58:05 1998 Jeff Johnston <jjohnstn@cygnus.com>
+
+ * libm/acinclude.m4: Removed since newlib/acinclude.m4 can be used
+ to generate aclocal.m4.
+ * libm/Makefile.in: Regenerated.
+ * libm/aclocal.m4: Regenerated.
+ * libm/configure: Regenerated.
+ * libm/math/Makefile.in: Regenerated.
+ * libm/mathfp/Makefile.in: Regenerated.
+
+1998-09-25 Mark Salter <msalter@cygnus.com>
+
+ * libc/include/machine/setjmp.h: Fixed test for mn10300 and mn10200
+ by adding leading and trailing underscores to symbol names.
+
+Tue Sep 22 15:33:41 1998 Christopher Faylor <cgf@cygnus.com>
+
+ * Makefile.in: Add default for AR_FLAGS.
+
+Tue Sep 22 15:02:49 1998 Christopher Faylor <cgf@cygnus.com>
+
+ patch from ian@airs.com (Ian Taylor):
+ * acinclude.m4: Run AC_CANONICAL_BUILD explicitly before
+ NEWLIB_CONFIGURE so AC_CANONICAL_HOST will be run before it
+ is needed for detecting the build machine. Required for
+ cygwin native builds.
+
+ * Regenerate all aclocal.m4 and configure files.
+
+Mon Sep 21 14:44:16 1998 Nick Clifton <nickc@cygnus.com>
+
+ * libc/sys/arm/crt0.S: Prepend a period to all local labels that
+ used to start with LC.
+
+Thu Sep 17 18:18:11 1998 J"orn Rennecke <amylaar@cygnus.co.uk>
+
+ * libc/machine/sh/setjmp.S (setjmp): Handle __SH4* like __SH3E__ .
+ (longjmp): Likewise.
+
+Thu Sep 17 16:25:33 1998 J"orn Rennecke <amylaar@cygnus.co.uk>
+
+ * libc/machine/sh/memset.S (memset): Move copy from r4 to r4 before
+ the test for small number of bytes.
+
+Thu Sep 10 11:40:00 1998 Ranjith Kumaran <ranjith@cygnus.com>
+
+ * Makefile.am: Add --enable-newlib-hw-fp check. This builds the new
+ math library that uses floating point algorithms instead of the old
+ libm.
+ * Makefile.in: Regenerate with automake version 1.3b.
+ * configure: Rebuild.
+ * libm/Makefile.in: Regenerate with automake version 1.3b.
+ * libm/aclocal.m4: Regenerate.
+ * libm/configure: Rebuild.
+ * libm/configure.in: Add newlib_hw_fp definition and mathfp directory.
+ * libm/acinclude.m4: Define macros for configure.in.
+ * libm/config.h.in: Generate.
+ * libm/mathfp/Makefile.am: New file.
+ * libm/mathfp/Makefile.in: Generate.
+ * libm/mathfp/s_acos.c (acos): New file.
+ * libm/mathfp/s_asin.c (asin): New file.
+ * libm/mathfp/s_asine.c (asine): New file.
+ * libm/mathfp/s_atan.c (atan): New file.
+ * libm/mathfp/s_atan2.c (atan2): New file.
+ * libm/mathfp/s_atangent.c (atangent): New file.
+ * libm/mathfp/s_ceil.c (ceil): New file.
+ * libm/mathfp/s_copysign.c (copysign): New file.
+ * libm/mathfp/s_cos.c (cos): New file.
+ * libm/mathfp/s_cosh.c (cosh): New file.
+ * libm/mathfp/s_exp.c (exp): New file.
+ * libm/mathfp/s_fabs.c (fabs): New file.
+ * libm/mathfp/s_finite.c (finite): New file.
+ * libm/mathfp/s_floor.c (floor): New file.
+ * libm/mathfp/s_fmod.c (fmod): New file.
+ * libm/mathfp/s_frexp.c (frexp): New file.
+ * libm/mathfp/s_infconst.c: New file.
+ * libm/mathfp/s_isinf (isinf).c: New file.
+ * libm/mathfp/s_isnan.c (isnan): New file.
+ * libm/mathfp/s_ispos.c (ispos): New file.
+ * libm/mathfp/s_ldexp.c (ldexp): New file.
+ * libm/mathfp/s_log.c (log): New file.
+ * libm/mathfp/s_log10.c (log10): New file.
+ * libm/mathfp/s_logarithm.c (logarithm): New file.
+ * libm/mathfp/s_mathcnst.c: New file.
+ * libm/mathfp/s_modf (modf).c: New file.
+ * libm/mathfp/s_numtest.c (numtest): New file.
+ * libm/mathfp/s_pow.c (pow): New file.
+ * libm/mathfp/s_scalbn.c (scalbn): New file.
+ * libm/mathfp/s_sin (sin).c: New file.
+ * libm/mathfp/s_sine.c (sine): New file.
+ * libm/mathfp/s_sineh.c (sineh): New file.
+ * libm/mathfp/s_sinf.c (sinf): New file.
+ * libm/mathfp/s_sinh.c (sinh): New file.
+ * libm/mathfp/s_sqrt.c (sqrt): New file.
+ * libm/mathfp/s_tan.c (tan): New file.
+ * libm/mathfp/s_tanh.c (tanh): New file.
+ * libm/mathfp/sf_acos.c (acosf): New file.
+ * libm/mathfp/sf_asin.c (asinf): New file.
+ * libm/mathfp/sf_asine.c (asinef): New file.
+ * libm/mathfp/sf_atan.c (atanf): New file.
+ * libm/mathfp/sf_atan2.c (atan2f): New file.
+ * libm/mathfp/sf_atangent.c (atangent): New file.
+ * libm/mathfp/sf_ceil.c (ceilf): New file.
+ * libm/mathfp/sf_copysign.c (copysignf): New file.
+ * libm/mathfp/sf_cos.c (cosf): New file.
+ * libm/mathfp/sf_cosh.c (coshf): New file.
+ * libm/mathfp/sf_exp.c (expf): New file.
+ * libm/mathfp/sf_fabs.c (fabsf): New file.
+ * libm/mathfp/sf_finite.c (finitef): New file.
+ * libm/mathfp/sf_floor.c (floorf): New file.
+ * libm/mathfp/sf_fmod.c (fmodf): New file.
+ * libm/mathfp/sf_frexp.c (frexpf): New file.
+ * libm/mathfp/sf_isinf.c (isinff): New file.
+ * libm/mathfp/sf_isnan.c (isnanf): New file.
+ * libm/mathfp/sf_ispos.c (isposf): New file.
+ * libm/mathfp/sf_ldexp.c (ldexpf): New file.
+ * libm/mathfp/sf_log.c (logf): New file.
+ * libm/mathfp/sf_log10.c (log10f): New file.
+ * libm/mathfp/sf_logarithm.c (logarithmf): New file.
+ * libm/mathfp/sf_modf.c (modff): New file.
+ * libm/mathfp/sf_numtest.c (numtestf): New file.
+ * libm/mathfp/sf_pow.c (powf): New file.
+ * libm/mathfp/sf_scalbn.c (scalbnf): New file.
+ * libm/mathfp/sf_sin.c (sinf): New file.
+ * libm/mathfp/sf_sine.c (sinef): New file.
+ * libm/mathfp/sf_sineh.c (sinehf): New file.
+ * libm/mathfp/sf_sinh.c (sinhf): New file.
+ * libm/mathfp/sf_sqrt.c (sqrtf): New file.
+ * libm/mathfp/sf_tan.c (tanf): New file.
+ * libm/mathfp/sf_tanh.c (tanhf): New file.
+ * libm/mathfp/zmath.h: New file.
+
+Wed Sep 2 02:49:03 1998 J"orn Rennecke <amylaar@cygnus.co.uk>
+
+ * libc/machine/sh/strcmp.S (L_char_loop): Re-load r0 at loop
+ exit if it has been overwritten by pre-fetching in delay slot.
+
+1998-09-01 Michael Meissner <meissner@cygnus.com>
+
+ * Makefile.am (tooldir): Add in host_alias, so that multilib
+ libraries are installed in the directory the compiler looks in.
+ * Makefile.in: Regenerate.
+
+ * libc/stdlib/Makefile.in: Regenerate with automake version 1.3b.
+
+Mon Aug 31 11:39:31 1998 Jeff Johnston <jjohnstn@cygnus.com>
+
+ * libc/machine/mn10300/memcpy.S (_memcpy): Move alignment test
+ ahead of test for number of bytes being moved.
+
+Thu Aug 27 14:07:53 1998 Christopher Faylor <cgf@cygnus.com>
+
+ * libc/include/sys/unistd.h: Nothing special needed for
+ _exit under cygwin.
+
+Wed Aug 26 15:05:21 1998 Nick Clifton <nickc@cygnus.com>
+
+ * libc/sys/arm/syscalls.c (_sbrk): Rename '_end' to 'end' to
+ conform to user label naming conventions.
+
+Mon Aug 24 14:46:19 1998 Geoffrey Noer <noer@cygnus.com>
+
+ * libc/sys/cygwin32/sys/utime.h: variable names in
+ protos should start with two leading underscores
+ * libc/include/string.h: ditto
+ * libc/include/sys/signal.h: ditto
+ * libc/include/sys/stat.h: ditto
+ * libc/include/sys/time.h: ditto
+ * libc/include/sys/unistd.h: ditto
+ * libc/include/ctype.h: ditto
+ * libc/include/stdlib.h: ditto
+ * libc/include/sys/reent.h: struct _atexit function ptr takes a
+ void, same with _sig_func.
+
+Fri Aug 21 14:44:14 1998 Jeff Johnston <jjohnstn@cygnus.com>
+
+ * libc/stdlib/mbtowc_r.c (_mbtowc_r): Added preprocessor checks
+ for MB_CAPABLE to reduce code size when newlib is not configured
+ with --enable-newlib-mb.
+ * libc/stdlib/Makefile.am: Specified -fshort-enums when building
+ mbtowc_r.o to minimize size.
+ * libc/stdlib/Makefile.in: Rebuild.
+
+Wed Aug 19 16:20:13 1998 Jim Wilson <wilson@cygnus.com>
+
+ * libc/sys/sparc64/Makefile.am (.S_r.o, .c_r.o): Change -DREENTRANT
+ to -DREENT.
+ * libc/sys/sparc64/Makefile.in: Rebuild.
+
+Tue Aug 18 22:38:29 1998 Ian Lance Taylor <ian@cygnus.com>
+
+ * Makefile.am (MAKEOVERRIDES): Define.
+ * Makefile.in: Rebuild.
+
+Tue Aug 18 12:38:47 1998 Jim Wilson <wilson@cygnus.com>
+
+ * libc/sys/sparc64/sys/stat.h (stat): Add const.
+
+Mon Aug 17 22:27:06 1998 Ian Lance Taylor <ian@cygnus.com>
+
+ * acinclude.m4 (NEWLIB_CONFIGURE): Use top_builddir in
+ newlib_cflags when looking for targ-include.
+ * */aclocal.m4, */configure: Rebuild.
+
+Fri Jul 31 10:57:42 1998 Catherine Moore <clm@cygnus.com>
+
+ * libc/sys/arm/syscalls.c (_sbrk): Change "__end__"
+ to "_end".
+
+Wed Jul 29 00:02:01 1998 Mark Alexander <marka@cygnus.com>
+
+ * libc/include/sys/config.h: Define __IEEE_LITTLE_ENDIAN
+ on SPARCs with little-endian data.
+ * libc/include/machine/ieeefp.h: Ditto.
+
+Wed Jul 22 18:00:10 1998 Ian Lance Taylor <ian@cygnus.com>
+
+ * acinclude.m4: Handle a relative srcdir correctly when setting
+ newlib_cflags.
+ * */aclocal.m4, */configure: Rebuild.
+
+Wed Jul 22 17:11:33 1998 Jeff Johnston <jjohnstn@cygnus.com>
+
+ * libm/math/wrf_lgamma.c (lgammaf_r): Initialize exc.err to 0 and
+ also set exc.arg1, exc.arg2 appropriately in case matherr is supplied.
+ * libm/math/wrf_gamma.c (gammaf_r): ditto
+ * libm/math/wr_lgamma.c (lgamma_r): ditto
+ * libm/math/wr_gamma.c (gamma_r): ditto
+ * libm/math/wf_sqrt.c (sqrtf): ditto
+ * libm/math/wf_sinh.c (sinhf): ditto
+ * libm/math/wf_scalb.c (scalbf): ditto
+ * libm/math/wf_remainder.c (remainderf): ditto
+ * libm/math/wf_pow.c (powf): ditto
+ * libm/math/wf_log10.c (log10f): ditto
+ * libm/math/wf_log.c (logf): ditto
+ * libm/math/wf_lgamma.c (lgammaf): ditto
+ * libm/math/wf_jn.c (jnf, ynf): ditto
+ * libm/math/wf_j1.c (j1f, y1f): ditto
+ * libm/math/wf_j0.c (j0f, y0f): ditto
+ * libm/math/wf_hypot.c (hypotf): ditto
+ * libm/math/wf_gamma.c (gammaf): ditto
+ * libm/math/wf_fmod.c (fmodf): ditto
+ * libm/math/wf_exp.c (expf): ditto
+ * libm/math/wf_cosh.c (coshf): ditto
+ * libm/math/wf_atanh.c (atanhf): ditto
+ * libm/math/wf_atan2f.c (atan2f): ditto
+ * libm/math/wf_asin.c (asinf): ditto
+ * libm/math/wf_acosh.c (acoshf): ditto
+ * libm/math/wf_acos.c (acosf): ditto
+ * libm/math/w_sqrt.c (sqrt): ditto
+ * libm/math/w_sinh.c (sinh): ditto
+ * libm/math/w_scalb.c (scalb): ditto
+ * libm/math/w_remainder.c (remainder): ditto
+ * libm/math/w_pow.c (pow): ditto
+ * libm/math/w_log10.c (log10): ditto
+ * libm/math/w_log.c (log): ditto
+ * libm/math/w_lgamma.c (lgamma): ditto
+ * libm/math/w_jn.c (jn, yn): ditto
+ * libm/math/w_j1.c (j1, y1): ditto
+ * libm/math/w_j0.c (j0, y0): ditto
+ * libm/math/w_hypot.c (hypot): ditto
+ * libm/math/w_gamma.c (gamma): ditto
+ * libm/math/w_fmod.c (fmod): ditto
+ * libm/math/w_exp.c (exp): ditto
+ * libm/math/w_cosh.c (cosh): ditto
+ * libm/math/w_atanh.c (atanh): ditto
+ * libm/math/w_atan2f.c (atan2): ditto
+ * libm/math/w_asin.c (asin): ditto
+ * libm/math/w_acosh.c (acosh): ditto
+ * libm/math/w_acos.c (acos): ditto
+
+Tue Jul 21 12:34:54 1998 Ian Lance Taylor <ian@cygnus.com>
+
+ * libm/math/Makefile.am (src): Add w_cabs.c and w_drem.c.
+ (fsrc): Add wf_cabs.c and wf_drem.c.
+ * libm/math/Makefile.in: Rebuild.
+
+ * Makefile.am (AM_MAKEFLAGS): Add CFLAGS_FOR_BUILD. Remove some
+ unused directory variables. Remove duplicate CFLAGS.
+ * Makefile.in: Rebuild.
+
+ * doc/Makefile.am ($(MKDOC)): Don't use $(CFLAGS) when building
+ with $(CC_FOR_BUILD).
+ (makedoc.o): Likewise.
+ * doc/Makefile.in: Rebuild.
+
+ * libc/sys/cygwin32/Makefile.am (EXTRA_LIBRARIES): Define, to
+ force a definition of COMPILE.
+ (libfoo_a_SOURCES): Define.
+ * libc/sys/cygwin32/Makefile.in: Rebuild.
+ * libc/sys/tic80/Makefile.am (EXTRA_LIBRARIES): Define, to
+ force a definition of COMPILE.
+ (libfoo_a_SOURCES): Define.
+ * libc/sys/tic80/Makefile.in: Rebuild.
+
+Mon Jul 20 20:49:24 1998 Christopher Faylor <cgf@cygnus.com>
+
+ * libc/include/sys/fcntl.h: Add O_NOINHERIT, Win32-specific
+ flag.
+
+Fri Jul 17 16:13:16 1998 Ian Lance Taylor <ian@cygnus.com>
+
+ * Build using autoconf and automake. Added many Makefile.am and
+ configure.in files, plus generated files. Old configure.in files
+ and all old Makefile.in files completely replaced. Removed
+ host/any. Added acinclude.m4 and configure.host.
+
+Sat Jul 11 18:14:49 1998 Felix Lee <flee@cygnus.com>
+
+ * libc/stdio/vfprintf.c: enable long long support, sometimes.
+ * configure.in (*-*-cygwin32): add -DWANT_PRINTF_LONG_LONG.
+
+Tue Jul 7 01:51:55 1998 J"orn Rennecke <amylaar@cygnus.co.uk>
+
+ * libc/machine/sh/strcmp.S, libc/machine/sh/strcpy.S: New files.
+ * libc/machine/sh/Makefile.in: Add rules for new files.
+
+Tue Jul 7 01:40:55 1998 J"orn Rennecke <amylaar@cygnus.co.uk>
+
+ * libc/machine/sh/asm.h (SL, DELAYED_BRANCHES): Define.
+ * libc/machine/sh/memset.S (memset): Remove uses of dt; shorten code.
+ * libc/machine/sh/memcpy.S (SL, DELAYED_BRANCHES): Don't define.
+
+Thu Jul 2 10:33:16 1998 Nick Clifton <nickc@cygnus.com>
+
+ * libc/sys/arm/syscalls.c (_exit): Add comment, noting that exit
+ code is ignored.
+
+Wed Jun 24 13:56:54 1998 Jeff Johnston <jjohnstn@cygnus.com>
+
+ * libc/stdio/tmpnam.c (_tmpnam_r): Changed routine to use
+ internal static buffer when s is NULL, as prescribed by ANSI.
+
+1998-06-22 Vladimir N. Makarov <vmakarov@cygnus.com>
+
+ * libc/sys/h8300hms/Makefile.in (OFILES): malloc.o has been
+ removed.
+ * libc/sys/h8300hms/malloc.c: has been removed. Now malloc.c from
+ libc/stdlib will be used for h8300hms.
+
+Thu Jun 18 16:56:05 1998 Jeff Johnston <jjohnstn@cygnus.com>
+
+ * libc/machine/mn10300/strlen.S (_strlen): New optimized assembler
+ version that can be built either for speed or size.
+ * libc/machine/mn10300/memset.S (_memset): ditto
+ * libc/machine/mn10300/memchr.S (_memchr): ditto
+ * libc/machine/mn10300/memcpy.S (_memcpy): ditto
+ * libc/machine/mn10300/memcmp.S (_memcmp): ditto
+ * libc/machine/mn10300/strchr.S (_strchr): ditto
+ * libc/machine/mn10300/strcmp.S (_strcmp): ditto
+ * libc/machine/mn10300/strcpy.S (_strcpy): ditto
+ * libc/machine/mn10300/Makefile.in: Added entries for
+ memchr.o, memcmp.o, memcpy.o, memset.o, strchr.o,
+ strcmp.o, strcpy.o, and strlen.o.
+
+Wed Jun 17 12:50:26 1998 Mark Alexander <marka@cygnus.com>
+
+ * configure.in: Don't use libc/sys/sysmec for MN10200; it's
+ been replaced with libgloss/mn10200.
+
+Fri Jun 12 14:34:39 1998 Michael Meissner <meissner@cygnus.com>
+
+ * libc/string/strchr.c (strchr): Make s a constant pointer to
+ avoid warning.
+
+Tue Jun 9 16:29:30 1998 Jason Molenda (crash@bugshack.cygnus.com)
+
+ * configure.in (target == arm* or thumb*): Define ARM_RDI_MONITOR
+ instead of ARM_RDP_MONITOR (sys/libc/arm/crt0.S to assume Angel
+ board SWIs instead of Demon board SWIs).
+
+Thu Jun 4 12:16:46 1998 Michael Meissner <meissner@cygnus.com>
+
+ * libc/string/strncat.c (strncat): Make -Os act the same as
+ PREFER_SIZE_OVER_SPEED being defined.
+
+Wed Jun 3 17:52:33 1998 Michael Meissner <meissner@cygnus.com>
+
+ * libc/string/memchr.c (memchr): Make -Os act the same as
+ PREFER_SIZE_OVER_SPEED being defined.
+ * libc/string/memcmp.c (memcmp): Ditto.
+ * libc/string/memcpy.c (memcpy): Ditto.
+ * libc/string/memset.c (memset): Ditto.
+ * libc/string/strcat.c (strcat): Ditto.
+ * libc/string/strchr.c (strchr): Ditto.
+ * libc/string/strcmp.c (strcmp): Ditto.
+ * libc/string/strcpy.c (strcpy): Ditto.
+ * libc/string/strlen.c (strlen): Ditto.
+ * libc/string/strncat.c (strncat): Ditto.
+ * libc/string/strncmp.c (strncmp): Ditto.
+ * libc/string/strncpy.c (strncpy): Ditto.
+
+Mon Jun 1 15:25:07 1998 Geoffrey Noer <noer@cygnus.com>
+
+ * libc/include/sys/itimer.h: remove
+ * libc/include/sys/time.h: itimer stuff should be here
+
+Mon Jun 1 16:31:29 1998 Jeff Johnston <jjohnstn@cygnus.com>
+
+ * libc/stdio/vfprintf.c (cvt): Changed code to look at sign
+ bit instead of comparing to 0 so -0.0 can be printed correctly.
+
+Sat May 30 09:33:51 1998 J"orn Rennecke <amylaar@cygnus.co.uk>
+
+ * libc/stdlib/mprec.c (b2d): Inilialize d in non-VAX case too.
+
+Fri May 29 22:25:10 1998 Geoffrey Noer <noer@cygnus.com>
+
+ * libc/include/sys/unistd.h: fix sync() proto
+ * libc/include/sys/fcntl.h: remove _close which is already
+ defined in unistd.h.
+ * libc/include/sys/time.h: add getitimer proto
+
+Fri May 29 16:10:28 1998 Geoffrey Noer <noer@cygnus.com>
+
+ * libc/string/strchr.c: convert arg to unsigned char
+ * libc/include/stdlib.h: add protos for random, srandom
+ * libc/include/sys/stat.h: add lstat proto
+ * libc/include/sys/time.h: add setitimer proto
+ * libc/include/sys/unistd.h: add readlink, symlink protos
+ * libc/include/process.h: instead of including windows.h and using
+ HANDLEs in sexec protos, just use void *s. Need to include
+ sys/types.h.
+
+Fri May 29 03:04:29 1998 Geoffrey Noer <noer@cygnus.com>
+
+ * libc/include/sys/fcntl.h: add _close proto for Cygwin32
+
+Thu May 28 16:34:21 1998 Geoffrey Noer <noer@cygnus.com>
+
+ * libc/include/process.h: add secure exec protos
+
+Wed May 27 13:54:51 1998 Jeffrey A Law (law@cygnus.com)
+
+ * libc/stdlib/dtoa.c (_dtoa_r): Use "double_union" for variables
+ which are accessed as both doubles and integers.
+ * libc/stdlib/mprec.c (ulp, b2d, ratio): Likewise.
+ * libc/stdlib/strtod.c (_strtod_r): Likewise.
+ * libc/stdlib/mprec.h: Add "union double_union" and change
+ word0/word1 macros to use it.
+
+Tue May 26 18:04:21 1998 Geoffrey Noer <noer@cygnus.com>
+
+ * libc/include/sys/signal.h: add __cplusplus wrapper
+
+Tue May 26 15:10:22 1998 Geoffrey Noer <noer@cygnus.com>
+
+ * libc/include/sys/utime.h: new generic file that gets replaced by
+ libc/sys/SYSDIR/sys/utime.h on systems that support the utime
+ function.
+ * sys/cygwin32/sys/utime.h: use _EXFUN in utime proto
+ * libc/include/time.h: remove duplicate utime proto
+ * libc/include/utime.h: add comment
+
+Sun May 24 23:56:20 1998 Christopher Faylor <cgf@cygnus.com>
+
+ * libc/include/sys/time.h: Add missing include to
+ allow use of _EXFUN. Remove times function that is
+ already defined in times.h.
+
+Sun May 24 01:32:14 1998 Christopher Faylor <cgf@cygnus.com>
+
+ * libc/include/time.h: Fix typo in tzset.
+
+Fri May 22 17:00:48 1998 Geoffrey Noer <noer@cygnus.com>
+
+ * libc/include/sys/time.h: add missing Cygwin32 function protos
+ * libc/include/sys/unistd.h: ditto
+ * libc/include/time.h: ditto
+
+Wed May 20 20:35:11 1998 Geoffrey Noer <noer@cygnus.com>
+
+ * libc/sys/cygwin32/sys/param.h: add protected NULL def, remove
+ FIXME.
+ * libc/include/sys/types.h: add a new __MS_types__ section
+ to define vm_offset_t, vm_size_t, int32_t et al, register_t,
+ __BIT_TYPES_DEFINED__.
+
+Wed May 20 18:49:21 1998 Geoffrey Noer <noer@cygnus.com>
+
+ * libc/sys/cygwin32/sys/param.h: move here from winsup/include/sys
+ since it overrides the one in libc/include/sys. Also, start
+ including types.h.
+
+Wed May 20 14:45:40 1998 Geoffrey Noer <noer@cygnus.com>
+
+ * libm/math/Makefile.in: add s_signgam.o to obj list
+
+Tue May 19 11:57:11 1998 Jeff Johnston <jjohnstn@cygnus.com>
+
+ * libc/include/sys/reent.h (_REENT_INIT): Initialize current locale to "C".
+
+Mon May 18 22:36:12 1998 Christopher Faylor <cgf@cygnus.com>
+
+ * libc/include/sys/signal.h: cygwin32 exports sig{empty,add}set,
+ so don't use defines.
+
+Mon May 18 19:01:02 1998 Michael Meissner <meissner@cygnus.com>
+
+ * libc/sys/d10v/crt0.S: Use correct stab for 16-bit ints.
+
+Sun May 17 18:40:32 1998 Frank Ch. Eigler <fche@cygnus.com>
+
+ * libc/stdlib/mbtowc_r.c (_mbtowc_r): Accept a NULL
+ _current_locale as default locale.
+
+Sat May 16 21:59:59 1998 Bob Manson <manson@charmed.cygnus.com>
+
+ * libc/stdlib/mallocr.c (mALLOc): Add explicit tests for
+ insufficient space in a chunk.
+
+Tue May 12 14:41:01 1998 Jeff Johnston <jjohnstn@cygnus.com>
+
+ * configure.in (links): Added check for --enable-newlib-mb configure
+ option which defines the MB_CAPABLE macro.
+ * libc/locale/locale.c (_setlocale_r): Added support for setting
+ LC_CTYPE to "C-JIS", "C-SJIS" or "C-EUCJP", when MB_CAPABLE is
+ defined.
+ * libc/stdlib/mbtowc_r.c (_mbtowc_r): New function _mbtowc_r that
+ implements mbtowc() with multibyte support for JIS, SJIS, and EUC-JP.
+ * libc/stdlib/wctomb_r.c (_wctomb_r): New function _wctomb_r that
+ implements wctomb() with multibyte support for JIS, SJIS, and EUC-JP.
+ * libc/stdlib/mbstowcs_r.c (_mbstowcs_r): New function _mbstowcs_r that
+ implements mbstowcs() with multibyte support for JIS, SJIS, and EUC-JP.
+ * libc/stdlib/wcstombs_r.c (_wcstombs_r): New function _wcstomb_r that implements
+ wcstombs() with multibyte support for JIS, SJIS, and EUC-JP.
+ * libc/stdlib/Makefile.in: Added new multibyte
+ routines: _mbtowc_r(), _wctomb_r(), _mbstowcs_r(), and _wcstombs_r().
+ * libc/include/stdlib.h: Added declarations of _mbtowc_r(), _wctomb_r(),
+ _mbstowcs_r(), and _wcstombs_r().
+ * libc/stdlib/mbctype.h: New internal header file that contains macros to test
+ for JIS, SJIS, and EUC-JP characters.
+ * libc/stdlib/mblen.c (mblen): Added code to call _mbtowc_r() if
+ MB_CAPABLE defined.
+ * libc/stdlib/mbtowc.c (mbtowc): Added code to call _mbtowc_r() if
+ MB_CAPABLE defined.
+ * libc/stdlib/wctomb.c (wctomb): Added code to call _wctomb_r() if
+ MB_CAPABLE defined.
+ * libc/stdlib/mbstowcs.c (mbstowcs): Added code to call _mbstowcs_r()
+ if MB_CAPABLE defined.
+ * libc/stdlib/wcstombs.c (wcstombs): Added code to call _wcstombs_r()
+ if MB_CAPABLE defined.
+ * libc/stdio/vfscanf.c (__svfscanf): Added multibyte tolerance
+ to the format string processing when MB_CAPABLE.
+ * libc/stdio/vfprintf.c (_VFPRINTF_R): Changed mbtowc() call to
+ call _mbtowc_r().
+
+Tue May 5 16:07:23 1998 Nick Clifton <nickc@cygnus.com>
+
+ The following modifications are courtesy of Anthony Thompson,
+ athompson@cambridge.arm.com:
+ * libc/sys/arm/syscalls.c: Initialise and track stdin/out/err for
+ boith RDI and RDP monitors.
+ * libc/sys/arm/crt0.S: Call initialise_monitor_handles() for both
+ RDI and RDP monitors.
+
+Wed Apr 29 15:22:15 1998 Jeff Johnston <jjohnstn@cygnus.com>
+
+ * configure.in (links): Added -DHAVE_GETTIMEOFDAY for arm and thumb.
+ * libc/sys/arm/syscalls.c (_gettimeofday _times): Added functions.
+ (_swiopen): Fixed open flags to treat write with append as just append.
+ (_swilseek): Fixed lseek support to properly handle offsets from SEEK_END.
+ * libc/sys/arm/sys/param.h: New file to override param.h for ARM.
+
+Fri Apr 24 18:00:09 1998 J"orn Rennecke <amylaar@cygnus.co.uk>
+
+ * libc/machine/sh/memcpy.S (L_odddst, big endian version):
+ When needing to transfer an initial 2-byte-word, store as
+ two single bytes.
+
+Wed Apr 22 17:56:03 1998 J"orn Rennecke <amylaar@cygnus.co.uk>
+
+ * libc/sys/sh/crt0.S (start): Handle __SH4_SINGLE_ONLY__ like
+ __SH3E__ .
+ * libc/machine/sh/memcpy.S (DELAYED_BRANCHES, SL): Likewise.
+ * libc/include/machine/ieeefp.h (_DOUBLE_IS_32BITS): Likewise.
+
+Wed Apr 22 12:28:03 1998 Michael Meissner <meissner@cygnus.com>
+
+ * configure.in (target_cflags): If --enable-target-optspace, use
+ -Os to compile newlib rather than -O2. Default to using -Os for
+ d10v, d30v and m32r if --{enable,disable}-target-optspace is not
+ used.
+
+Tue Apr 21 23:13:34 1998 Geoffrey Noer <noer@cygnus.com>
+
+ * libc/include/machine/setjmp.h: change sigsetjmp and
+ siglongjmp definitions to use an array instead of a struct
+ for __CYGWIN32__
+
+Tue Apr 14 11:47:47 1998 Doug Evans <devans@canuck.cygnus.com>
+
+ * libc/reent/impure.c (__ATTRIBUTE_IMPURE_DATA__): Fix spelling.
+
+Mon Apr 6 15:05:08 1998 Jonathan Larmour <jlarmour@cygnus.co.uk>
+
+ * libc/string/strxfrm.c: fix to get correct return value
+
+Wed Apr 1 16:09:05 1998 Nick Clifton <nickc@cygnus.com>
+
+ * libc/sys/arm/crt0.S: Set top of RAM to be 0x800000 for PE
+ builds. Make mode change labels global so that they will be seen
+ by the debugger.
+
+Wed Mar 18 09:45:10 1998 Nick Clifton <nickc@cygnus.com>
+
+ * configure.in (links): Do not use ARM debiugging protocols for PE
+ builds.
+
+ * libc/sys/arm/syscalls.c (_sbrk): Add "_sbrk: " to error
+ message.
+
+Fri Mar 13 11:24:34 1998 Jeff Johnston <jjohnstn@cygnus.com>
+
+ * libc/stdio/findfp.c (__sinit): Made stdout default to
+ line buffered mode as defined by ANSI.
+
+Tue Mar 10 11:41:26 1997 Bob Manson <manson@charmed.cygnus.com>
+
+ * libc/include/sys/itimer.h: New file.
+
+ * libc/signal/signal.c (__sigtramp_r,__sigtramp): New functions.
+
+Mon Mar 9 14:19:26 1998 J"orn Rennecke <amylaar@cygnus.co.uk>
+
+ * libc/machine/sh/memcpy.S: (_memcpy): Fix for execute/memcpy-1.c
+ failure.
+
+Fri Feb 27 13:56:10 1998 Michael Meissner <meissner@cygnus.com>
+
+ * libc/machine/d30v/setjmp.S (longjmp): Fix order of parallel
+ insns.
+
+Wed Feb 25 09:29:54 1998 Nick Clifton <nickc@cygnus.com>
+
+ * libc/sys/arm/syscalls.c (_open): Add varags to conform to prototype.
+
+Tue Feb 24 18:00:13 1998 Michael Meissner <meissner@cygnus.com>
+
+ * libc/machine/d30v/{setjmp.S,Makefile.in}: New files for D30V
+ support.
+
+ * libc/include/machine/setjmp.h: Add D30V support.
+
+ * configure.in (d30v-*): Add d30v machine directory.
+
+Mon Feb 23 09:32:58 1998 Mark Alexander <marka@cygnus.com>
+
+ * configure.in: Don't use libc/sys/sysmec for MN10300; it's
+ been replaced with libgloss/mn10300.
+
+Sat Feb 21 17:44:43 1998 Geoffrey Noer <noer@cygnus.com>
+
+ * libc/stdlib/mallocr.c: remove __malloc_copy routine now that
+ it is no longer needed.
+
+Thu Feb 19 16:15:10 1998 Geoffrey Noer <noer@cygnus.com>
+
+ * libc/include/sys/signal.h: add sigpause proto for Cygwin32
+
+Wed Feb 18 23:51:08 1998 Geoffrey Noer <noer@cygnus.com>
+
+ * libc/stdio/fdopen.c (fdopen): Make all writes go to the end of
+ the file when O_APPEND is set, wherever the EOF happens to be at
+ that time.
+
+Wed Feb 18 23:25:02 1998 Geoffrey Noer <noer@cygnus.com>
+
+ patch from cgf@bbc.com (Christopher Faylor):
+ * libc/stdio/freopen.c (freopen): Conform to standard UNIX
+ convention of closing fp prior to attempting to open the file
+ argument. This allows correct operation when reopening
+ stdin/stdout/stderr. Replaces last freopen.c patch.
+
+Wed Feb 18 16:27:40 1998 Geoffrey Noer <noer@cygnus.com>
+
+ patch from cgf@bbc.com (Christopher Faylor):
+ * libc/stdio/freopen.c: freopen was not preserving the fd
+ of the stream being operated on. This confuses programs that
+ expect that the handles for stdout and stderr will be 1 and 2.
+
+Mon Feb 16 23:34:07 1998 Andrew Cagney <cagney@b1.cygnus.com>
+
+ * libc/sys/d10v/crt0.S (_start): Set PSW{SW} - select SPU.
+
+Thu Feb 12 15:09:20 1998 Ranjith Kumaran <ranjith@cygnus.com>
+
+ * libc/sys/go32/longjmp.S: Fix longjmp to not return 0.
+
+Wed Feb 11 17:50:45 1998 Jeff Johnston <jjohnstn@cygnus.com>
+
+ * libc/machine/powerpc/setjmp.S (setjmp, longjmp): Alignment code
+ altered to not use a branch. Also added hint that last
+ bclr in longjmp will likely result in branch.
+
+
+Mon Feb 9 03:44:02 1998 Geoffrey Noer <noer@cygnus.com>
+
+ * libc/sys/cygwin32/crt0.c: add missing args to main() extern
+
+Fri Feb 6 16:32:32 1998 Nick Clifton <nickc@cygnus.com>
+
+ * libc/sys/sysnecv850/crt0.S (_start): Initialise _ctbp even for
+ v850 builds.
+
+ * configure.in: Add -msmall-sld to target_cflags for v850 builds.
+
+Wed Feb 4 16:56:20 1998 Jeff Johnston <jjohnstn@cygnus.com>
+
+ * libc/machine/powerpc/setjmp.S (longjmp): Fixed code
+ that loads FR14 to specify offset of 8 rather than 4
+ so it loads from offset 96 (where setjmp stored it).
+
+Tue Feb 3 18:08:34 1998 Jeff Johnston <jjohnstn@cygnus.com>
+
+ * libc/machine/sh/memcpy.S: (_memcpy): Update to
+ latest version supplied by customer.
+ * libc/machine/sh/memset.S (_memset): Ditto.
+
+Mon Feb 2 16:20:39 1998 Nick Clifton <nickc@cygnus.com>
+
+ * libc/sys/sysnecv850/Makefile.in (OFILES): Add link.o (for
+ PR14730).
+
+Mon Feb 2 15:13:26 1998 Geoffrey Noer <noer@cygnus.com>
+
+ * libc/include/string.h: remove redefinition of ffs
+
+Wed Jan 28 13:30:14 1998 Geoffrey Noer <noer@cygnus.com>
+
+ * libc/include/sys/signal.h: include _ansi.h so _EXFUN is
+ defined
+
+Wed Jan 28 10:38:34 1998 Jeff Johnston <jjohnstn@cygnus.com>
+
+ * libc/machine/tic80/setjmp.S: Adding _setjmp to allow
+ TI Libraries to link to libc.a
+
+Sat Jan 24 10:15:56 1998 Michael Meissner <meissner@cygnus.com>
+
+ * libc/include/sys/fcntl.h (_open,_fcntl): Add prototypes.
+ * libc/include/sys/stat.h (_{,f}stat): Ditto.
+ * libc/include/sys/wait.h (_wait): Ditto.
+ * libc/include/sys/unistd.h (_close,_fork,_getpid): Ditto.
+ (_link,_lseek,_read,_sbrk,_unlink,_write): Ditto.
+
+Fri Jan 23 11:32:10 1998 Michael Meissner <meissner@cygnus.com>
+
+ * libc/machine/d10v/setjmp.S: Change to new ABI. Add simple
+ minded stabs so function name shows up when running the simulator
+ with -t.
+ * libc/sys/d10v/{crt0,trap}.S: Ditto.
+
+Thu Jan 22 15:57:14 1998 Fred Fish <fnf@cygnus.com>
+
+ * libc/sys/d10v/trap.S: Change syscalls to use trap 15.
+ * libc/sys/d10v/crt0.S: Use R6 where we used to use R2.
+ Use R5 where we used to use R3.
+
+Wed Jan 21 14:22:23 1998 Bill Moyer <billm@cygnus.com>
+
+ * libc/stdlib/getopt.c (getopt): replaced __progname
+ with nargv[0] to improve portability to imbedded systems.
+
+Thu Jan 15 12:32:38 1998 Nick Clifton <nickc@cygnus.com>
+
+ * libc/sys/arm/syscalls.c (initialise_angel_handles): Applied
+ patch supplied by Tont.Thompson@arm.com to fix the creation of the
+ stdout file.
+
+Wed Jan 14 13:00:19 1998 Ian Lance Taylor <ian@cygnus.com>
+
+ * libc/stdio/tmpnam.c (worker): Generate a different file name
+ each time.
+
+ * libc/posix/popen.c (popen): If __CYGWIN32__, and execing /bin/sh
+ fails, try an execlp for sh.
+
+ * host/any (INCLUDES): If target_os is cygwin32, then add a -I
+ option for the winsup include directory.
+
+Wed Jan 7 17:02:58 1998 Nick Clifton <nickc@cygnus.com>
+
+ * libc/sys/arm/syscalls.c: Applied patches for Angel based remote
+ debugging interface from Tony.Thompson@arm.com.
+
+ * libc/sys/arm/crt0.S (_mainCRTStartup): ditto.
+ * libc/sys/arm/swi.h: ditto.
+
+Tue Jan 6 14:15:10 1998 Geoffrey Noer <noer@cygnus.com>
+
+ * libc/sys/cygwin32/sys/dirent.h: add __d_dirhash field to
+ DIR struct used for readdir hashes.
+
+Thu Jan 1 11:22:22 1998 Jeffrey A Law (law@cygnus.com)
+
+ * libc/string/strchr.c: Use "unsigned chars" as necessary.
+
+Wed Dec 31 04:25:30 1997 Jeffrey A Law (law@cygnus.com)
+
+ * libc/stdlib/mallocr.c (idx2binblock): Don't lose on 16bit
+ integer targets.
+
+Sat Dec 13 15:11:06 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ * libc/stdlib/mallocr.c (__malloc_copy): New function, compiled if
+ INTERNAL_NEWLIB and __CYGWIN32__ and DEFINE_MALLOC.
+ * libc/include/malloc.h: Add extern "C" if __cplusplus.
+ (__malloc_copy): Declare.
+
+Wed Dec 10 12:15:54 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ * libc/stdlib/mallocr.c: If INTERNAL_NEWLIB, include
+ <sys/config.h>.
+ (POINTER_UINT): Define.
+ (DEFAULT_TRIM_THRESHOLD): Mark constants as long.
+ (MALLOC_ALIGNMENT): Don't define if already defined.
+ (malloc_extend_top): Cast pointers to POINTER_UINT, not unsigned
+ long.
+
+Tue Dec 9 19:23:42 1997 Michael Meissner <meissner@cygnus.com>
+
+ * libc/string/memset.c (memset): Fiddle with code so that the long
+ value being stored is not a stack value. Unroll storing longs 4
+ times.
+
+Tue Dec 9 14:13:18 1997 Jeff Johnston <jjohnstn@cygnus.com>
+
+ * Reduce code size for libm modules.
+ * libm/math/w_sqrt.c (sqrt): Remove call to kernel_standard
+ and simply move code into sqrt.
+ * libm/math/wrf_lgamma.c (lgammaf_r): Likewise.
+ * libm/math/wr_lgamma.c (lgamma_r): Likewise.
+ * libm/math/wrf_gamma.c (gammaf_r): Likewise.
+ * libm/math/wr_gamma.c (gamma_r): Likewise.
+ * libm/math/wf_sinh.c (sinfh): Likewise.
+ * libm/math/w_sinh.c (sinh): Likewise.
+ * libm/math/wf_scalb.c (scalbf): Likewise.
+ * libm/math/w_scalb.c (scalb): Likewise.
+ * libm/math/wf_remainder.c (remainderf): Likewise.
+ * libm/math/w_remainder.c (remainder): Likewise.
+ * libm/math/wf_pow.c (powf): Likewise.
+ * libm/math/w_pow.c (pow): Likewise.
+ * libm/math/wf_log10.c (log10f): Likewise.
+ * libm/math/w_log10.c (log10): Likewise.
+ * libm/math/wf_log.c (logf): Likewise.
+ * libm/math/w_log.c (log): Likewise.
+ * libm/math/w_lgamma.c (lgamma): Likewise.
+ * libm/math/wf_lgamma.c (lgammaf): Likewise.
+ * libm/math/wf_jn.c (jnf): Likewise.
+ * libm/math/w_jn.c (jn): Likewise.
+ * libm/math/wf_j1.c (j1f): Likewise.
+ * libm/math/w_j1.c (j1): Likewise.
+ * libm/math/wf_j0.c (j0f): Likewise.
+ * libm/math/w_j0.c (j0): Likewise.
+ * libm/math/wf_hypot.c (hypotf): Likewise.
+ * libm/math/w_hypot.c (hypot): Likewise.
+ * libm/math/wf_gamma.c (gammaf): Likewise.
+ * libm/math/w_gamma.c (gamma): Likewise.
+ * libm/math/wf_fmod.c (fmodf): Likewise.
+ * libm/math/w_fmod.c (fmod): Likewise.
+ * libm/math/wf_exp.c (expf): Likewise.
+ * libm/math/w_exp.c (exp): Likewise.
+ * libm/math/wf_cosh.c (coshf): Likewise.
+ * libm/math/w_cosh.c (cosh): Likewise.
+ * libm/math/wf_atanh.c (atanhf): Likewise.
+ * libm/math/w_atanh.c (atanh): Likewise.
+ * libm/math/wf_atan2.c (atan2f): Likewise.
+ * libm/math/w_atan2.c (atan2): Likewise.
+ * libm/math/wf_asin.c (asinf): Likewise.
+ * libm/math/w_asin.c (asin): Likewise.
+ * libm/math/wf_acosh.c (acoshf): Likewise.
+ * libm/math/w_acosh.c (acosh): Likewise.
+ * libm/math/wf_acos.c (asocf): Likewise.
+ * libm/math/w_acos.c (acos): Likewise.
+ * libm/math/wf_sqrt.c (sqrtf): Likewise.
+ * libm/math/k_standard.c (_k_standard): Don't require SVID behavior
+ for embedded systems.
+
+Mon Dec 8 12:12:58 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ * libc/stdlib/mallocr.c (malloc_extend_top): Add patch from Doug
+ Lea in case of a foreign sbrk.
+
+Fri Dec 5 23:27:28 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ Incorporate Doug Lea's malloc:
+ * libc/stdlib/mallocr.c: Completely replaced.
+ * libc/stdlib/malloc.c: Document malloc_usable_size and memalign.
+ (realloc): Remove.
+ * libc/stdlib/calloc.c (calloc): Just call _calloc_r.
+ * libc/stdlib/mstats.c: Document mallinfo, malloc_stats, and
+ mallopt.
+ (mallinfo, malloc_stats, mallopt): New functions.
+ (_mstats_r): Just call _malloc_stats_r.
+ * libc/stdlib/malign.c: New file.
+ * libc/stdlib/mlock.c: New file.
+ * libc/stdlib/msize.c: New file.
+ * libc/stdlib/mtrim.c: New file.
+ * libc/stdlib/realloc.c: New file.
+ * libc/stdlib/valloc.c: New file.
+ * libc/stdlib/malloc.h: Remove.
+ * libc/stdlib/callocr.c: Remove.
+ * libc/stdlib/Makefile.in (OFILES): Add cfreer.o, freer.o,
+ malign.o, malignr.o, mallinfor.o, malloptr.o, mallstatsr.o,
+ mlock.o, msize.o, msizer.o, mtrim.o, pvallocr.o, realloc.o,
+ reallocr.o, valloc.o, vallocr.o.
+ (CHEWOUT_FILES): Add mlock.def, mstats.def.
+ (MALLOC_CFLAGS): New variable.
+ (mallocr.o): New target, build from mallocr.c.
+ (freer.o, reallocr.o, callocr.o, cfreer.o, malignr.o): Likewise.
+ (vallocr.o, pvallocr.o, mallinfor.o, mallstatsr.o): Likewise.
+ (msizer.o, malloptr.o): Likewise.
+ (malign.o, mlock.o, msize.o, mtrim.o, realloc.o): New targets.
+ (valloc.o): New target.
+ * libc/stdlib/stdlib.tex: Include mlock.def and mstats.def.
+ * libc/include/malloc.h: Declare struct mallinfo, and new
+ routines.
+ * libc/include/stdlib.h (cfree): Correct declaration.
+
+Tue Dec 2 10:12:16 1997 Nick Clifton <nickc@cygnus.com>
+
+ * libc/include/machine/setjmp.h: Add support for Thumb target.
+
+ * libc/include/machine/ieeefp.h: Add support for Thumb target.
+
+ * configure.in (links): Add support for Thumb target.
+
+Wed Nov 26 09:56:17 1997 Nick Clifton <nickc@cygnus.com>
+
+ * libc/sys/arm/setjmp.S: Updated with version from branch.
+
+Thu Nov 20 01:21:43 1997 Geoffrey Noer <noer@cygnus.com>
+
+ * libc/include/stdio.h: add POSIX-required define L_ctermid
+ for ctermid
+
+Wed Nov 19 16:11:40 1997 Michael Meissner <meissner@cygnus.com>
+
+ * configure.in (d30v-*-*): Define ABORT_MESSAGE, SMALL_MEMORY, in
+ addition to MISSING_SYSCALL_NAMES.
+
+Mon Nov 17 20:05:05 1997 J"orn Rennecke <amylaar@cygnus.co.uk>
+
+ * libc/include/sys/config.h: (UINT_MAX, for D10V): Make unsigned.
+
+Mon Nov 10 22:26:55 1997 Geoffrey Noer <noer@cygnus.com>
+
+ * libc/include/string.h: change strsignal proto to return
+ a char *. This eliminates compile problems in gdb resulting
+ from gdb's definition of strsignal in defs.h.
+
+Mon Nov 10 17:11:08 1997 Geoffrey Noer <noer@cygnus.com>
+
+ * libc/sys/cygwin32/sys/utime.h: new (moved here from
+ winsup/include) so as not to conflict with the one in
+ libc/include.
+ * libc/include/string.h: add protos for strsignal, strtosigno
+
+Mon Nov 10 13:49:54 1997 Michael Meissner <meissner@cygnus.com>
+
+ * libc/include/sys/config.h: Define __IEEE_BIG_ENDIAN if d30v.
+
+ * configure.in (d30v-*-*): Add configuration.
+
+Thu Oct 30 14:01:23 1997 Nick Clifton <nickc@cygnus.com>
+
+ * configure.in (links): Add -DARM_RD[P|I]_MONITOR to target_cflags
+ to select which kind of debug monitor is in use for an ARM target.
+
+ * libc/sys/arm/crt0.S: New version: Supports Thumb startups and
+ Angel and Demon debug monitors. Part of this code was supplied by
+ Tony Thompson at ARM: athompso@arm.com.
+
+Fri Oct 24 18:57:05 1997 Jeffrey A Law (law@cygnus.com)
+
+ * strncat.c (strncat): Don't call strncpy; strncay has the wrong
+ semantics when the count is greater than the length of the second
+ source string.
+
+Thu Oct 23 01:37:41 1997 Geoffrey Noer <noer@cygnus.com>
+
+ * libc/include/sys/signal.h: reorder CYGWIN32 signal numbers
+ * libc/include/sys/unistd.h: add protos for usleep, truncate,
+ truncate and ftruncate take off_t, not size_t
+
+Tue Oct 21 18:42:00 1997 Jim Wilson <wilson@cygnus.com>
+
+ * libc/string/strcat.c (strcat): Add missing comment end.
+ * libc/string/strncat.c (strncat): Likewise.
+
+Tue Oct 21 17:23:34 1997 Nick Clifton <nickc@cygnus.com>
+
+ * configure.in (links): Define PREFER_SIZE_OVER_SPEED for v850
+ targets.
+ * libc/string/{memchr.c, memcmp.c, memcpy.c}: Add space
+ optimised version which is selected if PREFER_SIZE_OVER_SPEED is
+ defined.
+ * libc/string/{memset.c, strcat.c, strchr.c}: Likewise.
+ * libc/string/{strcmp.c, strcpy.c, strlen.c}: Likewise.
+ * libc/string/{strncat.c, strncmp.c, strncpy.c}: Likewise.
+
+Mon Oct 13 15:12:35 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ * libc/include/sys/param.h (BIG_ENDIAN): Define if __i386__.
+ (LITTLE_ENDIAN, BYTE_ORDER): Likewise.
+
+Thu Oct 9 13:54:44 1997 Doug Evans <dje@canuck.cygnus.com>
+
+ * libc/machine/i386/setjmp.S: New file.
+ * libc/machine/i386/Makefile.in: Delete COPYOFILES.
+ (OFILES): Add setjmp.o.
+ (setjmp.o): Add rule for.
+ * configure.in: Don't set machine_dir for *-*-{go32,sco*,cygwin32}.
+
+Tue Oct 7 14:01:29 1997 Bill Moyer (billm@cygnus.com)
+ Jeffrey A Law (law@cygnus.com)
+
+ * libc/string/{memchr.c, memcmp.c, memcpy.c}: Reimplement to run faster.
+ * libc/string/{memset.c, strcat.c, strchr.c}: Likewise.
+ * libc/string/{strcmp.c, strcpy.c, strlen.c}: Likewise.
+ * libc/string/{strncat.c, strncmp.c, strncpy.c}: Likewise.
+
+Mon Oct 6 14:07:59 1997 Nick Clifton <nickc@cygnus.com>
+
+ * libc/sys/sysnecv850/Makefile.in (crt0.o trap.o): Explicit
+ rules.
+
+ * libc/include/sys/config.h: Use __v850 to select v850
+ endianness.
+
+ * libc/include/machine/setjmp.h: Use __v850 to select v850 jump
+ buffer size.
+
+ * libc/include/machine/ieeefp.h: Use __v850 to select v850
+ endianness.
+
+Thu Sep 25 14:11:37 1997 Geoffrey Noer <noer@cygnus.com>
+
+ * libc/stdlib/setenv.c: change unsetenv definition to match
+ style of setenv (with _DEFUN). The string should be a const.
+ * libc/include/stdlib.h: unsetenv proto should return void.
+
+Tue Sep 23 18:17:20 1997 Geoffrey Noer <noer@cygnus.com>
+
+ * libc/include/stdlib.h: define unsetenv proto for __CYGWIN32__
+
+Thu Sep 18 12:50:15 1997 Angela Marie Thomas (angela@cygnus.com)
+
+ * libc/stdio/glue.h: remove.
+ * libc/stdio/findfp.c, libc/stdio/fwalk.c: remove #include "glue.h"
+ * libc/stdio/Makefile.in: remove glue.h dependencies
+
+Wed Sep 17 17:42:27 1997 Nick Clifton <nickc@cygnus.com>
+
+ * libc/sys/sysnecv850/crt0.S: Created V850e version.
+
+Tue Sep 9 10:40:57 1997 Doug Evans <dje@canuck.cygnus.com>
+
+ * configure.in (target_cpu): Add `arc'.
+
+Tue Sep 9 10:40:42 1997 Joel Sherrill <joel@OARcorp.com>
+
+ * newlib/configure.in (*-*-rtems*): Add -DSIGNAL_PROVIDED and
+ -DREENTRANT_SYSCALLS_PROVIDED to the target_cflags.
+ * newlib/libc/include/sys/errno.h: Add ENOTSUP.
+ * newlib/libc/reent/reent.c: Add _wrapup_reent.
+ * newlib/libc/sys/rtems/sys/types.h: Avoid redefinitions for go32.
+
+Sun Sep 7 16:41:41 1997 Gavin Koch <gavin@cygnus.com>
+
+ * libc/machine/mips/setjmp.S: Handle mips16 builds.
+
+Thu Aug 21 20:05:38 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ * libc/include/stdio.h (siprintf): Declare.
+
+Mon Aug 18 11:19:13 1997 Nick Clifton <nickc@cygnus.com>
+
+ * libc/sys/sysnecv850/Makefile.in (.c.o): Add rule that includes
+ TARGET_CFLAGS and NEWLIB_FLAGS.
+
+Mon Aug 18 11:15:43 1997 Nick Clifton <nickc@cygnus.com>
+
+ * configure.in (links): Add support for v850ea target.
+
+Mon Aug 18 11:15:43 1997 Nick Clifton <nickc@cygnus.com>
+
+ * configure.in (links): Add support for v850e target.
+
+Wed Aug 13 19:16:54 1997 Nick Clifton <nickc@cygnus.com>
+
+ * libc/sys/sysnecv850/crt0.S: Remove initial setting of r0 to 0.
+
+Mon Aug 11 15:49:54 1997 Doug Evans <dje@canuck.cygnus.com>
+
+ * configure.in (arc-*-*): Add support for.
+ * libc/include/machine/ieeefp.h (__arc__): Add support for the ARC.
+
+Fri Jul 25 17:37:41 1997 J"orn Rennecke <amylaar@cygnus.co.uk>
+
+ * libc/sys/sh/crt0.S (start): Add fpscr initialization for SH4.
+
+Thu Jul 24 18:32:17 1997 Geoffrey Noer <noer@cygnus.com>
+
+ * libc/stdlib/bsearch.c (bsearch): remove last unneeded
+ comparison which accesses invalid memory when the key is
+ larger than the last member of the array.
+ * libc/include/machine/setjmp.h: add sigsetjmp, siglongjmp
+ for CYGWIN32
+ * libc/include/sys/unistd.h: add _POSIX defines for CYGWIN32
+
+Tue Jul 22 16:03:06 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ * libc/include/stdlib.h (realpath): Declare if __CYGWIN32__ and
+ not _STRICT_ANSI.
+
+Thu Jul 10 15:11:52 1997 Doug Evans <dje@canuck.cygnus.com>
+
+ * libm/math/k_standard.c (__kernel_standard): Call fflush(stdout)
+ ifndef _USE_WRITE, instead of ifdef _USE_WRITE.
+
+Thu Jul 10 16:00:09 1997 Mike Meissner <meissner@cygnus.com>
+
+ * libc/machine/tic80/setjmp.S (setjmp,longjmp): Use ld.d and st.d
+ to load/store memory.
+
+Mon Jul 7 17:38:17 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ * libc/include/sys/fcntl.h: Define _O_* symbols with leading
+ underscores if _WIN32.
+
+Wed Jul 2 10:07:20 1997 Doug Evans <dje@canuck.cygnus.com>
+
+ * libm/math/k_standard.c (__kernel_standard): Delete reentrancy
+ support ifdef _USE_WRITE missed in last change.
+ From Anders Blomdell <anders.blomdell@control.lth.se>.
+
+Wed Jun 25 10:18:49 1997 Doug Evans <dje@canuck.cygnus.com>
+
+ * libc/stdio/tmpnam.c (worker): Handle _open_r being stubbed out.
+ (_tmpnam_r, _tempnam_r): Update.
+
+Wed Jun 25 00:16:55 1997 Mark Alexander <marka@cygnus.com>
+
+ * libc/machine/sparc/setjmp.S: New file.
+ * libc/machine/sparc/Makefile.in: Add setjmp.
+ * libc/include/machine/setjmp.h: Increase jmpbuf size for sparc.
+
+Tue Jun 24 23:27:38 1997 Mark Alexander <marka@cygnus.com>
+
+ * libc/include/machine/setjmp.h: Use __TIC80__ instead of __tic80__.
+
+Tue Jun 24 14:53:40 1997 Doug Evans <dje@canuck.cygnus.com>
+
+ From Joel Sherrill <joel@oarcorp.com>.
+ * libc/stdlib/getenv.c (_findenv): Avoid dereferencing null `environ'.
+
+ Add rtems support. From Joel Sherrill <joel@oarcorp.com>.
+ * configure.in: Recognize *-*-rtems*.
+ * libc/sys/rtems/{Makefile.in,crt0.c,dummysys.c}: New files.
+ * libc/sys/rtems/sys/{features.h,sched.h,siginfo.h,signal.h,
+ time.h,times.h,types.h}: New files.
+ * libc/sys/rtems/include/{limits.h,signal.h,time.h}. New files.
+
+Fri Jun 20 11:13:16 1997 Geoffrey Noer <noer@cygnus.com>
+
+ patch from sos@prospect.com.ru (Sergey Okhapkin):
+ * include/sys/wait.h: correct operator precidence bug
+ in WIFSIGNALED
+
+Wed Jun 18 22:08:27 1997 Geoffrey Noer <noer@cygnus.com>
+
+ * libc/include/stdlib.h: remove unsetenv proto since it conflicts
+ with newlib's unsetenv function
+ * libc/sys/cygwin32/sys: new directory for includes
+ * libc/sys/cygwin32/sys/dirent.h: move cygwin32's dirent.h
+ here from winsup/include/sys
+
+Mon Jun 16 21:02:22 1997 Geoffrey Noer <noer@cygnus.com>
+
+ * libc/include/sys/unistd.h: _exit should only be
+ labelled noreturn when not __CYGWIN32__
+ * libc/include/stdlib.h: for __CYGWIN32__, add proto for unsetenv
+ * libc/include/sys/signal.h: add SIGIO to _WIN32 list and
+ increment NSIG
+
+Thu Jun 12 18:52:41 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ * libc/include/sys/time.h: Only define timeval and timezone if
+ _GNU_H_WINDOWS32_SOCKETS is not defined.
+ * libc/include/sys/stat.h: If _WIN32, define _S_IFMT, etc.
+
+Wed Jun 11 09:46:26 1997 Jeffrey A Law (law@cygnus.com)
+
+ * libc/machine/mn10200/setjmp.S: Implement setjmp/longjmp
+ * libc/machine/mn10300/setjmp.S: Likewise.
+
+ * libc/sys/sysmec/crt0.S: Use "call" instead of "calls" for
+ the mn10300 (more relaxing opportunities).
+
+Tue Jun 10 17:24:45 1997 Mike Meissner <meissner@cygnus.com>
+
+ * configure.in (powerpc*-*-{eabi,elf,linux,rtems,sysv,solaris}):
+ Build libraries with -mstrict-align.
+
+Fri Jun 6 14:07:59 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ * libc/string/strlwr.c: New file.
+ * libc/string/strupr.c: New file.
+ * libc/include/string.h: Declare strlwr and strupr.
+ * libc/string/Makefile.in (OFILES): Add strlwr.o and strupr.o.
+ (CHEWOUT_FILES): Add strlwr.def and strupr.def.
+ (strlwr.o, strupr.o): New targets.
+ * libc/string/strings.tex: Include strlwr and strupr docs.
+
+ * libc/include/sys/types.h: Don't define u_char, et. al., if
+ _GNU_H_WINDOWS32_SOCKETS is defined. Likewise for fd_set,
+ et. al. Make FD_SETSIZE default 64 rather than 60. Define
+ _types_fd_set rather than fd_set, and define fd_set as a macro.
+
+ * libc/include/malloc.h: New file.
+
+ * libc/include/string.h: Define strcmpi, stricmp, strncmpi, and
+ strnicmp if they are not already defined.
+
+ * libc/include/time.h: If __CYGWIN32__, declare tzset and define
+ _timezone, _daylight, and _tzname.
+
+Wed Jun 4 12:51:16 1997 Doug Evans <dje@canuck.cygnus.com>
+
+ * configure.in: Sort all configuration tables.
+
+ From Joel Sherrill <joel@oarcorp.com>
+ * Makefile.in (stmp-targ-include): Copy $(sys_dir)/include/*.h.
+
+Tue Jun 3 14:47:46 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ * libc/include/sys/signal.h: Don't include <sys/types.h>. Just
+ use int when declaring kill.
+
+ * libc/include/sys/timeb.h: New file.
+
+Mon Jun 2 12:06:58 1997 Geoffrey Noer <noer@cirdan.cygnus.com>
+
+ * libc/include/sys/time.h: add itimer support for Cygwin32
+
+Mon May 19 11:56:46 1997 Mike Meissner <meissner@cygnus.com>
+
+ * libc/stdlib/abort.c (abort): If ABORT_MESSAGE is defined, write
+ out a message that abort was called to stderr.
+
+Fri May 16 15:02:59 1997 Bob Manson <manson@charmed.cygnus.com>
+
+ * libc/sys/sysmec/fstat.c (_fstat): Set st_blksize to 4096
+ so that libio doesn't freak.
+
+ * libc/sys/sysmec/sbrk.c (_sbrk): The argument is a size_t, not
+ int.
+
+ * libc/stdlib/mallocr.c (_morecore_r): Use size_t for
+ memory sizes, not int.
+
+Wed May 14 21:16:58 1997 Bob Manson <manson@charmed.cygnus.com>
+
+ * libm/math/ef_hypot.c: Use long constants where
+ appropriate.
+ * libm/math/ef_sqrt.c: Ditto.
+
+ * libc/sys/sysmec/times.c(_times): Change to times.
+
+ * libc/sys/sysmec/read.c(_read): The third argument is
+ size_t.
+ * libc/sys/sysmec/write.c (_write): Ditto.
+
+ * libc/sys/sysmec/lseek.c: Include unistd.h for off_t.
+ (_lseek): It's off_t for the second argument.
+
+Wed May 14 15:23:36 1997 Mike Meissner <meissner@cygnus.com>
+
+ * libc/include/sys/config.h (__IEEE_LITTLE_ENDIAN): Define here,
+ as well as machine/ieeefp.h.
+
+Thu May 8 15:47:25 1997 Geoffrey Noer <noer@cygnus.com>
+
+ * libc/include/sys/signal.h: add signal protos for winsup
+ functions (when __CYGWIN32__), include types.h
+ * libc/include/sys/types.h: Change __go32_types__ internal
+ define to __MS_types__ since it's used for more than just
+ GO32 configs. Define this if GO32, __MSDOS__, or _WIN32 are
+ defined.
+ * libc/include/sys/unistd.h: add ftruncate proto for
+ winsup functions (when __CYGWIN32__)
+
+Fri Apr 25 10:10:16 1997 Doug Evans <dje@canuck.cygnus.com>
+
+ * libc/sys/h8300hms/sbrk.c (stack_ptr): Add definition.
+
+Thu Apr 24 15:46:51 1997 Mike Stump <mrs@cygnus.com>
+
+ * libc/include/machine/setjmp.h: Add tic80 support.
+ * libc/machine/tic80/setjmp.S: Likewise.
+
+Tue Apr 22 16:54:40 1997 Geoffrey Noer <noer@pizza.cygnus.com>
+
+ * libc/sys/cygwin32/crt0.c: Add reference to main() so we can
+ link programs from libraries only (such as in the X11
+ distribution)
+
+Mon Apr 21 15:02:12 1997 Fred Fish <fnf@cygnus.com>
+
+ * libc/sys/arm/syscalls.c (signal): Remove stub, signal()
+ supplied elsewhere in newlib.
+
+Mon Apr 14 16:25:55 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ * Makefile.in (INSTALL): Change install.sh to install-sh.
+
+Fri Apr 11 17:04:02 1997 Jason Molenda (crash@godzilla.cygnus.co.jp)
+
+ * README: update WWW address for on-line documentation.
+
+Wed Apr 9 00:38:13 1997 Geoffrey Noer <noer@cygnus.com>
+
+ * libc/include/sys/signal.h: for _WIN32, define SIGCONT and
+ increment NSIG
+
+Mon Apr 7 23:54:00 1997 Jeffrey A Law (law@cygnus.com)
+
+ * libc/sys/sysmec/crt0.S: Update for new calling conventions on the
+ mn10300.
+ * libc/sys/sysmec/trap.S: Don't compare a register to itself.
+
+Tue Mar 25 08:47:43 1997 Jeffrey A Law (law@cygnus.com)
+
+ * libc/sys/arm/syscalls.c: Fix/add stack/heap collision detection.
+ * libc/sys/d10v/syscalls.c: Likewise.
+ * libc/sys/h8300hms/sbrk.c: Likewise.
+ * libc/sys/h8500hms/syscalls.c: Likewise.
+ * libc/sys/m88kbug/syscalls.c: Likewise.
+ * libc/sys/sh/syscalls.c: Likewise.
+ * libc/sys/sysmec/sbrk.c: Likewise.
+ * libc/sys/sysnecv850/sbrk.c: Likewise.
+ * libc/sys/w65/syscalls.c: Likewise.
+ * libc/sys.tex: Update sbrk sample code to include stack/heap collision.
+
+Tue Mar 18 14:14:34 1997 Jeffrey A Law (law@cygnus.com)
+
+ * libc/sys/sysmec/trap.S: Use "syscall" to trigger an
+ emulated syscall instead of "trap".
+
+Fri Mar 14 11:26:13 1997 Michael Meissner <meissner@cygnus.com>
+
+ * libc/sys/d10v/trap.S (__trap0): Use trap 15 for system calls,
+ not trap 0.
+
+Sun Mar 9 23:27:04 1997 Doug Evans <dje@seba.cygnus.com>
+
+ * configure.in (m32r-*-*): Add -msdata=sdata to target_cflags.
+
+Sat Mar 8 09:05:01 1997 Fred Fish <fnf@cygnus.com>
+
+ * libc/machine/arm/Makefile.in: Fix comment, is for "arm"
+ not "sh".
+ * libc/machine/m32r/Makefile.in: Fix comment, is for "m32r"
+ not "d10v".
+ * libc/sys/tic80/crt0.c: New file for TIc80.
+ * libc/sys/tic80/Makefile.in: New file for TIc80.
+ * libc/machine/tic80/Makefile.in: New file for TIc80.
+
+Wed Mar 5 11:32:12 1997 J.T. Conklin <jtc@cygnus.com>
+
+ * libc/machine/sh/memcpy.S: New file.
+ * libc/machine/sh/memset.S: New file.
+ * libc/machine/sh/Makefile.in (OFILES): Add memcpy.o and memset.o
+
+Thu Feb 27 16:27:55 1997 Fred Fish <fnf@cygnus.com>
+
+ * libc/include/machine/ieeefp.h (_IEEE_LITTLE_ENDIAN): Define
+ for TIc80.
+
+Wed Feb 26 13:43:39 1997 Jeffrey A Law (law@cygnus.com)
+
+ * libc/sys/sysmec/crt0.S: Handle new calling conventions for
+ the mn10200.
+
+Wed Feb 26 07:11:03 1997 Michael Meissner <meissner@cygnus.com>
+
+ * libc/machine/powerpc/setjmp.S (longjmp): Correct return status
+ (patch from andrew@pogo.WV.TEK.COM).
+
+Fri Feb 14 11:49:28 1997 Doug Evans <dje@canuck.cygnus.com>
+
+ * libc/machine/m32r/setjmp.S (setjmp): Save r12.
+ (longjmp): Restore r12. Fix code that handles returning 1 if passed 0.
+
+Mon Feb 10 10:02:34 1997 Fred Fish <fnf@cygnus.com>
+
+ * configure.in: Add cases for "tic80" to set machine_dir,
+ sys_dir, and syscall_dir.
+
+Sun Feb 2 17:57:15 1997 Geoffrey Noer <noer@cygnus.com>
+
+ * libc/sys/cygwin32/crt0.c: initialize floating pt registers
+
+Wed Jan 29 15:57:38 1997 Geoffrey Noer <noer@cygnus.com>
+
+ * libc/include/math.h: avoid conflicts with ANSI C++ <exception>
+
+Mon Jan 27 12:50:01 1997 Doug Evans <dje@seba.cygnus.com>
+
+ * libc/machine/m32r/setjmp.S: Use proper comment delimiter.
+ Use proper constant prefix.
+
+Fri Jan 24 10:59:04 1997 Jeffrey A Law (law@cygnus.com)
+
+ * libc/sys/sysmec/*.c: Don't cast args to syscall to integers,
+ that loses on the mn10200 where ints and pointers are different
+ sizes.
+
+Tue Jan 14 13:29:55 PST 1997 Jeremy Allison <jra@cygnus.com>
+
+ * configure.in: Added -DSIGNAL_PROVIDED to cygwin32
+ target as signal is provided in winsup.
+
+Tue Jan 14 11:10:13 1997 Jeremy Allison <jra@cygnus.com>
+
+ * libc/include/sys/process.h: Corrected const definitions
+ in spawn functions. Added cwait.
+
+Thu Jan 2 12:22:41 1997 Jeffrey A Law (law@cygnus.com)
+
+ * libc/include/machine/ieeefp.h: mn10200 uses 16bit ints and 32bit
+ doubles.
+ * libc/include/sys/config.h: Similarly.
+
+Tue Dec 31 18:36:14 1996 Michael Meissner <meissner@tiktok.cygnus.com>
+
+ * configure.in (sparc-sun-sunos*): Add -DSIGNAL_PROVIDED to the
+ target_cflags.
+ (i[3456]86-*-sco*): Ditto.
+
+ * libc/signal/Makefile.in (OFILES): Add signal.o.
+ (CFILES): Add signal.c.
+
+ * libc/signal/raise.c (_raise_r): Only compile code if
+ SIGNAL_PROVIDED is defined.
+
+ * libc/signal/signal.c: Redo whole file so that it works with
+ current newlib. Use _kill_r if no signal handler provided.
+
+ * libc/sys/{go32,sparc64,sysmec}/Makefile.in: Delete raise and
+ signal stubs.
+ * libc/sys/sysvnecv70/Makefile.in: Ditto.
+ * libc/sys/sysnecv850/Makefile.in: Ditto.
+
+ * libc/sys/{go32,sparc64}/signal.c: Delete, stub no longer used.
+ * libc/sys/sysmec/{raise,signal}.c: Ditto.
+ * libc/sys/sysvnecv70/signal.s: Ditto.
+ * libc/sys/sysnecv850/raise.c: Ditto.
+
+ * libc/sys/sysnecv850/kill.c (_kill): Encode signal # so that
+ simulator and debugger can tell the difference between a signal
+ being raised and an exit system call.
+
+ * NEWS: Document software signals being provided.
+
+Mon Dec 23 11:54:19 1996 Michael Meissner <meissner@tiktok.cygnus.com>
+
+ * libc/reent/impure.c (_REENT_ATTR): Delete in favor of
+ __ATTRIBUTE_IMPURE_PTR__. Move PowerPC definition to
+ include/sys/config.h.
+ (impure_data): Use __ATTRIBUTE_IMPURE_DATA__ for attributes.
+ Change from 'inpure_data'.
+ (_impure_ptr): Use __ATTRIBUTE_IMPURE_PTR__ for attributes. Use
+ &impure_data, not &inpure_data.
+
+ * libc/include/sys/config.h (__ATTRIBUTE_IMPURE_PTR__): If PowerPC
+ and and System V ABI, define so that _impure_ptr lives in the
+ .sdata section.
+
+Sun Dec 22 23:33:05 1996 Michael Meissner <meissner@tiktok.cygnus.com>
+
+ * libc/include/sys/reent.h (__ATTRIBUTE_IMPURE_PTR__): Define as
+ nothing if not defined.
+ (_impure_ptr): Use __ATTRIBUTRE_IMPURE_PTR__, so a machine can set
+ its attributes.
+
+ * libc/include/sys/config.h (__ATTRIBUTE_IMPURE_PTR__):
+
+Wed Dec 18 10:12:04 1996 Jeffrey A Law (law@cygnus.com)
+
+ * libc/sys/sysmec/crt0.S: Fix mn10200 stuff.
+ * libc/sys/sysmec/trap.s: Handle mn10200 too.
+ * libc/machine/mn10200/setjmp.S: Fix mn10200 stuff.
+
+Mon Dec 16 10:05:36 1996 Jeffrey A Law (law@cygnus.com)
+
+ * libc/sys/sysmec/crt0.S: Handle mn10200 too.
+
+Fri Dec 13 11:05:20 1996 Jeremy Allison <jra@cygnus.com>
+
+ * libc/include/sys/errno.h: Added net errno's.
+
+Wed Dec 11 16:24:25 1996 Michael Meissner <meissner@tiktok.cygnus.com>
+
+ * libc/misc/ffs.c: New file to support ffs function for GCC test
+ gcc.c-torture/execute/960909-1.c.
+
+ * libc/misc/Makefile.in ({O,CHEWOUT_}FILES): Add ffs.
+
+Sat Dec 7 10:12:37 1996 Jeffrey A Law (law@cygnus.com)
+
+ * libc/sys/sysmec/crt0.S: Handle underscore prefix.
+ * libc/sys/sysmec/trap.S: Likewise.
+
+Fri Dec 6 15:08:49 1996 Jim Wilson <wilson@cygnus.com>
+
+ * configure.in (mips*vr4300*-*-*): Delete use of sys/vr4300.
+ * libc/sys/vr4300/{Makefile.in,crt0.S,syscalls.c}: Delete.
+
+Wed Dec 4 16:25:27 1996 Jeffrey A Law (law@cygnus.com)
+
+ * libc/sys/sysmec/signal.c: Dummy file.
+ * libc/sys/sysmec/Makefile.in: Build it.
+
+Wed Nov 27 13:10:18 1996 Ian Lance Taylor <ian@cygnus.com>
+
+ * libc/machine/mips/machine/regdef.h: Define pc as $pc for
+ mips16.
+
+Mon Nov 25 09:58:28 1996 Jeffrey A Law (law@cygnus.com)
+
+ * libc/sys/sysmec/{crt0.S,trap0.S}: Actually try to implement
+ c-startup and simulator traps.
+
+
+ * libc/sys/sysmec/crt0.S: Remove bogus '_' symbol prefixing
+ * libc/sys/sysmec/trap0.S: Likewise.
+
+Sat Nov 23 09:01:03 1996 Michael Meissner <meissner@tiktok.cygnus.com>
+
+ * libc/stdlib/mallocr.c (ROUND_TO): If SMALL_MEMORY, set to 0x7 to
+ round to double word alignment.
+ (_morecore_r): Combine rounding up pointers to both ROUND_TO and 8
+ byte alignment.
+
+ * libc/include/sys/config.h (__IEEE_BIG_ENDIAN): Define if d10v.
+
+ * libc/sys/d10v/syscalls.c (_sbrk): Add better checks for running
+ out of memory.
+
+Mon Nov 18 13:08:26 1996 Jeffrey A Law (law@cygnus.com)
+
+ * configure.in: Handle mn10200 and mn10300.
+ * libc/include/machine/{ieeefp.h,setjmp.h}: Likewise.
+ * libc/include/sys/config.h: Likewise.
+ * libc/sys/sysmec: New directory for mec stuff.
+ * libc/machine/mn10300: New directory for mn10300 stuff.
+ * libc/machine/mn10200: Similarly for mn10200 stuff.
+
+Fri Nov 15 16:41:41 1996 Doug Evans <dje@canuck.cygnus.com>
+
+ * libc/sys/arm/crt0.S: Use .text, not .section .text.
+ * libc/sys/arm/syscalls.c: Rewrite to set errno properly.
+
+ * libc/include/sys/types.h (_ST_INT32): New macro, local to file.
+ (nlink_t): Change type from unsigned int to unsigned short.
+ (mode_t): Ensure size is 32 bits even if int is 16.
+ * libc/include/sys/stat.h (st_nlink): Change type to nlink_t.
+ (st_spare[123]): Change type from int to long.
+
+Fri Nov 15 11:41:50 1996 Michael Meissner <meissner@tiktok.cygnus.com>
+
+ * libc/sys/d10v/syscalls.c (_sbrk): Align initial heap_end to 8
+ byte boundary.
+
+ * configure.in (d10v*): Define SMALL_MEMORY.
+
+Mon Nov 11 10:30:44 1996 Michael Meissner <meissner@tiktok.cygnus.com>
+
+ * configure.in (powerpc*-{eabi,elf,linux,rtem,sysv,solaris}*): Add
+ -mrelocatable-lib and -mno-eabi flags.
+
+Mon Nov 11 09:01:39 1996 Jeffrey A Law (law@cygnus.com)
+
+ * libc/machine/h8300/memcpy.S: Fix comments to reflect reality.
+ Fix handling of mis-aligned source operand when both the
+ destination & length are properly aligned.
+
+Wed Oct 30 09:41:11 1996 Jeffrey A Law (law@cygnus.com)
+
+ * libc/sys/sysnecv850/Makefile.in (OFILES): Add
+ times.o, time.o and gettime.o
+ * libc/sys/sysnecv850/{time.c, times.c, gettime.c}: New files.
+ * libc/sys/sysnecv850/sys/syscall.h: Add SYS_times and
+ SYS_gettimeofday.
+
+Tue Oct 29 13:40:09 1996 Jeffrey A Law (law@cygnus.com)
+
+ * libc/sys/sysnecv850/Makefile.in (OFILES): Add access.o
+ * libc/sys/sysnecv850/access.c: New file.
+
+Mon Oct 21 19:47:02 1996 Ian Lance Taylor <ian@cygnus.com>
+
+ * libc/sys/vr4300/Makefile.in (clean): Remove $(OFILES).
+
+ * libc/stdlib/mprec.h (word0, word1): Use __uint32_t, not unsigned
+ long.
+
+Mon Oct 21 14:43:07 1996 Jeffrey A Law (law@cygnus.com)
+
+ * libc/sys/sysnecv850/crt0.S: Initialize ep and gp registers.
+
+Thu Oct 17 11:47:16 1996 Doug Evans <dje@seba.cygnus.com>
+
+ * libc/include/machine/{ieeefp.h,setjmp.h}: Add m32r support.
+ * libc/include/sys/config.h: Add m32r support.
+
+Wed Oct 16 23:08:05 1996 Jeffrey A Law (law@cygnus.com)
+
+ * libc/sys/sysnecv850/v850.ld: Remove. It doesn't belong
+ here.
+
+Wed Oct 16 21:18:07 1996 Mark Alexander <marka@cygnus.com>
+
+ * libc/include/machine/setjmp.h: Add D10v support.
+
+Tue Oct 15 22:28:26 1996 Jeffrey A Law (law@cygnus.com)
+
+ * configure.in: Configure the "libc/syscalls" directory for
+ the v850.
+
+ * libc/sys/sysnecv850/{close.c, execve.c, fork.c}: Add missing '_'.
+ * libc/sys/sysnecv850/{fstat.c, getpid.c, kill.c}: Likewise.
+ * libc/sys/sysnecv850/{lseek.c, open.c, read.c}: Likewise.
+ * libc/sys/sysnecv850/{sbrk.c, stat.c, unlink.c}: Likewise.
+ * libc/sys/sysnecv850/{wait.c, write.c}: Likewise.
+
+Tue Oct 15 16:24:39 1996 Stu Grossman (grossman@critters.cygnus.com)
+
+ * libc/sys/sysnecv850/crt0.S (start): Allocate spill space on
+ stack for args for main and other routines. Zero out args for
+ main.
+
+ * libc/sys/sysnecv850/v850.ld: New. Linker script to layout memory
+ correctly.
+
+Tue Oct 15 11:51:42 1996 Michael Meissner <meissner@tiktok.cygnus.com>
+
+ * libc/stdio/findfp.c (std): Remove extraneous ';' after
+ function.
+
+ * libc/sys/d10v/sys/syscall.h (SYS_kill): Add.
+
+ * libc/sys/d10v/{syscalls.c,trap.S} (_kill,_getpid): Make these
+ real system calls now.
+
+ * libc/stdio/setvbuf (setvbuf): Cast pointers to _POINTER_INT
+ before casting them to int.
+ * libc/stdio/tmpnam.c (_tempnam_r): Ditto.
+
+ * libc/stdlib/mallocr.c (_morecore_r): Use _POINTER_INT when
+ aligning pointer.
+ * libc/string/memset.c (memset): Ditto.
+
+ * libc/stdio/vfscanf.c (__svfscanf): When converting to pointer,
+ first convert ints to _POINTER_INT to eliminate GCC warning.
+
+ * libc/stdio/vfprintf.c (_vfprintf_r): Use _POINTER_INT when
+ processing %p.
+
+ * libm/math/ef_scalb.c (__ieee754_scalbf): Cut down range to 32000
+ from 65000 if ints are only 16 bits.
+
+ * libm/math/sf_scalbn.c (scalbnf): Cut down overflow test to 30000
+ from 50000 if ints are only 16 bits.
+
+ * libc/include/sys/config.h (_POINTER_INT): New macro, to give an
+ int type that is the same size as a pointer.
+
+ * libc/misc/dprintf.c (__dprintf): Use _POINTER_INT when
+ processing %p.
+ (get_number): Explicitly cast number to long before shifting by 16
+ or 24, in case ints are short.
+
+ * libc/include/sys/config.h (_POINTER_INT): Define as short.
+
+Wed Oct 9 16:54:32 1996 Jeremy Allison <jra@cygnus.com>
+
+ * libc/string.h: Added ffs, removed swab.
+ * libc/sys/errno.h: Added EOPNOTSUPP.
+ * libc/sys/unistd.h: Added swab.
+
+Thu Oct 3 17:08:50 1996 Jeremy Allison <jra@cygnus.com>
+
+ * libc/include/sys/stat.h: Added fchmod.
+ * libc/include/sys/unistd.h: Added fsync.
+
+Tue Oct 1 17:34:08 1996 Jeremy Allison <jra@cygnus.com>
+
+ * libc/include/sys/errno.h: Added defines for EPFNOSUPPORT (96)
+ and ECONNRESET (104) for cygwin32.
+
+Tue Oct 1 16:24:05 1996 Gavin Koch <gavin@cygnus.com>
+
+ * libc/sys/sysnecv850/_exit.c: added _do_dtors to
+ do the static destructors.
+
+Mon Sep 30 15:59:05 1996 Stu Grossman (grossman@critters.cygnus.com)
+
+ * libc/sys/sysnecv850/trap.S: Change I/O to use trap 31.
+
+Mon Sep 30 12:02:50 1996 Doug Evans <dje@canuck.cygnus.com>
+
+ * libc/machine/m32r/{Makefile.in,setjmp.S}: New files.
+ * configure.in: Recognize m32r-*-*.
+
+Mon Sep 30 00:34:41 1996 James G. Smith <jsmith@cygnus.co.uk>
+
+ * libc/sys/arm/trap.S (__rt_stkovf_split_big,
+ __rt_stkovf_split_small): Added default software stack overflow
+ handlers, which just call SWI_Exit.
+ * libc/sys/arm/crt0.S (_mainCRTStartup): Simple software stack
+ limit initialisation.
+
+Fri Sep 27 13:08:03 1996 Mark Alexander <marka@cygnus.com>
+
+ * libc/sys/d10v/{trap.S,sys/syscall.h}: Add time() function.
+
+Fri Sep 27 12:32:00 1996 Jeremy Allison <jra@cygnus.com>
+
+ * libc/include/sys/types.h: Added ssize_t definition.
+
+Wed Sep 25 14:52:18 1996 Michael Meissner <meissner@tiktok.cygnus.com>
+
+ * libc/machine/d10v/setjmp.S: Use ';' for comments.
+ * libc/sys/d10v/{crt0.S,trap.S}: Ditto.
+
+ * libc/machine/d10v/setjmp.S (longjmp): Use exef0t || instead of
+ branch around a single ldi instruction.
+
+ * libc/sys/d10v/crt0.S (_start): Use auto-increment to zero bss.
+ Call exit, instead of just issuing a stop instruction.
+
+Sun Sep 22 17:26:55 1996 Michael Meissner <meissner@tiktok.cygnus.com>
+
+ * libc/sys/d10v/{trap.S,syscalls.c}: Add -mint32 support.
+
+Fri Sep 20 13:23:12 1996 Michael Meissner <meissner@tiktok.cygnus.com>
+
+ * libc/stdlib/mprec.h: Explicitly declare all large constants as
+ longs, and then cast them to __uint32_t.
+
+ * libc/include/sys/config.h: Protect against multiple inclusions.
+
+Tue Sep 17 13:10:33 1996 Mark Alexander <marka@cygnus.com>
+
+ * configure.in (d10v*): Set syscall_dir.
+
+Sun Sep 15 10:41:59 1996 Mark Alexander <marka@cygnus.com>
+
+ * libc/sys/d10v/crt0.S: Set stack pointer.
+
+Thu Sep 12 13:02:38 1996 Mark Alexander <marka@cygnus.com>
+
+ * libc/sys/d10v/{trap.S, syscalls.c}: Rewrite most system calls
+ in assembly for efficiency. Change calling convention to allow
+ long ints to be returned.
+
+Wed Sep 11 10:28:18 1996 Michael Meissner <meissner@tiktok.cygnus.com>
+
+ * libc/machine/v850/Makefile.in (setjmp.o): Fix dependency.
+
+Thu Sep 5 19:23:06 1996 Doug Evans <dje@canuck.cygnus.com>
+
+ * libc/posix/execvp.c (execvp): Don't search PATH if file has '/'.
+ Handle empty entries in $PATH.
+
+Tue Sep 03 18:15:02 1996 Mark Alexander <marka@cygnus.com>
+
+ * libc/machine/d10v/setjmp.S: Make it really work.
+
+Tue Sep 3 12:16:26 1996 Ian Lance Taylor <ian@cygnus.com>
+
+ * libc/sys/sh/crt0.S: If __ELF__, use ELF section attributes for
+ the .stack section.
+
+Tue Sep 3 10:08:45 1996 Jeffrey A Law (law@cygnus.com)
+
+ * sys/sysnecv850/sys/file.h: Remove.
+ * sys/sysnecv850/sys/syscall.h: New file.
+ * sys/sysnecv850/{misc.c,syscalls.c,malloc.c}: Deleted.
+ * sys/sysnecv850/{chmod.c, chown.c, close.c, creat.c} New files.
+ * sys/sysnecv850/{execv.c, execve.c, fork.c, fstat.c} New files.
+ * sys/sysnecv850/{getpid.c, isatty.c, kill.c, lseek.c} New files.
+ * sys/sysnecv850/{open.c, pipe.c, raise.c, read.c} New files.
+ * sys/sysnecv850/{stat.c, unlink.c, utime.c, wait.c} New files.
+ * sys/sysnec850/trap.S: New file.
+ * sys/sysnecv850/{_exit.c, write.c}: Use new TRAP0 mechanism for
+ syscalls.
+ * sys/sysnecv850/crt0.S: Use cmp/bl, not tst/bz.
+ * sys/sysnec850/sbrk.c: New version.
+
+Sun Sep 1 20:08:27 1996 Jeffrey A Law (law@cygnus.com)
+
+ * sys/sysnecv850/crt0.S: Fix order of comparison args. Loop
+ as long as r6 is less than r7.
+
+Sun Sep 1 13:54:19 1996 Ian Lance Taylor <ian@cygnus.com>
+
+ * Makefile.in (mostlyclean): Separate from clean target. Don't
+ remove *.a or targ-include.
+ * libc/machine/sparc/Makefile.in (mostlyclean): New target.
+
+Sun Sep 1 11:35:26 1996 Michael Meissner <meissner@tiktok.cygnus.com>
+
+ * libc/include/machine/ieeefp.h (_DOUBLE_IS_32BITS): Define for
+ d10v.
+ (__SMALL_BITFIELDS): Ditto.
+
+ * libc/include/sys/config.h (_DOUBLE_IS_32BITS): Define for d10v.
+
+Sat Aug 31 16:42:36 1996 Jeffrey A Law (law@cygnus.com)
+
+ * libc/sys/sysnecv850/misc.c (raise, getpid, kill): Remove '_'
+ prefix.
+
+ * libc/sys/sysnecv850/sbrk.c (sbrk): Remove '_' prefix.
+ * libc/sys/sysnecv850/syscalls.c (read, lseek, close): Likewise.
+ * libc/sys/sysnecv850/syscalls.c (fstat, open, close): Likewise.
+ * libc/sys/sysnecv850/write.c (write): Likewise.
+
+ * libc/sys/sysnecv850/crt0.S: Don't try to zero out an empty
+ .bss.
+
+Fri Aug 30 11:18:45 1996 Michael Meissner <meissner@tiktok.cygnus.com>
+
+ * libc/include/sys/config.h: Define INT_MAX, UINT_MAX
+ appropriately for D10V, depending on -mint16/-mint32.
+
+Thu Aug 29 16:09:37 1996 Mark Alexander <marka@cygnus.com>
+
+ * configure.in: Add cases for D10V.
+
+Thu Aug 29 17:03:23 1996 Michael Meissner <meissner@tiktok.cygnus.com>
+
+ * configure.in (i[345]86-*-*): Recognize i686 for pentium pro.
+
+Wed Aug 28 21:05:52 1996 Jeffrey A Law (law@cygnus.com)
+
+ * libc/include/machine/ieeefp.h: Fix typo.
+
+Wed Aug 28 19:47:55 1996 Mark Alexander <marka@cygnus.com>
+
+ * libc/sys/d10v: New directory for D10V stuff.
+ * libc/include/machine/ieeefp.h: Add D10V defines.
+
+Mon Aug 26 13:34:58 1996 Doug Evans <dje@canuck.cygnus.com>
+
+ * libc/include/sys/errno.h: Add winsup/include/sys/errno.h values:
+ ELOOP, ENOBUFS, EAFNOSUPPORT, EPROTOTYPE, ENOTSOCK, ENOPROTOOPT,
+ ESHUTDOWN, ECONNREFUSED, EADDRINUSE, ECONNABORTED, EWOULDBLOCK.
+ * libc/string/strerror.c (strerror): Add them.
+
+Thu Aug 22 16:38:19 1996 Jeffrey A Law (law@cygnus.com)
+
+ * libc/sys/sysnecv850: New directory for v850 stuff.
+
+ * libc/machine/v850: New directory for v850 stuff.
+ * libc/machine/v850/setjmp.S: setjmp/longjmp support.
+
+ * configure.in: Add support for the v850.
+
+ * libc/include/machine/ieeefp.h: Add v850 defines.
+ * libc/include/machine/setjmp.h: Likewise.
+ * libc/include/sys/config.h: Add v850 defines.
+
+Sat Aug 17 04:06:36 1996 Geoffrey Noer <noer@cygnus.com>
+
+ * libc/include/machine/ieeefp.h
+ * libc/include/machine/setjmp.h
+ * libc/include/sys/fcntl.h
+ * libc/include/sys/signal.h
+ * libc/include/sys/types.h
+ * libc/stdlib/system.c:
+ Fix preprocessor defines to match new scheme (_WIN32 for WIN32
+ API availability, __CYGWIN32__ for cygwin32 environment specific).
+
+Thu Aug 15 17:09:21 1996 Geoffrey Noer <noer@cygnus.com>
+
+ * libc/include/stdlib.h: add multibyte character functions. Add
+ __eprintf for assert.
+
+Thu Aug 15 11:15:40 1996 Michael Meissner <meissner@tiktok.cygnus.com>
+
+ * libc/stdlib/malloc.h (MALLOC_ALIGNMENT): Use either pointer
+ arithmetic or __alignof__ to properly get the alignment, instead
+ of hardwiring it to 4.
+
+Wed Aug 14 23:43:28 1996 Geoffrey Noer <noer@cygnus.com>
+
+ * libc/stdio/fseek.c: add fflush call to adjust seek offset
+ on append stream (fix from NetBSD sources), adjust curoff offset
+ for ungetc's benefit.
+ * libc/stdio/ftell.c: adjust curoff offset for ungetc's benefit.
+ * libc/stdio/rewind.c: replace code with up to date NetBSD
+ code to undo hacks made to work around above problem of not
+ having fflush call mentioned above
+
+Fri Aug 2 18:28:07 1996 J.T. Conklin <jtc@rtl.cygnus.com>
+
+ * libc/reent/{closer.c, execr.c, fstatr.c, linkr.c, lseekr.c,
+ openr.c, readr.c, sbrkr.c, signalr.c, statr.c, timer.c, writer.c}:
+ Partially revert last changes. The thread specific errno is set
+ iff if the underlying syscall fails and the global errno is not
+ zero.
+
+Fri Jul 19 11:41:52 1996 J.T. Conklin <jtc@rtl.cygnus.com>
+
+ * libc/reent/filer.c: Removed files, all functions have split out
+ into their own files.
+ * libc/reent/{closer.c, lseekr.c, openr.c, readr.c, writer.c}:
+ New files containing functions formally in filer.c
+ * libc/reent/Makefile.in: Updated for above change.
+
+ * libc/reent/execr.c (_fork_r, _wait_r): Set errno if underlying
+ syscall fails, not if errno is changed.
+ * libc/reent/filer.c (_open_r, _close_r, _lseek_r, _read_r,
+ _write_r): Likewise.
+ * libc/reent/fstatr.c (_fstat_r): Likewise.
+ * libc/reent/linkr.c (_link_r, _unlink_r): Likewise.
+ * libc/reent/sbrkr.c (_sbrk_r): Likewise.
+ * libc/reent/signalr.c (_kill_r): Likewise.
+ * libc/reent/statr.c (_stat_r): Likewise.
+ * libc/reent/timer.c (_gettimeofday_r): Likewise.
+
+ * libc/reent/{execr.c, filer.c, fstatr.c, linkr.c, sbrkr.c,
+ signalr.c, statr.c, timer.c} (errno): declare extern rather
+ than as a common.
+
+ * libc/stdio/vfprintf.c (__sbprintf): Use the VFPRINTF macro
+ instead of calling vfprintf so that i*printf will not require
+ floating point support code.
+
+Mon Jul 15 16:50:59 1996 Doug Evans <dje@canuck.cygnus.com>
+
+ * libc/posix/execvp.c (execvp): Use posix_path_list_p to determine
+ path delimiter.
+ * libc/include/sys/unistd.h (_SC_PATH_RULES): Delete.
+ (_PATH_RULES_{UNKNOWN,WIN32,POSIX}): Delete.
+
+Thu Jul 11 14:34:14 1996 Geoffrey Noer <noer@cygnus.com>
+
+ * libc/include/signal.h: _sig_func_ptr function takes an int
+ * libc/include/sys/signal.h: sa_handler function takes an int
+
+Tue Jul 9 21:22:32 1996 Jeffrey A Law (law@cygnus.com)
+
+ * libc/include/machine/ieeefp.h: Simplify H8/S support.
+ * libc/include/sys/config.h: Add missing H8/S conditional.
+
+Sun Jun 30 12:05:46 1996 Doug Evans <dje@canuck.cygnus.com>
+
+ * libc/include/sys/unistd.h (MAXPATHLEN): Add cygwin32 value.
+
+Wed Jun 26 09:57:54 1996 Jeffrey A Law (law@cygnus.com)
+
+ * libc/include/machine/setjmp.h: Handle H8/S.
+ * libc/include/machine/ieeefp.h: Likewise.
+ * libc/include/sys/config.h: Likewise.
+ * libc/machine/h8300/{defines.h, memcpy.S, memset.S}: Likewise.
+ * libc/machine/h8300/{reg_memcpy.S, reg_memset.S}: Likewise.
+ * libc/machine/h8300/{strcmp.S, setjmp.S}: Likewise.
+ * libc/sys/h8300hms/crt0.S: Likewise.
+
+Tue Jun 25 23:15:45 1996 Jason Molenda (crash@godzilla.cygnus.co.jp)
+
+ * Makefile.in (datadir): Set to $(prefix)/share.
+ (oldincludedir, docdir): Removed.
+ * doc/Makefile.in (datadir): Set to $(prefix)/share.
+ (oldincludedir, docdir): Removed.
+ * libc/Makefile.in (datadir): Set to $(prefix)/share.
+ (oldincludedir, docdir): Removed.
+ * libm/Makefile.in (datadir): Set to $(prefix)/share.
+ (oldincludedir, docdir): Removed.
+
+Fri Jun 21 19:24:41 1996 Ian Lance Taylor <ian@cygnus.com>
+
+ * libc/include/sys/reent.h (_REENT_INIT): Update for change to
+ _reent struct.
+
+Wed Jun 19 14:00:09 1996 Doug Evans <dje@canuck.cygnus.com>
+
+ * libc/posix/execvp.c: Delete _WIN32 support. For __CYGWIN32__
+ fetch current path rules with sysconf and handler posix/win32
+ appropriately.
+
+ * libc/include/sys/unistd.h (_PATH_RULES{,_POSIX,_WIN32}): Define.
+
+ * libc/include/process.h: Prepend '_' to P_{WAIT,NOWAIT,OVERLAY}.
+ (WAIT_CHILD): Always define.
+
+Sat Jun 15 17:50:42 1996 Ian Lance Taylor <ian@cygnus.com>
+
+ * libc/stdlib/eprintf.c: New file.
+ * libc/stdlib/Makefile.in (OFILES): Add eprintf.o.
+ (eprintf.o): New target.
+
+Thu Jun 13 16:44:32 1996 Doug Evans <dje@canuck.cygnus.com>
+
+ * libc/sys/cygwin32/crt0.c (__cygwin_crt0_bp): New global.
+ (mainCRTStartup): Do int3 if __cygwin_crt0_bp non-zero.
+
+Thu Jun 13 17:45:17 1996 Mike Meissner <meissner@rtl.cygnus.com>
+
+ * libc/include/machine/ieeefp.h: Add support for AIX and Windows
+ NT in PowerPC endianess cases.
+
+Tue Jun 11 12:26:28 1996 Michael Meissner <meissner@tiktok.cygnus.com>
+
+ * libc/include/machine/ieeefp.h: Clean up PowerPC endianess.
+
+Thu Jun 6 11:34:20 1996 Michael Meissner <meissner@tiktok.cygnus.com>
+
+ * libc/string/strtok.c: Fix doc typo.
+
+Mon Jun 3 11:30:00 1996 J.T. Conklin <jtc@rtl.cygnus.com>
+
+ * libc/include/sys/reent.h (struct _reent): Removed _asctime,
+ _next, _scanpoint, _signgam fields.
+
+ * libc/include/stdlib.h (rand_r): Added new declaration.
+ (_rand_r, _srand_r): Removed declarations.
+ * libc/stdlib/rand.c (_rand_r, _srand_r): Removed, these functions
+ have been made obsolete by rand_r.
+ * libc/stdlib/rand_r.c: New file, rand_r function as specified
+ by POSIX.1c.
+
+ * libc/string/strtok.c: Update documentation to describe
+ strtok_r().
+
+Sat Jun 1 23:50:39 1996 Michael Meissner <meissner@cygnus.com>
+
+ * libc/include/sys/stat.h (stat structure): Use the expanded stat
+ structure on Solaris, and PowerPC systems even though __svr4__ is
+ defined.
+
+Tue May 28 13:02:42 1996 Doug Evans <dje@canuck.cygnus.com>
+
+ * libc/sys/go32/sys/errno.h (ENOSYS,ESPIPE): Keep values <= 255.
+
+Fri May 17 10:34:44 1996 Ian Lance Taylor <ian@cygnus.com>
+
+ * host/any: Use ../.. rather than .. to get to the main build
+ directory. This matches the current layout of the build
+ directory.
+
+Wed May 15 15:52:27 1996 Jeffrey A Law (law@cygnus.com)
+
+ * libc/machine/h8300/__main.S: Delete. No longer needed.
+ * libc/machine/h8300/Makefile.in: Corresponding changes.
+ * libc/sys/h8300hms/crt1.c: New file.
+ * libc/sys/h8300hms/Makefile.in: Corresponding changes.
+ * libc/sys/h8300hms/crt0.s: Call __main.
+
+ * libc/sys/h8300hms/crt0.S: Use temporary label names
+ for branch targets.
+
+Mon May 13 14:26:30 1996 Doug Evans <dje@canuck.cygnus.com>
+
+ * libc/stdio/fopen.c (_fopen_r): Fix arguments to fseek.
+
+Fri May 3 16:38:23 1996 Michael Meissner <meissner@tiktok.cygnus.com>
+
+ * libc/reent/impure.c (_impure_ptr): Force the impure pointer into
+ .sdata on the PowerPC so that we can link newlib with code
+ compiled with -msdata.
+
+Mon Apr 29 21:38:02 1996 Doug Evans <dje@canuck.cygnus.com>
+
+ * libc/sys/arm/syscalls.c (_sbrk): Rename end to __end__.
+
+Thu Apr 25 06:38:59 1996 Michael Meissner <meissner@cygnus.com>
+
+ * libc/sys/cygwin32/crt0.c (mainCRTStartup): On PowerPC, set the
+ exception handler to __cygwin_exception_handler.
+
+Tue Apr 23 15:14:20 1996 Ian Lance Taylor <ian@cygnus.com>
+
+ * libc/include/machine/setjmp.h: Check _AM29K, not ___AM29K__.
+
+Sun Apr 21 12:11:51 1996 Doug Evans <dje@blues.cygnus.com>
+
+ * libm/math/Makefile.in ({w,wf}_cabs.o,{w,wf}_drem.o): Add rule for
+ SunOS VPATH.
+ * libc/stdlib/Makefile.in (atoff.o,atol.o,mblen.o,mbstowcs.o,
+ wcstombs.o): Likewise.
+
+Thu Apr 18 12:37:01 1996 Doug Evans <dje@canuck.cygnus.com>
+
+ * libc/stdlib/environ.c (initial_env): New static local.
+ (environ): Point to `initial_env'.
+
+ * libc/include/machine/setjmp.h: Clean up.
+ (__H8300H__,__PPC__): Define _JBTYPE.
+ (__arm__): Provide entry for.
+ (sigjmp_buf): Delete.
+ (jmp_buf): Use _JBTYPE if defined, otherwise int.
+
+Thu Apr 18 12:10:52 1996 Jeffrey A Law (law@cygnus.com)
+
+ * libc/machine/h8300/strcmp.S: Sign extend the result to
+ 32bits so we don't lose with -mint32.
+
+Sun Apr 14 19:59:52 1996 Doug Evans <dje@canuck.cygnus.com>
+
+ * libc/sys/go32/sys/errno.h: New file.
+ * libc/sys/go32/Makefile.in (stat.o): Depend on stat.c.
+ * libc/sys/go32/gerrno.s (syscall_error): Call __errno to get
+ errno's address (make compatible with rest of newlib).
+ * libc/sys/go32/stat.c (fixinode): Set errno upon failure.
+ * libc/string/strerror.c (strerror): Surround each case with #ifdef.
+
+Thu Mar 28 13:44:42 1996 Doug Evans <dje@canuck.cygnus.com>
+
+ * libc/machine/sparc/{scan.c,shuffle.c}: New files.
+ * libc/machine/sparc/Makefile.in: Build them.
+ * libc/machine/sparc/machine/sparclet.h: New file.
+
+Mon Mar 25 15:29:14 1996 J.T. Conklin <jtc@rtl.cygnus.com>
+
+ * libc/machine/sh/asm.h: New file.
+ * libc/machine/sh/setjmp.S: Only save clobbered registers. Added
+ support for SH3e's FP registers. Use asm.h.
+
+Mon Mar 25 11:59:23 1996 Jeffrey A Law (law@cygnus.com)
+
+ * libc/stdio/vfprintf.c (cvt): Accept a reent structure
+ as first argument. Call _dtoa_r and pass the reent structure
+ instead of calling __dtoa.
+
+Fri Mar 22 13:59:37 1996 Jeffrey A Law (law@cygnus.com)
+
+ * libc/include/sys/config.h: Define DOUBLE_IS_32BITS for
+ the h8300, h8500, and others. Add comments for some rather
+ dubious code.
+
+Thu Mar 14 18:04:43 1996 Ian Lance Taylor <ian@cygnus.com>
+
+ * Makefile.in (check): Check that testsuite exists before cd.
+
+Tue Mar 12 11:46:47 1996 Michael Meissner <meissner@tiktok.cygnus.com>
+
+ * libc/include/string.h (strsep): Correct prototype.
+
+Mon Mar 11 09:55:19 1996 Doug Evans <dje@charmed.cygnus.com>
+
+ * libc/sys/h8300/_exit.c (_exit,__exit): Set r0 to 0 before `sleep'.
+ * libc/sys/h8300/misc.c (_kill): Set r0 to indicate abort and `sleep'.
+ * libc/sys/h8300/crt0.S (_start): Call exit instead of `sleep'.
+
+Wed Mar 6 11:51:55 1996 Doug Evans <dje@charmed.cygnus.com>
+
+ * libc/posix/{creat.c,isatty.c}: New files.
+ * libc/posix/Makefile.in (OFILES): Add creat.o, isatty.o.
+
+ * libc/sys/sparc64/crt0.S (environ): Delete.
+ (.LHaveBias): Renamed from HaveBias.
+
+Thu Feb 15 10:48:37 1996 Doug Evans <dje@charmed.cygnus.com>
+
+ * libc/stdlib/mallocr.c (etext): Move decl inside ifdef WARN_VLIMIT.
+ (_morecore_r): Delete SBRK_IS_ALLOC support.
+
+Tue Feb 13 09:44:09 1996 Michael Meissner <meissner@tiktok.cygnus.com>
+
+ * libc/sys/cygwin32/Makefile.in (lib.a): Make lib.a with a dummy
+ module rather than touch, so we don't get warning messages when
+ all of the libraries are combined into libc.a.
+
+Tue Feb 13 06:32:07 1996 Doug Evans <dje@charmed.cygnus.com>
+
+ * libc/sys/sparclite/{Makefile.in,crt0.s}: Deleted.
+ crt0.s replaced by version in libgloss.
+
+Mon Feb 5 15:17:51 1996 J.T. Conklin <jtc@rtl.cygnus.com>
+
+ * libc/reent/Makefile.in (OFILES): Add impure.o.
+ * libc/reent/impure.o: New file, define initial reentrancy struct.
+ * libc/reent/reent.c: Remove above definition.
+
+ * libm/math/sf_asinh.c: Fix typo.
+
+ * Makefile.in (MATHOBJS_IN_LIBC): Removed sr_ldexp.o and
+ srf_ldexp.o.
+
+ * libm/libm.texinfo: Change documentation to reflect changes
+ in reentrancy model.
+ * libm/math/w_gamma.c: Likewise.
+
+Wed Jan 31 18:49:45 1996 Steve Chamberlain <sac@slash.cygnus.com>
+
+ * configure.in (*-*-cygwin32): New.
+ (*-*-win32): Deleted.
+ * libc/sys/win32 renamed libc/sys/cygwin32.
+
+Tue Jan 30 22:09:03 1996 Michael Meissner <meissner@tiktok.cygnus.com>
+
+ * libc/include/sys/file.h: New include file.
+
+Fri Jan 26 15:52:54 1996 Steve Chamberlain <sac@slash.cygnus.com>
+
+ * libc/include/machine/setjmp.h: Increase size of PPC jmp_buf.
+
+Tue Jan 23 17:49:16 1996 Steve Chamberlain <sac@slash.cygnus.com>
+
+ * libc/include/sys/wait.h (WIFSIGNALED): Fix.
+
+Tue Jan 16 09:28:10 1996 Michael Meissner <meissner@tiktok.cygnus.com>
+
+ * doc/makedoc.c (realloc): Declare at file scope.
+ (catchar): Not here.
+
+Wed Dec 27 15:45:23 1995 Doug Evans <dje@canuck.cygnus.com>
+
+ * Makefile.in (VERSION): Update to 1.7.0.
+ * {libc,libm}/Makefile.in (VERSION): Likewise.
+ * configure.in: Minor clean up of multilib stuff.
+
+ From David Johnson <davidj@ICSI.Berkeley.EDU>
+ * {libc,libm}/Makefile.in (lib[cm].a): Delete library first.
+
+ * libc/stdlib/environ.c: New file.
+ * libc/stdlib/Makefile.in (OFILES): Build it.
+ * libc/sys/h8500hms/crt0.c (environ): Deleted.
+ * libc/sys/m88kbug/crt0.c (environ): Deleted.
+ * libc/sys/z8ksim/crt0.c (environ): Deleted.
+ * libc/sys/netware/environ.c: Deleted.
+
+Tue Dec 19 15:24:46 1995 Kim Knuttila <krk@cygnus.com>
+
+ * configure.in (links): set sys_dir, posix_dir, syscall_dir
+
+Wed Dec 13 04:16:25 1995 Michael Meissner <meissner@wogglebug.tiac.net>
+
+ * doc/makedoc.c (init_string_with_size,nextword): Move malloc
+ declaration out to external scope and declare it PTR, not char *.
+
+Mon Dec 11 17:35:12 1995 steve chamberlain <sac@slash.cygnus.com>
+
+ * libc/include/sys/unistd.h (getpagesize): New declaration.
+ (_SC_PAGESIZE): New definition.
+ * libc/include/time.h (CLK_TCK): Defined as CLOCKS_PER_SEC.
+ * libc/configure.in (i[345]86-*-win32): Remove -DNO_FORK.
+
+Fri Dec 1 16:48:46 1995 James G. Smith <jsmith@cygnus.co.uk>
+
+ * libc/sys/vr4300/syscalls.c (sbrk): Fixed memory
+ addressing. System call returns size, not (last address + 1).
+
+Thu Nov 30 15:05:26 1995 J.T. Conklin <jtc@rtl.cygnus.com>
+
+ * libm/math/*.c: Removed _foo_r() reentrancy API.
+ * libc/include/math.h: Removed _foo_r prototypes and macros.
+
+ * libm/math/*.c: On systems with IEEE single precision "doubles"
+ move foo() -> foof() wrapper code from the files that implement
+ the standard IEEE double precision functions to the files that
+ implement IEEE single precision functions. (ie. On those systems
+ sin is moved from s_sin.c to sf_sin.c). There should eventually
+ be use of a C extension (like gcc's alias attribute) so that the
+ wrappers are not needed at all.
+
+ * libc/sys/sysnec810/sbrk.c: Cast &end to char * to get around
+ strict NEC V810 compiler.
+ * libc/misc/dprintf.c (getnumber): Cast char * to unsigned char *
+ for same reason.
+
+Wed Nov 29 14:25:05 1995 J.T. Conklin <jtc@rtl.cygnus.com>
+
+ * libc/stdlib/strtol.c (_strtol_r): Replaced with implementation
+ from NetBSD C library.
+ * libc/stdlib/strtoul.c (_strtoul_r): Likewise.
+
+ * libc/stdlib/assert.c (__assert): Renamed from __assertfail
+ and adapted from implementation I wrote for NetBSD C library.
+ The difference is __assert doesn't take a format argument,
+ so that there won't be multiple copies of the same string
+ constant in the executable if assertions are enabled in
+ more than one source module.
+ * libc/include/assert.h (assert): Changed to call __assert.
+
+Tue Nov 28 16:54:26 1995 J.T. Conklin <jtc@rtl.cygnus.com>
+
+ * libc/stdlib/strtod.c (_strtod_r): Changed to not assign to
+ word1 on systems with 32 bit doubles.
+ * libc/stdlib/qsort.c (qsort): Cast some void *'s to char *'s
+ so that we can do arithmetic on them.
+ * libc/misc/dprintf.c: Changed to support stdarg.h for ANSI
+ compilers.
+
+Tue Nov 28 16:03:32 1995 Doug Evans <dje@canuck.cygnus.com>
+
+ * libc/sys/arm/crt0.S: Zero bss.
+
+Fri Nov 24 16:09:23 1995 Doug Evans <dje@deneb.cygnus.com>
+
+ * libc/include/unctrl.h: New file.
+ * libc/misc/{Makefile.in,dprintf.c,unctrl.c,misc.tex}: New files.
+ * configure.in (subdirs): Add libc/misc.
+ * libc/Makefile.in (SUBDIRS): Add misc.
+ (SUBLIBS): Add misc/lib.a.
+
+ * libc/include/sys/reent.h (struct _reent): Make __sf last member.
+
+Wed Nov 22 19:49:47 1995 Doug Evans <dje@deneb.cygnus.com>
+
+ * libc/stdio/vfprintf.c (__sbprintf): Init fake._data.
+ (_vfprintf_r): Call CHECK_INIT.
+
+Tue Nov 14 02:52:12 1995 Doug Evans <dje@canuck.cygnus.com>
+
+ * Makefile.in (MULTITOP): Delete.
+ (MULTISRCTOP, MULTIBUILDTOP): Add.
+ * configure.in: Delete call to cfg-ml-com.in. Call config-ml.in
+ instead of cfg-ml-pos.in.
+
+Wed Nov 8 01:24:08 1995 James G. Smith <jsmith@pasanda.cygnus.co.uk>
+
+ * libc/sys/vr4300/syscalls.c: Added clean version of sbrk().
+ * libc/sys/vr4300/crt0.S: Cleaned up. Added check for FPU
+ presence.
+
+Thu Nov 2 22:25:06 1995 Michael Meissner <meissner@tiktok.cygnus.com>
+
+ * libc/string/strtok.c: Include string.h to pick up strtok_r
+ prototype.
+
+Wed Nov 1 18:54:11 1995 Jason Molenda (crash@phydeaux.cygnus.com)
+
+ * libc/string/strtok.c: include <_ansi.h>.
+ * libc/time/asctime_r.c: `reresult' -> `result'.
+
+Wed Nov 1 14:35:52 1995 J.T. Conklin <jtc@rtl.cygnus.com>
+
+ * libc/time/{ctime.c, gmtime.c, lcltime.c}: Wrap functions
+ in #ifndef _REENT_ONLY ... #endif conditional.
+
+ * libc/include/string.h (_strtok_r): Remove declaration.
+ * libc/include/time.h (_asctime_r): Remove declaration.
+ * libc/string/strtok.c (_strtok_r): Removed.
+ * libc/time/asctime.c (_asctime_r): Removed.
+
+ * libc/string/Makefile.in (OFILES): Add new object.
+ * libc/string/strtok_r.c: New file. strtok_r function as
+ specified by POSIX.1c, adapted from strtok implementation
+ from NetBSD C library.
+ * libc/string/strtok.c (strtok): Reimplemented in terms of
+ strtok_r.
+
+ * libc/time/Makefile.in (OFILES): Add new objects.
+ * libc/time/{asctime_r.c, ctime_r.c, gmtime_r.c, lcltime_r.c}:
+ New files, reentrant time functions specified by POSIX.1c.
+ * libc/time/{asctime.c, ctime.c, gmtime.c, lcltime.c}: Non-
+ reentrant time functions re-written in terms of reentrant
+ functions.
+ * libc/time/lcltime.c: Renamed from localtime.c
+
+ * libc/include/time.h: Add prototypes for asctime_r, ctime_r,
+ gmtime_r, and localtime_r.
+
+Sat Oct 28 14:34:31 1995 steve chamberlain <sac@slash.cygnus.com>
+
+ * libc/sys/win32/crt0.c (mainCRTStartup): Call cygwin_crt0.
+ * libc/include/sys/unistd.h (getlogin): Revert change of
+ Oct 19.
+ * libc/include/sys/signal.h (sigprocmask): Change prototype
+ so it compiles with c++.
+
+Wed Oct 25 15:43:18 1995 Michael Meissner <meissner@cygnus.com>
+
+ * libc/include/machine/setjmp.h (PowerPC _JBLEN): Consider it a
+ PowerPC if __PPC__ is defined. Bump jump_buf length to 62 ints,
+ to give some room in case we need to align the jmp_buf.
+
+ * libc/machine/powerpc/setjmp.S (setjmp, longjmp): Rewrite to use
+ the new ppc-asm.h include file the compiler provides to specify
+ function prologue/epilogue. Eliminate saves of the xer and ctr
+ registers, which are volatile. Before starting to save registers,
+ align to 8 byte boundary.
+
+Mon Oct 23 11:20:51 1995 James G. Smith <jsmith@pasanda.cygnus.co.uk>
+
+ * libc/sys/vr4300/syscalls.c: Added empty kill() function,
+ referenced by standard libraries.
+
+Thu Oct 19 21:39:47 1995 Fred Fish <fnf@cygnus.com>
+
+ * libc/unix/Makefile.in, libc/string/Makefile.in,
+ libc/stdio/Makefile.in, libc/reent/Makefile.in,
+ libc/posix/Makefile.in:
+ Remove tabs from otherwise empty line. Confuses some
+ older non-GNU versions of "make".
+
+Thu Oct 19 16:32:17 1995 steve chamberlain <sac@slash.cygnus.com>
+
+ * libc/sys/unistd.h (getlogin): Returns const char *.
+
+Wed Oct 18 12:57:50 1995 steve chamberlain <sac@slash.cygnus.com>
+
+ * libc/include/fcntl.h (O_BINARY, O_TEXT): New.
+ * libc/include/errno.h: Moved into and include...
+ * libc/include/sys/errno.h: New file.
+ * libc/include/sys/wait.h: New file.
+ * libc/stdio/rename.c (_rename_r): Use _rename system call if available.
+ * libc/sys/win32/*: Moved out.
+ * libc/sys/win32/crt0.c: Rewritten to cope with shared library.
+ * configure.in (i[345]86-*-win32): HAVE_RENAME
+
+Wed Oct 18 09:58:27 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
+
+ * libc/unix/sigset.c (sigemptyset, sigaddset): Prefix #undef to
+ avoid macro expansion for these two names.
+
+Tue Oct 17 08:45:33 1995 Doug Evans <dje@canuck.cygnus.com>
+
+ * libc/machine/h8500/psi.S: r6 renamed to fp.
+
+Sun Oct 15 12:58:10 1995 Michael Meissner <meissner@wogglebug.tiac.net>
+
+ * configure.in (powerpc*): No longer need to define
+ NO_LONGLONG_POINTERS to supress warnings.
+
+Sat Oct 14 12:55:08 1995 Jim Wilson <wilson@chestnut.cygnus.com>
+
+ * libc/reent/reent.c (_reclaim_reent): Call cleanup indirectly
+ through PTR instead of directly.
+
+ * libc/sys/sh/crt0.S: Clean up formatting. Delete unused
+ non-standard constructor support.
+
+Thu Oct 12 11:39:42 1995 J.T. Conklin <jtc@rtl.cygnus.com>
+
+ * libc/stdlib/dtoa.c (_dtoa_r): Set result pointer to the
+ address of the Bigint instead of the address of its _x field,
+ as the size the result buffer was calculated accordingly.
+ Fix from Jim Wilson <wilson@chestnut@cygnus.com>.
+
+ * libc/stdlib/{div.c, ldiv.c}: Replaced with implementation
+ from NetBSD C library. No longer special cases division by
+ zero (which needs to be done by the application anyway), but
+ it doesn't need to call abs() (or labs()) four times either.
+
+ * libc/stdlib/qsort.c: Replaced with implementation from
+ NetBSD C library.
+
+Tue Oct 10 14:01:10 1995 J.T. Conklin <jtc@rtl.cygnus.com>
+
+ * libc/stdio/vfprintf.c: Replaced with implementation from
+ NetBSD C library (which is derived from the 4.4BSD C library).
+ * libc/stdio/cvt.c: Removed.
+ * libc/stdio/Makefile: Updated.
+
+Tue Oct 10 12:15:23 1995 steve chamberlain <sac@slash.cygnus.com>
+
+ * libc/sys/win32/syscalls.c (rename): New.
+ * libc/sys/win32/include/winkernel.h (MoveFileExA): New.
+
+Fri Oct 6 12:18:43 1995 Jim Wilson <wilson@chestnut.cygnus.com>
+
+ * libc/machine/sh/Makefile.in (setjmp.o): Depend on setjmp.S.
+ * libc/machine/sh/setjmp.S: Rename from setjmp.s.
+
+ * libc/sys/sh/Makefile.in (OFILES, all): Delete setjmp.o.
+ (setjmp.o): Delete rule to build setjmp.o.
+ * libc/sys/sh/setjmp.S: Delete file.
+
+Fri Oct 6 11:19:05 1995 J.T. Conklin <jtc@rtl.cygnus.com>
+
+ * libc/stdlib/mprec.c (d2b): Added support for _DOUBLE_IS_32BITS.
+ * libc/stdlib/mprec.h: Fixed constants used for IEEE single float
+ format. Added #defines to map d2b, i2b, low0bits, lshift, mult,
+ pow5mult and s2b to identifiers with leading underscores.
+ * libc/stdlib/Makefile.in: Add mprec.h as a dependency to dtoa.o,
+ ecvtbuf.o, mprec.o and strtod.o. Sort dependencies.
+
+Thu Oct 5 17:27:30 1995 steve chamberlain <sac@slash.cygnus.com>
+
+ * libc/sys/posix/popen.c (sys/types.h): Include.
+
+Thu Oct 5 16:33:01 1995 Doug Evans <dje@canuck.cygnus.com>
+
+ * libc/sys/win32/syscalls.h (fhandler): New struct.
+ (__lookup_fhandler, __lookup_fhandler_hook): Declare.
+ (__fhandler_normal): Declare.
+ (hinfo): New member op_handlers.
+ * libc/sys/win32/syscalls.c (__read): Don't validate fd.
+ (__write): Likewise.
+ (_read, _write, _open, _close, _lseek): Validate fd here.
+ Move file type specific stuff to foo_normal.
+ (read_normal, write_normal, open_normal, close_normal, lseek_normal):
+ New functions.
+ (__lookup_fhandler): New function.
+ (__lookup_fhandler_hook, __fhandler_normal): New variables.
+
+ From anders.blomdell@control.lth.se (Anders Blomdell)
+ * libc/sys/win32/crt0.c (vfork_init): Unset __FD_TABLE__.
+ Don't touch standard handles.
+ * libc/sys/win32/spawn.c (_spawn): Use STARTF_USESTDHANDLES.
+ (_execve): Only create __FD_TABLE__ if necessary.
+ * libc/sys/win32/include/winkernel.h (STARTF_*): Define.
+
+Thu Oct 5 14:25:14 1995 steve chamberlain <sac@slash.cygnus.com>
+
+ * libc/sys/win32/sys/termios.h (FLUSHO): New.
+ * libc/sys/win32/include/win*.h: Moved a load of prototypes around.
+ * libc/sys/win32/pipe.c (_fctnl): Ignore F_SETFL without errors.
+ * libc/sys/win32/exception.c (ehandler3): set strace when a signal
+ without a handler is received.
+ * libc/sys/win32/Makefile.in: Remove --nodelete.
+ * libc/sys/win32/resouce.c (gettimeofday): New.
+ * libc/sys/win32/syscalls.c (path_to_real_path): New.
+ * libc/sys/win32/syscalls.h (include/wincon.h): Don't include.
+
+Wed Oct 4 13:10:35 1995 Doug Evans <dje@canuck.cygnus.com>
+
+ * libc/sys/win32/dirsearch.c (opendir): stat real path name.
+ Don't append "/*" to search pattern if trailing '/' already there,
+ append "*".
+ * libc/sys/win32/spawn.c (_spawn): CreateProcess doesn't seem to
+ like /'s, convert them to \'s. Handle //<drive>/ path names.
+ Add space for quoted \'s in arg string. Print translated prog name
+ and original prog name.
+ (_execve): Handle parent doing exec a teensy bit better.
+ * libc/sys/win32/syscalls.h (__path_to_real_path): Update prototype.
+ * libc/sys/win32/syscalls.c (__path_to_real_path): Don't assume
+ path needs conversion, handle both cases. Delete `const' from result.
+ (hash_path_name): New function.
+ (_open): Call it.
+ (_stat): Likewise. Fill in more fields for directories.
+ * libc/sys/win32/wait.c (_wait): Explicitly pass -1 to waitpid.
+ (wait_for_any): Fix trace message.
+ (waitpid): Explicitly test for intpid == 0.
+
+ From anders.blomdell@control.lth.se (Anders Blomdell)
+ * libc/sys/win32/spawn.c (__vfork_get_empty_entry): zero fill result
+ so `next' is valid.
+
+Sat Sep 30 15:00:15 1995 Jason Molenda (crash@phyeaux.cygnus.com)
+
+ * libc/sys/win32/spawn.c (_spawn): Make quoting rules more
+ complicated.
+
+Sat Sep 30 10:25:57 1995 Jason Molenda (crash@phydeaux.cygnus.com)
+
+ * libc/include/_ansi.h: set _HAVE_STDC if __STDC__ is defined
+ at all, not just == 1.
+ * libm/math/wf_acos.c (acosf): check for _HAVE_STDC, not __STDC__.
+
+Sat Sep 30 04:30:09 1995 Jason Molenda (crash@phydeaux.cygnus.com)
+
+ * libc/sys/win32/include/winbase.h: include <wintypes.h> and <winnt.h>
+ * libc/sys/win32/include/wintypes.h: include <winnt.h>
+ * libc/sys/win32/include/winnt.h: avoid multiple inclusion of this
+ file.
+
+Fri Sep 29 01:49:17 1995 steve chamberlain <sac@slash.cygnus.com>
+
+ * libc/sys/syscalls.c (getcwd): Fix off by one error.
+
+ * libc/sys/signal.c (sleep): Fill it in.
+ * libc/sys/termios.c (tcflush): Use PurgeComm
+ (tcsetattr): Set some more of the bits.
+ * libc/sys/include/winkernel.h: Add PurgeComm and Sleep.
+
+Fri Sep 29 04:33:53 1995 Doug Evans <dje@deneb.cygnus.com>
+
+ * libc/sys/arm/crt0.S (fp): Initialize to 0.
+ Conditionally include .idata$3 stuff ifdef __pe__.
+
+Fri Sep 29 01:49:17 1995 steve chamberlain <sac@slash.cygnus.com>
+
+ * libc/sys/win32/crt0.c (hmap_init): Call __init_hinfo.
+ * libc/sys/win32/pipe.c (pipe): Ditto.
+ * libc/sys/win32/syscalls.c (__read): Use new vtime and vmin fields.
+ * libc/sys/win32/syscalls.h (hinfo): vtime, vmin are new.
+ * libc/sys/win32/termios.c (tcsetattr): Init new fields.
+ (tcgetattr): Contents are new.
+ * libc/sys/win32/include/winkernel.h (DCB): New.
+ (GetCommState, SetCommState): New.
+
+Thu Sep 28 16:29:09 1995 Doug Evans <dje@deneb.cygnus.com>
+
+ * libc/sys/arm/crt0.S (_start): Define.
+
+Thu Sep 28 12:26:45 1995 steve chamberlain <sac@slash.cygnus.com>
+
+ * libc/sys/arm/crt0.S: Move stack to top of RAM on PIE board.
+ * libc/sys/arm/syscalls.c (_read, _write): Use the SWI properly.
+
+ * libc/sys/win32/sysconf.c: New
+ * libc/sys/win32/sys/winadvapi.h: New
+ * libc/sys/win32/syscalls.h (hinfo): Added timeout_len, w_binary, r_binary.
+ * libc/sys/win32/crt0.c (hmap_init): Initialize new fields.
+ * libc/sys/win32/pipe.c (pipe): Ditto.
+ * libc/sys/win32/signal.c (_raise): New.
+ (_kill): Moved from spawn.c
+ * libc/sys/win32/spawn.c (kill): Moved to signal.c
+ * libc/sys/win32/syscalls.c (__read): Use new fields.
+ (_open): Ditto.
+ * libc/sys/win32/termios.c (tcflush, tcsetattr, tcgetattr): Fill in.
+ * libc/sys/win32/exceptions.c (__stack_trace): Keep going for longer.
+ * libc/include/sys/unistd.h (rmdir): Takes const path.
+ * libc/include/sys/stat.h (mkdir): Takes const path.
+ * libc/include/sys/signal.h (SIGTTOU, SIGTTIN): New for win32.
+
+Thu Sep 28 10:11:27 1995 Doug Evans <dje@canuck.cygnus.com>
+
+ * libc/sys/win32/spawn.c (_spawn): Fix quoting.
+
+ Add support for specifying paths as //<drive>/foo/bar.
+ * libc/sys/win32/syscalls.h (__path_needs_conversion_p): Declare.
+ (__path_to_real_path): Declare.
+ (PATH_TO_REAL_PATH): New macro.
+ * libc/sys/win32/syscalls.c (__win32_pid_to_posix_pid): Minor cleanup.
+ (__path_needs_conversion_p, __path_to_real_path): New functions.
+ (_open): Fix test for error return from CreateFileA.
+ Handle new path syntax.
+ (_link, mkdir, rmdir, getcwd, chdir, stat): Handle new path syntax.
+ * libc/sys/win32/dirsearch.c (opendir): Likewise.
+
+Wed Sep 27 16:36:46 1995 steve chamberlain <sac@slash.cygnus.com>
+
+ * libc/sys/win32/include/*.h: Reorganized
+ * libc/sys/win32/include/WINREADME: New.
+ * libc/sys/win32/Makefile.in (DLLS): Build version.a.
+ * libc/sys/win32/*.c: Fix for new include scheme.
+ * libc/sys/win32/crt0.c (__this_uinfo_buf, __this_uinfo): New.
+ * libc/sys/win32/getlogin.c (getlogin): Use uinfo.
+ * libc/sys/win32/passwd.c (*): Fix.
+ * libc/sys/win32/syscalls.c (get[e|][g|u]id): Use passwd info.
+ (_stat): Get directory owner and permissions right.
+ * libc/sys/win32/syscalls.h (uinfo): New.
+ * libc/sys/win32/version.def: Remove leading underscores.
+
+Tue Sep 26 18:18:47 1995 Jason Molenda (crash@phydeaux.cygnus.com)
+
+ * libc/sys/win32/key.c: include "include/wincon.h".
+
+Tue Sep 26 07:21:48 1995 steve chamberlain <sac@slash.cygnus.com>
+
+ * libc/sys/win32/{key, stubs}.c: New.
+ * libc/sys/win32/Makefile: Adjust to cope.
+ * libc/sys/win32/crt0.c (vfork_init_first): Cope with -ve pids.
+ (environ_init): Change env names to upper case.
+ * libc/sys/win32/dirsearch.c (readdir): Don't fill in inode number.
+ * libc/sys/win32/passwd.c (*): Fill in the functions.
+ * libc/sys/win32/pipe.c (_fcntl): F_GETFL returns O_RDWR.
+ * libc/sys/win32/spawn.c (_spawn): Cope with -ve pids.
+ * libc/sys/win32/syscalls.c (__win32_pid_to_posix_pid): New function.
+ (_open): Initialze hmap->execable_p too.
+ * libc/sys/win32/syscalls.c (getuid, getgid, geteuid, getegid): Return from macros.
+ (_fstat): Fill in permissions.
+ * libc/sys/win32/syscalls.h (hinfo): Add execable_p.
+
+Fri Sep 22 13:47:27 1995 Doug Evans <dje@canuck.cygnus.com>
+
+ * configure.in (cfg-ml-com.in invocation): Use ${with_multilib_top}
+ if defined.
+ (cfg-ml-pos.in invocation): Likewise.
+
+Fri Sep 22 11:43:44 1995 J.T. Conklin <jtc@rtl.cygnus.com>
+
+ * Makefile.in (MATHOBJS_IN_LIBC): Added s_isinf.o, sf_isinf.o,
+ s_isnan.o and sf_isnan.o.
+
+Wed Sep 20 14:50:19 1995 Ian Lance Taylor <ian@cygnus.com>
+
+ * All Makefile.in files: added maintainer-clean target as a
+ synonym for realclean.
+
+Wed Sep 20 11:02:50 1995 Jeff Law (law@snake.cs.utah.edu)
+
+ * libc/include/machine/setjmp.h: Add hppa support.
+ * libc/machine/hppa/setjmp.S: New file with setjmp/longjmp
+ support.
+ * libc/machine/hppa/Makefile.in: Related changes.
+
+Tue Sep 19 12:09:01 1995 J.T. Conklin <jtc@blues.cygnus.com>
+
+ * configure.in (machine_dir): Don't set for v810-*-*.
+
+Fri Sep 15 20:22:08 1995 Jason Molenda (crash@phydeaux.cygnus.com)
+
+ * libc/sys/win32/crt0.c (passover): Change to handle MKS quoting
+ conventions correctly.
+
+Thu Sep 14 13:37:22 1995 J.T. Conklin <jtc@blues.cygnus.com>
+
+ * libc/stdio/puts.c: Update documentation of return value to match
+ ANSI standard.
+
+Thu Sep 14 01:52:37 1995 Doug Evans <dje@canuck.cygnus.com>
+
+ Fix file descriptor inheritance.
+ * libc/sys/win32/syscalls.h (CHILD_P): Define again.
+ (NOT_OPEN_FD): Fix.
+ * libc/sys/win32/spawn.c (vfork0): Only create inheritable handle if
+ close-on-exec flag not set. Initialize child's entire fd table.
+ * libc/sys/win32/syscalls.c (_open): Only create inheritable handle if
+ CHILD_P.
+ * libc/sys/win32/pipe.c (pipe): Only create new handle as inheritable
+ if CHILD_P. Initialize entire hmap entry.
+ (dup): Only create new handle as inheritable if CHILD_P.
+ (dup2): Likewise. Properly initialize hmap entry.
+
+ * libc/sys/win32/spawn.c (_execve): Don't pass _P_SEARCH_PATH to
+ _spawn.
+ (_exit): Use CHILD_P.
+ * libc/sys/win32/syscalls.c (_fstat): Fix call to memset.
+ (_stat): Likewise.
+
+Mon Sep 11 23:09:39 1995 Jason Molenda (crash@phydeaux.cygnus.com)
+
+ * libc/sys/win32/crt0.c (passover): fix up the state table.
+ * libc/posix/popen.c: Added.
+ * libc/posix/Makefile.in: compile popen.c.
+
+Mon Sep 11 11:43:38 1995 J.T. Conklin <jtc@cygnus.com>
+
+ * libc/include/machine/ieeefp.h: On the h8/300, h8/300h and
+ h8/500 define _DOUBLE_IS_32BITS.
+
+Sat Sep 9 17:55:54 1995 Doug Evans <dje@canuck.cygnus.com>
+
+ Get vfork/exec/spawn/cwait/wait working again.
+ * libc/sys/win32/syscalls.h (VFORK_NEWBORN_PSEUDO_PID): Define.
+ (procinfo): New member vfork_level.
+ * libc/sys/win32/crt0.c (__vfork_next_pid): Delete.
+ (vfork_init_first): Use GetCurrentProcessId to get pid.
+ Initialize vfork_level.
+ (vfork_init): Delete __PID__.
+ (environ_init): New function. Undo patch of Aug 19, Posix says
+ environment variables are case sensitive.
+ (mainCRTStartup): Call it.
+ * libc/sys/win32/spawn.c (__vfork_next_pid): Delete.
+ (my_longjump: Make static.
+ (_spawn): New argument `h'. Delete setting of __PID__.
+ Delete local `idx'. Look for chars that need quotes, rather than
+ ones that don't. Set handle of created process in `h'.
+ Result is process id if created task.
+ (allocate_spawn_entry): New function.
+ (spawnvp, spawnv): Call it. Store handle and pid in procinfo entry.
+ (_execve): Set __FD_TABLE__ before spawning child.
+ Scan our fd table when passing fds, not our parent's.
+ Store handle and pid in procinfo entry.
+ (vfork0): Ensure strace message always printed.
+ Set child pid to VFORK_NEWBORN_PSEUDO_PID.
+ (vfork): Don't clobber result of vfork0.
+ * libc/sys/win32/wait.c (cwait): Fix non-error result (is pid).
+ (wait_for_any): Ignore processes in state FORK_STATE_VFORK_0.
+
+ * libc/sys/win32/syscalls.h (procinfo): New members `handle_valid_p'
+ and `exit_code'.
+ * libc/sys/win32/spawn.c (allocate_spawn_entry): Initialize them.
+ (vfork0): Likewise. Distinguish children, grandchildren, etc. by
+ adding vfork level to pseudo-pid.
+ (vfork1): If not root, set state back to FORK_STATE_VFORK_0.
+ (spawnvp, spawnv, _execve): Set handle_valid_p if success.
+ (_exit): If child, set exit code.
+ (__vfork_record_death): Only close process handle if valid.
+ * libc/sys/win32/wait.c (wait_for_single): Watch for children that
+ didn't exec.
+ (wait_for_any): Likewise. Start scan after root entry.
+
+Fri Sep 8 18:48:02 1995 Jason Molenda (crash@phydeaux.cygnus.com)
+
+ * libc/include/sys/types.h (off_t): off_t back to 32 bits.
+ * libc/include/sys/_types.h (_off_t): _off_t back to 32 bits.
+ * libc/sys/win32/syscalls.c (_fstat): st_size is lower 32-bits
+ of actual file length.
+
+ * libc/sys/win32/sys/wait.h: include <sys/types.h>.
+ * libc/include/paths.h: _PATH_BSHELL added.
+ * libc/include/sys/unistd.h: define STDIN_FILENO, STDOUT_FILENO,
+ and STDERR_FILENO.
+
+Thu Sep 7 21:02:22 1995 Jason Molenda (crash@phydeaux.cygnus.com)
+
+ * libc/include/ar.h: Added.
+ * libc/include/sys/types.h: ino_t goes back to 32-bits.
+ * libc/sys/win32/syscalls.h (hinfo): added .namehash field.
+ * libc/sys/win32/syscalls.c (_open): compute .namehash based
+ on filename.
+ (_fstat): use .namehash for inode number of the fd.
+
+Thu Sep 7 12:57:19 1995 steve chamberlain <sac@slash.cygnus.com>
+
+ * libc/sys/win32/{console,ioctl,pipe,spawn,syscalls,wait}.? (*):
+ Change hinfo to __this_procinfo.
+ * libc/sys/win32/crt0.c: Remove procinfo_list.
+
+Wed Sep 6 18:38:26 1995 Jason Molenda (crash@phydeaux.cygnus.com)
+
+ * libc/include/sys/types.h (ino_t): Define ino_t correctly for
+ win32 environment.
+
+Wed Sep 6 18:09:29 1995 Jason Molenda (crash@phydeaux.cygnus.com)
+
+ * libc/sys/win32/include/grp.h: Removed.
+ * libc/sys/include/grp.h: Added.
+ * libc/sys/win32/grp.c: Include <grp.h>.
+
+Wed Sep 6 16:52:48 1995 steve chamberlain <sac@slash.cygnus.com>
+
+ * libc/include/sys/signal.h (__need_MAX_SIGNALS): Removed.
+ (sigset_t, sigaction, SIG_SETMASK, SIG_BLOCK, SIG_UNBLOCK):
+ Defined for all but strict ANSI.
+ * libc/include/sys/reent.h (__need_MAX_SIGNALS): Removed.
+ * libc/include/machine/setjmp.h: Get win32 _JBLEN right.
+ * libc/signal/signal.c (_signal_r): Changed from using
+ _MAX_SIGNALS to NSIG.
+ * libc/sys/win32/crt0.c (__current_pid, __parent_hmap, __child_hmap,
+ __hmap): Deleted.
+ (__strace, __vfork_next_pid): New.
+ (__exe_suffix): Default to 1.
+ (passover, table): Understand quoted arguments.
+ (vfork_init_first): New.
+ (vfork_init): Initialize new process structure.
+ (mainCRTStartup): Pass environ to main.
+ * exceptions.c (__sig_mask): New
+ (ehandler3): Ignore signals in mask.
+ (really_exit): Remove CHILD_P test.
+ * pipe.c (pipe, dup, dup2): Use new process and file structure.
+ * resource.c (getrusage): Ditto.
+ * signal.c (sigprocmask): New.
+ * spawn.c (*): Rewritten.
+ * syscalls.c (*): Use new process and file structure.
+ (find_unused_handle): New.
+ * syscalls.h (MAX_HANDLES): Deleted.
+ (hinfo): Removed child_created_p.
+ (MAX_CHILDREN): Deleted.
+ (vfork_jmp_info, procinfo): New.
+ * wait.c (*): Mostly new.
+ * sys/strace.h (_STRACE_PARANOID): New.
+ * sys/param.h: New file.
+
+Wed Sep 6 17:03:53 1995 Jason Molenda (crash@phydeaux.cygnus.com)
+
+ * libc/include/sys/stat.h: add S_BLKSIZE.
+ * libc/include/sys/_types.h: _off_t is a 64-bit type under win32.
+ * libc/include/sys/types.h: define off_t and ino_t to be 64 bit
+ types under win32.
+ (mode_t): add a #else to avoid multiple definitons.
+
+ * libc/sys/win32/Makefile.in: add grp.c.
+ * libc/sys/win32/grp.c: include grp.h correctly.
+ * libc/sys/win32/syscalls.c (_fstat): set almost all of the fields
+ of the st structure with real information.
+ * libc/sys/win32 (dirent): d_ino is of type ino_t.
+
+Wed Sep 6 10:41:34 1995 Doug Evans <dje@canuck.cygnus.com>
+
+ * libc/include/sys/types.h (mode_t): Correct for svr4 sparc's
+ and (maybe) sparc64.
+ (nlink_t): Provide typedef.
+
+Tue Sep 5 18:46:05 1995 Jason Molenda (crash@phydeaux.cygnus.com)
+
+ * libc/sys/win32/grp.c: New file.
+ * libc/sys/win32/include/grp.h: New file.
+
+Tue Sep 5 13:47:27 1995 J.T. Conklin <jtc@rtl.cygnus.com>
+
+ * libc/include/machine/ieeefp.h: Added whitespace to make this
+ file easier to maintain.
+ On the sh, define either __IEEE_BIG_ENDIAN or __IEEE_LITTLE_ENDIAN
+ depending on the value of __LITTLE_ENDIAN__.
+ On the sh3e, define _DOUBLE_IS_32BITS.
+
+Fri Sep 1 15:35:18 1995 James G. Smith <jsmith@beauty.cygnus.com>
+
+ * libc/sys/vr4300/syscalls.c: Added missing support
+ routines. _raise() and getpid().
+
+Fri Sep 1 14:12:48 1995 James G. Smith <jsmith@rtl.cygnus.com>
+
+ * configure.in (mips*vr4300*-*-elf): Fixed silly mistake
+
+Fri Sep 1 08:42:11 1995 James G. Smith <jsmith@beauty.cygnus.com>
+
+ * configure.in (mips*vr4300*-idt-*) Add support for RISQ monitor
+ and VR4300 processor.
+ * libc/sys/vr4300: Add directory.
+ * libc/sys/vr4300/{Makefile.in, crt0.S, syscalls.c}: Add SIM
+ monitor run-time support.
+
+Thu Aug 31 09:16:52 1995 J.T. Conklin <jtc@rtl.cygnus.com>
+
+ * libc/stdlib/Makefile.in (CHEWOUT_FILES): Removed atol.def.
+ * libc/stdlib/stdlib.tex: Don't include atol.def.
+
+Wed Aug 30 20:38:28 1995 Jason Molenda (crash@phydeaux.cygnus.com)
+
+ * libc/sys/win32/uname.c (uname): hardcode processor as `i386'.
+
+Wed Aug 30 10:48:08 1995 steve chamberlain <sac@slash.cygnus.com>
+
+ * libc/ctype/Makefile.in: Fill in _to* dependencies.
+
+Tue Aug 29 17:14:29 1995 steve chamberlain <sac@slash.cygnus.com>
+
+ * libc/sys/win32/{dirsearch.c,sys/dirent.h}: Fix namespace problems.
+ * libc/sys/win32/sys/dirent.h (struct dirent): Added d_ino.
+ * libc/sys/win32/strace.c (__sys_printf): Increase size of buffer.
+ * libc/sys/win32/smallprint.c (__small_vsprintf): Remove debug.
+ * libc/sys/win32/dirsearch.c (readdir): Set d_ino.
+
+Tue Aug 29 19:00:09 1995 Jason Molenda (crash@phydeaux.cygnus.com)
+
+ * libc/stdlib/atol.c (atol): DEFUN -> _DEFUN.
+
+Tue Aug 29 16:08:09 1995 J.T. Conklin <jtc@rtl.cygnus.com>
+
+ * libc/stdlib/Makefile.in (OFILES): Added atoff.o and atol.o.
+ * libc/stdlib/atoff.c: New file.
+ * libc/stdlib/atof.c (atoff): Moved to atoff.c.
+ * libc/stdlib/atoi.c (atol): Removed.
+ * libc/stdlib/atol.c: Removed duplicate documentation.
+
+ * libc/include/ctype.h (_tolower, _toupper): Moved inside
+ #ifndef _STRICT_ANSI conditional.
+ * libc/ctype/Makefile.in (OFILES): Added _tolower.o and _toupper.o
+ * libc/ctype/_tolower.c: New file.
+ * libc/ctype/_toupper.c: New file.
+ * libc/ctype/tolower.c (_tolower): Moved to _tolower.c.
+ * libc/ctype/toupper.c (_toupper): Moved to _toupper.c.
+ * libc/ctype/toascii.c (_toascii): Removed.
+
+Tue Aug 29 12:17:32 1995 Doug Evans <dje@canuck.cygnus.com>
+
+ * libc/sys/sparc64/sys/types.h: Deleted.
+
+Mon Aug 28 22:06:08 1995 Jason Molenda (crash@phydeaux.cygnus.com)
+
+ * libc/sys/win32/uname.c (uname): change `Windows/NT' to `Windows_NT'
+ and recognize Windows_95 systems.
+
+Mon Aug 28 19:50:54 1995 Jason Molenda (crash@phydeaux.cygnus.com)
+
+ * libc/sys/win32/crt0.c (vfork_init, hmap_init): standard I/O fds
+ and passed fds should be opened in text mode.
+
+Mon Aug 28 18:51:22 1995 Jason Molenda (crash@phydeaux.cygnus.com)
+
+ * libc/sys/win32/crt0.c (vfork_init): mark passed fds as used
+ in __hmap, set to binary mode by default.
+
+Tue Aug 22 14:12:37 1995 J.T. Conklin <jtc@rtl.cygnus.com>
+
+ * libc/sys/sh/syscalls.c: Updated all functions to call __trap34.
+ * libc/sys/sh/trap.S (__trap34): Renamed from __trap3. Use trap
+ vector 34.
+
+Sat Aug 19 18:25:37 1995 steve chamberlain <sac@slash.cygnus.com>
+
+ * Makefile.in (install): Install all libraries found in the
+ top level. If there's a sys/<type>/include directory,
+ install those headers into include.
+
+ * libc/sys/win32/kernel.def351: Delete
+ * libc/sys/win32/{comctl32.def, comdlg32.def, ctl3d32.def,
+ glaux.def, glu32.def, largeint.def, libc.def, libcmt.def,
+ lz32.def, mgmtapi.def, mpr.def, msacm32.def, msvcrt.def,
+ nddeapi.def, netapi32.def, odbc32.def, odbccp32.def, oldnames.def,
+ ole32.def, oleaut32.def, opengl32.def, rasapi32.def, rpcndr.def,
+ rpcns4.def, rpcrt4.def, scrnsave.def, shell32.def, snmp.def,
+ uuid.def, vdmdbg.def, version.def, vfw32.def, win32spl.def,
+ winmm.def, winspool.def, winstrm.def, wsock32.def}: New.
+
+ * libc/sys/win32/Makefile.in: Update for new files and new dlltool options.
+ * libc/sys/win32/crt0.c: Force all env names to upper case.
+ * libc/sys/win32/sys/win*.h -> libc/sys/win32/include
+ * libc/sys/win32/*.c: Headers have moved.
+ * libs/sys/win32/*.[ch]: Test for open_p rather than BAD_HANDLE,
+ __vfork_child_idx is now __vfork_child_ptr.
+
+ * posix/execvp (execvp): Don't crash if no PATH envname.
+
+Fri Aug 18 12:22:59 1995 J.T. Conklin <jtc@rtl.cygnus.com>
+
+ * libc/include/sys/reent.h (_Bigint): Removed _reclaim field.
+ * libc/reent/reent.c (_reclaim_reent): Free Bigint's by going
+ through the _freelist instead of through the _reclaim list.
+ * libc/stdlib/mprec.c (_Balloc): Don't put new node on _reclaim list.
+ * libc/stdlib/mprec.c (_Bcopy): Make like version in master dtoa.c
+ sources.
+
+Thu Aug 17 11:03:27 1995 J.T. Conklin <jtc@rtl.cygnus.com>
+
+ * libc/machine/h8500/setjmp.S: New file.
+ * libc/include/machine/setjmp.h: Updated for H8/500.
+
+Wed Aug 16 16:19:11 1995 steve chamberlain <sac@slash.cygnus.com>
+
+ * libc/sys/win32/syscalls.c (_open): More stracing.
+ (_stat): Open the file in O_BINARY.
+
+Wed Aug 16 15:49:01 1995 J.T. Conklin <jtc@rtl.cygnus.com>
+
+ * libc/machine/h8300/setjmp.S: New file.
+ * libc/include/machine/setjmp.h: Updated for H8/300 and H8/300H.
+
+Tue Aug 15 10:31:09 1995 Doug Evans <dje@canuck.cygnus.com>
+
+ * libc/sys/win32/crt0.c (__exe_suffix): New global.
+ (mainCRTStartup): Set __exe_suffix from LIBC_EXE_SUFFIX.
+ * libc/sys/win32/spawn.c (_spawn): Add .exe suffix based on
+ __exe_suffix. Free fd_tab after setting env variable.
+ (spawnv,_execve): Update.
+ * libc/sys/win32/syscalls.h (__exe_suffix): Declare.
+ * libc/sys/win32/smallprint.c (puts,putn): New (static) functions.
+ (__small_vfprintf): New function.
+ * libc/sys/win32/strace.c (__sys_printf): Call __small_vfprintf.
+ * libc/sys/win32/wait.c (cwait): Validate argument.
+
+ * libc/sys/win32/syscalls.c (queue_file_deletion): Add trace message.
+ (process_deletion_queue): Likewise.
+
+ * libc/sys/win32/Makefile.in (lib.a): Don't call $(RANLIB).
+
+Mon Aug 14 10:14:10 1995 steve chamberlain <sac@slash.cygnus.com>
+
+ * libc/sys/win32: Copyrights and gratuitous indenting.
+
+Mon Aug 14 01:32:58 1995 Doug Evans <dje@canuck.cygnus.com>
+
+ * libc/sys/win32/syscalls.c (queue_file_deletion): Finish.
+ (process_deletion_queue): Likewise.
+ (__close_all_files): New function.
+ (_close): Only queue file deletion if really a file.
+ * libc/sys/win32/spawn.c (_spawn): Only ensure .exe suffix if
+ _P_APPEND_EXE.
+ (_exit): Call __close_all_files.
+
+ * libc/stdlib/system.c: #include <errno.h>.
+ (_system_r): Fix results in -DNO_EXEC case.
+
+ * libc/sys/win32/sys/dirent.h (DIR): New member __d_dirname.
+ Reorganize structure.
+ * libc/sys/win32/dirsearch.c (opendir): Use stat to determine
+ if argument is valid. Save directory name in DIR. malloc space
+ for dirent struct separately.
+ * libc/sys/win32/syscalls.c (stat): Fix test for directory.
+
+ * libc/include/errno.h (ENAMETOOLONG): Define.
+ * libc/string/strerror.c (strerror): Reword ENFILE.
+ Add ENOSYS, ENMFILE, ENOTEMPTY, ENAMETOOLONG.
+
+Sun Aug 13 22:42:25 1995 Doug Evans <dje@canuck.cygnus.com>
+
+ * libc/sys/win32/crt0.c (__progname): New global.
+ (mainCRTStartup): Support strace=bitmask,filename.
+ * libc/sys/win32/dirsearch.c (all fns): Add trace messages.
+ * libc/sys/win32/syscalls.c (_write): Print parent trace message
+ if error.
+ (getcwd): Handle len too small. Convert '\\' to '/'.
+ * libc/sys/win32/sys/fcntl.h (O_RDWR): = O_RDONLY|O_WRONLY.
+ Add prototypes for open, creat, fcntl.
+ (O_APPEND): Change value to conform to Microsoft's value.
+ * libc/sys/win32/sys/strace.h (_STRACE): Protect in do/while.
+
+ * libc/stdlib/getopt.c: New file.
+ * libc/stdlib/Makefile.in: Build it.
+
+Sat Aug 12 12:17:14 1995 Doug Evans <dje@canuck.cygnus.com>
+
+ * libc/posix/execvp.c (execvp): Watch for DOS drives ifdef _WIN32.
+ Fix scanning of $PATH.
+ * libc/posix/exec*.c: Call _execve, not execve.
+ * libc/posix/execve.c: New file.
+ * libc/posix/Makefile.in (OFILES): Add execve.o.
+
+ * libc/sys/win32/sys/strace.h (_STRACE_ALL, _STRACE_UHOH,
+ _STRACE_STARTUP, _STRACE_SYSCALL): More bit masks of things to trace.
+ (_STRACE): If level==0, always print. Handle new bit mask scheme.
+ * libc/sys/win32/crt0.c: Update _STRACE calls.
+ * libc/sys/win32/{pipe.c,resource.c,spawn.c,syscalls.c,wait.c}: Ditto.
+
+ * libc/sys/win32/smallprint.c (rn): Fix digit list.
+
+ * libc/sys/win32/syscalls.c (__really_exit): Move from here,
+ * libc/sys/win32/exceptions.c (really_exit): to here. Avoid recursion.
+ * libc/sys/win32/spawn.c (spawnvp): Pass `prog' as image name.
+ Print __seterrno trace message first.
+ (_execve): Renamed from execve.
+ (vfork): Update __strace usage.
+ (__vfork_child_pid): Deleted.
+ (__vfork_children, __vfork_child_idx): New globals.
+ (_spawnvp): New function.
+ (spawnvp, spawnv, _execve): Call _spawnvp.
+ (init_child): Record child in __vfork_children.
+ (__vfork_get_entry, __vfork_record_death): New functions.
+ * libc/sys/win32/crt0.c (mainCRTStartup): Initialize __vfork_children.
+ * libc/sys/win32/kernel32.def (WaitForMultipleObjects): Define.
+ * libc/sys/win32/syscalls.h (CHILD_P): New macro. All files updated.
+ (MAX_CHILDREN, CHILD_INTERIM_PID): Define.
+ (children): New typedef.
+ (__vfork_children,__vfork_child_idx): Declare.
+ (__vfork_get_entry,__vfork_record_death): Declare.
+ * libc/sys/win32/wait.c (wait_for_single,wait_for_any): New functions.
+ (waitpid): Handle pid == -1.
+ * libc/sys/win32/sys/wintypes.h (WaitForMultipleObjects): Declare.
+ * configure.in (i386-win32): Add -DNO_FORK.
+ * libc/syscalls/sysfork.c (fork): Don't define for NO_FORK.
+ * libc/reent/execr.c (_fork_r): Likewise.
+ * libc/stdlib/system.c (do_system): New function.
+ If WIN32, try to get shell path from $SH_PATH, use vfork.
+ (_system_r): Return 1 for (s == NULL) if WIN32 or unix,
+ otherwise return 0.
+
+Sat Aug 12 11:08:00 1995 steve chamberlain <sac@slash.cygnus.com>
+
+ * libc/stdlib/{mallocr.c, mstats.c}: Move mstats from mallocr to mstats.c.
+ * libc/sys/win32/fcntl.h: Don't include self.
+ * libc/sys/win32/sys/strace.h (_STRACE_WM, _strace_wm): New.
+ * libc/sys/win32/sys/winbase.h: (GetUserName) New.
+ * libc/sys/win32/sys/wincon.h (HANDLER_ROUTINE): Define correctly.
+ * libc/sys/win32/sys/wintypes.h (GetFileType, GetCurrentProcess, CloseHandle,
+ SetFilePointer, CreateFileA, GetFileInformationByHandle, GetStdHandle):
+ Correct prototypes.
+ * libc/sys/win32/strace.c: New file.
+ * libc/sys/win32/smallprint.c: New file.
+ * libc/sys/win32/crt0.c (func): Delete.
+ (mainCRTStartup): Fix alloca usage. Set handles explictly.
+ * libc/sys/win32/dirsearch.c: Clean up handle usage, fix calls to __seterrno.
+ * libc/sys/win32/exceptions.c: Lint.
+ * libc/sys/win32/{ioctl.c, pipe.c, resource.c, spawn.c, cwait.c, syscalls.c}:
+ Clean up handle usage.
+ * libc/sys/win32/syscalls.c (__sys_printf): Moved into strace.c
+ (open.c): Default file type is text.
+ * libc/sys/win32/uname.c (uname): Use __small_sprintf.
+ * libc/sys/win32/advapi32.def: New
+
+Fri Aug 11 17:11:52 1995 Doug Evans <dje@canuck.cygnus.com>
+
+ * configure.in (posix_dir, libc_posix_lib): New variables.
+ Define LIBC_POSIX_LIB in makefile to be $libc_posix_lib.
+ (i[345]86-*-win32): Define posix_dir.
+ Delete -DNO_EXEC. Define -DHAVE_OPENDIR.
+ (if unix_dir): Fix typo.
+ * libc/posix/{Makefile.in,closedir,opendir,readdir,rewinddir,
+ scandir,seekdir,telldir}: New files.
+ * libc/posix/{execl.c,execle.c,execlp.c,execv.c,execvp.c}: Move here
+ from libc/unix.
+ * libc/Makefile.in (LIBC_POSIX_LIB): Define.
+ (SUBDIRS): Add posix.
+ (SUBLIBS): Add $(LIBC_POSIX_LIB).
+
+ * libc/include/sys/signal.h (SIGCHLD): Add for _WIN32.
+ (NSIG): Increase to 21.
+ * libc/include/sys/unistd.h (pid_t): Move from here,
+ * libc/include/sys/types.h (pid_t): to here.
+
+ * libc/sys/win32/syscalls.h: #include "sys/strace.h".
+ (__ptrace): Delete.
+ (hinfo): New members close_exec_p, child_created_p.
+ (struct exception_list): Define.
+ (__hmap): Redefine as pointer to table.
+ (__parent_hmap, __child_hmap): New globals.
+ (__set_errno, __really_exit): Declare.
+ (__vfork_child_pid): Declare.
+ * libc/sys/win32/crt0.c (__strace, __trace_file): New global.
+ (__orig_stdin, __orig_stdout, __orig_stderr): New globals.
+ (__parent_hmap, __child_hmap): New globals.
+ (__hmap): Redefine as pointer to active map.
+ (__get_console): New function.
+ (mainCRTStartup): Change leading '=' in environ vars to '!'.
+ (env __FD_TABLE__): Watch for this and initialize our fd/handle
+ mapping table from it if defined.
+ (argv, envp): Dump if __strace >= 4.
+ (main): Call here.
+ * libc/sys/win32/exceptions.c (myp): Redefine.
+ (__syscalls_b): Delete.
+ (__stack_trace): New function.
+ (ehandler3): Update to use _STRACE. Print stack trace.
+ Call __really_exit instead of exit.
+ (init_exceptions): Delete args argc,argv. New arg mine.
+ * libc/sys/win32/kernel32.def (CreatePipe, DuplicateHandle, FindClose,
+ FindFirstFileA, FindNextFileA, GetComputerNameA,
+ GetEnvironmentVariableA, ReadFile, SetEnvironmentVariableA): Define.
+ * libc/sys/win32/signal.c (signal): Validate arg.
+ (alarm, sleep): Define as stubs for now.
+ * libc/sys/win32/syscalls.c (all fns): Update to use _STRACE.
+ (__syscalls_b, errno): Delete.
+ (__vfork_child_pid, __vfork_jmp_buf): New globals.
+ (__seterrno): Handle more errors.
+ (__sys_printf): Renamed from _ptrace.
+ (__really_exit): New function.
+ (queue_file_deletion, process_deletion_queue): New functions.
+ (__resume_parent): New function.
+ (_unlink): Handle trying to delete open file.
+ (__totime_t): Renamed from totime_t.
+ (setsid, __read, __write): New functions.
+ (cwait, spawnvp, R, D, getrusage, _execve, _fork, _wait): Delete.
+ * libc/sys/win32/{dirsearch.c,getlogin.c,misc.c,resource.c,passwd.c,
+ times.c,spawn.c,pipe.c,wait.c,termios.c,ioctl.c,uname.c}: New files.
+ * libc/sys/win32/console.c: Update to new definition of __hmap.
+ * libc/sys/win32/Makefile.in: Build new files.
+ * libc/sys/win32/sys/{dirent.h,winerror.h,wait.h,termios.h}: New files.
+ * libc/sys/win32/sys/{ioctl.h,utsname.h}: New files.
+ * libc/sys/win32/sys/strace.h: Renamed from ptrace.h.
+ * libc/sys/win32/sys/wintypes.h (GetCurrentDirectoryA): Fix prototype.
+
+Thu Aug 10 16:32:52 1995 Doug Evans <dje@canuck.cygnus.com>
+
+ * libc/sys/h8500hms/misc.c (kill): Handle SIGABRT.
+
+Thu Aug 10 12:07:38 1995 J.T. Conklin <jtc@rtl.cygnus.com>
+
+ * libc/stdlib/{dtoa.c, strtod.c}: Merged assorted changes that
+ have been made to the master dtoa.c sources (from netlib.att.com)
+ since they were integrated into newlib in early 1992. Fixes
+ problems with storage leaks and handling of numbers with very
+ negative exponents.
+
+Wed Aug 9 14:18:39 1995 J.T. Conklin <jtc@rtl.cygnus.com>
+
+ * Makefile.in (all): set rootpre and srcrootpre before calling
+ sub-makes.
+
+Tue Aug 8 17:20:45 1995 steve chamberlain <sac@slash.cygnus.com>
+
+ * libc/sys/win32/crt0.c: Change __hmap usage.
+ * libc/sys/win32/exceptions.c: Use _ptrace call.
+ * libc/sys/win32/syscalls.c: Use _ptrace call.
+ (read, write): Cope with DOS style CRLF when in TEXT mode.
+ * libc/sys/win32/syscalls.h: Declare hinfo struct.
+ * libc/sys/win32/user32.def: Get DefWindowProc arg list right.
+ * libc/sys/win32/sys/fcntl.h, ptrace.h: New.
+ * libc/sys/win32/sys/windows.h: Fill in rest of messages.
+ * libc/sys/win32/sys/wintypes.h: Fix attribute syntax.
+
+Mon Aug 7 13:04:54 1995 J.T. Conklin <jtc@rtl.cygnus.com>
+
+ * libc/include/math.h (cabs, cabsf, drem, dremf): New declarations.
+
+ * libm/math/{w_cabs.c, wf_cabs.c, w_drem.c, wf_drem.c}: New files,
+ wrappers for hypot() and remainder() for BSD libm compatibility.
+ These are public domain implementations written by me for the
+ NetBSD libm some time ago. Note cabs() is required by ucbtest.
+ * libm/math/Makefile.in (obj): Added w_cabs.o and w_drem.o.
+ (fobj): Added wf_cabs.o and wf_drem.o.
+
+Thu Aug 3 08:13:05 1995 J.T. Conklin <jtc@rtl.cygnus.com>
+
+ * libc/sys/h8500hms/misc.c: New file.
+ * libc/sys/h8500hms/Makefile.in (OFILES): Add misc.o.
+
+Wed Aug 2 16:46:27 1995 J.T. Conklin <jtc@rtl.cygnus.com>
+
+ * libc/time/localtime.c (localtime): Fix problem with leap year
+ handling. Stole algorithm from Arthur David Olson's tz code.
+
+Mon Jul 31 10:21:54 1995 steve chamberlain <sac@slash.cygnus.com>
+
+ * configure.in: (z8k-*sim): Renamed z8k-*-coff.
+
+ * libc/sys/z8ksim/glue.c (_getpid, _kill): New
+ (_exit): Use argument.
+
+Fri Jul 28 15:17:04 1995 Doug Evans <dje@canuck.cygnus.com>
+
+ * libc/sys/win32/sys/winbase.h (_WINBASE_H): Define.
+
+Wed Jul 26 16:24:19 1995 steve chamberlain <sac@slash.cygnus.com>
+
+ * libc/sys/sh/trap.S (perrno): Align correctly. (pr 7532)
+
+Mon Jul 24 13:42:52 1995 J.T. Conklin <jtc@rtl.cygnus.com>
+
+ * configure.in (sparc*): Add -DMALLOC_ALIGNMENT=8 to
+ target_cflags.
+
+Mon Jul 24 11:42:07 1995 steve chamberlain <sac@slash.cygnus.com>
+
+ * libc/sys/win32/crt0.c (mainCRTStartup): Look for
+ ptrace with case insensitivity
+ * libc/sys/win32/{user32.def, gdi32.def, exceptions.c, screen.c,
+ sys/winbase.h, sys/windows.h, sys/wintypes.h, sys/winuser.h}:
+ New files.
+
+Fri Jul 21 11:22:26 1995 Doug Evans <dje@canuck.cygnus.com>
+
+ * Makefile.in: Multilib support moved to ../cfg-ml-{com,pos}.in.
+ (MULTITOP, MULTIDIRS, MULTISUBDIR, MULTIDO, MULTICLEAN): New variables.
+ (all, install, *clean): Use new multilib support.
+ * configure.in: Multilib support moved to ../cfg-ml-{com,pos}.in.
+
+Fri Jul 21 07:11:42 1995 steve chamberlain <sac@slash.cygnus.com>
+
+ * libc/include/sys/signal.h (__WIN32__): New.
+
+ * configure.in (i386-*-win32): Remobe SBRK_IS_ALLOC.
+
+ * libc/stdlib/mprec.c (Balloc): Fix trampling problem.
+ (ulp, b2d): Handle 32 bit doubles.
+ * libc/stdlib/mprec.h: Handle 32 bit doubles.
+ * libc/stdlib/strtod.c (_strtod_r): Ditto.
+
+Fri Jul 14 08:24:58 1995 steve chamberlain <sac@slash.cygnus.com>
+
+ from medp@primag.co.uk:
+ * libc/stdio/setvbuf.c (setvbuf): Fix line buffering on
+ dynamically allocated buffers.
+
+Thu Jul 20 10:11:03 1995 Fred Fish <fnf@fishbowl>
+
+ * libc/include/sys/unistd.h (_exit): Add _ATTRIBUTE ((noreturn)).
+ * libc/stdlib/exit.c (unistd.h): Include to pick up _exit() declaration.
+
+Thu Jul 20 10:16:25 1995 Michael Meissner <meissner@tiktok.cygnus.com>
+
+ * configure.in (powerpc): Fix previous fix.
+
+Wed Jul 19 14:08:55 1995 Michael Meissner <meissner@tiktok.cygnus.com>
+
+ * configure.in (powerpc-*eabiaix*): Update PowerPC multilib
+ directories for this target.
+
+Wed Jul 19 00:34:30 1995 Jeffrey A. Law <law@rtl.cygnus.com>
+
+ * configure.in (hppa): Add machine_dir definition.
+ * libc/machine/hppa: New directory with PA specific implementations
+ of the basic memory/string functions.
+
+Tue Jul 18 21:16:00 1995 Michael Meissner <meissner@tiktok.cygnus.com>
+
+ * configure.in: Update current PowerPC multilib directories.
+ Split big and little endian configurations.
+
+Tue Jul 18 11:55:33 1995 Ian Lance Taylor <ian@cygnus.com>
+
+ * configure.in: Add --enable-single-float option to configure to
+ control use of MIPS single-float directories. Default to yes.
+
+ * Makefile.in (all): Don't recurse into multilib directory if it
+ does not exist.
+
+Mon Jul 17 15:51:30 1995 J.T. Conklin <jtc@rtl.cygnus.com>
+
+ * libc/sys/sh/syscalls.c: Fix typo.
+
+Mon Jul 3 14:38:52 1995 Steve Chamberlain <sac@slash.cygnus.com>
+
+ * Makefile.in, libc/Makefile.in, libc/sys/Makefile.in:
+ Pass down DLLTOOL.
+ * libc/include/process.h: Define WAIT_CHILD.
+ * libc/include/types.h: Get sizes right for win32.
+ * configure.in (i386-*-pe): Becomes i386-win32.
+ * libc/sys/win32/{crt0.c, kernel32.def, longjmp.c, setjmp.c, syscalls.c
+ wintypes.h,sys/file.h,sys/resource.h}: Second pass.
+ * libc/stdlib/mallocr.c: Don't round up memory block if SBRK_IS_ALLOC
+ is defined.
+
+Wed Jun 28 18:34:54 1995 Steve Chamberlain <sac@slash.cygnus.com>
+
+ * configure.in (i[345]86-*-pe): New target (NT).
+ * host/any: DLLTOOL new.
+ * libc/sys/win32/{crt0.c, kernel32.def, longjmp.c, setjmp.c, syscalls.c
+ wintypes.h,sys/file.h,sys/resource.h}: Preliminary support for
+ WIN32 (just enough to cross host the comp-tools).
+
+Thu Jun 22 11:45:18 1995 Doug Evans <dje@canuck.cygnus.com>
+
+ * libc/machine/h8300/{cmpsi.S,ucmpsi.S,divhi3.S,mulhi3.S,mulsi3.S}:
+ Deleted. These files live in gcc/config/h8300/lib1funcs.asm now.
+
+Mon Jun 19 11:40:40 1995 Doug Evans <dje@canuck.cygnus.com>
+
+ * libc/include/machine/ieeefp.h (arm): Change to always be
+ __IEEE_BIG_ENDIAN (even on little endian ARM's).
+
+Thu Jun 8 14:22:28 1995 Steve Chamberlain <sac@slash.cygnus.com>
+
+ * libc/sys/crt0.S: Initialze sp, and call exit after main.
+ * libc/sys/syscalls.c (abort): New.
+ * configure.in (arm): Define ABORT_PROVIDED.
+
+Wed Jun 7 14:04:35 1995 J.T. Conklin <jtc@rtl.cygnus.com>
+
+ * configure.in (powerpc): Define multidirs.
+
+Mon Jun 5 16:10:13 1995 Doug Evans <dje@canuck.cygnus.com>
+
+ * libc/sys/arm/crt0.S: Add __USER_LABEL_PREFIX__ support.
+
+Thu Jun 1 10:51:47 1995 Sean Eric Fagan <sef@cygnus.com>
+
+ * configure.in (sparclite): Delete target_cflags. Define multidirs.
+
+Wed May 24 14:23:25 1995 Steve Chamberlain <sac@slash.cygnus.com>
+
+ * configure.in, libc/include/machine/ieeefp.h: Modified
+ for arm:
+ libc/machine/arm/*, libc/sys/arm/*: New
+
+Tue May 23 13:53:07 1995 J.T. Conklin <jtc@rtl.cygnus.com>
+
+ * libc/include/machine/ieeefp.h: Use __PPC__ instead of
+ __powerpc__ when determining endianness.
+
+Wed May 10 07:55:56 1995 J.T. Conklin <jtc@rtl.cygnus.com>
+
+ * configure.in (m68*): Add multidir for the m68332.
+
+ * host/any (CC): Fix typo in last change.
+
+Fri Apr 14 22:20:31 1995 Ken Raeburn <raeburn@cujo.cygnus.com>
+
+ * libc/include/sys/config.h: Test __m68k__ instead of __m68000__
+ when determining endianness.
+ * libc/include/machine/ieeefp.h: Ditto.
+ * libc/machine/m68k/setjmp.S: Use '&' instead of '#' for immediate
+ operands.
+
+Fri Apr 14 14:14:29 1995 Doug Evans <dje@chestnut.cygnus.com>
+
+ * libc/include/errno.h (ENOTEMPTY): Define.
+
+Thu Apr 6 12:21:20 1995 J.T. Conklin <jtc@rtl.cygnus.com>
+
+ * configure.in (sparc-sun-sunos*): Add -DMALLOC_ALIGNMENT=8 to
+ target_cflags.
+
+ * libc/sys/sun4/Makefile.in (COPYOFILES): Added rem.o, multiply.o,
+ and umultiply.o.
+
+ * libc/stdio/tmpnam.c (worker): Unconditionally increment count
+ instead of only when open succeeds. ANSI requires that multiple
+ calls to tmpnam() result in different files.
+
+ * libc/sys/sun4/Makefile.in (COPYRENAMEOFILES): New macro, list of
+ objects pulled in from /lib/libc.a that must be renamed before
+ being pulled into newlib. /lib/libc.a's div.o conflicted with
+ newlib's file with the same name.
+
+ * libc/stdlib/ldiv.c (ldiv): Call labs() instead of abs().
+
+ * host/any (CC, AS, AR, RANLIB): Changed so that executables in
+ the build tree will only be used if the executables are present
+ (instead of just the Makefiles).
+
+ * libc/include/stdlib.h (mblen, mbtowc, wctomb, mbstowcs,
+ wcstombs): Define.
+ * libc/stdlib/{mblen.c, mbstowcs.c, wcstombs.c}: New files, null
+ versions of these functions that I orignally wrote for the
+ NetBSD C library.
+ * libc/stdlib/{mbtowc.c, wctomb.c}: Replaced functions with
+ versions I wrote for NetBSD.
+
+Wed Mar 29 12:42:42 1995 Kung Hsu <kung@mexican.cygnus.com>
+
+ * libc/sys/sparclite/Makefile.in: add crt0.s and make info.
+ * libc/sys/sparclite/crt0.s: ditto.
+
+Tue Mar 28 20:28:03 1995 Rob Savoye <rob@rtl.cygnus.com>
+
+ * configure.in: Add soft-float for proelf.
+
+Mon Mar 27 12:07:56 1995 Steve Chamberlain <sac@bang.hack.com>
+
+ * libc/stdlib/mprec.h (Bcopy): Copy the right number
+ of bytes.
+
+Mon Mar 27 11:24:22 1995 Doug Evans <dje@chestnut.cygnus.com>
+
+ * Makefile.in (all): Depend on `force'.
+ * configure.in (syscall_dir): Renamed from fake_sys_dir.
+ (libc_syscall_lib): Renamed from libc_fake_sys_lib.
+ (LIBC_SYSCALL_LIB): Renamed from LIBC_FAKE_SYS_LIB.
+ * libc/Makefile.in: Likewise.
+ * libc/include/reent.h: Update syscall references.
+ (_fcntl_r): Add prototype.
+ * libc/syscalls/*.c #include <reent.h>.
+ (*) Call reentrant version if REENTRANT_SYSCALLS_PROVIDED.
+
+Mon Mar 20 16:57:39 1995 Doug Evans <dje@deneb.cygnus.com>
+
+ * libc/include/sys/stat-dj.h (S_ISBLK): Define.
+ (S_ISCHR, S_ISDIR, S_ISFIFO, S_ISREG): Define.
+ * libc/include/sys/stat.h (stat-dj.h): Include ifdef MSDOS.
+ (time.h, sys/types.h): Always include (even if MSDOS).
+ (stat): Fix prototype.
+
+Fri Mar 10 11:30:38 1995 Ian Lance Taylor <ian@cygnus.com>
+
+ * configure.in (i[345]86-*-go32): Compile with -DNO_EXEC.
+
+Mon Feb 27 18:00:39 1995 Jim Wilson <wilson@chestnut.cygnus.com>
+
+ * libc/machine/h8500/psi.S (EXTPSIHI_RN_SN): Ifdef out.
+
+Mon Feb 13 16:10:03 1995 Ian Lance Taylor <ian@cygnus.com>
+
+ * libc/include/regdef.h: New file.
+ * libc/machine/mips/machine/regdef.h: New file.
+
+Mon Feb 6 15:24:29 1995 Doug Evans <dje@canuck.cygnus.com>
+
+ * libc/sys/sparc64/sys/fcntl.h (open): Add ellipsis.
+
+Fri Jan 27 13:52:10 1995 Steve Chamberlain <sac@splat>
+
+ * libc/sys/sh/crt0.S: Pass main's return to exit.
+ * libc/sys/sh/trap.S: Put errno in the right place.
+
+Tue Jan 24 18:57:56 1995 Ian Lance Taylor <ian@sanguine.cygnus.com>
+
+ * libm/math/e_rem_pio2.c (__ieee754_rem_pio2): Integrate change
+ from fdlibm 5.2: handle |x| < 3pi/4 more efficiently.
+ * libm/math/ef_rem_pio2.c: Likewise.
+ * libm/math/e_log10.c: Remove unused static one.
+ * libm/math/ef_log10.c: Likewise.
+ * libm/math/s_frexp.c: Likewise.
+ * libm/math/sf_frexp.c: Likewise.
+
+Sun Jan 22 21:26:14 1995 Steve Chamberlain <sac@splat>
+
+ * libc/sys/go32/Makefile.in, clock.S, dir.c, setjmp.S, stat.c,
+ longjmp.S: Upgraded.
+ * libc/sys/go32/sys/setjmp.h: Upgraded.
+ * libc/sys/go32/sys/go32.h, dpmi.h: New files.
+
+Fri Jan 20 18:33:18 1995 Ian Lance Taylor <ian@sanguine.cygnus.com>
+
+ * configure.in: Add many entries to multidirs for mips targets.
+
+Wed Jan 18 10:19:25 1995 J.T. Conklin <jtc@rtl.cygnus.com>
+
+ * libm/math/e_jn.c (__ieee754_yn): Integrate change from fdlibm
+ 5.2 which fixes bug where jn(-1,x) is three times larger than
+ the actual answer.
+ * libm/math/ef_jn.c (__ieee754_ynf): Likewise.
+
+Sun Jan 15 21:48:58 1995 Steve Chamberlain <sac@splat>
+
+ * libc/sys/w65/sys/syscalls.h: New file
+ * libc/include/machine/ieeefp.h: W65 support.
+ * libc/include/sys/config.h: Ditto.
+ * libc/machine/w65/Makefile.in, cmpsi, divsi3, lshrhi.s, mulsi3.c,
+ sdivhi3.s, smulhi3.s, udivhi3.s, umodhi3.s: New files.
+ * libc/sys/w65/Makefile.in, crt0.c, syscalls.c, trap.c: New files.
+
+Wed Jan 11 15:59:01 1995 Ian Lance Taylor <ian@sanguine.cygnus.com>
+
+ * libc/sys/Makefile.in (lib.a, crt0.o): Depend upon subs.
+
+Tue Jan 3 15:57:03 1995 Rob Savoye <rob@darkstar.cygnus.com>
+
+ * Makefile.in, configure.in: Remove any references to the old
+ "stub" dir.
+
+Thu Dec 22 10:42:08 1994 Ian Lance Taylor <ian@sanguine.cygnus.com>
+
+ * libc/syscalls/sysopen.c: Write _HAVE_STDC version of open, which
+ uses ... in prototype.
+
+
+Wed Nov 30 08:39:42 1994 Ian Lance Taylor <ian@rtl.cygnus.com>
+
+ * libc/sys/a29khif/sys/libconfig.h: Remove.
+ * libc/sys/go32/sys/libconfig.h: Remove.
+ * libc/sys/sun4/sys/libconfig.h: Remove.
+ * libc/sys/sysvi386/sys/libconfig.h: Remove.
+ * libc/sys/sysvnecv70/sys/libconfig.h: Remove.
+ * libc/sys/sparc64/sys/libconfig.h: Remove.
+
+ * libc/include/_ansi.h (_FLOAT_ARG, _FLOAT_RET): Don't define.
+ * libc/include/sys/config.h (_FLOAT_ARG, _FLOAT_RET): Likewise.
+ * libc/include/math.h: Change all uses of _FLOAT_RET and
+ _FLOAT_ARG to float.
+ * libm/test/math.c: Likewise.
+ * testsuite/libm.sac/math.c: Likewise.
+ * testsuite/libm.sac/working/math.c: Likewise.
+
+Wed Nov 23 22:39:28 1994 Steve Chamberlain (sac@jonny.cygnus.com)
+
+ * libc/sys/sh/trap.s,crt0.s,setjmp.s: Renamed with .S so that
+ gcc calls gas with endian option.
+ * configure.in (sh): Build little endian version too.
+
+Wed Nov 16 18:21:45 1994 Ian Lance Taylor <ian@sanguine.cygnus.com>
+
+ * configure.in: Configure big and little endian versions for MIPS
+ targets.
+
+Sat Nov 12 21:12:51 1994 Doug Evans <dje@canuck.cygnus.com>
+
+ * libc/include/limits.h: Deleted.
+ * libc/include/machine/limits.h: Deleted.
+
+Thu Nov 10 15:32:44 1994 Rob Savoye <rob@rtl.cygnus.com>
+
+ * ChangeLog: Remove stub directory. This has all been rewritten
+ and moved to devo/libgloss.
+
+Thu Sep 29 18:31:04 1994 Ian Lance Taylor <ian@sanguine.cygnus.com>
+
+ * Makefile.in (dvi): Add to info target, use $@ in sub make.
+ (docs): Merge into info target.
+ * libm/Makefile.in (dvi): Add $(srcdir).
+ * libm/math/Makefile.in (chobjs): Remove underscores from file
+ names. Texinfo doesn't like them.
+ (wacos.def, ...): Add explicit targets for all .def files.
+ * libm/math/math.tex: Remove underscores from @include file names.
+ * doc/Makefile.in (dvi): Add dummy target.
+ * testsuite/Makefile.in (dvi): Add dummy target.
+
+Mon Sep 26 21:17:46 1994 Doug Evans (dje@canuck.cygnus.com)
+
+ * Makefile.in (VERSION): Define. For net newlib releases.
+
+Thu Sep 22 19:01:26 1994 Doug Evans (dje@canuck.cygnus.com)
+
+ * README: New file.
+
+Mon Sep 19 16:35:23 1994 Jim Wilson (wilson@sphagnum.cygnus.com)
+
+ * libc/stdlib/ecvtbuf.c (_gcvt): Undo last change.
+
+Mon Sep 19 11:44:23 1994 Ian Lance Taylor (ian@sanguine.cygnus.com)
+
+ * libc/stdlib/setenv.c (_findenv): Declare.
+
+ * libc/include/sys/fcntl.h: Fix declarations of open, creat, and
+ fcntl to not use _EXFUN, and change string parameters to open and
+ creat to be ``const char *''.
+ * libc/sys/sparc64/sys/fcntl.h: Likewise.
+ * libc/sys/sparc64/creat.c (creat): Make PATH const.
+ * libc/syscalls/sysopen.c: Include <fcntl.h>.
+ (open) Make _FILE const.
+ * libc/sys/z8ksim/glue.c (_open): Make BUF const.
+ (_creat): Make PATH const.
+ * libc/sys/h8300hms/syscalls.c (_open): Make PATH const.
+ * libc/sys/h8500hms/syscalls.c (_open): Likewise.
+ * libc/sys/m88kbug/syscalls.c (open): Likewise.
+ * libc/sys/sh/syscalls.c (_open): Likewise.
+ * stub/shared/glue.c (open): Make BUF const.
+ * stub/ex93x/syscalls.c (open): Make FILENAME const.
+
+Thu Sep 8 16:39:12 1994 Steve Chamberlain (sac@jonny.cygnus.com)
+
+ * libc/include/errno.h: Add ENMFILE
+ * libc/include/sys/config.h: Support Z8000.
+ * libc/include/sys/signal.h: New signals for go32.
+ * libc/machine/h8500/psi.S (__addpsir0r0): New function
+ * libc/machine/h8500/cmpsi.S (__ucmppsi2): New function
+ * libc/machine/sh/sdivsi3.s (__sdivsi3): Rewritten.
+ * libc/stdlib/mallocr.c (_morecore_r): Minimum chunk
+ size is variable, depending upon CHUNK_POWER.
+ * libc/sys/go32/*.c: Upgrade to new go32 stuff.
+
+Sun Sep 4 17:42:43 1994 Jim Wilson (wilson@sphagnum.cygnus.com)
+
+ * libc/stdlib/ecvtbuf.c (_gcvt): Output '-' for negative numbers.
+
+Fri Sep 2 10:56:01 1994 Ian Lance Taylor (ian@sanguine.cygnus.com)
+
+ * libc/include/_ansi.h (_PARAMS): Don't define if already defined.
+
+Wed Aug 24 11:11:03 1994 Ian Lance Taylor (ian@sanguine.cygnus.com)
+
+ * configure.in: Change i[34]86 to i[345]86.
+
+ * libc/include/math.h: Don't define HUGE_VAL if it is already
+ defined.
+
+Wed Aug 17 15:18:02 1994 Ian Lance Taylor (ian@sanguine.cygnus.com)
+
+ * testsuite/libm.sac/test_erfc.c: Correct some result values.
+ * testsuite/libm.sac/test_gammaf.c: Likewise.
+ * testsuite/libm.sac/test_sin.c: Likewise.
+ * testsuite/libm.sac/test_tanh.c: Likewise.
+
+Tue Aug 16 16:12:53 1994 Ian Lance Taylor (ian@sanguine.cygnus.com)
+
+ * libc/include/machine/ieeefp.h: Don't try set endianness if it is
+ already set. Define typedefs __int32_t and __uint32_t.
+ * libc/include/math.h: Include <machine/ieeefp.h>.
+ (union __dmath): Use __uint32_t.
+ * libm/math/fdlibm.h, libm/math/*.c: Use __int32_t and __uint32_t
+ instead of int and unsigned int.
+
+Thu Aug 11 15:16:09 1994 Ian Lance Taylor (ian@sanguine.cygnus.com)
+
+ Replace the math library with the SunPRO fdlibm package.
+ * libm/math: Completely changed all files.
+ * libm/ieeefp: Remove contents and directory.
+ * libm/Makefile.in (LIBM_FP_LIB): Remove.
+ (SUBDIRS): Just set to math/lib.a.
+ * libm/libm.texinfo: Updated for new library.
+ * libc/include/math.h: Extensive changes for new math library.
+ * libc/include/ieeefp.h (isnanf, isinff, finitef): Change argument
+ from _FLOAT_ARG to float.
+ (maxpowtwo, maxpowtwof): Don't declare.
+ * configure.in (fp_dir): Removed; was always ieeefp anyhow.
+ (libm_fp_lib): Removed.
+ * Makefile.in (MATHOBJS_IN_LIBC): Updated with new file names.
+ * testsuite/libm.paranoia/Makefile.in (check): Correct --srcdir
+ argument to ${RUNTEST}.
+ * testsuite/libm.sac/Makefile.in (LOCAL_CFLAGS): Define.
+ (.c.o): New rule.
+ (RUNTESTFLAGS): Set CC and CFLAGS.
+ (TESTS): Remove test_log2 and test_log2f.
+ (${TESTS}): Pass ${LOCAL_CFLAGS}, not ${CFLAGS}.
+ * testsuite/libm.sac/math.c (run_vector_1): Use float, not
+ _FLOAT_ARG, for single precision argument type.
+ * testsuite/libm.sac/sac.exp: Treat an error in bit 63 as an
+ expected failure. Close the input pipe.
+ * testsuite/libm.sac/test.c (test_sok, test_iok, test_scok):
+ Correct misspelling of inaccurate.
+ (test_mok): Use ``inaccurate'', not ``wrong''.
+ * testsuite/libm.sac/{test_acos.c, test_acosh.c, test_asin.c,
+ test_asinh.c, test_atan.c, test_atanh.c, test_ceil.c,
+ test_ceilf.c, test_cos.c, test_cosh.c, test_erf.c, test_erf.c,
+ test_fabs.c, test_floor.c, test_floorf.c, test_fmod.c,
+ test_fmodf.c, test_gamma.c, test_log1p.c, test_log1pf.c,
+ test_yn.c): Correct many result values. Many are still wrong.
+
+ * libc/stdlib/ecvtbuf.c (print_e): If _dtoa_r sets decpt to 9999,
+ just copy the string.
+ (_gcvt): Always return the buffer.
+
+Tue Aug 9 13:43:23 1994 J.T. Conklin (jtc@phishhead.cygnus.com)
+
+ * bcopy.c: fixed documentation, bcopy was not specified by ANSI.
+
+Wed Aug 3 05:39:41 1994 D. V. Henkel-Wallace (gumby@cygnus.com)
+
+ * libc/include/sys/reent.h: (struct _Bigint): add _reclaim
+ structure.
+ (struct _reent): add _p5s, _cvtlen, _cvtbuf.
+ (_reclaim_reent): declare new entry point.
+ * libc/reent/reent.c (cleanup_glue, _reclaim_reent): new
+ functions.
+
+ * libc/stdlib/mprec.c (Balloc): Keep track of every struct bigint
+ ever allocated, so that we can later reclaim them all.
+ (pow5mult): make reentrant.
+
+ * libc/stdlib/ecvtbuf.c (fcvtbuf, ecvtbuf): extend these functions
+ so that when given NULL as a buffer, return a pointer to static
+ space in the rent structure. This is not documented behaviour;
+ it's only to support ecvt and fcvt, which aren't ANSI anyway.
+ * libc/stdlib/efgcvt.c (fcvt, ecvt) Use new functionality (and
+ therefore become reentrant).
+
+ * libc/stdlib/dtoastub.c: remove spurious inclusion of mprec.h.
+
+Mon Aug 1 16:52:24 1994 Ian Lance Taylor (ian@sanguine.cygnus.com)
+
+ * libc/include/machine/ieeefp.h: Check _AM29K, not ___AM29K__.
+
+Thu Jul 28 15:40:21 1994 J.T. Conklin (jtc@phishhead.cygnus.com)
+
+ * Makefile.in: Make link to libg.a after libc.a; this is needed
+ for the testsuites to build executables when everything comes
+ from the tree.
+
+Mon Jun 27 17:14:29 1994 Bill Cox (bill@rtl.cygnus.com)
+
+ * libc/Makefile.in: Add a VERSION variable so we can keep track.
+ * libm/Makefile.in: Add a VERSION variable so we can keep track.
+
+Wed Jun 22 10:26:00 1994 Ian Lance Taylor (ian@sanguine.cygnus.com)
+
+ * libc/include/stdio.h: Use __VALIST, not va_list.
+
+Tue May 17 15:43:28 1994 Bill Cox (bill@rtl.cygnus.com)
+
+ * testsuite/config/unix-libm.exp, testsuite/lib/libm.exp,
+ testsuite/libm.sac/execute.exp:
+ Replace error proc calls with perror calls.
+
+Wed May 11 09:25:28 1994 Doug Evans (dje@canuck.cygnus.com)
+
+ * libc/include/*.h: #include "_ansi.h" instead of <_ansi.h>.
+ * libc/include/time.h: #define NULL as 0L.
+
+Mon May 9 18:41:20 1994 Doug Evans (dje@canuck.cygnus.com)
+
+ * host/any (INCLUDES): Delete -I of gcc/include, gcc -B takes
+ care of it.
+
+Mon May 9 18:39:39 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
+
+ * libc/include/sys/signal.h: Check for __GO32__, not __i386__ and
+ not __unix__.
+
+Sat May 7 17:07:36 1994 Steve Chamberlain (sac@cygnus.com)
+
+ * configure.in (TARGET_CFLAGS): Set -O2 as default.
+ (z8k-*-*): Use syscalls fake sys dir.
+ * libc/sys/z8k/glue.c: Rename syscalls.
+ * libc/sys/go32/Makefile.in: Use new routines.
+ * libc/machine/Makefile.in: Fix typo in ln stuff.
+
+Thu May 5 13:47:48 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
+
+ * Makefile.in (libm.a, crt0.o): Use cp if ln fails.
+ * libc/Makefile.in (crt0.o): Likewise.
+ * libc/machine/Makefile.in (lib.a): Likewise.
+ * libc/sys/Makefile.in (lib.a, crt0.o): Likewise.
+
+ All Makefile.in files: Added mostlyclean, realclean and distclean
+ targets.
+
+ * Makefile.in: Don't bother to unexport XTRAFLAGS or
+ XTRAFLAGS_FOR_TARGET, since they are no longer passed down from
+ the top level Makefile.
+
+Tue Apr 26 15:10:34 1994 Doug Evans (dje@canuck.cygnus.com)
+
+ * libc/sys/sparc64/sys/stat.h: New file.
+ * libc/sys/sparc64/sys/time.h: New file.
+ * libc/sys/sparc64/sys/types.h: New file.
+
+Fri Apr 22 12:58:24 1994 Stan Shebs (shebs@andros.cygnus.com)
+
+ * stub/ex93x/crt0.s (start): Add code to clear bss.
+
+Wed Apr 13 10:34:58 1994 Doug Evans (dje@canuck.cygnus.com)
+
+ * libc/include/sys/types.h (time_t): Properly protect inside
+ #ifndef __time_t_defined.
+
+ * libc/stdio/fileno.c: New file.
+ * libc/stdio/Makefile.in (OFILES, CHEWOUT_FILES): Add fileno.
+ (fileno.o): Add dependency.
+ * libc/include/stdio.h (__sgetc): Rename never to _never.
+ (fileno macro): Disable, needs to do CHECK_INIT first.
+
+Mon Apr 11 17:37:09 1994 Bill Cox (bill@rtl.cygnus.com)
+
+ * testsuite/Makefile.in (EXPECT, RUNTEST): Set these for the check
+ goal.
+
+ * testsuite/Makefile.in (check): Set TCL_LIBRARY for runtest.
+ * testsuite/libm.paranoia/Makefile.in (check): Set TCL_LIBRARY for
+ runtest.
+ * testsuite/libm.sac/Makefile.in (check): Set TCL_LIBRARY for
+ runtest.
+
+Sat Apr 9 16:18:09 1994 Doug Evans (dje@cygnus.com)
+
+ * libc/sys/sparc64/sys/fcntl.h: New file, define solaris versions
+ of the various constants.
+
+Thu Apr 7 21:19:07 1994 Mark Eichin (eichin@cygnus.com)
+
+ * libc/include/math.h: #ifndef __math_68881 around things which
+ conflict with the (gcc-provided) inline functions in
+ gcc/ginclude/math-68881.h.
+
+Thu Apr 7 02:50:43 1994 Doug Evans (dje@cygnus.com)
+
+ * libc/include/_syslist.h (_gettimeofday): Define.
+ (_times): Ditto.
+ * libc/include/reent.h: #include <machine/types.h> to get _CLOCK_T_.
+ (struct tms, timeval, timezone): Declare.
+ (_gettimeofday_r, _times_r): Declare.
+ * libc/include/time.h (_CLOCK_T_): Don't #undef. Remove
+ #ifdef _CLOCK_T_ surrounding definition of clock_t.
+ (time_t): Add multiple definition protection, __time_t_defined.
+ * libc/include/sys/time.h: Don't #include <time.h>.
+ Always define struct timezone (remove #ifndef _TIME_H_).
+ * libc/include/sys/times.h (_CLOCK_T_): Don't #undef. Remove
+ #ifdef _CLOCK_T_ surrounding definition of clock_t.
+ * libc/reent/Makefile.in (OFILES): Add timer.o.
+ (CHEWOUT_FILES): Add timer.def. Add timer.o/timer.c dependence.
+ * libc/reent/timer.c: New file.
+ * libc/time/clock.c: #include <reent.h>.
+ (clock): Call _times_r instead of times.
+ * libc/time/time.c (HAVE_GETTIMEOFDAY): Renamed from
+ HAVE_GET_TIME_OF_DAY.
+ Add comment regarding supporting OS routine(s) required (for docs).
+ #include <reent.h>.
+ (time): Call _gettimeofday_r instead of gettimeofday.
+ * libc/time/asctime.c: Fix comment regarding supporting OS routines.
+ * libc/time/ctime.c: Ditto.
+ * libc/time/strftime.c: Ditto.
+ * libc/sys/sparc64/Makefile.in (TEMPLATE_SFILES): Remove gettimeofday.
+ (TEMPLATE_SFILES_R): Define here. Also define times.
+ Add times_r.o/times.S dependence.
+ (time2.c, junk.c): Deleted.
+ * libc/sys/sparc64/time2.c: Deleted.
+ * configure.in (sparc64-*-*): Define HAVE_GETTIMEOFDAY.
+
+ * libc/stdio/mktemp.c (_getpid_r): Renamed from _getpid.
+ * libc/stdio/tmpnam.c (_getpid_r): Ditto.
+ * libc/sys/sparc64/junk.c: Deleted.
+
+Mon Mar 21 16:51:03 1994 Doug Evans (dje@canuck.cygnus.com)
+
+ * libc/sys/sparc64/Makefile.in: Add times syscall.
+ * libc/sys/sparc64/crt0.S: Handle stack bias at run time so we can
+ be used with and without it. Add comment clarifying Medium/Anywhere
+ model requirements.
+ * libc/sys/sparc64/sigsetjmp.S (setjmp, longjmp): Add svr4 support.
+ * libc/sys/sparc64/sys/syscall.h (SYS_times): Define for sunos4
+ even if obsolete.
+
+Sun Mar 20 15:51:47 1994 Doug Evans (dje@cygnus.com)
+
+ * configure.in (target_cflags): Move init.
+ (sparc64-*-*): Define HAVE_BLKSIZE.
+
+Wed Mar 9 10:44:52 1994 Doug Evans (dje@canuck.cygnus.com)
+
+ * libc/include/sys/_types.h: New file.
+ * libc/include/reent.h: #include it.
+ Add comment describing REENTRANT_SYSCALLS_PROVIDED and
+ MISSING_SYSCALL_NAMES.
+ Sort syscalls.
+ * libc/include/_syslist.h: Remove _raise.
+ * libc/reent/signalr.c: New file.
+ * libc/reent/Makefile.in: Compile it.
+ * libc/signal/signal.c: Only use ifdef SIMULATED_SIGNALS.
+ Add doc for raise and _raise_r.
+ * libc/signal/raise.c: Only use ifndef SIMULATED_SIGNALS.
+ (raise): Call _raise_r.
+ (_raise_r): Call _getpid_r and _kill_r.
+ * libc/stdlib/abort.c: Remove inclusion of stdio.h and _syslist.h.
+ (abort): Loop forever calling raise and _exit.
+
+Mon Mar 7 14:40:08 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
+
+ * configure.in: Remove extraneous echo.
+
+Thu Mar 3 12:14:22 1994 Doug Evans (dje@canuck.cygnus.com)
+
+ * libc/sys/sparc64/sys/dirent.h (MAXNAMLEN): #undef to avoid
+ collision with unistd.h, and fix for svr4.
+
+Wed Mar 2 13:55:25 1994 Doug Evans (dje@canuck.cygnus.com)
+
+ * libc/stdio/local.h (_llicvt): Declare.
+ (CVT_BUF_SIZE): Define (and buffer size from 512 to 128).
+ * libc/stdio/cvt.c: Include "local.h" to get CVT_BUF_SIZE.
+ (_llicvt): Define.
+ (_sicvt): Fix function header (`value' is short).
+ * libc/stdio/vfprintf.c (_vfprintf_r): Use CVT_BUF_SIZE.
+ Add printing of long long's support.
+ Add printing of 8 byte pointer support.
+
+Fri Feb 11 21:52:11 1994 Steve Chamberlain (sac@sphagnum.cygnus.com)
+
+ * libc/sys/sh/syscalls.c (pipe, execv, wait, fork, utime, chown,
+ stat, chmod): New hooks.
+ (sbrk): Abort if stack and heap collide.
+ * libc/machine/sh/udivsi3, libc/machine/sh/sdivsi3 Modified to
+ shortcut when given small args.
+ * libc/machine/sh/setjmp.s: Rewritten.
+ * libc/machine/sh/strcmp.s (strcmp): New function takes advantage
+ of cmp/str instruction.
+
+Wed Feb 9 15:12:35 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
+
+ * configure.in: Accept powerpc* as a CPU type, using fp_dir ieeefp
+ and machine_dir powerpc.
+ * libc/include/machine/setjmp.h, libc/include/machine/ieeefp.h:
+ Add cases for __powerpc__.
+ * libc/machine/powerpc/Makefile.in, libc/machine/powerpc/setjmp.S:
+ New files.
+
+ * libc/include/stdio.h (_iprintf_r): Declare correctly.
+
+Thu Jan 27 10:36:27 1994 Steve Chamberlain (sac@cygnus.com)
+
+ * libc/stdlib/callocr.c: New file with _calloc_r in it.
+ * libc/stdlib/calloc.c (calloc_r): Now in callocr.c
+
+Thu Jan 20 15:14:37 1994 Doug Evans (dje@canuck.cygnus.com)
+
+ * libc/stdlib/ecvtbuf.c (print_f): Remove local "done".
+ (print_e): More comments to describe args, etc.
+ "type" arg may now be 'g' or 'G' for %g/G format --> remove
+ trailing blanks.
+ (_gcvt): Remove locals decpt, sign, end, p, done.
+ More comments for print_e invocation.
+ Pass "type" to print_e as is (g/G).
+
+Wed Jan 19 16:34:18 1994 Rob Savoye (rob@darkstar.cygnus.com)
+
+ * stub/shared/m68k-crt0.S: Changed so it compiles (and runs) on a
+ stock m68000.
+
+Mon Jan 17 15:41:53 1994 Doug Evans (dje@canuck.cygnus.com)
+
+ * libc/stdlib/mallocr.c (_morecore_r): Fix aligning of pointer so it
+ works with any sized pointer, including ones bigger than ints and
+ longs.
+
+Thu Jan 6 14:53:21 1994 Doug Evans (dje@canuck.cygnus.com)
+
+ * libc/sys/sparc64/{time2.c,utime.S,utime2.c}: New files.
+
+Sat Dec 11 16:17:20 1993 Steve Chamberlain (sac@thepub.cygnus.com)
+
+ * libc/include/stdlib.h (_calloc_r): Add prototype.
+ * libc/machine/h8500/negsi2.c: New file.
+ * libc/machine/h8500/divsi3.c: Prevent overflow when dividing v
+ large unsigned numbers.
+ * libc/machine/h8500/cmpsi.c: Add cmppsi.
+ * libc/stdlib/mallocr.c (morecore_r): Fix aligning pointers so it
+ works when sizeof(size_t) != sizeof(char *).
+ * libc/stdlib/mprec.c (Balloc): Call calloc rather than malloc to
+ get play area
+ * libc/stdlib/mprec.h: Define Just_16 if generating for z8000.
+
+Mon Dec 6 15:59:53 1993 Doug Evans (dje@rtl.cygnus.com)
+
+ * libc/include/assert.h (assert): Handle -traditional.
+
+Tue Nov 16 15:49:24 1993 Mark Eichin (eichin@cygnus.com)
+
+ * Makefile.in: added ; after every "fi" and "done" that wasn't at
+ the end of a line (ie. anything before a backslash continuation)
+ so that bash handles them.
+
+Tue Nov 16 12:31:57 1993 david d `zoo' zuhn (zoo@rtl.cygnus.com)
+
+ * libc/sys/go32/lstat.s: new file, copied from stat.s and renamed
+ stat to lstat
+
+Mon Nov 15 15:50:43 1993 Steve Chamberlain (sac@jonny.cygnus.com)
+
+ * libc/sys/sh/crt0.s, libc/sys/sh/trap.s,
+ libc/machine/sh/sdivsi3.s, libc/machine/sh/setjmp.s,
+ libc/machine/sh/udivsi3.s: Use new calling convention.
+
+Mon Nov 15 15:25:38 1993 Mark Eichin (eichin@cygnus.com)
+
+ * libc/include/sys/unistd.h, libc/include/sys/stat.h: ANSI-fy
+ chmod, access, chdir, chown by making _path const. Also fix _amode
+ param of access.
+
+Fri Nov 12 20:25:28 1993 Mark Eichin (eichin@cygnus.com)
+
+ * libc/sys/a29khif/_tmpnam.s (_tmpnam): renamed function to
+ _khif_tmpnam, because it doesn't comply with ANSI but may be
+ useful anyway. Real tmpnam was already in libc/stdio, and was
+ colliding with this one (pr 2176.)
+ * libc/sys/a29khif/stubs.s (tmpnam): removed tmpnam. This file is
+ the wrong idea anyhow.
+
+Mon Nov 8 07:50:16 1993 Doug Evans (dje@canuck.cygnus.com)
+
+ * configure.in: Remove h8300h, we have multilib now.
+
+Fri Nov 5 12:37:27 1993 Mark Eichin (eichin@cygnus.com)
+
+ * libc/string/strcasecmp.c, libc/string/strncasecmp.c: new
+ functions, to get preference over the ones in libiberty (since we
+ provide correct declarations in <string.h>.
+ * libc/string/Makefile.in: add support for strncasecmp,
+ strcasecmp.
+
+Fri Nov 5 09:05:45 1993 D. V. Henkel-Wallace (gumby@blues.cygnus.com)
+
+ * Change netware config not to look for cpu explicitly.
+
+Thu Nov 4 14:21:25 1993 Doug Evans (dje@canuck.cygnus.com)
+
+ * libc/sys/sparc64/{creat.c,junk.c}: New files.
+ * libc/sys/sparc64/Makefile.in: Add dependencies.
+
+Wed Nov 3 10:42:49 1993 Doug Evans (dje@canuck.cygnus.com)
+
+ * configure.in: Clean up v9 a bit, new "os" aoutv8.
+
+Tue Nov 2 10:00:44 1993 D. V. Henkel-Wallace (gumby@cygnus.com)
+
+ * libc/include/sys/reent.h: make structure smaller by allocating
+ some stuff when needed.
+ * libc/signal/signal.c: allocate as needed
+ * libc/stdio/findfp.c,stdio/local.h: ditto
+ * libc/stdlib/mprec.c: ditto
+
+ * libc/time/localtime.c: don't return a dangling stack ptr.
+
+Wed Sep 29 20:42:34 1993 Rob Savoye (rob@darkstar.cygnus.com)
+
+ * stub/mvme135/crt0.S, stub/mvme135/glue.c: Moved to stub/generic.
+
+Wed Sep 29 16:27:49 1993 K. Richard Pixley (rich@sendai.cygnus.com)
+
+ * libc/include/stdio.h (__sputc): comment out static inline which
+ confuses coff toolchains.
+
+Thu Sep 2 16:31:36 1993 Mark Eichin (eichin@cygnus.com)
+
+ * libc/sys/a29khif/{_close.s, _fstat.s, _lseek.s, _sbrk.s,
+ _write.s, getpid.c, kill.c, read.s}:
+ * libc/sys/a29khif/stubs.s: eliminated stubs that already go
+ through the syscalls directory.
+
+Fri Oct 29 13:59:58 1993 Jeffrey Wheat (cassidy@cygnus.com)
+
+ * configure.in: fixed double quote gotcha.
+
+Wed Oct 27 15:27:09 1993 Rob Savoye (rob@darkstar.cygnus.com)
+
+ * stub/ex931: stub library for sparclite board.
+ * stub/idp: Renamed from mc68ec. Added contructor table
+ stuff to linker script.
+ * stub/mvme135: Renamed from m68kmvme. Added contructor table
+ stuff to linker script.
+
+Tue Oct 26 17:01:23 1993 K. Richard Pixley (rich@sendai.cygnus.com)
+
+ * configure.in: Configure testsuites only if they exist.
+
+Tue Oct 26 12:37:11 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
+
+ * configure.in: Don't set machine_dir for i386 until there is
+ something in libc/machine/i386 to compile. For i[34]86-*-netware*
+ use sys/netware, don't use signal, define NO_EXEC, ABORT_PROVIDED,
+ CLOCK_PROVIDED and MALLOC_PROVIDED.
+
+ * libc/sys/netware: New directory. Contains simplistic and
+ probably incorrect stubs for NetWare. Should be enough to load
+ the library.
+ * libc/sys/netware/crt0.c, libc/sys/netware/environ.c,
+ libc/sys/netware/getpid.c, libc/sys/netware/link.c: New NetWare
+ stub files.
+
+ * libc/reent/execr.c: Don't use if NO_EXEC is defined.
+ * libc/reent/sbrkr.c: Don't use if MALLOC_PROVIDED is defined.
+ * libc/stdlib/abort.c: Don't use if ABORT_PROVIDED is defined.
+ * libc/time/clock.c: Don't use if CLOCK_PROVIDED is defined.
+
+Mon Oct 25 16:48:08 1993 Roland H. Pesch (pesch@cygnus.com)
+
+ * testsuite/Makefile.in: add "docs" dummy target for consistency
+ with rest of newlib; turn "info" and "install-info" into dummy
+ targets, since they wouldn't have worked. (Depended on
+ nonexistent "doc" subdir.)
+
+Fri Oct 22 20:37:32 1993 david d `zoo' zuhn (zoo@rtl.cygnus.com)
+
+ * configure.in: handle mips* instead of mips
+
+Thu Oct 21 08:57:24 1993 Ian Lance Taylor (ian@cygnus.com)
+
+ * libc/include/sys/dirent.h: New file. If it is not overridden by
+ a version of libc/sys/*/sys/dirent.h, it includes the next
+ <dirent.h> file in case there is one lurking somewhere.
+
+Fri Oct 15 14:17:40 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
+
+ * libc/stdlib/strtoul.c (_strtoul_r): Several changes for ANSI
+ compliance, namely: Accept a minus sign. Consider a single 0 with
+ a radix of 0 as being a conversion. Determine overflow correctly.
+ If an overflow occurs, set *ptr to the end of the number, not the
+ middle.
+ * lib/stdlib/strtol.c (_strtol_r): Determine overflow correctly.
+
+Thu Oct 14 21:49:52 1993 Doug Evans (dje@canuck.cygnus.com)
+
+ * libc/machine/h8300/divsi3.S (divmodsi4): Fix h8300h case.
+
+Fri Oct 1 17:17:34 1993 Doug Evans (dje@canuck.cygnus.com)
+
+ * Makefile.in (INSTALL): Use $srcrootpre.
+ (crt0.o): Replace $< with $(CRT0_DIR)/$(CRT0), Sun make
+ can't handle it.
+ * libc/Makefile.in (crt0.o): Spell out $<, Sun make can't handle
+ it.
+ * libc/sys/Makefile.in (crt0.o, lib.a): Ditto.
+ * stub/Makefile.in (crt0.o, TARGETLIB): Ditto.
+ * libc/sys/sparc64/Makefile.in (isatty.o): Sun VPATH lossage.
+ * libm/math/Makefile.in (matherr.o): Ditto.
+
+Thu Sep 30 11:09:17 1993 Steve Chamberlain (sac@phydeaux.cygnus.com)
+
+ * configure.in: Build multidirs for z8k.
+ * libc/include/stdlib.h (_strtoul_r): add prototype.
+ * libc/include/machine/limits.h: Get INT_MIN right for all the z8k family.
+ * libc/include/machine/setjmp.h: Add for z8k.
+ * libc/machine/z8k/{mulsi.o, udivsi3.o, umodsi3.o, modsi3.o} obsolete.
+ * libc/sys/z8ksim/glue.c: tidy up.
+
+Mon Sep 20 14:04:46 1993 Doug Evans (dje@canuck.cygnus.com)
+
+ * libc/unix/{execl.c execle.c execlp.c execv.c execvp.c}:
+ New files. Requires execve system call.
+ * libc/unix/Makefile.in: Use them.
+ * libc/sys/sparc64/{execl.c execle.c execlp.c execv.c execvp.c}:
+ Deleted, moved to libc/unix.
+ * libc/sys/sparc64/Makefile.in: Remove them.
+
+Mon Sep 20 10:38:32 1993 Doug Evans (dje@canuck.cygnus.com)
+
+ * libc/sys/sparc64/{template.S template_r.S}: New files.
+ * libc/sys/sparc64/Makefile.in: Build source for trivial syscalls
+ from templates.
+ * libc/sys/sparc64/{chdir.S chmod.S close.S dup.S fcntl.S
+ fork.S fstat.S lseek.S link.S mkdir.S open.S pipe.S read.S rmdir.S
+ umask.S unlink.S wait4.S write.S}: Removed, now built from
+ templates.
+
+Sun Sep 19 14:52:57 1993 Doug Evans (dje@canuck.cygnus.com)
+
+ * libc/time/time.c: #include <_ansi.h>.
+
+Sun Sep 19 13:43:25 1993 Doug Evans (dje@canuck.cygnus.com)
+
+ * configure.in (sparc64-*-*): Remove -D__SIZE_TYPE__.
+
+Mon Sep 13 13:52:16 1993 K. Richard Pixley (rich@sendai.cygnus.com)
+
+ * configure.in: match m8* rather than m88k so that m88110 is
+ recognized as well.
+
+Tue Sep 7 12:19:32 1993 Doug Evans (dje@canuck.cygnus.com)
+
+ * libc/sys/h8300hms/{Makefile.in, _exit.c, misc.c}:
+ Renamed exit.c to _exit.c to avoid collision with stdlib/exit.c.
+ misc.c: New file.
+
+ * configure.in: Add multilib support to h8300.
+
+Mon Sep 6 14:07:06 1993 Doug Evans (dje@canuck.cygnus.com)
+
+ * libc/stdlib/abort.c (abort): Remove _VOLATILE from return type.
+ * libc/include/_ansi.h (_ATTRIBUTE): New macro for __attribute__.
+ * libc/include/stdlib.h (exit, abort): Add noreturn attribute.
+
+Mon Sep 6 14:24:18 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
+
+ * configure.in: Corrected multidirs for sparc target.
+
+Mon Aug 30 15:56:44 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
+
+ Support for building newlib multiple times with different
+ compilation flags.
+ * configure.in: Only configure doc at top level. Set multidirs
+ when appropriate for target, unless not at top level. If
+ multidirs is set, independently configure each subdirectory.
+ Adjust TOP, MULTIDIRS and MULTISUBDIR appropriately in Makefile.
+ * Makefile.in (MULTIDIRS, MULTISUBDIR): New variables,
+ automagically set by configure.in.
+ (all): If MULTIDIRS is set, build multiple copies of libraries.
+ (install): If MULTIDIRS is set, install multiple copies of
+ libraries. Install in $(tooldir)/lib/$(MULTISUBDIR). If
+ MULTISUBDIR is set, don't bother to install header files.
+ * host/any (INCLUDES, CHEW): Use $(SRCTOP) rather than $(TOP) from
+ ${srcrootpre}.
+ * stub/configure.in: Set MULTISUBDIR appropriately.
+ * stub/Makefile.in (install): Install in
+ $(tooldir)/lib/$(MULTISUBDIR).
+ * All Makefile.in files: Define SRCTOP as well as TOP.
+
+Mon Aug 30 10:34:24 1993 Doug Evans (dje@canuck.cygnus.com)
+
+ * libc/machine/h8300/{mulhi3.S, divhi3.S}: Comment out if h8300h.
+ * libc/machine/h8300/{mulsi3.S, divsi3.S}: Add h8300h support.
+
+Thu Aug 26 19:38:12 1993 Doug Evans (dje@canuck.cygnus.com)
+
+ * libc/sys/h8300hms/exit.c (_exit): New function.
+
+Wed Aug 25 16:31:48 1993 K. Richard Pixley (rich@sendai.cygnus.com)
+
+ * configure.in: recognize m88110.
+
+Fri Aug 20 16:46:23 1993 K. Richard Pixley (rich@sendai.cygnus.com)
+
+ * libc/sys/m88kbug/crt0.c: pretty up, remove extraneous comments,
+ prototype main and call with args.
+
+Fri Jul 30 16:52:47 1993 K. Richard Pixley (rich@cygnus.com)
+
+ First real try at system traps for m88k-bug.
+ * libc/sys/m88kbug/syscalls.c: many changes. Convert from stubs
+ to real trap calls.
+ * libc/sys/m88kbug/sys/systraps.h: new file.
+
+Tue Jul 27 16:31:16 1993 K. Richard Pixley (rich@sendai.cygnus.com)
+
+ Patches to fix info building when target does not use sys
+ directory.
+ * libc/Makefile.in (targetdep.tex): add sys.tex separately.
+ * libc/sys.tex, libc/sys/sys.tex: moved from libc/sys/sys.tex to
+ libc/sys.tex.
+ * libc/sys/Makefile.in (doc): do nothing.
+
+Mon Jul 26 17:08:11 1993 K. Richard Pixley (rich@sendai.cygnus.com)
+
+ * libc/Makefile.in (CRT0): new macro.
+ (all): depend on $(CRT0) rather than crt0.o.
+
+ * configure.in: fix libc_sys_dir -> libc_sys_lib thinko.
+ do not default crt0, instead, set crt0 and crt0_dir based on
+ sys_dir and stub_dir.
+
+ * Makefile.in (CRT0_DIR): new macro.
+ (all): depend on $(CRT0) rather than crt0.o which may not exist.
+ (crt0.o): depend on $(CRT0_DIR)/$(CRT0) rather than simply
+ $(CRT0).
+ ($(CRT0)): recur by cd'ing into $(CRT0_DIR).
+
+Sun Jul 25 17:51:51 MDT 1993 Jeffrey Wheat (cassidy@cygnus.com)
+
+ * testsuite/lib/libm.exp:
+ added code to support compiling and linking of tests for
+ libm.sac (paranoia to be added next) and processing the
+ pass or failure of the tests.
+
+ * testsuite/config/unix-libm.exp:
+ platform specific proc's for dealing with compiler, linker
+ and the way we execute and process the test results.
+
+ * testsuite/libm.sac/execute.exp:
+ generic framework for the sac tests. the config and lib
+ expect code for specific platforms tie it all together.
+
+ * testsuite/libm.sac/test_is.c:
+ changed the output of the test to be consistant with the
+ other tests. parsing of pass nad fail messages is now fixed.
+
+Fri Jul 23 19:20:07 1993 Per Bothner (bothner@kalessin)
+
+ * libc/include/{assert.h, ctype.h, dirent.h, errno.h, fastmath.h,
+ locale.h, math.h, pwd.h, reent.h, setjmp.h, signal.h, stdio.h,
+ stdlib.h, string.h, termios.h, time.h, utime.h, utmp.h}: For C++:
+ #ifdef __cplusplus, surround by extern ""C { ... }.
+ * libc/include/assert.h: Do *not* protect assert.h against
+ multiple inclusion! Also, #undef it before #define, to allow
+ redefinition.
+ * libc/include/stdio.h (getlogin, cuserid): Removed. These
+ should be only in unistd.h.
+
+ * libc/include/sys/{fcntl.h, reent.h, stat.h, time.h, times.h,
+ unistd.h}: For C++: #ifdef __cplusplus, surround by extern ""C {
+ ... }.
+
+Fri Jul 23 10:15:33 1993 Doug Evans (dje@canuck.cygnus.com)
+
+ * libc/machine/sparc/Makefile.in: Must create a library, even
+ if empty.
+
+Wed Jul 21 16:00:37 1993 K. Richard Pixley (rich@sendai.cygnus.com)
+
+ * configure.in: set machine_dir for m88k. edit crt0 definition
+ into makefiles.
+
+ * Makefile.in, libc/Makefile.in (crt0): pull up from lower directories.
+
+ * libc/Makefile.in (all): also build crt0.o.
+
+ * libc/machine/i386/Makefile.in, libc/machine/sparc/Makefile.in,
+ libc/machine/z8k/Makefile.in, libm/Makefile.in (clean): no need
+ to remove CRT0.
+
+ * libc/machine/m88k/Makefile.in (TOP, TARGETLIB): removed.
+ (all): reworked to build in place.
+ (clean): remove lib.a
+ (Makefile): remove redundant ./, call $(SHELL) rather than sh.
+
+ * libc/sys/m88kbug/crt0.c (start): renamed to _start.
+ (_start): key off edata rather than _start_bss.
+
+Wed Jul 21 14:29:47 1993 david d `zoo' zuhn (zoo@cygnus.com)
+
+ * libc/include/sys/unistd.h, libc/include/reent.h,
+ libc/reent/sbrkr.c: change sbrk to return void* instead of char*.
+
+Tue Jul 20 13:19:18 1993 K. Richard Pixley (rich@sendai.cygnus.com)
+
+ * libm/Makefile.in, libc/Makefile.in ($(SUBDIRS)): dollar escape a dollar sign.
+
+ * Makefile.in (libc.a): break into two rules, one for libc.a and
+ one for libc/libc.a. Force subdirs current before rebuilding
+ library.
+ (libm.a): break into two rules, one for libm.a and one for
+ libm/libm.a. Force subdirs current before rebuilding library.
+
+ * libc/Makefile.in (SUBLIBS): fix typo.
+
+ * libc/sys/Makefile.in (all): force descent into subdirs, then
+ rebuild library iff out of of date.
+
+Fri Jul 16 17:47:57 1993 K. Richard Pixley (rich@sendai.cygnus.com)
+
+ Rework so that library is built and then finished rather than
+ being built on each invocation of make.
+
+ * host/any (machine_dir, sys_dir, signal_dir): these are not
+ shared and have been moved to their associated Makefile.in's.
+ (AR_FLAGS): switch to qc which is faster.
+ * configure.in: no longer assign machine_dir for m88k. set
+ stub_dir, stub_lib, & crt0 for m68k*-unknown-{aout,coff}. If
+ stub_dir set, then add to configdirs. add comment about silly
+ configuration.
+ (configdirs): drop stub. It will be added only
+ when needed.
+ (libm_fp_lib, libc_unix_lib, libc_signal_lib, libc_machine_lib,
+ libc_sys_dir, fake_sys_dir, libc_fake_sys_lib, stub_dir,
+ stub_lib, crt0): new variables for tailoring lower level
+ makefiles. Assign accordingly and edit into makefiles.
+ * libm/Makefile.in: updated copyright.
+ (TARGETLIB): removed.
+ (FLAGS_TO_PASS): removed TARGETLIB, machine_dir, sys_dir.
+ (SUBDIRS): removed TARGETDEP_DIRS.
+ (LIBM_FP_LIB, SUBLIBS): new macros.
+ (all): reworked.
+ (force): new target to force rebuilds.
+ (Makefile): call $(SHELL) rather than sh. drop redundant ./
+ * libc/sys/a29khif/Makefile.in, libc/sys/decstation/Makefile.in,
+ libc/sys/go32/Makefile.in, libc/sys/h8300hms/Makefile.in,
+ libc/sys/h8500hms/Makefile.in, libc/sys/m88kbug/Makefile.in,
+ libc/sys/sh/Makefile.in, libc/sys/sparc64/Makefile.in,
+ libc/sys/sun4/Makefile.in, libc/sys/sysvi386/Makefile.in,
+ libc/sys/sysvnecv70/Makefile.in, libc/sys/z8ksim/Makefile.in,
+ stub/m68kmvme/Makefile.in: updated copyright.
+ (TARGETLIB, TARGETCRT0, CRT0): macros removed.
+ (all): reworked. made this the default rule.
+ (clean): also remove lib.a.
+ (Makefile): call $(SHELL) rather than sh. drop redundant ./
+ * stub/Makefile.in: updated copyright.
+ (TARGETLIB, TARGETCRT0, CRT0, TOP): removed.
+ (stub_lib): new macro.
+ (FLAGS_TO_PASS): removed TARGETLIB, stub_dir, TARGETCRT0. Added
+ RANLIB.
+ (all): reworked.
+ (clean, install): assume stub_dir exists.
+ (Makefile): depend on configure.in. call $(SHELL) rather than
+ sh. drop redundant ./
+ * stub/configure.in (stublib): new macro, assign it, edit it into
+ makefiles.
+ * Makefile, libc/Makefile.in, doc/Makefile.in, libc/sys/Makefile.in:
+ updated copyright.
+ (all): reworked.
+ (Makefile): call $(SHELL) rather than sh. drop redundant ./
+ * libc/Makefile.in (TARGETCRT0): removed.
+ (FLAGS_TO_PASS): dropped TARGETLIB, machine_dir, sys_dir,
+ TARGETCRT0.
+ (SUBDIRS): drop TARGETDEP_DIRS.
+ (LIBC_SIGNAL_LIB, LIBC_SYS_LIB, LIBC_MACHINE_LIB, LIBC_UNIX_LIB,
+ LIBC_FAKE_SYS_LIB, SUBLIBS): new macros for configuration.
+ (force): new target to force rebuilds.
+ * libc/sys/Makefile.in (TARGETCRT0, sys_dir): removed.
+ (FLAGS_TO_PASS): TARGETLIB, machine_dir, sys_dir, TARGETCRT0
+ removed.
+ (clean): assume sys_dir always exists.
+ * libm/test/Makefile.in (Makefile): call $(SHELL) rather than sh.
+ drop redundant ./
+ * libc/ctype/Makefile.in, libc/errno/Makefile.in,
+ libc/locale/Makefile.in, libc/machine/Makefile.in,
+ libc/machine/a29k/Makefile.in, libc/machine/h8300/Makefile.in,
+ libc/machine/h8500/Makefile.in, libc/machine/i386/Makefile.in,
+ libc/machine/i960/Makefile.in, libc/machine/m68k/Makefile.in,
+ libc/machine/mips/Makefile.in, libc/machine/necv70/Makefile.in,
+ libc/machine/sh/Makefile.in, libc/machine/sparc/Makefile.in,
+ libc/machine/z8k/Makefile.in, libc/reent/Makefile.in,
+ libc/signal/Makefile.in, libc/stdio/Makefile.in,
+ libc/stdlib/Makefile.in, libc/string/Makefile.in,
+ libc/sys/Makefile.in, libc/syscalls/Makefile.in,
+ libc/time/Makefile.in, libc/unix/Makefile.in,
+ libm/ieeefp/Makefile.in, libm/math/Makefile.in: updated copyright.
+ (TARGETLIB): removed.
+ (all): reworked.
+ (clean): also remove lib.a.
+ (Makefile): call $(SHELL) rather than sh. drop redundant ./
+ * Makefile.in: (machine_dir, sys_dir, stub_dir, stub_lib, CRT0):
+ new macros.
+ (SUBDIRS): moved to follow frag inclusion, change stub to
+ stub_dir.
+ (FLAGS_TO_PASS): removed machine_dir, sys_dir, signal_dir which
+ are now set in the libc Makefile.
+ * libc/machine/Makefile.in (TARGETCRT0, machine_dir): removed.
+ (FLAGS_TO_PASS): removed TARGETLIB, machine_dir, sys_dir,
+ TARGETCRT0.
+ (force): new target to force rebuilds.
+ * stub/configure.in: determine and set stub_lib for for Makefile.
+
+Thu Jul 15 12:01:27 1993 Doug Evans (dje@canuck.cygnus.com)
+
+ * libc/sys/h8300hms/Makefile.in: Make `all' the default target.
+ crt0.s renamed to crt0.S.
+ * libc/sys/h8300hms/crt0.S: Add h8/300h support.
+
+ * libc/machine/h8300/Makefile.in: Make `all' the default target.
+ * libc/machine/h8300/{cmpsi.S,ucmpsi.S}: #ifdef out entire file if
+ h8300h.
+ * libc/machine/h8300/defines.h: Add macros to handle pointers for
+ h8300 (16 bits) and h8300h (32 bits).
+ * libc/machine/h8300/{divsi3.S,mulsi3.S,memcpy.S,memset.S,
+ reg_memcpy.S,reg_memset.S,strcmp.S}: Add h8300h support.
+
+Thu Jul 15 10:13:29 1993 Ian Lance Taylor (ian@cygnus.com)
+
+ * libc/machine/m88k/setjmp.S, Makefile.in: New files; a simple
+ implementation of setjmp and longjmp for the m88k.
+ * libc/include/machine/setjmp.h: Added __m88000__ case.
+
+Wed Jul 14 10:10:30 1993 Doug Evans (dje@canuck.cygnus.com)
+
+ * configure.in: Recognize h8300h as variant of h8300.
+
+Tue Jul 13 12:24:11 1993 Steve Chamberlain (sac@phydeaux.cygnus.com)
+
+ * libc/include/sys/unistd.h (read, write): get prototypes right.
+ (sbrk): New prototype.
+ * libc/reent/sbrkr.c (sbrkr): Use correct sbrk prototype.
+ * libc/stdio/local.h: Include unistd.h.
+ * libc/machine/h8300/syscalls.c: Names have changed.
+
+Mon Jul 12 18:08:42 1993 K. Richard Pixley (rich@cygnus.com)
+
+ * configure.in: add sys_dir assignment for m88k-bug.
+
+Thu Jul 8 09:16:21 1993 Doug Evans (dje@canuck.cygnus.com)
+
+ * libc/sys/sparc64/sys/syscallasm.h: New macros to handle either
+ a.out or elf.
+ * libc/sys/sparc64: all *.S files: Use new macros.
+ * libc/sys/sparc64/isatty.c: New file.
+ * libc/sys/sparc64/Makefile.in: Stop using /lib/libc.a for
+ functions beyond what newlib provides.
+
+Thu Jul 8 09:11:28 1993 Doug Evans (dje@canuck.cygnus.com)
+
+ * libc/include/sys/stat.h: Move st_atime so not doubly defined for
+ svr4.
+
+Thu Jul 8 09:09:16 1993 Doug Evans (dje@canuck.cygnus.com)
+
+ * libc/include/machine/ieeefp.h: Add support for h8/300h.
+
+Fri Jul 2 10:11:20 1993 K. Richard Pixley (rich@cygnus.com)
+
+ * configure.in: add m88k.
+ * libc/include/machine/ieeefp.h: add case for m88k. Also add
+ sanity check so no one else need ever chase what I did to find
+ this.
+
+ * libm/math/Makefile.in (FAKEC): added atanf.c log1pf.c scalbnf.c.
+
+Fri Jul 2 09:15:21 1993 Ian Lance Taylor (ian@cygnus.com)
+
+ * doc/makedoc.c: Include <ctype.h>.
+
+Wed Jun 30 09:35:06 1993 Doug Evans (dje@canuck.cygnus.com)
+
+ * libc/Makefile.in (FLAGS_TO_PASS): Add TARGET_ASFLAGS.
+ * libc/sys/Makefile.in (FLAGS_TO_PASS): Add TARGET_ASFLAGS.
+ * libc/machine/Makefile.in (FLAGS_TO_PASS): Add TARGET_ASFLAGS.
+
+ * libm/test/Makefile.in (all): Link with ../../lib[cm].a.
+
+Sun Jun 27 17:05:20 1993 Doug Evans (dje@sphagnum.cygnus.com)
+
+ * libc/include/errno.h (ENOSYS): Added.
+
+ * libc/unix/getpwd.c (getcwd): Fix typo (_up -> up).
+
+Mon Jun 21 09:03:32 1993 Steve Chamberlain (sac@phydeaux.cygnus.com)
+
+ * libc/stdio/fflush.c (fflush): Check for reent struct
+ initialization.
+ * libc/stdio/fdopen.c (fdopen): Avoid namespace conflict.
+
+Fri Jun 18 16:06:05 1993 Mark Eichin (eichin@rtl.cygnus.com)
+
+ * libc/stdlib/dtoastub.c: new file -- move user callable "dtoa"
+ out of dtoa.c so it doesn't pollute the namespace.
+ * libc/include/_syslist.h: new file -- mappings from _function to
+ function, for systems where we can't win (by default, all of them,
+ until we start updating system calls.)
+ * libc/syscalls: new directory -- stubs for exporting _function
+ names as unmodified function names.
+ * libc/configure.in: add MISSING_SYSCALL_NAMES to enable
+ _syslist.h on all platforms by default, but put hooks in for
+ fake_sys_dir so we can include it when we've renamed the system
+ calls.
+ * libc/reent/execr.c libc/reent/filer.c libc/reent/fstatr.c
+ libc/reent/linkr.c libc/reent/sbrkr.c libc/reent/statr.c
+ libc/signal/raise.c libc/signal/signal.c libc/stdio/fdopen.c
+ libc/stdio/mktemp.c libc/stdio/tmpnam.c libc/stdlib/abort.c
+ libc/stdlib/system.c libc/unix/getcwd.c libc/unix/getlogin.c
+ libc/unix/getpass.c libc/unix/getut.c libc/unix/ttyname.c: change
+ non ANSI functions to call _function.
+
+Wed Jun 9 09:48:26 1993 Ian Lance Taylor (ian@cygnus.com)
+
+ * libc/stdlib/strtoul.c (_strtoul_r): Handle leading 0 correctly
+ when base 16 is specified. Don't accept non-digits if radix > 10.
+
+Thu Jun 3 10:01:15 1993 Doug Evans (dje@canuck.cygnus.com)
+
+ * libc/include/math.h: Rename xxx_r fns to _xxx_r.
+
+Wed Jun 2 16:54:16 1993 Jim Wilson (wilson@sphagnum.cygnus.com)
+
+ * libc/include/sys/stat.h: Surround text after #endif with
+ comments.
+
+Wed Jun 2 12:47:32 1993 Ian Lance Taylor (ian@cygnus.com)
+
+ * libc/stdlib/mallocr.c: If MALLOC_PROVIDED is defined, just make
+ _malloc_r, _realloc_r, and free_r call the corresponding
+ non-reentrant functions.
+
+ * libm/math/modf.c (modf): We now take the address of ipart, so
+ don't make it a register variable.
+
+Tue Jun 1 18:25:54 1993 Doug Evans (dje@canuck.cygnus.com)
+
+ * libm/math/*: Rename all xxx_r fns to _xxx_r.
+
+Wed May 26 22:06:35 1993 Roland H. Pesch (pesch@cygnus.com)
+
+ * libc/libc.texinfo and embedded docn throughout: formatting
+ improvements, minor rephrasing for clarity, and improved
+ reentrancy docn.
+
+Sun May 23 17:29:49 1993 Steve Chamberlain (sac@thepub.cygnus.com)
+
+ * libm/ieeefp/infinity.c (maxpowtwof): Fix initialzation bug.
+
+ * libc/stdio/cvt.c (_licvt): Print the right value on machines
+ where sizeof(int) != sizeof(long).
+
+Fri May 21 22:09:32 1993 Roland H. Pesch (pesch@fowanton.cygnus.com)
+
+ * libc/reent/execr.c, libc/reent/filer.c, libc/reent/linkr.c,
+ libc/reent/sbrkr.c, libc/reent/statr.c, libc/stdio/tmpnam.c,
+ libc/stdlib/atol.c, libc/stdlib/rand.c, libc/string/strpbrk.c,
+ libc/string/strspn.c, libm/ieeefp/isnan.c, libm/math/bessel.c,
+ libm/math/matherr.c: changes for better docn formatting (info).
+
+ * libc/libc.texinfo, libc/ctype/ctype.tex, libc/locale/locale/tex,
+ libc/reent/reent.tex, libc/signal/signal.tex,
+ libc/stdio/stdio.tex, libc/stdlib/stdlib.tex,
+ libc/string/strings.tex, libc/sys/sys.tex, libc/time/time.tex,
+ libm/libm.texinfo, libm/ieeefp/ieeefp.tex, libm/math/math.tex: use
+ makeinfo node defaulting to get better Info file node structure.
+ (Requires recent sac change to doc/makedoc.c and doc/doc.str.)
+ Also include a few formerly missing sections (subroutines).
+
+ * doc/doc.str: delete fossil expansion for "func"
+
+ * default.menu, no-signal.menu: delete.
+
+ * Makefile.in, libc/Makefile.in, configure.in, host/any: simplify
+ method used to adjust doc for missing "signals" chapter when
+ signal_dir is empty.
+
+Thu May 20 21:38:37 MDT 1993 Jeffrey Wheat (cassidy@cygnus.com)
+
+ * configure.in: added testsuite/libm.sac
+
+Wed May 19 14:52:34 1993 Doug Evans (dje@thepub.cygnus.com)
+
+ * libc/sys/sparc64/crt0.S: Set %g4 to 0 (to test Medium/Anywhere
+ code model).
+
+Tue May 18 13:17:21 1993 Ian Lance Taylor (ian@cygnus.com)
+
+ * libm/Makefile.in: Use $(MAKE) rather than make, and define
+ MAKEOVERRIDES to be empty.
+
+Mon May 17 08:42:44 1993 Ian Lance Taylor (ian@cygnus.com)
+
+ * configure.in: Don't build mips-*-* with -msoft-float, since that
+ makes it incompatible with hard floating point.
+
+Mon May 17 00:03:35 MDT 1993 Jeffrey Wheat (cassidy@cygnus.com)
+
+ * Makefile.in: added recursive 'make check'
+
+Thu May 13 16:24:18 MDT 1993 Jeffrey Wheat (cassidy@cygnus.com)
+
+ * configure.in: added ./testsuite ./testsuite/libm.paranoia
+ * ./testsuite/Makefile.in: created
+ * ./testsuite/libm.paranoia: paranoia tests added
+
+Thu May 13 10:30:24 1993 Ian Lance Taylor (ian@cygnus.com)
+
+ * configure.in: For mips-*-* set machine_dir to mips.
+
+ * libc/machine/mips: New directory.
+ * libc/machine/mips/Makefile.in: New file.
+ * libc/machine/mips/setjmp.S: New file; simplistic MIPS version of
+ setjmp and longjmp.
+ * libc/include/machine/setjmp.h: Added __mips__ case.
+
+ * libc/machine/lmips: Removed unused and useless directory.
+
+Mon May 3 10:22:31 1993 Ian Lance Taylor (ian@cygnus.com)
+
+ * configure.in: Accept i486-*-sco* as well as i386-*-sco*.
+
+Thu Apr 15 15:16:44 1993 Doug Evans (dje@canuck.cygnus.com)
+
+ * libc/sys/sparc64/crt0.S: Add comment (%g1 contains atexit arg at
+ start up).
+
+Fri Apr 9 13:32:26 1993 Ian Lance Taylor (ian@cygnus.com)
+
+ * libc/include/machine/setjmp-dj.h: Use _SETJMP_DJ_H rather than
+ SETJMP_H.
+
+Thu Apr 8 10:07:18 1993 Doug Evans (dje@canuck.cygnus.com)
+
+ * libm/test/convert.c: structure member errno -> errno_val.
+ Must include <errno.h> to use errno, it's a macro now.
+ * libm/test/math.c: Ditto.
+ * libm/test/math2.c: Include errno.h.
+ * libm/test/string.c: Ditto.
+ * libm/test/test.h: structure member errno -> errno_val.
+ Remove extern int errno decl.
+
+Thu Apr 8 07:56:33 1993 Ian Lance Taylor (ian@cygnus.com)
+
+ * libc/stdio/Makefile.in: Added dependencies on local header
+ files.
+ * libc/stdio/std.h, libc/stdio/vfprintf.h: Removed unused header
+ files.
+
+Wed Apr 7 16:19:32 1993 Ian Lance Taylor (ian@cygnus.com)
+
+ * libc/include/machine/ieeefp.h: Added __MIPSEB__ case.
+
+Wed Apr 7 10:55:21 1993 Doug Evans (dje@canuck.cygnus.com)
+
+ * libc/stdio/siprintf.c libc/stdio/sscanf.c libc/stdio/vsprintf.c:
+ Initialize _data.
+
+ * libc/stdio/vfprintf.c: No need to declare _icvt, _licvt, _sicvt.
+ * libc/stdio/local.h: Add prototype for _licvt.
+
+ * libc/stdio/ungetc.c (__submore): Use _malloc_r,_realloc_r
+ instead of malloc,reealloc.
+
+ * libc/stdlib/local.h: New file.
+ * libc/stdlib/efgcvt.c: #include local.h.
+ (gcvt): Fix call to _gcvt.
+ * libc/stdlib/ecvtbuf.c: #include local.h.
+
+ * libc/stdlib/Makefile.in: new files mallocr.c mstats.c.
+ * libc/stdlib/mallocr.c mstats.c malloc.h: New files.
+ * libc/stdlib/malloc.c: main routines moved to mallocr.c.
+
+ * libc/stdlib/atexit.c: moved global data to struct _reent.
+ * libc/stdlib/exit.c: use struct _atexit in struct _reent.
+
+ * libc/reent/reent.c (inpure_data): _REENT_INIT macro modified.
+
+Wed Apr 7 09:41:50 1993 Doug Evans (dje@canuck.cygnus.com)
+
+ * libc/include/sys/reent.h: Stuff required by ANSI headers moved
+ here from ../reent.h.
+
+Tue Apr 6 12:56:01 1993 Ian Lance Taylor (ian@cygnus.com)
+
+ * Makefile.in (MATHOBJS_IN_LIBC): List of object files which
+ should be provided in both libc.a and libm.a.
+ (libc.a): Depend on targ-include and libm.a. Copy
+ $(MATHOBJS_IN_LIBC) from libm.a to libc.a.
+ (libm.a): Depend on targ-include.
+ * configure.in (subdirs): Removed libc/math.
+
+Mon Apr 5 10:18:16 1993 Steve Chamberlain (sac@thepub.cygnus.com)
+
+ * libm/ieeefp/infinity.c (maxpowtwo): Fix initialization bug.
+
+Sat Apr 3 11:06:07 1993 Doug Evans (dje@canuck.cygnus.com)
+
+ * libc/include/{errno.h, math.h, stdio.h, stdlib.h}: Use
+ sys/reent.h instead of reent.h.
+ * libc/include/reent.h: Split into two parts: stuff needed by ANSI
+ headers moved to sys/reent.h.
+ * libc/include/signal.h: _MAX_SIGNALS moved to sys/signal.h.
+ * libc/include/sys/signal.h: Define _MAX_SIGNALS if
+ __need__MAX_SIGNALS defined.
+ * libc/include/stdio.h: struct __sFILE moved to sys/reent.h.
+ std{in,out,err} refer to new _std{in,out,err} members.
+
+Fri Apr 2 11:27:12 1993 Doug Evans (dje@canuck.cygnus.com)
+
+ * libc/include/sys/signal.h: #define _SYS_SIGNAL_H for general
+ case.
+
+Fri Apr 2 09:41:10 1993 Doug Evans (dje@canuck.cygnus.com)
+
+ * libc/sys/sparc64/execve.S (execve): Insert nop in delay slot,
+ rather than whatever macro seterrno() has.
+
+Thu Apr 1 16:47:08 1993 Doug Evans (dje@canuck.cygnus.com)
+
+ * libc/locale/locale.c: Reentrant routines _r_xxx renamed to
+ _xxx_r. struct reent_struct renamed to struct _reent for ANSI.
+
+ * libc/include/machine/fastmath.h: Use _HAVE_STDC instead of
+ __STDC__.
+
+ * libc/reent/{execr.c, filer.c, fstatr.c, linkr.c, reent.c,
+ reent.tex, sbrkr.c, statr.c}: _r_xxx reentrant routines renamed to
+ _xxx_r. struct reent_struct renamed to struct _reent for ANSI.
+
+ * libc/signal/signal.c: Reentrant routines _r_xxx renamed to
+ _xxx_r. struct reent_struct renamed to struct _reent for ANSI.
+
+ * libc/stdio/{fclose.c, fdopen.c, findfp.c, fiprintf.c, flags.c,
+ fopen.c, fprintf.c, freopen.c, fscanf.c, fseek.c, ftell.c,
+ fwalk.c, getchar.c, gets.c, iprintf.c, local.h, makebuf.c,
+ mktemp.c, perror.c, printf.c, putchar.c, puts.c, refill.c,
+ remove.c, rename.c, scanf.c, setvbuf.c, siprintf.c, sprintf.c,
+ sscanf.c, stdio.c, tmpfile.c, tmpnam.c, vfprintf.c, vfprintf.h,
+ vfscanf.c, vprintf.c, vsprintf.c}: Reentrant routines _r_xxx
+ renamed to _xxx_r. struct reent_struct renamed to struct _reent
+ for ANSI. structure members given leading "_" for ANSI. Use
+ _HAVE_STDC instead of __STDC__ and _HAVE_STDARG.
+
+ * libc/stdlib/{__adjust.c, calloc.c, dtoa.c, ecvtbuf.c, malloc.c,
+ mprec.c, mprec.h, rand.c, std.h, strtod.c, strtol.c, strtoul.c,
+ system.c}: Reentrant routines _r_xxx renamed to _xxx_r. struct
+ reent_struct renamed to struct _reent for ANSI.
+ Structure members given leading "_" for ANSI.
+ _CONST --> const in prototypes.
+ Use _HAVE_STDC instead of __STDC__.
+
+ * libc/string/strtok.c: Reentrant routines _r_xxx renamed to
+ _xxx_r.
+ struct reent_struct renamed to struct _reent for ANSI.
+ Structure members given leading "_" for ANSI.
+
+ * libc/time/asctime.c: Reentrant routines _r_xxx renamed to
+ _xxx_r.
+ struct reent_struct renamed to struct _reent for ANSI.
+
+ * libm/math/{acos.h, acosh.h, asin.c, asinh.h, atanh.h, bessel.h,
+ cbrt.h, cosh.h, erf.c, erf.h, error.c, exp.c, fmod.c, frexp.h,
+ gamma.h, hypot.h, ldexp.c, log.h, log10.c, log1p.c log2.c,
+ mathimpl.h, pow.c, remainder.c, sincos.c, sinh.h, sqrt.h, tan.c,
+ tanh.h}: struct reent_struct renamed to struct _reent for ANSI.
+
+ * libc/include/{_ansi.h, ctype.h, math.h, reent.h, locale.h,
+ signal.h, stdio.h, stdlib.h, string.h, time.h}:
+ Use _HAVE_STDC instead of __STDC__ and _HAVE_STDARG.
+ #ifndef _STRICT_ANSI non-ANSI routines.
+ Reentrant routines renamed from _r_xxx to _xxx_r.
+ No need to use _STRICT_ANSI on _xxx_r reentrant routines.
+ Use _STRICT_ANSI instead of __STRICT_ANSI, _ANSI_SOURCE, etc.
+ Clean up namespace (structure members have leading "_").
+ struct reent_struct renamed to struct _reent for ANSI compliance.
+ _CONST --> const in function prototypes.
+
+ * libc/include/string.h: Add NULL and size_t.
+
+ * libc/sys/sparc64/Makefile.in: New syscall routines for link,
+ unlink, wait, wait4. Reentrant syscall routines close, fork,
+ fstat, link, lseek, open, read, sbrk, stat, unlink, wait, wait4,
+ write.
+ * libc/sys/sparc64/cerror.S (cerror_r): New routine.
+ * libc/sys/sparc64/{close.S, fork.S, fstat.S, link.S, lseek.S,
+ open.S, read.S, sbrk.S, stat.S, unlink.S, wait.S, wait4.S,
+ write.S}: Define reentrant versions.
+ * libc/sys/sparc64/sys/syscallasm.h (defsyscall_r): New macro for
+ reentrant syscalls.
+
+ * libc/sys/sparc64/crt0.S (start): Fix initialization of environ.
+
+ * libc/include/stdlib.h (RAND_MAX): Fix value.
+
+Thu Apr 1 12:28:30 1993 Ian Lance Taylor (ian@cygnus.com)
+
+ * libc/sys/a29khif/_main.c: Removed unnecessary file.
+ * libc/sys/a29khif/Makefile.in (OFILES): Removed _main.c, moved
+ VPATH support targets after all: target.
+
+ * stub/mvme135/mvme.S: Renamed exceptionhandler to
+ exceptionHandler, which is what mvme135-stub.c expects.
+
+Wed Mar 31 17:42:03 1993 Doug Evans (dje@cygnus.com)
+
+ * libc/stdio/tmpnam.c (worker): Fix test for _r_open() failure.
+
+ * libc/unix/getpass.c (getpass): Use stdin,stderr instead of
+ def_stdin/def_stderr (latter removed from stdio.h to make it ANSI
+ compliant).
+
+Tue Mar 30 09:58:21 1993 Doug Evans (dje@canuck.cygnus.com)
+
+ * libc/reent/execr.c (_r_wait): Re-order args to make reent_struct
+ first.
+ libc/reent/filer.c (_r_open, _r_close, _r_lseek, _r_read,
+ _r_write): Ditto.
+ libc/reent/fstatr.c (_r_fstat): Ditto.
+ libc/reent/linkr.c (_r_link, _r_unlink): Ditto.
+ libc/reent/sbrkr.c (_r_sbrk): Ditto.
+ libc/reent/statr.c (_r_stat): Ditto.
+
+ * libc/stdio/fopen.c (_r_fopen): Re-order args to _r_open.
+ * libc/stdio/freopen.c (freopen): Ditto for _r_open, _r_free.
+ * libc/stdio/fseek.c (fseek): Ditto for _r_fseek.
+ * libc/stdio/makebuf.c (__smakebuf): Ditto for _r_fstat.
+ * libc/stdio/mktemp.c (_gettemp): Ditto for _r_stat, _r_open.
+ * libc/stdio/remove.c (_r_remove): Ditto for _r_unlink.
+ * libc/stdio/rename.c (_r_rename): Ditto for _r_link, _r_unlink.
+ * libc/stdio/stdio.c (__sread): Ditto for _r_read.
+ (__swrite): Ditto for _r_lseek, _r_write.
+ (__sseek): Ditto for _r_lseek.
+ (__close): Ditto for _r_close.
+ * libc/stdio/tmpnam.c (worker): Ditto for _r_open, _r_close.
+
+ * libc/stdlib/malloc.c (_r_morecore): Re-order args to _r_sbrk.
+ * libc/stdlib/system.c (_r_system): Ditto for _r_wait.
+
+ * libc/include/reent.h: Re-order arguments to _r_xxx syscall fns
+ to make reent_struct the first argument (and thus consistent with
+ the rest of newlib).
+
+ * stub/mvme135/mvme135-stub.c (initializeRemcomErrorFrame): Remove
+ reference to __STDC__.
+
+Mon Mar 29 12:34:32 1993 Doug Evans (dje@canuck.cygnus.com)
+
+ * libc/stdlib/exit.c (exit): Use _REENT->__cleanup instead of
+ global __cleanup.
+
+Wed Mar 24 11:54:35 1993 Doug Evans (dje@canuck.cygnus.com)
+
+ * libc/stdio/freopen.c (freopen): Ensure stdio is initialized
+ first.
+ libc/stdio/fclose.c (fclose): Ditto.
+
+Tue Mar 23 01:26:52 1993 Doug Evans (dje@rtl.cygnus.com)
+
+ * Run through indent and rename reentrant routines for ANSI.
+ libc/stdio/{clearerr.c cvt.c fclose.c fdopen.c feof.c ferror.c
+ fflush.c fgetc.c fgetpos.c fgets.c findfp.c fiprintf.c flags.c
+ fopen.c fprintf.c fputc.c fputs.c fread.c freopen.c fscanf.c
+ fseek.c fsetpos.c ftell.c fvwrite.c fwalk.c fwrite.c getc.c
+ getchar.c gets.c iprintf.c makebuf.c mktemp.c perror.c printf.c
+ putc.c putchar.c puts.c refill.c remove.c rename.c rewind.c rget.c
+ scanf.c setbuf.c setvbuf.c siprintf.c sprintf.c sscanf.c stdio.c
+ tmpfile.c tmpnam.c ungetc.c vfprintf.c vfscanf.c vprintf.c
+ vsprintf.c wbuf.c wsetup.c local.h}
+
+ * libc/locale/locale.c: Reformat and rename for ANSI, GNU style.
+
+ * Run through indent and rename xxx_r fns to _r_xxx for ANSI.
+ libc/stdlib/{__adjust.c __exp10.c __ten_mu.c abort.c abs.c
+ assert.c atexit.c atof.c atoi.c atol.c bsearch.c calloc.c div.c
+ dtoa.c ecvtbuf.c efgcvt.c exit.c getenv.c labs.c ldiv.c malloc.c
+ mbtowc.c mprec.c putenv.c qsort.c rand.c setenv.c strdup.c
+ strtod.c strtol.c strtoul.c system.c wctomb.c mprec.h}
+
+ * Run through indent.
+ libc/string/{bcmp.c bcopy.c bzero.c index.c memchr.c memcmp.c
+ memcpy.c memmove.c memset.c rindex.c strcat.c strchr.c strcmp.c
+ strcoll.c strcpy.c strcspn.c strerror.c strlen.c strncat.c
+ strncmp.c strncpy.c strpbrk.c strrchr.c strspn.c strstr.c strtok.c
+ strxfrm.c}
+
+ * libc/time/{asctime.c clock.c ctime.c difftime.c gmtime.c
+ localtime.c mktime.c strftime.c time.c}:
+ Run through indent and rename xxx_r (reentrant) fns to _r_xxx for ANSI.
+
+ * Reformatting + renaming (for ANSI, GNU style, consistency).
+ libc/include/{_ansi.h, assert.h, ctype.h, errno.h, fastmath.h,
+ ieeefp.h, locale.h, math.h, paths.h, pwd.h, reent.h, setjmp.h,
+ signal.h, stdio.h, stdlib.h, string.h, time.h, unistd.h}
+
+Fri Mar 19 11:28:01 1993 Doug Evans (dje@cygnus.com)
+
+ * libc/include/stdio.h (stdin_r): Fix.
+
+Fri Mar 19 09:43:48 1993 Ian Lance Taylor (ian@cygnus.com)
+
+ * Makefile.in: Unexport some variables to keep GNU make from
+ putting them in the environment and using up needed ARG_MAX space
+ (a hack is used to let this work with older makes as well).
+
+Tue Mar 16 15:11:08 1993 Ian Lance Taylor (ian@cygnus.com)
+
+ * Makefile.in: Use $(MAKE) rather than make.
+ (MAKEOVERRIDES): Define to be empty.
+ (FLAGS_TO_PASS): Don't pass down LD (it's not used).
+ (libc.a, libm.a): Depend on targ-include.
+ * host/any (LD): Don't define.
+ (INCLUDES): Use targ-include.
+ * stub/Makefile.in (MAKEOVERRIDES): Define to be empty.
+ (FLAGS_TO_PASS): Don't pass down LD (it's not used).
+ * libc/Makefile.in: Use $(MAKE) rather than make.
+ (MAKEOVERRIDES): Define to be empty.
+ (FLAGS_TO_PASS): Don't pass LD (it's not used).
+ (all): Rewrote to be slightly smaller.
+ * libc/machine/Makefile.in, libc/sys/Makefile.in (MAKEOVERRIDES):
+ Define to be empty.
+ (FLAGS_TO_PASS): Don't pass LD (it's not used).
+ * libm/Makefile.in (FLAGS_TO_PASS): Don't pass LD (it's not used).
+
+Mon Mar 15 08:45:41 1993 Ian Lance Taylor (ian@cygnus.com)
+
+ * libc/sys/go32/gerrno.s: Renamed from errno.s to avoid conflict
+ with errno/errno.c.
+
+Fri Mar 12 09:46:54 1993 Ian Lance Taylor (ian@cygnus.com)
+
+ * Changes for reentrancy.
+ libc/stdio/fdopen.c, libc/stdio/freopen.c, libc/stdio/perror.c:
+ Use ptr->_errno, not errno.
+ libc/stdio/mktemp.c (mkstemp_r, mktemp_r): New functions.
+ libc/stdio/remove.c (remove_r): New function.
+ libc/stdio/rename.c (rename_r): New function.
+ libc/stdio/fopen.c, libc/stdio/freopen.c, libc/stdio/fseek.c,
+ libc/stdio/makebuf.c, libc/stdio/mktemp.c, libc/stdio/remove.c,
+ libc/stdio/rename.c, libc/stdio/stdio.c, libc/stdio/tmpnam.c: Use
+ reentrant versions of system calls.
+ libc/stdio/gets.c: Call getchar_f, not nonexistent getchar_r.
+ libc/stdio/scanf.c: Use stdin_r, not nonexistent stdin_n.
+ libc/stdio/tmpfile.c: Use tmpnam_f, not nonexistent tmpnam_r.
+ libc/stdio/findfp.c: Include <string.h>.
+ libc/stdio/fread.c, libc/stdio/rget.c, libc/stdio/scanf.c: Include
+ "local.h".
+ libc/stdio/wbuf.c: Include "fvwrite.h"
+
+ * libc/stdlib/{dtoa.c, ecvtbuf.c, mprec.c, strtod.c}: Include
+ <string.h>.
+ libc/stdlib/malloc.c: Call sbrk_r rather than sbrk.
+ (NULL): Don't define if already defined.
+ libc/stdlib/system.c: Call reentrant versions of system calls.
+ (system_r): New function.
+
+ * Changes for reentrancy.
+ libc/include/_ansi.h (_PARAMS): New macro.
+ libc/include/errno.h: Define errno as a macro that calls __errno.
+ (__errno_r): New macro for reentrant code.
+ libc/include/math.h: Include reent.h. Declare many reentrant
+ functions.
+ (signgam): Now a macro, not a variable.
+ (struct exception): Added err field.
+ libc/include/reent.h: Don't declare __sglue. Added function
+ declarations.
+ (struct reent_struct): Moved errno to beginning. Added _signgam.
+ libc/include/stdio.h, libc/include/stdlib.h: Added function
+ declarations.
+
+ * More reentrancy hacking.
+ libc/errno/errno.c (__errno): New function.
+ libc/reent/execr.c, libc/reent/filer.c, libc/reent/fstatr.c,
+ libc/reent/linkr.c, libc/reent/sbrkr.c, libc/reent/statr.c: New
+ files.
+
+ * Added many new reentrant functions to libm/math/*.
+ libm/math/error.c (__matherror): Added reent_struct pointer
+ argument. Changed all callers.
+ libm/math/gamma.c (signgam): Removed. Set ptr->_signgam, instead.
+ libm/math/exp.h, libm/math/pow.h, libm/math/sincos.h,
+ libm/math/tan.h: Removed obsolete unused header files.
+
+ * libc/sys/a29khif/stubs.s: Use register lr0, not v0.
+
+ * libc/sys/sun/Makefile.in (COPYOFILES): Don't pull in errno.o.
+
+Mon Mar 8 16:43:43 1993 Steve Chamberlain (sac@thepub.cygnus.com)
+
+ * libc/sys/a29khif/stubs.s: clobber safe register, and fill all
+ delay slots.
+
+Tue Mar 2 14:47:00 1993 Jeffrey Osier (jeffrey@fowanton.cygnus.com)
+
+ * libc/libc.texinfo: comment out reentrancy chapter (duh)
+
+Tue Mar 2 14:34:16 1993 Jeffrey Osier (jeffrey@fowanton.cygnus.com)
+
+ * libc/reent/reent.tex: New file. (text from
+ newlib/libc/libc.texinfo)
+ * libc/stdio/tmpnam.c: fixed doc typo
+ * libc/stdlib/rand.c: fixed doc typo
+
+Tue Mar 2 14:34:16 1993 Jeffrey Osier (jeffrey@fowanton.cygnus.com)
+
+ * libc/reent/reent.tex: New file. (text from
+ newlib/libc/libc.texinfo)
+
+Fri Feb 26 12:20:54 1993 Steve Chamberlain (sac@thepub.cygnus.com)
+
+ support for reentrancy
+ * libc/reent/reent.c, libc/reent/Makefile.in, libc/reent/reent.c:
+ new files
+ * libc/errno/errno.c, libc/include/ieeefp.h,
+ libc/include/locale.h, libc/include/reent.h,
+ libc/include/signal.h, libc/include/stdio.h,
+ libc/include/stdlib.h, libc/include/string.h, libc/include/time.h,
+ libc/signal/signal.c libc/stdio/cvt.c, libc/stdio/fclose.c,
+ libc/stdio/fdopen.c, libc/stdio/fflush.c, libc/stdio/fgets.c,
+ libc/stdio/findfp.c, libc/stdio/flags.c, libc/stdio/fopen.c,
+ libc/stdio/fputc.c, libc/stdio/freopen.c, libc/stdio/fseek.c,
+ libc/stdio/ftell.c, libc/stdio/fwalk.c, libc/stdio/getchar.c,
+ libc/stdio/gets.c, libc/stdio/glue.h, libc/stdio/iprintf.c,
+ libc/stdio/local.h, libc/stdio/makebuf.c, libc/stdio/perror.c,
+ libc/stdio/printf.c, libc/stdio/putchar.c, libc/stdio/puts.c,
+ libc/stdio/refill.c, libc/stdio/scanf.c, libc/stdio/setvbuf.c,
+ libc/stdio/sprintf.c, libc/stdio/tmpfile.c, libc/stdio/tmpnam.c,
+ libc/stdio/ungetc.c, libc/stdio/vfprintf.c, libc/stdio/vfprintf.h,
+ libc/stdio/vfscanf.c, libc/stdio/vprintf.c, libc/stdio/wsetup.c,
+ libc/stdlib/__adjust.c, libc/stdlib/__exp10.c,
+ libc/stdlib/assert.c, libc/stdlib/atexit.c, libc/stdlib/atol.c,
+ libc/stdlib/dtoa.c, libc/stdlib/ecvtbuf.c, libc/stdlib/malloc.c,
+ libc/stdlib/mprec.c, libc/stdlib/mprec.h, libc/stdlib/rand.c,
+ libc/stdlib/setenv.c, libc/stdlib/std.h, libc/stdlib/strtod.c,
+ libc/stdlib/strtol.c, libc/stdlib/strtoul.c, libc/string/strtok.c,
+ libc/time/asctime.c, libc/time/localtime.c, libc/time/mktime.c,
+ libc/time/strftime.c: modify to provide reentracy.
+
+ new routines:
+ strtok_r, asctime_r, fdopen_r, _cleanup_r, fopen_r, iprintf_r,
+ perror_r, printf_r, putchar_r, puts_r, scanf_r, sprintf_r,
+ tmpfile_r, vfiprintf_r, vfprintf_r, strtod_r, dtoa_r, rand_r,
+ srand_r, strtoul_r,strtol_r, free_r, malloc_r, morecore_r,
+ mstats_r, realloc_r, localeconv_r, setlocale_r
+
+Wed Feb 17 20:17:15 1993 Mark Eichin (eichin@cygnus.com)
+
+ * libc/include/machine/ieeefp.h, libc/include/machine/setjmp.h,
+ libc/include/sys/config.h, libc/include/sys/signal.h,
+ libc/include/sys/stat.h, libc/include/sys/types.h: For compiler
+ provided macros (such as m68000), use the ansi version
+ (__m68000__) so that the library can be used with code compiled
+ -ansi. In particular, m68000, mc68000, _AM29K, i386, MIPSEL, unix,
+ and sparc.
+
+Wed Feb 17 13:01:34 1993 Jim Wilson (wilson@sphagnum.cygnus.com)
+
+ * configure.in (sparc*): Don't set -fsoft-float for sparc
+ configurations. Do set -fsoft-float for sparclite configurations.
+
+Fri Feb 12 16:25:52 1993 Roland H. Pesch (pesch@fowanton.cygnus.com)
+
+ * default.menu, no-signal.menu: alternate forms of libc main menu
+ (in newlib rather than newlib/libc due to configuration restrictions)
+
+ * configure.in: select one of the two menus above, link to
+ libc.menu
+
+ * libc/libc.texinfo: include menu from separate file
+
+Fri Feb 12 12:50:06 1993 Ian Lance Taylor (ian@cygnus.com)
+
+ * Makefile.in (FLAGS_TO_PASS): Put INSTALL back in.
+ (info): Split long shell command in half.
+ * libc/Makefile.in (info, targetdep.tex): Don't pass everything to
+ sub-makes, just CHEW and TARGETDOC.
+ (targetdep.tex): Removed now special handling of sys and machine
+ subdirectories, made obsolete some time ago.
+ * libc/machine/Makefile.in (doc): Don't pass everything to
+ sub-make, just CHEW and TARGETDOC.
+ (Makefile): New target.
+ * libc/sys/Makefile.in (Makefile): New target.
+
+Thu Feb 11 15:25:15 1993 Ian Lance Taylor (ian@cygnus.com)
+
+ * Makefile.in (here and most subdirectories): Only pass down CHEW
+ and TARGETDOC when making info, not for other targets.
+
+ * Makefile.in (here and most subdirectories), host/any: Use $(AR)
+ $(AR_FLAGS) rather than $(ARUPDATE).
+
+Wed Feb 10 11:57:52 1993 Ian Lance Taylor (ian@cygnus.com)
+
+ * Try to reduce command line length:
+ * Makefile.in (FLAGS_TO_PASS): don't pass down exec_prefix,
+ CC_FOR_BUILD, CFLAGS_FOR_BUILD, INSTALL or CHEW.
+ (info, docs): pass CC_FOR_BUILD and CFLAGS_FOR_BUILD to doc.
+ (info): Pass CHEW to other subdirs.
+
+Tue Feb 9 14:01:42 1993 Mark Eichin (eichin@cygnus.com)
+
+ * configure.in: add signal_dir, like unix_dir, but by default it
+ is set to "signal" so that a29khif can turn it off (since a29khif
+ has raise() as part of machine-specific signal.s.)
+
+Fri Jan 15 12:09:50 1993 Steve Chamberlain (sac@thepub.cygnus.com)
+
+ * libc/sys/config.h, libc/machine/ieeefp.h: add Z8000 support
+ * libc/stdio/Makefile.in: pass CFLAGS so vfiprintf.c gets built
+ correctly.
+ * libc/stdio/fdopen.c, libc/stdio/fgets.c, libc/stdio/fscanf.c,
+ libc/stdio/vfprintf: type lint.
+ * libc/sys/z8ksim/crt0.c (start): Z8001/Z8002 independent
+ initialzation code.
+ * libc/sys/z8ksim/glue.c: Z8001/Z8002 clean system calls.
+
+Tue Dec 29 10:15:33 1992 Ian Lance Taylor (ian@cygnus.com)
+
+ * stub/mvme135/mvme135-asm.S: new file.
+ stub/mvme135mvme135-stub.c: moved all assembler routines into
+ mvme135-asm.S.
+ stub/mvme135/Makefile.in: build mvme135-stub.o.
+
+Mon Dec 28 12:40:43 1992 Ian Lance Taylor (ian@cygnus.com)
+
+ * Makefile.in: don't pass down $(CPP); use $(CC) -E in
+ sub-Makefiles instead, to try to avoid line length limitations.
+
+Mon Dec 21 18:36:13 1992 Per Bothner (bothner@rtl.cygnus.com)
+
+ * libc/include/unistd.h (read, write): Use void* instead of
+ char*.
+
+Thu Dec 17 13:49:46 1992 Mark Eichin (eichin@cygnus.com)
+
+ * stub/go32/resetpc: sample script to send a reset packet to the
+ stub
+
+ * stub/go32/I386STUB.C: new file, gdb/i386stub.c modified for the
+ DOS environment, which compiles with Turbo C.
+
+ * stub/go32/DSER32.LNK: new file, linker commands for serial
+ remote stub.
+
+ * stub/go32/CONTROL.C: turn off debug_mode, add CYGNUS tag line to
+ start up message to identify version; call set_debug_traps.
+
+ * stub/go32/DEBUG.C: turn off debug_mode (so stub doesn't need any
+ keyboard interaction); call handle_exception() in go_til_stop,
+ rather than return, so that the remote stub gets control.
+
+ * stub/go32/MAKEFILE: fixed to actually use DOS commands (del and
+ rename, rather than mv), set flags that work with current Turbo C,
+ including using the /3 flag; also, add commands to build dser32.
+
+ * stub/go32/DEBUG32.LNK, stub/go32/GO32.LNK: fix paths to match
+ default Turbo C installation (\tc rather than \usr)
+
+ * stub/go32/MONO.C (printf): current Turbo C uses "..." instead of
+ "&..."
+
+Mon Dec 14 09:37:33 1992 Steve Chamberlain (sac@thepub.cygnus.com)
+
+ * libc/include/math.h: added _DOUBLE_IS_32BITS checks
+
+Thu Nov 12 22:31:04 1992 Steve Chamberlain (sac@thepub.cygnus.com)
+
+ * libc/stdio/cvt.c (licvt): new function to convert ints when
+ sizeof(int) != sizeof(long).
+
+ * libc/include/stdio.h: added prototype for iprintf.
+ * libc/include/machine/limits.h machine/ieeefp.h: z8k stuff
+
+Tue Nov 10 12:18:12 1992 Ian Lance Taylor (ian@cygnus.com)
+
+ * libc/machine/m68k/setjmp.S: use __USER_LABEL_PREFIX__ and
+ __REGISTER_PREFIX__.
+
+Mon Nov 2 13:50:14 1992 Ian Lance Taylor (ian@cygnus.com)
+
+ * libc/sys/m68kbare: moved into stub directory.
+
+Mon Nov 2 13:40:42 1992 Ian Lance Taylor (ian@cygnus.com)
+
+ * configure.in, Makefile.in: created new directory stub, to hold
+ sample code for specific targets.
+
+Wed Oct 28 02:19:55 1992 Mark Eichin (eichin@cygnus.com)
+
+ * restored libc/sys/go32/sys/fcntl.h, to override incorrect values
+ in the unified libc/include/sys/fcntl.h.
+
+Wed Oct 21 13:55:58 1992 Doug Evans (dje@rtl.cygnus.com)
+
+ * libc/stdlib/ecvtbuf.c: (print_f,_gcvt): printf("%f", 0.01)
+ printed .01, not 0.01.
+
+Mon Oct 19 11:05:55 1992 Ian Lance Taylor (ian@cygnus.com)
+
+ * configure.in: compile with -m68000 for m68* targets.
+
+Sun Oct 18 05:29:05 1992 Mark Eichin (eichin@cygnus.com)
+
+ * libm/math/remainder.c (remainder): document the svr4 and sunos
+ references used to construct the function.
+
+Sat Oct 17 21:46:16 1992 Mark Eichin (eichin@cygnus.com)
+
+ * libm/math/remainder.c (rint, remainder): fix old typos.
+ * libm/math/Makefile.in: actually build remainder.c (functions
+ rint and remainder, from SysVr4 Programmer's Guide floor(3m) man
+ page.)
+
+Thu Oct 15 07:48:05 1992 Ian Lance Taylor (ian@cygnus.com)
+
+ * libc/string/bcopy.c: BSD version works on overlapping strings,
+ so ours should too.
+
+ * libc/stdlib/system.c: always invoke /bin/sh, not getenv
+ ("SHELL").
+
+Wed Oct 14 11:07:11 1992 Ian Lance Taylor (ian@cygnus.com)
+
+ * Makefile.in (docs): new target.
+
+Wed Oct 14 07:44:25 1992 Ian Lance Taylor (ian@cygnus.com)
+
+ * libc/include/sys/times.h: define clock_t as required by POSIX.
+ libc/include/time.h: protect clock_t from multiple definitions.
+
+Wed Oct 7 11:02:21 1992 Mark Eichin (eichin at tweedledumber.cygnus.com)
+
+ * libm/math/sqrt.h (sqrt): actually, the final version of fp-bit
+ does not need more than the original three iterations to get
+ within 1 ulp. (Paranoia tests for rounding to better than that,
+ but further iterations *don't* help, only more subtle changes
+ can.)
+
+Tue Oct 6 09:22:12 1992 Ian Lance Taylor (ian@cygnus.com)
+
+ * libc/sys/vxworks68, libc/sys/vxworks960: removed, since they
+ were doing nothing useful.
+
+Tue Oct 6 08:48:13 1992 Ian Lance Taylor (ian@cygnus.com)
+
+ * configure.in: define MALLOC_PROVIDED for vxworks targets;
+ removed sys_dir settings of vxworks68 and vxworks960.
+ host/any: don't pass -nostdinc to gcc, since newlib no longer
+ provides all required header files.
+
+ * libc/stdlib/malloc.c: only compile this file if MALLOC_PROVIDED
+ is not defined; this provides a hook for VxWorks.
+
+Mon Oct 5 03:44:57 1992 Mark Eichin (eichin at tweedledumber.cygnus.com)
+
+ * libc/stdio/setvbuf.c (setvbuf): while ANSI does say to malloc a
+ buffer if buf is NULL, don't do it here -- it is already being
+ done by makebuf elsewhere in stdio.
+
+Fri Oct 2 13:12:07 1992 Ian Lance Taylor (ian@cygnus.com)
+
+ * libc/sys/a29khif/Makefile.in: assemble Steve's list of stubs so
+ that C programs can call functions without using initial
+ underscores.
+
+Thu Oct 1 09:37:47 1992 Ian Lance Taylor (ian@cygnus.com)
+
+ * libc/stdlib/abort.c (abort): call exit, in case kill returns.
+
+Wed Sep 30 08:22:18 1992 Ian Lance Taylor (ian@cygnus.com)
+
+ * configure.in: set TARGET_CFLAGS for certain CPU types to
+ -msoft-float.
+
+Tue Sep 29 21:09:32 1992 david d `zoo' zuhn (zoo at cirdan.cygnus.com)
+
+ * libc/sys/m68kbare/glue.c: use <_ansi.h> instead of <ansidecl.h>
+
+Mon Sep 28 14:58:44 1992 Ian Lance Taylor (ian@cygnus.com)
+
+ * configure.in: added sys_dir m68kbare for m68k*-unknown-aout and
+ m68k*-unknown-coff.
+
+Fri Sep 25 08:33:21 1992 Ian Lance Taylor (ian@cygnus.com)
+
+ * libc/include/stdio.h: define __need___va_list before including
+ <stdarg.h>, to avoid defining va_arg, et. al.
+
+Tue Sep 22 13:47:00 1992 Ian Lance Taylor (ian@cygnus.com)
+
+ * libc/sys/Makefile.in: handle the case of an empty $(sys_dir)
+ (don't cd to the user's home directory).
+
+ * libc/Makefile.in: replaced all instances of $(MAKE) with make.
+ In general this is the wrong thing to do, but I can't get around
+ GNU make's insistence on passing command line arguments any other
+ way.
+
+Tue Sep 22 10:12:44 1992 Ian Lance Taylor (ian@cygnus.com)
+
+ * configure.in: always configure the libc/sys directory, since it
+ now provides a required documentation file.
+
+ * Makefile.in: replaced all instances of $(MAKE) with make. In
+ general this is the wrong thing to do, but I can't get around GNU
+ make's insistence on passing command line arguments any other way.
+
+Mon Sep 21 22:42:26 1992 Ian Lance Taylor (ian@tweedledumbest.cygnus.com)
+
+ * libc/stdlib/ecvtbuf.c (_gcvt): string for 0 was not null
+ terminated.
+
+ * libc/stdio/local.h: include <stdarg.h> to define va_list.
+ libc/stdio/vsprintf.c: include <stdarg.h> rather than <varargs.h>.
+
+ * libc/include/float.h, libc/include/stdarg.h,
+ libc/include/stddef.h, libc/include/varargs.h: removed; use gcc
+ versions instead.
+ libc/include/stdio.h: get size_t from <stddef.h>, and va_list from
+ <stdarg.h>, not from <machine/types.h>. Protect definition of
+ NULL.
+ libc/include/time.h: get size_t from stddef.h. Protect definition
+ of NULL.
+ libc/include/machine/limits.h: override gcc <limits.h> by defining
+ _LIMITS_H___. Don't define CLK_TCK. Copied in gcc <limits.h> to
+ get correct INT_MIN and LONG_LONG values.
+ libc/include/machine/types.h: don't define ptrdiff_t, wchar_t,
+ size_t or va_list at all; they're now gotten from stddef.h
+ instead.
+ libc/include/machine/varargs.h: removed; use gcc version instead.
+ libc/include/sys/types.h: explicitly include <machine/types.h>.
+
+ * libm/math/sqrt.h: using the fp-bit routines appears to require
+ more iterations.
+
+ * Makefile.in, host/any: let system include files override machine
+ include files.
+
+Sat Sep 19 21:10:06 1992 Mark Eichin (eichin at tweedledumber.cygnus.com)
+
+ * libc/include/machine/types.h: allow __*_TYPE__ from cpp to
+ override _*_T_ definitions defaulted here.
+
+Tue Sep 15 11:14:46 1992 Ian Lance Taylor (ian@cygnus.com)
+
+ * Makefile.in (install): install the include files in
+ $(tooldir)/include, not $(exec_prefix)/include.
+
+Fri Sep 11 15:48:43 1992 Ian Lance Taylor (ian@cygnus.com)
+
+ * Makefile.in (install): fixed typo, and changed install to not
+ force rebuild of libc.a and libm.a.
+
+Thu Sep 10 10:46:09 1992 Ian Lance Taylor (ian@cygnus.com)
+
+ * libc/sys/a29khif/*: Changed all .include's to include
+ sys/sysmac.h, not plain sysmac.h. The header files live in sys so
+ that they will be installed for the user.
+
+ * Makefile.in (all): create targ-include, a directory holding the
+ machine and system specific header files during the build.
+ (install): fixed installation of machine and system specific
+ header files.
+
+ * Makefile.in: fixed comment.
+ host/any: change .s.o rule to use $(AS) rather than $(CC), so that
+ we can pass $(INCLUDES) to it.
+
+Thu Sep 10 10:13:13 1992 Ian Lance Taylor (ian@cygnus.com)
+
+ * libc/include/sys/param.h: new generic file, which may be
+ overridden for specific systems.
+
+ * libc/include/sys/signal.h: define all ANSI signal names, and
+ NSIG (which is not ANSI) for a29k.
+
+Tue Sep 8 09:04:30 1992 Ian Lance Taylor (ian@cygnus.com)
+
+ * Makefile.in: don't pass down arguments the lower level makes
+ will not need.
+ * libc/Makefile.in: recurse directly, rather than using subdir_do,
+ in hopes of avoiding argument length limits.
+ * libm/Makefile.in: recurse directly, rather using subdir_do, in
+ hopes of avoiding argument length limits.
+
+Tue Sep 8 08:27:22 1992 Ian Lance Taylor (ian@cygnus.com)
+
+ * libc/include/sys/fcntl.h: include <sys/types.h> to ensure that
+ mode_t is defined.
+
+Mon Sep 7 14:02:07 1992 Ian Lance Taylor (ian@cygnus.com)
+
+ * Fixed make info and make install-info for newlib, changing most
+ Makefile.in and several *.tex files. Moved doc directory from
+ libc to top level.
+
+ * libc/time/mktime.c (_DAYS_IN_MONTH): actually, not const.
+ Should be rewritten.
+
+ * libc/string/strings.tex: renamed node index to node index
+ function, so that it does not conflict with the top level index
+ node.
+
+ * libc/include/sys/config.h: define __IEEE_BIG_ENDIAN for h8300.
+
+Fri Sep 4 02:34:06 1992 Ian Lance Taylor (ian@cygnus.com)
+
+ * Overhauled general configuration for newlib. Eliminated all
+ target dependent Makefile fragments. Create libraries in newlib
+ rather than newlib/libc and newlib/libm. Use CC, et. al., rather
+ than CROSS_CC, et. al. Broke make docs; will fix later.
+
+ * libc/time/localtime.c (_DAYS_IN_MONTH): actually, not const.
+ Should be rewritten.
+
+Tue Sep 1 15:21:14 1992 Ian Lance Taylor (ian@cygnus.com)
+
+ * libc/configure.in: cleaned up somewhat; switch on ${target}
+ rather than ${target_alias}.
+ * libm/configure.in: cleaned up somewhat; switch on ${target}
+ rather than ${target_alias}.
+
+ * libc/ctype/ctype_.c: marked _ctype_ array _CONST.
+ * libc/include/ctype.h: marked _ctype_ as _CONST.
+
+ * libc/locale/locale.c (lconv, localeconv): marked static lconv as
+ _CONST.
+
+ * libc/stdio/cvt.c, libc/stdio/findfp.c (__sfmoreglue),
+ libc/stdio/vfscanf.c (__svfscanf): made static variables const.
+ libc/stdio/gets.c (gets): removed non-ANSI warning message.
+ libc/stdio/tmpnam.c (tmpnam): removed unneeded filename variable.
+
+ * libc/stdlib/mprec.h, libc/stdlib/mprec.c (pow5mult, tens,
+ bigtens, tinytens): marked arrays _CONST.
+ libc/stdlib/qsort.c (swap): if __GNUC__, use _builtin_alloca
+ rather than a static variable.
+
+ * libc/time/asctime.c (asctime), libc/time/localtime.c
+ (_DAYS_IN_MONTH), libc/time/mktime.c (_DAYS_IN_MONTH,
+ _DAYS_BEFORE_MONTH), libc/time/strftime.c (dname_len, dname,
+ mname_len, mname): Marked static arrays _CONST.
+
+ * libm/math/gamma.h: made local variables non-static.
+
+ * libm/math/acos.h, libm/math/bessel.c, libm/math/erf.c,
+ libm/math/exp.c, libm/math/gamma.h: marked static arrays as
+ _CONST.
+
+ * libm/math/constants.c: removed file, because the constants it
+ defined were never referenced.
+ libm/math/Makefile.in: removed references to constants.c.
+ libm/math/mathimpl.h: removed declarations of constants.
+
+Wed Aug 26 21:09:06 1992 Ian Lance Taylor (ian@cygnus.com)
+
+ * libc/include/machine/varargs.h: only call __builtin_saveregs if
+ it is sensibly defined in libgcc2. Checks preprocessor defines,
+ which is not a good solution.
+
+ * libm/sqrt.c: sqrt(Infinity) should not be a domain error.
+
+ * libm/frexp.c: handle denormalized numbers as arguments.
+
+ * libm/math/Makefile.in: added some dependencies for .c files
+ which include local .h files.
+
+Mon Aug 24 12:57:58 1992 Ian Lance Taylor (ian@cygnus.com)
+
+ * libc/configure.in: set target_alias for OSE*. Replace
+ target_makefile_frag if it is blank.
+
+ * libc/Makefile.in: make sure everything is passed to subsidiary
+ makes; create all directories when installing.
+
+ * libm/ieeefp/Makefile.in, libm/math/Makefile.in: use
+ CROSS_ARUPDATE instead of AR.
+
+ * libm/configure.in: set target_alias for OSE*. Replace
+ target_makefile_frag if it is blank.
+
+ * libm/Makefile.in: make sure everything is passed to subsidiary
+ makes; create all directories when installing.
+
+Thu Aug 20 15:11:51 1992 Mark Eichin (eichin@cygnus.com)
+
+ * add following change from libc copy.
+
+Wed Aug 19 18:54:49 1992 Roland H. Pesch (pesch@fowanton.cygnus.com)
+
+ * libc/libc.texinfo: make copyright disclaimers appear on back of
+ title page; make format of same slightly less ugly; avoid using
+ underbars in section headings (avoids nasty texinfo bug in table
+ of contents).
+
+ * libc/ctype/tolower.c, libc/ctype/toupper.c: (doc changes in
+ comments only) avoid using underbars in section headings
+
+ * libc/ieeefp/ieeefp.tex: include doc from fpsticky, infinity,
+ isnan ieeefp/fpmask.c, ieeefp/fpround.c, ieeefp/fpsticky.c (doc
+ changes in comments only): shorten headings ieeefp/infinity.c,
+ ieeefp/isnan.c: (doc, comments only) more informative headings
+
+ * libc/math/bessel.c: (doc, comments only) shorten heading
+
+ * libc/stdlib/efgcvt.c, libc/stdlib/mbtowc.c, libc/stdlib/wctomb.c
+ (doc, comments only) shorten headings
+
+ * libc/time/localtime.c (doc, comments only): shorten headings
+
+ * libm/ieeefp/ieeefp.tex: include doc from fpsticky, infinity,
+ isnan
+ libm/ieeefp/fpmask.c, libm/ieeefp/fpround.c,
+ libm/ieeefp/fpsticky.c (doc changes in comments only): shorten
+ headings
+ libm/ieeefp/infinity.c, libm/ieeefp/isnan.c: (doc, comments
+ only) more informative headings
+ * libm/math/bessel.c: (doc, comments only) shorten heading
+
+Wed Aug 19 07:06:37 1992 Mark Eichin (eichin at tweedledumber.cygnus.com)
+
+ * .../Makefile.in: use CROSS_ARUPDATE consistently.
+ * config/*.mt: define CROSS_AR as well as CROSS_ARUPDATE
+ * config/*.mt: define CROSS_CPP based on CROSS_CC, not /lib/cpp.
+ * .../Makefile.in: get rid of .c.o rule - if TOP is correctly
+ defined, the one from the .mt file will be correct.
+ * libc/include/machine, libc/include/sys: created, and populated
+ with common files from machine/*/machine. ifdefs were used for
+ most, typically by handling exceptions first and then filling in
+ defaults. Files with D.J. Delorie copyright #included rather than
+ copied. Most files in include/sys really were the same in the
+ original.
+ * libc/include/...: cleaned up use of _EXFUN.
+ * libc/stdlib/mprec.c: mprec.h doesn't get installed, so include
+ it with double quotes, not angles.
+
+Mon Aug 10 11:43:20 1992 Ian Lance Taylor (ian@dumbest.cygnus.com)
+
+ * libc/Makefile.in: always create installation directories.
+
+Sun Aug 9 22:45:48 1992 david d `zoo' zuhn (zoo at cirdan.cygnus.com)
+
+ * libc/configure.in: handle host properly (using canonical
+ triples), better error message for the case of target not found
+
+Thu May 28 01:56:37 1992 Michael Tiemann (tiemann@rtl.cygnus.com)
+
+ * libc/Makefile.in (insincdir): Ensure this directory exists
+ before attempting installation.
+
+Fri May 1 18:16:42 1992 Steve Chamberlain (sac@thepub.cygnus.com)
+
+ * libc/stdlib/assert.c: now calls abort like it should
+ * libc/sys/a29khif: many many patches for 29khif work
+ * libc/machine/i386: gnulib2 expanded there.
+
+Tue Apr 28 19:08:37 1992 Steve Chamberlain (sac@thepub.cygnus.com)
+
+ Added accurate fp conversion routines to stdlib, moved dcvt from
+ stdio to stdlib and called it ecvtbuf:
+ * libc/stdlib/mprec.c, mprec.h: new files for multiprec arithmetic
+ * libc/stdlib/Makefile.in, efgcvt.c, strtod.c: modified to use new
+ routines
+ * libc/libc.texinfo: Modifed to include the copyright info from
+ the mprec files
+ * libc/stdlib/efgcvt.c: now xref to ecvtbuf in stdlib.
+ * libc/test/ : many vector which tested for the implementation
+ defined returns of strange conversion requests have been updated
+ to relflect the new implementation
+
+Mon Apr 27 13:41:33 1992 Roland H. Pesch (pesch@fowanton.cygnus.com)
+
+ * libc/libc.texinfo: new chapter on variable arg lists
+ (stdarg.h/varargs.h)
+ * libc/libc.texinfo: new title
+ * libc/time/gmtime.c, libc/time/localtime./c, libc/time/mktime.c:
+ (doc only) shorter headings for better formatting.
+
+Fri Apr 24 11:26:48 1992 Roland H. Pesch (pesch@fowanton.cygnus.com)
+
+ * libc/libc.texinfo: three more info menu entries
+ * libc/locale/locale.tex: new chapter
+ * libc/locale/locale.c: new doc for setlocale, localeconv
+ * libc/locale/Makefile.in: use new locale doc
+ * libc/signal/signal.tex: new chapter
+ * libc/signal/raise.c, libc/signal/signal.c: new doc
+ * libc/signal/Makefile.in: use new doc
+ * libc/time/time.tex: new chapter
+ * libc/time/asctime.c libc/time/clock.c libc/time/ctime.c
+ libc/time/difftime.c libc/time/gmtime.c libc/time/localtime.c
+ libc/time/mktime.c libc/time/strftime.c libc/time/time.c: new doc
+ * libc/time/Makefile.in: use new doc
+
+Tue Apr 21 14:48:50 1992 Steve Chamberlain (sac@thepub.cygnus.com)
+
+ * libm/math/log1p.c: split to use the new function way of float
+ function definition. math/log1p.h deleted
+ * libm/math/scalb.c: obsolete and deleted
+ * libm/math/scalbn.c: created from part log1p.c
+ * libm/math/Makefile.in: know about log1p and scalbn
+
+Tue Apr 21 12:32:21 1992 Roland H. Pesch (pesch@fowanton.cygnus.com)
+
+ * libc/ctype/isupper.c: revise doc;
+ libc/ctype/ctype.tex: use doc from isupper.c
+
+ * libc/string/bzero.c: new doc
+
+Mon Apr 20 14:19:42 1992 Roland H. Pesch (pesch@fowanton.cygnus.com)
+
+ * libc/stdlib/system.c, libc/stdlib/exit.c, libc/stdlib/abort.c:
+ new doc
+ * libc/stdlib/Makefile.in: extract new doc
+ * libc/stdlib/stdlib.tex: use new doc
+
+ * libc/string/strerror.c: expanded doc.
+
+ * libc/stdio/Makefile.in: extract doc from more files
+ * libc/stdio/fopen.c, libc/stdio/perror.c, libc/stdio/remove.c,
+ libc/stdio/rename.c, libc/stdio/rewind.c, libc/stdio/setbuf.c,
+ libc/stdio/setvbuf.c, libc/stdio/sprintf.c, libc/stdio/tmpfile.c,
+ libc/stdio/tmpnam.c, libc/stdio/vfprintf.c, libc/stdio/vprintf.c,
+ libc/stdio/vsprintf.c: new doc
+ * libc/stdio/stdio.tex: use new doc
+
+Mon Apr 20 09:38:17 1992 Steve Chamberlain (sac@thepub.cygnus.com)
+
+ * libc/config/ebmon29k: added CROSS_CPP rule and other fixes
+ * libc/include/ieeefp.h: fixed ansi conflict with isnanf, isinff,
+ finitef functions.
+ * libc/sys/a29khif/sys/*.h: ansidecl.h was renamed to _ansi.h some
+ time ago.
+
+ * libc/stdio/stdio.h: added P_tmpdir for /tmp (SVID thing)
+ * libc/stdio/setbuf.c: added ansi style definition.
+ * libc/stdio/setvbuf.c: added ansi definition, now mallocs own
+ buffer if none provided.
+ * libc/stdio/tmpfile.c: lint
+ * libc/stdio/tmpnam.c (worker): created. (tmpnam): mallocs buffer
+ rather than using static, also make sure file isn't already
+ present. Uses P_tmpdir. (tempnam): rewritten to use new
+ subroutine, and uses P_tmpdir.
+ * libc/stdio/siprintf.c: created
+
+Mon Apr 13 09:12:58 1992 Steve Chamberlain (sac@thepub.cygnus.com)
+
+ Release 1.03 for NEC, major mods. Main differences from release
+ 1.02::
+
+ More tests in test/:
+ * jn_vec.c, jnf_vec.c, yn_vec.c, ynf_vec.c, log2_vec.c,
+ log2f_vec.c, atan2_vec.c, atan2f_vec.c: new test vectors.
+ * test_ieee.c: tests for ieee flags & masks - get/set rounding,
+ get/set mask, get/set sticky and get/set roundtoi. Tests
+ that setting the bits changes the way arithmetic is done.
+ * string.c: added test to make sure memcmp does it with unsigned
+ chars.
+ * test.c: cleaned up and removed lint.
+ * sprint_vec, sprint_ivec.c, convert.c, conv_vec.c, iconf_vec.c,
+ dvec.c: tests for string to value conversions, sprintf, scanf,
+ atof, atoff, strtod, strtodf, atoi, atol, strtol, ecvtbuf, ecvt,
+ ecvtf, fcvtbuf, fcvt, fcvtf, gcvt, gcvtf. Some attention paid to
+ rounding in sprintf too.
+ * test_is.c: tests for isalnum, isalpha, isascii, iscntrl,
+ isdigit, isgraph, islower, isprint, ispunct, isspace, isupper,
+ isxdigit, toascii, tolower, toupper, _tolower, _toupper in macro
+ and function form.
+ * math2.c: test for frexp, frexpf, ldexp, ldexpf, modf modff, pow,
+ powf
+
+ In the library:
+ * libc/stdlib/div.c, libc/stdlib/ldiv.c, libc/stdlib/strtod.c,
+ libc/stdlib/strtol.c, libc/stdlib/stroul.c, libc/stdlib/abs.c,
+ libc/stdlib/bsearch.c, libc/stdlib/calloc.c, libc/stdlib/getenv.c,
+ libc/stdlib/labs.c, libc/stdlib/malloc.c: new documentation
+ * libc/stdlib/efgcvt.c: rewritten to use new _dcvt routines rather
+ than sprintf.
+ * libc/stdio/dcvt.c: rewritten to make more useful elsewhere.
+ * Method of producting float versions of double functions has
+ changed, functions will be modified gradually. So far:
+ libm/math/exp.c, libm/math/pow.c, libm/math/modf.c,
+ libm/math/sincos.c, libm/math/fmod.c, libm/math/tan.c have been
+ altered
+ * libc/string/memcmp.c: now uses unsigned chars
+ * libc/string/bcmp.c, libc/string/strcpy.c,
+ libc/stsring/strxfrm.c: fixed doc
+ * libc/sys/sysvnecv70.tex: fix example of sbrk code
+
+Local Variables:
+version-control: never
+End:
diff --git a/newlib/HOWTO b/newlib/HOWTO
index 63616200d..c5754e5b8 100644
--- a/newlib/HOWTO
+++ b/newlib/HOWTO
@@ -59,18 +59,17 @@ and PORTABILITY. BUGS and SEEALSO should be added as appropriate.
Source files which contain documentation are processed into ".def"
files with the extracted information. These .def files are noted in the
-makefiles as either CHEWOUT_FILES in the libc makefiles or chobj in the libm
-makefiles. These .def files need to be included into an appropriate .tex
-file for inclusion in the manuals (one each for libc and libm). Pay special
-attention under libc, as the manual is arranged by header file name, but not
-all header files are represented by directories (e.g. wcsftime.c is found
-under libc/time, but goes under wchar.h in the manual.)
+makefiles as CHEWOUT_FILES. These .def files need to be included into an
+appropriate .tex file for inclusion in the manuals (one each for libc and libm).
+Pay special attention under libc, as the manual is arranged by header file name,
+but not all header files are represented by directories (e.g. wcsftime.c is
+found under libc/time, but goes under wchar.h in the manual.)
In summary, to add new documentation:
1. Add properly-formatted comments to source file (e.g. src.c);
-2. add "chewout" file to list in Makefile.am (CHEWOUT_FILES in libc or chobj in
- libm) (e.g. src.def), re-generate Makefile.in;
+2. add "chewout" file to CHEWOUT_FILES list in Makefile.am (e.g. src.def),
+ re-generate Makefile.in;
3. add file to something.tex;
4. make ChangeLog entry and generate patch.
diff --git a/newlib/Makefile.am b/newlib/Makefile.am
index 5ecce4c10..200bc61bd 100644
--- a/newlib/Makefile.am
+++ b/newlib/Makefile.am
@@ -191,7 +191,19 @@ crt1.o: $(CRT1_DIR)$(CRT1)
$(CRT1_DIR)$(CRT1): ; @true
-$(srcdir)/newlib.hin:
+targ-include:
+ mkdir $@
+
+targ-include/newlib.h: targ-include/_newlib_version.h
+
+targ-include/sys targ-include/machine targ-include/bits: targ-include/_newlib_version.h targ-include/newlib.h
+ mkdir $@
+
+targ-include/newlib.h: newlib.h targ-include
+ cp newlib.h $@
+
+targ-include/_newlib_version.h: _newlib_version.h targ-include
+ cp _newlib_version.h $@
all-recursive: stmp-targ-include
@@ -200,8 +212,9 @@ all-recursive: stmp-targ-include
# used while building.
stmp-targ-include: config.status
-rm -rf targ-include stmp-targ-include
- mkdir targ-include targ-include/sys targ-include/machine targ-include/bits
- cp newlib.h targ-include/newlib.h
+ $(MAKE) targ-include/sys \
+ targ-include/machine \
+ targ-include/bits
-for i in $(srcdir)/libc/machine/$(machine_dir)/machine/*.h; do \
if [ -f $$i ]; then \
cp $$i targ-include/machine/`basename $$i`; \
@@ -257,6 +270,7 @@ stmp-targ-include: config.status
cp $$i targ-include/machine/`basename $$i`; \
else true; fi ; \
done
+ $(MAKE) targ-include/newlib.h
touch $@
CLEANFILES = stmp-targ-include
@@ -274,6 +288,7 @@ endif
$(INSTALL_DATA) $$i $(DESTDIR)$(tooldir)/include/`basename $$i`; \
done; \
$(INSTALL_DATA) newlib.h $(DESTDIR)$(tooldir)/include/newlib.h; \
+ $(INSTALL_DATA) _newlib_version.h $(DESTDIR)$(tooldir)/include/_newlib_version.h; \
$(mkinstalldirs) $(DESTDIR)$(tooldir)/include/machine; \
for i in $(srcdir)/libc/include/machine/*.h; do \
$(INSTALL_DATA) $$i $(DESTDIR)$(tooldir)/include/machine/`basename $$i`; \
@@ -441,4 +456,4 @@ check-DEJAGNU: site.exp
fi
clean-local:
- -rm -rf targ-include
+ -rm -rf targ-include newlib.h _newlib_version.h stamp-*
diff --git a/newlib/Makefile.in b/newlib/Makefile.in
index c4b9f8525..c4cc431c9 100644
--- a/newlib/Makefile.in
+++ b/newlib/Makefile.in
@@ -56,8 +56,8 @@ host_triplet = @host@
subdir = .
DIST_COMMON = NEWS README ChangeLog $(srcdir)/Makefile.in \
$(srcdir)/Makefile.am $(top_srcdir)/configure \
- $(am__configure_deps) acconfig.h $(srcdir)/newlib.hin \
- $(srcdir)/../mkinstalldirs
+ $(am__configure_deps) acconfig.h $(srcdir)/_newlib_version.hin \
+ $(srcdir)/newlib.hin $(srcdir)/../mkinstalldirs
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/../libtool.m4 \
$(top_srcdir)/../ltoptions.m4 $(top_srcdir)/../ltsugar.m4 \
@@ -68,7 +68,7 @@ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
configure.lineno config.status.lineno
mkinstalldirs = $(SHELL) $(top_srcdir)/../mkinstalldirs
-CONFIG_HEADER = newlib.h
+CONFIG_HEADER = _newlib_version.h newlib.h
CONFIG_CLEAN_FILES =
CONFIG_CLEAN_VPATH_FILES =
am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
@@ -286,6 +286,7 @@ htmldir = @htmldir@
includedir = @includedir@
infodir = @infodir@
install_sh = @install_sh@
+libc_cv_cc_loop_to_function = @libc_cv_cc_loop_to_function@
libc_cv_initfinit_array = @libc_cv_initfinit_array@
libdir = @libdir@
libexecdir = @libexecdir@
@@ -445,7 +446,7 @@ MAKEOVERRIDES =
# dejagnu support
RUNTESTFLAGS =
-all: newlib.h
+all: _newlib_version.h newlib.h
$(MAKE) $(AM_MAKEFLAGS) all-recursive
.SUFFIXES:
@@ -485,16 +486,28 @@ $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
$(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
$(am__aclocal_m4_deps):
-newlib.h: stamp-h1
+_newlib_version.h: stamp-h1
@if test ! -f $@; then rm -f stamp-h1; else :; fi
@if test ! -f $@; then $(MAKE) $(AM_MAKEFLAGS) stamp-h1; else :; fi
-stamp-h1: $(srcdir)/newlib.hin $(top_builddir)/config.status
+stamp-h1: $(srcdir)/_newlib_version.hin $(top_builddir)/config.status
@rm -f stamp-h1
+ cd $(top_builddir) && $(SHELL) ./config.status _newlib_version.h
+$(srcdir)/_newlib_version.hin: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) $(top_srcdir)/acconfig.h
+ ($(am__cd) $(top_srcdir) && $(AUTOHEADER))
+ rm -f stamp-h1
+ touch $@
+
+newlib.h: stamp-h2
+ @if test ! -f $@; then rm -f stamp-h2; else :; fi
+ @if test ! -f $@; then $(MAKE) $(AM_MAKEFLAGS) stamp-h2; else :; fi
+
+stamp-h2: $(srcdir)/newlib.hin $(top_builddir)/config.status
+ @rm -f stamp-h2
cd $(top_builddir) && $(SHELL) ./config.status newlib.h
distclean-hdr:
- -rm -f newlib.h stamp-h1
+ -rm -f _newlib_version.h stamp-h1 newlib.h stamp-h2
install-toollibLIBRARIES: $(toollib_LIBRARIES)
@$(NORMAL_INSTALL)
@list='$(toollib_LIBRARIES)'; test -n "$(toollibdir)" || list=; \
@@ -696,7 +709,7 @@ ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
mkid -fID $$unique
tags: TAGS
-TAGS: tags-recursive $(HEADERS) $(SOURCES) newlib.hin $(TAGS_DEPENDENCIES) \
+TAGS: tags-recursive $(HEADERS) $(SOURCES) _newlib_version.hin newlib.hin $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
set x; \
here=`pwd`; \
@@ -713,7 +726,7 @@ TAGS: tags-recursive $(HEADERS) $(SOURCES) newlib.hin $(TAGS_DEPENDENCIES) \
set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \
fi; \
done; \
- list='$(SOURCES) $(HEADERS) newlib.hin $(LISP) $(TAGS_FILES)'; \
+ list='$(SOURCES) $(HEADERS) _newlib_version.hin newlib.hin $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
@@ -731,9 +744,9 @@ TAGS: tags-recursive $(HEADERS) $(SOURCES) newlib.hin $(TAGS_DEPENDENCIES) \
fi; \
fi
ctags: CTAGS
-CTAGS: ctags-recursive $(HEADERS) $(SOURCES) newlib.hin $(TAGS_DEPENDENCIES) \
+CTAGS: ctags-recursive $(HEADERS) $(SOURCES) _newlib_version.hin newlib.hin $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
- list='$(SOURCES) $(HEADERS) newlib.hin $(LISP) $(TAGS_FILES)'; \
+ list='$(SOURCES) $(HEADERS) _newlib_version.hin newlib.hin $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
@@ -759,7 +772,8 @@ distclean-DEJAGNU:
check-am:
$(MAKE) $(AM_MAKEFLAGS) check-DEJAGNU
check: check-recursive
-all-am: Makefile $(LIBRARIES) $(LTLIBRARIES) $(DATA) newlib.h
+all-am: Makefile $(LIBRARIES) $(LTLIBRARIES) $(DATA) _newlib_version.h \
+ newlib.h
installdirs: installdirs-recursive
installdirs-am:
for dir in "$(DESTDIR)$(toollibdir)" "$(DESTDIR)$(toollibdir)" "$(DESTDIR)$(toollibdir)"; do \
@@ -936,7 +950,19 @@ crt1.o: $(CRT1_DIR)$(CRT1)
$(CRT1_DIR)$(CRT1): ; @true
-$(srcdir)/newlib.hin:
+targ-include:
+ mkdir $@
+
+targ-include/newlib.h: targ-include/_newlib_version.h
+
+targ-include/sys targ-include/machine targ-include/bits: targ-include/_newlib_version.h targ-include/newlib.h
+ mkdir $@
+
+targ-include/newlib.h: newlib.h targ-include
+ cp newlib.h $@
+
+targ-include/_newlib_version.h: _newlib_version.h targ-include
+ cp _newlib_version.h $@
all-recursive: stmp-targ-include
@@ -945,8 +971,9 @@ all-recursive: stmp-targ-include
# used while building.
stmp-targ-include: config.status
-rm -rf targ-include stmp-targ-include
- mkdir targ-include targ-include/sys targ-include/machine targ-include/bits
- cp newlib.h targ-include/newlib.h
+ $(MAKE) targ-include/sys \
+ targ-include/machine \
+ targ-include/bits
-for i in $(srcdir)/libc/machine/$(machine_dir)/machine/*.h; do \
if [ -f $$i ]; then \
cp $$i targ-include/machine/`basename $$i`; \
@@ -1002,6 +1029,7 @@ stmp-targ-include: config.status
cp $$i targ-include/machine/`basename $$i`; \
else true; fi ; \
done
+ $(MAKE) targ-include/newlib.h
touch $@
install-data-local: install-toollibLIBRARIES
@@ -1014,6 +1042,7 @@ install-data-local: install-toollibLIBRARIES
$(INSTALL_DATA) $$i $(DESTDIR)$(tooldir)/include/`basename $$i`; \
done; \
$(INSTALL_DATA) newlib.h $(DESTDIR)$(tooldir)/include/newlib.h; \
+ $(INSTALL_DATA) _newlib_version.h $(DESTDIR)$(tooldir)/include/_newlib_version.h; \
$(mkinstalldirs) $(DESTDIR)$(tooldir)/include/machine; \
for i in $(srcdir)/libc/include/machine/*.h; do \
$(INSTALL_DATA) $$i $(DESTDIR)$(tooldir)/include/machine/`basename $$i`; \
@@ -1173,7 +1202,7 @@ check-DEJAGNU: site.exp
fi
clean-local:
- -rm -rf targ-include
+ -rm -rf targ-include newlib.h _newlib_version.h stamp-*
# 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.
diff --git a/newlib/Makefile.shared b/newlib/Makefile.shared
index 50e2f0cd5..6e026fdf0 100644
--- a/newlib/Makefile.shared
+++ b/newlib/Makefile.shared
@@ -5,3 +5,24 @@ objectlist.awk.in: $(noinst_LTLIBRARIES)
echo $$i `pwd`/$$i >> objectlist.awk.in ; \
done
+#
+# documentation rules
+#
+
+SUFFIXES = .def
+
+CHEW = ${top_builddir}/../doc/makedoc -f $(top_srcdir)/../doc/doc.str
+
+.c.def:
+ $(CHEW) < $< > $*.def 2> $*.ref
+ touch stmp-def
+
+TARGETDOC ?= ../tmp.texi
+
+doc: $(CHEWOUT_FILES)
+ for chapter in $(CHAPTERS) ; \
+ do \
+ cat $(srcdir)/$$chapter >> $(TARGETDOC) ; \
+ done
+
+CLEANFILES = $(CHEWOUT_FILES) *.ref
diff --git a/newlib/NEWS b/newlib/NEWS
index 8a8013dca..a2d8e51f5 100644
--- a/newlib/NEWS
+++ b/newlib/NEWS
@@ -1,3 +1,53 @@
+*** Major changes in newlib version 2.4.0:
+
+- feature test macro overhaul
+- new string functions (e.g. timingsafe_bcmp)
+- new stdlib functions (e.g. arc4random)
+- simplified versioning macros for newlib
+- Changelog files deprecated
+
+*** Major changes in newlib version 2.3.0:
+
+- dynamic atexit logic fixed
+- various arm performance enhancements
+- new version of strtold
+- doc improvements
+- arc platform support redone
+- strftime improvements/enhancements
+- imported logic from FreeBSD
+- locking fixes
+- complex math enhancements
+- visium platform support added
+- or1k platform support added
+
+*** Major changes in newlib version 2.2.0:
+
+- multiple functional/performance enhancements for arm/aarch64
+- new nano formatted I/O support
+- replacement of or16/or32 with or1k platform
+- qsort_r support
+- additional long double math routines
+- ito/utoa/ltoa
+- restructuring of gmtime/localtime so tz functions only linked by localtime
+- unlocked I/O functions
+- various warning clean-ups
+
+*** Major changes in newlib version 2.1.0:
+
+- multibyte decimal point support added to
+ scanf family
+- multiple changes for FreeBSD compatibility
+- multiple RTEMS changes for Linux compatibility
+- addition of restrict keyword
+- nano-malloc support added
+- global atexit support added
+- new nds32 platform support
+- new msp430 platform support
+- new nios2 platform support
+- lite exit support
+- updated arm support (aarch64)
+- newlib ported to x86_64-pc-cygwin
+
*** Major changes in newlib version 2.0.0:
- addition of aarch64 platform support
diff --git a/newlib/README b/newlib/README
index a8aba991c..442304d4b 100644
--- a/newlib/README
+++ b/newlib/README
@@ -1,11 +1,11 @@
- README for newlib-2.0.0 release
+ README for newlib-2.4.0 release
(mostly cribbed from the README in the gdb-4.13 release)
This is `newlib', a simple ANSI C library, math library, and collection
of board support packages.
The newlib and libgloss subdirectories are a collection of software from
-several sources, each wi6h their own copyright and license. See the file
+several sources, each with their own copyright and license. See the file
COPYING.NEWLIB for details. The rest of the release tree is under either
the GNU GPL or LGPL licenses.
@@ -17,8 +17,8 @@ WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
Unpacking and Installation -- quick overview
==========================
-When you unpack the newlib-2.0.0.tar.gz file, you'll find a directory
-called `newlib-2.0.0', which contains:
+When you unpack the newlib-2.4.0.tar.gz file, you'll find a directory
+called `newlib-2.4.0', which contains:
COPYING config/ install-sh* mpw-configure
COPYING.LIB config-ml.in libgloss/ mpw-install
@@ -94,13 +94,13 @@ directory. If the path to `configure' would be the same as the
argument to `--srcdir', you can leave out the `--srcdir' option; it
will be assumed.)
- For example, with version 2.0.0, you can build NEWLIB in a separate
+ For example, with version 2.4.0, you can build NEWLIB in a separate
directory for a Sun 4 cross m68k-aout environment like this:
- cd newlib-2.0.0
+ cd newlib-2.4.0
mkdir ../newlib-m68k-aout
cd ../newlib-m68k-aout
- ../newlib-2.0.0/configure --host=sun4 --target=m68k-aout
+ ../newlib-2.4.0/configure --host=sun4 --target=m68k-aout
make
When `configure' builds a configuration using a remote source
@@ -116,8 +116,8 @@ called `configure' (or one of its subdirectories).
The `Makefile' that `configure' generates in each source directory
also runs recursively. If you type `make' in a source directory such
-as `newlib-2.0.0' (or in a separate configured directory configured with
-`--srcdir=PATH/newlib-2.0.0'), you will build all the required libraries.
+as `newlib-2.4.0' (or in a separate configured directory configured with
+`--srcdir=PATH/newlib-2.4.0'), you will build all the required libraries.
When you have multiple hosts or targets configured in separate
directories, you can run `make' on them in parallel (for example, if
@@ -171,13 +171,16 @@ Since newlib is a library, the target concept does not apply to it, and the
build, host, and target options given to the top-level configure script must
be changed for newlib's use.
-The options are shifted according to these correspondences:
+The build system shifts the options according to these correspondences:
gcc's build platform has no equivalent in newlib.
gcc's host platform is newlib's build platform.
gcc's target platform is newlib's host platform.
and as mentioned before, newlib has no concept of target.
+In summary: the --target=TARGET switch to the top-level configure
+script configures newlib's host platform.
+
`configure' options
===================
@@ -288,6 +291,12 @@ One feature can be enabled by specifying `--enable-FEATURE=yes' or
Disable dynamic allocation of atexit entries.
Most hosts and targets have it enabled in configure.host.
+`--enable-newlib-global-atexit'
+ Enable atexit data structure as global variable. By doing so it is
+ move out of _reent structure, and can be garbage collected if atexit
+ is not referenced.
+ Disabled by default.
+
`--enable-newlib-reent-small'
Enable small reentrant struct support.
Disabled by default.
@@ -366,6 +375,73 @@ One feature can be enabled by specifying `--enable-FEATURE=yes' or
invoke clean-up functions such as _fini or global destructors.
Disabled by default.
+`--enable-newlib-nano-formatted-io'
+ This builds NEWLIB with a special implementation of formatted I/O
+ functions, designed to lower the size of application on small systems
+ with size constraint issues. This option does not affect wide-char
+ formatted I/O functions. Some notes about the feature:
+ 1) The non-wide-char formatted I/O functions only support the C89
+ standard. The only exception is the configuration option provides
+ limited support for long double. Internally, the nano formatted I/O
+ functions use double so accuracy is only guaranteed to double
+ precision.
+ 2) Floating-point support is split out of the formatted I/O code into
+ weak functions which are not linked by default. Programs that need
+ floating-point I/O support must explicitly request linking of one or
+ both of the floating-point functions: _printf_float or _scanf_float.
+ This can be done at link time using the -u option which can be passed
+ to either gcc or ld. The -u option forces the link to resolve those
+ function references. Floating-point format specifiers are recognized
+ by default, but if the floating-point functions are not explicitly
+ linked in, this may result in undefined behavior for programs that
+ need floating-point I/O support.
+ 3) Integer-only versions of the formatted I/O functions (the iprintf/
+ iscanf family) simply alias their regular counter-parts.
+ The affected functions are:
+
+ diprintf vdiprintf
+
+ siprintf fiprintf iprintf sniprintf asiprintf asniprintf
+
+ siscanf fiscanf iscanf
+
+ viprintf vfiprintf vsiprintf vsniprintf vasiprintf vasniprintf
+
+ viscanf vfiscanf vsiscanf
+
+ _diprintf_r _vdiprintf_r
+
+ _siprintf_r _fiprintf_r _iprintf_r _sniprintf_r _asiprintf_r
+ _asniprintf_r
+
+ _siscanf_r _fiscanf_r _iscanf_r
+
+ _viprintf_r _vfiprintf_r _vsiprintf_r _asniprintf_r _vasiprintf_r
+ _vasniprintf_r
+
+ _viscanf_r _vfiscanf_r _vsiscanf_r
+
+ 4) As mentioned, the option does not affect wide-char formatted I/O.
+ The following configuration options are ignored for non-wide-char
+ formatted I/O functions, and can be thought of as disabled.
+
+ enable-newlib-io-pos-args
+ enable-newlib-io-c99-formats
+ enable-newlib-io-long-long
+ enable-newlib-io-long-double
+ enable-newlib-mb
+
+ Additionally, "enable/disable-newlib-io-float" is supported in
+ this specific implementation, one can use "disable-newlib-io-float"
+ to further reduce code size. In this case, the floating-point
+ specifiers will not be recognized or handled, and the -u option
+ will not work either.
+
+ 5) As a rule, no features from outside of C89 standard will be
+ considered in this implementation.
+
+ Disabled by default.
+
Running the Testsuite
=====================
@@ -505,15 +581,15 @@ After creating a new configure.in and Makefile.am file, you would issue:
from newlib/libc/machine/XXXX
It is strongly advised that you use an adequate version of autotools.
-For this latest release, the following were used: autoconf 2.68, aclocal 1.11.6, and
-automake 1.11.6.
+For this latest release, the following were used: autoconf 2.69, aclocal 1.13.4, and
+automake 1.13.4.
Reporting Bugs
==============
The correct address for reporting bugs found in NEWLIB is
"newlib@sourceware.org". Please email all bug reports to that
-address. Please include the NEWLIB version number (e.g., newlib-2.0.0),
+address. Please include the NEWLIB version number (e.g., newlib-2.4.0),
and how you configured it (e.g., "sun4 host and m68k-aout target").
Since NEWLIB supports many different configurations, it is important
that you be precise about this.
diff --git a/newlib/_newlib_version.hin b/newlib/_newlib_version.hin
new file mode 100644
index 000000000..03d4e3d47
--- /dev/null
+++ b/newlib/_newlib_version.hin
@@ -0,0 +1,11 @@
+/* Version macros for internal and downstream use. */
+#ifndef _NEWLIB_VERSION_H__
+#define _NEWLIB_VERSION_H__ 1
+
+#undef _NEWLIB_VERSION
+#undef __NEWLIB__
+#undef __NEWLIB_MINOR__
+#undef __NEWLIB_PATCHLEVEL__
+
+#endif /* !_NEWLIB_VERSION_H__ */
+
diff --git a/newlib/acconfig.h b/newlib/acconfig.h
index b14a3d36b..de26c5ef3 100644
--- a/newlib/acconfig.h
+++ b/newlib/acconfig.h
@@ -52,6 +52,9 @@
/* Define if the platform supports long double type. */
#undef _HAVE_LONG_DOUBLE
+/* Define if compiler supports -fno-tree-loop-distribute-patterns. */
+#undef _HAVE_CC_INHIBIT_LOOP_TO_LIBCALL
+
/* Define if the platform long double type is equal to double. */
#undef _LDBL_EQ_DBL
@@ -70,6 +73,9 @@
/* Define if enable lite version of exit. */
#undef _LITE_EXIT
+/* Define if nano version formatted IO is used. */
+#undef _NANO_FORMATTED_IO
+
@BOTTOM@
/*
* Iconv encodings enabled ("to" direction)
diff --git a/newlib/acinclude.m4 b/newlib/acinclude.m4
index d65479950..10671f859 100644
--- a/newlib/acinclude.m4
+++ b/newlib/acinclude.m4
@@ -1,8 +1,10 @@
dnl This provides configure definitions used by all the newlib
dnl configure.in files.
-AC_DEFUN([DEF_NEWLIB_VERSION],
-m4_define([NEWLIB_VERSION],[2.0.0]))
+AC_DEFUN([DEF_NEWLIB_MAJOR_VERSION],m4_define([NEWLIB_MAJOR_VERSION],[2]))
+AC_DEFUN([DEF_NEWLIB_MINOR_VERSION],m4_define([NEWLIB_MINOR_VERSION],[4]))
+AC_DEFUN([DEF_NEWLIB_PATCHLEVEL_VERSION],m4_define([NEWLIB_PATCHLEVEL_VERSION],[0]))
+AC_DEFUN([DEF_NEWLIB_VERSION],m4_define([NEWLIB_VERSION],[NEWLIB_MAJOR_VERSION.NEWLIB_MINOR_VERSION.NEWLIB_PATCHLEVEL_VERSION]))
dnl Basic newlib configury. This calls basic introductory stuff,
dnl including AM_INIT_AUTOMAKE and AC_CANONICAL_HOST. It also runs
diff --git a/newlib/configure b/newlib/configure
index e05a2d3f4..30e1d5766 100755
--- a/newlib/configure
+++ b/newlib/configure
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.68 for newlib 2.0.0.
+# Generated by GNU Autoconf 2.68 for newlib 2.4.0.
#
#
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
@@ -567,8 +567,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='newlib'
PACKAGE_TARNAME='newlib'
-PACKAGE_VERSION='2.0.0'
-PACKAGE_STRING='newlib 2.0.0'
+PACKAGE_VERSION='2.4.0'
+PACKAGE_STRING='newlib 2.4.0'
PACKAGE_BUGREPORT=''
PACKAGE_URL=''
@@ -616,6 +616,7 @@ LTLIBOBJS
LIBOBJS
HAVE_LONG_DOUBLE_FALSE
HAVE_LONG_DOUBLE_TRUE
+libc_cv_cc_loop_to_function
libc_cv_initfinit_array
CC_FOR_BUILD
STDIO64_OBJECTLIST
@@ -788,6 +789,7 @@ enable_newlib_iconv_from_encodings
enable_newlib_iconv_to_encodings
enable_newlib_iconv_external_ccs
enable_newlib_atexit_dynamic_alloc
+enable_newlib_global_atexit
enable_newlib_reent_small
enable_newlib_fvwrite_in_streamio
enable_newlib_fseek_optimization
@@ -795,6 +797,7 @@ enable_newlib_wide_orient
enable_newlib_nano_malloc
enable_newlib_unbuf_stream_opt
enable_lite_exit
+enable_newlib_nano_formatted_io
enable_multilib
enable_target_optspace
enable_malloc_debugging
@@ -1368,7 +1371,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures newlib 2.0.0 to adapt to many kinds of systems.
+\`configure' configures newlib 2.4.0 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1438,7 +1441,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of newlib 2.0.0:";;
+ short | recursive ) echo "Configuration of newlib 2.4.0:";;
esac
cat <<\_ACEOF
@@ -1457,6 +1460,7 @@ Optional Features:
--enable-newlib-iconv-to-encodings enable specific comma-separated list of \"to\" iconv encodings to be built-in
--enable-newlib-iconv-external-ccs enable capabilities to load external CCS files for iconv
--disable-newlib-atexit-dynamic-alloc disable dynamic allocation of atexit entries
+ --enable-newlib-global-atexit enable atexit data structure as global
--enable-newlib-reent-small enable small reentrant struct support
--disable-newlib-fvwrite-in-streamio disable iov in streamio
--disable-newlib-fseek-optimization disable fseek optimization
@@ -1464,6 +1468,7 @@ Optional Features:
--enable-newlib-nano-malloc use small-footprint nano-malloc implementation
--disable-newlib-unbuf-stream-opt disable unbuffered stream optimization in streamio
--enable-lite-exit enable light weight exit
+ --enable-newlib-nano-formatted-io Use nano version formatted IO
--enable-multilib build many library versions (default)
--enable-target-optspace optimize for space
--enable-malloc-debugging indicate malloc debugging requested
@@ -1567,7 +1572,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-newlib configure 2.0.0
+newlib configure 2.4.0
generated by GNU Autoconf 2.68
Copyright (C) 2010 Free Software Foundation, Inc.
@@ -1845,7 +1850,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by newlib $as_me 2.0.0, which was
+It was created by newlib $as_me 2.4.0, which was
generated by GNU Autoconf 2.68. Invocation command line was
$ $0 $@
@@ -2194,7 +2199,7 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
-ac_config_headers="$ac_config_headers newlib.h:newlib.hin"
+ac_config_headers="$ac_config_headers _newlib_version.h:_newlib_version.hin newlib.h:newlib.hin"
ac_aux_dir=
@@ -2352,6 +2357,19 @@ else
newlib_atexit_dynamic_alloc=${newlib_atexit_dynamic_alloc}
fi
+# Check whether --enable-newlib-global-atexit was given.
+if test "${enable_newlib_global_atexit+set}" = set; then :
+ enableval=$enable_newlib_global_atexit; if test "${newlib_global_atexit+set}" != set; then
+ case "${enableval}" in
+ yes) newlib_global_atexit=yes ;;
+ no) newlib_global_atexit=no ;;
+ *) as_fn_error $? "bad value ${enableval} for newlib-global-atexit option" "$LINENO" 5 ;;
+ esac
+ fi
+else
+ newlib_global_atexit=no
+fi
+
# Check whether --enable-newlib-reent-small was given.
if test "${enable_newlib_reent_small+set}" = set; then :
enableval=$enable_newlib_reent_small; case "${enableval}" in
@@ -2411,7 +2429,7 @@ if test "${enable_newlib_nano_malloc+set}" = set; then :
esac
fi
else
- newlib_nano_malloc=no
+ newlib_nano_malloc=
fi
# Check whether --enable-newlib-unbuf-stream-opt was given.
@@ -2440,6 +2458,18 @@ else
lite_exit=no
fi
+# Check whether --enable-newlib_nano_formatted_io was given.
+if test "${enable_newlib_nano_formatted_io+set}" = set; then :
+ enableval=$enable_newlib_nano_formatted_io; case "${enableval}" in
+ yes) newlib_nano_formatted_io=yes ;;
+ no) newlib_nano_formatted_io=no ;;
+ *) as_fn_error $? "bad value ${enableval} for newlib-nano-formatted-io" "$LINENO" 5 ;;
+ esac
+else
+ newlib_nano_formatted_io=no
+fi
+
+
# Make sure we can run config.sub.
$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
@@ -3132,7 +3162,7 @@ fi
# Define the identity of the package.
PACKAGE='newlib'
- VERSION='2.0.0'
+ VERSION='2.4.0'
# Some tools Automake needs.
@@ -7235,7 +7265,7 @@ ia64-*-hpux*)
rm -rf conftest*
;;
-x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \
+x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \
s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
# Find out which ABI we are using.
echo 'int i;' > conftest.$ac_ext
@@ -7260,7 +7290,10 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
;;
esac
;;
- ppc64-*linux*|powerpc64-*linux*)
+ powerpc64le-*linux*)
+ LD="${LD-ld} -m elf32lppclinux"
+ ;;
+ powerpc64-*linux*)
LD="${LD-ld} -m elf32ppclinux"
;;
s390x-*linux*)
@@ -7279,7 +7312,10 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
x86_64-*linux*)
LD="${LD-ld} -m elf_x86_64"
;;
- ppc*-*linux*|powerpc*-*linux*)
+ powerpcle-*linux*)
+ LD="${LD-ld} -m elf64lppc"
+ ;;
+ powerpc-*linux*)
LD="${LD-ld} -m elf64ppc"
;;
s390*-*linux*|s390*-*tpf*)
@@ -7961,7 +7997,7 @@ $as_echo "$lt_cv_ld_force_load" >&6; }
case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
10.0,*86*-darwin8*|10.0,*-darwin[91]*)
_lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
- 10.[012]*)
+ 10.[012][,.]*)
_lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
10.*)
_lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
@@ -9530,7 +9566,7 @@ _LT_EOF
if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
&& test "$tmp_diet" = no
then
- tmp_addflag=
+ tmp_addflag=' $pic_flag'
tmp_sharedflag='-shared'
case $cc_basename,$host_cpu in
pgcc*) # Portland Group C compiler
@@ -9712,7 +9748,7 @@ _LT_EOF
if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
else
- export_symbols_cmds='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
+ export_symbols_cmds='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "L")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
fi
aix_use_runtimelinking=no
@@ -11740,7 +11776,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 11743 "configure"
+#line 11779 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -11846,7 +11882,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 11849 "configure"
+#line 11885 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -12286,9 +12322,17 @@ _ACEOF
fi
-cat >>confdefs.h <<_ACEOF
-#define _NEWLIB_VERSION "2.0.0"
-_ACEOF
+
+$as_echo "#define _NEWLIB_VERSION \"2.4.0\"" >>confdefs.h
+
+
+$as_echo "#define __NEWLIB__ 2" >>confdefs.h
+
+
+$as_echo "#define __NEWLIB_MINOR__ 4" >>confdefs.h
+
+
+$as_echo "#define __NEWLIB_PATCHLEVEL__ 0" >>confdefs.h
if test "${multilib}" = "yes"; then
@@ -12321,6 +12365,13 @@ _ACEOF
fi
+if test "${newlib_global_atexit}" = "yes"; then
+cat >>confdefs.h <<_ACEOF
+#define _REENT_GLOBAL_ATEXIT 1
+_ACEOF
+
+fi
+
if test "${newlib_fvwrite_in_streamio}" = "yes"; then
cat >>confdefs.h <<_ACEOF
#define _FVWRITE_IN_STREAMIO 1
@@ -12363,6 +12414,13 @@ _ACEOF
fi
+if test "${newlib_nano_formatted_io}" = "yes"; then
+cat >>confdefs.h <<_ACEOF
+#define _NANO_FORMATTED_IO 1
+_ACEOF
+
+fi
+
if test "x${iconv_encodings}" != "x" \
|| test "x${iconv_to_encodings}" != "x" \
@@ -12477,6 +12535,39 @@ _ACEOF
fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC accepts -fno-tree-loop-distribute-patterns with \
+__attribute__ ((__optimize__))" >&5
+$as_echo_n "checking if $CC accepts -fno-tree-loop-distribute-patterns with \
+__attribute__ ((__optimize__))... " >&6; }
+if ${libc_cv_cc_loop_to_function+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat > conftest.c <<EOF
+void
+__attribute__ ((__optimize__ ("-fno-tree-loop-distribute-patterns")))
+foo (void) {}
+EOF
+libc_cv_cc_loop_to_function=no
+if { ac_try='${CC-cc} $CFLAGS $CPPFLAGS -c
+ -fno-tree-loop-distribute-patterns conftest.c'
+ { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; }
+then
+ libc_cv_cc_loop_to_function=yes
+fi
+rm -f conftest*
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_cc_loop_to_function" >&5
+$as_echo "$libc_cv_cc_loop_to_function" >&6; }
+if test $libc_cv_cc_loop_to_function = yes; then
+ $as_echo "#define _HAVE_CC_INHIBIT_LOOP_TO_LIBCALL 1" >>confdefs.h
+
+fi
+
+
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether long double type exists" >&5
$as_echo_n "checking whether long double type exists... " >&6; }
if ${acnewlib_cv_type_long_double+:} false; then :
@@ -13149,7 +13240,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by newlib $as_me 2.0.0, which was
+This file was extended by newlib $as_me 2.4.0, which was
generated by GNU Autoconf 2.68. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -13215,7 +13306,7 @@ _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
-newlib config.status 2.0.0
+newlib config.status 2.4.0
configured by $0, generated by GNU Autoconf 2.68,
with options \\"\$ac_cs_config\\"
@@ -13617,6 +13708,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
for ac_config_target in $ac_config_targets
do
case $ac_config_target in
+ "_newlib_version.h") CONFIG_HEADERS="$CONFIG_HEADERS _newlib_version.h:_newlib_version.hin" ;;
"newlib.h") CONFIG_HEADERS="$CONFIG_HEADERS newlib.h:newlib.hin" ;;
"depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
"libtool") CONFIG_COMMANDS="$CONFIG_COMMANDS libtool" ;;
diff --git a/newlib/configure.host b/newlib/configure.host
index e7047f060..d47120089 100644
--- a/newlib/configure.host
+++ b/newlib/configure.host
@@ -71,6 +71,7 @@ default_newlib_io_long_long=no
default_newlib_io_long_double=no
default_newlib_io_pos_args=no
default_newlib_atexit_dynamic_alloc=yes
+default_newlib_nano_malloc=no
aext=a
oext=o
lpfx="lib_a-"
@@ -79,7 +80,7 @@ case "${target_optspace}:${host}" in
yes:*)
newlib_cflags="${newlib_cflags} -Os"
;;
- :m32r-* | :d10v-* | :d30v-* | :avr-* | :m32c-* | :msp430*-* | :nds32* )
+ :m32r-* | :d10v-* | :d30v-* | :avr-* | :m32c-* | :msp430*-* | :nds32* | :rl78-* )
newlib_cflags="${newlib_cflags} -Os"
;;
no:* | :*)
@@ -99,8 +100,8 @@ case "${host_cpu}" in
machine_dir=aarch64
libm_machine_dir=aarch64
;;
- arc)
- machine_dir=
+ arc*)
+ machine_dir=arc
;;
arm*)
machine_dir=arm
@@ -140,6 +141,10 @@ case "${host_cpu}" in
frv)
machine_dir=frv
;;
+ ft32*)
+ machine_dir=ft32
+ newlib_cflags="${newlib_cflags} -DPREFER_SIZE_OVER_SPEED"
+ ;;
h8300)
machine_dir=h8300
;;
@@ -175,7 +180,7 @@ case "${host_cpu}" in
machine_dir=lm32
;;
m32c)
- machine_dir=m32c
+ machine_dir=m32c
newlib_cflags="${newlib_cflags} -DPREFER_SIZE_OVER_SPEED -DSMALL_MEMORY"
;;
@@ -228,23 +233,24 @@ case "${host_cpu}" in
newlib_cflags="${newlib_cflags} -DPREFER_SIZE_OVER_SPEED -DSMALL_MEMORY"
newlib_cflags="${newlib_cflags} -ffunction-sections -fdata-sections "
newlib_cflags="${newlib_cflags} -mOs "
+ newlib_cflags="${newlib_cflags} -mhwmult=none "
machine_dir=msp430
+ default_newlib_nano_malloc="yes"
;;
mt*)
machine_dir=mt
;;
nds32*)
machine_dir=nds32
- newlib_cflags="${newlib_cflags} -DPREFER_SIZE_OVER_SPEED "
- newlib_cflags="${newlib_cflags} -DSMALL_MEMORY "
+ libm_machine_dir=nds32
newlib_cflags="${newlib_cflags} -ffunction-sections -fdata-sections"
+ newlib_cflags="${newlib_cflags} -DHAVE_RENAME"
;;
nios2*)
machine_dir=nios2
;;
- or16)
- ;;
- or32)
+ or1k*|or1knd*)
+ machine_dir=or1k
;;
powerpc*)
machine_dir=powerpc
@@ -252,6 +258,7 @@ case "${host_cpu}" in
rl78)
machine_dir=rl78
newlib_cflags="${newlib_cflags} -DPREFER_SIZE_OVER_SPEED -DSMALL_MEMORY"
+ newlib_cflags="${newlib_cflags} -ffunction-sections -fdata-sections "
;;
rx)
machine_dir=rx
@@ -283,6 +290,9 @@ case "${host_cpu}" in
machine_dir=v850
newlib_cflags="${newlib_cflags} -DPREFER_SIZE_OVER_SPEED "
;;
+ visium)
+ machine_dir=visium
+ ;;
w65*)
machine_dir=w65
;;
@@ -290,8 +300,8 @@ case "${host_cpu}" in
machine_dir=x86_64
;;
xc16x*)
- machine_dir=xc16x
- ;;
+ machine_dir=xc16x
+ ;;
xstormy16)
machine_dir=xstormy16
newlib_cflags="${newlib_cflags} -DMALLOC_PROVIDED"
@@ -375,18 +385,24 @@ case "${host}" in
signal_dir=
sys_dir=netware
;;
+ *-*-phoenix*)
+ sys_dir=phoenix
+ posix_dir=posix
+ unix_dir=unix
+ ;;
*-*-rtems*) # generic RTEMS support
sys_dir=rtems
posix_dir=posix
unix_dir=unix
;;
+ *-*-tirtos*)
+ sys_dir=tirtos
+ have_crt0="no"
+ ;;
a29k-*-*)
sys_dir=a29khif
signal_dir=
;;
- arc-*-*)
- sys_dir=arc
- ;;
arm*-*-*)
sys_dir=arm
if [ "x${newlib_may_supply_syscalls}" = "xno" ] ; then
@@ -416,6 +432,9 @@ case "${host}" in
frv*)
sys_dir=
;;
+ ft32*)
+ sys_dir=
+ ;;
h8300-*-hms*)
sys_dir=h8300hms
;;
@@ -437,6 +456,7 @@ case "${host}" in
i[34567]86-*-rdos*)
sys_dir=rdos
newlib_cflags="${newlib_cflags} -DMISSING_SYSCALL_NAMES"
+ newlib_cflags="${newlib_cflags} -D_I386MACH_DISABLE_HW_INTERRUPTS"
;;
i[34567]86-*-sco*)
sys_dir=sysvi386
@@ -455,9 +475,9 @@ case "${host}" in
default_newlib_io_pos_args="yes"
#newlib_cflags="${newlib_cflags} -Werror" # DEBUGGING ONLY;BREAKS BUILD
newlib_cflags="${newlib_cflags} -Wall"
- newlib_cflags="${newlib_cflags} -D_I386MACH_ALLOW_HW_INTERRUPTS"
newlib_cflags="${newlib_cflags} -DHAVE_FCNTL"
newlib_cflags="${newlib_cflags} -DHAVE_GETOPT"
+ newlib_cflags="${newlib_cflags} -D_NO_POSIX_SPAWN"
# --- Required when building a shared library ------------------------
newlib_cflags="${newlib_cflags} -fPIC -D_I386MACH_NEED_SOTYPE_FUNCTION"
# --- The three lines below are optional ------------------------------
@@ -494,6 +514,11 @@ case "${host}" in
nios2*)
sys_dir=
;;
+ or1k-*-elf | or1knd-*-elf)
+ sys_dir=or1k
+ newlib_cflags="${newlib_cflags} -DREENTRANT_SYSCALLS_PROVIDED "
+ have_crt0="no"
+ ;;
powerpcle-*-pe)
posix_dir=posix
;;
@@ -531,6 +556,9 @@ case "${host}" in
have_crt0="no"
fi
;;
+ visium-*-*)
+ sys_dir=
+ ;;
w65-*-*)
sys_dir=w65
;;
@@ -555,6 +583,11 @@ case "${host}" in
newlib_cflags="${newlib_cflags} -DHAVE_OPENDIR -DHAVE_RENAME -DSIGNAL_PROVIDED -D_COMPILING_NEWLIB -DHAVE_BLKSIZE -DHAVE_FCNTL -DMALLOC_PROVIDED"
syscall_dir=syscalls
;;
+ *-*-phoenix*)
+ newlib_cflags="${newlib_cflags} -DMISSING_SYSCALL_NAMES -D_COMPILING_NEWLIB -DHAVE_BLKSIZE -DHAVE_NANOSLEEP"
+ default_newlib_io_long_long="yes"
+ syscall_dir=
+ ;;
# RTEMS supplies its own versions of some routines:
# malloc() (reentrant version)
# exit() RTEMS has a "global" reent to flush
@@ -568,13 +601,19 @@ case "${host}" in
newlib_cflags="${newlib_cflags} -D_COMPILING_NEWLIB"
newlib_cflags="${newlib_cflags} -DMALLOC_PROVIDED -DEXIT_PROVIDED -DSIGNAL_PROVIDED -DREENTRANT_SYSCALLS_PROVIDED -DHAVE_NANOSLEEP -DHAVE_BLKSIZE -DHAVE_FCNTL -DHAVE_ASSERT_FUNC"
# turn off unsupported items in posix directory
- newlib_cflags="${newlib_cflags} -D_NO_GETLOGIN -D_NO_GETPWENT -D_NO_GETUT -D_NO_GETPASS -D_NO_SIGSET -D_NO_WORDEXP -D_NO_POPEN"
+ newlib_cflags="${newlib_cflags} -D_NO_GETLOGIN -D_NO_GETPWENT -D_NO_GETUT -D_NO_GETPASS -D_NO_SIGSET -D_NO_WORDEXP -D_NO_POPEN -D_NO_POSIX_SPAWN"
+ # turn off using cli/sti in i386 setjmp/longjmp
+ newlib_cflags="${newlib_cflags} -D_I386MACH_ALLOW_HW_INTERRUPTS"
;;
# VxWorks supplies its own version of malloc, and the newlib one
# doesn't work because VxWorks does not have sbrk.
*-wrs-vxworks*)
newlib_cflags="${newlib_cflags} -DMALLOC_PROVIDED -DMISSING_SYSCALL_NAMES -DHAVE_FCNTL"
;;
+# TIRTOS supplies its own version of malloc
+ *-*-tirtos*)
+ newlib_cflags="${newlib_cflags} -D__DYNAMIC_REENT__ -DMALLOC_PROVIDED"
+ ;;
# UDI doesn't have exec, so system() should fail the right way
a29k-amd-udi)
newlib_cflags="${newlib_cflags} -DNO_EXEC"
@@ -584,8 +623,9 @@ case "${host}" in
default_newlib_io_long_long="yes"
syscall_dir=syscalls
;;
- arc-*-*)
+ arc*-*-*)
syscall_dir=syscalls
+ default_newlib_io_long_long="yes"
;;
arm*-*-pe)
syscall_dir=syscalls
@@ -604,9 +644,6 @@ case "${host}" in
newlib_cflags="${newlib_cflags} -DARM_RDI_MONITOR"
fi
;;
- arc*)
- newlib_cflags="${newlib_cflags} -DREENTRANT_SYSCALLS_PROVIDED"
- ;;
avr*)
newlib_cflags="${newlib_cflags} -DNO_EXEC -DSMALL_MEMORY -DMISSING_SYSCALL_NAMES"
;;
@@ -648,6 +685,9 @@ case "${host}" in
syscall_dir=syscalls
default_newlib_io_long_long="yes"
;;
+ ft32*-*-*)
+ syscall_dir=syscalls
+ ;;
h8300*-*-*)
syscall_dir=syscalls
default_newlib_io_long_long="yes"
@@ -666,6 +706,15 @@ case "${host}" in
i[34567]86-*-netware*)
newlib_cflags="${newlib_cflags} -DMISSING_SYSCALL_NAMES -DNO_EXEC -DABORT_PROVIDED -DCLOCK_PROVIDED -DMALLOC_PROVIDED -DHAVE_FCNTL"
;;
+ i[3-7]86-*-elfiamcu)
+ newlib_cflags="${newlib_cflags} -Os -DPREFER_SIZE_OVER_SPEED -ffunction-sections -fomit-frame-pointer -DREENTRANT_SYSCALL_PROVIDED"
+ if [ "${newlib_multithread}" = "no" ] ; then
+ newlib_cflags="${newlib_cflags} -DMISSING_SYSCALL_NAMES"
+ else
+ syscall_dir=syscalls
+ newlib_cflags="${newlib_cflags} -D__DYNAMIC_REENT__"
+ fi
+ ;;
iq2000*)
syscall_dir=syscalls
default_newlib_io_long_long="yes"
@@ -717,9 +766,14 @@ case "${host}" in
mn10?00-*-*)
syscall_dir=syscalls
;;
- moxie-*-*)
+ moxie-*-elf* | moxie-*-rtems*)
+ syscall_dir=syscalls
+ default_newlib_io_long_long="yes"
+ ;;
+ moxie-*-moxiebox)
syscall_dir=syscalls
default_newlib_io_long_long="yes"
+ newlib_cflags="${newlib_cflags} -Os -DPREFER_SIZE_OVER_SPEED -DSMALL_MEMORY"
;;
nios2*)
syscall_dir=
@@ -728,6 +782,9 @@ case "${host}" in
nds32*)
syscall_dir=syscalls
;;
+ or1k*|or1knd*)
+ syscall_dir=syscalls
+ ;;
powerpc*-*-eabialtivec*)
default_newlib_io_long_long="yes"
newlib_cflags="${newlib_cflags} -DMISSING_SYSCALL_NAMES"
@@ -746,7 +803,7 @@ case "${host}" in
newlib_cflags="${newlib_cflags} -mrelocatable-lib -mno-eabi -mstrict-align -DMISSING_SYSCALL_NAMES"
;;
powerpcle-*-pe)
- newlib_cflags="${newlib_cflags} -DHAVE_OPENDIR -DHAVE_RENAME -DHAVE_FCNTL"
+ newlib_cflags="${newlib_cflags} -DHAVE_OPENDIR -DHAVE_RENAME -DHAVE_FCNTL -D_NO_POSIX_SPAWN"
syscall_dir=syscalls
;;
sh*-*-*)
@@ -777,6 +834,10 @@ case "${host}" in
v850*-*-*)
syscall_dir=syscalls
;;
+ visium-*-*)
+ newlib_cflags="${newlib_cflags} -DCLOCK_PROVIDED -DHAVE_SYSTEM -DMISSING_SYSCALL_NAMES"
+ syscall_dir=
+ ;;
w65-*-*)
syscall_dir=syscalls
newlib_cflags="${newlib_cflags} -DSMALL_DTOA -DSMALL_MEMORY"
@@ -833,6 +894,13 @@ if [ "x${newlib_atexit_dynamic_alloc}" = "x" ]; then
fi
fi
+# Enable nano-malloc if requested.
+if [ "x${newlib_nano_malloc}" = "x" ]; then
+ if [ ${default_newlib_nano_malloc} = "yes" ]; then
+ newlib_nano_malloc="yes";
+ fi
+fi
+
# Remove rpc headers if xdr_dir not specified
if [ "x${xdr_dir}" = "x" ]; then
noinclude="${noinclude} rpc/types.h rpc/xdr.h"
diff --git a/newlib/configure.in b/newlib/configure.in
index 8e742f786..01c6367a9 100644
--- a/newlib/configure.in
+++ b/newlib/configure.in
@@ -4,7 +4,7 @@ dnl Process this file with autoconf to produce a configure script.
AC_PREREQ(2.59)
AC_INIT([newlib],[NEWLIB_VERSION])
AC_CONFIG_SRCDIR([libc])
-AC_CONFIG_HEADER(newlib.h:newlib.hin)
+AC_CONFIG_HEADERS([_newlib_version.h:_newlib_version.hin newlib.h:newlib.hin])
dnl Can't be done in NEWLIB_CONFIGURE because that confuses automake.
AC_CONFIG_AUX_DIR(..)
@@ -115,6 +115,19 @@ AC_ARG_ENABLE(newlib-atexit-dynamic-alloc,
esac
fi], [newlib_atexit_dynamic_alloc=${newlib_atexit_dynamic_alloc}])dnl
+dnl Support --enable-newlib-global-atexit
+dnl Enable atexit data structure as global variables to save memory usage in
+dnl _reent.
+AC_ARG_ENABLE(newlib-global-atexit,
+[ --enable-newlib-global-atexit enable atexit data structure as global],
+[if test "${newlib_global_atexit+set}" != set; then
+ case "${enableval}" in
+ yes) newlib_global_atexit=yes ;;
+ no) newlib_global_atexit=no ;;
+ *) AC_MSG_ERROR(bad value ${enableval} for newlib-global-atexit option) ;;
+ esac
+ fi], [newlib_global_atexit=no])dnl
+
dnl Support --enable-newlib-reent-small
AC_ARG_ENABLE(newlib-reent-small,
[ --enable-newlib-reent-small enable small reentrant struct support],
@@ -168,7 +181,7 @@ AC_ARG_ENABLE(newlib-nano-malloc,
no) newlib_nano_malloc=no ;;
*) AC_MSG_ERROR(bad value ${enableval} for newlib-nano-malloc option) ;;
esac
- fi], [newlib_nano_malloc=no])dnl
+ fi], [newlib_nano_malloc=])dnl
dnl Support --disable-newlib-unbuf-stream-opt
AC_ARG_ENABLE(newlib-unbuf-stream-opt,
@@ -194,6 +207,17 @@ AC_ARG_ENABLE(lite-exit,
esac
fi], [lite_exit=no])dnl
+dnl Support --enable-newlib-nano-formatted-io
+dnl This option is also read in libc/configure.in. It is repeated
+dnl here so that it shows up in the help text.
+AC_ARG_ENABLE(newlib_nano_formatted_io,
+[ --enable-newlib-nano-formatted-io Use nano version formatted IO],
+[case "${enableval}" in
+ yes) newlib_nano_formatted_io=yes ;;
+ no) newlib_nano_formatted_io=no ;;
+ *) AC_MSG_ERROR(bad value ${enableval} for newlib-nano-formatted-io) ;;
+ esac],[newlib_nano_formatted_io=no])
+
NEWLIB_CONFIGURE(.)
dnl We have to enable libtool after NEWLIB_CONFIGURE because if we try and
@@ -360,7 +384,10 @@ if test "${newlib_iconv_external_ccs}" = "yes"; then
AC_DEFINE_UNQUOTED(_ICONV_ENABLE_EXTERNAL_CCS)
fi
-AC_DEFINE_UNQUOTED(_NEWLIB_VERSION,"NEWLIB_VERSION")
+AC_DEFINE(_NEWLIB_VERSION,"NEWLIB_VERSION","The newlib version in string format.")
+AC_DEFINE(__NEWLIB__,NEWLIB_MAJOR_VERSION,"The newlib major version number.")
+AC_DEFINE(__NEWLIB_MINOR__,NEWLIB_MINOR_VERSION,"The newlib minor version number.")
+AC_DEFINE(__NEWLIB_PATCHLEVEL__,NEWLIB_PATCHLEVEL_VERSION,"The newlib patch level.")
if test "${multilib}" = "yes"; then
multilib_arg="--enable-multilib"
@@ -383,6 +410,10 @@ if test "${newlib_atexit_dynamic_alloc}" = "yes"; then
AC_DEFINE_UNQUOTED(_ATEXIT_DYNAMIC_ALLOC)
fi
+if test "${newlib_global_atexit}" = "yes"; then
+AC_DEFINE_UNQUOTED(_REENT_GLOBAL_ATEXIT)
+fi
+
if test "${newlib_fvwrite_in_streamio}" = "yes"; then
AC_DEFINE_UNQUOTED(_FVWRITE_IN_STREAMIO)
fi
@@ -407,6 +438,10 @@ if test "${lite_exit}" = "yes"; then
AC_DEFINE_UNQUOTED(_LITE_EXIT)
fi
+if test "${newlib_nano_formatted_io}" = "yes"; then
+AC_DEFINE_UNQUOTED(_NANO_FORMATTED_IO)
+fi
+
dnl
dnl Parse --enable-newlib-iconv-encodings option argument
dnl
@@ -509,6 +544,25 @@ if test $libc_cv_initfinit_array = yes; then
AC_DEFINE_UNQUOTED(HAVE_INITFINI_ARRAY)
fi
+AC_CACHE_CHECK(if $CC accepts -fno-tree-loop-distribute-patterns with \
+__attribute__ ((__optimize__)), libc_cv_cc_loop_to_function, [dnl
+cat > conftest.c <<EOF
+void
+__attribute__ ((__optimize__ ("-fno-tree-loop-distribute-patterns")))
+foo (void) {}
+EOF
+libc_cv_cc_loop_to_function=no
+if AC_TRY_COMMAND([${CC-cc} $CFLAGS $CPPFLAGS -c
+ -fno-tree-loop-distribute-patterns conftest.c])
+then
+ libc_cv_cc_loop_to_function=yes
+fi
+rm -f conftest*])
+if test $libc_cv_cc_loop_to_function = yes; then
+ AC_DEFINE(_HAVE_CC_INHIBIT_LOOP_TO_LIBCALL)
+fi
+AC_SUBST(libc_cv_cc_loop_to_function)
+
dnl Autoconf 2.59 doesn't support the AC_TYPE_LONG_DOUBLE macro. Instead of:
dnl AC_TYPE_LONG_DOUBLE
dnl AM_CONDITIONAL(HAVE_LONG_DOUBLE, test x"$ac_cv_type_long_double" = x"yes")
diff --git a/newlib/doc/configure b/newlib/doc/configure
index d0e1e37cf..3b4b23d07 100755
--- a/newlib/doc/configure
+++ b/newlib/doc/configure
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.68 for newlib 2.0.0.
+# Generated by GNU Autoconf 2.68 for newlib 2.4.0.
#
#
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
@@ -556,8 +556,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='newlib'
PACKAGE_TARNAME='newlib'
-PACKAGE_VERSION='2.0.0'
-PACKAGE_STRING='newlib 2.0.0'
+PACKAGE_VERSION='2.4.0'
+PACKAGE_STRING='newlib 2.4.0'
PACKAGE_BUGREPORT=''
PACKAGE_URL=''
@@ -1241,7 +1241,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures newlib 2.0.0 to adapt to many kinds of systems.
+\`configure' configures newlib 2.4.0 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1311,7 +1311,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of newlib 2.0.0:";;
+ short | recursive ) echo "Configuration of newlib 2.4.0:";;
esac
cat <<\_ACEOF
@@ -1402,7 +1402,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-newlib configure 2.0.0
+newlib configure 2.4.0
generated by GNU Autoconf 2.68
Copyright (C) 2010 Free Software Foundation, Inc.
@@ -1457,7 +1457,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by newlib $as_me 2.0.0, which was
+It was created by newlib $as_me 2.4.0, which was
generated by GNU Autoconf 2.68. Invocation command line was
$ $0 $@
@@ -2529,7 +2529,7 @@ fi
# Define the identity of the package.
PACKAGE='newlib'
- VERSION='2.0.0'
+ VERSION='2.4.0'
# Some tools Automake needs.
@@ -4045,7 +4045,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by newlib $as_me 2.0.0, which was
+This file was extended by newlib $as_me 2.4.0, which was
generated by GNU Autoconf 2.68. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -4102,7 +4102,7 @@ _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
-newlib config.status 2.0.0
+newlib config.status 2.4.0
configured by $0, generated by GNU Autoconf 2.68,
with options \\"\$ac_cs_config\\"
diff --git a/newlib/doc/doc.str b/newlib/doc/doc.str
index 51ecef7f4..3fc1006f8 100644
--- a/newlib/doc/doc.str
+++ b/newlib/doc/doc.str
@@ -107,7 +107,7 @@
courierize
do_fancy_stuff
catstr
- "@*\n" catstr
+ "@sp 1\n" catstr
;
: asection
@@ -154,13 +154,13 @@
"@strong{See Also}@*\n" catstr subhead ;
: INTERNAL_FUNCTION
- func ;
+ ;
-: INTERNAL_DEFINITION
- func ;
+: INTERNAL_DEFINITION
+ ;
: INTERNAL
- func ;
+ ;
: TYPEDEF
FUNCTION ;
diff --git a/newlib/doc/makedoc.c b/newlib/doc/makedoc.c
index 7d38a5db8..96362f782 100644
--- a/newlib/doc/makedoc.c
+++ b/newlib/doc/makedoc.c
@@ -40,6 +40,7 @@ There is no
#include <stdlib.h>
#include <ctype.h>
#include <string.h>
+#include <stdint.h>
#define DEF_SIZE 5000
#define STACK 50
@@ -219,10 +220,10 @@ typedef void (*stinst_type)(NOARGS);
stinst_type *pc;
stinst_type sstack[STACK];
stinst_type *ssp = &sstack[0];
-int istack[STACK];
-int *isp = &istack[0];
+uintptr_t istack[STACK];
+uintptr_t *isp = &istack[0];
-typedef int *word_type;
+typedef uintptr_t *word_type;
@@ -270,7 +271,7 @@ WORD(push_number)
{
isp++;
pc++;
- *isp = (int)(*pc);
+ *isp = (uintptr_t)(*pc);
pc++;
}
@@ -776,14 +777,18 @@ DEFUN( iscommand,(ptr, idx),
unsigned int idx)
{
unsigned int len = 0;
- while (at(ptr,idx)) {
- if (isupper(at(ptr,idx)) || at(ptr,idx) == ' ' ||
- at(ptr,idx) == '_')
- {
+
+ while (isupper(at(ptr,idx)) || at(ptr,idx) == '_') {
len++;
idx++;
- }
- else if(at(ptr,idx) == '\n')
+ }
+
+ while (at(ptr,idx) == ' ') {
+ len++;
+ idx++;
+ }
+
+ if(at(ptr,idx) == '\n')
{
/* The length check will never fail on a real command
* because the commands are screened as the definitions file
@@ -791,8 +796,7 @@ DEFUN( iscommand,(ptr, idx),
if (len >= MIN_CMDLEN) return 1;
return 0;
}
- else return 0;
- }
+
return 0;
}
@@ -1338,7 +1342,7 @@ return(ret);
static void DEFUN_VOID(bang)
{
-*(int *)((isp[0])) = isp[-1];
+*(uintptr_t *)((isp[0])) = isp[-1];
isp-=2;
pc++;
@@ -1346,7 +1350,7 @@ pc++;
WORD(atsign)
{
- isp[0] = *(int *)(isp[0]);
+ isp[0] = *(uintptr_t *)(isp[0]);
pc++;
}
diff --git a/newlib/iconvdata/configure b/newlib/iconvdata/configure
index 419de8405..673b67f7b 100755
--- a/newlib/iconvdata/configure
+++ b/newlib/iconvdata/configure
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.68 for newlib 2.0.0.
+# Generated by GNU Autoconf 2.68 for newlib 2.4.0.
#
#
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
@@ -567,8 +567,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='newlib'
PACKAGE_TARNAME='newlib'
-PACKAGE_VERSION='2.0.0'
-PACKAGE_STRING='newlib 2.0.0'
+PACKAGE_VERSION='2.4.0'
+PACKAGE_STRING='newlib 2.4.0'
PACKAGE_BUGREPORT=''
PACKAGE_URL=''
@@ -1322,7 +1322,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures newlib 2.0.0 to adapt to many kinds of systems.
+\`configure' configures newlib 2.4.0 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1392,7 +1392,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of newlib 2.0.0:";;
+ short | recursive ) echo "Configuration of newlib 2.4.0:";;
esac
cat <<\_ACEOF
@@ -1503,7 +1503,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-newlib configure 2.0.0
+newlib configure 2.4.0
generated by GNU Autoconf 2.68
Copyright (C) 2010 Free Software Foundation, Inc.
@@ -1781,7 +1781,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by newlib $as_me 2.0.0, which was
+It was created by newlib $as_me 2.4.0, which was
generated by GNU Autoconf 2.68. Invocation command line was
$ $0 $@
@@ -2853,7 +2853,7 @@ fi
# Define the identity of the package.
PACKAGE='newlib'
- VERSION='2.0.0'
+ VERSION='2.4.0'
# Some tools Automake needs.
@@ -6914,7 +6914,7 @@ ia64-*-hpux*)
rm -rf conftest*
;;
-x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \
+x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \
s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
# Find out which ABI we are using.
echo 'int i;' > conftest.$ac_ext
@@ -6939,7 +6939,10 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
;;
esac
;;
- ppc64-*linux*|powerpc64-*linux*)
+ powerpc64le-*linux*)
+ LD="${LD-ld} -m elf32lppclinux"
+ ;;
+ powerpc64-*linux*)
LD="${LD-ld} -m elf32ppclinux"
;;
s390x-*linux*)
@@ -6958,7 +6961,10 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
x86_64-*linux*)
LD="${LD-ld} -m elf_x86_64"
;;
- ppc*-*linux*|powerpc*-*linux*)
+ powerpcle-*linux*)
+ LD="${LD-ld} -m elf64lppc"
+ ;;
+ powerpc-*linux*)
LD="${LD-ld} -m elf64ppc"
;;
s390*-*linux*|s390*-*tpf*)
@@ -7640,7 +7646,7 @@ $as_echo "$lt_cv_ld_force_load" >&6; }
case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
10.0,*86*-darwin8*|10.0,*-darwin[91]*)
_lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
- 10.[012]*)
+ 10.[012][,.]*)
_lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
10.*)
_lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
@@ -9209,7 +9215,7 @@ _LT_EOF
if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
&& test "$tmp_diet" = no
then
- tmp_addflag=
+ tmp_addflag=' $pic_flag'
tmp_sharedflag='-shared'
case $cc_basename,$host_cpu in
pgcc*) # Portland Group C compiler
@@ -9391,7 +9397,7 @@ _LT_EOF
if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
else
- export_symbols_cmds='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
+ export_symbols_cmds='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "L")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
fi
aix_use_runtimelinking=no
@@ -11419,7 +11425,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 11422 "configure"
+#line 11428 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -11525,7 +11531,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 11528 "configure"
+#line 11534 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -12372,7 +12378,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by newlib $as_me 2.0.0, which was
+This file was extended by newlib $as_me 2.4.0, which was
generated by GNU Autoconf 2.68. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -12429,7 +12435,7 @@ _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
-newlib config.status 2.0.0
+newlib config.status 2.4.0
configured by $0, generated by GNU Autoconf 2.68,
with options \\"\$ac_cs_config\\"
diff --git a/newlib/libc/argz/Makefile.am b/newlib/libc/argz/Makefile.am
index 74e730718..e5e690444 100644
--- a/newlib/libc/argz/Makefile.am
+++ b/newlib/libc/argz/Makefile.am
@@ -43,20 +43,8 @@ lib_a_CFLAGS = $(AM_CFLAGS)
noinst_DATA =
endif # USE_LIBTOOL
-SUFFIXES = .def
-
CHEWOUT_FILES =
-
-CHEW = ../../doc/makedoc -f $(srcdir)/../../doc/doc.str
-
-.c.def:
- $(CHEW) < $< > $*.def 2> $*.ref
- touch stmp-def
-
-TARGETDOC = ../tmp.texi
-
-doc: $(CHEWOUT_FILES)
-
-CLEANFILES = $(CHEWOUT_FILES) *.ref
+CHAPTERS =
+# No doc for argz.
include $(srcdir)/../../Makefile.shared
diff --git a/newlib/libc/argz/Makefile.in b/newlib/libc/argz/Makefile.in
index c7101b1b0..bab4fae39 100644
--- a/newlib/libc/argz/Makefile.in
+++ b/newlib/libc/argz/Makefile.in
@@ -308,10 +308,14 @@ libargz_la_LDFLAGS = -Xcompiler -nostdlib
@USE_LIBTOOL_FALSE@noinst_LIBRARIES = lib.a
@USE_LIBTOOL_FALSE@lib_a_SOURCES = dummy.c $(ELIX_SOURCES)
@USE_LIBTOOL_FALSE@lib_a_CFLAGS = $(AM_CFLAGS)
-SUFFIXES = .def
CHEWOUT_FILES =
-CHEW = ../../doc/makedoc -f $(srcdir)/../../doc/doc.str
-TARGETDOC = ../tmp.texi
+CHAPTERS =
+
+#
+# documentation rules
+#
+SUFFIXES = .def
+CHEW = ${top_builddir}/../doc/makedoc -f $(top_srcdir)/../doc/doc.str
CLEANFILES = $(CHEWOUT_FILES) *.ref
all: all-am
@@ -679,18 +683,25 @@ uninstall-am:
mostlyclean-libtool pdf pdf-am ps ps-am tags uninstall \
uninstall-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
.c.def:
$(CHEW) < $< > $*.def 2> $*.ref
touch stmp-def
+TARGETDOC ?= ../tmp.texi
+
doc: $(CHEWOUT_FILES)
-objectlist.awk.in: $(noinst_LTLIBRARIES)
- -rm -f objectlist.awk.in
- for i in `ls *.lo` ; \
+ for chapter in $(CHAPTERS) ; \
do \
- echo $$i `pwd`/$$i >> objectlist.awk.in ; \
+ cat $(srcdir)/$$chapter >> $(TARGETDOC) ; \
done
+# No doc for argz.
# 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.
diff --git a/newlib/libc/argz/argz_replace.c b/newlib/libc/argz/argz_replace.c
index cb01eaef5..b274f91b6 100644
--- a/newlib/libc/argz/argz_replace.c
+++ b/newlib/libc/argz/argz_replace.c
@@ -30,6 +30,7 @@ _DEFUN (argz_replace, (argz, argz_len, str, with, replace_count),
char *new_argz = NULL;
size_t new_argz_len = 0;
char *new_argz_iter = NULL;
+ char *argz_realloc = NULL;
*replace_count = 0;
new_argz_len = *argz_len;
@@ -45,7 +46,8 @@ _DEFUN (argz_replace, (argz, argz_len, str, with, replace_count),
if (*replace_count)
{
- new_argz = (char *)malloc(new_argz_len);
+ if (!(new_argz = (char *)malloc(new_argz_len)))
+ return ENOMEM;
buf_iter = *argz;
buf_len = *argz_len;
@@ -70,8 +72,12 @@ _DEFUN (argz_replace, (argz, argz_len, str, with, replace_count),
memcpy(new_argz_iter, last_iter, *argz + *argz_len - last_iter);
/* reallocate argz, and copy over the new value. */
- if(!(*argz = (char *)realloc(*argz, new_argz_len)))
- return ENOMEM;
+ if(!(argz_realloc = (char *)realloc(*argz, new_argz_len)))
+ {
+ free(new_argz);
+ return ENOMEM;
+ }
+ *argz = argz_realloc;
memcpy(*argz, new_argz, new_argz_len);
*argz_len = new_argz_len;
diff --git a/newlib/libc/argz/envz_merge.c b/newlib/libc/argz/envz_merge.c
index 46832202e..8a26bc3c3 100644
--- a/newlib/libc/argz/envz_merge.c
+++ b/newlib/libc/argz/envz_merge.c
@@ -55,6 +55,7 @@ _DEFUN (envz_merge, (envz, envz_len, envz2, envz2_len, override),
}
retval = envz_add(envz, envz_len, name_str, val_str);
+ free(name_str);
}
}
return retval;
diff --git a/newlib/libc/configure b/newlib/libc/configure
index 42bc7b8e2..5dccc852b 100755
--- a/newlib/libc/configure
+++ b/newlib/libc/configure
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.68 for newlib 2.0.0.
+# Generated by GNU Autoconf 2.68 for newlib 2.4.0.
#
#
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
@@ -567,8 +567,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='newlib'
PACKAGE_TARNAME='newlib'
-PACKAGE_VERSION='2.0.0'
-PACKAGE_STRING='newlib 2.0.0'
+PACKAGE_VERSION='2.4.0'
+PACKAGE_STRING='newlib 2.4.0'
PACKAGE_BUGREPORT=''
PACKAGE_URL=''
@@ -673,6 +673,8 @@ LIBTOOL
OBJDUMP
DLLTOOL
SED
+NEWLIB_NANO_MALLOC_FALSE
+NEWLIB_NANO_MALLOC_TRUE
sys_dir
machine_dir
libm_machine_dir
@@ -749,8 +751,8 @@ build
newlib_basedir
MAY_SUPPLY_SYSCALLS_FALSE
MAY_SUPPLY_SYSCALLS_TRUE
-NEWLIB_NANO_MALLOC_FALSE
-NEWLIB_NANO_MALLOC_TRUE
+NEWLIB_NANO_FORMATTED_IO_FALSE
+NEWLIB_NANO_FORMATTED_IO_TRUE
target_alias
host_alias
build_alias
@@ -794,6 +796,7 @@ ac_user_opts='
enable_option_checking
enable_newlib_io_pos_args
enable_newlib_nano_malloc
+enable_newlib_nano_formatted_io
enable_multilib
enable_target_optspace
enable_malloc_debugging
@@ -1364,7 +1367,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures newlib 2.0.0 to adapt to many kinds of systems.
+\`configure' configures newlib 2.4.0 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1434,7 +1437,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of newlib 2.0.0:";;
+ short | recursive ) echo "Configuration of newlib 2.4.0:";;
esac
cat <<\_ACEOF
@@ -1444,6 +1447,7 @@ Optional Features:
--enable-FEATURE[=ARG] include FEATURE [ARG=yes]
--enable-newlib-io-pos-args enable printf-family positional arg support
--enable-newlib-nano-malloc Use small-footprint nano-malloc implementation
+ --enable-newlib-nano-formatted-io Use small-footprint nano-formatted-IO implementation
--enable-multilib build many library versions (default)
--enable-target-optspace optimize for space
--enable-malloc-debugging indicate malloc debugging requested
@@ -1547,7 +1551,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-newlib configure 2.0.0
+newlib configure 2.4.0
generated by GNU Autoconf 2.68
Copyright (C) 2010 Free Software Foundation, Inc.
@@ -1825,7 +1829,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by newlib $as_me 2.0.0, which was
+It was created by newlib $as_me 2.4.0, which was
generated by GNU Autoconf 2.68. Invocation command line was
$ $0 $@
@@ -2224,15 +2228,27 @@ if test "${enable_newlib_nano_malloc+set}" = set; then :
*) as_fn_error $? "bad value ${enableval} for newlib-nano-malloc" "$LINENO" 5 ;;
esac
else
- newlib_nano_malloc=no
+ newlib_nano_malloc=
fi
- if test x$newlib_nano_malloc = xyes; then
- NEWLIB_NANO_MALLOC_TRUE=
- NEWLIB_NANO_MALLOC_FALSE='#'
+
+# Check whether --enable-newlib_nano_formatted_io was given.
+if test "${enable_newlib_nano_formatted_io+set}" = set; then :
+ enableval=$enable_newlib_nano_formatted_io; case "${enableval}" in
+ yes) newlib_nano_formatted_io=yes ;;
+ no) newlib_nano_formatted_io=no ;;
+ *) as_fn_error $? "bad value ${enableval} for newlib-nano-formatted-io" "$LINENO" 5 ;;
+ esac
else
- NEWLIB_NANO_MALLOC_TRUE='#'
- NEWLIB_NANO_MALLOC_FALSE=
+ newlib_nano_formatted_io=no
+fi
+
+ if test x$newlib_nano_formatted_io = xyes; then
+ NEWLIB_NANO_FORMATTED_IO_TRUE=
+ NEWLIB_NANO_FORMATTED_IO_FALSE='#'
+else
+ NEWLIB_NANO_FORMATTED_IO_TRUE='#'
+ NEWLIB_NANO_FORMATTED_IO_FALSE=
fi
@@ -2928,7 +2944,7 @@ fi
# Define the identity of the package.
PACKAGE='newlib'
- VERSION='2.0.0'
+ VERSION='2.4.0'
# Some tools Automake needs.
@@ -3811,6 +3827,15 @@ OBJEXT=${oext}
+ if test x$newlib_nano_malloc = xyes; then
+ NEWLIB_NANO_MALLOC_TRUE=
+ NEWLIB_NANO_MALLOC_FALSE='#'
+else
+ NEWLIB_NANO_MALLOC_TRUE='#'
+ NEWLIB_NANO_MALLOC_FALSE=
+fi
+
+
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
$as_echo_n "checking for a sed that does not truncate output... " >&6; }
if ${ac_cv_path_SED+:} false; then :
@@ -6989,7 +7014,7 @@ ia64-*-hpux*)
rm -rf conftest*
;;
-x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \
+x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \
s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
# Find out which ABI we are using.
echo 'int i;' > conftest.$ac_ext
@@ -7014,7 +7039,10 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
;;
esac
;;
- ppc64-*linux*|powerpc64-*linux*)
+ powerpc64le-*linux*)
+ LD="${LD-ld} -m elf32lppclinux"
+ ;;
+ powerpc64-*linux*)
LD="${LD-ld} -m elf32ppclinux"
;;
s390x-*linux*)
@@ -7033,7 +7061,10 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
x86_64-*linux*)
LD="${LD-ld} -m elf_x86_64"
;;
- ppc*-*linux*|powerpc*-*linux*)
+ powerpcle-*linux*)
+ LD="${LD-ld} -m elf64lppc"
+ ;;
+ powerpc-*linux*)
LD="${LD-ld} -m elf64ppc"
;;
s390*-*linux*|s390*-*tpf*)
@@ -7715,7 +7746,7 @@ $as_echo "$lt_cv_ld_force_load" >&6; }
case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
10.0,*86*-darwin8*|10.0,*-darwin[91]*)
_lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
- 10.[012]*)
+ 10.[012][,.]*)
_lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
10.*)
_lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
@@ -9284,7 +9315,7 @@ _LT_EOF
if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
&& test "$tmp_diet" = no
then
- tmp_addflag=
+ tmp_addflag=' $pic_flag'
tmp_sharedflag='-shared'
case $cc_basename,$host_cpu in
pgcc*) # Portland Group C compiler
@@ -9466,7 +9497,7 @@ _LT_EOF
if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
else
- export_symbols_cmds='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
+ export_symbols_cmds='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "L")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
fi
aix_use_runtimelinking=no
@@ -11494,7 +11525,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 11473 "configure"
+#line 11528 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -11600,7 +11631,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 11579 "configure"
+#line 11634 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -12213,8 +12244,8 @@ LIBOBJS=$ac_libobjs
LTLIBOBJS=$ac_ltlibobjs
-if test -z "${NEWLIB_NANO_MALLOC_TRUE}" && test -z "${NEWLIB_NANO_MALLOC_FALSE}"; then
- as_fn_error $? "conditional \"NEWLIB_NANO_MALLOC\" was never defined.
+if test -z "${NEWLIB_NANO_FORMATTED_IO_TRUE}" && test -z "${NEWLIB_NANO_FORMATTED_IO_FALSE}"; then
+ as_fn_error $? "conditional \"NEWLIB_NANO_FORMATTED_IO\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
if test -z "${MAY_SUPPLY_SYSCALLS_TRUE}" && test -z "${MAY_SUPPLY_SYSCALLS_FALSE}"; then
@@ -12265,6 +12296,10 @@ if test -z "${USE_LIBTOOL_TRUE}" && test -z "${USE_LIBTOOL_FALSE}"; then
as_fn_error $? "conditional \"USE_LIBTOOL\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
+if test -z "${NEWLIB_NANO_MALLOC_TRUE}" && test -z "${NEWLIB_NANO_MALLOC_FALSE}"; then
+ as_fn_error $? "conditional \"NEWLIB_NANO_MALLOC\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
as_fn_error $? "conditional \"am__fastdepCC\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
@@ -12714,7 +12749,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by newlib $as_me 2.0.0, which was
+This file was extended by newlib $as_me 2.4.0, which was
generated by GNU Autoconf 2.68. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -12771,7 +12806,7 @@ _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
-newlib config.status 2.0.0
+newlib config.status 2.4.0
configured by $0, generated by GNU Autoconf 2.68,
with options \\"\$ac_cs_config\\"
diff --git a/newlib/libc/configure.in b/newlib/libc/configure.in
index 7ca0352da..0a7bb8815 100644
--- a/newlib/libc/configure.in
+++ b/newlib/libc/configure.in
@@ -24,11 +24,22 @@ AC_ARG_ENABLE(newlib_nano_malloc,
yes) newlib_nano_malloc=yes ;;
no) newlib_nano_malloc=no ;;
*) AC_MSG_ERROR(bad value ${enableval} for newlib-nano-malloc) ;;
- esac],[newlib_nano_malloc=no])
-AM_CONDITIONAL(NEWLIB_NANO_MALLOC, test x$newlib_nano_malloc = xyes)
+ esac],[newlib_nano_malloc=])
+
+dnl Support --enable-newlib-nano-formatted-io used by libc/stdio
+AC_ARG_ENABLE(newlib_nano_formatted_io,
+[ --enable-newlib-nano-formatted-io Use small-footprint nano-formatted-IO implementation],
+[case "${enableval}" in
+ yes) newlib_nano_formatted_io=yes ;;
+ no) newlib_nano_formatted_io=no ;;
+ *) AC_MSG_ERROR(bad value ${enableval} for newlib-nano-formatted-io) ;;
+ esac],[newlib_nano_formatted_io=no])
+AM_CONDITIONAL(NEWLIB_NANO_FORMATTED_IO, test x$newlib_nano_formatted_io = xyes)
NEWLIB_CONFIGURE(..)
+AM_CONDITIONAL(NEWLIB_NANO_MALLOC, test x$newlib_nano_malloc = xyes)
+
dnl We have to enable libtool after NEWLIB_CONFIGURE because if we try and
dnl add it into NEWLIB_CONFIGURE, executable tests are made before the first
dnl line of the macro which fail because appropriate LDFLAGS are not set.
diff --git a/newlib/libc/ctype/Makefile.am b/newlib/libc/ctype/Makefile.am
index 3d351aeca..58ec2f8bf 100644
--- a/newlib/libc/ctype/Makefile.am
+++ b/newlib/libc/ctype/Makefile.am
@@ -67,6 +67,7 @@ CHEWOUT_FILES= \
isalnum.def \
isalpha.def \
isascii.def \
+ isblank.def \
iscntrl.def \
isdigit.def \
islower.def \
@@ -97,19 +98,6 @@ CHEWOUT_FILES= \
wctrans.def \
wctype.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)/ctype.tex >> $(TARGETDOC)
-
-CLEANFILES = $(CHEWOUT_FILES) *.ref
+CHAPTERS = ctype.tex
$(lpfx)ctype_.$(oext): ctype_.c ctype_iso.h ctype_cp.h
diff --git a/newlib/libc/ctype/Makefile.in b/newlib/libc/ctype/Makefile.in
index ae88de87a..c3ef2417e 100644
--- a/newlib/libc/ctype/Makefile.in
+++ b/newlib/libc/ctype/Makefile.in
@@ -339,10 +339,18 @@ libctype_la_LDFLAGS = -Xcompiler -nostdlib
@USE_LIBTOOL_FALSE@noinst_LIBRARIES = lib.a
@USE_LIBTOOL_FALSE@lib_a_SOURCES = $(GENERAL_SOURCES) $(ELIX_SOURCES)
@USE_LIBTOOL_FALSE@lib_a_CFLAGS = $(AM_CFLAGS)
+
+#
+# documentation rules
+#
+SUFFIXES = .def
+CHEW = ${top_builddir}/../doc/makedoc -f $(top_srcdir)/../doc/doc.str
+CLEANFILES = $(CHEWOUT_FILES) *.ref
CHEWOUT_FILES = \
isalnum.def \
isalpha.def \
isascii.def \
+ isblank.def \
iscntrl.def \
isdigit.def \
islower.def \
@@ -373,10 +381,7 @@ CHEWOUT_FILES = \
wctrans.def \
wctype.def
-SUFFIXES = .def
-CHEW = ../../doc/makedoc -f $(srcdir)/../../doc/doc.str
-TARGETDOC = ../tmp.texi
-CLEANFILES = $(CHEWOUT_FILES) *.ref
+CHAPTERS = ctype.tex
all: all-am
.SUFFIXES:
@@ -844,8 +849,13 @@ objectlist.awk.in: $(noinst_LTLIBRARIES)
$(CHEW) < $< > $*.def 2> $*.ref
touch stmp-def
+TARGETDOC ?= ../tmp.texi
+
doc: $(CHEWOUT_FILES)
- cat $(srcdir)/ctype.tex >> $(TARGETDOC)
+ for chapter in $(CHAPTERS) ; \
+ do \
+ cat $(srcdir)/$$chapter >> $(TARGETDOC) ; \
+ done
$(lpfx)ctype_.$(oext): ctype_.c ctype_iso.h ctype_cp.h
diff --git a/newlib/libc/ctype/ctype.tex b/newlib/libc/ctype/ctype.tex
index d15e86b30..9f0510aa5 100644
--- a/newlib/libc/ctype/ctype.tex
+++ b/newlib/libc/ctype/ctype.tex
@@ -10,6 +10,7 @@ The header file @file{ctype.h} defines the macros.
* isalnum:: Alphanumeric character predicate
* isalpha:: Alphabetic character predicate
* isascii:: ASCII character predicate
+* isblank:: Blank character predicate
* iscntrl:: Control character predicate
* isdigit:: Decimal digit predicate
* islower:: Lowercase character predicate
@@ -51,6 +52,9 @@ The header file @file{ctype.h} defines the macros.
@include ctype/isascii.def
@page
+@include ctype/isblank.def
+
+@page
@include ctype/iscntrl.def
@page
diff --git a/newlib/libc/ctype/iswalpha.c b/newlib/libc/ctype/iswalpha.c
index 16d424086..71f0e4a4b 100644
--- a/newlib/libc/ctype/iswalpha.c
+++ b/newlib/libc/ctype/iswalpha.c
@@ -415,7 +415,7 @@ _DEFUN(iswalpha,(c), wint_t c)
/* otherwise c > *ptr */
/* look for 0x0 as next element which indicates a range */
++ptr;
- if (*ptr == 0x0)
+ if (ptr < table + size - 1 && *ptr == 0x0)
{
/* we have a range..see if c falls within range */
++ptr;
diff --git a/newlib/libc/ctype/jp2uc.c b/newlib/libc/ctype/jp2uc.c
index 0b0085f15..40d777add 100644
--- a/newlib/libc/ctype/jp2uc.c
+++ b/newlib/libc/ctype/jp2uc.c
@@ -37,6 +37,7 @@
#ifndef __CYGWIN__
#include <_ansi.h>
+#include <string.h>
#include <wctype.h>
#include "local.h"
#include "jp2uc.h"
diff --git a/newlib/libc/errno/Makefile.am b/newlib/libc/errno/Makefile.am
index db5bb3d1c..187e303c4 100644
--- a/newlib/libc/errno/Makefile.am
+++ b/newlib/libc/errno/Makefile.am
@@ -22,18 +22,5 @@ endif # USE_LIBTOOL
include $(srcdir)/../../Makefile.shared
CHEWOUT_FILES =
-
-SUFFIXES = .def
-
-CHEW = ../../doc/makedoc -f $(srcdir)/../../doc/doc.str
-
-.c.def:
- $(CHEW) < $< > $*.def 2> $*.ref
- touch stmp-def
-
-TARGETDOC = ../tmp.texi
-
+CHAPTERS =
# No doc for errno.
-doc:
-
-CLEANFILES = $(CHEWOUT_FILES) *.ref
diff --git a/newlib/libc/errno/Makefile.in b/newlib/libc/errno/Makefile.in
index fe727e8be..a6c56c816 100644
--- a/newlib/libc/errno/Makefile.in
+++ b/newlib/libc/errno/Makefile.in
@@ -260,11 +260,15 @@ liberrno_la_LDFLAGS = -Xcompiler -nostdlib
@USE_LIBTOOL_FALSE@noinst_LIBRARIES = lib.a
@USE_LIBTOOL_FALSE@lib_a_SOURCES = $(LIB_SOURCES)
@USE_LIBTOOL_FALSE@lib_a_CFLAGS = $(AM_CFLAGS)
-CHEWOUT_FILES =
+
+#
+# documentation rules
+#
SUFFIXES = .def
-CHEW = ../../doc/makedoc -f $(srcdir)/../../doc/doc.str
-TARGETDOC = ../tmp.texi
+CHEW = ${top_builddir}/../doc/makedoc -f $(top_srcdir)/../doc/doc.str
CLEANFILES = $(CHEWOUT_FILES) *.ref
+CHEWOUT_FILES =
+CHAPTERS =
all: all-am
.SUFFIXES:
@@ -528,8 +532,14 @@ objectlist.awk.in: $(noinst_LTLIBRARIES)
$(CHEW) < $< > $*.def 2> $*.ref
touch stmp-def
+TARGETDOC ?= ../tmp.texi
+
+doc: $(CHEWOUT_FILES)
+ for chapter in $(CHAPTERS) ; \
+ do \
+ cat $(srcdir)/$$chapter >> $(TARGETDOC) ; \
+ done
# No doc for errno.
-doc:
# 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.
diff --git a/newlib/libc/iconv/Makefile.am b/newlib/libc/iconv/Makefile.am
index 561f03e48..e7ffefa8d 100644
--- a/newlib/libc/iconv/Makefile.am
+++ b/newlib/libc/iconv/Makefile.am
@@ -13,6 +13,7 @@ SUBDEFS = lib/stmp-def
include $(srcdir)/../../Makefile.shared
CHEWOUT_FILES = iconv.def
+CHAPTERS = iconv.tex
iconv.def: lib/iconv.def
cp lib/iconv.def iconv.def
@@ -29,11 +30,3 @@ $(SUBDEFS): stmp-def
lib/iconv.def: $(SUBDEFS); @true
lib/stmp-def: ; @true
-
-TARGETDOC = ../tmp.texi
-
-doc: $(CHEWOUT_FILES)
- cat $(srcdir)/iconv.tex >> $(TARGETDOC)
-
-CLEANFILES = $(CHEWOUT_FILES) *.ref
-
diff --git a/newlib/libc/iconv/Makefile.in b/newlib/libc/iconv/Makefile.in
index 6a361f10c..e0ed3f937 100644
--- a/newlib/libc/iconv/Makefile.in
+++ b/newlib/libc/iconv/Makefile.in
@@ -267,12 +267,19 @@ cctdir = $(datadir)/iconv_data
cct_DATA = encoding.aliases
INCLUDES = $(NEWLIB_CFLAGS) $(CROSS_CFLAGS) $(TARGET_CFLAGS)
SUBDEFS = lib/stmp-def
-CHEWOUT_FILES = iconv.def
-TARGETDOC = ../tmp.texi
+
+#
+# documentation rules
+#
+SUFFIXES = .def
+CHEW = ${top_builddir}/../doc/makedoc -f $(top_srcdir)/../doc/doc.str
CLEANFILES = $(CHEWOUT_FILES) *.ref
+CHEWOUT_FILES = iconv.def
+CHAPTERS = iconv.tex
all: all-recursive
.SUFFIXES:
+.SUFFIXES: .def .c
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(srcdir)/../../Makefile.shared $(am__configure_deps)
@for dep in $?; do \
case '$(am__configure_deps)' in \
@@ -595,6 +602,18 @@ objectlist.awk.in: $(noinst_LTLIBRARIES)
echo $$i `pwd`/$$i >> objectlist.awk.in ; \
done
+.c.def:
+ $(CHEW) < $< > $*.def 2> $*.ref
+ touch stmp-def
+
+TARGETDOC ?= ../tmp.texi
+
+doc: $(CHEWOUT_FILES)
+ for chapter in $(CHAPTERS) ; \
+ do \
+ cat $(srcdir)/$$chapter >> $(TARGETDOC) ; \
+ done
+
iconv.def: lib/iconv.def
cp lib/iconv.def iconv.def
@@ -611,9 +630,6 @@ lib/iconv.def: $(SUBDEFS); @true
lib/stmp-def: ; @true
-doc: $(CHEWOUT_FILES)
- cat $(srcdir)/iconv.tex >> $(TARGETDOC)
-
# 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/iconv/ccs/Makefile.am b/newlib/libc/iconv/ccs/Makefile.am
index ce0428efa..295d846e2 100644
--- a/newlib/libc/iconv/ccs/Makefile.am
+++ b/newlib/libc/iconv/ccs/Makefile.am
@@ -47,21 +47,7 @@ noinst_DATA =
SUBDIRS=binary
-CHEWOUT_FILES = ccs.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)/ccs.tex >> $(TARGETDOC)
-
-CLEANFILES = $(CHEWOUT_FILES) *.ref
+CHEWOUT_FILES =
+CHAPTERS =
include $(srcdir)/../../../Makefile.shared
diff --git a/newlib/libc/iconv/ccs/Makefile.in b/newlib/libc/iconv/ccs/Makefile.in
index 861e455b4..3be531927 100644
--- a/newlib/libc/iconv/ccs/Makefile.in
+++ b/newlib/libc/iconv/ccs/Makefile.in
@@ -349,10 +349,14 @@ lib_a_SOURCES = $(GENERAL_SOURCES) $(ELIX_SOURCES)
lib_a_CFLAGS = $(AM_CFLAGS)
noinst_DATA =
SUBDIRS = binary
-CHEWOUT_FILES = ccs.def
+CHEWOUT_FILES =
+CHAPTERS =
+
+#
+# documentation rules
+#
SUFFIXES = .def
-CHEW = ../../../doc/makedoc -f $(srcdir)/../../../doc/doc.str
-TARGETDOC = ../tmp.texi
+CHEW = ${top_builddir}/../doc/makedoc -f $(top_srcdir)/../doc/doc.str
CLEANFILES = $(CHEWOUT_FILES) *.ref
all: all-recursive
@@ -927,18 +931,23 @@ uninstall-am:
mostlyclean-libtool pdf pdf-am ps ps-am tags tags-recursive \
uninstall uninstall-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
.c.def:
$(CHEW) < $< > $*.def 2> $*.ref
touch stmp-def
+TARGETDOC ?= ../tmp.texi
+
doc: $(CHEWOUT_FILES)
- cat $(srcdir)/ccs.tex >> $(TARGETDOC)
-objectlist.awk.in: $(noinst_LTLIBRARIES)
- -rm -f objectlist.awk.in
- for i in `ls *.lo` ; \
+ for chapter in $(CHAPTERS) ; \
do \
- echo $$i `pwd`/$$i >> objectlist.awk.in ; \
+ cat $(srcdir)/$$chapter >> $(TARGETDOC) ; \
done
# Tell versions [3.59,3.63) of GNU make to not export all variables.
diff --git a/newlib/libc/iconv/ccs/binary/Makefile.in b/newlib/libc/iconv/ccs/binary/Makefile.in
index 6ba873649..6336b416b 100644
--- a/newlib/libc/iconv/ccs/binary/Makefile.in
+++ b/newlib/libc/iconv/ccs/binary/Makefile.in
@@ -264,9 +264,17 @@ cp775.cct cp850.cct cp852.cct cp855.cct cp866.cct \
jis_x0212_1990.cct jis_x0201_1976.cct jis_x0208_1990.cct ksx1001.cct \
cns11643_plane1.cct cns11643_plane2.cct cns11643_plane14.cct
+
+#
+# documentation rules
+#
+SUFFIXES = .def
+CHEW = ${top_builddir}/../doc/makedoc -f $(top_srcdir)/../doc/doc.str
+CLEANFILES = $(CHEWOUT_FILES) *.ref
all: all-am
.SUFFIXES:
+.SUFFIXES: .def .c
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(srcdir)/../../../../Makefile.shared $(am__configure_deps)
@for dep in $?; do \
case '$(am__configure_deps)' in \
@@ -360,6 +368,7 @@ install-strip:
mostlyclean-generic:
clean-generic:
+ -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
distclean-generic:
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
@@ -453,6 +462,18 @@ objectlist.awk.in: $(noinst_LTLIBRARIES)
echo $$i `pwd`/$$i >> objectlist.awk.in ; \
done
+.c.def:
+ $(CHEW) < $< > $*.def 2> $*.ref
+ touch stmp-def
+
+TARGETDOC ?= ../tmp.texi
+
+doc: $(CHEWOUT_FILES)
+ for chapter in $(CHAPTERS) ; \
+ do \
+ cat $(srcdir)/$$chapter >> $(TARGETDOC) ; \
+ done
+
info:
# Tell versions [3.59,3.63) of GNU make to not export all variables.
diff --git a/newlib/libc/iconv/ces/Makefile.am b/newlib/libc/iconv/ces/Makefile.am
index 92a19d2e4..d81c5f552 100644
--- a/newlib/libc/iconv/ces/Makefile.am
+++ b/newlib/libc/iconv/ces/Makefile.am
@@ -42,20 +42,5 @@ noinst_DATA =
include $(srcdir)/../../../Makefile.shared
-CHEWOUT_FILES = ces.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)/ces.tex >> $(TARGETDOC)
-
-CLEANFILES = $(CHEWOUT_FILES) *.ref
-
+CHEWOUT_FILES =
+CHAPTERS =
diff --git a/newlib/libc/iconv/ces/Makefile.in b/newlib/libc/iconv/ces/Makefile.in
index 9191d4be5..d5be04b93 100644
--- a/newlib/libc/iconv/ces/Makefile.in
+++ b/newlib/libc/iconv/ces/Makefile.in
@@ -287,11 +287,15 @@ noinst_LIBRARIES = lib.a
lib_a_SOURCES = $(GENERAL_SOURCES) $(ELIX_SOURCES)
lib_a_CFLAGS = $(AM_CFLAGS)
noinst_DATA =
-CHEWOUT_FILES = ces.def
+
+#
+# documentation rules
+#
SUFFIXES = .def
-CHEW = ../../../doc/makedoc -f $(srcdir)/../../../doc/doc.str
-TARGETDOC = ../tmp.texi
+CHEW = ${top_builddir}/../doc/makedoc -f $(top_srcdir)/../doc/doc.str
CLEANFILES = $(CHEWOUT_FILES) *.ref
+CHEWOUT_FILES =
+CHAPTERS =
all: all-am
.SUFFIXES:
@@ -603,8 +607,13 @@ objectlist.awk.in: $(noinst_LTLIBRARIES)
$(CHEW) < $< > $*.def 2> $*.ref
touch stmp-def
+TARGETDOC ?= ../tmp.texi
+
doc: $(CHEWOUT_FILES)
- cat $(srcdir)/ces.tex >> $(TARGETDOC)
+ for chapter in $(CHAPTERS) ; \
+ do \
+ cat $(srcdir)/$$chapter >> $(TARGETDOC) ; \
+ done
# 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.
diff --git a/newlib/libc/iconv/iconv.tex b/newlib/libc/iconv/iconv.tex
index b2bc5f6f6..46ced296b 100644
--- a/newlib/libc/iconv/iconv.tex
+++ b/newlib/libc/iconv/iconv.tex
@@ -947,7 +947,6 @@ names are used in configure script options.
@*
Names and aliases may be specified in any case (small or capital
letters) and the @kbd{-} symbol is equivalent to the @kbd{_} symbol.
-Also, when working with the iconv library,
@*
Internally the Newlib iconv library always converts aliases to names. It
@@ -1095,7 +1094,7 @@ is no corresponding CCS code (error, wrong input data). Else, fetch the
@item Calculate the offset of the @emph{X} code in its block:
@emph{Xindex = Y & 0xFF}
-@item If the @emph{Xintex}-th element of the block (which is equivalent to
+@item If the @emph{Xindex}-th element of the block (which is equivalent to
@emph{from_ucs[BlkN+Xindex]}) value is 0xFF, there is no corresponding
CCS code (error, wrong input data). Else, @emph{X = from_ucs[BlkN+Xindex]}.
@end enumerate
diff --git a/newlib/libc/iconv/lib/Makefile.am b/newlib/libc/iconv/lib/Makefile.am
index d8fd52838..dd6c34054 100644
--- a/newlib/libc/iconv/lib/Makefile.am
+++ b/newlib/libc/iconv/lib/Makefile.am
@@ -34,16 +34,4 @@ noinst_DATA =
include $(srcdir)/../../../Makefile.shared
CHEWOUT_FILES = iconv.def
-
-SUFFIXES = .def
-
-CHEW = ../../../doc/makedoc -f $(srcdir)/../../../doc/doc.str
-
-.c.def:
- $(CHEW) < $< > $*.def 2> $*.ref
- touch stmp-def
-
-doc: $(CHEWOUT_FILES)
-
-CLEANFILES = $(CHEWOUT_FILES) *.ref
-
+CHAPTER =
diff --git a/newlib/libc/iconv/lib/Makefile.in b/newlib/libc/iconv/lib/Makefile.in
index 786016471..c19808e7d 100644
--- a/newlib/libc/iconv/lib/Makefile.in
+++ b/newlib/libc/iconv/lib/Makefile.in
@@ -270,10 +270,15 @@ noinst_LIBRARIES = lib.a
lib_a_SOURCES = $(GENERAL_SOURCES) $(ELIX_SOURCES)
lib_a_CFLAGS = $(AM_CFLAGS)
noinst_DATA =
-CHEWOUT_FILES = iconv.def
+
+#
+# documentation rules
+#
SUFFIXES = .def
-CHEW = ../../../doc/makedoc -f $(srcdir)/../../../doc/doc.str
+CHEW = ${top_builddir}/../doc/makedoc -f $(top_srcdir)/../doc/doc.str
CLEANFILES = $(CHEWOUT_FILES) *.ref
+CHEWOUT_FILES = iconv.def
+CHAPTER =
all: all-am
.SUFFIXES:
@@ -555,7 +560,13 @@ objectlist.awk.in: $(noinst_LTLIBRARIES)
$(CHEW) < $< > $*.def 2> $*.ref
touch stmp-def
+TARGETDOC ?= ../tmp.texi
+
doc: $(CHEWOUT_FILES)
+ for chapter in $(CHAPTERS) ; \
+ do \
+ cat $(srcdir)/$$chapter >> $(TARGETDOC) ; \
+ done
# 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.
diff --git a/newlib/libc/iconv/lib/iconv.c b/newlib/libc/iconv/lib/iconv.c
index 8bbcae192..8214a7874 100644
--- a/newlib/libc/iconv/lib/iconv.c
+++ b/newlib/libc/iconv/lib/iconv.c
@@ -45,9 +45,10 @@ ANSI_SYNOPSIS
#include <iconv.h>
iconv_t iconv_open (const char *<[to]>, const char *<[from]>);
int iconv_close (iconv_t <[cd]>);
- size_t iconv (iconv_t <[cd]>, char **<[inbuf]>,
- size_t *<[inbytesleft]>,
- char **<[outbuf]>, size_t *<[outbytesleft]>),
+ size_t iconv (iconv_t <[cd]>, char **restrict <[inbuf]>,
+ size_t *restrict <[inbytesleft]>,
+ char **restrict <[outbuf]>,
+ size_t *restrict <[outbytesleft]>);
iconv_t _iconv_open_r (struct _reent *<[rptr]>,
const char *<[to]>, const char *<[from]>);
@@ -55,11 +56,11 @@ ANSI_SYNOPSIS
size_t _iconv_r (struct _reent *<[rptr]>,
iconv_t <[cd]>, const char **<[inbuf]>,
size_t *<[inbytesleft]>,
- char **<[outbuf]>, size_t *<[outbytesleft]>),
+ char **<[outbuf]>, size_t *<[outbytesleft]>);
TRAD_SYNOPSIS
#include <iconv.h>
- size_t iconv (<[cd]>, <[in]>, <[inleft]>, <[out]>, <[outleft]>)
+ size_t iconv (<[cd]>, <[in]>, <[inleft]>, <[out]>, <[outleft]>);
iconv_t <[cd]>;
char **<[in]>;
size_t *<[inleft]>;
@@ -76,7 +77,7 @@ TRAD_SYNOPSIS
iconv_t <[cd]>;
#include <iconv.h>
- size_t _iconv_r (<[rptr]>, <[cd]>, <[in]>, <[inleft]>, <[out]>, <[outleft]>)
+ size_t _iconv_r (<[rptr]>, <[cd]>, <[in]>, <[inleft]>, <[out]>, <[outleft]>);
struct _reent *<[rptr]>;
iconv_t <[cd]>;
const char **<[in]>;
@@ -168,10 +169,10 @@ _DEFUN(iconv_open, (to, from),
size_t
_DEFUN(iconv, (cd, inbuf, inbytesleft, outbuf, outbytesleft),
iconv_t cd _AND
- char **inbuf _AND
- size_t *inbytesleft _AND
- char **outbuf _AND
- size_t *outbytesleft)
+ char **__restrict inbuf _AND
+ size_t *__restrict inbytesleft _AND
+ char **__restrict outbuf _AND
+ size_t *__restrict outbytesleft)
{
return _iconv_r (_REENT, cd, (_CONST char **) inbuf, inbytesleft,
outbuf, outbytesleft);
diff --git a/newlib/libc/include/_ansi.h b/newlib/libc/include/_ansi.h
index c5597b30b..5fb990700 100644
--- a/newlib/libc/include/_ansi.h
+++ b/newlib/libc/include/_ansi.h
@@ -35,7 +35,7 @@
#define _END_STD_C }
#endif
#if __GNUC_PREREQ (3, 3)
-#define _NOTHROW __attribute__ ((nothrow))
+#define _NOTHROW __attribute__ ((__nothrow__))
#else
#define _NOTHROW throw()
#endif
@@ -72,9 +72,6 @@
#ifndef _LONG_DOUBLE
#define _LONG_DOUBLE long double
#endif
-#ifndef _LONG_LONG_TYPE
-#define _LONG_LONG_TYPE long long
-#endif
#ifndef _PARAMS
#define _PARAMS(paramlist) paramlist
#endif
@@ -93,7 +90,6 @@
#define _DEFUN_VOID(name) name()
#define _CAST_VOID
#define _LONG_DOUBLE double
-#define _LONG_LONG_TYPE long
#ifndef _PARAMS
#define _PARAMS(paramlist) ()
#endif
diff --git a/newlib/libc/include/_newlib_version.h b/newlib/libc/include/_newlib_version.h
new file mode 100644
index 000000000..d4fffb169
--- /dev/null
+++ b/newlib/libc/include/_newlib_version.h
@@ -0,0 +1,2 @@
+/* dummy file for external tools to use. Real file is created by
+ newlib configuration. */
diff --git a/newlib/libc/include/complex.h b/newlib/libc/include/complex.h
index 969b20e5f..89d6162dc 100644
--- a/newlib/libc/include/complex.h
+++ b/newlib/libc/include/complex.h
@@ -83,6 +83,7 @@ float complex clogf(float complex);
float cabsf(float complex) __RENAME(__c99_cabsf);
#endif
*/
+long double cabsl(long double complex) ;
double cabs(double complex) ;
float cabsf(float complex) ;
@@ -102,22 +103,50 @@ float cargf(float complex);
/* 7.3.9.2 The cimag functions */
double cimag(double complex);
float cimagf(float complex);
-/*long double cimagl(long double complex); */
+long double cimagl(long double complex);
/* 7.3.9.3 The conj functions */
double complex conj(double complex);
float complex conjf(float complex);
-/*long double complex conjl(long double complex); */
/* 7.3.9.4 The cproj functions */
double complex cproj(double complex);
float complex cprojf(float complex);
-/*long double complex cprojl(long double complex); */
/* 7.3.9.5 The creal functions */
double creal(double complex);
float crealf(float complex);
-/*long double creall(long double complex); */
+long double creall(long double complex);
+
+#if __GNU_VISIBLE
+double complex clog10(double complex);
+float complex clog10f(float complex);
+#endif
+
+#if defined(__CYGWIN__)
+long double complex cacosl(long double complex);
+long double complex casinl(long double complex);
+long double complex catanl(long double complex);
+long double complex ccosl(long double complex);
+long double complex csinl(long double complex);
+long double complex ctanl(long double complex);
+long double complex cacoshl(long double complex);
+long double complex casinhl(long double complex);
+long double complex catanhl(long double complex);
+long double complex ccoshl(long double complex);
+long double complex csinhl(long double complex);
+long double complex ctanhl(long double complex);
+long double complex cexpl(long double complex);
+long double complex clogl(long double complex);
+long double complex cpowl(long double complex, long double complex);
+long double complex csqrtl(long double complex);
+long double cargl(long double complex);
+long double complex conjl(long double complex);
+long double complex cprojl(long double complex);
+#if __GNU_VISIBLE
+long double complex clog10l(long double complex);
+#endif
+#endif /* __CYGWIN__ */
__END_DECLS
diff --git a/newlib/libc/include/cpio.h b/newlib/libc/include/cpio.h
new file mode 100644
index 000000000..99860b29c
--- /dev/null
+++ b/newlib/libc/include/cpio.h
@@ -0,0 +1,30 @@
+/* POSIX.1 symbolic constants for c_mode field of cpio archive format */
+
+#ifndef _CPIO_H
+#define _CPIO_H
+
+#define C_IRUSR 0000400 /* Read by owner */
+#define C_IWUSR 0000200 /* Write by owner */
+#define C_IXUSR 0000100 /* Execute by owner */
+#define C_IRGRP 0000040 /* Read by group */
+#define C_IWGRP 0000020 /* Write by group */
+#define C_IXGRP 0000010 /* Execute by group */
+#define C_IROTH 0000004 /* Read by others */
+#define C_IWOTH 0000002 /* Write by others */
+#define C_IXOTH 0000001 /* Execute by others */
+#define C_ISUID 0004000 /* Set user ID */
+#define C_ISGID 0002000 /* Set group ID */
+#define C_ISVTX 0001000 /* On directories, restricted deletion flag */
+
+#define C_ISDIR 0040000 /* Directory */
+#define C_ISFIFO 0010000 /* FIFO */
+#define C_ISREG 0100000 /* Regular file */
+#define C_ISBLK 0060000 /* Block special */
+#define C_ISCHR 0020000 /* Character special */
+#define C_ISCTG 0110000 /* Reserved */
+#define C_ISLNK 0120000 /* Symbolic link */
+#define C_ISSOCK 0140000 /* Socket */
+
+#define MAGIC "070707"
+
+#endif /* _CPIO_H */
diff --git a/newlib/libc/include/ctype.h b/newlib/libc/include/ctype.h
index 56ad5abb6..58a123864 100644
--- a/newlib/libc/include/ctype.h
+++ b/newlib/libc/include/ctype.h
@@ -2,6 +2,7 @@
#define _CTYPE_H_
#include "_ansi.h"
+#include <sys/cdefs.h>
_BEGIN_STD_C
@@ -19,11 +20,11 @@ int _EXFUN(isxdigit,(int __c));
int _EXFUN(tolower, (int __c));
int _EXFUN(toupper, (int __c));
-#if !defined(__STRICT_ANSI__) || defined(__cplusplus) || __STDC_VERSION__ >= 199901L
+#if __ISO_C_VISIBLE >= 1999
int _EXFUN(isblank, (int __c));
#endif
-#ifndef __STRICT_ANSI__
+#if __MISC_VISIBLE || __XSI_VISIBLE
int _EXFUN(isascii, (int __c));
int _EXFUN(toascii, (int __c));
#define _tolower(__c) ((unsigned char)(__c) - 'A' + 'a')
@@ -68,8 +69,7 @@ extern __IMPORT char *__ctype_ptr__;
#define isgraph(__c) (__ctype_lookup(__c)&(_P|_U|_L|_N))
#define iscntrl(__c) (__ctype_lookup(__c)&_C)
-#if defined(__GNUC__) && \
- (!defined(__STRICT_ANSI__) || __STDC_VERSION__ >= 199901L)
+#if defined(__GNUC__) && __ISO_C_VISIBLE >= 1999
#define isblank(__c) \
__extension__ ({ __typeof__ (__c) __x = (__c); \
(__ctype_lookup(__x)&_B) || (int) (__x) == '\t';})
@@ -98,13 +98,14 @@ extern __IMPORT char *__ctype_ptr__;
(void) __ctype_ptr__[__x]; (tolower) (__x);})
# endif /* _MB_EXTENDED_CHARSETS* */
# endif /* __GNUC__ */
-#endif /* !__cplusplus */
-#ifndef __STRICT_ANSI__
+#if __MISC_VISIBLE || __XSI_VISIBLE
#define isascii(__c) ((unsigned)(__c)<=0177)
#define toascii(__c) ((__c)&0177)
#endif
+#endif /* !__cplusplus */
+
/* For C++ backward-compatibility only. */
extern __IMPORT _CONST char _ctype_[];
diff --git a/newlib/libc/include/dirent.h b/newlib/libc/include/dirent.h
index 6fefc03cb..6135b9f6e 100644
--- a/newlib/libc/include/dirent.h
+++ b/newlib/libc/include/dirent.h
@@ -3,9 +3,10 @@
#ifdef __cplusplus
extern "C" {
#endif
+#include <sys/cdefs.h>
#include <sys/dirent.h>
-#if !defined(MAXNAMLEN) && !defined(_POSIX_SOURCE)
+#if !defined(MAXNAMLEN) && __BSD_VISIBLE
#define MAXNAMLEN 1024
#endif
diff --git a/newlib/libc/include/fnmatch.h b/newlib/libc/include/fnmatch.h
index 06311fc4b..a94e923a4 100644
--- a/newlib/libc/include/fnmatch.h
+++ b/newlib/libc/include/fnmatch.h
@@ -33,21 +33,21 @@
#ifndef _FNMATCH_H_
#define _FNMATCH_H_
+#include <sys/cdefs.h>
+
#define FNM_NOMATCH 1 /* Match failed. */
#define FNM_NOESCAPE 0x01 /* Disable backslash escaping. */
#define FNM_PATHNAME 0x02 /* Slash must be matched by slash. */
#define FNM_PERIOD 0x04 /* Period must be matched by period. */
-#if defined(_GNU_SOURCE) || !defined(_ANSI_SOURCE) && !defined(_POSIX_SOURCE)
+#if __GNU_VISIBLE
#define FNM_LEADING_DIR 0x08 /* Ignore /<tail> after Imatch. */
#define FNM_CASEFOLD 0x10 /* Case insensitive search. */
#define FNM_IGNORECASE FNM_CASEFOLD
#define FNM_FILE_NAME FNM_PATHNAME
#endif
-#include <sys/cdefs.h>
-
__BEGIN_DECLS
int fnmatch(const char *, const char *, int);
__END_DECLS
diff --git a/newlib/libc/include/getopt.h b/newlib/libc/include/getopt.h
index ba8da4a7f..e12d253d4 100644
--- a/newlib/libc/include/getopt.h
+++ b/newlib/libc/include/getopt.h
@@ -104,7 +104,7 @@ extern "C"
/* types defined by this include file */
struct option
{
- char *name; /* the name of the long option */
+ const char *name; /* the name of the long option */
int has_arg; /* one of the above macros */
int *flag; /* determines if getopt_long() returns a
* value for a long option; if it is
diff --git a/newlib/libc/include/glob.h b/newlib/libc/include/glob.h
index a7351350d..7a300e69d 100644
--- a/newlib/libc/include/glob.h
+++ b/newlib/libc/include/glob.h
@@ -82,7 +82,8 @@ typedef struct {
#define GLOB_ABEND (-2) /* Unignored error. */
__BEGIN_DECLS
-int glob(const char *, int, int (*)(const char *, int), glob_t *);
+int glob(const char *__restrict, int, int (*)(const char *, int),
+ glob_t *__restrict);
void globfree(glob_t *);
__END_DECLS
diff --git a/newlib/libc/include/grp.h b/newlib/libc/include/grp.h
index 1273e3959..6a265643a 100644
--- a/newlib/libc/include/grp.h
+++ b/newlib/libc/include/grp.h
@@ -43,12 +43,13 @@
#ifndef _GRP_H_
#define _GRP_H_
+#include <sys/cdefs.h>
#include <sys/types.h>
#ifdef __CYGWIN__
#include <cygwin/grp.h>
#endif
-#if !defined(_POSIX_SOURCE) && !defined(_XOPEN_SOURCE)
+#if __BSD_VISIBLE
#define _PATH_GROUP "/etc/group"
#endif
@@ -66,25 +67,20 @@ extern "C" {
#ifndef __INSIDE_CYGWIN__
struct group *getgrgid (gid_t);
struct group *getgrnam (const char *);
+#if __MISC_VISIBLE || __POSIX_VISIBLE
int getgrnam_r (const char *, struct group *,
char *, size_t, struct group **);
int getgrgid_r (gid_t, struct group *,
char *, size_t, struct group **);
-#ifndef _POSIX_SOURCE
+#endif /* __MISC_VISIBLE || __POSIX_VISIBLE */
+#if __MISC_VISIBLE || __XSI_VISIBLE >= 4
struct group *getgrent (void);
void setgrent (void);
void endgrent (void);
-#ifndef __CYGWIN__
-void setgrfile (const char *);
-#endif /* !__CYGWIN__ */
-#ifndef _XOPEN_SOURCE
-#ifndef __CYGWIN__
-char *group_from_gid (gid_t, int);
-int setgroupent (int);
-#endif /* !__CYGWIN__ */
+#endif /* __MISC_VISIBLE || __XSI_VISIBLE >= 4 */
+#if __BSD_VISIBLE
int initgroups (const char *, gid_t);
-#endif /* !_XOPEN_SOURCE */
-#endif /* !_POSIX_SOURCE */
+#endif /* __BSD_VISIBLE */
#endif /* !__INSIDE_CYGWIN__ */
#ifdef __cplusplus
diff --git a/newlib/libc/include/iconv.h b/newlib/libc/include/iconv.h
index c4a283afa..4c023e9df 100644
--- a/newlib/libc/include/iconv.h
+++ b/newlib/libc/include/iconv.h
@@ -41,7 +41,8 @@ iconv_t
_EXFUN(iconv_open, (_CONST char *, _CONST char *));
size_t
-_EXFUN(iconv, (iconv_t, char **, size_t *, char **, size_t *));
+_EXFUN(iconv, (iconv_t, char **__restrict, size_t *__restrict,
+ char **__restrict, size_t *__restrict));
int
_EXFUN(iconv_close, (iconv_t));
diff --git a/newlib/libc/include/ieeefp.h b/newlib/libc/include/ieeefp.h
index 0b06fb786..2c042848b 100644
--- a/newlib/libc/include/ieeefp.h
+++ b/newlib/libc/include/ieeefp.h
@@ -4,11 +4,12 @@
#include "_ansi.h"
#include <machine/ieeefp.h>
+#include <float.h>
_BEGIN_STD_C
/* FIXME FIXME FIXME:
- Neither of __ieee_{float,double}_shape_tape seem to be used anywhere
+ Neither of __ieee_{float,double}_shape_type seem to be used anywhere
except in libm/test. If that is the case, please delete these from here.
If that is not the case, please insert documentation here describing why
they're needed. */
@@ -46,9 +47,7 @@ typedef union
long aslong[2];
} __ieee_double_shape_type;
-#endif
-
-#ifdef __IEEE_LITTLE_ENDIAN
+#elif defined __IEEE_LITTLE_ENDIAN
typedef union
{
@@ -92,7 +91,7 @@ typedef union
} __ieee_double_shape_type;
-#endif
+#endif /* __IEEE_LITTLE_ENDIAN */
#ifdef __IEEE_BIG_ENDIAN
@@ -118,9 +117,7 @@ typedef union
} __ieee_float_shape_type;
-#endif
-
-#ifdef __IEEE_LITTLE_ENDIAN
+#elif defined __IEEE_LITTLE_ENDIAN
typedef union
{
@@ -144,10 +141,70 @@ typedef union
} __ieee_float_shape_type;
+#endif /* __IEEE_LITTLE_ENDIAN */
+
+#ifndef _LDBL_EQ_DBL
+
+#ifndef LDBL_MANT_DIG
+#error "LDBL_MANT_DIG not defined - should be found in float.h"
+
+#elif LDBL_MANT_DIG == DBL_MANT_DIG
+#error "double and long double are the same size but LDBL_EQ_DBL is not defined"
+
+#elif LDBL_MANT_DIG == 53
+/* This happens when doubles are 32-bits and long doubles are 64-bits. */
+#define EXT_EXPBITS 11
+#define EXT_FRACHBITS 20
+#define EXT_FRACLBITS 32
+#define __ieee_ext_field_type unsigned long
+
+#elif LDBL_MANT_DIG == 64
+#define EXT_EXPBITS 15
+#define EXT_FRACHBITS 32
+#define EXT_FRACLBITS 32
+#define __ieee_ext_field_type unsigned int
+
+#elif LDBL_MANT_DIG == 65
+#define EXT_EXPBITS 15
+#define EXT_FRACHBITS 32
+#define EXT_FRACLBITS 32
+#define __ieee_ext_field_type unsigned int
+
+#elif LDBL_MANT_DIG == 112
+#define EXT_EXPBITS 15
+#define EXT_FRACHBITS 48
+#define EXT_FRACLBITS 64
+#define __ieee_ext_field_type unsigned long long
+
+#elif LDBL_MANT_DIG == 113
+#define EXT_EXPBITS 15
+#define EXT_FRACHBITS 48
+#define EXT_FRACLBITS 64
+#define __ieee_ext_field_type unsigned long long
+
+#else
+#error Unsupported value for LDBL_MANT_DIG
#endif
+#define EXT_EXP_INFNAN ((1 << EXT_EXPBITS) - 1) /* 32767 */
+#define EXT_EXP_BIAS ((1 << (EXT_EXPBITS - 1)) - 1) /* 16383 */
+#define EXT_FRACBITS (EXT_FRACLBITS + EXT_FRACHBITS)
+typedef struct ieee_ext
+{
+ __ieee_ext_field_type ext_fracl : EXT_FRACLBITS;
+ __ieee_ext_field_type ext_frach : EXT_FRACHBITS;
+ __ieee_ext_field_type ext_exp : EXT_EXPBITS;
+ __ieee_ext_field_type ext_sign : 1;
+} ieee_ext;
+
+typedef union ieee_ext_u
+{
+ long double extu_ld;
+ struct ieee_ext extu_ext;
+} ieee_ext_u;
+#endif /* ! _LDBL_EQ_DBL */
/* FLOATING ROUNDING */
@@ -184,19 +241,6 @@ typedef int fp_rdi;
fp_rdi _EXFUN(fpgetroundtoi,(void));
fp_rdi _EXFUN(fpsetroundtoi,(fp_rdi));
-#undef isnan
-#undef isinf
-
-int _EXFUN(isnan, (double));
-int _EXFUN(isinf, (double));
-int _EXFUN(finite, (double));
-
-
-
-int _EXFUN(isnanf, (float));
-int _EXFUN(isinff, (float));
-int _EXFUN(finitef, (float));
-
#define __IEEE_DBL_EXPBIAS 1023
#define __IEEE_FLT_EXPBIAS 127
@@ -213,22 +257,17 @@ int _EXFUN(finitef, (float));
#define __IEEE_DBL_NAN_EXP 0x7ff
#define __IEEE_FLT_NAN_EXP 0xff
-#ifndef __ieeefp_isnanf
-#define __ieeefp_isnanf(x) (((*(long *)&(x) & 0x7f800000L)==0x7f800000L) && \
- ((*(long *)&(x) & 0x007fffffL)!=0000000000L))
-#endif
+#ifdef __ieeefp_isnanf
#define isnanf(x) __ieeefp_isnanf(x)
-
-#ifndef __ieeefp_isinff
-#define __ieeefp_isinff(x) (((*(long *)&(x) & 0x7f800000L)==0x7f800000L) && \
- ((*(long *)&(x) & 0x007fffffL)==0000000000L))
#endif
-#define isinff(x) __ieeefp_isinff(x)
-#ifndef __ieeefp_finitef
-#define __ieeefp_finitef(x) (((*(long *)&(x) & 0x7f800000L)!=0x7f800000L))
+#ifdef __ieeefp_isinff
+#define isinff(x) __ieeefp_isinff(x)
#endif
+
+#ifdef __ieeefp_finitef
#define finitef(x) __ieeefp_finitef(x)
+#endif
#ifdef _DOUBLE_IS_32BITS
#undef __IEEE_DBL_EXPBIAS
diff --git a/newlib/libc/include/inttypes.h b/newlib/libc/include/inttypes.h
index 1631e21c3..25c6e99fa 100644
--- a/newlib/libc/include/inttypes.h
+++ b/newlib/libc/include/inttypes.h
@@ -13,25 +13,35 @@
#ifndef _INTTYPES_H
#define _INTTYPES_H
-#include <sys/features.h>
+#include <newlib.h>
+#include <sys/config.h>
+#include <sys/_intsup.h>
#include <stdint.h>
#define __need_wchar_t
#include <stddef.h>
-/* Don't use __STDINT_EXP test since GCC's stdint.h provides different
- macros than newlib's stdint.h. */
-#if __GNUC_PREREQ(3, 2)
- #define __INTTYPES_EXP(x) __##x##__
-#else
- #define __INTTYPES_EXP(x) x
- #include <limits.h>
-#endif
-
#define __STRINGIFY(a) #a
/* 8-bit types */
-#define __PRI8(x) __STRINGIFY(x)
-#define __SCN8(x) __STRINGIFY(hh##x)
+#define __PRI8(x) __INT8 __STRINGIFY(x)
+#define __PRI8LEAST(x) __LEAST8 __STRINGIFY(x)
+#define __PRI8FAST(x) __FAST8 __STRINGIFY(x)
+
+/* NOTICE: scanning 8-bit types requires use of the hh specifier
+ * which is only supported on newlib platforms that
+ * are built with C99 I/O format support enabled. If the flag in
+ * newlib.h hasn't been set during configuration to indicate this, the 8-bit
+ * scanning format macros are disabled here as they result in undefined
+ * behaviour which can include memory overwrite. Overriding the flag after the
+ * library has been built is not recommended as it will expose the underlying
+ * undefined behaviour.
+ */
+
+#if defined(_WANT_IO_C99_FORMATS)
+ #define __SCN8(x) __INT8 __STRINGIFY(x)
+ #define __SCN8LEAST(x) __LEAST8 __STRINGIFY(x)
+ #define __SCN8FAST(x) __FAST8 __STRINGIFY(x)
+#endif /* _WANT_IO_C99_FORMATS */
#define PRId8 __PRI8(d)
@@ -41,43 +51,61 @@
#define PRIx8 __PRI8(x)
#define PRIX8 __PRI8(X)
+/* Macros below are only enabled for a newlib built with C99 I/O format support. */
+#if defined(_WANT_IO_C99_FORMATS)
+
#define SCNd8 __SCN8(d)
#define SCNi8 __SCN8(i)
#define SCNo8 __SCN8(o)
#define SCNu8 __SCN8(u)
#define SCNx8 __SCN8(x)
+#endif /* _WANT_IO_C99_FORMATS */
+
+
+#define PRIdLEAST8 __PRI8LEAST(d)
+#define PRIiLEAST8 __PRI8LEAST(i)
+#define PRIoLEAST8 __PRI8LEAST(o)
+#define PRIuLEAST8 __PRI8LEAST(u)
+#define PRIxLEAST8 __PRI8LEAST(x)
+#define PRIXLEAST8 __PRI8LEAST(X)
-#define PRIdLEAST8 __PRI8(d)
-#define PRIiLEAST8 __PRI8(i)
-#define PRIoLEAST8 __PRI8(o)
-#define PRIuLEAST8 __PRI8(u)
-#define PRIxLEAST8 __PRI8(x)
-#define PRIXLEAST8 __PRI8(X)
+/* Macros below are only enabled for a newlib built with C99 I/O format support. */
+#if defined(_WANT_IO_C99_FORMATS)
-#define SCNdLEAST8 __SCN8(d)
-#define SCNiLEAST8 __SCN8(i)
-#define SCNoLEAST8 __SCN8(o)
-#define SCNuLEAST8 __SCN8(u)
-#define SCNxLEAST8 __SCN8(x)
+ #define SCNdLEAST8 __SCN8LEAST(d)
+ #define SCNiLEAST8 __SCN8LEAST(i)
+ #define SCNoLEAST8 __SCN8LEAST(o)
+ #define SCNuLEAST8 __SCN8LEAST(u)
+ #define SCNxLEAST8 __SCN8LEAST(x)
+#endif /* _WANT_IO_C99_FORMATS */
-#define PRIdFAST8 __PRI8(d)
-#define PRIiFAST8 __PRI8(i)
-#define PRIoFAST8 __PRI8(o)
-#define PRIuFAST8 __PRI8(u)
-#define PRIxFAST8 __PRI8(x)
-#define PRIXFAST8 __PRI8(X)
+#define PRIdFAST8 __PRI8FAST(d)
+#define PRIiFAST8 __PRI8FAST(i)
+#define PRIoFAST8 __PRI8FAST(o)
+#define PRIuFAST8 __PRI8FAST(u)
+#define PRIxFAST8 __PRI8FAST(x)
+#define PRIXFAST8 __PRI8FAST(X)
-#define SCNdFAST8 __SCN8(d)
-#define SCNiFAST8 __SCN8(i)
-#define SCNoFAST8 __SCN8(o)
-#define SCNuFAST8 __SCN8(u)
-#define SCNxFAST8 __SCN8(x)
+/* Macros below are only enabled for a newlib built with C99 I/O format support. */
+#if defined(_WANT_IO_C99_FORMATS)
+
+ #define SCNdFAST8 __SCN8FAST(d)
+ #define SCNiFAST8 __SCN8FAST(i)
+ #define SCNoFAST8 __SCN8FAST(o)
+ #define SCNuFAST8 __SCN8FAST(u)
+ #define SCNxFAST8 __SCN8FAST(x)
+
+#endif /* _WANT_IO_C99_FORMATS */
/* 16-bit types */
-#define __PRI16(x) __STRINGIFY(x)
-#define __SCN16(x) __STRINGIFY(h##x)
+#define __PRI16(x) __INT16 __STRINGIFY(x)
+#define __PRI16LEAST(x) __LEAST16 __STRINGIFY(x)
+#define __PRI16FAST(x) __FAST16 __STRINGIFY(x)
+#define __SCN16(x) __INT16 __STRINGIFY(x)
+#define __SCN16LEAST(x) __LEAST16 __STRINGIFY(x)
+#define __SCN16FAST(x) __FAST16 __STRINGIFY(x)
#define PRId16 __PRI16(d)
@@ -94,41 +122,40 @@
#define SCNx16 __SCN16(x)
-#define PRIdLEAST16 __PRI16(d)
-#define PRIiLEAST16 __PRI16(i)
-#define PRIoLEAST16 __PRI16(o)
-#define PRIuLEAST16 __PRI16(u)
-#define PRIxLEAST16 __PRI16(x)
-#define PRIXLEAST16 __PRI16(X)
+#define PRIdLEAST16 __PRI16LEAST(d)
+#define PRIiLEAST16 __PRI16LEAST(i)
+#define PRIoLEAST16 __PRI16LEAST(o)
+#define PRIuLEAST16 __PRI16LEAST(u)
+#define PRIxLEAST16 __PRI16LEAST(x)
+#define PRIXLEAST16 __PRI16LEAST(X)
-#define SCNdLEAST16 __SCN16(d)
-#define SCNiLEAST16 __SCN16(i)
-#define SCNoLEAST16 __SCN16(o)
-#define SCNuLEAST16 __SCN16(u)
-#define SCNxLEAST16 __SCN16(x)
+#define SCNdLEAST16 __SCN16LEAST(d)
+#define SCNiLEAST16 __SCN16LEAST(i)
+#define SCNoLEAST16 __SCN16LEAST(o)
+#define SCNuLEAST16 __SCN16LEAST(u)
+#define SCNxLEAST16 __SCN16LEAST(x)
-#define PRIdFAST16 __PRI16(d)
-#define PRIiFAST16 __PRI16(i)
-#define PRIoFAST16 __PRI16(o)
-#define PRIuFAST16 __PRI16(u)
-#define PRIxFAST16 __PRI16(x)
-#define PRIXFAST16 __PRI16(X)
+#define PRIdFAST16 __PRI16FAST(d)
+#define PRIiFAST16 __PRI16FAST(i)
+#define PRIoFAST16 __PRI16FAST(o)
+#define PRIuFAST16 __PRI16FAST(u)
+#define PRIxFAST16 __PRI16FAST(x)
+#define PRIXFAST16 __PRI16FAST(X)
-#define SCNdFAST16 __SCN16(d)
-#define SCNiFAST16 __SCN16(i)
-#define SCNoFAST16 __SCN16(o)
-#define SCNuFAST16 __SCN16(u)
-#define SCNxFAST16 __SCN16(x)
+#define SCNdFAST16 __SCN16FAST(d)
+#define SCNiFAST16 __SCN16FAST(i)
+#define SCNoFAST16 __SCN16FAST(o)
+#define SCNuFAST16 __SCN16FAST(u)
+#define SCNxFAST16 __SCN16FAST(x)
/* 32-bit types */
-#if __have_long32
-#define __PRI32(x) __STRINGIFY(l##x)
-#define __SCN32(x) __STRINGIFY(l##x)
-#else
-#define __PRI32(x) __STRINGIFY(x)
-#define __SCN32(x) __STRINGIFY(x)
-#endif
+#define __PRI32(x) __INT32 __STRINGIFY(x)
+#define __SCN32(x) __INT32 __STRINGIFY(x)
+#define __PRI32LEAST(x) __LEAST32 __STRINGIFY(x)
+#define __SCN32LEAST(x) __LEAST32 __STRINGIFY(x)
+#define __PRI32FAST(x) __FAST32 __STRINGIFY(x)
+#define __SCN32FAST(x) __FAST32 __STRINGIFY(x)
#define PRId32 __PRI32(d)
#define PRIi32 __PRI32(i)
@@ -144,46 +171,44 @@
#define SCNx32 __SCN32(x)
-#define PRIdLEAST32 __PRI32(d)
-#define PRIiLEAST32 __PRI32(i)
-#define PRIoLEAST32 __PRI32(o)
-#define PRIuLEAST32 __PRI32(u)
-#define PRIxLEAST32 __PRI32(x)
-#define PRIXLEAST32 __PRI32(X)
+#define PRIdLEAST32 __PRI32LEAST(d)
+#define PRIiLEAST32 __PRI32LEAST(i)
+#define PRIoLEAST32 __PRI32LEAST(o)
+#define PRIuLEAST32 __PRI32LEAST(u)
+#define PRIxLEAST32 __PRI32LEAST(x)
+#define PRIXLEAST32 __PRI32LEAST(X)
-#define SCNdLEAST32 __SCN32(d)
-#define SCNiLEAST32 __SCN32(i)
-#define SCNoLEAST32 __SCN32(o)
-#define SCNuLEAST32 __SCN32(u)
-#define SCNxLEAST32 __SCN32(x)
+#define SCNdLEAST32 __SCN32LEAST(d)
+#define SCNiLEAST32 __SCN32LEAST(i)
+#define SCNoLEAST32 __SCN32LEAST(o)
+#define SCNuLEAST32 __SCN32LEAST(u)
+#define SCNxLEAST32 __SCN32LEAST(x)
-#define PRIdFAST32 __PRI32(d)
-#define PRIiFAST32 __PRI32(i)
-#define PRIoFAST32 __PRI32(o)
-#define PRIuFAST32 __PRI32(u)
-#define PRIxFAST32 __PRI32(x)
-#define PRIXFAST32 __PRI32(X)
+#define PRIdFAST32 __PRI32FAST(d)
+#define PRIiFAST32 __PRI32FAST(i)
+#define PRIoFAST32 __PRI32FAST(o)
+#define PRIuFAST32 __PRI32FAST(u)
+#define PRIxFAST32 __PRI32FAST(x)
+#define PRIXFAST32 __PRI32FAST(X)
-#define SCNdFAST32 __SCN32(d)
-#define SCNiFAST32 __SCN32(i)
-#define SCNoFAST32 __SCN32(o)
-#define SCNuFAST32 __SCN32(u)
-#define SCNxFAST32 __SCN32(x)
+#define SCNdFAST32 __SCN32FAST(d)
+#define SCNiFAST32 __SCN32FAST(i)
+#define SCNoFAST32 __SCN32FAST(o)
+#define SCNuFAST32 __SCN32FAST(u)
+#define SCNxFAST32 __SCN32FAST(x)
/* 64-bit types */
-#if __have_long64
-#define __PRI64(x) __STRINGIFY(l##x)
-#define __SCN64(x) __STRINGIFY(l##x)
-#elif __have_longlong64
-#define __PRI64(x) __STRINGIFY(ll##x)
-#define __SCN64(x) __STRINGIFY(ll##x)
-#else
-#define __PRI64(x) __STRINGIFY(x)
-#define __SCN64(x) __STRINGIFY(x)
-#endif
+#define __PRI64(x) __INT64 __STRINGIFY(x)
+#define __SCN64(x) __INT64 __STRINGIFY(x)
+
+#define __PRI64LEAST(x) __LEAST64 __STRINGIFY(x)
+#define __SCN64LEAST(x) __LEAST64 __STRINGIFY(x)
+#define __PRI64FAST(x) __FAST64 __STRINGIFY(x)
+#define __SCN64FAST(x) __FAST64 __STRINGIFY(x)
+#if __int64_t_defined
#define PRId64 __PRI64(d)
#define PRIi64 __PRI64(i)
#define PRIo64 __PRI64(o)
@@ -196,34 +221,36 @@
#define SCNo64 __SCN64(o)
#define SCNu64 __SCN64(u)
#define SCNx64 __SCN64(x)
+#endif
-#if __int64_t_defined
-#define PRIdLEAST64 __PRI64(d)
-#define PRIiLEAST64 __PRI64(i)
-#define PRIoLEAST64 __PRI64(o)
-#define PRIuLEAST64 __PRI64(u)
-#define PRIxLEAST64 __PRI64(x)
-#define PRIXLEAST64 __PRI64(X)
-
-#define SCNdLEAST64 __SCN64(d)
-#define SCNiLEAST64 __SCN64(i)
-#define SCNoLEAST64 __SCN64(o)
-#define SCNuLEAST64 __SCN64(u)
-#define SCNxLEAST64 __SCN64(x)
-
-
-#define PRIdFAST64 __PRI64(d)
-#define PRIiFAST64 __PRI64(i)
-#define PRIoFAST64 __PRI64(o)
-#define PRIuFAST64 __PRI64(u)
-#define PRIxFAST64 __PRI64(x)
-#define PRIXFAST64 __PRI64(X)
-
-#define SCNdFAST64 __SCN64(d)
-#define SCNiFAST64 __SCN64(i)
-#define SCNoFAST64 __SCN64(o)
-#define SCNuFAST64 __SCN64(u)
-#define SCNxFAST64 __SCN64(x)
+#if __int_least64_t_defined
+#define PRIdLEAST64 __PRI64LEAST(d)
+#define PRIiLEAST64 __PRI64LEAST(i)
+#define PRIoLEAST64 __PRI64LEAST(o)
+#define PRIuLEAST64 __PRI64LEAST(u)
+#define PRIxLEAST64 __PRI64LEAST(x)
+#define PRIXLEAST64 __PRI64LEAST(X)
+
+#define SCNdLEAST64 __SCN64LEAST(d)
+#define SCNiLEAST64 __SCN64LEAST(i)
+#define SCNoLEAST64 __SCN64LEAST(o)
+#define SCNuLEAST64 __SCN64LEAST(u)
+#define SCNxLEAST64 __SCN64LEAST(x)
+#endif
+
+#if __int_fast64_t_defined
+#define PRIdFAST64 __PRI64FAST(d)
+#define PRIiFAST64 __PRI64FAST(i)
+#define PRIoFAST64 __PRI64FAST(o)
+#define PRIuFAST64 __PRI64FAST(u)
+#define PRIxFAST64 __PRI64FAST(x)
+#define PRIXFAST64 __PRI64FAST(X)
+
+#define SCNdFAST64 __SCN64FAST(d)
+#define SCNiFAST64 __SCN64FAST(i)
+#define SCNoFAST64 __SCN64FAST(o)
+#define SCNuFAST64 __SCN64FAST(u)
+#define SCNxFAST64 __SCN64FAST(x)
#endif
/* max-bit types */
@@ -252,15 +279,15 @@
#define SCNxMAX __SCNMAX(x)
/* ptr types */
-#if PTRDIFF_MAX <= __INTTYPES_EXP(INT_MAX)
-# define __PRIPTR(x) __STRINGIFY(x)
-# define __SCNPTR(x) __STRINGIFY(x)
-#elif PTRDIFF_MAX <= __INTTYPES_EXP(LONG_MAX) || !defined(__have_longlong64)
+#if defined (_INTPTR_EQ_LONGLONG)
+# define __PRIPTR(x) __STRINGIFY(ll##x)
+# define __SCNPTR(x) __STRINGIFY(ll##x)
+#elif defined (_INTPTR_EQ_LONG)
# define __PRIPTR(x) __STRINGIFY(l##x)
# define __SCNPTR(x) __STRINGIFY(l##x)
#else
-# define __PRIPTR(x) __STRINGIFY(ll##x)
-# define __SCNPTR(x) __STRINGIFY(ll##x)
+# define __PRIPTR(x) __STRINGIFY(x)
+# define __SCNPTR(x) __STRINGIFY(x)
#endif
#define PRIdPTR __PRIPTR(d)
diff --git a/newlib/libc/include/libgen.h b/newlib/libc/include/libgen.h
index abfab0e5c..3c717c5b0 100644
--- a/newlib/libc/include/libgen.h
+++ b/newlib/libc/include/libgen.h
@@ -6,13 +6,27 @@
#define _LIBGEN_H_
#include "_ansi.h"
+#include <sys/cdefs.h>
#include <sys/reent.h>
#ifdef __cplusplus
extern "C" {
#endif
-char *_EXFUN(basename, (char *));
+/* There are two common basename variants. If you do NOT #include <libgen.h>
+ and you do
+
+ #define _GNU_SOURCE
+ #include <string.h>
+
+ you get the GNU version. Otherwise you get the POSIX versionfor which you
+ should #include <libgen.h>i for the function prototype. POSIX requires that
+ #undef basename will still let you invoke the underlying function. However,
+ this also implies that the POSIX version is used in this case. That's made
+ sure here. */
+#undef basename
+#define basename __xpg_basename
+char *_EXFUN(basename, (char *)) __asm__(__ASMNAME("basename"));
char *_EXFUN(dirname, (char *));
#ifdef __cplusplus
diff --git a/newlib/libc/include/limits.h b/newlib/libc/include/limits.h
index 19868a6ad..dd09c1cee 100644
--- a/newlib/libc/include/limits.h
+++ b/newlib/libc/include/limits.h
@@ -2,6 +2,7 @@
# define _LIBC_LIMITS_H_ 1
#include <newlib.h>
+#include <sys/cdefs.h>
# ifdef _MB_LEN_MAX
# define MB_LEN_MAX _MB_LEN_MAX
@@ -96,7 +97,7 @@
# define __LONG_LONG_MAX__ 9223372036854775807LL
# endif
-# if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
+# if __ISO_C_VISIBLE >= 1999
/* Minimum and maximum values a `signed long long int' can hold. */
# undef LLONG_MIN
# define LLONG_MIN (-LLONG_MAX-1)
@@ -108,7 +109,7 @@
# define ULLONG_MAX (LLONG_MAX * 2ULL + 1)
# endif
-# if defined (__GNU_LIBRARY__) ? defined (__USE_GNU) : !defined (__STRICT_ANSI__)
+# if __GNU_VISIBLE
/* Minimum and maximum values a `signed long long int' can hold. */
# undef LONG_LONG_MIN
# define LONG_LONG_MIN (-LONG_LONG_MAX-1)
@@ -143,4 +144,3 @@
#ifndef PATH_MAX
#define PATH_MAX 4096
#endif
-
diff --git a/newlib/libc/include/machine/_arc4random.h b/newlib/libc/include/machine/_arc4random.h
new file mode 100644
index 000000000..52808d722
--- /dev/null
+++ b/newlib/libc/include/machine/_arc4random.h
@@ -0,0 +1 @@
+/* Use default implementation, see arc4random.h */
diff --git a/newlib/libc/include/machine/_default_types.h b/newlib/libc/include/machine/_default_types.h
index 362e07903..ffc646d9e 100644
--- a/newlib/libc/include/machine/_default_types.h
+++ b/newlib/libc/include/machine/_default_types.h
@@ -5,9 +5,7 @@
#ifndef _MACHINE__DEFAULT_TYPES_H
#define _MACHINE__DEFAULT_TYPES_H
-#ifdef __cplusplus
-extern "C" {
-#endif
+#include <sys/features.h>
/*
* Guess on types by examining *_MIN / *_MAX defines.
@@ -21,13 +19,33 @@ extern "C" {
#include <limits.h>
#endif
-#if __EXP(SCHAR_MAX) == 0x7f
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#ifdef __INT8_TYPE__
+typedef __INT8_TYPE__ __int8_t;
+#ifdef __UINT8_TYPE__
+typedef __UINT8_TYPE__ __uint8_t;
+#else
+typedef unsigned __INT8_TYPE__ __uint8_t;
+#endif
+#define ___int8_t_defined 1
+#elif __EXP(SCHAR_MAX) == 0x7f
typedef signed char __int8_t ;
typedef unsigned char __uint8_t ;
#define ___int8_t_defined 1
#endif
-#if __EXP(INT_MAX) == 0x7fff
+#ifdef __INT16_TYPE__
+typedef __INT16_TYPE__ __int16_t;
+#ifdef __UINT16_TYPE__
+typedef __UINT16_TYPE__ __uint16_t;
+#else
+typedef unsigned __INT16_TYPE__ __uint16_t;
+#endif
+#define ___int16_t_defined 1
+#elif __EXP(INT_MAX) == 0x7fff
typedef signed int __int16_t;
typedef unsigned int __uint16_t;
#define ___int16_t_defined 1
@@ -41,19 +59,15 @@ typedef unsigned char __uint16_t;
#define ___int16_t_defined 1
#endif
-#if ___int16_t_defined
-typedef __int16_t __int_least16_t;
-typedef __uint16_t __uint_least16_t;
-#define ___int_least16_t_defined 1
-
-#if !___int8_t_defined
-typedef __int16_t __int_least8_t;
-typedef __uint16_t __uint_least8_t;
-#define ___int_least8_t_defined 1
-#endif
+#ifdef __INT32_TYPE__
+typedef __INT32_TYPE__ __int32_t;
+#ifdef __UINT32_TYPE__
+typedef __UINT32_TYPE__ __uint32_t;
+#else
+typedef unsigned __INT32_TYPE__ __uint32_t;
#endif
-
-#if __EXP(INT_MAX) == 0x7fffffffL
+#define ___int32_t_defined 1
+#elif __EXP(INT_MAX) == 0x7fffffffL
typedef signed int __int32_t;
typedef unsigned int __uint32_t;
#define ___int32_t_defined 1
@@ -71,24 +85,15 @@ typedef unsigned char __uint32_t;
#define ___int32_t_defined 1
#endif
-#if ___int32_t_defined
-typedef __int32_t __int_least32_t;
-typedef __uint32_t __uint_least32_t;
-#define ___int_least32_t_defined 1
-
-#if !___int8_t_defined
-typedef __int32_t __int_least8_t;
-typedef __uint32_t __uint_least8_t;
-#define ___int_least8_t_defined 1
-#endif
-#if !___int16_t_defined
-typedef __int32_t __int_least16_t;
-typedef __uint32_t __uint_least16_t;
-#define ___int_least16_t_defined 1
-#endif
+#ifdef __INT64_TYPE__
+typedef __INT64_TYPE__ __int64_t;
+#ifdef __UINT64_TYPE__
+typedef __UINT64_TYPE__ __uint64_t;
+#else
+typedef unsigned __INT64_TYPE__ __uint64_t;
#endif
-
-#if __EXP(LONG_MAX) > 0x7fffffff
+#define ___int64_t_defined 1
+#elif __EXP(LONG_MAX) > 0x7fffffff
typedef signed long __int64_t;
typedef unsigned long __uint64_t;
#define ___int64_t_defined 1
@@ -111,6 +116,101 @@ typedef unsigned int __uint64_t;
#define ___int64_t_defined 1
#endif
+#ifdef __INT_LEAST8_TYPE__
+typedef __INT_LEAST8_TYPE__ __int_least8_t;
+#ifdef __UINT_LEAST8_TYPE__
+typedef __UINT_LEAST8_TYPE__ __uint_least8_t;
+#else
+typedef unsigned __INT_LEAST8_TYPE__ __uint_least8_t;
+#endif
+#define ___int_least8_t_defined 1
+#elif defined(___int8_t_defined)
+typedef __int8_t __int_least8_t;
+typedef __uint8_t __uint_least8_t;
+#define ___int_least8_t_defined 1
+#elif defined(___int16_t_defined)
+typedef __int16_t __int_least8_t;
+typedef __uint16_t __uint_least8_t;
+#define ___int_least8_t_defined 1
+#elif defined(___int32_t_defined)
+typedef __int32_t __int_least8_t;
+typedef __uint32_t __uint_least8_t;
+#define ___int_least8_t_defined 1
+#elif defined(___int64_t_defined)
+typedef __int64_t __int_least8_t;
+typedef __uint64_t __uint_least8_t;
+#define ___int_least8_t_defined 1
+#endif
+
+#ifdef __INT_LEAST16_TYPE__
+typedef __INT_LEAST16_TYPE__ __int_least16_t;
+#ifdef __UINT_LEAST16_TYPE__
+typedef __UINT_LEAST16_TYPE__ __uint_least16_t;
+#else
+typedef unsigned __INT_LEAST16_TYPE__ __uint_least16_t;
+#endif
+#define ___int_least16_t_defined 1
+#elif defined(___int16_t_defined)
+typedef __int16_t __int_least16_t;
+typedef __uint16_t __uint_least16_t;
+#define ___int_least16_t_defined 1
+#elif defined(___int32_t_defined)
+typedef __int32_t __int_least16_t;
+typedef __uint32_t __uint_least16_t;
+#define ___int_least16_t_defined 1
+#elif defined(___int64_t_defined)
+typedef __int64_t __int_least16_t;
+typedef __uint64_t __uint_least16_t;
+#define ___int_least16_t_defined 1
+#endif
+
+#ifdef __INT_LEAST32_TYPE__
+typedef __INT_LEAST32_TYPE__ __int_least32_t;
+#ifdef __UINT_LEAST32_TYPE__
+typedef __UINT_LEAST32_TYPE__ __uint_least32_t;
+#else
+typedef unsigned __INT_LEAST32_TYPE__ __uint_least32_t;
+#endif
+#define ___int_least32_t_defined 1
+#elif defined(___int32_t_defined)
+typedef __int32_t __int_least32_t;
+typedef __uint32_t __uint_least32_t;
+#define ___int_least32_t_defined 1
+#elif defined(___int64_t_defined)
+typedef __int64_t __int_least32_t;
+typedef __uint64_t __uint_least32_t;
+#define ___int_least32_t_defined 1
+#endif
+
+#ifdef __INT_LEAST64_TYPE__
+typedef __INT_LEAST64_TYPE__ __int_least64_t;
+#ifdef __UINT_LEAST64_TYPE__
+typedef __UINT_LEAST64_TYPE__ __uint_least64_t;
+#else
+typedef unsigned __INT_LEAST64_TYPE__ __uint_least64_t;
+#endif
+#define ___int_least64_t_defined 1
+#elif defined(___int64_t_defined)
+typedef __int64_t __int_least64_t;
+typedef __uint64_t __uint_least64_t;
+#define ___int_least64_t_defined 1
+#endif
+
+#ifdef __INTPTR_TYPE__
+typedef __INTPTR_TYPE__ __intptr_t;
+#ifdef __UINTPTR_TYPE__
+typedef __UINTPTR_TYPE__ __uintptr_t;
+#else
+typedef unsigned __INTPTR_TYPE__ __uintptr_t;
+#endif
+#elif defined(__PTRDIFF_TYPE__)
+typedef __PTRDIFF_TYPE__ __intptr_t;
+typedef unsigned __PTRDIFF_TYPE__ __uintptr_t;
+#else
+typedef long __intptr_t;
+typedef unsigned long __uintptr_t;
+#endif
+
#undef __EXP
#ifdef __cplusplus
diff --git a/newlib/libc/include/machine/_endian.h b/newlib/libc/include/machine/_endian.h
new file mode 100644
index 000000000..92a14dc8b
--- /dev/null
+++ b/newlib/libc/include/machine/_endian.h
@@ -0,0 +1,35 @@
+#ifndef __MACHINE_ENDIAN_H__
+#error "must be included via <machine/endian.h>"
+#endif /* !__MACHINE_ENDIAN_H__ */
+
+#include <sys/config.h>
+
+#ifdef __PPC__
+/* Get rid of GCC builtin defines on PowerPC */
+#ifdef _BIG_ENDIAN
+#undef _BIG_ENDIAN
+#endif
+#ifdef _LITTLE_ENDIAN
+#undef _LITTLE_ENDIAN
+#endif
+#endif /* __PPC__ */
+
+#ifndef _LITTLE_ENDIAN
+#define _LITTLE_ENDIAN 1234
+#endif
+
+#ifndef _BIG_ENDIAN
+#define _BIG_ENDIAN 4321
+#endif
+
+#ifndef _PDP_ENDIAN
+#define _PDP_ENDIAN 3412
+#endif
+
+#ifndef _BYTE_ORDER
+#if defined(__IEEE_LITTLE_ENDIAN) || defined(__IEEE_BYTES_LITTLE_ENDIAN)
+#define _BYTE_ORDER _LITTLE_ENDIAN
+#else
+#define _BYTE_ORDER _BIG_ENDIAN
+#endif
+#endif
diff --git a/newlib/libc/include/machine/_time.h b/newlib/libc/include/machine/_time.h
new file mode 100644
index 000000000..476760c91
--- /dev/null
+++ b/newlib/libc/include/machine/_time.h
@@ -0,0 +1,3 @@
+#ifndef _SYS_TIME_H_
+#error "must be included via <sys/time.h>"
+#endif /* !_SYS_TIME_H_ */
diff --git a/newlib/libc/include/machine/endian.h b/newlib/libc/include/machine/endian.h
index 07ebc8f63..34a5726e6 100644
--- a/newlib/libc/include/machine/endian.h
+++ b/newlib/libc/include/machine/endian.h
@@ -1,20 +1,69 @@
#ifndef __MACHINE_ENDIAN_H__
+#define __MACHINE_ENDIAN_H__
-#include <sys/config.h>
+#include <sys/cdefs.h>
+#include <sys/_types.h>
+#include <machine/_endian.h>
-#ifndef BIG_ENDIAN
-#define BIG_ENDIAN 4321
+#if _BYTE_ORDER == _LITTLE_ENDIAN
+#define _QUAD_HIGHWORD 1
+#define _QUAD_LOWWORD 0
+#else
+#define _QUAD_HIGHWORD 0
+#define _QUAD_LOWWORD 1
#endif
-#ifndef LITTLE_ENDIAN
-#define LITTLE_ENDIAN 1234
+
+#if __BSD_VISIBLE
+#define LITTLE_ENDIAN _LITTLE_ENDIAN
+#define BIG_ENDIAN _BIG_ENDIAN
+#define PDP_ENDIAN _PDP_ENDIAN
+#define BYTE_ORDER _BYTE_ORDER
#endif
-#ifndef BYTE_ORDER
-#if defined(__IEEE_LITTLE_ENDIAN) || defined(__IEEE_BYTES_LITTLE_ENDIAN)
-#define BYTE_ORDER LITTLE_ENDIAN
+#ifdef __GNUC__
+#define __bswap16(_x) __builtin_bswap16(_x)
+#define __bswap32(_x) __builtin_bswap32(_x)
+#define __bswap64(_x) __builtin_bswap64(_x)
+#else /* __GNUC__ */
+static __inline __uint16_t
+__bswap16(__uint16_t _x)
+{
+
+ return ((__uint16_t)((_x >> 8) | ((_x << 8) & 0xff00)));
+}
+
+static __inline __uint32_t
+__bswap32(__uint32_t _x)
+{
+
+ return ((__uint32_t)((_x >> 24) | ((_x >> 8) & 0xff00) |
+ ((_x << 8) & 0xff0000) | ((_x << 24) & 0xff000000)));
+}
+
+static __inline __uint64_t
+__bswap64(__uint64_t _x)
+{
+
+ return ((__uint64_t)((_x >> 56) | ((_x >> 40) & 0xff00) |
+ ((_x >> 24) & 0xff0000) | ((_x >> 8) & 0xff000000) |
+ ((_x << 8) & ((__uint64_t)0xff << 32)) |
+ ((_x << 24) & ((__uint64_t)0xff << 40)) |
+ ((_x << 40) & ((__uint64_t)0xff << 48)) | ((_x << 56))));
+}
+#endif /* !__GNUC__ */
+
+#ifndef __machine_host_to_from_network_defined
+#if _BYTE_ORDER == _LITTLE_ENDIAN
+#define __htonl(_x) __bswap32(_x)
+#define __htons(_x) __bswap16(_x)
+#define __ntohl(_x) __bswap32(_x)
+#define __ntohs(_x) __bswap16(_x)
#else
-#define BYTE_ORDER BIG_ENDIAN
-#endif
+#define __htonl(_x) ((__uint32_t)(_x))
+#define __htons(_x) ((__uint16_t)(_x))
+#define __ntohl(_x) ((__uint32_t)(_x))
+#define __ntohs(_x) ((__uint16_t)(_x))
#endif
+#endif /* __machine_host_to_from_network_defined */
#endif /* __MACHINE_ENDIAN_H__ */
diff --git a/newlib/libc/include/machine/ieeefp.h b/newlib/libc/include/machine/ieeefp.h
index 042e7f409..11ef0dd03 100644
--- a/newlib/libc/include/machine/ieeefp.h
+++ b/newlib/libc/include/machine/ieeefp.h
@@ -283,6 +283,10 @@
#define __IEEE_BIG_ENDIAN
#endif
+#ifdef __FT32__
+#define __IEEE_LITTLE_ENDIAN
+#endif
+
#ifdef __mcore__
#define __IEEE_BIG_ENDIAN
#endif
@@ -316,7 +320,7 @@
#define _DOUBLE_IS_32BITS
#endif
-#if defined(__or32__) || defined(__or1k__) || defined(__or16__)
+#if defined(__or1k__) || defined(__OR1K__) || defined(__OR1KND__)
#define __IEEE_BIG_ENDIAN
#endif
@@ -379,8 +383,10 @@
#ifdef __RL78__
#define __IEEE_LITTLE_ENDIAN
#define __SMALL_BITFIELDS /* 16 Bit INT */
+#ifndef __RL78_64BIT_DOUBLES__
#define _DOUBLE_IS_32BITS
#endif
+#endif
#ifdef __RX__
@@ -413,6 +419,10 @@
# endif
#endif
+#ifdef __VISIUM__
+#define __IEEE_BIG_ENDIAN
+#endif
+
#ifndef __IEEE_BIG_ENDIAN
#ifndef __IEEE_LITTLE_ENDIAN
#error Endianess not declared!!
diff --git a/newlib/libc/include/machine/setjmp.h b/newlib/libc/include/machine/setjmp.h
index fee409cd7..2b4dd8b91 100644
--- a/newlib/libc/include/machine/setjmp.h
+++ b/newlib/libc/include/machine/setjmp.h
@@ -1,6 +1,11 @@
_BEGIN_STD_C
+#if defined(__or1k__) || defined(__or1knd__)
+#define _JBLEN 31 /* 32 GPRs - r0 */
+#define _JBTYPE unsigned long
+#endif
+
#if defined(__arm__) || defined(__thumb__)
/*
* All callee preserved registers:
@@ -56,11 +61,18 @@ _BEGIN_STD_C
#endif
#ifdef __nds32__
-/* Only 17 words are currently needed.
- Preserve one word slot if we need to expand.
- Check newlib/libc/machine/nds32/setjmp.S for more information. */
+/* 17 words for GPRs,
+ 1 word for $fpcfg.freg and 30 words for FPUs
+ Reserved 2 words for aligement-adjustment. When storeing double-precision
+ floating-point register into memory, the address has to be
+ double-word-aligned.
+ Check libc/machine/nds32/setjmp.S for more information. */
+#if __NDS32_EXT_FPU_SP__ || __NDS32_EXT_FPU_DP__
+#define _JBLEN 50
+#else
#define _JBLEN 18
#endif
+#endif
#if defined(__Z8001__) || defined(__Z8002__)
/* 16 regs + pc */
@@ -80,6 +92,9 @@ _BEGIN_STD_C
# define _JBLEN (13 * 4)
# elif defined(__unix__) || defined(__rtems__)
# define _JBLEN 9
+# elif defined(__iamcu__)
+/* Intel MCU jmp_buf only covers callee-saved registers. */
+# define _JBLEN 6
# else
# include "setjmp-dj.h"
# endif
@@ -106,14 +121,14 @@ _BEGIN_STD_C
#endif
#ifdef __mips__
-#ifdef __mips64
-#define _JBTYPE long long
-#endif
-#ifdef __mips_soft_float
-#define _JBLEN 11
-#else
-#define _JBLEN 23
-#endif
+# if defined(__mips64)
+# define _JBTYPE long long
+# endif
+# ifdef __mips_soft_float
+# define _JBLEN 11
+# else
+# define _JBLEN 23
+# endif
#endif
#ifdef __m88000__
@@ -238,6 +253,10 @@ _BEGIN_STD_C
#define _JBLEN 10
#endif
+#ifdef __FT32__
+#define _JBLEN 27
+#endif
+
#ifdef __iq2000__
#define _JBLEN 32
#endif
@@ -246,6 +265,10 @@ _BEGIN_STD_C
#define _JBLEN 16
#endif
+#ifdef __arc__
+#define _JBLEN 25 /* r13-r30,blink,lp_count,lp_start,lp_end,mlo,mhi,status32 */
+#endif
+
#ifdef __MMIX__
/* Using a layout compatible with GCC's built-in. */
#define _JBLEN 5
@@ -275,6 +298,10 @@ _BEGIN_STD_C
#define _JBLEN 18
#endif
+#ifdef __ia64
+#define _JBLEN 64
+#endif
+
#ifdef __lm32__
#define _JBLEN 19
#endif
@@ -326,6 +353,11 @@ _BEGIN_STD_C
#define _JBLEN 0x44
#endif
+#ifdef __VISIUM__
+/* All call-saved GP registers: r11-r19,r21,r22,r23. */
+#define _JBLEN 12
+#endif
+
#ifdef _JBLEN
#ifdef _JBTYPE
typedef _JBTYPE jmp_buf[_JBLEN];
@@ -364,6 +396,13 @@ typedef int sigjmp_buf[_JBLEN+1+(sizeof (sigset_t)/sizeof (int))];
#define __SIGMASK_FUNC sigprocmask
#endif
+#ifdef __CYGWIN__
+/* Per POSIX, siglongjmp has to be implemented as function. Cygwin
+ provides functions for both, siglongjmp and sigsetjmp since 2.2.0. */
+extern void siglongjmp (sigjmp_buf, int) __attribute__ ((__noreturn__));
+extern int sigsetjmp (sigjmp_buf, int);
+#endif
+
#if defined(__GNUC__)
#define sigsetjmp(env, savemask) \
@@ -401,8 +440,8 @@ typedef int sigjmp_buf[_JBLEN+1+(sizeof (sigset_t)/sizeof (int))];
are equivalent to sigsetjmp/siglongjmp when not saving the signal mask.
New applications should use sigsetjmp/siglongjmp instead. */
#ifdef __CYGWIN__
-extern void _longjmp(jmp_buf, int);
-extern int _setjmp(jmp_buf);
+extern void _longjmp (jmp_buf, int) __attribute__ ((__noreturn__));
+extern int _setjmp (jmp_buf);
#else
#define _setjmp(env) sigsetjmp ((env), 0)
#define _longjmp(env, val) siglongjmp ((env), (val))
diff --git a/newlib/libc/include/machine/time.h b/newlib/libc/include/machine/time.h
index 06e2ccffb..6f9a35cc5 100644
--- a/newlib/libc/include/machine/time.h
+++ b/newlib/libc/include/machine/time.h
@@ -1,19 +1,15 @@
#ifndef _MACHTIME_H_
#define _MACHTIME_H_
-#if defined(__rtems__)
-#define _CLOCKS_PER_SEC_ sysconf(_SC_CLK_TCK)
-#else /* !__rtems__ */
-#if defined(__aarch64__) || defined(__arm__) || defined(__thumb__)
+#if defined(__rtems__) || defined(__VISIUM__)
+#define _CLOCKS_PER_SEC_ 1000000
+#elif defined(__aarch64__) || defined(__arm__) || defined(__thumb__)
#define _CLOCKS_PER_SEC_ 100
#endif
-#endif /* !__rtems__ */
#ifdef __SPU__
-#include <sys/types.h>
+#include <sys/_timespec.h>
int nanosleep (const struct timespec *, struct timespec *);
#endif
#endif /* _MACHTIME_H_ */
-
-
diff --git a/newlib/libc/include/machine/types.h b/newlib/libc/include/machine/types.h
index 40a75faa5..a5a64e675 100644
--- a/newlib/libc/include/machine/types.h
+++ b/newlib/libc/include/machine/types.h
@@ -1,30 +1,7 @@
-#ifndef _MACHTYPES_H_
-#define _MACHTYPES_H_
-
/*
- * The following section is RTEMS specific and is needed to more
- * closely match the types defined in the BSD machine/types.h.
- * This is needed to let the RTEMS/BSD TCP/IP stack compile.
+ * Newlib targets may provide an own version of this file in their machine
+ * directory to add custom user types for <sys/types.h>.
*/
-#if defined(__rtems__)
-#include <machine/_types.h>
-#endif
-
-#define _CLOCK_T_ unsigned long /* clock() */
-#define _TIME_T_ long /* time() */
-#define _CLOCKID_T_ unsigned long
-#define _TIMER_T_ unsigned long
-
-#ifndef _HAVE_SYSTYPES
-typedef long int __off_t;
-typedef int __pid_t;
-#ifdef __GNUC__
-__extension__ typedef long long int __loff_t;
-#else
-typedef long int __loff_t;
-#endif
-#endif
-
-#endif /* _MACHTYPES_H_ */
-
-
+#ifndef _SYS_TYPES_H
+#error "must be included via <sys/types.h>"
+#endif /* !_SYS_TYPES_H */
diff --git a/newlib/libc/include/math.h b/newlib/libc/include/math.h
index 606fecfa9..3725ac0b9 100644
--- a/newlib/libc/include/math.h
+++ b/newlib/libc/include/math.h
@@ -3,6 +3,7 @@
#define _MATH_H_
#include <sys/reent.h>
+#include <sys/cdefs.h>
#include <machine/ieeefp.h>
#include "_ansi.h"
@@ -136,8 +137,26 @@ extern double fmod _PARAMS((double, double));
#endif /* ! defined (__math_68881) */
#endif /* ! defined (_REENT_ONLY) */
-#if !defined(__STRICT_ANSI__) || defined(__cplusplus) || __STDC_VERSION__ >= 199901L
+#if __MISC_VISIBLE
+extern int finite _PARAMS((double));
+extern int finitef _PARAMS((float));
+extern int finitel _PARAMS((long double));
+extern int isinff _PARAMS((float));
+extern int isnanf _PARAMS((float));
+#ifdef __CYGWIN__ /* not implemented in newlib yet */
+extern int isinfl _PARAMS((long double));
+extern int isnanl _PARAMS((long double));
+#endif
+#if !defined(__cplusplus) || __cplusplus < 201103L
+extern int isinf _PARAMS((double));
+#endif
+#endif /* __MISC_VISIBLE */
+#if (__MISC_VISIBLE || (__XSI_VISIBLE && __XSI_VISIBLE < 600)) \
+ && (!defined(__cplusplus) || __cplusplus < 201103L)
+extern int isnan _PARAMS((double));
+#endif
+#if __ISO_C_VISIBLE >= 1999
/* ISO C99 types and macros. */
/* FIXME: FLT_EVAL_METHOD should somehow be gotten from float.h (which is hard,
@@ -179,10 +198,10 @@ extern double fmod _PARAMS((double, double));
#define FP_NORMAL 4
#ifndef FP_ILOGB0
-# define FP_ILOGB0 (-INT_MAX)
+# define FP_ILOGB0 (-__INT_MAX__)
#endif
#ifndef FP_ILOGBNAN
-# define FP_ILOGBNAN INT_MAX
+# define FP_ILOGBNAN __INT_MAX__
#endif
#ifndef MATH_ERRNO
@@ -204,35 +223,70 @@ extern int __fpclassifyd (double x);
extern int __signbitf (float x);
extern int __signbitd (double x);
-#define fpclassify(__x) \
- ((sizeof(__x) == sizeof(float)) ? __fpclassifyf(__x) : \
- __fpclassifyd(__x))
-
-#ifndef isfinite
- #define isfinite(__y) \
- (__extension__ ({int __cy = fpclassify(__y); \
- __cy != FP_INFINITE && __cy != FP_NAN;}))
-#endif
-
/* Note: isinf and isnan were once functions in newlib that took double
* arguments. C99 specifies that these names are reserved for macros
* supporting multiple floating point types. Thus, they are
* now defined as macros. Implementations of the old functions
* taking double arguments still exist for compatibility purposes
- * (prototypes for them are in <ieeefp.h>). */
-#ifndef isinf
- #define isinf(y) (fpclassify(y) == FP_INFINITE)
+ * (prototypes for them are earlier in this header). */
+
+#if __GNUC_PREREQ (4, 4)
+ #define fpclassify(__x) (__builtin_fpclassify (FP_NAN, FP_INFINITE, \
+ FP_NORMAL, FP_SUBNORMAL, \
+ FP_ZERO, __x))
+ #ifndef isfinite
+ #define isfinite(__x) (__builtin_isfinite (__x))
+ #endif
+ #ifndef isinf
+ #define isinf(__x) (__builtin_isinf_sign (__x))
+ #endif
+ #ifndef isnan
+ #define isnan(__x) (__builtin_isnan (__x))
+ #endif
+ #define isnormal(__x) (__builtin_isnormal (__x))
+#else
+ #define fpclassify(__x) \
+ ((sizeof(__x) == sizeof(float)) ? __fpclassifyf(__x) : \
+ __fpclassifyd(__x))
+ #ifndef isfinite
+ #define isfinite(__y) \
+ (__extension__ ({int __cy = fpclassify(__y); \
+ __cy != FP_INFINITE && __cy != FP_NAN;}))
+ #endif
+ #ifndef isinf
+ #define isinf(__x) (fpclassify(__x) == FP_INFINITE)
+ #endif
+ #ifndef isnan
+ #define isnan(__x) (fpclassify(__x) == FP_NAN)
+ #endif
+ #define isnormal(__x) (fpclassify(__x) == FP_NORMAL)
#endif
-#ifndef isnan
- #define isnan(y) (fpclassify(y) == FP_NAN)
+#if __GNUC_PREREQ (4, 0)
+ #if defined(_HAVE_LONG_DOUBLE)
+ #define signbit(__x) \
+ ((sizeof(__x) == sizeof(float)) ? __builtin_signbitf(__x) : \
+ (sizeof(__x) == sizeof(double)) ? __builtin_signbit (__x) : \
+ __builtin_signbitl(__x))
+ #else
+ #define signbit(__x) \
+ ((sizeof(__x) == sizeof(float)) ? __builtin_signbitf(__x) : \
+ __builtin_signbit (__x))
+ #endif
+#else
+ #define signbit(__x) \
+ ((sizeof(__x) == sizeof(float)) ? __signbitf(__x) : \
+ __signbitd(__x))
#endif
-#define isnormal(y) (fpclassify(y) == FP_NORMAL)
-#define signbit(__x) \
- ((sizeof(__x) == sizeof(float)) ? __signbitf(__x) : \
- __signbitd(__x))
-
+#if __GNUC_PREREQ (2, 97)
+#define isgreater(__x,__y) (__builtin_isgreater (__x, __y))
+#define isgreaterequal(__x,__y) (__builtin_isgreaterequal (__x, __y))
+#define isless(__x,__y) (__builtin_isless (__x, __y))
+#define islessequal(__x,__y) (__builtin_islessequal (__x, __y))
+#define islessgreater(__x,__y) (__builtin_islessgreater (__x, __y))
+#define isunordered(__x,__y) (__builtin_isunordered (__x, __y))
+#else
#define isgreater(x,y) \
(__extension__ ({__typeof__(x) __x = (x); __typeof__(y) __y = (y); \
!isunordered(__x,__y) && (__x > __y);}))
@@ -252,12 +306,12 @@ extern int __signbitd (double x);
#define isunordered(a,b) \
(__extension__ ({__typeof__(a) __a = (a); __typeof__(b) __b = (b); \
fpclassify(__a) == FP_NAN || fpclassify(__b) == FP_NAN;}))
+#endif
/* Non ANSI double precision functions. */
extern double infinity _PARAMS((void));
extern double nan _PARAMS((const char *));
-extern int finite _PARAMS((double));
extern double copysign _PARAMS((double, double));
extern double logb _PARAMS((double));
extern int ilogb _PARAMS((double));
@@ -273,7 +327,7 @@ extern double scalbln _PARAMS((double, long int));
extern double tgamma _PARAMS((double));
extern double nearbyint _PARAMS((double));
extern long int lrint _PARAMS((double));
-extern _LONG_LONG_TYPE int llrint _PARAMS((double));
+extern long long int llrint _PARAMS((double));
extern double round _PARAMS((double));
extern long int lround _PARAMS((double));
extern long long int llround _PARAMS((double));
@@ -343,7 +397,7 @@ extern float scalblnf _PARAMS((float, long int));
extern float tgammaf _PARAMS((float));
extern float nearbyintf _PARAMS((float));
extern long int lrintf _PARAMS((float));
-extern _LONG_LONG_TYPE llrintf _PARAMS((float));
+extern long long int llrintf _PARAMS((float));
extern float roundf _PARAMS((float));
extern long int lroundf _PARAMS((float));
extern long long int llroundf _PARAMS((float));
@@ -356,7 +410,6 @@ extern float fmaf _PARAMS((float, float, float));
extern float infinityf _PARAMS((void));
extern float nanf _PARAMS((const char *));
-extern int finitef _PARAMS((float));
extern float copysignf _PARAMS((float, float));
extern float logbf _PARAMS((float));
extern int ilogbf _PARAMS((float));
@@ -381,8 +434,12 @@ extern float log2f _PARAMS((float));
extern float hypotf _PARAMS((float, float));
#endif /* ! defined (_REENT_ONLY) */
-/* On platforms where long double equals double. */
-#ifdef _LDBL_EQ_DBL
+/* Newlib doesn't fully support long double math functions so far.
+ On platforms where long double equals double the long double functions
+ simply call the double functions. On Cygwin the long double functions
+ are implemented independently from newlib to be able to use optimized
+ assembler functions despite using the Microsoft x86_64 ABI. */
+#if defined (_LDBL_EQ_DBL) || defined (__CYGWIN__)
/* Reentrant ANSI C functions. */
#ifndef __math_68881
extern long double atanl _PARAMS((long double));
@@ -390,7 +447,7 @@ extern long double cosl _PARAMS((long double));
extern long double sinl _PARAMS((long double));
extern long double tanl _PARAMS((long double));
extern long double tanhl _PARAMS((long double));
-extern long double frexpl _PARAMS((long double value, int *));
+extern long double frexpl _PARAMS((long double, int *));
extern long double modfl _PARAMS((long double, long double *));
extern long double ceill _PARAMS((long double));
extern long double fabsl _PARAMS((long double));
@@ -422,6 +479,11 @@ extern int ilogbl _PARAMS((long double));
extern long double asinhl _PARAMS((long double));
extern long double cbrtl _PARAMS((long double));
extern long double nextafterl _PARAMS((long double, long double));
+extern float nexttowardf _PARAMS((float, long double));
+extern double nexttoward _PARAMS((double, long double));
+extern long double nexttowardl _PARAMS((long double, long double));
+extern long double logbl _PARAMS((long double));
+extern long double log2l _PARAMS((long double));
extern long double rintl _PARAMS((long double));
extern long double scalbnl _PARAMS((long double, int));
extern long double exp2l _PARAMS((long double));
@@ -432,7 +494,7 @@ extern long int lrintl _PARAMS((long double));
extern long long int llrintl _PARAMS((long double));
extern long double roundl _PARAMS((long double));
extern long lroundl _PARAMS((long double));
-extern _LONG_LONG_TYPE int llroundl _PARAMS((long double));
+extern long long int llroundl _PARAMS((long double));
extern long double truncl _PARAMS((long double));
extern long double remquol _PARAMS((long double, long double, int *));
extern long double fdiml _PARAMS((long double, long double));
@@ -447,44 +509,56 @@ extern long double lgammal _PARAMS((long double));
extern long double erfl _PARAMS((long double));
extern long double erfcl _PARAMS((long double));
#endif /* ! defined (_REENT_ONLY) */
-#else /* !_LDBL_EQ_DBL */
+#else /* !_LDBL_EQ_DBL && !__CYGWIN__ */
+extern long double hypotl _PARAMS((long double, long double));
+extern long double sqrtl _PARAMS((long double));
#ifdef __i386__
/* Other long double precision functions. */
extern _LONG_DOUBLE rintl _PARAMS((_LONG_DOUBLE));
extern long int lrintl _PARAMS((_LONG_DOUBLE));
-extern _LONG_LONG_TYPE llrintl _PARAMS((_LONG_DOUBLE));
+extern long long int llrintl _PARAMS((_LONG_DOUBLE));
#endif /* __i386__ */
-#endif /* !_LDBL_EQ_DBL */
+#endif /* !_LDBL_EQ_DBL && !__CYGWIN__ */
-#endif /* !defined (__STRICT_ANSI__) || defined(__cplusplus) || __STDC_VERSION__ >= 199901L */
-
-#if !defined (__STRICT_ANSI__) || defined(__cplusplus)
+#endif /* __ISO_C_VISIBLE >= 1999 */
+#if __MISC_VISIBLE
extern double drem _PARAMS((double, double));
-extern void sincos _PARAMS((double, double *, double *));
+extern float dremf _PARAMS((float, float));
+#ifdef __CYGWIN__
+extern float dreml _PARAMS((long double, long double));
+#endif /* __CYGWIN__ */
extern double gamma_r _PARAMS((double, int *));
extern double lgamma_r _PARAMS((double, int *));
+extern float gammaf_r _PARAMS((float, int *));
+extern float lgammaf_r _PARAMS((float, int *));
+#endif
+#if __MISC_VISIBLE || __XSI_VISIBLE
extern double y0 _PARAMS((double));
extern double y1 _PARAMS((double));
extern double yn _PARAMS((int, double));
extern double j0 _PARAMS((double));
extern double j1 _PARAMS((double));
extern double jn _PARAMS((int, double));
+#endif
-extern float dremf _PARAMS((float, float));
-extern void sincosf _PARAMS((float, float *, float *));
-extern float gammaf_r _PARAMS((float, int *));
-extern float lgammaf_r _PARAMS((float, int *));
-
+#if __MISC_VISIBLE || __XSI_VISIBLE >= 600
extern float y0f _PARAMS((float));
extern float y1f _PARAMS((float));
extern float ynf _PARAMS((int, float));
extern float j0f _PARAMS((float));
extern float j1f _PARAMS((float));
extern float jnf _PARAMS((int, float));
+#endif
/* GNU extensions */
+#if __GNU_VISIBLE
+extern void sincos _PARAMS((double, double *, double *));
+extern void sincosf _PARAMS((float, float *, float *));
+#ifdef __CYGWIN__
+extern void sincosl _PARAMS((long double, long double *, long double *));
+#endif /* __CYGWIN__ */
# ifndef exp10
extern double exp10 _PARAMS((double));
# endif
@@ -497,11 +571,17 @@ extern float exp10f _PARAMS((float));
# ifndef pow10f
extern float pow10f _PARAMS((float));
# endif
+#ifdef __CYGWIN__
+# ifndef exp10l
+extern float exp10l _PARAMS((float));
+# endif
+# ifndef pow10l
+extern float pow10l _PARAMS((float));
+# endif
+#endif /* __CYGWIN__ */
+#endif /* __GNU_VISIBLE */
-#endif /* !defined (__STRICT_ANSI__) || defined(__cplusplus) */
-
-#ifndef __STRICT_ANSI__
-
+#if __MISC_VISIBLE || __XSI_VISIBLE
/* The gamma functions use a global variable, signgam. */
#ifndef _REENT_ONLY
#define signgam (*__signgam())
@@ -509,7 +589,9 @@ extern int *__signgam _PARAMS((void));
#endif /* ! defined (_REENT_ONLY) */
#define __signgam_r(ptr) _REENT_SIGNGAM(ptr)
+#endif /* __MISC_VISIBLE || __XSI_VISIBLE */
+#if __SVID_VISIBLE
/* The exception structure passed to the matherr routine. */
/* We have a problem when using C++ since `exception' is a reserved
name in C++. */
@@ -542,8 +624,12 @@ extern int matherr _PARAMS((struct exception *e));
#define TLOSS 5
#define PLOSS 6
+#endif /* __SVID_VISIBLE */
+
/* Useful constants. */
+#if __BSD_VISIBLE || __XSI_VISIBLE >= 500
+
#define MAXFLOAT 3.40282347e+38F
#define M_E 2.7182818284590452354
@@ -552,16 +638,21 @@ extern int matherr _PARAMS((struct exception *e));
#define M_LN2 _M_LN2
#define M_LN10 2.30258509299404568402
#define M_PI 3.14159265358979323846
-#define M_TWOPI (M_PI * 2.0)
#define M_PI_2 1.57079632679489661923
#define M_PI_4 0.78539816339744830962
-#define M_3PI_4 2.3561944901923448370E0
-#define M_SQRTPI 1.77245385090551602792981
#define M_1_PI 0.31830988618379067154
#define M_2_PI 0.63661977236758134308
#define M_2_SQRTPI 1.12837916709551257390
#define M_SQRT2 1.41421356237309504880
#define M_SQRT1_2 0.70710678118654752440
+
+#endif
+
+#if __BSD_VISIBLE
+
+#define M_TWOPI (M_PI * 2.0)
+#define M_3PI_4 2.3561944901923448370E0
+#define M_SQRTPI 1.77245385090551602792981
#define M_LN2LO 1.9082149292705877000E-10
#define M_LN2HI 6.9314718036912381649E-1
#define M_SQRT3 1.73205080756887719000
@@ -589,7 +680,7 @@ extern __IMPORT _LIB_VERSION_TYPE _LIB_VERSION;
#define _XOPEN_ __fdlibm_xopen
#define _POSIX_ __fdlibm_posix
-#endif /* ! defined (__STRICT_ANSI__) */
+#endif /* __BSD_VISIBLE */
_END_STD_C
diff --git a/newlib/libc/include/paths.h b/newlib/libc/include/paths.h
index 36cf78a9b..b1c70f588 100644
--- a/newlib/libc/include/paths.h
+++ b/newlib/libc/include/paths.h
@@ -2,6 +2,8 @@
#define _PATHS_H_
#define _PATH_DEV "/dev/"
+#define _PATH_DEVNULL "/dev/null"
+#define _PATH_DEVZERO "/dev/zero"
#define _PATH_BSHELL "/bin/sh"
#endif /* _PATHS_H_ */
diff --git a/newlib/libc/include/pthread.h b/newlib/libc/include/pthread.h
index ff7f354fd..33ced0a64 100644
--- a/newlib/libc/include/pthread.h
+++ b/newlib/libc/include/pthread.h
@@ -1,8 +1,7 @@
-/* pthread.h
+/*
+ * Written by Joel Sherrill <joel.sherrill@OARcorp.com>.
*
- * Written by Joel Sherrill <joel@OARcorp.com>.
- *
- * COPYRIGHT (c) 1989-2010.
+ * COPYRIGHT (c) 1989-2013, 2015.
* On-Line Applications Research Corporation (OAR).
*
* Permission to use, copy, modify, and distribute this software for any
@@ -14,8 +13,6 @@
* 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.
- *
- * $Id$
*/
#ifndef __PTHREAD_h
@@ -31,7 +28,15 @@ extern "C" {
#include <sys/types.h>
#include <time.h>
-#include <sys/sched.h>
+#include <sched.h>
+#include <sys/cdefs.h>
+
+struct _pthread_cleanup_context {
+ void (*_routine)(void *);
+ void *_arg;
+ int _canceltype;
+ struct _pthread_cleanup_context *_previous;
+};
/* Register Fork Handlers */
int _EXFUN(pthread_atfork,(void (*prepare)(void), void (*parent)(void),
@@ -88,6 +93,13 @@ int _EXFUN(pthread_mutex_timedlock,
int _EXFUN(pthread_condattr_init, (pthread_condattr_t *__attr));
int _EXFUN(pthread_condattr_destroy, (pthread_condattr_t *__attr));
+
+int _EXFUN(pthread_condattr_getclock,
+ (const pthread_condattr_t *__restrict __attr,
+ clockid_t *__restrict __clock_id));
+int _EXFUN(pthread_condattr_setclock,
+ (pthread_condattr_t *__attr, clockid_t __clock_id));
+
int _EXFUN(pthread_condattr_getpshared,
(_CONST pthread_condattr_t *__attr, int *__pshared));
int _EXFUN(pthread_condattr_setpshared,
@@ -153,6 +165,9 @@ int _EXFUN(pthread_getschedparam,
int _EXFUN(pthread_setschedparam,
(pthread_t __pthread, int __policy, struct sched_param *__param));
+/* Set Scheduling Priority of a Thread */
+int _EXFUN(pthread_setschedprio, (pthread_t thread, int prio));
+
#endif /* defined(_POSIX_THREAD_PRIORITY_SCHEDULING) */
#if defined(_POSIX_THREAD_PRIO_INHERIT) || defined(_POSIX_THREAD_PRIO_PROTECT)
@@ -206,6 +221,29 @@ int _EXFUN(pthread_attr_getguardsize,
int _EXFUN(pthread_attr_setguardsize,
(pthread_attr_t *__attr, size_t __guardsize));
+/* POSIX thread APIs beyond the POSIX standard but provided
+ * in GNU/Linux. They may be provided by other OSes for
+ * compatibility.
+ */
+#if defined(__GNU_VISIBLE)
+#if defined(__rtems__)
+int _EXFUN(pthread_attr_setaffinity_np,
+ (pthread_attr_t *__attr, size_t __cpusetsize,
+ const cpu_set_t *__cpuset));
+int _EXFUN(pthread_attr_getaffinity_np,
+ (const pthread_attr_t *__attr, size_t __cpusetsize,
+ cpu_set_t *__cpuset));
+
+int _EXFUN(pthread_setaffinity_np,
+ (pthread_t __id, size_t __cpusetsize, const cpu_set_t *__cpuset));
+int _EXFUN(pthread_getaffinity_np,
+ (const pthread_t __id, size_t __cpusetsize, cpu_set_t *__cpuset));
+
+int _EXFUN(pthread_getattr_np,
+ (pthread_t __id, pthread_attr_t *__attr));
+#endif /* defined(__rtems__) */
+#endif /* defined(__GNU_VISIBLE) */
+
/* Thread Creation, P1003.1c/Draft 10, p. 144 */
int _EXFUN(pthread_create,
@@ -222,7 +260,7 @@ int _EXFUN(pthread_detach, (pthread_t __pthread));
/* Thread Termination, p1003.1c/Draft 10, p. 150 */
-void _EXFUN(pthread_exit, (void *__value_ptr));
+void _EXFUN(pthread_exit, (void *__value_ptr)) __dead2;
/* Get Calling Thread's ID, p1003.1c/Draft 10, p. XXX */
@@ -232,6 +270,14 @@ pthread_t _EXFUN(pthread_self, (void));
int _EXFUN(pthread_equal, (pthread_t __t1, pthread_t __t2));
+/* Retrieve ID of a Thread's CPU Time Clock */
+int _EXFUN(pthread_getcpuclockid,
+ (pthread_t thread, clockid_t *clock_id));
+
+/* Get/Set Current Thread's Concurrency Level */
+int _EXFUN(pthread_setconcurrency, (int new_level));
+int _EXFUN(pthread_getconcurrency, (void));
+
/* Dynamic Package Initialization */
/* This is used to statically initialize a pthread_once_t. Example:
@@ -280,9 +326,43 @@ void _EXFUN(pthread_testcancel, (void));
/* Establishing Cancellation Handlers, P1003.1c/Draft 10, p. 184 */
-void _EXFUN(pthread_cleanup_push,
- (void (*__routine)( void * ), void *__arg));
-void _EXFUN(pthread_cleanup_pop, (int __execute));
+void _EXFUN(_pthread_cleanup_push,
+ (struct _pthread_cleanup_context *_context,
+ void (*_routine)(void *), void *_arg));
+
+void _EXFUN(_pthread_cleanup_pop,
+ (struct _pthread_cleanup_context *_context,
+ int _execute));
+
+/* It is intentional to open and close the scope in two different macros */
+#define pthread_cleanup_push(_routine, _arg) \
+ do { \
+ struct _pthread_cleanup_context _pthread_clup_ctx; \
+ _pthread_cleanup_push(&_pthread_clup_ctx, (_routine), (_arg))
+
+#define pthread_cleanup_pop(_execute) \
+ _pthread_cleanup_pop(&_pthread_clup_ctx, (_execute)); \
+ } while (0)
+
+#if __GNU_VISIBLE
+void _EXFUN(_pthread_cleanup_push_defer,
+ (struct _pthread_cleanup_context *_context,
+ void (*_routine)(void *), void *_arg));
+
+void _EXFUN(_pthread_cleanup_pop_restore,
+ (struct _pthread_cleanup_context *_context,
+ int _execute));
+
+/* It is intentional to open and close the scope in two different macros */
+#define pthread_cleanup_push_defer_np(_routine, _arg) \
+ do { \
+ struct _pthread_cleanup_context _pthread_clup_ctx; \
+ _pthread_cleanup_push_defer(&_pthread_clup_ctx, (_routine), (_arg))
+
+#define pthread_cleanup_pop_restore_np(_execute) \
+ _pthread_cleanup_pop_restore(&_pthread_clup_ctx, (_execute)); \
+ } while (0)
+#endif /* __GNU_VISIBLE */
#if defined(_POSIX_THREAD_CPUTIME)
diff --git a/newlib/libc/include/pwd.h b/newlib/libc/include/pwd.h
index 1526abfb6..f37d289f9 100644
--- a/newlib/libc/include/pwd.h
+++ b/newlib/libc/include/pwd.h
@@ -39,9 +39,10 @@ extern "C" {
#endif
#define _PWD_H_
+#include <sys/cdefs.h>
#include <sys/types.h>
-#ifndef _POSIX_SOURCE
+#if __BSD_VISIBLE
#define _PATH_PASSWD "/etc/passwd"
#define _PASSWORD_LEN 128 /* max length, not counting NULL */
@@ -61,16 +62,24 @@ struct passwd {
#ifndef __INSIDE_CYGWIN__
struct passwd *getpwuid (uid_t);
struct passwd *getpwnam (const char *);
+
+#if __MISC_VISIBLE || __POSIX_VISIBLE
int getpwnam_r (const char *, struct passwd *,
char *, size_t , struct passwd **);
int getpwuid_r (uid_t, struct passwd *, char *,
size_t, struct passwd **);
-#ifndef _POSIX_SOURCE
+#endif
+
+#if __MISC_VISIBLE || __XSI_VISIBLE >= 4
struct passwd *getpwent (void);
void setpwent (void);
void endpwent (void);
#endif
+
+#if __BSD_VISIBLE
+int setpassent (int);
#endif
+#endif /*!__INSIDE_CYGWIN__*/
#ifdef __cplusplus
}
diff --git a/newlib/libc/include/reent.h b/newlib/libc/include/reent.h
index 861be71d3..b7664b0b9 100644
--- a/newlib/libc/include/reent.h
+++ b/newlib/libc/include/reent.h
@@ -92,7 +92,6 @@ extern "C" {
#include <sys/reent.h>
#include <sys/_types.h>
-#include <machine/types.h>
#define __need_size_t
#define __need_ptrdiff_t
diff --git a/newlib/libc/include/regex.h b/newlib/libc/include/regex.h
index 2ac78f4ca..fa3e26879 100644
--- a/newlib/libc/include/regex.h
+++ b/newlib/libc/include/regex.h
@@ -93,9 +93,10 @@ typedef struct {
#define REG_BACKR 02000 /* force use of backref code */
__BEGIN_DECLS
-int regcomp(regex_t *, const char *, int);
-size_t regerror(int, const regex_t *, char *, size_t);
-int regexec(const regex_t *, const char *, size_t, regmatch_t [], int);
+int regcomp(regex_t *__restrict, const char *__restrict, int);
+size_t regerror(int, const regex_t *__restrict, char *__restrict, size_t);
+int regexec(const regex_t *__restrict, const char *__restrict,
+ size_t, regmatch_t [__restrict], int);
void regfree(regex_t *);
__END_DECLS
diff --git a/newlib/libc/include/search.h b/newlib/libc/include/search.h
index c78ce1841..ed321b0f6 100644
--- a/newlib/libc/include/search.h
+++ b/newlib/libc/include/search.h
@@ -42,6 +42,11 @@ struct hsearch_data
size_t htablesize;
};
+#ifndef __compar_fn_t_defined
+#define __compar_fn_t_defined
+typedef int (*__compar_fn_t) (const void *, const void *);
+#endif
+
__BEGIN_DECLS
int hcreate(size_t);
void hdestroy(void);
@@ -49,10 +54,10 @@ ENTRY *hsearch(ENTRY, ACTION);
int hcreate_r(size_t, struct hsearch_data *);
void hdestroy_r(struct hsearch_data *);
int hsearch_r(ENTRY, ACTION, ENTRY **, struct hsearch_data *);
-void *tdelete(const void *, void **, int (*)(const void *, const void *));
+void *tdelete(const void *__restrict, void **__restrict, __compar_fn_t);
void tdestroy (void *, void (*)(void *));
-void *tfind(const void *, void **, int (*)(const void *, const void *));
-void *tsearch(const void *, void **, int (*)(const void *, const void *));
+void *tfind(const void *, void **, __compar_fn_t);
+void *tsearch(const void *, void **, __compar_fn_t);
void twalk(const void *, void (*)(const void *, VISIT, int));
__END_DECLS
diff --git a/newlib/libc/include/setjmp.h b/newlib/libc/include/setjmp.h
index c958d9042..521eac5a1 100644
--- a/newlib/libc/include/setjmp.h
+++ b/newlib/libc/include/setjmp.h
@@ -11,7 +11,12 @@
_BEGIN_STD_C
+#ifdef __GNUC__
+void _EXFUN(longjmp,(jmp_buf __jmpb, int __retval))
+ __attribute__ ((__noreturn__));
+#else
void _EXFUN(longjmp,(jmp_buf __jmpb, int __retval));
+#endif
int _EXFUN(setjmp,(jmp_buf __jmpb));
_END_STD_C
diff --git a/newlib/libc/include/signal.h b/newlib/libc/include/signal.h
index 8c50a2eb3..0324ae71a 100644
--- a/newlib/libc/include/signal.h
+++ b/newlib/libc/include/signal.h
@@ -2,15 +2,18 @@
#define _SIGNAL_H_
#include "_ansi.h"
+#include <sys/cdefs.h>
#include <sys/signal.h>
_BEGIN_STD_C
typedef int sig_atomic_t; /* Atomic entity type (ANSI) */
-#ifndef _POSIX_SOURCE
+#if __BSD_VISIBLE
typedef _sig_func_ptr sig_t; /* BSD naming */
+#endif
+#if __GNU_VISIBLE
typedef _sig_func_ptr sighandler_t; /* glibc naming */
-#endif /* !_POSIX_SOURCE */
+#endif
#define SIG_DFL ((_sig_func_ptr)0) /* Default action */
#define SIG_IGN ((_sig_func_ptr)1) /* Ignore action */
diff --git a/newlib/libc/include/spawn.h b/newlib/libc/include/spawn.h
new file mode 100644
index 000000000..5a6692f11
--- /dev/null
+++ b/newlib/libc/include/spawn.h
@@ -0,0 +1,119 @@
+/*-
+ * Copyright (c) 2008 Ed Schouten <ed@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.
+ */
+
+#ifndef _SPAWN_H_
+#define _SPAWN_H_
+
+#include <_ansi.h>
+#include <sys/cdefs.h>
+#include <sys/types.h>
+#include <sys/_types.h>
+#define __need_sigset_t
+#include <signal.h>
+
+struct sched_param;
+
+typedef struct __posix_spawnattr *posix_spawnattr_t;
+typedef struct __posix_spawn_file_actions *posix_spawn_file_actions_t;
+
+#define POSIX_SPAWN_RESETIDS 0x01
+#define POSIX_SPAWN_SETPGROUP 0x02
+#define POSIX_SPAWN_SETSCHEDPARAM 0x04
+#define POSIX_SPAWN_SETSCHEDULER 0x08
+#define POSIX_SPAWN_SETSIGDEF 0x10
+#define POSIX_SPAWN_SETSIGMASK 0x20
+
+_BEGIN_STD_C
+/*
+ * Spawn routines
+ *
+ * XXX both arrays should be __restrict, but this does not work when GCC
+ * is invoked with -std=c99.
+ */
+int _EXFUN(posix_spawn, (pid_t * __restrict, const char * __restrict,
+ const posix_spawn_file_actions_t *, const posix_spawnattr_t * __restrict,
+ char * const [], char * const [])
+);
+int _EXFUN(posix_spawnp, (pid_t * __restrict, const char * __restrict,
+ const posix_spawn_file_actions_t *, const posix_spawnattr_t * __restrict,
+ char * const [], char * const [])
+);
+
+/*
+ * File descriptor actions
+ */
+int _EXFUN(posix_spawn_file_actions_init, (posix_spawn_file_actions_t *));
+int _EXFUN(posix_spawn_file_actions_destroy, (posix_spawn_file_actions_t *));
+
+int _EXFUN(posix_spawn_file_actions_addopen,
+ (posix_spawn_file_actions_t * __restrict, int, const char * __restrict, int, mode_t)
+);
+int _EXFUN(posix_spawn_file_actions_adddup2,
+ (posix_spawn_file_actions_t *, int, int)
+);
+int _EXFUN(posix_spawn_file_actions_addclose,
+ (posix_spawn_file_actions_t *, int)
+);
+
+/*
+ * Spawn attributes
+ */
+int _EXFUN(posix_spawnattr_init, (posix_spawnattr_t *));
+int _EXFUN(posix_spawnattr_destroy, (posix_spawnattr_t *));
+
+int _EXFUN(posix_spawnattr_getflags,
+ (const posix_spawnattr_t * __restrict, short * __restrict)
+);
+int _EXFUN(posix_spawnattr_getpgroup,
+ (const posix_spawnattr_t * __restrict, pid_t * __restrict));
+int _EXFUN(posix_spawnattr_getschedparam,
+ (const posix_spawnattr_t * __restrict, struct sched_param * __restrict)
+);
+int _EXFUN(posix_spawnattr_getschedpolicy,
+ (const posix_spawnattr_t * __restrict, int * __restrict)
+);
+int _EXFUN(posix_spawnattr_getsigdefault,
+ (const posix_spawnattr_t * __restrict, sigset_t * __restrict)
+);
+int _EXFUN(posix_spawnattr_getsigmask,
+ (const posix_spawnattr_t * __restrict, sigset_t * __restrict)
+);
+
+int _EXFUN(posix_spawnattr_setflags, (posix_spawnattr_t *, short));
+int _EXFUN(posix_spawnattr_setpgroup, (posix_spawnattr_t *, pid_t));
+int _EXFUN(posix_spawnattr_setschedparam,
+ (posix_spawnattr_t * __restrict, const struct sched_param * __restrict)
+);
+int _EXFUN(posix_spawnattr_setschedpolicy, (posix_spawnattr_t *, int));
+int _EXFUN(posix_spawnattr_setsigdefault,
+ (posix_spawnattr_t * __restrict, const sigset_t * __restrict)
+);
+int _EXFUN(posix_spawnattr_setsigmask,
+ (posix_spawnattr_t * __restrict, const sigset_t * __restrict)
+);
+_END_STD_C
+
+#endif /* !_SPAWN_H_ */
diff --git a/newlib/libc/include/stdatomic.h b/newlib/libc/include/stdatomic.h
index c962cac46..09c0cf73e 100644
--- a/newlib/libc/include/stdatomic.h
+++ b/newlib/libc/include/stdatomic.h
@@ -33,16 +33,49 @@
#include <sys/cdefs.h>
#include <sys/_types.h>
-#if __has_feature(cxx_atomic)
+#if __has_extension(c_atomic) || __has_extension(cxx_atomic)
#define __CLANG_ATOMICS
#elif __GNUC_PREREQ__(4, 7)
#define __GNUC_ATOMICS
-#elif !defined(__GNUC__)
+#elif defined(__GNUC__)
+#define __SYNC_ATOMICS
+#else
#error "stdatomic.h does not support your compiler"
#endif
-#if !defined(__CLANG_ATOMICS)
-#define _Atomic(T) struct { volatile T __val; }
+/*
+ * 7.17.1 Atomic lock-free macros.
+ */
+
+#ifdef __GCC_ATOMIC_BOOL_LOCK_FREE
+#define ATOMIC_BOOL_LOCK_FREE __GCC_ATOMIC_BOOL_LOCK_FREE
+#endif
+#ifdef __GCC_ATOMIC_CHAR_LOCK_FREE
+#define ATOMIC_CHAR_LOCK_FREE __GCC_ATOMIC_CHAR_LOCK_FREE
+#endif
+#ifdef __GCC_ATOMIC_CHAR16_T_LOCK_FREE
+#define ATOMIC_CHAR16_T_LOCK_FREE __GCC_ATOMIC_CHAR16_T_LOCK_FREE
+#endif
+#ifdef __GCC_ATOMIC_CHAR32_T_LOCK_FREE
+#define ATOMIC_CHAR32_T_LOCK_FREE __GCC_ATOMIC_CHAR32_T_LOCK_FREE
+#endif
+#ifdef __GCC_ATOMIC_WCHAR_T_LOCK_FREE
+#define ATOMIC_WCHAR_T_LOCK_FREE __GCC_ATOMIC_WCHAR_T_LOCK_FREE
+#endif
+#ifdef __GCC_ATOMIC_SHORT_LOCK_FREE
+#define ATOMIC_SHORT_LOCK_FREE __GCC_ATOMIC_SHORT_LOCK_FREE
+#endif
+#ifdef __GCC_ATOMIC_INT_LOCK_FREE
+#define ATOMIC_INT_LOCK_FREE __GCC_ATOMIC_INT_LOCK_FREE
+#endif
+#ifdef __GCC_ATOMIC_LONG_LOCK_FREE
+#define ATOMIC_LONG_LOCK_FREE __GCC_ATOMIC_LONG_LOCK_FREE
+#endif
+#ifdef __GCC_ATOMIC_LLONG_LOCK_FREE
+#define ATOMIC_LLONG_LOCK_FREE __GCC_ATOMIC_LLONG_LOCK_FREE
+#endif
+#ifdef __GCC_ATOMIC_POINTER_LOCK_FREE
+#define ATOMIC_POINTER_LOCK_FREE __GCC_ATOMIC_POINTER_LOCK_FREE
#endif
/*
@@ -54,9 +87,7 @@
#define atomic_init(obj, value) __c11_atomic_init(obj, value)
#else
#define ATOMIC_VAR_INIT(value) { .__val = (value) }
-#define atomic_init(obj, value) do { \
- (obj)->__val = (value); \
-} while (0)
+#define atomic_init(obj, value) ((void)((obj)->__val = (value)))
#endif
/*
@@ -91,43 +122,62 @@
* atomic operations.
*/
-enum memory_order {
+typedef enum {
memory_order_relaxed = __ATOMIC_RELAXED,
memory_order_consume = __ATOMIC_CONSUME,
memory_order_acquire = __ATOMIC_ACQUIRE,
memory_order_release = __ATOMIC_RELEASE,
memory_order_acq_rel = __ATOMIC_ACQ_REL,
memory_order_seq_cst = __ATOMIC_SEQ_CST
-};
+} memory_order;
/*
* 7.17.4 Fences.
*/
+static __inline void
+atomic_thread_fence(memory_order __order __unused)
+{
+
#ifdef __CLANG_ATOMICS
-#define atomic_thread_fence(order) __c11_atomic_thread_fence(order)
-#define atomic_signal_fence(order) __c11_atomic_signal_fence(order)
+ __c11_atomic_thread_fence(__order);
#elif defined(__GNUC_ATOMICS)
-#define atomic_thread_fence(order) __atomic_thread_fence(order)
-#define atomic_signal_fence(order) __atomic_signal_fence(order)
+ __atomic_thread_fence(__order);
#else
-#define atomic_thread_fence(order) __sync_synchronize()
-#define atomic_signal_fence(order) __asm volatile ("" : : : "memory")
+ __sync_synchronize();
#endif
+}
+
+static __inline void
+atomic_signal_fence(memory_order __order __unused)
+{
+
+#ifdef __CLANG_ATOMICS
+ __c11_atomic_signal_fence(__order);
+#elif defined(__GNUC_ATOMICS)
+ __atomic_signal_fence(__order);
+#else
+ __asm volatile ("" ::: "memory");
+#endif
+}
/*
* 7.17.5 Lock-free property.
*/
-#if defined(__CLANG_ATOMICS)
+#if defined(_KERNEL)
+/* Atomics in kernelspace are always lock-free. */
#define atomic_is_lock_free(obj) \
- __c11_atomic_is_lock_free(sizeof(obj))
+ ((void)(obj), (_Bool)1)
+#elif defined(__CLANG_ATOMICS)
+#define atomic_is_lock_free(obj) \
+ __atomic_is_lock_free(sizeof(*(obj)), obj)
#elif defined(__GNUC_ATOMICS)
#define atomic_is_lock_free(obj) \
- __atomic_is_lock_free(sizeof((obj)->__val))
+ __atomic_is_lock_free(sizeof((obj)->__val), &(obj)->__val)
#else
#define atomic_is_lock_free(obj) \
- (sizeof((obj)->__val) <= sizeof(void *))
+ ((void)(obj), sizeof((obj)->__val) <= sizeof(void *))
#endif
/*
@@ -233,61 +283,65 @@ typedef _Atomic(uintmax_t) atomic_uintmax_t;
#define atomic_store_explicit(object, desired, order) \
__atomic_store_n(&(object)->__val, desired, order)
#else
+#define __atomic_apply_stride(object, operand) \
+ (((__typeof__((object)->__val))0) + (operand))
#define atomic_compare_exchange_strong_explicit(object, expected, \
- desired, success, failure) ({ \
- __typeof__((object)->__val) __v; \
- _Bool __r; \
- __v = __sync_val_compare_and_swap(&(object)->__val, \
- *(expected), desired); \
- __r = *(expected) == __v; \
- *(expected) = __v; \
- __r; \
+ desired, success, failure) __extension__ ({ \
+ __typeof__(expected) __ep = (expected); \
+ __typeof__(*__ep) __e = *__ep; \
+ (void)(success); (void)(failure); \
+ (_Bool)((*__ep = __sync_val_compare_and_swap(&(object)->__val, \
+ __e, desired)) == __e); \
})
-
#define atomic_compare_exchange_weak_explicit(object, expected, \
desired, success, failure) \
atomic_compare_exchange_strong_explicit(object, expected, \
desired, success, failure)
#if __has_builtin(__sync_swap)
/* Clang provides a full-barrier atomic exchange - use it if available. */
-#define atomic_exchange_explicit(object, desired, order) \
- __sync_swap(&(object)->__val, desired)
+#define atomic_exchange_explicit(object, desired, order) \
+ ((void)(order), __sync_swap(&(object)->__val, desired))
#else
/*
* __sync_lock_test_and_set() is only an acquire barrier in theory (although in
- * practice it is usually a full barrier) so we need an explicit barrier after
+ * practice it is usually a full barrier) so we need an explicit barrier before
* it.
*/
-#define atomic_exchange_explicit(object, desired, order) ({ \
- __typeof__((object)->__val) __v; \
- __v = __sync_lock_test_and_set(&(object)->__val, desired); \
+#define atomic_exchange_explicit(object, desired, order) \
+__extension__ ({ \
+ __typeof__(object) __o = (object); \
+ __typeof__(desired) __d = (desired); \
+ (void)(order); \
__sync_synchronize(); \
- __v; \
+ __sync_lock_test_and_set(&(__o)->__val, __d); \
})
#endif
#define atomic_fetch_add_explicit(object, operand, order) \
- __sync_fetch_and_add(&(object)->__val, operand)
+ ((void)(order), __sync_fetch_and_add(&(object)->__val, \
+ __atomic_apply_stride(object, operand)))
#define atomic_fetch_and_explicit(object, operand, order) \
- __sync_fetch_and_and(&(object)->__val, operand)
+ ((void)(order), __sync_fetch_and_and(&(object)->__val, operand))
#define atomic_fetch_or_explicit(object, operand, order) \
- __sync_fetch_and_or(&(object)->__val, operand)
+ ((void)(order), __sync_fetch_and_or(&(object)->__val, operand))
#define atomic_fetch_sub_explicit(object, operand, order) \
- __sync_fetch_and_sub(&(object)->__val, operand)
+ ((void)(order), __sync_fetch_and_sub(&(object)->__val, \
+ __atomic_apply_stride(object, operand)))
#define atomic_fetch_xor_explicit(object, operand, order) \
- __sync_fetch_and_xor(&(object)->__val, operand)
+ ((void)(order), __sync_fetch_and_xor(&(object)->__val, operand))
#define atomic_load_explicit(object, order) \
- __sync_fetch_and_add(&(object)->__val, 0)
-#define atomic_store_explicit(object, desired, order) do { \
- __sync_synchronize(); \
- (object)->__val = (desired); \
- __sync_synchronize(); \
-} while (0)
+ ((void)(order), __sync_fetch_and_add(&(object)->__val, 0))
+#define atomic_store_explicit(object, desired, order) \
+ ((void)atomic_exchange_explicit(object, desired, order))
#endif
/*
* Convenience functions.
+ *
+ * Don't provide these in kernel space. In kernel space, we should be
+ * disciplined enough to always provide explicit barriers.
*/
+#ifndef _KERNEL
#define atomic_compare_exchange_strong(object, expected, desired) \
atomic_compare_exchange_strong_explicit(object, expected, \
desired, memory_order_seq_cst, memory_order_seq_cst)
@@ -310,23 +364,50 @@ typedef _Atomic(uintmax_t) atomic_uintmax_t;
atomic_load_explicit(object, memory_order_seq_cst)
#define atomic_store(object, desired) \
atomic_store_explicit(object, desired, memory_order_seq_cst)
+#endif /* !_KERNEL */
/*
* 7.17.8 Atomic flag type and operations.
+ *
+ * XXX: Assume atomic_bool can be used as an atomic_flag. Is there some
+ * kind of compiler built-in type we could use?
*/
-typedef atomic_bool atomic_flag;
+typedef struct {
+ atomic_bool __flag;
+} atomic_flag;
+
+#define ATOMIC_FLAG_INIT { ATOMIC_VAR_INIT(0) }
+
+static __inline _Bool
+atomic_flag_test_and_set_explicit(volatile atomic_flag *__object,
+ memory_order __order)
+{
+ return (atomic_exchange_explicit(&__object->__flag, 1, __order));
+}
+
+static __inline void
+atomic_flag_clear_explicit(volatile atomic_flag *__object, memory_order __order)
+{
+
+ atomic_store_explicit(&__object->__flag, 0, __order);
+}
+
+#ifndef _KERNEL
+static __inline _Bool
+atomic_flag_test_and_set(volatile atomic_flag *__object)
+{
-#define ATOMIC_FLAG_INIT ATOMIC_VAR_INIT(0)
+ return (atomic_flag_test_and_set_explicit(__object,
+ memory_order_seq_cst));
+}
-#define atomic_flag_clear_explicit(object, order) \
- atomic_store_explicit(object, 0, order)
-#define atomic_flag_test_and_set_explicit(object, order) \
- atomic_compare_exchange_strong_explicit(object, 0, 1, order, order)
+static __inline void
+atomic_flag_clear(volatile atomic_flag *__object)
+{
-#define atomic_flag_clear(object) \
- atomic_flag_clear_explicit(object, memory_order_seq_cst)
-#define atomic_flag_test_and_set(object) \
- atomic_flag_test_and_set_explicit(object, memory_order_seq_cst)
+ atomic_flag_clear_explicit(__object, memory_order_seq_cst);
+}
+#endif /* !_KERNEL */
#endif /* !_STDATOMIC_H_ */
diff --git a/newlib/libc/include/stdint.h b/newlib/libc/include/stdint.h
index d0374ae2d..bd65cd0e0 100644
--- a/newlib/libc/include/stdint.h
+++ b/newlib/libc/include/stdint.h
@@ -9,144 +9,36 @@
#ifndef _STDINT_H
#define _STDINT_H
-#include <_ansi.h>
+#include <machine/_default_types.h>
+#include <sys/_intsup.h>
+#include <sys/_stdint.h>
#ifdef __cplusplus
extern "C" {
#endif
-#if __GNUC_PREREQ (3, 2)
-/* gcc > 3.2 implicitly defines the values we are interested */
-#define __STDINT_EXP(x) __##x##__
-#else
-#define __STDINT_EXP(x) x
-#include <limits.h>
-#endif
-
-/* Check if "long long" is 64bit wide */
-/* Modern GCCs provide __LONG_LONG_MAX__, SUSv3 wants LLONG_MAX */
-#if ( defined(__LONG_LONG_MAX__) && (__LONG_LONG_MAX__ > 0x7fffffff) ) \
- || ( defined(LLONG_MAX) && (LLONG_MAX > 0x7fffffff) )
-#define __have_longlong64 1
-#endif
-
-/* Check if "long" is 64bit or 32bit wide */
-#if __STDINT_EXP(LONG_MAX) > 0x7fffffff
-#define __have_long64 1
-#elif __STDINT_EXP(LONG_MAX) == 0x7fffffff && !defined(__SPU__)
-#define __have_long32 1
-#endif
-
-#if __STDINT_EXP(SCHAR_MAX) == 0x7f
-typedef signed char int8_t ;
-typedef unsigned char uint8_t ;
-#define __int8_t_defined 1
-#endif
-
-#if __int8_t_defined
-typedef signed char int_least8_t;
-typedef unsigned char uint_least8_t;
+#ifdef ___int_least8_t_defined
+typedef __int_least8_t int_least8_t;
+typedef __uint_least8_t uint_least8_t;
#define __int_least8_t_defined 1
#endif
-#if __STDINT_EXP(SHRT_MAX) == 0x7fff
-typedef signed short int16_t;
-typedef unsigned short uint16_t;
-#define __int16_t_defined 1
-#elif __STDINT_EXP(INT_MAX) == 0x7fff
-typedef signed int int16_t;
-typedef unsigned int uint16_t;
-#define __int16_t_defined 1
-#elif __STDINT_EXP(SCHAR_MAX) == 0x7fff
-typedef signed char int16_t;
-typedef unsigned char uint16_t;
-#define __int16_t_defined 1
-#endif
-
-#if __int16_t_defined
-typedef int16_t int_least16_t;
-typedef uint16_t uint_least16_t;
+#ifdef ___int_least16_t_defined
+typedef __int_least16_t int_least16_t;
+typedef __uint_least16_t uint_least16_t;
#define __int_least16_t_defined 1
-
-#if !__int_least8_t_defined
-typedef int16_t int_least8_t;
-typedef uint16_t uint_least8_t;
-#define __int_least8_t_defined 1
-#endif
#endif
-#if __have_long32
-typedef signed long int32_t;
-typedef unsigned long uint32_t;
-#define __int32_t_defined 1
-#elif __STDINT_EXP(INT_MAX) == 0x7fffffffL
-typedef signed int int32_t;
-typedef unsigned int uint32_t;
-#define __int32_t_defined 1
-#elif __STDINT_EXP(SHRT_MAX) == 0x7fffffffL
-typedef signed short int32_t;
-typedef unsigned short uint32_t;
-#define __int32_t_defined 1
-#elif __STDINT_EXP(SCHAR_MAX) == 0x7fffffffL
-typedef signed char int32_t;
-typedef unsigned char uint32_t;
-#define __int32_t_defined 1
-#endif
-
-#if __int32_t_defined
-typedef int32_t int_least32_t;
-typedef uint32_t uint_least32_t;
+#ifdef ___int_least32_t_defined
+typedef __int_least32_t int_least32_t;
+typedef __uint_least32_t uint_least32_t;
#define __int_least32_t_defined 1
-
-#if !__int_least8_t_defined
-typedef int32_t int_least8_t;
-typedef uint32_t uint_least8_t;
-#define __int_least8_t_defined 1
#endif
-#if !__int_least16_t_defined
-typedef int32_t int_least16_t;
-typedef uint32_t uint_least16_t;
-#define __int_least16_t_defined 1
-#endif
-#endif
-
-#if __have_long64
-typedef signed long int64_t;
-typedef unsigned long uint64_t;
-#define __int64_t_defined 1
-#elif __have_longlong64
-typedef signed long long int64_t;
-typedef unsigned long long uint64_t;
-#define __int64_t_defined 1
-#elif __STDINT_EXP(INT_MAX) > 0x7fffffff
-typedef signed int int64_t;
-typedef unsigned int uint64_t;
-#define __int64_t_defined 1
-#endif
-
-#if __int64_t_defined
-typedef int64_t int_least64_t;
-typedef uint64_t uint_least64_t;
+#ifdef ___int_least64_t_defined
+typedef __int_least64_t int_least64_t;
+typedef __uint_least64_t uint_least64_t;
#define __int_least64_t_defined 1
-
-#if !__int_least8_t_defined
-typedef int64_t int_least8_t;
-typedef uint64_t uint_least8_t;
-#define __int_least8_t_defined 1
-#endif
-
-#if !__int_least16_t_defined
-typedef int64_t int_least16_t;
-typedef uint64_t uint_least16_t;
-#define __int_least16_t_defined 1
-#endif
-
-#if !__int_least32_t_defined
-typedef int64_t int_least32_t;
-typedef uint64_t uint_least32_t;
-#define __int_least32_t_defined 1
-#endif
#endif
/*
@@ -155,25 +47,41 @@ typedef uint64_t uint_least32_t;
* Assume int to be the fastest type for all types with a width
* less than __INT_MAX__ rsp. INT_MAX
*/
-#if __STDINT_EXP(INT_MAX) >= 0x7f
+#ifdef __INT_FAST8_TYPE__
+ typedef __INT_FAST8_TYPE__ int_fast8_t;
+ typedef __UINT_FAST8_TYPE__ uint_fast8_t;
+#define __int_fast8_t_defined 1
+#elif __STDINT_EXP(INT_MAX) >= 0x7f
typedef signed int int_fast8_t;
typedef unsigned int uint_fast8_t;
#define __int_fast8_t_defined 1
#endif
-#if __STDINT_EXP(INT_MAX) >= 0x7fff
+#ifdef __INT_FAST16_TYPE__
+ typedef __INT_FAST16_TYPE__ int_fast16_t;
+ typedef __UINT_FAST16_TYPE__ uint_fast16_t;
+#define __int_fast16_t_defined 1
+#elif __STDINT_EXP(INT_MAX) >= 0x7fff
typedef signed int int_fast16_t;
typedef unsigned int uint_fast16_t;
#define __int_fast16_t_defined 1
#endif
-#if __STDINT_EXP(INT_MAX) >= 0x7fffffff
+#ifdef __INT_FAST32_TYPE__
+ typedef __INT_FAST32_TYPE__ int_fast32_t;
+ typedef __UINT_FAST32_TYPE__ uint_fast32_t;
+#define __int_fast32_t_defined 1
+#elif __STDINT_EXP(INT_MAX) >= 0x7fffffff
typedef signed int int_fast32_t;
typedef unsigned int uint_fast32_t;
#define __int_fast32_t_defined 1
#endif
-#if __STDINT_EXP(INT_MAX) > 0x7fffffff
+#ifdef __INT_FAST64_TYPE__
+ typedef __INT_FAST64_TYPE__ int_fast64_t;
+ typedef __UINT_FAST64_TYPE__ uint_fast64_t;
+#define __int_fast64_t_defined 1
+#elif __STDINT_EXP(INT_MAX) > 0x7fffffff
typedef signed int int_fast64_t;
typedef unsigned int uint_fast64_t;
#define __int_fast64_t_defined 1
@@ -235,17 +143,15 @@ typedef uint64_t uint_least32_t;
typedef unsigned long uintmax_t;
#endif
-/*
- * GCC doesn't provide an appropriate macro for [u]intptr_t
- * For now, use __PTRDIFF_TYPE__
- */
-#if defined(__PTRDIFF_TYPE__)
-typedef signed __PTRDIFF_TYPE__ intptr_t;
-typedef unsigned __PTRDIFF_TYPE__ uintptr_t;
+#ifdef __INTPTR_TYPE__
+#define INTPTR_MIN (-__INTPTR_MAX__ - 1)
+#define INTPTR_MAX (__INTPTR_MAX__)
+#define UINTPTR_MAX (__UINTPTR_MAX__)
+#elif defined(__PTRDIFF_TYPE__)
#define INTPTR_MAX PTRDIFF_MAX
#define INTPTR_MIN PTRDIFF_MIN
#ifdef __UINTPTR_MAX__
-#define UINTPTR_MAX __UINTPTR_MAX__
+#define UINTPTR_MAX (__UINTPTR_MAX__)
#else
#define UINTPTR_MAX (2UL * PTRDIFF_MAX + 1)
#endif
@@ -254,97 +160,131 @@ typedef unsigned __PTRDIFF_TYPE__ uintptr_t;
* Fallback to hardcoded values,
* should be valid on cpu's with 32bit int/32bit void*
*/
-typedef signed long intptr_t;
-typedef unsigned long uintptr_t;
-#define INTPTR_MAX __STDINT_EXP(LONG_MAX)
+#define INTPTR_MAX (__STDINT_EXP(LONG_MAX))
#define INTPTR_MIN (-__STDINT_EXP(LONG_MAX) - 1)
#define UINTPTR_MAX (__STDINT_EXP(LONG_MAX) * 2UL + 1)
#endif
/* Limits of Specified-Width Integer Types */
-#if __int8_t_defined
-#define INT8_MIN -128
-#define INT8_MAX 127
-#define UINT8_MAX 255
-#endif
-
-#if __int_least8_t_defined
-#define INT_LEAST8_MIN -128
-#define INT_LEAST8_MAX 127
-#define UINT_LEAST8_MAX 255
+#ifdef __INT8_MAX__
+#define INT8_MIN (-__INT8_MAX__ - 1)
+#define INT8_MAX (__INT8_MAX__)
+#define UINT8_MAX (__UINT8_MAX__)
+#elif defined(__int8_t_defined)
+#define INT8_MIN (-128)
+#define INT8_MAX (127)
+#define UINT8_MAX (255)
+#endif
+
+#ifdef __INT_LEAST8_MAX__
+#define INT_LEAST8_MIN (-__INT_LEAST8_MAX__ - 1)
+#define INT_LEAST8_MAX (__INT_LEAST8_MAX__)
+#define UINT_LEAST8_MAX (__UINT_LEAST8_MAX__)
+#elif defined(__int_least8_t_defined)
+#define INT_LEAST8_MIN (-128)
+#define INT_LEAST8_MAX (127)
+#define UINT_LEAST8_MAX (255)
#else
#error required type int_least8_t missing
#endif
-#if __int16_t_defined
-#define INT16_MIN -32768
-#define INT16_MAX 32767
-#define UINT16_MAX 65535
-#endif
-
-#if __int_least16_t_defined
-#define INT_LEAST16_MIN -32768
-#define INT_LEAST16_MAX 32767
-#define UINT_LEAST16_MAX 65535
+#ifdef __INT16_MAX__
+#define INT16_MIN (-__INT16_MAX__ - 1)
+#define INT16_MAX (__INT16_MAX__)
+#define UINT16_MAX (__UINT16_MAX__)
+#elif defined(__int16_t_defined)
+#define INT16_MIN (-32768)
+#define INT16_MAX (32767)
+#define UINT16_MAX (65535)
+#endif
+
+#ifdef __INT_LEAST16_MAX__
+#define INT_LEAST16_MIN (-__INT_LEAST16_MAX__ - 1)
+#define INT_LEAST16_MAX (__INT_LEAST16_MAX__)
+#define UINT_LEAST16_MAX (__UINT_LEAST16_MAX__)
+#elif defined(__int_least16_t_defined)
+#define INT_LEAST16_MIN (-32768)
+#define INT_LEAST16_MAX (32767)
+#define UINT_LEAST16_MAX (65535)
#else
#error required type int_least16_t missing
#endif
-#if __int32_t_defined
-#if __have_long32
+#ifdef __INT32_MAX__
+#define INT32_MIN (-__INT32_MAX__ - 1)
+#define INT32_MAX (__INT32_MAX__)
+#define UINT32_MAX (__UINT32_MAX__)
+#elif defined(__int32_t_defined)
+#if defined (_INT32_EQ_LONG)
#define INT32_MIN (-2147483647L-1)
-#define INT32_MAX 2147483647L
-#define UINT32_MAX 4294967295UL
+#define INT32_MAX (2147483647L)
+#define UINT32_MAX (4294967295UL)
#else
#define INT32_MIN (-2147483647-1)
-#define INT32_MAX 2147483647
-#define UINT32_MAX 4294967295U
+#define INT32_MAX (2147483647)
+#define UINT32_MAX (4294967295U)
#endif
#endif
-#if __int_least32_t_defined
-#if __have_long32
+#ifdef __INT_LEAST32_MAX__
+#define INT_LEAST32_MIN (-__INT_LEAST32_MAX__ - 1)
+#define INT_LEAST32_MAX (__INT_LEAST32_MAX__)
+#define UINT_LEAST32_MAX (__UINT_LEAST32_MAX__)
+#elif defined(__int_least32_t_defined)
+#if defined (_INT32_EQ_LONG)
#define INT_LEAST32_MIN (-2147483647L-1)
-#define INT_LEAST32_MAX 2147483647L
-#define UINT_LEAST32_MAX 4294967295UL
+#define INT_LEAST32_MAX (2147483647L)
+#define UINT_LEAST32_MAX (4294967295UL)
#else
#define INT_LEAST32_MIN (-2147483647-1)
-#define INT_LEAST32_MAX 2147483647
-#define UINT_LEAST32_MAX 4294967295U
+#define INT_LEAST32_MAX (2147483647)
+#define UINT_LEAST32_MAX (4294967295U)
#endif
#else
#error required type int_least32_t missing
#endif
-#if __int64_t_defined
+#ifdef __INT64_MAX__
+#define INT64_MIN (-__INT64_MAX__ - 1)
+#define INT64_MAX (__INT64_MAX__)
+#define UINT64_MAX (__UINT64_MAX__)
+#elif defined(__int64_t_defined)
#if __have_long64
#define INT64_MIN (-9223372036854775807L-1L)
-#define INT64_MAX 9223372036854775807L
-#define UINT64_MAX 18446744073709551615U
+#define INT64_MAX (9223372036854775807L)
+#define UINT64_MAX (18446744073709551615U)
#elif __have_longlong64
#define INT64_MIN (-9223372036854775807LL-1LL)
-#define INT64_MAX 9223372036854775807LL
-#define UINT64_MAX 18446744073709551615ULL
+#define INT64_MAX (9223372036854775807LL)
+#define UINT64_MAX (18446744073709551615ULL)
#endif
#endif
-#if __int_least64_t_defined
+#ifdef __INT_LEAST64_MAX__
+#define INT_LEAST64_MIN (-__INT_LEAST64_MAX__ - 1)
+#define INT_LEAST64_MAX (__INT_LEAST64_MAX__)
+#define UINT_LEAST64_MAX (__UINT_LEAST64_MAX__)
+#elif defined(__int_least64_t_defined)
#if __have_long64
#define INT_LEAST64_MIN (-9223372036854775807L-1L)
-#define INT_LEAST64_MAX 9223372036854775807L
-#define UINT_LEAST64_MAX 18446744073709551615U
+#define INT_LEAST64_MAX (9223372036854775807L)
+#define UINT_LEAST64_MAX (18446744073709551615U)
#elif __have_longlong64
#define INT_LEAST64_MIN (-9223372036854775807LL-1LL)
-#define INT_LEAST64_MAX 9223372036854775807LL
-#define UINT_LEAST64_MAX 18446744073709551615ULL
+#define INT_LEAST64_MAX (9223372036854775807LL)
+#define UINT_LEAST64_MAX (18446744073709551615ULL)
#endif
#endif
-#if __int_fast8_t_defined
+#ifdef __INT_FAST8_MAX__
+#define INT_FAST8_MIN (-__INT_FAST8_MAX__ - 1)
+#define INT_FAST8_MAX (__INT_FAST8_MAX__)
+#define UINT_FAST8_MAX (__UINT_FAST8_MAX__)
+#elif defined(__int_fast8_t_defined)
#if __STDINT_EXP(INT_MAX) >= 0x7f
#define INT_FAST8_MIN (-__STDINT_EXP(INT_MAX)-1)
-#define INT_FAST8_MAX __STDINT_EXP(INT_MAX)
+#define INT_FAST8_MAX (__STDINT_EXP(INT_MAX))
#define UINT_FAST8_MAX (__STDINT_EXP(INT_MAX)*2U+1U)
#else
#define INT_FAST8_MIN INT_LEAST8_MIN
@@ -353,10 +293,14 @@ typedef unsigned long uintptr_t;
#endif
#endif
-#if __int_fast16_t_defined
+#ifdef __INT_FAST16_MAX__
+#define INT_FAST16_MIN (-__INT_FAST16_MAX__ - 1)
+#define INT_FAST16_MAX (__INT_FAST16_MAX__)
+#define UINT_FAST16_MAX (__UINT_FAST16_MAX__)
+#elif defined(__int_fast16_t_defined)
#if __STDINT_EXP(INT_MAX) >= 0x7fff
#define INT_FAST16_MIN (-__STDINT_EXP(INT_MAX)-1)
-#define INT_FAST16_MAX __STDINT_EXP(INT_MAX)
+#define INT_FAST16_MAX (__STDINT_EXP(INT_MAX))
#define UINT_FAST16_MAX (__STDINT_EXP(INT_MAX)*2U+1U)
#else
#define INT_FAST16_MIN INT_LEAST16_MIN
@@ -365,10 +309,14 @@ typedef unsigned long uintptr_t;
#endif
#endif
-#if __int_fast32_t_defined
+#ifdef __INT_FAST32_MAX__
+#define INT_FAST32_MIN (-__INT_FAST32_MAX__ - 1)
+#define INT_FAST32_MAX (__INT_FAST32_MAX__)
+#define UINT_FAST32_MAX (__UINT_FAST32_MAX__)
+#elif defined(__int_fast32_t_defined)
#if __STDINT_EXP(INT_MAX) >= 0x7fffffff
#define INT_FAST32_MIN (-__STDINT_EXP(INT_MAX)-1)
-#define INT_FAST32_MAX __STDINT_EXP(INT_MAX)
+#define INT_FAST32_MAX (__STDINT_EXP(INT_MAX))
#define UINT_FAST32_MAX (__STDINT_EXP(INT_MAX)*2U+1U)
#else
#define INT_FAST32_MIN INT_LEAST32_MIN
@@ -377,10 +325,14 @@ typedef unsigned long uintptr_t;
#endif
#endif
-#if __int_fast64_t_defined
+#ifdef __INT_FAST64_MAX__
+#define INT_FAST64_MIN (-__INT_FAST64_MAX__ - 1)
+#define INT_FAST64_MAX (__INT_FAST64_MAX__)
+#define UINT_FAST64_MAX (__UINT_FAST64_MAX__)
+#elif defined(__int_fast64_t_defined)
#if __STDINT_EXP(INT_MAX) > 0x7fffffff
#define INT_FAST64_MIN (-__STDINT_EXP(INT_MAX)-1)
-#define INT_FAST64_MAX __STDINT_EXP(INT_MAX)
+#define INT_FAST64_MAX (__STDINT_EXP(INT_MAX))
#define UINT_FAST64_MAX (__STDINT_EXP(INT_MAX)*2U+1U)
#else
#define INT_FAST64_MIN INT_LEAST64_MIN
@@ -390,7 +342,7 @@ typedef unsigned long uintptr_t;
#endif
#ifdef __INTMAX_MAX__
-#define INTMAX_MAX __INTMAX_MAX__
+#define INTMAX_MAX (__INTMAX_MAX__)
#define INTMAX_MIN (-INTMAX_MAX - 1)
#elif defined(__INTMAX_TYPE__)
/* All relevant GCC versions prefer long to long long for intmax_t. */
@@ -399,7 +351,7 @@ typedef unsigned long uintptr_t;
#endif
#ifdef __UINTMAX_MAX__
-#define UINTMAX_MAX __UINTMAX_MAX__
+#define UINTMAX_MAX (__UINTMAX_MAX__)
#elif defined(__UINTMAX_TYPE__)
/* All relevant GCC versions prefer long to long long for intmax_t. */
#define UINTMAX_MAX UINT64_MAX
@@ -407,65 +359,99 @@ typedef unsigned long uintptr_t;
/* This must match size_t in stddef.h, currently long unsigned int */
#ifdef __SIZE_MAX__
-#define SIZE_MAX __SIZE_MAX__
+#define SIZE_MAX (__SIZE_MAX__)
#else
#define SIZE_MAX (__STDINT_EXP(LONG_MAX) * 2UL + 1)
#endif
/* This must match sig_atomic_t in <signal.h> (currently int) */
#define SIG_ATOMIC_MIN (-__STDINT_EXP(INT_MAX) - 1)
-#define SIG_ATOMIC_MAX __STDINT_EXP(INT_MAX)
+#define SIG_ATOMIC_MAX (__STDINT_EXP(INT_MAX))
/* This must match ptrdiff_t in <stddef.h> (currently long int) */
#ifdef __PTRDIFF_MAX__
-#define PTRDIFF_MAX __PTRDIFF_MAX__
+#define PTRDIFF_MAX (__PTRDIFF_MAX__)
#else
-#define PTRDIFF_MAX __STDINT_EXP(LONG_MAX)
+#define PTRDIFF_MAX (__STDINT_EXP(LONG_MAX))
#endif
#define PTRDIFF_MIN (-PTRDIFF_MAX - 1)
+/* This must match definition in <wchar.h> */
+#ifndef WCHAR_MIN
+#ifdef __WCHAR_MIN__
+#define WCHAR_MIN (__WCHAR_MIN__)
+#elif defined(__WCHAR_UNSIGNED__) || (L'\0' - 1 > 0)
+#define WCHAR_MIN (0 + L'\0')
+#else
+#define WCHAR_MIN (-0x7fffffff - 1 + L'\0')
+#endif
+#endif
+
+/* This must match definition in <wchar.h> */
+#ifndef WCHAR_MAX
#ifdef __WCHAR_MAX__
-#define WCHAR_MAX __WCHAR_MAX__
+#define WCHAR_MAX (__WCHAR_MAX__)
+#elif defined(__WCHAR_UNSIGNED__) || (L'\0' - 1 > 0)
+#define WCHAR_MAX (0xffffffffu + L'\0')
+#else
+#define WCHAR_MAX (0x7fffffff + L'\0')
#endif
-#ifdef __WCHAR_MIN__
-#define WCHAR_MIN __WCHAR_MIN__
#endif
/* wint_t is unsigned int on almost all GCC targets. */
#ifdef __WINT_MAX__
-#define WINT_MAX __WINT_MAX__
+#define WINT_MAX (__WINT_MAX__)
#else
#define WINT_MAX (__STDINT_EXP(INT_MAX) * 2U + 1U)
#endif
#ifdef __WINT_MIN__
-#define WINT_MIN __WINT_MIN__
+#define WINT_MIN (__WINT_MIN__)
#else
-#define WINT_MIN 0U
+#define WINT_MIN (0U)
#endif
/** Macros for minimum-width integer constant expressions */
+#ifdef __INT8_C
+#define INT8_C(x) __INT8_C(x)
+#define UINT8_C(x) __UINT8_C(x)
+#else
#define INT8_C(x) x
#if __STDINT_EXP(INT_MAX) > 0x7f
#define UINT8_C(x) x
#else
#define UINT8_C(x) x##U
#endif
+#endif
+#ifdef __INT16_C
+#define INT16_C(x) __INT16_C(x)
+#define UINT16_C(x) __UINT16_C(x)
+#else
#define INT16_C(x) x
#if __STDINT_EXP(INT_MAX) > 0x7fff
#define UINT16_C(x) x
#else
#define UINT16_C(x) x##U
#endif
+#endif
-#if __have_long32
+#ifdef __INT32_C
+#define INT32_C(x) __INT32_C(x)
+#define UINT32_C(x) __UINT32_C(x)
+#else
+#if defined (_INT32_EQ_LONG)
#define INT32_C(x) x##L
#define UINT32_C(x) x##UL
#else
#define INT32_C(x) x
#define UINT32_C(x) x##U
#endif
+#endif
+#ifdef __INT64_C
+#define INT64_C(x) __INT64_C(x)
+#define UINT64_C(x) __UINT64_C(x)
+#else
#if __int64_t_defined
#if __have_long64
#define INT64_C(x) x##L
@@ -475,8 +461,13 @@ typedef unsigned long uintptr_t;
#define UINT64_C(x) x##ULL
#endif
#endif
+#endif
/** Macros for greatest-width integer constant expression */
+#ifdef __INTMAX_C
+#define INTMAX_C(x) __INTMAX_C(x)
+#define UINTMAX_C(x) __UINTMAX_C(x)
+#else
#if __have_long64
#define INTMAX_C(x) x##L
#define UINTMAX_C(x) x##UL
@@ -484,6 +475,7 @@ typedef unsigned long uintptr_t;
#define INTMAX_C(x) x##LL
#define UINTMAX_C(x) x##ULL
#endif
+#endif
#ifdef __cplusplus
diff --git a/newlib/libc/include/stdio.h b/newlib/libc/include/stdio.h
index 504e671b0..866d8167d 100644
--- a/newlib/libc/include/stdio.h
+++ b/newlib/libc/include/stdio.h
@@ -32,6 +32,7 @@
#define __need_size_t
#define __need_NULL
+#include <sys/cdefs.h>
#include <stddef.h>
#define __need___va_list
@@ -48,7 +49,10 @@
_BEGIN_STD_C
+#if !defined(__FILE_defined)
typedef __FILE FILE;
+# define __FILE_defined
+#endif
#ifdef __CYGWIN__
typedef _fpos64_t fpos_t;
@@ -82,6 +86,7 @@ typedef _fpos64_t fpos64_t;
#define __SL64 0x8000 /* is 64-bit offset large file */
/* _flags2 flags */
+#define __SNLK 0x0001 /* stdio functions do not lock streams themselves */
#define __SWID 0x2000 /* true => stream orientation wide, false => byte, only valid if __SORD in _flags is true */
/*
@@ -123,7 +128,7 @@ typedef _fpos64_t fpos64_t;
#define L_tmpnam FILENAME_MAX
#endif
-#ifndef __STRICT_ANSI__
+#if __BSD_VISIBLE || __XSI_VISIBLE
#define P_tmpdir "/tmp"
#endif
@@ -159,33 +164,42 @@ typedef _fpos64_t fpos64_t;
#endif
#endif
+#if __POSIX_VISIBLE
+char * _EXFUN(ctermid, (char *));
+#endif
+#if __XSI_VISIBLE && __XSI_VISIBLE < 600
+char * _EXFUN(cuserid, (char *));
+#endif
FILE * _EXFUN(tmpfile, (void));
char * _EXFUN(tmpnam, (char *));
+#if __BSD_VISIBLE || __XSI_VISIBLE || __POSIX_VISIBLE >= 200112
+char * _EXFUN(tempnam, (const char *, const char *));
+#endif
int _EXFUN(fclose, (FILE *));
int _EXFUN(fflush, (FILE *));
-FILE * _EXFUN(freopen, (const char *, const char *, FILE *));
-void _EXFUN(setbuf, (FILE *, char *));
-int _EXFUN(setvbuf, (FILE *, char *, int, size_t));
-int _EXFUN(fprintf, (FILE *, const char *, ...)
+FILE * _EXFUN(freopen, (const char *__restrict, const char *__restrict, FILE *__restrict));
+void _EXFUN(setbuf, (FILE *__restrict, char *__restrict));
+int _EXFUN(setvbuf, (FILE *__restrict, char *__restrict, int, size_t));
+int _EXFUN(fprintf, (FILE *__restrict, const char *__restrict, ...)
_ATTRIBUTE ((__format__ (__printf__, 2, 3))));
-int _EXFUN(fscanf, (FILE *, const char *, ...)
+int _EXFUN(fscanf, (FILE *__restrict, const char *__restrict, ...)
_ATTRIBUTE ((__format__ (__scanf__, 2, 3))));
-int _EXFUN(printf, (const char *, ...)
+int _EXFUN(printf, (const char *__restrict, ...)
_ATTRIBUTE ((__format__ (__printf__, 1, 2))));
-int _EXFUN(scanf, (const char *, ...)
+int _EXFUN(scanf, (const char *__restrict, ...)
_ATTRIBUTE ((__format__ (__scanf__, 1, 2))));
-int _EXFUN(sscanf, (const char *, const char *, ...)
+int _EXFUN(sscanf, (const char *__restrict, const char *__restrict, ...)
_ATTRIBUTE ((__format__ (__scanf__, 2, 3))));
-int _EXFUN(vfprintf, (FILE *, const char *, __VALIST)
+int _EXFUN(vfprintf, (FILE *__restrict, const char *__restrict, __VALIST)
_ATTRIBUTE ((__format__ (__printf__, 2, 0))));
int _EXFUN(vprintf, (const char *, __VALIST)
_ATTRIBUTE ((__format__ (__printf__, 1, 0))));
-int _EXFUN(vsprintf, (char *, const char *, __VALIST)
+int _EXFUN(vsprintf, (char *__restrict, const char *__restrict, __VALIST)
_ATTRIBUTE ((__format__ (__printf__, 2, 0))));
int _EXFUN(fgetc, (FILE *));
-char * _EXFUN(fgets, (char *, int, FILE *));
+char * _EXFUN(fgets, (char *__restrict, int, FILE *__restrict));
int _EXFUN(fputc, (int, FILE *));
-int _EXFUN(fputs, (const char *, FILE *));
+int _EXFUN(fputs, (const char *__restrict, FILE *__restrict));
int _EXFUN(getc, (FILE *));
int _EXFUN(getchar, (void));
char * _EXFUN(gets, (char *));
@@ -193,12 +207,12 @@ int _EXFUN(putc, (int, FILE *));
int _EXFUN(putchar, (int));
int _EXFUN(puts, (const char *));
int _EXFUN(ungetc, (int, FILE *));
-size_t _EXFUN(fread, (_PTR, size_t _size, size_t _n, FILE *));
-size_t _EXFUN(fwrite, (const _PTR , size_t _size, size_t _n, FILE *));
+size_t _EXFUN(fread, (_PTR __restrict, size_t _size, size_t _n, FILE *__restrict));
+size_t _EXFUN(fwrite, (const _PTR __restrict , size_t _size, size_t _n, FILE *));
#ifdef _COMPILING_NEWLIB
int _EXFUN(fgetpos, (FILE *, _fpos_t *));
#else
-int _EXFUN(fgetpos, (FILE *, fpos_t *));
+int _EXFUN(fgetpos, (FILE *__restrict, fpos_t *__restrict));
#endif
int _EXFUN(fseek, (FILE *, long, int));
#ifdef _COMPILING_NEWLIB
@@ -213,8 +227,8 @@ int _EXFUN(feof, (FILE *));
int _EXFUN(ferror, (FILE *));
void _EXFUN(perror, (const char *));
#ifndef _REENT_ONLY
-FILE * _EXFUN(fopen, (const char *_name, const char *_type));
-int _EXFUN(sprintf, (char *, const char *, ...)
+FILE * _EXFUN(fopen, (const char *__restrict _name, const char *__restrict _type));
+int _EXFUN(sprintf, (char *__restrict, const char *__restrict, ...)
_ATTRIBUTE ((__format__ (__printf__, 2, 3))));
int _EXFUN(remove, (const char *));
int _EXFUN(rename, (const char *, const char *));
@@ -222,7 +236,7 @@ int _EXFUN(rename, (const char *, const char *));
int _EXFUN(_rename, (const char *, const char *));
#endif
#endif
-#if !defined(__STRICT_ANSI__) || defined(__USE_XOPEN2K)
+#if __LARGEFILE_VISIBLE || __POSIX_VISIBLE >= 200112
#ifdef _COMPILING_NEWLIB
int _EXFUN(fseeko, (FILE *, _off_t, int));
_off_t _EXFUN(ftello, ( FILE *));
@@ -231,21 +245,39 @@ int _EXFUN(fseeko, (FILE *, off_t, int));
off_t _EXFUN(ftello, ( FILE *));
#endif
#endif
-#if !defined(__STRICT_ANSI__) || (__STDC_VERSION__ >= 199901L)
+#if __GNU_VISIBLE
+int _EXFUN(fcloseall, (_VOID));
+#endif
#ifndef _REENT_ONLY
+#if __ISO_C_VISIBLE >= 1999
+int _EXFUN(snprintf, (char *__restrict, size_t, const char *__restrict, ...)
+ _ATTRIBUTE ((__format__ (__printf__, 3, 4))));
+int _EXFUN(vsnprintf, (char *__restrict, size_t, const char *__restrict, __VALIST)
+ _ATTRIBUTE ((__format__ (__printf__, 3, 0))));
+int _EXFUN(vfscanf, (FILE *__restrict, const char *__restrict, __VALIST)
+ _ATTRIBUTE ((__format__ (__scanf__, 2, 0))));
+int _EXFUN(vscanf, (const char *, __VALIST)
+ _ATTRIBUTE ((__format__ (__scanf__, 1, 0))));
+int _EXFUN(vsscanf, (const char *__restrict, const char *__restrict, __VALIST)
+ _ATTRIBUTE ((__format__ (__scanf__, 2, 0))));
+#endif
+#if __GNU_VISIBLE
+int _EXFUN(asprintf, (char **__restrict, const char *__restrict, ...)
+ _ATTRIBUTE ((__format__ (__printf__, 2, 3))));
+int _EXFUN(vasprintf, (char **, const char *, __VALIST)
+ _ATTRIBUTE ((__format__ (__printf__, 2, 0))));
+#endif
+#if __MISC_VISIBLE /* Newlib-specific */
int _EXFUN(asiprintf, (char **, const char *, ...)
_ATTRIBUTE ((__format__ (__printf__, 2, 3))));
char * _EXFUN(asniprintf, (char *, size_t *, const char *, ...)
_ATTRIBUTE ((__format__ (__printf__, 3, 4))));
-char * _EXFUN(asnprintf, (char *, size_t *, const char *, ...)
+char * _EXFUN(asnprintf, (char *__restrict, size_t *__restrict, const char *__restrict, ...)
_ATTRIBUTE ((__format__ (__printf__, 3, 4))));
-int _EXFUN(asprintf, (char **, const char *, ...)
- _ATTRIBUTE ((__format__ (__printf__, 2, 3))));
#ifndef diprintf
int _EXFUN(diprintf, (int, const char *, ...)
_ATTRIBUTE ((__format__ (__printf__, 2, 3))));
#endif
-int _EXFUN(fcloseall, (_VOID));
int _EXFUN(fiprintf, (FILE *, const char *, ...)
_ATTRIBUTE ((__format__ (__printf__, 2, 3))));
int _EXFUN(fiscanf, (FILE *, const char *, ...)
@@ -258,61 +290,58 @@ int _EXFUN(siprintf, (char *, const char *, ...)
_ATTRIBUTE ((__format__ (__printf__, 2, 3))));
int _EXFUN(siscanf, (const char *, const char *, ...)
_ATTRIBUTE ((__format__ (__scanf__, 2, 3))));
-int _EXFUN(snprintf, (char *, size_t, const char *, ...)
- _ATTRIBUTE ((__format__ (__printf__, 3, 4))));
int _EXFUN(sniprintf, (char *, size_t, const char *, ...)
_ATTRIBUTE ((__format__ (__printf__, 3, 4))));
-char * _EXFUN(tempnam, (const char *, const char *));
int _EXFUN(vasiprintf, (char **, const char *, __VALIST)
_ATTRIBUTE ((__format__ (__printf__, 2, 0))));
char * _EXFUN(vasniprintf, (char *, size_t *, const char *, __VALIST)
_ATTRIBUTE ((__format__ (__printf__, 3, 0))));
char * _EXFUN(vasnprintf, (char *, size_t *, const char *, __VALIST)
_ATTRIBUTE ((__format__ (__printf__, 3, 0))));
-int _EXFUN(vasprintf, (char **, const char *, __VALIST)
- _ATTRIBUTE ((__format__ (__printf__, 2, 0))));
int _EXFUN(vdiprintf, (int, const char *, __VALIST)
_ATTRIBUTE ((__format__ (__printf__, 2, 0))));
int _EXFUN(vfiprintf, (FILE *, const char *, __VALIST)
_ATTRIBUTE ((__format__ (__printf__, 2, 0))));
int _EXFUN(vfiscanf, (FILE *, const char *, __VALIST)
_ATTRIBUTE ((__format__ (__scanf__, 2, 0))));
-int _EXFUN(vfscanf, (FILE *, const char *, __VALIST)
- _ATTRIBUTE ((__format__ (__scanf__, 2, 0))));
int _EXFUN(viprintf, (const char *, __VALIST)
_ATTRIBUTE ((__format__ (__printf__, 1, 0))));
int _EXFUN(viscanf, (const char *, __VALIST)
_ATTRIBUTE ((__format__ (__scanf__, 1, 0))));
-int _EXFUN(vscanf, (const char *, __VALIST)
- _ATTRIBUTE ((__format__ (__scanf__, 1, 0))));
int _EXFUN(vsiprintf, (char *, const char *, __VALIST)
_ATTRIBUTE ((__format__ (__printf__, 2, 0))));
int _EXFUN(vsiscanf, (const char *, const char *, __VALIST)
_ATTRIBUTE ((__format__ (__scanf__, 2, 0))));
int _EXFUN(vsniprintf, (char *, size_t, const char *, __VALIST)
_ATTRIBUTE ((__format__ (__printf__, 3, 0))));
-int _EXFUN(vsnprintf, (char *, size_t, const char *, __VALIST)
- _ATTRIBUTE ((__format__ (__printf__, 3, 0))));
-int _EXFUN(vsscanf, (const char *, const char *, __VALIST)
- _ATTRIBUTE ((__format__ (__scanf__, 2, 0))));
+#endif /* __MISC_VISIBLE */
#endif /* !_REENT_ONLY */
-#endif /* !__STRICT_ANSI__ */
/*
* Routines in POSIX 1003.1:2001.
*/
-#ifndef __STRICT_ANSI__
+#if __POSIX_VISIBLE
#ifndef _REENT_ONLY
FILE * _EXFUN(fdopen, (int, const char *));
#endif
int _EXFUN(fileno, (FILE *));
-int _EXFUN(getw, (FILE *));
+#endif
+#if __MISC_VISIBLE || __POSIX_VISIBLE >= 199209
int _EXFUN(pclose, (FILE *));
FILE * _EXFUN(popen, (const char *, const char *));
-int _EXFUN(putw, (int, FILE *));
+#endif
+
+#if __BSD_VISIBLE
void _EXFUN(setbuffer, (FILE *, char *, int));
int _EXFUN(setlinebuf, (FILE *));
+#endif
+
+#if __MISC_VISIBLE || (__XSI_VISIBLE && __POSIX_VISIBLE < 200112)
+int _EXFUN(getw, (FILE *));
+int _EXFUN(putw, (int, FILE *));
+#endif
+#if __MISC_VISIBLE || __POSIX_VISIBLE
int _EXFUN(getc_unlocked, (FILE *));
int _EXFUN(getchar_unlocked, (void));
void _EXFUN(flockfile, (FILE *));
@@ -320,29 +349,29 @@ int _EXFUN(ftrylockfile, (FILE *));
void _EXFUN(funlockfile, (FILE *));
int _EXFUN(putc_unlocked, (int, FILE *));
int _EXFUN(putchar_unlocked, (int));
-#endif /* ! __STRICT_ANSI__ */
+#endif
/*
* Routines in POSIX 1003.1:200x.
*/
-#ifndef __STRICT_ANSI__
+#if __POSIX_VISIBLE >= 200809
# ifndef _REENT_ONLY
# ifndef dprintf
-int _EXFUN(dprintf, (int, const char *, ...)
+int _EXFUN(dprintf, (int, const char *__restrict, ...)
_ATTRIBUTE ((__format__ (__printf__, 2, 3))));
# endif
-FILE * _EXFUN(fmemopen, (void *, size_t, const char *));
+FILE * _EXFUN(fmemopen, (void *__restrict, size_t, const char *__restrict));
/* getdelim - see __getdelim for now */
/* getline - see __getline for now */
FILE * _EXFUN(open_memstream, (char **, size_t *));
-#if defined (__CYGWIN__)
-int _EXFUN(renameat, (int, const char *, int, const char *));
-#endif
-int _EXFUN(vdprintf, (int, const char *, __VALIST)
+int _EXFUN(vdprintf, (int, const char *__restrict, __VALIST)
_ATTRIBUTE ((__format__ (__printf__, 2, 0))));
# endif
#endif
+#if __ATFILE_VISIBLE
+int _EXFUN(renameat, (int, const char *, int, const char *));
+#endif
/*
* Recursive versions of the above.
@@ -352,22 +381,24 @@ int _EXFUN(_asiprintf_r, (struct _reent *, char **, const char *, ...)
_ATTRIBUTE ((__format__ (__printf__, 3, 4))));
char * _EXFUN(_asniprintf_r, (struct _reent *, char *, size_t *, const char *, ...)
_ATTRIBUTE ((__format__ (__printf__, 4, 5))));
-char * _EXFUN(_asnprintf_r, (struct _reent *, char *, size_t *, const char *, ...)
+char * _EXFUN(_asnprintf_r, (struct _reent *, char *__restrict, size_t *__restrict, const char *__restrict, ...)
_ATTRIBUTE ((__format__ (__printf__, 4, 5))));
-int _EXFUN(_asprintf_r, (struct _reent *, char **, const char *, ...)
+int _EXFUN(_asprintf_r, (struct _reent *, char **__restrict, const char *__restrict, ...)
_ATTRIBUTE ((__format__ (__printf__, 3, 4))));
int _EXFUN(_diprintf_r, (struct _reent *, int, const char *, ...)
_ATTRIBUTE ((__format__ (__printf__, 3, 4))));
-int _EXFUN(_dprintf_r, (struct _reent *, int, const char *, ...)
+int _EXFUN(_dprintf_r, (struct _reent *, int, const char *__restrict, ...)
_ATTRIBUTE ((__format__ (__printf__, 3, 4))));
int _EXFUN(_fclose_r, (struct _reent *, FILE *));
int _EXFUN(_fcloseall_r, (struct _reent *));
FILE * _EXFUN(_fdopen_r, (struct _reent *, int, const char *));
int _EXFUN(_fflush_r, (struct _reent *, FILE *));
int _EXFUN(_fgetc_r, (struct _reent *, FILE *));
-char * _EXFUN(_fgets_r, (struct _reent *, char *, int, FILE *));
+int _EXFUN(_fgetc_unlocked_r, (struct _reent *, FILE *));
+char * _EXFUN(_fgets_r, (struct _reent *, char *__restrict, int, FILE *__restrict));
+char * _EXFUN(_fgets_unlocked_r, (struct _reent *, char *__restrict, int, FILE *__restrict));
#ifdef _COMPILING_NEWLIB
-int _EXFUN(_fgetpos_r, (struct _reent *, FILE *, _fpos_t *));
+int _EXFUN(_fgetpos_r, (struct _reent *, FILE *__restrict, _fpos_t *__restrict));
int _EXFUN(_fsetpos_r, (struct _reent *, FILE *, const _fpos_t *));
#else
int _EXFUN(_fgetpos_r, (struct _reent *, FILE *, fpos_t *));
@@ -377,23 +408,27 @@ int _EXFUN(_fiprintf_r, (struct _reent *, FILE *, const char *, ...)
_ATTRIBUTE ((__format__ (__printf__, 3, 4))));
int _EXFUN(_fiscanf_r, (struct _reent *, FILE *, const char *, ...)
_ATTRIBUTE ((__format__ (__scanf__, 3, 4))));
-FILE * _EXFUN(_fmemopen_r, (struct _reent *, void *, size_t, const char *));
-FILE * _EXFUN(_fopen_r, (struct _reent *, const char *, const char *));
-FILE * _EXFUN(_freopen_r, (struct _reent *, const char *, const char *, FILE *));
-int _EXFUN(_fprintf_r, (struct _reent *, FILE *, const char *, ...)
+FILE * _EXFUN(_fmemopen_r, (struct _reent *, void *__restrict, size_t, const char *__restrict));
+FILE * _EXFUN(_fopen_r, (struct _reent *, const char *__restrict, const char *__restrict));
+FILE * _EXFUN(_freopen_r, (struct _reent *, const char *__restrict, const char *__restrict, FILE *__restrict));
+int _EXFUN(_fprintf_r, (struct _reent *, FILE *__restrict, const char *__restrict, ...)
_ATTRIBUTE ((__format__ (__printf__, 3, 4))));
int _EXFUN(_fpurge_r, (struct _reent *, FILE *));
int _EXFUN(_fputc_r, (struct _reent *, int, FILE *));
-int _EXFUN(_fputs_r, (struct _reent *, const char *, FILE *));
-size_t _EXFUN(_fread_r, (struct _reent *, _PTR, size_t _size, size_t _n, FILE *));
-int _EXFUN(_fscanf_r, (struct _reent *, FILE *, const char *, ...)
+int _EXFUN(_fputc_unlocked_r, (struct _reent *, int, FILE *));
+int _EXFUN(_fputs_r, (struct _reent *, const char *__restrict, FILE *__restrict));
+int _EXFUN(_fputs_unlocked_r, (struct _reent *, const char *__restrict, FILE *__restrict));
+size_t _EXFUN(_fread_r, (struct _reent *, _PTR __restrict, size_t _size, size_t _n, FILE *__restrict));
+size_t _EXFUN(_fread_unlocked_r, (struct _reent *, _PTR __restrict, size_t _size, size_t _n, FILE *__restrict));
+int _EXFUN(_fscanf_r, (struct _reent *, FILE *__restrict, const char *__restrict, ...)
_ATTRIBUTE ((__format__ (__scanf__, 3, 4))));
int _EXFUN(_fseek_r, (struct _reent *, FILE *, long, int));
int _EXFUN(_fseeko_r,(struct _reent *, FILE *, _off_t, int));
long _EXFUN(_ftell_r, (struct _reent *, FILE *));
_off_t _EXFUN(_ftello_r,(struct _reent *, FILE *));
void _EXFUN(_rewind_r, (struct _reent *, FILE *));
-size_t _EXFUN(_fwrite_r, (struct _reent *, const _PTR , size_t _size, size_t _n, FILE *));
+size_t _EXFUN(_fwrite_r, (struct _reent *, const _PTR __restrict, size_t _size, size_t _n, FILE *__restrict));
+size_t _EXFUN(_fwrite_unlocked_r, (struct _reent *, const _PTR __restrict, size_t _size, size_t _n, FILE *__restrict));
int _EXFUN(_getc_r, (struct _reent *, FILE *));
int _EXFUN(_getc_unlocked_r, (struct _reent *, FILE *));
int _EXFUN(_getchar_r, (struct _reent *));
@@ -405,7 +440,7 @@ int _EXFUN(_iscanf_r, (struct _reent *, const char *, ...)
_ATTRIBUTE ((__format__ (__scanf__, 2, 3))));
FILE * _EXFUN(_open_memstream_r, (struct _reent *, char **, size_t *));
void _EXFUN(_perror_r, (struct _reent *, const char *));
-int _EXFUN(_printf_r, (struct _reent *, const char *, ...)
+int _EXFUN(_printf_r, (struct _reent *, const char *__restrict, ...)
_ATTRIBUTE ((__format__ (__printf__, 2, 3))));
int _EXFUN(_putc_r, (struct _reent *, int, FILE *));
int _EXFUN(_putc_unlocked_r, (struct _reent *, int, FILE *));
@@ -415,7 +450,7 @@ int _EXFUN(_puts_r, (struct _reent *, const char *));
int _EXFUN(_remove_r, (struct _reent *, const char *));
int _EXFUN(_rename_r, (struct _reent *,
const char *_old, const char *_new));
-int _EXFUN(_scanf_r, (struct _reent *, const char *, ...)
+int _EXFUN(_scanf_r, (struct _reent *, const char *__restrict, ...)
_ATTRIBUTE ((__format__ (__scanf__, 2, 3))));
int _EXFUN(_siprintf_r, (struct _reent *, char *, const char *, ...)
_ATTRIBUTE ((__format__ (__printf__, 3, 4))));
@@ -423,11 +458,11 @@ int _EXFUN(_siscanf_r, (struct _reent *, const char *, const char *, ...)
_ATTRIBUTE ((__format__ (__scanf__, 3, 4))));
int _EXFUN(_sniprintf_r, (struct _reent *, char *, size_t, const char *, ...)
_ATTRIBUTE ((__format__ (__printf__, 4, 5))));
-int _EXFUN(_snprintf_r, (struct _reent *, char *, size_t, const char *, ...)
+int _EXFUN(_snprintf_r, (struct _reent *, char *__restrict, size_t, const char *__restrict, ...)
_ATTRIBUTE ((__format__ (__printf__, 4, 5))));
-int _EXFUN(_sprintf_r, (struct _reent *, char *, const char *, ...)
+int _EXFUN(_sprintf_r, (struct _reent *, char *__restrict, const char *__restrict, ...)
_ATTRIBUTE ((__format__ (__printf__, 3, 4))));
-int _EXFUN(_sscanf_r, (struct _reent *, const char *, const char *, ...)
+int _EXFUN(_sscanf_r, (struct _reent *, const char *__restrict, const char *__restrict, ...)
_ATTRIBUTE ((__format__ (__scanf__, 3, 4))));
char * _EXFUN(_tempnam_r, (struct _reent *, const char *, const char *));
FILE * _EXFUN(_tmpfile_r, (struct _reent *));
@@ -443,23 +478,23 @@ int _EXFUN(_vasprintf_r, (struct _reent *, char **, const char *, __VALIST)
_ATTRIBUTE ((__format__ (__printf__, 3, 0))));
int _EXFUN(_vdiprintf_r, (struct _reent *, int, const char *, __VALIST)
_ATTRIBUTE ((__format__ (__printf__, 3, 0))));
-int _EXFUN(_vdprintf_r, (struct _reent *, int, const char *, __VALIST)
+int _EXFUN(_vdprintf_r, (struct _reent *, int, const char *__restrict, __VALIST)
_ATTRIBUTE ((__format__ (__printf__, 3, 0))));
int _EXFUN(_vfiprintf_r, (struct _reent *, FILE *, const char *, __VALIST)
_ATTRIBUTE ((__format__ (__printf__, 3, 0))));
int _EXFUN(_vfiscanf_r, (struct _reent *, FILE *, const char *, __VALIST)
_ATTRIBUTE ((__format__ (__scanf__, 3, 0))));
-int _EXFUN(_vfprintf_r, (struct _reent *, FILE *, const char *, __VALIST)
+int _EXFUN(_vfprintf_r, (struct _reent *, FILE *__restrict, const char *__restrict, __VALIST)
_ATTRIBUTE ((__format__ (__printf__, 3, 0))));
-int _EXFUN(_vfscanf_r, (struct _reent *, FILE *, const char *, __VALIST)
+int _EXFUN(_vfscanf_r, (struct _reent *, FILE *__restrict, const char *__restrict, __VALIST)
_ATTRIBUTE ((__format__ (__scanf__, 3, 0))));
int _EXFUN(_viprintf_r, (struct _reent *, const char *, __VALIST)
_ATTRIBUTE ((__format__ (__printf__, 2, 0))));
int _EXFUN(_viscanf_r, (struct _reent *, const char *, __VALIST)
_ATTRIBUTE ((__format__ (__scanf__, 2, 0))));
-int _EXFUN(_vprintf_r, (struct _reent *, const char *, __VALIST)
+int _EXFUN(_vprintf_r, (struct _reent *, const char *__restrict, __VALIST)
_ATTRIBUTE ((__format__ (__printf__, 2, 0))));
-int _EXFUN(_vscanf_r, (struct _reent *, const char *, __VALIST)
+int _EXFUN(_vscanf_r, (struct _reent *, const char *__restrict, __VALIST)
_ATTRIBUTE ((__format__ (__scanf__, 2, 0))));
int _EXFUN(_vsiprintf_r, (struct _reent *, char *, const char *, __VALIST)
_ATTRIBUTE ((__format__ (__printf__, 3, 0))));
@@ -467,11 +502,11 @@ int _EXFUN(_vsiscanf_r, (struct _reent *, const char *, const char *, __VALIST)
_ATTRIBUTE ((__format__ (__scanf__, 3, 0))));
int _EXFUN(_vsniprintf_r, (struct _reent *, char *, size_t, const char *, __VALIST)
_ATTRIBUTE ((__format__ (__printf__, 4, 0))));
-int _EXFUN(_vsnprintf_r, (struct _reent *, char *, size_t, const char *, __VALIST)
+int _EXFUN(_vsnprintf_r, (struct _reent *, char *__restrict, size_t, const char *__restrict, __VALIST)
_ATTRIBUTE ((__format__ (__printf__, 4, 0))));
-int _EXFUN(_vsprintf_r, (struct _reent *, char *, const char *, __VALIST)
+int _EXFUN(_vsprintf_r, (struct _reent *, char *__restrict, const char *__restrict, __VALIST)
_ATTRIBUTE ((__format__ (__printf__, 3, 0))));
-int _EXFUN(_vsscanf_r, (struct _reent *, const char *, const char *, __VALIST)
+int _EXFUN(_vsscanf_r, (struct _reent *, const char *__restrict, const char *__restrict, __VALIST)
_ATTRIBUTE ((__format__ (__scanf__, 3, 0))));
/* Other extensions. */
@@ -480,6 +515,23 @@ int _EXFUN(fpurge, (FILE *));
ssize_t _EXFUN(__getdelim, (char **, size_t *, int, FILE *));
ssize_t _EXFUN(__getline, (char **, size_t *, FILE *));
+#if __MISC_VISIBLE
+void _EXFUN(clearerr_unlocked, (FILE *));
+int _EXFUN(feof_unlocked, (FILE *));
+int _EXFUN(ferror_unlocked, (FILE *));
+int _EXFUN(fileno_unlocked, (FILE *));
+int _EXFUN(fflush_unlocked, (FILE *));
+int _EXFUN(fgetc_unlocked, (FILE *));
+int _EXFUN(fputc_unlocked, (int, FILE *));
+size_t _EXFUN(fread_unlocked, (_PTR __restrict, size_t _size, size_t _n, FILE *__restrict));
+size_t _EXFUN(fwrite_unlocked, (const _PTR __restrict , size_t _size, size_t _n, FILE *));
+#endif
+
+#if __GNU_VISIBLE
+char * _EXFUN(fgets_unlocked, (char *__restrict, int, FILE *__restrict));
+int _EXFUN(fputs_unlocked, (const char *__restrict, FILE *__restrict));
+#endif
+
#ifdef __LARGE64_FILES
#if !defined(__CYGWIN__) || defined(_COMPILING_NEWLIB)
FILE * _EXFUN(fdopen64, (int, const char *));
@@ -513,27 +565,35 @@ int _EXFUN(__swbuf_r, (struct _reent *, int, FILE *));
* Stdio function-access interface.
*/
-#ifndef __STRICT_ANSI__
+#if __BSD_VISIBLE
# ifdef __LARGE64_FILES
FILE *_EXFUN(funopen,(const _PTR __cookie,
- int (*__readfn)(_PTR __c, char *__buf, int __n),
- int (*__writefn)(_PTR __c, const char *__buf, int __n),
+ int (*__readfn)(_PTR __c, char *__buf,
+ _READ_WRITE_BUFSIZE_TYPE __n),
+ int (*__writefn)(_PTR __c, const char *__buf,
+ _READ_WRITE_BUFSIZE_TYPE __n),
_fpos64_t (*__seekfn)(_PTR __c, _fpos64_t __off, int __whence),
int (*__closefn)(_PTR __c)));
FILE *_EXFUN(_funopen_r,(struct _reent *, const _PTR __cookie,
- int (*__readfn)(_PTR __c, char *__buf, int __n),
- int (*__writefn)(_PTR __c, const char *__buf, int __n),
+ int (*__readfn)(_PTR __c, char *__buf,
+ _READ_WRITE_BUFSIZE_TYPE __n),
+ int (*__writefn)(_PTR __c, const char *__buf,
+ _READ_WRITE_BUFSIZE_TYPE __n),
_fpos64_t (*__seekfn)(_PTR __c, _fpos64_t __off, int __whence),
int (*__closefn)(_PTR __c)));
# else
FILE *_EXFUN(funopen,(const _PTR __cookie,
- int (*__readfn)(_PTR __cookie, char *__buf, int __n),
- int (*__writefn)(_PTR __cookie, const char *__buf, int __n),
+ int (*__readfn)(_PTR __cookie, char *__buf,
+ _READ_WRITE_BUFSIZE_TYPE __n),
+ int (*__writefn)(_PTR __cookie, const char *__buf,
+ _READ_WRITE_BUFSIZE_TYPE __n),
fpos_t (*__seekfn)(_PTR __cookie, fpos_t __off, int __whence),
int (*__closefn)(_PTR __cookie)));
FILE *_EXFUN(_funopen_r,(struct _reent *, const _PTR __cookie,
- int (*__readfn)(_PTR __cookie, char *__buf, int __n),
- int (*__writefn)(_PTR __cookie, const char *__buf, int __n),
+ int (*__readfn)(_PTR __cookie, char *__buf,
+ _READ_WRITE_BUFSIZE_TYPE __n),
+ int (*__writefn)(_PTR __cookie, const char *__buf,
+ _READ_WRITE_BUFSIZE_TYPE __n),
fpos_t (*__seekfn)(_PTR __cookie, fpos_t __off, int __whence),
int (*__closefn)(_PTR __cookie)));
# endif /* !__LARGE64_FILES */
@@ -542,7 +602,9 @@ FILE *_EXFUN(_funopen_r,(struct _reent *, const _PTR __cookie,
(fpos_t (*)())0, (int (*)())0)
# define fwopen(__cookie, __fn) funopen(__cookie, (int (*)())0, __fn, \
(fpos_t (*)())0, (int (*)())0)
+#endif /* __BSD_VISIBLE */
+#if __GNU_VISIBLE
typedef ssize_t cookie_read_function_t(void *__cookie, char *__buf, size_t __n);
typedef ssize_t cookie_write_function_t(void *__cookie, const char *__buf,
size_t __n);
@@ -566,7 +628,7 @@ FILE *_EXFUN(fopencookie,(void *__cookie,
const char *__mode, cookie_io_functions_t __functions));
FILE *_EXFUN(_fopencookie_r,(struct _reent *, void *__cookie,
const char *__mode, cookie_io_functions_t __functions));
-#endif /* ! __STRICT_ANSI__ */
+#endif /* __GNU_VISIBLE */
#ifndef __CUSTOM_FILE_IO__
/*
@@ -605,10 +667,12 @@ _ELIDABLE_INLINE int __sgetc_r(struct _reent *__ptr, FILE *__p)
#define __sgetc_r(__ptr, __p) __sgetc_raw_r(__ptr, __p)
#endif
-#ifdef _never /* __GNUC__ */
-/* If this inline is actually used, then systems using coff debugging
- info get hopelessly confused. 21sept93 rich@cygnus.com. */
+#ifdef __GNUC__
_ELIDABLE_INLINE int __sputc_r(struct _reent *_ptr, int _c, FILE *_p) {
+#ifdef __SCLE
+ if ((_p->_flags & __SCLE) && _c == '\n')
+ __sputc_r (_ptr, '\r', _p);
+#endif
if (--_p->_w >= 0 || (_p->_w >= _p->_lbfsize && (char)_c != '\n'))
return (*_p->_p++ = _c);
else
@@ -636,8 +700,8 @@ _ELIDABLE_INLINE int __sputc_r(struct _reent *_ptr, int _c, FILE *_p) {
#endif
#endif
-#define __sfeof(p) (((p)->_flags & __SEOF) != 0)
-#define __sferror(p) (((p)->_flags & __SERR) != 0)
+#define __sfeof(p) ((int)(((p)->_flags & __SEOF) != 0))
+#define __sferror(p) ((int)(((p)->_flags & __SERR) != 0))
#define __sclearerr(p) ((void)((p)->_flags &= ~(__SERR|__SEOF)))
#define __sfileno(p) ((p)->_file)
@@ -645,9 +709,15 @@ _ELIDABLE_INLINE int __sputc_r(struct _reent *_ptr, int _c, FILE *_p) {
#define feof(p) __sfeof(p)
#define ferror(p) __sferror(p)
#define clearerr(p) __sclearerr(p)
-#endif
-#if 0 /*ndef __STRICT_ANSI__ - FIXME: must initialize stdio first, use fn */
+#if __MISC_VISIBLE
+#define feof_unlocked(p) __sfeof(p)
+#define ferror_unlocked(p) __sferror(p)
+#define clearerr_unlocked(p) __sclearerr(p)
+#endif /* __MISC_VISIBLE */
+#endif /* _REENT_SMALL */
+
+#if 0 /* __POSIX_VISIBLE - FIXME: must initialize stdio first, use fn */
#define fileno(p) __sfileno(p)
#endif
@@ -658,15 +728,17 @@ _ELIDABLE_INLINE int __sputc_r(struct _reent *_ptr, int _c, FILE *_p) {
#endif /* lint */
#endif /* __CYGWIN__ */
-#ifndef __STRICT_ANSI__
+#if __MISC_VISIBLE
/* fast always-buffered version, true iff error */
#define fast_putc(x,p) (--(p)->_w < 0 ? \
__swbuf_r(_REENT, (int)(x), p) == EOF : (*(p)->_p = (x), (p)->_p++, 0))
+#endif
+#if __GNU_VISIBLE || (__XSI_VISIBLE && __XSI_VISIBLE < 600)
#define L_cuserid 9 /* posix says it goes in stdio.h :( */
-#ifdef __CYGWIN__
-#define L_ctermid 16
#endif
+#if __POSIX_VISIBLE
+#define L_ctermid 16
#endif
#endif /* !__CUSTOM_FILE_IO__ */
@@ -674,6 +746,11 @@ _ELIDABLE_INLINE int __sputc_r(struct _reent *_ptr, int _c, FILE *_p) {
#define getchar() getc(stdin)
#define putchar(x) putc(x, stdout)
+#if __MISC_VISIBLE || __POSIX_VISIBLE
+#define getchar_unlocked() getc_unlocked(stdin)
+#define putchar_unlocked(x) putc_unlocked(x, stdout)
+#endif
+
_END_STD_C
#endif /* _STDIO_H_ */
diff --git a/newlib/libc/include/stdio_ext.h b/newlib/libc/include/stdio_ext.h
index a830c8815..029ab0253 100644
--- a/newlib/libc/include/stdio_ext.h
+++ b/newlib/libc/include/stdio_ext.h
@@ -13,49 +13,65 @@
#include <stdio.h>
+#define FSETLOCKING_QUERY 0
+#define FSETLOCKING_INTERNAL 1
+#define FSETLOCKING_BYCALLER 2
+
_BEGIN_STD_C
void _EXFUN(__fpurge,(FILE *));
+int _EXFUN(__fsetlocking,(FILE *, int));
/* TODO:
void _flushlbf (void);
- int __fsetlocking (FILE *__fp, int __type);
*/
#ifdef __GNUC__
-_ELIDABLE_INLINE inline size_t
+_ELIDABLE_INLINE size_t
__fbufsize (FILE *__fp) { return (size_t) __fp->_bf._size; }
-_ELIDABLE_INLINE inline int
+_ELIDABLE_INLINE int
__freading (FILE *__fp) { return (__fp->_flags & __SRD) != 0; }
-_ELIDABLE_INLINE inline int
+_ELIDABLE_INLINE int
__fwriting (FILE *__fp) { return (__fp->_flags & __SWR) != 0; }
-_ELIDABLE_INLINE inline int
+_ELIDABLE_INLINE int
__freadable (FILE *__fp) { return (__fp->_flags & (__SRD | __SRW)) != 0; }
-_ELIDABLE_INLINE inline int
-__fwriteable (FILE *__fp) { return (__fp->_flags & (__SWR | __SRW)) != 0; }
+_ELIDABLE_INLINE int
+__fwritable (FILE *__fp) { return (__fp->_flags & (__SWR | __SRW)) != 0; }
-_ELIDABLE_INLINE inline int
+_ELIDABLE_INLINE int
__flbf (FILE *__fp) { return (__fp->_flags & __SLBF) != 0; }
-_ELIDABLE_INLINE inline size_t
+_ELIDABLE_INLINE size_t
__fpending (FILE *__fp) { return __fp->_p - __fp->_bf._base; }
#else
+size_t _EXFUN(__fbufsize,(FILE *));
+int _EXFUN(__freading,(FILE *));
+int _EXFUN(__fwriting,(FILE *));
+int _EXFUN(__freadable,(FILE *));
+int _EXFUN(__fwritable,(FILE *));
+int _EXFUN(__flbf,(FILE *));
+size_t _EXFUN(__fpending,(FILE *));
+
+#ifndef __cplusplus
+
#define __fbufsize(__fp) ((size_t) (__fp)->_bf._size)
#define __freading(__fp) (((__fp)->_flags & __SRD) != 0)
#define __fwriting(__fp) (((__fp)->_flags & __SWR) != 0)
#define __freadable(__fp) (((__fp)->_flags & (__SRD | __SRW)) != 0)
-#define __fwriteable(__fp) (((__fp)->_flags & (__SWR | __SRW)) != 0)
+#define __fwritable(__fp) (((__fp)->_flags & (__SWR | __SRW)) != 0)
#define __flbf(__fp) (((__fp)->_flags & __SLBF) != 0)
#define __fpending(__fp) ((size_t) ((__fp)->_p - (__fp)->_bf._base))
+#endif /* __cplusplus */
+
#endif /* __GNUC__ */
_END_STD_C
diff --git a/newlib/libc/include/stdlib.h b/newlib/libc/include/stdlib.h
index eee118d56..3d1b8a9b0 100644
--- a/newlib/libc/include/stdlib.h
+++ b/newlib/libc/include/stdlib.h
@@ -16,6 +16,7 @@
#include <stddef.h>
#include <sys/reent.h>
+#include <sys/cdefs.h>
#include <machine/stdlib.h>
#ifndef __STRICT_ANSI__
#include <alloca.h>
@@ -39,7 +40,7 @@ typedef struct
long rem; /* remainder */
} ldiv_t;
-#ifndef __STRICT_ANSI__
+#if __ISO_C_VISIBLE >= 1999
typedef struct
{
long long int quot; /* quotient */
@@ -47,6 +48,11 @@ typedef struct
} lldiv_t;
#endif
+#ifndef __compar_fn_t_defined
+#define __compar_fn_t_defined
+typedef int (*__compar_fn_t) (const _PTR, const _PTR);
+#endif
+
#define EXIT_FAILURE 1
#define EXIT_SUCCESS 0
@@ -56,11 +62,16 @@ int _EXFUN(__locale_mb_cur_max,(_VOID));
#define MB_CUR_MAX __locale_mb_cur_max()
-_VOID _EXFUN(abort,(_VOID) _ATTRIBUTE ((noreturn)));
+_VOID _EXFUN(abort,(_VOID) _ATTRIBUTE ((__noreturn__)));
int _EXFUN(abs,(int));
+#if __BSD_VISIBLE
+__uint32_t _EXFUN(arc4random, (void));
+__uint32_t _EXFUN(arc4random_uniform, (__uint32_t));
+void _EXFUN(arc4random_buf, (void *, size_t));
+#endif
int _EXFUN(atexit,(_VOID (*__func)(_VOID)));
double _EXFUN(atof,(const char *__nptr));
-#ifndef __STRICT_ANSI__
+#if __MISC_VISIBLE
float _EXFUN(atoff,(const char *__nptr));
#endif
int _EXFUN(atoi,(const char *__nptr));
@@ -71,16 +82,16 @@ _PTR _EXFUN(bsearch,(const _PTR __key,
const _PTR __base,
size_t __nmemb,
size_t __size,
- int _EXFNPTR(_compar,(const _PTR, const _PTR))));
+ __compar_fn_t _compar));
_PTR _EXFUN_NOTHROW(calloc,(size_t __nmemb, size_t __size));
div_t _EXFUN(div,(int __numer, int __denom));
-_VOID _EXFUN(exit,(int __status) _ATTRIBUTE ((noreturn)));
+_VOID _EXFUN(exit,(int __status) _ATTRIBUTE ((__noreturn__)));
_VOID _EXFUN_NOTHROW(free,(_PTR));
char * _EXFUN(getenv,(const char *__string));
char * _EXFUN(_getenv_r,(struct _reent *, const char *__string));
char * _EXFUN(_findenv,(_CONST char *, int *));
char * _EXFUN(_findenv_r,(struct _reent *, _CONST char *, int *));
-#ifndef __STRICT_ANSI__
+#if __POSIX_VISIBLE >= 200809
extern char *suboptarg; /* getsubopt(3) external variable */
int _EXFUN(getsubopt,(char **, char * const *, char **));
#endif
@@ -89,67 +100,94 @@ ldiv_t _EXFUN(ldiv,(long __numer, long __denom));
_PTR _EXFUN_NOTHROW(malloc,(size_t __size));
int _EXFUN(mblen,(const char *, size_t));
int _EXFUN(_mblen_r,(struct _reent *, const char *, size_t, _mbstate_t *));
-int _EXFUN(mbtowc,(wchar_t *, const char *, size_t));
-int _EXFUN(_mbtowc_r,(struct _reent *, wchar_t *, const char *, size_t, _mbstate_t *));
+int _EXFUN(mbtowc,(wchar_t *__restrict, const char *__restrict, size_t));
+int _EXFUN(_mbtowc_r,(struct _reent *, wchar_t *__restrict, const char *__restrict, size_t, _mbstate_t *));
int _EXFUN(wctomb,(char *, wchar_t));
int _EXFUN(_wctomb_r,(struct _reent *, char *, wchar_t, _mbstate_t *));
-size_t _EXFUN(mbstowcs,(wchar_t *, const char *, size_t));
-size_t _EXFUN(_mbstowcs_r,(struct _reent *, wchar_t *, const char *, size_t, _mbstate_t *));
-size_t _EXFUN(wcstombs,(char *, const wchar_t *, size_t));
-size_t _EXFUN(_wcstombs_r,(struct _reent *, char *, const wchar_t *, size_t, _mbstate_t *));
-#ifndef __STRICT_ANSI__
+size_t _EXFUN(mbstowcs,(wchar_t *__restrict, const char *__restrict, size_t));
+size_t _EXFUN(_mbstowcs_r,(struct _reent *, wchar_t *__restrict, const char *__restrict, size_t, _mbstate_t *));
+size_t _EXFUN(wcstombs,(char *__restrict, const wchar_t *__restrict, size_t));
+size_t _EXFUN(_wcstombs_r,(struct _reent *, char *__restrict, const wchar_t *__restrict, size_t, _mbstate_t *));
#ifndef _REENT_ONLY
+#if __BSD_VISIBLE || __POSIX_VISIBLE >= 200809
char * _EXFUN(mkdtemp,(char *));
+#endif
+#if __GNU_VISIBLE
int _EXFUN(mkostemp,(char *, int));
int _EXFUN(mkostemps,(char *, int, int));
+#endif
+#if __MISC_VISIBLE || __POSIX_VISIBLE >= 200112 || __XSI_VISIBLE >= 4
int _EXFUN(mkstemp,(char *));
+#endif
+#if __MISC_VISIBLE
int _EXFUN(mkstemps,(char *, int));
-char * _EXFUN(mktemp,(char *) _ATTRIBUTE ((__warning__ ("the use of `mktemp' is dangerous; use `mkstemp' instead"))));
#endif
+#if __BSD_VISIBLE || (__XSI_VISIBLE >= 4 && __POSIX_VISIBLE < 200112)
+char * _EXFUN(mktemp,(char *) _ATTRIBUTE ((__deprecated__("the use of `mktemp' is dangerous; use `mkstemp' instead"))));
+#endif
+#endif /* !_REENT_ONLY */
char * _EXFUN(_mkdtemp_r, (struct _reent *, char *));
int _EXFUN(_mkostemp_r, (struct _reent *, char *, int));
int _EXFUN(_mkostemps_r, (struct _reent *, char *, int, int));
int _EXFUN(_mkstemp_r, (struct _reent *, char *));
int _EXFUN(_mkstemps_r, (struct _reent *, char *, int));
-char * _EXFUN(_mktemp_r, (struct _reent *, char *) _ATTRIBUTE ((__warning__ ("the use of `mktemp' is dangerous; use `mkstemp' instead"))));
-#endif
-_VOID _EXFUN(qsort,(_PTR __base, size_t __nmemb, size_t __size, int(*_compar)(const _PTR, const _PTR)));
+char * _EXFUN(_mktemp_r, (struct _reent *, char *) _ATTRIBUTE ((__deprecated__("the use of `mktemp' is dangerous; use `mkstemp' instead"))));
+_VOID _EXFUN(qsort,(_PTR __base, size_t __nmemb, size_t __size, __compar_fn_t _compar));
int _EXFUN(rand,(_VOID));
_PTR _EXFUN_NOTHROW(realloc,(_PTR __r, size_t __size));
-#ifndef __STRICT_ANSI__
+#if __BSD_VISIBLE
_PTR _EXFUN(reallocf,(_PTR __r, size_t __size));
#endif
+#if __BSD_VISIBLE || __XSI_VISIBLE >= 4
+char * _EXFUN(realpath, (const char *__restrict path, char *__restrict resolved_path));
+#endif
+#if __BSD_VISIBLE
+int _EXFUN(rpmatch, (const char *response));
+#endif
+#if __XSI_VISIBLE
+_VOID _EXFUN(setkey, (const char *__key));
+#endif
_VOID _EXFUN(srand,(unsigned __seed));
-double _EXFUN(strtod,(const char *__n, char **__end_PTR));
-double _EXFUN(_strtod_r,(struct _reent *,const char *__n, char **__end_PTR));
-#if !defined(__STRICT_ANSI__) || (__STDC_VERSION__ >= 199901L) || (__cplusplus >= 201103L)
-float _EXFUN(strtof,(const char *__n, char **__end_PTR));
+double _EXFUN(strtod,(const char *__restrict __n, char **__restrict __end_PTR));
+double _EXFUN(_strtod_r,(struct _reent *,const char *__restrict __n, char **__restrict __end_PTR));
+#if __ISO_C_VISIBLE >= 1999
+float _EXFUN(strtof,(const char *__restrict __n, char **__restrict __end_PTR));
#endif
-#ifndef __STRICT_ANSI__
+#if __MISC_VISIBLE
/* the following strtodf interface is deprecated...use strtof instead */
-# ifndef strtodf
+# ifndef strtodf
# define strtodf strtof
# endif
#endif
-long _EXFUN(strtol,(const char *__n, char **__end_PTR, int __base));
-long _EXFUN(_strtol_r,(struct _reent *,const char *__n, char **__end_PTR, int __base));
-unsigned long _EXFUN(strtoul,(const char *__n, char **__end_PTR, int __base));
-unsigned long _EXFUN(_strtoul_r,(struct _reent *,const char *__n, char **__end_PTR, int __base));
+long _EXFUN(strtol,(const char *__restrict __n, char **__restrict __end_PTR, int __base));
+long _EXFUN(_strtol_r,(struct _reent *,const char *__restrict __n, char **__restrict __end_PTR, int __base));
+unsigned long _EXFUN(strtoul,(const char *__restrict __n, char **__restrict __end_PTR, int __base));
+unsigned long _EXFUN(_strtoul_r,(struct _reent *,const char *__restrict __n, char **__restrict __end_PTR, int __base));
int _EXFUN(system,(const char *__string));
-#ifndef __STRICT_ANSI__
+#if __SVID_VISIBLE || __XSI_VISIBLE >= 4
long _EXFUN(a64l,(const char *__input));
char * _EXFUN(l64a,(long __input));
char * _EXFUN(_l64a_r,(struct _reent *,long __input));
+#endif
+#if __MISC_VISIBLE
int _EXFUN(on_exit,(_VOID (*__func)(int, _PTR),_PTR __arg));
-_VOID _EXFUN(_Exit,(int __status) _ATTRIBUTE ((noreturn)));
+#endif
+#if __ISO_C_VISIBLE >= 1999
+_VOID _EXFUN(_Exit,(int __status) _ATTRIBUTE ((__noreturn__)));
+#endif
+#if __SVID_VISIBLE || __XSI_VISIBLE
int _EXFUN(putenv,(char *__string));
+#endif
int _EXFUN(_putenv_r,(struct _reent *, char *__string));
_PTR _EXFUN(_reallocf_r,(struct _reent *, _PTR, size_t));
+#if __BSD_VISIBLE || __POSIX_VISIBLE >= 200112
int _EXFUN(setenv,(const char *__string, const char *__value, int __overwrite));
+#endif
int _EXFUN(_setenv_r,(struct _reent *, const char *__string, const char *__value, int __overwrite));
+#if __XSI_VISIBLE >= 4 && __POSIX_VISIBLE < 200112
char * _EXFUN(gcvt,(double,int,char *));
char * _EXFUN(gcvtf,(float,int,char *));
char * _EXFUN(fcvt,(double,int,int *,int *));
@@ -158,9 +196,18 @@ char * _EXFUN(ecvt,(double,int,int *,int *));
char * _EXFUN(ecvtbuf,(double, int, int*, int*, char *));
char * _EXFUN(fcvtbuf,(double, int, int*, int*, char *));
char * _EXFUN(ecvtf,(float,int,int *,int *));
-char * _EXFUN(dtoa,(double, int, int, int *, int*, char**));
+#endif
+char * _EXFUN(__itoa,(int, char *, int));
+char * _EXFUN(__utoa,(unsigned, char *, int));
+#if __MISC_VISIBLE
+char * _EXFUN(itoa,(int, char *, int));
+char * _EXFUN(utoa,(unsigned, char *, int));
+#endif
+#if __POSIX_VISIBLE
int _EXFUN(rand_r,(unsigned *__seed));
+#endif
+#if __SVID_VISIBLE || __XSI_VISIBLE
double _EXFUN(drand48,(_VOID));
double _EXFUN(_drand48_r,(struct _reent *));
double _EXFUN(erand48,(unsigned short [3]));
@@ -181,35 +228,42 @@ unsigned short *
_EXFUN(_seed48_r,(struct _reent *, unsigned short [3]));
_VOID _EXFUN(srand48,(long));
_VOID _EXFUN(_srand48_r,(struct _reent *, long));
+#endif /* __SVID_VISIBLE || __XSI_VISIBLE */
+#if __SVID_VISIBLE || __XSI_VISIBLE >= 4 || __BSD_VISIBLE
+char * _EXFUN(initstate,(unsigned, char *, size_t));
+long _EXFUN(random,(_VOID));
+char * _EXFUN(setstate,(char *));
+_VOID _EXFUN(srandom,(unsigned));
+#endif
+#if __ISO_C_VISIBLE >= 1999
long long _EXFUN(atoll,(const char *__nptr));
+#endif
long long _EXFUN(_atoll_r,(struct _reent *, const char *__nptr));
+#if __ISO_C_VISIBLE >= 1999
long long _EXFUN(llabs,(long long));
lldiv_t _EXFUN(lldiv,(long long __numer, long long __denom));
-#endif /* ! __STRICT_ANSI__ */
-#if !defined(__STRICT_ANSI__) || (__STDC_VERSION__ >= 199901L) || (__cplusplus >= 201103L)
-long long _EXFUN(strtoll,(const char *__n, char **__end_PTR, int __base));
+long long _EXFUN(strtoll,(const char *__restrict __n, char **__restrict __end_PTR, int __base));
#endif
-#ifndef __STRICT_ANSI__
-long long _EXFUN(_strtoll_r,(struct _reent *, const char *__n, char **__end_PTR, int __base));
-#endif /* ! __STRICT_ANSI__ */
-#if !defined(__STRICT_ANSI__) || (__STDC_VERSION__ >= 199901L) || (__cplusplus >= 201103L)
-unsigned long long _EXFUN(strtoull,(const char *__n, char **__end_PTR, int __base));
+long long _EXFUN(_strtoll_r,(struct _reent *, const char *__restrict __n, char **__restrict __end_PTR, int __base));
+#if __ISO_C_VISIBLE >= 1999
+unsigned long long _EXFUN(strtoull,(const char *__restrict __n, char **__restrict __end_PTR, int __base));
#endif
-#ifndef __STRICT_ANSI__
-unsigned long long _EXFUN(_strtoull_r,(struct _reent *, const char *__n, char **__end_PTR, int __base));
+unsigned long long _EXFUN(_strtoull_r,(struct _reent *, const char *__restrict __n, char **__restrict __end_PTR, int __base));
#ifndef __CYGWIN__
+#if __MISC_VISIBLE
_VOID _EXFUN(cfree,(_PTR));
+#endif
+#if __BSD_VISIBLE || __POSIX_VISIBLE >= 200112
int _EXFUN(unsetenv,(const char *__string));
-int _EXFUN(_unsetenv_r,(struct _reent *, const char *__string));
#endif
+int _EXFUN(_unsetenv_r,(struct _reent *, const char *__string));
+#endif /* !__CYGWIN__ */
-#ifdef __rtems__
-int _EXFUN(posix_memalign,(void **, size_t, size_t));
+#if __POSIX_VISIBLE >= 200112
+int _EXFUN(__nonnull (1) posix_memalign,(void **, size_t, size_t));
#endif
-#endif /* ! __STRICT_ANSI__ */
-
char * _EXFUN(_dtoa_r,(struct _reent *, double, int, int, int *, int*, char**));
#ifndef __CYGWIN__
_PTR _EXFUN_NOTHROW(_malloc_r,(struct _reent *, size_t));
@@ -222,13 +276,40 @@ int _EXFUN(_system_r,(struct _reent *, const char *));
_VOID _EXFUN(__eprintf,(const char *, const char *, unsigned int, const char *));
+/* There are two common qsort_r variants. If you request
+ _BSD_SOURCE, you get the BSD version; otherwise you get the GNU
+ version. We want that #undef qsort_r will still let you
+ invoke the underlying function, but that requires gcc support. */
+#if __GNU_VISIBLE
+_VOID _EXFUN(qsort_r,(_PTR __base, size_t __nmemb, size_t __size, int (*_compar)(const _PTR, const _PTR, _PTR), _PTR __thunk));
+#elif __BSD_VISIBLE
+# ifdef __GNUC__
+_VOID _EXFUN(qsort_r,(_PTR __base, size_t __nmemb, size_t __size, _PTR __thunk, int (*_compar)(_PTR, const _PTR, const _PTR)))
+ __asm__ (__ASMNAME ("__bsd_qsort_r"));
+# else
+_VOID _EXFUN(__bsd_qsort_r,(_PTR __base, size_t __nmemb, size_t __size, _PTR __thunk, int (*_compar)(_PTR, const _PTR, const _PTR)));
+# define qsort_r __bsd_qsort_r
+# endif
+#endif
+
/* On platforms where long double equals double. */
-#ifdef _LDBL_EQ_DBL
-#if !defined(__STRICT_ANSI__) || (__STDC_VERSION__ >= 199901L) || (__cplusplus >= 201103L)
-extern long double strtold (const char *, char **);
+#ifdef _HAVE_LONG_DOUBLE
+extern long double _strtold_r (struct _reent *, const char *__restrict, char **__restrict);
+#if __ISO_C_VISIBLE >= 1999
+extern long double strtold (const char *__restrict, char **__restrict);
#endif
-extern long double wcstold (const wchar_t *, wchar_t **);
-#endif /* _LDBL_EQ_DBL */
+#endif /* _HAVE_LONG_DOUBLE */
+
+/*
+ * If we're in a mode greater than C99, expose C11 functions.
+ */
+#if __ISO_C_VISIBLE >= 2011
+void * aligned_alloc(size_t, size_t) __malloc_like __alloc_align(1)
+ __alloc_size(2);
+int at_quick_exit(void (*)(void));
+_Noreturn void
+ quick_exit(int);
+#endif /* __ISO_C_VISIBLE >= 2011 */
_END_STD_C
diff --git a/newlib/libc/include/string.h b/newlib/libc/include/string.h
index 6325b46bf..56c7fc25b 100644
--- a/newlib/libc/include/string.h
+++ b/newlib/libc/include/string.h
@@ -38,76 +38,115 @@ char *_EXFUN(strpbrk,(const char *, const char *));
char *_EXFUN(strrchr,(const char *, int));
size_t _EXFUN(strspn,(const char *, const char *));
char *_EXFUN(strstr,(const char *, const char *));
-
#ifndef _REENT_ONLY
char *_EXFUN(strtok,(char *__restrict, const char *__restrict));
#endif
-
size_t _EXFUN(strxfrm,(char *__restrict, const char *__restrict, size_t));
-#ifndef __STRICT_ANSI__
+#if __MISC_VISIBLE || __POSIX_VISIBLE
char *_EXFUN(strtok_r,(char *__restrict, const char *__restrict, char **__restrict));
-
+#endif
+#if __BSD_VISIBLE /* POSIX declaration is in <strings.h> */
int _EXFUN(bcmp,(const void *, const void *, size_t));
void _EXFUN(bcopy,(const void *, void *, size_t));
void _EXFUN(bzero,(void *, size_t));
+#endif
+#if __BSD_VISIBLE
+void _EXFUN(explicit_bzero,(void *, size_t));
+int _EXFUN(timingsafe_bcmp,(const void *, const void *, size_t));
+int _EXFUN(timingsafe_memcmp,(const void *, const void *, size_t));
+#endif
+#if __BSD_VISIBLE /* POSIX declaration is in <strings.h> */
int _EXFUN(ffs,(int));
char *_EXFUN(index,(const char *, int));
+#endif
+#if __MISC_VISIBLE || __POSIX_VISIBLE
_PTR _EXFUN(memccpy,(_PTR __restrict, const _PTR __restrict, int, size_t));
+#endif
+#if __GNU_VISIBLE
_PTR _EXFUN(mempcpy,(_PTR, const _PTR, size_t));
_PTR _EXFUN(memmem, (const _PTR, size_t, const _PTR, size_t));
_PTR _EXFUN(memrchr,(const _PTR, int, size_t));
_PTR _EXFUN(rawmemchr,(const _PTR, int));
+#endif
+#if __BSD_VISIBLE /* POSIX declaration is in <strings.h> */
char *_EXFUN(rindex,(const char *, int));
+#endif
+#if __POSIX_VISIBLE >= 200809
char *_EXFUN(stpcpy,(char *__restrict, const char *__restrict));
char *_EXFUN(stpncpy,(char *__restrict, const char *__restrict, size_t));
+#endif
+#if __BSD_VISIBLE /* POSIX declaration is in <strings.h> */
int _EXFUN(strcasecmp,(const char *, const char *));
+#endif
+#if __GNU_VISIBLE
char *_EXFUN(strcasestr,(const char *, const char *));
char *_EXFUN(strchrnul,(const char *, int));
#endif
-#if !defined(__STRICT_ANSI__) || (_XOPEN_SOURCE - 0) >= 500
+#if __MISC_VISIBLE || __POSIX_VISIBLE >= 200809 || __XSI_VISIBLE >= 4
char *_EXFUN(strdup,(const char *));
#endif
-#ifndef __STRICT_ANSI__
char *_EXFUN(_strdup_r,(struct _reent *, const char *));
-#endif
-#if !defined(__STRICT_ANSI__) || (_XOPEN_SOURCE - 0) >= 700
+#if __POSIX_VISIBLE >= 200809
char *_EXFUN(strndup,(const char *, size_t));
#endif
-#ifndef __STRICT_ANSI__
char *_EXFUN(_strndup_r,(struct _reent *, const char *, size_t));
+
+#if __GNU_VISIBLE
+int _EXFUN(ffsl,(long));
+int _EXFUN(ffsll, (long long));
+#endif
+
/* There are two common strerror_r variants. If you request
_GNU_SOURCE, you get the GNU version; otherwise you get the POSIX
version. POSIX requires that #undef strerror_r will still let you
invoke the underlying function, but that requires gcc support. */
-#ifdef _GNU_SOURCE
-char *_EXFUN(strerror_r,(int, char *, size_t));
-#else
+#if __GNU_VISIBLE
+char *_EXFUN(strerror_r,(int, char *, size_t));
+#elif __POSIX_VISIBLE >= 200112
# ifdef __GNUC__
-int _EXFUN(strerror_r,(int, char *, size_t)) __asm__ (__ASMNAME ("__xpg_strerror_r"));
+int _EXFUN(strerror_r,(int, char *, size_t))
+#ifdef __ASMNAME
+ __asm__ (__ASMNAME ("__xpg_strerror_r"))
+#endif
+ ;
# else
-int _EXFUN(__xpg_strerror_r,(int, char *, size_t));
+int _EXFUN(__xpg_strerror_r,(int, char *, size_t));
# define strerror_r __xpg_strerror_r
# endif
#endif
-size_t _EXFUN(strlcat,(char *, const char *, size_t));
-size_t _EXFUN(strlcpy,(char *, const char *, size_t));
-int _EXFUN(strncasecmp,(const char *, const char *, size_t));
+
+/* Reentrant version of strerror. */
+char * _EXFUN(_strerror_r, (struct _reent *, int, int, int *));
+
+#if __BSD_VISIBLE
+size_t _EXFUN(strlcat,(char *, const char *, size_t));
+size_t _EXFUN(strlcpy,(char *, const char *, size_t));
+#endif
+#if __BSD_VISIBLE /* POSIX declaration is in <strings.h> */
+int _EXFUN(strncasecmp,(const char *, const char *, size_t));
+#endif
+#if __POSIX_VISIBLE >= 200809
size_t _EXFUN(strnlen,(const char *, size_t));
+#endif
+#if __BSD_VISIBLE
char *_EXFUN(strsep,(char **, const char *));
+#endif
+
+#if __MISC_VISIBLE
char *_EXFUN(strlwr,(char *));
char *_EXFUN(strupr,(char *));
+#endif
+
#ifndef DEFS_H /* Kludge to work around problem compiling in gdb */
-char *_EXFUN(strsignal, (int __signo));
+char *_EXFUN(strsignal, (int __signo));
#endif
+
#ifdef __CYGWIN__
-int _EXFUN(strtosigno, (const char *__name));
+int _EXFUN(strtosigno, (const char *__name));
#endif
-/* Recursive version of strerror. */
-char * _EXFUN(_strerror_r, (struct _reent *, int, int, int *));
-
-#if defined _GNU_SOURCE && defined __GNUC__
+#if __GNU_VISIBLE && defined(__GNUC__)
#define strdupa(__s) \
(__extension__ ({const char *__in = (__s); \
size_t __len = strlen (__in) + 1; \
@@ -119,23 +158,23 @@ char * _EXFUN(_strerror_r, (struct _reent *, int, int, int *));
char *__out = (char *) __builtin_alloca (__len); \
__out[__len-1] = '\0'; \
(char *) memcpy (__out, __in, __len-1);}))
-#endif /* _GNU_SOURCE && __GNUC__ */
-
-/* These function names are used on Windows and perhaps other systems. */
-#ifndef strcmpi
-#define strcmpi strcasecmp
+#endif /* __GNU_VISIBLE && __GNUC__ */
+
+/* There are two common basename variants. If you do NOT #include <libgen.h>
+ and you do
+
+ #define _GNU_SOURCE
+ #include <string.h>
+
+ you get the GNU version. Otherwise you get the POSIX versionfor which you
+ should #include <libgen.h>i for the function prototype. POSIX requires that
+ #undef basename will still let you invoke the underlying function. However,
+ this also implies that the POSIX version is used in this case. That's made
+ sure here. */
+#if __GNU_VISIBLE && !defined(basename)
+# define basename basename
+char *_EXFUN(__nonnull (1) basename,(const char *)) __asm__(__ASMNAME("__gnu_basename"));
#endif
-#ifndef stricmp
-#define stricmp strcasecmp
-#endif
-#ifndef strncmpi
-#define strncmpi strncasecmp
-#endif
-#ifndef strnicmp
-#define strnicmp strncasecmp
-#endif
-
-#endif /* ! __STRICT_ANSI__ */
#include <sys/string.h>
diff --git a/newlib/libc/include/strings.h b/newlib/libc/include/strings.h
index 131d81d20..e467467ac 100644
--- a/newlib/libc/include/strings.h
+++ b/newlib/libc/include/strings.h
@@ -7,14 +7,17 @@
#ifndef _STRINGS_H_
#define _STRINGS_H_
+/* These functions are already declared in <string.h> with __BSD_VISIBLE */
+#if !(defined(_STRING_H_) && __BSD_VISIBLE)
+
#include "_ansi.h"
#include <sys/reent.h>
-
+#include <sys/cdefs.h>
#include <sys/types.h> /* for size_t */
_BEGIN_STD_C
-#if !defined __STRICT_ANSI__ && _POSIX_VERSION < 200809L
+#if __BSD_VISIBLE || (__POSIX_VISIBLE && __POSIX_VISIBLE < 200809)
/*
* Marked LEGACY in Open Group Base Specifications Issue 6/IEEE Std 1003.1-2004
* Removed from Open Group Base Specifications Issue 7/IEEE Std 1003.1-2008
@@ -24,7 +27,7 @@ void _EXFUN(bcopy,(const void *, void *, size_t));
void _EXFUN(bzero,(void *, size_t));
char *_EXFUN(index,(const char *, int));
char *_EXFUN(rindex,(const char *, int));
-#endif /* ! __STRICT_ANSI__ */
+#endif /* __BSD_VISIBLE || (__POSIX_VISIBLE && __POSIX_VISIBLE < 200809) */
int _EXFUN(ffs,(int));
int _EXFUN(strcasecmp,(const char *, const char *));
@@ -32,4 +35,6 @@ int _EXFUN(strncasecmp,(const char *, const char *, size_t));
_END_STD_C
+#endif /* !(_STRING_H_ && __BSD_VISIBLE) */
+
#endif /* _STRINGS_H_ */
diff --git a/newlib/libc/include/sys/_default_fcntl.h b/newlib/libc/include/sys/_default_fcntl.h
index 1884136cd..ede90c4bc 100644
--- a/newlib/libc/include/sys/_default_fcntl.h
+++ b/newlib/libc/include/sys/_default_fcntl.h
@@ -5,6 +5,7 @@ extern "C" {
#endif
#define _SYS__DEFAULT_FCNTL_H_
#include <_ansi.h>
+#include <sys/cdefs.h>
#define _FOPEN (-1) /* from sys/file.h, kernel use only */
#define _FREAD 0x0001 /* read enabled */
#define _FWRITE 0x0002 /* write enabled */
@@ -43,32 +44,28 @@ extern "C" {
#define O_NONBLOCK _FNONBLOCK
#define O_NOCTTY _FNOCTTY
/* For machines which care - */
-#if defined (_WIN32) || defined (__CYGWIN__)
+#if defined (__CYGWIN__)
#define _FBINARY 0x10000
#define _FTEXT 0x20000
#define _FNOINHERIT 0x40000
+#define _FDIRECT 0x80000
+#define _FNOFOLLOW 0x100000
+#define _FDIRECTORY 0x200000
+#define _FEXECSRCH 0x400000
#define O_BINARY _FBINARY
#define O_TEXT _FTEXT
-#define O_NOINHERIT _FNOINHERIT
-/* O_CLOEXEC is the Linux equivalent to O_NOINHERIT */
#define O_CLOEXEC _FNOINHERIT
-
-/* The windows header files define versions with a leading underscore. */
-#define _O_RDONLY O_RDONLY
-#define _O_WRONLY O_WRONLY
-#define _O_RDWR O_RDWR
-#define _O_APPEND O_APPEND
-#define _O_CREAT O_CREAT
-#define _O_TRUNC O_TRUNC
-#define _O_EXCL O_EXCL
-#define _O_TEXT O_TEXT
-#define _O_BINARY O_BINARY
-#define _O_RAW O_BINARY
-#define _O_NOINHERIT O_NOINHERIT
+#define O_DIRECT _FDIRECT
+#define O_NOFOLLOW _FNOFOLLOW
+#define O_DSYNC _FSYNC
+#define O_RSYNC _FSYNC
+#define O_DIRECTORY _FDIRECTORY
+#define O_EXEC _FEXECSRCH
+#define O_SEARCH _FEXECSRCH
#endif
-#ifndef _POSIX_SOURCE
+#if __MISC_VISIBLE
/*
* Flags that work for fcntl(fd, F_SETFL, FXXXX)
@@ -100,7 +97,11 @@ extern "C" {
#define FEXCL _FEXCL
#define FNOCTTY _FNOCTTY
-#endif /* !_POSIX_SOURCE */
+#endif /* __MISC_VISIBLE */
+
+#if __BSD_VISIBLE
+#define FNONBLOCK _FNONBLOCK
+#endif /* __BSD_VISIBLE */
/* XXX close on exec request; must match UF_EXCLOSE in user.h */
#define FD_CLOEXEC 1 /* posix */
@@ -111,20 +112,20 @@ extern "C" {
#define F_SETFD 2 /* Set fildes flags (close on exec) */
#define F_GETFL 3 /* Get file flags */
#define F_SETFL 4 /* Set file flags */
-#ifndef _POSIX_SOURCE
+#if __BSD_VISIBLE || __POSIX_VISIBLE >= 200112
#define F_GETOWN 5 /* Get owner - for ASYNC */
#define F_SETOWN 6 /* Set owner - for ASYNC */
-#endif /* !_POSIX_SOURCE */
+#endif /* __BSD_VISIBLE || __POSIX_VISIBLE >= 200112 */
#define F_GETLK 7 /* Get record-locking information */
#define F_SETLK 8 /* Set or Clear a record-lock (Non-Blocking) */
#define F_SETLKW 9 /* Set or Clear a record-lock (Blocking) */
-#ifndef _POSIX_SOURCE
+#if __MISC_VISIBLE
#define F_RGETLK 10 /* Test a remote lock to see if it is blocked */
#define F_RSETLK 11 /* Set or unlock a remote lock */
#define F_CNVT 12 /* Convert a fhandle to an open fd */
#define F_RSETLKW 13 /* Set or Clear remote record-lock(Blocking) */
-#endif /* !_POSIX_SOURCE */
-#ifdef __CYGWIN__
+#endif /* __MISC_VISIBLE */
+#if __POSIX_VISIBLE >= 200809
#define F_DUPFD_CLOEXEC 14 /* As F_DUPFD, but set close-on-exec flag */
#endif
@@ -132,11 +133,11 @@ extern "C" {
#define F_RDLCK 1 /* read lock */
#define F_WRLCK 2 /* write lock */
#define F_UNLCK 3 /* remove lock(s) */
-#ifndef _POSIX_SOURCE
+#if __MISC_VISIBLE
#define F_UNLKSYS 4 /* remove remote locks for a given system */
-#endif /* !_POSIX_SOURCE */
+#endif /* __MISC_VISIBLE */
-#ifdef __CYGWIN__
+#if __BSD_VISIBLE || __POSIX_VISIBLE >= 200809
/* Special descriptor value to denote the cwd in calls to openat(2) etc. */
#define AT_FDCWD -2
@@ -147,6 +148,14 @@ extern "C" {
#define AT_REMOVEDIR 8
#endif
+#if __BSD_VISIBLE
+/* lock operations for flock(2) */
+#define LOCK_SH 0x01 /* shared file lock */
+#define LOCK_EX 0x02 /* exclusive file lock */
+#define LOCK_NB 0x04 /* don't block when locking */
+#define LOCK_UN 0x08 /* unlock file */
+#endif
+
/*#include <sys/stdtypes.h>*/
#ifndef __CYGWIN__
@@ -161,7 +170,7 @@ struct flock {
};
#endif /* __CYGWIN__ */
-#ifndef _POSIX_SOURCE
+#if __MISC_VISIBLE
/* extended file segment locking set data type */
struct eflock {
short l_type; /* F_RDLCK, F_WRLCK, or F_UNLCK */
@@ -173,19 +182,23 @@ struct eflock {
long l_rpid; /* Remote process id wanting this lock */
long l_rsys; /* Remote system id wanting this lock */
};
-#endif /* !_POSIX_SOURCE */
-
+#endif /* __MISC_VISIBLE */
#include <sys/types.h>
#include <sys/stat.h> /* sigh. for the mode bits for open/creat */
extern int open _PARAMS ((const char *, int, ...));
+#if __ATFILE_VISIBLE
+extern int openat _PARAMS ((int, const char *, int, ...));
+#endif
extern int creat _PARAMS ((const char *, mode_t));
extern int fcntl _PARAMS ((int, int, ...));
-#ifdef __CYGWIN__
+#if __BSD_VISIBLE
+extern int flock _PARAMS ((int, int));
+#endif
+#if __GNU_VISIBLE
#include <sys/time.h>
extern int futimesat _PARAMS ((int, const char *, const struct timeval *));
-extern int openat _PARAMS ((int, const char *, int, ...));
#endif
/* Provide _<systemcall> prototypes for functions provided by some versions
diff --git a/newlib/libc/include/sys/_intsup.h b/newlib/libc/include/sys/_intsup.h
new file mode 100644
index 000000000..b979d5c4d
--- /dev/null
+++ b/newlib/libc/include/sys/_intsup.h
@@ -0,0 +1,209 @@
+/*
+ * Copyright (c) 2004, 2005 by
+ * Ralf Corsepius, Ulm/Germany. All rights reserved.
+ *
+ * Permission to use, copy, modify, and distribute this software
+ * is freely granted, provided that this notice is preserved.
+ */
+
+#ifndef _SYS__INTSUP_H
+#define _SYS__INTSUP_H
+
+#include <sys/features.h>
+
+#if __GNUC_PREREQ (3, 2)
+/* gcc > 3.2 implicitly defines the values we are interested */
+#define __STDINT_EXP(x) __##x##__
+#else
+#define __STDINT_EXP(x) x
+#include <limits.h>
+#endif
+
+/* Check if "long long" is 64bit wide */
+/* Modern GCCs provide __LONG_LONG_MAX__, SUSv3 wants LLONG_MAX */
+#if ( defined(__LONG_LONG_MAX__) && (__LONG_LONG_MAX__ > 0x7fffffff) ) \
+ || ( defined(LLONG_MAX) && (LLONG_MAX > 0x7fffffff) )
+#define __have_longlong64 1
+#endif
+
+/* Check if "long" is 64bit or 32bit wide */
+#if __STDINT_EXP(LONG_MAX) > 0x7fffffff
+#define __have_long64 1
+#elif __STDINT_EXP(LONG_MAX) == 0x7fffffff && !defined(__SPU__)
+#define __have_long32 1
+#endif
+
+/* Determine how intptr_t and intN_t fastN_t and leastN_t are defined by gcc
+ for this target. This is used to determine the correct printf() constant in
+ inttypes.h and other constants in stdint.h.
+ So we end up with
+ ?(signed|unsigned) char == 0
+ ?(signed|unsigned) short == 1
+ ?(signed|unsigned) int == 2
+ ?(signed|unsigned) short int == 3
+ ?(signed|unsigned) long == 4
+ ?(signed|unsigned) long int == 6
+ ?(signed|unsigned) long long == 8
+ ?(signed|unsigned) long long int == 10
+ */
+#pragma push_macro("signed")
+#pragma push_macro("unsigned")
+#pragma push_macro("char")
+#pragma push_macro("short")
+#pragma push_macro("__int20")
+#pragma push_macro("int")
+#pragma push_macro("long")
+#undef signed
+#undef unsigned
+#undef char
+#undef short
+#undef int
+#undef __int20
+#undef long
+#define signed +0
+#define unsigned +0
+#define char +0
+#define short +1
+#define __int20 +2
+#define int +2
+#define long +4
+#if (__INTPTR_TYPE__ == 8 || __INTPTR_TYPE__ == 10)
+#define _INTPTR_EQ_LONGLONG
+#elif (__INTPTR_TYPE__ == 4 || __INTPTR_TYPE__ == 6)
+#define _INTPTR_EQ_LONG
+/* Note - the tests for _INTPTR_EQ_INT and _INTPTR_EQ_SHORT are currently
+ redundant as the values are not used. But one day they may be needed
+ and so the tests remain. */
+#elif __INTPTR_TYPE__ == 2
+#define _INTPTR_EQ_INT
+#elif (__INTPTR_TYPE__ == 1 || __INTPTR_TYPE__ == 3)
+#define _INTPTR_EQ_SHORT
+#else
+#error "Unable to determine type definition of intptr_t"
+#endif
+#if (__INT32_TYPE__ == 4 || __INT32_TYPE__ == 6)
+#define _INT32_EQ_LONG
+#elif __INT32_TYPE__ == 2
+/* Nothing to define because int32_t is safe to print as an int. */
+#else
+#error "Unable to determine type definition of int32_t"
+#endif
+
+#if (__INT8_TYPE__ == 0)
+#define __INT8 "hh"
+#elif (__INT8_TYPE__ == 1 || __INT8_TYPE__ == 3)
+#define __INT8 "h"
+#elif (__INT8_TYPE__ == 2)
+#define __INT8
+#elif (__INT8_TYPE__ == 4 || __INT8_TYPE__ == 6)
+#define __INT8 "l"
+#elif (__INT8_TYPE__ == 8 || __INT8_TYPE__ == 10)
+#define __INT8 "ll"
+#endif
+#if (__INT16_TYPE__ == 1 || __INT16_TYPE__ == 3)
+#define __INT16 "h"
+#elif (__INT16_TYPE__ == 2)
+#define __INT16
+#elif (__INT16_TYPE__ == 4 || __INT16_TYPE__ == 6)
+#define __INT16 "l"
+#elif (__INT16_TYPE__ == 8 || __INT16_TYPE__ == 10)
+#define __INT16 "ll"
+#endif
+#if (__INT32_TYPE__ == 2)
+#define __INT32
+#elif (__INT32_TYPE__ == 4 || __INT32_TYPE__ == 6)
+#define __INT32 "l"
+#elif (__INT32_TYPE__ == 8 || __INT32_TYPE__ == 10)
+#define __INT32 "ll"
+#endif
+#if (__INT64_TYPE__ == 2)
+#define __INT64
+#elif (__INT64_TYPE__ == 4 || __INT64_TYPE__ == 6)
+#define __INT64 "l"
+#elif (__INT64_TYPE__ == 8 || __INT64_TYPE__ == 10)
+#define __INT64 "ll"
+#endif
+#if (__INT_FAST8_TYPE__ == 0)
+#define __FAST8 "hh"
+#elif (__INT_FAST8_TYPE__ == 1 || __INT_FAST8_TYPE__ == 3)
+#define __FAST8 "h"
+#elif (__INT_FAST8_TYPE__ == 2)
+#define __FAST8
+#elif (__INT_FAST8_TYPE__ == 4 || __INT_FAST8_TYPE__ == 6)
+#define __FAST8 "l"
+#elif (__INT_FAST8_TYPE__ == 8 || __INT_FAST8_TYPE__ == 10)
+#define __FAST8 "ll"
+#endif
+#if (__INT_FAST16_TYPE__ == 1 || __INT_FAST16_TYPE__ == 3)
+#define __FAST16 "h"
+#elif (__INT_FAST16_TYPE__ == 2)
+#define __FAST16
+#elif (__INT_FAST16_TYPE__ == 4 || __INT_FAST16_TYPE__ == 6)
+#define __FAST16 "l"
+#elif (__INT_FAST16_TYPE__ == 8 || __INT_FAST16_TYPE__ == 10)
+#define __FAST16 "ll"
+#endif
+#if (__INT_FAST32_TYPE__ == 2)
+#define __FAST32
+#elif (__INT_FAST32_TYPE__ == 4 || __INT_FAST32_TYPE__ == 6)
+#define __FAST32 "l"
+#elif (__INT_FAST32_TYPE__ == 8 || __INT_FAST32_TYPE__ == 10)
+#define __FAST32 "ll"
+#endif
+#if (__INT_FAST64_TYPE__ == 2)
+#define __FAST64
+#elif (__INT_FAST64_TYPE__ == 4 || __INT_FAST64_TYPE__ == 6)
+#define __FAST64 "l"
+#elif (__INT_FAST64_TYPE__ == 8 || __INT_FAST64_TYPE__ == 10)
+#define __FAST64 "ll"
+#endif
+
+#if (__INT_LEAST8_TYPE__ == 0)
+#define __LEAST8 "hh"
+#elif (__INT_LEAST8_TYPE__ == 1 || __INT_LEAST8_TYPE__ == 3)
+#define __LEAST8 "h"
+#elif (__INT_LEAST8_TYPE__ == 2)
+#define __LEAST8
+#elif (__INT_LEAST8_TYPE__ == 4 || __INT_LEAST8_TYPE__ == 6)
+#define __LEAST8 "l"
+#elif (__INT_LEAST8_TYPE__ == 8 || __INT_LEAST8_TYPE__ == 10)
+#define __LEAST8 "ll"
+#endif
+#if (__INT_LEAST16_TYPE__ == 1 || __INT_LEAST16_TYPE__ == 3)
+#define __LEAST16 "h"
+#elif (__INT_LEAST16_TYPE__ == 2)
+#define __LEAST16
+#elif (__INT_LEAST16_TYPE__ == 4 || __INT_LEAST16_TYPE__ == 6)
+#define __LEAST16 "l"
+#elif (__INT_LEAST16_TYPE__ == 8 || __INT_LEAST16_TYPE__ == 10)
+#define __LEAST16 "ll"
+#endif
+#if (__INT_LEAST32_TYPE__ == 2)
+#define __LEAST32
+#elif (__INT_LEAST32_TYPE__ == 4 || __INT_LEAST32_TYPE__ == 6)
+#define __LEAST32 "l"
+#elif (__INT_LEAST32_TYPE__ == 8 || __INT_LEAST32_TYPE__ == 10)
+#define __LEAST32 "ll"
+#endif
+#if (__INT_LEAST64_TYPE__ == 2)
+#define __LEAST64
+#elif (__INT_LEAST64_TYPE__ == 4 || __INT_LEAST64_TYPE__ == 6)
+#define __LEAST64 "l"
+#elif (__INT_LEAST64_TYPE__ == 8 || __INT_LEAST64_TYPE__ == 10)
+#define __LEAST64 "ll"
+#endif
+#undef signed
+#undef unsigned
+#undef char
+#undef short
+#undef int
+#undef long
+#pragma pop_macro("signed")
+#pragma pop_macro("unsigned")
+#pragma pop_macro("char")
+#pragma pop_macro("short")
+#pragma pop_macro("__int20")
+#pragma pop_macro("int")
+#pragma pop_macro("long")
+
+#endif /* _SYS__INTSUP_H */
diff --git a/newlib/libc/include/sys/_sigset.h b/newlib/libc/include/sys/_sigset.h
new file mode 100644
index 000000000..a9c0d2d4e
--- /dev/null
+++ b/newlib/libc/include/sys/_sigset.h
@@ -0,0 +1,43 @@
+/*-
+ * Copyright (c) 1982, 1986, 1989, 1991, 1993
+ * The Regents of the University of California. All rights reserved.
+ * (c) UNIX System Laboratories, Inc.
+ * All or some portions of this file are derived from material licensed
+ * to the University of California by American Telephone and Telegraph
+ * Co. or Unix System Laboratories, Inc. and are reproduced herein with
+ * the permission of UNIX System Laboratories, Inc.
+ *
+ * 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.
+ * 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.
+ *
+ * @(#)signal.h 8.4 (Berkeley) 5/4/95
+ * $FreeBSD$
+ */
+
+#ifndef _SYS__SIGSET_H_
+#define _SYS__SIGSET_H_
+
+typedef unsigned long __sigset_t;
+
+#endif /* !_SYS__SIGSET_H_ */
diff --git a/newlib/libc/include/sys/_stdint.h b/newlib/libc/include/sys/_stdint.h
new file mode 100644
index 000000000..a7fe1e4f5
--- /dev/null
+++ b/newlib/libc/include/sys/_stdint.h
@@ -0,0 +1,80 @@
+/*
+ * Copyright (c) 2004, 2005 by
+ * Ralf Corsepius, Ulm/Germany. All rights reserved.
+ *
+ * Permission to use, copy, modify, and distribute this software
+ * is freely granted, provided that this notice is preserved.
+ */
+
+#ifndef _SYS__STDINT_H
+#define _SYS__STDINT_H
+
+#include <machine/_default_types.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#ifdef ___int8_t_defined
+#ifndef _INT8_T_DECLARED
+typedef __int8_t int8_t ;
+#define _INT8_T_DECLARED
+#endif
+#ifndef _UINT8_T_DECLARED
+typedef __uint8_t uint8_t ;
+#define _UINT8_T_DECLARED
+#endif
+#define __int8_t_defined 1
+#endif /* ___int8_t_defined */
+
+#ifdef ___int16_t_defined
+#ifndef _INT16_T_DECLARED
+typedef __int16_t int16_t ;
+#define _INT16_T_DECLARED
+#endif
+#ifndef _UINT16_T_DECLARED
+typedef __uint16_t uint16_t ;
+#define _UINT16_T_DECLARED
+#endif
+#define __int16_t_defined 1
+#endif /* ___int16_t_defined */
+
+#ifdef ___int32_t_defined
+#ifndef _INT32_T_DECLARED
+typedef __int32_t int32_t ;
+#define _INT32_T_DECLARED
+#endif
+#ifndef _UINT32_T_DECLARED
+typedef __uint32_t uint32_t ;
+#define _UINT32_T_DECLARED
+#endif
+#define __int32_t_defined 1
+#endif /* ___int32_t_defined */
+
+#ifdef ___int64_t_defined
+#ifndef _INT64_T_DECLARED
+typedef __int64_t int64_t ;
+#define _INT64_T_DECLARED
+#endif
+#ifndef _UINT64_T_DECLARED
+typedef __uint64_t uint64_t ;
+#define _UINT64_T_DECLARED
+#endif
+#define __int64_t_defined 1
+#endif /* ___int64_t_defined */
+
+#ifndef INTPTR_T_DECLARED
+typedef __intptr_t intptr_t;
+#define _INTPTR_T_DECLARED
+#endif
+
+#ifndef _UINTPTR_T_DECLARED
+typedef __uintptr_t uintptr_t;
+#define _UINTPTR_T_DECLARED
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _SYS__STDINT_H */
diff --git a/newlib/libc/include/sys/_timespec.h b/newlib/libc/include/sys/_timespec.h
new file mode 100644
index 000000000..7609e4a46
--- /dev/null
+++ b/newlib/libc/include/sys/_timespec.h
@@ -0,0 +1,50 @@
+/*-
+ * Copyright (c) 1982, 1986, 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.
+ * 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.
+ *
+ * @(#)time.h 8.5 (Berkeley) 5/4/95
+ * from: FreeBSD: src/sys/sys/time.h,v 1.43 2000/03/20 14:09:05 phk Exp
+ * $FreeBSD$
+ */
+
+#ifndef _SYS__TIMESPEC_H_
+#define _SYS__TIMESPEC_H_
+
+#include <sys/_types.h>
+
+#if !defined(__time_t_defined) && !defined(_TIME_T_DECLARED)
+typedef _TIME_T_ time_t;
+#define __time_t_defined
+#define _TIME_T_DECLARED
+#endif
+
+struct timespec {
+ time_t tv_sec; /* seconds */
+ long tv_nsec; /* and nanoseconds */
+};
+
+#endif /* !_SYS__TIMESPEC_H_ */
diff --git a/newlib/libc/include/sys/_timeval.h b/newlib/libc/include/sys/_timeval.h
new file mode 100644
index 000000000..676a0b894
--- /dev/null
+++ b/newlib/libc/include/sys/_timeval.h
@@ -0,0 +1,89 @@
+/*-
+ * Copyright (c) 2002 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.
+ *
+ * $FreeBSD$
+ */
+
+#ifndef _SYS__TIMEVAL_H_
+#define _SYS__TIMEVAL_H_
+
+#include <sys/_types.h>
+
+#ifndef _SUSECONDS_T_DECLARED
+typedef __suseconds_t suseconds_t;
+#define _SUSECONDS_T_DECLARED
+#endif
+
+#if !defined(__time_t_defined) && !defined(_TIME_T_DECLARED)
+typedef _TIME_T_ time_t;
+#define __time_t_defined
+#define _TIME_T_DECLARED
+#endif
+
+/* This define is also used outside of Newlib, e.g. in MinGW-w64 */
+#ifndef _TIMEVAL_DEFINED
+#define _TIMEVAL_DEFINED
+
+/*
+ * Structure returned by gettimeofday(2) system call, and used in other calls.
+ */
+struct timeval {
+ time_t tv_sec; /* seconds */
+ suseconds_t tv_usec; /* and microseconds */
+};
+
+#if __BSD_VISIBLE
+#ifndef _KERNEL /* NetBSD/OpenBSD compatible interfaces */
+
+#define timerclear(tvp) ((tvp)->tv_sec = (tvp)->tv_usec = 0)
+#define timerisset(tvp) ((tvp)->tv_sec || (tvp)->tv_usec)
+#define timercmp(tvp, uvp, cmp) \
+ (((tvp)->tv_sec == (uvp)->tv_sec) ? \
+ ((tvp)->tv_usec cmp (uvp)->tv_usec) : \
+ ((tvp)->tv_sec cmp (uvp)->tv_sec))
+#define timeradd(tvp, uvp, vvp) \
+ do { \
+ (vvp)->tv_sec = (tvp)->tv_sec + (uvp)->tv_sec; \
+ (vvp)->tv_usec = (tvp)->tv_usec + (uvp)->tv_usec; \
+ if ((vvp)->tv_usec >= 1000000) { \
+ (vvp)->tv_sec++; \
+ (vvp)->tv_usec -= 1000000; \
+ } \
+ } while (0)
+#define timersub(tvp, uvp, vvp) \
+ do { \
+ (vvp)->tv_sec = (tvp)->tv_sec - (uvp)->tv_sec; \
+ (vvp)->tv_usec = (tvp)->tv_usec - (uvp)->tv_usec; \
+ if ((vvp)->tv_usec < 0) { \
+ (vvp)->tv_sec--; \
+ (vvp)->tv_usec += 1000000; \
+ } \
+ } while (0)
+#endif
+#endif /* __BSD_VISIBLE */
+
+#endif /* _TIMEVAL_DEFINED */
+
+#endif /* !_SYS__TIMEVAL_H_ */
diff --git a/newlib/libc/include/sys/_types.h b/newlib/libc/include/sys/_types.h
index e8ac429e7..4bf2bc460 100644
--- a/newlib/libc/include/sys/_types.h
+++ b/newlib/libc/include/sys/_types.h
@@ -2,56 +2,141 @@
/* This file defines various typedefs needed by the system calls that support
the C library. Basically, they're just the POSIX versions with an '_'
- prepended. This file lives in the `sys' directory so targets can provide
- their own if desired (or they can put target dependant conditionals here).
+ prepended. Targets shall use <machine/_types.h> to define their own
+ internal types if desired.
+
+ There are three define patterns used for type definitions. Lets assume
+ xyz_t is a user type.
+
+ The internal type definition uses __machine_xyz_t_defined. It is defined by
+ <machine/_types.h> to disable a default definition in <sys/_types.h>. It
+ must not be used in other files.
+
+ User type definitions are guarded by __xyz_t_defined in glibc and
+ _XYZ_T_DECLARED in BSD compatible systems.
*/
#ifndef _SYS__TYPES_H
#define _SYS__TYPES_H
+#include <newlib.h>
+#include <sys/config.h>
#include <machine/_types.h>
#include <sys/lock.h>
-#ifndef __off_t_defined
+#ifndef __machine_blkcnt_t_defined
+typedef long __blkcnt_t;
+#endif
+
+#ifndef __machine_blksize_t_defined
+typedef long __blksize_t;
+#endif
+
+#ifndef __machine_fsblkcnt_t_defined
+typedef __uint64_t __fsblkcnt_t;
+#endif
+
+#ifndef __machine_fsfilcnt_t_defined
+typedef __uint32_t __fsfilcnt_t;
+#endif
+
+#ifndef __machine_off_t_defined
typedef long _off_t;
#endif
-#if defined(__rtems__)
-/* device numbers are 32-bit major and and 32-bit minor */
-typedef unsigned long long __dev_t;
+#if defined(__XMK__)
+typedef signed char __pid_t;
#else
-#ifndef __dev_t_defined
-typedef short __dev_t;
+typedef int __pid_t;
#endif
+
+#ifndef __machine_dev_t_defined
+typedef short __dev_t;
#endif
-#ifndef __uid_t_defined
+#ifndef __machine_uid_t_defined
typedef unsigned short __uid_t;
#endif
-#ifndef __gid_t_defined
+#ifndef __machine_gid_t_defined
typedef unsigned short __gid_t;
#endif
-#ifndef __off64_t_defined
+#ifndef __machine_id_t_defined
+typedef __uint32_t __id_t;
+#endif
+
+#ifndef __machine_ino_t_defined
+#if (defined(__i386__) && (defined(GO32) || defined(__MSDOS__))) || \
+ defined(__sparc__) || defined(__SPU__)
+typedef unsigned long __ino_t;
+#else
+typedef unsigned short __ino_t;
+#endif
+#endif
+
+#ifndef __machine_mode_t_defined
+#if defined(__i386__) && (defined(GO32) || defined(__MSDOS__))
+typedef int __mode_t;
+#else
+#if defined(__sparc__) && !defined(__sparc_v9__)
+#ifdef __svr4__
+typedef unsigned long __mode_t;
+#else
+typedef unsigned short __mode_t;
+#endif
+#else
+typedef __uint32_t __mode_t;
+#endif
+#endif
+#endif
+
+#ifndef __machine_off64_t_defined
__extension__ typedef long long _off64_t;
#endif
+#ifdef __CYGWIN__
+typedef _off64_t __off_t;
+#else
+typedef _off_t __off_t;
+#endif
+
+typedef _off64_t __loff_t;
+
+#ifndef __machine_key_t_defined
+typedef long __key_t;
+#endif
+
/*
* We need fpos_t for the following, but it doesn't have a leading "_",
* so we use _fpos_t instead.
*/
-#ifndef __fpos_t_defined
+#ifndef __machine_fpos_t_defined
typedef long _fpos_t; /* XXX must match off_t in <sys/types.h> */
/* (and must be `long' for now) */
#endif
#ifdef __LARGE64_FILES
-#ifndef __fpos64_t_defined
+#ifndef __machine_fpos64_t_defined
typedef _off64_t _fpos64_t;
#endif
#endif
-#ifndef __ssize_t_defined
+/* Defined by GCC provided <stddef.h> */
+#undef __size_t
+
+#ifndef __machine_size_t_defined
+#ifdef __SIZE_TYPE__
+typedef __SIZE_TYPE__ __size_t;
+#else
+#if defined(__INT_MAX__) && __INT_MAX__ == 2147483647
+typedef unsigned int __size_t;
+#else
+typedef unsigned long __size_t;
+#endif
+#endif
+#endif
+
+#ifndef __machine_ssize_t_defined
#ifdef __SIZE_TYPE__
/* If __SIZE_TYPE__ is defined (gcc) we define ssize_t based on size_t.
We simply change "unsigned" to "signed" for this single definition
@@ -68,10 +153,12 @@ typedef long _ssize_t;
#endif
#endif
+typedef _ssize_t __ssize_t;
+
#define __need_wint_t
#include <stddef.h>
-#ifndef __mbstate_t_defined
+#ifndef __machine_mbstate_t_defined
/* Conversion state information. */
typedef struct
{
@@ -84,13 +171,43 @@ typedef struct
} _mbstate_t;
#endif
-#ifndef __flock_t_defined
+#ifndef __machine_flock_t_defined
typedef _LOCK_RECURSIVE_T _flock_t;
#endif
-#ifndef __iconv_t_defined
+#ifndef __machine_iconv_t_defined
/* Iconv descriptor type */
typedef void *_iconv_t;
#endif
+#define _CLOCK_T_ unsigned long /* clock() */
+typedef _CLOCK_T_ __clock_t;
+
+#define _TIME_T_ long /* time() */
+typedef _TIME_T_ __time_t;
+
+#define _CLOCKID_T_ unsigned long
+typedef _CLOCKID_T_ __clockid_t;
+
+#define _TIMER_T_ unsigned long
+typedef _TIMER_T_ __timer_t;
+
+#ifndef __machine_sa_family_t_defined
+typedef __uint8_t __sa_family_t;
+#endif
+
+#ifndef __machine_socklen_t_defined
+typedef __uint32_t __socklen_t;
+#endif
+
+typedef unsigned short __nlink_t;
+typedef long __suseconds_t; /* microseconds (signed) */
+typedef unsigned long __useconds_t; /* microseconds (unsigned) */
+
+#ifdef __GNUCLIKE_BUILTIN_VARARGS
+typedef __builtin_va_list __va_list;
+#else
+typedef char * __va_list;
+#endif /* __GNUCLIKE_BUILTIN_VARARGS */
+
#endif /* _SYS__TYPES_H */
diff --git a/newlib/libc/include/sys/cdefs.h b/newlib/libc/include/sys/cdefs.h
index 0aeb3ddd3..2a55a92e9 100644
--- a/newlib/libc/include/sys/cdefs.h
+++ b/newlib/libc/include/sys/cdefs.h
@@ -40,9 +40,9 @@
#ifndef _SYS_CDEFS_H_
#define _SYS_CDEFS_H_
+#include <machine/_default_types.h>
#include <sys/features.h>
#include <stddef.h>
-#include <stdint.h>
#define __PMT(args) args
#define __DOTS , ...
@@ -66,6 +66,25 @@
# define __ptrvalue /* nothing */
#endif
+/*
+ * Testing against Clang-specific extensions.
+ */
+#ifndef __has_attribute
+#define __has_attribute(x) 0
+#endif
+#ifndef __has_extension
+#define __has_extension __has_feature
+#endif
+#ifndef __has_feature
+#define __has_feature(x) 0
+#endif
+#ifndef __has_include
+#define __has_include(x) 0
+#endif
+#ifndef __has_builtin
+#define __has_builtin(x) 0
+#endif
+
#if defined(__cplusplus)
#define __BEGIN_DECLS extern "C" {
#define __END_DECLS }
@@ -83,33 +102,33 @@
#if defined(__GNUC__) || defined(__INTEL_COMPILER)
#if __GNUC__ >= 3 || defined(__INTEL_COMPILER)
-#define __GNUCLIKE_ASM 3
-#define __GNUCLIKE_MATH_BUILTIN_CONSTANTS
+#define __GNUCLIKE_ASM 3
+#define __GNUCLIKE_MATH_BUILTIN_CONSTANTS
#else
-#define __GNUCLIKE_ASM 2
+#define __GNUCLIKE_ASM 2
#endif
-#define __GNUCLIKE___TYPEOF 1
-#define __GNUCLIKE___OFFSETOF 1
-#define __GNUCLIKE___SECTION 1
+#define __GNUCLIKE___TYPEOF 1
+#define __GNUCLIKE___OFFSETOF 1
+#define __GNUCLIKE___SECTION 1
#ifndef __INTEL_COMPILER
-# define __GNUCLIKE_CTOR_SECTION_HANDLING 1
+#define __GNUCLIKE_CTOR_SECTION_HANDLING 1
#endif
-#define __GNUCLIKE_BUILTIN_CONSTANT_P 1
-# if defined(__INTEL_COMPILER) && defined(__cplusplus) \
- && __INTEL_COMPILER < 800
-# undef __GNUCLIKE_BUILTIN_CONSTANT_P
-# endif
+#define __GNUCLIKE_BUILTIN_CONSTANT_P 1
+#if defined(__INTEL_COMPILER) && defined(__cplusplus) && \
+ __INTEL_COMPILER < 800
+#undef __GNUCLIKE_BUILTIN_CONSTANT_P
+#endif
-#if (__GNUC_MINOR__ > 95 || __GNUC__ >= 3) && !defined(__INTEL_COMPILER)
-# define __GNUCLIKE_BUILTIN_VARARGS 1
-# define __GNUCLIKE_BUILTIN_STDARG 1
-# define __GNUCLIKE_BUILTIN_VAALIST 1
+#if (__GNUC_MINOR__ > 95 || __GNUC__ >= 3)
+#define __GNUCLIKE_BUILTIN_VARARGS 1
+#define __GNUCLIKE_BUILTIN_STDARG 1
+#define __GNUCLIKE_BUILTIN_VAALIST 1
#endif
#if defined(__GNUC__)
-# define __GNUC_VA_LIST_COMPATIBILITY 1
+#define __GNUC_VA_LIST_COMPATIBILITY 1
#endif
/*
@@ -120,23 +139,23 @@
#endif
#ifndef __INTEL_COMPILER
-# define __GNUCLIKE_BUILTIN_NEXT_ARG 1
-# define __GNUCLIKE_MATH_BUILTIN_RELOPS
+#define __GNUCLIKE_BUILTIN_NEXT_ARG 1
+#define __GNUCLIKE_MATH_BUILTIN_RELOPS
#endif
-#define __GNUCLIKE_BUILTIN_MEMCPY 1
+#define __GNUCLIKE_BUILTIN_MEMCPY 1
/* XXX: if __GNUC__ >= 2: not tested everywhere originally, where replaced */
-#define __CC_SUPPORTS_INLINE 1
-#define __CC_SUPPORTS___INLINE 1
-#define __CC_SUPPORTS___INLINE__ 1
+#define __CC_SUPPORTS_INLINE 1
+#define __CC_SUPPORTS___INLINE 1
+#define __CC_SUPPORTS___INLINE__ 1
-#define __CC_SUPPORTS___FUNC__ 1
-#define __CC_SUPPORTS_WARNING 1
+#define __CC_SUPPORTS___FUNC__ 1
+#define __CC_SUPPORTS_WARNING 1
-#define __CC_SUPPORTS_VARADIC_XXX 1 /* see varargs.h */
+#define __CC_SUPPORTS_VARADIC_XXX 1 /* see varargs.h */
-#define __CC_SUPPORTS_DYNAMIC_ARRAY_INIT 1
+#define __CC_SUPPORTS_DYNAMIC_ARRAY_INIT 1
#endif /* __GNUC__ || __INTEL_COMPILER */
@@ -212,8 +231,12 @@
#define __unused
#define __packed
#define __aligned(x)
+#define __alloc_align(x)
+#define __alloc_size(x)
#define __section(x)
+#define __weak_symbol
#else
+#define __weak_symbol __attribute__((__weak__))
#if !__GNUC_PREREQ__(2, 5) && !defined(__INTEL_COMPILER)
#define __dead2
#define __pure2
@@ -225,7 +248,7 @@
#define __unused
/* XXX Find out what to do for __packed, __aligned and __section */
#endif
-#if __GNUC_PREREQ__(2, 7)
+#if __GNUC_PREREQ__(2, 7) || defined(__INTEL_COMPILER)
#define __dead2 __attribute__((__noreturn__))
#define __pure2 __attribute__((__const__))
#define __unused __attribute__((__unused__))
@@ -234,16 +257,17 @@
#define __aligned(x) __attribute__((__aligned__(x)))
#define __section(x) __attribute__((__section__(x)))
#endif
-#if defined(__INTEL_COMPILER)
-#define __dead2 __attribute__((__noreturn__))
-#define __pure2 __attribute__((__const__))
-#define __unused __attribute__((__unused__))
-#define __used __attribute__((__used__))
-#define __packed __attribute__((__packed__))
-#define __aligned(x) __attribute__((__aligned__(x)))
-#define __section(x) __attribute__((__section__(x)))
+#if __GNUC_PREREQ__(4, 3) || __has_attribute(__alloc_size__)
+#define __alloc_size(x) __attribute__((__alloc_size__(x)))
+#else
+#define __alloc_size(x)
#endif
+#if __GNUC_PREREQ__(4, 9) || __has_attribute(__alloc_align__)
+#define __alloc_align(x) __attribute__((__alloc_align__(x)))
+#else
+#define __alloc_align(x)
#endif
+#endif /* lint */
#if !__GNUC_PREREQ__(2, 95)
#define __alignof(x) __offsetof(struct { char __a; x __b; }, __b)
@@ -252,32 +276,71 @@
/*
* Keywords added in C11.
*/
-#if defined(__cplusplus) && __cplusplus >= 201103L
-#define _Alignas(e) alignas(e)
-#define _Alignof(e) alignof(e)
-#define _Noreturn [[noreturn]]
-#define _Static_assert(e, s) static_assert(e, s)
-/* FIXME: change this to thread_local when clang in base supports it */
-#define _Thread_local __thread
-#elif defined(__STDC_VERSION__) && __STDC_VERSION__ >= 201112L
-/* Do nothing. They are language keywords. */
+
+#if !defined(__STDC_VERSION__) || __STDC_VERSION__ < 201112L || defined(lint)
+
+#if !__has_extension(c_alignas)
+#if (defined(__cplusplus) && __cplusplus >= 201103L) || \
+ __has_extension(cxx_alignas)
+#define _Alignas(x) alignas(x)
#else
-/* Not supported. Implement them using our versions. */
+/* XXX: Only emulates _Alignas(constant-expression); not _Alignas(type-name). */
#define _Alignas(x) __aligned(x)
+#endif
+#endif
+
+#if defined(__cplusplus) && __cplusplus >= 201103L
+#define _Alignof(x) alignof(x)
+#else
#define _Alignof(x) __alignof(x)
+#endif
+
+#if !__has_extension(c_atomic) && !__has_extension(cxx_atomic)
+/*
+ * No native support for _Atomic(). Place object in structure to prevent
+ * most forms of direct non-atomic access.
+ */
+#define _Atomic(T) struct { T volatile __val; }
+#endif
+
+#if defined(__cplusplus) && __cplusplus >= 201103L
+#define _Noreturn [[noreturn]]
+#else
#define _Noreturn __dead2
-#define _Thread_local __thread
-#if __GNUC_PREREQ__(4, 6) && !defined(__cplusplus)
-/* Do nothing: _Static_assert() works as per C11 */
+#endif
+
+#if !__has_extension(c_static_assert)
+#if (defined(__cplusplus) && __cplusplus >= 201103L) || \
+ __has_extension(cxx_static_assert)
+#define _Static_assert(x, y) static_assert(x, y)
+#elif __GNUC_PREREQ__(4,6)
+/* Nothing, gcc 4.6 and higher has _Static_assert built-in */
#elif defined(__COUNTER__)
#define _Static_assert(x, y) __Static_assert(x, __COUNTER__)
#define __Static_assert(x, y) ___Static_assert(x, y)
-#define ___Static_assert(x, y) typedef char __assert_ ## y[(x) ? 1 : -1]
+#define ___Static_assert(x, y) typedef char __assert_ ## y[(x) ? 1 : -1] \
+ __unused
#else
#define _Static_assert(x, y) struct __hack
#endif
#endif
+#if !__has_extension(c_thread_local)
+/*
+ * XXX: Some compilers (Clang 3.3, GCC 4.7) falsely announce C++11 mode
+ * without actually supporting the thread_local keyword. Don't check for
+ * the presence of C++11 when defining _Thread_local.
+ */
+#if /* (defined(__cplusplus) && __cplusplus >= 201103L) || */ \
+ __has_extension(cxx_thread_local)
+#define _Thread_local thread_local
+#else
+#define _Thread_local __thread
+#endif
+#endif
+
+#endif /* __STDC_VERSION__ || __STDC_VERSION__ < 201112L */
+
/*
* Emulation of C11 _Generic(). Unlike the previously defined C11
* keywords, it is not possible to implement this using exactly the same
@@ -287,7 +350,8 @@
* distinguish multiple cases.
*/
-#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 201112L
+#if (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 201112L) || \
+ __has_extension(c_generic_selections)
#define __generic(expr, t, yes, no) \
_Generic(expr, t: yes, default: no)
#elif __GNUC_PREREQ__(3, 1) && !defined(__cplusplus)
@@ -317,15 +381,19 @@
#endif
#if __GNUC_PREREQ__(3, 3)
-#define __nonnull(x) __attribute__((__nonnull__(x)))
+#define __nonnull(x) __attribute__((__nonnull__(x)))
+#define __nonnull_all __attribute__((__nonnull__))
#else
-#define __nonnull(x)
+#define __nonnull(x)
+#define __nonnull_all
#endif
#if __GNUC_PREREQ__(3, 4)
#define __fastcall __attribute__((__fastcall__))
+#define __result_use_check __attribute__((__warn_unused_result__))
#else
#define __fastcall
+#define __result_use_check
#endif
#if __GNUC_PREREQ__(4, 1)
@@ -334,6 +402,12 @@
#define __returns_twice
#endif
+#if __GNUC_PREREQ__(4, 6) || __has_builtin(__builtin_unreachable)
+#define __unreachable() __builtin_unreachable()
+#else
+#define __unreachable() ((void)0)
+#endif
+
/* XXX: should use `#if __STDC_VERSION__ < 199901'. */
#if !__GNUC_PREREQ__(2, 7) && !defined(__INTEL_COMPILER)
#define __func__ NULL
@@ -382,19 +456,21 @@
* larger code.
*/
#if __GNUC_PREREQ__(2, 96)
-#define __predict_true(exp) __builtin_expect((exp), 1)
-#define __predict_false(exp) __builtin_expect((exp), 0)
+#define __predict_true(exp) __builtin_expect((exp), 1)
+#define __predict_false(exp) __builtin_expect((exp), 0)
#else
-#define __predict_true(exp) (exp)
-#define __predict_false(exp) (exp)
+#define __predict_true(exp) (exp)
+#define __predict_false(exp) (exp)
#endif
-#if __GNUC_PREREQ__(4, 2)
-#define __hidden __attribute__((__visibility__("hidden")))
+#if __GNUC_PREREQ__(4, 0)
+#define __sentinel __attribute__((__sentinel__))
#define __exported __attribute__((__visibility__("default")))
+#define __hidden __attribute__((__visibility__("hidden")))
#else
-#define __hidden
+#define __sentinel
#define __exported
+#define __hidden
#endif
#define __offsetof(type, field) offsetof(type, field)
@@ -409,7 +485,7 @@
*/
#if __GNUC_PREREQ__(3, 1)
#define __containerof(x, s, m) ({ \
- const volatile __typeof__(((s *)0)->m) *__x = (x); \
+ const volatile __typeof(((s *)0)->m) *__x = (x); \
__DEQUALIFY(s *, (const volatile char *)__x - __offsetof(s, m));\
})
#else
@@ -441,6 +517,22 @@
__attribute__((__format__ (__strftime__, fmtarg, firstvararg)))
#endif
+/*
+ * FORTIFY_SOURCE, and perhaps other compiler-specific features, require
+ * the use of non-standard inlining. In general we should try to avoid
+ * using these but GCC-compatible compilers tend to support the extensions
+ * well enough to use them in limited cases.
+ */
+#if defined(__GNUC_GNU_INLINE__) || defined(__GNUC_STDC_INLINE__)
+#if __GNUC_PREREQ__(4, 3) || __has_attribute(__artificial__)
+#define __gnu_inline __attribute__((__gnu_inline__, __artificial__))
+#else
+#define __gnu_inline __attribute__((__gnu_inline__))
+#endif /* artificial */
+#else
+#define __gnu_inline
+#endif
+
/* Compiler-dependent macros that rely on FreeBSD-specific extensions. */
#if defined(__FreeBSD_cc_version) && __FreeBSD_cc_version >= 300001 && \
defined(__GNUC__) && !defined(__INTEL_COMPILER)
@@ -521,146 +613,90 @@
#endif
#ifndef __DECONST
-#define __DECONST(type, var) ((type)(uintptr_t)(const void *)(var))
+#define __DECONST(type, var) ((type)(__uintptr_t)(const void *)(var))
#endif
#ifndef __DEVOLATILE
-#define __DEVOLATILE(type, var) ((type)(uintptr_t)(volatile void *)(var))
+#define __DEVOLATILE(type, var) ((type)(__uintptr_t)(volatile void *)(var))
#endif
#ifndef __DEQUALIFY
-#define __DEQUALIFY(type, var) ((type)(uintptr_t)(const volatile void *)(var))
+#define __DEQUALIFY(type, var) ((type)(__uintptr_t)(const volatile void *)(var))
#endif
-/*-
- * The following definitions are an extension of the behavior originally
- * implemented in <sys/_posix.h>, but with a different level of granularity.
- * POSIX.1 requires that the macros we test be defined before any standard
- * header file is included.
- *
- * Here's a quick run-down of the versions:
- * defined(_POSIX_SOURCE) 1003.1-1988
- * _POSIX_C_SOURCE == 1 1003.1-1990
- * _POSIX_C_SOURCE == 2 1003.2-1992 C Language Binding Option
- * _POSIX_C_SOURCE == 199309 1003.1b-1993
- * _POSIX_C_SOURCE == 199506 1003.1c-1995, 1003.1i-1995,
- * and the omnibus ISO/IEC 9945-1: 1996
- * _POSIX_C_SOURCE == 200112 1003.1-2001
- * _POSIX_C_SOURCE == 200809 1003.1-2008
- *
- * In addition, the X/Open Portability Guide, which is now the Single UNIX
- * Specification, defines a feature-test macro which indicates the version of
- * that specification, and which subsumes _POSIX_C_SOURCE.
+/*
+ * Type Safety Checking
*
- * Our macros begin with two underscores to avoid namespace screwage.
+ * Clang provides additional attributes to enable checking type safety
+ * properties that cannot be enforced by the C type system.
*/
-/* Deal with IEEE Std. 1003.1-1990, in which _POSIX_C_SOURCE == 1. */
-#if defined(_POSIX_C_SOURCE) && _POSIX_C_SOURCE == 1
-#undef _POSIX_C_SOURCE /* Probably illegal, but beyond caring now. */
-#define _POSIX_C_SOURCE 199009
-#endif
-
-/* Deal with IEEE Std. 1003.2-1992, in which _POSIX_C_SOURCE == 2. */
-#if defined(_POSIX_C_SOURCE) && _POSIX_C_SOURCE == 2
-#undef _POSIX_C_SOURCE
-#define _POSIX_C_SOURCE 199209
-#endif
-
-/* Deal with various X/Open Portability Guides and Single UNIX Spec. */
-#ifdef _XOPEN_SOURCE
-#if _XOPEN_SOURCE - 0 >= 700
-#define __XSI_VISIBLE 700
-#undef _POSIX_C_SOURCE
-#define _POSIX_C_SOURCE 200809
-#elif _XOPEN_SOURCE - 0 >= 600
-#define __XSI_VISIBLE 600
-#undef _POSIX_C_SOURCE
-#define _POSIX_C_SOURCE 200112
-#elif _XOPEN_SOURCE - 0 >= 500
-#define __XSI_VISIBLE 500
-#undef _POSIX_C_SOURCE
-#define _POSIX_C_SOURCE 199506
-#endif
+#if __has_attribute(__argument_with_type_tag__) && \
+ __has_attribute(__type_tag_for_datatype__) && !defined(lint)
+#define __arg_type_tag(arg_kind, arg_idx, type_tag_idx) \
+ __attribute__((__argument_with_type_tag__(arg_kind, arg_idx, type_tag_idx)))
+#define __datatype_type_tag(kind, type) \
+ __attribute__((__type_tag_for_datatype__(kind, type)))
+#else
+#define __arg_type_tag(arg_kind, arg_idx, type_tag_idx)
+#define __datatype_type_tag(kind, type)
#endif
/*
- * Deal with all versions of POSIX. The ordering relative to the tests above is
- * important.
- */
-#if defined(_POSIX_SOURCE) && !defined(_POSIX_C_SOURCE)
-#define _POSIX_C_SOURCE 198808
-#endif
-#ifdef _POSIX_C_SOURCE
-#if _POSIX_C_SOURCE >= 200809
-#define __POSIX_VISIBLE 200809
-#define __ISO_C_VISIBLE 1999
-#elif _POSIX_C_SOURCE >= 200112
-#define __POSIX_VISIBLE 200112
-#define __ISO_C_VISIBLE 1999
-#elif _POSIX_C_SOURCE >= 199506
-#define __POSIX_VISIBLE 199506
-#define __ISO_C_VISIBLE 1990
-#elif _POSIX_C_SOURCE >= 199309
-#define __POSIX_VISIBLE 199309
-#define __ISO_C_VISIBLE 1990
-#elif _POSIX_C_SOURCE >= 199209
-#define __POSIX_VISIBLE 199209
-#define __ISO_C_VISIBLE 1990
-#elif _POSIX_C_SOURCE >= 199009
-#define __POSIX_VISIBLE 199009
-#define __ISO_C_VISIBLE 1990
-#else
-#define __POSIX_VISIBLE 198808
-#define __ISO_C_VISIBLE 0
-#endif /* _POSIX_C_SOURCE */
-#else
-/*-
- * Deal with _ANSI_SOURCE:
- * If it is defined, and no other compilation environment is explicitly
- * requested, then define our internal feature-test macros to zero. This
- * makes no difference to the preprocessor (undefined symbols in preprocessing
- * expressions are defined to have value zero), but makes it more convenient for
- * a test program to print out the values.
+ * Lock annotations.
*
- * If a program mistakenly defines _ANSI_SOURCE and some other macro such as
- * _POSIX_C_SOURCE, we will assume that it wants the broader compilation
- * environment (and in fact we will never get here).
+ * Clang provides support for doing basic thread-safety tests at
+ * compile-time, by marking which locks will/should be held when
+ * entering/leaving a functions.
+ *
+ * Furthermore, it is also possible to annotate variables and structure
+ * members to enforce that they are only accessed when certain locks are
+ * held.
*/
-#if defined(_ANSI_SOURCE) /* Hide almost everything. */
-#define __POSIX_VISIBLE 0
-#define __XSI_VISIBLE 0
-#define __BSD_VISIBLE 0
-#define __ISO_C_VISIBLE 1990
-#elif defined(_C99_SOURCE) /* Localism to specify strict C99 env. */
-#define __POSIX_VISIBLE 0
-#define __XSI_VISIBLE 0
-#define __BSD_VISIBLE 0
-#define __ISO_C_VISIBLE 1999
-#elif defined(_C11_SOURCE) /* Localism to specify strict C11 env. */
-#define __POSIX_VISIBLE 0
-#define __XSI_VISIBLE 0
-#define __BSD_VISIBLE 0
-#define __ISO_C_VISIBLE 2011
-#else /* Default environment: show everything. */
-#define __POSIX_VISIBLE 200809
-#define __XSI_VISIBLE 700
-#define __BSD_VISIBLE 1
-#define __ISO_C_VISIBLE 2011
-#endif
-#endif
-#ifndef __has_extension
-#define __has_extension __has_feature
-#endif
-#ifndef __has_feature
-#define __has_feature(x) 0
-#endif
-#ifndef __has_include
-#define __has_include(x) 0
-#endif
-#ifndef __has_builtin
-#define __has_builtin(x) 0
-#endif
+#if __has_extension(c_thread_safety_attributes)
+#define __lock_annotate(x) __attribute__((x))
+#else
+#define __lock_annotate(x)
+#endif
+
+/* Structure implements a lock. */
+#define __lockable __lock_annotate(lockable)
+
+/* Function acquires an exclusive or shared lock. */
+#define __locks_exclusive(...) \
+ __lock_annotate(exclusive_lock_function(__VA_ARGS__))
+#define __locks_shared(...) \
+ __lock_annotate(shared_lock_function(__VA_ARGS__))
+
+/* Function attempts to acquire an exclusive or shared lock. */
+#define __trylocks_exclusive(...) \
+ __lock_annotate(exclusive_trylock_function(__VA_ARGS__))
+#define __trylocks_shared(...) \
+ __lock_annotate(shared_trylock_function(__VA_ARGS__))
+
+/* Function releases a lock. */
+#define __unlocks(...) __lock_annotate(unlock_function(__VA_ARGS__))
+
+/* Function asserts that an exclusive or shared lock is held. */
+#define __asserts_exclusive(...) \
+ __lock_annotate(assert_exclusive_lock(__VA_ARGS__))
+#define __asserts_shared(...) \
+ __lock_annotate(assert_shared_lock(__VA_ARGS__))
+
+/* Function requires that an exclusive or shared lock is or is not held. */
+#define __requires_exclusive(...) \
+ __lock_annotate(exclusive_locks_required(__VA_ARGS__))
+#define __requires_shared(...) \
+ __lock_annotate(shared_locks_required(__VA_ARGS__))
+#define __requires_unlocked(...) \
+ __lock_annotate(locks_excluded(__VA_ARGS__))
+
+/* Function should not be analyzed. */
+#define __no_lock_analysis __lock_annotate(no_thread_safety_analysis)
+
+/* Guard variables and structure members by lock. */
+#define __guarded_by(x) __lock_annotate(guarded_by(x))
+#define __pt_guarded_by(x) __lock_annotate(pt_guarded_by(x))
#endif /* !_SYS_CDEFS_H_ */
diff --git a/newlib/libc/include/sys/config.h b/newlib/libc/include/sys/config.h
index c726e14c9..555239f8b 100644
--- a/newlib/libc/include/sys/config.h
+++ b/newlib/libc/include/sys/config.h
@@ -75,6 +75,10 @@
#define _POINTER_INT short
#endif
+#if defined(__m68k__) || defined(__mc68000__)
+#define _READ_WRITE_RETURN_TYPE _ssize_t
+#endif
+
#ifdef ___AM29K__
#define _FLOAT_RET double
#endif
@@ -88,7 +92,6 @@
/* we want the reentrancy structure to be returned by a function */
#define __DYNAMIC_REENT__
#define HAVE_GETDATE
-#define _HAVE_SYSTYPES
#define _READ_WRITE_RETURN_TYPE _ssize_t
#define __LARGE64_FILES 1
/* we use some glibc header files so turn on glibc large file feature */
@@ -181,6 +184,10 @@
#define __CUSTOM_FILE_IO__
#endif
+#if defined(__or1k__) || defined(__or1knd__)
+#define __DYNAMIC_REENT__
+#endif
+
/* This block should be kept in sync with GCC's limits.h. The point
of having these definitions here is to not include limits.h, which
would pollute the user namespace, while still using types of the
@@ -224,9 +231,6 @@
#if defined(__CYGWIN__)
#include <cygwin/config.h>
-#if !defined (__STRICT_ANSI__) || (__STDC_VERSION__ >= 199901L)
-#define __USE_XOPEN2K 1
-#endif
#endif
#if defined(__rtems__)
@@ -250,6 +254,12 @@
#ifndef _READ_WRITE_RETURN_TYPE
#define _READ_WRITE_RETURN_TYPE int
#endif
+/* Define `count' parameter of read/write routines. In POSIX, the `count'
+ parameter is "size_t" but legacy newlib code has been using "int" for some
+ time. If not specified, "int" is defaulted. */
+#ifndef _READ_WRITE_BUFSIZE_TYPE
+#define _READ_WRITE_BUFSIZE_TYPE int
+#endif
#ifndef __WCHAR_MAX__
#if __INT_MAX__ == 32767 || defined (_WIN32)
diff --git a/newlib/libc/include/sys/errno.h b/newlib/libc/include/sys/errno.h
index c93b250c3..a72c37320 100644
--- a/newlib/libc/include/sys/errno.h
+++ b/newlib/libc/include/sys/errno.h
@@ -28,7 +28,7 @@ extern __IMPORT char *program_invocation_short_name;
#define __errno_r(ptr) ((ptr)->_errno)
-#define EPERM 1 /* Not super-user */
+#define EPERM 1 /* Not owner */
#define ENOENT 2 /* No such file or directory */
#define ESRCH 3 /* No such process */
#define EINTR 4 /* Interrupted system call */
@@ -39,13 +39,13 @@ extern __IMPORT char *program_invocation_short_name;
#define EBADF 9 /* Bad file number */
#define ECHILD 10 /* No children */
#define EAGAIN 11 /* No more processes */
-#define ENOMEM 12 /* Not enough core */
+#define ENOMEM 12 /* Not enough space */
#define EACCES 13 /* Permission denied */
#define EFAULT 14 /* Bad address */
#ifdef __LINUX_ERRNO_EXTENSIONS__
#define ENOTBLK 15 /* Block device required */
#endif
-#define EBUSY 16 /* Mount device busy */
+#define EBUSY 16 /* Device or resource busy */
#define EEXIST 17 /* File exists */
#define EXDEV 18 /* Cross-device link */
#define ENODEV 19 /* No such device */
@@ -53,17 +53,17 @@ extern __IMPORT char *program_invocation_short_name;
#define EISDIR 21 /* Is a directory */
#define EINVAL 22 /* Invalid argument */
#define ENFILE 23 /* Too many open files in system */
-#define EMFILE 24 /* Too many open files */
-#define ENOTTY 25 /* Not a typewriter */
+#define EMFILE 24 /* File descriptor value too large */
+#define ENOTTY 25 /* Not a character device */
#define ETXTBSY 26 /* Text file busy */
#define EFBIG 27 /* File too large */
#define ENOSPC 28 /* No space left on device */
#define ESPIPE 29 /* Illegal seek */
-#define EROFS 30 /* Read only file system */
+#define EROFS 30 /* Read-only file system */
#define EMLINK 31 /* Too many links */
#define EPIPE 32 /* Broken pipe */
-#define EDOM 33 /* Math arg out of domain of func */
-#define ERANGE 34 /* Math result not representable */
+#define EDOM 33 /* Mathematics argument out of domain of function */
+#define ERANGE 34 /* Result too large */
#define ENOMSG 35 /* No message of desired type */
#define EIDRM 36 /* Identifier removed */
#ifdef __LINUX_ERRNO_EXTENSIONS__
@@ -76,8 +76,8 @@ extern __IMPORT char *program_invocation_short_name;
#define ENOCSI 43 /* No CSI structure available */
#define EL2HLT 44 /* Level 2 halted */
#endif
-#define EDEADLK 45 /* Deadlock condition */
-#define ENOLCK 46 /* No record locks available */
+#define EDEADLK 45 /* Deadlock */
+#define ENOLCK 46 /* No lock */
#ifdef __LINUX_ERRNO_EXTENSIONS__
#define EBADE 50 /* Invalid exchange */
#define EBADR 51 /* Invalid request descriptor */
@@ -88,16 +88,16 @@ extern __IMPORT char *program_invocation_short_name;
#define EDEADLOCK 56 /* File locking deadlock error */
#define EBFONT 57 /* Bad font file fmt */
#endif
-#define ENOSTR 60 /* Device not a stream */
+#define ENOSTR 60 /* Not a stream */
#define ENODATA 61 /* No data (for no delay io) */
-#define ETIME 62 /* Timer expired */
-#define ENOSR 63 /* Out of streams resources */
+#define ETIME 62 /* Stream ioctl timeout */
+#define ENOSR 63 /* No stream resources */
#ifdef __LINUX_ERRNO_EXTENSIONS__
#define ENONET 64 /* Machine is not on the network */
#define ENOPKG 65 /* Package not installed */
#define EREMOTE 66 /* The object is remote */
#endif
-#define ENOLINK 67 /* The link has been severed */
+#define ENOLINK 67 /* Virtual circuit is gone */
#ifdef __LINUX_ERRNO_EXTENSIONS__
#define EADV 68 /* Advertise error */
#define ESRMNT 69 /* Srmount error */
@@ -109,7 +109,7 @@ extern __IMPORT char *program_invocation_short_name;
#define ELBIN 75 /* Inode is remote (not really error) */
#define EDOTDOT 76 /* Cross mount point (not really error) */
#endif
-#define EBADMSG 77 /* Trying to read unreadable message */
+#define EBADMSG 77 /* Bad message */
#define EFTYPE 79 /* Inappropriate file type or format */
#ifdef __LINUX_ERRNO_EXTENSIONS__
#define ENOTUNIQ 80 /* Given log. name not unique */
@@ -128,7 +128,7 @@ extern __IMPORT char *program_invocation_short_name;
#define ENOTEMPTY 90 /* Directory not empty */
#define ENAMETOOLONG 91 /* File or path name too long */
#define ELOOP 92 /* Too many symbolic links */
-#define EOPNOTSUPP 95 /* Operation not supported on transport endpoint */
+#define EOPNOTSUPP 95 /* Operation not supported on socket */
#define EPFNOSUPPORT 96 /* Protocol family not supported */
#define ECONNRESET 104 /* Connection reset by peer */
#define ENOBUFS 105 /* No buffer space available */
@@ -141,7 +141,7 @@ extern __IMPORT char *program_invocation_short_name;
#endif
#define ECONNREFUSED 111 /* Connection refused */
#define EADDRINUSE 112 /* Address already in use */
-#define ECONNABORTED 113 /* Connection aborted */
+#define ECONNABORTED 113 /* Software caused connection abort */
#define ENETUNREACH 114 /* Network is unreachable */
#define ENETDOWN 115 /* Network interface is not configured */
#define ETIMEDOUT 116 /* Connection timed out */
@@ -156,7 +156,7 @@ extern __IMPORT char *program_invocation_short_name;
#define ESOCKTNOSUPPORT 124 /* Socket type not supported */
#endif
#define EADDRNOTAVAIL 125 /* Address not available */
-#define ENETRESET 126
+#define ENETRESET 126 /* Connection aborted by network */
#define EISCONN 127 /* Socket is already connected */
#define ENOTCONN 128 /* Socket is not connected */
#define ETOOMANYREFS 129
@@ -174,7 +174,7 @@ extern __IMPORT char *program_invocation_short_name;
#define ENOSHARE 136 /* No such host or network path */
#define ECASECLASH 137 /* Filename exists with different case */
#endif
-#define EILSEQ 138
+#define EILSEQ 138 /* Illegal byte sequence */
#define EOVERFLOW 139 /* Value too large for defined data type */
#define ECANCELED 140 /* Operation canceled */
#define ENOTRECOVERABLE 141 /* State not recoverable */
diff --git a/newlib/libc/include/sys/features.h b/newlib/libc/include/sys/features.h
index a3ba513bf..dbc4ebefa 100644
--- a/newlib/libc/include/sys/features.h
+++ b/newlib/libc/include/sys/features.h
@@ -1,7 +1,7 @@
/*
* Written by Joel Sherrill <joel@OARcorp.com>.
*
- * COPYRIGHT (c) 1989-2000.
+ * COPYRIGHT (c) 1989-2014.
*
* On-Line Applications Research Corporation (OAR).
*
@@ -25,6 +25,8 @@
extern "C" {
#endif
+#include <_newlib_version.h>
+
/* Macro to test version of GCC. Returns 0 for non-GCC or too old GCC. */
#ifndef __GNUC_PREREQ
# if defined __GNUC__ && defined __GNUC_MINOR__
@@ -37,6 +39,281 @@ extern "C" {
/* Version with trailing underscores for BSD compatibility. */
#define __GNUC_PREREQ__(ma, mi) __GNUC_PREREQ(ma, mi)
+
+/*
+ * Feature test macros control which symbols are exposed by the system
+ * headers. Any of these must be defined before including any headers.
+ *
+ * __STRICT_ANSI__ (defined by gcc -ansi, -std=c90, -std=c99, or -std=c11)
+ * ISO C
+ *
+ * _POSIX_SOURCE (deprecated by _POSIX_C_SOURCE=1)
+ * _POSIX_C_SOURCE >= 1
+ * POSIX.1-1990
+ *
+ * _POSIX_C_SOURCE >= 2
+ * POSIX.2-1992
+ *
+ * _POSIX_C_SOURCE >= 199309L
+ * POSIX.1b-1993 Real-time extensions
+ *
+ * _POSIX_C_SOURCE >= 199506L
+ * POSIX.1c-1995 Threads extensions
+ *
+ * _POSIX_C_SOURCE >= 200112L
+ * POSIX.1-2001 and C99
+ *
+ * _POSIX_C_SOURCE >= 200809L
+ * POSIX.1-2008
+ *
+ * _XOPEN_SOURCE
+ * POSIX.1-1990 and XPG4
+ *
+ * _XOPEN_SOURCE_EXTENDED
+ * SUSv1 (POSIX.2-1992 plus XPG4v2)
+ *
+ * _XOPEN_SOURCE >= 500
+ * SUSv2 (POSIX.1c-1995 plus XSI)
+ *
+ * _XOPEN_SOURCE >= 600
+ * SUSv3 (POSIX.1-2001 plus XSI) and C99
+ *
+ * _XOPEN_SOURCE >= 700
+ * SUSv4 (POSIX.1-2008 plus XSI)
+ *
+ * _ISOC99_SOURCE or gcc -std=c99 or g++
+ * ISO C99
+ *
+ * _ISOC11_SOURCE or gcc -std=c11 or g++ -std=c++11
+ * ISO C11
+ *
+ * _ATFILE_SOURCE (implied by _POSIX_C_SOURCE >= 200809L)
+ * "at" functions
+ *
+ * _LARGEFILE_SOURCE (deprecated by _XOPEN_SOURCE >= 500)
+ * fseeko, ftello
+ *
+ * _GNU_SOURCE
+ * All of the above plus GNU extensions
+ *
+ * _BSD_SOURCE (deprecated by _DEFAULT_SOURCE)
+ * _SVID_SOURCE (deprecated by _DEFAULT_SOURCE)
+ * _DEFAULT_SOURCE (or none of the above)
+ * POSIX-1.2008 with BSD and SVr4 extensions
+ */
+
+#ifdef _GNU_SOURCE
+#undef _ATFILE_SOURCE
+#define _ATFILE_SOURCE 1
+#undef _DEFAULT_SOURCE
+#define _DEFAULT_SOURCE 1
+#undef _ISOC99_SOURCE
+#define _ISOC99_SOURCE 1
+#undef _ISOC11_SOURCE
+#define _ISOC11_SOURCE 1
+#undef _POSIX_SOURCE
+#define _POSIX_SOURCE 1
+#undef _POSIX_C_SOURCE
+#define _POSIX_C_SOURCE 200809L
+#undef _XOPEN_SOURCE
+#define _XOPEN_SOURCE 700
+#undef _XOPEN_SOURCE_EXTENDED
+#define _XOPEN_SOURCE_EXTENDED 1
+#endif /* _GNU_SOURCE */
+
+#if defined(_BSD_SOURCE) || defined(_SVID_SOURCE) || \
+ (!defined(__STRICT_ANSI__) && !defined(_ANSI_SOURCE) && \
+ !defined(_ISOC99_SOURCE) && !defined(_POSIX_SOURCE) && \
+ !defined(_POSIX_C_SOURCE) && !defined(_XOPEN_SOURCE))
+#undef _DEFAULT_SOURCE
+#define _DEFAULT_SOURCE 1
+#endif
+
+#if defined(_DEFAULT_SOURCE)
+#undef _POSIX_SOURCE
+#define _POSIX_SOURCE 1
+#undef _POSIX_C_SOURCE
+#define _POSIX_C_SOURCE 200809L
+#endif
+
+#if !defined(_POSIX_SOURCE) && !defined(_POSIX_C_SOURCE) && \
+ ((!defined(__STRICT_ANSI__) && !defined(_ANSI_SOURCE)) || \
+ (_XOPEN_SOURCE - 0) >= 500)
+#define _POSIX_SOURCE 1
+#if !defined(_XOPEN_SOURCE) || (_XOPEN_SOURCE - 0) >= 700
+#define _POSIX_C_SOURCE 200809L
+#elif (_XOPEN_SOURCE - 0) >= 600
+#define _POSIX_C_SOURCE 200112L
+#elif (_XOPEN_SOURCE - 0) >= 500
+#define _POSIX_C_SOURCE 199506L
+#elif (_XOPEN_SOURCE - 0) < 500
+#define _POSIX_C_SOURCE 2
+#endif
+#endif
+
+#if defined(_POSIX_C_SOURCE) && _POSIX_C_SOURCE >= 200809
+#undef _ATFILE_SOURCE
+#define _ATFILE_SOURCE 1
+#endif
+
+/*
+ * The following private macros are used throughout the headers to control
+ * which symbols should be exposed. They are for internal use only, as
+ * indicated by the leading double underscore, and must never be used outside
+ * of these headers.
+ *
+ * __POSIX_VISIBLE
+ * any version of POSIX.1; enabled by default, or with _POSIX_SOURCE,
+ * any value of _POSIX_C_SOURCE, or _XOPEN_SOURCE >= 500.
+ *
+ * __POSIX_VISIBLE >= 2
+ * POSIX.2-1992; enabled by default, with _POSIX_C_SOURCE >= 2,
+ * or _XOPEN_SOURCE >= 500.
+ *
+ * __POSIX_VISIBLE >= 199309
+ * POSIX.1b-1993; enabled by default, with _POSIX_C_SOURCE >= 199309L,
+ * or _XOPEN_SOURCE >= 500.
+ *
+ * __POSIX_VISIBLE >= 199506
+ * POSIX.1c-1995; enabled by default, with _POSIX_C_SOURCE >= 199506L,
+ * or _XOPEN_SOURCE >= 500.
+ *
+ * __POSIX_VISIBLE >= 200112
+ * POSIX.1-2001; enabled by default, with _POSIX_C_SOURCE >= 200112L,
+ * or _XOPEN_SOURCE >= 600.
+ *
+ * __POSIX_VISIBLE >= 200809
+ * POSIX.1-2008; enabled by default, with _POSIX_C_SOURCE >= 200809L,
+ * or _XOPEN_SOURCE >= 700.
+ *
+ * __XSI_VISIBLE
+ * XPG4 XSI extensions; enabled with any version of _XOPEN_SOURCE.
+ *
+ * __XSI_VISIBLE >= 4
+ * SUSv1 XSI extensions; enabled with both _XOPEN_SOURCE and
+ * _XOPEN_SOURCE_EXTENDED together.
+ *
+ * __XSI_VISIBLE >= 500
+ * SUSv2 XSI extensions; enabled with _XOPEN_SOURCE >= 500.
+ *
+ * __XSI_VISIBLE >= 600
+ * SUSv3 XSI extensions; enabled with _XOPEN_SOURCE >= 600.
+ *
+ * __XSI_VISIBLE >= 700
+ * SUSv4 XSI extensions; enabled with _XOPEN_SOURCE >= 700.
+ *
+ * __ISO_C_VISIBLE >= 1999
+ * ISO C99; enabled with gcc -std=c99 or newer (on by default since GCC 5),
+ * any version of C++, or with _ISOC99_SOURCE, _POSIX_C_SOURCE >= 200112L,
+ * or _XOPEN_SOURCE >= 600.
+ *
+ * __ISO_C_VISIBLE >= 2011
+ * ISO C11; enabled with gcc -std=c11 or newer (on by default since GCC 5),
+ * g++ -std=c++11 or newer (on by default since GCC 6), or with
+ * _ISOC11_SOURCE.
+ *
+ * __ATFILE_VISIBLE
+ * "at" functions; enabled by default, with _ATFILE_SOURCE,
+ * _POSIX_C_SOURCE >= 200809L, or _XOPEN_SOURCE >= 700.
+ *
+ * __LARGEFILE_VISIBLE
+ * fseeko, ftello; enabled with _LARGEFILE_SOURCE or _XOPEN_SOURCE >= 500.
+ *
+ * __BSD_VISIBLE
+ * BSD extensions; enabled by default, or with _BSD_SOURCE.
+ *
+ * __SVID_VISIBLE
+ * SVr4 extensions; enabled by default, or with _SVID_SOURCE.
+ *
+ * __MISC_VISIBLE
+ * Extensions found in both BSD and SVr4 (shorthand for
+ * (__BSD_VISIBLE || __SVID_VISIBLE)), or newlib-specific
+ * extensions; enabled by default.
+ *
+ * __GNU_VISIBLE
+ * GNU extensions; enabled with _GNU_SOURCE.
+ *
+ * In all cases above, "enabled by default" means either by defining
+ * _DEFAULT_SOURCE, or by not defining any of the public feature test macros.
+ * Defining _GNU_SOURCE makes all of the above avaliable.
+ */
+
+#ifdef _ATFILE_SOURCE
+#define __ATFILE_VISIBLE 1
+#else
+#define __ATFILE_VISIBLE 0
+#endif
+
+#ifdef _DEFAULT_SOURCE
+#define __BSD_VISIBLE 1
+#else
+#define __BSD_VISIBLE 0
+#endif
+
+#ifdef _GNU_SOURCE
+#define __GNU_VISIBLE 1
+#else
+#define __GNU_VISIBLE 0
+#endif
+
+#if defined(_ISOC11_SOURCE) || \
+ (__STDC_VERSION__ - 0) >= 201112L || (__cplusplus - 0) >= 201103L
+#define __ISO_C_VISIBLE 2011
+#elif defined(_ISOC99_SOURCE) || (_POSIX_C_SOURCE - 0) >= 200112L || \
+ (__STDC_VERSION__ - 0) >= 199901L || defined(__cplusplus)
+#define __ISO_C_VISIBLE 1999
+#else
+#define __ISO_C_VISIBLE 1990
+#endif
+
+#if defined(_LARGEFILE_SOURCE) || (_XOPEN_SOURCE - 0) >= 500
+#define __LARGEFILE_VISIBLE 1
+#else
+#define __LARGEFILE_VISIBLE 0
+#endif
+
+#ifdef _DEFAULT_SOURCE
+#define __MISC_VISIBLE 1
+#else
+#define __MISC_VISIBLE 0
+#endif
+
+#if (_POSIX_C_SOURCE - 0) >= 200809L
+#define __POSIX_VISIBLE 200809
+#elif (_POSIX_C_SOURCE - 0) >= 200112L
+#define __POSIX_VISIBLE 200112
+#elif (_POSIX_C_SOURCE - 0) >= 199506L
+#define __POSIX_VISIBLE 199506
+#elif (_POSIX_C_SOURCE - 0) >= 199309L
+#define __POSIX_VISIBLE 199309
+#elif (_POSIX_C_SOURCE - 0) >= 2 || defined(_XOPEN_SOURCE)
+#define __POSIX_VISIBLE 199209
+#elif defined(_POSIX_SOURCE) || defined(_POSIX_C_SOURCE)
+#define __POSIX_VISIBLE 199009
+#else
+#define __POSIX_VISIBLE 0
+#endif
+
+#ifdef _DEFAULT_SOURCE
+#define __SVID_VISIBLE 1
+#else
+#define __SVID_VISIBLE 0
+#endif
+
+#if (_XOPEN_SOURCE - 0) >= 700
+#define __XSI_VISIBLE 700
+#elif (_XOPEN_SOURCE - 0) >= 600
+#define __XSI_VISIBLE 600
+#elif (_XOPEN_SOURCE - 0) >= 500
+#define __XSI_VISIBLE 500
+#elif defined(_XOPEN_SOURCE) && defined(_XOPEN_SOURCE_EXTENDED)
+#define __XSI_VISIBLE 4
+#elif defined(_XOPEN_SOURCE)
+#define __XSI_VISIBLE 1
+#else
+#define __XSI_VISIBLE 0
+#endif
+
/* RTEMS adheres to POSIX -- 1003.1b with some features from annexes. */
#ifdef __rtems__
@@ -105,62 +382,82 @@ extern "C" {
#ifdef __CYGWIN__
-#if !defined(__STRICT_ANSI__) || defined(__cplusplus) || __STDC_VERSION__ >= 199901L
+#if __POSIX_VISIBLE >= 200809
+#define _POSIX_VERSION 200809L
+#define _POSIX2_VERSION 200809L
+#elif __POSIX_VISIBLE >= 200112
#define _POSIX_VERSION 200112L
#define _POSIX2_VERSION 200112L
-#define _XOPEN_VERSION 600
+#elif __POSIX_VISIBLE >= 199506
+#define _POSIX_VERSION 199506L
+#define _POSIX2_VERSION 199506L
+#elif __POSIX_VISIBLE >= 199309
+#define _POSIX_VERSION 199309L
+#define _POSIX2_VERSION 199209L
+#elif __POSIX_VISIBLE >= 199209
+#define _POSIX_VERSION 199009L
+#define _POSIX2_VERSION 199209L
+#elif __POSIX_VISIBLE
+#define _POSIX_VERSION 199009L
+#endif
+#if __XSI_VISIBLE >= 4
+#define _XOPEN_VERSION __XSI_VISIBLE
+#endif
-#define _POSIX_ADVISORY_INFO 200112L
+#define _POSIX_ADVISORY_INFO 200809L
/* #define _POSIX_ASYNCHRONOUS_IO -1 */
-/* #define _POSIX_BARRIERS -1 */
+#define _POSIX_BARRIERS 200809L
#define _POSIX_CHOWN_RESTRICTED 1
-#define _POSIX_CLOCK_SELECTION 200112L
-#define _POSIX_CPUTIME 200112L
-#define _POSIX_FSYNC 200112L
-#define _POSIX_IPV6 200112L
+#define _POSIX_CLOCK_SELECTION 200809L
+#define _POSIX_CPUTIME 200809L
+#define _POSIX_FSYNC 200809L
+#define _POSIX_IPV6 200809L
#define _POSIX_JOB_CONTROL 1
-#define _POSIX_MAPPED_FILES 200112L
+#define _POSIX_MAPPED_FILES 200809L
/* #define _POSIX_MEMLOCK -1 */
-#define _POSIX_MEMLOCK_RANGE 200112L
-#define _POSIX_MEMORY_PROTECTION 200112L
-#define _POSIX_MESSAGE_PASSING 200112L
-#define _POSIX_MONOTONIC_CLOCK 200112L
+#define _POSIX_MEMLOCK_RANGE 200809L
+#define _POSIX_MEMORY_PROTECTION 200809L
+#define _POSIX_MESSAGE_PASSING 200809L
+#define _POSIX_MONOTONIC_CLOCK 200809L
#define _POSIX_NO_TRUNC 1
/* #define _POSIX_PRIORITIZED_IO -1 */
-#define _POSIX_PRIORITY_SCHEDULING 200112L
-#define _POSIX_RAW_SOCKETS 200112L
-#define _POSIX_READER_WRITER_LOCKS 200112L
-#define _POSIX_REALTIME_SIGNALS 200112L
+#define _POSIX_PRIORITY_SCHEDULING 200809L
+#define _POSIX_RAW_SOCKETS 200809L
+#define _POSIX_READER_WRITER_LOCKS 200809L
+#define _POSIX_REALTIME_SIGNALS 200809L
#define _POSIX_REGEXP 1
#define _POSIX_SAVED_IDS 1
-#define _POSIX_SEMAPHORES 200112L
-#define _POSIX_SHARED_MEMORY_OBJECTS 200112L
+#define _POSIX_SEMAPHORES 200809L
+#define _POSIX_SHARED_MEMORY_OBJECTS 200809L
#define _POSIX_SHELL 1
-/* #define _POSIX_SPAWN -1 */
-#define _POSIX_SPIN_LOCKS 200112L
+#define _POSIX_SPAWN 200809L
+#define _POSIX_SPIN_LOCKS 200809L
/* #define _POSIX_SPORADIC_SERVER -1 */
-#define _POSIX_SYNCHRONIZED_IO 200112L
-#define _POSIX_THREAD_ATTR_STACKADDR 200112L
-#define _POSIX_THREAD_ATTR_STACKSIZE 200112L
-#define _POSIX_THREAD_CPUTIME 200112L
+#define _POSIX_SYNCHRONIZED_IO 200809L
+#define _POSIX_THREAD_ATTR_STACKADDR 200809L
+#define _POSIX_THREAD_ATTR_STACKSIZE 200809L
+#define _POSIX_THREAD_CPUTIME 200809L
/* #define _POSIX_THREAD_PRIO_INHERIT -1 */
/* #define _POSIX_THREAD_PRIO_PROTECT -1 */
-#define _POSIX_THREAD_PRIORITY_SCHEDULING 200112L
-#define _POSIX_THREAD_PROCESS_SHARED 200112L
-#define _POSIX_THREAD_SAFE_FUNCTIONS 200112L
+#define _POSIX_THREAD_PRIORITY_SCHEDULING 200809L
+#define _POSIX_THREAD_PROCESS_SHARED 200809L
+#define _POSIX_THREAD_SAFE_FUNCTIONS 200809L
/* #define _POSIX_THREAD_SPORADIC_SERVER -1 */
-#define _POSIX_THREADS 200112L
+#define _POSIX_THREADS 200809L
/* #define _POSIX_TIMEOUTS -1 */
-#define _POSIX_TIMERS 1
+#define _POSIX_TIMERS 200809L
/* #define _POSIX_TRACE -1 */
/* #define _POSIX_TRACE_EVENT_FILTER -1 */
/* #define _POSIX_TRACE_INHERIT -1 */
/* #define _POSIX_TRACE_LOG -1 */
/* #define _POSIX_TYPED_MEMORY_OBJECTS -1 */
#define _POSIX_VDISABLE '\0'
-#define _POSIX2_C_BIND 200112L
-#define _POSIX2_C_DEV 200112L
-#define _POSIX2_CHAR_TERM 200112L
+
+#if __POSIX_VISIBLE >= 2
+#define _POSIX2_C_VERSION _POSIX2_VERSION
+#define _POSIX2_C_BIND _POSIX2_VERSION
+#define _POSIX2_C_DEV _POSIX2_VERSION
+#define _POSIX2_CHAR_TERM _POSIX2_VERSION
/* #define _POSIX2_FORT_DEV -1 */
/* #define _POSIX2_FORT_RUN -1 */
/* #define _POSIX2_LOCALEDEF -1 */
@@ -170,8 +467,10 @@ extern "C" {
/* #define _POSIX2_PBS_LOCATE -1 */
/* #define _POSIX2_PBS_MESSAGE -1 */
/* #define _POSIX2_PBS_TRACK -1 */
-#define _POSIX2_SW_DEV 200112L
-#define _POSIX2_UPE 200112L
+#define _POSIX2_SW_DEV _POSIX2_VERSION
+#define _POSIX2_UPE _POSIX2_VERSION
+#endif /* __POSIX_VISIBLE >= 2 */
+
#define _POSIX_V6_ILP32_OFF32 -1
#ifdef __LP64__
#define _POSIX_V6_ILP32_OFFBIG -1
@@ -182,10 +481,16 @@ extern "C" {
#define _POSIX_V6_LP64_OFF64 -1
#define _POSIX_V6_LPBIG_OFFBIG -1
#endif
+#define _POSIX_V7_ILP32_OFF32 _POSIX_V6_ILP32_OFF32
+#define _POSIX_V7_ILP32_OFFBIG _POSIX_V6_ILP32_OFFBIG
+#define _POSIX_V7_LP64_OFF64 _POSIX_V6_LP64_OFF64
+#define _POSIX_V7_LPBIG_OFFBIG _POSIX_V6_LPBIG_OFFBIG
#define _XBS5_ILP32_OFF32 _POSIX_V6_ILP32_OFF32
#define _XBS5_ILP32_OFFBIG _POSIX_V6_ILP32_OFFBIG
#define _XBS5_LP64_OFF64 _POSIX_V6_LP64_OFF64
#define _XBS5_LPBIG_OFFBIG _POSIX_V6_LPBIG_OFFBIG
+
+#if __XSI_VISIBLE
#define _XOPEN_CRYPT 1
#define _XOPEN_ENH_I18N 1
/* #define _XOPEN_LEGACY -1 */
@@ -194,8 +499,7 @@ extern "C" {
#define _XOPEN_SHM 1
/* #define _XOPEN_STREAMS -1 */
/* #define _XOPEN_UNIX -1 */
-
-#endif /* !__STRICT_ANSI__ || __cplusplus || __STDC_VERSION__ >= 199901L */
+#endif /* __XSI_VISIBLE */
/* The value corresponds to UNICODE version 4.0, which is the version
supported by XP. Newlib supports 5.2 (2011) but so far Cygwin needs
@@ -204,25 +508,6 @@ extern "C" {
#endif /* __CYGWIN__ */
-/* Per the permission given in POSIX.1-2008 section 2.2.1, define
- * _POSIX_C_SOURCE if _XOPEN_SOURCE is defined and _POSIX_C_SOURCE is not.
- * (_XOPEN_SOURCE indicates that XSI extensions are desired by an application.)
- * This permission is first granted in 2008, but use it for older ones, also.
- * Allow for _XOPEN_SOURCE to be empty (from the earliest form of it, before it
- * was required to have specific values).
- */
-#if !defined(_POSIX_C_SOURCE) && defined(_XOPEN_SOURCE)
- #if (_XOPEN_SOURCE - 0) == 700 /* POSIX.1-2008 */
- #define _POSIX_C_SOURCE 200809L
- #elif (_XOPEN_SOURCE - 0) == 600 /* POSIX.1-2001 or 2004 */
- #define _POSIX_C_SOURCE 200112L
- #elif (_XOPEN_SOURCE - 0) == 500 /* POSIX.1-1995 */
- #define _POSIX_C_SOURCE 199506L
- #elif (_XOPEN_SOURCE - 0) < 500 /* really old */
- #define _POSIX_C_SOURCE 2
- #endif
-#endif
-
#ifdef __cplusplus
}
#endif
diff --git a/newlib/libc/include/sys/param.h b/newlib/libc/include/sys/param.h
index 7e8762a65..9a6f115a6 100644
--- a/newlib/libc/include/sys/param.h
+++ b/newlib/libc/include/sys/param.h
@@ -6,9 +6,13 @@
# define _SYS_PARAM_H
#include <sys/config.h>
+#include <sys/syslimits.h>
#include <machine/endian.h>
#include <machine/param.h>
+#ifndef NBBY
+# define NBBY 8 /* number of bits in a byte */
+#endif
#ifndef HZ
# define HZ (60)
#endif
@@ -19,7 +23,13 @@
# define PATHSIZE (1024)
#endif
+#define MAXPATHLEN PATH_MAX
+
#define MAX(a,b) ((a) > (b) ? (a) : (b))
#define MIN(a,b) ((a) < (b) ? (a) : (b))
+#ifndef howmany
+#define howmany(x, y) (((x)+((y)-1))/(y))
+#endif
+
#endif
diff --git a/newlib/libc/include/sys/reent.h b/newlib/libc/include/sys/reent.h
index c8ef6302f..5481ca234 100644
--- a/newlib/libc/include/sys/reent.h
+++ b/newlib/libc/include/sys/reent.h
@@ -11,6 +11,7 @@ extern "C" {
#define _SYS_REENT_H_
#include <_ansi.h>
+#include <stddef.h>
#include <sys/_types.h>
#define _NULL 0
@@ -192,9 +193,10 @@ struct __sFILE {
_PTR _cookie; /* cookie passed to io functions */
_READ_WRITE_RETURN_TYPE _EXFNPTR(_read, (struct _reent *, _PTR,
- char *, int));
+ char *, _READ_WRITE_BUFSIZE_TYPE));
_READ_WRITE_RETURN_TYPE _EXFNPTR(_write, (struct _reent *, _PTR,
- const char *, int));
+ const char *,
+ _READ_WRITE_BUFSIZE_TYPE));
_fpos_t _EXFNPTR(_seek, (struct _reent *, _PTR, _fpos_t, int));
int _EXFNPTR(_close, (struct _reent *, _PTR));
@@ -247,9 +249,10 @@ struct __sFILE64 {
_PTR _cookie; /* cookie passed to io functions */
_READ_WRITE_RETURN_TYPE _EXFNPTR(_read, (struct _reent *, _PTR,
- char *, int));
+ char *, _READ_WRITE_BUFSIZE_TYPE));
_READ_WRITE_RETURN_TYPE _EXFNPTR(_write, (struct _reent *, _PTR,
- const char *, int));
+ const char *,
+ _READ_WRITE_BUFSIZE_TYPE));
_fpos_t _EXFNPTR(_seek, (struct _reent *, _PTR, _fpos_t, int));
int _EXFNPTR(_close, (struct _reent *, _PTR));
@@ -443,9 +446,8 @@ extern const struct __sFILE_fake __sf_fake_stderr;
_NULL \
}
-#define _REENT_INIT_PTR(var) \
- { memset((var), 0, sizeof(*(var))); \
- (var)->_stdin = (__FILE *)&__sf_fake_stdin; \
+#define _REENT_INIT_PTR_ZEROED(var) \
+ { (var)->_stdin = (__FILE *)&__sf_fake_stdin; \
(var)->_stdout = (__FILE *)&__sf_fake_stdout; \
(var)->_stderr = (__FILE *)&__sf_fake_stderr; \
(var)->_current_locale = "C"; \
@@ -691,9 +693,8 @@ struct _reent
{_NULL, 0, _NULL} \
}
-#define _REENT_INIT_PTR(var) \
- { memset((var), 0, sizeof(*(var))); \
- (var)->_stdin = &(var)->__sf[0]; \
+#define _REENT_INIT_PTR_ZEROED(var) \
+ { (var)->_stdin = &(var)->__sf[0]; \
(var)->_stdout = &(var)->__sf[1]; \
(var)->_stderr = &(var)->__sf[2]; \
(var)->_current_locale = "C"; \
@@ -742,6 +743,11 @@ struct _reent
#endif /* !_REENT_SMALL */
+#define _REENT_INIT_PTR(var) \
+ { memset((var), 0, sizeof(*(var))); \
+ _REENT_INIT_PTR_ZEROED(var); \
+ }
+
/* This value is used in stdlib/misc.c. reent/reent.c has to know it
as well to make sure the freelist is correctly free'd. Therefore
we define it here, rather than in stdlib/misc.c, as before. */
diff --git a/newlib/libc/include/sys/resource.h b/newlib/libc/include/sys/resource.h
index eb827552c..c35ac2a46 100644
--- a/newlib/libc/include/sys/resource.h
+++ b/newlib/libc/include/sys/resource.h
@@ -11,5 +11,7 @@ struct rusage {
struct timeval ru_stime; /* system time used */
};
+int _EXFUN(getrusage, (int, struct rusage*));
+
#endif
diff --git a/newlib/libc/include/sys/sched.h b/newlib/libc/include/sys/sched.h
index 58f99d682..4adb6e2d6 100644
--- a/newlib/libc/include/sys/sched.h
+++ b/newlib/libc/include/sys/sched.h
@@ -21,6 +21,8 @@
#ifndef _SYS_SCHED_H_
#define _SYS_SCHED_H_
+#include <sys/_timespec.h>
+
#ifdef __cplusplus
extern "C" {
#endif
diff --git a/newlib/libc/include/sys/select.h b/newlib/libc/include/sys/select.h
new file mode 100644
index 000000000..f5dc58688
--- /dev/null
+++ b/newlib/libc/include/sys/select.h
@@ -0,0 +1,87 @@
+/* select.h
+ Copyright 1998, 1999, 2000, 2001, 2005, 2009 Red Hat, Inc.
+
+ Written by Geoffrey Noer <noer@cygnus.com>
+
+This file is part of Cygwin.
+
+This software is a copyrighted work licensed under the terms of the
+Cygwin license. Please consult the file "CYGWIN_LICENSE" for
+details. */
+
+#ifndef _SYS_SELECT_H
+#define _SYS_SELECT_H
+
+/* We don't define fd_set and friends if we are compiling POSIX
+ source, or if we have included (or may include as indicated
+ by __USE_W32_SOCKETS) the W32api winsock[2].h header which
+ defines Windows versions of them. Note that a program which
+ includes the W32api winsock[2].h header must know what it is doing;
+ it must not call the Cygwin select function.
+*/
+# if !(defined (_WINSOCK_H) || defined (_WINSOCKAPI_) || defined (__USE_W32_SOCKETS))
+
+#include <sys/cdefs.h>
+#include <sys/_sigset.h>
+#include <sys/_timeval.h>
+#include <sys/timespec.h>
+
+#if !defined(_SIGSET_T_DECLARED)
+#define _SIGSET_T_DECLARED
+typedef __sigset_t sigset_t;
+#endif
+
+# define _SYS_TYPES_FD_SET
+/*
+ * Select uses bit masks of file descriptors in longs.
+ * These macros manipulate such bit fields (the filesystem macros use chars).
+ * FD_SETSIZE may be defined by the user, but the default here
+ * should be >= NOFILE (param.h).
+ */
+# ifndef FD_SETSIZE
+# define FD_SETSIZE 64
+# endif
+
+typedef unsigned long fd_mask;
+# define NFDBITS (sizeof (fd_mask) * 8) /* bits per mask */
+# ifndef _howmany
+# define _howmany(x,y) (((x)+((y)-1))/(y))
+# endif
+
+/* We use a macro for fd_set so that including Sockets.h afterwards
+ can work. */
+typedef struct _types_fd_set {
+ fd_mask fds_bits[_howmany(FD_SETSIZE, NFDBITS)];
+} _types_fd_set;
+
+#define fd_set _types_fd_set
+
+# define FD_SET(n, p) ((p)->fds_bits[(n)/NFDBITS] |= (1L << ((n) % NFDBITS)))
+# define FD_CLR(n, p) ((p)->fds_bits[(n)/NFDBITS] &= ~(1L << ((n) % NFDBITS)))
+# define FD_ISSET(n, p) ((p)->fds_bits[(n)/NFDBITS] & (1L << ((n) % NFDBITS)))
+# define FD_ZERO(p) (__extension__ (void)({ \
+ size_t __i; \
+ char *__tmp = (char *)p; \
+ for (__i = 0; __i < sizeof (*(p)); ++__i) \
+ *__tmp++ = 0; \
+}))
+
+#if !defined (__INSIDE_CYGWIN_NET__)
+
+__BEGIN_DECLS
+
+int select __P ((int __n, fd_set *__readfds, fd_set *__writefds,
+ fd_set *__exceptfds, struct timeval *__timeout));
+#if __POSIX_VISIBLE >= 200112
+int pselect __P ((int __n, fd_set *__readfds, fd_set *__writefds,
+ fd_set *__exceptfds, const struct timespec *__timeout,
+ const sigset_t *__set));
+#endif
+
+__END_DECLS
+
+#endif /* !__INSIDE_CYGWIN_NET__ */
+
+#endif /* !(_WINSOCK_H || _WINSOCKAPI_ || __USE_W32_SOCKETS) */
+
+#endif /* sys/select.h */
diff --git a/newlib/libc/include/sys/signal.h b/newlib/libc/include/sys/signal.h
index 3d6ba0831..8d1b53fce 100644
--- a/newlib/libc/include/sys/signal.h
+++ b/newlib/libc/include/sys/signal.h
@@ -7,14 +7,15 @@ extern "C" {
#endif
#include "_ansi.h"
+#include <sys/cdefs.h>
#include <sys/features.h>
#include <sys/types.h>
+#include <sys/_sigset.h>
+#include <sys/_timespec.h>
-/* #ifndef __STRICT_ANSI__*/
-
-/* Cygwin defines it's own sigset_t in include/cygwin/signal.h */
-#ifndef __CYGWIN__
-typedef unsigned long sigset_t;
+#if !defined(_SIGSET_T_DECLARED)
+#define _SIGSET_T_DECLARED
+typedef __sigset_t sigset_t;
#endif
#if defined(__rtems__)
@@ -71,9 +72,12 @@ typedef struct {
/* 3.3.8 Synchronously Accept a Signal, P1003.1b-1993, p. 76 */
-#define SA_NOCLDSTOP 1 /* Do not generate SIGCHLD when children stop */
-#define SA_SIGINFO 2 /* Invoke the signal catching function with */
- /* three arguments instead of one. */
+#define SA_NOCLDSTOP 0x1 /* Do not generate SIGCHLD when children stop */
+#define SA_SIGINFO 0x2 /* Invoke the signal catching function with */
+ /* three arguments instead of one. */
+#if __BSD_VISIBLE || __XSI_VISIBLE >= 4 || __POSIX_VISIBLE >= 200809
+#define SA_ONSTACK 0x4 /* Signal delivery will be on a separate stack. */
+#endif
/* struct sigaction notes from POSIX:
*
@@ -119,37 +123,54 @@ struct sigaction
};
#endif /* defined(__rtems__) */
+#if __BSD_VISIBLE || __XSI_VISIBLE >= 4 || __POSIX_VISIBLE >= 200809
+/*
+ * Minimum and default signal stack constants. Allow for target overrides
+ * from <sys/features.h>.
+ */
+#ifndef MINSIGSTKSZ
+#define MINSIGSTKSZ 2048
+#endif
+#ifndef SIGSTKSZ
+#define SIGSTKSZ 8192
+#endif
+
+/*
+ * Possible values for ss_flags in stack_t below.
+ */
+#define SS_ONSTACK 0x1
+#define SS_DISABLE 0x2
+
+#endif
+
+/*
+ * Structure used in sigaltstack call.
+ */
+typedef struct sigaltstack {
+ void *ss_sp; /* Stack base or pointer. */
+ int ss_flags; /* Flags. */
+ size_t ss_size; /* Stack size. */
+} stack_t;
+
#define SIG_SETMASK 0 /* set mask with sigprocmask() */
#define SIG_BLOCK 1 /* set of signals to block */
#define SIG_UNBLOCK 2 /* set of signals to, well, unblock */
-/* These depend upon the type of sigset_t, which right now
- is always a long.. They're in the POSIX namespace, but
- are not ANSI. */
-#define sigaddset(what,sig) (*(what) |= (1<<(sig)), 0)
-#define sigdelset(what,sig) (*(what) &= ~(1<<(sig)), 0)
-#define sigemptyset(what) (*(what) = 0, 0)
-#define sigfillset(what) (*(what) = ~(0), 0)
-#define sigismember(what,sig) (((*(what)) & (1<<(sig))) != 0)
-
int _EXFUN(sigprocmask, (int how, const sigset_t *set, sigset_t *oset));
#if defined(_POSIX_THREADS)
int _EXFUN(pthread_sigmask, (int how, const sigset_t *set, sigset_t *oset));
#endif
-/* protos for functions found in winsup sources for CYGWIN */
#if defined(__CYGWIN__) || defined(__rtems__)
-#undef sigaddset
-#undef sigdelset
-#undef sigemptyset
-#undef sigfillset
-#undef sigismember
-
#ifdef _COMPILING_NEWLIB
int _EXFUN(_kill, (pid_t, int));
-#endif
+#endif /* _COMPILING_NEWLIB */
+#endif /* __CYGWIN__ || __rtems__ */
+
int _EXFUN(kill, (pid_t, int));
+
+#if __BSD_VISIBLE || __XSI_VISIBLE >= 4
int _EXFUN(killpg, (pid_t, int));
int _EXFUN(sigaction, (int, const struct sigaction *, struct sigaction *));
int _EXFUN(sigaddset, (sigset_t *, const int));
@@ -161,12 +182,23 @@ int _EXFUN(sigpending, (sigset_t *));
int _EXFUN(sigsuspend, (const sigset_t *));
int _EXFUN(sigpause, (int));
-#if defined(_POSIX_THREADS)
-#ifdef __CYGWIN__
-# ifndef _CYGWIN_TYPES_H
-# error You need the winsup sources or a cygwin installation to compile the cygwin version of newlib.
-# endif
+#if !defined(__CYGWIN__) && !defined(__rtems__)
+/* These depend upon the type of sigset_t, which right now
+ is always a long.. They're in the POSIX namespace, but
+ are not ANSI. */
+#define sigaddset(what,sig) (*(what) |= (1<<(sig)), 0)
+#define sigdelset(what,sig) (*(what) &= ~(1<<(sig)), 0)
+#define sigemptyset(what) (*(what) = 0, 0)
+#define sigfillset(what) (*(what) = ~(0), 0)
+#define sigismember(what,sig) (((*(what)) & (1<<(sig))) != 0)
+#endif /* !__CYGWIN__ && !__rtems__ */
+#endif /* __BSD_VISIBLE || __XSI_VISIBLE >= 4 */
+
+#if __BSD_VISIBLE || __XSI_VISIBLE >= 4 || __POSIX_VISIBLE >= 200809
+int _EXFUN(sigaltstack, (const stack_t *__restrict, stack_t *__restrict));
#endif
+
+#if defined(_POSIX_THREADS)
int _EXFUN(pthread_kill, (pthread_t thread, int sig));
#endif
@@ -186,10 +218,6 @@ int _EXFUN(sigqueue, (pid_t pid, int signo, const union sigval value));
#endif /* defined(_POSIX_REALTIME_SIGNALS) */
-#endif /* defined(__CYGWIN__) || defined(__rtems__) */
-
-/* #endif __STRICT_ANSI__ */
-
#if defined(___AM29K__)
/* These all need to be defined for ANSI C, but I don't think they are
meaningful. */
@@ -309,6 +337,12 @@ int _EXFUN(sigqueue, (pid_t pid, int signo, const union sigval value));
}
#endif
+#if defined(__CYGWIN__)
+#if __XSI_VISIBLE >= 4 || __POSIX_VISIBLE >= 200809
+#include <sys/ucontext.h>
+#endif
+#endif
+
#ifndef _SIGNAL_H_
/* Some applications take advantage of the fact that <sys/signal.h>
* and <signal.h> are equivalent in glibc. Allow for that here. */
diff --git a/newlib/libc/include/sys/stat.h b/newlib/libc/include/sys/stat.h
index 937bcacd2..94a90c0dd 100644
--- a/newlib/libc/include/sys/stat.h
+++ b/newlib/libc/include/sys/stat.h
@@ -7,7 +7,9 @@ extern "C" {
#include <_ansi.h>
#include <time.h>
+#include <sys/cdefs.h>
#include <sys/types.h>
+#include <sys/_timespec.h>
/* dj's stat defines _STAT_H_ */
#ifndef _STAT_H_
@@ -51,8 +53,8 @@ struct stat
long st_spare2;
time_t st_ctime;
long st_spare3;
- long st_blksize;
- long st_blocks;
+ blksize_t st_blksize;
+ blkcnt_t st_blocks;
long st_spare4[2];
#endif
#endif
@@ -80,12 +82,12 @@ struct stat
#define S_ISUID 0004000 /* set user id on execution */
#define S_ISGID 0002000 /* set group id on execution */
#define S_ISVTX 0001000 /* save swapped text even after use */
-#ifndef _POSIX_SOURCE
+#if __BSD_VISIBLE
#define S_IREAD 0000400 /* read permission, owner */
#define S_IWRITE 0000200 /* write permission, owner */
#define S_IEXEC 0000100 /* execute/search permission, owner */
#define S_ENFMT 0002000 /* enforcement-mode locking */
-#endif /* !_POSIX_SOURCE */
+#endif /* !_BSD_VISIBLE */
#define S_IFMT _IFMT
#define S_IFDIR _IFDIR
@@ -122,7 +124,7 @@ struct stat
#define S_IWOTH 0000002 /* write permission, other */
#define S_IXOTH 0000001/* execute/search permission, other */
-#ifndef _POSIX_SOURCE
+#if __BSD_VISIBLE
#define ACCESSPERMS (S_IRWXU | S_IRWXG | S_IRWXO) /* 0777 */
#define ALLPERMS (S_ISUID | S_ISGID | S_ISVTX | S_IRWXU | S_IRWXG | S_IRWXO) /* 07777 */
#define DEFFILEMODE (S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH | S_IWOTH) /* 0666 */
@@ -147,21 +149,23 @@ int _EXFUN(fchmod,(int __fd, mode_t __mode));
int _EXFUN(fstat,( int __fd, struct stat *__sbuf ));
int _EXFUN(mkdir,( const char *_path, mode_t __mode ));
int _EXFUN(mkfifo,( const char *__path, mode_t __mode ));
-int _EXFUN(stat,( const char *__path, struct stat *__sbuf ));
+int _EXFUN(stat,( const char *__restrict __path, struct stat *__restrict __sbuf ));
mode_t _EXFUN(umask,( mode_t __mask ));
#if defined (__SPU__) || defined(__rtems__) || defined(__CYGWIN__) && !defined(__INSIDE_CYGWIN__)
-int _EXFUN(lstat,( const char *__path, struct stat *__buf ));
+int _EXFUN(lstat,( const char *__restrict __path, struct stat *__restrict __buf ));
int _EXFUN(mknod,( const char *__path, mode_t __mode, dev_t __dev ));
#endif
-#if defined (__CYGWIN__) && !defined(__INSIDE_CYGWIN__)
+#if __ATFILE_VISIBLE && !defined(__INSIDE_CYGWIN__)
int _EXFUN(fchmodat, (int, const char *, mode_t, int));
-int _EXFUN(fstatat, (int, const char *, struct stat *, int));
+int _EXFUN(fstatat, (int, const char *__restrict , struct stat *__restrict, int));
int _EXFUN(mkdirat, (int, const char *, mode_t));
int _EXFUN(mkfifoat, (int, const char *, mode_t));
int _EXFUN(mknodat, (int, const char *, mode_t, dev_t));
int _EXFUN(utimensat, (int, const char *, const struct timespec *, int));
+#endif
+#if __POSIX_VISIBLE >= 200809 && !defined(__INSIDE_CYGWIN__)
int _EXFUN(futimens, (int, const struct timespec *));
#endif
@@ -169,11 +173,11 @@ int _EXFUN(futimens, (int, const struct timespec *));
provided in newlib for some compilers. */
#ifdef _COMPILING_NEWLIB
int _EXFUN(_fstat,( int __fd, struct stat *__sbuf ));
-int _EXFUN(_stat,( const char *__path, struct stat *__sbuf ));
+int _EXFUN(_stat,( const char *__restrict __path, struct stat *__restrict __sbuf ));
int _EXFUN(_mkdir,( const char *_path, mode_t __mode ));
#ifdef __LARGE64_FILES
struct stat64;
-int _EXFUN(_stat64,( const char *__path, struct stat64 *__sbuf ));
+int _EXFUN(_stat64,( const char *__restrict __path, struct stat64 *__restrict __sbuf ));
int _EXFUN(_fstat64,( int __fd, struct stat64 *__sbuf ));
#endif
#endif
diff --git a/newlib/libc/include/sys/time.h b/newlib/libc/include/sys/time.h
index 120ef553a..5fdb6673b 100644
--- a/newlib/libc/include/sys/time.h
+++ b/newlib/libc/include/sys/time.h
@@ -2,86 +2,301 @@
Written by Geoffrey Noer <noer@cygnus.com>
Public domain; no rights reserved. */
+/*-
+ * Copyright (c) 1982, 1986, 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.
+ * 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.
+ *
+ * @(#)time.h 8.5 (Berkeley) 5/4/95
+ * $FreeBSD$
+ */
+
#ifndef _SYS_TIME_H_
-#define _SYS_TIME_H_
+#define _SYS_TIME_H_
#include <_ansi.h>
+#include <sys/cdefs.h>
+#include <sys/_timeval.h>
#include <sys/types.h>
+#include <sys/timespec.h>
-#ifdef __cplusplus
-extern "C" {
+#if __BSD_VISIBLE || __POSIX_VISIBLE >= 200112 || __XSI_VISIBLE
+#include <sys/select.h>
#endif
-#ifndef _TIMEVAL_DEFINED
-#define _TIMEVAL_DEFINED
-struct timeval {
- time_t tv_sec;
- suseconds_t tv_usec;
+struct timezone {
+ int tz_minuteswest; /* minutes west of Greenwich */
+ int tz_dsttime; /* type of dst correction */
};
+#define DST_NONE 0 /* not on dst */
+#define DST_USA 1 /* USA style dst */
+#define DST_AUST 2 /* Australian style dst */
+#define DST_WET 3 /* Western European dst */
+#define DST_MET 4 /* Middle European dst */
+#define DST_EET 5 /* Eastern European dst */
+#define DST_CAN 6 /* Canada */
-/* BSD time macros used by RTEMS code */
-#if defined (__rtems__) || defined (__CYGWIN__)
-
-/* Convenience macros for operations on timevals.
- NOTE: `timercmp' does not work for >= or <=. */
-#define timerisset(tvp) ((tvp)->tv_sec || (tvp)->tv_usec)
-#define timerclear(tvp) ((tvp)->tv_sec = (tvp)->tv_usec = 0)
-#define timercmp(a, b, CMP) \
- (((a)->tv_sec == (b)->tv_sec) ? \
- ((a)->tv_usec CMP (b)->tv_usec) : \
- ((a)->tv_sec CMP (b)->tv_sec))
-#define timeradd(a, b, result) \
- do { \
- (result)->tv_sec = (a)->tv_sec + (b)->tv_sec; \
- (result)->tv_usec = (a)->tv_usec + (b)->tv_usec; \
- if ((result)->tv_usec >= 1000000) \
- { \
- ++(result)->tv_sec; \
- (result)->tv_usec -= 1000000; \
- } \
- } while (0)
-#define timersub(a, b, result) \
- do { \
- (result)->tv_sec = (a)->tv_sec - (b)->tv_sec; \
- (result)->tv_usec = (a)->tv_usec - (b)->tv_usec; \
- if ((result)->tv_usec < 0) { \
- --(result)->tv_sec; \
- (result)->tv_usec += 1000000; \
- } \
- } while (0)
-#endif /* defined (__rtems__) || defined (__CYGWIN__) */
-#endif /* !_TIMEVAL_DEFINED */
-
-struct timezone {
- int tz_minuteswest;
- int tz_dsttime;
+#if __BSD_VISIBLE
+struct bintime {
+ time_t sec;
+ uint64_t frac;
};
-#ifdef __CYGWIN__
-#include <cygwin/sys_time.h>
-#endif /* __CYGWIN__ */
+static __inline void
+bintime_addx(struct bintime *_bt, uint64_t _x)
+{
+ uint64_t _u;
+
+ _u = _bt->frac;
+ _bt->frac += _x;
+ if (_u > _bt->frac)
+ _bt->sec++;
+}
+
+static __inline void
+bintime_add(struct bintime *_bt, const struct bintime *_bt2)
+{
+ uint64_t _u;
+
+ _u = _bt->frac;
+ _bt->frac += _bt2->frac;
+ if (_u > _bt->frac)
+ _bt->sec++;
+ _bt->sec += _bt2->sec;
+}
+
+static __inline void
+bintime_sub(struct bintime *_bt, const struct bintime *_bt2)
+{
+ uint64_t _u;
+
+ _u = _bt->frac;
+ _bt->frac -= _bt2->frac;
+ if (_u < _bt->frac)
+ _bt->sec--;
+ _bt->sec -= _bt2->sec;
+}
+
+static __inline void
+bintime_mul(struct bintime *_bt, u_int _x)
+{
+ uint64_t _p1, _p2;
+
+ _p1 = (_bt->frac & 0xffffffffull) * _x;
+ _p2 = (_bt->frac >> 32) * _x + (_p1 >> 32);
+ _bt->sec *= _x;
+ _bt->sec += (_p2 >> 32);
+ _bt->frac = (_p2 << 32) | (_p1 & 0xffffffffull);
+}
+
+static __inline void
+bintime_shift(struct bintime *_bt, int _exp)
+{
+
+ if (_exp > 0) {
+ _bt->sec <<= _exp;
+ _bt->sec |= _bt->frac >> (64 - _exp);
+ _bt->frac <<= _exp;
+ } else if (_exp < 0) {
+ _bt->frac >>= -_exp;
+ _bt->frac |= (uint64_t)_bt->sec << (64 + _exp);
+ _bt->sec >>= -_exp;
+ }
+}
+
+#define bintime_clear(a) ((a)->sec = (a)->frac = 0)
+#define bintime_isset(a) ((a)->sec || (a)->frac)
+#define bintime_cmp(a, b, cmp) \
+ (((a)->sec == (b)->sec) ? \
+ ((a)->frac cmp (b)->frac) : \
+ ((a)->sec cmp (b)->sec))
+
+#define SBT_1S ((sbintime_t)1 << 32)
+#define SBT_1M (SBT_1S * 60)
+#define SBT_1MS (SBT_1S / 1000)
+#define SBT_1US (SBT_1S / 1000000)
+#define SBT_1NS (SBT_1S / 1000000000)
+#define SBT_MAX 0x7fffffffffffffffLL
+
+static __inline int
+sbintime_getsec(sbintime_t _sbt)
+{
+
+ return (_sbt >> 32);
+}
+
+static __inline sbintime_t
+bttosbt(const struct bintime _bt)
+{
+
+ return (((sbintime_t)_bt.sec << 32) + (_bt.frac >> 32));
+}
+
+static __inline struct bintime
+sbttobt(sbintime_t _sbt)
+{
+ struct bintime _bt;
+
+ _bt.sec = _sbt >> 32;
+ _bt.frac = _sbt << 32;
+ return (_bt);
+}
+
+/*-
+ * Background information:
+ *
+ * When converting between timestamps on parallel timescales of differing
+ * resolutions it is historical and scientific practice to round down rather
+ * than doing 4/5 rounding.
+ *
+ * The date changes at midnight, not at noon.
+ *
+ * Even at 15:59:59.999999999 it's not four'o'clock.
+ *
+ * time_second ticks after N.999999999 not after N.4999999999
+ */
+
+static __inline void
+bintime2timespec(const struct bintime *_bt, struct timespec *_ts)
+{
+
+ _ts->tv_sec = _bt->sec;
+ _ts->tv_nsec = ((uint64_t)1000000000 *
+ (uint32_t)(_bt->frac >> 32)) >> 32;
+}
+
+static __inline void
+timespec2bintime(const struct timespec *_ts, struct bintime *_bt)
+{
+
+ _bt->sec = _ts->tv_sec;
+ /* 18446744073 = int(2^64 / 1000000000) */
+ _bt->frac = _ts->tv_nsec * (uint64_t)18446744073LL;
+}
+
+static __inline void
+bintime2timeval(const struct bintime *_bt, struct timeval *_tv)
+{
+
+ _tv->tv_sec = _bt->sec;
+ _tv->tv_usec = ((uint64_t)1000000 * (uint32_t)(_bt->frac >> 32)) >> 32;
+}
+
+static __inline void
+timeval2bintime(const struct timeval *_tv, struct bintime *_bt)
+{
+
+ _bt->sec = _tv->tv_sec;
+ /* 18446744073709 = int(2^64 / 1000000) */
+ _bt->frac = _tv->tv_usec * (uint64_t)18446744073709LL;
+}
+
+static __inline struct timespec
+sbttots(sbintime_t _sbt)
+{
+ struct timespec _ts;
+
+ _ts.tv_sec = _sbt >> 32;
+ _ts.tv_nsec = ((uint64_t)1000000000 * (uint32_t)_sbt) >> 32;
+ return (_ts);
+}
+
+static __inline sbintime_t
+tstosbt(struct timespec _ts)
+{
+
+ return (((sbintime_t)_ts.tv_sec << 32) +
+ (_ts.tv_nsec * (((uint64_t)1 << 63) / 500000000) >> 32));
+}
+
+static __inline struct timeval
+sbttotv(sbintime_t _sbt)
+{
+ struct timeval _tv;
+
+ _tv.tv_sec = _sbt >> 32;
+ _tv.tv_usec = ((uint64_t)1000000 * (uint32_t)_sbt) >> 32;
+ return (_tv);
+}
+
+static __inline sbintime_t
+tvtosbt(struct timeval _tv)
+{
+
+ return (((sbintime_t)_tv.tv_sec << 32) +
+ (_tv.tv_usec * (((uint64_t)1 << 63) / 500000) >> 32));
+}
+#endif /* __BSD_VISIBLE */
-#define ITIMER_REAL 0
-#define ITIMER_VIRTUAL 1
-#define ITIMER_PROF 2
+/*
+ * Names of the interval timers, and structure
+ * defining a timer setting.
+ */
+#define ITIMER_REAL 0
+#define ITIMER_VIRTUAL 1
+#define ITIMER_PROF 2
-struct itimerval {
- struct timeval it_interval;
- struct timeval it_value;
+struct itimerval {
+ struct timeval it_interval; /* timer interval */
+ struct timeval it_value; /* current value */
};
-#ifdef _COMPILING_NEWLIB
-int _EXFUN(_gettimeofday, (struct timeval *__p, void *__tz));
-#endif
+#ifndef _KERNEL
+#include <time.h>
-int _EXFUN(gettimeofday, (struct timeval *__p, void *__tz));
-int _EXFUN(settimeofday, (const struct timeval *, const struct timezone *));
+__BEGIN_DECLS
int _EXFUN(utimes, (const char *__path, const struct timeval *__tvp));
+
+#if __BSD_VISIBLE
+int _EXFUN(adjtime, (const struct timeval *, struct timeval *));
+int _EXFUN(futimes, (int, const struct timeval *));
+int _EXFUN(lutimes, (const char *, const struct timeval *));
+int _EXFUN(settimeofday, (const struct timeval *, const struct timezone *));
+#endif
+
+#if __MISC_VISIBLE || __XSI_VISIBLE
int _EXFUN(getitimer, (int __which, struct itimerval *__value));
-int _EXFUN(setitimer, (int __which, const struct itimerval *__value,
- struct itimerval *__ovalue));
+int _EXFUN(setitimer, (int __which, const struct itimerval *__restrict __value,
+ struct itimerval *__restrict __ovalue));
+#endif
-#ifdef __cplusplus
-}
+int _EXFUN(gettimeofday, (struct timeval *__restrict __p,
+ void *__restrict __tz));
+
+#if __GNU_VISIBLE
+int _EXFUN(futimesat, (int, const char *, const struct timeval [2]));
#endif
-#endif /* _SYS_TIME_H_ */
+
+#ifdef _COMPILING_NEWLIB
+int _EXFUN(_gettimeofday, (struct timeval *__p, void *__tz));
+#endif
+
+__END_DECLS
+
+#endif /* !_KERNEL */
+#include <machine/_time.h>
+
+#endif /* !_SYS_TIME_H_ */
diff --git a/newlib/libc/include/sys/timeb.h b/newlib/libc/include/sys/timeb.h
index 0a2c3de8b..793b48143 100644
--- a/newlib/libc/include/sys/timeb.h
+++ b/newlib/libc/include/sys/timeb.h
@@ -15,11 +15,12 @@ extern "C" {
#define _SYS_TIMEB_H
#include <_ansi.h>
-#include <machine/types.h>
+#include <sys/_types.h>
-#ifndef __time_t_defined
-typedef _TIME_T_ time_t;
-#define __time_t_defined
+#if !defined(__time_t_defined) && !defined(_TIME_T_DECLARED)
+typedef _TIME_T_ time_t;
+#define __time_t_defined
+#define _TIME_T_DECLARED
#endif
struct timeb
diff --git a/newlib/libc/include/sys/times.h b/newlib/libc/include/sys/times.h
index 927812cb8..b1f1dc699 100644
--- a/newlib/libc/include/sys/times.h
+++ b/newlib/libc/include/sys/times.h
@@ -5,11 +5,12 @@ extern "C" {
#define _SYS_TIMES_H
#include <_ansi.h>
-#include <machine/types.h>
+#include <sys/_types.h>
-#ifndef __clock_t_defined
-typedef _CLOCK_T_ clock_t;
-#define __clock_t_defined
+#if !defined(__clock_t_defined) && !defined(_CLOCK_T_DECLARED)
+typedef _CLOCK_T_ clock_t;
+#define __clock_t_defined
+#define _CLOCK_T_DECLARED
#endif
/* Get Process Times, P1003.1b-1993, p. 92 */
diff --git a/newlib/libc/include/sys/timespec.h b/newlib/libc/include/sys/timespec.h
new file mode 100644
index 000000000..2505cef89
--- /dev/null
+++ b/newlib/libc/include/sys/timespec.h
@@ -0,0 +1,63 @@
+/*-
+ * Copyright (c) 1982, 1986, 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.
+ * 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.
+ *
+ * @(#)time.h 8.5 (Berkeley) 5/4/95
+ * from: FreeBSD: src/sys/sys/time.h,v 1.43 2000/03/20 14:09:05 phk Exp
+ * $FreeBSD$
+ */
+
+#ifndef _SYS_TIMESPEC_H_
+#define _SYS_TIMESPEC_H_
+
+#include <sys/cdefs.h>
+#include <sys/_timespec.h>
+
+#if __BSD_VISIBLE
+#define TIMEVAL_TO_TIMESPEC(tv, ts) \
+ do { \
+ (ts)->tv_sec = (tv)->tv_sec; \
+ (ts)->tv_nsec = (tv)->tv_usec * 1000; \
+ } while (0)
+#define TIMESPEC_TO_TIMEVAL(tv, ts) \
+ do { \
+ (tv)->tv_sec = (ts)->tv_sec; \
+ (tv)->tv_usec = (ts)->tv_nsec / 1000; \
+ } while (0)
+
+#endif /* __BSD_VISIBLE */
+
+/*
+ * Structure defined by POSIX.1b to be like a itimerval, but with
+ * timespecs. Used in the timer_*() system calls.
+ */
+struct itimerspec {
+ struct timespec it_interval;
+ struct timespec it_value;
+};
+
+#endif /* _SYS_TIMESPEC_H_ */
diff --git a/newlib/libc/include/sys/tree.h b/newlib/libc/include/sys/tree.h
new file mode 100644
index 000000000..f4167c4e4
--- /dev/null
+++ b/newlib/libc/include/sys/tree.h
@@ -0,0 +1,801 @@
+/* $NetBSD: tree.h,v 1.8 2004/03/28 19:38:30 provos Exp $ */
+/* $OpenBSD: tree.h,v 1.7 2002/10/17 21:51:54 art Exp $ */
+/* $FreeBSD$ */
+
+/*-
+ * Copyright 2002 Niels Provos <provos@citi.umich.edu>
+ * 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 ``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 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.
+ */
+
+#ifndef _SYS_TREE_H_
+#define _SYS_TREE_H_
+
+#include <sys/cdefs.h>
+
+/*
+ * This file defines data structures for different types of trees:
+ * splay trees and red-black trees.
+ *
+ * A splay tree is a self-organizing data structure. Every operation
+ * on the tree causes a splay to happen. The splay moves the requested
+ * node to the root of the tree and partly rebalances it.
+ *
+ * This has the benefit that request locality causes faster lookups as
+ * the requested nodes move to the top of the tree. On the other hand,
+ * every lookup causes memory writes.
+ *
+ * The Balance Theorem bounds the total access time for m operations
+ * and n inserts on an initially empty tree as O((m + n)lg n). The
+ * amortized cost for a sequence of m accesses to a splay tree is O(lg n);
+ *
+ * A red-black tree is a binary search tree with the node color as an
+ * extra attribute. It fulfills a set of conditions:
+ * - every search path from the root to a leaf consists of the
+ * same number of black nodes,
+ * - each red node (except for the root) has a black parent,
+ * - each leaf node is black.
+ *
+ * Every operation on a red-black tree is bounded as O(lg n).
+ * The maximum height of a red-black tree is 2lg (n+1).
+ */
+
+#define SPLAY_HEAD(name, type) \
+struct name { \
+ struct type *sph_root; /* root of the tree */ \
+}
+
+#define SPLAY_INITIALIZER(root) \
+ { NULL }
+
+#define SPLAY_INIT(root) do { \
+ (root)->sph_root = NULL; \
+} while (/*CONSTCOND*/ 0)
+
+#define SPLAY_ENTRY(type) \
+struct { \
+ struct type *spe_left; /* left element */ \
+ struct type *spe_right; /* right element */ \
+}
+
+#define SPLAY_LEFT(elm, field) (elm)->field.spe_left
+#define SPLAY_RIGHT(elm, field) (elm)->field.spe_right
+#define SPLAY_ROOT(head) (head)->sph_root
+#define SPLAY_EMPTY(head) (SPLAY_ROOT(head) == NULL)
+
+/* SPLAY_ROTATE_{LEFT,RIGHT} expect that tmp hold SPLAY_{RIGHT,LEFT} */
+#define SPLAY_ROTATE_RIGHT(head, tmp, field) do { \
+ SPLAY_LEFT((head)->sph_root, field) = SPLAY_RIGHT(tmp, field); \
+ SPLAY_RIGHT(tmp, field) = (head)->sph_root; \
+ (head)->sph_root = tmp; \
+} while (/*CONSTCOND*/ 0)
+
+#define SPLAY_ROTATE_LEFT(head, tmp, field) do { \
+ SPLAY_RIGHT((head)->sph_root, field) = SPLAY_LEFT(tmp, field); \
+ SPLAY_LEFT(tmp, field) = (head)->sph_root; \
+ (head)->sph_root = tmp; \
+} while (/*CONSTCOND*/ 0)
+
+#define SPLAY_LINKLEFT(head, tmp, field) do { \
+ SPLAY_LEFT(tmp, field) = (head)->sph_root; \
+ tmp = (head)->sph_root; \
+ (head)->sph_root = SPLAY_LEFT((head)->sph_root, field); \
+} while (/*CONSTCOND*/ 0)
+
+#define SPLAY_LINKRIGHT(head, tmp, field) do { \
+ SPLAY_RIGHT(tmp, field) = (head)->sph_root; \
+ tmp = (head)->sph_root; \
+ (head)->sph_root = SPLAY_RIGHT((head)->sph_root, field); \
+} while (/*CONSTCOND*/ 0)
+
+#define SPLAY_ASSEMBLE(head, node, left, right, field) do { \
+ SPLAY_RIGHT(left, field) = SPLAY_LEFT((head)->sph_root, field); \
+ SPLAY_LEFT(right, field) = SPLAY_RIGHT((head)->sph_root, field);\
+ SPLAY_LEFT((head)->sph_root, field) = SPLAY_RIGHT(node, field); \
+ SPLAY_RIGHT((head)->sph_root, field) = SPLAY_LEFT(node, field); \
+} while (/*CONSTCOND*/ 0)
+
+/* Generates prototypes and inline functions */
+
+#define SPLAY_PROTOTYPE(name, type, field, cmp) \
+void name##_SPLAY(struct name *, struct type *); \
+void name##_SPLAY_MINMAX(struct name *, int); \
+struct type *name##_SPLAY_INSERT(struct name *, struct type *); \
+struct type *name##_SPLAY_REMOVE(struct name *, struct type *); \
+ \
+/* Finds the node with the same key as elm */ \
+static __inline struct type * \
+name##_SPLAY_FIND(struct name *head, struct type *elm) \
+{ \
+ if (SPLAY_EMPTY(head)) \
+ return(NULL); \
+ name##_SPLAY(head, elm); \
+ if ((cmp)(elm, (head)->sph_root) == 0) \
+ return (head->sph_root); \
+ return (NULL); \
+} \
+ \
+static __inline struct type * \
+name##_SPLAY_NEXT(struct name *head, struct type *elm) \
+{ \
+ name##_SPLAY(head, elm); \
+ if (SPLAY_RIGHT(elm, field) != NULL) { \
+ elm = SPLAY_RIGHT(elm, field); \
+ while (SPLAY_LEFT(elm, field) != NULL) { \
+ elm = SPLAY_LEFT(elm, field); \
+ } \
+ } else \
+ elm = NULL; \
+ return (elm); \
+} \
+ \
+static __inline struct type * \
+name##_SPLAY_MIN_MAX(struct name *head, int val) \
+{ \
+ name##_SPLAY_MINMAX(head, val); \
+ return (SPLAY_ROOT(head)); \
+}
+
+/* Main splay operation.
+ * Moves node close to the key of elm to top
+ */
+#define SPLAY_GENERATE(name, type, field, cmp) \
+struct type * \
+name##_SPLAY_INSERT(struct name *head, struct type *elm) \
+{ \
+ if (SPLAY_EMPTY(head)) { \
+ SPLAY_LEFT(elm, field) = SPLAY_RIGHT(elm, field) = NULL; \
+ } else { \
+ int __comp; \
+ name##_SPLAY(head, elm); \
+ __comp = (cmp)(elm, (head)->sph_root); \
+ if(__comp < 0) { \
+ SPLAY_LEFT(elm, field) = SPLAY_LEFT((head)->sph_root, field);\
+ SPLAY_RIGHT(elm, field) = (head)->sph_root; \
+ SPLAY_LEFT((head)->sph_root, field) = NULL; \
+ } else if (__comp > 0) { \
+ SPLAY_RIGHT(elm, field) = SPLAY_RIGHT((head)->sph_root, field);\
+ SPLAY_LEFT(elm, field) = (head)->sph_root; \
+ SPLAY_RIGHT((head)->sph_root, field) = NULL; \
+ } else \
+ return ((head)->sph_root); \
+ } \
+ (head)->sph_root = (elm); \
+ return (NULL); \
+} \
+ \
+struct type * \
+name##_SPLAY_REMOVE(struct name *head, struct type *elm) \
+{ \
+ struct type *__tmp; \
+ if (SPLAY_EMPTY(head)) \
+ return (NULL); \
+ name##_SPLAY(head, elm); \
+ if ((cmp)(elm, (head)->sph_root) == 0) { \
+ if (SPLAY_LEFT((head)->sph_root, field) == NULL) { \
+ (head)->sph_root = SPLAY_RIGHT((head)->sph_root, field);\
+ } else { \
+ __tmp = SPLAY_RIGHT((head)->sph_root, field); \
+ (head)->sph_root = SPLAY_LEFT((head)->sph_root, field);\
+ name##_SPLAY(head, elm); \
+ SPLAY_RIGHT((head)->sph_root, field) = __tmp; \
+ } \
+ return (elm); \
+ } \
+ return (NULL); \
+} \
+ \
+void \
+name##_SPLAY(struct name *head, struct type *elm) \
+{ \
+ struct type __node, *__left, *__right, *__tmp; \
+ int __comp; \
+\
+ SPLAY_LEFT(&__node, field) = SPLAY_RIGHT(&__node, field) = NULL;\
+ __left = __right = &__node; \
+\
+ while ((__comp = (cmp)(elm, (head)->sph_root)) != 0) { \
+ if (__comp < 0) { \
+ __tmp = SPLAY_LEFT((head)->sph_root, field); \
+ if (__tmp == NULL) \
+ break; \
+ if ((cmp)(elm, __tmp) < 0){ \
+ SPLAY_ROTATE_RIGHT(head, __tmp, field); \
+ if (SPLAY_LEFT((head)->sph_root, field) == NULL)\
+ break; \
+ } \
+ SPLAY_LINKLEFT(head, __right, field); \
+ } else if (__comp > 0) { \
+ __tmp = SPLAY_RIGHT((head)->sph_root, field); \
+ if (__tmp == NULL) \
+ break; \
+ if ((cmp)(elm, __tmp) > 0){ \
+ SPLAY_ROTATE_LEFT(head, __tmp, field); \
+ if (SPLAY_RIGHT((head)->sph_root, field) == NULL)\
+ break; \
+ } \
+ SPLAY_LINKRIGHT(head, __left, field); \
+ } \
+ } \
+ SPLAY_ASSEMBLE(head, &__node, __left, __right, field); \
+} \
+ \
+/* Splay with either the minimum or the maximum element \
+ * Used to find minimum or maximum element in tree. \
+ */ \
+void name##_SPLAY_MINMAX(struct name *head, int __comp) \
+{ \
+ struct type __node, *__left, *__right, *__tmp; \
+\
+ SPLAY_LEFT(&__node, field) = SPLAY_RIGHT(&__node, field) = NULL;\
+ __left = __right = &__node; \
+\
+ while (1) { \
+ if (__comp < 0) { \
+ __tmp = SPLAY_LEFT((head)->sph_root, field); \
+ if (__tmp == NULL) \
+ break; \
+ if (__comp < 0){ \
+ SPLAY_ROTATE_RIGHT(head, __tmp, field); \
+ if (SPLAY_LEFT((head)->sph_root, field) == NULL)\
+ break; \
+ } \
+ SPLAY_LINKLEFT(head, __right, field); \
+ } else if (__comp > 0) { \
+ __tmp = SPLAY_RIGHT((head)->sph_root, field); \
+ if (__tmp == NULL) \
+ break; \
+ if (__comp > 0) { \
+ SPLAY_ROTATE_LEFT(head, __tmp, field); \
+ if (SPLAY_RIGHT((head)->sph_root, field) == NULL)\
+ break; \
+ } \
+ SPLAY_LINKRIGHT(head, __left, field); \
+ } \
+ } \
+ SPLAY_ASSEMBLE(head, &__node, __left, __right, field); \
+}
+
+#define SPLAY_NEGINF -1
+#define SPLAY_INF 1
+
+#define SPLAY_INSERT(name, x, y) name##_SPLAY_INSERT(x, y)
+#define SPLAY_REMOVE(name, x, y) name##_SPLAY_REMOVE(x, y)
+#define SPLAY_FIND(name, x, y) name##_SPLAY_FIND(x, y)
+#define SPLAY_NEXT(name, x, y) name##_SPLAY_NEXT(x, y)
+#define SPLAY_MIN(name, x) (SPLAY_EMPTY(x) ? NULL \
+ : name##_SPLAY_MIN_MAX(x, SPLAY_NEGINF))
+#define SPLAY_MAX(name, x) (SPLAY_EMPTY(x) ? NULL \
+ : name##_SPLAY_MIN_MAX(x, SPLAY_INF))
+
+#define SPLAY_FOREACH(x, name, head) \
+ for ((x) = SPLAY_MIN(name, head); \
+ (x) != NULL; \
+ (x) = SPLAY_NEXT(name, head, x))
+
+/* Macros that define a red-black tree */
+#define RB_HEAD(name, type) \
+struct name { \
+ struct type *rbh_root; /* root of the tree */ \
+}
+
+#define RB_INITIALIZER(root) \
+ { NULL }
+
+#define RB_INIT(root) do { \
+ (root)->rbh_root = NULL; \
+} while (/*CONSTCOND*/ 0)
+
+#define RB_BLACK 0
+#define RB_RED 1
+#define RB_ENTRY(type) \
+struct { \
+ struct type *rbe_left; /* left element */ \
+ struct type *rbe_right; /* right element */ \
+ struct type *rbe_parent; /* parent element */ \
+ int rbe_color; /* node color */ \
+}
+
+#define RB_LEFT(elm, field) (elm)->field.rbe_left
+#define RB_RIGHT(elm, field) (elm)->field.rbe_right
+#define RB_PARENT(elm, field) (elm)->field.rbe_parent
+#define RB_COLOR(elm, field) (elm)->field.rbe_color
+#define RB_ROOT(head) (head)->rbh_root
+#define RB_EMPTY(head) (RB_ROOT(head) == NULL)
+
+#define RB_SET(elm, parent, field) do { \
+ RB_PARENT(elm, field) = parent; \
+ RB_LEFT(elm, field) = RB_RIGHT(elm, field) = NULL; \
+ RB_COLOR(elm, field) = RB_RED; \
+} while (/*CONSTCOND*/ 0)
+
+#define RB_SET_BLACKRED(black, red, field) do { \
+ RB_COLOR(black, field) = RB_BLACK; \
+ RB_COLOR(red, field) = RB_RED; \
+} while (/*CONSTCOND*/ 0)
+
+#ifndef RB_AUGMENT
+#define RB_AUGMENT(x) do {} while (0)
+#endif
+
+#define RB_ROTATE_LEFT(head, elm, tmp, field) do { \
+ (tmp) = RB_RIGHT(elm, field); \
+ if ((RB_RIGHT(elm, field) = RB_LEFT(tmp, field)) != NULL) { \
+ RB_PARENT(RB_LEFT(tmp, field), field) = (elm); \
+ } \
+ RB_AUGMENT(elm); \
+ if ((RB_PARENT(tmp, field) = RB_PARENT(elm, field)) != NULL) { \
+ if ((elm) == RB_LEFT(RB_PARENT(elm, field), field)) \
+ RB_LEFT(RB_PARENT(elm, field), field) = (tmp); \
+ else \
+ RB_RIGHT(RB_PARENT(elm, field), field) = (tmp); \
+ } else \
+ (head)->rbh_root = (tmp); \
+ RB_LEFT(tmp, field) = (elm); \
+ RB_PARENT(elm, field) = (tmp); \
+ RB_AUGMENT(tmp); \
+ if ((RB_PARENT(tmp, field))) \
+ RB_AUGMENT(RB_PARENT(tmp, field)); \
+} while (/*CONSTCOND*/ 0)
+
+#define RB_ROTATE_RIGHT(head, elm, tmp, field) do { \
+ (tmp) = RB_LEFT(elm, field); \
+ if ((RB_LEFT(elm, field) = RB_RIGHT(tmp, field)) != NULL) { \
+ RB_PARENT(RB_RIGHT(tmp, field), field) = (elm); \
+ } \
+ RB_AUGMENT(elm); \
+ if ((RB_PARENT(tmp, field) = RB_PARENT(elm, field)) != NULL) { \
+ if ((elm) == RB_LEFT(RB_PARENT(elm, field), field)) \
+ RB_LEFT(RB_PARENT(elm, field), field) = (tmp); \
+ else \
+ RB_RIGHT(RB_PARENT(elm, field), field) = (tmp); \
+ } else \
+ (head)->rbh_root = (tmp); \
+ RB_RIGHT(tmp, field) = (elm); \
+ RB_PARENT(elm, field) = (tmp); \
+ RB_AUGMENT(tmp); \
+ if ((RB_PARENT(tmp, field))) \
+ RB_AUGMENT(RB_PARENT(tmp, field)); \
+} while (/*CONSTCOND*/ 0)
+
+/* Generates prototypes and inline functions */
+#define RB_PROTOTYPE(name, type, field, cmp) \
+ RB_PROTOTYPE_INTERNAL(name, type, field, cmp,)
+#define RB_PROTOTYPE_STATIC(name, type, field, cmp) \
+ RB_PROTOTYPE_INTERNAL(name, type, field, cmp, __unused static)
+#define RB_PROTOTYPE_INTERNAL(name, type, field, cmp, attr) \
+ RB_PROTOTYPE_INSERT_COLOR(name, type, attr); \
+ RB_PROTOTYPE_REMOVE_COLOR(name, type, attr); \
+ RB_PROTOTYPE_INSERT(name, type, attr); \
+ RB_PROTOTYPE_REMOVE(name, type, attr); \
+ RB_PROTOTYPE_FIND(name, type, attr); \
+ RB_PROTOTYPE_NFIND(name, type, attr); \
+ RB_PROTOTYPE_NEXT(name, type, attr); \
+ RB_PROTOTYPE_PREV(name, type, attr); \
+ RB_PROTOTYPE_MINMAX(name, type, attr);
+#define RB_PROTOTYPE_INSERT_COLOR(name, type, attr) \
+ attr void name##_RB_INSERT_COLOR(struct name *, struct type *)
+#define RB_PROTOTYPE_REMOVE_COLOR(name, type, attr) \
+ attr void name##_RB_REMOVE_COLOR(struct name *, struct type *, struct type *)
+#define RB_PROTOTYPE_REMOVE(name, type, attr) \
+ attr struct type *name##_RB_REMOVE(struct name *, struct type *)
+#define RB_PROTOTYPE_INSERT(name, type, attr) \
+ attr struct type *name##_RB_INSERT(struct name *, struct type *)
+#define RB_PROTOTYPE_FIND(name, type, attr) \
+ attr struct type *name##_RB_FIND(struct name *, struct type *)
+#define RB_PROTOTYPE_NFIND(name, type, attr) \
+ attr struct type *name##_RB_NFIND(struct name *, struct type *)
+#define RB_PROTOTYPE_NEXT(name, type, attr) \
+ attr struct type *name##_RB_NEXT(struct type *)
+#define RB_PROTOTYPE_PREV(name, type, attr) \
+ attr struct type *name##_RB_PREV(struct type *)
+#define RB_PROTOTYPE_MINMAX(name, type, attr) \
+ attr struct type *name##_RB_MINMAX(struct name *, int)
+
+/* Main rb operation.
+ * Moves node close to the key of elm to top
+ */
+#define RB_GENERATE(name, type, field, cmp) \
+ RB_GENERATE_INTERNAL(name, type, field, cmp,)
+#define RB_GENERATE_STATIC(name, type, field, cmp) \
+ RB_GENERATE_INTERNAL(name, type, field, cmp, __unused static)
+#define RB_GENERATE_INTERNAL(name, type, field, cmp, attr) \
+ RB_GENERATE_INSERT_COLOR(name, type, field, attr) \
+ RB_GENERATE_REMOVE_COLOR(name, type, field, attr) \
+ RB_GENERATE_INSERT(name, type, field, cmp, attr) \
+ RB_GENERATE_REMOVE(name, type, field, attr) \
+ RB_GENERATE_FIND(name, type, field, cmp, attr) \
+ RB_GENERATE_NFIND(name, type, field, cmp, attr) \
+ RB_GENERATE_NEXT(name, type, field, attr) \
+ RB_GENERATE_PREV(name, type, field, attr) \
+ RB_GENERATE_MINMAX(name, type, field, attr)
+
+#define RB_GENERATE_INSERT_COLOR(name, type, field, attr) \
+attr void \
+name##_RB_INSERT_COLOR(struct name *head, struct type *elm) \
+{ \
+ struct type *parent, *gparent, *tmp; \
+ while ((parent = RB_PARENT(elm, field)) != NULL && \
+ RB_COLOR(parent, field) == RB_RED) { \
+ gparent = RB_PARENT(parent, field); \
+ if (parent == RB_LEFT(gparent, field)) { \
+ tmp = RB_RIGHT(gparent, field); \
+ if (tmp && RB_COLOR(tmp, field) == RB_RED) { \
+ RB_COLOR(tmp, field) = RB_BLACK; \
+ RB_SET_BLACKRED(parent, gparent, field);\
+ elm = gparent; \
+ continue; \
+ } \
+ if (RB_RIGHT(parent, field) == elm) { \
+ RB_ROTATE_LEFT(head, parent, tmp, field);\
+ tmp = parent; \
+ parent = elm; \
+ elm = tmp; \
+ } \
+ RB_SET_BLACKRED(parent, gparent, field); \
+ RB_ROTATE_RIGHT(head, gparent, tmp, field); \
+ } else { \
+ tmp = RB_LEFT(gparent, field); \
+ if (tmp && RB_COLOR(tmp, field) == RB_RED) { \
+ RB_COLOR(tmp, field) = RB_BLACK; \
+ RB_SET_BLACKRED(parent, gparent, field);\
+ elm = gparent; \
+ continue; \
+ } \
+ if (RB_LEFT(parent, field) == elm) { \
+ RB_ROTATE_RIGHT(head, parent, tmp, field);\
+ tmp = parent; \
+ parent = elm; \
+ elm = tmp; \
+ } \
+ RB_SET_BLACKRED(parent, gparent, field); \
+ RB_ROTATE_LEFT(head, gparent, tmp, field); \
+ } \
+ } \
+ RB_COLOR(head->rbh_root, field) = RB_BLACK; \
+}
+
+#define RB_GENERATE_REMOVE_COLOR(name, type, field, attr) \
+attr void \
+name##_RB_REMOVE_COLOR(struct name *head, struct type *parent, struct type *elm) \
+{ \
+ struct type *tmp; \
+ while ((elm == NULL || RB_COLOR(elm, field) == RB_BLACK) && \
+ elm != RB_ROOT(head)) { \
+ if (RB_LEFT(parent, field) == elm) { \
+ tmp = RB_RIGHT(parent, field); \
+ if (RB_COLOR(tmp, field) == RB_RED) { \
+ RB_SET_BLACKRED(tmp, parent, field); \
+ RB_ROTATE_LEFT(head, parent, tmp, field);\
+ tmp = RB_RIGHT(parent, field); \
+ } \
+ if ((RB_LEFT(tmp, field) == NULL || \
+ RB_COLOR(RB_LEFT(tmp, field), field) == RB_BLACK) &&\
+ (RB_RIGHT(tmp, field) == NULL || \
+ RB_COLOR(RB_RIGHT(tmp, field), field) == RB_BLACK)) {\
+ RB_COLOR(tmp, field) = RB_RED; \
+ elm = parent; \
+ parent = RB_PARENT(elm, field); \
+ } else { \
+ if (RB_RIGHT(tmp, field) == NULL || \
+ RB_COLOR(RB_RIGHT(tmp, field), field) == RB_BLACK) {\
+ struct type *oleft; \
+ if ((oleft = RB_LEFT(tmp, field)) \
+ != NULL) \
+ RB_COLOR(oleft, field) = RB_BLACK;\
+ RB_COLOR(tmp, field) = RB_RED; \
+ RB_ROTATE_RIGHT(head, tmp, oleft, field);\
+ tmp = RB_RIGHT(parent, field); \
+ } \
+ RB_COLOR(tmp, field) = RB_COLOR(parent, field);\
+ RB_COLOR(parent, field) = RB_BLACK; \
+ if (RB_RIGHT(tmp, field)) \
+ RB_COLOR(RB_RIGHT(tmp, field), field) = RB_BLACK;\
+ RB_ROTATE_LEFT(head, parent, tmp, field);\
+ elm = RB_ROOT(head); \
+ break; \
+ } \
+ } else { \
+ tmp = RB_LEFT(parent, field); \
+ if (RB_COLOR(tmp, field) == RB_RED) { \
+ RB_SET_BLACKRED(tmp, parent, field); \
+ RB_ROTATE_RIGHT(head, parent, tmp, field);\
+ tmp = RB_LEFT(parent, field); \
+ } \
+ if ((RB_LEFT(tmp, field) == NULL || \
+ RB_COLOR(RB_LEFT(tmp, field), field) == RB_BLACK) &&\
+ (RB_RIGHT(tmp, field) == NULL || \
+ RB_COLOR(RB_RIGHT(tmp, field), field) == RB_BLACK)) {\
+ RB_COLOR(tmp, field) = RB_RED; \
+ elm = parent; \
+ parent = RB_PARENT(elm, field); \
+ } else { \
+ if (RB_LEFT(tmp, field) == NULL || \
+ RB_COLOR(RB_LEFT(tmp, field), field) == RB_BLACK) {\
+ struct type *oright; \
+ if ((oright = RB_RIGHT(tmp, field)) \
+ != NULL) \
+ RB_COLOR(oright, field) = RB_BLACK;\
+ RB_COLOR(tmp, field) = RB_RED; \
+ RB_ROTATE_LEFT(head, tmp, oright, field);\
+ tmp = RB_LEFT(parent, field); \
+ } \
+ RB_COLOR(tmp, field) = RB_COLOR(parent, field);\
+ RB_COLOR(parent, field) = RB_BLACK; \
+ if (RB_LEFT(tmp, field)) \
+ RB_COLOR(RB_LEFT(tmp, field), field) = RB_BLACK;\
+ RB_ROTATE_RIGHT(head, parent, tmp, field);\
+ elm = RB_ROOT(head); \
+ break; \
+ } \
+ } \
+ } \
+ if (elm) \
+ RB_COLOR(elm, field) = RB_BLACK; \
+}
+
+#define RB_GENERATE_REMOVE(name, type, field, attr) \
+attr struct type * \
+name##_RB_REMOVE(struct name *head, struct type *elm) \
+{ \
+ struct type *child, *parent, *old = elm; \
+ int color; \
+ if (RB_LEFT(elm, field) == NULL) \
+ child = RB_RIGHT(elm, field); \
+ else if (RB_RIGHT(elm, field) == NULL) \
+ child = RB_LEFT(elm, field); \
+ else { \
+ struct type *left; \
+ elm = RB_RIGHT(elm, field); \
+ while ((left = RB_LEFT(elm, field)) != NULL) \
+ elm = left; \
+ child = RB_RIGHT(elm, field); \
+ parent = RB_PARENT(elm, field); \
+ color = RB_COLOR(elm, field); \
+ if (child) \
+ RB_PARENT(child, field) = parent; \
+ if (parent) { \
+ if (RB_LEFT(parent, field) == elm) \
+ RB_LEFT(parent, field) = child; \
+ else \
+ RB_RIGHT(parent, field) = child; \
+ RB_AUGMENT(parent); \
+ } else \
+ RB_ROOT(head) = child; \
+ if (RB_PARENT(elm, field) == old) \
+ parent = elm; \
+ (elm)->field = (old)->field; \
+ if (RB_PARENT(old, field)) { \
+ if (RB_LEFT(RB_PARENT(old, field), field) == old)\
+ RB_LEFT(RB_PARENT(old, field), field) = elm;\
+ else \
+ RB_RIGHT(RB_PARENT(old, field), field) = elm;\
+ RB_AUGMENT(RB_PARENT(old, field)); \
+ } else \
+ RB_ROOT(head) = elm; \
+ RB_PARENT(RB_LEFT(old, field), field) = elm; \
+ if (RB_RIGHT(old, field)) \
+ RB_PARENT(RB_RIGHT(old, field), field) = elm; \
+ if (parent) { \
+ left = parent; \
+ do { \
+ RB_AUGMENT(left); \
+ } while ((left = RB_PARENT(left, field)) != NULL); \
+ } \
+ goto color; \
+ } \
+ parent = RB_PARENT(elm, field); \
+ color = RB_COLOR(elm, field); \
+ if (child) \
+ RB_PARENT(child, field) = parent; \
+ if (parent) { \
+ if (RB_LEFT(parent, field) == elm) \
+ RB_LEFT(parent, field) = child; \
+ else \
+ RB_RIGHT(parent, field) = child; \
+ RB_AUGMENT(parent); \
+ } else \
+ RB_ROOT(head) = child; \
+color: \
+ if (color == RB_BLACK) \
+ name##_RB_REMOVE_COLOR(head, parent, child); \
+ return (old); \
+} \
+
+#define RB_GENERATE_INSERT(name, type, field, cmp, attr) \
+/* Inserts a node into the RB tree */ \
+attr struct type * \
+name##_RB_INSERT(struct name *head, struct type *elm) \
+{ \
+ struct type *tmp; \
+ struct type *parent = NULL; \
+ int comp = 0; \
+ tmp = RB_ROOT(head); \
+ while (tmp) { \
+ parent = tmp; \
+ comp = (cmp)(elm, parent); \
+ if (comp < 0) \
+ tmp = RB_LEFT(tmp, field); \
+ else if (comp > 0) \
+ tmp = RB_RIGHT(tmp, field); \
+ else \
+ return (tmp); \
+ } \
+ RB_SET(elm, parent, field); \
+ if (parent != NULL) { \
+ if (comp < 0) \
+ RB_LEFT(parent, field) = elm; \
+ else \
+ RB_RIGHT(parent, field) = elm; \
+ RB_AUGMENT(parent); \
+ } else \
+ RB_ROOT(head) = elm; \
+ name##_RB_INSERT_COLOR(head, elm); \
+ return (NULL); \
+}
+
+#define RB_GENERATE_FIND(name, type, field, cmp, attr) \
+/* Finds the node with the same key as elm */ \
+attr struct type * \
+name##_RB_FIND(struct name *head, struct type *elm) \
+{ \
+ struct type *tmp = RB_ROOT(head); \
+ int comp; \
+ while (tmp) { \
+ comp = cmp(elm, tmp); \
+ if (comp < 0) \
+ tmp = RB_LEFT(tmp, field); \
+ else if (comp > 0) \
+ tmp = RB_RIGHT(tmp, field); \
+ else \
+ return (tmp); \
+ } \
+ return (NULL); \
+}
+
+#define RB_GENERATE_NFIND(name, type, field, cmp, attr) \
+/* Finds the first node greater than or equal to the search key */ \
+attr struct type * \
+name##_RB_NFIND(struct name *head, struct type *elm) \
+{ \
+ struct type *tmp = RB_ROOT(head); \
+ struct type *res = NULL; \
+ int comp; \
+ while (tmp) { \
+ comp = cmp(elm, tmp); \
+ if (comp < 0) { \
+ res = tmp; \
+ tmp = RB_LEFT(tmp, field); \
+ } \
+ else if (comp > 0) \
+ tmp = RB_RIGHT(tmp, field); \
+ else \
+ return (tmp); \
+ } \
+ return (res); \
+}
+
+#define RB_GENERATE_NEXT(name, type, field, attr) \
+/* ARGSUSED */ \
+attr struct type * \
+name##_RB_NEXT(struct type *elm) \
+{ \
+ if (RB_RIGHT(elm, field)) { \
+ elm = RB_RIGHT(elm, field); \
+ while (RB_LEFT(elm, field)) \
+ elm = RB_LEFT(elm, field); \
+ } else { \
+ if (RB_PARENT(elm, field) && \
+ (elm == RB_LEFT(RB_PARENT(elm, field), field))) \
+ elm = RB_PARENT(elm, field); \
+ else { \
+ while (RB_PARENT(elm, field) && \
+ (elm == RB_RIGHT(RB_PARENT(elm, field), field)))\
+ elm = RB_PARENT(elm, field); \
+ elm = RB_PARENT(elm, field); \
+ } \
+ } \
+ return (elm); \
+}
+
+#define RB_GENERATE_PREV(name, type, field, attr) \
+/* ARGSUSED */ \
+attr struct type * \
+name##_RB_PREV(struct type *elm) \
+{ \
+ if (RB_LEFT(elm, field)) { \
+ elm = RB_LEFT(elm, field); \
+ while (RB_RIGHT(elm, field)) \
+ elm = RB_RIGHT(elm, field); \
+ } else { \
+ if (RB_PARENT(elm, field) && \
+ (elm == RB_RIGHT(RB_PARENT(elm, field), field))) \
+ elm = RB_PARENT(elm, field); \
+ else { \
+ while (RB_PARENT(elm, field) && \
+ (elm == RB_LEFT(RB_PARENT(elm, field), field)))\
+ elm = RB_PARENT(elm, field); \
+ elm = RB_PARENT(elm, field); \
+ } \
+ } \
+ return (elm); \
+}
+
+#define RB_GENERATE_MINMAX(name, type, field, attr) \
+attr struct type * \
+name##_RB_MINMAX(struct name *head, int val) \
+{ \
+ struct type *tmp = RB_ROOT(head); \
+ struct type *parent = NULL; \
+ while (tmp) { \
+ parent = tmp; \
+ if (val < 0) \
+ tmp = RB_LEFT(tmp, field); \
+ else \
+ tmp = RB_RIGHT(tmp, field); \
+ } \
+ return (parent); \
+}
+
+#define RB_NEGINF -1
+#define RB_INF 1
+
+#define RB_INSERT(name, x, y) name##_RB_INSERT(x, y)
+#define RB_REMOVE(name, x, y) name##_RB_REMOVE(x, y)
+#define RB_FIND(name, x, y) name##_RB_FIND(x, y)
+#define RB_NFIND(name, x, y) name##_RB_NFIND(x, y)
+#define RB_NEXT(name, x, y) name##_RB_NEXT(y)
+#define RB_PREV(name, x, y) name##_RB_PREV(y)
+#define RB_MIN(name, x) name##_RB_MINMAX(x, RB_NEGINF)
+#define RB_MAX(name, x) name##_RB_MINMAX(x, RB_INF)
+
+#define RB_FOREACH(x, name, head) \
+ for ((x) = RB_MIN(name, head); \
+ (x) != NULL; \
+ (x) = name##_RB_NEXT(x))
+
+#define RB_FOREACH_FROM(x, name, y) \
+ for ((x) = (y); \
+ ((x) != NULL) && ((y) = name##_RB_NEXT(x), (x) != NULL); \
+ (x) = (y))
+
+#define RB_FOREACH_SAFE(x, name, head, y) \
+ for ((x) = RB_MIN(name, head); \
+ ((x) != NULL) && ((y) = name##_RB_NEXT(x), (x) != NULL); \
+ (x) = (y))
+
+#define RB_FOREACH_REVERSE(x, name, head) \
+ for ((x) = RB_MAX(name, head); \
+ (x) != NULL; \
+ (x) = name##_RB_PREV(x))
+
+#define RB_FOREACH_REVERSE_FROM(x, name, y) \
+ for ((x) = (y); \
+ ((x) != NULL) && ((y) = name##_RB_PREV(x), (x) != NULL); \
+ (x) = (y))
+
+#define RB_FOREACH_REVERSE_SAFE(x, name, head, y) \
+ for ((x) = RB_MAX(name, head); \
+ ((x) != NULL) && ((y) = name##_RB_PREV(x), (x) != NULL); \
+ (x) = (y))
+
+#endif /* _SYS_TREE_H_ */
diff --git a/newlib/libc/include/sys/types.h b/newlib/libc/include/sys/types.h
index 0627ca9fb..379b755b8 100644
--- a/newlib/libc/include/sys/types.h
+++ b/newlib/libc/include/sys/types.h
@@ -18,20 +18,12 @@
#ifndef _SYS_TYPES_H
#include <_ansi.h>
-
-#ifndef __INTTYPES_DEFINED__
-#define __INTTYPES_DEFINED__
-
+#include <sys/cdefs.h>
#include <machine/_types.h>
-#if defined(__rtems__) || defined(__XMK__)
-/*
- * The following section is RTEMS specific and is needed to more
- * closely match the types defined in the BSD sys/types.h.
- * This is needed to let the RTEMS/BSD TCP/IP stack compile.
- */
-
-/* deprecated */
+/* BSD types permitted by POSIX and always exposed as in Glibc. Only provided
+ for backward compatibility with BSD code. The uintN_t standard types should
+ be preferred in new code. */
#if ___int8_t_defined
typedef __uint8_t u_int8_t;
#endif
@@ -41,52 +33,54 @@ typedef __uint16_t u_int16_t;
#if ___int32_t_defined
typedef __uint32_t u_int32_t;
#endif
-
#if ___int64_t_defined
typedef __uint64_t u_int64_t;
+#endif
+typedef int register_t;
+#define __BIT_TYPES_DEFINED__ 1
+
+#if defined(__rtems__) || defined(__XMK__)
+/*
+ * The following section is RTEMS specific and is needed to more
+ * closely match the types defined in the BSD sys/types.h.
+ * This is needed to let the RTEMS/BSD TCP/IP stack compile.
+ */
/* deprecated */
+#if ___int64_t_defined
typedef __uint64_t u_quad_t;
typedef __int64_t quad_t;
typedef quad_t * qaddr_t;
#endif
-#endif
-
-#endif /* ! __INTTYPES_DEFINED */
+#endif /* __rtems__ || __XMK__ */
#ifndef __need_inttypes
#define _SYS_TYPES_H
+/* <stddef.h> must be before <sys/_types.h> for __size_t considerations */
+#include <stddef.h>
#include <sys/_types.h>
+#include <sys/_stdint.h>
-#ifdef __i386__
-#if defined (GO32) || defined (__MSDOS__)
-#define __MS_types__
-#endif
-#endif
-
-# include <stddef.h>
-# include <machine/types.h>
+#if __BSD_VISIBLE
+#include <machine/endian.h>
+#include <sys/select.h>
+# define physadr physadr_t
+# define quad quad_t
-/* To ensure the stat struct's layout doesn't change when sizeof(int), etc.
- changes, we assume sizeof short and long never change and have all types
- used to define struct stat use them and not int where possible.
- Where not possible, _ST_INTxx are used. It would be preferable to not have
- such assumptions, but until the extra fluff is necessary, it's avoided.
- No 64 bit targets use stat yet. What to do about them is postponed
- until necessary. */
-#ifdef __GNUC__
-#define _ST_INT32 __attribute__ ((__mode__ (__SI__)))
-#else
-#define _ST_INT32
+#ifndef _IN_ADDR_T_DECLARED
+typedef __uint32_t in_addr_t; /* base type for internet address */
+#define _IN_ADDR_T_DECLARED
#endif
-# ifndef _POSIX_SOURCE
-
-# define physadr physadr_t
-# define quad quad_t
+#ifndef _IN_PORT_T_DECLARED
+typedef __uint16_t in_port_t;
+#define _IN_PORT_T_DECLARED
+#endif
+#endif /* __BSD_VISIBLE */
+#if __MISC_VISIBLE
#ifndef _BSDTYPES_DEFINED
/* also defined in mingw/gmon.h and in w32api/winsock[2].h */
#ifndef __u_char_defined
@@ -107,36 +101,35 @@ typedef unsigned long u_long;
#endif
#define _BSDTYPES_DEFINED
#endif
+#endif /*__BSD_VISIBLE || __CYGWIN__ */
+#if __MISC_VISIBLE
typedef unsigned short ushort; /* System V compatibility */
typedef unsigned int uint; /* System V compatibility */
typedef unsigned long ulong; /* System V compatibility */
-# endif /*!_POSIX_SOURCE */
-
-#ifndef __clock_t_defined
-typedef _CLOCK_T_ clock_t;
-#define __clock_t_defined
#endif
-#ifndef __time_t_defined
-typedef _TIME_T_ time_t;
-#define __time_t_defined
+#ifndef _BLKCNT_T_DECLARED
+typedef __blkcnt_t blkcnt_t;
+#define _BLKCNT_T_DECLARED
#endif
-#ifndef __timespec_defined
-#define __timespec_defined
-/* Time Value Specification Structures, P1003.1b-1993, p. 261 */
+#ifndef _BLKSIZE_T_DECLARED
+typedef __blksize_t blksize_t;
+#define _BLKSIZE_T_DECLARED
+#endif
-struct timespec {
- time_t tv_sec; /* Seconds */
- long tv_nsec; /* Nanoseconds */
-};
+#if !defined(__clock_t_defined) && !defined(_CLOCK_T_DECLARED)
+typedef _CLOCK_T_ clock_t;
+#define __clock_t_defined
+#define _CLOCK_T_DECLARED
#endif
-struct itimerspec {
- struct timespec it_interval; /* Timer period */
- struct timespec it_value; /* Timer expiration */
-};
+#if !defined(__time_t_defined) && !defined(_TIME_T_DECLARED)
+typedef _TIME_T_ time_t;
+#define __time_t_defined
+#define _TIME_T_DECLARED
+#endif
#ifndef __daddr_t_defined
typedef long daddr_t;
@@ -147,31 +140,27 @@ typedef char * caddr_t;
#define __caddr_t_defined
#endif
-#ifndef __CYGWIN__
-#if defined(__MS_types__) || defined(__rtems__) || \
- defined(__sparc__) || defined(__SPU__)
-typedef unsigned long ino_t;
-#else
-typedef unsigned short ino_t;
+#ifndef _FSBLKCNT_T_DECLARED /* for statvfs() */
+typedef __fsblkcnt_t fsblkcnt_t;
+typedef __fsfilcnt_t fsfilcnt_t;
+#define _FSBLKCNT_T_DECLARED
#endif
-#endif /*__CYGWIN__*/
-#ifdef __MS_types__
-typedef unsigned long vm_offset_t;
-typedef unsigned long vm_size_t;
+#ifndef _ID_T_DECLARED
+typedef __id_t id_t; /* can hold a uid_t or pid_t */
+#define _ID_T_DECLARED
+#endif
-#define __BIT_TYPES_DEFINED__
+#ifndef _INO_T_DECLARED
+typedef __ino_t ino_t; /* inode number */
+#define _INO_T_DECLARED
+#endif
-typedef signed char int8_t;
-typedef unsigned char u_int8_t;
-typedef short int16_t;
-typedef unsigned short u_int16_t;
-typedef int int32_t;
-typedef unsigned int u_int32_t;
-typedef long long int64_t;
-typedef unsigned long long u_int64_t;
-typedef int32_t register_t;
-#endif /* __MS_types__ */
+#if defined(__i386__) && (defined(GO32) || defined(__MSDOS__))
+typedef char * addr_t;
+typedef unsigned long vm_offset_t;
+typedef unsigned long vm_size_t;
+#endif /* __i386__ && (GO32 || __MSDOS__) */
/*
* All these should be machine specific - right now they are all broken.
@@ -180,121 +169,83 @@ typedef int32_t register_t;
* how the file was compiled (e.g. -mint16 vs -mint32, etc.).
*/
-#ifndef __CYGWIN__ /* which defines these types in it's own types.h. */
-typedef _off_t off_t;
-typedef __dev_t dev_t;
-typedef __uid_t uid_t;
-typedef __gid_t gid_t;
+#ifndef _OFF_T_DECLARED
+typedef __off_t off_t; /* file offset */
+#define _OFF_T_DECLARED
#endif
-
-#if defined(__XMK__)
-typedef signed char pid_t;
-#else
-typedef int pid_t;
+#ifndef _DEV_T_DECLARED
+typedef __dev_t dev_t; /* device number or struct cdev */
+#define _DEV_T_DECLARED
#endif
-
-#if defined(__rtems__)
-typedef _mode_t mode_t;
+#ifndef _UID_T_DECLARED
+typedef __uid_t uid_t; /* user id */
+#define _UID_T_DECLARED
#endif
-
-#ifndef __CYGWIN__
-typedef long key_t;
+#ifndef _GID_T_DECLARED
+typedef __gid_t gid_t; /* group id */
+#define _GID_T_DECLARED
#endif
-typedef _ssize_t ssize_t;
-#if !defined(__CYGWIN__) && !defined(__rtems__)
-#ifdef __MS_types__
-typedef char * addr_t;
-typedef int mode_t;
-#else
-#if defined (__sparc__) && !defined (__sparc_v9__)
-#ifdef __svr4__
-typedef unsigned long mode_t;
-#else
-typedef unsigned short mode_t;
+#ifndef _PID_T_DECLARED
+typedef __pid_t pid_t; /* process id */
+#define _PID_T_DECLARED
#endif
-#else
-typedef unsigned int mode_t _ST_INT32;
-#endif
-#endif /* ! __MS_types__ */
-#endif /*__CYGWIN__*/
-
-typedef unsigned short nlink_t;
-
-/* We don't define fd_set and friends if we are compiling POSIX
- source, or if we have included (or may include as indicated
- by __USE_W32_SOCKETS) the W32api winsock[2].h header which
- defines Windows versions of them. Note that a program which
- includes the W32api winsock[2].h header must know what it is doing;
- it must not call the cygwin32 select function.
-*/
-# if !(defined (_POSIX_SOURCE) || defined (_WINSOCK_H) || defined (_WINSOCKAPI_) || defined (__USE_W32_SOCKETS))
-# define _SYS_TYPES_FD_SET
-# define NBBY 8 /* number of bits in a byte */
-/*
- * Select uses bit masks of file descriptors in longs.
- * These macros manipulate such bit fields (the filesystem macros use chars).
- * FD_SETSIZE may be defined by the user, but the default here
- * should be >= NOFILE (param.h).
- */
-# ifndef FD_SETSIZE
-# define FD_SETSIZE 64
-# endif
-
-typedef long fd_mask;
-# define NFDBITS (sizeof (fd_mask) * NBBY) /* bits per mask */
-# ifndef howmany
-# define howmany(x,y) (((x)+((y)-1))/(y))
-# endif
-/* We use a macro for fd_set so that including Sockets.h afterwards
- can work. */
-typedef struct _types_fd_set {
- fd_mask fds_bits[howmany(FD_SETSIZE, NFDBITS)];
-} _types_fd_set;
+#ifndef _KEY_T_DECLARED
+typedef __key_t key_t; /* IPC key */
+#define _KEY_T_DECLARED
+#endif
-#define fd_set _types_fd_set
+#ifndef _SSIZE_T_DECLARED
+typedef _ssize_t ssize_t;
+#define _SSIZE_T_DECLARED
+#endif
-# define FD_SET(n, p) ((p)->fds_bits[(n)/NFDBITS] |= (1L << ((n) % NFDBITS)))
-# define FD_CLR(n, p) ((p)->fds_bits[(n)/NFDBITS] &= ~(1L << ((n) % NFDBITS)))
-# define FD_ISSET(n, p) ((p)->fds_bits[(n)/NFDBITS] & (1L << ((n) % NFDBITS)))
-# define FD_ZERO(p) (__extension__ (void)({ \
- size_t __i; \
- char *__tmp = (char *)p; \
- for (__i = 0; __i < sizeof (*(p)); ++__i) \
- *__tmp++ = 0; \
-}))
+#ifndef _MODE_T_DECLARED
+typedef __mode_t mode_t; /* permissions */
+#define _MODE_T_DECLARED
+#endif
-# endif /* !(defined (_POSIX_SOURCE) || defined (_WINSOCK_H) || defined (_WINSOCKAPI_) || defined (__USE_W32_SOCKETS)) */
+#ifndef _NLINK_T_DECLARED
+typedef __nlink_t nlink_t; /* link count */
+#define _NLINK_T_DECLARED
+#endif
-#undef __MS_types__
-#undef _ST_INT32
+#if !defined(__clockid_t_defined) && !defined(_CLOCKID_T_DECLARED)
+typedef __clockid_t clockid_t;
+#define __clockid_t_defined
+#define _CLOCKID_T_DECLARED
+#endif
+#if !defined(__timer_t_defined) && !defined(_TIMER_T_DECLARED)
+typedef __timer_t timer_t;
+#define __timer_t_defined
+#define _TIMER_T_DECLARED
+#endif
-#ifndef __clockid_t_defined
-typedef _CLOCKID_T_ clockid_t;
-#define __clockid_t_defined
+#ifndef _USECONDS_T_DECLARED
+typedef __useconds_t useconds_t; /* microseconds (unsigned) */
+#define _USECONDS_T_DECLARED
#endif
-#ifndef __timer_t_defined
-typedef _TIMER_T_ timer_t;
-#define __timer_t_defined
+#ifndef _SUSECONDS_T_DECLARED
+typedef __suseconds_t suseconds_t;
+#define _SUSECONDS_T_DECLARED
#endif
-typedef unsigned long useconds_t;
-typedef long suseconds_t;
+typedef __int64_t sbintime_t;
#include <sys/features.h>
-/* Cygwin will probably never have full posix compliance due to little things
- * like an inability to set the stackaddress. Cygwin is also using void *
- * pointers rather than structs to ensure maximum binary compatability with
- * previous releases.
- * This means that we don't use the types defined here, but rather in
- * <cygwin/types.h>
+/*
+ * Cygwin is using a complete distinct implementation of pthread objects and
+ * pointers rather than structs. This means we can't use the types defined
+ * here, but rather in <machine/types.h>.
*/
-#if defined(_POSIX_THREADS) && !defined(__CYGWIN__)
+#if !defined(__CYGWIN__)
+
+#if defined(_POSIX_THREADS)
#include <sys/sched.h>
@@ -322,6 +273,10 @@ typedef __uint32_t pthread_t; /* identify a thread */
#define PTHREAD_CREATE_DETACHED 0
#define PTHREAD_CREATE_JOINABLE 1
+#if defined(__rtems__)
+ #include <sys/cpuset.h>
+#endif
+
#if defined(__XMK__)
typedef struct pthread_attr_s {
int contentionscope;
@@ -351,7 +306,11 @@ typedef struct {
int cputime_clock_allowed; /* see time.h */
#endif
int detachstate;
-
+#if defined(__rtems__)
+ size_t affinitysetsize;
+ cpu_set_t *affinityset;
+ cpu_set_t affinitysetpreallocated;
+#endif
} pthread_attr_t;
#endif /* !defined(__XMK__) */
@@ -454,9 +413,10 @@ typedef struct {
typedef __uint32_t pthread_cond_t; /* identify a condition variable */
typedef struct {
- int is_initialized;
+ int is_initialized;
+ clock_t clock; /* specifiy clock for timeouts */
#if defined(_POSIX_THREAD_PROCESS_SHARED)
- int process_shared; /* allow this to be shared amongst processes */
+ int process_shared; /* allow this to be shared amongst processes */
#endif
} pthread_condattr_t; /* a condition attribute object */
@@ -468,10 +428,6 @@ typedef struct {
int is_initialized; /* is this structure initialized? */
int init_executed; /* has the initialization routine been run? */
} pthread_once_t; /* dynamic package initialization */
-#else
-#if defined (__CYGWIN__)
-#include <cygwin/types.h>
-#endif
#endif /* defined(_POSIX_THREADS) */
/* POSIX Barrier Types */
@@ -488,7 +444,6 @@ typedef struct {
/* POSIX Spin Lock Types */
-#if !defined (__CYGWIN__)
#if defined(_POSIX_SPIN_LOCKS)
typedef __uint32_t pthread_spinlock_t; /* POSIX Spin Lock Object */
#endif /* defined(_POSIX_SPIN_LOCKS) */
@@ -504,8 +459,11 @@ typedef struct {
#endif
} pthread_rwlockattr_t;
#endif /* defined(_POSIX_READER_WRITER_LOCKS) */
+
#endif /* __CYGWIN__ */
+#include <machine/types.h>
+
#endif /* !__need_inttypes */
#undef __need_inttypes
diff --git a/newlib/libc/include/sys/unistd.h b/newlib/libc/include/sys/unistd.h
index a5f66c0b7..05b4f9d8e 100644
--- a/newlib/libc/include/sys/unistd.h
+++ b/newlib/libc/include/sys/unistd.h
@@ -6,15 +6,16 @@ extern "C" {
#endif
#include <_ansi.h>
-#include <sys/types.h>
-#include <sys/_types.h>
#define __need_size_t
#define __need_ptrdiff_t
+#include <sys/cdefs.h>
+#include <sys/types.h>
+#include <sys/_types.h>
#include <stddef.h>
extern char **environ;
-void _EXFUN(_exit, (int __status ) _ATTRIBUTE ((noreturn)));
+void _EXFUN(_exit, (int __status ) _ATTRIBUTE ((__noreturn__)));
int _EXFUN(access,(const char *__path, int __amode ));
unsigned _EXFUN(alarm, (unsigned __secs ));
@@ -23,68 +24,89 @@ int _EXFUN(chmod, (const char *__path, mode_t __mode ));
#if !defined(__INSIDE_CYGWIN__)
int _EXFUN(chown, (const char *__path, uid_t __owner, gid_t __group ));
#endif
-#if defined(__CYGWIN__) || defined(__rtems__)
+#if __BSD_VISIBLE || (__XSI_VISIBLE >= 4 && __POSIX_VISIBLE < 200112)
int _EXFUN(chroot, (const char *__path ));
#endif
int _EXFUN(close, (int __fildes ));
-#if defined(__CYGWIN__)
+#if __POSIX_VISIBLE >= 199209
size_t _EXFUN(confstr, (int __name, char *__buf, size_t __len));
#endif
+#if __XSI_VISIBLE
+char * _EXFUN(crypt, (const char *__key, const char *__salt));
+#endif
+#if __XSI_VISIBLE && __XSI_VISIBLE < 700
char * _EXFUN(ctermid, (char *__s ));
+#endif
+#if __XSI_VISIBLE && __XSI_VISIBLE < 600
char * _EXFUN(cuserid, (char *__s ));
-#if defined(__CYGWIN__)
+#endif
+#if __BSD_VISIBLE || (__XSI_VISIBLE && __XSI_VISIBLE < 500)
int _EXFUN(daemon, (int nochdir, int noclose));
#endif
int _EXFUN(dup, (int __fildes ));
int _EXFUN(dup2, (int __fildes, int __fildes2 ));
-#if defined(__CYGWIN__)
+#if __GNU_VISIBLE
int _EXFUN(dup3, (int __fildes, int __fildes2, int flags));
int _EXFUN(eaccess, (const char *__path, int __mode));
+#endif
+#if __XSI_VISIBLE
+void _EXFUN(encrypt, (char *__block, int __edflag));
+#endif
+#if __BSD_VISIBLE || (__XSI_VISIBLE && __XSI_VISIBLE < 500)
void _EXFUN(endusershell, (void));
+#endif
+#if __GNU_VISIBLE
int _EXFUN(euidaccess, (const char *__path, int __mode));
#endif
int _EXFUN(execl, (const char *__path, const char *, ... ));
int _EXFUN(execle, (const char *__path, const char *, ... ));
int _EXFUN(execlp, (const char *__file, const char *, ... ));
-#if defined(__CYGWIN__)
+#if __MISC_VISIBLE
int _EXFUN(execlpe, (const char *__file, const char *, ... ));
#endif
int _EXFUN(execv, (const char *__path, char * const __argv[] ));
int _EXFUN(execve, (const char *__path, char * const __argv[], char * const __envp[] ));
int _EXFUN(execvp, (const char *__file, char * const __argv[] ));
-#if defined(__CYGWIN__)
+#if __GNU_VISIBLE
int _EXFUN(execvpe, (const char *__file, char * const __argv[], char * const __envp[] ));
+#endif
+#if __ATFILE_VISIBLE
int _EXFUN(faccessat, (int __dirfd, const char *__path, int __mode, int __flags));
#endif
-#if defined(__CYGWIN__) || defined(__rtems__) || defined(__SPU__)
+#if __BSD_VISIBLE || __XSI_VISIBLE >= 4
int _EXFUN(fchdir, (int __fildes));
#endif
int _EXFUN(fchmod, (int __fildes, mode_t __mode ));
#if !defined(__INSIDE_CYGWIN__)
int _EXFUN(fchown, (int __fildes, uid_t __owner, gid_t __group ));
#endif
-#if defined(__CYGWIN__)
+#if __ATFILE_VISIBLE
int _EXFUN(fchownat, (int __dirfd, const char *__path, uid_t __owner, gid_t __group, int __flags));
+#endif
+#if __POSIX_VISIBLE >= 200809
int _EXFUN(fexecve, (int __fd, char * const __argv[], char * const __envp[] ));
#endif
pid_t _EXFUN(fork, (void ));
long _EXFUN(fpathconf, (int __fd, int __name ));
int _EXFUN(fsync, (int __fd));
int _EXFUN(fdatasync, (int __fd));
-#if defined(__CYGWIN__)
+#if __GNU_VISIBLE
char * _EXFUN(get_current_dir_name, (void));
#endif
char * _EXFUN(getcwd, (char *__buf, size_t __size ));
-#if defined(__CYGWIN__)
+#if __BSD_VISIBLE || (__XSI_VISIBLE && __XSI_VISIBLE < 500)
int _EXFUN(getdomainname ,(char *__name, size_t __len));
#endif
+#if __BSD_VISIBLE
+int _EXFUN(getentropy, (void *, size_t));
+#endif
#if !defined(__INSIDE_CYGWIN__)
gid_t _EXFUN(getegid, (void ));
uid_t _EXFUN(geteuid, (void ));
gid_t _EXFUN(getgid, (void ));
#endif
int _EXFUN(getgroups, (int __gidsetsize, gid_t __grouplist[] ));
-#if defined(__CYGWIN__)
+#if __BSD_VISIBLE || __XSI_VISIBLE >= 4
long _EXFUN(gethostid, (void));
#endif
char * _EXFUN(getlogin, (void ));
@@ -93,37 +115,44 @@ int _EXFUN(getlogin_r, (char *name, size_t namesize) );
#endif
char * _EXFUN(getpass, (const char *__prompt));
int _EXFUN(getpagesize, (void));
-#if defined(__CYGWIN__)
+#if __BSD_VISIBLE
int _EXFUN(getpeereid, (int, uid_t *, gid_t *));
#endif
pid_t _EXFUN(getpgid, (pid_t));
pid_t _EXFUN(getpgrp, (void ));
pid_t _EXFUN(getpid, (void ));
pid_t _EXFUN(getppid, (void ));
-#if defined(__CYGWIN__) || defined(__rtems__)
+#if __POSIX_VISIBLE >= 200809 || __XSI_VISIBLE >= 4
pid_t _EXFUN(getsid, (pid_t));
#endif
#if !defined(__INSIDE_CYGWIN__)
uid_t _EXFUN(getuid, (void ));
#endif
-#ifdef __CYGWIN__
+#if __BSD_VISIBLE || (__XSI_VISIBLE && __XSI_VISIBLE < 500)
char * _EXFUN(getusershell, (void));
+#endif
+#if __BSD_VISIBLE || (__XSI_VISIBLE >= 4 && __POSIX_VISIBLE < 200809)
char * _EXFUN(getwd, (char *__buf ));
+#endif
+#if __BSD_VISIBLE
int _EXFUN(iruserok, (unsigned long raddr, int superuser, const char *ruser, const char *luser));
#endif
int _EXFUN(isatty, (int __fildes ));
+#if __BSD_VISIBLE
+int _EXFUN(issetugid, (void));
+#endif
#if !defined(__INSIDE_CYGWIN__)
int _EXFUN(lchown, (const char *__path, uid_t __owner, gid_t __group ));
#endif
int _EXFUN(link, (const char *__path1, const char *__path2 ));
-#if defined(__CYGWIN__)
+#if __ATFILE_VISIBLE
int _EXFUN(linkat, (int __dirfd1, const char *__path1, int __dirfd2, const char *__path2, int __flags ));
#endif
int _EXFUN(nice, (int __nice_value ));
#if !defined(__INSIDE_CYGWIN__)
off_t _EXFUN(lseek, (int __fildes, off_t __offset, int __whence ));
#endif
-#if defined(__SPU__) || defined(__CYGWIN__)
+#if __MISC_VISIBLE || __XSI_VISIBLE >= 4
#define F_ULOCK 0
#define F_LOCK 1
#define F_TLOCK 2
@@ -132,38 +161,41 @@ int _EXFUN(lockf, (int __fd, int __cmd, off_t __len));
#endif
long _EXFUN(pathconf, (const char *__path, int __name ));
int _EXFUN(pause, (void ));
-#ifdef __CYGWIN__
+#if __POSIX_VISIBLE >= 199506
int _EXFUN(pthread_atfork, (void (*)(void), void (*)(void), void (*)(void)));
#endif
int _EXFUN(pipe, (int __fildes[2] ));
-#ifdef __CYGWIN__
+#if __GNU_VISIBLE
int _EXFUN(pipe2, (int __fildes[2], int flags));
#endif
ssize_t _EXFUN(pread, (int __fd, void *__buf, size_t __nbytes, off_t __offset));
ssize_t _EXFUN(pwrite, (int __fd, const void *__buf, size_t __nbytes, off_t __offset));
_READ_WRITE_RETURN_TYPE _EXFUN(read, (int __fd, void *__buf, size_t __nbyte ));
-#if defined(__CYGWIN__)
+#if __BSD_VISIBLE
int _EXFUN(rresvport, (int *__alport));
int _EXFUN(revoke, (char *__path));
#endif
int _EXFUN(rmdir, (const char *__path ));
-#if defined(__CYGWIN__)
+#if __BSD_VISIBLE
int _EXFUN(ruserok, (const char *rhost, int superuser, const char *ruser, const char *luser));
#endif
void * _EXFUN(sbrk, (ptrdiff_t __incr));
#if !defined(__INSIDE_CYGWIN__)
-#if defined(__CYGWIN__) || defined(__rtems__)
+#if __BSD_VISIBLE || __POSIX_VISIBLE >= 200112
int _EXFUN(setegid, (gid_t __gid ));
int _EXFUN(seteuid, (uid_t __uid ));
#endif
int _EXFUN(setgid, (gid_t __gid ));
#endif
-#if defined(__CYGWIN__)
+#if __BSD_VISIBLE
int _EXFUN(setgroups, (int ngroups, const gid_t *grouplist ));
#endif
+#if __BSD_VISIBLE || (__XSI_VISIBLE && __XSI_VISIBLE < 500)
+int _EXFUN(sethostname, (const char *, size_t));
+#endif
int _EXFUN(setpgid, (pid_t __pid, pid_t __pgid ));
int _EXFUN(setpgrp, (void ));
-#if defined(__CYGWIN__) && !defined(__INSIDE_CYGWIN__)
+#if (__BSD_VISIBLE || __XSI_VISIBLE >= 4) && !defined(__INSIDE_CYGWIN__)
int _EXFUN(setregid, (gid_t __rgid, gid_t __egid));
int _EXFUN(setreuid, (uid_t __ruid, uid_t __euid));
#endif
@@ -171,18 +203,16 @@ pid_t _EXFUN(setsid, (void ));
#if !defined(__INSIDE_CYGWIN__)
int _EXFUN(setuid, (uid_t __uid ));
#endif
-#if defined(__CYGWIN__)
+#if __BSD_VISIBLE || (__XSI_VISIBLE && __XSI_VISIBLE < 500)
void _EXFUN(setusershell, (void));
#endif
unsigned _EXFUN(sleep, (unsigned int __seconds ));
-void _EXFUN(swab, (const void *, void *, ssize_t));
+void _EXFUN(swab, (const void *__restrict, void *__restrict, ssize_t));
long _EXFUN(sysconf, (int __name ));
pid_t _EXFUN(tcgetpgrp, (int __fildes ));
int _EXFUN(tcsetpgrp, (int __fildes, pid_t __pgrp_id ));
char * _EXFUN(ttyname, (int __fildes ));
-#if defined(__CYGWIN__) || defined(__rtems__)
int _EXFUN(ttyname_r, (int, char *, size_t));
-#endif
int _EXFUN(unlink, (const char *__path ));
int _EXFUN(usleep, (useconds_t __useconds));
int _EXFUN(vhangup, (void ));
@@ -199,9 +229,9 @@ int getopt(int, char * const [], const char *);
extern int optreset; /* getopt(3) external variable */
#endif
-#ifndef _POSIX_SOURCE
+#if __BSD_VISIBLE || (__XSI_VISIBLE >= 4 && __POSIX_VISIBLE < 200809)
pid_t _EXFUN(vfork, (void ));
-#endif /* _POSIX_SOURCE */
+#endif
#ifdef _COMPILING_NEWLIB
/* Provide prototypes for most of the _<systemcall> names that are
@@ -222,7 +252,7 @@ _READ_WRITE_RETURN_TYPE _EXFUN(_write, (int __fd, const void *__buf, size_t __nb
int _EXFUN(_execve, (const char *__path, char * const __argv[], char * const __envp[] ));
#endif
-#if defined(__CYGWIN__) || defined(__rtems__) || defined(__sh__) || defined(__SPU__)
+#if defined(__CYGWIN__) || defined(__rtems__) || defined(__aarch64__) || defined (__arm__) || defined(__sh__) || defined(__SPU__)
#if !defined(__INSIDE_CYGWIN__)
int _EXFUN(ftruncate, (int __fd, off_t __length));
int _EXFUN(truncate, (const char *, off_t __length));
@@ -244,12 +274,14 @@ char * _EXFUN(mktemp, (char *));
void _EXFUN(sync, (void));
#endif
-ssize_t _EXFUN(readlink, (const char *__path, char *__buf, size_t __buflen));
-#if defined(__CYGWIN__)
-ssize_t _EXFUN(readlinkat, (int __dirfd1, const char *__path, char *__buf, size_t __buflen));
-#endif
+#if __BSD_VISIBLE || __POSIX_VISIBLE >= 200112 || __XSI_VISIBLE >= 4
+ssize_t _EXFUN(readlink, (const char *__restrict __path,
+ char *__restrict __buf, size_t __buflen));
int _EXFUN(symlink, (const char *__name1, const char *__name2));
-#if defined(__CYGWIN__)
+#endif
+#if __ATFILE_VISIBLE
+ssize_t _EXFUN(readlinkat, (int __dirfd1, const char *__restrict __path,
+ char *__restrict __buf, size_t __buflen));
int _EXFUN(symlinkat, (const char *, int, const char *));
int _EXFUN(unlinkat, (int, const char *, int));
#endif
@@ -412,6 +444,21 @@ int _EXFUN(unlinkat, (int, const char *, int));
#define _SC_THREAD_ROBUST_PRIO_INHERIT 122
#define _SC_THREAD_ROBUST_PRIO_PROTECT 123
#define _SC_XOPEN_UUCP 124
+#define _SC_LEVEL1_ICACHE_SIZE 125
+#define _SC_LEVEL1_ICACHE_ASSOC 126
+#define _SC_LEVEL1_ICACHE_LINESIZE 127
+#define _SC_LEVEL1_DCACHE_SIZE 128
+#define _SC_LEVEL1_DCACHE_ASSOC 129
+#define _SC_LEVEL1_DCACHE_LINESIZE 130
+#define _SC_LEVEL2_CACHE_SIZE 131
+#define _SC_LEVEL2_CACHE_ASSOC 132
+#define _SC_LEVEL2_CACHE_LINESIZE 133
+#define _SC_LEVEL3_CACHE_SIZE 134
+#define _SC_LEVEL3_CACHE_ASSOC 135
+#define _SC_LEVEL3_CACHE_LINESIZE 136
+#define _SC_LEVEL4_CACHE_SIZE 137
+#define _SC_LEVEL4_CACHE_ASSOC 138
+#define _SC_LEVEL4_CACHE_LINESIZE 139
/*
* pathconf values per IEEE Std 1003.1, 2008 Edition
@@ -500,10 +547,6 @@ int _EXFUN(unlinkat, (int, const char *, int));
#define _CS_V6_ENV _CS_V7_ENV
#endif
-#ifndef __CYGWIN__
-# define MAXPATHLEN 1024
-#endif
-
#ifdef __cplusplus
}
#endif
diff --git a/newlib/libc/include/sys/wait.h b/newlib/libc/include/sys/wait.h
index 73fe37202..f17e53f12 100644
--- a/newlib/libc/include/sys/wait.h
+++ b/newlib/libc/include/sys/wait.h
@@ -11,7 +11,7 @@ extern "C" {
#define WUNTRACED 2
/* A status looks like:
- <2 bytes info> <2 bytes code>
+ <1 byte info> <1 byte code>
<code> == 0, child has exited, info is the exit value
<code> == 1..7e, child has exited, info is the signal number.
diff --git a/newlib/libc/include/tar.h b/newlib/libc/include/tar.h
index 07b06dd7f..36437fc38 100644
--- a/newlib/libc/include/tar.h
+++ b/newlib/libc/include/tar.h
@@ -5,6 +5,8 @@
#ifndef _TAR_H
#define _TAR_H
+#include <sys/features.h>
+
/* General definitions */
#define TMAGIC "ustar" /* ustar plus null byte. */
#define TMAGLEN 6 /* Length of the above. */
@@ -25,7 +27,9 @@
/* Mode field bit definitions (octal) */
#define TSUID 04000 /* Set UID on execution. */
#define TSGID 02000 /* Set GID on execution. */
+#if __XSI_VISIBLE || __POSIX_VISIBLE < 200112
#define TSVTX 01000 /* On directories, restricted deletion flag. */
+#endif
#define TUREAD 00400 /* Read by owner. */
#define TUWRITE 00200 /* Write by owner. */
#define TUEXEC 00100 /* Execute/search by owner. */
diff --git a/newlib/libc/include/tgmath.h b/newlib/libc/include/tgmath.h
index f9c8311cc..97dc50eaa 100644
--- a/newlib/libc/include/tgmath.h
+++ b/newlib/libc/include/tgmath.h
@@ -79,7 +79,7 @@
__tg_type3(__e1, __e2, __e3, long double _Complex) || \
__tg_type3(__e1, __e2, __e3, __typeof__(_Complex_I)))
-#ifdef _LDBL_EQ_DBL
+#if defined (_LDBL_EQ_DBL) || defined (__CYGWIN__)
#define __tg_impl_simple(x, y, z, fn, fnf, fnl, ...) \
__builtin_choose_expr(__tg_type_corr(x, y, z, long double), \
fnl(__VA_ARGS__), __builtin_choose_expr( \
@@ -161,9 +161,10 @@
#define lround(__x) __tg_simple(__x, lround)
#define nearbyint(__x) __tg_simple(__x, nearbyint)
#define nextafter(__x, __y) __tg_simple2(__x, __y, nextafter)
-/* not yet implemented even for _LDBL_EQ_DBL platforms
+/* not yet implemented even for _LDBL_EQ_DBL platforms */
+#ifdef __CYGWIN__
#define nexttoward(__x, __y) __tg_simplev(__x, nexttoward, __x, __y)
-*/
+#endif
#define remainder(__x, __y) __tg_simple2(__x, __y, remainder)
#define remquo(__x, __y, __z) __tg_impl_simple(__x, __x, __y, remquo, remquof, \
remquol, __x, __y, __z)
diff --git a/newlib/libc/include/threads.h b/newlib/libc/include/threads.h
new file mode 100644
index 000000000..9fb08b03d
--- /dev/null
+++ b/newlib/libc/include/threads.h
@@ -0,0 +1,93 @@
+/*-
+ * Copyright (c) 2011 Ed Schouten <ed@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.
+ */
+
+#ifndef _THREADS_H_
+#define _THREADS_H_
+
+#include <machine/_threads.h>
+#include <time.h>
+
+typedef void (*tss_dtor_t)(void *);
+typedef int (*thrd_start_t)(void *);
+
+enum {
+ mtx_plain = 0x1,
+ mtx_recursive = 0x2,
+ mtx_timed = 0x4
+};
+
+enum {
+ thrd_busy = 1,
+ thrd_error = 2,
+ thrd_nomem = 3,
+ thrd_success = 4,
+ thrd_timedout = 5
+};
+
+#if !defined(__cplusplus) || __cplusplus < 201103L
+#define thread_local _Thread_local
+#endif
+
+__BEGIN_DECLS
+void call_once(once_flag *, void (*)(void));
+int cnd_broadcast(cnd_t *);
+void cnd_destroy(cnd_t *);
+int cnd_init(cnd_t *);
+int cnd_signal(cnd_t *);
+int cnd_timedwait(cnd_t *__restrict, mtx_t *__restrict __mtx,
+ const struct timespec *__restrict)
+ __requires_exclusive(*__mtx);
+int cnd_wait(cnd_t *, mtx_t *__mtx)
+ __requires_exclusive(*__mtx);
+void mtx_destroy(mtx_t *__mtx)
+ __requires_unlocked(*__mtx);
+int mtx_init(mtx_t *__mtx, int)
+ __requires_unlocked(*__mtx);
+int mtx_lock(mtx_t *__mtx)
+ __locks_exclusive(*__mtx);
+int mtx_timedlock(mtx_t *__restrict __mtx,
+ const struct timespec *__restrict)
+ __trylocks_exclusive(thrd_success, *__mtx);
+int mtx_trylock(mtx_t *__mtx)
+ __trylocks_exclusive(thrd_success, *__mtx);
+int mtx_unlock(mtx_t *__mtx)
+ __unlocks(*__mtx);
+int thrd_create(thrd_t *, thrd_start_t, void *);
+thrd_t thrd_current(void);
+int thrd_detach(thrd_t);
+int thrd_equal(thrd_t, thrd_t);
+_Noreturn void
+ thrd_exit(int);
+int thrd_join(thrd_t, int *);
+int thrd_sleep(const struct timespec *, struct timespec *);
+void thrd_yield(void);
+int tss_create(tss_t *, tss_dtor_t);
+void tss_delete(tss_t);
+void * tss_get(tss_t);
+int tss_set(tss_t, void *);
+__END_DECLS
+
+#endif /* !_THREADS_H_ */
diff --git a/newlib/libc/include/time.h b/newlib/libc/include/time.h
index c760297f9..698ad6113 100644
--- a/newlib/libc/include/time.h
+++ b/newlib/libc/include/time.h
@@ -8,6 +8,7 @@
#define _TIME_H_
#include "_ansi.h"
+#include <sys/cdefs.h>
#include <sys/reent.h>
#define __need_size_t
@@ -25,6 +26,7 @@
#define CLK_TCK CLOCKS_PER_SEC
#include <sys/types.h>
+#include <sys/timespec.h>
_BEGIN_STD_C
@@ -39,6 +41,12 @@ struct tm
int tm_wday;
int tm_yday;
int tm_isdst;
+#ifdef __TM_GMTOFF
+ long __TM_GMTOFF;
+#endif
+#ifdef __TM_ZONE
+ const char *__TM_ZONE;
+#endif
};
clock_t _EXFUN(clock, (void));
@@ -51,12 +59,17 @@ char *_EXFUN(ctime, (const time_t *_time));
struct tm *_EXFUN(gmtime, (const time_t *_timer));
struct tm *_EXFUN(localtime,(const time_t *_timer));
#endif
-size_t _EXFUN(strftime, (char *_s, size_t _maxsize, const char *_fmt, const struct tm *_t));
+size_t _EXFUN(strftime, (char *__restrict _s,
+ size_t _maxsize, const char *__restrict _fmt,
+ const struct tm *__restrict _t));
-char *_EXFUN(asctime_r, (const struct tm *, char *));
+char *_EXFUN(asctime_r, (const struct tm *__restrict,
+ char *__restrict));
char *_EXFUN(ctime_r, (const time_t *, char *));
-struct tm *_EXFUN(gmtime_r, (const time_t *, struct tm *));
-struct tm *_EXFUN(localtime_r, (const time_t *, struct tm *));
+struct tm *_EXFUN(gmtime_r, (const time_t *__restrict,
+ struct tm *__restrict));
+struct tm *_EXFUN(localtime_r, (const time_t *__restrict,
+ struct tm *__restrict));
_END_STD_C
@@ -64,9 +77,14 @@ _END_STD_C
extern "C" {
#endif
-#ifndef __STRICT_ANSI__
-char *_EXFUN(strptime, (const char *, const char *, struct tm *));
+#if __XSI_VISIBLE
+char *_EXFUN(strptime, (const char *__restrict,
+ const char *__restrict,
+ struct tm *__restrict));
+#endif
+#if __POSIX_VISIBLE
_VOID _EXFUN(tzset, (_VOID));
+#endif
_VOID _EXFUN(_tzset_r, (struct _reent *));
typedef struct __tzrule_struct
@@ -92,6 +110,7 @@ __tzinfo_type *_EXFUN (__gettzinfo, (_VOID));
/* getdate functions */
#ifdef HAVE_GETDATE
+#if __XSI_VISIBLE >= 4
#ifndef _REENT_ONLY
#define getdate_err (*__getdate_err())
int *_EXFUN(__getdate_err,(_VOID));
@@ -107,21 +126,27 @@ struct tm * _EXFUN(getdate, (const char *));
7 there is no line in the template that matches the input,
8 invalid input specification */
#endif /* !_REENT_ONLY */
+#endif /* __XSI_VISIBLE >= 4 */
+#if __GNU_VISIBLE
/* getdate_r returns the error code as above */
int _EXFUN(getdate_r, (const char *, struct tm *));
+#endif /* __GNU_VISIBLE */
#endif /* HAVE_GETDATE */
/* defines for the opengroup specifications Derived from Issue 1 of the SVID. */
+#if __SVID_VISIBLE || __XSI_VISIBLE
extern __IMPORT long _timezone;
extern __IMPORT int _daylight;
+#endif
+#if __POSIX_VISIBLE
extern __IMPORT char *_tzname[2];
/* POSIX defines the external tzname being defined in time.h */
#ifndef tzname
#define tzname _tzname
#endif
-#endif /* !__STRICT_ANSI__ */
+#endif /* __POSIX_VISIBLE */
#ifdef __cplusplus
}
@@ -150,7 +175,9 @@ int _EXFUN(clock_getres, (clockid_t clock_id, struct timespec *res));
/* Create a Per-Process Timer, P1003.1b-1993, p. 264 */
int _EXFUN(timer_create,
- (clockid_t clock_id, struct sigevent *evp, timer_t *timerid));
+ (clockid_t clock_id,
+ struct sigevent *__restrict evp,
+ timer_t *__restrict timerid));
/* Delete a Per_process Timer, P1003.1b-1993, p. 266 */
@@ -159,8 +186,9 @@ int _EXFUN(timer_delete, (timer_t timerid));
/* Per-Process Timers, P1003.1b-1993, p. 267 */
int _EXFUN(timer_settime,
- (timer_t timerid, int flags, const struct itimerspec *value,
- struct itimerspec *ovalue));
+ (timer_t timerid, int flags,
+ const struct itimerspec *__restrict value,
+ struct itimerspec *__restrict ovalue));
int _EXFUN(timer_gettime, (timer_t timerid, struct itimerspec *value));
int _EXFUN(timer_getoverrun, (timer_t timerid));
diff --git a/newlib/libc/include/wchar.h b/newlib/libc/include/wchar.h
index 5707ddcd3..251aa62fb 100644
--- a/newlib/libc/include/wchar.h
+++ b/newlib/libc/include/wchar.h
@@ -16,7 +16,7 @@
/* For _mbstate_t definition. */
#include <sys/_types.h>
-
+#include <sys/cdefs.h>
/* For __STDC_ISO_10646__ */
#include <sys/features.h>
@@ -24,20 +24,36 @@
# define WEOF ((wint_t)-1)
#endif
+/* This must match definition in <stdint.h> */
#ifndef WCHAR_MIN
-#define WCHAR_MIN 0
+#ifdef __WCHAR_MIN__
+#define WCHAR_MIN __WCHAR_MIN__
+#elif defined(__WCHAR_UNSIGNED__) || (L'\0' - 1 > 0)
+#define WCHAR_MIN (0 + L'\0')
+#else
+#define WCHAR_MIN (-0x7fffffff - 1 + L'\0')
+#endif
#endif
+/* This must match definition in <stdint.h> */
#ifndef WCHAR_MAX
#ifdef __WCHAR_MAX__
#define WCHAR_MAX __WCHAR_MAX__
+#elif defined(__WCHAR_UNSIGNED__) || (L'\0' - 1 > 0)
+#define WCHAR_MAX (0xffffffffu + L'\0')
#else
-#define WCHAR_MAX 0x7fffffffu
+#define WCHAR_MAX (0x7fffffff + L'\0')
#endif
#endif
_BEGIN_STD_C
+/* As in stdio.h, <sys/reent.h> defines __FILE. */
+#if !defined(__FILE_defined)
+typedef __FILE FILE;
+# define __FILE_defined
+#endif
+
/* As required by POSIX.1-2008, declare tm as incomplete type.
The actual definition is in time.h. */
struct tm;
@@ -49,77 +65,93 @@ typedef _mbstate_t mbstate_t;
wint_t _EXFUN(btowc, (int));
int _EXFUN(wctob, (wint_t));
-size_t _EXFUN(mbrlen, (const char * , size_t, mbstate_t *));
-size_t _EXFUN(mbrtowc, (wchar_t * , const char * , size_t, mbstate_t *));
+size_t _EXFUN(mbrlen, (const char *__restrict, size_t, mbstate_t *__restrict));
+size_t _EXFUN(mbrtowc, (wchar_t *__restrict, const char *__restrict, size_t,
+ mbstate_t *__restrict));
size_t _EXFUN(_mbrtowc_r, (struct _reent *, wchar_t * , const char * ,
size_t, mbstate_t *));
int _EXFUN(mbsinit, (const mbstate_t *));
-size_t _EXFUN(mbsnrtowcs, (wchar_t * , const char ** , size_t, size_t,
- mbstate_t *));
+size_t _EXFUN(mbsnrtowcs, (wchar_t *__restrict, const char **__restrict,
+ size_t, size_t, mbstate_t *__restrict));
size_t _EXFUN(_mbsnrtowcs_r, (struct _reent *, wchar_t * , const char ** ,
size_t, size_t, mbstate_t *));
-size_t _EXFUN(mbsrtowcs, (wchar_t * , const char ** , size_t, mbstate_t *));
+size_t _EXFUN(mbsrtowcs, (wchar_t *__restrict, const char **__restrict, size_t,
+ mbstate_t *__restrict));
size_t _EXFUN(_mbsrtowcs_r, (struct _reent *, wchar_t * , const char ** , size_t, mbstate_t *));
-size_t _EXFUN(wcrtomb, (char * , wchar_t, mbstate_t *));
+size_t _EXFUN(wcrtomb, (char *__restrict, wchar_t, mbstate_t *__restrict));
size_t _EXFUN(_wcrtomb_r, (struct _reent *, char * , wchar_t, mbstate_t *));
-size_t _EXFUN(wcsnrtombs, (char * , const wchar_t ** , size_t, size_t,
- mbstate_t *));
+size_t _EXFUN(wcsnrtombs, (char *__restrict, const wchar_t **__restrict,
+ size_t, size_t, mbstate_t *__restrict));
size_t _EXFUN(_wcsnrtombs_r, (struct _reent *, char * , const wchar_t ** ,
size_t, size_t, mbstate_t *));
-size_t _EXFUN(wcsrtombs, (char * , const wchar_t ** , size_t, mbstate_t *));
+size_t _EXFUN(wcsrtombs, (char *__restrict, const wchar_t **__restrict,
+ size_t, mbstate_t *__restrict));
size_t _EXFUN(_wcsrtombs_r, (struct _reent *, char * , const wchar_t ** ,
size_t, mbstate_t *));
int _EXFUN(wcscasecmp, (const wchar_t *, const wchar_t *));
-wchar_t *_EXFUN(wcscat, (wchar_t * , const wchar_t *));
+wchar_t *_EXFUN(wcscat, (wchar_t *__restrict, const wchar_t *__restrict));
wchar_t *_EXFUN(wcschr, (const wchar_t *, wchar_t));
int _EXFUN(wcscmp, (const wchar_t *, const wchar_t *));
int _EXFUN(wcscoll, (const wchar_t *, const wchar_t *));
-wchar_t *_EXFUN(wcscpy, (wchar_t * , const wchar_t *));
-wchar_t *_EXFUN(wcpcpy, (wchar_t * , const wchar_t *));
+wchar_t *_EXFUN(wcscpy, (wchar_t *__restrict, const wchar_t *__restrict));
+wchar_t *_EXFUN(wcpcpy, (wchar_t *__restrict,
+ const wchar_t *__restrict));
wchar_t *_EXFUN(wcsdup, (const wchar_t *));
wchar_t *_EXFUN(_wcsdup_r, (struct _reent *, const wchar_t * ));
size_t _EXFUN(wcscspn, (const wchar_t *, const wchar_t *));
-size_t _EXFUN(wcsftime, (wchar_t *, size_t, const wchar_t *, const struct tm *));
+size_t _EXFUN(wcsftime, (wchar_t *__restrict, size_t,
+ const wchar_t *__restrict, const struct tm *__restrict));
size_t _EXFUN(wcslcat, (wchar_t *, const wchar_t *, size_t));
size_t _EXFUN(wcslcpy, (wchar_t *, const wchar_t *, size_t));
size_t _EXFUN(wcslen, (const wchar_t *));
int _EXFUN(wcsncasecmp, (const wchar_t *, const wchar_t *, size_t));
-wchar_t *_EXFUN(wcsncat, (wchar_t * , const wchar_t * , size_t));
+wchar_t *_EXFUN(wcsncat, (wchar_t *__restrict,
+ const wchar_t *__restrict, size_t));
int _EXFUN(wcsncmp, (const wchar_t *, const wchar_t *, size_t));
-wchar_t *_EXFUN(wcsncpy, (wchar_t * , const wchar_t * , size_t));
-wchar_t *_EXFUN(wcpncpy, (wchar_t * , const wchar_t * , size_t));
+wchar_t *_EXFUN(wcsncpy, (wchar_t *__restrict,
+ const wchar_t *__restrict, size_t));
+wchar_t *_EXFUN(wcpncpy, (wchar_t *__restrict,
+ const wchar_t *__restrict, size_t));
size_t _EXFUN(wcsnlen, (const wchar_t *, size_t));
wchar_t *_EXFUN(wcspbrk, (const wchar_t *, const wchar_t *));
wchar_t *_EXFUN(wcsrchr, (const wchar_t *, wchar_t));
size_t _EXFUN(wcsspn, (const wchar_t *, const wchar_t *));
-wchar_t *_EXFUN(wcsstr, (const wchar_t *, const wchar_t *));
-wchar_t *_EXFUN(wcstok, (wchar_t *, const wchar_t *, wchar_t **));
-double _EXFUN(wcstod, (const wchar_t *, wchar_t **));
+wchar_t *_EXFUN(wcsstr, (const wchar_t *__restrict,
+ const wchar_t *__restrict));
+wchar_t *_EXFUN(wcstok, (wchar_t *__restrict, const wchar_t *__restrict,
+ wchar_t **__restrict));
+double _EXFUN(wcstod, (const wchar_t *__restrict, wchar_t **__restrict));
double _EXFUN(_wcstod_r, (struct _reent *, const wchar_t *, wchar_t **));
-float _EXFUN(wcstof, (const wchar_t *, wchar_t **));
+float _EXFUN(wcstof, (const wchar_t *__restrict, wchar_t **__restrict));
float _EXFUN(_wcstof_r, (struct _reent *, const wchar_t *, wchar_t **));
int _EXFUN(wcswidth, (const wchar_t *, size_t));
-size_t _EXFUN(wcsxfrm, (wchar_t *, const wchar_t *, size_t));
+size_t _EXFUN(wcsxfrm, (wchar_t *__restrict, const wchar_t *__restrict,
+ size_t));
int _EXFUN(wcwidth, (const wchar_t));
wchar_t *_EXFUN(wmemchr, (const wchar_t *, wchar_t, size_t));
int _EXFUN(wmemcmp, (const wchar_t *, const wchar_t *, size_t));
-wchar_t *_EXFUN(wmemcpy, (wchar_t * , const wchar_t * , size_t));
+wchar_t *_EXFUN(wmemcpy, (wchar_t *__restrict, const wchar_t *__restrict,
+ size_t));
wchar_t *_EXFUN(wmemmove, (wchar_t *, const wchar_t *, size_t));
wchar_t *_EXFUN(wmemset, (wchar_t *, wchar_t, size_t));
-long _EXFUN(wcstol, (const wchar_t *, wchar_t **, int));
-long long _EXFUN(wcstoll, (const wchar_t *, wchar_t **, int));
-unsigned long _EXFUN(wcstoul, (const wchar_t *, wchar_t **, int));
-unsigned long long _EXFUN(wcstoull, (const wchar_t *, wchar_t **, int));
+long _EXFUN(wcstol, (const wchar_t *__restrict, wchar_t **__restrict, int));
+long long _EXFUN(wcstoll, (const wchar_t *__restrict, wchar_t **__restrict,
+ int));
+unsigned long _EXFUN(wcstoul, (const wchar_t *__restrict, wchar_t **__restrict,
+ int));
+unsigned long long _EXFUN(wcstoull, (const wchar_t *__restrict,
+ wchar_t **__restrict, int));
long _EXFUN(_wcstol_r, (struct _reent *, const wchar_t *, wchar_t **, int));
long long _EXFUN(_wcstoll_r, (struct _reent *, const wchar_t *, wchar_t **, int));
unsigned long _EXFUN(_wcstoul_r, (struct _reent *, const wchar_t *, wchar_t **, int));
unsigned long long _EXFUN(_wcstoull_r, (struct _reent *, const wchar_t *, wchar_t **, int));
+long double _EXFUN(wcstold, (const wchar_t *, wchar_t **));
wint_t _EXFUN(fgetwc, (__FILE *));
-wchar_t *_EXFUN(fgetws, (wchar_t *, int, __FILE *));
+wchar_t *_EXFUN(fgetws, (wchar_t *__restrict, int, __FILE *__restrict));
wint_t _EXFUN(fputwc, (wchar_t, __FILE *));
-int _EXFUN(fputws, (const wchar_t *, __FILE *));
+int _EXFUN(fputws, (const wchar_t *__restrict, __FILE *__restrict));
int _EXFUN (fwide, (__FILE *, int));
wint_t _EXFUN (getwc, (__FILE *));
wint_t _EXFUN (getwchar, (void));
@@ -128,17 +160,38 @@ wint_t _EXFUN(putwchar, (wchar_t));
wint_t _EXFUN (ungetwc, (wint_t wc, __FILE *));
wint_t _EXFUN(_fgetwc_r, (struct _reent *, __FILE *));
+wint_t _EXFUN(_fgetwc_unlocked_r, (struct _reent *, __FILE *));
wchar_t *_EXFUN(_fgetws_r, (struct _reent *, wchar_t *, int, __FILE *));
+wchar_t *_EXFUN(_fgetws_unlocked_r, (struct _reent *, wchar_t *, int, __FILE *));
wint_t _EXFUN(_fputwc_r, (struct _reent *, wchar_t, __FILE *));
+wint_t _EXFUN(_fputwc_unlocked_r, (struct _reent *, wchar_t, __FILE *));
int _EXFUN(_fputws_r, (struct _reent *, const wchar_t *, __FILE *));
+int _EXFUN(_fputws_unlocked_r, (struct _reent *, const wchar_t *, __FILE *));
int _EXFUN (_fwide_r, (struct _reent *, __FILE *, int));
wint_t _EXFUN (_getwc_r, (struct _reent *, __FILE *));
+wint_t _EXFUN (_getwc_unlocked_r, (struct _reent *, __FILE *));
wint_t _EXFUN (_getwchar_r, (struct _reent *ptr));
+wint_t _EXFUN (_getwchar_unlocked_r, (struct _reent *ptr));
wint_t _EXFUN(_putwc_r, (struct _reent *, wchar_t, __FILE *));
+wint_t _EXFUN(_putwc_unlocked_r, (struct _reent *, wchar_t, __FILE *));
wint_t _EXFUN(_putwchar_r, (struct _reent *, wchar_t));
+wint_t _EXFUN(_putwchar_unlocked_r, (struct _reent *, wchar_t));
wint_t _EXFUN (_ungetwc_r, (struct _reent *, wint_t wc, __FILE *));
+#if __GNU_VISIBLE
+wint_t _EXFUN(fgetwc_unlocked, (__FILE *));
+wchar_t *_EXFUN(fgetws_unlocked, (wchar_t *__restrict, int, __FILE *__restrict));
+wint_t _EXFUN(fputwc_unlocked, (wchar_t, __FILE *));
+int _EXFUN(fputws_unlocked, (const wchar_t *__restrict, __FILE *__restrict));
+wint_t _EXFUN(getwc_unlocked, (__FILE *));
+wint_t _EXFUN(getwchar_unlocked, (void));
+wint_t _EXFUN(putwc_unlocked, (wchar_t, __FILE *));
+wint_t _EXFUN(putwchar_unlocked, (wchar_t));
+#endif
+
+#if __POSIX_VISIBLE >= 200809
__FILE *_EXFUN (open_wmemstream, (wchar_t **, size_t *));
+#endif
__FILE *_EXFUN (_open_wmemstream_r, (struct _reent *, wchar_t **, size_t *));
#ifndef __VALIST
@@ -149,12 +202,15 @@ __FILE *_EXFUN (_open_wmemstream_r, (struct _reent *, wchar_t **, size_t *));
#endif
#endif
-int _EXFUN(fwprintf, (__FILE *, const wchar_t *, ...));
-int _EXFUN(swprintf, (wchar_t *, size_t, const wchar_t *, ...));
-int _EXFUN(vfwprintf, (__FILE *, const wchar_t *, __VALIST));
-int _EXFUN(vswprintf, (wchar_t *, size_t, const wchar_t *, __VALIST));
-int _EXFUN(vwprintf, (const wchar_t *, __VALIST));
-int _EXFUN(wprintf, (const wchar_t *, ...));
+int _EXFUN(fwprintf, (__FILE *__restrict, const wchar_t *__restrict, ...));
+int _EXFUN(swprintf, (wchar_t *__restrict, size_t,
+ const wchar_t *__restrict, ...));
+int _EXFUN(vfwprintf, (__FILE *__restrict, const wchar_t *__restrict,
+ __VALIST));
+int _EXFUN(vswprintf, (wchar_t *__restrict, size_t,
+ const wchar_t *__restrict, __VALIST));
+int _EXFUN(vwprintf, (const wchar_t *__restrict, __VALIST));
+int _EXFUN(wprintf, (const wchar_t *__restrict, ...));
int _EXFUN(_fwprintf_r, (struct _reent *, __FILE *, const wchar_t *, ...));
int _EXFUN(_swprintf_r, (struct _reent *, wchar_t *, size_t, const wchar_t *, ...));
@@ -163,12 +219,15 @@ int _EXFUN(_vswprintf_r, (struct _reent *, wchar_t *, size_t, const wchar_t *, _
int _EXFUN(_vwprintf_r, (struct _reent *, const wchar_t *, __VALIST));
int _EXFUN(_wprintf_r, (struct _reent *, const wchar_t *, ...));
-int _EXFUN(fwscanf, (__FILE *, const wchar_t *, ...));
-int _EXFUN(swscanf, (const wchar_t *, const wchar_t *, ...));
-int _EXFUN(vfwscanf, (__FILE *, const wchar_t *, __VALIST));
-int _EXFUN(vswscanf, (const wchar_t *, const wchar_t *, __VALIST));
-int _EXFUN(vwscanf, (const wchar_t *, __VALIST));
-int _EXFUN(wscanf, (const wchar_t *, ...));
+int _EXFUN(fwscanf, (__FILE *__restrict, const wchar_t *__restrict, ...));
+int _EXFUN(swscanf, (const wchar_t *__restrict,
+ const wchar_t *__restrict, ...));
+int _EXFUN(vfwscanf, (__FILE *__restrict, const wchar_t *__restrict,
+ __VALIST));
+int _EXFUN(vswscanf, (const wchar_t *__restrict, const wchar_t *__restrict,
+ __VALIST));
+int _EXFUN(vwscanf, (const wchar_t *__restrict, __VALIST));
+int _EXFUN(wscanf, (const wchar_t *__restrict, ...));
int _EXFUN(_fwscanf_r, (struct _reent *, __FILE *, const wchar_t *, ...));
int _EXFUN(_swscanf_r, (struct _reent *, const wchar_t *, const wchar_t *, ...));
@@ -182,6 +241,13 @@ int _EXFUN(_wscanf_r, (struct _reent *, const wchar_t *, ...));
#define getwchar() fgetwc(_REENT->_stdin)
#define putwchar(wc) fputwc((wc), _REENT->_stdout)
+#if __GNU_VISIBLE
+#define getwc_unlocked(fp) fgetwc_unlocked(fp)
+#define putwc_unlocked(wc,fp) fputwc_unlocked((wc), (fp))
+#define getwchar_unlocked() fgetwc_unlocked(_REENT->_stdin)
+#define putwchar_unlocked(wc) fputwc_unlocked((wc), _REENT->_stdout)
+#endif
+
_END_STD_C
#endif /* _WCHAR_H_ */
diff --git a/newlib/libc/include/wordexp.h b/newlib/libc/include/wordexp.h
index 8f87681a9..1f09a64c5 100644
--- a/newlib/libc/include/wordexp.h
+++ b/newlib/libc/include/wordexp.h
@@ -43,7 +43,7 @@ enum {
/* Note: This implementation of wordexp requires a version of bash
that supports the --wordexp and --protected arguments to be present
on the system. It does not support the WRDE_UNDEF flag. */
-int wordexp(const char *, wordexp_t *, int);
+int wordexp(const char *__restrict, wordexp_t *__restrict, int);
void wordfree(wordexp_t *);
#ifdef __cplusplus
diff --git a/newlib/libc/libc.texinfo b/newlib/libc/libc.texinfo
index 74d448d88..6216c9929 100644
--- a/newlib/libc/libc.texinfo
+++ b/newlib/libc/libc.texinfo
@@ -4,16 +4,17 @@
@ifinfo
@format
-START-INFO-DIR-ENTRY
-* libc:: The ANSI C library.
-END-INFO-DIR-ENTRY
+@dircategory Newlib
+@direntry
+* libc: (libc). The ANSI C library.
+@end direntry
@end format
@end ifinfo
@ifinfo
This file documents the ANSI C library.
-Copyright (C) 1992, 1993, 1994-2012 Red Hat, Inc.
+Copyright (C) 1992, 1993, 1994-2014 Red Hat, Inc.
@file{libc} includes software developed by the
University of California, Berkeley and its contributors.
@@ -69,8 +70,8 @@ into another language, under the above conditions for modified versions.
@title The Red Hat newlib C Library
@subtitle Full Configuration
@sp 1
-@subtitle @code{libc} 2.0.0
-@subtitle December 2012
+@subtitle @code{libc} 2.2.0
+@subtitle December 2014
@author {Steve Chamberlain}
@author {Roland Pesch}
@author {Red Hat Support}
@@ -172,7 +173,7 @@ into another language, under the above conditions for modified versions.
* Iconv::
@end ifset
-* Library Index::
+* Document Index::
@end menu
@end ifnottex
@@ -424,8 +425,8 @@ argument list @var{ap} any further.
The @code{va_end} defined in @file{varargs.h} has the same syntax and
usage as the ANSI C version from @file{stdarg.h}.
-@node Library Index
-@unnumbered Index
+@node Document Index
+@unnumbered Document Index
@printindex cp
@tex
diff --git a/newlib/libc/locale/Makefile.am b/newlib/libc/locale/Makefile.am
index 66cc7ba9e..eaeb385ee 100644
--- a/newlib/libc/locale/Makefile.am
+++ b/newlib/libc/locale/Makefile.am
@@ -38,18 +38,4 @@ include $(srcdir)/../../Makefile.shared
CHEWOUT_FILES = locale.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)/locale.tex >> $(TARGETDOC)
-
-CLEANFILES = $(CHEWOUT_FILES) *.ref
-
+CHAPTERS = locale.tex
diff --git a/newlib/libc/locale/Makefile.in b/newlib/libc/locale/Makefile.in
index b3fa34801..782976e28 100644
--- a/newlib/libc/locale/Makefile.in
+++ b/newlib/libc/locale/Makefile.in
@@ -284,11 +284,15 @@ liblocale_la_LDFLAGS = -Xcompiler -nostdlib
@USE_LIBTOOL_FALSE@noinst_LIBRARIES = lib.a
@USE_LIBTOOL_FALSE@lib_a_SOURCES = $(GENERAL_SOURCES) $(ELIX_SOURCES)
@USE_LIBTOOL_FALSE@lib_a_CFLAGS = $(AM_CFLAGS)
-CHEWOUT_FILES = locale.def
+
+#
+# documentation rules
+#
SUFFIXES = .def
-CHEW = ../../doc/makedoc -f $(srcdir)/../../doc/doc.str
-TARGETDOC = ../tmp.texi
+CHEW = ${top_builddir}/../doc/makedoc -f $(top_srcdir)/../doc/doc.str
CLEANFILES = $(CHEWOUT_FILES) *.ref
+CHEWOUT_FILES = locale.def
+CHAPTERS = locale.tex
all: all-am
.SUFFIXES:
@@ -600,8 +604,13 @@ objectlist.awk.in: $(noinst_LTLIBRARIES)
$(CHEW) < $< > $*.def 2> $*.ref
touch stmp-def
+TARGETDOC ?= ../tmp.texi
+
doc: $(CHEWOUT_FILES)
- cat $(srcdir)/locale.tex >> $(TARGETDOC)
+ for chapter in $(CHAPTERS) ; \
+ do \
+ cat $(srcdir)/$$chapter >> $(TARGETDOC) ; \
+ done
# 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.
diff --git a/newlib/libc/locale/ldpart.c b/newlib/libc/locale/ldpart.c
index 595532298..27900c289 100644
--- a/newlib/libc/locale/ldpart.c
+++ b/newlib/libc/locale/ldpart.c
@@ -110,7 +110,7 @@ __part_load_locale(const char *name,
goto bad_locale;
if (st.st_size <= 0)
goto bad_locale;
- bufsize = namesize + st.st_size;
+ bufsize = namesize + st.st_size + 1;
locale_buf = NULL;
if (lbuf == NULL || lbuf == locale_buf_C)
@@ -137,6 +137,7 @@ __part_load_locale(const char *name,
/*
* Parse the locale file into localebuf.
*/
+ p[st.st_size] = '\0';
if (plim[-1] != '\n')
goto bad_lbuf;
num_lines = split_lines(p, plim);
@@ -174,6 +175,8 @@ split_lines(char *p, const char *plim) {
for (i = 0; p < plim; i++) {
p = strchr(p, '\n');
+ if (!p)
+ break;
*p++ = '\0';
}
return i;
diff --git a/newlib/libc/locale/locale.c b/newlib/libc/locale/locale.c
index 8e2b121bc..77b53a99d 100644
--- a/newlib/libc/locale/locale.c
+++ b/newlib/libc/locale/locale.c
@@ -88,7 +88,7 @@ Cygwin additionally supports locales from the file
/usr/share/locale/locale.alias.
(<<"">> is also accepted; if given, the settings are read from the
-corresponding LC_* environment variables and $LANG according to POSIX rules.
+corresponding LC_* environment variables and $LANG according to POSIX rules.)
This implementation also supports the modifier <<"cjknarrow">>, which
affects how the functions <<wcwidth>> and <<wcswidth>> handle characters
diff --git a/newlib/libc/locale/locale.tex b/newlib/libc/locale/locale.tex
index 20dc5d2bc..eee7d77cb 100644
--- a/newlib/libc/locale/locale.tex
+++ b/newlib/libc/locale/locale.tex
@@ -9,7 +9,7 @@ one defined in the ANSI C standard.
This is a minimal implementation, supporting only the required @code{"C"}
value for locale; strings representing other locales are not
honored. (@code{""} is also accepted; it represents the default locale
-for an implementation, here equivalent to @code{"C"}.
+for an implementation, here equivalent to @code{"C"}).
@file{locale.h} defines the structure @code{lconv} to collect the
diff --git a/newlib/libc/machine/a29k/configure b/newlib/libc/machine/a29k/configure
index 7f4d0d6df..bc041896f 100755
--- a/newlib/libc/machine/a29k/configure
+++ b/newlib/libc/machine/a29k/configure
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.68 for newlib 2.0.0.
+# Generated by GNU Autoconf 2.68 for newlib 2.4.0.
#
#
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
@@ -556,8 +556,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='newlib'
PACKAGE_TARNAME='newlib'
-PACKAGE_VERSION='2.0.0'
-PACKAGE_STRING='newlib 2.0.0'
+PACKAGE_VERSION='2.4.0'
+PACKAGE_STRING='newlib 2.4.0'
PACKAGE_BUGREPORT=''
PACKAGE_URL=''
@@ -1239,7 +1239,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures newlib 2.0.0 to adapt to many kinds of systems.
+\`configure' configures newlib 2.4.0 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1309,7 +1309,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of newlib 2.0.0:";;
+ short | recursive ) echo "Configuration of newlib 2.4.0:";;
esac
cat <<\_ACEOF
@@ -1400,7 +1400,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-newlib configure 2.0.0
+newlib configure 2.4.0
generated by GNU Autoconf 2.68
Copyright (C) 2010 Free Software Foundation, Inc.
@@ -1455,7 +1455,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by newlib $as_me 2.0.0, which was
+It was created by newlib $as_me 2.4.0, which was
generated by GNU Autoconf 2.68. Invocation command line was
$ $0 $@
@@ -2527,7 +2527,7 @@ fi
# Define the identity of the package.
PACKAGE='newlib'
- VERSION='2.0.0'
+ VERSION='2.4.0'
# Some tools Automake needs.
@@ -4007,7 +4007,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by newlib $as_me 2.0.0, which was
+This file was extended by newlib $as_me 2.4.0, which was
generated by GNU Autoconf 2.68. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -4064,7 +4064,7 @@ _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
-newlib config.status 2.0.0
+newlib config.status 2.4.0
configured by $0, generated by GNU Autoconf 2.68,
with options \\"\$ac_cs_config\\"
diff --git a/newlib/libc/machine/aarch64/Makefile.am b/newlib/libc/machine/aarch64/Makefile.am
index 2a810e253..e8b8197fa 100644
--- a/newlib/libc/machine/aarch64/Makefile.am
+++ b/newlib/libc/machine/aarch64/Makefile.am
@@ -9,6 +9,8 @@ AM_CCASFLAGS = $(INCLUDES)
noinst_LIBRARIES = lib.a
lib_a_SOURCES =
+lib_a_SOURCES += memchr-stub.c
+lib_a_SOURCES += memchr.S
lib_a_SOURCES += memcmp-stub.c
lib_a_SOURCES += memcmp.S
lib_a_SOURCES += memcpy-stub.c
@@ -17,15 +19,27 @@ lib_a_SOURCES += memmove-stub.c
lib_a_SOURCES += memmove.S
lib_a_SOURCES += memset-stub.c
lib_a_SOURCES += memset.S
+lib_a_SOURCES += rawmemchr.S
+lib_a_SOURCES += rawmemchr-stub.c
lib_a_SOURCES += setjmp.S
+lib_a_SOURCES += stpcpy-stub.c
+lib_a_SOURCES += stpcpy.S
+lib_a_SOURCES += strchr-stub.c
+lib_a_SOURCES += strchr.S
+lib_a_SOURCES += strchrnul-stub.c
+lib_a_SOURCES += strchrnul.S
lib_a_SOURCES += strcmp-stub.c
lib_a_SOURCES += strcmp.S
+lib_a_SOURCES += strcpy-stub.c
+lib_a_SOURCES += strcpy.S
lib_a_SOURCES += strlen-stub.c
lib_a_SOURCES += strlen.S
lib_a_SOURCES += strncmp-stub.c
lib_a_SOURCES += strncmp.S
lib_a_SOURCES += strnlen-stub.c
lib_a_SOURCES += strnlen.S
+lib_a_SOURCES += strrchr-stub.c
+lib_a_SOURCES += strrchr.S
lib_a_CCASFLAGS=$(AM_CCASFLAGS)
lib_a_CFLAGS=$(AM_CFLAGS)
diff --git a/newlib/libc/machine/aarch64/Makefile.in b/newlib/libc/machine/aarch64/Makefile.in
index 6e568858e..c512911a2 100644
--- a/newlib/libc/machine/aarch64/Makefile.in
+++ b/newlib/libc/machine/aarch64/Makefile.in
@@ -69,15 +69,22 @@ LIBRARIES = $(noinst_LIBRARIES)
ARFLAGS = cru
lib_a_AR = $(AR) $(ARFLAGS)
lib_a_LIBADD =
-am_lib_a_OBJECTS = lib_a-memcmp-stub.$(OBJEXT) lib_a-memcmp.$(OBJEXT) \
+am_lib_a_OBJECTS = lib_a-memchr-stub.$(OBJEXT) lib_a-memchr.$(OBJEXT) \
+ lib_a-memcmp-stub.$(OBJEXT) lib_a-memcmp.$(OBJEXT) \
lib_a-memcpy-stub.$(OBJEXT) lib_a-memcpy.$(OBJEXT) \
lib_a-memmove-stub.$(OBJEXT) lib_a-memmove.$(OBJEXT) \
lib_a-memset-stub.$(OBJEXT) lib_a-memset.$(OBJEXT) \
- lib_a-setjmp.$(OBJEXT) lib_a-strcmp-stub.$(OBJEXT) \
- lib_a-strcmp.$(OBJEXT) lib_a-strlen-stub.$(OBJEXT) \
+ lib_a-setjmp.$(OBJEXT) lib_a-stpcpy-stub.$(OBJEXT) \
+ lib_a-stpcpy.$(OBJEXT) lib_a-strchr-stub.$(OBJEXT) \
+ lib_a-strchr.$(OBJEXT) lib_a-strchrnul-stub.$(OBJEXT) \
+ lib_a-strchrnul.$(OBJEXT) lib_a-strcmp-stub.$(OBJEXT) \
+ lib_a-strcmp.$(OBJEXT) lib_a-strcpy-stub.$(OBJEXT) \
+ lib_a-strcpy.$(OBJEXT) lib_a-strlen-stub.$(OBJEXT) \
lib_a-strlen.$(OBJEXT) lib_a-strncmp-stub.$(OBJEXT) \
lib_a-strncmp.$(OBJEXT) lib_a-strnlen-stub.$(OBJEXT) \
- lib_a-strnlen.$(OBJEXT)
+ lib_a-strnlen.$(OBJEXT) lib_a-strrchr-stub.$(OBJEXT) \
+ lib_a-strrchr.$(OBJEXT) lib_a-rawmemchr-stub.$(OBJEXT) \
+ lib_a-rawmemchr.$(OBJEXT)
lib_a_OBJECTS = $(am_lib_a_OBJECTS)
DEFAULT_INCLUDES = -I.@am__isrc@
depcomp =
@@ -203,10 +210,13 @@ AUTOMAKE_OPTIONS = cygnus
INCLUDES = $(NEWLIB_CFLAGS) $(CROSS_CFLAGS) $(TARGET_CFLAGS)
AM_CCASFLAGS = $(INCLUDES)
noinst_LIBRARIES = lib.a
-lib_a_SOURCES = memcmp-stub.c memcmp.S memcpy-stub.c memcpy.S \
- memmove-stub.c memmove.S memset-stub.c memset.S setjmp.S \
- strcmp-stub.c strcmp.S strlen-stub.c strlen.S strncmp-stub.c \
- strncmp.S strnlen-stub.c strnlen.S
+lib_a_SOURCES = memchr-stub.c memchr.S memcmp-stub.c memcmp.S \
+ memcpy-stub.c memcpy.S memmove-stub.c memmove.S memset-stub.c \
+ memset.S setjmp.S stpcpy-stub.c stpcpy.S strchr-stub.c \
+ strchr.S strchrnul-stub.c strchrnul.S strcmp-stub.c strcmp.S \
+ strcpy-stub.c strcpy.S strlen-stub.c strlen.S strncmp-stub.c \
+ strncmp.S strnlen-stub.c strnlen.S strrchr-stub.c strrchr.S \
+ rawmemchr.S rawmemchr-stub.c
lib_a_CCASFLAGS = $(AM_CCASFLAGS)
lib_a_CFLAGS = $(AM_CFLAGS)
ACLOCAL_AMFLAGS = -I ../../.. -I ../../../..
@@ -269,6 +279,19 @@ distclean-compile:
.S.obj:
$(CPPASCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
+
+lib_a-rawmemchr.o: rawmemchr.S
+ $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CCASFLAGS) $(CCASFLAGS) -c -o lib_a-rawmemchr.o `test -f 'rawmemchr.S' || echo '$(srcdir)/'`rawmemchr.S
+
+lib_a-rawmemchr.obj: rawmemchr.S
+ $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CCASFLAGS) $(CCASFLAGS) -c -o lib_a-rawmemchr.obj `if test -f 'rawmemchr.S'; then $(CYGPATH_W) 'rawmemchr.S'; else $(CYGPATH_W) '$(srcdir)/rawmemchr.S'; fi`
+
+lib_a-memchr.o: memchr.S
+ $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CCASFLAGS) $(CCASFLAGS) -c -o lib_a-memchr.o `test -f 'memchr.S' || echo '$(srcdir)/'`memchr.S
+
+lib_a-memchr.obj: memchr.S
+ $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CCASFLAGS) $(CCASFLAGS) -c -o lib_a-memchr.obj `if test -f 'memchr.S'; then $(CYGPATH_W) 'memchr.S'; else $(CYGPATH_W) '$(srcdir)/memchr.S'; fi`
+
lib_a-memcmp.o: memcmp.S
$(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CCASFLAGS) $(CCASFLAGS) -c -o lib_a-memcmp.o `test -f 'memcmp.S' || echo '$(srcdir)/'`memcmp.S
@@ -299,12 +322,36 @@ lib_a-setjmp.o: setjmp.S
lib_a-setjmp.obj: setjmp.S
$(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CCASFLAGS) $(CCASFLAGS) -c -o lib_a-setjmp.obj `if test -f 'setjmp.S'; then $(CYGPATH_W) 'setjmp.S'; else $(CYGPATH_W) '$(srcdir)/setjmp.S'; fi`
+lib_a-stpcpy.o: stpcpy.S
+ $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CCASFLAGS) $(CCASFLAGS) -c -o lib_a-stpcpy.o `test -f 'stpcpy.S' || echo '$(srcdir)/'`stpcpy.S
+
+lib_a-stpcpy.obj: stpcpy.S
+ $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CCASFLAGS) $(CCASFLAGS) -c -o lib_a-stpcpy.obj `if test -f 'stpcpy.S'; then $(CYGPATH_W) 'stpcpy.S'; else $(CYGPATH_W) '$(srcdir)/stpcpy.S'; fi`
+
+lib_a-strchr.o: strchr.S
+ $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CCASFLAGS) $(CCASFLAGS) -c -o lib_a-strchr.o `test -f 'strchr.S' || echo '$(srcdir)/'`strchr.S
+
+lib_a-strchr.obj: strchr.S
+ $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CCASFLAGS) $(CCASFLAGS) -c -o lib_a-strchr.obj `if test -f 'strchr.S'; then $(CYGPATH_W) 'strchr.S'; else $(CYGPATH_W) '$(srcdir)/strchr.S'; fi`
+
+lib_a-strchrnul.o: strchrnul.S
+ $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CCASFLAGS) $(CCASFLAGS) -c -o lib_a-strchrnul.o `test -f 'strchrnul.S' || echo '$(srcdir)/'`strchrnul.S
+
+lib_a-strchrnul.obj: strchrnul.S
+ $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CCASFLAGS) $(CCASFLAGS) -c -o lib_a-strchrnul.obj `if test -f 'strchrnul.S'; then $(CYGPATH_W) 'strchrnul.S'; else $(CYGPATH_W) '$(srcdir)/strchrnul.S'; fi`
+
lib_a-strcmp.o: strcmp.S
$(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CCASFLAGS) $(CCASFLAGS) -c -o lib_a-strcmp.o `test -f 'strcmp.S' || echo '$(srcdir)/'`strcmp.S
lib_a-strcmp.obj: strcmp.S
$(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CCASFLAGS) $(CCASFLAGS) -c -o lib_a-strcmp.obj `if test -f 'strcmp.S'; then $(CYGPATH_W) 'strcmp.S'; else $(CYGPATH_W) '$(srcdir)/strcmp.S'; fi`
+lib_a-strcpy.o: strcpy.S
+ $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CCASFLAGS) $(CCASFLAGS) -c -o lib_a-strcpy.o `test -f 'strcpy.S' || echo '$(srcdir)/'`strcpy.S
+
+lib_a-strcpy.obj: strcpy.S
+ $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CCASFLAGS) $(CCASFLAGS) -c -o lib_a-strcpy.obj `if test -f 'strcpy.S'; then $(CYGPATH_W) 'strcpy.S'; else $(CYGPATH_W) '$(srcdir)/strcpy.S'; fi`
+
lib_a-strlen.o: strlen.S
$(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CCASFLAGS) $(CCASFLAGS) -c -o lib_a-strlen.o `test -f 'strlen.S' || echo '$(srcdir)/'`strlen.S
@@ -323,12 +370,30 @@ lib_a-strnlen.o: strnlen.S
lib_a-strnlen.obj: strnlen.S
$(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CCASFLAGS) $(CCASFLAGS) -c -o lib_a-strnlen.obj `if test -f 'strnlen.S'; then $(CYGPATH_W) 'strnlen.S'; else $(CYGPATH_W) '$(srcdir)/strnlen.S'; fi`
+lib_a-strrchr.o: strrchr.S
+ $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CCASFLAGS) $(CCASFLAGS) -c -o lib_a-strrchr.o `test -f 'strrchr.S' || echo '$(srcdir)/'`strrchr.S
+
+lib_a-strrchr.obj: strrchr.S
+ $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CCASFLAGS) $(CCASFLAGS) -c -o lib_a-strrchr.obj `if test -f 'strrchr.S'; then $(CYGPATH_W) 'strrchr.S'; else $(CYGPATH_W) '$(srcdir)/strrchr.S'; fi`
+
.c.o:
$(COMPILE) -c $<
.c.obj:
$(COMPILE) -c `$(CYGPATH_W) '$<'`
+lib_a-rawmemchr-stub.o: rawmemchr-stub.c
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-rawmemchr-stub.o `test -f 'rawmemchr-stub.c' || echo '$(srcdir)/'`rawmemchr-stub.c
+
+lib_a-rawmemchr-stub.obj: rawmemchr-stub.c
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-rawmemchr-stub.obj `if test -f 'rawmemchr-stub.c'; then $(CYGPATH_W) 'rawmemchr-stub.c'; else $(CYGPATH_W) '$(srcdir)/rawmemchr-stub.c'; fi`
+
+lib_a-memchr-stub.o: memchr-stub.c
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-memchr-stub.o `test -f 'memchr-stub.c' || echo '$(srcdir)/'`memchr-stub.c
+
+lib_a-memchr-stub.obj: memchr-stub.c
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-memchr-stub.obj `if test -f 'memchr-stub.c'; then $(CYGPATH_W) 'memchr-stub.c'; else $(CYGPATH_W) '$(srcdir)/memchr-stub.c'; fi`
+
lib_a-memcmp-stub.o: memcmp-stub.c
$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-memcmp-stub.o `test -f 'memcmp-stub.c' || echo '$(srcdir)/'`memcmp-stub.c
@@ -353,12 +418,36 @@ lib_a-memset-stub.o: memset-stub.c
lib_a-memset-stub.obj: memset-stub.c
$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-memset-stub.obj `if test -f 'memset-stub.c'; then $(CYGPATH_W) 'memset-stub.c'; else $(CYGPATH_W) '$(srcdir)/memset-stub.c'; fi`
+lib_a-stpcpy-stub.o: stpcpy-stub.c
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-stpcpy-stub.o `test -f 'stpcpy-stub.c' || echo '$(srcdir)/'`stpcpy-stub.c
+
+lib_a-stpcpy-stub.obj: stpcpy-stub.c
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-stpcpy-stub.obj `if test -f 'stpcpy-stub.c'; then $(CYGPATH_W) 'stpcpy-stub.c'; else $(CYGPATH_W) '$(srcdir)/stpcpy-stub.c'; fi`
+
+lib_a-strchr-stub.o: strchr-stub.c
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-strchr-stub.o `test -f 'strchr-stub.c' || echo '$(srcdir)/'`strchr-stub.c
+
+lib_a-strchr-stub.obj: strchr-stub.c
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-strchr-stub.obj `if test -f 'strchr-stub.c'; then $(CYGPATH_W) 'strchr-stub.c'; else $(CYGPATH_W) '$(srcdir)/strchr-stub.c'; fi`
+
+lib_a-strchrnul-stub.o: strchrnul-stub.c
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-strchrnul-stub.o `test -f 'strchrnul-stub.c' || echo '$(srcdir)/'`strchrnul-stub.c
+
+lib_a-strchrnul-stub.obj: strchrnul-stub.c
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-strchrnul-stub.obj `if test -f 'strchrnul-stub.c'; then $(CYGPATH_W) 'strchrnul-stub.c'; else $(CYGPATH_W) '$(srcdir)/strchrnul-stub.c'; fi`
+
lib_a-strcmp-stub.o: strcmp-stub.c
$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-strcmp-stub.o `test -f 'strcmp-stub.c' || echo '$(srcdir)/'`strcmp-stub.c
lib_a-strcmp-stub.obj: strcmp-stub.c
$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-strcmp-stub.obj `if test -f 'strcmp-stub.c'; then $(CYGPATH_W) 'strcmp-stub.c'; else $(CYGPATH_W) '$(srcdir)/strcmp-stub.c'; fi`
+lib_a-strcpy-stub.o: strcpy-stub.c
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-strcpy-stub.o `test -f 'strcpy-stub.c' || echo '$(srcdir)/'`strcpy-stub.c
+
+lib_a-strcpy-stub.obj: strcpy-stub.c
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-strcpy-stub.obj `if test -f 'strcpy-stub.c'; then $(CYGPATH_W) 'strcpy-stub.c'; else $(CYGPATH_W) '$(srcdir)/strcpy-stub.c'; fi`
+
lib_a-strlen-stub.o: strlen-stub.c
$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-strlen-stub.o `test -f 'strlen-stub.c' || echo '$(srcdir)/'`strlen-stub.c
@@ -377,6 +466,12 @@ lib_a-strnlen-stub.o: strnlen-stub.c
lib_a-strnlen-stub.obj: strnlen-stub.c
$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-strnlen-stub.obj `if test -f 'strnlen-stub.c'; then $(CYGPATH_W) 'strnlen-stub.c'; else $(CYGPATH_W) '$(srcdir)/strnlen-stub.c'; fi`
+lib_a-strrchr-stub.o: strrchr-stub.c
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-strrchr-stub.o `test -f 'strrchr-stub.c' || echo '$(srcdir)/'`strrchr-stub.c
+
+lib_a-strrchr-stub.obj: strrchr-stub.c
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-strrchr-stub.obj `if test -f 'strrchr-stub.c'; then $(CYGPATH_W) 'strrchr-stub.c'; else $(CYGPATH_W) '$(srcdir)/strrchr-stub.c'; fi`
+
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
diff --git a/newlib/libc/machine/aarch64/configure b/newlib/libc/machine/aarch64/configure
index d96b7718a..ca07e566c 100755
--- a/newlib/libc/machine/aarch64/configure
+++ b/newlib/libc/machine/aarch64/configure
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.68 for newlib 2.0.0.
+# Generated by GNU Autoconf 2.68 for newlib 2.4.0.
#
#
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
@@ -556,8 +556,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='newlib'
PACKAGE_TARNAME='newlib'
-PACKAGE_VERSION='2.0.0'
-PACKAGE_STRING='newlib 2.0.0'
+PACKAGE_VERSION='2.4.0'
+PACKAGE_STRING='newlib 2.4.0'
PACKAGE_BUGREPORT=''
PACKAGE_URL=''
@@ -1239,7 +1239,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures newlib 2.0.0 to adapt to many kinds of systems.
+\`configure' configures newlib 2.4.0 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1309,7 +1309,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of newlib 2.0.0:";;
+ short | recursive ) echo "Configuration of newlib 2.4.0:";;
esac
cat <<\_ACEOF
@@ -1400,7 +1400,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-newlib configure 2.0.0
+newlib configure 2.4.0
generated by GNU Autoconf 2.68
Copyright (C) 2010 Free Software Foundation, Inc.
@@ -1455,7 +1455,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by newlib $as_me 2.0.0, which was
+It was created by newlib $as_me 2.4.0, which was
generated by GNU Autoconf 2.68. Invocation command line was
$ $0 $@
@@ -2527,7 +2527,7 @@ fi
# Define the identity of the package.
PACKAGE='newlib'
- VERSION='2.0.0'
+ VERSION='2.4.0'
# Some tools Automake needs.
@@ -4007,7 +4007,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by newlib $as_me 2.0.0, which was
+This file was extended by newlib $as_me 2.4.0, which was
generated by GNU Autoconf 2.68. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -4064,7 +4064,7 @@ _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
-newlib config.status 2.0.0
+newlib config.status 2.4.0
configured by $0, generated by GNU Autoconf 2.68,
with options \\"\$ac_cs_config\\"
diff --git a/newlib/libc/machine/aarch64/machine/_types.h b/newlib/libc/machine/aarch64/machine/_types.h
index 7df9f8db1..c846741fc 100644
--- a/newlib/libc/machine/aarch64/machine/_types.h
+++ b/newlib/libc/machine/aarch64/machine/_types.h
@@ -31,7 +31,7 @@
#include <machine/_default_types.h>
-#define __ssize_t_defined
+#define __machine_ssize_t_defined
typedef long signed int _ssize_t;
#endif /* _MACHINE__TYPES_H */
diff --git a/newlib/libc/machine/aarch64/memchr-stub.c b/newlib/libc/machine/aarch64/memchr-stub.c
new file mode 100644
index 000000000..dc550aa9d
--- /dev/null
+++ b/newlib/libc/machine/aarch64/memchr-stub.c
@@ -0,0 +1,31 @@
+/* Copyright (c) 2013, Linaro Limited
+ 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 the Linaro 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
+ HOLDER 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 (__OPTIMIZE_SIZE__) || defined (PREFER_SIZE_OVER_SPEED))
+# include "../../string/memchr.c"
+#else
+/* See memchr.S */
+#endif
diff --git a/newlib/libc/machine/aarch64/memchr.S b/newlib/libc/machine/aarch64/memchr.S
new file mode 100644
index 000000000..53f5d6bc0
--- /dev/null
+++ b/newlib/libc/machine/aarch64/memchr.S
@@ -0,0 +1,176 @@
+/*
+ * memchr - find a character in a memory zone
+ *
+ * Copyright (c) 2014, ARM Limited
+ * 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 the company 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
+ * HOLDER 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 (__OPTIMIZE_SIZE__) || defined (PREFER_SIZE_OVER_SPEED))
+/* See memchr-stub.c */
+#else
+/* Assumptions:
+ *
+ * ARMv8-a, AArch64
+ * Neon Available.
+ */
+
+/* Arguments and results. */
+#define srcin x0
+#define chrin w1
+#define cntin x2
+
+#define result x0
+
+#define src x3
+#define tmp x4
+#define wtmp2 w5
+#define synd x6
+#define soff x9
+#define cntrem x10
+
+#define vrepchr v0
+#define vdata1 v1
+#define vdata2 v2
+#define vhas_chr1 v3
+#define vhas_chr2 v4
+#define vrepmask v5
+#define vend v6
+
+/*
+ * Core algorithm:
+ *
+ * For each 32-byte chunk we calculate a 64-bit syndrome value, with two bits
+ * per byte. For each tuple, bit 0 is set if the relevant byte matched the
+ * requested character and bit 1 is not used (faster than using a 32bit
+ * syndrome). Since the bits in the syndrome reflect exactly the order in which
+ * things occur in the original string, counting trailing zeros allows to
+ * identify exactly which byte has matched.
+ */
+
+ .macro def_fn f p2align=0
+ .text
+ .p2align \p2align
+ .global \f
+ .type \f, %function
+\f:
+ .endm
+
+def_fn memchr
+ /* Do not dereference srcin if no bytes to compare. */
+ cbz cntin, .Lzero_length
+ /*
+ * Magic constant 0x40100401 allows us to identify which lane matches
+ * the requested byte.
+ */
+ mov wtmp2, #0x0401
+ movk wtmp2, #0x4010, lsl #16
+ dup vrepchr.16b, chrin
+ /* Work with aligned 32-byte chunks */
+ bic src, srcin, #31
+ dup vrepmask.4s, wtmp2
+ ands soff, srcin, #31
+ and cntrem, cntin, #31
+ b.eq .Lloop
+
+ /*
+ * Input string is not 32-byte aligned. We calculate the syndrome
+ * value for the aligned 32 bytes block containing the first bytes
+ * and mask the irrelevant part.
+ */
+
+ ld1 {vdata1.16b, vdata2.16b}, [src], #32
+ sub tmp, soff, #32
+ adds cntin, cntin, tmp
+ cmeq vhas_chr1.16b, vdata1.16b, vrepchr.16b
+ cmeq vhas_chr2.16b, vdata2.16b, vrepchr.16b
+ and vhas_chr1.16b, vhas_chr1.16b, vrepmask.16b
+ and vhas_chr2.16b, vhas_chr2.16b, vrepmask.16b
+ addp vend.16b, vhas_chr1.16b, vhas_chr2.16b /* 256->128 */
+ addp vend.16b, vend.16b, vend.16b /* 128->64 */
+ mov synd, vend.2d[0]
+ /* Clear the soff*2 lower bits */
+ lsl tmp, soff, #1
+ lsr synd, synd, tmp
+ lsl synd, synd, tmp
+ /* The first block can also be the last */
+ b.ls .Lmasklast
+ /* Have we found something already? */
+ cbnz synd, .Ltail
+
+.Lloop:
+ ld1 {vdata1.16b, vdata2.16b}, [src], #32
+ subs cntin, cntin, #32
+ cmeq vhas_chr1.16b, vdata1.16b, vrepchr.16b
+ cmeq vhas_chr2.16b, vdata2.16b, vrepchr.16b
+ /* If we're out of data we finish regardless of the result */
+ b.ls .Lend
+ /* Use a fast check for the termination condition */
+ orr vend.16b, vhas_chr1.16b, vhas_chr2.16b
+ addp vend.2d, vend.2d, vend.2d
+ mov synd, vend.2d[0]
+ /* We're not out of data, loop if we haven't found the character */
+ cbz synd, .Lloop
+
+.Lend:
+ /* Termination condition found, let's calculate the syndrome value */
+ and vhas_chr1.16b, vhas_chr1.16b, vrepmask.16b
+ and vhas_chr2.16b, vhas_chr2.16b, vrepmask.16b
+ addp vend.16b, vhas_chr1.16b, vhas_chr2.16b /* 256->128 */
+ addp vend.16b, vend.16b, vend.16b /* 128->64 */
+ mov synd, vend.2d[0]
+ /* Only do the clear for the last possible block */
+ b.hi .Ltail
+
+.Lmasklast:
+ /* Clear the (32 - ((cntrem + soff) % 32)) * 2 upper bits */
+ add tmp, cntrem, soff
+ and tmp, tmp, #31
+ sub tmp, tmp, #32
+ neg tmp, tmp, lsl #1
+ lsl synd, synd, tmp
+ lsr synd, synd, tmp
+
+.Ltail:
+ /* Count the trailing zeros using bit reversing */
+ rbit synd, synd
+ /* Compensate the last post-increment */
+ sub src, src, #32
+ /* Check that we have found a character */
+ cmp synd, #0
+ /* And count the leading zeros */
+ clz synd, synd
+ /* Compute the potential result */
+ add result, src, synd, lsr #1
+ /* Select result or NULL */
+ csel result, xzr, result, eq
+ ret
+
+.Lzero_length:
+ mov result, #0
+ ret
+
+ .size memchr, . - memchr
+#endif
diff --git a/newlib/libc/machine/aarch64/memcpy.S b/newlib/libc/machine/aarch64/memcpy.S
index ef5c3a999..463bad0a1 100644
--- a/newlib/libc/machine/aarch64/memcpy.S
+++ b/newlib/libc/machine/aarch64/memcpy.S
@@ -24,10 +24,37 @@
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */
+/*
+ * Copyright (c) 2015 ARM Ltd
+ * 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. The name of the company may not be used to endorse or promote
+ * products derived from this software without specific prior written
+ * permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ARM LTD ``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 ARM LTD 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.
+ */
+
/* Assumptions:
*
- * ARMv8-a, AArch64
- * Unaligned accesses
+ * ARMv8-a, AArch64, unaligned accesses.
*
*/
@@ -38,22 +65,27 @@
#define dstin x0
#define src x1
#define count x2
-#define tmp1 x3
-#define tmp1w w3
-#define tmp2 x4
-#define tmp2w w4
-#define tmp3 x5
-#define tmp3w w5
-#define dst x6
-
-#define A_l x7
-#define A_h x8
-#define B_l x9
-#define B_h x10
-#define C_l x11
-#define C_h x12
-#define D_l x13
-#define D_h x14
+#define dst x3
+#define srcend x4
+#define dstend x5
+#define A_l x6
+#define A_lw w6
+#define A_h x7
+#define A_hw w7
+#define B_l x8
+#define B_lw w8
+#define B_h x9
+#define C_l x10
+#define C_h x11
+#define D_l x12
+#define D_h x13
+#define E_l src
+#define E_h count
+#define F_l srcend
+#define F_h dst
+#define tmp1 x9
+
+#define L(l) .L ## l
.macro def_fn f p2align=0
.text
@@ -63,133 +95,136 @@
\f:
.endm
+/* Copies are split into 3 main cases: small copies of up to 16 bytes,
+ medium copies of 17..96 bytes which are fully unrolled. Large copies
+ of more than 96 bytes align the destination and use an unrolled loop
+ processing 64 bytes per iteration.
+ Small and medium copies read all data before writing, allowing any
+ kind of overlap, and memmove tailcalls memcpy for these cases as
+ well as non-overlapping copies.
+*/
+
def_fn memcpy p2align=6
+ prfm PLDL1KEEP, [src]
+ add srcend, src, count
+ add dstend, dstin, count
+ cmp count, 16
+ b.ls L(copy16)
+ cmp count, 96
+ b.hi L(copy_long)
- mov dst, dstin
- cmp count, #64
- b.ge .Lcpy_not_short
- cmp count, #15
- b.le .Ltail15tiny
-
- /* Deal with small copies quickly by dropping straight into the
- * exit block. */
-.Ltail63:
- /* Copy up to 48 bytes of data. At this point we only need the
- * bottom 6 bits of count to be accurate. */
- ands tmp1, count, #0x30
- b.eq .Ltail15
- add dst, dst, tmp1
- add src, src, tmp1
- cmp tmp1w, #0x20
- b.eq 1f
- b.lt 2f
- ldp A_l, A_h, [src, #-48]
- stp A_l, A_h, [dst, #-48]
-1:
- ldp A_l, A_h, [src, #-32]
- stp A_l, A_h, [dst, #-32]
-2:
- ldp A_l, A_h, [src, #-16]
- stp A_l, A_h, [dst, #-16]
-
-.Ltail15:
- ands count, count, #15
- beq 1f
- add src, src, count
- ldp A_l, A_h, [src, #-16]
- add dst, dst, count
- stp A_l, A_h, [dst, #-16]
+ /* Medium copies: 17..96 bytes. */
+ sub tmp1, count, 1
+ ldp A_l, A_h, [src]
+ tbnz tmp1, 6, L(copy96)
+ ldp D_l, D_h, [srcend, -16]
+ tbz tmp1, 5, 1f
+ ldp B_l, B_h, [src, 16]
+ ldp C_l, C_h, [srcend, -32]
+ stp B_l, B_h, [dstin, 16]
+ stp C_l, C_h, [dstend, -32]
1:
+ stp A_l, A_h, [dstin]
+ stp D_l, D_h, [dstend, -16]
ret
-.Ltail15tiny:
- /* Copy up to 15 bytes of data. Does not assume additional data
- being copied. */
- tbz count, #3, 1f
- ldr tmp1, [src], #8
- str tmp1, [dst], #8
-1:
- tbz count, #2, 1f
- ldr tmp1w, [src], #4
- str tmp1w, [dst], #4
-1:
- tbz count, #1, 1f
- ldrh tmp1w, [src], #2
- strh tmp1w, [dst], #2
-1:
- tbz count, #0, 1f
- ldrb tmp1w, [src]
- strb tmp1w, [dst]
+ .p2align 4
+ /* Small copies: 0..16 bytes. */
+L(copy16):
+ cmp count, 8
+ b.lo 1f
+ ldr A_l, [src]
+ ldr A_h, [srcend, -8]
+ str A_l, [dstin]
+ str A_h, [dstend, -8]
+ ret
+ .p2align 4
1:
+ tbz count, 2, 1f
+ ldr A_lw, [src]
+ ldr A_hw, [srcend, -4]
+ str A_lw, [dstin]
+ str A_hw, [dstend, -4]
ret
-.Lcpy_not_short:
- /* We don't much care about the alignment of DST, but we want SRC
- * to be 128-bit (16 byte) aligned so that we don't cross cache line
- * boundaries on both loads and stores. */
- neg tmp2, src
- ands tmp2, tmp2, #15 /* Bytes to reach alignment. */
- b.eq 2f
- sub count, count, tmp2
- /* Copy more data than needed; it's faster than jumping
- * around copying sub-Quadword quantities. We know that
- * it can't overrun. */
- ldp A_l, A_h, [src]
- add src, src, tmp2
- stp A_l, A_h, [dst]
- add dst, dst, tmp2
- /* There may be less than 63 bytes to go now. */
- cmp count, #63
- b.le .Ltail63
-2:
- subs count, count, #128
- b.ge .Lcpy_body_large
- /* Less than 128 bytes to copy, so handle 64 here and then jump
- * to the tail. */
- ldp A_l, A_h, [src]
- ldp B_l, B_h, [src, #16]
- ldp C_l, C_h, [src, #32]
- ldp D_l, D_h, [src, #48]
- stp A_l, A_h, [dst]
- stp B_l, B_h, [dst, #16]
- stp C_l, C_h, [dst, #32]
- stp D_l, D_h, [dst, #48]
- tst count, #0x3f
- add src, src, #64
- add dst, dst, #64
- b.ne .Ltail63
+ /* Copy 0..3 bytes. Use a branchless sequence that copies the same
+ byte 3 times if count==1, or the 2nd byte twice if count==2. */
+1:
+ cbz count, 2f
+ lsr tmp1, count, 1
+ ldrb A_lw, [src]
+ ldrb A_hw, [srcend, -1]
+ ldrb B_lw, [src, tmp1]
+ strb A_lw, [dstin]
+ strb B_lw, [dstin, tmp1]
+ strb A_hw, [dstend, -1]
+2: ret
+
+ .p2align 4
+ /* Copy 64..96 bytes. Copy 64 bytes from the start and
+ 32 bytes from the end. */
+L(copy96):
+ ldp B_l, B_h, [src, 16]
+ ldp C_l, C_h, [src, 32]
+ ldp D_l, D_h, [src, 48]
+ ldp E_l, E_h, [srcend, -32]
+ ldp F_l, F_h, [srcend, -16]
+ stp A_l, A_h, [dstin]
+ stp B_l, B_h, [dstin, 16]
+ stp C_l, C_h, [dstin, 32]
+ stp D_l, D_h, [dstin, 48]
+ stp E_l, E_h, [dstend, -32]
+ stp F_l, F_h, [dstend, -16]
ret
- /* Critical loop. Start at a new cache line boundary. Assuming
- * 64 bytes per line this ensures the entire loop is in one line. */
- .p2align 6
-.Lcpy_body_large:
- /* There are at least 128 bytes to copy. */
- ldp A_l, A_h, [src, #0]
- sub dst, dst, #16 /* Pre-bias. */
- ldp B_l, B_h, [src, #16]
- ldp C_l, C_h, [src, #32]
- ldp D_l, D_h, [src, #48]! /* src += 64 - Pre-bias. */
+ /* Align DST to 16 byte alignment so that we don't cross cache line
+ boundaries on both loads and stores. There are at least 96 bytes
+ to copy, so copy 16 bytes unaligned and then align. The loop
+ copies 64 bytes per iteration and prefetches one iteration ahead. */
+
+ .p2align 4
+L(copy_long):
+ and tmp1, dstin, 15
+ bic dst, dstin, 15
+ ldp D_l, D_h, [src]
+ sub src, src, tmp1
+ add count, count, tmp1 /* Count is now 16 too large. */
+ ldp A_l, A_h, [src, 16]
+ stp D_l, D_h, [dstin]
+ ldp B_l, B_h, [src, 32]
+ ldp C_l, C_h, [src, 48]
+ ldp D_l, D_h, [src, 64]!
+ subs count, count, 128 + 16 /* Test and readjust count. */
+ b.ls 2f
1:
- stp A_l, A_h, [dst, #16]
- ldp A_l, A_h, [src, #16]
- stp B_l, B_h, [dst, #32]
- ldp B_l, B_h, [src, #32]
- stp C_l, C_h, [dst, #48]
- ldp C_l, C_h, [src, #48]
- stp D_l, D_h, [dst, #64]!
- ldp D_l, D_h, [src, #64]!
- subs count, count, #64
- b.ge 1b
- stp A_l, A_h, [dst, #16]
- stp B_l, B_h, [dst, #32]
- stp C_l, C_h, [dst, #48]
- stp D_l, D_h, [dst, #64]
- add src, src, #16
- add dst, dst, #64 + 16
- tst count, #0x3f
- b.ne .Ltail63
+ stp A_l, A_h, [dst, 16]
+ ldp A_l, A_h, [src, 16]
+ stp B_l, B_h, [dst, 32]
+ ldp B_l, B_h, [src, 32]
+ stp C_l, C_h, [dst, 48]
+ ldp C_l, C_h, [src, 48]
+ stp D_l, D_h, [dst, 64]!
+ ldp D_l, D_h, [src, 64]!
+ subs count, count, 64
+ b.hi 1b
+
+ /* Write the last full set of 64 bytes. The remainder is at most 64
+ bytes, so it is safe to always copy 64 bytes from the end even if
+ there is just 1 byte left. */
+2:
+ ldp E_l, E_h, [srcend, -64]
+ stp A_l, A_h, [dst, 16]
+ ldp A_l, A_h, [srcend, -48]
+ stp B_l, B_h, [dst, 32]
+ ldp B_l, B_h, [srcend, -32]
+ stp C_l, C_h, [dst, 48]
+ ldp C_l, C_h, [srcend, -16]
+ stp D_l, D_h, [dst, 64]
+ stp E_l, E_h, [dstend, -64]
+ stp A_l, A_h, [dstend, -48]
+ stp B_l, B_h, [dstend, -32]
+ stp C_l, C_h, [dstend, -16]
ret
- .size memcpy, .-memcpy
+ .size memcpy, . - memcpy
#endif
diff --git a/newlib/libc/machine/aarch64/memmove.S b/newlib/libc/machine/aarch64/memmove.S
index 8cb91f099..597a8c8e9 100644
--- a/newlib/libc/machine/aarch64/memmove.S
+++ b/newlib/libc/machine/aarch64/memmove.S
@@ -24,16 +24,43 @@
(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 (__OPTIMIZE_SIZE__) || defined (PREFER_SIZE_OVER_SPEED))
-/* See memmove-stub.c */
-#else
+/*
+ * Copyright (c) 2015 ARM Ltd
+ * 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. The name of the company may not be used to endorse or promote
+ * products derived from this software without specific prior written
+ * permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ARM LTD ``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 ARM LTD 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.
+ */
/* Assumptions:
*
- * ARMv8-a, AArch64
- * Unaligned accesses
+ * ARMv8-a, AArch64, unaligned accesses
*/
+#if (defined (__OPTIMIZE_SIZE__) || defined (PREFER_SIZE_OVER_SPEED))
+/* See memmove-stub.c */
+#else
+
.macro def_fn f p2align=0
.text
.p2align \p2align
@@ -46,284 +73,83 @@
#define dstin x0
#define src x1
#define count x2
-#define tmp1 x3
-#define tmp1w w3
-#define tmp2 x4
-#define tmp2w w4
-#define tmp3 x5
-#define tmp3w w5
-#define dst x6
-
-#define A_l x7
-#define A_h x8
-#define B_l x9
-#define B_h x10
-#define C_l x11
-#define C_h x12
-#define D_l x13
-#define D_h x14
+#define srcend x3
+#define dstend x4
+#define tmp1 x5
+#define A_l x6
+#define A_h x7
+#define B_l x8
+#define B_h x9
+#define C_l x10
+#define C_h x11
+#define D_l x12
+#define D_h x13
+#define E_l count
+#define E_h tmp1
+
+/* All memmoves up to 96 bytes are done by memcpy as it supports overlaps.
+ Larger backwards copies are also handled by memcpy. The only remaining
+ case is forward large copies. The destination is aligned, and an
+ unrolled loop processes 64 bytes per iteration.
+*/
def_fn memmove, 6
- cmp dstin, src
- b.lo .Ldownwards
- add tmp1, src, count
- cmp dstin, tmp1
- b.hs memcpy /* No overlap. */
-
- /* Upwards move with potential overlap.
- * Need to move from the tail backwards. SRC and DST point one
- * byte beyond the remaining data to move. */
- add dst, dstin, count
- add src, src, count
- cmp count, #64
- b.ge .Lmov_not_short_up
-
- /* Deal with small moves quickly by dropping straight into the
- * exit block. */
-.Ltail63up:
- /* Move up to 48 bytes of data. At this point we only need the
- * bottom 6 bits of count to be accurate. */
- ands tmp1, count, #0x30
- b.eq .Ltail15up
- sub dst, dst, tmp1
- sub src, src, tmp1
- cmp tmp1w, #0x20
- b.eq 1f
- b.lt 2f
- ldp A_l, A_h, [src, #32]
- stp A_l, A_h, [dst, #32]
-1:
- ldp A_l, A_h, [src, #16]
- stp A_l, A_h, [dst, #16]
-2:
- ldp A_l, A_h, [src]
- stp A_l, A_h, [dst]
-.Ltail15up:
- /* Move up to 15 bytes of data. Does not assume additional data
- * being moved. */
- tbz count, #3, 1f
- ldr tmp1, [src, #-8]!
- str tmp1, [dst, #-8]!
-1:
- tbz count, #2, 1f
- ldr tmp1w, [src, #-4]!
- str tmp1w, [dst, #-4]!
-1:
- tbz count, #1, 1f
- ldrh tmp1w, [src, #-2]!
- strh tmp1w, [dst, #-2]!
-1:
- tbz count, #0, 1f
- ldrb tmp1w, [src, #-1]
- strb tmp1w, [dst, #-1]
-1:
- ret
-
-.Lmov_not_short_up:
- /* We don't much care about the alignment of DST, but we want SRC
- * to be 128-bit (16 byte) aligned so that we don't cross cache line
- * boundaries on both loads and stores. */
- ands tmp2, src, #15 /* Bytes to reach alignment. */
- b.eq 2f
- sub count, count, tmp2
- /* Move enough data to reach alignment; unlike memcpy, we have to
- * be aware of the overlap, which means we can't move data twice. */
- tbz tmp2, #3, 1f
- ldr tmp1, [src, #-8]!
- str tmp1, [dst, #-8]!
-1:
- tbz tmp2, #2, 1f
- ldr tmp1w, [src, #-4]!
- str tmp1w, [dst, #-4]!
-1:
- tbz tmp2, #1, 1f
- ldrh tmp1w, [src, #-2]!
- strh tmp1w, [dst, #-2]!
-1:
- tbz tmp2, #0, 1f
- ldrb tmp1w, [src, #-1]!
- strb tmp1w, [dst, #-1]!
-1:
-
- /* There may be less than 63 bytes to go now. */
- cmp count, #63
- b.le .Ltail63up
-2:
- subs count, count, #128
- b.ge .Lmov_body_large_up
- /* Less than 128 bytes to move, so handle 64 here and then jump
- * to the tail. */
- ldp A_l, A_h, [src, #-64]!
- ldp B_l, B_h, [src, #16]
- ldp C_l, C_h, [src, #32]
- ldp D_l, D_h, [src, #48]
- stp A_l, A_h, [dst, #-64]!
- stp B_l, B_h, [dst, #16]
- stp C_l, C_h, [dst, #32]
- stp D_l, D_h, [dst, #48]
- tst count, #0x3f
- b.ne .Ltail63up
- ret
-
- /* Critical loop. Start at a new Icache line boundary. Assuming
- * 64 bytes per line this ensures the entire loop is in one line. */
- .p2align 6
-.Lmov_body_large_up:
- /* There are at least 128 bytes to move. */
- ldp A_l, A_h, [src, #-16]
- ldp B_l, B_h, [src, #-32]
- ldp C_l, C_h, [src, #-48]
- ldp D_l, D_h, [src, #-64]!
-1:
- stp A_l, A_h, [dst, #-16]
- ldp A_l, A_h, [src, #-16]
- stp B_l, B_h, [dst, #-32]
- ldp B_l, B_h, [src, #-32]
- stp C_l, C_h, [dst, #-48]
- ldp C_l, C_h, [src, #-48]
- stp D_l, D_h, [dst, #-64]!
- ldp D_l, D_h, [src, #-64]!
- subs count, count, #64
- b.ge 1b
- stp A_l, A_h, [dst, #-16]
- stp B_l, B_h, [dst, #-32]
- stp C_l, C_h, [dst, #-48]
- stp D_l, D_h, [dst, #-64]!
- tst count, #0x3f
- b.ne .Ltail63up
- ret
-
-
-.Ldownwards:
- /* For a downwards move we can safely use memcpy provided that
- * DST is more than 16 bytes away from SRC. */
- sub tmp1, src, #16
- cmp dstin, tmp1
- b.ls memcpy /* May overlap, but not critically. */
-
- mov dst, dstin /* Preserve DSTIN for return value. */
- cmp count, #64
- b.ge .Lmov_not_short_down
-
- /* Deal with small moves quickly by dropping straight into the
- * exit block. */
-.Ltail63down:
- /* Move up to 48 bytes of data. At this point we only need the
- * bottom 6 bits of count to be accurate. */
- ands tmp1, count, #0x30
- b.eq .Ltail15down
- add dst, dst, tmp1
- add src, src, tmp1
- cmp tmp1w, #0x20
- b.eq 1f
- b.lt 2f
- ldp A_l, A_h, [src, #-48]
- stp A_l, A_h, [dst, #-48]
-1:
- ldp A_l, A_h, [src, #-32]
- stp A_l, A_h, [dst, #-32]
+ sub tmp1, dstin, src
+ cmp count, 96
+ ccmp tmp1, count, 2, hi
+ b.hs memcpy
+
+ cbz tmp1, 3f
+ add dstend, dstin, count
+ add srcend, src, count
+
+ /* Align dstend to 16 byte alignment so that we don't cross cache line
+ boundaries on both loads and stores. There are at least 96 bytes
+ to copy, so copy 16 bytes unaligned and then align. The loop
+ copies 64 bytes per iteration and prefetches one iteration ahead. */
+
+ and tmp1, dstend, 15
+ ldp D_l, D_h, [srcend, -16]
+ sub srcend, srcend, tmp1
+ sub count, count, tmp1
+ ldp A_l, A_h, [srcend, -16]
+ stp D_l, D_h, [dstend, -16]
+ ldp B_l, B_h, [srcend, -32]
+ ldp C_l, C_h, [srcend, -48]
+ ldp D_l, D_h, [srcend, -64]!
+ sub dstend, dstend, tmp1
+ subs count, count, 128
+ b.ls 2f
+ nop
+1:
+ stp A_l, A_h, [dstend, -16]
+ ldp A_l, A_h, [srcend, -16]
+ stp B_l, B_h, [dstend, -32]
+ ldp B_l, B_h, [srcend, -32]
+ stp C_l, C_h, [dstend, -48]
+ ldp C_l, C_h, [srcend, -48]
+ stp D_l, D_h, [dstend, -64]!
+ ldp D_l, D_h, [srcend, -64]!
+ subs count, count, 64
+ b.hi 1b
+
+ /* Write the last full set of 64 bytes. The remainder is at most 64
+ bytes, so it is safe to always copy 64 bytes from the start even if
+ there is just 1 byte left. */
2:
- ldp A_l, A_h, [src, #-16]
- stp A_l, A_h, [dst, #-16]
-.Ltail15down:
- /* Move up to 15 bytes of data. Does not assume additional data
- being moved. */
- tbz count, #3, 1f
- ldr tmp1, [src], #8
- str tmp1, [dst], #8
-1:
- tbz count, #2, 1f
- ldr tmp1w, [src], #4
- str tmp1w, [dst], #4
-1:
- tbz count, #1, 1f
- ldrh tmp1w, [src], #2
- strh tmp1w, [dst], #2
-1:
- tbz count, #0, 1f
- ldrb tmp1w, [src]
- strb tmp1w, [dst]
-1:
- ret
-
-.Lmov_not_short_down:
- /* We don't much care about the alignment of DST, but we want SRC
- * to be 128-bit (16 byte) aligned so that we don't cross cache line
- * boundaries on both loads and stores. */
- neg tmp2, src
- ands tmp2, tmp2, #15 /* Bytes to reach alignment. */
- b.eq 2f
- sub count, count, tmp2
- /* Move enough data to reach alignment; unlike memcpy, we have to
- * be aware of the overlap, which means we can't move data twice. */
- tbz tmp2, #3, 1f
- ldr tmp1, [src], #8
- str tmp1, [dst], #8
-1:
- tbz tmp2, #2, 1f
- ldr tmp1w, [src], #4
- str tmp1w, [dst], #4
-1:
- tbz tmp2, #1, 1f
- ldrh tmp1w, [src], #2
- strh tmp1w, [dst], #2
-1:
- tbz tmp2, #0, 1f
- ldrb tmp1w, [src], #1
- strb tmp1w, [dst], #1
-1:
-
- /* There may be less than 63 bytes to go now. */
- cmp count, #63
- b.le .Ltail63down
-2:
- subs count, count, #128
- b.ge .Lmov_body_large_down
- /* Less than 128 bytes to move, so handle 64 here and then jump
- * to the tail. */
- ldp A_l, A_h, [src]
- ldp B_l, B_h, [src, #16]
- ldp C_l, C_h, [src, #32]
- ldp D_l, D_h, [src, #48]
- stp A_l, A_h, [dst]
- stp B_l, B_h, [dst, #16]
- stp C_l, C_h, [dst, #32]
- stp D_l, D_h, [dst, #48]
- tst count, #0x3f
- add src, src, #64
- add dst, dst, #64
- b.ne .Ltail63down
- ret
-
- /* Critical loop. Start at a new cache line boundary. Assuming
- * 64 bytes per line this ensures the entire loop is in one line. */
- .p2align 6
-.Lmov_body_large_down:
- /* There are at least 128 bytes to move. */
- ldp A_l, A_h, [src, #0]
- sub dst, dst, #16 /* Pre-bias. */
- ldp B_l, B_h, [src, #16]
- ldp C_l, C_h, [src, #32]
- ldp D_l, D_h, [src, #48]! /* src += 64 - Pre-bias. */
-1:
- stp A_l, A_h, [dst, #16]
- ldp A_l, A_h, [src, #16]
- stp B_l, B_h, [dst, #32]
- ldp B_l, B_h, [src, #32]
- stp C_l, C_h, [dst, #48]
- ldp C_l, C_h, [src, #48]
- stp D_l, D_h, [dst, #64]!
- ldp D_l, D_h, [src, #64]!
- subs count, count, #64
- b.ge 1b
- stp A_l, A_h, [dst, #16]
- stp B_l, B_h, [dst, #32]
- stp C_l, C_h, [dst, #48]
- stp D_l, D_h, [dst, #64]
- add src, src, #16
- add dst, dst, #64 + 16
- tst count, #0x3f
- b.ne .Ltail63down
- ret
- .size memmove, . - memmove
+ ldp E_l, E_h, [src, 48]
+ stp A_l, A_h, [dstend, -16]
+ ldp A_l, A_h, [src, 32]
+ stp B_l, B_h, [dstend, -32]
+ ldp B_l, B_h, [src, 16]
+ stp C_l, C_h, [dstend, -48]
+ ldp C_l, C_h, [src]
+ stp D_l, D_h, [dstend, -64]
+ stp E_l, E_h, [dstin, 48]
+ stp A_l, A_h, [dstin, 32]
+ stp B_l, B_h, [dstin, 16]
+ stp C_l, C_h, [dstin]
+3: ret
+
+ .size memmove, . - memmove
#endif
diff --git a/newlib/libc/machine/aarch64/memset.S b/newlib/libc/machine/aarch64/memset.S
index 20372df94..799e7b787 100644
--- a/newlib/libc/machine/aarch64/memset.S
+++ b/newlib/libc/machine/aarch64/memset.S
@@ -24,10 +24,37 @@
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */
+/*
+ * Copyright (c) 2015 ARM Ltd
+ * 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. The name of the company may not be used to endorse or promote
+ * products derived from this software without specific prior written
+ * permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ARM LTD ``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 ARM LTD 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.
+ */
+
/* Assumptions:
*
- * ARMv8-a, AArch64
- * Unaligned accesses
+ * ARMv8-a, AArch64, unaligned accesses
*
*/
@@ -35,32 +62,20 @@
/* See memset-stub.c */
#else
-/* By default we assume that the DC instruction can be used to zero
- data blocks more efficiently. In some circumstances this might be
- unsafe, for example in an asymmetric multiprocessor environment with
- different DC clear lengths (neither the upper nor lower lengths are
- safe to use). The feature can be disabled by defining DONT_USE_DC.
-
- If code may be run in a virtualized environment, then define
- MAYBE_VIRT. This will cause the code to cache the system register
- values rather than re-reading them each call. */
-
-#define dstin x0
-#define val w1
-#define count x2
-#define tmp1 x3
-#define tmp1w w3
-#define tmp2 x4
-#define tmp2w w4
-#define zva_len_x x5
-#define zva_len w5
-#define zva_bits_x x6
-
-#define A_l x7
-#define A_lw w7
-#define dst x8
-#define tmp3w w9
-
+#define dstin x0
+#define val x1
+#define valw w1
+#define count x2
+#define dst x3
+#define dstend x4
+#define tmp1 x5
+#define tmp1w w5
+#define tmp2 x6
+#define tmp2w w6
+#define zva_len x7
+#define zva_lenw w7
+
+#define L(l) .L ## l
.macro def_fn f p2align=0
.text
@@ -72,175 +87,153 @@
def_fn memset p2align=6
- mov dst, dstin /* Preserve return value. */
- ands A_lw, val, #255
-#ifndef DONT_USE_DC
- b.eq .Lzero_mem
-#endif
- orr A_lw, A_lw, A_lw, lsl #8
- orr A_lw, A_lw, A_lw, lsl #16
- orr A_l, A_l, A_l, lsl #32
-.Ltail_maybe_long:
- cmp count, #64
- b.ge .Lnot_short
-.Ltail_maybe_tiny:
- cmp count, #15
- b.le .Ltail15tiny
-.Ltail63:
- ands tmp1, count, #0x30
- b.eq .Ltail15
- add dst, dst, tmp1
- cmp tmp1w, #0x20
- b.eq 1f
- b.lt 2f
- stp A_l, A_l, [dst, #-48]
-1:
- stp A_l, A_l, [dst, #-32]
-2:
- stp A_l, A_l, [dst, #-16]
-
-.Ltail15:
- and count, count, #15
- add dst, dst, count
- stp A_l, A_l, [dst, #-16] /* Repeat some/all of last store. */
- ret
+ dup v0.16B, valw
+ add dstend, dstin, count
+
+ cmp count, 96
+ b.hi L(set_long)
+ cmp count, 16
+ b.hs L(set_medium)
+ mov val, v0.D[0]
-.Ltail15tiny:
- /* Set up to 15 bytes. Does not assume earlier memory
- being set. */
- tbz count, #3, 1f
- str A_l, [dst], #8
-1:
- tbz count, #2, 1f
- str A_lw, [dst], #4
-1:
- tbz count, #1, 1f
- strh A_lw, [dst], #2
-1:
- tbz count, #0, 1f
- strb A_lw, [dst]
-1:
+ /* Set 0..15 bytes. */
+ tbz count, 3, 1f
+ str val, [dstin]
+ str val, [dstend, -8]
+ ret
+ nop
+1: tbz count, 2, 2f
+ str valw, [dstin]
+ str valw, [dstend, -4]
+ ret
+2: cbz count, 3f
+ strb valw, [dstin]
+ tbz count, 1, 3f
+ strh valw, [dstend, -2]
+3: ret
+
+ /* Set 17..96 bytes. */
+L(set_medium):
+ str q0, [dstin]
+ tbnz count, 6, L(set96)
+ str q0, [dstend, -16]
+ tbz count, 5, 1f
+ str q0, [dstin, 16]
+ str q0, [dstend, -32]
+1: ret
+
+ .p2align 4
+ /* Set 64..96 bytes. Write 64 bytes from the start and
+ 32 bytes from the end. */
+L(set96):
+ str q0, [dstin, 16]
+ stp q0, q0, [dstin, 32]
+ stp q0, q0, [dstend, -32]
ret
- /* Critical loop. Start at a new cache line boundary. Assuming
- * 64 bytes per line, this ensures the entire loop is in one line. */
- .p2align 6
-.Lnot_short:
- neg tmp2, dst
- ands tmp2, tmp2, #15
- b.eq 2f
- /* Bring DST to 128-bit (16-byte) alignment. We know that there's
- * more than that to set, so we simply store 16 bytes and advance by
- * the amount required to reach alignment. */
- sub count, count, tmp2
- stp A_l, A_l, [dst]
- add dst, dst, tmp2
- /* There may be less than 63 bytes to go now. */
- cmp count, #63
- b.le .Ltail63
-2:
- sub dst, dst, #16 /* Pre-bias. */
- sub count, count, #64
-1:
- stp A_l, A_l, [dst, #16]
- stp A_l, A_l, [dst, #32]
- stp A_l, A_l, [dst, #48]
- stp A_l, A_l, [dst, #64]!
- subs count, count, #64
- b.ge 1b
- tst count, #0x3f
- add dst, dst, #16
- b.ne .Ltail63
+ .p2align 3
+ nop
+L(set_long):
+ and valw, valw, 255
+ bic dst, dstin, 15
+ str q0, [dstin]
+ cmp count, 256
+ ccmp valw, 0, 0, cs
+ b.eq L(try_zva)
+L(no_zva):
+ sub count, dstend, dst /* Count is 16 too large. */
+ add dst, dst, 16
+ sub count, count, 64 + 16 /* Adjust count and bias for loop. */
+1: stp q0, q0, [dst], 64
+ stp q0, q0, [dst, -32]
+L(tail64):
+ subs count, count, 64
+ b.hi 1b
+2: stp q0, q0, [dstend, -64]
+ stp q0, q0, [dstend, -32]
ret
-#ifndef DONT_USE_DC
- /* For zeroing memory, check to see if we can use the ZVA feature to
- * zero entire 'cache' lines. */
-.Lzero_mem:
- mov A_l, #0
- cmp count, #63
- b.le .Ltail_maybe_tiny
- neg tmp2, dst
- ands tmp2, tmp2, #15
- b.eq 1f
- sub count, count, tmp2
- stp A_l, A_l, [dst]
- add dst, dst, tmp2
- cmp count, #63
- b.le .Ltail63
-1:
- /* For zeroing small amounts of memory, it's not worth setting up
- * the line-clear code. */
- cmp count, #128
- b.lt .Lnot_short
-#ifdef MAYBE_VIRT
- /* For efficiency when virtualized, we cache the ZVA capability. */
- adrp tmp2, .Lcache_clear
- ldr zva_len, [tmp2, #:lo12:.Lcache_clear]
- tbnz zva_len, #31, .Lnot_short
- cbnz zva_len, .Lzero_by_line
- mrs tmp1, dczid_el0
- tbz tmp1, #4, 1f
- /* ZVA not available. Remember this for next time. */
- mov zva_len, #~0
- str zva_len, [tmp2, #:lo12:.Lcache_clear]
- b .Lnot_short
-1:
- mov tmp3w, #4
- and zva_len, tmp1w, #15 /* Safety: other bits reserved. */
- lsl zva_len, tmp3w, zva_len
- str zva_len, [tmp2, #:lo12:.Lcache_clear]
-#else
+ .p2align 3
+L(try_zva):
mrs tmp1, dczid_el0
- tbnz tmp1, #4, .Lnot_short
- mov tmp3w, #4
- and zva_len, tmp1w, #15 /* Safety: other bits reserved. */
- lsl zva_len, tmp3w, zva_len
-#endif
+ tbnz tmp1w, 4, L(no_zva)
+ and tmp1w, tmp1w, 15
+ cmp tmp1w, 4 /* ZVA size is 64 bytes. */
+ b.ne L(zva_128)
+
+ /* Write the first and last 64 byte aligned block using stp rather
+ than using DC ZVA. This is faster on some cores.
+ */
+L(zva_64):
+ str q0, [dst, 16]
+ stp q0, q0, [dst, 32]
+ bic dst, dst, 63
+ stp q0, q0, [dst, 64]
+ stp q0, q0, [dst, 96]
+ sub count, dstend, dst /* Count is now 128 too large. */
+ sub count, count, 128+64+64 /* Adjust count and bias for loop. */
+ add dst, dst, 128
+ nop
+1: dc zva, dst
+ add dst, dst, 64
+ subs count, count, 64
+ b.hi 1b
+ stp q0, q0, [dst, 0]
+ stp q0, q0, [dst, 32]
+ stp q0, q0, [dstend, -64]
+ stp q0, q0, [dstend, -32]
+ ret
-.Lzero_by_line:
- /* Compute how far we need to go to become suitably aligned. We're
- * already at quad-word alignment. */
- cmp count, zva_len_x
- b.lt .Lnot_short /* Not enough to reach alignment. */
- sub zva_bits_x, zva_len_x, #1
- neg tmp2, dst
- ands tmp2, tmp2, zva_bits_x
- b.eq 1f /* Already aligned. */
- /* Not aligned, check that there's enough to copy after alignment. */
- sub tmp1, count, tmp2
- cmp tmp1, #64
- ccmp tmp1, zva_len_x, #8, ge /* NZCV=0b1000 */
- b.lt .Lnot_short
- /* We know that there's at least 64 bytes to zero and that it's safe
- * to overrun by 64 bytes. */
- mov count, tmp1
-2:
- stp A_l, A_l, [dst]
- stp A_l, A_l, [dst, #16]
- stp A_l, A_l, [dst, #32]
- subs tmp2, tmp2, #64
- stp A_l, A_l, [dst, #48]
- add dst, dst, #64
- b.ge 2b
- /* We've overrun a bit, so adjust dst downwards. */
- add dst, dst, tmp2
-1:
- sub count, count, zva_len_x
-3:
- dc zva, dst
- add dst, dst, zva_len_x
- subs count, count, zva_len_x
- b.ge 3b
- ands count, count, zva_bits_x
- b.ne .Ltail_maybe_long
+ .p2align 3
+L(zva_128):
+ cmp tmp1w, 5 /* ZVA size is 128 bytes. */
+ b.ne L(zva_other)
+
+ str q0, [dst, 16]
+ stp q0, q0, [dst, 32]
+ stp q0, q0, [dst, 64]
+ stp q0, q0, [dst, 96]
+ bic dst, dst, 127
+ sub count, dstend, dst /* Count is now 128 too large. */
+ sub count, count, 128+128 /* Adjust count and bias for loop. */
+ add dst, dst, 128
+1: dc zva, dst
+ add dst, dst, 128
+ subs count, count, 128
+ b.hi 1b
+ stp q0, q0, [dstend, -128]
+ stp q0, q0, [dstend, -96]
+ stp q0, q0, [dstend, -64]
+ stp q0, q0, [dstend, -32]
ret
- .size memset, .-memset
-#ifdef MAYBE_VIRT
- .bss
- .p2align 2
-.Lcache_clear:
- .space 4
-#endif
-#endif /* DONT_USE_DC */
+
+L(zva_other):
+ mov tmp2w, 4
+ lsl zva_lenw, tmp2w, tmp1w
+ add tmp1, zva_len, 64 /* Max alignment bytes written. */
+ cmp count, tmp1
+ blo L(no_zva)
+
+ sub tmp2, zva_len, 1
+ add tmp1, dst, zva_len
+ add dst, dst, 16
+ subs count, tmp1, dst /* Actual alignment bytes to write. */
+ bic tmp1, tmp1, tmp2 /* Aligned dc zva start address. */
+ beq 2f
+1: stp q0, q0, [dst], 64
+ stp q0, q0, [dst, -32]
+ subs count, count, 64
+ b.hi 1b
+2: mov dst, tmp1
+ sub count, dstend, tmp1 /* Remaining bytes to write. */
+ subs count, count, zva_len
+ b.lo 4f
+3: dc zva, dst
+ add dst, dst, zva_len
+ subs count, count, zva_len
+ b.hs 3b
+4: add count, count, zva_len
+ b L(tail64)
+
+ .size memset, . - memset
#endif
diff --git a/newlib/libc/machine/aarch64/rawmemchr-stub.c b/newlib/libc/machine/aarch64/rawmemchr-stub.c
new file mode 100644
index 000000000..44494128b
--- /dev/null
+++ b/newlib/libc/machine/aarch64/rawmemchr-stub.c
@@ -0,0 +1,31 @@
+/* Copyright (c) 2015-2016, ARM Limited
+ 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 the company 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
+ HOLDER 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 (__OPTIMIZE_SIZE__) || defined (PREFER_SIZE_OVER_SPEED))
+# include "../../string/rawmemchr.c"
+#else
+/* See rawmemchr.S. */
+#endif
diff --git a/newlib/libc/machine/aarch64/rawmemchr.S b/newlib/libc/machine/aarch64/rawmemchr.S
new file mode 100644
index 000000000..26da81005
--- /dev/null
+++ b/newlib/libc/machine/aarch64/rawmemchr.S
@@ -0,0 +1,68 @@
+/* Copyright (c) 2015-2016, ARM Limited
+ 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 the company 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
+ HOLDER 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. */
+
+/* Assumptions:
+ *
+ * ARMv8-a, AArch64, unaligned accesses
+ *
+ */
+
+#if (defined (__OPTIMIZE_SIZE__) || defined (PREFER_SIZE_OVER_SPEED))
+/* See rawmemchr-stub.c. */
+#else
+
+#define L(l) .L ## l
+
+ .macro def_fn f p2align=0
+ .text
+ .p2align \p2align
+ .global \f
+ .type \f, %function
+\f:
+ .endm
+
+/* Special case rawmemchr (s, 0) as strlen, otherwise tailcall memchr.
+ Call strlen without setting up a full frame - it preserves x14/x15.
+*/
+
+def_fn rawmemchr p2align=5
+ .cfi_startproc
+ cbz w1, L(do_strlen)
+ mov x2, -1
+ b memchr
+
+L(do_strlen):
+ mov x15, x30
+ .cfi_return_column x15
+ mov x14, x0
+ bl strlen
+ add x0, x14, x0
+ ret x15
+ .cfi_endproc
+
+ .size rawmemchr, . - rawmemchr
+#endif
+
diff --git a/newlib/libc/machine/aarch64/stpcpy-stub.c b/newlib/libc/machine/aarch64/stpcpy-stub.c
new file mode 100644
index 000000000..bfaba5cf8
--- /dev/null
+++ b/newlib/libc/machine/aarch64/stpcpy-stub.c
@@ -0,0 +1,31 @@
+/* Copyright (c) 2015, ARM Limited
+ 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 the company 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
+ HOLDER 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 (__OPTIMIZE_SIZE__) || defined (PREFER_SIZE_OVER_SPEED))
+# include "../../string/stpcpy.c"
+#else
+/* See stpcpy.S */
+#endif
diff --git a/newlib/libc/machine/aarch64/stpcpy.S b/newlib/libc/machine/aarch64/stpcpy.S
new file mode 100644
index 000000000..696b45889
--- /dev/null
+++ b/newlib/libc/machine/aarch64/stpcpy.S
@@ -0,0 +1,34 @@
+/*
+ stpcpy - copy a string returning pointer to end.
+
+ Copyright (c) 2015 ARM Ltd.
+ 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 the company 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
+ HOLDER 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. */
+
+/* This is just a wrapper that uses strcpy code with appropriate
+ pre-defines. */
+
+#define BUILD_STPCPY
+#include "strcpy.S"
diff --git a/newlib/libc/machine/aarch64/strchr-stub.c b/newlib/libc/machine/aarch64/strchr-stub.c
new file mode 100644
index 000000000..3f9ec2d20
--- /dev/null
+++ b/newlib/libc/machine/aarch64/strchr-stub.c
@@ -0,0 +1,31 @@
+/* Copyright (c) 2014, ARM Limited
+ 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 the company 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
+ HOLDER 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 (__OPTIMIZE_SIZE__) || defined (PREFER_SIZE_OVER_SPEED))
+# include "../../string/strchr.c"
+#else
+/* See strchr.S */
+#endif
diff --git a/newlib/libc/machine/aarch64/strchr.S b/newlib/libc/machine/aarch64/strchr.S
new file mode 100644
index 000000000..2448dbc7d
--- /dev/null
+++ b/newlib/libc/machine/aarch64/strchr.S
@@ -0,0 +1,164 @@
+/*
+ strchr - find a character in a string
+
+ Copyright (c) 2014, ARM Limited
+ 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 the company 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
+ HOLDER 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 (__OPTIMIZE_SIZE__) || defined (PREFER_SIZE_OVER_SPEED))
+/* See strchr-stub.c */
+#else
+
+/* Assumptions:
+ *
+ * ARMv8-a, AArch64
+ * Neon Available.
+ */
+
+/* Arguments and results. */
+#define srcin x0
+#define chrin w1
+
+#define result x0
+
+#define src x2
+#define tmp1 x3
+#define wtmp2 w4
+#define tmp3 x5
+
+#define vrepchr v0
+#define vdata1 v1
+#define vdata2 v2
+#define vhas_nul1 v3
+#define vhas_nul2 v4
+#define vhas_chr1 v5
+#define vhas_chr2 v6
+#define vrepmask_0 v7
+#define vrepmask_c v16
+#define vend1 v17
+#define vend2 v18
+
+/* Core algorithm.
+
+ For each 32-byte hunk we calculate a 64-bit syndrome value, with
+ two bits per byte (LSB is always in bits 0 and 1, for both big
+ and little-endian systems). For each tuple, bit 0 is set iff
+ the relevant byte matched the requested character; bit 1 is set
+ iff the relevant byte matched the NUL end of string (we trigger
+ off bit0 for the special case of looking for NUL). Since the bits
+ in the syndrome reflect exactly the order in which things occur
+ in the original string a count_trailing_zeros() operation will
+ identify exactly which byte is causing the termination, and why. */
+
+/* Locals and temporaries. */
+
+ .macro def_fn f p2align=0
+ .text
+ .p2align \p2align
+ .global \f
+ .type \f, %function
+\f:
+ .endm
+
+def_fn strchr
+ /* Magic constant 0x40100401 to allow us to identify which lane
+ matches the requested byte. Magic constant 0x80200802 used
+ similarly for NUL termination. */
+ mov wtmp2, #0x0401
+ movk wtmp2, #0x4010, lsl #16
+ dup vrepchr.16b, chrin
+ bic src, srcin, #31 /* Work with aligned 32-byte hunks. */
+ dup vrepmask_c.4s, wtmp2
+ ands tmp1, srcin, #31
+ add vrepmask_0.4s, vrepmask_c.4s, vrepmask_c.4s /* equiv: lsl #1 */
+ b.eq .Lloop
+
+ /* Input string is not 32-byte aligned. Rather than forcing
+ the padding bytes to a safe value, we calculate the syndrome
+ for all the bytes, but then mask off those bits of the
+ syndrome that are related to the padding. */
+ ld1 {vdata1.16b, vdata2.16b}, [src], #32
+ neg tmp1, tmp1
+ cmeq vhas_nul1.16b, vdata1.16b, #0
+ cmeq vhas_chr1.16b, vdata1.16b, vrepchr.16b
+ cmeq vhas_nul2.16b, vdata2.16b, #0
+ cmeq vhas_chr2.16b, vdata2.16b, vrepchr.16b
+ and vhas_nul1.16b, vhas_nul1.16b, vrepmask_0.16b
+ and vhas_nul2.16b, vhas_nul2.16b, vrepmask_0.16b
+ and vhas_chr1.16b, vhas_chr1.16b, vrepmask_c.16b
+ and vhas_chr2.16b, vhas_chr2.16b, vrepmask_c.16b
+ orr vend1.16b, vhas_nul1.16b, vhas_chr1.16b
+ orr vend2.16b, vhas_nul2.16b, vhas_chr2.16b
+ lsl tmp1, tmp1, #1
+ addp vend1.16b, vend1.16b, vend2.16b // 256->128
+ mov tmp3, #~0
+ addp vend1.16b, vend1.16b, vend2.16b // 128->64
+ lsr tmp1, tmp3, tmp1
+
+ mov tmp3, vend1.2d[0]
+ bic tmp1, tmp3, tmp1 // Mask padding bits.
+ cbnz tmp1, .Ltail
+
+.Lloop:
+ ld1 {vdata1.16b, vdata2.16b}, [src], #32
+ cmeq vhas_nul1.16b, vdata1.16b, #0
+ cmeq vhas_chr1.16b, vdata1.16b, vrepchr.16b
+ cmeq vhas_nul2.16b, vdata2.16b, #0
+ cmeq vhas_chr2.16b, vdata2.16b, vrepchr.16b
+ /* Use a fast check for the termination condition. */
+ orr vend1.16b, vhas_nul1.16b, vhas_chr1.16b
+ orr vend2.16b, vhas_nul2.16b, vhas_chr2.16b
+ orr vend1.16b, vend1.16b, vend2.16b
+ addp vend1.2d, vend1.2d, vend1.2d
+ mov tmp1, vend1.2d[0]
+ cbz tmp1, .Lloop
+
+ /* Termination condition found. Now need to establish exactly why
+ we terminated. */
+ and vhas_nul1.16b, vhas_nul1.16b, vrepmask_0.16b
+ and vhas_nul2.16b, vhas_nul2.16b, vrepmask_0.16b
+ and vhas_chr1.16b, vhas_chr1.16b, vrepmask_c.16b
+ and vhas_chr2.16b, vhas_chr2.16b, vrepmask_c.16b
+ orr vend1.16b, vhas_nul1.16b, vhas_chr1.16b
+ orr vend2.16b, vhas_nul2.16b, vhas_chr2.16b
+ addp vend1.16b, vend1.16b, vend2.16b // 256->128
+ addp vend1.16b, vend1.16b, vend2.16b // 128->64
+
+ mov tmp1, vend1.2d[0]
+.Ltail:
+ /* Count the trailing zeros, by bit reversing... */
+ rbit tmp1, tmp1
+ /* Re-bias source. */
+ sub src, src, #32
+ clz tmp1, tmp1 /* And counting the leading zeros. */
+ /* Tmp1 is even if the target charager was found first. Otherwise
+ we've found the end of string and we weren't looking for NUL. */
+ tst tmp1, #1
+ add result, src, tmp1, lsr #1
+ csel result, result, xzr, eq
+ ret
+
+ .size strchr, . - strchr
+#endif
diff --git a/newlib/libc/machine/aarch64/strchrnul-stub.c b/newlib/libc/machine/aarch64/strchrnul-stub.c
new file mode 100644
index 000000000..b47e92d3f
--- /dev/null
+++ b/newlib/libc/machine/aarch64/strchrnul-stub.c
@@ -0,0 +1,31 @@
+/* Copyright (c) 2014, ARM Limited
+ 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 the company 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
+ HOLDER 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 (__OPTIMIZE_SIZE__) || defined (PREFER_SIZE_OVER_SPEED))
+# include "../../string/strchrnul.c"
+#else
+/* See strchrnul.S */
+#endif
diff --git a/newlib/libc/machine/aarch64/strchrnul.S b/newlib/libc/machine/aarch64/strchrnul.S
new file mode 100644
index 000000000..a0ac13b7f
--- /dev/null
+++ b/newlib/libc/machine/aarch64/strchrnul.S
@@ -0,0 +1,149 @@
+/*
+ strchrnul - find a character or nul in a string
+
+ Copyright (c) 2014, ARM Limited
+ 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 the company 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
+ HOLDER 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 (__OPTIMIZE_SIZE__) || defined (PREFER_SIZE_OVER_SPEED))
+/* See strchrnul-stub.c */
+#else
+
+/* Assumptions:
+ *
+ * ARMv8-a, AArch64
+ * Neon Available.
+ */
+
+/* Arguments and results. */
+#define srcin x0
+#define chrin w1
+
+#define result x0
+
+#define src x2
+#define tmp1 x3
+#define wtmp2 w4
+#define tmp3 x5
+
+#define vrepchr v0
+#define vdata1 v1
+#define vdata2 v2
+#define vhas_nul1 v3
+#define vhas_nul2 v4
+#define vhas_chr1 v5
+#define vhas_chr2 v6
+#define vrepmask v7
+#define vend1 v16
+
+/* Core algorithm.
+
+ For each 32-byte hunk we calculate a 64-bit syndrome value, with
+ two bits per byte (LSB is always in bits 0 and 1, for both big
+ and little-endian systems). For each tuple, bit 0 is set iff
+ the relevant byte matched the requested character or nul. Since the
+ bits in the syndrome reflect exactly the order in which things occur
+ in the original string a count_trailing_zeros() operation will
+ identify exactly which byte is causing the termination. */
+
+/* Locals and temporaries. */
+
+ .macro def_fn f p2align=0
+ .text
+ .p2align \p2align
+ .global \f
+ .type \f, %function
+\f:
+ .endm
+
+def_fn strchrnul
+ /* Magic constant 0x40100401 to allow us to identify which lane
+ matches the termination condition. */
+ mov wtmp2, #0x0401
+ movk wtmp2, #0x4010, lsl #16
+ dup vrepchr.16b, chrin
+ bic src, srcin, #31 /* Work with aligned 32-byte hunks. */
+ dup vrepmask.4s, wtmp2
+ ands tmp1, srcin, #31
+ b.eq .Lloop
+
+ /* Input string is not 32-byte aligned. Rather than forcing
+ the padding bytes to a safe value, we calculate the syndrome
+ for all the bytes, but then mask off those bits of the
+ syndrome that are related to the padding. */
+ ld1 {vdata1.16b, vdata2.16b}, [src], #32
+ neg tmp1, tmp1
+ cmeq vhas_nul1.16b, vdata1.16b, #0
+ cmeq vhas_chr1.16b, vdata1.16b, vrepchr.16b
+ cmeq vhas_nul2.16b, vdata2.16b, #0
+ cmeq vhas_chr2.16b, vdata2.16b, vrepchr.16b
+ orr vhas_chr1.16b, vhas_chr1.16b, vhas_nul1.16b
+ orr vhas_chr2.16b, vhas_chr2.16b, vhas_nul2.16b
+ and vhas_chr1.16b, vhas_chr1.16b, vrepmask.16b
+ and vhas_chr2.16b, vhas_chr2.16b, vrepmask.16b
+ lsl tmp1, tmp1, #1
+ addp vend1.16b, vhas_chr1.16b, vhas_chr2.16b // 256->128
+ mov tmp3, #~0
+ addp vend1.16b, vend1.16b, vend1.16b // 128->64
+ lsr tmp1, tmp3, tmp1
+
+ mov tmp3, vend1.2d[0]
+ bic tmp1, tmp3, tmp1 // Mask padding bits.
+ cbnz tmp1, .Ltail
+
+.Lloop:
+ ld1 {vdata1.16b, vdata2.16b}, [src], #32
+ cmeq vhas_nul1.16b, vdata1.16b, #0
+ cmeq vhas_chr1.16b, vdata1.16b, vrepchr.16b
+ cmeq vhas_nul2.16b, vdata2.16b, #0
+ cmeq vhas_chr2.16b, vdata2.16b, vrepchr.16b
+ /* Use a fast check for the termination condition. */
+ orr vhas_chr1.16b, vhas_nul1.16b, vhas_chr1.16b
+ orr vhas_chr2.16b, vhas_nul2.16b, vhas_chr2.16b
+ orr vend1.16b, vhas_chr1.16b, vhas_chr2.16b
+ addp vend1.2d, vend1.2d, vend1.2d
+ mov tmp1, vend1.2d[0]
+ cbz tmp1, .Lloop
+
+ /* Termination condition found. Now need to establish exactly why
+ we terminated. */
+ and vhas_chr1.16b, vhas_chr1.16b, vrepmask.16b
+ and vhas_chr2.16b, vhas_chr2.16b, vrepmask.16b
+ addp vend1.16b, vhas_chr1.16b, vhas_chr2.16b // 256->128
+ addp vend1.16b, vend1.16b, vend1.16b // 128->64
+
+ mov tmp1, vend1.2d[0]
+.Ltail:
+ /* Count the trailing zeros, by bit reversing... */
+ rbit tmp1, tmp1
+ /* Re-bias source. */
+ sub src, src, #32
+ clz tmp1, tmp1 /* ... and counting the leading zeros. */
+ /* tmp1 is twice the offset into the fragment. */
+ add result, src, tmp1, lsr #1
+ ret
+
+ .size strchrnul, . - strchrnul
+#endif
diff --git a/newlib/libc/machine/aarch64/strcpy-stub.c b/newlib/libc/machine/aarch64/strcpy-stub.c
new file mode 100644
index 000000000..966277cad
--- /dev/null
+++ b/newlib/libc/machine/aarch64/strcpy-stub.c
@@ -0,0 +1,31 @@
+/* Copyright (c) 2014, ARM Limited
+ 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 the company 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
+ HOLDER 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 (__OPTIMIZE_SIZE__) || defined (PREFER_SIZE_OVER_SPEED))
+# include "../../string/strcpy.c"
+#else
+/* See strcpy.S */
+#endif
diff --git a/newlib/libc/machine/aarch64/strcpy.S b/newlib/libc/machine/aarch64/strcpy.S
new file mode 100644
index 000000000..e5405f253
--- /dev/null
+++ b/newlib/libc/machine/aarch64/strcpy.S
@@ -0,0 +1,341 @@
+/*
+ strcpy/stpcpy - copy a string returning pointer to start/end.
+
+ Copyright (c) 2013, 2014, 2015 ARM Ltd.
+ 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 the company 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
+ HOLDER 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 (__OPTIMIZE_SIZE__) || defined (PREFER_SIZE_OVER_SPEED))
+/* See strchr-stub.c */
+#else
+
+/* Assumptions:
+ *
+ * ARMv8-a, AArch64, unaligned accesses, min page size 4k.
+ */
+
+/* To build as stpcpy, define BUILD_STPCPY before compiling this file.
+
+ To test the page crossing code path more thoroughly, compile with
+ -DSTRCPY_TEST_PAGE_CROSS - this will force all copies through the slower
+ entry path. This option is not intended for production use. */
+
+/* Arguments and results. */
+#define dstin x0
+#define srcin x1
+
+/* Locals and temporaries. */
+#define src x2
+#define dst x3
+#define data1 x4
+#define data1w w4
+#define data2 x5
+#define data2w w5
+#define has_nul1 x6
+#define has_nul2 x7
+#define tmp1 x8
+#define tmp2 x9
+#define tmp3 x10
+#define tmp4 x11
+#define zeroones x12
+#define data1a x13
+#define data2a x14
+#define pos x15
+#define len x16
+#define to_align x17
+
+#ifdef BUILD_STPCPY
+#define STRCPY stpcpy
+#else
+#define STRCPY strcpy
+#endif
+
+ .macro def_fn f p2align=0
+ .text
+ .p2align \p2align
+ .global \f
+ .type \f, %function
+\f:
+ .endm
+
+ /* NUL detection works on the principle that (X - 1) & (~X) & 0x80
+ (=> (X - 1) & ~(X | 0x7f)) is non-zero iff a byte is zero, and
+ can be done in parallel across the entire word. */
+
+#define REP8_01 0x0101010101010101
+#define REP8_7f 0x7f7f7f7f7f7f7f7f
+#define REP8_80 0x8080808080808080
+
+ /* AArch64 systems have a minimum page size of 4k. We can do a quick
+ page size check for crossing this boundary on entry and if we
+ do not, then we can short-circuit much of the entry code. We
+ expect early page-crossing strings to be rare (probability of
+ 16/MIN_PAGE_SIZE ~= 0.4%), so the branch should be quite
+ predictable, even with random strings.
+
+ We don't bother checking for larger page sizes, the cost of setting
+ up the correct page size is just not worth the extra gain from
+ a small reduction in the cases taking the slow path. Note that
+ we only care about whether the first fetch, which may be
+ misaligned, crosses a page boundary - after that we move to aligned
+ fetches for the remainder of the string. */
+
+#ifdef STRCPY_TEST_PAGE_CROSS
+ /* Make everything that isn't Qword aligned look like a page cross. */
+#define MIN_PAGE_P2 4
+#else
+#define MIN_PAGE_P2 12
+#endif
+
+#define MIN_PAGE_SIZE (1 << MIN_PAGE_P2)
+
+def_fn STRCPY p2align=6
+ /* For moderately short strings, the fastest way to do the copy is to
+ calculate the length of the string in the same way as strlen, then
+ essentially do a memcpy of the result. This avoids the need for
+ multiple byte copies and further means that by the time we
+ reach the bulk copy loop we know we can always use DWord
+ accesses. We expect strcpy to rarely be called repeatedly
+ with the same source string, so branch prediction is likely to
+ always be difficult - we mitigate against this by preferring
+ conditional select operations over branches whenever this is
+ feasible. */
+ and tmp2, srcin, #(MIN_PAGE_SIZE - 1)
+ mov zeroones, #REP8_01
+ and to_align, srcin, #15
+ cmp tmp2, #(MIN_PAGE_SIZE - 16)
+ neg tmp1, to_align
+ /* The first fetch will straddle a (possible) page boundary iff
+ srcin + 15 causes bit[MIN_PAGE_P2] to change value. A 16-byte
+ aligned string will never fail the page align check, so will
+ always take the fast path. */
+ b.gt .Lpage_cross
+
+.Lpage_cross_ok:
+ ldp data1, data2, [srcin]
+#ifdef __AARCH64EB__
+ /* Because we expect the end to be found within 16 characters
+ (profiling shows this is the most common case), it's worth
+ swapping the bytes now to save having to recalculate the
+ termination syndrome later. We preserve data1 and data2
+ so that we can re-use the values later on. */
+ rev tmp2, data1
+ sub tmp1, tmp2, zeroones
+ orr tmp2, tmp2, #REP8_7f
+ bics has_nul1, tmp1, tmp2
+ b.ne .Lfp_le8
+ rev tmp4, data2
+ sub tmp3, tmp4, zeroones
+ orr tmp4, tmp4, #REP8_7f
+#else
+ sub tmp1, data1, zeroones
+ orr tmp2, data1, #REP8_7f
+ bics has_nul1, tmp1, tmp2
+ b.ne .Lfp_le8
+ sub tmp3, data2, zeroones
+ orr tmp4, data2, #REP8_7f
+#endif
+ bics has_nul2, tmp3, tmp4
+ b.eq .Lbulk_entry
+
+ /* The string is short (<=16 bytes). We don't know exactly how
+ short though, yet. Work out the exact length so that we can
+ quickly select the optimal copy strategy. */
+.Lfp_gt8:
+ rev has_nul2, has_nul2
+ clz pos, has_nul2
+ mov tmp2, #56
+ add dst, dstin, pos, lsr #3 /* Bits to bytes. */
+ sub pos, tmp2, pos
+#ifdef __AARCH64EB__
+ lsr data2, data2, pos
+#else
+ lsl data2, data2, pos
+#endif
+ str data2, [dst, #1]
+ str data1, [dstin]
+#ifdef BUILD_STPCPY
+ add dstin, dst, #8
+#endif
+ ret
+
+.Lfp_le8:
+ rev has_nul1, has_nul1
+ clz pos, has_nul1
+ add dst, dstin, pos, lsr #3 /* Bits to bytes. */
+ subs tmp2, pos, #24 /* Pos in bits. */
+ b.lt .Lfp_lt4
+#ifdef __AARCH64EB__
+ mov tmp2, #56
+ sub pos, tmp2, pos
+ lsr data2, data1, pos
+ lsr data1, data1, #32
+#else
+ lsr data2, data1, tmp2
+#endif
+ /* 4->7 bytes to copy. */
+ str data2w, [dst, #-3]
+ str data1w, [dstin]
+#ifdef BUILD_STPCPY
+ mov dstin, dst
+#endif
+ ret
+.Lfp_lt4:
+ cbz pos, .Lfp_lt2
+ /* 2->3 bytes to copy. */
+#ifdef __AARCH64EB__
+ lsr data1, data1, #48
+#endif
+ strh data1w, [dstin]
+ /* Fall-through, one byte (max) to go. */
+.Lfp_lt2:
+ /* Null-terminated string. Last character must be zero! */
+ strb wzr, [dst]
+#ifdef BUILD_STPCPY
+ mov dstin, dst
+#endif
+ ret
+
+ .p2align 6
+ /* Aligning here ensures that the entry code and main loop all lies
+ within one 64-byte cache line. */
+.Lbulk_entry:
+ sub to_align, to_align, #16
+ stp data1, data2, [dstin]
+ sub src, srcin, to_align
+ sub dst, dstin, to_align
+ b .Lentry_no_page_cross
+
+ /* The inner loop deals with two Dwords at a time. This has a
+ slightly higher start-up cost, but we should win quite quickly,
+ especially on cores with a high number of issue slots per
+ cycle, as we get much better parallelism out of the operations. */
+.Lmain_loop:
+ stp data1, data2, [dst], #16
+.Lentry_no_page_cross:
+ ldp data1, data2, [src], #16
+ sub tmp1, data1, zeroones
+ orr tmp2, data1, #REP8_7f
+ sub tmp3, data2, zeroones
+ orr tmp4, data2, #REP8_7f
+ bic has_nul1, tmp1, tmp2
+ bics has_nul2, tmp3, tmp4
+ ccmp has_nul1, #0, #0, eq /* NZCV = 0000 */
+ b.eq .Lmain_loop
+
+ /* Since we know we are copying at least 16 bytes, the fastest way
+ to deal with the tail is to determine the location of the
+ trailing NUL, then (re)copy the 16 bytes leading up to that. */
+ cmp has_nul1, #0
+#ifdef __AARCH64EB__
+ /* For big-endian, carry propagation (if the final byte in the
+ string is 0x01) means we cannot use has_nul directly. The
+ easiest way to get the correct byte is to byte-swap the data
+ and calculate the syndrome a second time. */
+ csel data1, data1, data2, ne
+ rev data1, data1
+ sub tmp1, data1, zeroones
+ orr tmp2, data1, #REP8_7f
+ bic has_nul1, tmp1, tmp2
+#else
+ csel has_nul1, has_nul1, has_nul2, ne
+#endif
+ rev has_nul1, has_nul1
+ clz pos, has_nul1
+ add tmp1, pos, #72
+ add pos, pos, #8
+ csel pos, pos, tmp1, ne
+ add src, src, pos, lsr #3
+ add dst, dst, pos, lsr #3
+ ldp data1, data2, [src, #-32]
+ stp data1, data2, [dst, #-16]
+#ifdef BUILD_STPCPY
+ sub dstin, dst, #1
+#endif
+ ret
+
+.Lpage_cross:
+ bic src, srcin, #15
+ /* Start by loading two words at [srcin & ~15], then forcing the
+ bytes that precede srcin to 0xff. This means they never look
+ like termination bytes. */
+ ldp data1, data2, [src]
+ lsl tmp1, tmp1, #3 /* Bytes beyond alignment -> bits. */
+ tst to_align, #7
+ csetm tmp2, ne
+#ifdef __AARCH64EB__
+ lsl tmp2, tmp2, tmp1 /* Shift (tmp1 & 63). */
+#else
+ lsr tmp2, tmp2, tmp1 /* Shift (tmp1 & 63). */
+#endif
+ orr data1, data1, tmp2
+ orr data2a, data2, tmp2
+ cmp to_align, #8
+ csinv data1, data1, xzr, lt
+ csel data2, data2, data2a, lt
+ sub tmp1, data1, zeroones
+ orr tmp2, data1, #REP8_7f
+ sub tmp3, data2, zeroones
+ orr tmp4, data2, #REP8_7f
+ bic has_nul1, tmp1, tmp2
+ bics has_nul2, tmp3, tmp4
+ ccmp has_nul1, #0, #0, eq /* NZCV = 0000 */
+ b.eq .Lpage_cross_ok
+ /* We now need to make data1 and data2 look like they've been
+ loaded directly from srcin. Do a rotate on the 128-bit value. */
+ lsl tmp1, to_align, #3 /* Bytes->bits. */
+ neg tmp2, to_align, lsl #3
+#ifdef __AARCH64EB__
+ lsl data1a, data1, tmp1
+ lsr tmp4, data2, tmp2
+ lsl data2, data2, tmp1
+ orr tmp4, tmp4, data1a
+ cmp to_align, #8
+ csel data1, tmp4, data2, lt
+ rev tmp2, data1
+ rev tmp4, data2
+ sub tmp1, tmp2, zeroones
+ orr tmp2, tmp2, #REP8_7f
+ sub tmp3, tmp4, zeroones
+ orr tmp4, tmp4, #REP8_7f
+#else
+ lsr data1a, data1, tmp1
+ lsl tmp4, data2, tmp2
+ lsr data2, data2, tmp1
+ orr tmp4, tmp4, data1a
+ cmp to_align, #8
+ csel data1, tmp4, data2, lt
+ sub tmp1, data1, zeroones
+ orr tmp2, data1, #REP8_7f
+ sub tmp3, data2, zeroones
+ orr tmp4, data2, #REP8_7f
+#endif
+ bic has_nul1, tmp1, tmp2
+ cbnz has_nul1, .Lfp_le8
+ bic has_nul2, tmp3, tmp4
+ b .Lfp_gt8
+
+ .size STRCPY, . - STRCPY
+#endif
diff --git a/newlib/libc/machine/aarch64/strlen.S b/newlib/libc/machine/aarch64/strlen.S
index 36fde1fd9..872d136ef 100644
--- a/newlib/libc/machine/aarch64/strlen.S
+++ b/newlib/libc/machine/aarch64/strlen.S
@@ -1,16 +1,16 @@
-/* Copyright (c) 2013, Linaro Limited
+/* Copyright (c) 2013-2015, Linaro Limited
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.
+ 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.
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
* Neither the name of the Linaro nor the
- names of its contributors may be used to endorse or promote products
- derived from this software without specific prior written permission.
+ 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
@@ -30,9 +30,13 @@
/* Assumptions:
*
- * ARMv8-a, AArch64
+ * ARMv8-a, AArch64, unaligned accesses, min page size 4k.
*/
+/* To test the page crossing code path more thoroughly, compile with
+ -DTEST_PAGE_CROSS - this will force all calls through the slower
+ entry path. This option is not intended for production use. */
+
/* Arguments and results. */
#define srcin x0
#define len x0
@@ -41,15 +45,15 @@
#define src x1
#define data1 x2
#define data2 x3
-#define data2a x4
-#define has_nul1 x5
-#define has_nul2 x6
-#define tmp1 x7
-#define tmp2 x8
-#define tmp3 x9
-#define tmp4 x10
-#define zeroones x11
-#define pos x12
+#define has_nul1 x4
+#define has_nul2 x5
+#define tmp1 x4
+#define tmp2 x5
+#define tmp3 x6
+#define tmp4 x7
+#define zeroones x8
+
+#define L(l) .L ## l
.macro def_fn f p2align=0
.text
@@ -59,78 +63,176 @@
\f:
.endm
+ /* NUL detection works on the principle that (X - 1) & (~X) & 0x80
+ (=> (X - 1) & ~(X | 0x7f)) is non-zero iff a byte is zero, and
+ can be done in parallel across the entire word. A faster check
+ (X - 1) & 0x80 is zero for non-NUL ASCII characters, but gives
+ false hits for characters 129..255. */
+
#define REP8_01 0x0101010101010101
#define REP8_7f 0x7f7f7f7f7f7f7f7f
#define REP8_80 0x8080808080808080
- /* Start of critial section -- keep to one 64Byte cache line. */
+#ifdef TEST_PAGE_CROSS
+# define MIN_PAGE_SIZE 15
+#else
+# define MIN_PAGE_SIZE 4096
+#endif
+
+ /* Since strings are short on average, we check the first 16 bytes
+ of the string for a NUL character. In order to do an unaligned ldp
+ safely we have to do a page cross check first. If there is a NUL
+ byte we calculate the length from the 2 8-byte words using
+ conditional select to reduce branch mispredictions (it is unlikely
+ strlen will be repeatedly called on strings with the same length).
+
+ If the string is longer than 16 bytes, we align src so don't need
+ further page cross checks, and process 32 bytes per iteration
+ using the fast NUL check. If we encounter non-ASCII characters,
+ fallback to a second loop using the full NUL check.
+
+ If the page cross check fails, we read 16 bytes from an aligned
+ address, remove any characters before the string, and continue
+ in the main loop using aligned loads. Since strings crossing a
+ page in the first 16 bytes are rare (probability of
+ 16/MIN_PAGE_SIZE ~= 0.4%), this case does not need to be optimized.
+
+ AArch64 systems have a minimum page size of 4k. We don't bother
+ checking for larger page sizes - the cost of setting up the correct
+ page size is just not worth the extra gain from a small reduction in
+ the cases taking the slow path. Note that we only care about
+ whether the first fetch, which may be misaligned, crosses a page
+ boundary. */
+
def_fn strlen p2align=6
- mov zeroones, #REP8_01
- bic src, srcin, #15
- ands tmp1, srcin, #15
- b.ne .Lmisaligned
- /* NUL detection works on the principle that (X - 1) & (~X) & 0x80
- (=> (X - 1) & ~(X | 0x7f)) is non-zero iff a byte is zero, and
- can be done in parallel across the entire word. */
- /* The inner loop deals with two Dwords at a time. This has a
- slightly higher start-up cost, but we should win quite quickly,
- especially on cores with a high number of issue slots per
- cycle, as we get much better parallelism out of the operations. */
-.Lloop:
- ldp data1, data2, [src], #16
-.Lrealigned:
+ and tmp1, srcin, MIN_PAGE_SIZE - 1
+ mov zeroones, REP8_01
+ cmp tmp1, MIN_PAGE_SIZE - 16
+ b.gt L(page_cross)
+ ldp data1, data2, [srcin]
+#ifdef __AARCH64EB__
+ /* For big-endian, carry propagation (if the final byte in the
+ string is 0x01) means we cannot use has_nul1/2 directly.
+ Since we expect strings to be small and early-exit,
+ byte-swap the data now so has_null1/2 will be correct. */
+ rev data1, data1
+ rev data2, data2
+#endif
sub tmp1, data1, zeroones
- orr tmp2, data1, #REP8_7f
+ orr tmp2, data1, REP8_7f
sub tmp3, data2, zeroones
- orr tmp4, data2, #REP8_7f
- bic has_nul1, tmp1, tmp2
- bics has_nul2, tmp3, tmp4
- ccmp has_nul1, #0, #0, eq /* NZCV = 0000 */
- b.eq .Lloop
- /* End of critical section -- keep to one 64Byte cache line. */
+ orr tmp4, data2, REP8_7f
+ bics has_nul1, tmp1, tmp2
+ bic has_nul2, tmp3, tmp4
+ ccmp has_nul2, 0, 0, eq
+ beq L(main_loop_entry)
- sub len, src, srcin
- cbz has_nul1, .Lnul_in_data2
-#ifdef __AARCH64EB__
- mov data2, data1
-#endif
- sub len, len, #8
- mov has_nul2, has_nul1
-.Lnul_in_data2:
+ /* Enter with C = has_nul1 == 0. */
+ csel has_nul1, has_nul1, has_nul2, cc
+ mov len, 8
+ rev has_nul1, has_nul1
+ clz tmp1, has_nul1
+ csel len, xzr, len, cc
+ add len, len, tmp1, lsr 3
+ ret
+
+ /* The inner loop processes 32 bytes per iteration and uses the fast
+ NUL check. If we encounter non-ASCII characters, use a second
+ loop with the accurate NUL check. */
+ .p2align 4
+L(main_loop_entry):
+ bic src, srcin, 15
+ sub src, src, 16
+L(main_loop):
+ ldp data1, data2, [src, 32]!
+.Lpage_cross_entry:
+ sub tmp1, data1, zeroones
+ sub tmp3, data2, zeroones
+ orr tmp2, tmp1, tmp3
+ tst tmp2, zeroones, lsl 7
+ bne 1f
+ ldp data1, data2, [src, 16]
+ sub tmp1, data1, zeroones
+ sub tmp3, data2, zeroones
+ orr tmp2, tmp1, tmp3
+ tst tmp2, zeroones, lsl 7
+ beq L(main_loop)
+ add src, src, 16
+1:
+ /* The fast check failed, so do the slower, accurate NUL check. */
+ orr tmp2, data1, REP8_7f
+ orr tmp4, data2, REP8_7f
+ bics has_nul1, tmp1, tmp2
+ bic has_nul2, tmp3, tmp4
+ ccmp has_nul2, 0, 0, eq
+ beq L(nonascii_loop)
+
+ /* Enter with C = has_nul1 == 0. */
+L(tail):
#ifdef __AARCH64EB__
/* For big-endian, carry propagation (if the final byte in the
- string is 0x01) means we cannot use has_nul directly. The
+ string is 0x01) means we cannot use has_nul1/2 directly. The
easiest way to get the correct byte is to byte-swap the data
and calculate the syndrome a second time. */
- rev data2, data2
- sub tmp1, data2, zeroones
- orr tmp2, data2, #REP8_7f
- bic has_nul2, tmp1, tmp2
+ csel data1, data1, data2, cc
+ rev data1, data1
+ sub tmp1, data1, zeroones
+ orr tmp2, data1, REP8_7f
+ bic has_nul1, tmp1, tmp2
+#else
+ csel has_nul1, has_nul1, has_nul2, cc
#endif
- sub len, len, #8
- rev has_nul2, has_nul2
- clz pos, has_nul2
- add len, len, pos, lsr #3 /* Bits to bytes. */
+ sub len, src, srcin
+ rev has_nul1, has_nul1
+ add tmp2, len, 8
+ clz tmp1, has_nul1
+ csel len, len, tmp2, cc
+ add len, len, tmp1, lsr 3
ret
-.Lmisaligned:
- cmp tmp1, #8
- neg tmp1, tmp1
- ldp data1, data2, [src], #16
- lsl tmp1, tmp1, #3 /* Bytes beyond alignment -> bits. */
- mov tmp2, #~0
+L(nonascii_loop):
+ ldp data1, data2, [src, 16]!
+ sub tmp1, data1, zeroones
+ orr tmp2, data1, REP8_7f
+ sub tmp3, data2, zeroones
+ orr tmp4, data2, REP8_7f
+ bics has_nul1, tmp1, tmp2
+ bic has_nul2, tmp3, tmp4
+ ccmp has_nul2, 0, 0, eq
+ bne L(tail)
+ ldp data1, data2, [src, 16]!
+ sub tmp1, data1, zeroones
+ orr tmp2, data1, REP8_7f
+ sub tmp3, data2, zeroones
+ orr tmp4, data2, REP8_7f
+ bics has_nul1, tmp1, tmp2
+ bic has_nul2, tmp3, tmp4
+ ccmp has_nul2, 0, 0, eq
+ beq L(nonascii_loop)
+ b L(tail)
+
+ /* Load 16 bytes from [srcin & ~15] and force the bytes that precede
+ srcin to 0x7f, so we ignore any NUL bytes before the string.
+ Then continue in the aligned loop. */
+L(page_cross):
+ bic src, srcin, 15
+ ldp data1, data2, [src]
+ lsl tmp1, srcin, 3
+ mov tmp4, -1
#ifdef __AARCH64EB__
- /* Big-endian. Early bytes are at MSB. */
- lsl tmp2, tmp2, tmp1 /* Shift (tmp1 & 63). */
+ /* Big-endian. Early bytes are at MSB. */
+ lsr tmp1, tmp4, tmp1 /* Shift (tmp1 & 63). */
#else
/* Little-endian. Early bytes are at LSB. */
- lsr tmp2, tmp2, tmp1 /* Shift (tmp1 & 63). */
+ lsl tmp1, tmp4, tmp1 /* Shift (tmp1 & 63). */
#endif
- orr data1, data1, tmp2
- orr data2a, data2, tmp2
- csinv data1, data1, xzr, le
- csel data2, data2, data2a, le
- b .Lrealigned
+ orr tmp1, tmp1, REP8_80
+ orn data1, data1, tmp1
+ orn tmp2, data2, tmp1
+ tst srcin, 8
+ csel data1, data1, tmp4, eq
+ csel data2, data2, tmp2, eq
+ b L(page_cross_entry)
.size strlen, . - strlen
#endif
diff --git a/newlib/libc/machine/aarch64/strrchr-stub.c b/newlib/libc/machine/aarch64/strrchr-stub.c
new file mode 100644
index 000000000..5923a4446
--- /dev/null
+++ b/newlib/libc/machine/aarch64/strrchr-stub.c
@@ -0,0 +1,31 @@
+/* Copyright (c) 2014, ARM Limited
+ 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 the company 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
+ HOLDER 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 (__OPTIMIZE_SIZE__) || defined (PREFER_SIZE_OVER_SPEED))
+# include "../../string/strrchr.c"
+#else
+/* See strrchr.S */
+#endif
diff --git a/newlib/libc/machine/aarch64/strrchr.S b/newlib/libc/machine/aarch64/strrchr.S
new file mode 100644
index 000000000..d64fc09b1
--- /dev/null
+++ b/newlib/libc/machine/aarch64/strrchr.S
@@ -0,0 +1,182 @@
+/*
+ strrchr - find last instance of a character in a string
+
+ Copyright (c) 2014, ARM Limited
+ 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 the company 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
+ HOLDER 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 (__OPTIMIZE_SIZE__) || defined (PREFER_SIZE_OVER_SPEED))
+/* See strchr-stub.c */
+#else
+
+/* Assumptions:
+ *
+ * ARMv8-a, AArch64
+ * Neon Available.
+ */
+
+/* Arguments and results. */
+#define srcin x0
+#define chrin w1
+
+#define result x0
+
+#define src x2
+#define tmp1 x3
+#define wtmp2 w4
+#define tmp3 x5
+#define src_match x6
+#define src_offset x7
+#define const_m1 x8
+#define tmp4 x9
+#define nul_match x10
+#define chr_match x11
+
+#define vrepchr v0
+#define vdata1 v1
+#define vdata2 v2
+#define vhas_nul1 v3
+#define vhas_nul2 v4
+#define vhas_chr1 v5
+#define vhas_chr2 v6
+#define vrepmask_0 v7
+#define vrepmask_c v16
+#define vend1 v17
+#define vend2 v18
+
+/* Core algorithm.
+
+ For each 32-byte hunk we calculate a 64-bit syndrome value, with
+ two bits per byte (LSB is always in bits 0 and 1, for both big
+ and little-endian systems). For each tuple, bit 0 is set iff
+ the relevant byte matched the requested character; bit 1 is set
+ iff the relevant byte matched the NUL end of string (we trigger
+ off bit0 for the special case of looking for NUL). Since the bits
+ in the syndrome reflect exactly the order in which things occur
+ in the original string a count_trailing_zeros() operation will
+ identify exactly which byte is causing the termination, and why. */
+
+/* Locals and temporaries. */
+
+ .macro def_fn f p2align=0
+ .text
+ .p2align \p2align
+ .global \f
+ .type \f, %function
+\f:
+ .endm
+
+def_fn strrchr
+ /* Magic constant 0x40100401 to allow us to identify which lane
+ matches the requested byte. Magic constant 0x80200802 used
+ similarly for NUL termination. */
+ mov wtmp2, #0x0401
+ movk wtmp2, #0x4010, lsl #16
+ dup vrepchr.16b, chrin
+ bic src, srcin, #31 /* Work with aligned 32-byte hunks. */
+ dup vrepmask_c.4s, wtmp2
+ mov src_offset, #0
+ ands tmp1, srcin, #31
+ add vrepmask_0.4s, vrepmask_c.4s, vrepmask_c.4s /* equiv: lsl #1 */
+ b.eq .Laligned
+
+ /* Input string is not 32-byte aligned. Rather than forcing
+ the padding bytes to a safe value, we calculate the syndrome
+ for all the bytes, but then mask off those bits of the
+ syndrome that are related to the padding. */
+ ld1 {vdata1.16b, vdata2.16b}, [src], #32
+ neg tmp1, tmp1
+ cmeq vhas_nul1.16b, vdata1.16b, #0
+ cmeq vhas_chr1.16b, vdata1.16b, vrepchr.16b
+ cmeq vhas_nul2.16b, vdata2.16b, #0
+ cmeq vhas_chr2.16b, vdata2.16b, vrepchr.16b
+ and vhas_nul1.16b, vhas_nul1.16b, vrepmask_0.16b
+ and vhas_chr1.16b, vhas_chr1.16b, vrepmask_c.16b
+ and vhas_nul2.16b, vhas_nul2.16b, vrepmask_0.16b
+ and vhas_chr2.16b, vhas_chr2.16b, vrepmask_c.16b
+ addp vhas_nul1.16b, vhas_nul1.16b, vhas_nul2.16b // 256->128
+ addp vhas_chr1.16b, vhas_chr1.16b, vhas_chr2.16b // 256->128
+ addp vhas_nul1.16b, vhas_nul1.16b, vhas_nul1.16b // 128->64
+ addp vhas_chr1.16b, vhas_chr1.16b, vhas_chr1.16b // 128->64
+ mov nul_match, vhas_nul1.2d[0]
+ lsl tmp1, tmp1, #1
+ mov const_m1, #~0
+ mov chr_match, vhas_chr1.2d[0]
+ lsr tmp3, const_m1, tmp1
+
+ bic nul_match, nul_match, tmp3 // Mask padding bits.
+ bic chr_match, chr_match, tmp3 // Mask padding bits.
+ cbnz nul_match, .Ltail
+
+.Lloop:
+ cmp chr_match, #0
+ csel src_match, src, src_match, ne
+ csel src_offset, chr_match, src_offset, ne
+.Laligned:
+ ld1 {vdata1.16b, vdata2.16b}, [src], #32
+ cmeq vhas_nul1.16b, vdata1.16b, #0
+ cmeq vhas_chr1.16b, vdata1.16b, vrepchr.16b
+ cmeq vhas_nul2.16b, vdata2.16b, #0
+ cmeq vhas_chr2.16b, vdata2.16b, vrepchr.16b
+ addp vend1.16b, vhas_nul1.16b, vhas_nul2.16b // 256->128
+ and vhas_chr1.16b, vhas_chr1.16b, vrepmask_c.16b
+ and vhas_chr2.16b, vhas_chr2.16b, vrepmask_c.16b
+ addp vhas_chr1.16b, vhas_chr1.16b, vhas_chr2.16b // 256->128
+ addp vend1.16b, vend1.16b, vend1.16b // 128->64
+ addp vhas_chr1.16b, vhas_chr1.16b, vhas_chr1.16b // 128->64
+ mov nul_match, vend1.2d[0]
+ mov chr_match, vhas_chr1.2d[0]
+ cbz nul_match, .Lloop
+
+ and vhas_nul1.16b, vhas_nul1.16b, vrepmask_0.16b
+ and vhas_nul2.16b, vhas_nul2.16b, vrepmask_0.16b
+ addp vhas_nul1.16b, vhas_nul1.16b, vhas_nul2.16b
+ addp vhas_nul1.16b, vhas_nul1.16b, vhas_nul1.16b
+ mov nul_match, vhas_nul1.2d[0]
+
+.Ltail:
+ /* Work out exactly where the string ends. */
+ sub tmp4, nul_match, #1
+ eor tmp4, tmp4, nul_match
+ ands chr_match, chr_match, tmp4
+ /* And pick the values corresponding to the last match. */
+ csel src_match, src, src_match, ne
+ csel src_offset, chr_match, src_offset, ne
+
+ /* Count down from the top of the syndrome to find the last match. */
+ clz tmp3, src_offset
+ /* Src_match points beyond the word containing the match, so we can
+ simply subtract half the bit-offset into the syndrome. Because
+ we are counting down, we need to go back one more character. */
+ add tmp3, tmp3, #2
+ sub result, src_match, tmp3, lsr #1
+ /* But if the syndrome shows no match was found, then return NULL. */
+ cmp src_offset, #0
+ csel result, result, xzr, ne
+
+ ret
+
+ .size strrchr, . - strrchr
+#endif
diff --git a/newlib/libc/machine/arc/Makefile.am b/newlib/libc/machine/arc/Makefile.am
new file mode 100644
index 000000000..8dee84b09
--- /dev/null
+++ b/newlib/libc/machine/arc/Makefile.am
@@ -0,0 +1,48 @@
+## Process this file with automake to generate Makefile.in
+
+AUTOMAKE_OPTIONS = cygnus
+
+INCLUDES = $(NEWLIB_CFLAGS) $(CROSS_CFLAGS) $(TARGET_CFLAGS)
+
+noinst_LIBRARIES = lib.a
+
+lib_a_SOURCES = \
+ memcmp.S \
+ memcmp-bs-norm.S \
+ memcmp-stub.c \
+ memcpy.S \
+ memcpy-archs.S \
+ memcpy-bs.S \
+ memcpy-stub.c \
+ memset.S \
+ memset-archs.S \
+ memset-bs.S \
+ memset-stub.c \
+ setjmp.S \
+ strchr.S \
+ strchr-bs.S \
+ strchr-bs-norm.S \
+ strchr-stub.c \
+ strcmp.S \
+ strcmp-archs.S \
+ strcmp-stub.c \
+ strcpy.S \
+ strcpy-bs.S \
+ strcpy-bs-arc600.S \
+ strcpy-stub.c \
+ strlen.S \
+ strlen-bs.S \
+ strlen-bs-norm.S \
+ strlen-stub.c \
+ strncpy.S \
+ strncpy-stub.c \
+ strncpy-bs.S
+
+lib_a_CCASFLAGS=$(AM_CCASFLAGS)
+lib_a_CFLAGS = $(AM_CFLAGS)
+
+ACLOCAL_AMFLAGS = -I ../../..
+CONFIG_STATUS_DEPENDENCIES = $(newlib_basedir)/configure.host
+
+pdf:
+install-pdf:
diff --git a/newlib/libc/machine/arc/Makefile.in b/newlib/libc/machine/arc/Makefile.in
new file mode 100644
index 000000000..b46471f7f
--- /dev/null
+++ b/newlib/libc/machine/arc/Makefile.in
@@ -0,0 +1,664 @@
+# Makefile.in generated by automake 1.11.6 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 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@
+
+VPATH = @srcdir@
+am__make_dryrun = \
+ { \
+ am__dry=no; \
+ case $$MAKEFLAGS in \
+ *\\[\ \ ]*) \
+ echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \
+ | grep '^AM OK$$' >/dev/null || am__dry=yes;; \
+ *) \
+ for am__flg in $$MAKEFLAGS; do \
+ case $$am__flg in \
+ *=*|--*) ;; \
+ *n*) am__dry=yes; break;; \
+ esac; \
+ done;; \
+ esac; \
+ test $$am__dry = yes; \
+ }
+pkgdatadir = $(datadir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+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@
+subdir = .
+DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
+ $(top_srcdir)/configure $(am__configure_deps) \
+ $(srcdir)/../../../../mkinstalldirs
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/../../../acinclude.m4 \
+ $(top_srcdir)/configure.in
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+ $(ACLOCAL_M4)
+am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
+ configure.lineno config.status.lineno
+mkinstalldirs = $(SHELL) $(top_srcdir)/../../../../mkinstalldirs
+CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+LIBRARIES = $(noinst_LIBRARIES)
+ARFLAGS = cru
+lib_a_AR = $(AR) $(ARFLAGS)
+lib_a_LIBADD =
+am_lib_a_OBJECTS = lib_a-memcmp.$(OBJEXT) \
+ lib_a-memcmp-bs-norm.$(OBJEXT) lib_a-memcmp-stub.$(OBJEXT) \
+ lib_a-memcpy.$(OBJEXT) lib_a-memcpy-archs.$(OBJEXT) \
+ lib_a-memcpy-bs.$(OBJEXT) lib_a-memcpy-stub.$(OBJEXT) \
+ lib_a-memset.$(OBJEXT) lib_a-memset-archs.$(OBJEXT) \
+ lib_a-memset-bs.$(OBJEXT) lib_a-memset-stub.$(OBJEXT) \
+ lib_a-setjmp.$(OBJEXT) lib_a-strchr.$(OBJEXT) \
+ lib_a-strchr-bs.$(OBJEXT) lib_a-strchr-bs-norm.$(OBJEXT) \
+ lib_a-strchr-stub.$(OBJEXT) lib_a-strcmp.$(OBJEXT) \
+ lib_a-strcmp-archs.$(OBJEXT) lib_a-strcmp-stub.$(OBJEXT) \
+ lib_a-strcpy.$(OBJEXT) lib_a-strcpy-bs.$(OBJEXT) \
+ lib_a-strcpy-bs-arc600.$(OBJEXT) lib_a-strcpy-stub.$(OBJEXT) \
+ lib_a-strlen.$(OBJEXT) lib_a-strlen-bs.$(OBJEXT) \
+ lib_a-strlen-bs-norm.$(OBJEXT) lib_a-strlen-stub.$(OBJEXT) \
+ lib_a-strncpy.$(OBJEXT) lib_a-strncpy-stub.$(OBJEXT) \
+ lib_a-strncpy-bs.$(OBJEXT)
+lib_a_OBJECTS = $(am_lib_a_OBJECTS)
+DEFAULT_INCLUDES = -I.@am__isrc@
+depcomp =
+am__depfiles_maybe =
+CPPASCOMPILE = $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CCASFLAGS) $(CCASFLAGS)
+COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+CCLD = $(CC)
+LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
+SOURCES = $(lib_a_SOURCES)
+am__can_run_installinfo = \
+ case $$AM_UPDATE_INFO_DIR in \
+ n|no|NO) false;; \
+ *) (install-info --version) >/dev/null 2>&1;; \
+ esac
+ETAGS = etags
+CTAGS = ctags
+ACLOCAL = @ACLOCAL@
+AMTAR = @AMTAR@
+AR = @AR@
+AS = @AS@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CC = @CC@
+CCAS = @CCAS@
+CCASFLAGS = @CCASFLAGS@
+CCDEPMODE = @CCDEPMODE@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LDFLAGS = @LDFLAGS@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LTLIBOBJS = @LTLIBOBJS@
+MAINT = @MAINT@
+MAKEINFO = @MAKEINFO@
+MKDIR_P = @MKDIR_P@
+NEWLIB_CFLAGS = @NEWLIB_CFLAGS@
+NO_INCLUDE_LIST = @NO_INCLUDE_LIST@
+OBJEXT = @OBJEXT@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+RANLIB = @RANLIB@
+READELF = @READELF@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+VERSION = @VERSION@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+aext = @aext@
+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@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+libm_machine_dir = @libm_machine_dir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+lpfx = @lpfx@
+machine_dir = @machine_dir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+newlib_basedir = @newlib_basedir@
+oext = @oext@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sys_dir = @sys_dir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+AUTOMAKE_OPTIONS = cygnus
+INCLUDES = $(NEWLIB_CFLAGS) $(CROSS_CFLAGS) $(TARGET_CFLAGS)
+noinst_LIBRARIES = lib.a
+lib_a_SOURCES = \
+ memcmp.S \
+ memcmp-bs-norm.S \
+ memcmp-stub.c \
+ memcpy.S \
+ memcpy-archs.S \
+ memcpy-bs.S \
+ memcpy-stub.c \
+ memset.S \
+ memset-archs.S \
+ memset-bs.S \
+ memset-stub.c \
+ setjmp.S \
+ strchr.S \
+ strchr-bs.S \
+ strchr-bs-norm.S \
+ strchr-stub.c \
+ strcmp.S \
+ strcmp-archs.S \
+ strcmp-stub.c \
+ strcpy.S \
+ strcpy-bs.S \
+ strcpy-bs-arc600.S \
+ strcpy-stub.c \
+ strlen.S \
+ strlen-bs.S \
+ strlen-bs-norm.S \
+ strlen-stub.c \
+ strncpy.S \
+ strncpy-stub.c \
+ strncpy-bs.S
+
+lib_a_CCASFLAGS = $(AM_CCASFLAGS)
+lib_a_CFLAGS = $(AM_CFLAGS)
+ACLOCAL_AMFLAGS = -I ../../..
+CONFIG_STATUS_DEPENDENCIES = $(newlib_basedir)/configure.host
+all: all-am
+
+.SUFFIXES:
+.SUFFIXES: .S .c .o .obj
+am--refresh: Makefile
+ @:
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
+ @for dep in $?; do \
+ case '$(am__configure_deps)' in \
+ *$$dep*) \
+ echo ' cd $(srcdir) && $(AUTOMAKE) --cygnus'; \
+ $(am__cd) $(srcdir) && $(AUTOMAKE) --cygnus \
+ && exit 0; \
+ exit 1;; \
+ esac; \
+ done; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --cygnus Makefile'; \
+ $(am__cd) $(top_srcdir) && \
+ $(AUTOMAKE) --cygnus Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ @case '$?' in \
+ *config.status*) \
+ echo ' $(SHELL) ./config.status'; \
+ $(SHELL) ./config.status;; \
+ *) \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \
+ esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+ $(SHELL) ./config.status --recheck
+
+$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
+ $(am__cd) $(srcdir) && $(AUTOCONF)
+$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
+ $(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
+$(am__aclocal_m4_deps):
+
+clean-noinstLIBRARIES:
+ -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES)
+lib.a: $(lib_a_OBJECTS) $(lib_a_DEPENDENCIES) $(EXTRA_lib_a_DEPENDENCIES)
+ -rm -f lib.a
+ $(lib_a_AR) lib.a $(lib_a_OBJECTS) $(lib_a_LIBADD)
+ $(RANLIB) lib.a
+
+mostlyclean-compile:
+ -rm -f *.$(OBJEXT)
+
+distclean-compile:
+ -rm -f *.tab.c
+
+.S.o:
+ $(CPPASCOMPILE) -c -o $@ $<
+
+.S.obj:
+ $(CPPASCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
+
+lib_a-memcmp.o: memcmp.S
+ $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CCASFLAGS) $(CCASFLAGS) -c -o lib_a-memcmp.o `test -f 'memcmp.S' || echo '$(srcdir)/'`memcmp.S
+
+lib_a-memcmp.obj: memcmp.S
+ $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CCASFLAGS) $(CCASFLAGS) -c -o lib_a-memcmp.obj `if test -f 'memcmp.S'; then $(CYGPATH_W) 'memcmp.S'; else $(CYGPATH_W) '$(srcdir)/memcmp.S'; fi`
+
+lib_a-memcmp-bs-norm.o: memcmp-bs-norm.S
+ $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CCASFLAGS) $(CCASFLAGS) -c -o lib_a-memcmp-bs-norm.o `test -f 'memcmp-bs-norm.S' || echo '$(srcdir)/'`memcmp-bs-norm.S
+
+lib_a-memcmp-bs-norm.obj: memcmp-bs-norm.S
+ $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CCASFLAGS) $(CCASFLAGS) -c -o lib_a-memcmp-bs-norm.obj `if test -f 'memcmp-bs-norm.S'; then $(CYGPATH_W) 'memcmp-bs-norm.S'; else $(CYGPATH_W) '$(srcdir)/memcmp-bs-norm.S'; fi`
+
+lib_a-memcpy.o: memcpy.S
+ $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CCASFLAGS) $(CCASFLAGS) -c -o lib_a-memcpy.o `test -f 'memcpy.S' || echo '$(srcdir)/'`memcpy.S
+
+lib_a-memcpy.obj: memcpy.S
+ $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CCASFLAGS) $(CCASFLAGS) -c -o lib_a-memcpy.obj `if test -f 'memcpy.S'; then $(CYGPATH_W) 'memcpy.S'; else $(CYGPATH_W) '$(srcdir)/memcpy.S'; fi`
+
+lib_a-memcpy-archs.o: memcpy-archs.S
+ $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CCASFLAGS) $(CCASFLAGS) -c -o lib_a-memcpy-archs.o `test -f 'memcpy-archs.S' || echo '$(srcdir)/'`memcpy-archs.S
+
+lib_a-memcpy-archs.obj: memcpy-archs.S
+ $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CCASFLAGS) $(CCASFLAGS) -c -o lib_a-memcpy-archs.obj `if test -f 'memcpy-archs.S'; then $(CYGPATH_W) 'memcpy-archs.S'; else $(CYGPATH_W) '$(srcdir)/memcpy-archs.S'; fi`
+
+lib_a-memcpy-bs.o: memcpy-bs.S
+ $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CCASFLAGS) $(CCASFLAGS) -c -o lib_a-memcpy-bs.o `test -f 'memcpy-bs.S' || echo '$(srcdir)/'`memcpy-bs.S
+
+lib_a-memcpy-bs.obj: memcpy-bs.S
+ $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CCASFLAGS) $(CCASFLAGS) -c -o lib_a-memcpy-bs.obj `if test -f 'memcpy-bs.S'; then $(CYGPATH_W) 'memcpy-bs.S'; else $(CYGPATH_W) '$(srcdir)/memcpy-bs.S'; fi`
+
+lib_a-memset.o: memset.S
+ $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CCASFLAGS) $(CCASFLAGS) -c -o lib_a-memset.o `test -f 'memset.S' || echo '$(srcdir)/'`memset.S
+
+lib_a-memset.obj: memset.S
+ $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CCASFLAGS) $(CCASFLAGS) -c -o lib_a-memset.obj `if test -f 'memset.S'; then $(CYGPATH_W) 'memset.S'; else $(CYGPATH_W) '$(srcdir)/memset.S'; fi`
+
+lib_a-memset-archs.o: memset-archs.S
+ $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CCASFLAGS) $(CCASFLAGS) -c -o lib_a-memset-archs.o `test -f 'memset-archs.S' || echo '$(srcdir)/'`memset-archs.S
+
+lib_a-memset-archs.obj: memset-archs.S
+ $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CCASFLAGS) $(CCASFLAGS) -c -o lib_a-memset-archs.obj `if test -f 'memset-archs.S'; then $(CYGPATH_W) 'memset-archs.S'; else $(CYGPATH_W) '$(srcdir)/memset-archs.S'; fi`
+
+lib_a-memset-bs.o: memset-bs.S
+ $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CCASFLAGS) $(CCASFLAGS) -c -o lib_a-memset-bs.o `test -f 'memset-bs.S' || echo '$(srcdir)/'`memset-bs.S
+
+lib_a-memset-bs.obj: memset-bs.S
+ $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CCASFLAGS) $(CCASFLAGS) -c -o lib_a-memset-bs.obj `if test -f 'memset-bs.S'; then $(CYGPATH_W) 'memset-bs.S'; else $(CYGPATH_W) '$(srcdir)/memset-bs.S'; fi`
+
+lib_a-setjmp.o: setjmp.S
+ $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CCASFLAGS) $(CCASFLAGS) -c -o lib_a-setjmp.o `test -f 'setjmp.S' || echo '$(srcdir)/'`setjmp.S
+
+lib_a-setjmp.obj: setjmp.S
+ $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CCASFLAGS) $(CCASFLAGS) -c -o lib_a-setjmp.obj `if test -f 'setjmp.S'; then $(CYGPATH_W) 'setjmp.S'; else $(CYGPATH_W) '$(srcdir)/setjmp.S'; fi`
+
+lib_a-strchr.o: strchr.S
+ $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CCASFLAGS) $(CCASFLAGS) -c -o lib_a-strchr.o `test -f 'strchr.S' || echo '$(srcdir)/'`strchr.S
+
+lib_a-strchr.obj: strchr.S
+ $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CCASFLAGS) $(CCASFLAGS) -c -o lib_a-strchr.obj `if test -f 'strchr.S'; then $(CYGPATH_W) 'strchr.S'; else $(CYGPATH_W) '$(srcdir)/strchr.S'; fi`
+
+lib_a-strchr-bs.o: strchr-bs.S
+ $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CCASFLAGS) $(CCASFLAGS) -c -o lib_a-strchr-bs.o `test -f 'strchr-bs.S' || echo '$(srcdir)/'`strchr-bs.S
+
+lib_a-strchr-bs.obj: strchr-bs.S
+ $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CCASFLAGS) $(CCASFLAGS) -c -o lib_a-strchr-bs.obj `if test -f 'strchr-bs.S'; then $(CYGPATH_W) 'strchr-bs.S'; else $(CYGPATH_W) '$(srcdir)/strchr-bs.S'; fi`
+
+lib_a-strchr-bs-norm.o: strchr-bs-norm.S
+ $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CCASFLAGS) $(CCASFLAGS) -c -o lib_a-strchr-bs-norm.o `test -f 'strchr-bs-norm.S' || echo '$(srcdir)/'`strchr-bs-norm.S
+
+lib_a-strchr-bs-norm.obj: strchr-bs-norm.S
+ $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CCASFLAGS) $(CCASFLAGS) -c -o lib_a-strchr-bs-norm.obj `if test -f 'strchr-bs-norm.S'; then $(CYGPATH_W) 'strchr-bs-norm.S'; else $(CYGPATH_W) '$(srcdir)/strchr-bs-norm.S'; fi`
+
+lib_a-strcmp.o: strcmp.S
+ $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CCASFLAGS) $(CCASFLAGS) -c -o lib_a-strcmp.o `test -f 'strcmp.S' || echo '$(srcdir)/'`strcmp.S
+
+lib_a-strcmp.obj: strcmp.S
+ $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CCASFLAGS) $(CCASFLAGS) -c -o lib_a-strcmp.obj `if test -f 'strcmp.S'; then $(CYGPATH_W) 'strcmp.S'; else $(CYGPATH_W) '$(srcdir)/strcmp.S'; fi`
+
+lib_a-strcmp-archs.o: strcmp-archs.S
+ $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CCASFLAGS) $(CCASFLAGS) -c -o lib_a-strcmp-archs.o `test -f 'strcmp-archs.S' || echo '$(srcdir)/'`strcmp-archs.S
+
+lib_a-strcmp-archs.obj: strcmp-archs.S
+ $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CCASFLAGS) $(CCASFLAGS) -c -o lib_a-strcmp-archs.obj `if test -f 'strcmp-archs.S'; then $(CYGPATH_W) 'strcmp-archs.S'; else $(CYGPATH_W) '$(srcdir)/strcmp-archs.S'; fi`
+
+lib_a-strcpy.o: strcpy.S
+ $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CCASFLAGS) $(CCASFLAGS) -c -o lib_a-strcpy.o `test -f 'strcpy.S' || echo '$(srcdir)/'`strcpy.S
+
+lib_a-strcpy.obj: strcpy.S
+ $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CCASFLAGS) $(CCASFLAGS) -c -o lib_a-strcpy.obj `if test -f 'strcpy.S'; then $(CYGPATH_W) 'strcpy.S'; else $(CYGPATH_W) '$(srcdir)/strcpy.S'; fi`
+
+lib_a-strcpy-bs.o: strcpy-bs.S
+ $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CCASFLAGS) $(CCASFLAGS) -c -o lib_a-strcpy-bs.o `test -f 'strcpy-bs.S' || echo '$(srcdir)/'`strcpy-bs.S
+
+lib_a-strcpy-bs.obj: strcpy-bs.S
+ $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CCASFLAGS) $(CCASFLAGS) -c -o lib_a-strcpy-bs.obj `if test -f 'strcpy-bs.S'; then $(CYGPATH_W) 'strcpy-bs.S'; else $(CYGPATH_W) '$(srcdir)/strcpy-bs.S'; fi`
+
+lib_a-strcpy-bs-arc600.o: strcpy-bs-arc600.S
+ $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CCASFLAGS) $(CCASFLAGS) -c -o lib_a-strcpy-bs-arc600.o `test -f 'strcpy-bs-arc600.S' || echo '$(srcdir)/'`strcpy-bs-arc600.S
+
+lib_a-strcpy-bs-arc600.obj: strcpy-bs-arc600.S
+ $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CCASFLAGS) $(CCASFLAGS) -c -o lib_a-strcpy-bs-arc600.obj `if test -f 'strcpy-bs-arc600.S'; then $(CYGPATH_W) 'strcpy-bs-arc600.S'; else $(CYGPATH_W) '$(srcdir)/strcpy-bs-arc600.S'; fi`
+
+lib_a-strlen.o: strlen.S
+ $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CCASFLAGS) $(CCASFLAGS) -c -o lib_a-strlen.o `test -f 'strlen.S' || echo '$(srcdir)/'`strlen.S
+
+lib_a-strlen.obj: strlen.S
+ $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CCASFLAGS) $(CCASFLAGS) -c -o lib_a-strlen.obj `if test -f 'strlen.S'; then $(CYGPATH_W) 'strlen.S'; else $(CYGPATH_W) '$(srcdir)/strlen.S'; fi`
+
+lib_a-strlen-bs.o: strlen-bs.S
+ $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CCASFLAGS) $(CCASFLAGS) -c -o lib_a-strlen-bs.o `test -f 'strlen-bs.S' || echo '$(srcdir)/'`strlen-bs.S
+
+lib_a-strlen-bs.obj: strlen-bs.S
+ $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CCASFLAGS) $(CCASFLAGS) -c -o lib_a-strlen-bs.obj `if test -f 'strlen-bs.S'; then $(CYGPATH_W) 'strlen-bs.S'; else $(CYGPATH_W) '$(srcdir)/strlen-bs.S'; fi`
+
+lib_a-strlen-bs-norm.o: strlen-bs-norm.S
+ $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CCASFLAGS) $(CCASFLAGS) -c -o lib_a-strlen-bs-norm.o `test -f 'strlen-bs-norm.S' || echo '$(srcdir)/'`strlen-bs-norm.S
+
+lib_a-strlen-bs-norm.obj: strlen-bs-norm.S
+ $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CCASFLAGS) $(CCASFLAGS) -c -o lib_a-strlen-bs-norm.obj `if test -f 'strlen-bs-norm.S'; then $(CYGPATH_W) 'strlen-bs-norm.S'; else $(CYGPATH_W) '$(srcdir)/strlen-bs-norm.S'; fi`
+
+lib_a-strncpy.o: strncpy.S
+ $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CCASFLAGS) $(CCASFLAGS) -c -o lib_a-strncpy.o `test -f 'strncpy.S' || echo '$(srcdir)/'`strncpy.S
+
+lib_a-strncpy.obj: strncpy.S
+ $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CCASFLAGS) $(CCASFLAGS) -c -o lib_a-strncpy.obj `if test -f 'strncpy.S'; then $(CYGPATH_W) 'strncpy.S'; else $(CYGPATH_W) '$(srcdir)/strncpy.S'; fi`
+
+lib_a-strncpy-bs.o: strncpy-bs.S
+ $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CCASFLAGS) $(CCASFLAGS) -c -o lib_a-strncpy-bs.o `test -f 'strncpy-bs.S' || echo '$(srcdir)/'`strncpy-bs.S
+
+lib_a-strncpy-bs.obj: strncpy-bs.S
+ $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CCASFLAGS) $(CCASFLAGS) -c -o lib_a-strncpy-bs.obj `if test -f 'strncpy-bs.S'; then $(CYGPATH_W) 'strncpy-bs.S'; else $(CYGPATH_W) '$(srcdir)/strncpy-bs.S'; fi`
+
+.c.o:
+ $(COMPILE) -c $<
+
+.c.obj:
+ $(COMPILE) -c `$(CYGPATH_W) '$<'`
+
+lib_a-memcmp-stub.o: memcmp-stub.c
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-memcmp-stub.o `test -f 'memcmp-stub.c' || echo '$(srcdir)/'`memcmp-stub.c
+
+lib_a-memcmp-stub.obj: memcmp-stub.c
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-memcmp-stub.obj `if test -f 'memcmp-stub.c'; then $(CYGPATH_W) 'memcmp-stub.c'; else $(CYGPATH_W) '$(srcdir)/memcmp-stub.c'; fi`
+
+lib_a-memcpy-stub.o: memcpy-stub.c
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-memcpy-stub.o `test -f 'memcpy-stub.c' || echo '$(srcdir)/'`memcpy-stub.c
+
+lib_a-memcpy-stub.obj: memcpy-stub.c
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-memcpy-stub.obj `if test -f 'memcpy-stub.c'; then $(CYGPATH_W) 'memcpy-stub.c'; else $(CYGPATH_W) '$(srcdir)/memcpy-stub.c'; fi`
+
+lib_a-memset-stub.o: memset-stub.c
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-memset-stub.o `test -f 'memset-stub.c' || echo '$(srcdir)/'`memset-stub.c
+
+lib_a-memset-stub.obj: memset-stub.c
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-memset-stub.obj `if test -f 'memset-stub.c'; then $(CYGPATH_W) 'memset-stub.c'; else $(CYGPATH_W) '$(srcdir)/memset-stub.c'; fi`
+
+lib_a-strchr-stub.o: strchr-stub.c
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-strchr-stub.o `test -f 'strchr-stub.c' || echo '$(srcdir)/'`strchr-stub.c
+
+lib_a-strchr-stub.obj: strchr-stub.c
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-strchr-stub.obj `if test -f 'strchr-stub.c'; then $(CYGPATH_W) 'strchr-stub.c'; else $(CYGPATH_W) '$(srcdir)/strchr-stub.c'; fi`
+
+lib_a-strcmp-stub.o: strcmp-stub.c
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-strcmp-stub.o `test -f 'strcmp-stub.c' || echo '$(srcdir)/'`strcmp-stub.c
+
+lib_a-strcmp-stub.obj: strcmp-stub.c
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-strcmp-stub.obj `if test -f 'strcmp-stub.c'; then $(CYGPATH_W) 'strcmp-stub.c'; else $(CYGPATH_W) '$(srcdir)/strcmp-stub.c'; fi`
+
+lib_a-strcpy-stub.o: strcpy-stub.c
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-strcpy-stub.o `test -f 'strcpy-stub.c' || echo '$(srcdir)/'`strcpy-stub.c
+
+lib_a-strcpy-stub.obj: strcpy-stub.c
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-strcpy-stub.obj `if test -f 'strcpy-stub.c'; then $(CYGPATH_W) 'strcpy-stub.c'; else $(CYGPATH_W) '$(srcdir)/strcpy-stub.c'; fi`
+
+lib_a-strlen-stub.o: strlen-stub.c
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-strlen-stub.o `test -f 'strlen-stub.c' || echo '$(srcdir)/'`strlen-stub.c
+
+lib_a-strlen-stub.obj: strlen-stub.c
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-strlen-stub.obj `if test -f 'strlen-stub.c'; then $(CYGPATH_W) 'strlen-stub.c'; else $(CYGPATH_W) '$(srcdir)/strlen-stub.c'; fi`
+
+lib_a-strncpy-stub.o: strncpy-stub.c
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-strncpy-stub.o `test -f 'strncpy-stub.c' || echo '$(srcdir)/'`strncpy-stub.c
+
+lib_a-strncpy-stub.obj: strncpy-stub.c
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-strncpy-stub.obj `if test -f 'strncpy-stub.c'; then $(CYGPATH_W) 'strncpy-stub.c'; else $(CYGPATH_W) '$(srcdir)/strncpy-stub.c'; fi`
+
+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; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ mkid -fID $$unique
+tags: TAGS
+
+TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ set x; \
+ 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; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ shift; \
+ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
+ test -n "$$unique" || unique=$$empty_fix; \
+ if test $$# -gt 0; then \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ "$$@" $$unique; \
+ else \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ $$unique; \
+ fi; \
+ fi
+ctags: CTAGS
+CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ 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; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ test -z "$(CTAGS_ARGS)$$unique" \
+ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+ $$unique
+
+GTAGS:
+ here=`$(am__cd) $(top_builddir) && pwd` \
+ && $(am__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)
+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:
+ if test -z '$(STRIP)'; then \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ install; \
+ else \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
+ fi
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+ -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+ -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_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-noinstLIBRARIES mostlyclean-am
+
+distclean: distclean-am
+ -rm -f $(am__CONFIG_DISTCLEAN_FILES)
+ -rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+ distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+html-am:
+
+info: info-am
+
+info-am:
+
+install-data-am:
+
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
+install-exec-am:
+
+install-html: install-html-am
+
+install-html-am:
+
+install-info: install-info-am
+
+install-info-am:
+
+install-man:
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+ -rm -f $(am__CONFIG_DISTCLEAN_FILES)
+ -rm -rf $(top_srcdir)/autom4te.cache
+ -rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am:
+
+.MAKE: install-am install-strip
+
+.PHONY: CTAGS GTAGS all all-am am--refresh check check-am clean \
+ clean-generic clean-noinstLIBRARIES ctags distclean \
+ distclean-compile distclean-generic distclean-tags dvi dvi-am \
+ html html-am info info-am install install-am install-data \
+ install-data-am install-dvi install-dvi-am install-exec \
+ install-exec-am install-html install-html-am install-info \
+ install-info-am install-man install-pdf install-pdf-am \
+ install-ps install-ps-am install-strip installcheck \
+ installcheck-am installdirs maintainer-clean \
+ maintainer-clean-generic mostlyclean mostlyclean-compile \
+ mostlyclean-generic pdf pdf-am ps ps-am tags uninstall \
+ uninstall-am
+
+
+pdf:
+install-pdf:
+
+# 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/sys/arc/aclocal.m4 b/newlib/libc/machine/arc/aclocal.m4
index 18dab02aa..18dab02aa 100644
--- a/newlib/libc/sys/arc/aclocal.m4
+++ b/newlib/libc/machine/arc/aclocal.m4
diff --git a/newlib/libc/machine/arc/asm.h b/newlib/libc/machine/arc/asm.h
new file mode 100644
index 000000000..663197ce5
--- /dev/null
+++ b/newlib/libc/machine/arc/asm.h
@@ -0,0 +1,82 @@
+#ifndef ARC_NEWLIB_ASM_H
+#define ARC_NEWLIB_ASM_H
+
+/*
+ Copyright (c) 2015, Synopsys, Inc. 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) Neither the name of the Synopsys, Inc., 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 HOLDER 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.
+*/
+
+
+#define _ENTRY(name) \
+ .text ` .balign 4 ` .globl name ` name:
+#define FUNC(name) .type name,@function
+#define ENDFUNC0(name) .Lfe_##name: .size name,.Lfe_##name-name
+#define ENDFUNC(name) ENDFUNC0 (name)
+#define ENTRY(name) _ENTRY (name) ` FUNC (name)
+
+#define add_l add
+#define bcc_l bcc
+#define bclr_l bclr
+#define beq_l beq
+#define bic_l bic
+#define b_l b
+#define bne_l bne
+#define breq_l breq
+#define brne_l brne
+#define j_l j
+#define ldb_l ldb
+#define ld_l ld
+#define mov_l mov
+#define or_l or
+#define st_l st
+#define stb_l stb
+#define sub_l sub
+#define tst_l tst
+#define extb_l extb
+
+#define bcc_s bhs_s
+
+/* Compatibility with older ARC GCC, that doesn't provide some of the
+ preprocessor defines used by newlib for ARC. */
+#if defined (__Xbarrel_shifter) && !defined (__ARC_BARREL_SHIFTER__)
+#define __ARC_BARREL_SHIFTER__ 1
+#endif
+
+#if defined (__EM__) && !defined (__ARCEM__)
+#define __ARCEM__ 1
+#endif
+
+#if defined (__HS__) && !defined (__ARCHS__)
+#define __ARCHS__ 1
+#endif
+
+#if defined (__LL64__) && !defined (__ARC_LL64__)
+#define __ARC_LL64__ 1
+#endif
+
+#endif /* ARC_NEWLIB_ASM_H */
diff --git a/newlib/libc/machine/arc/configure b/newlib/libc/machine/arc/configure
new file mode 100755
index 000000000..bc041896f
--- /dev/null
+++ b/newlib/libc/machine/arc/configure
@@ -0,0 +1,4748 @@
+#! /bin/sh
+# Guess values for system-dependent variables and create Makefiles.
+# Generated by GNU Autoconf 2.68 for newlib 2.4.0.
+#
+#
+# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
+# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software
+# Foundation, Inc.
+#
+#
+# This configure script is free software; the Free Software Foundation
+# gives unlimited permission to copy, distribute and modify it.
+## -------------------- ##
+## M4sh Initialization. ##
+## -------------------- ##
+
+# Be more Bourne compatible
+DUALCASE=1; export DUALCASE # for MKS sh
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
+ emulate sh
+ NULLCMD=:
+ # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
+ # is contrary to our usage. Disable this feature.
+ alias -g '${1+"$@"}'='"$@"'
+ setopt NO_GLOB_SUBST
+else
+ case `(set -o) 2>/dev/null` in #(
+ *posix*) :
+ set -o posix ;; #(
+ *) :
+ ;;
+esac
+fi
+
+
+as_nl='
+'
+export as_nl
+# Printing a long string crashes Solaris 7 /usr/bin/printf.
+as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
+as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
+as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
+# Prefer a ksh shell builtin over an external printf program on Solaris,
+# but without wasting forks for bash or zsh.
+if test -z "$BASH_VERSION$ZSH_VERSION" \
+ && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
+ as_echo='print -r --'
+ as_echo_n='print -rn --'
+elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
+ as_echo='printf %s\n'
+ as_echo_n='printf %s'
+else
+ if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
+ as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
+ as_echo_n='/usr/ucb/echo -n'
+ else
+ as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
+ as_echo_n_body='eval
+ arg=$1;
+ case $arg in #(
+ *"$as_nl"*)
+ expr "X$arg" : "X\\(.*\\)$as_nl";
+ arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
+ esac;
+ expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
+ '
+ export as_echo_n_body
+ as_echo_n='sh -c $as_echo_n_body as_echo'
+ fi
+ export as_echo_body
+ as_echo='sh -c $as_echo_body as_echo'
+fi
+
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+ PATH_SEPARATOR=:
+ (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
+ (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
+ PATH_SEPARATOR=';'
+ }
+fi
+
+
+# IFS
+# We need space, tab and new line, in precisely that order. Quoting is
+# there to prevent editors from complaining about space-tab.
+# (If _AS_PATH_WALK were called with IFS unset, it would disable word
+# splitting by setting IFS to empty value.)
+IFS=" "" $as_nl"
+
+# Find who we are. Look in the path if we contain no directory separator.
+as_myself=
+case $0 in #((
+ *[\\/]* ) as_myself=$0 ;;
+ *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
+ done
+IFS=$as_save_IFS
+
+ ;;
+esac
+# We did not find ourselves, most probably we were run as `sh COMMAND'
+# in which case we are not to be found in the path.
+if test "x$as_myself" = x; then
+ as_myself=$0
+fi
+if test ! -f "$as_myself"; then
+ $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
+ exit 1
+fi
+
+# Unset variables that we do not need and which cause bugs (e.g. in
+# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
+# suppresses any "Segmentation fault" message there. '((' could
+# trigger a bug in pdksh 5.2.14.
+for as_var in BASH_ENV ENV MAIL MAILPATH
+do eval test x\${$as_var+set} = xset \
+ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
+done
+PS1='$ '
+PS2='> '
+PS4='+ '
+
+# NLS nuisances.
+LC_ALL=C
+export LC_ALL
+LANGUAGE=C
+export LANGUAGE
+
+# CDPATH.
+(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
+
+if test "x$CONFIG_SHELL" = x; then
+ as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
+ emulate sh
+ NULLCMD=:
+ # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
+ # is contrary to our usage. Disable this feature.
+ alias -g '\${1+\"\$@\"}'='\"\$@\"'
+ setopt NO_GLOB_SUBST
+else
+ case \`(set -o) 2>/dev/null\` in #(
+ *posix*) :
+ set -o posix ;; #(
+ *) :
+ ;;
+esac
+fi
+"
+ as_required="as_fn_return () { (exit \$1); }
+as_fn_success () { as_fn_return 0; }
+as_fn_failure () { as_fn_return 1; }
+as_fn_ret_success () { return 0; }
+as_fn_ret_failure () { return 1; }
+
+exitcode=0
+as_fn_success || { exitcode=1; echo as_fn_success failed.; }
+as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
+as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
+as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
+if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
+
+else
+ exitcode=1; echo positional parameters were not saved.
+fi
+test x\$exitcode = x0 || exit 1"
+ as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
+ as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
+ eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
+ test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1"
+ if (eval "$as_required") 2>/dev/null; then :
+ as_have_required=yes
+else
+ as_have_required=no
+fi
+ if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
+
+else
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+as_found=false
+for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ as_found=:
+ case $as_dir in #(
+ /*)
+ for as_base in sh bash ksh sh5; do
+ # Try only shells that exist, to save several forks.
+ as_shell=$as_dir/$as_base
+ if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
+ { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
+ CONFIG_SHELL=$as_shell as_have_required=yes
+ if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
+ break 2
+fi
+fi
+ done;;
+ esac
+ as_found=false
+done
+$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
+ { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
+ CONFIG_SHELL=$SHELL as_have_required=yes
+fi; }
+IFS=$as_save_IFS
+
+
+ if test "x$CONFIG_SHELL" != x; then :
+ # We cannot yet assume a decent shell, so we have to provide a
+ # neutralization value for shells without unset; and this also
+ # works around shells that cannot unset nonexistent variables.
+ # Preserve -v and -x to the replacement shell.
+ BASH_ENV=/dev/null
+ ENV=/dev/null
+ (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
+ export CONFIG_SHELL
+ case $- in # ((((
+ *v*x* | *x*v* ) as_opts=-vx ;;
+ *v* ) as_opts=-v ;;
+ *x* ) as_opts=-x ;;
+ * ) as_opts= ;;
+ esac
+ exec "$CONFIG_SHELL" $as_opts "$as_myself" ${1+"$@"}
+fi
+
+ if test x$as_have_required = xno; then :
+ $as_echo "$0: This script requires a shell more modern than all"
+ $as_echo "$0: the shells that I found on your system."
+ if test x${ZSH_VERSION+set} = xset ; then
+ $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
+ $as_echo "$0: be upgraded to zsh 4.3.4 or later."
+ else
+ $as_echo "$0: Please tell bug-autoconf@gnu.org about your system,
+$0: including any error possibly output before this
+$0: message. Then install a modern shell, or manually run
+$0: the script under such a shell if you do have one."
+ fi
+ exit 1
+fi
+fi
+fi
+SHELL=${CONFIG_SHELL-/bin/sh}
+export SHELL
+# Unset more variables known to interfere with behavior of common tools.
+CLICOLOR_FORCE= GREP_OPTIONS=
+unset CLICOLOR_FORCE GREP_OPTIONS
+
+## --------------------- ##
+## M4sh Shell Functions. ##
+## --------------------- ##
+# as_fn_unset VAR
+# ---------------
+# Portably unset VAR.
+as_fn_unset ()
+{
+ { eval $1=; unset $1;}
+}
+as_unset=as_fn_unset
+
+# as_fn_set_status STATUS
+# -----------------------
+# Set $? to STATUS, without forking.
+as_fn_set_status ()
+{
+ return $1
+} # as_fn_set_status
+
+# as_fn_exit STATUS
+# -----------------
+# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
+as_fn_exit ()
+{
+ set +e
+ as_fn_set_status $1
+ exit $1
+} # as_fn_exit
+
+# as_fn_mkdir_p
+# -------------
+# Create "$as_dir" as a directory, including parents if necessary.
+as_fn_mkdir_p ()
+{
+
+ case $as_dir in #(
+ -*) as_dir=./$as_dir;;
+ esac
+ test -d "$as_dir" || eval $as_mkdir_p || {
+ as_dirs=
+ while :; do
+ case $as_dir in #(
+ *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
+ *) as_qdir=$as_dir;;
+ esac
+ as_dirs="'$as_qdir' $as_dirs"
+ as_dir=`$as_dirname -- "$as_dir" ||
+$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$as_dir" : 'X\(//\)[^/]' \| \
+ X"$as_dir" : 'X\(//\)$' \| \
+ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$as_dir" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)[^/].*/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+ test -d "$as_dir" && break
+ done
+ test -z "$as_dirs" || eval "mkdir $as_dirs"
+ } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
+
+
+} # as_fn_mkdir_p
+# as_fn_append VAR VALUE
+# ----------------------
+# Append the text in VALUE to the end of the definition contained in VAR. Take
+# advantage of any shell optimizations that allow amortized linear growth over
+# repeated appends, instead of the typical quadratic growth present in naive
+# implementations.
+if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
+ eval 'as_fn_append ()
+ {
+ eval $1+=\$2
+ }'
+else
+ as_fn_append ()
+ {
+ eval $1=\$$1\$2
+ }
+fi # as_fn_append
+
+# as_fn_arith ARG...
+# ------------------
+# Perform arithmetic evaluation on the ARGs, and store the result in the
+# global $as_val. Take advantage of shells that can avoid forks. The arguments
+# must be portable across $(()) and expr.
+if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
+ eval 'as_fn_arith ()
+ {
+ as_val=$(( $* ))
+ }'
+else
+ as_fn_arith ()
+ {
+ as_val=`expr "$@" || test $? -eq 1`
+ }
+fi # as_fn_arith
+
+
+# as_fn_error STATUS ERROR [LINENO LOG_FD]
+# ----------------------------------------
+# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
+# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
+# script with STATUS, using 1 if that was 0.
+as_fn_error ()
+{
+ as_status=$1; test $as_status -eq 0 && as_status=1
+ if test "$4"; then
+ as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
+ fi
+ $as_echo "$as_me: error: $2" >&2
+ as_fn_exit $as_status
+} # as_fn_error
+
+if expr a : '\(a\)' >/dev/null 2>&1 &&
+ test "X`expr 00001 : '.*\(...\)'`" = X001; then
+ as_expr=expr
+else
+ as_expr=false
+fi
+
+if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
+ as_basename=basename
+else
+ as_basename=false
+fi
+
+if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
+ as_dirname=dirname
+else
+ as_dirname=false
+fi
+
+as_me=`$as_basename -- "$0" ||
+$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
+ X"$0" : 'X\(//\)$' \| \
+ X"$0" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X/"$0" |
+ sed '/^.*\/\([^/][^/]*\)\/*$/{
+ s//\1/
+ q
+ }
+ /^X\/\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\/\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+
+# Avoid depending upon Character Ranges.
+as_cr_letters='abcdefghijklmnopqrstuvwxyz'
+as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
+as_cr_Letters=$as_cr_letters$as_cr_LETTERS
+as_cr_digits='0123456789'
+as_cr_alnum=$as_cr_Letters$as_cr_digits
+
+
+ as_lineno_1=$LINENO as_lineno_1a=$LINENO
+ as_lineno_2=$LINENO as_lineno_2a=$LINENO
+ eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
+ test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
+ # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-)
+ sed -n '
+ p
+ /[$]LINENO/=
+ ' <$as_myself |
+ sed '
+ s/[$]LINENO.*/&-/
+ t lineno
+ b
+ :lineno
+ N
+ :loop
+ s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
+ t loop
+ s/-\n.*//
+ ' >$as_me.lineno &&
+ chmod +x "$as_me.lineno" ||
+ { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
+
+ # Don't try to exec as it changes $[0], causing all sort of problems
+ # (the dirname of $[0] is not the place where we might find the
+ # original and so on. Autoconf is especially sensitive to this).
+ . "./$as_me.lineno"
+ # Exit status is that of the last command.
+ exit
+}
+
+ECHO_C= ECHO_N= ECHO_T=
+case `echo -n x` in #(((((
+-n*)
+ case `echo 'xy\c'` in
+ *c*) ECHO_T=' ';; # ECHO_T is single tab character.
+ xy) ECHO_C='\c';;
+ *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
+ ECHO_T=' ';;
+ esac;;
+*)
+ ECHO_N='-n';;
+esac
+
+rm -f conf$$ conf$$.exe conf$$.file
+if test -d conf$$.dir; then
+ rm -f conf$$.dir/conf$$.file
+else
+ rm -f conf$$.dir
+ mkdir conf$$.dir 2>/dev/null
+fi
+if (echo >conf$$.file) 2>/dev/null; then
+ if ln -s conf$$.file conf$$ 2>/dev/null; then
+ as_ln_s='ln -s'
+ # ... but there are two gotchas:
+ # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
+ # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
+ # In both cases, we have to default to `cp -p'.
+ ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
+ as_ln_s='cp -p'
+ elif ln conf$$.file conf$$ 2>/dev/null; then
+ as_ln_s=ln
+ else
+ as_ln_s='cp -p'
+ fi
+else
+ as_ln_s='cp -p'
+fi
+rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
+rmdir conf$$.dir 2>/dev/null
+
+if mkdir -p . 2>/dev/null; then
+ as_mkdir_p='mkdir -p "$as_dir"'
+else
+ test -d ./-p && rmdir ./-p
+ as_mkdir_p=false
+fi
+
+if test -x / >/dev/null 2>&1; then
+ as_test_x='test -x'
+else
+ if ls -dL / >/dev/null 2>&1; then
+ as_ls_L_option=L
+ else
+ as_ls_L_option=
+ fi
+ as_test_x='
+ eval sh -c '\''
+ if test -d "$1"; then
+ test -d "$1/.";
+ else
+ case $1 in #(
+ -*)set "./$1";;
+ esac;
+ case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
+ ???[sx]*):;;*)false;;esac;fi
+ '\'' sh
+ '
+fi
+as_executable_p=$as_test_x
+
+# Sed expression to map a string onto a valid CPP name.
+as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
+
+# Sed expression to map a string onto a valid variable name.
+as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
+
+
+test -n "$DJDIR" || exec 7<&0 </dev/null
+exec 6>&1
+
+# Name of the host.
+# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
+# so uname gets run too.
+ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
+
+#
+# Initializations.
+#
+ac_default_prefix=/usr/local
+ac_clean_files=
+ac_config_libobj_dir=.
+LIBOBJS=
+cross_compiling=no
+subdirs=
+MFLAGS=
+MAKEFLAGS=
+
+# Identity of this package.
+PACKAGE_NAME='newlib'
+PACKAGE_TARNAME='newlib'
+PACKAGE_VERSION='2.4.0'
+PACKAGE_STRING='newlib 2.4.0'
+PACKAGE_BUGREPORT=''
+PACKAGE_URL=''
+
+ac_unique_file="Makefile.am"
+ac_subst_vars='LTLIBOBJS
+LIBOBJS
+sys_dir
+machine_dir
+libm_machine_dir
+lpfx
+aext
+oext
+OBJEXT
+USE_LIBTOOL_FALSE
+USE_LIBTOOL_TRUE
+ELIX_LEVEL_4_FALSE
+ELIX_LEVEL_4_TRUE
+ELIX_LEVEL_3_FALSE
+ELIX_LEVEL_3_TRUE
+ELIX_LEVEL_2_FALSE
+ELIX_LEVEL_2_TRUE
+ELIX_LEVEL_1_FALSE
+ELIX_LEVEL_1_TRUE
+ELIX_LEVEL_0_FALSE
+ELIX_LEVEL_0_TRUE
+LDFLAGS
+NO_INCLUDE_LIST
+NEWLIB_CFLAGS
+CCASFLAGS
+CCAS
+MAINT
+MAINTAINER_MODE_FALSE
+MAINTAINER_MODE_TRUE
+READELF
+RANLIB
+AR
+AS
+am__fastdepCC_FALSE
+am__fastdepCC_TRUE
+CCDEPMODE
+am__nodep
+AMDEPBACKSLASH
+AMDEP_FALSE
+AMDEP_TRUE
+am__quote
+am__include
+DEPDIR
+CC
+am__untar
+am__tar
+AMTAR
+am__leading_dot
+SET_MAKE
+AWK
+mkdir_p
+MKDIR_P
+INSTALL_STRIP_PROGRAM
+STRIP
+install_sh
+MAKEINFO
+AUTOHEADER
+AUTOMAKE
+AUTOCONF
+ACLOCAL
+VERSION
+PACKAGE
+CYGPATH_W
+am__isrc
+INSTALL_DATA
+INSTALL_SCRIPT
+INSTALL_PROGRAM
+host_os
+host_vendor
+host_cpu
+host
+build_os
+build_vendor
+build_cpu
+build
+newlib_basedir
+MAY_SUPPLY_SYSCALLS_FALSE
+MAY_SUPPLY_SYSCALLS_TRUE
+target_alias
+host_alias
+build_alias
+LIBS
+ECHO_T
+ECHO_N
+ECHO_C
+DEFS
+mandir
+localedir
+libdir
+psdir
+pdfdir
+dvidir
+htmldir
+infodir
+docdir
+oldincludedir
+includedir
+localstatedir
+sharedstatedir
+sysconfdir
+datadir
+datarootdir
+libexecdir
+sbindir
+bindir
+program_transform_name
+prefix
+exec_prefix
+PACKAGE_URL
+PACKAGE_BUGREPORT
+PACKAGE_STRING
+PACKAGE_VERSION
+PACKAGE_TARNAME
+PACKAGE_NAME
+PATH_SEPARATOR
+SHELL'
+ac_subst_files=''
+ac_user_opts='
+enable_option_checking
+enable_multilib
+enable_target_optspace
+enable_malloc_debugging
+enable_newlib_multithread
+enable_newlib_iconv
+enable_newlib_elix_level
+enable_newlib_io_float
+enable_newlib_supplied_syscalls
+enable_dependency_tracking
+enable_maintainer_mode
+'
+ ac_precious_vars='build_alias
+host_alias
+target_alias
+CCAS
+CCASFLAGS'
+
+
+# Initialize some variables set by options.
+ac_init_help=
+ac_init_version=false
+ac_unrecognized_opts=
+ac_unrecognized_sep=
+# The variables have the same names as the options, with
+# dashes changed to underlines.
+cache_file=/dev/null
+exec_prefix=NONE
+no_create=
+no_recursion=
+prefix=NONE
+program_prefix=NONE
+program_suffix=NONE
+program_transform_name=s,x,x,
+silent=
+site=
+srcdir=
+verbose=
+x_includes=NONE
+x_libraries=NONE
+
+# Installation directory options.
+# These are left unexpanded so users can "make install exec_prefix=/foo"
+# and all the variables that are supposed to be based on exec_prefix
+# by default will actually change.
+# Use braces instead of parens because sh, perl, etc. also accept them.
+# (The list follows the same order as the GNU Coding Standards.)
+bindir='${exec_prefix}/bin'
+sbindir='${exec_prefix}/sbin'
+libexecdir='${exec_prefix}/libexec'
+datarootdir='${prefix}/share'
+datadir='${datarootdir}'
+sysconfdir='${prefix}/etc'
+sharedstatedir='${prefix}/com'
+localstatedir='${prefix}/var'
+includedir='${prefix}/include'
+oldincludedir='/usr/include'
+docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
+infodir='${datarootdir}/info'
+htmldir='${docdir}'
+dvidir='${docdir}'
+pdfdir='${docdir}'
+psdir='${docdir}'
+libdir='${exec_prefix}/lib'
+localedir='${datarootdir}/locale'
+mandir='${datarootdir}/man'
+
+ac_prev=
+ac_dashdash=
+for ac_option
+do
+ # If the previous option needs an argument, assign it.
+ if test -n "$ac_prev"; then
+ eval $ac_prev=\$ac_option
+ ac_prev=
+ continue
+ fi
+
+ case $ac_option in
+ *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
+ *=) ac_optarg= ;;
+ *) ac_optarg=yes ;;
+ esac
+
+ # Accept the important Cygnus configure options, so we can diagnose typos.
+
+ case $ac_dashdash$ac_option in
+ --)
+ ac_dashdash=yes ;;
+
+ -bindir | --bindir | --bindi | --bind | --bin | --bi)
+ ac_prev=bindir ;;
+ -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
+ bindir=$ac_optarg ;;
+
+ -build | --build | --buil | --bui | --bu)
+ ac_prev=build_alias ;;
+ -build=* | --build=* | --buil=* | --bui=* | --bu=*)
+ build_alias=$ac_optarg ;;
+
+ -cache-file | --cache-file | --cache-fil | --cache-fi \
+ | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
+ ac_prev=cache_file ;;
+ -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
+ | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
+ cache_file=$ac_optarg ;;
+
+ --config-cache | -C)
+ cache_file=config.cache ;;
+
+ -datadir | --datadir | --datadi | --datad)
+ ac_prev=datadir ;;
+ -datadir=* | --datadir=* | --datadi=* | --datad=*)
+ datadir=$ac_optarg ;;
+
+ -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
+ | --dataroo | --dataro | --datar)
+ ac_prev=datarootdir ;;
+ -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
+ | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
+ datarootdir=$ac_optarg ;;
+
+ -disable-* | --disable-*)
+ ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
+ # Reject names that are not valid shell variable names.
+ expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
+ as_fn_error $? "invalid feature name: $ac_useropt"
+ ac_useropt_orig=$ac_useropt
+ ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
+ case $ac_user_opts in
+ *"
+"enable_$ac_useropt"
+"*) ;;
+ *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
+ ac_unrecognized_sep=', ';;
+ esac
+ eval enable_$ac_useropt=no ;;
+
+ -docdir | --docdir | --docdi | --doc | --do)
+ ac_prev=docdir ;;
+ -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
+ docdir=$ac_optarg ;;
+
+ -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
+ ac_prev=dvidir ;;
+ -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
+ dvidir=$ac_optarg ;;
+
+ -enable-* | --enable-*)
+ ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
+ # Reject names that are not valid shell variable names.
+ expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
+ as_fn_error $? "invalid feature name: $ac_useropt"
+ ac_useropt_orig=$ac_useropt
+ ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
+ case $ac_user_opts in
+ *"
+"enable_$ac_useropt"
+"*) ;;
+ *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
+ ac_unrecognized_sep=', ';;
+ esac
+ eval enable_$ac_useropt=\$ac_optarg ;;
+
+ -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
+ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
+ | --exec | --exe | --ex)
+ ac_prev=exec_prefix ;;
+ -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
+ | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
+ | --exec=* | --exe=* | --ex=*)
+ exec_prefix=$ac_optarg ;;
+
+ -gas | --gas | --ga | --g)
+ # Obsolete; use --with-gas.
+ with_gas=yes ;;
+
+ -help | --help | --hel | --he | -h)
+ ac_init_help=long ;;
+ -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
+ ac_init_help=recursive ;;
+ -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
+ ac_init_help=short ;;
+
+ -host | --host | --hos | --ho)
+ ac_prev=host_alias ;;
+ -host=* | --host=* | --hos=* | --ho=*)
+ host_alias=$ac_optarg ;;
+
+ -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
+ ac_prev=htmldir ;;
+ -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
+ | --ht=*)
+ htmldir=$ac_optarg ;;
+
+ -includedir | --includedir | --includedi | --included | --include \
+ | --includ | --inclu | --incl | --inc)
+ ac_prev=includedir ;;
+ -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
+ | --includ=* | --inclu=* | --incl=* | --inc=*)
+ includedir=$ac_optarg ;;
+
+ -infodir | --infodir | --infodi | --infod | --info | --inf)
+ ac_prev=infodir ;;
+ -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
+ infodir=$ac_optarg ;;
+
+ -libdir | --libdir | --libdi | --libd)
+ ac_prev=libdir ;;
+ -libdir=* | --libdir=* | --libdi=* | --libd=*)
+ libdir=$ac_optarg ;;
+
+ -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
+ | --libexe | --libex | --libe)
+ ac_prev=libexecdir ;;
+ -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
+ | --libexe=* | --libex=* | --libe=*)
+ libexecdir=$ac_optarg ;;
+
+ -localedir | --localedir | --localedi | --localed | --locale)
+ ac_prev=localedir ;;
+ -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
+ localedir=$ac_optarg ;;
+
+ -localstatedir | --localstatedir | --localstatedi | --localstated \
+ | --localstate | --localstat | --localsta | --localst | --locals)
+ ac_prev=localstatedir ;;
+ -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
+ | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
+ localstatedir=$ac_optarg ;;
+
+ -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
+ ac_prev=mandir ;;
+ -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
+ mandir=$ac_optarg ;;
+
+ -nfp | --nfp | --nf)
+ # Obsolete; use --without-fp.
+ with_fp=no ;;
+
+ -no-create | --no-create | --no-creat | --no-crea | --no-cre \
+ | --no-cr | --no-c | -n)
+ no_create=yes ;;
+
+ -no-recursion | --no-recursion | --no-recursio | --no-recursi \
+ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
+ no_recursion=yes ;;
+
+ -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
+ | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
+ | --oldin | --oldi | --old | --ol | --o)
+ ac_prev=oldincludedir ;;
+ -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
+ | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
+ | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
+ oldincludedir=$ac_optarg ;;
+
+ -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
+ ac_prev=prefix ;;
+ -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
+ prefix=$ac_optarg ;;
+
+ -program-prefix | --program-prefix | --program-prefi | --program-pref \
+ | --program-pre | --program-pr | --program-p)
+ ac_prev=program_prefix ;;
+ -program-prefix=* | --program-prefix=* | --program-prefi=* \
+ | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
+ program_prefix=$ac_optarg ;;
+
+ -program-suffix | --program-suffix | --program-suffi | --program-suff \
+ | --program-suf | --program-su | --program-s)
+ ac_prev=program_suffix ;;
+ -program-suffix=* | --program-suffix=* | --program-suffi=* \
+ | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
+ program_suffix=$ac_optarg ;;
+
+ -program-transform-name | --program-transform-name \
+ | --program-transform-nam | --program-transform-na \
+ | --program-transform-n | --program-transform- \
+ | --program-transform | --program-transfor \
+ | --program-transfo | --program-transf \
+ | --program-trans | --program-tran \
+ | --progr-tra | --program-tr | --program-t)
+ ac_prev=program_transform_name ;;
+ -program-transform-name=* | --program-transform-name=* \
+ | --program-transform-nam=* | --program-transform-na=* \
+ | --program-transform-n=* | --program-transform-=* \
+ | --program-transform=* | --program-transfor=* \
+ | --program-transfo=* | --program-transf=* \
+ | --program-trans=* | --program-tran=* \
+ | --progr-tra=* | --program-tr=* | --program-t=*)
+ program_transform_name=$ac_optarg ;;
+
+ -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
+ ac_prev=pdfdir ;;
+ -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
+ pdfdir=$ac_optarg ;;
+
+ -psdir | --psdir | --psdi | --psd | --ps)
+ ac_prev=psdir ;;
+ -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
+ psdir=$ac_optarg ;;
+
+ -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+ | -silent | --silent | --silen | --sile | --sil)
+ silent=yes ;;
+
+ -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
+ ac_prev=sbindir ;;
+ -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
+ | --sbi=* | --sb=*)
+ sbindir=$ac_optarg ;;
+
+ -sharedstatedir | --sharedstatedir | --sharedstatedi \
+ | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
+ | --sharedst | --shareds | --shared | --share | --shar \
+ | --sha | --sh)
+ ac_prev=sharedstatedir ;;
+ -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
+ | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
+ | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
+ | --sha=* | --sh=*)
+ sharedstatedir=$ac_optarg ;;
+
+ -site | --site | --sit)
+ ac_prev=site ;;
+ -site=* | --site=* | --sit=*)
+ site=$ac_optarg ;;
+
+ -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
+ ac_prev=srcdir ;;
+ -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
+ srcdir=$ac_optarg ;;
+
+ -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
+ | --syscon | --sysco | --sysc | --sys | --sy)
+ ac_prev=sysconfdir ;;
+ -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
+ | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
+ sysconfdir=$ac_optarg ;;
+
+ -target | --target | --targe | --targ | --tar | --ta | --t)
+ ac_prev=target_alias ;;
+ -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
+ target_alias=$ac_optarg ;;
+
+ -v | -verbose | --verbose | --verbos | --verbo | --verb)
+ verbose=yes ;;
+
+ -version | --version | --versio | --versi | --vers | -V)
+ ac_init_version=: ;;
+
+ -with-* | --with-*)
+ ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
+ # Reject names that are not valid shell variable names.
+ expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
+ as_fn_error $? "invalid package name: $ac_useropt"
+ ac_useropt_orig=$ac_useropt
+ ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
+ case $ac_user_opts in
+ *"
+"with_$ac_useropt"
+"*) ;;
+ *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
+ ac_unrecognized_sep=', ';;
+ esac
+ eval with_$ac_useropt=\$ac_optarg ;;
+
+ -without-* | --without-*)
+ ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
+ # Reject names that are not valid shell variable names.
+ expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
+ as_fn_error $? "invalid package name: $ac_useropt"
+ ac_useropt_orig=$ac_useropt
+ ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
+ case $ac_user_opts in
+ *"
+"with_$ac_useropt"
+"*) ;;
+ *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
+ ac_unrecognized_sep=', ';;
+ esac
+ eval with_$ac_useropt=no ;;
+
+ --x)
+ # Obsolete; use --with-x.
+ with_x=yes ;;
+
+ -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
+ | --x-incl | --x-inc | --x-in | --x-i)
+ ac_prev=x_includes ;;
+ -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
+ | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
+ x_includes=$ac_optarg ;;
+
+ -x-libraries | --x-libraries | --x-librarie | --x-librari \
+ | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
+ ac_prev=x_libraries ;;
+ -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
+ | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
+ x_libraries=$ac_optarg ;;
+
+ -*) as_fn_error $? "unrecognized option: \`$ac_option'
+Try \`$0 --help' for more information"
+ ;;
+
+ *=*)
+ ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
+ # Reject names that are not valid shell variable names.
+ case $ac_envvar in #(
+ '' | [0-9]* | *[!_$as_cr_alnum]* )
+ as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
+ esac
+ eval $ac_envvar=\$ac_optarg
+ export $ac_envvar ;;
+
+ *)
+ # FIXME: should be removed in autoconf 3.0.
+ $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
+ expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
+ $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
+ : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
+ ;;
+
+ esac
+done
+
+if test -n "$ac_prev"; then
+ ac_option=--`echo $ac_prev | sed 's/_/-/g'`
+ as_fn_error $? "missing argument to $ac_option"
+fi
+
+if test -n "$ac_unrecognized_opts"; then
+ case $enable_option_checking in
+ no) ;;
+ fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
+ *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
+ esac
+fi
+
+# Check all directory arguments for consistency.
+for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
+ datadir sysconfdir sharedstatedir localstatedir includedir \
+ oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
+ libdir localedir mandir
+do
+ eval ac_val=\$$ac_var
+ # Remove trailing slashes.
+ case $ac_val in
+ */ )
+ ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
+ eval $ac_var=\$ac_val;;
+ esac
+ # Be sure to have absolute directory names.
+ case $ac_val in
+ [\\/$]* | ?:[\\/]* ) continue;;
+ NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
+ esac
+ as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
+done
+
+# There might be people who depend on the old broken behavior: `$host'
+# used to hold the argument of --host etc.
+# FIXME: To remove some day.
+build=$build_alias
+host=$host_alias
+target=$target_alias
+
+# FIXME: To remove some day.
+if test "x$host_alias" != x; then
+ if test "x$build_alias" = x; then
+ cross_compiling=maybe
+ $as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host.
+ If a cross compiler is detected then cross compile mode will be used" >&2
+ elif test "x$build_alias" != "x$host_alias"; then
+ cross_compiling=yes
+ fi
+fi
+
+ac_tool_prefix=
+test -n "$host_alias" && ac_tool_prefix=$host_alias-
+
+test "$silent" = yes && exec 6>/dev/null
+
+
+ac_pwd=`pwd` && test -n "$ac_pwd" &&
+ac_ls_di=`ls -di .` &&
+ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
+ as_fn_error $? "working directory cannot be determined"
+test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
+ as_fn_error $? "pwd does not report name of working directory"
+
+
+# Find the source files, if location was not specified.
+if test -z "$srcdir"; then
+ ac_srcdir_defaulted=yes
+ # Try the directory containing this script, then the parent directory.
+ ac_confdir=`$as_dirname -- "$as_myself" ||
+$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$as_myself" : 'X\(//\)[^/]' \| \
+ X"$as_myself" : 'X\(//\)$' \| \
+ X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$as_myself" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)[^/].*/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+ srcdir=$ac_confdir
+ if test ! -r "$srcdir/$ac_unique_file"; then
+ srcdir=..
+ fi
+else
+ ac_srcdir_defaulted=no
+fi
+if test ! -r "$srcdir/$ac_unique_file"; then
+ test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
+ as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
+fi
+ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
+ac_abs_confdir=`(
+ cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
+ pwd)`
+# When building in place, set srcdir=.
+if test "$ac_abs_confdir" = "$ac_pwd"; then
+ srcdir=.
+fi
+# Remove unnecessary trailing slashes from srcdir.
+# Double slashes in file names in object file debugging info
+# mess up M-x gdb in Emacs.
+case $srcdir in
+*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
+esac
+for ac_var in $ac_precious_vars; do
+ eval ac_env_${ac_var}_set=\${${ac_var}+set}
+ eval ac_env_${ac_var}_value=\$${ac_var}
+ eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
+ eval ac_cv_env_${ac_var}_value=\$${ac_var}
+done
+
+#
+# Report the --help message.
+#
+if test "$ac_init_help" = "long"; then
+ # Omit some internal or obsolete options to make the list less imposing.
+ # This message is too long to be a string in the A/UX 3.1 sh.
+ cat <<_ACEOF
+\`configure' configures newlib 2.4.0 to adapt to many kinds of systems.
+
+Usage: $0 [OPTION]... [VAR=VALUE]...
+
+To assign environment variables (e.g., CC, CFLAGS...), specify them as
+VAR=VALUE. See below for descriptions of some of the useful variables.
+
+Defaults for the options are specified in brackets.
+
+Configuration:
+ -h, --help display this help and exit
+ --help=short display options specific to this package
+ --help=recursive display the short help of all the included packages
+ -V, --version display version information and exit
+ -q, --quiet, --silent do not print \`checking ...' messages
+ --cache-file=FILE cache test results in FILE [disabled]
+ -C, --config-cache alias for \`--cache-file=config.cache'
+ -n, --no-create do not create output files
+ --srcdir=DIR find the sources in DIR [configure dir or \`..']
+
+Installation directories:
+ --prefix=PREFIX install architecture-independent files in PREFIX
+ [$ac_default_prefix]
+ --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
+ [PREFIX]
+
+By default, \`make install' will install all the files in
+\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
+an installation prefix other than \`$ac_default_prefix' using \`--prefix',
+for instance \`--prefix=\$HOME'.
+
+For better control, use the options below.
+
+Fine tuning of the installation directories:
+ --bindir=DIR user executables [EPREFIX/bin]
+ --sbindir=DIR system admin executables [EPREFIX/sbin]
+ --libexecdir=DIR program executables [EPREFIX/libexec]
+ --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
+ --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
+ --localstatedir=DIR modifiable single-machine data [PREFIX/var]
+ --libdir=DIR object code libraries [EPREFIX/lib]
+ --includedir=DIR C header files [PREFIX/include]
+ --oldincludedir=DIR C header files for non-gcc [/usr/include]
+ --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
+ --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
+ --infodir=DIR info documentation [DATAROOTDIR/info]
+ --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
+ --mandir=DIR man documentation [DATAROOTDIR/man]
+ --docdir=DIR documentation root [DATAROOTDIR/doc/newlib]
+ --htmldir=DIR html documentation [DOCDIR]
+ --dvidir=DIR dvi documentation [DOCDIR]
+ --pdfdir=DIR pdf documentation [DOCDIR]
+ --psdir=DIR ps documentation [DOCDIR]
+_ACEOF
+
+ cat <<\_ACEOF
+
+Program names:
+ --program-prefix=PREFIX prepend PREFIX to installed program names
+ --program-suffix=SUFFIX append SUFFIX to installed program names
+ --program-transform-name=PROGRAM run sed PROGRAM on installed program names
+
+System types:
+ --build=BUILD configure for building on BUILD [guessed]
+ --host=HOST cross-compile to build programs to run on HOST [BUILD]
+_ACEOF
+fi
+
+if test -n "$ac_init_help"; then
+ case $ac_init_help in
+ short | recursive ) echo "Configuration of newlib 2.4.0:";;
+ esac
+ cat <<\_ACEOF
+
+Optional Features:
+ --disable-option-checking ignore unrecognized --enable/--with options
+ --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
+ --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
+ --enable-multilib build many library versions (default)
+ --enable-target-optspace optimize for space
+ --enable-malloc-debugging indicate malloc debugging requested
+ --enable-newlib-multithread enable support for multiple threads
+ --enable-newlib-iconv enable iconv library support
+ --enable-newlib-elix-level supply desired elix library level (1-4)
+ --disable-newlib-io-float disable printf/scanf family float support
+ --disable-newlib-supplied-syscalls disable newlib from supplying syscalls
+ --disable-dependency-tracking speeds up one-time build
+ --enable-dependency-tracking do not reject slow dependency extractors
+ --enable-maintainer-mode enable make rules and dependencies not useful
+ (and sometimes confusing) to the casual installer
+
+Some influential environment variables:
+ CCAS assembler compiler command (defaults to CC)
+ CCASFLAGS assembler compiler flags (defaults to CFLAGS)
+
+Use these variables to override the choices made by `configure' or to help
+it to find libraries and programs with nonstandard names/locations.
+
+Report bugs to the package provider.
+_ACEOF
+ac_status=$?
+fi
+
+if test "$ac_init_help" = "recursive"; then
+ # If there are subdirs, report their specific --help.
+ for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
+ test -d "$ac_dir" ||
+ { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
+ continue
+ ac_builddir=.
+
+case "$ac_dir" in
+.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
+*)
+ ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
+ # A ".." for each directory in $ac_dir_suffix.
+ ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
+ case $ac_top_builddir_sub in
+ "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
+ *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
+ esac ;;
+esac
+ac_abs_top_builddir=$ac_pwd
+ac_abs_builddir=$ac_pwd$ac_dir_suffix
+# for backward compatibility:
+ac_top_builddir=$ac_top_build_prefix
+
+case $srcdir in
+ .) # We are building in place.
+ ac_srcdir=.
+ ac_top_srcdir=$ac_top_builddir_sub
+ ac_abs_top_srcdir=$ac_pwd ;;
+ [\\/]* | ?:[\\/]* ) # Absolute name.
+ ac_srcdir=$srcdir$ac_dir_suffix;
+ ac_top_srcdir=$srcdir
+ ac_abs_top_srcdir=$srcdir ;;
+ *) # Relative name.
+ ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
+ ac_top_srcdir=$ac_top_build_prefix$srcdir
+ ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
+esac
+ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
+
+ cd "$ac_dir" || { ac_status=$?; continue; }
+ # Check for guested configure.
+ if test -f "$ac_srcdir/configure.gnu"; then
+ echo &&
+ $SHELL "$ac_srcdir/configure.gnu" --help=recursive
+ elif test -f "$ac_srcdir/configure"; then
+ echo &&
+ $SHELL "$ac_srcdir/configure" --help=recursive
+ else
+ $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
+ fi || ac_status=$?
+ cd "$ac_pwd" || { ac_status=$?; break; }
+ done
+fi
+
+test -n "$ac_init_help" && exit $ac_status
+if $ac_init_version; then
+ cat <<\_ACEOF
+newlib configure 2.4.0
+generated by GNU Autoconf 2.68
+
+Copyright (C) 2010 Free Software Foundation, Inc.
+This configure script is free software; the Free Software Foundation
+gives unlimited permission to copy, distribute and modify it.
+_ACEOF
+ exit
+fi
+
+## ------------------------ ##
+## Autoconf initialization. ##
+## ------------------------ ##
+
+# ac_fn_c_try_compile LINENO
+# --------------------------
+# Try to compile conftest.$ac_ext, and return whether this succeeded.
+ac_fn_c_try_compile ()
+{
+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ rm -f conftest.$ac_objext
+ if { { ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_compile") 2>conftest.err
+ ac_status=$?
+ if test -s conftest.err; then
+ grep -v '^ *+' conftest.err >conftest.er1
+ cat conftest.er1 >&5
+ mv -f conftest.er1 conftest.err
+ fi
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then :
+ ac_retval=0
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_retval=1
+fi
+ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+ as_fn_set_status $ac_retval
+
+} # ac_fn_c_try_compile
+cat >config.log <<_ACEOF
+This file contains any messages produced by compilers while
+running configure, to aid debugging if configure makes a mistake.
+
+It was created by newlib $as_me 2.4.0, which was
+generated by GNU Autoconf 2.68. Invocation command line was
+
+ $ $0 $@
+
+_ACEOF
+exec 5>>config.log
+{
+cat <<_ASUNAME
+## --------- ##
+## Platform. ##
+## --------- ##
+
+hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
+uname -m = `(uname -m) 2>/dev/null || echo unknown`
+uname -r = `(uname -r) 2>/dev/null || echo unknown`
+uname -s = `(uname -s) 2>/dev/null || echo unknown`
+uname -v = `(uname -v) 2>/dev/null || echo unknown`
+
+/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
+/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
+
+/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
+/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
+/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
+/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
+/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
+/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
+/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
+
+_ASUNAME
+
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ $as_echo "PATH: $as_dir"
+ done
+IFS=$as_save_IFS
+
+} >&5
+
+cat >&5 <<_ACEOF
+
+
+## ----------- ##
+## Core tests. ##
+## ----------- ##
+
+_ACEOF
+
+
+# Keep a trace of the command line.
+# Strip out --no-create and --no-recursion so they do not pile up.
+# Strip out --silent because we don't want to record it for future runs.
+# Also quote any args containing shell meta-characters.
+# Make two passes to allow for proper duplicate-argument suppression.
+ac_configure_args=
+ac_configure_args0=
+ac_configure_args1=
+ac_must_keep_next=false
+for ac_pass in 1 2
+do
+ for ac_arg
+ do
+ case $ac_arg in
+ -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
+ -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+ | -silent | --silent | --silen | --sile | --sil)
+ continue ;;
+ *\'*)
+ ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
+ esac
+ case $ac_pass in
+ 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
+ 2)
+ as_fn_append ac_configure_args1 " '$ac_arg'"
+ if test $ac_must_keep_next = true; then
+ ac_must_keep_next=false # Got value, back to normal.
+ else
+ case $ac_arg in
+ *=* | --config-cache | -C | -disable-* | --disable-* \
+ | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
+ | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
+ | -with-* | --with-* | -without-* | --without-* | --x)
+ case "$ac_configure_args0 " in
+ "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
+ esac
+ ;;
+ -* ) ac_must_keep_next=true ;;
+ esac
+ fi
+ as_fn_append ac_configure_args " '$ac_arg'"
+ ;;
+ esac
+ done
+done
+{ ac_configure_args0=; unset ac_configure_args0;}
+{ ac_configure_args1=; unset ac_configure_args1;}
+
+# When interrupted or exit'd, cleanup temporary files, and complete
+# config.log. We remove comments because anyway the quotes in there
+# would cause problems or look ugly.
+# WARNING: Use '\'' to represent an apostrophe within the trap.
+# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
+trap 'exit_status=$?
+ # Save into config.log some information that might help in debugging.
+ {
+ echo
+
+ $as_echo "## ---------------- ##
+## Cache variables. ##
+## ---------------- ##"
+ echo
+ # The following way of writing the cache mishandles newlines in values,
+(
+ for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
+ eval ac_val=\$$ac_var
+ case $ac_val in #(
+ *${as_nl}*)
+ case $ac_var in #(
+ *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
+$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
+ esac
+ case $ac_var in #(
+ _ | IFS | as_nl) ;; #(
+ BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
+ *) { eval $ac_var=; unset $ac_var;} ;;
+ esac ;;
+ esac
+ done
+ (set) 2>&1 |
+ case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
+ *${as_nl}ac_space=\ *)
+ sed -n \
+ "s/'\''/'\''\\\\'\'''\''/g;
+ s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
+ ;; #(
+ *)
+ sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
+ ;;
+ esac |
+ sort
+)
+ echo
+
+ $as_echo "## ----------------- ##
+## Output variables. ##
+## ----------------- ##"
+ echo
+ for ac_var in $ac_subst_vars
+ do
+ eval ac_val=\$$ac_var
+ case $ac_val in
+ *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
+ esac
+ $as_echo "$ac_var='\''$ac_val'\''"
+ done | sort
+ echo
+
+ if test -n "$ac_subst_files"; then
+ $as_echo "## ------------------- ##
+## File substitutions. ##
+## ------------------- ##"
+ echo
+ for ac_var in $ac_subst_files
+ do
+ eval ac_val=\$$ac_var
+ case $ac_val in
+ *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
+ esac
+ $as_echo "$ac_var='\''$ac_val'\''"
+ done | sort
+ echo
+ fi
+
+ if test -s confdefs.h; then
+ $as_echo "## ----------- ##
+## confdefs.h. ##
+## ----------- ##"
+ echo
+ cat confdefs.h
+ echo
+ fi
+ test "$ac_signal" != 0 &&
+ $as_echo "$as_me: caught signal $ac_signal"
+ $as_echo "$as_me: exit $exit_status"
+ } >&5
+ rm -f core *.core core.conftest.* &&
+ rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
+ exit $exit_status
+' 0
+for ac_signal in 1 2 13 15; do
+ trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
+done
+ac_signal=0
+
+# confdefs.h avoids OS command line length limits that DEFS can exceed.
+rm -f -r conftest* confdefs.h
+
+$as_echo "/* confdefs.h */" > confdefs.h
+
+# Predefined preprocessor variables.
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_NAME "$PACKAGE_NAME"
+_ACEOF
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
+_ACEOF
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_VERSION "$PACKAGE_VERSION"
+_ACEOF
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_STRING "$PACKAGE_STRING"
+_ACEOF
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
+_ACEOF
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_URL "$PACKAGE_URL"
+_ACEOF
+
+
+# Let the site file select an alternate cache file if it wants to.
+# Prefer an explicitly selected file to automatically selected ones.
+ac_site_file1=NONE
+ac_site_file2=NONE
+if test -n "$CONFIG_SITE"; then
+ # We do not want a PATH search for config.site.
+ case $CONFIG_SITE in #((
+ -*) ac_site_file1=./$CONFIG_SITE;;
+ */*) ac_site_file1=$CONFIG_SITE;;
+ *) ac_site_file1=./$CONFIG_SITE;;
+ esac
+elif test "x$prefix" != xNONE; then
+ ac_site_file1=$prefix/share/config.site
+ ac_site_file2=$prefix/etc/config.site
+else
+ ac_site_file1=$ac_default_prefix/share/config.site
+ ac_site_file2=$ac_default_prefix/etc/config.site
+fi
+for ac_site_file in "$ac_site_file1" "$ac_site_file2"
+do
+ test "x$ac_site_file" = xNONE && continue
+ if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
+$as_echo "$as_me: loading site script $ac_site_file" >&6;}
+ sed 's/^/| /' "$ac_site_file" >&5
+ . "$ac_site_file" \
+ || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "failed to load site script $ac_site_file
+See \`config.log' for more details" "$LINENO" 5; }
+ fi
+done
+
+if test -r "$cache_file"; then
+ # Some versions of bash will fail to source /dev/null (special files
+ # actually), so we avoid doing that. DJGPP emulates it as a regular file.
+ if test /dev/null != "$cache_file" && test -f "$cache_file"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
+$as_echo "$as_me: loading cache $cache_file" >&6;}
+ case $cache_file in
+ [\\/]* | ?:[\\/]* ) . "$cache_file";;
+ *) . "./$cache_file";;
+ esac
+ fi
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
+$as_echo "$as_me: creating cache $cache_file" >&6;}
+ >$cache_file
+fi
+
+# Check that the precious variables saved in the cache have kept the same
+# value.
+ac_cache_corrupted=false
+for ac_var in $ac_precious_vars; do
+ eval ac_old_set=\$ac_cv_env_${ac_var}_set
+ eval ac_new_set=\$ac_env_${ac_var}_set
+ eval ac_old_val=\$ac_cv_env_${ac_var}_value
+ eval ac_new_val=\$ac_env_${ac_var}_value
+ case $ac_old_set,$ac_new_set in
+ set,)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
+$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
+ ac_cache_corrupted=: ;;
+ ,set)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
+$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
+ ac_cache_corrupted=: ;;
+ ,);;
+ *)
+ if test "x$ac_old_val" != "x$ac_new_val"; then
+ # differences in whitespace do not lead to failure.
+ ac_old_val_w=`echo x $ac_old_val`
+ ac_new_val_w=`echo x $ac_new_val`
+ if test "$ac_old_val_w" != "$ac_new_val_w"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
+$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
+ ac_cache_corrupted=:
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
+$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
+ eval $ac_var=\$ac_old_val
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
+$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
+$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
+ fi;;
+ esac
+ # Pass precious variables to config.status.
+ if test "$ac_new_set" = set; then
+ case $ac_new_val in
+ *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
+ *) ac_arg=$ac_var=$ac_new_val ;;
+ esac
+ case " $ac_configure_args " in
+ *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
+ *) as_fn_append ac_configure_args " '$ac_arg'" ;;
+ esac
+ fi
+done
+if $ac_cache_corrupted; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
+$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
+ as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
+fi
+## -------------------- ##
+## Main body of script. ##
+## -------------------- ##
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+
+
+ac_aux_dir=
+for ac_dir in ../../../.. "$srcdir"/../../../..; do
+ if test -f "$ac_dir/install-sh"; then
+ ac_aux_dir=$ac_dir
+ ac_install_sh="$ac_aux_dir/install-sh -c"
+ break
+ elif test -f "$ac_dir/install.sh"; then
+ ac_aux_dir=$ac_dir
+ ac_install_sh="$ac_aux_dir/install.sh -c"
+ break
+ elif test -f "$ac_dir/shtool"; then
+ ac_aux_dir=$ac_dir
+ ac_install_sh="$ac_aux_dir/shtool install -c"
+ break
+ fi
+done
+if test -z "$ac_aux_dir"; then
+ as_fn_error $? "cannot find install-sh, install.sh, or shtool in ../../../.. \"$srcdir\"/../../../.." "$LINENO" 5
+fi
+
+# These three variables are undocumented and unsupported,
+# and are intended to be withdrawn in a future Autoconf release.
+# They can cause serious problems if a builder's source tree is in a directory
+# whose full name contains unusual characters.
+ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
+ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
+ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
+
+
+
+
+# Make sure we can run config.sub.
+$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
+ as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
+$as_echo_n "checking build system type... " >&6; }
+if ${ac_cv_build+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_build_alias=$build_alias
+test "x$ac_build_alias" = x &&
+ ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
+test "x$ac_build_alias" = x &&
+ as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
+ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
+ as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
+$as_echo "$ac_cv_build" >&6; }
+case $ac_cv_build in
+*-*-*) ;;
+*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
+esac
+build=$ac_cv_build
+ac_save_IFS=$IFS; IFS='-'
+set x $ac_cv_build
+shift
+build_cpu=$1
+build_vendor=$2
+shift; shift
+# Remember, the first character of IFS is used to create $*,
+# except with old shells:
+build_os=$*
+IFS=$ac_save_IFS
+case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
+$as_echo_n "checking host system type... " >&6; }
+if ${ac_cv_host+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test "x$host_alias" = x; then
+ ac_cv_host=$ac_cv_build
+else
+ ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
+ as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
+$as_echo "$ac_cv_host" >&6; }
+case $ac_cv_host in
+*-*-*) ;;
+*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
+esac
+host=$ac_cv_host
+ac_save_IFS=$IFS; IFS='-'
+set x $ac_cv_host
+shift
+host_cpu=$1
+host_vendor=$2
+shift; shift
+# Remember, the first character of IFS is used to create $*,
+# except with old shells:
+host_os=$*
+IFS=$ac_save_IFS
+case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
+
+
+am__api_version='1.11'
+
+# Find a good install program. We prefer a C program (faster),
+# so one script is as good as another. But avoid the broken or
+# incompatible versions:
+# SysV /etc/install, /usr/sbin/install
+# SunOS /usr/etc/install
+# IRIX /sbin/install
+# AIX /bin/install
+# AmigaOS /C/install, which installs bootblocks on floppy discs
+# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
+# AFS /usr/afsws/bin/install, which mishandles nonexistent args
+# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
+# OS/2's system install, which has a completely different semantic
+# ./install, which can be erroneously created by make from ./install.sh.
+# Reject install programs that cannot install multiple files.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
+$as_echo_n "checking for a BSD-compatible install... " >&6; }
+if test -z "$INSTALL"; then
+if ${ac_cv_path_install+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ # Account for people who put trailing slashes in PATH elements.
+case $as_dir/ in #((
+ ./ | .// | /[cC]/* | \
+ /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
+ ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
+ /usr/ucb/* ) ;;
+ *)
+ # OSF1 and SCO ODT 3.0 have their own names for install.
+ # Don't use installbsd from OSF since it installs stuff as root
+ # by default.
+ for ac_prog in ginstall scoinst install; do
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
+ if test $ac_prog = install &&
+ grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
+ # AIX install. It has an incompatible calling convention.
+ :
+ elif test $ac_prog = install &&
+ grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
+ # program-specific install script used by HP pwplus--don't use.
+ :
+ else
+ rm -rf conftest.one conftest.two conftest.dir
+ echo one > conftest.one
+ echo two > conftest.two
+ mkdir conftest.dir
+ if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
+ test -s conftest.one && test -s conftest.two &&
+ test -s conftest.dir/conftest.one &&
+ test -s conftest.dir/conftest.two
+ then
+ ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
+ break 3
+ fi
+ fi
+ fi
+ done
+ done
+ ;;
+esac
+
+ done
+IFS=$as_save_IFS
+
+rm -rf conftest.one conftest.two conftest.dir
+
+fi
+ if test "${ac_cv_path_install+set}" = set; then
+ INSTALL=$ac_cv_path_install
+ else
+ # As a last resort, use the slow shell script. Don't cache a
+ # value for INSTALL within a source directory, because that will
+ # break other packages using the cache if that directory is
+ # removed, or if the value is a relative name.
+ INSTALL=$ac_install_sh
+ fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
+$as_echo "$INSTALL" >&6; }
+
+# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
+# It thinks the first close brace ends the variable substitution.
+test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
+
+test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
+
+test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5
+$as_echo_n "checking whether build environment is sane... " >&6; }
+# Just in case
+sleep 1
+echo timestamp > conftest.file
+# Reject unsafe characters in $srcdir or the absolute working directory
+# name. Accept space and tab only in the latter.
+am_lf='
+'
+case `pwd` in
+ *[\\\"\#\$\&\'\`$am_lf]*)
+ as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5;;
+esac
+case $srcdir in
+ *[\\\"\#\$\&\'\`$am_lf\ \ ]*)
+ as_fn_error $? "unsafe srcdir value: \`$srcdir'" "$LINENO" 5;;
+esac
+
+# Do `set' in a subshell so we don't clobber the current shell's
+# arguments. Must try -L first in case configure is actually a
+# symlink; some systems play weird games with the mod time of symlinks
+# (eg FreeBSD returns the mod time of the symlink's containing
+# directory).
+if (
+ set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
+ if test "$*" = "X"; then
+ # -L didn't work.
+ set X `ls -t "$srcdir/configure" conftest.file`
+ fi
+ rm -f conftest.file
+ if test "$*" != "X $srcdir/configure conftest.file" \
+ && test "$*" != "X conftest.file $srcdir/configure"; then
+
+ # If neither matched, then we have a broken ls. This can happen
+ # if, for instance, CONFIG_SHELL is bash and it inherits a
+ # broken ls alias from the environment. This has actually
+ # happened. Such a system could not be considered "sane".
+ as_fn_error $? "ls -t appears to fail. Make sure there is not a broken
+alias in your environment" "$LINENO" 5
+ fi
+
+ test "$2" = conftest.file
+ )
+then
+ # Ok.
+ :
+else
+ as_fn_error $? "newly created file is older than distributed files!
+Check your system clock" "$LINENO" 5
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+test "$program_prefix" != NONE &&
+ program_transform_name="s&^&$program_prefix&;$program_transform_name"
+# Use a double $ so make ignores it.
+test "$program_suffix" != NONE &&
+ program_transform_name="s&\$&$program_suffix&;$program_transform_name"
+# Double any \ or $.
+# By default was `s,x,x', remove it if useless.
+ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
+program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"`
+
+# expand $ac_aux_dir to an absolute path
+am_aux_dir=`cd $ac_aux_dir && pwd`
+
+if test x"${MISSING+set}" != xset; then
+ case $am_aux_dir in
+ *\ * | *\ *)
+ MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
+ *)
+ MISSING="\${SHELL} $am_aux_dir/missing" ;;
+ esac
+fi
+# Use eval to expand $SHELL
+if eval "$MISSING --run true"; then
+ am_missing_run="$MISSING --run "
+else
+ am_missing_run=
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`missing' script is too old or missing" >&5
+$as_echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;}
+fi
+
+if test x"${install_sh}" != xset; then
+ case $am_aux_dir in
+ *\ * | *\ *)
+ install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
+ *)
+ install_sh="\${SHELL} $am_aux_dir/install-sh"
+ esac
+fi
+
+# Installed binaries are usually stripped using `strip' when the user
+# run `make install-strip'. However `strip' might not be the right
+# tool to use in cross-compilation environments, therefore Automake
+# will honor the `STRIP' environment variable to overrule this program.
+if test "$cross_compiling" != no; then
+ if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
+set dummy ${ac_tool_prefix}strip; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_STRIP+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$STRIP"; then
+ ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_STRIP="${ac_tool_prefix}strip"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+STRIP=$ac_cv_prog_STRIP
+if test -n "$STRIP"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
+$as_echo "$STRIP" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_STRIP"; then
+ ac_ct_STRIP=$STRIP
+ # Extract the first word of "strip", so it can be a program name with args.
+set dummy strip; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_ct_STRIP"; then
+ ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_ac_ct_STRIP="strip"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
+if test -n "$ac_ct_STRIP"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
+$as_echo "$ac_ct_STRIP" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+ if test "x$ac_ct_STRIP" = x; then
+ STRIP=":"
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ STRIP=$ac_ct_STRIP
+ fi
+else
+ STRIP="$ac_cv_prog_STRIP"
+fi
+
+fi
+INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
+$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
+if test -z "$MKDIR_P"; then
+ if ${ac_cv_path_mkdir+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_prog in mkdir gmkdir; do
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; } || continue
+ case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
+ 'mkdir (GNU coreutils) '* | \
+ 'mkdir (coreutils) '* | \
+ 'mkdir (fileutils) '4.1*)
+ ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
+ break 3;;
+ esac
+ done
+ done
+ done
+IFS=$as_save_IFS
+
+fi
+
+ test -d ./--version && rmdir ./--version
+ if test "${ac_cv_path_mkdir+set}" = set; then
+ MKDIR_P="$ac_cv_path_mkdir -p"
+ else
+ # As a last resort, use the slow shell script. Don't cache a
+ # value for MKDIR_P within a source directory, because that will
+ # break other packages using the cache if that directory is
+ # removed, or if the value is a relative name.
+ MKDIR_P="$ac_install_sh -d"
+ fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
+$as_echo "$MKDIR_P" >&6; }
+
+mkdir_p="$MKDIR_P"
+case $mkdir_p in
+ [\\/$]* | ?:[\\/]*) ;;
+ */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
+esac
+
+for ac_prog in gawk mawk nawk awk
+do
+ # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_AWK+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$AWK"; then
+ ac_cv_prog_AWK="$AWK" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_AWK="$ac_prog"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+AWK=$ac_cv_prog_AWK
+if test -n "$AWK"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
+$as_echo "$AWK" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+ test -n "$AWK" && break
+done
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
+$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
+set x ${MAKE-make}
+ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
+if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat >conftest.make <<\_ACEOF
+SHELL = /bin/sh
+all:
+ @echo '@@@%%%=$(MAKE)=@@@%%%'
+_ACEOF
+# GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
+case `${MAKE-make} -f conftest.make 2>/dev/null` in
+ *@@@%%%=?*=@@@%%%*)
+ eval ac_cv_prog_make_${ac_make}_set=yes;;
+ *)
+ eval ac_cv_prog_make_${ac_make}_set=no;;
+esac
+rm -f conftest.make
+fi
+if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+ SET_MAKE=
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+ SET_MAKE="MAKE=${MAKE-make}"
+fi
+
+rm -rf .tst 2>/dev/null
+mkdir .tst 2>/dev/null
+if test -d .tst; then
+ am__leading_dot=.
+else
+ am__leading_dot=_
+fi
+rmdir .tst 2>/dev/null
+
+DEPDIR="${am__leading_dot}deps"
+
+ac_config_commands="$ac_config_commands depfiles"
+
+
+am_make=${MAKE-make}
+cat > confinc << 'END'
+am__doit:
+ @echo this is the am__doit target
+.PHONY: am__doit
+END
+# If we don't find an include directive, just comment out the code.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5
+$as_echo_n "checking for style of include used by $am_make... " >&6; }
+am__include="#"
+am__quote=
+_am_result=none
+# First try GNU make style include.
+echo "include confinc" > confmf
+# Ignore all kinds of additional output from `make'.
+case `$am_make -s -f confmf 2> /dev/null` in #(
+*the\ am__doit\ target*)
+ am__include=include
+ am__quote=
+ _am_result=GNU
+ ;;
+esac
+# Now try BSD make style include.
+if test "$am__include" = "#"; then
+ echo '.include "confinc"' > confmf
+ case `$am_make -s -f confmf 2> /dev/null` in #(
+ *the\ am__doit\ target*)
+ am__include=.include
+ am__quote="\""
+ _am_result=BSD
+ ;;
+ esac
+fi
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5
+$as_echo "$_am_result" >&6; }
+rm -f confinc confmf
+
+# Check whether --enable-dependency-tracking was given.
+if test "${enable_dependency_tracking+set}" = set; then :
+ enableval=$enable_dependency_tracking;
+fi
+
+if test "x$enable_dependency_tracking" != xno; then
+ am_depcomp="$ac_aux_dir/depcomp"
+ AMDEPBACKSLASH='\'
+ am__nodep='_no'
+fi
+ if test "x$enable_dependency_tracking" != xno; then
+ AMDEP_TRUE=
+ AMDEP_FALSE='#'
+else
+ AMDEP_TRUE='#'
+ AMDEP_FALSE=
+fi
+
+
+
+# Check whether --enable-multilib was given.
+if test "${enable_multilib+set}" = set; then :
+ enableval=$enable_multilib; case "${enableval}" in
+ yes) multilib=yes ;;
+ no) multilib=no ;;
+ *) as_fn_error $? "bad value ${enableval} for multilib option" "$LINENO" 5 ;;
+ esac
+else
+ multilib=yes
+fi
+
+# Check whether --enable-target-optspace was given.
+if test "${enable_target_optspace+set}" = set; then :
+ enableval=$enable_target_optspace; case "${enableval}" in
+ yes) target_optspace=yes ;;
+ no) target_optspace=no ;;
+ *) as_fn_error $? "bad value ${enableval} for target-optspace option" "$LINENO" 5 ;;
+ esac
+else
+ target_optspace=
+fi
+
+# Check whether --enable-malloc-debugging was given.
+if test "${enable_malloc_debugging+set}" = set; then :
+ enableval=$enable_malloc_debugging; case "${enableval}" in
+ yes) malloc_debugging=yes ;;
+ no) malloc_debugging=no ;;
+ *) as_fn_error $? "bad value ${enableval} for malloc-debugging option" "$LINENO" 5 ;;
+ esac
+else
+ malloc_debugging=
+fi
+
+# Check whether --enable-newlib-multithread was given.
+if test "${enable_newlib_multithread+set}" = set; then :
+ enableval=$enable_newlib_multithread; case "${enableval}" in
+ yes) newlib_multithread=yes ;;
+ no) newlib_multithread=no ;;
+ *) as_fn_error $? "bad value ${enableval} for newlib-multithread option" "$LINENO" 5 ;;
+ esac
+else
+ newlib_multithread=yes
+fi
+
+# Check whether --enable-newlib-iconv was given.
+if test "${enable_newlib_iconv+set}" = set; then :
+ enableval=$enable_newlib_iconv; if test "${newlib_iconv+set}" != set; then
+ case "${enableval}" in
+ yes) newlib_iconv=yes ;;
+ no) newlib_iconv=no ;;
+ *) as_fn_error $? "bad value ${enableval} for newlib-iconv option" "$LINENO" 5 ;;
+ esac
+ fi
+else
+ newlib_iconv=${newlib_iconv}
+fi
+
+# Check whether --enable-newlib-elix-level was given.
+if test "${enable_newlib_elix_level+set}" = set; then :
+ enableval=$enable_newlib_elix_level; case "${enableval}" in
+ 0) newlib_elix_level=0 ;;
+ 1) newlib_elix_level=1 ;;
+ 2) newlib_elix_level=2 ;;
+ 3) newlib_elix_level=3 ;;
+ 4) newlib_elix_level=4 ;;
+ *) as_fn_error $? "bad value ${enableval} for newlib-elix-level option" "$LINENO" 5 ;;
+ esac
+else
+ newlib_elix_level=0
+fi
+
+# Check whether --enable-newlib-io-float was given.
+if test "${enable_newlib_io_float+set}" = set; then :
+ enableval=$enable_newlib_io_float; case "${enableval}" in
+ yes) newlib_io_float=yes ;;
+ no) newlib_io_float=no ;;
+ *) as_fn_error $? "bad value ${enableval} for newlib-io-float option" "$LINENO" 5 ;;
+ esac
+else
+ newlib_io_float=yes
+fi
+
+# Check whether --enable-newlib-supplied-syscalls was given.
+if test "${enable_newlib_supplied_syscalls+set}" = set; then :
+ enableval=$enable_newlib_supplied_syscalls; case "${enableval}" in
+ yes) newlib_may_supply_syscalls=yes ;;
+ no) newlib_may_supply_syscalls=no ;;
+ *) as_fn_error $? "bad value ${enableval} for newlib-supplied-syscalls option" "$LINENO" 5 ;;
+ esac
+else
+ newlib_may_supply_syscalls=yes
+fi
+
+ if test x${newlib_may_supply_syscalls} = xyes; then
+ MAY_SUPPLY_SYSCALLS_TRUE=
+ MAY_SUPPLY_SYSCALLS_FALSE='#'
+else
+ MAY_SUPPLY_SYSCALLS_TRUE='#'
+ MAY_SUPPLY_SYSCALLS_FALSE=
+fi
+
+
+
+test -z "${with_target_subdir}" && with_target_subdir=.
+
+if test "${srcdir}" = "."; then
+ if test "${with_target_subdir}" != "."; then
+ newlib_basedir="${srcdir}/${with_multisrctop}../../../.."
+ else
+ newlib_basedir="${srcdir}/${with_multisrctop}../../.."
+ fi
+else
+ newlib_basedir="${srcdir}/../../.."
+fi
+
+
+
+
+if test "`cd $srcdir && pwd`" != "`pwd`"; then
+ # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
+ # is not polluted with repeated "-I."
+ am__isrc=' -I$(srcdir)'
+ # test to see if srcdir already configured
+ if test -f $srcdir/config.status; then
+ as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5
+ fi
+fi
+
+# test whether we have cygpath
+if test -z "$CYGPATH_W"; then
+ if (cygpath --version) >/dev/null 2>/dev/null; then
+ CYGPATH_W='cygpath -w'
+ else
+ CYGPATH_W=echo
+ fi
+fi
+
+
+# Define the identity of the package.
+ PACKAGE='newlib'
+ VERSION='2.4.0'
+
+
+# Some tools Automake needs.
+
+ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"}
+
+
+AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"}
+
+
+AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"}
+
+
+AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"}
+
+
+MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
+
+# We need awk for the "check" target. The system "awk" is bad on
+# some platforms.
+# Always define AMTAR for backward compatibility. Yes, it's still used
+# in the wild :-( We should find a proper way to deprecate it ...
+AMTAR='$${TAR-tar}'
+
+am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'
+
+
+
+
+
+
+# FIXME: We temporarily define our own version of AC_PROG_CC. This is
+# copied from autoconf 2.12, but does not call AC_PROG_CC_WORKS. We
+# are probably using a cross compiler, which will not be able to fully
+# link an executable. This should really be fixed in autoconf
+# itself.
+
+
+
+
+
+
+
+# Extract the first word of "gcc", so it can be a program name with args.
+set dummy gcc; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_CC+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_CC="gcc"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+$as_echo "$CC" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+
+depcc="$CC" am_compiler_list=
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
+$as_echo_n "checking dependency style of $depcc... " >&6; }
+if ${am_cv_CC_dependencies_compiler_type+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
+ # We make a subdir and do the tests there. Otherwise we can end up
+ # making bogus files that we don't know about and never remove. For
+ # instance it was reported that on HP-UX the gcc test will end up
+ # making a dummy file named `D' -- because `-MD' means `put the output
+ # in D'.
+ rm -rf conftest.dir
+ mkdir conftest.dir
+ # Copy depcomp to subdir because otherwise we won't find it if we're
+ # using a relative directory.
+ cp "$am_depcomp" conftest.dir
+ cd conftest.dir
+ # We will build objects and dependencies in a subdirectory because
+ # it helps to detect inapplicable dependency modes. For instance
+ # both Tru64's cc and ICC support -MD to output dependencies as a
+ # side effect of compilation, but ICC will put the dependencies in
+ # the current directory while Tru64 will put them in the object
+ # directory.
+ mkdir sub
+
+ am_cv_CC_dependencies_compiler_type=none
+ if test "$am_compiler_list" = ""; then
+ am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
+ fi
+ am__universal=false
+ case " $depcc " in #(
+ *\ -arch\ *\ -arch\ *) am__universal=true ;;
+ esac
+
+ for depmode in $am_compiler_list; do
+ # Setup a source with many dependencies, because some compilers
+ # like to wrap large dependency lists on column 80 (with \), and
+ # we should not choose a depcomp mode which is confused by this.
+ #
+ # We need to recreate these files for each test, as the compiler may
+ # overwrite some of them when testing with obscure command lines.
+ # This happens at least with the AIX C compiler.
+ : > sub/conftest.c
+ for i in 1 2 3 4 5 6; do
+ echo '#include "conftst'$i'.h"' >> sub/conftest.c
+ # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
+ # Solaris 8's {/usr,}/bin/sh.
+ touch sub/conftst$i.h
+ done
+ echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
+
+ # We check with `-c' and `-o' for the sake of the "dashmstdout"
+ # mode. It turns out that the SunPro C++ compiler does not properly
+ # handle `-M -o', and we need to detect this. Also, some Intel
+ # versions had trouble with output in subdirs
+ am__obj=sub/conftest.${OBJEXT-o}
+ am__minus_obj="-o $am__obj"
+ case $depmode in
+ gcc)
+ # This depmode causes a compiler race in universal mode.
+ test "$am__universal" = false || continue
+ ;;
+ nosideeffect)
+ # after this tag, mechanisms are not by side-effect, so they'll
+ # only be used when explicitly requested
+ if test "x$enable_dependency_tracking" = xyes; then
+ continue
+ else
+ break
+ fi
+ ;;
+ msvc7 | msvc7msys | msvisualcpp | msvcmsys)
+ # This compiler won't grok `-c -o', but also, the minuso test has
+ # not run yet. These depmodes are late enough in the game, and
+ # so weak that their functioning should not be impacted.
+ am__obj=conftest.${OBJEXT-o}
+ am__minus_obj=
+ ;;
+ none) break ;;
+ esac
+ if depmode=$depmode \
+ source=sub/conftest.c object=$am__obj \
+ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
+ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
+ >/dev/null 2>conftest.err &&
+ grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
+ grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
+ grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
+ ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
+ # icc doesn't choke on unknown options, it will just issue warnings
+ # or remarks (even with -Werror). So we grep stderr for any message
+ # that says an option was ignored or not supported.
+ # When given -MP, icc 7.0 and 7.1 complain thusly:
+ # icc: Command line warning: ignoring option '-M'; no argument required
+ # The diagnosis changed in icc 8.0:
+ # icc: Command line remark: option '-MP' not supported
+ if (grep 'ignoring option' conftest.err ||
+ grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
+ am_cv_CC_dependencies_compiler_type=$depmode
+ break
+ fi
+ fi
+ done
+
+ cd ..
+ rm -rf conftest.dir
+else
+ am_cv_CC_dependencies_compiler_type=none
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
+$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; }
+CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
+
+ if
+ test "x$enable_dependency_tracking" != xno \
+ && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then
+ am__fastdepCC_TRUE=
+ am__fastdepCC_FALSE='#'
+else
+ am__fastdepCC_TRUE='#'
+ am__fastdepCC_FALSE=
+fi
+
+
+if test -z "$CC"; then
+ # Extract the first word of "cc", so it can be a program name with args.
+set dummy cc; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_CC+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+ ac_prog_rejected=no
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
+ ac_prog_rejected=yes
+ continue
+ fi
+ ac_cv_prog_CC="cc"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+if test $ac_prog_rejected = yes; then
+ # We found a bogon in the path, so make sure we never use it.
+ set dummy $ac_cv_prog_CC
+ shift
+ if test $# != 0; then
+ # We chose a different compiler from the bogus one.
+ # However, it has the same basename, so the bogon will be chosen
+ # first if we set CC to just the basename; use the full file name.
+ shift
+ ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
+ fi
+fi
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+$as_echo "$CC" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+ test -z "$CC" && as_fn_error $? "no acceptable cc found in \$PATH" "$LINENO" 5
+fi
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using GNU C" >&5
+$as_echo_n "checking whether we are using GNU C... " >&6; }
+if ${ac_cv_c_compiler_gnu+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat > conftest.c <<EOF
+#ifdef __GNUC__
+ yes;
+#endif
+EOF
+if { ac_try='${CC-cc} -E conftest.c'
+ { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; } | egrep yes >/dev/null 2>&1; then
+ ac_cv_c_compiler_gnu=yes
+else
+ ac_cv_c_compiler_gnu=no
+fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
+$as_echo "$ac_cv_c_compiler_gnu" >&6; }
+
+if test $ac_cv_c_compiler_gnu = yes; then
+ GCC=yes
+ ac_test_CFLAGS="${CFLAGS+set}"
+ ac_save_CFLAGS="$CFLAGS"
+ ac_test_CFLAGS=${CFLAGS+set}
+ac_save_CFLAGS=$CFLAGS
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
+$as_echo_n "checking whether $CC accepts -g... " >&6; }
+if ${ac_cv_prog_cc_g+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_save_c_werror_flag=$ac_c_werror_flag
+ ac_c_werror_flag=yes
+ ac_cv_prog_cc_g=no
+ CFLAGS="-g"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ ac_cv_prog_cc_g=yes
+else
+ CFLAGS=""
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+
+else
+ ac_c_werror_flag=$ac_save_c_werror_flag
+ CFLAGS="-g"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ ac_cv_prog_cc_g=yes
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ ac_c_werror_flag=$ac_save_c_werror_flag
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
+$as_echo "$ac_cv_prog_cc_g" >&6; }
+if test "$ac_test_CFLAGS" = set; then
+ CFLAGS=$ac_save_CFLAGS
+elif test $ac_cv_prog_cc_g = yes; then
+ if test "$GCC" = yes; then
+ CFLAGS="-g -O2"
+ else
+ CFLAGS="-g"
+ fi
+else
+ if test "$GCC" = yes; then
+ CFLAGS="-O2"
+ else
+ CFLAGS=
+ fi
+fi
+ if test "$ac_test_CFLAGS" = set; then
+ CFLAGS="$ac_save_CFLAGS"
+ elif test $ac_cv_prog_cc_g = yes; then
+ CFLAGS="-g -O2"
+ else
+ CFLAGS="-O2"
+ fi
+else
+ GCC=
+ test "${CFLAGS+set}" = set || CFLAGS="-g"
+fi
+
+
+if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args.
+set dummy ${ac_tool_prefix}as; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_AS+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$AS"; then
+ ac_cv_prog_AS="$AS" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_AS="${ac_tool_prefix}as"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+AS=$ac_cv_prog_AS
+if test -n "$AS"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
+$as_echo "$AS" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_AS"; then
+ ac_ct_AS=$AS
+ # Extract the first word of "as", so it can be a program name with args.
+set dummy as; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_AS+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_ct_AS"; then
+ ac_cv_prog_ac_ct_AS="$ac_ct_AS" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_ac_ct_AS="as"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_AS=$ac_cv_prog_ac_ct_AS
+if test -n "$ac_ct_AS"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AS" >&5
+$as_echo "$ac_ct_AS" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+ if test "x$ac_ct_AS" = x; then
+ AS=""
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ AS=$ac_ct_AS
+ fi
+else
+ AS="$ac_cv_prog_AS"
+fi
+
+if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
+set dummy ${ac_tool_prefix}ar; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_AR+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$AR"; then
+ ac_cv_prog_AR="$AR" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_AR="${ac_tool_prefix}ar"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+AR=$ac_cv_prog_AR
+if test -n "$AR"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
+$as_echo "$AR" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_AR"; then
+ ac_ct_AR=$AR
+ # Extract the first word of "ar", so it can be a program name with args.
+set dummy ar; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_AR+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_ct_AR"; then
+ ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_ac_ct_AR="ar"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_AR=$ac_cv_prog_ac_ct_AR
+if test -n "$ac_ct_AR"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
+$as_echo "$ac_ct_AR" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+ if test "x$ac_ct_AR" = x; then
+ AR=""
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ AR=$ac_ct_AR
+ fi
+else
+ AR="$ac_cv_prog_AR"
+fi
+
+if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
+set dummy ${ac_tool_prefix}ranlib; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_RANLIB+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$RANLIB"; then
+ ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+RANLIB=$ac_cv_prog_RANLIB
+if test -n "$RANLIB"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
+$as_echo "$RANLIB" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_RANLIB"; then
+ ac_ct_RANLIB=$RANLIB
+ # Extract the first word of "ranlib", so it can be a program name with args.
+set dummy ranlib; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_ct_RANLIB"; then
+ ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_ac_ct_RANLIB="ranlib"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
+if test -n "$ac_ct_RANLIB"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
+$as_echo "$ac_ct_RANLIB" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+ if test "x$ac_ct_RANLIB" = x; then
+ RANLIB=":"
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ RANLIB=$ac_ct_RANLIB
+ fi
+else
+ RANLIB="$ac_cv_prog_RANLIB"
+fi
+
+if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}readelf", so it can be a program name with args.
+set dummy ${ac_tool_prefix}readelf; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_READELF+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$READELF"; then
+ ac_cv_prog_READELF="$READELF" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_READELF="${ac_tool_prefix}readelf"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+READELF=$ac_cv_prog_READELF
+if test -n "$READELF"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
+$as_echo "$READELF" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_READELF"; then
+ ac_ct_READELF=$READELF
+ # Extract the first word of "readelf", so it can be a program name with args.
+set dummy readelf; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_READELF+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_ct_READELF"; then
+ ac_cv_prog_ac_ct_READELF="$ac_ct_READELF" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_ac_ct_READELF="readelf"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_READELF=$ac_cv_prog_ac_ct_READELF
+if test -n "$ac_ct_READELF"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_READELF" >&5
+$as_echo "$ac_ct_READELF" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+ if test "x$ac_ct_READELF" = x; then
+ READELF=":"
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ READELF=$ac_ct_READELF
+ fi
+else
+ READELF="$ac_cv_prog_READELF"
+fi
+
+
+
+
+# Hack to ensure that INSTALL won't be set to "../" with autoconf 2.13. */
+ac_given_INSTALL=$INSTALL
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5
+$as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; }
+ # Check whether --enable-maintainer-mode was given.
+if test "${enable_maintainer_mode+set}" = set; then :
+ enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval
+else
+ USE_MAINTAINER_MODE=no
+fi
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_MAINTAINER_MODE" >&5
+$as_echo "$USE_MAINTAINER_MODE" >&6; }
+ if test $USE_MAINTAINER_MODE = yes; then
+ MAINTAINER_MODE_TRUE=
+ MAINTAINER_MODE_FALSE='#'
+else
+ MAINTAINER_MODE_TRUE='#'
+ MAINTAINER_MODE_FALSE=
+fi
+
+ MAINT=$MAINTAINER_MODE_TRUE
+
+
+# By default we simply use the C compiler to build assembly code.
+
+test "${CCAS+set}" = set || CCAS=$CC
+test "${CCASFLAGS+set}" = set || CCASFLAGS=$CFLAGS
+
+
+
+
+# We need AC_EXEEXT to keep automake happy in cygnus mode. However,
+# at least currently, we never actually build a program, so we never
+# need to use $(EXEEXT). Moreover, the test for EXEEXT normally
+# fails, because we are probably configuring with a cross compiler
+# which can't create executables. So we include AC_EXEEXT to keep
+# automake happy, but we don't execute it, since we don't care about
+# the result.
+if false; then
+
+ dummy_var=1
+fi
+
+. ${newlib_basedir}/configure.host
+
+newlib_cflags="${newlib_cflags} -fno-builtin"
+
+NEWLIB_CFLAGS=${newlib_cflags}
+
+
+NO_INCLUDE_LIST=${noinclude}
+
+
+LDFLAGS=${ldflags}
+
+
+ if test x${newlib_elix_level} = x0; then
+ ELIX_LEVEL_0_TRUE=
+ ELIX_LEVEL_0_FALSE='#'
+else
+ ELIX_LEVEL_0_TRUE='#'
+ ELIX_LEVEL_0_FALSE=
+fi
+
+ if test x${newlib_elix_level} = x1; then
+ ELIX_LEVEL_1_TRUE=
+ ELIX_LEVEL_1_FALSE='#'
+else
+ ELIX_LEVEL_1_TRUE='#'
+ ELIX_LEVEL_1_FALSE=
+fi
+
+ if test x${newlib_elix_level} = x2; then
+ ELIX_LEVEL_2_TRUE=
+ ELIX_LEVEL_2_FALSE='#'
+else
+ ELIX_LEVEL_2_TRUE='#'
+ ELIX_LEVEL_2_FALSE=
+fi
+
+ if test x${newlib_elix_level} = x3; then
+ ELIX_LEVEL_3_TRUE=
+ ELIX_LEVEL_3_FALSE='#'
+else
+ ELIX_LEVEL_3_TRUE='#'
+ ELIX_LEVEL_3_FALSE=
+fi
+
+ if test x${newlib_elix_level} = x4; then
+ ELIX_LEVEL_4_TRUE=
+ ELIX_LEVEL_4_FALSE='#'
+else
+ ELIX_LEVEL_4_TRUE='#'
+ ELIX_LEVEL_4_FALSE=
+fi
+
+
+ if test x${use_libtool} = xyes; then
+ USE_LIBTOOL_TRUE=
+ USE_LIBTOOL_FALSE='#'
+else
+ USE_LIBTOOL_TRUE='#'
+ USE_LIBTOOL_FALSE=
+fi
+
+
+# Hard-code OBJEXT. Normally it is set by AC_OBJEXT, but we
+# use oext, which is set in configure.host based on the target platform.
+OBJEXT=${oext}
+
+
+
+
+
+
+
+
+
+
+
+ac_config_files="$ac_config_files Makefile"
+
+cat >confcache <<\_ACEOF
+# This file is a shell script that caches the results of configure
+# tests run on this system so they can be shared between configure
+# scripts and configure runs, see configure's option --config-cache.
+# It is not useful on other systems. If it contains results you don't
+# want to keep, you may remove or edit it.
+#
+# config.status only pays attention to the cache file if you give it
+# the --recheck option to rerun configure.
+#
+# `ac_cv_env_foo' variables (set or unset) will be overridden when
+# loading this file, other *unset* `ac_cv_foo' will be assigned the
+# following values.
+
+_ACEOF
+
+# The following way of writing the cache mishandles newlines in values,
+# but we know of no workaround that is simple, portable, and efficient.
+# So, we kill variables containing newlines.
+# Ultrix sh set writes to stderr and can't be redirected directly,
+# and sets the high bit in the cache file unless we assign to the vars.
+(
+ for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
+ eval ac_val=\$$ac_var
+ case $ac_val in #(
+ *${as_nl}*)
+ case $ac_var in #(
+ *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
+$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
+ esac
+ case $ac_var in #(
+ _ | IFS | as_nl) ;; #(
+ BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
+ *) { eval $ac_var=; unset $ac_var;} ;;
+ esac ;;
+ esac
+ done
+
+ (set) 2>&1 |
+ case $as_nl`(ac_space=' '; set) 2>&1` in #(
+ *${as_nl}ac_space=\ *)
+ # `set' does not quote correctly, so add quotes: double-quote
+ # substitution turns \\\\ into \\, and sed turns \\ into \.
+ sed -n \
+ "s/'/'\\\\''/g;
+ s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
+ ;; #(
+ *)
+ # `set' quotes correctly as required by POSIX, so do not add quotes.
+ sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
+ ;;
+ esac |
+ sort
+) |
+ sed '
+ /^ac_cv_env_/b end
+ t clear
+ :clear
+ s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
+ t end
+ s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
+ :end' >>confcache
+if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
+ if test -w "$cache_file"; then
+ if test "x$cache_file" != "x/dev/null"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
+$as_echo "$as_me: updating cache $cache_file" >&6;}
+ if test ! -f "$cache_file" || test -h "$cache_file"; then
+ cat confcache >"$cache_file"
+ else
+ case $cache_file in #(
+ */* | ?:*)
+ mv -f confcache "$cache_file"$$ &&
+ mv -f "$cache_file"$$ "$cache_file" ;; #(
+ *)
+ mv -f confcache "$cache_file" ;;
+ esac
+ fi
+ fi
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
+$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
+ fi
+fi
+rm -f confcache
+
+test "x$prefix" = xNONE && prefix=$ac_default_prefix
+# Let make expand exec_prefix.
+test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
+
+# Transform confdefs.h into DEFS.
+# Protect against shell expansion while executing Makefile rules.
+# Protect against Makefile macro expansion.
+#
+# If the first sed substitution is executed (which looks for macros that
+# take arguments), then branch to the quote section. Otherwise,
+# look for a macro that doesn't take arguments.
+ac_script='
+:mline
+/\\$/{
+ N
+ s,\\\n,,
+ b mline
+}
+t clear
+:clear
+s/^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*([^)]*)\)[ ]*\(.*\)/-D\1=\2/g
+t quote
+s/^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)/-D\1=\2/g
+t quote
+b any
+:quote
+s/[ `~#$^&*(){}\\|;'\''"<>?]/\\&/g
+s/\[/\\&/g
+s/\]/\\&/g
+s/\$/$$/g
+H
+:any
+${
+ g
+ s/^\n//
+ s/\n/ /g
+ p
+}
+'
+DEFS=`sed -n "$ac_script" confdefs.h`
+
+
+ac_libobjs=
+ac_ltlibobjs=
+U=
+for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
+ # 1. Remove the extension, and $U if already installed.
+ ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
+ ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
+ # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
+ # will be set to the directory where LIBOBJS objects are built.
+ as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
+ as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
+done
+LIBOBJS=$ac_libobjs
+
+LTLIBOBJS=$ac_ltlibobjs
+
+
+if test -z "${MAY_SUPPLY_SYSCALLS_TRUE}" && test -z "${MAY_SUPPLY_SYSCALLS_FALSE}"; then
+ as_fn_error $? "conditional \"MAY_SUPPLY_SYSCALLS\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+
+if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then
+ as_fn_error $? "conditional \"AMDEP\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
+ as_fn_error $? "conditional \"am__fastdepCC\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then
+ as_fn_error $? "conditional \"MAINTAINER_MODE\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${ELIX_LEVEL_0_TRUE}" && test -z "${ELIX_LEVEL_0_FALSE}"; then
+ as_fn_error $? "conditional \"ELIX_LEVEL_0\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${ELIX_LEVEL_1_TRUE}" && test -z "${ELIX_LEVEL_1_FALSE}"; then
+ as_fn_error $? "conditional \"ELIX_LEVEL_1\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${ELIX_LEVEL_2_TRUE}" && test -z "${ELIX_LEVEL_2_FALSE}"; then
+ as_fn_error $? "conditional \"ELIX_LEVEL_2\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${ELIX_LEVEL_3_TRUE}" && test -z "${ELIX_LEVEL_3_FALSE}"; then
+ as_fn_error $? "conditional \"ELIX_LEVEL_3\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${ELIX_LEVEL_4_TRUE}" && test -z "${ELIX_LEVEL_4_FALSE}"; then
+ as_fn_error $? "conditional \"ELIX_LEVEL_4\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${USE_LIBTOOL_TRUE}" && test -z "${USE_LIBTOOL_FALSE}"; then
+ as_fn_error $? "conditional \"USE_LIBTOOL\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+
+: "${CONFIG_STATUS=./config.status}"
+ac_write_fail=0
+ac_clean_files_save=$ac_clean_files
+ac_clean_files="$ac_clean_files $CONFIG_STATUS"
+{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
+$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
+as_write_fail=0
+cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
+#! $SHELL
+# Generated by $as_me.
+# Run this file to recreate the current configuration.
+# Compiler output produced by configure, useful for debugging
+# configure, is in config.log if it exists.
+
+debug=false
+ac_cs_recheck=false
+ac_cs_silent=false
+
+SHELL=\${CONFIG_SHELL-$SHELL}
+export SHELL
+_ASEOF
+cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
+## -------------------- ##
+## M4sh Initialization. ##
+## -------------------- ##
+
+# Be more Bourne compatible
+DUALCASE=1; export DUALCASE # for MKS sh
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
+ emulate sh
+ NULLCMD=:
+ # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
+ # is contrary to our usage. Disable this feature.
+ alias -g '${1+"$@"}'='"$@"'
+ setopt NO_GLOB_SUBST
+else
+ case `(set -o) 2>/dev/null` in #(
+ *posix*) :
+ set -o posix ;; #(
+ *) :
+ ;;
+esac
+fi
+
+
+as_nl='
+'
+export as_nl
+# Printing a long string crashes Solaris 7 /usr/bin/printf.
+as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
+as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
+as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
+# Prefer a ksh shell builtin over an external printf program on Solaris,
+# but without wasting forks for bash or zsh.
+if test -z "$BASH_VERSION$ZSH_VERSION" \
+ && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
+ as_echo='print -r --'
+ as_echo_n='print -rn --'
+elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
+ as_echo='printf %s\n'
+ as_echo_n='printf %s'
+else
+ if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
+ as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
+ as_echo_n='/usr/ucb/echo -n'
+ else
+ as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
+ as_echo_n_body='eval
+ arg=$1;
+ case $arg in #(
+ *"$as_nl"*)
+ expr "X$arg" : "X\\(.*\\)$as_nl";
+ arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
+ esac;
+ expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
+ '
+ export as_echo_n_body
+ as_echo_n='sh -c $as_echo_n_body as_echo'
+ fi
+ export as_echo_body
+ as_echo='sh -c $as_echo_body as_echo'
+fi
+
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+ PATH_SEPARATOR=:
+ (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
+ (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
+ PATH_SEPARATOR=';'
+ }
+fi
+
+
+# IFS
+# We need space, tab and new line, in precisely that order. Quoting is
+# there to prevent editors from complaining about space-tab.
+# (If _AS_PATH_WALK were called with IFS unset, it would disable word
+# splitting by setting IFS to empty value.)
+IFS=" "" $as_nl"
+
+# Find who we are. Look in the path if we contain no directory separator.
+as_myself=
+case $0 in #((
+ *[\\/]* ) as_myself=$0 ;;
+ *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
+ done
+IFS=$as_save_IFS
+
+ ;;
+esac
+# We did not find ourselves, most probably we were run as `sh COMMAND'
+# in which case we are not to be found in the path.
+if test "x$as_myself" = x; then
+ as_myself=$0
+fi
+if test ! -f "$as_myself"; then
+ $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
+ exit 1
+fi
+
+# Unset variables that we do not need and which cause bugs (e.g. in
+# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
+# suppresses any "Segmentation fault" message there. '((' could
+# trigger a bug in pdksh 5.2.14.
+for as_var in BASH_ENV ENV MAIL MAILPATH
+do eval test x\${$as_var+set} = xset \
+ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
+done
+PS1='$ '
+PS2='> '
+PS4='+ '
+
+# NLS nuisances.
+LC_ALL=C
+export LC_ALL
+LANGUAGE=C
+export LANGUAGE
+
+# CDPATH.
+(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
+
+
+# as_fn_error STATUS ERROR [LINENO LOG_FD]
+# ----------------------------------------
+# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
+# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
+# script with STATUS, using 1 if that was 0.
+as_fn_error ()
+{
+ as_status=$1; test $as_status -eq 0 && as_status=1
+ if test "$4"; then
+ as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
+ fi
+ $as_echo "$as_me: error: $2" >&2
+ as_fn_exit $as_status
+} # as_fn_error
+
+
+# as_fn_set_status STATUS
+# -----------------------
+# Set $? to STATUS, without forking.
+as_fn_set_status ()
+{
+ return $1
+} # as_fn_set_status
+
+# as_fn_exit STATUS
+# -----------------
+# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
+as_fn_exit ()
+{
+ set +e
+ as_fn_set_status $1
+ exit $1
+} # as_fn_exit
+
+# as_fn_unset VAR
+# ---------------
+# Portably unset VAR.
+as_fn_unset ()
+{
+ { eval $1=; unset $1;}
+}
+as_unset=as_fn_unset
+# as_fn_append VAR VALUE
+# ----------------------
+# Append the text in VALUE to the end of the definition contained in VAR. Take
+# advantage of any shell optimizations that allow amortized linear growth over
+# repeated appends, instead of the typical quadratic growth present in naive
+# implementations.
+if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
+ eval 'as_fn_append ()
+ {
+ eval $1+=\$2
+ }'
+else
+ as_fn_append ()
+ {
+ eval $1=\$$1\$2
+ }
+fi # as_fn_append
+
+# as_fn_arith ARG...
+# ------------------
+# Perform arithmetic evaluation on the ARGs, and store the result in the
+# global $as_val. Take advantage of shells that can avoid forks. The arguments
+# must be portable across $(()) and expr.
+if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
+ eval 'as_fn_arith ()
+ {
+ as_val=$(( $* ))
+ }'
+else
+ as_fn_arith ()
+ {
+ as_val=`expr "$@" || test $? -eq 1`
+ }
+fi # as_fn_arith
+
+
+if expr a : '\(a\)' >/dev/null 2>&1 &&
+ test "X`expr 00001 : '.*\(...\)'`" = X001; then
+ as_expr=expr
+else
+ as_expr=false
+fi
+
+if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
+ as_basename=basename
+else
+ as_basename=false
+fi
+
+if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
+ as_dirname=dirname
+else
+ as_dirname=false
+fi
+
+as_me=`$as_basename -- "$0" ||
+$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
+ X"$0" : 'X\(//\)$' \| \
+ X"$0" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X/"$0" |
+ sed '/^.*\/\([^/][^/]*\)\/*$/{
+ s//\1/
+ q
+ }
+ /^X\/\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\/\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+
+# Avoid depending upon Character Ranges.
+as_cr_letters='abcdefghijklmnopqrstuvwxyz'
+as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
+as_cr_Letters=$as_cr_letters$as_cr_LETTERS
+as_cr_digits='0123456789'
+as_cr_alnum=$as_cr_Letters$as_cr_digits
+
+ECHO_C= ECHO_N= ECHO_T=
+case `echo -n x` in #(((((
+-n*)
+ case `echo 'xy\c'` in
+ *c*) ECHO_T=' ';; # ECHO_T is single tab character.
+ xy) ECHO_C='\c';;
+ *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
+ ECHO_T=' ';;
+ esac;;
+*)
+ ECHO_N='-n';;
+esac
+
+rm -f conf$$ conf$$.exe conf$$.file
+if test -d conf$$.dir; then
+ rm -f conf$$.dir/conf$$.file
+else
+ rm -f conf$$.dir
+ mkdir conf$$.dir 2>/dev/null
+fi
+if (echo >conf$$.file) 2>/dev/null; then
+ if ln -s conf$$.file conf$$ 2>/dev/null; then
+ as_ln_s='ln -s'
+ # ... but there are two gotchas:
+ # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
+ # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
+ # In both cases, we have to default to `cp -p'.
+ ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
+ as_ln_s='cp -p'
+ elif ln conf$$.file conf$$ 2>/dev/null; then
+ as_ln_s=ln
+ else
+ as_ln_s='cp -p'
+ fi
+else
+ as_ln_s='cp -p'
+fi
+rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
+rmdir conf$$.dir 2>/dev/null
+
+
+# as_fn_mkdir_p
+# -------------
+# Create "$as_dir" as a directory, including parents if necessary.
+as_fn_mkdir_p ()
+{
+
+ case $as_dir in #(
+ -*) as_dir=./$as_dir;;
+ esac
+ test -d "$as_dir" || eval $as_mkdir_p || {
+ as_dirs=
+ while :; do
+ case $as_dir in #(
+ *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
+ *) as_qdir=$as_dir;;
+ esac
+ as_dirs="'$as_qdir' $as_dirs"
+ as_dir=`$as_dirname -- "$as_dir" ||
+$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$as_dir" : 'X\(//\)[^/]' \| \
+ X"$as_dir" : 'X\(//\)$' \| \
+ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$as_dir" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)[^/].*/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+ test -d "$as_dir" && break
+ done
+ test -z "$as_dirs" || eval "mkdir $as_dirs"
+ } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
+
+
+} # as_fn_mkdir_p
+if mkdir -p . 2>/dev/null; then
+ as_mkdir_p='mkdir -p "$as_dir"'
+else
+ test -d ./-p && rmdir ./-p
+ as_mkdir_p=false
+fi
+
+if test -x / >/dev/null 2>&1; then
+ as_test_x='test -x'
+else
+ if ls -dL / >/dev/null 2>&1; then
+ as_ls_L_option=L
+ else
+ as_ls_L_option=
+ fi
+ as_test_x='
+ eval sh -c '\''
+ if test -d "$1"; then
+ test -d "$1/.";
+ else
+ case $1 in #(
+ -*)set "./$1";;
+ esac;
+ case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
+ ???[sx]*):;;*)false;;esac;fi
+ '\'' sh
+ '
+fi
+as_executable_p=$as_test_x
+
+# Sed expression to map a string onto a valid CPP name.
+as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
+
+# Sed expression to map a string onto a valid variable name.
+as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
+
+
+exec 6>&1
+## ----------------------------------- ##
+## Main body of $CONFIG_STATUS script. ##
+## ----------------------------------- ##
+_ASEOF
+test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+# Save the log message, to keep $0 and so on meaningful, and to
+# report actual input values of CONFIG_FILES etc. instead of their
+# values after options handling.
+ac_log="
+This file was extended by newlib $as_me 2.4.0, which was
+generated by GNU Autoconf 2.68. Invocation command line was
+
+ CONFIG_FILES = $CONFIG_FILES
+ CONFIG_HEADERS = $CONFIG_HEADERS
+ CONFIG_LINKS = $CONFIG_LINKS
+ CONFIG_COMMANDS = $CONFIG_COMMANDS
+ $ $0 $@
+
+on `(hostname || uname -n) 2>/dev/null | sed 1q`
+"
+
+_ACEOF
+
+case $ac_config_files in *"
+"*) set x $ac_config_files; shift; ac_config_files=$*;;
+esac
+
+
+
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+# Files that config.status was made for.
+config_files="$ac_config_files"
+config_commands="$ac_config_commands"
+
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+ac_cs_usage="\
+\`$as_me' instantiates files and other configuration actions
+from templates according to the current configuration. Unless the files
+and actions are specified as TAGs, all are instantiated by default.
+
+Usage: $0 [OPTION]... [TAG]...
+
+ -h, --help print this help, then exit
+ -V, --version print version number and configuration settings, then exit
+ --config print configuration, then exit
+ -q, --quiet, --silent
+ do not print progress messages
+ -d, --debug don't remove temporary files
+ --recheck update $as_me by reconfiguring in the same conditions
+ --file=FILE[:TEMPLATE]
+ instantiate the configuration file FILE
+
+Configuration files:
+$config_files
+
+Configuration commands:
+$config_commands
+
+Report bugs to the package provider."
+
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
+ac_cs_version="\\
+newlib config.status 2.4.0
+configured by $0, generated by GNU Autoconf 2.68,
+ with options \\"\$ac_cs_config\\"
+
+Copyright (C) 2010 Free Software Foundation, Inc.
+This config.status script is free software; the Free Software Foundation
+gives unlimited permission to copy, distribute and modify it."
+
+ac_pwd='$ac_pwd'
+srcdir='$srcdir'
+INSTALL='$INSTALL'
+MKDIR_P='$MKDIR_P'
+AWK='$AWK'
+test -n "\$AWK" || AWK=awk
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+# The default lists apply if the user does not specify any file.
+ac_need_defaults=:
+while test $# != 0
+do
+ case $1 in
+ --*=?*)
+ ac_option=`expr "X$1" : 'X\([^=]*\)='`
+ ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
+ ac_shift=:
+ ;;
+ --*=)
+ ac_option=`expr "X$1" : 'X\([^=]*\)='`
+ ac_optarg=
+ ac_shift=:
+ ;;
+ *)
+ ac_option=$1
+ ac_optarg=$2
+ ac_shift=shift
+ ;;
+ esac
+
+ case $ac_option in
+ # Handling of the options.
+ -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
+ ac_cs_recheck=: ;;
+ --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
+ $as_echo "$ac_cs_version"; exit ;;
+ --config | --confi | --conf | --con | --co | --c )
+ $as_echo "$ac_cs_config"; exit ;;
+ --debug | --debu | --deb | --de | --d | -d )
+ debug=: ;;
+ --file | --fil | --fi | --f )
+ $ac_shift
+ case $ac_optarg in
+ *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
+ '') as_fn_error $? "missing file argument" ;;
+ esac
+ as_fn_append CONFIG_FILES " '$ac_optarg'"
+ ac_need_defaults=false;;
+ --he | --h | --help | --hel | -h )
+ $as_echo "$ac_cs_usage"; exit ;;
+ -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+ | -silent | --silent | --silen | --sile | --sil | --si | --s)
+ ac_cs_silent=: ;;
+
+ # This is an error.
+ -*) as_fn_error $? "unrecognized option: \`$1'
+Try \`$0 --help' for more information." ;;
+
+ *) as_fn_append ac_config_targets " $1"
+ ac_need_defaults=false ;;
+
+ esac
+ shift
+done
+
+ac_configure_extra_args=
+
+if $ac_cs_silent; then
+ exec 6>/dev/null
+ ac_configure_extra_args="$ac_configure_extra_args --silent"
+fi
+
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+if \$ac_cs_recheck; then
+ set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
+ shift
+ \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
+ CONFIG_SHELL='$SHELL'
+ export CONFIG_SHELL
+ exec "\$@"
+fi
+
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+exec 5>>config.log
+{
+ echo
+ sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
+## Running $as_me. ##
+_ASBOX
+ $as_echo "$ac_log"
+} >&5
+
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+#
+# INIT-COMMANDS
+#
+AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"
+
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+
+# Handling of arguments.
+for ac_config_target in $ac_config_targets
+do
+ case $ac_config_target in
+ "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
+ "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
+
+ *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
+ esac
+done
+
+
+# If the user did not use the arguments to specify the items to instantiate,
+# then the envvar interface is used. Set only those that are not.
+# We use the long form for the default assignment because of an extremely
+# bizarre bug on SunOS 4.1.3.
+if $ac_need_defaults; then
+ test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
+ test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
+fi
+
+# Have a temporary directory for convenience. Make it in the build tree
+# simply because there is no reason against having it here, and in addition,
+# creating and moving files from /tmp can sometimes cause problems.
+# Hook for its removal unless debugging.
+# Note that there is a small window in which the directory will not be cleaned:
+# after its creation but before its name has been assigned to `$tmp'.
+$debug ||
+{
+ tmp= ac_tmp=
+ trap 'exit_status=$?
+ : "${ac_tmp:=$tmp}"
+ { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
+' 0
+ trap 'as_fn_exit 1' 1 2 13 15
+}
+# Create a (secure) tmp directory for tmp files.
+
+{
+ tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
+ test -d "$tmp"
+} ||
+{
+ tmp=./conf$$-$RANDOM
+ (umask 077 && mkdir "$tmp")
+} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
+ac_tmp=$tmp
+
+# Set up the scripts for CONFIG_FILES section.
+# No need to generate them if there are no CONFIG_FILES.
+# This happens for instance with `./config.status config.h'.
+if test -n "$CONFIG_FILES"; then
+
+
+ac_cr=`echo X | tr X '\015'`
+# On cygwin, bash can eat \r inside `` if the user requested igncr.
+# But we know of no other shell where ac_cr would be empty at this
+# point, so we can use a bashism as a fallback.
+if test "x$ac_cr" = x; then
+ eval ac_cr=\$\'\\r\'
+fi
+ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
+if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
+ ac_cs_awk_cr='\\r'
+else
+ ac_cs_awk_cr=$ac_cr
+fi
+
+echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
+_ACEOF
+
+
+{
+ echo "cat >conf$$subs.awk <<_ACEOF" &&
+ echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
+ echo "_ACEOF"
+} >conf$$subs.sh ||
+ as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
+ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
+ac_delim='%!_!# '
+for ac_last_try in false false false false false :; do
+ . ./conf$$subs.sh ||
+ as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
+
+ ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
+ if test $ac_delim_n = $ac_delim_num; then
+ break
+ elif $ac_last_try; then
+ as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
+ else
+ ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
+ fi
+done
+rm -f conf$$subs.sh
+
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
+_ACEOF
+sed -n '
+h
+s/^/S["/; s/!.*/"]=/
+p
+g
+s/^[^!]*!//
+:repl
+t repl
+s/'"$ac_delim"'$//
+t delim
+:nl
+h
+s/\(.\{148\}\)..*/\1/
+t more1
+s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
+p
+n
+b repl
+:more1
+s/["\\]/\\&/g; s/^/"/; s/$/"\\/
+p
+g
+s/.\{148\}//
+t nl
+:delim
+h
+s/\(.\{148\}\)..*/\1/
+t more2
+s/["\\]/\\&/g; s/^/"/; s/$/"/
+p
+b
+:more2
+s/["\\]/\\&/g; s/^/"/; s/$/"\\/
+p
+g
+s/.\{148\}//
+t delim
+' <conf$$subs.awk | sed '
+/^[^""]/{
+ N
+ s/\n//
+}
+' >>$CONFIG_STATUS || ac_write_fail=1
+rm -f conf$$subs.awk
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+_ACAWK
+cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
+ for (key in S) S_is_set[key] = 1
+ FS = ""
+
+}
+{
+ line = $ 0
+ nfields = split(line, field, "@")
+ substed = 0
+ len = length(field[1])
+ for (i = 2; i < nfields; i++) {
+ key = field[i]
+ keylen = length(key)
+ if (S_is_set[key]) {
+ value = S[key]
+ line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
+ len += length(value) + length(field[++i])
+ substed = 1
+ } else
+ len += 1 + keylen
+ }
+
+ print line
+}
+
+_ACAWK
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
+ sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
+else
+ cat
+fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
+ || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
+_ACEOF
+
+# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
+# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
+# trailing colons and then remove the whole line if VPATH becomes empty
+# (actually we leave an empty line to preserve line numbers).
+if test "x$srcdir" = x.; then
+ ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
+h
+s///
+s/^/:/
+s/[ ]*$/:/
+s/:\$(srcdir):/:/g
+s/:\${srcdir}:/:/g
+s/:@srcdir@:/:/g
+s/^:*//
+s/:*$//
+x
+s/\(=[ ]*\).*/\1/
+G
+s/\n//
+s/^[^=]*=[ ]*$//
+}'
+fi
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+fi # test -n "$CONFIG_FILES"
+
+
+eval set X " :F $CONFIG_FILES :C $CONFIG_COMMANDS"
+shift
+for ac_tag
+do
+ case $ac_tag in
+ :[FHLC]) ac_mode=$ac_tag; continue;;
+ esac
+ case $ac_mode$ac_tag in
+ :[FHL]*:*);;
+ :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
+ :[FH]-) ac_tag=-:-;;
+ :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
+ esac
+ ac_save_IFS=$IFS
+ IFS=:
+ set x $ac_tag
+ IFS=$ac_save_IFS
+ shift
+ ac_file=$1
+ shift
+
+ case $ac_mode in
+ :L) ac_source=$1;;
+ :[FH])
+ ac_file_inputs=
+ for ac_f
+ do
+ case $ac_f in
+ -) ac_f="$ac_tmp/stdin";;
+ *) # Look for the file first in the build tree, then in the source tree
+ # (if the path is not absolute). The absolute path cannot be DOS-style,
+ # because $ac_f cannot contain `:'.
+ test -f "$ac_f" ||
+ case $ac_f in
+ [\\/$]*) false;;
+ *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
+ esac ||
+ as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
+ esac
+ case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
+ as_fn_append ac_file_inputs " '$ac_f'"
+ done
+
+ # Let's still pretend it is `configure' which instantiates (i.e., don't
+ # use $as_me), people would be surprised to read:
+ # /* config.h. Generated by config.status. */
+ configure_input='Generated from '`
+ $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
+ `' by configure.'
+ if test x"$ac_file" != x-; then
+ configure_input="$ac_file. $configure_input"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
+$as_echo "$as_me: creating $ac_file" >&6;}
+ fi
+ # Neutralize special characters interpreted by sed in replacement strings.
+ case $configure_input in #(
+ *\&* | *\|* | *\\* )
+ ac_sed_conf_input=`$as_echo "$configure_input" |
+ sed 's/[\\\\&|]/\\\\&/g'`;; #(
+ *) ac_sed_conf_input=$configure_input;;
+ esac
+
+ case $ac_tag in
+ *:-:* | *:-) cat >"$ac_tmp/stdin" \
+ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
+ esac
+ ;;
+ esac
+
+ ac_dir=`$as_dirname -- "$ac_file" ||
+$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$ac_file" : 'X\(//\)[^/]' \| \
+ X"$ac_file" : 'X\(//\)$' \| \
+ X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$ac_file" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)[^/].*/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+ as_dir="$ac_dir"; as_fn_mkdir_p
+ ac_builddir=.
+
+case "$ac_dir" in
+.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
+*)
+ ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
+ # A ".." for each directory in $ac_dir_suffix.
+ ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
+ case $ac_top_builddir_sub in
+ "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
+ *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
+ esac ;;
+esac
+ac_abs_top_builddir=$ac_pwd
+ac_abs_builddir=$ac_pwd$ac_dir_suffix
+# for backward compatibility:
+ac_top_builddir=$ac_top_build_prefix
+
+case $srcdir in
+ .) # We are building in place.
+ ac_srcdir=.
+ ac_top_srcdir=$ac_top_builddir_sub
+ ac_abs_top_srcdir=$ac_pwd ;;
+ [\\/]* | ?:[\\/]* ) # Absolute name.
+ ac_srcdir=$srcdir$ac_dir_suffix;
+ ac_top_srcdir=$srcdir
+ ac_abs_top_srcdir=$srcdir ;;
+ *) # Relative name.
+ ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
+ ac_top_srcdir=$ac_top_build_prefix$srcdir
+ ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
+esac
+ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
+
+
+ case $ac_mode in
+ :F)
+ #
+ # CONFIG_FILE
+ #
+
+ case $INSTALL in
+ [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
+ *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
+ esac
+ ac_MKDIR_P=$MKDIR_P
+ case $MKDIR_P in
+ [\\/$]* | ?:[\\/]* ) ;;
+ */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
+ esac
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+# If the template does not know about datarootdir, expand it.
+# FIXME: This hack should be removed a few years after 2.60.
+ac_datarootdir_hack=; ac_datarootdir_seen=
+ac_sed_dataroot='
+/datarootdir/ {
+ p
+ q
+}
+/@datadir@/p
+/@docdir@/p
+/@infodir@/p
+/@localedir@/p
+/@mandir@/p'
+case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
+*datarootdir*) ac_datarootdir_seen=yes;;
+*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
+$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+ ac_datarootdir_hack='
+ s&@datadir@&$datadir&g
+ s&@docdir@&$docdir&g
+ s&@infodir@&$infodir&g
+ s&@localedir@&$localedir&g
+ s&@mandir@&$mandir&g
+ s&\\\${datarootdir}&$datarootdir&g' ;;
+esac
+_ACEOF
+
+# Neutralize VPATH when `$srcdir' = `.'.
+# Shell code in configure.ac might set extrasub.
+# FIXME: do we really want to maintain this feature?
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+ac_sed_extra="$ac_vpsub
+$extrasub
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+:t
+/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
+s|@configure_input@|$ac_sed_conf_input|;t t
+s&@top_builddir@&$ac_top_builddir_sub&;t t
+s&@top_build_prefix@&$ac_top_build_prefix&;t t
+s&@srcdir@&$ac_srcdir&;t t
+s&@abs_srcdir@&$ac_abs_srcdir&;t t
+s&@top_srcdir@&$ac_top_srcdir&;t t
+s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
+s&@builddir@&$ac_builddir&;t t
+s&@abs_builddir@&$ac_abs_builddir&;t t
+s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
+s&@INSTALL@&$ac_INSTALL&;t t
+s&@MKDIR_P@&$ac_MKDIR_P&;t t
+$ac_datarootdir_hack
+"
+eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
+ >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
+
+test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
+ { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
+ { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
+ "$ac_tmp/out"`; test -z "$ac_out"; } &&
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
+which seems to be undefined. Please make sure it is defined" >&5
+$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
+which seems to be undefined. Please make sure it is defined" >&2;}
+
+ rm -f "$ac_tmp/stdin"
+ case $ac_file in
+ -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
+ *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
+ esac \
+ || as_fn_error $? "could not create $ac_file" "$LINENO" 5
+ ;;
+
+
+ :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
+$as_echo "$as_me: executing $ac_file commands" >&6;}
+ ;;
+ esac
+
+
+ case $ac_file$ac_mode in
+ "depfiles":C) test x"$AMDEP_TRUE" != x"" || {
+ # Autoconf 2.62 quotes --file arguments for eval, but not when files
+ # are listed without --file. Let's play safe and only enable the eval
+ # if we detect the quoting.
+ case $CONFIG_FILES in
+ *\'*) eval set x "$CONFIG_FILES" ;;
+ *) set x $CONFIG_FILES ;;
+ esac
+ shift
+ for mf
+ do
+ # Strip MF so we end up with the name of the file.
+ mf=`echo "$mf" | sed -e 's/:.*$//'`
+ # Check whether this is an Automake generated Makefile or not.
+ # We used to match only the files named `Makefile.in', but
+ # some people rename them; so instead we look at the file content.
+ # Grep'ing the first line is not enough: some people post-process
+ # each Makefile.in and add a new line on top of each file to say so.
+ # Grep'ing the whole file is not good either: AIX grep has a line
+ # limit of 2048, but all sed's we know have understand at least 4000.
+ if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
+ dirpart=`$as_dirname -- "$mf" ||
+$as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$mf" : 'X\(//\)[^/]' \| \
+ X"$mf" : 'X\(//\)$' \| \
+ X"$mf" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$mf" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)[^/].*/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+ else
+ continue
+ fi
+ # Extract the definition of DEPDIR, am__include, and am__quote
+ # from the Makefile without running `make'.
+ DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
+ test -z "$DEPDIR" && continue
+ am__include=`sed -n 's/^am__include = //p' < "$mf"`
+ test -z "am__include" && continue
+ am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
+ # When using ansi2knr, U may be empty or an underscore; expand it
+ U=`sed -n 's/^U = //p' < "$mf"`
+ # Find all dependency output files, they are included files with
+ # $(DEPDIR) in their names. We invoke sed twice because it is the
+ # simplest approach to changing $(DEPDIR) to its actual value in the
+ # expansion.
+ for file in `sed -n "
+ s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
+ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
+ # Make sure the directory exists.
+ test -f "$dirpart/$file" && continue
+ fdir=`$as_dirname -- "$file" ||
+$as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$file" : 'X\(//\)[^/]' \| \
+ X"$file" : 'X\(//\)$' \| \
+ X"$file" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$file" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)[^/].*/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+ as_dir=$dirpart/$fdir; as_fn_mkdir_p
+ # echo "creating $dirpart/$file"
+ echo '# dummy' > "$dirpart/$file"
+ done
+ done
+}
+ ;;
+
+ esac
+done # for ac_tag
+
+
+as_fn_exit 0
+_ACEOF
+ac_clean_files=$ac_clean_files_save
+
+test $ac_write_fail = 0 ||
+ as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
+
+
+# configure is writing to config.log, and then calls config.status.
+# config.status does its own redirection, appending to config.log.
+# Unfortunately, on DOS this fails, as config.log is still kept open
+# by configure, so config.status won't be able to write to it; its
+# output is simply discarded. So we exec the FD to /dev/null,
+# effectively closing config.log, so it can be properly (re)opened and
+# appended to by config.status. When coming back to configure, we
+# need to make the FD available again.
+if test "$no_create" != yes; then
+ ac_cs_success=:
+ ac_config_status_args=
+ test "$silent" = yes &&
+ ac_config_status_args="$ac_config_status_args --quiet"
+ exec 5>/dev/null
+ $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
+ exec 5>>config.log
+ # Use ||, not &&, to avoid exiting from the if with $? = 1, which
+ # would make configure fail if this is the last instruction.
+ $ac_cs_success || as_fn_exit 1
+fi
+if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
+$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
+fi
+
diff --git a/newlib/libc/machine/arc/configure.in b/newlib/libc/machine/arc/configure.in
new file mode 100644
index 000000000..0c7c1796d
--- /dev/null
+++ b/newlib/libc/machine/arc/configure.in
@@ -0,0 +1,13 @@
+dnl This is the newlib/libc/machine/arc configure.in file.
+dnl Process this file with autoconf to produce a configure script.
+
+AC_PREREQ(2.59)
+AC_INIT([newlib],[NEWLIB_VERSION])
+AC_CONFIG_SRCDIR([Makefile.am])
+
+dnl Can't be done in NEWLIB_CONFIGURE because that confuses automake.
+AC_CONFIG_AUX_DIR(../../../..)
+
+NEWLIB_CONFIGURE(../../..)
+
+AC_OUTPUT(Makefile)
diff --git a/newlib/libc/machine/arc/memcmp-bs-norm.S b/newlib/libc/machine/arc/memcmp-bs-norm.S
new file mode 100644
index 000000000..be2464ac0
--- /dev/null
+++ b/newlib/libc/machine/arc/memcmp-bs-norm.S
@@ -0,0 +1,225 @@
+/*
+ Copyright (c) 2015, Synopsys, Inc. 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) Neither the name of the Synopsys, Inc., 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 HOLDER 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.
+*/
+
+/* This implementation is optimized for performance. For code size a generic
+ implementation of this function from newlib/libc/string/memcmp.c will be
+ used. */
+#if !defined (__OPTIMIZE_SIZE__) && !defined (PREFER_SIZE_OVER_SPEED)
+
+#include "asm.h"
+
+#if !defined (__ARC601__) && defined (__ARC_NORM__) \
+ && defined (__ARC_BARREL_SHIFTER__)
+
+#ifdef __LITTLE_ENDIAN__
+#define WORD2 r2
+#define SHIFT r3
+#else /* BIG ENDIAN */
+#define WORD2 r3
+#define SHIFT r2
+#endif
+
+ENTRY (memcmp)
+ or r12,r0,r1
+ asl_s r12,r12,30
+#if defined (__ARC700__) || defined (__ARCEM__) || defined (__ARCHS__)
+ sub_l r3,r2,1
+ brls r2,r12,.Lbytewise
+#else
+ brls.d r2,r12,.Lbytewise
+ sub_s r3,r2,1
+#endif
+ ld r4,[r0,0]
+ ld r5,[r1,0]
+ lsr.f lp_count,r3,3
+#ifdef __ARCEM__
+ /* A branch can't be the last instruction in a zero overhead loop.
+ So we move the branch to the start of the loop, duplicate it
+ after the end, and set up r12 so that the branch isn't taken
+ initially. */
+ mov_s r12,WORD2
+ lpne .Loop_end
+ brne WORD2,r12,.Lodd
+ ld WORD2,[r0,4]
+#else
+ lpne .Loop_end
+ ld_s WORD2,[r0,4]
+#endif
+ ld_s r12,[r1,4]
+ brne r4,r5,.Leven
+ ld.a r4,[r0,8]
+ ld.a r5,[r1,8]
+#ifdef __ARCEM__
+.Loop_end:
+ brne WORD2,r12,.Lodd
+#else
+ brne WORD2,r12,.Lodd
+#ifdef __ARCHS__
+ nop
+#endif
+.Loop_end:
+#endif
+ asl_s SHIFT,SHIFT,3
+ bcc_s .Last_cmp
+ brne r4,r5,.Leven
+ ld r4,[r0,4]
+ ld r5,[r1,4]
+#ifdef __LITTLE_ENDIAN__
+#if defined (__ARC700__) || defined (__ARCEM__) || defined (__ARCHS__)
+ nop_s
+ ; one more load latency cycle
+.Last_cmp:
+ xor r0,r4,r5
+ bset r0,r0,SHIFT
+ sub_s r1,r0,1
+ bic_s r1,r1,r0
+ norm r1,r1
+ b.d .Leven_cmp
+ and r1,r1,24
+.Leven:
+ xor r0,r4,r5
+ sub_s r1,r0,1
+ bic_s r1,r1,r0
+ norm r1,r1
+ ; slow track insn
+ and r1,r1,24
+.Leven_cmp:
+ asl r2,r4,r1
+ asl r12,r5,r1
+ lsr_s r2,r2,1
+ lsr_s r12,r12,1
+ j_s.d [blink]
+ sub r0,r2,r12
+ .balign 4
+.Lodd:
+ xor r0,WORD2,r12
+ sub_s r1,r0,1
+ bic_s r1,r1,r0
+ norm r1,r1
+ ; slow track insn
+ and r1,r1,24
+ asl_s r2,r2,r1
+ asl_s r12,r12,r1
+ lsr_s r2,r2,1
+ lsr_s r12,r12,1
+ j_s.d [blink]
+ sub r0,r2,r12
+#else /* !__ARC700__ */
+ .balign 4
+.Last_cmp:
+ xor r0,r4,r5
+ b.d .Leven_cmp
+ bset r0,r0,SHIFT
+.Lodd:
+ mov_s r4,WORD2
+ mov_s r5,r12
+.Leven:
+ xor r0,r4,r5
+.Leven_cmp:
+ mov_s r1,0x80808080
+ ; uses long immediate
+ sub_s r12,r0,1
+ bic_s r0,r0,r12
+ sub r0,r1,r0
+ xor_s r0,r0,r1
+ and r1,r5,r0
+ and r0,r4,r0
+ xor.f 0,r0,r1
+ sub_s r0,r0,r1
+ j_s.d [blink]
+ mov.mi r0,r1
+#endif /* !__ARC700__ */
+#else /* BIG ENDIAN */
+.Last_cmp:
+ neg_s SHIFT,SHIFT
+ lsr r4,r4,SHIFT
+ lsr r5,r5,SHIFT
+ ; slow track insn
+.Leven:
+ sub.f r0,r4,r5
+ mov.ne r0,1
+ j_s.d [blink]
+ bset.cs r0,r0,31
+.Lodd:
+ cmp_s WORD2,r12
+#if defined (__ARC700__) || defined (__ARCEM__) || defined (__ARCHS__)
+ mov_s r0,1
+ j_s.d [blink]
+ bset.cs r0,r0,31
+#else
+ j_s.d [blink]
+ rrc r0,2
+#endif /* __ARC700__ || __ARCEM__ || __ARCHS__ */
+#endif /* ENDIAN */
+ .balign 4
+.Lbytewise:
+ breq r2,0,.Lnil
+ ldb r4,[r0,0]
+ ldb r5,[r1,0]
+ lsr.f lp_count,r3
+#ifdef __ARCEM__
+ mov r12,r3
+ lpne .Lbyte_end
+ brne r3,r12,.Lbyte_odd
+#else
+ lpne .Lbyte_end
+#endif
+ ldb_s r3,[r0,1]
+ ldb_l r12,[r1,1]
+ brne r4,r5,.Lbyte_even
+ ldb.a r4,[r0,2]
+ ldb.a r5,[r1,2]
+#ifdef __ARCEM__
+.Lbyte_end:
+ brne r3,r12,.Lbyte_odd
+#else
+ brne r3,r12,.Lbyte_odd
+#ifdef __ARCHS__
+ nop
+#endif
+.Lbyte_end:
+#endif
+ bcc_l .Lbyte_even
+ brne r4,r5,.Lbyte_even
+ ldb_s r3,[r0,1]
+ ldb_s r12,[r1,1]
+.Lbyte_odd:
+ j_s.d [blink]
+ sub r0,r3,r12
+.Lbyte_even:
+ j_s.d [blink]
+ sub r0,r4,r5
+.Lnil:
+ j_s.d [blink]
+ mov_l r0,0
+ENDFUNC (memcmp)
+#endif /* !__ARC601__ && __ARC_NORM__ && __ARC_BARREL_SHIFTER__ */
+
+#endif /* !__OPTIMIZE_SIZE__ && !PREFER_SIZE_OVER_SPEED */
diff --git a/newlib/libc/machine/arc/memcmp-stub.c b/newlib/libc/machine/arc/memcmp-stub.c
new file mode 100644
index 000000000..30c7884d2
--- /dev/null
+++ b/newlib/libc/machine/arc/memcmp-stub.c
@@ -0,0 +1,36 @@
+/*
+ Copyright (c) 2015, Synopsys, Inc. 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) Neither the name of the Synopsys, Inc., 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 HOLDER 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 (__OPTIMIZE_SIZE__) || defined (PREFER_SIZE_OVER_SPEED)
+# include "../../string/memcmp.c"
+#else
+/* See memcmp-*.S. */
+#endif
diff --git a/newlib/libc/machine/arc/memcmp.S b/newlib/libc/machine/arc/memcmp.S
new file mode 100644
index 000000000..7c5a05882
--- /dev/null
+++ b/newlib/libc/machine/arc/memcmp.S
@@ -0,0 +1,154 @@
+/*
+ Copyright (c) 2015, Synopsys, Inc. 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) Neither the name of the Synopsys, Inc., 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 HOLDER 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.
+*/
+
+/* This implementation is optimized for performance. For code size a generic
+ implementation of this function from newlib/libc/string/memcmp.c will be
+ used. */
+#if !defined (__OPTIMIZE_SIZE__) && !defined (PREFER_SIZE_OVER_SPEED)
+
+#include "asm.h"
+
+#if defined (__ARC601__) || !defined (__ARC_NORM__) \
+ || !defined (__ARC_BARREL_SHIFTER__)
+
+/* Addresses are unsigned, and at 0 is the vector table, so it's OK to assume
+ that we can subtract 8 from a source end address without underflow. */
+
+ENTRY (memcmp)
+ or r12,r0,r1
+ tst r12,3
+ breq r2,0,.Lnil
+ add_s r3,r0,r2
+
+/* This algorithm for big endian targets sometimes works incorrectly
+ when sources are aligned. To be precise the last step is omitted.
+ Just use a simple bytewise variant until the algorithm is reviewed
+ and fixed. */
+
+#ifdef __LITTLE_ENDIAN__
+ bne_s .Lbytewise
+#else /* BIG ENDIAN */
+ b_s .Lbytewise
+#endif /* ENDIAN */
+ sub r6,r3,8
+ ld r4,[r0,0]
+ ld r5,[r1,0]
+2:
+ brhs r0,r6,.Loop_end
+ ld_s r3,[r0,4]
+ ld_s r12,[r1,4]
+ brne r4,r5,.Leven
+ ld.a r4,[r0,8]
+ breq.d r3,r12,2b
+ ld.a r5,[r1,8]
+#ifdef __LITTLE_ENDIAN__
+ mov_s r4,r3
+ b.d .Lodd
+ mov_s r5,r12
+#else /* BIG ENDIAN */
+ cmp_s r3,r12
+ j_s.d [blink]
+ rrc r0,2
+#endif /* ENDIAN */
+
+ .balign 4
+.Loop_end:
+ sub r3,r0,r6
+ brhs r3,4,.Last_cmp
+ brne r4,r5,.Leven
+ ld r4,[r0,4]
+ ld r5,[r1,4]
+#ifdef __LITTLE_ENDIAN__
+ .balign 4
+.Last_cmp:
+ mov_l r0,24
+ add3 r2,r0,r2
+ xor r0,r4,r5
+ b.d .Leven_cmp
+ bset r0,r0,r2
+.Lodd:
+.Leven:
+ xor r0,r4,r5
+.Leven_cmp:
+ mov_s r1,0x80808080
+ ; uses long immediate
+ sub_s r12,r0,1
+ bic_s r0,r0,r12
+ sub r0,r1,r0
+ xor_s r0,r0,r1
+ and r1,r5,r0
+ and r0,r4,r0
+#else /* BIG ENDIAN */
+.Last_cmp:
+ mov_s r3,0
+ sub3 r2,r3,r2
+ sub_s r3,r3,1
+ bclr r3,r3,r2
+ add_l r3,r3,1
+ and r0,r4,r3
+ and r1,r5,r3
+.Leven:
+#endif /* ENDIAN */
+ xor.f 0,r0,r1
+ sub_s r0,r0,r1
+ j_s.d [blink]
+ mov.mi r0,r1
+ .balign 4
+.Lbytewise:
+ ldb r4,[r0,0]
+ ldb r5,[r1,0]
+ sub r6,r3,2
+3:
+ brhs r0,r6,.Lbyte_end
+ ldb_s r3,[r0,1]
+ ldb_s r12,[r1,1]
+ brne r4,r5,.Lbyte_even
+ ldb.a r4,[r0,2]
+ breq.d r3,r12,3b
+ ldb.a r5,[r1,2]
+.Lbyte_odd:
+ j_s.d [blink]
+ sub r0,r3,r12
+ .balign 4
+.Lbyte_end:
+ bbit1 r2,0,.Lbyte_even
+ brne r4,r5,.Lbyte_even
+ ldb r4,[r0,1]
+ ldb r5,[r1,1]
+.Lbyte_even:
+ j_s.d [blink]
+ sub r0,r4,r5
+.Lnil:
+ j_s.d [blink]
+ mov_s r0,0
+ENDFUNC (memcmp)
+#endif /* __ARC601__ || !__ARC_NORM__ || !__ARC_BARREL_SHIFTER__ */
+
+#endif /* !__OPTIMIZE_SIZE__ && !PREFER_SIZE_OVER_SPEED */
diff --git a/newlib/libc/machine/arc/memcpy-archs.S b/newlib/libc/machine/arc/memcpy-archs.S
new file mode 100644
index 000000000..2673cee98
--- /dev/null
+++ b/newlib/libc/machine/arc/memcpy-archs.S
@@ -0,0 +1,268 @@
+/*
+ Copyright (c) 2015, Synopsys, Inc. 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) Neither the name of the Synopsys, Inc., 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 HOLDER 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.
+*/
+
+/* This implementation is optimized for performance. For code size a generic
+ implementation of this function from newlib/libc/string/memcpy.c will be
+ used. */
+#if !defined (__OPTIMIZE_SIZE__) && !defined (PREFER_SIZE_OVER_SPEED)
+
+#include "asm.h"
+
+#if defined (__ARCHS__)
+
+#ifdef __LITTLE_ENDIAN__
+# define SHIFT_1(RX,RY,IMM) asl RX, RY, IMM ; <<
+# define SHIFT_2(RX,RY,IMM) lsr RX, RY, IMM ; >>
+# define MERGE_1(RX,RY,IMM) asl RX, RY, IMM
+# define MERGE_2(RX,RY,IMM)
+# define EXTRACT_1(RX,RY,IMM) and RX, RY, 0xFFFF
+# define EXTRACT_2(RX,RY,IMM) lsr RX, RY, IMM
+#else
+# define SHIFT_1(RX,RY,IMM) lsr RX, RY, IMM ; >>
+# define SHIFT_2(RX,RY,IMM) asl RX, RY, IMM ; <<
+# define MERGE_1(RX,RY,IMM) asl RX, RY, IMM ; <<
+# define MERGE_2(RX,RY,IMM) asl RX, RY, IMM ; <<
+# define EXTRACT_1(RX,RY,IMM) lsr RX, RY, IMM
+# define EXTRACT_2(RX,RY,IMM) lsr RX, RY, 0x08
+#endif
+
+#ifdef __ARC_LL64__
+# define PREFETCH_READ(RX) prefetch [RX, 56]
+# define PREFETCH_WRITE(RX) prefetchw [RX, 64]
+# define LOADX(DST,RX) ldd.ab DST, [RX, 8]
+# define STOREX(SRC,RX) std.ab SRC, [RX, 8]
+# define ZOLSHFT 5
+# define ZOLAND 0x1F
+#else
+# define PREFETCH_READ(RX) prefetch [RX, 28]
+# define PREFETCH_WRITE(RX) prefetchw [RX, 32]
+# define LOADX(DST,RX) ld.ab DST, [RX, 4]
+# define STOREX(SRC,RX) st.ab SRC, [RX, 4]
+# define ZOLSHFT 4
+# define ZOLAND 0xF
+#endif
+
+ENTRY (memcpy)
+ prefetch [r1] ; Prefetch the read location
+ prefetchw [r0] ; Prefetch the write location
+ mov.f 0, r2
+; if size is zero
+ jz.d [blink]
+ mov r3, r0 ; don't clobber ret val
+
+; if size <= 8
+ cmp r2, 8
+ bls.d @.Lsmallchunk
+ mov.f lp_count, r2
+
+ and.f r4, r0, 0x03
+ rsub lp_count, r4, 4
+ lpnz @.Laligndestination
+ ; LOOP BEGIN
+ ldb.ab r5, [r1,1]
+ sub r2, r2, 1
+ stb.ab r5, [r3,1]
+.Laligndestination:
+
+; Check the alignment of the source
+ and.f r4, r1, 0x03
+ bnz.d @.Lsourceunaligned
+
+; CASE 0: Both source and destination are 32bit aligned
+; Convert len to Dwords, unfold x4
+ lsr.f lp_count, r2, ZOLSHFT
+ lpnz @.Lcopy32_64bytes
+ ; LOOP START
+ LOADX (r6, r1)
+ PREFETCH_READ (r1)
+ PREFETCH_WRITE (r3)
+ LOADX (r8, r1)
+ LOADX (r10, r1)
+ LOADX (r4, r1)
+ STOREX (r6, r3)
+ STOREX (r8, r3)
+ STOREX (r10, r3)
+ STOREX (r4, r3)
+.Lcopy32_64bytes:
+
+ and.f lp_count, r2, ZOLAND ;Last remaining 31 bytes
+.Lsmallchunk:
+ lpnz @.Lcopyremainingbytes
+ ; LOOP START
+ ldb.ab r5, [r1,1]
+ stb.ab r5, [r3,1]
+.Lcopyremainingbytes:
+
+ j [blink]
+; END CASE 0
+
+.Lsourceunaligned:
+ cmp r4, 2
+ beq.d @.LunalignedOffby2
+ sub r2, r2, 1
+
+ bhi.d @.LunalignedOffby3
+ ldb.ab r5, [r1, 1]
+
+; CASE 1: The source is unaligned, off by 1
+ ; Hence I need to read 1 byte for a 16bit alignment
+ ; and 2bytes to reach 32bit alignment
+ ldh.ab r6, [r1, 2]
+ sub r2, r2, 2
+ ; Convert to words, unfold x2
+ lsr.f lp_count, r2, 3
+ MERGE_1 (r6, r6, 8)
+ MERGE_2 (r5, r5, 24)
+ or r5, r5, r6
+
+ ; Both src and dst are aligned
+ lpnz @.Lcopy8bytes_1
+ ; LOOP START
+ ld.ab r6, [r1, 4]
+ prefetch [r1, 28] ;Prefetch the next read location
+ ld.ab r8, [r1,4]
+ prefetchw [r3, 32] ;Prefetch the next write location
+
+ SHIFT_1 (r7, r6, 24)
+ or r7, r7, r5
+ SHIFT_2 (r5, r6, 8)
+
+ SHIFT_1 (r9, r8, 24)
+ or r9, r9, r5
+ SHIFT_2 (r5, r8, 8)
+
+ st.ab r7, [r3, 4]
+ st.ab r9, [r3, 4]
+.Lcopy8bytes_1:
+
+ ; Write back the remaining 16bits
+ EXTRACT_1 (r6, r5, 16)
+ sth.ab r6, [r3, 2]
+ ; Write back the remaining 8bits
+ EXTRACT_2 (r5, r5, 16)
+ stb.ab r5, [r3, 1]
+
+ and.f lp_count, r2, 0x07 ;Last 8bytes
+ lpnz @.Lcopybytewise_1
+ ; LOOP START
+ ldb.ab r6, [r1,1]
+ stb.ab r6, [r3,1]
+.Lcopybytewise_1:
+ j [blink]
+
+.LunalignedOffby2:
+; CASE 2: The source is unaligned, off by 2
+ ldh.ab r5, [r1, 2]
+ sub r2, r2, 1
+
+ ; Both src and dst are aligned
+ ; Convert to words, unfold x2
+ lsr.f lp_count, r2, 3
+#ifdef __BIG_ENDIAN__
+ asl.nz r5, r5, 16
+#endif
+ lpnz @.Lcopy8bytes_2
+ ; LOOP START
+ ld.ab r6, [r1, 4]
+ prefetch [r1, 28] ;Prefetch the next read location
+ ld.ab r8, [r1,4]
+ prefetchw [r3, 32] ;Prefetch the next write location
+
+ SHIFT_1 (r7, r6, 16)
+ or r7, r7, r5
+ SHIFT_2 (r5, r6, 16)
+
+ SHIFT_1 (r9, r8, 16)
+ or r9, r9, r5
+ SHIFT_2 (r5, r8, 16)
+
+ st.ab r7, [r3, 4]
+ st.ab r9, [r3, 4]
+.Lcopy8bytes_2:
+
+#ifdef __BIG_ENDIAN__
+ lsr.nz r5, r5, 16
+#endif
+ sth.ab r5, [r3, 2]
+
+ and.f lp_count, r2, 0x07 ;Last 8bytes
+ lpnz @.Lcopybytewise_2
+ ; LOOP START
+ ldb.ab r6, [r1,1]
+ stb.ab r6, [r3,1]
+.Lcopybytewise_2:
+ j [blink]
+
+.LunalignedOffby3:
+; CASE 3: The source is unaligned, off by 3
+; Hence, I need to read 1byte for achieve the 32bit alignment
+
+ ; Both src and dst are aligned
+ ; Convert to words, unfold x2
+ lsr.f lp_count, r2, 3
+#ifdef __BIG_ENDIAN__
+ asl.ne r5, r5, 24
+#endif
+ lpnz @.Lcopy8bytes_3
+ ; LOOP START
+ ld.ab r6, [r1, 4]
+ prefetch [r1, 28] ;Prefetch the next read location
+ ld.ab r8, [r1,4]
+ prefetchw [r3, 32] ;Prefetch the next write location
+
+ SHIFT_1 (r7, r6, 8)
+ or r7, r7, r5
+ SHIFT_2 (r5, r6, 24)
+
+ SHIFT_1 (r9, r8, 8)
+ or r9, r9, r5
+ SHIFT_2 (r5, r8, 24)
+
+ st.ab r7, [r3, 4]
+ st.ab r9, [r3, 4]
+.Lcopy8bytes_3:
+
+#ifdef __BIG_ENDIAN__
+ lsr.nz r5, r5, 24
+#endif
+ stb.ab r5, [r3, 1]
+
+ and.f lp_count, r2, 0x07 ;Last 8bytes
+ lpnz @.Lcopybytewise_3
+ ; LOOP START
+ ldb.ab r6, [r1,1]
+ stb.ab r6, [r3,1]
+.Lcopybytewise_3:
+ j [blink]
+
+ENDFUNC (memcpy)
+#endif /* __ARCHS__ */
+
+#endif /* !__OPTIMIZE_SIZE__ && !PREFER_SIZE_OVER_SPEED */
diff --git a/newlib/libc/machine/arc/memcpy-bs.S b/newlib/libc/machine/arc/memcpy-bs.S
new file mode 100644
index 000000000..5a224eb8b
--- /dev/null
+++ b/newlib/libc/machine/arc/memcpy-bs.S
@@ -0,0 +1,105 @@
+/*
+ Copyright (c) 2015, Synopsys, Inc. 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) Neither the name of the Synopsys, Inc., 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 HOLDER 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.
+*/
+
+/* This implementation is optimized for performance. For code size a generic
+ implementation of this function from newlib/libc/string/memcpy.c will be
+ used. */
+#if !defined (__OPTIMIZE_SIZE__) && !defined (PREFER_SIZE_OVER_SPEED)
+
+#include "asm.h"
+
+#if !defined (__ARC601__) && !defined (__ARCHS__) \
+ && defined (__ARC_BARREL_SHIFTER__)
+
+/* Mostly optimized for ARC700, but not bad for ARC600 either. */
+/* This memcpy implementation does not support objects of 1GB or larger -
+ the check for alignment does not work then. */
+/* We assume that most sources and destinations are aligned, and
+ that also lengths are mostly a multiple of four, although to a lesser
+ extent. */
+ENTRY (memcpy)
+ or r3,r0,r1
+ asl_s r3,r3,30
+ mov_s r5,r0
+ brls.d r2,r3,.Lcopy_bytewise
+ sub.f r3,r2,1
+ ld_s r12,[r1,0]
+ asr.f lp_count,r3,3
+ bbit0.d r3,2,.Lnox4
+ bmsk_s r2,r2,1
+ st.ab r12,[r5,4]
+ ld.a r12,[r1,4]
+.Lnox4:
+ lppnz .Lendloop
+ ld_s r3,[r1,4]
+ st.ab r12,[r5,4]
+ ld.a r12,[r1,8]
+ st.ab r3,[r5,4]
+.Lendloop:
+ breq_l r2,0,.Last_store
+ ld r3,[r5,0]
+#ifdef __LITTLE_ENDIAN__
+ add3 r2,-1,r2
+ ; uses long immediate
+ xor_s r12,r12,r3
+ bmsk r12,r12,r2
+ xor_s r12,r12,r3
+#else /* BIG ENDIAN */
+ sub3 r2,31,r2
+ ; uses long immediate
+ xor_s r3,r3,r12
+ bmsk r3,r3,r2
+ xor_s r12,r12,r3
+#endif /* ENDIAN */
+.Last_store:
+ j_s.d [blink]
+ st r12,[r5,0]
+
+ .balign 4
+.Lcopy_bytewise:
+ jcs [blink]
+ ldb_s r12,[r1,0]
+ lsr.f lp_count,r3
+ bcc_s .Lnox1
+ stb.ab r12,[r5,1]
+ ldb.a r12,[r1,1]
+.Lnox1:
+ lppnz .Lendbloop
+ ldb_s r3,[r1,1]
+ stb.ab r12,[r5,1]
+ ldb.a r12,[r1,2]
+ stb.ab r3,[r5,1]
+.Lendbloop:
+ j_s.d [blink]
+ stb r12,[r5,0]
+ENDFUNC (memcpy)
+#endif /* !__ARC601__ && !__ARCHS__ && __ARC_BARREL_SHIFTER__ */
+
+#endif /* !__OPTIMIZE_SIZE__ && !PREFER_SIZE_OVER_SPEED */
diff --git a/newlib/libc/machine/arc/memcpy-stub.c b/newlib/libc/machine/arc/memcpy-stub.c
new file mode 100644
index 000000000..cc46c2d08
--- /dev/null
+++ b/newlib/libc/machine/arc/memcpy-stub.c
@@ -0,0 +1,36 @@
+/*
+ Copyright (c) 2015, Synopsys, Inc. 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) Neither the name of the Synopsys, Inc., 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 HOLDER 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 (__OPTIMIZE_SIZE__) || defined (PREFER_SIZE_OVER_SPEED)
+# include "../../string/memcpy.c"
+#else
+/* See memcpy-*.S. */
+#endif
diff --git a/newlib/libc/machine/arc/memcpy.S b/newlib/libc/machine/arc/memcpy.S
new file mode 100644
index 000000000..6452f975e
--- /dev/null
+++ b/newlib/libc/machine/arc/memcpy.S
@@ -0,0 +1,111 @@
+/*
+ Copyright (c) 2015, Synopsys, Inc. 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) Neither the name of the Synopsys, Inc., 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 HOLDER 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.
+*/
+
+/* This implementation is optimized for performance. For code size a generic
+ implementation of this function from newlib/libc/string/memcpy.c will be
+ used. */
+#if !defined (__OPTIMIZE_SIZE__) && !defined (PREFER_SIZE_OVER_SPEED)
+
+#include "asm.h"
+
+#if defined (__ARC601__) || \
+ (!defined (__ARC_BARREL_SHIFTER__) && !defined (__ARCHS__))
+
+/* Adapted from memcpy-bs.S. */
+/* We assume that most sources and destinations are aligned, and
+ that also lengths are mostly a multiple of four, although to a lesser
+ extent. */
+ENTRY (memcpy)
+ or r3,r0,r1
+ bmsk.f 0,r3,1
+ breq_s r2,0,.Lnil
+ mov_s r5,r0
+ bne.d .Lcopy_bytewise
+ add r6,r0,r2
+ sub_s r3,r2,1
+ ld_s r12,[r1,0]
+ bbit0.d r3,2,.Lnox4
+ sub r6,r6,8
+ st.ab r12,[r5,4]
+ ld.a r12,[r1,4]
+.Lnox4:
+ brlo r2,9,.Lendloop
+.Lnox4a:
+ ld_s r3,[r1,4]
+ st.ab r12,[r5,8]
+ ld.a r12,[r1,8]
+ brlo.d r5,r6,.Lnox4a
+ st r3,[r5,-4]
+.Lendloop:
+#ifdef __LITTLE_ENDIAN__
+ ld r3,[r5,0]
+ add3 r2,-1,r2
+ ; uses long immediate
+ xor_s r12,r12,r3
+ bmsk r12,r12,r2
+ xor_s r12,r12,r3
+#else /* BIG ENDIAN */
+ bmsk_s r2,r2,1
+ breq_s r2,0,.Last_store
+ ld r3,[r5,0]
+ sub3 r2,31,r2
+ ; uses long immediate
+ xor_s r3,r3,r12
+ bmsk r3,r3,r2
+ xor_s r12,r12,r3
+#endif /* ENDIAN */
+.Last_store:
+ j_s.d [blink]
+ st r12,[r5,0]
+
+.Lnil:
+ j_s [blink]
+ .balign 4
+.Lcopy_bytewise:
+ ldb_s r12,[r1,0]
+ bbit1.d r2,0,.Lnox1
+ sub r6,r6,2
+ stb.ab r12,[r5,1]
+ ldb.a r12,[r1,1]
+.Lnox1:
+ brlo r2,3,.Lendbloop
+.Lnox1a:
+ ldb_s r3,[r1,1]
+ stb.ab r12,[r5,2]
+ ldb.a r12,[r1,2]
+ brlo.d r5,r6,.Lnox1a
+ stb r3,[r5,-1]
+.Lendbloop:
+ j_s.d [blink]
+ stb r12,[r5,0]
+ENDFUNC (memcpy)
+#endif /* __ARC601__ || (!__ARC_BARREL_SHIFTER__ && !__ARCHS__) */
+
+#endif /* !__OPTIMIZE_SIZE__ && !PREFER_SIZE_OVER_SPEED */
diff --git a/newlib/libc/machine/arc/memset-archs.S b/newlib/libc/machine/arc/memset-archs.S
new file mode 100644
index 000000000..188b5c490
--- /dev/null
+++ b/newlib/libc/machine/arc/memset-archs.S
@@ -0,0 +1,146 @@
+/*
+ Copyright (c) 2015, Synopsys, Inc. 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) Neither the name of the Synopsys, Inc., 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 HOLDER 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.
+*/
+
+/* This implementation is optimized for performance. For code size a generic
+ implementation of this function from newlib/libc/string/memset.c will be
+ used. */
+#if !defined (__OPTIMIZE_SIZE__) && !defined (PREFER_SIZE_OVER_SPEED)
+
+#include "asm.h"
+
+#ifdef __ARCHS__
+
+#ifdef USE_PREFETCH
+#define PREWRITE(A,B) prefetchw [(A),(B)]
+#else
+#define PREWRITE(A,B) prealloc [(A),(B)]
+#endif
+
+ENTRY (memset)
+ prefetchw [r0] ; Prefetch the write location
+ mov.f 0, r2
+; if size is zero
+ jz.d [blink]
+ mov r3, r0 ; don't clobber ret val
+
+; if length < 8
+ brls.d.nt r2, 8, .Lsmallchunk
+ mov.f lp_count,r2
+
+ and.f r4, r0, 0x03
+ rsub lp_count, r4, 4
+ lpnz @.Laligndestination
+ ; LOOP BEGIN
+ stb.ab r1, [r3,1]
+ sub r2, r2, 1
+.Laligndestination:
+
+; Destination is aligned
+ and r1, r1, 0xFF
+ asl r4, r1, 8
+ or r4, r4, r1
+ asl r5, r4, 16
+ or r5, r5, r4
+ mov r4, r5
+
+ sub3 lp_count, r2, 8
+ cmp r2, 64
+ bmsk.hi r2, r2, 5
+ mov.ls lp_count, 0
+ add3.hi r2, r2, 8
+
+; Convert len to Dwords, unfold x8
+ lsr.f lp_count, lp_count, 6
+ lpnz @.Lset64bytes
+ ; LOOP START
+ PREWRITE (r3, 64) ;Prefetch the next write location
+#ifdef __ARC_LL64__
+ std.ab r4, [r3, 8]
+ std.ab r4, [r3, 8]
+ std.ab r4, [r3, 8]
+ std.ab r4, [r3, 8]
+ std.ab r4, [r3, 8]
+ std.ab r4, [r3, 8]
+ std.ab r4, [r3, 8]
+ std.ab r4, [r3, 8]
+#else
+ st.ab r4, [r3, 4]
+ st.ab r4, [r3, 4]
+ st.ab r4, [r3, 4]
+ st.ab r4, [r3, 4]
+ st.ab r4, [r3, 4]
+ st.ab r4, [r3, 4]
+ st.ab r4, [r3, 4]
+ st.ab r4, [r3, 4]
+ st.ab r4, [r3, 4]
+ st.ab r4, [r3, 4]
+ st.ab r4, [r3, 4]
+ st.ab r4, [r3, 4]
+ st.ab r4, [r3, 4]
+ st.ab r4, [r3, 4]
+ st.ab r4, [r3, 4]
+ st.ab r4, [r3, 4]
+#endif
+.Lset64bytes:
+
+ lsr.f lp_count, r2, 5 ;Last remaining max 124 bytes
+ lpnz .Lset32bytes
+ ; LOOP START
+ prefetchw [r3, 32] ;Prefetch the next write location
+#ifdef __ARC_LL64__
+ std.ab r4, [r3, 8]
+ std.ab r4, [r3, 8]
+ std.ab r4, [r3, 8]
+ std.ab r4, [r3, 8]
+#else
+ st.ab r4, [r3, 4]
+ st.ab r4, [r3, 4]
+ st.ab r4, [r3, 4]
+ st.ab r4, [r3, 4]
+ st.ab r4, [r3, 4]
+ st.ab r4, [r3, 4]
+ st.ab r4, [r3, 4]
+ st.ab r4, [r3, 4]
+#endif
+.Lset32bytes:
+
+ and.f lp_count, r2, 0x1F ;Last remaining 31 bytes
+.Lsmallchunk:
+ lpnz .Lcopy3bytes
+ ; LOOP START
+ stb.ab r1, [r3, 1]
+.Lcopy3bytes:
+
+ j [blink]
+
+ENDFUNC (memset)
+#endif /* __ARCHS__ */
+
+#endif /* !__OPTIMIZE_SIZE__ && !PREFER_SIZE_OVER_SPEED */
diff --git a/newlib/libc/machine/arc/memset-bs.S b/newlib/libc/machine/arc/memset-bs.S
new file mode 100644
index 000000000..0206668ac
--- /dev/null
+++ b/newlib/libc/machine/arc/memset-bs.S
@@ -0,0 +1,154 @@
+/*
+ Copyright (c) 2015, Synopsys, Inc. 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) Neither the name of the Synopsys, Inc., 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 HOLDER 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.
+*/
+
+/* This implementation is optimized for performance. For code size a generic
+ implementation of this function from newlib/libc/string/memset.c will be
+ used. */
+#if !defined (__OPTIMIZE_SIZE__) && !defined (PREFER_SIZE_OVER_SPEED)
+
+#include "asm.h"
+
+/* ARC HS has it's own implementation of memset, yet we want this function
+ still to be compiled under "__dummy_memset" disguise, because strncpy
+ function uses __strncpy_bzero as a second entry point into memset. Would be
+ better to add __strncpy_bzero label to memset for ARC HS though, and even
+ better would be to avoid a second entry point into function. ARC HS always
+ has barrel-shifter, so this implementation will be always used for this
+ purpose. */
+#if !defined (__ARC601__) && defined (__ARC_BARREL_SHIFTER__)
+
+/* To deal with alignment/loop issues, SMALL must be at least 2. */
+#define SMALL 7
+
+ .global __strncpy_bzero
+ .hidden __strncpy_bzero
+/* __strncpy_bzero provides the following interface to strncpy:
+ r0: return value
+ r2: zeroing length
+ r3: zeroing start address
+ No attempt is made here for __strncpy_memset to speed up aligned
+ cases, because the copying of a string presumably leaves start address
+ and length alignment for the zeroing randomly distributed. */
+
+#ifdef __ARCHS__
+ENTRY (__dummy_memset)
+#else
+ENTRY (memset)
+#endif
+#if !defined (__ARC700__) && !defined (__ARCEM__)
+#undef SMALL
+#define SMALL 8 /* Even faster if aligned. */
+ brls.d r2,SMALL,.Ltiny
+#endif
+ mov_s r3,r0
+ or r12,r0,r2
+ bmsk.f r12,r12,1
+ extb_s r1,r1
+ asl r12,r1,8
+ beq.d .Laligned
+ or_s r1,r1,r12
+#if defined (__ARC700__) || defined (__ARCEM__)
+ brls r2,SMALL,.Ltiny
+#endif
+.Lnot_tiny:
+ add_s r12,r2,r0
+ stb r1,[r12,-1]
+ bclr_l r12,r12,0
+ stw r1,[r12,-2]
+ bmsk.f r12,r3,1
+ add_s r2,r2,r12
+ sub.ne r2,r2,4
+ stb.ab r1,[r3,1]
+ bclr_s r3,r3,0
+ stw.ab r1,[r3,2]
+ bclr_s r3,r3,1
+.Laligned: ; This code address should be aligned for speed.
+#if defined (__ARC700__) || defined (__ARCEM__)
+ asl r12,r1,16
+ lsr.f lp_count,r2,2
+ or_s r1,r1,r12
+ lpne .Loop_end
+ st.ab r1,[r3,4]
+.Loop_end:
+ j_s [blink]
+#else /* !__ARC700 */
+ lsr.f lp_count,r2,3
+ asl r12,r1,16
+ or_s r1,r1,r12
+ lpne .Loop_end
+ st.ab r1,[r3,4]
+ st.ab r1,[r3,4]
+.Loop_end:
+ jcc [blink]
+ j_s.d [blink]
+ st_s r1,[r3]
+#endif /* !__ARC700 */
+
+#if defined (__ARC700__) || defined (__ARCEM__)
+ .balign 4
+__strncpy_bzero:
+ brhi.d r2,17,.Lnot_tiny
+ mov_l r1,0
+.Ltiny:
+ mov.f lp_count,r2
+ lpne .Ltiny_end
+ stb.ab r1,[r3,1]
+.Ltiny_end:
+ j_s [blink]
+#else /* !__ARC700__ */
+#if SMALL > 8
+FIXME
+#endif
+ .balign 4
+__strncpy_bzero:
+ brhi.d r2,8,.Lnot_tiny
+ mov_s r1,0
+.Ltiny:
+ sub_s r2,r2,11
+ sub1 r12,pcl,r2
+ j_s [r12]
+ stb_s r1,[r3,7]
+ stb_s r1,[r3,6]
+ stb_s r1,[r3,5]
+ stb_s r1,[r3,4]
+ stb_s r1,[r3,3]
+ stb_s r1,[r3,2]
+ stb_s r1,[r3,1]
+ stb_s r1,[r3]
+ j_s [blink]
+#endif /* !__ARC700 */
+#ifdef __ARCHS__
+ENDFUNC (__dummy_memset)
+#else
+ENDFUNC (memset)
+#endif
+#endif /* !__ARC601__ && __ARC_BARREL_SHIFTER__ */
+
+#endif /* !__OPTIMIZE_SIZE__ && !PREFER_SIZE_OVER_SPEED */
diff --git a/newlib/libc/machine/arc/memset-stub.c b/newlib/libc/machine/arc/memset-stub.c
new file mode 100644
index 000000000..981ca1f30
--- /dev/null
+++ b/newlib/libc/machine/arc/memset-stub.c
@@ -0,0 +1,36 @@
+/*
+ Copyright (c) 2015, Synopsys, Inc. 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) Neither the name of the Synopsys, Inc., 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 HOLDER 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 (__OPTIMIZE_SIZE__) || defined (PREFER_SIZE_OVER_SPEED)
+# include "../../string/memset.c"
+#else
+/* See memset-*.S. */
+#endif
diff --git a/newlib/libc/machine/arc/memset.S b/newlib/libc/machine/arc/memset.S
new file mode 100644
index 000000000..126d9ff7c
--- /dev/null
+++ b/newlib/libc/machine/arc/memset.S
@@ -0,0 +1,110 @@
+/*
+ Copyright (c) 2015, Synopsys, Inc. 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) Neither the name of the Synopsys, Inc., 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 HOLDER 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.
+*/
+
+/* This implementation is optimized for performance. For code size a generic
+ implementation of this function from newlib/libc/string/memset.c will be
+ used. */
+#if !defined (__OPTIMIZE_SIZE__) && !defined (PREFER_SIZE_OVER_SPEED)
+
+#include "asm.h"
+
+#if defined (__ARC601__) \
+ || (!defined (__ARC_BARREL_SHIFTER__) && !defined (__ARCHS__))
+
+/* To deal with alignment/loop issues, SMALL must be at least 2. */
+#define SMALL 8 /* Even faster if aligned. */
+
+ .global __strncpy_bzero
+ .hidden __strncpy_bzero
+/* __strncpy_bzero provides the following interface to strncpy:
+ r0: return value
+ r2: zeroing length
+ r3: zeroing start address
+ No attempt is made here for __strncpy_memset to speed up aligned
+ cases, because the copying of a string presumably leaves start address
+ and length alignment for the zeroing randomly distributed. */
+
+ENTRY (memset)
+ brls.d r2,SMALL,.Ltiny
+ mov_s r3,r0
+ or r12,r0,r2
+ bmsk.f r12,r12,1
+ breq_s r1,0,.Lbzero
+ mov r4,0
+ stb.a r1,[sp,-4]
+ stb r1,[sp,1]
+ stb r1,[sp,2]
+ stb r1,[sp,3]
+ ld.ab r1,[sp,4]
+.Lbzero:
+ beq.d .Laligned
+.Lbzero2:
+ add r6,r2,r3
+.Lnot_tiny:
+ stb r1,[r6,-1]
+ bclr r12,r6,0
+ stw r1,[r12,-2]
+ stb.ab r1,[r3,1]
+ bclr_s r3,r3,0
+ stw.ab r1,[r3,2]
+ bclr_s r3,r3,1
+.Laligned: ; This code address should be aligned for speed.
+ sub r6,r6,8
+ brlo.d r6,r3,.Loop_end
+ sub r6,r6,8
+3:
+ st_l r1,[r3,4]
+ brhs.d r6,r3,3b
+ st.ab r1,[r3,8]
+.Loop_end:
+ bic r12,r6,3
+ j_s.d [blink]
+ st_s r1,[r12,12]
+ .balign 4
+__strncpy_bzero:
+ brhi.d r2,8,.Lbzero2
+ mov_s r1,0
+.Ltiny:
+ sub_s r2,r2,11
+ sub1 r12,pcl,r2
+ j_s [r12]
+ stb_s r1,[r3,7]
+ stb_s r1,[r3,6]
+ stb_s r1,[r3,5]
+ stb_s r1,[r3,4]
+ stb_s r1,[r3,3]
+ stb_s r1,[r3,2]
+ stb_s r1,[r3,1]
+ stb_s r1,[r3]
+ j_s [blink]
+ENDFUNC (memset)
+#endif /* __ARC601__ || (!__ARC_BARREL_SHIFTER__ && !__ARCHS__) */
+
+#endif /* !__OPTIMIZE_SIZE__ && !PREFER_SIZE_OVER_SPEED */
diff --git a/newlib/libc/machine/arc/setjmp.S b/newlib/libc/machine/arc/setjmp.S
new file mode 100644
index 000000000..8e824f5cc
--- /dev/null
+++ b/newlib/libc/machine/arc/setjmp.S
@@ -0,0 +1,165 @@
+/*
+ Copyright (c) 2015, Synopsys, Inc. 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) Neither the name of the Synopsys, Inc., 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 HOLDER 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.
+*/
+
+/* ABI interface file
+ these are the stack mappings for the registers
+ as stored in the ABI for ARC */
+
+ .file "setjmp.S"
+
+ABIr13 = 0
+ABIr14 = ABIr13 + 4
+ABIr15 = ABIr14 + 4
+ABIr16 = ABIr15 + 4
+ABIr17 = ABIr16 + 4
+ABIr18 = ABIr17 + 4
+ABIr19 = ABIr18 + 4
+ABIr20 = ABIr19 + 4
+ABIr21 = ABIr20 + 4
+ABIr22 = ABIr21 + 4
+ABIr23 = ABIr22 + 4
+ABIr24 = ABIr23 + 4
+ABIr25 = ABIr24 + 4
+ABIr26 = ABIr25 + 4
+ABIr27 = ABIr26 + 4
+ABIr28 = ABIr27 + 4
+ABIr29 = ABIr28 + 4
+ABIr30 = ABIr29 + 4
+ABIr31 = ABIr30 + 4
+ABIlpc = ABIr31 + 4
+ABIlps = ABIlpc + 4
+ABIlpe = ABIlps + 4
+
+ABIflg = ABIlpe + 4
+ABImlo = ABIflg + 4
+ABImhi = ABImlo + 4
+
+ .text
+ .align 4
+ .global setjmp
+ .type setjmp,@function
+setjmp:
+ st r13, [r0, ABIr13]
+ st r14, [r0, ABIr14]
+ st r15, [r0, ABIr15]
+ st r16, [r0, ABIr16]
+ st r17, [r0, ABIr17]
+ st r18, [r0, ABIr18]
+ st r19, [r0, ABIr19]
+ st r20, [r0, ABIr20]
+ st r21, [r0, ABIr21]
+ st r22, [r0, ABIr22]
+ st r23, [r0, ABIr23]
+ st r24, [r0, ABIr24]
+ st r25, [r0, ABIr25]
+ st r26, [r0, ABIr26]
+ st r27, [r0, ABIr27]
+ st r28, [r0, ABIr28]
+ st r29, [r0, ABIr29]
+ st r30, [r0, ABIr30]
+ st blink, [r0, ABIr31]
+ st lp_count, [r0, ABIlpc]
+
+ lr r2, [lp_start]
+ lr r3, [lp_end]
+ st r2, [r0, ABIlps]
+ st r3, [r0, ABIlpe]
+
+#if (!defined (__ARC700__) && !defined (__ARCEM__) && !defined (__ARCHS__))
+; Till the configure changes are decided, and implemented, the code working on
+; mlo/mhi and using mul64 should be disabled.
+; st mlo, [r0, ABImlo]
+; st mhi, [r0, ABImhi]
+ lr r2, [status32]
+ st r2, [r0, ABIflg]
+#endif
+
+ j.d [blink]
+ mov r0,0
+.Lfe1:
+ .size setjmp,.Lfe1-setjmp
+
+ .align 4
+ .global longjmp
+ .type longjmp,@function
+longjmp:
+
+ ; load registers
+ ld r13, [r0, ABIr13]
+ ld r14, [r0, ABIr14]
+ ld r15, [r0, ABIr15]
+ ld r16, [r0, ABIr16]
+ ld r17, [r0, ABIr17]
+ ld r18, [r0, ABIr18]
+ ld r19, [r0, ABIr19]
+ ld r20, [r0, ABIr20]
+ ld r21, [r0, ABIr21]
+ ld r22, [r0, ABIr22]
+ ld r23, [r0, ABIr23]
+ ld r24, [r0, ABIr24]
+ ld r25, [r0, ABIr25]
+ ld r26, [r0, ABIr26]
+ ld r27, [r0, ABIr27]
+ ld r28, [r0, ABIr28]
+
+ ld r3, [r0, ABIr29]
+ mov r29, r3
+
+ ld r3, [r0, ABIr30]
+ mov r30, r3
+
+ ld blink, [r0, ABIr31]
+
+ ld r3, [r0, ABIlpc]
+ mov lp_count, r3
+
+ ld r2, [r0, ABIlps]
+ ld r3, [r0, ABIlpe]
+ sr r2, [lp_start]
+ sr r3, [lp_end]
+
+#if (!defined (__ARC700__) && !defined (__ARCEM__) && !defined (__ARCHS__))
+ ld r2, [r0, ABImlo]
+ ld r3, [r0, ABImhi]
+; We do not support restoring of mulhi and mlo registers, yet.
+
+; mulu64 0,r2,1 ; restores mlo
+; mov 0,mlo ; force multiply to finish
+; sr r3, [mulhi]
+ ld r2, [r0, ABIflg]
+ flag r2 ; restore "status32" register
+#endif
+
+ mov.f r1, r1 ; to avoid return 0 from longjmp
+ mov.eq r1, 1
+ j.d [blink]
+ mov r0,r1
+.Lfe2:
+ .size longjmp,.Lfe2-longjmp
diff --git a/newlib/libc/machine/arc/strchr-bs-norm.S b/newlib/libc/machine/arc/strchr-bs-norm.S
new file mode 100644
index 000000000..e69ac6c82
--- /dev/null
+++ b/newlib/libc/machine/arc/strchr-bs-norm.S
@@ -0,0 +1,166 @@
+/*
+ Copyright (c) 2015, Synopsys, Inc. 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) Neither the name of the Synopsys, Inc., 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 HOLDER 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.
+*/
+
+/* This implementation is optimized for performance. For code size a generic
+ implementation of this function from newlib/libc/string/strchr.c will be
+ used. */
+#if !defined (__OPTIMIZE_SIZE__) && !defined (PREFER_SIZE_OVER_SPEED)
+
+/* ARC700 has a relatively long pipeline and branch prediction, so we want
+ to avoid branches that are hard to predict. On the other hand, the
+ presence of the norm instruction makes it easier to operate on whole
+ words branch-free. */
+#include "asm.h"
+
+#if (defined (__ARC700__) || defined (__ARCEM__) || defined (__ARCHS__)) \
+ && defined (__ARC_NORM__) && defined (__ARC_BARREL_SHIFTER__)
+
+ENTRY (strchr)
+ extb_s r1,r1
+ asl r5,r1,8
+ bmsk r2,r0,1
+ or r5,r5,r1
+ mov_s r3,0x01010101
+ breq.d r2,r0,.Laligned
+ asl r4,r5,16
+ sub_s r0,r0,r2
+ asl r7,r2,3
+ ld_s r2,[r0]
+#ifdef __LITTLE_ENDIAN__
+ asl r7,r3,r7
+#else
+ lsr r7,r3,r7
+#endif
+ or r5,r5,r4
+ ror r4,r3
+ sub r12,r2,r7
+ bic_s r12,r12,r2
+ and r12,r12,r4
+ brne.d r12,0,.Lfound0_ua
+ xor r6,r2,r5
+ ld.a r2,[r0,4]
+ sub r12,r6,r7
+ bic r12,r12,r6
+#ifdef __LITTLE_ENDIAN__
+ and r7,r12,r4
+ breq r7,0,.Loop ; For speed, we want this branch to be unaligned.
+ b_l .Lfound_char ; Likewise this one.
+#else
+ and r12,r12,r4
+ breq_l r12,0,.Loop ; For speed, we want this branch to be unaligned.
+ lsr_s r12,r12,7
+ bic r2,r7,r6
+ b.d .Lfound_char_b
+ and_s r2,r2,r12
+#endif
+; /* We require this code address to be unaligned for speed... */
+.Laligned:
+ ld_s r2,[r0]
+ or r5,r5,r4
+ ror r4,r3
+; /* ... so that this code address is aligned, for itself and ... */
+.Loop:
+ sub r12,r2,r3
+ bic_s r12,r12,r2
+ and r12,r12,r4
+ brne.d r12,0,.Lfound0
+ xor r6,r2,r5
+ ld.a r2,[r0,4]
+ sub r12,r6,r3
+ bic r12,r12,r6
+ and r7,r12,r4
+ breq r7,0,.Loop /* ... so that this branch is unaligned. */
+ ; Found searched-for character. r0 has already advanced to next word.
+#ifdef __LITTLE_ENDIAN__
+/* We only need the information about the first matching byte
+ (i.e. the least significant matching byte) to be exact,
+ hence there is no problem with carry effects. */
+.Lfound_char:
+ sub r3,r7,1
+ bic r3,r3,r7
+ norm r2,r3
+ sub_s r0,r0,1
+ asr_s r2,r2,3
+ j_l.d [blink]
+ sub_s r0,r0,r2
+
+ .balign 4
+.Lfound0_ua:
+ mov_l r3,r7
+.Lfound0:
+ sub r3,r6,r3
+ bic r3,r3,r6
+ and r2,r3,r4
+ or_s r12,r12,r2
+ sub_s r3,r12,1
+ bic_s r3,r3,r12
+ norm r3,r3
+ add_s r0,r0,3
+ asr_s r12,r3,3
+ asl.f 0,r2,r3
+ sub_s r0,r0,r12
+ j_s.d [blink]
+ mov.pl r0,0
+#else /* BIG ENDIAN */
+.Lfound_char:
+ lsr r7,r7,7
+
+ bic r2,r7,r6
+.Lfound_char_b:
+ norm r2,r2
+ sub_s r0,r0,4
+ asr_s r2,r2,3
+ j_l.d [blink]
+ add_s r0,r0,r2
+
+.Lfound0_ua:
+ mov_s r3,r7
+.Lfound0:
+ asl_s r2,r2,7
+ or r7,r6,r4
+ bic_s r12,r12,r2
+ sub r2,r7,r3
+ or r2,r2,r6
+ bic r12,r2,r12
+ bic.f r3,r4,r12
+ norm r3,r3
+
+ add.pl r3,r3,1
+ asr_s r12,r3,3
+ asl.f 0,r2,r3
+ add_s r0,r0,r12
+ j_s.d [blink]
+ mov.mi r0,0
+#endif /* ENDIAN */
+ENDFUNC (strchr)
+#endif /* (__ARC700__ || __ARCEM__ || __ARCHS__) && __ARC_NORM__
+ && __ARC_BARREL_SHIFTER__ */
+
+#endif /* !__OPTIMIZE_SIZE__ && !PREFER_SIZE_OVER_SPEED */
diff --git a/newlib/libc/machine/arc/strchr-bs.S b/newlib/libc/machine/arc/strchr-bs.S
new file mode 100644
index 000000000..eb61a3a32
--- /dev/null
+++ b/newlib/libc/machine/arc/strchr-bs.S
@@ -0,0 +1,202 @@
+/*
+ Copyright (c) 2015, Synopsys, Inc. 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) Neither the name of the Synopsys, Inc., 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 HOLDER 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.
+*/
+
+/* This implementation is optimized for performance. For code size a generic
+ implementation of this function from newlib/libc/string/strchr.c will be
+ used. */
+#if !defined (__OPTIMIZE_SIZE__) && !defined (PREFER_SIZE_OVER_SPEED)
+
+#include "asm.h"
+
+/* In order to search for a zero in a W, we calculate
+ X := (W - 0x01010101) & ~W & 0x80808080;
+ In the little endian case:
+ If no byte in W is zero, X will be zero; otherwise, the least significant
+ byte of X which is nonzero indicates the least significant byte of W that
+ is zero.
+ In the big endian case:
+ X will be zero iff no byte in W is zero.
+ If X is nonzero, to find out which is the most significant zero byte
+ in W, we calculate:
+ Y := ~(((W | 0x80808080) - 0x01010101) | W) & 0x80808080;
+ Each byte in Y is 0x80 if the the corresponding byte in
+ W is zero, otherwise that byte of Y is 0. */
+
+#if defined (__ARC_BARREL_SHIFTER__) && \
+ (defined (__ARC600__) || (!defined (__ARC_NORM__) && !defined (__ARC601__)))
+
+ENTRY (strchr)
+ bmsk.f r2,r0,1
+ mov_s r3,0x01010101
+ extb_s r1,r1
+ asl r5,r1,8
+ or r5,r5,r1
+ beq.d .Laligned
+ asl r4,r5,16
+ sub_s r0,r0,r2
+ asl_s r2,r2,3
+#ifdef __LITTLE_ENDIAN__
+ asl r7,r3,r2
+#else
+ lsr r7,r3,r2
+#endif
+ ld_s r2,[r0]
+ or r5,r5,r4
+ ror r4,r3
+ sub r12,r2,r7
+ bic_s r12,r12,r2
+ and r12,r12,r4
+
+ brne.d r12,0,.Lfound0_ua
+ xor r6,r2,r5
+ ld.a r2,[r0,4]
+ sub r12,r6,r7
+ bic r12,r12,r6
+#ifdef __LITTLE_ENDIAN__
+ and.f r7,r12,r4
+ sub r12,r2,r3
+ bic_s r12,r12,r2
+ beq.d .Loop
+ and r12,r12,r4
+ b.d .Lfound_char_ua
+ btst r7,7
+#else
+ and.f r8,r12,r4
+ sub r12,r2,r3
+ bic_s r12,r12,r2
+ beq.d .Loop
+ and r12,r12,r4
+ bic r12,r7,r6
+ asl_s r12,r12,7
+ and.f r2,r8,r12
+ b.d .Lfound_char_ua
+ sub_s r0,r0,4
+#endif
+
+ .balign 4
+.Laligned:
+ ld_s r2,[r0]
+ or r5,r5,r4
+ ror r4,r3
+ sub r12,r2,r3
+ bic_s r12,r12,r2
+ and r12,r12,r4
+.Loop:
+
+ brne.d r12,0,.Lfound0
+ xor r6,r2,r5
+ ld.a r2,[r0,4]
+ sub r12,r6,r3
+ bic r12,r12,r6
+ and.f r7,r12,r4
+ sub r12,r2,r3
+ bic_s r12,r12,r2
+ beq.d .Loop
+ and r12,r12,r4
+; Found searched-for character. r0 has already advanced to next word.
+#ifdef __LITTLE_ENDIAN__
+/* We only need the information about the first matching byte
+ (i.e. the least significant matching byte) to be exact,
+ hence there is no problem with carry effects. */
+.Lfound_char:
+ btst r7,7
+.Lfound_char_ua:
+ sub_s r0,r0,4
+ add.eq r0,r0,1
+ btst.eq r7,15
+ add.eq r0,r0,1
+ btst.eq r7,23
+ j_s.d [blink]
+ add.eq r0,r0,1
+
+ .balign 4
+.Lfound0_ua:
+ mov_l r3,r7
+.Lfound0:
+ sub r2,r6,r3
+ bic r2,r2,r6
+ and r2,r2,r4
+ or r3,r12,r2
+ sub_s r12,r3,1
+ xor_s r3,r3,r12
+ tst_s r2,r3
+ lsr r2,r3,31
+ lsr r12,r3,16
+ jeq.d [blink]
+ mov.eq r0,0
+ lsr r3,r3,8
+ sub_s r2,r2,r12
+ sub_s r2,r2,r3
+ bmsk_s r2,r2,1
+ j_s.d [blink]
+ add_s r0,r0,r2
+#else /* BIG ENDIAN */
+.Lfound_char:
+ asl r6,r6,7
+ sub_s r0,r0,4
+ bic.f r2,r7,r6
+.Lfound_char_ua:
+ add.pl r0,r0,1
+ jmi.d [blink]
+ btst_s r2,23
+ add.eq r0,r0,1
+ btst.eq r2,15
+ j_s.d [blink]
+ add.eq r0,r0,1
+
+; N.B. if we searched for a char zero and found it in the MSB,
+; and ignored matches are identical, we will take the early exit
+; like for an ordinary found zero - except for the extra stalls at jhi -
+; but still compute the right result.
+.Lfound0_ua:
+ mov_s r3,r7
+.Lfound0:
+ asl_s r2,r2,7
+ or r7,r6,r4
+ bic_s r12,r12,r2
+ sub r2,r7,r3
+ or r2,r2,r6
+ bic r2,r4,r2
+ cmp r12,r2
+ mov.hi r0,0
+ btst.ls r2,31
+ jhi.d [blink]
+ add.eq r0,r0,1
+ btst.eq r2,23
+ add.eq r0,r0,1
+ btst.eq r2,15
+ j_s.d [blink]
+ add.eq r0,r0,1
+#endif /* ENDIAN */
+ENDFUNC (strchr)
+#endif /* __ARC_BARREL_SHIFTER__ &&
+ (__ARC600__ || (!__ARC_NORM__ && !__ARC601__)) */
+
+#endif /* !__OPTIMIZE_SIZE__ && !PREFER_SIZE_OVER_SPEED */
diff --git a/newlib/libc/machine/arc/strchr-stub.c b/newlib/libc/machine/arc/strchr-stub.c
new file mode 100644
index 000000000..8d84a8255
--- /dev/null
+++ b/newlib/libc/machine/arc/strchr-stub.c
@@ -0,0 +1,36 @@
+/*
+ Copyright (c) 2015, Synopsys, Inc. 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) Neither the name of the Synopsys, Inc., 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 HOLDER 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 (__OPTIMIZE_SIZE__) || defined (PREFER_SIZE_OVER_SPEED)
+# include "../../string/strchr.c"
+#else
+/* See strchr-*.S. */
+#endif
diff --git a/newlib/libc/machine/arc/strchr.S b/newlib/libc/machine/arc/strchr.S
new file mode 100644
index 000000000..1bf6db97d
--- /dev/null
+++ b/newlib/libc/machine/arc/strchr.S
@@ -0,0 +1,208 @@
+/*
+ Copyright (c) 2015, Synopsys, Inc. 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) Neither the name of the Synopsys, Inc., 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 HOLDER 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.
+*/
+
+/* This implementation is optimized for performance. For code size a generic
+ implementation of this function from newlib/libc/string/strchr.c will be
+ used. */
+#if !defined (__OPTIMIZE_SIZE__) && !defined (PREFER_SIZE_OVER_SPEED)
+
+#include "asm.h"
+
+/* In order to search for a zero in a W, we calculate
+ X := (W - 0x01010101) & ~W & 0x80808080;
+ In the little endian case:
+ If no byte in W is zero, X will be zero; otherwise, the least significant
+ byte of X which is nonzero indicates the least significant byte of W that
+ is zero.
+ In the big endian case:
+ X will be zero iff no byte in W is zero.
+ If X is nonzero, to find out which is the most significant zero byte
+ in W, we calculate:
+ Y := ~(((W | 0x80808080) - 0x01010101) | W) & 0x80808080;
+ Each byte in Y is 0x80 if the the corresponding byte in
+ W is zero, otherwise that byte of Y is 0. */
+
+#if defined (__ARC601__) || !defined (__ARC_BARREL_SHIFTER__)
+ENTRY (strchr)
+ bmsk.f r2,r0,1
+ mov_s r3,0x01010101
+ extb_s r1,r1
+ mov r8,0
+ add3 r5,r8,r1
+ add3 r5,r8,r5
+ add2 r5,r1,r5
+ add3 r4,r8,r5
+ add3 r4,r8,r4
+ add3 r4,r8,r4
+ add3 r4,r8,r4
+ beq.d .Laligned
+ add3 r4,r8,r4
+ sub_s r0,r0,r2
+#ifdef __LITTLE_ENDIAN__
+ add3.f r2,-1,r2
+ bmsk r7,r3,r2
+ rsub.pl r7,r7,r3
+#else
+ mov_s r12,31
+ sub3 r2,r12,r2
+ bmsk r7,r3,r2
+#endif
+ ld_s r2,[r0]
+ add1 r5,r5,r4
+ ror r4,r3
+ sub r12,r2,r7
+ bic_s r12,r12,r2
+ and r12,r12,r4
+
+ brne.d r12,0,.Lfound0_ua
+ xor r6,r2,r5
+ ld.a r2,[r0,4]
+ sub r12,r6,r7
+ bic r12,r12,r6
+#ifdef __LITTLE_ENDIAN__
+ and.f r7,r12,r4
+ sub r12,r2,r3
+ bic_s r12,r12,r2
+ beq.d .Loop
+ and r12,r12,r4
+ b.d .Lfound_char_ua
+ btst r7,7
+#else
+ and.f r8,r12,r4
+ sub r12,r2,r3
+ bic_s r12,r12,r2
+ beq.d .Loop
+ and r12,r12,r4
+ bic r12,r7,r6
+ bic r2,r3,r12
+ sub1 r2,r3,r2
+ sub_s r0,r0,4
+ b.d .Lfound_char_ua
+ bic.f r2,r8,r2
+#endif
+
+ .balign 4
+.Laligned:
+ ld_s r2,[r0]
+ add1 r5,r5,r4
+ ror r4,r3
+ sub r12,r2,r3
+ bic_s r12,r12,r2
+ and r12,r12,r4
+.Loop:
+
+ brne.d r12,0,.Lfound0
+ xor r6,r2,r5
+ ld.a r2,[r0,4]
+ sub r12,r6,r3
+ bic r12,r12,r6
+ and.f r7,r12,r4
+ sub r12,r2,r3
+ bic_s r12,r12,r2
+ beq.d .Loop
+ and r12,r12,r4
+; Found searched-for character. r0 has already advanced to next word.
+#ifdef __LITTLE_ENDIAN__
+/* We only need the information about the first matching byte
+ (i.e. the least significant matching byte) to be exact,
+ hence there is no problem with carry effects. */
+.Lfound_char:
+ btst r7,7
+.Lfound_char_ua:
+ sub_s r0,r0,4
+ add.eq r0,r0,1
+ btst.eq r7,15
+ add.eq r0,r0,1
+ btst.eq r7,23
+ j_s.d [blink]
+ add.eq r0,r0,1
+
+ .balign 4
+.Lfound0_ua:
+ mov_l r3,r7
+.Lfound0:
+ sub r2,r6,r3
+ bic r2,r2,r6
+ and r2,r2,r4
+ or r3,r12,r2
+ sub_s r12,r3,1
+ xor_s r3,r3,r12
+ cmp 0xffff,r3
+ ; cmp uses limm ; ARC600 would do: asl.f 0,r3,9
+ tst_s r2,r3
+ mov.eq r0,0
+ add.mi r0,r0,1
+ btst.ne r3,15
+ j_s.d [blink]
+ adc.ne r0,r0,1
+#else /* BIG ENDIAN */
+.Lfound_char:
+ and r2,r6,r3
+ sub1 r2,r3,r2
+ sub_s r0,r0,4
+ bic.f r2,r7,r2
+.Lfound_char_ua:
+ add.pl r0,r0,1
+ jmi.d [blink]
+ btst_s r2,23
+ add.eq r0,r0,1
+ btst.eq r2,15
+ j_s.d [blink]
+ add.eq r0,r0,1
+
+; N.B. if we searched for a char zero and found it in the MSB,
+; and ignored matches are identical, we will take the early exit
+; like for an ordinary found zero - except for the extra stalls at jhi -
+; but still compute the right result.
+.Lfound0_ua:
+ mov_s r3,r7
+.Lfound0:
+ and_s r2,r2,r3
+ sub1 r2,r3,r2
+ or r7,r6,r4
+ bic_s r12,r12,r2
+ sub r2,r7,r3
+ or r2,r2,r6
+ bic r2,r4,r2
+ cmp_s r12,r2
+ mov.hi r0,0
+ btst.ls r2,31
+ jhi.d [blink]
+ add.eq r0,r0,1
+ btst.eq r2,23
+ add.eq r0,r0,1
+ btst.eq r2,15
+ j_s.d [blink]
+ add.eq r0,r0,1
+#endif /* ENDIAN */
+ENDFUNC (strchr)
+#endif /* __ARC601__ || !__ARC_BARREL_SHIFTER__ */
+
+#endif /* !__OPTIMIZE_SIZE__ && !PREFER_SIZE_OVER_SPEED */
diff --git a/newlib/libc/machine/arc/strcmp-archs.S b/newlib/libc/machine/arc/strcmp-archs.S
new file mode 100644
index 000000000..6cccf2773
--- /dev/null
+++ b/newlib/libc/machine/arc/strcmp-archs.S
@@ -0,0 +1,109 @@
+/*
+ Copyright (c) 2015, Synopsys, Inc. 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) Neither the name of the Synopsys, Inc., 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 HOLDER 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.
+*/
+
+/* This implementation is optimized for performance. For code size a generic
+ implementation of this function from newlib/libc/string/strcmp.c will be
+ used. */
+#if !defined (__OPTIMIZE_SIZE__) && !defined (PREFER_SIZE_OVER_SPEED)
+
+#include "asm.h"
+
+#ifdef __ARCHS__
+ENTRY (strcmp)
+ or r2, r0, r1
+ bmsk_s r2, r2, 1
+ brne r2, 0, @.Lcharloop
+
+; s1 and s2 are word aligned
+ ld.ab r2, [r0, 4]
+
+ mov_s r12, 0x01010101
+ ror r11, r12
+ .align 4
+.LwordLoop:
+ ld.ab r3, [r1, 4]
+ ; Detect NULL char in str1
+ sub r4, r2, r12
+ ld.ab r5, [r0, 4]
+ bic r4, r4, r2
+ and r4, r4, r11
+ brne.d.nt r4, 0, .LfoundNULL
+ ; Check if the read locations are the same
+ cmp r2, r3
+ beq.d .LwordLoop
+ mov.eq r2, r5
+
+ ; A match is found, spot it out
+#ifdef __LITTLE_ENDIAN__
+ swape r3, r3
+ mov_s r0, 1
+ swape r2, r2
+#else
+ mov_s r0, 1
+#endif
+ cmp_s r2, r3
+ j_s.d [blink]
+ bset.lo r0, r0, 31
+
+ .align 4
+.LfoundNULL:
+#ifdef __BIG_ENDIAN__
+ swape r4, r4
+ swape r2, r2
+ swape r3, r3
+#endif
+ ; Find null byte
+ ffs r0, r4
+ bmsk r2, r2, r0
+ bmsk r3, r3, r0
+ swape r2, r2
+ swape r3, r3
+ ; make the return value
+ sub.f r0, r2, r3
+ mov.hi r0, 1
+ j_s.d [blink]
+ bset.lo r0, r0, 31
+
+ .align 4
+.Lcharloop:
+ ldb.ab r2, [r0, 1]
+ ldb.ab r3, [r1, 1]
+ nop
+ breq r2, 0, .Lcmpend
+ breq r2, r3, .Lcharloop
+
+ .align 4
+.Lcmpend:
+ j_s.d [blink]
+ sub r0, r2, r3
+ENDFUNC (strcmp)
+#endif /* __ARCHS__ */
+
+#endif /* !__OPTIMIZE_SIZE__ && !PREFER_SIZE_OVER_SPEED */
diff --git a/newlib/libc/machine/arc/strcmp-stub.c b/newlib/libc/machine/arc/strcmp-stub.c
new file mode 100644
index 000000000..19528e333
--- /dev/null
+++ b/newlib/libc/machine/arc/strcmp-stub.c
@@ -0,0 +1,36 @@
+/*
+ Copyright (c) 2015, Synopsys, Inc. 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) Neither the name of the Synopsys, Inc., 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 HOLDER 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 (__OPTIMIZE_SIZE__) || defined (PREFER_SIZE_OVER_SPEED)
+# include "../../string/strcmp.c"
+#else
+/* See strcmp-*.S. */
+#endif
diff --git a/newlib/libc/machine/arc/strcmp.S b/newlib/libc/machine/arc/strcmp.S
new file mode 100644
index 000000000..40676055f
--- /dev/null
+++ b/newlib/libc/machine/arc/strcmp.S
@@ -0,0 +1,133 @@
+/*
+ Copyright (c) 2015, Synopsys, Inc. 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) Neither the name of the Synopsys, Inc., 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 HOLDER 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.
+*/
+
+/* This implementation is optimized for performance. For code size a generic
+ implementation of this function from newlib/libc/string/strcmp.c will be
+ used. */
+#if !defined (__OPTIMIZE_SIZE__) && !defined (PREFER_SIZE_OVER_SPEED)
+
+#include "asm.h"
+
+/* This is optimized primarily for the ARC700.
+ It would be possible to speed up the loops by one cycle / word
+ respective one cycle / byte by forcing double source 1 alignment, unrolling
+ by a factor of two, and speculatively loading the second word / byte of
+ source 1; however, that would increase the overhead for loop setup / finish,
+ and strcmp might often terminate early. */
+#ifndef __ARCHS__
+
+ENTRY (strcmp)
+ or r2,r0,r1
+ bmsk_s r2,r2,1
+ brne_l r2,0,.Lcharloop
+ mov_s r12,0x01010101
+ ror r5,r12
+.Lwordloop:
+ ld.ab r2,[r0,4]
+ ld.ab r3,[r1,4]
+ nop_s
+ sub r4,r2,r12
+ bic r4,r4,r2
+ and r4,r4,r5
+ brne_l r4,0,.Lfound0
+ breq r2,r3,.Lwordloop
+#ifdef __LITTLE_ENDIAN__
+ xor r0,r2,r3 ; mask for difference
+ sub_s r1,r0,1
+ bic_s r0,r0,r1 ; mask for least significant difference bit
+ sub r1,r5,r0
+ xor r0,r5,r1 ; mask for least significant difference byte
+ and_s r2,r2,r0
+ and_s r3,r3,r0
+#endif /* LITTLE ENDIAN */
+ cmp_s r2,r3
+ mov_s r0,1
+ j_s.d [blink]
+ bset.lo r0,r0,31
+
+ .balign 4
+#ifdef __LITTLE_ENDIAN__
+.Lfound0:
+ xor r0,r2,r3 ; mask for difference
+ or r0,r0,r4 ; or in zero indicator
+ sub_s r1,r0,1
+ bic_s r0,r0,r1 ; mask for least significant difference bit
+ sub r1,r5,r0
+ xor r0,r5,r1 ; mask for least significant difference byte
+ and_s r2,r2,r0
+ and_s r3,r3,r0
+ sub.f r0,r2,r3
+ mov.hi r0,1
+ j_s.d [blink]
+ bset.lo r0,r0,31
+#else /* BIG ENDIAN */
+ /* The zero-detection above can mis-detect 0x01 bytes as zeroes
+ because of carry-propagateion from a lower significant zero byte.
+ We can compensate for this by checking that bit0 is zero.
+ This compensation is not necessary in the step where we
+ get a low estimate for r2, because in any affected bytes
+ we already have 0x00 or 0x01, which will remain unchanged
+ when bit 7 is cleared. */
+ .balign 4
+.Lfound0:
+#ifndef __ARC601__
+ lsr r0,r4,8
+ lsr_s r1,r2
+ bic_s r2,r2,r0 ; get low estimate for r2 and get ...
+ bic_s r0,r0,r1 ; <this is the adjusted mask for zeros>
+ or_s r3,r3,r0 ; ... high estimate r3 so that r2 > r3 will ...
+ cmp_s r3,r2 ; ... be independent of trailing garbage
+ or_s r2,r2,r0 ; likewise for r3 > r2
+ bic_s r3,r3,r0
+ rlc r0,0 ; r0 := r2 > r3 ? 1 : 0
+ cmp_s r2,r3
+ j_s.d [blink]
+ bset.lo r0,r0,31
+#else /* __ARC601__ */
+ /* Fall through to .Lcharloop. */
+ sub_s r0,r0,4
+ sub_s r1,r1,4
+#endif /* __ARC601__ */
+#endif /* ENDIAN */
+
+ .balign 4
+.Lcharloop:
+ ldb.ab r2,[r0,1]
+ ldb.ab r3,[r1,1]
+ nop_s
+ breq_l r2,0,.Lcmpend
+ breq r2,r3,.Lcharloop
+.Lcmpend:
+ j_s.d [blink]
+ sub r0,r2,r3
+ENDFUNC (strcmp)
+#endif /* !__ARCHS__ */
+
+#endif /* !__OPTIMIZE_SIZE__ && !PREFER_SIZE_OVER_SPEED */
diff --git a/newlib/libc/machine/arc/strcpy-bs-arc600.S b/newlib/libc/machine/arc/strcpy-bs-arc600.S
new file mode 100644
index 000000000..e80ffe535
--- /dev/null
+++ b/newlib/libc/machine/arc/strcpy-bs-arc600.S
@@ -0,0 +1,120 @@
+/*
+ Copyright (c) 2015, Synopsys, Inc. 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) Neither the name of the Synopsys, Inc., 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 HOLDER 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.
+*/
+
+/* This implementation is optimized for performance. For code size a generic
+ implementation of this function from newlib/libc/string/strcpy.c will be
+ used. */
+#if !defined (__OPTIMIZE_SIZE__) && !defined (PREFER_SIZE_OVER_SPEED)
+
+#include "asm.h"
+
+#if defined (__ARC600__) && defined (__ARC_BARREL_SHIFTER__)
+/* If dst and src are 4 byte aligned, copy 8 bytes at a time.
+ If the src is 4, but not 8 byte aligned, we first read 4 bytes to get
+ it 8 byte aligned. Thus, we can do a little read-ahead, without
+ dereferencing a cache line that we should not touch.
+ Note that short and long instructions have been scheduled to avoid
+ branch stalls.
+ This version is optimized for the ARC600 pipeline. */
+
+ENTRY (strcpy)
+ or r2,r0,r1
+ bmsk.f 0,r2,1
+ mov r8,0x01010101
+ bne.d .Lcharloop
+ mov_s r10,r0
+ ld_l r3,[r1,0]
+ bbit0.d r1,2,.Loop_setup
+ ror r12,r8
+ sub r2,r3,r8
+ bic_s r2,r2,r3
+ and_s r2,r2,r12
+ brne_s r2,0,.Lr3z
+ st.ab r3,[r10,4]
+ ld.a r3,[r1,4]
+.Loop_setup:
+ ld.a r4,[r1,4]
+
+ sub r2,r3,r8
+ and.f r2,r2,r12
+ sub r5,r4,r8
+ and.eq.f r5,r5,r12
+ b.d .Loop_start
+ mov_s r6,r3
+ .balign 4
+.Loop:
+ ld.a r3,[r1,4]
+ st r4,[r10,4]
+ ld.a r4,[r1,4]
+ sub r2,r3,r8
+ and.f r2,r2,r12
+ sub r5,r4,r8
+ and.eq.f r5,r5,r12
+ st.ab r6,[r10,8]
+ mov r6,r3
+.Loop_start:
+ beq.d .Loop
+ bic_s r2,r2,r3
+ brne.d r2,0,.Lr3z
+ and r5,r5,r12
+ bic r5,r5,r4
+ breq.d r5,0,.Loop
+ mov_s r3,r4
+ st.ab r6,[r10,4]
+#ifdef __LITTLE_ENDIAN__
+.Lr3z: bmsk.f r1,r3,7
+.Lr3z_loop:
+ lsr_s r3,r3,8
+ stb.ab r1,[r10,1]
+ bne.d .Lr3z_loop
+ bmsk.f r1,r3,7
+ j_s [blink]
+#else
+.Lr3z: lsr.f r1,r3,24
+.Lr3z_loop:
+ asl_s r3,r3,8
+ stb.ab r1,[r10,1]
+ bne.d .Lr3z_loop
+ lsr.f r1,r3,24
+ j_s [blink]
+#endif
+
+ .balign 4
+.Lcharloop:
+ ldb.ab r3,[r1,1]
+
+
+ brne.d r3,0,.Lcharloop
+ stb.ab r3,[r10,1]
+ j [blink]
+ENDFUNC (strcpy)
+#endif /* __ARC600__ && __ARC_BARREL_SHIFTER__ */
+
+#endif /* !__OPTIMIZE_SIZE__ && !PREFER_SIZE_OVER_SPEED */
diff --git a/newlib/libc/machine/arc/strcpy-bs.S b/newlib/libc/machine/arc/strcpy-bs.S
new file mode 100644
index 000000000..26ac6c78d
--- /dev/null
+++ b/newlib/libc/machine/arc/strcpy-bs.S
@@ -0,0 +1,103 @@
+/*
+ Copyright (c) 2015, Synopsys, Inc. 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) Neither the name of the Synopsys, Inc., 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 HOLDER 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.
+*/
+
+/* This implementation is optimized for performance. For code size a generic
+ implementation of this function from newlib/libc/string/strcpy.c will be
+ used. */
+#if !defined (__OPTIMIZE_SIZE__) && !defined (PREFER_SIZE_OVER_SPEED)
+
+#include "asm.h"
+
+#if (defined (__ARC700__) || defined (__ARCEM__) || defined (__ARCHS__)) \
+ && defined (__ARC_BARREL_SHIFTER__)
+
+/* If dst and src are 4 byte aligned, copy 8 bytes at a time.
+ If the src is 4, but not 8 byte aligned, we first read 4 bytes to get
+ it 8 byte aligned. Thus, we can do a little read-ahead, without
+ dereferencing a cache line that we should not touch.
+ Note that short and long instructions have been scheduled to avoid
+ branch stalls.
+ The beq_s to r3z could be made unaligned & long to avoid a stall
+ there, but the it is not likely to be taken often, and it
+ would also be likey to cost an unaligned mispredict at the next call. */
+
+ENTRY (strcpy)
+ or r2,r0,r1
+ bmsk_s r2,r2,1
+ brne.d r2,0,charloop
+ mov_s r10,r0
+ ld_s r3,[r1,0]
+ mov r8,0x01010101
+ bbit0.d r1,2,loop_start
+ ror r12,r8
+ sub r2,r3,r8
+ bic_s r2,r2,r3
+ tst_s r2,r12
+ bne_l r3z
+ mov_s r4,r3
+ .balign 4
+loop:
+ ld.a r3,[r1,4]
+ st.ab r4,[r10,4]
+loop_start:
+ ld.a r4,[r1,4]
+ sub r2,r3,r8
+ bic_s r2,r2,r3
+ tst_l r2,r12
+ bne_l r3z
+ st.ab r3,[r10,4]
+ sub r2,r4,r8
+ bic r2,r2,r4
+ tst_l r2,r12
+ beq_l loop
+ mov_s r3,r4
+#ifdef __LITTLE_ENDIAN__
+r3z: bmsk.f r1,r3,7
+ lsr_s r3,r3,8
+#else
+r3z: lsr.f r1,r3,24
+ asl_s r3,r3,8
+#endif
+ bne.d r3z
+ stb.ab r1,[r10,1]
+ j_s [blink]
+
+ .balign 4
+charloop:
+ ldb.ab r3,[r1,1]
+
+
+ brne.d r3,0,charloop
+ stb.ab r3,[r10,1]
+ j [blink]
+ENDFUNC (strcpy)
+#endif /* (__ARC700__ || __ARCEM__ || __ARCHS__) && __ARC_BARREL_SHIFTER__ */
+
+#endif /* !__OPTIMIZE_SIZE__ && !PREFER_SIZE_OVER_SPEED */
diff --git a/newlib/libc/machine/arc/strcpy-stub.c b/newlib/libc/machine/arc/strcpy-stub.c
new file mode 100644
index 000000000..80ea0e81d
--- /dev/null
+++ b/newlib/libc/machine/arc/strcpy-stub.c
@@ -0,0 +1,36 @@
+/*
+ Copyright (c) 2015, Synopsys, Inc. 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) Neither the name of the Synopsys, Inc., 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 HOLDER 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 (__OPTIMIZE_SIZE__) || defined (PREFER_SIZE_OVER_SPEED)
+# include "../../string/strcpy.c"
+#else
+/* See strcpy-*.S. */
+#endif
diff --git a/newlib/libc/machine/arc/strcpy.S b/newlib/libc/machine/arc/strcpy.S
new file mode 100644
index 000000000..e379b7930
--- /dev/null
+++ b/newlib/libc/machine/arc/strcpy.S
@@ -0,0 +1,90 @@
+/*
+ Copyright (c) 2015, Synopsys, Inc. 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) Neither the name of the Synopsys, Inc., 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 HOLDER 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.
+*/
+
+/* This implementation is optimized for performance. For code size a generic
+ implementation of this function from newlib/libc/string/strcpy.c will be
+ used. */
+#if !defined (__OPTIMIZE_SIZE__) && !defined (PREFER_SIZE_OVER_SPEED)
+
+#include "asm.h"
+
+#if defined (__ARC601__) || !defined (__ARC_BARREL_SHIFTER__)
+/* If dst and src are 4 byte aligned, copy 8 bytes at a time.
+ If the src is 4, but not 8 byte aligned, we first read 4 bytes to get
+ it 8 byte aligned. Thus, we can do a little read-ahead, without
+ dereferencing a cache line that we should not touch.
+ This version is a compromise between speed for the 601 pipeline and code
+ size. */
+
+ENTRY (strcpy)
+ or r2,r0,r1
+ bmsk.f 0,r2,1
+ mov r8,0x01010101
+ bne.d .Lcharloop
+ mov_s r10,r0
+ ld_s r3,[r1]
+ bbit0.d r1,2,.Loop_start
+ ror r12,r8
+ sub r2,r3,r8
+ bic_s r2,r2,r3
+ and_s r2,r2,r12
+ brne_s r2,0,.Lr3z
+ mov r4,r3
+ sub_s r1,r1,4
+ .balign 4
+.Loop:
+ ld.a r3,[r1,8]
+ st.ab r4,[r10,4]
+.Loop_start:
+ ld r4,[r1,4]
+ sub r2,r3,r8
+ bic_s r2,r2,r3
+ tst_s r2,r12
+ sub r5,r4,r8
+ bic r5,r5,r4
+ bne_s .Lr3z
+ and r5,r5,r12
+ breq.d r5,0,.Loop
+ st.ab r3,[r10,4]
+
+ ;mov_s r3,r4
+ add_s r1,r1,4
+
+ .balign 4
+.Lr3z:
+.Lcharloop:
+ ldb.ab r3,[r1,1]
+ brne.d r3,0,.Lcharloop
+ stb.ab r3,[r10,1]
+ j_s [blink]
+ENDFUNC (strcpy)
+#endif /* __ARC601__ || !__ARC_BARREL_SHIFTER__ */
+
+#endif /* !__OPTIMIZE_SIZE__ && !PREFER_SIZE_OVER_SPEED */
diff --git a/newlib/libc/machine/arc/strlen-bs-norm.S b/newlib/libc/machine/arc/strlen-bs-norm.S
new file mode 100644
index 000000000..5f8db32cc
--- /dev/null
+++ b/newlib/libc/machine/arc/strlen-bs-norm.S
@@ -0,0 +1,116 @@
+/*
+ Copyright (c) 2015, Synopsys, Inc. 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) Neither the name of the Synopsys, Inc., 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 HOLDER 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.
+*/
+
+/* This implementation is optimized for performance. For code size a generic
+ implementation of this function from newlib/libc/string/strlen.c will be
+ used. */
+#if !defined (__OPTIMIZE_SIZE__) && !defined (PREFER_SIZE_OVER_SPEED)
+
+#include "asm.h"
+#if (defined (__ARC700__) || defined (__ARCEM__) || defined (__ARCHS__)) \
+ && defined (__ARC_NORM__) && defined (__ARC_BARREL_SHIFTER__)
+
+ENTRY (strlen)
+ or r3,r0,7
+ ld r2,[r3,-7]
+ ld.a r6,[r3,-3]
+ mov r4,0x01010101
+ ; uses long immediate
+#ifdef __LITTLE_ENDIAN__
+ asl_s r1,r0,3
+ btst_s r0,2
+ asl r7,r4,r1
+ ror r5,r4
+ sub r1,r2,r7
+ bic_s r1,r1,r2
+ mov.eq r7,r4
+ sub r12,r6,r7
+ bic r12,r12,r6
+ or.eq r12,r12,r1
+ and r12,r12,r5
+ brne r12,0,.Learly_end
+#else /* BIG ENDIAN */
+ ror r5,r4
+ btst_s r0,2
+ mov_s r1,31
+ sub3 r7,r1,r0
+ sub r1,r2,r4
+ bic_s r1,r1,r2
+ bmsk r1,r1,r7
+ sub r12,r6,r4
+ bic r12,r12,r6
+ bmsk.ne r12,r12,r7
+ or.eq r12,r12,r1
+ and r12,r12,r5
+ brne r12,0,.Learly_end
+#endif /* ENDIAN */
+
+.Loop:
+ ld_s r2,[r3,4]
+ ld.a r6,[r3,8]
+ ; stall for load result
+ sub r1,r2,r4
+ bic_s r1,r1,r2
+ sub r12,r6,r4
+ bic r12,r12,r6
+ or_l r12,r12,r1
+ and r12,r12,r5
+ breq_l r12,0,.Loop
+.Lend:
+ and.f r1,r1,r5
+ sub.ne r3,r3,4
+ mov.eq r1,r12
+#ifdef __LITTLE_ENDIAN__
+ sub_s r2,r1,1
+ bic_s r2,r2,r1
+ norm r1,r2
+ sub_s r0,r0,3
+ lsr_s r1,r1,3
+ sub r0,r3,r0
+ j_s.d [blink]
+ sub_l r0,r0,r1
+#else /* BIG ENDIAN */
+ lsr_s r1,r1,7
+ mov.eq r2,r6
+ bic_s r1,r1,r2
+ norm r1,r1
+ sub r0,r3,r0
+ lsr_s r1,r1,3
+ j_s.d [blink]
+ add_l r0,r0,r1
+#endif /* ENDIAN */
+.Learly_end:
+ b.d .Lend
+ sub_s.ne r1,r1,r1
+ENDFUNC (strlen)
+#endif /* (__ARC700__ || __ARCEM__ || __ARCHS__) && __ARC_NORM__
+ && __ARC_BARREL_SHIFTER__ */
+
+#endif /* !__OPTIMIZE_SIZE__ && !PREFER_SIZE_OVER_SPEED */
diff --git a/newlib/libc/machine/arc/strlen-bs.S b/newlib/libc/machine/arc/strlen-bs.S
new file mode 100644
index 000000000..59c350482
--- /dev/null
+++ b/newlib/libc/machine/arc/strlen-bs.S
@@ -0,0 +1,122 @@
+/*
+ Copyright (c) 2015, Synopsys, Inc. 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) Neither the name of the Synopsys, Inc., 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 HOLDER 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.
+*/
+
+/* This implementation is optimized for performance. For code size a generic
+ implementation of this function from newlib/libc/string/strlen.c will be
+ used. */
+#if !defined (__OPTIMIZE_SIZE__) && !defined (PREFER_SIZE_OVER_SPEED)
+
+#include "asm.h"
+
+#if (defined (__ARC600__) || !defined (__ARC_NORM__)) && !defined (__ARC601__) \
+ && defined (__ARC_BARREL_SHIFTER__)
+/* This code is optimized for the ARC600 pipeline. */
+
+ENTRY (strlen)
+ or r3,r0,7
+ ld r2,[r3,-7]
+ ld.a r6,[r3,-3]
+ mov r4,0x01010101
+ ; uses long immediate
+#ifdef __LITTLE_ENDIAN__
+ asl_s r1,r0,3
+ btst_s r0,2
+ asl r7,r4,r1
+ ror r5,r4
+ sub r1,r2,r7
+ bic_l r1,r1,r2
+ mov.eq r7,r4
+ sub r12,r6,r7
+ bic r12,r12,r6
+ or.eq r12,r12,r1
+ and r12,r12,r5
+ brne r12,0,.Learly_end
+#else /* BIG ENDIAN */
+ ror r5,r4
+ btst_s r0,2
+ mov_s r1,31
+ sub3 r7,r1,r0
+ sub r1,r2,r4
+ bic_l r1,r1,r2
+ bmsk r1,r1,r7
+ sub r12,r6,r4
+ bic r12,r12,r6
+ bmsk.ne r12,r12,r7
+ or.eq r12,r12,r1
+ and r12,r12,r5
+ brne r12,0,.Learly_end
+#endif /* ENDIAN */
+
+.Loop:
+ ld_s r2,[r3,4]
+ ld.a r6,[r3,8]
+ ; stall for load result
+ sub r1,r2,r4
+ bic_s r1,r1,r2
+ sub r12,r6,r4
+ bic r12,r12,r6
+ or_s r12,r12,r1
+ and r12,r12,r5
+ breq_s r12,0,.Loop
+.Lend:
+ and.f r1,r1,r5
+ sub.ne r3,r3,4
+#ifdef __LITTLE_ENDIAN__
+ mov.eq r1,r12
+ asr.f 0,r1,8
+ bmsk.f 0,r1,15
+ sub r0,r3,r0
+ add.cc r0,r0,1
+ jne.d [blink]
+ asl.f 0,r1,9
+ j_s.d [blink]
+ sbc r0,r0,-2
+#else /* BIG ENDIAN */
+ mov.eq r2,r6
+ asl_s r2,r2,7
+ mov.eq r1,r12
+ bic_s r1,r1,r2
+ asr.f 0,r1,16
+ sub r0,r3,r0
+ add.pl r0,r0,1
+ jne.d [blink]
+ add.eq r0,r0,1
+ j_s.d [blink]
+ add.cc r0,r0,1
+#endif /* ENDIAN */
+
+ .balign 4
+.Learly_end:
+ b.d .Lend
+ sub_s.ne r1,r1,r1
+ENDFUNC (strlen)
+#endif /* (__ARC600__ || !__ARC_NORM__) && !__ARC601__ && __ARC_BARREL_SHIFTER__ */
+
+#endif /* !__OPTIMIZE_SIZE__ && !PREFER_SIZE_OVER_SPEED */
diff --git a/newlib/libc/machine/arc/strlen-stub.c b/newlib/libc/machine/arc/strlen-stub.c
new file mode 100644
index 000000000..942e9be68
--- /dev/null
+++ b/newlib/libc/machine/arc/strlen-stub.c
@@ -0,0 +1,36 @@
+/*
+ Copyright (c) 2015, Synopsys, Inc. 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) Neither the name of the Synopsys, Inc., 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 HOLDER 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 (__OPTIMIZE_SIZE__) || defined (PREFER_SIZE_OVER_SPEED)
+# include "../../string/strlen.c"
+#else
+/* See strlen-*.S. */
+#endif
diff --git a/newlib/libc/machine/arc/strlen.S b/newlib/libc/machine/arc/strlen.S
new file mode 100644
index 000000000..67f820fe9
--- /dev/null
+++ b/newlib/libc/machine/arc/strlen.S
@@ -0,0 +1,165 @@
+/*
+ Copyright (c) 2015, Synopsys, Inc. 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) Neither the name of the Synopsys, Inc., 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 HOLDER 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.
+*/
+
+/* This implementation is optimized for performance. For code size a generic
+ implementation of this function from newlib/libc/string/strlen.c will be
+ used. */
+#if !defined (__OPTIMIZE_SIZE__) && !defined (PREFER_SIZE_OVER_SPEED)
+
+#include "asm.h"
+
+#if defined(__ARC601__) || !defined (__ARC_BARREL_SHIFTER__)
+/* This code is optimized for the ARC601 pipeline without barrel shifter. */
+
+ENTRY (strlen)
+ or r3,r0,7
+ ld r2,[r3,-7]
+ ld.a r6,[r3,-3]
+ mov r4,0x01010101
+ ; uses long immediate
+#ifdef __LITTLE_ENDIAN__
+ bmsk.f 0,r0,1
+ mov_s r1,31
+ add3_s r1,r1,r0
+ bmsk r7,r4,r1
+ xor.ne r7,r7,r4
+ btst_s r0,2
+ ror r5,r4
+ sub r1,r2,r7
+ bic_s r1,r1,r2
+ mov.eq r7,r4
+ sub r12,r6,r7
+ bic r12,r12,r6
+ or.eq r12,r12,r1
+ and r12,r12,r5
+ brne r12,0,.Learly_end
+#else /* BIG ENDIAN */
+ add.f r1,r4,30 ; r1 mod 31 := -1; clear carry
+ ror r5,r4
+ sub3 r7,r1,r0
+ btst_s r0,2
+ sub r1,r2,r4
+ bic_s r1,r1,r2
+ bmsk r1,r1,r7
+ sub r12,r6,r4
+ bic r12,r12,r6
+ bmsk.ne r12,r12,r7
+ or.eq r12,r12,r1
+ and r12,r12,r5
+ brne r12,0,.Learly_end
+#endif /* ENDIAN */
+
+.Loop:
+ ld_s r2,[r3,4]
+ ld.a r6,[r3,8]
+ ; stall for load result
+ sub r1,r2,r4
+ bic_s r1,r1,r2
+ sub r12,r6,r4
+ bic r12,r12,r6
+ or_s r12,r12,r1
+ and r12,r12,r5
+ breq_s r12,0,.Loop
+.Lend:
+ and.f r1,r1,r5
+ sub.ne r3,r3,4
+#ifdef __LITTLE_ENDIAN__
+ mov.eq r1,r12
+ btst_s r1,7
+ sub r0,r3,r0
+ add.eq r0,r0,1
+ bmsk.f 0,r1,15
+ add.eq r0,r0,1
+ bmsk.f 0,r1,23
+ j_s.d [blink]
+ add.eq r0,r0,1
+#else /* BIG ENDIAN */
+#ifdef __OPTIMIZE_SIZE__
+1: ldb_s r1,[r3]
+ breq_s r1,0,0f
+ ldb.a r1,[r3,1]
+ breq_s r1,0,0f
+ ldb.a r1,[r3,1]
+ breq_s r1,0,0f
+ add_s r3,r3,1
+0: j_s.d [blink]
+ sub r0,r3,r0
+
+#define SPECIAL_EARLY_END
+.Learly_end:
+ mov_s r3,r0
+ b_s 1b
+#elif 0 /* Need more information about pipeline to assess if this is faster. */
+ mov.eq r2,r6
+ and r2,r2,r5
+ sub1 r2,r4,r2
+ mov.eq r1,r12
+ bic.f r1,r1,r2
+ sub r0,r3,r0
+ add.pl r0,r0,1
+ btst.pl r1,23
+ add.eq r0,r0,1
+ btst.eq r1,15
+ j_s.d [blink]
+ add.eq r0,r0,1
+#else /* !__OPTIMIZE_SIZE__ */
+ /* Need carry clear here. */
+ mov.eq r2,r6
+1: bmsk r1,r2,23
+ breq r1,r2,0f
+ bmsk r2,r1,15
+ breq.d r1,r2,0f
+ add_s r3,r3,1
+ cmp r2,0x100
+ add_s r3,r3,2
+0: j_s.d [blink]
+ sbc r0,r3,r0
+
+#define SPECIAL_EARLY_END
+.Learly_end:
+ sub_s.ne r1,r1,r1
+ mov_s r12,0
+ bset r12,r12,r7
+ sub1 r2,r2,r12
+ b.d .Lend
+ sub1.ne r6,r6,r12
+#endif /* !__OPTIMIZE_SIZE__ */
+#endif /* ENDIAN */
+
+#ifndef SPECIAL_EARLY_END
+ .balign 4
+.Learly_end:
+ b.d .Lend
+ sub_s.ne r1,r1,r1
+#endif /* !SPECIAL_EARLY_END */
+ENDFUNC (strlen)
+#endif /* __ARC601__ || !__ARC_BARREL_SHIFTER__*/
+
+#endif /* !__OPTIMIZE_SIZE__ && !PREFER_SIZE_OVER_SPEED */
diff --git a/newlib/libc/machine/arc/strncpy-bs.S b/newlib/libc/machine/arc/strncpy-bs.S
new file mode 100644
index 000000000..ec991524e
--- /dev/null
+++ b/newlib/libc/machine/arc/strncpy-bs.S
@@ -0,0 +1,171 @@
+/*
+ Copyright (c) 2015, Synopsys, Inc. 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) Neither the name of the Synopsys, Inc., 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 HOLDER 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.
+*/
+
+/* This implementation is optimized for performance. For code size a generic
+ implementation of this function from newlib/libc/string/strncpy.c will be
+ used. */
+#if !defined (__OPTIMIZE_SIZE__) && !defined (PREFER_SIZE_OVER_SPEED)
+
+#include "asm.h"
+
+/* If dst and src are 4 byte aligned, copy 8 bytes at a time.
+ If the src is 4, but not 8 byte aligned, we first read 4 bytes to get
+ it 8 byte aligned. Thus, we can do a little read-ahead, without
+ dereferencing a cache line that we should not touch.
+ Note that short and long instructions have been scheduled to avoid
+ branch stalls.
+ The beq_s to r3z could be made unaligned & long to avoid a stall
+ there, but the it is not likely to be taken often, and it
+ would also be likey to cost an unaligned mispredict at the next call. */
+
+#if !defined (__ARC601__) && defined (__ARC_BARREL_SHIFTER__)
+
+#if defined (__ARC700___) || defined (__ARCEM__) || defined (__ARCHS__)
+#define BRand(a,b,l) tst a,b ` bne_l l
+#else
+#define BRand(a,b,l) and a,a,b ` brne_s a,0,l
+#endif
+
+ENTRY (strncpy)
+ cmp_s r2,8
+ or r12,r0,r1
+ bmsk.cc.f r12,r12,1
+ brne.d r12,0,.Lbytewise
+ mov_s r10,r0
+ ld_s r3,[r1,0]
+ mov r8,0x01010101
+ sub lp_count,r2,1
+ bbit0.d r1,2,.Loop_start
+ ror r11,r8
+ sub r12,r3,r8
+ bic_l r12,r12,r3
+ BRand (r12,r11,.Lr3z)
+ mov_s r4,r3
+ ld.a r3,[r1,4]
+ sub lp_count,lp_count,4
+ st.ab r4,[r10,4]
+ .balign 4
+.Loop_start:
+ lsr.f lp_count,lp_count,3
+ lpne .Loop_end
+ ld.a r4,[r1,4]
+ sub r12,r3,r8
+ bic_s r12,r12,r3
+ BRand (r12,r11,.Lr3z)
+ st.ab r3,[r10,4]
+ sub r12,r4,r8
+ bic r12,r12,r4
+ BRand (r12,r11,.Lr4z)
+ ld.a r3,[r1,4]
+ st.ab r4,[r10,4]
+.Loop_end:
+ bcc_s .Lastword
+ ld.a r4,[r1,4]
+ sub r12,r3,r8
+ bic_s r12,r12,r3
+ BRand (r12,r11,.Lr3z)
+ st.ab r3,[r10,4]
+ mov_s r3,r4
+.Lastword:
+ and.f lp_count,r2,3
+ mov.eq lp_count,4
+ lp .Last_byte_end
+#ifdef __LITTLE_ENDIAN__
+ bmsk.f r1,r3,7
+ lsr.ne r3,r3,8
+#else
+ lsr.f r1,r3,24
+ asl.ne r3,r3,8
+#endif
+ stb.ab r1,[r10,1]
+.Last_byte_end:
+ j_s [blink]
+
+ .balign 4
+.Lr4z:
+ mov_l r3,r4
+.Lr3z:
+#if defined (__ARC700__) || defined (__ARCEM__) || defined (__ARCHS__)
+#ifdef __LITTLE_ENDIAN__
+ bmsk.f r1,r3,7
+ lsr_s r3,r3,8
+#else
+ lsr.f r1,r3,24
+ asl_s r3,r3,8
+#endif
+ bne.d .Lr3z
+ stb.ab r1,[r10,1]
+#else /* ! __ARC700__ */
+#ifdef __LITTLE_ENDIAN__
+ bmsk.f r1,r3,7
+.Lr3z_loop:
+ lsr_s r3,r3,8
+ stb.ab r1,[r10,1]
+ bne.d .Lr3z_loop
+ bmsk.f r1,r3,7
+#else
+ lsr.f r1,r3,24
+.Lr3z_loop:
+ asl_s r3,r3,8
+ stb.ab r1,[r10,1]
+ bne.d .Lr3z_loop
+ lsr.f r1,r3,24
+#endif /* ENDIAN */
+#endif /* ! __ARC700__ */
+.Lzero_rest:
+ ; __strncpy_bzero requires:
+ ; return value in r0
+ ; zeroing length in r2
+ ; zeroing start address in r3
+ mov_s r3,r10
+ add_s r2,r2,r0
+ b.d __strncpy_bzero
+ sub_s r2,r2,r3
+
+ .balign 4
+.Lbytewise:
+ sub.f r2,r2,1
+ mov_l r3,r0
+ jcs [blink]
+.Lcharloop:
+ ldb.ab r12,[r1,1]
+ beq.d .Last_byte
+ sub.f r2,r2,1
+ brne.d r12,0,.Lcharloop
+ stb.ab r12,[r3,1]
+ b.d __strncpy_bzero
+ stb.ab r12,[r3,1]
+.Last_byte:
+ j_s.d [blink]
+ stb_l r12,[r3]
+ENDFUNC (strncpy)
+#endif /* !__ARC601__ && __ARC_BARREL_SHIFTER__ */
+
+#endif /* !__OPTIMIZE_SIZE__ && !PREFER_SIZE_OVER_SPEED */
diff --git a/newlib/libc/machine/arc/strncpy-stub.c b/newlib/libc/machine/arc/strncpy-stub.c
new file mode 100644
index 000000000..3f8f9db37
--- /dev/null
+++ b/newlib/libc/machine/arc/strncpy-stub.c
@@ -0,0 +1,36 @@
+/*
+ Copyright (c) 2015, Synopsys, Inc. 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) Neither the name of the Synopsys, Inc., 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 HOLDER 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 (__OPTIMIZE_SIZE__) || defined (PREFER_SIZE_OVER_SPEED)
+# include "../../string/strncpy.c"
+#else
+/* See strncpy-*.S. */
+#endif
diff --git a/newlib/libc/machine/arc/strncpy.S b/newlib/libc/machine/arc/strncpy.S
new file mode 100644
index 000000000..b04f5895d
--- /dev/null
+++ b/newlib/libc/machine/arc/strncpy.S
@@ -0,0 +1,134 @@
+/*
+ Copyright (c) 2015, Synopsys, Inc. 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) Neither the name of the Synopsys, Inc., 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 HOLDER 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.
+*/
+
+/* This implementation is optimized for performance. For code size a generic
+ implementation of this function from newlib/libc/string/strncpy.c will be
+ used. */
+#if !defined (__OPTIMIZE_SIZE__) && !defined (PREFER_SIZE_OVER_SPEED)
+
+#include "asm.h"
+
+/* If dst and src are 4 byte aligned, copy 8 bytes at a time.
+ If the src is 4, but not 8 byte aligned, we first read 4 bytes to get
+ it 8 byte aligned. Thus, we can do a little read-ahead, without
+ dereferencing a cache line that we should not touch. */
+
+#if defined (__ARC601__) || !defined (__ARC_BARREL_SHIFTER__)
+
+#define BRand(a,b,l) and a,a,b ` brne_s a,0,l
+
+ENTRY (strncpy)
+ cmp_s r2,8
+ or r12,r0,r1
+ bmsk.cc.f r12,r12,1
+ brne.d r12,0,.Lbytewise
+ mov_s r10,r0
+ ld_s r3,[r1,0]
+ mov r8,0x01010101
+ add r6,r0,r2
+ sub r6,r6,8
+ bbit0.d r1,2,.Loop_start
+ ror r11,r8
+ sub r12,r3,r8
+ bic_l r12,r12,r3
+ BRand (r12,r11,.Lr3z)
+ mov_s r4,r3
+ ld.a r3,[r1,4]
+ st.ab r4,[r10,4]
+ .balign 4
+.Loop_start:
+ brhs r10,r6,.Loop_end
+1:
+ ld.a r4,[r1,4]
+ sub r12,r3,r8
+ bic_s r12,r12,r3
+ BRand (r12,r11,.Lr3z2)
+ st.ab r3,[r10,8]
+ sub r12,r4,r8
+ bic r12,r12,r4
+ BRand (r12,r11,.Lr4z)
+ ld.a r3,[r1,4]
+ brlo.d r10,r6,1b
+ st r4,[r10,-4]
+.Loop_end:
+ add r6,r6,4
+ brhs r10,r6,.Lastword
+ sub r12,r3,r8
+ bic_s r12,r12,r3
+ BRand (r12,r11,.Lr3z)
+ add_s r1,r1,4
+ st.ab r3,[r10,4]
+.Lastword:
+ sub_s r2,r2,1
+ b.d .Lstart_charloop
+ bmsk.f r2,r2,1
+
+ .balign 4
+ nop_s
+.Lr3z2: sub_s r1,r1,4
+.Lr4z:
+.Lr3z:
+ .balign 4
+.Lr3z_loop:
+ ldb.ab r3,[r1,1]
+ brne.d r3,0,.Lr3z_loop
+ stb.ab r3,[r10,1]
+
+.Lzero_rest:
+ ; __strncpy_bzero requires:
+ ; return value in r0
+ ; zeroing length in r2
+ ; zeroing start address in r3
+ mov_s r3,r10
+ add_s r2,r2,r0
+ b.d __strncpy_bzero
+ sub_s r2,r2,r3
+
+ .balign 4
+.Lbytewise:
+ sub.f r2,r2,1
+ jcs [blink]
+.Lstart_charloop:
+ mov_s r3,r10
+.Lcharloop:
+ ldb.ab r12,[r1,1]
+ beq.d .Last_byte
+ sub.f r2,r2,1
+ brne.d r12,0,.Lcharloop
+ stb.ab r12,[r3,1]
+ b.d __strncpy_bzero
+ stb.ab r12,[r3,1]
+.Last_byte:
+ j_s.d [blink]
+ stb_s r12,[r3]
+ENDFUNC (strncpy)
+#endif /* __ARC601__ || !__ARC_BARREL_SHIFTER__ */
+
+#endif /* !__OPTIMIZE_SIZE__ && !PREFER_SIZE_OVER_SPEED */
diff --git a/newlib/libc/machine/arm/Makefile.am b/newlib/libc/machine/arm/Makefile.am
index c5e797e70..62ed158f3 100644
--- a/newlib/libc/machine/arm/Makefile.am
+++ b/newlib/libc/machine/arm/Makefile.am
@@ -8,17 +8,47 @@ AM_CCASFLAGS = $(INCLUDES)
noinst_LIBRARIES = lib.a
-lib_a_SOURCES = setjmp.S access.c strlen.c strcmp.S strcpy.c \
- memcpy.S memcpy-stub.c memchr-stub.c memchr.S \
- strlen.c strlen-armv7.S
+lib_a_SOURCES = setjmp.S access.c strcmp.S strcpy.c \
+ aeabi_memcpy.c aeabi_memcpy-armv7a.S \
+ aeabi_memmove.c aeabi_memmove-soft.S \
+ aeabi_memset.c aeabi_memset-soft.S aeabi_memclr.c
+lib_a_SOURCES += memchr-stub.c
+lib_a_SOURCES += memchr.S
+lib_a_SOURCES += memcpy-stub.c
+lib_a_SOURCES += memcpy.S
+lib_a_SOURCES += strlen-stub.c
+lib_a_SOURCES += strlen.S
+
lib_a_CCASFLAGS=$(AM_CCASFLAGS)
lib_a_CFLAGS = $(AM_CFLAGS)
ACLOCAL_AMFLAGS = -I ../../.. -I ../../../..
CONFIG_STATUS_DEPENDENCIES = $(newlib_basedir)/configure.host
+MEMCHR_DEP=acle-compat.h arm_asm.h
MEMCPY_DEP=memcpy-armv7a.S memcpy-armv7m.S
+STRCMP_DEP=strcmp-arm-tiny.S strcmp-armv4.S strcmp-armv4t.S strcmp-armv6.S \
+ strcmp-armv6m.S strcmp-armv7.S strcmp-armv7m.S
+AEABI_MEMMOVE_DEP=aeabi_memmove-thumb.S aeabi_memmove-thumb2.S \
+ aeabi_memmove-arm.S
+AEABI_MEMSET_DEP=aeabi_memset-thumb.S aeabi_memset-thumb2.S \
+ aeabi_memset-arm.S
+
+$(lpfx)memchr.o: $(MEMCHR_DEP)
+$(lpfx)memchr.obj: $(MEMCHR_DEP)
$(lpfx)memcpy.o: $(MEMCPY_DEP)
$(lpfx)memcpy.obj: $(MEMCPY_DEP)
+
+$(lpfx)strcmp.o: $(STRCMP_DEP)
+
+$(lpfx)strcmp.obj: $(STRCMP_DEP)
+
+$(lpfx)aeabi_memmove.o: $(AEABI_MEMMOVE_DEP)
+
+$(lpfx)aeabi_memmove.obj: $(AEABI_MEMMOVE_DEP)
+
+$(lpfx)aeabi_memset.o: $(AEABI_MEMSET_DEP)
+
+$(lpfx)aeabi_memset.obj: $(AEABI_MEMSET_DEP)
diff --git a/newlib/libc/machine/arm/Makefile.in b/newlib/libc/machine/arm/Makefile.in
index 975103f6c..49082088f 100644
--- a/newlib/libc/machine/arm/Makefile.in
+++ b/newlib/libc/machine/arm/Makefile.in
@@ -70,11 +70,16 @@ ARFLAGS = cru
lib_a_AR = $(AR) $(ARFLAGS)
lib_a_LIBADD =
am_lib_a_OBJECTS = lib_a-setjmp.$(OBJEXT) lib_a-access.$(OBJEXT) \
- lib_a-strlen.$(OBJEXT) lib_a-strcmp.$(OBJEXT) \
- lib_a-strcpy.$(OBJEXT) lib_a-memcpy.$(OBJEXT) \
- lib_a-memcpy-stub.$(OBJEXT) lib_a-memchr-stub.$(OBJEXT) \
- lib_a-memchr.$(OBJEXT) lib_a-strlen.$(OBJEXT) \
- lib_a-strlen-armv7.$(OBJEXT)
+ lib_a-strcmp.$(OBJEXT) lib_a-strcpy.$(OBJEXT) \
+ lib_a-aeabi_memcpy.$(OBJEXT) \
+ lib_a-aeabi_memcpy-armv7a.$(OBJEXT) \
+ lib_a-aeabi_memmove.$(OBJEXT) \
+ lib_a-aeabi_memmove-soft.$(OBJEXT) \
+ lib_a-aeabi_memset.$(OBJEXT) lib_a-aeabi_memset-soft.$(OBJEXT) \
+ lib_a-aeabi_memclr.$(OBJEXT) lib_a-memchr-stub.$(OBJEXT) \
+ lib_a-memchr.$(OBJEXT) lib_a-memcpy-stub.$(OBJEXT) \
+ lib_a-memcpy.$(OBJEXT) lib_a-strlen-stub.$(OBJEXT) \
+ lib_a-strlen.$(OBJEXT)
lib_a_OBJECTS = $(am_lib_a_OBJECTS)
DEFAULT_INCLUDES = -I.@am__isrc@
depcomp =
@@ -105,6 +110,7 @@ CC = @CC@
CCAS = @CCAS@
CCASFLAGS = @CCASFLAGS@
CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
CYGPATH_W = @CYGPATH_W@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
@@ -200,15 +206,26 @@ AUTOMAKE_OPTIONS = cygnus
INCLUDES = $(NEWLIB_CFLAGS) $(CROSS_CFLAGS) $(TARGET_CFLAGS)
AM_CCASFLAGS = $(INCLUDES)
noinst_LIBRARIES = lib.a
-lib_a_SOURCES = setjmp.S access.c strlen.c strcmp.S strcpy.c \
- memcpy.S memcpy-stub.c memchr-stub.c memchr.S \
- strlen.c strlen-armv7.S
-
+lib_a_SOURCES = setjmp.S access.c strcmp.S strcpy.c aeabi_memcpy.c \
+ aeabi_memcpy-armv7a.S aeabi_memmove.c aeabi_memmove-soft.S \
+ aeabi_memset.c aeabi_memset-soft.S aeabi_memclr.c \
+ memchr-stub.c memchr.S memcpy-stub.c memcpy.S strlen-stub.c \
+ strlen.S
lib_a_CCASFLAGS = $(AM_CCASFLAGS)
lib_a_CFLAGS = $(AM_CFLAGS)
ACLOCAL_AMFLAGS = -I ../../.. -I ../../../..
CONFIG_STATUS_DEPENDENCIES = $(newlib_basedir)/configure.host
+MEMCHR_DEP = acle-compat.h arm_asm.h
MEMCPY_DEP = memcpy-armv7a.S memcpy-armv7m.S
+STRCMP_DEP = strcmp-arm-tiny.S strcmp-armv4.S strcmp-armv4t.S strcmp-armv6.S \
+ strcmp-armv6m.S strcmp-armv7.S strcmp-armv7m.S
+
+AEABI_MEMMOVE_DEP = aeabi_memmove-thumb.S aeabi_memmove-thumb2.S \
+ aeabi_memmove-arm.S
+
+AEABI_MEMSET_DEP = aeabi_memset-thumb.S aeabi_memset-thumb2.S \
+ aeabi_memset-arm.S
+
all: all-am
.SUFFIXES:
@@ -279,11 +296,23 @@ lib_a-strcmp.o: strcmp.S
lib_a-strcmp.obj: strcmp.S
$(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CCASFLAGS) $(CCASFLAGS) -c -o lib_a-strcmp.obj `if test -f 'strcmp.S'; then $(CYGPATH_W) 'strcmp.S'; else $(CYGPATH_W) '$(srcdir)/strcmp.S'; fi`
-lib_a-memcpy.o: memcpy.S
- $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CCASFLAGS) $(CCASFLAGS) -c -o lib_a-memcpy.o `test -f 'memcpy.S' || echo '$(srcdir)/'`memcpy.S
+lib_a-aeabi_memcpy-armv7a.o: aeabi_memcpy-armv7a.S
+ $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CCASFLAGS) $(CCASFLAGS) -c -o lib_a-aeabi_memcpy-armv7a.o `test -f 'aeabi_memcpy-armv7a.S' || echo '$(srcdir)/'`aeabi_memcpy-armv7a.S
-lib_a-memcpy.obj: memcpy.S
- $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CCASFLAGS) $(CCASFLAGS) -c -o lib_a-memcpy.obj `if test -f 'memcpy.S'; then $(CYGPATH_W) 'memcpy.S'; else $(CYGPATH_W) '$(srcdir)/memcpy.S'; fi`
+lib_a-aeabi_memcpy-armv7a.obj: aeabi_memcpy-armv7a.S
+ $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CCASFLAGS) $(CCASFLAGS) -c -o lib_a-aeabi_memcpy-armv7a.obj `if test -f 'aeabi_memcpy-armv7a.S'; then $(CYGPATH_W) 'aeabi_memcpy-armv7a.S'; else $(CYGPATH_W) '$(srcdir)/aeabi_memcpy-armv7a.S'; fi`
+
+lib_a-aeabi_memmove-soft.o: aeabi_memmove-soft.S
+ $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CCASFLAGS) $(CCASFLAGS) -c -o lib_a-aeabi_memmove-soft.o `test -f 'aeabi_memmove-soft.S' || echo '$(srcdir)/'`aeabi_memmove-soft.S
+
+lib_a-aeabi_memmove-soft.obj: aeabi_memmove-soft.S
+ $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CCASFLAGS) $(CCASFLAGS) -c -o lib_a-aeabi_memmove-soft.obj `if test -f 'aeabi_memmove-soft.S'; then $(CYGPATH_W) 'aeabi_memmove-soft.S'; else $(CYGPATH_W) '$(srcdir)/aeabi_memmove-soft.S'; fi`
+
+lib_a-aeabi_memset-soft.o: aeabi_memset-soft.S
+ $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CCASFLAGS) $(CCASFLAGS) -c -o lib_a-aeabi_memset-soft.o `test -f 'aeabi_memset-soft.S' || echo '$(srcdir)/'`aeabi_memset-soft.S
+
+lib_a-aeabi_memset-soft.obj: aeabi_memset-soft.S
+ $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CCASFLAGS) $(CCASFLAGS) -c -o lib_a-aeabi_memset-soft.obj `if test -f 'aeabi_memset-soft.S'; then $(CYGPATH_W) 'aeabi_memset-soft.S'; else $(CYGPATH_W) '$(srcdir)/aeabi_memset-soft.S'; fi`
lib_a-memchr.o: memchr.S
$(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CCASFLAGS) $(CCASFLAGS) -c -o lib_a-memchr.o `test -f 'memchr.S' || echo '$(srcdir)/'`memchr.S
@@ -291,11 +320,17 @@ lib_a-memchr.o: memchr.S
lib_a-memchr.obj: memchr.S
$(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CCASFLAGS) $(CCASFLAGS) -c -o lib_a-memchr.obj `if test -f 'memchr.S'; then $(CYGPATH_W) 'memchr.S'; else $(CYGPATH_W) '$(srcdir)/memchr.S'; fi`
-lib_a-strlen-armv7.o: strlen-armv7.S
- $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CCASFLAGS) $(CCASFLAGS) -c -o lib_a-strlen-armv7.o `test -f 'strlen-armv7.S' || echo '$(srcdir)/'`strlen-armv7.S
+lib_a-memcpy.o: memcpy.S
+ $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CCASFLAGS) $(CCASFLAGS) -c -o lib_a-memcpy.o `test -f 'memcpy.S' || echo '$(srcdir)/'`memcpy.S
+
+lib_a-memcpy.obj: memcpy.S
+ $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CCASFLAGS) $(CCASFLAGS) -c -o lib_a-memcpy.obj `if test -f 'memcpy.S'; then $(CYGPATH_W) 'memcpy.S'; else $(CYGPATH_W) '$(srcdir)/memcpy.S'; fi`
+
+lib_a-strlen.o: strlen.S
+ $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CCASFLAGS) $(CCASFLAGS) -c -o lib_a-strlen.o `test -f 'strlen.S' || echo '$(srcdir)/'`strlen.S
-lib_a-strlen-armv7.obj: strlen-armv7.S
- $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CCASFLAGS) $(CCASFLAGS) -c -o lib_a-strlen-armv7.obj `if test -f 'strlen-armv7.S'; then $(CYGPATH_W) 'strlen-armv7.S'; else $(CYGPATH_W) '$(srcdir)/strlen-armv7.S'; fi`
+lib_a-strlen.obj: strlen.S
+ $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CCASFLAGS) $(CCASFLAGS) -c -o lib_a-strlen.obj `if test -f 'strlen.S'; then $(CYGPATH_W) 'strlen.S'; else $(CYGPATH_W) '$(srcdir)/strlen.S'; fi`
.c.o:
$(COMPILE) -c $<
@@ -309,23 +344,35 @@ lib_a-access.o: access.c
lib_a-access.obj: access.c
$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-access.obj `if test -f 'access.c'; then $(CYGPATH_W) 'access.c'; else $(CYGPATH_W) '$(srcdir)/access.c'; fi`
-lib_a-strlen.o: strlen.c
- $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-strlen.o `test -f 'strlen.c' || echo '$(srcdir)/'`strlen.c
-
-lib_a-strlen.obj: strlen.c
- $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-strlen.obj `if test -f 'strlen.c'; then $(CYGPATH_W) 'strlen.c'; else $(CYGPATH_W) '$(srcdir)/strlen.c'; fi`
-
lib_a-strcpy.o: strcpy.c
$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-strcpy.o `test -f 'strcpy.c' || echo '$(srcdir)/'`strcpy.c
lib_a-strcpy.obj: strcpy.c
$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-strcpy.obj `if test -f 'strcpy.c'; then $(CYGPATH_W) 'strcpy.c'; else $(CYGPATH_W) '$(srcdir)/strcpy.c'; fi`
-lib_a-memcpy-stub.o: memcpy-stub.c
- $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-memcpy-stub.o `test -f 'memcpy-stub.c' || echo '$(srcdir)/'`memcpy-stub.c
+lib_a-aeabi_memcpy.o: aeabi_memcpy.c
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-aeabi_memcpy.o `test -f 'aeabi_memcpy.c' || echo '$(srcdir)/'`aeabi_memcpy.c
-lib_a-memcpy-stub.obj: memcpy-stub.c
- $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-memcpy-stub.obj `if test -f 'memcpy-stub.c'; then $(CYGPATH_W) 'memcpy-stub.c'; else $(CYGPATH_W) '$(srcdir)/memcpy-stub.c'; fi`
+lib_a-aeabi_memcpy.obj: aeabi_memcpy.c
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-aeabi_memcpy.obj `if test -f 'aeabi_memcpy.c'; then $(CYGPATH_W) 'aeabi_memcpy.c'; else $(CYGPATH_W) '$(srcdir)/aeabi_memcpy.c'; fi`
+
+lib_a-aeabi_memmove.o: aeabi_memmove.c
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-aeabi_memmove.o `test -f 'aeabi_memmove.c' || echo '$(srcdir)/'`aeabi_memmove.c
+
+lib_a-aeabi_memmove.obj: aeabi_memmove.c
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-aeabi_memmove.obj `if test -f 'aeabi_memmove.c'; then $(CYGPATH_W) 'aeabi_memmove.c'; else $(CYGPATH_W) '$(srcdir)/aeabi_memmove.c'; fi`
+
+lib_a-aeabi_memset.o: aeabi_memset.c
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-aeabi_memset.o `test -f 'aeabi_memset.c' || echo '$(srcdir)/'`aeabi_memset.c
+
+lib_a-aeabi_memset.obj: aeabi_memset.c
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-aeabi_memset.obj `if test -f 'aeabi_memset.c'; then $(CYGPATH_W) 'aeabi_memset.c'; else $(CYGPATH_W) '$(srcdir)/aeabi_memset.c'; fi`
+
+lib_a-aeabi_memclr.o: aeabi_memclr.c
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-aeabi_memclr.o `test -f 'aeabi_memclr.c' || echo '$(srcdir)/'`aeabi_memclr.c
+
+lib_a-aeabi_memclr.obj: aeabi_memclr.c
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-aeabi_memclr.obj `if test -f 'aeabi_memclr.c'; then $(CYGPATH_W) 'aeabi_memclr.c'; else $(CYGPATH_W) '$(srcdir)/aeabi_memclr.c'; fi`
lib_a-memchr-stub.o: memchr-stub.c
$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-memchr-stub.o `test -f 'memchr-stub.c' || echo '$(srcdir)/'`memchr-stub.c
@@ -333,6 +380,18 @@ lib_a-memchr-stub.o: memchr-stub.c
lib_a-memchr-stub.obj: memchr-stub.c
$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-memchr-stub.obj `if test -f 'memchr-stub.c'; then $(CYGPATH_W) 'memchr-stub.c'; else $(CYGPATH_W) '$(srcdir)/memchr-stub.c'; fi`
+lib_a-memcpy-stub.o: memcpy-stub.c
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-memcpy-stub.o `test -f 'memcpy-stub.c' || echo '$(srcdir)/'`memcpy-stub.c
+
+lib_a-memcpy-stub.obj: memcpy-stub.c
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-memcpy-stub.obj `if test -f 'memcpy-stub.c'; then $(CYGPATH_W) 'memcpy-stub.c'; else $(CYGPATH_W) '$(srcdir)/memcpy-stub.c'; fi`
+
+lib_a-strlen-stub.o: strlen-stub.c
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-strlen-stub.o `test -f 'strlen-stub.c' || echo '$(srcdir)/'`strlen-stub.c
+
+lib_a-strlen-stub.obj: strlen-stub.c
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-strlen-stub.obj `if test -f 'strlen-stub.c'; then $(CYGPATH_W) 'strlen-stub.c'; else $(CYGPATH_W) '$(srcdir)/strlen-stub.c'; fi`
+
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
@@ -504,10 +563,25 @@ uninstall-am:
uninstall-am
+$(lpfx)memchr.o: $(MEMCHR_DEP)
+$(lpfx)memchr.obj: $(MEMCHR_DEP)
+
$(lpfx)memcpy.o: $(MEMCPY_DEP)
$(lpfx)memcpy.obj: $(MEMCPY_DEP)
+$(lpfx)strcmp.o: $(STRCMP_DEP)
+
+$(lpfx)strcmp.obj: $(STRCMP_DEP)
+
+$(lpfx)aeabi_memmove.o: $(AEABI_MEMMOVE_DEP)
+
+$(lpfx)aeabi_memmove.obj: $(AEABI_MEMMOVE_DEP)
+
+$(lpfx)aeabi_memset.o: $(AEABI_MEMSET_DEP)
+
+$(lpfx)aeabi_memset.obj: $(AEABI_MEMSET_DEP)
+
# 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/machine/arm/acle-compat.h b/newlib/libc/machine/arm/acle-compat.h
new file mode 100644
index 000000000..888ae2ea8
--- /dev/null
+++ b/newlib/libc/machine/arm/acle-compat.h
@@ -0,0 +1,182 @@
+/*
+ * Copyright (c) 2014 ARM Ltd
+ * 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. The name of the company may not be used to endorse or promote
+ * products derived from this software without specific prior written
+ * permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ARM LTD ``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 ARM LTD 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.
+ */
+
+#ifndef __ARM_ARCH
+
+/* ACLE standardises a set of pre-defines that describe the ARM architecture.
+ These were mostly implemented in GCC around GCC-4.8; older versions
+ have no, or only partial support. To provide a level of backwards
+ compatibility we try to work out what the definitions should be, given
+ the older pre-defines that GCC did produce. This isn't complete, but
+ it should be enough for use by routines that depend on this header. */
+
+/* No need to handle ARMv8, GCC had ACLE support before that. */
+
+# ifdef __ARM_ARCH_7__
+/* The common subset of ARMv7 in all profiles. */
+# define __ARM_ARCH 7
+# define __ARM_ARCH_ISA_THUMB 2
+# define __ARM_FEATURE_CLZ
+# define __ARM_FEATURE_LDREX 7
+# define __ARM_FEATURE_UNALIGNED
+# endif
+
+# if defined (__ARM_ARCH_7A__) || defined (__ARM_ARCH_7R__)
+# define __ARM_ARCH 7
+# define __ARM_ARCH_ISA_THUMB 2
+# define __ARM_ARCH_ISA_ARM
+# define __ARM_FEATURE_CLZ
+# define __ARM_FEATURE_SIMD32
+# define __ARM_FEATURE_DSP
+# define __ARM_FEATURE_QBIT
+# define __ARM_FEATURE_SAT
+# define __ARM_FEATURE_LDREX 15
+# define __ARM_FEATURE_UNALIGNED
+# ifdef __ARM_ARCH_7A__
+# define __ARM_ARCH_PROFILE 'A'
+# else
+# define __ARM_ARCH_PROFILE 'R'
+# endif
+# endif
+
+# ifdef __ARM_ARCH_7EM__
+# define __ARM_ARCH 7
+# define __ARM_ARCH_ISA_THUMB 2
+# define __ARM_FEATURE_CLZ
+# define __ARM_FEATURE_SIMD32
+# define __ARM_FEATURE_DSP
+# define __ARM_FEATURE_QBIT
+# define __ARM_FEATURE_SAT
+# define __ARM_FEATURE_LDREX 7
+# define __ARM_FEATURE_UNALIGNED
+# define __ARM_ARCH_PROFILE 'M'
+# endif
+
+# ifdef __ARM_ARCH_7M__
+# define __ARM_ARCH 7
+# define __ARM_ARCH_ISA_THUMB 2
+# define __ARM_FEATURE_CLZ
+# define __ARM_FEATURE_QBIT
+# define __ARM_FEATURE_SAT
+# define __ARM_FEATURE_LDREX 7
+# define __ARM_FEATURE_UNALIGNED
+# define __ARM_ARCH_PROFILE 'M'
+# endif
+
+# ifdef __ARM_ARCH_6T2__
+# define __ARM_ARCH 6
+# define __ARM_ARCH_ISA_THUMB 2
+# define __ARM_ARCH_ISA_ARM
+# define __ARM_FEATURE_CLZ
+# define __ARM_FEATURE_SIMD32
+# define __ARM_FEATURE_DSP
+# define __ARM_FEATURE_QBIT
+# define __ARM_FEATURE_SAT
+# define __ARM_FEATURE_LDREX 4
+# define __ARM_FEATURE_UNALIGNED
+# endif
+
+# ifdef __ARM_ARCH_6M__
+# define __ARM_ARCH 6
+# define __ARM_ARCH_ISA_THUMB 1
+# define __ARM_ARCH_PROFILE 'M'
+# endif
+
+# if defined (__ARM_ARCH_6__) || defined (__ARM_ARCH_6J__) \
+ || defined (__ARM_ARCH_6K__) || defined (__ARM_ARCH_6Z__) \
+ || defined (__ARM_ARCH_6ZK__)
+# define __ARM_ARCH 6
+# define __ARM_ARCH_ISA_THUMB 1
+# define __ARM_ARCH_ISA_ARM
+# define __ARM_FEATURE_CLZ
+# define __ARM_FEATURE_SIMD32
+# define __ARM_FEATURE_DSP
+# define __ARM_FEATURE_QBIT
+# define __ARM_FEATURE_SAT
+# define __ARM_FEATURE_UNALIGNED
+# ifndef __thumb__
+# if defined (__ARM_ARCH_6K__) || defined (__ARM_ARCH_6ZK__)
+# define __ARM_FEATURE_LDREX 15
+# else
+# define __ARM_FEATURE_LDREX 4
+# endif
+# endif
+# endif
+
+# if defined (__ARM_ARCH_5TE__) || defined (__ARM_ARCH_5E__)
+# define __ARM_ARCH 5
+# define __ARM_ARCH_ISA_ARM
+# ifdef __ARM_ARCH_5TE__
+# define __ARM_ARCH_ISA_THUMB 1
+# endif
+# define __ARM_FEATURE_CLZ
+# define __ARM_FEATURE_DSP
+# endif
+
+# if defined (__ARM_ARCH_5T__) || defined (__ARM_ARCH_5__)
+# define __ARM_ARCH 5
+# define __ARM_ARCH_ISA_ARM
+# ifdef __ARM_ARCH_5TE__
+# define __ARM_ARCH_ISA_THUMB 1
+# endif
+# define __ARM_FEATURE_CLZ
+# endif
+
+# ifdef __ARM_ARCH_4T__
+# define __ARM_ARCH 4
+# define __ARM_ARCH_ISA_ARM
+# define __ARM_ARCH_ISA_THUMB 1
+# endif
+
+# ifdef __ARM_ARCH_4__
+# define __ARM_ARCH 4
+# define __ARM_ARCH_ISA_ARM
+# endif
+
+# if defined (__ARM_ARCH_3__) || defined (__ARM_ARCH_3M__)
+# define __ARM_ARCH 3
+# define __ARM_ARCH_ISA_ARM
+# endif
+
+# ifdef __ARM_ARCH_2__
+# define __ARM_ARCH 2
+# define __ARM_ARCH_ISA_ARM
+# endif
+
+# ifdef __ARMEB__
+# define __ARM_BIG_ENDIAN
+# endif
+
+/* If we still don't know what the target architecture is, then we're
+ probably not using GCC. */
+# ifndef __ARM_ARCH
+# error Unable to determine architecture version.
+# endif
+
+#endif /* __ARM_ARCH */
+
diff --git a/newlib/libc/machine/arm/aeabi_memclr.c b/newlib/libc/machine/arm/aeabi_memclr.c
new file mode 100644
index 000000000..6da9135fb
--- /dev/null
+++ b/newlib/libc/machine/arm/aeabi_memclr.c
@@ -0,0 +1,45 @@
+/*
+ * Copyright (c) 2015 ARM Ltd
+ * 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. The name of the company may not be used to endorse or promote
+ * products derived from this software without specific prior written
+ * permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ARM LTD ``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 ARM LTD 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 <stddef.h>
+#include <_ansi.h>
+
+/* Support the alias for the __aeabi_memclr which may
+ assume memory alignment. */
+void __aeabi_memclr4 (void *dest, size_t n)
+ _ATTRIBUTE ((alias ("__aeabi_memclr")));
+
+void __aeabi_memclr8 (void *dest, size_t n)
+ _ATTRIBUTE ((alias ("__aeabi_memclr")));
+
+/* Support the routine __aeabi_memclr. */
+void __aeabi_memclr (void *dest, size_t n)
+{
+ extern void __aeabi_memset (void *dest, size_t n, int c);
+ __aeabi_memset (dest, n, 0);
+}
diff --git a/newlib/libc/machine/arm/aeabi_memcpy-armv7a.S b/newlib/libc/machine/arm/aeabi_memcpy-armv7a.S
new file mode 100644
index 000000000..53e3330ff
--- /dev/null
+++ b/newlib/libc/machine/arm/aeabi_memcpy-armv7a.S
@@ -0,0 +1,286 @@
+/*
+ * Copyright (c) 2014 ARM Ltd
+ * 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. The name of the company may not be used to endorse or promote
+ * products derived from this software without specific prior written
+ * permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ARM LTD ``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 ARM LTD 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 "arm_asm.h"
+
+/* NOTE: This ifdef MUST match the one in aeabi_memcpy.c. */
+#if defined (__ARM_ARCH_7A__) && defined (__ARM_FEATURE_UNALIGNED) && \
+ (defined (__ARM_NEON__) || !defined (__SOFTFP__))
+
+ .syntax unified
+ .global __aeabi_memcpy
+ .type __aeabi_memcpy, %function
+__aeabi_memcpy:
+ /* Assumes that n >= 0, and dst, src are valid pointers.
+ If there is at least 8 bytes to copy, use LDRD/STRD.
+ If src and dst are misaligned with different offsets,
+ first copy byte by byte until dst is aligned,
+ and then copy using LDRD/STRD and shift if needed.
+ When less than 8 left, copy a word and then byte by byte. */
+
+ /* Save registers (r0 holds the return value):
+ optimized push {r0, r4, r5, lr}.
+ To try and improve performance, stack layout changed,
+ i.e., not keeping the stack looking like users expect
+ (highest numbered register at highest address). */
+ push {r0, lr}
+ strd r4, r5, [sp, #-8]!
+
+ /* Get copying of tiny blocks out of the way first. */
+ /* Is there at least 4 bytes to copy? */
+ subs r2, r2, #4
+ blt copy_less_than_4 /* If n < 4. */
+
+ /* Check word alignment. */
+ ands ip, r0, #3 /* ip = last 2 bits of dst. */
+ bne dst_not_word_aligned /* If dst is not word-aligned. */
+
+ /* Get here if dst is word-aligned. */
+ ands ip, r1, #3 /* ip = last 2 bits of src. */
+ bne src_not_word_aligned /* If src is not word-aligned. */
+word_aligned:
+ /* Get here if source and dst both are word-aligned.
+ The number of bytes remaining to copy is r2+4. */
+
+ /* Is there is at least 64 bytes to copy? */
+ subs r2, r2, #60
+ blt copy_less_than_64 /* If r2 + 4 < 64. */
+
+ /* First, align the destination buffer to 8-bytes,
+ to make sure double loads and stores don't cross cache line boundary,
+ as they are then more expensive even if the data is in the cache
+ (require two load/store issue cycles instead of one).
+ If only one of the buffers is not 8-bytes aligned,
+ then it's more important to align dst than src,
+ because there is more penalty for stores
+ than loads that cross cacheline boundary.
+ This check and realignment are only worth doing
+ if there is a lot to copy. */
+
+ /* Get here if dst is word aligned,
+ i.e., the 2 least significant bits are 0.
+ If dst is not 2w aligned (i.e., the 3rd bit is not set in dst),
+ then copy 1 word (4 bytes). */
+ ands r3, r0, #4
+ beq two_word_aligned /* If dst already two-word aligned. */
+ ldr r3, [r1], #4
+ str r3, [r0], #4
+ subs r2, r2, #4
+ blt copy_less_than_64
+
+two_word_aligned:
+ /* TODO: Align to cacheline (useful for PLD optimization). */
+
+ /* Every loop iteration copies 64 bytes. */
+1:
+ .irp offset, #0, #8, #16, #24, #32, #40, #48, #56
+ ldrd r4, r5, [r1, \offset]
+ strd r4, r5, [r0, \offset]
+ .endr
+
+ add r0, r0, #64
+ add r1, r1, #64
+ subs r2, r2, #64
+ bge 1b /* If there is more to copy. */
+
+copy_less_than_64:
+
+ /* Get here if less than 64 bytes to copy, -64 <= r2 < 0.
+ Restore the count if there is more than 7 bytes to copy. */
+ adds r2, r2, #56
+ blt copy_less_than_8
+
+ /* Copy 8 bytes at a time. */
+2:
+ ldrd r4, r5, [r1], #8
+ strd r4, r5, [r0], #8
+ subs r2, r2, #8
+ bge 2b /* If there is more to copy. */
+
+copy_less_than_8:
+
+ /* Get here if less than 8 bytes to copy, -8 <= r2 < 0.
+ Check if there is more to copy. */
+ cmn r2, #8
+ beq return /* If r2 + 8 == 0. */
+
+ /* Restore the count if there is more than 3 bytes to copy. */
+ adds r2, r2, #4
+ blt copy_less_than_4
+
+ /* Copy 4 bytes. */
+ ldr r3, [r1], #4
+ str r3, [r0], #4
+
+copy_less_than_4:
+ /* Get here if less than 4 bytes to copy, -4 <= r2 < 0. */
+
+ /* Restore the count, check if there is more to copy. */
+ adds r2, r2, #4
+ beq return /* If r2 == 0. */
+
+ /* Get here with r2 is in {1,2,3}={01,10,11}. */
+ /* Logical shift left r2, insert 0s, update flags. */
+ lsls r2, r2, #31
+
+ /* Copy byte by byte.
+ Condition ne means the last bit of r2 is 0.
+ Condition cs means the second to last bit of r2 is set,
+ i.e., r2 is 1 or 3. */
+ itt ne
+ ldrbne r3, [r1], #1
+ strbne r3, [r0], #1
+
+ itttt cs
+ ldrbcs r4, [r1], #1
+ ldrbcs r5, [r1]
+ strbcs r4, [r0], #1
+ strbcs r5, [r0]
+
+return:
+ /* Restore registers: optimized pop {r0, r4, r5, pc} */
+ ldrd r4, r5, [sp], #8
+ pop {r0, pc} /* This is the only return point of memcpy. */
+
+dst_not_word_aligned:
+
+ /* Get here when dst is not aligned and ip has the last 2 bits of dst,
+ i.e., ip is the offset of dst from word.
+ The number of bytes that remains to copy is r2 + 4,
+ i.e., there are at least 4 bytes to copy.
+ Write a partial word (0 to 3 bytes), such that dst becomes
+ word-aligned. */
+
+ /* If dst is at ip bytes offset from a word (with 0 < ip < 4),
+ then there are (4 - ip) bytes to fill up to align dst to the next
+ word. */
+ rsb ip, ip, #4 /* ip = #4 - ip. */
+ cmp ip, #2
+
+ /* Copy byte by byte with conditionals. */
+ itt gt
+ ldrbgt r3, [r1], #1
+ strbgt r3, [r0], #1
+
+ itt ge
+ ldrbge r4, [r1], #1
+ strbge r4, [r0], #1
+
+ ldrb lr, [r1], #1
+ strb lr, [r0], #1
+
+ /* Update the count.
+ ip holds the number of bytes we have just copied. */
+ subs r2, r2, ip /* r2 = r2 - ip. */
+ blt copy_less_than_4 /* If r2 < ip. */
+
+ /* Get here if there are more than 4 bytes to copy.
+ Check if src is aligned. If beforehand src and dst were not word
+ aligned but congruent (same offset), then now they are both
+ word-aligned, and we can copy the rest efficiently (without
+ shifting). */
+ ands ip, r1, #3 /* ip = last 2 bits of src. */
+ beq word_aligned /* If r1 is word-aligned. */
+
+src_not_word_aligned:
+ /* Get here when src is not word-aligned, but dst is word-aligned.
+ The number of bytes that remains to copy is r2+4. */
+
+ /* Copy word by word using LDR when alignment can be done in hardware,
+ i.e., SCTLR.A is set, supporting unaligned access in LDR and STR. */
+ subs r2, r2, #60
+ blt 8f
+
+7:
+ /* Copy 64 bytes in every loop iteration. */
+ .irp offset, #0, #4, #8, #12, #16, #20, #24, #28, #32, #36, #40, #44, #48, #52, #56, #60
+ ldr r3, [r1, \offset]
+ str r3, [r0, \offset]
+ .endr
+
+ add r0, r0, #64
+ add r1, r1, #64
+ subs r2, r2, #64
+ bge 7b
+
+8:
+ /* Get here if less than 64 bytes to copy, -64 <= r2 < 0.
+ Check if there is more than 3 bytes to copy. */
+ adds r2, r2, #60
+ blt copy_less_than_4
+
+9:
+ /* Get here if there is less than 64 but at least 4 bytes to copy,
+ where the number of bytes to copy is r2+4. */
+ ldr r3, [r1], #4
+ str r3, [r0], #4
+ subs r2, r2, #4
+ bge 9b
+
+ b copy_less_than_4
+
+
+ .syntax unified
+ .global __aeabi_memcpy4
+ .type __aeabi_memcpy4, %function
+__aeabi_memcpy4:
+ /* Assumes that both of its arguments are 4-byte aligned. */
+
+ push {r0, lr}
+ strd r4, r5, [sp, #-8]!
+
+ /* Is there at least 4 bytes to copy? */
+ subs r2, r2, #4
+ blt copy_less_than_4 /* If n < 4. */
+
+ bl word_aligned
+
+ .syntax unified
+ .global __aeabi_memcpy8
+ .type __aeabi_memcpy8, %function
+__aeabi_memcpy8:
+ /* Assumes that both of its arguments are 8-byte aligned. */
+
+ push {r0, lr}
+ strd r4, r5, [sp, #-8]!
+
+ /* Is there at least 4 bytes to copy? */
+ subs r2, r2, #4
+ blt copy_less_than_4 /* If n < 4. */
+
+ /* Is there at least 8 bytes to copy? */
+ subs r2, r2, #4
+ blt copy_less_than_8 /* If n < 8. */
+
+ /* Is there at least 64 bytes to copy? */
+ subs r2, r2, #56
+ blt copy_less_than_64 /* if n + 8 < 64. */
+
+ bl two_word_aligned
+
+#endif
diff --git a/newlib/libc/machine/arm/aeabi_memcpy.c b/newlib/libc/machine/arm/aeabi_memcpy.c
new file mode 100644
index 000000000..9837c35fe
--- /dev/null
+++ b/newlib/libc/machine/arm/aeabi_memcpy.c
@@ -0,0 +1,64 @@
+/*
+ * Copyright (c) 2014 ARM Ltd
+ * 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. The name of the company may not be used to endorse or promote
+ * products derived from this software without specific prior written
+ * permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ARM LTD ``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 ARM LTD 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 <stddef.h>
+#include <_ansi.h>
+
+/* According to the Run-time ABI for the ARM Architecture. This
+ function is allowed to corrupt only the integer core register
+ permitted to be corrupted by the [AAPCS] (r0-r3, ip, lr, and
+ CPSR).
+
+ The FP registers are used in memcpy for target __ARM_ARCH_7A.
+ Therefore, we can't just simply use alias to support the function
+ aeabi_memcpy for target __ARM_ARCH_7A. Instead, we choose the
+ previous versions of memcpy to suppport it as an alternative. */
+
+/* NOTE: This ifdef MUST match the one in aeabi_memcpy-armv7a.S. */
+#if defined (__ARM_ARCH_7A__) && defined (__ARM_FEATURE_UNALIGNED) && \
+ (defined (__ARM_NEON__) || !defined (__SOFTFP__))
+
+/* Defined in aeabi_memcpy-armv7a.S. */
+
+#else
+/* Support the alias for the __aeabi_memcpy which may
+ assume memory alignment. */
+void __aeabi_memcpy4 (void *dest, const void *source, size_t n)
+ _ATTRIBUTE ((alias ("__aeabi_memcpy")));
+
+void __aeabi_memcpy8 (void *dest, const void *source, size_t n)
+ _ATTRIBUTE ((alias ("__aeabi_memcpy")));
+
+/* Support the routine __aeabi_memcpy. Can't alias to memcpy
+ because it's not defined in the same translation unit. */
+void __aeabi_memcpy (void *dest, const void *source, size_t n)
+{
+ extern void memcpy (void *dest, const void *source, size_t n);
+ memcpy (dest, source, n);
+}
+#endif
diff --git a/newlib/libc/machine/arm/aeabi_memmove-arm.S b/newlib/libc/machine/arm/aeabi_memmove-arm.S
new file mode 100644
index 000000000..e6e9639fa
--- /dev/null
+++ b/newlib/libc/machine/arm/aeabi_memmove-arm.S
@@ -0,0 +1,64 @@
+/*
+ * Copyright (c) 2015 ARM Ltd
+ * 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. The name of the company may not be used to endorse or promote
+ * products derived from this software without specific prior written
+ * permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ARM LTD ``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 ARM LTD 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.
+ */
+
+ .arm
+ .syntax divided
+ .global __aeabi_memmove
+ .type __aeabi_memmove, %function
+ ASM_ALIAS __aeabi_memmove4 __aeabi_memmove
+ ASM_ALIAS __aeabi_memmove8 __aeabi_memmove
+__aeabi_memmove:
+ cmp r0, r1
+ bls 2f
+ add r3, r1, r2
+ cmp r0, r3
+ bcs 2f
+ cmp r2, #0
+ add r1, r0, r2
+ bxeq lr
+ rsb r2, r2, r3
+1:
+ ldrb ip, [r3, #-1]!
+ cmp r2, r3
+ strb ip, [r1, #-1]!
+ bne 1b
+ bx lr
+2:
+ cmp r2, #0
+ addne r2, r1, r2
+ subne r3, r0, #1
+ beq 4f
+3:
+ ldrb ip, [r1], #1
+ cmp r2, r1
+ strb ip, [r3, #1]!
+ bne 3b
+ bx lr
+4:
+ bx lr
+ .size __aeabi_memmove, . - __aeabi_memmove
diff --git a/newlib/libc/machine/arm/aeabi_memmove-soft.S b/newlib/libc/machine/arm/aeabi_memmove-soft.S
new file mode 100644
index 000000000..010e266d7
--- /dev/null
+++ b/newlib/libc/machine/arm/aeabi_memmove-soft.S
@@ -0,0 +1,52 @@
+/*
+ * Copyright (c) 2015 ARM Ltd
+ * 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. The name of the company may not be used to endorse or promote
+ * products derived from this software without specific prior written
+ * permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ARM LTD ``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 ARM LTD 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 "arm_asm.h"
+
+.macro ASM_ALIAS new old
+ .global \new
+ .type \new, %function
+#if defined (__thumb__)
+ .thumb_set \new, \old
+#else
+ .set \new, \old
+#endif
+.endm
+
+/* NOTE: This ifdef MUST match the one in aeabi_memmove.c. */
+#if !defined (__SOFTFP__)
+
+# if defined (__thumb2__)
+# include "aeabi_memmove-thumb2.S"
+# elif defined (__thumb__)
+# include "aeabi_memmove-thumb.S"
+# else
+# include "aeabi_memmove-arm.S"
+# endif
+
+#endif
diff --git a/newlib/libc/machine/arm/aeabi_memmove-thumb.S b/newlib/libc/machine/arm/aeabi_memmove-thumb.S
new file mode 100644
index 000000000..61a72581c
--- /dev/null
+++ b/newlib/libc/machine/arm/aeabi_memmove-thumb.S
@@ -0,0 +1,66 @@
+/*
+ * Copyright (c) 2015 ARM Ltd
+ * 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. The name of the company may not be used to endorse or promote
+ * products derived from this software without specific prior written
+ * permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ARM LTD ``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 ARM LTD 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.
+ */
+
+ .thumb
+ .syntax unified
+ .global __aeabi_memmove
+ .type __aeabi_memmove, %function
+ ASM_ALIAS __aeabi_memmove4 __aeabi_memmove
+ ASM_ALIAS __aeabi_memmove8 __aeabi_memmove
+__aeabi_memmove:
+ push {r4, lr}
+ cmp r0, r1
+ bls 3f
+ adds r4, r1, r2
+ cmp r0, r4
+ bcs 3f
+ subs r3, r2, #1
+ cmp r2, #0
+ beq 2f
+ subs r2, r4, r2
+1:
+ ldrb r1, [r2, r3]
+ strb r1, [r0, r3]
+ subs r3, r3, #1
+ bcs 1b
+2:
+ pop {r4}
+ pop {r1}
+ bx r1
+3:
+ movs r3, #0
+ cmp r2, #0
+ beq 2b
+4:
+ ldrb r4, [r1, r3]
+ strb r4, [r0, r3]
+ adds r3, r3, #1
+ cmp r2, r3
+ bne 4b
+ b 2b
+ .size __aeabi_memmove, . - __aeabi_memmove
diff --git a/newlib/libc/machine/arm/aeabi_memmove-thumb2.S b/newlib/libc/machine/arm/aeabi_memmove-thumb2.S
new file mode 100644
index 000000000..e9504437b
--- /dev/null
+++ b/newlib/libc/machine/arm/aeabi_memmove-thumb2.S
@@ -0,0 +1,65 @@
+/*
+ * Copyright (c) 2015 ARM Ltd
+ * 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. The name of the company may not be used to endorse or promote
+ * products derived from this software without specific prior written
+ * permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ARM LTD ``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 ARM LTD 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.
+ */
+
+ .thumb
+ .syntax unified
+ .global __aeabi_memmove
+ .type __aeabi_memmove, %function
+ ASM_ALIAS __aeabi_memmove4 __aeabi_memmove
+ ASM_ALIAS __aeabi_memmove8 __aeabi_memmove
+__aeabi_memmove:
+ cmp r0, r1
+ push {r4}
+ bls 3f
+ adds r3, r1, r2
+ cmp r0, r3
+ bcs 3f
+ adds r1, r0, r2
+ cbz r2, 2f
+ subs r2, r3, r2
+1:
+ ldrb r4, [r3, #-1]!
+ cmp r2, r3
+ strb r4, [r1, #-1]!
+ bne 1b
+2:
+ pop {r4}
+ bx lr
+3:
+ cmp r2, #0
+ beq 2b
+ add r2, r2, r1
+ subs r3, r0, #1
+4:
+ ldrb r4, [r1], #1
+ cmp r2, r1
+ strb r4, [r3, #1]!
+ bne 4b
+ pop {r4}
+ bx lr
+ .size __aeabi_memmove, . - __aeabi_memmove
diff --git a/newlib/libc/machine/arm/aeabi_memmove.c b/newlib/libc/machine/arm/aeabi_memmove.c
new file mode 100644
index 000000000..1e2bbaf1f
--- /dev/null
+++ b/newlib/libc/machine/arm/aeabi_memmove.c
@@ -0,0 +1,63 @@
+/*
+ * Copyright (c) 2015 ARM Ltd
+ * 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. The name of the company may not be used to endorse or promote
+ * products derived from this software without specific prior written
+ * permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ARM LTD ``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 ARM LTD 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 <stddef.h>
+#include <_ansi.h>
+
+/* According to the run-time ABI for the ARM Architecture, this
+ function is allowed to corrupt only the integer core register
+ permitted to be corrupted by the [AAPCS] (r0-r3, ip, lr, and
+ CPSR).
+
+ Therefore, we can't just simply use alias to support the function
+ aeabi_memmove for the targets with FP register. Instead, versions
+ for these specific targets are written in assembler (in
+ aeabi_memmove-soft.S). */
+
+/* NOTE: This ifdef MUST match the one in aeabi_memmove-soft.S. */
+#if !defined (__SOFTFP__)
+
+/* Defined in aeabi_memmove-soft.S. */
+
+#else
+/* Support the alias for the __aeabi_memmove which may
+ assume memory alignment. */
+void __aeabi_memmove4 (void *dest, const void *source, size_t n)
+ _ATTRIBUTE ((alias ("__aeabi_memmove")));
+
+void __aeabi_memmove8 (void *dest, const void *source, size_t n)
+ _ATTRIBUTE ((alias ("__aeabi_memmove")));
+
+/* Support the routine __aeabi_memmove. Can't alias to memmove
+ because it's not defined in the same translation unit. */
+void __aeabi_memmove (void *dest, const void *source, size_t n)
+{
+ extern void memmove (void *dest, const void *source, size_t n);
+ memmove (dest, source, n);
+}
+#endif
diff --git a/newlib/libc/machine/arm/aeabi_memset-arm.S b/newlib/libc/machine/arm/aeabi_memset-arm.S
new file mode 100644
index 000000000..0f91e3a26
--- /dev/null
+++ b/newlib/libc/machine/arm/aeabi_memset-arm.S
@@ -0,0 +1,107 @@
+/*
+ * Copyright (c) 2015 ARM Ltd
+ * 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. The name of the company may not be used to endorse or promote
+ * products derived from this software without specific prior written
+ * permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ARM LTD ``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 ARM LTD 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.
+ */
+
+ .arm
+ .syntax divided
+ .global __aeabi_memset
+ .type __aeabi_memset, %function
+ ASM_ALIAS __aeabi_memset4 __aeabi_memset
+ ASM_ALIAS __aeabi_memset8 __aeabi_memset
+__aeabi_memset:
+ tst r0, #3
+ stmfd sp!, {r4, lr}
+ beq 10f
+ cmp r1, #0
+ sub r1, r1, #1
+ beq 9f
+ and ip, r2, #255
+ mov r3, r0
+ b 2f
+1:
+ cmp r1, #0
+ sub r1, r1, #1
+ beq 9f
+2:
+ strb ip, [r3], #1
+ tst r3, #3
+ bne 1b
+3:
+ cmp r1, #3
+ bls 7f
+ and lr, r2, #255
+ orr lr, lr, lr, asl #8
+ cmp r1, #15
+ orr lr, lr, lr, asl #16
+ bls 5f
+ mov r4, r1
+ add ip, r3, #16
+4:
+ sub r4, r4, #16
+ cmp r4, #15
+ str lr, [ip, #-16]
+ str lr, [ip, #-12]
+ str lr, [ip, #-8]
+ str lr, [ip, #-4]
+ add ip, ip, #16
+ bhi 4b
+ sub ip, r1, #16
+ bic ip, ip, #15
+ and r1, r1, #15
+ add ip, ip, #16
+ cmp r1, #3
+ add r3, r3, ip
+ bls 7f
+5:
+ mov r4, r3
+ mov ip, r1
+6:
+ sub ip, ip, #4
+ cmp ip, #3
+ str lr, [r4], #4
+ bhi 6b
+ sub ip, r1, #4
+ bic ip, ip, #3
+ add ip, ip, #4
+ add r3, r3, ip
+ and r1, r1, #3
+7:
+ cmp r1, #0
+ andne r2, r2, #255
+ addne r1, r3, r1
+ beq 9f
+8:
+ strb r2, [r3], #1
+ cmp r3, r1
+ bne 8b
+9:
+ ldmfd sp!, {r4, lr}
+ bx lr
+10:
+ mov r3, r0
+ b 3b
+ .size __aeabi_memset, . - __aeabi_memset
diff --git a/newlib/libc/machine/arm/aeabi_memset-soft.S b/newlib/libc/machine/arm/aeabi_memset-soft.S
new file mode 100644
index 000000000..d82fb5606
--- /dev/null
+++ b/newlib/libc/machine/arm/aeabi_memset-soft.S
@@ -0,0 +1,52 @@
+/*
+ * Copyright (c) 2015 ARM Ltd
+ * 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. The name of the company may not be used to endorse or promote
+ * products derived from this software without specific prior written
+ * permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ARM LTD ``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 ARM LTD 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 "arm_asm.h"
+
+.macro ASM_ALIAS new old
+ .global \new
+ .type \new, %function
+#if defined (__thumb__)
+ .thumb_set \new, \old
+#else
+ .set \new, \old
+#endif
+.endm
+
+/* NOTE: This ifdef MUST match the one in aeabi_memset.c. */
+#if !defined (__SOFTFP__)
+
+# if defined (__thumb2__)
+# include "aeabi_memset-thumb2.S"
+# elif defined (__thumb__)
+# include "aeabi_memset-thumb.S"
+# else
+# include "aeabi_memset-arm.S"
+# endif
+
+#endif
diff --git a/newlib/libc/machine/arm/aeabi_memset-thumb.S b/newlib/libc/machine/arm/aeabi_memset-thumb.S
new file mode 100644
index 000000000..aa8f2719e
--- /dev/null
+++ b/newlib/libc/machine/arm/aeabi_memset-thumb.S
@@ -0,0 +1,120 @@
+/*
+ * Copyright (c) 2015 ARM Ltd
+ * 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. The name of the company may not be used to endorse or promote
+ * products derived from this software without specific prior written
+ * permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ARM LTD ``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 ARM LTD 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.
+ */
+
+ .thumb
+ .syntax unified
+ .global __aeabi_memset
+ .type __aeabi_memset, %function
+ ASM_ALIAS __aeabi_memset4 __aeabi_memset
+ ASM_ALIAS __aeabi_memset8 __aeabi_memset
+__aeabi_memset:
+ push {r4, r5, r6, lr}
+ lsls r3, r0, #30
+ beq 10f
+ subs r4, r1, #1
+ cmp r1, #0
+ beq 9f
+ lsls r5, r2, #24
+ lsrs r5, r5, #24
+ movs r3, r0
+ movs r6, #3
+ b 2f
+1:
+ subs r1, r4, #1
+ cmp r4, #0
+ beq 9f
+ movs r4, r1
+2:
+ adds r3, r3, #1
+ subs r1, r3, #1
+ strb r5, [r1]
+ tst r3, r6
+ bne 1b
+3:
+ cmp r4, #3
+ bls 7f
+ movs r5, #255
+ ands r5, r2
+ lsls r1, r5, #8
+ orrs r5, r1
+ lsls r1, r5, #16
+ orrs r5, r1
+ cmp r4, #15
+ bls 5f
+ movs r6, r4
+ subs r6, r6, #16
+ lsrs r6, r6, #4
+ adds r6, r6, #1
+ lsls r6, r6, #4
+ movs r1, r3
+ adds r3, r3, r6
+4:
+ str r5, [r1]
+ str r5, [r1, #4]
+ str r5, [r1, #8]
+ str r5, [r1, #12]
+ adds r1, r1, #16
+ cmp r3, r1
+ bne 4b
+ movs r1, #15
+ ands r4, r1
+ cmp r4, #3
+ bls 7f
+5:
+ subs r6, r4, #4
+ lsrs r6, r6, #2
+ adds r6, r6, #1
+ lsls r6, r6, #2
+ movs r1, r3
+ adds r3, r3, r6
+6:
+ stmia r1!, {r5}
+ cmp r3, r1
+ bne 6b
+ movs r1, #3
+ ands r4, r1
+7:
+ cmp r4, #0
+ beq 9f
+ lsls r2, r2, #24
+ lsrs r2, r2, #24
+ adds r4, r3, r4
+8:
+ strb r2, [r3]
+ adds r3, r3, #1
+ cmp r4, r3
+ bne 8b
+9:
+ pop {r4, r5, r6}
+ pop {r1}
+ bx r1
+10:
+ movs r3, r0
+ movs r4, r1
+ b 3b
+ .size __aeabi_memset, . - __aeabi_memset
diff --git a/newlib/libc/machine/arm/aeabi_memset-thumb2.S b/newlib/libc/machine/arm/aeabi_memset-thumb2.S
new file mode 100644
index 000000000..eaca1d8d7
--- /dev/null
+++ b/newlib/libc/machine/arm/aeabi_memset-thumb2.S
@@ -0,0 +1,107 @@
+/*
+ * Copyright (c) 2015 ARM Ltd
+ * 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. The name of the company may not be used to endorse or promote
+ * products derived from this software without specific prior written
+ * permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ARM LTD ``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 ARM LTD 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.
+ */
+
+ .thumb
+ .syntax unified
+ .global __aeabi_memset
+ .type __aeabi_memset, %function
+ ASM_ALIAS __aeabi_memset4 __aeabi_memset
+ ASM_ALIAS __aeabi_memset8 __aeabi_memset
+__aeabi_memset:
+ push {r4, r5, r6}
+ lsls r4, r0, #30
+ beq 10f
+ subs r4, r1, #1
+ cmp r1, #0
+ beq 9f
+ uxtb r5, r2
+ mov r3, r0
+ b 2f
+1:
+ subs r1, r4, #1
+ cbz r4, 9f
+ mov r4, r1
+2:
+ strb r5, [r3], #1
+ lsls r1, r3, #30
+ bne 1b
+3:
+ cmp r4, #3
+ bls 7f
+ uxtb r5, r2
+ orr r5, r5, r5, lsl #8
+ cmp r4, #15
+ orr r5, r5, r5, lsl #16
+ bls 5f
+ mov r6, r4
+ add r1, r3, #16
+4:
+ subs r6, r6, #16
+ cmp r6, #15
+ str r5, [r1, #-16]
+ str r5, [r1, #-12]
+ str r5, [r1, #-8]
+ str r5, [r1, #-4]
+ add r1, r1, #16
+ bhi 4b
+ sub r1, r4, #16
+ bic r1, r1, #15
+ and r4, r4, #15
+ adds r1, r1, #16
+ cmp r4, #3
+ add r3, r3, r1
+ bls 7f
+5:
+ mov r6, r3
+ mov r1, r4
+6:
+ subs r1, r1, #4
+ cmp r1, #3
+ str r5, [r6], #4
+ bhi 6b
+ subs r1, r4, #4
+ bic r1, r1, #3
+ adds r1, r1, #4
+ add r3, r3, r1
+ and r4, r4, #3
+7:
+ cbz r4, 9f
+ uxtb r2, r2
+ add r4, r4, r3
+8:
+ strb r2, [r3], #1
+ cmp r3, r4
+ bne 8b
+9:
+ pop {r4, r5, r6}
+ bx lr
+10:
+ mov r4, r1
+ mov r3, r0
+ b 3b
+ .size __aeabi_memset, . - __aeabi_memset
diff --git a/newlib/libc/machine/arm/aeabi_memset.c b/newlib/libc/machine/arm/aeabi_memset.c
new file mode 100644
index 000000000..8a973207e
--- /dev/null
+++ b/newlib/libc/machine/arm/aeabi_memset.c
@@ -0,0 +1,65 @@
+/*
+ * Copyright (c) 2015 ARM Ltd
+ * 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. The name of the company may not be used to endorse or promote
+ * products derived from this software without specific prior written
+ * permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ARM LTD ``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 ARM LTD 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 <stddef.h>
+#include <_ansi.h>
+
+/* According to the run-time ABI for the ARM Architecture, this
+ function is allowed to corrupt only the integer core register
+ permitted to be corrupted by the [AAPCS] (r0-r3, ip, lr, and
+ CPSR).
+
+ Therefore, we can't just simply use alias to support the function
+ aeabi_memset for the targets with FP register. Instead, versions
+ for these specific targets are written in assembler (in
+ aeabi_memset-soft.S). */
+
+/* NOTE: This ifdef MUST match the one in aeabi_memset-soft.S. */
+#if !defined (__SOFTFP__)
+
+/* Defined in aeabi_memset-soft.S. */
+
+#else
+/* Support the alias for the __aeabi_memset which may
+ assume memory alignment. */
+void __aeabi_memset4 (void *dest, size_t n, int c)
+ _ATTRIBUTE ((alias ("__aeabi_memset")));
+
+void __aeabi_memset8 (void *dest, size_t n, int c)
+ _ATTRIBUTE ((alias ("__aeabi_memset")));
+
+/* Support the routine __aeabi_memset. Can't alias to memset
+ because it's not defined in the same translation unit. */
+void __aeabi_memset (void *dest, size_t n, int c)
+{
+ /*Note that relative to ANSI memset, __aeabi_memset hase the order
+ of its second and third arguments reversed. */
+ extern void memset (void *dest, int c, size_t n);
+ memset (dest, c, n);
+}
+#endif
diff --git a/newlib/libc/machine/arm/arm_asm.h b/newlib/libc/machine/arm/arm_asm.h
index 5a63a8d9e..1bb5edb23 100644
--- a/newlib/libc/machine/arm/arm_asm.h
+++ b/newlib/libc/machine/arm/arm_asm.h
@@ -29,35 +29,35 @@
#ifndef ARM_ASM__H
#define ARM_ASM__H
-/* First define some macros that keep everything else sane. */
-#if defined (__ARM_ARCH_7A__) || defined (__ARM_ARCH_7R__)
-#define _ISA_ARM_7
+#include "acle-compat.h"
+
+#if __ARM_ARCH >= 7 && defined (__ARM_ARCH_ISA_ARM)
+# define _ISA_ARM_7
+#endif
+
+#if __ARM_ARCH >= 6 && defined (__ARM_ARCH_ISA_ARM)
+# define _ISA_ARM_6
#endif
-#if defined (_ISA_ARM_7) || defined (__ARM_ARCH_6__) || \
- defined (__ARM_ARCH_6J__) || defined (__ARM_ARCH_6T2__) || \
- defined (__ARM_ARCH_6K__) || defined (__ARM_ARCH_6ZK__) || \
- defined (__ARM_ARCH_6Z__)
-#define _ISA_ARM_6
+#if __ARM_ARCH >= 5
+# define _ISA_ARM_5
#endif
-#if defined (_ISA_ARM_6) || defined (__ARM_ARCH_5__) || \
- defined (__ARM_ARCH_5T__) || defined (__ARM_ARCH_5TE__) || \
- defined (__ARM_ARCH_5TEJ__)
-#define _ISA_ARM_5
+#if __ARM_ARCH >= 4 && __ARM_ARCH_ISA_THUMB >= 1
+# define _ISA_ARM_4T
#endif
-#if defined (_ISA_ARM_5) || defined (__ARM_ARCH_4T__)
-#define _ISA_ARM_4T
+#if __ARM_ARCH >= 4 && __ARM_ARCH_ISA_THUMB == 0
+# define _ISA_ARM_4
#endif
-#if defined (__ARM_ARCH_7M__) || defined (__ARM_ARCH_7__) || \
- defined (__ARM_ARCH_7EM__)
-#define _ISA_THUMB_2
+
+#if __ARM_ARCH_ISA_THUMB >= 2
+# define _ISA_THUMB_2
#endif
-#if defined (_ISA_THUMB_2) || defined (__ARM_ARCH_6M__)
-#define _ISA_THUMB_1
+#if __ARM_ARCH_ISA_THUMB >= 1
+# define _ISA_THUMB_1
#endif
diff --git a/newlib/libc/machine/arm/configure b/newlib/libc/machine/arm/configure
index 7f4d0d6df..652afbe86 100755
--- a/newlib/libc/machine/arm/configure
+++ b/newlib/libc/machine/arm/configure
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.68 for newlib 2.0.0.
+# Generated by GNU Autoconf 2.68 for newlib 2.4.0.
#
#
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
@@ -556,14 +556,15 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='newlib'
PACKAGE_TARNAME='newlib'
-PACKAGE_VERSION='2.0.0'
-PACKAGE_STRING='newlib 2.0.0'
+PACKAGE_VERSION='2.4.0'
+PACKAGE_STRING='newlib 2.4.0'
PACKAGE_BUGREPORT=''
PACKAGE_URL=''
ac_unique_file="Makefile.am"
ac_subst_vars='LTLIBOBJS
LIBOBJS
+CFLAGS
sys_dir
machine_dir
libm_machine_dir
@@ -1239,7 +1240,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures newlib 2.0.0 to adapt to many kinds of systems.
+\`configure' configures newlib 2.4.0 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1309,7 +1310,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of newlib 2.0.0:";;
+ short | recursive ) echo "Configuration of newlib 2.4.0:";;
esac
cat <<\_ACEOF
@@ -1400,7 +1401,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-newlib configure 2.0.0
+newlib configure 2.4.0
generated by GNU Autoconf 2.68
Copyright (C) 2010 Free Software Foundation, Inc.
@@ -1455,7 +1456,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by newlib $as_me 2.0.0, which was
+It was created by newlib $as_me 2.4.0, which was
generated by GNU Autoconf 2.68. Invocation command line was
$ $0 $@
@@ -2527,7 +2528,7 @@ fi
# Define the identity of the package.
PACKAGE='newlib'
- VERSION='2.0.0'
+ VERSION='2.4.0'
# Some tools Automake needs.
@@ -3410,6 +3411,8 @@ OBJEXT=${oext}
+
+
ac_config_files="$ac_config_files Makefile"
cat >confcache <<\_ACEOF
@@ -4007,7 +4010,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by newlib $as_me 2.0.0, which was
+This file was extended by newlib $as_me 2.4.0, which was
generated by GNU Autoconf 2.68. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -4064,7 +4067,7 @@ _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
-newlib config.status 2.0.0
+newlib config.status 2.4.0
configured by $0, generated by GNU Autoconf 2.68,
with options \\"\$ac_cs_config\\"
diff --git a/newlib/libc/machine/arm/configure.in b/newlib/libc/machine/arm/configure.in
index 6236338f9..833b197a5 100644
--- a/newlib/libc/machine/arm/configure.in
+++ b/newlib/libc/machine/arm/configure.in
@@ -10,5 +10,7 @@ AC_CONFIG_AUX_DIR(../../../..)
NEWLIB_CONFIGURE(../../..)
+AC_SUBST(CFLAGS)
+
AC_CONFIG_FILES([Makefile])
AC_OUTPUT
diff --git a/newlib/libc/machine/arm/machine/_endian.h b/newlib/libc/machine/arm/machine/_endian.h
new file mode 100644
index 000000000..3f50a6943
--- /dev/null
+++ b/newlib/libc/machine/arm/machine/_endian.h
@@ -0,0 +1,39 @@
+/* ARM configuration file.
+ Copyright (c) 2015 ARM Ltd. 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. The name of the company may not be used to endorse or promote
+ products derived from this software without specific prior written
+ permission.
+
+ THIS SOFTWARE IS PROVIDED BY ARM LTD ``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 ARM LTD 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. */
+
+#ifndef __MACHINE_ENDIAN_H__
+#error "must be included via <machine/endian.h>"
+#endif /* !__MACHINE_ENDIAN_H__ */
+
+#define _LITTLE_ENDIAN 1234
+#define _BIG_ENDIAN 4321
+#define _PDP_ENDIAN 3412
+
+#ifdef __ARMEB__
+#define _BYTE_ORDER _BIG_ENDIAN
+#else
+#define _BYTE_ORDER _LITTLE_ENDIAN
+#endif
diff --git a/newlib/libc/machine/arm/machine/param.h b/newlib/libc/machine/arm/machine/param.h
index 595294cf3..513f7b0b0 100644
--- a/newlib/libc/machine/arm/machine/param.h
+++ b/newlib/libc/machine/arm/machine/param.h
@@ -5,10 +5,4 @@
# define HZ (100)
-#ifdef __ARMEB__
-#define BYTE_ORDER BIG_ENDIAN
-#else
-#define BYTE_ORDER LITTLE_ENDIAN
-#endif
-
#endif
diff --git a/newlib/libc/machine/arm/memchr-stub.c b/newlib/libc/machine/arm/memchr-stub.c
index 04d9d5fd9..21ffbbd96 100644
--- a/newlib/libc/machine/arm/memchr-stub.c
+++ b/newlib/libc/machine/arm/memchr-stub.c
@@ -1,42 +1,36 @@
-/* Copyright (c) 2010-2011, Linaro Limited
+/* Copyright (c) 2015 ARM Ltd.
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 Linaro Limited nor the names of its
- contributors may be used to endorse or promote products derived
- from this software without specific prior written permission.
+ 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 the Linaro 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
+ A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
HOLDER 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.
-*/
+ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */
-#include "arm_asm.h"
+/* The structure of the following #if #else #endif conditional chain
+ must match the chain in memchr.S. */
+#include "acle-compat.h"
-/* Note: This ifdef MUST match the one in memchr.S */
-#if defined(_ISA_ARM_7) || defined(__ARM_ARCH_6T2__)
- /* Do nothing - the memchr.S will get used */
+#if __ARM_ARCH_ISA_THUMB >= 2 && defined (__ARM_FEATURE_DSP)
+/* Defined in memchr.S. */
#else
- /* For an older CPU we just fall back to the .c code */
-#include "../../string/memchr.c"
+# include "../../string/memchr.c"
#endif
-
diff --git a/newlib/libc/machine/arm/memchr.S b/newlib/libc/machine/arm/memchr.S
index 56bfef09a..8103c8aa5 100644
--- a/newlib/libc/machine/arm/memchr.S
+++ b/newlib/libc/machine/arm/memchr.S
@@ -35,6 +35,32 @@
an optimised path for large data sets; the worst case is finding the
match early in a large data set. */
+/* Copyright (c) 2015 ARM Ltd.
+ 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 the Linaro 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
+ HOLDER 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. */
+
@ 2011-02-07 david.gilbert@linaro.org
@ Extracted from local git a5b438d861
@ 2011-07-14 david.gilbert@linaro.org
@@ -45,13 +71,21 @@
@ Make conditional on CPU type
@ tidy
+@ This code requires armv6t2 or later. Uses Thumb2.
+
.syntax unified
- .arch armv7-a
+#include "acle-compat.h"
#include "arm_asm.h"
@ NOTE: This ifdef MUST match the one in memchr-stub.c
-#if defined(_ISA_ARM_7) || defined(__ARM_ARCH_6T2__)
+#if __ARM_ARCH_ISA_THUMB >= 2 && defined (__ARM_FEATURE_DSP)
+
+#if __ARM_ARCH_PROFILE == 'M'
+ .arch armv7e-m
+#else
+ .arch armv6t2
+#endif
@ this lets us check a flag in a 00/ff byte easily in either endianness
#ifdef __ARMEB__
@@ -162,5 +196,6 @@ memchr:
pop {r4,r5,r6,r7}
subs r0,r0,#1
bx lr
-
+#else
+ /* Defined in memchr-stub.c. */
#endif
diff --git a/newlib/libc/machine/arm/memcpy-stub.c b/newlib/libc/machine/arm/memcpy-stub.c
index 449d31a50..6cd0e3b1d 100644
--- a/newlib/libc/machine/arm/memcpy-stub.c
+++ b/newlib/libc/machine/arm/memcpy-stub.c
@@ -1,40 +1,41 @@
-/*
- * Copyright (c) 2013 ARM Ltd
- * 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. The name of the company may not be used to endorse or promote
- * products derived from this software without specific prior written
- * permission.
- *
- * THIS SOFTWARE IS PROVIDED BY ARM LTD ``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 ARM LTD 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.
- */
+/* Copyright (c) 2015 ARM Ltd.
+ All rights reserved.
-/* The sole purpose of this file is to include the plain memcpy provided
- in newlib. An optimized version of memcpy is provided in the assembly
- file memcpy.S in this directory. */
-#if (defined (__OPTIMIZE_SIZE__) || defined (PREFER_SIZE_OVER_SPEED) || \
- (!((defined (__ARM_ARCH_7A__) && defined (__ARM_FEATURE_UNALIGNED)) \
- || defined (__ARM_ARCH_7EM__) || defined (__ARM_ARCH_7M__))))
+ 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 the Linaro nor the
+ names of its contributors may be used to endorse or promote products
+ derived from this software without specific prior written permission.
-#include "../../string/memcpy.c"
+ 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
+ HOLDER 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. */
+/* The structure of the following #if #else #endif conditional chain
+ must match the chain in memcpy.S. */
+
+#include "acle-compat.h"
+
+#if (defined (__OPTIMIZE_SIZE__) || defined (PREFER_SIZE_OVER_SPEED))
+# include "../../string/memcpy.c"
+#elif (__ARM_ARCH >= 7 && __ARM_ARCH_PROFILE == 'A' \
+ && defined (__ARM_FEATURE_UNALIGNED))
+/* Defined in memcpy.S. */
+#elif __ARM_ARCH_ISA_THUMB == 2 && !__ARM_ARCH_ISA_ARM
+/* Defined in memcpy.S. */
#else
- /* Do nothing. See memcpy.S in this directory. */
+# include "../../string/memcpy.c"
#endif
diff --git a/newlib/libc/machine/arm/memcpy.S b/newlib/libc/machine/arm/memcpy.S
index 734a19776..77bd2a606 100644
--- a/newlib/libc/machine/arm/memcpy.S
+++ b/newlib/libc/machine/arm/memcpy.S
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013 ARM Ltd
+ * Copyright (c) 2013-2015 ARM Ltd
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -26,14 +26,22 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
+/* The structure of the following #if #else #endif conditional chain
+ must match the chain in memcpy-stub.c. */
+
+#include "acle-compat.h"
+
#if defined (__OPTIMIZE_SIZE__) || defined (PREFER_SIZE_OVER_SPEED)
- /* Do nothing here. See memcpy-stub.c in the same directory. */
-#elif defined (__ARM_ARCH_7A__) && defined (__ARM_FEATURE_UNALIGNED)
+ /* Defined in memcpy-stub.c. */
+
+#elif (__ARM_ARCH >= 7 && __ARM_ARCH_PROFILE == 'A' \
+ && defined (__ARM_FEATURE_UNALIGNED))
#include "memcpy-armv7a.S"
-#elif defined (__ARM_ARCH_7M__) || defined (__ARM_ARCH_7EM__)
+#elif __ARM_ARCH_ISA_THUMB == 2 && !__ARM_ARCH_ISA_ARM
#include "memcpy-armv7m.S"
#else
- /* Do nothing here. See memcpy-stub.c in the same directory. */
+ /* Defined in memcpy-stub.c. */
+
#endif
diff --git a/newlib/libc/machine/arm/setjmp.S b/newlib/libc/machine/arm/setjmp.S
index a65fbabb9..1ba711d5e 100644
--- a/newlib/libc/machine/arm/setjmp.S
+++ b/newlib/libc/machine/arm/setjmp.S
@@ -2,6 +2,8 @@
Nick Clifton, Cygnus Solutions, 13 June 1997. */
+#include "acle-compat.h"
+
/* ANSI concatenation macros. */
#define CONCAT(a, b) CONCAT2(a, b)
#define CONCAT2(a, b) a##b
@@ -55,8 +57,8 @@
For Thumb-2 do everything in Thumb mode. */
-#if defined(__ARM_ARCH_6M__)
-/* ARMv6-M has to be implemented in Thumb mode. */
+#if __ARM_ARCH_ISA_THUMB == 1 && !__ARM_ARCH_ISA_ARM
+/* ARMv6-M-like has to be implemented in Thumb mode. */
.thumb
.thumb_func
diff --git a/newlib/libc/machine/arm/strcmp-arm-tiny.S b/newlib/libc/machine/arm/strcmp-arm-tiny.S
new file mode 100644
index 000000000..6b6bd13cc
--- /dev/null
+++ b/newlib/libc/machine/arm/strcmp-arm-tiny.S
@@ -0,0 +1,47 @@
+/*
+ * Copyright (c) 2012-2014 ARM Ltd
+ * 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. The name of the company may not be used to endorse or promote
+ * products derived from this software without specific prior written
+ * permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ARM LTD ``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 ARM LTD 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.
+ */
+
+/* Tiny version of strcmp in ARM state. Used only when optimizing
+ for size. Also supports Thumb-2. */
+
+ .syntax unified
+def_fn strcmp
+ .cfi_sections .debug_frame
+ .cfi_startproc
+1:
+ ldrb r2, [r0], #1
+ ldrb r3, [r1], #1
+ cmp r2, #1
+ it cs
+ cmpcs r2, r3
+ beq 1b
+2:
+ subs r0, r2, r3
+ RETURN
+ .cfi_endproc
+ .size strcmp, . - strcmp
diff --git a/newlib/libc/machine/arm/strcmp-armv4.S b/newlib/libc/machine/arm/strcmp-armv4.S
new file mode 100644
index 000000000..05e3df675
--- /dev/null
+++ b/newlib/libc/machine/arm/strcmp-armv4.S
@@ -0,0 +1,382 @@
+/*
+ * Copyright (c) 2012-2014 ARM Ltd
+ * 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. The name of the company may not be used to endorse or promote
+ * products derived from this software without specific prior written
+ * permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ARM LTD ``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 ARM LTD 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.
+ */
+
+ /* Basic ARM implementation. This should run on anything except
+ for ARMv6-M, but there are better implementations for later
+ revisions of the architecture. This version can support ARMv4T
+ ARM/Thumb interworking. */
+/* Parameters and result. */
+#define src1 r0
+#define src2 r1
+#define result r0 /* Overlaps src1. */
+
+/* Internal variables. */
+#define data1 r2
+#define data2 r3
+#define magic1 r4
+#define tmp2 r5
+#define tmp1 r12
+#define syndrome r12 /* Overlaps tmp1 */
+
+ .arm
+def_fn strcmp
+ .cfi_sections .debug_frame
+ .cfi_startproc
+ eor tmp1, src1, src2
+ tst tmp1, #3
+ /* Strings not at same byte offset from a word boundary. */
+ bne .Lstrcmp_unaligned
+ ands tmp1, src1, #3
+ bic src1, src1, #3
+ bic src2, src2, #3
+ ldr data1, [src1], #4
+ ldreq data2, [src2], #4
+ beq 1f
+ /* Although s1 and s2 have identical initial alignment, they are
+ not currently word aligned. Rather than comparing bytes,
+ make sure that any bytes fetched from before the addressed
+ bytes are forced to 0xff. Then they will always compare
+ equal. */
+ eor tmp1, tmp1, #3
+ mvn data2, #MSB
+ lsl tmp1, tmp1, #3
+ S2LO tmp1, data2, tmp1
+ ldr data2, [src2], #4
+ orr data1, data1, tmp1
+ orr data2, data2, tmp1
+1:
+ /* Load the 'magic' constant 0x01010101. */
+ str r4, [sp, #-4]!
+ .cfi_def_cfa_offset 4
+ .cfi_offset 4, -4
+ mov magic1, #1
+ orr magic1, magic1, magic1, lsl #8
+ orr magic1, magic1, magic1, lsl #16
+ .p2align 2
+4:
+ sub syndrome, data1, magic1
+ cmp data1, data2
+ /* check for any zero bytes in first word */
+ biceq syndrome, syndrome, data1
+ tsteq syndrome, magic1, lsl #7
+ ldreq data1, [src1], #4
+ ldreq data2, [src2], #4
+ beq 4b
+2:
+ /* There's a zero or a different byte in the word */
+ S2HI result, data1, #24
+ S2LO data1, data1, #8
+ cmp result, #1
+ cmpcs result, data2, S2HI #24
+ S2LOEQ data2, data2, #8
+ beq 2b
+ /* On a big-endian machine, RESULT contains the desired byte in bits
+ 0-7; on a little-endian machine they are in bits 24-31. In
+ both cases the other bits in RESULT are all zero. For DATA2 the
+ interesting byte is at the other end of the word, but the
+ other bits are not necessarily zero. We need a signed result
+ representing the differnece in the unsigned bytes, so for the
+ little-endian case we can't just shift the interesting bits
+ up. */
+#ifdef __ARM_BIG_ENDIAN
+ sub result, result, data2, lsr #24
+#else
+ and data2, data2, #255
+ rsb result, data2, result, lsr #24
+#endif
+ ldr r4, [sp], #4
+ .cfi_restore 4
+ .cfi_def_cfa_offset 0
+ RETURN
+
+
+#if 0
+ /* The assembly code below is based on the following alogrithm. */
+#ifdef __ARM_BIG_ENDIAN
+#define RSHIFT <<
+#define LSHIFT >>
+#else
+#define RSHIFT >>
+#define LSHIFT <<
+#endif
+
+#define body(shift) \
+ mask = 0xffffffffU RSHIFT shift; \
+ data1 = *src1++; \
+ data2 = *src2++; \
+ do \
+ { \
+ tmp2 = data1 & mask; \
+ if (__builtin_expect(tmp2 != data2 RSHIFT shift, 0)) \
+ { \
+ data2 RSHIFT= shift; \
+ break; \
+ } \
+ if (__builtin_expect(((data1 - b1) & ~data1) & (b1 << 7), 0)) \
+ { \
+ /* See comment in assembler below re syndrome on big-endian */\
+ if ((((data1 - b1) & ~data1) & (b1 << 7)) & mask) \
+ data2 RSHIFT= shift; \
+ else \
+ { \
+ data2 = *src2; \
+ tmp2 = data1 RSHIFT (32 - shift); \
+ data2 = (data2 LSHIFT (32 - shift)) RSHIFT (32 - shift); \
+ } \
+ break; \
+ } \
+ data2 = *src2++; \
+ tmp2 ^= data1; \
+ if (__builtin_expect(tmp2 != data2 LSHIFT (32 - shift), 0)) \
+ { \
+ tmp2 = data1 >> (32 - shift); \
+ data2 = (data2 << (32 - shift)) RSHIFT (32 - shift); \
+ break; \
+ } \
+ data1 = *src1++; \
+ } while (1)
+
+ const unsigned* src1;
+ const unsigned* src2;
+ unsigned data1, data2;
+ unsigned mask;
+ unsigned shift;
+ unsigned b1 = 0x01010101;
+ char c1, c2;
+ unsigned tmp2;
+
+ while (((unsigned) s1) & 3)
+ {
+ c1 = *s1++;
+ c2 = *s2++;
+ if (c1 == 0 || c1 != c2)
+ return c1 - (int)c2;
+ }
+ src1 = (unsigned*) (((unsigned)s1) & ~3);
+ src2 = (unsigned*) (((unsigned)s2) & ~3);
+ tmp2 = ((unsigned) s2) & 3;
+ if (tmp2 == 1)
+ {
+ body(8);
+ }
+ else if (tmp2 == 2)
+ {
+ body(16);
+ }
+ else
+ {
+ body (24);
+ }
+
+ do
+ {
+#ifdef __ARM_BIG_ENDIAN
+ c1 = (char) tmp2 >> 24;
+ c2 = (char) data2 >> 24;
+#else /* not __ARM_BIG_ENDIAN */
+ c1 = (char) tmp2;
+ c2 = (char) data2;
+#endif /* not __ARM_BIG_ENDIAN */
+ tmp2 RSHIFT= 8;
+ data2 RSHIFT= 8;
+ } while (c1 != 0 && c1 == c2);
+ return c1 - c2;
+#endif /* 0 */
+
+
+ /* First of all, compare bytes until src1(sp1) is word-aligned. */
+.Lstrcmp_unaligned:
+ tst src1, #3
+ beq 2f
+ ldrb data1, [src1], #1
+ ldrb data2, [src2], #1
+ cmp data1, #1
+ cmpcs data1, data2
+ beq .Lstrcmp_unaligned
+ sub result, data1, data2
+ RETURN
+
+2:
+ stmfd sp!, {r4, r5}
+ .cfi_def_cfa_offset 8
+ .cfi_offset 4, -8
+ .cfi_offset 5, -4
+ mov magic1, #1
+ orr magic1, magic1, magic1, lsl #8
+ orr magic1, magic1, magic1, lsl #16
+
+ ldr data1, [src1], #4
+ and tmp2, src2, #3
+ bic src2, src2, #3
+ ldr data2, [src2], #4
+ cmp tmp2, #2
+ beq .Loverlap2
+ bhi .Loverlap1
+
+ /* Critical inner Loop: Block with 3 bytes initial overlap */
+ .p2align 2
+.Loverlap3:
+ bic tmp2, data1, #MSB
+ cmp tmp2, data2, S2LO #8
+ sub syndrome, data1, magic1
+ bic syndrome, syndrome, data1
+ bne 4f
+ ands syndrome, syndrome, magic1, lsl #7
+ ldreq data2, [src2], #4
+ bne 5f
+ eor tmp2, tmp2, data1
+ cmp tmp2, data2, S2HI #24
+ bne 6f
+ ldr data1, [src1], #4
+ b .Loverlap3
+4:
+ S2LO data2, data2, #8
+ b .Lstrcmp_tail
+
+5:
+#ifdef __ARM_BIG_ENDIAN
+ /* The syndrome value may contain false ones if the string ends
+ with the bytes 0x01 0x00. */
+ tst data1, #0xff000000
+ tstne data1, #0x00ff0000
+ tstne data1, #0x0000ff00
+ beq .Lstrcmp_done_equal
+#else
+ bics syndrome, syndrome, #0xff000000
+ bne .Lstrcmp_done_equal
+#endif
+ ldrb data2, [src2]
+ S2LO tmp2, data1, #24
+#ifdef __ARM_BIG_ENDIAN
+ lsl data2, data2, #24
+#endif
+ b .Lstrcmp_tail
+
+6:
+ S2LO tmp2, data1, #24
+ and data2, data2, #LSB
+ b .Lstrcmp_tail
+
+ /* Critical inner Loop: Block with 2 bytes initial overlap. */
+ .p2align 2
+.Loverlap2:
+ S2HI tmp2, data1, #16
+ sub syndrome, data1, magic1
+ S2LO tmp2, tmp2, #16
+ bic syndrome, syndrome, data1
+ cmp tmp2, data2, S2LO #16
+ bne 4f
+ ands syndrome, syndrome, magic1, lsl #7
+ ldreq data2, [src2], #4
+ bne 5f
+ eor tmp2, tmp2, data1
+ cmp tmp2, data2, S2HI #16
+ bne 6f
+ ldr data1, [src1], #4
+ b .Loverlap2
+
+5:
+#ifdef __ARM_BIG_ENDIAN
+ /* The syndrome value may contain false ones if the string ends
+ with the bytes 0x01 0x00 */
+ tst data1, #0xff000000
+ tstne data1, #0x00ff0000
+ beq .Lstrcmp_done_equal
+#else
+ lsls syndrome, syndrome, #16
+ bne .Lstrcmp_done_equal
+#endif
+ ldrh data2, [src2]
+ S2LO tmp2, data1, #16
+#ifdef __ARM_BIG_ENDIAN
+ lsl data2, data2, #16
+#endif
+ b .Lstrcmp_tail
+
+6:
+ S2HI data2, data2, #16
+ S2LO tmp2, data1, #16
+4:
+ S2LO data2, data2, #16
+ b .Lstrcmp_tail
+
+ /* Critical inner Loop: Block with 1 byte initial overlap. */
+ .p2align 2
+.Loverlap1:
+ and tmp2, data1, #LSB
+ cmp tmp2, data2, S2LO #24
+ sub syndrome, data1, magic1
+ bic syndrome, syndrome, data1
+ bne 4f
+ ands syndrome, syndrome, magic1, lsl #7
+ ldreq data2, [src2], #4
+ bne 5f
+ eor tmp2, tmp2, data1
+ cmp tmp2, data2, S2HI #8
+ bne 6f
+ ldr data1, [src1], #4
+ b .Loverlap1
+4:
+ S2LO data2, data2, #24
+ b .Lstrcmp_tail
+5:
+ /* The syndrome value may contain false ones if the string ends
+ with the bytes 0x01 0x00. */
+ tst data1, #LSB
+ beq .Lstrcmp_done_equal
+ ldr data2, [src2], #4
+6:
+ S2LO tmp2, data1, #8
+ bic data2, data2, #MSB
+ b .Lstrcmp_tail
+.Lstrcmp_done_equal:
+ mov result, #0
+ .cfi_remember_state
+ ldmfd sp!, {r4, r5}
+ .cfi_restore 4
+ .cfi_restore 5
+ .cfi_def_cfa_offset 0
+ RETURN
+
+.Lstrcmp_tail:
+ .cfi_restore_state
+ and r2, tmp2, #LSB
+ and result, data2, #LSB
+ cmp result, #1
+ cmpcs result, r2
+ S2LOEQ tmp2, tmp2, #8
+ S2LOEQ data2, data2, #8
+ beq .Lstrcmp_tail
+ sub result, r2, result
+ ldmfd sp!, {r4, r5}
+ .cfi_restore 4
+ .cfi_restore 5
+ .cfi_def_cfa_offset 0
+ RETURN
+ .cfi_endproc
+ .size strcmp, . - strcmp
diff --git a/newlib/libc/machine/arm/strcmp-armv4t.S b/newlib/libc/machine/arm/strcmp-armv4t.S
new file mode 100644
index 000000000..d01d840f4
--- /dev/null
+++ b/newlib/libc/machine/arm/strcmp-armv4t.S
@@ -0,0 +1,54 @@
+/*
+ * Copyright (c) 2012-2014 ARM Ltd
+ * 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. The name of the company may not be used to endorse or promote
+ * products derived from this software without specific prior written
+ * permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ARM LTD ``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 ARM LTD 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.
+ */
+
+ /* This version is only used when we want a very basic Thumb1
+ implementation or for size, otherwise we use the base ARMv4
+ version. This is also suitable for ARMv6-M. */
+
+ .thumb
+ .syntax unified
+ .arch armv4t
+ .eabi_attribute Tag_also_compatible_with, "\006\013" /* ARMv6-M. */
+ .eabi_attribute Tag_ARM_ISA_use, 0
+def_fn strcmp
+ .cfi_sections .debug_frame
+ .cfi_startproc
+1:
+ ldrb r2, [r0]
+ ldrb r3, [r1]
+ cmp r2, #0
+ beq 2f
+ adds r0, r0, #1
+ adds r1, r1, #1
+ cmp r2, r3
+ beq 1b
+2:
+ subs r0, r2, r3
+ bx lr
+ .cfi_endproc
+ .size strcmp, . - strcmp
diff --git a/newlib/libc/machine/arm/strcmp-armv6.S b/newlib/libc/machine/arm/strcmp-armv6.S
new file mode 100644
index 000000000..657c1eeb2
--- /dev/null
+++ b/newlib/libc/machine/arm/strcmp-armv6.S
@@ -0,0 +1,470 @@
+/*
+ * Copyright (c) 2012-2014 ARM Ltd
+ * 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. The name of the company may not be used to endorse or promote
+ * products derived from this software without specific prior written
+ * permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ARM LTD ``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 ARM LTD 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.
+ */
+
+ /* Implementation of strcmp for ARMv6. Use ldrd to support wider
+ loads, provided the data is sufficiently aligned. Use
+ saturating arithmetic to optimize the compares. */
+
+ /* Build Options:
+ STRCMP_NO_PRECHECK: Don't run a quick pre-check of the first
+ byte in the string. If comparing completely random strings
+ the pre-check will save time, since there is a very high
+ probability of a mismatch in the first character: we save
+ significant overhead if this is the common case. However,
+ if strings are likely to be identical (eg because we're
+ verifying a hit in a hash table), then this check is largely
+ redundant. */
+
+ .arm
+
+/* Parameters and result. */
+#define src1 r0
+#define src2 r1
+#define result r0 /* Overlaps src1. */
+
+/* Internal variables. */
+#define tmp1 r4
+#define tmp2 r5
+#define const_m1 r12
+
+/* Additional internal variables for 64-bit aligned data. */
+#define data1a r2
+#define data1b r3
+#define data2a r6
+#define data2b r7
+#define syndrome_a tmp1
+#define syndrome_b tmp2
+
+/* Additional internal variables for 32-bit aligned data. */
+#define data1 r2
+#define data2 r3
+#define syndrome tmp2
+
+
+ /* Macro to compute and return the result value for word-aligned
+ cases. */
+ .macro strcmp_epilogue_aligned synd d1 d2 restore_r6
+#ifdef __ARM_BIG_ENDIAN
+ /* If data1 contains a zero byte, then syndrome will contain a 1 in
+ bit 7 of that byte. Otherwise, the highest set bit in the
+ syndrome will highlight the first different bit. It is therefore
+ sufficient to extract the eight bits starting with the syndrome
+ bit. */
+ clz tmp1, \synd
+ lsl r1, \d2, tmp1
+ .if \restore_r6
+ ldrd r6, r7, [sp, #8]
+ .endif
+ .cfi_restore 6
+ .cfi_restore 7
+ lsl \d1, \d1, tmp1
+ .cfi_remember_state
+ lsr result, \d1, #24
+ ldrd r4, r5, [sp], #16
+ .cfi_restore 4
+ .cfi_restore 5
+ sub result, result, r1, lsr #24
+ bx lr
+#else
+ /* To use the big-endian trick we'd have to reverse all three words.
+ that's slower than this approach. */
+ rev \synd, \synd
+ clz tmp1, \synd
+ bic tmp1, tmp1, #7
+ lsr r1, \d2, tmp1
+ .cfi_remember_state
+ .if \restore_r6
+ ldrd r6, r7, [sp, #8]
+ .endif
+ .cfi_restore 6
+ .cfi_restore 7
+ lsr \d1, \d1, tmp1
+ and result, \d1, #255
+ and r1, r1, #255
+ ldrd r4, r5, [sp], #16
+ .cfi_restore 4
+ .cfi_restore 5
+ sub result, result, r1
+
+ bx lr
+#endif
+ .endm
+
+ .text
+ .p2align 5
+.Lstrcmp_start_addr:
+#ifndef STRCMP_NO_PRECHECK
+.Lfastpath_exit:
+ sub r0, r2, r3
+ bx lr
+#endif
+def_fn strcmp
+#ifndef STRCMP_NO_PRECHECK
+ ldrb r2, [src1]
+ ldrb r3, [src2]
+ cmp r2, #1
+ cmpcs r2, r3
+ bne .Lfastpath_exit
+#endif
+ .cfi_sections .debug_frame
+ .cfi_startproc
+ strd r4, r5, [sp, #-16]!
+ .cfi_def_cfa_offset 16
+ .cfi_offset 4, -16
+ .cfi_offset 5, -12
+ orr tmp1, src1, src2
+ strd r6, r7, [sp, #8]
+ .cfi_offset 6, -8
+ .cfi_offset 7, -4
+ mvn const_m1, #0
+ tst tmp1, #7
+ beq .Lloop_aligned8
+
+.Lnot_aligned:
+ eor tmp1, src1, src2
+ tst tmp1, #7
+ bne .Lmisaligned8
+
+ /* Deal with mutual misalignment by aligning downwards and then
+ masking off the unwanted loaded data to prevent a difference. */
+ and tmp1, src1, #7
+ bic src1, src1, #7
+ and tmp2, tmp1, #3
+ bic src2, src2, #7
+ lsl tmp2, tmp2, #3 /* Bytes -> bits. */
+ ldrd data1a, data1b, [src1], #16
+ tst tmp1, #4
+ ldrd data2a, data2b, [src2], #16
+ /* In ARM code we can't use ORN, but with do have MVN with a
+ register shift. */
+ mvn tmp1, const_m1, S2HI tmp2
+ orr data1a, data1a, tmp1
+ orr data2a, data2a, tmp1
+ beq .Lstart_realigned8
+ orr data1b, data1b, tmp1
+ mov data1a, const_m1
+ orr data2b, data2b, tmp1
+ mov data2a, const_m1
+ b .Lstart_realigned8
+
+ /* Unwind the inner loop by a factor of 2, giving 16 bytes per
+ pass. */
+ .p2align 5,,12 /* Don't start in the tail bytes of a cache line. */
+ .p2align 2 /* Always word aligned. */
+.Lloop_aligned8:
+ ldrd data1a, data1b, [src1], #16
+ ldrd data2a, data2b, [src2], #16
+.Lstart_realigned8:
+ uadd8 syndrome_b, data1a, const_m1 /* Only want GE bits, */
+ eor syndrome_a, data1a, data2a
+ sel syndrome_a, syndrome_a, const_m1
+ uadd8 syndrome_b, data1b, const_m1 /* Only want GE bits. */
+ eor syndrome_b, data1b, data2b
+ sel syndrome_b, syndrome_b, const_m1
+ orrs syndrome_b, syndrome_b, syndrome_a /* Only need if s_a == 0 */
+ bne .Ldiff_found
+
+ ldrd data1a, data1b, [src1, #-8]
+ ldrd data2a, data2b, [src2, #-8]
+ uadd8 syndrome_b, data1a, const_m1 /* Only want GE bits, */
+ eor syndrome_a, data1a, data2a
+ sel syndrome_a, syndrome_a, const_m1
+ uadd8 syndrome_b, data1b, const_m1 /* Only want GE bits. */
+ eor syndrome_b, data1b, data2b
+ sel syndrome_b, syndrome_b, const_m1
+ orrs syndrome_b, syndrome_b, syndrome_a /* Only need if s_a == 0 */
+ beq .Lloop_aligned8
+
+.Ldiff_found:
+ cmp syndrome_a, #0
+ bne .Ldiff_in_a
+
+.Ldiff_in_b:
+ strcmp_epilogue_aligned syndrome_b, data1b, data2b 1
+
+.Ldiff_in_a:
+ .cfi_restore_state
+ strcmp_epilogue_aligned syndrome_a, data1a, data2a 1
+
+ .cfi_restore_state
+.Lmisaligned8:
+ tst tmp1, #3
+ bne .Lmisaligned4
+ ands tmp1, src1, #3
+ bne .Lmutual_align4
+
+ /* Unrolled by a factor of 2, to reduce the number of post-increment
+ operations. */
+.Lloop_aligned4:
+ ldr data1, [src1], #8
+ ldr data2, [src2], #8
+.Lstart_realigned4:
+ uadd8 syndrome, data1, const_m1 /* Only need GE bits. */
+ eor syndrome, data1, data2
+ sel syndrome, syndrome, const_m1
+ cmp syndrome, #0
+ bne .Laligned4_done
+
+ ldr data1, [src1, #-4]
+ ldr data2, [src2, #-4]
+ uadd8 syndrome, data1, const_m1
+ eor syndrome, data1, data2
+ sel syndrome, syndrome, const_m1
+ cmp syndrome, #0
+ beq .Lloop_aligned4
+
+.Laligned4_done:
+ strcmp_epilogue_aligned syndrome, data1, data2, 0
+
+.Lmutual_align4:
+ .cfi_restore_state
+ /* Deal with mutual misalignment by aligning downwards and then
+ masking off the unwanted loaded data to prevent a difference. */
+ lsl tmp1, tmp1, #3 /* Bytes -> bits. */
+ bic src1, src1, #3
+ ldr data1, [src1], #8
+ bic src2, src2, #3
+ ldr data2, [src2], #8
+
+ /* In ARM code we can't use ORN, but with do have MVN with a
+ register shift. */
+ mvn tmp1, const_m1, S2HI tmp1
+ orr data1, data1, tmp1
+ orr data2, data2, tmp1
+ b .Lstart_realigned4
+
+.Lmisaligned4:
+ ands tmp1, src1, #3
+ beq .Lsrc1_aligned
+ sub src2, src2, tmp1
+ bic src1, src1, #3
+ lsls tmp1, tmp1, #31
+ ldr data1, [src1], #4
+ beq .Laligned_m2
+ bcs .Laligned_m1
+
+#ifdef STRCMP_NO_PRECHECK
+ ldrb data2, [src2, #1]
+ uxtb tmp1, data1, ror #BYTE1_OFFSET
+ cmp tmp1, #1
+ cmpcs tmp1, data2
+ bne .Lmisaligned_exit
+
+.Laligned_m2:
+ ldrb data2, [src2, #2]
+ uxtb tmp1, data1, ror #BYTE2_OFFSET
+ cmp tmp1, #1
+ cmpcs tmp1, data2
+ bne .Lmisaligned_exit
+
+.Laligned_m1:
+ ldrb data2, [src2, #3]
+ uxtb tmp1, data1, ror #BYTE3_OFFSET
+ cmp tmp1, #1
+ cmpcs tmp1, data2
+ beq .Lsrc1_aligned
+
+#else /* STRCMP_NO_PRECHECK */
+ /* If we've done the pre-check, then we don't need to check the
+ first byte again here. */
+ ldrb data2, [src2, #2]
+ uxtb tmp1, data1, ror #BYTE2_OFFSET
+ cmp tmp1, #1
+ cmpcs tmp1, data2
+ bne .Lmisaligned_exit
+
+.Laligned_m2:
+ ldrb data2, [src2, #3]
+ uxtb tmp1, data1, ror #BYTE3_OFFSET
+ cmp tmp1, #1
+ cmpcs tmp1, data2
+ beq .Laligned_m1
+#endif
+
+.Lmisaligned_exit:
+ .cfi_remember_state
+ sub result, tmp1, data2
+ ldr r4, [sp], #16
+ .cfi_restore 4
+ bx lr
+
+#ifndef STRCMP_NO_PRECHECK
+.Laligned_m1:
+ add src2, src2, #4
+#endif
+.Lsrc1_aligned:
+ .cfi_restore_state
+ /* src1 is word aligned, but src2 has no common alignment
+ with it. */
+ ldr data1, [src1], #4
+ lsls tmp1, src2, #31 /* C=src2[1], Z=src2[0]. */
+
+ bic src2, src2, #3
+ ldr data2, [src2], #4
+ bhi .Loverlap1 /* C=1, Z=0 => src2[1:0] = 0b11. */
+ bcs .Loverlap2 /* C=1, Z=1 => src2[1:0] = 0b10. */
+
+ /* (overlap3) C=0, Z=0 => src2[1:0] = 0b01. */
+.Loverlap3:
+ bic tmp1, data1, #MSB
+ uadd8 syndrome, data1, const_m1
+ eors syndrome, tmp1, data2, S2LO #8
+ sel syndrome, syndrome, const_m1
+ bne 4f
+ cmp syndrome, #0
+ ldreq data2, [src2], #4
+ bne 5f
+
+ eor tmp1, tmp1, data1
+ cmp tmp1, data2, S2HI #24
+ bne 6f
+ ldr data1, [src1], #4
+ b .Loverlap3
+4:
+ S2LO data2, data2, #8
+ b .Lstrcmp_tail
+
+5:
+ bics syndrome, syndrome, #MSB
+ bne .Lstrcmp_done_equal
+
+ /* We can only get here if the MSB of data1 contains 0, so
+ fast-path the exit. */
+ ldrb result, [src2]
+ .cfi_remember_state
+ ldrd r4, r5, [sp], #16
+ .cfi_restore 4
+ .cfi_restore 5
+ /* R6/7 Not used in this sequence. */
+ .cfi_restore 6
+ .cfi_restore 7
+ neg result, result
+ bx lr
+
+6:
+ .cfi_restore_state
+ S2LO data1, data1, #24
+ and data2, data2, #LSB
+ b .Lstrcmp_tail
+
+ .p2align 5,,12 /* Ensure at least 3 instructions in cache line. */
+.Loverlap2:
+ and tmp1, data1, const_m1, S2LO #16
+ uadd8 syndrome, data1, const_m1
+ eors syndrome, tmp1, data2, S2LO #16
+ sel syndrome, syndrome, const_m1
+ bne 4f
+ cmp syndrome, #0
+ ldreq data2, [src2], #4
+ bne 5f
+ eor tmp1, tmp1, data1
+ cmp tmp1, data2, S2HI #16
+ bne 6f
+ ldr data1, [src1], #4
+ b .Loverlap2
+4:
+ S2LO data2, data2, #16
+ b .Lstrcmp_tail
+5:
+ ands syndrome, syndrome, const_m1, S2LO #16
+ bne .Lstrcmp_done_equal
+
+ ldrh data2, [src2]
+ S2LO data1, data1, #16
+#ifdef __ARM_BIG_ENDIAN
+ lsl data2, data2, #16
+#endif
+ b .Lstrcmp_tail
+
+6:
+ S2LO data1, data1, #16
+ and data2, data2, const_m1, S2LO #16
+ b .Lstrcmp_tail
+
+ .p2align 5,,12 /* Ensure at least 3 instructions in cache line. */
+.Loverlap1:
+ and tmp1, data1, #LSB
+ uadd8 syndrome, data1, const_m1
+ eors syndrome, tmp1, data2, S2LO #24
+ sel syndrome, syndrome, const_m1
+ bne 4f
+ cmp syndrome, #0
+ ldreq data2, [src2], #4
+ bne 5f
+ eor tmp1, tmp1, data1
+ cmp tmp1, data2, S2HI #8
+ bne 6f
+ ldr data1, [src1], #4
+ b .Loverlap1
+4:
+ S2LO data2, data2, #24
+ b .Lstrcmp_tail
+5:
+ tst syndrome, #LSB
+ bne .Lstrcmp_done_equal
+ ldr data2, [src2]
+6:
+ S2LO data1, data1, #8
+ bic data2, data2, #MSB
+ b .Lstrcmp_tail
+
+.Lstrcmp_done_equal:
+ mov result, #0
+ .cfi_remember_state
+ ldrd r4, r5, [sp], #16
+ .cfi_restore 4
+ .cfi_restore 5
+ /* R6/7 not used in this sequence. */
+ .cfi_restore 6
+ .cfi_restore 7
+ bx lr
+
+.Lstrcmp_tail:
+ .cfi_restore_state
+#ifndef __ARM_BIG_ENDIAN
+ rev data1, data1
+ rev data2, data2
+ /* Now everything looks big-endian... */
+#endif
+ uadd8 tmp1, data1, const_m1
+ eor tmp1, data1, data2
+ sel syndrome, tmp1, const_m1
+ clz tmp1, syndrome
+ lsl data1, data1, tmp1
+ lsl data2, data2, tmp1
+ lsr result, data1, #24
+ ldrd r4, r5, [sp], #16
+ .cfi_restore 4
+ .cfi_restore 5
+ /* R6/7 not used in this sequence. */
+ .cfi_restore 6
+ .cfi_restore 7
+ sub result, result, data2, lsr #24
+ bx lr
+ .cfi_endproc
+ .size strcmp, . - .Lstrcmp_start_addr
diff --git a/newlib/libc/machine/arm/strcmp-armv6m.S b/newlib/libc/machine/arm/strcmp-armv6m.S
new file mode 100644
index 000000000..74f87cba2
--- /dev/null
+++ b/newlib/libc/machine/arm/strcmp-armv6m.S
@@ -0,0 +1,141 @@
+/*
+ * Copyright (c) 2014 ARM Ltd
+ * 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. The name of the company may not be used to endorse or promote
+ * products derived from this software without specific prior written
+ * permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ARM LTD ``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 ARM LTD 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.
+ */
+
+/* Implementation of strcmp for ARMv6m. This version is only used in
+ ARMv6-M when we want an efficient implementation. Otherwize if the
+ code size is preferred, strcmp-armv4t.S will be used. */
+
+ .thumb_func
+ .syntax unified
+ .arch armv6-m
+
+ .macro DoSub n, label
+ subs r0, r0, r1
+#ifdef __ARM_BIG_ENDIAN
+ lsrs r1, r4, \n
+#else
+ lsls r1, r4, \n
+#endif
+ orrs r1, r0
+ bne \label
+ .endm
+
+ .macro Byte_Test n, label
+ lsrs r0, r2, \n
+ lsrs r1, r3, \n
+ DoSub \n, \label
+ .endm
+
+ .text
+def_fn strcmp
+ .cfi_sections .debug_frame
+ .cfi_startproc
+ mov r2, r0
+ push {r4, r5, r6, lr}
+ orrs r2, r1
+ lsls r2, r2, #30
+ bne 6f
+ ldr r5, =0x01010101
+ lsls r6, r5, #7
+1:
+ ldmia r0!, {r2}
+ ldmia r1!, {r3}
+ subs r4, r2, r5
+ bics r4, r2
+ ands r4, r6
+ beq 3f
+
+#ifdef __ARM_BIG_ENDIAN
+ Byte_Test #24, 4f
+ Byte_Test #16, 4f
+ Byte_Test #8, 4f
+
+ b 7f
+3:
+ cmp r2, r3
+ beq 1b
+ cmp r2, r3
+#else
+ uxtb r0, r2
+ uxtb r1, r3
+ DoSub #24, 2f
+
+ uxth r0, r2
+ uxth r1, r3
+ DoSub #16, 2f
+
+ lsls r0, r2, #8
+ lsls r1, r3, #8
+ lsrs r0, r0, #8
+ lsrs r1, r1, #8
+ DoSub #8, 2f
+
+ lsrs r0, r2, #24
+ lsrs r1, r3, #24
+ subs r0, r0, r1
+2:
+ pop {r4, r5, r6, pc}
+
+3:
+ cmp r2, r3
+ beq 1b
+ rev r0, r2
+ rev r1, r3
+ cmp r0, r1
+#endif
+
+ bls 5f
+ movs r0, #1
+4:
+ pop {r4, r5, r6, pc}
+5:
+ movs r0, #0
+ mvns r0, r0
+ pop {r4, r5, r6, pc}
+6:
+ ldrb r2, [r0, #0]
+ ldrb r3, [r1, #0]
+ adds r0, #1
+ adds r1, #1
+ cmp r2, #0
+ beq 7f
+ cmp r2, r3
+ bne 7f
+ ldrb r2, [r0, #0]
+ ldrb r3, [r1, #0]
+ adds r0, #1
+ adds r1, #1
+ cmp r2, #0
+ beq 7f
+ cmp r2, r3
+ beq 6b
+7:
+ subs r0, r2, r3
+ pop {r4, r5, r6, pc}
+ .cfi_endproc
+ .size strcmp, . - strcmp
diff --git a/newlib/libc/machine/arm/strcmp-armv7.S b/newlib/libc/machine/arm/strcmp-armv7.S
new file mode 100644
index 000000000..2f93bfb73
--- /dev/null
+++ b/newlib/libc/machine/arm/strcmp-armv7.S
@@ -0,0 +1,469 @@
+/*
+ * Copyright (c) 2012-2014 ARM Ltd
+ * 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. The name of the company may not be used to endorse or promote
+ * products derived from this software without specific prior written
+ * permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ARM LTD ``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 ARM LTD 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.
+ */
+
+ /* Implementation of strcmp for ARMv7 when DSP instructions are
+ available. Use ldrd to support wider loads, provided the data
+ is sufficiently aligned. Use saturating arithmetic to optimize
+ the compares. */
+
+ /* Build Options:
+ STRCMP_NO_PRECHECK: Don't run a quick pre-check of the first
+ byte in the string. If comparing completely random strings
+ the pre-check will save time, since there is a very high
+ probability of a mismatch in the first character: we save
+ significant overhead if this is the common case. However,
+ if strings are likely to be identical (eg because we're
+ verifying a hit in a hash table), then this check is largely
+ redundant. */
+
+ /* This version uses Thumb-2 code. */
+ .thumb
+ .syntax unified
+
+/* Parameters and result. */
+#define src1 r0
+#define src2 r1
+#define result r0 /* Overlaps src1. */
+
+/* Internal variables. */
+#define tmp1 r4
+#define tmp2 r5
+#define const_m1 r12
+
+/* Additional internal variables for 64-bit aligned data. */
+#define data1a r2
+#define data1b r3
+#define data2a r6
+#define data2b r7
+#define syndrome_a tmp1
+#define syndrome_b tmp2
+
+/* Additional internal variables for 32-bit aligned data. */
+#define data1 r2
+#define data2 r3
+#define syndrome tmp2
+
+
+ /* Macro to compute and return the result value for word-aligned
+ cases. */
+ .macro strcmp_epilogue_aligned synd d1 d2 restore_r6
+#ifdef __ARM_BIG_ENDIAN
+ /* If data1 contains a zero byte, then syndrome will contain a 1 in
+ bit 7 of that byte. Otherwise, the highest set bit in the
+ syndrome will highlight the first different bit. It is therefore
+ sufficient to extract the eight bits starting with the syndrome
+ bit. */
+ clz tmp1, \synd
+ lsl r1, \d2, tmp1
+ .if \restore_r6
+ ldrd r6, r7, [sp, #8]
+ .endif
+ .cfi_restore 6
+ .cfi_restore 7
+ lsl \d1, \d1, tmp1
+ .cfi_remember_state
+ lsr result, \d1, #24
+ ldrd r4, r5, [sp], #16
+ .cfi_restore 4
+ .cfi_restore 5
+ sub result, result, r1, lsr #24
+ bx lr
+#else
+ /* To use the big-endian trick we'd have to reverse all three words.
+ that's slower than this approach. */
+ rev \synd, \synd
+ clz tmp1, \synd
+ bic tmp1, tmp1, #7
+ lsr r1, \d2, tmp1
+ .cfi_remember_state
+ .if \restore_r6
+ ldrd r6, r7, [sp, #8]
+ .endif
+ .cfi_restore 6
+ .cfi_restore 7
+ lsr \d1, \d1, tmp1
+ and result, \d1, #255
+ and r1, r1, #255
+ ldrd r4, r5, [sp], #16
+ .cfi_restore 4
+ .cfi_restore 5
+ sub result, result, r1
+
+ bx lr
+#endif
+ .endm
+
+ .text
+ .p2align 5
+.Lstrcmp_start_addr:
+#ifndef STRCMP_NO_PRECHECK
+.Lfastpath_exit:
+ sub r0, r2, r3
+ bx lr
+ nop
+#endif
+def_fn strcmp
+#ifndef STRCMP_NO_PRECHECK
+ ldrb r2, [src1]
+ ldrb r3, [src2]
+ cmp r2, #1
+ it cs
+ cmpcs r2, r3
+ bne .Lfastpath_exit
+#endif
+ .cfi_sections .debug_frame
+ .cfi_startproc
+ strd r4, r5, [sp, #-16]!
+ .cfi_def_cfa_offset 16
+ .cfi_offset 4, -16
+ .cfi_offset 5, -12
+ orr tmp1, src1, src2
+ strd r6, r7, [sp, #8]
+ .cfi_offset 6, -8
+ .cfi_offset 7, -4
+ mvn const_m1, #0
+ lsl r2, tmp1, #29
+ cbz r2, .Lloop_aligned8
+
+.Lnot_aligned:
+ eor tmp1, src1, src2
+ tst tmp1, #7
+ bne .Lmisaligned8
+
+ /* Deal with mutual misalignment by aligning downwards and then
+ masking off the unwanted loaded data to prevent a difference. */
+ and tmp1, src1, #7
+ bic src1, src1, #7
+ and tmp2, tmp1, #3
+ bic src2, src2, #7
+ lsl tmp2, tmp2, #3 /* Bytes -> bits. */
+ ldrd data1a, data1b, [src1], #16
+ tst tmp1, #4
+ ldrd data2a, data2b, [src2], #16
+ /* In thumb code we can't use MVN with a register shift, but
+ we do have ORN. */
+ S2HI tmp1, const_m1, tmp2
+ orn data1a, data1a, tmp1
+ orn data2a, data2a, tmp1
+ beq .Lstart_realigned8
+ orn data1b, data1b, tmp1
+ mov data1a, const_m1
+ orn data2b, data2b, tmp1
+ mov data2a, const_m1
+ b .Lstart_realigned8
+
+ /* Unwind the inner loop by a factor of 2, giving 16 bytes per
+ pass. */
+ .p2align 5,,12 /* Don't start in the tail bytes of a cache line. */
+ .p2align 2 /* Always word aligned. */
+.Lloop_aligned8:
+ ldrd data1a, data1b, [src1], #16
+ ldrd data2a, data2b, [src2], #16
+.Lstart_realigned8:
+ uadd8 syndrome_b, data1a, const_m1 /* Only want GE bits, */
+ eor syndrome_a, data1a, data2a
+ sel syndrome_a, syndrome_a, const_m1
+ cbnz syndrome_a, .Ldiff_in_a
+ uadd8 syndrome_b, data1b, const_m1 /* Only want GE bits. */
+ eor syndrome_b, data1b, data2b
+ sel syndrome_b, syndrome_b, const_m1
+ cbnz syndrome_b, .Ldiff_in_b
+
+ ldrd data1a, data1b, [src1, #-8]
+ ldrd data2a, data2b, [src2, #-8]
+ uadd8 syndrome_b, data1a, const_m1 /* Only want GE bits, */
+ eor syndrome_a, data1a, data2a
+ sel syndrome_a, syndrome_a, const_m1
+ uadd8 syndrome_b, data1b, const_m1 /* Only want GE bits. */
+ eor syndrome_b, data1b, data2b
+ sel syndrome_b, syndrome_b, const_m1
+ /* Can't use CBZ for backwards branch. */
+ orrs syndrome_b, syndrome_b, syndrome_a /* Only need if s_a == 0 */
+ beq .Lloop_aligned8
+
+.Ldiff_found:
+ cbnz syndrome_a, .Ldiff_in_a
+
+.Ldiff_in_b:
+ strcmp_epilogue_aligned syndrome_b, data1b, data2b 1
+
+.Ldiff_in_a:
+ .cfi_restore_state
+ strcmp_epilogue_aligned syndrome_a, data1a, data2a 1
+
+ .cfi_restore_state
+.Lmisaligned8:
+ tst tmp1, #3
+ bne .Lmisaligned4
+ ands tmp1, src1, #3
+ bne .Lmutual_align4
+
+ /* Unrolled by a factor of 2, to reduce the number of post-increment
+ operations. */
+.Lloop_aligned4:
+ ldr data1, [src1], #8
+ ldr data2, [src2], #8
+.Lstart_realigned4:
+ uadd8 syndrome, data1, const_m1 /* Only need GE bits. */
+ eor syndrome, data1, data2
+ sel syndrome, syndrome, const_m1
+ cbnz syndrome, .Laligned4_done
+ ldr data1, [src1, #-4]
+ ldr data2, [src2, #-4]
+ uadd8 syndrome, data1, const_m1
+ eor syndrome, data1, data2
+ sel syndrome, syndrome, const_m1
+ cmp syndrome, #0
+ beq .Lloop_aligned4
+
+.Laligned4_done:
+ strcmp_epilogue_aligned syndrome, data1, data2, 0
+
+.Lmutual_align4:
+ .cfi_restore_state
+ /* Deal with mutual misalignment by aligning downwards and then
+ masking off the unwanted loaded data to prevent a difference. */
+ lsl tmp1, tmp1, #3 /* Bytes -> bits. */
+ bic src1, src1, #3
+ ldr data1, [src1], #8
+ bic src2, src2, #3
+ ldr data2, [src2], #8
+
+ /* In thumb code we can't use MVN with a register shift, but
+ we do have ORN. */
+ S2HI tmp1, const_m1, tmp1
+ orn data1, data1, tmp1
+ orn data2, data2, tmp1
+ b .Lstart_realigned4
+
+.Lmisaligned4:
+ ands tmp1, src1, #3
+ beq .Lsrc1_aligned
+ sub src2, src2, tmp1
+ bic src1, src1, #3
+ lsls tmp1, tmp1, #31
+ ldr data1, [src1], #4
+ beq .Laligned_m2
+ bcs .Laligned_m1
+
+#ifdef STRCMP_NO_PRECHECK
+ ldrb data2, [src2, #1]
+ uxtb tmp1, data1, ror #BYTE1_OFFSET
+ subs tmp1, tmp1, data2
+ bne .Lmisaligned_exit
+ cbz data2, .Lmisaligned_exit
+
+.Laligned_m2:
+ ldrb data2, [src2, #2]
+ uxtb tmp1, data1, ror #BYTE2_OFFSET
+ subs tmp1, tmp1, data2
+ bne .Lmisaligned_exit
+ cbz data2, .Lmisaligned_exit
+
+.Laligned_m1:
+ ldrb data2, [src2, #3]
+ uxtb tmp1, data1, ror #BYTE3_OFFSET
+ subs tmp1, tmp1, data2
+ bne .Lmisaligned_exit
+ add src2, src2, #4
+ cbnz data2, .Lsrc1_aligned
+#else /* STRCMP_NO_PRECHECK */
+ /* If we've done the pre-check, then we don't need to check the
+ first byte again here. */
+ ldrb data2, [src2, #2]
+ uxtb tmp1, data1, ror #BYTE2_OFFSET
+ subs tmp1, tmp1, data2
+ bne .Lmisaligned_exit
+ cbz data2, .Lmisaligned_exit
+
+.Laligned_m2:
+ ldrb data2, [src2, #3]
+ uxtb tmp1, data1, ror #BYTE3_OFFSET
+ subs tmp1, tmp1, data2
+ bne .Lmisaligned_exit
+ cbnz data2, .Laligned_m1
+#endif
+
+.Lmisaligned_exit:
+ .cfi_remember_state
+ mov result, tmp1
+ ldr r4, [sp], #16
+ .cfi_restore 4
+ bx lr
+
+#ifndef STRCMP_NO_PRECHECK
+.Laligned_m1:
+ add src2, src2, #4
+#endif
+.Lsrc1_aligned:
+ .cfi_restore_state
+ /* src1 is word aligned, but src2 has no common alignment
+ with it. */
+ ldr data1, [src1], #4
+ lsls tmp1, src2, #31 /* C=src2[1], Z=src2[0]. */
+
+ bic src2, src2, #3
+ ldr data2, [src2], #4
+ bhi .Loverlap1 /* C=1, Z=0 => src2[1:0] = 0b11. */
+ bcs .Loverlap2 /* C=1, Z=1 => src2[1:0] = 0b10. */
+
+ /* (overlap3) C=0, Z=0 => src2[1:0] = 0b01. */
+.Loverlap3:
+ bic tmp1, data1, #MSB
+ uadd8 syndrome, data1, const_m1
+ eors syndrome, tmp1, data2, S2LO #8
+ sel syndrome, syndrome, const_m1
+ bne 4f
+ cbnz syndrome, 5f
+ ldr data2, [src2], #4
+ eor tmp1, tmp1, data1
+ cmp tmp1, data2, S2HI #24
+ bne 6f
+ ldr data1, [src1], #4
+ b .Loverlap3
+4:
+ S2LO data2, data2, #8
+ b .Lstrcmp_tail
+
+5:
+ bics syndrome, syndrome, #MSB
+ bne .Lstrcmp_done_equal
+
+ /* We can only get here if the MSB of data1 contains 0, so
+ fast-path the exit. */
+ ldrb result, [src2]
+ .cfi_remember_state
+ ldrd r4, r5, [sp], #16
+ .cfi_restore 4
+ .cfi_restore 5
+ /* R6/7 Not used in this sequence. */
+ .cfi_restore 6
+ .cfi_restore 7
+ neg result, result
+ bx lr
+
+6:
+ .cfi_restore_state
+ S2LO data1, data1, #24
+ and data2, data2, #LSB
+ b .Lstrcmp_tail
+
+ .p2align 5,,12 /* Ensure at least 3 instructions in cache line. */
+.Loverlap2:
+ and tmp1, data1, const_m1, S2LO #16
+ uadd8 syndrome, data1, const_m1
+ eors syndrome, tmp1, data2, S2LO #16
+ sel syndrome, syndrome, const_m1
+ bne 4f
+ cbnz syndrome, 5f
+ ldr data2, [src2], #4
+ eor tmp1, tmp1, data1
+ cmp tmp1, data2, S2HI #16
+ bne 6f
+ ldr data1, [src1], #4
+ b .Loverlap2
+4:
+ S2LO data2, data2, #16
+ b .Lstrcmp_tail
+5:
+ ands syndrome, syndrome, const_m1, S2LO #16
+ bne .Lstrcmp_done_equal
+
+ ldrh data2, [src2]
+ S2LO data1, data1, #16
+#ifdef __ARM_BIG_ENDIAN
+ lsl data2, data2, #16
+#endif
+ b .Lstrcmp_tail
+
+6:
+ S2LO data1, data1, #16
+ and data2, data2, const_m1, S2LO #16
+ b .Lstrcmp_tail
+
+ .p2align 5,,12 /* Ensure at least 3 instructions in cache line. */
+.Loverlap1:
+ and tmp1, data1, #LSB
+ uadd8 syndrome, data1, const_m1
+ eors syndrome, tmp1, data2, S2LO #24
+ sel syndrome, syndrome, const_m1
+ bne 4f
+ cbnz syndrome, 5f
+ ldr data2, [src2], #4
+ eor tmp1, tmp1, data1
+ cmp tmp1, data2, S2HI #8
+ bne 6f
+ ldr data1, [src1], #4
+ b .Loverlap1
+4:
+ S2LO data2, data2, #24
+ b .Lstrcmp_tail
+5:
+ tst syndrome, #LSB
+ bne .Lstrcmp_done_equal
+ ldr data2, [src2]
+6:
+ S2LO data1, data1, #8
+ bic data2, data2, #MSB
+ b .Lstrcmp_tail
+
+.Lstrcmp_done_equal:
+ mov result, #0
+ .cfi_remember_state
+ ldrd r4, r5, [sp], #16
+ .cfi_restore 4
+ .cfi_restore 5
+ /* R6/7 not used in this sequence. */
+ .cfi_restore 6
+ .cfi_restore 7
+ bx lr
+
+.Lstrcmp_tail:
+ .cfi_restore_state
+#ifndef __ARM_BIG_ENDIAN
+ rev data1, data1
+ rev data2, data2
+ /* Now everything looks big-endian... */
+#endif
+ uadd8 tmp1, data1, const_m1
+ eor tmp1, data1, data2
+ sel syndrome, tmp1, const_m1
+ clz tmp1, syndrome
+ lsl data1, data1, tmp1
+ lsl data2, data2, tmp1
+ lsr result, data1, #24
+ ldrd r4, r5, [sp], #16
+ .cfi_restore 4
+ .cfi_restore 5
+ /* R6/7 not used in this sequence. */
+ .cfi_restore 6
+ .cfi_restore 7
+ sub result, result, data2, lsr #24
+ bx lr
+ .cfi_endproc
+ .size strcmp, . - .Lstrcmp_start_addr
diff --git a/newlib/libc/machine/arm/strcmp-armv7m.S b/newlib/libc/machine/arm/strcmp-armv7m.S
new file mode 100644
index 000000000..7b6304925
--- /dev/null
+++ b/newlib/libc/machine/arm/strcmp-armv7m.S
@@ -0,0 +1,378 @@
+/*
+ * Copyright (c) 2012-2014 ARM Ltd
+ * 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. The name of the company may not be used to endorse or promote
+ * products derived from this software without specific prior written
+ * permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ARM LTD ``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 ARM LTD 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.
+ */
+
+/* Very similar to the generic code, but uses Thumb2 as implemented
+ in ARMv7-M. */
+
+/* Parameters and result. */
+#define src1 r0
+#define src2 r1
+#define result r0 /* Overlaps src1. */
+
+/* Internal variables. */
+#define data1 r2
+#define data2 r3
+#define tmp2 r5
+#define tmp1 r12
+#define syndrome r12 /* Overlaps tmp1 */
+
+ .thumb
+ .syntax unified
+def_fn strcmp
+ .cfi_sections .debug_frame
+ .cfi_startproc
+ eor tmp1, src1, src2
+ tst tmp1, #3
+ /* Strings not at same byte offset from a word boundary. */
+ bne .Lstrcmp_unaligned
+ ands tmp1, src1, #3
+ bic src1, src1, #3
+ bic src2, src2, #3
+ ldr data1, [src1], #4
+ it eq
+ ldreq data2, [src2], #4
+ beq 4f
+ /* Although s1 and s2 have identical initial alignment, they are
+ not currently word aligned. Rather than comparing bytes,
+ make sure that any bytes fetched from before the addressed
+ bytes are forced to 0xff. Then they will always compare
+ equal. */
+ eor tmp1, tmp1, #3
+ mvn data2, #MSB
+ lsl tmp1, tmp1, #3
+ S2LO tmp1, data2, tmp1
+ ldr data2, [src2], #4
+ orr data1, data1, tmp1
+ orr data2, data2, tmp1
+ .p2align 2
+ /* Critical loop. */
+4:
+ sub syndrome, data1, #0x01010101
+ cmp data1, data2
+ /* check for any zero bytes in first word */
+ itttt eq
+ biceq syndrome, syndrome, data1
+ tsteq syndrome, #0x80808080
+ ldreq data1, [src1], #4
+ ldreq data2, [src2], #4
+ beq 4b
+2:
+ /* There's a zero or a different byte in the word */
+ S2HI result, data1, #24
+ S2LO data1, data1, #8
+ cmp result, #1
+ it cs
+ cmpcs result, data2, S2HI #24
+ it eq
+ S2LOEQ data2, data2, #8
+ beq 2b
+ /* On a big-endian machine, RESULT contains the desired byte in bits
+ 0-7; on a little-endian machine they are in bits 24-31. In
+ both cases the other bits in RESULT are all zero. For DATA2 the
+ interesting byte is at the other end of the word, but the
+ other bits are not necessarily zero. We need a signed result
+ representing the differnece in the unsigned bytes, so for the
+ little-endian case we can't just shift the interesting bits
+ up. */
+#ifdef __ARM_BIG_ENDIAN
+ sub result, result, data2, lsr #24
+#else
+ and data2, data2, #255
+ lsrs result, result, #24
+ subs result, result, data2
+#endif
+ RETURN
+
+
+#if 0
+ /* The assembly code below is based on the following alogrithm. */
+#ifdef __ARM_BIG_ENDIAN
+#define RSHIFT <<
+#define LSHIFT >>
+#else
+#define RSHIFT >>
+#define LSHIFT <<
+#endif
+
+#define body(shift) \
+ mask = 0xffffffffU RSHIFT shift; \
+ data1 = *src1++; \
+ data2 = *src2++; \
+ do \
+ { \
+ tmp2 = data1 & mask; \
+ if (__builtin_expect(tmp2 != data2 RSHIFT shift, 0)) \
+ { \
+ data2 RSHIFT= shift; \
+ break; \
+ } \
+ if (__builtin_expect(((data1 - b1) & ~data1) & (b1 << 7), 0)) \
+ { \
+ /* See comment in assembler below re syndrome on big-endian */\
+ if ((((data1 - b1) & ~data1) & (b1 << 7)) & mask) \
+ data2 RSHIFT= shift; \
+ else \
+ { \
+ data2 = *src2; \
+ tmp2 = data1 RSHIFT (32 - shift); \
+ data2 = (data2 LSHIFT (32 - shift)) RSHIFT (32 - shift); \
+ } \
+ break; \
+ } \
+ data2 = *src2++; \
+ tmp2 ^= data1; \
+ if (__builtin_expect(tmp2 != data2 LSHIFT (32 - shift), 0)) \
+ { \
+ tmp2 = data1 >> (32 - shift); \
+ data2 = (data2 << (32 - shift)) RSHIFT (32 - shift); \
+ break; \
+ } \
+ data1 = *src1++; \
+ } while (1)
+
+ const unsigned* src1;
+ const unsigned* src2;
+ unsigned data1, data2;
+ unsigned mask;
+ unsigned shift;
+ unsigned b1 = 0x01010101;
+ char c1, c2;
+ unsigned tmp2;
+
+ while (((unsigned) s1) & 3)
+ {
+ c1 = *s1++;
+ c2 = *s2++;
+ if (c1 == 0 || c1 != c2)
+ return c1 - (int)c2;
+ }
+ src1 = (unsigned*) (((unsigned)s1) & ~3);
+ src2 = (unsigned*) (((unsigned)s2) & ~3);
+ tmp2 = ((unsigned) s2) & 3;
+ if (tmp2 == 1)
+ {
+ body(8);
+ }
+ else if (tmp2 == 2)
+ {
+ body(16);
+ }
+ else
+ {
+ body (24);
+ }
+
+ do
+ {
+#ifdef __ARM_BIG_ENDIAN
+ c1 = (char) tmp2 >> 24;
+ c2 = (char) data2 >> 24;
+#else /* not __ARM_BIG_ENDIAN */
+ c1 = (char) tmp2;
+ c2 = (char) data2;
+#endif /* not __ARM_BIG_ENDIAN */
+ tmp2 RSHIFT= 8;
+ data2 RSHIFT= 8;
+ } while (c1 != 0 && c1 == c2);
+ return c1 - c2;
+#endif /* 0 */
+
+
+ /* First of all, compare bytes until src1(sp1) is word-aligned. */
+.Lstrcmp_unaligned:
+ tst src1, #3
+ beq 2f
+ ldrb data1, [src1], #1
+ ldrb data2, [src2], #1
+ cmp data1, #1
+ it cs
+ cmpcs data1, data2
+ beq .Lstrcmp_unaligned
+ sub result, data1, data2
+ bx lr
+
+2:
+ stmfd sp!, {r5}
+ .cfi_def_cfa_offset 4
+ .cfi_offset 5, -4
+
+ ldr data1, [src1], #4
+ and tmp2, src2, #3
+ bic src2, src2, #3
+ ldr data2, [src2], #4
+ cmp tmp2, #2
+ beq .Loverlap2
+ bhi .Loverlap1
+
+ /* Critical inner Loop: Block with 3 bytes initial overlap */
+ .p2align 2
+.Loverlap3:
+ bic tmp2, data1, #MSB
+ cmp tmp2, data2, S2LO #8
+ sub syndrome, data1, #0x01010101
+ bic syndrome, syndrome, data1
+ bne 4f
+ ands syndrome, syndrome, #0x80808080
+ it eq
+ ldreq data2, [src2], #4
+ bne 5f
+ eor tmp2, tmp2, data1
+ cmp tmp2, data2, S2HI #24
+ bne 6f
+ ldr data1, [src1], #4
+ b .Loverlap3
+4:
+ S2LO data2, data2, #8
+ b .Lstrcmp_tail
+
+5:
+#ifdef __ARM_BIG_ENDIAN
+ /* The syndrome value may contain false ones if the string ends
+ with the bytes 0x01 0x00. */
+ tst data1, #0xff000000
+ itt ne
+ tstne data1, #0x00ff0000
+ tstne data1, #0x0000ff00
+ beq .Lstrcmp_done_equal
+#else
+ bics syndrome, syndrome, #0xff000000
+ bne .Lstrcmp_done_equal
+#endif
+ ldrb data2, [src2]
+ S2LO tmp2, data1, #24
+#ifdef __ARM_BIG_ENDIAN
+ lsl data2, data2, #24
+#endif
+ b .Lstrcmp_tail
+
+6:
+ S2LO tmp2, data1, #24
+ and data2, data2, #LSB
+ b .Lstrcmp_tail
+
+ /* Critical inner Loop: Block with 2 bytes initial overlap. */
+ .p2align 2
+.Loverlap2:
+ S2HI tmp2, data1, #16
+ sub syndrome, data1, #0x01010101
+ S2LO tmp2, tmp2, #16
+ bic syndrome, syndrome, data1
+ cmp tmp2, data2, S2LO #16
+ bne 4f
+ ands syndrome, syndrome, #0x80808080
+ it eq
+ ldreq data2, [src2], #4
+ bne 5f
+ eor tmp2, tmp2, data1
+ cmp tmp2, data2, S2HI #16
+ bne 6f
+ ldr data1, [src1], #4
+ b .Loverlap2
+
+5:
+#ifdef __ARM_BIG_ENDIAN
+ /* The syndrome value may contain false ones if the string ends
+ with the bytes 0x01 0x00 */
+ tst data1, #0xff000000
+ it ne
+ tstne data1, #0x00ff0000
+ beq .Lstrcmp_done_equal
+#else
+ lsls syndrome, syndrome, #16
+ bne .Lstrcmp_done_equal
+#endif
+ ldrh data2, [src2]
+ S2LO tmp2, data1, #16
+#ifdef __ARM_BIG_ENDIAN
+ lsl data2, data2, #16
+#endif
+ b .Lstrcmp_tail
+
+6:
+ S2HI data2, data2, #16
+ S2LO tmp2, data1, #16
+4:
+ S2LO data2, data2, #16
+ b .Lstrcmp_tail
+
+ /* Critical inner Loop: Block with 1 byte initial overlap. */
+ .p2align 2
+.Loverlap1:
+ and tmp2, data1, #LSB
+ cmp tmp2, data2, S2LO #24
+ sub syndrome, data1, #0x01010101
+ bic syndrome, syndrome, data1
+ bne 4f
+ ands syndrome, syndrome, #0x80808080
+ it eq
+ ldreq data2, [src2], #4
+ bne 5f
+ eor tmp2, tmp2, data1
+ cmp tmp2, data2, S2HI #8
+ bne 6f
+ ldr data1, [src1], #4
+ b .Loverlap1
+4:
+ S2LO data2, data2, #24
+ b .Lstrcmp_tail
+5:
+ /* The syndrome value may contain false ones if the string ends
+ with the bytes 0x01 0x00. */
+ tst data1, #LSB
+ beq .Lstrcmp_done_equal
+ ldr data2, [src2], #4
+6:
+ S2LO tmp2, data1, #8
+ bic data2, data2, #MSB
+ b .Lstrcmp_tail
+.Lstrcmp_done_equal:
+ mov result, #0
+ .cfi_remember_state
+ ldmfd sp!, {r5}
+ .cfi_restore 5
+ .cfi_def_cfa_offset 0
+ RETURN
+
+.Lstrcmp_tail:
+ .cfi_restore_state
+ and r2, tmp2, #LSB
+ and result, data2, #LSB
+ cmp result, #1
+ it cs
+ cmpcs result, r2
+ itt eq
+ S2LOEQ tmp2, tmp2, #8
+ S2LOEQ data2, data2, #8
+ beq .Lstrcmp_tail
+ sub result, r2, result
+ ldmfd sp!, {r5}
+ .cfi_restore 5
+ .cfi_def_cfa_offset 0
+ RETURN
+ .cfi_endproc
+ .size strcmp, . - strcmp
diff --git a/newlib/libc/machine/arm/strcmp.S b/newlib/libc/machine/arm/strcmp.S
index f3e738776..3af9b6dbd 100644
--- a/newlib/libc/machine/arm/strcmp.S
+++ b/newlib/libc/machine/arm/strcmp.S
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012 ARM Ltd
+ * Copyright (c) 2012-2014 ARM Ltd
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -26,769 +26,73 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
+/* Wrapper for the various implementations of strcmp. */
+
#include "arm_asm.h"
+#include "acle-compat.h"
-#ifdef __ARMEB__
-#define S2LOMEM lsl
-#define S2LOMEMEQ lsleq
-#define S2HIMEM lsr
+#ifdef __ARM_BIG_ENDIAN
+#define S2LO lsl
+#define S2LOEQ lsleq
+#define S2HI lsr
#define MSB 0x000000ff
#define LSB 0xff000000
#define BYTE0_OFFSET 24
#define BYTE1_OFFSET 16
#define BYTE2_OFFSET 8
#define BYTE3_OFFSET 0
-#else /* not __ARMEB__ */
-#define S2LOMEM lsr
-#define S2LOMEMEQ lsreq
-#define S2HIMEM lsl
+#else /* not __ARM_BIG_ENDIAN */
+#define S2LO lsr
+#define S2LOEQ lsreq
+#define S2HI lsl
#define BYTE0_OFFSET 0
#define BYTE1_OFFSET 8
#define BYTE2_OFFSET 16
#define BYTE3_OFFSET 24
#define MSB 0xff000000
#define LSB 0x000000ff
-#endif /* not __ARMEB__ */
-
-.syntax unified
-
-#if defined (__thumb__)
- .thumb
- .thumb_func
-#if !defined (__thumb2__)
- /* If we have thumb1 only, we need to explictly mark the
- compatibility. */
- .arch armv4t
- .eabi_attribute Tag_also_compatible_with, "\006\013" /* v6-M. */
- .eabi_attribute Tag_ARM_ISA_use, 0
-#endif
-#endif
- .global strcmp
- .type strcmp, %function
-strcmp:
-
-#if (defined (__thumb__) && !defined (__thumb2__))
-1:
- ldrb r2, [r0]
- ldrb r3, [r1]
- adds r0, r0, #1
- adds r1, r1, #1
- cmp r2, #0
- beq 2f
- cmp r2, r3
- beq 1b
-2:
- subs r0, r2, r3
- bx lr
-#elif (defined (__OPTIMIZE_SIZE__) || defined (PREFER_SIZE_OVER_SPEED))
-1:
- ldrb r2, [r0], #1
- ldrb r3, [r1], #1
- cmp r2, #1
- it cs
- cmpcs r2, r3
- beq 1b
- subs r0, r2, r3
- RETURN
-
-
-#elif (defined (_ISA_THUMB_2) || defined (_ISA_ARM_6))
- /* Use LDRD whenever possible. */
-
-/* The main thing to look out for when comparing large blocks is that
- the loads do not cross a page boundary when loading past the index
- of the byte with the first difference or the first string-terminator.
-
- For example, if the strings are identical and the string-terminator
- is at index k, byte by byte comparison will not load beyond address
- s1+k and s2+k; word by word comparison may load up to 3 bytes beyond
- k; double word - up to 7 bytes. If the load of these bytes crosses
- a page boundary, it might cause a memory fault (if the page is not mapped)
- that would not have happened in byte by byte comparison.
-
- If an address is (double) word aligned, then a load of a (double) word
- from that address will not cross a page boundary.
- Therefore, the algorithm below considers word and double-word alignment
- of strings separately. */
-
-/* High-level description of the algorithm.
-
- * The fast path: if both strings are double-word aligned,
- use LDRD to load two words from each string in every loop iteration.
- * If the strings have the same offset from a word boundary,
- use LDRB to load and compare byte by byte until
- the first string is aligned to a word boundary (at most 3 bytes).
- This is optimized for quick return on short unaligned strings.
- * If the strings have the same offset from a double-word boundary,
- use LDRD to load two words from each string in every loop iteration, as in the fast path.
- * If the strings do not have the same offset from a double-word boundary,
- load a word from the second string before the loop to initialize the queue.
- Use LDRD to load two words from every string in every loop iteration.
- Inside the loop, load the second word from the second string only after comparing
- the first word, using the queued value, to guarantee safety across page boundaries.
- * If the strings do not have the same offset from a word boundary,
- use LDR and a shift queue. Order of loads and comparisons matters,
- similarly to the previous case.
-
- * Use UADD8 and SEL to compare words, and use REV and CLZ to compute the return value.
- * The only difference between ARM and Thumb modes is the use of CBZ instruction.
- * The only difference between big and little endian is the use of REV in little endian
- to compute the return value, instead of MOV.
- * No preload. [TODO.]
-*/
-
- .macro m_cbz reg label
-#ifdef __thumb2__
- cbz \reg, \label
-#else /* not defined __thumb2__ */
- cmp \reg, #0
- beq \label
-#endif /* not defined __thumb2__ */
- .endm /* m_cbz */
-
- .macro m_cbnz reg label
-#ifdef __thumb2__
- cbnz \reg, \label
-#else /* not defined __thumb2__ */
- cmp \reg, #0
- bne \label
-#endif /* not defined __thumb2__ */
- .endm /* m_cbnz */
-
- .macro init
- /* Macro to save temporary registers and prepare magic values. */
- subs sp, sp, #16
- strd r4, r5, [sp, #8]
- strd r6, r7, [sp]
- mvn r6, #0 /* all F */
- mov r7, #0 /* all 0 */
- .endm /* init */
-
- .macro magic_compare_and_branch w1 w2 label
- /* Macro to compare registers w1 and w2 and conditionally branch to label. */
- cmp \w1, \w2 /* Are w1 and w2 the same? */
- magic_find_zero_bytes \w1
- it eq
- cmpeq ip, #0 /* Is there a zero byte in w1? */
- bne \label
- .endm /* magic_compare_and_branch */
-
- .macro magic_find_zero_bytes w1
- /* Macro to find all-zero bytes in w1, result is in ip. */
-#if (defined (__ARM_FEATURE_DSP))
- uadd8 ip, \w1, r6
- sel ip, r7, r6
-#else /* not defined (__ARM_FEATURE_DSP) */
- /* __ARM_FEATURE_DSP is not defined for some Cortex-M processors.
- Coincidently, these processors only have Thumb-2 mode, where we can use the
- the (large) magic constant available directly as an immediate in instructions.
- Note that we cannot use the magic constant in ARM mode, where we need
- to create the constant in a register. */
- sub ip, \w1, #0x01010101
- bic ip, ip, \w1
- and ip, ip, #0x80808080
-#endif /* not defined (__ARM_FEATURE_DSP) */
- .endm /* magic_find_zero_bytes */
-
- .macro setup_return w1 w2
-#ifdef __ARMEB__
- mov r1, \w1
- mov r2, \w2
-#else /* not __ARMEB__ */
- rev r1, \w1
- rev r2, \w2
-#endif /* not __ARMEB__ */
- .endm /* setup_return */
-
- /*
- optpld r0, #0
- optpld r1, #0
- */
-
- /* Are both strings double-word aligned? */
- orr ip, r0, r1
- tst ip, #7
- bne .Ldo_align
-
- /* Fast path. */
- init
-
-.Ldoubleword_aligned:
-
- /* Get here when the strings to compare are double-word aligned. */
- /* Compare two words in every iteration. */
- .p2align 2
-2:
- /*
- optpld r0, #16
- optpld r1, #16
- */
-
- /* Load the next double-word from each string. */
- ldrd r2, r3, [r0], #8
- ldrd r4, r5, [r1], #8
-
- magic_compare_and_branch w1=r2, w2=r4, label=.Lreturn_24
- magic_compare_and_branch w1=r3, w2=r5, label=.Lreturn_35
- b 2b
-
-.Ldo_align:
- /* Is the first string word-aligned? */
- ands ip, r0, #3
- beq .Lword_aligned_r0
-
- /* Fast compare byte by byte until the first string is word-aligned. */
- /* The offset of r0 from a word boundary is in ip. Thus, the number of bytes
- to read until the next word boudnary is 4-ip. */
- bic r0, r0, #3
- ldr r2, [r0], #4
- lsls ip, ip, #31
- beq .Lbyte2
- bcs .Lbyte3
-
-.Lbyte1:
- ldrb ip, [r1], #1
- uxtb r3, r2, ror #BYTE1_OFFSET
- subs ip, r3, ip
- bne .Lfast_return
- m_cbz reg=r3, label=.Lfast_return
-
-.Lbyte2:
- ldrb ip, [r1], #1
- uxtb r3, r2, ror #BYTE2_OFFSET
- subs ip, r3, ip
- bne .Lfast_return
- m_cbz reg=r3, label=.Lfast_return
-
-.Lbyte3:
- ldrb ip, [r1], #1
- uxtb r3, r2, ror #BYTE3_OFFSET
- subs ip, r3, ip
- bne .Lfast_return
- m_cbnz reg=r3, label=.Lword_aligned_r0
-
-.Lfast_return:
- mov r0, ip
- bx lr
-
-.Lword_aligned_r0:
- init
- /* The first string is word-aligned. */
- /* Is the second string word-aligned? */
- ands ip, r1, #3
- bne .Lstrcmp_unaligned
-
-.Lword_aligned:
- /* The strings are word-aligned. */
- /* Is the first string double-word aligned? */
- tst r0, #4
- beq .Ldoubleword_aligned_r0
-
- /* If r0 is not double-word aligned yet, align it by loading
- and comparing the next word from each string. */
- ldr r2, [r0], #4
- ldr r4, [r1], #4
- magic_compare_and_branch w1=r2 w2=r4 label=.Lreturn_24
-
-.Ldoubleword_aligned_r0:
- /* Get here when r0 is double-word aligned. */
- /* Is r1 doubleword_aligned? */
- tst r1, #4
- beq .Ldoubleword_aligned
-
- /* Get here when the strings to compare are word-aligned,
- r0 is double-word aligned, but r1 is not double-word aligned. */
-
- /* Initialize the queue. */
- ldr r5, [r1], #4
-
- /* Compare two words in every iteration. */
- .p2align 2
-3:
- /*
- optpld r0, #16
- optpld r1, #16
- */
+#endif /* not __ARM_BIG_ENDIAN */
- /* Load the next double-word from each string and compare. */
- ldrd r2, r3, [r0], #8
- magic_compare_and_branch w1=r2 w2=r5 label=.Lreturn_25
- ldrd r4, r5, [r1], #8
- magic_compare_and_branch w1=r3 w2=r4 label=.Lreturn_34
- b 3b
+ .macro def_fn f p2align=0
+ .text
+ .p2align \p2align
+ .global \f
+ .type \f, %function
+\f:
+ .endm
- .macro miscmp_word offsetlo offsethi
- /* Macro to compare misaligned strings. */
- /* r0, r1 are word-aligned, and at least one of the strings
- is not double-word aligned. */
- /* Compare one word in every loop iteration. */
- /* OFFSETLO is the original bit-offset of r1 from a word-boundary,
- OFFSETHI is 32 - OFFSETLO (i.e., offset from the next word). */
+#if defined (__OPTIMIZE_SIZE__) || defined (PREFER_SIZE_OVER_SPEED) \
+ || (__ARM_ARCH_ISA_THUMB == 1 && !__ARM_ARCH_ISA_ARM)
- /* Initialize the shift queue. */
- ldr r5, [r1], #4
+# if defined (__thumb__) && !defined (__thumb2__)
+/* Thumb1 only variant. If size is preferred, use strcmp-armv4t.S.
+ If speed is preferred, the strcmp function in strcmp-armv6m.S
+ will be used. */
- /* Compare one word from each string in every loop iteration. */
- .p2align 2
-7:
- ldr r3, [r0], #4
- S2LOMEM r5, r5, #\offsetlo
- magic_find_zero_bytes w1=r3
- cmp r7, ip, S2HIMEM #\offsetlo
- and r2, r3, r6, S2LOMEM #\offsetlo
- it eq
- cmpeq r2, r5
- bne .Lreturn_25
- ldr r5, [r1], #4
- cmp ip, #0
- eor r3, r2, r3
- S2HIMEM r2, r5, #\offsethi
- it eq
- cmpeq r3, r2
- bne .Lreturn_32
- b 7b
- .endm /* miscmp_word */
+# if defined (__OPTIMIZE_SIZE__) || defined (PREFER_SIZE_OVER_SPEED)
+# include "strcmp-armv4t.S"
+# else
+# include "strcmp-armv6m.S"
+# endif
-.Lstrcmp_unaligned:
- /* r0 is word-aligned, r1 is at offset ip from a word. */
- /* Align r1 to the (previous) word-boundary. */
- bic r1, r1, #3
+# else
+# include "strcmp-arm-tiny.S"
+# endif
- /* Unaligned comparison word by word using LDRs. */
- cmp ip, #2
- beq .Lmiscmp_word_16 /* If ip == 2. */
- bge .Lmiscmp_word_24 /* If ip == 3. */
- miscmp_word offsetlo=8 offsethi=24 /* If ip == 1. */
-.Lmiscmp_word_16: miscmp_word offsetlo=16 offsethi=16
-.Lmiscmp_word_24: miscmp_word offsetlo=24 offsethi=8
+#elif __ARM_ARCH_ISA_THUMB == 2
+# ifdef __ARM_FEATURE_SIMD32
+# include "strcmp-armv7.S"
+# else
+# include "strcmp-armv7m.S"
+# endif
-.Lreturn_32:
- setup_return w1=r3, w2=r2
- b .Ldo_return
-.Lreturn_34:
- setup_return w1=r3, w2=r4
- b .Ldo_return
-.Lreturn_25:
- setup_return w1=r2, w2=r5
- b .Ldo_return
-.Lreturn_35:
- setup_return w1=r3, w2=r5
- b .Ldo_return
-.Lreturn_24:
- setup_return w1=r2, w2=r4
+#elif __ARM_ARCH >= 6
-.Ldo_return:
+# include "strcmp-armv6.S"
-#ifdef __ARMEB__
- mov r0, ip
-#else /* not __ARMEB__ */
- rev r0, ip
-#endif /* not __ARMEB__ */
-
- /* Restore temporaries early, before computing the return value. */
- ldrd r6, r7, [sp]
- ldrd r4, r5, [sp, #8]
- adds sp, sp, #16
-
- /* There is a zero or a different byte between r1 and r2. */
- /* r0 contains a mask of all-zero bytes in r1. */
- /* Using r0 and not ip here because cbz requires low register. */
- m_cbz reg=r0, label=.Lcompute_return_value
- clz r0, r0
- /* r0 contains the number of bits on the left of the first all-zero byte in r1. */
- rsb r0, r0, #24
- /* Here, r0 contains the number of bits on the right of the first all-zero byte in r1. */
- lsr r1, r1, r0
- lsr r2, r2, r0
-
-.Lcompute_return_value:
- movs r0, #1
- cmp r1, r2
- /* The return value is computed as follows.
- If r1>r2 then (C==1 and Z==0) and LS doesn't hold and r0 is #1 at return.
- If r1<r2 then (C==0 and Z==0) and we execute SBC with carry_in=0,
- which means r0:=r0-r0-1 and r0 is #-1 at return.
- If r1=r2 then (C==1 and Z==1) and we execute SBC with carry_in=1,
- which means r0:=r0-r0 and r0 is #0 at return.
- (C==0 and Z==1) cannot happen because the carry bit is "not borrow". */
- it ls
- sbcls r0, r0, r0
- bx lr
-
-
-#else /* !(defined (_ISA_THUMB_2) || defined (_ISA_ARM_6)
- defined (__OPTIMIZE_SIZE__) || defined (PREFER_SIZE_OVER_SPEED) ||
- (defined (__thumb__) && !defined (__thumb2__))) */
-
- /* Use LDR whenever possible. */
-
-#ifdef __thumb2__
-#define magic1(REG) 0x01010101
-#define magic2(REG) 0x80808080
-#else
-#define magic1(REG) REG
-#define magic2(REG) REG, lsl #7
-#endif
-
- optpld r0
- optpld r1
- eor r2, r0, r1
- tst r2, #3
- /* Strings not at same byte offset from a word boundary. */
- bne .Lstrcmp_unaligned
- ands r2, r0, #3
- bic r0, r0, #3
- bic r1, r1, #3
- ldr ip, [r0], #4
- it eq
- ldreq r3, [r1], #4
- beq 1f
- /* Although s1 and s2 have identical initial alignment, they are
- not currently word aligned. Rather than comparing bytes,
- make sure that any bytes fetched from before the addressed
- bytes are forced to 0xff. Then they will always compare
- equal. */
- eor r2, r2, #3
- lsl r2, r2, #3
- mvn r3, MSB
- S2LOMEM r2, r3, r2
- ldr r3, [r1], #4
- orr ip, ip, r2
- orr r3, r3, r2
-1:
-#ifndef __thumb2__
- /* Load the 'magic' constant 0x01010101. */
- str r4, [sp, #-4]!
- mov r4, #1
- orr r4, r4, r4, lsl #8
- orr r4, r4, r4, lsl #16
-#endif
- .p2align 2
-4:
- optpld r0, #8
- optpld r1, #8
- sub r2, ip, magic1(r4)
- cmp ip, r3
- itttt eq
- /* check for any zero bytes in first word */
- biceq r2, r2, ip
- tsteq r2, magic2(r4)
- ldreq ip, [r0], #4
- ldreq r3, [r1], #4
- beq 4b
-2:
- /* There's a zero or a different byte in the word */
- S2HIMEM r0, ip, #24
- S2LOMEM ip, ip, #8
- cmp r0, #1
- it cs
- cmpcs r0, r3, S2HIMEM #24
- it eq
- S2LOMEMEQ r3, r3, #8
- beq 2b
- /* On a big-endian machine, r0 contains the desired byte in bits
- 0-7; on a little-endian machine they are in bits 24-31. In
- both cases the other bits in r0 are all zero. For r3 the
- interesting byte is at the other end of the word, but the
- other bits are not necessarily zero. We need a signed result
- representing the differnece in the unsigned bytes, so for the
- little-endian case we can't just shift the interesting bits
- up. */
-#ifdef __ARMEB__
- sub r0, r0, r3, lsr #24
-#else
- and r3, r3, #255
-#ifdef __thumb2__
- /* No RSB instruction in Thumb2 */
- lsr r0, r0, #24
- sub r0, r0, r3
-#else
- rsb r0, r3, r0, lsr #24
-#endif
-#endif
-#ifndef __thumb2__
- ldr r4, [sp], #4
-#endif
- RETURN
-
-
-.Lstrcmp_unaligned:
-
-#if 0
- /* The assembly code below is based on the following alogrithm. */
-#ifdef __ARMEB__
-#define RSHIFT <<
-#define LSHIFT >>
-#else
-#define RSHIFT >>
-#define LSHIFT <<
-#endif
-
-#define body(shift) \
- mask = 0xffffffffU RSHIFT shift; \
- w1 = *wp1++; \
- w2 = *wp2++; \
- do \
- { \
- t1 = w1 & mask; \
- if (__builtin_expect(t1 != w2 RSHIFT shift, 0)) \
- { \
- w2 RSHIFT= shift; \
- break; \
- } \
- if (__builtin_expect(((w1 - b1) & ~w1) & (b1 << 7), 0)) \
- { \
- /* See comment in assembler below re syndrome on big-endian */\
- if ((((w1 - b1) & ~w1) & (b1 << 7)) & mask) \
- w2 RSHIFT= shift; \
- else \
- { \
- w2 = *wp2; \
- t1 = w1 RSHIFT (32 - shift); \
- w2 = (w2 LSHIFT (32 - shift)) RSHIFT (32 - shift); \
- } \
- break; \
- } \
- w2 = *wp2++; \
- t1 ^= w1; \
- if (__builtin_expect(t1 != w2 LSHIFT (32 - shift), 0)) \
- { \
- t1 = w1 >> (32 - shift); \
- w2 = (w2 << (32 - shift)) RSHIFT (32 - shift); \
- break; \
- } \
- w1 = *wp1++; \
- } while (1)
-
- const unsigned* wp1;
- const unsigned* wp2;
- unsigned w1, w2;
- unsigned mask;
- unsigned shift;
- unsigned b1 = 0x01010101;
- char c1, c2;
- unsigned t1;
-
- while (((unsigned) s1) & 3)
- {
- c1 = *s1++;
- c2 = *s2++;
- if (c1 == 0 || c1 != c2)
- return c1 - (int)c2;
- }
- wp1 = (unsigned*) (((unsigned)s1) & ~3);
- wp2 = (unsigned*) (((unsigned)s2) & ~3);
- t1 = ((unsigned) s2) & 3;
- if (t1 == 1)
- {
- body(8);
- }
- else if (t1 == 2)
- {
- body(16);
- }
- else
- {
- body (24);
- }
-
- do
- {
-#ifdef __ARMEB__
- c1 = (char) t1 >> 24;
- c2 = (char) w2 >> 24;
-#else /* not __ARMEB__ */
- c1 = (char) t1;
- c2 = (char) w2;
-#endif /* not __ARMEB__ */
- t1 RSHIFT= 8;
- w2 RSHIFT= 8;
- } while (c1 != 0 && c1 == c2);
- return c1 - c2;
-#endif /* 0 */
-
-
- wp1 .req r0
- wp2 .req r1
- b1 .req r2
- w1 .req r4
- w2 .req r5
- t1 .req ip
- @ r3 is scratch
-
- /* First of all, compare bytes until wp1(sp1) is word-aligned. */
-1:
- tst wp1, #3
- beq 2f
- ldrb r2, [wp1], #1
- ldrb r3, [wp2], #1
- cmp r2, #1
- it cs
- cmpcs r2, r3
- beq 1b
- sub r0, r2, r3
- RETURN
-
-2:
- str r5, [sp, #-4]!
- str r4, [sp, #-4]!
- //stmfd sp!, {r4, r5}
- mov b1, #1
- orr b1, b1, b1, lsl #8
- orr b1, b1, b1, lsl #16
-
- and t1, wp2, #3
- bic wp2, wp2, #3
- ldr w1, [wp1], #4
- ldr w2, [wp2], #4
- cmp t1, #2
- beq 2f
- bhi 3f
-
- /* Critical inner Loop: Block with 3 bytes initial overlap */
- .p2align 2
-1:
- bic t1, w1, MSB
- cmp t1, w2, S2LOMEM #8
- sub r3, w1, b1
- bic r3, r3, w1
- bne 4f
- ands r3, r3, b1, lsl #7
- it eq
- ldreq w2, [wp2], #4
- bne 5f
- eor t1, t1, w1
- cmp t1, w2, S2HIMEM #24
- bne 6f
- ldr w1, [wp1], #4
- b 1b
-4:
- S2LOMEM w2, w2, #8
- b 8f
-
-5:
-#ifdef __ARMEB__
- /* The syndrome value may contain false ones if the string ends
- with the bytes 0x01 0x00 */
- tst w1, #0xff000000
- itt ne
- tstne w1, #0x00ff0000
- tstne w1, #0x0000ff00
- beq 7f
#else
- bics r3, r3, #0xff000000
- bne 7f
-#endif
- ldrb w2, [wp2]
- S2LOMEM t1, w1, #24
-#ifdef __ARMEB__
- lsl w2, w2, #24
-#endif
- b 8f
-
-6:
- S2LOMEM t1, w1, #24
- and w2, w2, LSB
- b 8f
- /* Critical inner Loop: Block with 2 bytes initial overlap */
- .p2align 2
-2:
- S2HIMEM t1, w1, #16
- sub r3, w1, b1
- S2LOMEM t1, t1, #16
- bic r3, r3, w1
- cmp t1, w2, S2LOMEM #16
- bne 4f
- ands r3, r3, b1, lsl #7
- it eq
- ldreq w2, [wp2], #4
- bne 5f
- eor t1, t1, w1
- cmp t1, w2, S2HIMEM #16
- bne 6f
- ldr w1, [wp1], #4
- b 2b
+# include "strcmp-armv4.S"
-5:
-#ifdef __ARMEB__
- /* The syndrome value may contain false ones if the string ends
- with the bytes 0x01 0x00 */
- tst w1, #0xff000000
- it ne
- tstne w1, #0x00ff0000
- beq 7f
-#else
- lsls r3, r3, #16
- bne 7f
-#endif
- ldrh w2, [wp2]
- S2LOMEM t1, w1, #16
-#ifdef __ARMEB__
- lsl w2, w2, #16
#endif
- b 8f
-
-6:
- S2HIMEM w2, w2, #16
- S2LOMEM t1, w1, #16
-4:
- S2LOMEM w2, w2, #16
- b 8f
-
- /* Critical inner Loop: Block with 1 byte initial overlap */
- .p2align 2
-3:
- and t1, w1, LSB
- cmp t1, w2, S2LOMEM #24
- sub r3, w1, b1
- bic r3, r3, w1
- bne 4f
- ands r3, r3, b1, lsl #7
- it eq
- ldreq w2, [wp2], #4
- bne 5f
- eor t1, t1, w1
- cmp t1, w2, S2HIMEM #8
- bne 6f
- ldr w1, [wp1], #4
- b 3b
-4:
- S2LOMEM w2, w2, #24
- b 8f
-5:
- /* The syndrome value may contain false ones if the string ends
- with the bytes 0x01 0x00 */
- tst w1, LSB
- beq 7f
- ldr w2, [wp2], #4
-6:
- S2LOMEM t1, w1, #8
- bic w2, w2, MSB
- b 8f
-7:
- mov r0, #0
- //ldmfd sp!, {r4, r5}
- ldr r4, [sp], #4
- ldr r5, [sp], #4
- RETURN
-8:
- and r2, t1, LSB
- and r0, w2, LSB
- cmp r0, #1
- it cs
- cmpcs r0, r2
- itt eq
- S2LOMEMEQ t1, t1, #8
- S2LOMEMEQ w2, w2, #8
- beq 8b
- sub r0, r2, r0
- //ldmfd sp!, {r4, r5}
- ldr r4, [sp], #4
- ldr r5, [sp], #4
- RETURN
-
-#endif /* !(defined (_ISA_THUMB_2) || defined (_ISA_ARM_6)
- defined (__OPTIMIZE_SIZE__) || defined (PREFER_SIZE_OVER_SPEED) ||
- (defined (__thumb__) && !defined (__thumb2__))) */
diff --git a/newlib/libc/machine/arm/strlen-armv7.S b/newlib/libc/machine/arm/strlen-armv7.S
index 1aa51c9fb..9dce6f2f7 100644
--- a/newlib/libc/machine/arm/strlen-armv7.S
+++ b/newlib/libc/machine/arm/strlen-armv7.S
@@ -29,17 +29,36 @@
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Assumes:
- ARMv6T2, AArch32
+ ARMv6T2 or ARMv7E-M, AArch32
*/
-#include "arm_asm.h"
+/* Copyright (c) 2015 ARM Ltd.
+ All rights reserved.
-/* NOTE: This ifdef MUST match the ones in arm/strlen.c
- We fallback to the one in arm/strlen.c for size optimised or
- for older architectures. */
-#if defined(_ISA_ARM_7) || defined(__ARM_ARCH_6T2__) && \
- !(defined (__OPTIMIZE_SIZE__) || defined (PREFER_SIZE_OVER_SPEED) || \
- (defined (__thumb__) && !defined (__thumb2__)))
+ 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 the Linaro 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
+ HOLDER 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 "arm_asm.h"
.macro def_fn f p2align=0
.text
@@ -58,6 +77,12 @@
#endif
/* This code requires Thumb. */
+#if __ARM_ARCH_PROFILE == 'M'
+ .arch armv7e-m
+#else
+ .arch armv6t2
+#endif
+ .eabi_attribute Tag_ARM_ISA_use, 0
.thumb
.syntax unified
@@ -153,5 +178,3 @@ def_fn strlen p2align=6
mov const_0, #0
b .Lstart_realigned
.size strlen, . - strlen
-
-#endif
diff --git a/newlib/libc/machine/arm/strlen.c b/newlib/libc/machine/arm/strlen-stub.c
index b8de22994..ea45a3789 100644
--- a/newlib/libc/machine/arm/strlen.c
+++ b/newlib/libc/machine/arm/strlen-stub.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2008 ARM Ltd
+ * Copyright (c) 2008-2015 ARM Ltd
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -31,37 +31,26 @@
#include <string.h>
#include <limits.h>
-#if defined (__OPTIMIZE_SIZE__) || defined (PREFER_SIZE_OVER_SPEED) || \
- (defined (__thumb__) && !defined (__thumb2__))
+#if defined __OPTIMIZE_SIZE__ || defined PREFER_SIZE_OVER_SPEED
+#if __ARM_ARCH_ISA_THUMB == 2
+/* Implemented in strlen.S. */
+
+#elif defined (__ARM_ARCH_ISA_THUMB)
+/* Implemented in strlen.S. */
-size_t
-strlen (const char* str)
-{
- int scratch;
-#if defined (__thumb__) && !defined (__thumb2__)
- size_t len;
- asm ("mov %0, #0\n"
- "1:\n\t"
- "ldrb %1, [%2, %0]\n\t"
- "add %0, %0, #1\n\t"
- "cmp %1, #0\n\t"
- "bne 1b"
- : "=&r" (len), "=&r" (scratch) : "r" (str) : "memory", "cc");
- return len - 1;
#else
- const char* end;
- asm ("1:\n\t"
- "ldrb %1, [%0], #1\n\t"
- "cmp %1, #0\n\t"
- "bne 1b"
- : "=&r" (end), "=&r" (scratch) : "0" (str) : "memory", "cc");
- return end - str - 1;
+#include "../../string/strlen.c"
+
#endif
-}
-#else
-#if !(defined(_ISA_ARM_7) || defined(__ARM_ARCH_6T2__))
+#else /* defined __OPTIMIZE_SIZE__ || defined PREFER_SIZE_OVER_SPEED */
+#if defined __thumb__ && ! defined __thumb2__
+#include "../../string/strlen.c"
+#elif __ARM_ARCH_ISA_THUMB >= 2 && defined __ARM_FEATURE_DSP
+ /* Implemented in strlen.S. */
+
+#else
size_t __attribute__((naked))
strlen (const char* str)
{
diff --git a/newlib/libc/machine/arm/strlen-thumb1-Os.S b/newlib/libc/machine/arm/strlen-thumb1-Os.S
new file mode 100644
index 000000000..4b504303a
--- /dev/null
+++ b/newlib/libc/machine/arm/strlen-thumb1-Os.S
@@ -0,0 +1,50 @@
+/* Copyright (c) 2015 ARM Ltd.
+ 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 the Linaro 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
+ HOLDER 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. */
+
+ .macro def_fn f p2align=0
+ .text
+ .p2align \p2align
+ .global \f
+ .type \f, %function
+\f:
+ .endm
+
+ .arch armv4t
+ .eabi_attribute Tag_also_compatible_with, "\006\013" /* ARMv6-M. */
+ .eabi_attribute Tag_ARM_ISA_use, 0
+ .thumb
+ .syntax unified
+
+def_fn strlen p2align=1
+ movs r3, #0
+1:
+ ldrb r2, [r0, r3]
+ adds r3, r3, #1
+ cmp r2, #0
+ bne 1b
+ subs r0, r3, #1
+ bx lr
+ .size strlen, . - strlen
diff --git a/newlib/libc/machine/arm/strlen-thumb2-Os.S b/newlib/libc/machine/arm/strlen-thumb2-Os.S
new file mode 100644
index 000000000..961f41a0a
--- /dev/null
+++ b/newlib/libc/machine/arm/strlen-thumb2-Os.S
@@ -0,0 +1,54 @@
+/* Copyright (c) 2015 ARM Ltd.
+ 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 the Linaro 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
+ HOLDER 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 "acle-compat.h"
+
+ .macro def_fn f p2align=0
+ .text
+ .p2align \p2align
+ .global \f
+ .type \f, %function
+\f:
+ .endm
+
+#if __ARM_ARCH_ISA_THUMB >= 2 && __ARM_ARCH >= 7
+ .arch armv7
+#else
+ .arch armv6t2
+#endif
+ .eabi_attribute Tag_ARM_ISA_use, 0
+ .thumb
+ .syntax unified
+
+def_fn strlen p2align=1
+ mov r3, r0
+1: ldrb.w r2, [r3], #1
+ cmp r2, #0
+ bne 1b
+ subs r0, r3, r0
+ subs r0, #1
+ bx lr
+ .size strlen, . - strlen
diff --git a/newlib/libc/machine/arm/strlen.S b/newlib/libc/machine/arm/strlen.S
new file mode 100644
index 000000000..0435fb2de
--- /dev/null
+++ b/newlib/libc/machine/arm/strlen.S
@@ -0,0 +1,51 @@
+/* Copyright (c) 2015 ARM Ltd.
+ 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 the Linaro 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
+ HOLDER 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 "acle-compat.h"
+
+#if defined __OPTIMIZE_SIZE__ || defined PREFER_SIZE_OVER_SPEED
+#if __ARM_ARCH_ISA_THUMB == 2
+#include "strlen-thumb2-Os.S"
+
+#elif defined (__ARM_ARCH_ISA_THUMB)
+#include "strlen-thumb1-Os.S"
+
+#else
+ /* Implemented in strlen-stub.c. */
+
+#endif
+
+#else /* defined __OPTIMIZE_SIZE__ || defined PREFER_SIZE_OVER_SPEED */
+#if defined __thumb__ && ! defined __thumb2__
+ /* Implemented in strlen-stub.c. */
+
+#elif __ARM_ARCH_ISA_THUMB >= 2 && defined __ARM_FEATURE_DSP
+#include "strlen-armv7.S"
+
+#else
+ /* Implemented in strlen-stub.c. */
+#endif
+#endif
diff --git a/newlib/libc/machine/bfin/configure b/newlib/libc/machine/bfin/configure
index 7f4d0d6df..bc041896f 100755
--- a/newlib/libc/machine/bfin/configure
+++ b/newlib/libc/machine/bfin/configure
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.68 for newlib 2.0.0.
+# Generated by GNU Autoconf 2.68 for newlib 2.4.0.
#
#
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
@@ -556,8 +556,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='newlib'
PACKAGE_TARNAME='newlib'
-PACKAGE_VERSION='2.0.0'
-PACKAGE_STRING='newlib 2.0.0'
+PACKAGE_VERSION='2.4.0'
+PACKAGE_STRING='newlib 2.4.0'
PACKAGE_BUGREPORT=''
PACKAGE_URL=''
@@ -1239,7 +1239,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures newlib 2.0.0 to adapt to many kinds of systems.
+\`configure' configures newlib 2.4.0 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1309,7 +1309,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of newlib 2.0.0:";;
+ short | recursive ) echo "Configuration of newlib 2.4.0:";;
esac
cat <<\_ACEOF
@@ -1400,7 +1400,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-newlib configure 2.0.0
+newlib configure 2.4.0
generated by GNU Autoconf 2.68
Copyright (C) 2010 Free Software Foundation, Inc.
@@ -1455,7 +1455,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by newlib $as_me 2.0.0, which was
+It was created by newlib $as_me 2.4.0, which was
generated by GNU Autoconf 2.68. Invocation command line was
$ $0 $@
@@ -2527,7 +2527,7 @@ fi
# Define the identity of the package.
PACKAGE='newlib'
- VERSION='2.0.0'
+ VERSION='2.4.0'
# Some tools Automake needs.
@@ -4007,7 +4007,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by newlib $as_me 2.0.0, which was
+This file was extended by newlib $as_me 2.4.0, which was
generated by GNU Autoconf 2.68. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -4064,7 +4064,7 @@ _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
-newlib config.status 2.0.0
+newlib config.status 2.4.0
configured by $0, generated by GNU Autoconf 2.68,
with options \\"\$ac_cs_config\\"
diff --git a/newlib/libc/machine/configure b/newlib/libc/machine/configure
index b0d242a24..769546a27 100755
--- a/newlib/libc/machine/configure
+++ b/newlib/libc/machine/configure
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.68 for newlib 2.0.0.
+# Generated by GNU Autoconf 2.68 for newlib 2.4.0.
#
#
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
@@ -567,8 +567,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='newlib'
PACKAGE_TARNAME='newlib'
-PACKAGE_VERSION='2.0.0'
-PACKAGE_STRING='newlib 2.0.0'
+PACKAGE_VERSION='2.4.0'
+PACKAGE_STRING='newlib 2.4.0'
PACKAGE_BUGREPORT=''
PACKAGE_URL=''
@@ -786,6 +786,7 @@ CPPFLAGS
CPP'
ac_subdirs_all='a29k
aarch64
+arc
arm
bfin
cr16
@@ -796,6 +797,7 @@ d30v
epiphany
fr30
frv
+ft32
h8300
h8500
hppa
@@ -819,6 +821,7 @@ mt
nds32
necv70
nios2
+or1k
powerpc
rl78
rx
@@ -829,6 +832,7 @@ tic4x
tic6x
tic80
v850
+visium
w65
x86_64
xc16x
@@ -1375,7 +1379,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures newlib 2.0.0 to adapt to many kinds of systems.
+\`configure' configures newlib 2.4.0 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1445,7 +1449,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of newlib 2.0.0:";;
+ short | recursive ) echo "Configuration of newlib 2.4.0:";;
esac
cat <<\_ACEOF
@@ -1556,7 +1560,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-newlib configure 2.0.0
+newlib configure 2.4.0
generated by GNU Autoconf 2.68
Copyright (C) 2010 Free Software Foundation, Inc.
@@ -1834,7 +1838,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by newlib $as_me 2.0.0, which was
+It was created by newlib $as_me 2.4.0, which was
generated by GNU Autoconf 2.68. Invocation command line was
$ $0 $@
@@ -2906,7 +2910,7 @@ fi
# Define the identity of the package.
PACKAGE='newlib'
- VERSION='2.0.0'
+ VERSION='2.4.0'
# Some tools Automake needs.
@@ -6967,7 +6971,7 @@ ia64-*-hpux*)
rm -rf conftest*
;;
-x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \
+x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \
s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
# Find out which ABI we are using.
echo 'int i;' > conftest.$ac_ext
@@ -6992,7 +6996,10 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
;;
esac
;;
- ppc64-*linux*|powerpc64-*linux*)
+ powerpc64le-*linux*)
+ LD="${LD-ld} -m elf32lppclinux"
+ ;;
+ powerpc64-*linux*)
LD="${LD-ld} -m elf32ppclinux"
;;
s390x-*linux*)
@@ -7011,7 +7018,10 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
x86_64-*linux*)
LD="${LD-ld} -m elf_x86_64"
;;
- ppc*-*linux*|powerpc*-*linux*)
+ powerpcle-*linux*)
+ LD="${LD-ld} -m elf64lppc"
+ ;;
+ powerpc-*linux*)
LD="${LD-ld} -m elf64ppc"
;;
s390*-*linux*|s390*-*tpf*)
@@ -7693,7 +7703,7 @@ $as_echo "$lt_cv_ld_force_load" >&6; }
case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
10.0,*86*-darwin8*|10.0,*-darwin[91]*)
_lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
- 10.[012]*)
+ 10.[012][,.]*)
_lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
10.*)
_lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
@@ -9262,7 +9272,7 @@ _LT_EOF
if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
&& test "$tmp_diet" = no
then
- tmp_addflag=
+ tmp_addflag=' $pic_flag'
tmp_sharedflag='-shared'
case $cc_basename,$host_cpu in
pgcc*) # Portland Group C compiler
@@ -9444,7 +9454,7 @@ _LT_EOF
if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
else
- export_symbols_cmds='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
+ export_symbols_cmds='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "L")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
fi
aix_use_runtimelinking=no
@@ -11472,7 +11482,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 11475 "configure"
+#line 11485 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -11578,7 +11588,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 11581 "configure"
+#line 11591 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -11825,6 +11835,8 @@ subdirs="$subdirs a29k"
;;
aarch64) subdirs="$subdirs aarch64"
;;
+ arc) subdirs="$subdirs arc"
+ ;;
arm) subdirs="$subdirs arm"
;;
bfin) subdirs="$subdirs bfin"
@@ -11845,6 +11857,8 @@ subdirs="$subdirs a29k"
;;
frv) subdirs="$subdirs frv"
;;
+ ft32) subdirs="$subdirs ft32"
+ ;;
h8300) subdirs="$subdirs h8300"
;;
h8500) subdirs="$subdirs h8500"
@@ -11891,6 +11905,8 @@ subdirs="$subdirs a29k"
;;
nios2) subdirs="$subdirs nios2"
;;
+ or1k) subdirs="$subdirs or1k"
+ ;;
powerpc) subdirs="$subdirs powerpc"
;;
rl78) subdirs="$subdirs rl78"
@@ -11911,6 +11927,8 @@ subdirs="$subdirs a29k"
;;
v850) subdirs="$subdirs v850"
;;
+ visium) subdirs="$subdirs visium"
+ ;;
w65) subdirs="$subdirs w65"
;;
x86_64) subdirs="$subdirs x86_64"
@@ -12545,7 +12563,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by newlib $as_me 2.0.0, which was
+This file was extended by newlib $as_me 2.4.0, which was
generated by GNU Autoconf 2.68. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -12602,7 +12620,7 @@ _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
-newlib config.status 2.0.0
+newlib config.status 2.4.0
configured by $0, generated by GNU Autoconf 2.68,
with options \\"\$ac_cs_config\\"
diff --git a/newlib/libc/machine/configure.in b/newlib/libc/machine/configure.in
index 641811aea..25dedbaf5 100644
--- a/newlib/libc/machine/configure.in
+++ b/newlib/libc/machine/configure.in
@@ -25,6 +25,7 @@ if test -n "${machine_dir}"; then
case ${machine_dir} in
a29k) AC_CONFIG_SUBDIRS(a29k) ;;
aarch64) AC_CONFIG_SUBDIRS(aarch64) ;;
+ arc) AC_CONFIG_SUBDIRS(arc) ;;
arm) AC_CONFIG_SUBDIRS(arm) ;;
bfin) AC_CONFIG_SUBDIRS(bfin) ;;
cr16) AC_CONFIG_SUBDIRS(cr16) ;;
@@ -35,6 +36,7 @@ if test -n "${machine_dir}"; then
epiphany) AC_CONFIG_SUBDIRS(epiphany) ;;
fr30) AC_CONFIG_SUBDIRS(fr30) ;;
frv) AC_CONFIG_SUBDIRS(frv) ;;
+ ft32) AC_CONFIG_SUBDIRS(ft32) ;;
h8300) AC_CONFIG_SUBDIRS(h8300) ;;
h8500) AC_CONFIG_SUBDIRS(h8500) ;;
hppa) AC_CONFIG_SUBDIRS(hppa) ;;
@@ -58,6 +60,7 @@ if test -n "${machine_dir}"; then
nds32) AC_CONFIG_SUBDIRS(nds32) ;;
necv70) AC_CONFIG_SUBDIRS(necv70) ;;
nios2) AC_CONFIG_SUBDIRS(nios2) ;;
+ or1k) AC_CONFIG_SUBDIRS(or1k) ;;
powerpc) AC_CONFIG_SUBDIRS(powerpc) ;;
rl78) AC_CONFIG_SUBDIRS(rl78) ;;
rx) AC_CONFIG_SUBDIRS(rx) ;;
@@ -68,6 +71,7 @@ if test -n "${machine_dir}"; then
tic6x) AC_CONFIG_SUBDIRS(tic6x) ;;
tic80) AC_CONFIG_SUBDIRS(tic80) ;;
v850) AC_CONFIG_SUBDIRS(v850) ;;
+ visium) AC_CONFIG_SUBDIRS(visium) ;;
w65) AC_CONFIG_SUBDIRS(w65) ;;
x86_64) AC_CONFIG_SUBDIRS(x86_64) ;;
xc16x) AC_CONFIG_SUBDIRS(xc16x) ;;
diff --git a/newlib/libc/machine/cr16/configure b/newlib/libc/machine/cr16/configure
index 7f4d0d6df..bc041896f 100644
--- a/newlib/libc/machine/cr16/configure
+++ b/newlib/libc/machine/cr16/configure
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.68 for newlib 2.0.0.
+# Generated by GNU Autoconf 2.68 for newlib 2.4.0.
#
#
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
@@ -556,8 +556,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='newlib'
PACKAGE_TARNAME='newlib'
-PACKAGE_VERSION='2.0.0'
-PACKAGE_STRING='newlib 2.0.0'
+PACKAGE_VERSION='2.4.0'
+PACKAGE_STRING='newlib 2.4.0'
PACKAGE_BUGREPORT=''
PACKAGE_URL=''
@@ -1239,7 +1239,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures newlib 2.0.0 to adapt to many kinds of systems.
+\`configure' configures newlib 2.4.0 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1309,7 +1309,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of newlib 2.0.0:";;
+ short | recursive ) echo "Configuration of newlib 2.4.0:";;
esac
cat <<\_ACEOF
@@ -1400,7 +1400,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-newlib configure 2.0.0
+newlib configure 2.4.0
generated by GNU Autoconf 2.68
Copyright (C) 2010 Free Software Foundation, Inc.
@@ -1455,7 +1455,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by newlib $as_me 2.0.0, which was
+It was created by newlib $as_me 2.4.0, which was
generated by GNU Autoconf 2.68. Invocation command line was
$ $0 $@
@@ -2527,7 +2527,7 @@ fi
# Define the identity of the package.
PACKAGE='newlib'
- VERSION='2.0.0'
+ VERSION='2.4.0'
# Some tools Automake needs.
@@ -4007,7 +4007,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by newlib $as_me 2.0.0, which was
+This file was extended by newlib $as_me 2.4.0, which was
generated by GNU Autoconf 2.68. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -4064,7 +4064,7 @@ _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
-newlib config.status 2.0.0
+newlib config.status 2.4.0
configured by $0, generated by GNU Autoconf 2.68,
with options \\"\$ac_cs_config\\"
diff --git a/newlib/libc/machine/cris/configure b/newlib/libc/machine/cris/configure
index 0ff88d3d0..2e75beb2f 100755
--- a/newlib/libc/machine/cris/configure
+++ b/newlib/libc/machine/cris/configure
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.68 for newlib 2.0.0.
+# Generated by GNU Autoconf 2.68 for newlib 2.4.0.
#
#
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
@@ -556,8 +556,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='newlib'
PACKAGE_TARNAME='newlib'
-PACKAGE_VERSION='2.0.0'
-PACKAGE_STRING='newlib 2.0.0'
+PACKAGE_VERSION='2.4.0'
+PACKAGE_STRING='newlib 2.4.0'
PACKAGE_BUGREPORT=''
PACKAGE_URL=''
@@ -1239,7 +1239,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures newlib 2.0.0 to adapt to many kinds of systems.
+\`configure' configures newlib 2.4.0 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1309,7 +1309,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of newlib 2.0.0:";;
+ short | recursive ) echo "Configuration of newlib 2.4.0:";;
esac
cat <<\_ACEOF
@@ -1400,7 +1400,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-newlib configure 2.0.0
+newlib configure 2.4.0
generated by GNU Autoconf 2.68
Copyright (C) 2010 Free Software Foundation, Inc.
@@ -1455,7 +1455,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by newlib $as_me 2.0.0, which was
+It was created by newlib $as_me 2.4.0, which was
generated by GNU Autoconf 2.68. Invocation command line was
$ $0 $@
@@ -2527,7 +2527,7 @@ fi
# Define the identity of the package.
PACKAGE='newlib'
- VERSION='2.0.0'
+ VERSION='2.4.0'
# Some tools Automake needs.
@@ -4007,7 +4007,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by newlib $as_me 2.0.0, which was
+This file was extended by newlib $as_me 2.4.0, which was
generated by GNU Autoconf 2.68. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -4064,7 +4064,7 @@ _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
-newlib config.status 2.0.0
+newlib config.status 2.4.0
configured by $0, generated by GNU Autoconf 2.68,
with options \\"\$ac_cs_config\\"
diff --git a/newlib/libc/machine/cris/sys/signal.h b/newlib/libc/machine/cris/sys/signal.h
index 081a75fe9..9cb7ba530 100644
--- a/newlib/libc/machine/cris/sys/signal.h
+++ b/newlib/libc/machine/cris/sys/signal.h
@@ -44,6 +44,10 @@ struct sigaction {
int sigprocmask (int __how, const sigset_t *__a, sigset_t *__b);
+/* The first argument is really a pid_t, but that's just a typedef'd
+ int, so let's avoid requiring sys/types only for this declaration. */
+int kill (int, int);
+
#define SIGHUP 1
#define SIGINT 2
#define SIGQUIT 3
diff --git a/newlib/libc/machine/crx/configure b/newlib/libc/machine/crx/configure
index 7f4d0d6df..bc041896f 100755
--- a/newlib/libc/machine/crx/configure
+++ b/newlib/libc/machine/crx/configure
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.68 for newlib 2.0.0.
+# Generated by GNU Autoconf 2.68 for newlib 2.4.0.
#
#
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
@@ -556,8 +556,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='newlib'
PACKAGE_TARNAME='newlib'
-PACKAGE_VERSION='2.0.0'
-PACKAGE_STRING='newlib 2.0.0'
+PACKAGE_VERSION='2.4.0'
+PACKAGE_STRING='newlib 2.4.0'
PACKAGE_BUGREPORT=''
PACKAGE_URL=''
@@ -1239,7 +1239,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures newlib 2.0.0 to adapt to many kinds of systems.
+\`configure' configures newlib 2.4.0 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1309,7 +1309,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of newlib 2.0.0:";;
+ short | recursive ) echo "Configuration of newlib 2.4.0:";;
esac
cat <<\_ACEOF
@@ -1400,7 +1400,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-newlib configure 2.0.0
+newlib configure 2.4.0
generated by GNU Autoconf 2.68
Copyright (C) 2010 Free Software Foundation, Inc.
@@ -1455,7 +1455,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by newlib $as_me 2.0.0, which was
+It was created by newlib $as_me 2.4.0, which was
generated by GNU Autoconf 2.68. Invocation command line was
$ $0 $@
@@ -2527,7 +2527,7 @@ fi
# Define the identity of the package.
PACKAGE='newlib'
- VERSION='2.0.0'
+ VERSION='2.4.0'
# Some tools Automake needs.
@@ -4007,7 +4007,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by newlib $as_me 2.0.0, which was
+This file was extended by newlib $as_me 2.4.0, which was
generated by GNU Autoconf 2.68. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -4064,7 +4064,7 @@ _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
-newlib config.status 2.0.0
+newlib config.status 2.4.0
configured by $0, generated by GNU Autoconf 2.68,
with options \\"\$ac_cs_config\\"
diff --git a/newlib/libc/machine/d10v/configure b/newlib/libc/machine/d10v/configure
index d96b7718a..ca07e566c 100755
--- a/newlib/libc/machine/d10v/configure
+++ b/newlib/libc/machine/d10v/configure
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.68 for newlib 2.0.0.
+# Generated by GNU Autoconf 2.68 for newlib 2.4.0.
#
#
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
@@ -556,8 +556,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='newlib'
PACKAGE_TARNAME='newlib'
-PACKAGE_VERSION='2.0.0'
-PACKAGE_STRING='newlib 2.0.0'
+PACKAGE_VERSION='2.4.0'
+PACKAGE_STRING='newlib 2.4.0'
PACKAGE_BUGREPORT=''
PACKAGE_URL=''
@@ -1239,7 +1239,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures newlib 2.0.0 to adapt to many kinds of systems.
+\`configure' configures newlib 2.4.0 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1309,7 +1309,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of newlib 2.0.0:";;
+ short | recursive ) echo "Configuration of newlib 2.4.0:";;
esac
cat <<\_ACEOF
@@ -1400,7 +1400,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-newlib configure 2.0.0
+newlib configure 2.4.0
generated by GNU Autoconf 2.68
Copyright (C) 2010 Free Software Foundation, Inc.
@@ -1455,7 +1455,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by newlib $as_me 2.0.0, which was
+It was created by newlib $as_me 2.4.0, which was
generated by GNU Autoconf 2.68. Invocation command line was
$ $0 $@
@@ -2527,7 +2527,7 @@ fi
# Define the identity of the package.
PACKAGE='newlib'
- VERSION='2.0.0'
+ VERSION='2.4.0'
# Some tools Automake needs.
@@ -4007,7 +4007,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by newlib $as_me 2.0.0, which was
+This file was extended by newlib $as_me 2.4.0, which was
generated by GNU Autoconf 2.68. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -4064,7 +4064,7 @@ _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
-newlib config.status 2.0.0
+newlib config.status 2.4.0
configured by $0, generated by GNU Autoconf 2.68,
with options \\"\$ac_cs_config\\"
diff --git a/newlib/libc/machine/d30v/configure b/newlib/libc/machine/d30v/configure
index d96b7718a..ca07e566c 100755
--- a/newlib/libc/machine/d30v/configure
+++ b/newlib/libc/machine/d30v/configure
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.68 for newlib 2.0.0.
+# Generated by GNU Autoconf 2.68 for newlib 2.4.0.
#
#
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
@@ -556,8 +556,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='newlib'
PACKAGE_TARNAME='newlib'
-PACKAGE_VERSION='2.0.0'
-PACKAGE_STRING='newlib 2.0.0'
+PACKAGE_VERSION='2.4.0'
+PACKAGE_STRING='newlib 2.4.0'
PACKAGE_BUGREPORT=''
PACKAGE_URL=''
@@ -1239,7 +1239,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures newlib 2.0.0 to adapt to many kinds of systems.
+\`configure' configures newlib 2.4.0 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1309,7 +1309,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of newlib 2.0.0:";;
+ short | recursive ) echo "Configuration of newlib 2.4.0:";;
esac
cat <<\_ACEOF
@@ -1400,7 +1400,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-newlib configure 2.0.0
+newlib configure 2.4.0
generated by GNU Autoconf 2.68
Copyright (C) 2010 Free Software Foundation, Inc.
@@ -1455,7 +1455,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by newlib $as_me 2.0.0, which was
+It was created by newlib $as_me 2.4.0, which was
generated by GNU Autoconf 2.68. Invocation command line was
$ $0 $@
@@ -2527,7 +2527,7 @@ fi
# Define the identity of the package.
PACKAGE='newlib'
- VERSION='2.0.0'
+ VERSION='2.4.0'
# Some tools Automake needs.
@@ -4007,7 +4007,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by newlib $as_me 2.0.0, which was
+This file was extended by newlib $as_me 2.4.0, which was
generated by GNU Autoconf 2.68. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -4064,7 +4064,7 @@ _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
-newlib config.status 2.0.0
+newlib config.status 2.4.0
configured by $0, generated by GNU Autoconf 2.68,
with options \\"\$ac_cs_config\\"
diff --git a/newlib/libc/machine/epiphany/configure b/newlib/libc/machine/epiphany/configure
index 7f4d0d6df..bc041896f 100755
--- a/newlib/libc/machine/epiphany/configure
+++ b/newlib/libc/machine/epiphany/configure
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.68 for newlib 2.0.0.
+# Generated by GNU Autoconf 2.68 for newlib 2.4.0.
#
#
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
@@ -556,8 +556,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='newlib'
PACKAGE_TARNAME='newlib'
-PACKAGE_VERSION='2.0.0'
-PACKAGE_STRING='newlib 2.0.0'
+PACKAGE_VERSION='2.4.0'
+PACKAGE_STRING='newlib 2.4.0'
PACKAGE_BUGREPORT=''
PACKAGE_URL=''
@@ -1239,7 +1239,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures newlib 2.0.0 to adapt to many kinds of systems.
+\`configure' configures newlib 2.4.0 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1309,7 +1309,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of newlib 2.0.0:";;
+ short | recursive ) echo "Configuration of newlib 2.4.0:";;
esac
cat <<\_ACEOF
@@ -1400,7 +1400,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-newlib configure 2.0.0
+newlib configure 2.4.0
generated by GNU Autoconf 2.68
Copyright (C) 2010 Free Software Foundation, Inc.
@@ -1455,7 +1455,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by newlib $as_me 2.0.0, which was
+It was created by newlib $as_me 2.4.0, which was
generated by GNU Autoconf 2.68. Invocation command line was
$ $0 $@
@@ -2527,7 +2527,7 @@ fi
# Define the identity of the package.
PACKAGE='newlib'
- VERSION='2.0.0'
+ VERSION='2.4.0'
# Some tools Automake needs.
@@ -4007,7 +4007,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by newlib $as_me 2.0.0, which was
+This file was extended by newlib $as_me 2.4.0, which was
generated by GNU Autoconf 2.68. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -4064,7 +4064,7 @@ _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
-newlib config.status 2.0.0
+newlib config.status 2.4.0
configured by $0, generated by GNU Autoconf 2.68,
with options \\"\$ac_cs_config\\"
diff --git a/newlib/libc/machine/epiphany/machine/stdlib.h b/newlib/libc/machine/epiphany/machine/stdlib.h
deleted file mode 100644
index 95b4063b0..000000000
--- a/newlib/libc/machine/epiphany/machine/stdlib.h
+++ /dev/null
@@ -1,15 +0,0 @@
-static __inline__ long int
-random (void)
-{
- extern int rand(void);
-
- return rand ();
-}
-
-static __inline__ void
-srandom (unsigned int seed)
-{
- void srand(unsigned int seed);
-
- srand (seed);
-}
diff --git a/newlib/libc/machine/fr30/configure b/newlib/libc/machine/fr30/configure
index 7f4d0d6df..bc041896f 100755
--- a/newlib/libc/machine/fr30/configure
+++ b/newlib/libc/machine/fr30/configure
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.68 for newlib 2.0.0.
+# Generated by GNU Autoconf 2.68 for newlib 2.4.0.
#
#
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
@@ -556,8 +556,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='newlib'
PACKAGE_TARNAME='newlib'
-PACKAGE_VERSION='2.0.0'
-PACKAGE_STRING='newlib 2.0.0'
+PACKAGE_VERSION='2.4.0'
+PACKAGE_STRING='newlib 2.4.0'
PACKAGE_BUGREPORT=''
PACKAGE_URL=''
@@ -1239,7 +1239,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures newlib 2.0.0 to adapt to many kinds of systems.
+\`configure' configures newlib 2.4.0 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1309,7 +1309,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of newlib 2.0.0:";;
+ short | recursive ) echo "Configuration of newlib 2.4.0:";;
esac
cat <<\_ACEOF
@@ -1400,7 +1400,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-newlib configure 2.0.0
+newlib configure 2.4.0
generated by GNU Autoconf 2.68
Copyright (C) 2010 Free Software Foundation, Inc.
@@ -1455,7 +1455,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by newlib $as_me 2.0.0, which was
+It was created by newlib $as_me 2.4.0, which was
generated by GNU Autoconf 2.68. Invocation command line was
$ $0 $@
@@ -2527,7 +2527,7 @@ fi
# Define the identity of the package.
PACKAGE='newlib'
- VERSION='2.0.0'
+ VERSION='2.4.0'
# Some tools Automake needs.
@@ -4007,7 +4007,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by newlib $as_me 2.0.0, which was
+This file was extended by newlib $as_me 2.4.0, which was
generated by GNU Autoconf 2.68. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -4064,7 +4064,7 @@ _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
-newlib config.status 2.0.0
+newlib config.status 2.4.0
configured by $0, generated by GNU Autoconf 2.68,
with options \\"\$ac_cs_config\\"
diff --git a/newlib/libc/machine/frv/configure b/newlib/libc/machine/frv/configure
index 7f4d0d6df..bc041896f 100755
--- a/newlib/libc/machine/frv/configure
+++ b/newlib/libc/machine/frv/configure
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.68 for newlib 2.0.0.
+# Generated by GNU Autoconf 2.68 for newlib 2.4.0.
#
#
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
@@ -556,8 +556,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='newlib'
PACKAGE_TARNAME='newlib'
-PACKAGE_VERSION='2.0.0'
-PACKAGE_STRING='newlib 2.0.0'
+PACKAGE_VERSION='2.4.0'
+PACKAGE_STRING='newlib 2.4.0'
PACKAGE_BUGREPORT=''
PACKAGE_URL=''
@@ -1239,7 +1239,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures newlib 2.0.0 to adapt to many kinds of systems.
+\`configure' configures newlib 2.4.0 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1309,7 +1309,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of newlib 2.0.0:";;
+ short | recursive ) echo "Configuration of newlib 2.4.0:";;
esac
cat <<\_ACEOF
@@ -1400,7 +1400,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-newlib configure 2.0.0
+newlib configure 2.4.0
generated by GNU Autoconf 2.68
Copyright (C) 2010 Free Software Foundation, Inc.
@@ -1455,7 +1455,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by newlib $as_me 2.0.0, which was
+It was created by newlib $as_me 2.4.0, which was
generated by GNU Autoconf 2.68. Invocation command line was
$ $0 $@
@@ -2527,7 +2527,7 @@ fi
# Define the identity of the package.
PACKAGE='newlib'
- VERSION='2.0.0'
+ VERSION='2.4.0'
# Some tools Automake needs.
@@ -4007,7 +4007,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by newlib $as_me 2.0.0, which was
+This file was extended by newlib $as_me 2.4.0, which was
generated by GNU Autoconf 2.68. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -4064,7 +4064,7 @@ _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
-newlib config.status 2.0.0
+newlib config.status 2.4.0
configured by $0, generated by GNU Autoconf 2.68,
with options \\"\$ac_cs_config\\"
diff --git a/newlib/libc/machine/ft32/Makefile.am b/newlib/libc/machine/ft32/Makefile.am
new file mode 100644
index 000000000..4aa79b0d0
--- /dev/null
+++ b/newlib/libc/machine/ft32/Makefile.am
@@ -0,0 +1,16 @@
+## Process this file with automake to generate Makefile.in
+
+AUTOMAKE_OPTIONS = cygnus
+
+INCLUDES = $(NEWLIB_CFLAGS) $(CROSS_CFLAGS) $(TARGET_CFLAGS)
+
+AM_CCASFLAGS = $(INCLUDES)
+
+noinst_LIBRARIES = lib.a
+
+lib_a_SOURCES = setjmp.S strlen.S memcpy.S strcmp.S memset.S strcpy.S
+lib_a_CCASFLAGS=$(AM_CCASFLAGS)
+lib_a_CFLAGS=$(AM_CFLAGS)
+
+ACLOCAL_AMFLAGS = -I ../../.. -I ../../../..
+CONFIG_STATUS_DEPENDENCIES = $(newlib_basedir)/configure.host
diff --git a/newlib/libc/machine/ft32/Makefile.in b/newlib/libc/machine/ft32/Makefile.in
new file mode 100644
index 000000000..9d2c1f0da
--- /dev/null
+++ b/newlib/libc/machine/ft32/Makefile.in
@@ -0,0 +1,472 @@
+# Makefile.in generated by automake 1.11.6 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 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@
+
+VPATH = @srcdir@
+am__make_dryrun = \
+ { \
+ am__dry=no; \
+ case $$MAKEFLAGS in \
+ *\\[\ \ ]*) \
+ echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \
+ | grep '^AM OK$$' >/dev/null || am__dry=yes;; \
+ *) \
+ for am__flg in $$MAKEFLAGS; do \
+ case $$am__flg in \
+ *=*|--*) ;; \
+ *n*) am__dry=yes; break;; \
+ esac; \
+ done;; \
+ esac; \
+ test $$am__dry = yes; \
+ }
+pkgdatadir = $(datadir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+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@
+subdir = .
+DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
+ $(top_srcdir)/configure $(am__configure_deps) \
+ $(srcdir)/../../../../mkinstalldirs
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/../../../acinclude.m4 \
+ $(top_srcdir)/configure.in
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+ $(ACLOCAL_M4)
+am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
+ configure.lineno config.status.lineno
+mkinstalldirs = $(SHELL) $(top_srcdir)/../../../../mkinstalldirs
+CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+LIBRARIES = $(noinst_LIBRARIES)
+ARFLAGS = cru
+lib_a_AR = $(AR) $(ARFLAGS)
+lib_a_LIBADD =
+am_lib_a_OBJECTS = lib_a-setjmp.$(OBJEXT) lib_a-strlen.$(OBJEXT) \
+ lib_a-memcpy.$(OBJEXT) lib_a-strcmp.$(OBJEXT) \
+ lib_a-memset.$(OBJEXT) lib_a-strcpy.$(OBJEXT)
+lib_a_OBJECTS = $(am_lib_a_OBJECTS)
+DEFAULT_INCLUDES = -I.@am__isrc@
+depcomp =
+am__depfiles_maybe =
+CPPASCOMPILE = $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CCASFLAGS) $(CCASFLAGS)
+COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+CCLD = $(CC)
+LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
+SOURCES = $(lib_a_SOURCES)
+am__can_run_installinfo = \
+ case $$AM_UPDATE_INFO_DIR in \
+ n|no|NO) false;; \
+ *) (install-info --version) >/dev/null 2>&1;; \
+ esac
+ETAGS = etags
+CTAGS = ctags
+ACLOCAL = @ACLOCAL@
+AMTAR = @AMTAR@
+AR = @AR@
+AS = @AS@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CC = @CC@
+CCAS = @CCAS@
+CCASFLAGS = @CCASFLAGS@
+CCDEPMODE = @CCDEPMODE@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LDFLAGS = @LDFLAGS@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LTLIBOBJS = @LTLIBOBJS@
+MAINT = @MAINT@
+MAKEINFO = @MAKEINFO@
+MKDIR_P = @MKDIR_P@
+NEWLIB_CFLAGS = @NEWLIB_CFLAGS@
+NO_INCLUDE_LIST = @NO_INCLUDE_LIST@
+OBJEXT = @OBJEXT@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+RANLIB = @RANLIB@
+READELF = @READELF@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+VERSION = @VERSION@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+aext = @aext@
+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@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+libm_machine_dir = @libm_machine_dir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+lpfx = @lpfx@
+machine_dir = @machine_dir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+newlib_basedir = @newlib_basedir@
+oext = @oext@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sys_dir = @sys_dir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+AUTOMAKE_OPTIONS = cygnus
+INCLUDES = $(NEWLIB_CFLAGS) $(CROSS_CFLAGS) $(TARGET_CFLAGS)
+AM_CCASFLAGS = $(INCLUDES)
+noinst_LIBRARIES = lib.a
+lib_a_SOURCES = setjmp.S strlen.S memcpy.S strcmp.S memset.S strcpy.S
+lib_a_CCASFLAGS = $(AM_CCASFLAGS)
+lib_a_CFLAGS = $(AM_CFLAGS)
+ACLOCAL_AMFLAGS = -I ../../.. -I ../../../..
+CONFIG_STATUS_DEPENDENCIES = $(newlib_basedir)/configure.host
+all: all-am
+
+.SUFFIXES:
+.SUFFIXES: .S .o .obj
+am--refresh: Makefile
+ @:
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
+ @for dep in $?; do \
+ case '$(am__configure_deps)' in \
+ *$$dep*) \
+ echo ' cd $(srcdir) && $(AUTOMAKE) --cygnus'; \
+ $(am__cd) $(srcdir) && $(AUTOMAKE) --cygnus \
+ && exit 0; \
+ exit 1;; \
+ esac; \
+ done; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --cygnus Makefile'; \
+ $(am__cd) $(top_srcdir) && \
+ $(AUTOMAKE) --cygnus Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ @case '$?' in \
+ *config.status*) \
+ echo ' $(SHELL) ./config.status'; \
+ $(SHELL) ./config.status;; \
+ *) \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \
+ esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+ $(SHELL) ./config.status --recheck
+
+$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
+ $(am__cd) $(srcdir) && $(AUTOCONF)
+$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
+ $(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
+$(am__aclocal_m4_deps):
+
+clean-noinstLIBRARIES:
+ -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES)
+lib.a: $(lib_a_OBJECTS) $(lib_a_DEPENDENCIES) $(EXTRA_lib_a_DEPENDENCIES)
+ -rm -f lib.a
+ $(lib_a_AR) lib.a $(lib_a_OBJECTS) $(lib_a_LIBADD)
+ $(RANLIB) lib.a
+
+mostlyclean-compile:
+ -rm -f *.$(OBJEXT)
+
+distclean-compile:
+ -rm -f *.tab.c
+
+.S.o:
+ $(CPPASCOMPILE) -c -o $@ $<
+
+.S.obj:
+ $(CPPASCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
+
+lib_a-setjmp.o: setjmp.S
+ $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CCASFLAGS) $(CCASFLAGS) -c -o lib_a-setjmp.o `test -f 'setjmp.S' || echo '$(srcdir)/'`setjmp.S
+
+lib_a-setjmp.obj: setjmp.S
+ $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CCASFLAGS) $(CCASFLAGS) -c -o lib_a-setjmp.obj `if test -f 'setjmp.S'; then $(CYGPATH_W) 'setjmp.S'; else $(CYGPATH_W) '$(srcdir)/setjmp.S'; fi`
+
+lib_a-strlen.o: strlen.S
+ $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CCASFLAGS) $(CCASFLAGS) -c -o lib_a-strlen.o `test -f 'strlen.S' || echo '$(srcdir)/'`strlen.S
+
+lib_a-strlen.obj: strlen.S
+ $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CCASFLAGS) $(CCASFLAGS) -c -o lib_a-strlen.obj `if test -f 'strlen.S'; then $(CYGPATH_W) 'strlen.S'; else $(CYGPATH_W) '$(srcdir)/strlen.S'; fi`
+
+lib_a-memcpy.o: memcpy.S
+ $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CCASFLAGS) $(CCASFLAGS) -c -o lib_a-memcpy.o `test -f 'memcpy.S' || echo '$(srcdir)/'`memcpy.S
+
+lib_a-memcpy.obj: memcpy.S
+ $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CCASFLAGS) $(CCASFLAGS) -c -o lib_a-memcpy.obj `if test -f 'memcpy.S'; then $(CYGPATH_W) 'memcpy.S'; else $(CYGPATH_W) '$(srcdir)/memcpy.S'; fi`
+
+lib_a-strcmp.o: strcmp.S
+ $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CCASFLAGS) $(CCASFLAGS) -c -o lib_a-strcmp.o `test -f 'strcmp.S' || echo '$(srcdir)/'`strcmp.S
+
+lib_a-strcmp.obj: strcmp.S
+ $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CCASFLAGS) $(CCASFLAGS) -c -o lib_a-strcmp.obj `if test -f 'strcmp.S'; then $(CYGPATH_W) 'strcmp.S'; else $(CYGPATH_W) '$(srcdir)/strcmp.S'; fi`
+
+lib_a-memset.o: memset.S
+ $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CCASFLAGS) $(CCASFLAGS) -c -o lib_a-memset.o `test -f 'memset.S' || echo '$(srcdir)/'`memset.S
+
+lib_a-memset.obj: memset.S
+ $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CCASFLAGS) $(CCASFLAGS) -c -o lib_a-memset.obj `if test -f 'memset.S'; then $(CYGPATH_W) 'memset.S'; else $(CYGPATH_W) '$(srcdir)/memset.S'; fi`
+
+lib_a-strcpy.o: strcpy.S
+ $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CCASFLAGS) $(CCASFLAGS) -c -o lib_a-strcpy.o `test -f 'strcpy.S' || echo '$(srcdir)/'`strcpy.S
+
+lib_a-strcpy.obj: strcpy.S
+ $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CCASFLAGS) $(CCASFLAGS) -c -o lib_a-strcpy.obj `if test -f 'strcpy.S'; then $(CYGPATH_W) 'strcpy.S'; else $(CYGPATH_W) '$(srcdir)/strcpy.S'; fi`
+
+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; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ mkid -fID $$unique
+tags: TAGS
+
+TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ set x; \
+ 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; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ shift; \
+ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
+ test -n "$$unique" || unique=$$empty_fix; \
+ if test $$# -gt 0; then \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ "$$@" $$unique; \
+ else \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ $$unique; \
+ fi; \
+ fi
+ctags: CTAGS
+CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ 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; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ test -z "$(CTAGS_ARGS)$$unique" \
+ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+ $$unique
+
+GTAGS:
+ here=`$(am__cd) $(top_builddir) && pwd` \
+ && $(am__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)
+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:
+ if test -z '$(STRIP)'; then \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ install; \
+ else \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
+ fi
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+ -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+ -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_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-noinstLIBRARIES mostlyclean-am
+
+distclean: distclean-am
+ -rm -f $(am__CONFIG_DISTCLEAN_FILES)
+ -rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+ distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+html-am:
+
+info: info-am
+
+info-am:
+
+install-data-am:
+
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
+install-exec-am:
+
+install-html: install-html-am
+
+install-html-am:
+
+install-info: install-info-am
+
+install-info-am:
+
+install-man:
+
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+ -rm -f $(am__CONFIG_DISTCLEAN_FILES)
+ -rm -rf $(top_srcdir)/autom4te.cache
+ -rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am:
+
+.MAKE: install-am install-strip
+
+.PHONY: CTAGS GTAGS all all-am am--refresh check check-am clean \
+ clean-generic clean-noinstLIBRARIES ctags distclean \
+ distclean-compile distclean-generic distclean-tags dvi dvi-am \
+ html html-am info info-am install install-am install-data \
+ install-data-am install-dvi install-dvi-am install-exec \
+ install-exec-am install-html install-html-am install-info \
+ install-info-am install-man install-pdf install-pdf-am \
+ install-ps install-ps-am install-strip installcheck \
+ installcheck-am installdirs maintainer-clean \
+ maintainer-clean-generic mostlyclean mostlyclean-compile \
+ mostlyclean-generic pdf pdf-am ps ps-am tags uninstall \
+ uninstall-am
+
+
+# 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/machine/ft32/aclocal.m4 b/newlib/libc/machine/ft32/aclocal.m4
new file mode 100644
index 000000000..18dab02aa
--- /dev/null
+++ b/newlib/libc/machine/ft32/aclocal.m4
@@ -0,0 +1,1012 @@
+# generated automatically by aclocal 1.11.6 -*- Autoconf -*-
+
+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
+# 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation,
+# Inc.
+# This file 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.
+
+m4_ifndef([AC_AUTOCONF_VERSION],
+ [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
+m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.68],,
+[m4_warning([this file was generated for autoconf 2.68.
+You have another version of autoconf. It may work, but is not guaranteed to.
+If you have problems, you may need to regenerate the build system entirely.
+To do so, use the procedure documented by the package, typically `autoreconf'.])])
+
+# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008, 2011 Free Software
+# Foundation, Inc.
+#
+# This file 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.
+
+# serial 1
+
+# AM_AUTOMAKE_VERSION(VERSION)
+# ----------------------------
+# Automake X.Y traces this macro to ensure aclocal.m4 has been
+# generated from the m4 files accompanying Automake X.Y.
+# (This private macro should not be called outside this file.)
+AC_DEFUN([AM_AUTOMAKE_VERSION],
+[am__api_version='1.11'
+dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
+dnl require some minimum version. Point them to the right macro.
+m4_if([$1], [1.11.6], [],
+ [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
+])
+
+# _AM_AUTOCONF_VERSION(VERSION)
+# -----------------------------
+# aclocal traces this macro to find the Autoconf version.
+# This is a private macro too. Using m4_define simplifies
+# the logic in aclocal, which can simply ignore this definition.
+m4_define([_AM_AUTOCONF_VERSION], [])
+
+# AM_SET_CURRENT_AUTOMAKE_VERSION
+# -------------------------------
+# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
+# This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
+AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
+[AM_AUTOMAKE_VERSION([1.11.6])dnl
+m4_ifndef([AC_AUTOCONF_VERSION],
+ [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
+_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
+
+# AM_AUX_DIR_EXPAND -*- Autoconf -*-
+
+# Copyright (C) 2001, 2003, 2005, 2011 Free Software Foundation, Inc.
+#
+# This file 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.
+
+# serial 1
+
+# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
+# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to
+# `$srcdir', `$srcdir/..', or `$srcdir/../..'.
+#
+# Of course, Automake must honor this variable whenever it calls a
+# tool from the auxiliary directory. The problem is that $srcdir (and
+# therefore $ac_aux_dir as well) can be either absolute or relative,
+# depending on how configure is run. This is pretty annoying, since
+# it makes $ac_aux_dir quite unusable in subdirectories: in the top
+# source directory, any form will work fine, but in subdirectories a
+# relative path needs to be adjusted first.
+#
+# $ac_aux_dir/missing
+# fails when called from a subdirectory if $ac_aux_dir is relative
+# $top_srcdir/$ac_aux_dir/missing
+# fails if $ac_aux_dir is absolute,
+# fails when called from a subdirectory in a VPATH build with
+# a relative $ac_aux_dir
+#
+# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
+# are both prefixed by $srcdir. In an in-source build this is usually
+# harmless because $srcdir is `.', but things will broke when you
+# start a VPATH build or use an absolute $srcdir.
+#
+# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
+# iff we strip the leading $srcdir from $ac_aux_dir. That would be:
+# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
+# and then we would define $MISSING as
+# MISSING="\${SHELL} $am_aux_dir/missing"
+# This will work as long as MISSING is not called from configure, because
+# unfortunately $(top_srcdir) has no meaning in configure.
+# However there are other variables, like CC, which are often used in
+# configure, and could therefore not use this "fixed" $ac_aux_dir.
+#
+# Another solution, used here, is to always expand $ac_aux_dir to an
+# absolute PATH. The drawback is that using absolute paths prevent a
+# configured tree to be moved without reconfiguration.
+
+AC_DEFUN([AM_AUX_DIR_EXPAND],
+[dnl Rely on autoconf to set up CDPATH properly.
+AC_PREREQ([2.50])dnl
+# expand $ac_aux_dir to an absolute path
+am_aux_dir=`cd $ac_aux_dir && pwd`
+])
+
+# AM_CONDITIONAL -*- Autoconf -*-
+
+# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008
+# Free Software Foundation, Inc.
+#
+# This file 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.
+
+# serial 9
+
+# AM_CONDITIONAL(NAME, SHELL-CONDITION)
+# -------------------------------------
+# Define a conditional.
+AC_DEFUN([AM_CONDITIONAL],
+[AC_PREREQ(2.52)dnl
+ ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])],
+ [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
+AC_SUBST([$1_TRUE])dnl
+AC_SUBST([$1_FALSE])dnl
+_AM_SUBST_NOTMAKE([$1_TRUE])dnl
+_AM_SUBST_NOTMAKE([$1_FALSE])dnl
+m4_define([_AM_COND_VALUE_$1], [$2])dnl
+if $2; then
+ $1_TRUE=
+ $1_FALSE='#'
+else
+ $1_TRUE='#'
+ $1_FALSE=
+fi
+AC_CONFIG_COMMANDS_PRE(
+[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
+ AC_MSG_ERROR([[conditional "$1" was never defined.
+Usually this means the macro was only invoked conditionally.]])
+fi])])
+
+# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009,
+# 2010, 2011 Free Software Foundation, Inc.
+#
+# This file 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.
+
+# serial 12
+
+# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
+# written in clear, in which case automake, when reading aclocal.m4,
+# will think it sees a *use*, and therefore will trigger all it's
+# C support machinery. Also note that it means that autoscan, seeing
+# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
+
+
+# _AM_DEPENDENCIES(NAME)
+# ----------------------
+# See how the compiler implements dependency checking.
+# NAME is "CC", "CXX", "GCJ", or "OBJC".
+# We try a few techniques and use that to set a single cache variable.
+#
+# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
+# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
+# dependency, and given that the user is not expected to run this macro,
+# just rely on AC_PROG_CC.
+AC_DEFUN([_AM_DEPENDENCIES],
+[AC_REQUIRE([AM_SET_DEPDIR])dnl
+AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
+AC_REQUIRE([AM_MAKE_INCLUDE])dnl
+AC_REQUIRE([AM_DEP_TRACK])dnl
+
+ifelse([$1], CC, [depcc="$CC" am_compiler_list=],
+ [$1], CXX, [depcc="$CXX" am_compiler_list=],
+ [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
+ [$1], UPC, [depcc="$UPC" am_compiler_list=],
+ [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'],
+ [depcc="$$1" am_compiler_list=])
+
+AC_CACHE_CHECK([dependency style of $depcc],
+ [am_cv_$1_dependencies_compiler_type],
+[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
+ # We make a subdir and do the tests there. Otherwise we can end up
+ # making bogus files that we don't know about and never remove. For
+ # instance it was reported that on HP-UX the gcc test will end up
+ # making a dummy file named `D' -- because `-MD' means `put the output
+ # in D'.
+ rm -rf conftest.dir
+ mkdir conftest.dir
+ # Copy depcomp to subdir because otherwise we won't find it if we're
+ # using a relative directory.
+ cp "$am_depcomp" conftest.dir
+ cd conftest.dir
+ # We will build objects and dependencies in a subdirectory because
+ # it helps to detect inapplicable dependency modes. For instance
+ # both Tru64's cc and ICC support -MD to output dependencies as a
+ # side effect of compilation, but ICC will put the dependencies in
+ # the current directory while Tru64 will put them in the object
+ # directory.
+ mkdir sub
+
+ am_cv_$1_dependencies_compiler_type=none
+ if test "$am_compiler_list" = ""; then
+ am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
+ fi
+ am__universal=false
+ m4_case([$1], [CC],
+ [case " $depcc " in #(
+ *\ -arch\ *\ -arch\ *) am__universal=true ;;
+ esac],
+ [CXX],
+ [case " $depcc " in #(
+ *\ -arch\ *\ -arch\ *) am__universal=true ;;
+ esac])
+
+ for depmode in $am_compiler_list; do
+ # Setup a source with many dependencies, because some compilers
+ # like to wrap large dependency lists on column 80 (with \), and
+ # we should not choose a depcomp mode which is confused by this.
+ #
+ # We need to recreate these files for each test, as the compiler may
+ # overwrite some of them when testing with obscure command lines.
+ # This happens at least with the AIX C compiler.
+ : > sub/conftest.c
+ for i in 1 2 3 4 5 6; do
+ echo '#include "conftst'$i'.h"' >> sub/conftest.c
+ # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
+ # Solaris 8's {/usr,}/bin/sh.
+ touch sub/conftst$i.h
+ done
+ echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
+
+ # We check with `-c' and `-o' for the sake of the "dashmstdout"
+ # mode. It turns out that the SunPro C++ compiler does not properly
+ # handle `-M -o', and we need to detect this. Also, some Intel
+ # versions had trouble with output in subdirs
+ am__obj=sub/conftest.${OBJEXT-o}
+ am__minus_obj="-o $am__obj"
+ case $depmode in
+ gcc)
+ # This depmode causes a compiler race in universal mode.
+ test "$am__universal" = false || continue
+ ;;
+ nosideeffect)
+ # after this tag, mechanisms are not by side-effect, so they'll
+ # only be used when explicitly requested
+ if test "x$enable_dependency_tracking" = xyes; then
+ continue
+ else
+ break
+ fi
+ ;;
+ msvc7 | msvc7msys | msvisualcpp | msvcmsys)
+ # This compiler won't grok `-c -o', but also, the minuso test has
+ # not run yet. These depmodes are late enough in the game, and
+ # so weak that their functioning should not be impacted.
+ am__obj=conftest.${OBJEXT-o}
+ am__minus_obj=
+ ;;
+ none) break ;;
+ esac
+ if depmode=$depmode \
+ source=sub/conftest.c object=$am__obj \
+ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
+ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
+ >/dev/null 2>conftest.err &&
+ grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
+ grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
+ grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
+ ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
+ # icc doesn't choke on unknown options, it will just issue warnings
+ # or remarks (even with -Werror). So we grep stderr for any message
+ # that says an option was ignored or not supported.
+ # When given -MP, icc 7.0 and 7.1 complain thusly:
+ # icc: Command line warning: ignoring option '-M'; no argument required
+ # The diagnosis changed in icc 8.0:
+ # icc: Command line remark: option '-MP' not supported
+ if (grep 'ignoring option' conftest.err ||
+ grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
+ am_cv_$1_dependencies_compiler_type=$depmode
+ break
+ fi
+ fi
+ done
+
+ cd ..
+ rm -rf conftest.dir
+else
+ am_cv_$1_dependencies_compiler_type=none
+fi
+])
+AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
+AM_CONDITIONAL([am__fastdep$1], [
+ test "x$enable_dependency_tracking" != xno \
+ && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
+])
+
+
+# AM_SET_DEPDIR
+# -------------
+# Choose a directory name for dependency files.
+# This macro is AC_REQUIREd in _AM_DEPENDENCIES
+AC_DEFUN([AM_SET_DEPDIR],
+[AC_REQUIRE([AM_SET_LEADING_DOT])dnl
+AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
+])
+
+
+# AM_DEP_TRACK
+# ------------
+AC_DEFUN([AM_DEP_TRACK],
+[AC_ARG_ENABLE(dependency-tracking,
+[ --disable-dependency-tracking speeds up one-time build
+ --enable-dependency-tracking do not reject slow dependency extractors])
+if test "x$enable_dependency_tracking" != xno; then
+ am_depcomp="$ac_aux_dir/depcomp"
+ AMDEPBACKSLASH='\'
+ am__nodep='_no'
+fi
+AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
+AC_SUBST([AMDEPBACKSLASH])dnl
+_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
+AC_SUBST([am__nodep])dnl
+_AM_SUBST_NOTMAKE([am__nodep])dnl
+])
+
+# Generate code to set up dependency tracking. -*- Autoconf -*-
+
+# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008
+# Free Software Foundation, Inc.
+#
+# This file 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.
+
+#serial 5
+
+# _AM_OUTPUT_DEPENDENCY_COMMANDS
+# ------------------------------
+AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
+[{
+ # Autoconf 2.62 quotes --file arguments for eval, but not when files
+ # are listed without --file. Let's play safe and only enable the eval
+ # if we detect the quoting.
+ case $CONFIG_FILES in
+ *\'*) eval set x "$CONFIG_FILES" ;;
+ *) set x $CONFIG_FILES ;;
+ esac
+ shift
+ for mf
+ do
+ # Strip MF so we end up with the name of the file.
+ mf=`echo "$mf" | sed -e 's/:.*$//'`
+ # Check whether this is an Automake generated Makefile or not.
+ # We used to match only the files named `Makefile.in', but
+ # some people rename them; so instead we look at the file content.
+ # Grep'ing the first line is not enough: some people post-process
+ # each Makefile.in and add a new line on top of each file to say so.
+ # Grep'ing the whole file is not good either: AIX grep has a line
+ # limit of 2048, but all sed's we know have understand at least 4000.
+ if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
+ dirpart=`AS_DIRNAME("$mf")`
+ else
+ continue
+ fi
+ # Extract the definition of DEPDIR, am__include, and am__quote
+ # from the Makefile without running `make'.
+ DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
+ test -z "$DEPDIR" && continue
+ am__include=`sed -n 's/^am__include = //p' < "$mf"`
+ test -z "am__include" && continue
+ am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
+ # When using ansi2knr, U may be empty or an underscore; expand it
+ U=`sed -n 's/^U = //p' < "$mf"`
+ # Find all dependency output files, they are included files with
+ # $(DEPDIR) in their names. We invoke sed twice because it is the
+ # simplest approach to changing $(DEPDIR) to its actual value in the
+ # expansion.
+ for file in `sed -n "
+ s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
+ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
+ # Make sure the directory exists.
+ test -f "$dirpart/$file" && continue
+ fdir=`AS_DIRNAME(["$file"])`
+ AS_MKDIR_P([$dirpart/$fdir])
+ # echo "creating $dirpart/$file"
+ echo '# dummy' > "$dirpart/$file"
+ done
+ done
+}
+])# _AM_OUTPUT_DEPENDENCY_COMMANDS
+
+
+# AM_OUTPUT_DEPENDENCY_COMMANDS
+# -----------------------------
+# This macro should only be invoked once -- use via AC_REQUIRE.
+#
+# This code is only required when automatic dependency tracking
+# is enabled. FIXME. This creates each `.P' file that we will
+# need in order to bootstrap the dependency handling code.
+AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
+[AC_CONFIG_COMMANDS([depfiles],
+ [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
+ [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
+])
+
+# Do all the work for Automake. -*- Autoconf -*-
+
+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
+# 2005, 2006, 2008, 2009 Free Software Foundation, Inc.
+#
+# This file 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.
+
+# serial 16
+
+# This macro actually does too much. Some checks are only needed if
+# your package does certain things. But this isn't really a big deal.
+
+# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
+# AM_INIT_AUTOMAKE([OPTIONS])
+# -----------------------------------------------
+# The call with PACKAGE and VERSION arguments is the old style
+# call (pre autoconf-2.50), which is being phased out. PACKAGE
+# and VERSION should now be passed to AC_INIT and removed from
+# the call to AM_INIT_AUTOMAKE.
+# We support both call styles for the transition. After
+# the next Automake release, Autoconf can make the AC_INIT
+# arguments mandatory, and then we can depend on a new Autoconf
+# release and drop the old call support.
+AC_DEFUN([AM_INIT_AUTOMAKE],
+[AC_PREREQ([2.62])dnl
+dnl Autoconf wants to disallow AM_ names. We explicitly allow
+dnl the ones we care about.
+m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
+AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
+AC_REQUIRE([AC_PROG_INSTALL])dnl
+if test "`cd $srcdir && pwd`" != "`pwd`"; then
+ # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
+ # is not polluted with repeated "-I."
+ AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
+ # test to see if srcdir already configured
+ if test -f $srcdir/config.status; then
+ AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
+ fi
+fi
+
+# test whether we have cygpath
+if test -z "$CYGPATH_W"; then
+ if (cygpath --version) >/dev/null 2>/dev/null; then
+ CYGPATH_W='cygpath -w'
+ else
+ CYGPATH_W=echo
+ fi
+fi
+AC_SUBST([CYGPATH_W])
+
+# Define the identity of the package.
+dnl Distinguish between old-style and new-style calls.
+m4_ifval([$2],
+[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
+ AC_SUBST([PACKAGE], [$1])dnl
+ AC_SUBST([VERSION], [$2])],
+[_AM_SET_OPTIONS([$1])dnl
+dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
+m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,,
+ [m4_fatal([AC_INIT should be called with package and version arguments])])dnl
+ AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
+ AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
+
+_AM_IF_OPTION([no-define],,
+[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
+ AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
+
+# Some tools Automake needs.
+AC_REQUIRE([AM_SANITY_CHECK])dnl
+AC_REQUIRE([AC_ARG_PROGRAM])dnl
+AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
+AM_MISSING_PROG(AUTOCONF, autoconf)
+AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
+AM_MISSING_PROG(AUTOHEADER, autoheader)
+AM_MISSING_PROG(MAKEINFO, makeinfo)
+AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
+AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl
+AC_REQUIRE([AM_PROG_MKDIR_P])dnl
+# We need awk for the "check" target. The system "awk" is bad on
+# some platforms.
+AC_REQUIRE([AC_PROG_AWK])dnl
+AC_REQUIRE([AC_PROG_MAKE_SET])dnl
+AC_REQUIRE([AM_SET_LEADING_DOT])dnl
+_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
+ [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
+ [_AM_PROG_TAR([v7])])])
+_AM_IF_OPTION([no-dependencies],,
+[AC_PROVIDE_IFELSE([AC_PROG_CC],
+ [_AM_DEPENDENCIES(CC)],
+ [define([AC_PROG_CC],
+ defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
+AC_PROVIDE_IFELSE([AC_PROG_CXX],
+ [_AM_DEPENDENCIES(CXX)],
+ [define([AC_PROG_CXX],
+ defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
+AC_PROVIDE_IFELSE([AC_PROG_OBJC],
+ [_AM_DEPENDENCIES(OBJC)],
+ [define([AC_PROG_OBJC],
+ defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl
+])
+_AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl
+dnl The `parallel-tests' driver may need to know about EXEEXT, so add the
+dnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This macro
+dnl is hooked onto _AC_COMPILER_EXEEXT early, see below.
+AC_CONFIG_COMMANDS_PRE(dnl
+[m4_provide_if([_AM_COMPILER_EXEEXT],
+ [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
+])
+
+dnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion. Do not
+dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further
+dnl mangled by Autoconf and run in a shell conditional statement.
+m4_define([_AC_COMPILER_EXEEXT],
+m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])])
+
+
+# When config.status generates a header, we must update the stamp-h file.
+# This file resides in the same directory as the config header
+# that is generated. The stamp files are numbered to have different names.
+
+# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
+# loop where config.status creates the headers, so we can generate
+# our stamp files there.
+AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
+[# Compute $1's index in $config_headers.
+_am_arg=$1
+_am_stamp_count=1
+for _am_header in $config_headers :; do
+ case $_am_header in
+ $_am_arg | $_am_arg:* )
+ break ;;
+ * )
+ _am_stamp_count=`expr $_am_stamp_count + 1` ;;
+ esac
+done
+echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
+
+# Copyright (C) 2001, 2003, 2005, 2008, 2011 Free Software Foundation,
+# Inc.
+#
+# This file 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.
+
+# serial 1
+
+# AM_PROG_INSTALL_SH
+# ------------------
+# Define $install_sh.
+AC_DEFUN([AM_PROG_INSTALL_SH],
+[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
+if test x"${install_sh}" != xset; then
+ case $am_aux_dir in
+ *\ * | *\ *)
+ install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
+ *)
+ install_sh="\${SHELL} $am_aux_dir/install-sh"
+ esac
+fi
+AC_SUBST(install_sh)])
+
+# Copyright (C) 2003, 2005 Free Software Foundation, Inc.
+#
+# This file 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.
+
+# serial 2
+
+# Check whether the underlying file-system supports filenames
+# with a leading dot. For instance MS-DOS doesn't.
+AC_DEFUN([AM_SET_LEADING_DOT],
+[rm -rf .tst 2>/dev/null
+mkdir .tst 2>/dev/null
+if test -d .tst; then
+ am__leading_dot=.
+else
+ am__leading_dot=_
+fi
+rmdir .tst 2>/dev/null
+AC_SUBST([am__leading_dot])])
+
+# Add --enable-maintainer-mode option to configure. -*- Autoconf -*-
+# From Jim Meyering
+
+# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005, 2008,
+# 2011 Free Software Foundation, Inc.
+#
+# This file 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.
+
+# serial 5
+
+# AM_MAINTAINER_MODE([DEFAULT-MODE])
+# ----------------------------------
+# Control maintainer-specific portions of Makefiles.
+# Default is to disable them, unless `enable' is passed literally.
+# For symmetry, `disable' may be passed as well. Anyway, the user
+# can override the default with the --enable/--disable switch.
+AC_DEFUN([AM_MAINTAINER_MODE],
+[m4_case(m4_default([$1], [disable]),
+ [enable], [m4_define([am_maintainer_other], [disable])],
+ [disable], [m4_define([am_maintainer_other], [enable])],
+ [m4_define([am_maintainer_other], [enable])
+ m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])])
+AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
+ dnl maintainer-mode's default is 'disable' unless 'enable' is passed
+ AC_ARG_ENABLE([maintainer-mode],
+[ --][am_maintainer_other][-maintainer-mode am_maintainer_other make rules and dependencies not useful
+ (and sometimes confusing) to the casual installer],
+ [USE_MAINTAINER_MODE=$enableval],
+ [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes]))
+ AC_MSG_RESULT([$USE_MAINTAINER_MODE])
+ AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes])
+ MAINT=$MAINTAINER_MODE_TRUE
+ AC_SUBST([MAINT])dnl
+]
+)
+
+AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE])
+
+# Check to see how 'make' treats includes. -*- Autoconf -*-
+
+# Copyright (C) 2001, 2002, 2003, 2005, 2009 Free Software Foundation, Inc.
+#
+# This file 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.
+
+# serial 4
+
+# AM_MAKE_INCLUDE()
+# -----------------
+# Check to see how make treats includes.
+AC_DEFUN([AM_MAKE_INCLUDE],
+[am_make=${MAKE-make}
+cat > confinc << 'END'
+am__doit:
+ @echo this is the am__doit target
+.PHONY: am__doit
+END
+# If we don't find an include directive, just comment out the code.
+AC_MSG_CHECKING([for style of include used by $am_make])
+am__include="#"
+am__quote=
+_am_result=none
+# First try GNU make style include.
+echo "include confinc" > confmf
+# Ignore all kinds of additional output from `make'.
+case `$am_make -s -f confmf 2> /dev/null` in #(
+*the\ am__doit\ target*)
+ am__include=include
+ am__quote=
+ _am_result=GNU
+ ;;
+esac
+# Now try BSD make style include.
+if test "$am__include" = "#"; then
+ echo '.include "confinc"' > confmf
+ case `$am_make -s -f confmf 2> /dev/null` in #(
+ *the\ am__doit\ target*)
+ am__include=.include
+ am__quote="\""
+ _am_result=BSD
+ ;;
+ esac
+fi
+AC_SUBST([am__include])
+AC_SUBST([am__quote])
+AC_MSG_RESULT([$_am_result])
+rm -f confinc confmf
+])
+
+# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*-
+
+# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008
+# Free Software Foundation, Inc.
+#
+# This file 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.
+
+# serial 6
+
+# AM_MISSING_PROG(NAME, PROGRAM)
+# ------------------------------
+AC_DEFUN([AM_MISSING_PROG],
+[AC_REQUIRE([AM_MISSING_HAS_RUN])
+$1=${$1-"${am_missing_run}$2"}
+AC_SUBST($1)])
+
+
+# AM_MISSING_HAS_RUN
+# ------------------
+# Define MISSING if not defined so far and test if it supports --run.
+# If it does, set am_missing_run to use it, otherwise, to nothing.
+AC_DEFUN([AM_MISSING_HAS_RUN],
+[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
+AC_REQUIRE_AUX_FILE([missing])dnl
+if test x"${MISSING+set}" != xset; then
+ case $am_aux_dir in
+ *\ * | *\ *)
+ MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
+ *)
+ MISSING="\${SHELL} $am_aux_dir/missing" ;;
+ esac
+fi
+# Use eval to expand $SHELL
+if eval "$MISSING --run true"; then
+ am_missing_run="$MISSING --run "
+else
+ am_missing_run=
+ AC_MSG_WARN([`missing' script is too old or missing])
+fi
+])
+
+# Copyright (C) 2003, 2004, 2005, 2006, 2011 Free Software Foundation,
+# Inc.
+#
+# This file 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.
+
+# serial 1
+
+# AM_PROG_MKDIR_P
+# ---------------
+# Check for `mkdir -p'.
+AC_DEFUN([AM_PROG_MKDIR_P],
+[AC_PREREQ([2.60])dnl
+AC_REQUIRE([AC_PROG_MKDIR_P])dnl
+dnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P,
+dnl while keeping a definition of mkdir_p for backward compatibility.
+dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile.
+dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of
+dnl Makefile.ins that do not define MKDIR_P, so we do our own
+dnl adjustment using top_builddir (which is defined more often than
+dnl MKDIR_P).
+AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl
+case $mkdir_p in
+ [[\\/$]]* | ?:[[\\/]]*) ;;
+ */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
+esac
+])
+
+# Helper functions for option handling. -*- Autoconf -*-
+
+# Copyright (C) 2001, 2002, 2003, 2005, 2008, 2010 Free Software
+# Foundation, Inc.
+#
+# This file 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.
+
+# serial 5
+
+# _AM_MANGLE_OPTION(NAME)
+# -----------------------
+AC_DEFUN([_AM_MANGLE_OPTION],
+[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
+
+# _AM_SET_OPTION(NAME)
+# --------------------
+# Set option NAME. Presently that only means defining a flag for this option.
+AC_DEFUN([_AM_SET_OPTION],
+[m4_define(_AM_MANGLE_OPTION([$1]), 1)])
+
+# _AM_SET_OPTIONS(OPTIONS)
+# ------------------------
+# OPTIONS is a space-separated list of Automake options.
+AC_DEFUN([_AM_SET_OPTIONS],
+[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
+
+# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
+# -------------------------------------------
+# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
+AC_DEFUN([_AM_IF_OPTION],
+[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
+
+# Check to make sure that the build environment is sane. -*- Autoconf -*-
+
+# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008
+# Free Software Foundation, Inc.
+#
+# This file 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.
+
+# serial 5
+
+# AM_SANITY_CHECK
+# ---------------
+AC_DEFUN([AM_SANITY_CHECK],
+[AC_MSG_CHECKING([whether build environment is sane])
+# Just in case
+sleep 1
+echo timestamp > conftest.file
+# Reject unsafe characters in $srcdir or the absolute working directory
+# name. Accept space and tab only in the latter.
+am_lf='
+'
+case `pwd` in
+ *[[\\\"\#\$\&\'\`$am_lf]]*)
+ AC_MSG_ERROR([unsafe absolute working directory name]);;
+esac
+case $srcdir in
+ *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*)
+ AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);;
+esac
+
+# Do `set' in a subshell so we don't clobber the current shell's
+# arguments. Must try -L first in case configure is actually a
+# symlink; some systems play weird games with the mod time of symlinks
+# (eg FreeBSD returns the mod time of the symlink's containing
+# directory).
+if (
+ set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
+ if test "$[*]" = "X"; then
+ # -L didn't work.
+ set X `ls -t "$srcdir/configure" conftest.file`
+ fi
+ rm -f conftest.file
+ if test "$[*]" != "X $srcdir/configure conftest.file" \
+ && test "$[*]" != "X conftest.file $srcdir/configure"; then
+
+ # If neither matched, then we have a broken ls. This can happen
+ # if, for instance, CONFIG_SHELL is bash and it inherits a
+ # broken ls alias from the environment. This has actually
+ # happened. Such a system could not be considered "sane".
+ AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
+alias in your environment])
+ fi
+
+ test "$[2]" = conftest.file
+ )
+then
+ # Ok.
+ :
+else
+ AC_MSG_ERROR([newly created file is older than distributed files!
+Check your system clock])
+fi
+AC_MSG_RESULT(yes)])
+
+# Copyright (C) 2001, 2003, 2005, 2011 Free Software Foundation, Inc.
+#
+# This file 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.
+
+# serial 1
+
+# AM_PROG_INSTALL_STRIP
+# ---------------------
+# One issue with vendor `install' (even GNU) is that you can't
+# specify the program used to strip binaries. This is especially
+# annoying in cross-compiling environments, where the build's strip
+# is unlikely to handle the host's binaries.
+# Fortunately install-sh will honor a STRIPPROG variable, so we
+# always use install-sh in `make install-strip', and initialize
+# STRIPPROG with the value of the STRIP variable (set by the user).
+AC_DEFUN([AM_PROG_INSTALL_STRIP],
+[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
+# Installed binaries are usually stripped using `strip' when the user
+# run `make install-strip'. However `strip' might not be the right
+# tool to use in cross-compilation environments, therefore Automake
+# will honor the `STRIP' environment variable to overrule this program.
+dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
+if test "$cross_compiling" != no; then
+ AC_CHECK_TOOL([STRIP], [strip], :)
+fi
+INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
+AC_SUBST([INSTALL_STRIP_PROGRAM])])
+
+# Copyright (C) 2006, 2008, 2010 Free Software Foundation, Inc.
+#
+# This file 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.
+
+# serial 3
+
+# _AM_SUBST_NOTMAKE(VARIABLE)
+# ---------------------------
+# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
+# This macro is traced by Automake.
+AC_DEFUN([_AM_SUBST_NOTMAKE])
+
+# AM_SUBST_NOTMAKE(VARIABLE)
+# --------------------------
+# Public sister of _AM_SUBST_NOTMAKE.
+AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
+
+# Check how to create a tarball. -*- Autoconf -*-
+
+# Copyright (C) 2004, 2005, 2012 Free Software Foundation, Inc.
+#
+# This file 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.
+
+# serial 2
+
+# _AM_PROG_TAR(FORMAT)
+# --------------------
+# Check how to create a tarball in format FORMAT.
+# FORMAT should be one of `v7', `ustar', or `pax'.
+#
+# Substitute a variable $(am__tar) that is a command
+# writing to stdout a FORMAT-tarball containing the directory
+# $tardir.
+# tardir=directory && $(am__tar) > result.tar
+#
+# Substitute a variable $(am__untar) that extract such
+# a tarball read from stdin.
+# $(am__untar) < result.tar
+AC_DEFUN([_AM_PROG_TAR],
+[# Always define AMTAR for backward compatibility. Yes, it's still used
+# in the wild :-( We should find a proper way to deprecate it ...
+AC_SUBST([AMTAR], ['$${TAR-tar}'])
+m4_if([$1], [v7],
+ [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'],
+ [m4_case([$1], [ustar],, [pax],,
+ [m4_fatal([Unknown tar format])])
+AC_MSG_CHECKING([how to create a $1 tar archive])
+# Loop over all known methods to create a tar archive until one works.
+_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
+_am_tools=${am_cv_prog_tar_$1-$_am_tools}
+# Do not fold the above two line into one, because Tru64 sh and
+# Solaris sh will not grok spaces in the rhs of `-'.
+for _am_tool in $_am_tools
+do
+ case $_am_tool in
+ gnutar)
+ for _am_tar in tar gnutar gtar;
+ do
+ AM_RUN_LOG([$_am_tar --version]) && break
+ done
+ am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
+ am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
+ am__untar="$_am_tar -xf -"
+ ;;
+ plaintar)
+ # Must skip GNU tar: if it does not support --format= it doesn't create
+ # ustar tarball either.
+ (tar --version) >/dev/null 2>&1 && continue
+ am__tar='tar chf - "$$tardir"'
+ am__tar_='tar chf - "$tardir"'
+ am__untar='tar xf -'
+ ;;
+ pax)
+ am__tar='pax -L -x $1 -w "$$tardir"'
+ am__tar_='pax -L -x $1 -w "$tardir"'
+ am__untar='pax -r'
+ ;;
+ cpio)
+ am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
+ am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
+ am__untar='cpio -i -H $1 -d'
+ ;;
+ none)
+ am__tar=false
+ am__tar_=false
+ am__untar=false
+ ;;
+ esac
+
+ # If the value was cached, stop now. We just wanted to have am__tar
+ # and am__untar set.
+ test -n "${am_cv_prog_tar_$1}" && break
+
+ # tar/untar a dummy directory, and stop if the command works
+ rm -rf conftest.dir
+ mkdir conftest.dir
+ echo GrepMe > conftest.dir/file
+ AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
+ rm -rf conftest.dir
+ if test -s conftest.tar; then
+ AM_RUN_LOG([$am__untar <conftest.tar])
+ grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
+ fi
+done
+rm -rf conftest.dir
+
+AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
+AC_MSG_RESULT([$am_cv_prog_tar_$1])])
+AC_SUBST([am__tar])
+AC_SUBST([am__untar])
+]) # _AM_PROG_TAR
+
+m4_include([../../../acinclude.m4])
diff --git a/newlib/libc/machine/ft32/configure b/newlib/libc/machine/ft32/configure
new file mode 100755
index 000000000..bc041896f
--- /dev/null
+++ b/newlib/libc/machine/ft32/configure
@@ -0,0 +1,4748 @@
+#! /bin/sh
+# Guess values for system-dependent variables and create Makefiles.
+# Generated by GNU Autoconf 2.68 for newlib 2.4.0.
+#
+#
+# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
+# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software
+# Foundation, Inc.
+#
+#
+# This configure script is free software; the Free Software Foundation
+# gives unlimited permission to copy, distribute and modify it.
+## -------------------- ##
+## M4sh Initialization. ##
+## -------------------- ##
+
+# Be more Bourne compatible
+DUALCASE=1; export DUALCASE # for MKS sh
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
+ emulate sh
+ NULLCMD=:
+ # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
+ # is contrary to our usage. Disable this feature.
+ alias -g '${1+"$@"}'='"$@"'
+ setopt NO_GLOB_SUBST
+else
+ case `(set -o) 2>/dev/null` in #(
+ *posix*) :
+ set -o posix ;; #(
+ *) :
+ ;;
+esac
+fi
+
+
+as_nl='
+'
+export as_nl
+# Printing a long string crashes Solaris 7 /usr/bin/printf.
+as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
+as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
+as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
+# Prefer a ksh shell builtin over an external printf program on Solaris,
+# but without wasting forks for bash or zsh.
+if test -z "$BASH_VERSION$ZSH_VERSION" \
+ && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
+ as_echo='print -r --'
+ as_echo_n='print -rn --'
+elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
+ as_echo='printf %s\n'
+ as_echo_n='printf %s'
+else
+ if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
+ as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
+ as_echo_n='/usr/ucb/echo -n'
+ else
+ as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
+ as_echo_n_body='eval
+ arg=$1;
+ case $arg in #(
+ *"$as_nl"*)
+ expr "X$arg" : "X\\(.*\\)$as_nl";
+ arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
+ esac;
+ expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
+ '
+ export as_echo_n_body
+ as_echo_n='sh -c $as_echo_n_body as_echo'
+ fi
+ export as_echo_body
+ as_echo='sh -c $as_echo_body as_echo'
+fi
+
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+ PATH_SEPARATOR=:
+ (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
+ (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
+ PATH_SEPARATOR=';'
+ }
+fi
+
+
+# IFS
+# We need space, tab and new line, in precisely that order. Quoting is
+# there to prevent editors from complaining about space-tab.
+# (If _AS_PATH_WALK were called with IFS unset, it would disable word
+# splitting by setting IFS to empty value.)
+IFS=" "" $as_nl"
+
+# Find who we are. Look in the path if we contain no directory separator.
+as_myself=
+case $0 in #((
+ *[\\/]* ) as_myself=$0 ;;
+ *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
+ done
+IFS=$as_save_IFS
+
+ ;;
+esac
+# We did not find ourselves, most probably we were run as `sh COMMAND'
+# in which case we are not to be found in the path.
+if test "x$as_myself" = x; then
+ as_myself=$0
+fi
+if test ! -f "$as_myself"; then
+ $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
+ exit 1
+fi
+
+# Unset variables that we do not need and which cause bugs (e.g. in
+# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
+# suppresses any "Segmentation fault" message there. '((' could
+# trigger a bug in pdksh 5.2.14.
+for as_var in BASH_ENV ENV MAIL MAILPATH
+do eval test x\${$as_var+set} = xset \
+ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
+done
+PS1='$ '
+PS2='> '
+PS4='+ '
+
+# NLS nuisances.
+LC_ALL=C
+export LC_ALL
+LANGUAGE=C
+export LANGUAGE
+
+# CDPATH.
+(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
+
+if test "x$CONFIG_SHELL" = x; then
+ as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
+ emulate sh
+ NULLCMD=:
+ # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
+ # is contrary to our usage. Disable this feature.
+ alias -g '\${1+\"\$@\"}'='\"\$@\"'
+ setopt NO_GLOB_SUBST
+else
+ case \`(set -o) 2>/dev/null\` in #(
+ *posix*) :
+ set -o posix ;; #(
+ *) :
+ ;;
+esac
+fi
+"
+ as_required="as_fn_return () { (exit \$1); }
+as_fn_success () { as_fn_return 0; }
+as_fn_failure () { as_fn_return 1; }
+as_fn_ret_success () { return 0; }
+as_fn_ret_failure () { return 1; }
+
+exitcode=0
+as_fn_success || { exitcode=1; echo as_fn_success failed.; }
+as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
+as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
+as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
+if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
+
+else
+ exitcode=1; echo positional parameters were not saved.
+fi
+test x\$exitcode = x0 || exit 1"
+ as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
+ as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
+ eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
+ test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1"
+ if (eval "$as_required") 2>/dev/null; then :
+ as_have_required=yes
+else
+ as_have_required=no
+fi
+ if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
+
+else
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+as_found=false
+for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ as_found=:
+ case $as_dir in #(
+ /*)
+ for as_base in sh bash ksh sh5; do
+ # Try only shells that exist, to save several forks.
+ as_shell=$as_dir/$as_base
+ if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
+ { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
+ CONFIG_SHELL=$as_shell as_have_required=yes
+ if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
+ break 2
+fi
+fi
+ done;;
+ esac
+ as_found=false
+done
+$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
+ { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
+ CONFIG_SHELL=$SHELL as_have_required=yes
+fi; }
+IFS=$as_save_IFS
+
+
+ if test "x$CONFIG_SHELL" != x; then :
+ # We cannot yet assume a decent shell, so we have to provide a
+ # neutralization value for shells without unset; and this also
+ # works around shells that cannot unset nonexistent variables.
+ # Preserve -v and -x to the replacement shell.
+ BASH_ENV=/dev/null
+ ENV=/dev/null
+ (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
+ export CONFIG_SHELL
+ case $- in # ((((
+ *v*x* | *x*v* ) as_opts=-vx ;;
+ *v* ) as_opts=-v ;;
+ *x* ) as_opts=-x ;;
+ * ) as_opts= ;;
+ esac
+ exec "$CONFIG_SHELL" $as_opts "$as_myself" ${1+"$@"}
+fi
+
+ if test x$as_have_required = xno; then :
+ $as_echo "$0: This script requires a shell more modern than all"
+ $as_echo "$0: the shells that I found on your system."
+ if test x${ZSH_VERSION+set} = xset ; then
+ $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
+ $as_echo "$0: be upgraded to zsh 4.3.4 or later."
+ else
+ $as_echo "$0: Please tell bug-autoconf@gnu.org about your system,
+$0: including any error possibly output before this
+$0: message. Then install a modern shell, or manually run
+$0: the script under such a shell if you do have one."
+ fi
+ exit 1
+fi
+fi
+fi
+SHELL=${CONFIG_SHELL-/bin/sh}
+export SHELL
+# Unset more variables known to interfere with behavior of common tools.
+CLICOLOR_FORCE= GREP_OPTIONS=
+unset CLICOLOR_FORCE GREP_OPTIONS
+
+## --------------------- ##
+## M4sh Shell Functions. ##
+## --------------------- ##
+# as_fn_unset VAR
+# ---------------
+# Portably unset VAR.
+as_fn_unset ()
+{
+ { eval $1=; unset $1;}
+}
+as_unset=as_fn_unset
+
+# as_fn_set_status STATUS
+# -----------------------
+# Set $? to STATUS, without forking.
+as_fn_set_status ()
+{
+ return $1
+} # as_fn_set_status
+
+# as_fn_exit STATUS
+# -----------------
+# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
+as_fn_exit ()
+{
+ set +e
+ as_fn_set_status $1
+ exit $1
+} # as_fn_exit
+
+# as_fn_mkdir_p
+# -------------
+# Create "$as_dir" as a directory, including parents if necessary.
+as_fn_mkdir_p ()
+{
+
+ case $as_dir in #(
+ -*) as_dir=./$as_dir;;
+ esac
+ test -d "$as_dir" || eval $as_mkdir_p || {
+ as_dirs=
+ while :; do
+ case $as_dir in #(
+ *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
+ *) as_qdir=$as_dir;;
+ esac
+ as_dirs="'$as_qdir' $as_dirs"
+ as_dir=`$as_dirname -- "$as_dir" ||
+$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$as_dir" : 'X\(//\)[^/]' \| \
+ X"$as_dir" : 'X\(//\)$' \| \
+ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$as_dir" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)[^/].*/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+ test -d "$as_dir" && break
+ done
+ test -z "$as_dirs" || eval "mkdir $as_dirs"
+ } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
+
+
+} # as_fn_mkdir_p
+# as_fn_append VAR VALUE
+# ----------------------
+# Append the text in VALUE to the end of the definition contained in VAR. Take
+# advantage of any shell optimizations that allow amortized linear growth over
+# repeated appends, instead of the typical quadratic growth present in naive
+# implementations.
+if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
+ eval 'as_fn_append ()
+ {
+ eval $1+=\$2
+ }'
+else
+ as_fn_append ()
+ {
+ eval $1=\$$1\$2
+ }
+fi # as_fn_append
+
+# as_fn_arith ARG...
+# ------------------
+# Perform arithmetic evaluation on the ARGs, and store the result in the
+# global $as_val. Take advantage of shells that can avoid forks. The arguments
+# must be portable across $(()) and expr.
+if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
+ eval 'as_fn_arith ()
+ {
+ as_val=$(( $* ))
+ }'
+else
+ as_fn_arith ()
+ {
+ as_val=`expr "$@" || test $? -eq 1`
+ }
+fi # as_fn_arith
+
+
+# as_fn_error STATUS ERROR [LINENO LOG_FD]
+# ----------------------------------------
+# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
+# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
+# script with STATUS, using 1 if that was 0.
+as_fn_error ()
+{
+ as_status=$1; test $as_status -eq 0 && as_status=1
+ if test "$4"; then
+ as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
+ fi
+ $as_echo "$as_me: error: $2" >&2
+ as_fn_exit $as_status
+} # as_fn_error
+
+if expr a : '\(a\)' >/dev/null 2>&1 &&
+ test "X`expr 00001 : '.*\(...\)'`" = X001; then
+ as_expr=expr
+else
+ as_expr=false
+fi
+
+if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
+ as_basename=basename
+else
+ as_basename=false
+fi
+
+if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
+ as_dirname=dirname
+else
+ as_dirname=false
+fi
+
+as_me=`$as_basename -- "$0" ||
+$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
+ X"$0" : 'X\(//\)$' \| \
+ X"$0" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X/"$0" |
+ sed '/^.*\/\([^/][^/]*\)\/*$/{
+ s//\1/
+ q
+ }
+ /^X\/\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\/\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+
+# Avoid depending upon Character Ranges.
+as_cr_letters='abcdefghijklmnopqrstuvwxyz'
+as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
+as_cr_Letters=$as_cr_letters$as_cr_LETTERS
+as_cr_digits='0123456789'
+as_cr_alnum=$as_cr_Letters$as_cr_digits
+
+
+ as_lineno_1=$LINENO as_lineno_1a=$LINENO
+ as_lineno_2=$LINENO as_lineno_2a=$LINENO
+ eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
+ test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
+ # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-)
+ sed -n '
+ p
+ /[$]LINENO/=
+ ' <$as_myself |
+ sed '
+ s/[$]LINENO.*/&-/
+ t lineno
+ b
+ :lineno
+ N
+ :loop
+ s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
+ t loop
+ s/-\n.*//
+ ' >$as_me.lineno &&
+ chmod +x "$as_me.lineno" ||
+ { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
+
+ # Don't try to exec as it changes $[0], causing all sort of problems
+ # (the dirname of $[0] is not the place where we might find the
+ # original and so on. Autoconf is especially sensitive to this).
+ . "./$as_me.lineno"
+ # Exit status is that of the last command.
+ exit
+}
+
+ECHO_C= ECHO_N= ECHO_T=
+case `echo -n x` in #(((((
+-n*)
+ case `echo 'xy\c'` in
+ *c*) ECHO_T=' ';; # ECHO_T is single tab character.
+ xy) ECHO_C='\c';;
+ *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
+ ECHO_T=' ';;
+ esac;;
+*)
+ ECHO_N='-n';;
+esac
+
+rm -f conf$$ conf$$.exe conf$$.file
+if test -d conf$$.dir; then
+ rm -f conf$$.dir/conf$$.file
+else
+ rm -f conf$$.dir
+ mkdir conf$$.dir 2>/dev/null
+fi
+if (echo >conf$$.file) 2>/dev/null; then
+ if ln -s conf$$.file conf$$ 2>/dev/null; then
+ as_ln_s='ln -s'
+ # ... but there are two gotchas:
+ # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
+ # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
+ # In both cases, we have to default to `cp -p'.
+ ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
+ as_ln_s='cp -p'
+ elif ln conf$$.file conf$$ 2>/dev/null; then
+ as_ln_s=ln
+ else
+ as_ln_s='cp -p'
+ fi
+else
+ as_ln_s='cp -p'
+fi
+rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
+rmdir conf$$.dir 2>/dev/null
+
+if mkdir -p . 2>/dev/null; then
+ as_mkdir_p='mkdir -p "$as_dir"'
+else
+ test -d ./-p && rmdir ./-p
+ as_mkdir_p=false
+fi
+
+if test -x / >/dev/null 2>&1; then
+ as_test_x='test -x'
+else
+ if ls -dL / >/dev/null 2>&1; then
+ as_ls_L_option=L
+ else
+ as_ls_L_option=
+ fi
+ as_test_x='
+ eval sh -c '\''
+ if test -d "$1"; then
+ test -d "$1/.";
+ else
+ case $1 in #(
+ -*)set "./$1";;
+ esac;
+ case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
+ ???[sx]*):;;*)false;;esac;fi
+ '\'' sh
+ '
+fi
+as_executable_p=$as_test_x
+
+# Sed expression to map a string onto a valid CPP name.
+as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
+
+# Sed expression to map a string onto a valid variable name.
+as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
+
+
+test -n "$DJDIR" || exec 7<&0 </dev/null
+exec 6>&1
+
+# Name of the host.
+# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
+# so uname gets run too.
+ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
+
+#
+# Initializations.
+#
+ac_default_prefix=/usr/local
+ac_clean_files=
+ac_config_libobj_dir=.
+LIBOBJS=
+cross_compiling=no
+subdirs=
+MFLAGS=
+MAKEFLAGS=
+
+# Identity of this package.
+PACKAGE_NAME='newlib'
+PACKAGE_TARNAME='newlib'
+PACKAGE_VERSION='2.4.0'
+PACKAGE_STRING='newlib 2.4.0'
+PACKAGE_BUGREPORT=''
+PACKAGE_URL=''
+
+ac_unique_file="Makefile.am"
+ac_subst_vars='LTLIBOBJS
+LIBOBJS
+sys_dir
+machine_dir
+libm_machine_dir
+lpfx
+aext
+oext
+OBJEXT
+USE_LIBTOOL_FALSE
+USE_LIBTOOL_TRUE
+ELIX_LEVEL_4_FALSE
+ELIX_LEVEL_4_TRUE
+ELIX_LEVEL_3_FALSE
+ELIX_LEVEL_3_TRUE
+ELIX_LEVEL_2_FALSE
+ELIX_LEVEL_2_TRUE
+ELIX_LEVEL_1_FALSE
+ELIX_LEVEL_1_TRUE
+ELIX_LEVEL_0_FALSE
+ELIX_LEVEL_0_TRUE
+LDFLAGS
+NO_INCLUDE_LIST
+NEWLIB_CFLAGS
+CCASFLAGS
+CCAS
+MAINT
+MAINTAINER_MODE_FALSE
+MAINTAINER_MODE_TRUE
+READELF
+RANLIB
+AR
+AS
+am__fastdepCC_FALSE
+am__fastdepCC_TRUE
+CCDEPMODE
+am__nodep
+AMDEPBACKSLASH
+AMDEP_FALSE
+AMDEP_TRUE
+am__quote
+am__include
+DEPDIR
+CC
+am__untar
+am__tar
+AMTAR
+am__leading_dot
+SET_MAKE
+AWK
+mkdir_p
+MKDIR_P
+INSTALL_STRIP_PROGRAM
+STRIP
+install_sh
+MAKEINFO
+AUTOHEADER
+AUTOMAKE
+AUTOCONF
+ACLOCAL
+VERSION
+PACKAGE
+CYGPATH_W
+am__isrc
+INSTALL_DATA
+INSTALL_SCRIPT
+INSTALL_PROGRAM
+host_os
+host_vendor
+host_cpu
+host
+build_os
+build_vendor
+build_cpu
+build
+newlib_basedir
+MAY_SUPPLY_SYSCALLS_FALSE
+MAY_SUPPLY_SYSCALLS_TRUE
+target_alias
+host_alias
+build_alias
+LIBS
+ECHO_T
+ECHO_N
+ECHO_C
+DEFS
+mandir
+localedir
+libdir
+psdir
+pdfdir
+dvidir
+htmldir
+infodir
+docdir
+oldincludedir
+includedir
+localstatedir
+sharedstatedir
+sysconfdir
+datadir
+datarootdir
+libexecdir
+sbindir
+bindir
+program_transform_name
+prefix
+exec_prefix
+PACKAGE_URL
+PACKAGE_BUGREPORT
+PACKAGE_STRING
+PACKAGE_VERSION
+PACKAGE_TARNAME
+PACKAGE_NAME
+PATH_SEPARATOR
+SHELL'
+ac_subst_files=''
+ac_user_opts='
+enable_option_checking
+enable_multilib
+enable_target_optspace
+enable_malloc_debugging
+enable_newlib_multithread
+enable_newlib_iconv
+enable_newlib_elix_level
+enable_newlib_io_float
+enable_newlib_supplied_syscalls
+enable_dependency_tracking
+enable_maintainer_mode
+'
+ ac_precious_vars='build_alias
+host_alias
+target_alias
+CCAS
+CCASFLAGS'
+
+
+# Initialize some variables set by options.
+ac_init_help=
+ac_init_version=false
+ac_unrecognized_opts=
+ac_unrecognized_sep=
+# The variables have the same names as the options, with
+# dashes changed to underlines.
+cache_file=/dev/null
+exec_prefix=NONE
+no_create=
+no_recursion=
+prefix=NONE
+program_prefix=NONE
+program_suffix=NONE
+program_transform_name=s,x,x,
+silent=
+site=
+srcdir=
+verbose=
+x_includes=NONE
+x_libraries=NONE
+
+# Installation directory options.
+# These are left unexpanded so users can "make install exec_prefix=/foo"
+# and all the variables that are supposed to be based on exec_prefix
+# by default will actually change.
+# Use braces instead of parens because sh, perl, etc. also accept them.
+# (The list follows the same order as the GNU Coding Standards.)
+bindir='${exec_prefix}/bin'
+sbindir='${exec_prefix}/sbin'
+libexecdir='${exec_prefix}/libexec'
+datarootdir='${prefix}/share'
+datadir='${datarootdir}'
+sysconfdir='${prefix}/etc'
+sharedstatedir='${prefix}/com'
+localstatedir='${prefix}/var'
+includedir='${prefix}/include'
+oldincludedir='/usr/include'
+docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
+infodir='${datarootdir}/info'
+htmldir='${docdir}'
+dvidir='${docdir}'
+pdfdir='${docdir}'
+psdir='${docdir}'
+libdir='${exec_prefix}/lib'
+localedir='${datarootdir}/locale'
+mandir='${datarootdir}/man'
+
+ac_prev=
+ac_dashdash=
+for ac_option
+do
+ # If the previous option needs an argument, assign it.
+ if test -n "$ac_prev"; then
+ eval $ac_prev=\$ac_option
+ ac_prev=
+ continue
+ fi
+
+ case $ac_option in
+ *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
+ *=) ac_optarg= ;;
+ *) ac_optarg=yes ;;
+ esac
+
+ # Accept the important Cygnus configure options, so we can diagnose typos.
+
+ case $ac_dashdash$ac_option in
+ --)
+ ac_dashdash=yes ;;
+
+ -bindir | --bindir | --bindi | --bind | --bin | --bi)
+ ac_prev=bindir ;;
+ -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
+ bindir=$ac_optarg ;;
+
+ -build | --build | --buil | --bui | --bu)
+ ac_prev=build_alias ;;
+ -build=* | --build=* | --buil=* | --bui=* | --bu=*)
+ build_alias=$ac_optarg ;;
+
+ -cache-file | --cache-file | --cache-fil | --cache-fi \
+ | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
+ ac_prev=cache_file ;;
+ -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
+ | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
+ cache_file=$ac_optarg ;;
+
+ --config-cache | -C)
+ cache_file=config.cache ;;
+
+ -datadir | --datadir | --datadi | --datad)
+ ac_prev=datadir ;;
+ -datadir=* | --datadir=* | --datadi=* | --datad=*)
+ datadir=$ac_optarg ;;
+
+ -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
+ | --dataroo | --dataro | --datar)
+ ac_prev=datarootdir ;;
+ -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
+ | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
+ datarootdir=$ac_optarg ;;
+
+ -disable-* | --disable-*)
+ ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
+ # Reject names that are not valid shell variable names.
+ expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
+ as_fn_error $? "invalid feature name: $ac_useropt"
+ ac_useropt_orig=$ac_useropt
+ ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
+ case $ac_user_opts in
+ *"
+"enable_$ac_useropt"
+"*) ;;
+ *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
+ ac_unrecognized_sep=', ';;
+ esac
+ eval enable_$ac_useropt=no ;;
+
+ -docdir | --docdir | --docdi | --doc | --do)
+ ac_prev=docdir ;;
+ -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
+ docdir=$ac_optarg ;;
+
+ -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
+ ac_prev=dvidir ;;
+ -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
+ dvidir=$ac_optarg ;;
+
+ -enable-* | --enable-*)
+ ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
+ # Reject names that are not valid shell variable names.
+ expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
+ as_fn_error $? "invalid feature name: $ac_useropt"
+ ac_useropt_orig=$ac_useropt
+ ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
+ case $ac_user_opts in
+ *"
+"enable_$ac_useropt"
+"*) ;;
+ *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
+ ac_unrecognized_sep=', ';;
+ esac
+ eval enable_$ac_useropt=\$ac_optarg ;;
+
+ -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
+ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
+ | --exec | --exe | --ex)
+ ac_prev=exec_prefix ;;
+ -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
+ | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
+ | --exec=* | --exe=* | --ex=*)
+ exec_prefix=$ac_optarg ;;
+
+ -gas | --gas | --ga | --g)
+ # Obsolete; use --with-gas.
+ with_gas=yes ;;
+
+ -help | --help | --hel | --he | -h)
+ ac_init_help=long ;;
+ -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
+ ac_init_help=recursive ;;
+ -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
+ ac_init_help=short ;;
+
+ -host | --host | --hos | --ho)
+ ac_prev=host_alias ;;
+ -host=* | --host=* | --hos=* | --ho=*)
+ host_alias=$ac_optarg ;;
+
+ -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
+ ac_prev=htmldir ;;
+ -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
+ | --ht=*)
+ htmldir=$ac_optarg ;;
+
+ -includedir | --includedir | --includedi | --included | --include \
+ | --includ | --inclu | --incl | --inc)
+ ac_prev=includedir ;;
+ -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
+ | --includ=* | --inclu=* | --incl=* | --inc=*)
+ includedir=$ac_optarg ;;
+
+ -infodir | --infodir | --infodi | --infod | --info | --inf)
+ ac_prev=infodir ;;
+ -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
+ infodir=$ac_optarg ;;
+
+ -libdir | --libdir | --libdi | --libd)
+ ac_prev=libdir ;;
+ -libdir=* | --libdir=* | --libdi=* | --libd=*)
+ libdir=$ac_optarg ;;
+
+ -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
+ | --libexe | --libex | --libe)
+ ac_prev=libexecdir ;;
+ -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
+ | --libexe=* | --libex=* | --libe=*)
+ libexecdir=$ac_optarg ;;
+
+ -localedir | --localedir | --localedi | --localed | --locale)
+ ac_prev=localedir ;;
+ -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
+ localedir=$ac_optarg ;;
+
+ -localstatedir | --localstatedir | --localstatedi | --localstated \
+ | --localstate | --localstat | --localsta | --localst | --locals)
+ ac_prev=localstatedir ;;
+ -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
+ | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
+ localstatedir=$ac_optarg ;;
+
+ -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
+ ac_prev=mandir ;;
+ -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
+ mandir=$ac_optarg ;;
+
+ -nfp | --nfp | --nf)
+ # Obsolete; use --without-fp.
+ with_fp=no ;;
+
+ -no-create | --no-create | --no-creat | --no-crea | --no-cre \
+ | --no-cr | --no-c | -n)
+ no_create=yes ;;
+
+ -no-recursion | --no-recursion | --no-recursio | --no-recursi \
+ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
+ no_recursion=yes ;;
+
+ -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
+ | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
+ | --oldin | --oldi | --old | --ol | --o)
+ ac_prev=oldincludedir ;;
+ -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
+ | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
+ | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
+ oldincludedir=$ac_optarg ;;
+
+ -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
+ ac_prev=prefix ;;
+ -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
+ prefix=$ac_optarg ;;
+
+ -program-prefix | --program-prefix | --program-prefi | --program-pref \
+ | --program-pre | --program-pr | --program-p)
+ ac_prev=program_prefix ;;
+ -program-prefix=* | --program-prefix=* | --program-prefi=* \
+ | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
+ program_prefix=$ac_optarg ;;
+
+ -program-suffix | --program-suffix | --program-suffi | --program-suff \
+ | --program-suf | --program-su | --program-s)
+ ac_prev=program_suffix ;;
+ -program-suffix=* | --program-suffix=* | --program-suffi=* \
+ | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
+ program_suffix=$ac_optarg ;;
+
+ -program-transform-name | --program-transform-name \
+ | --program-transform-nam | --program-transform-na \
+ | --program-transform-n | --program-transform- \
+ | --program-transform | --program-transfor \
+ | --program-transfo | --program-transf \
+ | --program-trans | --program-tran \
+ | --progr-tra | --program-tr | --program-t)
+ ac_prev=program_transform_name ;;
+ -program-transform-name=* | --program-transform-name=* \
+ | --program-transform-nam=* | --program-transform-na=* \
+ | --program-transform-n=* | --program-transform-=* \
+ | --program-transform=* | --program-transfor=* \
+ | --program-transfo=* | --program-transf=* \
+ | --program-trans=* | --program-tran=* \
+ | --progr-tra=* | --program-tr=* | --program-t=*)
+ program_transform_name=$ac_optarg ;;
+
+ -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
+ ac_prev=pdfdir ;;
+ -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
+ pdfdir=$ac_optarg ;;
+
+ -psdir | --psdir | --psdi | --psd | --ps)
+ ac_prev=psdir ;;
+ -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
+ psdir=$ac_optarg ;;
+
+ -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+ | -silent | --silent | --silen | --sile | --sil)
+ silent=yes ;;
+
+ -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
+ ac_prev=sbindir ;;
+ -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
+ | --sbi=* | --sb=*)
+ sbindir=$ac_optarg ;;
+
+ -sharedstatedir | --sharedstatedir | --sharedstatedi \
+ | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
+ | --sharedst | --shareds | --shared | --share | --shar \
+ | --sha | --sh)
+ ac_prev=sharedstatedir ;;
+ -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
+ | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
+ | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
+ | --sha=* | --sh=*)
+ sharedstatedir=$ac_optarg ;;
+
+ -site | --site | --sit)
+ ac_prev=site ;;
+ -site=* | --site=* | --sit=*)
+ site=$ac_optarg ;;
+
+ -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
+ ac_prev=srcdir ;;
+ -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
+ srcdir=$ac_optarg ;;
+
+ -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
+ | --syscon | --sysco | --sysc | --sys | --sy)
+ ac_prev=sysconfdir ;;
+ -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
+ | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
+ sysconfdir=$ac_optarg ;;
+
+ -target | --target | --targe | --targ | --tar | --ta | --t)
+ ac_prev=target_alias ;;
+ -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
+ target_alias=$ac_optarg ;;
+
+ -v | -verbose | --verbose | --verbos | --verbo | --verb)
+ verbose=yes ;;
+
+ -version | --version | --versio | --versi | --vers | -V)
+ ac_init_version=: ;;
+
+ -with-* | --with-*)
+ ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
+ # Reject names that are not valid shell variable names.
+ expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
+ as_fn_error $? "invalid package name: $ac_useropt"
+ ac_useropt_orig=$ac_useropt
+ ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
+ case $ac_user_opts in
+ *"
+"with_$ac_useropt"
+"*) ;;
+ *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
+ ac_unrecognized_sep=', ';;
+ esac
+ eval with_$ac_useropt=\$ac_optarg ;;
+
+ -without-* | --without-*)
+ ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
+ # Reject names that are not valid shell variable names.
+ expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
+ as_fn_error $? "invalid package name: $ac_useropt"
+ ac_useropt_orig=$ac_useropt
+ ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
+ case $ac_user_opts in
+ *"
+"with_$ac_useropt"
+"*) ;;
+ *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
+ ac_unrecognized_sep=', ';;
+ esac
+ eval with_$ac_useropt=no ;;
+
+ --x)
+ # Obsolete; use --with-x.
+ with_x=yes ;;
+
+ -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
+ | --x-incl | --x-inc | --x-in | --x-i)
+ ac_prev=x_includes ;;
+ -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
+ | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
+ x_includes=$ac_optarg ;;
+
+ -x-libraries | --x-libraries | --x-librarie | --x-librari \
+ | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
+ ac_prev=x_libraries ;;
+ -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
+ | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
+ x_libraries=$ac_optarg ;;
+
+ -*) as_fn_error $? "unrecognized option: \`$ac_option'
+Try \`$0 --help' for more information"
+ ;;
+
+ *=*)
+ ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
+ # Reject names that are not valid shell variable names.
+ case $ac_envvar in #(
+ '' | [0-9]* | *[!_$as_cr_alnum]* )
+ as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
+ esac
+ eval $ac_envvar=\$ac_optarg
+ export $ac_envvar ;;
+
+ *)
+ # FIXME: should be removed in autoconf 3.0.
+ $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
+ expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
+ $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
+ : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
+ ;;
+
+ esac
+done
+
+if test -n "$ac_prev"; then
+ ac_option=--`echo $ac_prev | sed 's/_/-/g'`
+ as_fn_error $? "missing argument to $ac_option"
+fi
+
+if test -n "$ac_unrecognized_opts"; then
+ case $enable_option_checking in
+ no) ;;
+ fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
+ *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
+ esac
+fi
+
+# Check all directory arguments for consistency.
+for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
+ datadir sysconfdir sharedstatedir localstatedir includedir \
+ oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
+ libdir localedir mandir
+do
+ eval ac_val=\$$ac_var
+ # Remove trailing slashes.
+ case $ac_val in
+ */ )
+ ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
+ eval $ac_var=\$ac_val;;
+ esac
+ # Be sure to have absolute directory names.
+ case $ac_val in
+ [\\/$]* | ?:[\\/]* ) continue;;
+ NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
+ esac
+ as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
+done
+
+# There might be people who depend on the old broken behavior: `$host'
+# used to hold the argument of --host etc.
+# FIXME: To remove some day.
+build=$build_alias
+host=$host_alias
+target=$target_alias
+
+# FIXME: To remove some day.
+if test "x$host_alias" != x; then
+ if test "x$build_alias" = x; then
+ cross_compiling=maybe
+ $as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host.
+ If a cross compiler is detected then cross compile mode will be used" >&2
+ elif test "x$build_alias" != "x$host_alias"; then
+ cross_compiling=yes
+ fi
+fi
+
+ac_tool_prefix=
+test -n "$host_alias" && ac_tool_prefix=$host_alias-
+
+test "$silent" = yes && exec 6>/dev/null
+
+
+ac_pwd=`pwd` && test -n "$ac_pwd" &&
+ac_ls_di=`ls -di .` &&
+ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
+ as_fn_error $? "working directory cannot be determined"
+test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
+ as_fn_error $? "pwd does not report name of working directory"
+
+
+# Find the source files, if location was not specified.
+if test -z "$srcdir"; then
+ ac_srcdir_defaulted=yes
+ # Try the directory containing this script, then the parent directory.
+ ac_confdir=`$as_dirname -- "$as_myself" ||
+$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$as_myself" : 'X\(//\)[^/]' \| \
+ X"$as_myself" : 'X\(//\)$' \| \
+ X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$as_myself" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)[^/].*/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+ srcdir=$ac_confdir
+ if test ! -r "$srcdir/$ac_unique_file"; then
+ srcdir=..
+ fi
+else
+ ac_srcdir_defaulted=no
+fi
+if test ! -r "$srcdir/$ac_unique_file"; then
+ test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
+ as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
+fi
+ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
+ac_abs_confdir=`(
+ cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
+ pwd)`
+# When building in place, set srcdir=.
+if test "$ac_abs_confdir" = "$ac_pwd"; then
+ srcdir=.
+fi
+# Remove unnecessary trailing slashes from srcdir.
+# Double slashes in file names in object file debugging info
+# mess up M-x gdb in Emacs.
+case $srcdir in
+*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
+esac
+for ac_var in $ac_precious_vars; do
+ eval ac_env_${ac_var}_set=\${${ac_var}+set}
+ eval ac_env_${ac_var}_value=\$${ac_var}
+ eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
+ eval ac_cv_env_${ac_var}_value=\$${ac_var}
+done
+
+#
+# Report the --help message.
+#
+if test "$ac_init_help" = "long"; then
+ # Omit some internal or obsolete options to make the list less imposing.
+ # This message is too long to be a string in the A/UX 3.1 sh.
+ cat <<_ACEOF
+\`configure' configures newlib 2.4.0 to adapt to many kinds of systems.
+
+Usage: $0 [OPTION]... [VAR=VALUE]...
+
+To assign environment variables (e.g., CC, CFLAGS...), specify them as
+VAR=VALUE. See below for descriptions of some of the useful variables.
+
+Defaults for the options are specified in brackets.
+
+Configuration:
+ -h, --help display this help and exit
+ --help=short display options specific to this package
+ --help=recursive display the short help of all the included packages
+ -V, --version display version information and exit
+ -q, --quiet, --silent do not print \`checking ...' messages
+ --cache-file=FILE cache test results in FILE [disabled]
+ -C, --config-cache alias for \`--cache-file=config.cache'
+ -n, --no-create do not create output files
+ --srcdir=DIR find the sources in DIR [configure dir or \`..']
+
+Installation directories:
+ --prefix=PREFIX install architecture-independent files in PREFIX
+ [$ac_default_prefix]
+ --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
+ [PREFIX]
+
+By default, \`make install' will install all the files in
+\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
+an installation prefix other than \`$ac_default_prefix' using \`--prefix',
+for instance \`--prefix=\$HOME'.
+
+For better control, use the options below.
+
+Fine tuning of the installation directories:
+ --bindir=DIR user executables [EPREFIX/bin]
+ --sbindir=DIR system admin executables [EPREFIX/sbin]
+ --libexecdir=DIR program executables [EPREFIX/libexec]
+ --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
+ --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
+ --localstatedir=DIR modifiable single-machine data [PREFIX/var]
+ --libdir=DIR object code libraries [EPREFIX/lib]
+ --includedir=DIR C header files [PREFIX/include]
+ --oldincludedir=DIR C header files for non-gcc [/usr/include]
+ --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
+ --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
+ --infodir=DIR info documentation [DATAROOTDIR/info]
+ --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
+ --mandir=DIR man documentation [DATAROOTDIR/man]
+ --docdir=DIR documentation root [DATAROOTDIR/doc/newlib]
+ --htmldir=DIR html documentation [DOCDIR]
+ --dvidir=DIR dvi documentation [DOCDIR]
+ --pdfdir=DIR pdf documentation [DOCDIR]
+ --psdir=DIR ps documentation [DOCDIR]
+_ACEOF
+
+ cat <<\_ACEOF
+
+Program names:
+ --program-prefix=PREFIX prepend PREFIX to installed program names
+ --program-suffix=SUFFIX append SUFFIX to installed program names
+ --program-transform-name=PROGRAM run sed PROGRAM on installed program names
+
+System types:
+ --build=BUILD configure for building on BUILD [guessed]
+ --host=HOST cross-compile to build programs to run on HOST [BUILD]
+_ACEOF
+fi
+
+if test -n "$ac_init_help"; then
+ case $ac_init_help in
+ short | recursive ) echo "Configuration of newlib 2.4.0:";;
+ esac
+ cat <<\_ACEOF
+
+Optional Features:
+ --disable-option-checking ignore unrecognized --enable/--with options
+ --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
+ --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
+ --enable-multilib build many library versions (default)
+ --enable-target-optspace optimize for space
+ --enable-malloc-debugging indicate malloc debugging requested
+ --enable-newlib-multithread enable support for multiple threads
+ --enable-newlib-iconv enable iconv library support
+ --enable-newlib-elix-level supply desired elix library level (1-4)
+ --disable-newlib-io-float disable printf/scanf family float support
+ --disable-newlib-supplied-syscalls disable newlib from supplying syscalls
+ --disable-dependency-tracking speeds up one-time build
+ --enable-dependency-tracking do not reject slow dependency extractors
+ --enable-maintainer-mode enable make rules and dependencies not useful
+ (and sometimes confusing) to the casual installer
+
+Some influential environment variables:
+ CCAS assembler compiler command (defaults to CC)
+ CCASFLAGS assembler compiler flags (defaults to CFLAGS)
+
+Use these variables to override the choices made by `configure' or to help
+it to find libraries and programs with nonstandard names/locations.
+
+Report bugs to the package provider.
+_ACEOF
+ac_status=$?
+fi
+
+if test "$ac_init_help" = "recursive"; then
+ # If there are subdirs, report their specific --help.
+ for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
+ test -d "$ac_dir" ||
+ { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
+ continue
+ ac_builddir=.
+
+case "$ac_dir" in
+.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
+*)
+ ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
+ # A ".." for each directory in $ac_dir_suffix.
+ ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
+ case $ac_top_builddir_sub in
+ "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
+ *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
+ esac ;;
+esac
+ac_abs_top_builddir=$ac_pwd
+ac_abs_builddir=$ac_pwd$ac_dir_suffix
+# for backward compatibility:
+ac_top_builddir=$ac_top_build_prefix
+
+case $srcdir in
+ .) # We are building in place.
+ ac_srcdir=.
+ ac_top_srcdir=$ac_top_builddir_sub
+ ac_abs_top_srcdir=$ac_pwd ;;
+ [\\/]* | ?:[\\/]* ) # Absolute name.
+ ac_srcdir=$srcdir$ac_dir_suffix;
+ ac_top_srcdir=$srcdir
+ ac_abs_top_srcdir=$srcdir ;;
+ *) # Relative name.
+ ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
+ ac_top_srcdir=$ac_top_build_prefix$srcdir
+ ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
+esac
+ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
+
+ cd "$ac_dir" || { ac_status=$?; continue; }
+ # Check for guested configure.
+ if test -f "$ac_srcdir/configure.gnu"; then
+ echo &&
+ $SHELL "$ac_srcdir/configure.gnu" --help=recursive
+ elif test -f "$ac_srcdir/configure"; then
+ echo &&
+ $SHELL "$ac_srcdir/configure" --help=recursive
+ else
+ $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
+ fi || ac_status=$?
+ cd "$ac_pwd" || { ac_status=$?; break; }
+ done
+fi
+
+test -n "$ac_init_help" && exit $ac_status
+if $ac_init_version; then
+ cat <<\_ACEOF
+newlib configure 2.4.0
+generated by GNU Autoconf 2.68
+
+Copyright (C) 2010 Free Software Foundation, Inc.
+This configure script is free software; the Free Software Foundation
+gives unlimited permission to copy, distribute and modify it.
+_ACEOF
+ exit
+fi
+
+## ------------------------ ##
+## Autoconf initialization. ##
+## ------------------------ ##
+
+# ac_fn_c_try_compile LINENO
+# --------------------------
+# Try to compile conftest.$ac_ext, and return whether this succeeded.
+ac_fn_c_try_compile ()
+{
+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ rm -f conftest.$ac_objext
+ if { { ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_compile") 2>conftest.err
+ ac_status=$?
+ if test -s conftest.err; then
+ grep -v '^ *+' conftest.err >conftest.er1
+ cat conftest.er1 >&5
+ mv -f conftest.er1 conftest.err
+ fi
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then :
+ ac_retval=0
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_retval=1
+fi
+ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+ as_fn_set_status $ac_retval
+
+} # ac_fn_c_try_compile
+cat >config.log <<_ACEOF
+This file contains any messages produced by compilers while
+running configure, to aid debugging if configure makes a mistake.
+
+It was created by newlib $as_me 2.4.0, which was
+generated by GNU Autoconf 2.68. Invocation command line was
+
+ $ $0 $@
+
+_ACEOF
+exec 5>>config.log
+{
+cat <<_ASUNAME
+## --------- ##
+## Platform. ##
+## --------- ##
+
+hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
+uname -m = `(uname -m) 2>/dev/null || echo unknown`
+uname -r = `(uname -r) 2>/dev/null || echo unknown`
+uname -s = `(uname -s) 2>/dev/null || echo unknown`
+uname -v = `(uname -v) 2>/dev/null || echo unknown`
+
+/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
+/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
+
+/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
+/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
+/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
+/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
+/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
+/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
+/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
+
+_ASUNAME
+
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ $as_echo "PATH: $as_dir"
+ done
+IFS=$as_save_IFS
+
+} >&5
+
+cat >&5 <<_ACEOF
+
+
+## ----------- ##
+## Core tests. ##
+## ----------- ##
+
+_ACEOF
+
+
+# Keep a trace of the command line.
+# Strip out --no-create and --no-recursion so they do not pile up.
+# Strip out --silent because we don't want to record it for future runs.
+# Also quote any args containing shell meta-characters.
+# Make two passes to allow for proper duplicate-argument suppression.
+ac_configure_args=
+ac_configure_args0=
+ac_configure_args1=
+ac_must_keep_next=false
+for ac_pass in 1 2
+do
+ for ac_arg
+ do
+ case $ac_arg in
+ -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
+ -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+ | -silent | --silent | --silen | --sile | --sil)
+ continue ;;
+ *\'*)
+ ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
+ esac
+ case $ac_pass in
+ 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
+ 2)
+ as_fn_append ac_configure_args1 " '$ac_arg'"
+ if test $ac_must_keep_next = true; then
+ ac_must_keep_next=false # Got value, back to normal.
+ else
+ case $ac_arg in
+ *=* | --config-cache | -C | -disable-* | --disable-* \
+ | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
+ | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
+ | -with-* | --with-* | -without-* | --without-* | --x)
+ case "$ac_configure_args0 " in
+ "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
+ esac
+ ;;
+ -* ) ac_must_keep_next=true ;;
+ esac
+ fi
+ as_fn_append ac_configure_args " '$ac_arg'"
+ ;;
+ esac
+ done
+done
+{ ac_configure_args0=; unset ac_configure_args0;}
+{ ac_configure_args1=; unset ac_configure_args1;}
+
+# When interrupted or exit'd, cleanup temporary files, and complete
+# config.log. We remove comments because anyway the quotes in there
+# would cause problems or look ugly.
+# WARNING: Use '\'' to represent an apostrophe within the trap.
+# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
+trap 'exit_status=$?
+ # Save into config.log some information that might help in debugging.
+ {
+ echo
+
+ $as_echo "## ---------------- ##
+## Cache variables. ##
+## ---------------- ##"
+ echo
+ # The following way of writing the cache mishandles newlines in values,
+(
+ for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
+ eval ac_val=\$$ac_var
+ case $ac_val in #(
+ *${as_nl}*)
+ case $ac_var in #(
+ *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
+$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
+ esac
+ case $ac_var in #(
+ _ | IFS | as_nl) ;; #(
+ BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
+ *) { eval $ac_var=; unset $ac_var;} ;;
+ esac ;;
+ esac
+ done
+ (set) 2>&1 |
+ case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
+ *${as_nl}ac_space=\ *)
+ sed -n \
+ "s/'\''/'\''\\\\'\'''\''/g;
+ s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
+ ;; #(
+ *)
+ sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
+ ;;
+ esac |
+ sort
+)
+ echo
+
+ $as_echo "## ----------------- ##
+## Output variables. ##
+## ----------------- ##"
+ echo
+ for ac_var in $ac_subst_vars
+ do
+ eval ac_val=\$$ac_var
+ case $ac_val in
+ *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
+ esac
+ $as_echo "$ac_var='\''$ac_val'\''"
+ done | sort
+ echo
+
+ if test -n "$ac_subst_files"; then
+ $as_echo "## ------------------- ##
+## File substitutions. ##
+## ------------------- ##"
+ echo
+ for ac_var in $ac_subst_files
+ do
+ eval ac_val=\$$ac_var
+ case $ac_val in
+ *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
+ esac
+ $as_echo "$ac_var='\''$ac_val'\''"
+ done | sort
+ echo
+ fi
+
+ if test -s confdefs.h; then
+ $as_echo "## ----------- ##
+## confdefs.h. ##
+## ----------- ##"
+ echo
+ cat confdefs.h
+ echo
+ fi
+ test "$ac_signal" != 0 &&
+ $as_echo "$as_me: caught signal $ac_signal"
+ $as_echo "$as_me: exit $exit_status"
+ } >&5
+ rm -f core *.core core.conftest.* &&
+ rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
+ exit $exit_status
+' 0
+for ac_signal in 1 2 13 15; do
+ trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
+done
+ac_signal=0
+
+# confdefs.h avoids OS command line length limits that DEFS can exceed.
+rm -f -r conftest* confdefs.h
+
+$as_echo "/* confdefs.h */" > confdefs.h
+
+# Predefined preprocessor variables.
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_NAME "$PACKAGE_NAME"
+_ACEOF
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
+_ACEOF
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_VERSION "$PACKAGE_VERSION"
+_ACEOF
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_STRING "$PACKAGE_STRING"
+_ACEOF
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
+_ACEOF
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_URL "$PACKAGE_URL"
+_ACEOF
+
+
+# Let the site file select an alternate cache file if it wants to.
+# Prefer an explicitly selected file to automatically selected ones.
+ac_site_file1=NONE
+ac_site_file2=NONE
+if test -n "$CONFIG_SITE"; then
+ # We do not want a PATH search for config.site.
+ case $CONFIG_SITE in #((
+ -*) ac_site_file1=./$CONFIG_SITE;;
+ */*) ac_site_file1=$CONFIG_SITE;;
+ *) ac_site_file1=./$CONFIG_SITE;;
+ esac
+elif test "x$prefix" != xNONE; then
+ ac_site_file1=$prefix/share/config.site
+ ac_site_file2=$prefix/etc/config.site
+else
+ ac_site_file1=$ac_default_prefix/share/config.site
+ ac_site_file2=$ac_default_prefix/etc/config.site
+fi
+for ac_site_file in "$ac_site_file1" "$ac_site_file2"
+do
+ test "x$ac_site_file" = xNONE && continue
+ if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
+$as_echo "$as_me: loading site script $ac_site_file" >&6;}
+ sed 's/^/| /' "$ac_site_file" >&5
+ . "$ac_site_file" \
+ || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "failed to load site script $ac_site_file
+See \`config.log' for more details" "$LINENO" 5; }
+ fi
+done
+
+if test -r "$cache_file"; then
+ # Some versions of bash will fail to source /dev/null (special files
+ # actually), so we avoid doing that. DJGPP emulates it as a regular file.
+ if test /dev/null != "$cache_file" && test -f "$cache_file"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
+$as_echo "$as_me: loading cache $cache_file" >&6;}
+ case $cache_file in
+ [\\/]* | ?:[\\/]* ) . "$cache_file";;
+ *) . "./$cache_file";;
+ esac
+ fi
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
+$as_echo "$as_me: creating cache $cache_file" >&6;}
+ >$cache_file
+fi
+
+# Check that the precious variables saved in the cache have kept the same
+# value.
+ac_cache_corrupted=false
+for ac_var in $ac_precious_vars; do
+ eval ac_old_set=\$ac_cv_env_${ac_var}_set
+ eval ac_new_set=\$ac_env_${ac_var}_set
+ eval ac_old_val=\$ac_cv_env_${ac_var}_value
+ eval ac_new_val=\$ac_env_${ac_var}_value
+ case $ac_old_set,$ac_new_set in
+ set,)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
+$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
+ ac_cache_corrupted=: ;;
+ ,set)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
+$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
+ ac_cache_corrupted=: ;;
+ ,);;
+ *)
+ if test "x$ac_old_val" != "x$ac_new_val"; then
+ # differences in whitespace do not lead to failure.
+ ac_old_val_w=`echo x $ac_old_val`
+ ac_new_val_w=`echo x $ac_new_val`
+ if test "$ac_old_val_w" != "$ac_new_val_w"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
+$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
+ ac_cache_corrupted=:
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
+$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
+ eval $ac_var=\$ac_old_val
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
+$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
+$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
+ fi;;
+ esac
+ # Pass precious variables to config.status.
+ if test "$ac_new_set" = set; then
+ case $ac_new_val in
+ *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
+ *) ac_arg=$ac_var=$ac_new_val ;;
+ esac
+ case " $ac_configure_args " in
+ *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
+ *) as_fn_append ac_configure_args " '$ac_arg'" ;;
+ esac
+ fi
+done
+if $ac_cache_corrupted; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
+$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
+ as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
+fi
+## -------------------- ##
+## Main body of script. ##
+## -------------------- ##
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+
+
+ac_aux_dir=
+for ac_dir in ../../../.. "$srcdir"/../../../..; do
+ if test -f "$ac_dir/install-sh"; then
+ ac_aux_dir=$ac_dir
+ ac_install_sh="$ac_aux_dir/install-sh -c"
+ break
+ elif test -f "$ac_dir/install.sh"; then
+ ac_aux_dir=$ac_dir
+ ac_install_sh="$ac_aux_dir/install.sh -c"
+ break
+ elif test -f "$ac_dir/shtool"; then
+ ac_aux_dir=$ac_dir
+ ac_install_sh="$ac_aux_dir/shtool install -c"
+ break
+ fi
+done
+if test -z "$ac_aux_dir"; then
+ as_fn_error $? "cannot find install-sh, install.sh, or shtool in ../../../.. \"$srcdir\"/../../../.." "$LINENO" 5
+fi
+
+# These three variables are undocumented and unsupported,
+# and are intended to be withdrawn in a future Autoconf release.
+# They can cause serious problems if a builder's source tree is in a directory
+# whose full name contains unusual characters.
+ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
+ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
+ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
+
+
+
+
+# Make sure we can run config.sub.
+$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
+ as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
+$as_echo_n "checking build system type... " >&6; }
+if ${ac_cv_build+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_build_alias=$build_alias
+test "x$ac_build_alias" = x &&
+ ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
+test "x$ac_build_alias" = x &&
+ as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
+ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
+ as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
+$as_echo "$ac_cv_build" >&6; }
+case $ac_cv_build in
+*-*-*) ;;
+*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
+esac
+build=$ac_cv_build
+ac_save_IFS=$IFS; IFS='-'
+set x $ac_cv_build
+shift
+build_cpu=$1
+build_vendor=$2
+shift; shift
+# Remember, the first character of IFS is used to create $*,
+# except with old shells:
+build_os=$*
+IFS=$ac_save_IFS
+case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
+$as_echo_n "checking host system type... " >&6; }
+if ${ac_cv_host+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test "x$host_alias" = x; then
+ ac_cv_host=$ac_cv_build
+else
+ ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
+ as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
+$as_echo "$ac_cv_host" >&6; }
+case $ac_cv_host in
+*-*-*) ;;
+*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
+esac
+host=$ac_cv_host
+ac_save_IFS=$IFS; IFS='-'
+set x $ac_cv_host
+shift
+host_cpu=$1
+host_vendor=$2
+shift; shift
+# Remember, the first character of IFS is used to create $*,
+# except with old shells:
+host_os=$*
+IFS=$ac_save_IFS
+case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
+
+
+am__api_version='1.11'
+
+# Find a good install program. We prefer a C program (faster),
+# so one script is as good as another. But avoid the broken or
+# incompatible versions:
+# SysV /etc/install, /usr/sbin/install
+# SunOS /usr/etc/install
+# IRIX /sbin/install
+# AIX /bin/install
+# AmigaOS /C/install, which installs bootblocks on floppy discs
+# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
+# AFS /usr/afsws/bin/install, which mishandles nonexistent args
+# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
+# OS/2's system install, which has a completely different semantic
+# ./install, which can be erroneously created by make from ./install.sh.
+# Reject install programs that cannot install multiple files.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
+$as_echo_n "checking for a BSD-compatible install... " >&6; }
+if test -z "$INSTALL"; then
+if ${ac_cv_path_install+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ # Account for people who put trailing slashes in PATH elements.
+case $as_dir/ in #((
+ ./ | .// | /[cC]/* | \
+ /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
+ ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
+ /usr/ucb/* ) ;;
+ *)
+ # OSF1 and SCO ODT 3.0 have their own names for install.
+ # Don't use installbsd from OSF since it installs stuff as root
+ # by default.
+ for ac_prog in ginstall scoinst install; do
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
+ if test $ac_prog = install &&
+ grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
+ # AIX install. It has an incompatible calling convention.
+ :
+ elif test $ac_prog = install &&
+ grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
+ # program-specific install script used by HP pwplus--don't use.
+ :
+ else
+ rm -rf conftest.one conftest.two conftest.dir
+ echo one > conftest.one
+ echo two > conftest.two
+ mkdir conftest.dir
+ if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
+ test -s conftest.one && test -s conftest.two &&
+ test -s conftest.dir/conftest.one &&
+ test -s conftest.dir/conftest.two
+ then
+ ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
+ break 3
+ fi
+ fi
+ fi
+ done
+ done
+ ;;
+esac
+
+ done
+IFS=$as_save_IFS
+
+rm -rf conftest.one conftest.two conftest.dir
+
+fi
+ if test "${ac_cv_path_install+set}" = set; then
+ INSTALL=$ac_cv_path_install
+ else
+ # As a last resort, use the slow shell script. Don't cache a
+ # value for INSTALL within a source directory, because that will
+ # break other packages using the cache if that directory is
+ # removed, or if the value is a relative name.
+ INSTALL=$ac_install_sh
+ fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
+$as_echo "$INSTALL" >&6; }
+
+# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
+# It thinks the first close brace ends the variable substitution.
+test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
+
+test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
+
+test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5
+$as_echo_n "checking whether build environment is sane... " >&6; }
+# Just in case
+sleep 1
+echo timestamp > conftest.file
+# Reject unsafe characters in $srcdir or the absolute working directory
+# name. Accept space and tab only in the latter.
+am_lf='
+'
+case `pwd` in
+ *[\\\"\#\$\&\'\`$am_lf]*)
+ as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5;;
+esac
+case $srcdir in
+ *[\\\"\#\$\&\'\`$am_lf\ \ ]*)
+ as_fn_error $? "unsafe srcdir value: \`$srcdir'" "$LINENO" 5;;
+esac
+
+# Do `set' in a subshell so we don't clobber the current shell's
+# arguments. Must try -L first in case configure is actually a
+# symlink; some systems play weird games with the mod time of symlinks
+# (eg FreeBSD returns the mod time of the symlink's containing
+# directory).
+if (
+ set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
+ if test "$*" = "X"; then
+ # -L didn't work.
+ set X `ls -t "$srcdir/configure" conftest.file`
+ fi
+ rm -f conftest.file
+ if test "$*" != "X $srcdir/configure conftest.file" \
+ && test "$*" != "X conftest.file $srcdir/configure"; then
+
+ # If neither matched, then we have a broken ls. This can happen
+ # if, for instance, CONFIG_SHELL is bash and it inherits a
+ # broken ls alias from the environment. This has actually
+ # happened. Such a system could not be considered "sane".
+ as_fn_error $? "ls -t appears to fail. Make sure there is not a broken
+alias in your environment" "$LINENO" 5
+ fi
+
+ test "$2" = conftest.file
+ )
+then
+ # Ok.
+ :
+else
+ as_fn_error $? "newly created file is older than distributed files!
+Check your system clock" "$LINENO" 5
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+test "$program_prefix" != NONE &&
+ program_transform_name="s&^&$program_prefix&;$program_transform_name"
+# Use a double $ so make ignores it.
+test "$program_suffix" != NONE &&
+ program_transform_name="s&\$&$program_suffix&;$program_transform_name"
+# Double any \ or $.
+# By default was `s,x,x', remove it if useless.
+ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
+program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"`
+
+# expand $ac_aux_dir to an absolute path
+am_aux_dir=`cd $ac_aux_dir && pwd`
+
+if test x"${MISSING+set}" != xset; then
+ case $am_aux_dir in
+ *\ * | *\ *)
+ MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
+ *)
+ MISSING="\${SHELL} $am_aux_dir/missing" ;;
+ esac
+fi
+# Use eval to expand $SHELL
+if eval "$MISSING --run true"; then
+ am_missing_run="$MISSING --run "
+else
+ am_missing_run=
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`missing' script is too old or missing" >&5
+$as_echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;}
+fi
+
+if test x"${install_sh}" != xset; then
+ case $am_aux_dir in
+ *\ * | *\ *)
+ install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
+ *)
+ install_sh="\${SHELL} $am_aux_dir/install-sh"
+ esac
+fi
+
+# Installed binaries are usually stripped using `strip' when the user
+# run `make install-strip'. However `strip' might not be the right
+# tool to use in cross-compilation environments, therefore Automake
+# will honor the `STRIP' environment variable to overrule this program.
+if test "$cross_compiling" != no; then
+ if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
+set dummy ${ac_tool_prefix}strip; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_STRIP+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$STRIP"; then
+ ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_STRIP="${ac_tool_prefix}strip"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+STRIP=$ac_cv_prog_STRIP
+if test -n "$STRIP"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
+$as_echo "$STRIP" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_STRIP"; then
+ ac_ct_STRIP=$STRIP
+ # Extract the first word of "strip", so it can be a program name with args.
+set dummy strip; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_ct_STRIP"; then
+ ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_ac_ct_STRIP="strip"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
+if test -n "$ac_ct_STRIP"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
+$as_echo "$ac_ct_STRIP" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+ if test "x$ac_ct_STRIP" = x; then
+ STRIP=":"
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ STRIP=$ac_ct_STRIP
+ fi
+else
+ STRIP="$ac_cv_prog_STRIP"
+fi
+
+fi
+INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
+$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
+if test -z "$MKDIR_P"; then
+ if ${ac_cv_path_mkdir+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_prog in mkdir gmkdir; do
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; } || continue
+ case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
+ 'mkdir (GNU coreutils) '* | \
+ 'mkdir (coreutils) '* | \
+ 'mkdir (fileutils) '4.1*)
+ ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
+ break 3;;
+ esac
+ done
+ done
+ done
+IFS=$as_save_IFS
+
+fi
+
+ test -d ./--version && rmdir ./--version
+ if test "${ac_cv_path_mkdir+set}" = set; then
+ MKDIR_P="$ac_cv_path_mkdir -p"
+ else
+ # As a last resort, use the slow shell script. Don't cache a
+ # value for MKDIR_P within a source directory, because that will
+ # break other packages using the cache if that directory is
+ # removed, or if the value is a relative name.
+ MKDIR_P="$ac_install_sh -d"
+ fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
+$as_echo "$MKDIR_P" >&6; }
+
+mkdir_p="$MKDIR_P"
+case $mkdir_p in
+ [\\/$]* | ?:[\\/]*) ;;
+ */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
+esac
+
+for ac_prog in gawk mawk nawk awk
+do
+ # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_AWK+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$AWK"; then
+ ac_cv_prog_AWK="$AWK" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_AWK="$ac_prog"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+AWK=$ac_cv_prog_AWK
+if test -n "$AWK"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
+$as_echo "$AWK" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+ test -n "$AWK" && break
+done
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
+$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
+set x ${MAKE-make}
+ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
+if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat >conftest.make <<\_ACEOF
+SHELL = /bin/sh
+all:
+ @echo '@@@%%%=$(MAKE)=@@@%%%'
+_ACEOF
+# GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
+case `${MAKE-make} -f conftest.make 2>/dev/null` in
+ *@@@%%%=?*=@@@%%%*)
+ eval ac_cv_prog_make_${ac_make}_set=yes;;
+ *)
+ eval ac_cv_prog_make_${ac_make}_set=no;;
+esac
+rm -f conftest.make
+fi
+if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+ SET_MAKE=
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+ SET_MAKE="MAKE=${MAKE-make}"
+fi
+
+rm -rf .tst 2>/dev/null
+mkdir .tst 2>/dev/null
+if test -d .tst; then
+ am__leading_dot=.
+else
+ am__leading_dot=_
+fi
+rmdir .tst 2>/dev/null
+
+DEPDIR="${am__leading_dot}deps"
+
+ac_config_commands="$ac_config_commands depfiles"
+
+
+am_make=${MAKE-make}
+cat > confinc << 'END'
+am__doit:
+ @echo this is the am__doit target
+.PHONY: am__doit
+END
+# If we don't find an include directive, just comment out the code.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5
+$as_echo_n "checking for style of include used by $am_make... " >&6; }
+am__include="#"
+am__quote=
+_am_result=none
+# First try GNU make style include.
+echo "include confinc" > confmf
+# Ignore all kinds of additional output from `make'.
+case `$am_make -s -f confmf 2> /dev/null` in #(
+*the\ am__doit\ target*)
+ am__include=include
+ am__quote=
+ _am_result=GNU
+ ;;
+esac
+# Now try BSD make style include.
+if test "$am__include" = "#"; then
+ echo '.include "confinc"' > confmf
+ case `$am_make -s -f confmf 2> /dev/null` in #(
+ *the\ am__doit\ target*)
+ am__include=.include
+ am__quote="\""
+ _am_result=BSD
+ ;;
+ esac
+fi
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5
+$as_echo "$_am_result" >&6; }
+rm -f confinc confmf
+
+# Check whether --enable-dependency-tracking was given.
+if test "${enable_dependency_tracking+set}" = set; then :
+ enableval=$enable_dependency_tracking;
+fi
+
+if test "x$enable_dependency_tracking" != xno; then
+ am_depcomp="$ac_aux_dir/depcomp"
+ AMDEPBACKSLASH='\'
+ am__nodep='_no'
+fi
+ if test "x$enable_dependency_tracking" != xno; then
+ AMDEP_TRUE=
+ AMDEP_FALSE='#'
+else
+ AMDEP_TRUE='#'
+ AMDEP_FALSE=
+fi
+
+
+
+# Check whether --enable-multilib was given.
+if test "${enable_multilib+set}" = set; then :
+ enableval=$enable_multilib; case "${enableval}" in
+ yes) multilib=yes ;;
+ no) multilib=no ;;
+ *) as_fn_error $? "bad value ${enableval} for multilib option" "$LINENO" 5 ;;
+ esac
+else
+ multilib=yes
+fi
+
+# Check whether --enable-target-optspace was given.
+if test "${enable_target_optspace+set}" = set; then :
+ enableval=$enable_target_optspace; case "${enableval}" in
+ yes) target_optspace=yes ;;
+ no) target_optspace=no ;;
+ *) as_fn_error $? "bad value ${enableval} for target-optspace option" "$LINENO" 5 ;;
+ esac
+else
+ target_optspace=
+fi
+
+# Check whether --enable-malloc-debugging was given.
+if test "${enable_malloc_debugging+set}" = set; then :
+ enableval=$enable_malloc_debugging; case "${enableval}" in
+ yes) malloc_debugging=yes ;;
+ no) malloc_debugging=no ;;
+ *) as_fn_error $? "bad value ${enableval} for malloc-debugging option" "$LINENO" 5 ;;
+ esac
+else
+ malloc_debugging=
+fi
+
+# Check whether --enable-newlib-multithread was given.
+if test "${enable_newlib_multithread+set}" = set; then :
+ enableval=$enable_newlib_multithread; case "${enableval}" in
+ yes) newlib_multithread=yes ;;
+ no) newlib_multithread=no ;;
+ *) as_fn_error $? "bad value ${enableval} for newlib-multithread option" "$LINENO" 5 ;;
+ esac
+else
+ newlib_multithread=yes
+fi
+
+# Check whether --enable-newlib-iconv was given.
+if test "${enable_newlib_iconv+set}" = set; then :
+ enableval=$enable_newlib_iconv; if test "${newlib_iconv+set}" != set; then
+ case "${enableval}" in
+ yes) newlib_iconv=yes ;;
+ no) newlib_iconv=no ;;
+ *) as_fn_error $? "bad value ${enableval} for newlib-iconv option" "$LINENO" 5 ;;
+ esac
+ fi
+else
+ newlib_iconv=${newlib_iconv}
+fi
+
+# Check whether --enable-newlib-elix-level was given.
+if test "${enable_newlib_elix_level+set}" = set; then :
+ enableval=$enable_newlib_elix_level; case "${enableval}" in
+ 0) newlib_elix_level=0 ;;
+ 1) newlib_elix_level=1 ;;
+ 2) newlib_elix_level=2 ;;
+ 3) newlib_elix_level=3 ;;
+ 4) newlib_elix_level=4 ;;
+ *) as_fn_error $? "bad value ${enableval} for newlib-elix-level option" "$LINENO" 5 ;;
+ esac
+else
+ newlib_elix_level=0
+fi
+
+# Check whether --enable-newlib-io-float was given.
+if test "${enable_newlib_io_float+set}" = set; then :
+ enableval=$enable_newlib_io_float; case "${enableval}" in
+ yes) newlib_io_float=yes ;;
+ no) newlib_io_float=no ;;
+ *) as_fn_error $? "bad value ${enableval} for newlib-io-float option" "$LINENO" 5 ;;
+ esac
+else
+ newlib_io_float=yes
+fi
+
+# Check whether --enable-newlib-supplied-syscalls was given.
+if test "${enable_newlib_supplied_syscalls+set}" = set; then :
+ enableval=$enable_newlib_supplied_syscalls; case "${enableval}" in
+ yes) newlib_may_supply_syscalls=yes ;;
+ no) newlib_may_supply_syscalls=no ;;
+ *) as_fn_error $? "bad value ${enableval} for newlib-supplied-syscalls option" "$LINENO" 5 ;;
+ esac
+else
+ newlib_may_supply_syscalls=yes
+fi
+
+ if test x${newlib_may_supply_syscalls} = xyes; then
+ MAY_SUPPLY_SYSCALLS_TRUE=
+ MAY_SUPPLY_SYSCALLS_FALSE='#'
+else
+ MAY_SUPPLY_SYSCALLS_TRUE='#'
+ MAY_SUPPLY_SYSCALLS_FALSE=
+fi
+
+
+
+test -z "${with_target_subdir}" && with_target_subdir=.
+
+if test "${srcdir}" = "."; then
+ if test "${with_target_subdir}" != "."; then
+ newlib_basedir="${srcdir}/${with_multisrctop}../../../.."
+ else
+ newlib_basedir="${srcdir}/${with_multisrctop}../../.."
+ fi
+else
+ newlib_basedir="${srcdir}/../../.."
+fi
+
+
+
+
+if test "`cd $srcdir && pwd`" != "`pwd`"; then
+ # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
+ # is not polluted with repeated "-I."
+ am__isrc=' -I$(srcdir)'
+ # test to see if srcdir already configured
+ if test -f $srcdir/config.status; then
+ as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5
+ fi
+fi
+
+# test whether we have cygpath
+if test -z "$CYGPATH_W"; then
+ if (cygpath --version) >/dev/null 2>/dev/null; then
+ CYGPATH_W='cygpath -w'
+ else
+ CYGPATH_W=echo
+ fi
+fi
+
+
+# Define the identity of the package.
+ PACKAGE='newlib'
+ VERSION='2.4.0'
+
+
+# Some tools Automake needs.
+
+ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"}
+
+
+AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"}
+
+
+AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"}
+
+
+AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"}
+
+
+MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
+
+# We need awk for the "check" target. The system "awk" is bad on
+# some platforms.
+# Always define AMTAR for backward compatibility. Yes, it's still used
+# in the wild :-( We should find a proper way to deprecate it ...
+AMTAR='$${TAR-tar}'
+
+am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'
+
+
+
+
+
+
+# FIXME: We temporarily define our own version of AC_PROG_CC. This is
+# copied from autoconf 2.12, but does not call AC_PROG_CC_WORKS. We
+# are probably using a cross compiler, which will not be able to fully
+# link an executable. This should really be fixed in autoconf
+# itself.
+
+
+
+
+
+
+
+# Extract the first word of "gcc", so it can be a program name with args.
+set dummy gcc; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_CC+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_CC="gcc"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+$as_echo "$CC" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+
+depcc="$CC" am_compiler_list=
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
+$as_echo_n "checking dependency style of $depcc... " >&6; }
+if ${am_cv_CC_dependencies_compiler_type+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
+ # We make a subdir and do the tests there. Otherwise we can end up
+ # making bogus files that we don't know about and never remove. For
+ # instance it was reported that on HP-UX the gcc test will end up
+ # making a dummy file named `D' -- because `-MD' means `put the output
+ # in D'.
+ rm -rf conftest.dir
+ mkdir conftest.dir
+ # Copy depcomp to subdir because otherwise we won't find it if we're
+ # using a relative directory.
+ cp "$am_depcomp" conftest.dir
+ cd conftest.dir
+ # We will build objects and dependencies in a subdirectory because
+ # it helps to detect inapplicable dependency modes. For instance
+ # both Tru64's cc and ICC support -MD to output dependencies as a
+ # side effect of compilation, but ICC will put the dependencies in
+ # the current directory while Tru64 will put them in the object
+ # directory.
+ mkdir sub
+
+ am_cv_CC_dependencies_compiler_type=none
+ if test "$am_compiler_list" = ""; then
+ am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
+ fi
+ am__universal=false
+ case " $depcc " in #(
+ *\ -arch\ *\ -arch\ *) am__universal=true ;;
+ esac
+
+ for depmode in $am_compiler_list; do
+ # Setup a source with many dependencies, because some compilers
+ # like to wrap large dependency lists on column 80 (with \), and
+ # we should not choose a depcomp mode which is confused by this.
+ #
+ # We need to recreate these files for each test, as the compiler may
+ # overwrite some of them when testing with obscure command lines.
+ # This happens at least with the AIX C compiler.
+ : > sub/conftest.c
+ for i in 1 2 3 4 5 6; do
+ echo '#include "conftst'$i'.h"' >> sub/conftest.c
+ # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
+ # Solaris 8's {/usr,}/bin/sh.
+ touch sub/conftst$i.h
+ done
+ echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
+
+ # We check with `-c' and `-o' for the sake of the "dashmstdout"
+ # mode. It turns out that the SunPro C++ compiler does not properly
+ # handle `-M -o', and we need to detect this. Also, some Intel
+ # versions had trouble with output in subdirs
+ am__obj=sub/conftest.${OBJEXT-o}
+ am__minus_obj="-o $am__obj"
+ case $depmode in
+ gcc)
+ # This depmode causes a compiler race in universal mode.
+ test "$am__universal" = false || continue
+ ;;
+ nosideeffect)
+ # after this tag, mechanisms are not by side-effect, so they'll
+ # only be used when explicitly requested
+ if test "x$enable_dependency_tracking" = xyes; then
+ continue
+ else
+ break
+ fi
+ ;;
+ msvc7 | msvc7msys | msvisualcpp | msvcmsys)
+ # This compiler won't grok `-c -o', but also, the minuso test has
+ # not run yet. These depmodes are late enough in the game, and
+ # so weak that their functioning should not be impacted.
+ am__obj=conftest.${OBJEXT-o}
+ am__minus_obj=
+ ;;
+ none) break ;;
+ esac
+ if depmode=$depmode \
+ source=sub/conftest.c object=$am__obj \
+ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
+ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
+ >/dev/null 2>conftest.err &&
+ grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
+ grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
+ grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
+ ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
+ # icc doesn't choke on unknown options, it will just issue warnings
+ # or remarks (even with -Werror). So we grep stderr for any message
+ # that says an option was ignored or not supported.
+ # When given -MP, icc 7.0 and 7.1 complain thusly:
+ # icc: Command line warning: ignoring option '-M'; no argument required
+ # The diagnosis changed in icc 8.0:
+ # icc: Command line remark: option '-MP' not supported
+ if (grep 'ignoring option' conftest.err ||
+ grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
+ am_cv_CC_dependencies_compiler_type=$depmode
+ break
+ fi
+ fi
+ done
+
+ cd ..
+ rm -rf conftest.dir
+else
+ am_cv_CC_dependencies_compiler_type=none
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
+$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; }
+CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
+
+ if
+ test "x$enable_dependency_tracking" != xno \
+ && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then
+ am__fastdepCC_TRUE=
+ am__fastdepCC_FALSE='#'
+else
+ am__fastdepCC_TRUE='#'
+ am__fastdepCC_FALSE=
+fi
+
+
+if test -z "$CC"; then
+ # Extract the first word of "cc", so it can be a program name with args.
+set dummy cc; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_CC+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+ ac_prog_rejected=no
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
+ ac_prog_rejected=yes
+ continue
+ fi
+ ac_cv_prog_CC="cc"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+if test $ac_prog_rejected = yes; then
+ # We found a bogon in the path, so make sure we never use it.
+ set dummy $ac_cv_prog_CC
+ shift
+ if test $# != 0; then
+ # We chose a different compiler from the bogus one.
+ # However, it has the same basename, so the bogon will be chosen
+ # first if we set CC to just the basename; use the full file name.
+ shift
+ ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
+ fi
+fi
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+$as_echo "$CC" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+ test -z "$CC" && as_fn_error $? "no acceptable cc found in \$PATH" "$LINENO" 5
+fi
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using GNU C" >&5
+$as_echo_n "checking whether we are using GNU C... " >&6; }
+if ${ac_cv_c_compiler_gnu+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat > conftest.c <<EOF
+#ifdef __GNUC__
+ yes;
+#endif
+EOF
+if { ac_try='${CC-cc} -E conftest.c'
+ { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; } | egrep yes >/dev/null 2>&1; then
+ ac_cv_c_compiler_gnu=yes
+else
+ ac_cv_c_compiler_gnu=no
+fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
+$as_echo "$ac_cv_c_compiler_gnu" >&6; }
+
+if test $ac_cv_c_compiler_gnu = yes; then
+ GCC=yes
+ ac_test_CFLAGS="${CFLAGS+set}"
+ ac_save_CFLAGS="$CFLAGS"
+ ac_test_CFLAGS=${CFLAGS+set}
+ac_save_CFLAGS=$CFLAGS
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
+$as_echo_n "checking whether $CC accepts -g... " >&6; }
+if ${ac_cv_prog_cc_g+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_save_c_werror_flag=$ac_c_werror_flag
+ ac_c_werror_flag=yes
+ ac_cv_prog_cc_g=no
+ CFLAGS="-g"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ ac_cv_prog_cc_g=yes
+else
+ CFLAGS=""
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+
+else
+ ac_c_werror_flag=$ac_save_c_werror_flag
+ CFLAGS="-g"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ ac_cv_prog_cc_g=yes
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ ac_c_werror_flag=$ac_save_c_werror_flag
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
+$as_echo "$ac_cv_prog_cc_g" >&6; }
+if test "$ac_test_CFLAGS" = set; then
+ CFLAGS=$ac_save_CFLAGS
+elif test $ac_cv_prog_cc_g = yes; then
+ if test "$GCC" = yes; then
+ CFLAGS="-g -O2"
+ else
+ CFLAGS="-g"
+ fi
+else
+ if test "$GCC" = yes; then
+ CFLAGS="-O2"
+ else
+ CFLAGS=
+ fi
+fi
+ if test "$ac_test_CFLAGS" = set; then
+ CFLAGS="$ac_save_CFLAGS"
+ elif test $ac_cv_prog_cc_g = yes; then
+ CFLAGS="-g -O2"
+ else
+ CFLAGS="-O2"
+ fi
+else
+ GCC=
+ test "${CFLAGS+set}" = set || CFLAGS="-g"
+fi
+
+
+if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args.
+set dummy ${ac_tool_prefix}as; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_AS+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$AS"; then
+ ac_cv_prog_AS="$AS" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_AS="${ac_tool_prefix}as"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+AS=$ac_cv_prog_AS
+if test -n "$AS"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
+$as_echo "$AS" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_AS"; then
+ ac_ct_AS=$AS
+ # Extract the first word of "as", so it can be a program name with args.
+set dummy as; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_AS+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_ct_AS"; then
+ ac_cv_prog_ac_ct_AS="$ac_ct_AS" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_ac_ct_AS="as"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_AS=$ac_cv_prog_ac_ct_AS
+if test -n "$ac_ct_AS"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AS" >&5
+$as_echo "$ac_ct_AS" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+ if test "x$ac_ct_AS" = x; then
+ AS=""
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ AS=$ac_ct_AS
+ fi
+else
+ AS="$ac_cv_prog_AS"
+fi
+
+if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
+set dummy ${ac_tool_prefix}ar; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_AR+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$AR"; then
+ ac_cv_prog_AR="$AR" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_AR="${ac_tool_prefix}ar"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+AR=$ac_cv_prog_AR
+if test -n "$AR"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
+$as_echo "$AR" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_AR"; then
+ ac_ct_AR=$AR
+ # Extract the first word of "ar", so it can be a program name with args.
+set dummy ar; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_AR+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_ct_AR"; then
+ ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_ac_ct_AR="ar"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_AR=$ac_cv_prog_ac_ct_AR
+if test -n "$ac_ct_AR"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
+$as_echo "$ac_ct_AR" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+ if test "x$ac_ct_AR" = x; then
+ AR=""
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ AR=$ac_ct_AR
+ fi
+else
+ AR="$ac_cv_prog_AR"
+fi
+
+if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
+set dummy ${ac_tool_prefix}ranlib; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_RANLIB+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$RANLIB"; then
+ ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+RANLIB=$ac_cv_prog_RANLIB
+if test -n "$RANLIB"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
+$as_echo "$RANLIB" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_RANLIB"; then
+ ac_ct_RANLIB=$RANLIB
+ # Extract the first word of "ranlib", so it can be a program name with args.
+set dummy ranlib; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_ct_RANLIB"; then
+ ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_ac_ct_RANLIB="ranlib"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
+if test -n "$ac_ct_RANLIB"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
+$as_echo "$ac_ct_RANLIB" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+ if test "x$ac_ct_RANLIB" = x; then
+ RANLIB=":"
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ RANLIB=$ac_ct_RANLIB
+ fi
+else
+ RANLIB="$ac_cv_prog_RANLIB"
+fi
+
+if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}readelf", so it can be a program name with args.
+set dummy ${ac_tool_prefix}readelf; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_READELF+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$READELF"; then
+ ac_cv_prog_READELF="$READELF" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_READELF="${ac_tool_prefix}readelf"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+READELF=$ac_cv_prog_READELF
+if test -n "$READELF"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
+$as_echo "$READELF" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_READELF"; then
+ ac_ct_READELF=$READELF
+ # Extract the first word of "readelf", so it can be a program name with args.
+set dummy readelf; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_READELF+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_ct_READELF"; then
+ ac_cv_prog_ac_ct_READELF="$ac_ct_READELF" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_ac_ct_READELF="readelf"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_READELF=$ac_cv_prog_ac_ct_READELF
+if test -n "$ac_ct_READELF"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_READELF" >&5
+$as_echo "$ac_ct_READELF" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+ if test "x$ac_ct_READELF" = x; then
+ READELF=":"
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ READELF=$ac_ct_READELF
+ fi
+else
+ READELF="$ac_cv_prog_READELF"
+fi
+
+
+
+
+# Hack to ensure that INSTALL won't be set to "../" with autoconf 2.13. */
+ac_given_INSTALL=$INSTALL
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5
+$as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; }
+ # Check whether --enable-maintainer-mode was given.
+if test "${enable_maintainer_mode+set}" = set; then :
+ enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval
+else
+ USE_MAINTAINER_MODE=no
+fi
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_MAINTAINER_MODE" >&5
+$as_echo "$USE_MAINTAINER_MODE" >&6; }
+ if test $USE_MAINTAINER_MODE = yes; then
+ MAINTAINER_MODE_TRUE=
+ MAINTAINER_MODE_FALSE='#'
+else
+ MAINTAINER_MODE_TRUE='#'
+ MAINTAINER_MODE_FALSE=
+fi
+
+ MAINT=$MAINTAINER_MODE_TRUE
+
+
+# By default we simply use the C compiler to build assembly code.
+
+test "${CCAS+set}" = set || CCAS=$CC
+test "${CCASFLAGS+set}" = set || CCASFLAGS=$CFLAGS
+
+
+
+
+# We need AC_EXEEXT to keep automake happy in cygnus mode. However,
+# at least currently, we never actually build a program, so we never
+# need to use $(EXEEXT). Moreover, the test for EXEEXT normally
+# fails, because we are probably configuring with a cross compiler
+# which can't create executables. So we include AC_EXEEXT to keep
+# automake happy, but we don't execute it, since we don't care about
+# the result.
+if false; then
+
+ dummy_var=1
+fi
+
+. ${newlib_basedir}/configure.host
+
+newlib_cflags="${newlib_cflags} -fno-builtin"
+
+NEWLIB_CFLAGS=${newlib_cflags}
+
+
+NO_INCLUDE_LIST=${noinclude}
+
+
+LDFLAGS=${ldflags}
+
+
+ if test x${newlib_elix_level} = x0; then
+ ELIX_LEVEL_0_TRUE=
+ ELIX_LEVEL_0_FALSE='#'
+else
+ ELIX_LEVEL_0_TRUE='#'
+ ELIX_LEVEL_0_FALSE=
+fi
+
+ if test x${newlib_elix_level} = x1; then
+ ELIX_LEVEL_1_TRUE=
+ ELIX_LEVEL_1_FALSE='#'
+else
+ ELIX_LEVEL_1_TRUE='#'
+ ELIX_LEVEL_1_FALSE=
+fi
+
+ if test x${newlib_elix_level} = x2; then
+ ELIX_LEVEL_2_TRUE=
+ ELIX_LEVEL_2_FALSE='#'
+else
+ ELIX_LEVEL_2_TRUE='#'
+ ELIX_LEVEL_2_FALSE=
+fi
+
+ if test x${newlib_elix_level} = x3; then
+ ELIX_LEVEL_3_TRUE=
+ ELIX_LEVEL_3_FALSE='#'
+else
+ ELIX_LEVEL_3_TRUE='#'
+ ELIX_LEVEL_3_FALSE=
+fi
+
+ if test x${newlib_elix_level} = x4; then
+ ELIX_LEVEL_4_TRUE=
+ ELIX_LEVEL_4_FALSE='#'
+else
+ ELIX_LEVEL_4_TRUE='#'
+ ELIX_LEVEL_4_FALSE=
+fi
+
+
+ if test x${use_libtool} = xyes; then
+ USE_LIBTOOL_TRUE=
+ USE_LIBTOOL_FALSE='#'
+else
+ USE_LIBTOOL_TRUE='#'
+ USE_LIBTOOL_FALSE=
+fi
+
+
+# Hard-code OBJEXT. Normally it is set by AC_OBJEXT, but we
+# use oext, which is set in configure.host based on the target platform.
+OBJEXT=${oext}
+
+
+
+
+
+
+
+
+
+
+
+ac_config_files="$ac_config_files Makefile"
+
+cat >confcache <<\_ACEOF
+# This file is a shell script that caches the results of configure
+# tests run on this system so they can be shared between configure
+# scripts and configure runs, see configure's option --config-cache.
+# It is not useful on other systems. If it contains results you don't
+# want to keep, you may remove or edit it.
+#
+# config.status only pays attention to the cache file if you give it
+# the --recheck option to rerun configure.
+#
+# `ac_cv_env_foo' variables (set or unset) will be overridden when
+# loading this file, other *unset* `ac_cv_foo' will be assigned the
+# following values.
+
+_ACEOF
+
+# The following way of writing the cache mishandles newlines in values,
+# but we know of no workaround that is simple, portable, and efficient.
+# So, we kill variables containing newlines.
+# Ultrix sh set writes to stderr and can't be redirected directly,
+# and sets the high bit in the cache file unless we assign to the vars.
+(
+ for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
+ eval ac_val=\$$ac_var
+ case $ac_val in #(
+ *${as_nl}*)
+ case $ac_var in #(
+ *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
+$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
+ esac
+ case $ac_var in #(
+ _ | IFS | as_nl) ;; #(
+ BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
+ *) { eval $ac_var=; unset $ac_var;} ;;
+ esac ;;
+ esac
+ done
+
+ (set) 2>&1 |
+ case $as_nl`(ac_space=' '; set) 2>&1` in #(
+ *${as_nl}ac_space=\ *)
+ # `set' does not quote correctly, so add quotes: double-quote
+ # substitution turns \\\\ into \\, and sed turns \\ into \.
+ sed -n \
+ "s/'/'\\\\''/g;
+ s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
+ ;; #(
+ *)
+ # `set' quotes correctly as required by POSIX, so do not add quotes.
+ sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
+ ;;
+ esac |
+ sort
+) |
+ sed '
+ /^ac_cv_env_/b end
+ t clear
+ :clear
+ s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
+ t end
+ s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
+ :end' >>confcache
+if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
+ if test -w "$cache_file"; then
+ if test "x$cache_file" != "x/dev/null"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
+$as_echo "$as_me: updating cache $cache_file" >&6;}
+ if test ! -f "$cache_file" || test -h "$cache_file"; then
+ cat confcache >"$cache_file"
+ else
+ case $cache_file in #(
+ */* | ?:*)
+ mv -f confcache "$cache_file"$$ &&
+ mv -f "$cache_file"$$ "$cache_file" ;; #(
+ *)
+ mv -f confcache "$cache_file" ;;
+ esac
+ fi
+ fi
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
+$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
+ fi
+fi
+rm -f confcache
+
+test "x$prefix" = xNONE && prefix=$ac_default_prefix
+# Let make expand exec_prefix.
+test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
+
+# Transform confdefs.h into DEFS.
+# Protect against shell expansion while executing Makefile rules.
+# Protect against Makefile macro expansion.
+#
+# If the first sed substitution is executed (which looks for macros that
+# take arguments), then branch to the quote section. Otherwise,
+# look for a macro that doesn't take arguments.
+ac_script='
+:mline
+/\\$/{
+ N
+ s,\\\n,,
+ b mline
+}
+t clear
+:clear
+s/^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*([^)]*)\)[ ]*\(.*\)/-D\1=\2/g
+t quote
+s/^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)/-D\1=\2/g
+t quote
+b any
+:quote
+s/[ `~#$^&*(){}\\|;'\''"<>?]/\\&/g
+s/\[/\\&/g
+s/\]/\\&/g
+s/\$/$$/g
+H
+:any
+${
+ g
+ s/^\n//
+ s/\n/ /g
+ p
+}
+'
+DEFS=`sed -n "$ac_script" confdefs.h`
+
+
+ac_libobjs=
+ac_ltlibobjs=
+U=
+for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
+ # 1. Remove the extension, and $U if already installed.
+ ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
+ ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
+ # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
+ # will be set to the directory where LIBOBJS objects are built.
+ as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
+ as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
+done
+LIBOBJS=$ac_libobjs
+
+LTLIBOBJS=$ac_ltlibobjs
+
+
+if test -z "${MAY_SUPPLY_SYSCALLS_TRUE}" && test -z "${MAY_SUPPLY_SYSCALLS_FALSE}"; then
+ as_fn_error $? "conditional \"MAY_SUPPLY_SYSCALLS\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+
+if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then
+ as_fn_error $? "conditional \"AMDEP\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
+ as_fn_error $? "conditional \"am__fastdepCC\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then
+ as_fn_error $? "conditional \"MAINTAINER_MODE\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${ELIX_LEVEL_0_TRUE}" && test -z "${ELIX_LEVEL_0_FALSE}"; then
+ as_fn_error $? "conditional \"ELIX_LEVEL_0\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${ELIX_LEVEL_1_TRUE}" && test -z "${ELIX_LEVEL_1_FALSE}"; then
+ as_fn_error $? "conditional \"ELIX_LEVEL_1\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${ELIX_LEVEL_2_TRUE}" && test -z "${ELIX_LEVEL_2_FALSE}"; then
+ as_fn_error $? "conditional \"ELIX_LEVEL_2\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${ELIX_LEVEL_3_TRUE}" && test -z "${ELIX_LEVEL_3_FALSE}"; then
+ as_fn_error $? "conditional \"ELIX_LEVEL_3\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${ELIX_LEVEL_4_TRUE}" && test -z "${ELIX_LEVEL_4_FALSE}"; then
+ as_fn_error $? "conditional \"ELIX_LEVEL_4\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${USE_LIBTOOL_TRUE}" && test -z "${USE_LIBTOOL_FALSE}"; then
+ as_fn_error $? "conditional \"USE_LIBTOOL\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+
+: "${CONFIG_STATUS=./config.status}"
+ac_write_fail=0
+ac_clean_files_save=$ac_clean_files
+ac_clean_files="$ac_clean_files $CONFIG_STATUS"
+{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
+$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
+as_write_fail=0
+cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
+#! $SHELL
+# Generated by $as_me.
+# Run this file to recreate the current configuration.
+# Compiler output produced by configure, useful for debugging
+# configure, is in config.log if it exists.
+
+debug=false
+ac_cs_recheck=false
+ac_cs_silent=false
+
+SHELL=\${CONFIG_SHELL-$SHELL}
+export SHELL
+_ASEOF
+cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
+## -------------------- ##
+## M4sh Initialization. ##
+## -------------------- ##
+
+# Be more Bourne compatible
+DUALCASE=1; export DUALCASE # for MKS sh
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
+ emulate sh
+ NULLCMD=:
+ # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
+ # is contrary to our usage. Disable this feature.
+ alias -g '${1+"$@"}'='"$@"'
+ setopt NO_GLOB_SUBST
+else
+ case `(set -o) 2>/dev/null` in #(
+ *posix*) :
+ set -o posix ;; #(
+ *) :
+ ;;
+esac
+fi
+
+
+as_nl='
+'
+export as_nl
+# Printing a long string crashes Solaris 7 /usr/bin/printf.
+as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
+as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
+as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
+# Prefer a ksh shell builtin over an external printf program on Solaris,
+# but without wasting forks for bash or zsh.
+if test -z "$BASH_VERSION$ZSH_VERSION" \
+ && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
+ as_echo='print -r --'
+ as_echo_n='print -rn --'
+elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
+ as_echo='printf %s\n'
+ as_echo_n='printf %s'
+else
+ if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
+ as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
+ as_echo_n='/usr/ucb/echo -n'
+ else
+ as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
+ as_echo_n_body='eval
+ arg=$1;
+ case $arg in #(
+ *"$as_nl"*)
+ expr "X$arg" : "X\\(.*\\)$as_nl";
+ arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
+ esac;
+ expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
+ '
+ export as_echo_n_body
+ as_echo_n='sh -c $as_echo_n_body as_echo'
+ fi
+ export as_echo_body
+ as_echo='sh -c $as_echo_body as_echo'
+fi
+
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+ PATH_SEPARATOR=:
+ (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
+ (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
+ PATH_SEPARATOR=';'
+ }
+fi
+
+
+# IFS
+# We need space, tab and new line, in precisely that order. Quoting is
+# there to prevent editors from complaining about space-tab.
+# (If _AS_PATH_WALK were called with IFS unset, it would disable word
+# splitting by setting IFS to empty value.)
+IFS=" "" $as_nl"
+
+# Find who we are. Look in the path if we contain no directory separator.
+as_myself=
+case $0 in #((
+ *[\\/]* ) as_myself=$0 ;;
+ *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
+ done
+IFS=$as_save_IFS
+
+ ;;
+esac
+# We did not find ourselves, most probably we were run as `sh COMMAND'
+# in which case we are not to be found in the path.
+if test "x$as_myself" = x; then
+ as_myself=$0
+fi
+if test ! -f "$as_myself"; then
+ $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
+ exit 1
+fi
+
+# Unset variables that we do not need and which cause bugs (e.g. in
+# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
+# suppresses any "Segmentation fault" message there. '((' could
+# trigger a bug in pdksh 5.2.14.
+for as_var in BASH_ENV ENV MAIL MAILPATH
+do eval test x\${$as_var+set} = xset \
+ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
+done
+PS1='$ '
+PS2='> '
+PS4='+ '
+
+# NLS nuisances.
+LC_ALL=C
+export LC_ALL
+LANGUAGE=C
+export LANGUAGE
+
+# CDPATH.
+(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
+
+
+# as_fn_error STATUS ERROR [LINENO LOG_FD]
+# ----------------------------------------
+# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
+# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
+# script with STATUS, using 1 if that was 0.
+as_fn_error ()
+{
+ as_status=$1; test $as_status -eq 0 && as_status=1
+ if test "$4"; then
+ as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
+ fi
+ $as_echo "$as_me: error: $2" >&2
+ as_fn_exit $as_status
+} # as_fn_error
+
+
+# as_fn_set_status STATUS
+# -----------------------
+# Set $? to STATUS, without forking.
+as_fn_set_status ()
+{
+ return $1
+} # as_fn_set_status
+
+# as_fn_exit STATUS
+# -----------------
+# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
+as_fn_exit ()
+{
+ set +e
+ as_fn_set_status $1
+ exit $1
+} # as_fn_exit
+
+# as_fn_unset VAR
+# ---------------
+# Portably unset VAR.
+as_fn_unset ()
+{
+ { eval $1=; unset $1;}
+}
+as_unset=as_fn_unset
+# as_fn_append VAR VALUE
+# ----------------------
+# Append the text in VALUE to the end of the definition contained in VAR. Take
+# advantage of any shell optimizations that allow amortized linear growth over
+# repeated appends, instead of the typical quadratic growth present in naive
+# implementations.
+if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
+ eval 'as_fn_append ()
+ {
+ eval $1+=\$2
+ }'
+else
+ as_fn_append ()
+ {
+ eval $1=\$$1\$2
+ }
+fi # as_fn_append
+
+# as_fn_arith ARG...
+# ------------------
+# Perform arithmetic evaluation on the ARGs, and store the result in the
+# global $as_val. Take advantage of shells that can avoid forks. The arguments
+# must be portable across $(()) and expr.
+if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
+ eval 'as_fn_arith ()
+ {
+ as_val=$(( $* ))
+ }'
+else
+ as_fn_arith ()
+ {
+ as_val=`expr "$@" || test $? -eq 1`
+ }
+fi # as_fn_arith
+
+
+if expr a : '\(a\)' >/dev/null 2>&1 &&
+ test "X`expr 00001 : '.*\(...\)'`" = X001; then
+ as_expr=expr
+else
+ as_expr=false
+fi
+
+if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
+ as_basename=basename
+else
+ as_basename=false
+fi
+
+if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
+ as_dirname=dirname
+else
+ as_dirname=false
+fi
+
+as_me=`$as_basename -- "$0" ||
+$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
+ X"$0" : 'X\(//\)$' \| \
+ X"$0" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X/"$0" |
+ sed '/^.*\/\([^/][^/]*\)\/*$/{
+ s//\1/
+ q
+ }
+ /^X\/\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\/\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+
+# Avoid depending upon Character Ranges.
+as_cr_letters='abcdefghijklmnopqrstuvwxyz'
+as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
+as_cr_Letters=$as_cr_letters$as_cr_LETTERS
+as_cr_digits='0123456789'
+as_cr_alnum=$as_cr_Letters$as_cr_digits
+
+ECHO_C= ECHO_N= ECHO_T=
+case `echo -n x` in #(((((
+-n*)
+ case `echo 'xy\c'` in
+ *c*) ECHO_T=' ';; # ECHO_T is single tab character.
+ xy) ECHO_C='\c';;
+ *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
+ ECHO_T=' ';;
+ esac;;
+*)
+ ECHO_N='-n';;
+esac
+
+rm -f conf$$ conf$$.exe conf$$.file
+if test -d conf$$.dir; then
+ rm -f conf$$.dir/conf$$.file
+else
+ rm -f conf$$.dir
+ mkdir conf$$.dir 2>/dev/null
+fi
+if (echo >conf$$.file) 2>/dev/null; then
+ if ln -s conf$$.file conf$$ 2>/dev/null; then
+ as_ln_s='ln -s'
+ # ... but there are two gotchas:
+ # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
+ # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
+ # In both cases, we have to default to `cp -p'.
+ ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
+ as_ln_s='cp -p'
+ elif ln conf$$.file conf$$ 2>/dev/null; then
+ as_ln_s=ln
+ else
+ as_ln_s='cp -p'
+ fi
+else
+ as_ln_s='cp -p'
+fi
+rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
+rmdir conf$$.dir 2>/dev/null
+
+
+# as_fn_mkdir_p
+# -------------
+# Create "$as_dir" as a directory, including parents if necessary.
+as_fn_mkdir_p ()
+{
+
+ case $as_dir in #(
+ -*) as_dir=./$as_dir;;
+ esac
+ test -d "$as_dir" || eval $as_mkdir_p || {
+ as_dirs=
+ while :; do
+ case $as_dir in #(
+ *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
+ *) as_qdir=$as_dir;;
+ esac
+ as_dirs="'$as_qdir' $as_dirs"
+ as_dir=`$as_dirname -- "$as_dir" ||
+$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$as_dir" : 'X\(//\)[^/]' \| \
+ X"$as_dir" : 'X\(//\)$' \| \
+ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$as_dir" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)[^/].*/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+ test -d "$as_dir" && break
+ done
+ test -z "$as_dirs" || eval "mkdir $as_dirs"
+ } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
+
+
+} # as_fn_mkdir_p
+if mkdir -p . 2>/dev/null; then
+ as_mkdir_p='mkdir -p "$as_dir"'
+else
+ test -d ./-p && rmdir ./-p
+ as_mkdir_p=false
+fi
+
+if test -x / >/dev/null 2>&1; then
+ as_test_x='test -x'
+else
+ if ls -dL / >/dev/null 2>&1; then
+ as_ls_L_option=L
+ else
+ as_ls_L_option=
+ fi
+ as_test_x='
+ eval sh -c '\''
+ if test -d "$1"; then
+ test -d "$1/.";
+ else
+ case $1 in #(
+ -*)set "./$1";;
+ esac;
+ case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
+ ???[sx]*):;;*)false;;esac;fi
+ '\'' sh
+ '
+fi
+as_executable_p=$as_test_x
+
+# Sed expression to map a string onto a valid CPP name.
+as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
+
+# Sed expression to map a string onto a valid variable name.
+as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
+
+
+exec 6>&1
+## ----------------------------------- ##
+## Main body of $CONFIG_STATUS script. ##
+## ----------------------------------- ##
+_ASEOF
+test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+# Save the log message, to keep $0 and so on meaningful, and to
+# report actual input values of CONFIG_FILES etc. instead of their
+# values after options handling.
+ac_log="
+This file was extended by newlib $as_me 2.4.0, which was
+generated by GNU Autoconf 2.68. Invocation command line was
+
+ CONFIG_FILES = $CONFIG_FILES
+ CONFIG_HEADERS = $CONFIG_HEADERS
+ CONFIG_LINKS = $CONFIG_LINKS
+ CONFIG_COMMANDS = $CONFIG_COMMANDS
+ $ $0 $@
+
+on `(hostname || uname -n) 2>/dev/null | sed 1q`
+"
+
+_ACEOF
+
+case $ac_config_files in *"
+"*) set x $ac_config_files; shift; ac_config_files=$*;;
+esac
+
+
+
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+# Files that config.status was made for.
+config_files="$ac_config_files"
+config_commands="$ac_config_commands"
+
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+ac_cs_usage="\
+\`$as_me' instantiates files and other configuration actions
+from templates according to the current configuration. Unless the files
+and actions are specified as TAGs, all are instantiated by default.
+
+Usage: $0 [OPTION]... [TAG]...
+
+ -h, --help print this help, then exit
+ -V, --version print version number and configuration settings, then exit
+ --config print configuration, then exit
+ -q, --quiet, --silent
+ do not print progress messages
+ -d, --debug don't remove temporary files
+ --recheck update $as_me by reconfiguring in the same conditions
+ --file=FILE[:TEMPLATE]
+ instantiate the configuration file FILE
+
+Configuration files:
+$config_files
+
+Configuration commands:
+$config_commands
+
+Report bugs to the package provider."
+
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
+ac_cs_version="\\
+newlib config.status 2.4.0
+configured by $0, generated by GNU Autoconf 2.68,
+ with options \\"\$ac_cs_config\\"
+
+Copyright (C) 2010 Free Software Foundation, Inc.
+This config.status script is free software; the Free Software Foundation
+gives unlimited permission to copy, distribute and modify it."
+
+ac_pwd='$ac_pwd'
+srcdir='$srcdir'
+INSTALL='$INSTALL'
+MKDIR_P='$MKDIR_P'
+AWK='$AWK'
+test -n "\$AWK" || AWK=awk
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+# The default lists apply if the user does not specify any file.
+ac_need_defaults=:
+while test $# != 0
+do
+ case $1 in
+ --*=?*)
+ ac_option=`expr "X$1" : 'X\([^=]*\)='`
+ ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
+ ac_shift=:
+ ;;
+ --*=)
+ ac_option=`expr "X$1" : 'X\([^=]*\)='`
+ ac_optarg=
+ ac_shift=:
+ ;;
+ *)
+ ac_option=$1
+ ac_optarg=$2
+ ac_shift=shift
+ ;;
+ esac
+
+ case $ac_option in
+ # Handling of the options.
+ -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
+ ac_cs_recheck=: ;;
+ --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
+ $as_echo "$ac_cs_version"; exit ;;
+ --config | --confi | --conf | --con | --co | --c )
+ $as_echo "$ac_cs_config"; exit ;;
+ --debug | --debu | --deb | --de | --d | -d )
+ debug=: ;;
+ --file | --fil | --fi | --f )
+ $ac_shift
+ case $ac_optarg in
+ *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
+ '') as_fn_error $? "missing file argument" ;;
+ esac
+ as_fn_append CONFIG_FILES " '$ac_optarg'"
+ ac_need_defaults=false;;
+ --he | --h | --help | --hel | -h )
+ $as_echo "$ac_cs_usage"; exit ;;
+ -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+ | -silent | --silent | --silen | --sile | --sil | --si | --s)
+ ac_cs_silent=: ;;
+
+ # This is an error.
+ -*) as_fn_error $? "unrecognized option: \`$1'
+Try \`$0 --help' for more information." ;;
+
+ *) as_fn_append ac_config_targets " $1"
+ ac_need_defaults=false ;;
+
+ esac
+ shift
+done
+
+ac_configure_extra_args=
+
+if $ac_cs_silent; then
+ exec 6>/dev/null
+ ac_configure_extra_args="$ac_configure_extra_args --silent"
+fi
+
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+if \$ac_cs_recheck; then
+ set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
+ shift
+ \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
+ CONFIG_SHELL='$SHELL'
+ export CONFIG_SHELL
+ exec "\$@"
+fi
+
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+exec 5>>config.log
+{
+ echo
+ sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
+## Running $as_me. ##
+_ASBOX
+ $as_echo "$ac_log"
+} >&5
+
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+#
+# INIT-COMMANDS
+#
+AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"
+
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+
+# Handling of arguments.
+for ac_config_target in $ac_config_targets
+do
+ case $ac_config_target in
+ "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
+ "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
+
+ *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
+ esac
+done
+
+
+# If the user did not use the arguments to specify the items to instantiate,
+# then the envvar interface is used. Set only those that are not.
+# We use the long form for the default assignment because of an extremely
+# bizarre bug on SunOS 4.1.3.
+if $ac_need_defaults; then
+ test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
+ test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
+fi
+
+# Have a temporary directory for convenience. Make it in the build tree
+# simply because there is no reason against having it here, and in addition,
+# creating and moving files from /tmp can sometimes cause problems.
+# Hook for its removal unless debugging.
+# Note that there is a small window in which the directory will not be cleaned:
+# after its creation but before its name has been assigned to `$tmp'.
+$debug ||
+{
+ tmp= ac_tmp=
+ trap 'exit_status=$?
+ : "${ac_tmp:=$tmp}"
+ { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
+' 0
+ trap 'as_fn_exit 1' 1 2 13 15
+}
+# Create a (secure) tmp directory for tmp files.
+
+{
+ tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
+ test -d "$tmp"
+} ||
+{
+ tmp=./conf$$-$RANDOM
+ (umask 077 && mkdir "$tmp")
+} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
+ac_tmp=$tmp
+
+# Set up the scripts for CONFIG_FILES section.
+# No need to generate them if there are no CONFIG_FILES.
+# This happens for instance with `./config.status config.h'.
+if test -n "$CONFIG_FILES"; then
+
+
+ac_cr=`echo X | tr X '\015'`
+# On cygwin, bash can eat \r inside `` if the user requested igncr.
+# But we know of no other shell where ac_cr would be empty at this
+# point, so we can use a bashism as a fallback.
+if test "x$ac_cr" = x; then
+ eval ac_cr=\$\'\\r\'
+fi
+ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
+if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
+ ac_cs_awk_cr='\\r'
+else
+ ac_cs_awk_cr=$ac_cr
+fi
+
+echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
+_ACEOF
+
+
+{
+ echo "cat >conf$$subs.awk <<_ACEOF" &&
+ echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
+ echo "_ACEOF"
+} >conf$$subs.sh ||
+ as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
+ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
+ac_delim='%!_!# '
+for ac_last_try in false false false false false :; do
+ . ./conf$$subs.sh ||
+ as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
+
+ ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
+ if test $ac_delim_n = $ac_delim_num; then
+ break
+ elif $ac_last_try; then
+ as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
+ else
+ ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
+ fi
+done
+rm -f conf$$subs.sh
+
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
+_ACEOF
+sed -n '
+h
+s/^/S["/; s/!.*/"]=/
+p
+g
+s/^[^!]*!//
+:repl
+t repl
+s/'"$ac_delim"'$//
+t delim
+:nl
+h
+s/\(.\{148\}\)..*/\1/
+t more1
+s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
+p
+n
+b repl
+:more1
+s/["\\]/\\&/g; s/^/"/; s/$/"\\/
+p
+g
+s/.\{148\}//
+t nl
+:delim
+h
+s/\(.\{148\}\)..*/\1/
+t more2
+s/["\\]/\\&/g; s/^/"/; s/$/"/
+p
+b
+:more2
+s/["\\]/\\&/g; s/^/"/; s/$/"\\/
+p
+g
+s/.\{148\}//
+t delim
+' <conf$$subs.awk | sed '
+/^[^""]/{
+ N
+ s/\n//
+}
+' >>$CONFIG_STATUS || ac_write_fail=1
+rm -f conf$$subs.awk
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+_ACAWK
+cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
+ for (key in S) S_is_set[key] = 1
+ FS = ""
+
+}
+{
+ line = $ 0
+ nfields = split(line, field, "@")
+ substed = 0
+ len = length(field[1])
+ for (i = 2; i < nfields; i++) {
+ key = field[i]
+ keylen = length(key)
+ if (S_is_set[key]) {
+ value = S[key]
+ line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
+ len += length(value) + length(field[++i])
+ substed = 1
+ } else
+ len += 1 + keylen
+ }
+
+ print line
+}
+
+_ACAWK
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
+ sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
+else
+ cat
+fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
+ || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
+_ACEOF
+
+# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
+# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
+# trailing colons and then remove the whole line if VPATH becomes empty
+# (actually we leave an empty line to preserve line numbers).
+if test "x$srcdir" = x.; then
+ ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
+h
+s///
+s/^/:/
+s/[ ]*$/:/
+s/:\$(srcdir):/:/g
+s/:\${srcdir}:/:/g
+s/:@srcdir@:/:/g
+s/^:*//
+s/:*$//
+x
+s/\(=[ ]*\).*/\1/
+G
+s/\n//
+s/^[^=]*=[ ]*$//
+}'
+fi
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+fi # test -n "$CONFIG_FILES"
+
+
+eval set X " :F $CONFIG_FILES :C $CONFIG_COMMANDS"
+shift
+for ac_tag
+do
+ case $ac_tag in
+ :[FHLC]) ac_mode=$ac_tag; continue;;
+ esac
+ case $ac_mode$ac_tag in
+ :[FHL]*:*);;
+ :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
+ :[FH]-) ac_tag=-:-;;
+ :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
+ esac
+ ac_save_IFS=$IFS
+ IFS=:
+ set x $ac_tag
+ IFS=$ac_save_IFS
+ shift
+ ac_file=$1
+ shift
+
+ case $ac_mode in
+ :L) ac_source=$1;;
+ :[FH])
+ ac_file_inputs=
+ for ac_f
+ do
+ case $ac_f in
+ -) ac_f="$ac_tmp/stdin";;
+ *) # Look for the file first in the build tree, then in the source tree
+ # (if the path is not absolute). The absolute path cannot be DOS-style,
+ # because $ac_f cannot contain `:'.
+ test -f "$ac_f" ||
+ case $ac_f in
+ [\\/$]*) false;;
+ *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
+ esac ||
+ as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
+ esac
+ case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
+ as_fn_append ac_file_inputs " '$ac_f'"
+ done
+
+ # Let's still pretend it is `configure' which instantiates (i.e., don't
+ # use $as_me), people would be surprised to read:
+ # /* config.h. Generated by config.status. */
+ configure_input='Generated from '`
+ $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
+ `' by configure.'
+ if test x"$ac_file" != x-; then
+ configure_input="$ac_file. $configure_input"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
+$as_echo "$as_me: creating $ac_file" >&6;}
+ fi
+ # Neutralize special characters interpreted by sed in replacement strings.
+ case $configure_input in #(
+ *\&* | *\|* | *\\* )
+ ac_sed_conf_input=`$as_echo "$configure_input" |
+ sed 's/[\\\\&|]/\\\\&/g'`;; #(
+ *) ac_sed_conf_input=$configure_input;;
+ esac
+
+ case $ac_tag in
+ *:-:* | *:-) cat >"$ac_tmp/stdin" \
+ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
+ esac
+ ;;
+ esac
+
+ ac_dir=`$as_dirname -- "$ac_file" ||
+$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$ac_file" : 'X\(//\)[^/]' \| \
+ X"$ac_file" : 'X\(//\)$' \| \
+ X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$ac_file" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)[^/].*/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+ as_dir="$ac_dir"; as_fn_mkdir_p
+ ac_builddir=.
+
+case "$ac_dir" in
+.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
+*)
+ ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
+ # A ".." for each directory in $ac_dir_suffix.
+ ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
+ case $ac_top_builddir_sub in
+ "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
+ *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
+ esac ;;
+esac
+ac_abs_top_builddir=$ac_pwd
+ac_abs_builddir=$ac_pwd$ac_dir_suffix
+# for backward compatibility:
+ac_top_builddir=$ac_top_build_prefix
+
+case $srcdir in
+ .) # We are building in place.
+ ac_srcdir=.
+ ac_top_srcdir=$ac_top_builddir_sub
+ ac_abs_top_srcdir=$ac_pwd ;;
+ [\\/]* | ?:[\\/]* ) # Absolute name.
+ ac_srcdir=$srcdir$ac_dir_suffix;
+ ac_top_srcdir=$srcdir
+ ac_abs_top_srcdir=$srcdir ;;
+ *) # Relative name.
+ ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
+ ac_top_srcdir=$ac_top_build_prefix$srcdir
+ ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
+esac
+ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
+
+
+ case $ac_mode in
+ :F)
+ #
+ # CONFIG_FILE
+ #
+
+ case $INSTALL in
+ [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
+ *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
+ esac
+ ac_MKDIR_P=$MKDIR_P
+ case $MKDIR_P in
+ [\\/$]* | ?:[\\/]* ) ;;
+ */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
+ esac
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+# If the template does not know about datarootdir, expand it.
+# FIXME: This hack should be removed a few years after 2.60.
+ac_datarootdir_hack=; ac_datarootdir_seen=
+ac_sed_dataroot='
+/datarootdir/ {
+ p
+ q
+}
+/@datadir@/p
+/@docdir@/p
+/@infodir@/p
+/@localedir@/p
+/@mandir@/p'
+case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
+*datarootdir*) ac_datarootdir_seen=yes;;
+*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
+$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+ ac_datarootdir_hack='
+ s&@datadir@&$datadir&g
+ s&@docdir@&$docdir&g
+ s&@infodir@&$infodir&g
+ s&@localedir@&$localedir&g
+ s&@mandir@&$mandir&g
+ s&\\\${datarootdir}&$datarootdir&g' ;;
+esac
+_ACEOF
+
+# Neutralize VPATH when `$srcdir' = `.'.
+# Shell code in configure.ac might set extrasub.
+# FIXME: do we really want to maintain this feature?
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+ac_sed_extra="$ac_vpsub
+$extrasub
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+:t
+/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
+s|@configure_input@|$ac_sed_conf_input|;t t
+s&@top_builddir@&$ac_top_builddir_sub&;t t
+s&@top_build_prefix@&$ac_top_build_prefix&;t t
+s&@srcdir@&$ac_srcdir&;t t
+s&@abs_srcdir@&$ac_abs_srcdir&;t t
+s&@top_srcdir@&$ac_top_srcdir&;t t
+s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
+s&@builddir@&$ac_builddir&;t t
+s&@abs_builddir@&$ac_abs_builddir&;t t
+s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
+s&@INSTALL@&$ac_INSTALL&;t t
+s&@MKDIR_P@&$ac_MKDIR_P&;t t
+$ac_datarootdir_hack
+"
+eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
+ >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
+
+test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
+ { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
+ { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
+ "$ac_tmp/out"`; test -z "$ac_out"; } &&
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
+which seems to be undefined. Please make sure it is defined" >&5
+$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
+which seems to be undefined. Please make sure it is defined" >&2;}
+
+ rm -f "$ac_tmp/stdin"
+ case $ac_file in
+ -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
+ *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
+ esac \
+ || as_fn_error $? "could not create $ac_file" "$LINENO" 5
+ ;;
+
+
+ :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
+$as_echo "$as_me: executing $ac_file commands" >&6;}
+ ;;
+ esac
+
+
+ case $ac_file$ac_mode in
+ "depfiles":C) test x"$AMDEP_TRUE" != x"" || {
+ # Autoconf 2.62 quotes --file arguments for eval, but not when files
+ # are listed without --file. Let's play safe and only enable the eval
+ # if we detect the quoting.
+ case $CONFIG_FILES in
+ *\'*) eval set x "$CONFIG_FILES" ;;
+ *) set x $CONFIG_FILES ;;
+ esac
+ shift
+ for mf
+ do
+ # Strip MF so we end up with the name of the file.
+ mf=`echo "$mf" | sed -e 's/:.*$//'`
+ # Check whether this is an Automake generated Makefile or not.
+ # We used to match only the files named `Makefile.in', but
+ # some people rename them; so instead we look at the file content.
+ # Grep'ing the first line is not enough: some people post-process
+ # each Makefile.in and add a new line on top of each file to say so.
+ # Grep'ing the whole file is not good either: AIX grep has a line
+ # limit of 2048, but all sed's we know have understand at least 4000.
+ if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
+ dirpart=`$as_dirname -- "$mf" ||
+$as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$mf" : 'X\(//\)[^/]' \| \
+ X"$mf" : 'X\(//\)$' \| \
+ X"$mf" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$mf" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)[^/].*/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+ else
+ continue
+ fi
+ # Extract the definition of DEPDIR, am__include, and am__quote
+ # from the Makefile without running `make'.
+ DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
+ test -z "$DEPDIR" && continue
+ am__include=`sed -n 's/^am__include = //p' < "$mf"`
+ test -z "am__include" && continue
+ am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
+ # When using ansi2knr, U may be empty or an underscore; expand it
+ U=`sed -n 's/^U = //p' < "$mf"`
+ # Find all dependency output files, they are included files with
+ # $(DEPDIR) in their names. We invoke sed twice because it is the
+ # simplest approach to changing $(DEPDIR) to its actual value in the
+ # expansion.
+ for file in `sed -n "
+ s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
+ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
+ # Make sure the directory exists.
+ test -f "$dirpart/$file" && continue
+ fdir=`$as_dirname -- "$file" ||
+$as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$file" : 'X\(//\)[^/]' \| \
+ X"$file" : 'X\(//\)$' \| \
+ X"$file" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$file" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)[^/].*/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+ as_dir=$dirpart/$fdir; as_fn_mkdir_p
+ # echo "creating $dirpart/$file"
+ echo '# dummy' > "$dirpart/$file"
+ done
+ done
+}
+ ;;
+
+ esac
+done # for ac_tag
+
+
+as_fn_exit 0
+_ACEOF
+ac_clean_files=$ac_clean_files_save
+
+test $ac_write_fail = 0 ||
+ as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
+
+
+# configure is writing to config.log, and then calls config.status.
+# config.status does its own redirection, appending to config.log.
+# Unfortunately, on DOS this fails, as config.log is still kept open
+# by configure, so config.status won't be able to write to it; its
+# output is simply discarded. So we exec the FD to /dev/null,
+# effectively closing config.log, so it can be properly (re)opened and
+# appended to by config.status. When coming back to configure, we
+# need to make the FD available again.
+if test "$no_create" != yes; then
+ ac_cs_success=:
+ ac_config_status_args=
+ test "$silent" = yes &&
+ ac_config_status_args="$ac_config_status_args --quiet"
+ exec 5>/dev/null
+ $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
+ exec 5>>config.log
+ # Use ||, not &&, to avoid exiting from the if with $? = 1, which
+ # would make configure fail if this is the last instruction.
+ $ac_cs_success || as_fn_exit 1
+fi
+if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
+$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
+fi
+
diff --git a/newlib/libc/machine/ft32/configure.in b/newlib/libc/machine/ft32/configure.in
new file mode 100644
index 000000000..1a1943059
--- /dev/null
+++ b/newlib/libc/machine/ft32/configure.in
@@ -0,0 +1,14 @@
+dnl This is the newlib/libc/machine/arm configure.in file.
+dnl Process this file with autoconf to produce a configure script.
+
+AC_PREREQ(2.59)
+AC_INIT([newlib],[NEWLIB_VERSION])
+AC_CONFIG_SRCDIR([Makefile.am])
+
+dnl Can't be done in NEWLIB_CONFIGURE because that confuses automake.
+AC_CONFIG_AUX_DIR(../../../..)
+
+NEWLIB_CONFIGURE(../../..)
+
+AC_CONFIG_FILES([Makefile])
+AC_OUTPUT
diff --git a/newlib/libc/machine/ft32/memcpy.S b/newlib/libc/machine/ft32/memcpy.S
new file mode 100644
index 000000000..b29179b78
--- /dev/null
+++ b/newlib/libc/machine/ft32/memcpy.S
@@ -0,0 +1,32 @@
+/* A memcpy.c for FT32
+ Copyright (C) 2014 FTDI (support@ftdichip.com)
+
+ The authors hereby grant permission to use, copy, modify, distribute,
+ and license this software and its documentation for any purpose, provided
+ that existing copyright notices are retained in all copies and that this
+ notice is included verbatim in any distributions. No written agreement,
+ license, or royalty fee is required for any of the authorized uses.
+ Modifications to this software may be copyrighted by their authors
+ and need not follow the licensing terms described here, provided that
+ the new terms are clearly indicated on the first page of each file where
+ they apply. */
+
+ .text
+ .global memcpy
+ .type memcpy,@function
+memcpy:
+ ldk $r3,32764
+1:
+ cmp $r2,$r3
+ jmpc lte,2f
+ memcpy.b $r0,$r1,$r3
+ add $r0,$r0,$r3
+ add $r1,$r1,$r3
+ sub $r2,$r2,$r3
+ jmp 1b
+2:
+ memcpy.b $r0,$r1,$r2
+ return
+.Lend2:
+ .size memcpy,.Lend2-memcpy
+
diff --git a/newlib/libc/machine/ft32/memset.S b/newlib/libc/machine/ft32/memset.S
new file mode 100644
index 000000000..60e734528
--- /dev/null
+++ b/newlib/libc/machine/ft32/memset.S
@@ -0,0 +1,30 @@
+/* A memset.c for FT32
+ Copyright (C) 2014 FTDI (support@ftdichip.com)
+
+ The authors hereby grant permission to use, copy, modify, distribute,
+ and license this software and its documentation for any purpose, provided
+ that existing copyright notices are retained in all copies and that this
+ notice is included verbatim in any distributions. No written agreement,
+ license, or royalty fee is required for any of the authorized uses.
+ Modifications to this software may be copyrighted by their authors
+ and need not follow the licensing terms described here, provided that
+ the new terms are clearly indicated on the first page of each file where
+ they apply. */
+
+ .text
+ .global memset
+ .type memset,@function
+memset:
+ ldk $r3,32764
+1:
+ cmp $r2,$r3
+ jmpc lte,2f
+ memset.b $r0,$r1,$r3
+ add $r0,$r0,$r3
+ sub $r2,$r2,$r3
+ jmp 1b
+2:
+ memset.b $r0,$r1,$r2
+ return
+.Lend2:
+ .size memset,.Lend2-memset
diff --git a/newlib/libc/machine/ft32/setjmp.S b/newlib/libc/machine/ft32/setjmp.S
new file mode 100644
index 000000000..30bfc6d61
--- /dev/null
+++ b/newlib/libc/machine/ft32/setjmp.S
@@ -0,0 +1,94 @@
+/* A setjmp.c for FT32
+ Copyright (C) 2014 FTDI (support@ftdichip.com)
+
+ The authors hereby grant permission to use, copy, modify, distribute,
+ and license this software and its documentation for any purpose, provided
+ that existing copyright notices are retained in all copies and that this
+ notice is included verbatim in any distributions. No written agreement,
+ license, or royalty fee is required for any of the authorized uses.
+ Modifications to this software may be copyrighted by their authors
+ and need not follow the licensing terms described here, provided that
+ the new terms are clearly indicated on the first page of each file where
+ they apply. */
+
+# setjmp/longjmp for FT32.
+# Total jumpbuf size is 108 bytes, or 27 words.
+#
+
+ .text
+ .global setjmp
+ .type setjmp,@function
+setjmp:
+ pop.l $r5 # return address in $r5
+ sti.l $r0,0,$r5
+ sti.l $r0,4,$r6
+ sti.l $r0,8,$r7
+ sti.l $r0,12,$r8
+ sti.l $r0,16,$r9
+ sti.l $r0,20,$r10
+ sti.l $r0,24,$r11
+ sti.l $r0,28,$r12
+ sti.l $r0,32,$r13
+ sti.l $r0,36,$r14
+ sti.l $r0,40,$r15
+ sti.l $r0,44,$r16
+ sti.l $r0,48,$r17
+ sti.l $r0,52,$r18
+ sti.l $r0,56,$r19
+ sti.l $r0,60,$r20
+ sti.l $r0,64,$r21
+ sti.l $r0,68,$r22
+ sti.l $r0,72,$r23
+ sti.l $r0,76,$r24
+ sti.l $r0,80,$r25
+ sti.l $r0,84,$r26
+ sti.l $r0,88,$r27
+ sti.l $r0,92,$r28
+ sti.l $r0,96,$r29
+ sti.l $r0,100,$r30
+ sti.l $r0,104,$r31
+ ldk.l $r0,0
+ jmpi $r5
+
+.Lend1:
+ .size setjmp,.Lend1-setjmp
+
+ .global longjmp
+ .type longjmp,@function
+longjmp:
+ cmp.l $r1,0
+ jmpc nz,.nonz
+ ldk.l $r1,1
+.nonz:
+ ldi.l $r5,$r0,0
+ ldi.l $r6,$r0,4
+ ldi.l $r7,$r0,8
+ ldi.l $r8,$r0,12
+ ldi.l $r9,$r0,16
+ ldi.l $r10,$r0,20
+ ldi.l $r11,$r0,24
+ ldi.l $r12,$r0,28
+ ldi.l $r13,$r0,32
+ ldi.l $r14,$r0,36
+ ldi.l $r15,$r0,40
+ ldi.l $r16,$r0,44
+ ldi.l $r17,$r0,48
+ ldi.l $r18,$r0,52
+ ldi.l $r19,$r0,56
+ ldi.l $r20,$r0,60
+ ldi.l $r21,$r0,64
+ ldi.l $r22,$r0,68
+ ldi.l $r23,$r0,72
+ ldi.l $r24,$r0,76
+ ldi.l $r25,$r0,80
+ ldi.l $r26,$r0,84
+ ldi.l $r27,$r0,88
+ ldi.l $r28,$r0,92
+ ldi.l $r29,$r0,96
+ ldi.l $r30,$r0,100
+ ldi.l $r31,$r0,104
+ move.l $r0,$r1
+ jmpi $r5
+
+.Lend2:
+ .size longjmp,.Lend2-longjmp
diff --git a/newlib/libc/machine/ft32/stpcmp.S b/newlib/libc/machine/ft32/stpcmp.S
new file mode 100644
index 000000000..9fc02994a
--- /dev/null
+++ b/newlib/libc/machine/ft32/stpcmp.S
@@ -0,0 +1,22 @@
+/* A strlen.c for FT32
+ Copyright (C) 2014 FTDI (support@ftdichip.com)
+
+ The authors hereby grant permission to use, copy, modify, distribute,
+ and license this software and its documentation for any purpose, provided
+ that existing copyright notices are retained in all copies and that this
+ notice is included verbatim in any distributions. No written agreement,
+ license, or royalty fee is required for any of the authorized uses.
+ Modifications to this software may be copyrighted by their authors
+ and need not follow the licensing terms described here, provided that
+ the new terms are clearly indicated on the first page of each file where
+ they apply. */
+
+ .text
+ .global strlen
+ .type strlen,@function
+strlen:
+ strlen.b $r0,$r0
+ return
+.Lend2:
+ .size strlen,.Lend2-strlen
+
diff --git a/newlib/libc/machine/ft32/strcmp.S b/newlib/libc/machine/ft32/strcmp.S
new file mode 100644
index 000000000..5e74734b1
--- /dev/null
+++ b/newlib/libc/machine/ft32/strcmp.S
@@ -0,0 +1,22 @@
+/* A strcmp.c for FT32
+ Copyright (C) 2014 FTDI (support@ftdichip.com)
+
+ The authors hereby grant permission to use, copy, modify, distribute,
+ and license this software and its documentation for any purpose, provided
+ that existing copyright notices are retained in all copies and that this
+ notice is included verbatim in any distributions. No written agreement,
+ license, or royalty fee is required for any of the authorized uses.
+ Modifications to this software may be copyrighted by their authors
+ and need not follow the licensing terms described here, provided that
+ the new terms are clearly indicated on the first page of each file where
+ they apply. */
+
+ .text
+ .global strcmp
+ .type strcmp,@function
+strcmp:
+ strcmp.b $r0,$r0,$r1
+ return
+.Lend2:
+ .size strcmp,.Lend2-strcmp
+
diff --git a/newlib/libc/machine/ft32/strcpy.S b/newlib/libc/machine/ft32/strcpy.S
new file mode 100644
index 000000000..fd6ef1d64
--- /dev/null
+++ b/newlib/libc/machine/ft32/strcpy.S
@@ -0,0 +1,23 @@
+/* A strcpy.c for FT32
+ Copyright (C) 2014 FTDI (support@ftdichip.com)
+
+ The authors hereby grant permission to use, copy, modify, distribute,
+ and license this software and its documentation for any purpose, provided
+ that existing copyright notices are retained in all copies and that this
+ notice is included verbatim in any distributions. No written agreement,
+ license, or royalty fee is required for any of the authorized uses.
+ Modifications to this software may be copyrighted by their authors
+ and need not follow the licensing terms described here, provided that
+ the new terms are clearly indicated on the first page of each file where
+ they apply. */
+
+ .text
+ .global strcpy
+ .type strcpy,@function
+strcpy:
+ move.l $r5,$r0
+ stpcpy.b $r5,$r1
+ return
+.Lend2:
+ .size strcpy,.Lend2-strcpy
+
diff --git a/newlib/libc/machine/ft32/strlen.S b/newlib/libc/machine/ft32/strlen.S
new file mode 100644
index 000000000..9fc02994a
--- /dev/null
+++ b/newlib/libc/machine/ft32/strlen.S
@@ -0,0 +1,22 @@
+/* A strlen.c for FT32
+ Copyright (C) 2014 FTDI (support@ftdichip.com)
+
+ The authors hereby grant permission to use, copy, modify, distribute,
+ and license this software and its documentation for any purpose, provided
+ that existing copyright notices are retained in all copies and that this
+ notice is included verbatim in any distributions. No written agreement,
+ license, or royalty fee is required for any of the authorized uses.
+ Modifications to this software may be copyrighted by their authors
+ and need not follow the licensing terms described here, provided that
+ the new terms are clearly indicated on the first page of each file where
+ they apply. */
+
+ .text
+ .global strlen
+ .type strlen,@function
+strlen:
+ strlen.b $r0,$r0
+ return
+.Lend2:
+ .size strlen,.Lend2-strlen
+
diff --git a/newlib/libc/machine/h8300/configure b/newlib/libc/machine/h8300/configure
index a644864bc..9ead3d301 100755
--- a/newlib/libc/machine/h8300/configure
+++ b/newlib/libc/machine/h8300/configure
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.68 for newlib 2.0.0.
+# Generated by GNU Autoconf 2.68 for newlib 2.4.0.
#
#
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
@@ -556,8 +556,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='newlib'
PACKAGE_TARNAME='newlib'
-PACKAGE_VERSION='2.0.0'
-PACKAGE_STRING='newlib 2.0.0'
+PACKAGE_VERSION='2.4.0'
+PACKAGE_STRING='newlib 2.4.0'
PACKAGE_BUGREPORT=''
PACKAGE_URL=''
@@ -1239,7 +1239,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures newlib 2.0.0 to adapt to many kinds of systems.
+\`configure' configures newlib 2.4.0 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1309,7 +1309,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of newlib 2.0.0:";;
+ short | recursive ) echo "Configuration of newlib 2.4.0:";;
esac
cat <<\_ACEOF
@@ -1400,7 +1400,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-newlib configure 2.0.0
+newlib configure 2.4.0
generated by GNU Autoconf 2.68
Copyright (C) 2010 Free Software Foundation, Inc.
@@ -1455,7 +1455,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by newlib $as_me 2.0.0, which was
+It was created by newlib $as_me 2.4.0, which was
generated by GNU Autoconf 2.68. Invocation command line was
$ $0 $@
@@ -2527,7 +2527,7 @@ fi
# Define the identity of the package.
PACKAGE='newlib'
- VERSION='2.0.0'
+ VERSION='2.4.0'
# Some tools Automake needs.
@@ -4007,7 +4007,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by newlib $as_me 2.0.0, which was
+This file was extended by newlib $as_me 2.4.0, which was
generated by GNU Autoconf 2.68. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -4064,7 +4064,7 @@ _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
-newlib config.status 2.0.0
+newlib config.status 2.4.0
configured by $0, generated by GNU Autoconf 2.68,
with options \\"\$ac_cs_config\\"
diff --git a/newlib/libc/machine/h8500/configure b/newlib/libc/machine/h8500/configure
index 3d8b37096..a1a6a0942 100755
--- a/newlib/libc/machine/h8500/configure
+++ b/newlib/libc/machine/h8500/configure
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.68 for newlib 2.0.0.
+# Generated by GNU Autoconf 2.68 for newlib 2.4.0.
#
#
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
@@ -556,8 +556,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='newlib'
PACKAGE_TARNAME='newlib'
-PACKAGE_VERSION='2.0.0'
-PACKAGE_STRING='newlib 2.0.0'
+PACKAGE_VERSION='2.4.0'
+PACKAGE_STRING='newlib 2.4.0'
PACKAGE_BUGREPORT=''
PACKAGE_URL=''
@@ -1239,7 +1239,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures newlib 2.0.0 to adapt to many kinds of systems.
+\`configure' configures newlib 2.4.0 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1309,7 +1309,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of newlib 2.0.0:";;
+ short | recursive ) echo "Configuration of newlib 2.4.0:";;
esac
cat <<\_ACEOF
@@ -1400,7 +1400,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-newlib configure 2.0.0
+newlib configure 2.4.0
generated by GNU Autoconf 2.68
Copyright (C) 2010 Free Software Foundation, Inc.
@@ -1455,7 +1455,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by newlib $as_me 2.0.0, which was
+It was created by newlib $as_me 2.4.0, which was
generated by GNU Autoconf 2.68. Invocation command line was
$ $0 $@
@@ -2527,7 +2527,7 @@ fi
# Define the identity of the package.
PACKAGE='newlib'
- VERSION='2.0.0'
+ VERSION='2.4.0'
# Some tools Automake needs.
@@ -4007,7 +4007,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by newlib $as_me 2.0.0, which was
+This file was extended by newlib $as_me 2.4.0, which was
generated by GNU Autoconf 2.68. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -4064,7 +4064,7 @@ _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
-newlib config.status 2.0.0
+newlib config.status 2.4.0
configured by $0, generated by GNU Autoconf 2.68,
with options \\"\$ac_cs_config\\"
diff --git a/newlib/libc/machine/hppa/configure b/newlib/libc/machine/hppa/configure
index c77b55cc9..f04cc9777 100755
--- a/newlib/libc/machine/hppa/configure
+++ b/newlib/libc/machine/hppa/configure
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.68 for newlib 2.0.0.
+# Generated by GNU Autoconf 2.68 for newlib 2.4.0.
#
#
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
@@ -556,8 +556,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='newlib'
PACKAGE_TARNAME='newlib'
-PACKAGE_VERSION='2.0.0'
-PACKAGE_STRING='newlib 2.0.0'
+PACKAGE_VERSION='2.4.0'
+PACKAGE_STRING='newlib 2.4.0'
PACKAGE_BUGREPORT=''
PACKAGE_URL=''
@@ -1239,7 +1239,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures newlib 2.0.0 to adapt to many kinds of systems.
+\`configure' configures newlib 2.4.0 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1309,7 +1309,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of newlib 2.0.0:";;
+ short | recursive ) echo "Configuration of newlib 2.4.0:";;
esac
cat <<\_ACEOF
@@ -1400,7 +1400,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-newlib configure 2.0.0
+newlib configure 2.4.0
generated by GNU Autoconf 2.68
Copyright (C) 2010 Free Software Foundation, Inc.
@@ -1455,7 +1455,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by newlib $as_me 2.0.0, which was
+It was created by newlib $as_me 2.4.0, which was
generated by GNU Autoconf 2.68. Invocation command line was
$ $0 $@
@@ -2527,7 +2527,7 @@ fi
# Define the identity of the package.
PACKAGE='newlib'
- VERSION='2.0.0'
+ VERSION='2.4.0'
# Some tools Automake needs.
@@ -4007,7 +4007,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by newlib $as_me 2.0.0, which was
+This file was extended by newlib $as_me 2.4.0, which was
generated by GNU Autoconf 2.68. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -4064,7 +4064,7 @@ _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
-newlib config.status 2.0.0
+newlib config.status 2.4.0
configured by $0, generated by GNU Autoconf 2.68,
with options \\"\$ac_cs_config\\"
diff --git a/newlib/libc/machine/i386/Makefile.in b/newlib/libc/machine/i386/Makefile.in
index d3b6f548f..018ac9242 100644
--- a/newlib/libc/machine/i386/Makefile.in
+++ b/newlib/libc/machine/i386/Makefile.in
@@ -264,12 +264,19 @@ libi386_la_LDFLAGS = -Xcompiler -nostdlib
@USE_LIBTOOL_FALSE@lib_a_SOURCES = $(LIB_SOURCES) $(ADDED_SOURCES)
@USE_LIBTOOL_FALSE@lib_a_CCASFLAGS = $(AM_CCASFLAGS)
@USE_LIBTOOL_FALSE@lib_a_CFLAGS = $(AM_CFLAGS)
+
+#
+# documentation rules
+#
+SUFFIXES = .def
+CHEW = ${top_builddir}/../doc/makedoc -f $(top_srcdir)/../doc/doc.str
+CLEANFILES = $(CHEWOUT_FILES) *.ref
ACLOCAL_AMFLAGS = -I ../../.. -I ../../../..
CONFIG_STATUS_DEPENDENCIES = $(newlib_basedir)/configure.host
all: all-am
.SUFFIXES:
-.SUFFIXES: .S .lo .o .obj
+.SUFFIXES: .def .S .c .lo .o .obj
am--refresh: Makefile
@:
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(srcdir)/../../../Makefile.shared $(am__configure_deps)
@@ -473,6 +480,7 @@ install-strip:
mostlyclean-generic:
clean-generic:
+ -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
distclean-generic:
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
@@ -576,6 +584,18 @@ objectlist.awk.in: $(noinst_LTLIBRARIES)
echo $$i `pwd`/$$i >> objectlist.awk.in ; \
done
+.c.def:
+ $(CHEW) < $< > $*.def 2> $*.ref
+ touch stmp-def
+
+TARGETDOC ?= ../tmp.texi
+
+doc: $(CHEWOUT_FILES)
+ for chapter in $(CHAPTERS) ; \
+ do \
+ cat $(srcdir)/$$chapter >> $(TARGETDOC) ; \
+ done
+
# 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/machine/i386/configure b/newlib/libc/machine/i386/configure
index 0c41cfef6..c1f4c6182 100755
--- a/newlib/libc/machine/i386/configure
+++ b/newlib/libc/machine/i386/configure
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.68 for newlib 2.0.0.
+# Generated by GNU Autoconf 2.68 for newlib 2.4.0.
#
#
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
@@ -567,8 +567,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='newlib'
PACKAGE_TARNAME='newlib'
-PACKAGE_VERSION='2.0.0'
-PACKAGE_STRING='newlib 2.0.0'
+PACKAGE_VERSION='2.4.0'
+PACKAGE_STRING='newlib 2.4.0'
PACKAGE_BUGREPORT=''
PACKAGE_URL=''
@@ -1324,7 +1324,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures newlib 2.0.0 to adapt to many kinds of systems.
+\`configure' configures newlib 2.4.0 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1394,7 +1394,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of newlib 2.0.0:";;
+ short | recursive ) echo "Configuration of newlib 2.4.0:";;
esac
cat <<\_ACEOF
@@ -1505,7 +1505,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-newlib configure 2.0.0
+newlib configure 2.4.0
generated by GNU Autoconf 2.68
Copyright (C) 2010 Free Software Foundation, Inc.
@@ -1783,7 +1783,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by newlib $as_me 2.0.0, which was
+It was created by newlib $as_me 2.4.0, which was
generated by GNU Autoconf 2.68. Invocation command line was
$ $0 $@
@@ -2855,7 +2855,7 @@ fi
# Define the identity of the package.
PACKAGE='newlib'
- VERSION='2.0.0'
+ VERSION='2.4.0'
# Some tools Automake needs.
@@ -6916,7 +6916,7 @@ ia64-*-hpux*)
rm -rf conftest*
;;
-x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \
+x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \
s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
# Find out which ABI we are using.
echo 'int i;' > conftest.$ac_ext
@@ -6941,7 +6941,10 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
;;
esac
;;
- ppc64-*linux*|powerpc64-*linux*)
+ powerpc64le-*linux*)
+ LD="${LD-ld} -m elf32lppclinux"
+ ;;
+ powerpc64-*linux*)
LD="${LD-ld} -m elf32ppclinux"
;;
s390x-*linux*)
@@ -6960,7 +6963,10 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
x86_64-*linux*)
LD="${LD-ld} -m elf_x86_64"
;;
- ppc*-*linux*|powerpc*-*linux*)
+ powerpcle-*linux*)
+ LD="${LD-ld} -m elf64lppc"
+ ;;
+ powerpc-*linux*)
LD="${LD-ld} -m elf64ppc"
;;
s390*-*linux*|s390*-*tpf*)
@@ -7642,7 +7648,7 @@ $as_echo "$lt_cv_ld_force_load" >&6; }
case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
10.0,*86*-darwin8*|10.0,*-darwin[91]*)
_lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
- 10.[012]*)
+ 10.[012][,.]*)
_lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
10.*)
_lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
@@ -9211,7 +9217,7 @@ _LT_EOF
if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
&& test "$tmp_diet" = no
then
- tmp_addflag=
+ tmp_addflag=' $pic_flag'
tmp_sharedflag='-shared'
case $cc_basename,$host_cpu in
pgcc*) # Portland Group C compiler
@@ -9393,7 +9399,7 @@ _LT_EOF
if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
else
- export_symbols_cmds='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
+ export_symbols_cmds='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "L")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
fi
aix_use_runtimelinking=no
@@ -11421,7 +11427,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 11424 "configure"
+#line 11430 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -11527,7 +11533,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 11530 "configure"
+#line 11536 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -12387,7 +12393,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by newlib $as_me 2.0.0, which was
+This file was extended by newlib $as_me 2.4.0, which was
generated by GNU Autoconf 2.68. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -12444,7 +12450,7 @@ _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
-newlib config.status 2.0.0
+newlib config.status 2.4.0
configured by $0, generated by GNU Autoconf 2.68,
with options \\"\$ac_cs_config\\"
diff --git a/newlib/libc/machine/i386/f_atan2.S b/newlib/libc/machine/i386/f_atan2.S
deleted file mode 100644
index 5bb074f80..000000000
--- a/newlib/libc/machine/i386/f_atan2.S
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- * ====================================================
- * Copyright (C) 1998, 2002 by Red Hat Inc. All rights reserved.
- *
- * Permission to use, copy, modify, and distribute this
- * software is freely granted, provided that this notice
- * is preserved.
- * ====================================================
- */
-
-#if !defined(_SOFT_FLOAT)
-
-/*
-Fast version of atan2 using Intel float instructions.
-
- double _f_atan2 (double y, double x);
-
-Function computes arctan ( y / x ).
-There is no error checking or setting of errno.
-*/
-
- #include "i386mach.h"
-
- .global SYM (_f_atan2)
- SOTYPE_FUNCTION(_f_atan2)
-
-SYM (_f_atan2):
- pushl ebp
- movl esp,ebp
- fldl 8(ebp)
- fldl 16(ebp)
- fpatan
-
- leave
- ret
-
-#endif
diff --git a/newlib/libc/machine/i386/f_atan2f.S b/newlib/libc/machine/i386/f_atan2f.S
deleted file mode 100644
index 6df0c7539..000000000
--- a/newlib/libc/machine/i386/f_atan2f.S
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- * ====================================================
- * Copyright (C) 1998, 2002 by Red Hat Inc. All rights reserved.
- *
- * Permission to use, copy, modify, and distribute this
- * software is freely granted, provided that this notice
- * is preserved.
- * ====================================================
- */
-
-#if !defined(_SOFT_FLOAT)
-
-/*
-Fast version of atan2f using Intel float instructions.
-
- float _f_atan2f (float y, float x);
-
-Function computes arctan ( y / x ).
-There is no error checking or setting of errno.
-*/
-
- #include "i386mach.h"
-
- .global SYM (_f_atan2f)
- SOTYPE_FUNCTION(_f_atan2f)
-
-SYM (_f_atan2f):
- pushl ebp
- movl esp,ebp
- flds 8(ebp)
- flds 12(ebp)
- fpatan
-
- leave
- ret
-
-#endif
diff --git a/newlib/libc/machine/i386/f_exp.c b/newlib/libc/machine/i386/f_exp.c
deleted file mode 100644
index 0ec721b7b..000000000
--- a/newlib/libc/machine/i386/f_exp.c
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- * ====================================================
- * Copyright (C) 1998,2002 by Red Hat Inc. All rights reserved.
- *
- * Permission to use, copy, modify, and distribute this
- * software is freely granted, provided that this notice
- * is preserved.
- * ====================================================
- */
-
-#if !defined(_SOFT_FLOAT)
-
-/*
-Fast version of exp using Intel float instructions.
-
- double _f_exp (double x);
-
-Function computes e ** x. The following special cases exist:
- 1. if x is 0.0 ==> return 1.0
- 2. if x is infinity ==> return infinity
- 3. if x is -infinity ==> return 0.0
- 4. if x is NaN ==> return x
-There is no error checking or setting of errno.
-*/
-
-
-#include <math.h>
-#include <ieeefp.h>
-#include "f_math.h"
-
-double _f_exp (double x)
-{
- if (check_finite(x))
- {
- double result;
- asm ("fldl2e; fmulp; fld %%st; frndint; fsub %%st,%%st(1); fxch;" \
- "fchs; f2xm1; fld1; faddp; fxch; fld1; fscale; fstp %%st(1); fmulp" :
- "=t"(result) : "0"(x));
- return result;
- }
- else if (x == -infinity())
- return 0.0;
-
- return x;
-}
-
-#endif
diff --git a/newlib/libc/machine/i386/f_expf.c b/newlib/libc/machine/i386/f_expf.c
deleted file mode 100644
index b32d1f208..000000000
--- a/newlib/libc/machine/i386/f_expf.c
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- * ====================================================
- * Copyright (C) 1998, 2002 by Red Hat Inc. All rights reserved.
- *
- * Permission to use, copy, modify, and distribute this
- * software is freely granted, provided that this notice
- * is preserved.
- * ====================================================
- */
-
-#if !defined(_SOFT_FLOAT)
-
-/*
-Fast version of exp using Intel float instructions.
-
- float _f_expf (float x);
-
-Function computes e ** x. The following special cases exist:
- 1. if x is 0.0 ==> return 1.0
- 2. if x is infinity ==> return infinity
- 3. if x is -infinity ==> return 0.0
- 4. if x is NaN ==> return x
-There is no error checking or setting of errno.
-*/
-
-
-#include <math.h>
-#include <ieeefp.h>
-#include "f_math.h"
-
-float _f_expf (float x)
-{
- if (check_finitef(x))
- {
- float result;
- asm ("fldl2e; fmulp; fld %%st; frndint; fsub %%st,%%st(1); fxch;" \
- "fchs; f2xm1; fld1; faddp; fxch; fld1; fscale; fstp %%st(1); fmulp" :
- "=t"(result) : "0"(x));
- return result;
- }
- else if (x == -infinityf())
- return 0.0;
-
- return x;
-}
-
-#endif
diff --git a/newlib/libc/machine/i386/f_frexp.S b/newlib/libc/machine/i386/f_frexp.S
deleted file mode 100644
index febe115bc..000000000
--- a/newlib/libc/machine/i386/f_frexp.S
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- * ====================================================
- * Copyright (C) 1998, 2002 by Red Hat Inc. All rights reserved.
- *
- * Permission to use, copy, modify, and distribute this
- * software is freely granted, provided that this notice
- * is preserved.
- * ====================================================
- */
-
-#if !defined(_SOFT_FLOAT)
-
-/*
-Fast version of frexp using Intel float instructions.
-
- double _f_frexp (double x, int *exp);
-
-Function splits x into y * 2 ** z. It then
-returns the value of y and updates *exp with z.
-There is no error checking or setting of errno.
-*/
-
- #include "i386mach.h"
-
- .global SYM (_f_frexp)
- SOTYPE_FUNCTION(_f_frexp)
-
-SYM (_f_frexp):
- pushl ebp
- movl esp,ebp
- fldl 8(ebp)
- movl 16(ebp),eax
-
- fxtract
- fld1
- fchs
- fxch
- fscale
- fstp st1
- fxch
- fld1
- faddp
- fistpl 0(eax)
-
- leave
- ret
-
-#endif
diff --git a/newlib/libc/machine/i386/f_frexpf.S b/newlib/libc/machine/i386/f_frexpf.S
deleted file mode 100644
index 909026d66..000000000
--- a/newlib/libc/machine/i386/f_frexpf.S
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- * ====================================================
- * Copyright (C) 1998, 2002 by Red Hat Inc. All rights reserved.
- *
- * Permission to use, copy, modify, and distribute this
- * software is freely granted, provided that this notice
- * is preserved.
- * ====================================================
- */
-
-#if !defined(_SOFT_FLOAT)
-
-/*
-Fast version of frexpf using Intel float instructions.
-
- float _f_frexpf (float x, int *exp);
-
-Function splits x into y * 2 ** z. It then
-returns the value of y and updates *exp with z.
-There is no error checking or setting of errno.
-*/
-
- #include "i386mach.h"
-
- .global SYM (_f_frexpf)
- SOTYPE_FUNCTION(_f_frexpf)
-
-SYM (_f_frexpf):
- pushl ebp
- movl esp,ebp
- flds 8(ebp)
- movl 12(ebp),eax
-
- fxtract
- fld1
- fchs
- fxch
- fscale
- fstp st1
- fxch
- fld1
- faddp
- fistpl 0(eax)
-
- leave
- ret
-
-#endif
diff --git a/newlib/libc/machine/i386/f_ldexp.S b/newlib/libc/machine/i386/f_ldexp.S
deleted file mode 100644
index e7b83c438..000000000
--- a/newlib/libc/machine/i386/f_ldexp.S
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
- * ====================================================
- * Copyright (C) 1998, 2002 by Red Hat Inc. All rights reserved.
- *
- * Permission to use, copy, modify, and distribute this
- * software is freely granted, provided that this notice
- * is preserved.
- * ====================================================
- */
-
-#if !defined(_SOFT_FLOAT)
-
-/*
-Fast version of ldexp using Intel float instructions.
-
- double _f_ldexp (double x, int exp);
-
-Function calculates x * 2 ** exp.
-There is no error checking or setting of errno.
-*/
-
- #include "i386mach.h"
-
- .global SYM (_f_ldexp)
- SOTYPE_FUNCTION(_f_ldexp)
-
-SYM (_f_ldexp):
- pushl ebp
- movl esp,ebp
- fild 16(ebp)
- fldl 8(ebp)
- fscale
- fstp st1
-
- leave
- ret
-
-#endif
diff --git a/newlib/libc/machine/i386/f_ldexpf.S b/newlib/libc/machine/i386/f_ldexpf.S
deleted file mode 100644
index 59d53548c..000000000
--- a/newlib/libc/machine/i386/f_ldexpf.S
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
- * ====================================================
- * Copyright (C) 1998, 2002 by Red Hat Inc. All rights reserved.
- *
- * Permission to use, copy, modify, and distribute this
- * software is freely granted, provided that this notice
- * is preserved.
- * ====================================================
- */
-
-#if !defined(_SOFT_FLOAT)
-
-/*
-Fast version of ldexpf using Intel float instructions.
-
- float _f_ldexpf (float x, int exp);
-
-Function calculates x * 2 ** exp.
-There is no error checking or setting of errno.
-*/
-
- #include "i386mach.h"
-
- .global SYM (_f_ldexpf)
- SOTYPE_FUNCTION(_f_ldexpf)
-
-SYM (_f_ldexpf):
- pushl ebp
- movl esp,ebp
- fild 12(ebp)
- flds 8(ebp)
- fscale
- fstp st1
-
- leave
- ret
-
-#endif
diff --git a/newlib/libc/machine/i386/f_log.S b/newlib/libc/machine/i386/f_log.S
deleted file mode 100644
index 70e62cbc5..000000000
--- a/newlib/libc/machine/i386/f_log.S
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
- * ====================================================
- * Copyright (C) 1998, 2002 by Red Hat Inc. All rights reserved.
- *
- * Permission to use, copy, modify, and distribute this
- * software is freely granted, provided that this notice
- * is preserved.
- * ====================================================
- */
-
-#if !defined(_SOFT_FLOAT)
-
-/*
-Fast version of log using Intel float instructions.
-
- double _f_log (double x);
-
-Function calculates the log base e of x.
-There is no error checking or setting of errno.
-*/
-
- #include "i386mach.h"
-
- .global SYM (_f_log)
- SOTYPE_FUNCTION(_f_log)
-
-SYM (_f_log):
- pushl ebp
- movl esp,ebp
-
- fld1
- fldl2e
- fdivrp
- fldl 8(ebp)
- fyl2x
-
- leave
- ret
-
-#endif
diff --git a/newlib/libc/machine/i386/f_log10.S b/newlib/libc/machine/i386/f_log10.S
deleted file mode 100644
index 8d1b87319..000000000
--- a/newlib/libc/machine/i386/f_log10.S
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
- * ====================================================
- * Copyright (C) 1998, 2002 by Red Hat Inc. All rights reserved.
- *
- * Permission to use, copy, modify, and distribute this
- * software is freely granted, provided that this notice
- * is preserved.
- * ====================================================
- */
-
-#if !defined(_SOFT_FLOAT)
-
-/*
-Fast version of log10 using Intel float instructions.
-
- double _f_log10 (double x);
-
-Function calculates the log base 10 of x.
-There is no error checking or setting of errno.
-*/
-
- #include "i386mach.h"
-
- .global SYM (_f_log10)
- SOTYPE_FUNCTION(_f_log10)
-
-SYM (_f_log10):
- pushl ebp
- movl esp,ebp
-
- fld1
- fldl2t
- fdivrp
- fldl 8(ebp)
- fyl2x
-
- leave
- ret
-
-#endif
diff --git a/newlib/libc/machine/i386/f_log10f.S b/newlib/libc/machine/i386/f_log10f.S
deleted file mode 100644
index 66ec5062e..000000000
--- a/newlib/libc/machine/i386/f_log10f.S
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
- * ====================================================
- * Copyright (C) 1998, 2002 by Red Hat Inc. All rights reserved.
- *
- * Permission to use, copy, modify, and distribute this
- * software is freely granted, provided that this notice
- * is preserved.
- * ====================================================
- */
-
-#if !defined(_SOFT_FLOAT)
-
-/*
-Fast version of logf using Intel float instructions.
-
- float _f_log10f (float x);
-
-Function calculates the log base 10 of x.
-There is no error checking or setting of errno.
-*/
-
- #include "i386mach.h"
-
- .global SYM (_f_log10f)
- SOTYPE_FUNCTION(_f_log10f)
-
-SYM (_f_log10f):
- pushl ebp
- movl esp,ebp
-
- fld1
- fldl2t
- fdivrp
- flds 8(ebp)
- fyl2x
-
- leave
- ret
-
-#endif
diff --git a/newlib/libc/machine/i386/f_logf.S b/newlib/libc/machine/i386/f_logf.S
deleted file mode 100644
index 3fafa8d84..000000000
--- a/newlib/libc/machine/i386/f_logf.S
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
- * ====================================================
- * Copyright (C) 1998, 2002 by Red Hat Inc. All rights reserved.
- *
- * Permission to use, copy, modify, and distribute this
- * software is freely granted, provided that this notice
- * is preserved.
- * ====================================================
- */
-
-#if !defined(_SOFT_FLOAT)
-
-/*
-Fast version of logf using Intel float instructions.
-
- float _f_logf (float x);
-
-Function calculates the log base e of x.
-There is no error checking or setting of errno.
-*/
-
- #include "i386mach.h"
-
- .global SYM (_f_logf)
- SOTYPE_FUNCTION(_f_logf)
-
-SYM (_f_logf):
- pushl ebp
- movl esp,ebp
-
- fld1
- fldl2e
- fdivrp
- flds 8(ebp)
- fyl2x
-
- leave
- ret
-
-#endif
diff --git a/newlib/libc/machine/i386/f_math.h b/newlib/libc/machine/i386/f_math.h
deleted file mode 100644
index bd44b1e92..000000000
--- a/newlib/libc/machine/i386/f_math.h
+++ /dev/null
@@ -1,29 +0,0 @@
-#ifndef __F_MATH_H__
-#define __F_MATH_H__
-
-#include <_ansi.h>
-#include "fdlibm.h"
-
-__inline__
-static
-int
-_DEFUN (check_finite, (x),
- double x)
-{
- __int32_t hx;
- GET_HIGH_WORD(hx,x);
- return (int)((__uint32_t)((hx&0x7fffffff)-0x7ff00000)>>31);
-}
-
-__inline__
-static
-int
-_DEFUN (check_finitef, (x),
- float x)
-{
- __int32_t ix;
- GET_FLOAT_WORD(ix,x);
- return (int)((__uint32_t)((ix&0x7fffffff)-0x7f800000)>>31);
-}
-
-#endif /* __F_MATH_H__ */
diff --git a/newlib/libc/machine/i386/f_pow.c b/newlib/libc/machine/i386/f_pow.c
deleted file mode 100644
index 050faa371..000000000
--- a/newlib/libc/machine/i386/f_pow.c
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- * ====================================================
- * Copyright (C) 1998, 2002 by Red Hat Inc. All rights reserved.
- *
- * Permission to use, copy, modify, and distribute this
- * software is freely granted, provided that this notice
- * is preserved.
- * ====================================================
- */
-
-#if !defined(_SOFT_FLOAT)
-
-/*
-Fast version of pow using Intel float instructions.
-
- double _f_pow (double x, double y);
-
-Function calculates x to power of y.
-The function optimizes the case where x is >0.0 and y is finite.
-In such a case, there is no error checking or setting of errno.
-All other cases defer to normal pow() function which will
-set errno as normal.
-*/
-
-#include <math.h>
-#include <ieeefp.h>
-#include "f_math.h"
-
-double _f_pow (double x, double y)
-{
- /* following sequence handles the majority of cases for pow() */
- if (x > 0.0 && check_finite(y))
- {
- double result;
- /* calculate x ** y as 2 ** (y log2(x)). On Intel, can only
- raise 2 to an integer or a small fraction, thus, we have
- to perform two steps 2**integer portion * 2**fraction. */
- asm ("fldl 8(%%ebp); fyl2x; fld %%st; frndint; fsub %%st,%%st(1);" \
- "fxch; fchs; f2xm1; fld1; faddp; fxch; fld1; fscale; fstp %%st(1);"\
- "fmulp" : "=t" (result) : "0" (y));
- return result;
- }
- else /* all other strange cases, defer to normal pow() */
- return pow (x,y);
-}
-
-#endif
diff --git a/newlib/libc/machine/i386/f_powf.c b/newlib/libc/machine/i386/f_powf.c
deleted file mode 100644
index ca3ef60c7..000000000
--- a/newlib/libc/machine/i386/f_powf.c
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- * ====================================================
- * Copyright (C) 1998, 2002 by Red Hat Inc. All rights reserved.
- *
- * Permission to use, copy, modify, and distribute this
- * software is freely granted, provided that this notice
- * is preserved.
- * ====================================================
- */
-
-#if !defined(_SOFT_FLOAT)
-
-/*
-Fast version of pow using Intel float instructions.
-
- float _f_powf (float x, float y);
-
-Function calculates x to power of y.
-The function optimizes the case where x is >0.0 and y is finite.
-In such a case, there is no error checking or setting of errno.
-All other cases defer to normal powf() function which will
-set errno as normal.
-*/
-
-#include <math.h>
-#include <ieeefp.h>
-#include "f_math.h"
-
-float _f_powf (float x, float y)
-{
- /* following sequence handles the majority of cases for pow() */
- if (x > 0.0 && check_finitef(y))
- {
- float result;
- /* calculate x ** y as 2 ** (y log2(x)). On Intel, can only
- raise 2 to an integer or a small fraction, thus, we have
- to perform two steps 2**integer portion * 2**fraction. */
- asm ("flds 8(%%ebp); fyl2x; fld %%st; frndint; fsub %%st,%%st(1);" \
- "fxch; fchs; f2xm1; fld1; faddp; fxch; fld1; fscale; fstp %%st(1);"\
- "fmulp" : "=t" (result) : "0" (y));
- return result;
- }
- else /* all other strange cases, defer to normal pow() */
- return powf (x,y);
-}
-
-#endif
diff --git a/newlib/libc/machine/i386/f_tan.S b/newlib/libc/machine/i386/f_tan.S
deleted file mode 100644
index c7c370470..000000000
--- a/newlib/libc/machine/i386/f_tan.S
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- * ====================================================
- * Copyright (C) 1998, 2002 by Red Hat Inc. All rights reserved.
- *
- * Permission to use, copy, modify, and distribute this
- * software is freely granted, provided that this notice
- * is preserved.
- * ====================================================
- */
-
-#if !defined(_SOFT_FLOAT)
-
-/*
-Fast version of tan using Intel float instructions.
-
- double _f_tan (double x);
-
-Function calculates the tangent of x.
-There is no error checking or setting of errno.
-*/
-
- #include "i386mach.h"
-
- .global SYM (_f_tan)
- SOTYPE_FUNCTION(_f_tan)
-
-SYM (_f_tan):
- pushl ebp
- movl esp,ebp
- fldl 8(ebp)
- fptan
- fincstp
-
- leave
- ret
-
-#endif
diff --git a/newlib/libc/machine/i386/f_tanf.S b/newlib/libc/machine/i386/f_tanf.S
deleted file mode 100644
index 6afda9e73..000000000
--- a/newlib/libc/machine/i386/f_tanf.S
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- * ====================================================
- * Copyright (C) 1998, 2002 by Red Hat Inc. All rights reserved.
- *
- * Permission to use, copy, modify, and distribute this
- * software is freely granted, provided that this notice
- * is preserved.
- * ====================================================
- */
-
-#if !defined(_SOFT_FLOAT)
-
-/*
-Fast version of tanf using Intel float instructions.
-
- float _f_tanf (float x);
-
-Function calculates the tangent of x.
-There is no error checking or setting of errno.
-*/
-
- #include "i386mach.h"
-
- .global SYM (_f_tanf)
- SOTYPE_FUNCTION(_f_tanf)
-
-SYM (_f_tanf):
- pushl ebp
- movl esp,ebp
- flds 8(ebp)
- fptan
- fincstp
-
- leave
- ret
-
-#endif
diff --git a/newlib/libc/machine/i386/i386mach.h b/newlib/libc/machine/i386/i386mach.h
index 23c32190d..403d24bfe 100644
--- a/newlib/libc/machine/i386/i386mach.h
+++ b/newlib/libc/machine/i386/i386mach.h
@@ -74,7 +74,7 @@
#define SOTYPE_FUNCTION(sym)
#endif
-#ifdef _I386MACH_ALLOW_HW_INTERRUPTS
+#ifndef _I386MACH_DISABLE_HW_INTERRUPTS
#define __CLI
#define __STI
#else
diff --git a/newlib/libc/machine/i386/memchr.S b/newlib/libc/machine/i386/memchr.S
index 7639685be..d9b0bf2b7 100644
--- a/newlib/libc/machine/i386/memchr.S
+++ b/newlib/libc/machine/i386/memchr.S
@@ -14,13 +14,33 @@
SOTYPE_FUNCTION(memchr)
SYM (memchr):
+#ifdef __iamcu__
+ pushl edi
+ movl eax,edi
+ movl edx,eax
+ xorl edx,edx
+ testl ecx,ecx
+ jz L20
+
+ repnz
+ scasb
+
+ setnz dl
+ decl edi
+
+ decl edx
+ andl edi,edx
+L20:
+ movl edx,eax
+
+ popl edi
+#else
pushl ebp
movl esp,ebp
pushl edi
movzbl 12(ebp),eax
movl 16(ebp),ecx
movl 8(ebp),edi
-
xorl edx,edx
testl ecx,ecx
jz L20
@@ -111,4 +131,5 @@ L20:
leal -4(ebp),esp
popl edi
leave
+#endif
ret
diff --git a/newlib/libc/machine/i386/memcmp.S b/newlib/libc/machine/i386/memcmp.S
index 26b8ef1b6..4a01b826e 100644
--- a/newlib/libc/machine/i386/memcmp.S
+++ b/newlib/libc/machine/i386/memcmp.S
@@ -15,6 +15,33 @@
SYM (memcmp):
+#ifdef __iamcu__
+ pushl edi
+ pushl esi
+ movl eax,edi
+ movl edx,esi
+ cld
+
+/* check if length is zero in which case just return 0 */
+
+ xorl eax,eax
+ testl ecx,ecx
+ jz L4
+
+/* compare any unaligned bytes or remainder bytes */
+ repz
+ cmpsb
+
+/* set output to be < 0 if less than, 0 if equal, or > 0 if greater than */
+ xorl edx,edx
+ movb -1(esi),dl
+ movb -1(edi),al
+ subl edx,eax
+
+L4:
+ popl esi
+ popl edi
+#else
pushl ebp
movl esp,ebp
subl $16,esp
@@ -73,4 +100,5 @@ L4:
popl edi
popl ebx
leave
+#endif
ret
diff --git a/newlib/libc/machine/i386/memcpy.S b/newlib/libc/machine/i386/memcpy.S
index b53e2a17b..a14aa2a94 100644
--- a/newlib/libc/machine/i386/memcpy.S
+++ b/newlib/libc/machine/i386/memcpy.S
@@ -15,6 +15,17 @@
SYM (memcpy):
+#ifdef __iamcu__
+ pushl esi
+ pushl edi
+ movl eax,edi
+ movl edx,esi
+
+ rep movsb
+
+ popl edi
+ popl esi
+#else
pushl ebp
movl esp,ebp
pushl esi
@@ -71,4 +82,5 @@ SYM (memcpy):
popl edi
popl esi
leave
+#endif
ret
diff --git a/newlib/libc/machine/i386/memmove.S b/newlib/libc/machine/i386/memmove.S
index 1ea2f6dfc..102658205 100644
--- a/newlib/libc/machine/i386/memmove.S
+++ b/newlib/libc/machine/i386/memmove.S
@@ -15,6 +15,32 @@
SYM (memmove):
+#ifdef __iamcu__
+ pushl esi
+ pushl edi
+ movl eax,edi
+ movl edx,esi
+ cmp esi,edi
+ ja .Lcopy_backward
+ je .Lbwd_write_0bytes
+
+ rep movsb
+
+ popl edi
+ popl esi
+ ret
+
+.Lcopy_backward:
+ lea -1(edi,ecx),edi
+ lea -1(esi,ecx),esi
+ std
+ rep movsb
+ cld
+
+.Lbwd_write_0bytes:
+ popl edi
+ popl esi
+#else
pushl ebp
movl esp,ebp
pushl esi
@@ -143,4 +169,5 @@ SYM (memmove):
popl edi
popl esi
leave
+#endif
ret
diff --git a/newlib/libc/machine/i386/memset.S b/newlib/libc/machine/i386/memset.S
index 6eb2cd6da..83b25567b 100644
--- a/newlib/libc/machine/i386/memset.S
+++ b/newlib/libc/machine/i386/memset.S
@@ -15,6 +15,15 @@
SYM (memset):
+#ifdef __iamcu__
+ pushl edi
+ movl eax,edi
+ movzbl dl,eax
+ mov edi,edx
+ rep stosb
+ mov edx,eax
+ popl edi
+#else
pushl ebp
movl esp,ebp
pushl edi
@@ -96,4 +105,5 @@ SYM (memset):
leal -4(ebp),esp
popl edi
leave
+#endif
ret
diff --git a/newlib/libc/machine/i386/setjmp.S b/newlib/libc/machine/i386/setjmp.S
index fd746e46c..45c689f71 100644
--- a/newlib/libc/machine/i386/setjmp.S
+++ b/newlib/libc/machine/i386/setjmp.S
@@ -20,6 +20,10 @@
** jmp_buf:
** eax ebx ecx edx esi edi ebp esp eip
** 0 4 8 12 16 20 24 28 32
+ **
+ ** Intel MCU jmp_buf:
+ ** ebx esi edi ebp esp eip
+ ** 0 4 8 12 16 20
*/
#include "i386mach.h"
@@ -31,6 +35,23 @@
SYM (setjmp):
+#ifdef __iamcu__
+ /* Store EIP. */
+ movl 0(esp),ecx
+ movl ecx,20(eax)
+
+ movl ebx,0 (eax)
+ movl esi,4 (eax)
+ movl edi,8 (eax)
+ movl ebp,12(eax)
+
+ /* Skip return address, which will be pushed onto stack in
+ longjmp, and store SP. */
+ leal 4(esp),ecx
+ movl ecx,16(eax)
+
+ xorl eax,eax
+#else
pushl ebp
movl esp,ebp
@@ -59,9 +80,28 @@ SYM (setjmp):
popl edi
movl $0,eax
leave
+#endif
ret
SYM (longjmp):
+#ifdef __iamcu__
+ /* Check retval. */
+ testl edx,edx
+ jne 0f
+ incl edx
+0:
+ /* Restore stack first. */
+ movl 16(eax),esp
+
+ /* Put return address on stack. */
+ pushl 20(eax)
+
+ movl 0(eax),ebx
+ movl 4(eax),esi
+ movl 8(eax),edi
+ movl 12(eax),ebp
+ movl edx,eax
+#else
pushl ebp
movl esp,ebp
@@ -87,5 +127,6 @@ SYM (longjmp):
movl 16(edi),esi
movl 20(edi),edi
__STI
+#endif
ret
diff --git a/newlib/libc/machine/i386/strchr.S b/newlib/libc/machine/i386/strchr.S
index 1d98b8149..43ee0fbbf 100644
--- a/newlib/libc/machine/i386/strchr.S
+++ b/newlib/libc/machine/i386/strchr.S
@@ -15,6 +15,29 @@
SYM (strchr):
+#ifdef __iamcu__
+ xorl ecx,ecx
+ movb dl,cl
+
+/* loop while (*s && *s++ != c) */
+ leal -1(eax),eax
+L15:
+ incl eax
+ movb (eax),dl
+ testb dl,dl
+ je L14
+ cmpb cl,dl
+ jne L15
+
+L14:
+/* if (*s == c) return address otherwise return NULL */
+ cmpb cl,(eax)
+ je L19
+ xorl eax,eax
+
+L19:
+ ret
+#else
pushl ebp
movl esp,ebp
pushl edi
@@ -170,3 +193,5 @@ L27:
jmp L9
#endif /* !__OPTIMIZE_SIZE__ */
+
+#endif /* __iamcu__ */
diff --git a/newlib/libc/machine/i386/strlen.S b/newlib/libc/machine/i386/strlen.S
index 0e3cb640c..373ea0f5d 100644
--- a/newlib/libc/machine/i386/strlen.S
+++ b/newlib/libc/machine/i386/strlen.S
@@ -18,9 +18,13 @@ SYM (strlen):
pushl ebp
movl esp,ebp
pushl edi
+#ifdef __iamcu__
+ movl eax,edx
+#else
movl 8(ebp),edx
+#endif
-#ifdef __OPTIMIZE_SIZE__
+#if defined __OPTIMIZE_SIZE__ || defined __iamcu__
cld
movl edx,edi
movl $4294967295,ecx
diff --git a/newlib/libc/machine/i960/configure b/newlib/libc/machine/i960/configure
index e8ab02b45..ed41a87ce 100755
--- a/newlib/libc/machine/i960/configure
+++ b/newlib/libc/machine/i960/configure
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.68 for newlib 2.0.0.
+# Generated by GNU Autoconf 2.68 for newlib 2.4.0.
#
#
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
@@ -556,8 +556,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='newlib'
PACKAGE_TARNAME='newlib'
-PACKAGE_VERSION='2.0.0'
-PACKAGE_STRING='newlib 2.0.0'
+PACKAGE_VERSION='2.4.0'
+PACKAGE_STRING='newlib 2.4.0'
PACKAGE_BUGREPORT=''
PACKAGE_URL=''
@@ -1239,7 +1239,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures newlib 2.0.0 to adapt to many kinds of systems.
+\`configure' configures newlib 2.4.0 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1309,7 +1309,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of newlib 2.0.0:";;
+ short | recursive ) echo "Configuration of newlib 2.4.0:";;
esac
cat <<\_ACEOF
@@ -1400,7 +1400,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-newlib configure 2.0.0
+newlib configure 2.4.0
generated by GNU Autoconf 2.68
Copyright (C) 2010 Free Software Foundation, Inc.
@@ -1455,7 +1455,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by newlib $as_me 2.0.0, which was
+It was created by newlib $as_me 2.4.0, which was
generated by GNU Autoconf 2.68. Invocation command line was
$ $0 $@
@@ -2527,7 +2527,7 @@ fi
# Define the identity of the package.
PACKAGE='newlib'
- VERSION='2.0.0'
+ VERSION='2.4.0'
# Some tools Automake needs.
@@ -4007,7 +4007,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by newlib $as_me 2.0.0, which was
+This file was extended by newlib $as_me 2.4.0, which was
generated by GNU Autoconf 2.68. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -4064,7 +4064,7 @@ _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
-newlib config.status 2.0.0
+newlib config.status 2.4.0
configured by $0, generated by GNU Autoconf 2.68,
with options \\"\$ac_cs_config\\"
diff --git a/newlib/libc/machine/iq2000/configure b/newlib/libc/machine/iq2000/configure
index 7f4d0d6df..bc041896f 100755
--- a/newlib/libc/machine/iq2000/configure
+++ b/newlib/libc/machine/iq2000/configure
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.68 for newlib 2.0.0.
+# Generated by GNU Autoconf 2.68 for newlib 2.4.0.
#
#
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
@@ -556,8 +556,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='newlib'
PACKAGE_TARNAME='newlib'
-PACKAGE_VERSION='2.0.0'
-PACKAGE_STRING='newlib 2.0.0'
+PACKAGE_VERSION='2.4.0'
+PACKAGE_STRING='newlib 2.4.0'
PACKAGE_BUGREPORT=''
PACKAGE_URL=''
@@ -1239,7 +1239,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures newlib 2.0.0 to adapt to many kinds of systems.
+\`configure' configures newlib 2.4.0 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1309,7 +1309,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of newlib 2.0.0:";;
+ short | recursive ) echo "Configuration of newlib 2.4.0:";;
esac
cat <<\_ACEOF
@@ -1400,7 +1400,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-newlib configure 2.0.0
+newlib configure 2.4.0
generated by GNU Autoconf 2.68
Copyright (C) 2010 Free Software Foundation, Inc.
@@ -1455,7 +1455,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by newlib $as_me 2.0.0, which was
+It was created by newlib $as_me 2.4.0, which was
generated by GNU Autoconf 2.68. Invocation command line was
$ $0 $@
@@ -2527,7 +2527,7 @@ fi
# Define the identity of the package.
PACKAGE='newlib'
- VERSION='2.0.0'
+ VERSION='2.4.0'
# Some tools Automake needs.
@@ -4007,7 +4007,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by newlib $as_me 2.0.0, which was
+This file was extended by newlib $as_me 2.4.0, which was
generated by GNU Autoconf 2.68. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -4064,7 +4064,7 @@ _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
-newlib config.status 2.0.0
+newlib config.status 2.4.0
configured by $0, generated by GNU Autoconf 2.68,
with options \\"\$ac_cs_config\\"
diff --git a/newlib/libc/machine/lm32/configure b/newlib/libc/machine/lm32/configure
index d96b7718a..ca07e566c 100755
--- a/newlib/libc/machine/lm32/configure
+++ b/newlib/libc/machine/lm32/configure
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.68 for newlib 2.0.0.
+# Generated by GNU Autoconf 2.68 for newlib 2.4.0.
#
#
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
@@ -556,8 +556,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='newlib'
PACKAGE_TARNAME='newlib'
-PACKAGE_VERSION='2.0.0'
-PACKAGE_STRING='newlib 2.0.0'
+PACKAGE_VERSION='2.4.0'
+PACKAGE_STRING='newlib 2.4.0'
PACKAGE_BUGREPORT=''
PACKAGE_URL=''
@@ -1239,7 +1239,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures newlib 2.0.0 to adapt to many kinds of systems.
+\`configure' configures newlib 2.4.0 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1309,7 +1309,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of newlib 2.0.0:";;
+ short | recursive ) echo "Configuration of newlib 2.4.0:";;
esac
cat <<\_ACEOF
@@ -1400,7 +1400,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-newlib configure 2.0.0
+newlib configure 2.4.0
generated by GNU Autoconf 2.68
Copyright (C) 2010 Free Software Foundation, Inc.
@@ -1455,7 +1455,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by newlib $as_me 2.0.0, which was
+It was created by newlib $as_me 2.4.0, which was
generated by GNU Autoconf 2.68. Invocation command line was
$ $0 $@
@@ -2527,7 +2527,7 @@ fi
# Define the identity of the package.
PACKAGE='newlib'
- VERSION='2.0.0'
+ VERSION='2.4.0'
# Some tools Automake needs.
@@ -4007,7 +4007,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by newlib $as_me 2.0.0, which was
+This file was extended by newlib $as_me 2.4.0, which was
generated by GNU Autoconf 2.68. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -4064,7 +4064,7 @@ _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
-newlib config.status 2.0.0
+newlib config.status 2.4.0
configured by $0, generated by GNU Autoconf 2.68,
with options \\"\$ac_cs_config\\"
diff --git a/newlib/libc/machine/m32c/configure b/newlib/libc/machine/m32c/configure
index d96b7718a..ca07e566c 100755
--- a/newlib/libc/machine/m32c/configure
+++ b/newlib/libc/machine/m32c/configure
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.68 for newlib 2.0.0.
+# Generated by GNU Autoconf 2.68 for newlib 2.4.0.
#
#
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
@@ -556,8 +556,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='newlib'
PACKAGE_TARNAME='newlib'
-PACKAGE_VERSION='2.0.0'
-PACKAGE_STRING='newlib 2.0.0'
+PACKAGE_VERSION='2.4.0'
+PACKAGE_STRING='newlib 2.4.0'
PACKAGE_BUGREPORT=''
PACKAGE_URL=''
@@ -1239,7 +1239,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures newlib 2.0.0 to adapt to many kinds of systems.
+\`configure' configures newlib 2.4.0 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1309,7 +1309,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of newlib 2.0.0:";;
+ short | recursive ) echo "Configuration of newlib 2.4.0:";;
esac
cat <<\_ACEOF
@@ -1400,7 +1400,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-newlib configure 2.0.0
+newlib configure 2.4.0
generated by GNU Autoconf 2.68
Copyright (C) 2010 Free Software Foundation, Inc.
@@ -1455,7 +1455,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by newlib $as_me 2.0.0, which was
+It was created by newlib $as_me 2.4.0, which was
generated by GNU Autoconf 2.68. Invocation command line was
$ $0 $@
@@ -2527,7 +2527,7 @@ fi
# Define the identity of the package.
PACKAGE='newlib'
- VERSION='2.0.0'
+ VERSION='2.4.0'
# Some tools Automake needs.
@@ -4007,7 +4007,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by newlib $as_me 2.0.0, which was
+This file was extended by newlib $as_me 2.4.0, which was
generated by GNU Autoconf 2.68. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -4064,7 +4064,7 @@ _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
-newlib config.status 2.0.0
+newlib config.status 2.4.0
configured by $0, generated by GNU Autoconf 2.68,
with options \\"\$ac_cs_config\\"
diff --git a/newlib/libc/machine/m32r/configure b/newlib/libc/machine/m32r/configure
index d96b7718a..ca07e566c 100755
--- a/newlib/libc/machine/m32r/configure
+++ b/newlib/libc/machine/m32r/configure
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.68 for newlib 2.0.0.
+# Generated by GNU Autoconf 2.68 for newlib 2.4.0.
#
#
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
@@ -556,8 +556,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='newlib'
PACKAGE_TARNAME='newlib'
-PACKAGE_VERSION='2.0.0'
-PACKAGE_STRING='newlib 2.0.0'
+PACKAGE_VERSION='2.4.0'
+PACKAGE_STRING='newlib 2.4.0'
PACKAGE_BUGREPORT=''
PACKAGE_URL=''
@@ -1239,7 +1239,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures newlib 2.0.0 to adapt to many kinds of systems.
+\`configure' configures newlib 2.4.0 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1309,7 +1309,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of newlib 2.0.0:";;
+ short | recursive ) echo "Configuration of newlib 2.4.0:";;
esac
cat <<\_ACEOF
@@ -1400,7 +1400,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-newlib configure 2.0.0
+newlib configure 2.4.0
generated by GNU Autoconf 2.68
Copyright (C) 2010 Free Software Foundation, Inc.
@@ -1455,7 +1455,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by newlib $as_me 2.0.0, which was
+It was created by newlib $as_me 2.4.0, which was
generated by GNU Autoconf 2.68. Invocation command line was
$ $0 $@
@@ -2527,7 +2527,7 @@ fi
# Define the identity of the package.
PACKAGE='newlib'
- VERSION='2.0.0'
+ VERSION='2.4.0'
# Some tools Automake needs.
@@ -4007,7 +4007,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by newlib $as_me 2.0.0, which was
+This file was extended by newlib $as_me 2.4.0, which was
generated by GNU Autoconf 2.68. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -4064,7 +4064,7 @@ _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
-newlib config.status 2.0.0
+newlib config.status 2.4.0
configured by $0, generated by GNU Autoconf 2.68,
with options \\"\$ac_cs_config\\"
diff --git a/newlib/libc/machine/m68hc11/configure b/newlib/libc/machine/m68hc11/configure
index d96b7718a..ca07e566c 100755
--- a/newlib/libc/machine/m68hc11/configure
+++ b/newlib/libc/machine/m68hc11/configure
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.68 for newlib 2.0.0.
+# Generated by GNU Autoconf 2.68 for newlib 2.4.0.
#
#
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
@@ -556,8 +556,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='newlib'
PACKAGE_TARNAME='newlib'
-PACKAGE_VERSION='2.0.0'
-PACKAGE_STRING='newlib 2.0.0'
+PACKAGE_VERSION='2.4.0'
+PACKAGE_STRING='newlib 2.4.0'
PACKAGE_BUGREPORT=''
PACKAGE_URL=''
@@ -1239,7 +1239,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures newlib 2.0.0 to adapt to many kinds of systems.
+\`configure' configures newlib 2.4.0 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1309,7 +1309,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of newlib 2.0.0:";;
+ short | recursive ) echo "Configuration of newlib 2.4.0:";;
esac
cat <<\_ACEOF
@@ -1400,7 +1400,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-newlib configure 2.0.0
+newlib configure 2.4.0
generated by GNU Autoconf 2.68
Copyright (C) 2010 Free Software Foundation, Inc.
@@ -1455,7 +1455,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by newlib $as_me 2.0.0, which was
+It was created by newlib $as_me 2.4.0, which was
generated by GNU Autoconf 2.68. Invocation command line was
$ $0 $@
@@ -2527,7 +2527,7 @@ fi
# Define the identity of the package.
PACKAGE='newlib'
- VERSION='2.0.0'
+ VERSION='2.4.0'
# Some tools Automake needs.
@@ -4007,7 +4007,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by newlib $as_me 2.0.0, which was
+This file was extended by newlib $as_me 2.4.0, which was
generated by GNU Autoconf 2.68. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -4064,7 +4064,7 @@ _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
-newlib config.status 2.0.0
+newlib config.status 2.4.0
configured by $0, generated by GNU Autoconf 2.68,
with options \\"\$ac_cs_config\\"
diff --git a/newlib/libc/machine/m68k/configure b/newlib/libc/machine/m68k/configure
index d96b7718a..ca07e566c 100755
--- a/newlib/libc/machine/m68k/configure
+++ b/newlib/libc/machine/m68k/configure
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.68 for newlib 2.0.0.
+# Generated by GNU Autoconf 2.68 for newlib 2.4.0.
#
#
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
@@ -556,8 +556,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='newlib'
PACKAGE_TARNAME='newlib'
-PACKAGE_VERSION='2.0.0'
-PACKAGE_STRING='newlib 2.0.0'
+PACKAGE_VERSION='2.4.0'
+PACKAGE_STRING='newlib 2.4.0'
PACKAGE_BUGREPORT=''
PACKAGE_URL=''
@@ -1239,7 +1239,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures newlib 2.0.0 to adapt to many kinds of systems.
+\`configure' configures newlib 2.4.0 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1309,7 +1309,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of newlib 2.0.0:";;
+ short | recursive ) echo "Configuration of newlib 2.4.0:";;
esac
cat <<\_ACEOF
@@ -1400,7 +1400,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-newlib configure 2.0.0
+newlib configure 2.4.0
generated by GNU Autoconf 2.68
Copyright (C) 2010 Free Software Foundation, Inc.
@@ -1455,7 +1455,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by newlib $as_me 2.0.0, which was
+It was created by newlib $as_me 2.4.0, which was
generated by GNU Autoconf 2.68. Invocation command line was
$ $0 $@
@@ -2527,7 +2527,7 @@ fi
# Define the identity of the package.
PACKAGE='newlib'
- VERSION='2.0.0'
+ VERSION='2.4.0'
# Some tools Automake needs.
@@ -4007,7 +4007,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by newlib $as_me 2.0.0, which was
+This file was extended by newlib $as_me 2.4.0, which was
generated by GNU Autoconf 2.68. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -4064,7 +4064,7 @@ _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
-newlib config.status 2.0.0
+newlib config.status 2.4.0
configured by $0, generated by GNU Autoconf 2.68,
with options \\"\$ac_cs_config\\"
diff --git a/newlib/libc/machine/m88k/configure b/newlib/libc/machine/m88k/configure
index d96b7718a..ca07e566c 100755
--- a/newlib/libc/machine/m88k/configure
+++ b/newlib/libc/machine/m88k/configure
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.68 for newlib 2.0.0.
+# Generated by GNU Autoconf 2.68 for newlib 2.4.0.
#
#
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
@@ -556,8 +556,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='newlib'
PACKAGE_TARNAME='newlib'
-PACKAGE_VERSION='2.0.0'
-PACKAGE_STRING='newlib 2.0.0'
+PACKAGE_VERSION='2.4.0'
+PACKAGE_STRING='newlib 2.4.0'
PACKAGE_BUGREPORT=''
PACKAGE_URL=''
@@ -1239,7 +1239,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures newlib 2.0.0 to adapt to many kinds of systems.
+\`configure' configures newlib 2.4.0 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1309,7 +1309,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of newlib 2.0.0:";;
+ short | recursive ) echo "Configuration of newlib 2.4.0:";;
esac
cat <<\_ACEOF
@@ -1400,7 +1400,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-newlib configure 2.0.0
+newlib configure 2.4.0
generated by GNU Autoconf 2.68
Copyright (C) 2010 Free Software Foundation, Inc.
@@ -1455,7 +1455,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by newlib $as_me 2.0.0, which was
+It was created by newlib $as_me 2.4.0, which was
generated by GNU Autoconf 2.68. Invocation command line was
$ $0 $@
@@ -2527,7 +2527,7 @@ fi
# Define the identity of the package.
PACKAGE='newlib'
- VERSION='2.0.0'
+ VERSION='2.4.0'
# Some tools Automake needs.
@@ -4007,7 +4007,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by newlib $as_me 2.0.0, which was
+This file was extended by newlib $as_me 2.4.0, which was
generated by GNU Autoconf 2.68. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -4064,7 +4064,7 @@ _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
-newlib config.status 2.0.0
+newlib config.status 2.4.0
configured by $0, generated by GNU Autoconf 2.68,
with options \\"\$ac_cs_config\\"
diff --git a/newlib/libc/machine/mep/configure b/newlib/libc/machine/mep/configure
index 7f4d0d6df..bc041896f 100755
--- a/newlib/libc/machine/mep/configure
+++ b/newlib/libc/machine/mep/configure
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.68 for newlib 2.0.0.
+# Generated by GNU Autoconf 2.68 for newlib 2.4.0.
#
#
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
@@ -556,8 +556,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='newlib'
PACKAGE_TARNAME='newlib'
-PACKAGE_VERSION='2.0.0'
-PACKAGE_STRING='newlib 2.0.0'
+PACKAGE_VERSION='2.4.0'
+PACKAGE_STRING='newlib 2.4.0'
PACKAGE_BUGREPORT=''
PACKAGE_URL=''
@@ -1239,7 +1239,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures newlib 2.0.0 to adapt to many kinds of systems.
+\`configure' configures newlib 2.4.0 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1309,7 +1309,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of newlib 2.0.0:";;
+ short | recursive ) echo "Configuration of newlib 2.4.0:";;
esac
cat <<\_ACEOF
@@ -1400,7 +1400,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-newlib configure 2.0.0
+newlib configure 2.4.0
generated by GNU Autoconf 2.68
Copyright (C) 2010 Free Software Foundation, Inc.
@@ -1455,7 +1455,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by newlib $as_me 2.0.0, which was
+It was created by newlib $as_me 2.4.0, which was
generated by GNU Autoconf 2.68. Invocation command line was
$ $0 $@
@@ -2527,7 +2527,7 @@ fi
# Define the identity of the package.
PACKAGE='newlib'
- VERSION='2.0.0'
+ VERSION='2.4.0'
# Some tools Automake needs.
@@ -4007,7 +4007,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by newlib $as_me 2.0.0, which was
+This file was extended by newlib $as_me 2.4.0, which was
generated by GNU Autoconf 2.68. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -4064,7 +4064,7 @@ _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
-newlib config.status 2.0.0
+newlib config.status 2.4.0
configured by $0, generated by GNU Autoconf 2.68,
with options \\"\$ac_cs_config\\"
diff --git a/newlib/libc/machine/microblaze/configure b/newlib/libc/machine/microblaze/configure
index f2e6f17b4..be09e994e 100644
--- a/newlib/libc/machine/microblaze/configure
+++ b/newlib/libc/machine/microblaze/configure
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.68 for newlib 2.0.0.
+# Generated by GNU Autoconf 2.68 for newlib 2.4.0.
#
#
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
@@ -556,8 +556,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='newlib'
PACKAGE_TARNAME='newlib'
-PACKAGE_VERSION='2.0.0'
-PACKAGE_STRING='newlib 2.0.0'
+PACKAGE_VERSION='2.4.0'
+PACKAGE_STRING='newlib 2.4.0'
PACKAGE_BUGREPORT=''
PACKAGE_URL=''
@@ -1239,7 +1239,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures newlib 2.0.0 to adapt to many kinds of systems.
+\`configure' configures newlib 2.4.0 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1309,7 +1309,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of newlib 2.0.0:";;
+ short | recursive ) echo "Configuration of newlib 2.4.0:";;
esac
cat <<\_ACEOF
@@ -1400,7 +1400,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-newlib configure 2.0.0
+newlib configure 2.4.0
generated by GNU Autoconf 2.68
Copyright (C) 2010 Free Software Foundation, Inc.
@@ -1455,7 +1455,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by newlib $as_me 2.0.0, which was
+It was created by newlib $as_me 2.4.0, which was
generated by GNU Autoconf 2.68. Invocation command line was
$ $0 $@
@@ -2527,7 +2527,7 @@ fi
# Define the identity of the package.
PACKAGE='newlib'
- VERSION='2.0.0'
+ VERSION='2.4.0'
# Some tools Automake needs.
@@ -4007,7 +4007,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by newlib $as_me 2.0.0, which was
+This file was extended by newlib $as_me 2.4.0, which was
generated by GNU Autoconf 2.68. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -4064,7 +4064,7 @@ _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
-newlib config.status 2.0.0
+newlib config.status 2.4.0
configured by $0, generated by GNU Autoconf 2.68,
with options \\"\$ac_cs_config\\"
diff --git a/newlib/libc/machine/mips/Makefile.am b/newlib/libc/machine/mips/Makefile.am
index 16371df01..1695b18ff 100644
--- a/newlib/libc/machine/mips/Makefile.am
+++ b/newlib/libc/machine/mips/Makefile.am
@@ -8,7 +8,7 @@ AM_CCASFLAGS = $(INCLUDES)
noinst_LIBRARIES = lib.a
-lib_a_SOURCES = setjmp.S strlen.c strcmp.c strncpy.c memset.c memcpy.S
+lib_a_SOURCES = setjmp.S strlen.c strcmp.S strncpy.c memset.S memcpy.S
lib_a_CCASFLAGS=$(AM_CCASFLAGS) -D_COMPILING_NEWLIB
lib_a_CFLAGS=$(AM_CFLAGS) -D_COMPILING_NEWLIB
diff --git a/newlib/libc/machine/mips/Makefile.in b/newlib/libc/machine/mips/Makefile.in
index e24034692..b2d729e9f 100644
--- a/newlib/libc/machine/mips/Makefile.in
+++ b/newlib/libc/machine/mips/Makefile.in
@@ -197,7 +197,7 @@ AUTOMAKE_OPTIONS = cygnus
INCLUDES = $(NEWLIB_CFLAGS) $(CROSS_CFLAGS) $(TARGET_CFLAGS)
AM_CCASFLAGS = $(INCLUDES)
noinst_LIBRARIES = lib.a
-lib_a_SOURCES = setjmp.S strlen.c strcmp.c strncpy.c memset.c memcpy.S
+lib_a_SOURCES = setjmp.S strlen.c strcmp.S strncpy.c memset.S memcpy.S
lib_a_CCASFLAGS = $(AM_CCASFLAGS) -D_COMPILING_NEWLIB
lib_a_CFLAGS = $(AM_CFLAGS) -D_COMPILING_NEWLIB
ACLOCAL_AMFLAGS = -I ../../.. -I ../../../..
@@ -266,6 +266,18 @@ lib_a-setjmp.o: setjmp.S
lib_a-setjmp.obj: setjmp.S
$(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CCASFLAGS) $(CCASFLAGS) -c -o lib_a-setjmp.obj `if test -f 'setjmp.S'; then $(CYGPATH_W) 'setjmp.S'; else $(CYGPATH_W) '$(srcdir)/setjmp.S'; fi`
+lib_a-strcmp.o: strcmp.S
+ $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CCASFLAGS) $(CCASFLAGS) -c -o lib_a-strcmp.o `test -f 'strcmp.S' || echo '$(srcdir)/'`strcmp.S
+
+lib_a-strcmp.obj: strcmp.S
+ $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CCASFLAGS) $(CCASFLAGS) -c -o lib_a-strcmp.obj `if test -f 'strcmp.S'; then $(CYGPATH_W) 'strcmp.S'; else $(CYGPATH_W) '$(srcdir)/strcmp.S'; fi`
+
+lib_a-memset.o: memset.S
+ $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CCASFLAGS) $(CCASFLAGS) -c -o lib_a-memset.o `test -f 'memset.S' || echo '$(srcdir)/'`memset.S
+
+lib_a-memset.obj: memset.S
+ $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CCASFLAGS) $(CCASFLAGS) -c -o lib_a-memset.obj `if test -f 'memset.S'; then $(CYGPATH_W) 'memset.S'; else $(CYGPATH_W) '$(srcdir)/memset.S'; fi`
+
lib_a-memcpy.o: memcpy.S
$(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CCASFLAGS) $(CCASFLAGS) -c -o lib_a-memcpy.o `test -f 'memcpy.S' || echo '$(srcdir)/'`memcpy.S
@@ -284,24 +296,12 @@ lib_a-strlen.o: strlen.c
lib_a-strlen.obj: strlen.c
$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-strlen.obj `if test -f 'strlen.c'; then $(CYGPATH_W) 'strlen.c'; else $(CYGPATH_W) '$(srcdir)/strlen.c'; fi`
-lib_a-strcmp.o: strcmp.c
- $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-strcmp.o `test -f 'strcmp.c' || echo '$(srcdir)/'`strcmp.c
-
-lib_a-strcmp.obj: strcmp.c
- $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-strcmp.obj `if test -f 'strcmp.c'; then $(CYGPATH_W) 'strcmp.c'; else $(CYGPATH_W) '$(srcdir)/strcmp.c'; fi`
-
lib_a-strncpy.o: strncpy.c
$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-strncpy.o `test -f 'strncpy.c' || echo '$(srcdir)/'`strncpy.c
lib_a-strncpy.obj: strncpy.c
$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-strncpy.obj `if test -f 'strncpy.c'; then $(CYGPATH_W) 'strncpy.c'; else $(CYGPATH_W) '$(srcdir)/strncpy.c'; fi`
-lib_a-memset.o: memset.c
- $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-memset.o `test -f 'memset.c' || echo '$(srcdir)/'`memset.c
-
-lib_a-memset.obj: memset.c
- $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-memset.obj `if test -f 'memset.c'; then $(CYGPATH_W) 'memset.c'; else $(CYGPATH_W) '$(srcdir)/memset.c'; fi`
-
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
diff --git a/newlib/libc/machine/mips/configure b/newlib/libc/machine/mips/configure
index d96b7718a..ca07e566c 100755
--- a/newlib/libc/machine/mips/configure
+++ b/newlib/libc/machine/mips/configure
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.68 for newlib 2.0.0.
+# Generated by GNU Autoconf 2.68 for newlib 2.4.0.
#
#
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
@@ -556,8 +556,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='newlib'
PACKAGE_TARNAME='newlib'
-PACKAGE_VERSION='2.0.0'
-PACKAGE_STRING='newlib 2.0.0'
+PACKAGE_VERSION='2.4.0'
+PACKAGE_STRING='newlib 2.4.0'
PACKAGE_BUGREPORT=''
PACKAGE_URL=''
@@ -1239,7 +1239,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures newlib 2.0.0 to adapt to many kinds of systems.
+\`configure' configures newlib 2.4.0 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1309,7 +1309,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of newlib 2.0.0:";;
+ short | recursive ) echo "Configuration of newlib 2.4.0:";;
esac
cat <<\_ACEOF
@@ -1400,7 +1400,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-newlib configure 2.0.0
+newlib configure 2.4.0
generated by GNU Autoconf 2.68
Copyright (C) 2010 Free Software Foundation, Inc.
@@ -1455,7 +1455,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by newlib $as_me 2.0.0, which was
+It was created by newlib $as_me 2.4.0, which was
generated by GNU Autoconf 2.68. Invocation command line was
$ $0 $@
@@ -2527,7 +2527,7 @@ fi
# Define the identity of the package.
PACKAGE='newlib'
- VERSION='2.0.0'
+ VERSION='2.4.0'
# Some tools Automake needs.
@@ -4007,7 +4007,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by newlib $as_me 2.0.0, which was
+This file was extended by newlib $as_me 2.4.0, which was
generated by GNU Autoconf 2.68. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -4064,7 +4064,7 @@ _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
-newlib config.status 2.0.0
+newlib config.status 2.4.0
configured by $0, generated by GNU Autoconf 2.68,
with options \\"\$ac_cs_config\\"
diff --git a/newlib/libc/machine/mips/memcpy.S b/newlib/libc/machine/mips/memcpy.S
index 8c47fa5e4..21bd3b4f4 100644
--- a/newlib/libc/machine/mips/memcpy.S
+++ b/newlib/libc/machine/mips/memcpy.S
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012
+ * Copyright (c) 2012-2015
* MIPS Technologies, Inc., California.
*
* Redistribution and use in source and binary forms, with or without
@@ -28,25 +28,25 @@
*/
#ifdef ANDROID_CHANGES
-#include "machine/asm.h"
-#include "machine/regdef.h"
-#define USE_MEMMOVE_FOR_OVERLAP
-#define PREFETCH_LOAD_HINT PREFETCH_HINT_LOAD_STREAMED
-#define PREFETCH_STORE_HINT PREFETCH_HINT_PREPAREFORSTORE
+# include "machine/asm.h"
+# include "machine/regdef.h"
+# define USE_MEMMOVE_FOR_OVERLAP
+# define PREFETCH_LOAD_HINT PREFETCH_HINT_LOAD_STREAMED
+# define PREFETCH_STORE_HINT PREFETCH_HINT_PREPAREFORSTORE
#elif _LIBC
-#include <sysdep.h>
-#include <regdef.h>
-#include <sys/asm.h>
-#define PREFETCH_LOAD_HINT PREFETCH_HINT_LOAD_STREAMED
-#define PREFETCH_STORE_HINT PREFETCH_HINT_PREPAREFORSTORE
+# include <sysdep.h>
+# include <regdef.h>
+# include <sys/asm.h>
+# define PREFETCH_LOAD_HINT PREFETCH_HINT_LOAD_STREAMED
+# define PREFETCH_STORE_HINT PREFETCH_HINT_PREPAREFORSTORE
#elif _COMPILING_NEWLIB
-#include "machine/asm.h"
-#include "machine/regdef.h"
-#define PREFETCH_LOAD_HINT PREFETCH_HINT_LOAD_STREAMED
-#define PREFETCH_STORE_HINT PREFETCH_HINT_PREPAREFORSTORE
+# include "machine/asm.h"
+# include "machine/regdef.h"
+# define PREFETCH_LOAD_HINT PREFETCH_HINT_LOAD_STREAMED
+# define PREFETCH_STORE_HINT PREFETCH_HINT_PREPAREFORSTORE
#else
-#include <regdef.h>
-#include <sys/asm.h>
+# include <regdef.h>
+# include <sys/asm.h>
#endif
/* Check to see if the MIPS architecture we are compiling for supports
@@ -54,46 +54,61 @@
*/
#if (__mips == 4) || (__mips == 5) || (__mips == 32) || (__mips == 64)
-#ifndef DISABLE_PREFETCH
-#define USE_PREFETCH
-#endif
+# ifndef DISABLE_PREFETCH
+# define USE_PREFETCH
+# endif
#endif
#if defined(_MIPS_SIM) && ((_MIPS_SIM == _ABI64) || (_MIPS_SIM == _ABIN32))
-#ifndef DISABLE_DOUBLE
-#define USE_DOUBLE
-#endif
+# ifndef DISABLE_DOUBLE
+# define USE_DOUBLE
+# endif
#endif
+#if __mips_isa_rev > 5
+# if (PREFETCH_STORE_HINT == PREFETCH_HINT_PREPAREFORSTORE)
+# undef PREFETCH_STORE_HINT
+# define PREFETCH_STORE_HINT PREFETCH_HINT_STORE_STREAMED
+# endif
+# define R6_CODE
+#endif
/* Some asm.h files do not have the L macro definition. */
#ifndef L
-#if _MIPS_SIM == _ABIO32
-# define L(label) $L ## label
-#else
-# define L(label) .L ## label
-#endif
+# if _MIPS_SIM == _ABIO32
+# define L(label) $L ## label
+# else
+# define L(label) .L ## label
+# endif
#endif
/* Some asm.h files do not have the PTR_ADDIU macro definition. */
#ifndef PTR_ADDIU
-#ifdef USE_DOUBLE
-#define PTR_ADDIU daddiu
-#else
-#define PTR_ADDIU addiu
-#endif
+# ifdef USE_DOUBLE
+# define PTR_ADDIU daddiu
+# else
+# define PTR_ADDIU addiu
+# endif
#endif
/* Some asm.h files do not have the PTR_SRA macro definition. */
#ifndef PTR_SRA
-#ifdef USE_DOUBLE
-#define PTR_SRA dsra
-#else
-#define PTR_SRA sra
-#endif
+# ifdef USE_DOUBLE
+# define PTR_SRA dsra
+# else
+# define PTR_SRA sra
+# endif
#endif
+/* New R6 instructions that may not be in asm.h. */
+#ifndef PTR_LSA
+# if _MIPS_SIM == _ABI64
+# define PTR_LSA dlsa
+# else
+# define PTR_LSA lsa
+# endif
+#endif
/*
* Using PREFETCH_HINT_LOAD_STREAMED instead of PREFETCH_LOAD on load
@@ -141,12 +156,12 @@
* If we have not picked out what hints to use at this point use the
* standard load and store prefetch hints.
*/
-#ifndef PREFETCH_STORE_HINT
-# define PREFETCH_STORE_HINT PREFETCH_HINT_STORE
-#endif
-#ifndef PREFETCH_LOAD_HINT
-# define PREFETCH_LOAD_HINT PREFETCH_HINT_LOAD
-#endif
+# ifndef PREFETCH_STORE_HINT
+# define PREFETCH_STORE_HINT PREFETCH_HINT_STORE
+# endif
+# ifndef PREFETCH_LOAD_HINT
+# define PREFETCH_LOAD_HINT PREFETCH_HINT_LOAD
+# endif
/*
* We double everything when USE_DOUBLE is true so we do 2 prefetches to
@@ -154,43 +169,43 @@
* prefetch brings in 32 bytes.
*/
-#ifdef USE_DOUBLE
-# define PREFETCH_CHUNK 64
-# define PREFETCH_FOR_LOAD(chunk, reg) \
+# ifdef USE_DOUBLE
+# define PREFETCH_CHUNK 64
+# define PREFETCH_FOR_LOAD(chunk, reg) \
pref PREFETCH_LOAD_HINT, (chunk)*64(reg); \
pref PREFETCH_LOAD_HINT, ((chunk)*64)+32(reg)
-# define PREFETCH_FOR_STORE(chunk, reg) \
+# define PREFETCH_FOR_STORE(chunk, reg) \
pref PREFETCH_STORE_HINT, (chunk)*64(reg); \
pref PREFETCH_STORE_HINT, ((chunk)*64)+32(reg)
-#else
-# define PREFETCH_CHUNK 32
-# define PREFETCH_FOR_LOAD(chunk, reg) \
+# else
+# define PREFETCH_CHUNK 32
+# define PREFETCH_FOR_LOAD(chunk, reg) \
pref PREFETCH_LOAD_HINT, (chunk)*32(reg)
-# define PREFETCH_FOR_STORE(chunk, reg) \
+# define PREFETCH_FOR_STORE(chunk, reg) \
pref PREFETCH_STORE_HINT, (chunk)*32(reg)
-#endif
+# endif
/* MAX_PREFETCH_SIZE is the maximum size of a prefetch, it must not be less
- * then PREFETCH_CHUNK, the assumed size of each prefetch. If the real size
- * of a prefetch is greater then MAX_PREFETCH_SIZE and the PREPAREFORSTORE
- * hint is used, the code will not work corrrectly. If PREPAREFORSTORE is not
+ * than PREFETCH_CHUNK, the assumed size of each prefetch. If the real size
+ * of a prefetch is greater than MAX_PREFETCH_SIZE and the PREPAREFORSTORE
+ * hint is used, the code will not work correctly. If PREPAREFORSTORE is not
* used then MAX_PREFETCH_SIZE does not matter. */
-#define MAX_PREFETCH_SIZE 128
-/* PREFETCH_LIMIT is set based on the fact that we neve use an offset greater
- * then 5 on a STORE prefetch and that a single prefetch can never be larger
- * then MAX_PREFETCH_SIZE. We add the extra 32 when USE_DOUBLE is set because
+# define MAX_PREFETCH_SIZE 128
+/* PREFETCH_LIMIT is set based on the fact that we never use an offset greater
+ * than 5 on a STORE prefetch and that a single prefetch can never be larger
+ * than MAX_PREFETCH_SIZE. We add the extra 32 when USE_DOUBLE is set because
* we actually do two prefetches in that case, one 32 bytes after the other. */
-#ifdef USE_DOUBLE
-# define PREFETCH_LIMIT (5 * PREFETCH_CHUNK) + 32 + MAX_PREFETCH_SIZE
-#else
-# define PREFETCH_LIMIT (5 * PREFETCH_CHUNK) + MAX_PREFETCH_SIZE
-#endif
-#if (PREFETCH_STORE_HINT == PREFETCH_HINT_PREPAREFORSTORE) \
+# ifdef USE_DOUBLE
+# define PREFETCH_LIMIT (5 * PREFETCH_CHUNK) + 32 + MAX_PREFETCH_SIZE
+# else
+# define PREFETCH_LIMIT (5 * PREFETCH_CHUNK) + MAX_PREFETCH_SIZE
+# endif
+# if (PREFETCH_STORE_HINT == PREFETCH_HINT_PREPAREFORSTORE) \
&& ((PREFETCH_CHUNK * 4) < MAX_PREFETCH_SIZE)
/* We cannot handle this because the initial prefetches may fetch bytes that
- * are before the buffer being copied. We start copies with an offset
+ * are before the buffer being copied. We start copies with an offset
* of 4 so avoid this situation when using PREPAREFORSTORE. */
#error "PREFETCH_CHUNK is too large and/or MAX_PREFETCH_SIZE is too small."
-#endif
+# endif
#else /* USE_PREFETCH not defined */
# define PREFETCH_FOR_LOAD(offset, reg)
# define PREFETCH_FOR_STORE(offset, reg)
@@ -198,7 +213,7 @@
/* Allow the routine to be named something else if desired. */
#ifndef MEMCPY_NAME
-#define MEMCPY_NAME memcpy
+# define MEMCPY_NAME memcpy
#endif
/* We use these 32/64 bit registers as temporaries to do the copying. */
@@ -207,15 +222,15 @@
#define REG2 t2
#define REG3 t3
#if defined(_MIPS_SIM) && (_MIPS_SIM == _ABIO32 || _MIPS_SIM == _ABIO64)
-# define REG4 t4
-# define REG5 t5
-# define REG6 t6
-# define REG7 t7
+# define REG4 t4
+# define REG5 t5
+# define REG6 t6
+# define REG7 t7
#else
-# define REG4 ta0
-# define REG5 ta1
-# define REG6 ta2
-# define REG7 ta3
+# define REG4 ta0
+# define REG5 ta1
+# define REG6 ta2
+# define REG7 ta3
#endif
/* We load/store 64 bits at a time when USE_DOUBLE is true.
@@ -223,44 +238,46 @@
* conflicts with system header files. */
#ifdef USE_DOUBLE
-# define C_ST sd
-# define C_LD ld
-#if __MIPSEB
+# define C_ST sd
+# define C_LD ld
+# if __MIPSEB
# define C_LDHI ldl /* high part is left in big-endian */
# define C_STHI sdl /* high part is left in big-endian */
# define C_LDLO ldr /* low part is right in big-endian */
# define C_STLO sdr /* low part is right in big-endian */
-#else
+# else
# define C_LDHI ldr /* high part is right in little-endian */
# define C_STHI sdr /* high part is right in little-endian */
# define C_LDLO ldl /* low part is left in little-endian */
# define C_STLO sdl /* low part is left in little-endian */
-#endif
+# endif
+# define C_ALIGN dalign /* r6 align instruction */
#else
-# define C_ST sw
-# define C_LD lw
-#if __MIPSEB
+# define C_ST sw
+# define C_LD lw
+# if __MIPSEB
# define C_LDHI lwl /* high part is left in big-endian */
# define C_STHI swl /* high part is left in big-endian */
# define C_LDLO lwr /* low part is right in big-endian */
# define C_STLO swr /* low part is right in big-endian */
-#else
+# else
# define C_LDHI lwr /* high part is right in little-endian */
# define C_STHI swr /* high part is right in little-endian */
# define C_LDLO lwl /* low part is left in little-endian */
# define C_STLO swl /* low part is left in little-endian */
-#endif
+# endif
+# define C_ALIGN align /* r6 align instruction */
#endif
/* Bookkeeping values for 32 vs. 64 bit mode. */
#ifdef USE_DOUBLE
-# define NSIZE 8
-# define NSIZEMASK 0x3f
-# define NSIZEDMASK 0x7f
+# define NSIZE 8
+# define NSIZEMASK 0x3f
+# define NSIZEDMASK 0x7f
#else
-# define NSIZE 4
-# define NSIZEMASK 0x1f
-# define NSIZEDMASK 0x3f
+# define NSIZE 4
+# define NSIZEMASK 0x1f
+# define NSIZEDMASK 0x3f
#endif
#define UNIT(unit) ((unit)*NSIZE)
#define UNITM1(unit) (((unit)*NSIZE)-1)
@@ -290,16 +307,19 @@ LEAF(MEMCPY_NAME)
L(memcpy):
#endif
/*
- * If the size is less then 2*NSIZE (8 or 16), go to L(lastb). Regardless of
+ * If the size is less than 2*NSIZE (8 or 16), go to L(lastb). Regardless of
* size, copy dst pointer to v0 for the return value.
*/
slti t2,a2,(2 * NSIZE)
- bne t2,zero,L(lastb)
+ bne t2,zero,L(lasts)
#if defined(RETURN_FIRST_PREFETCH) || defined(RETURN_LAST_PREFETCH)
move v0,zero
#else
move v0,a0
#endif
+
+#ifndef R6_CODE
+
/*
* If src and dst have different alignments, go to L(unaligned), if they
* have the same alignment (but are not actually aligned) do a partial
@@ -320,6 +340,74 @@ L(memcpy):
C_STHI t8,0(a0)
PTR_ADDU a0,a0,a3
+#else /* R6_CODE */
+
+/*
+ * Align the destination and hope that the source gets aligned too. If it
+ * doesn't we jump to L(r6_unaligned*) to do unaligned copies using the r6
+ * align instruction.
+ */
+ andi t8,a0,7
+ lapc t9,L(atable)
+ PTR_LSA t9,t8,t9,2
+ jrc t9
+L(atable):
+ bc L(lb0)
+ bc L(lb7)
+ bc L(lb6)
+ bc L(lb5)
+ bc L(lb4)
+ bc L(lb3)
+ bc L(lb2)
+ bc L(lb1)
+L(lb7):
+ lb a3, 6(a1)
+ sb a3, 6(a0)
+L(lb6):
+ lb a3, 5(a1)
+ sb a3, 5(a0)
+L(lb5):
+ lb a3, 4(a1)
+ sb a3, 4(a0)
+L(lb4):
+ lb a3, 3(a1)
+ sb a3, 3(a0)
+L(lb3):
+ lb a3, 2(a1)
+ sb a3, 2(a0)
+L(lb2):
+ lb a3, 1(a1)
+ sb a3, 1(a0)
+L(lb1):
+ lb a3, 0(a1)
+ sb a3, 0(a0)
+
+ li t9,8
+ subu t8,t9,t8
+ PTR_SUBU a2,a2,t8
+ PTR_ADDU a0,a0,t8
+ PTR_ADDU a1,a1,t8
+L(lb0):
+
+ andi t8,a1,(NSIZE-1)
+ lapc t9,L(jtable)
+ PTR_LSA t9,t8,t9,2
+ jrc t9
+L(jtable):
+ bc L(aligned)
+ bc L(r6_unaligned1)
+ bc L(r6_unaligned2)
+ bc L(r6_unaligned3)
+# ifdef USE_DOUBLE
+ bc L(r6_unaligned4)
+ bc L(r6_unaligned5)
+ bc L(r6_unaligned6)
+ bc L(r6_unaligned7)
+# endif
+#endif /* R6_CODE */
+
+L(aligned):
+
/*
* Now dst/src are both aligned to (word or double word) aligned addresses
* Set a2 to count how many bytes we have to copy after all the 64/128 byte
@@ -328,7 +416,6 @@ L(memcpy):
* equals a3.
*/
-L(aligned):
andi t8,a2,NSIZEDMASK /* any whole 64-byte/128-byte chunks? */
beq a2,t8,L(chkw) /* if a2==t8, no 64-byte/128-byte chunks */
PTR_SUBU a3,a2,t8 /* subtract from a2 the reminder */
@@ -354,22 +441,22 @@ L(aligned):
PREFETCH_FOR_STORE (3, a0)
#endif
#if defined(RETURN_FIRST_PREFETCH) && defined(USE_PREFETCH)
-#if PREFETCH_STORE_HINT == PREFETCH_HINT_PREPAREFORSTORE
+# if PREFETCH_STORE_HINT == PREFETCH_HINT_PREPAREFORSTORE
sltu v1,t9,a0
bgtz v1,L(skip_set)
nop
PTR_ADDIU v0,a0,(PREFETCH_CHUNK*4)
L(skip_set):
-#else
+# else
PTR_ADDIU v0,a0,(PREFETCH_CHUNK*1)
-#endif
+# endif
#endif
#if defined(RETURN_LAST_PREFETCH) && defined(USE_PREFETCH) \
&& (PREFETCH_STORE_HINT != PREFETCH_HINT_PREPAREFORSTORE)
PTR_ADDIU v0,a0,(PREFETCH_CHUNK*3)
-#ifdef USE_DOUBLE
+# ifdef USE_DOUBLE
PTR_ADDIU v0,v0,32
-#endif
+# endif
#endif
L(loop16w):
C_LD t0,UNIT(0)(a1)
@@ -378,13 +465,17 @@ L(loop16w):
bgtz v1,L(skip_pref)
#endif
C_LD t1,UNIT(1)(a1)
+#ifndef R6_CODE
PREFETCH_FOR_STORE (4, a0)
PREFETCH_FOR_STORE (5, a0)
+#else
+ PREFETCH_FOR_STORE (2, a0)
+#endif
#if defined(RETURN_LAST_PREFETCH) && defined(USE_PREFETCH)
PTR_ADDIU v0,a0,(PREFETCH_CHUNK*5)
-#ifdef USE_DOUBLE
+# ifdef USE_DOUBLE
PTR_ADDIU v0,v0,32
-#endif
+# endif
#endif
L(skip_pref):
C_LD REG2,UNIT(2)(a1)
@@ -393,8 +484,11 @@ L(skip_pref):
C_LD REG5,UNIT(5)(a1)
C_LD REG6,UNIT(6)(a1)
C_LD REG7,UNIT(7)(a1)
- PREFETCH_FOR_LOAD (4, a1)
-
+#ifndef R6_CODE
+ PREFETCH_FOR_LOAD (4, a1)
+#else
+ PREFETCH_FOR_LOAD (3, a1)
+#endif
C_ST t0,UNIT(0)(a0)
C_ST t1,UNIT(1)(a0)
C_ST REG2,UNIT(2)(a0)
@@ -412,7 +506,9 @@ L(skip_pref):
C_LD REG5,UNIT(13)(a1)
C_LD REG6,UNIT(14)(a1)
C_LD REG7,UNIT(15)(a1)
- PREFETCH_FOR_LOAD (5, a1)
+#ifndef R6_CODE
+ PREFETCH_FOR_LOAD (5, a1)
+#endif
C_ST t0,UNIT(8)(a0)
C_ST t1,UNIT(9)(a0)
C_ST REG2,UNIT(10)(a0)
@@ -458,7 +554,7 @@ L(chkw):
PTR_ADDIU a0,a0,UNIT(8)
/*
- * Here we have less then 32(64) bytes to copy. Set up for a loop to
+ * Here we have less than 32(64) bytes to copy. Set up for a loop to
* copy one word (or double word) at a time. Set a2 to count how many
* bytes we have to copy after all the word (or double word) chunks are
* copied and a3 to the dst pointer after all the (d)word chunks have
@@ -466,7 +562,7 @@ L(chkw):
*/
L(chk1w):
andi a2,t8,(NSIZE-1) /* a2 is the reminder past one (d)word chunks */
- beq a2,t8,L(lastb)
+ beq a2,t8,L(lastw)
PTR_SUBU a3,t8,a2 /* a3 is count of bytes in one (d)word chunks */
PTR_ADDU a3,a0,a3 /* a3 is the dst address after loop */
@@ -478,6 +574,20 @@ L(wordCopy_loop):
bne a0,a3,L(wordCopy_loop)
C_ST REG3,UNIT(-1)(a0)
+/* If we have been copying double words, see if we can copy a single word
+ before doing byte copies. We can have, at most, one word to copy. */
+
+L(lastw):
+#ifdef USE_DOUBLE
+ andi t8,a2,3 /* a2 is the remainder past 4 byte chunks. */
+ beq t8,a2,L(lastb)
+ move a2,t8
+ lw REG3,0(a1)
+ sw REG3,0(a0)
+ PTR_ADDIU a0,a0,4
+ PTR_ADDIU a1,a1,4
+#endif
+
/* Copy the last 8 (or 16) bytes */
L(lastb):
blez a2,L(leave)
@@ -491,6 +601,35 @@ L(lastbloop):
L(leave):
j ra
nop
+
+/* We jump here with a memcpy of less than 8 or 16 bytes, depending on
+ whether or not USE_DOUBLE is defined. Instead of just doing byte
+ copies, check the alignment and size and use lw/sw if possible.
+ Otherwise, do byte copies. */
+
+L(lasts):
+ andi t8,a2,3
+ beq t8,a2,L(lastb)
+
+ andi t9,a0,3
+ bne t9,zero,L(lastb)
+ andi t9,a1,3
+ bne t9,zero,L(lastb)
+
+ PTR_SUBU a3,a2,t8
+ PTR_ADDU a3,a0,a3
+
+L(wcopy_loop):
+ lw REG3,0(a1)
+ PTR_ADDIU a0,a0,4
+ PTR_ADDIU a1,a1,4
+ bne a0,a3,L(wcopy_loop)
+ sw REG3,-4(a0)
+
+ b L(lastb)
+ move a2,t8
+
+#ifndef R6_CODE
/*
* UNALIGNED case, got here with a3 = "negu a0"
* This code is nearly identical to the aligned code above
@@ -525,38 +664,38 @@ L(ua_chk16w):
PTR_SUBU a3,a2,t8 /* subtract from a2 the reminder */
PTR_ADDU a3,a0,a3 /* Now a3 is the final dst after loop */
-#if defined(USE_PREFETCH) && (PREFETCH_STORE_HINT == PREFETCH_HINT_PREPAREFORSTORE)
+# if defined(USE_PREFETCH) && (PREFETCH_STORE_HINT == PREFETCH_HINT_PREPAREFORSTORE)
PTR_ADDU t0,a0,a2 /* t0 is the "past the end" address */
PTR_SUBU t9,t0,PREFETCH_LIMIT /* t9 is the "last safe pref" address */
-#endif
+# endif
PREFETCH_FOR_LOAD (0, a1)
PREFETCH_FOR_LOAD (1, a1)
PREFETCH_FOR_LOAD (2, a1)
-#if defined(USE_PREFETCH) && (PREFETCH_STORE_HINT != PREFETCH_HINT_PREPAREFORSTORE)
+# if defined(USE_PREFETCH) && (PREFETCH_STORE_HINT != PREFETCH_HINT_PREPAREFORSTORE)
PREFETCH_FOR_STORE (1, a0)
PREFETCH_FOR_STORE (2, a0)
PREFETCH_FOR_STORE (3, a0)
-#endif
-#if defined(RETURN_FIRST_PREFETCH) && defined(USE_PREFETCH)
-#if (PREFETCH_STORE_HINT == PREFETCH_HINT_PREPAREFORSTORE)
+# endif
+# if defined(RETURN_FIRST_PREFETCH) && defined(USE_PREFETCH)
+# if (PREFETCH_STORE_HINT == PREFETCH_HINT_PREPAREFORSTORE)
sltu v1,t9,a0
bgtz v1,L(ua_skip_set)
nop
PTR_ADDIU v0,a0,(PREFETCH_CHUNK*4)
L(ua_skip_set):
-#else
+# else
PTR_ADDIU v0,a0,(PREFETCH_CHUNK*1)
-#endif
-#endif
+# endif
+# endif
L(ua_loop16w):
PREFETCH_FOR_LOAD (3, a1)
C_LDHI t0,UNIT(0)(a1)
C_LDHI t1,UNIT(1)(a1)
C_LDHI REG2,UNIT(2)(a1)
-#if defined(USE_PREFETCH) && (PREFETCH_STORE_HINT == PREFETCH_HINT_PREPAREFORSTORE)
+# if defined(USE_PREFETCH) && (PREFETCH_STORE_HINT == PREFETCH_HINT_PREPAREFORSTORE)
sltu v1,t9,a0
bgtz v1,L(ua_skip_pref)
-#endif
+# endif
C_LDHI REG3,UNIT(3)(a1)
PREFETCH_FOR_STORE (4, a0)
PREFETCH_FOR_STORE (5, a0)
@@ -650,7 +789,7 @@ L(ua_chkw):
C_ST REG7,UNIT(7)(a0)
PTR_ADDIU a0,a0,UNIT(8)
/*
- * Here we have less then 32(64) bytes to copy. Set up for a loop to
+ * Here we have less than 32(64) bytes to copy. Set up for a loop to
* copy one word (or double word) at a time.
*/
L(ua_chk1w):
@@ -682,11 +821,64 @@ L(ua_smallCopy_loop):
j ra
nop
+#else /* R6_CODE */
+
+# if __MIPSEB
+# define SWAP_REGS(X,Y) X, Y
+# define ALIGN_OFFSET(N) (N)
+# else
+# define SWAP_REGS(X,Y) Y, X
+# define ALIGN_OFFSET(N) (NSIZE-N)
+# endif
+# define R6_UNALIGNED_WORD_COPY(BYTEOFFSET) \
+ andi REG7, a2, (NSIZE-1);/* REG7 is # of bytes to by bytes. */ \
+ beq REG7, a2, L(lastb); /* Check for bytes to copy by word */ \
+ PTR_SUBU a3, a2, REG7; /* a3 is number of bytes to be copied in */ \
+ /* (d)word chunks. */ \
+ move a2, REG7; /* a2 is # of bytes to copy byte by byte */ \
+ /* after word loop is finished. */ \
+ PTR_ADDU REG6, a0, a3; /* REG6 is the dst address after loop. */ \
+ PTR_SUBU REG2, a1, t8; /* REG2 is the aligned src address. */ \
+ PTR_ADDU a1, a1, a3; /* a1 is addr of source after word loop. */ \
+ C_LD t0, UNIT(0)(REG2); /* Load first part of source. */ \
+L(r6_ua_wordcopy##BYTEOFFSET): \
+ C_LD t1, UNIT(1)(REG2); /* Load second part of source. */ \
+ C_ALIGN REG3, SWAP_REGS(t1,t0), ALIGN_OFFSET(BYTEOFFSET); \
+ PTR_ADDIU a0, a0, UNIT(1); /* Increment destination pointer. */ \
+ PTR_ADDIU REG2, REG2, UNIT(1); /* Increment aligned source pointer.*/ \
+ move t0, t1; /* Move second part of source to first. */ \
+ bne a0, REG6,L(r6_ua_wordcopy##BYTEOFFSET); \
+ C_ST REG3, UNIT(-1)(a0); \
+ j L(lastb); \
+ nop
+
+ /* We are generating R6 code, the destination is 4 byte aligned and
+ the source is not 4 byte aligned. t8 is 1, 2, or 3 depending on the
+ alignment of the source. */
+
+L(r6_unaligned1):
+ R6_UNALIGNED_WORD_COPY(1)
+L(r6_unaligned2):
+ R6_UNALIGNED_WORD_COPY(2)
+L(r6_unaligned3):
+ R6_UNALIGNED_WORD_COPY(3)
+# ifdef USE_DOUBLE
+L(r6_unaligned4):
+ R6_UNALIGNED_WORD_COPY(4)
+L(r6_unaligned5):
+ R6_UNALIGNED_WORD_COPY(5)
+L(r6_unaligned6):
+ R6_UNALIGNED_WORD_COPY(6)
+L(r6_unaligned7):
+ R6_UNALIGNED_WORD_COPY(7)
+# endif
+#endif /* R6_CODE */
+
.set at
.set reorder
END(MEMCPY_NAME)
#ifndef ANDROID_CHANGES
-#ifdef _LIBC
+# ifdef _LIBC
libc_hidden_builtin_def (MEMCPY_NAME)
-#endif
+# endif
#endif
diff --git a/newlib/libc/machine/mips/memset.S b/newlib/libc/machine/mips/memset.S
new file mode 100644
index 000000000..565fc7e30
--- /dev/null
+++ b/newlib/libc/machine/mips/memset.S
@@ -0,0 +1,437 @@
+/*
+ * Copyright (c) 2013
+ * MIPS Technologies, Inc., California.
+ *
+ * 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. Neither the name of the MIPS Technologies, Inc., 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 MIPS TECHNOLOGIES, INC. ``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 MIPS TECHNOLOGIES, INC. 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 ANDROID_CHANGES
+# include "machine/asm.h"
+# include "machine/regdef.h"
+# define PREFETCH_STORE_HINT PREFETCH_HINT_PREPAREFORSTORE
+#elif _LIBC
+# include <sysdep.h>
+# include <regdef.h>
+# include <sys/asm.h>
+# define PREFETCH_STORE_HINT PREFETCH_HINT_PREPAREFORSTORE
+#elif _COMPILING_NEWLIB
+# include "machine/asm.h"
+# include "machine/regdef.h"
+# define PREFETCH_STORE_HINT PREFETCH_HINT_PREPAREFORSTORE
+#else
+# include <regdef.h>
+# include <sys/asm.h>
+#endif
+
+/* Check to see if the MIPS architecture we are compiling for supports
+ prefetching. */
+
+#if (__mips == 4) || (__mips == 5) || (__mips == 32) || (__mips == 64)
+# ifndef DISABLE_PREFETCH
+# define USE_PREFETCH
+# endif
+#endif
+
+#if defined(_MIPS_SIM) && ((_MIPS_SIM == _ABI64) || (_MIPS_SIM == _ABIN32))
+# ifndef DISABLE_DOUBLE
+# define USE_DOUBLE
+# endif
+#endif
+
+#ifndef USE_DOUBLE
+# ifndef DISABLE_DOUBLE_ALIGN
+# define DOUBLE_ALIGN
+# endif
+#endif
+
+/* Some asm.h files do not have the L macro definition. */
+#ifndef L
+# if _MIPS_SIM == _ABIO32
+# define L(label) $L ## label
+# else
+# define L(label) .L ## label
+# endif
+#endif
+
+/* Some asm.h files do not have the PTR_ADDIU macro definition. */
+#ifndef PTR_ADDIU
+# ifdef USE_DOUBLE
+# define PTR_ADDIU daddiu
+# else
+# define PTR_ADDIU addiu
+# endif
+#endif
+
+/* New R6 instructions that may not be in asm.h. */
+#ifndef PTR_LSA
+# if _MIPS_SIM == _ABI64
+# define PTR_LSA dlsa
+# else
+# define PTR_LSA lsa
+# endif
+#endif
+
+/* Using PREFETCH_HINT_PREPAREFORSTORE instead of PREFETCH_STORE
+ or PREFETCH_STORE_STREAMED offers a large performance advantage
+ but PREPAREFORSTORE has some special restrictions to consider.
+
+ Prefetch with the 'prepare for store' hint does not copy a memory
+ location into the cache, it just allocates a cache line and zeros
+ it out. This means that if you do not write to the entire cache
+ line before writing it out to memory some data will get zero'ed out
+ when the cache line is written back to memory and data will be lost.
+
+ There are ifdef'ed sections of this memcpy to make sure that it does not
+ do prefetches on cache lines that are not going to be completely written.
+ This code is only needed and only used when PREFETCH_STORE_HINT is set to
+ PREFETCH_HINT_PREPAREFORSTORE. This code assumes that cache lines are
+ less than MAX_PREFETCH_SIZE bytes and if the cache line is larger it will
+ not work correctly. */
+
+#ifdef USE_PREFETCH
+# define PREFETCH_HINT_STORE 1
+# define PREFETCH_HINT_STORE_STREAMED 5
+# define PREFETCH_HINT_STORE_RETAINED 7
+# define PREFETCH_HINT_PREPAREFORSTORE 30
+
+/* If we have not picked out what hints to use at this point use the
+ standard load and store prefetch hints. */
+# ifndef PREFETCH_STORE_HINT
+# define PREFETCH_STORE_HINT PREFETCH_HINT_STORE
+# endif
+
+/* We double everything when USE_DOUBLE is true so we do 2 prefetches to
+ get 64 bytes in that case. The assumption is that each individual
+ prefetch brings in 32 bytes. */
+# ifdef USE_DOUBLE
+# define PREFETCH_CHUNK 64
+# define PREFETCH_FOR_STORE(chunk, reg) \
+ pref PREFETCH_STORE_HINT, (chunk)*64(reg); \
+ pref PREFETCH_STORE_HINT, ((chunk)*64)+32(reg)
+# else
+# define PREFETCH_CHUNK 32
+# define PREFETCH_FOR_STORE(chunk, reg) \
+ pref PREFETCH_STORE_HINT, (chunk)*32(reg)
+# endif
+
+/* MAX_PREFETCH_SIZE is the maximum size of a prefetch, it must not be less
+ than PREFETCH_CHUNK, the assumed size of each prefetch. If the real size
+ of a prefetch is greater than MAX_PREFETCH_SIZE and the PREPAREFORSTORE
+ hint is used, the code will not work correctly. If PREPAREFORSTORE is not
+ used than MAX_PREFETCH_SIZE does not matter. */
+# define MAX_PREFETCH_SIZE 128
+/* PREFETCH_LIMIT is set based on the fact that we never use an offset greater
+ than 5 on a STORE prefetch and that a single prefetch can never be larger
+ than MAX_PREFETCH_SIZE. We add the extra 32 when USE_DOUBLE is set because
+ we actually do two prefetches in that case, one 32 bytes after the other. */
+# ifdef USE_DOUBLE
+# define PREFETCH_LIMIT (5 * PREFETCH_CHUNK) + 32 + MAX_PREFETCH_SIZE
+# else
+# define PREFETCH_LIMIT (5 * PREFETCH_CHUNK) + MAX_PREFETCH_SIZE
+# endif
+
+# if (PREFETCH_STORE_HINT == PREFETCH_HINT_PREPAREFORSTORE) \
+ && ((PREFETCH_CHUNK * 4) < MAX_PREFETCH_SIZE)
+/* We cannot handle this because the initial prefetches may fetch bytes that
+ are before the buffer being copied. We start copies with an offset
+ of 4 so avoid this situation when using PREPAREFORSTORE. */
+# error "PREFETCH_CHUNK is too large and/or MAX_PREFETCH_SIZE is too small."
+# endif
+#else /* USE_PREFETCH not defined */
+# define PREFETCH_FOR_STORE(offset, reg)
+#endif
+
+#if __mips_isa_rev > 5
+# if (PREFETCH_STORE_HINT == PREFETCH_HINT_PREPAREFORSTORE)
+# undef PREFETCH_STORE_HINT
+# define PREFETCH_STORE_HINT PREFETCH_HINT_STORE_STREAMED
+# endif
+# define R6_CODE
+#endif
+
+/* Allow the routine to be named something else if desired. */
+#ifndef MEMSET_NAME
+# define MEMSET_NAME memset
+#endif
+
+/* We load/store 64 bits at a time when USE_DOUBLE is true.
+ The C_ prefix stands for CHUNK and is used to avoid macro name
+ conflicts with system header files. */
+
+#ifdef USE_DOUBLE
+# define C_ST sd
+# if __MIPSEB
+# define C_STHI sdl /* high part is left in big-endian */
+# else
+# define C_STHI sdr /* high part is right in little-endian */
+# endif
+#else
+# define C_ST sw
+# if __MIPSEB
+# define C_STHI swl /* high part is left in big-endian */
+# else
+# define C_STHI swr /* high part is right in little-endian */
+# endif
+#endif
+
+/* Bookkeeping values for 32 vs. 64 bit mode. */
+#ifdef USE_DOUBLE
+# define NSIZE 8
+# define NSIZEMASK 0x3f
+# define NSIZEDMASK 0x7f
+#else
+# define NSIZE 4
+# define NSIZEMASK 0x1f
+# define NSIZEDMASK 0x3f
+#endif
+#define UNIT(unit) ((unit)*NSIZE)
+#define UNITM1(unit) (((unit)*NSIZE)-1)
+
+#ifdef ANDROID_CHANGES
+LEAF(MEMSET_NAME,0)
+#else
+LEAF(MEMSET_NAME)
+#endif
+
+ .set nomips16
+ .set noreorder
+/* If the size is less than 2*NSIZE (8 or 16), go to L(lastb). Regardless of
+ size, copy dst pointer to v0 for the return value. */
+ slti t2,a2,(2 * NSIZE)
+ bne t2,zero,L(lastb)
+ move v0,a0
+
+/* If memset value is not zero, we copy it to all the bytes in a 32 or 64
+ bit word. */
+ beq a1,zero,L(set0) /* If memset value is zero no smear */
+ PTR_SUBU a3,zero,a0
+ nop
+
+ /* smear byte into 32 or 64 bit word */
+#if ((__mips == 64) || (__mips == 32)) && (__mips_isa_rev >= 2)
+# ifdef USE_DOUBLE
+ dins a1, a1, 8, 8 /* Replicate fill byte into half-word. */
+ dins a1, a1, 16, 16 /* Replicate fill byte into word. */
+ dins a1, a1, 32, 32 /* Replicate fill byte into dbl word. */
+# else
+ ins a1, a1, 8, 8 /* Replicate fill byte into half-word. */
+ ins a1, a1, 16, 16 /* Replicate fill byte into word. */
+# endif
+#else
+# ifdef USE_DOUBLE
+ and a1,0xff
+ dsll t2,a1,8
+ or a1,t2
+ dsll t2,a1,16
+ or a1,t2
+ dsll t2,a1,32
+ or a1,t2
+# else
+ and a1,0xff
+ sll t2,a1,8
+ or a1,t2
+ sll t2,a1,16
+ or a1,t2
+# endif
+#endif
+
+/* If the destination address is not aligned do a partial store to get it
+ aligned. If it is already aligned just jump to L(aligned). */
+L(set0):
+#ifndef R6_CODE
+ andi t2,a3,(NSIZE-1) /* word-unaligned address? */
+ beq t2,zero,L(aligned) /* t2 is the unalignment count */
+ PTR_SUBU a2,a2,t2
+ C_STHI a1,0(a0)
+ PTR_ADDU a0,a0,t2
+#else /* R6_CODE */
+ andi t2,a0,(NSIZE-1)
+ lapc t9,L(atable)
+ PTR_LSA t9,t2,t9,2
+ jrc t9
+L(atable):
+ bc L(aligned)
+# ifdef USE_DOUBLE
+ bc L(lb7)
+ bc L(lb6)
+ bc L(lb5)
+ bc L(lb4)
+# endif
+ bc L(lb3)
+ bc L(lb2)
+ bc L(lb1)
+L(lb7):
+ sb a1,6(a0)
+L(lb6):
+ sb a1,5(a0)
+L(lb5):
+ sb a1,4(a0)
+L(lb4):
+ sb a1,3(a0)
+L(lb3):
+ sb a1,2(a0)
+L(lb2):
+ sb a1,1(a0)
+L(lb1):
+ sb a1,0(a0)
+
+ li t9,NSIZE
+ subu t2,t9,t2
+ PTR_SUBU a2,a2,t2
+ PTR_ADDU a0,a0,t2
+#endif /* R6_CODE */
+
+L(aligned):
+/* If USE_DOUBLE is not set we may still want to align the data on a 16
+ byte boundry instead of an 8 byte boundry to maximize the opportunity
+ of proAptiv chips to do memory bonding (combining two sequential 4
+ byte stores into one 8 byte store). We know there are at least 4 bytes
+ left to store or we would have jumped to L(lastb) earlier in the code. */
+#ifdef DOUBLE_ALIGN
+ andi t2,a3,4
+ beq t2,zero,L(double_aligned)
+ PTR_SUBU a2,a2,t2
+ sw a1,0(a0)
+ PTR_ADDU a0,a0,t2
+L(double_aligned):
+#endif
+
+/* Now the destination is aligned to (word or double word) aligned address
+ Set a2 to count how many bytes we have to copy after all the 64/128 byte
+ chunks are copied and a3 to the dest pointer after all the 64/128 byte
+ chunks have been copied. We will loop, incrementing a0 until it equals
+ a3. */
+ andi t8,a2,NSIZEDMASK /* any whole 64-byte/128-byte chunks? */
+ beq a2,t8,L(chkw) /* if a2==t8, no 64-byte/128-byte chunks */
+ PTR_SUBU a3,a2,t8 /* subtract from a2 the reminder */
+ PTR_ADDU a3,a0,a3 /* Now a3 is the final dst after loop */
+
+/* When in the loop we may prefetch with the 'prepare to store' hint,
+ in this case the a0+x should not be past the "t0-32" address. This
+ means: for x=128 the last "safe" a0 address is "t0-160". Alternatively,
+ for x=64 the last "safe" a0 address is "t0-96" In the current version we
+ will use "prefetch hint,128(a0)", so "t0-160" is the limit. */
+#if defined(USE_PREFETCH) \
+ && (PREFETCH_STORE_HINT == PREFETCH_HINT_PREPAREFORSTORE)
+ PTR_ADDU t0,a0,a2 /* t0 is the "past the end" address */
+ PTR_SUBU t9,t0,PREFETCH_LIMIT /* t9 is the "last safe pref" address */
+#endif
+#if defined(USE_PREFETCH) \
+ && (PREFETCH_STORE_HINT != PREFETCH_HINT_PREPAREFORSTORE)
+ PREFETCH_FOR_STORE (1, a0)
+ PREFETCH_FOR_STORE (2, a0)
+ PREFETCH_FOR_STORE (3, a0)
+#endif
+
+L(loop16w):
+#if defined(USE_PREFETCH) \
+ && (PREFETCH_STORE_HINT == PREFETCH_HINT_PREPAREFORSTORE)
+ sltu v1,t9,a0 /* If a0 > t9 don't use next prefetch */
+ bgtz v1,L(skip_pref)
+ nop
+#endif
+#ifndef R6_CODE
+ PREFETCH_FOR_STORE (4, a0)
+ PREFETCH_FOR_STORE (5, a0)
+#else
+ PREFETCH_FOR_STORE (2, a0)
+#endif
+L(skip_pref):
+ C_ST a1,UNIT(0)(a0)
+ C_ST a1,UNIT(1)(a0)
+ C_ST a1,UNIT(2)(a0)
+ C_ST a1,UNIT(3)(a0)
+ C_ST a1,UNIT(4)(a0)
+ C_ST a1,UNIT(5)(a0)
+ C_ST a1,UNIT(6)(a0)
+ C_ST a1,UNIT(7)(a0)
+ C_ST a1,UNIT(8)(a0)
+ C_ST a1,UNIT(9)(a0)
+ C_ST a1,UNIT(10)(a0)
+ C_ST a1,UNIT(11)(a0)
+ C_ST a1,UNIT(12)(a0)
+ C_ST a1,UNIT(13)(a0)
+ C_ST a1,UNIT(14)(a0)
+ C_ST a1,UNIT(15)(a0)
+ PTR_ADDIU a0,a0,UNIT(16) /* adding 64/128 to dest */
+ bne a0,a3,L(loop16w)
+ nop
+ move a2,t8
+
+/* Here we have dest word-aligned but less than 64-bytes or 128 bytes to go.
+ Check for a 32(64) byte chunk and copy if if there is one. Otherwise
+ jump down to L(chk1w) to handle the tail end of the copy. */
+L(chkw):
+ andi t8,a2,NSIZEMASK /* is there a 32-byte/64-byte chunk. */
+ /* the t8 is the reminder count past 32-bytes */
+ beq a2,t8,L(chk1w)/* when a2==t8, no 32-byte chunk */
+ nop
+ C_ST a1,UNIT(0)(a0)
+ C_ST a1,UNIT(1)(a0)
+ C_ST a1,UNIT(2)(a0)
+ C_ST a1,UNIT(3)(a0)
+ C_ST a1,UNIT(4)(a0)
+ C_ST a1,UNIT(5)(a0)
+ C_ST a1,UNIT(6)(a0)
+ C_ST a1,UNIT(7)(a0)
+ PTR_ADDIU a0,a0,UNIT(8)
+
+/* Here we have less than 32(64) bytes to set. Set up for a loop to
+ copy one word (or double word) at a time. Set a2 to count how many
+ bytes we have to copy after all the word (or double word) chunks are
+ copied and a3 to the dest pointer after all the (d)word chunks have
+ been copied. We will loop, incrementing a0 until a0 equals a3. */
+L(chk1w):
+ andi a2,t8,(NSIZE-1) /* a2 is the reminder past one (d)word chunks */
+ beq a2,t8,L(lastb)
+ PTR_SUBU a3,t8,a2 /* a3 is count of bytes in one (d)word chunks */
+ PTR_ADDU a3,a0,a3 /* a3 is the dst address after loop */
+
+/* copying in words (4-byte or 8 byte chunks) */
+L(wordCopy_loop):
+ PTR_ADDIU a0,a0,UNIT(1)
+ bne a0,a3,L(wordCopy_loop)
+ C_ST a1,UNIT(-1)(a0)
+
+/* Copy the last 8 (or 16) bytes */
+L(lastb):
+ blez a2,L(leave)
+ PTR_ADDU a3,a0,a2 /* a3 is the last dst address */
+L(lastbloop):
+ PTR_ADDIU a0,a0,1
+ bne a0,a3,L(lastbloop)
+ sb a1,-1(a0)
+L(leave):
+ j ra
+ nop
+
+ .set at
+ .set reorder
+END(MEMSET_NAME)
+#ifndef ANDROID_CHANGES
+# ifdef _LIBC
+libc_hidden_builtin_def (MEMSET_NAME)
+# endif
+#endif
diff --git a/newlib/libc/machine/mips/memset.c b/newlib/libc/machine/mips/memset.c
deleted file mode 100644
index 786ba7971..000000000
--- a/newlib/libc/machine/mips/memset.c
+++ /dev/null
@@ -1,142 +0,0 @@
-/*
-FUNCTION
- <<memset>>---set an area of memory, optimized for the MIPS processors
-
-INDEX
- memset
-
-ANSI_SYNOPSIS
- #include <string.h>
- void *memset(const void *<[dst]>, int <[c]>, size_t <[length]>);
-
-TRAD_SYNOPSIS
- #include <string.h>
- void *memset(<[dst]>, <[c]>, <[length]>)
- void *<[dst]>;
- int <[c]>;
- size_t <[length]>;
-
-DESCRIPTION
- This function converts the argument <[c]> into an unsigned
- char and fills the first <[length]> characters of the array
- pointed to by <[dst]> to the value.
-
-RETURNS
- <<memset>> returns the value of <[m]>.
-
-PORTABILITY
-<<memset>> is ANSI C.
-
- <<memset>> requires no supporting OS subroutines.
-
-QUICKREF
- memset ansi pure
-*/
-
-#include <string.h>
-
-#ifdef __mips64
-#define wordtype long long
-#else
-#define wordtype long
-#endif
-
-#define LBLOCKSIZE (sizeof(wordtype))
-#define UNALIGNED(X) ((long)(X) & (LBLOCKSIZE - 1))
-#define TOO_SMALL(LEN) ((LEN) < LBLOCKSIZE * 4)
-
-_PTR
-_DEFUN (memset, (m, c, n),
- _PTR m _AND
- int c _AND
- size_t n)
-{
-#if defined(PREFER_SIZE_OVER_SPEED) || defined(__OPTIMIZE_SIZE__) || defined(__mips16)
- char *s = (char *) m;
-
- while (n-- != 0)
- {
- *s++ = (char) c;
- }
-
- return m;
-#else
- char *s = (char *) m;
- int i;
- unsigned wordtype buffer;
- unsigned wordtype *aligned_addr;
- unsigned short *short_addr;
- size_t iter;
-
- if (!TOO_SMALL (n))
- {
- int unaligned = UNALIGNED (s);
-
- /* We know that N is >= LBLOCKSIZE so we can just word
- align the S without having to check the length. */
-
- if (unaligned)
- {
- while (unaligned++ < LBLOCKSIZE)
- *s++ = (char)c, n--;
- }
-
- /* S is now word-aligned so we can process the remainder
- in word sized chunks except for a few (< LBLOCKSIZE)
- bytes which might be left over at the end. */
-
- aligned_addr = (unsigned wordtype *)s;
-
- /* Store C into each char sized location in BUFFER so that
- we can set large blocks quickly. */
- c &= 0xff;
- buffer = c;
- if (buffer != 0)
- {
- if (LBLOCKSIZE == 4)
- {
- buffer |= (buffer << 8);
- buffer |= (buffer << 16);
- }
- else if (LBLOCKSIZE == 8)
- {
- buffer |= (buffer << 8);
- buffer |= (buffer << 16);
- buffer |= ((buffer << 31) << 1);
- }
- else
- {
- for (i = 1; i < LBLOCKSIZE; i++)
- buffer = (buffer << 8) | c;
- }
- }
-
- iter = n / (2*LBLOCKSIZE);
- n = n % (2*LBLOCKSIZE);
- while (iter > 0)
- {
- aligned_addr[0] = buffer;
- aligned_addr[1] = buffer;
- aligned_addr += 2;
- iter--;
- }
-
- if (n >= LBLOCKSIZE)
- {
- *aligned_addr++ = buffer;
- n -= LBLOCKSIZE;
- }
-
- /* Pick up the remainder with a bytewise loop. */
- s = (char*)aligned_addr;
- }
-
- while (n > 0)
- {
- *s++ = (char)c;
- n--;
- }
-
- return m;
-#endif /* not PREFER_SIZE_OVER_SPEED */
-}
diff --git a/newlib/libc/machine/mips/setjmp.S b/newlib/libc/machine/mips/setjmp.S
index 268cb1862..9a8b31d09 100644
--- a/newlib/libc/machine/mips/setjmp.S
+++ b/newlib/libc/machine/mips/setjmp.S
@@ -23,6 +23,62 @@
#define NUM_GPRS_SAVED 11
#ifdef __mips_hard_float
+#if _MIPS_SIM == _ABIN32
+#define FPR_LAYOUT \
+ FPR_OFFSET ($f20, 0); \
+ FPR_OFFSET ($f22, 1); \
+ FPR_OFFSET ($f24, 2); \
+ FPR_OFFSET ($f26, 3); \
+ FPR_OFFSET ($f28, 4); \
+ FPR_OFFSET ($f30, 5);
+#elif _MIPS_SIM == _ABI64
+#define FPR_LAYOUT \
+ FPR_OFFSET ($f24, 0); \
+ FPR_OFFSET ($f25, 1); \
+ FPR_OFFSET ($f26, 2); \
+ FPR_OFFSET ($f27, 3); \
+ FPR_OFFSET ($f28, 4); \
+ FPR_OFFSET ($f29, 5); \
+ FPR_OFFSET ($f30, 6); \
+ FPR_OFFSET ($f31, 7);
+#elif __mips_fpr == 0 || __mips_fpr == 64
+
+/* This deals with the o32 FPXX and FP64 cases. Here we must use
+ SDC1 and LDC1 to access the FPRs. These instructions require
+ 8-byte aligned addresses.
+ Unfortunately, the MIPS jmp_buf only guarantees 4-byte alignment
+ and this cannot be increased without breaking compatibility with
+ pre-existing objects built against newlib. There are 11 GPRS
+ saved in the jmp_buf so a buffer that happens to be 8-byte aligned
+ ends up leaving the FPR slots 4-byte aligned and an (only) 4-byte
+ aligned buffer leads to the FPR slots being 8-byte aligned!
+
+ To resolve this, we move the location of $31 to the last slot
+ in the jmp_buf when the overall buffer is 8-byte aligned. $31
+ is simply loaded/stored twice to avoid adding complexity to the
+ GPR_LAYOUT macro above as well as FPR_LAYOUT.
+
+ The location of the last slot is index 22 which is calculated
+ from there being 11 GPRs saved and then 12 FPRs saved so the
+ index of the last FPR is 11+11.
+
+ The base of the jmp_buf is modified in $4 to allow the
+ FPR_OFFSET macros to just use the usual constant slot numbers
+ regardless of whether the realignment happened or not. */
+
+#define FPR_LAYOUT \
+ and $8, $4, 4; \
+ bne $8, $0, 1f; \
+ GPR_OFFSET ($31, 22); \
+ addiu $4, $4, -4; \
+1: \
+ FPR_OFFSET ($f20, 0); \
+ FPR_OFFSET ($f22, 2); \
+ FPR_OFFSET ($f24, 4); \
+ FPR_OFFSET ($f26, 6); \
+ FPR_OFFSET ($f28, 8); \
+ FPR_OFFSET ($f30, 10);
+#else /* Assuming _MIPS_SIM == _ABIO32 */
#define FPR_LAYOUT \
FPR_OFFSET ($f20, 0); \
FPR_OFFSET ($f21, 1); \
@@ -35,11 +91,12 @@
FPR_OFFSET ($f28, 8); \
FPR_OFFSET ($f29, 9); \
FPR_OFFSET ($f30, 10); \
- FPR_OFFSET ($f31, 11)
+ FPR_OFFSET ($f31, 11);
+#endif
#else
#define FPR_LAYOUT
#endif
-
+
#ifdef __mips64
#define BYTES_PER_WORD 8
#define LOAD_GPR ld
@@ -47,12 +104,17 @@
#define STORE_GPR sd
#define STORE_FPR sdc1
#else
-#define BYTES_PER_WORD 4
#define LOAD_GPR lw
-#define LOAD_FPR lwc1
#define STORE_GPR sw
+#define BYTES_PER_WORD 4
+#if __mips_fpr == 0 || __mips_fpr == 64
+#define LOAD_FPR ldc1
+#define STORE_FPR sdc1
+#else
+#define LOAD_FPR lwc1
#define STORE_FPR swc1
#endif
+#endif
#define GPOFF(INDEX) (INDEX * BYTES_PER_WORD)
#define FPOFF(INDEX) ((INDEX + NUM_GPRS_SAVED) * BYTES_PER_WORD)
diff --git a/newlib/libc/machine/mips/strcmp.S b/newlib/libc/machine/mips/strcmp.S
new file mode 100644
index 000000000..b1d757ee3
--- /dev/null
+++ b/newlib/libc/machine/mips/strcmp.S
@@ -0,0 +1,261 @@
+/*
+ * Copyright (c) 2014
+ * Imagination Technologies Limited.
+ *
+ * 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. Neither the name of the MIPS Technologies, Inc., 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 IMAGINATION TECHNOLOGIES LIMITED ``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 IMAGINATION TECHNOLOGIES LIMITED 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 ANDROID_CHANGES
+# include "machine/asm.h"
+# include "machine/regdef.h"
+#elif _LIBC
+# include <sysdep.h>
+# include <regdef.h>
+# include <sys/asm.h>
+#elif _COMPILING_NEWLIB
+# include "machine/asm.h"
+# include "machine/regdef.h"
+#else
+# include <regdef.h>
+# include <sys/asm.h>
+#endif
+
+/* Technically strcmp should not read past the end of the strings being
+ compared. We will read a full word that may contain excess bits beyond
+ the NULL string terminator but unless ENABLE_READAHEAD is set, we will not
+ read the next word after the end of string. Setting ENABLE_READAHEAD will
+ improve performance but is technically illegal based on the definition of
+ strcmp. */
+#ifdef ENABLE_READAHEAD
+# define DELAY_READ
+#else
+# define DELAY_READ nop
+#endif
+
+/* Testing on a little endian machine showed using CLZ was a
+ performance loss, so we are not turning it on by default. */
+#if defined(ENABLE_CLZ) && (__mips_isa_rev > 1)
+# define USE_CLZ
+#endif
+
+/* Some asm.h files do not have the L macro definition. */
+#ifndef L
+# if _MIPS_SIM == _ABIO32
+# define L(label) $L ## label
+# else
+# define L(label) .L ## label
+# endif
+#endif
+
+/* Some asm.h files do not have the PTR_ADDIU macro definition. */
+#ifndef PTR_ADDIU
+# ifdef USE_DOUBLE
+# define PTR_ADDIU daddiu
+# else
+# define PTR_ADDIU addiu
+# endif
+#endif
+
+/* Allow the routine to be named something else if desired. */
+#ifndef STRCMP_NAME
+# define STRCMP_NAME strcmp
+#endif
+
+#ifdef ANDROID_CHANGES
+LEAF(STRCMP_NAME, 0)
+#else
+LEAF(STRCMP_NAME)
+#endif
+ .set nomips16
+ .set noreorder
+
+ or t0, a0, a1
+ andi t0,0x3
+ bne t0, zero, L(byteloop)
+
+/* Both strings are 4 byte aligned at this point. */
+
+ lui t8, 0x0101
+ ori t8, t8, 0x0101
+ lui t9, 0x7f7f
+ ori t9, 0x7f7f
+
+#define STRCMP32(OFFSET) \
+ lw v0, OFFSET(a0); \
+ lw v1, OFFSET(a1); \
+ subu t0, v0, t8; \
+ bne v0, v1, L(worddiff); \
+ nor t1, v0, t9; \
+ and t0, t0, t1; \
+ bne t0, zero, L(returnzero)
+
+L(wordloop):
+ STRCMP32(0)
+ DELAY_READ
+ STRCMP32(4)
+ DELAY_READ
+ STRCMP32(8)
+ DELAY_READ
+ STRCMP32(12)
+ DELAY_READ
+ STRCMP32(16)
+ DELAY_READ
+ STRCMP32(20)
+ DELAY_READ
+ STRCMP32(24)
+ DELAY_READ
+ STRCMP32(28)
+ PTR_ADDIU a0, a0, 32
+ b L(wordloop)
+ PTR_ADDIU a1, a1, 32
+
+L(returnzero):
+ j ra
+ move v0, zero
+
+L(worddiff):
+#ifdef USE_CLZ
+ subu t0, v0, t8
+ nor t1, v0, t9
+ and t1, t0, t1
+ xor t0, v0, v1
+ or t0, t0, t1
+# if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
+ wsbh t0, t0
+ rotr t0, t0, 16
+# endif
+ clz t1, t0
+ and t1, 0xf8
+# if __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__
+ neg t1
+ addu t1, 24
+# endif
+ rotrv v0, v0, t1
+ rotrv v1, v1, t1
+ and v0, v0, 0xff
+ and v1, v1, 0xff
+ j ra
+ subu v0, v0, v1
+#else /* USE_CLZ */
+# if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
+ andi t0, v0, 0xff
+ beq t0, zero, L(wexit01)
+ andi t1, v1, 0xff
+ bne t0, t1, L(wexit01)
+
+ srl t8, v0, 8
+ srl t9, v1, 8
+ andi t8, t8, 0xff
+ beq t8, zero, L(wexit89)
+ andi t9, t9, 0xff
+ bne t8, t9, L(wexit89)
+
+ srl t0, v0, 16
+ srl t1, v1, 16
+ andi t0, t0, 0xff
+ beq t0, zero, L(wexit01)
+ andi t1, t1, 0xff
+ bne t0, t1, L(wexit01)
+
+ srl t8, v0, 24
+ srl t9, v1, 24
+# else /* __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__ */
+ srl t0, v0, 24
+ beq t0, zero, L(wexit01)
+ srl t1, v1, 24
+ bne t0, t1, L(wexit01)
+
+ srl t8, v0, 16
+ srl t9, v1, 16
+ andi t8, t8, 0xff
+ beq t8, zero, L(wexit89)
+ andi t9, t9, 0xff
+ bne t8, t9, L(wexit89)
+
+ srl t0, v0, 8
+ srl t1, v1, 8
+ andi t0, t0, 0xff
+ beq t0, zero, L(wexit01)
+ andi t1, t1, 0xff
+ bne t0, t1, L(wexit01)
+
+ andi t8, v0, 0xff
+ andi t9, v1, 0xff
+# endif /* __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__ */
+
+L(wexit89):
+ j ra
+ subu v0, t8, t9
+L(wexit01):
+ j ra
+ subu v0, t0, t1
+#endif /* USE_CLZ */
+
+/* It might seem better to do the 'beq' instruction between the two 'lbu'
+ instructions so that the nop is not needed but testing showed that this
+ code is actually faster (based on glibc strcmp test). */
+#define BYTECMP01(OFFSET) \
+ lbu v0, OFFSET(a0); \
+ lbu v1, OFFSET(a1); \
+ beq v0, zero, L(bexit01); \
+ nop; \
+ bne v0, v1, L(bexit01)
+
+#define BYTECMP89(OFFSET) \
+ lbu t8, OFFSET(a0); \
+ lbu t9, OFFSET(a1); \
+ beq t8, zero, L(bexit89); \
+ nop; \
+ bne t8, t9, L(bexit89)
+
+L(byteloop):
+ BYTECMP01(0)
+ BYTECMP89(1)
+ BYTECMP01(2)
+ BYTECMP89(3)
+ BYTECMP01(4)
+ BYTECMP89(5)
+ BYTECMP01(6)
+ BYTECMP89(7)
+ PTR_ADDIU a0, a0, 8
+ b L(byteloop)
+ PTR_ADDIU a1, a1, 8
+
+L(bexit01):
+ j ra
+ subu v0, v0, v1
+L(bexit89):
+ j ra
+ subu v0, t8, t9
+
+ .set at
+ .set reorder
+
+END(STRCMP_NAME)
+#ifndef ANDROID_CHANGES
+# ifdef _LIBC
+libc_hidden_builtin_def (STRCMP_NAME)
+# endif
+#endif
diff --git a/newlib/libc/machine/mips/strcmp.c b/newlib/libc/machine/mips/strcmp.c
deleted file mode 100644
index c9c1c6595..000000000
--- a/newlib/libc/machine/mips/strcmp.c
+++ /dev/null
@@ -1,71 +0,0 @@
-/*
- * strcmp.c -- strcmp function. On at least some MIPS chips, a strcmp that is
- * unrolled twice is faster than the 'optimized' C version in newlib.
- *
- * Copyright (c) 2001 Red Hat, Inc.
- *
- * The authors hereby grant permission to use, copy, modify, distribute,
- * and license this software and its documentation for any purpose, provided
- * that existing copyright notices are retained in all copies and that this
- * notice is included verbatim in any distributions. No written agreement,
- * license, or royalty fee is required for any of the authorized uses.
- * Modifications to this software may be copyrighted by their authors
- * and need not follow the licensing terms described here, provided that
- * the new terms are clearly indicated on the first page of each file where
- * they apply. */
-
-#include <stddef.h>
-#include <string.h>
-#include <stdlib.h>
-
-int
-strcmp (const char *s1, const char *s2)
-{
- unsigned const char *us1 = (unsigned const char *)s1;
- unsigned const char *us2 = (unsigned const char *)s2;
- int c1a, c1b;
- int c2a, c2b;
-
- /* If the pointers aren't both aligned to a 16-byte boundary, do the
- comparison byte by byte, so that we don't get an invalid page fault if we
- are comparing a string whose null byte is at the last byte on the last
- valid page. */
- if (((((long)us1) | ((long)us2)) & 1) == 0)
- {
- c1a = *us1;
- for (;;)
- {
- c1b = *us2;
- us1 += 2;
- if (c1a == '\0')
- goto ret1;
-
- c2a = us1[-1];
- if (c1a != c1b)
- goto ret1;
-
- c2b = us2[1];
- us2 += 2;
- if (c2a == '\0')
- break;
-
- c1a = *us1;
- if (c2a != c2b)
- break;
- }
-
- return c2a - c2b;
- }
- else
- {
- do
- {
- c1a = *us1++;
- c1b = *us2++;
- }
- while (c1a != '\0' && c1a == c1b);
- }
-
- ret1:
- return c1a - c1b;
-}
diff --git a/newlib/libc/machine/mn10200/configure b/newlib/libc/machine/mn10200/configure
index d96b7718a..ca07e566c 100755
--- a/newlib/libc/machine/mn10200/configure
+++ b/newlib/libc/machine/mn10200/configure
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.68 for newlib 2.0.0.
+# Generated by GNU Autoconf 2.68 for newlib 2.4.0.
#
#
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
@@ -556,8 +556,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='newlib'
PACKAGE_TARNAME='newlib'
-PACKAGE_VERSION='2.0.0'
-PACKAGE_STRING='newlib 2.0.0'
+PACKAGE_VERSION='2.4.0'
+PACKAGE_STRING='newlib 2.4.0'
PACKAGE_BUGREPORT=''
PACKAGE_URL=''
@@ -1239,7 +1239,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures newlib 2.0.0 to adapt to many kinds of systems.
+\`configure' configures newlib 2.4.0 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1309,7 +1309,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of newlib 2.0.0:";;
+ short | recursive ) echo "Configuration of newlib 2.4.0:";;
esac
cat <<\_ACEOF
@@ -1400,7 +1400,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-newlib configure 2.0.0
+newlib configure 2.4.0
generated by GNU Autoconf 2.68
Copyright (C) 2010 Free Software Foundation, Inc.
@@ -1455,7 +1455,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by newlib $as_me 2.0.0, which was
+It was created by newlib $as_me 2.4.0, which was
generated by GNU Autoconf 2.68. Invocation command line was
$ $0 $@
@@ -2527,7 +2527,7 @@ fi
# Define the identity of the package.
PACKAGE='newlib'
- VERSION='2.0.0'
+ VERSION='2.4.0'
# Some tools Automake needs.
@@ -4007,7 +4007,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by newlib $as_me 2.0.0, which was
+This file was extended by newlib $as_me 2.4.0, which was
generated by GNU Autoconf 2.68. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -4064,7 +4064,7 @@ _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
-newlib config.status 2.0.0
+newlib config.status 2.4.0
configured by $0, generated by GNU Autoconf 2.68,
with options \\"\$ac_cs_config\\"
diff --git a/newlib/libc/machine/mn10300/configure b/newlib/libc/machine/mn10300/configure
index c77b55cc9..f04cc9777 100755
--- a/newlib/libc/machine/mn10300/configure
+++ b/newlib/libc/machine/mn10300/configure
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.68 for newlib 2.0.0.
+# Generated by GNU Autoconf 2.68 for newlib 2.4.0.
#
#
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
@@ -556,8 +556,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='newlib'
PACKAGE_TARNAME='newlib'
-PACKAGE_VERSION='2.0.0'
-PACKAGE_STRING='newlib 2.0.0'
+PACKAGE_VERSION='2.4.0'
+PACKAGE_STRING='newlib 2.4.0'
PACKAGE_BUGREPORT=''
PACKAGE_URL=''
@@ -1239,7 +1239,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures newlib 2.0.0 to adapt to many kinds of systems.
+\`configure' configures newlib 2.4.0 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1309,7 +1309,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of newlib 2.0.0:";;
+ short | recursive ) echo "Configuration of newlib 2.4.0:";;
esac
cat <<\_ACEOF
@@ -1400,7 +1400,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-newlib configure 2.0.0
+newlib configure 2.4.0
generated by GNU Autoconf 2.68
Copyright (C) 2010 Free Software Foundation, Inc.
@@ -1455,7 +1455,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by newlib $as_me 2.0.0, which was
+It was created by newlib $as_me 2.4.0, which was
generated by GNU Autoconf 2.68. Invocation command line was
$ $0 $@
@@ -2527,7 +2527,7 @@ fi
# Define the identity of the package.
PACKAGE='newlib'
- VERSION='2.0.0'
+ VERSION='2.4.0'
# Some tools Automake needs.
@@ -4007,7 +4007,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by newlib $as_me 2.0.0, which was
+This file was extended by newlib $as_me 2.4.0, which was
generated by GNU Autoconf 2.68. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -4064,7 +4064,7 @@ _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
-newlib config.status 2.0.0
+newlib config.status 2.4.0
configured by $0, generated by GNU Autoconf 2.68,
with options \\"\$ac_cs_config\\"
diff --git a/newlib/libc/machine/moxie/configure b/newlib/libc/machine/moxie/configure
index 7f4d0d6df..bc041896f 100644
--- a/newlib/libc/machine/moxie/configure
+++ b/newlib/libc/machine/moxie/configure
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.68 for newlib 2.0.0.
+# Generated by GNU Autoconf 2.68 for newlib 2.4.0.
#
#
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
@@ -556,8 +556,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='newlib'
PACKAGE_TARNAME='newlib'
-PACKAGE_VERSION='2.0.0'
-PACKAGE_STRING='newlib 2.0.0'
+PACKAGE_VERSION='2.4.0'
+PACKAGE_STRING='newlib 2.4.0'
PACKAGE_BUGREPORT=''
PACKAGE_URL=''
@@ -1239,7 +1239,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures newlib 2.0.0 to adapt to many kinds of systems.
+\`configure' configures newlib 2.4.0 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1309,7 +1309,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of newlib 2.0.0:";;
+ short | recursive ) echo "Configuration of newlib 2.4.0:";;
esac
cat <<\_ACEOF
@@ -1400,7 +1400,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-newlib configure 2.0.0
+newlib configure 2.4.0
generated by GNU Autoconf 2.68
Copyright (C) 2010 Free Software Foundation, Inc.
@@ -1455,7 +1455,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by newlib $as_me 2.0.0, which was
+It was created by newlib $as_me 2.4.0, which was
generated by GNU Autoconf 2.68. Invocation command line was
$ $0 $@
@@ -2527,7 +2527,7 @@ fi
# Define the identity of the package.
PACKAGE='newlib'
- VERSION='2.0.0'
+ VERSION='2.4.0'
# Some tools Automake needs.
@@ -4007,7 +4007,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by newlib $as_me 2.0.0, which was
+This file was extended by newlib $as_me 2.4.0, which was
generated by GNU Autoconf 2.68. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -4064,7 +4064,7 @@ _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
-newlib config.status 2.0.0
+newlib config.status 2.4.0
configured by $0, generated by GNU Autoconf 2.68,
with options \\"\$ac_cs_config\\"
diff --git a/newlib/libc/machine/msp430/Makefile.in b/newlib/libc/machine/msp430/Makefile.in
index a5c1f558f..89b36a8e4 100644
--- a/newlib/libc/machine/msp430/Makefile.in
+++ b/newlib/libc/machine/msp430/Makefile.in
@@ -1,9 +1,9 @@
-# Makefile.in generated by automake 1.11.1 from Makefile.am.
+# Makefile.in generated by automake 1.11.6 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
-# Inc.
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 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.
@@ -15,7 +15,37 @@
@SET_MAKE@
+# Copyright (c) 2013 Red Hat, Inc. All rights reserved.
+#
+# This copyrighted material is made available to anyone wishing to use,
+# modify, copy, or redistribute it subject to the terms and conditions
+# of the BSD License. This program is distributed in the hope that
+# it will be useful, but WITHOUT ANY WARRANTY expressed or implied,
+# including the implied warranties of MERCHANTABILITY or FITNESS FOR
+# A PARTICULAR PURPOSE. A copy of this license is available at
+# http://www.opensource.org/licenses. Any Red Hat trademarks that are
+# incorporated in the source code or documentation are not subject to
+# the BSD License and may only be used or replicated with the express
+# permission of Red Hat, Inc.
+
VPATH = @srcdir@
+am__make_dryrun = \
+ { \
+ am__dry=no; \
+ case $$MAKEFLAGS in \
+ *\\[\ \ ]*) \
+ echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \
+ | grep '^AM OK$$' >/dev/null || am__dry=yes;; \
+ *) \
+ for am__flg in $$MAKEFLAGS; do \
+ case $$am__flg in \
+ *=*|--*) ;; \
+ *n*) am__dry=yes; break;; \
+ esac; \
+ done;; \
+ esac; \
+ test $$am__dry = yes; \
+ }
pkgdatadir = $(datadir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
@@ -64,6 +94,11 @@ COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
CCLD = $(CC)
LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
SOURCES = $(lib_a_SOURCES)
+am__can_run_installinfo = \
+ case $$AM_UPDATE_INFO_DIR in \
+ n|no|NO) false;; \
+ *) (install-info --version) >/dev/null 2>&1;; \
+ esac
ETAGS = etags
CTAGS = ctags
ACLOCAL = @ACLOCAL@
@@ -182,7 +217,7 @@ all: all-am
.SUFFIXES:
.SUFFIXES: .S .o .obj
-am--refresh:
+am--refresh: Makefile
@:
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
@for dep in $?; do \
@@ -219,7 +254,7 @@ $(am__aclocal_m4_deps):
clean-noinstLIBRARIES:
-test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES)
-lib.a: $(lib_a_OBJECTS) $(lib_a_DEPENDENCIES)
+lib.a: $(lib_a_OBJECTS) $(lib_a_DEPENDENCIES) $(EXTRA_lib_a_DEPENDENCIES)
-rm -f lib.a
$(lib_a_AR) lib.a $(lib_a_OBJECTS) $(lib_a_LIBADD)
$(RANLIB) lib.a
@@ -307,10 +342,15 @@ install-am: all-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
+ if test -z '$(STRIP)'; then \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ install; \
+ else \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
+ fi
mostlyclean-generic:
clean-generic:
diff --git a/newlib/libc/machine/msp430/aclocal.m4 b/newlib/libc/machine/msp430/aclocal.m4
index 8b47be717..18dab02aa 100644
--- a/newlib/libc/machine/msp430/aclocal.m4
+++ b/newlib/libc/machine/msp430/aclocal.m4
@@ -1,7 +1,8 @@
-# generated automatically by aclocal 1.11.1 -*- Autoconf -*-
+# generated automatically by aclocal 1.11.6 -*- Autoconf -*-
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
-# 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
+# 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation,
+# Inc.
# This file 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.
@@ -13,18 +14,21 @@
m4_ifndef([AC_AUTOCONF_VERSION],
[m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
-m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.64],,
-[m4_warning([this file was generated for autoconf 2.64.
+m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.68],,
+[m4_warning([this file was generated for autoconf 2.68.
You have another version of autoconf. It may work, but is not guaranteed to.
If you have problems, you may need to regenerate the build system entirely.
To do so, use the procedure documented by the package, typically `autoreconf'.])])
-# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
+# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008, 2011 Free Software
+# Foundation, Inc.
#
# This file 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.
+# serial 1
+
# AM_AUTOMAKE_VERSION(VERSION)
# ----------------------------
# Automake X.Y traces this macro to ensure aclocal.m4 has been
@@ -34,7 +38,7 @@ AC_DEFUN([AM_AUTOMAKE_VERSION],
[am__api_version='1.11'
dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
dnl require some minimum version. Point them to the right macro.
-m4_if([$1], [1.11.1], [],
+m4_if([$1], [1.11.6], [],
[AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
])
@@ -50,19 +54,21 @@ m4_define([_AM_AUTOCONF_VERSION], [])
# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
# This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
-[AM_AUTOMAKE_VERSION([1.11.1])dnl
+[AM_AUTOMAKE_VERSION([1.11.6])dnl
m4_ifndef([AC_AUTOCONF_VERSION],
[m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
# AM_AUX_DIR_EXPAND -*- Autoconf -*-
-# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
+# Copyright (C) 2001, 2003, 2005, 2011 Free Software Foundation, Inc.
#
# This file 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.
+# serial 1
+
# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to
# `$srcdir', `$srcdir/..', or `$srcdir/../..'.
@@ -144,14 +150,14 @@ AC_CONFIG_COMMANDS_PRE(
Usually this means the macro was only invoked conditionally.]])
fi])])
-# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009
-# Free Software Foundation, Inc.
+# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009,
+# 2010, 2011 Free Software Foundation, Inc.
#
# This file 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.
-# serial 10
+# serial 12
# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
# written in clear, in which case automake, when reading aclocal.m4,
@@ -191,6 +197,7 @@ AC_CACHE_CHECK([dependency style of $depcc],
# instance it was reported that on HP-UX the gcc test will end up
# making a dummy file named `D' -- because `-MD' means `put the output
# in D'.
+ rm -rf conftest.dir
mkdir conftest.dir
# Copy depcomp to subdir because otherwise we won't find it if we're
# using a relative directory.
@@ -255,7 +262,7 @@ AC_CACHE_CHECK([dependency style of $depcc],
break
fi
;;
- msvisualcpp | msvcmsys)
+ msvc7 | msvc7msys | msvisualcpp | msvcmsys)
# This compiler won't grok `-c -o', but also, the minuso test has
# not run yet. These depmodes are late enough in the game, and
# so weak that their functioning should not be impacted.
@@ -320,10 +327,13 @@ AC_DEFUN([AM_DEP_TRACK],
if test "x$enable_dependency_tracking" != xno; then
am_depcomp="$ac_aux_dir/depcomp"
AMDEPBACKSLASH='\'
+ am__nodep='_no'
fi
AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
AC_SUBST([AMDEPBACKSLASH])dnl
_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
+AC_SUBST([am__nodep])dnl
+_AM_SUBST_NOTMAKE([am__nodep])dnl
])
# Generate code to set up dependency tracking. -*- Autoconf -*-
@@ -545,12 +555,15 @@ for _am_header in $config_headers :; do
done
echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
-# Copyright (C) 2001, 2003, 2005, 2008 Free Software Foundation, Inc.
+# Copyright (C) 2001, 2003, 2005, 2008, 2011 Free Software Foundation,
+# Inc.
#
# This file 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.
+# serial 1
+
# AM_PROG_INSTALL_SH
# ------------------
# Define $install_sh.
@@ -590,8 +603,8 @@ AC_SUBST([am__leading_dot])])
# Add --enable-maintainer-mode option to configure. -*- Autoconf -*-
# From Jim Meyering
-# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005, 2008
-# Free Software Foundation, Inc.
+# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005, 2008,
+# 2011 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -611,7 +624,7 @@ AC_DEFUN([AM_MAINTAINER_MODE],
[disable], [m4_define([am_maintainer_other], [enable])],
[m4_define([am_maintainer_other], [enable])
m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])])
-AC_MSG_CHECKING([whether to am_maintainer_other maintainer-specific portions of Makefiles])
+AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
dnl maintainer-mode's default is 'disable' unless 'enable' is passed
AC_ARG_ENABLE([maintainer-mode],
[ --][am_maintainer_other][-maintainer-mode am_maintainer_other make rules and dependencies not useful
@@ -722,12 +735,15 @@ else
fi
])
-# Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
+# Copyright (C) 2003, 2004, 2005, 2006, 2011 Free Software Foundation,
+# Inc.
#
# This file 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.
+# serial 1
+
# AM_PROG_MKDIR_P
# ---------------
# Check for `mkdir -p'.
@@ -750,13 +766,14 @@ esac
# Helper functions for option handling. -*- Autoconf -*-
-# Copyright (C) 2001, 2002, 2003, 2005, 2008 Free Software Foundation, Inc.
+# Copyright (C) 2001, 2002, 2003, 2005, 2008, 2010 Free Software
+# Foundation, Inc.
#
# This file 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.
-# serial 4
+# serial 5
# _AM_MANGLE_OPTION(NAME)
# -----------------------
@@ -764,13 +781,13 @@ AC_DEFUN([_AM_MANGLE_OPTION],
[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
# _AM_SET_OPTION(NAME)
-# ------------------------------
+# --------------------
# Set option NAME. Presently that only means defining a flag for this option.
AC_DEFUN([_AM_SET_OPTION],
[m4_define(_AM_MANGLE_OPTION([$1]), 1)])
# _AM_SET_OPTIONS(OPTIONS)
-# ----------------------------------
+# ------------------------
# OPTIONS is a space-separated list of Automake options.
AC_DEFUN([_AM_SET_OPTIONS],
[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
@@ -846,12 +863,14 @@ Check your system clock])
fi
AC_MSG_RESULT(yes)])
-# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
+# Copyright (C) 2001, 2003, 2005, 2011 Free Software Foundation, Inc.
#
# This file 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.
+# serial 1
+
# AM_PROG_INSTALL_STRIP
# ---------------------
# One issue with vendor `install' (even GNU) is that you can't
@@ -874,13 +893,13 @@ fi
INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
AC_SUBST([INSTALL_STRIP_PROGRAM])])
-# Copyright (C) 2006, 2008 Free Software Foundation, Inc.
+# Copyright (C) 2006, 2008, 2010 Free Software Foundation, Inc.
#
# This file 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.
-# serial 2
+# serial 3
# _AM_SUBST_NOTMAKE(VARIABLE)
# ---------------------------
@@ -889,13 +908,13 @@ AC_SUBST([INSTALL_STRIP_PROGRAM])])
AC_DEFUN([_AM_SUBST_NOTMAKE])
# AM_SUBST_NOTMAKE(VARIABLE)
-# ---------------------------
+# --------------------------
# Public sister of _AM_SUBST_NOTMAKE.
AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
# Check how to create a tarball. -*- Autoconf -*-
-# Copyright (C) 2004, 2005 Free Software Foundation, Inc.
+# Copyright (C) 2004, 2005, 2012 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -917,10 +936,11 @@ AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
# a tarball read from stdin.
# $(am__untar) < result.tar
AC_DEFUN([_AM_PROG_TAR],
-[# Always define AMTAR for backward compatibility.
-AM_MISSING_PROG([AMTAR], [tar])
+[# Always define AMTAR for backward compatibility. Yes, it's still used
+# in the wild :-( We should find a proper way to deprecate it ...
+AC_SUBST([AMTAR], ['$${TAR-tar}'])
m4_if([$1], [v7],
- [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'],
+ [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'],
[m4_case([$1], [ustar],, [pax],,
[m4_fatal([Unknown tar format])])
AC_MSG_CHECKING([how to create a $1 tar archive])
diff --git a/newlib/libc/machine/msp430/configure b/newlib/libc/machine/msp430/configure
index 408b753b8..ca07e566c 100755
--- a/newlib/libc/machine/msp430/configure
+++ b/newlib/libc/machine/msp430/configure
@@ -1,11 +1,13 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.64 for newlib 2.0.0.
+# Generated by GNU Autoconf 2.68 for newlib 2.4.0.
+#
#
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
-# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software
+# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software
# Foundation, Inc.
#
+#
# This configure script is free software; the Free Software Foundation
# gives unlimited permission to copy, distribute and modify it.
## -------------------- ##
@@ -87,6 +89,7 @@ fi
IFS=" "" $as_nl"
# Find who we are. Look in the path if we contain no directory separator.
+as_myself=
case $0 in #((
*[\\/]* ) as_myself=$0 ;;
*) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
@@ -211,11 +214,18 @@ IFS=$as_save_IFS
# We cannot yet assume a decent shell, so we have to provide a
# neutralization value for shells without unset; and this also
# works around shells that cannot unset nonexistent variables.
+ # Preserve -v and -x to the replacement shell.
BASH_ENV=/dev/null
ENV=/dev/null
(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
export CONFIG_SHELL
- exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"}
+ case $- in # ((((
+ *v*x* | *x*v* ) as_opts=-vx ;;
+ *v* ) as_opts=-v ;;
+ *x* ) as_opts=-x ;;
+ * ) as_opts= ;;
+ esac
+ exec "$CONFIG_SHELL" $as_opts "$as_myself" ${1+"$@"}
fi
if test x$as_have_required = xno; then :
@@ -313,7 +323,7 @@ $as_echo X"$as_dir" |
test -d "$as_dir" && break
done
test -z "$as_dirs" || eval "mkdir $as_dirs"
- } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir"
+ } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
} # as_fn_mkdir_p
@@ -353,19 +363,19 @@ else
fi # as_fn_arith
-# as_fn_error ERROR [LINENO LOG_FD]
-# ---------------------------------
+# as_fn_error STATUS ERROR [LINENO LOG_FD]
+# ----------------------------------------
# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
-# script with status $?, using 1 if that was 0.
+# script with STATUS, using 1 if that was 0.
as_fn_error ()
{
- as_status=$?; test $as_status -eq 0 && as_status=1
- if test "$3"; then
- as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
- $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3
+ as_status=$1; test $as_status -eq 0 && as_status=1
+ if test "$4"; then
+ as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
fi
- $as_echo "$as_me: error: $1" >&2
+ $as_echo "$as_me: error: $2" >&2
as_fn_exit $as_status
} # as_fn_error
@@ -523,10 +533,11 @@ as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
-exec 7<&0 </dev/null 6>&1
+test -n "$DJDIR" || exec 7<&0 </dev/null
+exec 6>&1
# Name of the host.
-# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
+# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
# so uname gets run too.
ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
@@ -545,8 +556,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='newlib'
PACKAGE_TARNAME='newlib'
-PACKAGE_VERSION='2.0.0'
-PACKAGE_STRING='newlib 2.0.0'
+PACKAGE_VERSION='2.4.0'
+PACKAGE_STRING='newlib 2.4.0'
PACKAGE_BUGREPORT=''
PACKAGE_URL=''
@@ -587,6 +598,7 @@ AS
am__fastdepCC_FALSE
am__fastdepCC_TRUE
CCDEPMODE
+am__nodep
AMDEPBACKSLASH
AMDEP_FALSE
AMDEP_TRUE
@@ -747,8 +759,9 @@ do
fi
case $ac_option in
- *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
- *) ac_optarg=yes ;;
+ *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
+ *=) ac_optarg= ;;
+ *) ac_optarg=yes ;;
esac
# Accept the important Cygnus configure options, so we can diagnose typos.
@@ -793,7 +806,7 @@ do
ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
# Reject names that are not valid shell variable names.
expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
- as_fn_error "invalid feature name: $ac_useropt"
+ as_fn_error $? "invalid feature name: $ac_useropt"
ac_useropt_orig=$ac_useropt
ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
case $ac_user_opts in
@@ -819,7 +832,7 @@ do
ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
# Reject names that are not valid shell variable names.
expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
- as_fn_error "invalid feature name: $ac_useropt"
+ as_fn_error $? "invalid feature name: $ac_useropt"
ac_useropt_orig=$ac_useropt
ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
case $ac_user_opts in
@@ -1023,7 +1036,7 @@ do
ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
# Reject names that are not valid shell variable names.
expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
- as_fn_error "invalid package name: $ac_useropt"
+ as_fn_error $? "invalid package name: $ac_useropt"
ac_useropt_orig=$ac_useropt
ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
case $ac_user_opts in
@@ -1039,7 +1052,7 @@ do
ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
# Reject names that are not valid shell variable names.
expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
- as_fn_error "invalid package name: $ac_useropt"
+ as_fn_error $? "invalid package name: $ac_useropt"
ac_useropt_orig=$ac_useropt
ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
case $ac_user_opts in
@@ -1069,8 +1082,8 @@ do
| --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
x_libraries=$ac_optarg ;;
- -*) as_fn_error "unrecognized option: \`$ac_option'
-Try \`$0 --help' for more information."
+ -*) as_fn_error $? "unrecognized option: \`$ac_option'
+Try \`$0 --help' for more information"
;;
*=*)
@@ -1078,7 +1091,7 @@ Try \`$0 --help' for more information."
# Reject names that are not valid shell variable names.
case $ac_envvar in #(
'' | [0-9]* | *[!_$as_cr_alnum]* )
- as_fn_error "invalid variable name: \`$ac_envvar'" ;;
+ as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
esac
eval $ac_envvar=\$ac_optarg
export $ac_envvar ;;
@@ -1088,7 +1101,7 @@ Try \`$0 --help' for more information."
$as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
$as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
- : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
+ : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
;;
esac
@@ -1096,13 +1109,13 @@ done
if test -n "$ac_prev"; then
ac_option=--`echo $ac_prev | sed 's/_/-/g'`
- as_fn_error "missing argument to $ac_option"
+ as_fn_error $? "missing argument to $ac_option"
fi
if test -n "$ac_unrecognized_opts"; then
case $enable_option_checking in
no) ;;
- fatal) as_fn_error "unrecognized options: $ac_unrecognized_opts" ;;
+ fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
*) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
esac
fi
@@ -1125,7 +1138,7 @@ do
[\\/$]* | ?:[\\/]* ) continue;;
NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
esac
- as_fn_error "expected an absolute directory name for --$ac_var: $ac_val"
+ as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
done
# There might be people who depend on the old broken behavior: `$host'
@@ -1139,8 +1152,8 @@ target=$target_alias
if test "x$host_alias" != x; then
if test "x$build_alias" = x; then
cross_compiling=maybe
- $as_echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
- If a cross compiler is detected then cross compile mode will be used." >&2
+ $as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host.
+ If a cross compiler is detected then cross compile mode will be used" >&2
elif test "x$build_alias" != "x$host_alias"; then
cross_compiling=yes
fi
@@ -1155,9 +1168,9 @@ test "$silent" = yes && exec 6>/dev/null
ac_pwd=`pwd` && test -n "$ac_pwd" &&
ac_ls_di=`ls -di .` &&
ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
- as_fn_error "working directory cannot be determined"
+ as_fn_error $? "working directory cannot be determined"
test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
- as_fn_error "pwd does not report name of working directory"
+ as_fn_error $? "pwd does not report name of working directory"
# Find the source files, if location was not specified.
@@ -1196,11 +1209,11 @@ else
fi
if test ! -r "$srcdir/$ac_unique_file"; then
test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
- as_fn_error "cannot find sources ($ac_unique_file) in $srcdir"
+ as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
fi
ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
ac_abs_confdir=`(
- cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error "$ac_msg"
+ cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
pwd)`
# When building in place, set srcdir=.
if test "$ac_abs_confdir" = "$ac_pwd"; then
@@ -1226,7 +1239,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures newlib 2.0.0 to adapt to many kinds of systems.
+\`configure' configures newlib 2.4.0 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1240,7 +1253,7 @@ Configuration:
--help=short display options specific to this package
--help=recursive display the short help of all the included packages
-V, --version display version information and exit
- -q, --quiet, --silent do not print \`checking...' messages
+ -q, --quiet, --silent do not print \`checking ...' messages
--cache-file=FILE cache test results in FILE [disabled]
-C, --config-cache alias for \`--cache-file=config.cache'
-n, --no-create do not create output files
@@ -1296,7 +1309,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of newlib 2.0.0:";;
+ short | recursive ) echo "Configuration of newlib 2.4.0:";;
esac
cat <<\_ACEOF
@@ -1387,10 +1400,10 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-newlib configure 2.0.0
-generated by GNU Autoconf 2.64
+newlib configure 2.4.0
+generated by GNU Autoconf 2.68
-Copyright (C) 2009 Free Software Foundation, Inc.
+Copyright (C) 2010 Free Software Foundation, Inc.
This configure script is free software; the Free Software Foundation
gives unlimited permission to copy, distribute and modify it.
_ACEOF
@@ -1434,16 +1447,16 @@ sed 's/^/| /' conftest.$ac_ext >&5
ac_retval=1
fi
- eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
- return $ac_retval
+ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+ as_fn_set_status $ac_retval
} # ac_fn_c_try_compile
cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by newlib $as_me 2.0.0, which was
-generated by GNU Autoconf 2.64. Invocation command line was
+It was created by newlib $as_me 2.4.0, which was
+generated by GNU Autoconf 2.68. Invocation command line was
$ $0 $@
@@ -1553,11 +1566,9 @@ trap 'exit_status=$?
{
echo
- cat <<\_ASBOX
-## ---------------- ##
+ $as_echo "## ---------------- ##
## Cache variables. ##
-## ---------------- ##
-_ASBOX
+## ---------------- ##"
echo
# The following way of writing the cache mishandles newlines in values,
(
@@ -1591,11 +1602,9 @@ $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
)
echo
- cat <<\_ASBOX
-## ----------------- ##
+ $as_echo "## ----------------- ##
## Output variables. ##
-## ----------------- ##
-_ASBOX
+## ----------------- ##"
echo
for ac_var in $ac_subst_vars
do
@@ -1608,11 +1617,9 @@ _ASBOX
echo
if test -n "$ac_subst_files"; then
- cat <<\_ASBOX
-## ------------------- ##
+ $as_echo "## ------------------- ##
## File substitutions. ##
-## ------------------- ##
-_ASBOX
+## ------------------- ##"
echo
for ac_var in $ac_subst_files
do
@@ -1626,11 +1633,9 @@ _ASBOX
fi
if test -s confdefs.h; then
- cat <<\_ASBOX
-## ----------- ##
+ $as_echo "## ----------- ##
## confdefs.h. ##
-## ----------- ##
-_ASBOX
+## ----------- ##"
echo
cat confdefs.h
echo
@@ -1685,7 +1690,12 @@ _ACEOF
ac_site_file1=NONE
ac_site_file2=NONE
if test -n "$CONFIG_SITE"; then
- ac_site_file1=$CONFIG_SITE
+ # We do not want a PATH search for config.site.
+ case $CONFIG_SITE in #((
+ -*) ac_site_file1=./$CONFIG_SITE;;
+ */*) ac_site_file1=$CONFIG_SITE;;
+ *) ac_site_file1=./$CONFIG_SITE;;
+ esac
elif test "x$prefix" != xNONE; then
ac_site_file1=$prefix/share/config.site
ac_site_file2=$prefix/etc/config.site
@@ -1696,18 +1706,22 @@ fi
for ac_site_file in "$ac_site_file1" "$ac_site_file2"
do
test "x$ac_site_file" = xNONE && continue
- if test -r "$ac_site_file"; then
+ if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
$as_echo "$as_me: loading site script $ac_site_file" >&6;}
sed 's/^/| /' "$ac_site_file" >&5
- . "$ac_site_file"
+ . "$ac_site_file" \
+ || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "failed to load site script $ac_site_file
+See \`config.log' for more details" "$LINENO" 5; }
fi
done
if test -r "$cache_file"; then
- # Some versions of bash will fail to source /dev/null (special
- # files actually), so we avoid doing that.
- if test -f "$cache_file"; then
+ # Some versions of bash will fail to source /dev/null (special files
+ # actually), so we avoid doing that. DJGPP emulates it as a regular file.
+ if test /dev/null != "$cache_file" && test -f "$cache_file"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
$as_echo "$as_me: loading cache $cache_file" >&6;}
case $cache_file in
@@ -1776,7 +1790,7 @@ if $ac_cache_corrupted; then
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
{ $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
- as_fn_error "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
+ as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
fi
## -------------------- ##
## Main body of script. ##
@@ -1793,16 +1807,22 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
ac_aux_dir=
for ac_dir in ../../../.. "$srcdir"/../../../..; do
- for ac_t in install-sh install.sh shtool; do
- if test -f "$ac_dir/$ac_t"; then
- ac_aux_dir=$ac_dir
- ac_install_sh="$ac_aux_dir/$ac_t -c"
- break 2
- fi
- done
+ if test -f "$ac_dir/install-sh"; then
+ ac_aux_dir=$ac_dir
+ ac_install_sh="$ac_aux_dir/install-sh -c"
+ break
+ elif test -f "$ac_dir/install.sh"; then
+ ac_aux_dir=$ac_dir
+ ac_install_sh="$ac_aux_dir/install.sh -c"
+ break
+ elif test -f "$ac_dir/shtool"; then
+ ac_aux_dir=$ac_dir
+ ac_install_sh="$ac_aux_dir/shtool install -c"
+ break
+ fi
done
if test -z "$ac_aux_dir"; then
- as_fn_error "cannot find install-sh, install.sh, or shtool in ../../../.. \"$srcdir\"/../../../.." "$LINENO" 5
+ as_fn_error $? "cannot find install-sh, install.sh, or shtool in ../../../.. \"$srcdir\"/../../../.." "$LINENO" 5
fi
# These three variables are undocumented and unsupported,
@@ -1818,27 +1838,27 @@ ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
# Make sure we can run config.sub.
$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
- as_fn_error "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
+ as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
$as_echo_n "checking build system type... " >&6; }
-if test "${ac_cv_build+set}" = set; then :
+if ${ac_cv_build+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_build_alias=$build_alias
test "x$ac_build_alias" = x &&
ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
test "x$ac_build_alias" = x &&
- as_fn_error "cannot guess build type; you must specify one" "$LINENO" 5
+ as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
- as_fn_error "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
+ as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
$as_echo "$ac_cv_build" >&6; }
case $ac_cv_build in
*-*-*) ;;
-*) as_fn_error "invalid value of canonical build" "$LINENO" 5;;
+*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
esac
build=$ac_cv_build
ac_save_IFS=$IFS; IFS='-'
@@ -1856,14 +1876,14 @@ case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
$as_echo_n "checking host system type... " >&6; }
-if test "${ac_cv_host+set}" = set; then :
+if ${ac_cv_host+:} false; then :
$as_echo_n "(cached) " >&6
else
if test "x$host_alias" = x; then
ac_cv_host=$ac_cv_build
else
ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
- as_fn_error "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
+ as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
fi
fi
@@ -1871,7 +1891,7 @@ fi
$as_echo "$ac_cv_host" >&6; }
case $ac_cv_host in
*-*-*) ;;
-*) as_fn_error "invalid value of canonical host" "$LINENO" 5;;
+*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
esac
host=$ac_cv_host
ac_save_IFS=$IFS; IFS='-'
@@ -1906,7 +1926,7 @@ am__api_version='1.11'
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
$as_echo_n "checking for a BSD-compatible install... " >&6; }
if test -z "$INSTALL"; then
-if test "${ac_cv_path_install+set}" = set; then :
+if ${ac_cv_path_install+:} false; then :
$as_echo_n "(cached) " >&6
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
@@ -1993,11 +2013,11 @@ am_lf='
'
case `pwd` in
*[\\\"\#\$\&\'\`$am_lf]*)
- as_fn_error "unsafe absolute working directory name" "$LINENO" 5;;
+ as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5;;
esac
case $srcdir in
*[\\\"\#\$\&\'\`$am_lf\ \ ]*)
- as_fn_error "unsafe srcdir value: \`$srcdir'" "$LINENO" 5;;
+ as_fn_error $? "unsafe srcdir value: \`$srcdir'" "$LINENO" 5;;
esac
# Do `set' in a subshell so we don't clobber the current shell's
@@ -2019,7 +2039,7 @@ if (
# if, for instance, CONFIG_SHELL is bash and it inherits a
# broken ls alias from the environment. This has actually
# happened. Such a system could not be considered "sane".
- as_fn_error "ls -t appears to fail. Make sure there is not a broken
+ as_fn_error $? "ls -t appears to fail. Make sure there is not a broken
alias in your environment" "$LINENO" 5
fi
@@ -2029,7 +2049,7 @@ then
# Ok.
:
else
- as_fn_error "newly created file is older than distributed files!
+ as_fn_error $? "newly created file is older than distributed files!
Check your system clock" "$LINENO" 5
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
@@ -2083,7 +2103,7 @@ if test "$cross_compiling" != no; then
set dummy ${ac_tool_prefix}strip; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_STRIP+set}" = set; then :
+if ${ac_cv_prog_STRIP+:} false; then :
$as_echo_n "(cached) " >&6
else
if test -n "$STRIP"; then
@@ -2123,7 +2143,7 @@ if test -z "$ac_cv_prog_STRIP"; then
set dummy strip; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then :
+if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
$as_echo_n "(cached) " >&6
else
if test -n "$ac_ct_STRIP"; then
@@ -2176,7 +2196,7 @@ INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
if test -z "$MKDIR_P"; then
- if test "${ac_cv_path_mkdir+set}" = set; then :
+ if ${ac_cv_path_mkdir+:} false; then :
$as_echo_n "(cached) " >&6
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
@@ -2201,6 +2221,7 @@ IFS=$as_save_IFS
fi
+ test -d ./--version && rmdir ./--version
if test "${ac_cv_path_mkdir+set}" = set; then
MKDIR_P="$ac_cv_path_mkdir -p"
else
@@ -2208,7 +2229,6 @@ fi
# value for MKDIR_P within a source directory, because that will
# break other packages using the cache if that directory is
# removed, or if the value is a relative name.
- test -d ./--version && rmdir ./--version
MKDIR_P="$ac_install_sh -d"
fi
fi
@@ -2227,7 +2247,7 @@ do
set dummy $ac_prog; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_AWK+set}" = set; then :
+if ${ac_cv_prog_AWK+:} false; then :
$as_echo_n "(cached) " >&6
else
if test -n "$AWK"; then
@@ -2267,7 +2287,7 @@ done
$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
set x ${MAKE-make}
ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
-if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then :
+if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then :
$as_echo_n "(cached) " >&6
else
cat >conftest.make <<\_ACEOF
@@ -2275,7 +2295,7 @@ SHELL = /bin/sh
all:
@echo '@@@%%%=$(MAKE)=@@@%%%'
_ACEOF
-# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
+# GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
case `${MAKE-make} -f conftest.make 2>/dev/null` in
*@@@%%%=?*=@@@%%%*)
eval ac_cv_prog_make_${ac_make}_set=yes;;
@@ -2355,6 +2375,7 @@ fi
if test "x$enable_dependency_tracking" != xno; then
am_depcomp="$ac_aux_dir/depcomp"
AMDEPBACKSLASH='\'
+ am__nodep='_no'
fi
if test "x$enable_dependency_tracking" != xno; then
AMDEP_TRUE=
@@ -2371,7 +2392,7 @@ if test "${enable_multilib+set}" = set; then :
enableval=$enable_multilib; case "${enableval}" in
yes) multilib=yes ;;
no) multilib=no ;;
- *) as_fn_error "bad value ${enableval} for multilib option" "$LINENO" 5 ;;
+ *) as_fn_error $? "bad value ${enableval} for multilib option" "$LINENO" 5 ;;
esac
else
multilib=yes
@@ -2382,7 +2403,7 @@ if test "${enable_target_optspace+set}" = set; then :
enableval=$enable_target_optspace; case "${enableval}" in
yes) target_optspace=yes ;;
no) target_optspace=no ;;
- *) as_fn_error "bad value ${enableval} for target-optspace option" "$LINENO" 5 ;;
+ *) as_fn_error $? "bad value ${enableval} for target-optspace option" "$LINENO" 5 ;;
esac
else
target_optspace=
@@ -2393,7 +2414,7 @@ if test "${enable_malloc_debugging+set}" = set; then :
enableval=$enable_malloc_debugging; case "${enableval}" in
yes) malloc_debugging=yes ;;
no) malloc_debugging=no ;;
- *) as_fn_error "bad value ${enableval} for malloc-debugging option" "$LINENO" 5 ;;
+ *) as_fn_error $? "bad value ${enableval} for malloc-debugging option" "$LINENO" 5 ;;
esac
else
malloc_debugging=
@@ -2404,7 +2425,7 @@ if test "${enable_newlib_multithread+set}" = set; then :
enableval=$enable_newlib_multithread; case "${enableval}" in
yes) newlib_multithread=yes ;;
no) newlib_multithread=no ;;
- *) as_fn_error "bad value ${enableval} for newlib-multithread option" "$LINENO" 5 ;;
+ *) as_fn_error $? "bad value ${enableval} for newlib-multithread option" "$LINENO" 5 ;;
esac
else
newlib_multithread=yes
@@ -2416,7 +2437,7 @@ if test "${enable_newlib_iconv+set}" = set; then :
case "${enableval}" in
yes) newlib_iconv=yes ;;
no) newlib_iconv=no ;;
- *) as_fn_error "bad value ${enableval} for newlib-iconv option" "$LINENO" 5 ;;
+ *) as_fn_error $? "bad value ${enableval} for newlib-iconv option" "$LINENO" 5 ;;
esac
fi
else
@@ -2431,7 +2452,7 @@ if test "${enable_newlib_elix_level+set}" = set; then :
2) newlib_elix_level=2 ;;
3) newlib_elix_level=3 ;;
4) newlib_elix_level=4 ;;
- *) as_fn_error "bad value ${enableval} for newlib-elix-level option" "$LINENO" 5 ;;
+ *) as_fn_error $? "bad value ${enableval} for newlib-elix-level option" "$LINENO" 5 ;;
esac
else
newlib_elix_level=0
@@ -2442,7 +2463,7 @@ if test "${enable_newlib_io_float+set}" = set; then :
enableval=$enable_newlib_io_float; case "${enableval}" in
yes) newlib_io_float=yes ;;
no) newlib_io_float=no ;;
- *) as_fn_error "bad value ${enableval} for newlib-io-float option" "$LINENO" 5 ;;
+ *) as_fn_error $? "bad value ${enableval} for newlib-io-float option" "$LINENO" 5 ;;
esac
else
newlib_io_float=yes
@@ -2453,7 +2474,7 @@ if test "${enable_newlib_supplied_syscalls+set}" = set; then :
enableval=$enable_newlib_supplied_syscalls; case "${enableval}" in
yes) newlib_may_supply_syscalls=yes ;;
no) newlib_may_supply_syscalls=no ;;
- *) as_fn_error "bad value ${enableval} for newlib-supplied-syscalls option" "$LINENO" 5 ;;
+ *) as_fn_error $? "bad value ${enableval} for newlib-supplied-syscalls option" "$LINENO" 5 ;;
esac
else
newlib_may_supply_syscalls=yes
@@ -2490,7 +2511,7 @@ if test "`cd $srcdir && pwd`" != "`pwd`"; then
am__isrc=' -I$(srcdir)'
# test to see if srcdir already configured
if test -f $srcdir/config.status; then
- as_fn_error "source directory already configured; run \"make distclean\" there first" "$LINENO" 5
+ as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5
fi
fi
@@ -2506,7 +2527,7 @@ fi
# Define the identity of the package.
PACKAGE='newlib'
- VERSION='2.0.0'
+ VERSION='2.4.0'
# Some tools Automake needs.
@@ -2527,11 +2548,11 @@ MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
# We need awk for the "check" target. The system "awk" is bad on
# some platforms.
-# Always define AMTAR for backward compatibility.
+# Always define AMTAR for backward compatibility. Yes, it's still used
+# in the wild :-( We should find a proper way to deprecate it ...
+AMTAR='$${TAR-tar}'
-AMTAR=${AMTAR-"${am_missing_run}tar"}
-
-am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'
+am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'
@@ -2554,7 +2575,7 @@ am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'
set dummy gcc; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_CC+set}" = set; then :
+if ${ac_cv_prog_CC+:} false; then :
$as_echo_n "(cached) " >&6
else
if test -n "$CC"; then
@@ -2592,7 +2613,7 @@ depcc="$CC" am_compiler_list=
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
$as_echo_n "checking dependency style of $depcc... " >&6; }
-if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then :
+if ${am_cv_CC_dependencies_compiler_type+:} false; then :
$as_echo_n "(cached) " >&6
else
if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
@@ -2601,6 +2622,7 @@ else
# instance it was reported that on HP-UX the gcc test will end up
# making a dummy file named `D' -- because `-MD' means `put the output
# in D'.
+ rm -rf conftest.dir
mkdir conftest.dir
# Copy depcomp to subdir because otherwise we won't find it if we're
# using a relative directory.
@@ -2660,7 +2682,7 @@ else
break
fi
;;
- msvisualcpp | msvcmsys)
+ msvc7 | msvc7msys | msvisualcpp | msvcmsys)
# This compiler won't grok `-c -o', but also, the minuso test has
# not run yet. These depmodes are late enough in the game, and
# so weak that their functioning should not be impacted.
@@ -2720,7 +2742,7 @@ if test -z "$CC"; then
set dummy cc; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_CC+set}" = set; then :
+if ${ac_cv_prog_CC+:} false; then :
$as_echo_n "(cached) " >&6
else
if test -n "$CC"; then
@@ -2770,12 +2792,12 @@ $as_echo "no" >&6; }
fi
- test -z "$CC" && as_fn_error "no acceptable cc found in \$PATH" "$LINENO" 5
+ test -z "$CC" && as_fn_error $? "no acceptable cc found in \$PATH" "$LINENO" 5
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using GNU C" >&5
$as_echo_n "checking whether we are using GNU C... " >&6; }
-if test "${ac_cv_c_compiler_gnu+set}" = set; then :
+if ${ac_cv_c_compiler_gnu+:} false; then :
$as_echo_n "(cached) " >&6
else
cat > conftest.c <<EOF
@@ -2805,7 +2827,7 @@ if test $ac_cv_c_compiler_gnu = yes; then
ac_save_CFLAGS=$CFLAGS
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
$as_echo_n "checking whether $CC accepts -g... " >&6; }
-if test "${ac_cv_prog_cc_g+set}" = set; then :
+if ${ac_cv_prog_cc_g+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_save_c_werror_flag=$ac_c_werror_flag
@@ -2899,7 +2921,7 @@ if test -n "$ac_tool_prefix"; then
set dummy ${ac_tool_prefix}as; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_AS+set}" = set; then :
+if ${ac_cv_prog_AS+:} false; then :
$as_echo_n "(cached) " >&6
else
if test -n "$AS"; then
@@ -2939,7 +2961,7 @@ if test -z "$ac_cv_prog_AS"; then
set dummy as; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_ac_ct_AS+set}" = set; then :
+if ${ac_cv_prog_ac_ct_AS+:} false; then :
$as_echo_n "(cached) " >&6
else
if test -n "$ac_ct_AS"; then
@@ -2991,7 +3013,7 @@ if test -n "$ac_tool_prefix"; then
set dummy ${ac_tool_prefix}ar; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_AR+set}" = set; then :
+if ${ac_cv_prog_AR+:} false; then :
$as_echo_n "(cached) " >&6
else
if test -n "$AR"; then
@@ -3031,7 +3053,7 @@ if test -z "$ac_cv_prog_AR"; then
set dummy ar; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_ac_ct_AR+set}" = set; then :
+if ${ac_cv_prog_ac_ct_AR+:} false; then :
$as_echo_n "(cached) " >&6
else
if test -n "$ac_ct_AR"; then
@@ -3083,7 +3105,7 @@ if test -n "$ac_tool_prefix"; then
set dummy ${ac_tool_prefix}ranlib; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_RANLIB+set}" = set; then :
+if ${ac_cv_prog_RANLIB+:} false; then :
$as_echo_n "(cached) " >&6
else
if test -n "$RANLIB"; then
@@ -3123,7 +3145,7 @@ if test -z "$ac_cv_prog_RANLIB"; then
set dummy ranlib; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then :
+if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
$as_echo_n "(cached) " >&6
else
if test -n "$ac_ct_RANLIB"; then
@@ -3175,7 +3197,7 @@ if test -n "$ac_tool_prefix"; then
set dummy ${ac_tool_prefix}readelf; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_READELF+set}" = set; then :
+if ${ac_cv_prog_READELF+:} false; then :
$as_echo_n "(cached) " >&6
else
if test -n "$READELF"; then
@@ -3215,7 +3237,7 @@ if test -z "$ac_cv_prog_READELF"; then
set dummy readelf; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_ac_ct_READELF+set}" = set; then :
+if ${ac_cv_prog_ac_ct_READELF+:} false; then :
$as_echo_n "(cached) " >&6
else
if test -n "$ac_ct_READELF"; then
@@ -3454,10 +3476,21 @@ $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
:end' >>confcache
if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
if test -w "$cache_file"; then
- test "x$cache_file" != "x/dev/null" &&
+ if test "x$cache_file" != "x/dev/null"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
$as_echo "$as_me: updating cache $cache_file" >&6;}
- cat confcache >$cache_file
+ if test ! -f "$cache_file" || test -h "$cache_file"; then
+ cat confcache >"$cache_file"
+ else
+ case $cache_file in #(
+ */* | ?:*)
+ mv -f confcache "$cache_file"$$ &&
+ mv -f "$cache_file"$$ "$cache_file" ;; #(
+ *)
+ mv -f confcache "$cache_file" ;;
+ esac
+ fi
+ fi
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
@@ -3509,6 +3542,7 @@ DEFS=`sed -n "$ac_script" confdefs.h`
ac_libobjs=
ac_ltlibobjs=
+U=
for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
# 1. Remove the extension, and $U if already installed.
ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
@@ -3524,48 +3558,48 @@ LTLIBOBJS=$ac_ltlibobjs
if test -z "${MAY_SUPPLY_SYSCALLS_TRUE}" && test -z "${MAY_SUPPLY_SYSCALLS_FALSE}"; then
- as_fn_error "conditional \"MAY_SUPPLY_SYSCALLS\" was never defined.
+ as_fn_error $? "conditional \"MAY_SUPPLY_SYSCALLS\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then
- as_fn_error "conditional \"AMDEP\" was never defined.
+ as_fn_error $? "conditional \"AMDEP\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
- as_fn_error "conditional \"am__fastdepCC\" was never defined.
+ as_fn_error $? "conditional \"am__fastdepCC\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then
- as_fn_error "conditional \"MAINTAINER_MODE\" was never defined.
+ as_fn_error $? "conditional \"MAINTAINER_MODE\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
if test -z "${ELIX_LEVEL_0_TRUE}" && test -z "${ELIX_LEVEL_0_FALSE}"; then
- as_fn_error "conditional \"ELIX_LEVEL_0\" was never defined.
+ as_fn_error $? "conditional \"ELIX_LEVEL_0\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
if test -z "${ELIX_LEVEL_1_TRUE}" && test -z "${ELIX_LEVEL_1_FALSE}"; then
- as_fn_error "conditional \"ELIX_LEVEL_1\" was never defined.
+ as_fn_error $? "conditional \"ELIX_LEVEL_1\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
if test -z "${ELIX_LEVEL_2_TRUE}" && test -z "${ELIX_LEVEL_2_FALSE}"; then
- as_fn_error "conditional \"ELIX_LEVEL_2\" was never defined.
+ as_fn_error $? "conditional \"ELIX_LEVEL_2\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
if test -z "${ELIX_LEVEL_3_TRUE}" && test -z "${ELIX_LEVEL_3_FALSE}"; then
- as_fn_error "conditional \"ELIX_LEVEL_3\" was never defined.
+ as_fn_error $? "conditional \"ELIX_LEVEL_3\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
if test -z "${ELIX_LEVEL_4_TRUE}" && test -z "${ELIX_LEVEL_4_FALSE}"; then
- as_fn_error "conditional \"ELIX_LEVEL_4\" was never defined.
+ as_fn_error $? "conditional \"ELIX_LEVEL_4\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
if test -z "${USE_LIBTOOL_TRUE}" && test -z "${USE_LIBTOOL_FALSE}"; then
- as_fn_error "conditional \"USE_LIBTOOL\" was never defined.
+ as_fn_error $? "conditional \"USE_LIBTOOL\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
-: ${CONFIG_STATUS=./config.status}
+: "${CONFIG_STATUS=./config.status}"
ac_write_fail=0
ac_clean_files_save=$ac_clean_files
ac_clean_files="$ac_clean_files $CONFIG_STATUS"
@@ -3666,6 +3700,7 @@ fi
IFS=" "" $as_nl"
# Find who we are. Look in the path if we contain no directory separator.
+as_myself=
case $0 in #((
*[\\/]* ) as_myself=$0 ;;
*) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
@@ -3711,19 +3746,19 @@ export LANGUAGE
(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
-# as_fn_error ERROR [LINENO LOG_FD]
-# ---------------------------------
+# as_fn_error STATUS ERROR [LINENO LOG_FD]
+# ----------------------------------------
# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
-# script with status $?, using 1 if that was 0.
+# script with STATUS, using 1 if that was 0.
as_fn_error ()
{
- as_status=$?; test $as_status -eq 0 && as_status=1
- if test "$3"; then
- as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
- $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3
+ as_status=$1; test $as_status -eq 0 && as_status=1
+ if test "$4"; then
+ as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
fi
- $as_echo "$as_me: error: $1" >&2
+ $as_echo "$as_me: error: $2" >&2
as_fn_exit $as_status
} # as_fn_error
@@ -3919,7 +3954,7 @@ $as_echo X"$as_dir" |
test -d "$as_dir" && break
done
test -z "$as_dirs" || eval "mkdir $as_dirs"
- } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir"
+ } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
} # as_fn_mkdir_p
@@ -3972,8 +4007,8 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by newlib $as_me 2.0.0, which was
-generated by GNU Autoconf 2.64. Invocation command line was
+This file was extended by newlib $as_me 2.4.0, which was
+generated by GNU Autoconf 2.68. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
CONFIG_HEADERS = $CONFIG_HEADERS
@@ -4009,6 +4044,7 @@ Usage: $0 [OPTION]... [TAG]...
-h, --help print this help, then exit
-V, --version print version number and configuration settings, then exit
+ --config print configuration, then exit
-q, --quiet, --silent
do not print progress messages
-d, --debug don't remove temporary files
@@ -4026,12 +4062,13 @@ Report bugs to the package provider."
_ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
-newlib config.status 2.0.0
-configured by $0, generated by GNU Autoconf 2.64,
- with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
+newlib config.status 2.4.0
+configured by $0, generated by GNU Autoconf 2.68,
+ with options \\"\$ac_cs_config\\"
-Copyright (C) 2009 Free Software Foundation, Inc.
+Copyright (C) 2010 Free Software Foundation, Inc.
This config.status script is free software; the Free Software Foundation
gives unlimited permission to copy, distribute and modify it."
@@ -4049,11 +4086,16 @@ ac_need_defaults=:
while test $# != 0
do
case $1 in
- --*=*)
+ --*=?*)
ac_option=`expr "X$1" : 'X\([^=]*\)='`
ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
ac_shift=:
;;
+ --*=)
+ ac_option=`expr "X$1" : 'X\([^=]*\)='`
+ ac_optarg=
+ ac_shift=:
+ ;;
*)
ac_option=$1
ac_optarg=$2
@@ -4067,12 +4109,15 @@ do
ac_cs_recheck=: ;;
--version | --versio | --versi | --vers | --ver | --ve | --v | -V )
$as_echo "$ac_cs_version"; exit ;;
+ --config | --confi | --conf | --con | --co | --c )
+ $as_echo "$ac_cs_config"; exit ;;
--debug | --debu | --deb | --de | --d | -d )
debug=: ;;
--file | --fil | --fi | --f )
$ac_shift
case $ac_optarg in
*\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
+ '') as_fn_error $? "missing file argument" ;;
esac
as_fn_append CONFIG_FILES " '$ac_optarg'"
ac_need_defaults=false;;
@@ -4083,7 +4128,7 @@ do
ac_cs_silent=: ;;
# This is an error.
- -*) as_fn_error "unrecognized option: \`$1'
+ -*) as_fn_error $? "unrecognized option: \`$1'
Try \`$0 --help' for more information." ;;
*) as_fn_append ac_config_targets " $1"
@@ -4140,7 +4185,7 @@ do
"depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
"Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
- *) as_fn_error "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
+ *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
esac
done
@@ -4162,9 +4207,10 @@ fi
# after its creation but before its name has been assigned to `$tmp'.
$debug ||
{
- tmp=
+ tmp= ac_tmp=
trap 'exit_status=$?
- { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
+ : "${ac_tmp:=$tmp}"
+ { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
' 0
trap 'as_fn_exit 1' 1 2 13 15
}
@@ -4172,12 +4218,13 @@ $debug ||
{
tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
- test -n "$tmp" && test -d "$tmp"
+ test -d "$tmp"
} ||
{
tmp=./conf$$-$RANDOM
(umask 077 && mkdir "$tmp")
-} || as_fn_error "cannot create a temporary directory in ." "$LINENO" 5
+} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
+ac_tmp=$tmp
# Set up the scripts for CONFIG_FILES section.
# No need to generate them if there are no CONFIG_FILES.
@@ -4194,12 +4241,12 @@ if test "x$ac_cr" = x; then
fi
ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
- ac_cs_awk_cr='\r'
+ ac_cs_awk_cr='\\r'
else
ac_cs_awk_cr=$ac_cr
fi
-echo 'BEGIN {' >"$tmp/subs1.awk" &&
+echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
_ACEOF
@@ -4208,18 +4255,18 @@ _ACEOF
echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
echo "_ACEOF"
} >conf$$subs.sh ||
- as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
-ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'`
+ as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
+ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
ac_delim='%!_!# '
for ac_last_try in false false false false false :; do
. ./conf$$subs.sh ||
- as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
+ as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
if test $ac_delim_n = $ac_delim_num; then
break
elif $ac_last_try; then
- as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
+ as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
else
ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
fi
@@ -4227,7 +4274,7 @@ done
rm -f conf$$subs.sh
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
-cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&
+cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
_ACEOF
sed -n '
h
@@ -4241,7 +4288,7 @@ s/'"$ac_delim"'$//
t delim
:nl
h
-s/\(.\{148\}\).*/\1/
+s/\(.\{148\}\)..*/\1/
t more1
s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
p
@@ -4255,7 +4302,7 @@ s/.\{148\}//
t nl
:delim
h
-s/\(.\{148\}\).*/\1/
+s/\(.\{148\}\)..*/\1/
t more2
s/["\\]/\\&/g; s/^/"/; s/$/"/
p
@@ -4275,7 +4322,7 @@ t delim
rm -f conf$$subs.awk
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
_ACAWK
-cat >>"\$tmp/subs1.awk" <<_ACAWK &&
+cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
for (key in S) S_is_set[key] = 1
FS = ""
@@ -4307,21 +4354,29 @@ if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
else
cat
-fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \
- || as_fn_error "could not setup config files machinery" "$LINENO" 5
+fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
+ || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
_ACEOF
-# VPATH may cause trouble with some makes, so we remove $(srcdir),
-# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
+# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
+# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
# trailing colons and then remove the whole line if VPATH becomes empty
# (actually we leave an empty line to preserve line numbers).
if test "x$srcdir" = x.; then
- ac_vpsub='/^[ ]*VPATH[ ]*=/{
-s/:*\$(srcdir):*/:/
-s/:*\${srcdir}:*/:/
-s/:*@srcdir@:*/:/
-s/^\([^=]*=[ ]*\):*/\1/
+ ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
+h
+s///
+s/^/:/
+s/[ ]*$/:/
+s/:\$(srcdir):/:/g
+s/:\${srcdir}:/:/g
+s/:@srcdir@:/:/g
+s/^:*//
s/:*$//
+x
+s/\(=[ ]*\).*/\1/
+G
+s/\n//
s/^[^=]*=[ ]*$//
}'
fi
@@ -4339,7 +4394,7 @@ do
esac
case $ac_mode$ac_tag in
:[FHL]*:*);;
- :L* | :C*:*) as_fn_error "invalid tag \`$ac_tag'" "$LINENO" 5;;
+ :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
:[FH]-) ac_tag=-:-;;
:[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
esac
@@ -4358,7 +4413,7 @@ do
for ac_f
do
case $ac_f in
- -) ac_f="$tmp/stdin";;
+ -) ac_f="$ac_tmp/stdin";;
*) # Look for the file first in the build tree, then in the source tree
# (if the path is not absolute). The absolute path cannot be DOS-style,
# because $ac_f cannot contain `:'.
@@ -4367,7 +4422,7 @@ do
[\\/$]*) false;;
*) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
esac ||
- as_fn_error "cannot find input file: \`$ac_f'" "$LINENO" 5;;
+ as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
esac
case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
as_fn_append ac_file_inputs " '$ac_f'"
@@ -4393,8 +4448,8 @@ $as_echo "$as_me: creating $ac_file" >&6;}
esac
case $ac_tag in
- *:-:* | *:-) cat >"$tmp/stdin" \
- || as_fn_error "could not create $ac_file" "$LINENO" 5 ;;
+ *:-:* | *:-) cat >"$ac_tmp/stdin" \
+ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
esac
;;
esac
@@ -4530,23 +4585,24 @@ s&@INSTALL@&$ac_INSTALL&;t t
s&@MKDIR_P@&$ac_MKDIR_P&;t t
$ac_datarootdir_hack
"
-eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \
- || as_fn_error "could not create $ac_file" "$LINENO" 5
+eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
+ >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
- { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
- { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
+ { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
+ { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
+ "$ac_tmp/out"`; test -z "$ac_out"; } &&
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
-which seems to be undefined. Please make sure it is defined." >&5
+which seems to be undefined. Please make sure it is defined" >&5
$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
-which seems to be undefined. Please make sure it is defined." >&2;}
+which seems to be undefined. Please make sure it is defined" >&2;}
- rm -f "$tmp/stdin"
+ rm -f "$ac_tmp/stdin"
case $ac_file in
- -) cat "$tmp/out" && rm -f "$tmp/out";;
- *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";;
+ -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
+ *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
esac \
- || as_fn_error "could not create $ac_file" "$LINENO" 5
+ || as_fn_error $? "could not create $ac_file" "$LINENO" 5
;;
@@ -4662,7 +4718,7 @@ _ACEOF
ac_clean_files=$ac_clean_files_save
test $ac_write_fail = 0 ||
- as_fn_error "write failure creating $CONFIG_STATUS" "$LINENO" 5
+ as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
# configure is writing to config.log, and then calls config.status.
@@ -4683,7 +4739,7 @@ if test "$no_create" != yes; then
exec 5>>config.log
# Use ||, not &&, to avoid exiting from the if with $? = 1, which
# would make configure fail if this is the last instruction.
- $ac_cs_success || as_fn_exit $?
+ $ac_cs_success || as_fn_exit 1
fi
if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
diff --git a/newlib/libc/machine/msp430/setjmp.S b/newlib/libc/machine/msp430/setjmp.S
index 6684f8acb..f3deefae5 100644
--- a/newlib/libc/machine/msp430/setjmp.S
+++ b/newlib/libc/machine/msp430/setjmp.S
@@ -60,6 +60,7 @@ setjmp:
clr r12
ret
#endif
+ .size setjmp , . - setjmp
.global longjmp
@@ -102,4 +103,5 @@ longjmp:
add.w #2, r1
mov.w r14, r0
#endif
+ .size longjmp , . - longjmp
diff --git a/newlib/libc/machine/mt/configure b/newlib/libc/machine/mt/configure
index 7f4d0d6df..bc041896f 100755
--- a/newlib/libc/machine/mt/configure
+++ b/newlib/libc/machine/mt/configure
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.68 for newlib 2.0.0.
+# Generated by GNU Autoconf 2.68 for newlib 2.4.0.
#
#
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
@@ -556,8 +556,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='newlib'
PACKAGE_TARNAME='newlib'
-PACKAGE_VERSION='2.0.0'
-PACKAGE_STRING='newlib 2.0.0'
+PACKAGE_VERSION='2.4.0'
+PACKAGE_STRING='newlib 2.4.0'
PACKAGE_BUGREPORT=''
PACKAGE_URL=''
@@ -1239,7 +1239,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures newlib 2.0.0 to adapt to many kinds of systems.
+\`configure' configures newlib 2.4.0 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1309,7 +1309,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of newlib 2.0.0:";;
+ short | recursive ) echo "Configuration of newlib 2.4.0:";;
esac
cat <<\_ACEOF
@@ -1400,7 +1400,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-newlib configure 2.0.0
+newlib configure 2.4.0
generated by GNU Autoconf 2.68
Copyright (C) 2010 Free Software Foundation, Inc.
@@ -1455,7 +1455,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by newlib $as_me 2.0.0, which was
+It was created by newlib $as_me 2.4.0, which was
generated by GNU Autoconf 2.68. Invocation command line was
$ $0 $@
@@ -2527,7 +2527,7 @@ fi
# Define the identity of the package.
PACKAGE='newlib'
- VERSION='2.0.0'
+ VERSION='2.4.0'
# Some tools Automake needs.
@@ -4007,7 +4007,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by newlib $as_me 2.0.0, which was
+This file was extended by newlib $as_me 2.4.0, which was
generated by GNU Autoconf 2.68. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -4064,7 +4064,7 @@ _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
-newlib config.status 2.0.0
+newlib config.status 2.4.0
configured by $0, generated by GNU Autoconf 2.68,
with options \\"\$ac_cs_config\\"
diff --git a/newlib/libc/machine/nds32/Makefile.am b/newlib/libc/machine/nds32/Makefile.am
index fa96ccd07..8abd7306b 100644
--- a/newlib/libc/machine/nds32/Makefile.am
+++ b/newlib/libc/machine/nds32/Makefile.am
@@ -8,7 +8,11 @@ AM_CCASFLAGS = $(INCLUDES)
noinst_LIBRARIES = lib.a
+if IS_NDS32_ISA_V3M
+lib_a_SOURCES = abort.c setjmp.S strcmp.S strcpy.S
+else
lib_a_SOURCES = abort.c memcpy.S memset.S setjmp.S strcmp.S strcpy.S
+endif
lib_a_CCASFLAGS=$(AM_CCASFLAGS)
lib_a_CFLAGS = $(AM_CFLAGS)
diff --git a/newlib/libc/machine/nds32/Makefile.in b/newlib/libc/machine/nds32/Makefile.in
index a70705caa..276d1d350 100644
--- a/newlib/libc/machine/nds32/Makefile.in
+++ b/newlib/libc/machine/nds32/Makefile.in
@@ -69,9 +69,16 @@ LIBRARIES = $(noinst_LIBRARIES)
ARFLAGS = cru
lib_a_AR = $(AR) $(ARFLAGS)
lib_a_LIBADD =
-am_lib_a_OBJECTS = lib_a-abort.$(OBJEXT) lib_a-memcpy.$(OBJEXT) \
- lib_a-memset.$(OBJEXT) lib_a-setjmp.$(OBJEXT) \
- lib_a-strcmp.$(OBJEXT) lib_a-strcpy.$(OBJEXT)
+@IS_NDS32_ISA_V3M_FALSE@am_lib_a_OBJECTS = lib_a-abort.$(OBJEXT) \
+@IS_NDS32_ISA_V3M_FALSE@ lib_a-memcpy.$(OBJEXT) \
+@IS_NDS32_ISA_V3M_FALSE@ lib_a-memset.$(OBJEXT) \
+@IS_NDS32_ISA_V3M_FALSE@ lib_a-setjmp.$(OBJEXT) \
+@IS_NDS32_ISA_V3M_FALSE@ lib_a-strcmp.$(OBJEXT) \
+@IS_NDS32_ISA_V3M_FALSE@ lib_a-strcpy.$(OBJEXT)
+@IS_NDS32_ISA_V3M_TRUE@am_lib_a_OBJECTS = lib_a-abort.$(OBJEXT) \
+@IS_NDS32_ISA_V3M_TRUE@ lib_a-setjmp.$(OBJEXT) \
+@IS_NDS32_ISA_V3M_TRUE@ lib_a-strcmp.$(OBJEXT) \
+@IS_NDS32_ISA_V3M_TRUE@ lib_a-strcpy.$(OBJEXT)
lib_a_OBJECTS = $(am_lib_a_OBJECTS)
DEFAULT_INCLUDES = -I.@am__isrc@
depcomp =
@@ -102,12 +109,15 @@ CC = @CC@
CCAS = @CCAS@
CCASFLAGS = @CCASFLAGS@
CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPPFLAGS = @CPPFLAGS@
CYGPATH_W = @CYGPATH_W@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
+EXEEXT = @EXEEXT@
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
@@ -141,6 +151,7 @@ abs_builddir = @abs_builddir@
abs_srcdir = @abs_srcdir@
abs_top_builddir = @abs_top_builddir@
abs_top_srcdir = @abs_top_srcdir@
+ac_ct_CC = @ac_ct_CC@
aext = @aext@
am__include = @am__include@
am__leading_dot = @am__leading_dot@
@@ -197,7 +208,8 @@ AUTOMAKE_OPTIONS = cygnus
INCLUDES = $(NEWLIB_CFLAGS) $(CROSS_CFLAGS) $(TARGET_CFLAGS)
AM_CCASFLAGS = $(INCLUDES)
noinst_LIBRARIES = lib.a
-lib_a_SOURCES = abort.c memcpy.S memset.S setjmp.S strcmp.S strcpy.S
+@IS_NDS32_ISA_V3M_FALSE@lib_a_SOURCES = abort.c memcpy.S memset.S setjmp.S strcmp.S strcpy.S
+@IS_NDS32_ISA_V3M_TRUE@lib_a_SOURCES = abort.c setjmp.S strcmp.S strcpy.S
lib_a_CCASFLAGS = $(AM_CCASFLAGS)
lib_a_CFLAGS = $(AM_CFLAGS)
ACLOCAL_AMFLAGS = -I ../../.. -I ../../../..
diff --git a/newlib/libc/machine/nds32/configure b/newlib/libc/machine/nds32/configure
index d96b7718a..f8dcbc31b 100755
--- a/newlib/libc/machine/nds32/configure
+++ b/newlib/libc/machine/nds32/configure
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.68 for newlib 2.0.0.
+# Generated by GNU Autoconf 2.68 for newlib 2.4.0.
#
#
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
@@ -556,14 +556,23 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='newlib'
PACKAGE_TARNAME='newlib'
-PACKAGE_VERSION='2.0.0'
-PACKAGE_STRING='newlib 2.0.0'
+PACKAGE_VERSION='2.4.0'
+PACKAGE_STRING='newlib 2.4.0'
PACKAGE_BUGREPORT=''
PACKAGE_URL=''
ac_unique_file="setjmp.S"
-ac_subst_vars='LTLIBOBJS
+ac_no_link=no
+ac_subst_vars='am__EXEEXT_FALSE
+am__EXEEXT_TRUE
+LTLIBOBJS
LIBOBJS
+IS_NDS32_ISA_V3M_FALSE
+IS_NDS32_ISA_V3M_TRUE
+EXEEXT
+ac_ct_CC
+CPPFLAGS
+CFLAGS
sys_dir
machine_dir
libm_machine_dir
@@ -696,7 +705,12 @@ enable_maintainer_mode
host_alias
target_alias
CCAS
-CCASFLAGS'
+CCASFLAGS
+CC
+CFLAGS
+LDFLAGS
+LIBS
+CPPFLAGS'
# Initialize some variables set by options.
@@ -1239,7 +1253,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures newlib 2.0.0 to adapt to many kinds of systems.
+\`configure' configures newlib 2.4.0 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1309,7 +1323,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of newlib 2.0.0:";;
+ short | recursive ) echo "Configuration of newlib 2.4.0:";;
esac
cat <<\_ACEOF
@@ -1333,6 +1347,13 @@ Optional Features:
Some influential environment variables:
CCAS assembler compiler command (defaults to CC)
CCASFLAGS assembler compiler flags (defaults to CFLAGS)
+ CC C compiler command
+ CFLAGS C compiler flags
+ LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
+ nonstandard directory <lib dir>
+ LIBS libraries to pass to the linker, e.g. -l<library>
+ CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
+ you have headers in a nonstandard directory <include dir>
Use these variables to override the choices made by `configure' or to help
it to find libraries and programs with nonstandard names/locations.
@@ -1400,7 +1421,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-newlib configure 2.0.0
+newlib configure 2.4.0
generated by GNU Autoconf 2.68
Copyright (C) 2010 Free Software Foundation, Inc.
@@ -1455,7 +1476,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by newlib $as_me 2.0.0, which was
+It was created by newlib $as_me 2.4.0, which was
generated by GNU Autoconf 2.68. Invocation command line was
$ $0 $@
@@ -2527,7 +2548,7 @@ fi
# Define the identity of the package.
PACKAGE='newlib'
- VERSION='2.0.0'
+ VERSION='2.4.0'
# Some tools Automake needs.
@@ -3410,6 +3431,1032 @@ OBJEXT=${oext}
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
+set dummy ${ac_tool_prefix}gcc; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_CC+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_CC="${ac_tool_prefix}gcc"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+$as_echo "$CC" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_CC"; then
+ ac_ct_CC=$CC
+ # Extract the first word of "gcc", so it can be a program name with args.
+set dummy gcc; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_CC+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_ct_CC"; then
+ ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_ac_ct_CC="gcc"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_CC=$ac_cv_prog_ac_ct_CC
+if test -n "$ac_ct_CC"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
+$as_echo "$ac_ct_CC" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+ if test "x$ac_ct_CC" = x; then
+ CC=""
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ CC=$ac_ct_CC
+ fi
+else
+ CC="$ac_cv_prog_CC"
+fi
+
+if test -z "$CC"; then
+ if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
+set dummy ${ac_tool_prefix}cc; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_CC+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_CC="${ac_tool_prefix}cc"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+$as_echo "$CC" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+ fi
+fi
+if test -z "$CC"; then
+ # Extract the first word of "cc", so it can be a program name with args.
+set dummy cc; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_CC+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+ ac_prog_rejected=no
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
+ ac_prog_rejected=yes
+ continue
+ fi
+ ac_cv_prog_CC="cc"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+if test $ac_prog_rejected = yes; then
+ # We found a bogon in the path, so make sure we never use it.
+ set dummy $ac_cv_prog_CC
+ shift
+ if test $# != 0; then
+ # We chose a different compiler from the bogus one.
+ # However, it has the same basename, so the bogon will be chosen
+ # first if we set CC to just the basename; use the full file name.
+ shift
+ ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
+ fi
+fi
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+$as_echo "$CC" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$CC"; then
+ if test -n "$ac_tool_prefix"; then
+ for ac_prog in cl.exe
+ do
+ # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
+set dummy $ac_tool_prefix$ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_CC+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+$as_echo "$CC" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+ test -n "$CC" && break
+ done
+fi
+if test -z "$CC"; then
+ ac_ct_CC=$CC
+ for ac_prog in cl.exe
+do
+ # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_CC+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_ct_CC"; then
+ ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_ac_ct_CC="$ac_prog"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_CC=$ac_cv_prog_ac_ct_CC
+if test -n "$ac_ct_CC"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
+$as_echo "$ac_ct_CC" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+ test -n "$ac_ct_CC" && break
+done
+
+ if test "x$ac_ct_CC" = x; then
+ CC=""
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ CC=$ac_ct_CC
+ fi
+fi
+
+fi
+
+
+test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "no acceptable C compiler found in \$PATH
+See \`config.log' for more details" "$LINENO" 5; }
+
+# Provide some information about the compiler.
+$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
+set X $ac_compile
+ac_compiler=$2
+for ac_option in --version -v -V -qversion; do
+ { { ac_try="$ac_compiler $ac_option >&5"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_compiler $ac_option >&5") 2>conftest.err
+ ac_status=$?
+ if test -s conftest.err; then
+ sed '10a\
+... rest of stderr output deleted ...
+ 10q' conftest.err >conftest.er1
+ cat conftest.er1 >&5
+ fi
+ rm -f conftest.er1 conftest.err
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }
+done
+
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if { { ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_link") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ ac_no_link=no
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+ac_clean_files_save=$ac_clean_files
+ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
+# Try to create an executable without -o first, disregard a.out.
+# It will help us diagnose broken compilers, and finding out an intuition
+# of exeext.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
+$as_echo_n "checking whether the C compiler works... " >&6; }
+ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
+
+# The possible output files:
+ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
+
+ac_rmfiles=
+for ac_file in $ac_files
+do
+ case $ac_file in
+ *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
+ * ) ac_rmfiles="$ac_rmfiles $ac_file";;
+ esac
+done
+rm -f $ac_rmfiles
+
+if { { ac_try="$ac_link_default"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_link_default") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then :
+ # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
+# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
+# in a Makefile. We should not override ac_cv_exeext if it was cached,
+# so that the user can short-circuit this test for compilers unknown to
+# Autoconf.
+for ac_file in $ac_files ''
+do
+ test -f "$ac_file" || continue
+ case $ac_file in
+ *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
+ ;;
+ [ab].out )
+ # We found the default executable, but exeext='' is most
+ # certainly right.
+ break;;
+ *.* )
+ if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
+ then :; else
+ ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
+ fi
+ # We set ac_cv_exeext here because the later test for it is not
+ # safe: cross compilers may not add the suffix if given an `-o'
+ # argument, so we may need to know it at that point already.
+ # Even if this section looks crufty: it has the advantage of
+ # actually working.
+ break;;
+ * )
+ break;;
+ esac
+done
+test "$ac_cv_exeext" = no && ac_cv_exeext=
+
+else
+ ac_file=''
+fi
+if test -z "$ac_file"; then :
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+$as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error 77 "C compiler cannot create executables
+See \`config.log' for more details" "$LINENO" 5; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
+$as_echo_n "checking for C compiler default output file name... " >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
+$as_echo "$ac_file" >&6; }
+ac_exeext=$ac_cv_exeext
+
+rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
+ac_clean_files=$ac_clean_files_save
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
+$as_echo_n "checking for suffix of executables... " >&6; }
+if { { ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_link") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then :
+ # If both `conftest.exe' and `conftest' are `present' (well, observable)
+# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
+# work properly (i.e., refer to `conftest.exe'), while it won't with
+# `rm'.
+for ac_file in conftest.exe conftest conftest.*; do
+ test -f "$ac_file" || continue
+ case $ac_file in
+ *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
+ *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
+ break;;
+ * ) break;;
+ esac
+done
+else
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "cannot compute suffix of executables: cannot compile and link
+See \`config.log' for more details" "$LINENO" 5; }
+fi
+rm -f conftest conftest$ac_cv_exeext
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
+$as_echo "$ac_cv_exeext" >&6; }
+
+rm -f conftest.$ac_ext
+EXEEXT=$ac_cv_exeext
+ac_exeext=$EXEEXT
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <stdio.h>
+int
+main ()
+{
+FILE *f = fopen ("conftest.out", "w");
+ return ferror (f) || fclose (f) != 0;
+
+ ;
+ return 0;
+}
+_ACEOF
+ac_clean_files="$ac_clean_files conftest.out"
+# Check that the compiler produces executables we can run. If not, either
+# the compiler is broken, or we cross compile.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
+$as_echo_n "checking whether we are cross compiling... " >&6; }
+if test "$cross_compiling" != yes; then
+ { { ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_link") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }
+ if { ac_try='./conftest$ac_cv_exeext'
+ { { case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_try") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; }; then
+ cross_compiling=no
+ else
+ if test "$cross_compiling" = maybe; then
+ cross_compiling=yes
+ else
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "cannot run C compiled programs.
+If you meant to cross compile, use \`--host'.
+See \`config.log' for more details" "$LINENO" 5; }
+ fi
+ fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
+$as_echo "$cross_compiling" >&6; }
+
+rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
+ac_clean_files=$ac_clean_files_save
+
+else
+ rm -f -r a.out a.exe b.out conftest.$ac_ext conftest.o conftest.obj conftest.dSYM
+ ac_no_link=yes
+ # Setting cross_compile will disable run tests; it will
+ # also disable AC_CHECK_FILE but that's generally
+ # correct if we can't link.
+ cross_compiling=yes
+ EXEEXT=
+ # Check that the compiler produces executables we can run. If not, either
+# the compiler is broken, or we cross compile.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
+$as_echo_n "checking whether we are cross compiling... " >&6; }
+if test "$cross_compiling" != yes; then
+ { { ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_link") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }
+ if { ac_try='./conftest$ac_cv_exeext'
+ { { case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_try") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; }; then
+ cross_compiling=no
+ else
+ if test "$cross_compiling" = maybe; then
+ cross_compiling=yes
+ else
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "cannot run C compiled programs.
+If you meant to cross compile, use \`--host'.
+See \`config.log' for more details" "$LINENO" 5; }
+ fi
+ fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
+$as_echo "$cross_compiling" >&6; }
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
+$as_echo_n "checking for suffix of object files... " >&6; }
+if ${ac_cv_objext+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.o conftest.obj
+if { { ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_compile") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then :
+ for ac_file in conftest.o conftest.obj conftest.*; do
+ test -f "$ac_file" || continue;
+ case $ac_file in
+ *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
+ *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
+ break;;
+ esac
+done
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "cannot compute suffix of object files: cannot compile
+See \`config.log' for more details" "$LINENO" 5; }
+fi
+rm -f conftest.$ac_cv_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
+$as_echo "$ac_cv_objext" >&6; }
+OBJEXT=$ac_cv_objext
+ac_objext=$OBJEXT
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
+$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
+if ${ac_cv_c_compiler_gnu+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+#ifndef __GNUC__
+ choke me
+#endif
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ ac_compiler_gnu=yes
+else
+ ac_compiler_gnu=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ac_cv_c_compiler_gnu=$ac_compiler_gnu
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
+$as_echo "$ac_cv_c_compiler_gnu" >&6; }
+if test $ac_compiler_gnu = yes; then
+ GCC=yes
+else
+ GCC=
+fi
+ac_test_CFLAGS=${CFLAGS+set}
+ac_save_CFLAGS=$CFLAGS
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
+$as_echo_n "checking whether $CC accepts -g... " >&6; }
+if ${ac_cv_prog_cc_g+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_save_c_werror_flag=$ac_c_werror_flag
+ ac_c_werror_flag=yes
+ ac_cv_prog_cc_g=no
+ CFLAGS="-g"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ ac_cv_prog_cc_g=yes
+else
+ CFLAGS=""
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+
+else
+ ac_c_werror_flag=$ac_save_c_werror_flag
+ CFLAGS="-g"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ ac_cv_prog_cc_g=yes
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ ac_c_werror_flag=$ac_save_c_werror_flag
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
+$as_echo "$ac_cv_prog_cc_g" >&6; }
+if test "$ac_test_CFLAGS" = set; then
+ CFLAGS=$ac_save_CFLAGS
+elif test $ac_cv_prog_cc_g = yes; then
+ if test "$GCC" = yes; then
+ CFLAGS="-g -O2"
+ else
+ CFLAGS="-g"
+ fi
+else
+ if test "$GCC" = yes; then
+ CFLAGS="-O2"
+ else
+ CFLAGS=
+ fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
+$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
+if ${ac_cv_prog_cc_c89+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_cv_prog_cc_c89=no
+ac_save_CC=$CC
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <stdarg.h>
+#include <stdio.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
+struct buf { int x; };
+FILE * (*rcsopen) (struct buf *, struct stat *, int);
+static char *e (p, i)
+ char **p;
+ int i;
+{
+ return p[i];
+}
+static char *f (char * (*g) (char **, int), char **p, ...)
+{
+ char *s;
+ va_list v;
+ va_start (v,p);
+ s = g (p, va_arg (v,int));
+ va_end (v);
+ return s;
+}
+
+/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
+ function prototypes and stuff, but not '\xHH' hex character constants.
+ These don't provoke an error unfortunately, instead are silently treated
+ as 'x'. The following induces an error, until -std is added to get
+ proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
+ array size at least. It's necessary to write '\x00'==0 to get something
+ that's true only with -std. */
+int osf4_cc_array ['\x00' == 0 ? 1 : -1];
+
+/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
+ inside strings and character constants. */
+#define FOO(x) 'x'
+int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
+
+int test (int i, double x);
+struct s1 {int (*f) (int a);};
+struct s2 {int (*f) (double a);};
+int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
+int argc;
+char **argv;
+int
+main ()
+{
+return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
+ ;
+ return 0;
+}
+_ACEOF
+for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
+ -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
+do
+ CC="$ac_save_CC $ac_arg"
+ if ac_fn_c_try_compile "$LINENO"; then :
+ ac_cv_prog_cc_c89=$ac_arg
+fi
+rm -f core conftest.err conftest.$ac_objext
+ test "x$ac_cv_prog_cc_c89" != "xno" && break
+done
+rm -f conftest.$ac_ext
+CC=$ac_save_CC
+
+fi
+# AC_CACHE_VAL
+case "x$ac_cv_prog_cc_c89" in
+ x)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
+$as_echo "none needed" >&6; } ;;
+ xno)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
+$as_echo "unsupported" >&6; } ;;
+ *)
+ CC="$CC $ac_cv_prog_cc_c89"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
+$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
+esac
+if test "x$ac_cv_prog_cc_c89" != xno; then :
+
+fi
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+depcc="$CC" am_compiler_list=
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
+$as_echo_n "checking dependency style of $depcc... " >&6; }
+if ${am_cv_CC_dependencies_compiler_type+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
+ # We make a subdir and do the tests there. Otherwise we can end up
+ # making bogus files that we don't know about and never remove. For
+ # instance it was reported that on HP-UX the gcc test will end up
+ # making a dummy file named `D' -- because `-MD' means `put the output
+ # in D'.
+ rm -rf conftest.dir
+ mkdir conftest.dir
+ # Copy depcomp to subdir because otherwise we won't find it if we're
+ # using a relative directory.
+ cp "$am_depcomp" conftest.dir
+ cd conftest.dir
+ # We will build objects and dependencies in a subdirectory because
+ # it helps to detect inapplicable dependency modes. For instance
+ # both Tru64's cc and ICC support -MD to output dependencies as a
+ # side effect of compilation, but ICC will put the dependencies in
+ # the current directory while Tru64 will put them in the object
+ # directory.
+ mkdir sub
+
+ am_cv_CC_dependencies_compiler_type=none
+ if test "$am_compiler_list" = ""; then
+ am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
+ fi
+ am__universal=false
+ case " $depcc " in #(
+ *\ -arch\ *\ -arch\ *) am__universal=true ;;
+ esac
+
+ for depmode in $am_compiler_list; do
+ # Setup a source with many dependencies, because some compilers
+ # like to wrap large dependency lists on column 80 (with \), and
+ # we should not choose a depcomp mode which is confused by this.
+ #
+ # We need to recreate these files for each test, as the compiler may
+ # overwrite some of them when testing with obscure command lines.
+ # This happens at least with the AIX C compiler.
+ : > sub/conftest.c
+ for i in 1 2 3 4 5 6; do
+ echo '#include "conftst'$i'.h"' >> sub/conftest.c
+ # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
+ # Solaris 8's {/usr,}/bin/sh.
+ touch sub/conftst$i.h
+ done
+ echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
+
+ # We check with `-c' and `-o' for the sake of the "dashmstdout"
+ # mode. It turns out that the SunPro C++ compiler does not properly
+ # handle `-M -o', and we need to detect this. Also, some Intel
+ # versions had trouble with output in subdirs
+ am__obj=sub/conftest.${OBJEXT-o}
+ am__minus_obj="-o $am__obj"
+ case $depmode in
+ gcc)
+ # This depmode causes a compiler race in universal mode.
+ test "$am__universal" = false || continue
+ ;;
+ nosideeffect)
+ # after this tag, mechanisms are not by side-effect, so they'll
+ # only be used when explicitly requested
+ if test "x$enable_dependency_tracking" = xyes; then
+ continue
+ else
+ break
+ fi
+ ;;
+ msvc7 | msvc7msys | msvisualcpp | msvcmsys)
+ # This compiler won't grok `-c -o', but also, the minuso test has
+ # not run yet. These depmodes are late enough in the game, and
+ # so weak that their functioning should not be impacted.
+ am__obj=conftest.${OBJEXT-o}
+ am__minus_obj=
+ ;;
+ none) break ;;
+ esac
+ if depmode=$depmode \
+ source=sub/conftest.c object=$am__obj \
+ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
+ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
+ >/dev/null 2>conftest.err &&
+ grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
+ grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
+ grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
+ ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
+ # icc doesn't choke on unknown options, it will just issue warnings
+ # or remarks (even with -Werror). So we grep stderr for any message
+ # that says an option was ignored or not supported.
+ # When given -MP, icc 7.0 and 7.1 complain thusly:
+ # icc: Command line warning: ignoring option '-M'; no argument required
+ # The diagnosis changed in icc 8.0:
+ # icc: Command line remark: option '-MP' not supported
+ if (grep 'ignoring option' conftest.err ||
+ grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
+ am_cv_CC_dependencies_compiler_type=$depmode
+ break
+ fi
+ fi
+ done
+
+ cd ..
+ rm -rf conftest.dir
+else
+ am_cv_CC_dependencies_compiler_type=none
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
+$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; }
+CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
+
+ if
+ test "x$enable_dependency_tracking" != xno \
+ && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then
+ am__fastdepCC_TRUE=
+ am__fastdepCC_FALSE='#'
+else
+ am__fastdepCC_TRUE='#'
+ am__fastdepCC_FALSE=
+fi
+
+
+
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#ifdef __NDS32_ISA_V3M__
+warning: This is nds32_isa_v3m.
+#endif
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ is_nds32_isa_v3m="no"
+else
+ is_nds32_isa_v3m="yes"
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ if test "$is_nds32_isa_v3m" = "yes"; then
+ IS_NDS32_ISA_V3M_TRUE=
+ IS_NDS32_ISA_V3M_FALSE='#'
+else
+ IS_NDS32_ISA_V3M_TRUE='#'
+ IS_NDS32_ISA_V3M_FALSE=
+fi
+
+
+
ac_config_files="$ac_config_files Makefile"
cat >confcache <<\_ACEOF
@@ -3561,6 +4608,13 @@ if test -z "${MAY_SUPPLY_SYSCALLS_TRUE}" && test -z "${MAY_SUPPLY_SYSCALLS_FALSE
as_fn_error $? "conditional \"MAY_SUPPLY_SYSCALLS\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
+ if test -n "$EXEEXT"; then
+ am__EXEEXT_TRUE=
+ am__EXEEXT_FALSE='#'
+else
+ am__EXEEXT_TRUE='#'
+ am__EXEEXT_FALSE=
+fi
if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then
as_fn_error $? "conditional \"AMDEP\" was never defined.
@@ -3598,6 +4652,14 @@ if test -z "${USE_LIBTOOL_TRUE}" && test -z "${USE_LIBTOOL_FALSE}"; then
as_fn_error $? "conditional \"USE_LIBTOOL\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
+if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
+ as_fn_error $? "conditional \"am__fastdepCC\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${IS_NDS32_ISA_V3M_TRUE}" && test -z "${IS_NDS32_ISA_V3M_FALSE}"; then
+ as_fn_error $? "conditional \"IS_NDS32_ISA_V3M\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
: "${CONFIG_STATUS=./config.status}"
ac_write_fail=0
@@ -4007,7 +5069,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by newlib $as_me 2.0.0, which was
+This file was extended by newlib $as_me 2.4.0, which was
generated by GNU Autoconf 2.68. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -4064,7 +5126,7 @@ _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
-newlib config.status 2.0.0
+newlib config.status 2.4.0
configured by $0, generated by GNU Autoconf 2.68,
with options \\"\$ac_cs_config\\"
diff --git a/newlib/libc/machine/nds32/configure.in b/newlib/libc/machine/nds32/configure.in
index 781e93936..7b1a073ec 100644
--- a/newlib/libc/machine/nds32/configure.in
+++ b/newlib/libc/machine/nds32/configure.in
@@ -10,5 +10,17 @@ AC_CONFIG_AUX_DIR(../../../..)
NEWLIB_CONFIGURE(../../..)
+dnl Use builtin macro to detect if this is for "AndeStar ISA V3m".
+AC_NO_EXECUTABLES
+AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
+[[#ifdef __NDS32_ISA_V3M__
+warning: This is nds32_isa_v3m.
+#endif
+]])],
+ [is_nds32_isa_v3m="no"],
+ [is_nds32_isa_v3m="yes"])
+AM_CONDITIONAL(IS_NDS32_ISA_V3M, test "$is_nds32_isa_v3m" = "yes")
+
+
AC_CONFIG_FILES([Makefile])
AC_OUTPUT
diff --git a/newlib/libc/machine/nds32/setjmp.S b/newlib/libc/machine/nds32/setjmp.S
index 90b162ef8..7197c86f3 100644
--- a/newlib/libc/machine/nds32/setjmp.S
+++ b/newlib/libc/machine/nds32/setjmp.S
@@ -40,7 +40,9 @@ The usage of thirty-two 32-bit General Purpose Registers (GPR):
reserved for assembler : $r15
reserved for other use : $r24, $r25, $r26, $r27
-Save all callee-save registers and $fp, $gp, $lp and $sp.
+Save all callee-save registers and $fp, $gp, $lp and $sp is enough in theory.
+For debugging issue, the layout of jum_buf in here should be in sync with GDB.
+The $r16 ~ $r19 are used to store D0/D1, keep them for backward-compatible.
*/
/* int setjmp(jmp_buf env); */
@@ -49,14 +51,53 @@ Save all callee-save registers and $fp, $gp, $lp and $sp.
.global setjmp
.type setjmp, @function
setjmp:
-#ifdef __NDS32_REDUCED_REGS__
- /* This case, save 10 words. */
- smw.bim $r6, [$r0], $r10, 0x0
- smw.bim $r31, [$r0], $r31, 0xf
+#if __NDS32_REDUCED_REGS__
+ smw.bim $r6, [$r0], $r10, #0b0000
+ addi $r0, $r0, #32 /* Leave room to keep jum_buf all the same. */
+ smw.bim $r31, [$r0], $r31, #0b1111
#else
- /* This case, save 17 words. */
- smw.bim $r6, [$r0], $r14, 0x0
- smw.bim $r16, [$r0], $r19, 0xf
+ smw.bim $r6, [$r0], $r14, #0b0000
+ smw.bim $r16, [$r0], $r19, #0b1111
+#endif
+
+#if __NDS32_EXT_FPU_SP__ || __NDS32_EXT_FPU_DP__
+
+ /* Extract $fpcfg.freg (b[3:2]), then save into jmp_buf. */
+ fmfcfg $r2
+ slli $r2, $r2, #28
+ srli $r2, $r2, #30
+ swi.bi $r2, [$r0], #4
+
+ /* Make sure $r0 is double-word-aligned. */
+ addi $r0, $r0, #7
+ bitci $r0, $r0, #7
+
+ /* Case switch according to $fpcfg.freg */
+ beqz $r2, .LCFG0_save /* Branch if $fpcfg.freg = 0b00. */
+ xori $r15, $r2, #0b10
+ beqz $r15, .LCFG2_save /* Branch $fpcfg.freg = 0b10. */
+ srli $r2, $r2, #0b01
+ beqz $r2, .LCFG1_save /* Branch if $fpcfg.freg = 0b01. */
+ /* Fall-through if $fpcfg.freg = 0b11. */
+.LCFG3_save:
+ fsdi.bi $fd31, [$r0], #8
+ fsdi.bi $fd29, [$r0], #8
+ fsdi.bi $fd27, [$r0], #8
+ fsdi.bi $fd25, [$r0], #8
+ fsdi.bi $fd23, [$r0], #8
+ fsdi.bi $fd21, [$r0], #8
+ fsdi.bi $fd19, [$r0], #8
+ fsdi.bi $fd17, [$r0], #8
+.LCFG2_save:
+ fsdi.bi $fd15, [$r0], #8
+ fsdi.bi $fd13, [$r0], #8
+ fsdi.bi $fd11, [$r0], #8
+ fsdi.bi $fd9, [$r0], #8
+.LCFG1_save:
+ fsdi.bi $fd7, [$r0], #8
+ fsdi.bi $fd5, [$r0], #8
+.LCFG0_save:
+ fsdi.bi $fd3, [$r0], #8
#endif
/* Set return value to zero. */
@@ -71,17 +112,55 @@ setjmp:
.global longjmp
.type longjmp, @function
longjmp:
-#ifdef __NDS32_REDUCED_REGS__
- lmw.bim $r6, [$r0], $r10, 0x0
- lmw.bim $r31, [$r0], $r31, 0xf
+#if __NDS32_REDUCED_REGS__
+ lmw.bim $r6, [$r0], $r10, #0b0000
+ addi $r0, $r0, #32
+ lmw.bim $r31, [$r0], $r31, #0b1111
#else
- lmw.bim $r6, [$r0], $r14, 0x0
- lmw.bim $r16, [$r0], $r19, 0xf
+ lmw.bim $r6, [$r0], $r14, #0b0000
+ lmw.bim $r16, [$r0], $r19, #0b1111
#endif
- /* If the value val is 0, 1 will be returned instead. */
- bnez $r1, 1f
- movi $r1, 1
-1:
- move $r0, $r1
+
+#if __NDS32_EXT_FPU_SP__ || __NDS32_EXT_FPU_DP__
+
+ /* Restore value of $fpcfg.freg (b[3:2]). */
+ lwi.bi $r2, [$r0], #4
+
+ /* Make sure $r0 is double-word-aligned. */
+ addi $r0, $r0, #7
+ bitci $r0, $r0, #7
+
+ /* Case switch according to $fpcfg.freg */
+ beqz $r2, .LCFG0_restore /* Branch if $fpcfg.freg = 0b00. */
+ xori $r15, $r2, #0b10
+ beqz $r15, .LCFG2_restore /* Branch $fpcfg.freg = 0b10. */
+ srli $r2, $r2, #0b01
+ beqz $r2, .LCFG1_restore /* Branch if $fpcfg.freg = 0b01. */
+ /* Fall-through if $fpcfg.freg = 0b11. */
+.LCFG3_restore:
+ fldi.bi $fd31, [$r0], #8
+ fldi.bi $fd29, [$r0], #8
+ fldi.bi $fd27, [$r0], #8
+ fldi.bi $fd25, [$r0], #8
+ fldi.bi $fd23, [$r0], #8
+ fldi.bi $fd21, [$r0], #8
+ fldi.bi $fd19, [$r0], #8
+ fldi.bi $fd17, [$r0], #8
+.LCFG2_restore:
+ fldi.bi $fd15, [$r0], #8
+ fldi.bi $fd13, [$r0], #8
+ fldi.bi $fd11, [$r0], #8
+ fldi.bi $fd9, [$r0], #8
+.LCFG1_restore:
+ fldi.bi $fd7, [$r0], #8
+ fldi.bi $fd5, [$r0], #8
+.LCFG0_restore:
+ fldi.bi $fd3, [$r0], #8
+#endif
+
+ /* Set val as return value. If the value val is 0, 1 will be returned
+ instead. */
+ movi $r0, 1
+ cmovn $r0, $r1, $r1 /* r0=(r1!=0)? r1: r0 */
ret
.size longjmp, .-longjmp
diff --git a/newlib/libc/machine/necv70/configure b/newlib/libc/machine/necv70/configure
index 05654d47b..f61061fc4 100755
--- a/newlib/libc/machine/necv70/configure
+++ b/newlib/libc/machine/necv70/configure
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.68 for newlib 2.0.0.
+# Generated by GNU Autoconf 2.68 for newlib 2.4.0.
#
#
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
@@ -556,8 +556,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='newlib'
PACKAGE_TARNAME='newlib'
-PACKAGE_VERSION='2.0.0'
-PACKAGE_STRING='newlib 2.0.0'
+PACKAGE_VERSION='2.4.0'
+PACKAGE_STRING='newlib 2.4.0'
PACKAGE_BUGREPORT=''
PACKAGE_URL=''
@@ -1239,7 +1239,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures newlib 2.0.0 to adapt to many kinds of systems.
+\`configure' configures newlib 2.4.0 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1309,7 +1309,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of newlib 2.0.0:";;
+ short | recursive ) echo "Configuration of newlib 2.4.0:";;
esac
cat <<\_ACEOF
@@ -1400,7 +1400,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-newlib configure 2.0.0
+newlib configure 2.4.0
generated by GNU Autoconf 2.68
Copyright (C) 2010 Free Software Foundation, Inc.
@@ -1455,7 +1455,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by newlib $as_me 2.0.0, which was
+It was created by newlib $as_me 2.4.0, which was
generated by GNU Autoconf 2.68. Invocation command line was
$ $0 $@
@@ -2527,7 +2527,7 @@ fi
# Define the identity of the package.
PACKAGE='newlib'
- VERSION='2.0.0'
+ VERSION='2.4.0'
# Some tools Automake needs.
@@ -4007,7 +4007,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by newlib $as_me 2.0.0, which was
+This file was extended by newlib $as_me 2.4.0, which was
generated by GNU Autoconf 2.68. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -4064,7 +4064,7 @@ _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
-newlib config.status 2.0.0
+newlib config.status 2.4.0
configured by $0, generated by GNU Autoconf 2.68,
with options \\"\$ac_cs_config\\"
diff --git a/newlib/libc/machine/nios2/configure b/newlib/libc/machine/nios2/configure
index 3f2298389..be45d2a53 100755
--- a/newlib/libc/machine/nios2/configure
+++ b/newlib/libc/machine/nios2/configure
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.68 for newlib 2.0.0.
+# Generated by GNU Autoconf 2.68 for newlib 2.4.0.
#
#
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
@@ -556,8 +556,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='newlib'
PACKAGE_TARNAME='newlib'
-PACKAGE_VERSION='2.0.0'
-PACKAGE_STRING='newlib 2.0.0'
+PACKAGE_VERSION='2.4.0'
+PACKAGE_STRING='newlib 2.4.0'
PACKAGE_BUGREPORT=''
PACKAGE_URL=''
@@ -1239,7 +1239,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures newlib 2.0.0 to adapt to many kinds of systems.
+\`configure' configures newlib 2.4.0 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1309,7 +1309,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of newlib 2.0.0:";;
+ short | recursive ) echo "Configuration of newlib 2.4.0:";;
esac
cat <<\_ACEOF
@@ -1400,7 +1400,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-newlib configure 2.0.0
+newlib configure 2.4.0
generated by GNU Autoconf 2.68
Copyright (C) 2010 Free Software Foundation, Inc.
@@ -1455,7 +1455,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by newlib $as_me 2.0.0, which was
+It was created by newlib $as_me 2.4.0, which was
generated by GNU Autoconf 2.68. Invocation command line was
$ $0 $@
@@ -2527,7 +2527,7 @@ fi
# Define the identity of the package.
PACKAGE='newlib'
- VERSION='2.0.0'
+ VERSION='2.4.0'
# Some tools Automake needs.
@@ -4007,7 +4007,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by newlib $as_me 2.0.0, which was
+This file was extended by newlib $as_me 2.4.0, which was
generated by GNU Autoconf 2.68. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -4064,7 +4064,7 @@ _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
-newlib config.status 2.0.0
+newlib config.status 2.4.0
configured by $0, generated by GNU Autoconf 2.68,
with options \\"\$ac_cs_config\\"
diff --git a/newlib/libc/machine/or1k/Makefile.am b/newlib/libc/machine/or1k/Makefile.am
new file mode 100644
index 000000000..5b78bc171
--- /dev/null
+++ b/newlib/libc/machine/or1k/Makefile.am
@@ -0,0 +1,16 @@
+## Process this file with automake to generate Makefile.in
+
+AUTOMAKE_OPTIONS = cygnus
+
+INCLUDES = $(NEWLIB_CFLAGS) $(CROSS_CFLAGS) $(TARGET_CFLAGS)
+
+AM_CCASFLAGS = $(INCLUDES)
+
+noinst_LIBRARIES = lib.a
+
+lib_a_SOURCES = setjmp.S
+lib_a_CCASFLAGS=$(AM_CCASFLAGS)
+lib_a_CFLAGS=$(AM_CFLAGS)
+
+ACLOCAL_AMFLAGS = -I ../../.. -I ../../../..
+CONFIG_STATUS_DEPENDENCIES = $(newlib_basedir)/configure.host
diff --git a/newlib/libc/machine/or1k/Makefile.in b/newlib/libc/machine/or1k/Makefile.in
new file mode 100644
index 000000000..465fb7f65
--- /dev/null
+++ b/newlib/libc/machine/or1k/Makefile.in
@@ -0,0 +1,440 @@
+# Makefile.in generated by automake 1.11.6 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 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@
+
+VPATH = @srcdir@
+am__make_dryrun = \
+ { \
+ am__dry=no; \
+ case $$MAKEFLAGS in \
+ *\\[\ \ ]*) \
+ echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \
+ | grep '^AM OK$$' >/dev/null || am__dry=yes;; \
+ *) \
+ for am__flg in $$MAKEFLAGS; do \
+ case $$am__flg in \
+ *=*|--*) ;; \
+ *n*) am__dry=yes; break;; \
+ esac; \
+ done;; \
+ esac; \
+ test $$am__dry = yes; \
+ }
+pkgdatadir = $(datadir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+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@
+subdir = .
+DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
+ $(top_srcdir)/configure $(am__configure_deps) \
+ $(srcdir)/../../../../mkinstalldirs
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/../../../acinclude.m4 \
+ $(top_srcdir)/configure.in
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+ $(ACLOCAL_M4)
+am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
+ configure.lineno config.status.lineno
+mkinstalldirs = $(SHELL) $(top_srcdir)/../../../../mkinstalldirs
+CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+LIBRARIES = $(noinst_LIBRARIES)
+ARFLAGS = cru
+lib_a_AR = $(AR) $(ARFLAGS)
+lib_a_LIBADD =
+am_lib_a_OBJECTS = lib_a-setjmp.$(OBJEXT)
+lib_a_OBJECTS = $(am_lib_a_OBJECTS)
+DEFAULT_INCLUDES = -I.@am__isrc@
+depcomp =
+am__depfiles_maybe =
+CPPASCOMPILE = $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CCASFLAGS) $(CCASFLAGS)
+COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+CCLD = $(CC)
+LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
+SOURCES = $(lib_a_SOURCES)
+am__can_run_installinfo = \
+ case $$AM_UPDATE_INFO_DIR in \
+ n|no|NO) false;; \
+ *) (install-info --version) >/dev/null 2>&1;; \
+ esac
+ETAGS = etags
+CTAGS = ctags
+ACLOCAL = @ACLOCAL@
+AMTAR = @AMTAR@
+AR = @AR@
+AS = @AS@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CC = @CC@
+CCAS = @CCAS@
+CCASFLAGS = @CCASFLAGS@
+CCDEPMODE = @CCDEPMODE@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LDFLAGS = @LDFLAGS@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LTLIBOBJS = @LTLIBOBJS@
+MAINT = @MAINT@
+MAKEINFO = @MAKEINFO@
+MKDIR_P = @MKDIR_P@
+NEWLIB_CFLAGS = @NEWLIB_CFLAGS@
+NO_INCLUDE_LIST = @NO_INCLUDE_LIST@
+OBJEXT = @OBJEXT@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+RANLIB = @RANLIB@
+READELF = @READELF@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+VERSION = @VERSION@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+aext = @aext@
+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@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+libm_machine_dir = @libm_machine_dir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+lpfx = @lpfx@
+machine_dir = @machine_dir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+newlib_basedir = @newlib_basedir@
+oext = @oext@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sys_dir = @sys_dir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+AUTOMAKE_OPTIONS = cygnus
+INCLUDES = $(NEWLIB_CFLAGS) $(CROSS_CFLAGS) $(TARGET_CFLAGS)
+AM_CCASFLAGS = $(INCLUDES)
+noinst_LIBRARIES = lib.a
+lib_a_SOURCES = setjmp.S
+lib_a_CCASFLAGS = $(AM_CCASFLAGS)
+lib_a_CFLAGS = $(AM_CFLAGS)
+ACLOCAL_AMFLAGS = -I ../../.. -I ../../../..
+CONFIG_STATUS_DEPENDENCIES = $(newlib_basedir)/configure.host
+all: all-am
+
+.SUFFIXES:
+.SUFFIXES: .S .o .obj
+am--refresh: Makefile
+ @:
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
+ @for dep in $?; do \
+ case '$(am__configure_deps)' in \
+ *$$dep*) \
+ echo ' cd $(srcdir) && $(AUTOMAKE) --cygnus'; \
+ $(am__cd) $(srcdir) && $(AUTOMAKE) --cygnus \
+ && exit 0; \
+ exit 1;; \
+ esac; \
+ done; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --cygnus Makefile'; \
+ $(am__cd) $(top_srcdir) && \
+ $(AUTOMAKE) --cygnus Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ @case '$?' in \
+ *config.status*) \
+ echo ' $(SHELL) ./config.status'; \
+ $(SHELL) ./config.status;; \
+ *) \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \
+ esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+ $(SHELL) ./config.status --recheck
+
+$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
+ $(am__cd) $(srcdir) && $(AUTOCONF)
+$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
+ $(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
+$(am__aclocal_m4_deps):
+
+clean-noinstLIBRARIES:
+ -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES)
+lib.a: $(lib_a_OBJECTS) $(lib_a_DEPENDENCIES) $(EXTRA_lib_a_DEPENDENCIES)
+ -rm -f lib.a
+ $(lib_a_AR) lib.a $(lib_a_OBJECTS) $(lib_a_LIBADD)
+ $(RANLIB) lib.a
+
+mostlyclean-compile:
+ -rm -f *.$(OBJEXT)
+
+distclean-compile:
+ -rm -f *.tab.c
+
+.S.o:
+ $(CPPASCOMPILE) -c -o $@ $<
+
+.S.obj:
+ $(CPPASCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
+
+lib_a-setjmp.o: setjmp.S
+ $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CCASFLAGS) $(CCASFLAGS) -c -o lib_a-setjmp.o `test -f 'setjmp.S' || echo '$(srcdir)/'`setjmp.S
+
+lib_a-setjmp.obj: setjmp.S
+ $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CCASFLAGS) $(CCASFLAGS) -c -o lib_a-setjmp.obj `if test -f 'setjmp.S'; then $(CYGPATH_W) 'setjmp.S'; else $(CYGPATH_W) '$(srcdir)/setjmp.S'; fi`
+
+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; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ mkid -fID $$unique
+tags: TAGS
+
+TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ set x; \
+ 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; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ shift; \
+ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
+ test -n "$$unique" || unique=$$empty_fix; \
+ if test $$# -gt 0; then \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ "$$@" $$unique; \
+ else \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ $$unique; \
+ fi; \
+ fi
+ctags: CTAGS
+CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ 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; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ test -z "$(CTAGS_ARGS)$$unique" \
+ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+ $$unique
+
+GTAGS:
+ here=`$(am__cd) $(top_builddir) && pwd` \
+ && $(am__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)
+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:
+ if test -z '$(STRIP)'; then \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ install; \
+ else \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
+ fi
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+ -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+ -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_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-noinstLIBRARIES mostlyclean-am
+
+distclean: distclean-am
+ -rm -f $(am__CONFIG_DISTCLEAN_FILES)
+ -rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+ distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+html-am:
+
+info: info-am
+
+info-am:
+
+install-data-am:
+
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
+install-exec-am:
+
+install-html: install-html-am
+
+install-html-am:
+
+install-info: install-info-am
+
+install-info-am:
+
+install-man:
+
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+ -rm -f $(am__CONFIG_DISTCLEAN_FILES)
+ -rm -rf $(top_srcdir)/autom4te.cache
+ -rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am:
+
+.MAKE: install-am install-strip
+
+.PHONY: CTAGS GTAGS all all-am am--refresh check check-am clean \
+ clean-generic clean-noinstLIBRARIES ctags distclean \
+ distclean-compile distclean-generic distclean-tags dvi dvi-am \
+ html html-am info info-am install install-am install-data \
+ install-data-am install-dvi install-dvi-am install-exec \
+ install-exec-am install-html install-html-am install-info \
+ install-info-am install-man install-pdf install-pdf-am \
+ install-ps install-ps-am install-strip installcheck \
+ installcheck-am installdirs maintainer-clean \
+ maintainer-clean-generic mostlyclean mostlyclean-compile \
+ mostlyclean-generic pdf pdf-am ps ps-am tags uninstall \
+ uninstall-am
+
+
+# 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/machine/or1k/aclocal.m4 b/newlib/libc/machine/or1k/aclocal.m4
new file mode 100644
index 000000000..18dab02aa
--- /dev/null
+++ b/newlib/libc/machine/or1k/aclocal.m4
@@ -0,0 +1,1012 @@
+# generated automatically by aclocal 1.11.6 -*- Autoconf -*-
+
+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
+# 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation,
+# Inc.
+# This file 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.
+
+m4_ifndef([AC_AUTOCONF_VERSION],
+ [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
+m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.68],,
+[m4_warning([this file was generated for autoconf 2.68.
+You have another version of autoconf. It may work, but is not guaranteed to.
+If you have problems, you may need to regenerate the build system entirely.
+To do so, use the procedure documented by the package, typically `autoreconf'.])])
+
+# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008, 2011 Free Software
+# Foundation, Inc.
+#
+# This file 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.
+
+# serial 1
+
+# AM_AUTOMAKE_VERSION(VERSION)
+# ----------------------------
+# Automake X.Y traces this macro to ensure aclocal.m4 has been
+# generated from the m4 files accompanying Automake X.Y.
+# (This private macro should not be called outside this file.)
+AC_DEFUN([AM_AUTOMAKE_VERSION],
+[am__api_version='1.11'
+dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
+dnl require some minimum version. Point them to the right macro.
+m4_if([$1], [1.11.6], [],
+ [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
+])
+
+# _AM_AUTOCONF_VERSION(VERSION)
+# -----------------------------
+# aclocal traces this macro to find the Autoconf version.
+# This is a private macro too. Using m4_define simplifies
+# the logic in aclocal, which can simply ignore this definition.
+m4_define([_AM_AUTOCONF_VERSION], [])
+
+# AM_SET_CURRENT_AUTOMAKE_VERSION
+# -------------------------------
+# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
+# This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
+AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
+[AM_AUTOMAKE_VERSION([1.11.6])dnl
+m4_ifndef([AC_AUTOCONF_VERSION],
+ [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
+_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
+
+# AM_AUX_DIR_EXPAND -*- Autoconf -*-
+
+# Copyright (C) 2001, 2003, 2005, 2011 Free Software Foundation, Inc.
+#
+# This file 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.
+
+# serial 1
+
+# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
+# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to
+# `$srcdir', `$srcdir/..', or `$srcdir/../..'.
+#
+# Of course, Automake must honor this variable whenever it calls a
+# tool from the auxiliary directory. The problem is that $srcdir (and
+# therefore $ac_aux_dir as well) can be either absolute or relative,
+# depending on how configure is run. This is pretty annoying, since
+# it makes $ac_aux_dir quite unusable in subdirectories: in the top
+# source directory, any form will work fine, but in subdirectories a
+# relative path needs to be adjusted first.
+#
+# $ac_aux_dir/missing
+# fails when called from a subdirectory if $ac_aux_dir is relative
+# $top_srcdir/$ac_aux_dir/missing
+# fails if $ac_aux_dir is absolute,
+# fails when called from a subdirectory in a VPATH build with
+# a relative $ac_aux_dir
+#
+# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
+# are both prefixed by $srcdir. In an in-source build this is usually
+# harmless because $srcdir is `.', but things will broke when you
+# start a VPATH build or use an absolute $srcdir.
+#
+# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
+# iff we strip the leading $srcdir from $ac_aux_dir. That would be:
+# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
+# and then we would define $MISSING as
+# MISSING="\${SHELL} $am_aux_dir/missing"
+# This will work as long as MISSING is not called from configure, because
+# unfortunately $(top_srcdir) has no meaning in configure.
+# However there are other variables, like CC, which are often used in
+# configure, and could therefore not use this "fixed" $ac_aux_dir.
+#
+# Another solution, used here, is to always expand $ac_aux_dir to an
+# absolute PATH. The drawback is that using absolute paths prevent a
+# configured tree to be moved without reconfiguration.
+
+AC_DEFUN([AM_AUX_DIR_EXPAND],
+[dnl Rely on autoconf to set up CDPATH properly.
+AC_PREREQ([2.50])dnl
+# expand $ac_aux_dir to an absolute path
+am_aux_dir=`cd $ac_aux_dir && pwd`
+])
+
+# AM_CONDITIONAL -*- Autoconf -*-
+
+# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008
+# Free Software Foundation, Inc.
+#
+# This file 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.
+
+# serial 9
+
+# AM_CONDITIONAL(NAME, SHELL-CONDITION)
+# -------------------------------------
+# Define a conditional.
+AC_DEFUN([AM_CONDITIONAL],
+[AC_PREREQ(2.52)dnl
+ ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])],
+ [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
+AC_SUBST([$1_TRUE])dnl
+AC_SUBST([$1_FALSE])dnl
+_AM_SUBST_NOTMAKE([$1_TRUE])dnl
+_AM_SUBST_NOTMAKE([$1_FALSE])dnl
+m4_define([_AM_COND_VALUE_$1], [$2])dnl
+if $2; then
+ $1_TRUE=
+ $1_FALSE='#'
+else
+ $1_TRUE='#'
+ $1_FALSE=
+fi
+AC_CONFIG_COMMANDS_PRE(
+[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
+ AC_MSG_ERROR([[conditional "$1" was never defined.
+Usually this means the macro was only invoked conditionally.]])
+fi])])
+
+# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009,
+# 2010, 2011 Free Software Foundation, Inc.
+#
+# This file 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.
+
+# serial 12
+
+# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
+# written in clear, in which case automake, when reading aclocal.m4,
+# will think it sees a *use*, and therefore will trigger all it's
+# C support machinery. Also note that it means that autoscan, seeing
+# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
+
+
+# _AM_DEPENDENCIES(NAME)
+# ----------------------
+# See how the compiler implements dependency checking.
+# NAME is "CC", "CXX", "GCJ", or "OBJC".
+# We try a few techniques and use that to set a single cache variable.
+#
+# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
+# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
+# dependency, and given that the user is not expected to run this macro,
+# just rely on AC_PROG_CC.
+AC_DEFUN([_AM_DEPENDENCIES],
+[AC_REQUIRE([AM_SET_DEPDIR])dnl
+AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
+AC_REQUIRE([AM_MAKE_INCLUDE])dnl
+AC_REQUIRE([AM_DEP_TRACK])dnl
+
+ifelse([$1], CC, [depcc="$CC" am_compiler_list=],
+ [$1], CXX, [depcc="$CXX" am_compiler_list=],
+ [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
+ [$1], UPC, [depcc="$UPC" am_compiler_list=],
+ [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'],
+ [depcc="$$1" am_compiler_list=])
+
+AC_CACHE_CHECK([dependency style of $depcc],
+ [am_cv_$1_dependencies_compiler_type],
+[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
+ # We make a subdir and do the tests there. Otherwise we can end up
+ # making bogus files that we don't know about and never remove. For
+ # instance it was reported that on HP-UX the gcc test will end up
+ # making a dummy file named `D' -- because `-MD' means `put the output
+ # in D'.
+ rm -rf conftest.dir
+ mkdir conftest.dir
+ # Copy depcomp to subdir because otherwise we won't find it if we're
+ # using a relative directory.
+ cp "$am_depcomp" conftest.dir
+ cd conftest.dir
+ # We will build objects and dependencies in a subdirectory because
+ # it helps to detect inapplicable dependency modes. For instance
+ # both Tru64's cc and ICC support -MD to output dependencies as a
+ # side effect of compilation, but ICC will put the dependencies in
+ # the current directory while Tru64 will put them in the object
+ # directory.
+ mkdir sub
+
+ am_cv_$1_dependencies_compiler_type=none
+ if test "$am_compiler_list" = ""; then
+ am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
+ fi
+ am__universal=false
+ m4_case([$1], [CC],
+ [case " $depcc " in #(
+ *\ -arch\ *\ -arch\ *) am__universal=true ;;
+ esac],
+ [CXX],
+ [case " $depcc " in #(
+ *\ -arch\ *\ -arch\ *) am__universal=true ;;
+ esac])
+
+ for depmode in $am_compiler_list; do
+ # Setup a source with many dependencies, because some compilers
+ # like to wrap large dependency lists on column 80 (with \), and
+ # we should not choose a depcomp mode which is confused by this.
+ #
+ # We need to recreate these files for each test, as the compiler may
+ # overwrite some of them when testing with obscure command lines.
+ # This happens at least with the AIX C compiler.
+ : > sub/conftest.c
+ for i in 1 2 3 4 5 6; do
+ echo '#include "conftst'$i'.h"' >> sub/conftest.c
+ # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
+ # Solaris 8's {/usr,}/bin/sh.
+ touch sub/conftst$i.h
+ done
+ echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
+
+ # We check with `-c' and `-o' for the sake of the "dashmstdout"
+ # mode. It turns out that the SunPro C++ compiler does not properly
+ # handle `-M -o', and we need to detect this. Also, some Intel
+ # versions had trouble with output in subdirs
+ am__obj=sub/conftest.${OBJEXT-o}
+ am__minus_obj="-o $am__obj"
+ case $depmode in
+ gcc)
+ # This depmode causes a compiler race in universal mode.
+ test "$am__universal" = false || continue
+ ;;
+ nosideeffect)
+ # after this tag, mechanisms are not by side-effect, so they'll
+ # only be used when explicitly requested
+ if test "x$enable_dependency_tracking" = xyes; then
+ continue
+ else
+ break
+ fi
+ ;;
+ msvc7 | msvc7msys | msvisualcpp | msvcmsys)
+ # This compiler won't grok `-c -o', but also, the minuso test has
+ # not run yet. These depmodes are late enough in the game, and
+ # so weak that their functioning should not be impacted.
+ am__obj=conftest.${OBJEXT-o}
+ am__minus_obj=
+ ;;
+ none) break ;;
+ esac
+ if depmode=$depmode \
+ source=sub/conftest.c object=$am__obj \
+ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
+ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
+ >/dev/null 2>conftest.err &&
+ grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
+ grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
+ grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
+ ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
+ # icc doesn't choke on unknown options, it will just issue warnings
+ # or remarks (even with -Werror). So we grep stderr for any message
+ # that says an option was ignored or not supported.
+ # When given -MP, icc 7.0 and 7.1 complain thusly:
+ # icc: Command line warning: ignoring option '-M'; no argument required
+ # The diagnosis changed in icc 8.0:
+ # icc: Command line remark: option '-MP' not supported
+ if (grep 'ignoring option' conftest.err ||
+ grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
+ am_cv_$1_dependencies_compiler_type=$depmode
+ break
+ fi
+ fi
+ done
+
+ cd ..
+ rm -rf conftest.dir
+else
+ am_cv_$1_dependencies_compiler_type=none
+fi
+])
+AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
+AM_CONDITIONAL([am__fastdep$1], [
+ test "x$enable_dependency_tracking" != xno \
+ && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
+])
+
+
+# AM_SET_DEPDIR
+# -------------
+# Choose a directory name for dependency files.
+# This macro is AC_REQUIREd in _AM_DEPENDENCIES
+AC_DEFUN([AM_SET_DEPDIR],
+[AC_REQUIRE([AM_SET_LEADING_DOT])dnl
+AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
+])
+
+
+# AM_DEP_TRACK
+# ------------
+AC_DEFUN([AM_DEP_TRACK],
+[AC_ARG_ENABLE(dependency-tracking,
+[ --disable-dependency-tracking speeds up one-time build
+ --enable-dependency-tracking do not reject slow dependency extractors])
+if test "x$enable_dependency_tracking" != xno; then
+ am_depcomp="$ac_aux_dir/depcomp"
+ AMDEPBACKSLASH='\'
+ am__nodep='_no'
+fi
+AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
+AC_SUBST([AMDEPBACKSLASH])dnl
+_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
+AC_SUBST([am__nodep])dnl
+_AM_SUBST_NOTMAKE([am__nodep])dnl
+])
+
+# Generate code to set up dependency tracking. -*- Autoconf -*-
+
+# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008
+# Free Software Foundation, Inc.
+#
+# This file 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.
+
+#serial 5
+
+# _AM_OUTPUT_DEPENDENCY_COMMANDS
+# ------------------------------
+AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
+[{
+ # Autoconf 2.62 quotes --file arguments for eval, but not when files
+ # are listed without --file. Let's play safe and only enable the eval
+ # if we detect the quoting.
+ case $CONFIG_FILES in
+ *\'*) eval set x "$CONFIG_FILES" ;;
+ *) set x $CONFIG_FILES ;;
+ esac
+ shift
+ for mf
+ do
+ # Strip MF so we end up with the name of the file.
+ mf=`echo "$mf" | sed -e 's/:.*$//'`
+ # Check whether this is an Automake generated Makefile or not.
+ # We used to match only the files named `Makefile.in', but
+ # some people rename them; so instead we look at the file content.
+ # Grep'ing the first line is not enough: some people post-process
+ # each Makefile.in and add a new line on top of each file to say so.
+ # Grep'ing the whole file is not good either: AIX grep has a line
+ # limit of 2048, but all sed's we know have understand at least 4000.
+ if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
+ dirpart=`AS_DIRNAME("$mf")`
+ else
+ continue
+ fi
+ # Extract the definition of DEPDIR, am__include, and am__quote
+ # from the Makefile without running `make'.
+ DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
+ test -z "$DEPDIR" && continue
+ am__include=`sed -n 's/^am__include = //p' < "$mf"`
+ test -z "am__include" && continue
+ am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
+ # When using ansi2knr, U may be empty or an underscore; expand it
+ U=`sed -n 's/^U = //p' < "$mf"`
+ # Find all dependency output files, they are included files with
+ # $(DEPDIR) in their names. We invoke sed twice because it is the
+ # simplest approach to changing $(DEPDIR) to its actual value in the
+ # expansion.
+ for file in `sed -n "
+ s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
+ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
+ # Make sure the directory exists.
+ test -f "$dirpart/$file" && continue
+ fdir=`AS_DIRNAME(["$file"])`
+ AS_MKDIR_P([$dirpart/$fdir])
+ # echo "creating $dirpart/$file"
+ echo '# dummy' > "$dirpart/$file"
+ done
+ done
+}
+])# _AM_OUTPUT_DEPENDENCY_COMMANDS
+
+
+# AM_OUTPUT_DEPENDENCY_COMMANDS
+# -----------------------------
+# This macro should only be invoked once -- use via AC_REQUIRE.
+#
+# This code is only required when automatic dependency tracking
+# is enabled. FIXME. This creates each `.P' file that we will
+# need in order to bootstrap the dependency handling code.
+AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
+[AC_CONFIG_COMMANDS([depfiles],
+ [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
+ [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
+])
+
+# Do all the work for Automake. -*- Autoconf -*-
+
+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
+# 2005, 2006, 2008, 2009 Free Software Foundation, Inc.
+#
+# This file 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.
+
+# serial 16
+
+# This macro actually does too much. Some checks are only needed if
+# your package does certain things. But this isn't really a big deal.
+
+# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
+# AM_INIT_AUTOMAKE([OPTIONS])
+# -----------------------------------------------
+# The call with PACKAGE and VERSION arguments is the old style
+# call (pre autoconf-2.50), which is being phased out. PACKAGE
+# and VERSION should now be passed to AC_INIT and removed from
+# the call to AM_INIT_AUTOMAKE.
+# We support both call styles for the transition. After
+# the next Automake release, Autoconf can make the AC_INIT
+# arguments mandatory, and then we can depend on a new Autoconf
+# release and drop the old call support.
+AC_DEFUN([AM_INIT_AUTOMAKE],
+[AC_PREREQ([2.62])dnl
+dnl Autoconf wants to disallow AM_ names. We explicitly allow
+dnl the ones we care about.
+m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
+AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
+AC_REQUIRE([AC_PROG_INSTALL])dnl
+if test "`cd $srcdir && pwd`" != "`pwd`"; then
+ # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
+ # is not polluted with repeated "-I."
+ AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
+ # test to see if srcdir already configured
+ if test -f $srcdir/config.status; then
+ AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
+ fi
+fi
+
+# test whether we have cygpath
+if test -z "$CYGPATH_W"; then
+ if (cygpath --version) >/dev/null 2>/dev/null; then
+ CYGPATH_W='cygpath -w'
+ else
+ CYGPATH_W=echo
+ fi
+fi
+AC_SUBST([CYGPATH_W])
+
+# Define the identity of the package.
+dnl Distinguish between old-style and new-style calls.
+m4_ifval([$2],
+[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
+ AC_SUBST([PACKAGE], [$1])dnl
+ AC_SUBST([VERSION], [$2])],
+[_AM_SET_OPTIONS([$1])dnl
+dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
+m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,,
+ [m4_fatal([AC_INIT should be called with package and version arguments])])dnl
+ AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
+ AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
+
+_AM_IF_OPTION([no-define],,
+[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
+ AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
+
+# Some tools Automake needs.
+AC_REQUIRE([AM_SANITY_CHECK])dnl
+AC_REQUIRE([AC_ARG_PROGRAM])dnl
+AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
+AM_MISSING_PROG(AUTOCONF, autoconf)
+AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
+AM_MISSING_PROG(AUTOHEADER, autoheader)
+AM_MISSING_PROG(MAKEINFO, makeinfo)
+AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
+AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl
+AC_REQUIRE([AM_PROG_MKDIR_P])dnl
+# We need awk for the "check" target. The system "awk" is bad on
+# some platforms.
+AC_REQUIRE([AC_PROG_AWK])dnl
+AC_REQUIRE([AC_PROG_MAKE_SET])dnl
+AC_REQUIRE([AM_SET_LEADING_DOT])dnl
+_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
+ [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
+ [_AM_PROG_TAR([v7])])])
+_AM_IF_OPTION([no-dependencies],,
+[AC_PROVIDE_IFELSE([AC_PROG_CC],
+ [_AM_DEPENDENCIES(CC)],
+ [define([AC_PROG_CC],
+ defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
+AC_PROVIDE_IFELSE([AC_PROG_CXX],
+ [_AM_DEPENDENCIES(CXX)],
+ [define([AC_PROG_CXX],
+ defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
+AC_PROVIDE_IFELSE([AC_PROG_OBJC],
+ [_AM_DEPENDENCIES(OBJC)],
+ [define([AC_PROG_OBJC],
+ defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl
+])
+_AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl
+dnl The `parallel-tests' driver may need to know about EXEEXT, so add the
+dnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This macro
+dnl is hooked onto _AC_COMPILER_EXEEXT early, see below.
+AC_CONFIG_COMMANDS_PRE(dnl
+[m4_provide_if([_AM_COMPILER_EXEEXT],
+ [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
+])
+
+dnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion. Do not
+dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further
+dnl mangled by Autoconf and run in a shell conditional statement.
+m4_define([_AC_COMPILER_EXEEXT],
+m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])])
+
+
+# When config.status generates a header, we must update the stamp-h file.
+# This file resides in the same directory as the config header
+# that is generated. The stamp files are numbered to have different names.
+
+# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
+# loop where config.status creates the headers, so we can generate
+# our stamp files there.
+AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
+[# Compute $1's index in $config_headers.
+_am_arg=$1
+_am_stamp_count=1
+for _am_header in $config_headers :; do
+ case $_am_header in
+ $_am_arg | $_am_arg:* )
+ break ;;
+ * )
+ _am_stamp_count=`expr $_am_stamp_count + 1` ;;
+ esac
+done
+echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
+
+# Copyright (C) 2001, 2003, 2005, 2008, 2011 Free Software Foundation,
+# Inc.
+#
+# This file 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.
+
+# serial 1
+
+# AM_PROG_INSTALL_SH
+# ------------------
+# Define $install_sh.
+AC_DEFUN([AM_PROG_INSTALL_SH],
+[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
+if test x"${install_sh}" != xset; then
+ case $am_aux_dir in
+ *\ * | *\ *)
+ install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
+ *)
+ install_sh="\${SHELL} $am_aux_dir/install-sh"
+ esac
+fi
+AC_SUBST(install_sh)])
+
+# Copyright (C) 2003, 2005 Free Software Foundation, Inc.
+#
+# This file 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.
+
+# serial 2
+
+# Check whether the underlying file-system supports filenames
+# with a leading dot. For instance MS-DOS doesn't.
+AC_DEFUN([AM_SET_LEADING_DOT],
+[rm -rf .tst 2>/dev/null
+mkdir .tst 2>/dev/null
+if test -d .tst; then
+ am__leading_dot=.
+else
+ am__leading_dot=_
+fi
+rmdir .tst 2>/dev/null
+AC_SUBST([am__leading_dot])])
+
+# Add --enable-maintainer-mode option to configure. -*- Autoconf -*-
+# From Jim Meyering
+
+# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005, 2008,
+# 2011 Free Software Foundation, Inc.
+#
+# This file 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.
+
+# serial 5
+
+# AM_MAINTAINER_MODE([DEFAULT-MODE])
+# ----------------------------------
+# Control maintainer-specific portions of Makefiles.
+# Default is to disable them, unless `enable' is passed literally.
+# For symmetry, `disable' may be passed as well. Anyway, the user
+# can override the default with the --enable/--disable switch.
+AC_DEFUN([AM_MAINTAINER_MODE],
+[m4_case(m4_default([$1], [disable]),
+ [enable], [m4_define([am_maintainer_other], [disable])],
+ [disable], [m4_define([am_maintainer_other], [enable])],
+ [m4_define([am_maintainer_other], [enable])
+ m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])])
+AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
+ dnl maintainer-mode's default is 'disable' unless 'enable' is passed
+ AC_ARG_ENABLE([maintainer-mode],
+[ --][am_maintainer_other][-maintainer-mode am_maintainer_other make rules and dependencies not useful
+ (and sometimes confusing) to the casual installer],
+ [USE_MAINTAINER_MODE=$enableval],
+ [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes]))
+ AC_MSG_RESULT([$USE_MAINTAINER_MODE])
+ AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes])
+ MAINT=$MAINTAINER_MODE_TRUE
+ AC_SUBST([MAINT])dnl
+]
+)
+
+AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE])
+
+# Check to see how 'make' treats includes. -*- Autoconf -*-
+
+# Copyright (C) 2001, 2002, 2003, 2005, 2009 Free Software Foundation, Inc.
+#
+# This file 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.
+
+# serial 4
+
+# AM_MAKE_INCLUDE()
+# -----------------
+# Check to see how make treats includes.
+AC_DEFUN([AM_MAKE_INCLUDE],
+[am_make=${MAKE-make}
+cat > confinc << 'END'
+am__doit:
+ @echo this is the am__doit target
+.PHONY: am__doit
+END
+# If we don't find an include directive, just comment out the code.
+AC_MSG_CHECKING([for style of include used by $am_make])
+am__include="#"
+am__quote=
+_am_result=none
+# First try GNU make style include.
+echo "include confinc" > confmf
+# Ignore all kinds of additional output from `make'.
+case `$am_make -s -f confmf 2> /dev/null` in #(
+*the\ am__doit\ target*)
+ am__include=include
+ am__quote=
+ _am_result=GNU
+ ;;
+esac
+# Now try BSD make style include.
+if test "$am__include" = "#"; then
+ echo '.include "confinc"' > confmf
+ case `$am_make -s -f confmf 2> /dev/null` in #(
+ *the\ am__doit\ target*)
+ am__include=.include
+ am__quote="\""
+ _am_result=BSD
+ ;;
+ esac
+fi
+AC_SUBST([am__include])
+AC_SUBST([am__quote])
+AC_MSG_RESULT([$_am_result])
+rm -f confinc confmf
+])
+
+# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*-
+
+# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008
+# Free Software Foundation, Inc.
+#
+# This file 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.
+
+# serial 6
+
+# AM_MISSING_PROG(NAME, PROGRAM)
+# ------------------------------
+AC_DEFUN([AM_MISSING_PROG],
+[AC_REQUIRE([AM_MISSING_HAS_RUN])
+$1=${$1-"${am_missing_run}$2"}
+AC_SUBST($1)])
+
+
+# AM_MISSING_HAS_RUN
+# ------------------
+# Define MISSING if not defined so far and test if it supports --run.
+# If it does, set am_missing_run to use it, otherwise, to nothing.
+AC_DEFUN([AM_MISSING_HAS_RUN],
+[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
+AC_REQUIRE_AUX_FILE([missing])dnl
+if test x"${MISSING+set}" != xset; then
+ case $am_aux_dir in
+ *\ * | *\ *)
+ MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
+ *)
+ MISSING="\${SHELL} $am_aux_dir/missing" ;;
+ esac
+fi
+# Use eval to expand $SHELL
+if eval "$MISSING --run true"; then
+ am_missing_run="$MISSING --run "
+else
+ am_missing_run=
+ AC_MSG_WARN([`missing' script is too old or missing])
+fi
+])
+
+# Copyright (C) 2003, 2004, 2005, 2006, 2011 Free Software Foundation,
+# Inc.
+#
+# This file 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.
+
+# serial 1
+
+# AM_PROG_MKDIR_P
+# ---------------
+# Check for `mkdir -p'.
+AC_DEFUN([AM_PROG_MKDIR_P],
+[AC_PREREQ([2.60])dnl
+AC_REQUIRE([AC_PROG_MKDIR_P])dnl
+dnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P,
+dnl while keeping a definition of mkdir_p for backward compatibility.
+dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile.
+dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of
+dnl Makefile.ins that do not define MKDIR_P, so we do our own
+dnl adjustment using top_builddir (which is defined more often than
+dnl MKDIR_P).
+AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl
+case $mkdir_p in
+ [[\\/$]]* | ?:[[\\/]]*) ;;
+ */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
+esac
+])
+
+# Helper functions for option handling. -*- Autoconf -*-
+
+# Copyright (C) 2001, 2002, 2003, 2005, 2008, 2010 Free Software
+# Foundation, Inc.
+#
+# This file 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.
+
+# serial 5
+
+# _AM_MANGLE_OPTION(NAME)
+# -----------------------
+AC_DEFUN([_AM_MANGLE_OPTION],
+[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
+
+# _AM_SET_OPTION(NAME)
+# --------------------
+# Set option NAME. Presently that only means defining a flag for this option.
+AC_DEFUN([_AM_SET_OPTION],
+[m4_define(_AM_MANGLE_OPTION([$1]), 1)])
+
+# _AM_SET_OPTIONS(OPTIONS)
+# ------------------------
+# OPTIONS is a space-separated list of Automake options.
+AC_DEFUN([_AM_SET_OPTIONS],
+[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
+
+# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
+# -------------------------------------------
+# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
+AC_DEFUN([_AM_IF_OPTION],
+[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
+
+# Check to make sure that the build environment is sane. -*- Autoconf -*-
+
+# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008
+# Free Software Foundation, Inc.
+#
+# This file 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.
+
+# serial 5
+
+# AM_SANITY_CHECK
+# ---------------
+AC_DEFUN([AM_SANITY_CHECK],
+[AC_MSG_CHECKING([whether build environment is sane])
+# Just in case
+sleep 1
+echo timestamp > conftest.file
+# Reject unsafe characters in $srcdir or the absolute working directory
+# name. Accept space and tab only in the latter.
+am_lf='
+'
+case `pwd` in
+ *[[\\\"\#\$\&\'\`$am_lf]]*)
+ AC_MSG_ERROR([unsafe absolute working directory name]);;
+esac
+case $srcdir in
+ *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*)
+ AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);;
+esac
+
+# Do `set' in a subshell so we don't clobber the current shell's
+# arguments. Must try -L first in case configure is actually a
+# symlink; some systems play weird games with the mod time of symlinks
+# (eg FreeBSD returns the mod time of the symlink's containing
+# directory).
+if (
+ set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
+ if test "$[*]" = "X"; then
+ # -L didn't work.
+ set X `ls -t "$srcdir/configure" conftest.file`
+ fi
+ rm -f conftest.file
+ if test "$[*]" != "X $srcdir/configure conftest.file" \
+ && test "$[*]" != "X conftest.file $srcdir/configure"; then
+
+ # If neither matched, then we have a broken ls. This can happen
+ # if, for instance, CONFIG_SHELL is bash and it inherits a
+ # broken ls alias from the environment. This has actually
+ # happened. Such a system could not be considered "sane".
+ AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
+alias in your environment])
+ fi
+
+ test "$[2]" = conftest.file
+ )
+then
+ # Ok.
+ :
+else
+ AC_MSG_ERROR([newly created file is older than distributed files!
+Check your system clock])
+fi
+AC_MSG_RESULT(yes)])
+
+# Copyright (C) 2001, 2003, 2005, 2011 Free Software Foundation, Inc.
+#
+# This file 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.
+
+# serial 1
+
+# AM_PROG_INSTALL_STRIP
+# ---------------------
+# One issue with vendor `install' (even GNU) is that you can't
+# specify the program used to strip binaries. This is especially
+# annoying in cross-compiling environments, where the build's strip
+# is unlikely to handle the host's binaries.
+# Fortunately install-sh will honor a STRIPPROG variable, so we
+# always use install-sh in `make install-strip', and initialize
+# STRIPPROG with the value of the STRIP variable (set by the user).
+AC_DEFUN([AM_PROG_INSTALL_STRIP],
+[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
+# Installed binaries are usually stripped using `strip' when the user
+# run `make install-strip'. However `strip' might not be the right
+# tool to use in cross-compilation environments, therefore Automake
+# will honor the `STRIP' environment variable to overrule this program.
+dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
+if test "$cross_compiling" != no; then
+ AC_CHECK_TOOL([STRIP], [strip], :)
+fi
+INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
+AC_SUBST([INSTALL_STRIP_PROGRAM])])
+
+# Copyright (C) 2006, 2008, 2010 Free Software Foundation, Inc.
+#
+# This file 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.
+
+# serial 3
+
+# _AM_SUBST_NOTMAKE(VARIABLE)
+# ---------------------------
+# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
+# This macro is traced by Automake.
+AC_DEFUN([_AM_SUBST_NOTMAKE])
+
+# AM_SUBST_NOTMAKE(VARIABLE)
+# --------------------------
+# Public sister of _AM_SUBST_NOTMAKE.
+AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
+
+# Check how to create a tarball. -*- Autoconf -*-
+
+# Copyright (C) 2004, 2005, 2012 Free Software Foundation, Inc.
+#
+# This file 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.
+
+# serial 2
+
+# _AM_PROG_TAR(FORMAT)
+# --------------------
+# Check how to create a tarball in format FORMAT.
+# FORMAT should be one of `v7', `ustar', or `pax'.
+#
+# Substitute a variable $(am__tar) that is a command
+# writing to stdout a FORMAT-tarball containing the directory
+# $tardir.
+# tardir=directory && $(am__tar) > result.tar
+#
+# Substitute a variable $(am__untar) that extract such
+# a tarball read from stdin.
+# $(am__untar) < result.tar
+AC_DEFUN([_AM_PROG_TAR],
+[# Always define AMTAR for backward compatibility. Yes, it's still used
+# in the wild :-( We should find a proper way to deprecate it ...
+AC_SUBST([AMTAR], ['$${TAR-tar}'])
+m4_if([$1], [v7],
+ [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'],
+ [m4_case([$1], [ustar],, [pax],,
+ [m4_fatal([Unknown tar format])])
+AC_MSG_CHECKING([how to create a $1 tar archive])
+# Loop over all known methods to create a tar archive until one works.
+_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
+_am_tools=${am_cv_prog_tar_$1-$_am_tools}
+# Do not fold the above two line into one, because Tru64 sh and
+# Solaris sh will not grok spaces in the rhs of `-'.
+for _am_tool in $_am_tools
+do
+ case $_am_tool in
+ gnutar)
+ for _am_tar in tar gnutar gtar;
+ do
+ AM_RUN_LOG([$_am_tar --version]) && break
+ done
+ am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
+ am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
+ am__untar="$_am_tar -xf -"
+ ;;
+ plaintar)
+ # Must skip GNU tar: if it does not support --format= it doesn't create
+ # ustar tarball either.
+ (tar --version) >/dev/null 2>&1 && continue
+ am__tar='tar chf - "$$tardir"'
+ am__tar_='tar chf - "$tardir"'
+ am__untar='tar xf -'
+ ;;
+ pax)
+ am__tar='pax -L -x $1 -w "$$tardir"'
+ am__tar_='pax -L -x $1 -w "$tardir"'
+ am__untar='pax -r'
+ ;;
+ cpio)
+ am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
+ am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
+ am__untar='cpio -i -H $1 -d'
+ ;;
+ none)
+ am__tar=false
+ am__tar_=false
+ am__untar=false
+ ;;
+ esac
+
+ # If the value was cached, stop now. We just wanted to have am__tar
+ # and am__untar set.
+ test -n "${am_cv_prog_tar_$1}" && break
+
+ # tar/untar a dummy directory, and stop if the command works
+ rm -rf conftest.dir
+ mkdir conftest.dir
+ echo GrepMe > conftest.dir/file
+ AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
+ rm -rf conftest.dir
+ if test -s conftest.tar; then
+ AM_RUN_LOG([$am__untar <conftest.tar])
+ grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
+ fi
+done
+rm -rf conftest.dir
+
+AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
+AC_MSG_RESULT([$am_cv_prog_tar_$1])])
+AC_SUBST([am__tar])
+AC_SUBST([am__untar])
+]) # _AM_PROG_TAR
+
+m4_include([../../../acinclude.m4])
diff --git a/newlib/libc/machine/or1k/configure b/newlib/libc/machine/or1k/configure
new file mode 100755
index 000000000..bc041896f
--- /dev/null
+++ b/newlib/libc/machine/or1k/configure
@@ -0,0 +1,4748 @@
+#! /bin/sh
+# Guess values for system-dependent variables and create Makefiles.
+# Generated by GNU Autoconf 2.68 for newlib 2.4.0.
+#
+#
+# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
+# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software
+# Foundation, Inc.
+#
+#
+# This configure script is free software; the Free Software Foundation
+# gives unlimited permission to copy, distribute and modify it.
+## -------------------- ##
+## M4sh Initialization. ##
+## -------------------- ##
+
+# Be more Bourne compatible
+DUALCASE=1; export DUALCASE # for MKS sh
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
+ emulate sh
+ NULLCMD=:
+ # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
+ # is contrary to our usage. Disable this feature.
+ alias -g '${1+"$@"}'='"$@"'
+ setopt NO_GLOB_SUBST
+else
+ case `(set -o) 2>/dev/null` in #(
+ *posix*) :
+ set -o posix ;; #(
+ *) :
+ ;;
+esac
+fi
+
+
+as_nl='
+'
+export as_nl
+# Printing a long string crashes Solaris 7 /usr/bin/printf.
+as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
+as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
+as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
+# Prefer a ksh shell builtin over an external printf program on Solaris,
+# but without wasting forks for bash or zsh.
+if test -z "$BASH_VERSION$ZSH_VERSION" \
+ && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
+ as_echo='print -r --'
+ as_echo_n='print -rn --'
+elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
+ as_echo='printf %s\n'
+ as_echo_n='printf %s'
+else
+ if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
+ as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
+ as_echo_n='/usr/ucb/echo -n'
+ else
+ as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
+ as_echo_n_body='eval
+ arg=$1;
+ case $arg in #(
+ *"$as_nl"*)
+ expr "X$arg" : "X\\(.*\\)$as_nl";
+ arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
+ esac;
+ expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
+ '
+ export as_echo_n_body
+ as_echo_n='sh -c $as_echo_n_body as_echo'
+ fi
+ export as_echo_body
+ as_echo='sh -c $as_echo_body as_echo'
+fi
+
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+ PATH_SEPARATOR=:
+ (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
+ (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
+ PATH_SEPARATOR=';'
+ }
+fi
+
+
+# IFS
+# We need space, tab and new line, in precisely that order. Quoting is
+# there to prevent editors from complaining about space-tab.
+# (If _AS_PATH_WALK were called with IFS unset, it would disable word
+# splitting by setting IFS to empty value.)
+IFS=" "" $as_nl"
+
+# Find who we are. Look in the path if we contain no directory separator.
+as_myself=
+case $0 in #((
+ *[\\/]* ) as_myself=$0 ;;
+ *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
+ done
+IFS=$as_save_IFS
+
+ ;;
+esac
+# We did not find ourselves, most probably we were run as `sh COMMAND'
+# in which case we are not to be found in the path.
+if test "x$as_myself" = x; then
+ as_myself=$0
+fi
+if test ! -f "$as_myself"; then
+ $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
+ exit 1
+fi
+
+# Unset variables that we do not need and which cause bugs (e.g. in
+# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
+# suppresses any "Segmentation fault" message there. '((' could
+# trigger a bug in pdksh 5.2.14.
+for as_var in BASH_ENV ENV MAIL MAILPATH
+do eval test x\${$as_var+set} = xset \
+ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
+done
+PS1='$ '
+PS2='> '
+PS4='+ '
+
+# NLS nuisances.
+LC_ALL=C
+export LC_ALL
+LANGUAGE=C
+export LANGUAGE
+
+# CDPATH.
+(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
+
+if test "x$CONFIG_SHELL" = x; then
+ as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
+ emulate sh
+ NULLCMD=:
+ # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
+ # is contrary to our usage. Disable this feature.
+ alias -g '\${1+\"\$@\"}'='\"\$@\"'
+ setopt NO_GLOB_SUBST
+else
+ case \`(set -o) 2>/dev/null\` in #(
+ *posix*) :
+ set -o posix ;; #(
+ *) :
+ ;;
+esac
+fi
+"
+ as_required="as_fn_return () { (exit \$1); }
+as_fn_success () { as_fn_return 0; }
+as_fn_failure () { as_fn_return 1; }
+as_fn_ret_success () { return 0; }
+as_fn_ret_failure () { return 1; }
+
+exitcode=0
+as_fn_success || { exitcode=1; echo as_fn_success failed.; }
+as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
+as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
+as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
+if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
+
+else
+ exitcode=1; echo positional parameters were not saved.
+fi
+test x\$exitcode = x0 || exit 1"
+ as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
+ as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
+ eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
+ test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1"
+ if (eval "$as_required") 2>/dev/null; then :
+ as_have_required=yes
+else
+ as_have_required=no
+fi
+ if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
+
+else
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+as_found=false
+for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ as_found=:
+ case $as_dir in #(
+ /*)
+ for as_base in sh bash ksh sh5; do
+ # Try only shells that exist, to save several forks.
+ as_shell=$as_dir/$as_base
+ if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
+ { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
+ CONFIG_SHELL=$as_shell as_have_required=yes
+ if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
+ break 2
+fi
+fi
+ done;;
+ esac
+ as_found=false
+done
+$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
+ { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
+ CONFIG_SHELL=$SHELL as_have_required=yes
+fi; }
+IFS=$as_save_IFS
+
+
+ if test "x$CONFIG_SHELL" != x; then :
+ # We cannot yet assume a decent shell, so we have to provide a
+ # neutralization value for shells without unset; and this also
+ # works around shells that cannot unset nonexistent variables.
+ # Preserve -v and -x to the replacement shell.
+ BASH_ENV=/dev/null
+ ENV=/dev/null
+ (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
+ export CONFIG_SHELL
+ case $- in # ((((
+ *v*x* | *x*v* ) as_opts=-vx ;;
+ *v* ) as_opts=-v ;;
+ *x* ) as_opts=-x ;;
+ * ) as_opts= ;;
+ esac
+ exec "$CONFIG_SHELL" $as_opts "$as_myself" ${1+"$@"}
+fi
+
+ if test x$as_have_required = xno; then :
+ $as_echo "$0: This script requires a shell more modern than all"
+ $as_echo "$0: the shells that I found on your system."
+ if test x${ZSH_VERSION+set} = xset ; then
+ $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
+ $as_echo "$0: be upgraded to zsh 4.3.4 or later."
+ else
+ $as_echo "$0: Please tell bug-autoconf@gnu.org about your system,
+$0: including any error possibly output before this
+$0: message. Then install a modern shell, or manually run
+$0: the script under such a shell if you do have one."
+ fi
+ exit 1
+fi
+fi
+fi
+SHELL=${CONFIG_SHELL-/bin/sh}
+export SHELL
+# Unset more variables known to interfere with behavior of common tools.
+CLICOLOR_FORCE= GREP_OPTIONS=
+unset CLICOLOR_FORCE GREP_OPTIONS
+
+## --------------------- ##
+## M4sh Shell Functions. ##
+## --------------------- ##
+# as_fn_unset VAR
+# ---------------
+# Portably unset VAR.
+as_fn_unset ()
+{
+ { eval $1=; unset $1;}
+}
+as_unset=as_fn_unset
+
+# as_fn_set_status STATUS
+# -----------------------
+# Set $? to STATUS, without forking.
+as_fn_set_status ()
+{
+ return $1
+} # as_fn_set_status
+
+# as_fn_exit STATUS
+# -----------------
+# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
+as_fn_exit ()
+{
+ set +e
+ as_fn_set_status $1
+ exit $1
+} # as_fn_exit
+
+# as_fn_mkdir_p
+# -------------
+# Create "$as_dir" as a directory, including parents if necessary.
+as_fn_mkdir_p ()
+{
+
+ case $as_dir in #(
+ -*) as_dir=./$as_dir;;
+ esac
+ test -d "$as_dir" || eval $as_mkdir_p || {
+ as_dirs=
+ while :; do
+ case $as_dir in #(
+ *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
+ *) as_qdir=$as_dir;;
+ esac
+ as_dirs="'$as_qdir' $as_dirs"
+ as_dir=`$as_dirname -- "$as_dir" ||
+$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$as_dir" : 'X\(//\)[^/]' \| \
+ X"$as_dir" : 'X\(//\)$' \| \
+ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$as_dir" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)[^/].*/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+ test -d "$as_dir" && break
+ done
+ test -z "$as_dirs" || eval "mkdir $as_dirs"
+ } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
+
+
+} # as_fn_mkdir_p
+# as_fn_append VAR VALUE
+# ----------------------
+# Append the text in VALUE to the end of the definition contained in VAR. Take
+# advantage of any shell optimizations that allow amortized linear growth over
+# repeated appends, instead of the typical quadratic growth present in naive
+# implementations.
+if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
+ eval 'as_fn_append ()
+ {
+ eval $1+=\$2
+ }'
+else
+ as_fn_append ()
+ {
+ eval $1=\$$1\$2
+ }
+fi # as_fn_append
+
+# as_fn_arith ARG...
+# ------------------
+# Perform arithmetic evaluation on the ARGs, and store the result in the
+# global $as_val. Take advantage of shells that can avoid forks. The arguments
+# must be portable across $(()) and expr.
+if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
+ eval 'as_fn_arith ()
+ {
+ as_val=$(( $* ))
+ }'
+else
+ as_fn_arith ()
+ {
+ as_val=`expr "$@" || test $? -eq 1`
+ }
+fi # as_fn_arith
+
+
+# as_fn_error STATUS ERROR [LINENO LOG_FD]
+# ----------------------------------------
+# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
+# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
+# script with STATUS, using 1 if that was 0.
+as_fn_error ()
+{
+ as_status=$1; test $as_status -eq 0 && as_status=1
+ if test "$4"; then
+ as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
+ fi
+ $as_echo "$as_me: error: $2" >&2
+ as_fn_exit $as_status
+} # as_fn_error
+
+if expr a : '\(a\)' >/dev/null 2>&1 &&
+ test "X`expr 00001 : '.*\(...\)'`" = X001; then
+ as_expr=expr
+else
+ as_expr=false
+fi
+
+if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
+ as_basename=basename
+else
+ as_basename=false
+fi
+
+if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
+ as_dirname=dirname
+else
+ as_dirname=false
+fi
+
+as_me=`$as_basename -- "$0" ||
+$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
+ X"$0" : 'X\(//\)$' \| \
+ X"$0" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X/"$0" |
+ sed '/^.*\/\([^/][^/]*\)\/*$/{
+ s//\1/
+ q
+ }
+ /^X\/\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\/\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+
+# Avoid depending upon Character Ranges.
+as_cr_letters='abcdefghijklmnopqrstuvwxyz'
+as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
+as_cr_Letters=$as_cr_letters$as_cr_LETTERS
+as_cr_digits='0123456789'
+as_cr_alnum=$as_cr_Letters$as_cr_digits
+
+
+ as_lineno_1=$LINENO as_lineno_1a=$LINENO
+ as_lineno_2=$LINENO as_lineno_2a=$LINENO
+ eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
+ test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
+ # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-)
+ sed -n '
+ p
+ /[$]LINENO/=
+ ' <$as_myself |
+ sed '
+ s/[$]LINENO.*/&-/
+ t lineno
+ b
+ :lineno
+ N
+ :loop
+ s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
+ t loop
+ s/-\n.*//
+ ' >$as_me.lineno &&
+ chmod +x "$as_me.lineno" ||
+ { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
+
+ # Don't try to exec as it changes $[0], causing all sort of problems
+ # (the dirname of $[0] is not the place where we might find the
+ # original and so on. Autoconf is especially sensitive to this).
+ . "./$as_me.lineno"
+ # Exit status is that of the last command.
+ exit
+}
+
+ECHO_C= ECHO_N= ECHO_T=
+case `echo -n x` in #(((((
+-n*)
+ case `echo 'xy\c'` in
+ *c*) ECHO_T=' ';; # ECHO_T is single tab character.
+ xy) ECHO_C='\c';;
+ *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
+ ECHO_T=' ';;
+ esac;;
+*)
+ ECHO_N='-n';;
+esac
+
+rm -f conf$$ conf$$.exe conf$$.file
+if test -d conf$$.dir; then
+ rm -f conf$$.dir/conf$$.file
+else
+ rm -f conf$$.dir
+ mkdir conf$$.dir 2>/dev/null
+fi
+if (echo >conf$$.file) 2>/dev/null; then
+ if ln -s conf$$.file conf$$ 2>/dev/null; then
+ as_ln_s='ln -s'
+ # ... but there are two gotchas:
+ # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
+ # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
+ # In both cases, we have to default to `cp -p'.
+ ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
+ as_ln_s='cp -p'
+ elif ln conf$$.file conf$$ 2>/dev/null; then
+ as_ln_s=ln
+ else
+ as_ln_s='cp -p'
+ fi
+else
+ as_ln_s='cp -p'
+fi
+rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
+rmdir conf$$.dir 2>/dev/null
+
+if mkdir -p . 2>/dev/null; then
+ as_mkdir_p='mkdir -p "$as_dir"'
+else
+ test -d ./-p && rmdir ./-p
+ as_mkdir_p=false
+fi
+
+if test -x / >/dev/null 2>&1; then
+ as_test_x='test -x'
+else
+ if ls -dL / >/dev/null 2>&1; then
+ as_ls_L_option=L
+ else
+ as_ls_L_option=
+ fi
+ as_test_x='
+ eval sh -c '\''
+ if test -d "$1"; then
+ test -d "$1/.";
+ else
+ case $1 in #(
+ -*)set "./$1";;
+ esac;
+ case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
+ ???[sx]*):;;*)false;;esac;fi
+ '\'' sh
+ '
+fi
+as_executable_p=$as_test_x
+
+# Sed expression to map a string onto a valid CPP name.
+as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
+
+# Sed expression to map a string onto a valid variable name.
+as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
+
+
+test -n "$DJDIR" || exec 7<&0 </dev/null
+exec 6>&1
+
+# Name of the host.
+# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
+# so uname gets run too.
+ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
+
+#
+# Initializations.
+#
+ac_default_prefix=/usr/local
+ac_clean_files=
+ac_config_libobj_dir=.
+LIBOBJS=
+cross_compiling=no
+subdirs=
+MFLAGS=
+MAKEFLAGS=
+
+# Identity of this package.
+PACKAGE_NAME='newlib'
+PACKAGE_TARNAME='newlib'
+PACKAGE_VERSION='2.4.0'
+PACKAGE_STRING='newlib 2.4.0'
+PACKAGE_BUGREPORT=''
+PACKAGE_URL=''
+
+ac_unique_file="Makefile.am"
+ac_subst_vars='LTLIBOBJS
+LIBOBJS
+sys_dir
+machine_dir
+libm_machine_dir
+lpfx
+aext
+oext
+OBJEXT
+USE_LIBTOOL_FALSE
+USE_LIBTOOL_TRUE
+ELIX_LEVEL_4_FALSE
+ELIX_LEVEL_4_TRUE
+ELIX_LEVEL_3_FALSE
+ELIX_LEVEL_3_TRUE
+ELIX_LEVEL_2_FALSE
+ELIX_LEVEL_2_TRUE
+ELIX_LEVEL_1_FALSE
+ELIX_LEVEL_1_TRUE
+ELIX_LEVEL_0_FALSE
+ELIX_LEVEL_0_TRUE
+LDFLAGS
+NO_INCLUDE_LIST
+NEWLIB_CFLAGS
+CCASFLAGS
+CCAS
+MAINT
+MAINTAINER_MODE_FALSE
+MAINTAINER_MODE_TRUE
+READELF
+RANLIB
+AR
+AS
+am__fastdepCC_FALSE
+am__fastdepCC_TRUE
+CCDEPMODE
+am__nodep
+AMDEPBACKSLASH
+AMDEP_FALSE
+AMDEP_TRUE
+am__quote
+am__include
+DEPDIR
+CC
+am__untar
+am__tar
+AMTAR
+am__leading_dot
+SET_MAKE
+AWK
+mkdir_p
+MKDIR_P
+INSTALL_STRIP_PROGRAM
+STRIP
+install_sh
+MAKEINFO
+AUTOHEADER
+AUTOMAKE
+AUTOCONF
+ACLOCAL
+VERSION
+PACKAGE
+CYGPATH_W
+am__isrc
+INSTALL_DATA
+INSTALL_SCRIPT
+INSTALL_PROGRAM
+host_os
+host_vendor
+host_cpu
+host
+build_os
+build_vendor
+build_cpu
+build
+newlib_basedir
+MAY_SUPPLY_SYSCALLS_FALSE
+MAY_SUPPLY_SYSCALLS_TRUE
+target_alias
+host_alias
+build_alias
+LIBS
+ECHO_T
+ECHO_N
+ECHO_C
+DEFS
+mandir
+localedir
+libdir
+psdir
+pdfdir
+dvidir
+htmldir
+infodir
+docdir
+oldincludedir
+includedir
+localstatedir
+sharedstatedir
+sysconfdir
+datadir
+datarootdir
+libexecdir
+sbindir
+bindir
+program_transform_name
+prefix
+exec_prefix
+PACKAGE_URL
+PACKAGE_BUGREPORT
+PACKAGE_STRING
+PACKAGE_VERSION
+PACKAGE_TARNAME
+PACKAGE_NAME
+PATH_SEPARATOR
+SHELL'
+ac_subst_files=''
+ac_user_opts='
+enable_option_checking
+enable_multilib
+enable_target_optspace
+enable_malloc_debugging
+enable_newlib_multithread
+enable_newlib_iconv
+enable_newlib_elix_level
+enable_newlib_io_float
+enable_newlib_supplied_syscalls
+enable_dependency_tracking
+enable_maintainer_mode
+'
+ ac_precious_vars='build_alias
+host_alias
+target_alias
+CCAS
+CCASFLAGS'
+
+
+# Initialize some variables set by options.
+ac_init_help=
+ac_init_version=false
+ac_unrecognized_opts=
+ac_unrecognized_sep=
+# The variables have the same names as the options, with
+# dashes changed to underlines.
+cache_file=/dev/null
+exec_prefix=NONE
+no_create=
+no_recursion=
+prefix=NONE
+program_prefix=NONE
+program_suffix=NONE
+program_transform_name=s,x,x,
+silent=
+site=
+srcdir=
+verbose=
+x_includes=NONE
+x_libraries=NONE
+
+# Installation directory options.
+# These are left unexpanded so users can "make install exec_prefix=/foo"
+# and all the variables that are supposed to be based on exec_prefix
+# by default will actually change.
+# Use braces instead of parens because sh, perl, etc. also accept them.
+# (The list follows the same order as the GNU Coding Standards.)
+bindir='${exec_prefix}/bin'
+sbindir='${exec_prefix}/sbin'
+libexecdir='${exec_prefix}/libexec'
+datarootdir='${prefix}/share'
+datadir='${datarootdir}'
+sysconfdir='${prefix}/etc'
+sharedstatedir='${prefix}/com'
+localstatedir='${prefix}/var'
+includedir='${prefix}/include'
+oldincludedir='/usr/include'
+docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
+infodir='${datarootdir}/info'
+htmldir='${docdir}'
+dvidir='${docdir}'
+pdfdir='${docdir}'
+psdir='${docdir}'
+libdir='${exec_prefix}/lib'
+localedir='${datarootdir}/locale'
+mandir='${datarootdir}/man'
+
+ac_prev=
+ac_dashdash=
+for ac_option
+do
+ # If the previous option needs an argument, assign it.
+ if test -n "$ac_prev"; then
+ eval $ac_prev=\$ac_option
+ ac_prev=
+ continue
+ fi
+
+ case $ac_option in
+ *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
+ *=) ac_optarg= ;;
+ *) ac_optarg=yes ;;
+ esac
+
+ # Accept the important Cygnus configure options, so we can diagnose typos.
+
+ case $ac_dashdash$ac_option in
+ --)
+ ac_dashdash=yes ;;
+
+ -bindir | --bindir | --bindi | --bind | --bin | --bi)
+ ac_prev=bindir ;;
+ -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
+ bindir=$ac_optarg ;;
+
+ -build | --build | --buil | --bui | --bu)
+ ac_prev=build_alias ;;
+ -build=* | --build=* | --buil=* | --bui=* | --bu=*)
+ build_alias=$ac_optarg ;;
+
+ -cache-file | --cache-file | --cache-fil | --cache-fi \
+ | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
+ ac_prev=cache_file ;;
+ -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
+ | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
+ cache_file=$ac_optarg ;;
+
+ --config-cache | -C)
+ cache_file=config.cache ;;
+
+ -datadir | --datadir | --datadi | --datad)
+ ac_prev=datadir ;;
+ -datadir=* | --datadir=* | --datadi=* | --datad=*)
+ datadir=$ac_optarg ;;
+
+ -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
+ | --dataroo | --dataro | --datar)
+ ac_prev=datarootdir ;;
+ -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
+ | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
+ datarootdir=$ac_optarg ;;
+
+ -disable-* | --disable-*)
+ ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
+ # Reject names that are not valid shell variable names.
+ expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
+ as_fn_error $? "invalid feature name: $ac_useropt"
+ ac_useropt_orig=$ac_useropt
+ ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
+ case $ac_user_opts in
+ *"
+"enable_$ac_useropt"
+"*) ;;
+ *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
+ ac_unrecognized_sep=', ';;
+ esac
+ eval enable_$ac_useropt=no ;;
+
+ -docdir | --docdir | --docdi | --doc | --do)
+ ac_prev=docdir ;;
+ -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
+ docdir=$ac_optarg ;;
+
+ -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
+ ac_prev=dvidir ;;
+ -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
+ dvidir=$ac_optarg ;;
+
+ -enable-* | --enable-*)
+ ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
+ # Reject names that are not valid shell variable names.
+ expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
+ as_fn_error $? "invalid feature name: $ac_useropt"
+ ac_useropt_orig=$ac_useropt
+ ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
+ case $ac_user_opts in
+ *"
+"enable_$ac_useropt"
+"*) ;;
+ *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
+ ac_unrecognized_sep=', ';;
+ esac
+ eval enable_$ac_useropt=\$ac_optarg ;;
+
+ -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
+ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
+ | --exec | --exe | --ex)
+ ac_prev=exec_prefix ;;
+ -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
+ | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
+ | --exec=* | --exe=* | --ex=*)
+ exec_prefix=$ac_optarg ;;
+
+ -gas | --gas | --ga | --g)
+ # Obsolete; use --with-gas.
+ with_gas=yes ;;
+
+ -help | --help | --hel | --he | -h)
+ ac_init_help=long ;;
+ -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
+ ac_init_help=recursive ;;
+ -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
+ ac_init_help=short ;;
+
+ -host | --host | --hos | --ho)
+ ac_prev=host_alias ;;
+ -host=* | --host=* | --hos=* | --ho=*)
+ host_alias=$ac_optarg ;;
+
+ -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
+ ac_prev=htmldir ;;
+ -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
+ | --ht=*)
+ htmldir=$ac_optarg ;;
+
+ -includedir | --includedir | --includedi | --included | --include \
+ | --includ | --inclu | --incl | --inc)
+ ac_prev=includedir ;;
+ -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
+ | --includ=* | --inclu=* | --incl=* | --inc=*)
+ includedir=$ac_optarg ;;
+
+ -infodir | --infodir | --infodi | --infod | --info | --inf)
+ ac_prev=infodir ;;
+ -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
+ infodir=$ac_optarg ;;
+
+ -libdir | --libdir | --libdi | --libd)
+ ac_prev=libdir ;;
+ -libdir=* | --libdir=* | --libdi=* | --libd=*)
+ libdir=$ac_optarg ;;
+
+ -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
+ | --libexe | --libex | --libe)
+ ac_prev=libexecdir ;;
+ -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
+ | --libexe=* | --libex=* | --libe=*)
+ libexecdir=$ac_optarg ;;
+
+ -localedir | --localedir | --localedi | --localed | --locale)
+ ac_prev=localedir ;;
+ -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
+ localedir=$ac_optarg ;;
+
+ -localstatedir | --localstatedir | --localstatedi | --localstated \
+ | --localstate | --localstat | --localsta | --localst | --locals)
+ ac_prev=localstatedir ;;
+ -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
+ | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
+ localstatedir=$ac_optarg ;;
+
+ -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
+ ac_prev=mandir ;;
+ -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
+ mandir=$ac_optarg ;;
+
+ -nfp | --nfp | --nf)
+ # Obsolete; use --without-fp.
+ with_fp=no ;;
+
+ -no-create | --no-create | --no-creat | --no-crea | --no-cre \
+ | --no-cr | --no-c | -n)
+ no_create=yes ;;
+
+ -no-recursion | --no-recursion | --no-recursio | --no-recursi \
+ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
+ no_recursion=yes ;;
+
+ -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
+ | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
+ | --oldin | --oldi | --old | --ol | --o)
+ ac_prev=oldincludedir ;;
+ -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
+ | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
+ | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
+ oldincludedir=$ac_optarg ;;
+
+ -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
+ ac_prev=prefix ;;
+ -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
+ prefix=$ac_optarg ;;
+
+ -program-prefix | --program-prefix | --program-prefi | --program-pref \
+ | --program-pre | --program-pr | --program-p)
+ ac_prev=program_prefix ;;
+ -program-prefix=* | --program-prefix=* | --program-prefi=* \
+ | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
+ program_prefix=$ac_optarg ;;
+
+ -program-suffix | --program-suffix | --program-suffi | --program-suff \
+ | --program-suf | --program-su | --program-s)
+ ac_prev=program_suffix ;;
+ -program-suffix=* | --program-suffix=* | --program-suffi=* \
+ | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
+ program_suffix=$ac_optarg ;;
+
+ -program-transform-name | --program-transform-name \
+ | --program-transform-nam | --program-transform-na \
+ | --program-transform-n | --program-transform- \
+ | --program-transform | --program-transfor \
+ | --program-transfo | --program-transf \
+ | --program-trans | --program-tran \
+ | --progr-tra | --program-tr | --program-t)
+ ac_prev=program_transform_name ;;
+ -program-transform-name=* | --program-transform-name=* \
+ | --program-transform-nam=* | --program-transform-na=* \
+ | --program-transform-n=* | --program-transform-=* \
+ | --program-transform=* | --program-transfor=* \
+ | --program-transfo=* | --program-transf=* \
+ | --program-trans=* | --program-tran=* \
+ | --progr-tra=* | --program-tr=* | --program-t=*)
+ program_transform_name=$ac_optarg ;;
+
+ -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
+ ac_prev=pdfdir ;;
+ -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
+ pdfdir=$ac_optarg ;;
+
+ -psdir | --psdir | --psdi | --psd | --ps)
+ ac_prev=psdir ;;
+ -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
+ psdir=$ac_optarg ;;
+
+ -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+ | -silent | --silent | --silen | --sile | --sil)
+ silent=yes ;;
+
+ -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
+ ac_prev=sbindir ;;
+ -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
+ | --sbi=* | --sb=*)
+ sbindir=$ac_optarg ;;
+
+ -sharedstatedir | --sharedstatedir | --sharedstatedi \
+ | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
+ | --sharedst | --shareds | --shared | --share | --shar \
+ | --sha | --sh)
+ ac_prev=sharedstatedir ;;
+ -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
+ | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
+ | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
+ | --sha=* | --sh=*)
+ sharedstatedir=$ac_optarg ;;
+
+ -site | --site | --sit)
+ ac_prev=site ;;
+ -site=* | --site=* | --sit=*)
+ site=$ac_optarg ;;
+
+ -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
+ ac_prev=srcdir ;;
+ -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
+ srcdir=$ac_optarg ;;
+
+ -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
+ | --syscon | --sysco | --sysc | --sys | --sy)
+ ac_prev=sysconfdir ;;
+ -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
+ | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
+ sysconfdir=$ac_optarg ;;
+
+ -target | --target | --targe | --targ | --tar | --ta | --t)
+ ac_prev=target_alias ;;
+ -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
+ target_alias=$ac_optarg ;;
+
+ -v | -verbose | --verbose | --verbos | --verbo | --verb)
+ verbose=yes ;;
+
+ -version | --version | --versio | --versi | --vers | -V)
+ ac_init_version=: ;;
+
+ -with-* | --with-*)
+ ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
+ # Reject names that are not valid shell variable names.
+ expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
+ as_fn_error $? "invalid package name: $ac_useropt"
+ ac_useropt_orig=$ac_useropt
+ ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
+ case $ac_user_opts in
+ *"
+"with_$ac_useropt"
+"*) ;;
+ *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
+ ac_unrecognized_sep=', ';;
+ esac
+ eval with_$ac_useropt=\$ac_optarg ;;
+
+ -without-* | --without-*)
+ ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
+ # Reject names that are not valid shell variable names.
+ expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
+ as_fn_error $? "invalid package name: $ac_useropt"
+ ac_useropt_orig=$ac_useropt
+ ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
+ case $ac_user_opts in
+ *"
+"with_$ac_useropt"
+"*) ;;
+ *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
+ ac_unrecognized_sep=', ';;
+ esac
+ eval with_$ac_useropt=no ;;
+
+ --x)
+ # Obsolete; use --with-x.
+ with_x=yes ;;
+
+ -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
+ | --x-incl | --x-inc | --x-in | --x-i)
+ ac_prev=x_includes ;;
+ -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
+ | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
+ x_includes=$ac_optarg ;;
+
+ -x-libraries | --x-libraries | --x-librarie | --x-librari \
+ | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
+ ac_prev=x_libraries ;;
+ -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
+ | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
+ x_libraries=$ac_optarg ;;
+
+ -*) as_fn_error $? "unrecognized option: \`$ac_option'
+Try \`$0 --help' for more information"
+ ;;
+
+ *=*)
+ ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
+ # Reject names that are not valid shell variable names.
+ case $ac_envvar in #(
+ '' | [0-9]* | *[!_$as_cr_alnum]* )
+ as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
+ esac
+ eval $ac_envvar=\$ac_optarg
+ export $ac_envvar ;;
+
+ *)
+ # FIXME: should be removed in autoconf 3.0.
+ $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
+ expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
+ $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
+ : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
+ ;;
+
+ esac
+done
+
+if test -n "$ac_prev"; then
+ ac_option=--`echo $ac_prev | sed 's/_/-/g'`
+ as_fn_error $? "missing argument to $ac_option"
+fi
+
+if test -n "$ac_unrecognized_opts"; then
+ case $enable_option_checking in
+ no) ;;
+ fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
+ *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
+ esac
+fi
+
+# Check all directory arguments for consistency.
+for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
+ datadir sysconfdir sharedstatedir localstatedir includedir \
+ oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
+ libdir localedir mandir
+do
+ eval ac_val=\$$ac_var
+ # Remove trailing slashes.
+ case $ac_val in
+ */ )
+ ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
+ eval $ac_var=\$ac_val;;
+ esac
+ # Be sure to have absolute directory names.
+ case $ac_val in
+ [\\/$]* | ?:[\\/]* ) continue;;
+ NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
+ esac
+ as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
+done
+
+# There might be people who depend on the old broken behavior: `$host'
+# used to hold the argument of --host etc.
+# FIXME: To remove some day.
+build=$build_alias
+host=$host_alias
+target=$target_alias
+
+# FIXME: To remove some day.
+if test "x$host_alias" != x; then
+ if test "x$build_alias" = x; then
+ cross_compiling=maybe
+ $as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host.
+ If a cross compiler is detected then cross compile mode will be used" >&2
+ elif test "x$build_alias" != "x$host_alias"; then
+ cross_compiling=yes
+ fi
+fi
+
+ac_tool_prefix=
+test -n "$host_alias" && ac_tool_prefix=$host_alias-
+
+test "$silent" = yes && exec 6>/dev/null
+
+
+ac_pwd=`pwd` && test -n "$ac_pwd" &&
+ac_ls_di=`ls -di .` &&
+ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
+ as_fn_error $? "working directory cannot be determined"
+test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
+ as_fn_error $? "pwd does not report name of working directory"
+
+
+# Find the source files, if location was not specified.
+if test -z "$srcdir"; then
+ ac_srcdir_defaulted=yes
+ # Try the directory containing this script, then the parent directory.
+ ac_confdir=`$as_dirname -- "$as_myself" ||
+$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$as_myself" : 'X\(//\)[^/]' \| \
+ X"$as_myself" : 'X\(//\)$' \| \
+ X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$as_myself" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)[^/].*/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+ srcdir=$ac_confdir
+ if test ! -r "$srcdir/$ac_unique_file"; then
+ srcdir=..
+ fi
+else
+ ac_srcdir_defaulted=no
+fi
+if test ! -r "$srcdir/$ac_unique_file"; then
+ test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
+ as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
+fi
+ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
+ac_abs_confdir=`(
+ cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
+ pwd)`
+# When building in place, set srcdir=.
+if test "$ac_abs_confdir" = "$ac_pwd"; then
+ srcdir=.
+fi
+# Remove unnecessary trailing slashes from srcdir.
+# Double slashes in file names in object file debugging info
+# mess up M-x gdb in Emacs.
+case $srcdir in
+*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
+esac
+for ac_var in $ac_precious_vars; do
+ eval ac_env_${ac_var}_set=\${${ac_var}+set}
+ eval ac_env_${ac_var}_value=\$${ac_var}
+ eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
+ eval ac_cv_env_${ac_var}_value=\$${ac_var}
+done
+
+#
+# Report the --help message.
+#
+if test "$ac_init_help" = "long"; then
+ # Omit some internal or obsolete options to make the list less imposing.
+ # This message is too long to be a string in the A/UX 3.1 sh.
+ cat <<_ACEOF
+\`configure' configures newlib 2.4.0 to adapt to many kinds of systems.
+
+Usage: $0 [OPTION]... [VAR=VALUE]...
+
+To assign environment variables (e.g., CC, CFLAGS...), specify them as
+VAR=VALUE. See below for descriptions of some of the useful variables.
+
+Defaults for the options are specified in brackets.
+
+Configuration:
+ -h, --help display this help and exit
+ --help=short display options specific to this package
+ --help=recursive display the short help of all the included packages
+ -V, --version display version information and exit
+ -q, --quiet, --silent do not print \`checking ...' messages
+ --cache-file=FILE cache test results in FILE [disabled]
+ -C, --config-cache alias for \`--cache-file=config.cache'
+ -n, --no-create do not create output files
+ --srcdir=DIR find the sources in DIR [configure dir or \`..']
+
+Installation directories:
+ --prefix=PREFIX install architecture-independent files in PREFIX
+ [$ac_default_prefix]
+ --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
+ [PREFIX]
+
+By default, \`make install' will install all the files in
+\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
+an installation prefix other than \`$ac_default_prefix' using \`--prefix',
+for instance \`--prefix=\$HOME'.
+
+For better control, use the options below.
+
+Fine tuning of the installation directories:
+ --bindir=DIR user executables [EPREFIX/bin]
+ --sbindir=DIR system admin executables [EPREFIX/sbin]
+ --libexecdir=DIR program executables [EPREFIX/libexec]
+ --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
+ --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
+ --localstatedir=DIR modifiable single-machine data [PREFIX/var]
+ --libdir=DIR object code libraries [EPREFIX/lib]
+ --includedir=DIR C header files [PREFIX/include]
+ --oldincludedir=DIR C header files for non-gcc [/usr/include]
+ --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
+ --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
+ --infodir=DIR info documentation [DATAROOTDIR/info]
+ --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
+ --mandir=DIR man documentation [DATAROOTDIR/man]
+ --docdir=DIR documentation root [DATAROOTDIR/doc/newlib]
+ --htmldir=DIR html documentation [DOCDIR]
+ --dvidir=DIR dvi documentation [DOCDIR]
+ --pdfdir=DIR pdf documentation [DOCDIR]
+ --psdir=DIR ps documentation [DOCDIR]
+_ACEOF
+
+ cat <<\_ACEOF
+
+Program names:
+ --program-prefix=PREFIX prepend PREFIX to installed program names
+ --program-suffix=SUFFIX append SUFFIX to installed program names
+ --program-transform-name=PROGRAM run sed PROGRAM on installed program names
+
+System types:
+ --build=BUILD configure for building on BUILD [guessed]
+ --host=HOST cross-compile to build programs to run on HOST [BUILD]
+_ACEOF
+fi
+
+if test -n "$ac_init_help"; then
+ case $ac_init_help in
+ short | recursive ) echo "Configuration of newlib 2.4.0:";;
+ esac
+ cat <<\_ACEOF
+
+Optional Features:
+ --disable-option-checking ignore unrecognized --enable/--with options
+ --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
+ --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
+ --enable-multilib build many library versions (default)
+ --enable-target-optspace optimize for space
+ --enable-malloc-debugging indicate malloc debugging requested
+ --enable-newlib-multithread enable support for multiple threads
+ --enable-newlib-iconv enable iconv library support
+ --enable-newlib-elix-level supply desired elix library level (1-4)
+ --disable-newlib-io-float disable printf/scanf family float support
+ --disable-newlib-supplied-syscalls disable newlib from supplying syscalls
+ --disable-dependency-tracking speeds up one-time build
+ --enable-dependency-tracking do not reject slow dependency extractors
+ --enable-maintainer-mode enable make rules and dependencies not useful
+ (and sometimes confusing) to the casual installer
+
+Some influential environment variables:
+ CCAS assembler compiler command (defaults to CC)
+ CCASFLAGS assembler compiler flags (defaults to CFLAGS)
+
+Use these variables to override the choices made by `configure' or to help
+it to find libraries and programs with nonstandard names/locations.
+
+Report bugs to the package provider.
+_ACEOF
+ac_status=$?
+fi
+
+if test "$ac_init_help" = "recursive"; then
+ # If there are subdirs, report their specific --help.
+ for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
+ test -d "$ac_dir" ||
+ { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
+ continue
+ ac_builddir=.
+
+case "$ac_dir" in
+.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
+*)
+ ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
+ # A ".." for each directory in $ac_dir_suffix.
+ ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
+ case $ac_top_builddir_sub in
+ "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
+ *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
+ esac ;;
+esac
+ac_abs_top_builddir=$ac_pwd
+ac_abs_builddir=$ac_pwd$ac_dir_suffix
+# for backward compatibility:
+ac_top_builddir=$ac_top_build_prefix
+
+case $srcdir in
+ .) # We are building in place.
+ ac_srcdir=.
+ ac_top_srcdir=$ac_top_builddir_sub
+ ac_abs_top_srcdir=$ac_pwd ;;
+ [\\/]* | ?:[\\/]* ) # Absolute name.
+ ac_srcdir=$srcdir$ac_dir_suffix;
+ ac_top_srcdir=$srcdir
+ ac_abs_top_srcdir=$srcdir ;;
+ *) # Relative name.
+ ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
+ ac_top_srcdir=$ac_top_build_prefix$srcdir
+ ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
+esac
+ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
+
+ cd "$ac_dir" || { ac_status=$?; continue; }
+ # Check for guested configure.
+ if test -f "$ac_srcdir/configure.gnu"; then
+ echo &&
+ $SHELL "$ac_srcdir/configure.gnu" --help=recursive
+ elif test -f "$ac_srcdir/configure"; then
+ echo &&
+ $SHELL "$ac_srcdir/configure" --help=recursive
+ else
+ $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
+ fi || ac_status=$?
+ cd "$ac_pwd" || { ac_status=$?; break; }
+ done
+fi
+
+test -n "$ac_init_help" && exit $ac_status
+if $ac_init_version; then
+ cat <<\_ACEOF
+newlib configure 2.4.0
+generated by GNU Autoconf 2.68
+
+Copyright (C) 2010 Free Software Foundation, Inc.
+This configure script is free software; the Free Software Foundation
+gives unlimited permission to copy, distribute and modify it.
+_ACEOF
+ exit
+fi
+
+## ------------------------ ##
+## Autoconf initialization. ##
+## ------------------------ ##
+
+# ac_fn_c_try_compile LINENO
+# --------------------------
+# Try to compile conftest.$ac_ext, and return whether this succeeded.
+ac_fn_c_try_compile ()
+{
+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ rm -f conftest.$ac_objext
+ if { { ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_compile") 2>conftest.err
+ ac_status=$?
+ if test -s conftest.err; then
+ grep -v '^ *+' conftest.err >conftest.er1
+ cat conftest.er1 >&5
+ mv -f conftest.er1 conftest.err
+ fi
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then :
+ ac_retval=0
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_retval=1
+fi
+ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+ as_fn_set_status $ac_retval
+
+} # ac_fn_c_try_compile
+cat >config.log <<_ACEOF
+This file contains any messages produced by compilers while
+running configure, to aid debugging if configure makes a mistake.
+
+It was created by newlib $as_me 2.4.0, which was
+generated by GNU Autoconf 2.68. Invocation command line was
+
+ $ $0 $@
+
+_ACEOF
+exec 5>>config.log
+{
+cat <<_ASUNAME
+## --------- ##
+## Platform. ##
+## --------- ##
+
+hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
+uname -m = `(uname -m) 2>/dev/null || echo unknown`
+uname -r = `(uname -r) 2>/dev/null || echo unknown`
+uname -s = `(uname -s) 2>/dev/null || echo unknown`
+uname -v = `(uname -v) 2>/dev/null || echo unknown`
+
+/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
+/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
+
+/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
+/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
+/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
+/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
+/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
+/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
+/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
+
+_ASUNAME
+
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ $as_echo "PATH: $as_dir"
+ done
+IFS=$as_save_IFS
+
+} >&5
+
+cat >&5 <<_ACEOF
+
+
+## ----------- ##
+## Core tests. ##
+## ----------- ##
+
+_ACEOF
+
+
+# Keep a trace of the command line.
+# Strip out --no-create and --no-recursion so they do not pile up.
+# Strip out --silent because we don't want to record it for future runs.
+# Also quote any args containing shell meta-characters.
+# Make two passes to allow for proper duplicate-argument suppression.
+ac_configure_args=
+ac_configure_args0=
+ac_configure_args1=
+ac_must_keep_next=false
+for ac_pass in 1 2
+do
+ for ac_arg
+ do
+ case $ac_arg in
+ -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
+ -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+ | -silent | --silent | --silen | --sile | --sil)
+ continue ;;
+ *\'*)
+ ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
+ esac
+ case $ac_pass in
+ 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
+ 2)
+ as_fn_append ac_configure_args1 " '$ac_arg'"
+ if test $ac_must_keep_next = true; then
+ ac_must_keep_next=false # Got value, back to normal.
+ else
+ case $ac_arg in
+ *=* | --config-cache | -C | -disable-* | --disable-* \
+ | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
+ | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
+ | -with-* | --with-* | -without-* | --without-* | --x)
+ case "$ac_configure_args0 " in
+ "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
+ esac
+ ;;
+ -* ) ac_must_keep_next=true ;;
+ esac
+ fi
+ as_fn_append ac_configure_args " '$ac_arg'"
+ ;;
+ esac
+ done
+done
+{ ac_configure_args0=; unset ac_configure_args0;}
+{ ac_configure_args1=; unset ac_configure_args1;}
+
+# When interrupted or exit'd, cleanup temporary files, and complete
+# config.log. We remove comments because anyway the quotes in there
+# would cause problems or look ugly.
+# WARNING: Use '\'' to represent an apostrophe within the trap.
+# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
+trap 'exit_status=$?
+ # Save into config.log some information that might help in debugging.
+ {
+ echo
+
+ $as_echo "## ---------------- ##
+## Cache variables. ##
+## ---------------- ##"
+ echo
+ # The following way of writing the cache mishandles newlines in values,
+(
+ for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
+ eval ac_val=\$$ac_var
+ case $ac_val in #(
+ *${as_nl}*)
+ case $ac_var in #(
+ *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
+$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
+ esac
+ case $ac_var in #(
+ _ | IFS | as_nl) ;; #(
+ BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
+ *) { eval $ac_var=; unset $ac_var;} ;;
+ esac ;;
+ esac
+ done
+ (set) 2>&1 |
+ case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
+ *${as_nl}ac_space=\ *)
+ sed -n \
+ "s/'\''/'\''\\\\'\'''\''/g;
+ s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
+ ;; #(
+ *)
+ sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
+ ;;
+ esac |
+ sort
+)
+ echo
+
+ $as_echo "## ----------------- ##
+## Output variables. ##
+## ----------------- ##"
+ echo
+ for ac_var in $ac_subst_vars
+ do
+ eval ac_val=\$$ac_var
+ case $ac_val in
+ *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
+ esac
+ $as_echo "$ac_var='\''$ac_val'\''"
+ done | sort
+ echo
+
+ if test -n "$ac_subst_files"; then
+ $as_echo "## ------------------- ##
+## File substitutions. ##
+## ------------------- ##"
+ echo
+ for ac_var in $ac_subst_files
+ do
+ eval ac_val=\$$ac_var
+ case $ac_val in
+ *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
+ esac
+ $as_echo "$ac_var='\''$ac_val'\''"
+ done | sort
+ echo
+ fi
+
+ if test -s confdefs.h; then
+ $as_echo "## ----------- ##
+## confdefs.h. ##
+## ----------- ##"
+ echo
+ cat confdefs.h
+ echo
+ fi
+ test "$ac_signal" != 0 &&
+ $as_echo "$as_me: caught signal $ac_signal"
+ $as_echo "$as_me: exit $exit_status"
+ } >&5
+ rm -f core *.core core.conftest.* &&
+ rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
+ exit $exit_status
+' 0
+for ac_signal in 1 2 13 15; do
+ trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
+done
+ac_signal=0
+
+# confdefs.h avoids OS command line length limits that DEFS can exceed.
+rm -f -r conftest* confdefs.h
+
+$as_echo "/* confdefs.h */" > confdefs.h
+
+# Predefined preprocessor variables.
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_NAME "$PACKAGE_NAME"
+_ACEOF
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
+_ACEOF
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_VERSION "$PACKAGE_VERSION"
+_ACEOF
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_STRING "$PACKAGE_STRING"
+_ACEOF
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
+_ACEOF
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_URL "$PACKAGE_URL"
+_ACEOF
+
+
+# Let the site file select an alternate cache file if it wants to.
+# Prefer an explicitly selected file to automatically selected ones.
+ac_site_file1=NONE
+ac_site_file2=NONE
+if test -n "$CONFIG_SITE"; then
+ # We do not want a PATH search for config.site.
+ case $CONFIG_SITE in #((
+ -*) ac_site_file1=./$CONFIG_SITE;;
+ */*) ac_site_file1=$CONFIG_SITE;;
+ *) ac_site_file1=./$CONFIG_SITE;;
+ esac
+elif test "x$prefix" != xNONE; then
+ ac_site_file1=$prefix/share/config.site
+ ac_site_file2=$prefix/etc/config.site
+else
+ ac_site_file1=$ac_default_prefix/share/config.site
+ ac_site_file2=$ac_default_prefix/etc/config.site
+fi
+for ac_site_file in "$ac_site_file1" "$ac_site_file2"
+do
+ test "x$ac_site_file" = xNONE && continue
+ if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
+$as_echo "$as_me: loading site script $ac_site_file" >&6;}
+ sed 's/^/| /' "$ac_site_file" >&5
+ . "$ac_site_file" \
+ || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "failed to load site script $ac_site_file
+See \`config.log' for more details" "$LINENO" 5; }
+ fi
+done
+
+if test -r "$cache_file"; then
+ # Some versions of bash will fail to source /dev/null (special files
+ # actually), so we avoid doing that. DJGPP emulates it as a regular file.
+ if test /dev/null != "$cache_file" && test -f "$cache_file"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
+$as_echo "$as_me: loading cache $cache_file" >&6;}
+ case $cache_file in
+ [\\/]* | ?:[\\/]* ) . "$cache_file";;
+ *) . "./$cache_file";;
+ esac
+ fi
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
+$as_echo "$as_me: creating cache $cache_file" >&6;}
+ >$cache_file
+fi
+
+# Check that the precious variables saved in the cache have kept the same
+# value.
+ac_cache_corrupted=false
+for ac_var in $ac_precious_vars; do
+ eval ac_old_set=\$ac_cv_env_${ac_var}_set
+ eval ac_new_set=\$ac_env_${ac_var}_set
+ eval ac_old_val=\$ac_cv_env_${ac_var}_value
+ eval ac_new_val=\$ac_env_${ac_var}_value
+ case $ac_old_set,$ac_new_set in
+ set,)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
+$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
+ ac_cache_corrupted=: ;;
+ ,set)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
+$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
+ ac_cache_corrupted=: ;;
+ ,);;
+ *)
+ if test "x$ac_old_val" != "x$ac_new_val"; then
+ # differences in whitespace do not lead to failure.
+ ac_old_val_w=`echo x $ac_old_val`
+ ac_new_val_w=`echo x $ac_new_val`
+ if test "$ac_old_val_w" != "$ac_new_val_w"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
+$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
+ ac_cache_corrupted=:
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
+$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
+ eval $ac_var=\$ac_old_val
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
+$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
+$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
+ fi;;
+ esac
+ # Pass precious variables to config.status.
+ if test "$ac_new_set" = set; then
+ case $ac_new_val in
+ *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
+ *) ac_arg=$ac_var=$ac_new_val ;;
+ esac
+ case " $ac_configure_args " in
+ *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
+ *) as_fn_append ac_configure_args " '$ac_arg'" ;;
+ esac
+ fi
+done
+if $ac_cache_corrupted; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
+$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
+ as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
+fi
+## -------------------- ##
+## Main body of script. ##
+## -------------------- ##
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+
+
+ac_aux_dir=
+for ac_dir in ../../../.. "$srcdir"/../../../..; do
+ if test -f "$ac_dir/install-sh"; then
+ ac_aux_dir=$ac_dir
+ ac_install_sh="$ac_aux_dir/install-sh -c"
+ break
+ elif test -f "$ac_dir/install.sh"; then
+ ac_aux_dir=$ac_dir
+ ac_install_sh="$ac_aux_dir/install.sh -c"
+ break
+ elif test -f "$ac_dir/shtool"; then
+ ac_aux_dir=$ac_dir
+ ac_install_sh="$ac_aux_dir/shtool install -c"
+ break
+ fi
+done
+if test -z "$ac_aux_dir"; then
+ as_fn_error $? "cannot find install-sh, install.sh, or shtool in ../../../.. \"$srcdir\"/../../../.." "$LINENO" 5
+fi
+
+# These three variables are undocumented and unsupported,
+# and are intended to be withdrawn in a future Autoconf release.
+# They can cause serious problems if a builder's source tree is in a directory
+# whose full name contains unusual characters.
+ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
+ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
+ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
+
+
+
+
+# Make sure we can run config.sub.
+$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
+ as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
+$as_echo_n "checking build system type... " >&6; }
+if ${ac_cv_build+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_build_alias=$build_alias
+test "x$ac_build_alias" = x &&
+ ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
+test "x$ac_build_alias" = x &&
+ as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
+ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
+ as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
+$as_echo "$ac_cv_build" >&6; }
+case $ac_cv_build in
+*-*-*) ;;
+*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
+esac
+build=$ac_cv_build
+ac_save_IFS=$IFS; IFS='-'
+set x $ac_cv_build
+shift
+build_cpu=$1
+build_vendor=$2
+shift; shift
+# Remember, the first character of IFS is used to create $*,
+# except with old shells:
+build_os=$*
+IFS=$ac_save_IFS
+case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
+$as_echo_n "checking host system type... " >&6; }
+if ${ac_cv_host+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test "x$host_alias" = x; then
+ ac_cv_host=$ac_cv_build
+else
+ ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
+ as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
+$as_echo "$ac_cv_host" >&6; }
+case $ac_cv_host in
+*-*-*) ;;
+*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
+esac
+host=$ac_cv_host
+ac_save_IFS=$IFS; IFS='-'
+set x $ac_cv_host
+shift
+host_cpu=$1
+host_vendor=$2
+shift; shift
+# Remember, the first character of IFS is used to create $*,
+# except with old shells:
+host_os=$*
+IFS=$ac_save_IFS
+case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
+
+
+am__api_version='1.11'
+
+# Find a good install program. We prefer a C program (faster),
+# so one script is as good as another. But avoid the broken or
+# incompatible versions:
+# SysV /etc/install, /usr/sbin/install
+# SunOS /usr/etc/install
+# IRIX /sbin/install
+# AIX /bin/install
+# AmigaOS /C/install, which installs bootblocks on floppy discs
+# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
+# AFS /usr/afsws/bin/install, which mishandles nonexistent args
+# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
+# OS/2's system install, which has a completely different semantic
+# ./install, which can be erroneously created by make from ./install.sh.
+# Reject install programs that cannot install multiple files.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
+$as_echo_n "checking for a BSD-compatible install... " >&6; }
+if test -z "$INSTALL"; then
+if ${ac_cv_path_install+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ # Account for people who put trailing slashes in PATH elements.
+case $as_dir/ in #((
+ ./ | .// | /[cC]/* | \
+ /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
+ ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
+ /usr/ucb/* ) ;;
+ *)
+ # OSF1 and SCO ODT 3.0 have their own names for install.
+ # Don't use installbsd from OSF since it installs stuff as root
+ # by default.
+ for ac_prog in ginstall scoinst install; do
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
+ if test $ac_prog = install &&
+ grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
+ # AIX install. It has an incompatible calling convention.
+ :
+ elif test $ac_prog = install &&
+ grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
+ # program-specific install script used by HP pwplus--don't use.
+ :
+ else
+ rm -rf conftest.one conftest.two conftest.dir
+ echo one > conftest.one
+ echo two > conftest.two
+ mkdir conftest.dir
+ if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
+ test -s conftest.one && test -s conftest.two &&
+ test -s conftest.dir/conftest.one &&
+ test -s conftest.dir/conftest.two
+ then
+ ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
+ break 3
+ fi
+ fi
+ fi
+ done
+ done
+ ;;
+esac
+
+ done
+IFS=$as_save_IFS
+
+rm -rf conftest.one conftest.two conftest.dir
+
+fi
+ if test "${ac_cv_path_install+set}" = set; then
+ INSTALL=$ac_cv_path_install
+ else
+ # As a last resort, use the slow shell script. Don't cache a
+ # value for INSTALL within a source directory, because that will
+ # break other packages using the cache if that directory is
+ # removed, or if the value is a relative name.
+ INSTALL=$ac_install_sh
+ fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
+$as_echo "$INSTALL" >&6; }
+
+# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
+# It thinks the first close brace ends the variable substitution.
+test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
+
+test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
+
+test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5
+$as_echo_n "checking whether build environment is sane... " >&6; }
+# Just in case
+sleep 1
+echo timestamp > conftest.file
+# Reject unsafe characters in $srcdir or the absolute working directory
+# name. Accept space and tab only in the latter.
+am_lf='
+'
+case `pwd` in
+ *[\\\"\#\$\&\'\`$am_lf]*)
+ as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5;;
+esac
+case $srcdir in
+ *[\\\"\#\$\&\'\`$am_lf\ \ ]*)
+ as_fn_error $? "unsafe srcdir value: \`$srcdir'" "$LINENO" 5;;
+esac
+
+# Do `set' in a subshell so we don't clobber the current shell's
+# arguments. Must try -L first in case configure is actually a
+# symlink; some systems play weird games with the mod time of symlinks
+# (eg FreeBSD returns the mod time of the symlink's containing
+# directory).
+if (
+ set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
+ if test "$*" = "X"; then
+ # -L didn't work.
+ set X `ls -t "$srcdir/configure" conftest.file`
+ fi
+ rm -f conftest.file
+ if test "$*" != "X $srcdir/configure conftest.file" \
+ && test "$*" != "X conftest.file $srcdir/configure"; then
+
+ # If neither matched, then we have a broken ls. This can happen
+ # if, for instance, CONFIG_SHELL is bash and it inherits a
+ # broken ls alias from the environment. This has actually
+ # happened. Such a system could not be considered "sane".
+ as_fn_error $? "ls -t appears to fail. Make sure there is not a broken
+alias in your environment" "$LINENO" 5
+ fi
+
+ test "$2" = conftest.file
+ )
+then
+ # Ok.
+ :
+else
+ as_fn_error $? "newly created file is older than distributed files!
+Check your system clock" "$LINENO" 5
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+test "$program_prefix" != NONE &&
+ program_transform_name="s&^&$program_prefix&;$program_transform_name"
+# Use a double $ so make ignores it.
+test "$program_suffix" != NONE &&
+ program_transform_name="s&\$&$program_suffix&;$program_transform_name"
+# Double any \ or $.
+# By default was `s,x,x', remove it if useless.
+ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
+program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"`
+
+# expand $ac_aux_dir to an absolute path
+am_aux_dir=`cd $ac_aux_dir && pwd`
+
+if test x"${MISSING+set}" != xset; then
+ case $am_aux_dir in
+ *\ * | *\ *)
+ MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
+ *)
+ MISSING="\${SHELL} $am_aux_dir/missing" ;;
+ esac
+fi
+# Use eval to expand $SHELL
+if eval "$MISSING --run true"; then
+ am_missing_run="$MISSING --run "
+else
+ am_missing_run=
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`missing' script is too old or missing" >&5
+$as_echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;}
+fi
+
+if test x"${install_sh}" != xset; then
+ case $am_aux_dir in
+ *\ * | *\ *)
+ install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
+ *)
+ install_sh="\${SHELL} $am_aux_dir/install-sh"
+ esac
+fi
+
+# Installed binaries are usually stripped using `strip' when the user
+# run `make install-strip'. However `strip' might not be the right
+# tool to use in cross-compilation environments, therefore Automake
+# will honor the `STRIP' environment variable to overrule this program.
+if test "$cross_compiling" != no; then
+ if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
+set dummy ${ac_tool_prefix}strip; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_STRIP+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$STRIP"; then
+ ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_STRIP="${ac_tool_prefix}strip"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+STRIP=$ac_cv_prog_STRIP
+if test -n "$STRIP"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
+$as_echo "$STRIP" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_STRIP"; then
+ ac_ct_STRIP=$STRIP
+ # Extract the first word of "strip", so it can be a program name with args.
+set dummy strip; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_ct_STRIP"; then
+ ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_ac_ct_STRIP="strip"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
+if test -n "$ac_ct_STRIP"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
+$as_echo "$ac_ct_STRIP" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+ if test "x$ac_ct_STRIP" = x; then
+ STRIP=":"
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ STRIP=$ac_ct_STRIP
+ fi
+else
+ STRIP="$ac_cv_prog_STRIP"
+fi
+
+fi
+INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
+$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
+if test -z "$MKDIR_P"; then
+ if ${ac_cv_path_mkdir+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_prog in mkdir gmkdir; do
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; } || continue
+ case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
+ 'mkdir (GNU coreutils) '* | \
+ 'mkdir (coreutils) '* | \
+ 'mkdir (fileutils) '4.1*)
+ ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
+ break 3;;
+ esac
+ done
+ done
+ done
+IFS=$as_save_IFS
+
+fi
+
+ test -d ./--version && rmdir ./--version
+ if test "${ac_cv_path_mkdir+set}" = set; then
+ MKDIR_P="$ac_cv_path_mkdir -p"
+ else
+ # As a last resort, use the slow shell script. Don't cache a
+ # value for MKDIR_P within a source directory, because that will
+ # break other packages using the cache if that directory is
+ # removed, or if the value is a relative name.
+ MKDIR_P="$ac_install_sh -d"
+ fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
+$as_echo "$MKDIR_P" >&6; }
+
+mkdir_p="$MKDIR_P"
+case $mkdir_p in
+ [\\/$]* | ?:[\\/]*) ;;
+ */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
+esac
+
+for ac_prog in gawk mawk nawk awk
+do
+ # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_AWK+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$AWK"; then
+ ac_cv_prog_AWK="$AWK" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_AWK="$ac_prog"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+AWK=$ac_cv_prog_AWK
+if test -n "$AWK"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
+$as_echo "$AWK" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+ test -n "$AWK" && break
+done
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
+$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
+set x ${MAKE-make}
+ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
+if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat >conftest.make <<\_ACEOF
+SHELL = /bin/sh
+all:
+ @echo '@@@%%%=$(MAKE)=@@@%%%'
+_ACEOF
+# GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
+case `${MAKE-make} -f conftest.make 2>/dev/null` in
+ *@@@%%%=?*=@@@%%%*)
+ eval ac_cv_prog_make_${ac_make}_set=yes;;
+ *)
+ eval ac_cv_prog_make_${ac_make}_set=no;;
+esac
+rm -f conftest.make
+fi
+if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+ SET_MAKE=
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+ SET_MAKE="MAKE=${MAKE-make}"
+fi
+
+rm -rf .tst 2>/dev/null
+mkdir .tst 2>/dev/null
+if test -d .tst; then
+ am__leading_dot=.
+else
+ am__leading_dot=_
+fi
+rmdir .tst 2>/dev/null
+
+DEPDIR="${am__leading_dot}deps"
+
+ac_config_commands="$ac_config_commands depfiles"
+
+
+am_make=${MAKE-make}
+cat > confinc << 'END'
+am__doit:
+ @echo this is the am__doit target
+.PHONY: am__doit
+END
+# If we don't find an include directive, just comment out the code.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5
+$as_echo_n "checking for style of include used by $am_make... " >&6; }
+am__include="#"
+am__quote=
+_am_result=none
+# First try GNU make style include.
+echo "include confinc" > confmf
+# Ignore all kinds of additional output from `make'.
+case `$am_make -s -f confmf 2> /dev/null` in #(
+*the\ am__doit\ target*)
+ am__include=include
+ am__quote=
+ _am_result=GNU
+ ;;
+esac
+# Now try BSD make style include.
+if test "$am__include" = "#"; then
+ echo '.include "confinc"' > confmf
+ case `$am_make -s -f confmf 2> /dev/null` in #(
+ *the\ am__doit\ target*)
+ am__include=.include
+ am__quote="\""
+ _am_result=BSD
+ ;;
+ esac
+fi
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5
+$as_echo "$_am_result" >&6; }
+rm -f confinc confmf
+
+# Check whether --enable-dependency-tracking was given.
+if test "${enable_dependency_tracking+set}" = set; then :
+ enableval=$enable_dependency_tracking;
+fi
+
+if test "x$enable_dependency_tracking" != xno; then
+ am_depcomp="$ac_aux_dir/depcomp"
+ AMDEPBACKSLASH='\'
+ am__nodep='_no'
+fi
+ if test "x$enable_dependency_tracking" != xno; then
+ AMDEP_TRUE=
+ AMDEP_FALSE='#'
+else
+ AMDEP_TRUE='#'
+ AMDEP_FALSE=
+fi
+
+
+
+# Check whether --enable-multilib was given.
+if test "${enable_multilib+set}" = set; then :
+ enableval=$enable_multilib; case "${enableval}" in
+ yes) multilib=yes ;;
+ no) multilib=no ;;
+ *) as_fn_error $? "bad value ${enableval} for multilib option" "$LINENO" 5 ;;
+ esac
+else
+ multilib=yes
+fi
+
+# Check whether --enable-target-optspace was given.
+if test "${enable_target_optspace+set}" = set; then :
+ enableval=$enable_target_optspace; case "${enableval}" in
+ yes) target_optspace=yes ;;
+ no) target_optspace=no ;;
+ *) as_fn_error $? "bad value ${enableval} for target-optspace option" "$LINENO" 5 ;;
+ esac
+else
+ target_optspace=
+fi
+
+# Check whether --enable-malloc-debugging was given.
+if test "${enable_malloc_debugging+set}" = set; then :
+ enableval=$enable_malloc_debugging; case "${enableval}" in
+ yes) malloc_debugging=yes ;;
+ no) malloc_debugging=no ;;
+ *) as_fn_error $? "bad value ${enableval} for malloc-debugging option" "$LINENO" 5 ;;
+ esac
+else
+ malloc_debugging=
+fi
+
+# Check whether --enable-newlib-multithread was given.
+if test "${enable_newlib_multithread+set}" = set; then :
+ enableval=$enable_newlib_multithread; case "${enableval}" in
+ yes) newlib_multithread=yes ;;
+ no) newlib_multithread=no ;;
+ *) as_fn_error $? "bad value ${enableval} for newlib-multithread option" "$LINENO" 5 ;;
+ esac
+else
+ newlib_multithread=yes
+fi
+
+# Check whether --enable-newlib-iconv was given.
+if test "${enable_newlib_iconv+set}" = set; then :
+ enableval=$enable_newlib_iconv; if test "${newlib_iconv+set}" != set; then
+ case "${enableval}" in
+ yes) newlib_iconv=yes ;;
+ no) newlib_iconv=no ;;
+ *) as_fn_error $? "bad value ${enableval} for newlib-iconv option" "$LINENO" 5 ;;
+ esac
+ fi
+else
+ newlib_iconv=${newlib_iconv}
+fi
+
+# Check whether --enable-newlib-elix-level was given.
+if test "${enable_newlib_elix_level+set}" = set; then :
+ enableval=$enable_newlib_elix_level; case "${enableval}" in
+ 0) newlib_elix_level=0 ;;
+ 1) newlib_elix_level=1 ;;
+ 2) newlib_elix_level=2 ;;
+ 3) newlib_elix_level=3 ;;
+ 4) newlib_elix_level=4 ;;
+ *) as_fn_error $? "bad value ${enableval} for newlib-elix-level option" "$LINENO" 5 ;;
+ esac
+else
+ newlib_elix_level=0
+fi
+
+# Check whether --enable-newlib-io-float was given.
+if test "${enable_newlib_io_float+set}" = set; then :
+ enableval=$enable_newlib_io_float; case "${enableval}" in
+ yes) newlib_io_float=yes ;;
+ no) newlib_io_float=no ;;
+ *) as_fn_error $? "bad value ${enableval} for newlib-io-float option" "$LINENO" 5 ;;
+ esac
+else
+ newlib_io_float=yes
+fi
+
+# Check whether --enable-newlib-supplied-syscalls was given.
+if test "${enable_newlib_supplied_syscalls+set}" = set; then :
+ enableval=$enable_newlib_supplied_syscalls; case "${enableval}" in
+ yes) newlib_may_supply_syscalls=yes ;;
+ no) newlib_may_supply_syscalls=no ;;
+ *) as_fn_error $? "bad value ${enableval} for newlib-supplied-syscalls option" "$LINENO" 5 ;;
+ esac
+else
+ newlib_may_supply_syscalls=yes
+fi
+
+ if test x${newlib_may_supply_syscalls} = xyes; then
+ MAY_SUPPLY_SYSCALLS_TRUE=
+ MAY_SUPPLY_SYSCALLS_FALSE='#'
+else
+ MAY_SUPPLY_SYSCALLS_TRUE='#'
+ MAY_SUPPLY_SYSCALLS_FALSE=
+fi
+
+
+
+test -z "${with_target_subdir}" && with_target_subdir=.
+
+if test "${srcdir}" = "."; then
+ if test "${with_target_subdir}" != "."; then
+ newlib_basedir="${srcdir}/${with_multisrctop}../../../.."
+ else
+ newlib_basedir="${srcdir}/${with_multisrctop}../../.."
+ fi
+else
+ newlib_basedir="${srcdir}/../../.."
+fi
+
+
+
+
+if test "`cd $srcdir && pwd`" != "`pwd`"; then
+ # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
+ # is not polluted with repeated "-I."
+ am__isrc=' -I$(srcdir)'
+ # test to see if srcdir already configured
+ if test -f $srcdir/config.status; then
+ as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5
+ fi
+fi
+
+# test whether we have cygpath
+if test -z "$CYGPATH_W"; then
+ if (cygpath --version) >/dev/null 2>/dev/null; then
+ CYGPATH_W='cygpath -w'
+ else
+ CYGPATH_W=echo
+ fi
+fi
+
+
+# Define the identity of the package.
+ PACKAGE='newlib'
+ VERSION='2.4.0'
+
+
+# Some tools Automake needs.
+
+ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"}
+
+
+AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"}
+
+
+AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"}
+
+
+AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"}
+
+
+MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
+
+# We need awk for the "check" target. The system "awk" is bad on
+# some platforms.
+# Always define AMTAR for backward compatibility. Yes, it's still used
+# in the wild :-( We should find a proper way to deprecate it ...
+AMTAR='$${TAR-tar}'
+
+am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'
+
+
+
+
+
+
+# FIXME: We temporarily define our own version of AC_PROG_CC. This is
+# copied from autoconf 2.12, but does not call AC_PROG_CC_WORKS. We
+# are probably using a cross compiler, which will not be able to fully
+# link an executable. This should really be fixed in autoconf
+# itself.
+
+
+
+
+
+
+
+# Extract the first word of "gcc", so it can be a program name with args.
+set dummy gcc; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_CC+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_CC="gcc"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+$as_echo "$CC" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+
+depcc="$CC" am_compiler_list=
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
+$as_echo_n "checking dependency style of $depcc... " >&6; }
+if ${am_cv_CC_dependencies_compiler_type+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
+ # We make a subdir and do the tests there. Otherwise we can end up
+ # making bogus files that we don't know about and never remove. For
+ # instance it was reported that on HP-UX the gcc test will end up
+ # making a dummy file named `D' -- because `-MD' means `put the output
+ # in D'.
+ rm -rf conftest.dir
+ mkdir conftest.dir
+ # Copy depcomp to subdir because otherwise we won't find it if we're
+ # using a relative directory.
+ cp "$am_depcomp" conftest.dir
+ cd conftest.dir
+ # We will build objects and dependencies in a subdirectory because
+ # it helps to detect inapplicable dependency modes. For instance
+ # both Tru64's cc and ICC support -MD to output dependencies as a
+ # side effect of compilation, but ICC will put the dependencies in
+ # the current directory while Tru64 will put them in the object
+ # directory.
+ mkdir sub
+
+ am_cv_CC_dependencies_compiler_type=none
+ if test "$am_compiler_list" = ""; then
+ am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
+ fi
+ am__universal=false
+ case " $depcc " in #(
+ *\ -arch\ *\ -arch\ *) am__universal=true ;;
+ esac
+
+ for depmode in $am_compiler_list; do
+ # Setup a source with many dependencies, because some compilers
+ # like to wrap large dependency lists on column 80 (with \), and
+ # we should not choose a depcomp mode which is confused by this.
+ #
+ # We need to recreate these files for each test, as the compiler may
+ # overwrite some of them when testing with obscure command lines.
+ # This happens at least with the AIX C compiler.
+ : > sub/conftest.c
+ for i in 1 2 3 4 5 6; do
+ echo '#include "conftst'$i'.h"' >> sub/conftest.c
+ # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
+ # Solaris 8's {/usr,}/bin/sh.
+ touch sub/conftst$i.h
+ done
+ echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
+
+ # We check with `-c' and `-o' for the sake of the "dashmstdout"
+ # mode. It turns out that the SunPro C++ compiler does not properly
+ # handle `-M -o', and we need to detect this. Also, some Intel
+ # versions had trouble with output in subdirs
+ am__obj=sub/conftest.${OBJEXT-o}
+ am__minus_obj="-o $am__obj"
+ case $depmode in
+ gcc)
+ # This depmode causes a compiler race in universal mode.
+ test "$am__universal" = false || continue
+ ;;
+ nosideeffect)
+ # after this tag, mechanisms are not by side-effect, so they'll
+ # only be used when explicitly requested
+ if test "x$enable_dependency_tracking" = xyes; then
+ continue
+ else
+ break
+ fi
+ ;;
+ msvc7 | msvc7msys | msvisualcpp | msvcmsys)
+ # This compiler won't grok `-c -o', but also, the minuso test has
+ # not run yet. These depmodes are late enough in the game, and
+ # so weak that their functioning should not be impacted.
+ am__obj=conftest.${OBJEXT-o}
+ am__minus_obj=
+ ;;
+ none) break ;;
+ esac
+ if depmode=$depmode \
+ source=sub/conftest.c object=$am__obj \
+ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
+ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
+ >/dev/null 2>conftest.err &&
+ grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
+ grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
+ grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
+ ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
+ # icc doesn't choke on unknown options, it will just issue warnings
+ # or remarks (even with -Werror). So we grep stderr for any message
+ # that says an option was ignored or not supported.
+ # When given -MP, icc 7.0 and 7.1 complain thusly:
+ # icc: Command line warning: ignoring option '-M'; no argument required
+ # The diagnosis changed in icc 8.0:
+ # icc: Command line remark: option '-MP' not supported
+ if (grep 'ignoring option' conftest.err ||
+ grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
+ am_cv_CC_dependencies_compiler_type=$depmode
+ break
+ fi
+ fi
+ done
+
+ cd ..
+ rm -rf conftest.dir
+else
+ am_cv_CC_dependencies_compiler_type=none
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
+$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; }
+CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
+
+ if
+ test "x$enable_dependency_tracking" != xno \
+ && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then
+ am__fastdepCC_TRUE=
+ am__fastdepCC_FALSE='#'
+else
+ am__fastdepCC_TRUE='#'
+ am__fastdepCC_FALSE=
+fi
+
+
+if test -z "$CC"; then
+ # Extract the first word of "cc", so it can be a program name with args.
+set dummy cc; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_CC+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+ ac_prog_rejected=no
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
+ ac_prog_rejected=yes
+ continue
+ fi
+ ac_cv_prog_CC="cc"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+if test $ac_prog_rejected = yes; then
+ # We found a bogon in the path, so make sure we never use it.
+ set dummy $ac_cv_prog_CC
+ shift
+ if test $# != 0; then
+ # We chose a different compiler from the bogus one.
+ # However, it has the same basename, so the bogon will be chosen
+ # first if we set CC to just the basename; use the full file name.
+ shift
+ ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
+ fi
+fi
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+$as_echo "$CC" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+ test -z "$CC" && as_fn_error $? "no acceptable cc found in \$PATH" "$LINENO" 5
+fi
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using GNU C" >&5
+$as_echo_n "checking whether we are using GNU C... " >&6; }
+if ${ac_cv_c_compiler_gnu+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat > conftest.c <<EOF
+#ifdef __GNUC__
+ yes;
+#endif
+EOF
+if { ac_try='${CC-cc} -E conftest.c'
+ { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; } | egrep yes >/dev/null 2>&1; then
+ ac_cv_c_compiler_gnu=yes
+else
+ ac_cv_c_compiler_gnu=no
+fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
+$as_echo "$ac_cv_c_compiler_gnu" >&6; }
+
+if test $ac_cv_c_compiler_gnu = yes; then
+ GCC=yes
+ ac_test_CFLAGS="${CFLAGS+set}"
+ ac_save_CFLAGS="$CFLAGS"
+ ac_test_CFLAGS=${CFLAGS+set}
+ac_save_CFLAGS=$CFLAGS
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
+$as_echo_n "checking whether $CC accepts -g... " >&6; }
+if ${ac_cv_prog_cc_g+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_save_c_werror_flag=$ac_c_werror_flag
+ ac_c_werror_flag=yes
+ ac_cv_prog_cc_g=no
+ CFLAGS="-g"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ ac_cv_prog_cc_g=yes
+else
+ CFLAGS=""
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+
+else
+ ac_c_werror_flag=$ac_save_c_werror_flag
+ CFLAGS="-g"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ ac_cv_prog_cc_g=yes
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ ac_c_werror_flag=$ac_save_c_werror_flag
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
+$as_echo "$ac_cv_prog_cc_g" >&6; }
+if test "$ac_test_CFLAGS" = set; then
+ CFLAGS=$ac_save_CFLAGS
+elif test $ac_cv_prog_cc_g = yes; then
+ if test "$GCC" = yes; then
+ CFLAGS="-g -O2"
+ else
+ CFLAGS="-g"
+ fi
+else
+ if test "$GCC" = yes; then
+ CFLAGS="-O2"
+ else
+ CFLAGS=
+ fi
+fi
+ if test "$ac_test_CFLAGS" = set; then
+ CFLAGS="$ac_save_CFLAGS"
+ elif test $ac_cv_prog_cc_g = yes; then
+ CFLAGS="-g -O2"
+ else
+ CFLAGS="-O2"
+ fi
+else
+ GCC=
+ test "${CFLAGS+set}" = set || CFLAGS="-g"
+fi
+
+
+if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args.
+set dummy ${ac_tool_prefix}as; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_AS+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$AS"; then
+ ac_cv_prog_AS="$AS" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_AS="${ac_tool_prefix}as"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+AS=$ac_cv_prog_AS
+if test -n "$AS"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
+$as_echo "$AS" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_AS"; then
+ ac_ct_AS=$AS
+ # Extract the first word of "as", so it can be a program name with args.
+set dummy as; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_AS+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_ct_AS"; then
+ ac_cv_prog_ac_ct_AS="$ac_ct_AS" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_ac_ct_AS="as"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_AS=$ac_cv_prog_ac_ct_AS
+if test -n "$ac_ct_AS"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AS" >&5
+$as_echo "$ac_ct_AS" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+ if test "x$ac_ct_AS" = x; then
+ AS=""
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ AS=$ac_ct_AS
+ fi
+else
+ AS="$ac_cv_prog_AS"
+fi
+
+if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
+set dummy ${ac_tool_prefix}ar; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_AR+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$AR"; then
+ ac_cv_prog_AR="$AR" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_AR="${ac_tool_prefix}ar"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+AR=$ac_cv_prog_AR
+if test -n "$AR"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
+$as_echo "$AR" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_AR"; then
+ ac_ct_AR=$AR
+ # Extract the first word of "ar", so it can be a program name with args.
+set dummy ar; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_AR+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_ct_AR"; then
+ ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_ac_ct_AR="ar"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_AR=$ac_cv_prog_ac_ct_AR
+if test -n "$ac_ct_AR"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
+$as_echo "$ac_ct_AR" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+ if test "x$ac_ct_AR" = x; then
+ AR=""
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ AR=$ac_ct_AR
+ fi
+else
+ AR="$ac_cv_prog_AR"
+fi
+
+if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
+set dummy ${ac_tool_prefix}ranlib; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_RANLIB+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$RANLIB"; then
+ ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+RANLIB=$ac_cv_prog_RANLIB
+if test -n "$RANLIB"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
+$as_echo "$RANLIB" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_RANLIB"; then
+ ac_ct_RANLIB=$RANLIB
+ # Extract the first word of "ranlib", so it can be a program name with args.
+set dummy ranlib; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_ct_RANLIB"; then
+ ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_ac_ct_RANLIB="ranlib"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
+if test -n "$ac_ct_RANLIB"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
+$as_echo "$ac_ct_RANLIB" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+ if test "x$ac_ct_RANLIB" = x; then
+ RANLIB=":"
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ RANLIB=$ac_ct_RANLIB
+ fi
+else
+ RANLIB="$ac_cv_prog_RANLIB"
+fi
+
+if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}readelf", so it can be a program name with args.
+set dummy ${ac_tool_prefix}readelf; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_READELF+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$READELF"; then
+ ac_cv_prog_READELF="$READELF" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_READELF="${ac_tool_prefix}readelf"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+READELF=$ac_cv_prog_READELF
+if test -n "$READELF"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
+$as_echo "$READELF" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_READELF"; then
+ ac_ct_READELF=$READELF
+ # Extract the first word of "readelf", so it can be a program name with args.
+set dummy readelf; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_READELF+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_ct_READELF"; then
+ ac_cv_prog_ac_ct_READELF="$ac_ct_READELF" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_ac_ct_READELF="readelf"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_READELF=$ac_cv_prog_ac_ct_READELF
+if test -n "$ac_ct_READELF"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_READELF" >&5
+$as_echo "$ac_ct_READELF" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+ if test "x$ac_ct_READELF" = x; then
+ READELF=":"
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ READELF=$ac_ct_READELF
+ fi
+else
+ READELF="$ac_cv_prog_READELF"
+fi
+
+
+
+
+# Hack to ensure that INSTALL won't be set to "../" with autoconf 2.13. */
+ac_given_INSTALL=$INSTALL
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5
+$as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; }
+ # Check whether --enable-maintainer-mode was given.
+if test "${enable_maintainer_mode+set}" = set; then :
+ enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval
+else
+ USE_MAINTAINER_MODE=no
+fi
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_MAINTAINER_MODE" >&5
+$as_echo "$USE_MAINTAINER_MODE" >&6; }
+ if test $USE_MAINTAINER_MODE = yes; then
+ MAINTAINER_MODE_TRUE=
+ MAINTAINER_MODE_FALSE='#'
+else
+ MAINTAINER_MODE_TRUE='#'
+ MAINTAINER_MODE_FALSE=
+fi
+
+ MAINT=$MAINTAINER_MODE_TRUE
+
+
+# By default we simply use the C compiler to build assembly code.
+
+test "${CCAS+set}" = set || CCAS=$CC
+test "${CCASFLAGS+set}" = set || CCASFLAGS=$CFLAGS
+
+
+
+
+# We need AC_EXEEXT to keep automake happy in cygnus mode. However,
+# at least currently, we never actually build a program, so we never
+# need to use $(EXEEXT). Moreover, the test for EXEEXT normally
+# fails, because we are probably configuring with a cross compiler
+# which can't create executables. So we include AC_EXEEXT to keep
+# automake happy, but we don't execute it, since we don't care about
+# the result.
+if false; then
+
+ dummy_var=1
+fi
+
+. ${newlib_basedir}/configure.host
+
+newlib_cflags="${newlib_cflags} -fno-builtin"
+
+NEWLIB_CFLAGS=${newlib_cflags}
+
+
+NO_INCLUDE_LIST=${noinclude}
+
+
+LDFLAGS=${ldflags}
+
+
+ if test x${newlib_elix_level} = x0; then
+ ELIX_LEVEL_0_TRUE=
+ ELIX_LEVEL_0_FALSE='#'
+else
+ ELIX_LEVEL_0_TRUE='#'
+ ELIX_LEVEL_0_FALSE=
+fi
+
+ if test x${newlib_elix_level} = x1; then
+ ELIX_LEVEL_1_TRUE=
+ ELIX_LEVEL_1_FALSE='#'
+else
+ ELIX_LEVEL_1_TRUE='#'
+ ELIX_LEVEL_1_FALSE=
+fi
+
+ if test x${newlib_elix_level} = x2; then
+ ELIX_LEVEL_2_TRUE=
+ ELIX_LEVEL_2_FALSE='#'
+else
+ ELIX_LEVEL_2_TRUE='#'
+ ELIX_LEVEL_2_FALSE=
+fi
+
+ if test x${newlib_elix_level} = x3; then
+ ELIX_LEVEL_3_TRUE=
+ ELIX_LEVEL_3_FALSE='#'
+else
+ ELIX_LEVEL_3_TRUE='#'
+ ELIX_LEVEL_3_FALSE=
+fi
+
+ if test x${newlib_elix_level} = x4; then
+ ELIX_LEVEL_4_TRUE=
+ ELIX_LEVEL_4_FALSE='#'
+else
+ ELIX_LEVEL_4_TRUE='#'
+ ELIX_LEVEL_4_FALSE=
+fi
+
+
+ if test x${use_libtool} = xyes; then
+ USE_LIBTOOL_TRUE=
+ USE_LIBTOOL_FALSE='#'
+else
+ USE_LIBTOOL_TRUE='#'
+ USE_LIBTOOL_FALSE=
+fi
+
+
+# Hard-code OBJEXT. Normally it is set by AC_OBJEXT, but we
+# use oext, which is set in configure.host based on the target platform.
+OBJEXT=${oext}
+
+
+
+
+
+
+
+
+
+
+
+ac_config_files="$ac_config_files Makefile"
+
+cat >confcache <<\_ACEOF
+# This file is a shell script that caches the results of configure
+# tests run on this system so they can be shared between configure
+# scripts and configure runs, see configure's option --config-cache.
+# It is not useful on other systems. If it contains results you don't
+# want to keep, you may remove or edit it.
+#
+# config.status only pays attention to the cache file if you give it
+# the --recheck option to rerun configure.
+#
+# `ac_cv_env_foo' variables (set or unset) will be overridden when
+# loading this file, other *unset* `ac_cv_foo' will be assigned the
+# following values.
+
+_ACEOF
+
+# The following way of writing the cache mishandles newlines in values,
+# but we know of no workaround that is simple, portable, and efficient.
+# So, we kill variables containing newlines.
+# Ultrix sh set writes to stderr and can't be redirected directly,
+# and sets the high bit in the cache file unless we assign to the vars.
+(
+ for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
+ eval ac_val=\$$ac_var
+ case $ac_val in #(
+ *${as_nl}*)
+ case $ac_var in #(
+ *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
+$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
+ esac
+ case $ac_var in #(
+ _ | IFS | as_nl) ;; #(
+ BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
+ *) { eval $ac_var=; unset $ac_var;} ;;
+ esac ;;
+ esac
+ done
+
+ (set) 2>&1 |
+ case $as_nl`(ac_space=' '; set) 2>&1` in #(
+ *${as_nl}ac_space=\ *)
+ # `set' does not quote correctly, so add quotes: double-quote
+ # substitution turns \\\\ into \\, and sed turns \\ into \.
+ sed -n \
+ "s/'/'\\\\''/g;
+ s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
+ ;; #(
+ *)
+ # `set' quotes correctly as required by POSIX, so do not add quotes.
+ sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
+ ;;
+ esac |
+ sort
+) |
+ sed '
+ /^ac_cv_env_/b end
+ t clear
+ :clear
+ s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
+ t end
+ s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
+ :end' >>confcache
+if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
+ if test -w "$cache_file"; then
+ if test "x$cache_file" != "x/dev/null"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
+$as_echo "$as_me: updating cache $cache_file" >&6;}
+ if test ! -f "$cache_file" || test -h "$cache_file"; then
+ cat confcache >"$cache_file"
+ else
+ case $cache_file in #(
+ */* | ?:*)
+ mv -f confcache "$cache_file"$$ &&
+ mv -f "$cache_file"$$ "$cache_file" ;; #(
+ *)
+ mv -f confcache "$cache_file" ;;
+ esac
+ fi
+ fi
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
+$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
+ fi
+fi
+rm -f confcache
+
+test "x$prefix" = xNONE && prefix=$ac_default_prefix
+# Let make expand exec_prefix.
+test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
+
+# Transform confdefs.h into DEFS.
+# Protect against shell expansion while executing Makefile rules.
+# Protect against Makefile macro expansion.
+#
+# If the first sed substitution is executed (which looks for macros that
+# take arguments), then branch to the quote section. Otherwise,
+# look for a macro that doesn't take arguments.
+ac_script='
+:mline
+/\\$/{
+ N
+ s,\\\n,,
+ b mline
+}
+t clear
+:clear
+s/^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*([^)]*)\)[ ]*\(.*\)/-D\1=\2/g
+t quote
+s/^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)/-D\1=\2/g
+t quote
+b any
+:quote
+s/[ `~#$^&*(){}\\|;'\''"<>?]/\\&/g
+s/\[/\\&/g
+s/\]/\\&/g
+s/\$/$$/g
+H
+:any
+${
+ g
+ s/^\n//
+ s/\n/ /g
+ p
+}
+'
+DEFS=`sed -n "$ac_script" confdefs.h`
+
+
+ac_libobjs=
+ac_ltlibobjs=
+U=
+for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
+ # 1. Remove the extension, and $U if already installed.
+ ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
+ ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
+ # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
+ # will be set to the directory where LIBOBJS objects are built.
+ as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
+ as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
+done
+LIBOBJS=$ac_libobjs
+
+LTLIBOBJS=$ac_ltlibobjs
+
+
+if test -z "${MAY_SUPPLY_SYSCALLS_TRUE}" && test -z "${MAY_SUPPLY_SYSCALLS_FALSE}"; then
+ as_fn_error $? "conditional \"MAY_SUPPLY_SYSCALLS\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+
+if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then
+ as_fn_error $? "conditional \"AMDEP\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
+ as_fn_error $? "conditional \"am__fastdepCC\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then
+ as_fn_error $? "conditional \"MAINTAINER_MODE\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${ELIX_LEVEL_0_TRUE}" && test -z "${ELIX_LEVEL_0_FALSE}"; then
+ as_fn_error $? "conditional \"ELIX_LEVEL_0\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${ELIX_LEVEL_1_TRUE}" && test -z "${ELIX_LEVEL_1_FALSE}"; then
+ as_fn_error $? "conditional \"ELIX_LEVEL_1\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${ELIX_LEVEL_2_TRUE}" && test -z "${ELIX_LEVEL_2_FALSE}"; then
+ as_fn_error $? "conditional \"ELIX_LEVEL_2\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${ELIX_LEVEL_3_TRUE}" && test -z "${ELIX_LEVEL_3_FALSE}"; then
+ as_fn_error $? "conditional \"ELIX_LEVEL_3\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${ELIX_LEVEL_4_TRUE}" && test -z "${ELIX_LEVEL_4_FALSE}"; then
+ as_fn_error $? "conditional \"ELIX_LEVEL_4\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${USE_LIBTOOL_TRUE}" && test -z "${USE_LIBTOOL_FALSE}"; then
+ as_fn_error $? "conditional \"USE_LIBTOOL\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+
+: "${CONFIG_STATUS=./config.status}"
+ac_write_fail=0
+ac_clean_files_save=$ac_clean_files
+ac_clean_files="$ac_clean_files $CONFIG_STATUS"
+{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
+$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
+as_write_fail=0
+cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
+#! $SHELL
+# Generated by $as_me.
+# Run this file to recreate the current configuration.
+# Compiler output produced by configure, useful for debugging
+# configure, is in config.log if it exists.
+
+debug=false
+ac_cs_recheck=false
+ac_cs_silent=false
+
+SHELL=\${CONFIG_SHELL-$SHELL}
+export SHELL
+_ASEOF
+cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
+## -------------------- ##
+## M4sh Initialization. ##
+## -------------------- ##
+
+# Be more Bourne compatible
+DUALCASE=1; export DUALCASE # for MKS sh
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
+ emulate sh
+ NULLCMD=:
+ # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
+ # is contrary to our usage. Disable this feature.
+ alias -g '${1+"$@"}'='"$@"'
+ setopt NO_GLOB_SUBST
+else
+ case `(set -o) 2>/dev/null` in #(
+ *posix*) :
+ set -o posix ;; #(
+ *) :
+ ;;
+esac
+fi
+
+
+as_nl='
+'
+export as_nl
+# Printing a long string crashes Solaris 7 /usr/bin/printf.
+as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
+as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
+as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
+# Prefer a ksh shell builtin over an external printf program on Solaris,
+# but without wasting forks for bash or zsh.
+if test -z "$BASH_VERSION$ZSH_VERSION" \
+ && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
+ as_echo='print -r --'
+ as_echo_n='print -rn --'
+elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
+ as_echo='printf %s\n'
+ as_echo_n='printf %s'
+else
+ if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
+ as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
+ as_echo_n='/usr/ucb/echo -n'
+ else
+ as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
+ as_echo_n_body='eval
+ arg=$1;
+ case $arg in #(
+ *"$as_nl"*)
+ expr "X$arg" : "X\\(.*\\)$as_nl";
+ arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
+ esac;
+ expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
+ '
+ export as_echo_n_body
+ as_echo_n='sh -c $as_echo_n_body as_echo'
+ fi
+ export as_echo_body
+ as_echo='sh -c $as_echo_body as_echo'
+fi
+
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+ PATH_SEPARATOR=:
+ (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
+ (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
+ PATH_SEPARATOR=';'
+ }
+fi
+
+
+# IFS
+# We need space, tab and new line, in precisely that order. Quoting is
+# there to prevent editors from complaining about space-tab.
+# (If _AS_PATH_WALK were called with IFS unset, it would disable word
+# splitting by setting IFS to empty value.)
+IFS=" "" $as_nl"
+
+# Find who we are. Look in the path if we contain no directory separator.
+as_myself=
+case $0 in #((
+ *[\\/]* ) as_myself=$0 ;;
+ *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
+ done
+IFS=$as_save_IFS
+
+ ;;
+esac
+# We did not find ourselves, most probably we were run as `sh COMMAND'
+# in which case we are not to be found in the path.
+if test "x$as_myself" = x; then
+ as_myself=$0
+fi
+if test ! -f "$as_myself"; then
+ $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
+ exit 1
+fi
+
+# Unset variables that we do not need and which cause bugs (e.g. in
+# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
+# suppresses any "Segmentation fault" message there. '((' could
+# trigger a bug in pdksh 5.2.14.
+for as_var in BASH_ENV ENV MAIL MAILPATH
+do eval test x\${$as_var+set} = xset \
+ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
+done
+PS1='$ '
+PS2='> '
+PS4='+ '
+
+# NLS nuisances.
+LC_ALL=C
+export LC_ALL
+LANGUAGE=C
+export LANGUAGE
+
+# CDPATH.
+(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
+
+
+# as_fn_error STATUS ERROR [LINENO LOG_FD]
+# ----------------------------------------
+# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
+# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
+# script with STATUS, using 1 if that was 0.
+as_fn_error ()
+{
+ as_status=$1; test $as_status -eq 0 && as_status=1
+ if test "$4"; then
+ as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
+ fi
+ $as_echo "$as_me: error: $2" >&2
+ as_fn_exit $as_status
+} # as_fn_error
+
+
+# as_fn_set_status STATUS
+# -----------------------
+# Set $? to STATUS, without forking.
+as_fn_set_status ()
+{
+ return $1
+} # as_fn_set_status
+
+# as_fn_exit STATUS
+# -----------------
+# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
+as_fn_exit ()
+{
+ set +e
+ as_fn_set_status $1
+ exit $1
+} # as_fn_exit
+
+# as_fn_unset VAR
+# ---------------
+# Portably unset VAR.
+as_fn_unset ()
+{
+ { eval $1=; unset $1;}
+}
+as_unset=as_fn_unset
+# as_fn_append VAR VALUE
+# ----------------------
+# Append the text in VALUE to the end of the definition contained in VAR. Take
+# advantage of any shell optimizations that allow amortized linear growth over
+# repeated appends, instead of the typical quadratic growth present in naive
+# implementations.
+if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
+ eval 'as_fn_append ()
+ {
+ eval $1+=\$2
+ }'
+else
+ as_fn_append ()
+ {
+ eval $1=\$$1\$2
+ }
+fi # as_fn_append
+
+# as_fn_arith ARG...
+# ------------------
+# Perform arithmetic evaluation on the ARGs, and store the result in the
+# global $as_val. Take advantage of shells that can avoid forks. The arguments
+# must be portable across $(()) and expr.
+if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
+ eval 'as_fn_arith ()
+ {
+ as_val=$(( $* ))
+ }'
+else
+ as_fn_arith ()
+ {
+ as_val=`expr "$@" || test $? -eq 1`
+ }
+fi # as_fn_arith
+
+
+if expr a : '\(a\)' >/dev/null 2>&1 &&
+ test "X`expr 00001 : '.*\(...\)'`" = X001; then
+ as_expr=expr
+else
+ as_expr=false
+fi
+
+if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
+ as_basename=basename
+else
+ as_basename=false
+fi
+
+if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
+ as_dirname=dirname
+else
+ as_dirname=false
+fi
+
+as_me=`$as_basename -- "$0" ||
+$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
+ X"$0" : 'X\(//\)$' \| \
+ X"$0" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X/"$0" |
+ sed '/^.*\/\([^/][^/]*\)\/*$/{
+ s//\1/
+ q
+ }
+ /^X\/\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\/\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+
+# Avoid depending upon Character Ranges.
+as_cr_letters='abcdefghijklmnopqrstuvwxyz'
+as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
+as_cr_Letters=$as_cr_letters$as_cr_LETTERS
+as_cr_digits='0123456789'
+as_cr_alnum=$as_cr_Letters$as_cr_digits
+
+ECHO_C= ECHO_N= ECHO_T=
+case `echo -n x` in #(((((
+-n*)
+ case `echo 'xy\c'` in
+ *c*) ECHO_T=' ';; # ECHO_T is single tab character.
+ xy) ECHO_C='\c';;
+ *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
+ ECHO_T=' ';;
+ esac;;
+*)
+ ECHO_N='-n';;
+esac
+
+rm -f conf$$ conf$$.exe conf$$.file
+if test -d conf$$.dir; then
+ rm -f conf$$.dir/conf$$.file
+else
+ rm -f conf$$.dir
+ mkdir conf$$.dir 2>/dev/null
+fi
+if (echo >conf$$.file) 2>/dev/null; then
+ if ln -s conf$$.file conf$$ 2>/dev/null; then
+ as_ln_s='ln -s'
+ # ... but there are two gotchas:
+ # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
+ # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
+ # In both cases, we have to default to `cp -p'.
+ ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
+ as_ln_s='cp -p'
+ elif ln conf$$.file conf$$ 2>/dev/null; then
+ as_ln_s=ln
+ else
+ as_ln_s='cp -p'
+ fi
+else
+ as_ln_s='cp -p'
+fi
+rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
+rmdir conf$$.dir 2>/dev/null
+
+
+# as_fn_mkdir_p
+# -------------
+# Create "$as_dir" as a directory, including parents if necessary.
+as_fn_mkdir_p ()
+{
+
+ case $as_dir in #(
+ -*) as_dir=./$as_dir;;
+ esac
+ test -d "$as_dir" || eval $as_mkdir_p || {
+ as_dirs=
+ while :; do
+ case $as_dir in #(
+ *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
+ *) as_qdir=$as_dir;;
+ esac
+ as_dirs="'$as_qdir' $as_dirs"
+ as_dir=`$as_dirname -- "$as_dir" ||
+$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$as_dir" : 'X\(//\)[^/]' \| \
+ X"$as_dir" : 'X\(//\)$' \| \
+ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$as_dir" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)[^/].*/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+ test -d "$as_dir" && break
+ done
+ test -z "$as_dirs" || eval "mkdir $as_dirs"
+ } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
+
+
+} # as_fn_mkdir_p
+if mkdir -p . 2>/dev/null; then
+ as_mkdir_p='mkdir -p "$as_dir"'
+else
+ test -d ./-p && rmdir ./-p
+ as_mkdir_p=false
+fi
+
+if test -x / >/dev/null 2>&1; then
+ as_test_x='test -x'
+else
+ if ls -dL / >/dev/null 2>&1; then
+ as_ls_L_option=L
+ else
+ as_ls_L_option=
+ fi
+ as_test_x='
+ eval sh -c '\''
+ if test -d "$1"; then
+ test -d "$1/.";
+ else
+ case $1 in #(
+ -*)set "./$1";;
+ esac;
+ case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
+ ???[sx]*):;;*)false;;esac;fi
+ '\'' sh
+ '
+fi
+as_executable_p=$as_test_x
+
+# Sed expression to map a string onto a valid CPP name.
+as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
+
+# Sed expression to map a string onto a valid variable name.
+as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
+
+
+exec 6>&1
+## ----------------------------------- ##
+## Main body of $CONFIG_STATUS script. ##
+## ----------------------------------- ##
+_ASEOF
+test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+# Save the log message, to keep $0 and so on meaningful, and to
+# report actual input values of CONFIG_FILES etc. instead of their
+# values after options handling.
+ac_log="
+This file was extended by newlib $as_me 2.4.0, which was
+generated by GNU Autoconf 2.68. Invocation command line was
+
+ CONFIG_FILES = $CONFIG_FILES
+ CONFIG_HEADERS = $CONFIG_HEADERS
+ CONFIG_LINKS = $CONFIG_LINKS
+ CONFIG_COMMANDS = $CONFIG_COMMANDS
+ $ $0 $@
+
+on `(hostname || uname -n) 2>/dev/null | sed 1q`
+"
+
+_ACEOF
+
+case $ac_config_files in *"
+"*) set x $ac_config_files; shift; ac_config_files=$*;;
+esac
+
+
+
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+# Files that config.status was made for.
+config_files="$ac_config_files"
+config_commands="$ac_config_commands"
+
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+ac_cs_usage="\
+\`$as_me' instantiates files and other configuration actions
+from templates according to the current configuration. Unless the files
+and actions are specified as TAGs, all are instantiated by default.
+
+Usage: $0 [OPTION]... [TAG]...
+
+ -h, --help print this help, then exit
+ -V, --version print version number and configuration settings, then exit
+ --config print configuration, then exit
+ -q, --quiet, --silent
+ do not print progress messages
+ -d, --debug don't remove temporary files
+ --recheck update $as_me by reconfiguring in the same conditions
+ --file=FILE[:TEMPLATE]
+ instantiate the configuration file FILE
+
+Configuration files:
+$config_files
+
+Configuration commands:
+$config_commands
+
+Report bugs to the package provider."
+
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
+ac_cs_version="\\
+newlib config.status 2.4.0
+configured by $0, generated by GNU Autoconf 2.68,
+ with options \\"\$ac_cs_config\\"
+
+Copyright (C) 2010 Free Software Foundation, Inc.
+This config.status script is free software; the Free Software Foundation
+gives unlimited permission to copy, distribute and modify it."
+
+ac_pwd='$ac_pwd'
+srcdir='$srcdir'
+INSTALL='$INSTALL'
+MKDIR_P='$MKDIR_P'
+AWK='$AWK'
+test -n "\$AWK" || AWK=awk
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+# The default lists apply if the user does not specify any file.
+ac_need_defaults=:
+while test $# != 0
+do
+ case $1 in
+ --*=?*)
+ ac_option=`expr "X$1" : 'X\([^=]*\)='`
+ ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
+ ac_shift=:
+ ;;
+ --*=)
+ ac_option=`expr "X$1" : 'X\([^=]*\)='`
+ ac_optarg=
+ ac_shift=:
+ ;;
+ *)
+ ac_option=$1
+ ac_optarg=$2
+ ac_shift=shift
+ ;;
+ esac
+
+ case $ac_option in
+ # Handling of the options.
+ -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
+ ac_cs_recheck=: ;;
+ --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
+ $as_echo "$ac_cs_version"; exit ;;
+ --config | --confi | --conf | --con | --co | --c )
+ $as_echo "$ac_cs_config"; exit ;;
+ --debug | --debu | --deb | --de | --d | -d )
+ debug=: ;;
+ --file | --fil | --fi | --f )
+ $ac_shift
+ case $ac_optarg in
+ *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
+ '') as_fn_error $? "missing file argument" ;;
+ esac
+ as_fn_append CONFIG_FILES " '$ac_optarg'"
+ ac_need_defaults=false;;
+ --he | --h | --help | --hel | -h )
+ $as_echo "$ac_cs_usage"; exit ;;
+ -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+ | -silent | --silent | --silen | --sile | --sil | --si | --s)
+ ac_cs_silent=: ;;
+
+ # This is an error.
+ -*) as_fn_error $? "unrecognized option: \`$1'
+Try \`$0 --help' for more information." ;;
+
+ *) as_fn_append ac_config_targets " $1"
+ ac_need_defaults=false ;;
+
+ esac
+ shift
+done
+
+ac_configure_extra_args=
+
+if $ac_cs_silent; then
+ exec 6>/dev/null
+ ac_configure_extra_args="$ac_configure_extra_args --silent"
+fi
+
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+if \$ac_cs_recheck; then
+ set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
+ shift
+ \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
+ CONFIG_SHELL='$SHELL'
+ export CONFIG_SHELL
+ exec "\$@"
+fi
+
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+exec 5>>config.log
+{
+ echo
+ sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
+## Running $as_me. ##
+_ASBOX
+ $as_echo "$ac_log"
+} >&5
+
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+#
+# INIT-COMMANDS
+#
+AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"
+
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+
+# Handling of arguments.
+for ac_config_target in $ac_config_targets
+do
+ case $ac_config_target in
+ "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
+ "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
+
+ *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
+ esac
+done
+
+
+# If the user did not use the arguments to specify the items to instantiate,
+# then the envvar interface is used. Set only those that are not.
+# We use the long form for the default assignment because of an extremely
+# bizarre bug on SunOS 4.1.3.
+if $ac_need_defaults; then
+ test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
+ test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
+fi
+
+# Have a temporary directory for convenience. Make it in the build tree
+# simply because there is no reason against having it here, and in addition,
+# creating and moving files from /tmp can sometimes cause problems.
+# Hook for its removal unless debugging.
+# Note that there is a small window in which the directory will not be cleaned:
+# after its creation but before its name has been assigned to `$tmp'.
+$debug ||
+{
+ tmp= ac_tmp=
+ trap 'exit_status=$?
+ : "${ac_tmp:=$tmp}"
+ { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
+' 0
+ trap 'as_fn_exit 1' 1 2 13 15
+}
+# Create a (secure) tmp directory for tmp files.
+
+{
+ tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
+ test -d "$tmp"
+} ||
+{
+ tmp=./conf$$-$RANDOM
+ (umask 077 && mkdir "$tmp")
+} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
+ac_tmp=$tmp
+
+# Set up the scripts for CONFIG_FILES section.
+# No need to generate them if there are no CONFIG_FILES.
+# This happens for instance with `./config.status config.h'.
+if test -n "$CONFIG_FILES"; then
+
+
+ac_cr=`echo X | tr X '\015'`
+# On cygwin, bash can eat \r inside `` if the user requested igncr.
+# But we know of no other shell where ac_cr would be empty at this
+# point, so we can use a bashism as a fallback.
+if test "x$ac_cr" = x; then
+ eval ac_cr=\$\'\\r\'
+fi
+ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
+if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
+ ac_cs_awk_cr='\\r'
+else
+ ac_cs_awk_cr=$ac_cr
+fi
+
+echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
+_ACEOF
+
+
+{
+ echo "cat >conf$$subs.awk <<_ACEOF" &&
+ echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
+ echo "_ACEOF"
+} >conf$$subs.sh ||
+ as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
+ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
+ac_delim='%!_!# '
+for ac_last_try in false false false false false :; do
+ . ./conf$$subs.sh ||
+ as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
+
+ ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
+ if test $ac_delim_n = $ac_delim_num; then
+ break
+ elif $ac_last_try; then
+ as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
+ else
+ ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
+ fi
+done
+rm -f conf$$subs.sh
+
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
+_ACEOF
+sed -n '
+h
+s/^/S["/; s/!.*/"]=/
+p
+g
+s/^[^!]*!//
+:repl
+t repl
+s/'"$ac_delim"'$//
+t delim
+:nl
+h
+s/\(.\{148\}\)..*/\1/
+t more1
+s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
+p
+n
+b repl
+:more1
+s/["\\]/\\&/g; s/^/"/; s/$/"\\/
+p
+g
+s/.\{148\}//
+t nl
+:delim
+h
+s/\(.\{148\}\)..*/\1/
+t more2
+s/["\\]/\\&/g; s/^/"/; s/$/"/
+p
+b
+:more2
+s/["\\]/\\&/g; s/^/"/; s/$/"\\/
+p
+g
+s/.\{148\}//
+t delim
+' <conf$$subs.awk | sed '
+/^[^""]/{
+ N
+ s/\n//
+}
+' >>$CONFIG_STATUS || ac_write_fail=1
+rm -f conf$$subs.awk
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+_ACAWK
+cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
+ for (key in S) S_is_set[key] = 1
+ FS = ""
+
+}
+{
+ line = $ 0
+ nfields = split(line, field, "@")
+ substed = 0
+ len = length(field[1])
+ for (i = 2; i < nfields; i++) {
+ key = field[i]
+ keylen = length(key)
+ if (S_is_set[key]) {
+ value = S[key]
+ line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
+ len += length(value) + length(field[++i])
+ substed = 1
+ } else
+ len += 1 + keylen
+ }
+
+ print line
+}
+
+_ACAWK
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
+ sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
+else
+ cat
+fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
+ || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
+_ACEOF
+
+# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
+# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
+# trailing colons and then remove the whole line if VPATH becomes empty
+# (actually we leave an empty line to preserve line numbers).
+if test "x$srcdir" = x.; then
+ ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
+h
+s///
+s/^/:/
+s/[ ]*$/:/
+s/:\$(srcdir):/:/g
+s/:\${srcdir}:/:/g
+s/:@srcdir@:/:/g
+s/^:*//
+s/:*$//
+x
+s/\(=[ ]*\).*/\1/
+G
+s/\n//
+s/^[^=]*=[ ]*$//
+}'
+fi
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+fi # test -n "$CONFIG_FILES"
+
+
+eval set X " :F $CONFIG_FILES :C $CONFIG_COMMANDS"
+shift
+for ac_tag
+do
+ case $ac_tag in
+ :[FHLC]) ac_mode=$ac_tag; continue;;
+ esac
+ case $ac_mode$ac_tag in
+ :[FHL]*:*);;
+ :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
+ :[FH]-) ac_tag=-:-;;
+ :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
+ esac
+ ac_save_IFS=$IFS
+ IFS=:
+ set x $ac_tag
+ IFS=$ac_save_IFS
+ shift
+ ac_file=$1
+ shift
+
+ case $ac_mode in
+ :L) ac_source=$1;;
+ :[FH])
+ ac_file_inputs=
+ for ac_f
+ do
+ case $ac_f in
+ -) ac_f="$ac_tmp/stdin";;
+ *) # Look for the file first in the build tree, then in the source tree
+ # (if the path is not absolute). The absolute path cannot be DOS-style,
+ # because $ac_f cannot contain `:'.
+ test -f "$ac_f" ||
+ case $ac_f in
+ [\\/$]*) false;;
+ *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
+ esac ||
+ as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
+ esac
+ case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
+ as_fn_append ac_file_inputs " '$ac_f'"
+ done
+
+ # Let's still pretend it is `configure' which instantiates (i.e., don't
+ # use $as_me), people would be surprised to read:
+ # /* config.h. Generated by config.status. */
+ configure_input='Generated from '`
+ $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
+ `' by configure.'
+ if test x"$ac_file" != x-; then
+ configure_input="$ac_file. $configure_input"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
+$as_echo "$as_me: creating $ac_file" >&6;}
+ fi
+ # Neutralize special characters interpreted by sed in replacement strings.
+ case $configure_input in #(
+ *\&* | *\|* | *\\* )
+ ac_sed_conf_input=`$as_echo "$configure_input" |
+ sed 's/[\\\\&|]/\\\\&/g'`;; #(
+ *) ac_sed_conf_input=$configure_input;;
+ esac
+
+ case $ac_tag in
+ *:-:* | *:-) cat >"$ac_tmp/stdin" \
+ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
+ esac
+ ;;
+ esac
+
+ ac_dir=`$as_dirname -- "$ac_file" ||
+$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$ac_file" : 'X\(//\)[^/]' \| \
+ X"$ac_file" : 'X\(//\)$' \| \
+ X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$ac_file" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)[^/].*/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+ as_dir="$ac_dir"; as_fn_mkdir_p
+ ac_builddir=.
+
+case "$ac_dir" in
+.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
+*)
+ ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
+ # A ".." for each directory in $ac_dir_suffix.
+ ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
+ case $ac_top_builddir_sub in
+ "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
+ *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
+ esac ;;
+esac
+ac_abs_top_builddir=$ac_pwd
+ac_abs_builddir=$ac_pwd$ac_dir_suffix
+# for backward compatibility:
+ac_top_builddir=$ac_top_build_prefix
+
+case $srcdir in
+ .) # We are building in place.
+ ac_srcdir=.
+ ac_top_srcdir=$ac_top_builddir_sub
+ ac_abs_top_srcdir=$ac_pwd ;;
+ [\\/]* | ?:[\\/]* ) # Absolute name.
+ ac_srcdir=$srcdir$ac_dir_suffix;
+ ac_top_srcdir=$srcdir
+ ac_abs_top_srcdir=$srcdir ;;
+ *) # Relative name.
+ ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
+ ac_top_srcdir=$ac_top_build_prefix$srcdir
+ ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
+esac
+ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
+
+
+ case $ac_mode in
+ :F)
+ #
+ # CONFIG_FILE
+ #
+
+ case $INSTALL in
+ [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
+ *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
+ esac
+ ac_MKDIR_P=$MKDIR_P
+ case $MKDIR_P in
+ [\\/$]* | ?:[\\/]* ) ;;
+ */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
+ esac
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+# If the template does not know about datarootdir, expand it.
+# FIXME: This hack should be removed a few years after 2.60.
+ac_datarootdir_hack=; ac_datarootdir_seen=
+ac_sed_dataroot='
+/datarootdir/ {
+ p
+ q
+}
+/@datadir@/p
+/@docdir@/p
+/@infodir@/p
+/@localedir@/p
+/@mandir@/p'
+case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
+*datarootdir*) ac_datarootdir_seen=yes;;
+*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
+$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+ ac_datarootdir_hack='
+ s&@datadir@&$datadir&g
+ s&@docdir@&$docdir&g
+ s&@infodir@&$infodir&g
+ s&@localedir@&$localedir&g
+ s&@mandir@&$mandir&g
+ s&\\\${datarootdir}&$datarootdir&g' ;;
+esac
+_ACEOF
+
+# Neutralize VPATH when `$srcdir' = `.'.
+# Shell code in configure.ac might set extrasub.
+# FIXME: do we really want to maintain this feature?
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+ac_sed_extra="$ac_vpsub
+$extrasub
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+:t
+/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
+s|@configure_input@|$ac_sed_conf_input|;t t
+s&@top_builddir@&$ac_top_builddir_sub&;t t
+s&@top_build_prefix@&$ac_top_build_prefix&;t t
+s&@srcdir@&$ac_srcdir&;t t
+s&@abs_srcdir@&$ac_abs_srcdir&;t t
+s&@top_srcdir@&$ac_top_srcdir&;t t
+s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
+s&@builddir@&$ac_builddir&;t t
+s&@abs_builddir@&$ac_abs_builddir&;t t
+s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
+s&@INSTALL@&$ac_INSTALL&;t t
+s&@MKDIR_P@&$ac_MKDIR_P&;t t
+$ac_datarootdir_hack
+"
+eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
+ >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
+
+test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
+ { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
+ { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
+ "$ac_tmp/out"`; test -z "$ac_out"; } &&
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
+which seems to be undefined. Please make sure it is defined" >&5
+$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
+which seems to be undefined. Please make sure it is defined" >&2;}
+
+ rm -f "$ac_tmp/stdin"
+ case $ac_file in
+ -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
+ *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
+ esac \
+ || as_fn_error $? "could not create $ac_file" "$LINENO" 5
+ ;;
+
+
+ :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
+$as_echo "$as_me: executing $ac_file commands" >&6;}
+ ;;
+ esac
+
+
+ case $ac_file$ac_mode in
+ "depfiles":C) test x"$AMDEP_TRUE" != x"" || {
+ # Autoconf 2.62 quotes --file arguments for eval, but not when files
+ # are listed without --file. Let's play safe and only enable the eval
+ # if we detect the quoting.
+ case $CONFIG_FILES in
+ *\'*) eval set x "$CONFIG_FILES" ;;
+ *) set x $CONFIG_FILES ;;
+ esac
+ shift
+ for mf
+ do
+ # Strip MF so we end up with the name of the file.
+ mf=`echo "$mf" | sed -e 's/:.*$//'`
+ # Check whether this is an Automake generated Makefile or not.
+ # We used to match only the files named `Makefile.in', but
+ # some people rename them; so instead we look at the file content.
+ # Grep'ing the first line is not enough: some people post-process
+ # each Makefile.in and add a new line on top of each file to say so.
+ # Grep'ing the whole file is not good either: AIX grep has a line
+ # limit of 2048, but all sed's we know have understand at least 4000.
+ if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
+ dirpart=`$as_dirname -- "$mf" ||
+$as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$mf" : 'X\(//\)[^/]' \| \
+ X"$mf" : 'X\(//\)$' \| \
+ X"$mf" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$mf" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)[^/].*/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+ else
+ continue
+ fi
+ # Extract the definition of DEPDIR, am__include, and am__quote
+ # from the Makefile without running `make'.
+ DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
+ test -z "$DEPDIR" && continue
+ am__include=`sed -n 's/^am__include = //p' < "$mf"`
+ test -z "am__include" && continue
+ am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
+ # When using ansi2knr, U may be empty or an underscore; expand it
+ U=`sed -n 's/^U = //p' < "$mf"`
+ # Find all dependency output files, they are included files with
+ # $(DEPDIR) in their names. We invoke sed twice because it is the
+ # simplest approach to changing $(DEPDIR) to its actual value in the
+ # expansion.
+ for file in `sed -n "
+ s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
+ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
+ # Make sure the directory exists.
+ test -f "$dirpart/$file" && continue
+ fdir=`$as_dirname -- "$file" ||
+$as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$file" : 'X\(//\)[^/]' \| \
+ X"$file" : 'X\(//\)$' \| \
+ X"$file" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$file" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)[^/].*/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+ as_dir=$dirpart/$fdir; as_fn_mkdir_p
+ # echo "creating $dirpart/$file"
+ echo '# dummy' > "$dirpart/$file"
+ done
+ done
+}
+ ;;
+
+ esac
+done # for ac_tag
+
+
+as_fn_exit 0
+_ACEOF
+ac_clean_files=$ac_clean_files_save
+
+test $ac_write_fail = 0 ||
+ as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
+
+
+# configure is writing to config.log, and then calls config.status.
+# config.status does its own redirection, appending to config.log.
+# Unfortunately, on DOS this fails, as config.log is still kept open
+# by configure, so config.status won't be able to write to it; its
+# output is simply discarded. So we exec the FD to /dev/null,
+# effectively closing config.log, so it can be properly (re)opened and
+# appended to by config.status. When coming back to configure, we
+# need to make the FD available again.
+if test "$no_create" != yes; then
+ ac_cs_success=:
+ ac_config_status_args=
+ test "$silent" = yes &&
+ ac_config_status_args="$ac_config_status_args --quiet"
+ exec 5>/dev/null
+ $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
+ exec 5>>config.log
+ # Use ||, not &&, to avoid exiting from the if with $? = 1, which
+ # would make configure fail if this is the last instruction.
+ $ac_cs_success || as_fn_exit 1
+fi
+if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
+$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
+fi
+
diff --git a/newlib/libc/machine/or1k/configure.in b/newlib/libc/machine/or1k/configure.in
new file mode 100644
index 000000000..528fe44de
--- /dev/null
+++ b/newlib/libc/machine/or1k/configure.in
@@ -0,0 +1,14 @@
+dnl This is the newlib/libc/machine/or1k configure.in file.
+dnl Process this file with autoconf to produce a configure script.
+
+AC_PREREQ(2.59)
+AC_INIT([newlib],[NEWLIB_VERSION])
+AC_CONFIG_SRCDIR([Makefile.am])
+
+dnl Can't be done in NEWLIB_CONFIGURE because that confuses automake.
+AC_CONFIG_AUX_DIR(../../../..)
+
+NEWLIB_CONFIGURE(../../..)
+
+AC_CONFIG_FILES([Makefile])
+AC_OUTPUT
diff --git a/newlib/libc/machine/or1k/setjmp.S b/newlib/libc/machine/or1k/setjmp.S
new file mode 100644
index 000000000..5c023278d
--- /dev/null
+++ b/newlib/libc/machine/or1k/setjmp.S
@@ -0,0 +1,108 @@
+/*
+Copyright (c) 2014, Hesham ALMatary
+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 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 HOLDER 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.
+*/
+
+.align 4
+.global setjmp
+.type setjmp,@function
+setjmp:
+
+ l.sw 4(r3), r1
+ l.sw 8(r3), r2
+ /* Skip r3-r8 as they are not preserved across function calls */
+ l.sw 36(r3), r9
+ /* Skip r10 as it's preserved to be used by TLS */
+ /* Skip r11, setjmp always set it to 0 */
+ /* The following set if registers are preserved across function calls */
+ l.sw 52(r3), r14
+ l.sw 60(r3), r16
+ l.sw 68(r3), r18
+ l.sw 76(r3), r20
+ l.sw 84(r3), r22
+ l.sw 92(r3), r24
+ l.sw 100(r3), r26
+ l.sw 108(r3), r28
+ l.sw 116(r3), r30
+ /* Save Status Register */
+ l.mfspr r13, r0, 17
+ l.sw 124(r3), r13
+/* Set result register to 0 and jump */
+// Different cases for optional delay slot
+#if defined(__OR1K_NODELAY__)
+ l.addi r11, r0, 0
+ l.jr r9
+#elif defined(__OR1K_DELAY__)
+ l.jr r9
+ l.addi r11, r0, 0
+#else
+ l.addi r11, r0, 0
+ l.jr r9
+ l.nop
+#endif
+
+.align 4
+.global longjmp
+.type longjmp,@function
+longjmp:
+
+ /* If the second argument to longjmp is zero, set return address to 1,
+ otherwise set it to the value of the second argument */
+ l.addi r11, r0, 1
+ l.sfne r4, r0
+ l.bf 1f
+ l.nop
+ l.addi r11, r4, 0
+
+ /* Load status register */
+1:
+ l.lwz r15, 124(r3)
+ l.mtspr r0, r15, 17
+
+ l.lwz r1, 4(r3)
+ l.lwz r2, 8(r3)
+ /* Skip r3-r8 as they are not preserved across function calls */
+ l.lwz r9, 36(r3)
+ /* Skip r11 as it's always set by longjmp */
+ l.lwz r14, 52(r3)
+ l.lwz r16, 60(r3)
+ l.lwz r18, 68(r3)
+ l.lwz r20, 76(r3)
+ l.lwz r22, 84(r3)
+ l.lwz r24, 92(r3)
+ l.lwz r26, 100(r3)
+ l.lwz r28, 108(r3)
+
+// Different cases for optional delay slot
+#if defined(__OR1K_NODELAY__)
+ l.lwz r30, 116(r3)
+ l.jr r9
+#elif defined(__OR1K_DELAY__)
+ l.jr r9
+ l.lwz r30, 116(r3)
+#else
+ l.lwz r30, 116(r3)
+ l.jr r9
+ l.nop
+#endif
diff --git a/newlib/libc/machine/powerpc/configure b/newlib/libc/machine/powerpc/configure
index e7cddcc09..7a186317c 100755
--- a/newlib/libc/machine/powerpc/configure
+++ b/newlib/libc/machine/powerpc/configure
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.68 for newlib 2.0.0.
+# Generated by GNU Autoconf 2.68 for newlib 2.4.0.
#
#
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
@@ -556,8 +556,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='newlib'
PACKAGE_TARNAME='newlib'
-PACKAGE_VERSION='2.0.0'
-PACKAGE_STRING='newlib 2.0.0'
+PACKAGE_VERSION='2.4.0'
+PACKAGE_STRING='newlib 2.4.0'
PACKAGE_BUGREPORT=''
PACKAGE_URL=''
@@ -1240,7 +1240,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures newlib 2.0.0 to adapt to many kinds of systems.
+\`configure' configures newlib 2.4.0 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1310,7 +1310,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of newlib 2.0.0:";;
+ short | recursive ) echo "Configuration of newlib 2.4.0:";;
esac
cat <<\_ACEOF
@@ -1401,7 +1401,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-newlib configure 2.0.0
+newlib configure 2.4.0
generated by GNU Autoconf 2.68
Copyright (C) 2010 Free Software Foundation, Inc.
@@ -1456,7 +1456,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by newlib $as_me 2.0.0, which was
+It was created by newlib $as_me 2.4.0, which was
generated by GNU Autoconf 2.68. Invocation command line was
$ $0 $@
@@ -2528,7 +2528,7 @@ fi
# Define the identity of the package.
PACKAGE='newlib'
- VERSION='2.0.0'
+ VERSION='2.4.0'
# Some tools Automake needs.
@@ -4019,7 +4019,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by newlib $as_me 2.0.0, which was
+This file was extended by newlib $as_me 2.4.0, which was
generated by GNU Autoconf 2.68. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -4076,7 +4076,7 @@ _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
-newlib config.status 2.0.0
+newlib config.status 2.4.0
configured by $0, generated by GNU Autoconf 2.68,
with options \\"\$ac_cs_config\\"
diff --git a/newlib/libc/machine/powerpc/vfscanf.c b/newlib/libc/machine/powerpc/vfscanf.c
index f759506e1..1520ceab8 100644
--- a/newlib/libc/machine/powerpc/vfscanf.c
+++ b/newlib/libc/machine/powerpc/vfscanf.c
@@ -12,15 +12,15 @@ INDEX
ANSI_SYNOPSIS
#include <stdio.h>
#include <stdarg.h>
- int vscanf(const char *<[fmt]>, va_list <[list]>);
- int vfscanf(FILE *<[fp]>, const char *<[fmt]>, va_list <[list]>);
- int vsscanf(const char *<[str]>, const char *<[fmt]>, va_list <[list]>);
+ int vscanf(const char *restrict <[fmt]>, va_list <[list]>);
+ int vfscanf(FILE *restrict <[fp]>, const char *restrict <[fmt]>, va_list <[list]>);
+ int vsscanf(const char *restrict <[str]>, const char *restrict <[fmt]>, va_list <[list]>);
- int _vscanf_r(void *<[reent]>, const char *<[fmt]>,
+ int _vscanf_r(void *<[reent]>, const char *restrict <[fmt]>,
va_list <[list]>);
- int _vfscanf_r(void *<[reent]>, FILE *<[fp]>, const char *<[fmt]>,
+ int _vfscanf_r(void *<[reent]>, FILE *restrict <[fp]>, const char *restrict <[fmt]>,
va_list <[list]>);
- int _vsscanf_r(void *<[reent]>, const char *<[str]>, const char *<[fmt]>,
+ int _vsscanf_r(void *<[reent]>, const char *restrict <[str]>, const char *restrict <[fmt]>,
va_list <[list]>);
TRAD_SYNOPSIS
@@ -131,7 +131,6 @@ Supporting OS subroutines required:
#define _NO_LONGDBL
#if defined _WANT_IO_LONG_DOUBLE && (LDBL_MANT_DIG > DBL_MANT_DIG)
#undef _NO_LONGDBL
-extern _LONG_DOUBLE _strtold _PARAMS((char *s, char **sptr));
#endif
#define _NO_LONGLONG
@@ -218,8 +217,8 @@ typedef union
int
_DEFUN (vfscanf, (fp, fmt, ap),
- register FILE *fp _AND
- _CONST char *fmt _AND
+ register FILE *__restrict fp _AND
+ _CONST char *__restrict fmt _AND
va_list ap)
{
CHECK_INIT(_REENT, fp);
@@ -240,8 +239,8 @@ __svfscanf (fp, fmt0, ap)
int
_DEFUN (_vfscanf_r, (data, fp, fmt, ap),
struct _reent *data _AND
- register FILE *fp _AND
- _CONST char *fmt _AND
+ register FILE *__restrict fp _AND
+ _CONST char *__restrict fmt _AND
va_list ap)
{
return __svfscanf_r (data, fp, fmt, ap);
@@ -1211,7 +1210,7 @@ __svfscanf_r (rptr, fp, fmt0, ap)
#ifdef _NO_LONGDBL
res = _strtod_r (rptr, buf, NULL);
#else /* !_NO_LONGDBL */
- res = _strtold (buf, NULL);
+ res = _strtold_r (rptr, buf, NULL);
#endif /* !_NO_LONGDBL */
if (flags & LONG)
{
diff --git a/newlib/libc/machine/rl78/configure b/newlib/libc/machine/rl78/configure
index d96b7718a..ca07e566c 100755
--- a/newlib/libc/machine/rl78/configure
+++ b/newlib/libc/machine/rl78/configure
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.68 for newlib 2.0.0.
+# Generated by GNU Autoconf 2.68 for newlib 2.4.0.
#
#
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
@@ -556,8 +556,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='newlib'
PACKAGE_TARNAME='newlib'
-PACKAGE_VERSION='2.0.0'
-PACKAGE_STRING='newlib 2.0.0'
+PACKAGE_VERSION='2.4.0'
+PACKAGE_STRING='newlib 2.4.0'
PACKAGE_BUGREPORT=''
PACKAGE_URL=''
@@ -1239,7 +1239,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures newlib 2.0.0 to adapt to many kinds of systems.
+\`configure' configures newlib 2.4.0 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1309,7 +1309,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of newlib 2.0.0:";;
+ short | recursive ) echo "Configuration of newlib 2.4.0:";;
esac
cat <<\_ACEOF
@@ -1400,7 +1400,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-newlib configure 2.0.0
+newlib configure 2.4.0
generated by GNU Autoconf 2.68
Copyright (C) 2010 Free Software Foundation, Inc.
@@ -1455,7 +1455,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by newlib $as_me 2.0.0, which was
+It was created by newlib $as_me 2.4.0, which was
generated by GNU Autoconf 2.68. Invocation command line was
$ $0 $@
@@ -2527,7 +2527,7 @@ fi
# Define the identity of the package.
PACKAGE='newlib'
- VERSION='2.0.0'
+ VERSION='2.4.0'
# Some tools Automake needs.
@@ -4007,7 +4007,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by newlib $as_me 2.0.0, which was
+This file was extended by newlib $as_me 2.4.0, which was
generated by GNU Autoconf 2.68. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -4064,7 +4064,7 @@ _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
-newlib config.status 2.0.0
+newlib config.status 2.4.0
configured by $0, generated by GNU Autoconf 2.68,
with options \\"\$ac_cs_config\\"
diff --git a/newlib/libc/machine/rl78/setjmp.S b/newlib/libc/machine/rl78/setjmp.S
index ddc60218d..552f8e18e 100644
--- a/newlib/libc/machine/rl78/setjmp.S
+++ b/newlib/libc/machine/rl78/setjmp.S
@@ -30,6 +30,26 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
+#ifdef __RL78_G10__
+; clobberable
+r8 = 0xffec8
+r9 = 0xffec9
+r10 = 0xffeca
+r11 = 0xffecb
+r12 = 0xffecc
+r13 = 0xffecd
+r14 = 0xffece
+r15 = 0xffecf
+; preserved
+r16 = 0xffed0
+r17 = 0xffed1
+r18 = 0xffed2
+r19 = 0xffed3
+r20 = 0xffed4
+r21 = 0xffed5
+r22 = 0xffed6
+r23 = 0xffed7
+#else
; clobberable
r8 = 0xffef0
r9 = 0xffef1
@@ -48,6 +68,7 @@ r20 = 0xffeec
r21 = 0xffeed
r22 = 0xffeee
r23 = 0xffeef
+#endif
/* The jump buffer has the following structure:
R0 .. R23 3*8 bytes
diff --git a/newlib/libc/machine/rx/configure b/newlib/libc/machine/rx/configure
index 7f4d0d6df..bc041896f 100755
--- a/newlib/libc/machine/rx/configure
+++ b/newlib/libc/machine/rx/configure
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.68 for newlib 2.0.0.
+# Generated by GNU Autoconf 2.68 for newlib 2.4.0.
#
#
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
@@ -556,8 +556,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='newlib'
PACKAGE_TARNAME='newlib'
-PACKAGE_VERSION='2.0.0'
-PACKAGE_STRING='newlib 2.0.0'
+PACKAGE_VERSION='2.4.0'
+PACKAGE_STRING='newlib 2.4.0'
PACKAGE_BUGREPORT=''
PACKAGE_URL=''
@@ -1239,7 +1239,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures newlib 2.0.0 to adapt to many kinds of systems.
+\`configure' configures newlib 2.4.0 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1309,7 +1309,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of newlib 2.0.0:";;
+ short | recursive ) echo "Configuration of newlib 2.4.0:";;
esac
cat <<\_ACEOF
@@ -1400,7 +1400,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-newlib configure 2.0.0
+newlib configure 2.4.0
generated by GNU Autoconf 2.68
Copyright (C) 2010 Free Software Foundation, Inc.
@@ -1455,7 +1455,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by newlib $as_me 2.0.0, which was
+It was created by newlib $as_me 2.4.0, which was
generated by GNU Autoconf 2.68. Invocation command line was
$ $0 $@
@@ -2527,7 +2527,7 @@ fi
# Define the identity of the package.
PACKAGE='newlib'
- VERSION='2.0.0'
+ VERSION='2.4.0'
# Some tools Automake needs.
@@ -4007,7 +4007,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by newlib $as_me 2.0.0, which was
+This file was extended by newlib $as_me 2.4.0, which was
generated by GNU Autoconf 2.68. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -4064,7 +4064,7 @@ _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
-newlib config.status 2.0.0
+newlib config.status 2.4.0
configured by $0, generated by GNU Autoconf 2.68,
with options \\"\$ac_cs_config\\"
diff --git a/newlib/libc/machine/rx/memchr.S b/newlib/libc/machine/rx/memchr.S
index 937753cef..cdc97c874 100644
--- a/newlib/libc/machine/rx/memchr.S
+++ b/newlib/libc/machine/rx/memchr.S
@@ -5,9 +5,28 @@
.global _memchr
.type _memchr,@function
_memchr:
+ ;; R1: string pointer
+ ;; R2: byte sought
+ ;; R3: max number to scan
+#ifdef __RX_DISALLOW_STRING_INSNS__
+ mov.b r2, r2 ; The mov.b below sign extends as it loads, so make sure that r2 is sign-extended as well.
+2: cmp #0, r3
+ beq 1f
+ sub #1, r3
+ mov.b [r1+], r5
+ cmp r5, r2
+ bne 2b
+
+ sub #1, r1 ; We have found a match, bit now R1 points to the byte after the match.
+1: rts
+#else
cmp #0, r3 ; If r3 is 0 suntil.b will do nothing and not set any flags...
stz #1, r1 ; ...so store 1 into r1. It will be decremented by the SUB later.
suntil.b ; Search until *r1 == r2 or r3 bytes have been examined.
stnz #1, r1 ; If no match was found return NULL.
sub #1, r1 ; suntil.b leaves r1 pointing at the address *after* the match.
rts
+#endif
+
+ .size _memchr, . - _memchr
+
diff --git a/newlib/libc/machine/rx/memcpy.S b/newlib/libc/machine/rx/memcpy.S
index 3e0d50001..eb671c0ae 100644
--- a/newlib/libc/machine/rx/memcpy.S
+++ b/newlib/libc/machine/rx/memcpy.S
@@ -4,7 +4,28 @@
.global _memcpy
.type _memcpy,@function
_memcpy:
+#ifdef __RX_DISALLOW_STRING_INSNS__
+ /* Do not use the string instructions - they might prefetch
+ bytes from outside of valid memory. This is particularly
+ dangerous in I/O space. */
+
+ ;; FIXME: It would be more space efficient to just branch to _memmove...
+
+ cmp #0, r3 ; If the count is zero, do nothing
+ beq 1f
+
+ mov r1, r14 ; Save a copy of DEST
+
+2: mov.b [r2+], r5
+ mov.b r5, [r14+]
+ sub #1, r3
+ bne 2b
+
+1: rts
+#else
mov r1, r4 ; Save a copy of DEST
smovf ; Copy R2 (source) to R1 (dest). Stop after R3 bytes.
mov r4, r1 ; Return DEST
rts
+#endif
+ .size _memcpy, . - _memcpy
diff --git a/newlib/libc/machine/rx/memmove.S b/newlib/libc/machine/rx/memmove.S
index 4b126bafc..60b76836b 100644
--- a/newlib/libc/machine/rx/memmove.S
+++ b/newlib/libc/machine/rx/memmove.S
@@ -4,6 +4,39 @@
.global _memmove
.type _memmove,@function
_memmove:
+ ;; R1: DEST
+ ;; R2: SRC
+ ;; R3: COUNT
+#ifdef __RX_DISALLOW_STRING_INSNS__
+ /* Do not use the string instructions - they might prefetch
+ bytes from outside of valid memory. This is particularly
+ dangerous in I/O space. */
+
+ cmp #0, r3 ; If the count is zero, do nothing
+ beq 4f
+
+ cmp r1, r2
+ blt 3f ; If SRC < DEST copy backwards
+
+ mov r1, r14 ; Save a copy of DEST
+
+5: mov.b [r2+], r5
+ mov.b r5, [r14+]
+ sub #1, r3
+ bne 5b
+
+4: rts
+
+3: add r3, r1
+ add r3, r2
+
+6: mov.b [-r2], r5
+ mov.b r5, [-r1]
+ sub #1, r3
+ bne 6b
+
+ rts
+#else
mov r1, r4 ; Save a copy of DEST
cmp r1, r2
blt 2f ; If SRC (r2) is less than DEST (r1) then copy backwards
@@ -18,3 +51,7 @@ _memmove:
sub #1, r1 ; additions and subtractions.
smovb
bra 1b
+
+#endif /* SMOVF allowed. */
+
+ .size _memmove, . - _memmove
diff --git a/newlib/libc/machine/rx/mempcpy.S b/newlib/libc/machine/rx/mempcpy.S
index c679d04ce..f82452462 100644
--- a/newlib/libc/machine/rx/mempcpy.S
+++ b/newlib/libc/machine/rx/mempcpy.S
@@ -4,5 +4,22 @@
.global _mempcpy
.type _mempcpy,@function
_mempcpy:
+#ifdef __RX_DISALLOW_STRING_INSNS__
+ /* Do not use the string instructions - they might prefetch
+ bytes from outside of valid memory. This is particularly
+ dangerous in I/O space. */
+
+ cmp #0, r3 ; If the count is zero, do nothing
+ beq 2f
+
+1: mov.b [r2+], r5
+ mov.b r5, [r1+]
+ sub #1, r3
+ bne 1b
+
+2: rts
+#else
smovf
rts
+#endif
+ .size _mempcpy, . - _mempcpy
diff --git a/newlib/libc/machine/rx/memset.S b/newlib/libc/machine/rx/memset.S
index edab44620..5ce7a3bca 100644
--- a/newlib/libc/machine/rx/memset.S
+++ b/newlib/libc/machine/rx/memset.S
@@ -8,3 +8,6 @@ _memset:
sstr.b
mov r4, r1
rts
+
+ .size _memset, . - _memset
+
diff --git a/newlib/libc/machine/rx/strcat.S b/newlib/libc/machine/rx/strcat.S
index 7ceffb744..22533fc8d 100644
--- a/newlib/libc/machine/rx/strcat.S
+++ b/newlib/libc/machine/rx/strcat.S
@@ -6,6 +6,22 @@
_strcat:
;; On entry: r1 => Destination
;; r2 => Source
+#ifdef __RX_DISALLOW_STRING_INSNS__
+ mov r1, r4 ; Save a copy of the dest pointer.
+
+1: mov.b [r4+], r5 ; Find the NUL byte at the end of R4.
+ cmp #0, r5
+ bne 1b
+
+ sub #1, r4 ; Move R4 back to point at the NUL byte.
+
+2: mov.b [r2+], r5 ; Copy bytes from R2 to R4 until we reach a NUL byte.
+ mov.b r5, [r4+]
+ cmp #0, r5
+ bne 2b
+
+ rts
+#else
mov r1, r4 ; Save a copy of the dest pointer.
mov r2, r5 ; Save a copy of the source pointer.
@@ -20,3 +36,6 @@ _strcat:
mov r4, r1 ; Return the original dest pointer.
rts
+#endif
+ .size _strcat, . - _strcat
+
diff --git a/newlib/libc/machine/rx/strcmp.S b/newlib/libc/machine/rx/strcmp.S
index 397415bb4..6a06e6c9d 100644
--- a/newlib/libc/machine/rx/strcmp.S
+++ b/newlib/libc/machine/rx/strcmp.S
@@ -5,6 +5,21 @@
.global _strcmp
.type _strcmp,@function
_strcmp:
+#ifdef __RX_DISALLOW_STRING_INSNS__
+2: mov.b [r1+], r4
+ mov.b [r2+], r5
+ cmp #0, r4
+ beq 3f
+ cmp #0, r5
+ beq 3f
+ cmp r4, r5
+ beq 2b
+
+3: and #0xff, r4 ; We need to perform an unsigned comparison of the bytes.
+ and #0xff, r5
+ sub r5, r4, r1
+ rts
+#else
mov #-1, r3 ; Strictly speaking this is incorrect, but I doubt if anyone will ever know.
scmpu ; Perform the string comparison
bnc 1f ; If Carry is not set skip over
@@ -13,3 +28,6 @@ _strcmp:
1: ;
mov #-1,r1 ; Carry not set, result should be negative
rts ;
+#endif
+ .size _strcmp, . - _strcmp
+
diff --git a/newlib/libc/machine/rx/strcpy.S b/newlib/libc/machine/rx/strcpy.S
index a2dc17464..05766ccef 100644
--- a/newlib/libc/machine/rx/strcpy.S
+++ b/newlib/libc/machine/rx/strcpy.S
@@ -4,8 +4,22 @@
.global _strcpy
.type _strcpy,@function
_strcpy:
+ ;; R1: dest
+ ;; R2: source
+#ifdef __RX_DISALLOW_STRING_INSNS__
+ mov r1, r4 ; Leave the destination address unchanged in the result register.
+
+1: mov.b [r2+], r5
+ mov.b r5, [r4+]
+ cmp #0, r5
+ bne 1b
+
+ rts
+#else
mov r1, r4
mov #-1, r3 ; Strictly speaking this is incorrect, but I doubt if anyone will ever know.
smovu
mov r4, r1
rts
+#endif
+ .size _strcpy, . - _strcpy
diff --git a/newlib/libc/machine/rx/strlen.S b/newlib/libc/machine/rx/strlen.S
index c07b429b2..bf12c0ce1 100644
--- a/newlib/libc/machine/rx/strlen.S
+++ b/newlib/libc/machine/rx/strlen.S
@@ -5,6 +5,17 @@
.global _strlen
.type _strlen,@function
_strlen:
+#ifdef __RX_DISALLOW_STRING_INSNS__
+ mov r1, r4
+
+1: mov.b [r1+], r5
+ cmp #0, r5
+ bne 1b
+
+ sub #1, r1
+ sub r4, r1
+ rts
+#else
add #0, r1, r4 ; Save a copy of the string start address and set the condition flags.
beq null_string ; Test for a NULL pointer.
mov #-1, r3 ; Set a limit on the number of bytes examined.
@@ -14,3 +25,5 @@ _strlen:
null_string:
sub r4, r1 ; Compute the length.
rts
+#endif
+ .size _strlen, . - _strlen
diff --git a/newlib/libc/machine/rx/strncat.S b/newlib/libc/machine/rx/strncat.S
index 3bc6b75ae..ba544a43a 100644
--- a/newlib/libc/machine/rx/strncat.S
+++ b/newlib/libc/machine/rx/strncat.S
@@ -7,7 +7,27 @@ _strncat:
;; On entry: r1 => Destination
;; r2 => Source
;; r3 => Max number of bytes to copy
+#ifdef __RX_DISALLOW_STRING_INSNS__
+ cmp #0, r3 ; If max is zero we have nothing to do.
+ beq 2f
+ mov r1, r4 ; Leave the desintation pointer intact for the return value.
+
+1: mov.b [r4+], r5 ; Find the NUL byte at the end of the destination.
+ cmp #0, r5
+ bne 1b
+
+ sub #1, r4
+
+3: mov.b [r2+], r5 ; Copy bytes from the source into the destination ...
+ mov.b r5, [r4+]
+ cmp #0, r5 ; ... until we reach a NUL byte ...
+ beq 2f
+ sub #1, r3
+ bne 3b ; ... or we have copied N bytes.
+
+2: rts
+#else
mov r1, r4 ; Save a copy of the dest pointer.
mov r2, r5 ; Save a copy of the source pointer.
mov r3, r14 ; Save a copy of the byte count.
@@ -33,3 +53,6 @@ _strncat:
1:
mov r4, r1 ; Return the original dest pointer.
rts
+#endif
+ .size _strncat, . - _strncat
+
diff --git a/newlib/libc/machine/rx/strncmp.S b/newlib/libc/machine/rx/strncmp.S
index 929e9cb0a..4be8076db 100644
--- a/newlib/libc/machine/rx/strncmp.S
+++ b/newlib/libc/machine/rx/strncmp.S
@@ -4,6 +4,32 @@
.global _strncmp
.type _strncmp,@function
_strncmp:
+ ;; R1: string1
+ ;; R2: string2
+ ;; R3: max number of bytes to compare
+#ifdef __RX_DISALLOW_STRING_INSNS__
+ cmp #0, r3 ; For a length of zero, return zero
+ beq 4f
+
+2: mov.b [r1+], r4
+ mov.b [r2+], r5
+ cmp #0, r4
+ beq 3f
+ cmp #0, r5
+ beq 3f
+ sub #1, r3
+ beq 3f
+ cmp r4, r5
+ beq 2b
+
+3: and #0xff, r4 ; We need to perform an unsigned comparison of the bytes.
+ and #0xff, r5
+ sub r5, r4, r1
+ rts
+
+4: mov #0, r1
+ rts
+#else
scmpu ; Perform the string comparison
bnc 1f ; If Carry is not set skip over
scne.L r1 ; Set result based on Z flag
@@ -11,3 +37,5 @@ _strncmp:
1: ;
mov #-1,r1 ; Carry not set, result should be negative
rts ;
+#endif
+ .size _strncmp, . - _strncmp
diff --git a/newlib/libc/machine/rx/strncpy.S b/newlib/libc/machine/rx/strncpy.S
index e04922a59..e5b6a83ac 100644
--- a/newlib/libc/machine/rx/strncpy.S
+++ b/newlib/libc/machine/rx/strncpy.S
@@ -4,6 +4,26 @@
.global _strncpy
.type _strncpy,@function
_strncpy:
+#ifdef __RX_DISALLOW_STRING_INSNS__
+ cmp #0, r3
+ beq 3f
+
+ mov r1, r4 ; Preserve R1 for the return value.
+
+2: mov.b [r2+], r5 ; Copy bytes until...
+ mov.b r5, [r4+]
+ sub #1, r3
+ beq 3f ; ... our count reaches zero
+ cmp #0, r5
+ bne 2b ; ... or we have written a NUL byte
+
+4: mov.b r5, [r4+] ; Continue to write further NUL bytes
+ sub #1, r3
+ bne 4b ; until the count reaches zero.
+
+3: rts
+
+#else
mov r1, r4 ; Save a copy of the dest pointer.
mov r3, r5 ; Save a copy of the byte count
smovu ; Copy the bytes
@@ -16,3 +36,6 @@ _strncpy:
1:
mov r4, r1 ; Return the destination pointer
rts
+#endif
+ .size _strncpy, . - _strncpy
+
diff --git a/newlib/libc/machine/sh/configure b/newlib/libc/machine/sh/configure
index 360d94aa4..370549b9e 100755
--- a/newlib/libc/machine/sh/configure
+++ b/newlib/libc/machine/sh/configure
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.68 for newlib 2.0.0.
+# Generated by GNU Autoconf 2.68 for newlib 2.4.0.
#
#
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
@@ -557,8 +557,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='newlib'
PACKAGE_TARNAME='newlib'
-PACKAGE_VERSION='2.0.0'
-PACKAGE_STRING='newlib 2.0.0'
+PACKAGE_VERSION='2.4.0'
+PACKAGE_STRING='newlib 2.4.0'
PACKAGE_BUGREPORT=''
PACKAGE_URL=''
@@ -1258,7 +1258,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures newlib 2.0.0 to adapt to many kinds of systems.
+\`configure' configures newlib 2.4.0 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1328,7 +1328,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of newlib 2.0.0:";;
+ short | recursive ) echo "Configuration of newlib 2.4.0:";;
esac
cat <<\_ACEOF
@@ -1427,7 +1427,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-newlib configure 2.0.0
+newlib configure 2.4.0
generated by GNU Autoconf 2.68
Copyright (C) 2010 Free Software Foundation, Inc.
@@ -1519,7 +1519,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by newlib $as_me 2.0.0, which was
+It was created by newlib $as_me 2.4.0, which was
generated by GNU Autoconf 2.68. Invocation command line was
$ $0 $@
@@ -2593,7 +2593,7 @@ fi
# Define the identity of the package.
PACKAGE='newlib'
- VERSION='2.0.0'
+ VERSION='2.4.0'
# Some tools Automake needs.
@@ -5376,7 +5376,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by newlib $as_me 2.0.0, which was
+This file was extended by newlib $as_me 2.4.0, which was
generated by GNU Autoconf 2.68. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -5433,7 +5433,7 @@ _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
-newlib config.status 2.0.0
+newlib config.status 2.4.0
configured by $0, generated by GNU Autoconf 2.68,
with options \\"\$ac_cs_config\\"
diff --git a/newlib/libc/machine/sparc/configure b/newlib/libc/machine/sparc/configure
index 2f2417754..b60489018 100755
--- a/newlib/libc/machine/sparc/configure
+++ b/newlib/libc/machine/sparc/configure
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.68 for newlib 2.0.0.
+# Generated by GNU Autoconf 2.68 for newlib 2.4.0.
#
#
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
@@ -556,8 +556,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='newlib'
PACKAGE_TARNAME='newlib'
-PACKAGE_VERSION='2.0.0'
-PACKAGE_STRING='newlib 2.0.0'
+PACKAGE_VERSION='2.4.0'
+PACKAGE_STRING='newlib 2.4.0'
PACKAGE_BUGREPORT=''
PACKAGE_URL=''
@@ -1239,7 +1239,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures newlib 2.0.0 to adapt to many kinds of systems.
+\`configure' configures newlib 2.4.0 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1309,7 +1309,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of newlib 2.0.0:";;
+ short | recursive ) echo "Configuration of newlib 2.4.0:";;
esac
cat <<\_ACEOF
@@ -1400,7 +1400,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-newlib configure 2.0.0
+newlib configure 2.4.0
generated by GNU Autoconf 2.68
Copyright (C) 2010 Free Software Foundation, Inc.
@@ -1455,7 +1455,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by newlib $as_me 2.0.0, which was
+It was created by newlib $as_me 2.4.0, which was
generated by GNU Autoconf 2.68. Invocation command line was
$ $0 $@
@@ -2527,7 +2527,7 @@ fi
# Define the identity of the package.
PACKAGE='newlib'
- VERSION='2.0.0'
+ VERSION='2.4.0'
# Some tools Automake needs.
@@ -4007,7 +4007,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by newlib $as_me 2.0.0, which was
+This file was extended by newlib $as_me 2.4.0, which was
generated by GNU Autoconf 2.68. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -4064,7 +4064,7 @@ _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
-newlib config.status 2.0.0
+newlib config.status 2.4.0
configured by $0, generated by GNU Autoconf 2.68,
with options \\"\$ac_cs_config\\"
diff --git a/newlib/libc/machine/sparc/setjmp.S b/newlib/libc/machine/sparc/setjmp.S
index 00d668f91..8df0a6e40 100644
--- a/newlib/libc/machine/sparc/setjmp.S
+++ b/newlib/libc/machine/sparc/setjmp.S
@@ -124,9 +124,9 @@ ENTRY(_setjmp)
ENTRY(longjmp)
ENTRY(_longjmp)
ta 0x03 /* flush registers */
- addcc %o1, %g0, %g6 ! compute v ? v : 1 in a global register
+ addcc %o1, %g0, %g1 ! compute v ? v : 1 in a global register
be,a 0f
- mov 1, %g6
+ mov 1, %g1
0:
ld [%o0], %sp /* caller's stack pointer */
@@ -143,6 +143,6 @@ ENTRY(_longjmp)
ld [%o0+8], %fp /* caller's frame pointer */
ld [%o0+12], %o7
- jmp %o7 + 8 ! success, return %g6
- mov %g6, %o0
+ jmp %o7 + 8 ! success, return %g1
+ mov %g1, %o0
diff --git a/newlib/libc/machine/spu/configure b/newlib/libc/machine/spu/configure
index 54c7372ab..5cadf6b19 100644
--- a/newlib/libc/machine/spu/configure
+++ b/newlib/libc/machine/spu/configure
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.68 for newlib 2.0.0.
+# Generated by GNU Autoconf 2.68 for newlib 2.4.0.
#
#
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
@@ -556,8 +556,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='newlib'
PACKAGE_TARNAME='newlib'
-PACKAGE_VERSION='2.0.0'
-PACKAGE_STRING='newlib 2.0.0'
+PACKAGE_VERSION='2.4.0'
+PACKAGE_STRING='newlib 2.4.0'
PACKAGE_BUGREPORT=''
PACKAGE_URL=''
@@ -1241,7 +1241,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures newlib 2.0.0 to adapt to many kinds of systems.
+\`configure' configures newlib 2.4.0 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1311,7 +1311,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of newlib 2.0.0:";;
+ short | recursive ) echo "Configuration of newlib 2.4.0:";;
esac
cat <<\_ACEOF
@@ -1402,7 +1402,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-newlib configure 2.0.0
+newlib configure 2.4.0
generated by GNU Autoconf 2.68
Copyright (C) 2010 Free Software Foundation, Inc.
@@ -1457,7 +1457,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by newlib $as_me 2.0.0, which was
+It was created by newlib $as_me 2.4.0, which was
generated by GNU Autoconf 2.68. Invocation command line was
$ $0 $@
@@ -2529,7 +2529,7 @@ fi
# Define the identity of the package.
PACKAGE='newlib'
- VERSION='2.0.0'
+ VERSION='2.4.0'
# Some tools Automake needs.
@@ -4041,7 +4041,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by newlib $as_me 2.0.0, which was
+This file was extended by newlib $as_me 2.4.0, which was
generated by GNU Autoconf 2.68. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -4098,7 +4098,7 @@ _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
-newlib config.status 2.0.0
+newlib config.status 2.4.0
configured by $0, generated by GNU Autoconf 2.68,
with options \\"\$ac_cs_config\\"
diff --git a/newlib/libc/machine/spu/fgetpos.c b/newlib/libc/machine/spu/fgetpos.c
index aa7b6f001..694400e48 100644
--- a/newlib/libc/machine/spu/fgetpos.c
+++ b/newlib/libc/machine/spu/fgetpos.c
@@ -45,8 +45,8 @@ typedef struct
int
_DEFUN (fgetpos, (fp, pos),
- FILE * fp _AND
- _fpos_t * pos)
+ FILE *__restrict fp _AND
+ _fpos_t *__restrict pos)
{
c99_fgetpos_t arg;
diff --git a/newlib/libc/machine/spu/fgets.c b/newlib/libc/machine/spu/fgets.c
index 8167fd174..2b0ca417e 100644
--- a/newlib/libc/machine/spu/fgets.c
+++ b/newlib/libc/machine/spu/fgets.c
@@ -47,9 +47,9 @@ typedef struct
char *
_DEFUN (fgets, (buf, n, fp),
- char *buf _AND
+ char *__restrict buf _AND
int n _AND
- FILE * fp)
+ FILE *__restrict fp)
{
c99_fgets_t args;
diff --git a/newlib/libc/machine/spu/fopen.c b/newlib/libc/machine/spu/fopen.c
index 20b36678a..821d7c201 100644
--- a/newlib/libc/machine/spu/fopen.c
+++ b/newlib/libc/machine/spu/fopen.c
@@ -46,8 +46,8 @@ typedef struct
#ifndef _REENT_ONLY
FILE *
_DEFUN (fopen, (file, mode),
- _CONST char *file _AND
- _CONST char *mode)
+ _CONST char *__restrict file _AND
+ _CONST char *__restrict mode)
{
int ret;
c99_fopen_t args;
diff --git a/newlib/libc/machine/spu/fputs.c b/newlib/libc/machine/spu/fputs.c
index 2b5d17587..9ed796894 100644
--- a/newlib/libc/machine/spu/fputs.c
+++ b/newlib/libc/machine/spu/fputs.c
@@ -47,8 +47,8 @@ typedef struct
int
_DEFUN (fputs, (s, fp),
- char _CONST * s _AND
- FILE * fp)
+ char _CONST *__restrict s _AND
+ FILE *__restrict fp)
{
c99_fputs_t args;
diff --git a/newlib/libc/machine/spu/fread.c b/newlib/libc/machine/spu/fread.c
index f3c420f76..eb3966c19 100644
--- a/newlib/libc/machine/spu/fread.c
+++ b/newlib/libc/machine/spu/fread.c
@@ -50,10 +50,10 @@ typedef struct
size_t
_DEFUN (fread, (buf, size, count, fp),
- _PTR buf _AND
+ _PTR __restrict buf _AND
size_t size _AND
size_t count _AND
- FILE * fp)
+ FILE *__restrict fp)
{
c99_fread_t args;
diff --git a/newlib/libc/machine/spu/freopen.c b/newlib/libc/machine/spu/freopen.c
index 9f19a68f5..53dd2bc1d 100644
--- a/newlib/libc/machine/spu/freopen.c
+++ b/newlib/libc/machine/spu/freopen.c
@@ -48,9 +48,9 @@ typedef struct
FILE *
_DEFUN (freopen, (file, mode, fp),
- const char *file _AND
- const char *mode _AND
- FILE *fp)
+ const char *__restrict file _AND
+ const char *__restrict mode _AND
+ FILE *__restrict fp)
{
int ret;
c99_freopen_t args;
diff --git a/newlib/libc/machine/spu/fwrite.c b/newlib/libc/machine/spu/fwrite.c
index 3804165c8..58aab9f0a 100644
--- a/newlib/libc/machine/spu/fwrite.c
+++ b/newlib/libc/machine/spu/fwrite.c
@@ -50,7 +50,7 @@ typedef struct
size_t
_DEFUN (fwrite, (buf, size, count, fp),
- _CONST _PTR buf _AND
+ _CONST _PTR __restrict buf _AND
size_t size _AND
size_t count _AND
FILE * fp)
diff --git a/newlib/libc/machine/spu/machine/_types.h b/newlib/libc/machine/spu/machine/_types.h
index d58c617a8..edff17554 100644
--- a/newlib/libc/machine/spu/machine/_types.h
+++ b/newlib/libc/machine/spu/machine/_types.h
@@ -39,22 +39,22 @@
/*
* fpos_t large enough for either 32 or 64 bit ppc glibc fpos_t.
*/
-#define __fpos_t_defined
+#define __machine_fpos_t_defined
typedef struct {
char __pos[16];
} _fpos_t;
#ifdef __LARGE64_FILES
-#define __fpos64_t_defined
+#define __machine_fpos64_t_defined
typedef _fpos_t _fpos64_t;
#endif
-#define __dev_t_defined
+#define __machine_dev_t_defined
typedef int __dev_t;
-#define __uid_t_defined
+#define __machine_uid_t_defined
typedef unsigned int __uid_t;
-#define __gid_t_defined
+#define __machine_gid_t_defined
typedef unsigned int __gid_t;
#endif /* _MACHINE__TYPES_H */
diff --git a/newlib/libc/machine/spu/setbuf.c b/newlib/libc/machine/spu/setbuf.c
index 555568154..84430fc73 100644
--- a/newlib/libc/machine/spu/setbuf.c
+++ b/newlib/libc/machine/spu/setbuf.c
@@ -47,8 +47,8 @@ typedef struct
void
_DEFUN (setbuf, (fp, buf),
- FILE * fp _AND
- char *buf)
+ FILE *__restrict fp _AND
+ char *__restrict buf)
{
c99_setbuf_t args;
diff --git a/newlib/libc/machine/spu/spu_timer_internal.h b/newlib/libc/machine/spu/spu_timer_internal.h
index a438561b9..132235ad8 100644
--- a/newlib/libc/machine/spu/spu_timer_internal.h
+++ b/newlib/libc/machine/spu/spu_timer_internal.h
@@ -53,12 +53,12 @@ typedef enum spu_timer_state
typedef struct spu_timer
{
- int tmout __attribute__ ((aligned (16))); /* Time until expiration (tb). */
- int intvl __attribute__ ((aligned (16))); /* Interval. */
- int id __attribute__ ((aligned (16)));
- spu_timer_state_t state __attribute__ ((aligned (16)));
- void (*func) (int) __attribute__ ((aligned (16))); /* Handler. */
- struct spu_timer *next __attribute__ ((aligned (16)));
+ int tmout __attribute__ ((__aligned__ (16))); /* Time until expiration (tb). */
+ int intvl __attribute__ ((__aligned__ (16))); /* Interval. */
+ int id __attribute__ ((__aligned__ (16)));
+ spu_timer_state_t state __attribute__ ((__aligned__ (16)));
+ void (*func) (int) __attribute__ ((__aligned__ (16))); /* Handler. */
+ struct spu_timer *next __attribute__ ((__aligned__ (16)));
} spu_timer_t;
diff --git a/newlib/libc/machine/spu/sys/dirent.h b/newlib/libc/machine/spu/sys/dirent.h
index 6a158ec4a..60da65a62 100644
--- a/newlib/libc/machine/spu/sys/dirent.h
+++ b/newlib/libc/machine/spu/sys/dirent.h
@@ -54,6 +54,8 @@ typedef struct {
DIR *opendir(const char *);
int closedir(DIR *);
struct dirent *readdir (DIR *);
+int readdir_r (DIR *__restrict, struct dirent *__restrict,
+ struct dirent **__restrict);
void rewinddir(DIR *);
void seekdir(DIR *dir, off_t offset);
off_t telldir(DIR *dir);
diff --git a/newlib/libc/machine/spu/vfprintf.c b/newlib/libc/machine/spu/vfprintf.c
index f46c802b0..128d0b3eb 100644
--- a/newlib/libc/machine/spu/vfprintf.c
+++ b/newlib/libc/machine/spu/vfprintf.c
@@ -58,8 +58,8 @@ typedef struct
int
_DEFUN (vfprintf, (fp, fmt0, ap),
- FILE * fp _AND
- _CONST char *fmt0 _AND
+ FILE *__restrict fp _AND
+ _CONST char *__restrict fmt0 _AND
va_list ap)
{
c99_vfprintf_t args;
diff --git a/newlib/libc/machine/spu/vfscanf.c b/newlib/libc/machine/spu/vfscanf.c
index 4de496b11..0f728969f 100644
--- a/newlib/libc/machine/spu/vfscanf.c
+++ b/newlib/libc/machine/spu/vfscanf.c
@@ -58,8 +58,8 @@ typedef struct
int
_DEFUN (vfscanf, (fp, fmt, ap),
- FILE *fp _AND
- _CONST char *fmt _AND
+ FILE *__restrict fp _AND
+ _CONST char *__restrict fmt _AND
va_list ap)
{
c99_vfscanf_t args;
diff --git a/newlib/libc/machine/spu/vsnprintf.c b/newlib/libc/machine/spu/vsnprintf.c
index 575cf82d2..cf4f5e709 100644
--- a/newlib/libc/machine/spu/vsnprintf.c
+++ b/newlib/libc/machine/spu/vsnprintf.c
@@ -28,9 +28,9 @@ typedef struct
int
_DEFUN (vsnprintf, (str, size, fmt, ap),
- char *str _AND
+ char *__restrict str _AND
size_t size _AND
- _CONST char *fmt _AND
+ _CONST char *__restrict fmt _AND
va_list ap)
{
c99_vsnprintf_t args;
diff --git a/newlib/libc/machine/spu/vsprintf.c b/newlib/libc/machine/spu/vsprintf.c
index f69b9400c..0719d38f5 100644
--- a/newlib/libc/machine/spu/vsprintf.c
+++ b/newlib/libc/machine/spu/vsprintf.c
@@ -27,8 +27,8 @@ typedef struct
int
_DEFUN (vsprintf, (str, fmt, ap),
- char *str _AND
- _CONST char *fmt _AND
+ char *__restrict str _AND
+ _CONST char *__restrict fmt _AND
va_list ap)
{
c99_vsprintf_t args;
diff --git a/newlib/libc/machine/spu/vsscanf.c b/newlib/libc/machine/spu/vsscanf.c
index bd76cfc9e..2f7380ff4 100644
--- a/newlib/libc/machine/spu/vsscanf.c
+++ b/newlib/libc/machine/spu/vsscanf.c
@@ -58,8 +58,8 @@ typedef struct
int
_DEFUN (vsscanf, (str, fmt, ap),
- _CONST char *str _AND
- _CONST char *fmt _AND
+ _CONST char *__restrict str _AND
+ _CONST char *__restrict fmt _AND
va_list ap)
{
c99_vsscanf_t args;
diff --git a/newlib/libc/machine/tic4x/configure b/newlib/libc/machine/tic4x/configure
index d96b7718a..ca07e566c 100755
--- a/newlib/libc/machine/tic4x/configure
+++ b/newlib/libc/machine/tic4x/configure
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.68 for newlib 2.0.0.
+# Generated by GNU Autoconf 2.68 for newlib 2.4.0.
#
#
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
@@ -556,8 +556,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='newlib'
PACKAGE_TARNAME='newlib'
-PACKAGE_VERSION='2.0.0'
-PACKAGE_STRING='newlib 2.0.0'
+PACKAGE_VERSION='2.4.0'
+PACKAGE_STRING='newlib 2.4.0'
PACKAGE_BUGREPORT=''
PACKAGE_URL=''
@@ -1239,7 +1239,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures newlib 2.0.0 to adapt to many kinds of systems.
+\`configure' configures newlib 2.4.0 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1309,7 +1309,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of newlib 2.0.0:";;
+ short | recursive ) echo "Configuration of newlib 2.4.0:";;
esac
cat <<\_ACEOF
@@ -1400,7 +1400,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-newlib configure 2.0.0
+newlib configure 2.4.0
generated by GNU Autoconf 2.68
Copyright (C) 2010 Free Software Foundation, Inc.
@@ -1455,7 +1455,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by newlib $as_me 2.0.0, which was
+It was created by newlib $as_me 2.4.0, which was
generated by GNU Autoconf 2.68. Invocation command line was
$ $0 $@
@@ -2527,7 +2527,7 @@ fi
# Define the identity of the package.
PACKAGE='newlib'
- VERSION='2.0.0'
+ VERSION='2.4.0'
# Some tools Automake needs.
@@ -4007,7 +4007,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by newlib $as_me 2.0.0, which was
+This file was extended by newlib $as_me 2.4.0, which was
generated by GNU Autoconf 2.68. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -4064,7 +4064,7 @@ _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
-newlib config.status 2.0.0
+newlib config.status 2.4.0
configured by $0, generated by GNU Autoconf 2.68,
with options \\"\$ac_cs_config\\"
diff --git a/newlib/libc/machine/tic6x/configure b/newlib/libc/machine/tic6x/configure
index d96b7718a..ca07e566c 100755
--- a/newlib/libc/machine/tic6x/configure
+++ b/newlib/libc/machine/tic6x/configure
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.68 for newlib 2.0.0.
+# Generated by GNU Autoconf 2.68 for newlib 2.4.0.
#
#
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
@@ -556,8 +556,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='newlib'
PACKAGE_TARNAME='newlib'
-PACKAGE_VERSION='2.0.0'
-PACKAGE_STRING='newlib 2.0.0'
+PACKAGE_VERSION='2.4.0'
+PACKAGE_STRING='newlib 2.4.0'
PACKAGE_BUGREPORT=''
PACKAGE_URL=''
@@ -1239,7 +1239,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures newlib 2.0.0 to adapt to many kinds of systems.
+\`configure' configures newlib 2.4.0 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1309,7 +1309,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of newlib 2.0.0:";;
+ short | recursive ) echo "Configuration of newlib 2.4.0:";;
esac
cat <<\_ACEOF
@@ -1400,7 +1400,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-newlib configure 2.0.0
+newlib configure 2.4.0
generated by GNU Autoconf 2.68
Copyright (C) 2010 Free Software Foundation, Inc.
@@ -1455,7 +1455,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by newlib $as_me 2.0.0, which was
+It was created by newlib $as_me 2.4.0, which was
generated by GNU Autoconf 2.68. Invocation command line was
$ $0 $@
@@ -2527,7 +2527,7 @@ fi
# Define the identity of the package.
PACKAGE='newlib'
- VERSION='2.0.0'
+ VERSION='2.4.0'
# Some tools Automake needs.
@@ -4007,7 +4007,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by newlib $as_me 2.0.0, which was
+This file was extended by newlib $as_me 2.4.0, which was
generated by GNU Autoconf 2.68. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -4064,7 +4064,7 @@ _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
-newlib config.status 2.0.0
+newlib config.status 2.4.0
configured by $0, generated by GNU Autoconf 2.68,
with options \\"\$ac_cs_config\\"
diff --git a/newlib/libc/machine/tic80/configure b/newlib/libc/machine/tic80/configure
index d96b7718a..ca07e566c 100755
--- a/newlib/libc/machine/tic80/configure
+++ b/newlib/libc/machine/tic80/configure
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.68 for newlib 2.0.0.
+# Generated by GNU Autoconf 2.68 for newlib 2.4.0.
#
#
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
@@ -556,8 +556,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='newlib'
PACKAGE_TARNAME='newlib'
-PACKAGE_VERSION='2.0.0'
-PACKAGE_STRING='newlib 2.0.0'
+PACKAGE_VERSION='2.4.0'
+PACKAGE_STRING='newlib 2.4.0'
PACKAGE_BUGREPORT=''
PACKAGE_URL=''
@@ -1239,7 +1239,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures newlib 2.0.0 to adapt to many kinds of systems.
+\`configure' configures newlib 2.4.0 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1309,7 +1309,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of newlib 2.0.0:";;
+ short | recursive ) echo "Configuration of newlib 2.4.0:";;
esac
cat <<\_ACEOF
@@ -1400,7 +1400,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-newlib configure 2.0.0
+newlib configure 2.4.0
generated by GNU Autoconf 2.68
Copyright (C) 2010 Free Software Foundation, Inc.
@@ -1455,7 +1455,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by newlib $as_me 2.0.0, which was
+It was created by newlib $as_me 2.4.0, which was
generated by GNU Autoconf 2.68. Invocation command line was
$ $0 $@
@@ -2527,7 +2527,7 @@ fi
# Define the identity of the package.
PACKAGE='newlib'
- VERSION='2.0.0'
+ VERSION='2.4.0'
# Some tools Automake needs.
@@ -4007,7 +4007,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by newlib $as_me 2.0.0, which was
+This file was extended by newlib $as_me 2.4.0, which was
generated by GNU Autoconf 2.68. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -4064,7 +4064,7 @@ _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
-newlib config.status 2.0.0
+newlib config.status 2.4.0
configured by $0, generated by GNU Autoconf 2.68,
with options \\"\$ac_cs_config\\"
diff --git a/newlib/libc/machine/v850/configure b/newlib/libc/machine/v850/configure
index d96b7718a..ca07e566c 100755
--- a/newlib/libc/machine/v850/configure
+++ b/newlib/libc/machine/v850/configure
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.68 for newlib 2.0.0.
+# Generated by GNU Autoconf 2.68 for newlib 2.4.0.
#
#
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
@@ -556,8 +556,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='newlib'
PACKAGE_TARNAME='newlib'
-PACKAGE_VERSION='2.0.0'
-PACKAGE_STRING='newlib 2.0.0'
+PACKAGE_VERSION='2.4.0'
+PACKAGE_STRING='newlib 2.4.0'
PACKAGE_BUGREPORT=''
PACKAGE_URL=''
@@ -1239,7 +1239,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures newlib 2.0.0 to adapt to many kinds of systems.
+\`configure' configures newlib 2.4.0 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1309,7 +1309,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of newlib 2.0.0:";;
+ short | recursive ) echo "Configuration of newlib 2.4.0:";;
esac
cat <<\_ACEOF
@@ -1400,7 +1400,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-newlib configure 2.0.0
+newlib configure 2.4.0
generated by GNU Autoconf 2.68
Copyright (C) 2010 Free Software Foundation, Inc.
@@ -1455,7 +1455,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by newlib $as_me 2.0.0, which was
+It was created by newlib $as_me 2.4.0, which was
generated by GNU Autoconf 2.68. Invocation command line was
$ $0 $@
@@ -2527,7 +2527,7 @@ fi
# Define the identity of the package.
PACKAGE='newlib'
- VERSION='2.0.0'
+ VERSION='2.4.0'
# Some tools Automake needs.
@@ -4007,7 +4007,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by newlib $as_me 2.0.0, which was
+This file was extended by newlib $as_me 2.4.0, which was
generated by GNU Autoconf 2.68. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -4064,7 +4064,7 @@ _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
-newlib config.status 2.0.0
+newlib config.status 2.4.0
configured by $0, generated by GNU Autoconf 2.68,
with options \\"\$ac_cs_config\\"
diff --git a/newlib/libc/machine/visium/Makefile.am b/newlib/libc/machine/visium/Makefile.am
new file mode 100644
index 000000000..67cb313c8
--- /dev/null
+++ b/newlib/libc/machine/visium/Makefile.am
@@ -0,0 +1,16 @@
+## Process this file with automake to generate Makefile.in
+
+AUTOMAKE_OPTIONS = cygnus
+
+INCLUDES = $(NEWLIB_CFLAGS) $(CROSS_CFLAGS) $(TARGET_CFLAGS)
+
+AM_CCASFLAGS = $(INCLUDES)
+
+noinst_LIBRARIES = lib.a
+
+lib_a_SOURCES = memcpy.c memset.c memmove.c setjmp.S
+lib_a_CFLAGS = $(AM_CFLAGS)
+lib_a_CCASFLAGS = $(AM_CCASFLAGS)
+
+ACLOCAL_AMFLAGS = -I ../../..
+CONFIG_STATUS_DEPENDENCIES = $(newlib_basedir)/configure.host
diff --git a/newlib/libc/sys/arc/Makefile.in b/newlib/libc/machine/visium/Makefile.in
index c320e6e7a..1b9048110 100644
--- a/newlib/libc/sys/arc/Makefile.in
+++ b/newlib/libc/machine/visium/Makefile.in
@@ -69,8 +69,8 @@ LIBRARIES = $(noinst_LIBRARIES)
ARFLAGS = cru
lib_a_AR = $(AR) $(ARFLAGS)
lib_a_LIBADD =
-am_lib_a_OBJECTS = lib_a-isatty.$(OBJEXT) lib_a-mem-layout.$(OBJEXT) \
- lib_a-sbrk.$(OBJEXT) lib_a-syscalls.$(OBJEXT)
+am_lib_a_OBJECTS = lib_a-memcpy.$(OBJEXT) lib_a-memset.$(OBJEXT) \
+ lib_a-memmove.$(OBJEXT) lib_a-setjmp.$(OBJEXT)
lib_a_OBJECTS = $(am_lib_a_OBJECTS)
DEFAULT_INCLUDES = -I.@am__isrc@
depcomp =
@@ -81,7 +81,7 @@ COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
CCLD = $(CC)
LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
-SOURCES = $(lib_a_SOURCES) $(EXTRA_lib_a_SOURCES)
+SOURCES = $(lib_a_SOURCES)
am__can_run_installinfo = \
case $$AM_UPDATE_INFO_DIR in \
n|no|NO) false;; \
@@ -196,11 +196,10 @@ AUTOMAKE_OPTIONS = cygnus
INCLUDES = $(NEWLIB_CFLAGS) $(CROSS_CFLAGS) $(TARGET_CFLAGS)
AM_CCASFLAGS = $(INCLUDES)
noinst_LIBRARIES = lib.a
-lib_a_SOURCES = isatty.c mem-layout.c sbrk.c syscalls.c
-EXTRA_lib_a_SOURCES = dummy.S
-lib_a_CCASFLAGS = $(AM_CCASFLAGS)
+lib_a_SOURCES = memcpy.c memset.c memmove.c setjmp.S
lib_a_CFLAGS = $(AM_CFLAGS)
-ACLOCAL_AMFLAGS = -I ../../.. -I ../../../..
+lib_a_CCASFLAGS = $(AM_CCASFLAGS)
+ACLOCAL_AMFLAGS = -I ../../..
CONFIG_STATUS_DEPENDENCIES = $(newlib_basedir)/configure.host
all: all-am
@@ -260,11 +259,11 @@ distclean-compile:
.S.obj:
$(CPPASCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
-lib_a-dummy.o: dummy.S
- $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CCASFLAGS) $(CCASFLAGS) -c -o lib_a-dummy.o `test -f 'dummy.S' || echo '$(srcdir)/'`dummy.S
+lib_a-setjmp.o: setjmp.S
+ $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CCASFLAGS) $(CCASFLAGS) -c -o lib_a-setjmp.o `test -f 'setjmp.S' || echo '$(srcdir)/'`setjmp.S
-lib_a-dummy.obj: dummy.S
- $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CCASFLAGS) $(CCASFLAGS) -c -o lib_a-dummy.obj `if test -f 'dummy.S'; then $(CYGPATH_W) 'dummy.S'; else $(CYGPATH_W) '$(srcdir)/dummy.S'; fi`
+lib_a-setjmp.obj: setjmp.S
+ $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CCASFLAGS) $(CCASFLAGS) -c -o lib_a-setjmp.obj `if test -f 'setjmp.S'; then $(CYGPATH_W) 'setjmp.S'; else $(CYGPATH_W) '$(srcdir)/setjmp.S'; fi`
.c.o:
$(COMPILE) -c $<
@@ -272,29 +271,23 @@ lib_a-dummy.obj: dummy.S
.c.obj:
$(COMPILE) -c `$(CYGPATH_W) '$<'`
-lib_a-isatty.o: isatty.c
- $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-isatty.o `test -f 'isatty.c' || echo '$(srcdir)/'`isatty.c
-
-lib_a-isatty.obj: isatty.c
- $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-isatty.obj `if test -f 'isatty.c'; then $(CYGPATH_W) 'isatty.c'; else $(CYGPATH_W) '$(srcdir)/isatty.c'; fi`
+lib_a-memcpy.o: memcpy.c
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-memcpy.o `test -f 'memcpy.c' || echo '$(srcdir)/'`memcpy.c
-lib_a-mem-layout.o: mem-layout.c
- $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-mem-layout.o `test -f 'mem-layout.c' || echo '$(srcdir)/'`mem-layout.c
+lib_a-memcpy.obj: memcpy.c
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-memcpy.obj `if test -f 'memcpy.c'; then $(CYGPATH_W) 'memcpy.c'; else $(CYGPATH_W) '$(srcdir)/memcpy.c'; fi`
-lib_a-mem-layout.obj: mem-layout.c
- $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-mem-layout.obj `if test -f 'mem-layout.c'; then $(CYGPATH_W) 'mem-layout.c'; else $(CYGPATH_W) '$(srcdir)/mem-layout.c'; fi`
+lib_a-memset.o: memset.c
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-memset.o `test -f 'memset.c' || echo '$(srcdir)/'`memset.c
-lib_a-sbrk.o: sbrk.c
- $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-sbrk.o `test -f 'sbrk.c' || echo '$(srcdir)/'`sbrk.c
+lib_a-memset.obj: memset.c
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-memset.obj `if test -f 'memset.c'; then $(CYGPATH_W) 'memset.c'; else $(CYGPATH_W) '$(srcdir)/memset.c'; fi`
-lib_a-sbrk.obj: sbrk.c
- $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-sbrk.obj `if test -f 'sbrk.c'; then $(CYGPATH_W) 'sbrk.c'; else $(CYGPATH_W) '$(srcdir)/sbrk.c'; fi`
+lib_a-memmove.o: memmove.c
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-memmove.o `test -f 'memmove.c' || echo '$(srcdir)/'`memmove.c
-lib_a-syscalls.o: syscalls.c
- $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-syscalls.o `test -f 'syscalls.c' || echo '$(srcdir)/'`syscalls.c
-
-lib_a-syscalls.obj: syscalls.c
- $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-syscalls.obj `if test -f 'syscalls.c'; then $(CYGPATH_W) 'syscalls.c'; else $(CYGPATH_W) '$(srcdir)/syscalls.c'; fi`
+lib_a-memmove.obj: memmove.c
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-memmove.obj `if test -f 'memmove.c'; then $(CYGPATH_W) 'memmove.c'; else $(CYGPATH_W) '$(srcdir)/memmove.c'; fi`
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
@@ -349,7 +342,7 @@ distclean-tags:
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
check-am:
check: check-am
-all-am: Makefile $(LIBRARIES) all-local
+all-am: Makefile $(LIBRARIES)
installdirs:
install: install-am
install-exec: install-exec-am
@@ -453,8 +446,8 @@ uninstall-am:
.MAKE: install-am install-strip
-.PHONY: CTAGS GTAGS all all-am all-local am--refresh check check-am \
- clean clean-generic clean-noinstLIBRARIES ctags distclean \
+.PHONY: CTAGS GTAGS all all-am am--refresh check check-am clean \
+ clean-generic clean-noinstLIBRARIES ctags distclean \
distclean-compile distclean-generic distclean-tags dvi dvi-am \
html html-am info info-am install install-am install-data \
install-data-am install-dvi install-dvi-am install-exec \
@@ -467,8 +460,6 @@ uninstall-am:
uninstall-am
-all-local: crt0.o
-
# 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/machine/visium/aclocal.m4 b/newlib/libc/machine/visium/aclocal.m4
new file mode 100644
index 000000000..18dab02aa
--- /dev/null
+++ b/newlib/libc/machine/visium/aclocal.m4
@@ -0,0 +1,1012 @@
+# generated automatically by aclocal 1.11.6 -*- Autoconf -*-
+
+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
+# 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation,
+# Inc.
+# This file 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.
+
+m4_ifndef([AC_AUTOCONF_VERSION],
+ [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
+m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.68],,
+[m4_warning([this file was generated for autoconf 2.68.
+You have another version of autoconf. It may work, but is not guaranteed to.
+If you have problems, you may need to regenerate the build system entirely.
+To do so, use the procedure documented by the package, typically `autoreconf'.])])
+
+# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008, 2011 Free Software
+# Foundation, Inc.
+#
+# This file 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.
+
+# serial 1
+
+# AM_AUTOMAKE_VERSION(VERSION)
+# ----------------------------
+# Automake X.Y traces this macro to ensure aclocal.m4 has been
+# generated from the m4 files accompanying Automake X.Y.
+# (This private macro should not be called outside this file.)
+AC_DEFUN([AM_AUTOMAKE_VERSION],
+[am__api_version='1.11'
+dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
+dnl require some minimum version. Point them to the right macro.
+m4_if([$1], [1.11.6], [],
+ [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
+])
+
+# _AM_AUTOCONF_VERSION(VERSION)
+# -----------------------------
+# aclocal traces this macro to find the Autoconf version.
+# This is a private macro too. Using m4_define simplifies
+# the logic in aclocal, which can simply ignore this definition.
+m4_define([_AM_AUTOCONF_VERSION], [])
+
+# AM_SET_CURRENT_AUTOMAKE_VERSION
+# -------------------------------
+# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
+# This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
+AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
+[AM_AUTOMAKE_VERSION([1.11.6])dnl
+m4_ifndef([AC_AUTOCONF_VERSION],
+ [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
+_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
+
+# AM_AUX_DIR_EXPAND -*- Autoconf -*-
+
+# Copyright (C) 2001, 2003, 2005, 2011 Free Software Foundation, Inc.
+#
+# This file 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.
+
+# serial 1
+
+# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
+# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to
+# `$srcdir', `$srcdir/..', or `$srcdir/../..'.
+#
+# Of course, Automake must honor this variable whenever it calls a
+# tool from the auxiliary directory. The problem is that $srcdir (and
+# therefore $ac_aux_dir as well) can be either absolute or relative,
+# depending on how configure is run. This is pretty annoying, since
+# it makes $ac_aux_dir quite unusable in subdirectories: in the top
+# source directory, any form will work fine, but in subdirectories a
+# relative path needs to be adjusted first.
+#
+# $ac_aux_dir/missing
+# fails when called from a subdirectory if $ac_aux_dir is relative
+# $top_srcdir/$ac_aux_dir/missing
+# fails if $ac_aux_dir is absolute,
+# fails when called from a subdirectory in a VPATH build with
+# a relative $ac_aux_dir
+#
+# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
+# are both prefixed by $srcdir. In an in-source build this is usually
+# harmless because $srcdir is `.', but things will broke when you
+# start a VPATH build or use an absolute $srcdir.
+#
+# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
+# iff we strip the leading $srcdir from $ac_aux_dir. That would be:
+# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
+# and then we would define $MISSING as
+# MISSING="\${SHELL} $am_aux_dir/missing"
+# This will work as long as MISSING is not called from configure, because
+# unfortunately $(top_srcdir) has no meaning in configure.
+# However there are other variables, like CC, which are often used in
+# configure, and could therefore not use this "fixed" $ac_aux_dir.
+#
+# Another solution, used here, is to always expand $ac_aux_dir to an
+# absolute PATH. The drawback is that using absolute paths prevent a
+# configured tree to be moved without reconfiguration.
+
+AC_DEFUN([AM_AUX_DIR_EXPAND],
+[dnl Rely on autoconf to set up CDPATH properly.
+AC_PREREQ([2.50])dnl
+# expand $ac_aux_dir to an absolute path
+am_aux_dir=`cd $ac_aux_dir && pwd`
+])
+
+# AM_CONDITIONAL -*- Autoconf -*-
+
+# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008
+# Free Software Foundation, Inc.
+#
+# This file 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.
+
+# serial 9
+
+# AM_CONDITIONAL(NAME, SHELL-CONDITION)
+# -------------------------------------
+# Define a conditional.
+AC_DEFUN([AM_CONDITIONAL],
+[AC_PREREQ(2.52)dnl
+ ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])],
+ [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
+AC_SUBST([$1_TRUE])dnl
+AC_SUBST([$1_FALSE])dnl
+_AM_SUBST_NOTMAKE([$1_TRUE])dnl
+_AM_SUBST_NOTMAKE([$1_FALSE])dnl
+m4_define([_AM_COND_VALUE_$1], [$2])dnl
+if $2; then
+ $1_TRUE=
+ $1_FALSE='#'
+else
+ $1_TRUE='#'
+ $1_FALSE=
+fi
+AC_CONFIG_COMMANDS_PRE(
+[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
+ AC_MSG_ERROR([[conditional "$1" was never defined.
+Usually this means the macro was only invoked conditionally.]])
+fi])])
+
+# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009,
+# 2010, 2011 Free Software Foundation, Inc.
+#
+# This file 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.
+
+# serial 12
+
+# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
+# written in clear, in which case automake, when reading aclocal.m4,
+# will think it sees a *use*, and therefore will trigger all it's
+# C support machinery. Also note that it means that autoscan, seeing
+# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
+
+
+# _AM_DEPENDENCIES(NAME)
+# ----------------------
+# See how the compiler implements dependency checking.
+# NAME is "CC", "CXX", "GCJ", or "OBJC".
+# We try a few techniques and use that to set a single cache variable.
+#
+# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
+# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
+# dependency, and given that the user is not expected to run this macro,
+# just rely on AC_PROG_CC.
+AC_DEFUN([_AM_DEPENDENCIES],
+[AC_REQUIRE([AM_SET_DEPDIR])dnl
+AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
+AC_REQUIRE([AM_MAKE_INCLUDE])dnl
+AC_REQUIRE([AM_DEP_TRACK])dnl
+
+ifelse([$1], CC, [depcc="$CC" am_compiler_list=],
+ [$1], CXX, [depcc="$CXX" am_compiler_list=],
+ [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
+ [$1], UPC, [depcc="$UPC" am_compiler_list=],
+ [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'],
+ [depcc="$$1" am_compiler_list=])
+
+AC_CACHE_CHECK([dependency style of $depcc],
+ [am_cv_$1_dependencies_compiler_type],
+[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
+ # We make a subdir and do the tests there. Otherwise we can end up
+ # making bogus files that we don't know about and never remove. For
+ # instance it was reported that on HP-UX the gcc test will end up
+ # making a dummy file named `D' -- because `-MD' means `put the output
+ # in D'.
+ rm -rf conftest.dir
+ mkdir conftest.dir
+ # Copy depcomp to subdir because otherwise we won't find it if we're
+ # using a relative directory.
+ cp "$am_depcomp" conftest.dir
+ cd conftest.dir
+ # We will build objects and dependencies in a subdirectory because
+ # it helps to detect inapplicable dependency modes. For instance
+ # both Tru64's cc and ICC support -MD to output dependencies as a
+ # side effect of compilation, but ICC will put the dependencies in
+ # the current directory while Tru64 will put them in the object
+ # directory.
+ mkdir sub
+
+ am_cv_$1_dependencies_compiler_type=none
+ if test "$am_compiler_list" = ""; then
+ am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
+ fi
+ am__universal=false
+ m4_case([$1], [CC],
+ [case " $depcc " in #(
+ *\ -arch\ *\ -arch\ *) am__universal=true ;;
+ esac],
+ [CXX],
+ [case " $depcc " in #(
+ *\ -arch\ *\ -arch\ *) am__universal=true ;;
+ esac])
+
+ for depmode in $am_compiler_list; do
+ # Setup a source with many dependencies, because some compilers
+ # like to wrap large dependency lists on column 80 (with \), and
+ # we should not choose a depcomp mode which is confused by this.
+ #
+ # We need to recreate these files for each test, as the compiler may
+ # overwrite some of them when testing with obscure command lines.
+ # This happens at least with the AIX C compiler.
+ : > sub/conftest.c
+ for i in 1 2 3 4 5 6; do
+ echo '#include "conftst'$i'.h"' >> sub/conftest.c
+ # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
+ # Solaris 8's {/usr,}/bin/sh.
+ touch sub/conftst$i.h
+ done
+ echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
+
+ # We check with `-c' and `-o' for the sake of the "dashmstdout"
+ # mode. It turns out that the SunPro C++ compiler does not properly
+ # handle `-M -o', and we need to detect this. Also, some Intel
+ # versions had trouble with output in subdirs
+ am__obj=sub/conftest.${OBJEXT-o}
+ am__minus_obj="-o $am__obj"
+ case $depmode in
+ gcc)
+ # This depmode causes a compiler race in universal mode.
+ test "$am__universal" = false || continue
+ ;;
+ nosideeffect)
+ # after this tag, mechanisms are not by side-effect, so they'll
+ # only be used when explicitly requested
+ if test "x$enable_dependency_tracking" = xyes; then
+ continue
+ else
+ break
+ fi
+ ;;
+ msvc7 | msvc7msys | msvisualcpp | msvcmsys)
+ # This compiler won't grok `-c -o', but also, the minuso test has
+ # not run yet. These depmodes are late enough in the game, and
+ # so weak that their functioning should not be impacted.
+ am__obj=conftest.${OBJEXT-o}
+ am__minus_obj=
+ ;;
+ none) break ;;
+ esac
+ if depmode=$depmode \
+ source=sub/conftest.c object=$am__obj \
+ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
+ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
+ >/dev/null 2>conftest.err &&
+ grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
+ grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
+ grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
+ ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
+ # icc doesn't choke on unknown options, it will just issue warnings
+ # or remarks (even with -Werror). So we grep stderr for any message
+ # that says an option was ignored or not supported.
+ # When given -MP, icc 7.0 and 7.1 complain thusly:
+ # icc: Command line warning: ignoring option '-M'; no argument required
+ # The diagnosis changed in icc 8.0:
+ # icc: Command line remark: option '-MP' not supported
+ if (grep 'ignoring option' conftest.err ||
+ grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
+ am_cv_$1_dependencies_compiler_type=$depmode
+ break
+ fi
+ fi
+ done
+
+ cd ..
+ rm -rf conftest.dir
+else
+ am_cv_$1_dependencies_compiler_type=none
+fi
+])
+AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
+AM_CONDITIONAL([am__fastdep$1], [
+ test "x$enable_dependency_tracking" != xno \
+ && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
+])
+
+
+# AM_SET_DEPDIR
+# -------------
+# Choose a directory name for dependency files.
+# This macro is AC_REQUIREd in _AM_DEPENDENCIES
+AC_DEFUN([AM_SET_DEPDIR],
+[AC_REQUIRE([AM_SET_LEADING_DOT])dnl
+AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
+])
+
+
+# AM_DEP_TRACK
+# ------------
+AC_DEFUN([AM_DEP_TRACK],
+[AC_ARG_ENABLE(dependency-tracking,
+[ --disable-dependency-tracking speeds up one-time build
+ --enable-dependency-tracking do not reject slow dependency extractors])
+if test "x$enable_dependency_tracking" != xno; then
+ am_depcomp="$ac_aux_dir/depcomp"
+ AMDEPBACKSLASH='\'
+ am__nodep='_no'
+fi
+AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
+AC_SUBST([AMDEPBACKSLASH])dnl
+_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
+AC_SUBST([am__nodep])dnl
+_AM_SUBST_NOTMAKE([am__nodep])dnl
+])
+
+# Generate code to set up dependency tracking. -*- Autoconf -*-
+
+# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008
+# Free Software Foundation, Inc.
+#
+# This file 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.
+
+#serial 5
+
+# _AM_OUTPUT_DEPENDENCY_COMMANDS
+# ------------------------------
+AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
+[{
+ # Autoconf 2.62 quotes --file arguments for eval, but not when files
+ # are listed without --file. Let's play safe and only enable the eval
+ # if we detect the quoting.
+ case $CONFIG_FILES in
+ *\'*) eval set x "$CONFIG_FILES" ;;
+ *) set x $CONFIG_FILES ;;
+ esac
+ shift
+ for mf
+ do
+ # Strip MF so we end up with the name of the file.
+ mf=`echo "$mf" | sed -e 's/:.*$//'`
+ # Check whether this is an Automake generated Makefile or not.
+ # We used to match only the files named `Makefile.in', but
+ # some people rename them; so instead we look at the file content.
+ # Grep'ing the first line is not enough: some people post-process
+ # each Makefile.in and add a new line on top of each file to say so.
+ # Grep'ing the whole file is not good either: AIX grep has a line
+ # limit of 2048, but all sed's we know have understand at least 4000.
+ if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
+ dirpart=`AS_DIRNAME("$mf")`
+ else
+ continue
+ fi
+ # Extract the definition of DEPDIR, am__include, and am__quote
+ # from the Makefile without running `make'.
+ DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
+ test -z "$DEPDIR" && continue
+ am__include=`sed -n 's/^am__include = //p' < "$mf"`
+ test -z "am__include" && continue
+ am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
+ # When using ansi2knr, U may be empty or an underscore; expand it
+ U=`sed -n 's/^U = //p' < "$mf"`
+ # Find all dependency output files, they are included files with
+ # $(DEPDIR) in their names. We invoke sed twice because it is the
+ # simplest approach to changing $(DEPDIR) to its actual value in the
+ # expansion.
+ for file in `sed -n "
+ s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
+ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
+ # Make sure the directory exists.
+ test -f "$dirpart/$file" && continue
+ fdir=`AS_DIRNAME(["$file"])`
+ AS_MKDIR_P([$dirpart/$fdir])
+ # echo "creating $dirpart/$file"
+ echo '# dummy' > "$dirpart/$file"
+ done
+ done
+}
+])# _AM_OUTPUT_DEPENDENCY_COMMANDS
+
+
+# AM_OUTPUT_DEPENDENCY_COMMANDS
+# -----------------------------
+# This macro should only be invoked once -- use via AC_REQUIRE.
+#
+# This code is only required when automatic dependency tracking
+# is enabled. FIXME. This creates each `.P' file that we will
+# need in order to bootstrap the dependency handling code.
+AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
+[AC_CONFIG_COMMANDS([depfiles],
+ [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
+ [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
+])
+
+# Do all the work for Automake. -*- Autoconf -*-
+
+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
+# 2005, 2006, 2008, 2009 Free Software Foundation, Inc.
+#
+# This file 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.
+
+# serial 16
+
+# This macro actually does too much. Some checks are only needed if
+# your package does certain things. But this isn't really a big deal.
+
+# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
+# AM_INIT_AUTOMAKE([OPTIONS])
+# -----------------------------------------------
+# The call with PACKAGE and VERSION arguments is the old style
+# call (pre autoconf-2.50), which is being phased out. PACKAGE
+# and VERSION should now be passed to AC_INIT and removed from
+# the call to AM_INIT_AUTOMAKE.
+# We support both call styles for the transition. After
+# the next Automake release, Autoconf can make the AC_INIT
+# arguments mandatory, and then we can depend on a new Autoconf
+# release and drop the old call support.
+AC_DEFUN([AM_INIT_AUTOMAKE],
+[AC_PREREQ([2.62])dnl
+dnl Autoconf wants to disallow AM_ names. We explicitly allow
+dnl the ones we care about.
+m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
+AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
+AC_REQUIRE([AC_PROG_INSTALL])dnl
+if test "`cd $srcdir && pwd`" != "`pwd`"; then
+ # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
+ # is not polluted with repeated "-I."
+ AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
+ # test to see if srcdir already configured
+ if test -f $srcdir/config.status; then
+ AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
+ fi
+fi
+
+# test whether we have cygpath
+if test -z "$CYGPATH_W"; then
+ if (cygpath --version) >/dev/null 2>/dev/null; then
+ CYGPATH_W='cygpath -w'
+ else
+ CYGPATH_W=echo
+ fi
+fi
+AC_SUBST([CYGPATH_W])
+
+# Define the identity of the package.
+dnl Distinguish between old-style and new-style calls.
+m4_ifval([$2],
+[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
+ AC_SUBST([PACKAGE], [$1])dnl
+ AC_SUBST([VERSION], [$2])],
+[_AM_SET_OPTIONS([$1])dnl
+dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
+m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,,
+ [m4_fatal([AC_INIT should be called with package and version arguments])])dnl
+ AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
+ AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
+
+_AM_IF_OPTION([no-define],,
+[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
+ AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
+
+# Some tools Automake needs.
+AC_REQUIRE([AM_SANITY_CHECK])dnl
+AC_REQUIRE([AC_ARG_PROGRAM])dnl
+AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
+AM_MISSING_PROG(AUTOCONF, autoconf)
+AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
+AM_MISSING_PROG(AUTOHEADER, autoheader)
+AM_MISSING_PROG(MAKEINFO, makeinfo)
+AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
+AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl
+AC_REQUIRE([AM_PROG_MKDIR_P])dnl
+# We need awk for the "check" target. The system "awk" is bad on
+# some platforms.
+AC_REQUIRE([AC_PROG_AWK])dnl
+AC_REQUIRE([AC_PROG_MAKE_SET])dnl
+AC_REQUIRE([AM_SET_LEADING_DOT])dnl
+_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
+ [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
+ [_AM_PROG_TAR([v7])])])
+_AM_IF_OPTION([no-dependencies],,
+[AC_PROVIDE_IFELSE([AC_PROG_CC],
+ [_AM_DEPENDENCIES(CC)],
+ [define([AC_PROG_CC],
+ defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
+AC_PROVIDE_IFELSE([AC_PROG_CXX],
+ [_AM_DEPENDENCIES(CXX)],
+ [define([AC_PROG_CXX],
+ defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
+AC_PROVIDE_IFELSE([AC_PROG_OBJC],
+ [_AM_DEPENDENCIES(OBJC)],
+ [define([AC_PROG_OBJC],
+ defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl
+])
+_AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl
+dnl The `parallel-tests' driver may need to know about EXEEXT, so add the
+dnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This macro
+dnl is hooked onto _AC_COMPILER_EXEEXT early, see below.
+AC_CONFIG_COMMANDS_PRE(dnl
+[m4_provide_if([_AM_COMPILER_EXEEXT],
+ [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
+])
+
+dnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion. Do not
+dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further
+dnl mangled by Autoconf and run in a shell conditional statement.
+m4_define([_AC_COMPILER_EXEEXT],
+m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])])
+
+
+# When config.status generates a header, we must update the stamp-h file.
+# This file resides in the same directory as the config header
+# that is generated. The stamp files are numbered to have different names.
+
+# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
+# loop where config.status creates the headers, so we can generate
+# our stamp files there.
+AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
+[# Compute $1's index in $config_headers.
+_am_arg=$1
+_am_stamp_count=1
+for _am_header in $config_headers :; do
+ case $_am_header in
+ $_am_arg | $_am_arg:* )
+ break ;;
+ * )
+ _am_stamp_count=`expr $_am_stamp_count + 1` ;;
+ esac
+done
+echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
+
+# Copyright (C) 2001, 2003, 2005, 2008, 2011 Free Software Foundation,
+# Inc.
+#
+# This file 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.
+
+# serial 1
+
+# AM_PROG_INSTALL_SH
+# ------------------
+# Define $install_sh.
+AC_DEFUN([AM_PROG_INSTALL_SH],
+[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
+if test x"${install_sh}" != xset; then
+ case $am_aux_dir in
+ *\ * | *\ *)
+ install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
+ *)
+ install_sh="\${SHELL} $am_aux_dir/install-sh"
+ esac
+fi
+AC_SUBST(install_sh)])
+
+# Copyright (C) 2003, 2005 Free Software Foundation, Inc.
+#
+# This file 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.
+
+# serial 2
+
+# Check whether the underlying file-system supports filenames
+# with a leading dot. For instance MS-DOS doesn't.
+AC_DEFUN([AM_SET_LEADING_DOT],
+[rm -rf .tst 2>/dev/null
+mkdir .tst 2>/dev/null
+if test -d .tst; then
+ am__leading_dot=.
+else
+ am__leading_dot=_
+fi
+rmdir .tst 2>/dev/null
+AC_SUBST([am__leading_dot])])
+
+# Add --enable-maintainer-mode option to configure. -*- Autoconf -*-
+# From Jim Meyering
+
+# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005, 2008,
+# 2011 Free Software Foundation, Inc.
+#
+# This file 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.
+
+# serial 5
+
+# AM_MAINTAINER_MODE([DEFAULT-MODE])
+# ----------------------------------
+# Control maintainer-specific portions of Makefiles.
+# Default is to disable them, unless `enable' is passed literally.
+# For symmetry, `disable' may be passed as well. Anyway, the user
+# can override the default with the --enable/--disable switch.
+AC_DEFUN([AM_MAINTAINER_MODE],
+[m4_case(m4_default([$1], [disable]),
+ [enable], [m4_define([am_maintainer_other], [disable])],
+ [disable], [m4_define([am_maintainer_other], [enable])],
+ [m4_define([am_maintainer_other], [enable])
+ m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])])
+AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
+ dnl maintainer-mode's default is 'disable' unless 'enable' is passed
+ AC_ARG_ENABLE([maintainer-mode],
+[ --][am_maintainer_other][-maintainer-mode am_maintainer_other make rules and dependencies not useful
+ (and sometimes confusing) to the casual installer],
+ [USE_MAINTAINER_MODE=$enableval],
+ [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes]))
+ AC_MSG_RESULT([$USE_MAINTAINER_MODE])
+ AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes])
+ MAINT=$MAINTAINER_MODE_TRUE
+ AC_SUBST([MAINT])dnl
+]
+)
+
+AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE])
+
+# Check to see how 'make' treats includes. -*- Autoconf -*-
+
+# Copyright (C) 2001, 2002, 2003, 2005, 2009 Free Software Foundation, Inc.
+#
+# This file 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.
+
+# serial 4
+
+# AM_MAKE_INCLUDE()
+# -----------------
+# Check to see how make treats includes.
+AC_DEFUN([AM_MAKE_INCLUDE],
+[am_make=${MAKE-make}
+cat > confinc << 'END'
+am__doit:
+ @echo this is the am__doit target
+.PHONY: am__doit
+END
+# If we don't find an include directive, just comment out the code.
+AC_MSG_CHECKING([for style of include used by $am_make])
+am__include="#"
+am__quote=
+_am_result=none
+# First try GNU make style include.
+echo "include confinc" > confmf
+# Ignore all kinds of additional output from `make'.
+case `$am_make -s -f confmf 2> /dev/null` in #(
+*the\ am__doit\ target*)
+ am__include=include
+ am__quote=
+ _am_result=GNU
+ ;;
+esac
+# Now try BSD make style include.
+if test "$am__include" = "#"; then
+ echo '.include "confinc"' > confmf
+ case `$am_make -s -f confmf 2> /dev/null` in #(
+ *the\ am__doit\ target*)
+ am__include=.include
+ am__quote="\""
+ _am_result=BSD
+ ;;
+ esac
+fi
+AC_SUBST([am__include])
+AC_SUBST([am__quote])
+AC_MSG_RESULT([$_am_result])
+rm -f confinc confmf
+])
+
+# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*-
+
+# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008
+# Free Software Foundation, Inc.
+#
+# This file 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.
+
+# serial 6
+
+# AM_MISSING_PROG(NAME, PROGRAM)
+# ------------------------------
+AC_DEFUN([AM_MISSING_PROG],
+[AC_REQUIRE([AM_MISSING_HAS_RUN])
+$1=${$1-"${am_missing_run}$2"}
+AC_SUBST($1)])
+
+
+# AM_MISSING_HAS_RUN
+# ------------------
+# Define MISSING if not defined so far and test if it supports --run.
+# If it does, set am_missing_run to use it, otherwise, to nothing.
+AC_DEFUN([AM_MISSING_HAS_RUN],
+[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
+AC_REQUIRE_AUX_FILE([missing])dnl
+if test x"${MISSING+set}" != xset; then
+ case $am_aux_dir in
+ *\ * | *\ *)
+ MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
+ *)
+ MISSING="\${SHELL} $am_aux_dir/missing" ;;
+ esac
+fi
+# Use eval to expand $SHELL
+if eval "$MISSING --run true"; then
+ am_missing_run="$MISSING --run "
+else
+ am_missing_run=
+ AC_MSG_WARN([`missing' script is too old or missing])
+fi
+])
+
+# Copyright (C) 2003, 2004, 2005, 2006, 2011 Free Software Foundation,
+# Inc.
+#
+# This file 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.
+
+# serial 1
+
+# AM_PROG_MKDIR_P
+# ---------------
+# Check for `mkdir -p'.
+AC_DEFUN([AM_PROG_MKDIR_P],
+[AC_PREREQ([2.60])dnl
+AC_REQUIRE([AC_PROG_MKDIR_P])dnl
+dnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P,
+dnl while keeping a definition of mkdir_p for backward compatibility.
+dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile.
+dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of
+dnl Makefile.ins that do not define MKDIR_P, so we do our own
+dnl adjustment using top_builddir (which is defined more often than
+dnl MKDIR_P).
+AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl
+case $mkdir_p in
+ [[\\/$]]* | ?:[[\\/]]*) ;;
+ */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
+esac
+])
+
+# Helper functions for option handling. -*- Autoconf -*-
+
+# Copyright (C) 2001, 2002, 2003, 2005, 2008, 2010 Free Software
+# Foundation, Inc.
+#
+# This file 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.
+
+# serial 5
+
+# _AM_MANGLE_OPTION(NAME)
+# -----------------------
+AC_DEFUN([_AM_MANGLE_OPTION],
+[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
+
+# _AM_SET_OPTION(NAME)
+# --------------------
+# Set option NAME. Presently that only means defining a flag for this option.
+AC_DEFUN([_AM_SET_OPTION],
+[m4_define(_AM_MANGLE_OPTION([$1]), 1)])
+
+# _AM_SET_OPTIONS(OPTIONS)
+# ------------------------
+# OPTIONS is a space-separated list of Automake options.
+AC_DEFUN([_AM_SET_OPTIONS],
+[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
+
+# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
+# -------------------------------------------
+# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
+AC_DEFUN([_AM_IF_OPTION],
+[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
+
+# Check to make sure that the build environment is sane. -*- Autoconf -*-
+
+# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008
+# Free Software Foundation, Inc.
+#
+# This file 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.
+
+# serial 5
+
+# AM_SANITY_CHECK
+# ---------------
+AC_DEFUN([AM_SANITY_CHECK],
+[AC_MSG_CHECKING([whether build environment is sane])
+# Just in case
+sleep 1
+echo timestamp > conftest.file
+# Reject unsafe characters in $srcdir or the absolute working directory
+# name. Accept space and tab only in the latter.
+am_lf='
+'
+case `pwd` in
+ *[[\\\"\#\$\&\'\`$am_lf]]*)
+ AC_MSG_ERROR([unsafe absolute working directory name]);;
+esac
+case $srcdir in
+ *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*)
+ AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);;
+esac
+
+# Do `set' in a subshell so we don't clobber the current shell's
+# arguments. Must try -L first in case configure is actually a
+# symlink; some systems play weird games with the mod time of symlinks
+# (eg FreeBSD returns the mod time of the symlink's containing
+# directory).
+if (
+ set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
+ if test "$[*]" = "X"; then
+ # -L didn't work.
+ set X `ls -t "$srcdir/configure" conftest.file`
+ fi
+ rm -f conftest.file
+ if test "$[*]" != "X $srcdir/configure conftest.file" \
+ && test "$[*]" != "X conftest.file $srcdir/configure"; then
+
+ # If neither matched, then we have a broken ls. This can happen
+ # if, for instance, CONFIG_SHELL is bash and it inherits a
+ # broken ls alias from the environment. This has actually
+ # happened. Such a system could not be considered "sane".
+ AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
+alias in your environment])
+ fi
+
+ test "$[2]" = conftest.file
+ )
+then
+ # Ok.
+ :
+else
+ AC_MSG_ERROR([newly created file is older than distributed files!
+Check your system clock])
+fi
+AC_MSG_RESULT(yes)])
+
+# Copyright (C) 2001, 2003, 2005, 2011 Free Software Foundation, Inc.
+#
+# This file 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.
+
+# serial 1
+
+# AM_PROG_INSTALL_STRIP
+# ---------------------
+# One issue with vendor `install' (even GNU) is that you can't
+# specify the program used to strip binaries. This is especially
+# annoying in cross-compiling environments, where the build's strip
+# is unlikely to handle the host's binaries.
+# Fortunately install-sh will honor a STRIPPROG variable, so we
+# always use install-sh in `make install-strip', and initialize
+# STRIPPROG with the value of the STRIP variable (set by the user).
+AC_DEFUN([AM_PROG_INSTALL_STRIP],
+[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
+# Installed binaries are usually stripped using `strip' when the user
+# run `make install-strip'. However `strip' might not be the right
+# tool to use in cross-compilation environments, therefore Automake
+# will honor the `STRIP' environment variable to overrule this program.
+dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
+if test "$cross_compiling" != no; then
+ AC_CHECK_TOOL([STRIP], [strip], :)
+fi
+INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
+AC_SUBST([INSTALL_STRIP_PROGRAM])])
+
+# Copyright (C) 2006, 2008, 2010 Free Software Foundation, Inc.
+#
+# This file 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.
+
+# serial 3
+
+# _AM_SUBST_NOTMAKE(VARIABLE)
+# ---------------------------
+# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
+# This macro is traced by Automake.
+AC_DEFUN([_AM_SUBST_NOTMAKE])
+
+# AM_SUBST_NOTMAKE(VARIABLE)
+# --------------------------
+# Public sister of _AM_SUBST_NOTMAKE.
+AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
+
+# Check how to create a tarball. -*- Autoconf -*-
+
+# Copyright (C) 2004, 2005, 2012 Free Software Foundation, Inc.
+#
+# This file 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.
+
+# serial 2
+
+# _AM_PROG_TAR(FORMAT)
+# --------------------
+# Check how to create a tarball in format FORMAT.
+# FORMAT should be one of `v7', `ustar', or `pax'.
+#
+# Substitute a variable $(am__tar) that is a command
+# writing to stdout a FORMAT-tarball containing the directory
+# $tardir.
+# tardir=directory && $(am__tar) > result.tar
+#
+# Substitute a variable $(am__untar) that extract such
+# a tarball read from stdin.
+# $(am__untar) < result.tar
+AC_DEFUN([_AM_PROG_TAR],
+[# Always define AMTAR for backward compatibility. Yes, it's still used
+# in the wild :-( We should find a proper way to deprecate it ...
+AC_SUBST([AMTAR], ['$${TAR-tar}'])
+m4_if([$1], [v7],
+ [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'],
+ [m4_case([$1], [ustar],, [pax],,
+ [m4_fatal([Unknown tar format])])
+AC_MSG_CHECKING([how to create a $1 tar archive])
+# Loop over all known methods to create a tar archive until one works.
+_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
+_am_tools=${am_cv_prog_tar_$1-$_am_tools}
+# Do not fold the above two line into one, because Tru64 sh and
+# Solaris sh will not grok spaces in the rhs of `-'.
+for _am_tool in $_am_tools
+do
+ case $_am_tool in
+ gnutar)
+ for _am_tar in tar gnutar gtar;
+ do
+ AM_RUN_LOG([$_am_tar --version]) && break
+ done
+ am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
+ am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
+ am__untar="$_am_tar -xf -"
+ ;;
+ plaintar)
+ # Must skip GNU tar: if it does not support --format= it doesn't create
+ # ustar tarball either.
+ (tar --version) >/dev/null 2>&1 && continue
+ am__tar='tar chf - "$$tardir"'
+ am__tar_='tar chf - "$tardir"'
+ am__untar='tar xf -'
+ ;;
+ pax)
+ am__tar='pax -L -x $1 -w "$$tardir"'
+ am__tar_='pax -L -x $1 -w "$tardir"'
+ am__untar='pax -r'
+ ;;
+ cpio)
+ am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
+ am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
+ am__untar='cpio -i -H $1 -d'
+ ;;
+ none)
+ am__tar=false
+ am__tar_=false
+ am__untar=false
+ ;;
+ esac
+
+ # If the value was cached, stop now. We just wanted to have am__tar
+ # and am__untar set.
+ test -n "${am_cv_prog_tar_$1}" && break
+
+ # tar/untar a dummy directory, and stop if the command works
+ rm -rf conftest.dir
+ mkdir conftest.dir
+ echo GrepMe > conftest.dir/file
+ AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
+ rm -rf conftest.dir
+ if test -s conftest.tar; then
+ AM_RUN_LOG([$am__untar <conftest.tar])
+ grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
+ fi
+done
+rm -rf conftest.dir
+
+AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
+AC_MSG_RESULT([$am_cv_prog_tar_$1])])
+AC_SUBST([am__tar])
+AC_SUBST([am__untar])
+]) # _AM_PROG_TAR
+
+m4_include([../../../acinclude.m4])
diff --git a/newlib/libc/machine/visium/configure b/newlib/libc/machine/visium/configure
new file mode 100755
index 000000000..bc041896f
--- /dev/null
+++ b/newlib/libc/machine/visium/configure
@@ -0,0 +1,4748 @@
+#! /bin/sh
+# Guess values for system-dependent variables and create Makefiles.
+# Generated by GNU Autoconf 2.68 for newlib 2.4.0.
+#
+#
+# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
+# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software
+# Foundation, Inc.
+#
+#
+# This configure script is free software; the Free Software Foundation
+# gives unlimited permission to copy, distribute and modify it.
+## -------------------- ##
+## M4sh Initialization. ##
+## -------------------- ##
+
+# Be more Bourne compatible
+DUALCASE=1; export DUALCASE # for MKS sh
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
+ emulate sh
+ NULLCMD=:
+ # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
+ # is contrary to our usage. Disable this feature.
+ alias -g '${1+"$@"}'='"$@"'
+ setopt NO_GLOB_SUBST
+else
+ case `(set -o) 2>/dev/null` in #(
+ *posix*) :
+ set -o posix ;; #(
+ *) :
+ ;;
+esac
+fi
+
+
+as_nl='
+'
+export as_nl
+# Printing a long string crashes Solaris 7 /usr/bin/printf.
+as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
+as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
+as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
+# Prefer a ksh shell builtin over an external printf program on Solaris,
+# but without wasting forks for bash or zsh.
+if test -z "$BASH_VERSION$ZSH_VERSION" \
+ && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
+ as_echo='print -r --'
+ as_echo_n='print -rn --'
+elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
+ as_echo='printf %s\n'
+ as_echo_n='printf %s'
+else
+ if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
+ as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
+ as_echo_n='/usr/ucb/echo -n'
+ else
+ as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
+ as_echo_n_body='eval
+ arg=$1;
+ case $arg in #(
+ *"$as_nl"*)
+ expr "X$arg" : "X\\(.*\\)$as_nl";
+ arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
+ esac;
+ expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
+ '
+ export as_echo_n_body
+ as_echo_n='sh -c $as_echo_n_body as_echo'
+ fi
+ export as_echo_body
+ as_echo='sh -c $as_echo_body as_echo'
+fi
+
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+ PATH_SEPARATOR=:
+ (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
+ (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
+ PATH_SEPARATOR=';'
+ }
+fi
+
+
+# IFS
+# We need space, tab and new line, in precisely that order. Quoting is
+# there to prevent editors from complaining about space-tab.
+# (If _AS_PATH_WALK were called with IFS unset, it would disable word
+# splitting by setting IFS to empty value.)
+IFS=" "" $as_nl"
+
+# Find who we are. Look in the path if we contain no directory separator.
+as_myself=
+case $0 in #((
+ *[\\/]* ) as_myself=$0 ;;
+ *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
+ done
+IFS=$as_save_IFS
+
+ ;;
+esac
+# We did not find ourselves, most probably we were run as `sh COMMAND'
+# in which case we are not to be found in the path.
+if test "x$as_myself" = x; then
+ as_myself=$0
+fi
+if test ! -f "$as_myself"; then
+ $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
+ exit 1
+fi
+
+# Unset variables that we do not need and which cause bugs (e.g. in
+# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
+# suppresses any "Segmentation fault" message there. '((' could
+# trigger a bug in pdksh 5.2.14.
+for as_var in BASH_ENV ENV MAIL MAILPATH
+do eval test x\${$as_var+set} = xset \
+ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
+done
+PS1='$ '
+PS2='> '
+PS4='+ '
+
+# NLS nuisances.
+LC_ALL=C
+export LC_ALL
+LANGUAGE=C
+export LANGUAGE
+
+# CDPATH.
+(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
+
+if test "x$CONFIG_SHELL" = x; then
+ as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
+ emulate sh
+ NULLCMD=:
+ # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
+ # is contrary to our usage. Disable this feature.
+ alias -g '\${1+\"\$@\"}'='\"\$@\"'
+ setopt NO_GLOB_SUBST
+else
+ case \`(set -o) 2>/dev/null\` in #(
+ *posix*) :
+ set -o posix ;; #(
+ *) :
+ ;;
+esac
+fi
+"
+ as_required="as_fn_return () { (exit \$1); }
+as_fn_success () { as_fn_return 0; }
+as_fn_failure () { as_fn_return 1; }
+as_fn_ret_success () { return 0; }
+as_fn_ret_failure () { return 1; }
+
+exitcode=0
+as_fn_success || { exitcode=1; echo as_fn_success failed.; }
+as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
+as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
+as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
+if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
+
+else
+ exitcode=1; echo positional parameters were not saved.
+fi
+test x\$exitcode = x0 || exit 1"
+ as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
+ as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
+ eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
+ test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1"
+ if (eval "$as_required") 2>/dev/null; then :
+ as_have_required=yes
+else
+ as_have_required=no
+fi
+ if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
+
+else
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+as_found=false
+for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ as_found=:
+ case $as_dir in #(
+ /*)
+ for as_base in sh bash ksh sh5; do
+ # Try only shells that exist, to save several forks.
+ as_shell=$as_dir/$as_base
+ if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
+ { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
+ CONFIG_SHELL=$as_shell as_have_required=yes
+ if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
+ break 2
+fi
+fi
+ done;;
+ esac
+ as_found=false
+done
+$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
+ { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
+ CONFIG_SHELL=$SHELL as_have_required=yes
+fi; }
+IFS=$as_save_IFS
+
+
+ if test "x$CONFIG_SHELL" != x; then :
+ # We cannot yet assume a decent shell, so we have to provide a
+ # neutralization value for shells without unset; and this also
+ # works around shells that cannot unset nonexistent variables.
+ # Preserve -v and -x to the replacement shell.
+ BASH_ENV=/dev/null
+ ENV=/dev/null
+ (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
+ export CONFIG_SHELL
+ case $- in # ((((
+ *v*x* | *x*v* ) as_opts=-vx ;;
+ *v* ) as_opts=-v ;;
+ *x* ) as_opts=-x ;;
+ * ) as_opts= ;;
+ esac
+ exec "$CONFIG_SHELL" $as_opts "$as_myself" ${1+"$@"}
+fi
+
+ if test x$as_have_required = xno; then :
+ $as_echo "$0: This script requires a shell more modern than all"
+ $as_echo "$0: the shells that I found on your system."
+ if test x${ZSH_VERSION+set} = xset ; then
+ $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
+ $as_echo "$0: be upgraded to zsh 4.3.4 or later."
+ else
+ $as_echo "$0: Please tell bug-autoconf@gnu.org about your system,
+$0: including any error possibly output before this
+$0: message. Then install a modern shell, or manually run
+$0: the script under such a shell if you do have one."
+ fi
+ exit 1
+fi
+fi
+fi
+SHELL=${CONFIG_SHELL-/bin/sh}
+export SHELL
+# Unset more variables known to interfere with behavior of common tools.
+CLICOLOR_FORCE= GREP_OPTIONS=
+unset CLICOLOR_FORCE GREP_OPTIONS
+
+## --------------------- ##
+## M4sh Shell Functions. ##
+## --------------------- ##
+# as_fn_unset VAR
+# ---------------
+# Portably unset VAR.
+as_fn_unset ()
+{
+ { eval $1=; unset $1;}
+}
+as_unset=as_fn_unset
+
+# as_fn_set_status STATUS
+# -----------------------
+# Set $? to STATUS, without forking.
+as_fn_set_status ()
+{
+ return $1
+} # as_fn_set_status
+
+# as_fn_exit STATUS
+# -----------------
+# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
+as_fn_exit ()
+{
+ set +e
+ as_fn_set_status $1
+ exit $1
+} # as_fn_exit
+
+# as_fn_mkdir_p
+# -------------
+# Create "$as_dir" as a directory, including parents if necessary.
+as_fn_mkdir_p ()
+{
+
+ case $as_dir in #(
+ -*) as_dir=./$as_dir;;
+ esac
+ test -d "$as_dir" || eval $as_mkdir_p || {
+ as_dirs=
+ while :; do
+ case $as_dir in #(
+ *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
+ *) as_qdir=$as_dir;;
+ esac
+ as_dirs="'$as_qdir' $as_dirs"
+ as_dir=`$as_dirname -- "$as_dir" ||
+$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$as_dir" : 'X\(//\)[^/]' \| \
+ X"$as_dir" : 'X\(//\)$' \| \
+ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$as_dir" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)[^/].*/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+ test -d "$as_dir" && break
+ done
+ test -z "$as_dirs" || eval "mkdir $as_dirs"
+ } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
+
+
+} # as_fn_mkdir_p
+# as_fn_append VAR VALUE
+# ----------------------
+# Append the text in VALUE to the end of the definition contained in VAR. Take
+# advantage of any shell optimizations that allow amortized linear growth over
+# repeated appends, instead of the typical quadratic growth present in naive
+# implementations.
+if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
+ eval 'as_fn_append ()
+ {
+ eval $1+=\$2
+ }'
+else
+ as_fn_append ()
+ {
+ eval $1=\$$1\$2
+ }
+fi # as_fn_append
+
+# as_fn_arith ARG...
+# ------------------
+# Perform arithmetic evaluation on the ARGs, and store the result in the
+# global $as_val. Take advantage of shells that can avoid forks. The arguments
+# must be portable across $(()) and expr.
+if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
+ eval 'as_fn_arith ()
+ {
+ as_val=$(( $* ))
+ }'
+else
+ as_fn_arith ()
+ {
+ as_val=`expr "$@" || test $? -eq 1`
+ }
+fi # as_fn_arith
+
+
+# as_fn_error STATUS ERROR [LINENO LOG_FD]
+# ----------------------------------------
+# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
+# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
+# script with STATUS, using 1 if that was 0.
+as_fn_error ()
+{
+ as_status=$1; test $as_status -eq 0 && as_status=1
+ if test "$4"; then
+ as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
+ fi
+ $as_echo "$as_me: error: $2" >&2
+ as_fn_exit $as_status
+} # as_fn_error
+
+if expr a : '\(a\)' >/dev/null 2>&1 &&
+ test "X`expr 00001 : '.*\(...\)'`" = X001; then
+ as_expr=expr
+else
+ as_expr=false
+fi
+
+if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
+ as_basename=basename
+else
+ as_basename=false
+fi
+
+if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
+ as_dirname=dirname
+else
+ as_dirname=false
+fi
+
+as_me=`$as_basename -- "$0" ||
+$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
+ X"$0" : 'X\(//\)$' \| \
+ X"$0" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X/"$0" |
+ sed '/^.*\/\([^/][^/]*\)\/*$/{
+ s//\1/
+ q
+ }
+ /^X\/\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\/\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+
+# Avoid depending upon Character Ranges.
+as_cr_letters='abcdefghijklmnopqrstuvwxyz'
+as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
+as_cr_Letters=$as_cr_letters$as_cr_LETTERS
+as_cr_digits='0123456789'
+as_cr_alnum=$as_cr_Letters$as_cr_digits
+
+
+ as_lineno_1=$LINENO as_lineno_1a=$LINENO
+ as_lineno_2=$LINENO as_lineno_2a=$LINENO
+ eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
+ test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
+ # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-)
+ sed -n '
+ p
+ /[$]LINENO/=
+ ' <$as_myself |
+ sed '
+ s/[$]LINENO.*/&-/
+ t lineno
+ b
+ :lineno
+ N
+ :loop
+ s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
+ t loop
+ s/-\n.*//
+ ' >$as_me.lineno &&
+ chmod +x "$as_me.lineno" ||
+ { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
+
+ # Don't try to exec as it changes $[0], causing all sort of problems
+ # (the dirname of $[0] is not the place where we might find the
+ # original and so on. Autoconf is especially sensitive to this).
+ . "./$as_me.lineno"
+ # Exit status is that of the last command.
+ exit
+}
+
+ECHO_C= ECHO_N= ECHO_T=
+case `echo -n x` in #(((((
+-n*)
+ case `echo 'xy\c'` in
+ *c*) ECHO_T=' ';; # ECHO_T is single tab character.
+ xy) ECHO_C='\c';;
+ *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
+ ECHO_T=' ';;
+ esac;;
+*)
+ ECHO_N='-n';;
+esac
+
+rm -f conf$$ conf$$.exe conf$$.file
+if test -d conf$$.dir; then
+ rm -f conf$$.dir/conf$$.file
+else
+ rm -f conf$$.dir
+ mkdir conf$$.dir 2>/dev/null
+fi
+if (echo >conf$$.file) 2>/dev/null; then
+ if ln -s conf$$.file conf$$ 2>/dev/null; then
+ as_ln_s='ln -s'
+ # ... but there are two gotchas:
+ # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
+ # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
+ # In both cases, we have to default to `cp -p'.
+ ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
+ as_ln_s='cp -p'
+ elif ln conf$$.file conf$$ 2>/dev/null; then
+ as_ln_s=ln
+ else
+ as_ln_s='cp -p'
+ fi
+else
+ as_ln_s='cp -p'
+fi
+rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
+rmdir conf$$.dir 2>/dev/null
+
+if mkdir -p . 2>/dev/null; then
+ as_mkdir_p='mkdir -p "$as_dir"'
+else
+ test -d ./-p && rmdir ./-p
+ as_mkdir_p=false
+fi
+
+if test -x / >/dev/null 2>&1; then
+ as_test_x='test -x'
+else
+ if ls -dL / >/dev/null 2>&1; then
+ as_ls_L_option=L
+ else
+ as_ls_L_option=
+ fi
+ as_test_x='
+ eval sh -c '\''
+ if test -d "$1"; then
+ test -d "$1/.";
+ else
+ case $1 in #(
+ -*)set "./$1";;
+ esac;
+ case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
+ ???[sx]*):;;*)false;;esac;fi
+ '\'' sh
+ '
+fi
+as_executable_p=$as_test_x
+
+# Sed expression to map a string onto a valid CPP name.
+as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
+
+# Sed expression to map a string onto a valid variable name.
+as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
+
+
+test -n "$DJDIR" || exec 7<&0 </dev/null
+exec 6>&1
+
+# Name of the host.
+# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
+# so uname gets run too.
+ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
+
+#
+# Initializations.
+#
+ac_default_prefix=/usr/local
+ac_clean_files=
+ac_config_libobj_dir=.
+LIBOBJS=
+cross_compiling=no
+subdirs=
+MFLAGS=
+MAKEFLAGS=
+
+# Identity of this package.
+PACKAGE_NAME='newlib'
+PACKAGE_TARNAME='newlib'
+PACKAGE_VERSION='2.4.0'
+PACKAGE_STRING='newlib 2.4.0'
+PACKAGE_BUGREPORT=''
+PACKAGE_URL=''
+
+ac_unique_file="Makefile.am"
+ac_subst_vars='LTLIBOBJS
+LIBOBJS
+sys_dir
+machine_dir
+libm_machine_dir
+lpfx
+aext
+oext
+OBJEXT
+USE_LIBTOOL_FALSE
+USE_LIBTOOL_TRUE
+ELIX_LEVEL_4_FALSE
+ELIX_LEVEL_4_TRUE
+ELIX_LEVEL_3_FALSE
+ELIX_LEVEL_3_TRUE
+ELIX_LEVEL_2_FALSE
+ELIX_LEVEL_2_TRUE
+ELIX_LEVEL_1_FALSE
+ELIX_LEVEL_1_TRUE
+ELIX_LEVEL_0_FALSE
+ELIX_LEVEL_0_TRUE
+LDFLAGS
+NO_INCLUDE_LIST
+NEWLIB_CFLAGS
+CCASFLAGS
+CCAS
+MAINT
+MAINTAINER_MODE_FALSE
+MAINTAINER_MODE_TRUE
+READELF
+RANLIB
+AR
+AS
+am__fastdepCC_FALSE
+am__fastdepCC_TRUE
+CCDEPMODE
+am__nodep
+AMDEPBACKSLASH
+AMDEP_FALSE
+AMDEP_TRUE
+am__quote
+am__include
+DEPDIR
+CC
+am__untar
+am__tar
+AMTAR
+am__leading_dot
+SET_MAKE
+AWK
+mkdir_p
+MKDIR_P
+INSTALL_STRIP_PROGRAM
+STRIP
+install_sh
+MAKEINFO
+AUTOHEADER
+AUTOMAKE
+AUTOCONF
+ACLOCAL
+VERSION
+PACKAGE
+CYGPATH_W
+am__isrc
+INSTALL_DATA
+INSTALL_SCRIPT
+INSTALL_PROGRAM
+host_os
+host_vendor
+host_cpu
+host
+build_os
+build_vendor
+build_cpu
+build
+newlib_basedir
+MAY_SUPPLY_SYSCALLS_FALSE
+MAY_SUPPLY_SYSCALLS_TRUE
+target_alias
+host_alias
+build_alias
+LIBS
+ECHO_T
+ECHO_N
+ECHO_C
+DEFS
+mandir
+localedir
+libdir
+psdir
+pdfdir
+dvidir
+htmldir
+infodir
+docdir
+oldincludedir
+includedir
+localstatedir
+sharedstatedir
+sysconfdir
+datadir
+datarootdir
+libexecdir
+sbindir
+bindir
+program_transform_name
+prefix
+exec_prefix
+PACKAGE_URL
+PACKAGE_BUGREPORT
+PACKAGE_STRING
+PACKAGE_VERSION
+PACKAGE_TARNAME
+PACKAGE_NAME
+PATH_SEPARATOR
+SHELL'
+ac_subst_files=''
+ac_user_opts='
+enable_option_checking
+enable_multilib
+enable_target_optspace
+enable_malloc_debugging
+enable_newlib_multithread
+enable_newlib_iconv
+enable_newlib_elix_level
+enable_newlib_io_float
+enable_newlib_supplied_syscalls
+enable_dependency_tracking
+enable_maintainer_mode
+'
+ ac_precious_vars='build_alias
+host_alias
+target_alias
+CCAS
+CCASFLAGS'
+
+
+# Initialize some variables set by options.
+ac_init_help=
+ac_init_version=false
+ac_unrecognized_opts=
+ac_unrecognized_sep=
+# The variables have the same names as the options, with
+# dashes changed to underlines.
+cache_file=/dev/null
+exec_prefix=NONE
+no_create=
+no_recursion=
+prefix=NONE
+program_prefix=NONE
+program_suffix=NONE
+program_transform_name=s,x,x,
+silent=
+site=
+srcdir=
+verbose=
+x_includes=NONE
+x_libraries=NONE
+
+# Installation directory options.
+# These are left unexpanded so users can "make install exec_prefix=/foo"
+# and all the variables that are supposed to be based on exec_prefix
+# by default will actually change.
+# Use braces instead of parens because sh, perl, etc. also accept them.
+# (The list follows the same order as the GNU Coding Standards.)
+bindir='${exec_prefix}/bin'
+sbindir='${exec_prefix}/sbin'
+libexecdir='${exec_prefix}/libexec'
+datarootdir='${prefix}/share'
+datadir='${datarootdir}'
+sysconfdir='${prefix}/etc'
+sharedstatedir='${prefix}/com'
+localstatedir='${prefix}/var'
+includedir='${prefix}/include'
+oldincludedir='/usr/include'
+docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
+infodir='${datarootdir}/info'
+htmldir='${docdir}'
+dvidir='${docdir}'
+pdfdir='${docdir}'
+psdir='${docdir}'
+libdir='${exec_prefix}/lib'
+localedir='${datarootdir}/locale'
+mandir='${datarootdir}/man'
+
+ac_prev=
+ac_dashdash=
+for ac_option
+do
+ # If the previous option needs an argument, assign it.
+ if test -n "$ac_prev"; then
+ eval $ac_prev=\$ac_option
+ ac_prev=
+ continue
+ fi
+
+ case $ac_option in
+ *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
+ *=) ac_optarg= ;;
+ *) ac_optarg=yes ;;
+ esac
+
+ # Accept the important Cygnus configure options, so we can diagnose typos.
+
+ case $ac_dashdash$ac_option in
+ --)
+ ac_dashdash=yes ;;
+
+ -bindir | --bindir | --bindi | --bind | --bin | --bi)
+ ac_prev=bindir ;;
+ -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
+ bindir=$ac_optarg ;;
+
+ -build | --build | --buil | --bui | --bu)
+ ac_prev=build_alias ;;
+ -build=* | --build=* | --buil=* | --bui=* | --bu=*)
+ build_alias=$ac_optarg ;;
+
+ -cache-file | --cache-file | --cache-fil | --cache-fi \
+ | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
+ ac_prev=cache_file ;;
+ -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
+ | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
+ cache_file=$ac_optarg ;;
+
+ --config-cache | -C)
+ cache_file=config.cache ;;
+
+ -datadir | --datadir | --datadi | --datad)
+ ac_prev=datadir ;;
+ -datadir=* | --datadir=* | --datadi=* | --datad=*)
+ datadir=$ac_optarg ;;
+
+ -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
+ | --dataroo | --dataro | --datar)
+ ac_prev=datarootdir ;;
+ -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
+ | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
+ datarootdir=$ac_optarg ;;
+
+ -disable-* | --disable-*)
+ ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
+ # Reject names that are not valid shell variable names.
+ expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
+ as_fn_error $? "invalid feature name: $ac_useropt"
+ ac_useropt_orig=$ac_useropt
+ ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
+ case $ac_user_opts in
+ *"
+"enable_$ac_useropt"
+"*) ;;
+ *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
+ ac_unrecognized_sep=', ';;
+ esac
+ eval enable_$ac_useropt=no ;;
+
+ -docdir | --docdir | --docdi | --doc | --do)
+ ac_prev=docdir ;;
+ -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
+ docdir=$ac_optarg ;;
+
+ -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
+ ac_prev=dvidir ;;
+ -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
+ dvidir=$ac_optarg ;;
+
+ -enable-* | --enable-*)
+ ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
+ # Reject names that are not valid shell variable names.
+ expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
+ as_fn_error $? "invalid feature name: $ac_useropt"
+ ac_useropt_orig=$ac_useropt
+ ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
+ case $ac_user_opts in
+ *"
+"enable_$ac_useropt"
+"*) ;;
+ *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
+ ac_unrecognized_sep=', ';;
+ esac
+ eval enable_$ac_useropt=\$ac_optarg ;;
+
+ -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
+ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
+ | --exec | --exe | --ex)
+ ac_prev=exec_prefix ;;
+ -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
+ | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
+ | --exec=* | --exe=* | --ex=*)
+ exec_prefix=$ac_optarg ;;
+
+ -gas | --gas | --ga | --g)
+ # Obsolete; use --with-gas.
+ with_gas=yes ;;
+
+ -help | --help | --hel | --he | -h)
+ ac_init_help=long ;;
+ -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
+ ac_init_help=recursive ;;
+ -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
+ ac_init_help=short ;;
+
+ -host | --host | --hos | --ho)
+ ac_prev=host_alias ;;
+ -host=* | --host=* | --hos=* | --ho=*)
+ host_alias=$ac_optarg ;;
+
+ -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
+ ac_prev=htmldir ;;
+ -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
+ | --ht=*)
+ htmldir=$ac_optarg ;;
+
+ -includedir | --includedir | --includedi | --included | --include \
+ | --includ | --inclu | --incl | --inc)
+ ac_prev=includedir ;;
+ -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
+ | --includ=* | --inclu=* | --incl=* | --inc=*)
+ includedir=$ac_optarg ;;
+
+ -infodir | --infodir | --infodi | --infod | --info | --inf)
+ ac_prev=infodir ;;
+ -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
+ infodir=$ac_optarg ;;
+
+ -libdir | --libdir | --libdi | --libd)
+ ac_prev=libdir ;;
+ -libdir=* | --libdir=* | --libdi=* | --libd=*)
+ libdir=$ac_optarg ;;
+
+ -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
+ | --libexe | --libex | --libe)
+ ac_prev=libexecdir ;;
+ -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
+ | --libexe=* | --libex=* | --libe=*)
+ libexecdir=$ac_optarg ;;
+
+ -localedir | --localedir | --localedi | --localed | --locale)
+ ac_prev=localedir ;;
+ -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
+ localedir=$ac_optarg ;;
+
+ -localstatedir | --localstatedir | --localstatedi | --localstated \
+ | --localstate | --localstat | --localsta | --localst | --locals)
+ ac_prev=localstatedir ;;
+ -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
+ | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
+ localstatedir=$ac_optarg ;;
+
+ -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
+ ac_prev=mandir ;;
+ -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
+ mandir=$ac_optarg ;;
+
+ -nfp | --nfp | --nf)
+ # Obsolete; use --without-fp.
+ with_fp=no ;;
+
+ -no-create | --no-create | --no-creat | --no-crea | --no-cre \
+ | --no-cr | --no-c | -n)
+ no_create=yes ;;
+
+ -no-recursion | --no-recursion | --no-recursio | --no-recursi \
+ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
+ no_recursion=yes ;;
+
+ -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
+ | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
+ | --oldin | --oldi | --old | --ol | --o)
+ ac_prev=oldincludedir ;;
+ -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
+ | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
+ | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
+ oldincludedir=$ac_optarg ;;
+
+ -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
+ ac_prev=prefix ;;
+ -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
+ prefix=$ac_optarg ;;
+
+ -program-prefix | --program-prefix | --program-prefi | --program-pref \
+ | --program-pre | --program-pr | --program-p)
+ ac_prev=program_prefix ;;
+ -program-prefix=* | --program-prefix=* | --program-prefi=* \
+ | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
+ program_prefix=$ac_optarg ;;
+
+ -program-suffix | --program-suffix | --program-suffi | --program-suff \
+ | --program-suf | --program-su | --program-s)
+ ac_prev=program_suffix ;;
+ -program-suffix=* | --program-suffix=* | --program-suffi=* \
+ | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
+ program_suffix=$ac_optarg ;;
+
+ -program-transform-name | --program-transform-name \
+ | --program-transform-nam | --program-transform-na \
+ | --program-transform-n | --program-transform- \
+ | --program-transform | --program-transfor \
+ | --program-transfo | --program-transf \
+ | --program-trans | --program-tran \
+ | --progr-tra | --program-tr | --program-t)
+ ac_prev=program_transform_name ;;
+ -program-transform-name=* | --program-transform-name=* \
+ | --program-transform-nam=* | --program-transform-na=* \
+ | --program-transform-n=* | --program-transform-=* \
+ | --program-transform=* | --program-transfor=* \
+ | --program-transfo=* | --program-transf=* \
+ | --program-trans=* | --program-tran=* \
+ | --progr-tra=* | --program-tr=* | --program-t=*)
+ program_transform_name=$ac_optarg ;;
+
+ -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
+ ac_prev=pdfdir ;;
+ -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
+ pdfdir=$ac_optarg ;;
+
+ -psdir | --psdir | --psdi | --psd | --ps)
+ ac_prev=psdir ;;
+ -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
+ psdir=$ac_optarg ;;
+
+ -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+ | -silent | --silent | --silen | --sile | --sil)
+ silent=yes ;;
+
+ -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
+ ac_prev=sbindir ;;
+ -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
+ | --sbi=* | --sb=*)
+ sbindir=$ac_optarg ;;
+
+ -sharedstatedir | --sharedstatedir | --sharedstatedi \
+ | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
+ | --sharedst | --shareds | --shared | --share | --shar \
+ | --sha | --sh)
+ ac_prev=sharedstatedir ;;
+ -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
+ | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
+ | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
+ | --sha=* | --sh=*)
+ sharedstatedir=$ac_optarg ;;
+
+ -site | --site | --sit)
+ ac_prev=site ;;
+ -site=* | --site=* | --sit=*)
+ site=$ac_optarg ;;
+
+ -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
+ ac_prev=srcdir ;;
+ -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
+ srcdir=$ac_optarg ;;
+
+ -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
+ | --syscon | --sysco | --sysc | --sys | --sy)
+ ac_prev=sysconfdir ;;
+ -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
+ | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
+ sysconfdir=$ac_optarg ;;
+
+ -target | --target | --targe | --targ | --tar | --ta | --t)
+ ac_prev=target_alias ;;
+ -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
+ target_alias=$ac_optarg ;;
+
+ -v | -verbose | --verbose | --verbos | --verbo | --verb)
+ verbose=yes ;;
+
+ -version | --version | --versio | --versi | --vers | -V)
+ ac_init_version=: ;;
+
+ -with-* | --with-*)
+ ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
+ # Reject names that are not valid shell variable names.
+ expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
+ as_fn_error $? "invalid package name: $ac_useropt"
+ ac_useropt_orig=$ac_useropt
+ ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
+ case $ac_user_opts in
+ *"
+"with_$ac_useropt"
+"*) ;;
+ *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
+ ac_unrecognized_sep=', ';;
+ esac
+ eval with_$ac_useropt=\$ac_optarg ;;
+
+ -without-* | --without-*)
+ ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
+ # Reject names that are not valid shell variable names.
+ expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
+ as_fn_error $? "invalid package name: $ac_useropt"
+ ac_useropt_orig=$ac_useropt
+ ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
+ case $ac_user_opts in
+ *"
+"with_$ac_useropt"
+"*) ;;
+ *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
+ ac_unrecognized_sep=', ';;
+ esac
+ eval with_$ac_useropt=no ;;
+
+ --x)
+ # Obsolete; use --with-x.
+ with_x=yes ;;
+
+ -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
+ | --x-incl | --x-inc | --x-in | --x-i)
+ ac_prev=x_includes ;;
+ -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
+ | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
+ x_includes=$ac_optarg ;;
+
+ -x-libraries | --x-libraries | --x-librarie | --x-librari \
+ | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
+ ac_prev=x_libraries ;;
+ -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
+ | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
+ x_libraries=$ac_optarg ;;
+
+ -*) as_fn_error $? "unrecognized option: \`$ac_option'
+Try \`$0 --help' for more information"
+ ;;
+
+ *=*)
+ ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
+ # Reject names that are not valid shell variable names.
+ case $ac_envvar in #(
+ '' | [0-9]* | *[!_$as_cr_alnum]* )
+ as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
+ esac
+ eval $ac_envvar=\$ac_optarg
+ export $ac_envvar ;;
+
+ *)
+ # FIXME: should be removed in autoconf 3.0.
+ $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
+ expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
+ $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
+ : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
+ ;;
+
+ esac
+done
+
+if test -n "$ac_prev"; then
+ ac_option=--`echo $ac_prev | sed 's/_/-/g'`
+ as_fn_error $? "missing argument to $ac_option"
+fi
+
+if test -n "$ac_unrecognized_opts"; then
+ case $enable_option_checking in
+ no) ;;
+ fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
+ *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
+ esac
+fi
+
+# Check all directory arguments for consistency.
+for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
+ datadir sysconfdir sharedstatedir localstatedir includedir \
+ oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
+ libdir localedir mandir
+do
+ eval ac_val=\$$ac_var
+ # Remove trailing slashes.
+ case $ac_val in
+ */ )
+ ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
+ eval $ac_var=\$ac_val;;
+ esac
+ # Be sure to have absolute directory names.
+ case $ac_val in
+ [\\/$]* | ?:[\\/]* ) continue;;
+ NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
+ esac
+ as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
+done
+
+# There might be people who depend on the old broken behavior: `$host'
+# used to hold the argument of --host etc.
+# FIXME: To remove some day.
+build=$build_alias
+host=$host_alias
+target=$target_alias
+
+# FIXME: To remove some day.
+if test "x$host_alias" != x; then
+ if test "x$build_alias" = x; then
+ cross_compiling=maybe
+ $as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host.
+ If a cross compiler is detected then cross compile mode will be used" >&2
+ elif test "x$build_alias" != "x$host_alias"; then
+ cross_compiling=yes
+ fi
+fi
+
+ac_tool_prefix=
+test -n "$host_alias" && ac_tool_prefix=$host_alias-
+
+test "$silent" = yes && exec 6>/dev/null
+
+
+ac_pwd=`pwd` && test -n "$ac_pwd" &&
+ac_ls_di=`ls -di .` &&
+ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
+ as_fn_error $? "working directory cannot be determined"
+test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
+ as_fn_error $? "pwd does not report name of working directory"
+
+
+# Find the source files, if location was not specified.
+if test -z "$srcdir"; then
+ ac_srcdir_defaulted=yes
+ # Try the directory containing this script, then the parent directory.
+ ac_confdir=`$as_dirname -- "$as_myself" ||
+$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$as_myself" : 'X\(//\)[^/]' \| \
+ X"$as_myself" : 'X\(//\)$' \| \
+ X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$as_myself" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)[^/].*/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+ srcdir=$ac_confdir
+ if test ! -r "$srcdir/$ac_unique_file"; then
+ srcdir=..
+ fi
+else
+ ac_srcdir_defaulted=no
+fi
+if test ! -r "$srcdir/$ac_unique_file"; then
+ test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
+ as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
+fi
+ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
+ac_abs_confdir=`(
+ cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
+ pwd)`
+# When building in place, set srcdir=.
+if test "$ac_abs_confdir" = "$ac_pwd"; then
+ srcdir=.
+fi
+# Remove unnecessary trailing slashes from srcdir.
+# Double slashes in file names in object file debugging info
+# mess up M-x gdb in Emacs.
+case $srcdir in
+*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
+esac
+for ac_var in $ac_precious_vars; do
+ eval ac_env_${ac_var}_set=\${${ac_var}+set}
+ eval ac_env_${ac_var}_value=\$${ac_var}
+ eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
+ eval ac_cv_env_${ac_var}_value=\$${ac_var}
+done
+
+#
+# Report the --help message.
+#
+if test "$ac_init_help" = "long"; then
+ # Omit some internal or obsolete options to make the list less imposing.
+ # This message is too long to be a string in the A/UX 3.1 sh.
+ cat <<_ACEOF
+\`configure' configures newlib 2.4.0 to adapt to many kinds of systems.
+
+Usage: $0 [OPTION]... [VAR=VALUE]...
+
+To assign environment variables (e.g., CC, CFLAGS...), specify them as
+VAR=VALUE. See below for descriptions of some of the useful variables.
+
+Defaults for the options are specified in brackets.
+
+Configuration:
+ -h, --help display this help and exit
+ --help=short display options specific to this package
+ --help=recursive display the short help of all the included packages
+ -V, --version display version information and exit
+ -q, --quiet, --silent do not print \`checking ...' messages
+ --cache-file=FILE cache test results in FILE [disabled]
+ -C, --config-cache alias for \`--cache-file=config.cache'
+ -n, --no-create do not create output files
+ --srcdir=DIR find the sources in DIR [configure dir or \`..']
+
+Installation directories:
+ --prefix=PREFIX install architecture-independent files in PREFIX
+ [$ac_default_prefix]
+ --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
+ [PREFIX]
+
+By default, \`make install' will install all the files in
+\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
+an installation prefix other than \`$ac_default_prefix' using \`--prefix',
+for instance \`--prefix=\$HOME'.
+
+For better control, use the options below.
+
+Fine tuning of the installation directories:
+ --bindir=DIR user executables [EPREFIX/bin]
+ --sbindir=DIR system admin executables [EPREFIX/sbin]
+ --libexecdir=DIR program executables [EPREFIX/libexec]
+ --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
+ --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
+ --localstatedir=DIR modifiable single-machine data [PREFIX/var]
+ --libdir=DIR object code libraries [EPREFIX/lib]
+ --includedir=DIR C header files [PREFIX/include]
+ --oldincludedir=DIR C header files for non-gcc [/usr/include]
+ --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
+ --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
+ --infodir=DIR info documentation [DATAROOTDIR/info]
+ --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
+ --mandir=DIR man documentation [DATAROOTDIR/man]
+ --docdir=DIR documentation root [DATAROOTDIR/doc/newlib]
+ --htmldir=DIR html documentation [DOCDIR]
+ --dvidir=DIR dvi documentation [DOCDIR]
+ --pdfdir=DIR pdf documentation [DOCDIR]
+ --psdir=DIR ps documentation [DOCDIR]
+_ACEOF
+
+ cat <<\_ACEOF
+
+Program names:
+ --program-prefix=PREFIX prepend PREFIX to installed program names
+ --program-suffix=SUFFIX append SUFFIX to installed program names
+ --program-transform-name=PROGRAM run sed PROGRAM on installed program names
+
+System types:
+ --build=BUILD configure for building on BUILD [guessed]
+ --host=HOST cross-compile to build programs to run on HOST [BUILD]
+_ACEOF
+fi
+
+if test -n "$ac_init_help"; then
+ case $ac_init_help in
+ short | recursive ) echo "Configuration of newlib 2.4.0:";;
+ esac
+ cat <<\_ACEOF
+
+Optional Features:
+ --disable-option-checking ignore unrecognized --enable/--with options
+ --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
+ --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
+ --enable-multilib build many library versions (default)
+ --enable-target-optspace optimize for space
+ --enable-malloc-debugging indicate malloc debugging requested
+ --enable-newlib-multithread enable support for multiple threads
+ --enable-newlib-iconv enable iconv library support
+ --enable-newlib-elix-level supply desired elix library level (1-4)
+ --disable-newlib-io-float disable printf/scanf family float support
+ --disable-newlib-supplied-syscalls disable newlib from supplying syscalls
+ --disable-dependency-tracking speeds up one-time build
+ --enable-dependency-tracking do not reject slow dependency extractors
+ --enable-maintainer-mode enable make rules and dependencies not useful
+ (and sometimes confusing) to the casual installer
+
+Some influential environment variables:
+ CCAS assembler compiler command (defaults to CC)
+ CCASFLAGS assembler compiler flags (defaults to CFLAGS)
+
+Use these variables to override the choices made by `configure' or to help
+it to find libraries and programs with nonstandard names/locations.
+
+Report bugs to the package provider.
+_ACEOF
+ac_status=$?
+fi
+
+if test "$ac_init_help" = "recursive"; then
+ # If there are subdirs, report their specific --help.
+ for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
+ test -d "$ac_dir" ||
+ { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
+ continue
+ ac_builddir=.
+
+case "$ac_dir" in
+.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
+*)
+ ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
+ # A ".." for each directory in $ac_dir_suffix.
+ ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
+ case $ac_top_builddir_sub in
+ "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
+ *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
+ esac ;;
+esac
+ac_abs_top_builddir=$ac_pwd
+ac_abs_builddir=$ac_pwd$ac_dir_suffix
+# for backward compatibility:
+ac_top_builddir=$ac_top_build_prefix
+
+case $srcdir in
+ .) # We are building in place.
+ ac_srcdir=.
+ ac_top_srcdir=$ac_top_builddir_sub
+ ac_abs_top_srcdir=$ac_pwd ;;
+ [\\/]* | ?:[\\/]* ) # Absolute name.
+ ac_srcdir=$srcdir$ac_dir_suffix;
+ ac_top_srcdir=$srcdir
+ ac_abs_top_srcdir=$srcdir ;;
+ *) # Relative name.
+ ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
+ ac_top_srcdir=$ac_top_build_prefix$srcdir
+ ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
+esac
+ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
+
+ cd "$ac_dir" || { ac_status=$?; continue; }
+ # Check for guested configure.
+ if test -f "$ac_srcdir/configure.gnu"; then
+ echo &&
+ $SHELL "$ac_srcdir/configure.gnu" --help=recursive
+ elif test -f "$ac_srcdir/configure"; then
+ echo &&
+ $SHELL "$ac_srcdir/configure" --help=recursive
+ else
+ $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
+ fi || ac_status=$?
+ cd "$ac_pwd" || { ac_status=$?; break; }
+ done
+fi
+
+test -n "$ac_init_help" && exit $ac_status
+if $ac_init_version; then
+ cat <<\_ACEOF
+newlib configure 2.4.0
+generated by GNU Autoconf 2.68
+
+Copyright (C) 2010 Free Software Foundation, Inc.
+This configure script is free software; the Free Software Foundation
+gives unlimited permission to copy, distribute and modify it.
+_ACEOF
+ exit
+fi
+
+## ------------------------ ##
+## Autoconf initialization. ##
+## ------------------------ ##
+
+# ac_fn_c_try_compile LINENO
+# --------------------------
+# Try to compile conftest.$ac_ext, and return whether this succeeded.
+ac_fn_c_try_compile ()
+{
+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ rm -f conftest.$ac_objext
+ if { { ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_compile") 2>conftest.err
+ ac_status=$?
+ if test -s conftest.err; then
+ grep -v '^ *+' conftest.err >conftest.er1
+ cat conftest.er1 >&5
+ mv -f conftest.er1 conftest.err
+ fi
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then :
+ ac_retval=0
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_retval=1
+fi
+ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+ as_fn_set_status $ac_retval
+
+} # ac_fn_c_try_compile
+cat >config.log <<_ACEOF
+This file contains any messages produced by compilers while
+running configure, to aid debugging if configure makes a mistake.
+
+It was created by newlib $as_me 2.4.0, which was
+generated by GNU Autoconf 2.68. Invocation command line was
+
+ $ $0 $@
+
+_ACEOF
+exec 5>>config.log
+{
+cat <<_ASUNAME
+## --------- ##
+## Platform. ##
+## --------- ##
+
+hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
+uname -m = `(uname -m) 2>/dev/null || echo unknown`
+uname -r = `(uname -r) 2>/dev/null || echo unknown`
+uname -s = `(uname -s) 2>/dev/null || echo unknown`
+uname -v = `(uname -v) 2>/dev/null || echo unknown`
+
+/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
+/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
+
+/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
+/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
+/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
+/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
+/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
+/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
+/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
+
+_ASUNAME
+
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ $as_echo "PATH: $as_dir"
+ done
+IFS=$as_save_IFS
+
+} >&5
+
+cat >&5 <<_ACEOF
+
+
+## ----------- ##
+## Core tests. ##
+## ----------- ##
+
+_ACEOF
+
+
+# Keep a trace of the command line.
+# Strip out --no-create and --no-recursion so they do not pile up.
+# Strip out --silent because we don't want to record it for future runs.
+# Also quote any args containing shell meta-characters.
+# Make two passes to allow for proper duplicate-argument suppression.
+ac_configure_args=
+ac_configure_args0=
+ac_configure_args1=
+ac_must_keep_next=false
+for ac_pass in 1 2
+do
+ for ac_arg
+ do
+ case $ac_arg in
+ -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
+ -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+ | -silent | --silent | --silen | --sile | --sil)
+ continue ;;
+ *\'*)
+ ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
+ esac
+ case $ac_pass in
+ 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
+ 2)
+ as_fn_append ac_configure_args1 " '$ac_arg'"
+ if test $ac_must_keep_next = true; then
+ ac_must_keep_next=false # Got value, back to normal.
+ else
+ case $ac_arg in
+ *=* | --config-cache | -C | -disable-* | --disable-* \
+ | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
+ | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
+ | -with-* | --with-* | -without-* | --without-* | --x)
+ case "$ac_configure_args0 " in
+ "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
+ esac
+ ;;
+ -* ) ac_must_keep_next=true ;;
+ esac
+ fi
+ as_fn_append ac_configure_args " '$ac_arg'"
+ ;;
+ esac
+ done
+done
+{ ac_configure_args0=; unset ac_configure_args0;}
+{ ac_configure_args1=; unset ac_configure_args1;}
+
+# When interrupted or exit'd, cleanup temporary files, and complete
+# config.log. We remove comments because anyway the quotes in there
+# would cause problems or look ugly.
+# WARNING: Use '\'' to represent an apostrophe within the trap.
+# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
+trap 'exit_status=$?
+ # Save into config.log some information that might help in debugging.
+ {
+ echo
+
+ $as_echo "## ---------------- ##
+## Cache variables. ##
+## ---------------- ##"
+ echo
+ # The following way of writing the cache mishandles newlines in values,
+(
+ for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
+ eval ac_val=\$$ac_var
+ case $ac_val in #(
+ *${as_nl}*)
+ case $ac_var in #(
+ *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
+$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
+ esac
+ case $ac_var in #(
+ _ | IFS | as_nl) ;; #(
+ BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
+ *) { eval $ac_var=; unset $ac_var;} ;;
+ esac ;;
+ esac
+ done
+ (set) 2>&1 |
+ case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
+ *${as_nl}ac_space=\ *)
+ sed -n \
+ "s/'\''/'\''\\\\'\'''\''/g;
+ s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
+ ;; #(
+ *)
+ sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
+ ;;
+ esac |
+ sort
+)
+ echo
+
+ $as_echo "## ----------------- ##
+## Output variables. ##
+## ----------------- ##"
+ echo
+ for ac_var in $ac_subst_vars
+ do
+ eval ac_val=\$$ac_var
+ case $ac_val in
+ *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
+ esac
+ $as_echo "$ac_var='\''$ac_val'\''"
+ done | sort
+ echo
+
+ if test -n "$ac_subst_files"; then
+ $as_echo "## ------------------- ##
+## File substitutions. ##
+## ------------------- ##"
+ echo
+ for ac_var in $ac_subst_files
+ do
+ eval ac_val=\$$ac_var
+ case $ac_val in
+ *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
+ esac
+ $as_echo "$ac_var='\''$ac_val'\''"
+ done | sort
+ echo
+ fi
+
+ if test -s confdefs.h; then
+ $as_echo "## ----------- ##
+## confdefs.h. ##
+## ----------- ##"
+ echo
+ cat confdefs.h
+ echo
+ fi
+ test "$ac_signal" != 0 &&
+ $as_echo "$as_me: caught signal $ac_signal"
+ $as_echo "$as_me: exit $exit_status"
+ } >&5
+ rm -f core *.core core.conftest.* &&
+ rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
+ exit $exit_status
+' 0
+for ac_signal in 1 2 13 15; do
+ trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
+done
+ac_signal=0
+
+# confdefs.h avoids OS command line length limits that DEFS can exceed.
+rm -f -r conftest* confdefs.h
+
+$as_echo "/* confdefs.h */" > confdefs.h
+
+# Predefined preprocessor variables.
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_NAME "$PACKAGE_NAME"
+_ACEOF
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
+_ACEOF
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_VERSION "$PACKAGE_VERSION"
+_ACEOF
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_STRING "$PACKAGE_STRING"
+_ACEOF
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
+_ACEOF
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_URL "$PACKAGE_URL"
+_ACEOF
+
+
+# Let the site file select an alternate cache file if it wants to.
+# Prefer an explicitly selected file to automatically selected ones.
+ac_site_file1=NONE
+ac_site_file2=NONE
+if test -n "$CONFIG_SITE"; then
+ # We do not want a PATH search for config.site.
+ case $CONFIG_SITE in #((
+ -*) ac_site_file1=./$CONFIG_SITE;;
+ */*) ac_site_file1=$CONFIG_SITE;;
+ *) ac_site_file1=./$CONFIG_SITE;;
+ esac
+elif test "x$prefix" != xNONE; then
+ ac_site_file1=$prefix/share/config.site
+ ac_site_file2=$prefix/etc/config.site
+else
+ ac_site_file1=$ac_default_prefix/share/config.site
+ ac_site_file2=$ac_default_prefix/etc/config.site
+fi
+for ac_site_file in "$ac_site_file1" "$ac_site_file2"
+do
+ test "x$ac_site_file" = xNONE && continue
+ if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
+$as_echo "$as_me: loading site script $ac_site_file" >&6;}
+ sed 's/^/| /' "$ac_site_file" >&5
+ . "$ac_site_file" \
+ || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "failed to load site script $ac_site_file
+See \`config.log' for more details" "$LINENO" 5; }
+ fi
+done
+
+if test -r "$cache_file"; then
+ # Some versions of bash will fail to source /dev/null (special files
+ # actually), so we avoid doing that. DJGPP emulates it as a regular file.
+ if test /dev/null != "$cache_file" && test -f "$cache_file"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
+$as_echo "$as_me: loading cache $cache_file" >&6;}
+ case $cache_file in
+ [\\/]* | ?:[\\/]* ) . "$cache_file";;
+ *) . "./$cache_file";;
+ esac
+ fi
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
+$as_echo "$as_me: creating cache $cache_file" >&6;}
+ >$cache_file
+fi
+
+# Check that the precious variables saved in the cache have kept the same
+# value.
+ac_cache_corrupted=false
+for ac_var in $ac_precious_vars; do
+ eval ac_old_set=\$ac_cv_env_${ac_var}_set
+ eval ac_new_set=\$ac_env_${ac_var}_set
+ eval ac_old_val=\$ac_cv_env_${ac_var}_value
+ eval ac_new_val=\$ac_env_${ac_var}_value
+ case $ac_old_set,$ac_new_set in
+ set,)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
+$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
+ ac_cache_corrupted=: ;;
+ ,set)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
+$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
+ ac_cache_corrupted=: ;;
+ ,);;
+ *)
+ if test "x$ac_old_val" != "x$ac_new_val"; then
+ # differences in whitespace do not lead to failure.
+ ac_old_val_w=`echo x $ac_old_val`
+ ac_new_val_w=`echo x $ac_new_val`
+ if test "$ac_old_val_w" != "$ac_new_val_w"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
+$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
+ ac_cache_corrupted=:
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
+$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
+ eval $ac_var=\$ac_old_val
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
+$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
+$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
+ fi;;
+ esac
+ # Pass precious variables to config.status.
+ if test "$ac_new_set" = set; then
+ case $ac_new_val in
+ *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
+ *) ac_arg=$ac_var=$ac_new_val ;;
+ esac
+ case " $ac_configure_args " in
+ *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
+ *) as_fn_append ac_configure_args " '$ac_arg'" ;;
+ esac
+ fi
+done
+if $ac_cache_corrupted; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
+$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
+ as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
+fi
+## -------------------- ##
+## Main body of script. ##
+## -------------------- ##
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+
+
+ac_aux_dir=
+for ac_dir in ../../../.. "$srcdir"/../../../..; do
+ if test -f "$ac_dir/install-sh"; then
+ ac_aux_dir=$ac_dir
+ ac_install_sh="$ac_aux_dir/install-sh -c"
+ break
+ elif test -f "$ac_dir/install.sh"; then
+ ac_aux_dir=$ac_dir
+ ac_install_sh="$ac_aux_dir/install.sh -c"
+ break
+ elif test -f "$ac_dir/shtool"; then
+ ac_aux_dir=$ac_dir
+ ac_install_sh="$ac_aux_dir/shtool install -c"
+ break
+ fi
+done
+if test -z "$ac_aux_dir"; then
+ as_fn_error $? "cannot find install-sh, install.sh, or shtool in ../../../.. \"$srcdir\"/../../../.." "$LINENO" 5
+fi
+
+# These three variables are undocumented and unsupported,
+# and are intended to be withdrawn in a future Autoconf release.
+# They can cause serious problems if a builder's source tree is in a directory
+# whose full name contains unusual characters.
+ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
+ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
+ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
+
+
+
+
+# Make sure we can run config.sub.
+$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
+ as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
+$as_echo_n "checking build system type... " >&6; }
+if ${ac_cv_build+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_build_alias=$build_alias
+test "x$ac_build_alias" = x &&
+ ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
+test "x$ac_build_alias" = x &&
+ as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
+ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
+ as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
+$as_echo "$ac_cv_build" >&6; }
+case $ac_cv_build in
+*-*-*) ;;
+*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
+esac
+build=$ac_cv_build
+ac_save_IFS=$IFS; IFS='-'
+set x $ac_cv_build
+shift
+build_cpu=$1
+build_vendor=$2
+shift; shift
+# Remember, the first character of IFS is used to create $*,
+# except with old shells:
+build_os=$*
+IFS=$ac_save_IFS
+case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
+$as_echo_n "checking host system type... " >&6; }
+if ${ac_cv_host+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test "x$host_alias" = x; then
+ ac_cv_host=$ac_cv_build
+else
+ ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
+ as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
+$as_echo "$ac_cv_host" >&6; }
+case $ac_cv_host in
+*-*-*) ;;
+*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
+esac
+host=$ac_cv_host
+ac_save_IFS=$IFS; IFS='-'
+set x $ac_cv_host
+shift
+host_cpu=$1
+host_vendor=$2
+shift; shift
+# Remember, the first character of IFS is used to create $*,
+# except with old shells:
+host_os=$*
+IFS=$ac_save_IFS
+case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
+
+
+am__api_version='1.11'
+
+# Find a good install program. We prefer a C program (faster),
+# so one script is as good as another. But avoid the broken or
+# incompatible versions:
+# SysV /etc/install, /usr/sbin/install
+# SunOS /usr/etc/install
+# IRIX /sbin/install
+# AIX /bin/install
+# AmigaOS /C/install, which installs bootblocks on floppy discs
+# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
+# AFS /usr/afsws/bin/install, which mishandles nonexistent args
+# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
+# OS/2's system install, which has a completely different semantic
+# ./install, which can be erroneously created by make from ./install.sh.
+# Reject install programs that cannot install multiple files.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
+$as_echo_n "checking for a BSD-compatible install... " >&6; }
+if test -z "$INSTALL"; then
+if ${ac_cv_path_install+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ # Account for people who put trailing slashes in PATH elements.
+case $as_dir/ in #((
+ ./ | .// | /[cC]/* | \
+ /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
+ ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
+ /usr/ucb/* ) ;;
+ *)
+ # OSF1 and SCO ODT 3.0 have their own names for install.
+ # Don't use installbsd from OSF since it installs stuff as root
+ # by default.
+ for ac_prog in ginstall scoinst install; do
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
+ if test $ac_prog = install &&
+ grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
+ # AIX install. It has an incompatible calling convention.
+ :
+ elif test $ac_prog = install &&
+ grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
+ # program-specific install script used by HP pwplus--don't use.
+ :
+ else
+ rm -rf conftest.one conftest.two conftest.dir
+ echo one > conftest.one
+ echo two > conftest.two
+ mkdir conftest.dir
+ if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
+ test -s conftest.one && test -s conftest.two &&
+ test -s conftest.dir/conftest.one &&
+ test -s conftest.dir/conftest.two
+ then
+ ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
+ break 3
+ fi
+ fi
+ fi
+ done
+ done
+ ;;
+esac
+
+ done
+IFS=$as_save_IFS
+
+rm -rf conftest.one conftest.two conftest.dir
+
+fi
+ if test "${ac_cv_path_install+set}" = set; then
+ INSTALL=$ac_cv_path_install
+ else
+ # As a last resort, use the slow shell script. Don't cache a
+ # value for INSTALL within a source directory, because that will
+ # break other packages using the cache if that directory is
+ # removed, or if the value is a relative name.
+ INSTALL=$ac_install_sh
+ fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
+$as_echo "$INSTALL" >&6; }
+
+# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
+# It thinks the first close brace ends the variable substitution.
+test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
+
+test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
+
+test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5
+$as_echo_n "checking whether build environment is sane... " >&6; }
+# Just in case
+sleep 1
+echo timestamp > conftest.file
+# Reject unsafe characters in $srcdir or the absolute working directory
+# name. Accept space and tab only in the latter.
+am_lf='
+'
+case `pwd` in
+ *[\\\"\#\$\&\'\`$am_lf]*)
+ as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5;;
+esac
+case $srcdir in
+ *[\\\"\#\$\&\'\`$am_lf\ \ ]*)
+ as_fn_error $? "unsafe srcdir value: \`$srcdir'" "$LINENO" 5;;
+esac
+
+# Do `set' in a subshell so we don't clobber the current shell's
+# arguments. Must try -L first in case configure is actually a
+# symlink; some systems play weird games with the mod time of symlinks
+# (eg FreeBSD returns the mod time of the symlink's containing
+# directory).
+if (
+ set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
+ if test "$*" = "X"; then
+ # -L didn't work.
+ set X `ls -t "$srcdir/configure" conftest.file`
+ fi
+ rm -f conftest.file
+ if test "$*" != "X $srcdir/configure conftest.file" \
+ && test "$*" != "X conftest.file $srcdir/configure"; then
+
+ # If neither matched, then we have a broken ls. This can happen
+ # if, for instance, CONFIG_SHELL is bash and it inherits a
+ # broken ls alias from the environment. This has actually
+ # happened. Such a system could not be considered "sane".
+ as_fn_error $? "ls -t appears to fail. Make sure there is not a broken
+alias in your environment" "$LINENO" 5
+ fi
+
+ test "$2" = conftest.file
+ )
+then
+ # Ok.
+ :
+else
+ as_fn_error $? "newly created file is older than distributed files!
+Check your system clock" "$LINENO" 5
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+test "$program_prefix" != NONE &&
+ program_transform_name="s&^&$program_prefix&;$program_transform_name"
+# Use a double $ so make ignores it.
+test "$program_suffix" != NONE &&
+ program_transform_name="s&\$&$program_suffix&;$program_transform_name"
+# Double any \ or $.
+# By default was `s,x,x', remove it if useless.
+ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
+program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"`
+
+# expand $ac_aux_dir to an absolute path
+am_aux_dir=`cd $ac_aux_dir && pwd`
+
+if test x"${MISSING+set}" != xset; then
+ case $am_aux_dir in
+ *\ * | *\ *)
+ MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
+ *)
+ MISSING="\${SHELL} $am_aux_dir/missing" ;;
+ esac
+fi
+# Use eval to expand $SHELL
+if eval "$MISSING --run true"; then
+ am_missing_run="$MISSING --run "
+else
+ am_missing_run=
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`missing' script is too old or missing" >&5
+$as_echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;}
+fi
+
+if test x"${install_sh}" != xset; then
+ case $am_aux_dir in
+ *\ * | *\ *)
+ install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
+ *)
+ install_sh="\${SHELL} $am_aux_dir/install-sh"
+ esac
+fi
+
+# Installed binaries are usually stripped using `strip' when the user
+# run `make install-strip'. However `strip' might not be the right
+# tool to use in cross-compilation environments, therefore Automake
+# will honor the `STRIP' environment variable to overrule this program.
+if test "$cross_compiling" != no; then
+ if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
+set dummy ${ac_tool_prefix}strip; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_STRIP+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$STRIP"; then
+ ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_STRIP="${ac_tool_prefix}strip"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+STRIP=$ac_cv_prog_STRIP
+if test -n "$STRIP"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
+$as_echo "$STRIP" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_STRIP"; then
+ ac_ct_STRIP=$STRIP
+ # Extract the first word of "strip", so it can be a program name with args.
+set dummy strip; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_ct_STRIP"; then
+ ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_ac_ct_STRIP="strip"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
+if test -n "$ac_ct_STRIP"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
+$as_echo "$ac_ct_STRIP" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+ if test "x$ac_ct_STRIP" = x; then
+ STRIP=":"
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ STRIP=$ac_ct_STRIP
+ fi
+else
+ STRIP="$ac_cv_prog_STRIP"
+fi
+
+fi
+INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
+$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
+if test -z "$MKDIR_P"; then
+ if ${ac_cv_path_mkdir+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_prog in mkdir gmkdir; do
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; } || continue
+ case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
+ 'mkdir (GNU coreutils) '* | \
+ 'mkdir (coreutils) '* | \
+ 'mkdir (fileutils) '4.1*)
+ ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
+ break 3;;
+ esac
+ done
+ done
+ done
+IFS=$as_save_IFS
+
+fi
+
+ test -d ./--version && rmdir ./--version
+ if test "${ac_cv_path_mkdir+set}" = set; then
+ MKDIR_P="$ac_cv_path_mkdir -p"
+ else
+ # As a last resort, use the slow shell script. Don't cache a
+ # value for MKDIR_P within a source directory, because that will
+ # break other packages using the cache if that directory is
+ # removed, or if the value is a relative name.
+ MKDIR_P="$ac_install_sh -d"
+ fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
+$as_echo "$MKDIR_P" >&6; }
+
+mkdir_p="$MKDIR_P"
+case $mkdir_p in
+ [\\/$]* | ?:[\\/]*) ;;
+ */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
+esac
+
+for ac_prog in gawk mawk nawk awk
+do
+ # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_AWK+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$AWK"; then
+ ac_cv_prog_AWK="$AWK" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_AWK="$ac_prog"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+AWK=$ac_cv_prog_AWK
+if test -n "$AWK"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
+$as_echo "$AWK" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+ test -n "$AWK" && break
+done
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
+$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
+set x ${MAKE-make}
+ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
+if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat >conftest.make <<\_ACEOF
+SHELL = /bin/sh
+all:
+ @echo '@@@%%%=$(MAKE)=@@@%%%'
+_ACEOF
+# GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
+case `${MAKE-make} -f conftest.make 2>/dev/null` in
+ *@@@%%%=?*=@@@%%%*)
+ eval ac_cv_prog_make_${ac_make}_set=yes;;
+ *)
+ eval ac_cv_prog_make_${ac_make}_set=no;;
+esac
+rm -f conftest.make
+fi
+if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+ SET_MAKE=
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+ SET_MAKE="MAKE=${MAKE-make}"
+fi
+
+rm -rf .tst 2>/dev/null
+mkdir .tst 2>/dev/null
+if test -d .tst; then
+ am__leading_dot=.
+else
+ am__leading_dot=_
+fi
+rmdir .tst 2>/dev/null
+
+DEPDIR="${am__leading_dot}deps"
+
+ac_config_commands="$ac_config_commands depfiles"
+
+
+am_make=${MAKE-make}
+cat > confinc << 'END'
+am__doit:
+ @echo this is the am__doit target
+.PHONY: am__doit
+END
+# If we don't find an include directive, just comment out the code.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5
+$as_echo_n "checking for style of include used by $am_make... " >&6; }
+am__include="#"
+am__quote=
+_am_result=none
+# First try GNU make style include.
+echo "include confinc" > confmf
+# Ignore all kinds of additional output from `make'.
+case `$am_make -s -f confmf 2> /dev/null` in #(
+*the\ am__doit\ target*)
+ am__include=include
+ am__quote=
+ _am_result=GNU
+ ;;
+esac
+# Now try BSD make style include.
+if test "$am__include" = "#"; then
+ echo '.include "confinc"' > confmf
+ case `$am_make -s -f confmf 2> /dev/null` in #(
+ *the\ am__doit\ target*)
+ am__include=.include
+ am__quote="\""
+ _am_result=BSD
+ ;;
+ esac
+fi
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5
+$as_echo "$_am_result" >&6; }
+rm -f confinc confmf
+
+# Check whether --enable-dependency-tracking was given.
+if test "${enable_dependency_tracking+set}" = set; then :
+ enableval=$enable_dependency_tracking;
+fi
+
+if test "x$enable_dependency_tracking" != xno; then
+ am_depcomp="$ac_aux_dir/depcomp"
+ AMDEPBACKSLASH='\'
+ am__nodep='_no'
+fi
+ if test "x$enable_dependency_tracking" != xno; then
+ AMDEP_TRUE=
+ AMDEP_FALSE='#'
+else
+ AMDEP_TRUE='#'
+ AMDEP_FALSE=
+fi
+
+
+
+# Check whether --enable-multilib was given.
+if test "${enable_multilib+set}" = set; then :
+ enableval=$enable_multilib; case "${enableval}" in
+ yes) multilib=yes ;;
+ no) multilib=no ;;
+ *) as_fn_error $? "bad value ${enableval} for multilib option" "$LINENO" 5 ;;
+ esac
+else
+ multilib=yes
+fi
+
+# Check whether --enable-target-optspace was given.
+if test "${enable_target_optspace+set}" = set; then :
+ enableval=$enable_target_optspace; case "${enableval}" in
+ yes) target_optspace=yes ;;
+ no) target_optspace=no ;;
+ *) as_fn_error $? "bad value ${enableval} for target-optspace option" "$LINENO" 5 ;;
+ esac
+else
+ target_optspace=
+fi
+
+# Check whether --enable-malloc-debugging was given.
+if test "${enable_malloc_debugging+set}" = set; then :
+ enableval=$enable_malloc_debugging; case "${enableval}" in
+ yes) malloc_debugging=yes ;;
+ no) malloc_debugging=no ;;
+ *) as_fn_error $? "bad value ${enableval} for malloc-debugging option" "$LINENO" 5 ;;
+ esac
+else
+ malloc_debugging=
+fi
+
+# Check whether --enable-newlib-multithread was given.
+if test "${enable_newlib_multithread+set}" = set; then :
+ enableval=$enable_newlib_multithread; case "${enableval}" in
+ yes) newlib_multithread=yes ;;
+ no) newlib_multithread=no ;;
+ *) as_fn_error $? "bad value ${enableval} for newlib-multithread option" "$LINENO" 5 ;;
+ esac
+else
+ newlib_multithread=yes
+fi
+
+# Check whether --enable-newlib-iconv was given.
+if test "${enable_newlib_iconv+set}" = set; then :
+ enableval=$enable_newlib_iconv; if test "${newlib_iconv+set}" != set; then
+ case "${enableval}" in
+ yes) newlib_iconv=yes ;;
+ no) newlib_iconv=no ;;
+ *) as_fn_error $? "bad value ${enableval} for newlib-iconv option" "$LINENO" 5 ;;
+ esac
+ fi
+else
+ newlib_iconv=${newlib_iconv}
+fi
+
+# Check whether --enable-newlib-elix-level was given.
+if test "${enable_newlib_elix_level+set}" = set; then :
+ enableval=$enable_newlib_elix_level; case "${enableval}" in
+ 0) newlib_elix_level=0 ;;
+ 1) newlib_elix_level=1 ;;
+ 2) newlib_elix_level=2 ;;
+ 3) newlib_elix_level=3 ;;
+ 4) newlib_elix_level=4 ;;
+ *) as_fn_error $? "bad value ${enableval} for newlib-elix-level option" "$LINENO" 5 ;;
+ esac
+else
+ newlib_elix_level=0
+fi
+
+# Check whether --enable-newlib-io-float was given.
+if test "${enable_newlib_io_float+set}" = set; then :
+ enableval=$enable_newlib_io_float; case "${enableval}" in
+ yes) newlib_io_float=yes ;;
+ no) newlib_io_float=no ;;
+ *) as_fn_error $? "bad value ${enableval} for newlib-io-float option" "$LINENO" 5 ;;
+ esac
+else
+ newlib_io_float=yes
+fi
+
+# Check whether --enable-newlib-supplied-syscalls was given.
+if test "${enable_newlib_supplied_syscalls+set}" = set; then :
+ enableval=$enable_newlib_supplied_syscalls; case "${enableval}" in
+ yes) newlib_may_supply_syscalls=yes ;;
+ no) newlib_may_supply_syscalls=no ;;
+ *) as_fn_error $? "bad value ${enableval} for newlib-supplied-syscalls option" "$LINENO" 5 ;;
+ esac
+else
+ newlib_may_supply_syscalls=yes
+fi
+
+ if test x${newlib_may_supply_syscalls} = xyes; then
+ MAY_SUPPLY_SYSCALLS_TRUE=
+ MAY_SUPPLY_SYSCALLS_FALSE='#'
+else
+ MAY_SUPPLY_SYSCALLS_TRUE='#'
+ MAY_SUPPLY_SYSCALLS_FALSE=
+fi
+
+
+
+test -z "${with_target_subdir}" && with_target_subdir=.
+
+if test "${srcdir}" = "."; then
+ if test "${with_target_subdir}" != "."; then
+ newlib_basedir="${srcdir}/${with_multisrctop}../../../.."
+ else
+ newlib_basedir="${srcdir}/${with_multisrctop}../../.."
+ fi
+else
+ newlib_basedir="${srcdir}/../../.."
+fi
+
+
+
+
+if test "`cd $srcdir && pwd`" != "`pwd`"; then
+ # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
+ # is not polluted with repeated "-I."
+ am__isrc=' -I$(srcdir)'
+ # test to see if srcdir already configured
+ if test -f $srcdir/config.status; then
+ as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5
+ fi
+fi
+
+# test whether we have cygpath
+if test -z "$CYGPATH_W"; then
+ if (cygpath --version) >/dev/null 2>/dev/null; then
+ CYGPATH_W='cygpath -w'
+ else
+ CYGPATH_W=echo
+ fi
+fi
+
+
+# Define the identity of the package.
+ PACKAGE='newlib'
+ VERSION='2.4.0'
+
+
+# Some tools Automake needs.
+
+ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"}
+
+
+AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"}
+
+
+AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"}
+
+
+AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"}
+
+
+MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
+
+# We need awk for the "check" target. The system "awk" is bad on
+# some platforms.
+# Always define AMTAR for backward compatibility. Yes, it's still used
+# in the wild :-( We should find a proper way to deprecate it ...
+AMTAR='$${TAR-tar}'
+
+am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'
+
+
+
+
+
+
+# FIXME: We temporarily define our own version of AC_PROG_CC. This is
+# copied from autoconf 2.12, but does not call AC_PROG_CC_WORKS. We
+# are probably using a cross compiler, which will not be able to fully
+# link an executable. This should really be fixed in autoconf
+# itself.
+
+
+
+
+
+
+
+# Extract the first word of "gcc", so it can be a program name with args.
+set dummy gcc; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_CC+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_CC="gcc"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+$as_echo "$CC" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+
+depcc="$CC" am_compiler_list=
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
+$as_echo_n "checking dependency style of $depcc... " >&6; }
+if ${am_cv_CC_dependencies_compiler_type+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
+ # We make a subdir and do the tests there. Otherwise we can end up
+ # making bogus files that we don't know about and never remove. For
+ # instance it was reported that on HP-UX the gcc test will end up
+ # making a dummy file named `D' -- because `-MD' means `put the output
+ # in D'.
+ rm -rf conftest.dir
+ mkdir conftest.dir
+ # Copy depcomp to subdir because otherwise we won't find it if we're
+ # using a relative directory.
+ cp "$am_depcomp" conftest.dir
+ cd conftest.dir
+ # We will build objects and dependencies in a subdirectory because
+ # it helps to detect inapplicable dependency modes. For instance
+ # both Tru64's cc and ICC support -MD to output dependencies as a
+ # side effect of compilation, but ICC will put the dependencies in
+ # the current directory while Tru64 will put them in the object
+ # directory.
+ mkdir sub
+
+ am_cv_CC_dependencies_compiler_type=none
+ if test "$am_compiler_list" = ""; then
+ am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
+ fi
+ am__universal=false
+ case " $depcc " in #(
+ *\ -arch\ *\ -arch\ *) am__universal=true ;;
+ esac
+
+ for depmode in $am_compiler_list; do
+ # Setup a source with many dependencies, because some compilers
+ # like to wrap large dependency lists on column 80 (with \), and
+ # we should not choose a depcomp mode which is confused by this.
+ #
+ # We need to recreate these files for each test, as the compiler may
+ # overwrite some of them when testing with obscure command lines.
+ # This happens at least with the AIX C compiler.
+ : > sub/conftest.c
+ for i in 1 2 3 4 5 6; do
+ echo '#include "conftst'$i'.h"' >> sub/conftest.c
+ # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
+ # Solaris 8's {/usr,}/bin/sh.
+ touch sub/conftst$i.h
+ done
+ echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
+
+ # We check with `-c' and `-o' for the sake of the "dashmstdout"
+ # mode. It turns out that the SunPro C++ compiler does not properly
+ # handle `-M -o', and we need to detect this. Also, some Intel
+ # versions had trouble with output in subdirs
+ am__obj=sub/conftest.${OBJEXT-o}
+ am__minus_obj="-o $am__obj"
+ case $depmode in
+ gcc)
+ # This depmode causes a compiler race in universal mode.
+ test "$am__universal" = false || continue
+ ;;
+ nosideeffect)
+ # after this tag, mechanisms are not by side-effect, so they'll
+ # only be used when explicitly requested
+ if test "x$enable_dependency_tracking" = xyes; then
+ continue
+ else
+ break
+ fi
+ ;;
+ msvc7 | msvc7msys | msvisualcpp | msvcmsys)
+ # This compiler won't grok `-c -o', but also, the minuso test has
+ # not run yet. These depmodes are late enough in the game, and
+ # so weak that their functioning should not be impacted.
+ am__obj=conftest.${OBJEXT-o}
+ am__minus_obj=
+ ;;
+ none) break ;;
+ esac
+ if depmode=$depmode \
+ source=sub/conftest.c object=$am__obj \
+ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
+ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
+ >/dev/null 2>conftest.err &&
+ grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
+ grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
+ grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
+ ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
+ # icc doesn't choke on unknown options, it will just issue warnings
+ # or remarks (even with -Werror). So we grep stderr for any message
+ # that says an option was ignored or not supported.
+ # When given -MP, icc 7.0 and 7.1 complain thusly:
+ # icc: Command line warning: ignoring option '-M'; no argument required
+ # The diagnosis changed in icc 8.0:
+ # icc: Command line remark: option '-MP' not supported
+ if (grep 'ignoring option' conftest.err ||
+ grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
+ am_cv_CC_dependencies_compiler_type=$depmode
+ break
+ fi
+ fi
+ done
+
+ cd ..
+ rm -rf conftest.dir
+else
+ am_cv_CC_dependencies_compiler_type=none
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
+$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; }
+CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
+
+ if
+ test "x$enable_dependency_tracking" != xno \
+ && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then
+ am__fastdepCC_TRUE=
+ am__fastdepCC_FALSE='#'
+else
+ am__fastdepCC_TRUE='#'
+ am__fastdepCC_FALSE=
+fi
+
+
+if test -z "$CC"; then
+ # Extract the first word of "cc", so it can be a program name with args.
+set dummy cc; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_CC+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+ ac_prog_rejected=no
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
+ ac_prog_rejected=yes
+ continue
+ fi
+ ac_cv_prog_CC="cc"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+if test $ac_prog_rejected = yes; then
+ # We found a bogon in the path, so make sure we never use it.
+ set dummy $ac_cv_prog_CC
+ shift
+ if test $# != 0; then
+ # We chose a different compiler from the bogus one.
+ # However, it has the same basename, so the bogon will be chosen
+ # first if we set CC to just the basename; use the full file name.
+ shift
+ ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
+ fi
+fi
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+$as_echo "$CC" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+ test -z "$CC" && as_fn_error $? "no acceptable cc found in \$PATH" "$LINENO" 5
+fi
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using GNU C" >&5
+$as_echo_n "checking whether we are using GNU C... " >&6; }
+if ${ac_cv_c_compiler_gnu+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat > conftest.c <<EOF
+#ifdef __GNUC__
+ yes;
+#endif
+EOF
+if { ac_try='${CC-cc} -E conftest.c'
+ { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; } | egrep yes >/dev/null 2>&1; then
+ ac_cv_c_compiler_gnu=yes
+else
+ ac_cv_c_compiler_gnu=no
+fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
+$as_echo "$ac_cv_c_compiler_gnu" >&6; }
+
+if test $ac_cv_c_compiler_gnu = yes; then
+ GCC=yes
+ ac_test_CFLAGS="${CFLAGS+set}"
+ ac_save_CFLAGS="$CFLAGS"
+ ac_test_CFLAGS=${CFLAGS+set}
+ac_save_CFLAGS=$CFLAGS
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
+$as_echo_n "checking whether $CC accepts -g... " >&6; }
+if ${ac_cv_prog_cc_g+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_save_c_werror_flag=$ac_c_werror_flag
+ ac_c_werror_flag=yes
+ ac_cv_prog_cc_g=no
+ CFLAGS="-g"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ ac_cv_prog_cc_g=yes
+else
+ CFLAGS=""
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+
+else
+ ac_c_werror_flag=$ac_save_c_werror_flag
+ CFLAGS="-g"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ ac_cv_prog_cc_g=yes
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ ac_c_werror_flag=$ac_save_c_werror_flag
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
+$as_echo "$ac_cv_prog_cc_g" >&6; }
+if test "$ac_test_CFLAGS" = set; then
+ CFLAGS=$ac_save_CFLAGS
+elif test $ac_cv_prog_cc_g = yes; then
+ if test "$GCC" = yes; then
+ CFLAGS="-g -O2"
+ else
+ CFLAGS="-g"
+ fi
+else
+ if test "$GCC" = yes; then
+ CFLAGS="-O2"
+ else
+ CFLAGS=
+ fi
+fi
+ if test "$ac_test_CFLAGS" = set; then
+ CFLAGS="$ac_save_CFLAGS"
+ elif test $ac_cv_prog_cc_g = yes; then
+ CFLAGS="-g -O2"
+ else
+ CFLAGS="-O2"
+ fi
+else
+ GCC=
+ test "${CFLAGS+set}" = set || CFLAGS="-g"
+fi
+
+
+if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args.
+set dummy ${ac_tool_prefix}as; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_AS+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$AS"; then
+ ac_cv_prog_AS="$AS" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_AS="${ac_tool_prefix}as"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+AS=$ac_cv_prog_AS
+if test -n "$AS"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
+$as_echo "$AS" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_AS"; then
+ ac_ct_AS=$AS
+ # Extract the first word of "as", so it can be a program name with args.
+set dummy as; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_AS+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_ct_AS"; then
+ ac_cv_prog_ac_ct_AS="$ac_ct_AS" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_ac_ct_AS="as"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_AS=$ac_cv_prog_ac_ct_AS
+if test -n "$ac_ct_AS"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AS" >&5
+$as_echo "$ac_ct_AS" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+ if test "x$ac_ct_AS" = x; then
+ AS=""
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ AS=$ac_ct_AS
+ fi
+else
+ AS="$ac_cv_prog_AS"
+fi
+
+if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
+set dummy ${ac_tool_prefix}ar; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_AR+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$AR"; then
+ ac_cv_prog_AR="$AR" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_AR="${ac_tool_prefix}ar"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+AR=$ac_cv_prog_AR
+if test -n "$AR"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
+$as_echo "$AR" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_AR"; then
+ ac_ct_AR=$AR
+ # Extract the first word of "ar", so it can be a program name with args.
+set dummy ar; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_AR+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_ct_AR"; then
+ ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_ac_ct_AR="ar"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_AR=$ac_cv_prog_ac_ct_AR
+if test -n "$ac_ct_AR"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
+$as_echo "$ac_ct_AR" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+ if test "x$ac_ct_AR" = x; then
+ AR=""
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ AR=$ac_ct_AR
+ fi
+else
+ AR="$ac_cv_prog_AR"
+fi
+
+if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
+set dummy ${ac_tool_prefix}ranlib; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_RANLIB+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$RANLIB"; then
+ ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+RANLIB=$ac_cv_prog_RANLIB
+if test -n "$RANLIB"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
+$as_echo "$RANLIB" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_RANLIB"; then
+ ac_ct_RANLIB=$RANLIB
+ # Extract the first word of "ranlib", so it can be a program name with args.
+set dummy ranlib; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_ct_RANLIB"; then
+ ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_ac_ct_RANLIB="ranlib"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
+if test -n "$ac_ct_RANLIB"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
+$as_echo "$ac_ct_RANLIB" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+ if test "x$ac_ct_RANLIB" = x; then
+ RANLIB=":"
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ RANLIB=$ac_ct_RANLIB
+ fi
+else
+ RANLIB="$ac_cv_prog_RANLIB"
+fi
+
+if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}readelf", so it can be a program name with args.
+set dummy ${ac_tool_prefix}readelf; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_READELF+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$READELF"; then
+ ac_cv_prog_READELF="$READELF" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_READELF="${ac_tool_prefix}readelf"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+READELF=$ac_cv_prog_READELF
+if test -n "$READELF"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
+$as_echo "$READELF" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_READELF"; then
+ ac_ct_READELF=$READELF
+ # Extract the first word of "readelf", so it can be a program name with args.
+set dummy readelf; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_READELF+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_ct_READELF"; then
+ ac_cv_prog_ac_ct_READELF="$ac_ct_READELF" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_ac_ct_READELF="readelf"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_READELF=$ac_cv_prog_ac_ct_READELF
+if test -n "$ac_ct_READELF"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_READELF" >&5
+$as_echo "$ac_ct_READELF" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+ if test "x$ac_ct_READELF" = x; then
+ READELF=":"
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ READELF=$ac_ct_READELF
+ fi
+else
+ READELF="$ac_cv_prog_READELF"
+fi
+
+
+
+
+# Hack to ensure that INSTALL won't be set to "../" with autoconf 2.13. */
+ac_given_INSTALL=$INSTALL
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5
+$as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; }
+ # Check whether --enable-maintainer-mode was given.
+if test "${enable_maintainer_mode+set}" = set; then :
+ enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval
+else
+ USE_MAINTAINER_MODE=no
+fi
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_MAINTAINER_MODE" >&5
+$as_echo "$USE_MAINTAINER_MODE" >&6; }
+ if test $USE_MAINTAINER_MODE = yes; then
+ MAINTAINER_MODE_TRUE=
+ MAINTAINER_MODE_FALSE='#'
+else
+ MAINTAINER_MODE_TRUE='#'
+ MAINTAINER_MODE_FALSE=
+fi
+
+ MAINT=$MAINTAINER_MODE_TRUE
+
+
+# By default we simply use the C compiler to build assembly code.
+
+test "${CCAS+set}" = set || CCAS=$CC
+test "${CCASFLAGS+set}" = set || CCASFLAGS=$CFLAGS
+
+
+
+
+# We need AC_EXEEXT to keep automake happy in cygnus mode. However,
+# at least currently, we never actually build a program, so we never
+# need to use $(EXEEXT). Moreover, the test for EXEEXT normally
+# fails, because we are probably configuring with a cross compiler
+# which can't create executables. So we include AC_EXEEXT to keep
+# automake happy, but we don't execute it, since we don't care about
+# the result.
+if false; then
+
+ dummy_var=1
+fi
+
+. ${newlib_basedir}/configure.host
+
+newlib_cflags="${newlib_cflags} -fno-builtin"
+
+NEWLIB_CFLAGS=${newlib_cflags}
+
+
+NO_INCLUDE_LIST=${noinclude}
+
+
+LDFLAGS=${ldflags}
+
+
+ if test x${newlib_elix_level} = x0; then
+ ELIX_LEVEL_0_TRUE=
+ ELIX_LEVEL_0_FALSE='#'
+else
+ ELIX_LEVEL_0_TRUE='#'
+ ELIX_LEVEL_0_FALSE=
+fi
+
+ if test x${newlib_elix_level} = x1; then
+ ELIX_LEVEL_1_TRUE=
+ ELIX_LEVEL_1_FALSE='#'
+else
+ ELIX_LEVEL_1_TRUE='#'
+ ELIX_LEVEL_1_FALSE=
+fi
+
+ if test x${newlib_elix_level} = x2; then
+ ELIX_LEVEL_2_TRUE=
+ ELIX_LEVEL_2_FALSE='#'
+else
+ ELIX_LEVEL_2_TRUE='#'
+ ELIX_LEVEL_2_FALSE=
+fi
+
+ if test x${newlib_elix_level} = x3; then
+ ELIX_LEVEL_3_TRUE=
+ ELIX_LEVEL_3_FALSE='#'
+else
+ ELIX_LEVEL_3_TRUE='#'
+ ELIX_LEVEL_3_FALSE=
+fi
+
+ if test x${newlib_elix_level} = x4; then
+ ELIX_LEVEL_4_TRUE=
+ ELIX_LEVEL_4_FALSE='#'
+else
+ ELIX_LEVEL_4_TRUE='#'
+ ELIX_LEVEL_4_FALSE=
+fi
+
+
+ if test x${use_libtool} = xyes; then
+ USE_LIBTOOL_TRUE=
+ USE_LIBTOOL_FALSE='#'
+else
+ USE_LIBTOOL_TRUE='#'
+ USE_LIBTOOL_FALSE=
+fi
+
+
+# Hard-code OBJEXT. Normally it is set by AC_OBJEXT, but we
+# use oext, which is set in configure.host based on the target platform.
+OBJEXT=${oext}
+
+
+
+
+
+
+
+
+
+
+
+ac_config_files="$ac_config_files Makefile"
+
+cat >confcache <<\_ACEOF
+# This file is a shell script that caches the results of configure
+# tests run on this system so they can be shared between configure
+# scripts and configure runs, see configure's option --config-cache.
+# It is not useful on other systems. If it contains results you don't
+# want to keep, you may remove or edit it.
+#
+# config.status only pays attention to the cache file if you give it
+# the --recheck option to rerun configure.
+#
+# `ac_cv_env_foo' variables (set or unset) will be overridden when
+# loading this file, other *unset* `ac_cv_foo' will be assigned the
+# following values.
+
+_ACEOF
+
+# The following way of writing the cache mishandles newlines in values,
+# but we know of no workaround that is simple, portable, and efficient.
+# So, we kill variables containing newlines.
+# Ultrix sh set writes to stderr and can't be redirected directly,
+# and sets the high bit in the cache file unless we assign to the vars.
+(
+ for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
+ eval ac_val=\$$ac_var
+ case $ac_val in #(
+ *${as_nl}*)
+ case $ac_var in #(
+ *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
+$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
+ esac
+ case $ac_var in #(
+ _ | IFS | as_nl) ;; #(
+ BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
+ *) { eval $ac_var=; unset $ac_var;} ;;
+ esac ;;
+ esac
+ done
+
+ (set) 2>&1 |
+ case $as_nl`(ac_space=' '; set) 2>&1` in #(
+ *${as_nl}ac_space=\ *)
+ # `set' does not quote correctly, so add quotes: double-quote
+ # substitution turns \\\\ into \\, and sed turns \\ into \.
+ sed -n \
+ "s/'/'\\\\''/g;
+ s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
+ ;; #(
+ *)
+ # `set' quotes correctly as required by POSIX, so do not add quotes.
+ sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
+ ;;
+ esac |
+ sort
+) |
+ sed '
+ /^ac_cv_env_/b end
+ t clear
+ :clear
+ s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
+ t end
+ s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
+ :end' >>confcache
+if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
+ if test -w "$cache_file"; then
+ if test "x$cache_file" != "x/dev/null"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
+$as_echo "$as_me: updating cache $cache_file" >&6;}
+ if test ! -f "$cache_file" || test -h "$cache_file"; then
+ cat confcache >"$cache_file"
+ else
+ case $cache_file in #(
+ */* | ?:*)
+ mv -f confcache "$cache_file"$$ &&
+ mv -f "$cache_file"$$ "$cache_file" ;; #(
+ *)
+ mv -f confcache "$cache_file" ;;
+ esac
+ fi
+ fi
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
+$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
+ fi
+fi
+rm -f confcache
+
+test "x$prefix" = xNONE && prefix=$ac_default_prefix
+# Let make expand exec_prefix.
+test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
+
+# Transform confdefs.h into DEFS.
+# Protect against shell expansion while executing Makefile rules.
+# Protect against Makefile macro expansion.
+#
+# If the first sed substitution is executed (which looks for macros that
+# take arguments), then branch to the quote section. Otherwise,
+# look for a macro that doesn't take arguments.
+ac_script='
+:mline
+/\\$/{
+ N
+ s,\\\n,,
+ b mline
+}
+t clear
+:clear
+s/^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*([^)]*)\)[ ]*\(.*\)/-D\1=\2/g
+t quote
+s/^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)/-D\1=\2/g
+t quote
+b any
+:quote
+s/[ `~#$^&*(){}\\|;'\''"<>?]/\\&/g
+s/\[/\\&/g
+s/\]/\\&/g
+s/\$/$$/g
+H
+:any
+${
+ g
+ s/^\n//
+ s/\n/ /g
+ p
+}
+'
+DEFS=`sed -n "$ac_script" confdefs.h`
+
+
+ac_libobjs=
+ac_ltlibobjs=
+U=
+for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
+ # 1. Remove the extension, and $U if already installed.
+ ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
+ ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
+ # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
+ # will be set to the directory where LIBOBJS objects are built.
+ as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
+ as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
+done
+LIBOBJS=$ac_libobjs
+
+LTLIBOBJS=$ac_ltlibobjs
+
+
+if test -z "${MAY_SUPPLY_SYSCALLS_TRUE}" && test -z "${MAY_SUPPLY_SYSCALLS_FALSE}"; then
+ as_fn_error $? "conditional \"MAY_SUPPLY_SYSCALLS\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+
+if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then
+ as_fn_error $? "conditional \"AMDEP\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
+ as_fn_error $? "conditional \"am__fastdepCC\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then
+ as_fn_error $? "conditional \"MAINTAINER_MODE\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${ELIX_LEVEL_0_TRUE}" && test -z "${ELIX_LEVEL_0_FALSE}"; then
+ as_fn_error $? "conditional \"ELIX_LEVEL_0\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${ELIX_LEVEL_1_TRUE}" && test -z "${ELIX_LEVEL_1_FALSE}"; then
+ as_fn_error $? "conditional \"ELIX_LEVEL_1\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${ELIX_LEVEL_2_TRUE}" && test -z "${ELIX_LEVEL_2_FALSE}"; then
+ as_fn_error $? "conditional \"ELIX_LEVEL_2\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${ELIX_LEVEL_3_TRUE}" && test -z "${ELIX_LEVEL_3_FALSE}"; then
+ as_fn_error $? "conditional \"ELIX_LEVEL_3\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${ELIX_LEVEL_4_TRUE}" && test -z "${ELIX_LEVEL_4_FALSE}"; then
+ as_fn_error $? "conditional \"ELIX_LEVEL_4\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${USE_LIBTOOL_TRUE}" && test -z "${USE_LIBTOOL_FALSE}"; then
+ as_fn_error $? "conditional \"USE_LIBTOOL\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+
+: "${CONFIG_STATUS=./config.status}"
+ac_write_fail=0
+ac_clean_files_save=$ac_clean_files
+ac_clean_files="$ac_clean_files $CONFIG_STATUS"
+{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
+$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
+as_write_fail=0
+cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
+#! $SHELL
+# Generated by $as_me.
+# Run this file to recreate the current configuration.
+# Compiler output produced by configure, useful for debugging
+# configure, is in config.log if it exists.
+
+debug=false
+ac_cs_recheck=false
+ac_cs_silent=false
+
+SHELL=\${CONFIG_SHELL-$SHELL}
+export SHELL
+_ASEOF
+cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
+## -------------------- ##
+## M4sh Initialization. ##
+## -------------------- ##
+
+# Be more Bourne compatible
+DUALCASE=1; export DUALCASE # for MKS sh
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
+ emulate sh
+ NULLCMD=:
+ # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
+ # is contrary to our usage. Disable this feature.
+ alias -g '${1+"$@"}'='"$@"'
+ setopt NO_GLOB_SUBST
+else
+ case `(set -o) 2>/dev/null` in #(
+ *posix*) :
+ set -o posix ;; #(
+ *) :
+ ;;
+esac
+fi
+
+
+as_nl='
+'
+export as_nl
+# Printing a long string crashes Solaris 7 /usr/bin/printf.
+as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
+as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
+as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
+# Prefer a ksh shell builtin over an external printf program on Solaris,
+# but without wasting forks for bash or zsh.
+if test -z "$BASH_VERSION$ZSH_VERSION" \
+ && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
+ as_echo='print -r --'
+ as_echo_n='print -rn --'
+elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
+ as_echo='printf %s\n'
+ as_echo_n='printf %s'
+else
+ if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
+ as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
+ as_echo_n='/usr/ucb/echo -n'
+ else
+ as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
+ as_echo_n_body='eval
+ arg=$1;
+ case $arg in #(
+ *"$as_nl"*)
+ expr "X$arg" : "X\\(.*\\)$as_nl";
+ arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
+ esac;
+ expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
+ '
+ export as_echo_n_body
+ as_echo_n='sh -c $as_echo_n_body as_echo'
+ fi
+ export as_echo_body
+ as_echo='sh -c $as_echo_body as_echo'
+fi
+
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+ PATH_SEPARATOR=:
+ (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
+ (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
+ PATH_SEPARATOR=';'
+ }
+fi
+
+
+# IFS
+# We need space, tab and new line, in precisely that order. Quoting is
+# there to prevent editors from complaining about space-tab.
+# (If _AS_PATH_WALK were called with IFS unset, it would disable word
+# splitting by setting IFS to empty value.)
+IFS=" "" $as_nl"
+
+# Find who we are. Look in the path if we contain no directory separator.
+as_myself=
+case $0 in #((
+ *[\\/]* ) as_myself=$0 ;;
+ *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
+ done
+IFS=$as_save_IFS
+
+ ;;
+esac
+# We did not find ourselves, most probably we were run as `sh COMMAND'
+# in which case we are not to be found in the path.
+if test "x$as_myself" = x; then
+ as_myself=$0
+fi
+if test ! -f "$as_myself"; then
+ $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
+ exit 1
+fi
+
+# Unset variables that we do not need and which cause bugs (e.g. in
+# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
+# suppresses any "Segmentation fault" message there. '((' could
+# trigger a bug in pdksh 5.2.14.
+for as_var in BASH_ENV ENV MAIL MAILPATH
+do eval test x\${$as_var+set} = xset \
+ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
+done
+PS1='$ '
+PS2='> '
+PS4='+ '
+
+# NLS nuisances.
+LC_ALL=C
+export LC_ALL
+LANGUAGE=C
+export LANGUAGE
+
+# CDPATH.
+(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
+
+
+# as_fn_error STATUS ERROR [LINENO LOG_FD]
+# ----------------------------------------
+# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
+# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
+# script with STATUS, using 1 if that was 0.
+as_fn_error ()
+{
+ as_status=$1; test $as_status -eq 0 && as_status=1
+ if test "$4"; then
+ as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
+ fi
+ $as_echo "$as_me: error: $2" >&2
+ as_fn_exit $as_status
+} # as_fn_error
+
+
+# as_fn_set_status STATUS
+# -----------------------
+# Set $? to STATUS, without forking.
+as_fn_set_status ()
+{
+ return $1
+} # as_fn_set_status
+
+# as_fn_exit STATUS
+# -----------------
+# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
+as_fn_exit ()
+{
+ set +e
+ as_fn_set_status $1
+ exit $1
+} # as_fn_exit
+
+# as_fn_unset VAR
+# ---------------
+# Portably unset VAR.
+as_fn_unset ()
+{
+ { eval $1=; unset $1;}
+}
+as_unset=as_fn_unset
+# as_fn_append VAR VALUE
+# ----------------------
+# Append the text in VALUE to the end of the definition contained in VAR. Take
+# advantage of any shell optimizations that allow amortized linear growth over
+# repeated appends, instead of the typical quadratic growth present in naive
+# implementations.
+if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
+ eval 'as_fn_append ()
+ {
+ eval $1+=\$2
+ }'
+else
+ as_fn_append ()
+ {
+ eval $1=\$$1\$2
+ }
+fi # as_fn_append
+
+# as_fn_arith ARG...
+# ------------------
+# Perform arithmetic evaluation on the ARGs, and store the result in the
+# global $as_val. Take advantage of shells that can avoid forks. The arguments
+# must be portable across $(()) and expr.
+if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
+ eval 'as_fn_arith ()
+ {
+ as_val=$(( $* ))
+ }'
+else
+ as_fn_arith ()
+ {
+ as_val=`expr "$@" || test $? -eq 1`
+ }
+fi # as_fn_arith
+
+
+if expr a : '\(a\)' >/dev/null 2>&1 &&
+ test "X`expr 00001 : '.*\(...\)'`" = X001; then
+ as_expr=expr
+else
+ as_expr=false
+fi
+
+if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
+ as_basename=basename
+else
+ as_basename=false
+fi
+
+if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
+ as_dirname=dirname
+else
+ as_dirname=false
+fi
+
+as_me=`$as_basename -- "$0" ||
+$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
+ X"$0" : 'X\(//\)$' \| \
+ X"$0" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X/"$0" |
+ sed '/^.*\/\([^/][^/]*\)\/*$/{
+ s//\1/
+ q
+ }
+ /^X\/\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\/\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+
+# Avoid depending upon Character Ranges.
+as_cr_letters='abcdefghijklmnopqrstuvwxyz'
+as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
+as_cr_Letters=$as_cr_letters$as_cr_LETTERS
+as_cr_digits='0123456789'
+as_cr_alnum=$as_cr_Letters$as_cr_digits
+
+ECHO_C= ECHO_N= ECHO_T=
+case `echo -n x` in #(((((
+-n*)
+ case `echo 'xy\c'` in
+ *c*) ECHO_T=' ';; # ECHO_T is single tab character.
+ xy) ECHO_C='\c';;
+ *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
+ ECHO_T=' ';;
+ esac;;
+*)
+ ECHO_N='-n';;
+esac
+
+rm -f conf$$ conf$$.exe conf$$.file
+if test -d conf$$.dir; then
+ rm -f conf$$.dir/conf$$.file
+else
+ rm -f conf$$.dir
+ mkdir conf$$.dir 2>/dev/null
+fi
+if (echo >conf$$.file) 2>/dev/null; then
+ if ln -s conf$$.file conf$$ 2>/dev/null; then
+ as_ln_s='ln -s'
+ # ... but there are two gotchas:
+ # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
+ # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
+ # In both cases, we have to default to `cp -p'.
+ ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
+ as_ln_s='cp -p'
+ elif ln conf$$.file conf$$ 2>/dev/null; then
+ as_ln_s=ln
+ else
+ as_ln_s='cp -p'
+ fi
+else
+ as_ln_s='cp -p'
+fi
+rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
+rmdir conf$$.dir 2>/dev/null
+
+
+# as_fn_mkdir_p
+# -------------
+# Create "$as_dir" as a directory, including parents if necessary.
+as_fn_mkdir_p ()
+{
+
+ case $as_dir in #(
+ -*) as_dir=./$as_dir;;
+ esac
+ test -d "$as_dir" || eval $as_mkdir_p || {
+ as_dirs=
+ while :; do
+ case $as_dir in #(
+ *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
+ *) as_qdir=$as_dir;;
+ esac
+ as_dirs="'$as_qdir' $as_dirs"
+ as_dir=`$as_dirname -- "$as_dir" ||
+$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$as_dir" : 'X\(//\)[^/]' \| \
+ X"$as_dir" : 'X\(//\)$' \| \
+ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$as_dir" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)[^/].*/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+ test -d "$as_dir" && break
+ done
+ test -z "$as_dirs" || eval "mkdir $as_dirs"
+ } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
+
+
+} # as_fn_mkdir_p
+if mkdir -p . 2>/dev/null; then
+ as_mkdir_p='mkdir -p "$as_dir"'
+else
+ test -d ./-p && rmdir ./-p
+ as_mkdir_p=false
+fi
+
+if test -x / >/dev/null 2>&1; then
+ as_test_x='test -x'
+else
+ if ls -dL / >/dev/null 2>&1; then
+ as_ls_L_option=L
+ else
+ as_ls_L_option=
+ fi
+ as_test_x='
+ eval sh -c '\''
+ if test -d "$1"; then
+ test -d "$1/.";
+ else
+ case $1 in #(
+ -*)set "./$1";;
+ esac;
+ case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
+ ???[sx]*):;;*)false;;esac;fi
+ '\'' sh
+ '
+fi
+as_executable_p=$as_test_x
+
+# Sed expression to map a string onto a valid CPP name.
+as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
+
+# Sed expression to map a string onto a valid variable name.
+as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
+
+
+exec 6>&1
+## ----------------------------------- ##
+## Main body of $CONFIG_STATUS script. ##
+## ----------------------------------- ##
+_ASEOF
+test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+# Save the log message, to keep $0 and so on meaningful, and to
+# report actual input values of CONFIG_FILES etc. instead of their
+# values after options handling.
+ac_log="
+This file was extended by newlib $as_me 2.4.0, which was
+generated by GNU Autoconf 2.68. Invocation command line was
+
+ CONFIG_FILES = $CONFIG_FILES
+ CONFIG_HEADERS = $CONFIG_HEADERS
+ CONFIG_LINKS = $CONFIG_LINKS
+ CONFIG_COMMANDS = $CONFIG_COMMANDS
+ $ $0 $@
+
+on `(hostname || uname -n) 2>/dev/null | sed 1q`
+"
+
+_ACEOF
+
+case $ac_config_files in *"
+"*) set x $ac_config_files; shift; ac_config_files=$*;;
+esac
+
+
+
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+# Files that config.status was made for.
+config_files="$ac_config_files"
+config_commands="$ac_config_commands"
+
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+ac_cs_usage="\
+\`$as_me' instantiates files and other configuration actions
+from templates according to the current configuration. Unless the files
+and actions are specified as TAGs, all are instantiated by default.
+
+Usage: $0 [OPTION]... [TAG]...
+
+ -h, --help print this help, then exit
+ -V, --version print version number and configuration settings, then exit
+ --config print configuration, then exit
+ -q, --quiet, --silent
+ do not print progress messages
+ -d, --debug don't remove temporary files
+ --recheck update $as_me by reconfiguring in the same conditions
+ --file=FILE[:TEMPLATE]
+ instantiate the configuration file FILE
+
+Configuration files:
+$config_files
+
+Configuration commands:
+$config_commands
+
+Report bugs to the package provider."
+
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
+ac_cs_version="\\
+newlib config.status 2.4.0
+configured by $0, generated by GNU Autoconf 2.68,
+ with options \\"\$ac_cs_config\\"
+
+Copyright (C) 2010 Free Software Foundation, Inc.
+This config.status script is free software; the Free Software Foundation
+gives unlimited permission to copy, distribute and modify it."
+
+ac_pwd='$ac_pwd'
+srcdir='$srcdir'
+INSTALL='$INSTALL'
+MKDIR_P='$MKDIR_P'
+AWK='$AWK'
+test -n "\$AWK" || AWK=awk
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+# The default lists apply if the user does not specify any file.
+ac_need_defaults=:
+while test $# != 0
+do
+ case $1 in
+ --*=?*)
+ ac_option=`expr "X$1" : 'X\([^=]*\)='`
+ ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
+ ac_shift=:
+ ;;
+ --*=)
+ ac_option=`expr "X$1" : 'X\([^=]*\)='`
+ ac_optarg=
+ ac_shift=:
+ ;;
+ *)
+ ac_option=$1
+ ac_optarg=$2
+ ac_shift=shift
+ ;;
+ esac
+
+ case $ac_option in
+ # Handling of the options.
+ -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
+ ac_cs_recheck=: ;;
+ --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
+ $as_echo "$ac_cs_version"; exit ;;
+ --config | --confi | --conf | --con | --co | --c )
+ $as_echo "$ac_cs_config"; exit ;;
+ --debug | --debu | --deb | --de | --d | -d )
+ debug=: ;;
+ --file | --fil | --fi | --f )
+ $ac_shift
+ case $ac_optarg in
+ *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
+ '') as_fn_error $? "missing file argument" ;;
+ esac
+ as_fn_append CONFIG_FILES " '$ac_optarg'"
+ ac_need_defaults=false;;
+ --he | --h | --help | --hel | -h )
+ $as_echo "$ac_cs_usage"; exit ;;
+ -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+ | -silent | --silent | --silen | --sile | --sil | --si | --s)
+ ac_cs_silent=: ;;
+
+ # This is an error.
+ -*) as_fn_error $? "unrecognized option: \`$1'
+Try \`$0 --help' for more information." ;;
+
+ *) as_fn_append ac_config_targets " $1"
+ ac_need_defaults=false ;;
+
+ esac
+ shift
+done
+
+ac_configure_extra_args=
+
+if $ac_cs_silent; then
+ exec 6>/dev/null
+ ac_configure_extra_args="$ac_configure_extra_args --silent"
+fi
+
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+if \$ac_cs_recheck; then
+ set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
+ shift
+ \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
+ CONFIG_SHELL='$SHELL'
+ export CONFIG_SHELL
+ exec "\$@"
+fi
+
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+exec 5>>config.log
+{
+ echo
+ sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
+## Running $as_me. ##
+_ASBOX
+ $as_echo "$ac_log"
+} >&5
+
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+#
+# INIT-COMMANDS
+#
+AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"
+
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+
+# Handling of arguments.
+for ac_config_target in $ac_config_targets
+do
+ case $ac_config_target in
+ "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
+ "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
+
+ *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
+ esac
+done
+
+
+# If the user did not use the arguments to specify the items to instantiate,
+# then the envvar interface is used. Set only those that are not.
+# We use the long form for the default assignment because of an extremely
+# bizarre bug on SunOS 4.1.3.
+if $ac_need_defaults; then
+ test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
+ test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
+fi
+
+# Have a temporary directory for convenience. Make it in the build tree
+# simply because there is no reason against having it here, and in addition,
+# creating and moving files from /tmp can sometimes cause problems.
+# Hook for its removal unless debugging.
+# Note that there is a small window in which the directory will not be cleaned:
+# after its creation but before its name has been assigned to `$tmp'.
+$debug ||
+{
+ tmp= ac_tmp=
+ trap 'exit_status=$?
+ : "${ac_tmp:=$tmp}"
+ { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
+' 0
+ trap 'as_fn_exit 1' 1 2 13 15
+}
+# Create a (secure) tmp directory for tmp files.
+
+{
+ tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
+ test -d "$tmp"
+} ||
+{
+ tmp=./conf$$-$RANDOM
+ (umask 077 && mkdir "$tmp")
+} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
+ac_tmp=$tmp
+
+# Set up the scripts for CONFIG_FILES section.
+# No need to generate them if there are no CONFIG_FILES.
+# This happens for instance with `./config.status config.h'.
+if test -n "$CONFIG_FILES"; then
+
+
+ac_cr=`echo X | tr X '\015'`
+# On cygwin, bash can eat \r inside `` if the user requested igncr.
+# But we know of no other shell where ac_cr would be empty at this
+# point, so we can use a bashism as a fallback.
+if test "x$ac_cr" = x; then
+ eval ac_cr=\$\'\\r\'
+fi
+ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
+if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
+ ac_cs_awk_cr='\\r'
+else
+ ac_cs_awk_cr=$ac_cr
+fi
+
+echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
+_ACEOF
+
+
+{
+ echo "cat >conf$$subs.awk <<_ACEOF" &&
+ echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
+ echo "_ACEOF"
+} >conf$$subs.sh ||
+ as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
+ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
+ac_delim='%!_!# '
+for ac_last_try in false false false false false :; do
+ . ./conf$$subs.sh ||
+ as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
+
+ ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
+ if test $ac_delim_n = $ac_delim_num; then
+ break
+ elif $ac_last_try; then
+ as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
+ else
+ ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
+ fi
+done
+rm -f conf$$subs.sh
+
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
+_ACEOF
+sed -n '
+h
+s/^/S["/; s/!.*/"]=/
+p
+g
+s/^[^!]*!//
+:repl
+t repl
+s/'"$ac_delim"'$//
+t delim
+:nl
+h
+s/\(.\{148\}\)..*/\1/
+t more1
+s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
+p
+n
+b repl
+:more1
+s/["\\]/\\&/g; s/^/"/; s/$/"\\/
+p
+g
+s/.\{148\}//
+t nl
+:delim
+h
+s/\(.\{148\}\)..*/\1/
+t more2
+s/["\\]/\\&/g; s/^/"/; s/$/"/
+p
+b
+:more2
+s/["\\]/\\&/g; s/^/"/; s/$/"\\/
+p
+g
+s/.\{148\}//
+t delim
+' <conf$$subs.awk | sed '
+/^[^""]/{
+ N
+ s/\n//
+}
+' >>$CONFIG_STATUS || ac_write_fail=1
+rm -f conf$$subs.awk
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+_ACAWK
+cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
+ for (key in S) S_is_set[key] = 1
+ FS = ""
+
+}
+{
+ line = $ 0
+ nfields = split(line, field, "@")
+ substed = 0
+ len = length(field[1])
+ for (i = 2; i < nfields; i++) {
+ key = field[i]
+ keylen = length(key)
+ if (S_is_set[key]) {
+ value = S[key]
+ line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
+ len += length(value) + length(field[++i])
+ substed = 1
+ } else
+ len += 1 + keylen
+ }
+
+ print line
+}
+
+_ACAWK
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
+ sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
+else
+ cat
+fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
+ || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
+_ACEOF
+
+# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
+# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
+# trailing colons and then remove the whole line if VPATH becomes empty
+# (actually we leave an empty line to preserve line numbers).
+if test "x$srcdir" = x.; then
+ ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
+h
+s///
+s/^/:/
+s/[ ]*$/:/
+s/:\$(srcdir):/:/g
+s/:\${srcdir}:/:/g
+s/:@srcdir@:/:/g
+s/^:*//
+s/:*$//
+x
+s/\(=[ ]*\).*/\1/
+G
+s/\n//
+s/^[^=]*=[ ]*$//
+}'
+fi
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+fi # test -n "$CONFIG_FILES"
+
+
+eval set X " :F $CONFIG_FILES :C $CONFIG_COMMANDS"
+shift
+for ac_tag
+do
+ case $ac_tag in
+ :[FHLC]) ac_mode=$ac_tag; continue;;
+ esac
+ case $ac_mode$ac_tag in
+ :[FHL]*:*);;
+ :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
+ :[FH]-) ac_tag=-:-;;
+ :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
+ esac
+ ac_save_IFS=$IFS
+ IFS=:
+ set x $ac_tag
+ IFS=$ac_save_IFS
+ shift
+ ac_file=$1
+ shift
+
+ case $ac_mode in
+ :L) ac_source=$1;;
+ :[FH])
+ ac_file_inputs=
+ for ac_f
+ do
+ case $ac_f in
+ -) ac_f="$ac_tmp/stdin";;
+ *) # Look for the file first in the build tree, then in the source tree
+ # (if the path is not absolute). The absolute path cannot be DOS-style,
+ # because $ac_f cannot contain `:'.
+ test -f "$ac_f" ||
+ case $ac_f in
+ [\\/$]*) false;;
+ *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
+ esac ||
+ as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
+ esac
+ case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
+ as_fn_append ac_file_inputs " '$ac_f'"
+ done
+
+ # Let's still pretend it is `configure' which instantiates (i.e., don't
+ # use $as_me), people would be surprised to read:
+ # /* config.h. Generated by config.status. */
+ configure_input='Generated from '`
+ $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
+ `' by configure.'
+ if test x"$ac_file" != x-; then
+ configure_input="$ac_file. $configure_input"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
+$as_echo "$as_me: creating $ac_file" >&6;}
+ fi
+ # Neutralize special characters interpreted by sed in replacement strings.
+ case $configure_input in #(
+ *\&* | *\|* | *\\* )
+ ac_sed_conf_input=`$as_echo "$configure_input" |
+ sed 's/[\\\\&|]/\\\\&/g'`;; #(
+ *) ac_sed_conf_input=$configure_input;;
+ esac
+
+ case $ac_tag in
+ *:-:* | *:-) cat >"$ac_tmp/stdin" \
+ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
+ esac
+ ;;
+ esac
+
+ ac_dir=`$as_dirname -- "$ac_file" ||
+$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$ac_file" : 'X\(//\)[^/]' \| \
+ X"$ac_file" : 'X\(//\)$' \| \
+ X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$ac_file" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)[^/].*/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+ as_dir="$ac_dir"; as_fn_mkdir_p
+ ac_builddir=.
+
+case "$ac_dir" in
+.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
+*)
+ ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
+ # A ".." for each directory in $ac_dir_suffix.
+ ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
+ case $ac_top_builddir_sub in
+ "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
+ *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
+ esac ;;
+esac
+ac_abs_top_builddir=$ac_pwd
+ac_abs_builddir=$ac_pwd$ac_dir_suffix
+# for backward compatibility:
+ac_top_builddir=$ac_top_build_prefix
+
+case $srcdir in
+ .) # We are building in place.
+ ac_srcdir=.
+ ac_top_srcdir=$ac_top_builddir_sub
+ ac_abs_top_srcdir=$ac_pwd ;;
+ [\\/]* | ?:[\\/]* ) # Absolute name.
+ ac_srcdir=$srcdir$ac_dir_suffix;
+ ac_top_srcdir=$srcdir
+ ac_abs_top_srcdir=$srcdir ;;
+ *) # Relative name.
+ ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
+ ac_top_srcdir=$ac_top_build_prefix$srcdir
+ ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
+esac
+ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
+
+
+ case $ac_mode in
+ :F)
+ #
+ # CONFIG_FILE
+ #
+
+ case $INSTALL in
+ [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
+ *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
+ esac
+ ac_MKDIR_P=$MKDIR_P
+ case $MKDIR_P in
+ [\\/$]* | ?:[\\/]* ) ;;
+ */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
+ esac
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+# If the template does not know about datarootdir, expand it.
+# FIXME: This hack should be removed a few years after 2.60.
+ac_datarootdir_hack=; ac_datarootdir_seen=
+ac_sed_dataroot='
+/datarootdir/ {
+ p
+ q
+}
+/@datadir@/p
+/@docdir@/p
+/@infodir@/p
+/@localedir@/p
+/@mandir@/p'
+case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
+*datarootdir*) ac_datarootdir_seen=yes;;
+*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
+$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+ ac_datarootdir_hack='
+ s&@datadir@&$datadir&g
+ s&@docdir@&$docdir&g
+ s&@infodir@&$infodir&g
+ s&@localedir@&$localedir&g
+ s&@mandir@&$mandir&g
+ s&\\\${datarootdir}&$datarootdir&g' ;;
+esac
+_ACEOF
+
+# Neutralize VPATH when `$srcdir' = `.'.
+# Shell code in configure.ac might set extrasub.
+# FIXME: do we really want to maintain this feature?
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+ac_sed_extra="$ac_vpsub
+$extrasub
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+:t
+/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
+s|@configure_input@|$ac_sed_conf_input|;t t
+s&@top_builddir@&$ac_top_builddir_sub&;t t
+s&@top_build_prefix@&$ac_top_build_prefix&;t t
+s&@srcdir@&$ac_srcdir&;t t
+s&@abs_srcdir@&$ac_abs_srcdir&;t t
+s&@top_srcdir@&$ac_top_srcdir&;t t
+s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
+s&@builddir@&$ac_builddir&;t t
+s&@abs_builddir@&$ac_abs_builddir&;t t
+s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
+s&@INSTALL@&$ac_INSTALL&;t t
+s&@MKDIR_P@&$ac_MKDIR_P&;t t
+$ac_datarootdir_hack
+"
+eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
+ >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
+
+test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
+ { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
+ { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
+ "$ac_tmp/out"`; test -z "$ac_out"; } &&
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
+which seems to be undefined. Please make sure it is defined" >&5
+$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
+which seems to be undefined. Please make sure it is defined" >&2;}
+
+ rm -f "$ac_tmp/stdin"
+ case $ac_file in
+ -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
+ *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
+ esac \
+ || as_fn_error $? "could not create $ac_file" "$LINENO" 5
+ ;;
+
+
+ :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
+$as_echo "$as_me: executing $ac_file commands" >&6;}
+ ;;
+ esac
+
+
+ case $ac_file$ac_mode in
+ "depfiles":C) test x"$AMDEP_TRUE" != x"" || {
+ # Autoconf 2.62 quotes --file arguments for eval, but not when files
+ # are listed without --file. Let's play safe and only enable the eval
+ # if we detect the quoting.
+ case $CONFIG_FILES in
+ *\'*) eval set x "$CONFIG_FILES" ;;
+ *) set x $CONFIG_FILES ;;
+ esac
+ shift
+ for mf
+ do
+ # Strip MF so we end up with the name of the file.
+ mf=`echo "$mf" | sed -e 's/:.*$//'`
+ # Check whether this is an Automake generated Makefile or not.
+ # We used to match only the files named `Makefile.in', but
+ # some people rename them; so instead we look at the file content.
+ # Grep'ing the first line is not enough: some people post-process
+ # each Makefile.in and add a new line on top of each file to say so.
+ # Grep'ing the whole file is not good either: AIX grep has a line
+ # limit of 2048, but all sed's we know have understand at least 4000.
+ if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
+ dirpart=`$as_dirname -- "$mf" ||
+$as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$mf" : 'X\(//\)[^/]' \| \
+ X"$mf" : 'X\(//\)$' \| \
+ X"$mf" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$mf" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)[^/].*/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+ else
+ continue
+ fi
+ # Extract the definition of DEPDIR, am__include, and am__quote
+ # from the Makefile without running `make'.
+ DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
+ test -z "$DEPDIR" && continue
+ am__include=`sed -n 's/^am__include = //p' < "$mf"`
+ test -z "am__include" && continue
+ am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
+ # When using ansi2knr, U may be empty or an underscore; expand it
+ U=`sed -n 's/^U = //p' < "$mf"`
+ # Find all dependency output files, they are included files with
+ # $(DEPDIR) in their names. We invoke sed twice because it is the
+ # simplest approach to changing $(DEPDIR) to its actual value in the
+ # expansion.
+ for file in `sed -n "
+ s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
+ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
+ # Make sure the directory exists.
+ test -f "$dirpart/$file" && continue
+ fdir=`$as_dirname -- "$file" ||
+$as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$file" : 'X\(//\)[^/]' \| \
+ X"$file" : 'X\(//\)$' \| \
+ X"$file" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$file" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)[^/].*/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+ as_dir=$dirpart/$fdir; as_fn_mkdir_p
+ # echo "creating $dirpart/$file"
+ echo '# dummy' > "$dirpart/$file"
+ done
+ done
+}
+ ;;
+
+ esac
+done # for ac_tag
+
+
+as_fn_exit 0
+_ACEOF
+ac_clean_files=$ac_clean_files_save
+
+test $ac_write_fail = 0 ||
+ as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
+
+
+# configure is writing to config.log, and then calls config.status.
+# config.status does its own redirection, appending to config.log.
+# Unfortunately, on DOS this fails, as config.log is still kept open
+# by configure, so config.status won't be able to write to it; its
+# output is simply discarded. So we exec the FD to /dev/null,
+# effectively closing config.log, so it can be properly (re)opened and
+# appended to by config.status. When coming back to configure, we
+# need to make the FD available again.
+if test "$no_create" != yes; then
+ ac_cs_success=:
+ ac_config_status_args=
+ test "$silent" = yes &&
+ ac_config_status_args="$ac_config_status_args --quiet"
+ exec 5>/dev/null
+ $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
+ exec 5>>config.log
+ # Use ||, not &&, to avoid exiting from the if with $? = 1, which
+ # would make configure fail if this is the last instruction.
+ $ac_cs_success || as_fn_exit 1
+fi
+if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
+$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
+fi
+
diff --git a/newlib/libc/machine/visium/configure.in b/newlib/libc/machine/visium/configure.in
new file mode 100644
index 000000000..808804c10
--- /dev/null
+++ b/newlib/libc/machine/visium/configure.in
@@ -0,0 +1,14 @@
+dnl This is the newlib/libc/machine/visium configure.in file.
+dnl Process this file with autoconf to produce a configure script.
+
+AC_PREREQ(2.59)
+AC_INIT([newlib],[NEWLIB_VERSION])
+AC_CONFIG_SRCDIR([Makefile.am])
+
+dnl Can't be done in NEWLIB_CONFIGURE because that confuses automake.
+AC_CONFIG_AUX_DIR(../../../..)
+
+NEWLIB_CONFIGURE(../../..)
+
+AC_CONFIG_FILES([Makefile])
+AC_OUTPUT
diff --git a/newlib/libc/machine/visium/memcpy.c b/newlib/libc/machine/visium/memcpy.c
new file mode 100644
index 000000000..c5110064d
--- /dev/null
+++ b/newlib/libc/machine/visium/memcpy.c
@@ -0,0 +1,874 @@
+/* memcpy for the Visium processor.
+
+ Copyright (c) 2015 Rolls-Royce Controls and Data Services Limited.
+ 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 Rolls-Royce Controls and Data Services Limited 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. */
+
+/* This file must be kept in sync with libgcc/config/visium/memcpy.c */
+
+#include <stddef.h>
+#include "memcpy.h"
+
+#define INST_BARRIER __asm__ __volatile__ ("":::"memory");
+
+#define MOVE_32_OBJECTS(in,out) \
+do { \
+ INST_BARRIER \
+ m0 = in [0]; \
+ m1 = in [1]; \
+ m2 = in [2]; \
+ m3 = in [3]; \
+ out [0] = m0; \
+ out [1] = m1; \
+ out [2] = m2; \
+ out [3] = m3; \
+ INST_BARRIER \
+ m0 = in [4]; \
+ m1 = in [5]; \
+ m2 = in [6]; \
+ m3 = in [7]; \
+ out [4] = m0; \
+ out [5] = m1; \
+ out [6] = m2; \
+ out [7] = m3; \
+ INST_BARRIER \
+ m0 = in [8]; \
+ m1 = in [9]; \
+ m2 = in [10]; \
+ m3 = in [11]; \
+ out [8] = m0; \
+ out [9] = m1; \
+ out [10] = m2; \
+ out [11] = m3; \
+ INST_BARRIER \
+ m0 = in [12]; \
+ m1 = in [13]; \
+ m2 = in [14]; \
+ m3 = in [15]; \
+ out [12] = m0; \
+ out [13] = m1; \
+ out [14] = m2; \
+ out [15] = m3; \
+ INST_BARRIER \
+ m0 = in [16]; \
+ m1 = in [17]; \
+ m2 = in [18]; \
+ m3 = in [19]; \
+ out [16] = m0; \
+ out [17] = m1; \
+ out [18] = m2; \
+ out [19] = m3; \
+ INST_BARRIER \
+ m0 = in [20]; \
+ m1 = in [21]; \
+ m2 = in [22]; \
+ m3 = in [23]; \
+ out [20] = m0; \
+ out [21] = m1; \
+ out [22] = m2; \
+ out [23] = m3; \
+ INST_BARRIER \
+ m0 = in [24]; \
+ m1 = in [25]; \
+ m2 = in [26]; \
+ m3 = in [27]; \
+ out [24] = m0; \
+ out [25] = m1; \
+ out [26] = m2; \
+ out [27] = m3; \
+ INST_BARRIER \
+ m0 = in [28]; \
+ m1 = in [29]; \
+ m2 = in [30]; \
+ m3 = in [31]; \
+ out [28] = m0; \
+ out [29] = m1; \
+ out [30] = m2; \
+ out [31] = m3; \
+ INST_BARRIER \
+ in += 32; \
+ out += 32; \
+} while(0)
+
+#define MOVE_16_OBJECTS(in,out) \
+do { \
+ INST_BARRIER \
+ m0 = in [0]; \
+ m1 = in [1]; \
+ m2 = in [2]; \
+ m3 = in [3]; \
+ out [0] = m0; \
+ out [1] = m1; \
+ out [2] = m2; \
+ out [3] = m3; \
+ INST_BARRIER \
+ m0 = in [4]; \
+ m1 = in [5]; \
+ m2 = in [6]; \
+ m3 = in [7]; \
+ out [4] = m0; \
+ out [5] = m1; \
+ out [6] = m2; \
+ out [7] = m3; \
+ INST_BARRIER \
+ m0 = in [8]; \
+ m1 = in [9]; \
+ m2 = in [10]; \
+ m3 = in [11]; \
+ out [8] = m0; \
+ out [9] = m1; \
+ out [10] = m2; \
+ out [11] = m3; \
+ INST_BARRIER \
+ m0 = in [12]; \
+ m1 = in [13]; \
+ m2 = in [14]; \
+ m3 = in [15]; \
+ out [12] = m0; \
+ out [13] = m1; \
+ out [14] = m2; \
+ out [15] = m3; \
+ INST_BARRIER \
+ in += 16; \
+ out += 16; \
+} while(0)
+
+#define MOVE_12_OBJECTS(in,out) \
+do { \
+ INST_BARRIER \
+ m0 = in [0]; \
+ m1 = in [1]; \
+ m2 = in [2]; \
+ m3 = in [3]; \
+ out [0] = m0; \
+ out [1] = m1; \
+ out [2] = m2; \
+ out [3] = m3; \
+ INST_BARRIER \
+ m0 = in [4]; \
+ m1 = in [5]; \
+ m2 = in [6]; \
+ m3 = in [7]; \
+ out [4] = m0; \
+ out [5] = m1; \
+ out [6] = m2; \
+ out [7] = m3; \
+ INST_BARRIER \
+ m0 = in [8]; \
+ m1 = in [9]; \
+ m2 = in [10]; \
+ m3 = in [11]; \
+ out [8] = m0; \
+ out [9] = m1; \
+ out [10] = m2; \
+ out [11] = m3; \
+ INST_BARRIER \
+ in += 12; \
+ out += 12; \
+} while(0)
+
+#define MOVE_11_OBJECTS(in,out) \
+do { \
+ INST_BARRIER \
+ m0 = in [0]; \
+ m1 = in [1]; \
+ m2 = in [2]; \
+ m3 = in [3]; \
+ out [0] = m0; \
+ out [1] = m1; \
+ out [2] = m2; \
+ out [3] = m3; \
+ INST_BARRIER \
+ m0 = in [4]; \
+ m1 = in [5]; \
+ m2 = in [6]; \
+ m3 = in [7]; \
+ out [4] = m0; \
+ out [5] = m1; \
+ out [6] = m2; \
+ out [7] = m3; \
+ INST_BARRIER \
+ m0 = in [8]; \
+ m1 = in [9]; \
+ m2 = in [10]; \
+ out [8] = m0; \
+ out [9] = m1; \
+ out [10] = m2; \
+ INST_BARRIER \
+ in += 11; \
+ out += 11; \
+} while(0)
+
+#define MOVE_10_OBJECTS(in,out) \
+do { \
+ INST_BARRIER \
+ m0 = in [0]; \
+ m1 = in [1]; \
+ m2 = in [2]; \
+ m3 = in [3]; \
+ out [0] = m0; \
+ out [1] = m1; \
+ out [2] = m2; \
+ out [3] = m3; \
+ INST_BARRIER \
+ m0 = in [4]; \
+ m1 = in [5]; \
+ m2 = in [6]; \
+ m3 = in [7]; \
+ out [4] = m0; \
+ m0 = in [8]; \
+ out [5] = m1; \
+ m1 = in [9]; \
+ out [6] = m2; \
+ out [7] = m3; \
+ out [8] = m0; \
+ out [9] = m1; \
+ INST_BARRIER \
+ in += 10; \
+ out += 10; \
+} while(0)
+
+#define MOVE_9_OBJECTS(in,out) \
+do { \
+ INST_BARRIER \
+ m0 = in [0]; \
+ m1 = in [1]; \
+ m2 = in [2]; \
+ m3 = in [3]; \
+ out [0] = m0; \
+ out [1] = m1; \
+ out [2] = m2; \
+ out [3] = m3; \
+ INST_BARRIER \
+ m0 = in [4]; \
+ m1 = in [5]; \
+ m2 = in [6]; \
+ m3 = in [7]; \
+ out [4] = m0; \
+ out [5] = m1; \
+ out [6] = m2; \
+ out [7] = m3; \
+ INST_BARRIER \
+ m0 = in [8]; \
+ out [8] = m0; \
+ in += 9; \
+ out += 9; \
+} while(0)
+
+#define MOVE_8_OBJECTS(in,out) \
+do { \
+ INST_BARRIER \
+ m0 = in [0]; \
+ m1 = in [1]; \
+ m2 = in [2]; \
+ m3 = in [3]; \
+ out [0] = m0; \
+ out [1] = m1; \
+ out [2] = m2; \
+ out [3] = m3; \
+ INST_BARRIER \
+ m0 = in [4]; \
+ m1 = in [5]; \
+ m2 = in [6]; \
+ m3 = in [7]; \
+ out [4] = m0; \
+ out [5] = m1; \
+ out [6] = m2; \
+ out [7] = m3; \
+ INST_BARRIER \
+ in += 8; \
+ out += 8; \
+} while(0)
+
+#define MOVE_7_OBJECTS(in,out) \
+do { \
+ INST_BARRIER \
+ m0 = in [0]; \
+ m1 = in [1]; \
+ m2 = in [2]; \
+ m3 = in [3]; \
+ out [0] = m0; \
+ out [1] = m1; \
+ out [2] = m2; \
+ out [3] = m3; \
+ INST_BARRIER \
+ m0 = in [4]; \
+ m1 = in [5]; \
+ m2 = in [6]; \
+ out [4] = m0; \
+ out [5] = m1; \
+ out [6] = m2; \
+ INST_BARRIER \
+ in += 7; \
+ out += 7; \
+} while(0)
+
+#define MOVE_6_OBJECTS(in,out) \
+do { \
+ INST_BARRIER \
+ m0 = in [0]; \
+ m1 = in [1]; \
+ m2 = in [2]; \
+ m3 = in [3]; \
+ out [0] = m0; \
+ INST_BARRIER \
+ m0 = in [4]; \
+ out [1] = m1; \
+ INST_BARRIER \
+ m1 = in [5]; \
+ out [2] = m2; \
+ out [3] = m3; \
+ out [4] = m0; \
+ out [5] = m1; \
+ INST_BARRIER \
+ in += 6; \
+ out += 6; \
+} while(0)
+
+#define MOVE_5_OBJECTS(in,out) \
+do { \
+ INST_BARRIER \
+ m0 = in [0]; \
+ m1 = in [1]; \
+ m2 = in [2]; \
+ m3 = in [3]; \
+ INST_BARRIER \
+ out [0] = m0; \
+ m0 = in [4]; \
+ INST_BARRIER \
+ out [1] = m1; \
+ out [2] = m2; \
+ out [3] = m3; \
+ out [4] = m0; \
+ INST_BARRIER \
+ in += 5; \
+ out += 5; \
+} while(0)
+
+#define MOVE_4_OBJECTS(in,out) \
+do { \
+ INST_BARRIER \
+ m0 = in [0]; \
+ m1 = in [1]; \
+ m2 = in [2]; \
+ m3 = in [3]; \
+ out [0] = m0; \
+ out [1] = m1; \
+ out [2] = m2; \
+ out [3] = m3; \
+ INST_BARRIER \
+ in += 4; \
+ out += 4; \
+} while(0)
+
+#define MOVE_3_OBJECTS(in,out) \
+do { \
+ INST_BARRIER \
+ m0 = in [0]; \
+ m1 = in [1]; \
+ m2 = in [2]; \
+ out [0] = m0; \
+ out [1] = m1; \
+ out [2] = m2; \
+ INST_BARRIER \
+ in += 3; \
+ out += 3; \
+} while(0)
+
+#define MOVE_2_OBJECTS(in,out) \
+do { \
+ INST_BARRIER \
+ m0 = in [0]; \
+ m1 = in [1]; \
+ out [0] = m0; \
+ out [1] = m1; \
+ INST_BARRIER \
+ in += 2; \
+ out += 2; \
+} while(0)
+
+#define MOVE_1_OBJECT(in,out) \
+do { \
+ INST_BARRIER \
+ m0 = in [0]; \
+ out [0] = m0; \
+ INST_BARRIER \
+ in += 1; \
+ out += 1; \
+} while(0)
+
+
+static inline void
+__int_memcpy (void *__restrict s1, const void *__restrict s2, size_t n)
+{
+ int value = n;
+ int loop_var;
+ const int *in = s2;
+ int *out = s1;
+ int count;
+ int m0,m1,m2,m3;
+
+ /* This code currently give a stall for any value with a 1->2 in the low 5
+ bits, i.e. 1,2, 33,34 ? not acceptable! */
+ switch (value & 0x1f)
+ {
+ case 0:
+ break;
+ case 1:
+ MOVE_1_OBJECT (in, out);
+ break;
+ case 2:
+ MOVE_2_OBJECTS (in, out);
+ break;
+ case 3:
+ MOVE_3_OBJECTS (in, out);
+ break;
+ case 4:
+ MOVE_4_OBJECTS (in, out);
+ break;
+ case 5:
+ MOVE_5_OBJECTS (in, out);
+ break;
+ case 6:
+ MOVE_6_OBJECTS (in, out);
+ break;
+ case 7:
+ MOVE_7_OBJECTS (in, out);
+ break;
+ case 8:
+ MOVE_8_OBJECTS (in, out);
+ break;
+ case 9:
+ MOVE_9_OBJECTS (in, out);
+ break;
+ case 10:
+ MOVE_10_OBJECTS (in, out);
+ break;
+ case 11:
+ MOVE_11_OBJECTS (in, out);
+ break;
+ case 12:
+ MOVE_12_OBJECTS (in, out);
+ break;
+ case 13:
+ MOVE_9_OBJECTS (in, out);
+ MOVE_4_OBJECTS (in, out);
+ break;
+ case 14:
+ MOVE_12_OBJECTS (in, out);
+ MOVE_2_OBJECTS (in, out);
+ break;
+ case 15:
+ MOVE_11_OBJECTS (in, out);
+ MOVE_4_OBJECTS (in, out);
+ break;
+ case 16:
+ MOVE_16_OBJECTS (in, out);
+ break;
+ case 17:
+ MOVE_11_OBJECTS (in, out);
+ MOVE_6_OBJECTS (in, out);
+ break;
+ case 18:
+ MOVE_9_OBJECTS (in, out);
+ MOVE_9_OBJECTS (in, out);
+ break;
+ case 19:
+ MOVE_16_OBJECTS (in, out);
+ MOVE_3_OBJECTS (in, out);
+ break;
+ case 20:
+ MOVE_16_OBJECTS (in, out);
+ MOVE_4_OBJECTS (in, out);
+ break;
+ case 21:
+ MOVE_16_OBJECTS (in, out);
+ MOVE_5_OBJECTS (in, out);
+ break;
+ case 22:
+ MOVE_16_OBJECTS (in, out);
+ MOVE_6_OBJECTS (in, out);
+ break;
+ case 23:
+ MOVE_16_OBJECTS (in, out);
+ MOVE_7_OBJECTS (in, out);
+ break;
+ case 24:
+ MOVE_16_OBJECTS (in, out);
+ MOVE_8_OBJECTS (in, out);
+ break;
+ case 25:
+ MOVE_16_OBJECTS (in, out);
+ MOVE_9_OBJECTS (in, out);
+ break;
+ case 26:
+ MOVE_16_OBJECTS (in, out);
+ MOVE_10_OBJECTS (in, out);
+ break;
+ case 27:
+ MOVE_16_OBJECTS (in, out);
+ MOVE_11_OBJECTS (in, out);
+ break;
+ case 28:
+ MOVE_16_OBJECTS (in, out);
+ MOVE_8_OBJECTS (in, out);
+ MOVE_4_OBJECTS (in, out);
+ break;
+ case 29:
+ MOVE_16_OBJECTS (in, out);
+ MOVE_9_OBJECTS (in, out);
+ MOVE_4_OBJECTS (in, out);
+ break;
+ case 30:
+ MOVE_16_OBJECTS (in, out);
+ MOVE_12_OBJECTS (in, out);
+ MOVE_2_OBJECTS (in, out);
+ break;
+ case 31:
+ MOVE_16_OBJECTS (in, out);
+ MOVE_11_OBJECTS (in, out);
+ MOVE_4_OBJECTS (in, out);
+ break;
+ }
+
+ /* This loop governs the asmptoptic behaviour of this algorithm, for long
+ word copies. */
+ count = value >> 5;
+ for (loop_var = 0; loop_var < count; loop_var++)
+ MOVE_32_OBJECTS (in, out);
+}
+
+static inline void
+__shrt_int_memcpy (void *__restrict s1, const void *__restrict s2, size_t n)
+{
+ int value = n;
+ int loop_var;
+ const short int *in = s2;
+ int short *out = s1;
+ int count;
+ int m0,m1,m2,m3;
+
+ /* This code currently give a stall for any value with a 1->2 in the low 5
+ bits, i.e. 1,2, 33,34 ? not acceptable! */
+ switch (value & 0x1f)
+ {
+ case 0:
+ break;
+ case 1:
+ MOVE_1_OBJECT (in, out);
+ break;
+ case 2:
+ MOVE_2_OBJECTS (in, out);
+ break;
+ case 3:
+ MOVE_3_OBJECTS (in, out);
+ break;
+ case 4:
+ MOVE_4_OBJECTS (in, out);
+ break;
+ case 5:
+ MOVE_5_OBJECTS (in, out);
+ break;
+ case 6:
+ MOVE_6_OBJECTS (in, out);
+ break;
+ case 7:
+ MOVE_7_OBJECTS (in, out);
+ break;
+ case 8:
+ MOVE_8_OBJECTS (in, out);
+ break;
+ case 9:
+ MOVE_9_OBJECTS (in, out);
+ break;
+ case 10:
+ MOVE_10_OBJECTS (in, out);
+ break;
+ case 11:
+ MOVE_11_OBJECTS (in, out);
+ break;
+ case 12:
+ MOVE_12_OBJECTS (in, out);
+ break;
+ case 13:
+ MOVE_9_OBJECTS (in, out);
+ MOVE_4_OBJECTS (in, out);
+ break;
+ case 14:
+ MOVE_12_OBJECTS (in, out);
+ MOVE_2_OBJECTS (in, out);
+ break;
+ case 15:
+ MOVE_11_OBJECTS (in, out);
+ MOVE_4_OBJECTS (in, out);
+ break;
+ case 16:
+ MOVE_16_OBJECTS (in, out);
+ break;
+ case 17:
+ MOVE_11_OBJECTS (in, out);
+ MOVE_6_OBJECTS (in, out);
+ break;
+ case 18:
+ MOVE_9_OBJECTS (in, out);
+ MOVE_9_OBJECTS (in, out);
+ break;
+ case 19:
+ MOVE_16_OBJECTS (in, out);
+ MOVE_3_OBJECTS (in, out);
+ break;
+ case 20:
+ MOVE_16_OBJECTS (in, out);
+ MOVE_4_OBJECTS (in, out);
+ break;
+ case 21:
+ MOVE_16_OBJECTS (in, out);
+ MOVE_5_OBJECTS (in, out);
+ break;
+ case 22:
+ MOVE_16_OBJECTS (in, out);
+ MOVE_6_OBJECTS (in, out);
+ break;
+ case 23:
+ MOVE_16_OBJECTS (in, out);
+ MOVE_7_OBJECTS (in, out);
+ break;
+ case 24:
+ MOVE_16_OBJECTS (in, out);
+ MOVE_8_OBJECTS (in, out);
+ break;
+ case 25:
+ MOVE_16_OBJECTS (in, out);
+ MOVE_9_OBJECTS (in, out);
+ break;
+ case 26:
+ MOVE_16_OBJECTS (in, out);
+ MOVE_10_OBJECTS (in, out);
+ break;
+ case 27:
+ MOVE_16_OBJECTS (in, out);
+ MOVE_11_OBJECTS (in, out);
+ break;
+ case 28:
+ MOVE_16_OBJECTS (in, out);
+ MOVE_8_OBJECTS (in, out);
+ MOVE_4_OBJECTS (in, out);
+ break;
+ case 29:
+ MOVE_16_OBJECTS (in, out);
+ MOVE_9_OBJECTS (in, out);
+ MOVE_4_OBJECTS (in, out);
+ break;
+ case 30:
+ MOVE_16_OBJECTS (in, out);
+ MOVE_12_OBJECTS (in, out);
+ MOVE_2_OBJECTS (in, out);
+ break;
+ case 31:
+ MOVE_16_OBJECTS (in, out);
+ MOVE_11_OBJECTS (in, out);
+ MOVE_4_OBJECTS (in, out);
+ break;
+ }
+
+ /* This loop governs the asmptoptic behaviour of this algorithm, for long
+ word copies. */
+ count = value >> 5;
+ for (loop_var = 0; loop_var < count; loop_var++)
+ MOVE_32_OBJECTS (in, out);
+}
+
+
+static inline void
+__byte_memcpy (void *__restrict s1, const void *__restrict s2, size_t n)
+{
+ int value = n;
+ int loop_var;
+ const char *in = s2;
+ char *out = s1;
+ int count;
+ int m0,m1,m2,m3;
+
+ /* This code currently give a stall for any value with a 1->2 in the low 5
+ bits, i.e. 1,2, 33,34 ? not acceptable! */
+ switch (value & 0x1f)
+ {
+ case 0:
+ break;
+ case 1:
+ MOVE_1_OBJECT (in, out);
+ break;
+ case 2:
+ MOVE_2_OBJECTS (in, out);
+ break;
+ case 3:
+ MOVE_3_OBJECTS (in, out);
+ break;
+ case 4:
+ MOVE_4_OBJECTS (in, out);
+ break;
+ case 5:
+ MOVE_5_OBJECTS (in, out);
+ break;
+ case 6:
+ MOVE_6_OBJECTS (in, out);
+ break;
+ case 7:
+ MOVE_7_OBJECTS (in, out);
+ break;
+ case 8:
+ MOVE_8_OBJECTS (in, out);
+ break;
+ case 9:
+ MOVE_9_OBJECTS (in, out);
+ break;
+ case 10:
+ MOVE_10_OBJECTS (in, out);
+ break;
+ case 11:
+ MOVE_11_OBJECTS (in, out);
+ break;
+ case 12:
+ MOVE_12_OBJECTS (in, out);
+ break;
+ case 13:
+ MOVE_9_OBJECTS (in, out);
+ MOVE_4_OBJECTS (in, out);
+ break;
+ case 14:
+ MOVE_12_OBJECTS (in, out);
+ MOVE_2_OBJECTS (in, out);
+ break;
+ case 15:
+ MOVE_11_OBJECTS (in, out);
+ MOVE_4_OBJECTS (in, out);
+ break;
+ case 16:
+ MOVE_16_OBJECTS (in, out);
+ break;
+ case 17:
+ MOVE_11_OBJECTS (in, out);
+ MOVE_6_OBJECTS (in, out);
+ break;
+ case 18:
+ MOVE_9_OBJECTS (in, out);
+ MOVE_9_OBJECTS (in, out);
+ break;
+ case 19:
+ MOVE_16_OBJECTS (in, out);
+ MOVE_3_OBJECTS (in, out);
+ break;
+ case 20:
+ MOVE_16_OBJECTS (in, out);
+ MOVE_4_OBJECTS (in, out);
+ break;
+ case 21:
+ MOVE_16_OBJECTS (in, out);
+ MOVE_5_OBJECTS (in, out);
+ break;
+ case 22:
+ MOVE_16_OBJECTS (in, out);
+ MOVE_6_OBJECTS (in, out);
+ break;
+ case 23:
+ MOVE_16_OBJECTS (in, out);
+ MOVE_7_OBJECTS (in, out);
+ break;
+ case 24:
+ MOVE_16_OBJECTS (in, out);
+ MOVE_8_OBJECTS (in, out);
+ break;
+ case 25:
+ MOVE_16_OBJECTS (in, out);
+ MOVE_9_OBJECTS (in, out);
+ break;
+ case 26:
+ MOVE_16_OBJECTS (in, out);
+ MOVE_10_OBJECTS (in, out);
+ break;
+ case 27:
+ MOVE_16_OBJECTS (in, out);
+ MOVE_11_OBJECTS (in, out);
+ break;
+ case 28:
+ MOVE_16_OBJECTS (in, out);
+ MOVE_8_OBJECTS (in, out);
+ MOVE_4_OBJECTS (in, out);
+ break;
+ case 29:
+ MOVE_16_OBJECTS (in, out);
+ MOVE_9_OBJECTS (in, out);
+ MOVE_4_OBJECTS (in, out);
+ break;
+ case 30:
+ MOVE_16_OBJECTS (in, out);
+ MOVE_12_OBJECTS (in, out);
+ MOVE_2_OBJECTS (in, out);
+ break;
+ case 31:
+ MOVE_16_OBJECTS (in, out);
+ MOVE_11_OBJECTS (in, out);
+ MOVE_4_OBJECTS (in, out);
+ break;
+ }
+
+ /* This loop governs the asmptoptic behaviour of this algorithm, for long
+ word copies. */
+ count = value >> 5;
+ for (loop_var = 0; loop_var < count; loop_var++)
+ MOVE_32_OBJECTS (in, out);
+}
+
+
+/* Exposed interface. */
+
+void *
+memcpy (void *__restrict s1, const void *__restrict s2, size_t n)
+{
+ void *result = s1;
+
+ /* None of the following handles copying zero bytes. */
+ if (n != 0)
+ {
+ unsigned test = (unsigned) s2 | (unsigned) s1 | (unsigned) n;
+
+ if (test & 1)
+ __byte_memcpy (s1, s2, n);
+ else if (test & 2)
+ __shrt_int_memcpy (s1, s2, n >> 1);
+ else
+#ifdef __VISIUM_ARCH_BMI__
+ __asm__ __volatile__ ("bmd %0,%1,%2"
+ : "+t" (s1), "+u" (s2), "+v" (n)
+ :
+ : "r4", "r5", "r6", "memory");
+#else
+ __int_memcpy (s1, s2, n >> 2);
+#endif /* __VISIUM_ARCH_BMI__ */
+ }
+
+ return result;
+}
diff --git a/newlib/libc/machine/visium/memcpy.h b/newlib/libc/machine/visium/memcpy.h
new file mode 100644
index 000000000..a645aa703
--- /dev/null
+++ b/newlib/libc/machine/visium/memcpy.h
@@ -0,0 +1,31 @@
+/* memcpy for the Visium processor.
+
+ Copyright (c) 2015 Rolls-Royce Controls and Data Services Limited.
+ 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 Rolls-Royce Controls and Data Services Limited 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. */
+
+void *
+memcpy (void *__restrict s1, const void *__restrict s2, size_t n);
diff --git a/newlib/libc/machine/visium/memmove.c b/newlib/libc/machine/visium/memmove.c
new file mode 100644
index 000000000..d59421362
--- /dev/null
+++ b/newlib/libc/machine/visium/memmove.c
@@ -0,0 +1,52 @@
+/* memmove for the Visium processor.
+
+ Copyright (c) 2015 Rolls-Royce Controls and Data Services Limited.
+ 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 Rolls-Royce Controls and Data Services Limited 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 <string.h>
+
+void *
+memmove (void *dst, const void *src, size_t len)
+{
+ char *d = dst;
+ const char *s = src;
+
+ /* The overlap case is allegedly rare - with this implementation
+ it will have a high penalty on the GR6. */
+ if (s < d && d < s + len)
+ {
+ s += len;
+ d += len;
+
+ while (len--)
+ *--d = *--s;
+
+ return dst;
+ }
+
+ return memcpy (dst, src, len);
+}
diff --git a/newlib/libc/machine/visium/memset.c b/newlib/libc/machine/visium/memset.c
new file mode 100644
index 000000000..bad64a96d
--- /dev/null
+++ b/newlib/libc/machine/visium/memset.c
@@ -0,0 +1,677 @@
+/* memset for the Visium processor.
+
+ Copyright (c) 2015 Rolls-Royce Controls and Data Services Limited.
+ 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 Rolls-Royce Controls and Data Services Limited 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. */
+
+/* This file must be kept in sync with libgcc/config/visium/memset.c */
+
+#include <stddef.h>
+#include "memset.h"
+
+#define SET_32_OBJECTS(out) \
+do { \
+ out [0] = m0; \
+ out [1] = m0; \
+ out [2] = m0; \
+ out [3] = m0; \
+ out [4] = m0; \
+ out [5] = m0; \
+ out [6] = m0; \
+ out [7] = m0; \
+ out [8] = m0; \
+ out [9] = m0; \
+ out [10] = m0; \
+ out [11] = m0; \
+ out [12] = m0; \
+ out [13] = m0; \
+ out [14] = m0; \
+ out [15] = m0; \
+ out [16] = m0; \
+ out [17] = m0; \
+ out [18] = m0; \
+ out [19] = m0; \
+ out [20] = m0; \
+ out [21] = m0; \
+ out [22] = m0; \
+ out [23] = m0; \
+ out [24] = m0; \
+ out [25] = m0; \
+ out [26] = m0; \
+ out [27] = m0; \
+ out [28] = m0; \
+ out [29] = m0; \
+ out [30] = m0; \
+ out [31] = m0; \
+ out += 32; \
+} while(0)
+
+#define SET_16_OBJECTS(out) \
+do { \
+ out [0] = m0; \
+ out [1] = m0; \
+ out [2] = m0; \
+ out [3] = m0; \
+ out [4] = m0; \
+ out [5] = m0; \
+ out [6] = m0; \
+ out [7] = m0; \
+ out [8] = m0; \
+ out [9] = m0; \
+ out [10] = m0; \
+ out [11] = m0; \
+ out [12] = m0; \
+ out [13] = m0; \
+ out [14] = m0; \
+ out [15] = m0; \
+ out += 16; \
+} while(0)
+
+#define SET_12_OBJECTS(out) \
+do { \
+ out [0] = m0; \
+ out [1] = m0; \
+ out [2] = m0; \
+ out [3] = m0; \
+ out [4] = m0; \
+ out [5] = m0; \
+ out [6] = m0; \
+ out [7] = m0; \
+ out [8] = m0; \
+ out [9] = m0; \
+ out [10] = m0; \
+ out [11] = m0; \
+ out += 12; \
+} while(0)
+
+#define SET_11_OBJECTS(out) \
+do { \
+ out [0] = m0; \
+ out [1] = m0; \
+ out [2] = m0; \
+ out [3] = m0; \
+ out [4] = m0; \
+ out [5] = m0; \
+ out [6] = m0; \
+ out [7] = m0; \
+ out [8] = m0; \
+ out [9] = m0; \
+ out [10] = m0; \
+ out += 11; \
+} while(0)
+
+#define SET_10_OBJECTS(out) \
+do { \
+ out [0] = m0; \
+ out [1] = m0; \
+ out [2] = m0; \
+ out [3] = m0; \
+ out [4] = m0; \
+ out [5] = m0; \
+ out [6] = m0; \
+ out [7] = m0; \
+ out [8] = m0; \
+ out [9] = m0; \
+ out += 10; \
+} while(0)
+
+#define SET_9_OBJECTS(out) \
+do { \
+ out [0] = m0; \
+ out [1] = m0; \
+ out [2] = m0; \
+ out [3] = m0; \
+ out [4] = m0; \
+ out [5] = m0; \
+ out [6] = m0; \
+ out [7] = m0; \
+ out [8] = m0; \
+ out += 9; \
+} while(0)
+
+#define SET_8_OBJECTS(out) \
+do { \
+ out [0] = m0; \
+ out [1] = m0; \
+ out [2] = m0; \
+ out [3] = m0; \
+ out [4] = m0; \
+ out [5] = m0; \
+ out [6] = m0; \
+ out [7] = m0; \
+ out += 8; \
+} while(0)
+
+#define SET_7_OBJECTS(out) \
+do { \
+ out [0] = m0; \
+ out [1] = m0; \
+ out [2] = m0; \
+ out [3] = m0; \
+ out [4] = m0; \
+ out [5] = m0; \
+ out [6] = m0; \
+ out += 7; \
+} while(0)
+
+#define SET_6_OBJECTS(out) \
+do { \
+ out [0] = m0; \
+ out [1] = m0; \
+ out [2] = m0; \
+ out [3] = m0; \
+ out [4] = m0; \
+ out [5] = m0; \
+ out += 6; \
+} while(0)
+
+#define SET_5_OBJECTS(out) \
+do { \
+ out [0] = m0; \
+ out [1] = m0; \
+ out [2] = m0; \
+ out [3] = m0; \
+ out [4] = m0; \
+ out += 5; \
+} while(0)
+
+#define SET_4_OBJECTS(out) \
+do { \
+ out [0] = m0; \
+ out [1] = m0; \
+ out [2] = m0; \
+ out [3] = m0; \
+ out += 4; \
+} while(0)
+
+#define SET_3_OBJECTS(out) \
+do { \
+ out [0] = m0; \
+ out [1] = m0; \
+ out [2] = m0; \
+ out += 3; \
+} while(0)
+
+#define SET_2_OBJECTS(out) \
+do { \
+ out [0] = m0; \
+ out [1] = m0; \
+ out += 2; \
+} while(0)
+
+#define SET_1_OBJECT(out) \
+do { \
+ out [0] = m0; \
+ out += 1; \
+} while(0)
+
+
+static inline void
+__int_memset (void *__restrict s1, int val, size_t n)
+{
+ int value = n;
+ int loop_var;
+ int *out = s1;
+ int count;
+ int m0 = val;
+
+ /* This code currently give a stall for any value with a 1->2 in the low 5
+ bits, i.e. 1,2, 33,34 ? not acceptable! */
+ switch (value & 0x1f)
+ {
+ case 0:
+ break;
+ case 1:
+ SET_1_OBJECT (out);
+ break;
+ case 2:
+ SET_2_OBJECTS (out);
+ break;
+ case 3:
+ SET_3_OBJECTS (out);
+ break;
+ case 4:
+ SET_4_OBJECTS (out);
+ break;
+ case 5:
+ SET_5_OBJECTS (out);
+ break;
+ case 6:
+ SET_6_OBJECTS (out);
+ break;
+ case 7:
+ SET_7_OBJECTS (out);
+ break;
+ case 8:
+ SET_8_OBJECTS (out);
+ break;
+ case 9:
+ SET_9_OBJECTS (out);
+ break;
+ case 10:
+ SET_10_OBJECTS (out);
+ break;
+ case 11:
+ SET_11_OBJECTS (out);
+ break;
+ case 12:
+ SET_12_OBJECTS (out);
+ break;
+ case 13:
+ SET_9_OBJECTS (out);
+ SET_4_OBJECTS (out);
+ break;
+ case 14:
+ SET_12_OBJECTS (out);
+ SET_2_OBJECTS (out);
+ break;
+ case 15:
+ SET_11_OBJECTS (out);
+ SET_4_OBJECTS (out);
+ break;
+ case 16:
+ SET_16_OBJECTS (out);
+ break;
+ case 17:
+ SET_11_OBJECTS (out);
+ SET_6_OBJECTS (out);
+ break;
+ case 18:
+ SET_9_OBJECTS (out);
+ SET_9_OBJECTS (out);
+ break;
+ case 19:
+ SET_16_OBJECTS (out);
+ SET_3_OBJECTS (out);
+ break;
+ case 20:
+ SET_16_OBJECTS (out);
+ SET_4_OBJECTS (out);
+ break;
+ case 21:
+ SET_16_OBJECTS (out);
+ SET_5_OBJECTS (out);
+ break;
+ case 22:
+ SET_16_OBJECTS (out);
+ SET_6_OBJECTS (out);
+ break;
+ case 23:
+ SET_16_OBJECTS (out);
+ SET_7_OBJECTS (out);
+ break;
+ case 24:
+ SET_16_OBJECTS (out);
+ SET_8_OBJECTS (out);
+ break;
+ case 25:
+ SET_16_OBJECTS (out);
+ SET_9_OBJECTS (out);
+ break;
+ case 26:
+ SET_16_OBJECTS (out);
+ SET_10_OBJECTS (out);
+ break;
+ case 27:
+ SET_16_OBJECTS (out);
+ SET_11_OBJECTS (out);
+ break;
+ case 28:
+ SET_16_OBJECTS (out);
+ SET_8_OBJECTS (out);
+ SET_4_OBJECTS (out);
+ break;
+ case 29:
+ SET_16_OBJECTS (out);
+ SET_9_OBJECTS (out);
+ SET_4_OBJECTS (out);
+ break;
+ case 30:
+ SET_16_OBJECTS (out);
+ SET_12_OBJECTS (out);
+ SET_2_OBJECTS (out);
+ break;
+ case 31:
+ SET_16_OBJECTS (out);
+ SET_11_OBJECTS (out);
+ SET_4_OBJECTS (out);
+ break;
+ }
+
+ /* This loop governs the asmptoptic behaviour of this algorithm, for long
+ word copies. */
+ count = value >> 5;
+ for (loop_var = 0; loop_var < count; loop_var++)
+ SET_32_OBJECTS (out);
+}
+
+static inline void
+__short_int_memset (void *__restrict s1, int val, size_t n)
+{
+ int value = n;
+ int loop_var;
+ int short *out = s1;
+ int count;
+ int m0 = val;
+
+ /* This code currently give a stall for any value with a 1->2 in the low 5
+ bits, i.e. 1,2, 33,34 ? not acceptable! */
+ switch (value & 0x1f)
+ {
+ case 0:
+ break;
+ case 1:
+ SET_1_OBJECT (out);
+ break;
+ case 2:
+ SET_2_OBJECTS (out);
+ break;
+ case 3:
+ SET_3_OBJECTS (out);
+ break;
+ case 4:
+ SET_4_OBJECTS (out);
+ break;
+ case 5:
+ SET_5_OBJECTS (out);
+ break;
+ case 6:
+ SET_6_OBJECTS (out);
+ break;
+ case 7:
+ SET_7_OBJECTS (out);
+ break;
+ case 8:
+ SET_8_OBJECTS (out);
+ break;
+ case 9:
+ SET_9_OBJECTS (out);
+ break;
+ case 10:
+ SET_10_OBJECTS (out);
+ break;
+ case 11:
+ SET_11_OBJECTS (out);
+ break;
+ case 12:
+ SET_12_OBJECTS (out);
+ break;
+ case 13:
+ SET_9_OBJECTS (out);
+ SET_4_OBJECTS (out);
+ break;
+ case 14:
+ SET_12_OBJECTS (out);
+ SET_2_OBJECTS (out);
+ break;
+ case 15:
+ SET_11_OBJECTS (out);
+ SET_4_OBJECTS (out);
+ break;
+ case 16:
+ SET_16_OBJECTS (out);
+ break;
+ case 17:
+ SET_11_OBJECTS (out);
+ SET_6_OBJECTS (out);
+ break;
+ case 18:
+ SET_9_OBJECTS (out);
+ SET_9_OBJECTS (out);
+ break;
+ case 19:
+ SET_16_OBJECTS (out);
+ SET_3_OBJECTS (out);
+ break;
+ case 20:
+ SET_16_OBJECTS (out);
+ SET_4_OBJECTS (out);
+ break;
+ case 21:
+ SET_16_OBJECTS (out);
+ SET_5_OBJECTS (out);
+ break;
+ case 22:
+ SET_16_OBJECTS (out);
+ SET_6_OBJECTS (out);
+ break;
+ case 23:
+ SET_16_OBJECTS (out);
+ SET_7_OBJECTS (out);
+ break;
+ case 24:
+ SET_16_OBJECTS (out);
+ SET_8_OBJECTS (out);
+ break;
+ case 25:
+ SET_16_OBJECTS (out);
+ SET_9_OBJECTS (out);
+ break;
+ case 26:
+ SET_16_OBJECTS (out);
+ SET_10_OBJECTS (out);
+ break;
+ case 27:
+ SET_16_OBJECTS (out);
+ SET_11_OBJECTS (out);
+ break;
+ case 28:
+ SET_16_OBJECTS (out);
+ SET_8_OBJECTS (out);
+ SET_4_OBJECTS (out);
+ break;
+ case 29:
+ SET_16_OBJECTS (out);
+ SET_9_OBJECTS (out);
+ SET_4_OBJECTS (out);
+ break;
+ case 30:
+ SET_16_OBJECTS (out);
+ SET_12_OBJECTS (out);
+ SET_2_OBJECTS (out);
+ break;
+ case 31:
+ SET_16_OBJECTS (out);
+ SET_11_OBJECTS (out);
+ SET_4_OBJECTS (out);
+ break;
+ }
+
+ /* This loop governs the asmptoptic behaviour of this algorithm, for long
+ word copies. */
+ count = value >> 5;
+ for (loop_var = 0; loop_var < count; loop_var++)
+ SET_32_OBJECTS (out);
+}
+
+static inline void
+__byte_memset (void *__restrict s1, int val, size_t n)
+{
+ int value = n;
+ int loop_var;
+ char *out = s1;
+ int count;
+ int m0 = val;
+
+ /* This code currently give a stall for any value with a 1->2 in the low 5
+ bits, i.e. 1,2, 33,34 ? not acceptable! */
+ switch (value & 0x1f)
+ {
+ case 0:
+ break;
+ case 1:
+ SET_1_OBJECT (out);
+ break;
+ case 2:
+ SET_2_OBJECTS (out);
+ break;
+ case 3:
+ SET_3_OBJECTS (out);
+ break;
+ case 4:
+ SET_4_OBJECTS (out);
+ break;
+ case 5:
+ SET_5_OBJECTS (out);
+ break;
+ case 6:
+ SET_6_OBJECTS (out);
+ break;
+ case 7:
+ SET_7_OBJECTS (out);
+ break;
+ case 8:
+ SET_8_OBJECTS (out);
+ break;
+ case 9:
+ SET_9_OBJECTS (out);
+ break;
+ case 10:
+ SET_10_OBJECTS (out);
+ break;
+ case 11:
+ SET_11_OBJECTS (out);
+ break;
+ case 12:
+ SET_12_OBJECTS (out);
+ break;
+ case 13:
+ SET_9_OBJECTS (out);
+ SET_4_OBJECTS (out);
+ break;
+ case 14:
+ SET_12_OBJECTS (out);
+ SET_2_OBJECTS (out);
+ break;
+ case 15:
+ SET_11_OBJECTS (out);
+ SET_4_OBJECTS (out);
+ break;
+ case 16:
+ SET_16_OBJECTS (out);
+ break;
+ case 17:
+ SET_11_OBJECTS (out);
+ SET_6_OBJECTS (out);
+ break;
+ case 18:
+ SET_9_OBJECTS (out);
+ SET_9_OBJECTS (out);
+ break;
+ case 19:
+ SET_16_OBJECTS (out);
+ SET_3_OBJECTS (out);
+ break;
+ case 20:
+ SET_16_OBJECTS (out);
+ SET_4_OBJECTS (out);
+ break;
+ case 21:
+ SET_16_OBJECTS (out);
+ SET_5_OBJECTS (out);
+ break;
+ case 22:
+ SET_16_OBJECTS (out);
+ SET_6_OBJECTS (out);
+ break;
+ case 23:
+ SET_16_OBJECTS (out);
+ SET_7_OBJECTS (out);
+ break;
+ case 24:
+ SET_16_OBJECTS (out);
+ SET_8_OBJECTS (out);
+ break;
+ case 25:
+ SET_16_OBJECTS (out);
+ SET_9_OBJECTS (out);
+ break;
+ case 26:
+ SET_16_OBJECTS (out);
+ SET_10_OBJECTS (out);
+ break;
+ case 27:
+ SET_16_OBJECTS (out);
+ SET_11_OBJECTS (out);
+ break;
+ case 28:
+ SET_16_OBJECTS (out);
+ SET_8_OBJECTS (out);
+ SET_4_OBJECTS (out);
+ break;
+ case 29:
+ SET_16_OBJECTS (out);
+ SET_9_OBJECTS (out);
+ SET_4_OBJECTS (out);
+ break;
+ case 30:
+ SET_16_OBJECTS (out);
+ SET_12_OBJECTS (out);
+ SET_2_OBJECTS (out);
+ break;
+ case 31:
+ SET_16_OBJECTS (out);
+ SET_11_OBJECTS (out);
+ SET_4_OBJECTS (out);
+ break;
+ }
+
+ /* This loop governs the asmptoptic behaviour of this algorithm, for long
+ word copies. */
+ count = value >> 5;
+ for (loop_var = 0; loop_var < count; loop_var++)
+ SET_32_OBJECTS (out);
+}
+
+
+/* Exposed interface. */
+
+void *
+memset (void *s, int c, size_t n)
+{
+ void *result = s;
+
+ /* None of the following handles setting zero bytes. */
+ if (n != 0)
+ {
+ unsigned test = (unsigned) s | (unsigned) n;
+
+ if (test & 1)
+ __byte_memset (s, c, n);
+ else if (test & 2)
+ {
+ short int sc = (short int) ((c << 8) + (char) c);
+ __short_int_memset (s, sc, n >> 1);
+ }
+ else
+ {
+ int ic = (c << 24) + ((char) c << 16) + ((char) c << 8) + (char) c;
+ __int_memset (s, ic, n >> 2);
+ }
+ }
+
+ return result;
+}
diff --git a/newlib/libc/machine/visium/memset.h b/newlib/libc/machine/visium/memset.h
new file mode 100644
index 000000000..0ca59748f
--- /dev/null
+++ b/newlib/libc/machine/visium/memset.h
@@ -0,0 +1,31 @@
+/* memset for the Visium processor.
+
+ Copyright (c) 2015 Rolls-Royce Controls and Data Services Limited.
+ 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 Rolls-Royce Controls and Data Services Limited 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. */
+
+void *
+memset (void *s, int c, size_t n);
diff --git a/newlib/libc/machine/visium/setjmp.S b/newlib/libc/machine/visium/setjmp.S
new file mode 100644
index 000000000..5ef429ba8
--- /dev/null
+++ b/newlib/libc/machine/visium/setjmp.S
@@ -0,0 +1,67 @@
+/* setjmp/longjmp for the Visium processor.
+
+ Copyright (c) 2015 Rolls-Royce Controls and Data Services Limited.
+ 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 Rolls-Royce Controls and Data Services Limited 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. */
+
+ .text
+ .globl setjmp
+ .type setjmp, @function
+setjmp:
+ write.l 0(r1),r11
+ write.l 1(r1),r12
+ write.l 2(r1),r13
+ write.l 3(r1),r14
+ write.l 4(r1),r15
+ write.l 5(r1),r16
+ write.l 6(r1),r17
+ write.l 7(r1),r18
+ write.l 8(r1),r19
+ write.l 9(r1),r21
+ write.l 10(r1),r22
+ write.l 11(r1),r23
+ bra tr,r21,r0
+ moviq r1,0
+ .size setjmp, .-setjmp
+
+ .globl longjmp
+ .type longjmp, @function
+longjmp:
+ read.l r11,0(r1)
+ read.l r12,1(r1)
+ read.l r13,2(r1)
+ read.l r14,3(r1)
+ read.l r15,4(r1)
+ read.l r16,5(r1)
+ read.l r17,6(r1)
+ read.l r18,7(r1)
+ read.l r19,8(r1)
+ read.l r21,9(r1)
+ read.l r22,10(r1)
+ read.l r23,11(r1)
+ bra tr,r21,r0
+ move.l r1,r2
+ .size longjmp, .-longjmp
diff --git a/newlib/libc/machine/w65/configure b/newlib/libc/machine/w65/configure
index 3d8b37096..a1a6a0942 100755
--- a/newlib/libc/machine/w65/configure
+++ b/newlib/libc/machine/w65/configure
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.68 for newlib 2.0.0.
+# Generated by GNU Autoconf 2.68 for newlib 2.4.0.
#
#
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
@@ -556,8 +556,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='newlib'
PACKAGE_TARNAME='newlib'
-PACKAGE_VERSION='2.0.0'
-PACKAGE_STRING='newlib 2.0.0'
+PACKAGE_VERSION='2.4.0'
+PACKAGE_STRING='newlib 2.4.0'
PACKAGE_BUGREPORT=''
PACKAGE_URL=''
@@ -1239,7 +1239,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures newlib 2.0.0 to adapt to many kinds of systems.
+\`configure' configures newlib 2.4.0 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1309,7 +1309,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of newlib 2.0.0:";;
+ short | recursive ) echo "Configuration of newlib 2.4.0:";;
esac
cat <<\_ACEOF
@@ -1400,7 +1400,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-newlib configure 2.0.0
+newlib configure 2.4.0
generated by GNU Autoconf 2.68
Copyright (C) 2010 Free Software Foundation, Inc.
@@ -1455,7 +1455,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by newlib $as_me 2.0.0, which was
+It was created by newlib $as_me 2.4.0, which was
generated by GNU Autoconf 2.68. Invocation command line was
$ $0 $@
@@ -2527,7 +2527,7 @@ fi
# Define the identity of the package.
PACKAGE='newlib'
- VERSION='2.0.0'
+ VERSION='2.4.0'
# Some tools Automake needs.
@@ -4007,7 +4007,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by newlib $as_me 2.0.0, which was
+This file was extended by newlib $as_me 2.4.0, which was
generated by GNU Autoconf 2.68. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -4064,7 +4064,7 @@ _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
-newlib config.status 2.0.0
+newlib config.status 2.4.0
configured by $0, generated by GNU Autoconf 2.68,
with options \\"\$ac_cs_config\\"
diff --git a/newlib/libc/machine/x86_64/configure b/newlib/libc/machine/x86_64/configure
index 7f4d0d6df..bc041896f 100755
--- a/newlib/libc/machine/x86_64/configure
+++ b/newlib/libc/machine/x86_64/configure
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.68 for newlib 2.0.0.
+# Generated by GNU Autoconf 2.68 for newlib 2.4.0.
#
#
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
@@ -556,8 +556,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='newlib'
PACKAGE_TARNAME='newlib'
-PACKAGE_VERSION='2.0.0'
-PACKAGE_STRING='newlib 2.0.0'
+PACKAGE_VERSION='2.4.0'
+PACKAGE_STRING='newlib 2.4.0'
PACKAGE_BUGREPORT=''
PACKAGE_URL=''
@@ -1239,7 +1239,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures newlib 2.0.0 to adapt to many kinds of systems.
+\`configure' configures newlib 2.4.0 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1309,7 +1309,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of newlib 2.0.0:";;
+ short | recursive ) echo "Configuration of newlib 2.4.0:";;
esac
cat <<\_ACEOF
@@ -1400,7 +1400,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-newlib configure 2.0.0
+newlib configure 2.4.0
generated by GNU Autoconf 2.68
Copyright (C) 2010 Free Software Foundation, Inc.
@@ -1455,7 +1455,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by newlib $as_me 2.0.0, which was
+It was created by newlib $as_me 2.4.0, which was
generated by GNU Autoconf 2.68. Invocation command line was
$ $0 $@
@@ -2527,7 +2527,7 @@ fi
# Define the identity of the package.
PACKAGE='newlib'
- VERSION='2.0.0'
+ VERSION='2.4.0'
# Some tools Automake needs.
@@ -4007,7 +4007,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by newlib $as_me 2.0.0, which was
+This file was extended by newlib $as_me 2.4.0, which was
generated by GNU Autoconf 2.68. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -4064,7 +4064,7 @@ _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
-newlib config.status 2.0.0
+newlib config.status 2.4.0
configured by $0, generated by GNU Autoconf 2.68,
with options \\"\$ac_cs_config\\"
diff --git a/newlib/libc/machine/x86_64/x86_64mach.h b/newlib/libc/machine/x86_64/x86_64mach.h
index 84cb2f85d..05e639200 100644
--- a/newlib/libc/machine/x86_64/x86_64mach.h
+++ b/newlib/libc/machine/x86_64/x86_64mach.h
@@ -104,7 +104,7 @@
#define SOTYPE_FUNCTION(sym)
#endif
-#ifdef _I386MACH_ALLOW_HW_INTERRUPTS
+#ifndef _I386MACH_DISABLE_HW_INTERRUPTS
#define __CLI
#define __STI
#else
diff --git a/newlib/libc/machine/xc16x/configure b/newlib/libc/machine/xc16x/configure
index d96b7718a..ca07e566c 100644
--- a/newlib/libc/machine/xc16x/configure
+++ b/newlib/libc/machine/xc16x/configure
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.68 for newlib 2.0.0.
+# Generated by GNU Autoconf 2.68 for newlib 2.4.0.
#
#
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
@@ -556,8 +556,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='newlib'
PACKAGE_TARNAME='newlib'
-PACKAGE_VERSION='2.0.0'
-PACKAGE_STRING='newlib 2.0.0'
+PACKAGE_VERSION='2.4.0'
+PACKAGE_STRING='newlib 2.4.0'
PACKAGE_BUGREPORT=''
PACKAGE_URL=''
@@ -1239,7 +1239,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures newlib 2.0.0 to adapt to many kinds of systems.
+\`configure' configures newlib 2.4.0 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1309,7 +1309,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of newlib 2.0.0:";;
+ short | recursive ) echo "Configuration of newlib 2.4.0:";;
esac
cat <<\_ACEOF
@@ -1400,7 +1400,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-newlib configure 2.0.0
+newlib configure 2.4.0
generated by GNU Autoconf 2.68
Copyright (C) 2010 Free Software Foundation, Inc.
@@ -1455,7 +1455,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by newlib $as_me 2.0.0, which was
+It was created by newlib $as_me 2.4.0, which was
generated by GNU Autoconf 2.68. Invocation command line was
$ $0 $@
@@ -2527,7 +2527,7 @@ fi
# Define the identity of the package.
PACKAGE='newlib'
- VERSION='2.0.0'
+ VERSION='2.4.0'
# Some tools Automake needs.
@@ -4007,7 +4007,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by newlib $as_me 2.0.0, which was
+This file was extended by newlib $as_me 2.4.0, which was
generated by GNU Autoconf 2.68. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -4064,7 +4064,7 @@ _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
-newlib config.status 2.0.0
+newlib config.status 2.4.0
configured by $0, generated by GNU Autoconf 2.68,
with options \\"\$ac_cs_config\\"
diff --git a/newlib/libc/machine/xscale/configure b/newlib/libc/machine/xscale/configure
index 7f4d0d6df..bc041896f 100755
--- a/newlib/libc/machine/xscale/configure
+++ b/newlib/libc/machine/xscale/configure
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.68 for newlib 2.0.0.
+# Generated by GNU Autoconf 2.68 for newlib 2.4.0.
#
#
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
@@ -556,8 +556,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='newlib'
PACKAGE_TARNAME='newlib'
-PACKAGE_VERSION='2.0.0'
-PACKAGE_STRING='newlib 2.0.0'
+PACKAGE_VERSION='2.4.0'
+PACKAGE_STRING='newlib 2.4.0'
PACKAGE_BUGREPORT=''
PACKAGE_URL=''
@@ -1239,7 +1239,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures newlib 2.0.0 to adapt to many kinds of systems.
+\`configure' configures newlib 2.4.0 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1309,7 +1309,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of newlib 2.0.0:";;
+ short | recursive ) echo "Configuration of newlib 2.4.0:";;
esac
cat <<\_ACEOF
@@ -1400,7 +1400,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-newlib configure 2.0.0
+newlib configure 2.4.0
generated by GNU Autoconf 2.68
Copyright (C) 2010 Free Software Foundation, Inc.
@@ -1455,7 +1455,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by newlib $as_me 2.0.0, which was
+It was created by newlib $as_me 2.4.0, which was
generated by GNU Autoconf 2.68. Invocation command line was
$ $0 $@
@@ -2527,7 +2527,7 @@ fi
# Define the identity of the package.
PACKAGE='newlib'
- VERSION='2.0.0'
+ VERSION='2.4.0'
# Some tools Automake needs.
@@ -4007,7 +4007,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by newlib $as_me 2.0.0, which was
+This file was extended by newlib $as_me 2.4.0, which was
generated by GNU Autoconf 2.68. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -4064,7 +4064,7 @@ _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
-newlib config.status 2.0.0
+newlib config.status 2.4.0
configured by $0, generated by GNU Autoconf 2.68,
with options \\"\$ac_cs_config\\"
diff --git a/newlib/libc/machine/xscale/machine/profile.h b/newlib/libc/machine/xscale/machine/profile.h
index 90198ba69..9a68cc86b 100644
--- a/newlib/libc/machine/xscale/machine/profile.h
+++ b/newlib/libc/machine/xscale/machine/profile.h
@@ -33,7 +33,7 @@
#endif
#define _MCOUNT_DECL(frompc, selfpc) \
-void __attribute__ ((no_instrument_function)) \
+void __attribute__ ((__no_instrument_function__)) \
mcount_internal (frompc, selfpc)
/* mcount_internal expects two arguments
@@ -53,8 +53,8 @@ mcount_internal (frompc, selfpc)
#ifdef __thumb__
#define MCOUNT \
-void __attribute__ ((naked)) \
- __attribute__ ((no_instrument_function)) \
+void __attribute__ ((__naked__)) \
+ __attribute__ ((__no_instrument_function__)) \
mcount (void) \
{ \
__asm__("push {r0, r1, r2, r3, lr};" \
@@ -69,8 +69,8 @@ mcount (void) \
}
#else
#define MCOUNT \
-void __attribute__ ((naked)) \
- __attribute__ ((no_instrument_function)) \
+void __attribute__ ((__naked__)) \
+ __attribute__ ((__no_instrument_function__)) \
mcount (void) \
{ \
__asm__("stmdb sp!, {r0, r1, r2, r3, lr};" \
diff --git a/newlib/libc/machine/xstormy16/configure b/newlib/libc/machine/xstormy16/configure
index d96b7718a..ca07e566c 100755
--- a/newlib/libc/machine/xstormy16/configure
+++ b/newlib/libc/machine/xstormy16/configure
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.68 for newlib 2.0.0.
+# Generated by GNU Autoconf 2.68 for newlib 2.4.0.
#
#
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
@@ -556,8 +556,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='newlib'
PACKAGE_TARNAME='newlib'
-PACKAGE_VERSION='2.0.0'
-PACKAGE_STRING='newlib 2.0.0'
+PACKAGE_VERSION='2.4.0'
+PACKAGE_STRING='newlib 2.4.0'
PACKAGE_BUGREPORT=''
PACKAGE_URL=''
@@ -1239,7 +1239,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures newlib 2.0.0 to adapt to many kinds of systems.
+\`configure' configures newlib 2.4.0 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1309,7 +1309,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of newlib 2.0.0:";;
+ short | recursive ) echo "Configuration of newlib 2.4.0:";;
esac
cat <<\_ACEOF
@@ -1400,7 +1400,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-newlib configure 2.0.0
+newlib configure 2.4.0
generated by GNU Autoconf 2.68
Copyright (C) 2010 Free Software Foundation, Inc.
@@ -1455,7 +1455,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by newlib $as_me 2.0.0, which was
+It was created by newlib $as_me 2.4.0, which was
generated by GNU Autoconf 2.68. Invocation command line was
$ $0 $@
@@ -2527,7 +2527,7 @@ fi
# Define the identity of the package.
PACKAGE='newlib'
- VERSION='2.0.0'
+ VERSION='2.4.0'
# Some tools Automake needs.
@@ -4007,7 +4007,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by newlib $as_me 2.0.0, which was
+This file was extended by newlib $as_me 2.4.0, which was
generated by GNU Autoconf 2.68. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -4064,7 +4064,7 @@ _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
-newlib config.status 2.0.0
+newlib config.status 2.4.0
configured by $0, generated by GNU Autoconf 2.68,
with options \\"\$ac_cs_config\\"
diff --git a/newlib/libc/machine/z8k/configure b/newlib/libc/machine/z8k/configure
index b599f89c6..d5d2a97c0 100755
--- a/newlib/libc/machine/z8k/configure
+++ b/newlib/libc/machine/z8k/configure
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.68 for newlib 2.0.0.
+# Generated by GNU Autoconf 2.68 for newlib 2.4.0.
#
#
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
@@ -556,8 +556,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='newlib'
PACKAGE_TARNAME='newlib'
-PACKAGE_VERSION='2.0.0'
-PACKAGE_STRING='newlib 2.0.0'
+PACKAGE_VERSION='2.4.0'
+PACKAGE_STRING='newlib 2.4.0'
PACKAGE_BUGREPORT=''
PACKAGE_URL=''
@@ -1239,7 +1239,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures newlib 2.0.0 to adapt to many kinds of systems.
+\`configure' configures newlib 2.4.0 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1309,7 +1309,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of newlib 2.0.0:";;
+ short | recursive ) echo "Configuration of newlib 2.4.0:";;
esac
cat <<\_ACEOF
@@ -1400,7 +1400,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-newlib configure 2.0.0
+newlib configure 2.4.0
generated by GNU Autoconf 2.68
Copyright (C) 2010 Free Software Foundation, Inc.
@@ -1455,7 +1455,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by newlib $as_me 2.0.0, which was
+It was created by newlib $as_me 2.4.0, which was
generated by GNU Autoconf 2.68. Invocation command line was
$ $0 $@
@@ -2527,7 +2527,7 @@ fi
# Define the identity of the package.
PACKAGE='newlib'
- VERSION='2.0.0'
+ VERSION='2.4.0'
# Some tools Automake needs.
@@ -4007,7 +4007,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by newlib $as_me 2.0.0, which was
+This file was extended by newlib $as_me 2.4.0, which was
generated by GNU Autoconf 2.68. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -4064,7 +4064,7 @@ _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
-newlib config.status 2.0.0
+newlib config.status 2.4.0
configured by $0, generated by GNU Autoconf 2.68,
with options \\"\$ac_cs_config\\"
diff --git a/newlib/libc/misc/Makefile.am b/newlib/libc/misc/Makefile.am
index 8ac62a25e..3fe8e55f5 100644
--- a/newlib/libc/misc/Makefile.am
+++ b/newlib/libc/misc/Makefile.am
@@ -22,18 +22,4 @@ endif # USE_LIBTOOL
include $(srcdir)/../../Makefile.shared
CHEWOUT_FILES = unctrl.def ffs.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)/misc.tex >> $(TARGETDOC)
-
-CLEANFILES = $(CHEWOUT_FILES) *.ref
+CHAPTERS = misc.tex
diff --git a/newlib/libc/misc/Makefile.in b/newlib/libc/misc/Makefile.in
index 3dde58472..97c21a218 100644
--- a/newlib/libc/misc/Makefile.in
+++ b/newlib/libc/misc/Makefile.in
@@ -261,11 +261,15 @@ libmisc_la_LDFLAGS = -Xcompiler -nostdlib
@USE_LIBTOOL_FALSE@noinst_LIBRARIES = lib.a
@USE_LIBTOOL_FALSE@lib_a_SOURCES = $(LIB_SOURCES)
@USE_LIBTOOL_FALSE@lib_a_CFLAGS = $(AM_CFLAGS)
-CHEWOUT_FILES = unctrl.def ffs.def
+
+#
+# documentation rules
+#
SUFFIXES = .def
-CHEW = ../../doc/makedoc -f $(srcdir)/../../doc/doc.str
-TARGETDOC = ../tmp.texi
+CHEW = ${top_builddir}/../doc/makedoc -f $(top_srcdir)/../doc/doc.str
CLEANFILES = $(CHEWOUT_FILES) *.ref
+CHEWOUT_FILES = unctrl.def ffs.def
+CHAPTERS = misc.tex
all: all-am
.SUFFIXES:
@@ -553,8 +557,13 @@ objectlist.awk.in: $(noinst_LTLIBRARIES)
$(CHEW) < $< > $*.def 2> $*.ref
touch stmp-def
+TARGETDOC ?= ../tmp.texi
+
doc: $(CHEWOUT_FILES)
- cat $(srcdir)/misc.tex >> $(TARGETDOC)
+ for chapter in $(CHAPTERS) ; \
+ do \
+ cat $(srcdir)/$$chapter >> $(TARGETDOC) ; \
+ done
# 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.
diff --git a/newlib/libc/posix/Makefile.am b/newlib/libc/posix/Makefile.am
index fa20dd725..481849cb3 100644
--- a/newlib/libc/posix/Makefile.am
+++ b/newlib/libc/posix/Makefile.am
@@ -20,7 +20,7 @@ ELIX_3_SOURCES = \
execve.c execvp.c wordexp.c wordfree.c
ELIX_4_SOURCES = \
- popen.c
+ popen.c posix_spawn.c
if ELIX_LEVEL_1
ELIX_SOURCES =
@@ -49,24 +49,12 @@ lib_a_CFLAGS = $(AM_CFLAGS)
noinst_DATA =
endif # USE_LIBTOOL
-include $(srcdir)/../../Makefile.shared
+include $(srcdir)/../../Makefile.shared
CHEWOUT_FILES = \
- popen.def
+ popen.def \
+ posix_spawn.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)/posix.tex >> $(TARGETDOC)
+CHAPTERS = posix.tex
AM_CFLAGS = -D_GNU_SOURCE
-
-CLEANFILES = $(CHEWOUT_FILES) *.ref
diff --git a/newlib/libc/posix/Makefile.in b/newlib/libc/posix/Makefile.in
index 09a0b3811..3e8c4aff1 100644
--- a/newlib/libc/posix/Makefile.in
+++ b/newlib/libc/posix/Makefile.in
@@ -87,7 +87,7 @@ am__objects_3 = lib_a-execl.$(OBJEXT) lib_a-execle.$(OBJEXT) \
lib_a-execlp.$(OBJEXT) lib_a-execv.$(OBJEXT) \
lib_a-execve.$(OBJEXT) lib_a-execvp.$(OBJEXT) \
lib_a-wordexp.$(OBJEXT) lib_a-wordfree.$(OBJEXT)
-am__objects_4 = lib_a-popen.$(OBJEXT)
+am__objects_4 = lib_a-popen.$(OBJEXT) lib_a-posix_spawn.$(OBJEXT)
@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@am__objects_5 = $(am__objects_2) \
@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ $(am__objects_3) \
@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ $(am__objects_4)
@@ -107,7 +107,7 @@ am__objects_6 = closedir.lo collate.lo collcmp.lo creat.lo fnmatch.lo \
am__objects_7 = scandir.lo seekdir.lo
am__objects_8 = execl.lo execle.lo execlp.lo execv.lo execve.lo \
execvp.lo wordexp.lo wordfree.lo
-am__objects_9 = popen.lo
+am__objects_9 = popen.lo posix_spawn.lo
@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@am__objects_10 = $(am__objects_7) \
@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ $(am__objects_8) \
@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ $(am__objects_9)
@@ -305,7 +305,7 @@ ELIX_3_SOURCES = \
execve.c execvp.c wordexp.c wordfree.c
ELIX_4_SOURCES = \
- popen.c
+ popen.c posix_spawn.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)
@@ -319,14 +319,19 @@ libposix_la_LDFLAGS = -Xcompiler -nostdlib
@USE_LIBTOOL_FALSE@noinst_LIBRARIES = lib.a
@USE_LIBTOOL_FALSE@lib_a_SOURCES = $(GENERAL_SOURCES) $(ELIX_SOURCES)
@USE_LIBTOOL_FALSE@lib_a_CFLAGS = $(AM_CFLAGS)
-CHEWOUT_FILES = \
- popen.def
+#
+# documentation rules
+#
SUFFIXES = .def
-CHEW = ../../doc/makedoc -f $(srcdir)/../../doc/doc.str
-TARGETDOC = ../tmp.texi
-AM_CFLAGS = -D_GNU_SOURCE
+CHEW = ${top_builddir}/../doc/makedoc -f $(top_srcdir)/../doc/doc.str
CLEANFILES = $(CHEWOUT_FILES) *.ref
+CHEWOUT_FILES = \
+ popen.def \
+ posix_spawn.def
+
+CHAPTERS = posix.tex
+AM_CFLAGS = -D_GNU_SOURCE
all: all-am
.SUFFIXES:
@@ -576,6 +581,12 @@ lib_a-popen.o: popen.c
lib_a-popen.obj: popen.c
$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-popen.obj `if test -f 'popen.c'; then $(CYGPATH_W) 'popen.c'; else $(CYGPATH_W) '$(srcdir)/popen.c'; fi`
+lib_a-posix_spawn.o: posix_spawn.c
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-posix_spawn.o `test -f 'posix_spawn.c' || echo '$(srcdir)/'`posix_spawn.c
+
+lib_a-posix_spawn.obj: posix_spawn.c
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-posix_spawn.obj `if test -f 'posix_spawn.c'; then $(CYGPATH_W) 'posix_spawn.c'; else $(CYGPATH_W) '$(srcdir)/posix_spawn.c'; fi`
+
mostlyclean-libtool:
-rm -f *.lo
@@ -764,8 +775,13 @@ objectlist.awk.in: $(noinst_LTLIBRARIES)
$(CHEW) < $< > $*.def 2> $*.ref
touch stmp-def
+TARGETDOC ?= ../tmp.texi
+
doc: $(CHEWOUT_FILES)
- cat $(srcdir)/posix.tex >> $(TARGETDOC)
+ for chapter in $(CHAPTERS) ; \
+ do \
+ cat $(srcdir)/$$chapter >> $(TARGETDOC) ; \
+ done
# 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.
diff --git a/newlib/libc/posix/closedir.c b/newlib/libc/posix/closedir.c
index 634f5ad12..7801da043 100644
--- a/newlib/libc/posix/closedir.c
+++ b/newlib/libc/posix/closedir.c
@@ -52,25 +52,19 @@ int
_DEFUN(closedir, (dirp),
register DIR *dirp)
{
- int fd, rc;
+ int rc;
#ifdef HAVE_DD_LOCK
__lock_acquire_recursive(dirp->dd_lock);
#endif
- rc = 0;
- fd = dirp->dd_fd;
- if (fd != -1) {
- dirp->dd_fd = -1;
- dirp->dd_loc = 0;
- (void)free((void *)dirp->dd_buf);
- (void)free((void *)dirp);
- rc = close(fd);
- _cleanupdir(dirp);
- }
+ rc = close(dirp->dd_fd);
+ _cleanupdir(dirp);
+ free((void *)dirp->dd_buf);
#ifdef HAVE_DD_LOCK
__lock_release_recursive(dirp->dd_lock);
__lock_close_recursive(dirp->dd_lock);
#endif
+ free((void *)dirp);
return rc;
}
diff --git a/newlib/libc/posix/glob.c b/newlib/libc/posix/glob.c
index 977a5a4f8..5e6c2fcba 100644
--- a/newlib/libc/posix/glob.c
+++ b/newlib/libc/posix/glob.c
@@ -158,9 +158,9 @@ static void qprintf(const char *, Char *);
int
glob(pattern, flags, errfunc, pglob)
- const char *pattern;
+ const char *__restrict pattern;
int flags, (*errfunc)(const char *, int);
- glob_t *pglob;
+ glob_t *__restrict pglob;
{
const u_char *patnext;
int c, limit;
diff --git a/newlib/libc/posix/posix.tex b/newlib/libc/posix/posix.tex
index 4c85fce5b..6fb662bdc 100644
--- a/newlib/libc/posix/posix.tex
+++ b/newlib/libc/posix/posix.tex
@@ -6,8 +6,11 @@ not by C. Each function documents which header to use.
@menu
* popen:: Create a stream tied to a child process
+* posix_spawn:: Spawn a process
@end menu
@page
@include posix/popen.def
+@page
+@include posix/posix_spawn.def
diff --git a/newlib/libc/posix/posix_spawn.c b/newlib/libc/posix/posix_spawn.c
new file mode 100644
index 000000000..e5655e29a
--- /dev/null
+++ b/newlib/libc/posix/posix_spawn.c
@@ -0,0 +1,577 @@
+/*-
+ * Copyright (c) 2008 Ed Schouten <ed@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.
+ */
+
+/*
+FUNCTION
+<<posix_spawn>>, <<posix_spawnp>>---spawn a process
+
+INDEX
+ posix_spawn
+INDEX
+ posix_spawnp
+
+ANSI_SYNOPSIS
+ #include <spawn.h>
+
+ int posix_spawn(pid_t *<[pid]>, const char *<[path]>,
+ const posix_spawn_file_actions_t *<[file_actions]>,
+ const posix_spawnattr_t *<[attrp]>,
+ char *const <[argv]>, char *const <[envp]>);
+ int posix_spawnp(pid_t *<[pid]>, const char *<[file]>,
+ const posix_spawn_file_actions_t *<[file_actions]>,
+ const posix_spawnattr_t *<[attrp]>,
+ char *const <[argv]>, char *const <[envp]>);
+
+DESCRIPTION
+Use <<posix_spawn>> and <<posix_spawnp>> to create a new child process
+from the specified process image file. <<argc>> is the argument count
+and <<argv>> is an array of argument strings passed to the new program.
+<<envp>> is an array of stings, which are passed as environment to the
+new program.
+
+The <<path>> argument to <<posix_spawn>> identifies the new process
+image file to execute. The <<file>> argument to <<posix_spawnp>> is
+used to construct a pathname that identifies the new process image
+file by duplicating the actions of the shell in searching for an
+executable file if the specified filename does not contain a `<</>>'
+character. The <<file>> is sought in the colon-separated list of
+directory pathnames specified in the <<PATH>> environment variable.
+
+The file descriptors remain open across <<posix_spawn>> and
+<<posix_spawnp>> except for those marked as close-on-exec. The open
+file descriptors in the child process can be modified by the spawn file
+actions object pointed to by <<file_actions>>.
+
+The spawn attributes object type pointed to by <<attrp>> argument
+may contain any of the attributes defined in <<spawn.h>>.
+
+RETURNS
+<<posix_spawn>> and <<posix_spawnp>> return the process ID of the newly
+spawned child process in the variable pointed by a non-NULL <<*<[pid]>>>
+argument and zero as the function return value upon successful
+completion. Otherwise, <<posix_spawn>> and <<posix_spawnp>> return an
+error number as the function return value to indicate the error; the
+value stored into the variable pointed to by a non-NULL <<*<[pid]>>>
+argument is unspecified.
+
+PORTABILITY
+POSIX.1-2008 requires <<posix_spawn>> and <<posix_spawnp>>.
+
+Supporting OS subroutines required: <<_close>>, <<dup2>>, <<_fcntl>>,
+<<_execve>>, <<execvpe>>, <<_exit>>, <<_open>>, <<sigaction>>,
+<<sigprocmask>>, <<waitpid>>, <<sched_setscheduler>>,
+<<sched_setparam>>, <<setegid>>, <<seteuid>>, <<setpgid>>, <<vfork>>.
+*/
+
+#ifndef _NO_POSIX_SPAWN
+
+#include <sys/cdefs.h>
+
+#include <sys/signal.h>
+#include <sys/queue.h>
+#include <sys/wait.h>
+
+#include <errno.h>
+#include <fcntl.h>
+#include <sched.h>
+#include <spawn.h>
+#include <signal.h>
+#include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
+
+/* 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;
+
+struct __posix_spawnattr {
+ short sa_flags;
+ pid_t sa_pgroup;
+ struct sched_param sa_schedparam;
+ int sa_schedpolicy;
+ sigset_t sa_sigdefault;
+ sigset_t sa_sigmask;
+};
+
+struct __posix_spawn_file_actions {
+ STAILQ_HEAD(, __posix_spawn_file_actions_entry) fa_list;
+};
+
+typedef struct __posix_spawn_file_actions_entry {
+ STAILQ_ENTRY(__posix_spawn_file_actions_entry) fae_list;
+ enum { FAE_OPEN, FAE_DUP2, FAE_CLOSE } fae_action;
+
+ int fae_fildes;
+ union {
+ struct {
+ char *path;
+#define fae_path fae_data.open.path
+ int oflag;
+#define fae_oflag fae_data.open.oflag
+ mode_t mode;
+#define fae_mode fae_data.open.mode
+ } open;
+ struct {
+ int newfildes;
+#define fae_newfildes fae_data.dup2.newfildes
+ } dup2;
+ } fae_data;
+} posix_spawn_file_actions_entry_t;
+
+/*
+ * Spawn routines
+ */
+
+static int
+process_spawnattr(_CONST posix_spawnattr_t sa)
+{
+ struct sigaction sigact = { .sa_flags = 0, .sa_handler = SIG_DFL };
+ int i;
+
+ /*
+ * POSIX doesn't really describe in which order everything
+ * should be set. We'll just set them in the order in which they
+ * are mentioned.
+ */
+
+ /* Set process group */
+ if (sa->sa_flags & POSIX_SPAWN_SETPGROUP) {
+ if (setpgid(0, sa->sa_pgroup) != 0)
+ return (errno);
+ }
+
+ /* Set scheduler policy */
+ if (sa->sa_flags & POSIX_SPAWN_SETSCHEDULER) {
+ if (sched_setscheduler(0, sa->sa_schedpolicy,
+ &sa->sa_schedparam) != 0)
+ return (errno);
+ } else if (sa->sa_flags & POSIX_SPAWN_SETSCHEDPARAM) {
+ if (sched_setparam(0, &sa->sa_schedparam) != 0)
+ return (errno);
+ }
+
+ /* Reset user ID's */
+ if (sa->sa_flags & POSIX_SPAWN_RESETIDS) {
+ if (setegid(getgid()) != 0)
+ return (errno);
+ if (seteuid(getuid()) != 0)
+ return (errno);
+ }
+
+ /* Set signal masks/defaults */
+ if (sa->sa_flags & POSIX_SPAWN_SETSIGMASK) {
+ sigprocmask(SIG_SETMASK, &sa->sa_sigmask, NULL);
+ }
+
+ if (sa->sa_flags & POSIX_SPAWN_SETSIGDEF) {
+ for (i = 1; i < NSIG; i++) {
+ if (sigismember(&sa->sa_sigdefault, i))
+ if (sigaction(i, &sigact, NULL) != 0)
+ return (errno);
+ }
+ }
+
+ return (0);
+}
+
+static int
+process_file_actions_entry(posix_spawn_file_actions_entry_t *fae)
+{
+ int fd;
+
+ switch (fae->fae_action) {
+ case FAE_OPEN:
+ /* Perform an open(), make it use the right fd */
+ fd = _open(fae->fae_path, fae->fae_oflag, fae->fae_mode);
+ if (fd < 0)
+ return (errno);
+ if (fd != fae->fae_fildes) {
+ if (dup2(fd, fae->fae_fildes) == -1)
+ return (errno);
+ if (_close(fd) != 0) {
+ if (errno == EBADF)
+ return (EBADF);
+ }
+ }
+#ifdef HAVE_FCNTL
+ if (_fcntl(fae->fae_fildes, F_SETFD, 0) == -1)
+ return (errno);
+#endif /* HAVE_FCNTL */
+ break;
+ case FAE_DUP2:
+ /* Perform a dup2() */
+ if (dup2(fae->fae_fildes, fae->fae_newfildes) == -1)
+ return (errno);
+#ifdef HAVE_FCNTL
+ if (_fcntl(fae->fae_newfildes, F_SETFD, 0) == -1)
+ return (errno);
+#endif /* HAVE_FCNTL */
+ break;
+ case FAE_CLOSE:
+ /* Perform a close(), do not fail if already closed */
+ (void)_close(fae->fae_fildes);
+ break;
+ }
+ return (0);
+}
+
+static int
+process_file_actions(_CONST posix_spawn_file_actions_t fa)
+{
+ posix_spawn_file_actions_entry_t *fae;
+ int error;
+
+ /* Replay all file descriptor modifications */
+ STAILQ_FOREACH(fae, &fa->fa_list, fae_list) {
+ error = process_file_actions_entry(fae);
+ if (error)
+ return (error);
+ }
+ return (0);
+}
+
+static int
+do_posix_spawn(pid_t *pid, _CONST char *path,
+ _CONST posix_spawn_file_actions_t *fa,
+ _CONST posix_spawnattr_t *sa,
+ char * _CONST argv[], char * _CONST envp[], int use_env_path)
+{
+ pid_t p;
+ volatile int error = 0;
+
+ p = vfork();
+ switch (p) {
+ case -1:
+ return (errno);
+ case 0:
+ if (sa != NULL) {
+ error = process_spawnattr(*sa);
+ if (error)
+ _exit(127);
+ }
+ if (fa != NULL) {
+ error = process_file_actions(*fa);
+ if (error)
+ _exit(127);
+ }
+ if (use_env_path)
+ execvpe(path, argv, envp != NULL ? envp : *p_environ);
+ else
+ _execve(path, argv, envp != NULL ? envp : *p_environ);
+ error = errno;
+ _exit(127);
+ default:
+ if (error != 0)
+ waitpid(p, NULL, WNOHANG);
+ else if (pid != NULL)
+ *pid = p;
+ return (error);
+ }
+}
+
+int
+_DEFUN(posix_spawn, (pid, path, fa, sa, argv, envp),
+ pid_t *pid _AND
+ _CONST char *path _AND
+ _CONST posix_spawn_file_actions_t *fa _AND
+ _CONST posix_spawnattr_t *sa _AND
+ char * _CONST argv[] _AND
+ char * _CONST envp[])
+{
+ return do_posix_spawn(pid, path, fa, sa, argv, envp, 0);
+}
+
+int
+_DEFUN(posix_spawnp, (pid, path, fa, sa, argv, envp),
+ pid_t *pid _AND
+ _CONST char *path _AND
+ _CONST posix_spawn_file_actions_t *fa _AND
+ _CONST posix_spawnattr_t *sa _AND
+ char * _CONST argv[] _AND
+ char * _CONST envp[])
+{
+ return do_posix_spawn(pid, path, fa, sa, argv, envp, 1);
+}
+
+/*
+ * File descriptor actions
+ */
+
+int
+_DEFUN(posix_spawn_file_actions_init, (ret),
+ posix_spawn_file_actions_t *ret)
+{
+ posix_spawn_file_actions_t fa;
+
+ fa = malloc(sizeof(struct __posix_spawn_file_actions));
+ if (fa == NULL)
+ return (-1);
+
+ STAILQ_INIT(&fa->fa_list);
+ *ret = fa;
+ return (0);
+}
+
+int
+_DEFUN(posix_spawn_file_actions_destroy, (fa),
+ posix_spawn_file_actions_t *fa)
+{
+ posix_spawn_file_actions_entry_t *fae;
+
+ while ((fae = STAILQ_FIRST(&(*fa)->fa_list)) != NULL) {
+ /* Remove file action entry from the queue */
+ STAILQ_REMOVE_HEAD(&(*fa)->fa_list, fae_list);
+
+ /* Deallocate file action entry */
+ if (fae->fae_action == FAE_OPEN)
+ free(fae->fae_path);
+ free(fae);
+ }
+
+ free(*fa);
+ return (0);
+}
+
+int
+_DEFUN(posix_spawn_file_actions_addopen, (fa, fildes, path, oflag, mode),
+ posix_spawn_file_actions_t * __restrict fa _AND
+ int fildes _AND
+ _CONST char * __restrict path _AND
+ int oflag _AND
+ mode_t mode)
+{
+ posix_spawn_file_actions_entry_t *fae;
+ int error;
+
+ if (fildes < 0)
+ return (EBADF);
+
+ /* Allocate object */
+ fae = malloc(sizeof(posix_spawn_file_actions_entry_t));
+ if (fae == NULL)
+ return (errno);
+
+ /* Set values and store in queue */
+ fae->fae_action = FAE_OPEN;
+ fae->fae_path = strdup(path);
+ if (fae->fae_path == NULL) {
+ error = errno;
+ free(fae);
+ return (error);
+ }
+ fae->fae_fildes = fildes;
+ fae->fae_oflag = oflag;
+ fae->fae_mode = mode;
+
+ STAILQ_INSERT_TAIL(&(*fa)->fa_list, fae, fae_list);
+ return (0);
+}
+
+int
+_DEFUN(posix_spawn_file_actions_adddup2, (fa, fildes, newfildes),
+ posix_spawn_file_actions_t *fa _AND
+ int fildes _AND
+ int newfildes)
+{
+ posix_spawn_file_actions_entry_t *fae;
+
+ if (fildes < 0 || newfildes < 0)
+ return (EBADF);
+
+ /* Allocate object */
+ fae = malloc(sizeof(posix_spawn_file_actions_entry_t));
+ if (fae == NULL)
+ return (errno);
+
+ /* Set values and store in queue */
+ fae->fae_action = FAE_DUP2;
+ fae->fae_fildes = fildes;
+ fae->fae_newfildes = newfildes;
+
+ STAILQ_INSERT_TAIL(&(*fa)->fa_list, fae, fae_list);
+ return (0);
+}
+
+int
+_DEFUN(posix_spawn_file_actions_addclose, (fa, fildes),
+ posix_spawn_file_actions_t *fa _AND
+ int fildes)
+{
+ posix_spawn_file_actions_entry_t *fae;
+
+ if (fildes < 0)
+ return (EBADF);
+
+ /* Allocate object */
+ fae = malloc(sizeof(posix_spawn_file_actions_entry_t));
+ if (fae == NULL)
+ return (errno);
+
+ /* Set values and store in queue */
+ fae->fae_action = FAE_CLOSE;
+ fae->fae_fildes = fildes;
+
+ STAILQ_INSERT_TAIL(&(*fa)->fa_list, fae, fae_list);
+ return (0);
+}
+
+/*
+ * Spawn attributes
+ */
+
+int
+_DEFUN(posix_spawnattr_init, (ret),
+ posix_spawnattr_t *ret)
+{
+ posix_spawnattr_t sa;
+
+ sa = calloc(1, sizeof(struct __posix_spawnattr));
+ if (sa == NULL)
+ return (errno);
+
+ /* Set defaults as specified by POSIX, cleared above */
+ *ret = sa;
+ return (0);
+}
+
+int
+_DEFUN(posix_spawnattr_destroy, (sa),
+ posix_spawnattr_t *sa)
+{
+ free(*sa);
+ return (0);
+}
+
+int
+_DEFUN(posix_spawnattr_getflags, (sa, flags),
+ _CONST posix_spawnattr_t * __restrict sa _AND
+ short * __restrict flags)
+{
+ *flags = (*sa)->sa_flags;
+ return (0);
+}
+
+int
+_DEFUN(posix_spawnattr_getpgroup, (sa, pgroup),
+ _CONST posix_spawnattr_t * __restrict sa _AND
+ pid_t * __restrict pgroup)
+{
+ *pgroup = (*sa)->sa_pgroup;
+ return (0);
+}
+
+int
+_DEFUN(posix_spawnattr_getschedparam, (sa, schedparam),
+ _CONST posix_spawnattr_t * __restrict sa _AND
+ struct sched_param * __restrict schedparam)
+{
+ *schedparam = (*sa)->sa_schedparam;
+ return (0);
+}
+
+int
+_DEFUN(posix_spawnattr_getschedpolicy, (sa, schedpolicy),
+ _CONST posix_spawnattr_t * __restrict sa _AND
+ int * __restrict schedpolicy)
+{
+ *schedpolicy = (*sa)->sa_schedpolicy;
+ return (0);
+}
+
+int
+_DEFUN(posix_spawnattr_getsigdefault, (sa, sigdefault),
+ _CONST posix_spawnattr_t * __restrict sa _AND
+ sigset_t * __restrict sigdefault)
+{
+ *sigdefault = (*sa)->sa_sigdefault;
+ return (0);
+}
+
+int
+_DEFUN(posix_spawnattr_getsigmask, (sa, sigmask),
+ _CONST posix_spawnattr_t * __restrict sa _AND
+ sigset_t * __restrict sigmask)
+{
+ *sigmask = (*sa)->sa_sigmask;
+ return (0);
+}
+
+int
+_DEFUN(posix_spawnattr_setflags, (sa, flags),
+ posix_spawnattr_t *sa _AND
+ short flags)
+{
+ (*sa)->sa_flags = flags;
+ return (0);
+}
+
+int
+_DEFUN(posix_spawnattr_setpgroup, (sa, pgroup),
+ posix_spawnattr_t *sa _AND
+ pid_t pgroup)
+{
+ (*sa)->sa_pgroup = pgroup;
+ return (0);
+}
+
+int
+_DEFUN(posix_spawnattr_setschedparam, (sa, schedparam),
+ posix_spawnattr_t * __restrict sa _AND
+ _CONST struct sched_param * __restrict schedparam)
+{
+ (*sa)->sa_schedparam = *schedparam;
+ return (0);
+}
+
+int
+_DEFUN(posix_spawnattr_setschedpolicy, (sa, schedpolicy),
+ posix_spawnattr_t *sa _AND
+ int schedpolicy)
+{
+ (*sa)->sa_schedpolicy = schedpolicy;
+ return (0);
+}
+
+int
+_DEFUN(posix_spawnattr_setsigdefault, (sa, sigdefault),
+ posix_spawnattr_t * __restrict sa _AND
+ _CONST sigset_t * __restrict sigdefault)
+{
+ (*sa)->sa_sigdefault = *sigdefault;
+ return (0);
+}
+
+int
+_DEFUN(posix_spawnattr_setsigmask, (sa, sigmask),
+ posix_spawnattr_t * __restrict sa _AND
+ _CONST sigset_t * __restrict sigmask)
+{
+ (*sa)->sa_sigmask = *sigmask;
+ return (0);
+}
+
+#endif /* !_NO_POSIX_SPAWN */
diff --git a/newlib/libc/posix/readdir.c b/newlib/libc/posix/readdir.c
index d3187e603..3e620e328 100644
--- a/newlib/libc/posix/readdir.c
+++ b/newlib/libc/posix/readdir.c
@@ -53,9 +53,6 @@ _DEFUN(readdir, (dirp),
#ifdef HAVE_DD_LOCK
__lock_acquire_recursive(dirp->dd_lock);
#endif
-
- if (dirp->dd_fd == -1)
- return NULL;
for (;;) {
if (dirp->dd_loc == 0) {
diff --git a/newlib/libc/posix/readdir_r.c b/newlib/libc/posix/readdir_r.c
index eafbeca6a..d13775b87 100644
--- a/newlib/libc/posix/readdir_r.c
+++ b/newlib/libc/posix/readdir_r.c
@@ -51,20 +51,15 @@ extern int getdents (int fd, void *dp, int count);
*/
int
_DEFUN(readdir_r, (dirp, dp, dpp),
- register DIR *dirp _AND
- struct dirent *dp _AND
- struct dirent **dpp) {
+ register DIR *__restrict dirp _AND
+ struct dirent *__restrict dp _AND
+ struct dirent **__restrict dpp) {
struct dirent *tmpdp;
#ifdef HAVE_DD_LOCK
__lock_acquire_recursive(dirp->dd_lock);
#endif
-
- if (dirp->dd_fd == -1) {
- *dpp = NULL;
- return errno = EBADF;
- }
for (;;) {
if (dirp->dd_loc == 0) {
diff --git a/newlib/libc/posix/regcomp.c b/newlib/libc/posix/regcomp.c
index bd90d2cdf..002f978cd 100644
--- a/newlib/libc/posix/regcomp.c
+++ b/newlib/libc/posix/regcomp.c
@@ -174,7 +174,7 @@ static int never = 0; /* for use in asserts; shuts lint up */
/*
- regcomp - interface for parser and compilation
- = extern int regcomp(regex_t *, const char *, int);
+ = extern int regcomp(regex_t *__restrict, const char *__restrict, int);
= #define REG_BASIC 0000
= #define REG_EXTENDED 0001
= #define REG_ICASE 0002
@@ -186,8 +186,8 @@ static int never = 0; /* for use in asserts; shuts lint up */
*/
int /* 0 success, otherwise REG_something */
regcomp(preg, pattern, cflags)
-regex_t *preg;
-const char *pattern;
+regex_t *__restrict preg;
+const char *__restrict pattern;
int cflags;
{
struct parse pa;
diff --git a/newlib/libc/posix/regerror.c b/newlib/libc/posix/regerror.c
index 3ae1c2586..a48d37c72 100644
--- a/newlib/libc/posix/regerror.c
+++ b/newlib/libc/posix/regerror.c
@@ -107,14 +107,15 @@ static struct rerr {
/*
- regerror - the interface to error numbers
- = extern size_t regerror(int, const regex_t *, char *, size_t);
+ = extern size_t regerror(int, const regex_t *__restrict,
+ = char *__restrict, size_t);
*/
/* ARGSUSED */
size_t
regerror(errcode, preg, errbuf, errbuf_size)
int errcode;
-const regex_t *preg;
-char *errbuf;
+const regex_t *__restrict preg;
+char *__restrict errbuf;
size_t errbuf_size;
{
struct rerr *r;
diff --git a/newlib/libc/posix/regex.3 b/newlib/libc/posix/regex.3
index d87164177..d0b45a8e7 100644
--- a/newlib/libc/posix/regex.3
+++ b/newlib/libc/posix/regex.3
@@ -51,16 +51,16 @@
.In sys/types.h
.In regex.h
.Ft int
-.Fn regcomp "regex_t *preg" "const char *pattern" "int cflags"
+.Fn regcomp "regex_t *restrict preg" "const char *_restrictpattern" "int cflags"
.Ft int
.Fo regexec
-.Fa "const regex_t *preg" "const char *string"
-.Fa "size_t nmatch" "regmatch_t pmatch[]" "int eflags"
+.Fa "const regex_t *_restrict preg" "const char *_restrict string"
+.Fa "size_t nmatch" "regmatch_t pmatch[_restrict]" "int eflags"
.Fc
.Ft size_t
.Fo regerror
-.Fa "int errcode" "const regex_t *preg"
-.Fa "char *errbuf" "size_t errbuf_size"
+.Fa "int errcode" "const regex_t *_restrict preg"
+.Fa "char *_restrict errbuf" "size_t errbuf_size"
.Fc
.Ft void
.Fn regfree "regex_t *preg"
diff --git a/newlib/libc/posix/regexec.c b/newlib/libc/posix/regexec.c
index 98f5ef611..6e39e9ead 100644
--- a/newlib/libc/posix/regexec.c
+++ b/newlib/libc/posix/regexec.c
@@ -140,8 +140,8 @@ static int nope = 0; /* for use in asserts; shuts lint up */
/*
- regexec - interface for matching
- = extern int regexec(const regex_t *, const char *, size_t, \
- = regmatch_t [], int);
+ = extern int regexec(const regex_t *__restrict, const char *__restrict,
+ = size_t, regmatch_t [__restrict], int);
= #define REG_NOTBOL 00001
= #define REG_NOTEOL 00002
= #define REG_STARTEND 00004
@@ -155,10 +155,10 @@ static int nope = 0; /* for use in asserts; shuts lint up */
*/
int /* 0 success, REG_NOMATCH failure */
regexec(preg, string, nmatch, pmatch, eflags)
-const regex_t *preg;
-const char *string;
+const regex_t *__restrict preg;
+const char *__restrict string;
size_t nmatch;
-regmatch_t pmatch[];
+regmatch_t pmatch[__restrict];
int eflags;
{
struct re_guts *g = preg->re_g;
diff --git a/newlib/libc/posix/wordexp.c b/newlib/libc/posix/wordexp.c
index 5c58e461a..3e90c3aee 100644
--- a/newlib/libc/posix/wordexp.c
+++ b/newlib/libc/posix/wordexp.c
@@ -29,7 +29,7 @@
that supports the --wordexp and --protected arguments to be present
on the system. It does not support the WRDE_UNDEF flag. */
int
-wordexp(const char *words, wordexp_t *pwordexp, int flags)
+wordexp(const char *__restrict words, wordexp_t *__restrict pwordexp, int flags)
{
FILE *f = NULL;
FILE *f_err = NULL;
diff --git a/newlib/libc/reent/Makefile.am b/newlib/libc/reent/Makefile.am
index 9e0602db2..ee11e864a 100644
--- a/newlib/libc/reent/Makefile.am
+++ b/newlib/libc/reent/Makefile.am
@@ -90,19 +90,6 @@ CHEWOUT_FILES = \
$(STDIO64_DEFS) \
writer.def
-SUFFIXES = .def .h
-
-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)/reent.tex >> $(TARGETDOC)
+CHAPTERS = reent.tex
$(lpfx)impure.$(oext): $(srcdir)/impure.c $(srcdir)/../include/sys/reent.h
-
-CLEANFILES = $(CHEWOUT_FILES) *.ref
diff --git a/newlib/libc/reent/Makefile.in b/newlib/libc/reent/Makefile.in
index 4be5f86f4..900c24356 100644
--- a/newlib/libc/reent/Makefile.in
+++ b/newlib/libc/reent/Makefile.in
@@ -334,6 +334,13 @@ libreent_la_LDFLAGS = -Xcompiler -nostdlib
@USE_LIBTOOL_FALSE@noinst_LIBRARIES = lib.a
@USE_LIBTOOL_FALSE@lib_a_SOURCES = $(GENERAL_SOURCES) $(ELIX_SOURCES)
@USE_LIBTOOL_FALSE@lib_a_CFLAGS = $(AM_CFLAGS)
+
+#
+# documentation rules
+#
+SUFFIXES = .def
+CHEW = ${top_builddir}/../doc/makedoc -f $(top_srcdir)/../doc/doc.str
+CLEANFILES = $(CHEWOUT_FILES) *.ref
CHEWOUT_FILES = \
closer.def \
reent.def \
@@ -355,14 +362,11 @@ CHEWOUT_FILES = \
$(STDIO64_DEFS) \
writer.def
-SUFFIXES = .def .h
-CHEW = ../../doc/makedoc -f $(srcdir)/../../doc/doc.str
-TARGETDOC = ../tmp.texi
-CLEANFILES = $(CHEWOUT_FILES) *.ref
+CHAPTERS = reent.tex
all: all-am
.SUFFIXES:
-.SUFFIXES: .def .h .c .lo .o .obj
+.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 \
@@ -772,8 +776,13 @@ objectlist.awk.in: $(noinst_LTLIBRARIES)
$(CHEW) < $< > $*.def 2> $*.ref
touch stmp-def
+TARGETDOC ?= ../tmp.texi
+
doc: $(CHEWOUT_FILES)
- cat $(srcdir)/reent.tex >> $(TARGETDOC)
+ for chapter in $(CHAPTERS) ; \
+ do \
+ cat $(srcdir)/$$chapter >> $(TARGETDOC) ; \
+ done
$(lpfx)impure.$(oext): $(srcdir)/impure.c $(srcdir)/../include/sys/reent.h
diff --git a/newlib/libc/reent/execr.c b/newlib/libc/reent/execr.c
index 744f56ae0..d8026703a 100644
--- a/newlib/libc/reent/execr.c
+++ b/newlib/libc/reent/execr.c
@@ -69,6 +69,7 @@ _DEFUN (_execve_r, (ptr, name, argv, env),
/*
+NEWPAGE
FUNCTION
<<_fork_r>>---Reentrant version of fork
@@ -107,6 +108,7 @@ _DEFUN (_fork_r, (ptr),
#endif
/*
+NEWPAGE
FUNCTION
<<_wait_r>>---Reentrant version of wait
diff --git a/newlib/libc/reent/signalr.c b/newlib/libc/reent/signalr.c
index 7d8aa7d71..161d53091 100644
--- a/newlib/libc/reent/signalr.c
+++ b/newlib/libc/reent/signalr.c
@@ -64,6 +64,7 @@ _DEFUN (_kill_r, (ptr, pid, sig),
}
/*
+NEWPAGE
FUNCTION
<<_getpid_r>>---Reentrant version of getpid
diff --git a/newlib/libc/search/Makefile.am b/newlib/libc/search/Makefile.am
index 27726fd4c..98920c3f4 100644
--- a/newlib/libc/search/Makefile.am
+++ b/newlib/libc/search/Makefile.am
@@ -14,9 +14,9 @@ GENERAL_SOURCES = \
## Following are EL/IX level 2 interfaces
if ELIX_LEVEL_1
-ELIX_SOURCES =
+ELIX_2_SOURCES =
else
-ELIX_SOURCES = \
+ELIX_2_SOURCES = \
hash.c \
hash_bigkey.c \
hash_buf.c \
@@ -32,35 +32,41 @@ ELIX_SOURCES = \
twalk.c
endif
+## Following are EL/IX level 4 interfaces
+if ELIX_LEVEL_1
+ELIX_4_SOURCES =
+else
+if ELIX_LEVEL_2
+ELIX_4_SOURCES =
+else
+if ELIX_LEVEL_3
+ELIX_4_SOURCES =
+else
+ELIX_4_SOURCES = \
+ bsd_qsort_r.c \
+ qsort_r.c
+endif !ELIX_LEVEL_3
+endif !ELIX_LEVEL_2
+endif !ELIX_LEVEL_1
+
libsearch_la_LDFLAGS = -Xcompiler -nostdlib
if USE_LIBTOOL
noinst_LTLIBRARIES = libsearch.la
-libsearch_la_SOURCES = $(GENERAL_SOURCES) $(ELIX_SOURCES)
+libsearch_la_SOURCES = $(GENERAL_SOURCES) $(ELIX_2_SOURCES) $(ELIX_4_SOURCES)
noinst_DATA = objectlist.awk.in
else
noinst_LIBRARIES = lib.a
-lib_a_SOURCES = $(GENERAL_SOURCES) $(ELIX_SOURCES)
+lib_a_SOURCES = $(GENERAL_SOURCES) $(ELIX_2_SOURCES) $(ELIX_4_SOURCES)
lib_a_CFLAGS = $(AM_CFLAGS)
noinst_DATA =
endif # USE_LIBTOOL
-SUFFIXES = .def
-
CHEWOUT_FILES = \
bsearch.def \
- qsort.def
-
-CHEW = ../../doc/makedoc -f $(srcdir)/../../doc/doc.str
-
-.c.def:
- $(CHEW) < $< > $*.def 2> $*.ref
- touch stmp-def
-
-TARGETDOC = ../tmp.texi
-
-doc: $(CHEWOUT_FILES)
+ qsort.def \
+ qsort_r.def
-CLEANFILES = $(CHEWOUT_FILES) *.ref
+CHAPTERS =
include $(srcdir)/../../Makefile.shared
diff --git a/newlib/libc/search/Makefile.in b/newlib/libc/search/Makefile.in
index 5aafc235a..0b7672ab7 100644
--- a/newlib/libc/search/Makefile.in
+++ b/newlib/libc/search/Makefile.in
@@ -86,18 +86,22 @@ am__objects_1 = lib_a-bsearch.$(OBJEXT) lib_a-qsort.$(OBJEXT)
@ELIX_LEVEL_1_FALSE@ lib_a-tfind.$(OBJEXT) \
@ELIX_LEVEL_1_FALSE@ lib_a-tsearch.$(OBJEXT) \
@ELIX_LEVEL_1_FALSE@ lib_a-twalk.$(OBJEXT)
+@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@am__objects_3 = lib_a-bsd_qsort_r.$(OBJEXT) \
+@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ lib_a-qsort_r.$(OBJEXT)
@USE_LIBTOOL_FALSE@am_lib_a_OBJECTS = $(am__objects_1) \
-@USE_LIBTOOL_FALSE@ $(am__objects_2)
+@USE_LIBTOOL_FALSE@ $(am__objects_2) $(am__objects_3)
lib_a_OBJECTS = $(am_lib_a_OBJECTS)
LTLIBRARIES = $(noinst_LTLIBRARIES)
libsearch_la_LIBADD =
-am__objects_3 = bsearch.lo qsort.lo
-@ELIX_LEVEL_1_FALSE@am__objects_4 = hash.lo hash_bigkey.lo hash_buf.lo \
+am__objects_4 = bsearch.lo qsort.lo
+@ELIX_LEVEL_1_FALSE@am__objects_5 = hash.lo hash_bigkey.lo hash_buf.lo \
@ELIX_LEVEL_1_FALSE@ hash_func.lo hash_log2.lo hash_page.lo \
@ELIX_LEVEL_1_FALSE@ hcreate.lo hcreate_r.lo tdelete.lo \
@ELIX_LEVEL_1_FALSE@ tdestroy.lo tfind.lo tsearch.lo twalk.lo
-@USE_LIBTOOL_TRUE@am_libsearch_la_OBJECTS = $(am__objects_3) \
-@USE_LIBTOOL_TRUE@ $(am__objects_4)
+@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@am__objects_6 = bsd_qsort_r.lo \
+@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ qsort_r.lo
+@USE_LIBTOOL_TRUE@am_libsearch_la_OBJECTS = $(am__objects_4) \
+@USE_LIBTOOL_TRUE@ $(am__objects_5) $(am__objects_6)
libsearch_la_OBJECTS = $(am_libsearch_la_OBJECTS)
libsearch_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
$(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
@@ -278,7 +282,7 @@ GENERAL_SOURCES = \
page.h \
qsort.c
-@ELIX_LEVEL_1_FALSE@ELIX_SOURCES = \
+@ELIX_LEVEL_1_FALSE@ELIX_2_SOURCES = \
@ELIX_LEVEL_1_FALSE@ hash.c \
@ELIX_LEVEL_1_FALSE@ hash_bigkey.c \
@ELIX_LEVEL_1_FALSE@ hash_buf.c \
@@ -293,22 +297,34 @@ GENERAL_SOURCES = \
@ELIX_LEVEL_1_FALSE@ tsearch.c \
@ELIX_LEVEL_1_FALSE@ twalk.c
-@ELIX_LEVEL_1_TRUE@ELIX_SOURCES =
+@ELIX_LEVEL_1_TRUE@ELIX_2_SOURCES =
+@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ELIX_4_SOURCES = \
+@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ bsd_qsort_r.c \
+@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ qsort_r.c
+
+@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_TRUE@ELIX_4_SOURCES =
+@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_TRUE@ELIX_4_SOURCES =
+@ELIX_LEVEL_1_TRUE@ELIX_4_SOURCES =
libsearch_la_LDFLAGS = -Xcompiler -nostdlib
@USE_LIBTOOL_TRUE@noinst_LTLIBRARIES = libsearch.la
-@USE_LIBTOOL_TRUE@libsearch_la_SOURCES = $(GENERAL_SOURCES) $(ELIX_SOURCES)
+@USE_LIBTOOL_TRUE@libsearch_la_SOURCES = $(GENERAL_SOURCES) $(ELIX_2_SOURCES) $(ELIX_4_SOURCES)
@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) $(ELIX_SOURCES)
+@USE_LIBTOOL_FALSE@lib_a_SOURCES = $(GENERAL_SOURCES) $(ELIX_2_SOURCES) $(ELIX_4_SOURCES)
@USE_LIBTOOL_FALSE@lib_a_CFLAGS = $(AM_CFLAGS)
-SUFFIXES = .def
CHEWOUT_FILES = \
bsearch.def \
- qsort.def
+ qsort.def \
+ qsort_r.def
+
+CHAPTERS =
-CHEW = ../../doc/makedoc -f $(srcdir)/../../doc/doc.str
-TARGETDOC = ../tmp.texi
+#
+# documentation rules
+#
+SUFFIXES = .def
+CHEW = ${top_builddir}/../doc/makedoc -f $(top_srcdir)/../doc/doc.str
CLEANFILES = $(CHEWOUT_FILES) *.ref
all: all-am
@@ -469,6 +485,18 @@ lib_a-twalk.o: twalk.c
lib_a-twalk.obj: twalk.c
$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-twalk.obj `if test -f 'twalk.c'; then $(CYGPATH_W) 'twalk.c'; else $(CYGPATH_W) '$(srcdir)/twalk.c'; fi`
+lib_a-bsd_qsort_r.o: bsd_qsort_r.c
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-bsd_qsort_r.o `test -f 'bsd_qsort_r.c' || echo '$(srcdir)/'`bsd_qsort_r.c
+
+lib_a-bsd_qsort_r.obj: bsd_qsort_r.c
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-bsd_qsort_r.obj `if test -f 'bsd_qsort_r.c'; then $(CYGPATH_W) 'bsd_qsort_r.c'; else $(CYGPATH_W) '$(srcdir)/bsd_qsort_r.c'; fi`
+
+lib_a-qsort_r.o: qsort_r.c
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-qsort_r.o `test -f 'qsort_r.c' || echo '$(srcdir)/'`qsort_r.c
+
+lib_a-qsort_r.obj: qsort_r.c
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-qsort_r.obj `if test -f 'qsort_r.c'; then $(CYGPATH_W) 'qsort_r.c'; else $(CYGPATH_W) '$(srcdir)/qsort_r.c'; fi`
+
mostlyclean-libtool:
-rm -f *.lo
@@ -646,17 +674,23 @@ uninstall-am:
mostlyclean-libtool pdf pdf-am ps ps-am tags uninstall \
uninstall-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
.c.def:
$(CHEW) < $< > $*.def 2> $*.ref
touch stmp-def
+TARGETDOC ?= ../tmp.texi
+
doc: $(CHEWOUT_FILES)
-objectlist.awk.in: $(noinst_LTLIBRARIES)
- -rm -f objectlist.awk.in
- for i in `ls *.lo` ; \
+ for chapter in $(CHAPTERS) ; \
do \
- echo $$i `pwd`/$$i >> objectlist.awk.in ; \
+ cat $(srcdir)/$$chapter >> $(TARGETDOC) ; \
done
# Tell versions [3.59,3.63) of GNU make to not export all variables.
diff --git a/newlib/libc/search/bsd_qsort_r.c b/newlib/libc/search/bsd_qsort_r.c
new file mode 100644
index 000000000..f4a3757b0
--- /dev/null
+++ b/newlib/libc/search/bsd_qsort_r.c
@@ -0,0 +1,2 @@
+#define I_AM_QSORT_R
+#include "qsort.c"
diff --git a/newlib/libc/search/hash.c b/newlib/libc/search/hash.c
index 2b102c8f8..5fea88a82 100644
--- a/newlib/libc/search/hash.c
+++ b/newlib/libc/search/hash.c
@@ -63,13 +63,13 @@ static int alloc_segs(HTAB *, int);
static int flush_meta(HTAB *);
static int hash_access(HTAB *, ACTION, DBT *, DBT *);
static int hash_close(DB *);
-static int hash_delete(const DB *, const DBT *, __uint32_t);
+static int hash_delete(const DB *, const DBT *, u_int);
static int hash_fd(const DB *);
-static int hash_get(const DB *, const DBT *, DBT *, __uint32_t);
-static int hash_put(const DB *, DBT *, const DBT *, __uint32_t);
+static int hash_get(const DB *, const DBT *, DBT *, u_int);
+static int hash_put(const DB *, DBT *, const DBT *, u_int);
static void *hash_realloc(SEGMENT **, int, int);
-static int hash_seq(const DB *, DBT *, DBT *, __uint32_t);
-static int hash_sync(const DB *, __uint32_t);
+static int hash_seq(const DB *, DBT *, DBT *, u_int);
+static int hash_sync(const DB *, u_int);
static int hdestroy(HTAB *);
static HTAB *init_hash(HTAB *, const char *, const HASHINFO *);
static int init_htab(HTAB *, int);
@@ -494,7 +494,7 @@ hdestroy(hashp)
static int
hash_sync(dbp, flags)
const DB *dbp;
- __uint32_t flags;
+ u_int flags;
{
HTAB *hashp;
@@ -573,7 +573,7 @@ hash_get(dbp, key, data, flag)
const DB *dbp;
const DBT *key;
DBT *data;
- __uint32_t flag;
+ u_int flag;
{
HTAB *hashp;
@@ -590,7 +590,7 @@ hash_put(dbp, key, data, flag)
const DB *dbp;
DBT *key;
const DBT *data;
- __uint32_t flag;
+ u_int flag;
{
HTAB *hashp;
@@ -612,7 +612,7 @@ static int
hash_delete(dbp, key, flag)
const DB *dbp;
const DBT *key;
- __uint32_t flag; /* Ignored */
+ u_int flag; /* Ignored */
{
HTAB *hashp;
@@ -764,7 +764,7 @@ static int
hash_seq(dbp, key, data, flag)
const DB *dbp;
DBT *key, *data;
- __uint32_t flag;
+ u_int flag;
{
__uint32_t bucket;
BUFHEAD *bufp;
diff --git a/newlib/libc/search/qsort.c b/newlib/libc/search/qsort.c
index d47f47099..bf6285f5e 100644
--- a/newlib/libc/search/qsort.c
+++ b/newlib/libc/search/qsort.c
@@ -53,11 +53,7 @@ PORTABILITY
* 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
+ * 3. 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.
*
@@ -75,13 +71,21 @@ PORTABILITY
*/
#include <_ansi.h>
+#include <sys/cdefs.h>
#include <stdlib.h>
#ifndef __GNUC__
#define inline
#endif
-static inline char *med3 _PARAMS((char *, char *, char *, int (*)()));
+#if defined(I_AM_QSORT_R)
+typedef int cmp_t(void *, const void *, const void *);
+#elif defined(I_AM_GNU_QSORT_R)
+typedef int cmp_t(const void *, const void *, void *);
+#else
+typedef int cmp_t(const void *, const void *);
+#endif
+static inline char *med3 _PARAMS((char *, char *, char *, cmp_t *, void *));
static inline void swapfunc _PARAMS((char *, char *, int, int));
#define min(a, b) (a) < (b) ? a : b
@@ -91,10 +95,10 @@ static inline void swapfunc _PARAMS((char *, char *, int, int));
*/
#define swapcode(TYPE, parmi, parmj, n) { \
long i = (n) / sizeof (TYPE); \
- register TYPE *pi = (TYPE *) (parmi); \
- register TYPE *pj = (TYPE *) (parmj); \
+ TYPE *pi = (TYPE *) (parmi); \
+ TYPE *pj = (TYPE *) (parmj); \
do { \
- register TYPE t = *pi; \
+ TYPE t = *pi; \
*pi++ = *pj; \
*pj++ = t; \
} while (--i > 0); \
@@ -110,7 +114,7 @@ _DEFUN(swapfunc, (a, b, n, swaptype),
int n _AND
int swaptype)
{
- if(swaptype <= 1)
+ if(swaptype <= 1)
swapcode(long, a, b, n)
else
swapcode(char, a, b, n)
@@ -126,33 +130,67 @@ _DEFUN(swapfunc, (a, b, n, swaptype),
#define vecswap(a, b, n) if ((n) > 0) swapfunc(a, b, n, swaptype)
+#if defined(I_AM_QSORT_R)
+#define CMP(t, x, y) (cmp((t), (x), (y)))
+#elif defined(I_AM_GNU_QSORT_R)
+#define CMP(t, x, y) (cmp((x), (y), (t)))
+#else
+#define CMP(t, x, y) (cmp((x), (y)))
+#endif
+
static inline char *
-_DEFUN(med3, (a, b, c, cmp),
+_DEFUN(med3, (a, b, c, cmp, thunk),
char *a _AND
char *b _AND
char *c _AND
- int (*cmp)())
+ cmp_t *cmp _AND
+ void *thunk
+#if !defined(I_AM_QSORT_R) && !defined(I_AM_GNU_QSORT_R)
+__unused
+#endif
+)
{
- return cmp(a, b) < 0 ?
- (cmp(b, c) < 0 ? b : (cmp(a, c) < 0 ? c : a ))
- :(cmp(b, c) > 0 ? b : (cmp(a, c) < 0 ? a : c ));
+ return CMP(thunk, a, b) < 0 ?
+ (CMP(thunk, b, c) < 0 ? b : (CMP(thunk, a, c) < 0 ? c : a ))
+ :(CMP(thunk, b, c) > 0 ? b : (CMP(thunk, a, c) < 0 ? a : c ));
}
+#if defined(I_AM_QSORT_R)
+void
+_DEFUN(__bsd_qsort_r, (a, n, es, thunk, cmp),
+ void *a _AND
+ size_t n _AND
+ size_t es _AND
+ void *thunk _AND
+ cmp_t *cmp)
+#elif defined(I_AM_GNU_QSORT_R)
+void
+_DEFUN(qsort_r, (a, n, es, cmp, thunk),
+ void *a _AND
+ size_t n _AND
+ size_t es _AND
+ cmp_t *cmp _AND
+ void *thunk)
+#else
+#define thunk NULL
void
_DEFUN(qsort, (a, n, es, cmp),
void *a _AND
size_t n _AND
size_t es _AND
- int (*cmp)())
+ cmp_t *cmp)
+#endif
{
char *pa, *pb, *pc, *pd, *pl, *pm, *pn;
- int d, r, swaptype, swap_cnt;
+ size_t d, r;
+ int cmp_result;
+ int swaptype, swap_cnt;
loop: SWAPINIT(a, es);
swap_cnt = 0;
if (n < 7) {
for (pm = (char *) a + es; pm < (char *) a + n * es; pm += es)
- for (pl = pm; pl > (char *) a && cmp(pl - es, pl) > 0;
+ for (pl = pm; pl > (char *) a && CMP(thunk, pl - es, pl) > 0;
pl -= es)
swap(pl, pl - es);
return;
@@ -163,27 +201,27 @@ loop: SWAPINIT(a, es);
pn = (char *) a + (n - 1) * es;
if (n > 40) {
d = (n / 8) * es;
- pl = med3(pl, pl + d, pl + 2 * d, cmp);
- pm = med3(pm - d, pm, pm + d, cmp);
- pn = med3(pn - 2 * d, pn - d, pn, cmp);
+ pl = med3(pl, pl + d, pl + 2 * d, cmp, thunk);
+ pm = med3(pm - d, pm, pm + d, cmp, thunk);
+ pn = med3(pn - 2 * d, pn - d, pn, cmp, thunk);
}
- pm = med3(pl, pm, pn, cmp);
+ pm = med3(pl, pm, pn, cmp, thunk);
}
swap(a, pm);
pa = pb = (char *) a + es;
pc = pd = (char *) a + (n - 1) * es;
for (;;) {
- while (pb <= pc && (r = cmp(pb, a)) <= 0) {
- if (r == 0) {
+ while (pb <= pc && (cmp_result = CMP(thunk, pb, a)) <= 0) {
+ if (cmp_result == 0) {
swap_cnt = 1;
swap(pa, pb);
pa += es;
}
pb += es;
}
- while (pb <= pc && (r = cmp(pc, a)) >= 0) {
- if (r == 0) {
+ while (pb <= pc && (cmp_result = CMP(thunk, pc, a)) >= 0) {
+ if (cmp_result == 0) {
swap_cnt = 1;
swap(pc, pd);
pd -= es;
@@ -199,7 +237,7 @@ loop: SWAPINIT(a, es);
}
if (swap_cnt == 0) { /* Switch to insertion sort */
for (pm = (char *) a + es; pm < (char *) a + n * es; pm += es)
- for (pl = pm; pl > (char *) a && cmp(pl - es, pl) > 0;
+ for (pl = pm; pl > (char *) a && CMP(thunk, pl - es, pl) > 0;
pl -= es)
swap(pl, pl - es);
return;
@@ -211,8 +249,14 @@ loop: SWAPINIT(a, es);
r = min(pd - pc, pn - pd - es);
vecswap(pb, pn - r, r);
if ((r = pb - pa) > es)
+#if defined(I_AM_QSORT_R)
+ __bsd_qsort_r(a, r / es, es, thunk, cmp);
+#elif defined(I_AM_GNU_QSORT_R)
+ qsort_r(a, r / es, es, cmp, thunk);
+#else
qsort(a, r / es, es, cmp);
- if ((r = pd - pc) > es) {
+#endif
+ if ((r = pd - pc) > es) {
/* Iterate rather than recurse to save stack space */
a = pn - r;
n = r / es;
diff --git a/newlib/libc/search/qsort_r.c b/newlib/libc/search/qsort_r.c
new file mode 100644
index 000000000..9073061f0
--- /dev/null
+++ b/newlib/libc/search/qsort_r.c
@@ -0,0 +1,57 @@
+/*
+FUNCTION
+<<qsort_r>>---sort an array
+
+INDEX
+ qsort_r
+
+ANSI_SYNOPSIS
+ #define _BSD_SOURCE
+ #include <stdlib.h>
+ void qsort_r(void *<[base]>, size_t <[nmemb]>, size_t <[size]>,
+ void *<[thunk]>,
+ int (*<[compar]>)(void*, const void *, const void *));
+
+ #define _GNU_SOURCE
+ #include <stdlib.h>
+ void qsort_r(void *<[base]>, size_t <[nmemb]>, size_t <[size]>,
+ int (*<[compar]>)(const void *, const void *, void *),
+ void *<[thunk]>);
+
+TRAD_SYNOPSIS
+ #include <stdlib.h>
+ qsort_r(<[base]>, <[nmemb]>, <[size]>, <[compar]>, <[thumb]>)
+ char *<[base]>;
+ size_t <[nmemb]>;
+ size_t <[size]>;
+ int (*<[compar]>)();
+ char *<[thumb]>;
+
+DESCRIPTION
+<<qsort_r>> sorts an array (beginning at <[base]>) of <[nmemb]> objects.
+<[size]> describes the size of each element of the array.
+
+You must supply a pointer to a comparison function, using the argument
+shown as <[compar]>. (This permits sorting objects of unknown
+properties.) There are two forms of this function, in each the
+comparison function is defined to accept three arguments, but in a
+different order. Two are pointers to an element of the array starting at
+<[base]>, and another being an arbitrary pointer <[thunk]>. The
+result of <<(*<[compar]>)>> must be negative if the first argument is
+less than the second, zero if the two arguments match, and positive if
+the first argument is greater than the second (where ``less than'' and
+``greater than'' refer to whatever arbitrary ordering is appropriate).
+
+The array is sorted in place; that is, when <<qsort_r>> returns, the
+array elements beginning at <[base]> have been reordered.
+
+RETURNS
+<<qsort_r>> does not return a result.
+
+PORTABILITY
+<<qsort_r>>, in various forms, appears in both BSD and glibc.
+*/
+
+#define _GNU_SOURCE
+#define I_AM_GNU_QSORT_R
+#include "qsort.c"
diff --git a/newlib/libc/search/tdelete.c b/newlib/libc/search/tdelete.c
index e75659913..b607b5421 100644
--- a/newlib/libc/search/tdelete.c
+++ b/newlib/libc/search/tdelete.c
@@ -27,8 +27,8 @@ __RCSID("$NetBSD: tdelete.c,v 1.2 1999/09/16 11:45:37 lukem Exp $");
/* delete node with given key */
void *
_DEFUN(tdelete, (vkey, vrootp, compar),
- const void *vkey _AND /* key to be deleted */
- void **vrootp _AND /* address of the root of tree */
+ const void *__restrict vkey _AND /* key to be deleted */
+ void **__restrict vrootp _AND /* address of the root of tree */
int (*compar)(const void *, const void *))
{
node_t **rootp = (node_t **)vrootp;
diff --git a/newlib/libc/signal/Makefile.am b/newlib/libc/signal/Makefile.am
index 7a7e64cbd..a93dba7a9 100644
--- a/newlib/libc/signal/Makefile.am
+++ b/newlib/libc/signal/Makefile.am
@@ -23,17 +23,4 @@ include $(srcdir)/../../Makefile.shared
CHEWOUT_FILES = psignal.def raise.def signal.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)/signal.tex >> $(TARGETDOC)
-
-CLEANFILES = $(CHEWOUT_FILES) *.ref
+CHAPTERS = signal.tex
diff --git a/newlib/libc/signal/Makefile.in b/newlib/libc/signal/Makefile.in
index 92a06f79f..f2d0b313e 100644
--- a/newlib/libc/signal/Makefile.in
+++ b/newlib/libc/signal/Makefile.in
@@ -261,11 +261,15 @@ libsignal_la_LDFLAGS = -Xcompiler -nostdlib
@USE_LIBTOOL_FALSE@noinst_LIBRARIES = lib.a
@USE_LIBTOOL_FALSE@lib_a_SOURCES = $(LIB_SOURCES)
@USE_LIBTOOL_FALSE@lib_a_CFLAGS = $(AM_CFLAGS)
-CHEWOUT_FILES = psignal.def raise.def signal.def
+
+#
+# documentation rules
+#
SUFFIXES = .def
-CHEW = ../../doc/makedoc -f $(srcdir)/../../doc/doc.str
-TARGETDOC = ../tmp.texi
+CHEW = ${top_builddir}/../doc/makedoc -f $(top_srcdir)/../doc/doc.str
CLEANFILES = $(CHEWOUT_FILES) *.ref
+CHEWOUT_FILES = psignal.def raise.def signal.def
+CHAPTERS = signal.tex
all: all-am
.SUFFIXES:
@@ -541,8 +545,13 @@ objectlist.awk.in: $(noinst_LTLIBRARIES)
$(CHEW) < $< > $*.def 2> $*.ref
touch stmp-def
+TARGETDOC ?= ../tmp.texi
+
doc: $(CHEWOUT_FILES)
- cat $(srcdir)/signal.tex >> $(TARGETDOC)
+ for chapter in $(CHAPTERS) ; \
+ do \
+ cat $(srcdir)/$$chapter >> $(TARGETDOC) ; \
+ done
# 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.
diff --git a/newlib/libc/signal/signal.tex b/newlib/libc/signal/signal.tex
index b36deb968..c4d48308f 100644
--- a/newlib/libc/signal/signal.tex
+++ b/newlib/libc/signal/signal.tex
@@ -10,7 +10,7 @@ error message and aborting your program, or ignoring the signal.
All systems support at least the following signals:
@table @code
@item SIGABRT
-Abnormal termination of a program; raised by the <<abort>> function.
+Abnormal termination of a program; raised by the @code{abort} function.
@item SIGFPE
A domain error in arithmetic, such as overflow, or division by zero.
diff --git a/newlib/libc/stdio/Makefile.am b/newlib/libc/stdio/Makefile.am
index a1ba475df..ea23de6fa 100644
--- a/newlib/libc/stdio/Makefile.am
+++ b/newlib/libc/stdio/Makefile.am
@@ -4,7 +4,27 @@ AUTOMAKE_OPTIONS = cygnus
INCLUDES = $(NEWLIB_CFLAGS) $(CROSS_CFLAGS) $(TARGET_CFLAGS)
+if NEWLIB_NANO_FORMATTED_IO
+GENERAL_INT_FORMATTED_IO_SOURCES =
+else
+GENERAL_INT_FORMATTED_IO_SOURCES = \
+ fiprintf.c \
+ fiscanf.c \
+ iprintf.c \
+ iscanf.c \
+ siprintf.c \
+ siscanf.c \
+ sniprintf.c \
+ vdiprintf.c \
+ viprintf.c \
+ viscanf.c \
+ vsiprintf.c \
+ vsiscanf.c \
+ vsniprintf.c
+endif
+
GENERAL_SOURCES = \
+ $(GENERAL_INT_FORMATTED_IO_SOURCES) \
clearerr.c \
fclose.c \
fdopen.c \
@@ -16,7 +36,6 @@ GENERAL_SOURCES = \
fgets.c \
fileno.c \
findfp.c \
- fiprintf.c \
flags.c \
fopen.c \
fprintf.c \
@@ -25,7 +44,6 @@ GENERAL_SOURCES = \
fread.c \
freopen.c \
fscanf.c \
- fiscanf.c \
fseek.c \
fsetpos.c \
ftell.c \
@@ -39,8 +57,6 @@ GENERAL_SOURCES = \
getdelim.c \
getline.c \
gets.c \
- iprintf.c \
- iscanf.c \
makebuf.c \
perror.c \
printf.c \
@@ -60,9 +76,6 @@ GENERAL_SOURCES = \
setbuffer.c \
setlinebuf.c \
setvbuf.c \
- siprintf.c \
- siscanf.c \
- sniprintf.c \
snprintf.c \
sprintf.c \
sscanf.c \
@@ -70,16 +83,10 @@ GENERAL_SOURCES = \
tmpfile.c \
tmpnam.c \
ungetc.c \
- vdiprintf.c \
vdprintf.c \
- viprintf.c \
- viscanf.c \
vprintf.c \
vscanf.c \
- vsiprintf.c \
- vsiscanf.c \
vsnprintf.c \
- vsniprintf.c \
vsprintf.c \
vsscanf.c \
wbuf.c \
@@ -89,8 +96,16 @@ GENERAL_SOURCES = \
if ELIX_LEVEL_1
ELIX_2_SOURCES =
else
-ELIX_2_SOURCES = \
+if NEWLIB_NANO_FORMATTED_IO
+ELIX_2_INT_FORMATTED_IO_SOURCES =
+else
+ELIX_2_INT_FORMATTED_IO_SOURCES = \
asiprintf.c \
+ vasiprintf.c
+
+endif !NEWLIB_NANO_FORMATTED_IO
+ELIX_2_SOURCES = \
+ $(ELIX_2_INT_FORMATTED_IO_SOURCES) \
asprintf.c \
fcloseall.c \
fseeko.c \
@@ -98,9 +113,8 @@ ELIX_2_SOURCES = \
getw.c \
mktemp.c \
putw.c \
- vasiprintf.c \
vasprintf.c
-endif
+endif !ELIX_LEVEL_1
## The following are EL/IX level 2 interfaces
if ELIX_LEVEL_1
@@ -112,31 +126,59 @@ else
if ELIX_LEVEL_3
ELIX_4_SOURCES =
else
-ELIX_4_SOURCES = \
+if NEWLIB_NANO_FORMATTED_IO
+ELIX_4_INT_FORMATTED_IO_SOURCES =
+else
+ELIX_4_INT_FORMATTED_IO_SOURCES = \
asniprintf.c \
- asnprintf.c \
diprintf.c \
+ vasniprintf.c
+
+endif !NEWLIB_NANO_FORMATTED_IO
+ELIX_4_SOURCES = \
+ $(ELIX_4_INT_FORMATTED_IO_SOURCES) \
+ asnprintf.c \
+ clearerr_u.c \
dprintf.c \
+ feof_u.c \
+ ferror_u.c \
+ fflush_u.c \
+ fgetc_u.c \
+ fgets_u.c \
fgetwc.c \
+ fgetwc_u.c \
fgetws.c \
+ fgetws_u.c \
+ fileno_u.c \
fmemopen.c \
fopencookie.c \
fpurge.c \
+ fputc_u.c \
+ fputs_u.c \
fputwc.c \
+ fputwc_u.c \
fputws.c \
+ fputws_u.c \
+ fread_u.c \
+ fsetlocking.c \
funopen.c \
fwide.c \
fwprintf.c \
+ fwrite_u.c \
fwscanf.c \
getwc.c \
+ getwc_u.c \
getwchar.c \
+ getwchar_u.c \
open_memstream.c \
putwc.c \
+ putwc_u.c \
putwchar.c \
+ putwchar_u.c \
+ stdio_ext.c \
swprintf.c \
swscanf.c \
ungetwc.c \
- vasniprintf.c \
vasnprintf.c \
vfwscanf.c \
vswprintf.c \
@@ -150,6 +192,25 @@ endif !ELIX_LEVEL_3
endif !ELIX_LEVEL_2
endif !ELIX_LEVEL_1
+if NEWLIB_NANO_FORMATTED_IO
+LIBADD_OBJS = \
+ $(lpfx)nano-vfprintf_float.$(oext) \
+ $(lpfx)nano-svfprintf.$(oext) \
+ $(lpfx)nano-svfscanf.$(oext) \
+ $(lpfx)nano-vfprintf.$(oext) \
+ $(lpfx)nano-vfprintf_i.$(oext) \
+ $(lpfx)nano-vfscanf.$(oext) \
+ $(lpfx)nano-vfscanf_i.$(oext) \
+ $(lpfx)nano-vfscanf_float.$(oext) \
+ $(lpfx)svfiwprintf.$(oext) \
+ $(lpfx)svfwprintf.$(oext) \
+ $(lpfx)vfiwprintf.$(oext) \
+ $(lpfx)vfwprintf.$(oext) \
+ $(lpfx)svfiwscanf.$(oext) \
+ $(lpfx)svfwscanf.$(oext) \
+ $(lpfx)vfiwscanf.$(oext) \
+ $(lpfx)vfwscanf.$(oext)
+else
LIBADD_OBJS = \
$(lpfx)svfiprintf.$(oext) $(lpfx)svfprintf.$(oext) \
$(lpfx)svfiscanf.$(oext) $(lpfx)svfscanf.$(oext) \
@@ -159,6 +220,7 @@ LIBADD_OBJS = \
$(lpfx)vfiwprintf.$(oext) $(lpfx)vfwprintf.$(oext) \
$(lpfx)svfiwscanf.$(oext) $(lpfx)svfwscanf.$(oext) \
$(lpfx)vfiwscanf.$(oext) $(lpfx)vfwscanf.$(oext)
+endif
libstdio_la_LDFLAGS = -Xcompiler -nostdlib
@@ -181,8 +243,31 @@ endif # USE_LIBTOOL
include $(srcdir)/../../Makefile.shared
-# This rule is needed so that libtool compiles vfiprintf before vfprintf. Otherwise
-# libtool moves vfprintf.o and subsequently can't find it.
+
+# Though small footprint nano-formatted-IO implementation is used
+# when NEWLIB_NANO_FORMATTED_IO is enabled, we keep all rules for
+# the other implementation of formatted IO including all i-family
+# functions. The object files in !NEWLIB_NANO_FORMATTED_IO version
+# implementation will be neither compiled nor archived into final
+# library, because they are not depended on by final makefile target.
+
+if NEWLIB_NANO_FORMATTED_IO
+# Rules compiling small-footprint nano-formatted-io implementation.
+$(lpfx)nano-vfprintf.$(oext): nano-vfprintf.c
+ $(LIB_COMPILE) -fshort-enums -c $(srcdir)/nano-vfprintf.c -o $@
+
+$(lpfx)nano-vfprintf_i.$(oext): nano-vfprintf_i.c
+ $(LIB_COMPILE) -fshort-enums -c $(srcdir)/nano-vfprintf_i.c -o $@
+
+$(lpfx)nano-vfprintf_float.$(oext): nano-vfprintf_float.c
+ $(LIB_COMPILE) -fshort-enums -c $(srcdir)/nano-vfprintf_float.c -o $@
+
+$(lpfx)nano-svfprintf.$(oext): nano-vfprintf.c
+ $(LIB_COMPILE) -fshort-enums -DSTRING_ONLY -c $(srcdir)/nano-vfprintf.c -o $@
+endif
+
+# This rule is needed so that libtool compiles vfiprintf before vfprintf.
+# Otherwise libtool moves vfprintf.o and subsequently can't find it.
$(lpfx)vfprintf.$(oext): vfprintf.c
$(LIB_COMPILE) -fshort-enums -c $(srcdir)/vfprintf.c -o $@
@@ -208,6 +293,21 @@ $(lpfx)svfwprintf.$(oext): vfwprintf.c
$(lpfx)svfiwprintf.$(oext): vfwprintf.c
$(LIB_COMPILE) -fshort-enums -DINTEGER_ONLY -DSTRING_ONLY -c $(srcdir)/vfwprintf.c -o $@
+if NEWLIB_NANO_FORMATTED_IO
+# Rules compiling small-footprint nano-formatted-io implementation.
+$(lpfx)nano-vfscanf.$(oext): nano-vfscanf.c
+ $(LIB_COMPILE) -c $(srcdir)/nano-vfscanf.c -o $@
+
+$(lpfx)nano-vfscanf_i.$(oext): nano-vfscanf_i.c
+ $(LIB_COMPILE) -c $(srcdir)/nano-vfscanf_i.c -o $@
+
+$(lpfx)nano-vfscanf_float.$(oext): nano-vfscanf_float.c
+ $(LIB_COMPILE) -c $(srcdir)/nano-vfscanf_float.c -o $@
+
+$(lpfx)nano-svfscanf.$(oext): nano-vfscanf.c
+ $(LIB_COMPILE) -DSTRING_ONLY -c $(srcdir)/nano-vfscanf.c -o $@
+endif
+
$(lpfx)vfscanf.$(oext): vfscanf.c
$(LIB_COMPILE) -c $(srcdir)/vfscanf.c -o $@
@@ -232,9 +332,27 @@ $(lpfx)svfwscanf.$(oext): vfwscanf.c
$(lpfx)svfiwscanf.$(oext): vfwscanf.c
$(LIB_COMPILE) -DINTEGER_ONLY -DSTRING_ONLY -c $(srcdir)/vfwscanf.c -o $@
+if NEWLIB_NANO_FORMATTED_IO
+CHEWOUT_INT_FORMATTED_IO_FILES =\
+ nano-vfprintf.def \
+ nano-vfprintf_i.def \
+ nano-vfprintf_float.def \
+ nano-vfscanf.def \
+ nano-vfscanf_i.def \
+ nano-vfscanf_float.def
+else
+CHEWOUT_INT_FORMATTED_IO_FILES =\
+ diprintf.def \
+ siprintf.def \
+ siscanf.def \
+ vfprintf.def \
+ vfscanf.def \
+ viprintf.def \
+ viscanf.def
+endif
CHEWOUT_FILES = \
+ $(CHEWOUT_INT_FORMATTED_IO_FILES) \
clearerr.def \
- diprintf.def \
dprintf.def \
fclose.def \
fcloseall.def \
@@ -259,6 +377,7 @@ CHEWOUT_FILES = \
fread.def \
freopen.def \
fseek.def \
+ fsetlocking.def \
fsetpos.def \
ftell.def \
funopen.def \
@@ -272,7 +391,6 @@ CHEWOUT_FILES = \
getline.def \
gets.def \
getw.def \
- getwc.def \
getwchar.def \
mktemp.def \
open_memstream.def \
@@ -283,7 +401,6 @@ CHEWOUT_FILES = \
putchar_u.def \
puts.def \
putw.def \
- putwc.def \
putwchar.def \
remove.def \
rename.def \
@@ -292,54 +409,58 @@ CHEWOUT_FILES = \
setbuffer.def \
setlinebuf.def \
setvbuf.def \
- siprintf.def \
- siscanf.def \
sprintf.def \
sscanf.def \
+ stdio_ext.def \
swprintf.def \
swscanf.def \
tmpfile.def \
tmpnam.def \
ungetc.def \
ungetwc.def \
- vfprintf.def \
- vfscanf.def \
vfwprintf.def \
- vfwscanf.def \
- viprintf.def \
- viscanf.def
-
-SUFFIXES = .def
-
-CHEW = ../../doc/makedoc -f $(srcdir)/../../doc/doc.str
-
-.c.def:
- $(CHEW) < $< > $*.def 2> $*.ref
- touch stmp-def
+ vfwscanf.def
-TARGETDOC = ../tmp.texi
-
-doc: $(CHEWOUT_FILES)
- cat $(srcdir)/stdio.tex >> $(TARGETDOC)
-
-CLEANFILES = $(CHEWOUT_FILES) *.ref
+CHAPTERS = stdio.tex
+$(lpfx)clearerr.$(oext): local.h
+$(lpfx)clearerr_u.$(oext): local.h
$(lpfx)fclose.$(oext): local.h
$(lpfx)fdopen.$(oext): local.h
+$(lpfx)feof.$(oext): local.h
+$(lpfx)feof_u.$(oext): local.h
+$(lpfx)ferror.$(oext): local.h
+$(lpfx)ferror_u.$(oext): local.h
$(lpfx)fflush.$(oext): local.h
+$(lpfx)fflush_u.$(oext): fflush.c
+$(lpfx)fgetc.$(oext): local.h
+$(lpfx)fgetc_u.$(oext): local.h
+$(lpfx)fgets.$(oext): local.h
+$(lpfx)fgets_u.$(oext): fgets.c
$(lpfx)fgetwc.$(oext): local.h
+$(lpfx)fgetwc_u.$(oext): local.h
$(lpfx)fgetws.$(oext): local.h
+$(lpfx)fgetws_u.$(oext): fgetws.c
+$(lpfx)fileno.$(oext): local.h
+$(lpfx)fileno_u.$(oext): local.h
$(lpfx)findfp.$(oext): local.h
$(lpfx)fmemopen.$(oext): local.h
$(lpfx)fopen.$(oext): local.h
$(lpfx)fopencookie.$(oext): local.h
$(lpfx)fpurge.$(oext): local.h
+$(lpfx)fputc.$(oext): local.h
+$(lpfx)fputc_u.$(oext): local.h
$(lpfx)fputs.$(oext): fvwrite.h
+$(lpfx)fputs_u.$(oext): fputs.c
$(lpfx)fputwc.$(oext): local.h
+$(lpfx)fputwc_u.$(oext): local.h
$(lpfx)fputws.$(oext): local.h fvwrite.h
+$(lpfx)fputws_u.$(oext): fputws.c
$(lpfx)fread.$(oext): local.h
+$(lpfx)fread_u.$(oext): fread.c
$(lpfx)freopen.$(oext): local.h
$(lpfx)fseek.$(oext): local.h
+$(lpfx)fsetlocking.$(oext): local.h
$(lpfx)ftell.$(oext): local.h
$(lpfx)funopen.$(oext): local.h
$(lpfx)fvwrite.$(oext): local.h fvwrite.h
@@ -347,15 +468,20 @@ $(lpfx)fwalk.$(oext): local.h
$(lpfx)fwide.$(oext): local.h
$(lpfx)fwprintf.$(oext): local.h
$(lpfx)fwrite.$(oext): local.h fvwrite.h
+$(lpfx)fwrite_u.$(oext): fwrite.c
$(lpfx)fwscanf.$(oext): local.h
$(lpfx)getwc.$(oext): local.h
+$(lpfx)getwc_u.$(oext): local.h
$(lpfx)getwchar.$(oext): local.h
+$(lpfx)getwchar_u.$(oext): local.h
$(lpfx)iscanf.$(oext): local.h
$(lpfx)makebuf.$(oext): local.h
$(lpfx)open_memstream.$(oext): local.h
$(lpfx)puts.$(oext): fvwrite.h
$(lpfx)putwc.$(oext): local.h
+$(lpfx)putwc_u.$(oext): local.h
$(lpfx)putwchar.$(oext): local.h
+$(lpfx)putwchar_u.$(oext): local.h
$(lpfx)refill.$(oext): local.h
$(lpfx)scanf.$(oext): local.h
$(lpfx)setbuf.$(oext): local.h
@@ -366,6 +492,10 @@ $(lpfx)sniprintf.$(oext): local.h
$(lpfx)sprintf.$(oext): local.h
$(lpfx)sscanf.$(oext): local.h
$(lpfx)stdio.$(oext): local.h
+if NEWLIB_NANO_FORMATTED_IO
+$(lpfx)nano-svfprintf.$(oext): local.h nano-vfprintf_local.h
+$(lpfx)nano-svfscanf.$(oext): local.h nano-vfscanf_local.h
+endif
$(lpfx)svfiprintf.$(oext): local.h
$(lpfx)svfiscanf.$(oext): local.h floatio.h
$(lpfx)svfprintf.$(oext): local.h
@@ -374,6 +504,14 @@ $(lpfx)swprintf.$(oext): local.h
$(lpfx)swscanf.$(oext): local.h
$(lpfx)ungetc.$(oext): local.h
$(lpfx)ungetwc.$(oext): local.h
+if NEWLIB_NANO_FORMATTED_IO
+$(lpfx)nano-vfprintf.$(oext): local.h nano-vfprintf_local.h
+$(lpfx)nano-vfprintf_i.$(oext): local.h nano-vfprintf_local.h
+$(lpfx)nano-vfprintf_float.$(oext): local.h floatio.h nano-vfprintf_local.h
+$(lpfx)nano-vfscanf.$(oext): local.h nano-vfscanf_local.h
+$(lpfx)nano-vfscanf_i.$(oext): local.h nano-vfscanf_local.h
+$(lpfx)nano-vfscanf_float.$(oext): local.h floatio.h nano-vfscanf_local.h
+endif
$(lpfx)vfiprintf.$(oext): local.h
$(lpfx)vfiscanf.$(oext): local.h floatio.h
$(lpfx)vfprintf.$(oext): local.h
diff --git a/newlib/libc/stdio/Makefile.in b/newlib/libc/stdio/Makefile.in
index a42b0e66d..26dcbd135 100644
--- a/newlib/libc/stdio/Makefile.in
+++ b/newlib/libc/stdio/Makefile.in
@@ -71,47 +71,57 @@ CONFIG_CLEAN_VPATH_FILES =
LIBRARIES = $(noinst_LIBRARIES)
ARFLAGS = cru
lib_a_AR = $(AR) $(ARFLAGS)
-am__objects_1 = lib_a-clearerr.$(OBJEXT) lib_a-fclose.$(OBJEXT) \
- lib_a-fdopen.$(OBJEXT) lib_a-feof.$(OBJEXT) \
- lib_a-ferror.$(OBJEXT) lib_a-fflush.$(OBJEXT) \
- lib_a-fgetc.$(OBJEXT) lib_a-fgetpos.$(OBJEXT) \
- lib_a-fgets.$(OBJEXT) lib_a-fileno.$(OBJEXT) \
- lib_a-findfp.$(OBJEXT) lib_a-fiprintf.$(OBJEXT) \
+@NEWLIB_NANO_FORMATTED_IO_FALSE@am__objects_1 = \
+@NEWLIB_NANO_FORMATTED_IO_FALSE@ lib_a-fiprintf.$(OBJEXT) \
+@NEWLIB_NANO_FORMATTED_IO_FALSE@ lib_a-fiscanf.$(OBJEXT) \
+@NEWLIB_NANO_FORMATTED_IO_FALSE@ lib_a-iprintf.$(OBJEXT) \
+@NEWLIB_NANO_FORMATTED_IO_FALSE@ lib_a-iscanf.$(OBJEXT) \
+@NEWLIB_NANO_FORMATTED_IO_FALSE@ lib_a-siprintf.$(OBJEXT) \
+@NEWLIB_NANO_FORMATTED_IO_FALSE@ lib_a-siscanf.$(OBJEXT) \
+@NEWLIB_NANO_FORMATTED_IO_FALSE@ lib_a-sniprintf.$(OBJEXT) \
+@NEWLIB_NANO_FORMATTED_IO_FALSE@ lib_a-vdiprintf.$(OBJEXT) \
+@NEWLIB_NANO_FORMATTED_IO_FALSE@ lib_a-viprintf.$(OBJEXT) \
+@NEWLIB_NANO_FORMATTED_IO_FALSE@ lib_a-viscanf.$(OBJEXT) \
+@NEWLIB_NANO_FORMATTED_IO_FALSE@ lib_a-vsiprintf.$(OBJEXT) \
+@NEWLIB_NANO_FORMATTED_IO_FALSE@ lib_a-vsiscanf.$(OBJEXT) \
+@NEWLIB_NANO_FORMATTED_IO_FALSE@ lib_a-vsniprintf.$(OBJEXT)
+am__objects_2 = $(am__objects_1) lib_a-clearerr.$(OBJEXT) \
+ lib_a-fclose.$(OBJEXT) lib_a-fdopen.$(OBJEXT) \
+ lib_a-feof.$(OBJEXT) lib_a-ferror.$(OBJEXT) \
+ lib_a-fflush.$(OBJEXT) lib_a-fgetc.$(OBJEXT) \
+ lib_a-fgetpos.$(OBJEXT) lib_a-fgets.$(OBJEXT) \
+ lib_a-fileno.$(OBJEXT) lib_a-findfp.$(OBJEXT) \
lib_a-flags.$(OBJEXT) lib_a-fopen.$(OBJEXT) \
lib_a-fprintf.$(OBJEXT) lib_a-fputc.$(OBJEXT) \
lib_a-fputs.$(OBJEXT) lib_a-fread.$(OBJEXT) \
lib_a-freopen.$(OBJEXT) lib_a-fscanf.$(OBJEXT) \
- lib_a-fiscanf.$(OBJEXT) lib_a-fseek.$(OBJEXT) \
- lib_a-fsetpos.$(OBJEXT) lib_a-ftell.$(OBJEXT) \
- lib_a-fvwrite.$(OBJEXT) lib_a-fwalk.$(OBJEXT) \
- lib_a-fwrite.$(OBJEXT) lib_a-getc.$(OBJEXT) \
- lib_a-getchar.$(OBJEXT) lib_a-getc_u.$(OBJEXT) \
- lib_a-getchar_u.$(OBJEXT) lib_a-getdelim.$(OBJEXT) \
- lib_a-getline.$(OBJEXT) lib_a-gets.$(OBJEXT) \
- lib_a-iprintf.$(OBJEXT) lib_a-iscanf.$(OBJEXT) \
- lib_a-makebuf.$(OBJEXT) lib_a-perror.$(OBJEXT) \
- lib_a-printf.$(OBJEXT) lib_a-putc.$(OBJEXT) \
- lib_a-putchar.$(OBJEXT) lib_a-putc_u.$(OBJEXT) \
- lib_a-putchar_u.$(OBJEXT) lib_a-puts.$(OBJEXT) \
- lib_a-refill.$(OBJEXT) lib_a-remove.$(OBJEXT) \
- lib_a-rename.$(OBJEXT) lib_a-rewind.$(OBJEXT) \
- lib_a-rget.$(OBJEXT) lib_a-scanf.$(OBJEXT) \
- lib_a-sccl.$(OBJEXT) lib_a-setbuf.$(OBJEXT) \
- lib_a-setbuffer.$(OBJEXT) lib_a-setlinebuf.$(OBJEXT) \
- lib_a-setvbuf.$(OBJEXT) lib_a-siprintf.$(OBJEXT) \
- lib_a-siscanf.$(OBJEXT) lib_a-sniprintf.$(OBJEXT) \
+ lib_a-fseek.$(OBJEXT) lib_a-fsetpos.$(OBJEXT) \
+ lib_a-ftell.$(OBJEXT) lib_a-fvwrite.$(OBJEXT) \
+ lib_a-fwalk.$(OBJEXT) lib_a-fwrite.$(OBJEXT) \
+ lib_a-getc.$(OBJEXT) lib_a-getchar.$(OBJEXT) \
+ lib_a-getc_u.$(OBJEXT) lib_a-getchar_u.$(OBJEXT) \
+ lib_a-getdelim.$(OBJEXT) lib_a-getline.$(OBJEXT) \
+ lib_a-gets.$(OBJEXT) lib_a-makebuf.$(OBJEXT) \
+ lib_a-perror.$(OBJEXT) lib_a-printf.$(OBJEXT) \
+ lib_a-putc.$(OBJEXT) lib_a-putchar.$(OBJEXT) \
+ lib_a-putc_u.$(OBJEXT) lib_a-putchar_u.$(OBJEXT) \
+ lib_a-puts.$(OBJEXT) lib_a-refill.$(OBJEXT) \
+ lib_a-remove.$(OBJEXT) lib_a-rename.$(OBJEXT) \
+ lib_a-rewind.$(OBJEXT) lib_a-rget.$(OBJEXT) \
+ lib_a-scanf.$(OBJEXT) lib_a-sccl.$(OBJEXT) \
+ lib_a-setbuf.$(OBJEXT) lib_a-setbuffer.$(OBJEXT) \
+ lib_a-setlinebuf.$(OBJEXT) lib_a-setvbuf.$(OBJEXT) \
lib_a-snprintf.$(OBJEXT) lib_a-sprintf.$(OBJEXT) \
lib_a-sscanf.$(OBJEXT) lib_a-stdio.$(OBJEXT) \
lib_a-tmpfile.$(OBJEXT) lib_a-tmpnam.$(OBJEXT) \
- lib_a-ungetc.$(OBJEXT) lib_a-vdiprintf.$(OBJEXT) \
- lib_a-vdprintf.$(OBJEXT) lib_a-viprintf.$(OBJEXT) \
- lib_a-viscanf.$(OBJEXT) lib_a-vprintf.$(OBJEXT) \
- lib_a-vscanf.$(OBJEXT) lib_a-vsiprintf.$(OBJEXT) \
- lib_a-vsiscanf.$(OBJEXT) lib_a-vsnprintf.$(OBJEXT) \
- lib_a-vsniprintf.$(OBJEXT) lib_a-vsprintf.$(OBJEXT) \
+ lib_a-ungetc.$(OBJEXT) lib_a-vdprintf.$(OBJEXT) \
+ lib_a-vprintf.$(OBJEXT) lib_a-vscanf.$(OBJEXT) \
+ lib_a-vsnprintf.$(OBJEXT) lib_a-vsprintf.$(OBJEXT) \
lib_a-vsscanf.$(OBJEXT) lib_a-wbuf.$(OBJEXT) \
lib_a-wsetup.$(OBJEXT)
-@ELIX_LEVEL_1_FALSE@am__objects_2 = lib_a-asiprintf.$(OBJEXT) \
+@ELIX_LEVEL_1_FALSE@@NEWLIB_NANO_FORMATTED_IO_FALSE@am__objects_3 = lib_a-asiprintf.$(OBJEXT) \
+@ELIX_LEVEL_1_FALSE@@NEWLIB_NANO_FORMATTED_IO_FALSE@ lib_a-vasiprintf.$(OBJEXT)
+@ELIX_LEVEL_1_FALSE@am__objects_4 = $(am__objects_3) \
@ELIX_LEVEL_1_FALSE@ lib_a-asprintf.$(OBJEXT) \
@ELIX_LEVEL_1_FALSE@ lib_a-fcloseall.$(OBJEXT) \
@ELIX_LEVEL_1_FALSE@ lib_a-fseeko.$(OBJEXT) \
@@ -119,32 +129,53 @@ am__objects_1 = lib_a-clearerr.$(OBJEXT) lib_a-fclose.$(OBJEXT) \
@ELIX_LEVEL_1_FALSE@ lib_a-getw.$(OBJEXT) \
@ELIX_LEVEL_1_FALSE@ lib_a-mktemp.$(OBJEXT) \
@ELIX_LEVEL_1_FALSE@ lib_a-putw.$(OBJEXT) \
-@ELIX_LEVEL_1_FALSE@ lib_a-vasiprintf.$(OBJEXT) \
@ELIX_LEVEL_1_FALSE@ lib_a-vasprintf.$(OBJEXT)
-@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@am__objects_3 = lib_a-asniprintf.$(OBJEXT) \
+@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@@NEWLIB_NANO_FORMATTED_IO_FALSE@am__objects_5 = lib_a-asniprintf.$(OBJEXT) \
+@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@@NEWLIB_NANO_FORMATTED_IO_FALSE@ lib_a-diprintf.$(OBJEXT) \
+@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@@NEWLIB_NANO_FORMATTED_IO_FALSE@ lib_a-vasniprintf.$(OBJEXT)
+@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@am__objects_6 = $(am__objects_5) \
@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ lib_a-asnprintf.$(OBJEXT) \
-@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ lib_a-diprintf.$(OBJEXT) \
+@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ lib_a-clearerr_u.$(OBJEXT) \
@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ lib_a-dprintf.$(OBJEXT) \
+@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ lib_a-feof_u.$(OBJEXT) \
+@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ lib_a-ferror_u.$(OBJEXT) \
+@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ lib_a-fflush_u.$(OBJEXT) \
+@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ lib_a-fgetc_u.$(OBJEXT) \
+@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ lib_a-fgets_u.$(OBJEXT) \
@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ lib_a-fgetwc.$(OBJEXT) \
+@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ lib_a-fgetwc_u.$(OBJEXT) \
@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ lib_a-fgetws.$(OBJEXT) \
+@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ lib_a-fgetws_u.$(OBJEXT) \
+@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ lib_a-fileno_u.$(OBJEXT) \
@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ lib_a-fmemopen.$(OBJEXT) \
@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ lib_a-fopencookie.$(OBJEXT) \
@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ lib_a-fpurge.$(OBJEXT) \
+@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ lib_a-fputc_u.$(OBJEXT) \
+@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ lib_a-fputs_u.$(OBJEXT) \
@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ lib_a-fputwc.$(OBJEXT) \
+@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ lib_a-fputwc_u.$(OBJEXT) \
@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ lib_a-fputws.$(OBJEXT) \
+@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ lib_a-fputws_u.$(OBJEXT) \
+@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ lib_a-fread_u.$(OBJEXT) \
+@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ lib_a-fsetlocking.$(OBJEXT) \
@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ lib_a-funopen.$(OBJEXT) \
@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ lib_a-fwide.$(OBJEXT) \
@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ lib_a-fwprintf.$(OBJEXT) \
+@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ lib_a-fwrite_u.$(OBJEXT) \
@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ lib_a-fwscanf.$(OBJEXT) \
@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ lib_a-getwc.$(OBJEXT) \
+@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ lib_a-getwc_u.$(OBJEXT) \
@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ lib_a-getwchar.$(OBJEXT) \
+@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ lib_a-getwchar_u.$(OBJEXT) \
@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ lib_a-open_memstream.$(OBJEXT) \
@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ lib_a-putwc.$(OBJEXT) \
+@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ lib_a-putwc_u.$(OBJEXT) \
@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ lib_a-putwchar.$(OBJEXT) \
+@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ lib_a-putwchar_u.$(OBJEXT) \
+@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ lib_a-stdio_ext.$(OBJEXT) \
@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ lib_a-swprintf.$(OBJEXT) \
@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ lib_a-swscanf.$(OBJEXT) \
@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ lib_a-ungetwc.$(OBJEXT) \
-@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ lib_a-vasniprintf.$(OBJEXT) \
@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ lib_a-vasnprintf.$(OBJEXT) \
@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ lib_a-vfwscanf.$(OBJEXT) \
@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ lib_a-vswprintf.$(OBJEXT) \
@@ -153,53 +184,81 @@ am__objects_1 = lib_a-clearerr.$(OBJEXT) lib_a-fclose.$(OBJEXT) \
@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ lib_a-vwscanf.$(OBJEXT) \
@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ lib_a-wprintf.$(OBJEXT) \
@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ lib_a-wscanf.$(OBJEXT)
-@USE_LIBTOOL_FALSE@am_lib_a_OBJECTS = $(am__objects_1) \
-@USE_LIBTOOL_FALSE@ $(am__objects_2) $(am__objects_3)
+@USE_LIBTOOL_FALSE@am_lib_a_OBJECTS = $(am__objects_2) \
+@USE_LIBTOOL_FALSE@ $(am__objects_4) $(am__objects_6)
lib_a_OBJECTS = $(am_lib_a_OBJECTS)
LTLIBRARIES = $(noinst_LTLIBRARIES)
-am__objects_4 = clearerr.lo fclose.lo fdopen.lo feof.lo ferror.lo \
- fflush.lo fgetc.lo fgetpos.lo fgets.lo fileno.lo findfp.lo \
- fiprintf.lo flags.lo fopen.lo fprintf.lo fputc.lo fputs.lo \
- fread.lo freopen.lo fscanf.lo fiscanf.lo fseek.lo fsetpos.lo \
+@NEWLIB_NANO_FORMATTED_IO_FALSE@am__objects_7 = fiprintf.lo fiscanf.lo \
+@NEWLIB_NANO_FORMATTED_IO_FALSE@ iprintf.lo iscanf.lo \
+@NEWLIB_NANO_FORMATTED_IO_FALSE@ siprintf.lo siscanf.lo \
+@NEWLIB_NANO_FORMATTED_IO_FALSE@ sniprintf.lo vdiprintf.lo \
+@NEWLIB_NANO_FORMATTED_IO_FALSE@ viprintf.lo viscanf.lo \
+@NEWLIB_NANO_FORMATTED_IO_FALSE@ vsiprintf.lo vsiscanf.lo \
+@NEWLIB_NANO_FORMATTED_IO_FALSE@ vsniprintf.lo
+am__objects_8 = $(am__objects_7) clearerr.lo fclose.lo fdopen.lo \
+ feof.lo ferror.lo fflush.lo fgetc.lo fgetpos.lo fgets.lo \
+ fileno.lo findfp.lo flags.lo fopen.lo fprintf.lo fputc.lo \
+ fputs.lo fread.lo freopen.lo fscanf.lo fseek.lo fsetpos.lo \
ftell.lo fvwrite.lo fwalk.lo fwrite.lo getc.lo getchar.lo \
getc_u.lo getchar_u.lo getdelim.lo getline.lo gets.lo \
- iprintf.lo iscanf.lo makebuf.lo perror.lo printf.lo putc.lo \
- putchar.lo putc_u.lo putchar_u.lo puts.lo refill.lo remove.lo \
- rename.lo rewind.lo rget.lo scanf.lo sccl.lo setbuf.lo \
- setbuffer.lo setlinebuf.lo setvbuf.lo siprintf.lo siscanf.lo \
- sniprintf.lo snprintf.lo sprintf.lo sscanf.lo stdio.lo \
- tmpfile.lo tmpnam.lo ungetc.lo vdiprintf.lo vdprintf.lo \
- viprintf.lo viscanf.lo vprintf.lo vscanf.lo vsiprintf.lo \
- vsiscanf.lo vsnprintf.lo vsniprintf.lo vsprintf.lo vsscanf.lo \
- wbuf.lo wsetup.lo
-@ELIX_LEVEL_1_FALSE@am__objects_5 = asiprintf.lo asprintf.lo \
+ makebuf.lo perror.lo printf.lo putc.lo putchar.lo putc_u.lo \
+ putchar_u.lo puts.lo refill.lo remove.lo rename.lo rewind.lo \
+ rget.lo scanf.lo sccl.lo setbuf.lo setbuffer.lo setlinebuf.lo \
+ setvbuf.lo snprintf.lo sprintf.lo sscanf.lo stdio.lo \
+ tmpfile.lo tmpnam.lo ungetc.lo vdprintf.lo vprintf.lo \
+ vscanf.lo vsnprintf.lo vsprintf.lo vsscanf.lo wbuf.lo \
+ wsetup.lo
+@ELIX_LEVEL_1_FALSE@@NEWLIB_NANO_FORMATTED_IO_FALSE@am__objects_9 = asiprintf.lo \
+@ELIX_LEVEL_1_FALSE@@NEWLIB_NANO_FORMATTED_IO_FALSE@ vasiprintf.lo
+@ELIX_LEVEL_1_FALSE@am__objects_10 = $(am__objects_9) asprintf.lo \
@ELIX_LEVEL_1_FALSE@ fcloseall.lo fseeko.lo ftello.lo getw.lo \
-@ELIX_LEVEL_1_FALSE@ mktemp.lo putw.lo vasiprintf.lo \
-@ELIX_LEVEL_1_FALSE@ vasprintf.lo
-@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@am__objects_6 = asniprintf.lo \
+@ELIX_LEVEL_1_FALSE@ mktemp.lo putw.lo vasprintf.lo
+@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@@NEWLIB_NANO_FORMATTED_IO_FALSE@am__objects_11 = asniprintf.lo \
+@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@@NEWLIB_NANO_FORMATTED_IO_FALSE@ diprintf.lo \
+@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@@NEWLIB_NANO_FORMATTED_IO_FALSE@ vasniprintf.lo
+@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@am__objects_12 = $(am__objects_11) \
@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ asnprintf.lo \
-@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ diprintf.lo \
+@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ clearerr_u.lo \
@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ dprintf.lo \
+@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ feof_u.lo \
+@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ ferror_u.lo \
+@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ fflush_u.lo \
+@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ fgetc_u.lo \
+@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ fgets_u.lo \
@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ fgetwc.lo \
+@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ fgetwc_u.lo \
@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ fgetws.lo \
+@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ fgetws_u.lo \
+@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ fileno_u.lo \
@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ fmemopen.lo \
@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ fopencookie.lo \
@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ fpurge.lo \
+@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ fputc_u.lo \
+@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ fputs_u.lo \
@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ fputwc.lo \
+@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ fputwc_u.lo \
@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ fputws.lo \
+@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ fputws_u.lo \
+@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ fread_u.lo \
+@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ fsetlocking.lo \
@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ funopen.lo \
@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ fwide.lo \
@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ fwprintf.lo \
+@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ fwrite_u.lo \
@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ fwscanf.lo \
@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ getwc.lo \
+@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ getwc_u.lo \
@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ getwchar.lo \
+@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ getwchar_u.lo \
@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ open_memstream.lo \
@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ putwc.lo \
+@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ putwc_u.lo \
@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ putwchar.lo \
+@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ putwchar_u.lo \
+@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ stdio_ext.lo \
@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ swprintf.lo \
@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ swscanf.lo \
@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ ungetwc.lo \
-@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ vasniprintf.lo \
@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ vasnprintf.lo \
@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ vfwscanf.lo \
@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ vswprintf.lo \
@@ -208,8 +267,8 @@ am__objects_4 = clearerr.lo fclose.lo fdopen.lo feof.lo ferror.lo \
@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ vwscanf.lo \
@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ wprintf.lo \
@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ wscanf.lo
-@USE_LIBTOOL_TRUE@am_libstdio_la_OBJECTS = $(am__objects_4) \
-@USE_LIBTOOL_TRUE@ $(am__objects_5) $(am__objects_6)
+@USE_LIBTOOL_TRUE@am_libstdio_la_OBJECTS = $(am__objects_8) \
+@USE_LIBTOOL_TRUE@ $(am__objects_10) $(am__objects_12)
libstdio_la_OBJECTS = $(am_libstdio_la_OBJECTS)
libstdio_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
$(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
@@ -382,7 +441,24 @@ top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
AUTOMAKE_OPTIONS = cygnus
INCLUDES = $(NEWLIB_CFLAGS) $(CROSS_CFLAGS) $(TARGET_CFLAGS)
+@NEWLIB_NANO_FORMATTED_IO_FALSE@GENERAL_INT_FORMATTED_IO_SOURCES = \
+@NEWLIB_NANO_FORMATTED_IO_FALSE@ fiprintf.c \
+@NEWLIB_NANO_FORMATTED_IO_FALSE@ fiscanf.c \
+@NEWLIB_NANO_FORMATTED_IO_FALSE@ iprintf.c \
+@NEWLIB_NANO_FORMATTED_IO_FALSE@ iscanf.c \
+@NEWLIB_NANO_FORMATTED_IO_FALSE@ siprintf.c \
+@NEWLIB_NANO_FORMATTED_IO_FALSE@ siscanf.c \
+@NEWLIB_NANO_FORMATTED_IO_FALSE@ sniprintf.c \
+@NEWLIB_NANO_FORMATTED_IO_FALSE@ vdiprintf.c \
+@NEWLIB_NANO_FORMATTED_IO_FALSE@ viprintf.c \
+@NEWLIB_NANO_FORMATTED_IO_FALSE@ viscanf.c \
+@NEWLIB_NANO_FORMATTED_IO_FALSE@ vsiprintf.c \
+@NEWLIB_NANO_FORMATTED_IO_FALSE@ vsiscanf.c \
+@NEWLIB_NANO_FORMATTED_IO_FALSE@ vsniprintf.c
+
+@NEWLIB_NANO_FORMATTED_IO_TRUE@GENERAL_INT_FORMATTED_IO_SOURCES =
GENERAL_SOURCES = \
+ $(GENERAL_INT_FORMATTED_IO_SOURCES) \
clearerr.c \
fclose.c \
fdopen.c \
@@ -394,7 +470,6 @@ GENERAL_SOURCES = \
fgets.c \
fileno.c \
findfp.c \
- fiprintf.c \
flags.c \
fopen.c \
fprintf.c \
@@ -403,7 +478,6 @@ GENERAL_SOURCES = \
fread.c \
freopen.c \
fscanf.c \
- fiscanf.c \
fseek.c \
fsetpos.c \
ftell.c \
@@ -417,8 +491,6 @@ GENERAL_SOURCES = \
getdelim.c \
getline.c \
gets.c \
- iprintf.c \
- iscanf.c \
makebuf.c \
perror.c \
printf.c \
@@ -438,9 +510,6 @@ GENERAL_SOURCES = \
setbuffer.c \
setlinebuf.c \
setvbuf.c \
- siprintf.c \
- siscanf.c \
- sniprintf.c \
snprintf.c \
sprintf.c \
sscanf.c \
@@ -448,23 +517,17 @@ GENERAL_SOURCES = \
tmpfile.c \
tmpnam.c \
ungetc.c \
- vdiprintf.c \
vdprintf.c \
- viprintf.c \
- viscanf.c \
vprintf.c \
vscanf.c \
- vsiprintf.c \
- vsiscanf.c \
vsnprintf.c \
- vsniprintf.c \
vsprintf.c \
vsscanf.c \
wbuf.c \
wsetup.c
@ELIX_LEVEL_1_FALSE@ELIX_2_SOURCES = \
-@ELIX_LEVEL_1_FALSE@ asiprintf.c \
+@ELIX_LEVEL_1_FALSE@ $(ELIX_2_INT_FORMATTED_IO_SOURCES) \
@ELIX_LEVEL_1_FALSE@ asprintf.c \
@ELIX_LEVEL_1_FALSE@ fcloseall.c \
@ELIX_LEVEL_1_FALSE@ fseeko.c \
@@ -472,35 +535,58 @@ GENERAL_SOURCES = \
@ELIX_LEVEL_1_FALSE@ getw.c \
@ELIX_LEVEL_1_FALSE@ mktemp.c \
@ELIX_LEVEL_1_FALSE@ putw.c \
-@ELIX_LEVEL_1_FALSE@ vasiprintf.c \
@ELIX_LEVEL_1_FALSE@ vasprintf.c
@ELIX_LEVEL_1_TRUE@ELIX_2_SOURCES =
+@ELIX_LEVEL_1_FALSE@@NEWLIB_NANO_FORMATTED_IO_FALSE@ELIX_2_INT_FORMATTED_IO_SOURCES = \
+@ELIX_LEVEL_1_FALSE@@NEWLIB_NANO_FORMATTED_IO_FALSE@ asiprintf.c \
+@ELIX_LEVEL_1_FALSE@@NEWLIB_NANO_FORMATTED_IO_FALSE@ vasiprintf.c
+
+@ELIX_LEVEL_1_FALSE@@NEWLIB_NANO_FORMATTED_IO_TRUE@ELIX_2_INT_FORMATTED_IO_SOURCES =
@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ELIX_4_SOURCES = \
-@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ asniprintf.c \
+@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ $(ELIX_4_INT_FORMATTED_IO_SOURCES) \
@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ asnprintf.c \
-@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ diprintf.c \
+@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ clearerr_u.c \
@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ dprintf.c \
+@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ feof_u.c \
+@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ ferror_u.c \
+@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ fflush_u.c \
+@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ fgetc_u.c \
+@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ fgets_u.c \
@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ fgetwc.c \
+@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ fgetwc_u.c \
@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ fgetws.c \
+@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ fgetws_u.c \
+@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ fileno_u.c \
@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ fmemopen.c \
@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ fopencookie.c \
@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ fpurge.c \
+@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ fputc_u.c \
+@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ fputs_u.c \
@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ fputwc.c \
+@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ fputwc_u.c \
@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ fputws.c \
+@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ fputws_u.c \
+@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ fread_u.c \
+@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ fsetlocking.c \
@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ funopen.c \
@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ fwide.c \
@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ fwprintf.c \
+@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ fwrite_u.c \
@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ fwscanf.c \
@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ getwc.c \
+@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ getwc_u.c \
@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ getwchar.c \
+@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ getwchar_u.c \
@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ open_memstream.c \
@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ putwc.c \
+@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ putwc_u.c \
@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ putwchar.c \
+@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ putwchar_u.c \
+@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ stdio_ext.c \
@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ swprintf.c \
@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ swscanf.c \
@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ ungetwc.c \
-@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ vasniprintf.c \
@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ vasnprintf.c \
@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ vfwscanf.c \
@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ vswprintf.c \
@@ -513,15 +599,39 @@ GENERAL_SOURCES = \
@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_TRUE@ELIX_4_SOURCES =
@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_TRUE@ELIX_4_SOURCES =
@ELIX_LEVEL_1_TRUE@ELIX_4_SOURCES =
-LIBADD_OBJS = \
- $(lpfx)svfiprintf.$(oext) $(lpfx)svfprintf.$(oext) \
- $(lpfx)svfiscanf.$(oext) $(lpfx)svfscanf.$(oext) \
- $(lpfx)vfiprintf.$(oext) $(lpfx)vfprintf.$(oext) \
- $(lpfx)vfscanf.$(oext) $(lpfx)vfiscanf.$(oext) \
- $(lpfx)svfiwprintf.$(oext) $(lpfx)svfwprintf.$(oext) \
- $(lpfx)vfiwprintf.$(oext) $(lpfx)vfwprintf.$(oext) \
- $(lpfx)svfiwscanf.$(oext) $(lpfx)svfwscanf.$(oext) \
- $(lpfx)vfiwscanf.$(oext) $(lpfx)vfwscanf.$(oext)
+@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@@NEWLIB_NANO_FORMATTED_IO_FALSE@ELIX_4_INT_FORMATTED_IO_SOURCES = \
+@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@@NEWLIB_NANO_FORMATTED_IO_FALSE@ asniprintf.c \
+@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@@NEWLIB_NANO_FORMATTED_IO_FALSE@ diprintf.c \
+@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@@NEWLIB_NANO_FORMATTED_IO_FALSE@ vasniprintf.c
+
+@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@@NEWLIB_NANO_FORMATTED_IO_TRUE@ELIX_4_INT_FORMATTED_IO_SOURCES =
+@NEWLIB_NANO_FORMATTED_IO_FALSE@LIBADD_OBJS = \
+@NEWLIB_NANO_FORMATTED_IO_FALSE@ $(lpfx)svfiprintf.$(oext) $(lpfx)svfprintf.$(oext) \
+@NEWLIB_NANO_FORMATTED_IO_FALSE@ $(lpfx)svfiscanf.$(oext) $(lpfx)svfscanf.$(oext) \
+@NEWLIB_NANO_FORMATTED_IO_FALSE@ $(lpfx)vfiprintf.$(oext) $(lpfx)vfprintf.$(oext) \
+@NEWLIB_NANO_FORMATTED_IO_FALSE@ $(lpfx)vfscanf.$(oext) $(lpfx)vfiscanf.$(oext) \
+@NEWLIB_NANO_FORMATTED_IO_FALSE@ $(lpfx)svfiwprintf.$(oext) $(lpfx)svfwprintf.$(oext) \
+@NEWLIB_NANO_FORMATTED_IO_FALSE@ $(lpfx)vfiwprintf.$(oext) $(lpfx)vfwprintf.$(oext) \
+@NEWLIB_NANO_FORMATTED_IO_FALSE@ $(lpfx)svfiwscanf.$(oext) $(lpfx)svfwscanf.$(oext) \
+@NEWLIB_NANO_FORMATTED_IO_FALSE@ $(lpfx)vfiwscanf.$(oext) $(lpfx)vfwscanf.$(oext)
+
+@NEWLIB_NANO_FORMATTED_IO_TRUE@LIBADD_OBJS = \
+@NEWLIB_NANO_FORMATTED_IO_TRUE@ $(lpfx)nano-vfprintf_float.$(oext) \
+@NEWLIB_NANO_FORMATTED_IO_TRUE@ $(lpfx)nano-svfprintf.$(oext) \
+@NEWLIB_NANO_FORMATTED_IO_TRUE@ $(lpfx)nano-svfscanf.$(oext) \
+@NEWLIB_NANO_FORMATTED_IO_TRUE@ $(lpfx)nano-vfprintf.$(oext) \
+@NEWLIB_NANO_FORMATTED_IO_TRUE@ $(lpfx)nano-vfprintf_i.$(oext) \
+@NEWLIB_NANO_FORMATTED_IO_TRUE@ $(lpfx)nano-vfscanf.$(oext) \
+@NEWLIB_NANO_FORMATTED_IO_TRUE@ $(lpfx)nano-vfscanf_i.$(oext) \
+@NEWLIB_NANO_FORMATTED_IO_TRUE@ $(lpfx)nano-vfscanf_float.$(oext) \
+@NEWLIB_NANO_FORMATTED_IO_TRUE@ $(lpfx)svfiwprintf.$(oext) \
+@NEWLIB_NANO_FORMATTED_IO_TRUE@ $(lpfx)svfwprintf.$(oext) \
+@NEWLIB_NANO_FORMATTED_IO_TRUE@ $(lpfx)vfiwprintf.$(oext) \
+@NEWLIB_NANO_FORMATTED_IO_TRUE@ $(lpfx)vfwprintf.$(oext) \
+@NEWLIB_NANO_FORMATTED_IO_TRUE@ $(lpfx)svfiwscanf.$(oext) \
+@NEWLIB_NANO_FORMATTED_IO_TRUE@ $(lpfx)svfwscanf.$(oext) \
+@NEWLIB_NANO_FORMATTED_IO_TRUE@ $(lpfx)vfiwscanf.$(oext) \
+@NEWLIB_NANO_FORMATTED_IO_TRUE@ $(lpfx)vfwscanf.$(oext)
libstdio_la_LDFLAGS = -Xcompiler -nostdlib
@USE_LIBTOOL_TRUE@noinst_LTLIBRARIES = libstdio.la
@@ -537,9 +647,33 @@ libstdio_la_LDFLAGS = -Xcompiler -nostdlib
@USE_LIBTOOL_FALSE@lib_a_LIBADD = $(LIBADD_OBJS)
@USE_LIBTOOL_FALSE@lib_a_CFLAGS = $(AM_CFLAGS)
@USE_LIBTOOL_FALSE@lib_a_DEPENDENCIES = $(LIBADD_OBJS)
+
+#
+# documentation rules
+#
+SUFFIXES = .def
+CHEW = ${top_builddir}/../doc/makedoc -f $(top_srcdir)/../doc/doc.str
+CLEANFILES = $(CHEWOUT_FILES) *.ref
+@NEWLIB_NANO_FORMATTED_IO_FALSE@CHEWOUT_INT_FORMATTED_IO_FILES = \
+@NEWLIB_NANO_FORMATTED_IO_FALSE@ diprintf.def \
+@NEWLIB_NANO_FORMATTED_IO_FALSE@ siprintf.def \
+@NEWLIB_NANO_FORMATTED_IO_FALSE@ siscanf.def \
+@NEWLIB_NANO_FORMATTED_IO_FALSE@ vfprintf.def \
+@NEWLIB_NANO_FORMATTED_IO_FALSE@ vfscanf.def \
+@NEWLIB_NANO_FORMATTED_IO_FALSE@ viprintf.def \
+@NEWLIB_NANO_FORMATTED_IO_FALSE@ viscanf.def
+
+@NEWLIB_NANO_FORMATTED_IO_TRUE@CHEWOUT_INT_FORMATTED_IO_FILES = \
+@NEWLIB_NANO_FORMATTED_IO_TRUE@ nano-vfprintf.def \
+@NEWLIB_NANO_FORMATTED_IO_TRUE@ nano-vfprintf_i.def \
+@NEWLIB_NANO_FORMATTED_IO_TRUE@ nano-vfprintf_float.def \
+@NEWLIB_NANO_FORMATTED_IO_TRUE@ nano-vfscanf.def \
+@NEWLIB_NANO_FORMATTED_IO_TRUE@ nano-vfscanf_i.def \
+@NEWLIB_NANO_FORMATTED_IO_TRUE@ nano-vfscanf_float.def
+
CHEWOUT_FILES = \
+ $(CHEWOUT_INT_FORMATTED_IO_FILES) \
clearerr.def \
- diprintf.def \
dprintf.def \
fclose.def \
fcloseall.def \
@@ -564,6 +698,7 @@ CHEWOUT_FILES = \
fread.def \
freopen.def \
fseek.def \
+ fsetlocking.def \
fsetpos.def \
ftell.def \
funopen.def \
@@ -577,7 +712,6 @@ CHEWOUT_FILES = \
getline.def \
gets.def \
getw.def \
- getwc.def \
getwchar.def \
mktemp.def \
open_memstream.def \
@@ -588,7 +722,6 @@ CHEWOUT_FILES = \
putchar_u.def \
puts.def \
putw.def \
- putwc.def \
putwchar.def \
remove.def \
rename.def \
@@ -597,27 +730,19 @@ CHEWOUT_FILES = \
setbuffer.def \
setlinebuf.def \
setvbuf.def \
- siprintf.def \
- siscanf.def \
sprintf.def \
sscanf.def \
+ stdio_ext.def \
swprintf.def \
swscanf.def \
tmpfile.def \
tmpnam.def \
ungetc.def \
ungetwc.def \
- vfprintf.def \
- vfscanf.def \
vfwprintf.def \
- vfwscanf.def \
- viprintf.def \
- viscanf.def
+ vfwscanf.def
-SUFFIXES = .def
-CHEW = ../../doc/makedoc -f $(srcdir)/../../doc/doc.str
-TARGETDOC = ../tmp.texi
-CLEANFILES = $(CHEWOUT_FILES) *.ref
+CHAPTERS = stdio.tex
all: all-am
.SUFFIXES:
@@ -687,6 +812,84 @@ distclean-compile:
.c.lo:
$(LTCOMPILE) -c -o $@ $<
+lib_a-fiprintf.o: fiprintf.c
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-fiprintf.o `test -f 'fiprintf.c' || echo '$(srcdir)/'`fiprintf.c
+
+lib_a-fiprintf.obj: fiprintf.c
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-fiprintf.obj `if test -f 'fiprintf.c'; then $(CYGPATH_W) 'fiprintf.c'; else $(CYGPATH_W) '$(srcdir)/fiprintf.c'; fi`
+
+lib_a-fiscanf.o: fiscanf.c
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-fiscanf.o `test -f 'fiscanf.c' || echo '$(srcdir)/'`fiscanf.c
+
+lib_a-fiscanf.obj: fiscanf.c
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-fiscanf.obj `if test -f 'fiscanf.c'; then $(CYGPATH_W) 'fiscanf.c'; else $(CYGPATH_W) '$(srcdir)/fiscanf.c'; fi`
+
+lib_a-iprintf.o: iprintf.c
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-iprintf.o `test -f 'iprintf.c' || echo '$(srcdir)/'`iprintf.c
+
+lib_a-iprintf.obj: iprintf.c
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-iprintf.obj `if test -f 'iprintf.c'; then $(CYGPATH_W) 'iprintf.c'; else $(CYGPATH_W) '$(srcdir)/iprintf.c'; fi`
+
+lib_a-iscanf.o: iscanf.c
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-iscanf.o `test -f 'iscanf.c' || echo '$(srcdir)/'`iscanf.c
+
+lib_a-iscanf.obj: iscanf.c
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-iscanf.obj `if test -f 'iscanf.c'; then $(CYGPATH_W) 'iscanf.c'; else $(CYGPATH_W) '$(srcdir)/iscanf.c'; fi`
+
+lib_a-siprintf.o: siprintf.c
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-siprintf.o `test -f 'siprintf.c' || echo '$(srcdir)/'`siprintf.c
+
+lib_a-siprintf.obj: siprintf.c
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-siprintf.obj `if test -f 'siprintf.c'; then $(CYGPATH_W) 'siprintf.c'; else $(CYGPATH_W) '$(srcdir)/siprintf.c'; fi`
+
+lib_a-siscanf.o: siscanf.c
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-siscanf.o `test -f 'siscanf.c' || echo '$(srcdir)/'`siscanf.c
+
+lib_a-siscanf.obj: siscanf.c
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-siscanf.obj `if test -f 'siscanf.c'; then $(CYGPATH_W) 'siscanf.c'; else $(CYGPATH_W) '$(srcdir)/siscanf.c'; fi`
+
+lib_a-sniprintf.o: sniprintf.c
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-sniprintf.o `test -f 'sniprintf.c' || echo '$(srcdir)/'`sniprintf.c
+
+lib_a-sniprintf.obj: sniprintf.c
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-sniprintf.obj `if test -f 'sniprintf.c'; then $(CYGPATH_W) 'sniprintf.c'; else $(CYGPATH_W) '$(srcdir)/sniprintf.c'; fi`
+
+lib_a-vdiprintf.o: vdiprintf.c
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-vdiprintf.o `test -f 'vdiprintf.c' || echo '$(srcdir)/'`vdiprintf.c
+
+lib_a-vdiprintf.obj: vdiprintf.c
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-vdiprintf.obj `if test -f 'vdiprintf.c'; then $(CYGPATH_W) 'vdiprintf.c'; else $(CYGPATH_W) '$(srcdir)/vdiprintf.c'; fi`
+
+lib_a-viprintf.o: viprintf.c
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-viprintf.o `test -f 'viprintf.c' || echo '$(srcdir)/'`viprintf.c
+
+lib_a-viprintf.obj: viprintf.c
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-viprintf.obj `if test -f 'viprintf.c'; then $(CYGPATH_W) 'viprintf.c'; else $(CYGPATH_W) '$(srcdir)/viprintf.c'; fi`
+
+lib_a-viscanf.o: viscanf.c
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-viscanf.o `test -f 'viscanf.c' || echo '$(srcdir)/'`viscanf.c
+
+lib_a-viscanf.obj: viscanf.c
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-viscanf.obj `if test -f 'viscanf.c'; then $(CYGPATH_W) 'viscanf.c'; else $(CYGPATH_W) '$(srcdir)/viscanf.c'; fi`
+
+lib_a-vsiprintf.o: vsiprintf.c
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-vsiprintf.o `test -f 'vsiprintf.c' || echo '$(srcdir)/'`vsiprintf.c
+
+lib_a-vsiprintf.obj: vsiprintf.c
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-vsiprintf.obj `if test -f 'vsiprintf.c'; then $(CYGPATH_W) 'vsiprintf.c'; else $(CYGPATH_W) '$(srcdir)/vsiprintf.c'; fi`
+
+lib_a-vsiscanf.o: vsiscanf.c
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-vsiscanf.o `test -f 'vsiscanf.c' || echo '$(srcdir)/'`vsiscanf.c
+
+lib_a-vsiscanf.obj: vsiscanf.c
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-vsiscanf.obj `if test -f 'vsiscanf.c'; then $(CYGPATH_W) 'vsiscanf.c'; else $(CYGPATH_W) '$(srcdir)/vsiscanf.c'; fi`
+
+lib_a-vsniprintf.o: vsniprintf.c
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-vsniprintf.o `test -f 'vsniprintf.c' || echo '$(srcdir)/'`vsniprintf.c
+
+lib_a-vsniprintf.obj: vsniprintf.c
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-vsniprintf.obj `if test -f 'vsniprintf.c'; then $(CYGPATH_W) 'vsniprintf.c'; else $(CYGPATH_W) '$(srcdir)/vsniprintf.c'; fi`
+
lib_a-clearerr.o: clearerr.c
$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-clearerr.o `test -f 'clearerr.c' || echo '$(srcdir)/'`clearerr.c
@@ -753,12 +956,6 @@ lib_a-findfp.o: findfp.c
lib_a-findfp.obj: findfp.c
$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-findfp.obj `if test -f 'findfp.c'; then $(CYGPATH_W) 'findfp.c'; else $(CYGPATH_W) '$(srcdir)/findfp.c'; fi`
-lib_a-fiprintf.o: fiprintf.c
- $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-fiprintf.o `test -f 'fiprintf.c' || echo '$(srcdir)/'`fiprintf.c
-
-lib_a-fiprintf.obj: fiprintf.c
- $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-fiprintf.obj `if test -f 'fiprintf.c'; then $(CYGPATH_W) 'fiprintf.c'; else $(CYGPATH_W) '$(srcdir)/fiprintf.c'; fi`
-
lib_a-flags.o: flags.c
$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-flags.o `test -f 'flags.c' || echo '$(srcdir)/'`flags.c
@@ -807,12 +1004,6 @@ lib_a-fscanf.o: fscanf.c
lib_a-fscanf.obj: fscanf.c
$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-fscanf.obj `if test -f 'fscanf.c'; then $(CYGPATH_W) 'fscanf.c'; else $(CYGPATH_W) '$(srcdir)/fscanf.c'; fi`
-lib_a-fiscanf.o: fiscanf.c
- $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-fiscanf.o `test -f 'fiscanf.c' || echo '$(srcdir)/'`fiscanf.c
-
-lib_a-fiscanf.obj: fiscanf.c
- $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-fiscanf.obj `if test -f 'fiscanf.c'; then $(CYGPATH_W) 'fiscanf.c'; else $(CYGPATH_W) '$(srcdir)/fiscanf.c'; fi`
-
lib_a-fseek.o: fseek.c
$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-fseek.o `test -f 'fseek.c' || echo '$(srcdir)/'`fseek.c
@@ -891,18 +1082,6 @@ lib_a-gets.o: gets.c
lib_a-gets.obj: gets.c
$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-gets.obj `if test -f 'gets.c'; then $(CYGPATH_W) 'gets.c'; else $(CYGPATH_W) '$(srcdir)/gets.c'; fi`
-lib_a-iprintf.o: iprintf.c
- $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-iprintf.o `test -f 'iprintf.c' || echo '$(srcdir)/'`iprintf.c
-
-lib_a-iprintf.obj: iprintf.c
- $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-iprintf.obj `if test -f 'iprintf.c'; then $(CYGPATH_W) 'iprintf.c'; else $(CYGPATH_W) '$(srcdir)/iprintf.c'; fi`
-
-lib_a-iscanf.o: iscanf.c
- $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-iscanf.o `test -f 'iscanf.c' || echo '$(srcdir)/'`iscanf.c
-
-lib_a-iscanf.obj: iscanf.c
- $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-iscanf.obj `if test -f 'iscanf.c'; then $(CYGPATH_W) 'iscanf.c'; else $(CYGPATH_W) '$(srcdir)/iscanf.c'; fi`
-
lib_a-makebuf.o: makebuf.c
$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-makebuf.o `test -f 'makebuf.c' || echo '$(srcdir)/'`makebuf.c
@@ -1017,24 +1196,6 @@ lib_a-setvbuf.o: setvbuf.c
lib_a-setvbuf.obj: setvbuf.c
$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-setvbuf.obj `if test -f 'setvbuf.c'; then $(CYGPATH_W) 'setvbuf.c'; else $(CYGPATH_W) '$(srcdir)/setvbuf.c'; fi`
-lib_a-siprintf.o: siprintf.c
- $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-siprintf.o `test -f 'siprintf.c' || echo '$(srcdir)/'`siprintf.c
-
-lib_a-siprintf.obj: siprintf.c
- $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-siprintf.obj `if test -f 'siprintf.c'; then $(CYGPATH_W) 'siprintf.c'; else $(CYGPATH_W) '$(srcdir)/siprintf.c'; fi`
-
-lib_a-siscanf.o: siscanf.c
- $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-siscanf.o `test -f 'siscanf.c' || echo '$(srcdir)/'`siscanf.c
-
-lib_a-siscanf.obj: siscanf.c
- $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-siscanf.obj `if test -f 'siscanf.c'; then $(CYGPATH_W) 'siscanf.c'; else $(CYGPATH_W) '$(srcdir)/siscanf.c'; fi`
-
-lib_a-sniprintf.o: sniprintf.c
- $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-sniprintf.o `test -f 'sniprintf.c' || echo '$(srcdir)/'`sniprintf.c
-
-lib_a-sniprintf.obj: sniprintf.c
- $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-sniprintf.obj `if test -f 'sniprintf.c'; then $(CYGPATH_W) 'sniprintf.c'; else $(CYGPATH_W) '$(srcdir)/sniprintf.c'; fi`
-
lib_a-snprintf.o: snprintf.c
$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-snprintf.o `test -f 'snprintf.c' || echo '$(srcdir)/'`snprintf.c
@@ -1077,30 +1238,12 @@ lib_a-ungetc.o: ungetc.c
lib_a-ungetc.obj: ungetc.c
$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-ungetc.obj `if test -f 'ungetc.c'; then $(CYGPATH_W) 'ungetc.c'; else $(CYGPATH_W) '$(srcdir)/ungetc.c'; fi`
-lib_a-vdiprintf.o: vdiprintf.c
- $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-vdiprintf.o `test -f 'vdiprintf.c' || echo '$(srcdir)/'`vdiprintf.c
-
-lib_a-vdiprintf.obj: vdiprintf.c
- $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-vdiprintf.obj `if test -f 'vdiprintf.c'; then $(CYGPATH_W) 'vdiprintf.c'; else $(CYGPATH_W) '$(srcdir)/vdiprintf.c'; fi`
-
lib_a-vdprintf.o: vdprintf.c
$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-vdprintf.o `test -f 'vdprintf.c' || echo '$(srcdir)/'`vdprintf.c
lib_a-vdprintf.obj: vdprintf.c
$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-vdprintf.obj `if test -f 'vdprintf.c'; then $(CYGPATH_W) 'vdprintf.c'; else $(CYGPATH_W) '$(srcdir)/vdprintf.c'; fi`
-lib_a-viprintf.o: viprintf.c
- $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-viprintf.o `test -f 'viprintf.c' || echo '$(srcdir)/'`viprintf.c
-
-lib_a-viprintf.obj: viprintf.c
- $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-viprintf.obj `if test -f 'viprintf.c'; then $(CYGPATH_W) 'viprintf.c'; else $(CYGPATH_W) '$(srcdir)/viprintf.c'; fi`
-
-lib_a-viscanf.o: viscanf.c
- $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-viscanf.o `test -f 'viscanf.c' || echo '$(srcdir)/'`viscanf.c
-
-lib_a-viscanf.obj: viscanf.c
- $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-viscanf.obj `if test -f 'viscanf.c'; then $(CYGPATH_W) 'viscanf.c'; else $(CYGPATH_W) '$(srcdir)/viscanf.c'; fi`
-
lib_a-vprintf.o: vprintf.c
$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-vprintf.o `test -f 'vprintf.c' || echo '$(srcdir)/'`vprintf.c
@@ -1113,30 +1256,12 @@ lib_a-vscanf.o: vscanf.c
lib_a-vscanf.obj: vscanf.c
$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-vscanf.obj `if test -f 'vscanf.c'; then $(CYGPATH_W) 'vscanf.c'; else $(CYGPATH_W) '$(srcdir)/vscanf.c'; fi`
-lib_a-vsiprintf.o: vsiprintf.c
- $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-vsiprintf.o `test -f 'vsiprintf.c' || echo '$(srcdir)/'`vsiprintf.c
-
-lib_a-vsiprintf.obj: vsiprintf.c
- $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-vsiprintf.obj `if test -f 'vsiprintf.c'; then $(CYGPATH_W) 'vsiprintf.c'; else $(CYGPATH_W) '$(srcdir)/vsiprintf.c'; fi`
-
-lib_a-vsiscanf.o: vsiscanf.c
- $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-vsiscanf.o `test -f 'vsiscanf.c' || echo '$(srcdir)/'`vsiscanf.c
-
-lib_a-vsiscanf.obj: vsiscanf.c
- $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-vsiscanf.obj `if test -f 'vsiscanf.c'; then $(CYGPATH_W) 'vsiscanf.c'; else $(CYGPATH_W) '$(srcdir)/vsiscanf.c'; fi`
-
lib_a-vsnprintf.o: vsnprintf.c
$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-vsnprintf.o `test -f 'vsnprintf.c' || echo '$(srcdir)/'`vsnprintf.c
lib_a-vsnprintf.obj: vsnprintf.c
$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-vsnprintf.obj `if test -f 'vsnprintf.c'; then $(CYGPATH_W) 'vsnprintf.c'; else $(CYGPATH_W) '$(srcdir)/vsnprintf.c'; fi`
-lib_a-vsniprintf.o: vsniprintf.c
- $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-vsniprintf.o `test -f 'vsniprintf.c' || echo '$(srcdir)/'`vsniprintf.c
-
-lib_a-vsniprintf.obj: vsniprintf.c
- $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-vsniprintf.obj `if test -f 'vsniprintf.c'; then $(CYGPATH_W) 'vsniprintf.c'; else $(CYGPATH_W) '$(srcdir)/vsniprintf.c'; fi`
-
lib_a-vsprintf.o: vsprintf.c
$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-vsprintf.o `test -f 'vsprintf.c' || echo '$(srcdir)/'`vsprintf.c
@@ -1167,6 +1292,12 @@ lib_a-asiprintf.o: asiprintf.c
lib_a-asiprintf.obj: asiprintf.c
$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-asiprintf.obj `if test -f 'asiprintf.c'; then $(CYGPATH_W) 'asiprintf.c'; else $(CYGPATH_W) '$(srcdir)/asiprintf.c'; fi`
+lib_a-vasiprintf.o: vasiprintf.c
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-vasiprintf.o `test -f 'vasiprintf.c' || echo '$(srcdir)/'`vasiprintf.c
+
+lib_a-vasiprintf.obj: vasiprintf.c
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-vasiprintf.obj `if test -f 'vasiprintf.c'; then $(CYGPATH_W) 'vasiprintf.c'; else $(CYGPATH_W) '$(srcdir)/vasiprintf.c'; fi`
+
lib_a-asprintf.o: asprintf.c
$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-asprintf.o `test -f 'asprintf.c' || echo '$(srcdir)/'`asprintf.c
@@ -1209,12 +1340,6 @@ lib_a-putw.o: putw.c
lib_a-putw.obj: putw.c
$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-putw.obj `if test -f 'putw.c'; then $(CYGPATH_W) 'putw.c'; else $(CYGPATH_W) '$(srcdir)/putw.c'; fi`
-lib_a-vasiprintf.o: vasiprintf.c
- $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-vasiprintf.o `test -f 'vasiprintf.c' || echo '$(srcdir)/'`vasiprintf.c
-
-lib_a-vasiprintf.obj: vasiprintf.c
- $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-vasiprintf.obj `if test -f 'vasiprintf.c'; then $(CYGPATH_W) 'vasiprintf.c'; else $(CYGPATH_W) '$(srcdir)/vasiprintf.c'; fi`
-
lib_a-vasprintf.o: vasprintf.c
$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-vasprintf.o `test -f 'vasprintf.c' || echo '$(srcdir)/'`vasprintf.c
@@ -1227,17 +1352,29 @@ lib_a-asniprintf.o: asniprintf.c
lib_a-asniprintf.obj: asniprintf.c
$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-asniprintf.obj `if test -f 'asniprintf.c'; then $(CYGPATH_W) 'asniprintf.c'; else $(CYGPATH_W) '$(srcdir)/asniprintf.c'; fi`
+lib_a-diprintf.o: diprintf.c
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-diprintf.o `test -f 'diprintf.c' || echo '$(srcdir)/'`diprintf.c
+
+lib_a-diprintf.obj: diprintf.c
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-diprintf.obj `if test -f 'diprintf.c'; then $(CYGPATH_W) 'diprintf.c'; else $(CYGPATH_W) '$(srcdir)/diprintf.c'; fi`
+
+lib_a-vasniprintf.o: vasniprintf.c
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-vasniprintf.o `test -f 'vasniprintf.c' || echo '$(srcdir)/'`vasniprintf.c
+
+lib_a-vasniprintf.obj: vasniprintf.c
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-vasniprintf.obj `if test -f 'vasniprintf.c'; then $(CYGPATH_W) 'vasniprintf.c'; else $(CYGPATH_W) '$(srcdir)/vasniprintf.c'; fi`
+
lib_a-asnprintf.o: asnprintf.c
$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-asnprintf.o `test -f 'asnprintf.c' || echo '$(srcdir)/'`asnprintf.c
lib_a-asnprintf.obj: asnprintf.c
$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-asnprintf.obj `if test -f 'asnprintf.c'; then $(CYGPATH_W) 'asnprintf.c'; else $(CYGPATH_W) '$(srcdir)/asnprintf.c'; fi`
-lib_a-diprintf.o: diprintf.c
- $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-diprintf.o `test -f 'diprintf.c' || echo '$(srcdir)/'`diprintf.c
+lib_a-clearerr_u.o: clearerr_u.c
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-clearerr_u.o `test -f 'clearerr_u.c' || echo '$(srcdir)/'`clearerr_u.c
-lib_a-diprintf.obj: diprintf.c
- $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-diprintf.obj `if test -f 'diprintf.c'; then $(CYGPATH_W) 'diprintf.c'; else $(CYGPATH_W) '$(srcdir)/diprintf.c'; fi`
+lib_a-clearerr_u.obj: clearerr_u.c
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-clearerr_u.obj `if test -f 'clearerr_u.c'; then $(CYGPATH_W) 'clearerr_u.c'; else $(CYGPATH_W) '$(srcdir)/clearerr_u.c'; fi`
lib_a-dprintf.o: dprintf.c
$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-dprintf.o `test -f 'dprintf.c' || echo '$(srcdir)/'`dprintf.c
@@ -1245,18 +1382,66 @@ lib_a-dprintf.o: dprintf.c
lib_a-dprintf.obj: dprintf.c
$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-dprintf.obj `if test -f 'dprintf.c'; then $(CYGPATH_W) 'dprintf.c'; else $(CYGPATH_W) '$(srcdir)/dprintf.c'; fi`
+lib_a-feof_u.o: feof_u.c
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-feof_u.o `test -f 'feof_u.c' || echo '$(srcdir)/'`feof_u.c
+
+lib_a-feof_u.obj: feof_u.c
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-feof_u.obj `if test -f 'feof_u.c'; then $(CYGPATH_W) 'feof_u.c'; else $(CYGPATH_W) '$(srcdir)/feof_u.c'; fi`
+
+lib_a-ferror_u.o: ferror_u.c
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-ferror_u.o `test -f 'ferror_u.c' || echo '$(srcdir)/'`ferror_u.c
+
+lib_a-ferror_u.obj: ferror_u.c
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-ferror_u.obj `if test -f 'ferror_u.c'; then $(CYGPATH_W) 'ferror_u.c'; else $(CYGPATH_W) '$(srcdir)/ferror_u.c'; fi`
+
+lib_a-fflush_u.o: fflush_u.c
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-fflush_u.o `test -f 'fflush_u.c' || echo '$(srcdir)/'`fflush_u.c
+
+lib_a-fflush_u.obj: fflush_u.c
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-fflush_u.obj `if test -f 'fflush_u.c'; then $(CYGPATH_W) 'fflush_u.c'; else $(CYGPATH_W) '$(srcdir)/fflush_u.c'; fi`
+
+lib_a-fgetc_u.o: fgetc_u.c
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-fgetc_u.o `test -f 'fgetc_u.c' || echo '$(srcdir)/'`fgetc_u.c
+
+lib_a-fgetc_u.obj: fgetc_u.c
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-fgetc_u.obj `if test -f 'fgetc_u.c'; then $(CYGPATH_W) 'fgetc_u.c'; else $(CYGPATH_W) '$(srcdir)/fgetc_u.c'; fi`
+
+lib_a-fgets_u.o: fgets_u.c
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-fgets_u.o `test -f 'fgets_u.c' || echo '$(srcdir)/'`fgets_u.c
+
+lib_a-fgets_u.obj: fgets_u.c
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-fgets_u.obj `if test -f 'fgets_u.c'; then $(CYGPATH_W) 'fgets_u.c'; else $(CYGPATH_W) '$(srcdir)/fgets_u.c'; fi`
+
lib_a-fgetwc.o: fgetwc.c
$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-fgetwc.o `test -f 'fgetwc.c' || echo '$(srcdir)/'`fgetwc.c
lib_a-fgetwc.obj: fgetwc.c
$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-fgetwc.obj `if test -f 'fgetwc.c'; then $(CYGPATH_W) 'fgetwc.c'; else $(CYGPATH_W) '$(srcdir)/fgetwc.c'; fi`
+lib_a-fgetwc_u.o: fgetwc_u.c
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-fgetwc_u.o `test -f 'fgetwc_u.c' || echo '$(srcdir)/'`fgetwc_u.c
+
+lib_a-fgetwc_u.obj: fgetwc_u.c
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-fgetwc_u.obj `if test -f 'fgetwc_u.c'; then $(CYGPATH_W) 'fgetwc_u.c'; else $(CYGPATH_W) '$(srcdir)/fgetwc_u.c'; fi`
+
lib_a-fgetws.o: fgetws.c
$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-fgetws.o `test -f 'fgetws.c' || echo '$(srcdir)/'`fgetws.c
lib_a-fgetws.obj: fgetws.c
$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-fgetws.obj `if test -f 'fgetws.c'; then $(CYGPATH_W) 'fgetws.c'; else $(CYGPATH_W) '$(srcdir)/fgetws.c'; fi`
+lib_a-fgetws_u.o: fgetws_u.c
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-fgetws_u.o `test -f 'fgetws_u.c' || echo '$(srcdir)/'`fgetws_u.c
+
+lib_a-fgetws_u.obj: fgetws_u.c
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-fgetws_u.obj `if test -f 'fgetws_u.c'; then $(CYGPATH_W) 'fgetws_u.c'; else $(CYGPATH_W) '$(srcdir)/fgetws_u.c'; fi`
+
+lib_a-fileno_u.o: fileno_u.c
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-fileno_u.o `test -f 'fileno_u.c' || echo '$(srcdir)/'`fileno_u.c
+
+lib_a-fileno_u.obj: fileno_u.c
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-fileno_u.obj `if test -f 'fileno_u.c'; then $(CYGPATH_W) 'fileno_u.c'; else $(CYGPATH_W) '$(srcdir)/fileno_u.c'; fi`
+
lib_a-fmemopen.o: fmemopen.c
$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-fmemopen.o `test -f 'fmemopen.c' || echo '$(srcdir)/'`fmemopen.c
@@ -1275,18 +1460,54 @@ lib_a-fpurge.o: fpurge.c
lib_a-fpurge.obj: fpurge.c
$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-fpurge.obj `if test -f 'fpurge.c'; then $(CYGPATH_W) 'fpurge.c'; else $(CYGPATH_W) '$(srcdir)/fpurge.c'; fi`
+lib_a-fputc_u.o: fputc_u.c
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-fputc_u.o `test -f 'fputc_u.c' || echo '$(srcdir)/'`fputc_u.c
+
+lib_a-fputc_u.obj: fputc_u.c
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-fputc_u.obj `if test -f 'fputc_u.c'; then $(CYGPATH_W) 'fputc_u.c'; else $(CYGPATH_W) '$(srcdir)/fputc_u.c'; fi`
+
+lib_a-fputs_u.o: fputs_u.c
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-fputs_u.o `test -f 'fputs_u.c' || echo '$(srcdir)/'`fputs_u.c
+
+lib_a-fputs_u.obj: fputs_u.c
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-fputs_u.obj `if test -f 'fputs_u.c'; then $(CYGPATH_W) 'fputs_u.c'; else $(CYGPATH_W) '$(srcdir)/fputs_u.c'; fi`
+
lib_a-fputwc.o: fputwc.c
$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-fputwc.o `test -f 'fputwc.c' || echo '$(srcdir)/'`fputwc.c
lib_a-fputwc.obj: fputwc.c
$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-fputwc.obj `if test -f 'fputwc.c'; then $(CYGPATH_W) 'fputwc.c'; else $(CYGPATH_W) '$(srcdir)/fputwc.c'; fi`
+lib_a-fputwc_u.o: fputwc_u.c
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-fputwc_u.o `test -f 'fputwc_u.c' || echo '$(srcdir)/'`fputwc_u.c
+
+lib_a-fputwc_u.obj: fputwc_u.c
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-fputwc_u.obj `if test -f 'fputwc_u.c'; then $(CYGPATH_W) 'fputwc_u.c'; else $(CYGPATH_W) '$(srcdir)/fputwc_u.c'; fi`
+
lib_a-fputws.o: fputws.c
$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-fputws.o `test -f 'fputws.c' || echo '$(srcdir)/'`fputws.c
lib_a-fputws.obj: fputws.c
$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-fputws.obj `if test -f 'fputws.c'; then $(CYGPATH_W) 'fputws.c'; else $(CYGPATH_W) '$(srcdir)/fputws.c'; fi`
+lib_a-fputws_u.o: fputws_u.c
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-fputws_u.o `test -f 'fputws_u.c' || echo '$(srcdir)/'`fputws_u.c
+
+lib_a-fputws_u.obj: fputws_u.c
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-fputws_u.obj `if test -f 'fputws_u.c'; then $(CYGPATH_W) 'fputws_u.c'; else $(CYGPATH_W) '$(srcdir)/fputws_u.c'; fi`
+
+lib_a-fread_u.o: fread_u.c
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-fread_u.o `test -f 'fread_u.c' || echo '$(srcdir)/'`fread_u.c
+
+lib_a-fread_u.obj: fread_u.c
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-fread_u.obj `if test -f 'fread_u.c'; then $(CYGPATH_W) 'fread_u.c'; else $(CYGPATH_W) '$(srcdir)/fread_u.c'; fi`
+
+lib_a-fsetlocking.o: fsetlocking.c
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-fsetlocking.o `test -f 'fsetlocking.c' || echo '$(srcdir)/'`fsetlocking.c
+
+lib_a-fsetlocking.obj: fsetlocking.c
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-fsetlocking.obj `if test -f 'fsetlocking.c'; then $(CYGPATH_W) 'fsetlocking.c'; else $(CYGPATH_W) '$(srcdir)/fsetlocking.c'; fi`
+
lib_a-funopen.o: funopen.c
$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-funopen.o `test -f 'funopen.c' || echo '$(srcdir)/'`funopen.c
@@ -1305,6 +1526,12 @@ lib_a-fwprintf.o: fwprintf.c
lib_a-fwprintf.obj: fwprintf.c
$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-fwprintf.obj `if test -f 'fwprintf.c'; then $(CYGPATH_W) 'fwprintf.c'; else $(CYGPATH_W) '$(srcdir)/fwprintf.c'; fi`
+lib_a-fwrite_u.o: fwrite_u.c
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-fwrite_u.o `test -f 'fwrite_u.c' || echo '$(srcdir)/'`fwrite_u.c
+
+lib_a-fwrite_u.obj: fwrite_u.c
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-fwrite_u.obj `if test -f 'fwrite_u.c'; then $(CYGPATH_W) 'fwrite_u.c'; else $(CYGPATH_W) '$(srcdir)/fwrite_u.c'; fi`
+
lib_a-fwscanf.o: fwscanf.c
$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-fwscanf.o `test -f 'fwscanf.c' || echo '$(srcdir)/'`fwscanf.c
@@ -1317,12 +1544,24 @@ lib_a-getwc.o: getwc.c
lib_a-getwc.obj: getwc.c
$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-getwc.obj `if test -f 'getwc.c'; then $(CYGPATH_W) 'getwc.c'; else $(CYGPATH_W) '$(srcdir)/getwc.c'; fi`
+lib_a-getwc_u.o: getwc_u.c
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-getwc_u.o `test -f 'getwc_u.c' || echo '$(srcdir)/'`getwc_u.c
+
+lib_a-getwc_u.obj: getwc_u.c
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-getwc_u.obj `if test -f 'getwc_u.c'; then $(CYGPATH_W) 'getwc_u.c'; else $(CYGPATH_W) '$(srcdir)/getwc_u.c'; fi`
+
lib_a-getwchar.o: getwchar.c
$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-getwchar.o `test -f 'getwchar.c' || echo '$(srcdir)/'`getwchar.c
lib_a-getwchar.obj: getwchar.c
$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-getwchar.obj `if test -f 'getwchar.c'; then $(CYGPATH_W) 'getwchar.c'; else $(CYGPATH_W) '$(srcdir)/getwchar.c'; fi`
+lib_a-getwchar_u.o: getwchar_u.c
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-getwchar_u.o `test -f 'getwchar_u.c' || echo '$(srcdir)/'`getwchar_u.c
+
+lib_a-getwchar_u.obj: getwchar_u.c
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-getwchar_u.obj `if test -f 'getwchar_u.c'; then $(CYGPATH_W) 'getwchar_u.c'; else $(CYGPATH_W) '$(srcdir)/getwchar_u.c'; fi`
+
lib_a-open_memstream.o: open_memstream.c
$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-open_memstream.o `test -f 'open_memstream.c' || echo '$(srcdir)/'`open_memstream.c
@@ -1335,12 +1574,30 @@ lib_a-putwc.o: putwc.c
lib_a-putwc.obj: putwc.c
$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-putwc.obj `if test -f 'putwc.c'; then $(CYGPATH_W) 'putwc.c'; else $(CYGPATH_W) '$(srcdir)/putwc.c'; fi`
+lib_a-putwc_u.o: putwc_u.c
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-putwc_u.o `test -f 'putwc_u.c' || echo '$(srcdir)/'`putwc_u.c
+
+lib_a-putwc_u.obj: putwc_u.c
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-putwc_u.obj `if test -f 'putwc_u.c'; then $(CYGPATH_W) 'putwc_u.c'; else $(CYGPATH_W) '$(srcdir)/putwc_u.c'; fi`
+
lib_a-putwchar.o: putwchar.c
$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-putwchar.o `test -f 'putwchar.c' || echo '$(srcdir)/'`putwchar.c
lib_a-putwchar.obj: putwchar.c
$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-putwchar.obj `if test -f 'putwchar.c'; then $(CYGPATH_W) 'putwchar.c'; else $(CYGPATH_W) '$(srcdir)/putwchar.c'; fi`
+lib_a-putwchar_u.o: putwchar_u.c
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-putwchar_u.o `test -f 'putwchar_u.c' || echo '$(srcdir)/'`putwchar_u.c
+
+lib_a-putwchar_u.obj: putwchar_u.c
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-putwchar_u.obj `if test -f 'putwchar_u.c'; then $(CYGPATH_W) 'putwchar_u.c'; else $(CYGPATH_W) '$(srcdir)/putwchar_u.c'; fi`
+
+lib_a-stdio_ext.o: stdio_ext.c
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-stdio_ext.o `test -f 'stdio_ext.c' || echo '$(srcdir)/'`stdio_ext.c
+
+lib_a-stdio_ext.obj: stdio_ext.c
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-stdio_ext.obj `if test -f 'stdio_ext.c'; then $(CYGPATH_W) 'stdio_ext.c'; else $(CYGPATH_W) '$(srcdir)/stdio_ext.c'; fi`
+
lib_a-swprintf.o: swprintf.c
$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-swprintf.o `test -f 'swprintf.c' || echo '$(srcdir)/'`swprintf.c
@@ -1359,12 +1616,6 @@ lib_a-ungetwc.o: ungetwc.c
lib_a-ungetwc.obj: ungetwc.c
$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-ungetwc.obj `if test -f 'ungetwc.c'; then $(CYGPATH_W) 'ungetwc.c'; else $(CYGPATH_W) '$(srcdir)/ungetwc.c'; fi`
-lib_a-vasniprintf.o: vasniprintf.c
- $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-vasniprintf.o `test -f 'vasniprintf.c' || echo '$(srcdir)/'`vasniprintf.c
-
-lib_a-vasniprintf.obj: vasniprintf.c
- $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-vasniprintf.obj `if test -f 'vasniprintf.c'; then $(CYGPATH_W) 'vasniprintf.c'; else $(CYGPATH_W) '$(srcdir)/vasniprintf.c'; fi`
-
lib_a-vasnprintf.o: vasnprintf.c
$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-vasnprintf.o `test -f 'vasnprintf.c' || echo '$(srcdir)/'`vasnprintf.c
@@ -1597,8 +1848,40 @@ objectlist.awk.in: $(noinst_LTLIBRARIES)
echo $$i `pwd`/$$i >> objectlist.awk.in ; \
done
-# This rule is needed so that libtool compiles vfiprintf before vfprintf. Otherwise
-# libtool moves vfprintf.o and subsequently can't find it.
+.c.def:
+ $(CHEW) < $< > $*.def 2> $*.ref
+ touch stmp-def
+
+TARGETDOC ?= ../tmp.texi
+
+doc: $(CHEWOUT_FILES)
+ for chapter in $(CHAPTERS) ; \
+ do \
+ cat $(srcdir)/$$chapter >> $(TARGETDOC) ; \
+ done
+
+# Though small footprint nano-formatted-IO implementation is used
+# when NEWLIB_NANO_FORMATTED_IO is enabled, we keep all rules for
+# the other implementation of formatted IO including all i-family
+# functions. The object files in !NEWLIB_NANO_FORMATTED_IO version
+# implementation will be neither compiled nor archived into final
+# library, because they are not depended on by final makefile target.
+
+# Rules compiling small-footprint nano-formatted-io implementation.
+@NEWLIB_NANO_FORMATTED_IO_TRUE@$(lpfx)nano-vfprintf.$(oext): nano-vfprintf.c
+@NEWLIB_NANO_FORMATTED_IO_TRUE@ $(LIB_COMPILE) -fshort-enums -c $(srcdir)/nano-vfprintf.c -o $@
+
+@NEWLIB_NANO_FORMATTED_IO_TRUE@$(lpfx)nano-vfprintf_i.$(oext): nano-vfprintf_i.c
+@NEWLIB_NANO_FORMATTED_IO_TRUE@ $(LIB_COMPILE) -fshort-enums -c $(srcdir)/nano-vfprintf_i.c -o $@
+
+@NEWLIB_NANO_FORMATTED_IO_TRUE@$(lpfx)nano-vfprintf_float.$(oext): nano-vfprintf_float.c
+@NEWLIB_NANO_FORMATTED_IO_TRUE@ $(LIB_COMPILE) -fshort-enums -c $(srcdir)/nano-vfprintf_float.c -o $@
+
+@NEWLIB_NANO_FORMATTED_IO_TRUE@$(lpfx)nano-svfprintf.$(oext): nano-vfprintf.c
+@NEWLIB_NANO_FORMATTED_IO_TRUE@ $(LIB_COMPILE) -fshort-enums -DSTRING_ONLY -c $(srcdir)/nano-vfprintf.c -o $@
+
+# This rule is needed so that libtool compiles vfiprintf before vfprintf.
+# Otherwise libtool moves vfprintf.o and subsequently can't find it.
$(lpfx)vfprintf.$(oext): vfprintf.c
$(LIB_COMPILE) -fshort-enums -c $(srcdir)/vfprintf.c -o $@
@@ -1624,6 +1907,19 @@ $(lpfx)svfwprintf.$(oext): vfwprintf.c
$(lpfx)svfiwprintf.$(oext): vfwprintf.c
$(LIB_COMPILE) -fshort-enums -DINTEGER_ONLY -DSTRING_ONLY -c $(srcdir)/vfwprintf.c -o $@
+# Rules compiling small-footprint nano-formatted-io implementation.
+@NEWLIB_NANO_FORMATTED_IO_TRUE@$(lpfx)nano-vfscanf.$(oext): nano-vfscanf.c
+@NEWLIB_NANO_FORMATTED_IO_TRUE@ $(LIB_COMPILE) -c $(srcdir)/nano-vfscanf.c -o $@
+
+@NEWLIB_NANO_FORMATTED_IO_TRUE@$(lpfx)nano-vfscanf_i.$(oext): nano-vfscanf_i.c
+@NEWLIB_NANO_FORMATTED_IO_TRUE@ $(LIB_COMPILE) -c $(srcdir)/nano-vfscanf_i.c -o $@
+
+@NEWLIB_NANO_FORMATTED_IO_TRUE@$(lpfx)nano-vfscanf_float.$(oext): nano-vfscanf_float.c
+@NEWLIB_NANO_FORMATTED_IO_TRUE@ $(LIB_COMPILE) -c $(srcdir)/nano-vfscanf_float.c -o $@
+
+@NEWLIB_NANO_FORMATTED_IO_TRUE@$(lpfx)nano-svfscanf.$(oext): nano-vfscanf.c
+@NEWLIB_NANO_FORMATTED_IO_TRUE@ $(LIB_COMPILE) -DSTRING_ONLY -c $(srcdir)/nano-vfscanf.c -o $@
+
$(lpfx)vfscanf.$(oext): vfscanf.c
$(LIB_COMPILE) -c $(srcdir)/vfscanf.c -o $@
@@ -1648,29 +1944,44 @@ $(lpfx)svfwscanf.$(oext): vfwscanf.c
$(lpfx)svfiwscanf.$(oext): vfwscanf.c
$(LIB_COMPILE) -DINTEGER_ONLY -DSTRING_ONLY -c $(srcdir)/vfwscanf.c -o $@
-.c.def:
- $(CHEW) < $< > $*.def 2> $*.ref
- touch stmp-def
-
-doc: $(CHEWOUT_FILES)
- cat $(srcdir)/stdio.tex >> $(TARGETDOC)
-
+$(lpfx)clearerr.$(oext): local.h
+$(lpfx)clearerr_u.$(oext): local.h
$(lpfx)fclose.$(oext): local.h
$(lpfx)fdopen.$(oext): local.h
+$(lpfx)feof.$(oext): local.h
+$(lpfx)feof_u.$(oext): local.h
+$(lpfx)ferror.$(oext): local.h
+$(lpfx)ferror_u.$(oext): local.h
$(lpfx)fflush.$(oext): local.h
+$(lpfx)fflush_u.$(oext): fflush.c
+$(lpfx)fgetc.$(oext): local.h
+$(lpfx)fgetc_u.$(oext): local.h
+$(lpfx)fgets.$(oext): local.h
+$(lpfx)fgets_u.$(oext): fgets.c
$(lpfx)fgetwc.$(oext): local.h
+$(lpfx)fgetwc_u.$(oext): local.h
$(lpfx)fgetws.$(oext): local.h
+$(lpfx)fgetws_u.$(oext): fgetws.c
+$(lpfx)fileno.$(oext): local.h
+$(lpfx)fileno_u.$(oext): local.h
$(lpfx)findfp.$(oext): local.h
$(lpfx)fmemopen.$(oext): local.h
$(lpfx)fopen.$(oext): local.h
$(lpfx)fopencookie.$(oext): local.h
$(lpfx)fpurge.$(oext): local.h
+$(lpfx)fputc.$(oext): local.h
+$(lpfx)fputc_u.$(oext): local.h
$(lpfx)fputs.$(oext): fvwrite.h
+$(lpfx)fputs_u.$(oext): fputs.c
$(lpfx)fputwc.$(oext): local.h
+$(lpfx)fputwc_u.$(oext): local.h
$(lpfx)fputws.$(oext): local.h fvwrite.h
+$(lpfx)fputws_u.$(oext): fputws.c
$(lpfx)fread.$(oext): local.h
+$(lpfx)fread_u.$(oext): fread.c
$(lpfx)freopen.$(oext): local.h
$(lpfx)fseek.$(oext): local.h
+$(lpfx)fsetlocking.$(oext): local.h
$(lpfx)ftell.$(oext): local.h
$(lpfx)funopen.$(oext): local.h
$(lpfx)fvwrite.$(oext): local.h fvwrite.h
@@ -1678,15 +1989,20 @@ $(lpfx)fwalk.$(oext): local.h
$(lpfx)fwide.$(oext): local.h
$(lpfx)fwprintf.$(oext): local.h
$(lpfx)fwrite.$(oext): local.h fvwrite.h
+$(lpfx)fwrite_u.$(oext): fwrite.c
$(lpfx)fwscanf.$(oext): local.h
$(lpfx)getwc.$(oext): local.h
+$(lpfx)getwc_u.$(oext): local.h
$(lpfx)getwchar.$(oext): local.h
+$(lpfx)getwchar_u.$(oext): local.h
$(lpfx)iscanf.$(oext): local.h
$(lpfx)makebuf.$(oext): local.h
$(lpfx)open_memstream.$(oext): local.h
$(lpfx)puts.$(oext): fvwrite.h
$(lpfx)putwc.$(oext): local.h
+$(lpfx)putwc_u.$(oext): local.h
$(lpfx)putwchar.$(oext): local.h
+$(lpfx)putwchar_u.$(oext): local.h
$(lpfx)refill.$(oext): local.h
$(lpfx)scanf.$(oext): local.h
$(lpfx)setbuf.$(oext): local.h
@@ -1697,6 +2013,8 @@ $(lpfx)sniprintf.$(oext): local.h
$(lpfx)sprintf.$(oext): local.h
$(lpfx)sscanf.$(oext): local.h
$(lpfx)stdio.$(oext): local.h
+@NEWLIB_NANO_FORMATTED_IO_TRUE@$(lpfx)nano-svfprintf.$(oext): local.h nano-vfprintf_local.h
+@NEWLIB_NANO_FORMATTED_IO_TRUE@$(lpfx)nano-svfscanf.$(oext): local.h nano-vfscanf_local.h
$(lpfx)svfiprintf.$(oext): local.h
$(lpfx)svfiscanf.$(oext): local.h floatio.h
$(lpfx)svfprintf.$(oext): local.h
@@ -1705,6 +2023,12 @@ $(lpfx)swprintf.$(oext): local.h
$(lpfx)swscanf.$(oext): local.h
$(lpfx)ungetc.$(oext): local.h
$(lpfx)ungetwc.$(oext): local.h
+@NEWLIB_NANO_FORMATTED_IO_TRUE@$(lpfx)nano-vfprintf.$(oext): local.h nano-vfprintf_local.h
+@NEWLIB_NANO_FORMATTED_IO_TRUE@$(lpfx)nano-vfprintf_i.$(oext): local.h nano-vfprintf_local.h
+@NEWLIB_NANO_FORMATTED_IO_TRUE@$(lpfx)nano-vfprintf_float.$(oext): local.h floatio.h nano-vfprintf_local.h
+@NEWLIB_NANO_FORMATTED_IO_TRUE@$(lpfx)nano-vfscanf.$(oext): local.h nano-vfscanf_local.h
+@NEWLIB_NANO_FORMATTED_IO_TRUE@$(lpfx)nano-vfscanf_i.$(oext): local.h nano-vfscanf_local.h
+@NEWLIB_NANO_FORMATTED_IO_TRUE@$(lpfx)nano-vfscanf_float.$(oext): local.h floatio.h nano-vfscanf_local.h
$(lpfx)vfiprintf.$(oext): local.h
$(lpfx)vfiscanf.$(oext): local.h floatio.h
$(lpfx)vfprintf.$(oext): local.h
diff --git a/newlib/libc/stdio/asnprintf.c b/newlib/libc/stdio/asnprintf.c
index 31e4c7f38..2e8d8aabb 100644
--- a/newlib/libc/stdio/asnprintf.c
+++ b/newlib/libc/stdio/asnprintf.c
@@ -15,10 +15,10 @@
char *
_DEFUN(_asnprintf_r, (ptr, buf, lenp, fmt),
- struct _reent *ptr _AND
+ struct _reent *__restrict ptr _AND
char *buf _AND
size_t *lenp _AND
- const char *fmt _DOTS)
+ const char *__restrict fmt _DOTS)
{
int ret;
va_list ap;
@@ -58,13 +58,19 @@ _DEFUN(_asnprintf_r, (ptr, buf, lenp, fmt),
return (char *) f._bf._base;
}
+#ifdef _NANO_FORMATTED_IO
+char *
+_EXFUN(_asniprintf_r, (struct _reent *, char *, size_t *, const char *, ...)
+ _ATTRIBUTE ((__alias__("_asnprintf_r"))));
+#endif
+
#ifndef _REENT_ONLY
char *
_DEFUN(asnprintf, (buf, lenp, fmt),
- char *buf _AND
- size_t *lenp _AND
- const char *fmt _DOTS)
+ char *__restrict buf _AND
+ size_t *__restrict lenp _AND
+ const char *__restrict fmt _DOTS)
{
int ret;
va_list ap;
@@ -105,4 +111,9 @@ _DEFUN(asnprintf, (buf, lenp, fmt),
return (char *) f._bf._base;
}
+#ifdef _NANO_FORMATTED_IO
+char *
+_EXFUN(asniprintf, (char *, size_t *, const char *, ...)
+ _ATTRIBUTE ((__alias__("asnprintf"))));
+#endif
#endif /* ! _REENT_ONLY */
diff --git a/newlib/libc/stdio/asprintf.c b/newlib/libc/stdio/asprintf.c
index 7b26d9f29..bf214f9af 100644
--- a/newlib/libc/stdio/asprintf.c
+++ b/newlib/libc/stdio/asprintf.c
@@ -27,8 +27,8 @@
int
_DEFUN(_asprintf_r, (ptr, strp, fmt),
struct _reent *ptr _AND
- char **strp _AND
- const char *fmt _DOTS)
+ char **__restrict strp _AND
+ const char *__restrict fmt _DOTS)
{
int ret;
va_list ap;
@@ -50,12 +50,18 @@ _DEFUN(_asprintf_r, (ptr, strp, fmt),
return (ret);
}
+#ifdef _NANO_FORMATTED_IO
+int
+_EXFUN(_asiprintf_r, (struct _reent *, char **, const char *, ...)
+ _ATTRIBUTE ((__alias__("_asprintf_r"))));
+#endif
+
#ifndef _REENT_ONLY
int
_DEFUN(asprintf, (strp, fmt),
- char **strp _AND
- const char *fmt _DOTS)
+ char **__restrict strp _AND
+ const char *__restrict fmt _DOTS)
{
int ret;
va_list ap;
@@ -77,4 +83,9 @@ _DEFUN(asprintf, (strp, fmt),
return (ret);
}
+#ifdef _NANO_FORMATTED_IO
+int
+_EXFUN(asiprintf, (char **, const char *, ...)
+ _ATTRIBUTE ((__alias__("asprintf"))));
+#endif
#endif /* ! _REENT_ONLY */
diff --git a/newlib/libc/stdio/clearerr.c b/newlib/libc/stdio/clearerr.c
index ed4603ba2..9bf0837f5 100644
--- a/newlib/libc/stdio/clearerr.c
+++ b/newlib/libc/stdio/clearerr.c
@@ -17,20 +17,31 @@
/*
FUNCTION
-<<clearerr>>---clear file or stream error indicator
+<<clearerr>>, <<clearerr_unlocked>>---clear file or stream error indicator
INDEX
clearerr
+INDEX
+ clearerr_unlocked
ANSI_SYNOPSIS
#include <stdio.h>
void clearerr(FILE *<[fp]>);
+ #define _BSD_SOURCE
+ #include <stdio.h>
+ void clearerr_unlocked(FILE *<[fp]>);
+
TRAD_SYNOPSIS
#include <stdio.h>
void clearerr(<[fp]>)
FILE *<[fp]>;
+ #define _BSD_SOURCE
+ #include <stdio.h>
+ void clearerr_unlocked(<[fp]>)
+ FILE *<[fp]>;
+
DESCRIPTION
The <<stdio>> functions maintain an error indicator with each file
pointer <[fp]>, to record whether any read or write errors have
@@ -42,6 +53,14 @@ Use <<clearerr>> to reset both of these indicators.
See <<ferror>> and <<feof>> to query the two indicators.
+<<clearerr_unlocked>> is a non-thread-safe version of <<clearerr>>.
+<<clearerr_unlocked>> may only safely be used within a scope
+protected by flockfile() (or ftrylockfile()) and funlockfile(). This
+function may safely be used in a multi-threaded program if and only
+if they are called while the invoking thread owns the (FILE *)
+object, as is the case after a successful call to the flockfile() or
+ftrylockfile() functions. If threads are disabled, then
+<<clearerr_unlocked>> is equivalent to <<clearerr>>.
RETURNS
<<clearerr>> does not return a result.
@@ -49,6 +68,8 @@ RETURNS
PORTABILITY
ANSI C requires <<clearerr>>.
+<<clearerr_unlocked>> is a BSD extension also provided by GNU libc.
+
No supporting OS subroutines are required.
*/
diff --git a/newlib/libc/stdio/clearerr_u.c b/newlib/libc/stdio/clearerr_u.c
new file mode 100644
index 000000000..00c5e8efa
--- /dev/null
+++ b/newlib/libc/stdio/clearerr_u.c
@@ -0,0 +1,41 @@
+/*
+ * Copyright (c) 2014 Red Hat, Inc.
+ * 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 <stdio.h>
+#include "local.h"
+
+/* A subroutine version of the macro clearerr_unlocked. */
+
+#undef clearerr_unlocked
+
+_VOID
+_DEFUN(clearerr_unlocked, (fp),
+ FILE * fp)
+{
+ CHECK_INIT(_REENT, fp);
+ __sclearerr (fp);
+}
diff --git a/newlib/libc/stdio/dprintf.c b/newlib/libc/stdio/dprintf.c
index e2d8b36ca..2925ceb31 100644
--- a/newlib/libc/stdio/dprintf.c
+++ b/newlib/libc/stdio/dprintf.c
@@ -19,12 +19,13 @@ INDEX
ANSI_SYNOPSIS
#include <stdio.h>
#include <stdarg.h>
- int dprintf(int <[fd]>, const char *<[format]>, ...);
- int vdprintf(int <[fd]>, const char *<[format]>, va_list <[ap]>);
+ int dprintf(int <[fd]>, const char *restrict <[format]>, ...);
+ int vdprintf(int <[fd]>, const char *restrict <[format]>,
+ va_list <[ap]>);
int _dprintf_r(struct _reent *<[ptr]>, int <[fd]>,
- const char *<[format]>, ...);
+ const char *restrict <[format]>, ...);
int _vdprintf_r(struct _reent *<[ptr]>, int <[fd]>,
- const char *<[format]>, va_list <[ap]>);
+ const char *restrict <[format]>, va_list <[ap]>);
DESCRIPTION
<<dprintf>> and <<vdprintf>> allow printing a format, similarly to
@@ -55,7 +56,7 @@ int
_DEFUN(_dprintf_r, (ptr, fd, format),
struct _reent *ptr _AND
int fd _AND
- const char *format _DOTS)
+ const char *__restrict format _DOTS)
{
va_list ap;
int n;
@@ -66,12 +67,18 @@ _DEFUN(_dprintf_r, (ptr, fd, format),
return n;
}
+#ifdef _NANO_FORMATTED_IO
+int
+_EXFUN(_diprintf_r, (struct _reent *, int, const char *, ...)
+ _ATTRIBUTE ((__alias__("_dprintf_r"))));
+#endif
+
#ifndef _REENT_ONLY
int
_DEFUN(dprintf, (fd, format),
int fd _AND
- const char *format _DOTS)
+ const char *__restrict format _DOTS)
{
va_list ap;
int n;
@@ -84,4 +91,9 @@ _DEFUN(dprintf, (fd, format),
return n;
}
+#ifdef _NANO_FORMATTED_IO
+int
+_EXFUN(diprintf, (int, const char *, ...)
+ _ATTRIBUTE ((__alias__("dprintf"))));
+#endif
#endif /* ! _REENT_ONLY */
diff --git a/newlib/libc/stdio/fclose.c b/newlib/libc/stdio/fclose.c
index fd054feaa..0ce112306 100644
--- a/newlib/libc/stdio/fclose.c
+++ b/newlib/libc/stdio/fclose.c
@@ -82,20 +82,27 @@ _DEFUN(_fclose_r, (rptr, fp),
int __oldcancel;
pthread_setcancelstate (PTHREAD_CANCEL_DISABLE, &__oldcancel);
#endif
- _flockfile (fp);
+ if (!(fp->_flags2 & __SNLK))
+ _flockfile (fp);
if (fp->_flags == 0) /* not open! */
{
- _funlockfile (fp);
+ if (!(fp->_flags2 & __SNLK))
+ _funlockfile (fp);
#ifdef _STDIO_WITH_THREAD_CANCELLATION_SUPPORT
pthread_setcancelstate (__oldcancel, &__oldcancel);
#endif
return (0);
}
- /* Unconditionally flush to allow special handling for seekable read
- files to reposition file to last byte processed as opposed to
- last byte read ahead into the buffer. */
- r = _fflush_r (rptr, fp);
+#ifdef _STDIO_BSD_SEMANTICS
+ /* BSD and Glibc systems only flush streams which have been written to. */
+ r = (fp->_flags & __SWR) ? __sflush_r (rptr, fp) : 0;
+#else
+ /* Follow POSIX semantics exactly. Unconditionally flush to allow
+ special handling for seekable read files to reposition file to last
+ byte processed as opposed to last byte read ahead into the buffer. */
+ r = __sflush_r (rptr, fp);
+#endif
if (fp->_close != NULL && fp->_close (rptr, fp->_cookie) < 0)
r = EOF;
if (fp->_flags & __SMBF)
@@ -106,7 +113,8 @@ _DEFUN(_fclose_r, (rptr, fp),
FREELB (rptr, fp);
__sfp_lock_acquire ();
fp->_flags = 0; /* release this FILE for reuse */
- _funlockfile (fp);
+ if (!(fp->_flags2 & __SNLK))
+ _funlockfile (fp);
#ifndef __SINGLE_THREAD__
__lock_close_recursive (fp->_lock);
#endif
diff --git a/newlib/libc/stdio/feof.c b/newlib/libc/stdio/feof.c
index c0216ffed..7aadd8209 100644
--- a/newlib/libc/stdio/feof.c
+++ b/newlib/libc/stdio/feof.c
@@ -17,24 +17,44 @@
/*
FUNCTION
-<<feof>>---test for end of file
+<<feof>>, <<feof_unlocked>>---test for end of file
INDEX
feof
+INDEX
+ feof_unlocked
ANSI_SYNOPSIS
#include <stdio.h>
int feof(FILE *<[fp]>);
+ #define _BSD_SOURCE
+ #include <stdio.h>
+ int feof_unlocked(FILE *<[fp]>);
+
TRAD_SYNOPSIS
#include <stdio.h>
int feof(<[fp]>)
FILE *<[fp]>;
+ #define _BSD_SOURCE
+ #include <stdio.h>
+ int feof_unlocked(<[fp]>)
+ FILE *<[fp]>;
+
DESCRIPTION
<<feof>> tests whether or not the end of the file identified by <[fp]>
has been reached.
+<<feof_unlocked>> is a non-thread-safe version of <<feof>>.
+<<feof_unlocked>> may only safely be used within a scope
+protected by flockfile() (or ftrylockfile()) and funlockfile(). This
+function may safely be used in a multi-threaded program if and only
+if they are called while the invoking thread owns the (FILE *)
+object, as is the case after a successful call to the flockfile() or
+ftrylockfile() functions. If threads are disabled, then
+<<feof_unlocked>> is equivalent to <<feof>>.
+
RETURNS
<<feof>> returns <<0>> if the end of file has not yet been reached; if
at end of file, the result is nonzero.
@@ -42,6 +62,8 @@ at end of file, the result is nonzero.
PORTABILITY
<<feof>> is required by ANSI C.
+<<feof_unlocked>> is a BSD extension also provided by GNU libc.
+
No supporting OS subroutines are required.
*/
diff --git a/newlib/libc/stdio/feof_u.c b/newlib/libc/stdio/feof_u.c
new file mode 100644
index 000000000..48fc4af47
--- /dev/null
+++ b/newlib/libc/stdio/feof_u.c
@@ -0,0 +1,40 @@
+/*
+ * Copyright (c) 2014 Red Hat, Inc.
+ * 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 <stdio.h>
+#include "local.h"
+
+/* A subroutine version of the macro feof_unlocked. */
+
+#undef feof_unlocked
+
+int
+_DEFUN(feof_unlocked, (fp),
+ FILE * fp)
+{
+ CHECK_INIT(_REENT, fp);
+ return __sfeof (fp);
+}
diff --git a/newlib/libc/stdio/ferror.c b/newlib/libc/stdio/ferror.c
index 0cd3c3089..f93063d71 100644
--- a/newlib/libc/stdio/ferror.c
+++ b/newlib/libc/stdio/ferror.c
@@ -17,20 +17,31 @@
/*
FUNCTION
-<<ferror>>---test whether read/write error has occurred
+<<ferror>>, <<ferror_unlocked>>---test whether read/write error has occurred
INDEX
ferror
+INDEX
+ ferror_unlocked
ANSI_SYNOPSIS
#include <stdio.h>
int ferror(FILE *<[fp]>);
+ #define _BSD_SOURCE
+ #include <stdio.h>
+ int ferror_unlocked(FILE *<[fp]>);
+
TRAD_SYNOPSIS
#include <stdio.h>
int ferror(<[fp]>)
FILE *<[fp]>;
+ #define _BSD_SOURCE
+ #include <stdio.h>
+ int ferror_unlocked(<[fp]>)
+ FILE *<[fp]>;
+
DESCRIPTION
The <<stdio>> functions maintain an error indicator with each file
pointer <[fp]>, to record whether any read or write errors have
@@ -39,6 +50,15 @@ Use <<ferror>> to query this indicator.
See <<clearerr>> to reset the error indicator.
+<<ferror_unlocked>> is a non-thread-safe version of <<ferror>>.
+<<ferror_unlocked>> may only safely be used within a scope
+protected by flockfile() (or ftrylockfile()) and funlockfile(). This
+function may safely be used in a multi-threaded program if and only
+if they are called while the invoking thread owns the (FILE *)
+object, as is the case after a successful call to the flockfile() or
+ftrylockfile() functions. If threads are disabled, then
+<<ferror_unlocked>> is equivalent to <<ferror>>.
+
RETURNS
<<ferror>> returns <<0>> if no errors have occurred; it returns a
nonzero value otherwise.
@@ -46,6 +66,8 @@ nonzero value otherwise.
PORTABILITY
ANSI C requires <<ferror>>.
+<<ferror_unlocked>> is a BSD extension also provided by GNU libc.
+
No supporting OS subroutines are required.
*/
diff --git a/newlib/libc/stdio/ferror_u.c b/newlib/libc/stdio/ferror_u.c
new file mode 100644
index 000000000..9b9edba24
--- /dev/null
+++ b/newlib/libc/stdio/ferror_u.c
@@ -0,0 +1,41 @@
+/*
+ * Copyright (c) 2014 Red Hat, Inc.
+ * 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 <stdio.h>
+#include "local.h"
+
+/* A subroutine version of the macro ferror_unlocked. */
+
+#undef ferror_unlocked
+
+int
+_DEFUN(ferror_unlocked, (fp),
+ FILE * fp)
+{
+ CHECK_INIT(_REENT, fp);
+ return __sferror (fp);
+}
diff --git a/newlib/libc/stdio/fflush.c b/newlib/libc/stdio/fflush.c
index ee24cf7ca..a4e639e72 100644
--- a/newlib/libc/stdio/fflush.c
+++ b/newlib/libc/stdio/fflush.c
@@ -17,19 +17,32 @@
/*
FUNCTION
-<<fflush>>---flush buffered file output
+<<fflush>>, <<fflush_unlocked>>---flush buffered file output
INDEX
fflush
INDEX
+ fflush_unlocked
+INDEX
_fflush_r
+INDEX
+ _fflush_unlocked_r
ANSI_SYNOPSIS
#include <stdio.h>
int fflush(FILE *<[fp]>);
+ #define _BSD_SOURCE
+ #include <stdio.h>
+ int fflush_unlocked(FILE *<[fp]>);
+
+ #include <stdio.h>
int _fflush_r(struct _reent *<[reent]>, FILE *<[fp]>);
+ #define _BSD_SOURCE
+ #include <stdio.h>
+ int _fflush_unlocked_r(struct _reent *<[reent]>, FILE *<[fp]>);
+
DESCRIPTION
The <<stdio>> output functions can buffer output before delivering it
to the host system, in order to minimize the overhead of system calls.
@@ -45,9 +58,18 @@ descriptor, set the position of the file descriptor to match next
unread byte, useful for obeying POSIX semantics when ending a process
without consuming all input from the stream.
-The alternate function <<_fflush_r>> is a reentrant version, where the
-extra argument <[reent]> is a pointer to a reentrancy structure, and
-<[fp]> must not be NULL.
+<<fflush_unlocked>> is a non-thread-safe version of <<fflush>>.
+<<fflush_unlocked>> may only safely be used within a scope
+protected by flockfile() (or ftrylockfile()) and funlockfile(). This
+function may safely be used in a multi-threaded program if and only
+if they are called while the invoking thread owns the (FILE *)
+object, as is the case after a successful call to the flockfile() or
+ftrylockfile() functions. If threads are disabled, then
+<<fflush_unlocked>> is equivalent to <<fflush>>.
+
+The alternate functions <<_fflush_r>> and <<_fflush_unlocked_r>> are
+reentrant versions, where the extra argument <[reent]> is a pointer to
+a reentrancy structure, and <[fp]> must not be NULL.
RETURNS
<<fflush>> returns <<0>> unless it encounters a write error; in that
@@ -57,6 +79,8 @@ PORTABILITY
ANSI C requires <<fflush>>. The behavior on input streams is only
specified by POSIX, and not all implementations follow POSIX rules.
+<<fflush_unlocked>> is a BSD extension also provided by GNU libc.
+
No supporting OS subroutines are required.
*/
@@ -65,6 +89,12 @@ No supporting OS subroutines are required.
#include <errno.h>
#include "local.h"
+#ifdef __IMPL_UNLOCKED__
+#define _fflush_r _fflush_unlocked_r
+#define fflush fflush_unlocked
+#endif
+
+#ifndef __IMPL_UNLOCKED__
/* Flush a single file, or (if fp is NULL) all files. */
/* Core function which does not lock file pointer. This gets called
@@ -75,10 +105,12 @@ _DEFUN(__sflush_r, (ptr, fp),
register FILE * fp)
{
register unsigned char *p;
- register int n, t;
+ register _READ_WRITE_BUFSIZE_TYPE n;
+ register _READ_WRITE_RETURN_TYPE t;
+ short flags;
- t = fp->_flags;
- if ((t & __SWR) == 0)
+ flags = fp->_flags;
+ if ((flags & __SWR) == 0)
{
#ifdef _FSEEK_OPTIMIZATION
/* For a read stream, an fflush causes the next seek to be
@@ -186,7 +218,7 @@ _DEFUN(__sflush_r, (ptr, fp),
* write function.
*/
fp->_p = p;
- fp->_w = t & (__SLBF | __SNBF) ? 0 : fp->_bf._size;
+ fp->_w = flags & (__SLBF | __SNBF) ? 0 : fp->_bf._size;
while (n > 0)
{
@@ -202,6 +234,21 @@ _DEFUN(__sflush_r, (ptr, fp),
return 0;
}
+#ifdef _STDIO_BSD_SEMANTICS
+/* Called from _cleanup_r. At exit time, we don't need file locking,
+ and we don't want to move the underlying file pointer unless we're
+ writing. */
+int
+_DEFUN(__sflushw_r, (ptr, fp),
+ struct _reent *ptr _AND
+ register FILE *fp)
+{
+ return (fp->_flags & __SWR) ? __sflush_r (ptr, fp) : 0;
+}
+#endif
+
+#endif /* __IMPL_UNLOCKED__ */
+
int
_DEFUN(_fflush_r, (ptr, fp),
struct _reent *ptr _AND
diff --git a/newlib/libc/stdio/fflush_u.c b/newlib/libc/stdio/fflush_u.c
new file mode 100644
index 000000000..adcc46063
--- /dev/null
+++ b/newlib/libc/stdio/fflush_u.c
@@ -0,0 +1,28 @@
+/*
+ * Copyright (c) 2014 Red Hat, Inc.
+ * 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.
+ */
+
+#define __IMPL_UNLOCKED__
+#include "fflush.c"
diff --git a/newlib/libc/stdio/fgetc.c b/newlib/libc/stdio/fgetc.c
index 20492d24b..34447a2c8 100644
--- a/newlib/libc/stdio/fgetc.c
+++ b/newlib/libc/stdio/fgetc.c
@@ -17,30 +17,53 @@
/*
FUNCTION
-<<fgetc>>---get a character from a file or stream
+<<fgetc>>, <<fgetc_unlocked>>---get a character from a file or stream
INDEX
fgetc
INDEX
+ fgetc_unlocked
+INDEX
_fgetc_r
+INDEX
+ _fgetc_unlocked_r
ANSI_SYNOPSIS
#include <stdio.h>
int fgetc(FILE *<[fp]>);
+ #define _BSD_SOURCE
+ #include <stdio.h>
+ int fgetc_unlocked(FILE *<[fp]>);
+
#include <stdio.h>
int _fgetc_r(struct _reent *<[ptr]>, FILE *<[fp]>);
+ #define _BSD_SOURCE
+ #include <stdio.h>
+ int _fgetc_unlocked_r(struct _reent *<[ptr]>, FILE *<[fp]>);
+
TRAD_SYNOPSIS
#include <stdio.h>
int fgetc(<[fp]>)
FILE *<[fp]>;
+ #define _BSD_SOURCE
+ #include <stdio.h>
+ int fgetc_unlocked(<[fp]>)
+ FILE *<[fp]>;
+
#include <stdio.h>
int _fgetc_r(<[ptr]>, <[fp]>)
struct _reent *<[ptr]>;
FILE *<[fp]>;
+ #define _BSD_SOURCE
+ #include <stdio.h>
+ int _fgetc_unlocked_r(<[ptr]>, <[fp]>)
+ struct _reent *<[ptr]>;
+ FILE *<[fp]>;
+
DESCRIPTION
Use <<fgetc>> to get the next single character from the file or stream
identified by <[fp]>. As a side effect, <<fgetc>> advances the file's
@@ -48,9 +71,18 @@ current position indicator.
For a macro version of this function, see <<getc>>.
-The function <<_fgetc_r>> is simply a reentrant version of
-<<fgetc>> that is passed the additional reentrant structure
-pointer argument: <[ptr]>.
+<<fgetc_unlocked>> is a non-thread-safe version of <<fgetc>>.
+<<fgetc_unlocked>> may only safely be used within a scope
+protected by flockfile() (or ftrylockfile()) and funlockfile(). This
+function may safely be used in a multi-threaded program if and only
+if they are called while the invoking thread owns the (FILE *)
+object, as is the case after a successful call to the flockfile() or
+ftrylockfile() functions. If threads are disabled, then
+<<fgetc_unlocked>> is equivalent to <<fgetc>>.
+
+The functions <<_fgetc_r>> and <<_fgetc_unlocked_r>> are simply reentrant
+versions that are passed the additional reentrant structure pointer
+argument: <[ptr]>.
RETURNS
The next character (read as an <<unsigned char>>, and cast to
@@ -63,6 +95,8 @@ using the <<ferror>> and <<feof>> functions.
PORTABILITY
ANSI C requires <<fgetc>>.
+<<fgetc_unlocked>> is a BSD extension also provided by GNU libc.
+
Supporting OS subroutines required: <<close>>, <<fstat>>, <<isatty>>,
<<lseek>>, <<read>>, <<sbrk>>, <<write>>.
*/
diff --git a/newlib/libc/stdio/fgetc_u.c b/newlib/libc/stdio/fgetc_u.c
new file mode 100644
index 000000000..5bbd5a549
--- /dev/null
+++ b/newlib/libc/stdio/fgetc_u.c
@@ -0,0 +1,56 @@
+/*
+ * Copyright (c) 2014 Red Hat, Inc.
+ * 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 <stdio.h>
+#include "local.h"
+
+int
+_DEFUN(_fgetc_unlocked_r, (ptr, fp),
+ struct _reent * ptr _AND
+ FILE * fp)
+{
+ CHECK_INIT(ptr, fp);
+ return __sgetc_r (ptr, fp);
+}
+
+#ifndef _REENT_ONLY
+
+int
+_DEFUN(fgetc_unlocked, (fp),
+ FILE * fp)
+{
+#if !defined(PREFER_SIZE_OVER_SPEED) && !defined(__OPTIMIZE_SIZE__)
+ struct _reent *reent = _REENT;
+
+ CHECK_INIT(reent, fp);
+ return __sgetc_r (reent, fp);
+#else
+ return _fgetc_unlocked_r (_REENT, fp);
+#endif
+}
+
+#endif /* !_REENT_ONLY */
diff --git a/newlib/libc/stdio/fgetpos.c b/newlib/libc/stdio/fgetpos.c
index 21a63789d..20dd1082c 100644
--- a/newlib/libc/stdio/fgetpos.c
+++ b/newlib/libc/stdio/fgetpos.c
@@ -26,8 +26,8 @@ INDEX
ANSI_SYNOPSIS
#include <stdio.h>
- int fgetpos(FILE *<[fp]>, fpos_t *<[pos]>);
- int _fgetpos_r(struct _reent *<[ptr]>, FILE *<[fp]>, fpos_t *<[pos]>);
+ int fgetpos(FILE *restrict <[fp]>, fpos_t *restrict <[pos]>);
+ int _fgetpos_r(struct _reent *<[ptr]>, FILE *restrict <[fp]>, fpos_t *restrict <[pos]>);
TRAD_SYNOPSIS
#include <stdio.h>
@@ -78,8 +78,8 @@ No supporting OS subroutines are required.
int
_DEFUN(_fgetpos_r, (ptr, fp, pos),
struct _reent * ptr _AND
- FILE * fp _AND
- _fpos_t * pos)
+ FILE *__restrict fp _AND
+ _fpos_t *__restrict pos)
{
*pos = _ftell_r (ptr, fp);
@@ -94,8 +94,8 @@ _DEFUN(_fgetpos_r, (ptr, fp, pos),
int
_DEFUN(fgetpos, (fp, pos),
- FILE * fp _AND
- _fpos_t * pos)
+ FILE *__restrict fp _AND
+ _fpos_t *__restrict pos)
{
return _fgetpos_r (_REENT, fp, pos);
}
diff --git a/newlib/libc/stdio/fgets.c b/newlib/libc/stdio/fgets.c
index 319cfd576..f7c8a0300 100644
--- a/newlib/libc/stdio/fgets.c
+++ b/newlib/libc/stdio/fgets.c
@@ -17,19 +17,30 @@
/*
FUNCTION
-<<fgets>>---get character string from a file or stream
+<<fgets>>, <<fgets_unlocked>>---get character string from a file or stream
INDEX
fgets
INDEX
+ fgets_unlocked
+INDEX
_fgets_r
+INDEX
+ _fgets_unlocked_r
ANSI_SYNOPSIS
#include <stdio.h>
- char *fgets(char *<[buf]>, int <[n]>, FILE *<[fp]>);
+ char *fgets(char *restrict <[buf]>, int <[n]>, FILE *restrict <[fp]>);
+
+ #define _GNU_SOURCE
+ #include <stdio.h>
+ char *fgets_unlocked(char *restrict <[buf]>, int <[n]>, FILE *restrict <[fp]>);
+
+ #include <stdio.h>
+ char *_fgets_r(struct _reent *<[ptr]>, char *restrict <[buf]>, int <[n]>, FILE *restrict <[fp]>);
#include <stdio.h>
- char *_fgets_r(struct _reent *<[ptr]>, char *<[buf]>, int <[n]>, FILE *<[fp]>);
+ char *_fgets_unlocked_r(struct _reent *<[ptr]>, char *restrict <[buf]>, int <[n]>, FILE *restrict <[fp]>);
TRAD_SYNOPSIS
#include <stdio.h>
@@ -38,6 +49,13 @@ TRAD_SYNOPSIS
int <[n]>;
FILE *<[fp]>;
+ #define _GNU_SOURCE
+ #include <stdio.h>
+ char *fgets_unlocked(<[buf]>,<[n]>,<[fp]>)
+ char *<[buf]>;
+ int <[n]>;
+ FILE *<[fp]>;
+
#include <stdio.h>
char *_fgets_r(<[ptr]>, <[buf]>,<[n]>,<[fp]>)
struct _reent *<[ptr]>;
@@ -45,14 +63,30 @@ TRAD_SYNOPSIS
int <[n]>;
FILE *<[fp]>;
+ #include <stdio.h>
+ char *_fgets_unlocked_r(<[ptr]>, <[buf]>,<[n]>,<[fp]>)
+ struct _reent *<[ptr]>;
+ char *<[buf]>;
+ int <[n]>;
+ FILE *<[fp]>;
+
DESCRIPTION
Reads at most <[n-1]> characters from <[fp]> until a newline
is found. The characters including to the newline are stored
in <[buf]>. The buffer is terminated with a 0.
- The <<_fgets_r>> function is simply the reentrant version of
- <<fgets>> and is passed an additional reentrancy structure
- pointer: <[ptr]>.
+ <<fgets_unlocked>> is a non-thread-safe version of <<fgets>>.
+ <<fgets_unlocked>> may only safely be used within a scope
+ protected by flockfile() (or ftrylockfile()) and funlockfile(). This
+ function may safely be used in a multi-threaded program if and only
+ if they are called while the invoking thread owns the (FILE *)
+ object, as is the case after a successful call to the flockfile() or
+ ftrylockfile() functions. If threads are disabled, then
+ <<fgets_unlocked>> is equivalent to <<fgets>>.
+
+ The functions <<_fgets_r>> and <<_fgets_unlocked_r>> are simply
+ reentrant versions that are passed the additional reentrant structure
+ pointer argument: <[ptr]>.
RETURNS
<<fgets>> returns the buffer passed to it, with the data
@@ -65,6 +99,8 @@ PORTABILITY
that <<fgets>> returns all of the data, while <<gets>> removes
the trailing newline (with no indication that it has done so.)
+ <<fgets_unlocked>> is a GNU extension.
+
Supporting OS subroutines required: <<close>>, <<fstat>>, <<isatty>>,
<<lseek>>, <<read>>, <<sbrk>>, <<write>>.
*/
@@ -74,6 +110,11 @@ Supporting OS subroutines required: <<close>>, <<fstat>>, <<isatty>>,
#include <string.h>
#include "local.h"
+#ifdef __IMPL_UNLOCKED__
+#define _fgets_r _fgets_unlocked_r
+#define fgets fgets_unlocked
+#endif
+
/*
* Read at most n-1 characters from the given file.
* Stop when a newline has been read, or the count runs out.
@@ -83,9 +124,9 @@ Supporting OS subroutines required: <<close>>, <<fstat>>, <<isatty>>,
char *
_DEFUN(_fgets_r, (ptr, buf, n, fp),
struct _reent * ptr _AND
- char *buf _AND
+ char *__restrict buf _AND
int n _AND
- FILE * fp)
+ FILE *__restrict fp)
{
size_t len;
char *s;
@@ -177,9 +218,9 @@ _DEFUN(_fgets_r, (ptr, buf, n, fp),
char *
_DEFUN(fgets, (buf, n, fp),
- char *buf _AND
+ char *__restrict buf _AND
int n _AND
- FILE * fp)
+ FILE *__restrict fp)
{
return _fgets_r (_REENT, buf, n, fp);
}
diff --git a/newlib/libc/stdio/fgets_u.c b/newlib/libc/stdio/fgets_u.c
new file mode 100644
index 000000000..b36748da1
--- /dev/null
+++ b/newlib/libc/stdio/fgets_u.c
@@ -0,0 +1,28 @@
+/*
+ * Copyright (c) 2014 Red Hat, Inc.
+ * 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.
+ */
+
+#define __IMPL_UNLOCKED__
+#include "fgets.c"
diff --git a/newlib/libc/stdio/fgetwc.c b/newlib/libc/stdio/fgetwc.c
index 14c554786..d6de4b6cb 100644
--- a/newlib/libc/stdio/fgetwc.c
+++ b/newlib/libc/stdio/fgetwc.c
@@ -26,40 +26,72 @@
/*
FUNCTION
-<<fgetwc>>, <<getwc>>---get a wide character from a file or stream
+<<fgetwc>>, <<getwc>>, <<fgetwc_unlocked>>, <<getwc_unlocked>>---get a wide character from a file or stream
INDEX
fgetwc
INDEX
+ fgetwc_unlocked
+INDEX
_fgetwc_r
INDEX
+ _fgetwc_unlocked_r
+INDEX
getwc
INDEX
+ getwc_unlocked
+INDEX
_getwc_r
+INDEX
+ _getwc_unlocked_r
ANSI_SYNOPSIS
#include <stdio.h>
#include <wchar.h>
wint_t fgetwc(FILE *<[fp]>);
+ #define _GNU_SOURCE
+ #include <stdio.h>
+ #include <wchar.h>
+ wint_t fgetwc_unlocked(FILE *<[fp]>);
+
#include <stdio.h>
#include <wchar.h>
wint_t _fgetwc_r(struct _reent *<[ptr]>, FILE *<[fp]>);
#include <stdio.h>
#include <wchar.h>
+ wint_t _fgetwc_unlocked_r(struct _reent *<[ptr]>, FILE *<[fp]>);
+
+ #include <stdio.h>
+ #include <wchar.h>
wint_t getwc(FILE *<[fp]>);
+ #define _GNU_SOURCE
+ #include <stdio.h>
+ #include <wchar.h>
+ wint_t getwc_unlocked(FILE *<[fp]>);
+
#include <stdio.h>
#include <wchar.h>
wint_t _getwc_r(struct _reent *<[ptr]>, FILE *<[fp]>);
+ #include <stdio.h>
+ #include <wchar.h>
+ wint_t _getwc_unlocked_r(struct _reent *<[ptr]>, FILE *<[fp]>);
+
TRAD_SYNOPSIS
#include <stdio.h>
#include <wchar.h>
wint_t fgetwc(<[fp]>)
FILE *<[fp]>;
+ #define _GNU_SOURCE
+ #include <stdio.h>
+ #include <wchar.h>
+ wint_t fgetwc_unlocked(<[fp]>)
+ FILE *<[fp]>;
+
#include <stdio.h>
#include <wchar.h>
wint_t _fgetwc_r(<[ptr]>, <[fp]>)
@@ -68,30 +100,57 @@ TRAD_SYNOPSIS
#include <stdio.h>
#include <wchar.h>
+ wint_t _fgetwc_unlocked_r(<[ptr]>, <[fp]>)
+ struct _reent *<[ptr]>;
+ FILE *<[fp]>;
+
+ #include <stdio.h>
+ #include <wchar.h>
wint_t getwc(<[fp]>)
FILE *<[fp]>;
+ #define _GNU_SOURCE
+ #include <stdio.h>
+ #include <wchar.h>
+ wint_t getwc_unlocked(<[fp]>)
+ FILE *<[fp]>;
+
#include <stdio.h>
#include <wchar.h>
wint_t _getwc_r(<[ptr]>, <[fp]>)
struct _reent *<[ptr]>;
FILE *<[fp]>;
+ #include <stdio.h>
+ #include <wchar.h>
+ wint_t _getwc_unlocked_r(<[ptr]>, <[fp]>)
+ struct _reent *<[ptr]>;
+ FILE *<[fp]>;
+
DESCRIPTION
Use <<fgetwc>> to get the next wide character from the file or stream
identified by <[fp]>. As a side effect, <<fgetwc>> advances the file's
current position indicator.
-The <<getwc>> function or macro functions identically to <<fgetwc>>. It
-may be implemented as a macro, and may evaluate its argument more than
-once. There is no reason ever to use it.
+<<fgetwc_unlocked>> is a non-thread-safe version of <<fgetwc>>.
+<<fgetwc_unlocked>> may only safely be used within a scope
+protected by flockfile() (or ftrylockfile()) and funlockfile(). This
+function may safely be used in a multi-threaded program if and only
+if they are called while the invoking thread owns the (FILE *)
+object, as is the case after a successful call to the flockfile() or
+ftrylockfile() functions. If threads are disabled, then
+<<fgetwc_unlocked>> is equivalent to <<fgetwc>>.
+
+The <<getwc>> and <<getwc_unlocked>> functions or macros functions identically
+to <<fgetwc>> and <<fgetwc_unlocked>>. It may be implemented as a macro, and
+may evaluate its argument more than once. There is no reason ever to use it.
-<<_fgetwc_r>> and <<_getwc_r>> are simply reentrant versions of
-<<fgetwc>> and <<getwc>> that are passed the additional reentrant
-structure pointer argument: <[ptr]>.
+<<_fgetwc_r>>, <<_getwc_r>>, <<_fgetwc_unlocked_r>>, and <<_getwc_unlocked_r>>
+are simply reentrant versions of the above functions that are passed the
+additional reentrant structure pointer argument: <[ptr]>.
RETURNS
-The next wide character cast to <<wint_t>>), unless there is no more data,
+The next wide character cast to <<wint_t>>, unless there is no more data,
or the host system reports a read error; in either of these situations,
<<fgetwc>> and <<getwc>> return <<WEOF>>.
@@ -99,7 +158,9 @@ You can distinguish the two situations that cause an <<EOF>> result by
using the <<ferror>> and <<feof>> functions.
PORTABILITY
-C99, POSIX.1-2001
+<<fgetwc>> and <<getwc>> are required by C99 and POSIX.1-2001.
+
+<<fgetwc_unlocked>> and <<getwc_unlocked>> are GNU extensions.
*/
#include <_ansi.h>
@@ -110,7 +171,7 @@ C99, POSIX.1-2001
#include <wchar.h>
#include "local.h"
-static wint_t
+wint_t
_DEFUN(__fgetwc, (ptr, fp),
struct _reent *ptr _AND
register FILE *fp)
diff --git a/newlib/libc/stdio/fgetwc_u.c b/newlib/libc/stdio/fgetwc_u.c
new file mode 100644
index 000000000..4ccd5765c
--- /dev/null
+++ b/newlib/libc/stdio/fgetwc_u.c
@@ -0,0 +1,49 @@
+/*
+ * Copyright (c) 2014 Red Hat, Inc.
+ * 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 <stdio.h>
+#include <wchar.h>
+#include "local.h"
+
+wint_t
+_DEFUN(_fgetwc_unlocked_r, (ptr, fp),
+ struct _reent *ptr _AND
+ register FILE *fp)
+{
+ ORIENT(fp, 1);
+ return __fgetwc (ptr, fp);
+}
+
+wint_t
+_DEFUN(fgetwc_unlocked, (fp),
+ FILE *fp)
+{
+ struct _reent *reent = _REENT;
+
+ CHECK_INIT(reent, fp);
+ return _fgetwc_unlocked_r (reent, fp);
+}
diff --git a/newlib/libc/stdio/fgetws.c b/newlib/libc/stdio/fgetws.c
index b5d8851e1..ae1f48e66 100644
--- a/newlib/libc/stdio/fgetws.c
+++ b/newlib/libc/stdio/fgetws.c
@@ -26,29 +26,58 @@
/*
FUNCTION
-<<fgetws>>---get wide character string from a file or stream
+<<fgetws>>, <<fgetws_unlocked>>---get wide character string from a file or stream
INDEX
fgetws
INDEX
+ fgetws_unlocked
+INDEX
_fgetws_r
+INDEX
+ _fgetws_unlocked_r
ANSI_SYNOPSIS
#include <wchar.h>
- wchar_t *fgetws(wchar_t *<[ws]>, int <[n]>, FILE *<[fp]>);
+ wchar_t *fgetws(wchar_t *__restrict <[ws]>, int <[n]>,
+ FILE *__restrict <[fp]>);
+ #define _GNU_SOURCE
#include <wchar.h>
- wchar_t *_fgetws_r(struct _reent *<[ptr]>, wchar_t *<[ws]>, int <[n]>, FILE *<[fp]>);
+ wchar_t *fgetws_unlocked(wchar_t *__restrict <[ws]>, int <[n]>,
+ FILE *__restrict <[fp]>);
+
+ #include <wchar.h>
+ wchar_t *_fgetws_r(struct _reent *<[ptr]>, wchar_t *<[ws]>,
+ int <[n]>, FILE *<[fp]>);
+
+ #include <wchar.h>
+ wchar_t *_fgetws_unlocked_r(struct _reent *<[ptr]>, wchar_t *<[ws]>,
+ int <[n]>, FILE *<[fp]>);
TRAD_SYNOPSIS
#include <wchar.h>
wchar_t *fgetws(<[ws]>,<[n]>,<[fp]>)
+ wchar_t *__restrict <[ws]>;
+ int <[n]>;
+ FILE *__restrict <[fp]>;
+
+ #define _GNU_SOURCE
+ #include <wchar.h>
+ wchar_t *fgetws_unlocked(<[ws]>,<[n]>,<[fp]>)
+ wchar_t *__restrict <[ws]>;
+ int <[n]>;
+ FILE *__restrict <[fp]>;
+
+ #include <wchar.h>
+ wchar_t *_fgetws_r(<[ptr]>, <[ws]>,<[n]>,<[fp]>)
+ struct _reent *<[ptr]>;
wchar_t *<[ws]>;
int <[n]>;
FILE *<[fp]>;
#include <wchar.h>
- wchar_t *_fgetws_r(<[ptr]>, <[ws]>,<[n]>,<[fp]>)
+ wchar_t *_fgetws_unlocked_r(<[ptr]>, <[ws]>,<[n]>,<[fp]>)
struct _reent *<[ptr]>;
wchar_t *<[ws]>;
int <[n]>;
@@ -59,8 +88,17 @@ Reads at most <[n-1]> wide characters from <[fp]> until a newline
is found. The wide characters including to the newline are stored
in <[ws]>. The buffer is terminated with a 0.
-The <<_fgetws_r>> function is simply the reentrant version of
-<<fgetws>> and is passed an additional reentrancy structure
+<<fgetws_unlocked>> is a non-thread-safe version of <<fgetws>>.
+<<fgetws_unlocked>> may only safely be used within a scope
+protected by flockfile() (or ftrylockfile()) and funlockfile(). This
+function may safely be used in a multi-threaded program if and only
+if they are called while the invoking thread owns the (FILE *)
+object, as is the case after a successful call to the flockfile() or
+ftrylockfile() functions. If threads are disabled, then
+<<fgetws_unlocked>> is equivalent to <<fgetws>>.
+
+The <<_fgetws_r>> and <<_fgetws_unlocked_r>> functions are simply reentrant
+version of the above and are passed an additional reentrancy structure
pointer: <[ptr]>.
RETURNS
@@ -70,7 +108,9 @@ accumulated, the data is returned with no other indication. If
no data are read, NULL is returned instead.
PORTABILITY
-C99, POSIX.1-2001
+<<fgetws>> is required by C99 and POSIX.1-2001.
+
+<<fgetws_unlocked>> is a GNU extension.
*/
#include <_ansi.h>
@@ -81,6 +121,11 @@ C99, POSIX.1-2001
#include <wchar.h>
#include "local.h"
+#ifdef __IMPL_UNLOCKED__
+#define _fgetws_r _fgetws_unlocked_r
+#define fgetws fgetws_unlocked
+#endif
+
wchar_t *
_DEFUN(_fgetws_r, (ptr, ws, n, fp),
struct _reent *ptr _AND
@@ -156,9 +201,9 @@ error:
wchar_t *
_DEFUN(fgetws, (ws, n, fp),
- wchar_t *ws _AND
+ wchar_t *__restrict ws _AND
int n _AND
- FILE *fp)
+ FILE *__restrict fp)
{
struct _reent *reent = _REENT;
diff --git a/newlib/libc/stdio/fgetws_u.c b/newlib/libc/stdio/fgetws_u.c
new file mode 100644
index 000000000..ae4d7d9c2
--- /dev/null
+++ b/newlib/libc/stdio/fgetws_u.c
@@ -0,0 +1,28 @@
+/*
+ * Copyright (c) 2014 Red Hat, Inc.
+ * 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.
+ */
+
+#define __IMPL_UNLOCKED__
+#include "fgetws.c"
diff --git a/newlib/libc/stdio/fileno.c b/newlib/libc/stdio/fileno.c
index be8f3d66a..7b505827d 100644
--- a/newlib/libc/stdio/fileno.c
+++ b/newlib/libc/stdio/fileno.c
@@ -17,23 +17,43 @@
/*
FUNCTION
-<<fileno>>---return file descriptor associated with stream
+<<fileno>>, <<fileno_unlocked>>---return file descriptor associated with stream
INDEX
fileno
+INDEX
+ fileno_unlocked
ANSI_SYNOPSIS
#include <stdio.h>
int fileno(FILE *<[fp]>);
+ #define _BSD_SOURCE
+ #include <stdio.h>
+ int fileno_unlocked(FILE *<[fp]>);
+
TRAD_SYNOPSIS
#include <stdio.h>
int fileno(<[fp]>)
FILE *<[fp]>;
+ #define _BSD_SOURCE
+ #include <stdio.h>
+ int fileno_unlocked(<[fp]>)
+ FILE *<[fp]>;
+
DESCRIPTION
You can use <<fileno>> to return the file descriptor identified by <[fp]>.
+<<fileno_unlocked>> is a non-thread-safe version of <<fileno>>.
+<<fileno_unlocked>> may only safely be used within a scope
+protected by flockfile() (or ftrylockfile()) and funlockfile(). This
+function may safely be used in a multi-threaded program if and only
+if they are called while the invoking thread owns the (FILE *)
+object, as is the case after a successful call to the flockfile() or
+ftrylockfile() functions. If threads are disabled, then
+<<fileno_unlocked>> is equivalent to <<fileno>>.
+
RETURNS
<<fileno>> returns a non-negative integer when successful.
If <[fp]> is not an open stream, <<fileno>> returns -1.
@@ -42,6 +62,8 @@ PORTABILITY
<<fileno>> is not part of ANSI C.
POSIX requires <<fileno>>.
+<<fileno_unlocked>> is a BSD extension also provided by GNU libc.
+
Supporting OS subroutines required: none.
*/
diff --git a/newlib/libc/stdio/fileno_u.c b/newlib/libc/stdio/fileno_u.c
new file mode 100644
index 000000000..468d1127e
--- /dev/null
+++ b/newlib/libc/stdio/fileno_u.c
@@ -0,0 +1,46 @@
+/*
+ * Copyright (c) 2014 Red Hat, Inc.
+ * 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 <stdio.h>
+#include <errno.h>
+#include "local.h"
+
+int
+_DEFUN(fileno_unlocked, (f),
+ FILE * f)
+{
+ int result;
+ CHECK_INIT (_REENT, f);
+ if (f->_flags)
+ result = __sfileno (f);
+ else
+ {
+ result = -1;
+ _REENT->_errno = EBADF;
+ }
+ return result;
+}
diff --git a/newlib/libc/stdio/findfp.c b/newlib/libc/stdio/findfp.c
index e40500a07..3a9ff6992 100644
--- a/newlib/libc/stdio/findfp.c
+++ b/newlib/libc/stdio/findfp.c
@@ -35,7 +35,11 @@ const struct __sFILE_fake __sf_fake_stderr =
{_NULL, 0, 0, 0, 0, {_NULL, 0}, 0, _NULL};
#endif
+#if (defined (__OPTIMIZE_SIZE__) || defined (PREFER_SIZE_OVER_SPEED))
+_NOINLINE_STATIC _VOID
+#else
static _VOID
+#endif
_DEFUN(std, (ptr, flags, file, data),
FILE *ptr _AND
int flags _AND
@@ -170,8 +174,22 @@ _VOID
_DEFUN(_cleanup_r, (ptr),
struct _reent *ptr)
{
- _CAST_VOID _fwalk(ptr, fclose);
- /* _CAST_VOID _fwalk (ptr, fflush); */ /* `cheating' */
+ int (*cleanup_func) (struct _reent *, FILE *);
+#ifdef _STDIO_BSD_SEMANTICS
+ /* BSD and Glibc systems only flush streams which have been written to
+ at exit time. Calling flush rather than close for speed, as on
+ the aforementioned systems. */
+ cleanup_func = __sflushw_r;
+#else
+ /* Otherwise close files and flush read streams, too.
+ Note we call flush directly if "--enable-lite-exit" is in effect. */
+#ifdef _LITE_EXIT
+ cleanup_func = _fflush_r;
+#else
+ cleanup_func = _fclose_r;
+#endif
+#endif
+ _CAST_VOID _fwalk_reent (ptr, cleanup_func);
}
#ifndef _REENT_ONLY
@@ -218,7 +236,9 @@ _DEFUN(__sinit, (s),
s->_stderr = __sfp(s);
#endif
- std (s->_stdin, __SRD, 0, s);
+ /* Cygnal: __SCLE is added to all descriptors to make
+ enable line-ending conversion. */
+ std (s->_stdin, __SRD | __SCLE, 0, s);
/* On platforms that have true file system I/O, we can verify
whether stdout is an interactive terminal or not, as part of
@@ -227,14 +247,14 @@ _DEFUN(__sinit, (s),
requires both stdin and stdout to be line-buffered, but tradition
leaves stdin alone on systems without fcntl. */
#ifdef HAVE_FCNTL
- std (s->_stdout, __SWR, 1, s);
+ std (s->_stdout, __SWR | __SCLE, 1, s);
#else
- std (s->_stdout, __SWR | __SLBF, 1, s);
+ std (s->_stdout, __SWR | __SLBF | __SCLE, 1, s);
#endif
/* POSIX requires stderr to be opened for reading and writing, even
when the underlying fd 2 is write-only. */
- std (s->_stderr, __SRW | __SNBF, 2, s);
+ std (s->_stderr, __SRW | __SNBF | __SCLE, 2, s);
s->__sdidinit = 1;
@@ -275,7 +295,8 @@ static int
_DEFUN(__fp_lock, (ptr),
FILE * ptr)
{
- _flockfile (ptr);
+ if (!(ptr->_flags2 & __SNLK))
+ _flockfile (ptr);
return 0;
}
@@ -285,7 +306,8 @@ static int
_DEFUN(__fp_unlock, (ptr),
FILE * ptr)
{
- _funlockfile (ptr);
+ if (!(ptr->_flags2 & __SNLK))
+ _funlockfile (ptr);
return 0;
}
diff --git a/newlib/libc/stdio/flags.c b/newlib/libc/stdio/flags.c
index 518cc33f1..7d18fd1d1 100644
--- a/newlib/libc/stdio/flags.c
+++ b/newlib/libc/stdio/flags.c
@@ -90,8 +90,8 @@ _DEFUN(__sflags, (ptr, mode, optr),
break;
}
}
-#if defined (O_TEXT) && !defined (__CYGWIN__)
- if (!(m | O_BINARY))
+#if defined (O_TEXT)
+ if (!(m & O_BINARY))
m |= O_TEXT;
#endif
*optr = m | o;
diff --git a/newlib/libc/stdio/fmemopen.c b/newlib/libc/stdio/fmemopen.c
index acfb23c1b..17a3c9b5c 100644
--- a/newlib/libc/stdio/fmemopen.c
+++ b/newlib/libc/stdio/fmemopen.c
@@ -87,7 +87,7 @@ _DEFUN(fmemreader, (ptr, cookie, buf, n),
struct _reent *ptr _AND
void *cookie _AND
char *buf _AND
- int n)
+ _READ_WRITE_BUFSIZE_TYPE n)
{
fmemcookie *c = (fmemcookie *) cookie;
/* Can't read beyond current size, but EOF condition is not an error. */
@@ -107,7 +107,7 @@ _DEFUN(fmemwriter, (ptr, cookie, buf, n),
struct _reent *ptr _AND
void *cookie _AND
const char *buf _AND
- int n)
+ _READ_WRITE_BUFSIZE_TYPE n)
{
fmemcookie *c = (fmemcookie *) cookie;
int adjust = 0; /* true if at EOF, but still need to write NUL. */
@@ -270,9 +270,9 @@ _DEFUN(fmemcloser, (ptr, cookie),
FILE *
_DEFUN(_fmemopen_r, (ptr, buf, size, mode),
struct _reent *ptr _AND
- void *buf _AND
+ void *__restrict buf _AND
size_t size _AND
- const char *mode)
+ const char *__restrict mode)
{
FILE *fp;
fmemcookie *c;
@@ -362,9 +362,9 @@ _DEFUN(_fmemopen_r, (ptr, buf, size, mode),
#ifndef _REENT_ONLY
FILE *
_DEFUN(fmemopen, (buf, size, mode),
- void *buf _AND
+ void *__restrict buf _AND
size_t size _AND
- const char *mode)
+ const char *__restrict mode)
{
return _fmemopen_r (_REENT, buf, size, mode);
}
diff --git a/newlib/libc/stdio/fopen.c b/newlib/libc/stdio/fopen.c
index 27d4bc810..6d07561a3 100644
--- a/newlib/libc/stdio/fopen.c
+++ b/newlib/libc/stdio/fopen.c
@@ -126,8 +126,8 @@ static char sccsid[] = "%W% (Berkeley) %G%";
FILE *
_DEFUN(_fopen_r, (ptr, file, mode),
struct _reent *ptr _AND
- _CONST char *file _AND
- _CONST char *mode)
+ _CONST char *__restrict file _AND
+ _CONST char *__restrict mode)
{
register FILE *fp;
register int f;
diff --git a/newlib/libc/stdio/fopencookie.c b/newlib/libc/stdio/fopencookie.c
index f08d13289..3697b48d7 100644
--- a/newlib/libc/stdio/fopencookie.c
+++ b/newlib/libc/stdio/fopencookie.c
@@ -82,6 +82,7 @@ It is not portable. See also the <<funopen>> interface from BSD.
Supporting OS subroutines required: <<sbrk>>.
*/
+#define _GNU_SOURCE
#include <stdio.h>
#include <errno.h>
#include <sys/lock.h>
@@ -101,7 +102,7 @@ _DEFUN(fcreader, (ptr, cookie, buf, n),
struct _reent *ptr _AND
void *cookie _AND
char *buf _AND
- int n)
+ _READ_WRITE_BUFSIZE_TYPE n)
{
int result;
fccookie *c = (fccookie *) cookie;
@@ -116,7 +117,7 @@ _DEFUN(fcwriter, (ptr, cookie, buf, n),
struct _reent *ptr _AND
void *cookie _AND
const char *buf _AND
- int n)
+ _READ_WRITE_BUFSIZE_TYPE n)
{
int result;
fccookie *c = (fccookie *) cookie;
diff --git a/newlib/libc/stdio/fprintf.c b/newlib/libc/stdio/fprintf.c
index a3c089479..fe92a5b99 100644
--- a/newlib/libc/stdio/fprintf.c
+++ b/newlib/libc/stdio/fprintf.c
@@ -24,8 +24,8 @@
int
_DEFUN(_fprintf_r, (ptr, fp, fmt),
struct _reent *ptr _AND
- FILE *fp _AND
- const char *fmt _DOTS)
+ FILE *__restrict fp _AND
+ const char *__restrict fmt _DOTS)
{
int ret;
va_list ap;
@@ -36,12 +36,18 @@ _DEFUN(_fprintf_r, (ptr, fp, fmt),
return ret;
}
+#ifdef _NANO_FORMATTED_IO
+int
+_EXFUN(_fiprintf_r, (struct _reent *, FILE *, const char *, ...)
+ _ATTRIBUTE ((__alias__("_fprintf_r"))));
+#endif
+
#ifndef _REENT_ONLY
int
_DEFUN(fprintf, (fp, fmt),
- FILE *fp _AND
- const char *fmt _DOTS)
+ FILE *__restrict fp _AND
+ const char *__restrict fmt _DOTS)
{
int ret;
va_list ap;
@@ -52,4 +58,9 @@ _DEFUN(fprintf, (fp, fmt),
return ret;
}
+#ifdef _NANO_FORMATTED_IO
+int
+_EXFUN(fiprintf, (FILE *, const char *, ...)
+ _ATTRIBUTE ((__alias__("fprintf"))));
+#endif
#endif /* ! _REENT_ONLY */
diff --git a/newlib/libc/stdio/fputc.c b/newlib/libc/stdio/fputc.c
index f380717d1..0aad0a9f7 100644
--- a/newlib/libc/stdio/fputc.c
+++ b/newlib/libc/stdio/fputc.c
@@ -17,32 +17,55 @@
/*
FUNCTION
-<<fputc>>---write a character on a stream or file
+<<fputc>>, <<fputc_unlocked>>---write a character on a stream or file
INDEX
fputc
INDEX
+ fputc_unlocked
+INDEX
_fputc_r
+INDEX
+ _fputc_unlocked_r
ANSI_SYNOPSIS
#include <stdio.h>
int fputc(int <[ch]>, FILE *<[fp]>);
+ #define _BSD_SOURCE
+ #include <stdio.h>
+ int fputc_unlocked(int <[ch]>, FILE *<[fp]>);
+
#include <stdio.h>
int _fputc_r(struct _rent *<[ptr]>, int <[ch]>, FILE *<[fp]>);
+ #include <stdio.h>
+ int _fputc_unlocked_r(struct _rent *<[ptr]>, int <[ch]>, FILE *<[fp]>);
+
TRAD_SYNOPSIS
#include <stdio.h>
int fputc(<[ch]>, <[fp]>)
int <[ch]>;
FILE *<[fp]>;
+ #define _BSD_SOURCE
+ #include <stdio.h>
+ int fputc_unlocked(<[ch]>, <[fp]>)
+ int <[ch]>;
+ FILE *<[fp]>;
+
#include <stdio.h>
int _fputc_r(<[ptr]>, <[ch]>, <[fp]>)
struct _reent *<[ptr]>;
int <[ch]>;
FILE *<[fp]>;
+ #include <stdio.h>
+ int _fputc_unlocked_r(<[ptr]>, <[ch]>, <[fp]>)
+ struct _reent *<[ptr]>;
+ int <[ch]>;
+ FILE *<[fp]>;
+
DESCRIPTION
<<fputc>> converts the argument <[ch]> from an <<int>> to an
<<unsigned char>>, then writes it to the file or stream identified by
@@ -56,8 +79,18 @@ oadvances by one.
For a macro version of this function, see <<putc>>.
-The <<_fputc_r>> function is simply a reentrant version of <<fputc>>
-that takes an additional reentrant structure argument: <[ptr]>.
+<<fputc_unlocked>> is a non-thread-safe version of <<fputc>>.
+<<fputc_unlocked>> may only safely be used within a scope
+protected by flockfile() (or ftrylockfile()) and funlockfile(). This
+function may safely be used in a multi-threaded program if and only
+if they are called while the invoking thread owns the (FILE *)
+object, as is the case after a successful call to the flockfile() or
+ftrylockfile() functions. If threads are disabled, then
+<<fputc_unlocked>> is equivalent to <<fputc>>.
+
+The <<_fputc_r>> and <<_fputc_unlocked_r>> functions are simply reentrant
+versions of the above that take an additional reentrant structure
+argument: <[ptr]>.
RETURNS
If successful, <<fputc>> returns its argument <[ch]>. If an error
@@ -67,6 +100,8 @@ query for errors.
PORTABILITY
<<fputc>> is required by ANSI C.
+<<fputc_unlocked>> is a BSD extension also provided by GNU libc.
+
Supporting OS subroutines required: <<close>>, <<fstat>>, <<isatty>>,
<<lseek>>, <<read>>, <<sbrk>>, <<write>>.
*/
diff --git a/newlib/libc/stdio/fputc_u.c b/newlib/libc/stdio/fputc_u.c
new file mode 100644
index 000000000..ac64b0bc2
--- /dev/null
+++ b/newlib/libc/stdio/fputc_u.c
@@ -0,0 +1,56 @@
+/*
+ * Copyright (c) 2014 Red Hat, Inc.
+ * 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 <stdio.h>
+#include "local.h"
+
+int
+_DEFUN(_fputc_unlocked_r, (ptr, ch, file),
+ struct _reent *ptr _AND
+ int ch _AND
+ FILE * file)
+{
+ CHECK_INIT(ptr, file);
+ return _putc_unlocked_r (ptr, ch, file);
+}
+
+#ifndef _REENT_ONLY
+int
+_DEFUN(fputc_unlocked, (ch, file),
+ int ch _AND
+ FILE * file)
+{
+#if !defined(__OPTIMIZE_SIZE__) && !defined(PREFER_SIZE_OVER_SPEED)
+ struct _reent *reent = _REENT;
+
+ CHECK_INIT(reent, file);
+ return _putc_unlocked_r (reent, ch, file);
+#else
+ return _fputc_unlocked_r (_REENT, ch, file);
+#endif
+}
+#endif /* !_REENT_ONLY */
diff --git a/newlib/libc/stdio/fputs.c b/newlib/libc/stdio/fputs.c
index de6357a05..75f65d96e 100644
--- a/newlib/libc/stdio/fputs.c
+++ b/newlib/libc/stdio/fputs.c
@@ -17,19 +17,30 @@
/*
FUNCTION
-<<fputs>>---write a character string in a file or stream
+<<fputs>>, <<fputs_unlocked>>---write a character string in a file or stream
INDEX
fputs
INDEX
+ fputs_unlocked
+INDEX
_fputs_r
+INDEX
+ _fputs_unlocked_r
ANSI_SYNOPSIS
#include <stdio.h>
- int fputs(const char *<[s]>, FILE *<[fp]>);
+ int fputs(const char *restrict <[s]>, FILE *restrict <[fp]>);
+
+ #define _GNU_SOURCE
+ #include <stdio.h>
+ int fputs_unlocked(const char *restrict <[s]>, FILE *restrict <[fp]>);
+
+ #include <stdio.h>
+ int _fputs_r(struct _reent *<[ptr]>, const char *restrict <[s]>, FILE *restrict <[fp]>);
#include <stdio.h>
- int _fputs_r(struct _reent *<[ptr]>, const char *<[s]>, FILE *<[fp]>);
+ int _fputs_unlocked_r(struct _reent *<[ptr]>, const char *restrict <[s]>, FILE *restrict <[fp]>);
TRAD_SYNOPSIS
#include <stdio.h>
@@ -37,18 +48,39 @@ TRAD_SYNOPSIS
char *<[s]>;
FILE *<[fp]>;
+ #define _GNU_SOURCE
+ #include <stdio.h>
+ int fputs_unlocked(<[s]>, <[fp]>)
+ char *<[s]>;
+ FILE *<[fp]>;
+
#include <stdio.h>
int _fputs_r(<[ptr]>, <[s]>, <[fp]>)
struct _reent *<[ptr]>;
char *<[s]>;
FILE *<[fp]>;
+ #include <stdio.h>
+ int _fputs_unlocked_r(<[ptr]>, <[s]>, <[fp]>)
+ struct _reent *<[ptr]>;
+ char *<[s]>;
+ FILE *<[fp]>;
+
DESCRIPTION
<<fputs>> writes the string at <[s]> (but without the trailing null)
to the file or stream identified by <[fp]>.
-<<_fputs_r>> is simply the reentrant version of <<fputs>> that takes
-an additional reentrant struct pointer argument: <[ptr]>.
+<<fputs_unlocked>> is a non-thread-safe version of <<fputs>>.
+<<fputs_unlocked>> may only safely be used within a scope
+protected by flockfile() (or ftrylockfile()) and funlockfile(). This
+function may safely be used in a multi-threaded program if and only
+if they are called while the invoking thread owns the (FILE *)
+object, as is the case after a successful call to the flockfile() or
+ftrylockfile() functions. If threads are disabled, then
+<<fputs_unlocked>> is equivalent to <<fputs>>.
+
+<<_fputs_r>> and <<_fputs_unlocked_r>> are simply reentrant versions of the
+above that take an additional reentrant struct pointer argument: <[ptr]>.
RETURNS
If successful, the result is <<0>>; otherwise, the result is <<EOF>>.
@@ -57,6 +89,8 @@ PORTABILITY
ANSI C requires <<fputs>>, but does not specify that the result on
success must be <<0>>; any non-negative value is permitted.
+<<fputs_unlocked>> is a GNU extension.
+
Supporting OS subroutines required: <<close>>, <<fstat>>, <<isatty>>,
<<lseek>>, <<read>>, <<sbrk>>, <<write>>.
*/
@@ -67,15 +101,19 @@ Supporting OS subroutines required: <<close>>, <<fstat>>, <<isatty>>,
#include "fvwrite.h"
#include "local.h"
+#ifdef __IMPL_UNLOCKED__
+#define _fputs_r _fputs_unlocked_r
+#define fputs fputs_unlocked
+#endif
+
/*
* Write the given string to the given file.
*/
-
int
_DEFUN(_fputs_r, (ptr, s, fp),
struct _reent * ptr _AND
- char _CONST * s _AND
- FILE * fp)
+ char _CONST *__restrict s _AND
+ FILE *__restrict fp)
{
#ifdef _FVWRITE_IN_STREAMIO
int result;
@@ -122,8 +160,8 @@ error:
#ifndef _REENT_ONLY
int
_DEFUN(fputs, (s, fp),
- char _CONST * s _AND
- FILE * fp)
+ char _CONST *__restrict s _AND
+ FILE *__restrict fp)
{
return _fputs_r (_REENT, s, fp);
}
diff --git a/newlib/libc/stdio/fputs_u.c b/newlib/libc/stdio/fputs_u.c
new file mode 100644
index 000000000..3b03cecdb
--- /dev/null
+++ b/newlib/libc/stdio/fputs_u.c
@@ -0,0 +1,28 @@
+/*
+ * Copyright (c) 2014 Red Hat, Inc.
+ * 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.
+ */
+
+#define __IMPL_UNLOCKED__
+#include "fputs.c"
diff --git a/newlib/libc/stdio/fputwc.c b/newlib/libc/stdio/fputwc.c
index 5ec85d1ab..9c2ef6c3b 100644
--- a/newlib/libc/stdio/fputwc.c
+++ b/newlib/libc/stdio/fputwc.c
@@ -26,34 +26,60 @@
/*
FUNCTION
-<<fputwc>>, <<putwc>>---write a wide character on a stream or file
+<<fputwc>>, <<putwc>>, <<fputwc_unlocked>>, <<putwc_unlocked>>---write a wide character on a stream or file
INDEX
fputwc
INDEX
+ fputwc_unlocked
+INDEX
_fputwc_r
INDEX
+ _fputwc_unlocked_r
+INDEX
putwc
INDEX
+ putwc_unlocked
+INDEX
_putwc_r
+INDEX
+ _putwc_unlocked_r
ANSI_SYNOPSIS
#include <stdio.h>
#include <wchar.h>
wint_t fputwc(wchar_t <[wc]>, FILE *<[fp]>);
+ #define _GNU_SOURCE
+ #include <stdio.h>
+ #include <wchar.h>
+ wint_t fputwc_unlocked(wchar_t <[wc]>, FILE *<[fp]>);
+
#include <stdio.h>
#include <wchar.h>
wint_t _fputwc_r(struct _reent *<[ptr]>, wchar_t <[wc]>, FILE *<[fp]>);
#include <stdio.h>
#include <wchar.h>
+ wint_t _fputwc_unlocked_r(struct _reent *<[ptr]>, wchar_t <[wc]>, FILE *<[fp]>);
+
+ #include <stdio.h>
+ #include <wchar.h>
wint_t putwc(wchar_t <[wc]>, FILE *<[fp]>);
+ #define _GNU_SOURCE
+ #include <stdio.h>
+ #include <wchar.h>
+ wint_t putwc_unlocked(wchar_t <[wc]>, FILE *<[fp]>);
+
#include <stdio.h>
#include <wchar.h>
wint_t _putwc_r(struct _reent *<[ptr]>, wchar_t <[wc]>, FILE *<[fp]>);
+ #include <stdio.h>
+ #include <wchar.h>
+ wint_t _putwc_unlocked_r(struct _reent *<[ptr]>, wchar_t <[wc]>, FILE *<[fp]>);
+
TRAD_SYNOPSIS
#include <stdio.h>
#include <wchar.h>
@@ -61,6 +87,13 @@ TRAD_SYNOPSIS
wchar_t <[wc]>;
FILE *<[fp]>;
+ #define _GNU_SOURCE
+ #include <stdio.h>
+ #include <wchar.h>
+ wint_t fputwc_unlocked(<[wc]>, <[fp]>)
+ wchar_t <[wc]>;
+ FILE *<[fp]>;
+
#include <stdio.h>
#include <wchar.h>
wint_t _fputwc_r(<[ptr]>, <[wc]>, <[fp]>)
@@ -70,10 +103,24 @@ TRAD_SYNOPSIS
#include <stdio.h>
#include <wchar.h>
+ wint_t _fputwc_unlocked_r(<[ptr]>, <[wc]>, <[fp]>)
+ struct _reent *<[ptr]>;
+ wchar_t <[wc]>;
+ FILE *<[fp]>;
+
+ #include <stdio.h>
+ #include <wchar.h>
wint_t putwc(<[wc]>, <[fp]>)
wchar_t <[wc]>;
FILE *<[fp]>;
+ #define _GNU_SOURCE
+ #include <stdio.h>
+ #include <wchar.h>
+ wint_t putwc_unlocked(<[wc]>, <[fp]>)
+ wchar_t <[wc]>;
+ FILE *<[fp]>;
+
#include <stdio.h>
#include <wchar.h>
wint_t _putwc_r(<[ptr]>, <[wc]>, <[fp]>)
@@ -81,6 +128,13 @@ TRAD_SYNOPSIS
wchar_t <[wc]>;
FILE *<[fp]>;
+ #include <stdio.h>
+ #include <wchar.h>
+ wint_t _putwc_unlocked_r(<[ptr]>, <[wc]>, <[fp]>)
+ struct _reent *<[ptr]>;
+ wchar_t <[wc]>;
+ FILE *<[fp]>;
+
DESCRIPTION
<<fputwc>> writes the wide character argument <[wc]> to the file or
stream identified by <[fp]>.
@@ -91,13 +145,22 @@ file or stream. Otherwise, the new wide character is written at the
current value of the position indicator, and the position indicator
oadvances by one.
-The <<putwc>> function or macro functions identically to <<fputwc>>. It
-may be implemented as a macro, and may evaluate its argument more than
-once. There is no reason ever to use it.
+<<fputwc_unlocked>> is a non-thread-safe version of <<fputwc>>.
+<<fputwc_unlocked>> may only safely be used within a scope
+protected by flockfile() (or ftrylockfile()) and funlockfile(). This
+function may safely be used in a multi-threaded program if and only
+if they are called while the invoking thread owns the (FILE *)
+object, as is the case after a successful call to the flockfile() or
+ftrylockfile() functions. If threads are disabled, then
+<<fputwc_unlocked>> is equivalent to <<fputwc>>.
+
+The <<putwc>> and <<putwc_unlocked>> functions or macros function identically
+to <<fputwc>> and <<fputwc_unlocked>>. They may be implemented as a macro, and
+may evaluate its argument more than once. There is no reason ever to use them.
-The <<_fputwc_r>> and <<_putwc_r>> functions are simply reentrant versions
-of <<fputwc>> and <<putwc>> that take an additional reentrant structure
-argument: <[ptr]>.
+The <<_fputwc_r>>, <<_putwc_r>>, <<_fputwc_unlocked_r>>, and
+<<_putwc_unlocked_r>> functions are simply reentrant versions of the above
+that take an additional reentrant structure argument: <[ptr]>.
RETURNS
If successful, <<fputwc>> and <<putwc>> return their argument <[wc]>.
@@ -105,7 +168,9 @@ If an error intervenes, the result is <<EOF>>. You can use
`<<ferror(<[fp]>)>>' to query for errors.
PORTABILITY
-C99, POSIX.1-2001
+<<fputwc>> and <<putwc>> are required by C99 and POSIX.1-2001.
+
+<<fputwc_unlocked>> and <<putwc_unlocked>> are GNU extensions.
*/
#include <_ansi.h>
@@ -117,7 +182,7 @@ C99, POSIX.1-2001
#include <wchar.h>
#include "local.h"
-static wint_t
+wint_t
_DEFUN(__fputwc, (ptr, wc, fp),
struct _reent *ptr _AND
wchar_t wc _AND
diff --git a/newlib/libc/stdio/fputwc_u.c b/newlib/libc/stdio/fputwc_u.c
new file mode 100644
index 000000000..43be648f7
--- /dev/null
+++ b/newlib/libc/stdio/fputwc_u.c
@@ -0,0 +1,51 @@
+/*
+ * Copyright (c) 2014 Red Hat, Inc.
+ * 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 <stdio.h>
+#include <wchar.h>
+#include "local.h"
+
+wint_t
+_DEFUN(_fputwc_unlocked_r, (ptr, wc, fp),
+ struct _reent *ptr _AND
+ wchar_t wc _AND
+ FILE *fp)
+{
+ ORIENT(fp, 1);
+ return __fputwc(ptr, wc, fp);
+}
+
+wint_t
+_DEFUN(fputwc_unlocked, (wc, fp),
+ wchar_t wc _AND
+ FILE *fp)
+{
+ struct _reent *reent = _REENT;
+
+ CHECK_INIT(reent, fp);
+ return _fputwc_unlocked_r (reent, wc, fp);
+}
diff --git a/newlib/libc/stdio/fputws.c b/newlib/libc/stdio/fputws.c
index a28a5551b..bb2fa6dbe 100644
--- a/newlib/libc/stdio/fputws.c
+++ b/newlib/libc/stdio/fputws.c
@@ -26,28 +26,53 @@
/*
FUNCTION
-<<fputws>>---write a wide character string in a file or stream
+<<fputws>>, <<fputws_unlocked>>---write a wide character string in a file or stream
INDEX
fputws
INDEX
+ fputws_unlocked
+INDEX
_fputws_r
+INDEX
+ _fputws_unlocked_r
ANSI_SYNOPSIS
#include <wchar.h>
- int fputws(const wchar_t *<[ws]>, FILE *<[fp]>);
+ int fputws(const wchar_t *__restrict <[ws]>, FILE *__restrict <[fp]>);
+
+ #define _GNU_SOURCE
+ #include <wchar.h>
+ int fputws_unlocked(const wchar_t *__restrict <[ws]>, FILE *__restrict <[fp]>);
+
+ #include <wchar.h>
+ int _fputws_r(struct _reent *<[ptr]>, const wchar_t *<[ws]>,
+ FILE *<[fp]>);
#include <wchar.h>
- int _fputws_r(struct _reent *<[ptr]>, const wchar_t *<[ws]>, FILE *<[fp]>);
+ int _fputws_unlocked_r(struct _reent *<[ptr]>, const wchar_t *<[ws]>,
+ FILE *<[fp]>);
TRAD_SYNOPSIS
#include <wchar.h>
int fputws(<[ws]>, <[fp]>)
+ wchar_t *__restrict <[ws]>;
+ FILE *__restrict <[fp]>;
+
+ #define _GNU_SOURCE
+ #include <wchar.h>
+ int fputws_unlocked(<[ws]>, <[fp]>)
+ wchar_t *__restrict <[ws]>;
+ FILE *__restrict <[fp]>;
+
+ #include <wchar.h>
+ int _fputws_r(<[ptr]>, <[ws]>, <[fp]>)
+ struct _reent *<[ptr]>;
wchar_t *<[ws]>;
FILE *<[fp]>;
#include <wchar.h>
- int _fputws_r(<[ptr]>, <[ws]>, <[fp]>)
+ int _fputws_unlocked_r(<[ptr]>, <[ws]>, <[fp]>)
struct _reent *<[ptr]>;
wchar_t *<[ws]>;
FILE *<[fp]>;
@@ -56,15 +81,26 @@ DESCRIPTION
<<fputws>> writes the wide character string at <[ws]> (but without the
trailing null) to the file or stream identified by <[fp]>.
-<<_fputws_r>> is simply the reentrant version of <<fputws>> that takes
-an additional reentrant struct pointer argument: <[ptr]>.
+<<fputws_unlocked>> is a non-thread-safe version of <<fputws>>.
+<<fputws_unlocked>> may only safely be used within a scope
+protected by flockfile() (or ftrylockfile()) and funlockfile(). This
+function may safely be used in a multi-threaded program if and only
+if they are called while the invoking thread owns the (FILE *)
+object, as is the case after a successful call to the flockfile() or
+ftrylockfile() functions. If threads are disabled, then
+<<fputws_unlocked>> is equivalent to <<fputws>>.
+
+<<_fputws_r>> and <<_fputws_unlocked_r>> are simply reentrant versions of the
+above that take an additional reentrant struct pointer argument: <[ptr]>.
RETURNS
If successful, the result is a non-negative integer; otherwise, the result
is <<-1>> to indicate an error.
PORTABILITY
-C99, POSIX.1-2001
+<<fputws>> is required by C99 and POSIX.1-2001.
+
+<<fputws_unlocked>> is a GNU extension.
*/
#include <_ansi.h>
@@ -76,6 +112,11 @@ C99, POSIX.1-2001
#include "fvwrite.h"
#include "local.h"
+#ifdef __IMPL_UNLOCKED__
+#define _fputws_r _fputws_unlocked_r
+#define fputws fputws_unlocked
+#endif
+
int
_DEFUN(_fputws_r, (ptr, ws, fp),
struct _reent *ptr _AND
@@ -142,8 +183,8 @@ error:
int
_DEFUN(fputws, (ws, fp),
- const wchar_t *ws _AND
- FILE *fp)
+ const wchar_t *__restrict ws _AND
+ FILE *__restrict fp)
{
struct _reent *reent = _REENT;
diff --git a/newlib/libc/stdio/fputws_u.c b/newlib/libc/stdio/fputws_u.c
new file mode 100644
index 000000000..0583e79fa
--- /dev/null
+++ b/newlib/libc/stdio/fputws_u.c
@@ -0,0 +1,28 @@
+/*
+ * Copyright (c) 2014 Red Hat, Inc.
+ * 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.
+ */
+
+#define __IMPL_UNLOCKED__
+#include "fputws.c"
diff --git a/newlib/libc/stdio/fread.c b/newlib/libc/stdio/fread.c
index 07fe0af5c..c6839476d 100644
--- a/newlib/libc/stdio/fread.c
+++ b/newlib/libc/stdio/fread.c
@@ -17,21 +17,34 @@
/*
FUNCTION
-<<fread>>---read array elements from a file
+<<fread>>, <<fread_unlocked>>---read array elements from a file
INDEX
fread
INDEX
+ fread_unlocked
+INDEX
_fread_r
+INDEX
+ _fread_unlocked_r
ANSI_SYNOPSIS
#include <stdio.h>
- size_t fread(void *<[buf]>, size_t <[size]>, size_t <[count]>,
- FILE *<[fp]>);
+ size_t fread(void *restrict <[buf]>, size_t <[size]>, size_t <[count]>,
+ FILE *restrict <[fp]>);
+
+ #define _BSD_SOURCE
+ #include <stdio.h>
+ size_t fread_unlocked(void *restrict <[buf]>, size_t <[size]>, size_t <[count]>,
+ FILE *restrict <[fp]>);
+
+ #include <stdio.h>
+ size_t _fread_r(struct _reent *<[ptr]>, void *restrict <[buf]>,
+ size_t <[size]>, size_t <[count]>, FILE *restrict <[fp]>);
#include <stdio.h>
- size_t _fread_r(struct _reent *<[ptr]>, void *<[buf]>,
- size_t <[size]>, size_t <[count]>, FILE *<[fp]>);
+ size_t _fread_unlocked_r(struct _reent *<[ptr]>, void *restrict <[buf]>,
+ size_t <[size]>, size_t <[count]>, FILE *restrict <[fp]>);
TRAD_SYNOPSIS
#include <stdio.h>
@@ -41,6 +54,14 @@ TRAD_SYNOPSIS
size_t <[count]>;
FILE *<[fp]>;
+ #define _BSD_SOURCE
+ #include <stdio.h>
+ size_t fread_unlocked(<[buf]>, <[size]>, <[count]>, <[fp]>)
+ char *<[buf]>;
+ size_t <[size]>;
+ size_t <[count]>;
+ FILE *<[fp]>;
+
#include <stdio.h>
size_t _fread_r(<[ptr]>, <[buf]>, <[size]>, <[count]>, <[fp]>)
struct _reent *<[ptr]>;
@@ -49,6 +70,14 @@ TRAD_SYNOPSIS
size_t <[count]>;
FILE *<[fp]>;
+ #include <stdio.h>
+ size_t _fread_unlocked_r(<[ptr]>, <[buf]>, <[size]>, <[count]>, <[fp]>)
+ struct _reent *<[ptr]>;
+ char *<[buf]>;
+ size_t <[size]>;
+ size_t <[count]>;
+ FILE *<[fp]>;
+
DESCRIPTION
<<fread>> attempts to copy, from the file or stream identified by
<[fp]>, <[count]> elements (each of size <[size]>) into memory,
@@ -58,8 +87,17 @@ starting at <[buf]>. <<fread>> may copy fewer elements than
<<fread>> also advances the file position indicator (if any) for
<[fp]> by the number of @emph{characters} actually read.
-<<_fread_r>> is simply the reentrant version of <<fread>> that
-takes an additional reentrant structure pointer argument: <[ptr]>.
+<<fread_unlocked>> is a non-thread-safe version of <<fread>>.
+<<fread_unlocked>> may only safely be used within a scope
+protected by flockfile() (or ftrylockfile()) and funlockfile(). This
+function may safely be used in a multi-threaded program if and only
+if they are called while the invoking thread owns the (FILE *)
+object, as is the case after a successful call to the flockfile() or
+ftrylockfile() functions. If threads are disabled, then
+<<fread_unlocked>> is equivalent to <<fread>>.
+
+<<_fread_r>> and <<_fread_unlocked_r>> are simply reentrant versions of the
+above that take an additional reentrant structure pointer argument: <[ptr]>.
RETURNS
The result of <<fread>> is the number of elements it succeeded in
@@ -68,6 +106,8 @@ reading.
PORTABILITY
ANSI C requires <<fread>>.
+<<fread_unlocked>> is a BSD extension also provided by GNU libc.
+
Supporting OS subroutines required: <<close>>, <<fstat>>, <<isatty>>,
<<lseek>>, <<read>>, <<sbrk>>, <<write>>.
*/
@@ -78,6 +118,11 @@ Supporting OS subroutines required: <<close>>, <<fstat>>, <<isatty>>,
#include <malloc.h>
#include "local.h"
+#ifdef __IMPL_UNLOCKED__
+#define _fread_r _fread_unlocked_r
+#define fread fread_unlocked
+#endif
+
#ifdef __SCLE
static size_t
_DEFUN(crlf_r, (ptr, fp, buf, count, eof),
@@ -131,10 +176,10 @@ _DEFUN(crlf_r, (ptr, fp, buf, count, eof),
size_t
_DEFUN(_fread_r, (ptr, buf, size, count, fp),
struct _reent * ptr _AND
- _PTR buf _AND
+ _PTR __restrict buf _AND
size_t size _AND
size_t count _AND
- FILE * fp)
+ FILE * __restrict fp)
{
register size_t resid;
register char *p;
@@ -248,10 +293,10 @@ _DEFUN(_fread_r, (ptr, buf, size, count, fp),
#ifndef _REENT_ONLY
size_t
_DEFUN(fread, (buf, size, count, fp),
- _PTR buf _AND
+ _PTR __restrict buf _AND
size_t size _AND
size_t count _AND
- FILE * fp)
+ FILE *__restrict fp)
{
return _fread_r (_REENT, buf, size, count, fp);
}
diff --git a/newlib/libc/stdio/fread_u.c b/newlib/libc/stdio/fread_u.c
new file mode 100644
index 000000000..48239a9aa
--- /dev/null
+++ b/newlib/libc/stdio/fread_u.c
@@ -0,0 +1,28 @@
+/*
+ * Copyright (c) 2014 Red Hat, Inc.
+ * 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.
+ */
+
+#define __IMPL_UNLOCKED__
+#include "fread.c"
diff --git a/newlib/libc/stdio/freopen.c b/newlib/libc/stdio/freopen.c
index 884e56136..fb1f6c4db 100644
--- a/newlib/libc/stdio/freopen.c
+++ b/newlib/libc/stdio/freopen.c
@@ -26,10 +26,10 @@ INDEX
ANSI_SYNOPSIS
#include <stdio.h>
- FILE *freopen(const char *<[file]>, const char *<[mode]>,
- FILE *<[fp]>);
- FILE *_freopen_r(struct _reent *<[ptr]>, const char *<[file]>,
- const char *<[mode]>, FILE *<[fp]>);
+ FILE *freopen(const char *restrict <[file]>, const char *restrict <[mode]>,
+ FILE *restrict <[fp]>);
+ FILE *_freopen_r(struct _reent *<[ptr]>, const char *restrict <[file]>,
+ const char *restrict <[mode]>, FILE *restrict <[fp]>);
TRAD_SYNOPSIS
#include <stdio.h>
@@ -90,12 +90,12 @@ Supporting OS subroutines required: <<close>>, <<fstat>>, <<isatty>>,
FILE *
_DEFUN(_freopen_r, (ptr, file, mode, fp),
struct _reent *ptr _AND
- const char *file _AND
- const char *mode _AND
- register FILE *fp)
+ const char *__restrict file _AND
+ const char *__restrict mode _AND
+ register FILE *__restrict fp)
{
register int f;
- int flags, oflags;
+ int flags, oflags, oflags2;
int e = 0;
CHECK_INIT (ptr, fp);
@@ -106,11 +106,14 @@ _DEFUN(_freopen_r, (ptr, file, mode, fp),
int __oldcancel;
pthread_setcancelstate (PTHREAD_CANCEL_DISABLE, &__oldcancel);
#endif
- _flockfile (fp);
+ oflags2 = fp->_flags2;
+ if (!(oflags2 & __SNLK))
+ _flockfile (fp);
if ((flags = __sflags (ptr, mode, &oflags)) == 0)
{
- _funlockfile (fp);
+ if (!(oflags2 & __SNLK))
+ _funlockfile (fp);
#ifdef _STDIO_WITH_THREAD_CANCELLATION_SUPPORT
pthread_setcancelstate (__oldcancel, &__oldcancel);
#endif
@@ -209,7 +212,7 @@ _DEFUN(_freopen_r, (ptr, file, mode, fp),
FREELB (ptr, fp);
fp->_lb._size = 0;
fp->_flags &= ~__SORD;
- fp->_flags2 = 0;
+ fp->_flags2 &= ~__SWID;
memset (&fp->_mbstate, 0, sizeof (_mbstate_t));
if (f < 0)
@@ -217,7 +220,8 @@ _DEFUN(_freopen_r, (ptr, file, mode, fp),
__sfp_lock_acquire ();
fp->_flags = 0; /* set it free */
ptr->_errno = e; /* restore in case _close clobbered */
- _funlockfile (fp);
+ if (!(oflags2 & __SNLK))
+ _funlockfile (fp);
#ifndef __SINGLE_THREAD__
__lock_close_recursive (fp->_lock);
#endif
@@ -241,7 +245,8 @@ _DEFUN(_freopen_r, (ptr, file, mode, fp),
fp->_flags |= __SCLE;
#endif
- _funlockfile (fp);
+ if (!(oflags2 & __SNLK))
+ _funlockfile (fp);
#ifdef _STDIO_WITH_THREAD_CANCELLATION_SUPPORT
pthread_setcancelstate (__oldcancel, &__oldcancel);
#endif
@@ -252,9 +257,9 @@ _DEFUN(_freopen_r, (ptr, file, mode, fp),
FILE *
_DEFUN(freopen, (file, mode, fp),
- _CONST char *file _AND
- _CONST char *mode _AND
- register FILE *fp)
+ _CONST char *__restrict file _AND
+ _CONST char *__restrict mode _AND
+ register FILE *__restrict fp)
{
return _freopen_r (_REENT, file, mode, fp);
}
diff --git a/newlib/libc/stdio/fscanf.c b/newlib/libc/stdio/fscanf.c
index afbc2f0e8..87b51dd88 100644
--- a/newlib/libc/stdio/fscanf.c
+++ b/newlib/libc/stdio/fscanf.c
@@ -29,7 +29,7 @@
int
#ifdef _HAVE_STDC
-fscanf(FILE *fp, _CONST char *fmt, ...)
+fscanf(FILE *__restrict fp, _CONST char *__restrict fmt, ...)
#else
fscanf(FILE *fp, fmt, va_alist)
FILE *fp;
@@ -50,11 +50,17 @@ fscanf(FILE *fp, fmt, va_alist)
return ret;
}
+#ifdef _NANO_FORMATTED_IO
+int
+_EXFUN(fiscanf, (FILE *, const char *, ...)
+ _ATTRIBUTE ((__alias__("fscanf"))));
+#endif
+
#endif /* !_REENT_ONLY */
int
#ifdef _HAVE_STDC
-_fscanf_r(struct _reent *ptr, FILE *fp, _CONST char *fmt, ...)
+_fscanf_r(struct _reent *ptr, FILE *__restrict fp, _CONST char *__restrict fmt, ...)
#else
_fscanf_r(ptr, FILE *fp, fmt, va_alist)
struct _reent *ptr;
@@ -76,3 +82,8 @@ _fscanf_r(ptr, FILE *fp, fmt, va_alist)
return (ret);
}
+#ifdef _NANO_FORMATTED_IO
+int
+_EXFUN(_fiscanf_r, (struct _reent *, FILE *, const char *, ...)
+ _ATTRIBUTE ((__alias__("_fscanf_r"))));
+#endif
diff --git a/newlib/libc/stdio/fseek.c b/newlib/libc/stdio/fseek.c
index 34147faff..b8fc36a04 100644
--- a/newlib/libc/stdio/fseek.c
+++ b/newlib/libc/stdio/fseek.c
@@ -30,32 +30,32 @@ INDEX
ANSI_SYNOPSIS
#include <stdio.h>
- int fseek(FILE *<[fp]>, long <[offset]>, int <[whence]>)
- int fseeko(FILE *<[fp]>, off_t <[offset]>, int <[whence]>)
+ int fseek(FILE *<[fp]>, long <[offset]>, int <[whence]>);
+ int fseeko(FILE *<[fp]>, off_t <[offset]>, int <[whence]>);
int _fseek_r(struct _reent *<[ptr]>, FILE *<[fp]>,
- long <[offset]>, int <[whence]>)
+ long <[offset]>, int <[whence]>);
int _fseeko_r(struct _reent *<[ptr]>, FILE *<[fp]>,
- off_t <[offset]>, int <[whence]>)
+ off_t <[offset]>, int <[whence]>);
TRAD_SYNOPSIS
#include <stdio.h>
- int fseek(<[fp]>, <[offset]>, <[whence]>)
+ int fseek(<[fp]>, <[offset]>, <[whence]>);
FILE *<[fp]>;
long <[offset]>;
int <[whence]>;
- int fseeko(<[fp]>, <[offset]>, <[whence]>)
+ int fseeko(<[fp]>, <[offset]>, <[whence]>);
FILE *<[fp]>;
off_t <[offset]>;
int <[whence]>;
- int _fseek_r(<[ptr]>, <[fp]>, <[offset]>, <[whence]>)
+ int _fseek_r(<[ptr]>, <[fp]>, <[offset]>, <[whence]>);
struct _reent *<[ptr]>;
FILE *<[fp]>;
long <[offset]>;
int <[whence]>;
- int _fseeko_r(<[ptr]>, <[fp]>, <[offset]>, <[whence]>)
+ int _fseeko_r(<[ptr]>, <[fp]>, <[offset]>, <[whence]>);
struct _reent *<[ptr]>;
FILE *<[fp]>;
off_t <[offset]>;
diff --git a/newlib/libc/stdio/fsetlocking.c b/newlib/libc/stdio/fsetlocking.c
new file mode 100644
index 000000000..3c489f54d
--- /dev/null
+++ b/newlib/libc/stdio/fsetlocking.c
@@ -0,0 +1,90 @@
+/*
+ * Copyright (c) 2014 Red Hat, Inc.
+ * 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.
+ */
+/*
+FUNCTION
+<<__fsetlocking>>---set or query locking mode on FILE stream
+
+INDEX
+ __fsetlocking
+
+ANSI_SYNOPSIS
+ #include <stdio.h>
+ #include <stdio_ext.h>
+ int __fsetlocking(FILE *<[fp]>, int <[type]>);
+
+DESCRIPTION
+This function sets how the stdio functions handle locking of FILE <[fp]>.
+The following values describe <[type]>:
+
+<<FSETLOCKING_INTERNAL>> is the default state, where stdio functions
+automatically lock and unlock the stream.
+
+<<FSETLOCKING_BYCALLER>> means that automatic locking in stdio functions
+is disabled. Applications which set this take all responsibility for file
+locking themselves.
+
+<<FSETLOCKING_QUERY>> returns the current locking mode without changing it.
+
+RETURNS
+<<__fsetlocking>> returns the current locking mode of <[fp]>.
+
+PORTABILITY
+This function originates from Solaris and is also provided by GNU libc.
+
+No supporting OS subroutines are required.
+*/
+
+#ifndef __rtems__
+
+#include <_ansi.h>
+#include <stdio.h>
+#include <stdio_ext.h>
+#include "local.h"
+
+int
+_DEFUN(__fsetlocking, (fp, type),
+ FILE * fp _AND
+ int type)
+{
+ int result;
+ CHECK_INIT(_REENT, fp);
+ result = (fp->_flags2 & __SNLK) ? FSETLOCKING_BYCALLER : FSETLOCKING_INTERNAL;
+ switch (type)
+ {
+ case FSETLOCKING_BYCALLER:
+ fp->_flags2 |= __SNLK;
+ break;
+ case FSETLOCKING_INTERNAL:
+ fp->_flags2 &= ~__SNLK;
+ break;
+ case FSETLOCKING_QUERY:
+ default:
+ break;
+ }
+ return result;
+}
+
+#endif /* __rtems__ */
diff --git a/newlib/libc/stdio/funopen.c b/newlib/libc/stdio/funopen.c
index 065ed93d7..e71d23187 100644
--- a/newlib/libc/stdio/funopen.c
+++ b/newlib/libc/stdio/funopen.c
@@ -85,8 +85,9 @@ Supporting OS subroutines required: <<sbrk>>.
#include <sys/lock.h>
#include "local.h"
-typedef int (*funread)(void *_cookie, char *_buf, int _n);
-typedef int (*funwrite)(void *_cookie, const char *_buf, int _n);
+typedef int (*funread)(void *_cookie, char *_buf, _READ_WRITE_BUFSIZE_TYPE _n);
+typedef int (*funwrite)(void *_cookie, const char *_buf,
+ _READ_WRITE_BUFSIZE_TYPE _n);
#ifdef __LARGE64_FILES
typedef _fpos64_t (*funseek)(void *_cookie, _fpos64_t _off, int _whence);
#else
@@ -107,7 +108,7 @@ _DEFUN(funreader, (ptr, cookie, buf, n),
struct _reent *ptr _AND
void *cookie _AND
char *buf _AND
- int n)
+ _READ_WRITE_BUFSIZE_TYPE n)
{
int result;
funcookie *c = (funcookie *) cookie;
@@ -122,7 +123,7 @@ _DEFUN(funwriter, (ptr, cookie, buf, n),
struct _reent *ptr _AND
void *cookie _AND
const char *buf _AND
- int n)
+ _READ_WRITE_BUFSIZE_TYPE n)
{
int result;
funcookie *c = (funcookie *) cookie;
diff --git a/newlib/libc/stdio/fvwrite.c b/newlib/libc/stdio/fvwrite.c
index 384c62ce0..455666006 100644
--- a/newlib/libc/stdio/fvwrite.c
+++ b/newlib/libc/stdio/fvwrite.c
@@ -21,6 +21,7 @@
#include <string.h>
#include <stdlib.h>
#include <errno.h>
+#include <limits.h>
#include "local.h"
#include "fvwrite.h"
@@ -52,7 +53,7 @@ _DEFUN(__sfvwrite_r, (ptr, fp, uio),
register size_t len;
register _CONST char *p = NULL;
register struct __siov *iov;
- register int w, s;
+ register _READ_WRITE_RETURN_TYPE w, s;
char *nl;
int nlknown, nldist;
@@ -89,12 +90,14 @@ _DEFUN(__sfvwrite_r, (ptr, fp, uio),
if (fp->_flags & __SNBF)
{
/*
- * Unbuffered: write up to BUFSIZ bytes at a time.
+ * Unbuffered: Split buffer in the largest multiple of BUFSIZ < INT_MAX
+ * as some legacy code may expect int instead of size_t.
*/
do
{
GETIOV (;);
- w = fp->_write (ptr, fp->_cookie, p, MIN (len, BUFSIZ));
+ w = fp->_write (ptr, fp->_cookie, p,
+ MIN (len, INT_MAX - INT_MAX % BUFSIZ));
if (w <= 0)
goto err;
p += w;
@@ -177,30 +180,24 @@ _DEFUN(__sfvwrite_r, (ptr, fp, uio),
fp->_p += w;
w = len; /* but pretend copied all */
}
- else if (fp->_p > fp->_bf._base && len > w)
+ else if (fp->_p > fp->_bf._base || len < fp->_bf._size)
{
- /* fill and flush */
+ /* pass through the buffer */
+ w = MIN (len, w);
COPY (w);
- /* fp->_w -= w; *//* unneeded */
+ fp->_w -= w;
fp->_p += w;
- if (_fflush_r (ptr, fp))
+ if (fp->_w == 0 && _fflush_r (ptr, fp))
goto err;
}
- else if (len >= (w = fp->_bf._size))
+ else
{
/* write directly */
+ w = ((int)MIN (len, INT_MAX)) / fp->_bf._size * fp->_bf._size;
w = fp->_write (ptr, fp->_cookie, p, w);
if (w <= 0)
goto err;
}
- else
- {
- /* fill and done */
- w = len;
- COPY (w);
- fp->_w -= w;
- fp->_p += w;
- }
p += w;
len -= w;
}
diff --git a/newlib/libc/stdio/fvwrite.h b/newlib/libc/stdio/fvwrite.h
index 848d5b261..5c078fe68 100644
--- a/newlib/libc/stdio/fvwrite.h
+++ b/newlib/libc/stdio/fvwrite.h
@@ -28,7 +28,7 @@ struct __siov {
struct __suio {
struct __siov *uio_iov;
int uio_iovcnt;
- int uio_resid;
+ size_t uio_resid;
};
diff --git a/newlib/libc/stdio/fwalk.c b/newlib/libc/stdio/fwalk.c
index 975e4b001..cceaa96c2 100644
--- a/newlib/libc/stdio/fwalk.c
+++ b/newlib/libc/stdio/fwalk.c
@@ -73,11 +73,8 @@ _DEFUN(_fwalk_reent, (ptr, reent_function),
*/
for (g = &ptr->__sglue; g != NULL; g = g->_next)
for (fp = g->_iobs, n = g->_niobs; --n >= 0; fp++)
- if (fp->_flags != 0)
- {
- if (fp->_flags != 0 && fp->_flags != 1 && fp->_file != -1)
- ret |= (*reent_function) (ptr, fp);
- }
+ if (fp->_flags != 0 && fp->_flags != 1 && fp->_file != -1)
+ ret |= (*reent_function) (ptr, fp);
return ret;
}
diff --git a/newlib/libc/stdio/fwide.c b/newlib/libc/stdio/fwide.c
index a060d8f65..b2aaf8a62 100644
--- a/newlib/libc/stdio/fwide.c
+++ b/newlib/libc/stdio/fwide.c
@@ -9,17 +9,17 @@ INDEX
ANSI_SYNOPSIS
#include <wchar.h>
- int fwide(FILE *<[fp]>, int <[mode]>)
+ int fwide(FILE *<[fp]>, int <[mode]>);
- int _fwide_r(struct _reent *<[ptr]>, FILE *<[fp]>, int <[mode]>)
+ int _fwide_r(struct _reent *<[ptr]>, FILE *<[fp]>, int <[mode]>);
TRAD_SYNOPSIS
#include <wchar.h>
- int fwide(<[fp]>, <[mode]>)
+ int fwide(<[fp]>, <[mode]>);
FILE *<[fp]>;
int <[mode]>;
- int _fwide_r(<[ptr]>, <[fp]>, <[mode]>)
+ int _fwide_r(<[ptr]>, <[fp]>, <[mode]>);
struct _reent *<[ptr]>;
FILE *<[fp]>;
int <[mode]>;
diff --git a/newlib/libc/stdio/fwprintf.c b/newlib/libc/stdio/fwprintf.c
index 76065e965..4b05824c4 100644
--- a/newlib/libc/stdio/fwprintf.c
+++ b/newlib/libc/stdio/fwprintf.c
@@ -41,8 +41,8 @@ _DEFUN(_fwprintf_r, (ptr, fp, fmt),
int
_DEFUN(fwprintf, (fp, fmt),
- FILE *fp _AND
- const wchar_t *fmt _DOTS)
+ FILE *__restrict fp _AND
+ const wchar_t *__restrict fmt _DOTS)
{
int ret;
va_list ap;
diff --git a/newlib/libc/stdio/fwrite.c b/newlib/libc/stdio/fwrite.c
index 595e3ef84..6b3ff9015 100644
--- a/newlib/libc/stdio/fwrite.c
+++ b/newlib/libc/stdio/fwrite.c
@@ -17,21 +17,34 @@
/*
FUNCTION
-<<fwrite>>---write array elements
+<<fwrite>>, <<fwrite_unlocked>>---write array elements
INDEX
fwrite
INDEX
+ fwrite_unlocked
+INDEX
_fwrite_r
+INDEX
+ _fwrite_unlocked_r
ANSI_SYNOPSIS
#include <stdio.h>
- size_t fwrite(const void *<[buf]>, size_t <[size]>,
- size_t <[count]>, FILE *<[fp]>);
+ size_t fwrite(const void *restrict <[buf]>, size_t <[size]>,
+ size_t <[count]>, FILE *restrict <[fp]>);
+
+ #define _BSD_SOURCE
+ #include <stdio.h>
+ size_t fwrite_unlocked(const void *restrict <[buf]>, size_t <[size]>,
+ size_t <[count]>, FILE *restrict <[fp]>);
+
+ #include <stdio.h>
+ size_t _fwrite_r(struct _reent *<[ptr]>, const void *restrict <[buf]>, size_t <[size]>,
+ size_t <[count]>, FILE *restrict <[fp]>);
#include <stdio.h>
- size_t _fwrite_r(struct _reent *<[ptr]>, const void *<[buf]>, size_t <[size]>,
- size_t <[count]>, FILE *<[fp]>);
+ size_t _fwrite_unlocked_r(struct _reent *<[ptr]>, const void *restrict <[buf]>, size_t <[size]>,
+ size_t <[count]>, FILE *restrict <[fp]>);
TRAD_SYNOPSIS
#include <stdio.h>
@@ -41,6 +54,14 @@ TRAD_SYNOPSIS
size_t <[count]>;
FILE *<[fp]>;
+ #define _BSD_SOURCE
+ #include <stdio.h>
+ size_t fwrite_unlocked(<[buf]>, <[size]>, <[count]>, <[fp]>)
+ char *<[buf]>;
+ size_t <[size]>;
+ size_t <[count]>;
+ FILE *<[fp]>;
+
#include <stdio.h>
size_t _fwrite_r(<[ptr]>, <[buf]>, <[size]>, <[count]>, <[fp]>)
struct _reent *<[ptr]>;
@@ -49,6 +70,14 @@ TRAD_SYNOPSIS
size_t <[count]>;
FILE *<[fp]>;
+ #include <stdio.h>
+ size_t _fwrite_unlocked_r(<[ptr]>, <[buf]>, <[size]>, <[count]>, <[fp]>)
+ struct _reent *<[ptr]>;
+ char *<[buf]>;
+ size_t <[size]>;
+ size_t <[count]>;
+ FILE *<[fp]>;
+
DESCRIPTION
<<fwrite>> attempts to copy, starting from the memory location
<[buf]>, <[count]> elements (each of size <[size]>) into the file or
@@ -58,8 +87,17 @@ stream identified by <[fp]>. <<fwrite>> may copy fewer elements than
<<fwrite>> also advances the file position indicator (if any) for
<[fp]> by the number of @emph{characters} actually written.
-<<_fwrite_r>> is simply the reentrant version of <<fwrite>> that
-takes an additional reentrant structure argument: <[ptr]>.
+<<fwrite_unlocked>> is a non-thread-safe version of <<fwrite>>.
+<<fwrite_unlocked>> may only safely be used within a scope
+protected by flockfile() (or ftrylockfile()) and funlockfile(). This
+function may safely be used in a multi-threaded program if and only
+if they are called while the invoking thread owns the (FILE *)
+object, as is the case after a successful call to the flockfile() or
+ftrylockfile() functions. If threads are disabled, then
+<<fwrite_unlocked>> is equivalent to <<fwrite>>.
+
+<<_fwrite_r>> and <<_fwrite_unlocked_r>> are simply reentrant versions of the
+above that take an additional reentrant structure argument: <[ptr]>.
RETURNS
If <<fwrite>> succeeds in writing all the elements you specify, the
@@ -70,6 +108,8 @@ the file.
PORTABILITY
ANSI C requires <<fwrite>>.
+<<fwrite_unlocked>> is a BSD extension also provided by GNU libc.
+
Supporting OS subroutines required: <<close>>, <<fstat>>, <<isatty>>,
<<lseek>>, <<read>>, <<sbrk>>, <<write>>.
*/
@@ -89,6 +129,11 @@ static char sccsid[] = "%W% (Berkeley) %G%";
#include "fvwrite.h"
#endif
+#ifdef __IMPL_UNLOCKED__
+#define _fwrite_r _fwrite_unlocked_r
+#define fwrite fwrite_unlocked
+#endif
+
/*
* Write `count' objects (each size `size') from memory to the given file.
* Return the number of whole objects written.
@@ -97,10 +142,10 @@ static char sccsid[] = "%W% (Berkeley) %G%";
size_t
_DEFUN(_fwrite_r, (ptr, buf, size, count, fp),
struct _reent * ptr _AND
- _CONST _PTR buf _AND
+ _CONST _PTR __restrict buf _AND
size_t size _AND
size_t count _AND
- FILE * fp)
+ FILE * __restrict fp)
{
size_t n;
#ifdef _FVWRITE_IN_STREAMIO
@@ -158,7 +203,7 @@ ret:
#ifndef _REENT_ONLY
size_t
_DEFUN(fwrite, (buf, size, count, fp),
- _CONST _PTR buf _AND
+ _CONST _PTR __restrict buf _AND
size_t size _AND
size_t count _AND
FILE * fp)
diff --git a/newlib/libc/stdio/fwrite_u.c b/newlib/libc/stdio/fwrite_u.c
new file mode 100644
index 000000000..80154a0bf
--- /dev/null
+++ b/newlib/libc/stdio/fwrite_u.c
@@ -0,0 +1,28 @@
+/*
+ * Copyright (c) 2014 Red Hat, Inc.
+ * 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.
+ */
+
+#define __IMPL_UNLOCKED__
+#include "fwrite.c"
diff --git a/newlib/libc/stdio/fwscanf.c b/newlib/libc/stdio/fwscanf.c
index f013cb8f9..8572f4185 100644
--- a/newlib/libc/stdio/fwscanf.c
+++ b/newlib/libc/stdio/fwscanf.c
@@ -14,7 +14,8 @@
* IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
*/
-
+/* Doc in swscanf.c */
+
#include <_ansi.h>
#include <reent.h>
#include <stdio.h>
@@ -25,7 +26,7 @@
#ifndef _REENT_ONLY
int
-fwscanf (FILE *fp, _CONST wchar_t *fmt, ...)
+fwscanf (FILE *__restrict fp, _CONST wchar_t *__restrict fmt, ...)
{
int ret;
va_list ap;
diff --git a/newlib/libc/stdio/getchar_u.c b/newlib/libc/stdio/getchar_u.c
index 22254cbf5..516b4dbd2 100644
--- a/newlib/libc/stdio/getchar_u.c
+++ b/newlib/libc/stdio/getchar_u.c
@@ -26,7 +26,7 @@ INDEX
SYNOPSIS
#include <stdio.h>
- int getchar_unlocked();
+ int getchar_unlocked(void);
#include <stdio.h>
int _getchar_unlocked_r(struct _reent *<[ptr]>);
diff --git a/newlib/libc/stdio/gets.c b/newlib/libc/stdio/gets.c
index f51d46196..6c21f3e0c 100644
--- a/newlib/libc/stdio/gets.c
+++ b/newlib/libc/stdio/gets.c
@@ -79,13 +79,17 @@ _DEFUN(_gets_r, (ptr, buf),
{
register int c;
register char *s = buf;
+ FILE *fp;
- _newlib_flockfile_start (stdin);
- while ((c = __sgetc_r (ptr, stdin)) != '\n')
+ _REENT_SMALL_CHECK_INIT (ptr);
+ fp = _stdin_r (ptr);
+ CHECK_INIT (ptr, fp);
+ _newlib_flockfile_start (fp);
+ while ((c = __sgetc_r (ptr, fp)) != '\n')
if (c == EOF)
if (s == buf)
{
- _newlib_flockfile_exit (stdin);
+ _newlib_flockfile_exit (fp);
return NULL;
}
else
@@ -93,7 +97,7 @@ _DEFUN(_gets_r, (ptr, buf),
else
*s++ = c;
*s = 0;
- _newlib_flockfile_end (stdin);
+ _newlib_flockfile_end (fp);
return buf;
}
diff --git a/newlib/libc/stdio/getwc_u.c b/newlib/libc/stdio/getwc_u.c
new file mode 100644
index 000000000..613b69eca
--- /dev/null
+++ b/newlib/libc/stdio/getwc_u.c
@@ -0,0 +1,53 @@
+/*
+ * Copyright (c) 2014 Red Hat, Inc.
+ * 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.
+ */
+
+#define _GNU_SOURCE
+#include <_ansi.h>
+#include <reent.h>
+#include <stdio.h>
+#include <wchar.h>
+#include "local.h"
+
+#undef getwc_unlocked
+
+wint_t
+_DEFUN(_getwc_unlocked_r, (ptr, fp),
+ struct _reent *ptr _AND
+ FILE *fp)
+{
+ return _fgetwc_unlocked_r (ptr, fp);
+}
+
+/*
+ * Synonym for fgetwc_unlocked(). The only difference is that getwc(), if it is
+ * a macro, may evaluate `fp' more than once.
+ */
+wint_t
+_DEFUN(getwc_unlocked, (fp),
+ FILE *fp)
+{
+ return fgetwc_unlocked(fp);
+}
diff --git a/newlib/libc/stdio/getwchar.c b/newlib/libc/stdio/getwchar.c
index f559c7677..7ab230a4c 100644
--- a/newlib/libc/stdio/getwchar.c
+++ b/newlib/libc/stdio/getwchar.c
@@ -26,34 +26,65 @@
/*
FUNCTION
-<<getwchar>>---read a wide character from standard input
+<<getwchar>>, <<getwchar_unlocked>>---read a wide character from standard input
INDEX
getwchar
INDEX
+ getwchar_unlocked
+INDEX
_getwchar_r
+INDEX
+ _getwchar_unlocked_r
ANSI_SYNOPSIS
#include <wchar.h>
wint_t getwchar(void);
+ #define _GNU_SOURCE
+ #include <wchar.h>
+ wint_t getwchar_unlocked(void);
+
+ #include <wchar.h>
wint_t _getwchar_r(struct _reent *<[reent]>);
+ #include <wchar.h>
+ wint_t _getwchar_unlocked_r(struct _reent *<[reent]>);
+
TRAD_SYNOPSIS
#include <wchar.h>
wint_t getwchar();
+ #define _GNU_SOURCE
+ #include <wchar.h>
+ wint_t getwchar_unlocked();
+
+ #include <wchar.h>
wint_t _getwchar_r(<[reent]>)
char * <[reent]>;
+ #include <wchar.h>
+ wint_t _getwchar_unlocked_r(<[reent]>)
+ char * <[reent]>;
+
DESCRIPTION
<<getwchar>> function or macro is the wide character equivalent of
the <<getchar>> function. You can use <<getwchar>> to get the next
wide character from the standard input stream. As a side effect,
<<getwchar>> advances the standard input's current position indicator.
-The alternate function <<_getwchar_r>> is a reentrant version. The
-extra argument <[reent]> is a pointer to a reentrancy structure.
+<<getwchar_unlocked>> is a non-thread-safe version of <<getwchar>>.
+<<getwchar_unlocked>> may only safely be used within a scope
+protected by flockfile() (or ftrylockfile()) and funlockfile(). This
+function may safely be used in a multi-threaded program if and only
+if they are called while the invoking thread owns the (FILE *)
+object, as is the case after a successful call to the flockfile() or
+ftrylockfile() functions. If threads are disabled, then
+<<getwchar_unlocked>> is equivalent to <<getwchar>>.
+
+The alternate functions <<_getwchar_r>> and <<_getwchar_unlocked_r>> are
+reentrant versions of the above. The extra argument <[reent]> is a pointer to
+a reentrancy structure.
RETURNS
The next wide character cast to <<wint_t>>, unless there is no more
@@ -64,7 +95,9 @@ You can distinguish the two situations that cause an <<WEOF>> result by
using `<<ferror(stdin)>>' and `<<feof(stdin)>>'.
PORTABILITY
-C99
+<<getwchar>> is required by C99.
+
+<<getwchar_unlocked>> is a GNU extension.
*/
#include <_ansi.h>
diff --git a/newlib/libc/stdio/getwchar_u.c b/newlib/libc/stdio/getwchar_u.c
new file mode 100644
index 000000000..f5c50cced
--- /dev/null
+++ b/newlib/libc/stdio/getwchar_u.c
@@ -0,0 +1,51 @@
+/*
+ * Copyright (c) 2014 Red Hat, Inc.
+ * 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.
+ */
+
+#define _GNU_SOURCE
+#include <_ansi.h>
+#include <reent.h>
+#include <stdio.h>
+#include <wchar.h>
+#include "local.h"
+
+#undef getwchar_unlocked
+
+wint_t
+_DEFUN (_getwchar_unlocked_r, (ptr),
+ struct _reent *ptr)
+{
+ return _fgetwc_unlocked_r (ptr, stdin);
+}
+
+/*
+ * Synonym for fgetwc_unlocked(stdin).
+ */
+wint_t
+_DEFUN_VOID (getwchar_unlocked)
+{
+ _REENT_SMALL_CHECK_INIT (_REENT);
+ return fgetwc_unlocked (stdin);
+}
diff --git a/newlib/libc/stdio/local.h b/newlib/libc/stdio/local.h
index 54854b49d..471442e26 100644
--- a/newlib/libc/stdio/local.h
+++ b/newlib/libc/stdio/local.h
@@ -38,7 +38,7 @@
case _STDIO_CLOSE_PER_REENT_STD_STREAMS is defined these file descriptors
will be closed via close() provided the owner of the reent structure
triggerd the on demand reent initilization, see CHECK_INIT(). */
-#ifndef __rtems__
+#if !defined(__rtems__) && !defined(__tirtos__)
#define _STDIO_CLOSE_PER_REENT_STD_STREAMS
#endif
@@ -60,7 +60,16 @@
#define _STDIO_WITH_THREAD_CANCELLATION_SUPPORT
#endif
-#ifdef _STDIO_WITH_THREAD_CANCELLATION_SUPPORT
+#if defined(__SINGLE_THREAD__) || defined(__IMPL_UNLOCKED__)
+
+# define _newlib_flockfile_start(_fp)
+# define _newlib_flockfile_exit(_fp)
+# define _newlib_flockfile_end(_fp)
+# define _newlib_sfp_lock_start()
+# define _newlib_sfp_lock_exit()
+# define _newlib_sfp_lock_end()
+
+#elif defined(_STDIO_WITH_THREAD_CANCELLATION_SUPPORT)
#include <pthread.h>
/* Start a stream oriented critical section: */
@@ -68,16 +77,19 @@
{ \
int __oldfpcancel; \
pthread_setcancelstate (PTHREAD_CANCEL_DISABLE, &__oldfpcancel); \
- _flockfile (_fp)
+ if (!(_fp->_flags2 & __SNLK)) \
+ _flockfile (_fp)
/* Exit from a stream oriented critical section prematurely: */
# define _newlib_flockfile_exit(_fp) \
- _funlockfile (_fp); \
+ if (!(_fp->_flags2 & __SNLK)) \
+ _funlockfile (_fp); \
pthread_setcancelstate (__oldfpcancel, &__oldfpcancel);
/* End a stream oriented critical section: */
# define _newlib_flockfile_end(_fp) \
- _funlockfile (_fp); \
+ if (!(_fp->_flags2 & __SNLK)) \
+ _funlockfile (_fp); \
pthread_setcancelstate (__oldfpcancel, &__oldfpcancel); \
}
@@ -99,17 +111,20 @@
pthread_setcancelstate (__oldsfpcancel, &__oldsfpcancel); \
}
-#else /* !_STDIO_WITH_THREAD_CANCELLATION_SUPPORT */
+#else /* !__SINGLE_THREAD__ && !__IMPL_UNLOCKED__ && !_STDIO_WITH_THREAD_CANCELLATION_SUPPORT */
# define _newlib_flockfile_start(_fp) \
{ \
- _flockfile(_fp)
+ if (!(_fp->_flags2 & __SNLK)) \
+ _flockfile (_fp)
# define _newlib_flockfile_exit(_fp) \
- _funlockfile(_fp); \
+ if (!(_fp->_flags2 & __SNLK)) \
+ _funlockfile(_fp); \
# define _newlib_flockfile_end(_fp) \
- _funlockfile(_fp); \
+ if (!(_fp->_flags2 & __SNLK)) \
+ _funlockfile(_fp); \
}
# define _newlib_sfp_lock_start() \
@@ -123,8 +138,10 @@
__sfp_lock_release (); \
}
-#endif /* _STDIO_WITH_THREAD_CANCELLATION_SUPPORT */
+#endif /* __SINGLE_THREAD__ || __IMPL_UNLOCKED__ */
+extern wint_t _EXFUN(__fgetwc, (struct _reent *, FILE *));
+extern wint_t _EXFUN(__fputwc, (struct _reent *, wchar_t, FILE *));
extern u_char *_EXFUN(__sccl, (char *, u_char *fmt));
extern int _EXFUN(__svfscanf_r,(struct _reent *,FILE *, _CONST char *,va_list));
extern int _EXFUN(__ssvfscanf_r,(struct _reent *,FILE *, _CONST char *,va_list));
@@ -147,19 +164,25 @@ int _EXFUN(_svfiwprintf_r,(struct _reent *, FILE *, const wchar_t *,
extern FILE *_EXFUN(__sfp,(struct _reent *));
extern int _EXFUN(__sflags,(struct _reent *,_CONST char*, int*));
extern int _EXFUN(__sflush_r,(struct _reent *,FILE *));
+#ifdef _STDIO_BSD_SEMANTICS
+extern int _EXFUN(__sflushw_r,(struct _reent *,FILE *));
+#endif
extern int _EXFUN(__srefill_r,(struct _reent *,FILE *));
extern _READ_WRITE_RETURN_TYPE _EXFUN(__sread,(struct _reent *, void *, char *,
- int));
+ _READ_WRITE_BUFSIZE_TYPE));
extern _READ_WRITE_RETURN_TYPE _EXFUN(__seofread,(struct _reent *, void *,
- char *, int));
+ char *,
+ _READ_WRITE_BUFSIZE_TYPE));
extern _READ_WRITE_RETURN_TYPE _EXFUN(__swrite,(struct _reent *, void *,
- const char *, int));
+ const char *,
+ _READ_WRITE_BUFSIZE_TYPE));
extern _fpos_t _EXFUN(__sseek,(struct _reent *, void *, _fpos_t, int));
extern int _EXFUN(__sclose,(struct _reent *, void *));
extern int _EXFUN(__stextmode,(int));
extern _VOID _EXFUN(__sinit,(struct _reent *));
extern _VOID _EXFUN(_cleanup_r,(struct _reent *));
extern _VOID _EXFUN(__smakebuf_r,(struct _reent *, FILE *));
+extern int _EXFUN(__swhatbuf_r,(struct _reent *, FILE *, size_t *, int *));
extern int _EXFUN(_fwalk,(struct _reent *, int (*)(FILE *)));
extern int _EXFUN(_fwalk_reent,(struct _reent *, int (*)(struct _reent *, FILE *)));
struct _glue * _EXFUN(__sfmoreglue,(struct _reent *,int n));
@@ -168,7 +191,8 @@ extern int _EXFUN(__submore, (struct _reent *, FILE *));
#ifdef __LARGE64_FILES
extern _fpos64_t _EXFUN(__sseek64,(struct _reent *, void *, _fpos64_t, int));
extern _READ_WRITE_RETURN_TYPE _EXFUN(__swrite64,(struct _reent *, void *,
- const char *, int));
+ const char *,
+ _READ_WRITE_BUFSIZE_TYPE));
#endif
/* Called by the main entry point fns to ensure stdio has been initialized. */
diff --git a/newlib/libc/stdio/makebuf.c b/newlib/libc/stdio/makebuf.c
index 349783ded..c592578b8 100644
--- a/newlib/libc/stdio/makebuf.c
+++ b/newlib/libc/stdio/makebuf.c
@@ -39,13 +39,10 @@ _DEFUN(__smakebuf_r, (ptr, fp),
struct _reent *ptr _AND
register FILE *fp)
{
- register size_t size, couldbetty;
register _PTR p;
-#ifdef __USE_INTERNAL_STAT64
- struct stat64 st;
-#else
- struct stat st;
-#endif
+ int flags;
+ size_t size;
+ int couldbetty;
if (fp->_flags & __SNBF)
{
@@ -53,49 +50,7 @@ _DEFUN(__smakebuf_r, (ptr, fp),
fp->_bf._size = 1;
return;
}
-#ifdef __USE_INTERNAL_STAT64
- if (fp->_file < 0 || _fstat64_r (ptr, fp->_file, &st) < 0)
-#else
- if (fp->_file < 0 || _fstat_r (ptr, fp->_file, &st) < 0)
-#endif
- {
- couldbetty = 0;
- /* Check if we are be called by asprintf family for initial buffer. */
- if (fp->_flags & __SMBF)
- size = _DEFAULT_ASPRINTF_BUFSIZE;
- else
- size = BUFSIZ;
-#ifdef _FSEEK_OPTIMIZATION
- /* do not try to optimise fseek() */
- fp->_flags |= __SNPT;
-#endif
- }
- else
- {
- couldbetty = (st.st_mode & S_IFMT) == S_IFCHR;
-#ifdef HAVE_BLKSIZE
- size = st.st_blksize <= 0 ? BUFSIZ : st.st_blksize;
-#else
- size = BUFSIZ;
-#endif
-#ifdef _FSEEK_OPTIMIZATION
- /*
- * Optimize fseek() only if it is a regular file.
- * (The test for __sseek is mainly paranoia.)
- */
- if ((st.st_mode & S_IFMT) == S_IFREG && fp->_seek == __sseek)
- {
- fp->_flags |= __SOPT;
-#ifdef HAVE_BLKSIZE
- fp->_blksize = st.st_blksize;
-#else
- fp->_blksize = 1024;
-#endif
- }
- else
- fp->_flags |= __SNPT;
-#endif
- }
+ flags = __swhatbuf_r (ptr, fp, &size, &couldbetty);
if ((p = _malloc_r (ptr, size)) == NULL)
{
if (!(fp->_flags & __SSTR))
@@ -113,5 +68,60 @@ _DEFUN(__smakebuf_r, (ptr, fp),
fp->_bf._size = size;
if (couldbetty && _isatty_r (ptr, fp->_file))
fp->_flags |= __SLBF;
+ fp->_flags |= flags;
}
}
+
+/*
+ * Internal routine to determine `proper' buffering for a file.
+ */
+int
+_DEFUN(__swhatbuf_r, (ptr, fp, bufsize, couldbetty),
+ struct _reent *ptr _AND
+ FILE *fp _AND
+ size_t *bufsize _AND
+ int *couldbetty)
+{
+#ifdef _FSEEK_OPTIMIZATION
+ const int snpt = __SNPT;
+#else
+ const int snpt = 0;
+#endif
+
+#ifdef __USE_INTERNAL_STAT64
+ struct stat64 st;
+
+ if (fp->_file < 0 || _fstat64_r (ptr, fp->_file, &st) < 0)
+#else
+ struct stat st;
+
+ if (fp->_file < 0 || _fstat_r (ptr, fp->_file, &st) < 0)
+#endif
+ {
+ *couldbetty = 0;
+ /* Check if we are be called by asprintf family for initial buffer. */
+ if (fp->_flags & __SMBF)
+ *bufsize = _DEFAULT_ASPRINTF_BUFSIZE;
+ else
+ *bufsize = BUFSIZ;
+ return (0);
+ }
+
+ /* could be a tty iff it is a character device */
+ *couldbetty = S_ISCHR(st.st_mode);
+#ifdef HAVE_BLKSIZE
+ if (st.st_blksize > 0)
+ {
+ /*
+ * Optimise fseek() only if it is a regular file. (The test for
+ * __sseek is mainly paranoia.) It is safe to set _blksize
+ * unconditionally; it will only be used if __SOPT is also set.
+ */
+ *bufsize = st.st_blksize;
+ fp->_blksize = st.st_blksize;
+ return ((st.st_mode & S_IFMT) == S_IFREG ? __SOPT : snpt);
+ }
+#endif
+ *bufsize = BUFSIZ;
+ return (snpt);
+}
diff --git a/newlib/libc/stdio/nano-vfprintf.c b/newlib/libc/stdio/nano-vfprintf.c
new file mode 100644
index 000000000..f106a4167
--- /dev/null
+++ b/newlib/libc/stdio/nano-vfprintf.c
@@ -0,0 +1,665 @@
+/*
+ * Copyright (c) 1990 The 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. 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.
+ */
+
+/*
+ * Copyright (c) 2012-2014 ARM Ltd
+ * 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. The name of the company may not be used to endorse or promote
+ * products derived from this software without specific prior written
+ * permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ARM LTD ``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 ARM LTD 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.
+ */
+
+/*
+FUNCTION
+<<vfprintf>>, <<vprintf>>, <<vsprintf>>, <<vsnprintf>>, <<vasprintf>>, <<vasnprintf>>---format argument list
+
+INDEX
+ vfprintf
+INDEX
+ _vfprintf_r
+INDEX
+ vprintf
+INDEX
+ _vprintf_r
+INDEX
+ vsprintf
+INDEX
+ _vsprintf_r
+INDEX
+ vsnprintf
+INDEX
+ _vsnprintf_r
+INDEX
+ vasprintf
+INDEX
+ _vasprintf_r
+INDEX
+ vasnprintf
+INDEX
+ _vasnprintf_r
+
+ANSI_SYNOPSIS
+ #include <stdio.h>
+ #include <stdarg.h>
+ int vprintf(const char *<[fmt]>, va_list <[list]>);
+ int vfprintf(FILE *<[fp]>, const char *<[fmt]>, va_list <[list]>);
+ int vsprintf(char *<[str]>, const char *<[fmt]>, va_list <[list]>);
+ int vsnprintf(char *<[str]>, size_t <[size]>, const char *<[fmt]>,
+ va_list <[list]>);
+ int vasprintf(char **<[strp]>, const char *<[fmt]>, va_list <[list]>);
+ char *vasnprintf(char *<[str]>, size_t *<[size]>, const char *<[fmt]>,
+ va_list <[list]>);
+
+ int _vprintf_r(struct _reent *<[reent]>, const char *<[fmt]>,
+ va_list <[list]>);
+ int _vfprintf_r(struct _reent *<[reent]>, FILE *<[fp]>,
+ const char *<[fmt]>, va_list <[list]>);
+ int _vsprintf_r(struct _reent *<[reent]>, char *<[str]>,
+ const char *<[fmt]>, va_list <[list]>);
+ int _vasprintf_r(struct _reent *<[reent]>, char **<[str]>,
+ const char *<[fmt]>, va_list <[list]>);
+ int _vsnprintf_r(struct _reent *<[reent]>, char *<[str]>,
+ size_t <[size]>, const char *<[fmt]>, va_list <[list]>);
+ char *_vasnprintf_r(struct _reent *<[reent]>, char *<[str]>,
+ size_t *<[size]>, const char *<[fmt]>, va_list <[list]>);
+
+DESCRIPTION
+<<vprintf>>, <<vfprintf>>, <<vasprintf>>, <<vsprintf>>, <<vsnprintf>>,
+and <<vasnprintf>> are (respectively) variants of <<printf>>,
+<<fprintf>>, <<asprintf>>, <<sprintf>>, <<snprintf>>, and
+<<asnprintf>>. They differ only in allowing their caller to pass the
+variable argument list as a <<va_list>> object (initialized by
+<<va_start>>) rather than directly accepting a variable number of
+arguments. The caller is responsible for calling <<va_end>>.
+
+<<_vprintf_r>>, <<_vfprintf_r>>, <<_vasprintf_r>>, <<_vsprintf_r>>,
+<<_vsnprintf_r>>, and <<_vasnprintf_r>> are reentrant versions of the
+above.
+
+RETURNS
+The return values are consistent with the corresponding functions.
+
+PORTABILITY
+ANSI C requires <<vprintf>>, <<vfprintf>>, <<vsprintf>>, and
+<<vsnprintf>>. The remaining functions are newlib extensions.
+
+Supporting OS subroutines required: <<close>>, <<fstat>>, <<isatty>>,
+<<lseek>>, <<read>>, <<sbrk>>, <<write>>.
+*/
+
+#if defined(LIBC_SCCS) && !defined(lint)
+/*static char *sccsid = "from: @(#)vfprintf.c 5.50 (Berkeley) 12/16/92";*/
+static char *rcsid = "$Id$";
+#endif /* LIBC_SCCS and not lint */
+
+/* Actual printf innards.
+ This code is large and complicated... */
+#include <newlib.h>
+
+#define VFPRINTF vfprintf
+#ifdef STRING_ONLY
+# define _VFPRINTF_R _svfprintf_r
+#else
+# define _VFPRINTF_R _vfprintf_r
+#endif
+
+#include <_ansi.h>
+#include <reent.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <limits.h>
+#include <stdint.h>
+#include <wchar.h>
+#include <sys/lock.h>
+#include <stdarg.h>
+#include "local.h"
+#include "../stdlib/local.h"
+#include "fvwrite.h"
+#include "vfieeefp.h"
+#include "nano-vfprintf_local.h"
+
+/* The __ssputs_r function is shared between all versions of vfprintf
+ and vfwprintf. */
+#ifdef STRING_ONLY
+int
+_DEFUN(__ssputs_r, (ptr, fp, buf, len),
+ struct _reent *ptr _AND
+ FILE *fp _AND
+ _CONST char *buf _AND
+ size_t len)
+{
+ register int w;
+
+ w = fp->_w;
+ if (len >= w && fp->_flags & (__SMBF | __SOPT))
+ {
+ /* Must be asprintf family. */
+ unsigned char *str;
+ int curpos = (fp->_p - fp->_bf._base);
+ /* Choose a geometric growth factor to avoid
+ * quadratic realloc behavior, but use a rate less
+ * than (1+sqrt(5))/2 to accomodate malloc
+ * overhead. asprintf EXPECTS us to overallocate, so
+ * that it can add a trailing \0 without
+ * reallocating. The new allocation should thus be
+ * max(prev_size*1.5, curpos+len+1). */
+ int newsize = fp->_bf._size * 3 / 2;
+ if (newsize < curpos + len + 1)
+ newsize = curpos + len + 1;
+ if (fp->_flags & __SOPT)
+ {
+ /* asnprintf leaves original buffer alone. */
+ str = (unsigned char *)_malloc_r (ptr, newsize);
+ if (!str)
+ {
+ ptr->_errno = ENOMEM;
+ goto err;
+ }
+ memcpy (str, fp->_bf._base, curpos);
+ fp->_flags = (fp->_flags & ~__SOPT) | __SMBF;
+ }
+ else
+ {
+ str = (unsigned char *)_realloc_r (ptr, fp->_bf._base, newsize);
+ if (!str)
+ {
+ /* Free unneeded buffer. */
+ _free_r (ptr, fp->_bf._base);
+ /* Ensure correct errno, even if free changed it. */
+ ptr->_errno = ENOMEM;
+ goto err;
+ }
+ }
+ fp->_bf._base = str;
+ fp->_p = str + curpos;
+ fp->_bf._size = newsize;
+ w = len;
+ fp->_w = newsize - curpos;
+ }
+ if (len < w)
+ w = len;
+
+ (void)memmove ((_PTR) fp->_p, (_PTR) buf, (size_t) (w));
+ fp->_w -= w;
+ fp->_p += w;
+ return 0;
+
+err:
+ fp->_flags |= __SERR;
+ return EOF;
+}
+/* __ssprint_r is the original implementation of __SPRINT. In nano
+ version formatted IO it is reimplemented as __ssputs_r for non-wide
+ char output, but __ssprint_r cannot be discarded because it is used
+ by a serial of functions like svfwprintf for wide char output. */
+int
+_DEFUN(__ssprint_r, (ptr, fp, uio),
+ struct _reent *ptr _AND
+ FILE *fp _AND
+ register struct __suio *uio)
+{
+ register size_t len;
+ register int w;
+ register struct __siov *iov;
+ register _CONST char *p = NULL;
+
+ iov = uio->uio_iov;
+ len = 0;
+
+ if (uio->uio_resid == 0)
+ {
+ uio->uio_iovcnt = 0;
+ return (0);
+ }
+
+ do
+ {
+ while (len == 0)
+ {
+ p = iov->iov_base;
+ len = iov->iov_len;
+ iov++;
+ }
+ w = fp->_w;
+ if (len >= w && fp->_flags & (__SMBF | __SOPT))
+ {
+ /* Must be asprintf family. */
+ unsigned char *str;
+ int curpos = (fp->_p - fp->_bf._base);
+ /* Choose a geometric growth factor to avoid
+ * quadratic realloc behavior, but use a rate less
+ * than (1+sqrt(5))/2 to accomodate malloc
+ * overhead. asprintf EXPECTS us to overallocate, so
+ * that it can add a trailing \0 without
+ * reallocating. The new allocation should thus be
+ * max(prev_size*1.5, curpos+len+1). */
+ int newsize = fp->_bf._size * 3 / 2;
+ if (newsize < curpos + len + 1)
+ newsize = curpos + len + 1;
+
+ if (fp->_flags & __SOPT)
+ {
+ /* asnprintf leaves original buffer alone. */
+ str = (unsigned char *)_malloc_r (ptr, newsize);
+ if (!str)
+ {
+ ptr->_errno = ENOMEM;
+ goto err;
+ }
+ memcpy (str, fp->_bf._base, curpos);
+ fp->_flags = (fp->_flags & ~__SOPT) | __SMBF;
+ }
+ else
+ {
+ str = (unsigned char *)_realloc_r (ptr, fp->_bf._base,
+ newsize);
+ if (!str)
+ {
+ /* Free unneeded buffer. */
+ _free_r (ptr, fp->_bf._base);
+ /* Ensure correct errno, even if free changed it. */
+ ptr->_errno = ENOMEM;
+ goto err;
+ }
+ }
+ fp->_bf._base = str;
+ fp->_p = str + curpos;
+ fp->_bf._size = newsize;
+ w = len;
+ fp->_w = newsize - curpos;
+ }
+ if (len < w)
+ w = len;
+
+ (void)memmove ((_PTR) fp->_p, (_PTR) p, (size_t) (w));
+ fp->_w -= w;
+ fp->_p += w;
+ /* Pretend we copied all. */
+ w = len;
+ p += w;
+ len -= w;
+ }
+ while ((uio->uio_resid -= w) != 0);
+
+ uio->uio_resid = 0;
+ uio->uio_iovcnt = 0;
+ return 0;
+
+err:
+ fp->_flags |= __SERR;
+ uio->uio_resid = 0;
+ uio->uio_iovcnt = 0;
+ return EOF;
+}
+#else
+/* As __ssputs_r, __sprint_r is used by output functions for wide char,
+ like vfwprint. */
+/* Flush out all the vectors defined by the given uio,
+ then reset it so that it can be reused. */
+int
+_DEFUN(__sprint_r, (ptr, fp, uio),
+ struct _reent *ptr _AND
+ FILE *fp _AND
+ register struct __suio *uio)
+{
+ register int err = 0;
+
+ if (uio->uio_resid == 0)
+ {
+ uio->uio_iovcnt = 0;
+ return 0;
+ }
+#ifdef _WIDE_ORIENT
+ if (fp->_flags2 & __SWID)
+ {
+ struct __siov *iov;
+ wchar_t *p;
+ int i, len;
+
+ iov = uio->uio_iov;
+ for (; uio->uio_resid != 0;
+ uio->uio_resid -= len * sizeof (wchar_t), iov++)
+ {
+ p = (wchar_t *) iov->iov_base;
+ len = iov->iov_len / sizeof (wchar_t);
+ for (i = 0; i < len; i++)
+ {
+ if (_fputwc_r (ptr, p[i], fp) == WEOF)
+ {
+ err = -1;
+ goto out;
+ }
+ }
+ }
+ }
+ else
+#endif
+ err = __sfvwrite_r(ptr, fp, uio);
+out:
+ uio->uio_resid = 0;
+ uio->uio_iovcnt = 0;
+ return err;
+}
+
+_NOINLINE_STATIC int
+_DEFUN(__sfputc_r, (ptr, c, fp),
+ struct _reent *ptr _AND
+ int c _AND
+ FILE *fp)
+{
+ if (--fp->_w >= 0 || (fp->_w >= fp->_lbfsize && (char)c != '\n'))
+ return (*fp->_p++ = c);
+ else
+ return (__swbuf_r(ptr, c, fp));
+}
+
+int
+_DEFUN(__sfputs_r, (ptr, fp, buf, len),
+ struct _reent *ptr _AND
+ FILE *fp _AND
+ _CONST char *buf _AND
+ size_t len)
+{
+ register int i;
+
+#ifdef _WIDE_ORIENT
+ if (fp->_flags2 & __SWID)
+ {
+ wchar_t *p;
+
+ p = (wchar_t *) buf;
+ for (i = 0; i < (len / sizeof (wchar_t)); i++)
+ {
+ if (_fputwc_r (ptr, p[i], fp) == WEOF)
+ return -1;
+ }
+ }
+ else
+#endif
+ {
+ for (i = 0; i < len; i++)
+ {
+ /* Call __sfputc_r to skip _fputc_r. */
+ if (__sfputc_r (ptr, (int)buf[i], fp) == EOF)
+ return -1;
+ }
+ }
+ return (0);
+}
+#endif /* STRING_ONLY. */
+
+int _EXFUN(_VFPRINTF_R, (struct _reent *, FILE *, _CONST char *, va_list));
+
+#ifndef STRING_ONLY
+int
+_DEFUN(VFPRINTF, (fp, fmt0, ap),
+ FILE * fp _AND
+ _CONST char *fmt0 _AND
+ va_list ap)
+{
+ int result;
+ result = _VFPRINTF_R (_REENT, fp, fmt0, ap);
+ return result;
+}
+
+int
+_EXFUN(vfiprintf, (FILE *, const char *, __VALIST)
+ _ATTRIBUTE ((__alias__("vfprintf"))));
+#endif
+
+#ifdef STRING_ONLY
+# define __SPRINT __ssputs_r
+#else
+# define __SPRINT __sfputs_r
+#endif
+
+/* Do not need FLUSH for all sprintf functions. */
+#ifdef STRING_ONLY
+# define FLUSH()
+#else
+# define FLUSH()
+#endif
+
+int
+_DEFUN(_VFPRINTF_R, (data, fp, fmt0, ap),
+ struct _reent *data _AND
+ FILE * fp _AND
+ _CONST char *fmt0 _AND
+ va_list ap)
+{
+ register char *fmt; /* Format string. */
+ register int n, m; /* Handy integers (short term usage). */
+ register char *cp; /* Handy char pointer (short term usage). */
+ const char *flag_chars;
+ struct _prt_data_t prt_data; /* All data for decoding format string. */
+
+ /* Output function pointer. */
+ int (*pfunc)(struct _reent *, FILE *, _CONST char *, size_t len);
+
+ pfunc = __SPRINT;
+
+#ifndef STRING_ONLY
+ /* Initialize std streams if not dealing with sprintf family. */
+ CHECK_INIT (data, fp);
+ _newlib_flockfile_start (fp);
+
+ /* Sorry, fprintf(read_only_file, "") returns EOF, not 0. */
+ if (cantwrite (data, fp))
+ {
+ _newlib_flockfile_exit (fp);
+ return (EOF);
+ }
+
+#else
+ /* Create initial buffer if we are called by asprintf family. */
+ if (fp->_flags & __SMBF && !fp->_bf._base)
+ {
+ fp->_bf._base = fp->_p = _malloc_r (data, 64);
+ if (!fp->_p)
+ {
+ data->_errno = ENOMEM;
+ return EOF;
+ }
+ fp->_bf._size = 64;
+ }
+#endif
+
+ fmt = (char *)fmt0;
+ prt_data.ret = 0;
+ prt_data.blank = ' ';
+ prt_data.zero = '0';
+
+ /* Scan the format for conversions (`%' character). */
+ for (;;)
+ {
+ cp = fmt;
+ while (*fmt != '\0' && *fmt != '%')
+ fmt += 1;
+
+ if ((m = fmt - cp) != 0)
+ {
+ PRINT (cp, m);
+ prt_data.ret += m;
+ }
+ if (*fmt == '\0')
+ goto done;
+
+ fmt++; /* Skip over '%'. */
+
+ prt_data.flags = 0;
+ prt_data.width = 0;
+ prt_data.prec = -1;
+ prt_data.dprec = 0;
+ prt_data.l_buf[0] = '\0';
+#ifdef FLOATING_POINT
+ prt_data.lead = 0;
+#endif
+ /* The flags. */
+ /*
+ * ``Note that 0 is taken as a flag, not as the
+ * beginning of a field width.''
+ * -- ANSI X3J11
+ */
+ flag_chars = "#-0+ ";
+ for (; cp = memchr (flag_chars, *fmt, 5); fmt++)
+ prt_data.flags |= (1 << (cp - flag_chars));
+
+ if (prt_data.flags & SPACESGN)
+ prt_data.l_buf[0] = ' ';
+
+ /*
+ * ``If the space and + flags both appear, the space
+ * flag will be ignored.''
+ * -- ANSI X3J11
+ */
+ if (prt_data.flags & PLUSSGN)
+ prt_data.l_buf[0] = '+';
+
+ /* The width. */
+ if (*fmt == '*')
+ {
+ /*
+ * ``A negative field width argument is taken as a
+ * - flag followed by a positive field width.''
+ * -- ANSI X3J11
+ * They don't exclude field widths read from args.
+ */
+ prt_data.width = GET_ARG (n, ap, int);
+ if (prt_data.width < 0)
+ {
+ prt_data.width = -prt_data.width;
+ prt_data.flags |= LADJUST;
+ }
+ fmt++;
+ }
+ else
+ {
+ for (; is_digit (*fmt); fmt++)
+ prt_data.width = 10 * prt_data.width + to_digit (*fmt);
+ }
+
+ /* The precision. */
+ if (*fmt == '.')
+ {
+ fmt++;
+ if (*fmt == '*')
+ {
+ fmt++;
+ prt_data.prec = GET_ARG (n, ap, int);
+ if (prt_data.prec < 0)
+ prt_data.prec = -1;
+ }
+ else
+ {
+ prt_data.prec = 0;
+ for (; is_digit (*fmt); fmt++)
+ prt_data.prec = 10 * prt_data.prec + to_digit (*fmt);
+ }
+ }
+
+ /* The length modifiers. */
+ flag_chars = "hlL";
+ if ((cp = memchr (flag_chars, *fmt, 3)) != NULL)
+ {
+ prt_data.flags |= (SHORTINT << (cp - flag_chars));
+ fmt++;
+ }
+
+ /* The conversion specifiers. */
+ prt_data.code = *fmt++;
+ cp = memchr ("efgEFG", prt_data.code, 6);
+#ifdef FLOATING_POINT
+ /* If cp is not NULL, we are facing FLOATING POINT NUMBER. */
+ if (cp)
+ {
+ /* Consume floating point argument if _printf_float is not
+ linked. */
+ if (_printf_float == NULL)
+ {
+ if (prt_data.flags & LONGDBL)
+ GET_ARG (N, ap, _LONG_DOUBLE);
+ else
+ GET_ARG (N, ap, double);
+ }
+ else
+ {
+ n = _printf_float (data, &prt_data, fp, pfunc, &ap);
+ }
+ }
+ else
+#endif
+ n = _printf_i (data, &prt_data, fp, pfunc, &ap);
+
+ if (n == -1)
+ goto error;
+
+ prt_data.ret += n;
+ }
+done:
+ FLUSH ();
+error:
+#ifndef STRING_ONLY
+ _newlib_flockfile_end (fp);
+#endif
+ return (__sferror (fp) ? EOF : prt_data.ret);
+}
+
+#ifdef STRING_ONLY
+int
+_EXFUN(_svfiprintf_r, (struct _reent *, FILE *, const char *, __VALIST)
+ _ATTRIBUTE ((__alias__("_svfprintf_r"))));
+#else
+int
+_EXFUN(_vfiprintf_r, (struct _reent *, FILE *, const char *, __VALIST)
+ _ATTRIBUTE ((__alias__("_vfprintf_r"))));
+#endif
diff --git a/newlib/libc/stdio/nano-vfprintf_float.c b/newlib/libc/stdio/nano-vfprintf_float.c
new file mode 100644
index 000000000..aca24aec0
--- /dev/null
+++ b/newlib/libc/stdio/nano-vfprintf_float.c
@@ -0,0 +1,364 @@
+/*
+ * Copyright (c) 1990 The 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. 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 <newlib.h>
+
+#include <_ansi.h>
+#include <reent.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <limits.h>
+#include <stdint.h>
+#include <wchar.h>
+#include <sys/lock.h>
+#include <stdarg.h>
+#include "local.h"
+#include "../stdlib/local.h"
+#include "fvwrite.h"
+#include "vfieeefp.h"
+#include "nano-vfprintf_local.h"
+
+char *__cvt (struct _reent *data, _PRINTF_FLOAT_TYPE value, int ndigits,
+ int flags, char *sign, int *decpt, int ch, int *length,
+ char *buf);
+
+int __exponent (char *p0, int exp, int fmtch);
+
+#ifdef FLOATING_POINT
+
+/* Using reentrant DATA, convert finite VALUE into a string of digits
+ with no decimal point, using NDIGITS precision and FLAGS as guides
+ to whether trailing zeros must be included. Set *SIGN to nonzero
+ if VALUE was negative. Set *DECPT to the exponent plus one. Set
+ *LENGTH to the length of the returned string. CH must be one of
+ [aAeEfFgG]; if it is [aA], then the return string lives in BUF,
+ otherwise the return value shares the mprec reentrant storage. */
+char *
+__cvt (struct _reent *data, _PRINTF_FLOAT_TYPE value, int ndigits, int flags,
+ char *sign, int *decpt, int ch, int *length, char *buf)
+{
+ int mode, dsgn;
+ char *digits, *bp, *rve;
+ union double_union tmp;
+
+ tmp.d = value;
+ /* This will check for "< 0" and "-0.0". */
+ if (word0 (tmp) & Sign_bit)
+ {
+ value = -value;
+ *sign = '-';
+ }
+ else
+ *sign = '\000';
+
+ if (ch == 'f' || ch == 'F')
+ {
+ /* Ndigits after the decimal point. */
+ mode = 3;
+ }
+ else
+ {
+ /* To obtain ndigits after the decimal point for the 'e'
+ and 'E' formats, round to ndigits + 1 significant figures. */
+ if (ch == 'e' || ch == 'E')
+ {
+ ndigits++;
+ }
+ /* Ndigits significant digits. */
+ mode = 2;
+ }
+
+ digits = _DTOA_R (data, value, mode, ndigits, decpt, &dsgn, &rve);
+
+ /* Print trailing zeros. */
+ if ((ch != 'g' && ch != 'G') || flags & ALT)
+ {
+ bp = digits + ndigits;
+ if (ch == 'f' || ch == 'F')
+ {
+ if (*digits == '0' && value)
+ *decpt = -ndigits + 1;
+ bp += *decpt;
+ }
+ /* Kludge for __dtoa irregularity. */
+ if (value == 0)
+ rve = bp;
+ while (rve < bp)
+ *rve++ = '0';
+ }
+ *length = rve - digits;
+ return (digits);
+}
+
+/* This function is copied from exponent in vfprintf.c with support for
+ C99 formats removed. We don't use the original function in order to
+ decouple nano implementation of formatted IO from the Newlib one. */
+int
+__exponent (char *p0, int exp, int fmtch)
+{
+ register char *p, *t;
+ char expbuf[MAXEXPLEN];
+#define isa 0
+
+ p = p0;
+ *p++ = isa ? 'p' - 'a' + fmtch : fmtch;
+ if (exp < 0)
+ {
+ exp = -exp;
+ *p++ = '-';
+ }
+ else
+ *p++ = '+';
+ t = expbuf + MAXEXPLEN;
+ if (exp > 9)
+ {
+ do
+ {
+ *--t = to_char (exp % 10);
+ }
+ while ((exp /= 10) > 9);
+ *--t = to_char (exp);
+ for (; t < expbuf + MAXEXPLEN; *p++ = *t++);
+ }
+ else
+ {
+ if (!isa)
+ *p++ = '0';
+ *p++ = to_char (exp);
+ }
+ return (p - p0);
+}
+
+/* Decode and print floating point number specified by "eEfgG". */
+int
+_printf_float (struct _reent *data,
+ struct _prt_data_t *pdata,
+ FILE * fp,
+ int (*pfunc) (struct _reent *, FILE *, _CONST char *,
+ size_t len), va_list * ap)
+{
+#define _fpvalue (pdata->_double_)
+
+ char *decimal_point = _localeconv_r (data)->decimal_point;
+ size_t decp_len = strlen (decimal_point);
+ /* Temporary negative sign for floats. */
+ char softsign;
+ /* Integer value of exponent. */
+ int expt;
+ /* Character count for expstr. */
+ int expsize = 0;
+ /* Actual number of digits returned by cvt. */
+ int ndig = 0;
+ char *cp;
+ int n;
+ /* Field size expanded by dprec(not for _printf_float). */
+ int realsz;
+ char code = pdata->code;
+
+ if (pdata->flags & LONGDBL)
+ {
+ _fpvalue = (double) GET_ARG (N, *ap, _LONG_DOUBLE);
+ }
+ else
+ {
+ _fpvalue = GET_ARG (N, *ap, double);
+ }
+
+ /* Do this before tricky precision changes.
+
+ If the output is infinite or NaN, leading
+ zeros are not permitted. Otherwise, scanf
+ could not read what printf wrote. */
+ if (isinf (_fpvalue))
+ {
+ if (_fpvalue < 0)
+ pdata->l_buf[0] = '-';
+ if (code <= 'G') /* 'A', 'E', 'F', or 'G'. */
+ cp = "INF";
+ else
+ cp = "inf";
+ pdata->size = 3;
+ pdata->flags &= ~ZEROPAD;
+ goto print_float;
+ }
+ if (isnan (_fpvalue))
+ {
+ if (code <= 'G') /* 'A', 'E', 'F', or 'G'. */
+ cp = "NAN";
+ else
+ cp = "nan";
+ pdata->size = 3;
+ pdata->flags &= ~ZEROPAD;
+ goto print_float;
+ }
+
+ if (pdata->prec == -1)
+ {
+ pdata->prec = DEFPREC;
+ }
+ else if ((code == 'g' || code == 'G') && pdata->prec == 0)
+ {
+ pdata->prec = 1;
+ }
+
+ pdata->flags |= FPT;
+
+ cp = __cvt (data, _fpvalue, pdata->prec, pdata->flags, &softsign,
+ &expt, code, &ndig, cp);
+
+ if (code == 'g' || code == 'G')
+ {
+ if (expt <= -4 || expt > pdata->prec)
+ /* 'e' or 'E'. */
+ code -= 2;
+ else
+ code = 'g';
+ }
+ if (code <= 'e')
+ {
+ /* 'a', 'A', 'e', or 'E' fmt. */
+ --expt;
+ expsize = __exponent (pdata->expstr, expt, code);
+ pdata->size = expsize + ndig;
+ if (ndig > 1 || pdata->flags & ALT)
+ ++pdata->size;
+ }
+ else
+ {
+ if (code == 'f')
+ {
+ /* 'f' fmt. */
+ if (expt > 0)
+ {
+ pdata->size = expt;
+ if (pdata->prec || pdata->flags & ALT)
+ pdata->size += pdata->prec + 1;
+ }
+ else
+ /* "0.X". */
+ pdata->size = (pdata->prec || pdata->flags & ALT)
+ ? pdata->prec + 2 : 1;
+ }
+ else if (expt >= ndig)
+ {
+ /* Fixed g fmt. */
+ pdata->size = expt;
+ if (pdata->flags & ALT)
+ ++pdata->size;
+ }
+ else
+ pdata->size = ndig + (expt > 0 ? 1 : 2 - expt);
+ pdata->lead = expt;
+ }
+
+ if (softsign)
+ pdata->l_buf[0] = '-';
+print_float:
+ if (_printf_common (data, pdata, &realsz, fp, pfunc) == -1)
+ goto error;
+
+ if ((pdata->flags & FPT) == 0)
+ {
+ PRINT (cp, pdata->size);
+ }
+ else
+ {
+ /* Glue together f_p fragments. */
+ if (code >= 'f')
+ {
+ /* 'f' or 'g'. */
+ if (_fpvalue == 0)
+ {
+ /* Kludge for __dtoa irregularity. */
+ PRINT ("0", 1);
+ if (expt < ndig || pdata->flags & ALT)
+ {
+ PRINT (decimal_point, decp_len);
+ PAD (ndig - 1, pdata->zero);
+ }
+ }
+ else if (expt <= 0)
+ {
+ PRINT ("0", 1);
+ if (expt || ndig || pdata->flags & ALT)
+ {
+ PRINT (decimal_point, decp_len);
+ PAD (-expt, pdata->zero);
+ PRINT (cp, ndig);
+ }
+ }
+ else
+ {
+ char *convbuf = cp;
+ PRINTANDPAD (cp, convbuf + ndig, pdata->lead, pdata->zero);
+ cp += pdata->lead;
+ if (expt < ndig || pdata->flags & ALT)
+ PRINT (decimal_point, decp_len);
+ PRINTANDPAD (cp, convbuf + ndig, ndig - expt, pdata->zero);
+ }
+ }
+ else
+ {
+ /* 'a', 'A', 'e', or 'E'. */
+ if (ndig > 1 || pdata->flags & ALT)
+ {
+ PRINT (cp, 1);
+ cp++;
+ PRINT (decimal_point, decp_len);
+ if (_fpvalue)
+ {
+ PRINT (cp, ndig - 1);
+ }
+ /* "0.[0..]". */
+ else
+ /* __dtoa irregularity. */
+ PAD (ndig - 1, pdata->zero);
+ }
+ else /* "XeYYY". */
+ PRINT (cp, 1);
+ PRINT (pdata->expstr, expsize);
+ }
+ }
+
+ /* Left-adjusting padding (always blank). */
+ if (pdata->flags & LADJUST)
+ PAD (pdata->width - realsz, pdata->blank);
+
+ return (pdata->width > realsz ? pdata->width : realsz);
+error:
+ return -1;
+
+#undef _fpvalue
+}
+
+#endif
diff --git a/newlib/libc/stdio/nano-vfprintf_i.c b/newlib/libc/stdio/nano-vfprintf_i.c
new file mode 100644
index 000000000..46945b34a
--- /dev/null
+++ b/newlib/libc/stdio/nano-vfprintf_i.c
@@ -0,0 +1,250 @@
+/*
+ * Copyright (c) 2012-2014 ARM Ltd
+ * 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. The name of the company may not be used to endorse or promote
+ * products derived from this software without specific prior written
+ * permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ARM LTD ``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 ARM LTD 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 <newlib.h>
+
+#include <_ansi.h>
+#include <reent.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <limits.h>
+#include <stdint.h>
+#include <wchar.h>
+#include <sys/lock.h>
+#include <stdarg.h>
+#include "local.h"
+#include "../stdlib/local.h"
+#include "fvwrite.h"
+#include "vfieeefp.h"
+#include "nano-vfprintf_local.h"
+
+/* Decode and print non-floating point data. */
+int
+_printf_common (struct _reent *data,
+ struct _prt_data_t *pdata,
+ int *realsz,
+ FILE *fp,
+ int (*pfunc)(struct _reent *, FILE *,
+ _CONST char *, size_t len))
+{
+ int n;
+ /*
+ * All reasonable formats wind up here. At this point, `cp'
+ * points to a string which (if not flags&LADJUST) should be
+ * padded out to `width' places. If flags&ZEROPAD, it should
+ * first be prefixed by any sign or other prefix; otherwise,
+ * it should be blank padded before the prefix is emitted.
+ * After any left-hand padding and prefixing, emit zeroes
+ * required by a decimal [diouxX] precision, then print the
+ * string proper, then emit zeroes required by any leftover
+ * floating precision; finally, if LADJUST, pad with blanks.
+ * If flags&FPT, ch must be in [aAeEfg].
+ *
+ * Compute actual size, so we know how much to pad.
+ * size excludes decimal prec; realsz includes it.
+ */
+ *realsz = pdata->dprec > pdata->size ? pdata->dprec : pdata->size;
+ if (pdata->l_buf[0])
+ (*realsz)++;
+
+ if (pdata->flags & HEXPREFIX)
+ *realsz += 2;
+
+ /* Right-adjusting blank padding. */
+ if ((pdata->flags & (LADJUST|ZEROPAD)) == 0)
+ PAD (pdata->width - *realsz, pdata->blank);
+
+ /* Prefix. */
+ n = 0;
+ if (pdata->l_buf[0])
+ n++;
+
+ if (pdata->flags & HEXPREFIX)
+ {
+ pdata->l_buf[n++] = '0';
+ pdata->l_buf[n++] = pdata->l_buf[2];
+ }
+
+ PRINT (pdata->l_buf, n);
+ n = pdata->width - *realsz;
+ if ((pdata->flags & (LADJUST|ZEROPAD)) != ZEROPAD || n < 0)
+ n = 0;
+
+ if (pdata->dprec > pdata->size)
+ n += pdata->dprec - pdata->size;
+
+ PAD (n, pdata->zero);
+ return 0;
+error:
+ return -1;
+}
+int
+_printf_i (struct _reent *data, struct _prt_data_t *pdata, FILE *fp,
+ int (*pfunc)(struct _reent *, FILE *, _CONST char *, size_t len),
+ va_list *ap)
+{
+ /* Field size expanded by dprec. */
+ int realsz;
+ u_quad_t _uquad;
+ int base;
+ int n;
+ char *cp = pdata->buf + BUF;
+ char *xdigs = "0123456789ABCDEF";
+
+ /* Decoding the conversion specifier. */
+ switch (pdata->code)
+ {
+ case 'c':
+ *--cp = GET_ARG (N, *ap, int);
+ pdata->size = 1;
+ goto non_number_nosign;
+ case 'd':
+ case 'i':
+ _uquad = SARG (pdata->flags);
+ if ((long) _uquad < 0)
+ {
+ _uquad = -_uquad;
+ pdata->l_buf[0] = '-';
+ }
+ base = 10;
+ goto number;
+ case 'u':
+ case 'o':
+ _uquad = UARG (pdata->flags);
+ base = (pdata->code == 'o') ? 8 : 10;
+ goto nosign;
+ case 'X':
+ pdata->l_buf[2] = 'X';
+ goto hex;
+ case 'p':
+ /*
+ * ``The argument shall be a pointer to void. The
+ * value of the pointer is converted to a sequence
+ * of printable characters, in an implementation-
+ * defined manner.''
+ * -- ANSI X3J11
+ */
+ pdata->flags |= HEXPREFIX;
+ if (sizeof (void*) > sizeof (int))
+ pdata->flags |= LONGINT;
+ /* NOSTRICT. */
+ case 'x':
+ pdata->l_buf[2] = 'x';
+ xdigs = "0123456789abcdef";
+hex:
+ _uquad = UARG (pdata->flags);
+ base = 16;
+ if (pdata->flags & ALT)
+ pdata->flags |= HEXPREFIX;
+
+ /* Leading 0x/X only if non-zero. */
+ if (_uquad == 0)
+ pdata->flags &= ~HEXPREFIX;
+
+ /* Unsigned conversions. */
+nosign:
+ pdata->l_buf[0] = '\0';
+ /*
+ * ``... diouXx conversions ... if a precision is
+ * specified, the 0 flag will be ignored.''
+ * -- ANSI X3J11
+ */
+number:
+ if ((pdata->dprec = pdata->prec) >= 0)
+ pdata->flags &= ~ZEROPAD;
+
+ /*
+ * ``The result of converting a zero value with an
+ * explicit precision of zero is no characters.''
+ * -- ANSI X3J11
+ */
+ if (_uquad != 0 || pdata->prec != 0)
+ {
+ do
+ {
+ *--cp = xdigs[_uquad % base];
+ _uquad /= base;
+ }
+ while (_uquad);
+ }
+ /* For 'o' conversion, '#' increases the precision to force the first
+ digit of the result to be zero. */
+ if (base == 8 && (pdata->flags & ALT) && pdata->prec <= pdata->size)
+ *--cp = '0';
+
+ pdata->size = pdata->buf + BUF - cp;
+ break;
+ case 'n':
+ if (pdata->flags & LONGINT)
+ *GET_ARG (N, *ap, long_ptr_t) = pdata->ret;
+ else if (pdata->flags & SHORTINT)
+ *GET_ARG (N, *ap, short_ptr_t) = pdata->ret;
+ else
+ *GET_ARG (N, *ap, int_ptr_t) = pdata->ret;
+ case '\0':
+ pdata->size = 0;
+ break;
+ case 's':
+ cp = GET_ARG (N, *ap, char_ptr_t);
+ /* Precision gives the maximum number of chars to be written from a
+ string, and take prec == -1 into consideration.
+ Use normal Newlib approach here to support case where cp is not
+ nul-terminated. */
+ char *p = memchr (cp, 0, pdata->prec);
+
+ if (p != NULL)
+ pdata->prec = p - cp;
+
+ pdata->size = pdata->prec;
+ goto non_number_nosign;
+ default:
+ /* "%?" prints ?, unless ? is NUL. */
+ /* Pretend it was %c with argument ch. */
+ *--cp = pdata->code;
+ pdata->size = 1;
+non_number_nosign:
+ pdata->l_buf[0] = '\0';
+ break;
+ }
+
+ /* Output. */
+ n = _printf_common (data, pdata, &realsz, fp, pfunc);
+ if (n == -1)
+ goto error;
+
+ PRINT (cp, pdata->size);
+ /* Left-adjusting padding (always blank). */
+ if (pdata->flags & LADJUST)
+ PAD (pdata->width - realsz, pdata->blank);
+
+ return (pdata->width > realsz ? pdata->width : realsz);
+error:
+ return -1;
+}
+
diff --git a/newlib/libc/stdio/nano-vfprintf_local.h b/newlib/libc/stdio/nano-vfprintf_local.h
new file mode 100644
index 000000000..83b479e56
--- /dev/null
+++ b/newlib/libc/stdio/nano-vfprintf_local.h
@@ -0,0 +1,234 @@
+/*
+ * Copyright (c) 1990 The 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. 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.
+ */
+
+/*
+ * Copyright (c) 2012-2014 ARM Ltd
+ * 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. The name of the company may not be used to endorse or promote
+ * products derived from this software without specific prior written
+ * permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ARM LTD ``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 ARM LTD 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.
+ */
+
+#ifndef VFPRINTF_LOCAL
+#define VFPRINTF_LOCAL
+
+#ifndef NO_FLOATING_POINT
+# define FLOATING_POINT
+#endif
+
+#define _NO_POS_ARGS
+#undef _WANT_IO_C99_FORMATS
+
+/* Currently a test is made to see if long double processing is warranted.
+ This could be changed in the future should the _ldtoa_r code be
+ preferred over _dtoa_r. */
+#define _NO_LONGDBL
+
+#define _NO_LONGLONG
+
+#define _PRINTF_FLOAT_TYPE double
+
+#if defined (FLOATING_POINT)
+# include <locale.h>
+#endif
+#ifdef FLOATING_POINT
+# include <math.h>
+
+/* For %La, an exponent of 15 bits occupies the exponent character,
+ a sign, and up to 5 digits. */
+# define MAXEXPLEN 7
+# define DEFPREC 6
+
+extern char *_dtoa_r _PARAMS((struct _reent *, double, int,
+ int, int *, int *, char **));
+
+# define _DTOA_R _dtoa_r
+# define FREXP frexp
+
+#endif /* FLOATING_POINT. */
+
+/* BUF must be big enough for the maximum %#llo (assuming long long is
+ at most 64 bits, this would be 23 characters), the maximum
+ multibyte character %C, and the maximum default precision of %La
+ (assuming long double is at most 128 bits with 113 bits of
+ mantissa, this would be 29 characters). %e, %f, and %g use
+ reentrant storage shared with mprec. All other formats that use
+ buf get by with fewer characters. Making BUF slightly bigger
+ reduces the need for malloc in %.*a and %S, when large precision or
+ long strings are processed.
+ The bigger size of 100 bytes is used on systems which allow number
+ strings using the locale's grouping character. Since that's a multibyte
+ value, we should use a conservative value. */
+#define BUF 40
+
+#define quad_t long
+#define u_quad_t unsigned long
+
+typedef quad_t * quad_ptr_t;
+typedef _PTR void_ptr_t;
+typedef char * char_ptr_t;
+typedef long * long_ptr_t;
+typedef int * int_ptr_t;
+typedef short * short_ptr_t;
+
+/* Macros for converting digits to letters and vice versa. */
+#define to_digit(c) ((c) - '0')
+#define is_digit(c) ((unsigned)to_digit (c) <= 9)
+#define to_char(n) ((n) + '0')
+
+/* Flags used during conversion. */
+#define ALT 0x001 /* Alternate form. */
+#define LADJUST 0x002 /* Left adjustment. */
+#define ZEROPAD 0x004 /* Zero (as opposed to blank) pad. */
+#define PLUSSGN 0x008 /* Plus sign flag. */
+#define SPACESGN 0x010 /* Space flag. */
+#define HEXPREFIX 0x020 /* Add 0x or 0X prefix. */
+#define SHORTINT 0x040 /* Short integer. */
+#define LONGINT 0x080 /* Long integer. */
+#define LONGDBL 0x100 /* Long double. */
+/* ifdef _NO_LONGLONG, make QUADINT equivalent to LONGINT, so
+ that %lld behaves the same as %ld, not as %d, as expected if:
+ sizeof (long long) = sizeof long > sizeof int. */
+#define QUADINT LONGINT
+#define FPT 0x400 /* Floating point number. */
+/* Define as 0, to make SARG and UARG occupy fewer instructions. */
+# define CHARINT 0
+
+/* Macros to support positional arguments. */
+#define GET_ARG(n, ap, type) (va_arg ((ap), type))
+
+/* To extend shorts properly, we need both signed and unsigned
+ argument extraction methods. Also they should be used in nano-vfprintf_i.c
+ and nano-vfprintf_float.c only, since ap is a pointer to va_list. */
+#define SARG(flags) \
+ (flags&LONGINT ? GET_ARG (N, (*ap), long) : \
+ flags&SHORTINT ? (long)(short)GET_ARG (N, (*ap), int) : \
+ flags&CHARINT ? (long)(signed char)GET_ARG (N, (*ap), int) : \
+ (long)GET_ARG (N, (*ap), int))
+#define UARG(flags) \
+ (flags&LONGINT ? GET_ARG (N, (*ap), u_long) : \
+ flags&SHORTINT ? (u_long)(u_short)GET_ARG (N, (*ap), int) : \
+ flags&CHARINT ? (u_long)(unsigned char)GET_ARG (N, (*ap), int) : \
+ (u_long)GET_ARG (N, (*ap), u_int))
+
+/* BEWARE, these `goto error' on error. And they are used
+ in more than one functions.
+
+ Following macros are each referred about twice in printf for integer,
+ so it is not worth to rewrite them into functions. This situation may
+ change in the future. */
+#define PRINT(ptr, len) { \
+ if (pfunc (data, fp, (ptr), (len)) == EOF) \
+ goto error; \
+}
+#define PAD(howmany, ch) { \
+ int temp_i = 0; \
+ while (temp_i < (howmany)) \
+ { \
+ if (pfunc (data, fp, &(ch), 1) == EOF) \
+ goto error; \
+ temp_i++; \
+ } \
+}
+#define PRINTANDPAD(p, ep, len, ch) { \
+ int temp_n = (ep) - (p); \
+ if (temp_n > (len)) \
+ temp_n = (len); \
+ if (temp_n > 0) \
+ PRINT((p), temp_n); \
+ PAD((len) - (temp_n > 0 ? temp_n : 0), (ch)); \
+}
+
+/* All data needed to decode format string are kept in below struct. */
+struct _prt_data_t
+{
+ int flags; /* Flags. */
+ int prec; /* Precision. */
+ int dprec; /* Decimal precision. */
+ int width; /* Width. */
+ int size; /* Size of converted field or string. */
+ int ret; /* Return value accumulator. */
+ char code; /* Current conversion specifier. */
+ char blank; /* Blank character. */
+ char zero; /* Zero character. */
+ char buf[BUF]; /* Output buffer for non-floating point number. */
+ char l_buf[3]; /* Sign&hex_prefix, "+/-" and "0x/X". */
+#ifdef FLOATING_POINT
+ _PRINTF_FLOAT_TYPE _double_; /* Double value. */
+ char expstr[MAXEXPLEN]; /* Buffer for exponent string. */
+ int lead; /* The sig figs before decimal or group sep. */
+#endif
+};
+
+extern int
+_printf_common (struct _reent *data,
+ struct _prt_data_t *pdata,
+ int *realsz,
+ FILE *fp,
+ int (*pfunc)(struct _reent *, FILE *,
+ _CONST char *, size_t len));
+
+extern int
+_printf_i (struct _reent *data, struct _prt_data_t *pdata, FILE *fp,
+ int (*pfunc)(struct _reent *, FILE *, _CONST char *, size_t len),
+ va_list *ap);
+
+/* Make _printf_float weak symbol, so it won't be linked in if target program
+ does not need it. */
+extern int
+_printf_float (struct _reent *data,
+ struct _prt_data_t *pdata,
+ FILE *fp,
+ int (*pfunc)(struct _reent *, FILE *,
+ _CONST char *, size_t len),
+ va_list *ap) _ATTRIBUTE((__weak__));
+#endif
diff --git a/newlib/libc/stdio/nano-vfscanf.c b/newlib/libc/stdio/nano-vfscanf.c
new file mode 100644
index 000000000..5ba00f797
--- /dev/null
+++ b/newlib/libc/stdio/nano-vfscanf.c
@@ -0,0 +1,498 @@
+/*-
+ * Copyright (c) 1990 The Regents of the University of California.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms are permitted
+ * provided that the above copyright notice and this paragraph are
+ * duplicated in all such forms and that any documentation,
+ * advertising materials, and other materials related to such
+ * distribution and use acknowledge that the software was developed
+ * by the University of California, Berkeley. The name of the
+ * University may not 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.
+ */
+
+/*
+ * Copyright (c) 2012-2014 ARM Ltd
+ * 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. The name of the company may not be used to endorse or promote
+ * products derived from this software without specific prior written
+ * permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ARM LTD ``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 ARM LTD 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.
+ */
+
+/*
+FUNCTION
+<<vfscanf>>, <<vscanf>>, <<vsscanf>>---format argument list
+
+INDEX
+ vfscanf
+INDEX
+ _vfscanf_r
+INDEX
+ vscanf
+INDEX
+ _vscanf_r
+INDEX
+ vsscanf
+INDEX
+ _vsscanf_r
+
+ANSI_SYNOPSIS
+ #include <stdio.h>
+ #include <stdarg.h>
+ int vscanf(const char *<[fmt]>, va_list <[list]>);
+ int vfscanf(FILE *<[fp]>, const char *<[fmt]>, va_list <[list]>);
+ int vsscanf(const char *<[str]>, const char *<[fmt]>, va_list <[list]>);
+
+ int _vscanf_r(struct _reent *<[reent]>, const char *<[fmt]>,
+ va_list <[list]>);
+ int _vfscanf_r(struct _reent *<[reent]>, FILE *<[fp]>, const char *<[fmt]>,
+ va_list <[list]>);
+ int _vsscanf_r(struct _reent *<[reent]>, const char *<[str]>,
+ const char *<[fmt]>, va_list <[list]>);
+
+TRAD_SYNOPSIS
+ #include <stdio.h>
+ #include <varargs.h>
+ int vscanf( <[fmt]>, <[ist]>)
+ char *<[fmt]>;
+ va_list <[list]>;
+
+ int vfscanf( <[fp]>, <[fmt]>, <[list]>)
+ FILE *<[fp]>;
+ char *<[fmt]>;
+ va_list <[list]>;
+
+ int vsscanf( <[str]>, <[fmt]>, <[list]>)
+ char *<[str]>;
+ char *<[fmt]>;
+ va_list <[list]>;
+
+ int _vscanf_r( <[reent]>, <[fmt]>, <[ist]>)
+ struct _reent *<[reent]>;
+ char *<[fmt]>;
+ va_list <[list]>;
+
+ int _vfscanf_r( <[reent]>, <[fp]>, <[fmt]>, <[list]>)
+ struct _reent *<[reent]>;
+ FILE *<[fp]>;
+ char *<[fmt]>;
+ va_list <[list]>;
+
+ int _vsscanf_r( <[reent]>, <[str]>, <[fmt]>, <[list]>)
+ struct _reent *<[reent]>;
+ char *<[str]>;
+ char *<[fmt]>;
+ va_list <[list]>;
+
+DESCRIPTION
+<<vscanf>>, <<vfscanf>>, and <<vsscanf>> are (respectively) variants
+of <<scanf>>, <<fscanf>>, and <<sscanf>>. They differ only in
+allowing their caller to pass the variable argument list as a
+<<va_list>> object (initialized by <<va_start>>) rather than
+directly accepting a variable number of arguments.
+
+RETURNS
+The return values are consistent with the corresponding functions:
+<<vscanf>> returns the number of input fields successfully scanned,
+converted, and stored; the return value does not include scanned
+fields which were not stored.
+
+If <<vscanf>> attempts to read at end-of-file, the return value
+is <<EOF>>.
+
+If no fields were stored, the return value is <<0>>.
+
+The routines <<_vscanf_r>>, <<_vfscanf_f>>, and <<_vsscanf_r>> are
+reentrant versions which take an additional first parameter which points to the
+reentrancy structure.
+
+PORTABILITY
+These are GNU extensions.
+
+Supporting OS subroutines required:
+*/
+
+#include <_ansi.h>
+#include <reent.h>
+#include <newlib.h>
+#include <ctype.h>
+#include <wctype.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <stdint.h>
+#include <limits.h>
+#include <wchar.h>
+#include <string.h>
+#include <stdarg.h>
+#include <errno.h>
+#include "local.h"
+#include "../stdlib/local.h"
+#include "nano-vfscanf_local.h"
+
+#define VFSCANF vfscanf
+#define _VFSCANF_R _vfscanf_r
+#define __SVFSCANF __svfscanf
+#ifdef STRING_ONLY
+# define __SVFSCANF_R __ssvfscanf_r
+#else
+# define __SVFSCANF_R __svfscanf_r
+#endif
+
+/* vfscanf. */
+
+#ifndef STRING_ONLY
+
+#ifndef _REENT_ONLY
+
+int
+_DEFUN(VFSCANF, (fp, fmt, ap),
+ register FILE *fp _AND
+ _CONST char *fmt _AND
+ va_list ap)
+{
+ CHECK_INIT(_REENT, fp);
+ return __SVFSCANF_R (_REENT, fp, fmt, ap);
+}
+
+int
+_EXFUN(vfiscanf, (FILE *, const char *, __VALIST)
+ _ATTRIBUTE ((__alias__("vfscanf"))));
+
+int
+_DEFUN(__SVFSCANF, (fp, fmt0, ap),
+ register FILE *fp _AND
+ char _CONST *fmt0 _AND
+ va_list ap)
+{
+ return __SVFSCANF_R (_REENT, fp, fmt0, ap);
+}
+
+#endif
+
+int
+_DEFUN(_VFSCANF_R, (data, fp, fmt, ap),
+ struct _reent *data _AND
+ register FILE *fp _AND
+ _CONST char *fmt _AND
+ va_list ap)
+{
+ CHECK_INIT(data, fp);
+ return __SVFSCANF_R (data, fp, fmt, ap);
+}
+
+int
+_EXFUN(_vfiscanf_r, (struct _reent *, FILE *, const char *, __VALIST)
+ _ATTRIBUTE ((__alias__("_vfscanf_r"))));
+#endif /* !STRING_ONLY. */
+
+#if defined (STRING_ONLY)
+/* When dealing with the sscanf family, we don't want to use the
+ regular ungetc which will drag in file I/O items we don't need.
+ So, we create our own trimmed-down version. */
+int
+_DEFUN(_sungetc_r, (data, fp, ch),
+ struct _reent *data _AND
+ int c _AND
+ register FILE *fp)
+{
+ if (c == EOF)
+ return (EOF);
+
+ /* After ungetc, we won't be at eof anymore. */
+ fp->_flags &= ~__SEOF;
+ c = (unsigned char) c;
+
+ /* If we are in the middle of ungetc'ing, just continue.
+ This may require expanding the current ungetc buffer. */
+
+ if (HASUB (fp))
+ {
+ if (fp->_r >= fp->_ub._size && __submore (data, fp))
+ return EOF;
+
+ *--fp->_p = c;
+ fp->_r++;
+ return c;
+ }
+
+ /* If we can handle this by simply backing up, do so,
+ but never replace the original character.
+ (This makes sscanf() work when scanning `const' data). */
+ if (fp->_bf._base != NULL && fp->_p > fp->_bf._base && fp->_p[-1] == c)
+ {
+ fp->_p--;
+ fp->_r++;
+ return c;
+ }
+
+ /* Create an ungetc buffer.
+ Initially, we will use the `reserve' buffer. */
+ fp->_ur = fp->_r;
+ fp->_up = fp->_p;
+ fp->_ub._base = fp->_ubuf;
+ fp->_ub._size = sizeof (fp->_ubuf);
+ fp->_ubuf[sizeof (fp->_ubuf) - 1] = c;
+ fp->_p = &fp->_ubuf[sizeof (fp->_ubuf) - 1];
+ fp->_r = 1;
+ return c;
+}
+
+/* String only version of __srefill_r for sscanf family. */
+int
+_DEFUN(__ssrefill_r, (ptr, fp),
+ struct _reent * ptr _AND
+ register FILE * fp)
+{
+ /* Our only hope of further input is the ungetc buffer.
+ If there is anything in that buffer to read, return. */
+ if (HASUB (fp))
+ {
+ FREEUB (ptr, fp);
+ if ((fp->_r = fp->_ur) != 0)
+ {
+ fp->_p = fp->_up;
+ return 0;
+ }
+ }
+
+ /* Otherwise we are out of character input. */
+ fp->_p = fp->_bf._base;
+ fp->_r = 0;
+ fp->_flags |= __SEOF;
+ return EOF;
+}
+
+#else
+int _EXFUN (_sungetc_r, (struct _reent *, int, register FILE *));
+int _EXFUN (__ssrefill_r, (struct _reent *, register FILE *));
+size_t _EXFUN (_sfread_r, (struct _reent *, _PTR buf, size_t, size_t, FILE *));
+#endif /* !STRING_ONLY. */
+
+int
+_DEFUN(__SVFSCANF_R, (rptr, fp, fmt0, ap),
+ struct _reent *rptr _AND
+ register FILE *fp _AND
+ char _CONST *fmt0 _AND
+ va_list ap)
+{
+ register u_char *fmt = (u_char *) fmt0;
+ register int c; /* Character from format, or conversion. */
+ register char *p; /* Points into all kinds of strings. */
+ char ccltab[256]; /* Character class table for %[...]. */
+
+ int ret;
+ char *cp;
+
+ struct _scan_data_t scan_data;
+ int (*scan_func)(struct _reent*, struct _scan_data_t*, FILE *, va_list *);
+
+ _newlib_flockfile_start (fp);
+
+ scan_data.nassigned = 0;
+ scan_data.nread = 0;
+ scan_data.ccltab = ccltab;
+ scan_data.pfn_ungetc = _ungetc_r;
+ scan_data.pfn_refill = __srefill_r;
+
+ for (;;)
+ {
+ if (*fmt == 0)
+ goto all_done;
+
+ if (isspace (*fmt))
+ {
+ while ((fp->_r > 0 || !scan_data.pfn_refill(rptr, fp))
+ && isspace (*fp->_p))
+ {
+ scan_data.nread++;
+ fp->_r--;
+ fp->_p++;
+ }
+ fmt++;
+ continue;
+ }
+ if ((c = *fmt++) != '%')
+ goto literal;
+
+ scan_data.width = 0;
+ scan_data.flags = 0;
+
+ if (*fmt == '*')
+ {
+ scan_data.flags |= SUPPRESS;
+ fmt++;
+ }
+
+ for (; is_digit (*fmt); fmt++)
+ scan_data.width = 10 * scan_data.width + to_digit (*fmt);
+
+ /* The length modifiers. */
+ p = "hlL";
+ if ((cp = memchr (p, *fmt, 3)) != NULL) {
+ scan_data.flags |= (SHORT << (cp - p));
+ fmt++;
+ }
+
+ /* Switch on the format. continue if done; break once format
+ type is derived. */
+ c = *fmt++;
+ switch (c)
+ {
+ case '%':
+ literal:
+ if ((fp->_r <= 0 && scan_data.pfn_refill(rptr, fp)))
+ goto input_failure;
+ if (*fp->_p != c)
+ goto match_failure;
+ fp->_r--, fp->_p++;
+ scan_data.nread++;
+ continue;
+
+ case 'p':
+ scan_data.flags |= POINTER;
+ case 'x':
+ case 'X':
+ scan_data.flags |= PFXOK;
+ scan_data.base = 16;
+ goto number;
+ case 'd':
+ case 'u':
+ scan_data.base = 10;
+ goto number;
+ case 'i':
+ scan_data.base = 0;
+ goto number;
+ case 'o':
+ scan_data.base = 8;
+ number:
+ scan_data.code = (c < 'o') ? CT_INT : CT_UINT;
+ break;
+
+ case '[':
+ fmt = (u_char *) __sccl (ccltab, (unsigned char *) fmt);
+ scan_data.flags |= NOSKIP;
+ scan_data.code = CT_CCL;
+ break;
+ case 'c':
+ scan_data.flags |= NOSKIP;
+ scan_data.code = CT_CHAR;
+ break;
+ case 's':
+ scan_data.code = CT_STRING;
+ break;
+
+ case 'n':
+ if (scan_data.flags & SUPPRESS) /* ??? */
+ continue;
+
+ if (scan_data.flags & SHORT)
+ *GET_ARG (N, ap, short *) = scan_data.nread;
+ else if (scan_data.flags & LONG)
+ *GET_ARG (N, ap, long *) = scan_data.nread;
+ else
+ *GET_ARG (N, ap, int *) = scan_data.nread;
+
+ continue;
+
+ /* Disgusting backwards compatibility hacks. XXX. */
+ case '\0': /* compat. */
+ _newlib_flockfile_exit (fp);
+ return EOF;
+
+#ifdef FLOATING_POINT
+ case 'e': case 'E':
+ case 'f': case 'F':
+ case 'g': case 'G':
+ scan_data.code = CT_FLOAT;
+ break;
+#endif
+ default: /* compat. */
+ scan_data.code = CT_INT;
+ scan_data.base = 10;
+ break;
+ }
+
+ /* We have a conversion that requires input. */
+ if ((fp->_r <= 0 && scan_data.pfn_refill (rptr, fp)))
+ goto input_failure;
+
+ /* Consume leading white space, except for formats that
+ suppress this. */
+ if ((scan_data.flags & NOSKIP) == 0)
+ {
+ while (isspace (*fp->_p))
+ {
+ scan_data.nread++;
+ if (--fp->_r > 0)
+ fp->_p++;
+ else if (scan_data.pfn_refill (rptr, fp))
+ goto input_failure;
+ }
+ /* Note that there is at least one character in the
+ buffer, so conversions that do not set NOSKIP ca
+ no longer result in an input failure. */
+ }
+ ret = 0;
+ if (scan_data.code < CT_INT)
+ ret = _scanf_chars (rptr, &scan_data, fp, &ap);
+ else if (scan_data.code < CT_FLOAT)
+ ret = _scanf_i (rptr, &scan_data, fp, &ap);
+#ifdef FLOATING_POINT
+ else if (_scanf_float)
+ ret = _scanf_float (rptr, &scan_data, fp, &ap);
+#endif
+
+ if (ret == MATCH_FAILURE)
+ goto match_failure;
+ else if (ret == INPUT_FAILURE)
+ goto input_failure;
+ }
+input_failure:
+ /* On read failure, return EOF failure regardless of matches; errno
+ should have been set prior to here. On EOF failure (including
+ invalid format string), return EOF if no matches yet, else number
+ of matches made prior to failure. */
+ _newlib_flockfile_exit (fp);
+ return scan_data.nassigned && !(fp->_flags & __SERR) ? scan_data.nassigned
+ : EOF;
+match_failure:
+all_done:
+ /* Return number of matches, which can be 0 on match failure. */
+ _newlib_flockfile_end (fp);
+ return scan_data.nassigned;
+}
+
+#ifdef STRING_ONLY
+int
+_EXFUN(__ssvfiscanf_r, (struct _reent *, FILE *, const char *, __VALIST)
+ _ATTRIBUTE ((__alias__("__ssvfscanf_r"))));
+#else
+int
+_EXFUN(__svfiscanf_r, (struct _reent *, FILE *, const char *, __VALIST)
+ _ATTRIBUTE ((__alias__("__svfscanf_r"))));
+#endif
+
diff --git a/newlib/libc/stdio/nano-vfscanf_float.c b/newlib/libc/stdio/nano-vfscanf_float.c
new file mode 100644
index 000000000..a81fe7f70
--- /dev/null
+++ b/newlib/libc/stdio/nano-vfscanf_float.c
@@ -0,0 +1,342 @@
+/*-
+ * Copyright (c) 1990 The Regents of the University of California.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms are permitted
+ * provided that the above copyright notice and this paragraph are
+ * duplicated in all such forms and that any documentation,
+ * advertising materials, and other materials related to such
+ * distribution and use acknowledge that the software was developed
+ * by the University of California, Berkeley. The name of the
+ * University may not 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 <_ansi.h>
+#include <reent.h>
+#include <newlib.h>
+#include <ctype.h>
+#include <wctype.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <stdint.h>
+#include <limits.h>
+#include <wchar.h>
+#include <string.h>
+#include <stdarg.h>
+#include <errno.h>
+#include "local.h"
+#include "../stdlib/local.h"
+#include "nano-vfscanf_local.h"
+
+#ifdef FLOATING_POINT
+int
+_scanf_float (struct _reent *rptr,
+ struct _scan_data_t *pdata,
+ FILE *fp, va_list *ap)
+{
+ int c;
+ char *p;
+ float *flp;
+ _LONG_DOUBLE *ldp;
+
+ /* Scan a floating point number as if by strtod. */
+ /* This code used to assume that the number of digits is reasonable.
+ However, ANSI / ISO C makes no such stipulation; we have to get
+ exact results even when there is an unreasonable amount of leading
+ zeroes. */
+ long leading_zeroes = 0;
+ long zeroes, exp_adjust;
+ char *exp_start = NULL;
+ unsigned width_left = 0;
+ char nancount = 0;
+ char infcount = 0;
+#ifdef hardway
+ if (pdata->width == 0 || pdata->width > BUF - 1)
+#else
+ /* size_t is unsigned, hence this optimisation. */
+ if (pdata->width - 1 > BUF - 2)
+#endif
+ {
+ width_left = pdata->width - (BUF - 1);
+ pdata->width = BUF - 1;
+ }
+ pdata->flags |= SIGNOK | NDIGITS | DPTOK | EXPOK;
+ zeroes = 0;
+ exp_adjust = 0;
+ for (p = pdata->buf; pdata->width; )
+ {
+ c = *fp->_p;
+ /* This code mimicks the integer conversion code,
+ but is much simpler. */
+ switch (c)
+ {
+ case '0':
+ if (pdata->flags & NDIGITS)
+ {
+ pdata->flags &= ~SIGNOK;
+ zeroes++;
+ if (width_left)
+ {
+ width_left--;
+ pdata->width++;
+ }
+ goto fskip;
+ }
+ /* Fall through. */
+ case '1':
+ case '2':
+ case '3':
+ case '4':
+ case '5':
+ case '6':
+ case '7':
+ case '8':
+ case '9':
+ if (nancount + infcount == 0)
+ {
+ pdata->flags &= ~(SIGNOK | NDIGITS);
+ goto fok;
+ }
+ break;
+
+ case '+':
+ case '-':
+ if (pdata->flags & SIGNOK)
+ {
+ pdata->flags &= ~SIGNOK;
+ goto fok;
+ }
+ break;
+ case 'n':
+ case 'N':
+ if (nancount == 0 && zeroes == 0
+ && (pdata->flags & (NDIGITS | DPTOK | EXPOK)) ==
+ (NDIGITS | DPTOK | EXPOK))
+ {
+ pdata->flags &= ~(SIGNOK | DPTOK | EXPOK | NDIGITS);
+ nancount = 1;
+ goto fok;
+ }
+ if (nancount == 2)
+ {
+ nancount = 3;
+ goto fok;
+ }
+ if (infcount == 1 || infcount == 4)
+ {
+ infcount++;
+ goto fok;
+ }
+ break;
+ case 'a':
+ case 'A':
+ if (nancount == 1)
+ {
+ nancount = 2;
+ goto fok;
+ }
+ break;
+ case 'i':
+ case 'I':
+ if (infcount == 0 && zeroes == 0
+ && (pdata->flags & (NDIGITS | DPTOK | EXPOK)) ==
+ (NDIGITS | DPTOK | EXPOK))
+ {
+ pdata->flags &= ~(SIGNOK | DPTOK | EXPOK | NDIGITS);
+ infcount = 1;
+ goto fok;
+ }
+ if (infcount == 3 || infcount == 5)
+ {
+ infcount++;
+ goto fok;
+ }
+ break;
+ case 'f':
+ case 'F':
+ if (infcount == 2)
+ {
+ infcount = 3;
+ goto fok;
+ }
+ break;
+ case 't':
+ case 'T':
+ if (infcount == 6)
+ {
+ infcount = 7;
+ goto fok;
+ }
+ break;
+ case 'y':
+ case 'Y':
+ if (infcount == 7)
+ {
+ infcount = 8;
+ goto fok;
+ }
+ break;
+ case '.':
+ if (pdata->flags & DPTOK)
+ {
+ pdata->flags &= ~(SIGNOK | DPTOK);
+ leading_zeroes = zeroes;
+ goto fok;
+ }
+ break;
+ case 'e':
+ case 'E':
+ /* No exponent without some digits. */
+ if ((pdata->flags & (NDIGITS | EXPOK)) == EXPOK
+ || ((pdata->flags & EXPOK) && zeroes))
+ {
+ if (! (pdata->flags & DPTOK))
+ {
+ exp_adjust = zeroes - leading_zeroes;
+ exp_start = p;
+ }
+ pdata->flags =
+ (pdata->flags & ~(EXPOK | DPTOK)) | SIGNOK | NDIGITS;
+ zeroes = 0;
+ goto fok;
+ }
+ break;
+ }
+ break;
+fok:
+ *p++ = c;
+fskip:
+ pdata->width--;
+ ++pdata->nread;
+ if (--fp->_r > 0)
+ fp->_p++;
+ else if (pdata->pfn_refill (rptr, fp))
+ /* "EOF". */
+ break;
+ }
+ if (zeroes)
+ pdata->flags &= ~NDIGITS;
+ /* We may have a 'N' or possibly even [sign] 'N' 'a' as the
+ start of 'NaN', only to run out of chars before it was
+ complete (or having encountered a non-matching char). So
+ check here if we have an outstanding nancount, and if so
+ put back the chars we did swallow and treat as a failed
+ match.
+
+ FIXME - we still don't handle NAN([0xdigits]). */
+ if (nancount - 1U < 2U)
+ {
+ /* "nancount && nancount < 3". */
+ /* Newlib's ungetc works even if we called __srefill in
+ the middle of a partial parse, but POSIX does not
+ guarantee that in all implementations of ungetc. */
+ while (p > pdata->buf)
+ {
+ pdata->pfn_ungetc (rptr, *--p, fp); /* "[-+nNaA]". */
+ --pdata->nread;
+ }
+ return MATCH_FAILURE;
+ }
+ /* Likewise for 'inf' and 'infinity'. But be careful that
+ 'infinite' consumes only 3 characters, leaving the stream
+ at the second 'i'. */
+ if (infcount - 1U < 7U)
+ {
+ /* "infcount && infcount < 8". */
+ if (infcount >= 3) /* valid 'inf', but short of 'infinity'. */
+ while (infcount-- > 3)
+ {
+ pdata->pfn_ungetc (rptr, *--p, fp); /* "[iInNtT]". */
+ --pdata->nread;
+ }
+ else
+ {
+ while (p > pdata->buf)
+ {
+ pdata->pfn_ungetc (rptr, *--p, fp); /* "[-+iInN]". */
+ --pdata->nread;
+ }
+ return MATCH_FAILURE;
+ }
+ }
+ /* If no digits, might be missing exponent digits
+ (just give back the exponent) or might be missing
+ regular digits, but had sign and/or decimal point. */
+ if (pdata->flags & NDIGITS)
+ {
+ if (pdata->flags & EXPOK)
+ {
+ /* No digits at all. */
+ while (p > pdata->buf)
+ {
+ pdata->pfn_ungetc (rptr, *--p, fp); /* "[-+.]". */
+ --pdata->nread;
+ }
+ return MATCH_FAILURE;
+ }
+ /* Just a bad exponent (e and maybe sign). */
+ c = *--p;
+ --pdata->nread;
+ if (c != 'e' && c != 'E')
+ {
+ pdata->pfn_ungetc (rptr, c, fp); /* "[-+]". */
+ c = *--p;
+ --pdata->nread;
+ }
+ pdata->pfn_ungetc (rptr, c, fp); /* "[eE]". */
+ }
+ if ((pdata->flags & SUPPRESS) == 0)
+ {
+ double fp;
+ long new_exp = 0;
+
+ *p = 0;
+ if ((pdata->flags & (DPTOK | EXPOK)) == EXPOK)
+ {
+ exp_adjust = zeroes - leading_zeroes;
+ new_exp = -exp_adjust;
+ exp_start = p;
+ }
+ else if (exp_adjust)
+ new_exp = _strtol_r (rptr, (exp_start + 1), NULL, 10) - exp_adjust;
+
+ if (exp_adjust)
+ {
+ /* If there might not be enough space for the new exponent,
+ truncate some trailing digits to make room. */
+ if (exp_start >= pdata->buf + BUF - MAX_LONG_LEN)
+ exp_start = pdata->buf + BUF - MAX_LONG_LEN - 1;
+ sprintf (exp_start, "e%ld", new_exp);
+ }
+
+ /* Current _strtold routine is markedly slower than
+ _strtod_r. Only use it if we have a long double
+ result. */
+ fp = _strtod_r (rptr, pdata->buf, NULL);
+
+ /* Do not support long double. */
+ if (pdata->flags & LONG)
+ *GET_ARG (N, *ap, double *) = fp;
+ else if (pdata->flags & LONGDBL)
+ {
+ ldp = GET_ARG (N, *ap, _LONG_DOUBLE *);
+ *ldp = fp;
+ }
+ else
+ {
+ flp = GET_ARG (N, *ap, float *);
+ if (isnan (fp))
+ *flp = nanf (NULL);
+ else
+ *flp = fp;
+ }
+ pdata->nassigned++;
+ }
+ return 0;
+}
+#endif
+
diff --git a/newlib/libc/stdio/nano-vfscanf_i.c b/newlib/libc/stdio/nano-vfscanf_i.c
new file mode 100644
index 000000000..aba74b0d8
--- /dev/null
+++ b/newlib/libc/stdio/nano-vfscanf_i.c
@@ -0,0 +1,232 @@
+/*
+ * Copyright (c) 2012-2014 ARM Ltd
+ * 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. The name of the company may not be used to endorse or promote
+ * products derived from this software without specific prior written
+ * permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ARM LTD ``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 ARM LTD 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 <reent.h>
+#include <newlib.h>
+#include <ctype.h>
+#include <wctype.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <stdint.h>
+#include <limits.h>
+#include <wchar.h>
+#include <string.h>
+#include <stdarg.h>
+#include <errno.h>
+#include "local.h"
+#include "../stdlib/local.h"
+
+#include "nano-vfscanf_local.h"
+
+int
+_scanf_chars (struct _reent *rptr,
+ struct _scan_data_t *pdata,
+ FILE *fp, va_list *ap)
+{
+ int n;
+ char *p;
+
+ if (pdata->width == 0)
+ pdata->width = (pdata->code == CT_CHAR) ? 1 : (size_t)~0;
+
+ n = 0;
+ if ((pdata->flags & SUPPRESS) == 0)
+ p = GET_ARG (N, *ap, char *);
+
+ /* It's impossible to have EOF when we get here. */
+ while ((pdata->code == CT_CHAR)
+ || (pdata->code == CT_CCL && pdata->ccltab[*fp->_p])
+ || (pdata->code == CT_STRING && !isspace (*fp->_p)))
+ {
+ n++;
+ if ((pdata->flags & SUPPRESS) == 0)
+ *p++ = *fp->_p;
+
+ fp->_r--, fp->_p++;
+ if (--pdata->width == 0)
+ break;
+
+ if ((fp->_r <= 0 && pdata->pfn_refill (rptr, fp)))
+ break;
+ }
+ /* For CT_CHAR, it is impossible to have input_failure(n == 0) here.
+ For CT_CCL, it is impossible to have input_failure here.
+ For CT_STRING, it is possible to have empty string. */
+ if (n == 0 && pdata->code == CT_CCL)
+ return MATCH_FAILURE;
+
+ if ((pdata->flags & SUPPRESS) == 0)
+ {
+ pdata->nassigned++;
+ if (pdata->code != CT_CHAR)
+ *p = 0;
+ }
+ pdata->nread += n;
+ return 0;
+}
+int
+_scanf_i (struct _reent *rptr,
+ struct _scan_data_t *pdata,
+ FILE *fp, va_list *ap)
+{
+#define CCFN_PARAMS _PARAMS((struct _reent *, const char *, char **, int))
+ /* Conversion function (strtol/strtoul). */
+ u_long (*ccfn)CCFN_PARAMS=0;
+ char *p;
+ int n;
+ char *xdigits = "A-Fa-f8901234567]";
+ char *prefix_chars[3] = {"+-", "00", "xX"};
+
+ /* Scan an integer as if by strtol/strtoul. */
+ unsigned width_left = 0;
+ int skips = 0;
+
+ ccfn = (pdata->code == CT_INT) ? (u_long (*)CCFN_PARAMS)_strtol_r : _strtoul_r;
+#ifdef hardway
+ if (pdata->width == 0 || pdata->width > BUF - 1)
+#else
+ /* size_t is unsigned, hence this optimisation. */
+ if (pdata->width - 1 > BUF - 2)
+#endif
+ {
+ width_left = pdata->width - (BUF - 1);
+ pdata->width = BUF - 1;
+ }
+ p = pdata->buf;
+ pdata->flags |= NDIGITS | NZDIGITS | NNZDIGITS;
+
+ /* Process [sign] [0] [xX] prefixes sequently. */
+ for (n = 0; n < 3; n++)
+ {
+ if (!memchr (prefix_chars[n], *fp->_p, 2))
+ continue;
+
+ if (n == 1)
+ {
+ if (pdata->base == 0)
+ {
+ pdata->base = 8;
+ pdata->flags |= PFXOK;
+ }
+ pdata->flags &= ~(NZDIGITS | NDIGITS);
+ }
+ else if (n == 2)
+ {
+ if ((pdata->flags & (PFXOK | NZDIGITS)) != PFXOK)
+ continue;
+ pdata->base = 16;
+
+ /* We must reset the NZDIGITS and NDIGITS
+ flags that would have been unset by seeing
+ the zero that preceded the X or x.
+
+ ??? It seems unnecessary to reset the NZDIGITS. */
+ pdata->flags |= NDIGITS;
+ }
+ if (pdata->width-- > 0)
+ {
+ *p++ = *fp->_p++;
+ fp->_r--;
+ if ((fp->_r <= 0 && pdata->pfn_refill (rptr, fp)))
+ goto match_end;
+ }
+ }
+
+ if (pdata->base == 0)
+ pdata->base = 10;
+
+ /* The check is un-necessary if xdigits points to exactly the string:
+ "A-Fa-f8901234567]". The code is kept only for reading's sake. */
+#if 0
+ if (pdata->base != 16)
+#endif
+ xdigits = xdigits + 16 - pdata->base;
+
+ /* Initilize ccltab according to pdata->base. */
+ __sccl (pdata->ccltab, (unsigned char *) xdigits);
+ for (; pdata->width; pdata->width--)
+ {
+ n = *fp->_p;
+ if (pdata->ccltab[n] == 0)
+ break;
+ else if (n == '0' && (pdata->flags & NNZDIGITS))
+ {
+ ++skips;
+ if (width_left)
+ {
+ width_left--;
+ pdata->width++;
+ }
+ goto skip;
+ }
+ pdata->flags &= ~(NDIGITS | NNZDIGITS);
+ /* Char is legal: store it and look at the next. */
+ *p++ = *fp->_p;
+skip:
+ if (--fp->_r > 0)
+ fp->_p++;
+ else if (pdata->pfn_refill (rptr, fp))
+ /* "EOF". */
+ break;
+ }
+ /* If we had only a sign, it is no good; push back the sign.
+ If the number ends in `x', it was [sign] '0' 'x', so push back
+ the x and treat it as [sign] '0'.
+ Use of ungetc here and below assumes ASCII encoding; we are only
+ pushing back 7-bit characters, so casting to unsigned char is
+ not necessary. */
+match_end:
+ if (pdata->flags & NDIGITS)
+ {
+ if (p > pdata->buf)
+ pdata->pfn_ungetc (rptr, *--p, fp); /* "[-+xX]". */
+
+ if (p == pdata->buf)
+ return MATCH_FAILURE;
+ }
+ if ((pdata->flags & SUPPRESS) == 0)
+ {
+ u_long ul;
+ *p = 0;
+ ul = (*ccfn) (rptr, pdata->buf, (char **) NULL, pdata->base);
+ if (pdata->flags & POINTER)
+ *GET_ARG (N, *ap, void **) = (void *) (uintptr_t) ul;
+ else if (pdata->flags & SHORT)
+ *GET_ARG (N, *ap, short *) = ul;
+ else if (pdata->flags & LONG)
+ *GET_ARG (N, *ap, long *) = ul;
+ else
+ *GET_ARG (N, *ap, int *) = ul;
+
+ pdata->nassigned++;
+ }
+ pdata->nread += p - pdata->buf + skips;
+ return 0;
+}
+
diff --git a/newlib/libc/stdio/nano-vfscanf_local.h b/newlib/libc/stdio/nano-vfscanf_local.h
new file mode 100644
index 000000000..7fbd964ed
--- /dev/null
+++ b/newlib/libc/stdio/nano-vfscanf_local.h
@@ -0,0 +1,178 @@
+/*-
+ * Copyright (c) 1990 The Regents of the University of California.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms are permitted
+ * provided that the above copyright notice and this paragraph are
+ * duplicated in all such forms and that any documentation,
+ * advertising materials, and other materials related to such
+ * distribution and use acknowledge that the software was developed
+ * by the University of California, Berkeley. The name of the
+ * University may not 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.
+ */
+
+/*
+ * Copyright (c) 2012-2014 ARM Ltd
+ * 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. The name of the company may not be used to endorse or promote
+ * products derived from this software without specific prior written
+ * permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ARM LTD ``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 ARM LTD 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.
+ */
+
+#ifndef VFSCANF_LOCAL
+#define VFSCANF_LOCAL
+
+#ifndef NO_FLOATING_POINT
+#define FLOATING_POINT
+#endif
+
+#ifdef STRING_ONLY
+#undef _newlib_flockfile_start
+#undef _newlib_flockfile_exit
+#undef _newlib_flockfile_end
+#define _newlib_flockfile_start(x) {}
+#define _newlib_flockfile_exit(x) {}
+#define _newlib_flockfile_end(x) {}
+#define _ungetc_r _sungetc_r
+#define __srefill_r __ssrefill_r
+#endif
+
+#ifdef FLOATING_POINT
+#include <math.h>
+#include <float.h>
+
+/* Currently a test is made to see if long double processing is warranted.
+ This could be changed in the future should the _ldtoa_r code be
+ preferred over _dtoa_r. */
+#define _NO_LONGDBL
+
+#include "floatio.h"
+
+#if ((MAXEXP+MAXFRACT+3) > MB_LEN_MAX)
+/* "3 = sign + decimal point + NUL". */
+# define BUF (MAXEXP+MAXFRACT+3)
+#else
+# define BUF MB_LEN_MAX
+#endif
+
+/* An upper bound for how long a long prints in decimal. 4 / 13 approximates
+ log (2). Add one char for roundoff compensation and one for the sign. */
+#define MAX_LONG_LEN ((CHAR_BIT * sizeof (long) - 1) * 4 / 13 + 2)
+#else
+#define BUF 40
+#endif
+
+
+#define _NO_LONGLONG
+#undef _WANT_IO_C99_FORMATS
+#undef _WANT_IO_POS_ARGS
+
+#define _NO_POS_ARGS
+
+/* Macros for converting digits to letters and vice versa. */
+#define to_digit(c) ((c) - '0')
+#define is_digit(c) ((unsigned)to_digit (c) <= 9)
+#define to_char(n) ((n) + '0')
+
+/*
+ * Flags used during conversion.
+ */
+
+#define SHORT 0x01 /* "h": short. */
+#define LONG 0x02 /* "l": long or double. */
+#define LONGDBL 0x04 /* "L/ll": long double or long long. */
+#define CHAR 0x08 /* "hh": 8 bit integer. */
+#define SUPPRESS 0x10 /* Suppress assignment. */
+#define POINTER 0x20 /* Weird %p pointer (`fake hex'). */
+#define NOSKIP 0x40 /* Do not skip blanks */
+
+/* The following are used in numeric conversions only:
+ SIGNOK, NDIGITS, DPTOK, and EXPOK are for floating point;
+ SIGNOK, NDIGITS, PFXOK, and NZDIGITS are for integral. */
+
+#define SIGNOK 0x80 /* "+/-" is (still) legal. */
+#define NDIGITS 0x100 /* No digits detected. */
+
+#define DPTOK 0x200 /* (Float) decimal point is still legal. */
+#define EXPOK 0x400 /* (Float) exponent (e+3, etc) still legal. */
+
+#define PFXOK 0x200 /* "0x" prefix is (still) legal. */
+#define NZDIGITS 0x400 /* No zero digits detected. */
+#define NNZDIGITS 0x800 /* No non-zero digits detected. */
+
+/* Conversion types. */
+
+#define CT_CHAR 0 /* "%c" conversion. */
+#define CT_CCL 1 /* "%[...]" conversion. */
+#define CT_STRING 2 /* "%s" conversion. */
+#define CT_INT 3 /* Integer, i.e., strtol. */
+#define CT_UINT 4 /* Unsigned integer, i.e., strtoul. */
+#define CT_FLOAT 5 /* Floating, i.e., strtod. */
+
+#define u_char unsigned char
+#define u_long unsigned long
+
+/* Macro to support positional arguments. */
+#define GET_ARG(n, ap, type) (va_arg ((ap), type))
+
+#define MATCH_FAILURE 1
+#define INPUT_FAILURE 2
+
+
+/* All data needed to decode format string are kept in below struct. */
+struct _scan_data_t
+{
+ int flags; /* Flags. */
+ int base; /* Base. */
+ size_t width; /* Width. */
+ int nassigned; /* Number of assignments so far. */
+ int nread; /* Number of chars read so far. */
+ char *ccltab; /* Table used for [ format. */
+ int code; /* Current conversion specifier. */
+ char buf[BUF]; /* Internal buffer for scan. */
+ /* Internal buffer for scan. */
+ int (*pfn_ungetc)(struct _reent*, int, FILE*);
+ /* Internal buffer for scan. */
+ int (*pfn_refill)(struct _reent*, FILE*);
+};
+
+extern int
+_scanf_chars (struct _reent *rptr,
+ struct _scan_data_t *pdata,
+ FILE *fp, va_list *ap);
+extern int
+_scanf_i (struct _reent *rptr,
+ struct _scan_data_t *pdata,
+ FILE *fp, va_list *ap);
+/* Make _scanf_float weak symbol, so it won't be linked in if target program
+ does not need it. */
+extern int
+_scanf_float (struct _reent *rptr,
+ struct _scan_data_t *pdata,
+ FILE *fp, va_list *ap) _ATTRIBUTE((__weak__));
+
+#endif
diff --git a/newlib/libc/stdio/open_memstream.c b/newlib/libc/stdio/open_memstream.c
index 0b58720a1..5de99474d 100644
--- a/newlib/libc/stdio/open_memstream.c
+++ b/newlib/libc/stdio/open_memstream.c
@@ -97,7 +97,7 @@ _DEFUN(memwriter, (ptr, cookie, buf, n),
struct _reent *ptr _AND
void *cookie _AND
const char *buf _AND
- int n)
+ _READ_WRITE_BUFSIZE_TYPE n)
{
memstream *c = (memstream *) cookie;
char *cbuf = *c->pbuf;
@@ -355,6 +355,7 @@ _DEFUN(internal_open_memstream_r, (ptr, buf, size, wide),
c->storage = c;
c->pbuf = buf;
c->psize = size;
+ c->pos = 0;
c->eof = 0;
c->saved.w = L'\0';
c->wide = (int8_t) wide;
diff --git a/newlib/libc/stdio/printf.c b/newlib/libc/stdio/printf.c
index 998b6b45b..d5dedf906 100644
--- a/newlib/libc/stdio/printf.c
+++ b/newlib/libc/stdio/printf.c
@@ -25,7 +25,7 @@
int
_DEFUN(_printf_r, (ptr, fmt),
struct _reent *ptr _AND
- const char *fmt _DOTS)
+ const char *__restrict fmt _DOTS)
{
int ret;
va_list ap;
@@ -37,11 +37,17 @@ _DEFUN(_printf_r, (ptr, fmt),
return ret;
}
+#ifdef _NANO_FORMATTED_IO
+int
+_EXFUN(_iprintf_r, (struct _reent *, const char *, ...)
+ _ATTRIBUTE ((__alias__("_printf_r"))));
+#endif
+
#ifndef _REENT_ONLY
int
_DEFUN(printf, (fmt),
- const char *fmt _DOTS)
+ const char *__restrict fmt _DOTS)
{
int ret;
va_list ap;
@@ -54,4 +60,9 @@ _DEFUN(printf, (fmt),
return ret;
}
+#ifdef _NANO_FORMATTED_IO
+int
+_EXFUN(iprintf, (const char *, ...)
+ _ATTRIBUTE ((__alias__("printf"))));
+#endif
#endif /* ! _REENT_ONLY */
diff --git a/newlib/libc/stdio/puts.c b/newlib/libc/stdio/puts.c
index 4c60aaa4c..74673715f 100644
--- a/newlib/libc/stdio/puts.c
+++ b/newlib/libc/stdio/puts.c
@@ -95,6 +95,7 @@ _DEFUN(_puts_r, (ptr, s),
_REENT_SMALL_CHECK_INIT (ptr);
fp = _stdout_r (ptr);
+ CHECK_INIT (ptr, fp);
_newlib_flockfile_start (fp);
ORIENT (fp, -1);
result = (__sfvwrite_r (ptr, fp, &uio) ? EOF : '\n');
@@ -107,6 +108,7 @@ _DEFUN(_puts_r, (ptr, s),
_REENT_SMALL_CHECK_INIT (ptr);
fp = _stdout_r (ptr);
+ CHECK_INIT (ptr, fp);
_newlib_flockfile_start (fp);
ORIENT (fp, -1);
/* Make sure we can write. */
diff --git a/newlib/libc/stdio/putwc_u.c b/newlib/libc/stdio/putwc_u.c
new file mode 100644
index 000000000..bb71acc2a
--- /dev/null
+++ b/newlib/libc/stdio/putwc_u.c
@@ -0,0 +1,54 @@
+/*-
+ * Copyright (c) 2014 Red Hat, Inc.
+ * 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.
+ */
+
+#define _GNU_SOURCE
+#include <_ansi.h>
+#include <reent.h>
+#include <stdio.h>
+#include <wchar.h>
+#include "local.h"
+
+#undef putwc_unlocked
+
+wint_t
+_DEFUN(_putwc_unlocked_r, (ptr, wc, fp),
+ struct _reent *ptr _AND
+ wchar_t wc _AND
+ FILE *fp)
+{
+ return _fputwc_unlocked_r (ptr, wc, fp);
+}
+/*
+ * Synonym for fputwc_unlocked(). The only difference is that putwc_unlocked(),
+ * if it is a macro, may evaluate `fp' more than once.
+ */
+wint_t
+_DEFUN(putwc_unlocked, (wc, fp),
+ wchar_t wc _AND
+ FILE *fp)
+{
+ return fputwc_unlocked (wc, fp);
+}
diff --git a/newlib/libc/stdio/putwchar.c b/newlib/libc/stdio/putwchar.c
index fcb0a7dba..cdd254217 100644
--- a/newlib/libc/stdio/putwchar.c
+++ b/newlib/libc/stdio/putwchar.c
@@ -26,34 +26,65 @@
/*
FUNCTION
-<<putwchar>>---write a wide character to standard output
+<<putwchar>>, <<putwchar_unlocked>>---write a wide character to standard output
INDEX
putwchar
INDEX
+ putwchar_unlocked
+INDEX
_putwchar_r
+INDEX
+ _putwchar_unlocked_r
ANSI_SYNOPSIS
#include <wchar.h>
wint_t putwchar(wchar_t <[wc]>);
+ #include <wchar.h>
+ wint_t putwchar_unlocked(wchar_t <[wc]>);
+
+ #include <wchar.h>
wint_t _putwchar_r(struct _reent *<[reent]>, wchar_t <[wc]>);
+ #include <wchar.h>
+ wint_t _putwchar_unlocked_r(struct _reent *<[reent]>, wchar_t <[wc]>);
+
TRAD_SYNOPSIS
#include <wchar.h>
wint_t putwchar(<[wc]>)
wchar_t <[wc]>;
+ #include <wchar.h>
+ wint_t putwchar_unlocked(<[wc]>)
+ wchar_t <[wc]>;
+
+ #include <wchar.h>
wint_t _putwchar_r(<[reent]>, <[wc]>)
struct _reent *<[reent]>;
wchar_t <[wc]>;
+ #include <wchar.h>
+ wint_t _putwchar_unlocked_r(<[reent]>, <[wc]>)
+ struct _reent *<[reent]>;
+ wchar_t <[wc]>;
+
DESCRIPTION
The <<putwchar>> function or macro is the wide-character equivalent of
the <<putchar>> function. It writes the wide character wc to stdout.
-The alternate function <<_putwchar_r>> is a reentrant version. The
-extra argument <[reent]> is a pointer to a reentrancy structure.
+<<putwchar_unlocked>> is a non-thread-safe version of <<putwchar>>.
+<<putwchar_unlocked>> may only safely be used within a scope
+protected by flockfile() (or ftrylockfile()) and funlockfile(). This
+function may safely be used in a multi-threaded program if and only
+if they are called while the invoking thread owns the (FILE *)
+object, as is the case after a successful call to the flockfile() or
+ftrylockfile() functions. If threads are disabled, then
+<<putwchar_unlocked>> is equivalent to <<putwchar>>.
+
+The alternate functions <<_putwchar_r>> and <<_putwchar_unlocked_r>> are
+reentrant versions of the above. The extra argument <[reent]> is a pointer
+to a reentrancy structure.
RETURNS
If successful, <<putwchar>> returns its argument <[wc]>. If an error
@@ -61,7 +92,9 @@ intervenes, the result is <<EOF>>. You can use `<<ferror(stdin)>>' to
query for errors.
PORTABILITY
-C99
+<<putwchar>> is required by C99.
+
+<<putwchar_unlocked>> is a GNU extension.
*/
#include <_ansi.h>
diff --git a/newlib/libc/stdio/putwchar_u.c b/newlib/libc/stdio/putwchar_u.c
new file mode 100644
index 000000000..3235472a2
--- /dev/null
+++ b/newlib/libc/stdio/putwchar_u.c
@@ -0,0 +1,53 @@
+/*
+ * Copyright (c) 2014 Red Hat, Inc.
+ * 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.
+ */
+
+#define _GNU_SOURCE
+#include <_ansi.h>
+#include <reent.h>
+#include <stdio.h>
+#include <wchar.h>
+#include "local.h"
+
+#undef putwchar_unlocked
+
+wint_t
+_DEFUN(_putwchar_unlocked_r, (ptr, wc),
+ struct _reent *ptr _AND
+ wchar_t wc)
+{
+ return _fputwc_unlocked_r (ptr, wc, stdout);
+}
+
+/*
+ * Synonym for fputwc_unlocked(wc, stdout).
+ */
+wint_t
+_DEFUN(putwchar_unlocked, (wc),
+ wchar_t wc)
+{
+ _REENT_SMALL_CHECK_INIT (_REENT);
+ return fputwc_unlocked (wc, stdout);
+}
diff --git a/newlib/libc/stdio/scanf.c b/newlib/libc/stdio/scanf.c
index 19c85be4f..23e97b83d 100644
--- a/newlib/libc/stdio/scanf.c
+++ b/newlib/libc/stdio/scanf.c
@@ -29,7 +29,7 @@
int
#ifdef _HAVE_STDC
-scanf(_CONST char *fmt, ...)
+scanf(_CONST char *__restrict fmt, ...)
#else
scanf(fmt, va_alist)
char *fmt;
@@ -51,11 +51,17 @@ scanf(fmt, va_alist)
return ret;
}
+#ifdef _NANO_FORMATTED_IO
+int
+_EXFUN(iscanf, (const char *, ...)
+ _ATTRIBUTE ((__alias__("scanf"))));
+#endif
+
#endif /* !_REENT_ONLY */
int
#ifdef _HAVE_STDC
-_scanf_r(struct _reent *ptr, _CONST char *fmt, ...)
+_scanf_r(struct _reent *ptr, _CONST char *__restrict fmt, ...)
#else
_scanf_r(ptr, fmt, va_alist)
struct _reent *ptr;
@@ -77,3 +83,8 @@ _scanf_r(ptr, fmt, va_alist)
return (ret);
}
+#ifdef _NANO_FORMATTED_IO
+int
+_EXFUN(_iscanf_r, (struct _reent *, const char *, ...)
+ _ATTRIBUTE ((__alias__("_scanf_r"))));
+#endif
diff --git a/newlib/libc/stdio/setbuf.c b/newlib/libc/stdio/setbuf.c
index 1a8bc6de1..cffb6fbf4 100644
--- a/newlib/libc/stdio/setbuf.c
+++ b/newlib/libc/stdio/setbuf.c
@@ -72,8 +72,8 @@ Supporting OS subroutines required: <<close>>, <<fstat>>, <<isatty>>,
_VOID
_DEFUN(setbuf, (fp, buf),
- FILE * fp _AND
- char *buf)
+ FILE *__restrict fp _AND
+ char *__restrict buf)
{
_CAST_VOID setvbuf (fp, buf, buf ? _IOFBF : _IONBF, BUFSIZ);
}
diff --git a/newlib/libc/stdio/setvbuf.c b/newlib/libc/stdio/setvbuf.c
index 41bdff6b6..a8e46a5d0 100644
--- a/newlib/libc/stdio/setvbuf.c
+++ b/newlib/libc/stdio/setvbuf.c
@@ -104,21 +104,20 @@ _DEFUN(setvbuf, (fp, buf, mode, size),
{
int ret = 0;
struct _reent *reent = _REENT;
+ size_t iosize;
+ int ttyflag;
CHECK_INIT (reent, fp);
- _newlib_flockfile_start (fp);
-
/*
* Verify arguments. The `int' limit on `size' is due to this
- * particular implementation.
+ * particular implementation. Note, buf and size are ignored
+ * when setting _IONBF.
*/
-
- if ((mode != _IOFBF && mode != _IOLBF && mode != _IONBF) || (int)(_POINTER_INT) size < 0)
- {
- _newlib_flockfile_exit (fp);
+ if (mode != _IONBF)
+ if ((mode != _IOFBF && mode != _IOLBF) || (int)(_POINTER_INT) size < 0)
return (EOF);
- }
+
/*
* Write current buffer, if any; drop read count, if any.
@@ -126,34 +125,49 @@ _DEFUN(setvbuf, (fp, buf, mode, size),
* Free old buffer if it was from malloc(). Clear line and
* non buffer flags, and clear malloc flag.
*/
-
+ _newlib_flockfile_start (fp);
_fflush_r (reent, fp);
- fp->_r = 0;
- fp->_lbfsize = 0;
+ if (HASUB(fp))
+ FREEUB(reent, fp);
+ fp->_r = fp->_lbfsize = 0;
if (fp->_flags & __SMBF)
_free_r (reent, (_PTR) fp->_bf._base);
- fp->_flags &= ~(__SLBF | __SNBF | __SMBF);
+ fp->_flags &= ~(__SLBF | __SNBF | __SMBF | __SOPT | __SNPT | __SEOF);
if (mode == _IONBF)
goto nbf;
/*
- * Allocate buffer if needed. */
+ * Find optimal I/O size for seek optimization. This also returns
+ * a `tty flag' to suggest that we check isatty(fd), but we do not
+ * care since our caller told us how to buffer.
+ */
+ fp->_flags |= __swhatbuf_r (reent, fp, &iosize, &ttyflag);
+ if (size == 0)
+ {
+ buf = NULL;
+ size = iosize;
+ }
+
+ /* Allocate buffer if needed. */
if (buf == NULL)
{
- /* we need this here because malloc() may return a pointer
- even if size == 0 */
- if (!size) size = BUFSIZ;
if ((buf = malloc (size)) == NULL)
{
+ /*
+ * Unable to honor user's request. We will return
+ * failure, but try again with file system size.
+ */
ret = EOF;
- /* Try another size... */
- buf = malloc (BUFSIZ);
- size = BUFSIZ;
+ if (size != iosize)
+ {
+ size = iosize;
+ buf = malloc (size);
+ }
}
if (buf == NULL)
{
- /* Can't allocate it, let's try another approach */
+ /* No luck; switch to unbuffered I/O. */
nbf:
fp->_flags |= __SNBF;
fp->_w = 0;
@@ -164,35 +178,53 @@ nbf:
}
fp->_flags |= __SMBF;
}
+
/*
- * Now put back whichever flag is needed, and fix _lbfsize
- * if line buffered. Ensure output flush on exit if the
- * stream will be buffered at all.
- * If buf is NULL then make _lbfsize 0 to force the buffer
- * to be flushed and hence malloced on first use
+ * We're committed to buffering from here, so make sure we've
+ * registered to flush buffers on exit.
*/
+ if (!reent->__sdidinit)
+ __sinit(reent);
- switch (mode)
- {
- case _IOLBF:
- fp->_flags |= __SLBF;
- fp->_lbfsize = buf ? -size : 0;
- /* FALLTHROUGH */
-
- case _IOFBF:
- /* no flag */
- reent->__cleanup = _cleanup_r;
- fp->_bf._base = fp->_p = (unsigned char *) buf;
- fp->_bf._size = size;
- break;
- }
-
+#ifdef _FSEEK_OPTIMIZATION
/*
- * Patch up write count if necessary.
+ * Kill any seek optimization if the buffer is not the
+ * right size.
+ *
+ * SHOULD WE ALLOW MULTIPLES HERE (i.e., ok iff (size % iosize) == 0)?
*/
+ if (size != iosize)
+ fp->_flags |= __SNPT;
+#endif
+ /*
+ * Fix up the FILE fields, and set __cleanup for output flush on
+ * exit (since we are buffered in some way).
+ */
+ if (mode == _IOLBF)
+ fp->_flags |= __SLBF;
+ fp->_bf._base = fp->_p = (unsigned char *) buf;
+ fp->_bf._size = size;
+ /* fp->_lbfsize is still 0 */
if (fp->_flags & __SWR)
- fp->_w = fp->_flags & (__SLBF | __SNBF) ? 0 : size;
+ {
+ /*
+ * Begin or continue writing: see __swsetup(). Note
+ * that __SNBF is impossible (it was handled earlier).
+ */
+ if (fp->_flags & __SLBF)
+ {
+ fp->_w = 0;
+ fp->_lbfsize = -fp->_bf._size;
+ }
+ else
+ fp->_w = size;
+ }
+ else
+ {
+ /* begin/continue reading, or stay in intermediate state */
+ fp->_w = 0;
+ }
_newlib_flockfile_end (fp);
return 0;
diff --git a/newlib/libc/stdio/snprintf.c b/newlib/libc/stdio/snprintf.c
index 13414e3d1..d2408b2f0 100644
--- a/newlib/libc/stdio/snprintf.c
+++ b/newlib/libc/stdio/snprintf.c
@@ -33,9 +33,9 @@ int
#ifdef _HAVE_STDC
_DEFUN(_snprintf_r, (ptr, str, size, fmt),
struct _reent *ptr _AND
- char *str _AND
+ char *__restrict str _AND
size_t size _AND
- _CONST char *fmt _DOTS)
+ _CONST char *__restrict fmt _DOTS)
#else
_snprintf_r(ptr, str, size, fmt, va_alist)
struct _reent *ptr;
@@ -72,14 +72,20 @@ _snprintf_r(ptr, str, size, fmt, va_alist)
return (ret);
}
+#ifdef _NANO_FORMATTED_IO
+int
+_EXFUN(_sniprintf_r, (struct _reent *, char *, size_t, const char *, ...)
+ _ATTRIBUTE ((__alias__("_snprintf_r"))));
+#endif
+
#ifndef _REENT_ONLY
int
#ifdef _HAVE_STDC
_DEFUN(snprintf, (str, size, fmt),
- char *str _AND
+ char *__restrict str _AND
size_t size _AND
- _CONST char *fmt _DOTS)
+ _CONST char *__restrict fmt _DOTS)
#else
snprintf(str, size, fmt, va_alist)
char *str;
@@ -116,4 +122,9 @@ snprintf(str, size, fmt, va_alist)
return (ret);
}
+#ifdef _NANO_FORMATTED_IO
+int
+_EXFUN(sniprintf, (char *, size_t, const char *, ...)
+ _ATTRIBUTE ((__alias__("snprintf"))));
+#endif
#endif
diff --git a/newlib/libc/stdio/sprintf.c b/newlib/libc/stdio/sprintf.c
index 0914b23b8..d74c6f891 100644
--- a/newlib/libc/stdio/sprintf.c
+++ b/newlib/libc/stdio/sprintf.c
@@ -47,26 +47,26 @@ INDEX
ANSI_SYNOPSIS
#include <stdio.h>
- int printf(const char *<[format]>, ...);
- int fprintf(FILE *<[fd]>, const char *<[format]>, ...);
- int sprintf(char *<[str]>, const char *<[format]>, ...);
- int snprintf(char *<[str]>, size_t <[size]>, const char *<[format]>,
+ int printf(const char *restrict <[format]>, ...);
+ int fprintf(FILE *restrict <[fd]>, const char *restrict <[format]>, ...);
+ int sprintf(char *restrict <[str]>, const char *restrict <[format]>, ...);
+ int snprintf(char *restrict <[str]>, size_t <[size]>, const char *restrict <[format]>,
...);
- int asprintf(char **<[strp]>, const char *<[format]>, ...);
- char *asnprintf(char *<[str]>, size_t *<[size]>, const char *<[format]>,
+ int asprintf(char **restrict <[strp]>, const char *restrict <[format]>, ...);
+ char *asnprintf(char *restrict <[str]>, size_t *restrict <[size]>, const char *restrict <[format]>,
...);
- int _printf_r(struct _reent *<[ptr]>, const char *<[format]>, ...);
- int _fprintf_r(struct _reent *<[ptr]>, FILE *<[fd]>,
- const char *<[format]>, ...);
- int _sprintf_r(struct _reent *<[ptr]>, char *<[str]>,
- const char *<[format]>, ...);
- int _snprintf_r(struct _reent *<[ptr]>, char *<[str]>, size_t <[size]>,
- const char *<[format]>, ...);
- int _asprintf_r(struct _reent *<[ptr]>, char **<[strp]>,
- const char *<[format]>, ...);
- char *_asnprintf_r(struct _reent *<[ptr]>, char *<[str]>,
- size_t *<[size]>, const char *<[format]>, ...);
+ int _printf_r(struct _reent *<[ptr]>, const char *restrict <[format]>, ...);
+ int _fprintf_r(struct _reent *<[ptr]>, FILE *restrict <[fd]>,
+ const char *restrict <[format]>, ...);
+ int _sprintf_r(struct _reent *<[ptr]>, char *restrict <[str]>,
+ const char *restrict <[format]>, ...);
+ int _snprintf_r(struct _reent *<[ptr]>, char *restrict <[str]>, size_t <[size]>,
+ const char *restrict <[format]>, ...);
+ int _asprintf_r(struct _reent *<[ptr]>, char **restrict <[strp]>,
+ const char *restrict <[format]>, ...);
+ char *_asnprintf_r(struct _reent *<[ptr]>, char *restrict <[str]>,
+ size_t *restrict <[size]>, const char *restrict <[format]>, ...);
DESCRIPTION
<<printf>> accepts a series of arguments, applies to each a
@@ -199,38 +199,41 @@ DESCRIPTION
o #
The result is to be converted to an
alternative form, according to the <[type]>
- character:
-
- o+
- o o
- Increases precision to force the first
- digit of the result to be a zero.
-
- o x
- A non-zero result will have a <<0x>>
- prefix.
-
- o X
- A non-zero result will have a <<0X>>
- prefix.
-
- o a, A, e, E, f, or F
- The result will always contain a
- decimal point even if no digits follow
- the point. (Normally, a decimal point
- appears only if a digit follows it.)
- Trailing zeros are removed.
-
- o g or G
- The result will always contain a
- decimal point even if no digits follow
- the point. Trailing zeros are not
- removed.
-
- o all others
- Undefined.
-
- o-
+ character.
+ o-
+
+ The alternative form output with the # flag depends on the <[type]>
+ character:
+
+ o+
+ o o
+ Increases precision to force the first
+ digit of the result to be a zero.
+
+ o x
+ A non-zero result will have a <<0x>>
+ prefix.
+
+ o X
+ A non-zero result will have a <<0X>>
+ prefix.
+
+ o a, A, e, E, f, or F
+ The result will always contain a
+ decimal point even if no digits follow
+ the point. (Normally, a decimal point
+ appears only if a digit follows it.)
+ Trailing zeros are removed.
+
+ o g or G
+ The result will always contain a
+ decimal point even if no digits follow
+ the point. Trailing zeros are not
+ removed.
+
+ o all others
+ Undefined.
+
o-
o <[width]>
@@ -579,13 +582,13 @@ int
#ifdef _HAVE_STDC
_DEFUN(_sprintf_r, (ptr, str, fmt),
struct _reent *ptr _AND
- char *str _AND
- _CONST char *fmt _DOTS)
+ char *__restrict str _AND
+ _CONST char *__restrict fmt _DOTS)
#else
_sprintf_r(ptr, str, fmt, va_alist)
struct _reent *ptr;
- char *str;
- _CONST char *fmt;
+ char *__restrict str;
+ _CONST char *__restrict fmt;
va_dcl
#endif
{
@@ -608,13 +611,19 @@ _sprintf_r(ptr, str, fmt, va_alist)
return (ret);
}
+#ifdef _NANO_FORMATTED_IO
+int
+_EXFUN(_siprintf_r, (struct _reent *, char *, const char *, ...)
+ _ATTRIBUTE ((__alias__("_sprintf_r"))));
+#endif
+
#ifndef _REENT_ONLY
int
#ifdef _HAVE_STDC
_DEFUN(sprintf, (str, fmt),
- char *str _AND
- _CONST char *fmt _DOTS)
+ char *__restrict str _AND
+ _CONST char *__restrict fmt _DOTS)
#else
sprintf(str, fmt, va_alist)
char *str;
@@ -641,4 +650,9 @@ sprintf(str, fmt, va_alist)
return (ret);
}
+#ifdef _NANO_FORMATTED_IO
+int
+_EXFUN(siprintf, (char *, const char *, ...)
+ _ATTRIBUTE ((__alias__("sprintf"))));
+#endif
#endif
diff --git a/newlib/libc/stdio/sscanf.c b/newlib/libc/stdio/sscanf.c
index 974ae812b..7961294e7 100644
--- a/newlib/libc/stdio/sscanf.c
+++ b/newlib/libc/stdio/sscanf.c
@@ -35,15 +35,15 @@ INDEX
ANSI_SYNOPSIS
#include <stdio.h>
- int scanf(const char *<[format]>, ...);
- int fscanf(FILE *<[fd]>, const char *<[format]>, ...);
- int sscanf(const char *<[str]>, const char *<[format]>, ...);
+ int scanf(const char *restrict <[format]>, ...);
+ int fscanf(FILE *restrict <[fd]>, const char *restrict <[format]>, ...);
+ int sscanf(const char *restrict <[str]>, const char *restrict <[format]>, ...);
- int _scanf_r(struct _reent *<[ptr]>, const char *<[format]>, ...);
- int _fscanf_r(struct _reent *<[ptr]>, FILE *<[fd]>,
- const char *<[format]>, ...);
- int _sscanf_r(struct _reent *<[ptr]>, const char *<[str]>,
- const char *<[format]>, ...);
+ int _scanf_r(struct _reent *<[ptr]>, const char *restrict <[format]>, ...);
+ int _fscanf_r(struct _reent *<[ptr]>, FILE *restrict <[fd]>,
+ const char *restrict <[format]>, ...);
+ int _sscanf_r(struct _reent *<[ptr]>, const char *restrict <[str]>,
+ const char *restrict <[format]>, ...);
TRAD_SYNOPSIS
@@ -132,12 +132,14 @@ DESCRIPTION
Each format specification begins with the percent character (<<%>>).
The other fields are:
- o+
+ O+
o *
+
an optional marker; if present, it suppresses interpretation and
assignment of this input field.
o <[width]>
+
an optional maximum field width: a decimal integer,
which controls the maximum number of characters that
will be read before converting the current input field. If the
@@ -150,58 +152,115 @@ DESCRIPTION
to that character are read, converted, and stored.
Then <<scanf>> proceeds to the next format specification.
- o size
+ o <[size]>
+
<<h>>, <<j>>, <<l>>, <<L>>, <<t>>, and <<z>> are optional size
characters which override the default way that <<scanf>>
interprets the data type of the corresponding argument.
-
-.Modifier Type(s)
-. hh d, i, o, u, x, n convert input to char,
-. store in char object
-.
-. h d, i, o, u, x, n convert input to short,
-. store in short object
-.
-. h D, I, O, U, X no effect
-. e, f, c, s, p
-.
-. j d, i, o, u, x, n convert input to intmax_t,
-. store in intmax_t object
-.
-. j all others no effect
-.
-. l d, i, o, u, x, n convert input to long,
-. store in long object
-.
-. l e, f, g convert input to double
-. store in a double object
-.
-. l D, I, O, U, X no effect
-. c, s, p
-.
-. ll d, i, o, u, x, n convert to long long,
-. store in long long
-.
-. L d, i, o, u, x, n convert to long long,
-. store in long long
-.
-. L e, f, g, E, G convert to long double,
-. store in long double
-.
-. L all others no effect
-.
-. t d, i, o, u, x, n convert input to ptrdiff_t,
-. store in ptrdiff_t object
-.
-. t all others no effect
-.
-. z d, i, o, u, x, n convert input to size_t,
-. store in size_t object
-.
-. z all others no effect
-.
-
+ @multitable @columnfractions 0.18 0.30 0.52
+ @headitem
+ Modifier
+ @tab
+ Type(s)
+ @tab
+ @item
+ hh
+ @tab
+ d, i, o, u, x, n
+ @tab
+ convert input to char, store in char object
+ @item
+ h
+ @tab
+ d, i, o, u, x, n
+ @tab
+ convert input to short, store in short object
+ @item
+ h
+ @tab
+ D, I, O, U, X, e, f, c, s, p
+ @tab
+ no effect
+ @item
+ j
+ @tab
+ d, i, o, u, x, n
+ @tab
+ convert input to intmax_t, store in intmax_t object
+ @item
+ j
+ @tab
+ all others
+ @tab
+ no effect
+ @item
+ l
+ @tab
+ d, i, o, u, x, n
+ @tab
+ convert input to long, store in long object
+ @item
+ l
+ @tab
+ e, f, g
+ @tab
+ convert input to double, store in a double object
+ @item
+ l
+ @tab
+ D, I, O, U, X, c, s, p
+ @tab
+ no effect
+ @item
+ ll
+ @tab
+ d, i, o, u, x, n
+ @tab
+ convert to long long, store in long long object
+ @item
+ L
+ @tab
+ d, i, o, u, x, n
+ @tab
+ convert to long long, store in long long object
+ @item
+ L
+ @tab
+ e, f, g, E, G
+ @tab
+ convert to long double, store in long double object
+ @item
+ L
+ @tab
+ all others
+ @tab
+ no effect
+ @item
+ t
+ @tab
+ d, i, o, u, x, n
+ @tab
+ convert input to ptrdiff_t, store in ptrdiff_t object
+ @item
+ t
+ @tab
+ all others
+ @tab
+ no effect
+ @item
+ z
+ @tab
+ d, i, o, u, x, n
+ @tab
+ convert input to size_t, store in size_t object
+ @item
+ z
+ @tab
+ all others
+ @tab
+ no effect
+ @end multitable
o <[type]>
@@ -210,7 +269,7 @@ DESCRIPTION
characters:
o+
- o %
+ o %
No conversion is done; the percent character (<<%>>) is stored.
o c
@@ -220,7 +279,7 @@ DESCRIPTION
Reads a character string into the array supplied.
Corresponding <[arg]>: <<(char arg[])>>.
- o [<[pattern]>]
+ o [<[pattern]>]
Reads a non-empty character string into memory
starting at <[arg]>. This area must be large
enough to accept the sequence and a
@@ -244,7 +303,6 @@ DESCRIPTION
o u
Reads an unsigned decimal integer into the corresponding
<[arg]>: <<(unsigned int *arg)>>.
-
o U
Reads an unsigned decimal integer into the corresponding <[arg]>:
@@ -262,19 +320,19 @@ DESCRIPTION
Read a floating-point number into the corresponding <[arg]>:
<<(double *arg)>>.
- o i
+ o i
Reads a decimal, octal or hexadecimal integer into the
corresponding <[arg]>: <<(int *arg)>>.
- o I
+ o I
Reads a decimal, octal or hexadecimal integer into the
corresponding <[arg]>: <<(long *arg)>>.
- o n
+ o n
Stores the number of characters read in the corresponding
<[arg]>: <<(int *arg)>>.
- o p
+ o p
Stores a scanned pointer. ANSI C leaves the details
to each implementation; this implementation treats
<<%p>> exactly the same as <<%U>>. Corresponding
@@ -316,7 +374,7 @@ DESCRIPTION
where objects inclosed in square brackets are optional, and <<ddd>>
represents decimal, octal, or hexadecimal digits.
- o-
+ O-
RETURNS
<<scanf>> returns the number of input fields successfully
@@ -399,8 +457,8 @@ Supporting OS subroutines required: <<close>>, <<fstat>>, <<isatty>>,
#ifdef _HAVE_STDC
int
_DEFUN(sscanf, (str, fmt),
- _CONST char *str _AND
- _CONST char *fmt _DOTS)
+ _CONST char *__restrict str _AND
+ _CONST char * fmt _DOTS)
#else
int
sscanf(str, fmt, va_alist)
@@ -430,20 +488,26 @@ sscanf(str, fmt, va_alist)
return ret;
}
+#ifdef _NANO_FORMATTED_IO
+int
+_EXFUN(siscanf, (const char *, const char *, ...)
+ _ATTRIBUTE ((__alias__("sscanf"))));
+#endif
+
#endif /* !_REENT_ONLY */
#ifdef _HAVE_STDC
int
_DEFUN(_sscanf_r, (ptr, str, fmt),
struct _reent *ptr _AND
- _CONST char *str _AND
- _CONST char *fmt _DOTS)
+ _CONST char *__restrict str _AND
+ _CONST char *__restrict fmt _DOTS)
#else
int
_sscanf_r(ptr, str, fmt, va_alist)
struct _reent *ptr;
- _CONST char *str;
- _CONST char *fmt;
+ _CONST char *__restrict str;
+ _CONST char *__restrict fmt;
va_dcl
#endif
{
@@ -467,3 +531,9 @@ _sscanf_r(ptr, str, fmt, va_alist)
va_end (ap);
return ret;
}
+
+#ifdef _NANO_FORMATTED_IO
+int
+_EXFUN(_siscanf_r, (struct _reent *, const char *, const char *, ...)
+ _ATTRIBUTE ((__alias__("_sscanf_r"))));
+#endif
diff --git a/newlib/libc/stdio/stdio.c b/newlib/libc/stdio/stdio.c
index 31b787bf8..a6e28f5a9 100644
--- a/newlib/libc/stdio/stdio.c
+++ b/newlib/libc/stdio/stdio.c
@@ -34,10 +34,10 @@ _DEFUN(__sread, (ptr, cookie, buf, n),
struct _reent *ptr _AND
void *cookie _AND
char *buf _AND
- int n)
+ _READ_WRITE_BUFSIZE_TYPE n)
{
register FILE *fp = (FILE *) cookie;
- register int ret;
+ register ssize_t ret;
#ifdef __SCLE
int oldmode = 0;
@@ -67,7 +67,7 @@ _DEFUN(__seofread, (ptr, cookie, buf, len),
struct _reent *_ptr _AND
_PTR cookie _AND
char *buf _AND
- int len)
+ _READ_WRITE_BUFSIZE_TYPE len)
{
return 0;
}
@@ -77,10 +77,10 @@ _DEFUN(__swrite, (ptr, cookie, buf, n),
struct _reent *ptr _AND
void *cookie _AND
char const *buf _AND
- int n)
+ _READ_WRITE_BUFSIZE_TYPE n)
{
register FILE *fp = (FILE *) cookie;
- int w;
+ ssize_t w;
#ifdef __SCLE
int oldmode=0;
#endif
diff --git a/newlib/libc/stdio/stdio.tex b/newlib/libc/stdio/stdio.tex
index 2088d74ed..5352c5491 100644
--- a/newlib/libc/stdio/stdio.tex
+++ b/newlib/libc/stdio/stdio.tex
@@ -20,7 +20,7 @@ _stderr_r(@var{reent})
@noindent
instead of the globals @code{stdin}, @code{stdout}, and
-@code{stderr}. The argument <[reent]> is a pointer to a reentrancy
+@code{stderr}. The argument @var{reent} is a pointer to a reentrancy
structure.
@menu
@@ -50,6 +50,7 @@ structure.
* fread:: Read array elements from a file
* freopen:: Open a file using an existing file descriptor
* fseek:: Set file position
+* __fsetlocking:: Set or query locking mode on FILE stream
* fsetpos:: Restore position of a stream or file
* ftell:: Return position in a stream or file
* funopen:: Open a stream with custom callbacks
@@ -85,6 +86,7 @@ structure.
* siscanf:: Scan and format input (integer only)
* sprintf:: Write formatted output
* sscanf:: Scan and format input
+* stdio_ext:: Access internals of FILE structure
* swprintf:: Write formatted wide character output
* swscanf:: Scan and format wide character input
* tmpfile:: Create a temporary file
@@ -178,6 +180,9 @@ structure.
@include stdio/fseek.def
@page
+@include stdio/fsetlocking.def
+
+@page
@include stdio/fsetpos.def
@page
@@ -283,6 +288,9 @@ structure.
@include stdio/sscanf.def
@page
+@include stdio/stdio_ext.def
+
+@page
@include stdio/swprintf.def
@page
diff --git a/newlib/libc/stdio/stdio_ext.c b/newlib/libc/stdio/stdio_ext.c
new file mode 100644
index 000000000..588209d18
--- /dev/null
+++ b/newlib/libc/stdio/stdio_ext.c
@@ -0,0 +1,113 @@
+/*
+FUNCTION
+<<stdio_ext>>,<<__fbufsize>>,<<__fpending>>,<<__flbf>>,<<__freadable>>,<<__fwritable>>,<<__freading>>,<<__fwriting>>---access internals of FILE structure
+
+INDEX
+ __fbufsize
+INDEX
+ __fpending
+INDEX
+ __flbf
+INDEX
+ __freadable
+INDEX
+ __fwritable
+INDEX
+ __freading
+INDEX
+ __fwriting
+
+ANSI_SYNOPSIS
+ #include <stdio.h>
+ #include <stdio_ext.h>
+ size_t __fbufsize(FILE *<[fp]>);
+ size_t __fpending(FILE *<[fp]>);
+ int __flbf(FILE *<[fp]>);
+ int __freadable(FILE *<[fp]>);
+ int __fwritable(FILE *<[fp]>);
+ int __freading(FILE *<[fp]>);
+ int __fwriting(FILE *<[fp]>);
+
+DESCRIPTION
+These functions provides access to the internals of the FILE structure <[fp]>.
+
+RETURNS
+<<__fbufsize>> returns the number of bytes in the buffer of stream <[fp]>.
+
+<<__fpending>> returns the number of bytes in the output buffer of stream <[fp]>.
+
+<<__flbf>> returns nonzero if stream <[fp]> is line-buffered, and <<0>> if not.
+
+<<__freadable>> returns nonzero if stream <[fp]> may be read, and <<0>> if not.
+
+<<__fwritable>> returns nonzero if stream <[fp]> may be written, and <<0>> if not.
+
+<<__freading>> returns nonzero if stream <[fp]> if the last operation on
+it was a read, or if it read-only, and <<0>> if not.
+
+<<__fwriting>> returns nonzero if stream <[fp]> if the last operation on
+it was a write, or if it write-only, and <<0>> if not.
+
+PORTABILITY
+These functions originate from Solaris and are also provided by GNU libc.
+
+No supporting OS subroutines are required.
+*/
+
+#ifndef __rtems__
+
+#include <_ansi.h>
+#include <stdio.h>
+
+/* Subroutine versions of the inline or macro functions. */
+
+size_t
+_DEFUN(__fbufsize, (fp),
+ FILE * fp)
+{
+ return (size_t) fp->_bf._size;
+}
+
+size_t
+_DEFUN(__fpending, (fp),
+ FILE * fp)
+{
+ return fp->_p - fp->_bf._base;
+}
+
+int
+_DEFUN(__flbf, (fp),
+ FILE * fp)
+{
+ return (fp->_flags & __SLBF) != 0;
+}
+
+int
+_DEFUN(__freadable, (fp),
+ FILE * fp)
+{
+ return (fp->_flags & (__SRD | __SRW)) != 0;
+}
+
+int
+_DEFUN(__fwritable, (fp),
+ FILE * fp)
+{
+ return (fp->_flags & (__SWR | __SRW)) != 0;
+}
+
+int
+_DEFUN(__freading, (fp),
+ FILE * fp)
+{
+ return (fp->_flags & __SRD) != 0;
+}
+
+int
+_DEFUN(__fwriting, (fp),
+ FILE * fp)
+{
+ return (fp->_flags & __SWR) != 0;
+}
+
+#endif /* __rtems__ */
diff --git a/newlib/libc/stdio/swprintf.c b/newlib/libc/stdio/swprintf.c
index 4e964bedd..2233b3ba7 100644
--- a/newlib/libc/stdio/swprintf.c
+++ b/newlib/libc/stdio/swprintf.c
@@ -36,15 +36,16 @@ ANSI_SYNOPSIS
#include <wchar.h>
int wprintf(const wchar_t *<[format]>, ...);
- int fwprintf(FILE *<[fd]>, const wchar_t *<[format]>, ...);
- int swprintf(wchar_t *<[str]>, size_t <[size]>,
- const wchar_t *<[format]>, ...);
+ int fwprintf(FILE *__restrict <[fd]>,
+ const wchar_t *__restrict <[format]>, ...);
+ int swprintf(wchar_t *__restrict <[str]>, size_t <[size]>,
+ const wchar_t *__restrict <[format]>, ...);
int _wprintf_r(struct _reent *<[ptr]>, const wchar_t *<[format]>, ...);
int _fwprintf_r(struct _reent *<[ptr]>, FILE *<[fd]>,
- const wchar_t *<[format]>, ...);
+ const wchar_t *<[format]>, ...);
int _swprintf_r(struct _reent *<[ptr]>, wchar_t *<[str]>,
- size_t <[size]>, const wchar_t *<[format]>, ...);
+ size_t <[size]>, const wchar_t *<[format]>, ...);
DESCRIPTION
<<wprintf>> accepts a series of arguments, applies to each a
@@ -166,40 +167,44 @@ DESCRIPTION
o #
The result is to be converted to an
alternative form, according to the <[type]>
- character:
-
- o+
- o o
- Increases precision to force the first
- digit of the result to be a zero.
-
- o x
- A non-zero result will have a <<0x>>
- prefix.
-
- o X
- A non-zero result will have a <<0X>>
- prefix.
-
- o a, A, e, E, f, or F
- The result will always contain a
- decimal point even if no digits follow
- the point. (Normally, a decimal point
- appears only if a digit follows it.)
- Trailing zeros are removed.
-
- o g or G
- The result will always contain a
- decimal point even if no digits follow
- the point. Trailing zeros are not
- removed.
-
- o all others
- Undefined.
-
- o-
+ character.
+ o-
+
+ The alternative form output with the # flag depends on the <[type]>
+ character:
+
+ o+
+ o o
+ Increases precision to force the first
+ digit of the result to be a zero.
+
+ o x
+ A non-zero result will have a <<0x>>
+ prefix.
+
+ o X
+ A non-zero result will have a <<0X>>
+ prefix.
+
+ o a, A, e, E, f, or F
+ The result will always contain a
+ decimal point even if no digits follow
+ the point. (Normally, a decimal point
+ appears only if a digit follows it.)
+ Trailing zeros are removed.
+
+ o g or G
+ The result will always contain a
+ decimal point even if no digits follow
+ the point. Trailing zeros are not
+ removed.
+
+ o all others
+ Undefined.
+
o-
+
o <[width]>
<[width]> is an optional minimum field width. You can
@@ -590,9 +595,9 @@ _DEFUN(_swprintf_r, (ptr, str, size, fmt),
int
_DEFUN(swprintf, (str, size, fmt),
- wchar_t *str _AND
+ wchar_t *__restrict str _AND
size_t size _AND
- _CONST wchar_t *fmt _DOTS)
+ _CONST wchar_t *__restrict fmt _DOTS)
{
int ret;
va_list ap;
diff --git a/newlib/libc/stdio/swscanf.c b/newlib/libc/stdio/swscanf.c
index 273f59b32..6a469ac31 100644
--- a/newlib/libc/stdio/swscanf.c
+++ b/newlib/libc/stdio/swscanf.c
@@ -35,9 +35,11 @@ INDEX
ANSI_SYNOPSIS
#include <stdio.h>
- int wscanf(const wchar_t *<[format]>, ...);
- int fwscanf(FILE *<[fd]>, const wchar_t *<[format]>, ...);
- int swscanf(const wchar_t *<[str]>, const wchar_t *<[format]>, ...);
+ int wscanf(const wchar_t *__restrict <[format]>, ...);
+ int fwscanf(FILE *__restrict <[fd]>,
+ const wchar_t *__restrict <[format]>, ...);
+ int swscanf(const wchar_t *__restrict <[str]>,
+ const wchar_t *__restrict <[format]>, ...);
int _wscanf_r(struct _reent *<[ptr]>, const wchar_t *<[format]>, ...);
int _fwscanf_r(struct _reent *<[ptr]>, FILE *<[fd]>,
@@ -50,15 +52,15 @@ TRAD_SYNOPSIS
#include <stdio.h>
int wscanf(<[format]> [, <[arg]>, ...])
- wchar_t *<[format]>;
+ wchar_t *__restrict <[format]>;
int fwscanf(<[fd]>, <[format]> [, <[arg]>, ...]);
FILE *<[fd]>;
wchar_t *<[format]>;
int swscanf(<[str]>, <[format]> [, <[arg]>, ...]);
- wchar_t *<[str]>;
- wchar_t *<[format]>;
+ wchar_t *__restrict <[str]>;
+ wchar_t *__restrict <[format]>;
int _wscanf_r(<[ptr]>, <[format]> [, <[arg]>, ...])
struct _reent *<[ptr]>;
@@ -132,12 +134,14 @@ DESCRIPTION
Each format specification begins with the percent character (<<%>>).
The other fields are:
- o+
+ O+
o *
+
an optional marker; if present, it suppresses interpretation and
assignment of this input field.
o <[width]>
+
an optional maximum field width: a decimal integer,
which controls the maximum number of characters that
will be read before converting the current input field. If the
@@ -150,58 +154,121 @@ DESCRIPTION
to that character are read, converted, and stored.
Then <<wscanf>> proceeds to the next format specification.
- o size
+ o <[size]>
+
<<h>>, <<j>>, <<l>>, <<L>>, <<t>>, and <<z>> are optional size
characters which override the default way that <<wscanf>>
interprets the data type of the corresponding argument.
-
-.Modifier Type(s)
-. hh d, i, o, u, x, n convert input to char,
-. store in char object
-.
-. h d, i, o, u, x, n convert input to short,
-. store in short object
-.
-. h e, f, c, s, p no effect
-.
-. j d, i, o, u, x, n convert input to intmax_t,
-. store in intmax_t object
-.
-. j all others no effect
-.
-. l d, i, o, u, x, n convert input to long,
-. store in long object
-.
-. l e, f, g convert input to double
-. store in a double object
-.
-. l c, s, [ the input is stored in a wchar_t object
-.
-. l p no effect
-.
-. ll d, i, o, u, x, n convert to long long,
-. store in long long
-.
-. L d, i, o, u, x, n convert to long long,
-. store in long long
-.
-. L e, f, g, E, G convert to long double,
-. store in long double
-.
-. L all others no effect
-.
-. t d, i, o, u, x, n convert input to ptrdiff_t,
-. store in ptrdiff_t object
-.
-. t all others no effect
-.
-. z d, i, o, u, x, n convert input to size_t,
-. store in size_t object
-.
-. z all others no effect
-.
-
+ @multitable @columnfractions 0.18 0.30 0.52
+ @headitem
+ Modifier
+ @tab
+ Type(s)
+ @tab
+ @item
+ hh
+ @tab
+ d, i, o, u, x, n
+ @tab
+ convert input to char, store in char object
+ @item
+ h
+ @tab
+ d, i, o, u, x, n
+ @tab
+ convert input to short, store in short object
+ @item
+ h
+ @tab
+ e, f, c, s, p
+ @tab
+ no effect
+ @item
+ j
+ @tab
+ d, i, o, u, x, n
+ @tab
+ convert input to intmax_t, store in intmax_t object
+ @item
+ j
+ @tab
+ all others
+ @tab
+ no effect
+ @item
+ l
+ @tab
+ d, i, o, u, x, n
+ @tab
+ convert input to long, store in long object
+ @item
+ l
+ @tab
+ e, f, g
+ @tab
+ convert input to double, store in a double object
+ @item
+ l
+ @tab
+ c, s, [
+ @tab
+ the input is stored in a wchar_t object
+ @item
+ l
+ @tab
+ p
+ @tab
+ no effect
+ @item
+ ll
+ @tab
+ d, i, o, u, x, n
+ @tab
+ convert to long long, store in long long object
+ @item
+ L
+ @tab
+ d, i, o, u, x, n
+ @tab
+ convert to long long, store in long long object
+ @item
+ L
+ @tab
+ e, f, g, E, G
+ @tab
+ convert to long double, store in long double object
+ @item
+ L
+ @tab
+ all others
+ @tab
+ no effect
+ @item
+ t
+ @tab
+ d, i, o, u, x, n
+ @tab
+ convert input to ptrdiff_t, store in ptrdiff_t object
+ @item
+ t
+ @tab
+ all others
+ @tab
+ no effect
+ @item
+ z
+ @tab
+ d, i, o, u, x, n
+ @tab
+ convert input to size_t, store in size_t object
+ @item
+ z
+ @tab
+ all others
+ @tab
+ no effect
+ @end multitable
o <[type]>
@@ -210,7 +277,7 @@ DESCRIPTION
characters:
o+
- o %
+ o %
No conversion is done; the percent character (<<%>>) is stored.
o c
@@ -223,7 +290,7 @@ DESCRIPTION
Corresponding <[arg]>: <<(char arg[])>>.
If an <<l>> specifier is present, the corresponding <[arg]> is a <<(wchar_t *arg)>>.
- o [<[pattern]>]
+ o [<[pattern]>]
Reads a non-empty character string into memory
starting at <[arg]>. This area must be large
enough to accept the sequence and a
@@ -242,7 +309,7 @@ DESCRIPTION
o u
Reads an unsigned decimal integer into the corresponding
<[arg]>: <<(unsigned int *arg)>>.
-
+
o x,X
Read a hexadecimal integer into the corresponding <[arg]>:
<<(int *arg)>>.
@@ -255,19 +322,19 @@ DESCRIPTION
Read a floating-point number into the corresponding <[arg]>:
<<(double *arg)>>.
- o i
+ o i
Reads a decimal, octal or hexadecimal integer into the
corresponding <[arg]>: <<(int *arg)>>.
- o n
+ o n
Stores the number of characters read in the corresponding
<[arg]>: <<(int *arg)>>.
- o p
+ o p
Stores a scanned pointer. ANSI C leaves the details
to each implementation; this implementation treats
<<%p>> exactly the same as <<%U>>. Corresponding
- <[arg]>: <<(void **arg)>>.
+ <[arg]>: <<(void **arg)>>.
o-
A <[pattern]> of characters surrounded by square brackets can be used
@@ -301,7 +368,7 @@ DESCRIPTION
where objects inclosed in square brackets are optional, and <<ddd>>
represents decimal, octal, or hexadecimal digits.
- o-
+ O-
RETURNS
<<wscanf>> returns the number of input fields successfully
@@ -378,7 +445,7 @@ Supporting OS subroutines required: <<close>>, <<fstat>>, <<isatty>>,
#ifndef _REENT_ONLY
int
-swscanf (_CONST wchar_t *str, _CONST wchar_t *fmt, ...)
+swscanf (_CONST wchar_t *__restrict str, _CONST wchar_t *__restrict fmt, ...)
{
int ret;
va_list ap;
diff --git a/newlib/libc/stdio/vasnprintf.c b/newlib/libc/stdio/vasnprintf.c
index cab89beff..4cb43ce7a 100644
--- a/newlib/libc/stdio/vasnprintf.c
+++ b/newlib/libc/stdio/vasnprintf.c
@@ -56,6 +56,13 @@ _DEFUN(_vasnprintf_r, (ptr, buf, lenp, fmt, ap),
return (char *) f._bf._base;
}
+#ifdef _NANO_FORMATTED_IO
+char *
+_EXFUN(_vasniprintf_r, (struct _reent*, char *, size_t *,
+ const char *, __VALIST)
+ _ATTRIBUTE ((__alias__("_vasnprintf_r"))));
+#endif
+
#ifndef _REENT_ONLY
char *
@@ -68,4 +75,9 @@ _DEFUN(vasnprintf, (buf, lenp, fmt, ap),
return _vasnprintf_r (_REENT, buf, lenp, fmt, ap);
}
+#ifdef _NANO_FORMATTED_IO
+char *
+_EXFUN(vasniprintf, (char *, size_t *, const char *, __VALIST)
+ _ATTRIBUTE ((__alias__("vasnprintf"))));
+#endif
#endif /* ! _REENT_ONLY */
diff --git a/newlib/libc/stdio/vasprintf.c b/newlib/libc/stdio/vasprintf.c
index fbb54cbe8..5ba817d7b 100644
--- a/newlib/libc/stdio/vasprintf.c
+++ b/newlib/libc/stdio/vasprintf.c
@@ -39,6 +39,12 @@ _DEFUN(vasprintf, (strp, fmt, ap),
return _vasprintf_r (_REENT, strp, fmt, ap);
}
+#ifdef _NANO_FORMATTED_IO
+int
+_EXFUN(vasiprintf, (char **, const char *, __VALIST)
+ _ATTRIBUTE ((__alias__("vasprintf"))));
+#endif
+
#endif /* !_REENT_ONLY */
int
@@ -63,3 +69,9 @@ _DEFUN(_vasprintf_r, (ptr, strp, fmt, ap),
}
return ret;
}
+
+#ifdef _NANO_FORMATTED_IO
+int
+_EXFUN(_vasiprintf_r, (struct _reent *, char **, const char *, __VALIST)
+ _ATTRIBUTE ((__alias__("_vasprintf_r"))));
+#endif
diff --git a/newlib/libc/stdio/vdprintf.c b/newlib/libc/stdio/vdprintf.c
index bfb19c95b..c295a3959 100644
--- a/newlib/libc/stdio/vdprintf.c
+++ b/newlib/libc/stdio/vdprintf.c
@@ -16,7 +16,7 @@ int
_DEFUN(_vdprintf_r, (ptr, fd, format, ap),
struct _reent *ptr _AND
int fd _AND
- const char *format _AND
+ const char *__restrict format _AND
va_list ap)
{
char *p;
@@ -33,15 +33,26 @@ _DEFUN(_vdprintf_r, (ptr, fd, format, ap),
return n;
}
+#ifdef _NANO_FORMATTED_IO
+int
+_EXFUN(_vdiprintf_r, (struct _reent *, int, const char *, __VALIST)
+ _ATTRIBUTE ((__alias__("_vdprintf_r"))));
+#endif
+
#ifndef _REENT_ONLY
int
_DEFUN(vdprintf, (fd, format, ap),
int fd _AND
- const char *format _AND
+ const char *__restrict format _AND
va_list ap)
{
return _vdprintf_r (_REENT, fd, format, ap);
}
+#ifdef _NANO_FORMATTED_IO
+int
+_EXFUN(vdiprintf, (int, const char *, __VALIST)
+ _ATTRIBUTE ((__alias__("vdprintf"))));
+#endif
#endif /* ! _REENT_ONLY */
diff --git a/newlib/libc/stdio/vfprintf.c b/newlib/libc/stdio/vfprintf.c
index dd9c22a6d..6430edf2c 100644
--- a/newlib/libc/stdio/vfprintf.c
+++ b/newlib/libc/stdio/vfprintf.c
@@ -1332,7 +1332,7 @@ reswitch: switch (ch) {
expsize = exponent (expstr, expt, ch);
size = expsize + ndig;
if (ndig > 1 || flags & ALT)
- ++size;
+ size += decp_len;
# ifdef _WANT_IO_C99_FORMATS
flags &= ~GROUPING;
# endif
@@ -1341,18 +1341,20 @@ reswitch: switch (ch) {
if (expt > 0) {
size = expt;
if (prec || flags & ALT)
- size += prec + 1;
+ size += prec + decp_len;
} else /* "0.X" */
size = (prec || flags & ALT)
- ? prec + 2
+ ? prec + 1 + decp_len
: 1;
} else if (expt >= ndig) { /* fixed g fmt */
size = expt;
if (flags & ALT)
- ++size;
- } else
- size = ndig + (expt > 0 ?
- 1 : 2 - expt);
+ size += decp_len;
+ } else {
+ size = ndig + decp_len;
+ if (expt <= 0)
+ size += 1 - expt;
+ }
# ifdef _WANT_IO_C99_FORMATS
if ((flags & GROUPING) && expt > 0) {
/* space for thousands' grouping */
@@ -1521,11 +1523,9 @@ string:
*/
char *p = memchr (cp, 0, prec);
- if (p != NULL) {
+ if (p != NULL)
size = p - cp;
- if (size > prec)
- size = prec;
- } else
+ else
size = prec;
} else
size = strlen (cp);
diff --git a/newlib/libc/stdio/vfscanf.c b/newlib/libc/stdio/vfscanf.c
index ae94cea3f..e2e08db0e 100644
--- a/newlib/libc/stdio/vfscanf.c
+++ b/newlib/libc/stdio/vfscanf.c
@@ -162,6 +162,7 @@ Supporting OS subroutines required:
#ifdef FLOATING_POINT
#include <math.h>
#include <float.h>
+#include <locale.h>
/* Currently a test is made to see if long double processing is warranted.
This could be changed in the future should the _ldtoa_r code be
@@ -169,16 +170,11 @@ Supporting OS subroutines required:
#define _NO_LONGDBL
#if defined _WANT_IO_LONG_DOUBLE && (LDBL_MANT_DIG > DBL_MANT_DIG)
#undef _NO_LONGDBL
-extern _LONG_DOUBLE _strtold _PARAMS((char *s, char **sptr));
#endif
#include "floatio.h"
-#if ((MAXEXP+MAXFRACT+3) > MB_LEN_MAX)
-# define BUF (MAXEXP+MAXFRACT+3) /* 3 = sign + decimal point + NUL */
-#else
-# define BUF MB_LEN_MAX
-#endif
+#define BUF (MAXEXP+MAXFRACT+MB_LEN_MAX+2) /* decimal point + sign + NUL */
/* An upper bound for how long a long prints in decimal. 4 / 13 approximates
log (2). Add one char for roundoff compensation and one for the sign. */
@@ -1288,6 +1284,10 @@ _DEFUN(__SVFSCANF_R, (rptr, fp, fmt0, ap),
unsigned width_left = 0;
char nancount = 0;
char infcount = 0;
+ const char *decpt = _localeconv_r (rptr)->decimal_point;
+#ifdef _MB_CAPABLE
+ int decptpos = 0;
+#endif
#ifdef hardway
if (width == 0 || width > sizeof (buf) - 1)
#else
@@ -1416,14 +1416,6 @@ _DEFUN(__SVFSCANF_R, (rptr, fp, fmt0, ap),
goto fok;
}
break;
- case '.':
- if (flags & DPTOK)
- {
- flags &= ~(SIGNOK | DPTOK);
- leading_zeroes = zeroes;
- goto fok;
- }
- break;
case 'e':
case 'E':
/* no exponent without some digits */
@@ -1442,6 +1434,53 @@ _DEFUN(__SVFSCANF_R, (rptr, fp, fmt0, ap),
goto fok;
}
break;
+ default:
+#ifndef _MB_CAPABLE
+ if ((unsigned char) c == (unsigned char) decpt[0]
+ && (flags & DPTOK))
+ {
+ flags &= ~(SIGNOK | DPTOK);
+ leading_zeroes = zeroes;
+ goto fok;
+ }
+ break;
+#else
+ if (flags & DPTOK)
+ {
+ while ((unsigned char) c
+ == (unsigned char) decpt[decptpos])
+ {
+ if (decpt[++decptpos] == '\0')
+ {
+ /* We read the complete decpt seq. */
+ flags &= ~(SIGNOK | DPTOK);
+ leading_zeroes = zeroes;
+ p = stpncpy (p, decpt, decptpos);
+ decptpos = 0;
+ goto fskip;
+ }
+ ++nread;
+ if (--fp->_r > 0)
+ fp->_p++;
+ else if (__srefill_r (rptr, fp))
+ break; /* EOF */
+ c = *fp->_p;
+ }
+ if (decptpos > 0)
+ {
+ /* We read part of a multibyte decimal point,
+ but the rest is invalid or we're at EOF,
+ so back off. */
+ while (decptpos-- > 0)
+ {
+ _ungetc_r (rptr, (unsigned char) decpt[decptpos],
+ fp);
+ --nread;
+ }
+ }
+ }
+ break;
+#endif
}
break;
fok:
@@ -1556,12 +1595,13 @@ _DEFUN(__SVFSCANF_R, (rptr, fp, fmt0, ap),
sprintf (exp_start, "e%ld", new_exp);
}
- /* Current _strtold routine is markedly slower than
+ /* FIXME: Is that still true?
+ Current _strtold routine is markedly slower than
_strtod_r. Only use it if we have a long double
result. */
#ifndef _NO_LONGDBL /* !_NO_LONGDBL */
if (flags & LONGDBL)
- qres = _strtold (buf, NULL);
+ qres = _strtold_r (rptr, buf, NULL);
else
#endif
res = _strtod_r (rptr, buf, NULL);
diff --git a/newlib/libc/stdio/vfwprintf.c b/newlib/libc/stdio/vfwprintf.c
index 4788add23..c3b8b27bb 100644
--- a/newlib/libc/stdio/vfwprintf.c
+++ b/newlib/libc/stdio/vfwprintf.c
@@ -51,10 +51,11 @@ ANSI_SYNOPSIS
#include <stdio.h>
#include <stdarg.h>
#include <wchar.h>
- int vwprintf(const wchar_t *<[fmt]>, va_list <[list]>);
- int vfwprintf(FILE *<[fp]>, const wchar_t *<[fmt]>, va_list <[list]>);
- int vswprintf(wchar_t *<[str]>, size_t <[size]>, const wchar_t *<[fmt]>,
- va_list <[list]>);
+ int vwprintf(const wchar_t *__restrict <[fmt]>, va_list <[list]>);
+ int vfwprintf(FILE *__restrict <[fp]>,
+ const wchar_t *__restrict <[fmt]>, va_list <[list]>);
+ int vswprintf(wchar_t * __restrict <[str]>, size_t <[size]>,
+ const wchar_t *__ restrict <[fmt]>, va_list <[list]>);
int _vwprintf_r(struct _reent *<[reent]>, const wchar_t *<[fmt]>,
va_list <[list]>);
@@ -366,8 +367,8 @@ _EXFUN(get_arg, (struct _reent *data, int n, wchar_t *fmt,
#ifndef STRING_ONLY
int
_DEFUN(VFWPRINTF, (fp, fmt0, ap),
- FILE * fp _AND
- _CONST wchar_t *fmt0 _AND
+ FILE *__restrict fp _AND
+ _CONST wchar_t *__restrict fmt0 _AND
va_list ap)
{
int result;
diff --git a/newlib/libc/stdio/vfwscanf.c b/newlib/libc/stdio/vfwscanf.c
index 3379b5e19..38a060d28 100644
--- a/newlib/libc/stdio/vfwscanf.c
+++ b/newlib/libc/stdio/vfwscanf.c
@@ -35,14 +35,16 @@ INDEX
ANSI_SYNOPSIS
#include <stdio.h>
#include <stdarg.h>
- int vwscanf(const wchar_t *<[fmt]>, va_list <[list]>);
- int vfwscanf(FILE *<[fp]>, const wchar_t *<[fmt]>, va_list <[list]>);
- int vswscanf(const wchar_t *<[str]>, const wchar_t *<[fmt]>, va_list <[list]>);
+ int vwscanf(const wchar_t *__restrict <[fmt]>, va_list <[list]>);
+ int vfwscanf(FILE *__restrict <[fp]>,
+ const wchar_t *__restrict <[fmt]>, va_list <[list]>);
+ int vswscanf(const wchar_t *__restrict <[str]>,
+ const wchar_t *__restrict <[fmt]>, va_list <[list]>);
int _vwscanf(struct _reent *<[reent]>, const wchar_t *<[fmt]>,
va_list <[list]>);
- int _vfwscanf(struct _reent *<[reent]>, FILE *<[fp]>, const wchar_t *<[fmt]>,
- va_list <[list]>);
+ int _vfwscanf(struct _reent *<[reent]>, FILE *<[fp]>,
+ const wchar_t *<[fmt]>, va_list <[list]>);
int _vswscanf(struct _reent *<[reent]>, const wchar_t *<[str]>,
const wchar_t *<[fmt]>, va_list <[list]>);
@@ -50,17 +52,17 @@ TRAD_SYNOPSIS
#include <stdio.h>
#include <varargs.h>
int vwscanf( <[fmt]>, <[ist]>)
- wchar_t *<[fmt]>;
+ wchar_t *__restrict <[fmt]>;
va_list <[list]>;
int vfwscanf( <[fp]>, <[fmt]>, <[list]>)
- FILE *<[fp]>;
- wchar_t *<[fmt]>;
+ FILE *__restrict <[fp]>;
+ wchar_t *__restrict <[fmt]>;
va_list <[list]>;
int vswscanf( <[str]>, <[fmt]>, <[list]>)
- wchar_t *<[str]>;
- wchar_t *<[fmt]>;
+ wchar_t *__restrict <[str]>;
+ wchar_t *__restrict <[fmt]>;
va_list <[list]>;
int _vwscanf( <[reent]>, <[fmt]>, <[ist]>)
@@ -159,6 +161,10 @@ C99, POSIX-1.2008
#ifdef FLOATING_POINT
#include <math.h>
#include <float.h>
+#include <locale.h>
+#ifdef __HAVE_LOCALE_INFO_EXTENDED__
+#include "../locale/lnumeric.h"
+#endif
/* Currently a test is made to see if long double processing is warranted.
This could be changed in the future should the _ldtoa_r code be
@@ -254,8 +260,8 @@ static void * get_arg (int, va_list *, int *, void **);
int
_DEFUN(VFWSCANF, (fp, fmt, ap),
- register FILE *fp _AND
- _CONST wchar_t *fmt _AND
+ register FILE *__restrict fp _AND
+ _CONST wchar_t *__restrict fmt _AND
va_list ap)
{
struct _reent *reent = _REENT;
@@ -412,6 +418,7 @@ _DEFUN(__SVFWSCANF_R, (rptr, fp, fmt0, ap),
float *flp;
_LONG_DOUBLE *ldp;
double *dp;
+ wchar_t decpt;
#endif
long *lp;
#ifndef _NO_LONGLONG
@@ -438,6 +445,27 @@ _DEFUN(__SVFWSCANF_R, (rptr, fp, fmt0, ap),
# define GET_ARG(n, ap, type) (va_arg (ap, type))
#endif
+#ifdef FLOATING_POINT
+#ifdef _MB_CAPABLE
+#ifdef __HAVE_LOCALE_INFO_EXTENDED__
+ decpt = *__get_current_numeric_locale ()->wdecimal_point;
+#else
+ {
+ size_t nconv;
+
+ memset (&mbs, '\0', sizeof (mbs));
+ nconv = _mbrtowc_r (rptr, &decpt,
+ _localeconv_r (rptr)->decimal_point,
+ MB_CUR_MAX, &mbs);
+ if (nconv == (size_t) -1 || nconv == (size_t) -2)
+ decpt = L'.';
+ }
+#endif /* !__HAVE_LOCALE_INFO_EXTENDED__ */
+#else
+ decpt = (wchar_t) *_localeconv_r (rptr)->decimal_point;
+#endif /* !_MB_CAPABLE */
+#endif /* FLOATING_POINT */
+
_newlib_flockfile_start (fp);
ORIENT (fp, 1);
@@ -749,7 +777,7 @@ _DEFUN(__SVFWSCANF_R, (rptr, fp, fmt0, ap),
if (flags & LONG)
{
if (!(flags & SUPPRESS))
- p = va_arg(ap, wchar_t *);
+ p = GET_ARG(N, ap, wchar_t *);
n = 0;
while (width-- != 0 && (wi = _fgetwc_r (rptr, fp)) != WEOF)
{
@@ -766,7 +794,7 @@ _DEFUN(__SVFWSCANF_R, (rptr, fp, fmt0, ap),
else
{
if (!(flags & SUPPRESS))
- mbp = va_arg(ap, char *);
+ mbp = GET_ARG(N, ap, char *);
n = 0;
memset ((_PTR)&mbs, '\0', sizeof (mbstate_t));
while (width != 0 && (wi = _fgetwc_r (rptr, fp)) != WEOF)
@@ -821,7 +849,7 @@ _DEFUN(__SVFWSCANF_R, (rptr, fp, fmt0, ap),
}
else if (flags & LONG)
{
- p0 = p = va_arg(ap, wchar_t *);
+ p0 = p = GET_ARG(N, ap, wchar_t *);
while ((wi = _fgetwc_r (rptr, fp)) != WEOF
&& width-- != 0 && INCCL (wi))
*p++ = (wchar_t) wi;
@@ -830,11 +858,13 @@ _DEFUN(__SVFWSCANF_R, (rptr, fp, fmt0, ap),
n = p - p0;
if (n == 0)
goto match_failure;
+ *p = L'\0';
+ nassigned++;
}
else
{
if (!(flags & SUPPRESS))
- mbp = va_arg(ap, char *);
+ mbp = GET_ARG(N, ap, char *);
n = 0;
memset ((_PTR) &mbs, '\0', sizeof (mbstate_t));
while ((wi = _fgetwc_r (rptr, fp)) != WEOF
@@ -886,7 +916,7 @@ _DEFUN(__SVFWSCANF_R, (rptr, fp, fmt0, ap),
}
else if (flags & LONG)
{
- p0 = p = va_arg(ap, wchar_t *);
+ p0 = p = GET_ARG(N, ap, wchar_t *);
while ((wi = _fgetwc_r (rptr, fp)) != WEOF
&& width-- != 0 && !iswspace (wi))
{
@@ -895,13 +925,13 @@ _DEFUN(__SVFWSCANF_R, (rptr, fp, fmt0, ap),
}
if (wi != WEOF)
_ungetwc_r (rptr, wi, fp);
- *p = '\0';
+ *p = L'\0';
nassigned++;
}
else
{
if (!(flags & SUPPRESS))
- mbp = va_arg(ap, char *);
+ mbp = GET_ARG(N, ap, char *);
memset ((_PTR) &mbs, '\0', sizeof (mbstate_t));
while ((wi = _fgetwc_r (rptr, fp)) != WEOF
&& width != 0 && !iswspace (wi))
@@ -1269,14 +1299,6 @@ _DEFUN(__SVFWSCANF_R, (rptr, fp, fmt0, ap),
goto fok;
}
break;
- case L'.':
- if (flags & DPTOK)
- {
- flags &= ~(SIGNOK | DPTOK);
- leading_zeroes = zeroes;
- goto fok;
- }
- break;
case L'e':
case L'E':
/* no exponent without some digits */
@@ -1295,6 +1317,14 @@ _DEFUN(__SVFWSCANF_R, (rptr, fp, fmt0, ap),
goto fok;
}
break;
+ default:
+ if ((wchar_t) c == decpt && (flags & DPTOK))
+ {
+ flags &= ~(SIGNOK | DPTOK);
+ leading_zeroes = zeroes;
+ goto fok;
+ }
+ break;
}
if (c != WEOF)
_ungetwc_r (rptr, c, fp);
diff --git a/newlib/libc/stdio/vprintf.c b/newlib/libc/stdio/vprintf.c
index 375656972..00b8023b7 100644
--- a/newlib/libc/stdio/vprintf.c
+++ b/newlib/libc/stdio/vprintf.c
@@ -39,14 +39,25 @@ _DEFUN(vprintf, (fmt, ap),
return _vfprintf_r (reent, _stdout_r (reent), fmt, ap);
}
+#ifdef _NANO_FORMATTED_IO
+int
+_EXFUN(viprintf, (const char *, __VALIST) _ATTRIBUTE ((__alias__("vprintf"))));
+#endif
+
#endif /* !_REENT_ONLY */
int
_DEFUN(_vprintf_r, (ptr, fmt, ap),
struct _reent *ptr _AND
- _CONST char *fmt _AND
+ _CONST char *__restrict fmt _AND
va_list ap)
{
_REENT_SMALL_CHECK_INIT (ptr);
return _vfprintf_r (ptr, _stdout_r (ptr), fmt, ap);
}
+
+#ifdef _NANO_FORMATTED_IO
+int
+_EXFUN(_viprintf_r, (struct _reent *, const char *, __VALIST)
+ _ATTRIBUTE ((__alias__("_vprintf_r"))));
+#endif
diff --git a/newlib/libc/stdio/vscanf.c b/newlib/libc/stdio/vscanf.c
index 210774b05..4371e23a7 100644
--- a/newlib/libc/stdio/vscanf.c
+++ b/newlib/libc/stdio/vscanf.c
@@ -40,15 +40,25 @@ _DEFUN(vscanf, (fmt, ap),
return __svfscanf_r (reent, _stdin_r (reent), fmt, ap);
}
+#ifdef _NANO_FORMATTED_IO
+int
+_EXFUN(viscanf, (const char *, __VALIST) _ATTRIBUTE ((__alias__("vscanf"))));
+#endif
+
#endif /* !_REENT_ONLY */
int
_DEFUN(_vscanf_r, (ptr, fmt, ap),
struct _reent *ptr _AND
- _CONST char *fmt _AND
+ _CONST char *__restrict fmt _AND
va_list ap)
{
_REENT_SMALL_CHECK_INIT (ptr);
return __svfscanf_r (ptr, _stdin_r (ptr), fmt, ap);
}
+#ifdef _NANO_FORMATTED_IO
+int
+_EXFUN(_viscanf_r, (struct _reent *, const char *, __VALIST)
+ _ATTRIBUTE ((__alias__("_vscanf_r"))));
+#endif
diff --git a/newlib/libc/stdio/vsnprintf.c b/newlib/libc/stdio/vsnprintf.c
index 58106b676..e08f267bd 100644
--- a/newlib/libc/stdio/vsnprintf.c
+++ b/newlib/libc/stdio/vsnprintf.c
@@ -33,22 +33,28 @@ static char sccsid[] = "%W% (Berkeley) %G%";
int
_DEFUN(vsnprintf, (str, size, fmt, ap),
- char *str _AND
+ char *__restrict str _AND
size_t size _AND
- const char *fmt _AND
+ const char *__restrict fmt _AND
va_list ap)
{
return _vsnprintf_r (_REENT, str, size, fmt, ap);
}
+#ifdef _NANO_FORMATTED_IO
+int
+_EXFUN(vsniprintf, (char *, size_t, const char *, __VALIST)
+ _ATTRIBUTE ((__alias__("vsnprintf"))));
+#endif
+
#endif /* !_REENT_ONLY */
int
_DEFUN(_vsnprintf_r, (ptr, str, size, fmt, ap),
struct _reent *ptr _AND
- char *str _AND
+ char *__restrict str _AND
size_t size _AND
- const char *fmt _AND
+ const char *__restrict fmt _AND
va_list ap)
{
int ret;
@@ -70,3 +76,9 @@ _DEFUN(_vsnprintf_r, (ptr, str, size, fmt, ap),
*f._p = 0;
return ret;
}
+
+#ifdef _NANO_FORMATTED_IO
+int
+_EXFUN(_vsniprintf_r, (struct _reent *, char *, size_t, const char *, __VALIST)
+ _ATTRIBUTE ((__alias__("_vsnprintf_r"))));
+#endif
diff --git a/newlib/libc/stdio/vsprintf.c b/newlib/libc/stdio/vsprintf.c
index 9ab0c73a1..742cde0df 100644
--- a/newlib/libc/stdio/vsprintf.c
+++ b/newlib/libc/stdio/vsprintf.c
@@ -32,20 +32,26 @@ static char sccsid[] = "%W% (Berkeley) %G%";
int
_DEFUN(vsprintf, (str, fmt, ap),
- char *str _AND
- const char *fmt _AND
+ char *__restrict str _AND
+ const char *__restrict fmt _AND
va_list ap)
{
return _vsprintf_r (_REENT, str, fmt, ap);
}
+#ifdef _NANO_FORMATTED_IO
+int
+_EXFUN(vsiprintf, (char *, const char *, __VALIST)
+ _ATTRIBUTE ((__alias__("vsprintf"))));
+#endif
+
#endif /* !_REENT_ONLY */
int
_DEFUN(_vsprintf_r, (ptr, str, fmt, ap),
struct _reent *ptr _AND
- char *str _AND
- const char *fmt _AND
+ char *__restrict str _AND
+ const char *__restrict fmt _AND
va_list ap)
{
int ret;
@@ -59,3 +65,9 @@ _DEFUN(_vsprintf_r, (ptr, str, fmt, ap),
*f._p = 0;
return ret;
}
+
+#ifdef _NANO_FORMATTED_IO
+int
+_EXFUN(_vsiprintf_r, (struct _reent *, char *, const char *, __VALIST)
+ _ATTRIBUTE ((__alias__("_vsprintf_r"))));
+#endif
diff --git a/newlib/libc/stdio/vsscanf.c b/newlib/libc/stdio/vsscanf.c
index 2b9aeaf5b..1660fa1cf 100644
--- a/newlib/libc/stdio/vsscanf.c
+++ b/newlib/libc/stdio/vsscanf.c
@@ -36,20 +36,26 @@
int
_DEFUN(vsscanf, (str, fmt, ap),
- _CONST char *str _AND
- _CONST char *fmt _AND
+ _CONST char *__restrict str _AND
+ _CONST char *__restrict fmt _AND
va_list ap)
{
return _vsscanf_r (_REENT, str, fmt, ap);
}
+#ifdef _NANO_FORMATTED_IO
+int
+_EXFUN(vsiscanf, (const char *, const char *, __VALIST)
+ _ATTRIBUTE ((__alias__("vsscanf"))));
+#endif
+
#endif /* !_REENT_ONLY */
int
_DEFUN(_vsscanf_r, (ptr, str, fmt, ap),
struct _reent *ptr _AND
- _CONST char *str _AND
- _CONST char *fmt _AND
+ _CONST char *__restrict str _AND
+ _CONST char *__restrict fmt _AND
va_list ap)
{
FILE f;
@@ -63,3 +69,9 @@ _DEFUN(_vsscanf_r, (ptr, str, fmt, ap),
f._file = -1; /* No file. */
return __ssvfscanf_r (ptr, &f, fmt, ap);
}
+
+#ifdef _NANO_FORMATTED_IO
+int
+_EXFUN(_vsiscanf_r, (struct _reent *, const char *, const char *, __VALIST)
+ _ATTRIBUTE ((__alias__("_vsscanf_r"))));
+#endif
diff --git a/newlib/libc/stdio/vswprintf.c b/newlib/libc/stdio/vswprintf.c
index 2d9096c15..ac321b662 100644
--- a/newlib/libc/stdio/vswprintf.c
+++ b/newlib/libc/stdio/vswprintf.c
@@ -71,9 +71,9 @@ _DEFUN(_vswprintf_r, (ptr, str, size, fmt, ap),
int
_DEFUN(vswprintf, (str, size, fmt, ap),
- wchar_t *str _AND
+ wchar_t *__restrict str _AND
size_t size _AND
- const wchar_t *fmt _AND
+ const wchar_t *__restrict fmt _AND
va_list ap)
{
return _vswprintf_r (_REENT, str, size, fmt, ap);
diff --git a/newlib/libc/stdio/vswscanf.c b/newlib/libc/stdio/vswscanf.c
index 08108173a..0d090f021 100644
--- a/newlib/libc/stdio/vswscanf.c
+++ b/newlib/libc/stdio/vswscanf.c
@@ -16,6 +16,7 @@
* IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
*/
+/* Doc in vfwscanf.c */
#include <_ansi.h>
#include <reent.h>
@@ -36,7 +37,8 @@
#ifndef _REENT_ONLY
int
-vswscanf (_CONST wchar_t *str, _CONST wchar_t *fmt, va_list ap)
+vswscanf (_CONST wchar_t *__restrict str, _CONST wchar_t * __restrict fmt,
+ va_list ap)
{
return _vswscanf_r (_REENT, str, fmt, ap);
}
diff --git a/newlib/libc/stdio/vwprintf.c b/newlib/libc/stdio/vwprintf.c
index de95346a0..51d1df3a9 100644
--- a/newlib/libc/stdio/vwprintf.c
+++ b/newlib/libc/stdio/vwprintf.c
@@ -27,7 +27,7 @@
int
_DEFUN(vwprintf, (fmt, ap),
- _CONST wchar_t *fmt _AND
+ _CONST wchar_t *__restrict fmt _AND
va_list ap)
{
struct _reent *reent = _REENT;
diff --git a/newlib/libc/stdio/vwscanf.c b/newlib/libc/stdio/vwscanf.c
index d0b535170..e40bdede5 100644
--- a/newlib/libc/stdio/vwscanf.c
+++ b/newlib/libc/stdio/vwscanf.c
@@ -16,7 +16,8 @@
* IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
*/
-
+/* Doc in vfwscanf.c */
+
#include <_ansi.h>
#include <reent.h>
#include <stdio.h>
@@ -31,7 +32,7 @@
#ifndef _REENT_ONLY
int
-vwscanf (_CONST wchar_t *fmt, va_list ap)
+vwscanf (_CONST wchar_t *__restrict fmt, va_list ap)
{
struct _reent *reent = _REENT;
diff --git a/newlib/libc/stdio/wprintf.c b/newlib/libc/stdio/wprintf.c
index 69dea53c6..e05ba1013 100644
--- a/newlib/libc/stdio/wprintf.c
+++ b/newlib/libc/stdio/wprintf.c
@@ -42,7 +42,7 @@ _DEFUN(_wprintf_r, (ptr, fmt),
int
_DEFUN(wprintf, (fmt),
- const wchar_t *fmt _DOTS)
+ const wchar_t *__restrict fmt _DOTS)
{
int ret;
va_list ap;
diff --git a/newlib/libc/stdio/wscanf.c b/newlib/libc/stdio/wscanf.c
index 9fee3c176..f953d9f81 100644
--- a/newlib/libc/stdio/wscanf.c
+++ b/newlib/libc/stdio/wscanf.c
@@ -14,6 +14,7 @@
* IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
*/
+ /* Doc in swscanf.c */
#include <_ansi.h>
#include <reent.h>
@@ -25,7 +26,7 @@
#ifndef _REENT_ONLY
int
-wscanf(_CONST wchar_t *fmt, ...)
+wscanf(_CONST wchar_t *__restrict fmt, ...)
{
int ret;
va_list ap;
diff --git a/newlib/libc/stdio64/Makefile.am b/newlib/libc/stdio64/Makefile.am
index 60509de0a..fd43ef879 100644
--- a/newlib/libc/stdio64/Makefile.am
+++ b/newlib/libc/stdio64/Makefile.am
@@ -43,6 +43,7 @@ include $(srcdir)/../../Makefile.shared
AM_CFLAGS = -I $(srcdir)/../stdio
CHEWOUT_FILES = \
+ fdopen64.def \
fgetpos64.def \
fopen64.def \
freopen64.def \
@@ -51,18 +52,4 @@ CHEWOUT_FILES = \
ftello64.def \
tmpfile64.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)/stdio64.tex >> $(TARGETDOC)
-
-CLEANFILES = $(CHEWOUT_FILES) *.ref
-
+CHAPTERS = stdio64.tex
diff --git a/newlib/libc/stdio64/Makefile.in b/newlib/libc/stdio64/Makefile.in
index 19e9ba91f..6adcf7e14 100644
--- a/newlib/libc/stdio64/Makefile.in
+++ b/newlib/libc/stdio64/Makefile.in
@@ -291,8 +291,16 @@ libstdio64_la_LDFLAGS = -Xcompiler -nostdlib
@USE_LIBTOOL_FALSE@noinst_LIBRARIES = lib.a
@USE_LIBTOOL_FALSE@lib_a_SOURCES = $(GENERAL_SOURCES) $(ELIX_SOURCES)
@USE_LIBTOOL_FALSE@lib_a_CFLAGS = $(AM_CFLAGS)
+
+#
+# documentation rules
+#
+SUFFIXES = .def
+CHEW = ${top_builddir}/../doc/makedoc -f $(top_srcdir)/../doc/doc.str
+CLEANFILES = $(CHEWOUT_FILES) *.ref
AM_CFLAGS = -I $(srcdir)/../stdio
CHEWOUT_FILES = \
+ fdopen64.def \
fgetpos64.def \
fopen64.def \
freopen64.def \
@@ -301,10 +309,7 @@ CHEWOUT_FILES = \
ftello64.def \
tmpfile64.def
-SUFFIXES = .def
-CHEW = ../../doc/makedoc -f $(srcdir)/../../doc/doc.str
-TARGETDOC = ../tmp.texi
-CLEANFILES = $(CHEWOUT_FILES) *.ref
+CHAPTERS = stdio64.tex
all: all-am
.SUFFIXES:
@@ -622,8 +627,13 @@ objectlist.awk.in: $(noinst_LTLIBRARIES)
$(CHEW) < $< > $*.def 2> $*.ref
touch stmp-def
+TARGETDOC ?= ../tmp.texi
+
doc: $(CHEWOUT_FILES)
- cat $(srcdir)/stdio64.tex >> $(TARGETDOC)
+ for chapter in $(CHAPTERS) ; \
+ do \
+ cat $(srcdir)/$$chapter >> $(TARGETDOC) ; \
+ done
# 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.
diff --git a/newlib/libc/stdio64/fdopen64.c b/newlib/libc/stdio64/fdopen64.c
index 659d343e5..f386583ca 100644
--- a/newlib/libc/stdio64/fdopen64.c
+++ b/newlib/libc/stdio64/fdopen64.c
@@ -1,6 +1,6 @@
/*
FUNCTION
-<<fdopen64>>---turn open file into a stream
+<<fdopen64>>---turn open large file into a stream
INDEX
fdopen64
diff --git a/newlib/libc/stdio64/freopen64.c b/newlib/libc/stdio64/freopen64.c
index dfe36ea3d..f7df35407 100644
--- a/newlib/libc/stdio64/freopen64.c
+++ b/newlib/libc/stdio64/freopen64.c
@@ -74,6 +74,7 @@ Supporting OS subroutines required: <<close>>, <<fstat>>, <<isatty>>,
#include <time.h>
#include <stdio.h>
+#include <string.h>
#include <errno.h>
#include <fcntl.h>
#include <stdlib.h>
@@ -94,7 +95,7 @@ _DEFUN (_freopen64_r, (ptr, file, mode, fp),
register FILE *fp)
{
register int f;
- int flags, oflags;
+ int flags, oflags, oflags2;
int e = 0;
@@ -106,11 +107,14 @@ _DEFUN (_freopen64_r, (ptr, file, mode, fp),
int __oldcancel;
pthread_setcancelstate (PTHREAD_CANCEL_DISABLE, &__oldcancel);
#endif
- _flockfile (fp);
+ oflags2 = fp->_flags2;
+ if (!(oflags2 & __SNLK))
+ _flockfile (fp);
if ((flags = __sflags (ptr, mode, &oflags)) == 0)
{
- _funlockfile (fp);
+ if (!(oflags2 & __SNLK))
+ _funlockfile (fp);
#ifdef _STDIO_WITH_THREAD_CANCELLATION_SUPPORT
pthread_setcancelstate (__oldcancel, &__oldcancel);
#endif
@@ -208,13 +212,17 @@ _DEFUN (_freopen64_r, (ptr, file, mode, fp),
if (HASLB (fp))
FREELB (ptr, fp);
fp->_lb._size = 0;
+ fp->_flags &= ~__SORD;
+ fp->_flags2 &= ~__SWID;
+ memset (&fp->_mbstate, 0, sizeof (_mbstate_t));
if (f < 0)
{ /* did not get it after all */
__sfp_lock_acquire ();
fp->_flags = 0; /* set it free */
ptr->_errno = e; /* restore in case _close clobbered */
- _funlockfile (fp);
+ if (!(oflags2 & __SNLK))
+ _funlockfile (fp);
#ifndef __SINGLE_THREAD__
__lock_close_recursive (fp->_lock);
#endif
@@ -241,7 +249,8 @@ _DEFUN (_freopen64_r, (ptr, file, mode, fp),
fp->_flags |= __SL64;
- _funlockfile (fp);
+ if (!(oflags2 & __SNLK))
+ _funlockfile (fp);
#if !defined (__SINGLE_THREAD__) && defined (_POSIX_THREADS)
pthread_setcancelstate (__oldcancel, &__oldcancel);
#endif
diff --git a/newlib/libc/stdio64/fseeko64.c b/newlib/libc/stdio64/fseeko64.c
index d605dd09b..34eee6783 100644
--- a/newlib/libc/stdio64/fseeko64.c
+++ b/newlib/libc/stdio64/fseeko64.c
@@ -26,18 +26,18 @@ INDEX
ANSI_SYNOPSIS
#include <stdio.h>
- int fseeko64(FILE *<[fp]>, _off64_t <[offset]>, int <[whence]>)
+ int fseeko64(FILE *<[fp]>, _off64_t <[offset]>, int <[whence]>);
int _fseeko64_r (struct _reent *<[ptr]>, FILE *<[fp]>,
- _off64_t <[offset]>, int <[whence]>)
+ _off64_t <[offset]>, int <[whence]>);
TRAD_SYNOPSIS
#include <stdio.h>
- int fseeko64(<[fp]>, <[offset]>, <[whence]>)
+ int fseeko64(<[fp]>, <[offset]>, <[whence]>);
FILE *<[fp]>;
_off64_t <[offset]>;
int <[whence]>;
- int _fseeko64_r (<[ptr]>, <[fp]>, <[offset]>, <[whence]>)
+ int _fseeko64_r (<[ptr]>, <[fp]>, <[offset]>, <[whence]>);
struct _reent *<[ptr]>;
FILE *<[fp]>;
_off64_t <[offset]>;
diff --git a/newlib/libc/stdio64/stdio64.c b/newlib/libc/stdio64/stdio64.c
index f33a394a7..dd3b4adc9 100644
--- a/newlib/libc/stdio64/stdio64.c
+++ b/newlib/libc/stdio64/stdio64.c
@@ -51,10 +51,10 @@ _DEFUN(__swrite64, (ptr, cookie, buf, n),
struct _reent *ptr _AND
void *cookie _AND
char const *buf _AND
- int n)
+ _READ_WRITE_BUFSIZE_TYPE n)
{
register FILE *fp = (FILE *) cookie;
- int w;
+ _READ_WRITE_RETURN_TYPE w;
#ifdef __SCLE
int oldmode=0;
#endif
diff --git a/newlib/libc/stdio64/stdio64.tex b/newlib/libc/stdio64/stdio64.tex
index 55818c354..95f898f3d 100644
--- a/newlib/libc/stdio64/stdio64.tex
+++ b/newlib/libc/stdio64/stdio64.tex
@@ -9,7 +9,8 @@ system, but these functions provide a uniform interface.
The corresponding declarations are in @file{stdio.h}.
-@menu
+@menu
+* fdopen64:: Turn open large file into a stream
* fopen64:: Open a large file
* freopen64:: Open a large file using an existing file descriptor
* fsetpos64:: Restore position of a large stream or file
@@ -20,6 +21,9 @@ The corresponding declarations are in @file{stdio.h}.
@end menu
@page
+@include stdio64/fdopen64.def
+
+@page
@include stdio64/fopen64.def
@page
diff --git a/newlib/libc/stdlib/Makefile.am b/newlib/libc/stdlib/Makefile.am
index 22fedcc84..2d45d1029 100644
--- a/newlib/libc/stdlib/Makefile.am
+++ b/newlib/libc/stdlib/Makefile.am
@@ -13,6 +13,7 @@ GENERAL_SOURCES = \
_Exit.c \
abort.c \
abs.c \
+ aligned_alloc.c \
assert.c \
atexit.c \
atof.c \
@@ -31,6 +32,7 @@ GENERAL_SOURCES = \
gdtoa-hexnan.c \
getenv.c \
getenv_r.c \
+ itoa.c \
labs.c \
ldiv.c \
ldtoa.c \
@@ -44,14 +46,20 @@ GENERAL_SOURCES = \
mlock.c \
mprec.c \
mstats.c \
+ on_exit_args.c \
+ quick_exit.c \
rand.c \
rand_r.c \
+ random.c \
realloc.c \
reallocf.c \
sb_charsets.c \
strtod.c \
+ strtodg.c \
strtol.c \
+ strtorx.c \
strtoul.c \
+ utoa.c \
wcstod.c \
wcstol.c \
wcstoul.c \
@@ -95,6 +103,8 @@ MALLOCR=mallocr
endif
EXTENDED_SOURCES = \
+ arc4random.c \
+ arc4random_uniform.c \
cxa_atexit.c \
cxa_finalize.c \
drand48.c \
@@ -155,6 +165,7 @@ ELIX_3_SOURCES = \
setenv_r.c
ELIX_4_SOURCES = \
+ rpmatch.c \
system.c
if ELIX_LEVEL_1
@@ -257,12 +268,12 @@ CHEWOUT_FILES= \
envlock.def \
exit.def \
getenv.def \
+ itoa.def \
labs.def \
ldiv.def \
llabs.def \
lldiv.def \
malloc.def \
- $(MALLOCR).def \
mblen.def \
mbsnrtowcs.def \
mbstowcs.def \
@@ -272,11 +283,14 @@ CHEWOUT_FILES= \
on_exit.def \
rand.def \
rand48.def \
+ random.def \
+ rpmatch.def \
strtod.def \
strtol.def \
strtoll.def \
strtoul.def \
strtoull.def \
+ utoa.def \
wcsnrtombs.def \
wcstod.def \
wcstol.def \
@@ -287,20 +301,7 @@ CHEWOUT_FILES= \
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
+CHAPTERS = stdlib.tex
$(lpfx)dtoa.$(oext): dtoa.c mprec.h
$(lpfx)ldtoa.$(oext): ldtoa.c mprec.h
diff --git a/newlib/libc/stdlib/Makefile.in b/newlib/libc/stdlib/Makefile.in
index 319079dd5..5ab16a730 100644
--- a/newlib/libc/stdlib/Makefile.in
+++ b/newlib/libc/stdlib/Makefile.in
@@ -85,31 +85,36 @@ 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-aligned_alloc.$(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-itoa.$(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-mstats.$(OBJEXT) lib_a-on_exit_args.$(OBJEXT) \
+ lib_a-quick_exit.$(OBJEXT) lib_a-rand.$(OBJEXT) \
+ lib_a-rand_r.$(OBJEXT) lib_a-random.$(OBJEXT) \
+ lib_a-realloc.$(OBJEXT) lib_a-reallocf.$(OBJEXT) \
+ lib_a-sb_charsets.$(OBJEXT) lib_a-strtod.$(OBJEXT) \
+ lib_a-strtodg.$(OBJEXT) lib_a-strtol.$(OBJEXT) \
+ lib_a-strtorx.$(OBJEXT) lib_a-strtoul.$(OBJEXT) \
+ lib_a-utoa.$(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) \
+am__objects_3 = lib_a-arc4random.$(OBJEXT) \
+ lib_a-arc4random_uniform.$(OBJEXT) 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) \
@@ -134,7 +139,7 @@ am__objects_4 = lib_a-a64l.$(OBJEXT) lib_a-btowc.$(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)
+am__objects_6 = lib_a-rpmatch.$(OBJEXT) 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)
@@ -148,28 +153,29 @@ 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
+ __ten_mu.lo _Exit.lo abort.lo abs.lo aligned_alloc.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 \
+ itoa.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 on_exit_args.lo quick_exit.lo rand.lo \
+ rand_r.lo random.lo realloc.lo reallocf.lo sb_charsets.lo \
+ strtod.lo strtodg.lo strtol.lo strtorx.lo strtoul.lo utoa.lo \
+ wcstod.lo wcstol.lo wcstoul.lo wcstombs.lo wcstombs_r.lo \
+ wctomb.lo wctomb_r.lo $(am__objects_8)
+am__objects_10 = arc4random.lo arc4random_uniform.lo 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
+am__objects_13 = rpmatch.lo 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)
@@ -352,15 +358,16 @@ top_srcdir = @top_srcdir@
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)
+ __ten_mu.c _Exit.c abort.c abs.c aligned_alloc.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 itoa.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 on_exit_args.c \
+ quick_exit.c rand.c rand_r.c random.c realloc.c reallocf.c \
+ sb_charsets.c strtod.c strtodg.c strtol.c strtorx.c strtoul.c \
+ utoa.c wcstod.c wcstol.c wcstoul.c wcstombs.c wcstombs_r.c \
+ wctomb.c wctomb_r.c $(am__append_1)
@NEWLIB_NANO_MALLOC_FALSE@MALIGNR = malignr
@NEWLIB_NANO_MALLOC_TRUE@MALIGNR = nano-malignr
@NEWLIB_NANO_MALLOC_FALSE@MALLOPTR = malloptr
@@ -386,6 +393,8 @@ GENERAL_SOURCES = __adjust.c __atexit.c __call_atexit.c __exp10.c \
@NEWLIB_NANO_MALLOC_FALSE@MALLOCR = mallocr
@NEWLIB_NANO_MALLOC_TRUE@MALLOCR = nano-mallocr
EXTENDED_SOURCES = \
+ arc4random.c \
+ arc4random_uniform.c \
cxa_atexit.c \
cxa_finalize.c \
drand48.c \
@@ -446,6 +455,7 @@ ELIX_3_SOURCES = \
setenv_r.c
ELIX_4_SOURCES = \
+ rpmatch.c \
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)
@@ -477,6 +487,13 @@ libstdlib_la_LDFLAGS = -Xcompiler -nostdlib
@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)
+
+#
+# documentation rules
+#
+SUFFIXES = .def
+CHEW = ${top_builddir}/../doc/makedoc -f $(top_srcdir)/../doc/doc.str
+CLEANFILES = $(CHEWOUT_FILES) *.ref
MALLOC_COMPILE = $(LIB_COMPILE) -DINTERNAL_NEWLIB
CHEWOUT_FILES = \
_Exit.def \
@@ -495,12 +512,12 @@ CHEWOUT_FILES = \
envlock.def \
exit.def \
getenv.def \
+ itoa.def \
labs.def \
ldiv.def \
llabs.def \
lldiv.def \
malloc.def \
- $(MALLOCR).def \
mblen.def \
mbsnrtowcs.def \
mbstowcs.def \
@@ -510,11 +527,14 @@ CHEWOUT_FILES = \
on_exit.def \
rand.def \
rand48.def \
+ random.def \
+ rpmatch.def \
strtod.def \
strtol.def \
strtoll.def \
strtoul.def \
strtoull.def \
+ utoa.def \
wcsnrtombs.def \
wcstod.def \
wcstol.def \
@@ -525,10 +545,7 @@ CHEWOUT_FILES = \
wcstombs.def \
wctomb.def
-SUFFIXES = .def
-CHEW = ../../doc/makedoc -f $(srcdir)/../../doc/doc.str
-TARGETDOC = ../tmp.texi
-CLEANFILES = $(CHEWOUT_FILES) *.ref
+CHAPTERS = stdlib.tex
all: all-am
.SUFFIXES:
@@ -646,6 +663,12 @@ lib_a-abs.o: 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-aligned_alloc.o: aligned_alloc.c
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-aligned_alloc.o `test -f 'aligned_alloc.c' || echo '$(srcdir)/'`aligned_alloc.c
+
+lib_a-aligned_alloc.obj: aligned_alloc.c
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-aligned_alloc.obj `if test -f 'aligned_alloc.c'; then $(CYGPATH_W) 'aligned_alloc.c'; else $(CYGPATH_W) '$(srcdir)/aligned_alloc.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
@@ -754,6 +777,12 @@ lib_a-getenv_r.o: 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-itoa.o: itoa.c
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-itoa.o `test -f 'itoa.c' || echo '$(srcdir)/'`itoa.c
+
+lib_a-itoa.obj: itoa.c
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-itoa.obj `if test -f 'itoa.c'; then $(CYGPATH_W) 'itoa.c'; else $(CYGPATH_W) '$(srcdir)/itoa.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
@@ -832,6 +861,18 @@ lib_a-mstats.o: 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-on_exit_args.o: on_exit_args.c
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-on_exit_args.o `test -f 'on_exit_args.c' || echo '$(srcdir)/'`on_exit_args.c
+
+lib_a-on_exit_args.obj: on_exit_args.c
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-on_exit_args.obj `if test -f 'on_exit_args.c'; then $(CYGPATH_W) 'on_exit_args.c'; else $(CYGPATH_W) '$(srcdir)/on_exit_args.c'; fi`
+
+lib_a-quick_exit.o: quick_exit.c
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-quick_exit.o `test -f 'quick_exit.c' || echo '$(srcdir)/'`quick_exit.c
+
+lib_a-quick_exit.obj: quick_exit.c
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-quick_exit.obj `if test -f 'quick_exit.c'; then $(CYGPATH_W) 'quick_exit.c'; else $(CYGPATH_W) '$(srcdir)/quick_exit.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
@@ -844,6 +885,12 @@ lib_a-rand_r.o: 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-random.o: random.c
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-random.o `test -f 'random.c' || echo '$(srcdir)/'`random.c
+
+lib_a-random.obj: random.c
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-random.obj `if test -f 'random.c'; then $(CYGPATH_W) 'random.c'; else $(CYGPATH_W) '$(srcdir)/random.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
@@ -868,18 +915,36 @@ lib_a-strtod.o: 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-strtodg.o: strtodg.c
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-strtodg.o `test -f 'strtodg.c' || echo '$(srcdir)/'`strtodg.c
+
+lib_a-strtodg.obj: strtodg.c
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-strtodg.obj `if test -f 'strtodg.c'; then $(CYGPATH_W) 'strtodg.c'; else $(CYGPATH_W) '$(srcdir)/strtodg.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-strtorx.o: strtorx.c
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-strtorx.o `test -f 'strtorx.c' || echo '$(srcdir)/'`strtorx.c
+
+lib_a-strtorx.obj: strtorx.c
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-strtorx.obj `if test -f 'strtorx.c'; then $(CYGPATH_W) 'strtorx.c'; else $(CYGPATH_W) '$(srcdir)/strtorx.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-utoa.o: utoa.c
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-utoa.o `test -f 'utoa.c' || echo '$(srcdir)/'`utoa.c
+
+lib_a-utoa.obj: utoa.c
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-utoa.obj `if test -f 'utoa.c'; then $(CYGPATH_W) 'utoa.c'; else $(CYGPATH_W) '$(srcdir)/utoa.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
@@ -934,6 +999,18 @@ lib_a-wcstold.o: 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-arc4random.o: arc4random.c
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-arc4random.o `test -f 'arc4random.c' || echo '$(srcdir)/'`arc4random.c
+
+lib_a-arc4random.obj: arc4random.c
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-arc4random.obj `if test -f 'arc4random.c'; then $(CYGPATH_W) 'arc4random.c'; else $(CYGPATH_W) '$(srcdir)/arc4random.c'; fi`
+
+lib_a-arc4random_uniform.o: arc4random_uniform.c
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-arc4random_uniform.o `test -f 'arc4random_uniform.c' || echo '$(srcdir)/'`arc4random_uniform.c
+
+lib_a-arc4random_uniform.obj: arc4random_uniform.c
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-arc4random_uniform.obj `if test -f 'arc4random_uniform.c'; then $(CYGPATH_W) 'arc4random_uniform.c'; else $(CYGPATH_W) '$(srcdir)/arc4random_uniform.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
@@ -1222,6 +1299,12 @@ lib_a-setenv_r.o: 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-rpmatch.o: rpmatch.c
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-rpmatch.o `test -f 'rpmatch.c' || echo '$(srcdir)/'`rpmatch.c
+
+lib_a-rpmatch.obj: rpmatch.c
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-rpmatch.obj `if test -f 'rpmatch.c'; then $(CYGPATH_W) 'rpmatch.c'; else $(CYGPATH_W) '$(srcdir)/rpmatch.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
@@ -1412,6 +1495,18 @@ objectlist.awk.in: $(noinst_LTLIBRARIES)
echo $$i `pwd`/$$i >> objectlist.awk.in ; \
done
+.c.def:
+ $(CHEW) < $< > $*.def 2> $*.ref
+ touch stmp-def
+
+TARGETDOC ?= ../tmp.texi
+
+doc: $(CHEWOUT_FILES)
+ for chapter in $(CHAPTERS) ; \
+ do \
+ cat $(srcdir)/$$chapter >> $(TARGETDOC) ; \
+ done
+
$(lpfx)$(MALLOCR).$(oext): $(MALLOCR).c
$(MALLOC_COMPILE) -DDEFINE_MALLOC -c $(srcdir)/$(MALLOCR).c -o $@
@@ -1448,13 +1543,6 @@ $(lpfx)$(MSIZER).$(oext): $(MALLOCR).c
$(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
diff --git a/newlib/libc/stdlib/__atexit.c b/newlib/libc/stdlib/__atexit.c
index 18edc8c91..d07f6c122 100644
--- a/newlib/libc/stdlib/__atexit.c
+++ b/newlib/libc/stdlib/__atexit.c
@@ -79,16 +79,31 @@ _DEFUN (__register_exitproc,
p = _GLOBAL_ATEXIT;
if (p == NULL)
- _GLOBAL_ATEXIT = p = _GLOBAL_ATEXIT0;
+ {
+ _GLOBAL_ATEXIT = p = _GLOBAL_ATEXIT0;
+#ifdef _REENT_SMALL
+ extern struct _on_exit_args * const __on_exit_args _ATTRIBUTE ((weak));
+ if (&__on_exit_args != NULL)
+ p->_on_exit_args_ptr = __on_exit_args;
+#endif /* def _REENT_SMALL */
+ }
if (p->_ind >= _ATEXIT_SIZE)
{
#ifndef _ATEXIT_DYNAMIC_ALLOC
+#ifndef __SINGLE_THREAD__
+ __lock_release_recursive(__atexit_lock);
+#endif
return -1;
#else
/* Don't dynamically allocate the atexit array if malloc is not
available. */
if (!malloc)
- return -1;
+ {
+#ifndef __SINGLE_THREAD__
+ __lock_release_recursive(__atexit_lock);
+#endif
+ return -1;
+ }
p = (struct _atexit *) malloc (sizeof *p);
if (p == NULL)
@@ -116,6 +131,12 @@ _DEFUN (__register_exitproc,
args = p->_on_exit_args_ptr;
if (args == NULL)
{
+#ifndef _ATEXIT_DYNAMIC_ALLOC
+#ifndef __SINGLE_THREAD__
+ __lock_release_recursive(__atexit_lock);
+#endif
+ return -1;
+#else
if (malloc)
args = malloc (sizeof * p->_on_exit_args_ptr);
@@ -129,6 +150,7 @@ _DEFUN (__register_exitproc,
args->_fntypes = 0;
args->_is_cxa = 0;
p->_on_exit_args_ptr = args;
+#endif
}
#else
args = &p->_on_exit_args;
diff --git a/newlib/libc/stdlib/aligned_alloc.c b/newlib/libc/stdlib/aligned_alloc.c
new file mode 100644
index 000000000..88413ce86
--- /dev/null
+++ b/newlib/libc/stdlib/aligned_alloc.c
@@ -0,0 +1,38 @@
+/*-
+ * Copyright (c) 2015 embedded brains GmbH
+ * 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>
+
+void *
+aligned_alloc(size_t alignment, size_t size)
+{
+ void *p;
+ int error;
+
+ error = posix_memalign(&p, alignment, size);
+
+ return (error == 0 ? p : NULL);
+}
diff --git a/newlib/libc/stdlib/arc4random.c b/newlib/libc/stdlib/arc4random.c
new file mode 100644
index 000000000..75cdff3bc
--- /dev/null
+++ b/newlib/libc/stdlib/arc4random.c
@@ -0,0 +1,195 @@
+/* $OpenBSD: arc4random.c,v 1.52 2015/01/16 16:48:51 deraadt Exp $ */
+
+/*
+ * Copyright (c) 1996, David Mazieres <dm@uun.org>
+ * Copyright (c) 2008, Damien Miller <djm@openbsd.org>
+ * Copyright (c) 2013, Markus Friedl <markus@openbsd.org>
+ * Copyright (c) 2014, Theo de Raadt <deraadt@openbsd.org>
+ *
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ * ANY SPECIAL, DIRECT, 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.
+ */
+
+/*
+ * ChaCha based random number generator for OpenBSD.
+ */
+
+#include <fcntl.h>
+#include <limits.h>
+#include <signal.h>
+#include <stdint.h>
+#include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
+#include <sys/types.h>
+#include <sys/time.h>
+
+#define KEYSTREAM_ONLY
+#include "chacha_private.h"
+
+#define min(a, b) ((a) < (b) ? (a) : (b))
+#ifdef __GNUC__
+#define inline __inline
+#else /* !__GNUC__ */
+#define inline
+#endif /* !__GNUC__ */
+
+#define KEYSZ 32
+#define IVSZ 8
+#define BLOCKSZ 64
+#define RSBUFSZ (16*BLOCKSZ)
+
+/* Marked MAP_INHERIT_ZERO, so zero'd out in fork children. */
+static struct _rs {
+ size_t rs_have; /* valid bytes at end of rs_buf */
+ size_t rs_count; /* bytes till reseed */
+} *rs;
+
+/* Maybe be preserved in fork children, if _rs_allocate() decides. */
+static struct _rsx {
+ chacha_ctx rs_chacha; /* chacha context for random keystream */
+ u_char rs_buf[RSBUFSZ]; /* keystream blocks */
+} *rsx;
+
+static inline int _rs_allocate(struct _rs **, struct _rsx **);
+static inline void _rs_forkdetect(void);
+#include "arc4random.h"
+
+static inline void _rs_rekey(u_char *dat, size_t datlen);
+
+static inline void
+_rs_init(u_char *buf, size_t n)
+{
+ if (n < KEYSZ + IVSZ)
+ return;
+
+ if (rs == NULL) {
+ if (_rs_allocate(&rs, &rsx) == -1)
+ abort();
+ }
+
+ chacha_keysetup(&rsx->rs_chacha, buf, KEYSZ * 8, 0);
+ chacha_ivsetup(&rsx->rs_chacha, buf + KEYSZ);
+}
+
+static void
+_rs_stir(void)
+{
+ u_char rnd[KEYSZ + IVSZ];
+
+ if (getentropy(rnd, sizeof rnd) == -1)
+ _getentropy_fail();
+
+ if (!rs)
+ _rs_init(rnd, sizeof(rnd));
+ else
+ _rs_rekey(rnd, sizeof(rnd));
+ explicit_bzero(rnd, sizeof(rnd)); /* discard source seed */
+
+ /* invalidate rs_buf */
+ rs->rs_have = 0;
+ memset(rsx->rs_buf, 0, sizeof(rsx->rs_buf));
+
+ rs->rs_count = 1600000;
+}
+
+static inline void
+_rs_stir_if_needed(size_t len)
+{
+ _rs_forkdetect();
+ if (!rs || rs->rs_count <= len)
+ _rs_stir();
+ if (rs->rs_count <= len)
+ rs->rs_count = 0;
+ else
+ rs->rs_count -= len;
+}
+
+static inline void
+_rs_rekey(u_char *dat, size_t datlen)
+{
+#ifndef KEYSTREAM_ONLY
+ memset(rsx->rs_buf, 0, sizeof(rsx->rs_buf));
+#endif
+ /* fill rs_buf with the keystream */
+ chacha_encrypt_bytes(&rsx->rs_chacha, rsx->rs_buf,
+ rsx->rs_buf, sizeof(rsx->rs_buf));
+ /* mix in optional user provided data */
+ if (dat) {
+ size_t i, m;
+
+ m = min(datlen, KEYSZ + IVSZ);
+ for (i = 0; i < m; i++)
+ rsx->rs_buf[i] ^= dat[i];
+ }
+ /* immediately reinit for backtracking resistance */
+ _rs_init(rsx->rs_buf, KEYSZ + IVSZ);
+ memset(rsx->rs_buf, 0, KEYSZ + IVSZ);
+ rs->rs_have = sizeof(rsx->rs_buf) - KEYSZ - IVSZ;
+}
+
+static inline void
+_rs_random_buf(void *_buf, size_t n)
+{
+ u_char *buf = (u_char *)_buf;
+ u_char *keystream;
+ size_t m;
+
+ _rs_stir_if_needed(n);
+ while (n > 0) {
+ if (rs->rs_have > 0) {
+ m = min(n, rs->rs_have);
+ keystream = rsx->rs_buf + sizeof(rsx->rs_buf)
+ - rs->rs_have;
+ memcpy(buf, keystream, m);
+ memset(keystream, 0, m);
+ buf += m;
+ n -= m;
+ rs->rs_have -= m;
+ }
+ if (rs->rs_have == 0)
+ _rs_rekey(NULL, 0);
+ }
+}
+
+static inline void
+_rs_random_u32(uint32_t *val)
+{
+ u_char *keystream;
+
+ _rs_stir_if_needed(sizeof(*val));
+ if (rs->rs_have < sizeof(*val))
+ _rs_rekey(NULL, 0);
+ keystream = rsx->rs_buf + sizeof(rsx->rs_buf) - rs->rs_have;
+ memcpy(val, keystream, sizeof(*val));
+ memset(keystream, 0, sizeof(*val));
+ rs->rs_have -= sizeof(*val);
+}
+
+uint32_t
+arc4random(void)
+{
+ uint32_t val;
+
+ _ARC4_LOCK();
+ _rs_random_u32(&val);
+ _ARC4_UNLOCK();
+ return val;
+}
+
+void
+arc4random_buf(void *buf, size_t n)
+{
+ _ARC4_LOCK();
+ _rs_random_buf(buf, n);
+ _ARC4_UNLOCK();
+}
diff --git a/newlib/libc/stdlib/arc4random.h b/newlib/libc/stdlib/arc4random.h
new file mode 100644
index 000000000..54bcbe8ae
--- /dev/null
+++ b/newlib/libc/stdlib/arc4random.h
@@ -0,0 +1,89 @@
+/*-
+ * Copyright (c) 2016 embedded brains GmbH
+ * 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.
+ */
+
+/*
+ * Newlib ports may override the default implementations via the following
+ * define and macros
+ * o _ARC4RANDOM_DATA,
+ * o _ARC4RANDOM_GETENTROPY_FAIL(),
+ * o _ARC4RANDOM_ALLOCATE(rsp, rspx), and
+ * o _ARC4RANDOM_FORKDETECT().
+ */
+#include <machine/_arc4random.h>
+
+#include <sys/lock.h>
+#include <signal.h>
+
+#ifndef _ARC4_LOCK_INIT
+
+#define _ARC4_LOCK_INIT __LOCK_INIT(static, _arc4random_mutex);
+
+#define _ARC4_LOCK() __lock_acquire(_arc4random_mutex)
+
+#define _ARC4_UNLOCK() __lock_release(_arc4random_mutex)
+
+#endif /* _ARC4_LOCK_INIT */
+
+_ARC4_LOCK_INIT
+
+#ifdef _ARC4RANDOM_DATA
+_ARC4RANDOM_DATA
+#else
+static struct {
+ struct _rs rs;
+ struct _rsx rsx;
+} _arc4random_data;
+#endif
+
+static inline void
+_getentropy_fail(void)
+{
+#ifdef _ARC4RANDOM_GETENTROPY_FAIL
+ _ARC4RANDOM_GETENTROPY_FAIL();
+#else
+ raise(SIGKILL);
+#endif
+}
+
+static inline int
+_rs_allocate(struct _rs **rsp, struct _rsx **rsxp)
+{
+#ifdef _ARC4RANDOM_ALLOCATE
+ _ARC4RANDOM_ALLOCATE(rsp, rsxp);
+#else
+ *rsp = &_arc4random_data.rs;
+ *rsxp = &_arc4random_data.rsx;
+ return (0);
+#endif
+}
+
+static inline void
+_rs_forkdetect(void)
+{
+#ifdef _ARC4RANDOM_FORKDETECT
+ _ARC4RANDOM_FORKDETECT();
+#endif
+}
diff --git a/newlib/libc/stdlib/arc4random_uniform.c b/newlib/libc/stdlib/arc4random_uniform.c
new file mode 100644
index 000000000..1aa9a622f
--- /dev/null
+++ b/newlib/libc/stdlib/arc4random_uniform.c
@@ -0,0 +1,56 @@
+/* $OpenBSD: arc4random_uniform.c,v 1.1 2014/07/12 13:24:54 deraadt Exp $ */
+
+/*
+ * Copyright (c) 2008, Damien Miller <djm@openbsd.org>
+ *
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ * ANY SPECIAL, DIRECT, 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.
+ */
+
+#include <sys/types.h>
+#include <stdlib.h>
+
+/*
+ * Calculate a uniformly distributed random number less than upper_bound
+ * avoiding "modulo bias".
+ *
+ * Uniformity is achieved by generating new random numbers until the one
+ * returned is outside the range [0, 2**32 % upper_bound). This
+ * guarantees the selected random number will be inside
+ * [2**32 % upper_bound, 2**32) which maps back to [0, upper_bound)
+ * after reduction modulo upper_bound.
+ */
+uint32_t
+arc4random_uniform(uint32_t upper_bound)
+{
+ uint32_t r, min;
+
+ if (upper_bound < 2)
+ return 0;
+
+ /* 2**32 % x == (2**32 - x) % x */
+ min = -upper_bound % upper_bound;
+
+ /*
+ * This could theoretically loop forever but each retry has
+ * p > 0.5 (worst case, usually far better) of selecting a
+ * number inside the range we need, so it should rarely need
+ * to re-roll.
+ */
+ for (;;) {
+ r = arc4random();
+ if (r >= min)
+ break;
+ }
+
+ return r % upper_bound;
+}
diff --git a/newlib/libc/stdlib/chacha_private.h b/newlib/libc/stdlib/chacha_private.h
new file mode 100644
index 000000000..0a3e38c10
--- /dev/null
+++ b/newlib/libc/stdlib/chacha_private.h
@@ -0,0 +1,221 @@
+/*
+chacha-merged.c version 20080118
+D. J. Bernstein
+Public domain.
+*/
+
+/* $OpenBSD: chacha_private.h,v 1.2 2013/10/04 07:02:27 djm Exp $ */
+
+#include <stdint.h>
+
+typedef uint8_t u8;
+typedef uint32_t u32;
+
+typedef struct
+{
+ u32 input[16]; /* could be compressed */
+} chacha_ctx;
+
+#define U8V(v) ((u8)(v))
+#define U32V(v) ((u32)(v))
+
+#define ROTL32(v, n) \
+ (U32V((v) << (n)) | ((v) >> (32 - (n))))
+
+#define U8TO32_LITTLE(p) \
+ (((u32)((p)[0]) ) | \
+ ((u32)((p)[1]) << 8) | \
+ ((u32)((p)[2]) << 16) | \
+ ((u32)((p)[3]) << 24))
+
+#define U32TO8_LITTLE(p, v) \
+ do { \
+ (p)[0] = U8V((v) ); \
+ (p)[1] = U8V((v) >> 8); \
+ (p)[2] = U8V((v) >> 16); \
+ (p)[3] = U8V((v) >> 24); \
+ } while (0)
+
+#define ROTATE(v,c) (ROTL32(v,c))
+#define XOR(v,w) ((v) ^ (w))
+#define PLUS(v,w) (U32V((v) + (w)))
+#define PLUSONE(v) (PLUS((v),1))
+
+#define QUARTERROUND(a,b,c,d) \
+ a = PLUS(a,b); d = ROTATE(XOR(d,a),16); \
+ c = PLUS(c,d); b = ROTATE(XOR(b,c),12); \
+ a = PLUS(a,b); d = ROTATE(XOR(d,a), 8); \
+ c = PLUS(c,d); b = ROTATE(XOR(b,c), 7);
+
+static const char sigma[16] = "expand 32-byte k";
+static const char tau[16] = "expand 16-byte k";
+
+static void
+chacha_keysetup(chacha_ctx *x,const u8 *k,u32 kbits,u32 ivbits)
+{
+ const char *constants;
+
+ x->input[4] = U8TO32_LITTLE(k + 0);
+ x->input[5] = U8TO32_LITTLE(k + 4);
+ x->input[6] = U8TO32_LITTLE(k + 8);
+ x->input[7] = U8TO32_LITTLE(k + 12);
+ if (kbits == 256) { /* recommended */
+ k += 16;
+ constants = sigma;
+ } else { /* kbits == 128 */
+ constants = tau;
+ }
+ x->input[8] = U8TO32_LITTLE(k + 0);
+ x->input[9] = U8TO32_LITTLE(k + 4);
+ x->input[10] = U8TO32_LITTLE(k + 8);
+ x->input[11] = U8TO32_LITTLE(k + 12);
+ x->input[0] = U8TO32_LITTLE(constants + 0);
+ x->input[1] = U8TO32_LITTLE(constants + 4);
+ x->input[2] = U8TO32_LITTLE(constants + 8);
+ x->input[3] = U8TO32_LITTLE(constants + 12);
+}
+
+static void
+chacha_ivsetup(chacha_ctx *x,const u8 *iv)
+{
+ x->input[12] = 0;
+ x->input[13] = 0;
+ x->input[14] = U8TO32_LITTLE(iv + 0);
+ x->input[15] = U8TO32_LITTLE(iv + 4);
+}
+
+static void
+chacha_encrypt_bytes(chacha_ctx *x,const u8 *m,u8 *c,u32 bytes)
+{
+ u32 x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15;
+ u32 j0, j1, j2, j3, j4, j5, j6, j7, j8, j9, j10, j11, j12, j13, j14, j15;
+ u8 *ctarget = NULL;
+ u8 tmp[64];
+ u_int i;
+
+ if (!bytes) return;
+
+ j0 = x->input[0];
+ j1 = x->input[1];
+ j2 = x->input[2];
+ j3 = x->input[3];
+ j4 = x->input[4];
+ j5 = x->input[5];
+ j6 = x->input[6];
+ j7 = x->input[7];
+ j8 = x->input[8];
+ j9 = x->input[9];
+ j10 = x->input[10];
+ j11 = x->input[11];
+ j12 = x->input[12];
+ j13 = x->input[13];
+ j14 = x->input[14];
+ j15 = x->input[15];
+
+ for (;;) {
+ if (bytes < 64) {
+ for (i = 0;i < bytes;++i) tmp[i] = m[i];
+ m = tmp;
+ ctarget = c;
+ c = tmp;
+ }
+ x0 = j0;
+ x1 = j1;
+ x2 = j2;
+ x3 = j3;
+ x4 = j4;
+ x5 = j5;
+ x6 = j6;
+ x7 = j7;
+ x8 = j8;
+ x9 = j9;
+ x10 = j10;
+ x11 = j11;
+ x12 = j12;
+ x13 = j13;
+ x14 = j14;
+ x15 = j15;
+ for (i = 20;i > 0;i -= 2) {
+ QUARTERROUND( x0, x4, x8,x12)
+ QUARTERROUND( x1, x5, x9,x13)
+ QUARTERROUND( x2, x6,x10,x14)
+ QUARTERROUND( x3, x7,x11,x15)
+ QUARTERROUND( x0, x5,x10,x15)
+ QUARTERROUND( x1, x6,x11,x12)
+ QUARTERROUND( x2, x7, x8,x13)
+ QUARTERROUND( x3, x4, x9,x14)
+ }
+ x0 = PLUS(x0,j0);
+ x1 = PLUS(x1,j1);
+ x2 = PLUS(x2,j2);
+ x3 = PLUS(x3,j3);
+ x4 = PLUS(x4,j4);
+ x5 = PLUS(x5,j5);
+ x6 = PLUS(x6,j6);
+ x7 = PLUS(x7,j7);
+ x8 = PLUS(x8,j8);
+ x9 = PLUS(x9,j9);
+ x10 = PLUS(x10,j10);
+ x11 = PLUS(x11,j11);
+ x12 = PLUS(x12,j12);
+ x13 = PLUS(x13,j13);
+ x14 = PLUS(x14,j14);
+ x15 = PLUS(x15,j15);
+
+#ifndef KEYSTREAM_ONLY
+ x0 = XOR(x0,U8TO32_LITTLE(m + 0));
+ x1 = XOR(x1,U8TO32_LITTLE(m + 4));
+ x2 = XOR(x2,U8TO32_LITTLE(m + 8));
+ x3 = XOR(x3,U8TO32_LITTLE(m + 12));
+ x4 = XOR(x4,U8TO32_LITTLE(m + 16));
+ x5 = XOR(x5,U8TO32_LITTLE(m + 20));
+ x6 = XOR(x6,U8TO32_LITTLE(m + 24));
+ x7 = XOR(x7,U8TO32_LITTLE(m + 28));
+ x8 = XOR(x8,U8TO32_LITTLE(m + 32));
+ x9 = XOR(x9,U8TO32_LITTLE(m + 36));
+ x10 = XOR(x10,U8TO32_LITTLE(m + 40));
+ x11 = XOR(x11,U8TO32_LITTLE(m + 44));
+ x12 = XOR(x12,U8TO32_LITTLE(m + 48));
+ x13 = XOR(x13,U8TO32_LITTLE(m + 52));
+ x14 = XOR(x14,U8TO32_LITTLE(m + 56));
+ x15 = XOR(x15,U8TO32_LITTLE(m + 60));
+#endif
+
+ j12 = PLUSONE(j12);
+ if (!j12) {
+ j13 = PLUSONE(j13);
+ /* stopping at 2^70 bytes per nonce is user's responsibility */
+ }
+
+ U32TO8_LITTLE(c + 0,x0);
+ U32TO8_LITTLE(c + 4,x1);
+ U32TO8_LITTLE(c + 8,x2);
+ U32TO8_LITTLE(c + 12,x3);
+ U32TO8_LITTLE(c + 16,x4);
+ U32TO8_LITTLE(c + 20,x5);
+ U32TO8_LITTLE(c + 24,x6);
+ U32TO8_LITTLE(c + 28,x7);
+ U32TO8_LITTLE(c + 32,x8);
+ U32TO8_LITTLE(c + 36,x9);
+ U32TO8_LITTLE(c + 40,x10);
+ U32TO8_LITTLE(c + 44,x11);
+ U32TO8_LITTLE(c + 48,x12);
+ U32TO8_LITTLE(c + 52,x13);
+ U32TO8_LITTLE(c + 56,x14);
+ U32TO8_LITTLE(c + 60,x15);
+
+ if (bytes <= 64) {
+ if (bytes < 64) {
+ for (i = 0;i < bytes;++i) ctarget[i] = c[i];
+ }
+ x->input[12] = j12;
+ x->input[13] = j13;
+ return;
+ }
+ bytes -= 64;
+ c += 64;
+#ifndef KEYSTREAM_ONLY
+ m += 64;
+#endif
+ }
+}
diff --git a/newlib/libc/stdlib/cxa_atexit.c b/newlib/libc/stdlib/cxa_atexit.c
index c3c0d2a17..39a59d53a 100644
--- a/newlib/libc/stdlib/cxa_atexit.c
+++ b/newlib/libc/stdlib/cxa_atexit.c
@@ -8,6 +8,15 @@
#include <sys/lock.h>
#include "atexit.h"
+#ifdef _REENT_SMALL
+
+#include "on_exit_args.h"
+
+/* force linking of static instance of _on_exit_args */
+const void * const __cxa_atexit_dummy = &__on_exit_args;
+
+#endif /* def _REENT_SMALL */
+
/*
* Register a function to be performed at exit or DSO unload.
*/
diff --git a/newlib/libc/stdlib/efgcvt.c b/newlib/libc/stdlib/efgcvt.c
index ba0250490..b7d9812f6 100644
--- a/newlib/libc/stdlib/efgcvt.c
+++ b/newlib/libc/stdlib/efgcvt.c
@@ -84,7 +84,7 @@ Supporting OS subroutines required: <<close>>, <<fstat>>, <<isatty>>,
NEWPAGE
FUNCTION
-<<gvcvt>>, <<gcvtf>>---format double or float as string
+<<gcvt>>, <<gcvtf>>---format double or float as string
INDEX
gcvt
@@ -111,7 +111,7 @@ TRAD_SYNOPSIS
DESCRIPTION
<<gcvt>> writes a fully formatted number as a null-terminated
-string in the buffer <<*<[buf]>>>. <<gdvtf>> produces corresponding
+string in the buffer <<*<[buf]>>>. <<gcvtf>> produces corresponding
character representations of <<float>> numbers.
<<gcvt>> uses the same rules as the <<printf>> format
@@ -131,6 +131,8 @@ Supporting OS subroutines required: <<close>>, <<fstat>>, <<isatty>>,
<<lseek>>, <<read>>, <<sbrk>>, <<write>>.
*/
+#define _XOPEN_SOURCE
+#define _XOPEN_SOURCE_EXTENDED
#include <_ansi.h>
#include <reent.h>
#include <stdio.h>
diff --git a/newlib/libc/stdlib/gd_qnan.h b/newlib/libc/stdlib/gd_qnan.h
index 68f16cd12..b775f82d4 100644
--- a/newlib/libc/stdlib/gd_qnan.h
+++ b/newlib/libc/stdlib/gd_qnan.h
@@ -1,5 +1,6 @@
#ifdef __IEEE_BIG_ENDIAN
+#if !defined(__mips)
#define f_QNAN 0x7fc00000
#define d_QNAN0 0x7ff80000
#define d_QNAN1 0x0
@@ -12,9 +13,19 @@
#define ldus_QNAN2 0x0
#define ldus_QNAN3 0x0
#define ldus_QNAN4 0x0
+#elif defined(__mips_nan2008)
+#define f_QNAN 0x7fc00000
+#define d_QNAN0 0x7ff80000
+#define d_QNAN1 0x0
+#else
+#define f_QNAN 0x7fbfffff
+#define d_QNAN0 0x7ff7ffff
+#define d_QNAN1 0xffffffff
+#endif
#elif defined(__IEEE_LITTLE_ENDIAN)
+#if !defined(__mips)
#define f_QNAN 0xffc00000
#define d_QNAN0 0x0
#define d_QNAN1 0xfff80000
@@ -27,6 +38,15 @@
#define ldus_QNAN2 0x0
#define ldus_QNAN3 0xc000
#define ldus_QNAN4 0xffff
+#elif defined(__mips_nan2008)
+#define f_QNAN 0x7fc00000
+#define d_QNAN0 0x0
+#define d_QNAN1 0x7ff80000
+#else
+#define f_QNAN 0x7fbfffff
+#define d_QNAN0 0xffffffff
+#define d_QNAN1 0x7ff7ffff
+#endif
#else
#error IEEE endian not defined
diff --git a/newlib/libc/stdlib/gdtoa-hexnan.c b/newlib/libc/stdlib/gdtoa-hexnan.c
index 463000528..24e3783be 100644
--- a/newlib/libc/stdlib/gdtoa-hexnan.c
+++ b/newlib/libc/stdlib/gdtoa-hexnan.c
@@ -44,6 +44,24 @@ THIS SOFTWARE.
#include "gdtoa.h"
#ifdef INFNAN_CHECK
+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;
+}
+
static void
_DEFUN (L_shift, (x, x1, i),
__ULong *x _AND
diff --git a/newlib/libc/stdlib/gdtoa.h b/newlib/libc/stdlib/gdtoa.h
index 5029e58de..07506aac1 100644
--- a/newlib/libc/stdlib/gdtoa.h
+++ b/newlib/libc/stdlib/gdtoa.h
@@ -70,3 +70,5 @@ enum { /* FPI.rounding values: same as FLT_ROUNDS */
};
#endif /* GDTOA_H_INCLUDED */
+
+typedef unsigned short __UShort;
diff --git a/newlib/libc/stdlib/getopt.c b/newlib/libc/stdlib/getopt.c
index 2bea694e8..109474764 100644
--- a/newlib/libc/stdlib/getopt.c
+++ b/newlib/libc/stdlib/getopt.c
@@ -177,7 +177,9 @@ write_globals (struct getopt_data *data)
optwhere = data->optwhere;
}
-/* getopt_internal: the function that does all the dirty work */
+/* getopt_internal: the function that does all the dirty work
+ NOTE: to reduce the code and RAM footprint this function uses
+ fputs()/fputc() to do output to stderr instead of fprintf(). */
static int
getopt_internal (int argc, char *const argv[], const char *shortopts,
const struct option *longopts, int *longind, int only,
@@ -269,6 +271,10 @@ getopt_internal (int argc, char *const argv[], const char *shortopts,
break;
}
}
+ /* End of option list? */
+ if (argv[data->optind] == 0)
+ return EOF;
+
/* we've got an option, so parse it */
/* first, is it a long option? */
@@ -297,7 +303,7 @@ getopt_internal (int argc, char *const argv[], const char *shortopts,
match_chars) == 0)
{
/* do we have an exact match? */
- if (match_chars == (int) (strlen (longopts[optindex].name)))
+ if (match_chars == strlen (longopts[optindex].name))
{
longopt_match = optindex;
break;
@@ -311,12 +317,16 @@ getopt_internal (int argc, char *const argv[], const char *shortopts,
{
/* 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);
+ {
+ fputs (argv[0], stderr);
+ fputs (": option `", stderr);
+ fputs (argv[data->optind], stderr);
+ fputs ("' is ambiguous (could be `--", stderr);
+ fputs (longopts[longopt_match].name, stderr);
+ fputs ("' or `--", stderr);
+ fputs (longopts[optindex].name, stderr);
+ fputs ("')\n", stderr);
+ }
return (data->optopt = '?');
}
}
@@ -334,9 +344,12 @@ getopt_internal (int argc, char *const argv[], const char *shortopts,
{
/* couldn't find option in shortopts */
if (data->opterr)
- fprintf (stderr,
- "%s: invalid option -- `-%c'\n",
- argv[0], argv[data->optind][data->optwhere]);
+ {
+ fputs (argv[0], stderr);
+ fputs (": invalid option -- `-", stderr);
+ fputc (argv[data->optind][data->optwhere], stderr);
+ fputs ("'\n", stderr);
+ }
data->optwhere++;
if (argv[data->optind][data->optwhere] == '\0')
{
@@ -373,17 +386,20 @@ getopt_internal (int argc, char *const argv[], const char *shortopts,
{
if (data->opterr)
{
- fprintf (stderr, "%s: argument required for option `", argv[0]);
+ fputs (argv[0], stderr);
+ fputs (": argument required for option `-", stderr);
if (longopt_match >= 0)
{
- fprintf (stderr, "--%s'\n", longopts[longopt_match].name);
+ fputc ('-', stderr);
+ fputs (longopts[longopt_match].name, stderr);
data->optopt = initial_colon ? ':' : '\?';
}
else
{
- fprintf (stderr, "-%c'\n", *cp);
+ fputc (*cp, stderr);
data->optopt = *cp;
}
+ fputs ("'\n", stderr);
}
data->optind++;
return initial_colon ? ':' : '\?';
diff --git a/newlib/libc/stdlib/itoa.c b/newlib/libc/stdlib/itoa.c
new file mode 100644
index 000000000..377834d03
--- /dev/null
+++ b/newlib/libc/stdlib/itoa.c
@@ -0,0 +1,69 @@
+/*
+FUNCTION
+<<itoa>>---integer to string
+
+INDEX
+ itoa
+
+ANSI_SYNOPSIS
+ #include <stdlib.h>
+ char *itoa(int <[value]>, char *<[str]>, int <[base]>);
+ char *__itoa(int <[value]>, char *<[str]>, int <[base]>);
+
+DESCRIPTION
+<<itoa>> converts the integer <[value]> to a null-terminated string
+using the specified base, which must be between 2 and 36, inclusive.
+If <[base]> is 10, <[value]> is treated as signed and the string will be
+prefixed with '-' if negative. For all other bases, <[value]> is treated as
+unsigned. <[str]> should be an array long enough to contain the converted
+value, which in the worst case is sizeof(int)*8+1 bytes.
+
+RETURNS
+A pointer to the string, <[str]>, or NULL if <[base]> is invalid.
+
+PORTABILITY
+<<itoa>> is non-ANSI.
+
+No supporting OS subroutine calls are required.
+*/
+
+#include <stdlib.h>
+
+char *
+_DEFUN (__itoa, (value, str, base),
+ int value _AND
+ char *str _AND
+ int base)
+{
+ unsigned uvalue;
+ int i = 0;
+
+ /* Check base is supported. */
+ if ((base < 2) || (base > 36))
+ {
+ str[0] = '\0';
+ return NULL;
+ }
+
+ /* Negative numbers are only supported for decimal.
+ * Cast to unsigned to avoid overflow for maximum negative value. */
+ if ((base == 10) && (value < 0))
+ {
+ str[i++] = '-';
+ uvalue = (unsigned)-value;
+ }
+ else
+ uvalue = (unsigned)value;
+
+ __utoa (uvalue, &str[i], base);
+ return str;
+}
+
+char *
+_DEFUN (itoa, (value, str, base),
+ int value _AND
+ char *str _AND
+ int base)
+{
+ return __itoa (value, str, base);
+}
diff --git a/newlib/libc/stdlib/ldtoa.c b/newlib/libc/stdlib/ldtoa.c
index b13ac69be..a44413cd6 100644
--- a/newlib/libc/stdlib/ldtoa.c
+++ b/newlib/libc/stdlib/ldtoa.c
@@ -11,37 +11,38 @@
/* 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 *);
+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);
+void _IO_ldtostr (long double *, char *, int, int, char);
#endif
/* Number of 16 bit words in external x type format */
- #define NE 10
+#define NE 10
/* Number of 16 bit words in internal format */
- #define NI (NE+3)
+#define NI (NE+3)
/* Array offset to exponent */
- #define E 1
+#define E 1
/* Array offset to high guard word */
- #define M 2
+#define M 2
/* Number of bits of precision */
- #define NBITS ((NI-4)*16)
+#define NBITS ((NI-4)*16)
/* Maximum number of decimal digits in ASCII conversion
* = NBITS*log10(2)
*/
- #define NDEC (NBITS*8/27)
+#define NDEC (NBITS*8/27)
/* The exponent of 1.0 */
- #define EXONE (0x3fff)
+#define EXONE (0x3fff)
/* Maximum exponent digits - base 10 */
- #define MAX_EXP_DIGITS 5
+#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.
@@ -60,24 +61,30 @@ typedef struct
unsigned short equot[NI];
} LDPARMS;
-static void esub(_CONST short unsigned int *a, _CONST short unsigned int *b, short unsigned int *c, LDPARMS *ldp);
-static void emul(_CONST short unsigned int *a, _CONST short unsigned int *b, short unsigned int *c, LDPARMS *ldp);
-static void ediv(_CONST short unsigned int *a, _CONST short unsigned int *b, short unsigned int *c, LDPARMS *ldp);
-static int ecmp(_CONST short unsigned int *a, _CONST 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 _CONST 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);
+static void esub (_CONST short unsigned int *a, _CONST short unsigned int *b,
+ short unsigned int *c, LDPARMS * ldp);
+static void emul (_CONST short unsigned int *a, _CONST short unsigned int *b,
+ short unsigned int *c, LDPARMS * ldp);
+static void ediv (_CONST short unsigned int *a, _CONST short unsigned int *b,
+ short unsigned int *c, LDPARMS * ldp);
+static int ecmp (_CONST short unsigned int *a, _CONST 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 _CONST 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
{
@@ -86,13 +93,17 @@ union uconv
};
#if LDBL_MANT_DIG == 24
-static void e24toe(short unsigned int *pe, short unsigned int *y, LDPARMS *ldp);
+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);
+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);
+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);
+static void e113toe (short unsigned int *pe, short unsigned int *y,
+ LDPARMS * ldp);
#endif
/* econst.c */
@@ -100,23 +111,26 @@ static void e113toe(short unsigned int *pe, short unsigned int *y, LDPARMS *ldp)
#if NE == 10
/* 0.0 */
-static _CONST unsigned short ezero[NE] =
- {0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,};
+static _CONST unsigned short ezero[NE] = { 0x0000, 0x0000, 0x0000, 0x0000,
+ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+};
/* 1.0E0 */
-static _CONST unsigned short eone[NE] =
- {0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x8000, 0x3fff,};
+static _CONST unsigned short eone[NE] = { 0x0000, 0x0000, 0x0000, 0x0000,
+ 0x0000, 0x0000, 0x0000, 0x0000, 0x8000, 0x3fff,
+};
#else
/* 0.0 */
static _CONST unsigned short ezero[NE] = {
-0, 0000000,0000000,0000000,0000000,0000000,};
+ 0, 0000000, 0000000, 0000000, 0000000, 0000000,
+};
+
/* 1.0E0 */
static _CONST unsigned short eone[NE] = {
-0, 0000000,0000000,0000000,0100000,0x3fff,};
+ 0, 0000000, 0000000, 0000000, 0100000, 0x3fff,
+};
#endif
@@ -126,15 +140,16 @@ static _CONST unsigned short eone[NE] = {
* messages is bound to the error codes defined
* in mconf.h.
*/
-static _CONST char * _CONST ermsg[7] = {
-"unknown", /* error code 0 */
-"domain", /* error code 1 */
-"singularity", /* et seq. */
-"overflow",
-"underflow",
-"total loss of precision",
-"partial loss of precision"
+static _CONST char *_CONST 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)
@@ -356,17 +371,17 @@ static _CONST char * _CONST ermsg[7] = {
#define ERANGE 34
typedef struct
- {
- double r;
- double i;
- }cmplx;
+{
+ double r;
+ double i;
+} cmplx;
/* Type of computer arithmetic */
#ifndef DEC
#ifdef __IEEE_LITTLE_ENDIAN
#define IBMPC 1
-#else /* !__IEEE_LITTLE_ENDIAN */
+#else /* !__IEEE_LITTLE_ENDIAN */
#define MIEEE 1
#endif /* !__IEEE_LITTLE_ENDIAN */
#endif /* !DEC */
@@ -377,7 +392,7 @@ typedef struct
#define ANSIC 1
/*define VOLATILE volatile*/
-#define VOLATILE
+#define VOLATILE
#define NANS
#define USE_INFINITY
@@ -393,36 +408,45 @@ typedef struct
#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);
+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);
+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);
+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);
+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(_CONST short unsigned int *x);
-static int eisinf(_CONST short unsigned int *x);
-static void emovi(_CONST 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(_CONST short unsigned int *a, _CONST short unsigned int *b, short unsigned int *c, int subflg, LDPARMS *ldp);
-static int eisnan(_CONST short unsigned int *x);
-static int eiisnan(short unsigned int *x);
+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 (_CONST short unsigned int *x);
+static int eisinf (_CONST short unsigned int *x);
+static void emovi (_CONST 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 (_CONST short unsigned int *a, _CONST short unsigned int *b,
+ short unsigned int *c, int subflg, LDPARMS * ldp);
+static int eisnan (_CONST short unsigned int *x);
+static int eiisnan (short unsigned int *x);
#ifdef DEC
-static void etodec(), todec(), dectoe();
+static void etodec (), todec (), dectoe ();
#endif
/*
@@ -432,12 +456,13 @@ static void etodec(), todec(), dectoe();
; eclear( x );
*/
-static void eclear(register short unsigned int *x)
+static void
+eclear (register short unsigned int *x)
{
-register int i;
+ register int i;
-for( i=0; i<NE; i++ )
- *x++ = 0;
+ for (i = 0; i < NE; i++)
+ *x++ = 0;
}
@@ -447,12 +472,13 @@ for( i=0; i<NE; i++ )
* emov( a, b );
*/
-static void emov(register _CONST short unsigned int *a, register short unsigned int *b)
+static void
+emov (register _CONST short unsigned int *a, register short unsigned int *b)
{
-register int i;
+ register int i;
-for( i=0; i<NE; i++ )
- *b++ = *a++;
+ for (i = 0; i < NE; i++)
+ *b++ = *a++;
}
@@ -463,14 +489,15 @@ for( i=0; i<NE; i++ )
; eneg( x );
*/
-static void eneg(short unsigned int *x)
+static void
+eneg (short unsigned int *x)
{
#ifdef NANS
-if( eisnan(x) )
- return;
+ if (eisnan (x))
+ return;
#endif
-x[NE-1] ^= 0x8000; /* Toggle the sign bit */
+ x[NE - 1] ^= 0x8000; /* Toggle the sign bit */
}
@@ -478,56 +505,59 @@ x[NE-1] ^= 0x8000; /* Toggle the sign bit */
/* Return 1 if external format number is negative,
* else return zero.
*/
-static int eisneg(_CONST short unsigned int *x)
+static int
+eisneg (_CONST short unsigned int *x)
{
#ifdef NANS
-if( eisnan(x) )
- return( 0 );
+ if (eisnan (x))
+ return (0);
#endif
-if( x[NE-1] & 0x8000 )
- return( 1 );
-else
- return( 0 );
+ 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(_CONST short unsigned int *x)
+static int
+eisinf (_CONST short unsigned int *x)
{
-if( (x[NE-1] & 0x7fff) == 0x7fff )
- {
+ if ((x[NE - 1] & 0x7fff) == 0x7fff)
+ {
#ifdef NANS
- if( eisnan(x) )
- return( 0 );
+ if (eisnan (x))
+ return (0);
#endif
- return( 1 );
- }
-else
- return( 0 );
+ return (1);
+ }
+ else
+ return (0);
}
/* Check if e-type number is not a number.
*/
-static int eisnan(_CONST short unsigned int *x)
+static int
+eisnan (_CONST short unsigned int *x)
{
#ifdef NANS
-int i;
+ int i;
/* NaN has maximum exponent */
-if( (x[NE-1] & 0x7fff) != 0x7fff )
- return (0);
+ 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);
- }
+ for (i = 0; i < NE - 1; i++)
+ {
+ if (*x++ != 0)
+ return (1);
+ }
#endif
-return (0);
+ return (0);
}
/*
@@ -539,148 +569,153 @@ return (0);
; operations involving inifinity.
*/
-static void einfin(register short unsigned int *x, register LDPARMS *ldp)
+static void
+einfin (register short unsigned int *x, register LDPARMS * ldp)
{
-register int i;
+ register int i;
#ifdef USE_INFINITY
-for( i=0; i<NE-1; i++ )
- *x++ = 0;
-*x |= 32767;
-ldp = ldp;
+ 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 )
+ for (i = 0; i < NE - 1; i++)
+ *x++ = 0xffff;
+ *x |= 32766;
+ if (ldp->rndprc < NBITS)
+ {
+ if (ldp->rndprc == 113)
{
- 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;
- }
+ *(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(_CONST short unsigned int *a, short unsigned int *b)
+static void
+emovi (_CONST short unsigned int *a, short unsigned int *b)
{
-register _CONST unsigned short *p;
-register unsigned short *q;
-int i;
+ register _CONST unsigned short *p;
+ register unsigned short *q;
+ int i;
-q = b;
-p = a + (NE-1); /* point to last word of external number */
+ 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;
+ if (*p & 0x8000)
+ *q++ = 0xffff;
+ else
+ *q++ = 0;
/* get the exponent */
-*q = *p--;
-*q++ &= 0x7fff; /* delete the sign bit */
+ *q = *p--;
+ *q++ &= 0x7fff; /* delete the sign bit */
#ifdef USE_INFINITY
-if( (*(q-1) & 0x7fff) == 0x7fff )
- {
+ 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;
+ 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;
+ *q++ = 0;
/* move in the significand */
-for( i=0; i<NE-1; i++ )
- *q++ = *p--;
+ for (i = 0; i < NE - 1; i++)
+ *q++ = *p--;
/* clear low guard word */
-*q = 0;
+ *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)
+static void
+emovo (short unsigned int *a, short unsigned int *b, LDPARMS * ldp)
{
-register unsigned short *p, *q;
-unsigned short i;
+ register unsigned short *p, *q;
+ unsigned short i;
-p = a;
-q = b + (NE-1); /* point to output exponent */
+ p = a;
+ q = b + (NE - 1); /* point to output exponent */
/* combine sign and exponent */
-i = *p++;
-if( i )
- *q-- = *p++ | 0x8000;
-else
- *q-- = *p++;
+ i = *p++;
+ if (i)
+ *q-- = *p++ | 0x8000;
+ else
+ *q-- = *p++;
#ifdef USE_INFINITY
-if( *(p-1) == 0x7fff )
- {
+ if (*(p - 1) == 0x7fff)
+ {
#ifdef NANS
- if( eiisnan(a) )
- {
- enan( b, NBITS );
- return;
- }
-#endif
- einfin(b, ldp);
- return;
+ if (eiisnan (a))
+ {
+ enan (b, NBITS);
+ return;
}
#endif
+ einfin (b, ldp);
+ return;
+ }
+#endif
/* skip over guard word */
-++p;
+ ++p;
/* move the significand */
-for( i=0; i<NE-1; i++ )
- *q-- = *p++;
+ for (i = 0; i < NE - 1; i++)
+ *q-- = *p++;
}
/* Clear out internal format number.
*/
-static void ecleaz(register short unsigned int *xi)
+static void
+ecleaz (register short unsigned int *xi)
{
-register int i;
+ register int i;
-for( i=0; i<NI; i++ )
- *xi++ = 0;
+ for (i = 0; i < NI; i++)
+ *xi++ = 0;
}
/* same, but don't touch the sign. */
-static void ecleazs(register short unsigned int *xi)
+static void
+ecleazs (register short unsigned int *xi)
{
-register int i;
+ register int i;
-++xi;
-for(i=0; i<NI-1; i++)
- *xi++ = 0;
+ ++xi;
+ for (i = 0; i < NI - 1; i++)
+ *xi++ = 0;
}
@@ -688,38 +723,40 @@ for(i=0; i<NI-1; i++)
/* Move internal format number from a to b.
*/
-static void emovz(register short unsigned int *a, register short unsigned int *b)
+static void
+emovz (register short unsigned int *a, register short unsigned int *b)
{
-register int i;
+ register int i;
-for( i=0; i<NI-1; i++ )
- *b++ = *a++;
+ for (i = 0; i < NI - 1; i++)
+ *b++ = *a++;
/* clear low guard word */
-*b = 0;
+ *b = 0;
}
/* Return nonzero if internal format number is a NaN.
*/
-static int eiisnan (short unsigned int *x)
+static int
+eiisnan (short unsigned int *x)
{
-int i;
+ int i;
-if( (x[E] & 0x7fff) == 0x7fff )
+ if ((x[E] & 0x7fff) == 0x7fff)
+ {
+ for (i = M + 1; i < NI; i++)
{
- for( i=M+1; i<NI; i++ )
- {
- if( x[i] != 0 )
- return(1);
- }
+ if (x[i] != 0)
+ return (1);
}
-return(0);
+ }
+ return (0);
}
#if LDBL_MANT_DIG == 64
/* Return nonzero if internal format number is infinite. */
-static int
+static int
eiisinf (unsigned short x[])
{
@@ -745,24 +782,25 @@ eiisinf (unsigned short x[])
; 0 if a == b
; -1 if a < b
*/
-static int ecmpm(register short unsigned int *a, register short unsigned int *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);
+ 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);
+ if (*(--a) > *(--b))
+ return (1);
+ else
+ return (-1);
}
@@ -770,24 +808,25 @@ else
; Shift significand down by 1 bit
*/
-static void eshdn1(register short unsigned int *x)
+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;
- }
+ 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;
+ }
}
@@ -796,24 +835,25 @@ for( i=M; i<NI; i++ )
; Shift significand up by 1 bit
*/
-static void eshup1(register short unsigned int *x)
+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;
- }
+ 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;
+ }
}
@@ -822,79 +862,83 @@ for( i=M; i<NI; i++ )
; Shift significand down by 8 bits
*/
-static void eshdn8(register short unsigned int *x)
+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;
- }
+ 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)
+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;
- }
+ 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)
+static void
+eshup6 (register short unsigned int *x)
{
-int i;
-register unsigned short *p;
+ int i;
+ register unsigned short *p;
-p = x + M;
-x += M + 1;
+ p = x + M;
+ x += M + 1;
-for( i=M; i<NI-1; i++ )
- *p++ = *x++;
+ for (i = M; i < NI - 1; i++)
+ *p++ = *x++;
-*p = 0;
+ *p = 0;
}
/*
; Shift significand down by 16 bits
*/
-static void eshdn6(register short unsigned int *x)
+static void
+eshdn6 (register short unsigned int *x)
{
-int i;
-register unsigned short *p;
+ int i;
+ register unsigned short *p;
-x += NI-1;
-p = x + 1;
+ x += NI - 1;
+ p = x + 1;
-for( i=M; i<NI-1; i++ )
- *(--p) = *(--x);
+ for (i = M; i < NI - 1; i++)
+ *(--p) = *(--x);
-*(--p) = 0;
+ *(--p) = 0;
}
/*
@@ -902,26 +946,27 @@ for( i=M; i<NI-1; i++ )
; x + y replaces y
*/
-static void eaddm(short unsigned int *x, short unsigned int *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;
- }
+ 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;
+ }
}
/*
@@ -929,26 +974,27 @@ for( i=M; i<NI; i++ )
; y - x replaces y
*/
-static void esubm(short unsigned int *x, short unsigned int *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;
- }
+ 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;
+ }
}
@@ -958,41 +1004,42 @@ for( i=M; i<NI; i++ )
/* 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)
+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];
+ 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];
}
@@ -1000,55 +1047,56 @@ for( i=M; i<NI; i++ )
is permitted to have its high guard word nonzero. */
-static int edivm(short unsigned int *den, short unsigned int *num, LDPARMS *ldp)
+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. */
+ 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 );
- }
- }
+ /* 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 )
{
@@ -1058,7 +1106,7 @@ for( i=M; i<NI; i++ )
tnum, den[M+1], tquot );
}
*/
- esubm( tprod, num );
+ esubm (tprod, num);
/*
if( ecmpm( num, den ) >= 0 )
{
@@ -1068,64 +1116,65 @@ for( i=M; i<NI; i++ )
tnum, den[M+1], tquot );
}
*/
- equot[i] = tquot;
- eshup6(num);
- }
+ 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 );
+ 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)
+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;
+ 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;
+ 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++ )
+ j = 0;
+ p = &a[NI - 1];
+ q = &equot[NI - 1];
+ for (i = M + 1; i < NI; i++)
+ {
+ if (*p == 0)
{
- if( *p == 0 )
- {
- --p;
- }
- else
- {
- m16m( *p--, b, pprod );
- eaddm(pprod, equot);
- }
- j |= *q;
- eshdn6(equot);
+ --p;
+ }
+ else
+ {
+ m16m (*p--, b, pprod);
+ eaddm (pprod, equot);
}
+ j |= *q;
+ eshdn6 (equot);
+ }
-for( i=0; i<NI; i++ )
- b[i] = equot[i];
+ for (i = 0; i < NI; i++)
+ b[i] = equot[i];
/* return flag for lost nonzero bits */
-return( (int)j );
+ return ((int) j);
}
@@ -1163,105 +1212,107 @@ printf( "\n" );
*/
-static void emdnorm(short unsigned int *s, int lost, int subflg, long int exp, int rcntrl, LDPARMS *ldp)
+static void
+emdnorm (short unsigned int *s, int lost, int subflg, long int exp,
+ int rcntrl, LDPARMS * ldp)
{
-int i, j;
-unsigned short r;
+ int i, j;
+ unsigned short r;
/* Normalize */
-j = enormlz( s );
+ j = enormlz (s);
/* a blank significand could mean either zero or infinity. */
#ifndef USE_INFINITY
-if( j > NBITS )
- {
- ecleazs( s );
- return;
- }
+ if (j > NBITS)
+ {
+ ecleazs (s);
+ return;
+ }
#endif
-exp -= j;
+ exp -= j;
#ifndef USE_INFINITY
-if( exp >= 32767L )
- goto overf;
+ if (exp >= 32767L)
+ goto overf;
#else
-if( (j > NBITS) && (exp < 32767L) )
+ if ((j > NBITS) && (exp < 32767L))
+ {
+ ecleazs (s);
+ return;
+ }
+#endif
+ if (exp < 0L)
+ {
+ if (exp > (long) (-NBITS - 1))
{
- ecleazs( s );
- return;
+ j = (int) exp;
+ i = eshift (s, j);
+ if (i)
+ lost = 1;
}
-#endif
-if( exp < 0L )
+ else
{
- if( exp > (long )(-NBITS-1) )
- {
- j = (int )exp;
- i = eshift( s, j );
- if( i )
- lost = 1;
- }
- else
- {
- ecleazs( s );
- return;
- }
+ ecleazs (s);
+ return;
}
+ }
/* Round off, unless told not to by rcntrl. */
-if( rcntrl == 0 )
- goto mdfin;
+ if (rcntrl == 0)
+ goto mdfin;
/* Set up rounding parameters if the control register changed. */
-if( ldp->rndprc != ldp->rlast )
+ if (ldp->rndprc != ldp->rlast)
+ {
+ ecleaz (ldp->rbit);
+ switch (ldp->rndprc)
{
- 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;
+ 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;
+ 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.
@@ -1269,94 +1320,94 @@ if( ldp->rndprc != ldp->rlast )
* But Intel long double denormals lose one bit of significance even so.
*/
#if IBMPC
-if( (exp <= 0) && (ldp->rndprc != NBITS) )
+ if ((exp <= 0) && (ldp->rndprc != NBITS))
#else
-if( (exp <= 0) && (ldp->rndprc != 64) && (ldp->rndprc != NBITS) )
+ if ((exp <= 0) && (ldp->rndprc != 64) && (ldp->rndprc != NBITS))
#endif
- {
- lost |= s[NI-1] & 1;
- eshdn1(s);
- }
+ {
+ 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 );
- }
+ 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) )
+ 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;
- }
+ 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 )
- {
+ s[NI - 1] = 0;
+ if (exp >= 32767L)
+ {
#ifndef USE_INFINITY
-overf:
+ overf:
#endif
#ifdef USE_INFINITY
- s[1] = 32767;
- for( i=2; i<NI-1; i++ )
- s[i] = 0;
+ 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;
+ 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;
}
@@ -1369,133 +1420,137 @@ else
; esub( a, b, c, ldp ); c = b - a
*/
-static void esub(_CONST short unsigned int *a, _CONST short unsigned int *b, short unsigned int *c, LDPARMS *ldp)
+static void
+esub (_CONST short unsigned int *a, _CONST 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;
- }
+ 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 );
+ 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(_CONST short unsigned int *a, _CONST short unsigned int *b, short unsigned int *c, int subflg, LDPARMS *ldp)
+static void
+eadd1 (_CONST short unsigned int *a, _CONST 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;
+ 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];
+ 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
- {
+ 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 )
- {
+ 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;
+ ltb += 1;
+ break;
}
- 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 );
+ }
+ 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 );
+ emovo (bi, c, ldp);
}
@@ -1507,99 +1562,101 @@ emovo( bi, c, ldp );
; LDPARMS *ldp;
; ediv( a, b, c, ldp ); c = b / a
*/
-static void ediv(_CONST short unsigned int *a, _CONST short unsigned int *b, short unsigned int *c, LDPARMS *ldp)
+static void
+ediv (_CONST short unsigned int *a, _CONST short unsigned int *b,
+ short unsigned int *c, LDPARMS * ldp)
{
-unsigned short ai[NI], bi[NI];
-int i;
-long lt, lta, ltb;
+ 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;
- }
+ 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;
- }
+ 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;
- }
+ 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;
- }
+ 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 );
+ i = edivm (ai, bi, ldp);
/* calculate exponent */
-lt = ltb - lta + EXONE;
-emdnorm( bi, i, 0, lt, 64, ldp );
+ 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 );
+ if (ai[0] == bi[0])
+ bi[0] = 0;
+ else
+ bi[0] = 0Xffff;
+ emovo (bi, c, ldp);
}
@@ -1611,364 +1668,370 @@ emovo( bi, c, ldp );
; LDPARMS *ldp
; emul( a, b, c, ldp ); c = b * a
*/
-static void emul(_CONST short unsigned int *a, _CONST short unsigned int *b, short unsigned int *c, LDPARMS *ldp)
+static void
+emul (_CONST short unsigned int *a, _CONST short unsigned int *b,
+ short unsigned int *c, LDPARMS * ldp)
{
-unsigned short ai[NI], bi[NI];
-int i, j;
-long lt, lta, ltb;
+ 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;
- }
+ 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;
- }
+ 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;
- }
+ 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 )
+ if (bi[E] == 0)
+ {
+ for (i = 1; i < NI - 1; i++)
{
- for( i=1; i<NI-1; i++ )
- {
- if( bi[i] != 0 )
- {
- ltb -= enormlz( bi );
- goto mnzer2;
- }
- }
- eclear(c);
- return;
+ if (bi[i] != 0)
+ {
+ ltb -= enormlz (bi);
+ goto mnzer2;
+ }
}
+ eclear (c);
+ return;
+ }
mnzer2:
/* Multiply significands */
-j = emulm( ai, bi, ldp );
+ j = emulm (ai, bi, ldp);
/* calculate exponent */
-lt = lta + ltb - (EXONE - 1);
-emdnorm( bi, j, 0, lt, 64, ldp );
+ 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 (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)
+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);
+ 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;
+ e += 7;
#endif
-r = *e;
-yy[0] = 0;
-if( r & 0x8000 )
- yy[0] = 0xffff;
-r &= 0x7fff;
+ r = *e;
+ yy[0] = 0;
+ if (r & 0x8000)
+ yy[0] = 0xffff;
+ r &= 0x7fff;
#ifdef USE_INFINITY
-if( r == 0x7fff )
- {
+ 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 )
+ for (i = 0; i < 7; i++)
{
- yy[M] = 0;
+ if (pe[i] != 0)
+ {
+ enan (y, NBITS);
+ return;
+ }
}
-else
+#else /* !IBMPC */
+ for (i = 1; i < 8; i++)
{
- yy[M] = 1;
- eshift( yy, -1 );
+ if (pe[i] != 0)
+ {
+ enan (y, NBITS);
+ return;
+ }
}
-emovo(yy,y,ldp);
+#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)
+static void
+toe113 (short unsigned int *a, short unsigned int *b)
{
-register unsigned short *p, *q;
-unsigned short i;
+ register unsigned short *p, *q;
+ unsigned short i;
#ifdef NANS
-if( eiisnan(a) )
- {
- enan( b, 113 );
- return;
- }
+ if (eiisnan (a))
+ {
+ enan (b, 113);
+ return;
+ }
#endif
-p = a;
+ p = a;
#ifdef MIEEE
-q = b;
+ q = b;
#else
-q = b + 7; /* point to output exponent */
+ q = b + 7; /* point to output exponent */
#endif
/* If not denormal, delete the implied bit. */
-if( a[E] != 0 )
- {
- eshup1 (a);
- }
+ if (a[E] != 0)
+ {
+ eshup1 (a);
+ }
/* combine sign and exponent */
-i = *p++;
+ i = *p++;
#ifdef MIEEE
-if( i )
- *q++ = *p++ | 0x8000;
-else
- *q++ = *p++;
+ if (i)
+ *q++ = *p++ | 0x8000;
+ else
+ *q++ = *p++;
#else
-if( i )
- *q-- = *p++ | 0x8000;
-else
- *q-- = *p++;
+ if (i)
+ *q-- = *p++ | 0x8000;
+ else
+ *q-- = *p++;
#endif
/* skip over guard word */
-++p;
+ ++p;
/* move the significand */
#ifdef MIEEE
-for (i = 0; i < 7; i++)
- *q++ = *p++;
+ for (i = 0; i < 7; i++)
+ *q++ = *p++;
#else
-for (i = 0; i < 7; i++)
- *q-- = *p++;
+ 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)
+static void
+e64toe (short unsigned int *pe, short unsigned int *y, LDPARMS * ldp)
{
-unsigned short yy[NI];
-unsigned short *p, *q, *e;
-int i;
+ unsigned short yy[NI];
+ unsigned short *p, *q, *e;
+ int i;
-e = pe;
-p = yy;
+ e = pe;
+ p = yy;
-for( i=0; i<NE-5; i++ )
- *p++ = 0;
+ for (i = 0; i < NE - 5; i++)
+ *p++ = 0;
#ifdef IBMPC
-for( i=0; i<5; i++ )
- *p++ = *e++;
+ for (i = 0; i < 5; i++)
+ *p++ = *e++;
#endif
#ifdef DEC
-for( i=0; i<5; i++ )
- *p++ = *e++;
+ 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++;
+ 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;
- }
+ 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 )
- {
+ 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;
- }
- }
+ 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;
- }
- }
+ 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;
- }
+ 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++;
+ 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)
+static void
+toe64 (short unsigned int *a, short unsigned int *b)
{
-register unsigned short *p, *q;
-unsigned short i;
+ register unsigned short *p, *q;
+ unsigned short i;
#ifdef NANS
-if( eiisnan(a) )
- {
- enan( b, 64 );
- return;
- }
+ if (eiisnan (a))
+ {
+ enan (b, 64);
+ return;
+ }
#endif
#ifdef IBMPC
/* Shift Intel denormal significand down 1. */
-if( a[E] == 0 )
- eshdn1(a);
+ if (a[E] == 0)
+ eshdn1 (a);
#endif
-p = a;
+ p = a;
#ifdef MIEEE
-q = b;
+ q = b;
#else
-q = b + 4; /* point to output exponent */
+ q = b + 4; /* point to output exponent */
/* NOTE: Intel data type is 96 bits wide, clear the last word here. */
-*(q+1)= 0;
+ *(q + 1) = 0;
#endif
/* combine sign and exponent */
-i = *p++;
+ i = *p++;
#ifdef MIEEE
-if( i )
- *q++ = *p++ | 0x8000;
-else
- *q++ = *p++;
-*q++ = 0; /* leave 2nd short blank */
+ if (i)
+ *q++ = *p++ | 0x8000;
+ else
+ *q++ = *p++;
+ *q++ = 0; /* leave 2nd short blank */
#else
-if( i )
- *q-- = *p++ | 0x8000;
-else
- *q-- = *p++;
+ if (i)
+ *q-- = *p++ | 0x8000;
+ else
+ *q-- = *p++;
#endif
/* skip over guard word */
-++p;
+ ++p;
/* move the significand */
#ifdef MIEEE
-for( i=0; i<4; i++ )
- *q++ = *p++;
+ 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;
- }
+ 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++;
+ for (i = 0; i < 4; i++)
+ *q-- = *p++;
#endif
}
@@ -1981,91 +2044,92 @@ for( i=0; i<4; i++ )
; unsigned short x[N+2];
; e53toe( &d, x );
*/
-static void e53toe(short unsigned int *pe, short unsigned int *y, LDPARMS *ldp)
+static void
+e53toe (short unsigned int *pe, short unsigned int *y, LDPARMS * ldp)
{
#ifdef DEC
-dectoe( pe, y ); /* see etodec.c */
+ dectoe (pe, y); /* see etodec.c */
#else
-register unsigned short r;
-register unsigned short *p, *e;
-unsigned short yy[NI];
-int denorm, k;
+ 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);
+ e = pe;
+ denorm = 0; /* flag if denormalized number */
+ ecleaz (yy);
#ifdef IBMPC
-e += 3;
+ 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 */
+ 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 )
- {
+ 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;
+ if (((pe[3] & 0xf) != 0) || (pe[2] != 0)
+ || (pe[1] != 0) || (pe[0] != 0))
+ {
+ enan (y, NBITS);
+ return;
}
-#endif
-r >>= 4;
-/* If zero exponent, then the significand is denormalized.
- * So, take back the understood high significand bit. */
-if( r == 0 )
+#else /* !IBMPC */
+ if (((pe[0] & 0xf) != 0) || (pe[1] != 0)
+ || (pe[2] != 0) || (pe[3] != 0))
{
- denorm = 1;
- yy[M] &= ~0x10;
+ enan (y, NBITS);
+ return;
}
-r += EXONE - 01777;
-yy[E] = r;
-p = &yy[M+1];
+#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++;
+ *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 );
+ (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 */
}
@@ -2078,94 +2142,97 @@ emovo( yy, y, ldp );
#ifdef DEC
-static void etoe53( x, e )
-unsigned short *x, *e;
+static void
+etoe53 (x, e)
+ unsigned short *x, *e;
{
-etodec( x, e ); /* see etodec.c */
+ etodec (x, e); /* see etodec.c */
}
-static void toe53( x, y )
-unsigned short *x, *y;
+static void
+toe53 (x, y)
+ unsigned short *x, *y;
{
-todec( x, y );
+ todec (x, y);
}
#else
-static void toe53(short unsigned int *x, short unsigned int *y)
+static void
+toe53 (short unsigned int *x, short unsigned int *y)
{
-unsigned short i;
-unsigned short *p;
+ unsigned short i;
+ unsigned short *p;
#ifdef NANS
-if( eiisnan(x) )
- {
- enan( y, 53 );
- return;
- }
+ if (eiisnan (x))
+ {
+ enan (y, 53);
+ return;
+ }
#endif
-p = &x[0];
+ p = &x[0];
#ifdef IBMPC
-y += 3;
+ y += 3;
#endif
#ifdef DEC
-y += 3;
+ y += 3;
#endif
-*y = 0; /* output high order */
-if( *p++ )
- *y = 0x8000; /* output sign bit */
+ *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. */
+ i = *p++;
+ if (i >= (unsigned int) 2047)
+ { /* Saturate at largest number less than infinity. */
#ifdef USE_INFINITY
- *y |= 0x7ff0;
+ *y |= 0x7ff0;
#ifdef IBMPC
- *(--y) = 0;
- *(--y) = 0;
- *(--y) = 0;
+ *(--y) = 0;
+ *(--y) = 0;
+ *(--y) = 0;
#else /* !IBMPC */
- ++y;
- *y++ = 0;
- *y++ = 0;
- *y++ = 0;
+ ++y;
+ *y++ = 0;
+ *y++ = 0;
+ *y++ = 0;
#endif /* IBMPC */
#else /* !USE_INFINITY */
- *y |= (unsigned short )0x7fef;
+ *y |= (unsigned short) 0x7fef;
#ifdef IBMPC
- *(--y) = 0xffff;
- *(--y) = 0xffff;
- *(--y) = 0xffff;
+ *(--y) = 0xffff;
+ *(--y) = 0xffff;
+ *(--y) = 0xffff;
#else /* !IBMPC */
- ++y;
- *y++ = 0xffff;
- *y++ = 0xffff;
- *y++ = 0xffff;
+ ++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 */
+ 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;
+ *(--y) = *p++;
+ *(--y) = *p++;
+ *(--y) = *p;
#else /* !IBMPC */
-++y;
-*y++ = *p++;
-*y++ = *p++;
-*y++ = *p++;
+ ++y;
+ *y++ = *p++;
+ *y++ = *p++;
+ *y++ = *p++;
#endif /* !IBMPC */
}
@@ -2179,158 +2246,160 @@ i |= *p++ & (unsigned short )0x0f; /* *p = xi[M] */
; unsigned short x[N+2];
; dtox( &d, x );
*/
-void e24toe( short unsigned int *pe, short unsigned int *y, LDPARMS *ldp )
+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);
+ 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;
+ 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 */
+ 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 )
- {
+ 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;
+ if (((pe[0] & 0x7f) != 0) || (pe[1] != 0))
+ {
+ enan (y, NBITS);
+ return;
}
-#endif
-r >>= 7;
-/* If zero exponent, then the significand is denormalized.
- * So, take back the understood high significand bit. */
-if( r == 0 )
+#else /* !MIEEE */
+ if (((pe[1] & 0x7f) != 0) || (pe[0] != 0))
{
- denorm = 1;
- yy[M] &= ~0200;
+ enan (y, NBITS);
+ return;
}
-r += EXONE - 0177;
-yy[E] = r;
-p = &yy[M+1];
+#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);
+ *p++ = *(--e);
#endif
#ifdef DEC
-*p++ = *(--e);
+ *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 );
+ ++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)
+static void
+toe24 (short unsigned int *x, short unsigned int *y)
{
-unsigned short i;
-unsigned short *p;
+ unsigned short i;
+ unsigned short *p;
#ifdef NANS
-if( eiisnan(x) )
- {
- enan( y, 24 );
- return;
- }
+ if (eiisnan (x))
+ {
+ enan (y, 24);
+ return;
+ }
#endif
-p = &x[0];
+ p = &x[0];
#ifdef IBMPC
-y += 1;
+ y += 1;
#endif
#ifdef DEC
-y += 1;
+ y += 1;
#endif
-*y = 0; /* output high order */
-if( *p++ )
- *y = 0x8000; /* output sign bit */
+ *y = 0; /* output high order */
+ if (*p++)
+ *y = 0x8000; /* output sign bit */
-i = *p++;
-if( i >= 255 )
- { /* Saturate at largest number less than infinity. */
+ i = *p++;
+ if (i >= 255)
+ { /* Saturate at largest number less than infinity. */
#ifdef USE_INFINITY
- *y |= (unsigned short )0x7f80;
+ *y |= (unsigned short) 0x7f80;
#ifdef IBMPC
- *(--y) = 0;
+ *(--y) = 0;
#endif
#ifdef DEC
- *(--y) = 0;
+ *(--y) = 0;
#endif
#ifdef MIEEE
- ++y;
- *y = 0;
+ ++y;
+ *y = 0;
#endif
#else /* !USE_INFINITY */
- *y |= (unsigned short )0x7f7f;
+ *y |= (unsigned short) 0x7f7f;
#ifdef IBMPC
- *(--y) = 0xffff;
+ *(--y) = 0xffff;
#endif
#ifdef DEC
- *(--y) = 0xffff;
+ *(--y) = 0xffff;
#endif
#ifdef MIEEE
- ++y;
- *y = 0xffff;
+ ++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 */
+ 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;
+ *(--y) = *p;
#endif
#ifdef DEC
-*(--y) = *p;
+ *(--y) = *p;
#endif
#ifdef MIEEE
-++y;
-*y = *p;
+ ++y;
+ *y = *p;
#endif
}
#endif /* LDBL_MANT_DIG == 24 */
@@ -2345,64 +2414,65 @@ i |= *p++ & (unsigned short )0x7f; /* *p = xi[M] */
* -1 if a < b
* -2 if either a or b is a NaN.
*/
-static int ecmp(_CONST short unsigned int *a, _CONST short unsigned int *b)
+static int
+ecmp (_CONST short unsigned int *a, _CONST short unsigned int *b)
{
-unsigned short ai[NI], bi[NI];
-register unsigned short *p, *q;
-register int i;
-int msign;
+ 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 );
+ if (eisnan (a) || eisnan (b))
+ return (-2);
#endif
-emovi( a, ai );
-p = ai;
-emovi( b, bi );
-q = bi;
+ emovi (a, ai);
+ p = ai;
+ emovi (b, bi);
+ q = bi;
-if( *p != *q )
- { /* the signs are different */
+ 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 );
- }
+ 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 == 0)
+ msign = 1;
+ else
+ msign = -1;
+ i = NI - 1;
+ do
+ {
+ if (*p++ != *q++)
{
- if( *p++ != *q++ )
- {
- goto diff;
- }
+ goto diff;
}
-while( --i > 0 );
+ }
+ while (--i > 0);
-return(0); /* equality */
+ return (0); /* equality */
diff:
-if( *(--p) > *(--q) )
- return( msign ); /* p is bigger */
-else
- return( -msign ); /* p is littler */
+ if (*(--p) > *(--q))
+ return (msign); /* p is bigger */
+ else
+ return (-msign); /* p is littler */
}
@@ -2412,64 +2482,65 @@ else
; 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)
+static int
+eshift (short unsigned int *x, int sc)
{
-unsigned short lost;
-unsigned short *p;
+ unsigned short lost;
+ unsigned short *p;
-if( sc == 0 )
- return( 0 );
+ if (sc == 0)
+ return (0);
-lost = 0;
-p = x + NI-1;
+ lost = 0;
+ p = x + NI - 1;
-if( sc < 0 )
+ if (sc < 0)
+ {
+ sc = -sc;
+ while (sc >= 16)
{
- sc = -sc;
- while( sc >= 16 )
- {
- lost |= *p; /* remember lost bits */
- eshdn6(x);
- sc -= 16;
- }
+ lost |= *p; /* remember lost bits */
+ eshdn6 (x);
+ sc -= 16;
+ }
- while( sc >= 8 )
- {
- lost |= *p & 0xff;
- eshdn8(x);
- sc -= 8;
- }
+ while (sc >= 8)
+ {
+ lost |= *p & 0xff;
+ eshdn8 (x);
+ sc -= 8;
+ }
- while( sc > 0 )
- {
- lost |= *p & 1;
- eshdn1(x);
- sc -= 1;
- }
+ while (sc > 0)
+ {
+ lost |= *p & 1;
+ eshdn1 (x);
+ sc -= 1;
}
-else
+ }
+ else
+ {
+ while (sc >= 16)
{
- while( sc >= 16 )
- {
- eshup6(x);
- sc -= 16;
- }
+ eshup6 (x);
+ sc -= 16;
+ }
- while( sc >= 8 )
- {
- eshup8(x);
- sc -= 8;
- }
+ while (sc >= 8)
+ {
+ eshup8 (x);
+ sc -= 8;
+ }
- while( sc > 0 )
- {
- eshup1(x);
- sc -= 1;
- }
+ while (sc > 0)
+ {
+ eshup1 (x);
+ sc -= 1;
}
-if( lost )
- lost = 1;
-return( (int )lost );
+ }
+ if (lost)
+ lost = 1;
+ return ((int) lost);
}
@@ -2480,68 +2551,69 @@ return( (int )lost );
; Shift normalizes the significand area pointed to by argument
; shift count (up = positive) is returned.
*/
-static int enormlz(short unsigned int *x)
+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;
+ 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 );
- }
+ if (sc > NBITS)
+ return (sc);
+ }
/* see if high byte is zero */
-while( (*p & 0xff00) == 0 )
- {
- eshup8(x);
- sc += 8;
- }
+ while ((*p & 0xff00) == 0)
+ {
+ eshup8 (x);
+ sc += 8;
+ }
/* now shift 1 bit at a time */
-while( (*p & 0x8000) == 0)
+ while ((*p & 0x8000) == 0)
+ {
+ eshup1 (x);
+ sc += 1;
+ if (sc > (NBITS + 16))
{
- eshup1(x);
- sc += 1;
- if( sc > (NBITS+16) )
- {
- mtherr( "enormlz", UNDERFLOW );
- return( sc );
- }
+ mtherr ("enormlz", UNDERFLOW);
+ return (sc);
}
-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 (*p & 0xff00)
+ {
+ eshdn8 (x);
+ sc -= 8;
+ }
+ while (*p != 0)
+ {
+ eshdn1 (x);
+ sc -= 1;
- if( sc < -NBITS )
- {
- mtherr( "enormlz", OVERFLOW );
- return( sc );
- }
+ if (sc < -NBITS)
+ {
+ mtherr ("enormlz", OVERFLOW);
+ return (sc);
}
-return( sc );
+ }
+ return (sc);
}
@@ -2555,8 +2627,7 @@ return( sc );
#define MAXP 4096
#if NE == 10
-static _CONST unsigned short etens[NTEN + 1][NE] =
-{
+static _CONST unsigned short etens[NTEN + 1][NE] = {
{0x6576, 0x4a92, 0x804a, 0x153f,
0xc94c, 0x979a, 0x8a20, 0x5202, 0xc460, 0x7525,}, /* 10**4096 */
{0x6a32, 0xce52, 0x329a, 0x28ce,
@@ -2585,8 +2656,7 @@ static _CONST unsigned short etens[NTEN + 1][NE] =
0x0000, 0x0000, 0x0000, 0x0000, 0xa000, 0x4002,}, /* 10**1 */
};
-static _CONST unsigned short emtens[NTEN + 1][NE] =
-{
+static _CONST unsigned short emtens[NTEN + 1][NE] = {
{0x2030, 0xcffc, 0xa1c3, 0x8123,
0x2de3, 0x9fde, 0xd2ce, 0x04c8, 0xa6dd, 0x0ad8,}, /* 10**-4096 */
{0x8264, 0xd2cb, 0xf2ea, 0x12d4,
@@ -2615,36 +2685,36 @@ static _CONST unsigned short emtens[NTEN + 1][NE] =
0xcccc, 0xcccc, 0xcccc, 0xcccc, 0xcccc, 0x3ffb,}, /* 10**-1 */
};
#else
-static _CONST 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 _CONST 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 _CONST 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 */
+static _CONST 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
@@ -2654,51 +2724,52 @@ static _CONST unsigned short emtens[NTEN+1][NE] = {
#if 0
-void _IO_ldtostr(x, string, ndigs, flags, fmt)
-long double *x;
-char *string;
-int ndigs;
-int flags;
-char fmt;
+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;
+ unsigned short w[NI];
+ char *t, *u;
+ LDPARMS rnd;
+ LDPARMS *ldp = &rnd;
-if (sizeof(long double) == 16)
- e113toe( (unsigned short *)x, w, ldp );
-else
- e64toe( (unsigned short *)x, w, ldp );
+ rnd.rlast = -1;
+ rnd.rndprc = NBITS;
-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';
- }
+ 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
@@ -2706,154 +2777,155 @@ if (fmt == 'E')
/* 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)
+_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);
+ 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 (_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 );
+ e24toe (&du.pe, e, ldp);
#elif LDBL_MANT_DIG == 53
-e53toe( &du.pe, e, ldp );
+ e53toe (&du.pe, e, ldp);
#elif LDBL_MANT_DIG == 64
-e64toe( &du.pe, e, ldp );
+ e64toe (&du.pe, e, ldp);
#else
-e113toe( &du.pe, e, ldp );
+ e113toe (&du.pe, e, ldp);
#endif
-if( eisneg(e) )
- *sign = 1;
-else
- *sign = 0;
+ if (eisneg (e))
+ *sign = 1;
+ else
+ *sign = 0;
/* Mode 3 is "f" format. */
-if( mode != 3 )
- ndigits -= 1;
+ 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;
+ 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;
+ 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;
+ s = outbuf;
+ while (*s != '\0')
+ {
+ if (*s == '.')
+ goto yesdecpt;
+ ++s;
+ }
+ goto nodecpt;
yesdecpt:
/* Delete the decimal point. */
-while( *s != '\0' )
- {
- *s = *(s+1);
- ++s;
- }
+ while (*s != '\0')
+ {
+ *s = *(s + 1);
+ ++s;
+ }
nodecpt:
/* Back up over the exponent field. */
-while( *s != 'E' && s > outbuf)
- --s;
-*s = '\0';
+ while (*s != 'E' && s > outbuf)
+ --s;
+ *s = '\0';
stripspaces:
/* Strip leading spaces and sign. */
-p = outbuf;
-while( *p == ' ' || *p == '-')
- ++p;
+ p = outbuf;
+ while (*p == ' ' || *p == '-')
+ ++p;
/* Find new end of string. */
-s = outbuf;
-while( (*s++ = *p++) != '\0' )
- ;
---s;
+ 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;
+ 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';
+ 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;
- }
+ 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;
+ 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));
+ 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);
+ outstr = (char *) _REENT_MP_RESULT (ptr);
+ strcpy (outstr, outbuf);
-if( rve )
- *rve = outstr + (s - outbuf);
+ if (rve)
+ *rve = outstr + (s - outbuf);
-return outstr;
+ return outstr;
}
/* Routine used to tell if long double is NaN or Infinity or regular number.
@@ -2864,349 +2936,351 @@ return outstr;
int
_ldcheck (long double *d)
{
-unsigned short e[NI];
-LDPARMS rnd;
-LDPARMS *ldp = &rnd;
+ unsigned short e[NI];
+ LDPARMS rnd;
+ LDPARMS *ldp = &rnd;
-union uconv du;
+ union uconv du;
-rnd.rlast = -1;
-rnd.rndprc = NBITS;
-du.d = *d;
+ rnd.rlast = -1;
+ rnd.rndprc = NBITS;
+ du.d = *d;
#if LDBL_MANT_DIG == 24
-e24toe( &du.pe, e, ldp );
+ e24toe (&du.pe, e, ldp);
#elif LDBL_MANT_DIG == 53
-e53toe( &du.pe, e, ldp );
+ e53toe (&du.pe, e, ldp);
#elif LDBL_MANT_DIG == 64
-e64toe( &du.pe, e, ldp );
+ e64toe (&du.pe, e, ldp);
#else
-e113toe( &du.pe, e, ldp );
+ e113toe (&du.pe, e, ldp);
#endif
-if( (e[NE-1] & 0x7fff) == 0x7fff )
- {
+ if ((e[NE - 1] & 0x7fff) == 0x7fff)
+ {
#ifdef NANS
- if( eisnan(e) )
- return( 1 );
+ if (eisnan (e))
+ return (1);
#endif
- return( 2 );
- }
-else
- return( 0 );
-} /* _ldcheck */
+ return (2);
+ }
+ else
+ return (0);
+} /* _ldcheck */
-static void etoasc(short unsigned int *x, char *string, int ndigits, int outformat, LDPARMS *ldp)
+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];
-_CONST 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;
+ long digit;
+ unsigned short y[NI], t[NI], u[NI], w[NI];
+ _CONST 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 );
+ 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 )
+ if (y[NE - 1] == 0)
+ {
+ for (k = 0; k < NE - 1; k++)
{
- for( k=0; k<NE-1; k++ )
- {
- if( y[k] != 0 )
- goto tnzro; /* denormalized number */
- }
- goto isone; /* legal all zeros */
+ 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;
- }
+ 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;
- }
+ 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;
+ i = ecmp (eone, y);
+ if (i == 0)
+ goto isone;
-if( i < 0 )
- { /* Number is greater than 1 */
+ 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 );
+ 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 );
+ 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 */
+ 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;
+ 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 )
+ emovz (w, u);
+ eshdn1 (u);
+ eshdn1 (u);
+ eaddm (w, u);
+ u[1] += 3;
+ while (u[2] != 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;
+ eshdn1 (u);
+ u[1] += 1;
}
- ediv( t, eone, t, ldp );
- }
+ 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++ = ' ';
+ 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;
+ 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++ = '.';
- }
+ 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++ )
- {
+ 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;
+ 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 )
- {
+ 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 */
- }
+ 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;
+ 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;
+ 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;
- }
+ 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;
- }
+ 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 );
+ if (expon >= 0)
+ sprintf (ss, "e+%02d", expon);
+ else
+ sprintf (ss, "e-%02d", -expon);
#else
- sprintf( ss, "E%d", expon );
+ sprintf (ss, "E%d", expon);
#endif
bxit:
-ldp->rndprc = rndsav;
-ldp->outexpon = expon;
+ ldp->rndprc = rndsav;
+ ldp->outexpon = expon;
}
-
+#if 0 /* Broken, unusable implementation of strtold */
/*
; ASCTOQ
@@ -3227,7 +3301,8 @@ ldp->outexpon = expon;
; asctoq( string, q );
*/
-long double _strtold (char *s, char **se)
+long double
+_strtold (char *s, char **se)
{
union uconv x;
LDPARMS rnd;
@@ -3237,7 +3312,7 @@ long double _strtold (char *s, char **se)
rnd.rlast = -1;
rnd.rndprc = NBITS;
- lenldstr = asctoeg( s, &x.pe, LDBL_MANT_DIG, ldp );
+ lenldstr = asctoeg (s, &x.pe, LDBL_MANT_DIG, ldp);
if (se)
*se = s + lenldstr;
return x.d;
@@ -3246,222 +3321,221 @@ long double _strtold (char *s, char **se)
#define REASONABLE_LEN 200
static int
-asctoeg(char *ss, short unsigned int *y, int oprec, LDPARMS *ldp)
+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;
-_CONST unsigned short *p;
-char *sp, *s, *lstr;
-int lenldstr;
-int mflag = 0;
-char tmpstr[REASONABLE_LEN];
+ 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;
+ _CONST unsigned short *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;
+ 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) )
- {
+ k = *s - '0';
+ if ((k >= 0) && (k <= 9))
+ {
/* Ignore leading zeros */
- if( (prec == 0) && (decflg == 0) && (k == 0) )
- goto donchr;
+ 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;
+ 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;
- }
+ 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:
+ 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 );
+ enan (yy, NI * 16);
#else
- mtherr( "asctoe", DOMAIN );
- ecleaz(yy);
+ mtherr ("asctoe", DOMAIN);
+ ecleaz (yy);
#endif
- goto aexit;
- }
+ goto aexit;
+ }
donchr:
-++s;
-goto nxtcom;
+ ++s;
+ goto nxtcom;
/* Exponent interpretation */
expnt:
-esign = 1;
-exp = 0;
-++s;
+ 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;
- }
+ 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;
+ 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 );
+ 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 */
@@ -3471,107 +3545,107 @@ emdnorm( yy, lost, 0, lexp, 64, ldp );
* 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;
- }
+ 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;
+ if (oprec == 53)
+ lexp -= EXONE - 0x3ff;
+ else if (oprec == 24)
+ lexp -= EXONE - 0177;
#ifdef DEC
-else if( oprec == 56 )
- lexp -= EXONE - 0201;
+ else if (oprec == 56)
+ lexp -= EXONE - 0201;
#endif
-ldp->rndprc = oprec;
-emdnorm( yy, k, 0, lexp, 64, ldp );
+ ldp->rndprc = oprec;
+ emdnorm (yy, k, 0, lexp, 64, ldp);
aexit:
-ldp->rndprc = rndsav;
-yy[0] = nsign;
-switch( oprec )
- {
+ ldp->rndprc = rndsav;
+ yy[0] = nsign;
+ switch (oprec)
+ {
#ifdef DEC
- case 56:
- todec( yy, y ); /* see etodec.c */
- break;
+ case 56:
+ todec (yy, y); /* see etodec.c */
+ break;
#endif
#if LDBL_MANT_DIG == 53
- case 53:
- toe53( yy, y );
- break;
+ case 53:
+ toe53 (yy, y);
+ break;
#elif LDBL_MANT_DIG == 24
- case 24:
- toe24( yy, y );
- break;
+ case 24:
+ toe24 (yy, y);
+ break;
#elif LDBL_MANT_DIG == 64
- case 64:
- toe64( yy, y );
- break;
+ case 64:
+ toe64 (yy, y);
+ break;
#elif LDBL_MANT_DIG == 113
- case 113:
- toe113( yy, y );
- break;
+ case 113:
+ toe113 (yy, y);
+ break;
#else
- case NBITS:
- emovo( yy, y, ldp );
- break;
-#endif
- }
-lenldstr += s - lstr;
-if (mflag)
- free (lstr);
-return lenldstr;
+ case NBITS:
+ emovo (yy, y, ldp);
+ break;
+#endif
+ }
+ lenldstr += s - lstr;
+ if (mflag)
+ free (lstr);
+ return lenldstr;
}
+#endif
-
/* y = largest integer not greater than x
* (truncated toward minus infinity)
*
@@ -3581,165 +3655,214 @@ return lenldstr;
* efloor( x, y, ldp );
*/
static _CONST unsigned short bmask[] = {
-0xffff,
-0xfffe,
-0xfffc,
-0xfff8,
-0xfff0,
-0xffe0,
-0xffc0,
-0xff80,
-0xff00,
-0xfe00,
-0xfc00,
-0xf800,
-0xf000,
-0xe000,
-0xc000,
-0x8000,
-0x0000,
+ 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)
+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;
- }
+ 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;
+ e = NBITS - e;
+ emov (f, y);
+ if (e <= 0)
+ return;
-p = &y[0];
-while( e >= 16 )
- {
- *p++ = 0;
- e -= 16;
- }
+ p = &y[0];
+ while (e >= 16)
+ {
+ *p++ = 0;
+ e -= 16;
+ }
/* clear the remaining bits */
-*p &= bmask[e];
+ *p &= bmask[e];
/* truncate negatives toward minus infinity */
isitneg:
-if( (unsigned short )expon & (unsigned short )0x8000 )
+ if ((unsigned short) expon & (unsigned short) 0x8000)
+ {
+ for (i = 0; i < NE - 1; i++)
{
- for( i=0; i<NE-1; i++ )
- {
- if( f[i] != y[i] )
- {
- esub( eone, y, y, ldp );
- break;
- }
- }
+ if (f[i] != y[i])
+ {
+ esub (eone, y, y, ldp);
+ break;
+ }
}
+ }
}
-static void eiremain(short unsigned int *den, short unsigned int *num, LDPARMS *ldp)
+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 );
+ 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
+#if !defined(__mips)
+static _CONST unsigned short nan113[8] = {
+ 0x7fff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff
+};
+
+static _CONST unsigned short nan64[6] = {
+ 0x7fff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff
+};
+static _CONST unsigned short nan53[4] = { 0x7fff, 0xffff, 0xffff, 0xffff };
+static _CONST unsigned short nan24[2] = { 0x7fff, 0xffff };
+#elif defined(__mips_nan2008) /* __mips */
+static _CONST unsigned short nan113[8] = { 0x7fff, 0x8000, 0, 0, 0, 0, 0, 0 };
+static _CONST unsigned short nan64[6] = { 0x7fff, 0xc000, 0, 0, 0, 0 };
+static _CONST unsigned short nan53[4] = { 0x7ff8, 0, 0, 0 };
+static _CONST unsigned short nan24[2] = { 0x7fc0, 0 };
+#else /* __mips && !__mips_nan2008 */
static _CONST unsigned short nan113[8] = {
- 0x7fff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff};
-static _CONST unsigned short nan64[6] = {0x7fff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff};
-static _CONST unsigned short nan53[4] = {0x7fff, 0xffff, 0xffff, 0xffff};
-static _CONST unsigned short nan24[2] = {0x7fff, 0xffff};
+ 0x7fff, 0x7fff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff
+};
+
+static _CONST unsigned short nan64[6] = {
+ 0x7fff, 0xbfff, 0xffff, 0xffff, 0xffff, 0xffff
+};
+static _CONST unsigned short nan53[4] = { 0x7ff7, 0xffff, 0xffff, 0xffff };
+static _CONST unsigned short nan24[2] = { 0x7fbf, 0xffff };
+#endif /* __mips && !__mips_nan2008 */
#else /* !MIEEE */
-static _CONST unsigned short nan113[8] = {0, 0, 0, 0, 0, 0, 0x8000, 0x7fff};
-static _CONST unsigned short nan64[6] = {0, 0, 0, 0, 0xc000, 0x7fff};
-static _CONST unsigned short nan53[4] = {0, 0, 0, 0x7ff8};
-static _CONST unsigned short nan24[2] = {0, 0x7fc0};
+#if !defined(__mips) || defined(__mips_nan2008)
+static _CONST unsigned short nan113[8] = { 0, 0, 0, 0, 0, 0, 0x8000, 0x7fff };
+static _CONST unsigned short nan64[6] = { 0, 0, 0, 0, 0xc000, 0x7fff };
+static _CONST unsigned short nan53[4] = { 0, 0, 0, 0x7ff8 };
+static _CONST unsigned short nan24[2] = { 0, 0x7fc0 };
+#else /* __mips && !__mips_nan2008 */
+static _CONST unsigned short nan113[8] = {
+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0x7fff, 0x7fff
+};
+
+static _CONST unsigned short nan64[6] = {
+ 0xffff, 0xffff, 0xffff, 0xffff, 0xbfff, 0x7fff
+};
+static _CONST unsigned short nan53[4] = { 0xffff, 0xffff, 0xffff, 0x7ff7 };
+static _CONST unsigned short nan24[2] = { 0xffff, 0x7fbf };
+#endif /* __mips && !__mips_nan2008 */
#endif /* !MIEEE */
-static void enan (short unsigned int *nan, int size)
+static void
+enan (short unsigned int *nan, int size)
{
-int i, n;
-_CONST unsigned short *p;
+ int i, n;
+ _CONST unsigned short *p;
-switch( size )
- {
+ 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:
+ 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:
+#if !defined(__mips) || defined(__mips_nan2008)
+ for (i = 0; i < NE - 2; i++)
*nan++ = 0;
- *nan++ = 0x7fff;
+ *nan++ = 0xc000;
+#else /* __mips && !__mips_nan2008 */
+ for (i = 0; i < NE - 2; i++)
+ *nan++ = 0xffff;
+ *nan++ = 0xbfff;
+#endif /* __mips && !__mips_nan2008 */
+ *nan++ = 0x7fff;
+ return;
+
+ case NI * 16:
+ *nan++ = 0;
+ *nan++ = 0x7fff;
+ *nan++ = 0;
+#if !defined(__mips) || defined(__mips_nan2008)
+ *nan++ = 0xc000;
+ for (i = 4; i < NI - 1; i++)
*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++;
+#else /* __mips && !__mips_nan2008 */
+ *nan++ = 0xbfff;
+ for (i = 4; i < NI - 1; i++)
+ *nan++ = 0xffff;
+#endif /* __mips && !__mips_nan2008 */
+ *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
index 11246c354..496373910 100644
--- a/newlib/libc/stdlib/llabs.c
+++ b/newlib/libc/stdlib/llabs.c
@@ -7,7 +7,7 @@ INDEX
ANSI_SYNOPSIS
#include <stdlib.h>
- long long llabs(long long j);
+ long long llabs(long long <[j]>);
TRAD_SYNOPSIS
#include <stdlib.h>
diff --git a/newlib/libc/stdlib/local.h b/newlib/libc/stdlib/local.h
index 12e6998c1..aaa32dff5 100644
--- a/newlib/libc/stdlib/local.h
+++ b/newlib/libc/stdlib/local.h
@@ -7,7 +7,7 @@ char * _EXFUN(_gcvt,(struct _reent *, double , int , char *, char, int));
char *__locale_charset(_NOARGS);
-#ifndef __mbstate_t_defined
+#ifndef __machine_mbstate_t_defined
#include <wchar.h>
#endif
diff --git a/newlib/libc/stdlib/mbrlen.c b/newlib/libc/stdlib/mbrlen.c
index 4319875a1..57a733fed 100644
--- a/newlib/libc/stdlib/mbrlen.c
+++ b/newlib/libc/stdlib/mbrlen.c
@@ -6,7 +6,7 @@
#include <errno.h>
size_t
-mbrlen(const char *s, size_t n, mbstate_t *ps)
+mbrlen(const char *__restrict s, size_t n, mbstate_t *__restrict ps)
{
#ifdef _MB_CAPABLE
if (ps == NULL)
diff --git a/newlib/libc/stdlib/mbrtowc.c b/newlib/libc/stdlib/mbrtowc.c
index 0a8c23a9d..550aaff99 100644
--- a/newlib/libc/stdlib/mbrtowc.c
+++ b/newlib/libc/stdlib/mbrtowc.c
@@ -43,10 +43,10 @@ _DEFUN (_mbrtowc_r, (ptr, pwc, s, n, ps),
#ifndef _REENT_ONLY
size_t
_DEFUN (mbrtowc, (pwc, s, n, ps),
- wchar_t *pwc _AND
- const char *s _AND
+ wchar_t *__restrict pwc _AND
+ const char *__restrict s _AND
size_t n _AND
- mbstate_t *ps)
+ mbstate_t *__restrict ps)
{
#if defined(PREFER_SIZE_OVER_SPEED) || defined(__OPTIMIZE_SIZE__)
return _mbrtowc_r (_REENT, pwc, s, n, ps);
diff --git a/newlib/libc/stdlib/mbsnrtowcs.c b/newlib/libc/stdlib/mbsnrtowcs.c
index 6729df951..7ab384721 100644
--- a/newlib/libc/stdlib/mbsnrtowcs.c
+++ b/newlib/libc/stdlib/mbsnrtowcs.c
@@ -13,8 +13,10 @@ INDEX
ANSI_SYNOPSIS
#include <wchar.h>
- size_t mbsrtowcs(wchar_t *<[dst]>, const char **<[src]>, size_t <[len]>,
- mbstate_t *<[ps]>);
+ size_t mbsrtowcs(wchar_t *__restrict <[dst]>,
+ const char **__restrict <[src]>,
+ size_t <[len]>,
+ mbstate_t *__restrict <[ps]>);
#include <wchar.h>
size_t _mbsrtowcs_r(struct _reent *<[ptr]>, wchar_t *<[dst]>,
@@ -22,8 +24,9 @@ ANSI_SYNOPSIS
mbstate_t *<[ps]>);
#include <wchar.h>
- size_t mbsnrtowcs(wchar_t *<[dst]>, const char **<[src]>,
- size_t <[nms]>, size_t <[len]>, mbstate_t *<[ps]>);
+ size_t mbsnrtowcs(wchar_t *__ restrict <[dst]>,
+ const char **__restrict <[src]>, size_t <[nms]>,
+ size_t <[len]>, mbstate_t *__restrict <[ps]>);
#include <wchar.h>
size_t _mbsnrtowcs_r(struct _reent *<[ptr]>, wchar_t *<[dst]>,
@@ -33,10 +36,10 @@ ANSI_SYNOPSIS
TRAD_SYNOPSIS
#include <wchar.h>
size_t mbsrtowcs(<[dst]>, <[src]>, <[len]>, <[ps]>)
- wchar_t *<[dst]>;
- const char **<[src]>;
+ wchar_t *__restrict <[dst]>;
+ const char **__restrict <[src]>;
size_t <[len]>;
- mbstate_t *<[ps]>;
+ mbstate_t *__restrict <[ps]>;
#include <wchar.h>
size_t _mbsrtowcs_r(<[ptr]>, <[dst]>, <[src]>, <[len]>, <[ps]>)
@@ -48,11 +51,11 @@ TRAD_SYNOPSIS
#include <wchar.h>
size_t mbsnrtowcs(<[dst]>, <[src]>, <[nms]>, <[len]>, <[ps]>)
- wchar_t *<[dst]>;
- const char **<[src]>;
+ wchar_t *__restrict <[dst]>;
+ const char **__restrict <[src]>;
size_t <[nms]>;
size_t <[len]>;
- mbstate_t *<[ps]>;
+ mbstate_t *__restrict <[ps]>;
#include <wchar.h>
size_t _mbsnrtowcs_r(<[ptr]>, <[dst]>, <[src]>, <[nms]>, <[len]>, <[ps]>)
@@ -168,11 +171,11 @@ _DEFUN (_mbsnrtowcs_r, (r, dst, src, nms, len, ps),
#ifndef _REENT_ONLY
size_t
_DEFUN (mbsnrtowcs, (dst, src, nms, len, ps),
- wchar_t *dst _AND
- const char **src _AND
+ wchar_t *__restrict dst _AND
+ const char **__restrict src _AND
size_t nms _AND
size_t len _AND
- mbstate_t *ps)
+ mbstate_t *__restrict ps)
{
return _mbsnrtowcs_r (_REENT, dst, src, nms, len, ps);
}
diff --git a/newlib/libc/stdlib/mbsrtowcs.c b/newlib/libc/stdlib/mbsrtowcs.c
index d5137d144..65e46d32e 100644
--- a/newlib/libc/stdlib/mbsrtowcs.c
+++ b/newlib/libc/stdlib/mbsrtowcs.c
@@ -1,3 +1,5 @@
+/* doc in mbsnrtowcs.c */
+
#include <reent.h>
#include <newlib.h>
#include <wchar.h>
@@ -19,10 +21,10 @@ _DEFUN (_mbsrtowcs_r, (r, dst, src, len, ps),
#ifndef _REENT_ONLY
size_t
_DEFUN (mbsrtowcs, (dst, src, len, ps),
- wchar_t *dst _AND
- const char **src _AND
+ wchar_t *__restrict dst _AND
+ const char **__restrict src _AND
size_t len _AND
- mbstate_t *ps)
+ mbstate_t *__restrict ps)
{
return _mbsnrtowcs_r (_REENT, dst, src, (size_t) -1, len, ps);
}
diff --git a/newlib/libc/stdlib/mbstowcs.c b/newlib/libc/stdlib/mbstowcs.c
index 334b5f54d..09543451c 100644
--- a/newlib/libc/stdlib/mbstowcs.c
+++ b/newlib/libc/stdlib/mbstowcs.c
@@ -7,7 +7,7 @@ INDEX
ANSI_SYNOPSIS
#include <stdlib.h>
- int mbstowcs(wchar_t *<[pwc]>, const char *<[s]>, size_t <[n]>);
+ int mbstowcs(wchar_t *restrict <[pwc]>, const char *restrict <[s]>, size_t <[n]>);
TRAD_SYNOPSIS
#include <stdlib.h>
@@ -55,8 +55,8 @@ effects vary with the locale.
size_t
_DEFUN (mbstowcs, (pwcs, s, n),
- wchar_t *pwcs _AND
- const char *s _AND
+ wchar_t *__restrict pwcs _AND
+ const char *__restrict s _AND
size_t n)
{
#ifdef _MB_CAPABLE
diff --git a/newlib/libc/stdlib/mbstowcs_r.c b/newlib/libc/stdlib/mbstowcs_r.c
index 3ba867711..cae1f0693 100644
--- a/newlib/libc/stdlib/mbstowcs_r.c
+++ b/newlib/libc/stdlib/mbstowcs_r.c
@@ -5,8 +5,8 @@
size_t
_DEFUN (_mbstowcs_r, (reent, pwcs, s, n, state),
struct _reent *r _AND
- wchar_t *pwcs _AND
- const char *s _AND
+ wchar_t *__restrict pwcs _AND
+ const char *__restrict s _AND
size_t n _AND
mbstate_t *state)
{
diff --git a/newlib/libc/stdlib/mbtowc.c b/newlib/libc/stdlib/mbtowc.c
index 8da309e2d..3c7f84b9e 100644
--- a/newlib/libc/stdlib/mbtowc.c
+++ b/newlib/libc/stdlib/mbtowc.c
@@ -7,7 +7,7 @@ INDEX
ANSI_SYNOPSIS
#include <stdlib.h>
- int mbtowc(wchar_t *<[pwc]>, const char *<[s]>, size_t <[n]>);
+ int mbtowc(wchar_t *restrict <[pwc]>, const char *restrict <[s]>, size_t <[n]>);
TRAD_SYNOPSIS
#include <stdlib.h>
@@ -58,8 +58,8 @@ effects vary with the locale.
int
_DEFUN (mbtowc, (pwc, s, n),
- wchar_t *pwc _AND
- const char *s _AND
+ wchar_t *__restrict pwc _AND
+ const char *__restrict s _AND
size_t n)
{
#ifdef _MB_CAPABLE
diff --git a/newlib/libc/stdlib/mbtowc_r.c b/newlib/libc/stdlib/mbtowc_r.c
index d84fef5a2..986595cfd 100644
--- a/newlib/libc/stdlib/mbtowc_r.c
+++ b/newlib/libc/stdlib/mbtowc_r.c
@@ -19,8 +19,8 @@ int (*__mbtowc) (struct _reent *, wchar_t *, const char *, size_t,
int
_DEFUN (_mbtowc_r, (r, pwc, s, n, state),
struct _reent *r _AND
- wchar_t *pwc _AND
- const char *s _AND
+ wchar_t *__restrict pwc _AND
+ const char *__restrict s _AND
size_t n _AND
mbstate_t *state)
{
diff --git a/newlib/libc/stdlib/mprec.h b/newlib/libc/stdlib/mprec.h
index d4732ca8c..afda63e73 100644
--- a/newlib/libc/stdlib/mprec.h
+++ b/newlib/libc/stdlib/mprec.h
@@ -360,6 +360,7 @@ typedef struct _Bigint _Bigint;
#define mult __multiply
#define pow5mult __pow5mult
#define lshift __lshift
+#define match __match
#define cmp __mcmp
#define diff __mdiff
#define ulp __ulp
@@ -396,12 +397,18 @@ 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));
+int _EXFUN(match,(const char**, char*));
_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, _CONST 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));
+#if defined (_HAVE_LONG_DOUBLE) && !defined (_LDBL_EQ_DBL)
+int _EXFUN(_strtorx_r,(struct _reent *, _CONST char *, char **, int, void *));
+int _EXFUN(_strtodg_r,(struct _reent *p, _CONST char *s00, char **se, struct FPI *fpi, Long *exp, __ULong *bits));
+#endif /* _HAVE_LONG_DOUBLE && !_LDBL_EQ_DBL */
+
#if defined(PREFER_SIZE_OVER_SPEED) || defined(__OPTIMIZE_SIZE__) || defined(_SMALL_HEXDIG)
unsigned char _EXFUN(__hexdig_fun,(unsigned char));
#endif /* !defined(PREFER_SIZE_OVER_SPEED) && !defined(__OPTIMIZE_SIZE__) && !defined(_SMALL_HEXDIG) */
diff --git a/newlib/libc/stdlib/nano-mallocr.c b/newlib/libc/stdlib/nano-mallocr.c
index e0a919590..0b5631cae 100644
--- a/newlib/libc/stdlib/nano-mallocr.c
+++ b/newlib/libc/stdlib/nano-mallocr.c
@@ -46,6 +46,8 @@
#define MAX(a,b) ((a) >= (b) ? (a) : (b))
#endif
+#define _SBRK_R(X) _sbrk_r(X)
+
#ifdef INTERNAL_NEWLIB
#include <sys/config.h>
@@ -54,10 +56,10 @@
#define RARG struct _reent *reent_ptr,
#define RONEARG struct _reent *reent_ptr
#define RCALL reent_ptr,
+#define RONECALL reent_ptr
-/* Disable MALLOC_LOCK so far. So it won't be thread safe */
-#define MALLOC_LOCK /*__malloc_lock(reent_ptr) */
-#define MALLOC_UNLOCK /*__malloc_unlock(reent_ptr) */
+#define MALLOC_LOCK __malloc_lock(reent_ptr)
+#define MALLOC_UNLOCK __malloc_unlock(reent_ptr)
#define RERRNO reent_ptr->_errno
@@ -72,13 +74,14 @@
#define nano_malloc_usable_size _malloc_usable_size_r
#define nano_malloc_stats _malloc_stats_r
#define nano_mallinfo _mallinfo_r
-#define nano_allopt _mallopt_r
+#define nano_mallopt _mallopt_r
#else /* ! INTERNAL_NEWLIB */
#define RARG
#define RONEARG
#define RCALL
+#define RONECALL
#define MALLOC_LOCK
#define MALLOC_UNLOCK
#define RERRNO errno
@@ -94,14 +97,16 @@
#define nano_malloc_usable_size malloc_usable_size
#define nano_malloc_stats malloc_stats
#define nano_mallinfo mallinfo
-#define nano_allopt mallopt
+#define nano_mallopt mallopt
#endif /* ! INTERNAL_NEWLIB */
-/* Define free_list as internal name to avoid conflict with user names */
+/* Redefine names to avoid conflict with user names */
#define free_list __malloc_free_list
+#define sbrk_start __malloc_sbrk_start
+#define current_mallinfo __malloc_current_mallinfo
#define ALIGN_TO(size, align) \
- (((size) + (align) -1) & ~((align) -1))
+ (((size) + (align) -1L) & ~((align) -1L))
/* Alignment of allocated block */
#define MALLOC_ALIGN (8U)
@@ -134,19 +139,53 @@ typedef struct malloc_chunk
*/
/* size of the allocated payload area, including size before
CHUNK_OFFSET */
- int size;
+ long size;
/* since here, the memory is either the next free block, or data load */
struct malloc_chunk * next;
}chunk;
+/* Copied from malloc.h */
+struct mallinfo
+{
+ size_t arena; /* total space allocated from system */
+ size_t ordblks; /* number of non-inuse chunks */
+ size_t smblks; /* unused -- always zero */
+ size_t hblks; /* number of mmapped regions */
+ size_t hblkhd; /* total space in mmapped regions */
+ size_t usmblks; /* unused -- always zero */
+ size_t fsmblks; /* unused -- always zero */
+ size_t uordblks; /* total allocated space */
+ size_t fordblks; /* total non-inuse space */
+ size_t keepcost; /* top-most, releasable (via malloc_trim) space */
+};
+
#define CHUNK_OFFSET ((malloc_size_t)(&(((struct malloc_chunk *)0)->next)))
/* size of smallest possible chunk. A memory piece smaller than this size
* won't be able to create a chunk */
#define MALLOC_MINCHUNK (CHUNK_OFFSET + MALLOC_PADDING + MALLOC_MINSIZE)
-static chunk * get_chunk_from_ptr(void * ptr)
+/* Forward data declarations */
+extern chunk * free_list;
+extern char * sbrk_start;
+extern struct mallinfo current_mallinfo;
+
+/* Forward function declarations */
+extern void * nano_malloc(RARG malloc_size_t);
+extern void nano_free (RARG void * free_p);
+extern void nano_cfree(RARG void * ptr);
+extern void * nano_calloc(RARG malloc_size_t n, malloc_size_t elem);
+extern struct mallinfo nano_mallinfo(RONEARG);
+extern void nano_malloc_stats(RONEARG);
+extern malloc_size_t nano_malloc_usable_size(RARG void * ptr);
+extern void * nano_realloc(RARG void * ptr, malloc_size_t size);
+extern void * nano_memalign(RARG size_t align, size_t s);
+extern int nano_mallopt(RARG int parameter_number, int parameter_value);
+extern void * nano_valloc(RARG size_t s);
+extern void * nano_pvalloc(RARG size_t s);
+
+static inline chunk * get_chunk_from_ptr(void * ptr)
{
chunk * c = (chunk *)((char *)ptr - CHUNK_OFFSET);
/* Skip the padding area */
@@ -155,8 +194,12 @@ static chunk * get_chunk_from_ptr(void * ptr)
}
#ifdef DEFINE_MALLOC
+/* List list header of free blocks */
chunk * free_list = NULL;
+/* Starting point of memory allocated from system */
+char * sbrk_start = NULL;
+
/** Function sbrk_aligned
* Algorithm:
* Use sbrk() to obtain more memory and ensure it is CHUNK_ALIGN aligned
@@ -167,7 +210,9 @@ static void* sbrk_aligned(RARG malloc_size_t s)
{
char *p, *align_p;
- p = _sbrk_r(RCALL s);
+ if (sbrk_start == NULL) sbrk_start = _SBRK_R(RCALL 0);
+
+ p = _SBRK_R(RCALL s);
/* sbrk returns -1 if fail to allocate */
if (p == (void *)-1)
@@ -178,7 +223,7 @@ static void* sbrk_aligned(RARG malloc_size_t s)
{
/* p is not aligned, ask for a few more bytes so that we have s
* bytes reserved from align_p. */
- p = _sbrk_r(RCALL align_p - p);
+ p = _SBRK_R(RCALL align_p - p);
if (p == (void *)-1)
return p;
}
@@ -280,7 +325,6 @@ void * nano_malloc(RARG malloc_size_t s)
#ifdef DEFINE_FREE
#define MALLOC_CHECK_DOUBLE_FREE
-extern chunk * free_list;
/** Function nano_free
* Implementation of libc free.
* Algorithm:
@@ -381,8 +425,6 @@ void nano_free (RARG void * free_p)
#endif /* DEFINE_FREE */
#ifdef DEFINE_CFREE
-void nano_free (RARG void * free_p);
-
void nano_cfree(RARG void * ptr)
{
nano_free(RCALL ptr);
@@ -390,8 +432,6 @@ void nano_cfree(RARG void * ptr)
#endif /* DEFINE_CFREE */
#ifdef DEFINE_CALLOC
-void * nano_malloc(RARG malloc_size_t s);
-
/* Function nano_calloc
* Implement calloc simply by calling malloc and set zero */
void * nano_calloc(RARG malloc_size_t n, malloc_size_t elem)
@@ -403,10 +443,6 @@ void * nano_calloc(RARG malloc_size_t n, malloc_size_t elem)
#endif /* DEFINE_CALLOC */
#ifdef DEFINE_REALLOC
-void * nano_malloc(RARG malloc_size_t s);
-void nano_free (RARG void * free_p);
-malloc_size_t nano_malloc_usable_size(RARG void * ptr);
-
/* Function nano_realloc
* Implement realloc by malloc + memcpy */
void * nano_realloc(RARG void * ptr, malloc_size_t size)
@@ -438,32 +474,49 @@ void * nano_realloc(RARG void * ptr, malloc_size_t size)
#endif /* DEFINE_REALLOC */
#ifdef DEFINE_MALLINFO
-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 */
-};
-
-static struct mallinfo current_mallinfo={0,0,0,0,0,0,0,0,0,0};
+struct mallinfo current_mallinfo={0,0,0,0,0,0,0,0,0,0};
struct mallinfo nano_mallinfo(RONEARG)
{
+ char * sbrk_now;
+ chunk * pf;
+ size_t free_size = 0;
+ size_t total_size;
+
+ MALLOC_LOCK;
+
+ if (sbrk_start == NULL) total_size = 0;
+ else {
+ sbrk_now = _SBRK_R(RCALL 0);
+
+ if (sbrk_now == (void *)-1)
+ total_size = (size_t)-1;
+ else
+ total_size = (size_t) (sbrk_now - sbrk_start);
+ }
+
+ for (pf = free_list; pf; pf = pf->next)
+ free_size += pf->size;
+
+ current_mallinfo.arena = total_size;
+ current_mallinfo.fordblks = free_size;
+ current_mallinfo.uordblks = total_size - free_size;
+
+ MALLOC_UNLOCK;
return current_mallinfo;
}
-
#endif /* DEFINE_MALLINFO */
#ifdef DEFINE_MALLOC_STATS
void nano_malloc_stats(RONEARG)
{
+ nano_mallinfo(RONECALL);
+ fiprintf(stderr, "max system bytes = %10u\n",
+ current_mallinfo.arena);
+ fiprintf(stderr, "system bytes = %10u\n",
+ current_mallinfo.arena);
+ fiprintf(stderr, "in use bytes = %10u\n",
+ current_mallinfo.uordblks);
}
#endif /* DEFINE_MALLOC_STATS */
@@ -484,8 +537,6 @@ malloc_size_t nano_malloc_usable_size(RARG void * ptr)
#endif /* DEFINE_MALLOC_USABLE_SIZE */
#ifdef DEFINE_MEMALIGN
-void * nano_malloc(RARG malloc_size_t s);
-
/* Function nano_memalign
* Allocate memory block aligned at specific boundary.
* align: required alignment. Must be power of 2. Return NULL
@@ -563,8 +614,6 @@ int nano_mallopt(RARG int parameter_number, int parameter_value)
#endif /* DEFINE_MALLOPT */
#ifdef DEFINE_VALLOC
-void * nano_memalign(RARG size_t align, size_t s);
-
void * nano_valloc(RARG size_t s)
{
return nano_memalign(RCALL MALLOC_PAGE_ALIGN, s);
@@ -572,8 +621,6 @@ void * nano_valloc(RARG size_t s)
#endif /* DEFINE_VALLOC */
#ifdef DEFINE_PVALLOC
-void * nano_valloc(RARG size_t s);
-
void * nano_pvalloc(RARG size_t s)
{
return nano_valloc(RCALL ALIGN_TO(s, MALLOC_PAGE_ALIGN));
diff --git a/newlib/libc/stdlib/on_exit.c b/newlib/libc/stdlib/on_exit.c
index b7fd130dc..a405b1b51 100644
--- a/newlib/libc/stdlib/on_exit.c
+++ b/newlib/libc/stdlib/on_exit.c
@@ -58,6 +58,15 @@ Supporting OS subroutines required: None
#include <stdlib.h>
#include "atexit.h"
+#ifdef _REENT_SMALL
+
+#include "on_exit_args.h"
+
+/* force linking of static instance of _on_exit_args */
+const void * const __on_exit_dummy = &__on_exit_args;
+
+#endif /* def _REENT_SMALL */
+
/*
* Register a function to be performed at exit.
*/
diff --git a/newlib/libc/stdlib/on_exit_args.c b/newlib/libc/stdlib/on_exit_args.c
new file mode 100644
index 000000000..88f9ffdbd
--- /dev/null
+++ b/newlib/libc/stdlib/on_exit_args.c
@@ -0,0 +1,30 @@
+/*
+ * Static instance of _on_exit_args struct.
+ *
+ * When _REENT_SMALL is used, _atexit struct only contains a pointer to
+ * _on_exit_args struct, so this was always allocated with malloc() - even for
+ * the first 32 calls of atexit()-like functions, which are guaranteed to
+ * succeed, but could fail because of "out of memory" error. This is even worse
+ * when _ATEXIT_DYNAMIC_ALLOC is _NOT_ defined, in which case malloc() is not
+ * used by internals of atexit()-like functions. In such configuration all calls
+ * to the functions that need _on_exit_args struct (on_exit() and
+ * __cxa_atexit()) would fail.
+ *
+ * Thats why a static instance of _on_exit_args struct is provided for
+ * _REENT_SMALL configuration. This way the first 32 calls to atexit()-like
+ * functions don't need malloc() and will always succeed.
+ *
+ * Because this struct is not needed for "normal" atexit(), it is used as a weak
+ * reference in __register_exitproc(), but any use of on_exit() or
+ * __cxa_atexit() will force it to be linked.
+ */
+
+#include <reent.h>
+
+#ifdef _REENT_SMALL
+
+static struct _on_exit_args _on_exit_args_instance = {{_NULL}, {_NULL}, 0, 0};
+
+struct _on_exit_args * const __on_exit_args = &_on_exit_args_instance;
+
+#endif /* def _REENT_SMALL */
diff --git a/newlib/libc/stdlib/on_exit_args.h b/newlib/libc/stdlib/on_exit_args.h
new file mode 100644
index 000000000..c54ad1ef2
--- /dev/null
+++ b/newlib/libc/stdlib/on_exit_args.h
@@ -0,0 +1,12 @@
+#ifndef NEWLIB_CYGWIN_NEWLIB_LIBC_STDLIB_ON_EXIT_ARGS_H_
+#define NEWLIB_CYGWIN_NEWLIB_LIBC_STDLIB_ON_EXIT_ARGS_H_
+
+#include <reent.h>
+
+#ifdef _REENT_SMALL
+
+extern struct _on_exit_args * const __on_exit_args;
+
+#endif /* def _REENT_SMALL */
+
+#endif /* def NEWLIB_CYGWIN_NEWLIB_LIBC_STDLIB_ON_EXIT_ARGS_H_ */
diff --git a/newlib/libc/stdlib/quick_exit.c b/newlib/libc/stdlib/quick_exit.c
new file mode 100644
index 000000000..1d6fb231e
--- /dev/null
+++ b/newlib/libc/stdlib/quick_exit.c
@@ -0,0 +1,82 @@
+/*-
+ * Copyright (c) 2011 David Chisnall
+ * Copyright (c) 2015 embedded brains GmbH
+ * 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.
+ *
+ * $FreeBSD$
+ */
+
+#include <stdlib.h>
+#include <unistd.h>
+#include <sys/lock.h>
+
+/**
+ * Linked list of quick exit handlers. This is simpler than the atexit()
+ * version, because it is not required to support C++ destructors or
+ * DSO-specific cleanups.
+ */
+struct quick_exit_handler {
+ struct quick_exit_handler *next;
+ void (*cleanup)(void);
+};
+
+/**
+ * Lock protecting the handlers list.
+ */
+__LOCK_INIT(static, atexit_mutex);
+/**
+ * Stack of cleanup handlers. These will be invoked in reverse order when
+ */
+static struct quick_exit_handler *handlers;
+
+int
+at_quick_exit(void (*func)(void))
+{
+ struct quick_exit_handler *h;
+
+ h = malloc(sizeof(*h));
+
+ if (NULL == h)
+ return (1);
+ h->cleanup = func;
+ __lock_acquire(atexit_mutex);
+ h->next = handlers;
+ handlers = h;
+ __lock_release(atexit_mutex);
+ return (0);
+}
+
+void
+quick_exit(int status)
+{
+ struct quick_exit_handler *h;
+
+ /*
+ * XXX: The C++ spec requires us to call std::terminate if there is an
+ * exception here.
+ */
+ for (h = handlers; NULL != h; h = h->next)
+ h->cleanup();
+ _exit(status);
+}
diff --git a/newlib/libc/stdlib/random.c b/newlib/libc/stdlib/random.c
new file mode 100644
index 000000000..de132f363
--- /dev/null
+++ b/newlib/libc/stdlib/random.c
@@ -0,0 +1,82 @@
+/*
+FUNCTION
+<<random>>, <<srandom>>---pseudo-random numbers
+
+INDEX
+ random
+INDEX
+ srandom
+
+ANSI_SYNOPSIS
+ #define _XOPEN_SOURCE 500
+ #include <stdlib.h>
+ long int random(void);
+ void srandom(unsigned int <[seed]>);
+
+
+
+DESCRIPTION
+<<random>> 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 <<random>> 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 <<random>>.
+
+You can set the random seed using <<srandom>>; 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 <<srandom>> to set the same
+random seed at the outset.
+
+RETURNS
+<<random>> returns the next pseudo-random integer in sequence; it is a
+number between <<0>> and <<RAND_MAX>> (inclusive).
+
+<<srandom>> does not return a result.
+
+NOTES
+<<random>> and <<srandom>> are unsafe for multi-threaded applications.
+
+_XOPEN_SOURCE may be any value >= 500.
+
+PORTABILITY
+<<random>> is required by XSI. This implementation uses the same
+algorithm as <<rand>>.
+
+<<random>> requires no supporting OS subroutines.
+*/
+
+#ifndef _REENT_ONLY
+
+#include <stdlib.h>
+#include <reent.h>
+
+void
+_DEFUN (srandom, (seed), unsigned int seed)
+{
+ struct _reent *reent = _REENT;
+
+ _REENT_CHECK_RAND48(reent);
+ _REENT_RAND_NEXT(reent) = seed;
+}
+
+long int
+_DEFUN_VOID (random)
+{
+ struct _reent *reent = _REENT;
+
+ /* 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 (long int)((_REENT_RAND_NEXT(reent) >> 32) & RAND_MAX);
+}
+
+#endif /* _REENT_ONLY */
diff --git a/newlib/libc/stdlib/rpmatch.c b/newlib/libc/stdlib/rpmatch.c
new file mode 100644
index 000000000..0bbdf43ed
--- /dev/null
+++ b/newlib/libc/stdlib/rpmatch.c
@@ -0,0 +1,88 @@
+/*
+FUNCTION
+<<rpmatch>>---determine whether response to question is affirmative or negative
+
+INDEX
+ rpmatch
+
+ANSI_SYNOPSIS
+ #include <stdlib.h>
+ int rpmatch(const char *<[response]>);
+
+TRAD_SYNOPSIS
+ #include <stdlib.h>
+ int rpmatch(<[response]>)
+ const char *<[response]>;
+
+DESCRIPTION
+The <<rpmatch>> function determines whether <[response]> is an affirmative
+or negative response to a question according to the current locale.
+
+RETURNS
+<<rpmatch>> returns 1 if <[response]> is affirmative, 0 if negative, or -1
+if not recognized as either.
+
+PORTABILITY
+<<rpmatch>> is a BSD extension also found in glibc.
+
+NOTES
+No supporting OS subroutines are required.
+*/
+
+/* This code is originally taken from FreeBSD. */
+/*-
+ * Copyright (c) 2004-2005 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 <sys/cdefs.h>
+#include <sys/types.h>
+
+#include <langinfo.h>
+#include <regex.h>
+#include <stdlib.h>
+
+int
+_DEFUN(rpmatch, (response),
+ const char *response)
+{
+ regex_t yes, no;
+ int ret;
+
+ if (regcomp(&yes, nl_langinfo(YESEXPR), REG_EXTENDED|REG_NOSUB) != 0)
+ return (-1);
+ if (regcomp(&no, nl_langinfo(NOEXPR), REG_EXTENDED|REG_NOSUB) != 0) {
+ regfree(&yes);
+ return (-1);
+ }
+ if (regexec(&yes, response, 0, NULL, 0) == 0)
+ ret = 1;
+ else if (regexec(&no, response, 0, NULL, 0) == 0)
+ ret = 0;
+ else
+ ret = -1;
+ regfree(&yes);
+ regfree(&no);
+ return (ret);
+}
diff --git a/newlib/libc/stdlib/setenv_r.c b/newlib/libc/stdlib/setenv_r.c
index f9ff2c1cd..c32c6aca9 100644
--- a/newlib/libc/stdlib/setenv_r.c
+++ b/newlib/libc/stdlib/setenv_r.c
@@ -79,9 +79,6 @@ _DEFUN (_setenv_r, (reent_ptr, name, value, rewrite),
{ /* 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;
}
}
@@ -128,10 +125,6 @@ _DEFUN (_setenv_r, (reent_ptr, name, value, rewrite),
ENV_UNLOCK;
- /* if we are setting the TZ environment variable, update timezone info */
- if (strncmp ((*p_environ)[offset], "TZ=", 3) == 0)
- tzset ();
-
return 0;
}
diff --git a/newlib/libc/stdlib/stdlib.tex b/newlib/libc/stdlib/stdlib.tex
index 4f7bc59ae..75d80f4d6 100644
--- a/newlib/libc/stdlib/stdlib.tex
+++ b/newlib/libc/stdlib/stdlib.tex
@@ -20,9 +20,10 @@ The corresponding declarations are in the header file @file{stdlib.h}.
* 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
+* gcvt:: Format double or float as string
* exit:: End program execution
* getenv:: Look up environment variable
+* itoa:: Integer to string
* labs:: Long integer absolute value (magnitude)
* ldiv:: Divide two long integers
* llabs:: Long long integer absolute value (magnitude)
@@ -37,7 +38,9 @@ The corresponding declarations are in the header file @file{stdlib.h}.
* on_exit:: Request execution of functions at program exit
* qsort:: Array sort
* rand:: Pseudo-random numbers
+* random:: Pseudo-random numbers
* rand48:: Uniformly distributed pseudo-random numbers
+* rpmatch:: Determine whether response is affirmative or negative
* strtod:: String to double or float
* strtol:: String to long
* strtoll:: String to long long
@@ -50,6 +53,7 @@ The corresponding declarations are in the header file @file{stdlib.h}.
* wcstoul:: Wide string to unsigned long
* wcstoull:: Wide string to unsigned long long
* system:: Execute command string
+* utoa:: Unsigned integer to string
* wcstombs:: Minimal wide string to multibyte string converter
* wctomb:: Minimal wide character to multibyte converter
@end menu
@@ -106,6 +110,9 @@ The corresponding declarations are in the header file @file{stdlib.h}.
@include stdlib/getenv.def
@page
+@include stdlib/itoa.def
+
+@page
@include stdlib/labs.def
@page
@@ -148,9 +155,15 @@ The corresponding declarations are in the header file @file{stdlib.h}.
@include stdlib/rand.def
@page
+@include stdlib/random.def
+
+@page
@include stdlib/rand48.def
@page
+@include stdlib/rpmatch.def
+
+@page
@include stdlib/strtod.def
@page
@@ -187,6 +200,9 @@ The corresponding declarations are in the header file @file{stdlib.h}.
@include stdlib/system.def
@page
+@include stdlib/utoa.def
+
+@page
@include stdlib/wcstombs.def
@page
diff --git a/newlib/libc/stdlib/strtod.c b/newlib/libc/stdlib/strtod.c
index ee33960e3..433dc7f32 100644
--- a/newlib/libc/stdlib/strtod.c
+++ b/newlib/libc/stdlib/strtod.c
@@ -11,11 +11,11 @@ INDEX
ANSI_SYNOPSIS
#include <stdlib.h>
- double strtod(const char *<[str]>, char **<[tail]>);
- float strtof(const char *<[str]>, char **<[tail]>);
+ double strtod(const char *restrict <[str]>, char **restrict <[tail]>);
+ float strtof(const char *restrict <[str]>, char **restrict <[tail]>);
double _strtod_r(void *<[reent]>,
- const char *<[str]>, char **<[tail]>);
+ const char *restrict <[str]>, char **restrict <[tail]>);
TRAD_SYNOPSIS
#include <stdlib.h>
@@ -163,7 +163,7 @@ _DEFUN (sulp, (x, scale),
rv = ulp(dval(x));
if (!scale || (i = 2*P + 1 - ((dword0(x) & Exp_mask) >> Exp_shift)) <= 0)
return rv; /* Is there an example where i <= 0 ? */
- dword0(u) = Exp_1 + (i << Exp_shift);
+ dword0(u) = Exp_1 + ((__int32_t)i << Exp_shift);
#ifndef _DOUBLE_IS_32BITS
dword1(u) = 0;
#endif
@@ -212,32 +212,11 @@ _DEFUN (ULtod, (L, bits, exp, k),
}
#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)
+ _CONST char *__restrict s00 _AND
+ char **__restrict se)
{
#ifdef Avoid_Underflow
int scale;
@@ -1255,15 +1234,15 @@ _DEFUN (_strtod_r, (ptr, s00, se),
double
_DEFUN (strtod, (s00, se),
- _CONST char *s00 _AND char **se)
+ _CONST char *__restrict s00 _AND char **__restrict se)
{
return _strtod_r (_REENT, s00, se);
}
float
_DEFUN (strtof, (s00, se),
- _CONST char *s00 _AND
- char **se)
+ _CONST char *__restrict s00 _AND
+ char **__restrict se)
{
double retval = _strtod_r (_REENT, s00, se);
if (isnan (retval))
diff --git a/newlib/libc/stdlib/strtodg.c b/newlib/libc/stdlib/strtodg.c
new file mode 100644
index 000000000..a6b32908b
--- /dev/null
+++ b/newlib/libc/stdlib/strtodg.c
@@ -0,0 +1,1147 @@
+/****************************************************************
+
+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 "."). */
+
+#include <_ansi.h>
+#include <errno.h>
+#include <stdlib.h>
+#include <string.h>
+#include "mprec.h"
+#include "gdtoa.h"
+#include "gd_qnan.h"
+
+#include "locale.h"
+
+#if defined (_HAVE_LONG_DOUBLE) && !defined (_LDBL_EQ_DBL)
+
+#define USE_LOCALE
+
+ static const int
+fivesbits[] = { 0, 3, 5, 7, 10, 12, 14, 17, 19, 21,
+ 24, 26, 28, 31, 33, 35, 38, 40, 42, 45,
+ 47, 49, 52
+#ifdef VAX
+ , 54, 56
+#endif
+ };
+
+static _Bigint *
+#ifdef KR_headers
+sum(p, a, b) struct _reent *p; _Bigint *a; _Bigint *b;
+#else
+sum(struct _reent *p, _Bigint *a, _Bigint *b)
+#endif
+{
+ _Bigint *c;
+ __ULong carry, *xc, *xa, *xb, *xe, y;
+#ifdef Pack_32
+ __ULong z;
+#endif
+
+ if (a->_wds < b->_wds) {
+ c = b; b = a; a = c;
+ }
+ c = Balloc(p, a->_k);
+ c->_wds = a->_wds;
+ carry = 0;
+ xa = a->_x;
+ xb = b->_x;
+ xc = c->_x;
+ xe = xc + b->_wds;
+#ifdef Pack_32
+ do {
+ y = (*xa & 0xffff) + (*xb & 0xffff) + carry;
+ carry = (y & 0x10000) >> 16;
+ z = (*xa++ >> 16) + (*xb++ >> 16) + carry;
+ carry = (z & 0x10000) >> 16;
+ Storeinc(xc, z, y);
+ }
+ while(xc < xe);
+ xe += a->_wds - b->_wds;
+ while(xc < xe) {
+ y = (*xa & 0xffff) + carry;
+ carry = (y & 0x10000) >> 16;
+ z = (*xa++ >> 16) + carry;
+ carry = (z & 0x10000) >> 16;
+ Storeinc(xc, z, y);
+ }
+#else
+ do {
+ y = *xa++ + *xb++ + carry;
+ carry = (y & 0x10000) >> 16;
+ *xc++ = y & 0xffff;
+ }
+ while(xc < xe);
+ xe += a->_wds - b->_wds;
+ while(xc < xe) {
+ y = *xa++ + carry;
+ carry = (y & 0x10000) >> 16;
+ *xc++ = y & 0xffff;
+ }
+#endif
+ if (carry) {
+ if (c->_wds == c->_maxwds) {
+ b = Balloc(p, c->_k + 1);
+ Bcopy(b, c);
+ Bfree(p, c);
+ c = b;
+ }
+ c->_x[c->_wds++] = 1;
+ }
+ return c;
+ }
+
+static void
+#ifdef KR_headers
+rshift(b, k) _Bigint *b; int k;
+#else
+rshift(_Bigint *b, int k)
+#endif
+{
+ __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 int
+#ifdef KR_headers
+trailz(b) _Bigint *b;
+#else
+trailz(_Bigint *b)
+#endif
+{
+ __ULong L, *x, *xe;
+ int n = 0;
+
+ x = b->_x;
+ xe = x + b->_wds;
+ for(n = 0; x < xe && !*x; x++)
+ n += ULbits;
+ if (x < xe) {
+ L = *x;
+ n += lo0bits(&L);
+ }
+ return n;
+ }
+
+ _Bigint *
+#ifdef KR_headers
+increment(p, b) struct _reent *p; _Bigint *b;
+#else
+increment(struct _reent *p, _Bigint *b)
+#endif
+{
+ __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(p,b->_k+1);
+ Bcopy(b1,b);
+ Bfree(p,b);
+ b = b1;
+ }
+ b->_x[b->_wds++] = 1;
+ }
+ return b;
+ }
+
+ int
+#ifdef KR_headers
+decrement(b) _Bigint *b;
+#else
+decrement(_Bigint *b)
+#endif
+{
+ __ULong *x, *xe;
+#ifdef Pack_16
+ __ULong borrow = 1, y;
+#endif
+
+ x = b->_x;
+ xe = x + b->_wds;
+#ifdef Pack_32
+ do {
+ if (*x) {
+ --*x;
+ break;
+ }
+ *x++ = 0xffffffffL;
+ }
+ while(x < xe);
+#else
+ do {
+ y = *x - borrow;
+ borrow = (y & 0x10000) >> 16;
+ *x++ = y & 0xffff;
+ } while(borrow && x < xe);
+#endif
+ return STRTOG_Inexlo;
+ }
+
+ static int
+#ifdef KR_headers
+all_on(b, n) _Bigint *b; int n;
+#else
+all_on(_Bigint *b, int n)
+#endif
+{
+ __ULong *x, *xe;
+
+ x = b->_x;
+ xe = x + (n >> kshift);
+ while(x < xe)
+ if ((*x++ & ALL_ON) != ALL_ON)
+ return 0;
+ if (n &= kmask)
+ return ((*x | (ALL_ON << n)) & ALL_ON) == ALL_ON;
+ return 1;
+ }
+
+ _Bigint *
+#ifdef KR_headers
+set_ones(p, b, n) struct _reent *p; _Bigint *b; int n;
+#else
+set_ones(struct _reent *p, _Bigint *b, int n)
+#endif
+{
+ int k;
+ __ULong *x, *xe;
+
+ k = (n + ((1 << kshift) - 1)) >> kshift;
+ if (b->_k < k) {
+ Bfree(p,b);
+ b = Balloc(p,k);
+ }
+ k = n >> kshift;
+ if (n &= kmask)
+ k++;
+ b->_wds = k;
+ x = b->_x;
+ xe = x + k;
+ while(x < xe)
+ *x++ = ALL_ON;
+ if (n)
+ x[-1] >>= ULbits - n;
+ return b;
+ }
+
+ static int
+rvOK
+#ifdef KR_headers
+ (p, d, fpi, exp, bits, exact, rd, irv)
+ struct _reent *p; double d; FPI *fpi; Long *exp; __ULong *bits; int exact, rd, *irv;
+#else
+ (struct _reent *p, double d, FPI *fpi, Long *exp, __ULong *bits, int exact, int rd, int *irv)
+#endif
+{
+ _Bigint *b;
+ __ULong carry, inex, lostbits;
+ int bdif, e, j, k, k1, nb, rv;
+
+ carry = rv = 0;
+ b = d2b(p, d, &e, &bdif);
+ bdif -= nb = fpi->nbits;
+ e += bdif;
+ if (bdif <= 0) {
+ if (exact)
+ goto trunc;
+ goto ret;
+ }
+ if (P == nb) {
+ if (
+#ifndef IMPRECISE_INEXACT
+ exact &&
+#endif
+ fpi->rounding ==
+#ifdef RND_PRODQUOT
+ FPI_Round_near
+#else
+ Flt_Rounds
+#endif
+ ) goto trunc;
+ goto ret;
+ }
+ switch(rd) {
+ case 1:
+ goto trunc;
+ case 2:
+ break;
+ default: /* round near */
+ k = bdif - 1;
+ if (k < 0)
+ goto trunc;
+ if (!k) {
+ if (!exact)
+ goto ret;
+ if (b->_x[0] & 2)
+ break;
+ goto trunc;
+ }
+ if (b->_x[k>>kshift] & ((__ULong)1 << (k & kmask)))
+ break;
+ goto trunc;
+ }
+ /* "break" cases: round up 1 bit, then truncate; bdif > 0 */
+ carry = 1;
+ trunc:
+ inex = lostbits = 0;
+ if (bdif > 0) {
+ if ( (lostbits = any_on(b, bdif)) !=0)
+ inex = STRTOG_Inexlo;
+ rshift(b, bdif);
+ if (carry) {
+ inex = STRTOG_Inexhi;
+ b = increment(p, b);
+ if ( (j = nb & kmask) !=0)
+ j = ULbits - j;
+ if (hi0bits(b->_x[b->_wds - 1]) != j) {
+ if (!lostbits)
+ lostbits = b->_x[0] & 1;
+ rshift(b, 1);
+ e++;
+ }
+ }
+ }
+ else if (bdif < 0)
+ b = lshift(p, b, -bdif);
+ if (e < fpi->emin) {
+ k = fpi->emin - e;
+ e = fpi->emin;
+ if (k > nb || fpi->sudden_underflow) {
+ b->_wds = inex = 0;
+ *irv = STRTOG_Underflow | STRTOG_Inexlo;
+ }
+ else {
+ k1 = k - 1;
+ if (k1 > 0 && !lostbits)
+ lostbits = any_on(b, k1);
+ if (!lostbits && !exact)
+ goto ret;
+ lostbits |=
+ carry = b->_x[k1>>kshift] & (1 << (k1 & kmask));
+ rshift(b, k);
+ *irv = STRTOG_Denormal;
+ if (carry) {
+ b = increment(p, b);
+ inex = STRTOG_Inexhi | STRTOG_Underflow;
+ }
+ else if (lostbits)
+ inex = STRTOG_Inexlo | STRTOG_Underflow;
+ }
+ }
+ else if (e > fpi->emax) {
+ e = fpi->emax + 1;
+ *irv = STRTOG_Infinite | STRTOG_Overflow | STRTOG_Inexhi;
+#ifndef NO_ERRNO
+ errno = ERANGE;
+#endif
+ b->_wds = inex = 0;
+ }
+ *exp = e;
+ copybits(bits, nb, b);
+ *irv |= inex;
+ rv = 1;
+ ret:
+ Bfree(p,b);
+ return rv;
+ }
+
+ static int
+#ifdef KR_headers
+mantbits(d) double d;
+#else
+mantbits(U d)
+#endif
+{
+ __ULong L;
+#ifdef VAX
+ L = word1(d) << 16 | word1(d) >> 16;
+ if (L)
+#else
+ if ( (L = word1(d)) !=0)
+#endif
+ return P - lo0bits(&L);
+#ifdef VAX
+ L = word0(d) << 16 | word0(d) >> 16 | Exp_msk11;
+#else
+ L = word0(d) | Exp_msk1;
+#endif
+ return P - 32 - lo0bits(&L);
+ }
+
+ int
+_strtodg_r
+#ifdef KR_headers
+ (p, s00, se, fpi, exp, bits)
+ struct _reent *p; const char *s00; char **se; FPI *fpi; Long *exp; __ULong *bits;
+#else
+ (struct _reent *p, const char *s00, char **se, FPI *fpi, Long *exp, __ULong *bits)
+#endif
+{
+ int abe, abits, asub;
+ int bb0, bb2, bb5, bbe, bd2, bd5, bbbits, bs2, c, decpt, denorm;
+ int dsign, e, e1, e2, emin, esign, finished, i, inex, irv;
+ int j, k, nbits, nd, nd0, nf, nz, nz0, rd, rvbits, rve, rve1, sign;
+ int sudden_underflow;
+ const char *s, *s0, *s1;
+ //double adj, adj0, rv, tol;
+ double adj0, tol;
+ U adj, rv;
+ Long L;
+ __ULong y, z;
+ _Bigint *ab, *bb, *bb1, *bd, *bd0, *bs, *delta, *rvb, *rvb0;
+
+ irv = STRTOG_Zero;
+ denorm = sign = nz0 = nz = 0;
+ dval(rv) = 0.;
+ rvb = 0;
+ nbits = fpi->nbits;
+ for(s = s00;;s++) switch(*s) {
+ case '-':
+ sign = 1;
+ /* no break */
+ case '+':
+ if (*++s)
+ goto break2;
+ /* no break */
+ case 0:
+ sign = 0;
+ irv = STRTOG_NoNumber;
+ s = s00;
+ goto ret;
+ case '\t':
+ case '\n':
+ case '\v':
+ case '\f':
+ case '\r':
+ case ' ':
+ continue;
+ default:
+ goto break2;
+ }
+ break2:
+ if (*s == '0') {
+#ifndef NO_HEX_FP
+ switch(s[1]) {
+ case 'x':
+ case 'X':
+ irv = gethex(p, &s, fpi, exp, &rvb, sign);
+ if (irv == STRTOG_NoNumber) {
+ s = s00;
+ sign = 0;
+ }
+ goto ret;
+ }
+#endif
+ nz0 = 1;
+ while(*++s == '0') ;
+ if (!*s)
+ goto ret;
+ }
+ sudden_underflow = fpi->sudden_underflow;
+ s0 = s;
+ y = z = 0;
+ for(decpt = 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;
+#ifdef USE_LOCALE
+ if (strncmp (s, _localeconv_r (p)->decimal_point,
+ strlen (_localeconv_r (p)->decimal_point)) == 0)
+#else
+ if (c == '.')
+#endif
+ {
+ decpt = 1;
+#ifdef USE_LOCALE
+ c = *(s += strlen (_localeconv_r (p)->decimal_point));
+#else
+ c = *++s;
+#endif
+ 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) {
+ irv = STRTOG_NoNumber;
+ s = s00;
+ goto ret;
+ }
+ 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 */
+ if (!decpt)
+ switch(c) {
+ case 'i':
+ case 'I':
+ if (match(&s,"nf")) {
+ --s;
+ if (!match(&s,"inity"))
+ ++s;
+ irv = STRTOG_Infinite;
+ goto infnanexp;
+ }
+ break;
+ case 'n':
+ case 'N':
+ if (match(&s, "an")) {
+ irv = STRTOG_NaN;
+ *exp = fpi->emax + 1;
+#ifndef No_Hex_NaN
+ if (*s == '(') /*)*/
+ irv = hexnan(&s, fpi, bits);
+#endif
+ goto infnanexp;
+ }
+ }
+#endif /* INFNAN_CHECK */
+ irv = STRTOG_NoNumber;
+ s = s00;
+ }
+ goto ret;
+ }
+
+ irv = STRTOG_Normal;
+ e1 = e -= nf;
+ rd = 0;
+ switch(fpi->rounding & 3) {
+ case FPI_Round_up:
+ rd = 2 - sign;
+ break;
+ case FPI_Round_zero:
+ rd = 1;
+ break;
+ case FPI_Round_down:
+ rd = 1 + sign;
+ }
+
+ /* 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)
+ dval(rv) = tens[k - 9] * dval(rv) + z;
+ bd0 = 0;
+ if (nbits <= P && nd <= DBL_DIG) {
+ if (!e) {
+ if (rvOK(p, dval(rv), fpi, exp, bits, 1, rd, &irv))
+ goto ret;
+ }
+ else if (e > 0) {
+ if (e <= Ten_pmax) {
+#ifdef VAX
+ goto vax_ovfl_check;
+#else
+ i = fivesbits[e] + mantbits(rv) <= P;
+ /* rv = */ rounded_product(dval(rv), tens[e]);
+ if (rvOK(p, dval(rv), fpi, exp, bits, i, rd, &irv))
+ goto ret;
+ e1 -= e;
+ goto rv_notOK;
+#endif
+ }
+ i = DBL_DIG - nd;
+ if (e <= Ten_pmax + i) {
+ /* A fancier test would sometimes let us do
+ * this for larger i values.
+ */
+ e2 = e - i;
+ e1 -= i;
+ dval(rv) *= tens[i];
+#ifdef VAX
+ /* VAX exponent range is so narrow we must
+ * worry about overflow here...
+ */
+ vax_ovfl_check:
+ dval(adj) = dval(rv);
+ word0(adj) -= P*Exp_msk1;
+ /* adj = */ rounded_product(dval(adj), tens[e2]);
+ if ((word0(adj) & Exp_mask)
+ > Exp_msk1*(DBL_MAX_EXP+Bias-1-P))
+ goto rv_notOK;
+ word0(adj) += P*Exp_msk1;
+ dval(rv) = dval(adj);
+#else
+ /* rv = */ rounded_product(dval(rv), tens[e2]);
+#endif
+ if (rvOK(p, dval(rv), fpi, exp, bits, 0, rd, &irv))
+ goto ret;
+ e1 -= e2;
+ }
+ }
+#ifndef Inaccurate_Divide
+ else if (e >= -Ten_pmax) {
+ /* rv = */ rounded_quotient(dval(rv), tens[-e]);
+ if (rvOK(p, dval(rv), fpi, exp, bits, 0, rd, &irv))
+ goto ret;
+ e1 -= e;
+ }
+#endif
+ }
+ rv_notOK:
+ e1 += nd - k;
+
+ /* Get starting approximation = rv * 10**e1 */
+
+ e2 = 0;
+ if (e1 > 0) {
+ if ( (i = e1 & 15) !=0)
+ dval(rv) *= tens[i];
+ if (e1 &= ~15) {
+ e1 >>= 4;
+ while(e1 >= (1 << n_bigtens-1)) {
+ e2 += ((word0(rv) & Exp_mask)
+ >> Exp_shift1) - Bias;
+ word0(rv) &= ~Exp_mask;
+ word0(rv) |= Bias << Exp_shift1;
+ dval(rv) *= bigtens[n_bigtens-1];
+ e1 -= 1 << n_bigtens-1;
+ }
+ e2 += ((word0(rv) & Exp_mask) >> Exp_shift1) - Bias;
+ word0(rv) &= ~Exp_mask;
+ word0(rv) |= Bias << Exp_shift1;
+ for(j = 0; e1 > 0; j++, e1 >>= 1)
+ if (e1 & 1)
+ dval(rv) *= bigtens[j];
+ }
+ }
+ else if (e1 < 0) {
+ e1 = -e1;
+ if ( (i = e1 & 15) !=0)
+ dval(rv) /= tens[i];
+ if (e1 &= ~15) {
+ e1 >>= 4;
+ while(e1 >= (1 << n_bigtens-1)) {
+ e2 += ((word0(rv) & Exp_mask)
+ >> Exp_shift1) - Bias;
+ word0(rv) &= ~Exp_mask;
+ word0(rv) |= Bias << Exp_shift1;
+ dval(rv) *= tinytens[n_bigtens-1];
+ e1 -= 1 << n_bigtens-1;
+ }
+ e2 += ((word0(rv) & Exp_mask) >> Exp_shift1) - Bias;
+ word0(rv) &= ~Exp_mask;
+ word0(rv) |= Bias << Exp_shift1;
+ for(j = 0; e1 > 0; j++, e1 >>= 1)
+ if (e1 & 1)
+ dval(rv) *= tinytens[j];
+ }
+ }
+#ifdef IBM
+ /* e2 is a correction to the (base 2) exponent of the return
+ * value, reflecting adjustments above to avoid overflow in the
+ * native arithmetic. For native IBM (base 16) arithmetic, we
+ * must multiply e2 by 4 to change from base 16 to 2.
+ */
+ e2 <<= 2;
+#endif
+ rvb = d2b(p, dval(rv), &rve, &rvbits); /* rv = rvb * 2^rve */
+ rve += e2;
+ if ((j = rvbits - nbits) > 0) {
+ rshift(rvb, j);
+ rvbits = nbits;
+ rve += j;
+ }
+ bb0 = 0; /* trailing zero bits in rvb */
+ e2 = rve + rvbits - nbits;
+ if (e2 > fpi->emax + 1)
+ goto huge;
+ rve1 = rve + rvbits - nbits;
+ if (e2 < (emin = fpi->emin)) {
+ denorm = 1;
+ j = rve - emin;
+ if (j > 0) {
+ rvb = lshift(p, rvb, j);
+ rvbits += j;
+ }
+ else if (j < 0) {
+ rvbits += j;
+ if (rvbits <= 0) {
+ if (rvbits < -1) {
+ ufl:
+ rvb->_wds = 0;
+ rvb->_x[0] = 0;
+ *exp = emin;
+ irv = STRTOG_Underflow | STRTOG_Inexlo;
+ goto ret;
+ }
+ rvb->_x[0] = rvb->_wds = rvbits = 1;
+ }
+ else
+ rshift(rvb, -j);
+ }
+ rve = rve1 = emin;
+ if (sudden_underflow && e2 + 1 < emin)
+ goto ufl;
+ }
+
+ /* Now the hard part -- adjusting rv to the correct value.*/
+
+ /* Put digits into bd: true value = bd * 10^e */
+
+ bd0 = s2b(p, s0, nd0, nd, y);
+
+ for(;;) {
+ bd = Balloc(p,bd0->_k);
+ Bcopy(bd, bd0);
+ bb = Balloc(p,rvb->_k);
+ Bcopy(bb, rvb);
+ bbbits = rvbits - bb0;
+ bbe = rve + bb0;
+ bs = i2b(p, 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;
+ j = nbits + 1 - bbbits;
+ i = bbe + bbbits - nbits;
+ if (i < emin) /* denormal */
+ j += i - emin;
+ bb2 += j;
+ bd2 += j;
+ i = bb2 < bd2 ? bb2 : bd2;
+ if (i > bs2)
+ i = bs2;
+ if (i > 0) {
+ bb2 -= i;
+ bd2 -= i;
+ bs2 -= i;
+ }
+ if (bb5 > 0) {
+ bs = pow5mult(p, bs, bb5);
+ bb1 = mult(p, bs, bb);
+ Bfree(p,bb);
+ bb = bb1;
+ }
+ bb2 -= bb0;
+ if (bb2 > 0)
+ bb = lshift(p, bb, bb2);
+ else if (bb2 < 0)
+ rshift(bb, -bb2);
+ if (bd5 > 0)
+ bd = pow5mult(p, bd, bd5);
+ if (bd2 > 0)
+ bd = lshift(p, bd, bd2);
+ if (bs2 > 0)
+ bs = lshift(p, bs, bs2);
+ asub = 1;
+ inex = STRTOG_Inexhi;
+ delta = diff(p, bb, bd);
+ if (delta->_wds <= 1 && !delta->_x[0])
+ break;
+ dsign = delta->_sign;
+ delta->_sign = finished = 0;
+ L = 0;
+ i = cmp(delta, bs);
+ if (rd && i <= 0) {
+ irv = STRTOG_Normal;
+ if ( (finished = dsign ^ (rd&1)) !=0) {
+ if (dsign != 0) {
+ irv |= STRTOG_Inexhi;
+ goto adj1;
+ }
+ irv |= STRTOG_Inexlo;
+ if (rve1 == emin)
+ goto adj1;
+ for(i = 0, j = nbits; j >= ULbits;
+ i++, j -= ULbits) {
+ if (rvb->_x[i] & ALL_ON)
+ goto adj1;
+ }
+ if (j > 1 && lo0bits(rvb->_x + i) < j - 1)
+ goto adj1;
+ rve = rve1 - 1;
+ rvb = set_ones(p, rvb, rvbits = nbits);
+ break;
+ }
+ irv |= dsign ? STRTOG_Inexlo : STRTOG_Inexhi;
+ break;
+ }
+ if (i < 0) {
+ /* Error is less than half an ulp -- check for
+ * special case of mantissa a power of two.
+ */
+ irv = dsign
+ ? STRTOG_Normal | STRTOG_Inexlo
+ : STRTOG_Normal | STRTOG_Inexhi;
+ if (dsign || bbbits > 1 || denorm || rve1 == emin)
+ break;
+ delta = lshift(p, delta,1);
+ if (cmp(delta, bs) > 0) {
+ irv = STRTOG_Normal | STRTOG_Inexlo;
+ goto drop_down;
+ }
+ break;
+ }
+ if (i == 0) {
+ /* exactly half-way between */
+ if (dsign) {
+ if (denorm && all_on(rvb, rvbits)) {
+ /*boundary case -- increment exponent*/
+ rvb->_wds = 1;
+ rvb->_x[0] = 1;
+ rve = emin + nbits - (rvbits = 1);
+ irv = STRTOG_Normal | STRTOG_Inexhi;
+ denorm = 0;
+ break;
+ }
+ irv = STRTOG_Normal | STRTOG_Inexlo;
+ }
+ else if (bbbits == 1) {
+ irv = STRTOG_Normal;
+ drop_down:
+ /* boundary case -- decrement exponent */
+ if (rve1 == emin) {
+ irv = STRTOG_Normal | STRTOG_Inexhi;
+ if (rvb->_wds == 1 && rvb->_x[0] == 1)
+ sudden_underflow = 1;
+ break;
+ }
+ rve -= nbits;
+ rvb = set_ones(p, rvb, rvbits = nbits);
+ break;
+ }
+ else
+ irv = STRTOG_Normal | STRTOG_Inexhi;
+ if (bbbits < nbits && !denorm || !(rvb->_x[0] & 1))
+ break;
+ if (dsign) {
+ rvb = increment(p, rvb);
+ j = kmask & (ULbits - (rvbits & kmask));
+ if (hi0bits(rvb->_x[rvb->_wds - 1]) != j)
+ rvbits++;
+ irv = STRTOG_Normal | STRTOG_Inexhi;
+ }
+ else {
+ if (bbbits == 1)
+ goto undfl;
+ decrement(rvb);
+ irv = STRTOG_Normal | STRTOG_Inexlo;
+ }
+ break;
+ }
+ if ((dval(adj) = ratio(delta, bs)) <= 2.) {
+ adj1:
+ inex = STRTOG_Inexlo;
+ if (dsign) {
+ asub = 0;
+ inex = STRTOG_Inexhi;
+ }
+ else if (denorm && bbbits <= 1) {
+ undfl:
+ rvb->_wds = 0;
+ rve = emin;
+ irv = STRTOG_Underflow | STRTOG_Inexlo;
+ break;
+ }
+ adj0 = dval(adj) = 1.;
+ }
+ else {
+ adj0 = dval(adj) *= 0.5;
+ if (dsign) {
+ asub = 0;
+ inex = STRTOG_Inexlo;
+ }
+ if (dval(adj) < 2147483647.) {
+ L = adj0;
+ adj0 -= L;
+ switch(rd) {
+ case 0:
+ if (adj0 >= .5)
+ goto inc_L;
+ break;
+ case 1:
+ if (asub && adj0 > 0.)
+ goto inc_L;
+ break;
+ case 2:
+ if (!asub && adj0 > 0.) {
+ inc_L:
+ L++;
+ inex = STRTOG_Inexact - inex;
+ }
+ }
+ dval(adj) = L;
+ }
+ }
+ y = rve + rvbits;
+
+ /* adj *= ulp(dval(rv)); */
+ /* if (asub) rv -= adj; else rv += adj; */
+
+ if (!denorm && rvbits < nbits) {
+ rvb = lshift(p, rvb, j = nbits - rvbits);
+ rve -= j;
+ rvbits = nbits;
+ }
+ ab = d2b(p, dval(adj), &abe, &abits);
+ if (abe < 0)
+ rshift(ab, -abe);
+ else if (abe > 0)
+ ab = lshift(p, ab, abe);
+ rvb0 = rvb;
+ if (asub) {
+ /* rv -= adj; */
+ j = hi0bits(rvb->_x[rvb->_wds-1]);
+ rvb = diff(p, rvb, ab);
+ k = rvb0->_wds - 1;
+ if (denorm)
+ /* do nothing */;
+ else if (rvb->_wds <= k
+ || hi0bits( rvb->_x[k]) >
+ hi0bits(rvb0->_x[k])) {
+ /* unlikely; can only have lost 1 high bit */
+ if (rve1 == emin) {
+ --rvbits;
+ denorm = 1;
+ }
+ else {
+ rvb = lshift(p, rvb, 1);
+ --rve;
+ --rve1;
+ L = finished = 0;
+ }
+ }
+ }
+ else {
+ rvb = sum(p, rvb, ab);
+ k = rvb->_wds - 1;
+ if (k >= rvb0->_wds
+ || hi0bits(rvb->_x[k]) < hi0bits(rvb0->_x[k])) {
+ if (denorm) {
+ if (++rvbits == nbits)
+ denorm = 0;
+ }
+ else {
+ rshift(rvb, 1);
+ rve++;
+ rve1++;
+ L = 0;
+ }
+ }
+ }
+ Bfree(p,ab);
+ Bfree(p,rvb0);
+ if (finished)
+ break;
+
+ z = rve + rvbits;
+ if (y == z && L) {
+ /* Can we stop now? */
+ tol = dval(adj) * 5e-16; /* > max rel error */
+ dval(adj) = adj0 - .5;
+ if (dval(adj) < -tol) {
+ if (adj0 > tol) {
+ irv |= inex;
+ break;
+ }
+ }
+ else if (dval(adj) > tol && adj0 < 1. - tol) {
+ irv |= inex;
+ break;
+ }
+ }
+ bb0 = denorm ? 0 : trailz(rvb);
+ Bfree(p,bb);
+ Bfree(p,bd);
+ Bfree(p,bs);
+ Bfree(p,delta);
+ }
+ if (!denorm && (j = nbits - rvbits)) {
+ if (j > 0)
+ rvb = lshift(p, rvb, j);
+ else
+ rshift(rvb, -j);
+ rve -= j;
+ }
+ *exp = rve;
+ Bfree(p,bb);
+ Bfree(p,bd);
+ Bfree(p,bs);
+ Bfree(p,bd0);
+ Bfree(p,delta);
+ if (rve > fpi->emax) {
+ huge:
+ rvb->_wds = 0;
+ irv = STRTOG_Infinite | STRTOG_Overflow | STRTOG_Inexhi;
+#ifndef NO_ERRNO
+ errno = ERANGE;
+#endif
+ infnanexp:
+ *exp = fpi->emax + 1;
+ }
+ ret:
+ if (denorm) {
+ if (sudden_underflow) {
+ rvb->_wds = 0;
+ irv = STRTOG_Underflow | STRTOG_Inexlo;
+ }
+ else {
+ irv = (irv & ~STRTOG_Retmask) |
+ (rvb->_wds > 0 ? STRTOG_Denormal : STRTOG_Zero);
+ if (irv & STRTOG_Inexact)
+ irv |= STRTOG_Underflow;
+ }
+ }
+ if (se)
+ *se = (char *)s;
+ if (sign)
+ irv |= STRTOG_Neg;
+ if (rvb) {
+ copybits(bits, nbits, rvb);
+ Bfree(p,rvb);
+ }
+ return irv;
+ }
+
+#endif /* _HAVE_LONG_DOUBLE && !_LDBL_EQ_DBL */
diff --git a/newlib/libc/stdlib/strtol.c b/newlib/libc/stdlib/strtol.c
index 4fcce958f..7273c7d4b 100644
--- a/newlib/libc/stdlib/strtol.c
+++ b/newlib/libc/stdlib/strtol.c
@@ -9,10 +9,10 @@ INDEX
ANSI_SYNOPSIS
#include <stdlib.h>
- long strtol(const char *<[s]>, char **<[ptr]>,int <[base]>);
+ long strtol(const char *restrict <[s]>, char **restrict <[ptr]>,int <[base]>);
long _strtol_r(void *<[reent]>,
- const char *<[s]>, char **<[ptr]>,int <[base]>);
+ const char *restrict <[s]>, char **restrict <[ptr]>,int <[base]>);
TRAD_SYNOPSIS
#include <stdlib.h>
@@ -133,8 +133,8 @@ No supporting OS subroutines are required.
long
_DEFUN (_strtol_r, (rptr, nptr, endptr, base),
struct _reent *rptr _AND
- _CONST char *nptr _AND
- char **endptr _AND
+ _CONST char *__restrict nptr _AND
+ char **__restrict endptr _AND
int base)
{
register const unsigned char *s = (const unsigned char *)nptr;
@@ -216,8 +216,8 @@ _DEFUN (_strtol_r, (rptr, nptr, endptr, base),
long
_DEFUN (strtol, (s, ptr, base),
- _CONST char *s _AND
- char **ptr _AND
+ _CONST char *__restrict s _AND
+ char **__restrict ptr _AND
int base)
{
return _strtol_r (_REENT, s, ptr, base);
diff --git a/newlib/libc/stdlib/strtold.c b/newlib/libc/stdlib/strtold.c
index 94f9613d2..1128b747a 100644
--- a/newlib/libc/stdlib/strtold.c
+++ b/newlib/libc/stdlib/strtold.c
@@ -30,13 +30,54 @@ POSSIBILITY OF SUCH DAMAGE.
#include <stdlib.h>
#include "local.h"
+#include "mprec.h"
+#undef FLT_ROUNDS
-/* On platforms where long double is as wide as double. */
+#ifdef _HAVE_LONG_DOUBLE
+
+/* Intel MCU has no x87 floating point unit */
+#if (defined (__x86_64__) || defined (__i386__)) && !defined (__iamcu__)
+static const int map[] = {
+ 1, /* round to nearest */
+ 3, /* round to zero */
+ 2, /* round to negative infinity */
+ 0 /* round to positive infinity */
+};
+
+int
+__flt_rounds(void)
+{
+ int x;
+
+ /* Assume that the x87 and the SSE unit agree on the rounding mode. */
+ __asm("fnstcw %0" : "=m" (x));
+ return (map[(x >> 10) & 0x03]);
+}
+#define FLT_ROUNDS __flt_rounds()
+#else
+#define FLT_ROUNDS 0
+#endif
+
+long double
+_strtold_r (struct _reent *ptr, const char *__restrict s00,
+ char **__restrict se)
+{
#ifdef _LDBL_EQ_DBL
+ /* On platforms where long double is as wide as double. */
+ return _strtod_r (ptr, s00, se);
+#else
+ long double result;
+
+ _strtorx_r (ptr, s00, se, FLT_ROUNDS, &result);
+ return result;
+#endif
+}
+
long double
-strtold (const char *s00, char **se)
+strtold (const char *__restrict s00, char **__restrict se)
{
- return strtod(s00, se);
+ return _strtold_r (_REENT, s00, se);
}
-#endif /* _LDBL_EQ_DBL */
+
+#endif /* _HAVE_LONG_DOUBLE */
diff --git a/newlib/libc/stdlib/strtoll.c b/newlib/libc/stdlib/strtoll.c
index 47558a8fd..3ad8199a0 100644
--- a/newlib/libc/stdlib/strtoll.c
+++ b/newlib/libc/stdlib/strtoll.c
@@ -9,10 +9,10 @@ INDEX
ANSI_SYNOPSIS
#include <stdlib.h>
- long long strtoll(const char *<[s]>, char **<[ptr]>,int <[base]>);
+ long long strtoll(const char *restrict <[s]>, char **restrict <[ptr]>,int <[base]>);
long long _strtoll_r(void *<[reent]>,
- const char *<[s]>, char **<[ptr]>,int <[base]>);
+ const char *restrict <[s]>, char **restrict <[ptr]>,int <[base]>);
TRAD_SYNOPSIS
#include <stdlib.h>
@@ -128,8 +128,8 @@ No supporting OS subroutines are required.
long long
_DEFUN (strtoll, (s, ptr, base),
- _CONST char *s _AND
- char **ptr _AND
+ _CONST char *__restrict s _AND
+ char **__restrict ptr _AND
int base)
{
return _strtoll_r (_REENT, s, ptr, base);
diff --git a/newlib/libc/stdlib/strtoll_r.c b/newlib/libc/stdlib/strtoll_r.c
index e88fbba3c..515464db1 100644
--- a/newlib/libc/stdlib/strtoll_r.c
+++ b/newlib/libc/stdlib/strtoll_r.c
@@ -58,8 +58,8 @@
long long
_DEFUN (_strtoll_r, (rptr, nptr, endptr, base),
struct _reent *rptr _AND
- _CONST char *nptr _AND
- char **endptr _AND
+ _CONST char *__restrict nptr _AND
+ char **__restrict endptr _AND
int base)
{
register const unsigned char *s = (const unsigned char *)nptr;
diff --git a/newlib/libc/stdlib/strtorx.c b/newlib/libc/stdlib/strtorx.c
new file mode 100644
index 000000000..961ecd2f2
--- /dev/null
+++ b/newlib/libc/stdlib/strtorx.c
@@ -0,0 +1,130 @@
+/****************************************************************
+
+The author of this software is David M. Gay.
+
+Copyright (C) 1998, 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 (dmg at acm dot org,
+ * with " at " changed at "@" and " dot " changed to "."). */
+
+#include <_ansi.h>
+#include <errno.h>
+#include <stdlib.h>
+#include <string.h>
+#include "mprec.h"
+#include "gdtoa.h"
+#include "gd_qnan.h"
+
+#if defined (_HAVE_LONG_DOUBLE) && !defined (_LDBL_EQ_DBL)
+
+#undef _0
+#undef _1
+
+/* one or the other of IEEE_MC68k or IEEE_8087 should be #defined */
+
+#ifdef IEEE_MC68k
+#define _0 0
+#define _1 1
+#define _2 2
+#define _3 3
+#define _4 4
+#endif
+#ifdef IEEE_8087
+#define _0 4
+#define _1 3
+#define _2 2
+#define _3 1
+#define _4 0
+#endif
+
+ void
+#ifdef KR_headers
+ULtox(L, bits, exp, k) __UShort *L; __ULong *bits; Long exp; int k;
+#else
+ULtox(__UShort *L, __ULong *bits, Long exp, int k)
+#endif
+{
+ switch(k & STRTOG_Retmask) {
+ case STRTOG_NoNumber:
+ case STRTOG_Zero:
+ L[0] = L[1] = L[2] = L[3] = L[4] = 0;
+ break;
+
+ case STRTOG_Denormal:
+ L[_0] = 0;
+ goto normal_bits;
+
+ case STRTOG_Normal:
+ case STRTOG_NaNbits:
+ L[_0] = exp + 0x3fff + 63;
+ normal_bits:
+ L[_4] = (__UShort)bits[0];
+ L[_3] = (__UShort)(bits[0] >> 16);
+ L[_2] = (__UShort)bits[1];
+ L[_1] = (__UShort)(bits[1] >> 16);
+ break;
+
+ case STRTOG_Infinite:
+ L[_0] = 0x7fff;
+ L[_1] = 0x8000;
+ L[_2] = L[_3] = L[_4] = 0;
+ break;
+
+ case STRTOG_NaN:
+ L[0] = ldus_QNAN0;
+ L[1] = ldus_QNAN1;
+ L[2] = ldus_QNAN2;
+ L[3] = ldus_QNAN3;
+ L[4] = ldus_QNAN4;
+ }
+ if (k & STRTOG_Neg)
+ L[_0] |= 0x8000;
+ }
+
+ int
+#ifdef KR_headers
+_strtorx_r(p, s, sp, rounding, L) struct _reent *p; const char *s; char **sp; int rounding; void *L;
+#else
+_strtorx_r(struct _reent *p, const char *s, char **sp, int rounding, void *L)
+#endif
+{
+ static FPI fpi0 = { 64, 1-16383-64+1, 32766 - 16383 - 64 + 1, 1, SI };
+ FPI *fpi, fpi1;
+ __ULong bits[2];
+ Long exp;
+ int k;
+
+ fpi = &fpi0;
+ if (rounding != FPI_Round_near) {
+ fpi1 = fpi0;
+ fpi1.rounding = rounding;
+ fpi = &fpi1;
+ }
+ k = _strtodg_r(p, s, sp, fpi, &exp, bits);
+ ULtox((__UShort*)L, bits, exp, k);
+ return k;
+ }
+
+#endif /* _HAVE_LONG_DOUBLE && !_LDBL_EQ_DBL */
diff --git a/newlib/libc/stdlib/strtoul.c b/newlib/libc/stdlib/strtoul.c
index 7fa3a82cf..12c6834dc 100644
--- a/newlib/libc/stdlib/strtoul.c
+++ b/newlib/libc/stdlib/strtoul.c
@@ -9,11 +9,11 @@ INDEX
ANSI_SYNOPSIS
#include <stdlib.h>
- unsigned long strtoul(const char *<[s]>, char **<[ptr]>,
+ unsigned long strtoul(const char *restrict <[s]>, char **restrict <[ptr]>,
int <[base]>);
- unsigned long _strtoul_r(void *<[reent]>, const char *<[s]>,
- char **<[ptr]>, int <[base]>);
+ unsigned long _strtoul_r(void *<[reent]>, const char *restrict <[s]>,
+ char **restrict <[ptr]>, int <[base]>);
TRAD_SYNOPSIS
#include <stdlib.h>
@@ -134,8 +134,8 @@ PORTABILITY
unsigned long
_DEFUN (_strtoul_r, (rptr, nptr, endptr, base),
struct _reent *rptr _AND
- _CONST char *nptr _AND
- char **endptr _AND
+ _CONST char *__restrict nptr _AND
+ char **__restrict endptr _AND
int base)
{
register const unsigned char *s = (const unsigned char *)nptr;
@@ -196,8 +196,8 @@ _DEFUN (_strtoul_r, (rptr, nptr, endptr, base),
unsigned long
_DEFUN (strtoul, (s, ptr, base),
- _CONST char *s _AND
- char **ptr _AND
+ _CONST char *__restrict s _AND
+ char **__restrict ptr _AND
int base)
{
return _strtoul_r (_REENT, s, ptr, base);
diff --git a/newlib/libc/stdlib/strtoull.c b/newlib/libc/stdlib/strtoull.c
index ec168b7f9..13a54dbb4 100644
--- a/newlib/libc/stdlib/strtoull.c
+++ b/newlib/libc/stdlib/strtoull.c
@@ -9,11 +9,11 @@ INDEX
ANSI_SYNOPSIS
#include <stdlib.h>
- unsigned long long strtoull(const char *<[s]>, char **<[ptr]>,
+ unsigned long long strtoull(const char *restrict <[s]>, char **restrict <[ptr]>,
int <[base]>);
- unsigned long long _strtoull_r(void *<[reent]>, const char *<[s]>,
- char **<[ptr]>, int <[base]>);
+ unsigned long long _strtoull_r(void *<[reent]>, const char *restrict <[s]>,
+ char **restrict <[ptr]>, int <[base]>);
TRAD_SYNOPSIS
#include <stdlib.h>
@@ -129,8 +129,8 @@ PORTABILITY
unsigned long long
_DEFUN (strtoull, (s, ptr, base),
- _CONST char *s _AND
- char **ptr _AND
+ _CONST char *__restrict s _AND
+ char **__restrict ptr _AND
int base)
{
return _strtoull_r (_REENT, s, ptr, base);
diff --git a/newlib/libc/stdlib/strtoull_r.c b/newlib/libc/stdlib/strtoull_r.c
index da7f7f51a..d0868adf2 100644
--- a/newlib/libc/stdlib/strtoull_r.c
+++ b/newlib/libc/stdlib/strtoull_r.c
@@ -59,8 +59,8 @@
unsigned long long
_DEFUN (_strtoull_r, (rptr, nptr, endptr, base),
struct _reent *rptr _AND
- _CONST char *nptr _AND
- char **endptr _AND
+ _CONST char *__restrict nptr _AND
+ char **__restrict endptr _AND
int base)
{
register const unsigned char *s = (const unsigned char *)nptr;
diff --git a/newlib/libc/stdlib/utoa.c b/newlib/libc/stdlib/utoa.c
new file mode 100644
index 000000000..7738c2321
--- /dev/null
+++ b/newlib/libc/stdlib/utoa.c
@@ -0,0 +1,76 @@
+/*
+FUNCTION
+<<utoa>>---unsigned integer to string
+
+INDEX
+ utoa
+
+ANSI_SYNOPSIS
+ #include <stdlib.h>
+ char *utoa(unsigned <[value]>, char *<[str]>, int <[base]>);
+ char *__utoa(unsigned <[value]>, char *<[str]>, int <[base]>);
+
+DESCRIPTION
+<<utoa>> converts the unsigned integer [<value>] to a null-terminated string
+using the specified base, which must be between 2 and 36, inclusive.
+<[str]> should be an array long enough to contain the converted
+value, which in the worst case is sizeof(int)*8+1 bytes.
+
+RETURNS
+A pointer to the string, <[str]>, or NULL if <[base]> is invalid.
+
+PORTABILITY
+<<utoa>> is non-ANSI.
+
+No supporting OS subroutine calls are required.
+*/
+
+#include <stdlib.h>
+
+char *
+_DEFUN (__utoa, (value, str, base),
+ unsigned value _AND
+ char *str _AND
+ int base)
+{
+ const char digits[] = "0123456789abcdefghijklmnopqrstuvwxyz";
+ int i, j;
+ unsigned remainder;
+ char c;
+
+ /* Check base is supported. */
+ if ((base < 2) || (base > 36))
+ {
+ str[0] = '\0';
+ return NULL;
+ }
+
+ /* Convert to string. Digits are in reverse order. */
+ i = 0;
+ do
+ {
+ remainder = value % base;
+ str[i++] = digits[remainder];
+ value = value / base;
+ } while (value != 0);
+ str[i] = '\0';
+
+ /* Reverse string. */
+ for (j = 0, i--; j < i; j++, i--)
+ {
+ c = str[j];
+ str[j] = str[i];
+ str[i] = c;
+ }
+
+ return str;
+}
+
+char *
+_DEFUN (utoa, (value, str, base),
+ unsigned value _AND
+ char *str _AND
+ int base)
+{
+ return __utoa (value, str, base);
+}
diff --git a/newlib/libc/stdlib/wcrtomb.c b/newlib/libc/stdlib/wcrtomb.c
index b634c23ce..4f3006814 100644
--- a/newlib/libc/stdlib/wcrtomb.c
+++ b/newlib/libc/stdlib/wcrtomb.c
@@ -42,9 +42,9 @@ _DEFUN (_wcrtomb_r, (ptr, s, wc, ps),
#ifndef _REENT_ONLY
size_t
_DEFUN (wcrtomb, (s, wc, ps),
- char *s _AND
+ char *__restrict s _AND
wchar_t wc _AND
- mbstate_t *ps)
+ mbstate_t *__restrict ps)
{
#if defined(PREFER_SIZE_OVER_SPEED) || defined(__OPTIMIZE_SIZE__)
return _wcrtomb_r (_REENT, s, wc, ps);
diff --git a/newlib/libc/stdlib/wcsnrtombs.c b/newlib/libc/stdlib/wcsnrtombs.c
index 5f885a454..99c8bd175 100644
--- a/newlib/libc/stdlib/wcsnrtombs.c
+++ b/newlib/libc/stdlib/wcsnrtombs.c
@@ -13,8 +13,9 @@ INDEX
ANSI_SYNOPSIS
#include <wchar.h>
- size_t wcsrtombs(char *<[dst]>, const wchar_t **<[src]>, size_t <[len]>,
- mbstate_t *<[ps]>);
+ size_t wcsrtombs(char *__restrict <[dst]>,
+ const wchar_t **__restrict <[src]>, size_t <[len]>,
+ mbstate_t *__restrict <[ps]>);
#include <wchar.h>
size_t _wcsrtombs_r(struct _reent *<[ptr]>, char *<[dst]>,
@@ -22,8 +23,10 @@ ANSI_SYNOPSIS
mbstate_t *<[ps]>);
#include <wchar.h>
- size_t wcsnrtombs(char *<[dst]>, const wchar_t **<[src]>,
- size_t <[nwc]>, size_t <[len]>, mbstate_t *<[ps]>);
+ size_t wcsnrtombs(char *__restrict <[dst]>,
+ const wchar_t **__restrict <[src]>,
+ size_t <[nwc]>, size_t <[len]>,
+ mbstate_t *__restrict <[ps]>);
#include <wchar.h>
size_t _wcsnrtombs_r(struct _reent *<[ptr]>, char *<[dst]>,
@@ -33,10 +36,10 @@ ANSI_SYNOPSIS
TRAD_SYNOPSIS
#include <wchar.h>
size_t wcsrtombs(<[dst]>, <[src]>, <[len]>, <[ps]>)
- char *<[dst]>;
- const wchar_t **<[src]>;
+ char *__restrict <[dst]>;
+ const wchar_t **__restrict <[src]>;
size_t <[len]>;
- mbstate_t *<[ps]>;
+ mbstate_t *__restrict <[ps]>;
#include <wchar.h>
size_t _wcsrtombs_r(<[ptr]>, <[dst]>, <[src]>, <[len]>, <[ps]>)
@@ -48,11 +51,11 @@ TRAD_SYNOPSIS
#include <wchar.h>
size_t wcsnrtombs(<[dst]>, <[src]>, <[nwc]>, <[len]>, <[ps]>)
- char *<[dst]>;
- const wchar_t **<[src]>;
+ char *__restrict <[dst]>;
+ const wchar_t **__restrict <[src]>;
size_t <[nwc]>;
size_t <[len]>;
- mbstate_t *<[ps]>;
+ mbstate_t *__restrict <[ps]>;
#include <wchar.h>
size_t _wcsnrtombs_r(<[ptr]>, <[dst]>, <[src]>, <[nwc]>, <[len]>, <[ps]>)
@@ -66,12 +69,12 @@ TRAD_SYNOPSIS
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}>.
+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 NULL, no characters are stored.
-If <[dst}> is not NULL, the pointer pointed to by <[src]> is updated to point
+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.
@@ -174,11 +177,11 @@ _DEFUN (_wcsnrtombs_r, (r, dst, src, nwc, len, ps),
#ifndef _REENT_ONLY
size_t
_DEFUN (wcsnrtombs, (dst, src, nwc, len, ps),
- char *dst _AND
- const wchar_t **src _AND
+ char *__restrict dst _AND
+ const wchar_t **__restrict src _AND
size_t nwc _AND
size_t len _AND
- mbstate_t *ps)
+ mbstate_t *__restrict ps)
{
return _wcsnrtombs_r (_REENT, dst, src, nwc, len, ps);
}
diff --git a/newlib/libc/stdlib/wcsrtombs.c b/newlib/libc/stdlib/wcsrtombs.c
index ea6bd9d43..2b6777cae 100644
--- a/newlib/libc/stdlib/wcsrtombs.c
+++ b/newlib/libc/stdlib/wcsrtombs.c
@@ -1,3 +1,5 @@
+/* Doc in wcsnrtombs.c */
+
#include <reent.h>
#include <newlib.h>
#include <wchar.h>
@@ -16,10 +18,10 @@ _DEFUN (_wcsrtombs_r, (r, dst, src, len, ps),
#ifndef _REENT_ONLY
size_t
_DEFUN (wcsrtombs, (dst, src, len, ps),
- char *dst _AND
- const wchar_t **src _AND
+ char *__restrict dst _AND
+ const wchar_t **__restrict src _AND
size_t len _AND
- mbstate_t *ps)
+ mbstate_t *__restrict ps)
{
return _wcsnrtombs_r (_REENT, dst, src, (size_t) -1, len, ps);
}
diff --git a/newlib/libc/stdlib/wcstod.c b/newlib/libc/stdlib/wcstod.c
index d80454c8f..c91ecf2fe 100644
--- a/newlib/libc/stdlib/wcstod.c
+++ b/newlib/libc/stdlib/wcstod.c
@@ -13,8 +13,10 @@ INDEX
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(const wchar_t *__restrict <[str]>,
+ wchar_t **__restrict <[tail]>);
+ float wcstof(const wchar_t *__restrict <[str]>,
+ wchar_t **__restrict <[tail]>);
double _wcstod_r(void *<[reent]>,
const wchar_t *<[str]>, wchar_t **<[tail]>);
@@ -24,12 +26,12 @@ ANSI_SYNOPSIS
TRAD_SYNOPSIS
#include <stdlib.h>
double wcstod(<[str]>,<[tail]>)
- wchar_t *<[str]>;
- wchar_t **<[tail]>;
+ wchar_t *__restrict <[str]>;
+ wchar_t **__restrict <[tail]>;
float wcstof(<[str]>,<[tail]>)
- wchar_t *<[str]>;
- wchar_t **<[tail]>;
+ wchar_t *__restrict <[str]>;
+ wchar_t **__restrict <[tail]>;
double _wcstod_r(<[reent]>,<[str]>,<[tail]>)
wchar_t *<[reent]>;
@@ -211,15 +213,15 @@ _DEFUN (_wcstof_r, (ptr, nptr, endptr),
double
_DEFUN (wcstod, (nptr, endptr),
- _CONST wchar_t *nptr _AND wchar_t **endptr)
+ _CONST wchar_t *__restrict nptr _AND wchar_t **__restrict endptr)
{
return _wcstod_r (_REENT, nptr, endptr);
}
float
_DEFUN (wcstof, (nptr, endptr),
- _CONST wchar_t *nptr _AND
- wchar_t **endptr)
+ _CONST wchar_t *__restrict nptr _AND
+ wchar_t **__restrict endptr)
{
double retval = _wcstod_r (_REENT, nptr, endptr);
if (isnan (retval))
diff --git a/newlib/libc/stdlib/wcstol.c b/newlib/libc/stdlib/wcstol.c
index e23254dc2..adda9c296 100644
--- a/newlib/libc/stdlib/wcstol.c
+++ b/newlib/libc/stdlib/wcstol.c
@@ -9,7 +9,8 @@ INDEX
ANSI_SYNOPSIS
#include <wchar.h>
- long wcstol(const wchar_t *<[s]>, wchar_t **<[ptr]>,int <[base]>);
+ long wcstol(const wchar_t *__restrict <[s]>,
+ wchar_t **__restrict <[ptr]>,int <[base]>);
long _wcstol_r(void *<[reent]>,
const wchar_t *<[s]>, wchar_t **<[ptr]>,int <[base]>);
@@ -17,8 +18,8 @@ ANSI_SYNOPSIS
TRAD_SYNOPSIS
#include <stdlib.h>
long wcstol (<[s]>, <[ptr]>, <[base]>)
- wchar_t *<[s]>;
- wchar_t **<[ptr]>;
+ wchar_t *__restrict <[s]>;
+ wchar_t **__restrict <[ptr]>;
int <[base]>;
long _wcstol_r (<[reent]>, <[s]>, <[ptr]>, <[base]>)
@@ -216,8 +217,8 @@ _DEFUN (_wcstol_r, (rptr, nptr, endptr, base),
long
_DEFUN (wcstol, (s, ptr, base),
- _CONST wchar_t *s _AND
- wchar_t **ptr _AND
+ _CONST wchar_t *__restrict s _AND
+ wchar_t **__restrict ptr _AND
int base)
{
return _wcstol_r (_REENT, s, ptr, base);
diff --git a/newlib/libc/stdlib/wcstold.c b/newlib/libc/stdlib/wcstold.c
index 8b0ba2440..e94aca919 100644
--- a/newlib/libc/stdlib/wcstold.c
+++ b/newlib/libc/stdlib/wcstold.c
@@ -29,14 +29,80 @@ POSSIBILITY OF SUCH DAMAGE.
*/
#include <stdlib.h>
+#include <string.h>
+#include <wchar.h>
+#include <wctype.h>
+#include <locale.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)
+wcstold (const wchar_t *__restrict nptr, wchar_t **__restrict endptr)
{
+#ifdef _LDBL_EQ_DBL
+/* On platforms where long double is as wide as double. */
return wcstod(nptr, endptr);
-}
-#endif /* _LDBL_EQ_DBL */
+#else /* This is a duplicate of the code in wcstod.c, but converted to long double. */
+
+ static const mbstate_t initial;
+ mbstate_t mbs;
+ long 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. */
+ wcp = nptr;
+ mbs = initial;
+ if ((len = wcsrtombs (NULL, &wcp, 0, &mbs)) == (size_t)-1)
+ {
+ if (endptr != NULL)
+ *endptr = (wchar_t *) nptr;
+ return 0.0L;
+ }
+
+ if ((buf = malloc (len + 1)) == NULL)
+ return 0.0L;
+
+ mbs = initial;
+ wcsrtombs (buf, &wcp, len + 1, &mbs);
+
+ val = strtold (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
+ strtold/wcstold 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 ()->decimal_point);
+ if (len > 1)
+ {
+ char *d = strstr (buf, localeconv ()->decimal_point);
+
+ if (d && d < end)
+ end -= len - 1;
+ }
+
+ *endptr = (wchar_t *) nptr + (end - buf);
+ }
+
+ free (buf);
+
+ return val;
+#endif /* _LDBL_EQ_DBL */
+}
diff --git a/newlib/libc/stdlib/wcstoll.c b/newlib/libc/stdlib/wcstoll.c
index 75eda9f6c..2c36d6d00 100644
--- a/newlib/libc/stdlib/wcstoll.c
+++ b/newlib/libc/stdlib/wcstoll.c
@@ -9,7 +9,8 @@ INDEX
ANSI_SYNOPSIS
#include <wchar.h>
- long long wcstoll(const wchar_t *<[s]>, wchar_t **<[ptr]>,int <[base]>);
+ long long wcstoll(const wchar_t *__restrict <[s]>,
+ wchar_t **__restrict <[ptr]>,int <[base]>);
long long _wcstoll_r(void *<[reent]>,
const wchar_t *<[s]>, wchar_t **<[ptr]>,int <[base]>);
@@ -17,8 +18,8 @@ ANSI_SYNOPSIS
TRAD_SYNOPSIS
#include <stdlib.h>
long long wcstoll (<[s]>, <[ptr]>, <[base]>)
- const wchar_t *<[s]>;
- wchar_t **<[ptr]>;
+ const wchar_t *__restrict <[s]>;
+ wchar_t **__restrict <[ptr]>;
int <[base]>;
long long _wcstoll_r (<[reent]>, <[s]>, <[ptr]>, <[base]>)
@@ -128,8 +129,8 @@ No supporting OS subroutines are required.
long long
_DEFUN (wcstoll, (s, ptr, base),
- _CONST wchar_t *s _AND
- wchar_t **ptr _AND
+ _CONST wchar_t *__restrict s _AND
+ wchar_t **__restrict ptr _AND
int base)
{
return _wcstoll_r (_REENT, s, ptr, base);
diff --git a/newlib/libc/stdlib/wcstombs.c b/newlib/libc/stdlib/wcstombs.c
index d0ef26e53..b0123a313 100644
--- a/newlib/libc/stdlib/wcstombs.c
+++ b/newlib/libc/stdlib/wcstombs.c
@@ -7,7 +7,7 @@ INDEX
ANSI_SYNOPSIS
#include <stdlib.h>
- size_t wcstombs(char *<[s]>, const wchar_t *<[pwc]>, size_t <[n]>);
+ size_t wcstombs(char *restrict <[s]>, const wchar_t *restrict <[pwc]>, size_t <[n]>);
TRAD_SYNOPSIS
#include <stdlib.h>
@@ -56,8 +56,8 @@ effects vary with the locale.
size_t
_DEFUN (wcstombs, (s, pwcs, n),
- char *s _AND
- const wchar_t *pwcs _AND
+ char *__restrict s _AND
+ const wchar_t *__restrict pwcs _AND
size_t n)
{
#ifdef _MB_CAPABLE
diff --git a/newlib/libc/stdlib/wcstombs_r.c b/newlib/libc/stdlib/wcstombs_r.c
index e74502f46..3bac8a337 100644
--- a/newlib/libc/stdlib/wcstombs_r.c
+++ b/newlib/libc/stdlib/wcstombs_r.c
@@ -5,8 +5,8 @@
size_t
_DEFUN (_wcstombs_r, (reent, s, pwcs, n, state),
struct _reent *r _AND
- char *s _AND
- const wchar_t *pwcs _AND
+ char *__restrict s _AND
+ const wchar_t *__restrict pwcs _AND
size_t n _AND
mbstate_t *state)
{
diff --git a/newlib/libc/stdlib/wcstoul.c b/newlib/libc/stdlib/wcstoul.c
index 44dfca399..4b0a95031 100644
--- a/newlib/libc/stdlib/wcstoul.c
+++ b/newlib/libc/stdlib/wcstoul.c
@@ -9,8 +9,8 @@ INDEX
ANSI_SYNOPSIS
#include <wchar.h>
- unsigned long wcstoul(const wchar_t *<[s]>, wchar_t **<[ptr]>,
- int <[base]>);
+ unsigned long wcstoul(const wchar_t *__restrict <[s]>,
+ wchar_t **__restrict <[ptr]>, int <[base]>);
unsigned long _wcstoul_r(void *<[reent]>, const wchar_t *<[s]>,
wchar_t **<[ptr]>, int <[base]>);
@@ -18,8 +18,8 @@ ANSI_SYNOPSIS
TRAD_SYNOPSIS
#include <wchar.h>
unsigned long wcstoul(<[s]>, <[ptr]>, <[base]>)
- wchar_t *<[s]>;
- wchar_t **<[ptr]>;
+ wchar_t *__restrict <[s]>;
+ wchar_t **__restrict <[ptr]>;
int <[base]>;
unsigned long _wcstoul_r(<[reent]>, <[s]>, <[ptr]>, <[base]>)
@@ -197,8 +197,8 @@ _DEFUN (_wcstoul_r, (rptr, nptr, endptr, base),
unsigned long
_DEFUN (wcstoul, (s, ptr, base),
- _CONST wchar_t *s _AND
- wchar_t **ptr _AND
+ _CONST wchar_t *__restrict s _AND
+ wchar_t **__restrict ptr _AND
int base)
{
return _wcstoul_r (_REENT, s, ptr, base);
diff --git a/newlib/libc/stdlib/wcstoull.c b/newlib/libc/stdlib/wcstoull.c
index 76caadf23..206bb3428 100644
--- a/newlib/libc/stdlib/wcstoull.c
+++ b/newlib/libc/stdlib/wcstoull.c
@@ -9,8 +9,8 @@ INDEX
ANSI_SYNOPSIS
#include <wchar.h>
- unsigned long long wcstoull(const wchar_t *<[s]>, wchar_t **<[ptr]>,
- int <[base]>);
+ unsigned long long wcstoull(const wchar_t *__restrict <[s]>,
+ wchar_t **__restrict <[ptr]>, int <[base]>);
unsigned long long _wcstoull_r(void *<[reent]>, const wchar_t *<[s]>,
wchar_t **<[ptr]>, int <[base]>);
@@ -18,8 +18,8 @@ ANSI_SYNOPSIS
TRAD_SYNOPSIS
#include <wchar.h>
unsigned long long wcstoull(<[s]>, <[ptr]>, <[base]>)
- wchar_t *<[s]>;
- wchar_t **<[ptr]>;
+ wchar_t *__restrict <[s]>;
+ wchar_t **__restrict <[ptr]>;
int <[base]>;
unsigned long long _wcstoull_r(<[reent]>, <[s]>, <[ptr]>, <[base]>)
@@ -130,8 +130,8 @@ PORTABILITY
unsigned long long
_DEFUN (wcstoull, (s, ptr, base),
- _CONST wchar_t *s _AND
- wchar_t **ptr _AND
+ _CONST wchar_t *__restrict s _AND
+ wchar_t **__restrict ptr _AND
int base)
{
return _wcstoull_r (_REENT, s, ptr, base);
diff --git a/newlib/libc/stdlib/wctomb_r.c b/newlib/libc/stdlib/wctomb_r.c
index 13e1e4c36..c93962fa4 100644
--- a/newlib/libc/stdlib/wctomb_r.c
+++ b/newlib/libc/stdlib/wctomb_r.c
@@ -74,7 +74,7 @@ _DEFUN (__utf8_wctomb, (r, s, wchar, charset, state),
return 0; /* UTF-8 encoding is not state-dependent */
if (sizeof (wchar_t) == 2 && state->__count == -4
- && (wchar < 0xdc00 || wchar >= 0xdfff))
+ && (wchar < 0xdc00 || wchar > 0xdfff))
{
/* There's a leftover lone high surrogate. Write out the CESU-8 value
of the surrogate and proceed to convert the given character. Note
diff --git a/newlib/libc/string/Makefile.am b/newlib/libc/string/Makefile.am
index e9adbe169..1c047f532 100644
--- a/newlib/libc/string/Makefile.am
+++ b/newlib/libc/string/Makefile.am
@@ -7,6 +7,7 @@ INCLUDES = $(NEWLIB_CFLAGS) $(CROSS_CFLAGS) $(TARGET_CFLAGS)
GENERAL_SOURCES = \
bcopy.c \
bzero.c \
+ explicit_bzero.c \
index.c \
memchr.c \
memcmp.c \
@@ -45,6 +46,8 @@ GENERAL_SOURCES = \
strxfrm.c \
strstr.c \
swab.c \
+ timingsafe_bcmp.c \
+ timingsafe_memcmp.c \
u_strerr.c \
wcscat.c \
wcschr.c \
@@ -102,6 +105,7 @@ if ELIX_LEVEL_3
ELIX_4_SOURCES =
else
ELIX_4_SOURCES = \
+ gnu_basename.c \
memmem.c \
memrchr.c \
rawmemchr.c \
@@ -142,20 +146,6 @@ wcsncmp.def wcsncpy.def wcsnlen.def wcspbrk.def \
wcsrchr.def wcsspn.def wcsstr.def wcstok.def \
wcswidth.def wcsxfrm.def wcwidth.def wmemchr.def \
wmemcmp.def wmemcpy.def wmemmove.def wmemset.def \
-memmem.def memrchr.def rawmemchr.def
+memmem.def memrchr.def rawmemchr.def strchrnul.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)/strings.tex >> $(TARGETDOC)
- cat $(srcdir)/wcstrings.tex >> $(TARGETDOC)
-
-CLEANFILES = $(CHEWOUT_FILES) *.ref
+CHAPTERS = strings.tex wcstrings.tex
diff --git a/newlib/libc/string/Makefile.in b/newlib/libc/string/Makefile.in
index 255ee0704..4d42c9099 100644
--- a/newlib/libc/string/Makefile.in
+++ b/newlib/libc/string/Makefile.in
@@ -73,39 +73,41 @@ ARFLAGS = cru
lib_a_AR = $(AR) $(ARFLAGS)
lib_a_LIBADD =
am__objects_1 = lib_a-bcopy.$(OBJEXT) lib_a-bzero.$(OBJEXT) \
- lib_a-index.$(OBJEXT) lib_a-memchr.$(OBJEXT) \
- lib_a-memcmp.$(OBJEXT) lib_a-memcpy.$(OBJEXT) \
- lib_a-memmove.$(OBJEXT) lib_a-memset.$(OBJEXT) \
- lib_a-rindex.$(OBJEXT) lib_a-strcasecmp.$(OBJEXT) \
- lib_a-strcat.$(OBJEXT) lib_a-strchr.$(OBJEXT) \
- lib_a-strcmp.$(OBJEXT) lib_a-strcoll.$(OBJEXT) \
- lib_a-strcpy.$(OBJEXT) lib_a-strcspn.$(OBJEXT) \
- lib_a-strdup.$(OBJEXT) lib_a-strdup_r.$(OBJEXT) \
- lib_a-strerror.$(OBJEXT) lib_a-strerror_r.$(OBJEXT) \
- lib_a-strlcat.$(OBJEXT) lib_a-strlcpy.$(OBJEXT) \
- lib_a-strlen.$(OBJEXT) lib_a-strlwr.$(OBJEXT) \
- lib_a-strncasecmp.$(OBJEXT) lib_a-strncat.$(OBJEXT) \
- lib_a-strncmp.$(OBJEXT) lib_a-strncpy.$(OBJEXT) \
- lib_a-strnlen.$(OBJEXT) lib_a-strpbrk.$(OBJEXT) \
- lib_a-strrchr.$(OBJEXT) lib_a-strsep.$(OBJEXT) \
- lib_a-strsignal.$(OBJEXT) lib_a-strspn.$(OBJEXT) \
- lib_a-strtok.$(OBJEXT) lib_a-strtok_r.$(OBJEXT) \
- lib_a-strupr.$(OBJEXT) lib_a-strxfrm.$(OBJEXT) \
- lib_a-strstr.$(OBJEXT) lib_a-swab.$(OBJEXT) \
- lib_a-u_strerr.$(OBJEXT) lib_a-wcscat.$(OBJEXT) \
- lib_a-wcschr.$(OBJEXT) lib_a-wcscmp.$(OBJEXT) \
- lib_a-wcscoll.$(OBJEXT) lib_a-wcscpy.$(OBJEXT) \
- lib_a-wcscspn.$(OBJEXT) lib_a-wcslcat.$(OBJEXT) \
- lib_a-wcslcpy.$(OBJEXT) lib_a-wcslen.$(OBJEXT) \
- lib_a-wcsncat.$(OBJEXT) lib_a-wcsncmp.$(OBJEXT) \
- lib_a-wcsncpy.$(OBJEXT) lib_a-wcsnlen.$(OBJEXT) \
- lib_a-wcspbrk.$(OBJEXT) lib_a-wcsrchr.$(OBJEXT) \
- lib_a-wcsspn.$(OBJEXT) lib_a-wcsstr.$(OBJEXT) \
- lib_a-wcstok.$(OBJEXT) lib_a-wcswidth.$(OBJEXT) \
- lib_a-wcsxfrm.$(OBJEXT) lib_a-wcwidth.$(OBJEXT) \
- lib_a-wmemchr.$(OBJEXT) lib_a-wmemcmp.$(OBJEXT) \
- lib_a-wmemcpy.$(OBJEXT) lib_a-wmemmove.$(OBJEXT) \
- lib_a-wmemset.$(OBJEXT) lib_a-xpg_strerror_r.$(OBJEXT)
+ lib_a-explicit_bzero.$(OBJEXT) lib_a-index.$(OBJEXT) \
+ lib_a-memchr.$(OBJEXT) lib_a-memcmp.$(OBJEXT) \
+ lib_a-memcpy.$(OBJEXT) lib_a-memmove.$(OBJEXT) \
+ lib_a-memset.$(OBJEXT) lib_a-rindex.$(OBJEXT) \
+ lib_a-strcasecmp.$(OBJEXT) lib_a-strcat.$(OBJEXT) \
+ lib_a-strchr.$(OBJEXT) lib_a-strcmp.$(OBJEXT) \
+ lib_a-strcoll.$(OBJEXT) lib_a-strcpy.$(OBJEXT) \
+ lib_a-strcspn.$(OBJEXT) lib_a-strdup.$(OBJEXT) \
+ lib_a-strdup_r.$(OBJEXT) lib_a-strerror.$(OBJEXT) \
+ lib_a-strerror_r.$(OBJEXT) lib_a-strlcat.$(OBJEXT) \
+ lib_a-strlcpy.$(OBJEXT) lib_a-strlen.$(OBJEXT) \
+ lib_a-strlwr.$(OBJEXT) lib_a-strncasecmp.$(OBJEXT) \
+ lib_a-strncat.$(OBJEXT) lib_a-strncmp.$(OBJEXT) \
+ lib_a-strncpy.$(OBJEXT) lib_a-strnlen.$(OBJEXT) \
+ lib_a-strpbrk.$(OBJEXT) lib_a-strrchr.$(OBJEXT) \
+ lib_a-strsep.$(OBJEXT) lib_a-strsignal.$(OBJEXT) \
+ lib_a-strspn.$(OBJEXT) lib_a-strtok.$(OBJEXT) \
+ lib_a-strtok_r.$(OBJEXT) lib_a-strupr.$(OBJEXT) \
+ lib_a-strxfrm.$(OBJEXT) lib_a-strstr.$(OBJEXT) \
+ lib_a-swab.$(OBJEXT) lib_a-timingsafe_bcmp.$(OBJEXT) \
+ lib_a-timingsafe_memcmp.$(OBJEXT) lib_a-u_strerr.$(OBJEXT) \
+ lib_a-wcscat.$(OBJEXT) lib_a-wcschr.$(OBJEXT) \
+ lib_a-wcscmp.$(OBJEXT) lib_a-wcscoll.$(OBJEXT) \
+ lib_a-wcscpy.$(OBJEXT) lib_a-wcscspn.$(OBJEXT) \
+ lib_a-wcslcat.$(OBJEXT) lib_a-wcslcpy.$(OBJEXT) \
+ lib_a-wcslen.$(OBJEXT) lib_a-wcsncat.$(OBJEXT) \
+ lib_a-wcsncmp.$(OBJEXT) lib_a-wcsncpy.$(OBJEXT) \
+ lib_a-wcsnlen.$(OBJEXT) lib_a-wcspbrk.$(OBJEXT) \
+ lib_a-wcsrchr.$(OBJEXT) lib_a-wcsspn.$(OBJEXT) \
+ lib_a-wcsstr.$(OBJEXT) lib_a-wcstok.$(OBJEXT) \
+ lib_a-wcswidth.$(OBJEXT) lib_a-wcsxfrm.$(OBJEXT) \
+ lib_a-wcwidth.$(OBJEXT) lib_a-wmemchr.$(OBJEXT) \
+ lib_a-wmemcmp.$(OBJEXT) lib_a-wmemcpy.$(OBJEXT) \
+ lib_a-wmemmove.$(OBJEXT) lib_a-wmemset.$(OBJEXT) \
+ lib_a-xpg_strerror_r.$(OBJEXT)
@ELIX_LEVEL_1_FALSE@am__objects_2 = lib_a-bcmp.$(OBJEXT) \
@ELIX_LEVEL_1_FALSE@ lib_a-memccpy.$(OBJEXT) \
@ELIX_LEVEL_1_FALSE@ lib_a-mempcpy.$(OBJEXT) \
@@ -118,7 +120,8 @@ am__objects_1 = lib_a-bcopy.$(OBJEXT) lib_a-bzero.$(OBJEXT) \
@ELIX_LEVEL_1_FALSE@ lib_a-wcpcpy.$(OBJEXT) \
@ELIX_LEVEL_1_FALSE@ lib_a-wcpncpy.$(OBJEXT) \
@ELIX_LEVEL_1_FALSE@ lib_a-wcsdup.$(OBJEXT)
-@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@am__objects_3 = lib_a-memmem.$(OBJEXT) \
+@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@am__objects_3 = lib_a-gnu_basename.$(OBJEXT) \
+@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ lib_a-memmem.$(OBJEXT) \
@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ lib_a-memrchr.$(OBJEXT) \
@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ lib_a-rawmemchr.$(OBJEXT) \
@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ lib_a-wcscasecmp.$(OBJEXT) \
@@ -128,14 +131,15 @@ am__objects_1 = lib_a-bcopy.$(OBJEXT) lib_a-bzero.$(OBJEXT) \
lib_a_OBJECTS = $(am_lib_a_OBJECTS)
LTLIBRARIES = $(noinst_LTLIBRARIES)
libstring_la_LIBADD =
-am__objects_4 = bcopy.lo bzero.lo index.lo memchr.lo memcmp.lo \
- memcpy.lo memmove.lo memset.lo rindex.lo strcasecmp.lo \
- strcat.lo strchr.lo strcmp.lo strcoll.lo strcpy.lo strcspn.lo \
- strdup.lo strdup_r.lo strerror.lo strerror_r.lo strlcat.lo \
- strlcpy.lo strlen.lo strlwr.lo strncasecmp.lo strncat.lo \
- strncmp.lo strncpy.lo strnlen.lo strpbrk.lo strrchr.lo \
- strsep.lo strsignal.lo strspn.lo strtok.lo strtok_r.lo \
- strupr.lo strxfrm.lo strstr.lo swab.lo u_strerr.lo wcscat.lo \
+am__objects_4 = bcopy.lo bzero.lo explicit_bzero.lo index.lo memchr.lo \
+ memcmp.lo memcpy.lo memmove.lo memset.lo rindex.lo \
+ strcasecmp.lo strcat.lo strchr.lo strcmp.lo strcoll.lo \
+ strcpy.lo strcspn.lo strdup.lo strdup_r.lo strerror.lo \
+ strerror_r.lo strlcat.lo strlcpy.lo strlen.lo strlwr.lo \
+ strncasecmp.lo strncat.lo strncmp.lo strncpy.lo strnlen.lo \
+ strpbrk.lo strrchr.lo strsep.lo strsignal.lo strspn.lo \
+ strtok.lo strtok_r.lo strupr.lo strxfrm.lo strstr.lo swab.lo \
+ timingsafe_bcmp.lo timingsafe_memcmp.lo u_strerr.lo wcscat.lo \
wcschr.lo wcscmp.lo wcscoll.lo wcscpy.lo wcscspn.lo wcslcat.lo \
wcslcpy.lo wcslen.lo wcsncat.lo wcsncmp.lo wcsncpy.lo \
wcsnlen.lo wcspbrk.lo wcsrchr.lo wcsspn.lo wcsstr.lo wcstok.lo \
@@ -145,7 +149,8 @@ am__objects_4 = bcopy.lo bzero.lo index.lo memchr.lo memcmp.lo \
@ELIX_LEVEL_1_FALSE@ stpcpy.lo stpncpy.lo strndup.lo \
@ELIX_LEVEL_1_FALSE@ strcasestr.lo strchrnul.lo strndup_r.lo \
@ELIX_LEVEL_1_FALSE@ wcpcpy.lo wcpncpy.lo wcsdup.lo
-@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@am__objects_6 = memmem.lo \
+@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@am__objects_6 = gnu_basename.lo \
+@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ memmem.lo \
@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ memrchr.lo \
@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ rawmemchr.lo \
@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ wcscasecmp.lo \
@@ -327,6 +332,7 @@ INCLUDES = $(NEWLIB_CFLAGS) $(CROSS_CFLAGS) $(TARGET_CFLAGS)
GENERAL_SOURCES = \
bcopy.c \
bzero.c \
+ explicit_bzero.c \
index.c \
memchr.c \
memcmp.c \
@@ -365,6 +371,8 @@ GENERAL_SOURCES = \
strxfrm.c \
strstr.c \
swab.c \
+ timingsafe_bcmp.c \
+ timingsafe_memcmp.c \
u_strerr.c \
wcscat.c \
wcschr.c \
@@ -410,6 +418,7 @@ GENERAL_SOURCES = \
@ELIX_LEVEL_1_TRUE@ELIX_2_SOURCES =
@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ELIX_4_SOURCES = \
+@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ gnu_basename.c \
@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ memmem.c \
@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ memrchr.c \
@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ rawmemchr.c \
@@ -427,6 +436,13 @@ libstring_la_LDFLAGS = -Xcompiler -nostdlib
@USE_LIBTOOL_FALSE@noinst_LIBRARIES = lib.a
@USE_LIBTOOL_FALSE@lib_a_SOURCES = $(GENERAL_SOURCES) $(ELIX_2_SOURCES) $(ELIX_4_SOURCES)
@USE_LIBTOOL_FALSE@lib_a_CFLAGS = $(AM_CFLAGS)
+
+#
+# documentation rules
+#
+SUFFIXES = .def
+CHEW = ${top_builddir}/../doc/makedoc -f $(top_srcdir)/../doc/doc.str
+CLEANFILES = $(CHEWOUT_FILES) *.ref
CHEWOUT_FILES = \
bcmp.def memcpy.def strcmp.def strncat.def strstr.def \
bcopy.def memmove.def strcoll.def strncmp.def strtok.def \
@@ -443,12 +459,9 @@ wcsncmp.def wcsncpy.def wcsnlen.def wcspbrk.def \
wcsrchr.def wcsspn.def wcsstr.def wcstok.def \
wcswidth.def wcsxfrm.def wcwidth.def wmemchr.def \
wmemcmp.def wmemcpy.def wmemmove.def wmemset.def \
-memmem.def memrchr.def rawmemchr.def
+memmem.def memrchr.def rawmemchr.def strchrnul.def
-SUFFIXES = .def
-CHEW = ../../doc/makedoc -f $(srcdir)/../../doc/doc.str
-TARGETDOC = ../tmp.texi
-CLEANFILES = $(CHEWOUT_FILES) *.ref
+CHAPTERS = strings.tex wcstrings.tex
all: all-am
.SUFFIXES:
@@ -530,6 +543,12 @@ lib_a-bzero.o: bzero.c
lib_a-bzero.obj: bzero.c
$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-bzero.obj `if test -f 'bzero.c'; then $(CYGPATH_W) 'bzero.c'; else $(CYGPATH_W) '$(srcdir)/bzero.c'; fi`
+lib_a-explicit_bzero.o: explicit_bzero.c
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-explicit_bzero.o `test -f 'explicit_bzero.c' || echo '$(srcdir)/'`explicit_bzero.c
+
+lib_a-explicit_bzero.obj: explicit_bzero.c
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-explicit_bzero.obj `if test -f 'explicit_bzero.c'; then $(CYGPATH_W) 'explicit_bzero.c'; else $(CYGPATH_W) '$(srcdir)/explicit_bzero.c'; fi`
+
lib_a-index.o: index.c
$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-index.o `test -f 'index.c' || echo '$(srcdir)/'`index.c
@@ -758,6 +777,18 @@ lib_a-swab.o: swab.c
lib_a-swab.obj: swab.c
$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-swab.obj `if test -f 'swab.c'; then $(CYGPATH_W) 'swab.c'; else $(CYGPATH_W) '$(srcdir)/swab.c'; fi`
+lib_a-timingsafe_bcmp.o: timingsafe_bcmp.c
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-timingsafe_bcmp.o `test -f 'timingsafe_bcmp.c' || echo '$(srcdir)/'`timingsafe_bcmp.c
+
+lib_a-timingsafe_bcmp.obj: timingsafe_bcmp.c
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-timingsafe_bcmp.obj `if test -f 'timingsafe_bcmp.c'; then $(CYGPATH_W) 'timingsafe_bcmp.c'; else $(CYGPATH_W) '$(srcdir)/timingsafe_bcmp.c'; fi`
+
+lib_a-timingsafe_memcmp.o: timingsafe_memcmp.c
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-timingsafe_memcmp.o `test -f 'timingsafe_memcmp.c' || echo '$(srcdir)/'`timingsafe_memcmp.c
+
+lib_a-timingsafe_memcmp.obj: timingsafe_memcmp.c
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-timingsafe_memcmp.obj `if test -f 'timingsafe_memcmp.c'; then $(CYGPATH_W) 'timingsafe_memcmp.c'; else $(CYGPATH_W) '$(srcdir)/timingsafe_memcmp.c'; fi`
+
lib_a-u_strerr.o: u_strerr.c
$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-u_strerr.o `test -f 'u_strerr.c' || echo '$(srcdir)/'`u_strerr.c
@@ -998,6 +1029,12 @@ lib_a-wcsdup.o: wcsdup.c
lib_a-wcsdup.obj: wcsdup.c
$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-wcsdup.obj `if test -f 'wcsdup.c'; then $(CYGPATH_W) 'wcsdup.c'; else $(CYGPATH_W) '$(srcdir)/wcsdup.c'; fi`
+lib_a-gnu_basename.o: gnu_basename.c
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-gnu_basename.o `test -f 'gnu_basename.c' || echo '$(srcdir)/'`gnu_basename.c
+
+lib_a-gnu_basename.obj: gnu_basename.c
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-gnu_basename.obj `if test -f 'gnu_basename.c'; then $(CYGPATH_W) 'gnu_basename.c'; else $(CYGPATH_W) '$(srcdir)/gnu_basename.c'; fi`
+
lib_a-memmem.o: memmem.c
$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-memmem.o `test -f 'memmem.c' || echo '$(srcdir)/'`memmem.c
@@ -1216,9 +1253,13 @@ objectlist.awk.in: $(noinst_LTLIBRARIES)
$(CHEW) < $< > $*.def 2> $*.ref
touch stmp-def
+TARGETDOC ?= ../tmp.texi
+
doc: $(CHEWOUT_FILES)
- cat $(srcdir)/strings.tex >> $(TARGETDOC)
- cat $(srcdir)/wcstrings.tex >> $(TARGETDOC)
+ for chapter in $(CHAPTERS) ; \
+ do \
+ cat $(srcdir)/$$chapter >> $(TARGETDOC) ; \
+ done
# 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.
diff --git a/newlib/libc/string/explicit_bzero.c b/newlib/libc/string/explicit_bzero.c
new file mode 100644
index 000000000..5124df23c
--- /dev/null
+++ b/newlib/libc/string/explicit_bzero.c
@@ -0,0 +1,16 @@
+/* $OpenBSD: explicit_bzero.c,v 1.2 2014/06/10 04:17:37 deraadt Exp $ */
+/*
+ * Public domain.
+ * Written by Ted Unangst
+ */
+
+#include <string.h>
+
+/*
+ * explicit_bzero - don't let the compiler optimize away bzero
+ */
+void
+explicit_bzero(void *p, size_t n)
+{
+ bzero(p, n);
+}
diff --git a/newlib/libc/string/gnu_basename.c b/newlib/libc/string/gnu_basename.c
new file mode 100644
index 000000000..90e22ccdf
--- /dev/null
+++ b/newlib/libc/string/gnu_basename.c
@@ -0,0 +1,26 @@
+#ifndef _NO_BASENAME
+/* Copyright 2015 Red Hat, Inc.
+ * Permission to use, copy, modify, and distribute this software
+ * is freely granted, provided that this notice is preserved.
+ */
+
+/* The differences with the POSIX version (unix/basename.c):
+ * - declared in <string.h> (instead of <libgen.h>);
+ * - the argument is never modified, and therefore is marked const;
+ * - the empty string is returned if path is an empty string, "/", or ends
+ * with a trailing slash.
+ */
+
+#include <string.h>
+
+char *
+_DEFUN (__gnu_basename, (path),
+ const char *path)
+{
+ char *p;
+ if ((p = strrchr (path, '/')))
+ return p + 1;
+ return (char *) path;
+}
+
+#endif /* !_NO_BASENAME */
diff --git a/newlib/libc/string/local.h b/newlib/libc/string/local.h
index 5d17dccc4..babaad0e5 100644
--- a/newlib/libc/string/local.h
+++ b/newlib/libc/string/local.h
@@ -6,4 +6,19 @@ int _EXFUN (__wcwidth, (wint_t));
/* Defined in locale/locale.c. Returns a value != 0 if the current
language is assumed to use CJK fonts. */
-int __locale_cjk_lang ();
+int _EXFUN (__locale_cjk_lang, (void));
+
+/*
+ Taken from glibc:
+ Add the compiler optimization to inhibit loop transformation to library
+ calls. This is used to avoid recursive calls in memset and memmove
+ default implementations.
+*/
+#ifdef _HAVE_CC_INHIBIT_LOOP_TO_LIBCALL
+# define __inhibit_loop_to_libcall \
+ __attribute__ ((__optimize__ ("-fno-tree-loop-distribute-patterns")))
+#else
+# define __inhibit_loop_to_libcall
+#endif
+
+
diff --git a/newlib/libc/string/memccpy.c b/newlib/libc/string/memccpy.c
index dded85781..332ed4660 100644
--- a/newlib/libc/string/memccpy.c
+++ b/newlib/libc/string/memccpy.c
@@ -98,7 +98,7 @@ _DEFUN (memccpy, (dst0, src0, endchar, len0),
then punt into the byte copy loop. This should be rare. */
if (!TOO_SMALL(len0) && !UNALIGNED (src, dst))
{
- int i;
+ unsigned int i;
unsigned long mask = 0;
aligned_dst = (long*)dst;
diff --git a/newlib/libc/string/memchr.c b/newlib/libc/string/memchr.c
index 13ed88186..db0af7cd7 100644
--- a/newlib/libc/string/memchr.c
+++ b/newlib/libc/string/memchr.c
@@ -80,7 +80,7 @@ _DEFUN (memchr, (src_void, c, length),
#if !defined(PREFER_SIZE_OVER_SPEED) && !defined(__OPTIMIZE_SIZE__)
unsigned long *asrc;
unsigned long mask;
- int i;
+ unsigned int i;
while (UNALIGNED (src))
{
diff --git a/newlib/libc/string/memmove.c b/newlib/libc/string/memmove.c
index b03bb3821..a037c7c2f 100644
--- a/newlib/libc/string/memmove.c
+++ b/newlib/libc/string/memmove.c
@@ -39,6 +39,7 @@ QUICKREF
#include <_ansi.h>
#include <stddef.h>
#include <limits.h>
+#include "local.h"
/* Nonzero if either X or Y is not aligned on a "long" boundary. */
#define UNALIGNED(X, Y) \
@@ -55,6 +56,7 @@ QUICKREF
/*SUPPRESS 20*/
_PTR
+__inhibit_loop_to_libcall
_DEFUN (memmove, (dst_void, src_void, length),
_PTR dst_void _AND
_CONST _PTR src_void _AND
diff --git a/newlib/libc/string/memrchr.c b/newlib/libc/string/memrchr.c
index 42d9d147b..60dee42ed 100644
--- a/newlib/libc/string/memrchr.c
+++ b/newlib/libc/string/memrchr.c
@@ -80,7 +80,7 @@ _DEFUN (memrchr, (src_void, c, length),
#if !defined(PREFER_SIZE_OVER_SPEED) && !defined(__OPTIMIZE_SIZE__)
unsigned long *asrc;
unsigned long mask;
- int i;
+ unsigned int i;
while (UNALIGNED (src))
{
diff --git a/newlib/libc/string/memset.c b/newlib/libc/string/memset.c
index 55d2ce180..b84e155f7 100644
--- a/newlib/libc/string/memset.c
+++ b/newlib/libc/string/memset.c
@@ -34,12 +34,14 @@ QUICKREF
*/
#include <string.h>
+#include "local.h"
#define LBLOCKSIZE (sizeof(long))
#define UNALIGNED(X) ((long)X & (LBLOCKSIZE - 1))
#define TOO_SMALL(LEN) ((LEN) < LBLOCKSIZE)
_PTR
+__inhibit_loop_to_libcall
_DEFUN (memset, (m, c, n),
_PTR m _AND
int c _AND
@@ -48,7 +50,7 @@ _DEFUN (memset, (m, c, n),
char *s = (char *) m;
#if !defined(PREFER_SIZE_OVER_SPEED) && !defined(__OPTIMIZE_SIZE__)
- int i;
+ unsigned int i;
unsigned long buffer;
unsigned long *aligned_addr;
unsigned int d = c & 0xff; /* To avoid sign extension, copy C to an
diff --git a/newlib/libc/string/rawmemchr.c b/newlib/libc/string/rawmemchr.c
index a9e2acd85..4b5a4cdeb 100644
--- a/newlib/libc/string/rawmemchr.c
+++ b/newlib/libc/string/rawmemchr.c
@@ -77,7 +77,7 @@ _DEFUN (rawmemchr, (src_void, c),
#if !defined(PREFER_SIZE_OVER_SPEED) && !defined(__OPTIMIZE_SIZE__)
unsigned long *asrc;
unsigned long mask;
- int i;
+ unsigned int i;
while (UNALIGNED (src))
{
@@ -110,7 +110,7 @@ _DEFUN (rawmemchr, (src_void, c),
src = (unsigned char *) asrc;
-#endif // !PREFER_SIZE_OVER_SPEED && !__OPTIMIZE_SIZE__
+#endif /* !PREFER_SIZE_OVER_SPEED && !__OPTIMIZE_SIZE__ */
while (1)
{
diff --git a/newlib/libc/string/strcasestr.c b/newlib/libc/string/strcasestr.c
index 1bde1cdbf..8fff00b00 100644
--- a/newlib/libc/string/strcasestr.c
+++ b/newlib/libc/string/strcasestr.c
@@ -96,8 +96,9 @@ QUICKREF
* Find the first occurrence of find in s, ignore case.
*/
char *
-strcasestr(s, find)
- const char *s, *find;
+_DEFUN (strcasestr, (s, find),
+ _CONST char *s _AND
+ _CONST char *find)
{
#if defined(PREFER_SIZE_OVER_SPEED) || defined(__OPTIMIZE_SIZE__)
diff --git a/newlib/libc/string/strerror.c b/newlib/libc/string/strerror.c
index 8852c36c7..fcef33e0e 100644
--- a/newlib/libc/string/strerror.c
+++ b/newlib/libc/string/strerror.c
@@ -45,6 +45,9 @@ Permission denied
o EADDRINUSE
Address already in use
+o EADDRNOTAVAIL
+Address not available
+
o EADV
Advertise error
@@ -66,6 +69,9 @@ Bad message
o EBUSY
Device or resource busy
+o ECANCELED
+Operation canceled
+
o ECHILD
No children
@@ -78,6 +84,9 @@ Software caused connection abort
o ECONNREFUSED
Connection refused
+o ECONNRESET
+Connection reset by peer
+
o EDEADLK
Deadlock
@@ -88,7 +97,7 @@ o EEXIST
File exists
o EDOM
-Math argument
+Mathematics argument out of domain of function
o EFAULT
Bad address
@@ -105,6 +114,9 @@ Host is unreachable
o EIDRM
Identifier removed
+o EILSEQ
+Illegal byte sequence
+
o EINPROGRESS
Connection already in progress
@@ -139,7 +151,7 @@ o ELIBSCN
<<.lib>> section in a.out corrupted
o EMFILE
-Too many open files
+File descriptor value too large
o EMLINK
Too many links
@@ -154,7 +166,10 @@ o ENAMETOOLONG
File or path name too long
o ENETDOWN
-Network interface not configured
+Network interface is not configured
+
+o ENETRESET
+Connection aborted by network
o ENETUNREACH
Network is unreachable
@@ -162,6 +177,12 @@ Network is unreachable
o ENFILE
Too many open files in system
+o ENOBUFS
+No buffer space available
+
+o ENODATA
+No data
+
o ENODEV
No such device
@@ -216,6 +237,9 @@ Not a directory
o ENOTEMPTY
Directory not empty
+o ENOTRECOVERABLE
+State not recoverable
+
o ENOTSOCK
Socket operation on non-socket
@@ -228,6 +252,15 @@ Not a character device
o ENXIO
No such device or address
+o EOPNOTSUPP
+Operation not supported on socket
+
+o EOVERFLOW
+Value too large for defined data type
+
+o EOWNERDEAD
+Previous owner died
+
o EPERM
Not owner
@@ -267,6 +300,9 @@ No such process
o ESRMNT
Srmount error
+o ESTRPIPE
+Strings pipe error
+
o ETIME
Stream ioctl timeout
@@ -276,21 +312,12 @@ Connection timed out
o ETXTBSY
Text file busy
+o EWOULDBLOCK
+Operation would block (usually same as EAGAIN)
+
o EXDEV
Cross-device link
-o ECANCELED
-Operation canceled
-
-o ENOTRECOVERABLE
-State not recoverable
-
-o EOWNERDEAD
-Previous owner died
-
-o ESTRPIPE
-Strings pipe error
-
o-
<<_strerror_r>> is a reentrant version of the above.
@@ -504,6 +531,11 @@ _DEFUN (_strerror_r, (ptr, errnum, internal, errptr),
error = "Network interface is not configured";
break;
#endif
+#ifdef ENETRESET
+ case ENETRESET:
+ error = "Connection aborted by network";
+ break;
+#endif
#ifdef ENFILE
case ENFILE:
error = "Too many open files in system";
@@ -511,7 +543,7 @@ _DEFUN (_strerror_r, (ptr, errnum, internal, errptr),
#endif
#ifdef EMFILE
case EMFILE:
- error = "Too many open files";
+ error = "File descriptor value too large";
break;
#endif
#ifdef ENOTTY
@@ -566,7 +598,7 @@ _DEFUN (_strerror_r, (ptr, errnum, internal, errptr),
#endif
#ifdef EDOM
case EDOM:
- error = "Math argument";
+ error = "Mathematics argument out of domain of function";
break;
#endif
#ifdef ERANGE
@@ -584,6 +616,11 @@ _DEFUN (_strerror_r, (ptr, errnum, internal, errptr),
error = "Identifier removed";
break;
#endif
+#ifdef EILSEQ
+ case EILSEQ:
+ error = "Illegal byte sequence";
+ break;
+#endif
#ifdef EDEADLK
case EDEADLK:
error = "Deadlock";
@@ -724,6 +761,11 @@ _DEFUN (_strerror_r, (ptr, errnum, internal, errptr),
error = "No buffer space available";
break;
#endif
+#ifdef ENODATA
+ case ENODATA:
+ error = "No data";
+ break;
+#endif
#ifdef EAFNOSUPPORT
case EAFNOSUPPORT:
error = "Address family not supported by protocol family";
@@ -754,11 +796,21 @@ _DEFUN (_strerror_r, (ptr, errnum, internal, errptr),
error = "Connection refused";
break;
#endif
+#ifdef ECONNRESET
+ case ECONNRESET:
+ error = "Connection reset by peer";
+ break;
+#endif
#ifdef EADDRINUSE
case EADDRINUSE:
error = "Address already in use";
break;
#endif
+#ifdef EADDRNOTAVAIL
+ case EADDRNOTAVAIL:
+ error = "Address not available";
+ break;
+#endif
#ifdef ECONNABORTED
case ECONNABORTED:
error = "Software caused connection abort";
@@ -809,6 +861,11 @@ _DEFUN (_strerror_r, (ptr, errnum, internal, errptr),
error = "Operation not supported on socket";
break;
#endif
+#ifdef EOVERFLOW
+ case EOVERFLOW:
+ error = "Value too large for defined data type";
+ break;
+#endif
#ifdef EMSGSIZE
case EMSGSIZE:
error = "Message too long";
diff --git a/newlib/libc/string/strings.tex b/newlib/libc/string/strings.tex
index ae00a261a..83b7c6af6 100644
--- a/newlib/libc/string/strings.tex
+++ b/newlib/libc/string/strings.tex
@@ -17,7 +17,9 @@ managing areas of memory. The corresponding declarations are in
* memmem:: Find memory segment
* memmove:: Move possibly overlapping memory
* mempcpy:: Copy memory regions and locate end
+* memrchr:: Reverse search for character in memory
* memset:: Set an area of memory
+* rawmemchr:: Find character in memory
* rindex:: Reverse search for character in string
* stpcpy:: Copy string returning a pointer to its end
* stpncpy:: Counted copy string returning a pointer to its end
@@ -25,6 +27,7 @@ managing areas of memory. The corresponding declarations are in
* strcasestr:: Find string segment ignoring case
* strcat:: Concatenate strings
* strchr:: Search for character in string
+* strchrnul:: Search for character in string
* strcmp:: Character string compare
* strcoll:: Locale-specific character string compare
* strcpy:: Copy string
@@ -86,9 +89,15 @@ managing areas of memory. The corresponding declarations are in
@include string/mempcpy.def
@page
+@include string/memrchr.def
+
+@page
@include string/memset.def
@page
+@include string/rawmemchr.def
+
+@page
@include string/rindex.def
@page
@@ -110,6 +119,9 @@ managing areas of memory. The corresponding declarations are in
@include string/strchr.def
@page
+@include string/strchrnul.def
+
+@page
@include string/strcmp.def
@page
diff --git a/newlib/libc/string/strtok.c b/newlib/libc/string/strtok.c
index 35460ba04..21607e04a 100644
--- a/newlib/libc/string/strtok.c
+++ b/newlib/libc/string/strtok.c
@@ -14,24 +14,24 @@ INDEX
ANSI_SYNOPSIS
#include <string.h>
char *strtok(char *restrict <[source]>,
- const char *restrict <[delimiters]>)
+ const char *restrict <[delimiters]>);
char *strtok_r(char *restrict <[source]>,
const char *restrict <[delimiters]>,
- char **<[lasts]>)
- char *strsep(char **<[source_ptr]>, const char *<[delimiters]>)
+ char **<[lasts]>);
+ char *strsep(char **<[source_ptr]>, const char *<[delimiters]>);
TRAD_SYNOPSIS
#include <string.h>
- char *strtok(<[source]>, <[delimiters]>)
+ char *strtok(<[source]>, <[delimiters]>);
char *<[source]>;
char *<[delimiters]>;
- char *strtok_r(<[source]>, <[delimiters]>, <[lasts]>)
+ char *strtok_r(<[source]>, <[delimiters]>, <[lasts]>);
char *<[source]>;
char *<[delimiters]>;
char **<[lasts]>;
- char *strsep(<[source_ptr]>, <[delimiters]>)
+ char *strsep(<[source_ptr]>, <[delimiters]>);
char **<[source_ptr]>;
char *<[delimiters]>;
diff --git a/newlib/libc/string/timingsafe_bcmp.c b/newlib/libc/string/timingsafe_bcmp.c
new file mode 100644
index 000000000..0b736154c
--- /dev/null
+++ b/newlib/libc/string/timingsafe_bcmp.c
@@ -0,0 +1,29 @@
+/* $OpenBSD: timingsafe_bcmp.c,v 1.2 2014/06/10 04:17:37 deraadt Exp $ */
+/*
+ * Copyright (c) 2010 Damien Miller. All rights reserved.
+ *
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ * ANY SPECIAL, DIRECT, 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.
+ */
+
+#include <string.h>
+
+int
+timingsafe_bcmp(const void *b1, const void *b2, size_t n)
+{
+ const unsigned char *p1 = b1, *p2 = b2;
+ int ret = 0;
+
+ for (; n > 0; n--)
+ ret |= *p1++ ^ *p2++;
+ return (ret != 0);
+}
diff --git a/newlib/libc/string/timingsafe_memcmp.c b/newlib/libc/string/timingsafe_memcmp.c
new file mode 100644
index 000000000..04e2ac5e2
--- /dev/null
+++ b/newlib/libc/string/timingsafe_memcmp.c
@@ -0,0 +1,46 @@
+/* $OpenBSD: timingsafe_memcmp.c,v 1.1 2014/06/13 02:12:17 matthew Exp $ */
+/*
+ * Copyright (c) 2014 Google Inc.
+ *
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ * ANY SPECIAL, DIRECT, 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.
+ */
+
+#include <limits.h>
+#include <string.h>
+
+int
+timingsafe_memcmp(const void *b1, const void *b2, size_t len)
+{
+ const unsigned char *p1 = b1, *p2 = b2;
+ size_t i;
+ int res = 0, done = 0;
+
+ for (i = 0; i < len; i++) {
+ /* lt is -1 if p1[i] < p2[i]; else 0. */
+ int lt = (p1[i] - p2[i]) >> CHAR_BIT;
+
+ /* gt is -1 if p1[i] > p2[i]; else 0. */
+ int gt = (p2[i] - p1[i]) >> CHAR_BIT;
+
+ /* cmp is 1 if p1[i] > p2[i]; -1 if p1[i] < p2[i]; else 0. */
+ int cmp = lt - gt;
+
+ /* set res = cmp if !done. */
+ res |= cmp & ~done;
+
+ /* set done if p1[i] != p2[i]. */
+ done |= lt | gt;
+ }
+
+ return (res);
+}
diff --git a/newlib/libc/string/u_strerr.c b/newlib/libc/string/u_strerr.c
index 7d902feb7..2978df0cf 100644
--- a/newlib/libc/string/u_strerr.c
+++ b/newlib/libc/string/u_strerr.c
@@ -6,5 +6,10 @@ _DEFUN(_user_strerror, (errnum, internal, errptr),
int internal _AND
int *errptr)
{
+ /* prevent warning about unused parameters */
+ _CAST_VOID errnum;
+ _CAST_VOID internal;
+ _CAST_VOID errptr;
+
return 0;
}
diff --git a/newlib/libc/string/wcpcpy.c b/newlib/libc/string/wcpcpy.c
index 7bb9a1e9f..e1d9ad073 100644
--- a/newlib/libc/string/wcpcpy.c
+++ b/newlib/libc/string/wcpcpy.c
@@ -4,12 +4,12 @@ FUNCTION
ANSI_SYNOPSIS
#include <wchar.h>
- wchar_t *wcpcpy(wchar_t *<[s1]>, const wchar_t *,<[s2]>);
+ wchar_t *wcpcpy(wchar_t *<[s1]>, const wchar_t *<[s2]>);
TRAD_SYNOPSIS
wchar_t *wcpcpy(<[s1]>, <[s2]>
- wchar_t *<[s1]>;
- const wchar_t *<[s2]>;
+ wchar_t *__restrict <[s1]>;
+ const wchar_t *__restrict <[s2]>;
DESCRIPTION
The <<wcpcpy>> function copies the wide-character string pointed to by
@@ -32,8 +32,8 @@ No supporting OS subroutines are required.
wchar_t *
_DEFUN (wcpcpy, (s1, s2),
- wchar_t * s1 _AND
- _CONST wchar_t * s2)
+ wchar_t *__restrict s1 _AND
+ _CONST wchar_t *__restrict s2)
{
while ((*s1++ = *s2++))
;
diff --git a/newlib/libc/string/wcpncpy.c b/newlib/libc/string/wcpncpy.c
index 654bdb78f..87843b422 100644
--- a/newlib/libc/string/wcpncpy.c
+++ b/newlib/libc/string/wcpncpy.c
@@ -4,12 +4,13 @@ FUNCTION
ANSI_SYNOPSIS
#include <wchar.h>
- wchar_t *wcpncpy(wchar_t *<[s1]>, const wchar_t *<[s2]>, size_t <[n]>);
+ wchar_t *wcpncpy(wchar_t *__restrict <[s1]>,
+ const wchar_t *__restrict <[s2]>, size_t <[n]>);
TRAD_SYNOPSIS
wchar_t *wcpncpy(<[s1]>, <[s2]>, <[n]>
- wchar_t *<[s1]>;
- const wchar_t *<[s2]>;
+ wchar_t *__restrict <[s1]>;
+ const wchar_t *__restrict <[s2]>;
size_t <[n]>;
DESCRIPTION
@@ -39,8 +40,8 @@ No supporting OS subroutines are required.
wchar_t *
_DEFUN (wcpncpy, (dst, src, count),
- wchar_t * dst _AND
- _CONST wchar_t * src _AND
+ wchar_t *__restrict dst _AND
+ _CONST wchar_t *__restrict src _AND
size_t count)
{
wchar_t *ret = NULL;
diff --git a/newlib/libc/string/wcscat.c b/newlib/libc/string/wcscat.c
index 54c0b503b..11afbe3a6 100644
--- a/newlib/libc/string/wcscat.c
+++ b/newlib/libc/string/wcscat.c
@@ -6,12 +6,13 @@ INDEX
ANSI_SYNOPSIS
#include <wchar.h>
- wchar_t *wcscat(wchar_t *<[s1]>, const wchar_t *<[s2]>);
+ wchar_t *wcscat(wchar_t *__restrict <[s1]>,
+ const wchar_t *__restrict <[s2]>);
TRAD_SYNOPSIS
wchar_t *wcscat(<[s1]>, <[s2]>
- wchar_t *<[s1]>;
- const wchar_t *<[s2]>;
+ wchar_t *__restrict <[s1]>;
+ const wchar_t *__restrict <[s2]>;
DESCRIPTION
The <<wcscat>> function appends a copy of the wide-character string
@@ -66,8 +67,8 @@ No supporting OS subroutines are required.
wchar_t *
_DEFUN (wcscat, (s1, s2),
- wchar_t * s1 _AND
- _CONST wchar_t * s2)
+ wchar_t *__restrict s1 _AND
+ _CONST wchar_t *__restrict s2)
{
wchar_t *p;
wchar_t *q;
diff --git a/newlib/libc/string/wcscpy.c b/newlib/libc/string/wcscpy.c
index ede693d9c..ed8b484bc 100644
--- a/newlib/libc/string/wcscpy.c
+++ b/newlib/libc/string/wcscpy.c
@@ -4,12 +4,13 @@ FUNCTION
ANSI_SYNOPSIS
#include <wchar.h>
- wchar_t *wcscpy(wchar_t *<[s1]>, const wchar_t *,<[s2]>);
+ wchar_t *wcscpy(wchar_t *__restrict <[s1]>,
+ const wchar_t *__restrict <[s2]>);
TRAD_SYNOPSIS
wchar_t *wcscpy(<[s1]>, <[s2]>
- wchar_t *<[s1]>;
- const wchar_t *<[s2]>;
+ wchar_t *__restrict <[s1]>;
+ const wchar_t *__restrict <[s2]>;
DESCRIPTION
The <<wcscpy>> function copies the wide-character string pointed to by
@@ -62,8 +63,8 @@ No supporting OS subroutines are required.
wchar_t *
_DEFUN (wcscpy, (s1, s2),
- wchar_t * s1 _AND
- _CONST wchar_t * s2)
+ wchar_t *__restrict s1 _AND
+ _CONST wchar_t *__restrict s2)
{
wchar_t *p;
_CONST wchar_t *q;
diff --git a/newlib/libc/string/wcsncat.c b/newlib/libc/string/wcsncat.c
index fd77c0cc8..b73f6e93e 100644
--- a/newlib/libc/string/wcsncat.c
+++ b/newlib/libc/string/wcsncat.c
@@ -4,12 +4,13 @@ FUNCTION
ANSI_SYNOPSIS
#include <wchar.h>
- wchar_t *wcsncat(wchar_t *<[s1]>, const wchar_t *<[s2]>, size_t <[n]>);
+ wchar_t *wcsncat(wchar_t *__restrict <[s1]>,
+ const wchar_t *__restrict <[s2]>, size_t <[n]>);
TRAD_SYNOPSIS
wchar_t *wcsncat(<[s1]>, <[s2]>, <[n]>
- wchar_t *<[s1]>;
- const wchar_t *<[s2]>;
+ wchar_t *__restrict <[s1]>;
+ const wchar_t *__restrict <[s2]>;
size_t <[n]>;
DESCRIPTION
@@ -68,8 +69,8 @@ No supporting OS subroutines are required.
wchar_t *
_DEFUN (wcsncat, (s1, s2, n),
- wchar_t * s1 _AND
- _CONST wchar_t * s2 _AND
+ wchar_t *__restrict s1 _AND
+ _CONST wchar_t *__restrict s2 _AND
size_t n)
{
wchar_t *p;
diff --git a/newlib/libc/string/wcsncpy.c b/newlib/libc/string/wcsncpy.c
index 533b0ce53..3d6d70b7d 100644
--- a/newlib/libc/string/wcsncpy.c
+++ b/newlib/libc/string/wcsncpy.c
@@ -4,12 +4,13 @@ FUNCTION
ANSI_SYNOPSIS
#include <wchar.h>
- wchar_t *wcsncpy(wchar_t *<[s1]>, const wchar_t *<[s2]>, size_t <[n]>);
+ wchar_t *wcsncpy(wchar_t *__restrict <[s1]>,
+ const wchar_t *__restrict <[s2]>, size_t <[n]>);
TRAD_SYNOPSIS
wchar_t *wcsncpy(<[s1]>, <[s2]>, <[n]>
- wchar_t *<[s1]>;
- const wchar_t *<[s2]>;
+ wchar_t *__restrict <[s1]>;
+ const wchar_t *__restrict <[s2]>;
size_t <[n]>;
DESCRIPTION
@@ -41,8 +42,8 @@ No supporting OS subroutines are required.
wchar_t *
_DEFUN (wcsncpy, (s1, s2, n),
- wchar_t * s1 _AND
- _CONST wchar_t * s2 _AND
+ wchar_t *__restrict s1 _AND
+ _CONST wchar_t *__restrict s2 _AND
size_t n)
{
wchar_t *dscan=s1;
diff --git a/newlib/libc/string/wcsstr.c b/newlib/libc/string/wcsstr.c
index 0b00396ea..6e891120d 100644
--- a/newlib/libc/string/wcsstr.c
+++ b/newlib/libc/string/wcsstr.c
@@ -4,12 +4,13 @@ FUNCTION
ANSI_SYNOPSIS
#include <wchar.h>
- wchar_t *wcsstr(const wchar_t *<[big]>, const wchar_t *<[little]>);
+ wchar_t *wcsstr(const wchar_t *__restrict <[big]>,
+ const wchar_t *__restrict <[little]>);
TRAD_SYNOPSIS
wchar_t *wcsstr(<[big]>, <[little]>
- const wchar_t *<[big]>;
- const wchar_t *<[little]>;
+ const wchar_t *__restrict <[big]>;
+ const wchar_t *__restrict <[little]>;
DESCRIPTION
The <<wcsstr>> function locates the first occurrence in the
@@ -66,8 +67,8 @@ PORTABILITY
wchar_t *
_DEFUN (wcsstr, (big, little),
- _CONST wchar_t * big _AND
- _CONST wchar_t * little)
+ _CONST wchar_t *__restrict big _AND
+ _CONST wchar_t *__restrict little)
{
_CONST wchar_t *p;
_CONST wchar_t *q;
diff --git a/newlib/libc/string/wcstok.c b/newlib/libc/string/wcstok.c
index de38d3a55..144b33efd 100644
--- a/newlib/libc/string/wcstok.c
+++ b/newlib/libc/string/wcstok.c
@@ -8,15 +8,16 @@ INDEX
ANSI_SYNOPSIS
#include <wchar.h>
- wchar_t *wcstok(wchar_t *<[source]>, const wchar_t *<[delimiters]>,
- wchar_t **<[lasts]>)
+ wchar_t *wcstok(wchar_t *__restrict <[source]>,
+ const wchar_t *__restrict <[delimiters]>,
+ wchar_t **__restrict <[lasts]>);
TRAD_SYNOPSIS
#include <wchar.h>
- wchar_t *wcstok(<[source]>, <[delimiters]>, <[lasts]>)
- wchar_t *<[source]>;
- wchar_t *<[delimiters]>;
- wchar_t **<[lasts]>;
+ wchar_t *wcstok(<[source]>, <[delimiters]>, <[lasts]>);
+ wchar_t *__restrict <[source]>;
+ wchar_t *__restrict <[delimiters]>;
+ wchar_t **__restrict <[lasts]>;
DESCRIPTION
The <<wcstok>> function is the wide-character equivalent of the
@@ -97,9 +98,9 @@ QUICKREF
wchar_t *
_DEFUN (wcstok, (s, delim, lasts),
- register wchar_t *s _AND
- register const wchar_t *delim _AND
- wchar_t **lasts)
+ register wchar_t *__restrict s _AND
+ register const wchar_t *__restrict delim _AND
+ wchar_t **__restrict lasts)
{
register const wchar_t *spanp;
register int c, sc;
diff --git a/newlib/libc/string/wcsxfrm.c b/newlib/libc/string/wcsxfrm.c
index 439bdd036..d5a31728d 100644
--- a/newlib/libc/string/wcsxfrm.c
+++ b/newlib/libc/string/wcsxfrm.c
@@ -7,13 +7,14 @@ INDEX
ANSI_SYNOPSIS
#include <wchar.h>
- int wcsxfrm(wchar_t *<[stra]>, const wchar_t * <[strb]>, size_t <[n]>);
+ int wcsxfrm(wchar_t *__restrict <[stra]>,
+ const wchar_t *__restrict <[strb]>, size_t <[n]>);
TRAD_SYNOPSIS
#include <wchar.h>
size_t wcsxfrm(<[stra]>, <[strb]>, <[n]>)
- wchar_t *<[stra]>;
- wchar_t *<[strb]>;
+ wchar_t *__restrict <[stra]>;
+ wchar_t *__restrict <[strb]>;
size_t <[n]>
DESCRIPTION
@@ -43,8 +44,8 @@ PORTABILITY
size_t
_DEFUN (wcsxfrm, (a, b, n),
- wchar_t *a _AND
- _CONST wchar_t *b _AND
+ wchar_t *__restrict a _AND
+ _CONST wchar_t *__restrict b _AND
size_t n)
{
diff --git a/newlib/libc/string/wmemcpy.c b/newlib/libc/string/wmemcpy.c
index 748e8e196..a57d6a512 100644
--- a/newlib/libc/string/wmemcpy.c
+++ b/newlib/libc/string/wmemcpy.c
@@ -4,12 +4,13 @@ FUNCTION
ANSI_SYNOPSIS
#include <wchar.h>
- wchar_t *wmemcpy(wchar_t *<[d]>, const wchar_t *<[s]>, size_t <[n]>);
+ wchar_t *wmemcpy(wchar_t *__restrict <[d]>,
+ const wchar_t *__restrict <[s]>, size_t <[n]>);
TRAD_SYNOPSIS
wchar_t *wmemcpy(<[d]>, <[s]>, <[n]>
- wchar_t *<[d]>;
- const wchar_t *<[s]>;
+ wchar_t *__restrict <[d]>;
+ const wchar_t *__restrict <[s]>;
size_t <[n]>;
DESCRIPTION
@@ -67,8 +68,8 @@ No supporting OS subroutines are required.
wchar_t *
_DEFUN (wmemcpy, (d, s, n),
- wchar_t * d _AND
- _CONST wchar_t * s _AND
+ wchar_t *__restrict d _AND
+ _CONST wchar_t *__restrict s _AND
size_t n)
{
diff --git a/newlib/libc/sys.tex b/newlib/libc/sys.tex
index 3b04c1500..a88b09816 100644
--- a/newlib/libc/sys.tex
+++ b/newlib/libc/sys.tex
@@ -306,171 +306,94 @@ routines are consistent with the other reentrant subroutines in this
library, and achieve reentrancy by using a reserved global data block
(@pxref{Reentrancy,,Reentrancy}).
-@c FIXME!!! The following ignored text specifies how this section ought
-@c to work; however, both standalone info and Emacs info mode fail when
-@c confronted with nodes beginning `_' as of 24may93. Restore when Info
-@c readers fixed!
-@ignore
@menu
-* _open_r:: Reentrant version of open
* _close_r:: Reentrant version of close
+* _execve_r:: Reentrant version of execve
+* _fork_r:: Reentrant version of fork
+@ifset STDIO64
+* _fstat64_r:: Reentrant version of fstat64
+@end ifset
+* _fstat_r:: Reentrant version of fstat
+* _getpid_r:: Reentrant version of getpid
+* _kill_r:: Reentrant version of kill
+* _link_r:: Reentrant version of link
+@ifset STDIO64
+* _lseek64_r:: Reentrant version of lseek64
+@end ifset
* _lseek_r:: Reentrant version of lseek
+@ifset STDIO64
+* _open64_r:: Reentrant version of open64
+@end ifset
+* _open_r:: Reentrant version of open
* _read_r:: Reentrant version of read
-* _write_r:: Reentrant version of write
-* _link_r:: Reentrant version of link
-* _unlink_r:: Reentrant version of unlink
-* _stat_r:: Reentrant version of stat
-* _fstat_r:: Reentrant version of fstat
-* _sbrk_r:: Reentrant version of sbrk
-* _fork_r:: Reentrant version of fork
+* _sbrk_r:: Reentrant version of sbrk
+@ifset STDIO64
+* _stat64_r:: Reentrant version of stat64
+@end ifset
+* _stat_r:: Reentrant version of stat
+* _times_r:: Reentrant version of times
+* _unlink_r:: Reentrant version of unlink
* _wait_r:: Reentrant version of wait
+* _write_r:: Reentrant version of write
@end menu
-@down
-@include reent/filer.def
-@include reent/execr.def
-@include reent/statr.def
-@include reent/fstatr.def
-@include reent/linkr.def
-@include reent/unlinkr.def
-@include reent/sbrkr.def
-@up
-@end ignore
-
-@ftable @code
-@item _open_r
-A reentrant version of @code{open}. It takes a pointer
-to the global data block, which holds @code{errno}.
+@lowersections
+@page
+@include reent/closer.def
-@example
-int _open_r(void *@var{reent},
- const char *@var{file}, int @var{flags}, int @var{mode});
-@end example
+@page
+@include reent/execr.def
@ifset STDIO64
-@item _open64_r
-A reentrant version of @code{open64}. It takes a pointer
-to the global data block, which holds @code{errno}.
-
-@example
-int _open64_r(void *@var{reent},
- const char *@var{file}, int @var{flags}, int @var{mode});
-@end example
+@page
+@include reent/fstat64r.def
@end ifset
-@item _close_r
-A reentrant version of @code{close}. It takes a pointer to the global
-data block, which holds @code{errno}.
-
-@example
-int _close_r(void *@var{reent}, int @var{fd});
-@end example
-
-@item _lseek_r
-A reentrant version of @code{lseek}. It takes a pointer to the global
-data block, which holds @code{errno}.
+@page
+@include reent/fstatr.def
-@example
-off_t _lseek_r(void *@var{reent},
- int @var{fd}, off_t @var{pos}, int @var{whence});
-@end example
+@page
+@include reent/linkr.def
@ifset STDIO64
-@item _lseek64_r
-A reentrant version of @code{lseek64}. It takes a pointer to the global
-data block, which holds @code{errno}.
-
-@example
-off_t _lseek64_r(void *@var{reent},
- int @var{fd}, off_t @var{pos}, int @var{whence});
-@end example
+@page
+@include reent/lseek64r.def
@end ifset
-@item _read_r
-A reentrant version of @code{read}. It takes a pointer to the global
-data block, which holds @code{errno}.
-
-@example
-long _read_r(void *@var{reent},
- int @var{fd}, void *@var{buf}, size_t @var{cnt});
-@end example
-
-@item _write_r
-A reentrant version of @code{write}. It takes a pointer to the global
-data block, which holds @code{errno}.
-
-@example
-long _write_r(void *@var{reent},
- int @var{fd}, const void *@var{buf}, size_t @var{cnt});
-@end example
-
-@item _fork_r
-A reentrant version of @code{fork}. It takes a pointer to the global
-data block, which holds @code{errno}.
-
-@example
-int _fork_r(void *@var{reent});
-@end example
-
-@item _wait_r
-A reentrant version of @code{wait}. It takes a pointer to the global
-data block, which holds @code{errno}.
+@page
+@include reent/lseekr.def
-@example
-int _wait_r(void *@var{reent}, int *@var{status});
-@end example
+@ifset STDIO64
+@page
+@include reent/open64r.def
+@end ifset
-@item _stat_r
-A reentrant version of @code{stat}. It takes a pointer to the global
-data block, which holds @code{errno}.
+@page
+@include reent/openr.def
-@example
-int _stat_r(void *@var{reent},
- const char *@var{file}, struct stat *@var{pstat});
-@end example
+@page
+@include reent/readr.def
-@item _fstat_r
-A reentrant version of @code{fstat}. It takes a pointer to the global
-data block, which holds @code{errno}.
+@page
+@include reent/sbrkr.def
-@example
-int _fstat_r(void *@var{reent},
- int @var{fd}, struct stat *@var{pstat});
-@end example
+@page
+@include reent/signalr.def
@ifset STDIO64
-@item _fstat64_r
-A reentrant version of @code{fstat64}. It takes a pointer to the global
-data block, which holds @code{errno}.
-
-@example
-int _fstat64_r(void *@var{reent},
- int @var{fd}, struct stat *@var{pstat});
-@end example
+@page
+@include reent/stat64r.def
@end ifset
-@item _link_r
-A reentrant version of @code{link}. It takes a pointer to the global
-data block, which holds @code{errno}.
-
-@example
-int _link_r(void *@var{reent},
- const char *@var{old}, const char *@var{new});
-@end example
-
-@item _unlink_r
-A reentrant version of @code{unlink}. It takes a pointer to the global
-data block, which holds @code{errno}.
+@page
+@include reent/statr.def
-@example
-int _unlink_r(void *@var{reent}, const char *@var{file});
-@end example
+@page
+@include reent/timesr.def
-@item _sbrk_r
-A reentrant version of @code{sbrk}. It takes a pointer to the global
-data block, which holds @code{errno}.
+@page
+@include reent/unlinkr.def
-@example
-char *_sbrk_r(void *@var{reent}, size_t @var{incr});
-@end example
-@end ftable
+@page
+@include reent/writer.def
+@raisesections
diff --git a/newlib/libc/sys/a29khif/configure b/newlib/libc/sys/a29khif/configure
index f4fecd232..1d738bb7c 100755
--- a/newlib/libc/sys/a29khif/configure
+++ b/newlib/libc/sys/a29khif/configure
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.68 for newlib 2.0.0.
+# Generated by GNU Autoconf 2.68 for newlib 2.4.0.
#
#
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
@@ -556,8 +556,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='newlib'
PACKAGE_TARNAME='newlib'
-PACKAGE_VERSION='2.0.0'
-PACKAGE_STRING='newlib 2.0.0'
+PACKAGE_VERSION='2.4.0'
+PACKAGE_STRING='newlib 2.4.0'
PACKAGE_BUGREPORT=''
PACKAGE_URL=''
@@ -1239,7 +1239,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures newlib 2.0.0 to adapt to many kinds of systems.
+\`configure' configures newlib 2.4.0 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1309,7 +1309,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of newlib 2.0.0:";;
+ short | recursive ) echo "Configuration of newlib 2.4.0:";;
esac
cat <<\_ACEOF
@@ -1400,7 +1400,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-newlib configure 2.0.0
+newlib configure 2.4.0
generated by GNU Autoconf 2.68
Copyright (C) 2010 Free Software Foundation, Inc.
@@ -1455,7 +1455,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by newlib $as_me 2.0.0, which was
+It was created by newlib $as_me 2.4.0, which was
generated by GNU Autoconf 2.68. Invocation command line was
$ $0 $@
@@ -2527,7 +2527,7 @@ fi
# Define the identity of the package.
PACKAGE='newlib'
- VERSION='2.0.0'
+ VERSION='2.4.0'
# Some tools Automake needs.
@@ -4007,7 +4007,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by newlib $as_me 2.0.0, which was
+This file was extended by newlib $as_me 2.4.0, which was
generated by GNU Autoconf 2.68. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -4064,7 +4064,7 @@ _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
-newlib config.status 2.0.0
+newlib config.status 2.4.0
configured by $0, generated by GNU Autoconf 2.68,
with options \\"\$ac_cs_config\\"
diff --git a/newlib/libc/sys/arc/crt0.S b/newlib/libc/sys/arc/crt0.S
deleted file mode 100644
index 346339774..000000000
--- a/newlib/libc/sys/arc/crt0.S
+++ /dev/null
@@ -1,75 +0,0 @@
-; ARC start up file
-; In the absence of a custom linker script, go with something simple.
-; We do not support passing arguments to "main", but this is an embedded
-; system anyway.
-;
-; We call init/fini here without cpu prefixes because there is always
-; only one .init/.fini section per image.
-
- .section .text
- .align 4
-
- .global start
-start:
-
- mov sp,end ; Round "sp" up to page after "end".
- add sp,sp,4095
- and sp,sp,-4096
-
- ld r8,[stack_size] ; Add stack size to "sp".
- add sp,sp,r8
-
- st sp,[sbrk_start] ; Initialize malloc heap.
- st sp,[sbrk_loc]
-
- sub sp,sp,16 ; callee expects 16 bytes already "pushed".
- mov fp,0 ; Top of stack frame indicator.
-
- mov r0,edata ; Zero bss.
- mov r2,end
- sub r2,r2,r0
- mov r1,0
-
-#ifdef __base__
- bl.nd _memset
- bl.nd init ; .init section entry point.
- mov r0,%st(fini) ; .fini section entry point.
- bl.nd _atexit
- mov r0,0 ; argc
- mov r1,0 ; argv
- bl.nd _main
- bl.nd _exit
-#endif
-
-#ifdef __host__
- bl.nd _host_memset
- bl.nd init ; .init section entry point.
- mov r0,%st(fini) ; .fini section entry point.
- bl.nd _host_atexit
- mov r0,0 ; argc
- mov r1,0 ; argv
- bl.nd _host_main
- bl.nd _host_exit
-#endif
-
-#ifdef __graphics__
- bl.nd _graphics_memset
- bl.nd init ; .init section entry point.
- mov r0,%st(fini) ; .fini section entry point.
- bl.nd _graphics_atexit
- mov r0,0 ; argc
- mov r1,0 ; argv
- bl.nd _graphics_main
- bl.nd _graphics_exit
-#endif
-
-#ifdef __audio__
- bl.nd _audio_memset
- bl.nd init ; .init section entry point.
- mov r0,%st(fini) ; .fini section entry point.
- bl.nd _audio_atexit
- mov r0,0 ; argc
- mov r1,0 ; argv
- bl.nd _audio_main
- bl.nd _audio_exit
-#endif
diff --git a/newlib/libc/sys/arc/dummy.S b/newlib/libc/sys/arc/dummy.S
deleted file mode 100644
index f0aa8fede..000000000
--- a/newlib/libc/sys/arc/dummy.S
+++ /dev/null
@@ -1 +0,0 @@
-/* Dummy file to force .S.o suffix rule generation. */
diff --git a/newlib/libc/sys/arc/isatty.c b/newlib/libc/sys/arc/isatty.c
deleted file mode 100644
index fe64209b9..000000000
--- a/newlib/libc/sys/arc/isatty.c
+++ /dev/null
@@ -1,18 +0,0 @@
-/* isatty.c */
-
-/* Dumb implementation so programs will at least run. */
-
-#include <sys/stat.h>
-#include <reent.h>
-
-int
-_isatty_r (struct _reent *ptr, int fd)
-{
- struct stat buf;
-
- if (_fstat_r (ptr, fd, &buf) < 0)
- return 0;
- if (S_ISCHR (buf.st_mode))
- return 1;
- return 0;
-}
diff --git a/newlib/libc/sys/arc/mem-layout.c b/newlib/libc/sys/arc/mem-layout.c
deleted file mode 100644
index e9c215220..000000000
--- a/newlib/libc/sys/arc/mem-layout.c
+++ /dev/null
@@ -1,21 +0,0 @@
-/* Ideally this kind of stuff is specified in a linker script. It's not clear
- what the default linker script should do, so for now we have this. */
-
-/* Keep this file separate from sbrk.c so the programmer can supply his/her
- own _sbrk_r. This file could go in crt0.S, but I want to keep this in C.
- This is all just an experiment anyway. */
-
-#ifndef STACK_SIZE
-/* Cache lines recycle at 4096 I think, and 4096 is listed as the page size,
- so we make the stack size a multiple of it. Not that it's relevant or
- anything, but why not base it on *something*? */
-#define STACK_SIZE (4096 * 4)
-#endif
-
-int stack_size asm ("stack_size") = STACK_SIZE;
-
-#ifndef SBRK_SIZE
-#define SBRK_SIZE (4096 * 32)
-#endif
-
-int sbrk_size asm ("sbrk_size") = SBRK_SIZE;
diff --git a/newlib/libc/sys/arc/sbrk.c b/newlib/libc/sys/arc/sbrk.c
deleted file mode 100644
index 9f863cded..000000000
--- a/newlib/libc/sys/arc/sbrk.c
+++ /dev/null
@@ -1,43 +0,0 @@
-/* sbrk support */
-
-/* The current plan is to have one sbrk handler for all cpus.
- Hence use `asm' for each global variable here to avoid the cpu prefix.
- We can't intrude on the user's namespace (another reason to use asm). */
-
-#include <sys/types.h>
-#include <sys/syscall.h>
-#include <errno.h>
-#include <stddef.h>
-
-/* These variables are publicly accessible for debugging purposes.
- The user is also free to set sbrk_size to something different.
- See mem-layout.c. */
-
-extern int sbrk_size asm ("sbrk_size");
-
-caddr_t sbrk_start asm ("sbrk_start");
-caddr_t sbrk_loc asm ("sbrk_loc");
-
-/*caddr_t _sbrk_r (struct _reent *, size_t) asm ("__sbrk_r");*/
-
-/* FIXME: We need a semaphore here. */
-
-caddr_t
-_sbrk_r (struct _reent *r, size_t nbytes)
-{
- caddr_t result;
-
- if (
- /* Ensure we don't underflow. */
- sbrk_loc + nbytes < sbrk_start
- /* Ensure we don't overflow. */
- || sbrk_loc + nbytes > sbrk_start + sbrk_size)
- {
- errno = ENOMEM;
- return ((caddr_t) -1);
- }
-
- result = sbrk_loc;
- sbrk_loc += nbytes;
- return result;
-}
diff --git a/newlib/libc/sys/arc/sys/syscall.h b/newlib/libc/sys/arc/sys/syscall.h
deleted file mode 100644
index b5d8aa2e1..000000000
--- a/newlib/libc/sys/arc/sys/syscall.h
+++ /dev/null
@@ -1,53 +0,0 @@
-/* ARC system call interface */
-
-/* A special version of the flag insn is used to distinguish syscalls from
- breakpoints (a breakpoint might be set at the same place).
-
- The upper 23 bits of the argument to a flag insn are not currently used.
- By convention, bit 31 is one to indicate this is a specially coded operand.
- The next 15 bits (bits 30-16) can be used for software purposes.
- The format isn't documented yet, so the pattern we use here may change. */
-
-#define SYSCALL_MARKER 0x80010000
-#define SYSCALL_MAGIC 0x61082300
-
-/* Perform a system call.
-
- If ERR is 0, it succeeded. Otherwise it is a positive value for errno. */
-
-#define SYSCALL(op, rc, err, r0, r1, r2) \
-asm volatile ( "\
- mov r0,%2\n\t \
- mov r1,%3\n\t \
- mov r2,%4\n\t \
- mov r3,%5\n\t \
- mov r4,%6\n\t \
- flag %7\n\t \
- nop\n\t \
- nop\n\t \
- nop\n\t \
- mov %0,r0\n\t \
- mov %1,r1" \
- : "=r" (rc), "=r" (err) \
- : "i" (SYSCALL_MAGIC), "r" (op), "r" (r0), "r" (r1), "r" (r2), \
- "i" (1 | SYSCALL_MARKER) \
- : "r0", "r1", "r2", "r3", "r4");
-
-#define SYS_exit 1
-#define SYS_open 2
-#define SYS_close 3
-#define SYS_read 4
-#define SYS_write 5
-#define SYS_lseek 6
-#define SYS_link 7
-#define SYS_unlink 8
-#define SYS_chdir 9
-#define SYS_chmod 10
-#define SYS_stat 11
-#define SYS_fstat 12
-#define SYS_access 13
-#define SYS_getpid 14
-#define SYS_kill 15
-#define SYS_time 16
-
-#define SYS_MAX 17
diff --git a/newlib/libc/sys/arc/syscalls.c b/newlib/libc/sys/arc/syscalls.c
deleted file mode 100644
index 9c578451a..000000000
--- a/newlib/libc/sys/arc/syscalls.c
+++ /dev/null
@@ -1,131 +0,0 @@
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <sys/syscall.h>
-#include <_ansi.h>
-#include <errno.h>
-#include <fcntl.h>
-#include <stdarg.h>
-#include <reent.h>
-
-_ssize_t
-_read_r (struct _reent *r, int fd, void *buf, size_t nbytes)
-{
- int err;
- _ssize_t rc;
-
- SYSCALL (SYS_read, rc, err, fd, buf, nbytes);
- if (err)
- __errno_r (r) = err;
- return rc;
-}
-
-_ssize_t
-_write_r (struct _reent *r, int fd, const void *buf, size_t nbytes)
-{
- int err;
- _ssize_t rc;
-
- SYSCALL (SYS_write, rc, err, fd, buf, nbytes);
- if (err)
- __errno_r (r) = err;
- return rc;
-}
-
-/* FIXME: The prototype in <fcntl.h> for open() uses ...,
- but reent.h uses int. */
-
-int
-_open_r (struct _reent *r, const char *buf, int flags, int mode)
-{
- int rc,err;
-#if 0
- int mode;
- va_list ap;
-
- va_start (ap, flags);
- mode = va_arg (ap, int);
- va_end (ap);
-#endif
-
- SYSCALL (SYS_open, rc, err, buf, flags, mode);
- if (err)
- __errno_r (r) = err;
- return rc;
-}
-
-int
-_close_r (struct _reent *r, int fd)
-{
- int rc,err;
-
- SYSCALL (SYS_close, rc, err, fd, 0, 0);
- if (err)
- __errno_r (r) = err;
- return rc;
-}
-
-off_t
-_lseek_r (struct _reent *r, int fd, off_t offset, int whence)
-{
- int err;
- off_t rc;
-
- SYSCALL (SYS_lseek, rc, err, fd, offset, whence);
- if (err)
- __errno_r (r) = err;
- return rc;
-}
-
-int
-_fstat_r (struct _reent *r, int fd, struct stat *buf)
-{
- int rc,err;
-
- SYSCALL (SYS_fstat, rc, err, fd, buf, 0);
- if (err)
- __errno_r (r) = err;
- return rc;
-}
-
-/* FIXME: Shouldn't this be _exit_r? */
-
-void
-_exit (int ret)
-{
- int rc,err;
-
- SYSCALL (SYS_exit, rc, err, ret, 0, 0);
-
- /* If that failed, use an infinite loop. */
- while (1)
- continue;
-}
-
-time_t
-_time (time_t *timer)
-{
- return 0;
-}
-
-int
-_creat_r (struct _reent *r, const char *path, int mode)
-{
- return _open_r (r, path, O_CREAT | O_TRUNC, mode);
-}
-
-int
-_getpid_r (struct _reent *r)
-{
- return 42;
-}
-
-int
-_kill_r (struct _reent *r, int pid, int sig)
-{
- int rc,err;
-
- SYSCALL (SYS_kill, rc, err, pid, sig, 0);
- if (err)
- __errno_r (r) = err;
- return rc;
-}
diff --git a/newlib/libc/sys/arm/Makefile.am b/newlib/libc/sys/arm/Makefile.am
index 0d519585c..3d8aa9d8b 100644
--- a/newlib/libc/sys/arm/Makefile.am
+++ b/newlib/libc/sys/arm/Makefile.am
@@ -2,7 +2,7 @@
AUTOMAKE_OPTIONS = cygnus
-INCLUDES = $(NEWLIB_CFLAGS) $(CROSS_CFLAGS) $(TARGET_CFLAGS)
+INCLUDES = $(NEWLIB_CFLAGS) $(CROSS_CFLAGS) $(TARGET_CFLAGS) -I$(newlib_basedir)/libc/machine/arm
AM_CCASFLAGS = $(INCLUDES)
diff --git a/newlib/libc/sys/arm/Makefile.in b/newlib/libc/sys/arm/Makefile.in
index ec3706b88..ba0f92b3a 100644
--- a/newlib/libc/sys/arm/Makefile.in
+++ b/newlib/libc/sys/arm/Makefile.in
@@ -193,7 +193,7 @@ top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
AUTOMAKE_OPTIONS = cygnus
-INCLUDES = $(NEWLIB_CFLAGS) $(CROSS_CFLAGS) $(TARGET_CFLAGS)
+INCLUDES = $(NEWLIB_CFLAGS) $(CROSS_CFLAGS) $(TARGET_CFLAGS) -I$(newlib_basedir)/libc/machine/arm
AM_CCASFLAGS = $(INCLUDES)
noinst_LIBRARIES = lib.a
@MAY_SUPPLY_SYSCALLS_FALSE@extra_objs =
diff --git a/newlib/libc/sys/arm/arm.h b/newlib/libc/sys/arm/arm.h
index 26a1ff110..0489f2d92 100644
--- a/newlib/libc/sys/arm/arm.h
+++ b/newlib/libc/sys/arm/arm.h
@@ -29,25 +29,27 @@
#ifndef _LIBGLOSS_ARM_H
#define _LIBGLOSS_ARM_H
-/* __thumb2__ stands for thumb on armva7(A/R/M/EM) architectures,
- __ARM_ARCH_6M__ stands for armv6-M(thumb only) architecture,
- __ARM_ARCH_7M__ stands for armv7-M(thumb only) architecture.
- __ARM_ARCH_7EM__ stands for armv7e-M(thumb only) architecture.
- There are some macro combinations used many times in libgloss/arm,
- like (__thumb2__ || (__thumb__ && __ARM_ARCH_6M__)), so factor
- it out and use THUMB_V7_V6M instead, which stands for thumb on
- v6-m/v7 arch as the combination does. */
-#if defined(__thumb2__) || (defined(__thumb__) && defined(__ARM_ARCH_6M__))
-# define THUMB_V7_V6M
+#include "acle-compat.h"
+
+/* Checking for targets supporting only Thumb instructions (eg. ARMv6-M) or
+ supporting Thumb-2 instructions, whether ARM instructions are available or
+ not, is done many times in libgloss/arm. So factor it out and use
+ PREFER_THUMB instead. */
+#if __thumb2__ || (__thumb__ && !__ARM_ARCH_ISA_ARM)
+# define PREFER_THUMB
+#endif
+
+/* Processor only capable of executing Thumb-1 instructions. */
+#if __ARM_ARCH_ISA_THUMB == 1 && !__ARM_ARCH_ISA_ARM
+# define THUMB1_ONLY
#endif
-/* The (__ARM_ARCH_7EM__ || __ARM_ARCH_7M__ || __ARM_ARCH_6M__) combination
- stands for cortex-M profile architectures, which don't support ARM state.
- Factor it out and use THUMB_V7M_V6M instead. */
-#if defined(__ARM_ARCH_7M__) \
- || defined(__ARM_ARCH_7EM__) \
- || defined(__ARM_ARCH_6M__)
-# define THUMB_V7M_V6M
+/* M profile architectures. This is a different set of architectures than
+ those not having ARM ISA because it does not contain ARMv7. This macro is
+ necessary to test which architectures use bkpt as semihosting interface from
+ architectures using svc. */
+#if !__ARM_ARCH_ISA_ARM && !__ARM_ARCH_7__
+# define THUMB_VXM
#endif
/* Defined if this target supports the BLX Rm instruction. */
diff --git a/newlib/libc/sys/arm/configure b/newlib/libc/sys/arm/configure
index 8bf7cd99d..b25ecf74a 100755
--- a/newlib/libc/sys/arm/configure
+++ b/newlib/libc/sys/arm/configure
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.68 for newlib 2.0.0.
+# Generated by GNU Autoconf 2.68 for newlib 2.4.0.
#
#
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
@@ -556,8 +556,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='newlib'
PACKAGE_TARNAME='newlib'
-PACKAGE_VERSION='2.0.0'
-PACKAGE_STRING='newlib 2.0.0'
+PACKAGE_VERSION='2.4.0'
+PACKAGE_STRING='newlib 2.4.0'
PACKAGE_BUGREPORT=''
PACKAGE_URL=''
@@ -1239,7 +1239,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures newlib 2.0.0 to adapt to many kinds of systems.
+\`configure' configures newlib 2.4.0 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1309,7 +1309,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of newlib 2.0.0:";;
+ short | recursive ) echo "Configuration of newlib 2.4.0:";;
esac
cat <<\_ACEOF
@@ -1400,7 +1400,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-newlib configure 2.0.0
+newlib configure 2.4.0
generated by GNU Autoconf 2.68
Copyright (C) 2010 Free Software Foundation, Inc.
@@ -1455,7 +1455,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by newlib $as_me 2.0.0, which was
+It was created by newlib $as_me 2.4.0, which was
generated by GNU Autoconf 2.68. Invocation command line was
$ $0 $@
@@ -2527,7 +2527,7 @@ fi
# Define the identity of the package.
PACKAGE='newlib'
- VERSION='2.0.0'
+ VERSION='2.4.0'
# Some tools Automake needs.
@@ -4007,7 +4007,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by newlib $as_me 2.0.0, which was
+This file was extended by newlib $as_me 2.4.0, which was
generated by GNU Autoconf 2.68. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -4064,7 +4064,7 @@ _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
-newlib config.status 2.0.0
+newlib config.status 2.4.0
configured by $0, generated by GNU Autoconf 2.68,
with options \\"\$ac_cs_config\\"
diff --git a/newlib/libc/sys/arm/crt0.S b/newlib/libc/sys/arm/crt0.S
index b56072fcb..64d425900 100644
--- a/newlib/libc/sys/arm/crt0.S
+++ b/newlib/libc/sys/arm/crt0.S
@@ -44,7 +44,7 @@
/* .text is used instead of .section .text so it works with arm-aout too. */
.text
.syntax unified
-#ifdef THUMB_V7_V6M
+#ifdef PREFER_THUMB
.thumb
.macro FUNC_START name
.global \name
@@ -99,7 +99,7 @@
/* Issue Angel SWI to read stack info. */
movs r0, #AngelSWI_Reason_HeapInfo
adr r1, .LC0 /* Point at ptr to 4 words to receive data. */
-#ifdef THUMB_V7M_V6M
+#ifdef THUMB_VXM
bkpt AngelSWI
#elif defined(__thumb2__)
/* We are in thumb mode for startup on armv7 architectures. */
@@ -176,7 +176,7 @@
have somehow missed it below (in which case it gets the same
value as FIQ - not ideal, but better than nothing). */
mov sp, r3
-#ifdef THUMB_V7_V6M
+#ifdef PREFER_THUMB
/* XXX Fill in stack assignments for interrupt modes. */
#else
mrs r2, CPSR
@@ -239,7 +239,7 @@
subs a3, a3, a1 /* Third arg: length of block. */
-#if defined(__thumb__) && !defined(THUMB_V7_V6M)
+#if __thumb__ && !defined(PREFER_THUMB)
/* Enter Thumb mode... */
add a4, pc, #1 /* Get the address of the Thumb block. */
bx a4 /* Go there and start Thumb decoding. */
@@ -278,7 +278,7 @@ __change_mode:
#else
movs r0, #AngelSWI_Reason_GetCmdLine
adr r1, .LC30 /* Space for command line. */
-#ifdef THUMB_V7M_V6M
+#ifdef THUMB_VXM
bkpt AngelSWI
#else
AngelSWIAsm AngelSWI
@@ -404,7 +404,7 @@ __change_mode:
bl FUNCTION (exit) /* Should not return. */
-#if defined(__thumb__) && !defined(THUMB_V7_V6M)
+#if __thumb__ && !defined(PREFER_THUMB)
/* Come out of Thumb mode. This code should be redundant. */
mov a4, pc
bx a4
diff --git a/newlib/libc/sys/arm/swi.h b/newlib/libc/sys/arm/swi.h
index 0f9313447..b7fa243f8 100644
--- a/newlib/libc/sys/arm/swi.h
+++ b/newlib/libc/sys/arm/swi.h
@@ -36,7 +36,7 @@
#define AngelSWI AngelSWI_ARM
#endif
/* For thumb only architectures use the BKPT instruction instead of SWI. */
-#ifdef THUMB_V7M_V6M
+#ifdef THUMB_VXM
#define AngelSWIInsn "bkpt"
#define AngelSWIAsm bkpt
#else
diff --git a/newlib/libc/sys/arm/sys/param.h b/newlib/libc/sys/arm/sys/param.h
index adc066e9a..5b9464cca 100644
--- a/newlib/libc/sys/arm/sys/param.h
+++ b/newlib/libc/sys/arm/sys/param.h
@@ -3,17 +3,23 @@
#ifndef _SYS_PARAM_H
# define _SYS_PARAM_H
-# define HZ (100)
-# define NOFILE (60)
-# define PATHSIZE (1024)
-
-#define BIG_ENDIAN 4321
-#define LITTLE_ENDIAN 1234
+#include <machine/param.h>
+#include <machine/endian.h>
-#ifdef __ARMEB__
-#define BYTE_ORDER BIG_ENDIAN
-#else
-#define BYTE_ORDER LITTLE_ENDIAN
+#ifndef NBBY
+# define NBBY 8 /* number of bits in a byte */
+#endif
+#ifndef HZ
+# define HZ (60)
+#endif
+#ifndef NOFILE
+# define NOFILE (60)
#endif
+#ifndef PATHSIZE
+# define PATHSIZE (1024)
+#endif
+
+#define MAX(a,b) ((a) > (b) ? (a) : (b))
+#define MIN(a,b) ((a) < (b) ? (a) : (b))
#endif
diff --git a/newlib/libc/sys/arm/syscalls.c b/newlib/libc/sys/arm/syscalls.c
index c5df5bb8a..04dde4558 100644
--- a/newlib/libc/sys/arm/syscalls.c
+++ b/newlib/libc/sys/arm/syscalls.c
@@ -202,7 +202,7 @@ _swiread (int file,
#endif
}
-int
+int __attribute__((weak))
_read (int file,
char * ptr,
int len)
@@ -307,7 +307,7 @@ _swiwrite (
#endif
}
-int
+int __attribute__((weak))
_write (int file,
char * ptr,
int len)
@@ -451,7 +451,7 @@ _getpid (int n)
n = n;
}
-caddr_t
+caddr_t __attribute__((weak))
_sbrk (int incr)
{
extern char end asm ("end"); /* Defined by the linker. */
diff --git a/newlib/libc/sys/configure b/newlib/libc/sys/configure
index 6661d1513..55c6e1326 100755
--- a/newlib/libc/sys/configure
+++ b/newlib/libc/sys/configure
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.68 for newlib 2.0.0.
+# Generated by GNU Autoconf 2.68 for newlib 2.4.0.
#
#
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
@@ -567,8 +567,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='newlib'
PACKAGE_TARNAME='newlib'
-PACKAGE_VERSION='2.0.0'
-PACKAGE_STRING='newlib 2.0.0'
+PACKAGE_VERSION='2.4.0'
+PACKAGE_STRING='newlib 2.4.0'
PACKAGE_BUGREPORT=''
PACKAGE_URL=''
@@ -786,7 +786,6 @@ LIBS
CPPFLAGS
CPP'
ac_subdirs_all='a29khif
-arc
arm
d10v
decstation
@@ -797,6 +796,8 @@ linux
m88kbug
mmixware
netware
+or1k
+phoenix
rdos
rtems
sh
@@ -808,6 +809,7 @@ sysnecv850
sysvi386
sysvnecv70
tic80
+tirtos
w65
z8ksim'
@@ -1351,7 +1353,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures newlib 2.0.0 to adapt to many kinds of systems.
+\`configure' configures newlib 2.4.0 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1421,7 +1423,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of newlib 2.0.0:";;
+ short | recursive ) echo "Configuration of newlib 2.4.0:";;
esac
cat <<\_ACEOF
@@ -1532,7 +1534,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-newlib configure 2.0.0
+newlib configure 2.4.0
generated by GNU Autoconf 2.68
Copyright (C) 2010 Free Software Foundation, Inc.
@@ -1810,7 +1812,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by newlib $as_me 2.0.0, which was
+It was created by newlib $as_me 2.4.0, which was
generated by GNU Autoconf 2.68. Invocation command line was
$ $0 $@
@@ -2882,7 +2884,7 @@ fi
# Define the identity of the package.
PACKAGE='newlib'
- VERSION='2.0.0'
+ VERSION='2.4.0'
# Some tools Automake needs.
@@ -6943,7 +6945,7 @@ ia64-*-hpux*)
rm -rf conftest*
;;
-x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \
+x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \
s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
# Find out which ABI we are using.
echo 'int i;' > conftest.$ac_ext
@@ -6968,7 +6970,10 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
;;
esac
;;
- ppc64-*linux*|powerpc64-*linux*)
+ powerpc64le-*linux*)
+ LD="${LD-ld} -m elf32lppclinux"
+ ;;
+ powerpc64-*linux*)
LD="${LD-ld} -m elf32ppclinux"
;;
s390x-*linux*)
@@ -6987,7 +6992,10 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
x86_64-*linux*)
LD="${LD-ld} -m elf_x86_64"
;;
- ppc*-*linux*|powerpc*-*linux*)
+ powerpcle-*linux*)
+ LD="${LD-ld} -m elf64lppc"
+ ;;
+ powerpc-*linux*)
LD="${LD-ld} -m elf64ppc"
;;
s390*-*linux*|s390*-*tpf*)
@@ -7669,7 +7677,7 @@ $as_echo "$lt_cv_ld_force_load" >&6; }
case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
10.0,*86*-darwin8*|10.0,*-darwin[91]*)
_lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
- 10.[012]*)
+ 10.[012][,.]*)
_lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
10.*)
_lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
@@ -9238,7 +9246,7 @@ _LT_EOF
if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
&& test "$tmp_diet" = no
then
- tmp_addflag=
+ tmp_addflag=' $pic_flag'
tmp_sharedflag='-shared'
case $cc_basename,$host_cpu in
pgcc*) # Portland Group C compiler
@@ -9420,7 +9428,7 @@ _LT_EOF
if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
else
- export_symbols_cmds='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
+ export_symbols_cmds='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "L")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
fi
aix_use_runtimelinking=no
@@ -11448,7 +11456,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 11451 "configure"
+#line 11458 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -11554,7 +11562,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 11557 "configure"
+#line 11564 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -11799,8 +11807,6 @@ if test -n "${sys_dir}"; then
subdirs="$subdirs a29khif"
;;
- arc) subdirs="$subdirs arc"
- ;;
arm) subdirs="$subdirs arm"
;;
d10v) subdirs="$subdirs d10v"
@@ -11821,6 +11827,10 @@ subdirs="$subdirs a29khif"
;;
netware) subdirs="$subdirs netware"
;;
+ or1k) subdirs="$subdirs or1k"
+ ;;
+ phoenix) subdirs="$subdirs phoenix"
+ ;;
rdos) subdirs="$subdirs rdos"
;;
rtems) subdirs="$subdirs rtems"
@@ -11843,6 +11853,8 @@ subdirs="$subdirs a29khif"
;;
tic80) subdirs="$subdirs tic80"
;;
+ tirtos) subdirs="$subdirs tirtos"
+ ;;
w65) subdirs="$subdirs w65"
;;
z8ksim) subdirs="$subdirs z8ksim"
@@ -12477,7 +12489,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by newlib $as_me 2.0.0, which was
+This file was extended by newlib $as_me 2.4.0, which was
generated by GNU Autoconf 2.68. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -12534,7 +12546,7 @@ _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
-newlib config.status 2.0.0
+newlib config.status 2.4.0
configured by $0, generated by GNU Autoconf 2.68,
with options \\"\$ac_cs_config\\"
diff --git a/newlib/libc/sys/configure.in b/newlib/libc/sys/configure.in
index c35565971..bc6cb881c 100644
--- a/newlib/libc/sys/configure.in
+++ b/newlib/libc/sys/configure.in
@@ -23,7 +23,6 @@ fi
if test -n "${sys_dir}"; then
case ${sys_dir} in
a29khif) AC_CONFIG_SUBDIRS(a29khif) ;;
- arc) AC_CONFIG_SUBDIRS(arc) ;;
arm) AC_CONFIG_SUBDIRS(arm) ;;
d10v) AC_CONFIG_SUBDIRS(d10v) ;;
decstation) AC_CONFIG_SUBDIRS(decstation) ;;
@@ -34,6 +33,8 @@ if test -n "${sys_dir}"; then
m88kbug) AC_CONFIG_SUBDIRS(m88kbug) ;;
mmixware) AC_CONFIG_SUBDIRS(mmixware) ;;
netware) AC_CONFIG_SUBDIRS(netware) ;;
+ or1k) AC_CONFIG_SUBDIRS(or1k) ;;
+ phoenix) AC_CONFIG_SUBDIRS(phoenix) ;;
rdos) AC_CONFIG_SUBDIRS(rdos) ;;
rtems) AC_CONFIG_SUBDIRS(rtems) ;;
sh) AC_CONFIG_SUBDIRS(sh) ;;
@@ -45,6 +46,7 @@ if test -n "${sys_dir}"; then
sysvi386) AC_CONFIG_SUBDIRS(sysvi386) ;;
sysvnecv70) AC_CONFIG_SUBDIRS(sysvnecv70) ;;
tic80) AC_CONFIG_SUBDIRS(tic80) ;;
+ tirtos) AC_CONFIG_SUBDIRS(tirtos) ;;
w65) AC_CONFIG_SUBDIRS(w65) ;;
z8ksim) AC_CONFIG_SUBDIRS(z8ksim) ;;
esac;
diff --git a/newlib/libc/sys/d10v/configure b/newlib/libc/sys/d10v/configure
index 37c583d42..90105dfb8 100755
--- a/newlib/libc/sys/d10v/configure
+++ b/newlib/libc/sys/d10v/configure
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.68 for newlib 2.0.0.
+# Generated by GNU Autoconf 2.68 for newlib 2.4.0.
#
#
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
@@ -556,8 +556,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='newlib'
PACKAGE_TARNAME='newlib'
-PACKAGE_VERSION='2.0.0'
-PACKAGE_STRING='newlib 2.0.0'
+PACKAGE_VERSION='2.4.0'
+PACKAGE_STRING='newlib 2.4.0'
PACKAGE_BUGREPORT=''
PACKAGE_URL=''
@@ -1239,7 +1239,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures newlib 2.0.0 to adapt to many kinds of systems.
+\`configure' configures newlib 2.4.0 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1309,7 +1309,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of newlib 2.0.0:";;
+ short | recursive ) echo "Configuration of newlib 2.4.0:";;
esac
cat <<\_ACEOF
@@ -1400,7 +1400,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-newlib configure 2.0.0
+newlib configure 2.4.0
generated by GNU Autoconf 2.68
Copyright (C) 2010 Free Software Foundation, Inc.
@@ -1455,7 +1455,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by newlib $as_me 2.0.0, which was
+It was created by newlib $as_me 2.4.0, which was
generated by GNU Autoconf 2.68. Invocation command line was
$ $0 $@
@@ -2527,7 +2527,7 @@ fi
# Define the identity of the package.
PACKAGE='newlib'
- VERSION='2.0.0'
+ VERSION='2.4.0'
# Some tools Automake needs.
@@ -4007,7 +4007,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by newlib $as_me 2.0.0, which was
+This file was extended by newlib $as_me 2.4.0, which was
generated by GNU Autoconf 2.68. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -4064,7 +4064,7 @@ _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
-newlib config.status 2.0.0
+newlib config.status 2.4.0
configured by $0, generated by GNU Autoconf 2.68,
with options \\"\$ac_cs_config\\"
diff --git a/newlib/libc/sys/decstation/configure b/newlib/libc/sys/decstation/configure
index 15a94784c..a9a8bdf5a 100755
--- a/newlib/libc/sys/decstation/configure
+++ b/newlib/libc/sys/decstation/configure
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.68 for newlib 2.0.0.
+# Generated by GNU Autoconf 2.68 for newlib 2.4.0.
#
#
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
@@ -556,8 +556,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='newlib'
PACKAGE_TARNAME='newlib'
-PACKAGE_VERSION='2.0.0'
-PACKAGE_STRING='newlib 2.0.0'
+PACKAGE_VERSION='2.4.0'
+PACKAGE_STRING='newlib 2.4.0'
PACKAGE_BUGREPORT=''
PACKAGE_URL=''
@@ -1239,7 +1239,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures newlib 2.0.0 to adapt to many kinds of systems.
+\`configure' configures newlib 2.4.0 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1309,7 +1309,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of newlib 2.0.0:";;
+ short | recursive ) echo "Configuration of newlib 2.4.0:";;
esac
cat <<\_ACEOF
@@ -1400,7 +1400,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-newlib configure 2.0.0
+newlib configure 2.4.0
generated by GNU Autoconf 2.68
Copyright (C) 2010 Free Software Foundation, Inc.
@@ -1455,7 +1455,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by newlib $as_me 2.0.0, which was
+It was created by newlib $as_me 2.4.0, which was
generated by GNU Autoconf 2.68. Invocation command line was
$ $0 $@
@@ -2527,7 +2527,7 @@ fi
# Define the identity of the package.
PACKAGE='newlib'
- VERSION='2.0.0'
+ VERSION='2.4.0'
# Some tools Automake needs.
@@ -4007,7 +4007,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by newlib $as_me 2.0.0, which was
+This file was extended by newlib $as_me 2.4.0, which was
generated by GNU Autoconf 2.68. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -4064,7 +4064,7 @@ _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
-newlib config.status 2.0.0
+newlib config.status 2.4.0
configured by $0, generated by GNU Autoconf 2.68,
with options \\"\$ac_cs_config\\"
diff --git a/newlib/libc/sys/decstation/sys/dirent.h b/newlib/libc/sys/decstation/sys/dirent.h
index c5a90e9fe..c3abda639 100644
--- a/newlib/libc/sys/decstation/sys/dirent.h
+++ b/newlib/libc/sys/decstation/sys/dirent.h
@@ -25,6 +25,8 @@ typedef struct __dirdesc {
DIR *opendir (const char *);
struct dirent *readdir (DIR *);
+int readdir_r (DIR *__restrict, struct dirent *__restrict,
+ struct dirent **__restrict);
void rewinddir (DIR *);
int closedir (DIR *);
diff --git a/newlib/libc/sys/epiphany/configure b/newlib/libc/sys/epiphany/configure
index 8d6b2ca37..4413bb210 100755
--- a/newlib/libc/sys/epiphany/configure
+++ b/newlib/libc/sys/epiphany/configure
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.68 for newlib 2.0.0.
+# Generated by GNU Autoconf 2.68 for newlib 2.4.0.
#
#
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
@@ -556,8 +556,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='newlib'
PACKAGE_TARNAME='newlib'
-PACKAGE_VERSION='2.0.0'
-PACKAGE_STRING='newlib 2.0.0'
+PACKAGE_VERSION='2.4.0'
+PACKAGE_STRING='newlib 2.4.0'
PACKAGE_BUGREPORT=''
PACKAGE_URL=''
@@ -1239,7 +1239,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures newlib 2.0.0 to adapt to many kinds of systems.
+\`configure' configures newlib 2.4.0 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1309,7 +1309,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of newlib 2.0.0:";;
+ short | recursive ) echo "Configuration of newlib 2.4.0:";;
esac
cat <<\_ACEOF
@@ -1400,7 +1400,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-newlib configure 2.0.0
+newlib configure 2.4.0
generated by GNU Autoconf 2.68
Copyright (C) 2010 Free Software Foundation, Inc.
@@ -1455,7 +1455,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by newlib $as_me 2.0.0, which was
+It was created by newlib $as_me 2.4.0, which was
generated by GNU Autoconf 2.68. Invocation command line was
$ $0 $@
@@ -2527,7 +2527,7 @@ fi
# Define the identity of the package.
PACKAGE='newlib'
- VERSION='2.0.0'
+ VERSION='2.4.0'
# Some tools Automake needs.
@@ -4007,7 +4007,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by newlib $as_me 2.0.0, which was
+This file was extended by newlib $as_me 2.4.0, which was
generated by GNU Autoconf 2.68. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -4064,7 +4064,7 @@ _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
-newlib config.status 2.0.0
+newlib config.status 2.4.0
configured by $0, generated by GNU Autoconf 2.68,
with options \\"\$ac_cs_config\\"
diff --git a/newlib/libc/sys/h8300hms/configure b/newlib/libc/sys/h8300hms/configure
index 31a481919..56e757e0e 100755
--- a/newlib/libc/sys/h8300hms/configure
+++ b/newlib/libc/sys/h8300hms/configure
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.68 for newlib 2.0.0.
+# Generated by GNU Autoconf 2.68 for newlib 2.4.0.
#
#
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
@@ -556,8 +556,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='newlib'
PACKAGE_TARNAME='newlib'
-PACKAGE_VERSION='2.0.0'
-PACKAGE_STRING='newlib 2.0.0'
+PACKAGE_VERSION='2.4.0'
+PACKAGE_STRING='newlib 2.4.0'
PACKAGE_BUGREPORT=''
PACKAGE_URL=''
@@ -1239,7 +1239,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures newlib 2.0.0 to adapt to many kinds of systems.
+\`configure' configures newlib 2.4.0 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1309,7 +1309,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of newlib 2.0.0:";;
+ short | recursive ) echo "Configuration of newlib 2.4.0:";;
esac
cat <<\_ACEOF
@@ -1400,7 +1400,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-newlib configure 2.0.0
+newlib configure 2.4.0
generated by GNU Autoconf 2.68
Copyright (C) 2010 Free Software Foundation, Inc.
@@ -1455,7 +1455,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by newlib $as_me 2.0.0, which was
+It was created by newlib $as_me 2.4.0, which was
generated by GNU Autoconf 2.68. Invocation command line was
$ $0 $@
@@ -2527,7 +2527,7 @@ fi
# Define the identity of the package.
PACKAGE='newlib'
- VERSION='2.0.0'
+ VERSION='2.4.0'
# Some tools Automake needs.
@@ -4007,7 +4007,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by newlib $as_me 2.0.0, which was
+This file was extended by newlib $as_me 2.4.0, which was
generated by GNU Autoconf 2.68. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -4064,7 +4064,7 @@ _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
-newlib config.status 2.0.0
+newlib config.status 2.4.0
configured by $0, generated by GNU Autoconf 2.68,
with options \\"\$ac_cs_config\\"
diff --git a/newlib/libc/sys/h8500hms/configure b/newlib/libc/sys/h8500hms/configure
index c37bef7bb..2848aa69e 100755
--- a/newlib/libc/sys/h8500hms/configure
+++ b/newlib/libc/sys/h8500hms/configure
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.68 for newlib 2.0.0.
+# Generated by GNU Autoconf 2.68 for newlib 2.4.0.
#
#
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
@@ -556,8 +556,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='newlib'
PACKAGE_TARNAME='newlib'
-PACKAGE_VERSION='2.0.0'
-PACKAGE_STRING='newlib 2.0.0'
+PACKAGE_VERSION='2.4.0'
+PACKAGE_STRING='newlib 2.4.0'
PACKAGE_BUGREPORT=''
PACKAGE_URL=''
@@ -1239,7 +1239,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures newlib 2.0.0 to adapt to many kinds of systems.
+\`configure' configures newlib 2.4.0 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1309,7 +1309,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of newlib 2.0.0:";;
+ short | recursive ) echo "Configuration of newlib 2.4.0:";;
esac
cat <<\_ACEOF
@@ -1400,7 +1400,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-newlib configure 2.0.0
+newlib configure 2.4.0
generated by GNU Autoconf 2.68
Copyright (C) 2010 Free Software Foundation, Inc.
@@ -1455,7 +1455,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by newlib $as_me 2.0.0, which was
+It was created by newlib $as_me 2.4.0, which was
generated by GNU Autoconf 2.68. Invocation command line was
$ $0 $@
@@ -2527,7 +2527,7 @@ fi
# Define the identity of the package.
PACKAGE='newlib'
- VERSION='2.0.0'
+ VERSION='2.4.0'
# Some tools Automake needs.
@@ -4007,7 +4007,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by newlib $as_me 2.0.0, which was
+This file was extended by newlib $as_me 2.4.0, which was
generated by GNU Autoconf 2.68. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -4064,7 +4064,7 @@ _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
-newlib config.status 2.0.0
+newlib config.status 2.4.0
configured by $0, generated by GNU Autoconf 2.68,
with options \\"\$ac_cs_config\\"
diff --git a/newlib/libc/sys/linux/argp/Makefile.in b/newlib/libc/sys/linux/argp/Makefile.in
index 8249d703c..518c84ebf 100644
--- a/newlib/libc/sys/linux/argp/Makefile.in
+++ b/newlib/libc/sys/linux/argp/Makefile.in
@@ -254,10 +254,17 @@ libargp_la_LDFLAGS = -Xcompiler -nostdlib
@USE_LIBTOOL_FALSE@noinst_LIBRARIES = lib.a
@USE_LIBTOOL_FALSE@lib_a_SOURCES = $(LIB_SOURCES)
@USE_LIBTOOL_FALSE@lib_a_CFLAGS = $(AM_CFLAGS)
+
+#
+# documentation rules
+#
+SUFFIXES = .def
+CHEW = ${top_builddir}/../doc/makedoc -f $(top_srcdir)/../doc/doc.str
+CLEANFILES = $(CHEWOUT_FILES) *.ref
all: all-am
.SUFFIXES:
-.SUFFIXES: .c .lo .o .obj
+.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 \
@@ -460,6 +467,7 @@ install-strip:
mostlyclean-generic:
clean-generic:
+ -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
distclean-generic:
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
@@ -560,6 +568,18 @@ objectlist.awk.in: $(noinst_LTLIBRARIES)
echo $$i `pwd`/$$i >> objectlist.awk.in ; \
done
+.c.def:
+ $(CHEW) < $< > $*.def 2> $*.ref
+ touch stmp-def
+
+TARGETDOC ?= ../tmp.texi
+
+doc: $(CHEWOUT_FILES)
+ for chapter in $(CHAPTERS) ; \
+ do \
+ cat $(srcdir)/$$chapter >> $(TARGETDOC) ; \
+ done
+
# 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/sys/linux/cmath/Makefile.in b/newlib/libc/sys/linux/cmath/Makefile.in
index 754f29206..5347e5f49 100644
--- a/newlib/libc/sys/linux/cmath/Makefile.in
+++ b/newlib/libc/sys/linux/cmath/Makefile.in
@@ -277,10 +277,17 @@ libcmath_la_LDFLAGS = -Xcompiler -nostdlib
@USE_LIBTOOL_FALSE@noinst_LIBRARIES = lib.a
@USE_LIBTOOL_FALSE@lib_a_SOURCES = $(LIB_SOURCES)
@USE_LIBTOOL_FALSE@lib_a_CFLAGS = $(AM_CFLAGS)
+
+#
+# documentation rules
+#
+SUFFIXES = .def
+CHEW = ${top_builddir}/../doc/makedoc -f $(top_srcdir)/../doc/doc.str
+CLEANFILES = $(CHEWOUT_FILES) *.ref
all: all-am
.SUFFIXES:
-.SUFFIXES: .c .lo .o .obj
+.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 \
@@ -645,6 +652,7 @@ install-strip:
mostlyclean-generic:
clean-generic:
+ -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
distclean-generic:
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
@@ -745,6 +753,18 @@ objectlist.awk.in: $(noinst_LTLIBRARIES)
echo $$i `pwd`/$$i >> objectlist.awk.in ; \
done
+.c.def:
+ $(CHEW) < $< > $*.def 2> $*.ref
+ touch stmp-def
+
+TARGETDOC ?= ../tmp.texi
+
+doc: $(CHEWOUT_FILES)
+ for chapter in $(CHAPTERS) ; \
+ do \
+ cat $(srcdir)/$$chapter >> $(TARGETDOC) ; \
+ done
+
# 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/sys/linux/configure b/newlib/libc/sys/linux/configure
index 0f644630c..86b6ab481 100755
--- a/newlib/libc/sys/linux/configure
+++ b/newlib/libc/sys/linux/configure
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.68 for newlib 2.0.0.
+# Generated by GNU Autoconf 2.68 for newlib 2.4.0.
#
#
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
@@ -567,8 +567,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='newlib'
PACKAGE_TARNAME='newlib'
-PACKAGE_VERSION='2.0.0'
-PACKAGE_STRING='newlib 2.0.0'
+PACKAGE_VERSION='2.4.0'
+PACKAGE_STRING='newlib 2.4.0'
PACKAGE_BUGREPORT=''
PACKAGE_URL=''
@@ -1328,7 +1328,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures newlib 2.0.0 to adapt to many kinds of systems.
+\`configure' configures newlib 2.4.0 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1398,7 +1398,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of newlib 2.0.0:";;
+ short | recursive ) echo "Configuration of newlib 2.4.0:";;
esac
cat <<\_ACEOF
@@ -1509,7 +1509,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-newlib configure 2.0.0
+newlib configure 2.4.0
generated by GNU Autoconf 2.68
Copyright (C) 2010 Free Software Foundation, Inc.
@@ -1787,7 +1787,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by newlib $as_me 2.0.0, which was
+It was created by newlib $as_me 2.4.0, which was
generated by GNU Autoconf 2.68. Invocation command line was
$ $0 $@
@@ -2859,7 +2859,7 @@ fi
# Define the identity of the package.
PACKAGE='newlib'
- VERSION='2.0.0'
+ VERSION='2.4.0'
# Some tools Automake needs.
@@ -6962,7 +6962,7 @@ ia64-*-hpux*)
rm -rf conftest*
;;
-x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \
+x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \
s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
# Find out which ABI we are using.
echo 'int i;' > conftest.$ac_ext
@@ -6987,7 +6987,10 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
;;
esac
;;
- ppc64-*linux*|powerpc64-*linux*)
+ powerpc64le-*linux*)
+ LD="${LD-ld} -m elf32lppclinux"
+ ;;
+ powerpc64-*linux*)
LD="${LD-ld} -m elf32ppclinux"
;;
s390x-*linux*)
@@ -7006,7 +7009,10 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
x86_64-*linux*)
LD="${LD-ld} -m elf_x86_64"
;;
- ppc*-*linux*|powerpc*-*linux*)
+ powerpcle-*linux*)
+ LD="${LD-ld} -m elf64lppc"
+ ;;
+ powerpc-*linux*)
LD="${LD-ld} -m elf64ppc"
;;
s390*-*linux*|s390*-*tpf*)
@@ -7688,7 +7694,7 @@ $as_echo "$lt_cv_ld_force_load" >&6; }
case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
10.0,*86*-darwin8*|10.0,*-darwin[91]*)
_lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
- 10.[012]*)
+ 10.[012][,.]*)
_lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
10.*)
_lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
@@ -9257,7 +9263,7 @@ _LT_EOF
if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
&& test "$tmp_diet" = no
then
- tmp_addflag=
+ tmp_addflag=' $pic_flag'
tmp_sharedflag='-shared'
case $cc_basename,$host_cpu in
pgcc*) # Portland Group C compiler
@@ -9439,7 +9445,7 @@ _LT_EOF
if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
else
- export_symbols_cmds='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
+ export_symbols_cmds='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "L")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
fi
aix_use_runtimelinking=no
@@ -11467,7 +11473,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 11470 "configure"
+#line 11476 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -11573,7 +11579,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 11576 "configure"
+#line 11582 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -12453,7 +12459,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by newlib $as_me 2.0.0, which was
+This file was extended by newlib $as_me 2.4.0, which was
generated by GNU Autoconf 2.68. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -12510,7 +12516,7 @@ _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
-newlib config.status 2.0.0
+newlib config.status 2.4.0
configured by $0, generated by GNU Autoconf 2.68,
with options \\"\$ac_cs_config\\"
diff --git a/newlib/libc/sys/linux/dl/Makefile.in b/newlib/libc/sys/linux/dl/Makefile.in
index 1bd00b965..de44f50f6 100644
--- a/newlib/libc/sys/linux/dl/Makefile.in
+++ b/newlib/libc/sys/linux/dl/Makefile.in
@@ -264,10 +264,17 @@ libdl_la_LDFLAGS = -Xcompiler -nostdlib
@USE_LIBTOOL_FALSE@noinst_LIBRARIES = lib.a
@USE_LIBTOOL_FALSE@lib_a_SOURCES = $(LIB_SOURCES)
@USE_LIBTOOL_FALSE@lib_a_CFLAGS = $(AM_CFLAGS)
+
+#
+# documentation rules
+#
+SUFFIXES = .def
+CHEW = ${top_builddir}/../doc/makedoc -f $(top_srcdir)/../doc/doc.str
+CLEANFILES = $(CHEWOUT_FILES) *.ref
all: all-am
.SUFFIXES:
-.SUFFIXES: .c .lo .o .obj
+.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 \
@@ -548,6 +555,7 @@ install-strip:
mostlyclean-generic:
clean-generic:
+ -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
distclean-generic:
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
@@ -648,6 +656,18 @@ objectlist.awk.in: $(noinst_LTLIBRARIES)
echo $$i `pwd`/$$i >> objectlist.awk.in ; \
done
+.c.def:
+ $(CHEW) < $< > $*.def 2> $*.ref
+ touch stmp-def
+
+TARGETDOC ?= ../tmp.texi
+
+doc: $(CHEWOUT_FILES)
+ for chapter in $(CHAPTERS) ; \
+ do \
+ cat $(srcdir)/$$chapter >> $(TARGETDOC) ; \
+ done
+
# 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/sys/linux/dl/atomicity.h b/newlib/libc/sys/linux/dl/atomicity.h
index 3dbd00689..2ff7e5270 100644
--- a/newlib/libc/sys/linux/dl/atomicity.h
+++ b/newlib/libc/sys/linux/dl/atomicity.h
@@ -23,7 +23,7 @@
static inline uint32_t
-__attribute__ ((unused))
+__attribute__ ((__unused__))
exchange_and_add (volatile uint32_t *mem, uint32_t val)
{
register uint32_t result;
@@ -33,7 +33,7 @@ exchange_and_add (volatile uint32_t *mem, uint32_t val)
}
static inline void
-__attribute__ ((unused))
+__attribute__ ((__unused__))
atomic_add (volatile uint32_t *mem, int val)
{
__asm__ __volatile__ ("lock; addl %1,%0"
@@ -41,7 +41,7 @@ atomic_add (volatile uint32_t *mem, int val)
}
static inline char
-__attribute__ ((unused))
+__attribute__ ((__unused__))
compare_and_swap (volatile long int *p, long int oldval, long int newval)
{
char ret;
diff --git a/newlib/libc/sys/linux/dl/dynamic-link.h b/newlib/libc/sys/linux/dl/dynamic-link.h
index c1709f7c6..4445bca48 100644
--- a/newlib/libc/sys/linux/dl/dynamic-link.h
+++ b/newlib/libc/sys/linux/dl/dynamic-link.h
@@ -31,12 +31,12 @@
/* Global read-only variable defined in rtld.c which is nonzero if we
shall give more warning messages. */
-extern int _dl_verbose __attribute__ ((unused));
+extern int _dl_verbose __attribute__ ((__unused__));
/* Read the dynamic section at DYN and fill in INFO with indices DT_*. */
-static void __attribute__ ((unused))
+static void __attribute__ ((__unused__))
elf_get_dynamic_info (struct link_map *l)
{
ElfW(Dyn) *dyn = l->l_ld;
diff --git a/newlib/libc/sys/linux/dl/ldsodefs.h b/newlib/libc/sys/linux/dl/ldsodefs.h
index e6f57ddcf..8cf487ad9 100644
--- a/newlib/libc/sys/linux/dl/ldsodefs.h
+++ b/newlib/libc/sys/linux/dl/ldsodefs.h
@@ -162,7 +162,7 @@ struct libname_list
/* Test whether given NAME matches any of the names of the given object. */
static __inline int
-__attribute__ ((unused))
+__attribute__ ((__unused__))
_dl_name_match_p (const char *__name, struct link_map *__map)
{
int __found = strcmp (__name, __map->l_name) == 0;
diff --git a/newlib/libc/sys/linux/iconv/Makefile.in b/newlib/libc/sys/linux/iconv/Makefile.in
index 477d47d2f..e41ce598b 100644
--- a/newlib/libc/sys/linux/iconv/Makefile.in
+++ b/newlib/libc/sys/linux/iconv/Makefile.in
@@ -264,10 +264,17 @@ libiconv_la_LDFLAGS = -Xcompiler -nostdlib
@USE_LIBTOOL_FALSE@noinst_LIBRARIES = lib.a
@USE_LIBTOOL_FALSE@lib_a_SOURCES = $(LIB_SOURCES)
@USE_LIBTOOL_FALSE@lib_a_CFLAGS = $(AM_CFLAGS)
+
+#
+# documentation rules
+#
+SUFFIXES = .def
+CHEW = ${top_builddir}/../doc/makedoc -f $(top_srcdir)/../doc/doc.str
+CLEANFILES = $(CHEWOUT_FILES) *.ref
all: all-am
.SUFFIXES:
-.SUFFIXES: .c .lo .o .obj
+.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 \
@@ -533,6 +540,7 @@ install-strip:
mostlyclean-generic:
clean-generic:
+ -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
distclean-generic:
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
@@ -633,6 +641,18 @@ objectlist.awk.in: $(noinst_LTLIBRARIES)
echo $$i `pwd`/$$i >> objectlist.awk.in ; \
done
+.c.def:
+ $(CHEW) < $< > $*.def 2> $*.ref
+ touch stmp-def
+
+TARGETDOC ?= ../tmp.texi
+
+doc: $(CHEWOUT_FILES)
+ for chapter in $(CHAPTERS) ; \
+ do \
+ cat $(srcdir)/$$chapter >> $(TARGETDOC) ; \
+ done
+
# 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/sys/linux/iconv/gconv_charset.h b/newlib/libc/sys/linux/iconv/gconv_charset.h
index 706669825..9b3ea0570 100644
--- a/newlib/libc/sys/linux/iconv/gconv_charset.h
+++ b/newlib/libc/sys/linux/iconv/gconv_charset.h
@@ -53,7 +53,7 @@ strip (char *wp, const char *s)
}
-static char * __attribute__ ((unused))
+static char * __attribute__ ((__unused__))
upstr (char *dst, const char *str)
{
char *cp = dst;
diff --git a/newlib/libc/sys/linux/iconv/iconv.c b/newlib/libc/sys/linux/iconv/iconv.c
index d0f5528f5..65c6cfc4e 100644
--- a/newlib/libc/sys/linux/iconv/iconv.c
+++ b/newlib/libc/sys/linux/iconv/iconv.c
@@ -29,8 +29,10 @@
size_t
-iconv (iconv_t cd, char **inbuf, size_t *inbytesleft, char **outbuf,
- size_t *outbytesleft)
+iconv (iconv_t cd, char **__restrict inbuf,
+ size_t *__restrict inbytesleft,
+ char **__restrict outbuf,
+ size_t *__restrict outbytesleft)
{
__gconv_t gcd = (__gconv_t) cd;
char *outstart = outbuf ? *outbuf : NULL;
diff --git a/newlib/libc/sys/linux/include/resolv.h b/newlib/libc/sys/linux/include/resolv.h
index 35db205d9..ef0cfefdb 100644
--- a/newlib/libc/sys/linux/include/resolv.h
+++ b/newlib/libc/sys/linux/include/resolv.h
@@ -150,7 +150,7 @@ struct __res_state {
u_int16_t nsinit;
struct sockaddr_in6 *nsaddrs[MAXNS];
unsigned long long int initstamp
- __attribute__((packed));
+ __attribute__((__packed__));
#if 0
unsigned int _initstamp[2];
#endif
diff --git a/newlib/libc/sys/linux/intl/Makefile.in b/newlib/libc/sys/linux/intl/Makefile.in
index 289a335b5..0d425d93b 100644
--- a/newlib/libc/sys/linux/intl/Makefile.in
+++ b/newlib/libc/sys/linux/intl/Makefile.in
@@ -263,6 +263,13 @@ msgcatdir = /usr/share/locale
@USE_LIBTOOL_FALSE@noinst_LIBRARIES = lib.a
@USE_LIBTOOL_FALSE@lib_a_SOURCES = $(LIB_SOURCES)
@USE_LIBTOOL_FALSE@lib_a_CFLAGS = $(AM_CFLAGS)
+
+#
+# documentation rules
+#
+SUFFIXES = .def
+CHEW = ${top_builddir}/../doc/makedoc -f $(top_srcdir)/../doc/doc.str
+CLEANFILES = $(CHEWOUT_FILES) *.ref
AM_CFLAGS = -DNOT_IN_libc -DHAVE_CONFIG_H -D_GNU_SOURCE -D__libc_enable_secure=1 -D'LOCALEDIR="$(msgcatdir)"' -D'LOCALE_ALIAS_PATH="$(msgcatdir)"' -DNLSPATH='"$(msgcatdir)/%L/%N:$(msgcatdir)/%L/LC_MESSAGES/%N:$(msgcatdir)/%l/%N:$(msgcatdir)/%l/LC_MESSAGES/%N:"'
# shouldn't have to do the following, but if needed
@@ -270,7 +277,7 @@ BISONFLAGS = --yacc --name-prefix=__gettext --output
all: all-am
.SUFFIXES:
-.SUFFIXES: .c .lo .o .obj
+.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 \
@@ -527,6 +534,7 @@ install-strip:
mostlyclean-generic:
clean-generic:
+ -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
distclean-generic:
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
@@ -626,6 +634,18 @@ objectlist.awk.in: $(noinst_LTLIBRARIES)
do \
echo $$i `pwd`/$$i >> objectlist.awk.in ; \
done
+
+.c.def:
+ $(CHEW) < $< > $*.def 2> $*.ref
+ touch stmp-def
+
+TARGETDOC ?= ../tmp.texi
+
+doc: $(CHEWOUT_FILES)
+ for chapter in $(CHAPTERS) ; \
+ do \
+ cat $(srcdir)/$$chapter >> $(TARGETDOC) ; \
+ done
plural.c: plural.y
$(BISON) $(BISONFLAGS) $@ $^
diff --git a/newlib/libc/sys/linux/libc-symbols.h b/newlib/libc/sys/linux/libc-symbols.h
index f32260c95..8130010a4 100644
--- a/newlib/libc/sys/linux/libc-symbols.h
+++ b/newlib/libc/sys/linux/libc-symbols.h
@@ -91,12 +91,12 @@
/* Define ALIASNAME as a strong alias for NAME. */
# define strong_alias(name, aliasname) _strong_alias(name, aliasname)
# define _strong_alias(name, aliasname) \
- extern __typeof (name) aliasname __attribute__ ((alias (#name)));
+ extern __typeof (name) aliasname __attribute__ ((__alias__ (#name)));
/* This comes between the return type and function name in
a function definition to make that definition weak. */
-# define weak_function __attribute__ ((weak))
-# define weak_const_function __attribute__ ((weak, __const__))
+# define weak_function __attribute__ ((__weak__))
+# define weak_const_function __attribute__ ((__weak__, __const__))
# ifdef HAVE_WEAK_SYMBOLS
@@ -104,7 +104,7 @@
If weak aliases are not available, this defines a strong alias. */
# define weak_alias(name, aliasname) _weak_alias (name, aliasname)
# define _weak_alias(name, aliasname) \
- extern __typeof (name) aliasname __attribute__ ((weak, alias (#name)));
+ extern __typeof (name) aliasname __attribute__ ((__weak__, __alias__ (#name)));
/* Declare SYMBOL as weak undefined symbol (resolved to 0 if not defined). */
# define weak_extern(symbol) _weak_extern (symbol)
@@ -213,12 +213,12 @@
# define link_warning(symbol, msg) \
__make_section_unallocated (".gnu.warning." #symbol) \
static const char __evoke_link_warning_##symbol[] \
- __attribute__ ((section (".gnu.warning." #symbol "\"\n\t#\""))) = msg;
+ __attribute__ ((__section__ (".gnu.warning." #symbol "\"\n\t#\""))) = msg;
# else
# define link_warning(symbol, msg) \
__make_section_unallocated (".gnu.warning." #symbol) \
static const char __evoke_link_warning_##symbol[] \
- __attribute__ ((section (".gnu.warning." #symbol "\n\t#"))) = msg;
+ __attribute__ ((__section__ (".gnu.warning." #symbol "\n\t#"))) = msg;
# endif
# else /* Not ELF: a.out */
# ifdef HAVE_XCOFF
@@ -267,11 +267,11 @@
because it will need to be relocated at run time anyway. */
# define _elf_set_element(set, symbol) \
static const void *__elf_set_##set##_element_##symbol##__ \
- __attribute__ ((unused, section (#set))) = &(symbol)
+ __attribute__ ((__unused__, __section__ (#set))) = &(symbol)
# else
# define _elf_set_element(set, symbol) \
static const void *const __elf_set_##set##_element_##symbol##__ \
- __attribute__ ((unused, section (#set))) = &(symbol)
+ __attribute__ ((__unused__, __section__ (#set))) = &(symbol)
# endif
/* Define SET as a symbol set. This may be required (it is in a.out) to
@@ -367,9 +367,9 @@
special section. */
#ifndef __ASSEMBLER__
# define attribute_compat_text_section \
- __attribute__ ((section (".text.compat")))
+ __attribute__ ((__section__ (".text.compat")))
# define attribute_compat_data_section \
- __attribute__ ((section (".data.compat")))
+ __attribute__ ((__section__ (".data.compat")))
#else
# define compat_text_section .section ".text.compat", "ax";
# define compat_data_section .section ".data.compat", "aw";
diff --git a/newlib/libc/sys/linux/linuxthreads/Makefile.in b/newlib/libc/sys/linux/linuxthreads/Makefile.in
index dd15d3dea..1acd71d0b 100644
--- a/newlib/libc/sys/linux/linuxthreads/Makefile.in
+++ b/newlib/libc/sys/linux/linuxthreads/Makefile.in
@@ -442,6 +442,13 @@ libthread_db_la_LDFLAGS = -version-info $(LIBTOOL_VERSION_INFO) -release newlib
@USE_LIBTOOL_FALSE@libpthread_a_DEPENDENCIES = $(LIBADD_OBJS) $(MACHINE_LIB)
@USE_LIBTOOL_FALSE@libthread_db_a_SOURCES = $(LIB_DB_SOURCES)
@USE_LIBTOOL_FALSE@libthread_db_a_CFLAGS = $(AM_CFLAGS)
+
+#
+# documentation rules
+#
+SUFFIXES = .def
+CHEW = ${top_builddir}/../doc/makedoc -f $(top_srcdir)/../doc/doc.str
+CLEANFILES = $(CHEWOUT_FILES) *.ref
AM_CFLAGS = -D_XOPEN_SOURCE=600 -D_GNU_SOURCE=1
ACLOCAL_AMFLAGS = -I ../../../.. -I ../../../../..
CONFIG_STATUS_DEPENDENCIES = $(newlib_basedir)/configure.host
@@ -452,7 +459,7 @@ CFLAGS_pthread = -D__NO_WEAK_PTHREAD_ALIASES -DHAVE_Z_NODELETE
all: all-recursive
.SUFFIXES:
-.SUFFIXES: .c .lo .o .obj
+.SUFFIXES: .def .c .lo .o .obj
am--refresh: Makefile
@:
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(srcdir)/../../../../Makefile.shared $(am__configure_deps)
@@ -1166,6 +1173,7 @@ install-strip:
mostlyclean-generic:
clean-generic:
+ -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
distclean-generic:
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
@@ -1278,6 +1286,18 @@ objectlist.awk.in: $(noinst_LTLIBRARIES)
echo $$i `pwd`/$$i >> objectlist.awk.in ; \
done
+.c.def:
+ $(CHEW) < $< > $*.def 2> $*.ref
+ touch stmp-def
+
+TARGETDOC ?= ../tmp.texi
+
+doc: $(CHEWOUT_FILES)
+ for chapter in $(CHAPTERS) ; \
+ do \
+ cat $(srcdir)/$$chapter >> $(TARGETDOC) ; \
+ done
+
doc:
install-data-local: install-toollibLIBRARIES
diff --git a/newlib/libc/sys/linux/linuxthreads/configure b/newlib/libc/sys/linux/linuxthreads/configure
index dd4018a6c..dbbba807b 100755
--- a/newlib/libc/sys/linux/linuxthreads/configure
+++ b/newlib/libc/sys/linux/linuxthreads/configure
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.68 for newlib 2.0.0.
+# Generated by GNU Autoconf 2.68 for newlib 2.4.0.
#
#
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
@@ -567,8 +567,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='newlib'
PACKAGE_TARNAME='newlib'
-PACKAGE_VERSION='2.0.0'
-PACKAGE_STRING='newlib 2.0.0'
+PACKAGE_VERSION='2.4.0'
+PACKAGE_STRING='newlib 2.4.0'
PACKAGE_BUGREPORT=''
PACKAGE_URL=''
@@ -1326,7 +1326,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures newlib 2.0.0 to adapt to many kinds of systems.
+\`configure' configures newlib 2.4.0 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1396,7 +1396,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of newlib 2.0.0:";;
+ short | recursive ) echo "Configuration of newlib 2.4.0:";;
esac
cat <<\_ACEOF
@@ -1507,7 +1507,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-newlib configure 2.0.0
+newlib configure 2.4.0
generated by GNU Autoconf 2.68
Copyright (C) 2010 Free Software Foundation, Inc.
@@ -1785,7 +1785,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by newlib $as_me 2.0.0, which was
+It was created by newlib $as_me 2.4.0, which was
generated by GNU Autoconf 2.68. Invocation command line was
$ $0 $@
@@ -2857,7 +2857,7 @@ fi
# Define the identity of the package.
PACKAGE='newlib'
- VERSION='2.0.0'
+ VERSION='2.4.0'
# Some tools Automake needs.
@@ -6960,7 +6960,7 @@ ia64-*-hpux*)
rm -rf conftest*
;;
-x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \
+x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \
s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
# Find out which ABI we are using.
echo 'int i;' > conftest.$ac_ext
@@ -6985,7 +6985,10 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
;;
esac
;;
- ppc64-*linux*|powerpc64-*linux*)
+ powerpc64le-*linux*)
+ LD="${LD-ld} -m elf32lppclinux"
+ ;;
+ powerpc64-*linux*)
LD="${LD-ld} -m elf32ppclinux"
;;
s390x-*linux*)
@@ -7004,7 +7007,10 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
x86_64-*linux*)
LD="${LD-ld} -m elf_x86_64"
;;
- ppc*-*linux*|powerpc*-*linux*)
+ powerpcle-*linux*)
+ LD="${LD-ld} -m elf64lppc"
+ ;;
+ powerpc-*linux*)
LD="${LD-ld} -m elf64ppc"
;;
s390*-*linux*|s390*-*tpf*)
@@ -7686,7 +7692,7 @@ $as_echo "$lt_cv_ld_force_load" >&6; }
case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
10.0,*86*-darwin8*|10.0,*-darwin[91]*)
_lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
- 10.[012]*)
+ 10.[012][,.]*)
_lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
10.*)
_lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
@@ -9255,7 +9261,7 @@ _LT_EOF
if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
&& test "$tmp_diet" = no
then
- tmp_addflag=
+ tmp_addflag=' $pic_flag'
tmp_sharedflag='-shared'
case $cc_basename,$host_cpu in
pgcc*) # Portland Group C compiler
@@ -9437,7 +9443,7 @@ _LT_EOF
if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
else
- export_symbols_cmds='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
+ export_symbols_cmds='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "L")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
fi
aix_use_runtimelinking=no
@@ -11465,7 +11471,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 11468 "configure"
+#line 11474 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -11571,7 +11577,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 11574 "configure"
+#line 11580 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -12430,7 +12436,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by newlib $as_me 2.0.0, which was
+This file was extended by newlib $as_me 2.4.0, which was
generated by GNU Autoconf 2.68. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -12487,7 +12493,7 @@ _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
-newlib config.status 2.0.0
+newlib config.status 2.4.0
configured by $0, generated by GNU Autoconf 2.68,
with options \\"\$ac_cs_config\\"
diff --git a/newlib/libc/sys/linux/linuxthreads/internals.h b/newlib/libc/sys/linux/linuxthreads/internals.h
index 6da0deb43..1167bd43e 100644
--- a/newlib/libc/sys/linux/linuxthreads/internals.h
+++ b/newlib/libc/sys/linux/linuxthreads/internals.h
@@ -187,7 +187,7 @@ struct _pthread_descr_struct {
hp_timing_t p_cpuclock_offset; /* Initial CPU clock for thread. */
#endif
/* New elements must be added at the end. */
-} __attribute__ ((aligned(32))); /* We need to align the structure so that
+} __attribute__ ((__aligned__(32))); /* We need to align the structure so that
doubles are aligned properly. This is 8
bytes on MIPS and 16 bytes on MIPS64.
32 bytes might give better cache
@@ -374,9 +374,9 @@ static inline int nonexisting_handle(pthread_handle h, pthread_t id)
/* Recover thread descriptor for the current thread */
-extern pthread_descr __pthread_find_self (void) __attribute__ ((const));
+extern pthread_descr __pthread_find_self (void) __attribute__ ((__const__));
-static inline pthread_descr thread_self (void) __attribute__ ((const));
+static inline pthread_descr thread_self (void) __attribute__ ((__const__));
static inline pthread_descr thread_self (void)
{
#ifdef THREAD_SELF
diff --git a/newlib/libc/sys/linux/linuxthreads/libc-symbols.h b/newlib/libc/sys/linux/linuxthreads/libc-symbols.h
index 97b672643..3f56cc259 100644
--- a/newlib/libc/sys/linux/linuxthreads/libc-symbols.h
+++ b/newlib/libc/sys/linux/linuxthreads/libc-symbols.h
@@ -91,12 +91,12 @@
/* Define ALIASNAME as a strong alias for NAME. */
# define strong_alias(name, aliasname) _strong_alias(name, aliasname)
# define _strong_alias(name, aliasname) \
- extern __typeof (name) aliasname __attribute__ ((alias (#name)));
+ extern __typeof (name) aliasname __attribute__ ((__alias__ (#name)));
/* This comes between the return type and function name in
a function definition to make that definition weak. */
-# define weak_function __attribute__ ((weak))
-# define weak_const_function __attribute__ ((weak, __const__))
+# define weak_function __attribute__ ((__weak__))
+# define weak_const_function __attribute__ ((__weak__, __const__))
# ifdef HAVE_WEAK_SYMBOLS
@@ -104,7 +104,7 @@
If weak aliases are not available, this defines a strong alias. */
# define weak_alias(name, aliasname) _weak_alias (name, aliasname)
# define _weak_alias(name, aliasname) \
- extern __typeof (name) aliasname __attribute__ ((weak, alias (#name)));
+ extern __typeof (name) aliasname __attribute__ ((__weak__, __alias__ (#name)));
/* Declare SYMBOL as weak undefined symbol (resolved to 0 if not defined). */
# define weak_extern(symbol) _weak_extern (symbol)
@@ -213,12 +213,12 @@
# define link_warning(symbol, msg) \
__make_section_unallocated (".gnu.warning." #symbol) \
static const char __evoke_link_warning_##symbol[] \
- __attribute__ ((section (".gnu.warning." #symbol "\"\n\t#\""))) = msg;
+ __attribute__ ((__section__ (".gnu.warning." #symbol "\"\n\t#\""))) = msg;
# else
# define link_warning(symbol, msg) \
__make_section_unallocated (".gnu.warning." #symbol) \
static const char __evoke_link_warning_##symbol[] \
- __attribute__ ((section (".gnu.warning." #symbol "\n\t#"))) = msg;
+ __attribute__ ((__section__ (".gnu.warning." #symbol "\n\t#"))) = msg;
# endif
# else /* Not ELF: a.out */
# ifdef HAVE_XCOFF
@@ -267,11 +267,11 @@
because it will need to be relocated at run time anyway. */
# define _elf_set_element(set, symbol) \
static const void *__elf_set_##set##_element_##symbol##__ \
- __attribute__ ((unused, section (#set))) = &(symbol)
+ __attribute__ ((__unused__, __section__ (#set))) = &(symbol)
# else
# define _elf_set_element(set, symbol) \
static const void *const __elf_set_##set##_element_##symbol##__ \
- __attribute__ ((unused, section (#set))) = &(symbol)
+ __attribute__ ((__unused__, __section__ (#set))) = &(symbol)
# endif
/* Define SET as a symbol set. This may be required (it is in a.out) to
diff --git a/newlib/libc/sys/linux/linuxthreads/machine/configure b/newlib/libc/sys/linux/linuxthreads/machine/configure
index f05563d2c..ed7b3958b 100755
--- a/newlib/libc/sys/linux/linuxthreads/machine/configure
+++ b/newlib/libc/sys/linux/linuxthreads/machine/configure
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.68 for newlib 2.0.0.
+# Generated by GNU Autoconf 2.68 for newlib 2.4.0.
#
#
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
@@ -567,8 +567,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='newlib'
PACKAGE_TARNAME='newlib'
-PACKAGE_VERSION='2.0.0'
-PACKAGE_STRING='newlib 2.0.0'
+PACKAGE_VERSION='2.4.0'
+PACKAGE_STRING='newlib 2.4.0'
PACKAGE_BUGREPORT=''
PACKAGE_URL=''
@@ -1326,7 +1326,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures newlib 2.0.0 to adapt to many kinds of systems.
+\`configure' configures newlib 2.4.0 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1396,7 +1396,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of newlib 2.0.0:";;
+ short | recursive ) echo "Configuration of newlib 2.4.0:";;
esac
cat <<\_ACEOF
@@ -1507,7 +1507,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-newlib configure 2.0.0
+newlib configure 2.4.0
generated by GNU Autoconf 2.68
Copyright (C) 2010 Free Software Foundation, Inc.
@@ -1785,7 +1785,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by newlib $as_me 2.0.0, which was
+It was created by newlib $as_me 2.4.0, which was
generated by GNU Autoconf 2.68. Invocation command line was
$ $0 $@
@@ -2857,7 +2857,7 @@ fi
# Define the identity of the package.
PACKAGE='newlib'
- VERSION='2.0.0'
+ VERSION='2.4.0'
# Some tools Automake needs.
@@ -6918,7 +6918,7 @@ ia64-*-hpux*)
rm -rf conftest*
;;
-x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \
+x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \
s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
# Find out which ABI we are using.
echo 'int i;' > conftest.$ac_ext
@@ -6943,7 +6943,10 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
;;
esac
;;
- ppc64-*linux*|powerpc64-*linux*)
+ powerpc64le-*linux*)
+ LD="${LD-ld} -m elf32lppclinux"
+ ;;
+ powerpc64-*linux*)
LD="${LD-ld} -m elf32ppclinux"
;;
s390x-*linux*)
@@ -6962,7 +6965,10 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
x86_64-*linux*)
LD="${LD-ld} -m elf_x86_64"
;;
- ppc*-*linux*|powerpc*-*linux*)
+ powerpcle-*linux*)
+ LD="${LD-ld} -m elf64lppc"
+ ;;
+ powerpc-*linux*)
LD="${LD-ld} -m elf64ppc"
;;
s390*-*linux*|s390*-*tpf*)
@@ -7644,7 +7650,7 @@ $as_echo "$lt_cv_ld_force_load" >&6; }
case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
10.0,*86*-darwin8*|10.0,*-darwin[91]*)
_lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
- 10.[012]*)
+ 10.[012][,.]*)
_lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
10.*)
_lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
@@ -9213,7 +9219,7 @@ _LT_EOF
if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
&& test "$tmp_diet" = no
then
- tmp_addflag=
+ tmp_addflag=' $pic_flag'
tmp_sharedflag='-shared'
case $cc_basename,$host_cpu in
pgcc*) # Portland Group C compiler
@@ -9395,7 +9401,7 @@ _LT_EOF
if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
else
- export_symbols_cmds='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
+ export_symbols_cmds='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "L")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
fi
aix_use_runtimelinking=no
@@ -11423,7 +11429,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 11426 "configure"
+#line 11432 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -11529,7 +11535,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 11532 "configure"
+#line 11538 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -12398,7 +12404,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by newlib $as_me 2.0.0, which was
+This file was extended by newlib $as_me 2.4.0, which was
generated by GNU Autoconf 2.68. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -12455,7 +12461,7 @@ _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
-newlib config.status 2.0.0
+newlib config.status 2.4.0
configured by $0, generated by GNU Autoconf 2.68,
with options \\"\$ac_cs_config\\"
diff --git a/newlib/libc/sys/linux/linuxthreads/machine/i386/Makefile.in b/newlib/libc/sys/linux/linuxthreads/machine/i386/Makefile.in
index bac52aa0c..ffb4206c9 100644
--- a/newlib/libc/sys/linux/linuxthreads/machine/i386/Makefile.in
+++ b/newlib/libc/sys/linux/linuxthreads/machine/i386/Makefile.in
@@ -256,13 +256,20 @@ liblinuxthreadsi386_la_LDFLAGS = -Xcompiler -nostdlib
@USE_LIBTOOL_FALSE@lib_a_SOURCES = $(LIB_SOURCES)
@USE_LIBTOOL_FALSE@lib_a_CFLAGS = $(AM_CFLAGS)
@USE_LIBTOOL_FALSE@lib_a_CCASFLAGS = $(AM_CCASFLAGS)
+
+#
+# documentation rules
+#
+SUFFIXES = .def
+CHEW = ${top_builddir}/../doc/makedoc -f $(top_srcdir)/../doc/doc.str
+CLEANFILES = $(CHEWOUT_FILES) *.ref
AM_CFLAGS = -D_XOPEN_SOURCE=600 -D_GNU_SOURCE=1
ACLOCAL_AMFLAGS = -I ../../../../../.. -I ../../../../../../..
CONFIG_STATUS_DEPENDENCIES = $(newlib_basedir)/configure.host
all: all-am
.SUFFIXES:
-.SUFFIXES: .S .c .lo .o .obj
+.SUFFIXES: .def .S .c .lo .o .obj
am--refresh: Makefile
@:
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(srcdir)/../../../../../../Makefile.shared $(am__configure_deps)
@@ -451,6 +458,7 @@ install-strip:
mostlyclean-generic:
clean-generic:
+ -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
distclean-generic:
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
@@ -554,6 +562,18 @@ objectlist.awk.in: $(noinst_LTLIBRARIES)
echo $$i `pwd`/$$i >> objectlist.awk.in ; \
done
+.c.def:
+ $(CHEW) < $< > $*.def 2> $*.ref
+ touch stmp-def
+
+TARGETDOC ?= ../tmp.texi
+
+doc: $(CHEWOUT_FILES)
+ for chapter in $(CHAPTERS) ; \
+ do \
+ cat $(srcdir)/$$chapter >> $(TARGETDOC) ; \
+ done
+
# 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/sys/linux/linuxthreads/machine/i386/configure b/newlib/libc/sys/linux/linuxthreads/machine/i386/configure
index 457963e3f..bb7b35df2 100755
--- a/newlib/libc/sys/linux/linuxthreads/machine/i386/configure
+++ b/newlib/libc/sys/linux/linuxthreads/machine/i386/configure
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.68 for newlib 2.0.0.
+# Generated by GNU Autoconf 2.68 for newlib 2.4.0.
#
#
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
@@ -567,8 +567,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='newlib'
PACKAGE_TARNAME='newlib'
-PACKAGE_VERSION='2.0.0'
-PACKAGE_STRING='newlib 2.0.0'
+PACKAGE_VERSION='2.4.0'
+PACKAGE_STRING='newlib 2.4.0'
PACKAGE_BUGREPORT=''
PACKAGE_URL=''
@@ -1322,7 +1322,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures newlib 2.0.0 to adapt to many kinds of systems.
+\`configure' configures newlib 2.4.0 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1392,7 +1392,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of newlib 2.0.0:";;
+ short | recursive ) echo "Configuration of newlib 2.4.0:";;
esac
cat <<\_ACEOF
@@ -1503,7 +1503,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-newlib configure 2.0.0
+newlib configure 2.4.0
generated by GNU Autoconf 2.68
Copyright (C) 2010 Free Software Foundation, Inc.
@@ -1781,7 +1781,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by newlib $as_me 2.0.0, which was
+It was created by newlib $as_me 2.4.0, which was
generated by GNU Autoconf 2.68. Invocation command line was
$ $0 $@
@@ -2853,7 +2853,7 @@ fi
# Define the identity of the package.
PACKAGE='newlib'
- VERSION='2.0.0'
+ VERSION='2.4.0'
# Some tools Automake needs.
@@ -6956,7 +6956,7 @@ ia64-*-hpux*)
rm -rf conftest*
;;
-x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \
+x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \
s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
# Find out which ABI we are using.
echo 'int i;' > conftest.$ac_ext
@@ -6981,7 +6981,10 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
;;
esac
;;
- ppc64-*linux*|powerpc64-*linux*)
+ powerpc64le-*linux*)
+ LD="${LD-ld} -m elf32lppclinux"
+ ;;
+ powerpc64-*linux*)
LD="${LD-ld} -m elf32ppclinux"
;;
s390x-*linux*)
@@ -7000,7 +7003,10 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
x86_64-*linux*)
LD="${LD-ld} -m elf_x86_64"
;;
- ppc*-*linux*|powerpc*-*linux*)
+ powerpcle-*linux*)
+ LD="${LD-ld} -m elf64lppc"
+ ;;
+ powerpc-*linux*)
LD="${LD-ld} -m elf64ppc"
;;
s390*-*linux*|s390*-*tpf*)
@@ -7682,7 +7688,7 @@ $as_echo "$lt_cv_ld_force_load" >&6; }
case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
10.0,*86*-darwin8*|10.0,*-darwin[91]*)
_lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
- 10.[012]*)
+ 10.[012][,.]*)
_lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
10.*)
_lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
@@ -9251,7 +9257,7 @@ _LT_EOF
if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
&& test "$tmp_diet" = no
then
- tmp_addflag=
+ tmp_addflag=' $pic_flag'
tmp_sharedflag='-shared'
case $cc_basename,$host_cpu in
pgcc*) # Portland Group C compiler
@@ -9433,7 +9439,7 @@ _LT_EOF
if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
else
- export_symbols_cmds='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
+ export_symbols_cmds='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "L")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
fi
aix_use_runtimelinking=no
@@ -11461,7 +11467,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 11464 "configure"
+#line 11470 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -11567,7 +11573,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 11570 "configure"
+#line 11576 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -12414,7 +12420,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by newlib $as_me 2.0.0, which was
+This file was extended by newlib $as_me 2.4.0, which was
generated by GNU Autoconf 2.68. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -12471,7 +12477,7 @@ _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
-newlib config.status 2.0.0
+newlib config.status 2.4.0
configured by $0, generated by GNU Autoconf 2.68,
with options \\"\$ac_cs_config\\"
diff --git a/newlib/libc/sys/linux/linuxthreads/timer_create.c b/newlib/libc/sys/linux/linuxthreads/timer_create.c
index 1dccd3036..5eff1fc37 100644
--- a/newlib/libc/sys/linux/linuxthreads/timer_create.c
+++ b/newlib/libc/sys/linux/linuxthreads/timer_create.c
@@ -30,8 +30,8 @@
int
timer_create (clock_id, evp, timerid)
clockid_t clock_id;
- struct sigevent *evp;
- timer_t *timerid;
+ struct sigevent *__restrict evp;
+ timer_t *__restrict timerid;
{
int retval = -1;
struct timer_node *newtimer = NULL;
diff --git a/newlib/libc/sys/linux/linuxthreads/timer_settime.c b/newlib/libc/sys/linux/linuxthreads/timer_settime.c
index 2f187fd18..697640724 100644
--- a/newlib/libc/sys/linux/linuxthreads/timer_settime.c
+++ b/newlib/libc/sys/linux/linuxthreads/timer_settime.c
@@ -29,8 +29,8 @@ int
timer_settime (timerid, flags, value, ovalue)
timer_t timerid;
int flags;
- const struct itimerspec *value;
- struct itimerspec *ovalue;
+ const struct itimerspec *__restrict value;
+ struct itimerspec *__restrict ovalue;
{
struct timer_node *timer;
struct thread_node *thread = NULL;
diff --git a/newlib/libc/sys/linux/machine/configure b/newlib/libc/sys/linux/machine/configure
index aeb16751c..149347567 100755
--- a/newlib/libc/sys/linux/machine/configure
+++ b/newlib/libc/sys/linux/machine/configure
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.68 for newlib 2.0.0.
+# Generated by GNU Autoconf 2.68 for newlib 2.4.0.
#
#
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
@@ -567,8 +567,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='newlib'
PACKAGE_TARNAME='newlib'
-PACKAGE_VERSION='2.0.0'
-PACKAGE_STRING='newlib 2.0.0'
+PACKAGE_VERSION='2.4.0'
+PACKAGE_STRING='newlib 2.4.0'
PACKAGE_BUGREPORT=''
PACKAGE_URL=''
@@ -1327,7 +1327,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures newlib 2.0.0 to adapt to many kinds of systems.
+\`configure' configures newlib 2.4.0 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1397,7 +1397,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of newlib 2.0.0:";;
+ short | recursive ) echo "Configuration of newlib 2.4.0:";;
esac
cat <<\_ACEOF
@@ -1508,7 +1508,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-newlib configure 2.0.0
+newlib configure 2.4.0
generated by GNU Autoconf 2.68
Copyright (C) 2010 Free Software Foundation, Inc.
@@ -1786,7 +1786,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by newlib $as_me 2.0.0, which was
+It was created by newlib $as_me 2.4.0, which was
generated by GNU Autoconf 2.68. Invocation command line was
$ $0 $@
@@ -2858,7 +2858,7 @@ fi
# Define the identity of the package.
PACKAGE='newlib'
- VERSION='2.0.0'
+ VERSION='2.4.0'
# Some tools Automake needs.
@@ -6919,7 +6919,7 @@ ia64-*-hpux*)
rm -rf conftest*
;;
-x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \
+x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \
s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
# Find out which ABI we are using.
echo 'int i;' > conftest.$ac_ext
@@ -6944,7 +6944,10 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
;;
esac
;;
- ppc64-*linux*|powerpc64-*linux*)
+ powerpc64le-*linux*)
+ LD="${LD-ld} -m elf32lppclinux"
+ ;;
+ powerpc64-*linux*)
LD="${LD-ld} -m elf32ppclinux"
;;
s390x-*linux*)
@@ -6963,7 +6966,10 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
x86_64-*linux*)
LD="${LD-ld} -m elf_x86_64"
;;
- ppc*-*linux*|powerpc*-*linux*)
+ powerpcle-*linux*)
+ LD="${LD-ld} -m elf64lppc"
+ ;;
+ powerpc-*linux*)
LD="${LD-ld} -m elf64ppc"
;;
s390*-*linux*|s390*-*tpf*)
@@ -7645,7 +7651,7 @@ $as_echo "$lt_cv_ld_force_load" >&6; }
case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
10.0,*86*-darwin8*|10.0,*-darwin[91]*)
_lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
- 10.[012]*)
+ 10.[012][,.]*)
_lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
10.*)
_lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
@@ -9214,7 +9220,7 @@ _LT_EOF
if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
&& test "$tmp_diet" = no
then
- tmp_addflag=
+ tmp_addflag=' $pic_flag'
tmp_sharedflag='-shared'
case $cc_basename,$host_cpu in
pgcc*) # Portland Group C compiler
@@ -9396,7 +9402,7 @@ _LT_EOF
if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
else
- export_symbols_cmds='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
+ export_symbols_cmds='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "L")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
fi
aix_use_runtimelinking=no
@@ -11424,7 +11430,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 11427 "configure"
+#line 11433 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -11530,7 +11536,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 11533 "configure"
+#line 11539 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -12405,7 +12411,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by newlib $as_me 2.0.0, which was
+This file was extended by newlib $as_me 2.4.0, which was
generated by GNU Autoconf 2.68. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -12462,7 +12468,7 @@ _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
-newlib config.status 2.0.0
+newlib config.status 2.4.0
configured by $0, generated by GNU Autoconf 2.68,
with options \\"\$ac_cs_config\\"
diff --git a/newlib/libc/sys/linux/machine/i386/Makefile.in b/newlib/libc/sys/linux/machine/i386/Makefile.in
index eac3e13b0..ff1f17022 100644
--- a/newlib/libc/sys/linux/machine/i386/Makefile.in
+++ b/newlib/libc/sys/linux/machine/i386/Makefile.in
@@ -258,12 +258,19 @@ AM_CCASFLAGS = -I$(srcdir)/../.. $(INCLUDES)
@USE_LIBTOOL_FALSE@lib_a_SOURCES = $(LIB_SOURCES)
@USE_LIBTOOL_FALSE@lib_a_CFLAGS = $(AM_CFLAGS)
@USE_LIBTOOL_FALSE@lib_a_CCASFLAGS = $(AM_CCASFLAGS)
+
+#
+# documentation rules
+#
+SUFFIXES = .def
+CHEW = ${top_builddir}/../doc/makedoc -f $(top_srcdir)/../doc/doc.str
+CLEANFILES = $(CHEWOUT_FILES) *.ref
ACLOCAL_AMFLAGS = -I ../../../../.. -I ../../../../../..
CONFIG_STATUS_DEPENDENCIES = $(newlib_basedir)/configure.host
all: all-am
.SUFFIXES:
-.SUFFIXES: .S .c .lo .o .obj
+.SUFFIXES: .def .S .c .lo .o .obj
am--refresh: Makefile
@:
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(srcdir)/../../../../../Makefile.shared $(am__configure_deps)
@@ -464,6 +471,7 @@ install-strip:
mostlyclean-generic:
clean-generic:
+ -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
distclean-generic:
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
@@ -567,6 +575,18 @@ objectlist.awk.in: $(noinst_LTLIBRARIES)
echo $$i `pwd`/$$i >> objectlist.awk.in ; \
done
+.c.def:
+ $(CHEW) < $< > $*.def 2> $*.ref
+ touch stmp-def
+
+TARGETDOC ?= ../tmp.texi
+
+doc: $(CHEWOUT_FILES)
+ for chapter in $(CHAPTERS) ; \
+ do \
+ cat $(srcdir)/$$chapter >> $(TARGETDOC) ; \
+ done
+
all-local: crt0.o
# Tell versions [3.59,3.63) of GNU make to not export all variables.
diff --git a/newlib/libc/sys/linux/machine/i386/configure b/newlib/libc/sys/linux/machine/i386/configure
index 9a810deb9..c914af814 100755
--- a/newlib/libc/sys/linux/machine/i386/configure
+++ b/newlib/libc/sys/linux/machine/i386/configure
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.68 for newlib 2.0.0.
+# Generated by GNU Autoconf 2.68 for newlib 2.4.0.
#
#
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
@@ -567,8 +567,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='newlib'
PACKAGE_TARNAME='newlib'
-PACKAGE_VERSION='2.0.0'
-PACKAGE_STRING='newlib 2.0.0'
+PACKAGE_VERSION='2.4.0'
+PACKAGE_STRING='newlib 2.4.0'
PACKAGE_BUGREPORT=''
PACKAGE_URL=''
@@ -1322,7 +1322,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures newlib 2.0.0 to adapt to many kinds of systems.
+\`configure' configures newlib 2.4.0 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1392,7 +1392,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of newlib 2.0.0:";;
+ short | recursive ) echo "Configuration of newlib 2.4.0:";;
esac
cat <<\_ACEOF
@@ -1503,7 +1503,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-newlib configure 2.0.0
+newlib configure 2.4.0
generated by GNU Autoconf 2.68
Copyright (C) 2010 Free Software Foundation, Inc.
@@ -1781,7 +1781,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by newlib $as_me 2.0.0, which was
+It was created by newlib $as_me 2.4.0, which was
generated by GNU Autoconf 2.68. Invocation command line was
$ $0 $@
@@ -2853,7 +2853,7 @@ fi
# Define the identity of the package.
PACKAGE='newlib'
- VERSION='2.0.0'
+ VERSION='2.4.0'
# Some tools Automake needs.
@@ -6956,7 +6956,7 @@ ia64-*-hpux*)
rm -rf conftest*
;;
-x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \
+x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \
s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
# Find out which ABI we are using.
echo 'int i;' > conftest.$ac_ext
@@ -6981,7 +6981,10 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
;;
esac
;;
- ppc64-*linux*|powerpc64-*linux*)
+ powerpc64le-*linux*)
+ LD="${LD-ld} -m elf32lppclinux"
+ ;;
+ powerpc64-*linux*)
LD="${LD-ld} -m elf32ppclinux"
;;
s390x-*linux*)
@@ -7000,7 +7003,10 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
x86_64-*linux*)
LD="${LD-ld} -m elf_x86_64"
;;
- ppc*-*linux*|powerpc*-*linux*)
+ powerpcle-*linux*)
+ LD="${LD-ld} -m elf64lppc"
+ ;;
+ powerpc-*linux*)
LD="${LD-ld} -m elf64ppc"
;;
s390*-*linux*|s390*-*tpf*)
@@ -7682,7 +7688,7 @@ $as_echo "$lt_cv_ld_force_load" >&6; }
case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
10.0,*86*-darwin8*|10.0,*-darwin[91]*)
_lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
- 10.[012]*)
+ 10.[012][,.]*)
_lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
10.*)
_lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
@@ -9251,7 +9257,7 @@ _LT_EOF
if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
&& test "$tmp_diet" = no
then
- tmp_addflag=
+ tmp_addflag=' $pic_flag'
tmp_sharedflag='-shared'
case $cc_basename,$host_cpu in
pgcc*) # Portland Group C compiler
@@ -9433,7 +9439,7 @@ _LT_EOF
if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
else
- export_symbols_cmds='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
+ export_symbols_cmds='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "L")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
fi
aix_use_runtimelinking=no
@@ -11461,7 +11467,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 11464 "configure"
+#line 11470 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -11567,7 +11573,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 11570 "configure"
+#line 11576 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -12414,7 +12420,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by newlib $as_me 2.0.0, which was
+This file was extended by newlib $as_me 2.4.0, which was
generated by GNU Autoconf 2.68. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -12471,7 +12477,7 @@ _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
-newlib config.status 2.0.0
+newlib config.status 2.4.0
configured by $0, generated by GNU Autoconf 2.68,
with options \\"\$ac_cs_config\\"
diff --git a/newlib/libc/sys/linux/machine/i386/dl-machine.h b/newlib/libc/sys/linux/machine/i386/dl-machine.h
index 80757e89a..8fada14e5 100644
--- a/newlib/libc/sys/linux/machine/i386/dl-machine.h
+++ b/newlib/libc/sys/linux/machine/i386/dl-machine.h
@@ -26,7 +26,7 @@
#include <machine/weakalias.h>
/* Return nonzero iff ELF header is compatible with the running host. */
-static inline int __attribute__ ((unused))
+static inline int __attribute__ ((__unused__))
elf_machine_matches_host (const Elf32_Ehdr *ehdr)
{
return ehdr->e_machine == EM_386;
@@ -36,7 +36,7 @@ elf_machine_matches_host (const Elf32_Ehdr *ehdr)
/* Return the link-time address of _DYNAMIC. Conveniently, this is the
first element of the GOT. This must be inlined in a function which
uses global data. */
-static inline Elf32_Addr __attribute__ ((unused))
+static inline Elf32_Addr __attribute__ ((__unused__))
elf_machine_dynamic (void)
{
register Elf32_Addr *got asm ("%ebx");
@@ -45,7 +45,7 @@ elf_machine_dynamic (void)
/* Return the run-time load address of the shared object. */
-static inline Elf32_Addr __attribute__ ((unused))
+static inline Elf32_Addr __attribute__ ((__unused__))
elf_machine_load_address (void)
{
Elf32_Addr addr;
@@ -65,16 +65,16 @@ elf_machine_load_address (void)
/* GKM FIXME: Fix trampoline to pass bounds so we can do
without the `__unbounded' qualifier. */
static ElfW(Addr) fixup (struct link_map *__unbounded l, ElfW(Word) reloc_offset)
- __attribute__ ((regparm (2), unused));
+ __attribute__ ((__regparm__ (2), __unused__));
static ElfW(Addr) profile_fixup (struct link_map *l, ElfW(Word) reloc_offset,
ElfW(Addr) retaddr)
- __attribute__ ((regparm (3), unused));
+ __attribute__ ((__regparm__ (3), __unused__));
#endif
/* Set up the loaded object described by L so its unrelocated PLT
entries will jump to the on-demand fixup code in dl-runtime.c. */
-static inline int __attribute__ ((unused))
+static inline int __attribute__ ((__unused__))
elf_machine_runtime_setup (struct link_map *l, int lazy, int profile)
{
Elf32_Addr *got;
@@ -268,7 +268,7 @@ _dl_start_user:\n\
extern const char *_dl_platform;
-static inline void __attribute__ ((unused))
+static inline void __attribute__ ((__unused__))
dl_platform_init (void)
{
if (_dl_platform != NULL && *_dl_platform == '\0')
@@ -292,13 +292,13 @@ elf_machine_plt_value (struct link_map *map, const Elf32_Rel *reloc,
return value;
}
-static inline void __attribute__ ((unused))
+static inline void __attribute__ ((__unused__))
elf_machine_rel (struct link_map *map, const Elf32_Rel *reloc,
const Elf32_Sym *sym, const struct r_found_version *version,
Elf32_Addr *const reloc_addr,
struct r_scope_elem *scope[]);
-static inline void __attribute__ ((unused))
+static inline void __attribute__ ((__unused__))
elf_machine_rel_relative (Elf32_Addr l_addr, const Elf32_Rel *reloc,
Elf32_Addr *const reloc_addr);
@@ -313,7 +313,7 @@ elf_machine_lazy_rel (struct link_map *map,
/* Perform the relocation specified by RELOC and SYM (which is fully resolved).
MAP is the object containing the reloc. */
-static inline void __attribute__ ((unused))
+static inline void __attribute__ ((__unused__))
elf_machine_rel (struct link_map *map, const Elf32_Rel *reloc,
const Elf32_Sym *sym, const struct r_found_version *version,
Elf32_Addr *const reloc_addr,
@@ -396,7 +396,7 @@ elf_machine_rel (struct link_map *map, const Elf32_Rel *reloc,
}
}
-static inline void __attribute__ ((unused))
+static inline void __attribute__ ((__unused__))
elf_machine_rel_relative (Elf32_Addr l_addr, const Elf32_Rel *reloc,
Elf32_Addr *const reloc_addr)
{
diff --git a/newlib/libc/sys/linux/machine/i386/dl-procinfo.h b/newlib/libc/sys/linux/machine/i386/dl-procinfo.h
index d1658fafd..2a877d6e1 100644
--- a/newlib/libc/sys/linux/machine/i386/dl-procinfo.h
+++ b/newlib/libc/sys/linux/machine/i386/dl-procinfo.h
@@ -38,7 +38,7 @@ extern const char _dl_x86_platforms[][5];
static inline int
-__attribute__ ((unused))
+__attribute__ ((__unused__))
_dl_procinfo (int word)
{
/* This table should match the information from arch/i386/kernel/setup.c
@@ -57,14 +57,14 @@ _dl_procinfo (int word)
}
static inline const char *
-__attribute__ ((unused))
+__attribute__ ((__unused__))
_dl_hwcap_string (int idx)
{
return _dl_x86_cap_flags[idx];
};
static inline const char *
-__attribute__ ((unused))
+__attribute__ ((__unused__))
_dl_platform_string (int idx)
{
return _dl_x86_platforms [idx - _DL_FIRST_PLATFORM];
@@ -100,7 +100,7 @@ enum
};
static inline int
-__attribute__ ((unused))
+__attribute__ ((__unused__))
_dl_string_hwcap (const char *str)
{
int i;
@@ -115,7 +115,7 @@ _dl_string_hwcap (const char *str)
static inline int
-__attribute__ ((unused))
+__attribute__ ((__unused__))
_dl_string_platform (const char *str)
{
int i;
diff --git a/newlib/libc/sys/linux/machine/i386/i386mach.h b/newlib/libc/sys/linux/machine/i386/i386mach.h
index 23c32190d..403d24bfe 100644
--- a/newlib/libc/sys/linux/machine/i386/i386mach.h
+++ b/newlib/libc/sys/linux/machine/i386/i386mach.h
@@ -74,7 +74,7 @@
#define SOTYPE_FUNCTION(sym)
#endif
-#ifdef _I386MACH_ALLOW_HW_INTERRUPTS
+#ifndef _I386MACH_DISABLE_HW_INTERRUPTS
#define __CLI
#define __STI
#else
diff --git a/newlib/libc/sys/linux/machine/i386/weakalias.h b/newlib/libc/sys/linux/machine/i386/weakalias.h
index 2813bfe26..4242960c5 100644
--- a/newlib/libc/sys/linux/machine/i386/weakalias.h
+++ b/newlib/libc/sys/linux/machine/i386/weakalias.h
@@ -1,10 +1,10 @@
#define weak_alias(name, aliasname) \
- extern __typeof (name) aliasname __attribute__ ((weak, alias (#name)));
+ extern __typeof (name) aliasname __attribute__ ((__weak__, __alias__ (#name)));
#if 0
#define weak_extern(symbol) _weak_extern (symbol)
#define _weak_extern(symbol) asm (".weak " #symbol);
#endif
-#define weak_function __attribute__ ((weak))
+#define weak_function __attribute__ ((__weak__))
diff --git a/newlib/libc/sys/linux/net/Makefile.in b/newlib/libc/sys/linux/net/Makefile.in
index de5931023..aa45600f4 100644
--- a/newlib/libc/sys/linux/net/Makefile.in
+++ b/newlib/libc/sys/linux/net/Makefile.in
@@ -391,10 +391,17 @@ libnet_la_CFLAGS = -DINET6
@USE_LIBTOOL_FALSE@noinst_LIBRARIES = lib.a
@USE_LIBTOOL_FALSE@lib_a_SOURCES = $(GENERAL_SOURCES) $(ELIX_SOURCES)
@USE_LIBTOOL_FALSE@lib_a_CFLAGS = $(AM_CFLAGS)
+
+#
+# documentation rules
+#
+SUFFIXES = .def
+CHEW = ${top_builddir}/../doc/makedoc -f $(top_srcdir)/../doc/doc.str
+CLEANFILES = $(CHEWOUT_FILES) *.ref
all: all-am
.SUFFIXES:
-.SUFFIXES: .c .lo .o .obj
+.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 \
@@ -1488,6 +1495,7 @@ install-strip:
mostlyclean-generic:
clean-generic:
+ -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
distclean-generic:
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
@@ -1588,6 +1596,18 @@ objectlist.awk.in: $(noinst_LTLIBRARIES)
echo $$i `pwd`/$$i >> objectlist.awk.in ; \
done
+.c.def:
+ $(CHEW) < $< > $*.def 2> $*.ref
+ touch stmp-def
+
+TARGETDOC ?= ../tmp.texi
+
+doc: $(CHEWOUT_FILES)
+ for chapter in $(CHAPTERS) ; \
+ do \
+ cat $(srcdir)/$$chapter >> $(TARGETDOC) ; \
+ done
+
install-data-local:
$(mkinstalldirs) $(DESTDIR)$(tooldir)/include/arpa; \
for i in $(srcdir)/../include/arpa/*.h; do \
diff --git a/newlib/libc/sys/linux/net/ifname.c b/newlib/libc/sys/linux/net/ifname.c
index b7975bc2b..d2609b1ba 100644
--- a/newlib/libc/sys/linux/net/ifname.c
+++ b/newlib/libc/sys/linux/net/ifname.c
@@ -125,7 +125,8 @@ struct if_nameindex *
if_nameindex()
{
size_t needed;
- int mib[6], i, ifn = 0, off = 0, hlen;
+ int mib[6], ifn = 0, off = 0, hlen;
+ unsigned int i;
char *buf = NULL, *lim, *next, *cp, *ifbuf = NULL;
struct rt_msghdr *rtm;
struct if_msghdr *ifm;
diff --git a/newlib/libc/sys/linux/realpath.c b/newlib/libc/sys/linux/realpath.c
index 8aa5eb445..63793c608 100644
--- a/newlib/libc/sys/linux/realpath.c
+++ b/newlib/libc/sys/linux/realpath.c
@@ -69,7 +69,7 @@ static int resolve_path(char *path,char *result,char *pos)
}
-char *realpath(const char *path,char *resolved_path)
+char *realpath(const char *__restrict path,char *__restrict resolved_path)
{
char cwd[PATH_MAX];
char *path_copy;
diff --git a/newlib/libc/sys/linux/shared.ld b/newlib/libc/sys/linux/shared.ld
index ef0b91cf3..11af884c6 100644
--- a/newlib/libc/sys/linux/shared.ld
+++ b/newlib/libc/sys/linux/shared.ld
@@ -45,3 +45,11 @@ VERS_1.20 {
VERS_2.0 {
global: *;
};
+
+VERS_2.1 {
+ global: *;
+};
+
+VERS_2.2 {
+ global: *;
+};
diff --git a/newlib/libc/sys/linux/statvfs.c b/newlib/libc/sys/linux/statvfs.c
index 4b0d51abd..be125c292 100644
--- a/newlib/libc/sys/linux/statvfs.c
+++ b/newlib/libc/sys/linux/statvfs.c
@@ -30,7 +30,7 @@
int
-statvfs (const char *file, struct statvfs *buf)
+statvfs (const char *__restrict file, struct statvfs *__restrict buf)
{
struct statfs fsbuf;
struct stat64 st;
diff --git a/newlib/libc/sys/linux/sys/_types.h b/newlib/libc/sys/linux/sys/_types.h
index 1ad429dba..2fd140520 100644
--- a/newlib/libc/sys/linux/sys/_types.h
+++ b/newlib/libc/sys/linux/sys/_types.h
@@ -51,4 +51,11 @@ typedef struct
typedef struct { __flock_mutex_t mutex; } _flock_t;
+#define _CLOCK_T_ unsigned long /* clock() */
+#define _TIME_T_ long /* time() */
+#define _CLOCKID_T_ unsigned long
+#define _TIMER_T_ unsigned long
+
+typedef long __suseconds_t; /* microseconds (signed) */
+
#endif /* _SYS__TYPES_H */
diff --git a/newlib/libc/sys/linux/sys/dirent.h b/newlib/libc/sys/linux/sys/dirent.h
index ec8ed89d4..a67378b5b 100644
--- a/newlib/libc/sys/linux/sys/dirent.h
+++ b/newlib/libc/sys/linux/sys/dirent.h
@@ -36,6 +36,8 @@ typedef struct {
DIR *opendir(const char *);
struct dirent *readdir(DIR *);
+int readdir_r(DIR *__restrict, struct dirent *__restrict,
+ struct dirent **__restrict);
void rewinddir(DIR *);
int closedir(DIR *);
diff --git a/newlib/libc/sys/linux/sys/stat.h b/newlib/libc/sys/linux/sys/stat.h
index 99da598ba..c04142c45 100644
--- a/newlib/libc/sys/linux/sys/stat.h
+++ b/newlib/libc/sys/linux/sys/stat.h
@@ -20,14 +20,14 @@
int _EXFUN(fstat,( int __fd, struct stat *__sbuf ));
int _EXFUN(mkdir,( const char *_path, mode_t __mode ));
int _EXFUN(mkfifo,( const char *__path, mode_t __mode ));
-int _EXFUN(stat,( const char *__path, struct stat *__sbuf ));
+int _EXFUN(stat,( const char *__restrict __path, struct stat *__restrict __sbuf ));
mode_t _EXFUN(umask,( mode_t __mask ));
#ifndef _POSIX_SOURCE
int _EXFUN(fstat64,( int __fd, struct stat64 *__sbuf ));
-int _EXFUN(lstat,( const char *file_name, struct stat64 *buf));
-int _EXFUN(lstat64,( const char *file_name, struct stat64 *buf));
-int _EXFUN(stat64,( const char *__path, struct stat64 *__sbuf ));
+int _EXFUN(lstat,( const char *__restrict file_name, struct stat64 *__restrict buf));
+int _EXFUN(lstat64,( const char *__restrict file_name, struct stat64 *__restrict buf));
+int _EXFUN(stat64,( const char *__restrict __path, struct stat64 *__restrict __sbuf ));
#endif /* _POSIX_SOURCE */
#endif /* _SYS_STAT_H */
diff --git a/newlib/libc/sys/linux/sys/types.h b/newlib/libc/sys/linux/sys/types.h
index 8e674eff6..20dab2f53 100644
--- a/newlib/libc/sys/linux/sys/types.h
+++ b/newlib/libc/sys/linux/sys/types.h
@@ -54,7 +54,6 @@
#include <stddef.h>
#include <sys/config.h>
#include <features.h>
-#include <machine/types.h>
#include <sys/_types.h>
#if !defined(__time_t_defined) && !defined(_TIME_T)
diff --git a/newlib/libc/sys/linux/sys/unistd.h b/newlib/libc/sys/linux/sys/unistd.h
index 3d3864e2c..6b5a93e0c 100644
--- a/newlib/libc/sys/linux/sys/unistd.h
+++ b/newlib/libc/sys/linux/sys/unistd.h
@@ -16,7 +16,7 @@ extern "C" {
extern char **environ;
-void _EXFUN(_exit, (int __status ) _ATTRIBUTE ((noreturn)));
+void _EXFUN(_exit, (int __status ) _ATTRIBUTE ((__noreturn__)));
int _EXFUN(access,(const char *__path, int __amode ));
unsigned _EXFUN(alarm, (unsigned __secs ));
diff --git a/newlib/libc/sys/m88kbug/configure b/newlib/libc/sys/m88kbug/configure
index 4eccac757..d77cd42cd 100755
--- a/newlib/libc/sys/m88kbug/configure
+++ b/newlib/libc/sys/m88kbug/configure
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.68 for newlib 2.0.0.
+# Generated by GNU Autoconf 2.68 for newlib 2.4.0.
#
#
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
@@ -556,8 +556,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='newlib'
PACKAGE_TARNAME='newlib'
-PACKAGE_VERSION='2.0.0'
-PACKAGE_STRING='newlib 2.0.0'
+PACKAGE_VERSION='2.4.0'
+PACKAGE_STRING='newlib 2.4.0'
PACKAGE_BUGREPORT=''
PACKAGE_URL=''
@@ -1239,7 +1239,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures newlib 2.0.0 to adapt to many kinds of systems.
+\`configure' configures newlib 2.4.0 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1309,7 +1309,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of newlib 2.0.0:";;
+ short | recursive ) echo "Configuration of newlib 2.4.0:";;
esac
cat <<\_ACEOF
@@ -1400,7 +1400,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-newlib configure 2.0.0
+newlib configure 2.4.0
generated by GNU Autoconf 2.68
Copyright (C) 2010 Free Software Foundation, Inc.
@@ -1455,7 +1455,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by newlib $as_me 2.0.0, which was
+It was created by newlib $as_me 2.4.0, which was
generated by GNU Autoconf 2.68. Invocation command line was
$ $0 $@
@@ -2527,7 +2527,7 @@ fi
# Define the identity of the package.
PACKAGE='newlib'
- VERSION='2.0.0'
+ VERSION='2.4.0'
# Some tools Automake needs.
@@ -4007,7 +4007,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by newlib $as_me 2.0.0, which was
+This file was extended by newlib $as_me 2.4.0, which was
generated by GNU Autoconf 2.68. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -4064,7 +4064,7 @@ _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
-newlib config.status 2.0.0
+newlib config.status 2.4.0
configured by $0, generated by GNU Autoconf 2.68,
with options \\"\$ac_cs_config\\"
diff --git a/newlib/libc/sys/m88kbug/syscalls.c b/newlib/libc/sys/m88kbug/syscalls.c
index 32f42a925..954dcf6b1 100644
--- a/newlib/libc/sys/m88kbug/syscalls.c
+++ b/newlib/libc/sys/m88kbug/syscalls.c
@@ -76,7 +76,7 @@ int fstat(int file, struct stat *st) {
return(0);
}
-int stat(char *filename, struct stat *st) {
+int stat(char *__restrict filename, struct stat *__restrict st) {
st->st_mode = S_IFCHR;
return(0);
}
diff --git a/newlib/libc/sys/mmixware/configure b/newlib/libc/sys/mmixware/configure
index ee767b868..c7f25afcf 100755
--- a/newlib/libc/sys/mmixware/configure
+++ b/newlib/libc/sys/mmixware/configure
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.68 for newlib 2.0.0.
+# Generated by GNU Autoconf 2.68 for newlib 2.4.0.
#
#
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
@@ -556,8 +556,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='newlib'
PACKAGE_TARNAME='newlib'
-PACKAGE_VERSION='2.0.0'
-PACKAGE_STRING='newlib 2.0.0'
+PACKAGE_VERSION='2.4.0'
+PACKAGE_STRING='newlib 2.4.0'
PACKAGE_BUGREPORT=''
PACKAGE_URL=''
@@ -1239,7 +1239,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures newlib 2.0.0 to adapt to many kinds of systems.
+\`configure' configures newlib 2.4.0 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1309,7 +1309,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of newlib 2.0.0:";;
+ short | recursive ) echo "Configuration of newlib 2.4.0:";;
esac
cat <<\_ACEOF
@@ -1400,7 +1400,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-newlib configure 2.0.0
+newlib configure 2.4.0
generated by GNU Autoconf 2.68
Copyright (C) 2010 Free Software Foundation, Inc.
@@ -1455,7 +1455,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by newlib $as_me 2.0.0, which was
+It was created by newlib $as_me 2.4.0, which was
generated by GNU Autoconf 2.68. Invocation command line was
$ $0 $@
@@ -2527,7 +2527,7 @@ fi
# Define the identity of the package.
PACKAGE='newlib'
- VERSION='2.0.0'
+ VERSION='2.4.0'
# Some tools Automake needs.
@@ -4007,7 +4007,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by newlib $as_me 2.0.0, which was
+This file was extended by newlib $as_me 2.4.0, which was
generated by GNU Autoconf 2.68. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -4064,7 +4064,7 @@ _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
-newlib config.status 2.0.0
+newlib config.status 2.4.0
configured by $0, generated by GNU Autoconf 2.68,
with options \\"\$ac_cs_config\\"
diff --git a/newlib/libc/sys/netware/configure b/newlib/libc/sys/netware/configure
index cf40488b1..a4c0f7568 100755
--- a/newlib/libc/sys/netware/configure
+++ b/newlib/libc/sys/netware/configure
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.68 for newlib 2.0.0.
+# Generated by GNU Autoconf 2.68 for newlib 2.4.0.
#
#
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
@@ -556,8 +556,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='newlib'
PACKAGE_TARNAME='newlib'
-PACKAGE_VERSION='2.0.0'
-PACKAGE_STRING='newlib 2.0.0'
+PACKAGE_VERSION='2.4.0'
+PACKAGE_STRING='newlib 2.4.0'
PACKAGE_BUGREPORT=''
PACKAGE_URL=''
@@ -1239,7 +1239,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures newlib 2.0.0 to adapt to many kinds of systems.
+\`configure' configures newlib 2.4.0 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1309,7 +1309,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of newlib 2.0.0:";;
+ short | recursive ) echo "Configuration of newlib 2.4.0:";;
esac
cat <<\_ACEOF
@@ -1400,7 +1400,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-newlib configure 2.0.0
+newlib configure 2.4.0
generated by GNU Autoconf 2.68
Copyright (C) 2010 Free Software Foundation, Inc.
@@ -1455,7 +1455,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by newlib $as_me 2.0.0, which was
+It was created by newlib $as_me 2.4.0, which was
generated by GNU Autoconf 2.68. Invocation command line was
$ $0 $@
@@ -2527,7 +2527,7 @@ fi
# Define the identity of the package.
PACKAGE='newlib'
- VERSION='2.0.0'
+ VERSION='2.4.0'
# Some tools Automake needs.
@@ -4007,7 +4007,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by newlib $as_me 2.0.0, which was
+This file was extended by newlib $as_me 2.4.0, which was
generated by GNU Autoconf 2.68. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -4064,7 +4064,7 @@ _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
-newlib config.status 2.0.0
+newlib config.status 2.4.0
configured by $0, generated by GNU Autoconf 2.68,
with options \\"\$ac_cs_config\\"
diff --git a/newlib/libc/sys/or1k/Makefile.am b/newlib/libc/sys/or1k/Makefile.am
new file mode 100644
index 000000000..f3bcc0340
--- /dev/null
+++ b/newlib/libc/sys/or1k/Makefile.am
@@ -0,0 +1,16 @@
+## Process this file with automake to generate Makefile.in
+
+AUTOMAKE_OPTIONS = cygnus
+
+INCLUDES = $(NEWLIB_CFLAGS) $(CROSS_CFLAGS) $(TARGET_CFLAGS)
+
+AM_CCASFLAGS = $(INCLUDES)
+
+noinst_LIBRARIES = lib.a
+
+lib_a_SOURCES = getreent.S mlock.c
+lib_a_CCASFLAGS=$(AM_CCASFLAGS)
+lib_a_CFLAGS=$(AM_CFLAGS)
+
+ACLOCAL_AMFLAGS = -I ../../.. -I ../../../..
+CONFIG_STATUS_DEPENDENCIES = $(newlib_basedir)/configure.host
diff --git a/newlib/libc/sys/or1k/Makefile.in b/newlib/libc/sys/or1k/Makefile.in
new file mode 100644
index 000000000..bbecb3e09
--- /dev/null
+++ b/newlib/libc/sys/or1k/Makefile.in
@@ -0,0 +1,452 @@
+# Makefile.in generated by automake 1.11.6 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 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@
+
+VPATH = @srcdir@
+am__make_dryrun = \
+ { \
+ am__dry=no; \
+ case $$MAKEFLAGS in \
+ *\\[\ \ ]*) \
+ echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \
+ | grep '^AM OK$$' >/dev/null || am__dry=yes;; \
+ *) \
+ for am__flg in $$MAKEFLAGS; do \
+ case $$am__flg in \
+ *=*|--*) ;; \
+ *n*) am__dry=yes; break;; \
+ esac; \
+ done;; \
+ esac; \
+ test $$am__dry = yes; \
+ }
+pkgdatadir = $(datadir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+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@
+subdir = .
+DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
+ $(top_srcdir)/configure $(am__configure_deps) \
+ $(srcdir)/../../../../mkinstalldirs
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/../../../acinclude.m4 \
+ $(top_srcdir)/configure.in
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+ $(ACLOCAL_M4)
+am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
+ configure.lineno config.status.lineno
+mkinstalldirs = $(SHELL) $(top_srcdir)/../../../../mkinstalldirs
+CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+LIBRARIES = $(noinst_LIBRARIES)
+ARFLAGS = cru
+lib_a_AR = $(AR) $(ARFLAGS)
+lib_a_LIBADD =
+am_lib_a_OBJECTS = lib_a-getreent.$(OBJEXT) lib_a-mlock.$(OBJEXT)
+lib_a_OBJECTS = $(am_lib_a_OBJECTS)
+DEFAULT_INCLUDES = -I.@am__isrc@
+depcomp =
+am__depfiles_maybe =
+CPPASCOMPILE = $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CCASFLAGS) $(CCASFLAGS)
+COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+CCLD = $(CC)
+LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
+SOURCES = $(lib_a_SOURCES)
+am__can_run_installinfo = \
+ case $$AM_UPDATE_INFO_DIR in \
+ n|no|NO) false;; \
+ *) (install-info --version) >/dev/null 2>&1;; \
+ esac
+ETAGS = etags
+CTAGS = ctags
+ACLOCAL = @ACLOCAL@
+AMTAR = @AMTAR@
+AR = @AR@
+AS = @AS@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CC = @CC@
+CCAS = @CCAS@
+CCASFLAGS = @CCASFLAGS@
+CCDEPMODE = @CCDEPMODE@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LDFLAGS = @LDFLAGS@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LTLIBOBJS = @LTLIBOBJS@
+MAINT = @MAINT@
+MAKEINFO = @MAKEINFO@
+MKDIR_P = @MKDIR_P@
+NEWLIB_CFLAGS = @NEWLIB_CFLAGS@
+NO_INCLUDE_LIST = @NO_INCLUDE_LIST@
+OBJEXT = @OBJEXT@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+RANLIB = @RANLIB@
+READELF = @READELF@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+VERSION = @VERSION@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+aext = @aext@
+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@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+libm_machine_dir = @libm_machine_dir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+lpfx = @lpfx@
+machine_dir = @machine_dir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+newlib_basedir = @newlib_basedir@
+oext = @oext@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sys_dir = @sys_dir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+AUTOMAKE_OPTIONS = cygnus
+INCLUDES = $(NEWLIB_CFLAGS) $(CROSS_CFLAGS) $(TARGET_CFLAGS)
+AM_CCASFLAGS = $(INCLUDES)
+noinst_LIBRARIES = lib.a
+lib_a_SOURCES = getreent.S mlock.c
+lib_a_CCASFLAGS = $(AM_CCASFLAGS)
+lib_a_CFLAGS = $(AM_CFLAGS)
+ACLOCAL_AMFLAGS = -I ../../.. -I ../../../..
+CONFIG_STATUS_DEPENDENCIES = $(newlib_basedir)/configure.host
+all: all-am
+
+.SUFFIXES:
+.SUFFIXES: .S .c .o .obj
+am--refresh: Makefile
+ @:
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
+ @for dep in $?; do \
+ case '$(am__configure_deps)' in \
+ *$$dep*) \
+ echo ' cd $(srcdir) && $(AUTOMAKE) --cygnus'; \
+ $(am__cd) $(srcdir) && $(AUTOMAKE) --cygnus \
+ && exit 0; \
+ exit 1;; \
+ esac; \
+ done; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --cygnus Makefile'; \
+ $(am__cd) $(top_srcdir) && \
+ $(AUTOMAKE) --cygnus Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ @case '$?' in \
+ *config.status*) \
+ echo ' $(SHELL) ./config.status'; \
+ $(SHELL) ./config.status;; \
+ *) \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \
+ esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+ $(SHELL) ./config.status --recheck
+
+$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
+ $(am__cd) $(srcdir) && $(AUTOCONF)
+$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
+ $(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
+$(am__aclocal_m4_deps):
+
+clean-noinstLIBRARIES:
+ -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES)
+lib.a: $(lib_a_OBJECTS) $(lib_a_DEPENDENCIES) $(EXTRA_lib_a_DEPENDENCIES)
+ -rm -f lib.a
+ $(lib_a_AR) lib.a $(lib_a_OBJECTS) $(lib_a_LIBADD)
+ $(RANLIB) lib.a
+
+mostlyclean-compile:
+ -rm -f *.$(OBJEXT)
+
+distclean-compile:
+ -rm -f *.tab.c
+
+.S.o:
+ $(CPPASCOMPILE) -c -o $@ $<
+
+.S.obj:
+ $(CPPASCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
+
+lib_a-getreent.o: getreent.S
+ $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CCASFLAGS) $(CCASFLAGS) -c -o lib_a-getreent.o `test -f 'getreent.S' || echo '$(srcdir)/'`getreent.S
+
+lib_a-getreent.obj: getreent.S
+ $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CCASFLAGS) $(CCASFLAGS) -c -o lib_a-getreent.obj `if test -f 'getreent.S'; then $(CYGPATH_W) 'getreent.S'; else $(CYGPATH_W) '$(srcdir)/getreent.S'; fi`
+
+.c.o:
+ $(COMPILE) -c $<
+
+.c.obj:
+ $(COMPILE) -c `$(CYGPATH_W) '$<'`
+
+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`
+
+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; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ mkid -fID $$unique
+tags: TAGS
+
+TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ set x; \
+ 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; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ shift; \
+ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
+ test -n "$$unique" || unique=$$empty_fix; \
+ if test $$# -gt 0; then \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ "$$@" $$unique; \
+ else \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ $$unique; \
+ fi; \
+ fi
+ctags: CTAGS
+CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ 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; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ test -z "$(CTAGS_ARGS)$$unique" \
+ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+ $$unique
+
+GTAGS:
+ here=`$(am__cd) $(top_builddir) && pwd` \
+ && $(am__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)
+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:
+ if test -z '$(STRIP)'; then \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ install; \
+ else \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
+ fi
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+ -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+ -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_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-noinstLIBRARIES mostlyclean-am
+
+distclean: distclean-am
+ -rm -f $(am__CONFIG_DISTCLEAN_FILES)
+ -rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+ distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+html-am:
+
+info: info-am
+
+info-am:
+
+install-data-am:
+
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
+install-exec-am:
+
+install-html: install-html-am
+
+install-html-am:
+
+install-info: install-info-am
+
+install-info-am:
+
+install-man:
+
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+ -rm -f $(am__CONFIG_DISTCLEAN_FILES)
+ -rm -rf $(top_srcdir)/autom4te.cache
+ -rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am:
+
+.MAKE: install-am install-strip
+
+.PHONY: CTAGS GTAGS all all-am am--refresh check check-am clean \
+ clean-generic clean-noinstLIBRARIES ctags distclean \
+ distclean-compile distclean-generic distclean-tags dvi dvi-am \
+ html html-am info info-am install install-am install-data \
+ install-data-am install-dvi install-dvi-am install-exec \
+ install-exec-am install-html install-html-am install-info \
+ install-info-am install-man install-pdf install-pdf-am \
+ install-ps install-ps-am install-strip installcheck \
+ installcheck-am installdirs maintainer-clean \
+ maintainer-clean-generic mostlyclean mostlyclean-compile \
+ mostlyclean-generic pdf pdf-am ps ps-am tags uninstall \
+ uninstall-am
+
+
+# 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/sys/or1k/aclocal.m4 b/newlib/libc/sys/or1k/aclocal.m4
new file mode 100644
index 000000000..18dab02aa
--- /dev/null
+++ b/newlib/libc/sys/or1k/aclocal.m4
@@ -0,0 +1,1012 @@
+# generated automatically by aclocal 1.11.6 -*- Autoconf -*-
+
+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
+# 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation,
+# Inc.
+# This file 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.
+
+m4_ifndef([AC_AUTOCONF_VERSION],
+ [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
+m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.68],,
+[m4_warning([this file was generated for autoconf 2.68.
+You have another version of autoconf. It may work, but is not guaranteed to.
+If you have problems, you may need to regenerate the build system entirely.
+To do so, use the procedure documented by the package, typically `autoreconf'.])])
+
+# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008, 2011 Free Software
+# Foundation, Inc.
+#
+# This file 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.
+
+# serial 1
+
+# AM_AUTOMAKE_VERSION(VERSION)
+# ----------------------------
+# Automake X.Y traces this macro to ensure aclocal.m4 has been
+# generated from the m4 files accompanying Automake X.Y.
+# (This private macro should not be called outside this file.)
+AC_DEFUN([AM_AUTOMAKE_VERSION],
+[am__api_version='1.11'
+dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
+dnl require some minimum version. Point them to the right macro.
+m4_if([$1], [1.11.6], [],
+ [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
+])
+
+# _AM_AUTOCONF_VERSION(VERSION)
+# -----------------------------
+# aclocal traces this macro to find the Autoconf version.
+# This is a private macro too. Using m4_define simplifies
+# the logic in aclocal, which can simply ignore this definition.
+m4_define([_AM_AUTOCONF_VERSION], [])
+
+# AM_SET_CURRENT_AUTOMAKE_VERSION
+# -------------------------------
+# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
+# This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
+AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
+[AM_AUTOMAKE_VERSION([1.11.6])dnl
+m4_ifndef([AC_AUTOCONF_VERSION],
+ [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
+_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
+
+# AM_AUX_DIR_EXPAND -*- Autoconf -*-
+
+# Copyright (C) 2001, 2003, 2005, 2011 Free Software Foundation, Inc.
+#
+# This file 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.
+
+# serial 1
+
+# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
+# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to
+# `$srcdir', `$srcdir/..', or `$srcdir/../..'.
+#
+# Of course, Automake must honor this variable whenever it calls a
+# tool from the auxiliary directory. The problem is that $srcdir (and
+# therefore $ac_aux_dir as well) can be either absolute or relative,
+# depending on how configure is run. This is pretty annoying, since
+# it makes $ac_aux_dir quite unusable in subdirectories: in the top
+# source directory, any form will work fine, but in subdirectories a
+# relative path needs to be adjusted first.
+#
+# $ac_aux_dir/missing
+# fails when called from a subdirectory if $ac_aux_dir is relative
+# $top_srcdir/$ac_aux_dir/missing
+# fails if $ac_aux_dir is absolute,
+# fails when called from a subdirectory in a VPATH build with
+# a relative $ac_aux_dir
+#
+# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
+# are both prefixed by $srcdir. In an in-source build this is usually
+# harmless because $srcdir is `.', but things will broke when you
+# start a VPATH build or use an absolute $srcdir.
+#
+# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
+# iff we strip the leading $srcdir from $ac_aux_dir. That would be:
+# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
+# and then we would define $MISSING as
+# MISSING="\${SHELL} $am_aux_dir/missing"
+# This will work as long as MISSING is not called from configure, because
+# unfortunately $(top_srcdir) has no meaning in configure.
+# However there are other variables, like CC, which are often used in
+# configure, and could therefore not use this "fixed" $ac_aux_dir.
+#
+# Another solution, used here, is to always expand $ac_aux_dir to an
+# absolute PATH. The drawback is that using absolute paths prevent a
+# configured tree to be moved without reconfiguration.
+
+AC_DEFUN([AM_AUX_DIR_EXPAND],
+[dnl Rely on autoconf to set up CDPATH properly.
+AC_PREREQ([2.50])dnl
+# expand $ac_aux_dir to an absolute path
+am_aux_dir=`cd $ac_aux_dir && pwd`
+])
+
+# AM_CONDITIONAL -*- Autoconf -*-
+
+# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008
+# Free Software Foundation, Inc.
+#
+# This file 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.
+
+# serial 9
+
+# AM_CONDITIONAL(NAME, SHELL-CONDITION)
+# -------------------------------------
+# Define a conditional.
+AC_DEFUN([AM_CONDITIONAL],
+[AC_PREREQ(2.52)dnl
+ ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])],
+ [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
+AC_SUBST([$1_TRUE])dnl
+AC_SUBST([$1_FALSE])dnl
+_AM_SUBST_NOTMAKE([$1_TRUE])dnl
+_AM_SUBST_NOTMAKE([$1_FALSE])dnl
+m4_define([_AM_COND_VALUE_$1], [$2])dnl
+if $2; then
+ $1_TRUE=
+ $1_FALSE='#'
+else
+ $1_TRUE='#'
+ $1_FALSE=
+fi
+AC_CONFIG_COMMANDS_PRE(
+[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
+ AC_MSG_ERROR([[conditional "$1" was never defined.
+Usually this means the macro was only invoked conditionally.]])
+fi])])
+
+# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009,
+# 2010, 2011 Free Software Foundation, Inc.
+#
+# This file 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.
+
+# serial 12
+
+# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
+# written in clear, in which case automake, when reading aclocal.m4,
+# will think it sees a *use*, and therefore will trigger all it's
+# C support machinery. Also note that it means that autoscan, seeing
+# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
+
+
+# _AM_DEPENDENCIES(NAME)
+# ----------------------
+# See how the compiler implements dependency checking.
+# NAME is "CC", "CXX", "GCJ", or "OBJC".
+# We try a few techniques and use that to set a single cache variable.
+#
+# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
+# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
+# dependency, and given that the user is not expected to run this macro,
+# just rely on AC_PROG_CC.
+AC_DEFUN([_AM_DEPENDENCIES],
+[AC_REQUIRE([AM_SET_DEPDIR])dnl
+AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
+AC_REQUIRE([AM_MAKE_INCLUDE])dnl
+AC_REQUIRE([AM_DEP_TRACK])dnl
+
+ifelse([$1], CC, [depcc="$CC" am_compiler_list=],
+ [$1], CXX, [depcc="$CXX" am_compiler_list=],
+ [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
+ [$1], UPC, [depcc="$UPC" am_compiler_list=],
+ [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'],
+ [depcc="$$1" am_compiler_list=])
+
+AC_CACHE_CHECK([dependency style of $depcc],
+ [am_cv_$1_dependencies_compiler_type],
+[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
+ # We make a subdir and do the tests there. Otherwise we can end up
+ # making bogus files that we don't know about and never remove. For
+ # instance it was reported that on HP-UX the gcc test will end up
+ # making a dummy file named `D' -- because `-MD' means `put the output
+ # in D'.
+ rm -rf conftest.dir
+ mkdir conftest.dir
+ # Copy depcomp to subdir because otherwise we won't find it if we're
+ # using a relative directory.
+ cp "$am_depcomp" conftest.dir
+ cd conftest.dir
+ # We will build objects and dependencies in a subdirectory because
+ # it helps to detect inapplicable dependency modes. For instance
+ # both Tru64's cc and ICC support -MD to output dependencies as a
+ # side effect of compilation, but ICC will put the dependencies in
+ # the current directory while Tru64 will put them in the object
+ # directory.
+ mkdir sub
+
+ am_cv_$1_dependencies_compiler_type=none
+ if test "$am_compiler_list" = ""; then
+ am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
+ fi
+ am__universal=false
+ m4_case([$1], [CC],
+ [case " $depcc " in #(
+ *\ -arch\ *\ -arch\ *) am__universal=true ;;
+ esac],
+ [CXX],
+ [case " $depcc " in #(
+ *\ -arch\ *\ -arch\ *) am__universal=true ;;
+ esac])
+
+ for depmode in $am_compiler_list; do
+ # Setup a source with many dependencies, because some compilers
+ # like to wrap large dependency lists on column 80 (with \), and
+ # we should not choose a depcomp mode which is confused by this.
+ #
+ # We need to recreate these files for each test, as the compiler may
+ # overwrite some of them when testing with obscure command lines.
+ # This happens at least with the AIX C compiler.
+ : > sub/conftest.c
+ for i in 1 2 3 4 5 6; do
+ echo '#include "conftst'$i'.h"' >> sub/conftest.c
+ # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
+ # Solaris 8's {/usr,}/bin/sh.
+ touch sub/conftst$i.h
+ done
+ echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
+
+ # We check with `-c' and `-o' for the sake of the "dashmstdout"
+ # mode. It turns out that the SunPro C++ compiler does not properly
+ # handle `-M -o', and we need to detect this. Also, some Intel
+ # versions had trouble with output in subdirs
+ am__obj=sub/conftest.${OBJEXT-o}
+ am__minus_obj="-o $am__obj"
+ case $depmode in
+ gcc)
+ # This depmode causes a compiler race in universal mode.
+ test "$am__universal" = false || continue
+ ;;
+ nosideeffect)
+ # after this tag, mechanisms are not by side-effect, so they'll
+ # only be used when explicitly requested
+ if test "x$enable_dependency_tracking" = xyes; then
+ continue
+ else
+ break
+ fi
+ ;;
+ msvc7 | msvc7msys | msvisualcpp | msvcmsys)
+ # This compiler won't grok `-c -o', but also, the minuso test has
+ # not run yet. These depmodes are late enough in the game, and
+ # so weak that their functioning should not be impacted.
+ am__obj=conftest.${OBJEXT-o}
+ am__minus_obj=
+ ;;
+ none) break ;;
+ esac
+ if depmode=$depmode \
+ source=sub/conftest.c object=$am__obj \
+ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
+ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
+ >/dev/null 2>conftest.err &&
+ grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
+ grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
+ grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
+ ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
+ # icc doesn't choke on unknown options, it will just issue warnings
+ # or remarks (even with -Werror). So we grep stderr for any message
+ # that says an option was ignored or not supported.
+ # When given -MP, icc 7.0 and 7.1 complain thusly:
+ # icc: Command line warning: ignoring option '-M'; no argument required
+ # The diagnosis changed in icc 8.0:
+ # icc: Command line remark: option '-MP' not supported
+ if (grep 'ignoring option' conftest.err ||
+ grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
+ am_cv_$1_dependencies_compiler_type=$depmode
+ break
+ fi
+ fi
+ done
+
+ cd ..
+ rm -rf conftest.dir
+else
+ am_cv_$1_dependencies_compiler_type=none
+fi
+])
+AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
+AM_CONDITIONAL([am__fastdep$1], [
+ test "x$enable_dependency_tracking" != xno \
+ && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
+])
+
+
+# AM_SET_DEPDIR
+# -------------
+# Choose a directory name for dependency files.
+# This macro is AC_REQUIREd in _AM_DEPENDENCIES
+AC_DEFUN([AM_SET_DEPDIR],
+[AC_REQUIRE([AM_SET_LEADING_DOT])dnl
+AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
+])
+
+
+# AM_DEP_TRACK
+# ------------
+AC_DEFUN([AM_DEP_TRACK],
+[AC_ARG_ENABLE(dependency-tracking,
+[ --disable-dependency-tracking speeds up one-time build
+ --enable-dependency-tracking do not reject slow dependency extractors])
+if test "x$enable_dependency_tracking" != xno; then
+ am_depcomp="$ac_aux_dir/depcomp"
+ AMDEPBACKSLASH='\'
+ am__nodep='_no'
+fi
+AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
+AC_SUBST([AMDEPBACKSLASH])dnl
+_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
+AC_SUBST([am__nodep])dnl
+_AM_SUBST_NOTMAKE([am__nodep])dnl
+])
+
+# Generate code to set up dependency tracking. -*- Autoconf -*-
+
+# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008
+# Free Software Foundation, Inc.
+#
+# This file 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.
+
+#serial 5
+
+# _AM_OUTPUT_DEPENDENCY_COMMANDS
+# ------------------------------
+AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
+[{
+ # Autoconf 2.62 quotes --file arguments for eval, but not when files
+ # are listed without --file. Let's play safe and only enable the eval
+ # if we detect the quoting.
+ case $CONFIG_FILES in
+ *\'*) eval set x "$CONFIG_FILES" ;;
+ *) set x $CONFIG_FILES ;;
+ esac
+ shift
+ for mf
+ do
+ # Strip MF so we end up with the name of the file.
+ mf=`echo "$mf" | sed -e 's/:.*$//'`
+ # Check whether this is an Automake generated Makefile or not.
+ # We used to match only the files named `Makefile.in', but
+ # some people rename them; so instead we look at the file content.
+ # Grep'ing the first line is not enough: some people post-process
+ # each Makefile.in and add a new line on top of each file to say so.
+ # Grep'ing the whole file is not good either: AIX grep has a line
+ # limit of 2048, but all sed's we know have understand at least 4000.
+ if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
+ dirpart=`AS_DIRNAME("$mf")`
+ else
+ continue
+ fi
+ # Extract the definition of DEPDIR, am__include, and am__quote
+ # from the Makefile without running `make'.
+ DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
+ test -z "$DEPDIR" && continue
+ am__include=`sed -n 's/^am__include = //p' < "$mf"`
+ test -z "am__include" && continue
+ am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
+ # When using ansi2knr, U may be empty or an underscore; expand it
+ U=`sed -n 's/^U = //p' < "$mf"`
+ # Find all dependency output files, they are included files with
+ # $(DEPDIR) in their names. We invoke sed twice because it is the
+ # simplest approach to changing $(DEPDIR) to its actual value in the
+ # expansion.
+ for file in `sed -n "
+ s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
+ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
+ # Make sure the directory exists.
+ test -f "$dirpart/$file" && continue
+ fdir=`AS_DIRNAME(["$file"])`
+ AS_MKDIR_P([$dirpart/$fdir])
+ # echo "creating $dirpart/$file"
+ echo '# dummy' > "$dirpart/$file"
+ done
+ done
+}
+])# _AM_OUTPUT_DEPENDENCY_COMMANDS
+
+
+# AM_OUTPUT_DEPENDENCY_COMMANDS
+# -----------------------------
+# This macro should only be invoked once -- use via AC_REQUIRE.
+#
+# This code is only required when automatic dependency tracking
+# is enabled. FIXME. This creates each `.P' file that we will
+# need in order to bootstrap the dependency handling code.
+AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
+[AC_CONFIG_COMMANDS([depfiles],
+ [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
+ [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
+])
+
+# Do all the work for Automake. -*- Autoconf -*-
+
+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
+# 2005, 2006, 2008, 2009 Free Software Foundation, Inc.
+#
+# This file 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.
+
+# serial 16
+
+# This macro actually does too much. Some checks are only needed if
+# your package does certain things. But this isn't really a big deal.
+
+# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
+# AM_INIT_AUTOMAKE([OPTIONS])
+# -----------------------------------------------
+# The call with PACKAGE and VERSION arguments is the old style
+# call (pre autoconf-2.50), which is being phased out. PACKAGE
+# and VERSION should now be passed to AC_INIT and removed from
+# the call to AM_INIT_AUTOMAKE.
+# We support both call styles for the transition. After
+# the next Automake release, Autoconf can make the AC_INIT
+# arguments mandatory, and then we can depend on a new Autoconf
+# release and drop the old call support.
+AC_DEFUN([AM_INIT_AUTOMAKE],
+[AC_PREREQ([2.62])dnl
+dnl Autoconf wants to disallow AM_ names. We explicitly allow
+dnl the ones we care about.
+m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
+AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
+AC_REQUIRE([AC_PROG_INSTALL])dnl
+if test "`cd $srcdir && pwd`" != "`pwd`"; then
+ # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
+ # is not polluted with repeated "-I."
+ AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
+ # test to see if srcdir already configured
+ if test -f $srcdir/config.status; then
+ AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
+ fi
+fi
+
+# test whether we have cygpath
+if test -z "$CYGPATH_W"; then
+ if (cygpath --version) >/dev/null 2>/dev/null; then
+ CYGPATH_W='cygpath -w'
+ else
+ CYGPATH_W=echo
+ fi
+fi
+AC_SUBST([CYGPATH_W])
+
+# Define the identity of the package.
+dnl Distinguish between old-style and new-style calls.
+m4_ifval([$2],
+[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
+ AC_SUBST([PACKAGE], [$1])dnl
+ AC_SUBST([VERSION], [$2])],
+[_AM_SET_OPTIONS([$1])dnl
+dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
+m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,,
+ [m4_fatal([AC_INIT should be called with package and version arguments])])dnl
+ AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
+ AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
+
+_AM_IF_OPTION([no-define],,
+[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
+ AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
+
+# Some tools Automake needs.
+AC_REQUIRE([AM_SANITY_CHECK])dnl
+AC_REQUIRE([AC_ARG_PROGRAM])dnl
+AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
+AM_MISSING_PROG(AUTOCONF, autoconf)
+AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
+AM_MISSING_PROG(AUTOHEADER, autoheader)
+AM_MISSING_PROG(MAKEINFO, makeinfo)
+AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
+AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl
+AC_REQUIRE([AM_PROG_MKDIR_P])dnl
+# We need awk for the "check" target. The system "awk" is bad on
+# some platforms.
+AC_REQUIRE([AC_PROG_AWK])dnl
+AC_REQUIRE([AC_PROG_MAKE_SET])dnl
+AC_REQUIRE([AM_SET_LEADING_DOT])dnl
+_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
+ [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
+ [_AM_PROG_TAR([v7])])])
+_AM_IF_OPTION([no-dependencies],,
+[AC_PROVIDE_IFELSE([AC_PROG_CC],
+ [_AM_DEPENDENCIES(CC)],
+ [define([AC_PROG_CC],
+ defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
+AC_PROVIDE_IFELSE([AC_PROG_CXX],
+ [_AM_DEPENDENCIES(CXX)],
+ [define([AC_PROG_CXX],
+ defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
+AC_PROVIDE_IFELSE([AC_PROG_OBJC],
+ [_AM_DEPENDENCIES(OBJC)],
+ [define([AC_PROG_OBJC],
+ defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl
+])
+_AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl
+dnl The `parallel-tests' driver may need to know about EXEEXT, so add the
+dnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This macro
+dnl is hooked onto _AC_COMPILER_EXEEXT early, see below.
+AC_CONFIG_COMMANDS_PRE(dnl
+[m4_provide_if([_AM_COMPILER_EXEEXT],
+ [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
+])
+
+dnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion. Do not
+dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further
+dnl mangled by Autoconf and run in a shell conditional statement.
+m4_define([_AC_COMPILER_EXEEXT],
+m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])])
+
+
+# When config.status generates a header, we must update the stamp-h file.
+# This file resides in the same directory as the config header
+# that is generated. The stamp files are numbered to have different names.
+
+# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
+# loop where config.status creates the headers, so we can generate
+# our stamp files there.
+AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
+[# Compute $1's index in $config_headers.
+_am_arg=$1
+_am_stamp_count=1
+for _am_header in $config_headers :; do
+ case $_am_header in
+ $_am_arg | $_am_arg:* )
+ break ;;
+ * )
+ _am_stamp_count=`expr $_am_stamp_count + 1` ;;
+ esac
+done
+echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
+
+# Copyright (C) 2001, 2003, 2005, 2008, 2011 Free Software Foundation,
+# Inc.
+#
+# This file 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.
+
+# serial 1
+
+# AM_PROG_INSTALL_SH
+# ------------------
+# Define $install_sh.
+AC_DEFUN([AM_PROG_INSTALL_SH],
+[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
+if test x"${install_sh}" != xset; then
+ case $am_aux_dir in
+ *\ * | *\ *)
+ install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
+ *)
+ install_sh="\${SHELL} $am_aux_dir/install-sh"
+ esac
+fi
+AC_SUBST(install_sh)])
+
+# Copyright (C) 2003, 2005 Free Software Foundation, Inc.
+#
+# This file 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.
+
+# serial 2
+
+# Check whether the underlying file-system supports filenames
+# with a leading dot. For instance MS-DOS doesn't.
+AC_DEFUN([AM_SET_LEADING_DOT],
+[rm -rf .tst 2>/dev/null
+mkdir .tst 2>/dev/null
+if test -d .tst; then
+ am__leading_dot=.
+else
+ am__leading_dot=_
+fi
+rmdir .tst 2>/dev/null
+AC_SUBST([am__leading_dot])])
+
+# Add --enable-maintainer-mode option to configure. -*- Autoconf -*-
+# From Jim Meyering
+
+# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005, 2008,
+# 2011 Free Software Foundation, Inc.
+#
+# This file 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.
+
+# serial 5
+
+# AM_MAINTAINER_MODE([DEFAULT-MODE])
+# ----------------------------------
+# Control maintainer-specific portions of Makefiles.
+# Default is to disable them, unless `enable' is passed literally.
+# For symmetry, `disable' may be passed as well. Anyway, the user
+# can override the default with the --enable/--disable switch.
+AC_DEFUN([AM_MAINTAINER_MODE],
+[m4_case(m4_default([$1], [disable]),
+ [enable], [m4_define([am_maintainer_other], [disable])],
+ [disable], [m4_define([am_maintainer_other], [enable])],
+ [m4_define([am_maintainer_other], [enable])
+ m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])])
+AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
+ dnl maintainer-mode's default is 'disable' unless 'enable' is passed
+ AC_ARG_ENABLE([maintainer-mode],
+[ --][am_maintainer_other][-maintainer-mode am_maintainer_other make rules and dependencies not useful
+ (and sometimes confusing) to the casual installer],
+ [USE_MAINTAINER_MODE=$enableval],
+ [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes]))
+ AC_MSG_RESULT([$USE_MAINTAINER_MODE])
+ AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes])
+ MAINT=$MAINTAINER_MODE_TRUE
+ AC_SUBST([MAINT])dnl
+]
+)
+
+AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE])
+
+# Check to see how 'make' treats includes. -*- Autoconf -*-
+
+# Copyright (C) 2001, 2002, 2003, 2005, 2009 Free Software Foundation, Inc.
+#
+# This file 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.
+
+# serial 4
+
+# AM_MAKE_INCLUDE()
+# -----------------
+# Check to see how make treats includes.
+AC_DEFUN([AM_MAKE_INCLUDE],
+[am_make=${MAKE-make}
+cat > confinc << 'END'
+am__doit:
+ @echo this is the am__doit target
+.PHONY: am__doit
+END
+# If we don't find an include directive, just comment out the code.
+AC_MSG_CHECKING([for style of include used by $am_make])
+am__include="#"
+am__quote=
+_am_result=none
+# First try GNU make style include.
+echo "include confinc" > confmf
+# Ignore all kinds of additional output from `make'.
+case `$am_make -s -f confmf 2> /dev/null` in #(
+*the\ am__doit\ target*)
+ am__include=include
+ am__quote=
+ _am_result=GNU
+ ;;
+esac
+# Now try BSD make style include.
+if test "$am__include" = "#"; then
+ echo '.include "confinc"' > confmf
+ case `$am_make -s -f confmf 2> /dev/null` in #(
+ *the\ am__doit\ target*)
+ am__include=.include
+ am__quote="\""
+ _am_result=BSD
+ ;;
+ esac
+fi
+AC_SUBST([am__include])
+AC_SUBST([am__quote])
+AC_MSG_RESULT([$_am_result])
+rm -f confinc confmf
+])
+
+# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*-
+
+# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008
+# Free Software Foundation, Inc.
+#
+# This file 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.
+
+# serial 6
+
+# AM_MISSING_PROG(NAME, PROGRAM)
+# ------------------------------
+AC_DEFUN([AM_MISSING_PROG],
+[AC_REQUIRE([AM_MISSING_HAS_RUN])
+$1=${$1-"${am_missing_run}$2"}
+AC_SUBST($1)])
+
+
+# AM_MISSING_HAS_RUN
+# ------------------
+# Define MISSING if not defined so far and test if it supports --run.
+# If it does, set am_missing_run to use it, otherwise, to nothing.
+AC_DEFUN([AM_MISSING_HAS_RUN],
+[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
+AC_REQUIRE_AUX_FILE([missing])dnl
+if test x"${MISSING+set}" != xset; then
+ case $am_aux_dir in
+ *\ * | *\ *)
+ MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
+ *)
+ MISSING="\${SHELL} $am_aux_dir/missing" ;;
+ esac
+fi
+# Use eval to expand $SHELL
+if eval "$MISSING --run true"; then
+ am_missing_run="$MISSING --run "
+else
+ am_missing_run=
+ AC_MSG_WARN([`missing' script is too old or missing])
+fi
+])
+
+# Copyright (C) 2003, 2004, 2005, 2006, 2011 Free Software Foundation,
+# Inc.
+#
+# This file 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.
+
+# serial 1
+
+# AM_PROG_MKDIR_P
+# ---------------
+# Check for `mkdir -p'.
+AC_DEFUN([AM_PROG_MKDIR_P],
+[AC_PREREQ([2.60])dnl
+AC_REQUIRE([AC_PROG_MKDIR_P])dnl
+dnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P,
+dnl while keeping a definition of mkdir_p for backward compatibility.
+dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile.
+dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of
+dnl Makefile.ins that do not define MKDIR_P, so we do our own
+dnl adjustment using top_builddir (which is defined more often than
+dnl MKDIR_P).
+AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl
+case $mkdir_p in
+ [[\\/$]]* | ?:[[\\/]]*) ;;
+ */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
+esac
+])
+
+# Helper functions for option handling. -*- Autoconf -*-
+
+# Copyright (C) 2001, 2002, 2003, 2005, 2008, 2010 Free Software
+# Foundation, Inc.
+#
+# This file 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.
+
+# serial 5
+
+# _AM_MANGLE_OPTION(NAME)
+# -----------------------
+AC_DEFUN([_AM_MANGLE_OPTION],
+[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
+
+# _AM_SET_OPTION(NAME)
+# --------------------
+# Set option NAME. Presently that only means defining a flag for this option.
+AC_DEFUN([_AM_SET_OPTION],
+[m4_define(_AM_MANGLE_OPTION([$1]), 1)])
+
+# _AM_SET_OPTIONS(OPTIONS)
+# ------------------------
+# OPTIONS is a space-separated list of Automake options.
+AC_DEFUN([_AM_SET_OPTIONS],
+[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
+
+# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
+# -------------------------------------------
+# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
+AC_DEFUN([_AM_IF_OPTION],
+[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
+
+# Check to make sure that the build environment is sane. -*- Autoconf -*-
+
+# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008
+# Free Software Foundation, Inc.
+#
+# This file 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.
+
+# serial 5
+
+# AM_SANITY_CHECK
+# ---------------
+AC_DEFUN([AM_SANITY_CHECK],
+[AC_MSG_CHECKING([whether build environment is sane])
+# Just in case
+sleep 1
+echo timestamp > conftest.file
+# Reject unsafe characters in $srcdir or the absolute working directory
+# name. Accept space and tab only in the latter.
+am_lf='
+'
+case `pwd` in
+ *[[\\\"\#\$\&\'\`$am_lf]]*)
+ AC_MSG_ERROR([unsafe absolute working directory name]);;
+esac
+case $srcdir in
+ *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*)
+ AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);;
+esac
+
+# Do `set' in a subshell so we don't clobber the current shell's
+# arguments. Must try -L first in case configure is actually a
+# symlink; some systems play weird games with the mod time of symlinks
+# (eg FreeBSD returns the mod time of the symlink's containing
+# directory).
+if (
+ set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
+ if test "$[*]" = "X"; then
+ # -L didn't work.
+ set X `ls -t "$srcdir/configure" conftest.file`
+ fi
+ rm -f conftest.file
+ if test "$[*]" != "X $srcdir/configure conftest.file" \
+ && test "$[*]" != "X conftest.file $srcdir/configure"; then
+
+ # If neither matched, then we have a broken ls. This can happen
+ # if, for instance, CONFIG_SHELL is bash and it inherits a
+ # broken ls alias from the environment. This has actually
+ # happened. Such a system could not be considered "sane".
+ AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
+alias in your environment])
+ fi
+
+ test "$[2]" = conftest.file
+ )
+then
+ # Ok.
+ :
+else
+ AC_MSG_ERROR([newly created file is older than distributed files!
+Check your system clock])
+fi
+AC_MSG_RESULT(yes)])
+
+# Copyright (C) 2001, 2003, 2005, 2011 Free Software Foundation, Inc.
+#
+# This file 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.
+
+# serial 1
+
+# AM_PROG_INSTALL_STRIP
+# ---------------------
+# One issue with vendor `install' (even GNU) is that you can't
+# specify the program used to strip binaries. This is especially
+# annoying in cross-compiling environments, where the build's strip
+# is unlikely to handle the host's binaries.
+# Fortunately install-sh will honor a STRIPPROG variable, so we
+# always use install-sh in `make install-strip', and initialize
+# STRIPPROG with the value of the STRIP variable (set by the user).
+AC_DEFUN([AM_PROG_INSTALL_STRIP],
+[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
+# Installed binaries are usually stripped using `strip' when the user
+# run `make install-strip'. However `strip' might not be the right
+# tool to use in cross-compilation environments, therefore Automake
+# will honor the `STRIP' environment variable to overrule this program.
+dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
+if test "$cross_compiling" != no; then
+ AC_CHECK_TOOL([STRIP], [strip], :)
+fi
+INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
+AC_SUBST([INSTALL_STRIP_PROGRAM])])
+
+# Copyright (C) 2006, 2008, 2010 Free Software Foundation, Inc.
+#
+# This file 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.
+
+# serial 3
+
+# _AM_SUBST_NOTMAKE(VARIABLE)
+# ---------------------------
+# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
+# This macro is traced by Automake.
+AC_DEFUN([_AM_SUBST_NOTMAKE])
+
+# AM_SUBST_NOTMAKE(VARIABLE)
+# --------------------------
+# Public sister of _AM_SUBST_NOTMAKE.
+AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
+
+# Check how to create a tarball. -*- Autoconf -*-
+
+# Copyright (C) 2004, 2005, 2012 Free Software Foundation, Inc.
+#
+# This file 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.
+
+# serial 2
+
+# _AM_PROG_TAR(FORMAT)
+# --------------------
+# Check how to create a tarball in format FORMAT.
+# FORMAT should be one of `v7', `ustar', or `pax'.
+#
+# Substitute a variable $(am__tar) that is a command
+# writing to stdout a FORMAT-tarball containing the directory
+# $tardir.
+# tardir=directory && $(am__tar) > result.tar
+#
+# Substitute a variable $(am__untar) that extract such
+# a tarball read from stdin.
+# $(am__untar) < result.tar
+AC_DEFUN([_AM_PROG_TAR],
+[# Always define AMTAR for backward compatibility. Yes, it's still used
+# in the wild :-( We should find a proper way to deprecate it ...
+AC_SUBST([AMTAR], ['$${TAR-tar}'])
+m4_if([$1], [v7],
+ [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'],
+ [m4_case([$1], [ustar],, [pax],,
+ [m4_fatal([Unknown tar format])])
+AC_MSG_CHECKING([how to create a $1 tar archive])
+# Loop over all known methods to create a tar archive until one works.
+_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
+_am_tools=${am_cv_prog_tar_$1-$_am_tools}
+# Do not fold the above two line into one, because Tru64 sh and
+# Solaris sh will not grok spaces in the rhs of `-'.
+for _am_tool in $_am_tools
+do
+ case $_am_tool in
+ gnutar)
+ for _am_tar in tar gnutar gtar;
+ do
+ AM_RUN_LOG([$_am_tar --version]) && break
+ done
+ am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
+ am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
+ am__untar="$_am_tar -xf -"
+ ;;
+ plaintar)
+ # Must skip GNU tar: if it does not support --format= it doesn't create
+ # ustar tarball either.
+ (tar --version) >/dev/null 2>&1 && continue
+ am__tar='tar chf - "$$tardir"'
+ am__tar_='tar chf - "$tardir"'
+ am__untar='tar xf -'
+ ;;
+ pax)
+ am__tar='pax -L -x $1 -w "$$tardir"'
+ am__tar_='pax -L -x $1 -w "$tardir"'
+ am__untar='pax -r'
+ ;;
+ cpio)
+ am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
+ am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
+ am__untar='cpio -i -H $1 -d'
+ ;;
+ none)
+ am__tar=false
+ am__tar_=false
+ am__untar=false
+ ;;
+ esac
+
+ # If the value was cached, stop now. We just wanted to have am__tar
+ # and am__untar set.
+ test -n "${am_cv_prog_tar_$1}" && break
+
+ # tar/untar a dummy directory, and stop if the command works
+ rm -rf conftest.dir
+ mkdir conftest.dir
+ echo GrepMe > conftest.dir/file
+ AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
+ rm -rf conftest.dir
+ if test -s conftest.tar; then
+ AM_RUN_LOG([$am__untar <conftest.tar])
+ grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
+ fi
+done
+rm -rf conftest.dir
+
+AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
+AC_MSG_RESULT([$am_cv_prog_tar_$1])])
+AC_SUBST([am__tar])
+AC_SUBST([am__untar])
+]) # _AM_PROG_TAR
+
+m4_include([../../../acinclude.m4])
diff --git a/newlib/libc/sys/or1k/configure b/newlib/libc/sys/or1k/configure
new file mode 100755
index 000000000..376030a38
--- /dev/null
+++ b/newlib/libc/sys/or1k/configure
@@ -0,0 +1,4748 @@
+#! /bin/sh
+# Guess values for system-dependent variables and create Makefiles.
+# Generated by GNU Autoconf 2.68 for newlib 2.4.0.
+#
+#
+# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
+# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software
+# Foundation, Inc.
+#
+#
+# This configure script is free software; the Free Software Foundation
+# gives unlimited permission to copy, distribute and modify it.
+## -------------------- ##
+## M4sh Initialization. ##
+## -------------------- ##
+
+# Be more Bourne compatible
+DUALCASE=1; export DUALCASE # for MKS sh
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
+ emulate sh
+ NULLCMD=:
+ # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
+ # is contrary to our usage. Disable this feature.
+ alias -g '${1+"$@"}'='"$@"'
+ setopt NO_GLOB_SUBST
+else
+ case `(set -o) 2>/dev/null` in #(
+ *posix*) :
+ set -o posix ;; #(
+ *) :
+ ;;
+esac
+fi
+
+
+as_nl='
+'
+export as_nl
+# Printing a long string crashes Solaris 7 /usr/bin/printf.
+as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
+as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
+as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
+# Prefer a ksh shell builtin over an external printf program on Solaris,
+# but without wasting forks for bash or zsh.
+if test -z "$BASH_VERSION$ZSH_VERSION" \
+ && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
+ as_echo='print -r --'
+ as_echo_n='print -rn --'
+elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
+ as_echo='printf %s\n'
+ as_echo_n='printf %s'
+else
+ if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
+ as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
+ as_echo_n='/usr/ucb/echo -n'
+ else
+ as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
+ as_echo_n_body='eval
+ arg=$1;
+ case $arg in #(
+ *"$as_nl"*)
+ expr "X$arg" : "X\\(.*\\)$as_nl";
+ arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
+ esac;
+ expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
+ '
+ export as_echo_n_body
+ as_echo_n='sh -c $as_echo_n_body as_echo'
+ fi
+ export as_echo_body
+ as_echo='sh -c $as_echo_body as_echo'
+fi
+
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+ PATH_SEPARATOR=:
+ (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
+ (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
+ PATH_SEPARATOR=';'
+ }
+fi
+
+
+# IFS
+# We need space, tab and new line, in precisely that order. Quoting is
+# there to prevent editors from complaining about space-tab.
+# (If _AS_PATH_WALK were called with IFS unset, it would disable word
+# splitting by setting IFS to empty value.)
+IFS=" "" $as_nl"
+
+# Find who we are. Look in the path if we contain no directory separator.
+as_myself=
+case $0 in #((
+ *[\\/]* ) as_myself=$0 ;;
+ *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
+ done
+IFS=$as_save_IFS
+
+ ;;
+esac
+# We did not find ourselves, most probably we were run as `sh COMMAND'
+# in which case we are not to be found in the path.
+if test "x$as_myself" = x; then
+ as_myself=$0
+fi
+if test ! -f "$as_myself"; then
+ $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
+ exit 1
+fi
+
+# Unset variables that we do not need and which cause bugs (e.g. in
+# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
+# suppresses any "Segmentation fault" message there. '((' could
+# trigger a bug in pdksh 5.2.14.
+for as_var in BASH_ENV ENV MAIL MAILPATH
+do eval test x\${$as_var+set} = xset \
+ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
+done
+PS1='$ '
+PS2='> '
+PS4='+ '
+
+# NLS nuisances.
+LC_ALL=C
+export LC_ALL
+LANGUAGE=C
+export LANGUAGE
+
+# CDPATH.
+(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
+
+if test "x$CONFIG_SHELL" = x; then
+ as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
+ emulate sh
+ NULLCMD=:
+ # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
+ # is contrary to our usage. Disable this feature.
+ alias -g '\${1+\"\$@\"}'='\"\$@\"'
+ setopt NO_GLOB_SUBST
+else
+ case \`(set -o) 2>/dev/null\` in #(
+ *posix*) :
+ set -o posix ;; #(
+ *) :
+ ;;
+esac
+fi
+"
+ as_required="as_fn_return () { (exit \$1); }
+as_fn_success () { as_fn_return 0; }
+as_fn_failure () { as_fn_return 1; }
+as_fn_ret_success () { return 0; }
+as_fn_ret_failure () { return 1; }
+
+exitcode=0
+as_fn_success || { exitcode=1; echo as_fn_success failed.; }
+as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
+as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
+as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
+if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
+
+else
+ exitcode=1; echo positional parameters were not saved.
+fi
+test x\$exitcode = x0 || exit 1"
+ as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
+ as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
+ eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
+ test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1"
+ if (eval "$as_required") 2>/dev/null; then :
+ as_have_required=yes
+else
+ as_have_required=no
+fi
+ if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
+
+else
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+as_found=false
+for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ as_found=:
+ case $as_dir in #(
+ /*)
+ for as_base in sh bash ksh sh5; do
+ # Try only shells that exist, to save several forks.
+ as_shell=$as_dir/$as_base
+ if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
+ { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
+ CONFIG_SHELL=$as_shell as_have_required=yes
+ if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
+ break 2
+fi
+fi
+ done;;
+ esac
+ as_found=false
+done
+$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
+ { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
+ CONFIG_SHELL=$SHELL as_have_required=yes
+fi; }
+IFS=$as_save_IFS
+
+
+ if test "x$CONFIG_SHELL" != x; then :
+ # We cannot yet assume a decent shell, so we have to provide a
+ # neutralization value for shells without unset; and this also
+ # works around shells that cannot unset nonexistent variables.
+ # Preserve -v and -x to the replacement shell.
+ BASH_ENV=/dev/null
+ ENV=/dev/null
+ (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
+ export CONFIG_SHELL
+ case $- in # ((((
+ *v*x* | *x*v* ) as_opts=-vx ;;
+ *v* ) as_opts=-v ;;
+ *x* ) as_opts=-x ;;
+ * ) as_opts= ;;
+ esac
+ exec "$CONFIG_SHELL" $as_opts "$as_myself" ${1+"$@"}
+fi
+
+ if test x$as_have_required = xno; then :
+ $as_echo "$0: This script requires a shell more modern than all"
+ $as_echo "$0: the shells that I found on your system."
+ if test x${ZSH_VERSION+set} = xset ; then
+ $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
+ $as_echo "$0: be upgraded to zsh 4.3.4 or later."
+ else
+ $as_echo "$0: Please tell bug-autoconf@gnu.org about your system,
+$0: including any error possibly output before this
+$0: message. Then install a modern shell, or manually run
+$0: the script under such a shell if you do have one."
+ fi
+ exit 1
+fi
+fi
+fi
+SHELL=${CONFIG_SHELL-/bin/sh}
+export SHELL
+# Unset more variables known to interfere with behavior of common tools.
+CLICOLOR_FORCE= GREP_OPTIONS=
+unset CLICOLOR_FORCE GREP_OPTIONS
+
+## --------------------- ##
+## M4sh Shell Functions. ##
+## --------------------- ##
+# as_fn_unset VAR
+# ---------------
+# Portably unset VAR.
+as_fn_unset ()
+{
+ { eval $1=; unset $1;}
+}
+as_unset=as_fn_unset
+
+# as_fn_set_status STATUS
+# -----------------------
+# Set $? to STATUS, without forking.
+as_fn_set_status ()
+{
+ return $1
+} # as_fn_set_status
+
+# as_fn_exit STATUS
+# -----------------
+# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
+as_fn_exit ()
+{
+ set +e
+ as_fn_set_status $1
+ exit $1
+} # as_fn_exit
+
+# as_fn_mkdir_p
+# -------------
+# Create "$as_dir" as a directory, including parents if necessary.
+as_fn_mkdir_p ()
+{
+
+ case $as_dir in #(
+ -*) as_dir=./$as_dir;;
+ esac
+ test -d "$as_dir" || eval $as_mkdir_p || {
+ as_dirs=
+ while :; do
+ case $as_dir in #(
+ *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
+ *) as_qdir=$as_dir;;
+ esac
+ as_dirs="'$as_qdir' $as_dirs"
+ as_dir=`$as_dirname -- "$as_dir" ||
+$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$as_dir" : 'X\(//\)[^/]' \| \
+ X"$as_dir" : 'X\(//\)$' \| \
+ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$as_dir" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)[^/].*/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+ test -d "$as_dir" && break
+ done
+ test -z "$as_dirs" || eval "mkdir $as_dirs"
+ } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
+
+
+} # as_fn_mkdir_p
+# as_fn_append VAR VALUE
+# ----------------------
+# Append the text in VALUE to the end of the definition contained in VAR. Take
+# advantage of any shell optimizations that allow amortized linear growth over
+# repeated appends, instead of the typical quadratic growth present in naive
+# implementations.
+if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
+ eval 'as_fn_append ()
+ {
+ eval $1+=\$2
+ }'
+else
+ as_fn_append ()
+ {
+ eval $1=\$$1\$2
+ }
+fi # as_fn_append
+
+# as_fn_arith ARG...
+# ------------------
+# Perform arithmetic evaluation on the ARGs, and store the result in the
+# global $as_val. Take advantage of shells that can avoid forks. The arguments
+# must be portable across $(()) and expr.
+if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
+ eval 'as_fn_arith ()
+ {
+ as_val=$(( $* ))
+ }'
+else
+ as_fn_arith ()
+ {
+ as_val=`expr "$@" || test $? -eq 1`
+ }
+fi # as_fn_arith
+
+
+# as_fn_error STATUS ERROR [LINENO LOG_FD]
+# ----------------------------------------
+# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
+# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
+# script with STATUS, using 1 if that was 0.
+as_fn_error ()
+{
+ as_status=$1; test $as_status -eq 0 && as_status=1
+ if test "$4"; then
+ as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
+ fi
+ $as_echo "$as_me: error: $2" >&2
+ as_fn_exit $as_status
+} # as_fn_error
+
+if expr a : '\(a\)' >/dev/null 2>&1 &&
+ test "X`expr 00001 : '.*\(...\)'`" = X001; then
+ as_expr=expr
+else
+ as_expr=false
+fi
+
+if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
+ as_basename=basename
+else
+ as_basename=false
+fi
+
+if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
+ as_dirname=dirname
+else
+ as_dirname=false
+fi
+
+as_me=`$as_basename -- "$0" ||
+$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
+ X"$0" : 'X\(//\)$' \| \
+ X"$0" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X/"$0" |
+ sed '/^.*\/\([^/][^/]*\)\/*$/{
+ s//\1/
+ q
+ }
+ /^X\/\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\/\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+
+# Avoid depending upon Character Ranges.
+as_cr_letters='abcdefghijklmnopqrstuvwxyz'
+as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
+as_cr_Letters=$as_cr_letters$as_cr_LETTERS
+as_cr_digits='0123456789'
+as_cr_alnum=$as_cr_Letters$as_cr_digits
+
+
+ as_lineno_1=$LINENO as_lineno_1a=$LINENO
+ as_lineno_2=$LINENO as_lineno_2a=$LINENO
+ eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
+ test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
+ # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-)
+ sed -n '
+ p
+ /[$]LINENO/=
+ ' <$as_myself |
+ sed '
+ s/[$]LINENO.*/&-/
+ t lineno
+ b
+ :lineno
+ N
+ :loop
+ s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
+ t loop
+ s/-\n.*//
+ ' >$as_me.lineno &&
+ chmod +x "$as_me.lineno" ||
+ { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
+
+ # Don't try to exec as it changes $[0], causing all sort of problems
+ # (the dirname of $[0] is not the place where we might find the
+ # original and so on. Autoconf is especially sensitive to this).
+ . "./$as_me.lineno"
+ # Exit status is that of the last command.
+ exit
+}
+
+ECHO_C= ECHO_N= ECHO_T=
+case `echo -n x` in #(((((
+-n*)
+ case `echo 'xy\c'` in
+ *c*) ECHO_T=' ';; # ECHO_T is single tab character.
+ xy) ECHO_C='\c';;
+ *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
+ ECHO_T=' ';;
+ esac;;
+*)
+ ECHO_N='-n';;
+esac
+
+rm -f conf$$ conf$$.exe conf$$.file
+if test -d conf$$.dir; then
+ rm -f conf$$.dir/conf$$.file
+else
+ rm -f conf$$.dir
+ mkdir conf$$.dir 2>/dev/null
+fi
+if (echo >conf$$.file) 2>/dev/null; then
+ if ln -s conf$$.file conf$$ 2>/dev/null; then
+ as_ln_s='ln -s'
+ # ... but there are two gotchas:
+ # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
+ # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
+ # In both cases, we have to default to `cp -p'.
+ ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
+ as_ln_s='cp -p'
+ elif ln conf$$.file conf$$ 2>/dev/null; then
+ as_ln_s=ln
+ else
+ as_ln_s='cp -p'
+ fi
+else
+ as_ln_s='cp -p'
+fi
+rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
+rmdir conf$$.dir 2>/dev/null
+
+if mkdir -p . 2>/dev/null; then
+ as_mkdir_p='mkdir -p "$as_dir"'
+else
+ test -d ./-p && rmdir ./-p
+ as_mkdir_p=false
+fi
+
+if test -x / >/dev/null 2>&1; then
+ as_test_x='test -x'
+else
+ if ls -dL / >/dev/null 2>&1; then
+ as_ls_L_option=L
+ else
+ as_ls_L_option=
+ fi
+ as_test_x='
+ eval sh -c '\''
+ if test -d "$1"; then
+ test -d "$1/.";
+ else
+ case $1 in #(
+ -*)set "./$1";;
+ esac;
+ case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
+ ???[sx]*):;;*)false;;esac;fi
+ '\'' sh
+ '
+fi
+as_executable_p=$as_test_x
+
+# Sed expression to map a string onto a valid CPP name.
+as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
+
+# Sed expression to map a string onto a valid variable name.
+as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
+
+
+test -n "$DJDIR" || exec 7<&0 </dev/null
+exec 6>&1
+
+# Name of the host.
+# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
+# so uname gets run too.
+ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
+
+#
+# Initializations.
+#
+ac_default_prefix=/usr/local
+ac_clean_files=
+ac_config_libobj_dir=.
+LIBOBJS=
+cross_compiling=no
+subdirs=
+MFLAGS=
+MAKEFLAGS=
+
+# Identity of this package.
+PACKAGE_NAME='newlib'
+PACKAGE_TARNAME='newlib'
+PACKAGE_VERSION='2.4.0'
+PACKAGE_STRING='newlib 2.4.0'
+PACKAGE_BUGREPORT=''
+PACKAGE_URL=''
+
+ac_unique_file="getreent.S"
+ac_subst_vars='LTLIBOBJS
+LIBOBJS
+sys_dir
+machine_dir
+libm_machine_dir
+lpfx
+aext
+oext
+OBJEXT
+USE_LIBTOOL_FALSE
+USE_LIBTOOL_TRUE
+ELIX_LEVEL_4_FALSE
+ELIX_LEVEL_4_TRUE
+ELIX_LEVEL_3_FALSE
+ELIX_LEVEL_3_TRUE
+ELIX_LEVEL_2_FALSE
+ELIX_LEVEL_2_TRUE
+ELIX_LEVEL_1_FALSE
+ELIX_LEVEL_1_TRUE
+ELIX_LEVEL_0_FALSE
+ELIX_LEVEL_0_TRUE
+LDFLAGS
+NO_INCLUDE_LIST
+NEWLIB_CFLAGS
+CCASFLAGS
+CCAS
+MAINT
+MAINTAINER_MODE_FALSE
+MAINTAINER_MODE_TRUE
+READELF
+RANLIB
+AR
+AS
+am__fastdepCC_FALSE
+am__fastdepCC_TRUE
+CCDEPMODE
+am__nodep
+AMDEPBACKSLASH
+AMDEP_FALSE
+AMDEP_TRUE
+am__quote
+am__include
+DEPDIR
+CC
+am__untar
+am__tar
+AMTAR
+am__leading_dot
+SET_MAKE
+AWK
+mkdir_p
+MKDIR_P
+INSTALL_STRIP_PROGRAM
+STRIP
+install_sh
+MAKEINFO
+AUTOHEADER
+AUTOMAKE
+AUTOCONF
+ACLOCAL
+VERSION
+PACKAGE
+CYGPATH_W
+am__isrc
+INSTALL_DATA
+INSTALL_SCRIPT
+INSTALL_PROGRAM
+host_os
+host_vendor
+host_cpu
+host
+build_os
+build_vendor
+build_cpu
+build
+newlib_basedir
+MAY_SUPPLY_SYSCALLS_FALSE
+MAY_SUPPLY_SYSCALLS_TRUE
+target_alias
+host_alias
+build_alias
+LIBS
+ECHO_T
+ECHO_N
+ECHO_C
+DEFS
+mandir
+localedir
+libdir
+psdir
+pdfdir
+dvidir
+htmldir
+infodir
+docdir
+oldincludedir
+includedir
+localstatedir
+sharedstatedir
+sysconfdir
+datadir
+datarootdir
+libexecdir
+sbindir
+bindir
+program_transform_name
+prefix
+exec_prefix
+PACKAGE_URL
+PACKAGE_BUGREPORT
+PACKAGE_STRING
+PACKAGE_VERSION
+PACKAGE_TARNAME
+PACKAGE_NAME
+PATH_SEPARATOR
+SHELL'
+ac_subst_files=''
+ac_user_opts='
+enable_option_checking
+enable_multilib
+enable_target_optspace
+enable_malloc_debugging
+enable_newlib_multithread
+enable_newlib_iconv
+enable_newlib_elix_level
+enable_newlib_io_float
+enable_newlib_supplied_syscalls
+enable_dependency_tracking
+enable_maintainer_mode
+'
+ ac_precious_vars='build_alias
+host_alias
+target_alias
+CCAS
+CCASFLAGS'
+
+
+# Initialize some variables set by options.
+ac_init_help=
+ac_init_version=false
+ac_unrecognized_opts=
+ac_unrecognized_sep=
+# The variables have the same names as the options, with
+# dashes changed to underlines.
+cache_file=/dev/null
+exec_prefix=NONE
+no_create=
+no_recursion=
+prefix=NONE
+program_prefix=NONE
+program_suffix=NONE
+program_transform_name=s,x,x,
+silent=
+site=
+srcdir=
+verbose=
+x_includes=NONE
+x_libraries=NONE
+
+# Installation directory options.
+# These are left unexpanded so users can "make install exec_prefix=/foo"
+# and all the variables that are supposed to be based on exec_prefix
+# by default will actually change.
+# Use braces instead of parens because sh, perl, etc. also accept them.
+# (The list follows the same order as the GNU Coding Standards.)
+bindir='${exec_prefix}/bin'
+sbindir='${exec_prefix}/sbin'
+libexecdir='${exec_prefix}/libexec'
+datarootdir='${prefix}/share'
+datadir='${datarootdir}'
+sysconfdir='${prefix}/etc'
+sharedstatedir='${prefix}/com'
+localstatedir='${prefix}/var'
+includedir='${prefix}/include'
+oldincludedir='/usr/include'
+docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
+infodir='${datarootdir}/info'
+htmldir='${docdir}'
+dvidir='${docdir}'
+pdfdir='${docdir}'
+psdir='${docdir}'
+libdir='${exec_prefix}/lib'
+localedir='${datarootdir}/locale'
+mandir='${datarootdir}/man'
+
+ac_prev=
+ac_dashdash=
+for ac_option
+do
+ # If the previous option needs an argument, assign it.
+ if test -n "$ac_prev"; then
+ eval $ac_prev=\$ac_option
+ ac_prev=
+ continue
+ fi
+
+ case $ac_option in
+ *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
+ *=) ac_optarg= ;;
+ *) ac_optarg=yes ;;
+ esac
+
+ # Accept the important Cygnus configure options, so we can diagnose typos.
+
+ case $ac_dashdash$ac_option in
+ --)
+ ac_dashdash=yes ;;
+
+ -bindir | --bindir | --bindi | --bind | --bin | --bi)
+ ac_prev=bindir ;;
+ -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
+ bindir=$ac_optarg ;;
+
+ -build | --build | --buil | --bui | --bu)
+ ac_prev=build_alias ;;
+ -build=* | --build=* | --buil=* | --bui=* | --bu=*)
+ build_alias=$ac_optarg ;;
+
+ -cache-file | --cache-file | --cache-fil | --cache-fi \
+ | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
+ ac_prev=cache_file ;;
+ -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
+ | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
+ cache_file=$ac_optarg ;;
+
+ --config-cache | -C)
+ cache_file=config.cache ;;
+
+ -datadir | --datadir | --datadi | --datad)
+ ac_prev=datadir ;;
+ -datadir=* | --datadir=* | --datadi=* | --datad=*)
+ datadir=$ac_optarg ;;
+
+ -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
+ | --dataroo | --dataro | --datar)
+ ac_prev=datarootdir ;;
+ -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
+ | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
+ datarootdir=$ac_optarg ;;
+
+ -disable-* | --disable-*)
+ ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
+ # Reject names that are not valid shell variable names.
+ expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
+ as_fn_error $? "invalid feature name: $ac_useropt"
+ ac_useropt_orig=$ac_useropt
+ ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
+ case $ac_user_opts in
+ *"
+"enable_$ac_useropt"
+"*) ;;
+ *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
+ ac_unrecognized_sep=', ';;
+ esac
+ eval enable_$ac_useropt=no ;;
+
+ -docdir | --docdir | --docdi | --doc | --do)
+ ac_prev=docdir ;;
+ -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
+ docdir=$ac_optarg ;;
+
+ -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
+ ac_prev=dvidir ;;
+ -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
+ dvidir=$ac_optarg ;;
+
+ -enable-* | --enable-*)
+ ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
+ # Reject names that are not valid shell variable names.
+ expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
+ as_fn_error $? "invalid feature name: $ac_useropt"
+ ac_useropt_orig=$ac_useropt
+ ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
+ case $ac_user_opts in
+ *"
+"enable_$ac_useropt"
+"*) ;;
+ *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
+ ac_unrecognized_sep=', ';;
+ esac
+ eval enable_$ac_useropt=\$ac_optarg ;;
+
+ -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
+ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
+ | --exec | --exe | --ex)
+ ac_prev=exec_prefix ;;
+ -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
+ | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
+ | --exec=* | --exe=* | --ex=*)
+ exec_prefix=$ac_optarg ;;
+
+ -gas | --gas | --ga | --g)
+ # Obsolete; use --with-gas.
+ with_gas=yes ;;
+
+ -help | --help | --hel | --he | -h)
+ ac_init_help=long ;;
+ -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
+ ac_init_help=recursive ;;
+ -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
+ ac_init_help=short ;;
+
+ -host | --host | --hos | --ho)
+ ac_prev=host_alias ;;
+ -host=* | --host=* | --hos=* | --ho=*)
+ host_alias=$ac_optarg ;;
+
+ -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
+ ac_prev=htmldir ;;
+ -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
+ | --ht=*)
+ htmldir=$ac_optarg ;;
+
+ -includedir | --includedir | --includedi | --included | --include \
+ | --includ | --inclu | --incl | --inc)
+ ac_prev=includedir ;;
+ -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
+ | --includ=* | --inclu=* | --incl=* | --inc=*)
+ includedir=$ac_optarg ;;
+
+ -infodir | --infodir | --infodi | --infod | --info | --inf)
+ ac_prev=infodir ;;
+ -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
+ infodir=$ac_optarg ;;
+
+ -libdir | --libdir | --libdi | --libd)
+ ac_prev=libdir ;;
+ -libdir=* | --libdir=* | --libdi=* | --libd=*)
+ libdir=$ac_optarg ;;
+
+ -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
+ | --libexe | --libex | --libe)
+ ac_prev=libexecdir ;;
+ -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
+ | --libexe=* | --libex=* | --libe=*)
+ libexecdir=$ac_optarg ;;
+
+ -localedir | --localedir | --localedi | --localed | --locale)
+ ac_prev=localedir ;;
+ -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
+ localedir=$ac_optarg ;;
+
+ -localstatedir | --localstatedir | --localstatedi | --localstated \
+ | --localstate | --localstat | --localsta | --localst | --locals)
+ ac_prev=localstatedir ;;
+ -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
+ | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
+ localstatedir=$ac_optarg ;;
+
+ -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
+ ac_prev=mandir ;;
+ -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
+ mandir=$ac_optarg ;;
+
+ -nfp | --nfp | --nf)
+ # Obsolete; use --without-fp.
+ with_fp=no ;;
+
+ -no-create | --no-create | --no-creat | --no-crea | --no-cre \
+ | --no-cr | --no-c | -n)
+ no_create=yes ;;
+
+ -no-recursion | --no-recursion | --no-recursio | --no-recursi \
+ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
+ no_recursion=yes ;;
+
+ -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
+ | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
+ | --oldin | --oldi | --old | --ol | --o)
+ ac_prev=oldincludedir ;;
+ -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
+ | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
+ | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
+ oldincludedir=$ac_optarg ;;
+
+ -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
+ ac_prev=prefix ;;
+ -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
+ prefix=$ac_optarg ;;
+
+ -program-prefix | --program-prefix | --program-prefi | --program-pref \
+ | --program-pre | --program-pr | --program-p)
+ ac_prev=program_prefix ;;
+ -program-prefix=* | --program-prefix=* | --program-prefi=* \
+ | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
+ program_prefix=$ac_optarg ;;
+
+ -program-suffix | --program-suffix | --program-suffi | --program-suff \
+ | --program-suf | --program-su | --program-s)
+ ac_prev=program_suffix ;;
+ -program-suffix=* | --program-suffix=* | --program-suffi=* \
+ | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
+ program_suffix=$ac_optarg ;;
+
+ -program-transform-name | --program-transform-name \
+ | --program-transform-nam | --program-transform-na \
+ | --program-transform-n | --program-transform- \
+ | --program-transform | --program-transfor \
+ | --program-transfo | --program-transf \
+ | --program-trans | --program-tran \
+ | --progr-tra | --program-tr | --program-t)
+ ac_prev=program_transform_name ;;
+ -program-transform-name=* | --program-transform-name=* \
+ | --program-transform-nam=* | --program-transform-na=* \
+ | --program-transform-n=* | --program-transform-=* \
+ | --program-transform=* | --program-transfor=* \
+ | --program-transfo=* | --program-transf=* \
+ | --program-trans=* | --program-tran=* \
+ | --progr-tra=* | --program-tr=* | --program-t=*)
+ program_transform_name=$ac_optarg ;;
+
+ -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
+ ac_prev=pdfdir ;;
+ -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
+ pdfdir=$ac_optarg ;;
+
+ -psdir | --psdir | --psdi | --psd | --ps)
+ ac_prev=psdir ;;
+ -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
+ psdir=$ac_optarg ;;
+
+ -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+ | -silent | --silent | --silen | --sile | --sil)
+ silent=yes ;;
+
+ -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
+ ac_prev=sbindir ;;
+ -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
+ | --sbi=* | --sb=*)
+ sbindir=$ac_optarg ;;
+
+ -sharedstatedir | --sharedstatedir | --sharedstatedi \
+ | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
+ | --sharedst | --shareds | --shared | --share | --shar \
+ | --sha | --sh)
+ ac_prev=sharedstatedir ;;
+ -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
+ | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
+ | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
+ | --sha=* | --sh=*)
+ sharedstatedir=$ac_optarg ;;
+
+ -site | --site | --sit)
+ ac_prev=site ;;
+ -site=* | --site=* | --sit=*)
+ site=$ac_optarg ;;
+
+ -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
+ ac_prev=srcdir ;;
+ -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
+ srcdir=$ac_optarg ;;
+
+ -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
+ | --syscon | --sysco | --sysc | --sys | --sy)
+ ac_prev=sysconfdir ;;
+ -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
+ | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
+ sysconfdir=$ac_optarg ;;
+
+ -target | --target | --targe | --targ | --tar | --ta | --t)
+ ac_prev=target_alias ;;
+ -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
+ target_alias=$ac_optarg ;;
+
+ -v | -verbose | --verbose | --verbos | --verbo | --verb)
+ verbose=yes ;;
+
+ -version | --version | --versio | --versi | --vers | -V)
+ ac_init_version=: ;;
+
+ -with-* | --with-*)
+ ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
+ # Reject names that are not valid shell variable names.
+ expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
+ as_fn_error $? "invalid package name: $ac_useropt"
+ ac_useropt_orig=$ac_useropt
+ ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
+ case $ac_user_opts in
+ *"
+"with_$ac_useropt"
+"*) ;;
+ *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
+ ac_unrecognized_sep=', ';;
+ esac
+ eval with_$ac_useropt=\$ac_optarg ;;
+
+ -without-* | --without-*)
+ ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
+ # Reject names that are not valid shell variable names.
+ expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
+ as_fn_error $? "invalid package name: $ac_useropt"
+ ac_useropt_orig=$ac_useropt
+ ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
+ case $ac_user_opts in
+ *"
+"with_$ac_useropt"
+"*) ;;
+ *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
+ ac_unrecognized_sep=', ';;
+ esac
+ eval with_$ac_useropt=no ;;
+
+ --x)
+ # Obsolete; use --with-x.
+ with_x=yes ;;
+
+ -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
+ | --x-incl | --x-inc | --x-in | --x-i)
+ ac_prev=x_includes ;;
+ -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
+ | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
+ x_includes=$ac_optarg ;;
+
+ -x-libraries | --x-libraries | --x-librarie | --x-librari \
+ | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
+ ac_prev=x_libraries ;;
+ -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
+ | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
+ x_libraries=$ac_optarg ;;
+
+ -*) as_fn_error $? "unrecognized option: \`$ac_option'
+Try \`$0 --help' for more information"
+ ;;
+
+ *=*)
+ ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
+ # Reject names that are not valid shell variable names.
+ case $ac_envvar in #(
+ '' | [0-9]* | *[!_$as_cr_alnum]* )
+ as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
+ esac
+ eval $ac_envvar=\$ac_optarg
+ export $ac_envvar ;;
+
+ *)
+ # FIXME: should be removed in autoconf 3.0.
+ $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
+ expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
+ $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
+ : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
+ ;;
+
+ esac
+done
+
+if test -n "$ac_prev"; then
+ ac_option=--`echo $ac_prev | sed 's/_/-/g'`
+ as_fn_error $? "missing argument to $ac_option"
+fi
+
+if test -n "$ac_unrecognized_opts"; then
+ case $enable_option_checking in
+ no) ;;
+ fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
+ *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
+ esac
+fi
+
+# Check all directory arguments for consistency.
+for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
+ datadir sysconfdir sharedstatedir localstatedir includedir \
+ oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
+ libdir localedir mandir
+do
+ eval ac_val=\$$ac_var
+ # Remove trailing slashes.
+ case $ac_val in
+ */ )
+ ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
+ eval $ac_var=\$ac_val;;
+ esac
+ # Be sure to have absolute directory names.
+ case $ac_val in
+ [\\/$]* | ?:[\\/]* ) continue;;
+ NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
+ esac
+ as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
+done
+
+# There might be people who depend on the old broken behavior: `$host'
+# used to hold the argument of --host etc.
+# FIXME: To remove some day.
+build=$build_alias
+host=$host_alias
+target=$target_alias
+
+# FIXME: To remove some day.
+if test "x$host_alias" != x; then
+ if test "x$build_alias" = x; then
+ cross_compiling=maybe
+ $as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host.
+ If a cross compiler is detected then cross compile mode will be used" >&2
+ elif test "x$build_alias" != "x$host_alias"; then
+ cross_compiling=yes
+ fi
+fi
+
+ac_tool_prefix=
+test -n "$host_alias" && ac_tool_prefix=$host_alias-
+
+test "$silent" = yes && exec 6>/dev/null
+
+
+ac_pwd=`pwd` && test -n "$ac_pwd" &&
+ac_ls_di=`ls -di .` &&
+ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
+ as_fn_error $? "working directory cannot be determined"
+test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
+ as_fn_error $? "pwd does not report name of working directory"
+
+
+# Find the source files, if location was not specified.
+if test -z "$srcdir"; then
+ ac_srcdir_defaulted=yes
+ # Try the directory containing this script, then the parent directory.
+ ac_confdir=`$as_dirname -- "$as_myself" ||
+$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$as_myself" : 'X\(//\)[^/]' \| \
+ X"$as_myself" : 'X\(//\)$' \| \
+ X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$as_myself" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)[^/].*/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+ srcdir=$ac_confdir
+ if test ! -r "$srcdir/$ac_unique_file"; then
+ srcdir=..
+ fi
+else
+ ac_srcdir_defaulted=no
+fi
+if test ! -r "$srcdir/$ac_unique_file"; then
+ test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
+ as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
+fi
+ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
+ac_abs_confdir=`(
+ cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
+ pwd)`
+# When building in place, set srcdir=.
+if test "$ac_abs_confdir" = "$ac_pwd"; then
+ srcdir=.
+fi
+# Remove unnecessary trailing slashes from srcdir.
+# Double slashes in file names in object file debugging info
+# mess up M-x gdb in Emacs.
+case $srcdir in
+*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
+esac
+for ac_var in $ac_precious_vars; do
+ eval ac_env_${ac_var}_set=\${${ac_var}+set}
+ eval ac_env_${ac_var}_value=\$${ac_var}
+ eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
+ eval ac_cv_env_${ac_var}_value=\$${ac_var}
+done
+
+#
+# Report the --help message.
+#
+if test "$ac_init_help" = "long"; then
+ # Omit some internal or obsolete options to make the list less imposing.
+ # This message is too long to be a string in the A/UX 3.1 sh.
+ cat <<_ACEOF
+\`configure' configures newlib 2.4.0 to adapt to many kinds of systems.
+
+Usage: $0 [OPTION]... [VAR=VALUE]...
+
+To assign environment variables (e.g., CC, CFLAGS...), specify them as
+VAR=VALUE. See below for descriptions of some of the useful variables.
+
+Defaults for the options are specified in brackets.
+
+Configuration:
+ -h, --help display this help and exit
+ --help=short display options specific to this package
+ --help=recursive display the short help of all the included packages
+ -V, --version display version information and exit
+ -q, --quiet, --silent do not print \`checking ...' messages
+ --cache-file=FILE cache test results in FILE [disabled]
+ -C, --config-cache alias for \`--cache-file=config.cache'
+ -n, --no-create do not create output files
+ --srcdir=DIR find the sources in DIR [configure dir or \`..']
+
+Installation directories:
+ --prefix=PREFIX install architecture-independent files in PREFIX
+ [$ac_default_prefix]
+ --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
+ [PREFIX]
+
+By default, \`make install' will install all the files in
+\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
+an installation prefix other than \`$ac_default_prefix' using \`--prefix',
+for instance \`--prefix=\$HOME'.
+
+For better control, use the options below.
+
+Fine tuning of the installation directories:
+ --bindir=DIR user executables [EPREFIX/bin]
+ --sbindir=DIR system admin executables [EPREFIX/sbin]
+ --libexecdir=DIR program executables [EPREFIX/libexec]
+ --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
+ --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
+ --localstatedir=DIR modifiable single-machine data [PREFIX/var]
+ --libdir=DIR object code libraries [EPREFIX/lib]
+ --includedir=DIR C header files [PREFIX/include]
+ --oldincludedir=DIR C header files for non-gcc [/usr/include]
+ --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
+ --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
+ --infodir=DIR info documentation [DATAROOTDIR/info]
+ --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
+ --mandir=DIR man documentation [DATAROOTDIR/man]
+ --docdir=DIR documentation root [DATAROOTDIR/doc/newlib]
+ --htmldir=DIR html documentation [DOCDIR]
+ --dvidir=DIR dvi documentation [DOCDIR]
+ --pdfdir=DIR pdf documentation [DOCDIR]
+ --psdir=DIR ps documentation [DOCDIR]
+_ACEOF
+
+ cat <<\_ACEOF
+
+Program names:
+ --program-prefix=PREFIX prepend PREFIX to installed program names
+ --program-suffix=SUFFIX append SUFFIX to installed program names
+ --program-transform-name=PROGRAM run sed PROGRAM on installed program names
+
+System types:
+ --build=BUILD configure for building on BUILD [guessed]
+ --host=HOST cross-compile to build programs to run on HOST [BUILD]
+_ACEOF
+fi
+
+if test -n "$ac_init_help"; then
+ case $ac_init_help in
+ short | recursive ) echo "Configuration of newlib 2.4.0:";;
+ esac
+ cat <<\_ACEOF
+
+Optional Features:
+ --disable-option-checking ignore unrecognized --enable/--with options
+ --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
+ --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
+ --enable-multilib build many library versions (default)
+ --enable-target-optspace optimize for space
+ --enable-malloc-debugging indicate malloc debugging requested
+ --enable-newlib-multithread enable support for multiple threads
+ --enable-newlib-iconv enable iconv library support
+ --enable-newlib-elix-level supply desired elix library level (1-4)
+ --disable-newlib-io-float disable printf/scanf family float support
+ --disable-newlib-supplied-syscalls disable newlib from supplying syscalls
+ --disable-dependency-tracking speeds up one-time build
+ --enable-dependency-tracking do not reject slow dependency extractors
+ --enable-maintainer-mode enable make rules and dependencies not useful
+ (and sometimes confusing) to the casual installer
+
+Some influential environment variables:
+ CCAS assembler compiler command (defaults to CC)
+ CCASFLAGS assembler compiler flags (defaults to CFLAGS)
+
+Use these variables to override the choices made by `configure' or to help
+it to find libraries and programs with nonstandard names/locations.
+
+Report bugs to the package provider.
+_ACEOF
+ac_status=$?
+fi
+
+if test "$ac_init_help" = "recursive"; then
+ # If there are subdirs, report their specific --help.
+ for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
+ test -d "$ac_dir" ||
+ { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
+ continue
+ ac_builddir=.
+
+case "$ac_dir" in
+.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
+*)
+ ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
+ # A ".." for each directory in $ac_dir_suffix.
+ ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
+ case $ac_top_builddir_sub in
+ "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
+ *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
+ esac ;;
+esac
+ac_abs_top_builddir=$ac_pwd
+ac_abs_builddir=$ac_pwd$ac_dir_suffix
+# for backward compatibility:
+ac_top_builddir=$ac_top_build_prefix
+
+case $srcdir in
+ .) # We are building in place.
+ ac_srcdir=.
+ ac_top_srcdir=$ac_top_builddir_sub
+ ac_abs_top_srcdir=$ac_pwd ;;
+ [\\/]* | ?:[\\/]* ) # Absolute name.
+ ac_srcdir=$srcdir$ac_dir_suffix;
+ ac_top_srcdir=$srcdir
+ ac_abs_top_srcdir=$srcdir ;;
+ *) # Relative name.
+ ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
+ ac_top_srcdir=$ac_top_build_prefix$srcdir
+ ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
+esac
+ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
+
+ cd "$ac_dir" || { ac_status=$?; continue; }
+ # Check for guested configure.
+ if test -f "$ac_srcdir/configure.gnu"; then
+ echo &&
+ $SHELL "$ac_srcdir/configure.gnu" --help=recursive
+ elif test -f "$ac_srcdir/configure"; then
+ echo &&
+ $SHELL "$ac_srcdir/configure" --help=recursive
+ else
+ $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
+ fi || ac_status=$?
+ cd "$ac_pwd" || { ac_status=$?; break; }
+ done
+fi
+
+test -n "$ac_init_help" && exit $ac_status
+if $ac_init_version; then
+ cat <<\_ACEOF
+newlib configure 2.4.0
+generated by GNU Autoconf 2.68
+
+Copyright (C) 2010 Free Software Foundation, Inc.
+This configure script is free software; the Free Software Foundation
+gives unlimited permission to copy, distribute and modify it.
+_ACEOF
+ exit
+fi
+
+## ------------------------ ##
+## Autoconf initialization. ##
+## ------------------------ ##
+
+# ac_fn_c_try_compile LINENO
+# --------------------------
+# Try to compile conftest.$ac_ext, and return whether this succeeded.
+ac_fn_c_try_compile ()
+{
+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ rm -f conftest.$ac_objext
+ if { { ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_compile") 2>conftest.err
+ ac_status=$?
+ if test -s conftest.err; then
+ grep -v '^ *+' conftest.err >conftest.er1
+ cat conftest.er1 >&5
+ mv -f conftest.er1 conftest.err
+ fi
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then :
+ ac_retval=0
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_retval=1
+fi
+ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+ as_fn_set_status $ac_retval
+
+} # ac_fn_c_try_compile
+cat >config.log <<_ACEOF
+This file contains any messages produced by compilers while
+running configure, to aid debugging if configure makes a mistake.
+
+It was created by newlib $as_me 2.4.0, which was
+generated by GNU Autoconf 2.68. Invocation command line was
+
+ $ $0 $@
+
+_ACEOF
+exec 5>>config.log
+{
+cat <<_ASUNAME
+## --------- ##
+## Platform. ##
+## --------- ##
+
+hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
+uname -m = `(uname -m) 2>/dev/null || echo unknown`
+uname -r = `(uname -r) 2>/dev/null || echo unknown`
+uname -s = `(uname -s) 2>/dev/null || echo unknown`
+uname -v = `(uname -v) 2>/dev/null || echo unknown`
+
+/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
+/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
+
+/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
+/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
+/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
+/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
+/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
+/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
+/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
+
+_ASUNAME
+
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ $as_echo "PATH: $as_dir"
+ done
+IFS=$as_save_IFS
+
+} >&5
+
+cat >&5 <<_ACEOF
+
+
+## ----------- ##
+## Core tests. ##
+## ----------- ##
+
+_ACEOF
+
+
+# Keep a trace of the command line.
+# Strip out --no-create and --no-recursion so they do not pile up.
+# Strip out --silent because we don't want to record it for future runs.
+# Also quote any args containing shell meta-characters.
+# Make two passes to allow for proper duplicate-argument suppression.
+ac_configure_args=
+ac_configure_args0=
+ac_configure_args1=
+ac_must_keep_next=false
+for ac_pass in 1 2
+do
+ for ac_arg
+ do
+ case $ac_arg in
+ -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
+ -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+ | -silent | --silent | --silen | --sile | --sil)
+ continue ;;
+ *\'*)
+ ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
+ esac
+ case $ac_pass in
+ 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
+ 2)
+ as_fn_append ac_configure_args1 " '$ac_arg'"
+ if test $ac_must_keep_next = true; then
+ ac_must_keep_next=false # Got value, back to normal.
+ else
+ case $ac_arg in
+ *=* | --config-cache | -C | -disable-* | --disable-* \
+ | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
+ | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
+ | -with-* | --with-* | -without-* | --without-* | --x)
+ case "$ac_configure_args0 " in
+ "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
+ esac
+ ;;
+ -* ) ac_must_keep_next=true ;;
+ esac
+ fi
+ as_fn_append ac_configure_args " '$ac_arg'"
+ ;;
+ esac
+ done
+done
+{ ac_configure_args0=; unset ac_configure_args0;}
+{ ac_configure_args1=; unset ac_configure_args1;}
+
+# When interrupted or exit'd, cleanup temporary files, and complete
+# config.log. We remove comments because anyway the quotes in there
+# would cause problems or look ugly.
+# WARNING: Use '\'' to represent an apostrophe within the trap.
+# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
+trap 'exit_status=$?
+ # Save into config.log some information that might help in debugging.
+ {
+ echo
+
+ $as_echo "## ---------------- ##
+## Cache variables. ##
+## ---------------- ##"
+ echo
+ # The following way of writing the cache mishandles newlines in values,
+(
+ for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
+ eval ac_val=\$$ac_var
+ case $ac_val in #(
+ *${as_nl}*)
+ case $ac_var in #(
+ *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
+$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
+ esac
+ case $ac_var in #(
+ _ | IFS | as_nl) ;; #(
+ BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
+ *) { eval $ac_var=; unset $ac_var;} ;;
+ esac ;;
+ esac
+ done
+ (set) 2>&1 |
+ case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
+ *${as_nl}ac_space=\ *)
+ sed -n \
+ "s/'\''/'\''\\\\'\'''\''/g;
+ s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
+ ;; #(
+ *)
+ sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
+ ;;
+ esac |
+ sort
+)
+ echo
+
+ $as_echo "## ----------------- ##
+## Output variables. ##
+## ----------------- ##"
+ echo
+ for ac_var in $ac_subst_vars
+ do
+ eval ac_val=\$$ac_var
+ case $ac_val in
+ *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
+ esac
+ $as_echo "$ac_var='\''$ac_val'\''"
+ done | sort
+ echo
+
+ if test -n "$ac_subst_files"; then
+ $as_echo "## ------------------- ##
+## File substitutions. ##
+## ------------------- ##"
+ echo
+ for ac_var in $ac_subst_files
+ do
+ eval ac_val=\$$ac_var
+ case $ac_val in
+ *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
+ esac
+ $as_echo "$ac_var='\''$ac_val'\''"
+ done | sort
+ echo
+ fi
+
+ if test -s confdefs.h; then
+ $as_echo "## ----------- ##
+## confdefs.h. ##
+## ----------- ##"
+ echo
+ cat confdefs.h
+ echo
+ fi
+ test "$ac_signal" != 0 &&
+ $as_echo "$as_me: caught signal $ac_signal"
+ $as_echo "$as_me: exit $exit_status"
+ } >&5
+ rm -f core *.core core.conftest.* &&
+ rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
+ exit $exit_status
+' 0
+for ac_signal in 1 2 13 15; do
+ trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
+done
+ac_signal=0
+
+# confdefs.h avoids OS command line length limits that DEFS can exceed.
+rm -f -r conftest* confdefs.h
+
+$as_echo "/* confdefs.h */" > confdefs.h
+
+# Predefined preprocessor variables.
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_NAME "$PACKAGE_NAME"
+_ACEOF
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
+_ACEOF
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_VERSION "$PACKAGE_VERSION"
+_ACEOF
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_STRING "$PACKAGE_STRING"
+_ACEOF
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
+_ACEOF
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_URL "$PACKAGE_URL"
+_ACEOF
+
+
+# Let the site file select an alternate cache file if it wants to.
+# Prefer an explicitly selected file to automatically selected ones.
+ac_site_file1=NONE
+ac_site_file2=NONE
+if test -n "$CONFIG_SITE"; then
+ # We do not want a PATH search for config.site.
+ case $CONFIG_SITE in #((
+ -*) ac_site_file1=./$CONFIG_SITE;;
+ */*) ac_site_file1=$CONFIG_SITE;;
+ *) ac_site_file1=./$CONFIG_SITE;;
+ esac
+elif test "x$prefix" != xNONE; then
+ ac_site_file1=$prefix/share/config.site
+ ac_site_file2=$prefix/etc/config.site
+else
+ ac_site_file1=$ac_default_prefix/share/config.site
+ ac_site_file2=$ac_default_prefix/etc/config.site
+fi
+for ac_site_file in "$ac_site_file1" "$ac_site_file2"
+do
+ test "x$ac_site_file" = xNONE && continue
+ if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
+$as_echo "$as_me: loading site script $ac_site_file" >&6;}
+ sed 's/^/| /' "$ac_site_file" >&5
+ . "$ac_site_file" \
+ || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "failed to load site script $ac_site_file
+See \`config.log' for more details" "$LINENO" 5; }
+ fi
+done
+
+if test -r "$cache_file"; then
+ # Some versions of bash will fail to source /dev/null (special files
+ # actually), so we avoid doing that. DJGPP emulates it as a regular file.
+ if test /dev/null != "$cache_file" && test -f "$cache_file"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
+$as_echo "$as_me: loading cache $cache_file" >&6;}
+ case $cache_file in
+ [\\/]* | ?:[\\/]* ) . "$cache_file";;
+ *) . "./$cache_file";;
+ esac
+ fi
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
+$as_echo "$as_me: creating cache $cache_file" >&6;}
+ >$cache_file
+fi
+
+# Check that the precious variables saved in the cache have kept the same
+# value.
+ac_cache_corrupted=false
+for ac_var in $ac_precious_vars; do
+ eval ac_old_set=\$ac_cv_env_${ac_var}_set
+ eval ac_new_set=\$ac_env_${ac_var}_set
+ eval ac_old_val=\$ac_cv_env_${ac_var}_value
+ eval ac_new_val=\$ac_env_${ac_var}_value
+ case $ac_old_set,$ac_new_set in
+ set,)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
+$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
+ ac_cache_corrupted=: ;;
+ ,set)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
+$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
+ ac_cache_corrupted=: ;;
+ ,);;
+ *)
+ if test "x$ac_old_val" != "x$ac_new_val"; then
+ # differences in whitespace do not lead to failure.
+ ac_old_val_w=`echo x $ac_old_val`
+ ac_new_val_w=`echo x $ac_new_val`
+ if test "$ac_old_val_w" != "$ac_new_val_w"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
+$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
+ ac_cache_corrupted=:
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
+$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
+ eval $ac_var=\$ac_old_val
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
+$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
+$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
+ fi;;
+ esac
+ # Pass precious variables to config.status.
+ if test "$ac_new_set" = set; then
+ case $ac_new_val in
+ *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
+ *) ac_arg=$ac_var=$ac_new_val ;;
+ esac
+ case " $ac_configure_args " in
+ *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
+ *) as_fn_append ac_configure_args " '$ac_arg'" ;;
+ esac
+ fi
+done
+if $ac_cache_corrupted; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
+$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
+ as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
+fi
+## -------------------- ##
+## Main body of script. ##
+## -------------------- ##
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+
+
+ac_aux_dir=
+for ac_dir in ../../../.. "$srcdir"/../../../..; do
+ if test -f "$ac_dir/install-sh"; then
+ ac_aux_dir=$ac_dir
+ ac_install_sh="$ac_aux_dir/install-sh -c"
+ break
+ elif test -f "$ac_dir/install.sh"; then
+ ac_aux_dir=$ac_dir
+ ac_install_sh="$ac_aux_dir/install.sh -c"
+ break
+ elif test -f "$ac_dir/shtool"; then
+ ac_aux_dir=$ac_dir
+ ac_install_sh="$ac_aux_dir/shtool install -c"
+ break
+ fi
+done
+if test -z "$ac_aux_dir"; then
+ as_fn_error $? "cannot find install-sh, install.sh, or shtool in ../../../.. \"$srcdir\"/../../../.." "$LINENO" 5
+fi
+
+# These three variables are undocumented and unsupported,
+# and are intended to be withdrawn in a future Autoconf release.
+# They can cause serious problems if a builder's source tree is in a directory
+# whose full name contains unusual characters.
+ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
+ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
+ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
+
+
+
+
+# Make sure we can run config.sub.
+$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
+ as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
+$as_echo_n "checking build system type... " >&6; }
+if ${ac_cv_build+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_build_alias=$build_alias
+test "x$ac_build_alias" = x &&
+ ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
+test "x$ac_build_alias" = x &&
+ as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
+ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
+ as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
+$as_echo "$ac_cv_build" >&6; }
+case $ac_cv_build in
+*-*-*) ;;
+*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
+esac
+build=$ac_cv_build
+ac_save_IFS=$IFS; IFS='-'
+set x $ac_cv_build
+shift
+build_cpu=$1
+build_vendor=$2
+shift; shift
+# Remember, the first character of IFS is used to create $*,
+# except with old shells:
+build_os=$*
+IFS=$ac_save_IFS
+case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
+$as_echo_n "checking host system type... " >&6; }
+if ${ac_cv_host+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test "x$host_alias" = x; then
+ ac_cv_host=$ac_cv_build
+else
+ ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
+ as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
+$as_echo "$ac_cv_host" >&6; }
+case $ac_cv_host in
+*-*-*) ;;
+*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
+esac
+host=$ac_cv_host
+ac_save_IFS=$IFS; IFS='-'
+set x $ac_cv_host
+shift
+host_cpu=$1
+host_vendor=$2
+shift; shift
+# Remember, the first character of IFS is used to create $*,
+# except with old shells:
+host_os=$*
+IFS=$ac_save_IFS
+case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
+
+
+am__api_version='1.11'
+
+# Find a good install program. We prefer a C program (faster),
+# so one script is as good as another. But avoid the broken or
+# incompatible versions:
+# SysV /etc/install, /usr/sbin/install
+# SunOS /usr/etc/install
+# IRIX /sbin/install
+# AIX /bin/install
+# AmigaOS /C/install, which installs bootblocks on floppy discs
+# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
+# AFS /usr/afsws/bin/install, which mishandles nonexistent args
+# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
+# OS/2's system install, which has a completely different semantic
+# ./install, which can be erroneously created by make from ./install.sh.
+# Reject install programs that cannot install multiple files.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
+$as_echo_n "checking for a BSD-compatible install... " >&6; }
+if test -z "$INSTALL"; then
+if ${ac_cv_path_install+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ # Account for people who put trailing slashes in PATH elements.
+case $as_dir/ in #((
+ ./ | .// | /[cC]/* | \
+ /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
+ ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
+ /usr/ucb/* ) ;;
+ *)
+ # OSF1 and SCO ODT 3.0 have their own names for install.
+ # Don't use installbsd from OSF since it installs stuff as root
+ # by default.
+ for ac_prog in ginstall scoinst install; do
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
+ if test $ac_prog = install &&
+ grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
+ # AIX install. It has an incompatible calling convention.
+ :
+ elif test $ac_prog = install &&
+ grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
+ # program-specific install script used by HP pwplus--don't use.
+ :
+ else
+ rm -rf conftest.one conftest.two conftest.dir
+ echo one > conftest.one
+ echo two > conftest.two
+ mkdir conftest.dir
+ if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
+ test -s conftest.one && test -s conftest.two &&
+ test -s conftest.dir/conftest.one &&
+ test -s conftest.dir/conftest.two
+ then
+ ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
+ break 3
+ fi
+ fi
+ fi
+ done
+ done
+ ;;
+esac
+
+ done
+IFS=$as_save_IFS
+
+rm -rf conftest.one conftest.two conftest.dir
+
+fi
+ if test "${ac_cv_path_install+set}" = set; then
+ INSTALL=$ac_cv_path_install
+ else
+ # As a last resort, use the slow shell script. Don't cache a
+ # value for INSTALL within a source directory, because that will
+ # break other packages using the cache if that directory is
+ # removed, or if the value is a relative name.
+ INSTALL=$ac_install_sh
+ fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
+$as_echo "$INSTALL" >&6; }
+
+# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
+# It thinks the first close brace ends the variable substitution.
+test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
+
+test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
+
+test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5
+$as_echo_n "checking whether build environment is sane... " >&6; }
+# Just in case
+sleep 1
+echo timestamp > conftest.file
+# Reject unsafe characters in $srcdir or the absolute working directory
+# name. Accept space and tab only in the latter.
+am_lf='
+'
+case `pwd` in
+ *[\\\"\#\$\&\'\`$am_lf]*)
+ as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5;;
+esac
+case $srcdir in
+ *[\\\"\#\$\&\'\`$am_lf\ \ ]*)
+ as_fn_error $? "unsafe srcdir value: \`$srcdir'" "$LINENO" 5;;
+esac
+
+# Do `set' in a subshell so we don't clobber the current shell's
+# arguments. Must try -L first in case configure is actually a
+# symlink; some systems play weird games with the mod time of symlinks
+# (eg FreeBSD returns the mod time of the symlink's containing
+# directory).
+if (
+ set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
+ if test "$*" = "X"; then
+ # -L didn't work.
+ set X `ls -t "$srcdir/configure" conftest.file`
+ fi
+ rm -f conftest.file
+ if test "$*" != "X $srcdir/configure conftest.file" \
+ && test "$*" != "X conftest.file $srcdir/configure"; then
+
+ # If neither matched, then we have a broken ls. This can happen
+ # if, for instance, CONFIG_SHELL is bash and it inherits a
+ # broken ls alias from the environment. This has actually
+ # happened. Such a system could not be considered "sane".
+ as_fn_error $? "ls -t appears to fail. Make sure there is not a broken
+alias in your environment" "$LINENO" 5
+ fi
+
+ test "$2" = conftest.file
+ )
+then
+ # Ok.
+ :
+else
+ as_fn_error $? "newly created file is older than distributed files!
+Check your system clock" "$LINENO" 5
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+test "$program_prefix" != NONE &&
+ program_transform_name="s&^&$program_prefix&;$program_transform_name"
+# Use a double $ so make ignores it.
+test "$program_suffix" != NONE &&
+ program_transform_name="s&\$&$program_suffix&;$program_transform_name"
+# Double any \ or $.
+# By default was `s,x,x', remove it if useless.
+ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
+program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"`
+
+# expand $ac_aux_dir to an absolute path
+am_aux_dir=`cd $ac_aux_dir && pwd`
+
+if test x"${MISSING+set}" != xset; then
+ case $am_aux_dir in
+ *\ * | *\ *)
+ MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
+ *)
+ MISSING="\${SHELL} $am_aux_dir/missing" ;;
+ esac
+fi
+# Use eval to expand $SHELL
+if eval "$MISSING --run true"; then
+ am_missing_run="$MISSING --run "
+else
+ am_missing_run=
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`missing' script is too old or missing" >&5
+$as_echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;}
+fi
+
+if test x"${install_sh}" != xset; then
+ case $am_aux_dir in
+ *\ * | *\ *)
+ install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
+ *)
+ install_sh="\${SHELL} $am_aux_dir/install-sh"
+ esac
+fi
+
+# Installed binaries are usually stripped using `strip' when the user
+# run `make install-strip'. However `strip' might not be the right
+# tool to use in cross-compilation environments, therefore Automake
+# will honor the `STRIP' environment variable to overrule this program.
+if test "$cross_compiling" != no; then
+ if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
+set dummy ${ac_tool_prefix}strip; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_STRIP+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$STRIP"; then
+ ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_STRIP="${ac_tool_prefix}strip"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+STRIP=$ac_cv_prog_STRIP
+if test -n "$STRIP"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
+$as_echo "$STRIP" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_STRIP"; then
+ ac_ct_STRIP=$STRIP
+ # Extract the first word of "strip", so it can be a program name with args.
+set dummy strip; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_ct_STRIP"; then
+ ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_ac_ct_STRIP="strip"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
+if test -n "$ac_ct_STRIP"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
+$as_echo "$ac_ct_STRIP" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+ if test "x$ac_ct_STRIP" = x; then
+ STRIP=":"
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ STRIP=$ac_ct_STRIP
+ fi
+else
+ STRIP="$ac_cv_prog_STRIP"
+fi
+
+fi
+INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
+$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
+if test -z "$MKDIR_P"; then
+ if ${ac_cv_path_mkdir+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_prog in mkdir gmkdir; do
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; } || continue
+ case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
+ 'mkdir (GNU coreutils) '* | \
+ 'mkdir (coreutils) '* | \
+ 'mkdir (fileutils) '4.1*)
+ ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
+ break 3;;
+ esac
+ done
+ done
+ done
+IFS=$as_save_IFS
+
+fi
+
+ test -d ./--version && rmdir ./--version
+ if test "${ac_cv_path_mkdir+set}" = set; then
+ MKDIR_P="$ac_cv_path_mkdir -p"
+ else
+ # As a last resort, use the slow shell script. Don't cache a
+ # value for MKDIR_P within a source directory, because that will
+ # break other packages using the cache if that directory is
+ # removed, or if the value is a relative name.
+ MKDIR_P="$ac_install_sh -d"
+ fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
+$as_echo "$MKDIR_P" >&6; }
+
+mkdir_p="$MKDIR_P"
+case $mkdir_p in
+ [\\/$]* | ?:[\\/]*) ;;
+ */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
+esac
+
+for ac_prog in gawk mawk nawk awk
+do
+ # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_AWK+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$AWK"; then
+ ac_cv_prog_AWK="$AWK" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_AWK="$ac_prog"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+AWK=$ac_cv_prog_AWK
+if test -n "$AWK"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
+$as_echo "$AWK" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+ test -n "$AWK" && break
+done
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
+$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
+set x ${MAKE-make}
+ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
+if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat >conftest.make <<\_ACEOF
+SHELL = /bin/sh
+all:
+ @echo '@@@%%%=$(MAKE)=@@@%%%'
+_ACEOF
+# GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
+case `${MAKE-make} -f conftest.make 2>/dev/null` in
+ *@@@%%%=?*=@@@%%%*)
+ eval ac_cv_prog_make_${ac_make}_set=yes;;
+ *)
+ eval ac_cv_prog_make_${ac_make}_set=no;;
+esac
+rm -f conftest.make
+fi
+if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+ SET_MAKE=
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+ SET_MAKE="MAKE=${MAKE-make}"
+fi
+
+rm -rf .tst 2>/dev/null
+mkdir .tst 2>/dev/null
+if test -d .tst; then
+ am__leading_dot=.
+else
+ am__leading_dot=_
+fi
+rmdir .tst 2>/dev/null
+
+DEPDIR="${am__leading_dot}deps"
+
+ac_config_commands="$ac_config_commands depfiles"
+
+
+am_make=${MAKE-make}
+cat > confinc << 'END'
+am__doit:
+ @echo this is the am__doit target
+.PHONY: am__doit
+END
+# If we don't find an include directive, just comment out the code.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5
+$as_echo_n "checking for style of include used by $am_make... " >&6; }
+am__include="#"
+am__quote=
+_am_result=none
+# First try GNU make style include.
+echo "include confinc" > confmf
+# Ignore all kinds of additional output from `make'.
+case `$am_make -s -f confmf 2> /dev/null` in #(
+*the\ am__doit\ target*)
+ am__include=include
+ am__quote=
+ _am_result=GNU
+ ;;
+esac
+# Now try BSD make style include.
+if test "$am__include" = "#"; then
+ echo '.include "confinc"' > confmf
+ case `$am_make -s -f confmf 2> /dev/null` in #(
+ *the\ am__doit\ target*)
+ am__include=.include
+ am__quote="\""
+ _am_result=BSD
+ ;;
+ esac
+fi
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5
+$as_echo "$_am_result" >&6; }
+rm -f confinc confmf
+
+# Check whether --enable-dependency-tracking was given.
+if test "${enable_dependency_tracking+set}" = set; then :
+ enableval=$enable_dependency_tracking;
+fi
+
+if test "x$enable_dependency_tracking" != xno; then
+ am_depcomp="$ac_aux_dir/depcomp"
+ AMDEPBACKSLASH='\'
+ am__nodep='_no'
+fi
+ if test "x$enable_dependency_tracking" != xno; then
+ AMDEP_TRUE=
+ AMDEP_FALSE='#'
+else
+ AMDEP_TRUE='#'
+ AMDEP_FALSE=
+fi
+
+
+
+# Check whether --enable-multilib was given.
+if test "${enable_multilib+set}" = set; then :
+ enableval=$enable_multilib; case "${enableval}" in
+ yes) multilib=yes ;;
+ no) multilib=no ;;
+ *) as_fn_error $? "bad value ${enableval} for multilib option" "$LINENO" 5 ;;
+ esac
+else
+ multilib=yes
+fi
+
+# Check whether --enable-target-optspace was given.
+if test "${enable_target_optspace+set}" = set; then :
+ enableval=$enable_target_optspace; case "${enableval}" in
+ yes) target_optspace=yes ;;
+ no) target_optspace=no ;;
+ *) as_fn_error $? "bad value ${enableval} for target-optspace option" "$LINENO" 5 ;;
+ esac
+else
+ target_optspace=
+fi
+
+# Check whether --enable-malloc-debugging was given.
+if test "${enable_malloc_debugging+set}" = set; then :
+ enableval=$enable_malloc_debugging; case "${enableval}" in
+ yes) malloc_debugging=yes ;;
+ no) malloc_debugging=no ;;
+ *) as_fn_error $? "bad value ${enableval} for malloc-debugging option" "$LINENO" 5 ;;
+ esac
+else
+ malloc_debugging=
+fi
+
+# Check whether --enable-newlib-multithread was given.
+if test "${enable_newlib_multithread+set}" = set; then :
+ enableval=$enable_newlib_multithread; case "${enableval}" in
+ yes) newlib_multithread=yes ;;
+ no) newlib_multithread=no ;;
+ *) as_fn_error $? "bad value ${enableval} for newlib-multithread option" "$LINENO" 5 ;;
+ esac
+else
+ newlib_multithread=yes
+fi
+
+# Check whether --enable-newlib-iconv was given.
+if test "${enable_newlib_iconv+set}" = set; then :
+ enableval=$enable_newlib_iconv; if test "${newlib_iconv+set}" != set; then
+ case "${enableval}" in
+ yes) newlib_iconv=yes ;;
+ no) newlib_iconv=no ;;
+ *) as_fn_error $? "bad value ${enableval} for newlib-iconv option" "$LINENO" 5 ;;
+ esac
+ fi
+else
+ newlib_iconv=${newlib_iconv}
+fi
+
+# Check whether --enable-newlib-elix-level was given.
+if test "${enable_newlib_elix_level+set}" = set; then :
+ enableval=$enable_newlib_elix_level; case "${enableval}" in
+ 0) newlib_elix_level=0 ;;
+ 1) newlib_elix_level=1 ;;
+ 2) newlib_elix_level=2 ;;
+ 3) newlib_elix_level=3 ;;
+ 4) newlib_elix_level=4 ;;
+ *) as_fn_error $? "bad value ${enableval} for newlib-elix-level option" "$LINENO" 5 ;;
+ esac
+else
+ newlib_elix_level=0
+fi
+
+# Check whether --enable-newlib-io-float was given.
+if test "${enable_newlib_io_float+set}" = set; then :
+ enableval=$enable_newlib_io_float; case "${enableval}" in
+ yes) newlib_io_float=yes ;;
+ no) newlib_io_float=no ;;
+ *) as_fn_error $? "bad value ${enableval} for newlib-io-float option" "$LINENO" 5 ;;
+ esac
+else
+ newlib_io_float=yes
+fi
+
+# Check whether --enable-newlib-supplied-syscalls was given.
+if test "${enable_newlib_supplied_syscalls+set}" = set; then :
+ enableval=$enable_newlib_supplied_syscalls; case "${enableval}" in
+ yes) newlib_may_supply_syscalls=yes ;;
+ no) newlib_may_supply_syscalls=no ;;
+ *) as_fn_error $? "bad value ${enableval} for newlib-supplied-syscalls option" "$LINENO" 5 ;;
+ esac
+else
+ newlib_may_supply_syscalls=yes
+fi
+
+ if test x${newlib_may_supply_syscalls} = xyes; then
+ MAY_SUPPLY_SYSCALLS_TRUE=
+ MAY_SUPPLY_SYSCALLS_FALSE='#'
+else
+ MAY_SUPPLY_SYSCALLS_TRUE='#'
+ MAY_SUPPLY_SYSCALLS_FALSE=
+fi
+
+
+
+test -z "${with_target_subdir}" && with_target_subdir=.
+
+if test "${srcdir}" = "."; then
+ if test "${with_target_subdir}" != "."; then
+ newlib_basedir="${srcdir}/${with_multisrctop}../../../.."
+ else
+ newlib_basedir="${srcdir}/${with_multisrctop}../../.."
+ fi
+else
+ newlib_basedir="${srcdir}/../../.."
+fi
+
+
+
+
+if test "`cd $srcdir && pwd`" != "`pwd`"; then
+ # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
+ # is not polluted with repeated "-I."
+ am__isrc=' -I$(srcdir)'
+ # test to see if srcdir already configured
+ if test -f $srcdir/config.status; then
+ as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5
+ fi
+fi
+
+# test whether we have cygpath
+if test -z "$CYGPATH_W"; then
+ if (cygpath --version) >/dev/null 2>/dev/null; then
+ CYGPATH_W='cygpath -w'
+ else
+ CYGPATH_W=echo
+ fi
+fi
+
+
+# Define the identity of the package.
+ PACKAGE='newlib'
+ VERSION='2.4.0'
+
+
+# Some tools Automake needs.
+
+ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"}
+
+
+AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"}
+
+
+AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"}
+
+
+AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"}
+
+
+MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
+
+# We need awk for the "check" target. The system "awk" is bad on
+# some platforms.
+# Always define AMTAR for backward compatibility. Yes, it's still used
+# in the wild :-( We should find a proper way to deprecate it ...
+AMTAR='$${TAR-tar}'
+
+am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'
+
+
+
+
+
+
+# FIXME: We temporarily define our own version of AC_PROG_CC. This is
+# copied from autoconf 2.12, but does not call AC_PROG_CC_WORKS. We
+# are probably using a cross compiler, which will not be able to fully
+# link an executable. This should really be fixed in autoconf
+# itself.
+
+
+
+
+
+
+
+# Extract the first word of "gcc", so it can be a program name with args.
+set dummy gcc; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_CC+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_CC="gcc"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+$as_echo "$CC" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+
+depcc="$CC" am_compiler_list=
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
+$as_echo_n "checking dependency style of $depcc... " >&6; }
+if ${am_cv_CC_dependencies_compiler_type+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
+ # We make a subdir and do the tests there. Otherwise we can end up
+ # making bogus files that we don't know about and never remove. For
+ # instance it was reported that on HP-UX the gcc test will end up
+ # making a dummy file named `D' -- because `-MD' means `put the output
+ # in D'.
+ rm -rf conftest.dir
+ mkdir conftest.dir
+ # Copy depcomp to subdir because otherwise we won't find it if we're
+ # using a relative directory.
+ cp "$am_depcomp" conftest.dir
+ cd conftest.dir
+ # We will build objects and dependencies in a subdirectory because
+ # it helps to detect inapplicable dependency modes. For instance
+ # both Tru64's cc and ICC support -MD to output dependencies as a
+ # side effect of compilation, but ICC will put the dependencies in
+ # the current directory while Tru64 will put them in the object
+ # directory.
+ mkdir sub
+
+ am_cv_CC_dependencies_compiler_type=none
+ if test "$am_compiler_list" = ""; then
+ am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
+ fi
+ am__universal=false
+ case " $depcc " in #(
+ *\ -arch\ *\ -arch\ *) am__universal=true ;;
+ esac
+
+ for depmode in $am_compiler_list; do
+ # Setup a source with many dependencies, because some compilers
+ # like to wrap large dependency lists on column 80 (with \), and
+ # we should not choose a depcomp mode which is confused by this.
+ #
+ # We need to recreate these files for each test, as the compiler may
+ # overwrite some of them when testing with obscure command lines.
+ # This happens at least with the AIX C compiler.
+ : > sub/conftest.c
+ for i in 1 2 3 4 5 6; do
+ echo '#include "conftst'$i'.h"' >> sub/conftest.c
+ # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
+ # Solaris 8's {/usr,}/bin/sh.
+ touch sub/conftst$i.h
+ done
+ echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
+
+ # We check with `-c' and `-o' for the sake of the "dashmstdout"
+ # mode. It turns out that the SunPro C++ compiler does not properly
+ # handle `-M -o', and we need to detect this. Also, some Intel
+ # versions had trouble with output in subdirs
+ am__obj=sub/conftest.${OBJEXT-o}
+ am__minus_obj="-o $am__obj"
+ case $depmode in
+ gcc)
+ # This depmode causes a compiler race in universal mode.
+ test "$am__universal" = false || continue
+ ;;
+ nosideeffect)
+ # after this tag, mechanisms are not by side-effect, so they'll
+ # only be used when explicitly requested
+ if test "x$enable_dependency_tracking" = xyes; then
+ continue
+ else
+ break
+ fi
+ ;;
+ msvc7 | msvc7msys | msvisualcpp | msvcmsys)
+ # This compiler won't grok `-c -o', but also, the minuso test has
+ # not run yet. These depmodes are late enough in the game, and
+ # so weak that their functioning should not be impacted.
+ am__obj=conftest.${OBJEXT-o}
+ am__minus_obj=
+ ;;
+ none) break ;;
+ esac
+ if depmode=$depmode \
+ source=sub/conftest.c object=$am__obj \
+ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
+ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
+ >/dev/null 2>conftest.err &&
+ grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
+ grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
+ grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
+ ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
+ # icc doesn't choke on unknown options, it will just issue warnings
+ # or remarks (even with -Werror). So we grep stderr for any message
+ # that says an option was ignored or not supported.
+ # When given -MP, icc 7.0 and 7.1 complain thusly:
+ # icc: Command line warning: ignoring option '-M'; no argument required
+ # The diagnosis changed in icc 8.0:
+ # icc: Command line remark: option '-MP' not supported
+ if (grep 'ignoring option' conftest.err ||
+ grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
+ am_cv_CC_dependencies_compiler_type=$depmode
+ break
+ fi
+ fi
+ done
+
+ cd ..
+ rm -rf conftest.dir
+else
+ am_cv_CC_dependencies_compiler_type=none
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
+$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; }
+CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
+
+ if
+ test "x$enable_dependency_tracking" != xno \
+ && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then
+ am__fastdepCC_TRUE=
+ am__fastdepCC_FALSE='#'
+else
+ am__fastdepCC_TRUE='#'
+ am__fastdepCC_FALSE=
+fi
+
+
+if test -z "$CC"; then
+ # Extract the first word of "cc", so it can be a program name with args.
+set dummy cc; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_CC+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+ ac_prog_rejected=no
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
+ ac_prog_rejected=yes
+ continue
+ fi
+ ac_cv_prog_CC="cc"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+if test $ac_prog_rejected = yes; then
+ # We found a bogon in the path, so make sure we never use it.
+ set dummy $ac_cv_prog_CC
+ shift
+ if test $# != 0; then
+ # We chose a different compiler from the bogus one.
+ # However, it has the same basename, so the bogon will be chosen
+ # first if we set CC to just the basename; use the full file name.
+ shift
+ ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
+ fi
+fi
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+$as_echo "$CC" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+ test -z "$CC" && as_fn_error $? "no acceptable cc found in \$PATH" "$LINENO" 5
+fi
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using GNU C" >&5
+$as_echo_n "checking whether we are using GNU C... " >&6; }
+if ${ac_cv_c_compiler_gnu+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat > conftest.c <<EOF
+#ifdef __GNUC__
+ yes;
+#endif
+EOF
+if { ac_try='${CC-cc} -E conftest.c'
+ { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; } | egrep yes >/dev/null 2>&1; then
+ ac_cv_c_compiler_gnu=yes
+else
+ ac_cv_c_compiler_gnu=no
+fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
+$as_echo "$ac_cv_c_compiler_gnu" >&6; }
+
+if test $ac_cv_c_compiler_gnu = yes; then
+ GCC=yes
+ ac_test_CFLAGS="${CFLAGS+set}"
+ ac_save_CFLAGS="$CFLAGS"
+ ac_test_CFLAGS=${CFLAGS+set}
+ac_save_CFLAGS=$CFLAGS
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
+$as_echo_n "checking whether $CC accepts -g... " >&6; }
+if ${ac_cv_prog_cc_g+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_save_c_werror_flag=$ac_c_werror_flag
+ ac_c_werror_flag=yes
+ ac_cv_prog_cc_g=no
+ CFLAGS="-g"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ ac_cv_prog_cc_g=yes
+else
+ CFLAGS=""
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+
+else
+ ac_c_werror_flag=$ac_save_c_werror_flag
+ CFLAGS="-g"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ ac_cv_prog_cc_g=yes
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ ac_c_werror_flag=$ac_save_c_werror_flag
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
+$as_echo "$ac_cv_prog_cc_g" >&6; }
+if test "$ac_test_CFLAGS" = set; then
+ CFLAGS=$ac_save_CFLAGS
+elif test $ac_cv_prog_cc_g = yes; then
+ if test "$GCC" = yes; then
+ CFLAGS="-g -O2"
+ else
+ CFLAGS="-g"
+ fi
+else
+ if test "$GCC" = yes; then
+ CFLAGS="-O2"
+ else
+ CFLAGS=
+ fi
+fi
+ if test "$ac_test_CFLAGS" = set; then
+ CFLAGS="$ac_save_CFLAGS"
+ elif test $ac_cv_prog_cc_g = yes; then
+ CFLAGS="-g -O2"
+ else
+ CFLAGS="-O2"
+ fi
+else
+ GCC=
+ test "${CFLAGS+set}" = set || CFLAGS="-g"
+fi
+
+
+if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args.
+set dummy ${ac_tool_prefix}as; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_AS+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$AS"; then
+ ac_cv_prog_AS="$AS" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_AS="${ac_tool_prefix}as"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+AS=$ac_cv_prog_AS
+if test -n "$AS"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
+$as_echo "$AS" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_AS"; then
+ ac_ct_AS=$AS
+ # Extract the first word of "as", so it can be a program name with args.
+set dummy as; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_AS+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_ct_AS"; then
+ ac_cv_prog_ac_ct_AS="$ac_ct_AS" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_ac_ct_AS="as"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_AS=$ac_cv_prog_ac_ct_AS
+if test -n "$ac_ct_AS"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AS" >&5
+$as_echo "$ac_ct_AS" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+ if test "x$ac_ct_AS" = x; then
+ AS=""
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ AS=$ac_ct_AS
+ fi
+else
+ AS="$ac_cv_prog_AS"
+fi
+
+if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
+set dummy ${ac_tool_prefix}ar; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_AR+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$AR"; then
+ ac_cv_prog_AR="$AR" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_AR="${ac_tool_prefix}ar"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+AR=$ac_cv_prog_AR
+if test -n "$AR"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
+$as_echo "$AR" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_AR"; then
+ ac_ct_AR=$AR
+ # Extract the first word of "ar", so it can be a program name with args.
+set dummy ar; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_AR+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_ct_AR"; then
+ ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_ac_ct_AR="ar"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_AR=$ac_cv_prog_ac_ct_AR
+if test -n "$ac_ct_AR"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
+$as_echo "$ac_ct_AR" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+ if test "x$ac_ct_AR" = x; then
+ AR=""
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ AR=$ac_ct_AR
+ fi
+else
+ AR="$ac_cv_prog_AR"
+fi
+
+if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
+set dummy ${ac_tool_prefix}ranlib; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_RANLIB+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$RANLIB"; then
+ ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+RANLIB=$ac_cv_prog_RANLIB
+if test -n "$RANLIB"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
+$as_echo "$RANLIB" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_RANLIB"; then
+ ac_ct_RANLIB=$RANLIB
+ # Extract the first word of "ranlib", so it can be a program name with args.
+set dummy ranlib; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_ct_RANLIB"; then
+ ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_ac_ct_RANLIB="ranlib"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
+if test -n "$ac_ct_RANLIB"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
+$as_echo "$ac_ct_RANLIB" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+ if test "x$ac_ct_RANLIB" = x; then
+ RANLIB=":"
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ RANLIB=$ac_ct_RANLIB
+ fi
+else
+ RANLIB="$ac_cv_prog_RANLIB"
+fi
+
+if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}readelf", so it can be a program name with args.
+set dummy ${ac_tool_prefix}readelf; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_READELF+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$READELF"; then
+ ac_cv_prog_READELF="$READELF" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_READELF="${ac_tool_prefix}readelf"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+READELF=$ac_cv_prog_READELF
+if test -n "$READELF"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
+$as_echo "$READELF" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_READELF"; then
+ ac_ct_READELF=$READELF
+ # Extract the first word of "readelf", so it can be a program name with args.
+set dummy readelf; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_READELF+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_ct_READELF"; then
+ ac_cv_prog_ac_ct_READELF="$ac_ct_READELF" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_ac_ct_READELF="readelf"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_READELF=$ac_cv_prog_ac_ct_READELF
+if test -n "$ac_ct_READELF"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_READELF" >&5
+$as_echo "$ac_ct_READELF" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+ if test "x$ac_ct_READELF" = x; then
+ READELF=":"
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ READELF=$ac_ct_READELF
+ fi
+else
+ READELF="$ac_cv_prog_READELF"
+fi
+
+
+
+
+# Hack to ensure that INSTALL won't be set to "../" with autoconf 2.13. */
+ac_given_INSTALL=$INSTALL
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5
+$as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; }
+ # Check whether --enable-maintainer-mode was given.
+if test "${enable_maintainer_mode+set}" = set; then :
+ enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval
+else
+ USE_MAINTAINER_MODE=no
+fi
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_MAINTAINER_MODE" >&5
+$as_echo "$USE_MAINTAINER_MODE" >&6; }
+ if test $USE_MAINTAINER_MODE = yes; then
+ MAINTAINER_MODE_TRUE=
+ MAINTAINER_MODE_FALSE='#'
+else
+ MAINTAINER_MODE_TRUE='#'
+ MAINTAINER_MODE_FALSE=
+fi
+
+ MAINT=$MAINTAINER_MODE_TRUE
+
+
+# By default we simply use the C compiler to build assembly code.
+
+test "${CCAS+set}" = set || CCAS=$CC
+test "${CCASFLAGS+set}" = set || CCASFLAGS=$CFLAGS
+
+
+
+
+# We need AC_EXEEXT to keep automake happy in cygnus mode. However,
+# at least currently, we never actually build a program, so we never
+# need to use $(EXEEXT). Moreover, the test for EXEEXT normally
+# fails, because we are probably configuring with a cross compiler
+# which can't create executables. So we include AC_EXEEXT to keep
+# automake happy, but we don't execute it, since we don't care about
+# the result.
+if false; then
+
+ dummy_var=1
+fi
+
+. ${newlib_basedir}/configure.host
+
+newlib_cflags="${newlib_cflags} -fno-builtin"
+
+NEWLIB_CFLAGS=${newlib_cflags}
+
+
+NO_INCLUDE_LIST=${noinclude}
+
+
+LDFLAGS=${ldflags}
+
+
+ if test x${newlib_elix_level} = x0; then
+ ELIX_LEVEL_0_TRUE=
+ ELIX_LEVEL_0_FALSE='#'
+else
+ ELIX_LEVEL_0_TRUE='#'
+ ELIX_LEVEL_0_FALSE=
+fi
+
+ if test x${newlib_elix_level} = x1; then
+ ELIX_LEVEL_1_TRUE=
+ ELIX_LEVEL_1_FALSE='#'
+else
+ ELIX_LEVEL_1_TRUE='#'
+ ELIX_LEVEL_1_FALSE=
+fi
+
+ if test x${newlib_elix_level} = x2; then
+ ELIX_LEVEL_2_TRUE=
+ ELIX_LEVEL_2_FALSE='#'
+else
+ ELIX_LEVEL_2_TRUE='#'
+ ELIX_LEVEL_2_FALSE=
+fi
+
+ if test x${newlib_elix_level} = x3; then
+ ELIX_LEVEL_3_TRUE=
+ ELIX_LEVEL_3_FALSE='#'
+else
+ ELIX_LEVEL_3_TRUE='#'
+ ELIX_LEVEL_3_FALSE=
+fi
+
+ if test x${newlib_elix_level} = x4; then
+ ELIX_LEVEL_4_TRUE=
+ ELIX_LEVEL_4_FALSE='#'
+else
+ ELIX_LEVEL_4_TRUE='#'
+ ELIX_LEVEL_4_FALSE=
+fi
+
+
+ if test x${use_libtool} = xyes; then
+ USE_LIBTOOL_TRUE=
+ USE_LIBTOOL_FALSE='#'
+else
+ USE_LIBTOOL_TRUE='#'
+ USE_LIBTOOL_FALSE=
+fi
+
+
+# Hard-code OBJEXT. Normally it is set by AC_OBJEXT, but we
+# use oext, which is set in configure.host based on the target platform.
+OBJEXT=${oext}
+
+
+
+
+
+
+
+
+
+
+
+ac_config_files="$ac_config_files Makefile"
+
+cat >confcache <<\_ACEOF
+# This file is a shell script that caches the results of configure
+# tests run on this system so they can be shared between configure
+# scripts and configure runs, see configure's option --config-cache.
+# It is not useful on other systems. If it contains results you don't
+# want to keep, you may remove or edit it.
+#
+# config.status only pays attention to the cache file if you give it
+# the --recheck option to rerun configure.
+#
+# `ac_cv_env_foo' variables (set or unset) will be overridden when
+# loading this file, other *unset* `ac_cv_foo' will be assigned the
+# following values.
+
+_ACEOF
+
+# The following way of writing the cache mishandles newlines in values,
+# but we know of no workaround that is simple, portable, and efficient.
+# So, we kill variables containing newlines.
+# Ultrix sh set writes to stderr and can't be redirected directly,
+# and sets the high bit in the cache file unless we assign to the vars.
+(
+ for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
+ eval ac_val=\$$ac_var
+ case $ac_val in #(
+ *${as_nl}*)
+ case $ac_var in #(
+ *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
+$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
+ esac
+ case $ac_var in #(
+ _ | IFS | as_nl) ;; #(
+ BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
+ *) { eval $ac_var=; unset $ac_var;} ;;
+ esac ;;
+ esac
+ done
+
+ (set) 2>&1 |
+ case $as_nl`(ac_space=' '; set) 2>&1` in #(
+ *${as_nl}ac_space=\ *)
+ # `set' does not quote correctly, so add quotes: double-quote
+ # substitution turns \\\\ into \\, and sed turns \\ into \.
+ sed -n \
+ "s/'/'\\\\''/g;
+ s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
+ ;; #(
+ *)
+ # `set' quotes correctly as required by POSIX, so do not add quotes.
+ sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
+ ;;
+ esac |
+ sort
+) |
+ sed '
+ /^ac_cv_env_/b end
+ t clear
+ :clear
+ s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
+ t end
+ s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
+ :end' >>confcache
+if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
+ if test -w "$cache_file"; then
+ if test "x$cache_file" != "x/dev/null"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
+$as_echo "$as_me: updating cache $cache_file" >&6;}
+ if test ! -f "$cache_file" || test -h "$cache_file"; then
+ cat confcache >"$cache_file"
+ else
+ case $cache_file in #(
+ */* | ?:*)
+ mv -f confcache "$cache_file"$$ &&
+ mv -f "$cache_file"$$ "$cache_file" ;; #(
+ *)
+ mv -f confcache "$cache_file" ;;
+ esac
+ fi
+ fi
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
+$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
+ fi
+fi
+rm -f confcache
+
+test "x$prefix" = xNONE && prefix=$ac_default_prefix
+# Let make expand exec_prefix.
+test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
+
+# Transform confdefs.h into DEFS.
+# Protect against shell expansion while executing Makefile rules.
+# Protect against Makefile macro expansion.
+#
+# If the first sed substitution is executed (which looks for macros that
+# take arguments), then branch to the quote section. Otherwise,
+# look for a macro that doesn't take arguments.
+ac_script='
+:mline
+/\\$/{
+ N
+ s,\\\n,,
+ b mline
+}
+t clear
+:clear
+s/^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*([^)]*)\)[ ]*\(.*\)/-D\1=\2/g
+t quote
+s/^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)/-D\1=\2/g
+t quote
+b any
+:quote
+s/[ `~#$^&*(){}\\|;'\''"<>?]/\\&/g
+s/\[/\\&/g
+s/\]/\\&/g
+s/\$/$$/g
+H
+:any
+${
+ g
+ s/^\n//
+ s/\n/ /g
+ p
+}
+'
+DEFS=`sed -n "$ac_script" confdefs.h`
+
+
+ac_libobjs=
+ac_ltlibobjs=
+U=
+for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
+ # 1. Remove the extension, and $U if already installed.
+ ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
+ ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
+ # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
+ # will be set to the directory where LIBOBJS objects are built.
+ as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
+ as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
+done
+LIBOBJS=$ac_libobjs
+
+LTLIBOBJS=$ac_ltlibobjs
+
+
+if test -z "${MAY_SUPPLY_SYSCALLS_TRUE}" && test -z "${MAY_SUPPLY_SYSCALLS_FALSE}"; then
+ as_fn_error $? "conditional \"MAY_SUPPLY_SYSCALLS\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+
+if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then
+ as_fn_error $? "conditional \"AMDEP\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
+ as_fn_error $? "conditional \"am__fastdepCC\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then
+ as_fn_error $? "conditional \"MAINTAINER_MODE\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${ELIX_LEVEL_0_TRUE}" && test -z "${ELIX_LEVEL_0_FALSE}"; then
+ as_fn_error $? "conditional \"ELIX_LEVEL_0\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${ELIX_LEVEL_1_TRUE}" && test -z "${ELIX_LEVEL_1_FALSE}"; then
+ as_fn_error $? "conditional \"ELIX_LEVEL_1\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${ELIX_LEVEL_2_TRUE}" && test -z "${ELIX_LEVEL_2_FALSE}"; then
+ as_fn_error $? "conditional \"ELIX_LEVEL_2\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${ELIX_LEVEL_3_TRUE}" && test -z "${ELIX_LEVEL_3_FALSE}"; then
+ as_fn_error $? "conditional \"ELIX_LEVEL_3\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${ELIX_LEVEL_4_TRUE}" && test -z "${ELIX_LEVEL_4_FALSE}"; then
+ as_fn_error $? "conditional \"ELIX_LEVEL_4\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${USE_LIBTOOL_TRUE}" && test -z "${USE_LIBTOOL_FALSE}"; then
+ as_fn_error $? "conditional \"USE_LIBTOOL\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+
+: "${CONFIG_STATUS=./config.status}"
+ac_write_fail=0
+ac_clean_files_save=$ac_clean_files
+ac_clean_files="$ac_clean_files $CONFIG_STATUS"
+{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
+$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
+as_write_fail=0
+cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
+#! $SHELL
+# Generated by $as_me.
+# Run this file to recreate the current configuration.
+# Compiler output produced by configure, useful for debugging
+# configure, is in config.log if it exists.
+
+debug=false
+ac_cs_recheck=false
+ac_cs_silent=false
+
+SHELL=\${CONFIG_SHELL-$SHELL}
+export SHELL
+_ASEOF
+cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
+## -------------------- ##
+## M4sh Initialization. ##
+## -------------------- ##
+
+# Be more Bourne compatible
+DUALCASE=1; export DUALCASE # for MKS sh
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
+ emulate sh
+ NULLCMD=:
+ # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
+ # is contrary to our usage. Disable this feature.
+ alias -g '${1+"$@"}'='"$@"'
+ setopt NO_GLOB_SUBST
+else
+ case `(set -o) 2>/dev/null` in #(
+ *posix*) :
+ set -o posix ;; #(
+ *) :
+ ;;
+esac
+fi
+
+
+as_nl='
+'
+export as_nl
+# Printing a long string crashes Solaris 7 /usr/bin/printf.
+as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
+as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
+as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
+# Prefer a ksh shell builtin over an external printf program on Solaris,
+# but without wasting forks for bash or zsh.
+if test -z "$BASH_VERSION$ZSH_VERSION" \
+ && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
+ as_echo='print -r --'
+ as_echo_n='print -rn --'
+elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
+ as_echo='printf %s\n'
+ as_echo_n='printf %s'
+else
+ if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
+ as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
+ as_echo_n='/usr/ucb/echo -n'
+ else
+ as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
+ as_echo_n_body='eval
+ arg=$1;
+ case $arg in #(
+ *"$as_nl"*)
+ expr "X$arg" : "X\\(.*\\)$as_nl";
+ arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
+ esac;
+ expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
+ '
+ export as_echo_n_body
+ as_echo_n='sh -c $as_echo_n_body as_echo'
+ fi
+ export as_echo_body
+ as_echo='sh -c $as_echo_body as_echo'
+fi
+
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+ PATH_SEPARATOR=:
+ (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
+ (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
+ PATH_SEPARATOR=';'
+ }
+fi
+
+
+# IFS
+# We need space, tab and new line, in precisely that order. Quoting is
+# there to prevent editors from complaining about space-tab.
+# (If _AS_PATH_WALK were called with IFS unset, it would disable word
+# splitting by setting IFS to empty value.)
+IFS=" "" $as_nl"
+
+# Find who we are. Look in the path if we contain no directory separator.
+as_myself=
+case $0 in #((
+ *[\\/]* ) as_myself=$0 ;;
+ *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
+ done
+IFS=$as_save_IFS
+
+ ;;
+esac
+# We did not find ourselves, most probably we were run as `sh COMMAND'
+# in which case we are not to be found in the path.
+if test "x$as_myself" = x; then
+ as_myself=$0
+fi
+if test ! -f "$as_myself"; then
+ $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
+ exit 1
+fi
+
+# Unset variables that we do not need and which cause bugs (e.g. in
+# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
+# suppresses any "Segmentation fault" message there. '((' could
+# trigger a bug in pdksh 5.2.14.
+for as_var in BASH_ENV ENV MAIL MAILPATH
+do eval test x\${$as_var+set} = xset \
+ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
+done
+PS1='$ '
+PS2='> '
+PS4='+ '
+
+# NLS nuisances.
+LC_ALL=C
+export LC_ALL
+LANGUAGE=C
+export LANGUAGE
+
+# CDPATH.
+(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
+
+
+# as_fn_error STATUS ERROR [LINENO LOG_FD]
+# ----------------------------------------
+# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
+# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
+# script with STATUS, using 1 if that was 0.
+as_fn_error ()
+{
+ as_status=$1; test $as_status -eq 0 && as_status=1
+ if test "$4"; then
+ as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
+ fi
+ $as_echo "$as_me: error: $2" >&2
+ as_fn_exit $as_status
+} # as_fn_error
+
+
+# as_fn_set_status STATUS
+# -----------------------
+# Set $? to STATUS, without forking.
+as_fn_set_status ()
+{
+ return $1
+} # as_fn_set_status
+
+# as_fn_exit STATUS
+# -----------------
+# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
+as_fn_exit ()
+{
+ set +e
+ as_fn_set_status $1
+ exit $1
+} # as_fn_exit
+
+# as_fn_unset VAR
+# ---------------
+# Portably unset VAR.
+as_fn_unset ()
+{
+ { eval $1=; unset $1;}
+}
+as_unset=as_fn_unset
+# as_fn_append VAR VALUE
+# ----------------------
+# Append the text in VALUE to the end of the definition contained in VAR. Take
+# advantage of any shell optimizations that allow amortized linear growth over
+# repeated appends, instead of the typical quadratic growth present in naive
+# implementations.
+if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
+ eval 'as_fn_append ()
+ {
+ eval $1+=\$2
+ }'
+else
+ as_fn_append ()
+ {
+ eval $1=\$$1\$2
+ }
+fi # as_fn_append
+
+# as_fn_arith ARG...
+# ------------------
+# Perform arithmetic evaluation on the ARGs, and store the result in the
+# global $as_val. Take advantage of shells that can avoid forks. The arguments
+# must be portable across $(()) and expr.
+if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
+ eval 'as_fn_arith ()
+ {
+ as_val=$(( $* ))
+ }'
+else
+ as_fn_arith ()
+ {
+ as_val=`expr "$@" || test $? -eq 1`
+ }
+fi # as_fn_arith
+
+
+if expr a : '\(a\)' >/dev/null 2>&1 &&
+ test "X`expr 00001 : '.*\(...\)'`" = X001; then
+ as_expr=expr
+else
+ as_expr=false
+fi
+
+if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
+ as_basename=basename
+else
+ as_basename=false
+fi
+
+if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
+ as_dirname=dirname
+else
+ as_dirname=false
+fi
+
+as_me=`$as_basename -- "$0" ||
+$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
+ X"$0" : 'X\(//\)$' \| \
+ X"$0" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X/"$0" |
+ sed '/^.*\/\([^/][^/]*\)\/*$/{
+ s//\1/
+ q
+ }
+ /^X\/\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\/\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+
+# Avoid depending upon Character Ranges.
+as_cr_letters='abcdefghijklmnopqrstuvwxyz'
+as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
+as_cr_Letters=$as_cr_letters$as_cr_LETTERS
+as_cr_digits='0123456789'
+as_cr_alnum=$as_cr_Letters$as_cr_digits
+
+ECHO_C= ECHO_N= ECHO_T=
+case `echo -n x` in #(((((
+-n*)
+ case `echo 'xy\c'` in
+ *c*) ECHO_T=' ';; # ECHO_T is single tab character.
+ xy) ECHO_C='\c';;
+ *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
+ ECHO_T=' ';;
+ esac;;
+*)
+ ECHO_N='-n';;
+esac
+
+rm -f conf$$ conf$$.exe conf$$.file
+if test -d conf$$.dir; then
+ rm -f conf$$.dir/conf$$.file
+else
+ rm -f conf$$.dir
+ mkdir conf$$.dir 2>/dev/null
+fi
+if (echo >conf$$.file) 2>/dev/null; then
+ if ln -s conf$$.file conf$$ 2>/dev/null; then
+ as_ln_s='ln -s'
+ # ... but there are two gotchas:
+ # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
+ # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
+ # In both cases, we have to default to `cp -p'.
+ ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
+ as_ln_s='cp -p'
+ elif ln conf$$.file conf$$ 2>/dev/null; then
+ as_ln_s=ln
+ else
+ as_ln_s='cp -p'
+ fi
+else
+ as_ln_s='cp -p'
+fi
+rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
+rmdir conf$$.dir 2>/dev/null
+
+
+# as_fn_mkdir_p
+# -------------
+# Create "$as_dir" as a directory, including parents if necessary.
+as_fn_mkdir_p ()
+{
+
+ case $as_dir in #(
+ -*) as_dir=./$as_dir;;
+ esac
+ test -d "$as_dir" || eval $as_mkdir_p || {
+ as_dirs=
+ while :; do
+ case $as_dir in #(
+ *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
+ *) as_qdir=$as_dir;;
+ esac
+ as_dirs="'$as_qdir' $as_dirs"
+ as_dir=`$as_dirname -- "$as_dir" ||
+$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$as_dir" : 'X\(//\)[^/]' \| \
+ X"$as_dir" : 'X\(//\)$' \| \
+ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$as_dir" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)[^/].*/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+ test -d "$as_dir" && break
+ done
+ test -z "$as_dirs" || eval "mkdir $as_dirs"
+ } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
+
+
+} # as_fn_mkdir_p
+if mkdir -p . 2>/dev/null; then
+ as_mkdir_p='mkdir -p "$as_dir"'
+else
+ test -d ./-p && rmdir ./-p
+ as_mkdir_p=false
+fi
+
+if test -x / >/dev/null 2>&1; then
+ as_test_x='test -x'
+else
+ if ls -dL / >/dev/null 2>&1; then
+ as_ls_L_option=L
+ else
+ as_ls_L_option=
+ fi
+ as_test_x='
+ eval sh -c '\''
+ if test -d "$1"; then
+ test -d "$1/.";
+ else
+ case $1 in #(
+ -*)set "./$1";;
+ esac;
+ case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
+ ???[sx]*):;;*)false;;esac;fi
+ '\'' sh
+ '
+fi
+as_executable_p=$as_test_x
+
+# Sed expression to map a string onto a valid CPP name.
+as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
+
+# Sed expression to map a string onto a valid variable name.
+as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
+
+
+exec 6>&1
+## ----------------------------------- ##
+## Main body of $CONFIG_STATUS script. ##
+## ----------------------------------- ##
+_ASEOF
+test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+# Save the log message, to keep $0 and so on meaningful, and to
+# report actual input values of CONFIG_FILES etc. instead of their
+# values after options handling.
+ac_log="
+This file was extended by newlib $as_me 2.4.0, which was
+generated by GNU Autoconf 2.68. Invocation command line was
+
+ CONFIG_FILES = $CONFIG_FILES
+ CONFIG_HEADERS = $CONFIG_HEADERS
+ CONFIG_LINKS = $CONFIG_LINKS
+ CONFIG_COMMANDS = $CONFIG_COMMANDS
+ $ $0 $@
+
+on `(hostname || uname -n) 2>/dev/null | sed 1q`
+"
+
+_ACEOF
+
+case $ac_config_files in *"
+"*) set x $ac_config_files; shift; ac_config_files=$*;;
+esac
+
+
+
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+# Files that config.status was made for.
+config_files="$ac_config_files"
+config_commands="$ac_config_commands"
+
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+ac_cs_usage="\
+\`$as_me' instantiates files and other configuration actions
+from templates according to the current configuration. Unless the files
+and actions are specified as TAGs, all are instantiated by default.
+
+Usage: $0 [OPTION]... [TAG]...
+
+ -h, --help print this help, then exit
+ -V, --version print version number and configuration settings, then exit
+ --config print configuration, then exit
+ -q, --quiet, --silent
+ do not print progress messages
+ -d, --debug don't remove temporary files
+ --recheck update $as_me by reconfiguring in the same conditions
+ --file=FILE[:TEMPLATE]
+ instantiate the configuration file FILE
+
+Configuration files:
+$config_files
+
+Configuration commands:
+$config_commands
+
+Report bugs to the package provider."
+
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
+ac_cs_version="\\
+newlib config.status 2.4.0
+configured by $0, generated by GNU Autoconf 2.68,
+ with options \\"\$ac_cs_config\\"
+
+Copyright (C) 2010 Free Software Foundation, Inc.
+This config.status script is free software; the Free Software Foundation
+gives unlimited permission to copy, distribute and modify it."
+
+ac_pwd='$ac_pwd'
+srcdir='$srcdir'
+INSTALL='$INSTALL'
+MKDIR_P='$MKDIR_P'
+AWK='$AWK'
+test -n "\$AWK" || AWK=awk
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+# The default lists apply if the user does not specify any file.
+ac_need_defaults=:
+while test $# != 0
+do
+ case $1 in
+ --*=?*)
+ ac_option=`expr "X$1" : 'X\([^=]*\)='`
+ ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
+ ac_shift=:
+ ;;
+ --*=)
+ ac_option=`expr "X$1" : 'X\([^=]*\)='`
+ ac_optarg=
+ ac_shift=:
+ ;;
+ *)
+ ac_option=$1
+ ac_optarg=$2
+ ac_shift=shift
+ ;;
+ esac
+
+ case $ac_option in
+ # Handling of the options.
+ -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
+ ac_cs_recheck=: ;;
+ --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
+ $as_echo "$ac_cs_version"; exit ;;
+ --config | --confi | --conf | --con | --co | --c )
+ $as_echo "$ac_cs_config"; exit ;;
+ --debug | --debu | --deb | --de | --d | -d )
+ debug=: ;;
+ --file | --fil | --fi | --f )
+ $ac_shift
+ case $ac_optarg in
+ *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
+ '') as_fn_error $? "missing file argument" ;;
+ esac
+ as_fn_append CONFIG_FILES " '$ac_optarg'"
+ ac_need_defaults=false;;
+ --he | --h | --help | --hel | -h )
+ $as_echo "$ac_cs_usage"; exit ;;
+ -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+ | -silent | --silent | --silen | --sile | --sil | --si | --s)
+ ac_cs_silent=: ;;
+
+ # This is an error.
+ -*) as_fn_error $? "unrecognized option: \`$1'
+Try \`$0 --help' for more information." ;;
+
+ *) as_fn_append ac_config_targets " $1"
+ ac_need_defaults=false ;;
+
+ esac
+ shift
+done
+
+ac_configure_extra_args=
+
+if $ac_cs_silent; then
+ exec 6>/dev/null
+ ac_configure_extra_args="$ac_configure_extra_args --silent"
+fi
+
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+if \$ac_cs_recheck; then
+ set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
+ shift
+ \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
+ CONFIG_SHELL='$SHELL'
+ export CONFIG_SHELL
+ exec "\$@"
+fi
+
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+exec 5>>config.log
+{
+ echo
+ sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
+## Running $as_me. ##
+_ASBOX
+ $as_echo "$ac_log"
+} >&5
+
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+#
+# INIT-COMMANDS
+#
+AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"
+
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+
+# Handling of arguments.
+for ac_config_target in $ac_config_targets
+do
+ case $ac_config_target in
+ "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
+ "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
+
+ *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
+ esac
+done
+
+
+# If the user did not use the arguments to specify the items to instantiate,
+# then the envvar interface is used. Set only those that are not.
+# We use the long form for the default assignment because of an extremely
+# bizarre bug on SunOS 4.1.3.
+if $ac_need_defaults; then
+ test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
+ test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
+fi
+
+# Have a temporary directory for convenience. Make it in the build tree
+# simply because there is no reason against having it here, and in addition,
+# creating and moving files from /tmp can sometimes cause problems.
+# Hook for its removal unless debugging.
+# Note that there is a small window in which the directory will not be cleaned:
+# after its creation but before its name has been assigned to `$tmp'.
+$debug ||
+{
+ tmp= ac_tmp=
+ trap 'exit_status=$?
+ : "${ac_tmp:=$tmp}"
+ { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
+' 0
+ trap 'as_fn_exit 1' 1 2 13 15
+}
+# Create a (secure) tmp directory for tmp files.
+
+{
+ tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
+ test -d "$tmp"
+} ||
+{
+ tmp=./conf$$-$RANDOM
+ (umask 077 && mkdir "$tmp")
+} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
+ac_tmp=$tmp
+
+# Set up the scripts for CONFIG_FILES section.
+# No need to generate them if there are no CONFIG_FILES.
+# This happens for instance with `./config.status config.h'.
+if test -n "$CONFIG_FILES"; then
+
+
+ac_cr=`echo X | tr X '\015'`
+# On cygwin, bash can eat \r inside `` if the user requested igncr.
+# But we know of no other shell where ac_cr would be empty at this
+# point, so we can use a bashism as a fallback.
+if test "x$ac_cr" = x; then
+ eval ac_cr=\$\'\\r\'
+fi
+ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
+if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
+ ac_cs_awk_cr='\\r'
+else
+ ac_cs_awk_cr=$ac_cr
+fi
+
+echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
+_ACEOF
+
+
+{
+ echo "cat >conf$$subs.awk <<_ACEOF" &&
+ echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
+ echo "_ACEOF"
+} >conf$$subs.sh ||
+ as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
+ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
+ac_delim='%!_!# '
+for ac_last_try in false false false false false :; do
+ . ./conf$$subs.sh ||
+ as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
+
+ ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
+ if test $ac_delim_n = $ac_delim_num; then
+ break
+ elif $ac_last_try; then
+ as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
+ else
+ ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
+ fi
+done
+rm -f conf$$subs.sh
+
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
+_ACEOF
+sed -n '
+h
+s/^/S["/; s/!.*/"]=/
+p
+g
+s/^[^!]*!//
+:repl
+t repl
+s/'"$ac_delim"'$//
+t delim
+:nl
+h
+s/\(.\{148\}\)..*/\1/
+t more1
+s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
+p
+n
+b repl
+:more1
+s/["\\]/\\&/g; s/^/"/; s/$/"\\/
+p
+g
+s/.\{148\}//
+t nl
+:delim
+h
+s/\(.\{148\}\)..*/\1/
+t more2
+s/["\\]/\\&/g; s/^/"/; s/$/"/
+p
+b
+:more2
+s/["\\]/\\&/g; s/^/"/; s/$/"\\/
+p
+g
+s/.\{148\}//
+t delim
+' <conf$$subs.awk | sed '
+/^[^""]/{
+ N
+ s/\n//
+}
+' >>$CONFIG_STATUS || ac_write_fail=1
+rm -f conf$$subs.awk
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+_ACAWK
+cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
+ for (key in S) S_is_set[key] = 1
+ FS = ""
+
+}
+{
+ line = $ 0
+ nfields = split(line, field, "@")
+ substed = 0
+ len = length(field[1])
+ for (i = 2; i < nfields; i++) {
+ key = field[i]
+ keylen = length(key)
+ if (S_is_set[key]) {
+ value = S[key]
+ line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
+ len += length(value) + length(field[++i])
+ substed = 1
+ } else
+ len += 1 + keylen
+ }
+
+ print line
+}
+
+_ACAWK
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
+ sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
+else
+ cat
+fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
+ || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
+_ACEOF
+
+# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
+# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
+# trailing colons and then remove the whole line if VPATH becomes empty
+# (actually we leave an empty line to preserve line numbers).
+if test "x$srcdir" = x.; then
+ ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
+h
+s///
+s/^/:/
+s/[ ]*$/:/
+s/:\$(srcdir):/:/g
+s/:\${srcdir}:/:/g
+s/:@srcdir@:/:/g
+s/^:*//
+s/:*$//
+x
+s/\(=[ ]*\).*/\1/
+G
+s/\n//
+s/^[^=]*=[ ]*$//
+}'
+fi
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+fi # test -n "$CONFIG_FILES"
+
+
+eval set X " :F $CONFIG_FILES :C $CONFIG_COMMANDS"
+shift
+for ac_tag
+do
+ case $ac_tag in
+ :[FHLC]) ac_mode=$ac_tag; continue;;
+ esac
+ case $ac_mode$ac_tag in
+ :[FHL]*:*);;
+ :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
+ :[FH]-) ac_tag=-:-;;
+ :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
+ esac
+ ac_save_IFS=$IFS
+ IFS=:
+ set x $ac_tag
+ IFS=$ac_save_IFS
+ shift
+ ac_file=$1
+ shift
+
+ case $ac_mode in
+ :L) ac_source=$1;;
+ :[FH])
+ ac_file_inputs=
+ for ac_f
+ do
+ case $ac_f in
+ -) ac_f="$ac_tmp/stdin";;
+ *) # Look for the file first in the build tree, then in the source tree
+ # (if the path is not absolute). The absolute path cannot be DOS-style,
+ # because $ac_f cannot contain `:'.
+ test -f "$ac_f" ||
+ case $ac_f in
+ [\\/$]*) false;;
+ *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
+ esac ||
+ as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
+ esac
+ case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
+ as_fn_append ac_file_inputs " '$ac_f'"
+ done
+
+ # Let's still pretend it is `configure' which instantiates (i.e., don't
+ # use $as_me), people would be surprised to read:
+ # /* config.h. Generated by config.status. */
+ configure_input='Generated from '`
+ $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
+ `' by configure.'
+ if test x"$ac_file" != x-; then
+ configure_input="$ac_file. $configure_input"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
+$as_echo "$as_me: creating $ac_file" >&6;}
+ fi
+ # Neutralize special characters interpreted by sed in replacement strings.
+ case $configure_input in #(
+ *\&* | *\|* | *\\* )
+ ac_sed_conf_input=`$as_echo "$configure_input" |
+ sed 's/[\\\\&|]/\\\\&/g'`;; #(
+ *) ac_sed_conf_input=$configure_input;;
+ esac
+
+ case $ac_tag in
+ *:-:* | *:-) cat >"$ac_tmp/stdin" \
+ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
+ esac
+ ;;
+ esac
+
+ ac_dir=`$as_dirname -- "$ac_file" ||
+$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$ac_file" : 'X\(//\)[^/]' \| \
+ X"$ac_file" : 'X\(//\)$' \| \
+ X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$ac_file" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)[^/].*/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+ as_dir="$ac_dir"; as_fn_mkdir_p
+ ac_builddir=.
+
+case "$ac_dir" in
+.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
+*)
+ ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
+ # A ".." for each directory in $ac_dir_suffix.
+ ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
+ case $ac_top_builddir_sub in
+ "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
+ *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
+ esac ;;
+esac
+ac_abs_top_builddir=$ac_pwd
+ac_abs_builddir=$ac_pwd$ac_dir_suffix
+# for backward compatibility:
+ac_top_builddir=$ac_top_build_prefix
+
+case $srcdir in
+ .) # We are building in place.
+ ac_srcdir=.
+ ac_top_srcdir=$ac_top_builddir_sub
+ ac_abs_top_srcdir=$ac_pwd ;;
+ [\\/]* | ?:[\\/]* ) # Absolute name.
+ ac_srcdir=$srcdir$ac_dir_suffix;
+ ac_top_srcdir=$srcdir
+ ac_abs_top_srcdir=$srcdir ;;
+ *) # Relative name.
+ ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
+ ac_top_srcdir=$ac_top_build_prefix$srcdir
+ ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
+esac
+ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
+
+
+ case $ac_mode in
+ :F)
+ #
+ # CONFIG_FILE
+ #
+
+ case $INSTALL in
+ [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
+ *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
+ esac
+ ac_MKDIR_P=$MKDIR_P
+ case $MKDIR_P in
+ [\\/$]* | ?:[\\/]* ) ;;
+ */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
+ esac
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+# If the template does not know about datarootdir, expand it.
+# FIXME: This hack should be removed a few years after 2.60.
+ac_datarootdir_hack=; ac_datarootdir_seen=
+ac_sed_dataroot='
+/datarootdir/ {
+ p
+ q
+}
+/@datadir@/p
+/@docdir@/p
+/@infodir@/p
+/@localedir@/p
+/@mandir@/p'
+case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
+*datarootdir*) ac_datarootdir_seen=yes;;
+*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
+$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+ ac_datarootdir_hack='
+ s&@datadir@&$datadir&g
+ s&@docdir@&$docdir&g
+ s&@infodir@&$infodir&g
+ s&@localedir@&$localedir&g
+ s&@mandir@&$mandir&g
+ s&\\\${datarootdir}&$datarootdir&g' ;;
+esac
+_ACEOF
+
+# Neutralize VPATH when `$srcdir' = `.'.
+# Shell code in configure.ac might set extrasub.
+# FIXME: do we really want to maintain this feature?
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+ac_sed_extra="$ac_vpsub
+$extrasub
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+:t
+/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
+s|@configure_input@|$ac_sed_conf_input|;t t
+s&@top_builddir@&$ac_top_builddir_sub&;t t
+s&@top_build_prefix@&$ac_top_build_prefix&;t t
+s&@srcdir@&$ac_srcdir&;t t
+s&@abs_srcdir@&$ac_abs_srcdir&;t t
+s&@top_srcdir@&$ac_top_srcdir&;t t
+s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
+s&@builddir@&$ac_builddir&;t t
+s&@abs_builddir@&$ac_abs_builddir&;t t
+s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
+s&@INSTALL@&$ac_INSTALL&;t t
+s&@MKDIR_P@&$ac_MKDIR_P&;t t
+$ac_datarootdir_hack
+"
+eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
+ >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
+
+test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
+ { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
+ { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
+ "$ac_tmp/out"`; test -z "$ac_out"; } &&
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
+which seems to be undefined. Please make sure it is defined" >&5
+$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
+which seems to be undefined. Please make sure it is defined" >&2;}
+
+ rm -f "$ac_tmp/stdin"
+ case $ac_file in
+ -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
+ *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
+ esac \
+ || as_fn_error $? "could not create $ac_file" "$LINENO" 5
+ ;;
+
+
+ :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
+$as_echo "$as_me: executing $ac_file commands" >&6;}
+ ;;
+ esac
+
+
+ case $ac_file$ac_mode in
+ "depfiles":C) test x"$AMDEP_TRUE" != x"" || {
+ # Autoconf 2.62 quotes --file arguments for eval, but not when files
+ # are listed without --file. Let's play safe and only enable the eval
+ # if we detect the quoting.
+ case $CONFIG_FILES in
+ *\'*) eval set x "$CONFIG_FILES" ;;
+ *) set x $CONFIG_FILES ;;
+ esac
+ shift
+ for mf
+ do
+ # Strip MF so we end up with the name of the file.
+ mf=`echo "$mf" | sed -e 's/:.*$//'`
+ # Check whether this is an Automake generated Makefile or not.
+ # We used to match only the files named `Makefile.in', but
+ # some people rename them; so instead we look at the file content.
+ # Grep'ing the first line is not enough: some people post-process
+ # each Makefile.in and add a new line on top of each file to say so.
+ # Grep'ing the whole file is not good either: AIX grep has a line
+ # limit of 2048, but all sed's we know have understand at least 4000.
+ if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
+ dirpart=`$as_dirname -- "$mf" ||
+$as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$mf" : 'X\(//\)[^/]' \| \
+ X"$mf" : 'X\(//\)$' \| \
+ X"$mf" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$mf" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)[^/].*/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+ else
+ continue
+ fi
+ # Extract the definition of DEPDIR, am__include, and am__quote
+ # from the Makefile without running `make'.
+ DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
+ test -z "$DEPDIR" && continue
+ am__include=`sed -n 's/^am__include = //p' < "$mf"`
+ test -z "am__include" && continue
+ am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
+ # When using ansi2knr, U may be empty or an underscore; expand it
+ U=`sed -n 's/^U = //p' < "$mf"`
+ # Find all dependency output files, they are included files with
+ # $(DEPDIR) in their names. We invoke sed twice because it is the
+ # simplest approach to changing $(DEPDIR) to its actual value in the
+ # expansion.
+ for file in `sed -n "
+ s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
+ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
+ # Make sure the directory exists.
+ test -f "$dirpart/$file" && continue
+ fdir=`$as_dirname -- "$file" ||
+$as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$file" : 'X\(//\)[^/]' \| \
+ X"$file" : 'X\(//\)$' \| \
+ X"$file" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$file" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)[^/].*/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+ as_dir=$dirpart/$fdir; as_fn_mkdir_p
+ # echo "creating $dirpart/$file"
+ echo '# dummy' > "$dirpart/$file"
+ done
+ done
+}
+ ;;
+
+ esac
+done # for ac_tag
+
+
+as_fn_exit 0
+_ACEOF
+ac_clean_files=$ac_clean_files_save
+
+test $ac_write_fail = 0 ||
+ as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
+
+
+# configure is writing to config.log, and then calls config.status.
+# config.status does its own redirection, appending to config.log.
+# Unfortunately, on DOS this fails, as config.log is still kept open
+# by configure, so config.status won't be able to write to it; its
+# output is simply discarded. So we exec the FD to /dev/null,
+# effectively closing config.log, so it can be properly (re)opened and
+# appended to by config.status. When coming back to configure, we
+# need to make the FD available again.
+if test "$no_create" != yes; then
+ ac_cs_success=:
+ ac_config_status_args=
+ test "$silent" = yes &&
+ ac_config_status_args="$ac_config_status_args --quiet"
+ exec 5>/dev/null
+ $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
+ exec 5>>config.log
+ # Use ||, not &&, to avoid exiting from the if with $? = 1, which
+ # would make configure fail if this is the last instruction.
+ $ac_cs_success || as_fn_exit 1
+fi
+if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
+$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
+fi
+
diff --git a/newlib/libc/sys/or1k/configure.in b/newlib/libc/sys/or1k/configure.in
new file mode 100644
index 000000000..c855a8dde
--- /dev/null
+++ b/newlib/libc/sys/or1k/configure.in
@@ -0,0 +1,14 @@
+dnl This is the newlib/libc/sys/arm configure.in file.
+dnl Process this file with autoconf to produce a configure script.
+
+AC_PREREQ(2.59)
+AC_INIT([newlib],[NEWLIB_VERSION])
+AC_CONFIG_SRCDIR([getreent.S])
+
+dnl Can't be done in NEWLIB_CONFIGURE because that confuses automake.
+AC_CONFIG_AUX_DIR(../../../..)
+
+NEWLIB_CONFIGURE(../../..)
+
+AC_CONFIG_FILES([Makefile])
+AC_OUTPUT
diff --git a/newlib/libc/sys/or1k/getreent.S b/newlib/libc/sys/or1k/getreent.S
new file mode 100644
index 000000000..4bc50c8c8
--- /dev/null
+++ b/newlib/libc/sys/or1k/getreent.S
@@ -0,0 +1,26 @@
+/* getreent.S. Return reentrancy pointer.
+
+ Copyright (C) 2014, Authors
+
+ Contributor Stefan Wallentowitz <stefan.wallentowitz@tum.de>
+
+ * The authors hereby grant permission to use, copy, modify, distribute,
+ * and license this software and its documentation for any purpose, provided
+ * that existing copyright notices are retained in all copies and that this
+ * notice is included verbatim in any distributions. No written agreement,
+ * license, or royalty fee is required for any of the authorized uses.
+ * Modifications to this software may be copyrighted by their authors
+ * and need not follow the licensing terms described here, provided that
+ * the new terms are clearly indicated on the first page of each file where
+ * they apply.
+ */
+
+#include "or1k-asm.h"
+
+ .extern _or1k_libc_getreent
+
+ .global __getreent
+ .type __getreent,@function
+
+__getreent:
+ OR1K_DELAYED_NOP(OR1K_INST(l.j _or1k_libc_getreent))
diff --git a/newlib/libc/sys/or1k/mlock.c b/newlib/libc/sys/or1k/mlock.c
new file mode 100644
index 000000000..ccb840161
--- /dev/null
+++ b/newlib/libc/sys/or1k/mlock.c
@@ -0,0 +1,94 @@
+/* malloc-lock.c. Lock malloc.
+ *
+ * Copyright (C) 2014, Authors
+ *
+ * Contributor Stefan Wallentowitz <stefan.wallentowitz@tum.de>
+ *
+ * The authors hereby grant permission to use, copy, modify, distribute,
+ * and license this software and its documentation for any purpose, provided
+ * that existing copyright notices are retained in all copies and that this
+ * notice is included verbatim in any distributions. No written agreement,
+ * license, or royalty fee is required for any of the authorized uses.
+ * Modifications to this software may be copyrighted by their authors
+ * and need not follow the licensing terms described here, provided that
+ * the new terms are clearly indicated on the first page of each file where
+ * they apply.
+ */
+
+#include <reent.h>
+#include <stdint.h>
+
+/* Lock calls from different cores, but allows recursive calls from the same
+ * core. The lock is not only atomic to other cores calling malloc, but also
+ * disables all external interrupts. This is necessary as it could otherwise
+ * lead to a deadlock to interrupt while in malloc and then call it from an
+ * exception. But as we want the exceptions to be flexible to use all library
+ * calls and especially memory management this is necessary.
+ */
+
+// The lock. It is zero when unlocked and contains a unique value for each core.
+// This value is not the core id (to avoid id zero), but the pointer value of
+// the core specific struct _reent.
+volatile uint32_t _or1k_malloc_lock;
+
+// Count how often the current holder has entered the lock
+volatile uint32_t _or1k_malloc_lock_cnt;
+// The exception enable restore of the current mutex holder
+volatile uint32_t _or1k_malloc_lock_restore;
+
+extern uint32_t or1k_sync_cas(void *address, uint32_t compare, uint32_t swap);
+
+/**
+ * Recursive lock of the malloc
+ */
+void __malloc_lock(struct _reent *ptr) {
+ uint32_t restore;
+ uint32_t id;
+
+ // Each core is identified by its struct _reent pointer
+ id = (uint32_t) ptr;
+
+ // Disable timer and interrupt exception, save TEE and IEE flag
+ // temporarily to restore them later on unlock
+ restore = or1k_critical_begin();
+
+ // We cannot be disturbed by an interrupt or timer exception from here
+
+ // Check if we currently don't hold the lock
+ if (_or1k_malloc_lock != id) {
+ do {
+ // Repeatedly check the lock until it is set to zero
+ while (_or1k_malloc_lock != 0) {}
+ // .. and then try to set it atomically. As this may
+ // fail, we need to repeat this
+ } while (or1k_sync_cas((void*) &_or1k_malloc_lock, 0, id) != 0);
+ }
+
+ // Store the TEE and IEE flags for later restore
+ if (_or1k_malloc_lock_cnt == 0) {
+ _or1k_malloc_lock_restore = restore;
+ }
+
+ // Increment counter. The lock may be accessed recursively
+ _or1k_malloc_lock_cnt++;
+
+ return;
+}
+
+void __malloc_unlock(struct _reent *ptr) {
+ // Decrement counter. The lock may be unlocked recursively
+ _or1k_malloc_lock_cnt--;
+
+ // If this was the last recursive unlock call
+ if(_or1k_malloc_lock_cnt == 0){
+ // We need to temporarily store the value to avoid a race
+ // condition between unlocking and reading restore
+ uint32_t restore = _or1k_malloc_lock_restore;
+ // unset lock
+ _or1k_malloc_lock = 0;
+ // Restore flags
+ or1k_critical_end(restore);
+ }
+
+ return;
+}
diff --git a/newlib/libc/sys/or1k/or1k-asm.h b/newlib/libc/sys/or1k/or1k-asm.h
new file mode 100644
index 000000000..c218c64fe
--- /dev/null
+++ b/newlib/libc/sys/or1k/or1k-asm.h
@@ -0,0 +1,83 @@
+/* or1k-asm.h -- OR1K assembly helper macros
+
+ Copyright (c) 2014 OpenRISC Project Maintainers
+ Copyright (C) 2012-2014 Peter Gavin <pgavin@gmail.com>
+ All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following condition
+ is met:
+
+ 1. Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+
+ 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 HOLDER 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.
+
+ */
+
+#ifndef OR1K_ASM_H
+#define OR1K_ASM_H
+
+/* The purpose of the OR1K_INST macro is simply to protect the commas
+ embedded within an instruction from the C preprocessor. An entire
+ instruction can be safely embedded within its arguments, including
+ an arbitrary number of commas, and it will be reproduced
+ exactly. */
+#define OR1K_INST(...) __VA_ARGS__
+
+/* OR1K_DELAYED takes two arguments which must be instructions. They
+ should be wrapped in OR1K_INST if the instructions require commas.
+ The second argument should be a jump or branch instruction. If we
+ are assembling the code in delay-slot mode (e.g., for the standard
+ OR1K) the first instruction will be emitted in the delay slot of
+ the second instruction. In no-delay-slot mode they will be emitted
+ in order. If we are using compat-delay mode, they will be emitted
+ in order, but an l.nop instruction will be emitted immediately
+ after. */
+
+/* OR1K_DELAYED_NOP takes a single argument, which should be a
+ branch/jump instruction. In delay-slot or compat-delay modes, the
+ instruction will be emitted with an l.nop in its delay slot. In
+ no-delay mode, the instruction will be emitted by itself. */
+
+#if defined(__OR1K_NODELAY__)
+
+#define OR1K_DELAYED(a, b) a; b
+#define OR1K_DELAYED_NOP(a) a
+
+/* Go ahead and emit the .nodelay directive when in no-delay mode, so
+ that the flags are appropriately set in the binary. */
+.nodelay
+
+#elif defined(__OR1K_DELAY__)
+
+#define OR1K_DELAYED(a, b) b; a
+#define OR1K_DELAYED_NOP(a) a; l.nop
+
+#elif defined(__OR1K_DELAY_COMPAT__)
+
+#define OR1K_DELAYED(a, b) a; b; l.nop
+#define OR1K_DELAYED_NOP(a) a; l.nop
+
+#else
+
+#error One of __OR1K_NODELAY__, __OR1K_DELAY__, or __OR1K_DELAY_COMPAT__ must be defined
+
+#endif
+
+#define LOAD_SYMBOL_2_GPR(gpr,symbol) \
+ .global symbol ; \
+ l.movhi gpr, hi(symbol) ; \
+ l.ori gpr, gpr, lo(symbol)
+#endif
diff --git a/newlib/libc/sys/phoenix/Makefile.am b/newlib/libc/sys/phoenix/Makefile.am
new file mode 100644
index 000000000..e57a3343c
--- /dev/null
+++ b/newlib/libc/sys/phoenix/Makefile.am
@@ -0,0 +1,133 @@
+## Process this file with automake to generate Makefile.in
+
+AUTOMAKE_OPTIONS = cygnus
+
+INCLUDES = -I$(srcdir)/include $(NEWLIB_CFLAGS) $(CROSS_CFLAGS) $(TARGET_CFLAGS) $(INCLTDL)
+
+SUBDIRS = machine
+
+SUBLIBS = \
+ $(PHOENIX_MACH_LIB)
+
+SOURCES = \
+ net/domainname.c \
+ net/freeaddrinfo.c \
+ net/getaddrinfo.c \
+ net/gethostbyaddr.c \
+ net/gethostbyname.c \
+ net/getnameinfo.c \
+ net/getservbyname.c \
+ net/getservbyport.c \
+ net/herror.c \
+ net/hostname.c \
+ net/inet_addr.c \
+ net/inet_aton.c \
+ net/inet_lnaof.c \
+ net/inet_makeaddr.c \
+ net/inet_net_ntop.c \
+ net/inet_net_pton.c \
+ net/inet_netof.c \
+ net/inet_network.c \
+ net/inet_ntoa.c \
+ net/inet_ntop.c \
+ net/inet_pton.c \
+ net/network.c \
+ alarm.c \
+ chmod.c \
+ chown.c \
+ clocks.c \
+ dup.c \
+ endmntent.c \
+ exec.c \
+ fcntl.c \
+ fork.c \
+ fs.c \
+ getmntent.c \
+ getpagesize.c \
+ groups.c \
+ ids.c \
+ io.c \
+ ioctl.c \
+ mmap.c \
+ mount.c \
+ nanosleep.c \
+ phoenix.c \
+ pid.c \
+ pipe.c \
+ poll.c \
+ realpath.c \
+ reboot.c \
+ resource.c \
+ sbrk.c \
+ sched.c \
+ select.c \
+ semaphore.c \
+ setmntent.c \
+ shm.c \
+ signal.c \
+ socket.c \
+ sockopt.c \
+ stat.c \
+ statfs.c \
+ symlink.c \
+ sync.c \
+ sysconf.c \
+ syslog.c \
+ time.c \
+ truncate.c \
+ tty.c \
+ uname.c \
+ utime.c \
+ wait.c
+
+ADD_OBJS =
+
+noinst_LIBRARIES = lib.a
+lib_a_SOURCES = $(SOURCES)
+lib_a_LIBADD = $(ADD_OBJS)
+lib_a_DEPENDENCIES = $(ADD_OBJS)
+lib_a_CFLAGS = $(AM_CFLAGS)
+LIBC_COMPILE = $(COMPILE)
+noinst_DATA =
+
+lib.a: $(lib_a_OBJECTS)
+ rm -f $@
+ rm -rf tmp
+ mkdir tmp
+ cd tmp; \
+ for i in $(SUBLIBS); do \
+ $(AR) x ../$$i; \
+ done;
+ $(AR) $(AR_FLAGS) $@ tmp/*.o $^
+ $(RANLIB) $@
+ rm -rf tmp
+
+all-local: crt0.o
+
+crt0.o: machine/crt0.o
+ rm -f $@
+ ln machine/crt0.o $@ >/dev/null 2>/dev/null || cp machine/crt0.o $@
+
+machine/crt0.o: ; @true
+
+AM_CFLAGS = -I $(srcdir)/../../stdio
+ACLOCAL_AMFLAGS = -I ../../.. -I ../../../..
+CONFIG_STATUS_DEPENDENCIES = $(newlib_basedir)/configure.host
+
+install-data-local:
+ $(mkinstalldirs) $(DESTDIR)$(tooldir)/include/arpa; \
+ for i in $(srcdir)/include/arpa/*.h; do \
+ $(INSTALL_DATA) $$i $(DESTDIR)$(tooldir)/include/arpa/`basename $$i`; \
+ done; \
+ $(mkinstalldirs) $(DESTDIR)$(tooldir)/include/net; \
+ for i in $(srcdir)/include/net/*.h; do \
+ $(INSTALL_DATA) $$i $(DESTDIR)$(tooldir)/include/net/`basename $$i`; \
+ done; \
+ $(mkinstalldirs) $(DESTDIR)$(tooldir)/include/netinet; \
+ for i in $(srcdir)/include/netinet/*.h; do \
+ $(INSTALL_DATA) $$i $(DESTDIR)$(tooldir)/include/netinet/`basename $$i`; \
+ done; \
+ $(mkinstalldirs) $(DESTDIR)$(tooldir)/include/netinet6; \
+ for i in $(srcdir)/include/netinet6/*.h; do \
+ $(INSTALL_DATA) $$i $(DESTDIR)$(tooldir)/include/netinet6/`basename $$i`; \
+ done;
diff --git a/newlib/libc/sys/phoenix/Makefile.in b/newlib/libc/sys/phoenix/Makefile.in
new file mode 100644
index 000000000..bcd63885b
--- /dev/null
+++ b/newlib/libc/sys/phoenix/Makefile.in
@@ -0,0 +1,1094 @@
+# Makefile.in generated by automake 1.11.6 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 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@
+
+
+VPATH = @srcdir@
+am__make_dryrun = \
+ { \
+ am__dry=no; \
+ case $$MAKEFLAGS in \
+ *\\[\ \ ]*) \
+ echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \
+ | grep '^AM OK$$' >/dev/null || am__dry=yes;; \
+ *) \
+ for am__flg in $$MAKEFLAGS; do \
+ case $$am__flg in \
+ *=*|--*) ;; \
+ *n*) am__dry=yes; break;; \
+ esac; \
+ done;; \
+ esac; \
+ test $$am__dry = yes; \
+ }
+pkgdatadir = $(datadir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+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@
+subdir = .
+DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
+ $(top_srcdir)/configure $(am__configure_deps) \
+ $(srcdir)/../../../../mkinstalldirs
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/../../../acinclude.m4 \
+ $(top_srcdir)/configure.in
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+ $(ACLOCAL_M4)
+am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
+ configure.lineno config.status.lineno
+mkinstalldirs = $(SHELL) $(top_srcdir)/../../../../mkinstalldirs
+CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+LIBRARIES = $(noinst_LIBRARIES)
+ARFLAGS = cru
+lib_a_AR = $(AR) $(ARFLAGS)
+am__DEPENDENCIES_1 =
+am__objects_1 = lib_a-domainname.$(OBJEXT) \
+ lib_a-freeaddrinfo.$(OBJEXT) lib_a-getaddrinfo.$(OBJEXT) \
+ lib_a-gethostbyaddr.$(OBJEXT) lib_a-gethostbyname.$(OBJEXT) \
+ lib_a-getnameinfo.$(OBJEXT) lib_a-getservbyname.$(OBJEXT) \
+ lib_a-getservbyport.$(OBJEXT) lib_a-herror.$(OBJEXT) \
+ lib_a-hostname.$(OBJEXT) lib_a-inet_addr.$(OBJEXT) \
+ lib_a-inet_aton.$(OBJEXT) lib_a-inet_lnaof.$(OBJEXT) \
+ lib_a-inet_makeaddr.$(OBJEXT) lib_a-inet_net_ntop.$(OBJEXT) \
+ lib_a-inet_net_pton.$(OBJEXT) lib_a-inet_netof.$(OBJEXT) \
+ lib_a-inet_network.$(OBJEXT) lib_a-inet_ntoa.$(OBJEXT) \
+ lib_a-inet_ntop.$(OBJEXT) lib_a-inet_pton.$(OBJEXT) \
+ lib_a-network.$(OBJEXT) lib_a-alarm.$(OBJEXT) \
+ lib_a-chmod.$(OBJEXT) lib_a-chown.$(OBJEXT) \
+ lib_a-clocks.$(OBJEXT) lib_a-dup.$(OBJEXT) \
+ lib_a-endmntent.$(OBJEXT) lib_a-exec.$(OBJEXT) \
+ lib_a-fcntl.$(OBJEXT) lib_a-fork.$(OBJEXT) lib_a-fs.$(OBJEXT) \
+ lib_a-getmntent.$(OBJEXT) lib_a-getpagesize.$(OBJEXT) \
+ lib_a-groups.$(OBJEXT) lib_a-ids.$(OBJEXT) lib_a-io.$(OBJEXT) \
+ lib_a-ioctl.$(OBJEXT) lib_a-mmap.$(OBJEXT) \
+ lib_a-mount.$(OBJEXT) lib_a-nanosleep.$(OBJEXT) \
+ lib_a-phoenix.$(OBJEXT) lib_a-pid.$(OBJEXT) \
+ lib_a-pipe.$(OBJEXT) lib_a-poll.$(OBJEXT) \
+ lib_a-realpath.$(OBJEXT) lib_a-reboot.$(OBJEXT) \
+ lib_a-resource.$(OBJEXT) lib_a-sbrk.$(OBJEXT) \
+ lib_a-sched.$(OBJEXT) lib_a-select.$(OBJEXT) \
+ lib_a-semaphore.$(OBJEXT) lib_a-setmntent.$(OBJEXT) \
+ lib_a-shm.$(OBJEXT) lib_a-signal.$(OBJEXT) \
+ lib_a-socket.$(OBJEXT) lib_a-sockopt.$(OBJEXT) \
+ lib_a-stat.$(OBJEXT) lib_a-statfs.$(OBJEXT) \
+ lib_a-symlink.$(OBJEXT) lib_a-sync.$(OBJEXT) \
+ lib_a-sysconf.$(OBJEXT) lib_a-syslog.$(OBJEXT) \
+ lib_a-time.$(OBJEXT) lib_a-truncate.$(OBJEXT) \
+ lib_a-tty.$(OBJEXT) lib_a-uname.$(OBJEXT) \
+ lib_a-utime.$(OBJEXT) lib_a-wait.$(OBJEXT)
+am_lib_a_OBJECTS = $(am__objects_1)
+lib_a_OBJECTS = $(am_lib_a_OBJECTS)
+DEFAULT_INCLUDES = -I.@am__isrc@
+depcomp =
+am__depfiles_maybe =
+COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+CCLD = $(CC)
+LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
+RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
+ html-recursive info-recursive install-data-recursive \
+ install-dvi-recursive install-exec-recursive \
+ install-html-recursive install-info-recursive \
+ install-pdf-recursive install-ps-recursive install-recursive \
+ installcheck-recursive installdirs-recursive pdf-recursive \
+ ps-recursive uninstall-recursive
+am__can_run_installinfo = \
+ case $$AM_UPDATE_INFO_DIR in \
+ n|no|NO) false;; \
+ *) (install-info --version) >/dev/null 2>&1;; \
+ esac
+DATA = $(noinst_DATA)
+RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \
+ distclean-recursive maintainer-clean-recursive
+AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \
+ $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS
+ETAGS = etags
+CTAGS = ctags
+DIST_SUBDIRS = $(SUBDIRS)
+ACLOCAL = @ACLOCAL@
+AMTAR = @AMTAR@
+AR = @AR@
+AS = @AS@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CC = @CC@
+CCAS = @CCAS@
+CCASFLAGS = @CCASFLAGS@
+CCDEPMODE = @CCDEPMODE@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LDFLAGS = @LDFLAGS@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LTLIBOBJS = @LTLIBOBJS@
+MAINT = @MAINT@
+MAKEINFO = @MAKEINFO@
+MKDIR_P = @MKDIR_P@
+NEWLIB_CFLAGS = @NEWLIB_CFLAGS@
+NO_INCLUDE_LIST = @NO_INCLUDE_LIST@
+OBJEXT = @OBJEXT@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PHOENIX_MACH_LIB = @PHOENIX_MACH_LIB@
+RANLIB = @RANLIB@
+READELF = @READELF@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+VERSION = @VERSION@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+aext = @aext@
+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@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+libm_machine_dir = @libm_machine_dir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+lpfx = @lpfx@
+machine_dir = @machine_dir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+newlib_basedir = @newlib_basedir@
+oext = @oext@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+subdirs = @subdirs@
+sys_dir = @sys_dir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+AUTOMAKE_OPTIONS = cygnus
+INCLUDES = -I$(srcdir)/include $(NEWLIB_CFLAGS) $(CROSS_CFLAGS) $(TARGET_CFLAGS) $(INCLTDL)
+SUBDIRS = machine
+SUBLIBS = \
+ $(PHOENIX_MACH_LIB)
+
+SOURCES = \
+ net/domainname.c \
+ net/freeaddrinfo.c \
+ net/getaddrinfo.c \
+ net/gethostbyaddr.c \
+ net/gethostbyname.c \
+ net/getnameinfo.c \
+ net/getservbyname.c \
+ net/getservbyport.c \
+ net/herror.c \
+ net/hostname.c \
+ net/inet_addr.c \
+ net/inet_aton.c \
+ net/inet_lnaof.c \
+ net/inet_makeaddr.c \
+ net/inet_net_ntop.c \
+ net/inet_net_pton.c \
+ net/inet_netof.c \
+ net/inet_network.c \
+ net/inet_ntoa.c \
+ net/inet_ntop.c \
+ net/inet_pton.c \
+ net/network.c \
+ alarm.c \
+ chmod.c \
+ chown.c \
+ clocks.c \
+ dup.c \
+ endmntent.c \
+ exec.c \
+ fcntl.c \
+ fork.c \
+ fs.c \
+ getmntent.c \
+ getpagesize.c \
+ groups.c \
+ ids.c \
+ io.c \
+ ioctl.c \
+ mmap.c \
+ mount.c \
+ nanosleep.c \
+ phoenix.c \
+ pid.c \
+ pipe.c \
+ poll.c \
+ realpath.c \
+ reboot.c \
+ resource.c \
+ sbrk.c \
+ sched.c \
+ select.c \
+ semaphore.c \
+ setmntent.c \
+ shm.c \
+ signal.c \
+ socket.c \
+ sockopt.c \
+ stat.c \
+ statfs.c \
+ symlink.c \
+ sync.c \
+ sysconf.c \
+ syslog.c \
+ time.c \
+ truncate.c \
+ tty.c \
+ uname.c \
+ utime.c \
+ wait.c
+
+ADD_OBJS =
+noinst_LIBRARIES = lib.a
+lib_a_SOURCES = $(SOURCES)
+lib_a_LIBADD = $(ADD_OBJS)
+lib_a_DEPENDENCIES = $(ADD_OBJS)
+lib_a_CFLAGS = $(AM_CFLAGS)
+LIBC_COMPILE = $(COMPILE)
+noinst_DATA =
+AM_CFLAGS = -I $(srcdir)/../../stdio
+ACLOCAL_AMFLAGS = -I ../../.. -I ../../../..
+CONFIG_STATUS_DEPENDENCIES = $(newlib_basedir)/configure.host
+all: all-recursive
+
+.SUFFIXES:
+.SUFFIXES: .c .o .obj
+am--refresh: Makefile
+ @:
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
+ @for dep in $?; do \
+ case '$(am__configure_deps)' in \
+ *$$dep*) \
+ echo ' cd $(srcdir) && $(AUTOMAKE) --cygnus'; \
+ $(am__cd) $(srcdir) && $(AUTOMAKE) --cygnus \
+ && exit 0; \
+ exit 1;; \
+ esac; \
+ done; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --cygnus Makefile'; \
+ $(am__cd) $(top_srcdir) && \
+ $(AUTOMAKE) --cygnus Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ @case '$?' in \
+ *config.status*) \
+ echo ' $(SHELL) ./config.status'; \
+ $(SHELL) ./config.status;; \
+ *) \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \
+ esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+ $(SHELL) ./config.status --recheck
+
+$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
+ $(am__cd) $(srcdir) && $(AUTOCONF)
+$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
+ $(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
+$(am__aclocal_m4_deps):
+
+clean-noinstLIBRARIES:
+ -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES)
+
+mostlyclean-compile:
+ -rm -f *.$(OBJEXT)
+
+distclean-compile:
+ -rm -f *.tab.c
+
+.c.o:
+ $(COMPILE) -c $<
+
+.c.obj:
+ $(COMPILE) -c `$(CYGPATH_W) '$<'`
+
+lib_a-domainname.o: net/domainname.c
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-domainname.o `test -f 'net/domainname.c' || echo '$(srcdir)/'`net/domainname.c
+
+lib_a-domainname.obj: net/domainname.c
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-domainname.obj `if test -f 'net/domainname.c'; then $(CYGPATH_W) 'net/domainname.c'; else $(CYGPATH_W) '$(srcdir)/net/domainname.c'; fi`
+
+lib_a-freeaddrinfo.o: net/freeaddrinfo.c
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-freeaddrinfo.o `test -f 'net/freeaddrinfo.c' || echo '$(srcdir)/'`net/freeaddrinfo.c
+
+lib_a-freeaddrinfo.obj: net/freeaddrinfo.c
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-freeaddrinfo.obj `if test -f 'net/freeaddrinfo.c'; then $(CYGPATH_W) 'net/freeaddrinfo.c'; else $(CYGPATH_W) '$(srcdir)/net/freeaddrinfo.c'; fi`
+
+lib_a-getaddrinfo.o: net/getaddrinfo.c
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-getaddrinfo.o `test -f 'net/getaddrinfo.c' || echo '$(srcdir)/'`net/getaddrinfo.c
+
+lib_a-getaddrinfo.obj: net/getaddrinfo.c
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-getaddrinfo.obj `if test -f 'net/getaddrinfo.c'; then $(CYGPATH_W) 'net/getaddrinfo.c'; else $(CYGPATH_W) '$(srcdir)/net/getaddrinfo.c'; fi`
+
+lib_a-gethostbyaddr.o: net/gethostbyaddr.c
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-gethostbyaddr.o `test -f 'net/gethostbyaddr.c' || echo '$(srcdir)/'`net/gethostbyaddr.c
+
+lib_a-gethostbyaddr.obj: net/gethostbyaddr.c
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-gethostbyaddr.obj `if test -f 'net/gethostbyaddr.c'; then $(CYGPATH_W) 'net/gethostbyaddr.c'; else $(CYGPATH_W) '$(srcdir)/net/gethostbyaddr.c'; fi`
+
+lib_a-gethostbyname.o: net/gethostbyname.c
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-gethostbyname.o `test -f 'net/gethostbyname.c' || echo '$(srcdir)/'`net/gethostbyname.c
+
+lib_a-gethostbyname.obj: net/gethostbyname.c
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-gethostbyname.obj `if test -f 'net/gethostbyname.c'; then $(CYGPATH_W) 'net/gethostbyname.c'; else $(CYGPATH_W) '$(srcdir)/net/gethostbyname.c'; fi`
+
+lib_a-getnameinfo.o: net/getnameinfo.c
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-getnameinfo.o `test -f 'net/getnameinfo.c' || echo '$(srcdir)/'`net/getnameinfo.c
+
+lib_a-getnameinfo.obj: net/getnameinfo.c
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-getnameinfo.obj `if test -f 'net/getnameinfo.c'; then $(CYGPATH_W) 'net/getnameinfo.c'; else $(CYGPATH_W) '$(srcdir)/net/getnameinfo.c'; fi`
+
+lib_a-getservbyname.o: net/getservbyname.c
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-getservbyname.o `test -f 'net/getservbyname.c' || echo '$(srcdir)/'`net/getservbyname.c
+
+lib_a-getservbyname.obj: net/getservbyname.c
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-getservbyname.obj `if test -f 'net/getservbyname.c'; then $(CYGPATH_W) 'net/getservbyname.c'; else $(CYGPATH_W) '$(srcdir)/net/getservbyname.c'; fi`
+
+lib_a-getservbyport.o: net/getservbyport.c
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-getservbyport.o `test -f 'net/getservbyport.c' || echo '$(srcdir)/'`net/getservbyport.c
+
+lib_a-getservbyport.obj: net/getservbyport.c
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-getservbyport.obj `if test -f 'net/getservbyport.c'; then $(CYGPATH_W) 'net/getservbyport.c'; else $(CYGPATH_W) '$(srcdir)/net/getservbyport.c'; fi`
+
+lib_a-herror.o: net/herror.c
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-herror.o `test -f 'net/herror.c' || echo '$(srcdir)/'`net/herror.c
+
+lib_a-herror.obj: net/herror.c
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-herror.obj `if test -f 'net/herror.c'; then $(CYGPATH_W) 'net/herror.c'; else $(CYGPATH_W) '$(srcdir)/net/herror.c'; fi`
+
+lib_a-hostname.o: net/hostname.c
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-hostname.o `test -f 'net/hostname.c' || echo '$(srcdir)/'`net/hostname.c
+
+lib_a-hostname.obj: net/hostname.c
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-hostname.obj `if test -f 'net/hostname.c'; then $(CYGPATH_W) 'net/hostname.c'; else $(CYGPATH_W) '$(srcdir)/net/hostname.c'; fi`
+
+lib_a-inet_addr.o: net/inet_addr.c
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-inet_addr.o `test -f 'net/inet_addr.c' || echo '$(srcdir)/'`net/inet_addr.c
+
+lib_a-inet_addr.obj: net/inet_addr.c
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-inet_addr.obj `if test -f 'net/inet_addr.c'; then $(CYGPATH_W) 'net/inet_addr.c'; else $(CYGPATH_W) '$(srcdir)/net/inet_addr.c'; fi`
+
+lib_a-inet_aton.o: net/inet_aton.c
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-inet_aton.o `test -f 'net/inet_aton.c' || echo '$(srcdir)/'`net/inet_aton.c
+
+lib_a-inet_aton.obj: net/inet_aton.c
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-inet_aton.obj `if test -f 'net/inet_aton.c'; then $(CYGPATH_W) 'net/inet_aton.c'; else $(CYGPATH_W) '$(srcdir)/net/inet_aton.c'; fi`
+
+lib_a-inet_lnaof.o: net/inet_lnaof.c
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-inet_lnaof.o `test -f 'net/inet_lnaof.c' || echo '$(srcdir)/'`net/inet_lnaof.c
+
+lib_a-inet_lnaof.obj: net/inet_lnaof.c
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-inet_lnaof.obj `if test -f 'net/inet_lnaof.c'; then $(CYGPATH_W) 'net/inet_lnaof.c'; else $(CYGPATH_W) '$(srcdir)/net/inet_lnaof.c'; fi`
+
+lib_a-inet_makeaddr.o: net/inet_makeaddr.c
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-inet_makeaddr.o `test -f 'net/inet_makeaddr.c' || echo '$(srcdir)/'`net/inet_makeaddr.c
+
+lib_a-inet_makeaddr.obj: net/inet_makeaddr.c
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-inet_makeaddr.obj `if test -f 'net/inet_makeaddr.c'; then $(CYGPATH_W) 'net/inet_makeaddr.c'; else $(CYGPATH_W) '$(srcdir)/net/inet_makeaddr.c'; fi`
+
+lib_a-inet_net_ntop.o: net/inet_net_ntop.c
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-inet_net_ntop.o `test -f 'net/inet_net_ntop.c' || echo '$(srcdir)/'`net/inet_net_ntop.c
+
+lib_a-inet_net_ntop.obj: net/inet_net_ntop.c
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-inet_net_ntop.obj `if test -f 'net/inet_net_ntop.c'; then $(CYGPATH_W) 'net/inet_net_ntop.c'; else $(CYGPATH_W) '$(srcdir)/net/inet_net_ntop.c'; fi`
+
+lib_a-inet_net_pton.o: net/inet_net_pton.c
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-inet_net_pton.o `test -f 'net/inet_net_pton.c' || echo '$(srcdir)/'`net/inet_net_pton.c
+
+lib_a-inet_net_pton.obj: net/inet_net_pton.c
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-inet_net_pton.obj `if test -f 'net/inet_net_pton.c'; then $(CYGPATH_W) 'net/inet_net_pton.c'; else $(CYGPATH_W) '$(srcdir)/net/inet_net_pton.c'; fi`
+
+lib_a-inet_netof.o: net/inet_netof.c
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-inet_netof.o `test -f 'net/inet_netof.c' || echo '$(srcdir)/'`net/inet_netof.c
+
+lib_a-inet_netof.obj: net/inet_netof.c
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-inet_netof.obj `if test -f 'net/inet_netof.c'; then $(CYGPATH_W) 'net/inet_netof.c'; else $(CYGPATH_W) '$(srcdir)/net/inet_netof.c'; fi`
+
+lib_a-inet_network.o: net/inet_network.c
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-inet_network.o `test -f 'net/inet_network.c' || echo '$(srcdir)/'`net/inet_network.c
+
+lib_a-inet_network.obj: net/inet_network.c
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-inet_network.obj `if test -f 'net/inet_network.c'; then $(CYGPATH_W) 'net/inet_network.c'; else $(CYGPATH_W) '$(srcdir)/net/inet_network.c'; fi`
+
+lib_a-inet_ntoa.o: net/inet_ntoa.c
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-inet_ntoa.o `test -f 'net/inet_ntoa.c' || echo '$(srcdir)/'`net/inet_ntoa.c
+
+lib_a-inet_ntoa.obj: net/inet_ntoa.c
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-inet_ntoa.obj `if test -f 'net/inet_ntoa.c'; then $(CYGPATH_W) 'net/inet_ntoa.c'; else $(CYGPATH_W) '$(srcdir)/net/inet_ntoa.c'; fi`
+
+lib_a-inet_ntop.o: net/inet_ntop.c
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-inet_ntop.o `test -f 'net/inet_ntop.c' || echo '$(srcdir)/'`net/inet_ntop.c
+
+lib_a-inet_ntop.obj: net/inet_ntop.c
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-inet_ntop.obj `if test -f 'net/inet_ntop.c'; then $(CYGPATH_W) 'net/inet_ntop.c'; else $(CYGPATH_W) '$(srcdir)/net/inet_ntop.c'; fi`
+
+lib_a-inet_pton.o: net/inet_pton.c
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-inet_pton.o `test -f 'net/inet_pton.c' || echo '$(srcdir)/'`net/inet_pton.c
+
+lib_a-inet_pton.obj: net/inet_pton.c
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-inet_pton.obj `if test -f 'net/inet_pton.c'; then $(CYGPATH_W) 'net/inet_pton.c'; else $(CYGPATH_W) '$(srcdir)/net/inet_pton.c'; fi`
+
+lib_a-network.o: net/network.c
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-network.o `test -f 'net/network.c' || echo '$(srcdir)/'`net/network.c
+
+lib_a-network.obj: net/network.c
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-network.obj `if test -f 'net/network.c'; then $(CYGPATH_W) 'net/network.c'; else $(CYGPATH_W) '$(srcdir)/net/network.c'; fi`
+
+lib_a-alarm.o: alarm.c
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-alarm.o `test -f 'alarm.c' || echo '$(srcdir)/'`alarm.c
+
+lib_a-alarm.obj: alarm.c
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-alarm.obj `if test -f 'alarm.c'; then $(CYGPATH_W) 'alarm.c'; else $(CYGPATH_W) '$(srcdir)/alarm.c'; fi`
+
+lib_a-chmod.o: chmod.c
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-chmod.o `test -f 'chmod.c' || echo '$(srcdir)/'`chmod.c
+
+lib_a-chmod.obj: chmod.c
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-chmod.obj `if test -f 'chmod.c'; then $(CYGPATH_W) 'chmod.c'; else $(CYGPATH_W) '$(srcdir)/chmod.c'; fi`
+
+lib_a-chown.o: chown.c
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-chown.o `test -f 'chown.c' || echo '$(srcdir)/'`chown.c
+
+lib_a-chown.obj: chown.c
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-chown.obj `if test -f 'chown.c'; then $(CYGPATH_W) 'chown.c'; else $(CYGPATH_W) '$(srcdir)/chown.c'; fi`
+
+lib_a-clocks.o: clocks.c
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-clocks.o `test -f 'clocks.c' || echo '$(srcdir)/'`clocks.c
+
+lib_a-clocks.obj: clocks.c
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-clocks.obj `if test -f 'clocks.c'; then $(CYGPATH_W) 'clocks.c'; else $(CYGPATH_W) '$(srcdir)/clocks.c'; fi`
+
+lib_a-dup.o: dup.c
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-dup.o `test -f 'dup.c' || echo '$(srcdir)/'`dup.c
+
+lib_a-dup.obj: dup.c
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-dup.obj `if test -f 'dup.c'; then $(CYGPATH_W) 'dup.c'; else $(CYGPATH_W) '$(srcdir)/dup.c'; fi`
+
+lib_a-endmntent.o: endmntent.c
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-endmntent.o `test -f 'endmntent.c' || echo '$(srcdir)/'`endmntent.c
+
+lib_a-endmntent.obj: endmntent.c
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-endmntent.obj `if test -f 'endmntent.c'; then $(CYGPATH_W) 'endmntent.c'; else $(CYGPATH_W) '$(srcdir)/endmntent.c'; fi`
+
+lib_a-exec.o: exec.c
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-exec.o `test -f 'exec.c' || echo '$(srcdir)/'`exec.c
+
+lib_a-exec.obj: exec.c
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-exec.obj `if test -f 'exec.c'; then $(CYGPATH_W) 'exec.c'; else $(CYGPATH_W) '$(srcdir)/exec.c'; fi`
+
+lib_a-fcntl.o: fcntl.c
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-fcntl.o `test -f 'fcntl.c' || echo '$(srcdir)/'`fcntl.c
+
+lib_a-fcntl.obj: fcntl.c
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-fcntl.obj `if test -f 'fcntl.c'; then $(CYGPATH_W) 'fcntl.c'; else $(CYGPATH_W) '$(srcdir)/fcntl.c'; fi`
+
+lib_a-fork.o: fork.c
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-fork.o `test -f 'fork.c' || echo '$(srcdir)/'`fork.c
+
+lib_a-fork.obj: fork.c
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-fork.obj `if test -f 'fork.c'; then $(CYGPATH_W) 'fork.c'; else $(CYGPATH_W) '$(srcdir)/fork.c'; fi`
+
+lib_a-fs.o: fs.c
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-fs.o `test -f 'fs.c' || echo '$(srcdir)/'`fs.c
+
+lib_a-fs.obj: fs.c
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-fs.obj `if test -f 'fs.c'; then $(CYGPATH_W) 'fs.c'; else $(CYGPATH_W) '$(srcdir)/fs.c'; fi`
+
+lib_a-getmntent.o: getmntent.c
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-getmntent.o `test -f 'getmntent.c' || echo '$(srcdir)/'`getmntent.c
+
+lib_a-getmntent.obj: getmntent.c
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-getmntent.obj `if test -f 'getmntent.c'; then $(CYGPATH_W) 'getmntent.c'; else $(CYGPATH_W) '$(srcdir)/getmntent.c'; fi`
+
+lib_a-getpagesize.o: getpagesize.c
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-getpagesize.o `test -f 'getpagesize.c' || echo '$(srcdir)/'`getpagesize.c
+
+lib_a-getpagesize.obj: getpagesize.c
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-getpagesize.obj `if test -f 'getpagesize.c'; then $(CYGPATH_W) 'getpagesize.c'; else $(CYGPATH_W) '$(srcdir)/getpagesize.c'; fi`
+
+lib_a-groups.o: groups.c
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-groups.o `test -f 'groups.c' || echo '$(srcdir)/'`groups.c
+
+lib_a-groups.obj: groups.c
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-groups.obj `if test -f 'groups.c'; then $(CYGPATH_W) 'groups.c'; else $(CYGPATH_W) '$(srcdir)/groups.c'; fi`
+
+lib_a-ids.o: ids.c
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-ids.o `test -f 'ids.c' || echo '$(srcdir)/'`ids.c
+
+lib_a-ids.obj: ids.c
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-ids.obj `if test -f 'ids.c'; then $(CYGPATH_W) 'ids.c'; else $(CYGPATH_W) '$(srcdir)/ids.c'; fi`
+
+lib_a-io.o: io.c
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-io.o `test -f 'io.c' || echo '$(srcdir)/'`io.c
+
+lib_a-io.obj: io.c
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-io.obj `if test -f 'io.c'; then $(CYGPATH_W) 'io.c'; else $(CYGPATH_W) '$(srcdir)/io.c'; fi`
+
+lib_a-ioctl.o: ioctl.c
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-ioctl.o `test -f 'ioctl.c' || echo '$(srcdir)/'`ioctl.c
+
+lib_a-ioctl.obj: ioctl.c
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-ioctl.obj `if test -f 'ioctl.c'; then $(CYGPATH_W) 'ioctl.c'; else $(CYGPATH_W) '$(srcdir)/ioctl.c'; fi`
+
+lib_a-mmap.o: mmap.c
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-mmap.o `test -f 'mmap.c' || echo '$(srcdir)/'`mmap.c
+
+lib_a-mmap.obj: mmap.c
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-mmap.obj `if test -f 'mmap.c'; then $(CYGPATH_W) 'mmap.c'; else $(CYGPATH_W) '$(srcdir)/mmap.c'; fi`
+
+lib_a-mount.o: mount.c
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-mount.o `test -f 'mount.c' || echo '$(srcdir)/'`mount.c
+
+lib_a-mount.obj: mount.c
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-mount.obj `if test -f 'mount.c'; then $(CYGPATH_W) 'mount.c'; else $(CYGPATH_W) '$(srcdir)/mount.c'; fi`
+
+lib_a-nanosleep.o: nanosleep.c
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-nanosleep.o `test -f 'nanosleep.c' || echo '$(srcdir)/'`nanosleep.c
+
+lib_a-nanosleep.obj: nanosleep.c
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-nanosleep.obj `if test -f 'nanosleep.c'; then $(CYGPATH_W) 'nanosleep.c'; else $(CYGPATH_W) '$(srcdir)/nanosleep.c'; fi`
+
+lib_a-phoenix.o: phoenix.c
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-phoenix.o `test -f 'phoenix.c' || echo '$(srcdir)/'`phoenix.c
+
+lib_a-phoenix.obj: phoenix.c
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-phoenix.obj `if test -f 'phoenix.c'; then $(CYGPATH_W) 'phoenix.c'; else $(CYGPATH_W) '$(srcdir)/phoenix.c'; fi`
+
+lib_a-pid.o: pid.c
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-pid.o `test -f 'pid.c' || echo '$(srcdir)/'`pid.c
+
+lib_a-pid.obj: pid.c
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-pid.obj `if test -f 'pid.c'; then $(CYGPATH_W) 'pid.c'; else $(CYGPATH_W) '$(srcdir)/pid.c'; fi`
+
+lib_a-pipe.o: pipe.c
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-pipe.o `test -f 'pipe.c' || echo '$(srcdir)/'`pipe.c
+
+lib_a-pipe.obj: pipe.c
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-pipe.obj `if test -f 'pipe.c'; then $(CYGPATH_W) 'pipe.c'; else $(CYGPATH_W) '$(srcdir)/pipe.c'; fi`
+
+lib_a-poll.o: poll.c
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-poll.o `test -f 'poll.c' || echo '$(srcdir)/'`poll.c
+
+lib_a-poll.obj: poll.c
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-poll.obj `if test -f 'poll.c'; then $(CYGPATH_W) 'poll.c'; else $(CYGPATH_W) '$(srcdir)/poll.c'; fi`
+
+lib_a-realpath.o: realpath.c
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-realpath.o `test -f 'realpath.c' || echo '$(srcdir)/'`realpath.c
+
+lib_a-realpath.obj: realpath.c
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-realpath.obj `if test -f 'realpath.c'; then $(CYGPATH_W) 'realpath.c'; else $(CYGPATH_W) '$(srcdir)/realpath.c'; fi`
+
+lib_a-reboot.o: reboot.c
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-reboot.o `test -f 'reboot.c' || echo '$(srcdir)/'`reboot.c
+
+lib_a-reboot.obj: reboot.c
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-reboot.obj `if test -f 'reboot.c'; then $(CYGPATH_W) 'reboot.c'; else $(CYGPATH_W) '$(srcdir)/reboot.c'; fi`
+
+lib_a-resource.o: resource.c
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-resource.o `test -f 'resource.c' || echo '$(srcdir)/'`resource.c
+
+lib_a-resource.obj: resource.c
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-resource.obj `if test -f 'resource.c'; then $(CYGPATH_W) 'resource.c'; else $(CYGPATH_W) '$(srcdir)/resource.c'; fi`
+
+lib_a-sbrk.o: sbrk.c
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-sbrk.o `test -f 'sbrk.c' || echo '$(srcdir)/'`sbrk.c
+
+lib_a-sbrk.obj: sbrk.c
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-sbrk.obj `if test -f 'sbrk.c'; then $(CYGPATH_W) 'sbrk.c'; else $(CYGPATH_W) '$(srcdir)/sbrk.c'; fi`
+
+lib_a-sched.o: sched.c
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-sched.o `test -f 'sched.c' || echo '$(srcdir)/'`sched.c
+
+lib_a-sched.obj: sched.c
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-sched.obj `if test -f 'sched.c'; then $(CYGPATH_W) 'sched.c'; else $(CYGPATH_W) '$(srcdir)/sched.c'; fi`
+
+lib_a-select.o: select.c
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-select.o `test -f 'select.c' || echo '$(srcdir)/'`select.c
+
+lib_a-select.obj: select.c
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-select.obj `if test -f 'select.c'; then $(CYGPATH_W) 'select.c'; else $(CYGPATH_W) '$(srcdir)/select.c'; fi`
+
+lib_a-semaphore.o: semaphore.c
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-semaphore.o `test -f 'semaphore.c' || echo '$(srcdir)/'`semaphore.c
+
+lib_a-semaphore.obj: semaphore.c
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-semaphore.obj `if test -f 'semaphore.c'; then $(CYGPATH_W) 'semaphore.c'; else $(CYGPATH_W) '$(srcdir)/semaphore.c'; fi`
+
+lib_a-setmntent.o: setmntent.c
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-setmntent.o `test -f 'setmntent.c' || echo '$(srcdir)/'`setmntent.c
+
+lib_a-setmntent.obj: setmntent.c
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-setmntent.obj `if test -f 'setmntent.c'; then $(CYGPATH_W) 'setmntent.c'; else $(CYGPATH_W) '$(srcdir)/setmntent.c'; fi`
+
+lib_a-shm.o: shm.c
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-shm.o `test -f 'shm.c' || echo '$(srcdir)/'`shm.c
+
+lib_a-shm.obj: shm.c
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-shm.obj `if test -f 'shm.c'; then $(CYGPATH_W) 'shm.c'; else $(CYGPATH_W) '$(srcdir)/shm.c'; fi`
+
+lib_a-signal.o: signal.c
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-signal.o `test -f 'signal.c' || echo '$(srcdir)/'`signal.c
+
+lib_a-signal.obj: signal.c
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-signal.obj `if test -f 'signal.c'; then $(CYGPATH_W) 'signal.c'; else $(CYGPATH_W) '$(srcdir)/signal.c'; fi`
+
+lib_a-socket.o: socket.c
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-socket.o `test -f 'socket.c' || echo '$(srcdir)/'`socket.c
+
+lib_a-socket.obj: socket.c
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-socket.obj `if test -f 'socket.c'; then $(CYGPATH_W) 'socket.c'; else $(CYGPATH_W) '$(srcdir)/socket.c'; fi`
+
+lib_a-sockopt.o: sockopt.c
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-sockopt.o `test -f 'sockopt.c' || echo '$(srcdir)/'`sockopt.c
+
+lib_a-sockopt.obj: sockopt.c
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-sockopt.obj `if test -f 'sockopt.c'; then $(CYGPATH_W) 'sockopt.c'; else $(CYGPATH_W) '$(srcdir)/sockopt.c'; fi`
+
+lib_a-stat.o: stat.c
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-stat.o `test -f 'stat.c' || echo '$(srcdir)/'`stat.c
+
+lib_a-stat.obj: stat.c
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-stat.obj `if test -f 'stat.c'; then $(CYGPATH_W) 'stat.c'; else $(CYGPATH_W) '$(srcdir)/stat.c'; fi`
+
+lib_a-statfs.o: statfs.c
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-statfs.o `test -f 'statfs.c' || echo '$(srcdir)/'`statfs.c
+
+lib_a-statfs.obj: statfs.c
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-statfs.obj `if test -f 'statfs.c'; then $(CYGPATH_W) 'statfs.c'; else $(CYGPATH_W) '$(srcdir)/statfs.c'; fi`
+
+lib_a-symlink.o: symlink.c
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-symlink.o `test -f 'symlink.c' || echo '$(srcdir)/'`symlink.c
+
+lib_a-symlink.obj: symlink.c
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-symlink.obj `if test -f 'symlink.c'; then $(CYGPATH_W) 'symlink.c'; else $(CYGPATH_W) '$(srcdir)/symlink.c'; fi`
+
+lib_a-sync.o: sync.c
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-sync.o `test -f 'sync.c' || echo '$(srcdir)/'`sync.c
+
+lib_a-sync.obj: sync.c
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-sync.obj `if test -f 'sync.c'; then $(CYGPATH_W) 'sync.c'; else $(CYGPATH_W) '$(srcdir)/sync.c'; fi`
+
+lib_a-sysconf.o: sysconf.c
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-sysconf.o `test -f 'sysconf.c' || echo '$(srcdir)/'`sysconf.c
+
+lib_a-sysconf.obj: sysconf.c
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-sysconf.obj `if test -f 'sysconf.c'; then $(CYGPATH_W) 'sysconf.c'; else $(CYGPATH_W) '$(srcdir)/sysconf.c'; fi`
+
+lib_a-syslog.o: syslog.c
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-syslog.o `test -f 'syslog.c' || echo '$(srcdir)/'`syslog.c
+
+lib_a-syslog.obj: syslog.c
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-syslog.obj `if test -f 'syslog.c'; then $(CYGPATH_W) 'syslog.c'; else $(CYGPATH_W) '$(srcdir)/syslog.c'; fi`
+
+lib_a-time.o: time.c
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-time.o `test -f 'time.c' || echo '$(srcdir)/'`time.c
+
+lib_a-time.obj: time.c
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-time.obj `if test -f 'time.c'; then $(CYGPATH_W) 'time.c'; else $(CYGPATH_W) '$(srcdir)/time.c'; fi`
+
+lib_a-truncate.o: truncate.c
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-truncate.o `test -f 'truncate.c' || echo '$(srcdir)/'`truncate.c
+
+lib_a-truncate.obj: truncate.c
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-truncate.obj `if test -f 'truncate.c'; then $(CYGPATH_W) 'truncate.c'; else $(CYGPATH_W) '$(srcdir)/truncate.c'; fi`
+
+lib_a-tty.o: tty.c
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-tty.o `test -f 'tty.c' || echo '$(srcdir)/'`tty.c
+
+lib_a-tty.obj: tty.c
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-tty.obj `if test -f 'tty.c'; then $(CYGPATH_W) 'tty.c'; else $(CYGPATH_W) '$(srcdir)/tty.c'; fi`
+
+lib_a-uname.o: uname.c
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-uname.o `test -f 'uname.c' || echo '$(srcdir)/'`uname.c
+
+lib_a-uname.obj: uname.c
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-uname.obj `if test -f 'uname.c'; then $(CYGPATH_W) 'uname.c'; else $(CYGPATH_W) '$(srcdir)/uname.c'; fi`
+
+lib_a-utime.o: utime.c
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-utime.o `test -f 'utime.c' || echo '$(srcdir)/'`utime.c
+
+lib_a-utime.obj: utime.c
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-utime.obj `if test -f 'utime.c'; then $(CYGPATH_W) 'utime.c'; else $(CYGPATH_W) '$(srcdir)/utime.c'; fi`
+
+lib_a-wait.o: wait.c
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-wait.o `test -f 'wait.c' || echo '$(srcdir)/'`wait.c
+
+lib_a-wait.obj: wait.c
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-wait.obj `if test -f 'wait.c'; then $(CYGPATH_W) 'wait.c'; else $(CYGPATH_W) '$(srcdir)/wait.c'; fi`
+
+# This directory's subdirectories are mostly independent; you can cd
+# into them and run `make' without going through this Makefile.
+# To change the values of `make' variables: instead of editing Makefiles,
+# (1) if the variable is set in `config.status', edit `config.status'
+# (which will cause the Makefiles to be regenerated when you run `make');
+# (2) otherwise, pass the desired values on the `make' command line.
+$(RECURSIVE_TARGETS):
+ @fail= failcom='exit 1'; \
+ for f in x $$MAKEFLAGS; do \
+ case $$f in \
+ *=* | --[!k]*);; \
+ *k*) failcom='fail=yes';; \
+ esac; \
+ done; \
+ dot_seen=no; \
+ target=`echo $@ | sed s/-recursive//`; \
+ list='$(SUBDIRS)'; for subdir in $$list; do \
+ echo "Making $$target in $$subdir"; \
+ if test "$$subdir" = "."; then \
+ dot_seen=yes; \
+ local_target="$$target-am"; \
+ else \
+ local_target="$$target"; \
+ fi; \
+ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+ || eval $$failcom; \
+ done; \
+ if test "$$dot_seen" = "no"; then \
+ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
+ fi; test -z "$$fail"
+
+$(RECURSIVE_CLEAN_TARGETS):
+ @fail= failcom='exit 1'; \
+ for f in x $$MAKEFLAGS; do \
+ case $$f in \
+ *=* | --[!k]*);; \
+ *k*) failcom='fail=yes';; \
+ esac; \
+ done; \
+ dot_seen=no; \
+ case "$@" in \
+ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
+ *) list='$(SUBDIRS)' ;; \
+ esac; \
+ rev=''; for subdir in $$list; do \
+ if test "$$subdir" = "."; then :; else \
+ rev="$$subdir $$rev"; \
+ fi; \
+ done; \
+ rev="$$rev ."; \
+ target=`echo $@ | sed s/-recursive//`; \
+ for subdir in $$rev; do \
+ echo "Making $$target in $$subdir"; \
+ if test "$$subdir" = "."; then \
+ local_target="$$target-am"; \
+ else \
+ local_target="$$target"; \
+ fi; \
+ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+ || eval $$failcom; \
+ done && test -z "$$fail"
+tags-recursive:
+ list='$(SUBDIRS)'; for subdir in $$list; do \
+ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
+ done
+ctags-recursive:
+ list='$(SUBDIRS)'; for subdir in $$list; do \
+ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
+ done
+
+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; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ mkid -fID $$unique
+tags: TAGS
+
+TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ set x; \
+ here=`pwd`; \
+ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
+ include_option=--etags-include; \
+ empty_fix=.; \
+ else \
+ include_option=--include; \
+ empty_fix=; \
+ fi; \
+ list='$(SUBDIRS)'; for subdir in $$list; do \
+ if test "$$subdir" = .; then :; else \
+ test ! -f $$subdir/TAGS || \
+ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \
+ fi; \
+ done; \
+ 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; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ shift; \
+ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
+ test -n "$$unique" || unique=$$empty_fix; \
+ if test $$# -gt 0; then \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ "$$@" $$unique; \
+ else \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ $$unique; \
+ fi; \
+ fi
+ctags: CTAGS
+CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ 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; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ test -z "$(CTAGS_ARGS)$$unique" \
+ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+ $$unique
+
+GTAGS:
+ here=`$(am__cd) $(top_builddir) && pwd` \
+ && $(am__cd) $(top_srcdir) \
+ && gtags -i $(GTAGS_ARGS) "$$here"
+
+distclean-tags:
+ -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+check-am:
+check: check-recursive
+all-am: Makefile $(LIBRARIES) $(DATA) all-local
+installdirs: installdirs-recursive
+installdirs-am:
+install: install-recursive
+install-exec: install-exec-recursive
+install-data: install-data-recursive
+uninstall: uninstall-recursive
+
+install-am: all-am
+ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-recursive
+install-strip:
+ if test -z '$(STRIP)'; then \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ install; \
+ else \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
+ fi
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+ -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+ -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_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-recursive
+
+clean-am: clean-generic clean-noinstLIBRARIES mostlyclean-am
+
+distclean: distclean-recursive
+ -rm -f $(am__CONFIG_DISTCLEAN_FILES)
+ -rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+ distclean-tags
+
+dvi: dvi-recursive
+
+dvi-am:
+
+html: html-recursive
+
+html-am:
+
+info: info-recursive
+
+info-am:
+
+install-data-am: install-data-local
+
+install-dvi: install-dvi-recursive
+
+install-dvi-am:
+
+install-exec-am:
+
+install-html: install-html-recursive
+
+install-html-am:
+
+install-info: install-info-recursive
+
+install-info-am:
+
+install-man:
+
+install-pdf: install-pdf-recursive
+
+install-pdf-am:
+
+install-ps: install-ps-recursive
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-recursive
+ -rm -f $(am__CONFIG_DISTCLEAN_FILES)
+ -rm -rf $(top_srcdir)/autom4te.cache
+ -rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-recursive
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic
+
+pdf: pdf-recursive
+
+pdf-am:
+
+ps: ps-recursive
+
+ps-am:
+
+uninstall-am:
+
+.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) ctags-recursive \
+ install-am install-strip tags-recursive
+
+.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \
+ all all-am all-local am--refresh check check-am clean \
+ clean-generic clean-noinstLIBRARIES ctags ctags-recursive \
+ distclean distclean-compile distclean-generic distclean-tags \
+ dvi dvi-am html html-am info info-am install install-am \
+ install-data install-data-am install-data-local install-dvi \
+ install-dvi-am install-exec install-exec-am install-html \
+ install-html-am install-info install-info-am install-man \
+ install-pdf install-pdf-am install-ps install-ps-am \
+ install-strip installcheck installcheck-am installdirs \
+ installdirs-am maintainer-clean maintainer-clean-generic \
+ mostlyclean mostlyclean-compile mostlyclean-generic pdf pdf-am \
+ ps ps-am tags tags-recursive uninstall uninstall-am
+
+
+lib.a: $(lib_a_OBJECTS)
+ rm -f $@
+ rm -rf tmp
+ mkdir tmp
+ cd tmp; \
+ for i in $(SUBLIBS); do \
+ $(AR) x ../$$i; \
+ done;
+ $(AR) $(AR_FLAGS) $@ tmp/*.o $^
+ $(RANLIB) $@
+ rm -rf tmp
+
+all-local: crt0.o
+
+crt0.o: machine/crt0.o
+ rm -f $@
+ ln machine/crt0.o $@ >/dev/null 2>/dev/null || cp machine/crt0.o $@
+
+machine/crt0.o: ; @true
+
+install-data-local:
+ $(mkinstalldirs) $(DESTDIR)$(tooldir)/include/arpa; \
+ for i in $(srcdir)/include/arpa/*.h; do \
+ $(INSTALL_DATA) $$i $(DESTDIR)$(tooldir)/include/arpa/`basename $$i`; \
+ done; \
+ $(mkinstalldirs) $(DESTDIR)$(tooldir)/include/net; \
+ for i in $(srcdir)/include/net/*.h; do \
+ $(INSTALL_DATA) $$i $(DESTDIR)$(tooldir)/include/net/`basename $$i`; \
+ done; \
+ $(mkinstalldirs) $(DESTDIR)$(tooldir)/include/netinet; \
+ for i in $(srcdir)/include/netinet/*.h; do \
+ $(INSTALL_DATA) $$i $(DESTDIR)$(tooldir)/include/netinet/`basename $$i`; \
+ done; \
+ $(mkinstalldirs) $(DESTDIR)$(tooldir)/include/netinet6; \
+ for i in $(srcdir)/include/netinet6/*.h; do \
+ $(INSTALL_DATA) $$i $(DESTDIR)$(tooldir)/include/netinet6/`basename $$i`; \
+ done;
+
+# 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/sys/phoenix/aclocal.m4 b/newlib/libc/sys/phoenix/aclocal.m4
new file mode 100644
index 000000000..18dab02aa
--- /dev/null
+++ b/newlib/libc/sys/phoenix/aclocal.m4
@@ -0,0 +1,1012 @@
+# generated automatically by aclocal 1.11.6 -*- Autoconf -*-
+
+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
+# 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation,
+# Inc.
+# This file 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.
+
+m4_ifndef([AC_AUTOCONF_VERSION],
+ [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
+m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.68],,
+[m4_warning([this file was generated for autoconf 2.68.
+You have another version of autoconf. It may work, but is not guaranteed to.
+If you have problems, you may need to regenerate the build system entirely.
+To do so, use the procedure documented by the package, typically `autoreconf'.])])
+
+# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008, 2011 Free Software
+# Foundation, Inc.
+#
+# This file 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.
+
+# serial 1
+
+# AM_AUTOMAKE_VERSION(VERSION)
+# ----------------------------
+# Automake X.Y traces this macro to ensure aclocal.m4 has been
+# generated from the m4 files accompanying Automake X.Y.
+# (This private macro should not be called outside this file.)
+AC_DEFUN([AM_AUTOMAKE_VERSION],
+[am__api_version='1.11'
+dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
+dnl require some minimum version. Point them to the right macro.
+m4_if([$1], [1.11.6], [],
+ [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
+])
+
+# _AM_AUTOCONF_VERSION(VERSION)
+# -----------------------------
+# aclocal traces this macro to find the Autoconf version.
+# This is a private macro too. Using m4_define simplifies
+# the logic in aclocal, which can simply ignore this definition.
+m4_define([_AM_AUTOCONF_VERSION], [])
+
+# AM_SET_CURRENT_AUTOMAKE_VERSION
+# -------------------------------
+# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
+# This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
+AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
+[AM_AUTOMAKE_VERSION([1.11.6])dnl
+m4_ifndef([AC_AUTOCONF_VERSION],
+ [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
+_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
+
+# AM_AUX_DIR_EXPAND -*- Autoconf -*-
+
+# Copyright (C) 2001, 2003, 2005, 2011 Free Software Foundation, Inc.
+#
+# This file 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.
+
+# serial 1
+
+# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
+# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to
+# `$srcdir', `$srcdir/..', or `$srcdir/../..'.
+#
+# Of course, Automake must honor this variable whenever it calls a
+# tool from the auxiliary directory. The problem is that $srcdir (and
+# therefore $ac_aux_dir as well) can be either absolute or relative,
+# depending on how configure is run. This is pretty annoying, since
+# it makes $ac_aux_dir quite unusable in subdirectories: in the top
+# source directory, any form will work fine, but in subdirectories a
+# relative path needs to be adjusted first.
+#
+# $ac_aux_dir/missing
+# fails when called from a subdirectory if $ac_aux_dir is relative
+# $top_srcdir/$ac_aux_dir/missing
+# fails if $ac_aux_dir is absolute,
+# fails when called from a subdirectory in a VPATH build with
+# a relative $ac_aux_dir
+#
+# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
+# are both prefixed by $srcdir. In an in-source build this is usually
+# harmless because $srcdir is `.', but things will broke when you
+# start a VPATH build or use an absolute $srcdir.
+#
+# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
+# iff we strip the leading $srcdir from $ac_aux_dir. That would be:
+# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
+# and then we would define $MISSING as
+# MISSING="\${SHELL} $am_aux_dir/missing"
+# This will work as long as MISSING is not called from configure, because
+# unfortunately $(top_srcdir) has no meaning in configure.
+# However there are other variables, like CC, which are often used in
+# configure, and could therefore not use this "fixed" $ac_aux_dir.
+#
+# Another solution, used here, is to always expand $ac_aux_dir to an
+# absolute PATH. The drawback is that using absolute paths prevent a
+# configured tree to be moved without reconfiguration.
+
+AC_DEFUN([AM_AUX_DIR_EXPAND],
+[dnl Rely on autoconf to set up CDPATH properly.
+AC_PREREQ([2.50])dnl
+# expand $ac_aux_dir to an absolute path
+am_aux_dir=`cd $ac_aux_dir && pwd`
+])
+
+# AM_CONDITIONAL -*- Autoconf -*-
+
+# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008
+# Free Software Foundation, Inc.
+#
+# This file 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.
+
+# serial 9
+
+# AM_CONDITIONAL(NAME, SHELL-CONDITION)
+# -------------------------------------
+# Define a conditional.
+AC_DEFUN([AM_CONDITIONAL],
+[AC_PREREQ(2.52)dnl
+ ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])],
+ [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
+AC_SUBST([$1_TRUE])dnl
+AC_SUBST([$1_FALSE])dnl
+_AM_SUBST_NOTMAKE([$1_TRUE])dnl
+_AM_SUBST_NOTMAKE([$1_FALSE])dnl
+m4_define([_AM_COND_VALUE_$1], [$2])dnl
+if $2; then
+ $1_TRUE=
+ $1_FALSE='#'
+else
+ $1_TRUE='#'
+ $1_FALSE=
+fi
+AC_CONFIG_COMMANDS_PRE(
+[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
+ AC_MSG_ERROR([[conditional "$1" was never defined.
+Usually this means the macro was only invoked conditionally.]])
+fi])])
+
+# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009,
+# 2010, 2011 Free Software Foundation, Inc.
+#
+# This file 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.
+
+# serial 12
+
+# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
+# written in clear, in which case automake, when reading aclocal.m4,
+# will think it sees a *use*, and therefore will trigger all it's
+# C support machinery. Also note that it means that autoscan, seeing
+# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
+
+
+# _AM_DEPENDENCIES(NAME)
+# ----------------------
+# See how the compiler implements dependency checking.
+# NAME is "CC", "CXX", "GCJ", or "OBJC".
+# We try a few techniques and use that to set a single cache variable.
+#
+# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
+# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
+# dependency, and given that the user is not expected to run this macro,
+# just rely on AC_PROG_CC.
+AC_DEFUN([_AM_DEPENDENCIES],
+[AC_REQUIRE([AM_SET_DEPDIR])dnl
+AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
+AC_REQUIRE([AM_MAKE_INCLUDE])dnl
+AC_REQUIRE([AM_DEP_TRACK])dnl
+
+ifelse([$1], CC, [depcc="$CC" am_compiler_list=],
+ [$1], CXX, [depcc="$CXX" am_compiler_list=],
+ [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
+ [$1], UPC, [depcc="$UPC" am_compiler_list=],
+ [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'],
+ [depcc="$$1" am_compiler_list=])
+
+AC_CACHE_CHECK([dependency style of $depcc],
+ [am_cv_$1_dependencies_compiler_type],
+[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
+ # We make a subdir and do the tests there. Otherwise we can end up
+ # making bogus files that we don't know about and never remove. For
+ # instance it was reported that on HP-UX the gcc test will end up
+ # making a dummy file named `D' -- because `-MD' means `put the output
+ # in D'.
+ rm -rf conftest.dir
+ mkdir conftest.dir
+ # Copy depcomp to subdir because otherwise we won't find it if we're
+ # using a relative directory.
+ cp "$am_depcomp" conftest.dir
+ cd conftest.dir
+ # We will build objects and dependencies in a subdirectory because
+ # it helps to detect inapplicable dependency modes. For instance
+ # both Tru64's cc and ICC support -MD to output dependencies as a
+ # side effect of compilation, but ICC will put the dependencies in
+ # the current directory while Tru64 will put them in the object
+ # directory.
+ mkdir sub
+
+ am_cv_$1_dependencies_compiler_type=none
+ if test "$am_compiler_list" = ""; then
+ am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
+ fi
+ am__universal=false
+ m4_case([$1], [CC],
+ [case " $depcc " in #(
+ *\ -arch\ *\ -arch\ *) am__universal=true ;;
+ esac],
+ [CXX],
+ [case " $depcc " in #(
+ *\ -arch\ *\ -arch\ *) am__universal=true ;;
+ esac])
+
+ for depmode in $am_compiler_list; do
+ # Setup a source with many dependencies, because some compilers
+ # like to wrap large dependency lists on column 80 (with \), and
+ # we should not choose a depcomp mode which is confused by this.
+ #
+ # We need to recreate these files for each test, as the compiler may
+ # overwrite some of them when testing with obscure command lines.
+ # This happens at least with the AIX C compiler.
+ : > sub/conftest.c
+ for i in 1 2 3 4 5 6; do
+ echo '#include "conftst'$i'.h"' >> sub/conftest.c
+ # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
+ # Solaris 8's {/usr,}/bin/sh.
+ touch sub/conftst$i.h
+ done
+ echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
+
+ # We check with `-c' and `-o' for the sake of the "dashmstdout"
+ # mode. It turns out that the SunPro C++ compiler does not properly
+ # handle `-M -o', and we need to detect this. Also, some Intel
+ # versions had trouble with output in subdirs
+ am__obj=sub/conftest.${OBJEXT-o}
+ am__minus_obj="-o $am__obj"
+ case $depmode in
+ gcc)
+ # This depmode causes a compiler race in universal mode.
+ test "$am__universal" = false || continue
+ ;;
+ nosideeffect)
+ # after this tag, mechanisms are not by side-effect, so they'll
+ # only be used when explicitly requested
+ if test "x$enable_dependency_tracking" = xyes; then
+ continue
+ else
+ break
+ fi
+ ;;
+ msvc7 | msvc7msys | msvisualcpp | msvcmsys)
+ # This compiler won't grok `-c -o', but also, the minuso test has
+ # not run yet. These depmodes are late enough in the game, and
+ # so weak that their functioning should not be impacted.
+ am__obj=conftest.${OBJEXT-o}
+ am__minus_obj=
+ ;;
+ none) break ;;
+ esac
+ if depmode=$depmode \
+ source=sub/conftest.c object=$am__obj \
+ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
+ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
+ >/dev/null 2>conftest.err &&
+ grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
+ grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
+ grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
+ ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
+ # icc doesn't choke on unknown options, it will just issue warnings
+ # or remarks (even with -Werror). So we grep stderr for any message
+ # that says an option was ignored or not supported.
+ # When given -MP, icc 7.0 and 7.1 complain thusly:
+ # icc: Command line warning: ignoring option '-M'; no argument required
+ # The diagnosis changed in icc 8.0:
+ # icc: Command line remark: option '-MP' not supported
+ if (grep 'ignoring option' conftest.err ||
+ grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
+ am_cv_$1_dependencies_compiler_type=$depmode
+ break
+ fi
+ fi
+ done
+
+ cd ..
+ rm -rf conftest.dir
+else
+ am_cv_$1_dependencies_compiler_type=none
+fi
+])
+AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
+AM_CONDITIONAL([am__fastdep$1], [
+ test "x$enable_dependency_tracking" != xno \
+ && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
+])
+
+
+# AM_SET_DEPDIR
+# -------------
+# Choose a directory name for dependency files.
+# This macro is AC_REQUIREd in _AM_DEPENDENCIES
+AC_DEFUN([AM_SET_DEPDIR],
+[AC_REQUIRE([AM_SET_LEADING_DOT])dnl
+AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
+])
+
+
+# AM_DEP_TRACK
+# ------------
+AC_DEFUN([AM_DEP_TRACK],
+[AC_ARG_ENABLE(dependency-tracking,
+[ --disable-dependency-tracking speeds up one-time build
+ --enable-dependency-tracking do not reject slow dependency extractors])
+if test "x$enable_dependency_tracking" != xno; then
+ am_depcomp="$ac_aux_dir/depcomp"
+ AMDEPBACKSLASH='\'
+ am__nodep='_no'
+fi
+AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
+AC_SUBST([AMDEPBACKSLASH])dnl
+_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
+AC_SUBST([am__nodep])dnl
+_AM_SUBST_NOTMAKE([am__nodep])dnl
+])
+
+# Generate code to set up dependency tracking. -*- Autoconf -*-
+
+# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008
+# Free Software Foundation, Inc.
+#
+# This file 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.
+
+#serial 5
+
+# _AM_OUTPUT_DEPENDENCY_COMMANDS
+# ------------------------------
+AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
+[{
+ # Autoconf 2.62 quotes --file arguments for eval, but not when files
+ # are listed without --file. Let's play safe and only enable the eval
+ # if we detect the quoting.
+ case $CONFIG_FILES in
+ *\'*) eval set x "$CONFIG_FILES" ;;
+ *) set x $CONFIG_FILES ;;
+ esac
+ shift
+ for mf
+ do
+ # Strip MF so we end up with the name of the file.
+ mf=`echo "$mf" | sed -e 's/:.*$//'`
+ # Check whether this is an Automake generated Makefile or not.
+ # We used to match only the files named `Makefile.in', but
+ # some people rename them; so instead we look at the file content.
+ # Grep'ing the first line is not enough: some people post-process
+ # each Makefile.in and add a new line on top of each file to say so.
+ # Grep'ing the whole file is not good either: AIX grep has a line
+ # limit of 2048, but all sed's we know have understand at least 4000.
+ if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
+ dirpart=`AS_DIRNAME("$mf")`
+ else
+ continue
+ fi
+ # Extract the definition of DEPDIR, am__include, and am__quote
+ # from the Makefile without running `make'.
+ DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
+ test -z "$DEPDIR" && continue
+ am__include=`sed -n 's/^am__include = //p' < "$mf"`
+ test -z "am__include" && continue
+ am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
+ # When using ansi2knr, U may be empty or an underscore; expand it
+ U=`sed -n 's/^U = //p' < "$mf"`
+ # Find all dependency output files, they are included files with
+ # $(DEPDIR) in their names. We invoke sed twice because it is the
+ # simplest approach to changing $(DEPDIR) to its actual value in the
+ # expansion.
+ for file in `sed -n "
+ s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
+ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
+ # Make sure the directory exists.
+ test -f "$dirpart/$file" && continue
+ fdir=`AS_DIRNAME(["$file"])`
+ AS_MKDIR_P([$dirpart/$fdir])
+ # echo "creating $dirpart/$file"
+ echo '# dummy' > "$dirpart/$file"
+ done
+ done
+}
+])# _AM_OUTPUT_DEPENDENCY_COMMANDS
+
+
+# AM_OUTPUT_DEPENDENCY_COMMANDS
+# -----------------------------
+# This macro should only be invoked once -- use via AC_REQUIRE.
+#
+# This code is only required when automatic dependency tracking
+# is enabled. FIXME. This creates each `.P' file that we will
+# need in order to bootstrap the dependency handling code.
+AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
+[AC_CONFIG_COMMANDS([depfiles],
+ [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
+ [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
+])
+
+# Do all the work for Automake. -*- Autoconf -*-
+
+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
+# 2005, 2006, 2008, 2009 Free Software Foundation, Inc.
+#
+# This file 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.
+
+# serial 16
+
+# This macro actually does too much. Some checks are only needed if
+# your package does certain things. But this isn't really a big deal.
+
+# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
+# AM_INIT_AUTOMAKE([OPTIONS])
+# -----------------------------------------------
+# The call with PACKAGE and VERSION arguments is the old style
+# call (pre autoconf-2.50), which is being phased out. PACKAGE
+# and VERSION should now be passed to AC_INIT and removed from
+# the call to AM_INIT_AUTOMAKE.
+# We support both call styles for the transition. After
+# the next Automake release, Autoconf can make the AC_INIT
+# arguments mandatory, and then we can depend on a new Autoconf
+# release and drop the old call support.
+AC_DEFUN([AM_INIT_AUTOMAKE],
+[AC_PREREQ([2.62])dnl
+dnl Autoconf wants to disallow AM_ names. We explicitly allow
+dnl the ones we care about.
+m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
+AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
+AC_REQUIRE([AC_PROG_INSTALL])dnl
+if test "`cd $srcdir && pwd`" != "`pwd`"; then
+ # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
+ # is not polluted with repeated "-I."
+ AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
+ # test to see if srcdir already configured
+ if test -f $srcdir/config.status; then
+ AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
+ fi
+fi
+
+# test whether we have cygpath
+if test -z "$CYGPATH_W"; then
+ if (cygpath --version) >/dev/null 2>/dev/null; then
+ CYGPATH_W='cygpath -w'
+ else
+ CYGPATH_W=echo
+ fi
+fi
+AC_SUBST([CYGPATH_W])
+
+# Define the identity of the package.
+dnl Distinguish between old-style and new-style calls.
+m4_ifval([$2],
+[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
+ AC_SUBST([PACKAGE], [$1])dnl
+ AC_SUBST([VERSION], [$2])],
+[_AM_SET_OPTIONS([$1])dnl
+dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
+m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,,
+ [m4_fatal([AC_INIT should be called with package and version arguments])])dnl
+ AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
+ AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
+
+_AM_IF_OPTION([no-define],,
+[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
+ AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
+
+# Some tools Automake needs.
+AC_REQUIRE([AM_SANITY_CHECK])dnl
+AC_REQUIRE([AC_ARG_PROGRAM])dnl
+AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
+AM_MISSING_PROG(AUTOCONF, autoconf)
+AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
+AM_MISSING_PROG(AUTOHEADER, autoheader)
+AM_MISSING_PROG(MAKEINFO, makeinfo)
+AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
+AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl
+AC_REQUIRE([AM_PROG_MKDIR_P])dnl
+# We need awk for the "check" target. The system "awk" is bad on
+# some platforms.
+AC_REQUIRE([AC_PROG_AWK])dnl
+AC_REQUIRE([AC_PROG_MAKE_SET])dnl
+AC_REQUIRE([AM_SET_LEADING_DOT])dnl
+_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
+ [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
+ [_AM_PROG_TAR([v7])])])
+_AM_IF_OPTION([no-dependencies],,
+[AC_PROVIDE_IFELSE([AC_PROG_CC],
+ [_AM_DEPENDENCIES(CC)],
+ [define([AC_PROG_CC],
+ defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
+AC_PROVIDE_IFELSE([AC_PROG_CXX],
+ [_AM_DEPENDENCIES(CXX)],
+ [define([AC_PROG_CXX],
+ defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
+AC_PROVIDE_IFELSE([AC_PROG_OBJC],
+ [_AM_DEPENDENCIES(OBJC)],
+ [define([AC_PROG_OBJC],
+ defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl
+])
+_AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl
+dnl The `parallel-tests' driver may need to know about EXEEXT, so add the
+dnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This macro
+dnl is hooked onto _AC_COMPILER_EXEEXT early, see below.
+AC_CONFIG_COMMANDS_PRE(dnl
+[m4_provide_if([_AM_COMPILER_EXEEXT],
+ [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
+])
+
+dnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion. Do not
+dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further
+dnl mangled by Autoconf and run in a shell conditional statement.
+m4_define([_AC_COMPILER_EXEEXT],
+m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])])
+
+
+# When config.status generates a header, we must update the stamp-h file.
+# This file resides in the same directory as the config header
+# that is generated. The stamp files are numbered to have different names.
+
+# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
+# loop where config.status creates the headers, so we can generate
+# our stamp files there.
+AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
+[# Compute $1's index in $config_headers.
+_am_arg=$1
+_am_stamp_count=1
+for _am_header in $config_headers :; do
+ case $_am_header in
+ $_am_arg | $_am_arg:* )
+ break ;;
+ * )
+ _am_stamp_count=`expr $_am_stamp_count + 1` ;;
+ esac
+done
+echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
+
+# Copyright (C) 2001, 2003, 2005, 2008, 2011 Free Software Foundation,
+# Inc.
+#
+# This file 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.
+
+# serial 1
+
+# AM_PROG_INSTALL_SH
+# ------------------
+# Define $install_sh.
+AC_DEFUN([AM_PROG_INSTALL_SH],
+[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
+if test x"${install_sh}" != xset; then
+ case $am_aux_dir in
+ *\ * | *\ *)
+ install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
+ *)
+ install_sh="\${SHELL} $am_aux_dir/install-sh"
+ esac
+fi
+AC_SUBST(install_sh)])
+
+# Copyright (C) 2003, 2005 Free Software Foundation, Inc.
+#
+# This file 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.
+
+# serial 2
+
+# Check whether the underlying file-system supports filenames
+# with a leading dot. For instance MS-DOS doesn't.
+AC_DEFUN([AM_SET_LEADING_DOT],
+[rm -rf .tst 2>/dev/null
+mkdir .tst 2>/dev/null
+if test -d .tst; then
+ am__leading_dot=.
+else
+ am__leading_dot=_
+fi
+rmdir .tst 2>/dev/null
+AC_SUBST([am__leading_dot])])
+
+# Add --enable-maintainer-mode option to configure. -*- Autoconf -*-
+# From Jim Meyering
+
+# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005, 2008,
+# 2011 Free Software Foundation, Inc.
+#
+# This file 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.
+
+# serial 5
+
+# AM_MAINTAINER_MODE([DEFAULT-MODE])
+# ----------------------------------
+# Control maintainer-specific portions of Makefiles.
+# Default is to disable them, unless `enable' is passed literally.
+# For symmetry, `disable' may be passed as well. Anyway, the user
+# can override the default with the --enable/--disable switch.
+AC_DEFUN([AM_MAINTAINER_MODE],
+[m4_case(m4_default([$1], [disable]),
+ [enable], [m4_define([am_maintainer_other], [disable])],
+ [disable], [m4_define([am_maintainer_other], [enable])],
+ [m4_define([am_maintainer_other], [enable])
+ m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])])
+AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
+ dnl maintainer-mode's default is 'disable' unless 'enable' is passed
+ AC_ARG_ENABLE([maintainer-mode],
+[ --][am_maintainer_other][-maintainer-mode am_maintainer_other make rules and dependencies not useful
+ (and sometimes confusing) to the casual installer],
+ [USE_MAINTAINER_MODE=$enableval],
+ [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes]))
+ AC_MSG_RESULT([$USE_MAINTAINER_MODE])
+ AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes])
+ MAINT=$MAINTAINER_MODE_TRUE
+ AC_SUBST([MAINT])dnl
+]
+)
+
+AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE])
+
+# Check to see how 'make' treats includes. -*- Autoconf -*-
+
+# Copyright (C) 2001, 2002, 2003, 2005, 2009 Free Software Foundation, Inc.
+#
+# This file 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.
+
+# serial 4
+
+# AM_MAKE_INCLUDE()
+# -----------------
+# Check to see how make treats includes.
+AC_DEFUN([AM_MAKE_INCLUDE],
+[am_make=${MAKE-make}
+cat > confinc << 'END'
+am__doit:
+ @echo this is the am__doit target
+.PHONY: am__doit
+END
+# If we don't find an include directive, just comment out the code.
+AC_MSG_CHECKING([for style of include used by $am_make])
+am__include="#"
+am__quote=
+_am_result=none
+# First try GNU make style include.
+echo "include confinc" > confmf
+# Ignore all kinds of additional output from `make'.
+case `$am_make -s -f confmf 2> /dev/null` in #(
+*the\ am__doit\ target*)
+ am__include=include
+ am__quote=
+ _am_result=GNU
+ ;;
+esac
+# Now try BSD make style include.
+if test "$am__include" = "#"; then
+ echo '.include "confinc"' > confmf
+ case `$am_make -s -f confmf 2> /dev/null` in #(
+ *the\ am__doit\ target*)
+ am__include=.include
+ am__quote="\""
+ _am_result=BSD
+ ;;
+ esac
+fi
+AC_SUBST([am__include])
+AC_SUBST([am__quote])
+AC_MSG_RESULT([$_am_result])
+rm -f confinc confmf
+])
+
+# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*-
+
+# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008
+# Free Software Foundation, Inc.
+#
+# This file 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.
+
+# serial 6
+
+# AM_MISSING_PROG(NAME, PROGRAM)
+# ------------------------------
+AC_DEFUN([AM_MISSING_PROG],
+[AC_REQUIRE([AM_MISSING_HAS_RUN])
+$1=${$1-"${am_missing_run}$2"}
+AC_SUBST($1)])
+
+
+# AM_MISSING_HAS_RUN
+# ------------------
+# Define MISSING if not defined so far and test if it supports --run.
+# If it does, set am_missing_run to use it, otherwise, to nothing.
+AC_DEFUN([AM_MISSING_HAS_RUN],
+[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
+AC_REQUIRE_AUX_FILE([missing])dnl
+if test x"${MISSING+set}" != xset; then
+ case $am_aux_dir in
+ *\ * | *\ *)
+ MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
+ *)
+ MISSING="\${SHELL} $am_aux_dir/missing" ;;
+ esac
+fi
+# Use eval to expand $SHELL
+if eval "$MISSING --run true"; then
+ am_missing_run="$MISSING --run "
+else
+ am_missing_run=
+ AC_MSG_WARN([`missing' script is too old or missing])
+fi
+])
+
+# Copyright (C) 2003, 2004, 2005, 2006, 2011 Free Software Foundation,
+# Inc.
+#
+# This file 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.
+
+# serial 1
+
+# AM_PROG_MKDIR_P
+# ---------------
+# Check for `mkdir -p'.
+AC_DEFUN([AM_PROG_MKDIR_P],
+[AC_PREREQ([2.60])dnl
+AC_REQUIRE([AC_PROG_MKDIR_P])dnl
+dnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P,
+dnl while keeping a definition of mkdir_p for backward compatibility.
+dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile.
+dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of
+dnl Makefile.ins that do not define MKDIR_P, so we do our own
+dnl adjustment using top_builddir (which is defined more often than
+dnl MKDIR_P).
+AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl
+case $mkdir_p in
+ [[\\/$]]* | ?:[[\\/]]*) ;;
+ */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
+esac
+])
+
+# Helper functions for option handling. -*- Autoconf -*-
+
+# Copyright (C) 2001, 2002, 2003, 2005, 2008, 2010 Free Software
+# Foundation, Inc.
+#
+# This file 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.
+
+# serial 5
+
+# _AM_MANGLE_OPTION(NAME)
+# -----------------------
+AC_DEFUN([_AM_MANGLE_OPTION],
+[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
+
+# _AM_SET_OPTION(NAME)
+# --------------------
+# Set option NAME. Presently that only means defining a flag for this option.
+AC_DEFUN([_AM_SET_OPTION],
+[m4_define(_AM_MANGLE_OPTION([$1]), 1)])
+
+# _AM_SET_OPTIONS(OPTIONS)
+# ------------------------
+# OPTIONS is a space-separated list of Automake options.
+AC_DEFUN([_AM_SET_OPTIONS],
+[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
+
+# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
+# -------------------------------------------
+# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
+AC_DEFUN([_AM_IF_OPTION],
+[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
+
+# Check to make sure that the build environment is sane. -*- Autoconf -*-
+
+# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008
+# Free Software Foundation, Inc.
+#
+# This file 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.
+
+# serial 5
+
+# AM_SANITY_CHECK
+# ---------------
+AC_DEFUN([AM_SANITY_CHECK],
+[AC_MSG_CHECKING([whether build environment is sane])
+# Just in case
+sleep 1
+echo timestamp > conftest.file
+# Reject unsafe characters in $srcdir or the absolute working directory
+# name. Accept space and tab only in the latter.
+am_lf='
+'
+case `pwd` in
+ *[[\\\"\#\$\&\'\`$am_lf]]*)
+ AC_MSG_ERROR([unsafe absolute working directory name]);;
+esac
+case $srcdir in
+ *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*)
+ AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);;
+esac
+
+# Do `set' in a subshell so we don't clobber the current shell's
+# arguments. Must try -L first in case configure is actually a
+# symlink; some systems play weird games with the mod time of symlinks
+# (eg FreeBSD returns the mod time of the symlink's containing
+# directory).
+if (
+ set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
+ if test "$[*]" = "X"; then
+ # -L didn't work.
+ set X `ls -t "$srcdir/configure" conftest.file`
+ fi
+ rm -f conftest.file
+ if test "$[*]" != "X $srcdir/configure conftest.file" \
+ && test "$[*]" != "X conftest.file $srcdir/configure"; then
+
+ # If neither matched, then we have a broken ls. This can happen
+ # if, for instance, CONFIG_SHELL is bash and it inherits a
+ # broken ls alias from the environment. This has actually
+ # happened. Such a system could not be considered "sane".
+ AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
+alias in your environment])
+ fi
+
+ test "$[2]" = conftest.file
+ )
+then
+ # Ok.
+ :
+else
+ AC_MSG_ERROR([newly created file is older than distributed files!
+Check your system clock])
+fi
+AC_MSG_RESULT(yes)])
+
+# Copyright (C) 2001, 2003, 2005, 2011 Free Software Foundation, Inc.
+#
+# This file 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.
+
+# serial 1
+
+# AM_PROG_INSTALL_STRIP
+# ---------------------
+# One issue with vendor `install' (even GNU) is that you can't
+# specify the program used to strip binaries. This is especially
+# annoying in cross-compiling environments, where the build's strip
+# is unlikely to handle the host's binaries.
+# Fortunately install-sh will honor a STRIPPROG variable, so we
+# always use install-sh in `make install-strip', and initialize
+# STRIPPROG with the value of the STRIP variable (set by the user).
+AC_DEFUN([AM_PROG_INSTALL_STRIP],
+[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
+# Installed binaries are usually stripped using `strip' when the user
+# run `make install-strip'. However `strip' might not be the right
+# tool to use in cross-compilation environments, therefore Automake
+# will honor the `STRIP' environment variable to overrule this program.
+dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
+if test "$cross_compiling" != no; then
+ AC_CHECK_TOOL([STRIP], [strip], :)
+fi
+INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
+AC_SUBST([INSTALL_STRIP_PROGRAM])])
+
+# Copyright (C) 2006, 2008, 2010 Free Software Foundation, Inc.
+#
+# This file 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.
+
+# serial 3
+
+# _AM_SUBST_NOTMAKE(VARIABLE)
+# ---------------------------
+# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
+# This macro is traced by Automake.
+AC_DEFUN([_AM_SUBST_NOTMAKE])
+
+# AM_SUBST_NOTMAKE(VARIABLE)
+# --------------------------
+# Public sister of _AM_SUBST_NOTMAKE.
+AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
+
+# Check how to create a tarball. -*- Autoconf -*-
+
+# Copyright (C) 2004, 2005, 2012 Free Software Foundation, Inc.
+#
+# This file 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.
+
+# serial 2
+
+# _AM_PROG_TAR(FORMAT)
+# --------------------
+# Check how to create a tarball in format FORMAT.
+# FORMAT should be one of `v7', `ustar', or `pax'.
+#
+# Substitute a variable $(am__tar) that is a command
+# writing to stdout a FORMAT-tarball containing the directory
+# $tardir.
+# tardir=directory && $(am__tar) > result.tar
+#
+# Substitute a variable $(am__untar) that extract such
+# a tarball read from stdin.
+# $(am__untar) < result.tar
+AC_DEFUN([_AM_PROG_TAR],
+[# Always define AMTAR for backward compatibility. Yes, it's still used
+# in the wild :-( We should find a proper way to deprecate it ...
+AC_SUBST([AMTAR], ['$${TAR-tar}'])
+m4_if([$1], [v7],
+ [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'],
+ [m4_case([$1], [ustar],, [pax],,
+ [m4_fatal([Unknown tar format])])
+AC_MSG_CHECKING([how to create a $1 tar archive])
+# Loop over all known methods to create a tar archive until one works.
+_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
+_am_tools=${am_cv_prog_tar_$1-$_am_tools}
+# Do not fold the above two line into one, because Tru64 sh and
+# Solaris sh will not grok spaces in the rhs of `-'.
+for _am_tool in $_am_tools
+do
+ case $_am_tool in
+ gnutar)
+ for _am_tar in tar gnutar gtar;
+ do
+ AM_RUN_LOG([$_am_tar --version]) && break
+ done
+ am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
+ am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
+ am__untar="$_am_tar -xf -"
+ ;;
+ plaintar)
+ # Must skip GNU tar: if it does not support --format= it doesn't create
+ # ustar tarball either.
+ (tar --version) >/dev/null 2>&1 && continue
+ am__tar='tar chf - "$$tardir"'
+ am__tar_='tar chf - "$tardir"'
+ am__untar='tar xf -'
+ ;;
+ pax)
+ am__tar='pax -L -x $1 -w "$$tardir"'
+ am__tar_='pax -L -x $1 -w "$tardir"'
+ am__untar='pax -r'
+ ;;
+ cpio)
+ am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
+ am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
+ am__untar='cpio -i -H $1 -d'
+ ;;
+ none)
+ am__tar=false
+ am__tar_=false
+ am__untar=false
+ ;;
+ esac
+
+ # If the value was cached, stop now. We just wanted to have am__tar
+ # and am__untar set.
+ test -n "${am_cv_prog_tar_$1}" && break
+
+ # tar/untar a dummy directory, and stop if the command works
+ rm -rf conftest.dir
+ mkdir conftest.dir
+ echo GrepMe > conftest.dir/file
+ AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
+ rm -rf conftest.dir
+ if test -s conftest.tar; then
+ AM_RUN_LOG([$am__untar <conftest.tar])
+ grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
+ fi
+done
+rm -rf conftest.dir
+
+AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
+AC_MSG_RESULT([$am_cv_prog_tar_$1])])
+AC_SUBST([am__tar])
+AC_SUBST([am__untar])
+]) # _AM_PROG_TAR
+
+m4_include([../../../acinclude.m4])
diff --git a/newlib/libc/sys/phoenix/alarm.c b/newlib/libc/sys/phoenix/alarm.c
new file mode 100644
index 000000000..8a5f0ac4c
--- /dev/null
+++ b/newlib/libc/sys/phoenix/alarm.c
@@ -0,0 +1,29 @@
+/* Copyright (c) 2016 Phoenix Systems
+ 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.*/
+
+unsigned int alarm(unsigned int seconds)
+{
+ /* TODO: implement. */
+ return 0;
+}
diff --git a/newlib/libc/sys/phoenix/bits/posix_opt.h b/newlib/libc/sys/phoenix/bits/posix_opt.h
new file mode 100644
index 000000000..da412d0fc
--- /dev/null
+++ b/newlib/libc/sys/phoenix/bits/posix_opt.h
@@ -0,0 +1,146 @@
+/* Copyright (c) 2016 Phoenix Systems
+ 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.*/
+
+#ifndef _POSIX_OPT_H
+#define _POSIX_OPT_H
+
+/* Job control is supported. */
+#define _POSIX_JOB_CONTROL 1
+
+/* Processes have a saved set-user-ID and a saved set-group-ID. */
+#define _POSIX_SAVED_IDS 1
+
+/* Priority scheduling is supported. */
+#define _POSIX_PRIORITY_SCHEDULING 1
+
+/* Synchronizing file data is supported. */
+#define _POSIX_SYNCHRONIZED_IO 1
+
+/* The fsync function is present. */
+#define _POSIX_FSYNC 1
+
+/* Mapping of files to memory is supported. */
+#define _POSIX_MAPPED_FILES 1
+
+/* Locking of all memory is supported. */
+#define _POSIX_MEMLOCK 1
+
+/* Locking of ranges of memory is supported. */
+#define _POSIX_MEMLOCK_RANGE 1
+
+/* Setting of memory protections is supported. */
+#define _POSIX_MEMORY_PROTECTION 1
+
+/* Implementation supports `poll' function. */
+#define _POSIX_POLL 1
+
+/* Implementation supports `select' and `pselect' functions. */
+#define _POSIX_SELECT 1
+
+/* Only root can change owner of file. */
+#define _POSIX_CHOWN_RESTRICTED 1
+
+/* `c_cc' member of 'struct termios' structure can be disabled by
+ using the value _POSIX_VDISABLE. */
+#define _POSIX_VDISABLE '\0'
+
+/* Filenames are not silently truncated. */
+#define _POSIX_NO_TRUNC 1
+
+/* X/Open realtime support is available. */
+#define _XOPEN_REALTIME 1
+
+/* X/Open realtime thread support is available. */
+#define _XOPEN_REALTIME_THREADS 1
+
+/* XPG4.2 shared memory is supported. */
+#define _XOPEN_SHM 1
+
+/* Tell we don't have POSIX threads. */
+#undef _POSIX_THREADS
+
+/* We have the reentrant functions described in POSIX. */
+#define _POSIX_REENTRANT_FUNCTIONS 1
+#define _POSIX_THREAD_SAFE_FUNCTIONS 1
+
+/* We provide priority scheduling for threads. */
+#define _POSIX_THREAD_PRIORITY_SCHEDULING 1
+
+/* We support user-defined stack sizes. */
+#define _POSIX_THREAD_ATTR_STACKSIZE 1
+
+/* We support user-defined stacks. */
+#define _POSIX_THREAD_ATTR_STACKADDR 1
+
+/* We support POSIX.1b semaphores, but only the non-shared form for now. */
+#define _POSIX_SEMAPHORES 1
+
+/* Real-time signals are supported. */
+#define _POSIX_REALTIME_SIGNALS 1
+
+/* We support asynchronous I/O. */
+#define _POSIX_ASYNCHRONOUS_IO 1
+#define _POSIX_ASYNC_IO 1
+/* Alternative name for Unix98. */
+#define _LFS_ASYNCHRONOUS_IO 1
+
+/* The LFS support in asynchronous I/O is also available. */
+#define _LFS64_ASYNCHRONOUS_IO 1
+
+/* The rest of the LFS is also available. */
+#define _LFS_LARGEFILE 1
+#define _LFS64_LARGEFILE 1
+#define _LFS64_STDIO 1
+
+/* POSIX shared memory objects are implemented. */
+#define _POSIX_SHARED_MEMORY_OBJECTS 1
+
+/* GNU libc provides regular expression handling. */
+#define _POSIX_REGEXP 1
+
+/* Reader/Writer locks are available. */
+#define _POSIX_READER_WRITER_LOCKS 200912L
+
+/* We have a POSIX shell. */
+#define _POSIX_SHELL 1
+
+/* We support the Timeouts option. */
+#define _POSIX_TIMEOUTS 200912L
+
+/* We support spinlocks. */
+#define _POSIX_SPIN_LOCKS 200912L
+
+/* The `spawn' function family is supported. */
+#define _POSIX_SPAWN 200912L
+
+/* We don't have POSIX timers. */
+#undef _POSIX_TIMERS
+
+/* The barrier functions are available. */
+#define _POSIX_BARRIERS 200912L
+
+/* POSIX message queues are not yet supported. */
+#undef _POSIX_MESSAGE_PASSING
+
+#endif
diff --git a/newlib/libc/sys/phoenix/chmod.c b/newlib/libc/sys/phoenix/chmod.c
new file mode 100644
index 000000000..fea229073
--- /dev/null
+++ b/newlib/libc/sys/phoenix/chmod.c
@@ -0,0 +1,50 @@
+/* Copyright (c) 2016 Phoenix Systems
+ 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 "syscall.h"
+
+#include <errno.h>
+#include <sys/types.h>
+
+int chmod(const char *pathname, mode_t mode)
+{
+ int ret = syscall2(int, SYS_CHMOD, pathname, mode);
+ if (ret < 0) {
+ errno = -ret;
+ return -1;
+ }
+
+ return ret;
+}
+
+int fchmod(int fd, mode_t mode)
+{
+ int ret = syscall2(int, SYS_FCHMOD, fd, mode);
+ if (ret < 0) {
+ errno = -ret;
+ return -1;
+ }
+
+ return ret;
+}
diff --git a/newlib/libc/sys/phoenix/chown.c b/newlib/libc/sys/phoenix/chown.c
new file mode 100644
index 000000000..c2cea2c21
--- /dev/null
+++ b/newlib/libc/sys/phoenix/chown.c
@@ -0,0 +1,61 @@
+/* Copyright (c) 2016 Phoenix Systems
+ 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 "syscall.h"
+
+#include <errno.h>
+#include <sys/types.h>
+
+int chown(const char *pathname, uid_t owner, gid_t group)
+{
+ int ret = syscall3(int, SYS_CHOWN, pathname, (unsigned int) owner, (unsigned int) group);
+ if (ret < 0) {
+ errno = -ret;
+ return -1;
+ }
+
+ return ret;
+}
+
+int fchown(int fd, uid_t owner, gid_t group)
+{
+ int ret = syscall3(int, SYS_FCHOWN, fd, (unsigned int) owner, (unsigned int) group);
+ if (ret < 0) {
+ errno = -ret;
+ return -1;
+ }
+
+ return ret;
+}
+
+int lchown(const char *pathname, uid_t owner, gid_t group)
+{
+ int ret = syscall3(int, SYS_LCHOWN, pathname, (unsigned int) owner, (unsigned int) group);
+ if (ret < 0) {
+ errno = -ret;
+ return -1;
+ }
+
+ return ret;
+}
diff --git a/newlib/libc/sys/phoenix/clocks.c b/newlib/libc/sys/phoenix/clocks.c
new file mode 100644
index 000000000..78700cfac
--- /dev/null
+++ b/newlib/libc/sys/phoenix/clocks.c
@@ -0,0 +1,50 @@
+/* Copyright (c) 2016 Phoenix Systems
+ 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 "syscall.h"
+
+#include <errno.h>
+#include <time.h>
+
+int clock_gettime(clockid_t clock_id, struct timespec *tp)
+{
+ int ret = syscall2(int, SYS_CLOCK_GETTIME, clock_id, tp);
+ if (ret < 0) {
+ errno = -ret;
+ return -1;
+ }
+
+ return ret;
+}
+
+int clock_settime(clockid_t clock_id, const struct timespec *tp)
+{
+ int ret = syscall2(int, SYS_CLOCK_SETTIME, clock_id, tp);
+ if (ret < 0) {
+ errno = -ret;
+ return -1;
+ }
+
+ return ret;
+}
diff --git a/newlib/libc/sys/phoenix/configure b/newlib/libc/sys/phoenix/configure
new file mode 100644
index 000000000..abfd918de
--- /dev/null
+++ b/newlib/libc/sys/phoenix/configure
@@ -0,0 +1,4904 @@
+#! /bin/sh
+# Guess values for system-dependent variables and create Makefiles.
+# Generated by GNU Autoconf 2.68 for newlib 2.4.0.
+#
+#
+# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
+# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software
+# Foundation, Inc.
+#
+#
+# This configure script is free software; the Free Software Foundation
+# gives unlimited permission to copy, distribute and modify it.
+## -------------------- ##
+## M4sh Initialization. ##
+## -------------------- ##
+
+# Be more Bourne compatible
+DUALCASE=1; export DUALCASE # for MKS sh
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
+ emulate sh
+ NULLCMD=:
+ # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
+ # is contrary to our usage. Disable this feature.
+ alias -g '${1+"$@"}'='"$@"'
+ setopt NO_GLOB_SUBST
+else
+ case `(set -o) 2>/dev/null` in #(
+ *posix*) :
+ set -o posix ;; #(
+ *) :
+ ;;
+esac
+fi
+
+
+as_nl='
+'
+export as_nl
+# Printing a long string crashes Solaris 7 /usr/bin/printf.
+as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
+as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
+as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
+# Prefer a ksh shell builtin over an external printf program on Solaris,
+# but without wasting forks for bash or zsh.
+if test -z "$BASH_VERSION$ZSH_VERSION" \
+ && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
+ as_echo='print -r --'
+ as_echo_n='print -rn --'
+elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
+ as_echo='printf %s\n'
+ as_echo_n='printf %s'
+else
+ if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
+ as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
+ as_echo_n='/usr/ucb/echo -n'
+ else
+ as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
+ as_echo_n_body='eval
+ arg=$1;
+ case $arg in #(
+ *"$as_nl"*)
+ expr "X$arg" : "X\\(.*\\)$as_nl";
+ arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
+ esac;
+ expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
+ '
+ export as_echo_n_body
+ as_echo_n='sh -c $as_echo_n_body as_echo'
+ fi
+ export as_echo_body
+ as_echo='sh -c $as_echo_body as_echo'
+fi
+
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+ PATH_SEPARATOR=:
+ (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
+ (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
+ PATH_SEPARATOR=';'
+ }
+fi
+
+
+# IFS
+# We need space, tab and new line, in precisely that order. Quoting is
+# there to prevent editors from complaining about space-tab.
+# (If _AS_PATH_WALK were called with IFS unset, it would disable word
+# splitting by setting IFS to empty value.)
+IFS=" "" $as_nl"
+
+# Find who we are. Look in the path if we contain no directory separator.
+as_myself=
+case $0 in #((
+ *[\\/]* ) as_myself=$0 ;;
+ *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
+ done
+IFS=$as_save_IFS
+
+ ;;
+esac
+# We did not find ourselves, most probably we were run as `sh COMMAND'
+# in which case we are not to be found in the path.
+if test "x$as_myself" = x; then
+ as_myself=$0
+fi
+if test ! -f "$as_myself"; then
+ $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
+ exit 1
+fi
+
+# Unset variables that we do not need and which cause bugs (e.g. in
+# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
+# suppresses any "Segmentation fault" message there. '((' could
+# trigger a bug in pdksh 5.2.14.
+for as_var in BASH_ENV ENV MAIL MAILPATH
+do eval test x\${$as_var+set} = xset \
+ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
+done
+PS1='$ '
+PS2='> '
+PS4='+ '
+
+# NLS nuisances.
+LC_ALL=C
+export LC_ALL
+LANGUAGE=C
+export LANGUAGE
+
+# CDPATH.
+(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
+
+if test "x$CONFIG_SHELL" = x; then
+ as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
+ emulate sh
+ NULLCMD=:
+ # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
+ # is contrary to our usage. Disable this feature.
+ alias -g '\${1+\"\$@\"}'='\"\$@\"'
+ setopt NO_GLOB_SUBST
+else
+ case \`(set -o) 2>/dev/null\` in #(
+ *posix*) :
+ set -o posix ;; #(
+ *) :
+ ;;
+esac
+fi
+"
+ as_required="as_fn_return () { (exit \$1); }
+as_fn_success () { as_fn_return 0; }
+as_fn_failure () { as_fn_return 1; }
+as_fn_ret_success () { return 0; }
+as_fn_ret_failure () { return 1; }
+
+exitcode=0
+as_fn_success || { exitcode=1; echo as_fn_success failed.; }
+as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
+as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
+as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
+if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
+
+else
+ exitcode=1; echo positional parameters were not saved.
+fi
+test x\$exitcode = x0 || exit 1"
+ as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
+ as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
+ eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
+ test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1"
+ if (eval "$as_required") 2>/dev/null; then :
+ as_have_required=yes
+else
+ as_have_required=no
+fi
+ if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
+
+else
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+as_found=false
+for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ as_found=:
+ case $as_dir in #(
+ /*)
+ for as_base in sh bash ksh sh5; do
+ # Try only shells that exist, to save several forks.
+ as_shell=$as_dir/$as_base
+ if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
+ { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
+ CONFIG_SHELL=$as_shell as_have_required=yes
+ if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
+ break 2
+fi
+fi
+ done;;
+ esac
+ as_found=false
+done
+$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
+ { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
+ CONFIG_SHELL=$SHELL as_have_required=yes
+fi; }
+IFS=$as_save_IFS
+
+
+ if test "x$CONFIG_SHELL" != x; then :
+ # We cannot yet assume a decent shell, so we have to provide a
+ # neutralization value for shells without unset; and this also
+ # works around shells that cannot unset nonexistent variables.
+ # Preserve -v and -x to the replacement shell.
+ BASH_ENV=/dev/null
+ ENV=/dev/null
+ (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
+ export CONFIG_SHELL
+ case $- in # ((((
+ *v*x* | *x*v* ) as_opts=-vx ;;
+ *v* ) as_opts=-v ;;
+ *x* ) as_opts=-x ;;
+ * ) as_opts= ;;
+ esac
+ exec "$CONFIG_SHELL" $as_opts "$as_myself" ${1+"$@"}
+fi
+
+ if test x$as_have_required = xno; then :
+ $as_echo "$0: This script requires a shell more modern than all"
+ $as_echo "$0: the shells that I found on your system."
+ if test x${ZSH_VERSION+set} = xset ; then
+ $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
+ $as_echo "$0: be upgraded to zsh 4.3.4 or later."
+ else
+ $as_echo "$0: Please tell bug-autoconf@gnu.org about your system,
+$0: including any error possibly output before this
+$0: message. Then install a modern shell, or manually run
+$0: the script under such a shell if you do have one."
+ fi
+ exit 1
+fi
+fi
+fi
+SHELL=${CONFIG_SHELL-/bin/sh}
+export SHELL
+# Unset more variables known to interfere with behavior of common tools.
+CLICOLOR_FORCE= GREP_OPTIONS=
+unset CLICOLOR_FORCE GREP_OPTIONS
+
+## --------------------- ##
+## M4sh Shell Functions. ##
+## --------------------- ##
+# as_fn_unset VAR
+# ---------------
+# Portably unset VAR.
+as_fn_unset ()
+{
+ { eval $1=; unset $1;}
+}
+as_unset=as_fn_unset
+
+# as_fn_set_status STATUS
+# -----------------------
+# Set $? to STATUS, without forking.
+as_fn_set_status ()
+{
+ return $1
+} # as_fn_set_status
+
+# as_fn_exit STATUS
+# -----------------
+# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
+as_fn_exit ()
+{
+ set +e
+ as_fn_set_status $1
+ exit $1
+} # as_fn_exit
+
+# as_fn_mkdir_p
+# -------------
+# Create "$as_dir" as a directory, including parents if necessary.
+as_fn_mkdir_p ()
+{
+
+ case $as_dir in #(
+ -*) as_dir=./$as_dir;;
+ esac
+ test -d "$as_dir" || eval $as_mkdir_p || {
+ as_dirs=
+ while :; do
+ case $as_dir in #(
+ *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
+ *) as_qdir=$as_dir;;
+ esac
+ as_dirs="'$as_qdir' $as_dirs"
+ as_dir=`$as_dirname -- "$as_dir" ||
+$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$as_dir" : 'X\(//\)[^/]' \| \
+ X"$as_dir" : 'X\(//\)$' \| \
+ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$as_dir" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)[^/].*/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+ test -d "$as_dir" && break
+ done
+ test -z "$as_dirs" || eval "mkdir $as_dirs"
+ } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
+
+
+} # as_fn_mkdir_p
+# as_fn_append VAR VALUE
+# ----------------------
+# Append the text in VALUE to the end of the definition contained in VAR. Take
+# advantage of any shell optimizations that allow amortized linear growth over
+# repeated appends, instead of the typical quadratic growth present in naive
+# implementations.
+if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
+ eval 'as_fn_append ()
+ {
+ eval $1+=\$2
+ }'
+else
+ as_fn_append ()
+ {
+ eval $1=\$$1\$2
+ }
+fi # as_fn_append
+
+# as_fn_arith ARG...
+# ------------------
+# Perform arithmetic evaluation on the ARGs, and store the result in the
+# global $as_val. Take advantage of shells that can avoid forks. The arguments
+# must be portable across $(()) and expr.
+if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
+ eval 'as_fn_arith ()
+ {
+ as_val=$(( $* ))
+ }'
+else
+ as_fn_arith ()
+ {
+ as_val=`expr "$@" || test $? -eq 1`
+ }
+fi # as_fn_arith
+
+
+# as_fn_error STATUS ERROR [LINENO LOG_FD]
+# ----------------------------------------
+# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
+# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
+# script with STATUS, using 1 if that was 0.
+as_fn_error ()
+{
+ as_status=$1; test $as_status -eq 0 && as_status=1
+ if test "$4"; then
+ as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
+ fi
+ $as_echo "$as_me: error: $2" >&2
+ as_fn_exit $as_status
+} # as_fn_error
+
+if expr a : '\(a\)' >/dev/null 2>&1 &&
+ test "X`expr 00001 : '.*\(...\)'`" = X001; then
+ as_expr=expr
+else
+ as_expr=false
+fi
+
+if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
+ as_basename=basename
+else
+ as_basename=false
+fi
+
+if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
+ as_dirname=dirname
+else
+ as_dirname=false
+fi
+
+as_me=`$as_basename -- "$0" ||
+$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
+ X"$0" : 'X\(//\)$' \| \
+ X"$0" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X/"$0" |
+ sed '/^.*\/\([^/][^/]*\)\/*$/{
+ s//\1/
+ q
+ }
+ /^X\/\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\/\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+
+# Avoid depending upon Character Ranges.
+as_cr_letters='abcdefghijklmnopqrstuvwxyz'
+as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
+as_cr_Letters=$as_cr_letters$as_cr_LETTERS
+as_cr_digits='0123456789'
+as_cr_alnum=$as_cr_Letters$as_cr_digits
+
+
+ as_lineno_1=$LINENO as_lineno_1a=$LINENO
+ as_lineno_2=$LINENO as_lineno_2a=$LINENO
+ eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
+ test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
+ # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-)
+ sed -n '
+ p
+ /[$]LINENO/=
+ ' <$as_myself |
+ sed '
+ s/[$]LINENO.*/&-/
+ t lineno
+ b
+ :lineno
+ N
+ :loop
+ s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
+ t loop
+ s/-\n.*//
+ ' >$as_me.lineno &&
+ chmod +x "$as_me.lineno" ||
+ { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
+
+ # Don't try to exec as it changes $[0], causing all sort of problems
+ # (the dirname of $[0] is not the place where we might find the
+ # original and so on. Autoconf is especially sensitive to this).
+ . "./$as_me.lineno"
+ # Exit status is that of the last command.
+ exit
+}
+
+ECHO_C= ECHO_N= ECHO_T=
+case `echo -n x` in #(((((
+-n*)
+ case `echo 'xy\c'` in
+ *c*) ECHO_T=' ';; # ECHO_T is single tab character.
+ xy) ECHO_C='\c';;
+ *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
+ ECHO_T=' ';;
+ esac;;
+*)
+ ECHO_N='-n';;
+esac
+
+rm -f conf$$ conf$$.exe conf$$.file
+if test -d conf$$.dir; then
+ rm -f conf$$.dir/conf$$.file
+else
+ rm -f conf$$.dir
+ mkdir conf$$.dir 2>/dev/null
+fi
+if (echo >conf$$.file) 2>/dev/null; then
+ if ln -s conf$$.file conf$$ 2>/dev/null; then
+ as_ln_s='ln -s'
+ # ... but there are two gotchas:
+ # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
+ # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
+ # In both cases, we have to default to `cp -p'.
+ ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
+ as_ln_s='cp -p'
+ elif ln conf$$.file conf$$ 2>/dev/null; then
+ as_ln_s=ln
+ else
+ as_ln_s='cp -p'
+ fi
+else
+ as_ln_s='cp -p'
+fi
+rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
+rmdir conf$$.dir 2>/dev/null
+
+if mkdir -p . 2>/dev/null; then
+ as_mkdir_p='mkdir -p "$as_dir"'
+else
+ test -d ./-p && rmdir ./-p
+ as_mkdir_p=false
+fi
+
+if test -x / >/dev/null 2>&1; then
+ as_test_x='test -x'
+else
+ if ls -dL / >/dev/null 2>&1; then
+ as_ls_L_option=L
+ else
+ as_ls_L_option=
+ fi
+ as_test_x='
+ eval sh -c '\''
+ if test -d "$1"; then
+ test -d "$1/.";
+ else
+ case $1 in #(
+ -*)set "./$1";;
+ esac;
+ case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
+ ???[sx]*):;;*)false;;esac;fi
+ '\'' sh
+ '
+fi
+as_executable_p=$as_test_x
+
+# Sed expression to map a string onto a valid CPP name.
+as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
+
+# Sed expression to map a string onto a valid variable name.
+as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
+
+
+test -n "$DJDIR" || exec 7<&0 </dev/null
+exec 6>&1
+
+# Name of the host.
+# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
+# so uname gets run too.
+ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
+
+#
+# Initializations.
+#
+ac_default_prefix=/usr/local
+ac_clean_files=
+ac_config_libobj_dir=.
+LIBOBJS=
+cross_compiling=no
+subdirs=
+MFLAGS=
+MAKEFLAGS=
+
+# Identity of this package.
+PACKAGE_NAME='newlib'
+PACKAGE_TARNAME='newlib'
+PACKAGE_VERSION='2.4.0'
+PACKAGE_STRING='newlib 2.4.0'
+PACKAGE_BUGREPORT=''
+PACKAGE_URL=''
+
+ac_unique_file="phoenix.c"
+enable_option_checking=no
+ac_subst_vars='LTLIBOBJS
+LIBOBJS
+PHOENIX_MACH_LIB
+subdirs
+sys_dir
+machine_dir
+libm_machine_dir
+lpfx
+aext
+oext
+OBJEXT
+USE_LIBTOOL_FALSE
+USE_LIBTOOL_TRUE
+ELIX_LEVEL_4_FALSE
+ELIX_LEVEL_4_TRUE
+ELIX_LEVEL_3_FALSE
+ELIX_LEVEL_3_TRUE
+ELIX_LEVEL_2_FALSE
+ELIX_LEVEL_2_TRUE
+ELIX_LEVEL_1_FALSE
+ELIX_LEVEL_1_TRUE
+ELIX_LEVEL_0_FALSE
+ELIX_LEVEL_0_TRUE
+LDFLAGS
+NO_INCLUDE_LIST
+NEWLIB_CFLAGS
+CCASFLAGS
+CCAS
+MAINT
+MAINTAINER_MODE_FALSE
+MAINTAINER_MODE_TRUE
+READELF
+RANLIB
+AR
+AS
+am__fastdepCC_FALSE
+am__fastdepCC_TRUE
+CCDEPMODE
+am__nodep
+AMDEPBACKSLASH
+AMDEP_FALSE
+AMDEP_TRUE
+am__quote
+am__include
+DEPDIR
+CC
+am__untar
+am__tar
+AMTAR
+am__leading_dot
+SET_MAKE
+AWK
+mkdir_p
+MKDIR_P
+INSTALL_STRIP_PROGRAM
+STRIP
+install_sh
+MAKEINFO
+AUTOHEADER
+AUTOMAKE
+AUTOCONF
+ACLOCAL
+VERSION
+PACKAGE
+CYGPATH_W
+am__isrc
+INSTALL_DATA
+INSTALL_SCRIPT
+INSTALL_PROGRAM
+host_os
+host_vendor
+host_cpu
+host
+build_os
+build_vendor
+build_cpu
+build
+newlib_basedir
+MAY_SUPPLY_SYSCALLS_FALSE
+MAY_SUPPLY_SYSCALLS_TRUE
+target_alias
+host_alias
+build_alias
+LIBS
+ECHO_T
+ECHO_N
+ECHO_C
+DEFS
+mandir
+localedir
+libdir
+psdir
+pdfdir
+dvidir
+htmldir
+infodir
+docdir
+oldincludedir
+includedir
+localstatedir
+sharedstatedir
+sysconfdir
+datadir
+datarootdir
+libexecdir
+sbindir
+bindir
+program_transform_name
+prefix
+exec_prefix
+PACKAGE_URL
+PACKAGE_BUGREPORT
+PACKAGE_STRING
+PACKAGE_VERSION
+PACKAGE_TARNAME
+PACKAGE_NAME
+PATH_SEPARATOR
+SHELL'
+ac_subst_files=''
+ac_user_opts='
+enable_option_checking
+enable_multilib
+enable_target_optspace
+enable_malloc_debugging
+enable_newlib_multithread
+enable_newlib_iconv
+enable_newlib_elix_level
+enable_newlib_io_float
+enable_newlib_supplied_syscalls
+enable_dependency_tracking
+enable_maintainer_mode
+'
+ ac_precious_vars='build_alias
+host_alias
+target_alias
+CCAS
+CCASFLAGS'
+ac_subdirs_all='machine'
+
+# Initialize some variables set by options.
+ac_init_help=
+ac_init_version=false
+ac_unrecognized_opts=
+ac_unrecognized_sep=
+# The variables have the same names as the options, with
+# dashes changed to underlines.
+cache_file=/dev/null
+exec_prefix=NONE
+no_create=
+no_recursion=
+prefix=NONE
+program_prefix=NONE
+program_suffix=NONE
+program_transform_name=s,x,x,
+silent=
+site=
+srcdir=
+verbose=
+x_includes=NONE
+x_libraries=NONE
+
+# Installation directory options.
+# These are left unexpanded so users can "make install exec_prefix=/foo"
+# and all the variables that are supposed to be based on exec_prefix
+# by default will actually change.
+# Use braces instead of parens because sh, perl, etc. also accept them.
+# (The list follows the same order as the GNU Coding Standards.)
+bindir='${exec_prefix}/bin'
+sbindir='${exec_prefix}/sbin'
+libexecdir='${exec_prefix}/libexec'
+datarootdir='${prefix}/share'
+datadir='${datarootdir}'
+sysconfdir='${prefix}/etc'
+sharedstatedir='${prefix}/com'
+localstatedir='${prefix}/var'
+includedir='${prefix}/include'
+oldincludedir='/usr/include'
+docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
+infodir='${datarootdir}/info'
+htmldir='${docdir}'
+dvidir='${docdir}'
+pdfdir='${docdir}'
+psdir='${docdir}'
+libdir='${exec_prefix}/lib'
+localedir='${datarootdir}/locale'
+mandir='${datarootdir}/man'
+
+ac_prev=
+ac_dashdash=
+for ac_option
+do
+ # If the previous option needs an argument, assign it.
+ if test -n "$ac_prev"; then
+ eval $ac_prev=\$ac_option
+ ac_prev=
+ continue
+ fi
+
+ case $ac_option in
+ *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
+ *=) ac_optarg= ;;
+ *) ac_optarg=yes ;;
+ esac
+
+ # Accept the important Cygnus configure options, so we can diagnose typos.
+
+ case $ac_dashdash$ac_option in
+ --)
+ ac_dashdash=yes ;;
+
+ -bindir | --bindir | --bindi | --bind | --bin | --bi)
+ ac_prev=bindir ;;
+ -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
+ bindir=$ac_optarg ;;
+
+ -build | --build | --buil | --bui | --bu)
+ ac_prev=build_alias ;;
+ -build=* | --build=* | --buil=* | --bui=* | --bu=*)
+ build_alias=$ac_optarg ;;
+
+ -cache-file | --cache-file | --cache-fil | --cache-fi \
+ | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
+ ac_prev=cache_file ;;
+ -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
+ | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
+ cache_file=$ac_optarg ;;
+
+ --config-cache | -C)
+ cache_file=config.cache ;;
+
+ -datadir | --datadir | --datadi | --datad)
+ ac_prev=datadir ;;
+ -datadir=* | --datadir=* | --datadi=* | --datad=*)
+ datadir=$ac_optarg ;;
+
+ -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
+ | --dataroo | --dataro | --datar)
+ ac_prev=datarootdir ;;
+ -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
+ | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
+ datarootdir=$ac_optarg ;;
+
+ -disable-* | --disable-*)
+ ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
+ # Reject names that are not valid shell variable names.
+ expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
+ as_fn_error $? "invalid feature name: $ac_useropt"
+ ac_useropt_orig=$ac_useropt
+ ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
+ case $ac_user_opts in
+ *"
+"enable_$ac_useropt"
+"*) ;;
+ *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
+ ac_unrecognized_sep=', ';;
+ esac
+ eval enable_$ac_useropt=no ;;
+
+ -docdir | --docdir | --docdi | --doc | --do)
+ ac_prev=docdir ;;
+ -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
+ docdir=$ac_optarg ;;
+
+ -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
+ ac_prev=dvidir ;;
+ -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
+ dvidir=$ac_optarg ;;
+
+ -enable-* | --enable-*)
+ ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
+ # Reject names that are not valid shell variable names.
+ expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
+ as_fn_error $? "invalid feature name: $ac_useropt"
+ ac_useropt_orig=$ac_useropt
+ ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
+ case $ac_user_opts in
+ *"
+"enable_$ac_useropt"
+"*) ;;
+ *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
+ ac_unrecognized_sep=', ';;
+ esac
+ eval enable_$ac_useropt=\$ac_optarg ;;
+
+ -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
+ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
+ | --exec | --exe | --ex)
+ ac_prev=exec_prefix ;;
+ -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
+ | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
+ | --exec=* | --exe=* | --ex=*)
+ exec_prefix=$ac_optarg ;;
+
+ -gas | --gas | --ga | --g)
+ # Obsolete; use --with-gas.
+ with_gas=yes ;;
+
+ -help | --help | --hel | --he | -h)
+ ac_init_help=long ;;
+ -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
+ ac_init_help=recursive ;;
+ -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
+ ac_init_help=short ;;
+
+ -host | --host | --hos | --ho)
+ ac_prev=host_alias ;;
+ -host=* | --host=* | --hos=* | --ho=*)
+ host_alias=$ac_optarg ;;
+
+ -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
+ ac_prev=htmldir ;;
+ -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
+ | --ht=*)
+ htmldir=$ac_optarg ;;
+
+ -includedir | --includedir | --includedi | --included | --include \
+ | --includ | --inclu | --incl | --inc)
+ ac_prev=includedir ;;
+ -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
+ | --includ=* | --inclu=* | --incl=* | --inc=*)
+ includedir=$ac_optarg ;;
+
+ -infodir | --infodir | --infodi | --infod | --info | --inf)
+ ac_prev=infodir ;;
+ -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
+ infodir=$ac_optarg ;;
+
+ -libdir | --libdir | --libdi | --libd)
+ ac_prev=libdir ;;
+ -libdir=* | --libdir=* | --libdi=* | --libd=*)
+ libdir=$ac_optarg ;;
+
+ -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
+ | --libexe | --libex | --libe)
+ ac_prev=libexecdir ;;
+ -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
+ | --libexe=* | --libex=* | --libe=*)
+ libexecdir=$ac_optarg ;;
+
+ -localedir | --localedir | --localedi | --localed | --locale)
+ ac_prev=localedir ;;
+ -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
+ localedir=$ac_optarg ;;
+
+ -localstatedir | --localstatedir | --localstatedi | --localstated \
+ | --localstate | --localstat | --localsta | --localst | --locals)
+ ac_prev=localstatedir ;;
+ -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
+ | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
+ localstatedir=$ac_optarg ;;
+
+ -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
+ ac_prev=mandir ;;
+ -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
+ mandir=$ac_optarg ;;
+
+ -nfp | --nfp | --nf)
+ # Obsolete; use --without-fp.
+ with_fp=no ;;
+
+ -no-create | --no-create | --no-creat | --no-crea | --no-cre \
+ | --no-cr | --no-c | -n)
+ no_create=yes ;;
+
+ -no-recursion | --no-recursion | --no-recursio | --no-recursi \
+ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
+ no_recursion=yes ;;
+
+ -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
+ | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
+ | --oldin | --oldi | --old | --ol | --o)
+ ac_prev=oldincludedir ;;
+ -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
+ | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
+ | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
+ oldincludedir=$ac_optarg ;;
+
+ -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
+ ac_prev=prefix ;;
+ -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
+ prefix=$ac_optarg ;;
+
+ -program-prefix | --program-prefix | --program-prefi | --program-pref \
+ | --program-pre | --program-pr | --program-p)
+ ac_prev=program_prefix ;;
+ -program-prefix=* | --program-prefix=* | --program-prefi=* \
+ | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
+ program_prefix=$ac_optarg ;;
+
+ -program-suffix | --program-suffix | --program-suffi | --program-suff \
+ | --program-suf | --program-su | --program-s)
+ ac_prev=program_suffix ;;
+ -program-suffix=* | --program-suffix=* | --program-suffi=* \
+ | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
+ program_suffix=$ac_optarg ;;
+
+ -program-transform-name | --program-transform-name \
+ | --program-transform-nam | --program-transform-na \
+ | --program-transform-n | --program-transform- \
+ | --program-transform | --program-transfor \
+ | --program-transfo | --program-transf \
+ | --program-trans | --program-tran \
+ | --progr-tra | --program-tr | --program-t)
+ ac_prev=program_transform_name ;;
+ -program-transform-name=* | --program-transform-name=* \
+ | --program-transform-nam=* | --program-transform-na=* \
+ | --program-transform-n=* | --program-transform-=* \
+ | --program-transform=* | --program-transfor=* \
+ | --program-transfo=* | --program-transf=* \
+ | --program-trans=* | --program-tran=* \
+ | --progr-tra=* | --program-tr=* | --program-t=*)
+ program_transform_name=$ac_optarg ;;
+
+ -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
+ ac_prev=pdfdir ;;
+ -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
+ pdfdir=$ac_optarg ;;
+
+ -psdir | --psdir | --psdi | --psd | --ps)
+ ac_prev=psdir ;;
+ -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
+ psdir=$ac_optarg ;;
+
+ -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+ | -silent | --silent | --silen | --sile | --sil)
+ silent=yes ;;
+
+ -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
+ ac_prev=sbindir ;;
+ -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
+ | --sbi=* | --sb=*)
+ sbindir=$ac_optarg ;;
+
+ -sharedstatedir | --sharedstatedir | --sharedstatedi \
+ | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
+ | --sharedst | --shareds | --shared | --share | --shar \
+ | --sha | --sh)
+ ac_prev=sharedstatedir ;;
+ -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
+ | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
+ | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
+ | --sha=* | --sh=*)
+ sharedstatedir=$ac_optarg ;;
+
+ -site | --site | --sit)
+ ac_prev=site ;;
+ -site=* | --site=* | --sit=*)
+ site=$ac_optarg ;;
+
+ -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
+ ac_prev=srcdir ;;
+ -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
+ srcdir=$ac_optarg ;;
+
+ -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
+ | --syscon | --sysco | --sysc | --sys | --sy)
+ ac_prev=sysconfdir ;;
+ -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
+ | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
+ sysconfdir=$ac_optarg ;;
+
+ -target | --target | --targe | --targ | --tar | --ta | --t)
+ ac_prev=target_alias ;;
+ -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
+ target_alias=$ac_optarg ;;
+
+ -v | -verbose | --verbose | --verbos | --verbo | --verb)
+ verbose=yes ;;
+
+ -version | --version | --versio | --versi | --vers | -V)
+ ac_init_version=: ;;
+
+ -with-* | --with-*)
+ ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
+ # Reject names that are not valid shell variable names.
+ expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
+ as_fn_error $? "invalid package name: $ac_useropt"
+ ac_useropt_orig=$ac_useropt
+ ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
+ case $ac_user_opts in
+ *"
+"with_$ac_useropt"
+"*) ;;
+ *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
+ ac_unrecognized_sep=', ';;
+ esac
+ eval with_$ac_useropt=\$ac_optarg ;;
+
+ -without-* | --without-*)
+ ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
+ # Reject names that are not valid shell variable names.
+ expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
+ as_fn_error $? "invalid package name: $ac_useropt"
+ ac_useropt_orig=$ac_useropt
+ ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
+ case $ac_user_opts in
+ *"
+"with_$ac_useropt"
+"*) ;;
+ *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
+ ac_unrecognized_sep=', ';;
+ esac
+ eval with_$ac_useropt=no ;;
+
+ --x)
+ # Obsolete; use --with-x.
+ with_x=yes ;;
+
+ -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
+ | --x-incl | --x-inc | --x-in | --x-i)
+ ac_prev=x_includes ;;
+ -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
+ | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
+ x_includes=$ac_optarg ;;
+
+ -x-libraries | --x-libraries | --x-librarie | --x-librari \
+ | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
+ ac_prev=x_libraries ;;
+ -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
+ | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
+ x_libraries=$ac_optarg ;;
+
+ -*) as_fn_error $? "unrecognized option: \`$ac_option'
+Try \`$0 --help' for more information"
+ ;;
+
+ *=*)
+ ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
+ # Reject names that are not valid shell variable names.
+ case $ac_envvar in #(
+ '' | [0-9]* | *[!_$as_cr_alnum]* )
+ as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
+ esac
+ eval $ac_envvar=\$ac_optarg
+ export $ac_envvar ;;
+
+ *)
+ # FIXME: should be removed in autoconf 3.0.
+ $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
+ expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
+ $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
+ : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
+ ;;
+
+ esac
+done
+
+if test -n "$ac_prev"; then
+ ac_option=--`echo $ac_prev | sed 's/_/-/g'`
+ as_fn_error $? "missing argument to $ac_option"
+fi
+
+if test -n "$ac_unrecognized_opts"; then
+ case $enable_option_checking in
+ no) ;;
+ fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
+ *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
+ esac
+fi
+
+# Check all directory arguments for consistency.
+for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
+ datadir sysconfdir sharedstatedir localstatedir includedir \
+ oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
+ libdir localedir mandir
+do
+ eval ac_val=\$$ac_var
+ # Remove trailing slashes.
+ case $ac_val in
+ */ )
+ ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
+ eval $ac_var=\$ac_val;;
+ esac
+ # Be sure to have absolute directory names.
+ case $ac_val in
+ [\\/$]* | ?:[\\/]* ) continue;;
+ NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
+ esac
+ as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
+done
+
+# There might be people who depend on the old broken behavior: `$host'
+# used to hold the argument of --host etc.
+# FIXME: To remove some day.
+build=$build_alias
+host=$host_alias
+target=$target_alias
+
+# FIXME: To remove some day.
+if test "x$host_alias" != x; then
+ if test "x$build_alias" = x; then
+ cross_compiling=maybe
+ $as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host.
+ If a cross compiler is detected then cross compile mode will be used" >&2
+ elif test "x$build_alias" != "x$host_alias"; then
+ cross_compiling=yes
+ fi
+fi
+
+ac_tool_prefix=
+test -n "$host_alias" && ac_tool_prefix=$host_alias-
+
+test "$silent" = yes && exec 6>/dev/null
+
+
+ac_pwd=`pwd` && test -n "$ac_pwd" &&
+ac_ls_di=`ls -di .` &&
+ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
+ as_fn_error $? "working directory cannot be determined"
+test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
+ as_fn_error $? "pwd does not report name of working directory"
+
+
+# Find the source files, if location was not specified.
+if test -z "$srcdir"; then
+ ac_srcdir_defaulted=yes
+ # Try the directory containing this script, then the parent directory.
+ ac_confdir=`$as_dirname -- "$as_myself" ||
+$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$as_myself" : 'X\(//\)[^/]' \| \
+ X"$as_myself" : 'X\(//\)$' \| \
+ X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$as_myself" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)[^/].*/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+ srcdir=$ac_confdir
+ if test ! -r "$srcdir/$ac_unique_file"; then
+ srcdir=..
+ fi
+else
+ ac_srcdir_defaulted=no
+fi
+if test ! -r "$srcdir/$ac_unique_file"; then
+ test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
+ as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
+fi
+ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
+ac_abs_confdir=`(
+ cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
+ pwd)`
+# When building in place, set srcdir=.
+if test "$ac_abs_confdir" = "$ac_pwd"; then
+ srcdir=.
+fi
+# Remove unnecessary trailing slashes from srcdir.
+# Double slashes in file names in object file debugging info
+# mess up M-x gdb in Emacs.
+case $srcdir in
+*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
+esac
+for ac_var in $ac_precious_vars; do
+ eval ac_env_${ac_var}_set=\${${ac_var}+set}
+ eval ac_env_${ac_var}_value=\$${ac_var}
+ eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
+ eval ac_cv_env_${ac_var}_value=\$${ac_var}
+done
+
+#
+# Report the --help message.
+#
+if test "$ac_init_help" = "long"; then
+ # Omit some internal or obsolete options to make the list less imposing.
+ # This message is too long to be a string in the A/UX 3.1 sh.
+ cat <<_ACEOF
+\`configure' configures newlib 2.4.0 to adapt to many kinds of systems.
+
+Usage: $0 [OPTION]... [VAR=VALUE]...
+
+To assign environment variables (e.g., CC, CFLAGS...), specify them as
+VAR=VALUE. See below for descriptions of some of the useful variables.
+
+Defaults for the options are specified in brackets.
+
+Configuration:
+ -h, --help display this help and exit
+ --help=short display options specific to this package
+ --help=recursive display the short help of all the included packages
+ -V, --version display version information and exit
+ -q, --quiet, --silent do not print \`checking ...' messages
+ --cache-file=FILE cache test results in FILE [disabled]
+ -C, --config-cache alias for \`--cache-file=config.cache'
+ -n, --no-create do not create output files
+ --srcdir=DIR find the sources in DIR [configure dir or \`..']
+
+Installation directories:
+ --prefix=PREFIX install architecture-independent files in PREFIX
+ [$ac_default_prefix]
+ --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
+ [PREFIX]
+
+By default, \`make install' will install all the files in
+\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
+an installation prefix other than \`$ac_default_prefix' using \`--prefix',
+for instance \`--prefix=\$HOME'.
+
+For better control, use the options below.
+
+Fine tuning of the installation directories:
+ --bindir=DIR user executables [EPREFIX/bin]
+ --sbindir=DIR system admin executables [EPREFIX/sbin]
+ --libexecdir=DIR program executables [EPREFIX/libexec]
+ --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
+ --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
+ --localstatedir=DIR modifiable single-machine data [PREFIX/var]
+ --libdir=DIR object code libraries [EPREFIX/lib]
+ --includedir=DIR C header files [PREFIX/include]
+ --oldincludedir=DIR C header files for non-gcc [/usr/include]
+ --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
+ --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
+ --infodir=DIR info documentation [DATAROOTDIR/info]
+ --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
+ --mandir=DIR man documentation [DATAROOTDIR/man]
+ --docdir=DIR documentation root [DATAROOTDIR/doc/newlib]
+ --htmldir=DIR html documentation [DOCDIR]
+ --dvidir=DIR dvi documentation [DOCDIR]
+ --pdfdir=DIR pdf documentation [DOCDIR]
+ --psdir=DIR ps documentation [DOCDIR]
+_ACEOF
+
+ cat <<\_ACEOF
+
+Program names:
+ --program-prefix=PREFIX prepend PREFIX to installed program names
+ --program-suffix=SUFFIX append SUFFIX to installed program names
+ --program-transform-name=PROGRAM run sed PROGRAM on installed program names
+
+System types:
+ --build=BUILD configure for building on BUILD [guessed]
+ --host=HOST cross-compile to build programs to run on HOST [BUILD]
+_ACEOF
+fi
+
+if test -n "$ac_init_help"; then
+ case $ac_init_help in
+ short | recursive ) echo "Configuration of newlib 2.4.0:";;
+ esac
+ cat <<\_ACEOF
+
+Optional Features:
+ --disable-option-checking ignore unrecognized --enable/--with options
+ --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
+ --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
+ --enable-multilib build many library versions (default)
+ --enable-target-optspace optimize for space
+ --enable-malloc-debugging indicate malloc debugging requested
+ --enable-newlib-multithread enable support for multiple threads
+ --enable-newlib-iconv enable iconv library support
+ --enable-newlib-elix-level supply desired elix library level (1-4)
+ --disable-newlib-io-float disable printf/scanf family float support
+ --disable-newlib-supplied-syscalls disable newlib from supplying syscalls
+ --disable-dependency-tracking speeds up one-time build
+ --enable-dependency-tracking do not reject slow dependency extractors
+ --enable-maintainer-mode enable make rules and dependencies not useful
+ (and sometimes confusing) to the casual installer
+
+Some influential environment variables:
+ CCAS assembler compiler command (defaults to CC)
+ CCASFLAGS assembler compiler flags (defaults to CFLAGS)
+
+Use these variables to override the choices made by `configure' or to help
+it to find libraries and programs with nonstandard names/locations.
+
+Report bugs to the package provider.
+_ACEOF
+ac_status=$?
+fi
+
+if test "$ac_init_help" = "recursive"; then
+ # If there are subdirs, report their specific --help.
+ for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
+ test -d "$ac_dir" ||
+ { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
+ continue
+ ac_builddir=.
+
+case "$ac_dir" in
+.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
+*)
+ ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
+ # A ".." for each directory in $ac_dir_suffix.
+ ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
+ case $ac_top_builddir_sub in
+ "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
+ *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
+ esac ;;
+esac
+ac_abs_top_builddir=$ac_pwd
+ac_abs_builddir=$ac_pwd$ac_dir_suffix
+# for backward compatibility:
+ac_top_builddir=$ac_top_build_prefix
+
+case $srcdir in
+ .) # We are building in place.
+ ac_srcdir=.
+ ac_top_srcdir=$ac_top_builddir_sub
+ ac_abs_top_srcdir=$ac_pwd ;;
+ [\\/]* | ?:[\\/]* ) # Absolute name.
+ ac_srcdir=$srcdir$ac_dir_suffix;
+ ac_top_srcdir=$srcdir
+ ac_abs_top_srcdir=$srcdir ;;
+ *) # Relative name.
+ ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
+ ac_top_srcdir=$ac_top_build_prefix$srcdir
+ ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
+esac
+ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
+
+ cd "$ac_dir" || { ac_status=$?; continue; }
+ # Check for guested configure.
+ if test -f "$ac_srcdir/configure.gnu"; then
+ echo &&
+ $SHELL "$ac_srcdir/configure.gnu" --help=recursive
+ elif test -f "$ac_srcdir/configure"; then
+ echo &&
+ $SHELL "$ac_srcdir/configure" --help=recursive
+ else
+ $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
+ fi || ac_status=$?
+ cd "$ac_pwd" || { ac_status=$?; break; }
+ done
+fi
+
+test -n "$ac_init_help" && exit $ac_status
+if $ac_init_version; then
+ cat <<\_ACEOF
+newlib configure 2.4.0
+generated by GNU Autoconf 2.68
+
+Copyright (C) 2010 Free Software Foundation, Inc.
+This configure script is free software; the Free Software Foundation
+gives unlimited permission to copy, distribute and modify it.
+_ACEOF
+ exit
+fi
+
+## ------------------------ ##
+## Autoconf initialization. ##
+## ------------------------ ##
+
+# ac_fn_c_try_compile LINENO
+# --------------------------
+# Try to compile conftest.$ac_ext, and return whether this succeeded.
+ac_fn_c_try_compile ()
+{
+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ rm -f conftest.$ac_objext
+ if { { ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_compile") 2>conftest.err
+ ac_status=$?
+ if test -s conftest.err; then
+ grep -v '^ *+' conftest.err >conftest.er1
+ cat conftest.er1 >&5
+ mv -f conftest.er1 conftest.err
+ fi
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then :
+ ac_retval=0
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_retval=1
+fi
+ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+ as_fn_set_status $ac_retval
+
+} # ac_fn_c_try_compile
+cat >config.log <<_ACEOF
+This file contains any messages produced by compilers while
+running configure, to aid debugging if configure makes a mistake.
+
+It was created by newlib $as_me 2.4.0, which was
+generated by GNU Autoconf 2.68. Invocation command line was
+
+ $ $0 $@
+
+_ACEOF
+exec 5>>config.log
+{
+cat <<_ASUNAME
+## --------- ##
+## Platform. ##
+## --------- ##
+
+hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
+uname -m = `(uname -m) 2>/dev/null || echo unknown`
+uname -r = `(uname -r) 2>/dev/null || echo unknown`
+uname -s = `(uname -s) 2>/dev/null || echo unknown`
+uname -v = `(uname -v) 2>/dev/null || echo unknown`
+
+/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
+/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
+
+/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
+/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
+/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
+/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
+/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
+/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
+/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
+
+_ASUNAME
+
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ $as_echo "PATH: $as_dir"
+ done
+IFS=$as_save_IFS
+
+} >&5
+
+cat >&5 <<_ACEOF
+
+
+## ----------- ##
+## Core tests. ##
+## ----------- ##
+
+_ACEOF
+
+
+# Keep a trace of the command line.
+# Strip out --no-create and --no-recursion so they do not pile up.
+# Strip out --silent because we don't want to record it for future runs.
+# Also quote any args containing shell meta-characters.
+# Make two passes to allow for proper duplicate-argument suppression.
+ac_configure_args=
+ac_configure_args0=
+ac_configure_args1=
+ac_must_keep_next=false
+for ac_pass in 1 2
+do
+ for ac_arg
+ do
+ case $ac_arg in
+ -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
+ -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+ | -silent | --silent | --silen | --sile | --sil)
+ continue ;;
+ *\'*)
+ ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
+ esac
+ case $ac_pass in
+ 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
+ 2)
+ as_fn_append ac_configure_args1 " '$ac_arg'"
+ if test $ac_must_keep_next = true; then
+ ac_must_keep_next=false # Got value, back to normal.
+ else
+ case $ac_arg in
+ *=* | --config-cache | -C | -disable-* | --disable-* \
+ | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
+ | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
+ | -with-* | --with-* | -without-* | --without-* | --x)
+ case "$ac_configure_args0 " in
+ "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
+ esac
+ ;;
+ -* ) ac_must_keep_next=true ;;
+ esac
+ fi
+ as_fn_append ac_configure_args " '$ac_arg'"
+ ;;
+ esac
+ done
+done
+{ ac_configure_args0=; unset ac_configure_args0;}
+{ ac_configure_args1=; unset ac_configure_args1;}
+
+# When interrupted or exit'd, cleanup temporary files, and complete
+# config.log. We remove comments because anyway the quotes in there
+# would cause problems or look ugly.
+# WARNING: Use '\'' to represent an apostrophe within the trap.
+# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
+trap 'exit_status=$?
+ # Save into config.log some information that might help in debugging.
+ {
+ echo
+
+ $as_echo "## ---------------- ##
+## Cache variables. ##
+## ---------------- ##"
+ echo
+ # The following way of writing the cache mishandles newlines in values,
+(
+ for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
+ eval ac_val=\$$ac_var
+ case $ac_val in #(
+ *${as_nl}*)
+ case $ac_var in #(
+ *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
+$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
+ esac
+ case $ac_var in #(
+ _ | IFS | as_nl) ;; #(
+ BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
+ *) { eval $ac_var=; unset $ac_var;} ;;
+ esac ;;
+ esac
+ done
+ (set) 2>&1 |
+ case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
+ *${as_nl}ac_space=\ *)
+ sed -n \
+ "s/'\''/'\''\\\\'\'''\''/g;
+ s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
+ ;; #(
+ *)
+ sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
+ ;;
+ esac |
+ sort
+)
+ echo
+
+ $as_echo "## ----------------- ##
+## Output variables. ##
+## ----------------- ##"
+ echo
+ for ac_var in $ac_subst_vars
+ do
+ eval ac_val=\$$ac_var
+ case $ac_val in
+ *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
+ esac
+ $as_echo "$ac_var='\''$ac_val'\''"
+ done | sort
+ echo
+
+ if test -n "$ac_subst_files"; then
+ $as_echo "## ------------------- ##
+## File substitutions. ##
+## ------------------- ##"
+ echo
+ for ac_var in $ac_subst_files
+ do
+ eval ac_val=\$$ac_var
+ case $ac_val in
+ *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
+ esac
+ $as_echo "$ac_var='\''$ac_val'\''"
+ done | sort
+ echo
+ fi
+
+ if test -s confdefs.h; then
+ $as_echo "## ----------- ##
+## confdefs.h. ##
+## ----------- ##"
+ echo
+ cat confdefs.h
+ echo
+ fi
+ test "$ac_signal" != 0 &&
+ $as_echo "$as_me: caught signal $ac_signal"
+ $as_echo "$as_me: exit $exit_status"
+ } >&5
+ rm -f core *.core core.conftest.* &&
+ rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
+ exit $exit_status
+' 0
+for ac_signal in 1 2 13 15; do
+ trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
+done
+ac_signal=0
+
+# confdefs.h avoids OS command line length limits that DEFS can exceed.
+rm -f -r conftest* confdefs.h
+
+$as_echo "/* confdefs.h */" > confdefs.h
+
+# Predefined preprocessor variables.
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_NAME "$PACKAGE_NAME"
+_ACEOF
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
+_ACEOF
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_VERSION "$PACKAGE_VERSION"
+_ACEOF
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_STRING "$PACKAGE_STRING"
+_ACEOF
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
+_ACEOF
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_URL "$PACKAGE_URL"
+_ACEOF
+
+
+# Let the site file select an alternate cache file if it wants to.
+# Prefer an explicitly selected file to automatically selected ones.
+ac_site_file1=NONE
+ac_site_file2=NONE
+if test -n "$CONFIG_SITE"; then
+ # We do not want a PATH search for config.site.
+ case $CONFIG_SITE in #((
+ -*) ac_site_file1=./$CONFIG_SITE;;
+ */*) ac_site_file1=$CONFIG_SITE;;
+ *) ac_site_file1=./$CONFIG_SITE;;
+ esac
+elif test "x$prefix" != xNONE; then
+ ac_site_file1=$prefix/share/config.site
+ ac_site_file2=$prefix/etc/config.site
+else
+ ac_site_file1=$ac_default_prefix/share/config.site
+ ac_site_file2=$ac_default_prefix/etc/config.site
+fi
+for ac_site_file in "$ac_site_file1" "$ac_site_file2"
+do
+ test "x$ac_site_file" = xNONE && continue
+ if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
+$as_echo "$as_me: loading site script $ac_site_file" >&6;}
+ sed 's/^/| /' "$ac_site_file" >&5
+ . "$ac_site_file" \
+ || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "failed to load site script $ac_site_file
+See \`config.log' for more details" "$LINENO" 5; }
+ fi
+done
+
+if test -r "$cache_file"; then
+ # Some versions of bash will fail to source /dev/null (special files
+ # actually), so we avoid doing that. DJGPP emulates it as a regular file.
+ if test /dev/null != "$cache_file" && test -f "$cache_file"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
+$as_echo "$as_me: loading cache $cache_file" >&6;}
+ case $cache_file in
+ [\\/]* | ?:[\\/]* ) . "$cache_file";;
+ *) . "./$cache_file";;
+ esac
+ fi
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
+$as_echo "$as_me: creating cache $cache_file" >&6;}
+ >$cache_file
+fi
+
+# Check that the precious variables saved in the cache have kept the same
+# value.
+ac_cache_corrupted=false
+for ac_var in $ac_precious_vars; do
+ eval ac_old_set=\$ac_cv_env_${ac_var}_set
+ eval ac_new_set=\$ac_env_${ac_var}_set
+ eval ac_old_val=\$ac_cv_env_${ac_var}_value
+ eval ac_new_val=\$ac_env_${ac_var}_value
+ case $ac_old_set,$ac_new_set in
+ set,)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
+$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
+ ac_cache_corrupted=: ;;
+ ,set)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
+$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
+ ac_cache_corrupted=: ;;
+ ,);;
+ *)
+ if test "x$ac_old_val" != "x$ac_new_val"; then
+ # differences in whitespace do not lead to failure.
+ ac_old_val_w=`echo x $ac_old_val`
+ ac_new_val_w=`echo x $ac_new_val`
+ if test "$ac_old_val_w" != "$ac_new_val_w"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
+$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
+ ac_cache_corrupted=:
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
+$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
+ eval $ac_var=\$ac_old_val
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
+$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
+$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
+ fi;;
+ esac
+ # Pass precious variables to config.status.
+ if test "$ac_new_set" = set; then
+ case $ac_new_val in
+ *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
+ *) ac_arg=$ac_var=$ac_new_val ;;
+ esac
+ case " $ac_configure_args " in
+ *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
+ *) as_fn_append ac_configure_args " '$ac_arg'" ;;
+ esac
+ fi
+done
+if $ac_cache_corrupted; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
+$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
+ as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
+fi
+## -------------------- ##
+## Main body of script. ##
+## -------------------- ##
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+
+
+ac_aux_dir=
+for ac_dir in ../../../.. "$srcdir"/../../../..; do
+ if test -f "$ac_dir/install-sh"; then
+ ac_aux_dir=$ac_dir
+ ac_install_sh="$ac_aux_dir/install-sh -c"
+ break
+ elif test -f "$ac_dir/install.sh"; then
+ ac_aux_dir=$ac_dir
+ ac_install_sh="$ac_aux_dir/install.sh -c"
+ break
+ elif test -f "$ac_dir/shtool"; then
+ ac_aux_dir=$ac_dir
+ ac_install_sh="$ac_aux_dir/shtool install -c"
+ break
+ fi
+done
+if test -z "$ac_aux_dir"; then
+ as_fn_error $? "cannot find install-sh, install.sh, or shtool in ../../../.. \"$srcdir\"/../../../.." "$LINENO" 5
+fi
+
+# These three variables are undocumented and unsupported,
+# and are intended to be withdrawn in a future Autoconf release.
+# They can cause serious problems if a builder's source tree is in a directory
+# whose full name contains unusual characters.
+ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
+ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
+ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
+
+
+
+
+# Make sure we can run config.sub.
+$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
+ as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
+$as_echo_n "checking build system type... " >&6; }
+if ${ac_cv_build+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_build_alias=$build_alias
+test "x$ac_build_alias" = x &&
+ ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
+test "x$ac_build_alias" = x &&
+ as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
+ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
+ as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
+$as_echo "$ac_cv_build" >&6; }
+case $ac_cv_build in
+*-*-*) ;;
+*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
+esac
+build=$ac_cv_build
+ac_save_IFS=$IFS; IFS='-'
+set x $ac_cv_build
+shift
+build_cpu=$1
+build_vendor=$2
+shift; shift
+# Remember, the first character of IFS is used to create $*,
+# except with old shells:
+build_os=$*
+IFS=$ac_save_IFS
+case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
+$as_echo_n "checking host system type... " >&6; }
+if ${ac_cv_host+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test "x$host_alias" = x; then
+ ac_cv_host=$ac_cv_build
+else
+ ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
+ as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
+$as_echo "$ac_cv_host" >&6; }
+case $ac_cv_host in
+*-*-*) ;;
+*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
+esac
+host=$ac_cv_host
+ac_save_IFS=$IFS; IFS='-'
+set x $ac_cv_host
+shift
+host_cpu=$1
+host_vendor=$2
+shift; shift
+# Remember, the first character of IFS is used to create $*,
+# except with old shells:
+host_os=$*
+IFS=$ac_save_IFS
+case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
+
+
+am__api_version='1.11'
+
+# Find a good install program. We prefer a C program (faster),
+# so one script is as good as another. But avoid the broken or
+# incompatible versions:
+# SysV /etc/install, /usr/sbin/install
+# SunOS /usr/etc/install
+# IRIX /sbin/install
+# AIX /bin/install
+# AmigaOS /C/install, which installs bootblocks on floppy discs
+# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
+# AFS /usr/afsws/bin/install, which mishandles nonexistent args
+# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
+# OS/2's system install, which has a completely different semantic
+# ./install, which can be erroneously created by make from ./install.sh.
+# Reject install programs that cannot install multiple files.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
+$as_echo_n "checking for a BSD-compatible install... " >&6; }
+if test -z "$INSTALL"; then
+if ${ac_cv_path_install+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ # Account for people who put trailing slashes in PATH elements.
+case $as_dir/ in #((
+ ./ | .// | /[cC]/* | \
+ /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
+ ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
+ /usr/ucb/* ) ;;
+ *)
+ # OSF1 and SCO ODT 3.0 have their own names for install.
+ # Don't use installbsd from OSF since it installs stuff as root
+ # by default.
+ for ac_prog in ginstall scoinst install; do
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
+ if test $ac_prog = install &&
+ grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
+ # AIX install. It has an incompatible calling convention.
+ :
+ elif test $ac_prog = install &&
+ grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
+ # program-specific install script used by HP pwplus--don't use.
+ :
+ else
+ rm -rf conftest.one conftest.two conftest.dir
+ echo one > conftest.one
+ echo two > conftest.two
+ mkdir conftest.dir
+ if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
+ test -s conftest.one && test -s conftest.two &&
+ test -s conftest.dir/conftest.one &&
+ test -s conftest.dir/conftest.two
+ then
+ ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
+ break 3
+ fi
+ fi
+ fi
+ done
+ done
+ ;;
+esac
+
+ done
+IFS=$as_save_IFS
+
+rm -rf conftest.one conftest.two conftest.dir
+
+fi
+ if test "${ac_cv_path_install+set}" = set; then
+ INSTALL=$ac_cv_path_install
+ else
+ # As a last resort, use the slow shell script. Don't cache a
+ # value for INSTALL within a source directory, because that will
+ # break other packages using the cache if that directory is
+ # removed, or if the value is a relative name.
+ INSTALL=$ac_install_sh
+ fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
+$as_echo "$INSTALL" >&6; }
+
+# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
+# It thinks the first close brace ends the variable substitution.
+test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
+
+test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
+
+test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5
+$as_echo_n "checking whether build environment is sane... " >&6; }
+# Just in case
+sleep 1
+echo timestamp > conftest.file
+# Reject unsafe characters in $srcdir or the absolute working directory
+# name. Accept space and tab only in the latter.
+am_lf='
+'
+case `pwd` in
+ *[\\\"\#\$\&\'\`$am_lf]*)
+ as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5;;
+esac
+case $srcdir in
+ *[\\\"\#\$\&\'\`$am_lf\ \ ]*)
+ as_fn_error $? "unsafe srcdir value: \`$srcdir'" "$LINENO" 5;;
+esac
+
+# Do `set' in a subshell so we don't clobber the current shell's
+# arguments. Must try -L first in case configure is actually a
+# symlink; some systems play weird games with the mod time of symlinks
+# (eg FreeBSD returns the mod time of the symlink's containing
+# directory).
+if (
+ set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
+ if test "$*" = "X"; then
+ # -L didn't work.
+ set X `ls -t "$srcdir/configure" conftest.file`
+ fi
+ rm -f conftest.file
+ if test "$*" != "X $srcdir/configure conftest.file" \
+ && test "$*" != "X conftest.file $srcdir/configure"; then
+
+ # If neither matched, then we have a broken ls. This can happen
+ # if, for instance, CONFIG_SHELL is bash and it inherits a
+ # broken ls alias from the environment. This has actually
+ # happened. Such a system could not be considered "sane".
+ as_fn_error $? "ls -t appears to fail. Make sure there is not a broken
+alias in your environment" "$LINENO" 5
+ fi
+
+ test "$2" = conftest.file
+ )
+then
+ # Ok.
+ :
+else
+ as_fn_error $? "newly created file is older than distributed files!
+Check your system clock" "$LINENO" 5
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+test "$program_prefix" != NONE &&
+ program_transform_name="s&^&$program_prefix&;$program_transform_name"
+# Use a double $ so make ignores it.
+test "$program_suffix" != NONE &&
+ program_transform_name="s&\$&$program_suffix&;$program_transform_name"
+# Double any \ or $.
+# By default was `s,x,x', remove it if useless.
+ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
+program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"`
+
+# expand $ac_aux_dir to an absolute path
+am_aux_dir=`cd $ac_aux_dir && pwd`
+
+if test x"${MISSING+set}" != xset; then
+ case $am_aux_dir in
+ *\ * | *\ *)
+ MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
+ *)
+ MISSING="\${SHELL} $am_aux_dir/missing" ;;
+ esac
+fi
+# Use eval to expand $SHELL
+if eval "$MISSING --run true"; then
+ am_missing_run="$MISSING --run "
+else
+ am_missing_run=
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`missing' script is too old or missing" >&5
+$as_echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;}
+fi
+
+if test x"${install_sh}" != xset; then
+ case $am_aux_dir in
+ *\ * | *\ *)
+ install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
+ *)
+ install_sh="\${SHELL} $am_aux_dir/install-sh"
+ esac
+fi
+
+# Installed binaries are usually stripped using `strip' when the user
+# run `make install-strip'. However `strip' might not be the right
+# tool to use in cross-compilation environments, therefore Automake
+# will honor the `STRIP' environment variable to overrule this program.
+if test "$cross_compiling" != no; then
+ if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
+set dummy ${ac_tool_prefix}strip; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_STRIP+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$STRIP"; then
+ ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_STRIP="${ac_tool_prefix}strip"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+STRIP=$ac_cv_prog_STRIP
+if test -n "$STRIP"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
+$as_echo "$STRIP" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_STRIP"; then
+ ac_ct_STRIP=$STRIP
+ # Extract the first word of "strip", so it can be a program name with args.
+set dummy strip; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_ct_STRIP"; then
+ ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_ac_ct_STRIP="strip"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
+if test -n "$ac_ct_STRIP"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
+$as_echo "$ac_ct_STRIP" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+ if test "x$ac_ct_STRIP" = x; then
+ STRIP=":"
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ STRIP=$ac_ct_STRIP
+ fi
+else
+ STRIP="$ac_cv_prog_STRIP"
+fi
+
+fi
+INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
+$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
+if test -z "$MKDIR_P"; then
+ if ${ac_cv_path_mkdir+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_prog in mkdir gmkdir; do
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; } || continue
+ case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
+ 'mkdir (GNU coreutils) '* | \
+ 'mkdir (coreutils) '* | \
+ 'mkdir (fileutils) '4.1*)
+ ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
+ break 3;;
+ esac
+ done
+ done
+ done
+IFS=$as_save_IFS
+
+fi
+
+ test -d ./--version && rmdir ./--version
+ if test "${ac_cv_path_mkdir+set}" = set; then
+ MKDIR_P="$ac_cv_path_mkdir -p"
+ else
+ # As a last resort, use the slow shell script. Don't cache a
+ # value for MKDIR_P within a source directory, because that will
+ # break other packages using the cache if that directory is
+ # removed, or if the value is a relative name.
+ MKDIR_P="$ac_install_sh -d"
+ fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
+$as_echo "$MKDIR_P" >&6; }
+
+mkdir_p="$MKDIR_P"
+case $mkdir_p in
+ [\\/$]* | ?:[\\/]*) ;;
+ */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
+esac
+
+for ac_prog in gawk mawk nawk awk
+do
+ # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_AWK+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$AWK"; then
+ ac_cv_prog_AWK="$AWK" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_AWK="$ac_prog"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+AWK=$ac_cv_prog_AWK
+if test -n "$AWK"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
+$as_echo "$AWK" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+ test -n "$AWK" && break
+done
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
+$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
+set x ${MAKE-make}
+ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
+if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat >conftest.make <<\_ACEOF
+SHELL = /bin/sh
+all:
+ @echo '@@@%%%=$(MAKE)=@@@%%%'
+_ACEOF
+# GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
+case `${MAKE-make} -f conftest.make 2>/dev/null` in
+ *@@@%%%=?*=@@@%%%*)
+ eval ac_cv_prog_make_${ac_make}_set=yes;;
+ *)
+ eval ac_cv_prog_make_${ac_make}_set=no;;
+esac
+rm -f conftest.make
+fi
+if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+ SET_MAKE=
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+ SET_MAKE="MAKE=${MAKE-make}"
+fi
+
+rm -rf .tst 2>/dev/null
+mkdir .tst 2>/dev/null
+if test -d .tst; then
+ am__leading_dot=.
+else
+ am__leading_dot=_
+fi
+rmdir .tst 2>/dev/null
+
+DEPDIR="${am__leading_dot}deps"
+
+ac_config_commands="$ac_config_commands depfiles"
+
+
+am_make=${MAKE-make}
+cat > confinc << 'END'
+am__doit:
+ @echo this is the am__doit target
+.PHONY: am__doit
+END
+# If we don't find an include directive, just comment out the code.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5
+$as_echo_n "checking for style of include used by $am_make... " >&6; }
+am__include="#"
+am__quote=
+_am_result=none
+# First try GNU make style include.
+echo "include confinc" > confmf
+# Ignore all kinds of additional output from `make'.
+case `$am_make -s -f confmf 2> /dev/null` in #(
+*the\ am__doit\ target*)
+ am__include=include
+ am__quote=
+ _am_result=GNU
+ ;;
+esac
+# Now try BSD make style include.
+if test "$am__include" = "#"; then
+ echo '.include "confinc"' > confmf
+ case `$am_make -s -f confmf 2> /dev/null` in #(
+ *the\ am__doit\ target*)
+ am__include=.include
+ am__quote="\""
+ _am_result=BSD
+ ;;
+ esac
+fi
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5
+$as_echo "$_am_result" >&6; }
+rm -f confinc confmf
+
+# Check whether --enable-dependency-tracking was given.
+if test "${enable_dependency_tracking+set}" = set; then :
+ enableval=$enable_dependency_tracking;
+fi
+
+if test "x$enable_dependency_tracking" != xno; then
+ am_depcomp="$ac_aux_dir/depcomp"
+ AMDEPBACKSLASH='\'
+ am__nodep='_no'
+fi
+ if test "x$enable_dependency_tracking" != xno; then
+ AMDEP_TRUE=
+ AMDEP_FALSE='#'
+else
+ AMDEP_TRUE='#'
+ AMDEP_FALSE=
+fi
+
+
+
+# Check whether --enable-multilib was given.
+if test "${enable_multilib+set}" = set; then :
+ enableval=$enable_multilib; case "${enableval}" in
+ yes) multilib=yes ;;
+ no) multilib=no ;;
+ *) as_fn_error $? "bad value ${enableval} for multilib option" "$LINENO" 5 ;;
+ esac
+else
+ multilib=yes
+fi
+
+# Check whether --enable-target-optspace was given.
+if test "${enable_target_optspace+set}" = set; then :
+ enableval=$enable_target_optspace; case "${enableval}" in
+ yes) target_optspace=yes ;;
+ no) target_optspace=no ;;
+ *) as_fn_error $? "bad value ${enableval} for target-optspace option" "$LINENO" 5 ;;
+ esac
+else
+ target_optspace=
+fi
+
+# Check whether --enable-malloc-debugging was given.
+if test "${enable_malloc_debugging+set}" = set; then :
+ enableval=$enable_malloc_debugging; case "${enableval}" in
+ yes) malloc_debugging=yes ;;
+ no) malloc_debugging=no ;;
+ *) as_fn_error $? "bad value ${enableval} for malloc-debugging option" "$LINENO" 5 ;;
+ esac
+else
+ malloc_debugging=
+fi
+
+# Check whether --enable-newlib-multithread was given.
+if test "${enable_newlib_multithread+set}" = set; then :
+ enableval=$enable_newlib_multithread; case "${enableval}" in
+ yes) newlib_multithread=yes ;;
+ no) newlib_multithread=no ;;
+ *) as_fn_error $? "bad value ${enableval} for newlib-multithread option" "$LINENO" 5 ;;
+ esac
+else
+ newlib_multithread=yes
+fi
+
+# Check whether --enable-newlib-iconv was given.
+if test "${enable_newlib_iconv+set}" = set; then :
+ enableval=$enable_newlib_iconv; if test "${newlib_iconv+set}" != set; then
+ case "${enableval}" in
+ yes) newlib_iconv=yes ;;
+ no) newlib_iconv=no ;;
+ *) as_fn_error $? "bad value ${enableval} for newlib-iconv option" "$LINENO" 5 ;;
+ esac
+ fi
+else
+ newlib_iconv=${newlib_iconv}
+fi
+
+# Check whether --enable-newlib-elix-level was given.
+if test "${enable_newlib_elix_level+set}" = set; then :
+ enableval=$enable_newlib_elix_level; case "${enableval}" in
+ 0) newlib_elix_level=0 ;;
+ 1) newlib_elix_level=1 ;;
+ 2) newlib_elix_level=2 ;;
+ 3) newlib_elix_level=3 ;;
+ 4) newlib_elix_level=4 ;;
+ *) as_fn_error $? "bad value ${enableval} for newlib-elix-level option" "$LINENO" 5 ;;
+ esac
+else
+ newlib_elix_level=0
+fi
+
+# Check whether --enable-newlib-io-float was given.
+if test "${enable_newlib_io_float+set}" = set; then :
+ enableval=$enable_newlib_io_float; case "${enableval}" in
+ yes) newlib_io_float=yes ;;
+ no) newlib_io_float=no ;;
+ *) as_fn_error $? "bad value ${enableval} for newlib-io-float option" "$LINENO" 5 ;;
+ esac
+else
+ newlib_io_float=yes
+fi
+
+# Check whether --enable-newlib-supplied-syscalls was given.
+if test "${enable_newlib_supplied_syscalls+set}" = set; then :
+ enableval=$enable_newlib_supplied_syscalls; case "${enableval}" in
+ yes) newlib_may_supply_syscalls=yes ;;
+ no) newlib_may_supply_syscalls=no ;;
+ *) as_fn_error $? "bad value ${enableval} for newlib-supplied-syscalls option" "$LINENO" 5 ;;
+ esac
+else
+ newlib_may_supply_syscalls=yes
+fi
+
+ if test x${newlib_may_supply_syscalls} = xyes; then
+ MAY_SUPPLY_SYSCALLS_TRUE=
+ MAY_SUPPLY_SYSCALLS_FALSE='#'
+else
+ MAY_SUPPLY_SYSCALLS_TRUE='#'
+ MAY_SUPPLY_SYSCALLS_FALSE=
+fi
+
+
+
+test -z "${with_target_subdir}" && with_target_subdir=.
+
+if test "${srcdir}" = "."; then
+ if test "${with_target_subdir}" != "."; then
+ newlib_basedir="${srcdir}/${with_multisrctop}../../../.."
+ else
+ newlib_basedir="${srcdir}/${with_multisrctop}../../.."
+ fi
+else
+ newlib_basedir="${srcdir}/../../.."
+fi
+
+
+
+
+if test "`cd $srcdir && pwd`" != "`pwd`"; then
+ # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
+ # is not polluted with repeated "-I."
+ am__isrc=' -I$(srcdir)'
+ # test to see if srcdir already configured
+ if test -f $srcdir/config.status; then
+ as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5
+ fi
+fi
+
+# test whether we have cygpath
+if test -z "$CYGPATH_W"; then
+ if (cygpath --version) >/dev/null 2>/dev/null; then
+ CYGPATH_W='cygpath -w'
+ else
+ CYGPATH_W=echo
+ fi
+fi
+
+
+# Define the identity of the package.
+ PACKAGE='newlib'
+ VERSION='2.4.0'
+
+
+# Some tools Automake needs.
+
+ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"}
+
+
+AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"}
+
+
+AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"}
+
+
+AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"}
+
+
+MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
+
+# We need awk for the "check" target. The system "awk" is bad on
+# some platforms.
+# Always define AMTAR for backward compatibility. Yes, it's still used
+# in the wild :-( We should find a proper way to deprecate it ...
+AMTAR='$${TAR-tar}'
+
+am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'
+
+
+
+
+
+
+# FIXME: We temporarily define our own version of AC_PROG_CC. This is
+# copied from autoconf 2.12, but does not call AC_PROG_CC_WORKS. We
+# are probably using a cross compiler, which will not be able to fully
+# link an executable. This should really be fixed in autoconf
+# itself.
+
+
+
+
+
+
+
+# Extract the first word of "gcc", so it can be a program name with args.
+set dummy gcc; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_CC+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_CC="gcc"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+$as_echo "$CC" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+
+depcc="$CC" am_compiler_list=
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
+$as_echo_n "checking dependency style of $depcc... " >&6; }
+if ${am_cv_CC_dependencies_compiler_type+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
+ # We make a subdir and do the tests there. Otherwise we can end up
+ # making bogus files that we don't know about and never remove. For
+ # instance it was reported that on HP-UX the gcc test will end up
+ # making a dummy file named `D' -- because `-MD' means `put the output
+ # in D'.
+ rm -rf conftest.dir
+ mkdir conftest.dir
+ # Copy depcomp to subdir because otherwise we won't find it if we're
+ # using a relative directory.
+ cp "$am_depcomp" conftest.dir
+ cd conftest.dir
+ # We will build objects and dependencies in a subdirectory because
+ # it helps to detect inapplicable dependency modes. For instance
+ # both Tru64's cc and ICC support -MD to output dependencies as a
+ # side effect of compilation, but ICC will put the dependencies in
+ # the current directory while Tru64 will put them in the object
+ # directory.
+ mkdir sub
+
+ am_cv_CC_dependencies_compiler_type=none
+ if test "$am_compiler_list" = ""; then
+ am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
+ fi
+ am__universal=false
+ case " $depcc " in #(
+ *\ -arch\ *\ -arch\ *) am__universal=true ;;
+ esac
+
+ for depmode in $am_compiler_list; do
+ # Setup a source with many dependencies, because some compilers
+ # like to wrap large dependency lists on column 80 (with \), and
+ # we should not choose a depcomp mode which is confused by this.
+ #
+ # We need to recreate these files for each test, as the compiler may
+ # overwrite some of them when testing with obscure command lines.
+ # This happens at least with the AIX C compiler.
+ : > sub/conftest.c
+ for i in 1 2 3 4 5 6; do
+ echo '#include "conftst'$i'.h"' >> sub/conftest.c
+ # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
+ # Solaris 8's {/usr,}/bin/sh.
+ touch sub/conftst$i.h
+ done
+ echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
+
+ # We check with `-c' and `-o' for the sake of the "dashmstdout"
+ # mode. It turns out that the SunPro C++ compiler does not properly
+ # handle `-M -o', and we need to detect this. Also, some Intel
+ # versions had trouble with output in subdirs
+ am__obj=sub/conftest.${OBJEXT-o}
+ am__minus_obj="-o $am__obj"
+ case $depmode in
+ gcc)
+ # This depmode causes a compiler race in universal mode.
+ test "$am__universal" = false || continue
+ ;;
+ nosideeffect)
+ # after this tag, mechanisms are not by side-effect, so they'll
+ # only be used when explicitly requested
+ if test "x$enable_dependency_tracking" = xyes; then
+ continue
+ else
+ break
+ fi
+ ;;
+ msvc7 | msvc7msys | msvisualcpp | msvcmsys)
+ # This compiler won't grok `-c -o', but also, the minuso test has
+ # not run yet. These depmodes are late enough in the game, and
+ # so weak that their functioning should not be impacted.
+ am__obj=conftest.${OBJEXT-o}
+ am__minus_obj=
+ ;;
+ none) break ;;
+ esac
+ if depmode=$depmode \
+ source=sub/conftest.c object=$am__obj \
+ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
+ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
+ >/dev/null 2>conftest.err &&
+ grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
+ grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
+ grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
+ ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
+ # icc doesn't choke on unknown options, it will just issue warnings
+ # or remarks (even with -Werror). So we grep stderr for any message
+ # that says an option was ignored or not supported.
+ # When given -MP, icc 7.0 and 7.1 complain thusly:
+ # icc: Command line warning: ignoring option '-M'; no argument required
+ # The diagnosis changed in icc 8.0:
+ # icc: Command line remark: option '-MP' not supported
+ if (grep 'ignoring option' conftest.err ||
+ grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
+ am_cv_CC_dependencies_compiler_type=$depmode
+ break
+ fi
+ fi
+ done
+
+ cd ..
+ rm -rf conftest.dir
+else
+ am_cv_CC_dependencies_compiler_type=none
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
+$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; }
+CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
+
+ if
+ test "x$enable_dependency_tracking" != xno \
+ && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then
+ am__fastdepCC_TRUE=
+ am__fastdepCC_FALSE='#'
+else
+ am__fastdepCC_TRUE='#'
+ am__fastdepCC_FALSE=
+fi
+
+
+if test -z "$CC"; then
+ # Extract the first word of "cc", so it can be a program name with args.
+set dummy cc; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_CC+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+ ac_prog_rejected=no
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
+ ac_prog_rejected=yes
+ continue
+ fi
+ ac_cv_prog_CC="cc"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+if test $ac_prog_rejected = yes; then
+ # We found a bogon in the path, so make sure we never use it.
+ set dummy $ac_cv_prog_CC
+ shift
+ if test $# != 0; then
+ # We chose a different compiler from the bogus one.
+ # However, it has the same basename, so the bogon will be chosen
+ # first if we set CC to just the basename; use the full file name.
+ shift
+ ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
+ fi
+fi
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+$as_echo "$CC" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+ test -z "$CC" && as_fn_error $? "no acceptable cc found in \$PATH" "$LINENO" 5
+fi
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using GNU C" >&5
+$as_echo_n "checking whether we are using GNU C... " >&6; }
+if ${ac_cv_c_compiler_gnu+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat > conftest.c <<EOF
+#ifdef __GNUC__
+ yes;
+#endif
+EOF
+if { ac_try='${CC-cc} -E conftest.c'
+ { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; } | egrep yes >/dev/null 2>&1; then
+ ac_cv_c_compiler_gnu=yes
+else
+ ac_cv_c_compiler_gnu=no
+fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
+$as_echo "$ac_cv_c_compiler_gnu" >&6; }
+
+if test $ac_cv_c_compiler_gnu = yes; then
+ GCC=yes
+ ac_test_CFLAGS="${CFLAGS+set}"
+ ac_save_CFLAGS="$CFLAGS"
+ ac_test_CFLAGS=${CFLAGS+set}
+ac_save_CFLAGS=$CFLAGS
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
+$as_echo_n "checking whether $CC accepts -g... " >&6; }
+if ${ac_cv_prog_cc_g+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_save_c_werror_flag=$ac_c_werror_flag
+ ac_c_werror_flag=yes
+ ac_cv_prog_cc_g=no
+ CFLAGS="-g"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ ac_cv_prog_cc_g=yes
+else
+ CFLAGS=""
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+
+else
+ ac_c_werror_flag=$ac_save_c_werror_flag
+ CFLAGS="-g"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ ac_cv_prog_cc_g=yes
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ ac_c_werror_flag=$ac_save_c_werror_flag
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
+$as_echo "$ac_cv_prog_cc_g" >&6; }
+if test "$ac_test_CFLAGS" = set; then
+ CFLAGS=$ac_save_CFLAGS
+elif test $ac_cv_prog_cc_g = yes; then
+ if test "$GCC" = yes; then
+ CFLAGS="-g -O2"
+ else
+ CFLAGS="-g"
+ fi
+else
+ if test "$GCC" = yes; then
+ CFLAGS="-O2"
+ else
+ CFLAGS=
+ fi
+fi
+ if test "$ac_test_CFLAGS" = set; then
+ CFLAGS="$ac_save_CFLAGS"
+ elif test $ac_cv_prog_cc_g = yes; then
+ CFLAGS="-g -O2"
+ else
+ CFLAGS="-O2"
+ fi
+else
+ GCC=
+ test "${CFLAGS+set}" = set || CFLAGS="-g"
+fi
+
+
+if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args.
+set dummy ${ac_tool_prefix}as; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_AS+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$AS"; then
+ ac_cv_prog_AS="$AS" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_AS="${ac_tool_prefix}as"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+AS=$ac_cv_prog_AS
+if test -n "$AS"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
+$as_echo "$AS" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_AS"; then
+ ac_ct_AS=$AS
+ # Extract the first word of "as", so it can be a program name with args.
+set dummy as; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_AS+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_ct_AS"; then
+ ac_cv_prog_ac_ct_AS="$ac_ct_AS" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_ac_ct_AS="as"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_AS=$ac_cv_prog_ac_ct_AS
+if test -n "$ac_ct_AS"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AS" >&5
+$as_echo "$ac_ct_AS" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+ if test "x$ac_ct_AS" = x; then
+ AS=""
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ AS=$ac_ct_AS
+ fi
+else
+ AS="$ac_cv_prog_AS"
+fi
+
+if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
+set dummy ${ac_tool_prefix}ar; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_AR+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$AR"; then
+ ac_cv_prog_AR="$AR" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_AR="${ac_tool_prefix}ar"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+AR=$ac_cv_prog_AR
+if test -n "$AR"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
+$as_echo "$AR" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_AR"; then
+ ac_ct_AR=$AR
+ # Extract the first word of "ar", so it can be a program name with args.
+set dummy ar; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_AR+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_ct_AR"; then
+ ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_ac_ct_AR="ar"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_AR=$ac_cv_prog_ac_ct_AR
+if test -n "$ac_ct_AR"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
+$as_echo "$ac_ct_AR" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+ if test "x$ac_ct_AR" = x; then
+ AR=""
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ AR=$ac_ct_AR
+ fi
+else
+ AR="$ac_cv_prog_AR"
+fi
+
+if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
+set dummy ${ac_tool_prefix}ranlib; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_RANLIB+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$RANLIB"; then
+ ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+RANLIB=$ac_cv_prog_RANLIB
+if test -n "$RANLIB"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
+$as_echo "$RANLIB" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_RANLIB"; then
+ ac_ct_RANLIB=$RANLIB
+ # Extract the first word of "ranlib", so it can be a program name with args.
+set dummy ranlib; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_ct_RANLIB"; then
+ ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_ac_ct_RANLIB="ranlib"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
+if test -n "$ac_ct_RANLIB"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
+$as_echo "$ac_ct_RANLIB" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+ if test "x$ac_ct_RANLIB" = x; then
+ RANLIB=":"
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ RANLIB=$ac_ct_RANLIB
+ fi
+else
+ RANLIB="$ac_cv_prog_RANLIB"
+fi
+
+if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}readelf", so it can be a program name with args.
+set dummy ${ac_tool_prefix}readelf; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_READELF+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$READELF"; then
+ ac_cv_prog_READELF="$READELF" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_READELF="${ac_tool_prefix}readelf"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+READELF=$ac_cv_prog_READELF
+if test -n "$READELF"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
+$as_echo "$READELF" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_READELF"; then
+ ac_ct_READELF=$READELF
+ # Extract the first word of "readelf", so it can be a program name with args.
+set dummy readelf; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_READELF+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_ct_READELF"; then
+ ac_cv_prog_ac_ct_READELF="$ac_ct_READELF" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_ac_ct_READELF="readelf"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_READELF=$ac_cv_prog_ac_ct_READELF
+if test -n "$ac_ct_READELF"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_READELF" >&5
+$as_echo "$ac_ct_READELF" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+ if test "x$ac_ct_READELF" = x; then
+ READELF=":"
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ READELF=$ac_ct_READELF
+ fi
+else
+ READELF="$ac_cv_prog_READELF"
+fi
+
+
+
+
+# Hack to ensure that INSTALL won't be set to "../" with autoconf 2.13. */
+ac_given_INSTALL=$INSTALL
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5
+$as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; }
+ # Check whether --enable-maintainer-mode was given.
+if test "${enable_maintainer_mode+set}" = set; then :
+ enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval
+else
+ USE_MAINTAINER_MODE=no
+fi
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_MAINTAINER_MODE" >&5
+$as_echo "$USE_MAINTAINER_MODE" >&6; }
+ if test $USE_MAINTAINER_MODE = yes; then
+ MAINTAINER_MODE_TRUE=
+ MAINTAINER_MODE_FALSE='#'
+else
+ MAINTAINER_MODE_TRUE='#'
+ MAINTAINER_MODE_FALSE=
+fi
+
+ MAINT=$MAINTAINER_MODE_TRUE
+
+
+# By default we simply use the C compiler to build assembly code.
+
+test "${CCAS+set}" = set || CCAS=$CC
+test "${CCASFLAGS+set}" = set || CCASFLAGS=$CFLAGS
+
+
+
+
+# We need AC_EXEEXT to keep automake happy in cygnus mode. However,
+# at least currently, we never actually build a program, so we never
+# need to use $(EXEEXT). Moreover, the test for EXEEXT normally
+# fails, because we are probably configuring with a cross compiler
+# which can't create executables. So we include AC_EXEEXT to keep
+# automake happy, but we don't execute it, since we don't care about
+# the result.
+if false; then
+
+ dummy_var=1
+fi
+
+. ${newlib_basedir}/configure.host
+
+newlib_cflags="${newlib_cflags} -fno-builtin"
+
+NEWLIB_CFLAGS=${newlib_cflags}
+
+
+NO_INCLUDE_LIST=${noinclude}
+
+
+LDFLAGS=${ldflags}
+
+
+ if test x${newlib_elix_level} = x0; then
+ ELIX_LEVEL_0_TRUE=
+ ELIX_LEVEL_0_FALSE='#'
+else
+ ELIX_LEVEL_0_TRUE='#'
+ ELIX_LEVEL_0_FALSE=
+fi
+
+ if test x${newlib_elix_level} = x1; then
+ ELIX_LEVEL_1_TRUE=
+ ELIX_LEVEL_1_FALSE='#'
+else
+ ELIX_LEVEL_1_TRUE='#'
+ ELIX_LEVEL_1_FALSE=
+fi
+
+ if test x${newlib_elix_level} = x2; then
+ ELIX_LEVEL_2_TRUE=
+ ELIX_LEVEL_2_FALSE='#'
+else
+ ELIX_LEVEL_2_TRUE='#'
+ ELIX_LEVEL_2_FALSE=
+fi
+
+ if test x${newlib_elix_level} = x3; then
+ ELIX_LEVEL_3_TRUE=
+ ELIX_LEVEL_3_FALSE='#'
+else
+ ELIX_LEVEL_3_TRUE='#'
+ ELIX_LEVEL_3_FALSE=
+fi
+
+ if test x${newlib_elix_level} = x4; then
+ ELIX_LEVEL_4_TRUE=
+ ELIX_LEVEL_4_FALSE='#'
+else
+ ELIX_LEVEL_4_TRUE='#'
+ ELIX_LEVEL_4_FALSE=
+fi
+
+
+ if test x${use_libtool} = xyes; then
+ USE_LIBTOOL_TRUE=
+ USE_LIBTOOL_FALSE='#'
+else
+ USE_LIBTOOL_TRUE='#'
+ USE_LIBTOOL_FALSE=
+fi
+
+
+# Hard-code OBJEXT. Normally it is set by AC_OBJEXT, but we
+# use oext, which is set in configure.host based on the target platform.
+OBJEXT=${oext}
+
+
+
+
+
+
+
+
+
+
+
+
+
+subdirs="$subdirs machine"
+
+
+PHOENIX_MACH_LIB=machine/lib.${aext}
+
+
+ac_config_files="$ac_config_files Makefile"
+
+cat >confcache <<\_ACEOF
+# This file is a shell script that caches the results of configure
+# tests run on this system so they can be shared between configure
+# scripts and configure runs, see configure's option --config-cache.
+# It is not useful on other systems. If it contains results you don't
+# want to keep, you may remove or edit it.
+#
+# config.status only pays attention to the cache file if you give it
+# the --recheck option to rerun configure.
+#
+# `ac_cv_env_foo' variables (set or unset) will be overridden when
+# loading this file, other *unset* `ac_cv_foo' will be assigned the
+# following values.
+
+_ACEOF
+
+# The following way of writing the cache mishandles newlines in values,
+# but we know of no workaround that is simple, portable, and efficient.
+# So, we kill variables containing newlines.
+# Ultrix sh set writes to stderr and can't be redirected directly,
+# and sets the high bit in the cache file unless we assign to the vars.
+(
+ for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
+ eval ac_val=\$$ac_var
+ case $ac_val in #(
+ *${as_nl}*)
+ case $ac_var in #(
+ *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
+$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
+ esac
+ case $ac_var in #(
+ _ | IFS | as_nl) ;; #(
+ BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
+ *) { eval $ac_var=; unset $ac_var;} ;;
+ esac ;;
+ esac
+ done
+
+ (set) 2>&1 |
+ case $as_nl`(ac_space=' '; set) 2>&1` in #(
+ *${as_nl}ac_space=\ *)
+ # `set' does not quote correctly, so add quotes: double-quote
+ # substitution turns \\\\ into \\, and sed turns \\ into \.
+ sed -n \
+ "s/'/'\\\\''/g;
+ s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
+ ;; #(
+ *)
+ # `set' quotes correctly as required by POSIX, so do not add quotes.
+ sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
+ ;;
+ esac |
+ sort
+) |
+ sed '
+ /^ac_cv_env_/b end
+ t clear
+ :clear
+ s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
+ t end
+ s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
+ :end' >>confcache
+if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
+ if test -w "$cache_file"; then
+ if test "x$cache_file" != "x/dev/null"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
+$as_echo "$as_me: updating cache $cache_file" >&6;}
+ if test ! -f "$cache_file" || test -h "$cache_file"; then
+ cat confcache >"$cache_file"
+ else
+ case $cache_file in #(
+ */* | ?:*)
+ mv -f confcache "$cache_file"$$ &&
+ mv -f "$cache_file"$$ "$cache_file" ;; #(
+ *)
+ mv -f confcache "$cache_file" ;;
+ esac
+ fi
+ fi
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
+$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
+ fi
+fi
+rm -f confcache
+
+test "x$prefix" = xNONE && prefix=$ac_default_prefix
+# Let make expand exec_prefix.
+test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
+
+# Transform confdefs.h into DEFS.
+# Protect against shell expansion while executing Makefile rules.
+# Protect against Makefile macro expansion.
+#
+# If the first sed substitution is executed (which looks for macros that
+# take arguments), then branch to the quote section. Otherwise,
+# look for a macro that doesn't take arguments.
+ac_script='
+:mline
+/\\$/{
+ N
+ s,\\\n,,
+ b mline
+}
+t clear
+:clear
+s/^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*([^)]*)\)[ ]*\(.*\)/-D\1=\2/g
+t quote
+s/^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)/-D\1=\2/g
+t quote
+b any
+:quote
+s/[ `~#$^&*(){}\\|;'\''"<>?]/\\&/g
+s/\[/\\&/g
+s/\]/\\&/g
+s/\$/$$/g
+H
+:any
+${
+ g
+ s/^\n//
+ s/\n/ /g
+ p
+}
+'
+DEFS=`sed -n "$ac_script" confdefs.h`
+
+
+ac_libobjs=
+ac_ltlibobjs=
+U=
+for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
+ # 1. Remove the extension, and $U if already installed.
+ ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
+ ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
+ # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
+ # will be set to the directory where LIBOBJS objects are built.
+ as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
+ as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
+done
+LIBOBJS=$ac_libobjs
+
+LTLIBOBJS=$ac_ltlibobjs
+
+
+if test -z "${MAY_SUPPLY_SYSCALLS_TRUE}" && test -z "${MAY_SUPPLY_SYSCALLS_FALSE}"; then
+ as_fn_error $? "conditional \"MAY_SUPPLY_SYSCALLS\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+
+if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then
+ as_fn_error $? "conditional \"AMDEP\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
+ as_fn_error $? "conditional \"am__fastdepCC\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then
+ as_fn_error $? "conditional \"MAINTAINER_MODE\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${ELIX_LEVEL_0_TRUE}" && test -z "${ELIX_LEVEL_0_FALSE}"; then
+ as_fn_error $? "conditional \"ELIX_LEVEL_0\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${ELIX_LEVEL_1_TRUE}" && test -z "${ELIX_LEVEL_1_FALSE}"; then
+ as_fn_error $? "conditional \"ELIX_LEVEL_1\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${ELIX_LEVEL_2_TRUE}" && test -z "${ELIX_LEVEL_2_FALSE}"; then
+ as_fn_error $? "conditional \"ELIX_LEVEL_2\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${ELIX_LEVEL_3_TRUE}" && test -z "${ELIX_LEVEL_3_FALSE}"; then
+ as_fn_error $? "conditional \"ELIX_LEVEL_3\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${ELIX_LEVEL_4_TRUE}" && test -z "${ELIX_LEVEL_4_FALSE}"; then
+ as_fn_error $? "conditional \"ELIX_LEVEL_4\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${USE_LIBTOOL_TRUE}" && test -z "${USE_LIBTOOL_FALSE}"; then
+ as_fn_error $? "conditional \"USE_LIBTOOL\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+
+: "${CONFIG_STATUS=./config.status}"
+ac_write_fail=0
+ac_clean_files_save=$ac_clean_files
+ac_clean_files="$ac_clean_files $CONFIG_STATUS"
+{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
+$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
+as_write_fail=0
+cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
+#! $SHELL
+# Generated by $as_me.
+# Run this file to recreate the current configuration.
+# Compiler output produced by configure, useful for debugging
+# configure, is in config.log if it exists.
+
+debug=false
+ac_cs_recheck=false
+ac_cs_silent=false
+
+SHELL=\${CONFIG_SHELL-$SHELL}
+export SHELL
+_ASEOF
+cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
+## -------------------- ##
+## M4sh Initialization. ##
+## -------------------- ##
+
+# Be more Bourne compatible
+DUALCASE=1; export DUALCASE # for MKS sh
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
+ emulate sh
+ NULLCMD=:
+ # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
+ # is contrary to our usage. Disable this feature.
+ alias -g '${1+"$@"}'='"$@"'
+ setopt NO_GLOB_SUBST
+else
+ case `(set -o) 2>/dev/null` in #(
+ *posix*) :
+ set -o posix ;; #(
+ *) :
+ ;;
+esac
+fi
+
+
+as_nl='
+'
+export as_nl
+# Printing a long string crashes Solaris 7 /usr/bin/printf.
+as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
+as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
+as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
+# Prefer a ksh shell builtin over an external printf program on Solaris,
+# but without wasting forks for bash or zsh.
+if test -z "$BASH_VERSION$ZSH_VERSION" \
+ && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
+ as_echo='print -r --'
+ as_echo_n='print -rn --'
+elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
+ as_echo='printf %s\n'
+ as_echo_n='printf %s'
+else
+ if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
+ as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
+ as_echo_n='/usr/ucb/echo -n'
+ else
+ as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
+ as_echo_n_body='eval
+ arg=$1;
+ case $arg in #(
+ *"$as_nl"*)
+ expr "X$arg" : "X\\(.*\\)$as_nl";
+ arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
+ esac;
+ expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
+ '
+ export as_echo_n_body
+ as_echo_n='sh -c $as_echo_n_body as_echo'
+ fi
+ export as_echo_body
+ as_echo='sh -c $as_echo_body as_echo'
+fi
+
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+ PATH_SEPARATOR=:
+ (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
+ (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
+ PATH_SEPARATOR=';'
+ }
+fi
+
+
+# IFS
+# We need space, tab and new line, in precisely that order. Quoting is
+# there to prevent editors from complaining about space-tab.
+# (If _AS_PATH_WALK were called with IFS unset, it would disable word
+# splitting by setting IFS to empty value.)
+IFS=" "" $as_nl"
+
+# Find who we are. Look in the path if we contain no directory separator.
+as_myself=
+case $0 in #((
+ *[\\/]* ) as_myself=$0 ;;
+ *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
+ done
+IFS=$as_save_IFS
+
+ ;;
+esac
+# We did not find ourselves, most probably we were run as `sh COMMAND'
+# in which case we are not to be found in the path.
+if test "x$as_myself" = x; then
+ as_myself=$0
+fi
+if test ! -f "$as_myself"; then
+ $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
+ exit 1
+fi
+
+# Unset variables that we do not need and which cause bugs (e.g. in
+# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
+# suppresses any "Segmentation fault" message there. '((' could
+# trigger a bug in pdksh 5.2.14.
+for as_var in BASH_ENV ENV MAIL MAILPATH
+do eval test x\${$as_var+set} = xset \
+ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
+done
+PS1='$ '
+PS2='> '
+PS4='+ '
+
+# NLS nuisances.
+LC_ALL=C
+export LC_ALL
+LANGUAGE=C
+export LANGUAGE
+
+# CDPATH.
+(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
+
+
+# as_fn_error STATUS ERROR [LINENO LOG_FD]
+# ----------------------------------------
+# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
+# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
+# script with STATUS, using 1 if that was 0.
+as_fn_error ()
+{
+ as_status=$1; test $as_status -eq 0 && as_status=1
+ if test "$4"; then
+ as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
+ fi
+ $as_echo "$as_me: error: $2" >&2
+ as_fn_exit $as_status
+} # as_fn_error
+
+
+# as_fn_set_status STATUS
+# -----------------------
+# Set $? to STATUS, without forking.
+as_fn_set_status ()
+{
+ return $1
+} # as_fn_set_status
+
+# as_fn_exit STATUS
+# -----------------
+# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
+as_fn_exit ()
+{
+ set +e
+ as_fn_set_status $1
+ exit $1
+} # as_fn_exit
+
+# as_fn_unset VAR
+# ---------------
+# Portably unset VAR.
+as_fn_unset ()
+{
+ { eval $1=; unset $1;}
+}
+as_unset=as_fn_unset
+# as_fn_append VAR VALUE
+# ----------------------
+# Append the text in VALUE to the end of the definition contained in VAR. Take
+# advantage of any shell optimizations that allow amortized linear growth over
+# repeated appends, instead of the typical quadratic growth present in naive
+# implementations.
+if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
+ eval 'as_fn_append ()
+ {
+ eval $1+=\$2
+ }'
+else
+ as_fn_append ()
+ {
+ eval $1=\$$1\$2
+ }
+fi # as_fn_append
+
+# as_fn_arith ARG...
+# ------------------
+# Perform arithmetic evaluation on the ARGs, and store the result in the
+# global $as_val. Take advantage of shells that can avoid forks. The arguments
+# must be portable across $(()) and expr.
+if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
+ eval 'as_fn_arith ()
+ {
+ as_val=$(( $* ))
+ }'
+else
+ as_fn_arith ()
+ {
+ as_val=`expr "$@" || test $? -eq 1`
+ }
+fi # as_fn_arith
+
+
+if expr a : '\(a\)' >/dev/null 2>&1 &&
+ test "X`expr 00001 : '.*\(...\)'`" = X001; then
+ as_expr=expr
+else
+ as_expr=false
+fi
+
+if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
+ as_basename=basename
+else
+ as_basename=false
+fi
+
+if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
+ as_dirname=dirname
+else
+ as_dirname=false
+fi
+
+as_me=`$as_basename -- "$0" ||
+$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
+ X"$0" : 'X\(//\)$' \| \
+ X"$0" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X/"$0" |
+ sed '/^.*\/\([^/][^/]*\)\/*$/{
+ s//\1/
+ q
+ }
+ /^X\/\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\/\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+
+# Avoid depending upon Character Ranges.
+as_cr_letters='abcdefghijklmnopqrstuvwxyz'
+as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
+as_cr_Letters=$as_cr_letters$as_cr_LETTERS
+as_cr_digits='0123456789'
+as_cr_alnum=$as_cr_Letters$as_cr_digits
+
+ECHO_C= ECHO_N= ECHO_T=
+case `echo -n x` in #(((((
+-n*)
+ case `echo 'xy\c'` in
+ *c*) ECHO_T=' ';; # ECHO_T is single tab character.
+ xy) ECHO_C='\c';;
+ *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
+ ECHO_T=' ';;
+ esac;;
+*)
+ ECHO_N='-n';;
+esac
+
+rm -f conf$$ conf$$.exe conf$$.file
+if test -d conf$$.dir; then
+ rm -f conf$$.dir/conf$$.file
+else
+ rm -f conf$$.dir
+ mkdir conf$$.dir 2>/dev/null
+fi
+if (echo >conf$$.file) 2>/dev/null; then
+ if ln -s conf$$.file conf$$ 2>/dev/null; then
+ as_ln_s='ln -s'
+ # ... but there are two gotchas:
+ # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
+ # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
+ # In both cases, we have to default to `cp -p'.
+ ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
+ as_ln_s='cp -p'
+ elif ln conf$$.file conf$$ 2>/dev/null; then
+ as_ln_s=ln
+ else
+ as_ln_s='cp -p'
+ fi
+else
+ as_ln_s='cp -p'
+fi
+rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
+rmdir conf$$.dir 2>/dev/null
+
+
+# as_fn_mkdir_p
+# -------------
+# Create "$as_dir" as a directory, including parents if necessary.
+as_fn_mkdir_p ()
+{
+
+ case $as_dir in #(
+ -*) as_dir=./$as_dir;;
+ esac
+ test -d "$as_dir" || eval $as_mkdir_p || {
+ as_dirs=
+ while :; do
+ case $as_dir in #(
+ *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
+ *) as_qdir=$as_dir;;
+ esac
+ as_dirs="'$as_qdir' $as_dirs"
+ as_dir=`$as_dirname -- "$as_dir" ||
+$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$as_dir" : 'X\(//\)[^/]' \| \
+ X"$as_dir" : 'X\(//\)$' \| \
+ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$as_dir" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)[^/].*/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+ test -d "$as_dir" && break
+ done
+ test -z "$as_dirs" || eval "mkdir $as_dirs"
+ } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
+
+
+} # as_fn_mkdir_p
+if mkdir -p . 2>/dev/null; then
+ as_mkdir_p='mkdir -p "$as_dir"'
+else
+ test -d ./-p && rmdir ./-p
+ as_mkdir_p=false
+fi
+
+if test -x / >/dev/null 2>&1; then
+ as_test_x='test -x'
+else
+ if ls -dL / >/dev/null 2>&1; then
+ as_ls_L_option=L
+ else
+ as_ls_L_option=
+ fi
+ as_test_x='
+ eval sh -c '\''
+ if test -d "$1"; then
+ test -d "$1/.";
+ else
+ case $1 in #(
+ -*)set "./$1";;
+ esac;
+ case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
+ ???[sx]*):;;*)false;;esac;fi
+ '\'' sh
+ '
+fi
+as_executable_p=$as_test_x
+
+# Sed expression to map a string onto a valid CPP name.
+as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
+
+# Sed expression to map a string onto a valid variable name.
+as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
+
+
+exec 6>&1
+## ----------------------------------- ##
+## Main body of $CONFIG_STATUS script. ##
+## ----------------------------------- ##
+_ASEOF
+test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+# Save the log message, to keep $0 and so on meaningful, and to
+# report actual input values of CONFIG_FILES etc. instead of their
+# values after options handling.
+ac_log="
+This file was extended by newlib $as_me 2.4.0, which was
+generated by GNU Autoconf 2.68. Invocation command line was
+
+ CONFIG_FILES = $CONFIG_FILES
+ CONFIG_HEADERS = $CONFIG_HEADERS
+ CONFIG_LINKS = $CONFIG_LINKS
+ CONFIG_COMMANDS = $CONFIG_COMMANDS
+ $ $0 $@
+
+on `(hostname || uname -n) 2>/dev/null | sed 1q`
+"
+
+_ACEOF
+
+case $ac_config_files in *"
+"*) set x $ac_config_files; shift; ac_config_files=$*;;
+esac
+
+
+
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+# Files that config.status was made for.
+config_files="$ac_config_files"
+config_commands="$ac_config_commands"
+
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+ac_cs_usage="\
+\`$as_me' instantiates files and other configuration actions
+from templates according to the current configuration. Unless the files
+and actions are specified as TAGs, all are instantiated by default.
+
+Usage: $0 [OPTION]... [TAG]...
+
+ -h, --help print this help, then exit
+ -V, --version print version number and configuration settings, then exit
+ --config print configuration, then exit
+ -q, --quiet, --silent
+ do not print progress messages
+ -d, --debug don't remove temporary files
+ --recheck update $as_me by reconfiguring in the same conditions
+ --file=FILE[:TEMPLATE]
+ instantiate the configuration file FILE
+
+Configuration files:
+$config_files
+
+Configuration commands:
+$config_commands
+
+Report bugs to the package provider."
+
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
+ac_cs_version="\\
+newlib config.status 2.4.0
+configured by $0, generated by GNU Autoconf 2.68,
+ with options \\"\$ac_cs_config\\"
+
+Copyright (C) 2010 Free Software Foundation, Inc.
+This config.status script is free software; the Free Software Foundation
+gives unlimited permission to copy, distribute and modify it."
+
+ac_pwd='$ac_pwd'
+srcdir='$srcdir'
+INSTALL='$INSTALL'
+MKDIR_P='$MKDIR_P'
+AWK='$AWK'
+test -n "\$AWK" || AWK=awk
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+# The default lists apply if the user does not specify any file.
+ac_need_defaults=:
+while test $# != 0
+do
+ case $1 in
+ --*=?*)
+ ac_option=`expr "X$1" : 'X\([^=]*\)='`
+ ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
+ ac_shift=:
+ ;;
+ --*=)
+ ac_option=`expr "X$1" : 'X\([^=]*\)='`
+ ac_optarg=
+ ac_shift=:
+ ;;
+ *)
+ ac_option=$1
+ ac_optarg=$2
+ ac_shift=shift
+ ;;
+ esac
+
+ case $ac_option in
+ # Handling of the options.
+ -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
+ ac_cs_recheck=: ;;
+ --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
+ $as_echo "$ac_cs_version"; exit ;;
+ --config | --confi | --conf | --con | --co | --c )
+ $as_echo "$ac_cs_config"; exit ;;
+ --debug | --debu | --deb | --de | --d | -d )
+ debug=: ;;
+ --file | --fil | --fi | --f )
+ $ac_shift
+ case $ac_optarg in
+ *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
+ '') as_fn_error $? "missing file argument" ;;
+ esac
+ as_fn_append CONFIG_FILES " '$ac_optarg'"
+ ac_need_defaults=false;;
+ --he | --h | --help | --hel | -h )
+ $as_echo "$ac_cs_usage"; exit ;;
+ -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+ | -silent | --silent | --silen | --sile | --sil | --si | --s)
+ ac_cs_silent=: ;;
+
+ # This is an error.
+ -*) as_fn_error $? "unrecognized option: \`$1'
+Try \`$0 --help' for more information." ;;
+
+ *) as_fn_append ac_config_targets " $1"
+ ac_need_defaults=false ;;
+
+ esac
+ shift
+done
+
+ac_configure_extra_args=
+
+if $ac_cs_silent; then
+ exec 6>/dev/null
+ ac_configure_extra_args="$ac_configure_extra_args --silent"
+fi
+
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+if \$ac_cs_recheck; then
+ set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
+ shift
+ \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
+ CONFIG_SHELL='$SHELL'
+ export CONFIG_SHELL
+ exec "\$@"
+fi
+
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+exec 5>>config.log
+{
+ echo
+ sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
+## Running $as_me. ##
+_ASBOX
+ $as_echo "$ac_log"
+} >&5
+
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+#
+# INIT-COMMANDS
+#
+AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"
+
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+
+# Handling of arguments.
+for ac_config_target in $ac_config_targets
+do
+ case $ac_config_target in
+ "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
+ "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
+
+ *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
+ esac
+done
+
+
+# If the user did not use the arguments to specify the items to instantiate,
+# then the envvar interface is used. Set only those that are not.
+# We use the long form for the default assignment because of an extremely
+# bizarre bug on SunOS 4.1.3.
+if $ac_need_defaults; then
+ test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
+ test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
+fi
+
+# Have a temporary directory for convenience. Make it in the build tree
+# simply because there is no reason against having it here, and in addition,
+# creating and moving files from /tmp can sometimes cause problems.
+# Hook for its removal unless debugging.
+# Note that there is a small window in which the directory will not be cleaned:
+# after its creation but before its name has been assigned to `$tmp'.
+$debug ||
+{
+ tmp= ac_tmp=
+ trap 'exit_status=$?
+ : "${ac_tmp:=$tmp}"
+ { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
+' 0
+ trap 'as_fn_exit 1' 1 2 13 15
+}
+# Create a (secure) tmp directory for tmp files.
+
+{
+ tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
+ test -d "$tmp"
+} ||
+{
+ tmp=./conf$$-$RANDOM
+ (umask 077 && mkdir "$tmp")
+} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
+ac_tmp=$tmp
+
+# Set up the scripts for CONFIG_FILES section.
+# No need to generate them if there are no CONFIG_FILES.
+# This happens for instance with `./config.status config.h'.
+if test -n "$CONFIG_FILES"; then
+
+
+ac_cr=`echo X | tr X '\015'`
+# On cygwin, bash can eat \r inside `` if the user requested igncr.
+# But we know of no other shell where ac_cr would be empty at this
+# point, so we can use a bashism as a fallback.
+if test "x$ac_cr" = x; then
+ eval ac_cr=\$\'\\r\'
+fi
+ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
+if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
+ ac_cs_awk_cr='\\r'
+else
+ ac_cs_awk_cr=$ac_cr
+fi
+
+echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
+_ACEOF
+
+
+{
+ echo "cat >conf$$subs.awk <<_ACEOF" &&
+ echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
+ echo "_ACEOF"
+} >conf$$subs.sh ||
+ as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
+ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
+ac_delim='%!_!# '
+for ac_last_try in false false false false false :; do
+ . ./conf$$subs.sh ||
+ as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
+
+ ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
+ if test $ac_delim_n = $ac_delim_num; then
+ break
+ elif $ac_last_try; then
+ as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
+ else
+ ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
+ fi
+done
+rm -f conf$$subs.sh
+
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
+_ACEOF
+sed -n '
+h
+s/^/S["/; s/!.*/"]=/
+p
+g
+s/^[^!]*!//
+:repl
+t repl
+s/'"$ac_delim"'$//
+t delim
+:nl
+h
+s/\(.\{148\}\)..*/\1/
+t more1
+s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
+p
+n
+b repl
+:more1
+s/["\\]/\\&/g; s/^/"/; s/$/"\\/
+p
+g
+s/.\{148\}//
+t nl
+:delim
+h
+s/\(.\{148\}\)..*/\1/
+t more2
+s/["\\]/\\&/g; s/^/"/; s/$/"/
+p
+b
+:more2
+s/["\\]/\\&/g; s/^/"/; s/$/"\\/
+p
+g
+s/.\{148\}//
+t delim
+' <conf$$subs.awk | sed '
+/^[^""]/{
+ N
+ s/\n//
+}
+' >>$CONFIG_STATUS || ac_write_fail=1
+rm -f conf$$subs.awk
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+_ACAWK
+cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
+ for (key in S) S_is_set[key] = 1
+ FS = ""
+
+}
+{
+ line = $ 0
+ nfields = split(line, field, "@")
+ substed = 0
+ len = length(field[1])
+ for (i = 2; i < nfields; i++) {
+ key = field[i]
+ keylen = length(key)
+ if (S_is_set[key]) {
+ value = S[key]
+ line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
+ len += length(value) + length(field[++i])
+ substed = 1
+ } else
+ len += 1 + keylen
+ }
+
+ print line
+}
+
+_ACAWK
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
+ sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
+else
+ cat
+fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
+ || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
+_ACEOF
+
+# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
+# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
+# trailing colons and then remove the whole line if VPATH becomes empty
+# (actually we leave an empty line to preserve line numbers).
+if test "x$srcdir" = x.; then
+ ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
+h
+s///
+s/^/:/
+s/[ ]*$/:/
+s/:\$(srcdir):/:/g
+s/:\${srcdir}:/:/g
+s/:@srcdir@:/:/g
+s/^:*//
+s/:*$//
+x
+s/\(=[ ]*\).*/\1/
+G
+s/\n//
+s/^[^=]*=[ ]*$//
+}'
+fi
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+fi # test -n "$CONFIG_FILES"
+
+
+eval set X " :F $CONFIG_FILES :C $CONFIG_COMMANDS"
+shift
+for ac_tag
+do
+ case $ac_tag in
+ :[FHLC]) ac_mode=$ac_tag; continue;;
+ esac
+ case $ac_mode$ac_tag in
+ :[FHL]*:*);;
+ :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
+ :[FH]-) ac_tag=-:-;;
+ :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
+ esac
+ ac_save_IFS=$IFS
+ IFS=:
+ set x $ac_tag
+ IFS=$ac_save_IFS
+ shift
+ ac_file=$1
+ shift
+
+ case $ac_mode in
+ :L) ac_source=$1;;
+ :[FH])
+ ac_file_inputs=
+ for ac_f
+ do
+ case $ac_f in
+ -) ac_f="$ac_tmp/stdin";;
+ *) # Look for the file first in the build tree, then in the source tree
+ # (if the path is not absolute). The absolute path cannot be DOS-style,
+ # because $ac_f cannot contain `:'.
+ test -f "$ac_f" ||
+ case $ac_f in
+ [\\/$]*) false;;
+ *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
+ esac ||
+ as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
+ esac
+ case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
+ as_fn_append ac_file_inputs " '$ac_f'"
+ done
+
+ # Let's still pretend it is `configure' which instantiates (i.e., don't
+ # use $as_me), people would be surprised to read:
+ # /* config.h. Generated by config.status. */
+ configure_input='Generated from '`
+ $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
+ `' by configure.'
+ if test x"$ac_file" != x-; then
+ configure_input="$ac_file. $configure_input"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
+$as_echo "$as_me: creating $ac_file" >&6;}
+ fi
+ # Neutralize special characters interpreted by sed in replacement strings.
+ case $configure_input in #(
+ *\&* | *\|* | *\\* )
+ ac_sed_conf_input=`$as_echo "$configure_input" |
+ sed 's/[\\\\&|]/\\\\&/g'`;; #(
+ *) ac_sed_conf_input=$configure_input;;
+ esac
+
+ case $ac_tag in
+ *:-:* | *:-) cat >"$ac_tmp/stdin" \
+ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
+ esac
+ ;;
+ esac
+
+ ac_dir=`$as_dirname -- "$ac_file" ||
+$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$ac_file" : 'X\(//\)[^/]' \| \
+ X"$ac_file" : 'X\(//\)$' \| \
+ X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$ac_file" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)[^/].*/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+ as_dir="$ac_dir"; as_fn_mkdir_p
+ ac_builddir=.
+
+case "$ac_dir" in
+.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
+*)
+ ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
+ # A ".." for each directory in $ac_dir_suffix.
+ ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
+ case $ac_top_builddir_sub in
+ "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
+ *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
+ esac ;;
+esac
+ac_abs_top_builddir=$ac_pwd
+ac_abs_builddir=$ac_pwd$ac_dir_suffix
+# for backward compatibility:
+ac_top_builddir=$ac_top_build_prefix
+
+case $srcdir in
+ .) # We are building in place.
+ ac_srcdir=.
+ ac_top_srcdir=$ac_top_builddir_sub
+ ac_abs_top_srcdir=$ac_pwd ;;
+ [\\/]* | ?:[\\/]* ) # Absolute name.
+ ac_srcdir=$srcdir$ac_dir_suffix;
+ ac_top_srcdir=$srcdir
+ ac_abs_top_srcdir=$srcdir ;;
+ *) # Relative name.
+ ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
+ ac_top_srcdir=$ac_top_build_prefix$srcdir
+ ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
+esac
+ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
+
+
+ case $ac_mode in
+ :F)
+ #
+ # CONFIG_FILE
+ #
+
+ case $INSTALL in
+ [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
+ *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
+ esac
+ ac_MKDIR_P=$MKDIR_P
+ case $MKDIR_P in
+ [\\/$]* | ?:[\\/]* ) ;;
+ */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
+ esac
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+# If the template does not know about datarootdir, expand it.
+# FIXME: This hack should be removed a few years after 2.60.
+ac_datarootdir_hack=; ac_datarootdir_seen=
+ac_sed_dataroot='
+/datarootdir/ {
+ p
+ q
+}
+/@datadir@/p
+/@docdir@/p
+/@infodir@/p
+/@localedir@/p
+/@mandir@/p'
+case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
+*datarootdir*) ac_datarootdir_seen=yes;;
+*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
+$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+ ac_datarootdir_hack='
+ s&@datadir@&$datadir&g
+ s&@docdir@&$docdir&g
+ s&@infodir@&$infodir&g
+ s&@localedir@&$localedir&g
+ s&@mandir@&$mandir&g
+ s&\\\${datarootdir}&$datarootdir&g' ;;
+esac
+_ACEOF
+
+# Neutralize VPATH when `$srcdir' = `.'.
+# Shell code in configure.ac might set extrasub.
+# FIXME: do we really want to maintain this feature?
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+ac_sed_extra="$ac_vpsub
+$extrasub
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+:t
+/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
+s|@configure_input@|$ac_sed_conf_input|;t t
+s&@top_builddir@&$ac_top_builddir_sub&;t t
+s&@top_build_prefix@&$ac_top_build_prefix&;t t
+s&@srcdir@&$ac_srcdir&;t t
+s&@abs_srcdir@&$ac_abs_srcdir&;t t
+s&@top_srcdir@&$ac_top_srcdir&;t t
+s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
+s&@builddir@&$ac_builddir&;t t
+s&@abs_builddir@&$ac_abs_builddir&;t t
+s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
+s&@INSTALL@&$ac_INSTALL&;t t
+s&@MKDIR_P@&$ac_MKDIR_P&;t t
+$ac_datarootdir_hack
+"
+eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
+ >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
+
+test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
+ { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
+ { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
+ "$ac_tmp/out"`; test -z "$ac_out"; } &&
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
+which seems to be undefined. Please make sure it is defined" >&5
+$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
+which seems to be undefined. Please make sure it is defined" >&2;}
+
+ rm -f "$ac_tmp/stdin"
+ case $ac_file in
+ -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
+ *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
+ esac \
+ || as_fn_error $? "could not create $ac_file" "$LINENO" 5
+ ;;
+
+
+ :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
+$as_echo "$as_me: executing $ac_file commands" >&6;}
+ ;;
+ esac
+
+
+ case $ac_file$ac_mode in
+ "depfiles":C) test x"$AMDEP_TRUE" != x"" || {
+ # Autoconf 2.62 quotes --file arguments for eval, but not when files
+ # are listed without --file. Let's play safe and only enable the eval
+ # if we detect the quoting.
+ case $CONFIG_FILES in
+ *\'*) eval set x "$CONFIG_FILES" ;;
+ *) set x $CONFIG_FILES ;;
+ esac
+ shift
+ for mf
+ do
+ # Strip MF so we end up with the name of the file.
+ mf=`echo "$mf" | sed -e 's/:.*$//'`
+ # Check whether this is an Automake generated Makefile or not.
+ # We used to match only the files named `Makefile.in', but
+ # some people rename them; so instead we look at the file content.
+ # Grep'ing the first line is not enough: some people post-process
+ # each Makefile.in and add a new line on top of each file to say so.
+ # Grep'ing the whole file is not good either: AIX grep has a line
+ # limit of 2048, but all sed's we know have understand at least 4000.
+ if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
+ dirpart=`$as_dirname -- "$mf" ||
+$as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$mf" : 'X\(//\)[^/]' \| \
+ X"$mf" : 'X\(//\)$' \| \
+ X"$mf" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$mf" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)[^/].*/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+ else
+ continue
+ fi
+ # Extract the definition of DEPDIR, am__include, and am__quote
+ # from the Makefile without running `make'.
+ DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
+ test -z "$DEPDIR" && continue
+ am__include=`sed -n 's/^am__include = //p' < "$mf"`
+ test -z "am__include" && continue
+ am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
+ # When using ansi2knr, U may be empty or an underscore; expand it
+ U=`sed -n 's/^U = //p' < "$mf"`
+ # Find all dependency output files, they are included files with
+ # $(DEPDIR) in their names. We invoke sed twice because it is the
+ # simplest approach to changing $(DEPDIR) to its actual value in the
+ # expansion.
+ for file in `sed -n "
+ s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
+ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
+ # Make sure the directory exists.
+ test -f "$dirpart/$file" && continue
+ fdir=`$as_dirname -- "$file" ||
+$as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$file" : 'X\(//\)[^/]' \| \
+ X"$file" : 'X\(//\)$' \| \
+ X"$file" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$file" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)[^/].*/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+ as_dir=$dirpart/$fdir; as_fn_mkdir_p
+ # echo "creating $dirpart/$file"
+ echo '# dummy' > "$dirpart/$file"
+ done
+ done
+}
+ ;;
+
+ esac
+done # for ac_tag
+
+
+as_fn_exit 0
+_ACEOF
+ac_clean_files=$ac_clean_files_save
+
+test $ac_write_fail = 0 ||
+ as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
+
+
+# configure is writing to config.log, and then calls config.status.
+# config.status does its own redirection, appending to config.log.
+# Unfortunately, on DOS this fails, as config.log is still kept open
+# by configure, so config.status won't be able to write to it; its
+# output is simply discarded. So we exec the FD to /dev/null,
+# effectively closing config.log, so it can be properly (re)opened and
+# appended to by config.status. When coming back to configure, we
+# need to make the FD available again.
+if test "$no_create" != yes; then
+ ac_cs_success=:
+ ac_config_status_args=
+ test "$silent" = yes &&
+ ac_config_status_args="$ac_config_status_args --quiet"
+ exec 5>/dev/null
+ $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
+ exec 5>>config.log
+ # Use ||, not &&, to avoid exiting from the if with $? = 1, which
+ # would make configure fail if this is the last instruction.
+ $ac_cs_success || as_fn_exit 1
+fi
+
+#
+# CONFIG_SUBDIRS section.
+#
+if test "$no_recursion" != yes; then
+
+ # Remove --cache-file, --srcdir, and --disable-option-checking arguments
+ # so they do not pile up.
+ ac_sub_configure_args=
+ ac_prev=
+ eval "set x $ac_configure_args"
+ shift
+ for ac_arg
+ do
+ if test -n "$ac_prev"; then
+ ac_prev=
+ continue
+ fi
+ case $ac_arg in
+ -cache-file | --cache-file | --cache-fil | --cache-fi \
+ | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
+ ac_prev=cache_file ;;
+ -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
+ | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* \
+ | --c=*)
+ ;;
+ --config-cache | -C)
+ ;;
+ -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
+ ac_prev=srcdir ;;
+ -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
+ ;;
+ -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
+ ac_prev=prefix ;;
+ -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
+ ;;
+ --disable-option-checking)
+ ;;
+ *)
+ case $ac_arg in
+ *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
+ esac
+ as_fn_append ac_sub_configure_args " '$ac_arg'" ;;
+ esac
+ done
+
+ # Always prepend --prefix to ensure using the same prefix
+ # in subdir configurations.
+ ac_arg="--prefix=$prefix"
+ case $ac_arg in
+ *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
+ esac
+ ac_sub_configure_args="'$ac_arg' $ac_sub_configure_args"
+
+ # Pass --silent
+ if test "$silent" = yes; then
+ ac_sub_configure_args="--silent $ac_sub_configure_args"
+ fi
+
+ # Always prepend --disable-option-checking to silence warnings, since
+ # different subdirs can have different --enable and --with options.
+ ac_sub_configure_args="--disable-option-checking $ac_sub_configure_args"
+
+ ac_popdir=`pwd`
+ for ac_dir in : $subdirs; do test "x$ac_dir" = x: && continue
+
+ # Do not complain, so a configure script can configure whichever
+ # parts of a large source tree are present.
+ test -d "$srcdir/$ac_dir" || continue
+
+ ac_msg="=== configuring in $ac_dir (`pwd`/$ac_dir)"
+ $as_echo "$as_me:${as_lineno-$LINENO}: $ac_msg" >&5
+ $as_echo "$ac_msg" >&6
+ as_dir="$ac_dir"; as_fn_mkdir_p
+ ac_builddir=.
+
+case "$ac_dir" in
+.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
+*)
+ ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
+ # A ".." for each directory in $ac_dir_suffix.
+ ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
+ case $ac_top_builddir_sub in
+ "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
+ *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
+ esac ;;
+esac
+ac_abs_top_builddir=$ac_pwd
+ac_abs_builddir=$ac_pwd$ac_dir_suffix
+# for backward compatibility:
+ac_top_builddir=$ac_top_build_prefix
+
+case $srcdir in
+ .) # We are building in place.
+ ac_srcdir=.
+ ac_top_srcdir=$ac_top_builddir_sub
+ ac_abs_top_srcdir=$ac_pwd ;;
+ [\\/]* | ?:[\\/]* ) # Absolute name.
+ ac_srcdir=$srcdir$ac_dir_suffix;
+ ac_top_srcdir=$srcdir
+ ac_abs_top_srcdir=$srcdir ;;
+ *) # Relative name.
+ ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
+ ac_top_srcdir=$ac_top_build_prefix$srcdir
+ ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
+esac
+ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
+
+
+ cd "$ac_dir"
+
+ # Check for guested configure; otherwise get Cygnus style configure.
+ if test -f "$ac_srcdir/configure.gnu"; then
+ ac_sub_configure=$ac_srcdir/configure.gnu
+ elif test -f "$ac_srcdir/configure"; then
+ ac_sub_configure=$ac_srcdir/configure
+ elif test -f "$ac_srcdir/configure.in"; then
+ # This should be Cygnus configure.
+ ac_sub_configure=$ac_aux_dir/configure
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no configuration information is in $ac_dir" >&5
+$as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2;}
+ ac_sub_configure=
+ fi
+
+ # The recursion is here.
+ if test -n "$ac_sub_configure"; then
+ # Make the cache file name correct relative to the subdirectory.
+ case $cache_file in
+ [\\/]* | ?:[\\/]* ) ac_sub_cache_file=$cache_file ;;
+ *) # Relative name.
+ ac_sub_cache_file=$ac_top_build_prefix$cache_file ;;
+ esac
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&5
+$as_echo "$as_me: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&6;}
+ # The eval makes quoting arguments work.
+ eval "\$SHELL \"\$ac_sub_configure\" $ac_sub_configure_args \
+ --cache-file=\"\$ac_sub_cache_file\" --srcdir=\"\$ac_srcdir\"" ||
+ as_fn_error $? "$ac_sub_configure failed for $ac_dir" "$LINENO" 5
+ fi
+
+ cd "$ac_popdir"
+ done
+fi
+if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
+$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
+fi
+
diff --git a/newlib/libc/sys/phoenix/configure.in b/newlib/libc/sys/phoenix/configure.in
new file mode 100644
index 000000000..8592b7c82
--- /dev/null
+++ b/newlib/libc/sys/phoenix/configure.in
@@ -0,0 +1,19 @@
+dnl This is the newlib/libc/sys/phoenix configure.in file.
+dnl Process this file with autoconf to produce a configure script.
+
+AC_PREREQ(2.59)
+AC_INIT([newlib],[NEWLIB_VERSION])
+AC_CONFIG_SRCDIR([phoenix.c])
+
+dnl Can't be done in NEWLIB_CONFIGURE because that confuses automake.
+AC_CONFIG_AUX_DIR(../../../..)
+
+NEWLIB_CONFIGURE(../../..)
+
+AC_CONFIG_SUBDIRS(machine)
+
+PHOENIX_MACH_LIB=machine/lib.${aext}
+AC_SUBST(PHOENIX_MACH_LIB)
+
+AC_CONFIG_FILES([Makefile])
+AC_OUTPUT
diff --git a/newlib/libc/sys/phoenix/dup.c b/newlib/libc/sys/phoenix/dup.c
new file mode 100644
index 000000000..f355463a6
--- /dev/null
+++ b/newlib/libc/sys/phoenix/dup.c
@@ -0,0 +1,50 @@
+/* Copyright (c) 2016 Phoenix Systems
+ 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 "syscall.h"
+
+#include <errno.h>
+#include <fcntl.h>
+
+int dup(int oldfd)
+{
+ int ret = fcntl(oldfd, F_DUPFD, 0);
+ if (ret < 0) {
+ errno = -ret;
+ return -1;
+ }
+
+ return ret;
+}
+
+int dup2(int oldfd, int newfd)
+{
+ int ret = syscall2(int, SYS_DUP2, oldfd, newfd);
+ if (ret < 0) {
+ errno = -ret;
+ return -1;
+ }
+
+ return ret;
+}
diff --git a/newlib/libc/sys/phoenix/endmntent.c b/newlib/libc/sys/phoenix/endmntent.c
new file mode 100644
index 000000000..ada760787
--- /dev/null
+++ b/newlib/libc/sys/phoenix/endmntent.c
@@ -0,0 +1,31 @@
+/* Copyright (c) 2016 Phoenix Systems
+ 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 <stdio.h>
+
+int endmntent(FILE *fp)
+{
+ fclose(fp);
+ return 1;
+}
diff --git a/newlib/libc/sys/phoenix/exec.c b/newlib/libc/sys/phoenix/exec.c
new file mode 100644
index 000000000..341ef97e9
--- /dev/null
+++ b/newlib/libc/sys/phoenix/exec.c
@@ -0,0 +1,55 @@
+/* Copyright (c) 2016 Phoenix Systems
+ 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 "syscall.h"
+
+#include <errno.h>
+#include <stdio.h>
+
+int execve(const char *filename, char *const argv[], char *const envp[])
+{
+ int ret = syscall3(int, SYS_EXECVE, filename, argv, envp);
+ if (ret < 0) {
+ errno = -ret;
+ return -1;
+ }
+
+ return ret;
+}
+
+int _execve(const char *filename, char *const argv[], char *const envp[])
+{
+ return execve(filename, argv, envp);
+}
+
+void exit(int status)
+{
+ fflush(NULL);
+ syscall1(int, SYS_EXIT, status);
+}
+
+void _exit(int status)
+{
+ exit(status);
+}
diff --git a/newlib/libc/sys/phoenix/fcntl.c b/newlib/libc/sys/phoenix/fcntl.c
new file mode 100644
index 000000000..d89706598
--- /dev/null
+++ b/newlib/libc/sys/phoenix/fcntl.c
@@ -0,0 +1,48 @@
+/* Copyright (c) 2016 Phoenix Systems
+ 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 "syscall.h"
+
+#include <errno.h>
+#include <fcntl.h>
+#include <stdarg.h>
+
+int fcntl( int fd , int cmd, ...)
+{
+ int arg = 0;
+ if ((cmd == F_DUPFD) || (cmd == F_SETFD) || (cmd == F_SETFL)) {
+ va_list args;
+ va_start(args, cmd);
+ arg = va_arg(args, int);
+ va_end(args);
+ }
+
+ int ret = syscall3(int, SYS_FCNTL, fd, cmd, arg);
+ if (ret < 0) {
+ errno = -ret;
+ return -1;
+ }
+
+ return ret;
+}
diff --git a/newlib/libc/sys/phoenix/fork.c b/newlib/libc/sys/phoenix/fork.c
new file mode 100644
index 000000000..696ce08c6
--- /dev/null
+++ b/newlib/libc/sys/phoenix/fork.c
@@ -0,0 +1,44 @@
+/* Copyright (c) 2016 Phoenix Systems
+ 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 "syscall.h"
+
+#include <errno.h>
+#include <sys/types.h>
+
+pid_t fork()
+{
+ int ret = syscall3(int, SYS_FORK, 0x10, 0x20, 0x30);
+ if (ret < 0) {
+ errno = -ret;
+ return -1;
+ }
+
+ return ret;
+}
+
+pid_t vfork()
+{
+ return fork();
+}
diff --git a/newlib/libc/sys/phoenix/fs.c b/newlib/libc/sys/phoenix/fs.c
new file mode 100644
index 000000000..bde35e1fc
--- /dev/null
+++ b/newlib/libc/sys/phoenix/fs.c
@@ -0,0 +1,130 @@
+/* Copyright (c) 2016 Phoenix Systems
+ 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 "syscall.h"
+
+#include <errno.h>
+#include <fcntl.h>
+#include <malloc.h>
+#include <stdio.h>
+#include <sys/dirent.h>
+#include <sys/stat.h>
+
+#define MAX_PATH 1024
+
+int mkdir(const char *pathname, mode_t mode)
+{
+ int ret = syscall2(int, SYS_MKDIR, pathname, mode);
+ if (ret < 0) {
+ errno = -ret;
+ return -1;
+ }
+
+ return ret;
+}
+
+int rmdir(const char *pathname)
+{
+ int ret = syscall1(int, SYS_RMDIR, pathname);
+ if (ret < 0) {
+ errno = -ret;
+ return -1;
+ }
+
+ return ret;
+}
+
+int chdir(const char *path)
+{
+ int ret = syscall1(int, SYS_SETCWD, path);
+ if (ret < 0) {
+ errno = -ret;
+ return -1;
+ }
+
+ return ret;
+}
+
+char *getcwd(char *buf, size_t size)
+{
+ if (buf == NULL)
+ buf = (char *) malloc(MAX_PATH);
+
+ int ret = syscall2(int, SYS_GETCWD, buf, size);
+ if (ret < 0) {
+ errno = -ret;
+ return NULL;
+ }
+
+ return buf;
+}
+
+int unlink(const char *pathname)
+{
+ int ret = syscall1(int, SYS_UNLINK, pathname);
+ if (ret < 0) {
+ errno = -ret;
+ return -1;
+ }
+
+ return ret;
+}
+
+int mkfifo(const char *pathname, mode_t mode)
+{
+ int ret = syscall3(int, SYS_OPEN, pathname, O_CREAT, (mode | S_IFIFO));
+ if (ret < 0) {
+ errno = -ret;
+ return -1;
+ }
+
+ return ret;
+}
+
+int mknod(const char *pathname, mode_t mode, dev_t dev)
+{
+ int ret = syscall3(int, SYS_MKNOD, pathname, mode, dev);
+ if (ret < 0) {
+ errno = -ret;
+ return -1;
+ }
+
+ return ret;
+}
+
+int getdents(unsigned int fd, struct dirent *dirp, unsigned int count)
+{
+ int ret = syscall3(int, SYS_GETDENTS, fd, dirp, count);
+ if (ret < 0) {
+ errno = -ret;
+ return -1;
+ }
+
+ return ret;
+}
+
+int chroot(const char *path)
+{
+ return chdir(path);
+}
diff --git a/newlib/libc/sys/phoenix/getmntent.c b/newlib/libc/sys/phoenix/getmntent.c
new file mode 100644
index 000000000..74d00b15b
--- /dev/null
+++ b/newlib/libc/sys/phoenix/getmntent.c
@@ -0,0 +1,101 @@
+/* Copyright (c) 2016 Phoenix Systems
+ 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 <errno.h>
+#include <mntent.h>
+#include <malloc.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+#define COLUMN_FS_NAME 0
+#define COLUMN_MOUNTPOINT 1
+#define COLUMN_FS_TYPE 2
+#define COLUMN_OPTS 3
+#define COLUMN_DUMP_FREQ 4
+#define COLUMN_PASSNO 5
+
+#define BUFFER_SIZE 4096
+
+struct mntent *getmntent_r(FILE *fp, struct mntent *result, char *buffer, int bufsize)
+{
+ char *token, *buff_ptr;
+ char *line = NULL;
+ size_t size = 0;
+ int i;
+
+ buff_ptr = buffer;
+
+ if (getline(&line, &size, fp) == -1) {
+ free(line);
+ return NULL;
+ }
+
+ for (token = strtok(line, " "), i = 0; token != NULL; token = strtok(NULL, " "), ++i) {
+ if (((buff_ptr + strlen(token) + 1) - buffer) > bufsize) {
+ errno = ENOBUFS;
+ free(line);
+ return NULL;
+ }
+
+ switch (i) {
+ case COLUMN_FS_NAME:
+ result->mnt_fsname = strcpy(buff_ptr, token);
+ break;
+ case COLUMN_MOUNTPOINT:
+ result->mnt_dir = strcpy(buff_ptr, token);
+ break;
+ case COLUMN_FS_TYPE:
+ result->mnt_type = strcpy(buff_ptr, token);
+ break;
+ case COLUMN_OPTS:
+ result->mnt_opts = strcpy(buff_ptr, token);
+ break;
+ case COLUMN_DUMP_FREQ:
+ result->mnt_freq = atoi(token);
+ break;
+ case COLUMN_PASSNO:
+ result->mnt_passno = atoi(token);
+ break;
+ default:
+ free(line);
+ return NULL;
+ }
+
+ buff_ptr += strlen(token) + 1;
+ }
+
+ free(line);
+ return result;
+}
+
+struct mntent *getmntent(FILE *fp)
+{
+ static struct mntent result;
+ static char buffer[BUFFER_SIZE];
+ memset(&result, 0, sizeof(struct mntent));
+ memset(buffer, 0, sizeof(buffer));
+
+ return getmntent_r(fp, &result, buffer, sizeof(buffer));
+}
diff --git a/newlib/libc/sys/phoenix/getpagesize.c b/newlib/libc/sys/phoenix/getpagesize.c
new file mode 100644
index 000000000..3b3942279
--- /dev/null
+++ b/newlib/libc/sys/phoenix/getpagesize.c
@@ -0,0 +1,31 @@
+/* Copyright (c) 2016 Phoenix Systems
+ 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.*/
+
+#define PHOENIX_PAGESIZE 0x1000
+
+int getpagesize()
+{
+ /* TODO: consider making it a syscall. */
+ return PHOENIX_PAGESIZE;
+}
diff --git a/newlib/libc/sys/phoenix/groups.c b/newlib/libc/sys/phoenix/groups.c
new file mode 100644
index 000000000..11cc079e4
--- /dev/null
+++ b/newlib/libc/sys/phoenix/groups.c
@@ -0,0 +1,100 @@
+/* Copyright (c) 2016 Phoenix Systems
+ 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 "syscall.h"
+
+ #include <errno.h>
+ #include <stdio.h>
+ #include <sys/types.h>
+
+int initgroups(const char *user, gid_t group)
+{
+ /* TODO: implement. */
+ if(user == NULL) {
+ errno = EINVAL;
+ return -1;
+ }
+
+ return 0;
+}
+
+int getgroups(int size, gid_t list[])
+{
+ int ret = syscall2(int, SYS_GETGROUPS, size, list);
+ if(ret < 0) {
+ errno = -ret;
+ return -1;
+ }
+
+ return ret;
+}
+
+int setgroups(size_t size, const gid_t *list)
+{
+ int ret = syscall2(int, SYS_SETGROUPS, size, list);
+ if(ret < 0) {
+ errno = -ret;
+ return -1;
+ }
+
+ return ret;
+}
+
+struct group *getgrent()
+{
+ /* TODO: implement. */
+ errno = ENOSYS;
+ return NULL;
+}
+
+void setgrent()
+{
+ /* TODO: implement. */
+}
+
+void endgrent()
+{
+ /* TODO: implement. */
+}
+
+struct group *getgrnam(const char *name)
+{
+ /* TODO: implement. */
+ errno = ENOSYS;
+ return NULL;
+}
+
+struct group *getgrgid(gid_t gid)
+{
+ /* TODO: implement. */
+ errno = ENOSYS;
+ return NULL;
+}
+
+int setpgrp(pid_t pid, pid_t pgid)
+{
+ /* TODO: implement. */
+ errno = ENOSYS;
+ return NULL;
+}
diff --git a/newlib/libc/sys/phoenix/ids.c b/newlib/libc/sys/phoenix/ids.c
new file mode 100644
index 000000000..7f88edf2e
--- /dev/null
+++ b/newlib/libc/sys/phoenix/ids.c
@@ -0,0 +1,137 @@
+/* Copyright (c) 2016 Phoenix Systems
+ 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 "syscall.h"
+
+#include <errno.h>
+#include <sys/types.h>
+#include <unistd.h>
+
+uid_t getuid()
+{
+ return syscall0(int, SYS_GETUID);
+}
+
+uid_t geteuid()
+{
+ return syscall0(int, SYS_GETEUID);
+}
+
+int setuid(uid_t uid)
+{
+ int ret = syscall1(int, SYS_SETUID, (unsigned int) uid);
+ if (ret < 0) {
+ errno = -ret;
+ return -1;
+ }
+
+ return ret;
+}
+
+int seteuid(uid_t euid)
+{
+ int ret = syscall1(int, SYS_SETEUID, (unsigned int) euid);
+ if (ret < 0) {
+ errno = -ret;
+ return -1;
+ }
+
+ return ret;
+}
+
+int setreuid(uid_t ruid, uid_t euid)
+{
+ int ret = syscall2(int, SYS_SETREUID, (unsigned int) ruid, (unsigned int) euid);
+ if (ret < 0) {
+ errno = -ret;
+ return -1;
+ }
+
+ return ret;
+}
+
+gid_t getgid()
+{
+ return syscall0(int, SYS_GETGID);
+}
+
+gid_t getegid()
+{
+ return syscall0(int, SYS_GETEGID);
+}
+
+int setgid(gid_t gid)
+{
+ int ret = syscall2(int, SYS_SETGID, (unsigned int) gid, 0);
+ if (ret < 0) {
+ errno = -ret;
+ return -1;
+ }
+
+ return ret;
+}
+
+int setegid(gid_t egid)
+{
+ int ret = syscall1(int, SYS_SETEGID, (unsigned int) egid);
+ if (ret < 0) {
+ errno = -ret;
+ return -1;
+ }
+
+ return ret;
+}
+
+int setregid(gid_t rgid, gid_t egid)
+{
+ int ret = syscall2(int, SYS_SETREGID, (unsigned int) rgid, (unsigned int) egid);
+ if (ret < 0) {
+ errno = -ret;
+ return -1;
+ }
+
+ return ret;
+}
+
+int setpgid(pid_t pid, pid_t pgid)
+{
+ int ret = syscall2(int, SYS_SETGID, pgid, pid);
+ if (ret < 0) {
+ errno = -ret;
+ return -1;
+ }
+
+ return ret;
+}
+
+pid_t getsid(pid_t pid)
+{
+ errno = ENOSYS;
+ return -1;
+}
+
+pid_t setsid()
+{
+ return getpid();
+}
diff --git a/newlib/libc/sys/phoenix/include/arpa/inet.h b/newlib/libc/sys/phoenix/include/arpa/inet.h
new file mode 100644
index 000000000..aca1920b2
--- /dev/null
+++ b/newlib/libc/sys/phoenix/include/arpa/inet.h
@@ -0,0 +1,46 @@
+/* Copyright (c) 2016 Phoenix Systems
+ 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.*/
+
+#ifndef _ARPA_INET_H
+#define _ARPA_INET_H
+
+#include <netinet/in.h>
+#include <stdint.h>
+
+#define INET_ADDRSTRLEN 16
+#define INET6_ADDRSTRLEN 46
+
+int inet_aton(const char *cp, struct in_addr *inp);
+in_addr_t inet_addr(const char *cp);
+in_addr_t inet_network(const char *cp);
+char *inet_ntoa(struct in_addr in);
+struct in_addr inet_makeaddr(in_addr_t net, in_addr_t host);
+in_addr_t inet_lnaof(struct in_addr in);
+in_addr_t inet_netof(struct in_addr in);
+const char *inet_ntop(int af, const void *src, char *dst, socklen_t size);
+int inet_pton(int af, const char *src, void *dst);
+int inet_net_pton(int af, const char *pres, void *netp, size_t nsize);
+char *inet_net_ntop(int af, const void *netp, int bits, char *pres, size_t psize);
+
+#endif
diff --git a/newlib/libc/sys/phoenix/include/arpa/nameser.h b/newlib/libc/sys/phoenix/include/arpa/nameser.h
new file mode 100644
index 000000000..bf542d95c
--- /dev/null
+++ b/newlib/libc/sys/phoenix/include/arpa/nameser.h
@@ -0,0 +1,44 @@
+/* Copyright (c) 2016 Phoenix Systems
+ 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.*/
+
+#ifndef _ARPA_NAMESER_H
+#define _ARPA_NAMESER_H
+
+/* Define constants based on RFC 883, RFC 1034, RFC 1035 */
+#define NS_PACKETSZ 512 /* Maximum packet size */
+#define NS_MAXDNAME 1025 /* Maximum domain name */
+#define NS_MAXCDNAME 255 /* Maximum compressed domain name */
+#define NS_MAXLABEL 63 /* Maximum length of domain label */
+#define NS_HFIXEDSZ 12 /* Bytes of fixed data in header */
+#define NS_QFIXEDSZ 4 /* Bytes of fixed data in query */
+#define NS_RRFIXEDSZ 10 /* Bytes of fixed data in r record */
+#define NS_INT32SZ 4 /* Bytes of data in a u_int32_t */
+#define NS_INT16SZ 2 /* Bytes of data in a u_int16_t */
+#define NS_INT8SZ 1 /* Bytes of data in a u_int8_t */
+#define NS_INADDRSZ 4 /* IPv4 T_A */
+#define NS_IN6ADDRSZ 16 /* IPv6 T_AAAA */
+#define NS_CMPRSFLGS 0xc0 /* Flag bits indicating name compression. */
+#define NS_DEFAULTPORT 53 /* For both TCP and UDP. */
+
+#endif
diff --git a/newlib/libc/sys/phoenix/include/arpa/telnet.h b/newlib/libc/sys/phoenix/include/arpa/telnet.h
new file mode 100644
index 000000000..44ffe084d
--- /dev/null
+++ b/newlib/libc/sys/phoenix/include/arpa/telnet.h
@@ -0,0 +1,331 @@
+/*
+ * Copyright (c) 1983, 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.
+ *
+ * @(#)telnet.h 8.2 (Berkeley) 12/15/93
+ * $FreeBSD: src/include/arpa/telnet.h,v 1.8 2001/12/03 12:41:18 markm Exp $
+ */
+
+/* Copied from Linux, modified for Phoenix-RTOS. */
+
+#ifndef _ARPA_TELNET_H
+#define _ARPA_TELNET_H
+
+/* Definitions for the TELNET protocol. */
+#define IAC 255 /* interpret as command: */
+#define DONT 254 /* you are not to use option */
+#define DO 253 /* please, you use option */
+#define WONT 252 /* I won't use option */
+#define WILL 251 /* I will use option */
+#define SB 250 /* interpret as subnegotiation */
+#define GA 249 /* you may reverse the line */
+#define EL 248 /* erase the current line */
+#define EC 247 /* erase the current character */
+#define AYT 246 /* are you there */
+#define AO 245 /* abort output--but let prog finish */
+#define IP 244 /* interrupt process--permanently */
+#define BREAK 243 /* break */
+#define DM 242 /* data mark--for connect. cleaning */
+#define NOP 241 /* nop */
+#define SE 240 /* end sub negotiation */
+#define EOR 239 /* end of record (transparent mode) */
+#define ABORT 238 /* Abort process */
+#define SUSP 237 /* Suspend process */
+#define xEOF 236 /* End of file: EOF is already used... */
+
+#define SYNCH 242 /* for telfunc calls */
+
+#ifdef TELCMDS
+const char *telcmds[] = {
+ "EOF", "SUSP", "ABORT", "EOR",
+ "SE", "NOP", "DMARK", "BRK", "IP", "AO", "AYT", "EC",
+ "EL", "GA", "SB", "WILL", "WONT", "DO", "DONT", "IAC",
+ 0
+};
+#else
+extern char *telcmds[];
+#endif
+
+#define TELCMD_FIRST xEOF
+#define TELCMD_LAST IAC
+#define TELCMD_OK(x) ((unsigned int)(x) <= TELCMD_LAST && (unsigned int)(x) >= TELCMD_FIRST)
+#define TELCMD(x) telcmds[(x)-TELCMD_FIRST]
+
+/* telnet options */
+#define TELOPT_BINARY 0 /* 8-bit data path */
+#define TELOPT_ECHO 1 /* echo */
+#define TELOPT_RCP 2 /* prepare to reconnect */
+#define TELOPT_SGA 3 /* suppress go ahead */
+#define TELOPT_NAMS 4 /* approximate message size */
+#define TELOPT_STATUS 5 /* give status */
+#define TELOPT_TM 6 /* timing mark */
+#define TELOPT_RCTE 7 /* remote controlled transmission and echo */
+#define TELOPT_NAOL 8 /* negotiate about output line width */
+#define TELOPT_NAOP 9 /* negotiate about output page size */
+#define TELOPT_NAOCRD 10 /* negotiate about CR disposition */
+#define TELOPT_NAOHTS 11 /* negotiate about horizontal tabstops */
+#define TELOPT_NAOHTD 12 /* negotiate about horizontal tab disposition */
+#define TELOPT_NAOFFD 13 /* negotiate about formfeed disposition */
+#define TELOPT_NAOVTS 14 /* negotiate about vertical tab stops */
+#define TELOPT_NAOVTD 15 /* negotiate about vertical tab disposition */
+#define TELOPT_NAOLFD 16 /* negotiate about output LF disposition */
+#define TELOPT_XASCII 17 /* extended ascic character set */
+#define TELOPT_LOGOUT 18 /* force logout */
+#define TELOPT_BM 19 /* byte macro */
+#define TELOPT_DET 20 /* data entry terminal */
+#define TELOPT_SUPDUP 21 /* supdup protocol */
+#define TELOPT_SUPDUPOUTPUT 22 /* supdup output */
+#define TELOPT_SNDLOC 23 /* send location */
+#define TELOPT_TTYPE 24 /* terminal type */
+#define TELOPT_EOR 25 /* end or record */
+#define TELOPT_TUID 26 /* TACACS user identification */
+#define TELOPT_OUTMRK 27 /* output marking */
+#define TELOPT_TTYLOC 28 /* terminal location number */
+#define TELOPT_3270REGIME 29 /* 3270 regime */
+#define TELOPT_X3PAD 30 /* X.3 PAD */
+#define TELOPT_NAWS 31 /* window size */
+#define TELOPT_TSPEED 32 /* terminal speed */
+#define TELOPT_LFLOW 33 /* remote flow control */
+#define TELOPT_LINEMODE 34 /* Linemode option */
+#define TELOPT_XDISPLOC 35 /* X Display Location */
+#define TELOPT_OLD_ENVIRON 36 /* Old - Environment variables */
+#define TELOPT_AUTHENTICATION 37 /* Authenticate */
+#define TELOPT_ENCRYPT 38 /* Encryption option */
+#define TELOPT_NEW_ENVIRON 39 /* New - Environment variables */
+#define TELOPT_EXOPL 255 /* extended-options-list */
+
+
+#define NTELOPTS (1+TELOPT_NEW_ENVIRON)
+#ifdef TELOPTS
+const char *telopts[NTELOPTS + 1] = {
+ "BINARY", "ECHO", "RCP", "SUPPRESS GO AHEAD", "NAME",
+ "STATUS", "TIMING MARK", "RCTE", "NAOL", "NAOP",
+ "NAOCRD", "NAOHTS", "NAOHTD", "NAOFFD", "NAOVTS",
+ "NAOVTD", "NAOLFD", "EXTEND ASCII", "LOGOUT", "BYTE MACRO",
+ "DATA ENTRY TERMINAL", "SUPDUP", "SUPDUP OUTPUT",
+ "SEND LOCATION", "TERMINAL TYPE", "END OF RECORD",
+ "TACACS UID", "OUTPUT MARKING", "TTYLOC",
+ "3270 REGIME", "X.3 PAD", "NAWS", "TSPEED", "LFLOW",
+ "LINEMODE", "XDISPLOC", "OLD-ENVIRON", "AUTHENTICATION",
+ "ENCRYPT", "NEW-ENVIRON",
+ 0
+};
+
+#define TELOPT_FIRST TELOPT_BINARY
+#define TELOPT_LAST TELOPT_NEW_ENVIRON
+#define TELOPT_OK(x) ((unsigned int)(x) <= TELOPT_LAST)
+#define TELOPT(x) telopts[(x)-TELOPT_FIRST]
+#endif
+
+/* Sub-option qualifiers */
+#define TELQUAL_IS 0 /* Option is... */
+#define TELQUAL_SEND 1 /* Send option */
+#define TELQUAL_INFO 2 /* ENVIRON: informational version of IS */
+#define TELQUAL_REPLY 2 /* AUTHENTICATION: client version of IS */
+#define TELQUAL_NAME 3 /* AUTHENTICATION: client version of IS */
+
+#define LFLOW_OFF 0 /* Disable remote flow control */
+#define LFLOW_ON 1 /* Enable remote flow control */
+#define LFLOW_RESTART_ANY 2 /* Restart output on any char */
+#define LFLOW_RESTART_XON 3 /* Restart output only on XON */
+
+/* LINEMODE suboptions */
+#define LM_MODE 1
+#define LM_FORWARDMASK 2
+#define LM_SLC 3
+
+#define MODE_EDIT 0x01
+#define MODE_TRAPSIG 0x02
+#define MODE_ACK 0x04
+#define MODE_SOFT_TAB 0x08
+#define MODE_LIT_ECHO 0x10
+#define MODE_MASK 0x1f
+
+/* Not part of protocol, but needed to simplify things... */
+#define MODE_FLOW 0x0100
+#define MODE_ECHO 0x0200
+#define MODE_INBIN 0x0400
+#define MODE_OUTBIN 0x0800
+#define MODE_FORCE 0x1000
+
+#define SLC_SYNCH 1
+#define SLC_BRK 2
+#define SLC_IP 3
+#define SLC_AO 4
+#define SLC_AYT 5
+#define SLC_EOR 6
+#define SLC_ABORT 7
+#define SLC_EOF 8
+#define SLC_SUSP 9
+#define SLC_EC 10
+#define SLC_EL 11
+#define SLC_EW 12
+#define SLC_RP 13
+#define SLC_LNEXT 14
+#define SLC_XON 15
+#define SLC_XOFF 16
+#define SLC_FORW1 17
+#define SLC_FORW2 18
+#define SLC_MCL 19
+#define SLC_MCR 20
+#define SLC_MCWL 21
+#define SLC_MCWR 22
+#define SLC_MCBOL 23
+#define SLC_MCEOL 24
+#define SLC_INSRT 25
+#define SLC_OVER 26
+#define SLC_ECR 27
+#define SLC_EWR 28
+#define SLC_EBOL 29
+#define SLC_EEOL 30
+
+#define NSLC 30
+
+/*
+ * For backwards compatibility, we define SLC_NAMES to be the
+ * list of names if SLC_NAMES is not defined.
+ */
+#define SLC_NAMELIST "0", "SYNCH", "BRK", "IP", "AO", "AYT", "EOR", \
+ "ABORT", "EOF", "SUSP", "EC", "EL", "EW", "RP", \
+ "LNEXT", "XON", "XOFF", "FORW1", "FORW2", \
+ "MCL", "MCR", "MCWL", "MCWR", "MCBOL", \
+ "MCEOL", "INSRT", "OVER", "ECR", "EWR", \
+ "EBOL", "EEOL", \
+ 0
+
+#ifdef SLC_NAMES
+const char *slc_names[] = {
+ SLC_NAMELIST
+};
+#else
+extern char *slc_names[];
+#define SLC_NAMES SLC_NAMELIST
+#endif
+
+#define SLC_NAME_OK(x) ((unsigned int)(x) <= NSLC)
+#define SLC_NAME(x) slc_names[x]
+
+#define SLC_NOSUPPORT 0
+#define SLC_CANTCHANGE 1
+#define SLC_VARIABLE 2
+#define SLC_DEFAULT 3
+#define SLC_LEVELBITS 0x03
+
+#define SLC_FUNC 0
+#define SLC_FLAGS 1
+#define SLC_VALUE 2
+
+#define SLC_ACK 0x80
+#define SLC_FLUSHIN 0x40
+#define SLC_FLUSHOUT 0x20
+
+#define OLD_ENV_VAR 1
+#define OLD_ENV_VALUE 0
+#define NEW_ENV_VAR 0
+#define NEW_ENV_VALUE 1
+#define ENV_ESC 2
+#define ENV_USERVAR 3
+
+/* AUTHENTICATION suboptions */
+
+/* Who is authenticating who ... */
+#define AUTH_WHO_CLIENT 0 /* Client authenticating server */
+#define AUTH_WHO_SERVER 1 /* Server authenticating client */
+#define AUTH_WHO_MASK 1
+
+/* Amount of authentication done */
+#define AUTH_HOW_ONE_WAY 0
+#define AUTH_HOW_MUTUAL 2
+#define AUTH_HOW_MASK 2
+
+#define AUTHTYPE_NULL 0
+#define AUTHTYPE_KERBEROS_V4 1
+#define AUTHTYPE_KERBEROS_V5 2
+#define AUTHTYPE_SPX 3
+#define AUTHTYPE_MINK 4
+#define AUTHTYPE_SRA 6
+#define AUTHTYPE_CNT 7
+
+#define AUTHTYPE_TEST 99
+
+#ifdef AUTH_NAMES
+const char *authtype_names[] = {
+ "NULL", "KERBEROS_V4", "KERBEROS_V5", "SPX", "MINK", NULL, "SRA",
+ 0
+};
+#else
+extern char *authtype_names[];
+#endif
+
+#define AUTHTYPE_NAME_OK(x) ((unsigned int)(x) < AUTHTYPE_CNT)
+#define AUTHTYPE_NAME(x) authtype_names[x]
+
+/* ENCRYPTion suboptions */
+#define ENCRYPT_IS 0 /* I pick encryption type ... */
+#define ENCRYPT_SUPPORT 1 /* I support encryption types ... */
+#define ENCRYPT_REPLY 2 /* Initial setup response */
+#define ENCRYPT_START 3 /* Am starting to send encrypted */
+#define ENCRYPT_END 4 /* Am ending encrypted */
+#define ENCRYPT_REQSTART 5 /* Request you start encrypting */
+#define ENCRYPT_REQEND 6 /* Request you end encrypting */
+#define ENCRYPT_ENC_KEYID 7
+#define ENCRYPT_DEC_KEYID 8
+#define ENCRYPT_CNT 9
+
+#define ENCTYPE_ANY 0
+#define ENCTYPE_DES_CFB64 1
+#define ENCTYPE_DES_OFB64 2
+#define ENCTYPE_CNT 3
+
+#ifdef ENCRYPT_NAMES
+const char *encrypt_names[] = {
+ "IS", "SUPPORT", "REPLY", "START", "END",
+ "REQUEST-START", "REQUEST-END", "ENC-KEYID", "DEC-KEYID",
+ 0
+};
+
+const char *enctype_names[] = {
+ "ANY", "DES_CFB64", "DES_OFB64",
+ 0
+};
+#else
+extern char *encrypt_names[];
+extern char *enctype_names[];
+#endif
+
+
+#define ENCRYPT_NAME_OK(x) ((unsigned int)(x) < ENCRYPT_CNT)
+#define ENCRYPT_NAME(x) encrypt_names[x]
+
+#define ENCTYPE_NAME_OK(x) ((unsigned int)(x) < ENCTYPE_CNT)
+#define ENCTYPE_NAME(x) enctype_names[x]
+
+#endif
diff --git a/newlib/libc/sys/phoenix/include/features.h b/newlib/libc/sys/phoenix/include/features.h
new file mode 100644
index 000000000..34192dd7e
--- /dev/null
+++ b/newlib/libc/sys/phoenix/include/features.h
@@ -0,0 +1,30 @@
+/* Copyright (c) 2016 Phoenix Systems
+ 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.*/
+
+#ifndef FEATURES_H
+#define FEATURES_H
+
+#include <sys/features.h>
+
+#endif
diff --git a/newlib/libc/sys/phoenix/include/mntent.h b/newlib/libc/sys/phoenix/include/mntent.h
new file mode 100644
index 000000000..8685ab57c
--- /dev/null
+++ b/newlib/libc/sys/phoenix/include/mntent.h
@@ -0,0 +1,66 @@
+/* Copyright (c) 2016 Phoenix Systems
+ 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.*/
+
+#ifndef MNTENT_H
+#define MNTENT_H
+
+#include <features.h>
+#define __need_FILE
+#include <stdio.h>
+#include <paths.h>
+
+/* File listing canonical interesting mount points. */
+#define MNTTAB _PATH_MNTTAB /* Deprecated alias. */
+
+/* File listing currently active mount points. */
+#define MOUNTED _PATH_MOUNTED /* Deprecated alias. */
+
+/* General filesystem types. */
+#define MNTTYPE_IGNORE "ignore" /* Ignore this entry. */
+#define MNTTYPE_NFS "nfs" /* Network file system. */
+#define MNTTYPE_SWAP "swap" /* Swap device. */
+
+/* Generic mount options. */
+#define MNTOPT_DEFAULTS "defaults" /* Use all default options. */
+#define MNTOPT_RO "ro" /* Read only. */
+#define MNTOPT_RW "rw" /* Read/write. */
+#define MNTOPT_SUID "suid" /* Set uid allowed. */
+#define MNTOPT_NOSUID "nosuid" /* No set uid allowed. */
+#define MNTOPT_NOAUTO "noauto" /* Do not auto mount. */
+
+/* Structure describing a mount table entry. */
+struct mntent {
+ char *mnt_fsname; /* Device or server for filesystem. */
+ char *mnt_dir; /* Directory mounted on. */
+ char *mnt_type; /* Type of filesystem: ufs, nfs, etc. */
+ char *mnt_opts; /* Comma-separated options for fs. */
+ int mnt_freq; /* Dump frequency (in days). */
+ int mnt_passno; /* Pass number for `fsck'. */
+};
+
+FILE *setmntent(const char *filename, const char *type);
+struct mntent *getmntent(FILE *fp);
+int endmntent(FILE * filep);
+
+#endif
diff --git a/newlib/libc/sys/phoenix/include/net/if.h b/newlib/libc/sys/phoenix/include/net/if.h
new file mode 100644
index 000000000..ad089f399
--- /dev/null
+++ b/newlib/libc/sys/phoenix/include/net/if.h
@@ -0,0 +1,299 @@
+/*
+ * Copyright (c) 1982, 1986, 1989, 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.h 8.1 (Berkeley) 6/10/93
+ * $FreeBSD: src/sys/net/if.h,v 1.71 2002/03/19 21:54:16 alfred Exp $
+ */
+
+#ifndef _NET_IF_H
+#define _NET_IF_H
+
+#include <sys/queue.h>
+#include <sys/socket.h>
+#include <sys/time.h>
+
+struct ifnet;
+
+/*
+ * Length of interface external name, including terminating '\0'.
+ * Note: this is the same size as a generic device's external name.
+ */
+#define IFNAMSIZ 16
+#define IF_NAMESIZE IFNAMSIZ
+#define IF_MAXUNIT 0x7fff /* ifp->if_unit is only 15 bits */
+
+/* Structure describing a `cloning' interface. */
+struct if_clone {
+ LIST_ENTRY(if_clone) ifc_list; /* On list of cloners */
+ const char *ifc_name; /* Name of device, e.g. `gif' */
+ size_t ifc_namelen; /* Length of name */
+ int ifc_maxunit; /* Maximum unit number */
+ unsigned char *ifc_units; /* Bitmap to handle units */
+ int ifc_bmlen; /* Bitmap length */
+
+ int (*ifc_create)(struct if_clone *, int);
+ int (*ifc_destroy)(struct ifnet *);
+};
+
+#define IF_CLONE_INITIALIZER(name, create, destroy, maxunit) \
+ { { 0 }, name, sizeof(name) - 1, maxunit, NULL, 0, create, destroy }
+
+/* Structure used to query names of interface cloners. */
+struct if_clonereq {
+ int ifcr_total; /* Total cloners (out) */
+ int ifcr_count; /* Room for this many in user buffer */
+ char *ifcr_buffer; /* Buffer for cloner names */
+};
+
+/*
+ * Structure describing information about an interface
+ * which may be of interest to management entities.
+ */
+struct if_data {
+ /* Generic interface information */
+ u_char ifi_type; /* Ethernet, tokenring, etc */
+ u_char ifi_physical; /* E.g., AUI, Thinnet, 10base-T, etc */
+ u_char ifi_addrlen; /* Media address length */
+ u_char ifi_hdrlen; /* Media header length */
+ u_char ifi_recvquota; /* Polling quota for receive intrs */
+ u_char ifi_xmitquota; /* Polling quota for xmit intrs */
+ u_long ifi_mtu; /* Maximum transmission unit */
+ u_long ifi_metric; /* Routing metric (external only) */
+ u_long ifi_baudrate; /* Linespeed */
+ /* Volatile statistics */
+ u_long ifi_ipackets; /* Packets received on interface */
+ u_long ifi_ierrors; /* Input errors on interface */
+ u_long ifi_opackets; /* Packets sent on interface */
+ u_long ifi_oerrors; /* Output errors on interface */
+ u_long ifi_collisions; /* Collisions on csma interfaces */
+ u_long ifi_ibytes; /* Total number of octets received */
+ u_long ifi_obytes; /* Total number of octets sent */
+ u_long ifi_imcasts; /* Packets received via multicast */
+ u_long ifi_omcasts; /* Packets sent via multicast */
+ u_long ifi_iqdrops; /* Dropped on input, this interface */
+ u_long ifi_noproto; /* Destined for unsupported protocol */
+ u_long ifi_hwassist; /* HW offload capabilities */
+ u_long ifi_unused; /* XXX was ifi_xmittiming */
+ struct timeval ifi_lastchange; /* Time of last administrative change */
+};
+
+#define IFF_UP 0x1 /* Interface is up */
+#define IFF_BROADCAST 0x2 /* Broadcast address valid */
+#define IFF_DEBUG 0x4 /* Turn on debugging */
+#define IFF_LOOPBACK 0x8 /* Is a loopback net */
+#define IFF_POINTOPOINT 0x10 /* Interface is point-to-point link */
+#define IFF_NOTRAILERS 0x20 /* Avoid use of trailers */
+#define IFF_RUNNING 0x40 /* Resources allocated */
+#define IFF_NOARP 0x80 /* No address resolution protocol */
+#define IFF_PROMISC 0x100 /* Receive all packets */
+#define IFF_ALLMULTI 0x200 /* Receive all multicast packets */
+#define IFF_OACTIVE 0x400 /* Transmission in progress */
+#define IFF_SIMPLEX 0x800 /* Can't hear own transmissions */
+#define IFF_LINK0 0x1000 /* Per link layer defined bit */
+#define IFF_LINK1 0x2000 /* Per link layer defined bit */
+#define IFF_LINK2 0x4000 /* Per link layer defined bit */
+#define IFF_ALTPHYS IFF_LINK2 /* Use alternate physical connection */
+#define IFF_MULTICAST 0x8000 /* Supports multicast */
+
+/*
+ * The following flag(s) ought to go in if_flags, but we cannot change
+ * struct ifnet because of binary compatibility, so we store them in
+ * if_ipending, which is not used so far.
+ * If possible, make sure the value is not conflicting with other
+ * IFF flags, so we have an easier time when we want to merge them.
+ */
+#define IFF_POLLING 0x10000 /* Interface is in polling mode. */
+
+/* Flags set internally only */
+#define IFF_CANTCHANGE (IFF_BROADCAST | IFF_POINTOPOINT | IFF_RUNNING | IFF_OACTIVE | IFF_SIMPLEX | IFF_MULTICAST | IFF_ALLMULTI | IFF_NOTRAILERS)
+
+/* Capabilities that interfaces can advertise. */
+#define IFCAP_RXCSUM 0x0001 /* Can offload checksum on RX */
+#define IFCAP_TXCSUM 0x0002 /* Can offload checksum on TX */
+#define IFCAP_NETCONS 0x0004 /* Can be a network console */
+
+#define IFCAP_HWCSUM (IFCAP_RXCSUM | IFCAP_TXCSUM)
+
+#define IFQ_MAXLEN 50
+#define IFNET_SLOWHZ 1 /* Granularity is 1 second */
+
+/* Message format for use in obtaining information about interfaces from getkerninfo and the routing socket */
+struct if_msghdr {
+ u_short ifm_msglen; /* To skip over non-understood messages */
+ u_char ifm_version; /* Future binary compatibility */
+ u_char ifm_type; /* Message type */
+ int ifm_addrs; /* Like rtm_addrs */
+ int ifm_flags; /* Value of if_flags */
+ u_short ifm_index; /* Index for associated ifp */
+ struct if_data ifm_data; /* Statistics and other data about if */
+};
+
+/* Message format for use in obtaining information about interface addresses from getkerninfo and the routing socket */
+struct ifa_msghdr {
+ u_short ifam_msglen; /* To skip over non-understood messages */
+ u_char ifam_version; /* Future binary compatibility */
+ u_char ifam_type; /* Message type */
+ int ifam_addrs; /* Like rtm_addrs */
+ int ifam_flags; /* Value of ifa_flags */
+ u_short ifam_index; /* Index for associated ifp */
+ int ifam_metric; /* Value of ifa_metric */
+};
+
+/* Message format for use in obtaining information about multicast addresses from the routing socket */
+struct ifma_msghdr {
+ u_short ifmam_msglen; /* To skip over non-understood messages */
+ u_char ifmam_version; /* Future binary compatibility */
+ u_char ifmam_type; /* Message type */
+ int ifmam_addrs; /* Like rtm_addrs */
+ int ifmam_flags; /* Value of ifa_flags */
+ u_short ifmam_index; /* Index for associated ifp */
+};
+
+/* Message format announcing the arrival or departure of a network interface. */
+struct if_announcemsghdr {
+ u_short ifan_msglen; /* To skip over non-understood messages */
+ u_char ifan_version; /* Future binary compatibility */
+ u_char ifan_type; /* Message type */
+ u_short ifan_index; /* Index for associated ifp */
+ char ifan_name[IFNAMSIZ]; /* If name, e.g. "en0" */
+ u_short ifan_what; /* What type of announcement */
+};
+
+#define IFAN_ARRIVAL 0 /* Interface arrival */
+#define IFAN_DEPARTURE 1 /* Interface departure */
+
+/*
+ * Interface request structure used for socket
+ * ioctl's. All interface ioctl's must have parameter
+ * definitions which begin with ifr_name. The
+ * remainder may be interface specific.
+ */
+struct ifreq {
+ char ifr_name[IFNAMSIZ]; /* if name, e.g. "en0" */
+ union {
+ struct sockaddr ifru_addr;
+ struct sockaddr ifru_dstaddr;
+ struct sockaddr ifru_broadaddr;
+ struct sockaddr ifru_netmask;
+ short ifru_flags[2];
+ short ifru_index;
+ int ifru_metric;
+ int ifru_mtu;
+ int ifru_phys;
+ int ifru_media;
+ caddr_t ifru_data;
+ int ifru_cap[2];
+ } ifr_ifru;
+
+#define ifr_addr ifr_ifru.ifru_addr /* Address */
+#define ifr_dstaddr ifr_ifru.ifru_dstaddr /* Other end of p-to-p link */
+#define ifr_broadaddr ifr_ifru.ifru_broadaddr /* Broadcast address */
+#define ifr_netmask ifr_ifru.ifru_netmask /* Interface net mask */
+#define ifr_flags ifr_ifru.ifru_flags[0] /* Flags */
+#define ifr_prevflags ifr_ifru.ifru_flags[1] /* Flags */
+#define ifr_metric ifr_ifru.ifru_metric /* Metric */
+#define ifr_mtu ifr_ifru.ifru_mtu /* Mtu */
+#define ifr_phys ifr_ifru.ifru_phys /* Physical wire */
+#define ifr_media ifr_ifru.ifru_media /* Physical media */
+#define ifr_data ifr_ifru.ifru_data /* For use by interface */
+#define ifr_reqcap ifr_ifru.ifru_cap[0] /* Requested capabilities */
+#define ifr_curcap ifr_ifru.ifru_cap[1] /* Current capabilities */
+#define ifr_index ifr_ifru.ifru_index /* Interface index */
+};
+
+struct ifaliasreq {
+ char ifra_name[IFNAMSIZ]; /* if name, e.g. "en0" */
+ struct sockaddr ifra_addr;
+ struct sockaddr ifra_broadaddr;
+ struct sockaddr ifra_mask;
+};
+
+struct ifmediareq {
+ char ifm_name[IFNAMSIZ]; /* If name, e.g. "en0" */
+ int ifm_current; /* Current media options */
+ int ifm_mask; /* Don't care mask */
+ int ifm_status; /* Media status */
+ int ifm_active; /* Active options */
+ int ifm_count; /* # entries in ifm_ulist array */
+ int *ifm_ulist; /* Media words */
+};
+
+/*
+ * Structure used to retrieve aux status data from interfaces.
+ * Kernel suppliers to this interface should respect the formatting
+ * needed by ifconfig(8): each line starts with a TAB and ends with
+ * a newline. The canonical example to copy and paste is in if_tun.c.
+ */
+#define IFSTATMAX 800 /* 10 lines of text */
+struct ifstat {
+ char ifs_name[IFNAMSIZ]; /* if name, e.g. "en0" */
+ char ascii[IFSTATMAX + 1];
+};
+
+/*
+ * Structure used in SIOCGIFCONF request.
+ * Used to retrieve interface configuration
+ * for machine (useful for programs which
+ * must know all networks accessible).
+ */
+struct ifconf {
+ int ifc_len; /* Size of associated buffer */
+ union {
+ caddr_t ifcu_buf;
+ struct ifreq *ifcu_req;
+ } ifc_ifcu;
+#define ifc_buf ifc_ifcu.ifcu_buf /* Buffer address */
+#define ifc_req ifc_ifcu.ifcu_req /* Array of structures returned */
+};
+
+
+/* Structure for SIOC[AGD]LIFADDR */
+struct if_laddrreq {
+ char iflr_name[IFNAMSIZ];
+ u_int flags;
+#define IFLR_PREFIX 0x8000 /* in: prefix given out: kernel fills id */
+ u_int prefixlen; /* in/out */
+ struct sockaddr_storage addr; /* in/out */
+ struct sockaddr_storage dstaddr; /* out */
+};
+
+struct if_nameindex {
+ u_int if_index; /* 1, 2, ... */
+ char *if_name; /* null terminated name: "le0", ... */
+};
+
+unsigned int if_nametoindex(const char *ifname);
+char *if_indextoname(unsigned int ifindex, char *ifname);
+struct if_nameindex *if_nameindex();
+void if_freenameindex(struct if_nameindex *ptr);
+
+#endif
diff --git a/newlib/libc/sys/phoenix/include/netdb.h b/newlib/libc/sys/phoenix/include/netdb.h
new file mode 100644
index 000000000..39528841b
--- /dev/null
+++ b/newlib/libc/sys/phoenix/include/netdb.h
@@ -0,0 +1,229 @@
+/*-
+ * Copyright (c) 1980, 1983, 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.
+ *
+ * -
+ * Portions Copyright (c) 1993 by Digital Equipment Corporation.
+ *
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies, and that
+ * the name of Digital Equipment Corporation not be used in advertising or
+ * publicity pertaining to distribution of the document or software without
+ * specific, written prior permission.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND DIGITAL EQUIPMENT CORP. DISCLAIMS ALL
+ * WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL DIGITAL EQUIPMENT
+ * CORPORATION BE LIABLE FOR ANY SPECIAL, DIRECT, 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.
+ * -
+ * --Copyright--
+ */
+
+/*
+ * @(#)netdb.h 8.1 (Berkeley) 6/2/93
+ * From: Id: netdb.h,v 8.9 1996/11/19 08:39:29 vixie Exp $
+ * $FreeBSD: src/include/netdb.h,v 1.23 2002/03/23 17:24:53 imp Exp $
+ */
+
+/* Copied from Linux, modified for Phoenix-RTOS. */
+
+#ifndef _NETDB_H
+#define _NETDB_H
+
+#include <stdio.h>
+#include <sys/socket.h>
+#include <sys/types.h>
+
+#ifndef _PATH_HEQUIV
+#define _PATH_HEQUIV "/etc/hosts.equiv"
+#endif
+#define _PATH_HOSTS "/etc/hosts"
+#define _PATH_NETWORKS "/etc/networks"
+#define _PATH_PROTOCOLS "/etc/protocols"
+#define _PATH_SERVICES "/etc/services"
+#define _PATH_NSSWITCH_CONF "/etc/nsswitch.conf"
+
+extern int *__h_errno_location(void);
+
+#define h_errno (*(__h_errno_location()))
+
+#define MAXALIASES 35
+/* For now, only support one return address. */
+#define MAXADDRS 2
+
+struct hostent {
+ char *h_name; /* Official name of host */
+ char **h_aliases; /* Alias list */
+ int h_addrtype; /* Host address type */
+ int h_length; /* Length of address */
+ char **h_addr_list; /* List of addresses from name server */
+ char *h_addr; /* Address, for backward compatibility */
+ /* Private data, for re-entrancy */
+ char *__host_addrs[MAXADDRS];
+ char *__host_aliases[MAXALIASES];
+ unsigned int __host_addr[4];
+};
+
+/* Assumption here is that a network number fits in an unsigned long -- probably a poor one. */
+struct netent {
+ char *n_name; /* Official name of net */
+ char **n_aliases; /* Alias list */
+ int n_addrtype; /* Net address type */
+ unsigned long n_net; /* Network # */
+};
+
+struct servent {
+ char *s_name; /* Official service name */
+ char **s_aliases; /* Alias list */
+ int s_port; /* Port # */
+ char *s_proto; /* Protocol to use */
+};
+
+struct protoent {
+ char *p_name; /* Official protocol name */
+ char **p_aliases; /* Alias list */
+ int p_proto; /* Protocol # */
+};
+
+struct addrinfo {
+ int ai_flags; /* AI_PASSIVE, AI_CANONNAME, AI_NUMERICHOST */
+ int ai_family; /* PF_xxx */
+ int ai_socktype; /* SOCK_xxx */
+ int ai_protocol; /* 0 or IPPROTO_xxx for IPv4 and IPv6 */
+ size_t ai_addrlen; /* Length of ai_addr */
+ char *ai_canonname; /* Canonical name for hostname */
+ struct sockaddr *ai_addr; /* Binary address */
+ struct addrinfo *ai_next; /* Next structure in linked list */
+};
+
+/* Error return codes from gethostbyname() and gethostbyaddr() (left in extern int h_errno). */
+#define NETDB_INTERNAL -1 /* See errno */
+#define NETDB_SUCCESS 0 /* No problem */
+#define HOST_NOT_FOUND 1 /* Authoritative Answer Host not found */
+#define TRY_AGAIN 2 /* Non-Authoritative Host not found, or SERVERFAIL */
+#define NO_RECOVERY 3 /* Non recoverable errors, FORMERR, REFUSED, NOTIMP */
+#define NO_DATA 4 /* Valid name, no data record of requested type */
+#define NO_ADDRESS NO_DATA /* No address, look for MX record */
+
+/* Error return codes from getaddrinfo() */
+#define EAI_BADFLAGS -1 /* Invalid value for `ai_flags' field. */
+#define EAI_NONAME -2 /* NAME or SERVICE is unknown. */
+#define EAI_AGAIN -3 /* Temporary failure in name resolution. */
+#define EAI_FAIL -4 /* Non-recoverable failure in name res. */
+#define EAI_NODATA -5 /* No address associated with NAME. */
+#define EAI_FAMILY -6 /* `ai_family' not supported. */
+#define EAI_SOCKTYPE -7 /* `ai_socktype' not supported. */
+#define EAI_SERVICE -8 /* SERVICE not supported for `ai_socktype'. */
+#define EAI_ADDRFAMILY -9 /* Address family for NAME not supported. */
+#define EAI_MEMORY -10 /* Memory allocation failure. */
+#define EAI_SYSTEM -11 /* System error returned in `errno'. */
+#define EAI_OVERFLOW -12 /* Argument buffer overflow. */
+#ifdef __USE_GNU
+#define EAI_INPROGRESS -100 /* Processing request in progress. */
+#define EAI_CANCELED -101 /* Request canceled. */
+#define EAI_NOTCANCELED -102 /* Request not canceled. */
+#define EAI_ALLDONE -103 /* All requests done. */
+#define EAI_INTR -104 /* Interrupted by a signal. */
+#define EAI_IDN_ENCODE -105 /* IDN encoding failed. */
+#endif
+
+/* Flag values for getaddrinfo() */
+#define AI_PASSIVE 0x00000001 /* Get address to use bind() */
+#define AI_CANONNAME 0x00000002 /* Fill ai_canonname */
+#define AI_NUMERICHOST 0x00000004 /* Prevent name resolution */
+#define AI_NUMERICSERV 0x00000008 /* Fon't use name resolution. */
+
+/* Valid flags for addrinfo */
+#define AI_MASK (AI_PASSIVE | AI_CANONNAME | AI_NUMERICHOST | AI_ADDRCONFIG)
+#define AI_ALL 0x00000100 /* IPv6 and IPv4-mapped (with AI_V4MAPPED) */
+#define AI_V4MAPPED_CFG 0x00000200 /* Accept IPv4-mapped if kernel supports */
+#define AI_ADDRCONFIG 0x00000400 /* Only if any address is assigned */
+#define AI_V4MAPPED 0x00000800 /* Accept IPv4-mapped IPv6 address */
+
+/* Special recommended flags for getipnodebyname */
+#define AI_DEFAULT (AI_V4MAPPED_CFG | AI_ADDRCONFIG)
+
+/* Constants for getnameinfo() */
+#define NI_MAXHOST 1025
+#define NI_MAXSERV 32
+
+/* Flag values for getnameinfo() */
+#define NI_NOFQDN 0x00000001
+#define NI_NUMERICHOST 0x00000002
+#define NI_NAMEREQD 0x00000004
+#define NI_NUMERICSERV 0x00000008
+#define NI_DGRAM 0x00000010
+#define NI_WITHSCOPEID 0x00000020
+
+/* Scope delimit character. */
+#define SCOPE_DELIMITER '%'
+
+void endhostent();
+void endnetent();
+void endnetgrent();
+void endprotoent();
+void endservent();
+void freehostent(struct hostent *ip);
+struct hostent *gethostbyaddr(const void *name, socklen_t len, int type);
+struct hostent *gethostbyname(const char *name);
+struct hostent *gethostbyname2(const char *name, int af);
+struct hostent *gethostent();
+struct hostent *getipnodebyaddr(const void *addr, size_t len, int af, int *error_num);
+struct hostent *getipnodebyname(const char *name, int af, int flags, int *error_num);
+struct netent *getnetbyaddr(uint32_t net, int type);
+struct netent *getnetbyname(const char *name);
+struct netent *getnetent();
+int getnetgrent(char **host, char **user, char **domain);
+struct protoent *getprotobyname(const char *name);
+struct protoent *getprotobynumber(int proto);
+struct protoent *getprotoent();
+struct servent *getservbyname(const char *name, const char *proto);
+struct servent *getservbyport(int name, const char *proto);
+struct servent *getservent();
+void herror(const char *s);
+const char *hstrerror(int err);
+int innetgr(const char *netgroup, const char *host, const char *user, const char *domain);
+void sethostent(int stayopen);
+void setnetent(int stayopen);
+void setprotoent(int stayopen);
+int getaddrinfo(const char *node, const char *service, const struct addrinfo *hints, struct addrinfo **res);
+int getnameinfo(const struct sockaddr *sa, socklen_t salen, char *host, socklen_t hostlen, char *serv, socklen_t servlen, int flags);
+void freeaddrinfo(struct addrinfo *res);
+char *gai_strerror(int errcode);
+int setnetgrent(const char *netgroup);
+void setservent(int stayopen);
+
+#endif
diff --git a/newlib/libc/sys/phoenix/include/netinet/in.h b/newlib/libc/sys/phoenix/include/netinet/in.h
new file mode 100644
index 000000000..18fabfed0
--- /dev/null
+++ b/newlib/libc/sys/phoenix/include/netinet/in.h
@@ -0,0 +1,398 @@
+/*
+ * Copyright (c) 1982, 1986, 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.
+ *
+ * @(#)in.h 8.3 (Berkeley) 1/3/94
+ * $FreeBSD: src/sys/netinet/in.h,v 1.68 2002/04/24 01:26:11 mike Exp $
+ */
+
+ /* Copied from Linux, modified for Phoenix */
+
+#ifndef _NETINET_IN_H
+#define _NETINET_IN_H
+
+#include <machine/endian.h>
+#include <netinet6/in6.h>
+#include <sys/socket.h>
+
+#if BYTE_ORDER == BIG_ENDIAN
+#define htons(a) (a)
+#define htonl(a) (a)
+#define ntohs(a) (a)
+#define ntohl(a) (a)
+#error Big endian is not supported!
+#else
+
+static uint32_t htonl(uint32_t hostlong)
+{
+ return ((hostlong & 0xff) << 24) | ((hostlong & 0xff00) << 8) | ((hostlong & 0xff0000UL) >> 8) | ((hostlong & 0xff000000UL) >> 24);
+}
+
+static uint16_t htons(uint16_t hostshort)
+{
+ return ((hostshort & 0xff) << 8) | ((hostshort & 0xff00) >> 8);
+}
+
+static uint32_t ntohl(uint32_t netlong)
+{
+ return htonl(netlong);
+}
+
+static uint16_t ntohs(uint16_t netshort)
+{
+ return htons(netshort);
+}
+#endif
+
+/* Protocols common to RFC 1700, POSIX, and X/Open. */
+#define IPPROTO_IP 0 /* Dummy for IP */
+#define IPPROTO_ICMP 1 /* Control message protocol */
+#define IPPROTO_TCP 6 /* TCP */
+#define IPPROTO_UDP 17 /* User datagram protocol */
+
+#define INADDR_ANY (u_int32_t) 0x00000000
+#define INADDR_BROADCAST (u_int32_t) 0xffffffff /* Must be masked */
+
+typedef uint32_t in_addr_t;
+typedef uint16_t in_port_t;
+
+/* Internet address (a structure for historical reasons). */
+struct in_addr {
+ in_addr_t s_addr;
+};
+
+/* Socket address, internet style. */
+struct sockaddr_in {
+ uint8_t sin_len;
+ sa_family_t sin_family;
+ in_port_t sin_port;
+ struct in_addr sin_addr;
+ char sin_zero[8];
+};
+
+#if __POSIX_VISIBLE >= 200112
+#define IPPROTO_RAW 255 /* Raw IP packet */
+#define INET_ADDRSTRLEN 16
+#endif
+
+/*
+ * Constants and structures defined by the internet system,
+ * Per RFC 790, September 1981, and numerous additions.
+ */
+
+/* Protocols (RFC 1700) */
+#define IPPROTO_HOPOPTS 0 /* IP6 hop-by-hop options */
+#define IPPROTO_IGMP 2 /* Group mgmt protocol */
+#define IPPROTO_GGP 3 /* Gateway^2 (deprecated) */
+#define IPPROTO_IPV4 4 /* IPv4 encapsulation */
+#define IPPROTO_IPIP IPPROTO_IPV4
+#define IPPROTO_ST 7 /* Stream protocol II */
+#define IPPROTO_EGP 8 /* Exterior gateway protocol */
+#define IPPROTO_PIGP 9 /* Private interior gateway */
+#define IPPROTO_RCCMON 10 /* BBN RCC Monitoring */
+#define IPPROTO_NVPII 11 /* Network voice protocol*/
+#define IPPROTO_PUP 12 /* Pup */
+#define IPPROTO_ARGUS 13 /* Argus */
+#define IPPROTO_EMCON 14 /* EMCON */
+#define IPPROTO_XNET 15 /* Cross Net Debugger */
+#define IPPROTO_CHAOS 16 /* Chaos*/
+#define IPPROTO_MUX 18 /* Multiplexing */
+#define IPPROTO_MEAS 19 /* DCN Measurement Subsystems */
+#define IPPROTO_HMP 20 /* Host Monitoring */
+#define IPPROTO_PRM 21 /* Packet Radio Measurement */
+#define IPPROTO_IDP 22 /* Xns idp */
+#define IPPROTO_TRUNK1 23 /* Trunk-1 */
+#define IPPROTO_TRUNK2 24 /* Trunk-2 */
+#define IPPROTO_LEAF1 25 /* Leaf-1 */
+#define IPPROTO_LEAF2 26 /* Leaf-2 */
+#define IPPROTO_RDP 27 /* Reliable Data */
+#define IPPROTO_IRTP 28 /* Reliable Transaction */
+#define IPPROTO_TP 29 /* Tp-4 w/ class negotiation */
+#define IPPROTO_BLT 30 /* Bulk Data Transfer */
+#define IPPROTO_NSP 31 /* Network Services */
+#define IPPROTO_INP 32 /* Merit Internodal */
+#define IPPROTO_SEP 33 /* Sequential Exchange */
+#define IPPROTO_3PC 34 /* Third Party Connect */
+#define IPPROTO_IDPR 35 /* InterDomain Policy Routing */
+#define IPPROTO_XTP 36 /* XTP */
+#define IPPROTO_DDP 37 /* Datagram Delivery */
+#define IPPROTO_CMTP 38 /* Control Message Transport */
+#define IPPROTO_TPXX 39 /* TP++ Transport */
+#define IPPROTO_IL 40 /* IL transport protocol */
+#define IPPROTO_IPV6 41 /* IP6 header */
+#define IPPROTO_SDRP 42 /* Source Demand Routing */
+#define IPPROTO_ROUTING 43 /* IP6 routing header */
+#define IPPROTO_FRAGMENT 44 /* IP6 fragmentation header */
+#define IPPROTO_IDRP 45 /* InterDomain Routing*/
+#define IPPROTO_RSVP 46 /* Resource reservation */
+#define IPPROTO_GRE 47 /* General Routing Encap. */
+#define IPPROTO_MHRP 48 /* Mobile Host Routing */
+#define IPPROTO_BHA 49 /* BHA */
+#define IPPROTO_ESP 50 /* IP6 Encap Sec. Payload */
+#define IPPROTO_AH 51 /* IP6 Auth Header */
+#define IPPROTO_INLSP 52 /* Integ. Net Layer Security */
+#define IPPROTO_SWIPE 53 /* IP with encryption */
+#define IPPROTO_NHRP 54 /* Next Hop Resolution */
+#define IPPROTO_MOBILE 55 /* IP Mobility */
+#define IPPROTO_TLSP 56 /* Transport Layer Security */
+#define IPPROTO_SKIP 57 /* SKIP */
+#define IPPROTO_ICMPV6 58 /* ICMP6 */
+#define IPPROTO_NONE 59 /* IP6 no next header */
+#define IPPROTO_DSTOPTS 60 /* IP6 destination option */
+#define IPPROTO_AHIP 61 /* Any host internal protocol */
+#define IPPROTO_CFTP 62 /* CFTP */
+#define IPPROTO_HELLO 63 /* "hello" routing protocol */
+#define IPPROTO_SATEXPAK 64 /* SATNET/Backroom EXPAK */
+#define IPPROTO_KRYPTOLAN 65 /* Kryptolan */
+#define IPPROTO_RVD 66 /* Remote Virtual Disk */
+#define IPPROTO_IPPC 67 /* Pluribus Packet Core */
+#define IPPROTO_ADFS 68 /* Any distributed FS */
+#define IPPROTO_SATMON 69 /* Satnet Monitoring */
+#define IPPROTO_VISA 70 /* VISA Protocol */
+#define IPPROTO_IPCV 71 /* Packet Core Utility */
+#define IPPROTO_CPNX 72 /* Comp. Prot. Net. Executive */
+#define IPPROTO_CPHB 73 /* Comp. Prot. HeartBeat */
+#define IPPROTO_WSN 74 /* Wang Span Network */
+#define IPPROTO_PVP 75 /* Packet Video Protocol */
+#define IPPROTO_BRSATMON 76 /* BackRoom SATNET Monitoring */
+#define IPPROTO_ND 77 /* Sun net disk proto (temp.) */
+#define IPPROTO_WBMON 78 /* WIDEBAND Monitoring */
+#define IPPROTO_WBEXPAK 79 /* WIDEBAND EXPAK */
+#define IPPROTO_EON 80 /* ISO cnlp */
+#define IPPROTO_VMTP 81 /* VMTP */
+#define IPPROTO_SVMTP 82 /* Secure VMTP */
+#define IPPROTO_VINES 83 /* Banyon VINES */
+#define IPPROTO_TTP 84 /* TTP */
+#define IPPROTO_IGP 85 /* NSFNET-IGP */
+#define IPPROTO_DGP 86 /* Dissimilar gateway prot. */
+#define IPPROTO_TCF 87 /* TCF */
+#define IPPROTO_IGRP 88 /* Cisco/GXS IGRP */
+#define IPPROTO_OSPFIGP 89 /* OSPFIGP */
+#define IPPROTO_SRPC 90 /* Strite RPC protocol */
+#define IPPROTO_LARP 91 /* Locus Address Resoloution */
+#define IPPROTO_MTP 92 /* Multicast Transport */
+#define IPPROTO_AX25 93 /* AX.25 Frames */
+#define IPPROTO_IPEIP 94 /* IP encapsulated in IP */
+#define IPPROTO_MICP 95 /* Mobile Int.ing control */
+#define IPPROTO_SCCSP 96 /* Semaphore Comm. security */
+#define IPPROTO_ETHERIP 97 /* Ethernet IP encapsulation */
+#define IPPROTO_ENCAP 98 /* Encapsulation header */
+#define IPPROTO_APES 99 /* Aany private encr. scheme */
+#define IPPROTO_GMTP 100 /* GMTP*/
+#define IPPROTO_IPCOMP 108 /* Payload compression (IPComp) */
+/* 101-254: Partly Unassigned */
+#define IPPROTO_PIM 103 /* Protocol Independent Mcast */
+#define IPPROTO_PGM 113 /* PGM */
+/* 255: Reserved */
+/* BSD Private, local use, namespace incursion */
+#define IPPROTO_DIVERT 254 /* Divert pseudo-protocol */
+#define IPPROTO_MAX 256
+
+/* Last return value of *_input(), meaning "all job for this pkt is done". */
+#define IPPROTO_DONE 257
+
+/* Ports < IPPORT_RESERVED are reserved for privileged processes (e.g. root). (IP_PORTRANGE_LOW) */
+#define IPPORT_RESERVED 1024
+
+/* Default local port range, used by both IP_PORTRANGE_DEFAULT and IP_PORTRANGE_HIGH. */
+#define IPPORT_HIFIRSTAUTO 49152
+#define IPPORT_HILASTAUTO 65535
+
+/*
+ * Scanning for a free reserved port return a value below IPPORT_RESERVED,
+ * but higher than IPPORT_RESERVEDSTART. Traditionally the start value was
+ * 512, but that conflicts with some well-known-services that firewalls may
+ * have a fit if we use.
+ */
+#define IPPORT_RESERVEDSTART 600
+
+#define IPPORT_MAX 65535
+
+/*
+ * Definitions of bits in internet address integers.
+ * On subnets, the decomposition of addresses to host and net parts
+ * is done according to subnet mask, not the masks here.
+ */
+#define IN_CLASSA(i) (((u_int32_t) (i) & 0x80000000) == 0)
+#define IN_CLASSA_NET 0xff000000
+#define IN_CLASSA_NSHIFT 24
+#define IN_CLASSA_HOST 0x00ffffff
+#define IN_CLASSA_MAX 128
+
+#define IN_CLASSB(i) (((u_int32_t) (i) & 0xc0000000) == 0x80000000)
+#define IN_CLASSB_NET 0xffff0000
+#define IN_CLASSB_NSHIFT 16
+#define IN_CLASSB_HOST 0x0000ffff
+#define IN_CLASSB_MAX 65536
+
+#define IN_CLASSC(i) (((u_int32_t) (i) & 0xe0000000) == 0xc0000000)
+#define IN_CLASSC_NET 0xffffff00
+#define IN_CLASSC_NSHIFT 8
+#define IN_CLASSC_HOST 0x000000ff
+
+#define IN_CLASSD(i) (((u_int32_t) (i) & 0xf0000000) == 0xe0000000)
+#define IN_CLASSD_NET 0xf0000000 /* These ones aren't really */
+#define IN_CLASSD_NSHIFT 28 /* net and host fields, but */
+#define IN_CLASSD_HOST 0x0fffffff /* routing needn't know. */
+#define IN_MULTICAST(i) IN_CLASSD(i)
+
+#define IN_EXPERIMENTAL(i) (((u_int32_t) (i) & 0xf0000000) == 0xf0000000)
+#define IN_BADCLASS(i) (((u_int32_t) (i) & 0xf0000000) == 0xf0000000)
+
+#define INADDR_LOOPBACK (u_int32_t) 0x7f000001
+#define INADDR_NONE 0xffffffff /* -1 return */
+
+#define INADDR_UNSPEC_GROUP (u_int32_t) 0xe0000000 /* 224.0.0.0 */
+#define INADDR_ALLHOSTS_GROUP (u_int32_t) 0xe0000001 /* 224.0.0.1 */
+#define INADDR_ALLRTRS_GROUP (u_int32_t) 0xe0000002 /* 224.0.0.2 */
+#define INADDR_MAX_LOCAL_GROUP (u_int32_t) 0xe00000ff /* 224.0.0.255 */
+
+#define IN_LOOPBACKNET 127 /* Official */
+
+/* Defaults and limits for options */
+#define IP_DEFAULT_MULTICAST_TTL 1 /* Normally limit m'casts to 1 hop */
+#define IP_DEFAULT_MULTICAST_LOOP 1 /* Normally hear sends if a member */
+#define IP_MAX_MEMBERSHIPS 20 /* Per socket */
+
+/* Argument structure for IP_ADD_MEMBERSHIP and IP_DROP_MEMBERSHIP. */
+struct ip_mreq {
+ struct in_addr imr_multiaddr; /* IP multicast address of group */
+ struct in_addr imr_interface; /* Local IP address of interface */
+};
+
+/* Argument for IP_PORTRANGE - which range to search when port is unspecified at bind() or connect() */
+#define IP_PORTRANGE_DEFAULT 0 /* Default range */
+#define IP_PORTRANGE_HIGH 1 /* "high" - request firewall bypass */
+#define IP_PORTRANGE_LOW 2 /* "low" - vouchsafe security */
+
+/*
+ * Definitions for inet sysctl operations.
+ *
+ * Third level is protocol number.
+ * Fourth level is desired variable within that protocol.
+ */
+#define IPPROTO_MAXID (IPPROTO_AH + 1) /* Don't list to IPPROTO_MAX */
+
+#define CTL_IPPROTO_NAMES { \
+ { "ip", CTLTYPE_NODE }, \
+ { "icmp", CTLTYPE_NODE }, \
+ { "igmp", CTLTYPE_NODE }, \
+ { "ggp", CTLTYPE_NODE }, \
+ { 0, 0 }, \
+ { 0, 0 }, \
+ { "tcp", CTLTYPE_NODE }, \
+ { 0, 0 }, \
+ { "egp", CTLTYPE_NODE }, \
+ { 0, 0 }, \
+ { 0, 0 }, \
+ { 0, 0 }, \
+ { "pup", CTLTYPE_NODE }, \
+ { 0, 0 }, \
+ { 0, 0 }, \
+ { 0, 0 }, \
+ { 0, 0 }, \
+ { "udp", CTLTYPE_NODE }, \
+ { 0, 0 }, \
+ { 0, 0 }, \
+ { 0, 0 }, \
+ { 0, 0 }, \
+ { "idp", CTLTYPE_NODE }, \
+ { 0, 0 }, \
+ { 0, 0 }, \
+ { 0, 0 }, \
+ { 0, 0 }, \
+ { 0, 0 }, \
+ { 0, 0 }, \
+ { 0, 0 }, \
+ { 0, 0 }, \
+ { 0, 0 }, \
+ { 0, 0 }, \
+ { 0, 0 }, \
+ { 0, 0 }, \
+ { 0, 0 }, \
+ { 0, 0 }, \
+ { 0, 0 }, \
+ { 0, 0 }, \
+ { 0, 0 }, \
+ { 0, 0 }, \
+ { 0, 0 }, \
+ { 0, 0 }, \
+ { 0, 0 }, \
+ { 0, 0 }, \
+ { 0, 0 }, \
+ { 0, 0 }, \
+ { 0, 0 }, \
+ { 0, 0 }, \
+ { 0, 0 }, \
+ { 0, 0 }, \
+ { "ipsec", CTLTYPE_NODE }, \
+}
+
+/* Names for IP sysctl objects */
+#define IPCTL_FORWARDING 1 /* Act as router */
+#define IPCTL_SENDREDIRECTS 2 /* May send redirects when forwarding */
+#define IPCTL_DEFTTL 3 /* Default TTL */
+#ifdef notyet
+#define IPCTL_DEFMTU 4 /* Default MTU */
+#endif
+#define IPCTL_RTEXPIRE 5 /* Cloned route expiration time */
+#define IPCTL_RTMINEXPIRE 6 /* Min value for expiration time */
+#define IPCTL_RTMAXCACHE 7 /* Trigger level for dynamic expire */
+#define IPCTL_SOURCEROUTE 8 /* May perform source routes */
+#define IPCTL_DIRECTEDBROADCAST 9 /* May re-broadcast received packets */
+#define IPCTL_INTRQMAXLEN 10 /* Max length of netisr queue */
+#define IPCTL_INTRQDROPS 11 /* Number of netisr q drops */
+#define IPCTL_STATS 12 /* Ipstat structure */
+#define IPCTL_ACCEPTSOURCEROUTE 13 /* May accept source routed packets */
+#define IPCTL_FASTFORWARDING 14 /* Use fast IP forwarding code */
+#define IPCTL_KEEPFAITH 15 /* FAITH IPv4->IPv6 translater ctl */
+#define IPCTL_GIF_TTL 16 /* Default TTL for gif encap packet */
+#define IPCTL_MAXID 17
+
+#define IPCTL_NAMES { \
+ { 0, 0 }, \
+ { "forwarding", CTLTYPE_INT }, \
+ { "redirect", CTLTYPE_INT }, \
+ { "ttl", CTLTYPE_INT }, \
+ { "mtu", CTLTYPE_INT }, \
+ { "rtexpire", CTLTYPE_INT }, \
+ { "rtminexpire", CTLTYPE_INT }, \
+ { "rtmaxcache", CTLTYPE_INT }, \
+ { "sourceroute", CTLTYPE_INT }, \
+ { "directed-broadcast", CTLTYPE_INT }, \
+ { "intr-queue-maxlen", CTLTYPE_INT }, \
+ { "intr-queue-drops", CTLTYPE_INT }, \
+ { "stats", CTLTYPE_STRUCT }, \
+ { "accept_sourceroute", CTLTYPE_INT }, \
+ { "fastforwarding", CTLTYPE_INT }, \
+}
+
+#endif
diff --git a/newlib/libc/sys/phoenix/include/netinet/in_systm.h b/newlib/libc/sys/phoenix/include/netinet/in_systm.h
new file mode 100644
index 000000000..35f2bdadf
--- /dev/null
+++ b/newlib/libc/sys/phoenix/include/netinet/in_systm.h
@@ -0,0 +1,57 @@
+/*
+ * Copyright (c) 1982, 1986, 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.
+ *
+ * @(#)in_systm.h 8.1 (Berkeley) 6/10/93
+ * $FreeBSD: src/sys/netinet/in_systm.h,v 1.10 2002/03/19 21:25:46 alfred Exp $
+ */
+
+/* Copied from Linux, modified for Phoenix-RTOS. */
+
+#ifndef _NETINET_IN_SYSTM_H
+#define _NETINET_IN_SYSTM_H
+
+#include <sys/types.h>
+
+/*
+ * Network types.
+ *
+ * Internally the system keeps counters in the headers with the bytes
+ * swapped so that VAX instructions will work on them. It reverses
+ * the bytes before transmission at each protocol level. The n_ types
+ * represent the types with the bytes in ``high-ender'' order.
+ */
+typedef u_int16_t n_short; /* short as received from the net */
+typedef u_int32_t n_long; /* long as received from the net */
+
+typedef u_int32_t n_time; /* ms since 00:00 GMT, byte rev */
+
+#endif
diff --git a/newlib/libc/sys/phoenix/include/netinet/ip.h b/newlib/libc/sys/phoenix/include/netinet/ip.h
new file mode 100644
index 000000000..7ca1f2908
--- /dev/null
+++ b/newlib/libc/sys/phoenix/include/netinet/ip.h
@@ -0,0 +1,180 @@
+/*
+ * Copyright (c) 1982, 1986, 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.
+ *
+ * @(#)ip.h 8.2 (Berkeley) 6/1/94
+ * $FreeBSD: src/sys/netinet/ip.h,v 1.19 2001/12/14 19:37:32 rwatson Exp $
+ */
+
+/* Copied from Linux, modified for Phoenix-RTOS. */
+
+#ifndef _NETINET_IP_H
+#define _NETINET_IP_H
+
+#include <netinet/in_systm.h>
+
+/* Definitions for internet protocol version 4. Per RFC 791, September 1981. */
+#define IPVERSION 4
+
+/* Structure of an internet header, naked of options. */
+struct ip {
+#ifdef _IP_VHL
+ u_char ip_vhl; /* version << 4 | header length >> 2 */
+#else
+#if BYTE_ORDER == LITTLE_ENDIAN
+ u_int ip_hl: 4, /* header length */
+ ip_v: 4; /* version */
+#endif
+#if BYTE_ORDER == BIG_ENDIAN
+ u_int ip_v: 4, /* version */
+ ip_hl: 4; /* header length */
+#endif
+#endif /* not _IP_VHL */
+ u_char ip_tos; /* type of service */
+ u_short ip_len; /* total length */
+ u_short ip_id; /* identification */
+ u_short ip_off; /* fragment offset field */
+#define IP_RF 0x8000 /* reserved fragment flag */
+#define IP_DF 0x4000 /* dont fragment flag */
+#define IP_MF 0x2000 /* more fragments flag */
+#define IP_OFFMASK 0x1fff /* mask for fragmenting bits */
+ u_char ip_ttl; /* time to live */
+ u_char ip_p; /* protocol */
+ u_short ip_sum; /* checksum */
+ struct in_addr ip_src, ip_dst; /* source and dest address */
+};
+
+#ifdef _IP_VHL
+#define IP_MAKE_VHL(v, hl) ((v) << 4 | (hl))
+#define IP_VHL_HL(vhl) ((vhl) & 0x0f)
+#define IP_VHL_V(vhl) ((vhl) >> 4)
+#define IP_VHL_BORING 0x45
+#endif
+
+#define IP_MAXPACKET 65535 /* maximum packet size */
+
+/*
+ * Definitions for IP type of service (ip_tos)
+ */
+#define IPTOS_LOWDELAY 0x10
+#define IPTOS_THROUGHPUT 0x08
+#define IPTOS_RELIABILITY 0x04
+#define IPTOS_MINCOST 0x02
+/* ECN bits proposed by Sally Floyd */
+#define IPTOS_CE 0x01 /* congestion experienced */
+#define IPTOS_ECT 0x02 /* ECN-capable transport */
+
+/*
+ * Definitions for IP precedence (also in ip_tos) (hopefully unused)
+ */
+#define IPTOS_PREC_NETCONTROL 0xe0
+#define IPTOS_PREC_INTERNETCONTROL 0xc0
+#define IPTOS_PREC_CRITIC_ECP 0xa0
+#define IPTOS_PREC_FLASHOVERRIDE 0x80
+#define IPTOS_PREC_FLASH 0x60
+#define IPTOS_PREC_IMMEDIATE 0x40
+#define IPTOS_PREC_PRIORITY 0x20
+#define IPTOS_PREC_ROUTINE 0x00
+
+/* Definitions for options. */
+#define IPOPT_COPIED(o) ((o)&0x80)
+#define IPOPT_CLASS(o) ((o)&0x60)
+#define IPOPT_NUMBER(o) ((o)&0x1f)
+
+#define IPOPT_CONTROL 0x00
+#define IPOPT_RESERVED1 0x20
+#define IPOPT_DEBMEAS 0x40
+#define IPOPT_RESERVED2 0x60
+
+#define IPOPT_EOL 0 /* end of option list */
+#define IPOPT_NOP 1 /* no operation */
+
+#define IPOPT_RR 7 /* record packet route */
+#define IPOPT_TS 68 /* timestamp */
+#define IPOPT_SECURITY 130 /* provide s,c,h,tcc */
+#define IPOPT_LSRR 131 /* loose source route */
+#define IPOPT_ESO 133 /* extended security */
+#define IPOPT_CIPSO 134 /* commerical security */
+#define IPOPT_SATID 136 /* satnet id */
+#define IPOPT_SSRR 137 /* strict source route */
+#define IPOPT_RA 148 /* router alert */
+
+/* Offsets to fields in options other than EOL and NOP. */
+#define IPOPT_OPTVAL 0 /* option ID */
+#define IPOPT_OLEN 1 /* option length */
+#define IPOPT_OFFSET 2 /* offset within option */
+#define IPOPT_MINOFF 4 /* min value of above */
+
+/* Time stamp option structure. */
+struct ip_timestamp {
+ u_char ipt_code; /* IPOPT_TS */
+ u_char ipt_len; /* size of structure (variable) */
+ u_char ipt_ptr; /* index of current entry */
+#if BYTE_ORDER == LITTLE_ENDIAN
+ u_int ipt_flg: 4, /* flags, see below */
+ ipt_oflw: 4; /* overflow counter */
+#endif
+#if BYTE_ORDER == BIG_ENDIAN
+ u_int ipt_oflw: 4, /* overflow counter */
+ ipt_flg: 4; /* flags, see below */
+#endif
+ union ipt_timestamp {
+ n_long ipt_time[1];
+ struct ipt_ta {
+ struct in_addr ipt_addr;
+ n_long ipt_time;
+ } ipt_ta[1];
+ } ipt_timestamp;
+};
+
+/* flag bits for ipt_flg */
+#define IPOPT_TS_TSONLY 0 /* timestamps only */
+#define IPOPT_TS_TSANDADDR 1 /* timestamps and addresses */
+#define IPOPT_TS_PRESPEC 3 /* specified modules only */
+
+/* bits for security (not byte swapped) */
+#define IPOPT_SECUR_UNCLASS 0x0000
+#define IPOPT_SECUR_CONFID 0xf135
+#define IPOPT_SECUR_EFTO 0x789a
+#define IPOPT_SECUR_MMMM 0xbc4d
+#define IPOPT_SECUR_RESTR 0xaf13
+#define IPOPT_SECUR_SECRET 0xd788
+#define IPOPT_SECUR_TOPSECRET 0x6bc5
+
+/* Internet implementation parameters. */
+#define MAXTTL 255 /* maximum time to live (seconds) */
+#define IPDEFTTL 64 /* default ttl, from RFC 1340 */
+#define IPFRAGTTL 60 /* time to live for frags, slowhz */
+#define IPTTLDEC 1 /* subtracted when forwarding */
+
+#define IP_MSS 576 /* default maximum segment size */
+
+#endif
diff --git a/newlib/libc/sys/phoenix/include/netinet6/in6.h b/newlib/libc/sys/phoenix/include/netinet6/in6.h
new file mode 100644
index 000000000..1ebbc1d1e
--- /dev/null
+++ b/newlib/libc/sys/phoenix/include/netinet6/in6.h
@@ -0,0 +1,445 @@
+/* $FreeBSD: src/sys/netinet6/in6.h,v 1.19 2002/04/19 04:46:22 suz Exp $ */
+/* $KAME: in6.h,v 1.89 2001/05/27 13:28:35 itojun Exp $ */
+
+/*
+ * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
+ * 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. Neither the name of the project 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 PROJECT 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 PROJECT 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.
+ */
+
+/*
+ * Copyright (c) 1982, 1986, 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.
+ *
+ * @(#)in.h 8.3 (Berkeley) 1/3/94
+ */
+
+/* Copied from Linux, modified for Phoenix-RTOS. */
+
+#ifndef _NETINET6_IN6_H
+#define _NETINET6_IN6_H
+
+#include <sys/types.h>
+
+/*
+ * Identification of the network protocol stack
+ * for *BSD-current/release: http://www.kame.net/dev/cvsweb.cgi/kame/COVERAGE
+ * has the table of implementation/integration differences.
+ */
+#define __KAME__
+#define __KAME_VERSION "20010528/FreeBSD"
+
+/*
+ * Local port number conventions:
+ *
+ * Ports < IPPORT_RESERVED are reserved for privileged processes (e.g. root),
+ * unless a kernel is compiled with IPNOPRIVPORTS defined.
+ *
+ * When a user does a bind(2) or connect(2) with a port number of zero,
+ * a non-conflicting local port address is chosen.
+ *
+ * The default range is IPPORT_ANONMIN to IPPORT_ANONMAX, although
+ * that is settable by sysctl(3); net.inet.ip.anonportmin and
+ * net.inet.ip.anonportmax respectively.
+ *
+ * A user may set the IPPROTO_IP option IP_PORTRANGE to change this
+ * default assignment range.
+ *
+ * The value IP_PORTRANGE_DEFAULT causes the default behavior.
+ *
+ * The value IP_PORTRANGE_HIGH is the same as IP_PORTRANGE_DEFAULT,
+ * and exists only for FreeBSD compatibility purposes.
+ *
+ * The value IP_PORTRANGE_LOW changes the range to the "low" are
+ * that is (by convention) restricted to privileged processes.
+ * This convention is based on "vouchsafe" principles only.
+ * It is only secure if you trust the remote host to restrict these ports.
+ * The range is IPPORT_RESERVEDMIN to IPPORT_RESERVEDMAX.
+ */
+
+#define IPV6PORT_RESERVED 1024
+#define IPV6PORT_ANONMIN 49152
+#define IPV6PORT_ANONMAX 65535
+#define IPV6PORT_RESERVEDMIN 600
+#define IPV6PORT_RESERVEDMAX (IPV6PORT_RESERVED-1)
+
+/* IPv6 address */
+struct in6_addr {
+ union {
+ uint8_t __u6_addr8[16];
+ uint16_t __u6_addr16[8];
+ uint32_t __u6_addr32[4];
+ } __u6_addr; /* 128-bit IP6 address */
+};
+
+#define s6_addr __u6_addr.__u6_addr8
+
+#define INET6_ADDRSTRLEN 46
+
+/* Socket address for IPv6 */
+#ifndef _XOPEN_SOURCE
+#define SIN6_LEN
+#endif
+
+struct sockaddr_in6 {
+ uint8_t sin6_family; /* AF_INET6 (sa_family_t) */
+ uint16_t sin6_port; /* Transport layer port # (in_port_t) */
+ uint32_t sin6_flowinfo; /* IP6 flow information */
+ struct in6_addr sin6_addr; /* IP6 address */
+ uint32_t sin6_scope_id; /* scope zone index */
+};
+
+
+/* Definition of some useful macros to handle IP6 addresses */
+#define IN6ADDR_ANY_INIT \
+ {{{ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }}}
+#define IN6ADDR_LOOPBACK_INIT \
+ {{{ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01 }}}
+#define IN6ADDR_NODELOCAL_ALLNODES_INIT \
+ {{{ 0xff, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01 }}}
+#define IN6ADDR_LINKLOCAL_ALLNODES_INIT \
+ {{{ 0xff, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01 }}}
+#define IN6ADDR_LINKLOCAL_ALLROUTERS_INIT \
+ {{{ 0xff, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02 }}}
+
+extern const struct in6_addr in6addr_any;
+extern const struct in6_addr in6addr_loopback;
+extern const struct in6_addr in6addr_nodelocal_allnodes;
+extern const struct in6_addr in6addr_linklocal_allnodes;
+extern const struct in6_addr in6addr_linklocal_allrouters;
+
+/*
+ * Equality
+ * NOTE: Some of kernel programming environment (for example, openbsd/sparc)
+ * does not supply memcmp(). For userland memcmp() is preferred as it is
+ * in ANSI standard.
+ */
+
+#define IN6_ARE_ADDR_EQUAL(a, b) (memcmp(&(a)->s6_addr[0], &(b)->s6_addr[0], sizeof(struct in6_addr)) == 0)
+
+/* Unspecified */
+#define IN6_IS_ADDR_UNSPECIFIED(a) \
+ ((*(const uint32_t *)(const void *)(&(a)->s6_addr[0]) == 0) && \
+ (*(const uint32_t *)(const void *)(&(a)->s6_addr[4]) == 0) && \
+ (*(const uint32_t *)(const void *)(&(a)->s6_addr[8]) == 0) && \
+ (*(const uint32_t *)(const void *)(&(a)->s6_addr[12]) == 0))
+
+/* Loopback */
+#define IN6_IS_ADDR_LOOPBACK(a) \
+ ((*(const uint32_t *)(const void *)(&(a)->s6_addr[0]) == 0) && \
+ (*(const uint32_t *)(const void *)(&(a)->s6_addr[4]) == 0) && \
+ (*(const uint32_t *)(const void *)(&(a)->s6_addr[8]) == 0) && \
+ (*(const uint32_t *)(const void *)(&(a)->s6_addr[12]) == ntohl(1)))
+
+/* IPv4 compatible */
+#define IN6_IS_ADDR_V4COMPAT(a) \
+ ((*(const uint32_t *)(const void *)(&(a)->s6_addr[0]) == 0) && \
+ (*(const uint32_t *)(const void *)(&(a)->s6_addr[4]) == 0) && \
+ (*(const uint32_t *)(const void *)(&(a)->s6_addr[8]) == 0) && \
+ (*(const uint32_t *)(const void *)(&(a)->s6_addr[12]) != 0) && \
+ (*(const uint32_t *)(const void *)(&(a)->s6_addr[12]) != ntohl(1)))
+
+/* Mapped */
+#define IN6_IS_ADDR_V4MAPPED(a) \
+ ((*(const uint32_t *)(const void *)(&(a)->s6_addr[0]) == 0) && \
+ (*(const uint32_t *)(const void *)(&(a)->s6_addr[4]) == 0) && \
+ (*(const uint32_t *)(const void *)(&(a)->s6_addr[8]) == ntohl(0x0000ffff)))
+
+/* KAME Scope Values */
+#define __IPV6_ADDR_SCOPE_NODELOCAL 0x01
+#define __IPV6_ADDR_SCOPE_LINKLOCAL 0x02
+#define __IPV6_ADDR_SCOPE_SITELOCAL 0x05
+#define __IPV6_ADDR_SCOPE_ORGLOCAL 0x08 /* just used in this file */
+#define __IPV6_ADDR_SCOPE_GLOBAL 0x0e
+
+/*
+ * Unicast Scope
+ * Note that we must check topmost 10 bits only, not 16 bits (see RFC2373).
+ */
+#define IN6_IS_ADDR_LINKLOCAL(a) \
+ (((a)->s6_addr[0] == 0xfe) && (((a)->s6_addr[1] & 0xc0) == 0x80))
+#define IN6_IS_ADDR_SITELOCAL(a) \
+ (((a)->s6_addr[0] == 0xfe) && (((a)->s6_addr[1] & 0xc0) == 0xc0))
+
+/* Multicast */
+#define IN6_IS_ADDR_MULTICAST(a) ((a)->s6_addr[0] == 0xff)
+#define __IPV6_ADDR_MC_SCOPE(a) ((a)->s6_addr[1] & 0x0f)
+
+/* Multicast Scope */
+#define IN6_IS_ADDR_MC_NODELOCAL(a) \
+ (IN6_IS_ADDR_MULTICAST(a) && \
+ (__IPV6_ADDR_MC_SCOPE(a) == __IPV6_ADDR_SCOPE_NODELOCAL))
+#define IN6_IS_ADDR_MC_LINKLOCAL(a) \
+ (IN6_IS_ADDR_MULTICAST(a) && \
+ (__IPV6_ADDR_MC_SCOPE(a) == __IPV6_ADDR_SCOPE_LINKLOCAL))
+#define IN6_IS_ADDR_MC_SITELOCAL(a) \
+ (IN6_IS_ADDR_MULTICAST(a) && \
+ (__IPV6_ADDR_MC_SCOPE(a) == __IPV6_ADDR_SCOPE_SITELOCAL))
+#define IN6_IS_ADDR_MC_ORGLOCAL(a) \
+ (IN6_IS_ADDR_MULTICAST(a) && \
+ (__IPV6_ADDR_MC_SCOPE(a) == __IPV6_ADDR_SCOPE_ORGLOCAL))
+#define IN6_IS_ADDR_MC_GLOBAL(a) \
+ (IN6_IS_ADDR_MULTICAST(a) && \
+ (__IPV6_ADDR_MC_SCOPE(a) == __IPV6_ADDR_SCOPE_GLOBAL))
+
+/* IP6 route structure */
+#ifndef _XOPEN_SOURCE
+struct route_in6 {
+ struct rtentry *ro_rt;
+ struct sockaddr_in6 ro_dst;
+};
+#endif
+
+/*
+ * Options for use with [gs]etsockopt at the IPV6 level.
+ * First word of comment is data type; bool is stored in int.
+ */
+#define IPV6_SOCKOPT_RESERVED1 3 /* reserved for future use */
+#define IPV6_UNICAST_HOPS 4 /* int; IP6 hops */
+#define IPV6_MULTICAST_IF 9 /* u_char; set/get IP6 multicast i/f */
+#define IPV6_MULTICAST_HOPS 10 /* u_char; set/get IP6 multicast hops */
+#define IPV6_MULTICAST_LOOP 11 /* u_char; set/get IP6 multicast loopback */
+#define IPV6_JOIN_GROUP 12 /* ip6_mreq; join a group membership */
+#define IPV6_LEAVE_GROUP 13 /* ip6_mreq; leave a group membership */
+#define IPV6_PORTRANGE 14 /* int; range to choose for unspec port */
+#define ICMP6_FILTER 18 /* icmp6_filter; icmp6 filter */
+/* RFC2292 options */
+#define IPV6_PKTINFO 19 /* bool; send/recv if, src/dst addr */
+#define IPV6_HOPLIMIT 20 /* bool; hop limit */
+#define IPV6_NEXTHOP 21 /* bool; next hop addr */
+#define IPV6_HOPOPTS 22 /* bool; hop-by-hop option */
+#define IPV6_DSTOPTS 23 /* bool; destination option */
+#define IPV6_RTHDR 24 /* bool; routing header */
+#define IPV6_PKTOPTIONS 25 /* buf/cmsghdr; set/get IPv6 options */
+#define IPV6_CHECKSUM 26 /* int; checksum offset for raw socket */
+#define IPV6_V6ONLY 27 /* bool; only bind INET6 at wildcard bind */
+#define IPV6_BINDV6ONLY IPV6_V6ONLY
+#define IPV6_IPSEC_POLICY 28 /* struct; get/set security policy */
+#define IPV6_FAITH 29 /* bool; accept FAITH'ed connections */
+#define IPV6_FW_ADD 30 /* add a firewall rule to chain */
+#define IPV6_FW_DEL 31 /* delete a firewall rule from chain */
+#define IPV6_FW_FLUSH 32 /* flush firewall rule chain */
+#define IPV6_FW_ZERO 33 /* clear single/all firewall counter(s) */
+#define IPV6_FW_GET 34 /* get entire firewall rule chain */
+
+/* to define items, should talk with KAME guys first, for *BSD compatibility */
+#define IPV6_RTHDR_LOOSE 0 /* this hop need not be a neighbor. XXX old spec */
+#define IPV6_RTHDR_STRICT 1 /* this hop must be a neighbor. XXX old spec */
+#define IPV6_RTHDR_TYPE_0 0 /* IPv6 routing header type 0 */
+
+/* Defaults and limits for options */
+#define IPV6_DEFAULT_MULTICAST_HOPS 1 /* normally limit m'casts to 1 hop */
+#define IPV6_DEFAULT_MULTICAST_LOOP 1 /* normally hear sends if a member */
+
+/* Argument structure for IPV6_JOIN_GROUP and IPV6_LEAVE_GROUP. */
+struct ipv6_mreq {
+ struct in6_addr ipv6mr_multiaddr;
+ unsigned int ipv6mr_interface;
+};
+
+/* IPV6_PKTINFO: Packet information(RFC2292 sec 5) */
+struct in6_pktinfo {
+ struct in6_addr ipi6_addr; /* src/dst IPv6 address */
+ unsigned int ipi6_ifindex; /* send/recv interface index */
+};
+
+/*
+ * Argument for IPV6_PORTRANGE:
+ * - which range to search when port is unspecified at bind() or connect()
+ */
+#define IPV6_PORTRANGE_DEFAULT 0 /* default range */
+#define IPV6_PORTRANGE_HIGH 1 /* "high" - request firewall bypass */
+#define IPV6_PORTRANGE_LOW 2 /* "low" - vouchsafe security */
+
+#ifndef _XOPEN_SOURCE
+/*
+ * Definitions for inet6 sysctl operations.
+ *
+ * Third level is protocol number.
+ * Fourth level is desired variable within that protocol.
+ */
+#define IPV6PROTO_MAXID (IPPROTO_PIM + 1) /* don't list to IPV6PROTO_MAX */
+
+#define CTL_IPV6PROTO_NAMES { \
+ { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 }, \
+ { 0, 0 }, \
+ { "tcp6", CTLTYPE_NODE }, \
+ { 0, 0 }, \
+ { 0, 0 }, \
+ { 0, 0 }, \
+ { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 }, \
+ { 0, 0 }, \
+ { 0, 0 }, \
+ { "udp6", CTLTYPE_NODE }, \
+ { 0, 0 }, \
+ { 0, 0 }, \
+ { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 }, \
+ { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 }, \
+ { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 }, \
+ { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 }, \
+ { 0, 0 }, \
+ { "ip6", CTLTYPE_NODE }, \
+ { 0, 0 }, \
+ { 0, 0 }, \
+ { 0, 0 }, \
+ { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 }, \
+ { 0, 0 }, \
+ { "ipsec6", CTLTYPE_NODE }, \
+ { 0, 0 }, \
+ { 0, 0 }, \
+ { 0, 0 }, \
+ { 0, 0 }, \
+ { 0, 0 }, \
+ { 0, 0 }, \
+ { "icmp6", CTLTYPE_NODE }, \
+ { 0, 0 }, \
+ { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 }, \
+ { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 }, \
+ { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 }, \
+ { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 }, \
+ { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 }, \
+ { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 }, \
+ { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 }, \
+ { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 }, \
+ { 0, 0 }, \
+ { 0, 0 }, \
+ { 0, 0 }, \
+ { "pim6", CTLTYPE_NODE }, \
+}
+
+/*
+ * Names for IP sysctl objects
+ */
+#define IPV6CTL_FORWARDING 1 /* act as router */
+#define IPV6CTL_SENDREDIRECTS 2 /* may send redirects when forwarding */
+#define IPV6CTL_DEFHLIM 3 /* default Hop-Limit */
+#ifdef notyet
+#define IPV6CTL_DEFMTU 4 /* default MTU */
+#endif
+#define IPV6CTL_FORWSRCRT 5 /* forward source-routed dgrams */
+#define IPV6CTL_STATS 6 /* stats */
+#define IPV6CTL_MRTSTATS 7 /* multicast forwarding stats */
+#define IPV6CTL_MRTPROTO 8 /* multicast routing protocol */
+#define IPV6CTL_MAXFRAGPACKETS 9 /* max packets reassembly queue */
+#define IPV6CTL_SOURCECHECK 10 /* verify source route and intf */
+#define IPV6CTL_SOURCECHECK_LOGINT 11 /* minimume logging interval */
+#define IPV6CTL_ACCEPT_RTADV 12
+#define IPV6CTL_KEEPFAITH 13
+#define IPV6CTL_LOG_INTERVAL 14
+#define IPV6CTL_HDRNESTLIMIT 15
+#define IPV6CTL_DAD_COUNT 16
+#define IPV6CTL_AUTO_FLOWLABEL 17
+#define IPV6CTL_DEFMCASTHLIM 18
+#define IPV6CTL_GIF_HLIM 19 /* default HLIM for gif encap packet */
+#define IPV6CTL_KAME_VERSION 20
+#define IPV6CTL_USE_DEPRECATED 21 /* use deprecated addr (RFC2462 5.5.4) */
+#define IPV6CTL_RR_PRUNE 22 /* walk timer for router renumbering */
+#define IPV6CTL_V6ONLY 24
+#define IPV6CTL_RTEXPIRE 25 /* cloned route expiration time */
+#define IPV6CTL_RTMINEXPIRE 26 /* min value for expiration time */
+#define IPV6CTL_RTMAXCACHE 27 /* trigger level for dynamic expire */
+
+#define IPV6CTL_USETEMPADDR 32 /* use temporary addresses (RFC3041) */
+#define IPV6CTL_TEMPPLTIME 33 /* preferred lifetime for tmpaddrs */
+#define IPV6CTL_TEMPVLTIME 34 /* valid lifetime for tmpaddrs */
+#define IPV6CTL_AUTO_LINKLOCAL 35 /* automatic link-local addr assign */
+#define IPV6CTL_RIP6STATS 36 /* raw_ip6 stats */
+
+/* New entries should be added here from current IPV6CTL_MAXID value. */
+/* to define items, should talk with KAME guys first, for *BSD compatibility */
+#define IPV6CTL_MAXID 37
+
+#endif /* !_XOPEN_SOURCE */
+
+/* Redefinition of mbuf flags */
+#define M_AUTHIPHDR M_PROTO2
+#define M_DECRYPTED M_PROTO3
+#define M_LOOP M_PROTO4
+#define M_AUTHIPDGM M_PROTO5
+
+struct cmsghdr;
+
+int inet6_option_space(int);
+int inet6_option_init(void *, struct cmsghdr **, int);
+int inet6_option_append(struct cmsghdr *, const uint8_t *, int, int);
+uint8_t *inet6_option_alloc(struct cmsghdr *, int, int, int);
+int inet6_option_next(const struct cmsghdr *, uint8_t **);
+int inet6_option_find(const struct cmsghdr *, uint8_t **, int);
+size_t inet6_rthdr_space(int, int);
+struct cmsghdr *inet6_rthdr_init(void *, int);
+int inet6_rthdr_add(struct cmsghdr *, const struct in6_addr *, unsigned int);
+int inet6_rthdr_lasthop(struct cmsghdr *, unsigned int);
+int inet6_rthdr_segments(const struct cmsghdr *);
+struct in6_addr *inet6_rthdr_getaddr(struct cmsghdr *, int);
+int inet6_rthdr_getflags(const struct cmsghdr *, int);
+int inet6_opt_init(void *, size_t);
+int inet6_opt_append(void *, size_t, int, uint8_t, size_t, uint8_t, void **);
+int inet6_opt_finish(void *, size_t, int);
+int inet6_opt_set_val(void *, size_t, void *, int);
+int inet6_opt_next(void *, size_t, int, uint8_t *, size_t *, void **);
+int inet6_opt_find(void *, size_t, int, uint8_t, size_t *, void **);
+int inet6_opt_get_val(void *, size_t, void *, int);
+size_t inet6_rth_space(int, int);
+void *inet6_rth_init(void *, int, int, int);
+int inet6_rth_add(void *, const struct in6_addr *);
+int inet6_rth_reverse(const void *, void *);
+int inet6_rth_segments(const void *);
+struct in6_addr *inet6_rth_getaddr(const void *, int);
+
+#endif
diff --git a/newlib/libc/sys/phoenix/include/poll.h b/newlib/libc/sys/phoenix/include/poll.h
new file mode 100644
index 000000000..06c4ec5e6
--- /dev/null
+++ b/newlib/libc/sys/phoenix/include/poll.h
@@ -0,0 +1,30 @@
+/* Copyright (c) 2016 Phoenix Systems
+ 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.*/
+
+#ifndef POLL_H
+#define POLL_H
+
+#include <sys/poll.h>
+
+#endif
diff --git a/newlib/libc/sys/phoenix/include/semaphore.h b/newlib/libc/sys/phoenix/include/semaphore.h
new file mode 100644
index 000000000..4a0438fd4
--- /dev/null
+++ b/newlib/libc/sys/phoenix/include/semaphore.h
@@ -0,0 +1,52 @@
+/* Copyright (c) 2016 Phoenix Systems
+ 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.*/
+
+#ifndef SEMAPHORE_H
+#define SEMAPHORE_H
+
+#include <time.h>
+
+/* System specific semaphore definition. */
+typedef struct {
+ int fd;
+} sem_t;
+
+/* Value returned if `sem_open' failed. */
+#define SEM_FAILED ((sem_t *) 0)
+
+/* Maximum value the semaphore can have. */
+#define SEM_VALUE_MAX (2147483647)
+
+int sem_init(sem_t *sem, int pshared, unsigned int value);
+int sem_destroy(sem_t *sem);
+sem_t *sem_open(const char *name, int oflag, ...);
+int sem_close(sem_t *sem);
+int sem_unlink(const char *name);
+int sem_wait(sem_t *sem);
+int sem_timedwait(sem_t *sem, const struct timespec *abs_timeout);
+int sem_trywait(sem_t *sem);
+int sem_post(sem_t *sem);
+int sem_getvalue(sem_t * sem, int *sval);
+
+#endif
diff --git a/newlib/libc/sys/phoenix/include/syslog.h b/newlib/libc/sys/phoenix/include/syslog.h
new file mode 100644
index 000000000..adf9e1e1c
--- /dev/null
+++ b/newlib/libc/sys/phoenix/include/syslog.h
@@ -0,0 +1,143 @@
+/* Copyright (c) 2016 Phoenix Systems
+ 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.*/
+
+#ifndef SYSLOG_H
+#define SYSLOG_H
+
+#include <stdlib.h>
+
+#define LOG_EMERG 0 /* System is unusable */
+#define LOG_ALERT 1 /* Action must be taken immediately */
+#define LOG_CRIT 2 /* Critical conditions */
+#define LOG_ERR 3 /* Error conditions */
+#define LOG_WARNING 4 /* Warning conditions */
+#define LOG_NOTICE 5 /* Normal but significant condition */
+#define LOG_INFO 6 /* Informational */
+#define LOG_DEBUG 7 /* Debug-level messages */
+
+#define LOG_PRIMASK 0x07 /* Mask to extract priority part (internal) */
+#define LOG_PRI(p) ((p) & LOG_PRIMASK) /* Extract priority */
+#define LOG_MAKEPRI(fac, pri) (((fac) << 3) | (pri))
+
+#ifdef SYSLOG_NAMES
+#define INTERNAL_NOPRI 0x10 /* The "no priority" priority */
+#define INTERNAL_MARK LOG_MAKEPRI(LOG_NFACILITIES, 0) /* Mark "facility" */
+typedef struct _code {
+ char *c_name;
+ int c_val;
+} CODE;
+
+CODE prioritynames[] = {
+ "alert", LOG_ALERT,
+ "crit", LOG_CRIT,
+ "debug", LOG_DEBUG,
+ "emerg", LOG_EMERG,
+ "err", LOG_ERR,
+ "error", LOG_ERR, /* DEPRECATED */
+ "info", LOG_INFO,
+ "none", INTERNAL_NOPRI, /* INTERNAL */
+ "notice", LOG_NOTICE,
+ "panic", LOG_EMERG, /* DEPRECATED */
+ "warn", LOG_WARNING, /* DEPRECATED */
+ "warning", LOG_WARNING,
+ NULL, -1,
+};
+#endif
+
+/* Facility codes */
+#define LOG_KERN (0 << 3) /* Kernel messages */
+#define LOG_USER (1 << 3) /* Random user-level messages */
+#define LOG_MAIL (2 << 3) /* Mail system */
+#define LOG_DAEMON (3 << 3) /* System daemons */
+#define LOG_AUTH (4 << 3) /* Security/authorization messages */
+#define LOG_SYSLOG (5 << 3) /* Messages generated internally by syslogd */
+#define LOG_LPR (6 << 3) /* Line printer subsystem */
+#define LOG_NEWS (7 << 3) /* Network news subsystem */
+#define LOG_UUCP (8 << 3) /* UUCP subsystem */
+#define LOG_CRON (9 << 3) /* Clock daemon */
+#define LOG_AUTHPRIV (10 << 3) /* Security/authorization messages (private) */
+
+/* Other codes through 15 reserved for system use */
+#define LOG_LOCAL0 (16 << 3) /* Reserved for local use */
+#define LOG_LOCAL1 (17 << 3) /* Reserved for local use */
+#define LOG_LOCAL2 (18 << 3) /* Reserved for local use */
+#define LOG_LOCAL3 (19 << 3) /* Reserved for local use */
+#define LOG_LOCAL4 (20 << 3) /* Reserved for local use */
+#define LOG_LOCAL5 (21 << 3) /* Reserved for local use */
+#define LOG_LOCAL6 (22 << 3) /* Reserved for local use */
+#define LOG_LOCAL7 (23 << 3) /* Reserved for local use */
+
+#define LOG_NFACILITIES 24 /* Current number of facilities */
+#define LOG_FACMASK 0x03f8 /* Mask to extract facility part */
+#define LOG_FAC(p) (((p) & LOG_FACMASK) >> 3) /* Facility of pri */
+
+#ifdef SYSLOG_NAMES
+CODE facilitynames[] = {
+ "auth", LOG_AUTH,
+ "authpriv", LOG_AUTHPRIV,
+ "cron", LOG_CRON,
+ "daemon", LOG_DAEMON,
+ "kern", LOG_KERN,
+ "lpr", LOG_LPR,
+ "mail", LOG_MAIL,
+ "mark", INTERNAL_MARK, /* INTERNAL */
+ "news", LOG_NEWS,
+ "security", LOG_AUTH, /* DEPRECATED */
+ "syslog", LOG_SYSLOG,
+ "user", LOG_USER,
+ "uucp", LOG_UUCP,
+ "local0", LOG_LOCAL0,
+ "local1", LOG_LOCAL1,
+ "local2", LOG_LOCAL2,
+ "local3", LOG_LOCAL3,
+ "local4", LOG_LOCAL4,
+ "local5", LOG_LOCAL5,
+ "local6", LOG_LOCAL6,
+ "local7", LOG_LOCAL7,
+ NULL, -1,
+};
+#endif
+
+/* Arguments to setlogmask */
+#define LOG_MASK(pri) (1 << (pri)) /* Mask for one priority */
+#define LOG_UPTO(pri) ((1 << ((pri) + 1)) - 1) /* All priorities through pri */
+
+/*
+ * Option flags for openlog.
+ *
+ * LOG_ODELAY no longer does anything.
+ * LOG_NDELAY is the inverse of what it used to be.
+ */
+#define LOG_PID 0x01 /* Log the pid with each message */
+#define LOG_CONS 0x02 /* Log on the console if errors in sending */
+#define LOG_ODELAY 0x04 /* Delay open until first syslog() (default) */
+#define LOG_NDELAY 0x08 /* Don't delay open */
+#define LOG_NOWAIT 0x10 /* Don't wait for console forks: DEPRECATED */
+#define LOG_PERROR 0x20 /* Log to stderr as well */
+
+void openlog(const char *ident, int option, int facility);
+void syslog(int priority, const char *format, ...);
+void closelog();
+
+#endif
diff --git a/newlib/libc/sys/phoenix/include/time.h b/newlib/libc/sys/phoenix/include/time.h
new file mode 100644
index 000000000..3a9449c77
--- /dev/null
+++ b/newlib/libc/sys/phoenix/include/time.h
@@ -0,0 +1,85 @@
+/* Copyright (c) 2016 Phoenix Systems
+ 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.*/
+
+#ifndef TIME_H
+#define TIME_H
+
+#include <_ansi.h>
+#include <phoenix/time.h>
+#include <sys/reent.h>
+#include <sys/time.h>
+#include <sys/types.h>
+
+extern int _daylight;
+extern long _timezone;
+extern char *_tzname[2];
+
+/* POSIX defines the external tzname being defined in time.h */
+#ifndef tzname
+#define tzname _tzname
+#endif
+
+typedef struct __tzrule_struct {
+ char ch;
+ int m;
+ int n;
+ int d;
+ int s;
+ time_t change;
+ long offset;
+} __tzrule_type;
+
+typedef struct __tzinfo_struct {
+ int __tznorth;
+ int __tzyear;
+ __tzrule_type __tzrule[2];
+} __tzinfo_type;
+
+__tzinfo_type *__gettzinfo();
+void tzset();
+
+clock_t clock();
+int clock_gettime(clockid_t clock_id, struct timespec *tp);
+int clock_settime(clockid_t clock_id, const struct timespec *tp);
+int clock_getres(clockid_t clock_id, struct timespec *res);
+
+double difftime(time_t time1, time_t time0);
+time_t mktime(struct tm *tm);
+time_t time(time_t *t);
+
+char *asctime(const struct tm *tm);
+char *ctime(const time_t *timep);
+struct tm *gmtime(const time_t *timep);
+struct tm *localtime(const time_t *timep);
+
+char *asctime_r(const struct tm *tm, char *buf);
+char *ctime_r(const time_t *timep, char *buf);
+struct tm *gmtime_r(const time_t *timep, struct tm *result);
+struct tm *localtime_r(const time_t *timep, struct tm *result);
+
+size_t strftime(char *s, size_t max, const char *format, const struct tm *tm);
+
+int nanosleep(const struct timespec *req, struct timespec *rem);
+
+#endif
diff --git a/newlib/libc/sys/phoenix/io.c b/newlib/libc/sys/phoenix/io.c
new file mode 100644
index 000000000..1e059ee26
--- /dev/null
+++ b/newlib/libc/sys/phoenix/io.c
@@ -0,0 +1,100 @@
+/* Copyright (c) 2016 Phoenix Systems
+ 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 "syscall.h"
+
+#include <errno.h>
+#include <fcntl.h>
+#include <stdarg.h>
+#include <sys/stat.h>
+#include <sys/types.h>
+
+int open(const char *pathname, int flags, ...)
+{
+ int mode = S_IFREG | S_IRWXUGO;
+
+ if (flags & O_CREAT) {
+ va_list arg;
+ va_start(arg, flags);
+ mode = va_arg(arg, int);
+ va_end(arg);
+ }
+
+ int ret = syscall3(int, SYS_OPEN, pathname, flags, mode);
+ if (ret < 0) {
+ errno = -ret;
+ return -1;
+ }
+
+ return ret;
+}
+
+ssize_t read(int fd, void *buf, size_t count)
+{
+ int ret = syscall3(int, SYS_READ, fd, buf, count);
+ if (ret < 0) {
+ errno = -ret;
+ return -1;
+ }
+
+ return ret;
+}
+
+ssize_t write(int fd, const void *buf, size_t count)
+{
+ int ret = syscall3(int, SYS_WRITE, fd, buf, count);
+ if (ret < 0) {
+ errno = -ret;
+ return -1;
+ }
+
+ return ret;
+}
+
+off_t lseek(int fd, off_t offset, int whence)
+{
+ int ret = syscall3(int, SYS_LSEEK, fd, offset, whence);
+ if (ret < 0) {
+ errno = -ret;
+ return -1;
+ }
+
+ return ret;
+}
+
+int close(int fd)
+{
+ int ret = syscall1(int, SYS_CLOSE, fd);
+ if (ret < 0) {
+ errno = -ret;
+ return -1;
+ }
+
+ return ret;
+}
+
+int _close(int fd)
+{
+ return close(fd);
+}
diff --git a/newlib/libc/sys/phoenix/ioctl.c b/newlib/libc/sys/phoenix/ioctl.c
new file mode 100644
index 000000000..497160644
--- /dev/null
+++ b/newlib/libc/sys/phoenix/ioctl.c
@@ -0,0 +1,43 @@
+/* Copyright (c) 2016 Phoenix Systems
+ 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 "syscall.h"
+
+#include <errno.h>
+#include <stdarg.h>
+
+int ioctl(int d, int request, ...)
+{
+ va_list ap;
+ va_start(ap, request);
+ int ret = syscall3(int, SYS_IOCTL, d, request, va_arg(ap, void *));
+ va_end(ap);
+
+ if (ret < 0) {
+ errno = -ret;
+ return -1;
+ }
+
+ return ret;
+}
diff --git a/newlib/libc/sys/phoenix/machine/Makefile.am b/newlib/libc/sys/phoenix/machine/Makefile.am
new file mode 100644
index 000000000..7143bbf8a
--- /dev/null
+++ b/newlib/libc/sys/phoenix/machine/Makefile.am
@@ -0,0 +1,25 @@
+## Process this file with automake to generate Makefile.in
+
+AUTOMAKE_OPTIONS = cygnus
+
+SUBDIRS = $(machine_dir) .
+
+noinst_DATA = $(CRT0) lib.a
+
+$(CRT0): $(machine_dir)/$(CRT0)
+ rm -f $@
+ ln $(machine_dir)/$(CRT0) $@ >/dev/null 2>/dev/null \
+ || cp $(machine_dir)/$(CRT0) $@
+
+$(machine_dir)/$(CRT0): ; @true
+
+CLEANFILES = $(CRT0)
+
+lib.a: $(machine_dir)/lib.a
+ rm -f $@
+ ln $< $@ >/dev/null 2>/dev/null || cp $< $@
+
+doc:
+
+ACLOCAL_AMFLAGS = -I ../../../.. -I ../../../../..
+CONFIG_STATUS_DEPENDENCIES = $(newlib_basedir)/configure.host
diff --git a/newlib/libc/sys/phoenix/machine/Makefile.in b/newlib/libc/sys/phoenix/machine/Makefile.in
new file mode 100644
index 000000000..b4e5e2698
--- /dev/null
+++ b/newlib/libc/sys/phoenix/machine/Makefile.in
@@ -0,0 +1,511 @@
+# Makefile.in generated by automake 1.11.6 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 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@
+
+VPATH = @srcdir@
+am__make_dryrun = \
+ { \
+ am__dry=no; \
+ case $$MAKEFLAGS in \
+ *\\[\ \ ]*) \
+ echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \
+ | grep '^AM OK$$' >/dev/null || am__dry=yes;; \
+ *) \
+ for am__flg in $$MAKEFLAGS; do \
+ case $$am__flg in \
+ *=*|--*) ;; \
+ *n*) am__dry=yes; break;; \
+ esac; \
+ done;; \
+ esac; \
+ test $$am__dry = yes; \
+ }
+pkgdatadir = $(datadir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+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@
+subdir = .
+DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
+ $(top_srcdir)/configure $(am__configure_deps) \
+ $(srcdir)/../../../../../mkinstalldirs
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/../../../../acinclude.m4 \
+ $(top_srcdir)/configure.in
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+ $(ACLOCAL_M4)
+am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
+ configure.lineno config.status.lineno
+mkinstalldirs = $(SHELL) $(top_srcdir)/../../../../../mkinstalldirs
+CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+depcomp =
+am__depfiles_maybe =
+SOURCES =
+RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
+ html-recursive info-recursive install-data-recursive \
+ install-dvi-recursive install-exec-recursive \
+ install-html-recursive install-info-recursive \
+ install-pdf-recursive install-ps-recursive install-recursive \
+ installcheck-recursive installdirs-recursive pdf-recursive \
+ ps-recursive uninstall-recursive
+am__can_run_installinfo = \
+ case $$AM_UPDATE_INFO_DIR in \
+ n|no|NO) false;; \
+ *) (install-info --version) >/dev/null 2>&1;; \
+ esac
+DATA = $(noinst_DATA)
+RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \
+ distclean-recursive maintainer-clean-recursive
+AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \
+ $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS
+ETAGS = etags
+CTAGS = ctags
+DIST_SUBDIRS = $(SUBDIRS)
+ACLOCAL = @ACLOCAL@
+AMTAR = @AMTAR@
+AR = @AR@
+AS = @AS@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CC = @CC@
+CCAS = @CCAS@
+CCASFLAGS = @CCASFLAGS@
+CCDEPMODE = @CCDEPMODE@
+CRT0 = @CRT0@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LDFLAGS = @LDFLAGS@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LTLIBOBJS = @LTLIBOBJS@
+MAINT = @MAINT@
+MAKEINFO = @MAKEINFO@
+MKDIR_P = @MKDIR_P@
+NEWLIB_CFLAGS = @NEWLIB_CFLAGS@
+NO_INCLUDE_LIST = @NO_INCLUDE_LIST@
+OBJEXT = @OBJEXT@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+RANLIB = @RANLIB@
+READELF = @READELF@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+VERSION = @VERSION@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+aext = @aext@
+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@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+libm_machine_dir = @libm_machine_dir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+lpfx = @lpfx@
+machine_dir = @machine_dir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+newlib_basedir = @newlib_basedir@
+oext = @oext@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+subdirs = @subdirs@
+sys_dir = @sys_dir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+AUTOMAKE_OPTIONS = cygnus
+SUBDIRS = $(machine_dir) .
+noinst_DATA = $(CRT0) lib.a
+CLEANFILES = $(CRT0)
+ACLOCAL_AMFLAGS = -I ../../../.. -I ../../../../..
+CONFIG_STATUS_DEPENDENCIES = $(newlib_basedir)/configure.host
+all: all-recursive
+
+.SUFFIXES:
+am--refresh: Makefile
+ @:
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
+ @for dep in $?; do \
+ case '$(am__configure_deps)' in \
+ *$$dep*) \
+ echo ' cd $(srcdir) && $(AUTOMAKE) --cygnus'; \
+ $(am__cd) $(srcdir) && $(AUTOMAKE) --cygnus \
+ && exit 0; \
+ exit 1;; \
+ esac; \
+ done; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --cygnus Makefile'; \
+ $(am__cd) $(top_srcdir) && \
+ $(AUTOMAKE) --cygnus Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ @case '$?' in \
+ *config.status*) \
+ echo ' $(SHELL) ./config.status'; \
+ $(SHELL) ./config.status;; \
+ *) \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \
+ esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+ $(SHELL) ./config.status --recheck
+
+$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
+ $(am__cd) $(srcdir) && $(AUTOCONF)
+$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
+ $(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
+$(am__aclocal_m4_deps):
+
+# This directory's subdirectories are mostly independent; you can cd
+# into them and run `make' without going through this Makefile.
+# To change the values of `make' variables: instead of editing Makefiles,
+# (1) if the variable is set in `config.status', edit `config.status'
+# (which will cause the Makefiles to be regenerated when you run `make');
+# (2) otherwise, pass the desired values on the `make' command line.
+$(RECURSIVE_TARGETS):
+ @fail= failcom='exit 1'; \
+ for f in x $$MAKEFLAGS; do \
+ case $$f in \
+ *=* | --[!k]*);; \
+ *k*) failcom='fail=yes';; \
+ esac; \
+ done; \
+ dot_seen=no; \
+ target=`echo $@ | sed s/-recursive//`; \
+ list='$(SUBDIRS)'; for subdir in $$list; do \
+ echo "Making $$target in $$subdir"; \
+ if test "$$subdir" = "."; then \
+ dot_seen=yes; \
+ local_target="$$target-am"; \
+ else \
+ local_target="$$target"; \
+ fi; \
+ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+ || eval $$failcom; \
+ done; \
+ if test "$$dot_seen" = "no"; then \
+ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
+ fi; test -z "$$fail"
+
+$(RECURSIVE_CLEAN_TARGETS):
+ @fail= failcom='exit 1'; \
+ for f in x $$MAKEFLAGS; do \
+ case $$f in \
+ *=* | --[!k]*);; \
+ *k*) failcom='fail=yes';; \
+ esac; \
+ done; \
+ dot_seen=no; \
+ case "$@" in \
+ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
+ *) list='$(SUBDIRS)' ;; \
+ esac; \
+ rev=''; for subdir in $$list; do \
+ if test "$$subdir" = "."; then :; else \
+ rev="$$subdir $$rev"; \
+ fi; \
+ done; \
+ rev="$$rev ."; \
+ target=`echo $@ | sed s/-recursive//`; \
+ for subdir in $$rev; do \
+ echo "Making $$target in $$subdir"; \
+ if test "$$subdir" = "."; then \
+ local_target="$$target-am"; \
+ else \
+ local_target="$$target"; \
+ fi; \
+ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+ || eval $$failcom; \
+ done && test -z "$$fail"
+tags-recursive:
+ list='$(SUBDIRS)'; for subdir in $$list; do \
+ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
+ done
+ctags-recursive:
+ list='$(SUBDIRS)'; for subdir in $$list; do \
+ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
+ done
+
+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; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ mkid -fID $$unique
+tags: TAGS
+
+TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ set x; \
+ here=`pwd`; \
+ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
+ include_option=--etags-include; \
+ empty_fix=.; \
+ else \
+ include_option=--include; \
+ empty_fix=; \
+ fi; \
+ list='$(SUBDIRS)'; for subdir in $$list; do \
+ if test "$$subdir" = .; then :; else \
+ test ! -f $$subdir/TAGS || \
+ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \
+ fi; \
+ done; \
+ 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; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ shift; \
+ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
+ test -n "$$unique" || unique=$$empty_fix; \
+ if test $$# -gt 0; then \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ "$$@" $$unique; \
+ else \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ $$unique; \
+ fi; \
+ fi
+ctags: CTAGS
+CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ 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; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ test -z "$(CTAGS_ARGS)$$unique" \
+ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+ $$unique
+
+GTAGS:
+ here=`$(am__cd) $(top_builddir) && pwd` \
+ && $(am__cd) $(top_srcdir) \
+ && gtags -i $(GTAGS_ARGS) "$$here"
+
+distclean-tags:
+ -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+check-am:
+check: check-recursive
+all-am: Makefile $(DATA)
+installdirs: installdirs-recursive
+installdirs-am:
+install: install-recursive
+install-exec: install-exec-recursive
+install-data: install-data-recursive
+uninstall: uninstall-recursive
+
+install-am: all-am
+ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-recursive
+install-strip:
+ if test -z '$(STRIP)'; then \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ install; \
+ else \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
+ fi
+mostlyclean-generic:
+
+clean-generic:
+ -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
+
+distclean-generic:
+ -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+ -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_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-recursive
+
+clean-am: clean-generic mostlyclean-am
+
+distclean: distclean-recursive
+ -rm -f $(am__CONFIG_DISTCLEAN_FILES)
+ -rm -f Makefile
+distclean-am: clean-am distclean-generic distclean-tags
+
+dvi: dvi-recursive
+
+dvi-am:
+
+html: html-recursive
+
+html-am:
+
+info: info-recursive
+
+info-am:
+
+install-data-am:
+
+install-dvi: install-dvi-recursive
+
+install-dvi-am:
+
+install-exec-am:
+
+install-html: install-html-recursive
+
+install-html-am:
+
+install-info: install-info-recursive
+
+install-info-am:
+
+install-man:
+
+install-pdf: install-pdf-recursive
+
+install-pdf-am:
+
+install-ps: install-ps-recursive
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-recursive
+ -rm -f $(am__CONFIG_DISTCLEAN_FILES)
+ -rm -rf $(top_srcdir)/autom4te.cache
+ -rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-recursive
+
+mostlyclean-am: mostlyclean-generic
+
+pdf: pdf-recursive
+
+pdf-am:
+
+ps: ps-recursive
+
+ps-am:
+
+uninstall-am:
+
+.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) ctags-recursive \
+ install-am install-strip tags-recursive
+
+.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \
+ all all-am am--refresh check check-am clean clean-generic \
+ ctags ctags-recursive distclean distclean-generic \
+ distclean-tags dvi dvi-am html html-am info info-am install \
+ install-am install-data install-data-am install-dvi \
+ install-dvi-am install-exec install-exec-am install-html \
+ install-html-am install-info install-info-am install-man \
+ install-pdf install-pdf-am install-ps install-ps-am \
+ install-strip installcheck installcheck-am installdirs \
+ installdirs-am maintainer-clean maintainer-clean-generic \
+ mostlyclean mostlyclean-generic pdf pdf-am ps ps-am tags \
+ tags-recursive uninstall uninstall-am
+
+
+$(CRT0): $(machine_dir)/$(CRT0)
+ rm -f $@
+ ln $(machine_dir)/$(CRT0) $@ >/dev/null 2>/dev/null \
+ || cp $(machine_dir)/$(CRT0) $@
+
+$(machine_dir)/$(CRT0): ; @true
+
+lib.a: $(machine_dir)/lib.a
+ rm -f $@
+ ln $< $@ >/dev/null 2>/dev/null || cp $< $@
+
+doc:
+
+# 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/sys/phoenix/machine/aclocal.m4 b/newlib/libc/sys/phoenix/machine/aclocal.m4
new file mode 100644
index 000000000..7a9440dca
--- /dev/null
+++ b/newlib/libc/sys/phoenix/machine/aclocal.m4
@@ -0,0 +1,1012 @@
+# generated automatically by aclocal 1.11.6 -*- Autoconf -*-
+
+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
+# 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation,
+# Inc.
+# This file 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.
+
+m4_ifndef([AC_AUTOCONF_VERSION],
+ [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
+m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.68],,
+[m4_warning([this file was generated for autoconf 2.68.
+You have another version of autoconf. It may work, but is not guaranteed to.
+If you have problems, you may need to regenerate the build system entirely.
+To do so, use the procedure documented by the package, typically `autoreconf'.])])
+
+# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008, 2011 Free Software
+# Foundation, Inc.
+#
+# This file 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.
+
+# serial 1
+
+# AM_AUTOMAKE_VERSION(VERSION)
+# ----------------------------
+# Automake X.Y traces this macro to ensure aclocal.m4 has been
+# generated from the m4 files accompanying Automake X.Y.
+# (This private macro should not be called outside this file.)
+AC_DEFUN([AM_AUTOMAKE_VERSION],
+[am__api_version='1.11'
+dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
+dnl require some minimum version. Point them to the right macro.
+m4_if([$1], [1.11.6], [],
+ [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
+])
+
+# _AM_AUTOCONF_VERSION(VERSION)
+# -----------------------------
+# aclocal traces this macro to find the Autoconf version.
+# This is a private macro too. Using m4_define simplifies
+# the logic in aclocal, which can simply ignore this definition.
+m4_define([_AM_AUTOCONF_VERSION], [])
+
+# AM_SET_CURRENT_AUTOMAKE_VERSION
+# -------------------------------
+# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
+# This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
+AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
+[AM_AUTOMAKE_VERSION([1.11.6])dnl
+m4_ifndef([AC_AUTOCONF_VERSION],
+ [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
+_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
+
+# AM_AUX_DIR_EXPAND -*- Autoconf -*-
+
+# Copyright (C) 2001, 2003, 2005, 2011 Free Software Foundation, Inc.
+#
+# This file 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.
+
+# serial 1
+
+# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
+# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to
+# `$srcdir', `$srcdir/..', or `$srcdir/../..'.
+#
+# Of course, Automake must honor this variable whenever it calls a
+# tool from the auxiliary directory. The problem is that $srcdir (and
+# therefore $ac_aux_dir as well) can be either absolute or relative,
+# depending on how configure is run. This is pretty annoying, since
+# it makes $ac_aux_dir quite unusable in subdirectories: in the top
+# source directory, any form will work fine, but in subdirectories a
+# relative path needs to be adjusted first.
+#
+# $ac_aux_dir/missing
+# fails when called from a subdirectory if $ac_aux_dir is relative
+# $top_srcdir/$ac_aux_dir/missing
+# fails if $ac_aux_dir is absolute,
+# fails when called from a subdirectory in a VPATH build with
+# a relative $ac_aux_dir
+#
+# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
+# are both prefixed by $srcdir. In an in-source build this is usually
+# harmless because $srcdir is `.', but things will broke when you
+# start a VPATH build or use an absolute $srcdir.
+#
+# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
+# iff we strip the leading $srcdir from $ac_aux_dir. That would be:
+# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
+# and then we would define $MISSING as
+# MISSING="\${SHELL} $am_aux_dir/missing"
+# This will work as long as MISSING is not called from configure, because
+# unfortunately $(top_srcdir) has no meaning in configure.
+# However there are other variables, like CC, which are often used in
+# configure, and could therefore not use this "fixed" $ac_aux_dir.
+#
+# Another solution, used here, is to always expand $ac_aux_dir to an
+# absolute PATH. The drawback is that using absolute paths prevent a
+# configured tree to be moved without reconfiguration.
+
+AC_DEFUN([AM_AUX_DIR_EXPAND],
+[dnl Rely on autoconf to set up CDPATH properly.
+AC_PREREQ([2.50])dnl
+# expand $ac_aux_dir to an absolute path
+am_aux_dir=`cd $ac_aux_dir && pwd`
+])
+
+# AM_CONDITIONAL -*- Autoconf -*-
+
+# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008
+# Free Software Foundation, Inc.
+#
+# This file 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.
+
+# serial 9
+
+# AM_CONDITIONAL(NAME, SHELL-CONDITION)
+# -------------------------------------
+# Define a conditional.
+AC_DEFUN([AM_CONDITIONAL],
+[AC_PREREQ(2.52)dnl
+ ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])],
+ [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
+AC_SUBST([$1_TRUE])dnl
+AC_SUBST([$1_FALSE])dnl
+_AM_SUBST_NOTMAKE([$1_TRUE])dnl
+_AM_SUBST_NOTMAKE([$1_FALSE])dnl
+m4_define([_AM_COND_VALUE_$1], [$2])dnl
+if $2; then
+ $1_TRUE=
+ $1_FALSE='#'
+else
+ $1_TRUE='#'
+ $1_FALSE=
+fi
+AC_CONFIG_COMMANDS_PRE(
+[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
+ AC_MSG_ERROR([[conditional "$1" was never defined.
+Usually this means the macro was only invoked conditionally.]])
+fi])])
+
+# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009,
+# 2010, 2011 Free Software Foundation, Inc.
+#
+# This file 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.
+
+# serial 12
+
+# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
+# written in clear, in which case automake, when reading aclocal.m4,
+# will think it sees a *use*, and therefore will trigger all it's
+# C support machinery. Also note that it means that autoscan, seeing
+# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
+
+
+# _AM_DEPENDENCIES(NAME)
+# ----------------------
+# See how the compiler implements dependency checking.
+# NAME is "CC", "CXX", "GCJ", or "OBJC".
+# We try a few techniques and use that to set a single cache variable.
+#
+# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
+# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
+# dependency, and given that the user is not expected to run this macro,
+# just rely on AC_PROG_CC.
+AC_DEFUN([_AM_DEPENDENCIES],
+[AC_REQUIRE([AM_SET_DEPDIR])dnl
+AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
+AC_REQUIRE([AM_MAKE_INCLUDE])dnl
+AC_REQUIRE([AM_DEP_TRACK])dnl
+
+ifelse([$1], CC, [depcc="$CC" am_compiler_list=],
+ [$1], CXX, [depcc="$CXX" am_compiler_list=],
+ [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
+ [$1], UPC, [depcc="$UPC" am_compiler_list=],
+ [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'],
+ [depcc="$$1" am_compiler_list=])
+
+AC_CACHE_CHECK([dependency style of $depcc],
+ [am_cv_$1_dependencies_compiler_type],
+[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
+ # We make a subdir and do the tests there. Otherwise we can end up
+ # making bogus files that we don't know about and never remove. For
+ # instance it was reported that on HP-UX the gcc test will end up
+ # making a dummy file named `D' -- because `-MD' means `put the output
+ # in D'.
+ rm -rf conftest.dir
+ mkdir conftest.dir
+ # Copy depcomp to subdir because otherwise we won't find it if we're
+ # using a relative directory.
+ cp "$am_depcomp" conftest.dir
+ cd conftest.dir
+ # We will build objects and dependencies in a subdirectory because
+ # it helps to detect inapplicable dependency modes. For instance
+ # both Tru64's cc and ICC support -MD to output dependencies as a
+ # side effect of compilation, but ICC will put the dependencies in
+ # the current directory while Tru64 will put them in the object
+ # directory.
+ mkdir sub
+
+ am_cv_$1_dependencies_compiler_type=none
+ if test "$am_compiler_list" = ""; then
+ am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
+ fi
+ am__universal=false
+ m4_case([$1], [CC],
+ [case " $depcc " in #(
+ *\ -arch\ *\ -arch\ *) am__universal=true ;;
+ esac],
+ [CXX],
+ [case " $depcc " in #(
+ *\ -arch\ *\ -arch\ *) am__universal=true ;;
+ esac])
+
+ for depmode in $am_compiler_list; do
+ # Setup a source with many dependencies, because some compilers
+ # like to wrap large dependency lists on column 80 (with \), and
+ # we should not choose a depcomp mode which is confused by this.
+ #
+ # We need to recreate these files for each test, as the compiler may
+ # overwrite some of them when testing with obscure command lines.
+ # This happens at least with the AIX C compiler.
+ : > sub/conftest.c
+ for i in 1 2 3 4 5 6; do
+ echo '#include "conftst'$i'.h"' >> sub/conftest.c
+ # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
+ # Solaris 8's {/usr,}/bin/sh.
+ touch sub/conftst$i.h
+ done
+ echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
+
+ # We check with `-c' and `-o' for the sake of the "dashmstdout"
+ # mode. It turns out that the SunPro C++ compiler does not properly
+ # handle `-M -o', and we need to detect this. Also, some Intel
+ # versions had trouble with output in subdirs
+ am__obj=sub/conftest.${OBJEXT-o}
+ am__minus_obj="-o $am__obj"
+ case $depmode in
+ gcc)
+ # This depmode causes a compiler race in universal mode.
+ test "$am__universal" = false || continue
+ ;;
+ nosideeffect)
+ # after this tag, mechanisms are not by side-effect, so they'll
+ # only be used when explicitly requested
+ if test "x$enable_dependency_tracking" = xyes; then
+ continue
+ else
+ break
+ fi
+ ;;
+ msvc7 | msvc7msys | msvisualcpp | msvcmsys)
+ # This compiler won't grok `-c -o', but also, the minuso test has
+ # not run yet. These depmodes are late enough in the game, and
+ # so weak that their functioning should not be impacted.
+ am__obj=conftest.${OBJEXT-o}
+ am__minus_obj=
+ ;;
+ none) break ;;
+ esac
+ if depmode=$depmode \
+ source=sub/conftest.c object=$am__obj \
+ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
+ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
+ >/dev/null 2>conftest.err &&
+ grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
+ grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
+ grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
+ ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
+ # icc doesn't choke on unknown options, it will just issue warnings
+ # or remarks (even with -Werror). So we grep stderr for any message
+ # that says an option was ignored or not supported.
+ # When given -MP, icc 7.0 and 7.1 complain thusly:
+ # icc: Command line warning: ignoring option '-M'; no argument required
+ # The diagnosis changed in icc 8.0:
+ # icc: Command line remark: option '-MP' not supported
+ if (grep 'ignoring option' conftest.err ||
+ grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
+ am_cv_$1_dependencies_compiler_type=$depmode
+ break
+ fi
+ fi
+ done
+
+ cd ..
+ rm -rf conftest.dir
+else
+ am_cv_$1_dependencies_compiler_type=none
+fi
+])
+AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
+AM_CONDITIONAL([am__fastdep$1], [
+ test "x$enable_dependency_tracking" != xno \
+ && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
+])
+
+
+# AM_SET_DEPDIR
+# -------------
+# Choose a directory name for dependency files.
+# This macro is AC_REQUIREd in _AM_DEPENDENCIES
+AC_DEFUN([AM_SET_DEPDIR],
+[AC_REQUIRE([AM_SET_LEADING_DOT])dnl
+AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
+])
+
+
+# AM_DEP_TRACK
+# ------------
+AC_DEFUN([AM_DEP_TRACK],
+[AC_ARG_ENABLE(dependency-tracking,
+[ --disable-dependency-tracking speeds up one-time build
+ --enable-dependency-tracking do not reject slow dependency extractors])
+if test "x$enable_dependency_tracking" != xno; then
+ am_depcomp="$ac_aux_dir/depcomp"
+ AMDEPBACKSLASH='\'
+ am__nodep='_no'
+fi
+AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
+AC_SUBST([AMDEPBACKSLASH])dnl
+_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
+AC_SUBST([am__nodep])dnl
+_AM_SUBST_NOTMAKE([am__nodep])dnl
+])
+
+# Generate code to set up dependency tracking. -*- Autoconf -*-
+
+# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008
+# Free Software Foundation, Inc.
+#
+# This file 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.
+
+#serial 5
+
+# _AM_OUTPUT_DEPENDENCY_COMMANDS
+# ------------------------------
+AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
+[{
+ # Autoconf 2.62 quotes --file arguments for eval, but not when files
+ # are listed without --file. Let's play safe and only enable the eval
+ # if we detect the quoting.
+ case $CONFIG_FILES in
+ *\'*) eval set x "$CONFIG_FILES" ;;
+ *) set x $CONFIG_FILES ;;
+ esac
+ shift
+ for mf
+ do
+ # Strip MF so we end up with the name of the file.
+ mf=`echo "$mf" | sed -e 's/:.*$//'`
+ # Check whether this is an Automake generated Makefile or not.
+ # We used to match only the files named `Makefile.in', but
+ # some people rename them; so instead we look at the file content.
+ # Grep'ing the first line is not enough: some people post-process
+ # each Makefile.in and add a new line on top of each file to say so.
+ # Grep'ing the whole file is not good either: AIX grep has a line
+ # limit of 2048, but all sed's we know have understand at least 4000.
+ if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
+ dirpart=`AS_DIRNAME("$mf")`
+ else
+ continue
+ fi
+ # Extract the definition of DEPDIR, am__include, and am__quote
+ # from the Makefile without running `make'.
+ DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
+ test -z "$DEPDIR" && continue
+ am__include=`sed -n 's/^am__include = //p' < "$mf"`
+ test -z "am__include" && continue
+ am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
+ # When using ansi2knr, U may be empty or an underscore; expand it
+ U=`sed -n 's/^U = //p' < "$mf"`
+ # Find all dependency output files, they are included files with
+ # $(DEPDIR) in their names. We invoke sed twice because it is the
+ # simplest approach to changing $(DEPDIR) to its actual value in the
+ # expansion.
+ for file in `sed -n "
+ s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
+ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
+ # Make sure the directory exists.
+ test -f "$dirpart/$file" && continue
+ fdir=`AS_DIRNAME(["$file"])`
+ AS_MKDIR_P([$dirpart/$fdir])
+ # echo "creating $dirpart/$file"
+ echo '# dummy' > "$dirpart/$file"
+ done
+ done
+}
+])# _AM_OUTPUT_DEPENDENCY_COMMANDS
+
+
+# AM_OUTPUT_DEPENDENCY_COMMANDS
+# -----------------------------
+# This macro should only be invoked once -- use via AC_REQUIRE.
+#
+# This code is only required when automatic dependency tracking
+# is enabled. FIXME. This creates each `.P' file that we will
+# need in order to bootstrap the dependency handling code.
+AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
+[AC_CONFIG_COMMANDS([depfiles],
+ [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
+ [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
+])
+
+# Do all the work for Automake. -*- Autoconf -*-
+
+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
+# 2005, 2006, 2008, 2009 Free Software Foundation, Inc.
+#
+# This file 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.
+
+# serial 16
+
+# This macro actually does too much. Some checks are only needed if
+# your package does certain things. But this isn't really a big deal.
+
+# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
+# AM_INIT_AUTOMAKE([OPTIONS])
+# -----------------------------------------------
+# The call with PACKAGE and VERSION arguments is the old style
+# call (pre autoconf-2.50), which is being phased out. PACKAGE
+# and VERSION should now be passed to AC_INIT and removed from
+# the call to AM_INIT_AUTOMAKE.
+# We support both call styles for the transition. After
+# the next Automake release, Autoconf can make the AC_INIT
+# arguments mandatory, and then we can depend on a new Autoconf
+# release and drop the old call support.
+AC_DEFUN([AM_INIT_AUTOMAKE],
+[AC_PREREQ([2.62])dnl
+dnl Autoconf wants to disallow AM_ names. We explicitly allow
+dnl the ones we care about.
+m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
+AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
+AC_REQUIRE([AC_PROG_INSTALL])dnl
+if test "`cd $srcdir && pwd`" != "`pwd`"; then
+ # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
+ # is not polluted with repeated "-I."
+ AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
+ # test to see if srcdir already configured
+ if test -f $srcdir/config.status; then
+ AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
+ fi
+fi
+
+# test whether we have cygpath
+if test -z "$CYGPATH_W"; then
+ if (cygpath --version) >/dev/null 2>/dev/null; then
+ CYGPATH_W='cygpath -w'
+ else
+ CYGPATH_W=echo
+ fi
+fi
+AC_SUBST([CYGPATH_W])
+
+# Define the identity of the package.
+dnl Distinguish between old-style and new-style calls.
+m4_ifval([$2],
+[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
+ AC_SUBST([PACKAGE], [$1])dnl
+ AC_SUBST([VERSION], [$2])],
+[_AM_SET_OPTIONS([$1])dnl
+dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
+m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,,
+ [m4_fatal([AC_INIT should be called with package and version arguments])])dnl
+ AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
+ AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
+
+_AM_IF_OPTION([no-define],,
+[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
+ AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
+
+# Some tools Automake needs.
+AC_REQUIRE([AM_SANITY_CHECK])dnl
+AC_REQUIRE([AC_ARG_PROGRAM])dnl
+AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
+AM_MISSING_PROG(AUTOCONF, autoconf)
+AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
+AM_MISSING_PROG(AUTOHEADER, autoheader)
+AM_MISSING_PROG(MAKEINFO, makeinfo)
+AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
+AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl
+AC_REQUIRE([AM_PROG_MKDIR_P])dnl
+# We need awk for the "check" target. The system "awk" is bad on
+# some platforms.
+AC_REQUIRE([AC_PROG_AWK])dnl
+AC_REQUIRE([AC_PROG_MAKE_SET])dnl
+AC_REQUIRE([AM_SET_LEADING_DOT])dnl
+_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
+ [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
+ [_AM_PROG_TAR([v7])])])
+_AM_IF_OPTION([no-dependencies],,
+[AC_PROVIDE_IFELSE([AC_PROG_CC],
+ [_AM_DEPENDENCIES(CC)],
+ [define([AC_PROG_CC],
+ defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
+AC_PROVIDE_IFELSE([AC_PROG_CXX],
+ [_AM_DEPENDENCIES(CXX)],
+ [define([AC_PROG_CXX],
+ defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
+AC_PROVIDE_IFELSE([AC_PROG_OBJC],
+ [_AM_DEPENDENCIES(OBJC)],
+ [define([AC_PROG_OBJC],
+ defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl
+])
+_AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl
+dnl The `parallel-tests' driver may need to know about EXEEXT, so add the
+dnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This macro
+dnl is hooked onto _AC_COMPILER_EXEEXT early, see below.
+AC_CONFIG_COMMANDS_PRE(dnl
+[m4_provide_if([_AM_COMPILER_EXEEXT],
+ [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
+])
+
+dnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion. Do not
+dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further
+dnl mangled by Autoconf and run in a shell conditional statement.
+m4_define([_AC_COMPILER_EXEEXT],
+m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])])
+
+
+# When config.status generates a header, we must update the stamp-h file.
+# This file resides in the same directory as the config header
+# that is generated. The stamp files are numbered to have different names.
+
+# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
+# loop where config.status creates the headers, so we can generate
+# our stamp files there.
+AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
+[# Compute $1's index in $config_headers.
+_am_arg=$1
+_am_stamp_count=1
+for _am_header in $config_headers :; do
+ case $_am_header in
+ $_am_arg | $_am_arg:* )
+ break ;;
+ * )
+ _am_stamp_count=`expr $_am_stamp_count + 1` ;;
+ esac
+done
+echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
+
+# Copyright (C) 2001, 2003, 2005, 2008, 2011 Free Software Foundation,
+# Inc.
+#
+# This file 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.
+
+# serial 1
+
+# AM_PROG_INSTALL_SH
+# ------------------
+# Define $install_sh.
+AC_DEFUN([AM_PROG_INSTALL_SH],
+[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
+if test x"${install_sh}" != xset; then
+ case $am_aux_dir in
+ *\ * | *\ *)
+ install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
+ *)
+ install_sh="\${SHELL} $am_aux_dir/install-sh"
+ esac
+fi
+AC_SUBST(install_sh)])
+
+# Copyright (C) 2003, 2005 Free Software Foundation, Inc.
+#
+# This file 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.
+
+# serial 2
+
+# Check whether the underlying file-system supports filenames
+# with a leading dot. For instance MS-DOS doesn't.
+AC_DEFUN([AM_SET_LEADING_DOT],
+[rm -rf .tst 2>/dev/null
+mkdir .tst 2>/dev/null
+if test -d .tst; then
+ am__leading_dot=.
+else
+ am__leading_dot=_
+fi
+rmdir .tst 2>/dev/null
+AC_SUBST([am__leading_dot])])
+
+# Add --enable-maintainer-mode option to configure. -*- Autoconf -*-
+# From Jim Meyering
+
+# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005, 2008,
+# 2011 Free Software Foundation, Inc.
+#
+# This file 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.
+
+# serial 5
+
+# AM_MAINTAINER_MODE([DEFAULT-MODE])
+# ----------------------------------
+# Control maintainer-specific portions of Makefiles.
+# Default is to disable them, unless `enable' is passed literally.
+# For symmetry, `disable' may be passed as well. Anyway, the user
+# can override the default with the --enable/--disable switch.
+AC_DEFUN([AM_MAINTAINER_MODE],
+[m4_case(m4_default([$1], [disable]),
+ [enable], [m4_define([am_maintainer_other], [disable])],
+ [disable], [m4_define([am_maintainer_other], [enable])],
+ [m4_define([am_maintainer_other], [enable])
+ m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])])
+AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
+ dnl maintainer-mode's default is 'disable' unless 'enable' is passed
+ AC_ARG_ENABLE([maintainer-mode],
+[ --][am_maintainer_other][-maintainer-mode am_maintainer_other make rules and dependencies not useful
+ (and sometimes confusing) to the casual installer],
+ [USE_MAINTAINER_MODE=$enableval],
+ [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes]))
+ AC_MSG_RESULT([$USE_MAINTAINER_MODE])
+ AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes])
+ MAINT=$MAINTAINER_MODE_TRUE
+ AC_SUBST([MAINT])dnl
+]
+)
+
+AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE])
+
+# Check to see how 'make' treats includes. -*- Autoconf -*-
+
+# Copyright (C) 2001, 2002, 2003, 2005, 2009 Free Software Foundation, Inc.
+#
+# This file 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.
+
+# serial 4
+
+# AM_MAKE_INCLUDE()
+# -----------------
+# Check to see how make treats includes.
+AC_DEFUN([AM_MAKE_INCLUDE],
+[am_make=${MAKE-make}
+cat > confinc << 'END'
+am__doit:
+ @echo this is the am__doit target
+.PHONY: am__doit
+END
+# If we don't find an include directive, just comment out the code.
+AC_MSG_CHECKING([for style of include used by $am_make])
+am__include="#"
+am__quote=
+_am_result=none
+# First try GNU make style include.
+echo "include confinc" > confmf
+# Ignore all kinds of additional output from `make'.
+case `$am_make -s -f confmf 2> /dev/null` in #(
+*the\ am__doit\ target*)
+ am__include=include
+ am__quote=
+ _am_result=GNU
+ ;;
+esac
+# Now try BSD make style include.
+if test "$am__include" = "#"; then
+ echo '.include "confinc"' > confmf
+ case `$am_make -s -f confmf 2> /dev/null` in #(
+ *the\ am__doit\ target*)
+ am__include=.include
+ am__quote="\""
+ _am_result=BSD
+ ;;
+ esac
+fi
+AC_SUBST([am__include])
+AC_SUBST([am__quote])
+AC_MSG_RESULT([$_am_result])
+rm -f confinc confmf
+])
+
+# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*-
+
+# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008
+# Free Software Foundation, Inc.
+#
+# This file 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.
+
+# serial 6
+
+# AM_MISSING_PROG(NAME, PROGRAM)
+# ------------------------------
+AC_DEFUN([AM_MISSING_PROG],
+[AC_REQUIRE([AM_MISSING_HAS_RUN])
+$1=${$1-"${am_missing_run}$2"}
+AC_SUBST($1)])
+
+
+# AM_MISSING_HAS_RUN
+# ------------------
+# Define MISSING if not defined so far and test if it supports --run.
+# If it does, set am_missing_run to use it, otherwise, to nothing.
+AC_DEFUN([AM_MISSING_HAS_RUN],
+[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
+AC_REQUIRE_AUX_FILE([missing])dnl
+if test x"${MISSING+set}" != xset; then
+ case $am_aux_dir in
+ *\ * | *\ *)
+ MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
+ *)
+ MISSING="\${SHELL} $am_aux_dir/missing" ;;
+ esac
+fi
+# Use eval to expand $SHELL
+if eval "$MISSING --run true"; then
+ am_missing_run="$MISSING --run "
+else
+ am_missing_run=
+ AC_MSG_WARN([`missing' script is too old or missing])
+fi
+])
+
+# Copyright (C) 2003, 2004, 2005, 2006, 2011 Free Software Foundation,
+# Inc.
+#
+# This file 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.
+
+# serial 1
+
+# AM_PROG_MKDIR_P
+# ---------------
+# Check for `mkdir -p'.
+AC_DEFUN([AM_PROG_MKDIR_P],
+[AC_PREREQ([2.60])dnl
+AC_REQUIRE([AC_PROG_MKDIR_P])dnl
+dnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P,
+dnl while keeping a definition of mkdir_p for backward compatibility.
+dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile.
+dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of
+dnl Makefile.ins that do not define MKDIR_P, so we do our own
+dnl adjustment using top_builddir (which is defined more often than
+dnl MKDIR_P).
+AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl
+case $mkdir_p in
+ [[\\/$]]* | ?:[[\\/]]*) ;;
+ */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
+esac
+])
+
+# Helper functions for option handling. -*- Autoconf -*-
+
+# Copyright (C) 2001, 2002, 2003, 2005, 2008, 2010 Free Software
+# Foundation, Inc.
+#
+# This file 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.
+
+# serial 5
+
+# _AM_MANGLE_OPTION(NAME)
+# -----------------------
+AC_DEFUN([_AM_MANGLE_OPTION],
+[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
+
+# _AM_SET_OPTION(NAME)
+# --------------------
+# Set option NAME. Presently that only means defining a flag for this option.
+AC_DEFUN([_AM_SET_OPTION],
+[m4_define(_AM_MANGLE_OPTION([$1]), 1)])
+
+# _AM_SET_OPTIONS(OPTIONS)
+# ------------------------
+# OPTIONS is a space-separated list of Automake options.
+AC_DEFUN([_AM_SET_OPTIONS],
+[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
+
+# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
+# -------------------------------------------
+# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
+AC_DEFUN([_AM_IF_OPTION],
+[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
+
+# Check to make sure that the build environment is sane. -*- Autoconf -*-
+
+# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008
+# Free Software Foundation, Inc.
+#
+# This file 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.
+
+# serial 5
+
+# AM_SANITY_CHECK
+# ---------------
+AC_DEFUN([AM_SANITY_CHECK],
+[AC_MSG_CHECKING([whether build environment is sane])
+# Just in case
+sleep 1
+echo timestamp > conftest.file
+# Reject unsafe characters in $srcdir or the absolute working directory
+# name. Accept space and tab only in the latter.
+am_lf='
+'
+case `pwd` in
+ *[[\\\"\#\$\&\'\`$am_lf]]*)
+ AC_MSG_ERROR([unsafe absolute working directory name]);;
+esac
+case $srcdir in
+ *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*)
+ AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);;
+esac
+
+# Do `set' in a subshell so we don't clobber the current shell's
+# arguments. Must try -L first in case configure is actually a
+# symlink; some systems play weird games with the mod time of symlinks
+# (eg FreeBSD returns the mod time of the symlink's containing
+# directory).
+if (
+ set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
+ if test "$[*]" = "X"; then
+ # -L didn't work.
+ set X `ls -t "$srcdir/configure" conftest.file`
+ fi
+ rm -f conftest.file
+ if test "$[*]" != "X $srcdir/configure conftest.file" \
+ && test "$[*]" != "X conftest.file $srcdir/configure"; then
+
+ # If neither matched, then we have a broken ls. This can happen
+ # if, for instance, CONFIG_SHELL is bash and it inherits a
+ # broken ls alias from the environment. This has actually
+ # happened. Such a system could not be considered "sane".
+ AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
+alias in your environment])
+ fi
+
+ test "$[2]" = conftest.file
+ )
+then
+ # Ok.
+ :
+else
+ AC_MSG_ERROR([newly created file is older than distributed files!
+Check your system clock])
+fi
+AC_MSG_RESULT(yes)])
+
+# Copyright (C) 2001, 2003, 2005, 2011 Free Software Foundation, Inc.
+#
+# This file 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.
+
+# serial 1
+
+# AM_PROG_INSTALL_STRIP
+# ---------------------
+# One issue with vendor `install' (even GNU) is that you can't
+# specify the program used to strip binaries. This is especially
+# annoying in cross-compiling environments, where the build's strip
+# is unlikely to handle the host's binaries.
+# Fortunately install-sh will honor a STRIPPROG variable, so we
+# always use install-sh in `make install-strip', and initialize
+# STRIPPROG with the value of the STRIP variable (set by the user).
+AC_DEFUN([AM_PROG_INSTALL_STRIP],
+[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
+# Installed binaries are usually stripped using `strip' when the user
+# run `make install-strip'. However `strip' might not be the right
+# tool to use in cross-compilation environments, therefore Automake
+# will honor the `STRIP' environment variable to overrule this program.
+dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
+if test "$cross_compiling" != no; then
+ AC_CHECK_TOOL([STRIP], [strip], :)
+fi
+INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
+AC_SUBST([INSTALL_STRIP_PROGRAM])])
+
+# Copyright (C) 2006, 2008, 2010 Free Software Foundation, Inc.
+#
+# This file 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.
+
+# serial 3
+
+# _AM_SUBST_NOTMAKE(VARIABLE)
+# ---------------------------
+# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
+# This macro is traced by Automake.
+AC_DEFUN([_AM_SUBST_NOTMAKE])
+
+# AM_SUBST_NOTMAKE(VARIABLE)
+# --------------------------
+# Public sister of _AM_SUBST_NOTMAKE.
+AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
+
+# Check how to create a tarball. -*- Autoconf -*-
+
+# Copyright (C) 2004, 2005, 2012 Free Software Foundation, Inc.
+#
+# This file 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.
+
+# serial 2
+
+# _AM_PROG_TAR(FORMAT)
+# --------------------
+# Check how to create a tarball in format FORMAT.
+# FORMAT should be one of `v7', `ustar', or `pax'.
+#
+# Substitute a variable $(am__tar) that is a command
+# writing to stdout a FORMAT-tarball containing the directory
+# $tardir.
+# tardir=directory && $(am__tar) > result.tar
+#
+# Substitute a variable $(am__untar) that extract such
+# a tarball read from stdin.
+# $(am__untar) < result.tar
+AC_DEFUN([_AM_PROG_TAR],
+[# Always define AMTAR for backward compatibility. Yes, it's still used
+# in the wild :-( We should find a proper way to deprecate it ...
+AC_SUBST([AMTAR], ['$${TAR-tar}'])
+m4_if([$1], [v7],
+ [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'],
+ [m4_case([$1], [ustar],, [pax],,
+ [m4_fatal([Unknown tar format])])
+AC_MSG_CHECKING([how to create a $1 tar archive])
+# Loop over all known methods to create a tar archive until one works.
+_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
+_am_tools=${am_cv_prog_tar_$1-$_am_tools}
+# Do not fold the above two line into one, because Tru64 sh and
+# Solaris sh will not grok spaces in the rhs of `-'.
+for _am_tool in $_am_tools
+do
+ case $_am_tool in
+ gnutar)
+ for _am_tar in tar gnutar gtar;
+ do
+ AM_RUN_LOG([$_am_tar --version]) && break
+ done
+ am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
+ am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
+ am__untar="$_am_tar -xf -"
+ ;;
+ plaintar)
+ # Must skip GNU tar: if it does not support --format= it doesn't create
+ # ustar tarball either.
+ (tar --version) >/dev/null 2>&1 && continue
+ am__tar='tar chf - "$$tardir"'
+ am__tar_='tar chf - "$tardir"'
+ am__untar='tar xf -'
+ ;;
+ pax)
+ am__tar='pax -L -x $1 -w "$$tardir"'
+ am__tar_='pax -L -x $1 -w "$tardir"'
+ am__untar='pax -r'
+ ;;
+ cpio)
+ am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
+ am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
+ am__untar='cpio -i -H $1 -d'
+ ;;
+ none)
+ am__tar=false
+ am__tar_=false
+ am__untar=false
+ ;;
+ esac
+
+ # If the value was cached, stop now. We just wanted to have am__tar
+ # and am__untar set.
+ test -n "${am_cv_prog_tar_$1}" && break
+
+ # tar/untar a dummy directory, and stop if the command works
+ rm -rf conftest.dir
+ mkdir conftest.dir
+ echo GrepMe > conftest.dir/file
+ AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
+ rm -rf conftest.dir
+ if test -s conftest.tar; then
+ AM_RUN_LOG([$am__untar <conftest.tar])
+ grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
+ fi
+done
+rm -rf conftest.dir
+
+AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
+AC_MSG_RESULT([$am_cv_prog_tar_$1])])
+AC_SUBST([am__tar])
+AC_SUBST([am__untar])
+]) # _AM_PROG_TAR
+
+m4_include([../../../../acinclude.m4])
diff --git a/newlib/libc/sys/phoenix/machine/arm/Makefile.am b/newlib/libc/sys/phoenix/machine/arm/Makefile.am
new file mode 100644
index 000000000..a7cb107a4
--- /dev/null
+++ b/newlib/libc/sys/phoenix/machine/arm/Makefile.am
@@ -0,0 +1,21 @@
+## Process this file with automake to generate Makefile.in
+
+AUTOMAKE_OPTIONS = cygnus
+
+INCLUDES = $(NEWLIB_CFLAGS) $(CROSS_CFLAGS) $(TARGET_CFLAGS)
+
+LIB_SOURCES = syscall.S
+
+AM_CFLAGS = -I$(srcdir)/../..
+AM_CCASFLAGS = -I$(srcdir)/../.. $(INCLUDES)
+
+noinst_LIBRARIES = lib.a
+lib_a_SOURCES = $(LIB_SOURCES)
+lib_a_CFLAGS = $(AM_CFLAGS)
+lib_a_CCASFLAGS = $(AM_CCASFLAGS)
+noinst_DATA =
+
+all-local: crt0.o
+
+ACLOCAL_AMFLAGS = -I ../../../../.. -I ../../../../../..
+CONFIG_STATUS_DEPENDENCIES = $(newlib_basedir)/configure.host
diff --git a/newlib/libc/sys/phoenix/machine/arm/Makefile.in b/newlib/libc/sys/phoenix/machine/arm/Makefile.in
new file mode 100644
index 000000000..38755c193
--- /dev/null
+++ b/newlib/libc/sys/phoenix/machine/arm/Makefile.in
@@ -0,0 +1,448 @@
+# Makefile.in generated by automake 1.11.6 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 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@
+
+
+VPATH = @srcdir@
+am__make_dryrun = \
+ { \
+ am__dry=no; \
+ case $$MAKEFLAGS in \
+ *\\[\ \ ]*) \
+ echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \
+ | grep '^AM OK$$' >/dev/null || am__dry=yes;; \
+ *) \
+ for am__flg in $$MAKEFLAGS; do \
+ case $$am__flg in \
+ *=*|--*) ;; \
+ *n*) am__dry=yes; break;; \
+ esac; \
+ done;; \
+ esac; \
+ test $$am__dry = yes; \
+ }
+pkgdatadir = $(datadir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+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@
+subdir = .
+DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
+ $(top_srcdir)/configure $(am__configure_deps) \
+ $(srcdir)/../../../../../../mkinstalldirs
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/../../../../../acinclude.m4 \
+ $(top_srcdir)/configure.in
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+ $(ACLOCAL_M4)
+am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
+ configure.lineno config.status.lineno
+mkinstalldirs = $(SHELL) $(top_srcdir)/../../../../../../mkinstalldirs
+CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+LIBRARIES = $(noinst_LIBRARIES)
+ARFLAGS = cru
+lib_a_AR = $(AR) $(ARFLAGS)
+lib_a_LIBADD =
+am__objects_1 = lib_a-syscall.$(OBJEXT)
+am_lib_a_OBJECTS = $(am__objects_1)
+lib_a_OBJECTS = $(am_lib_a_OBJECTS)
+DEFAULT_INCLUDES = -I.@am__isrc@
+depcomp =
+am__depfiles_maybe =
+CPPASCOMPILE = $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CCASFLAGS) $(CCASFLAGS)
+COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+CCLD = $(CC)
+LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
+SOURCES = $(lib_a_SOURCES)
+am__can_run_installinfo = \
+ case $$AM_UPDATE_INFO_DIR in \
+ n|no|NO) false;; \
+ *) (install-info --version) >/dev/null 2>&1;; \
+ esac
+DATA = $(noinst_DATA)
+ETAGS = etags
+CTAGS = ctags
+ACLOCAL = @ACLOCAL@
+AMTAR = @AMTAR@
+AR = @AR@
+AS = @AS@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CC = @CC@
+CCAS = @CCAS@
+CCASFLAGS = @CCASFLAGS@
+CCDEPMODE = @CCDEPMODE@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LDFLAGS = @LDFLAGS@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LTLIBOBJS = @LTLIBOBJS@
+MAINT = @MAINT@
+MAKEINFO = @MAKEINFO@
+MKDIR_P = @MKDIR_P@
+NEWLIB_CFLAGS = @NEWLIB_CFLAGS@
+NO_INCLUDE_LIST = @NO_INCLUDE_LIST@
+OBJEXT = @OBJEXT@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+RANLIB = @RANLIB@
+READELF = @READELF@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+VERSION = @VERSION@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+aext = @aext@
+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@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+libm_machine_dir = @libm_machine_dir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+lpfx = @lpfx@
+machine_dir = @machine_dir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+newlib_basedir = @newlib_basedir@
+oext = @oext@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sys_dir = @sys_dir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+AUTOMAKE_OPTIONS = cygnus
+INCLUDES = $(NEWLIB_CFLAGS) $(CROSS_CFLAGS) $(TARGET_CFLAGS)
+LIB_SOURCES = syscall.S
+AM_CFLAGS = -I$(srcdir)/../..
+AM_CCASFLAGS = -I$(srcdir)/../.. $(INCLUDES)
+noinst_LIBRARIES = lib.a
+lib_a_SOURCES = $(LIB_SOURCES)
+lib_a_CFLAGS = $(AM_CFLAGS)
+lib_a_CCASFLAGS = $(AM_CCASFLAGS)
+noinst_DATA =
+ACLOCAL_AMFLAGS = -I ../../../../.. -I ../../../../../..
+CONFIG_STATUS_DEPENDENCIES = $(newlib_basedir)/configure.host
+all: all-am
+
+.SUFFIXES:
+.SUFFIXES: .S .o .obj
+am--refresh: Makefile
+ @:
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
+ @for dep in $?; do \
+ case '$(am__configure_deps)' in \
+ *$$dep*) \
+ echo ' cd $(srcdir) && $(AUTOMAKE) --cygnus'; \
+ $(am__cd) $(srcdir) && $(AUTOMAKE) --cygnus \
+ && exit 0; \
+ exit 1;; \
+ esac; \
+ done; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --cygnus Makefile'; \
+ $(am__cd) $(top_srcdir) && \
+ $(AUTOMAKE) --cygnus Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ @case '$?' in \
+ *config.status*) \
+ echo ' $(SHELL) ./config.status'; \
+ $(SHELL) ./config.status;; \
+ *) \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \
+ esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+ $(SHELL) ./config.status --recheck
+
+$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
+ $(am__cd) $(srcdir) && $(AUTOCONF)
+$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
+ $(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
+$(am__aclocal_m4_deps):
+
+clean-noinstLIBRARIES:
+ -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES)
+lib.a: $(lib_a_OBJECTS) $(lib_a_DEPENDENCIES) $(EXTRA_lib_a_DEPENDENCIES)
+ -rm -f lib.a
+ $(lib_a_AR) lib.a $(lib_a_OBJECTS) $(lib_a_LIBADD)
+ $(RANLIB) lib.a
+
+mostlyclean-compile:
+ -rm -f *.$(OBJEXT)
+
+distclean-compile:
+ -rm -f *.tab.c
+
+.S.o:
+ $(CPPASCOMPILE) -c -o $@ $<
+
+.S.obj:
+ $(CPPASCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
+
+lib_a-syscall.o: syscall.S
+ $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CCASFLAGS) $(CCASFLAGS) -c -o lib_a-syscall.o `test -f 'syscall.S' || echo '$(srcdir)/'`syscall.S
+
+lib_a-syscall.obj: syscall.S
+ $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CCASFLAGS) $(CCASFLAGS) -c -o lib_a-syscall.obj `if test -f 'syscall.S'; then $(CYGPATH_W) 'syscall.S'; else $(CYGPATH_W) '$(srcdir)/syscall.S'; fi`
+
+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; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ mkid -fID $$unique
+tags: TAGS
+
+TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ set x; \
+ 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; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ shift; \
+ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
+ test -n "$$unique" || unique=$$empty_fix; \
+ if test $$# -gt 0; then \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ "$$@" $$unique; \
+ else \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ $$unique; \
+ fi; \
+ fi
+ctags: CTAGS
+CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ 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; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ test -z "$(CTAGS_ARGS)$$unique" \
+ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+ $$unique
+
+GTAGS:
+ here=`$(am__cd) $(top_builddir) && pwd` \
+ && $(am__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) $(DATA) all-local
+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:
+ if test -z '$(STRIP)'; then \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ install; \
+ else \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
+ fi
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+ -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+ -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_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-noinstLIBRARIES mostlyclean-am
+
+distclean: distclean-am
+ -rm -f $(am__CONFIG_DISTCLEAN_FILES)
+ -rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+ distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+html-am:
+
+info: info-am
+
+info-am:
+
+install-data-am:
+
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
+install-exec-am:
+
+install-html: install-html-am
+
+install-html-am:
+
+install-info: install-info-am
+
+install-info-am:
+
+install-man:
+
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+ -rm -f $(am__CONFIG_DISTCLEAN_FILES)
+ -rm -rf $(top_srcdir)/autom4te.cache
+ -rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am:
+
+.MAKE: install-am install-strip
+
+.PHONY: CTAGS GTAGS all all-am all-local am--refresh check check-am \
+ clean clean-generic clean-noinstLIBRARIES ctags distclean \
+ distclean-compile distclean-generic distclean-tags dvi dvi-am \
+ html html-am info info-am install install-am install-data \
+ install-data-am install-dvi install-dvi-am install-exec \
+ install-exec-am install-html install-html-am install-info \
+ install-info-am install-man install-pdf install-pdf-am \
+ install-ps install-ps-am install-strip installcheck \
+ installcheck-am installdirs maintainer-clean \
+ maintainer-clean-generic mostlyclean mostlyclean-compile \
+ mostlyclean-generic pdf pdf-am ps ps-am tags uninstall \
+ uninstall-am
+
+
+all-local: crt0.o
+
+# 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/sys/phoenix/machine/arm/aclocal.m4 b/newlib/libc/sys/phoenix/machine/arm/aclocal.m4
new file mode 100644
index 000000000..60acb7c1e
--- /dev/null
+++ b/newlib/libc/sys/phoenix/machine/arm/aclocal.m4
@@ -0,0 +1,1012 @@
+# generated automatically by aclocal 1.11.6 -*- Autoconf -*-
+
+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
+# 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation,
+# Inc.
+# This file 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.
+
+m4_ifndef([AC_AUTOCONF_VERSION],
+ [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
+m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.68],,
+[m4_warning([this file was generated for autoconf 2.68.
+You have another version of autoconf. It may work, but is not guaranteed to.
+If you have problems, you may need to regenerate the build system entirely.
+To do so, use the procedure documented by the package, typically `autoreconf'.])])
+
+# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008, 2011 Free Software
+# Foundation, Inc.
+#
+# This file 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.
+
+# serial 1
+
+# AM_AUTOMAKE_VERSION(VERSION)
+# ----------------------------
+# Automake X.Y traces this macro to ensure aclocal.m4 has been
+# generated from the m4 files accompanying Automake X.Y.
+# (This private macro should not be called outside this file.)
+AC_DEFUN([AM_AUTOMAKE_VERSION],
+[am__api_version='1.11'
+dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
+dnl require some minimum version. Point them to the right macro.
+m4_if([$1], [1.11.6], [],
+ [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
+])
+
+# _AM_AUTOCONF_VERSION(VERSION)
+# -----------------------------
+# aclocal traces this macro to find the Autoconf version.
+# This is a private macro too. Using m4_define simplifies
+# the logic in aclocal, which can simply ignore this definition.
+m4_define([_AM_AUTOCONF_VERSION], [])
+
+# AM_SET_CURRENT_AUTOMAKE_VERSION
+# -------------------------------
+# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
+# This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
+AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
+[AM_AUTOMAKE_VERSION([1.11.6])dnl
+m4_ifndef([AC_AUTOCONF_VERSION],
+ [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
+_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
+
+# AM_AUX_DIR_EXPAND -*- Autoconf -*-
+
+# Copyright (C) 2001, 2003, 2005, 2011 Free Software Foundation, Inc.
+#
+# This file 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.
+
+# serial 1
+
+# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
+# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to
+# `$srcdir', `$srcdir/..', or `$srcdir/../..'.
+#
+# Of course, Automake must honor this variable whenever it calls a
+# tool from the auxiliary directory. The problem is that $srcdir (and
+# therefore $ac_aux_dir as well) can be either absolute or relative,
+# depending on how configure is run. This is pretty annoying, since
+# it makes $ac_aux_dir quite unusable in subdirectories: in the top
+# source directory, any form will work fine, but in subdirectories a
+# relative path needs to be adjusted first.
+#
+# $ac_aux_dir/missing
+# fails when called from a subdirectory if $ac_aux_dir is relative
+# $top_srcdir/$ac_aux_dir/missing
+# fails if $ac_aux_dir is absolute,
+# fails when called from a subdirectory in a VPATH build with
+# a relative $ac_aux_dir
+#
+# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
+# are both prefixed by $srcdir. In an in-source build this is usually
+# harmless because $srcdir is `.', but things will broke when you
+# start a VPATH build or use an absolute $srcdir.
+#
+# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
+# iff we strip the leading $srcdir from $ac_aux_dir. That would be:
+# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
+# and then we would define $MISSING as
+# MISSING="\${SHELL} $am_aux_dir/missing"
+# This will work as long as MISSING is not called from configure, because
+# unfortunately $(top_srcdir) has no meaning in configure.
+# However there are other variables, like CC, which are often used in
+# configure, and could therefore not use this "fixed" $ac_aux_dir.
+#
+# Another solution, used here, is to always expand $ac_aux_dir to an
+# absolute PATH. The drawback is that using absolute paths prevent a
+# configured tree to be moved without reconfiguration.
+
+AC_DEFUN([AM_AUX_DIR_EXPAND],
+[dnl Rely on autoconf to set up CDPATH properly.
+AC_PREREQ([2.50])dnl
+# expand $ac_aux_dir to an absolute path
+am_aux_dir=`cd $ac_aux_dir && pwd`
+])
+
+# AM_CONDITIONAL -*- Autoconf -*-
+
+# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008
+# Free Software Foundation, Inc.
+#
+# This file 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.
+
+# serial 9
+
+# AM_CONDITIONAL(NAME, SHELL-CONDITION)
+# -------------------------------------
+# Define a conditional.
+AC_DEFUN([AM_CONDITIONAL],
+[AC_PREREQ(2.52)dnl
+ ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])],
+ [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
+AC_SUBST([$1_TRUE])dnl
+AC_SUBST([$1_FALSE])dnl
+_AM_SUBST_NOTMAKE([$1_TRUE])dnl
+_AM_SUBST_NOTMAKE([$1_FALSE])dnl
+m4_define([_AM_COND_VALUE_$1], [$2])dnl
+if $2; then
+ $1_TRUE=
+ $1_FALSE='#'
+else
+ $1_TRUE='#'
+ $1_FALSE=
+fi
+AC_CONFIG_COMMANDS_PRE(
+[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
+ AC_MSG_ERROR([[conditional "$1" was never defined.
+Usually this means the macro was only invoked conditionally.]])
+fi])])
+
+# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009,
+# 2010, 2011 Free Software Foundation, Inc.
+#
+# This file 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.
+
+# serial 12
+
+# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
+# written in clear, in which case automake, when reading aclocal.m4,
+# will think it sees a *use*, and therefore will trigger all it's
+# C support machinery. Also note that it means that autoscan, seeing
+# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
+
+
+# _AM_DEPENDENCIES(NAME)
+# ----------------------
+# See how the compiler implements dependency checking.
+# NAME is "CC", "CXX", "GCJ", or "OBJC".
+# We try a few techniques and use that to set a single cache variable.
+#
+# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
+# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
+# dependency, and given that the user is not expected to run this macro,
+# just rely on AC_PROG_CC.
+AC_DEFUN([_AM_DEPENDENCIES],
+[AC_REQUIRE([AM_SET_DEPDIR])dnl
+AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
+AC_REQUIRE([AM_MAKE_INCLUDE])dnl
+AC_REQUIRE([AM_DEP_TRACK])dnl
+
+ifelse([$1], CC, [depcc="$CC" am_compiler_list=],
+ [$1], CXX, [depcc="$CXX" am_compiler_list=],
+ [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
+ [$1], UPC, [depcc="$UPC" am_compiler_list=],
+ [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'],
+ [depcc="$$1" am_compiler_list=])
+
+AC_CACHE_CHECK([dependency style of $depcc],
+ [am_cv_$1_dependencies_compiler_type],
+[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
+ # We make a subdir and do the tests there. Otherwise we can end up
+ # making bogus files that we don't know about and never remove. For
+ # instance it was reported that on HP-UX the gcc test will end up
+ # making a dummy file named `D' -- because `-MD' means `put the output
+ # in D'.
+ rm -rf conftest.dir
+ mkdir conftest.dir
+ # Copy depcomp to subdir because otherwise we won't find it if we're
+ # using a relative directory.
+ cp "$am_depcomp" conftest.dir
+ cd conftest.dir
+ # We will build objects and dependencies in a subdirectory because
+ # it helps to detect inapplicable dependency modes. For instance
+ # both Tru64's cc and ICC support -MD to output dependencies as a
+ # side effect of compilation, but ICC will put the dependencies in
+ # the current directory while Tru64 will put them in the object
+ # directory.
+ mkdir sub
+
+ am_cv_$1_dependencies_compiler_type=none
+ if test "$am_compiler_list" = ""; then
+ am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
+ fi
+ am__universal=false
+ m4_case([$1], [CC],
+ [case " $depcc " in #(
+ *\ -arch\ *\ -arch\ *) am__universal=true ;;
+ esac],
+ [CXX],
+ [case " $depcc " in #(
+ *\ -arch\ *\ -arch\ *) am__universal=true ;;
+ esac])
+
+ for depmode in $am_compiler_list; do
+ # Setup a source with many dependencies, because some compilers
+ # like to wrap large dependency lists on column 80 (with \), and
+ # we should not choose a depcomp mode which is confused by this.
+ #
+ # We need to recreate these files for each test, as the compiler may
+ # overwrite some of them when testing with obscure command lines.
+ # This happens at least with the AIX C compiler.
+ : > sub/conftest.c
+ for i in 1 2 3 4 5 6; do
+ echo '#include "conftst'$i'.h"' >> sub/conftest.c
+ # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
+ # Solaris 8's {/usr,}/bin/sh.
+ touch sub/conftst$i.h
+ done
+ echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
+
+ # We check with `-c' and `-o' for the sake of the "dashmstdout"
+ # mode. It turns out that the SunPro C++ compiler does not properly
+ # handle `-M -o', and we need to detect this. Also, some Intel
+ # versions had trouble with output in subdirs
+ am__obj=sub/conftest.${OBJEXT-o}
+ am__minus_obj="-o $am__obj"
+ case $depmode in
+ gcc)
+ # This depmode causes a compiler race in universal mode.
+ test "$am__universal" = false || continue
+ ;;
+ nosideeffect)
+ # after this tag, mechanisms are not by side-effect, so they'll
+ # only be used when explicitly requested
+ if test "x$enable_dependency_tracking" = xyes; then
+ continue
+ else
+ break
+ fi
+ ;;
+ msvc7 | msvc7msys | msvisualcpp | msvcmsys)
+ # This compiler won't grok `-c -o', but also, the minuso test has
+ # not run yet. These depmodes are late enough in the game, and
+ # so weak that their functioning should not be impacted.
+ am__obj=conftest.${OBJEXT-o}
+ am__minus_obj=
+ ;;
+ none) break ;;
+ esac
+ if depmode=$depmode \
+ source=sub/conftest.c object=$am__obj \
+ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
+ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
+ >/dev/null 2>conftest.err &&
+ grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
+ grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
+ grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
+ ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
+ # icc doesn't choke on unknown options, it will just issue warnings
+ # or remarks (even with -Werror). So we grep stderr for any message
+ # that says an option was ignored or not supported.
+ # When given -MP, icc 7.0 and 7.1 complain thusly:
+ # icc: Command line warning: ignoring option '-M'; no argument required
+ # The diagnosis changed in icc 8.0:
+ # icc: Command line remark: option '-MP' not supported
+ if (grep 'ignoring option' conftest.err ||
+ grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
+ am_cv_$1_dependencies_compiler_type=$depmode
+ break
+ fi
+ fi
+ done
+
+ cd ..
+ rm -rf conftest.dir
+else
+ am_cv_$1_dependencies_compiler_type=none
+fi
+])
+AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
+AM_CONDITIONAL([am__fastdep$1], [
+ test "x$enable_dependency_tracking" != xno \
+ && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
+])
+
+
+# AM_SET_DEPDIR
+# -------------
+# Choose a directory name for dependency files.
+# This macro is AC_REQUIREd in _AM_DEPENDENCIES
+AC_DEFUN([AM_SET_DEPDIR],
+[AC_REQUIRE([AM_SET_LEADING_DOT])dnl
+AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
+])
+
+
+# AM_DEP_TRACK
+# ------------
+AC_DEFUN([AM_DEP_TRACK],
+[AC_ARG_ENABLE(dependency-tracking,
+[ --disable-dependency-tracking speeds up one-time build
+ --enable-dependency-tracking do not reject slow dependency extractors])
+if test "x$enable_dependency_tracking" != xno; then
+ am_depcomp="$ac_aux_dir/depcomp"
+ AMDEPBACKSLASH='\'
+ am__nodep='_no'
+fi
+AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
+AC_SUBST([AMDEPBACKSLASH])dnl
+_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
+AC_SUBST([am__nodep])dnl
+_AM_SUBST_NOTMAKE([am__nodep])dnl
+])
+
+# Generate code to set up dependency tracking. -*- Autoconf -*-
+
+# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008
+# Free Software Foundation, Inc.
+#
+# This file 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.
+
+#serial 5
+
+# _AM_OUTPUT_DEPENDENCY_COMMANDS
+# ------------------------------
+AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
+[{
+ # Autoconf 2.62 quotes --file arguments for eval, but not when files
+ # are listed without --file. Let's play safe and only enable the eval
+ # if we detect the quoting.
+ case $CONFIG_FILES in
+ *\'*) eval set x "$CONFIG_FILES" ;;
+ *) set x $CONFIG_FILES ;;
+ esac
+ shift
+ for mf
+ do
+ # Strip MF so we end up with the name of the file.
+ mf=`echo "$mf" | sed -e 's/:.*$//'`
+ # Check whether this is an Automake generated Makefile or not.
+ # We used to match only the files named `Makefile.in', but
+ # some people rename them; so instead we look at the file content.
+ # Grep'ing the first line is not enough: some people post-process
+ # each Makefile.in and add a new line on top of each file to say so.
+ # Grep'ing the whole file is not good either: AIX grep has a line
+ # limit of 2048, but all sed's we know have understand at least 4000.
+ if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
+ dirpart=`AS_DIRNAME("$mf")`
+ else
+ continue
+ fi
+ # Extract the definition of DEPDIR, am__include, and am__quote
+ # from the Makefile without running `make'.
+ DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
+ test -z "$DEPDIR" && continue
+ am__include=`sed -n 's/^am__include = //p' < "$mf"`
+ test -z "am__include" && continue
+ am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
+ # When using ansi2knr, U may be empty or an underscore; expand it
+ U=`sed -n 's/^U = //p' < "$mf"`
+ # Find all dependency output files, they are included files with
+ # $(DEPDIR) in their names. We invoke sed twice because it is the
+ # simplest approach to changing $(DEPDIR) to its actual value in the
+ # expansion.
+ for file in `sed -n "
+ s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
+ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
+ # Make sure the directory exists.
+ test -f "$dirpart/$file" && continue
+ fdir=`AS_DIRNAME(["$file"])`
+ AS_MKDIR_P([$dirpart/$fdir])
+ # echo "creating $dirpart/$file"
+ echo '# dummy' > "$dirpart/$file"
+ done
+ done
+}
+])# _AM_OUTPUT_DEPENDENCY_COMMANDS
+
+
+# AM_OUTPUT_DEPENDENCY_COMMANDS
+# -----------------------------
+# This macro should only be invoked once -- use via AC_REQUIRE.
+#
+# This code is only required when automatic dependency tracking
+# is enabled. FIXME. This creates each `.P' file that we will
+# need in order to bootstrap the dependency handling code.
+AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
+[AC_CONFIG_COMMANDS([depfiles],
+ [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
+ [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
+])
+
+# Do all the work for Automake. -*- Autoconf -*-
+
+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
+# 2005, 2006, 2008, 2009 Free Software Foundation, Inc.
+#
+# This file 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.
+
+# serial 16
+
+# This macro actually does too much. Some checks are only needed if
+# your package does certain things. But this isn't really a big deal.
+
+# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
+# AM_INIT_AUTOMAKE([OPTIONS])
+# -----------------------------------------------
+# The call with PACKAGE and VERSION arguments is the old style
+# call (pre autoconf-2.50), which is being phased out. PACKAGE
+# and VERSION should now be passed to AC_INIT and removed from
+# the call to AM_INIT_AUTOMAKE.
+# We support both call styles for the transition. After
+# the next Automake release, Autoconf can make the AC_INIT
+# arguments mandatory, and then we can depend on a new Autoconf
+# release and drop the old call support.
+AC_DEFUN([AM_INIT_AUTOMAKE],
+[AC_PREREQ([2.62])dnl
+dnl Autoconf wants to disallow AM_ names. We explicitly allow
+dnl the ones we care about.
+m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
+AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
+AC_REQUIRE([AC_PROG_INSTALL])dnl
+if test "`cd $srcdir && pwd`" != "`pwd`"; then
+ # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
+ # is not polluted with repeated "-I."
+ AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
+ # test to see if srcdir already configured
+ if test -f $srcdir/config.status; then
+ AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
+ fi
+fi
+
+# test whether we have cygpath
+if test -z "$CYGPATH_W"; then
+ if (cygpath --version) >/dev/null 2>/dev/null; then
+ CYGPATH_W='cygpath -w'
+ else
+ CYGPATH_W=echo
+ fi
+fi
+AC_SUBST([CYGPATH_W])
+
+# Define the identity of the package.
+dnl Distinguish between old-style and new-style calls.
+m4_ifval([$2],
+[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
+ AC_SUBST([PACKAGE], [$1])dnl
+ AC_SUBST([VERSION], [$2])],
+[_AM_SET_OPTIONS([$1])dnl
+dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
+m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,,
+ [m4_fatal([AC_INIT should be called with package and version arguments])])dnl
+ AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
+ AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
+
+_AM_IF_OPTION([no-define],,
+[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
+ AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
+
+# Some tools Automake needs.
+AC_REQUIRE([AM_SANITY_CHECK])dnl
+AC_REQUIRE([AC_ARG_PROGRAM])dnl
+AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
+AM_MISSING_PROG(AUTOCONF, autoconf)
+AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
+AM_MISSING_PROG(AUTOHEADER, autoheader)
+AM_MISSING_PROG(MAKEINFO, makeinfo)
+AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
+AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl
+AC_REQUIRE([AM_PROG_MKDIR_P])dnl
+# We need awk for the "check" target. The system "awk" is bad on
+# some platforms.
+AC_REQUIRE([AC_PROG_AWK])dnl
+AC_REQUIRE([AC_PROG_MAKE_SET])dnl
+AC_REQUIRE([AM_SET_LEADING_DOT])dnl
+_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
+ [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
+ [_AM_PROG_TAR([v7])])])
+_AM_IF_OPTION([no-dependencies],,
+[AC_PROVIDE_IFELSE([AC_PROG_CC],
+ [_AM_DEPENDENCIES(CC)],
+ [define([AC_PROG_CC],
+ defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
+AC_PROVIDE_IFELSE([AC_PROG_CXX],
+ [_AM_DEPENDENCIES(CXX)],
+ [define([AC_PROG_CXX],
+ defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
+AC_PROVIDE_IFELSE([AC_PROG_OBJC],
+ [_AM_DEPENDENCIES(OBJC)],
+ [define([AC_PROG_OBJC],
+ defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl
+])
+_AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl
+dnl The `parallel-tests' driver may need to know about EXEEXT, so add the
+dnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This macro
+dnl is hooked onto _AC_COMPILER_EXEEXT early, see below.
+AC_CONFIG_COMMANDS_PRE(dnl
+[m4_provide_if([_AM_COMPILER_EXEEXT],
+ [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
+])
+
+dnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion. Do not
+dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further
+dnl mangled by Autoconf and run in a shell conditional statement.
+m4_define([_AC_COMPILER_EXEEXT],
+m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])])
+
+
+# When config.status generates a header, we must update the stamp-h file.
+# This file resides in the same directory as the config header
+# that is generated. The stamp files are numbered to have different names.
+
+# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
+# loop where config.status creates the headers, so we can generate
+# our stamp files there.
+AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
+[# Compute $1's index in $config_headers.
+_am_arg=$1
+_am_stamp_count=1
+for _am_header in $config_headers :; do
+ case $_am_header in
+ $_am_arg | $_am_arg:* )
+ break ;;
+ * )
+ _am_stamp_count=`expr $_am_stamp_count + 1` ;;
+ esac
+done
+echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
+
+# Copyright (C) 2001, 2003, 2005, 2008, 2011 Free Software Foundation,
+# Inc.
+#
+# This file 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.
+
+# serial 1
+
+# AM_PROG_INSTALL_SH
+# ------------------
+# Define $install_sh.
+AC_DEFUN([AM_PROG_INSTALL_SH],
+[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
+if test x"${install_sh}" != xset; then
+ case $am_aux_dir in
+ *\ * | *\ *)
+ install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
+ *)
+ install_sh="\${SHELL} $am_aux_dir/install-sh"
+ esac
+fi
+AC_SUBST(install_sh)])
+
+# Copyright (C) 2003, 2005 Free Software Foundation, Inc.
+#
+# This file 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.
+
+# serial 2
+
+# Check whether the underlying file-system supports filenames
+# with a leading dot. For instance MS-DOS doesn't.
+AC_DEFUN([AM_SET_LEADING_DOT],
+[rm -rf .tst 2>/dev/null
+mkdir .tst 2>/dev/null
+if test -d .tst; then
+ am__leading_dot=.
+else
+ am__leading_dot=_
+fi
+rmdir .tst 2>/dev/null
+AC_SUBST([am__leading_dot])])
+
+# Add --enable-maintainer-mode option to configure. -*- Autoconf -*-
+# From Jim Meyering
+
+# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005, 2008,
+# 2011 Free Software Foundation, Inc.
+#
+# This file 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.
+
+# serial 5
+
+# AM_MAINTAINER_MODE([DEFAULT-MODE])
+# ----------------------------------
+# Control maintainer-specific portions of Makefiles.
+# Default is to disable them, unless `enable' is passed literally.
+# For symmetry, `disable' may be passed as well. Anyway, the user
+# can override the default with the --enable/--disable switch.
+AC_DEFUN([AM_MAINTAINER_MODE],
+[m4_case(m4_default([$1], [disable]),
+ [enable], [m4_define([am_maintainer_other], [disable])],
+ [disable], [m4_define([am_maintainer_other], [enable])],
+ [m4_define([am_maintainer_other], [enable])
+ m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])])
+AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
+ dnl maintainer-mode's default is 'disable' unless 'enable' is passed
+ AC_ARG_ENABLE([maintainer-mode],
+[ --][am_maintainer_other][-maintainer-mode am_maintainer_other make rules and dependencies not useful
+ (and sometimes confusing) to the casual installer],
+ [USE_MAINTAINER_MODE=$enableval],
+ [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes]))
+ AC_MSG_RESULT([$USE_MAINTAINER_MODE])
+ AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes])
+ MAINT=$MAINTAINER_MODE_TRUE
+ AC_SUBST([MAINT])dnl
+]
+)
+
+AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE])
+
+# Check to see how 'make' treats includes. -*- Autoconf -*-
+
+# Copyright (C) 2001, 2002, 2003, 2005, 2009 Free Software Foundation, Inc.
+#
+# This file 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.
+
+# serial 4
+
+# AM_MAKE_INCLUDE()
+# -----------------
+# Check to see how make treats includes.
+AC_DEFUN([AM_MAKE_INCLUDE],
+[am_make=${MAKE-make}
+cat > confinc << 'END'
+am__doit:
+ @echo this is the am__doit target
+.PHONY: am__doit
+END
+# If we don't find an include directive, just comment out the code.
+AC_MSG_CHECKING([for style of include used by $am_make])
+am__include="#"
+am__quote=
+_am_result=none
+# First try GNU make style include.
+echo "include confinc" > confmf
+# Ignore all kinds of additional output from `make'.
+case `$am_make -s -f confmf 2> /dev/null` in #(
+*the\ am__doit\ target*)
+ am__include=include
+ am__quote=
+ _am_result=GNU
+ ;;
+esac
+# Now try BSD make style include.
+if test "$am__include" = "#"; then
+ echo '.include "confinc"' > confmf
+ case `$am_make -s -f confmf 2> /dev/null` in #(
+ *the\ am__doit\ target*)
+ am__include=.include
+ am__quote="\""
+ _am_result=BSD
+ ;;
+ esac
+fi
+AC_SUBST([am__include])
+AC_SUBST([am__quote])
+AC_MSG_RESULT([$_am_result])
+rm -f confinc confmf
+])
+
+# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*-
+
+# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008
+# Free Software Foundation, Inc.
+#
+# This file 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.
+
+# serial 6
+
+# AM_MISSING_PROG(NAME, PROGRAM)
+# ------------------------------
+AC_DEFUN([AM_MISSING_PROG],
+[AC_REQUIRE([AM_MISSING_HAS_RUN])
+$1=${$1-"${am_missing_run}$2"}
+AC_SUBST($1)])
+
+
+# AM_MISSING_HAS_RUN
+# ------------------
+# Define MISSING if not defined so far and test if it supports --run.
+# If it does, set am_missing_run to use it, otherwise, to nothing.
+AC_DEFUN([AM_MISSING_HAS_RUN],
+[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
+AC_REQUIRE_AUX_FILE([missing])dnl
+if test x"${MISSING+set}" != xset; then
+ case $am_aux_dir in
+ *\ * | *\ *)
+ MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
+ *)
+ MISSING="\${SHELL} $am_aux_dir/missing" ;;
+ esac
+fi
+# Use eval to expand $SHELL
+if eval "$MISSING --run true"; then
+ am_missing_run="$MISSING --run "
+else
+ am_missing_run=
+ AC_MSG_WARN([`missing' script is too old or missing])
+fi
+])
+
+# Copyright (C) 2003, 2004, 2005, 2006, 2011 Free Software Foundation,
+# Inc.
+#
+# This file 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.
+
+# serial 1
+
+# AM_PROG_MKDIR_P
+# ---------------
+# Check for `mkdir -p'.
+AC_DEFUN([AM_PROG_MKDIR_P],
+[AC_PREREQ([2.60])dnl
+AC_REQUIRE([AC_PROG_MKDIR_P])dnl
+dnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P,
+dnl while keeping a definition of mkdir_p for backward compatibility.
+dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile.
+dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of
+dnl Makefile.ins that do not define MKDIR_P, so we do our own
+dnl adjustment using top_builddir (which is defined more often than
+dnl MKDIR_P).
+AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl
+case $mkdir_p in
+ [[\\/$]]* | ?:[[\\/]]*) ;;
+ */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
+esac
+])
+
+# Helper functions for option handling. -*- Autoconf -*-
+
+# Copyright (C) 2001, 2002, 2003, 2005, 2008, 2010 Free Software
+# Foundation, Inc.
+#
+# This file 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.
+
+# serial 5
+
+# _AM_MANGLE_OPTION(NAME)
+# -----------------------
+AC_DEFUN([_AM_MANGLE_OPTION],
+[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
+
+# _AM_SET_OPTION(NAME)
+# --------------------
+# Set option NAME. Presently that only means defining a flag for this option.
+AC_DEFUN([_AM_SET_OPTION],
+[m4_define(_AM_MANGLE_OPTION([$1]), 1)])
+
+# _AM_SET_OPTIONS(OPTIONS)
+# ------------------------
+# OPTIONS is a space-separated list of Automake options.
+AC_DEFUN([_AM_SET_OPTIONS],
+[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
+
+# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
+# -------------------------------------------
+# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
+AC_DEFUN([_AM_IF_OPTION],
+[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
+
+# Check to make sure that the build environment is sane. -*- Autoconf -*-
+
+# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008
+# Free Software Foundation, Inc.
+#
+# This file 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.
+
+# serial 5
+
+# AM_SANITY_CHECK
+# ---------------
+AC_DEFUN([AM_SANITY_CHECK],
+[AC_MSG_CHECKING([whether build environment is sane])
+# Just in case
+sleep 1
+echo timestamp > conftest.file
+# Reject unsafe characters in $srcdir or the absolute working directory
+# name. Accept space and tab only in the latter.
+am_lf='
+'
+case `pwd` in
+ *[[\\\"\#\$\&\'\`$am_lf]]*)
+ AC_MSG_ERROR([unsafe absolute working directory name]);;
+esac
+case $srcdir in
+ *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*)
+ AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);;
+esac
+
+# Do `set' in a subshell so we don't clobber the current shell's
+# arguments. Must try -L first in case configure is actually a
+# symlink; some systems play weird games with the mod time of symlinks
+# (eg FreeBSD returns the mod time of the symlink's containing
+# directory).
+if (
+ set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
+ if test "$[*]" = "X"; then
+ # -L didn't work.
+ set X `ls -t "$srcdir/configure" conftest.file`
+ fi
+ rm -f conftest.file
+ if test "$[*]" != "X $srcdir/configure conftest.file" \
+ && test "$[*]" != "X conftest.file $srcdir/configure"; then
+
+ # If neither matched, then we have a broken ls. This can happen
+ # if, for instance, CONFIG_SHELL is bash and it inherits a
+ # broken ls alias from the environment. This has actually
+ # happened. Such a system could not be considered "sane".
+ AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
+alias in your environment])
+ fi
+
+ test "$[2]" = conftest.file
+ )
+then
+ # Ok.
+ :
+else
+ AC_MSG_ERROR([newly created file is older than distributed files!
+Check your system clock])
+fi
+AC_MSG_RESULT(yes)])
+
+# Copyright (C) 2001, 2003, 2005, 2011 Free Software Foundation, Inc.
+#
+# This file 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.
+
+# serial 1
+
+# AM_PROG_INSTALL_STRIP
+# ---------------------
+# One issue with vendor `install' (even GNU) is that you can't
+# specify the program used to strip binaries. This is especially
+# annoying in cross-compiling environments, where the build's strip
+# is unlikely to handle the host's binaries.
+# Fortunately install-sh will honor a STRIPPROG variable, so we
+# always use install-sh in `make install-strip', and initialize
+# STRIPPROG with the value of the STRIP variable (set by the user).
+AC_DEFUN([AM_PROG_INSTALL_STRIP],
+[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
+# Installed binaries are usually stripped using `strip' when the user
+# run `make install-strip'. However `strip' might not be the right
+# tool to use in cross-compilation environments, therefore Automake
+# will honor the `STRIP' environment variable to overrule this program.
+dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
+if test "$cross_compiling" != no; then
+ AC_CHECK_TOOL([STRIP], [strip], :)
+fi
+INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
+AC_SUBST([INSTALL_STRIP_PROGRAM])])
+
+# Copyright (C) 2006, 2008, 2010 Free Software Foundation, Inc.
+#
+# This file 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.
+
+# serial 3
+
+# _AM_SUBST_NOTMAKE(VARIABLE)
+# ---------------------------
+# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
+# This macro is traced by Automake.
+AC_DEFUN([_AM_SUBST_NOTMAKE])
+
+# AM_SUBST_NOTMAKE(VARIABLE)
+# --------------------------
+# Public sister of _AM_SUBST_NOTMAKE.
+AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
+
+# Check how to create a tarball. -*- Autoconf -*-
+
+# Copyright (C) 2004, 2005, 2012 Free Software Foundation, Inc.
+#
+# This file 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.
+
+# serial 2
+
+# _AM_PROG_TAR(FORMAT)
+# --------------------
+# Check how to create a tarball in format FORMAT.
+# FORMAT should be one of `v7', `ustar', or `pax'.
+#
+# Substitute a variable $(am__tar) that is a command
+# writing to stdout a FORMAT-tarball containing the directory
+# $tardir.
+# tardir=directory && $(am__tar) > result.tar
+#
+# Substitute a variable $(am__untar) that extract such
+# a tarball read from stdin.
+# $(am__untar) < result.tar
+AC_DEFUN([_AM_PROG_TAR],
+[# Always define AMTAR for backward compatibility. Yes, it's still used
+# in the wild :-( We should find a proper way to deprecate it ...
+AC_SUBST([AMTAR], ['$${TAR-tar}'])
+m4_if([$1], [v7],
+ [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'],
+ [m4_case([$1], [ustar],, [pax],,
+ [m4_fatal([Unknown tar format])])
+AC_MSG_CHECKING([how to create a $1 tar archive])
+# Loop over all known methods to create a tar archive until one works.
+_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
+_am_tools=${am_cv_prog_tar_$1-$_am_tools}
+# Do not fold the above two line into one, because Tru64 sh and
+# Solaris sh will not grok spaces in the rhs of `-'.
+for _am_tool in $_am_tools
+do
+ case $_am_tool in
+ gnutar)
+ for _am_tar in tar gnutar gtar;
+ do
+ AM_RUN_LOG([$_am_tar --version]) && break
+ done
+ am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
+ am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
+ am__untar="$_am_tar -xf -"
+ ;;
+ plaintar)
+ # Must skip GNU tar: if it does not support --format= it doesn't create
+ # ustar tarball either.
+ (tar --version) >/dev/null 2>&1 && continue
+ am__tar='tar chf - "$$tardir"'
+ am__tar_='tar chf - "$tardir"'
+ am__untar='tar xf -'
+ ;;
+ pax)
+ am__tar='pax -L -x $1 -w "$$tardir"'
+ am__tar_='pax -L -x $1 -w "$tardir"'
+ am__untar='pax -r'
+ ;;
+ cpio)
+ am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
+ am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
+ am__untar='cpio -i -H $1 -d'
+ ;;
+ none)
+ am__tar=false
+ am__tar_=false
+ am__untar=false
+ ;;
+ esac
+
+ # If the value was cached, stop now. We just wanted to have am__tar
+ # and am__untar set.
+ test -n "${am_cv_prog_tar_$1}" && break
+
+ # tar/untar a dummy directory, and stop if the command works
+ rm -rf conftest.dir
+ mkdir conftest.dir
+ echo GrepMe > conftest.dir/file
+ AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
+ rm -rf conftest.dir
+ if test -s conftest.tar; then
+ AM_RUN_LOG([$am__untar <conftest.tar])
+ grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
+ fi
+done
+rm -rf conftest.dir
+
+AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
+AC_MSG_RESULT([$am_cv_prog_tar_$1])])
+AC_SUBST([am__tar])
+AC_SUBST([am__untar])
+]) # _AM_PROG_TAR
+
+m4_include([../../../../../acinclude.m4])
diff --git a/newlib/libc/sys/phoenix/machine/arm/configure b/newlib/libc/sys/phoenix/machine/arm/configure
new file mode 100644
index 000000000..62e27a7d2
--- /dev/null
+++ b/newlib/libc/sys/phoenix/machine/arm/configure
@@ -0,0 +1,4748 @@
+#! /bin/sh
+# Guess values for system-dependent variables and create Makefiles.
+# Generated by GNU Autoconf 2.68 for newlib 2.4.0.
+#
+#
+# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
+# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software
+# Foundation, Inc.
+#
+#
+# This configure script is free software; the Free Software Foundation
+# gives unlimited permission to copy, distribute and modify it.
+## -------------------- ##
+## M4sh Initialization. ##
+## -------------------- ##
+
+# Be more Bourne compatible
+DUALCASE=1; export DUALCASE # for MKS sh
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
+ emulate sh
+ NULLCMD=:
+ # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
+ # is contrary to our usage. Disable this feature.
+ alias -g '${1+"$@"}'='"$@"'
+ setopt NO_GLOB_SUBST
+else
+ case `(set -o) 2>/dev/null` in #(
+ *posix*) :
+ set -o posix ;; #(
+ *) :
+ ;;
+esac
+fi
+
+
+as_nl='
+'
+export as_nl
+# Printing a long string crashes Solaris 7 /usr/bin/printf.
+as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
+as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
+as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
+# Prefer a ksh shell builtin over an external printf program on Solaris,
+# but without wasting forks for bash or zsh.
+if test -z "$BASH_VERSION$ZSH_VERSION" \
+ && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
+ as_echo='print -r --'
+ as_echo_n='print -rn --'
+elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
+ as_echo='printf %s\n'
+ as_echo_n='printf %s'
+else
+ if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
+ as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
+ as_echo_n='/usr/ucb/echo -n'
+ else
+ as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
+ as_echo_n_body='eval
+ arg=$1;
+ case $arg in #(
+ *"$as_nl"*)
+ expr "X$arg" : "X\\(.*\\)$as_nl";
+ arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
+ esac;
+ expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
+ '
+ export as_echo_n_body
+ as_echo_n='sh -c $as_echo_n_body as_echo'
+ fi
+ export as_echo_body
+ as_echo='sh -c $as_echo_body as_echo'
+fi
+
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+ PATH_SEPARATOR=:
+ (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
+ (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
+ PATH_SEPARATOR=';'
+ }
+fi
+
+
+# IFS
+# We need space, tab and new line, in precisely that order. Quoting is
+# there to prevent editors from complaining about space-tab.
+# (If _AS_PATH_WALK were called with IFS unset, it would disable word
+# splitting by setting IFS to empty value.)
+IFS=" "" $as_nl"
+
+# Find who we are. Look in the path if we contain no directory separator.
+as_myself=
+case $0 in #((
+ *[\\/]* ) as_myself=$0 ;;
+ *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
+ done
+IFS=$as_save_IFS
+
+ ;;
+esac
+# We did not find ourselves, most probably we were run as `sh COMMAND'
+# in which case we are not to be found in the path.
+if test "x$as_myself" = x; then
+ as_myself=$0
+fi
+if test ! -f "$as_myself"; then
+ $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
+ exit 1
+fi
+
+# Unset variables that we do not need and which cause bugs (e.g. in
+# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
+# suppresses any "Segmentation fault" message there. '((' could
+# trigger a bug in pdksh 5.2.14.
+for as_var in BASH_ENV ENV MAIL MAILPATH
+do eval test x\${$as_var+set} = xset \
+ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
+done
+PS1='$ '
+PS2='> '
+PS4='+ '
+
+# NLS nuisances.
+LC_ALL=C
+export LC_ALL
+LANGUAGE=C
+export LANGUAGE
+
+# CDPATH.
+(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
+
+if test "x$CONFIG_SHELL" = x; then
+ as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
+ emulate sh
+ NULLCMD=:
+ # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
+ # is contrary to our usage. Disable this feature.
+ alias -g '\${1+\"\$@\"}'='\"\$@\"'
+ setopt NO_GLOB_SUBST
+else
+ case \`(set -o) 2>/dev/null\` in #(
+ *posix*) :
+ set -o posix ;; #(
+ *) :
+ ;;
+esac
+fi
+"
+ as_required="as_fn_return () { (exit \$1); }
+as_fn_success () { as_fn_return 0; }
+as_fn_failure () { as_fn_return 1; }
+as_fn_ret_success () { return 0; }
+as_fn_ret_failure () { return 1; }
+
+exitcode=0
+as_fn_success || { exitcode=1; echo as_fn_success failed.; }
+as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
+as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
+as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
+if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
+
+else
+ exitcode=1; echo positional parameters were not saved.
+fi
+test x\$exitcode = x0 || exit 1"
+ as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
+ as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
+ eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
+ test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1"
+ if (eval "$as_required") 2>/dev/null; then :
+ as_have_required=yes
+else
+ as_have_required=no
+fi
+ if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
+
+else
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+as_found=false
+for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ as_found=:
+ case $as_dir in #(
+ /*)
+ for as_base in sh bash ksh sh5; do
+ # Try only shells that exist, to save several forks.
+ as_shell=$as_dir/$as_base
+ if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
+ { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
+ CONFIG_SHELL=$as_shell as_have_required=yes
+ if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
+ break 2
+fi
+fi
+ done;;
+ esac
+ as_found=false
+done
+$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
+ { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
+ CONFIG_SHELL=$SHELL as_have_required=yes
+fi; }
+IFS=$as_save_IFS
+
+
+ if test "x$CONFIG_SHELL" != x; then :
+ # We cannot yet assume a decent shell, so we have to provide a
+ # neutralization value for shells without unset; and this also
+ # works around shells that cannot unset nonexistent variables.
+ # Preserve -v and -x to the replacement shell.
+ BASH_ENV=/dev/null
+ ENV=/dev/null
+ (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
+ export CONFIG_SHELL
+ case $- in # ((((
+ *v*x* | *x*v* ) as_opts=-vx ;;
+ *v* ) as_opts=-v ;;
+ *x* ) as_opts=-x ;;
+ * ) as_opts= ;;
+ esac
+ exec "$CONFIG_SHELL" $as_opts "$as_myself" ${1+"$@"}
+fi
+
+ if test x$as_have_required = xno; then :
+ $as_echo "$0: This script requires a shell more modern than all"
+ $as_echo "$0: the shells that I found on your system."
+ if test x${ZSH_VERSION+set} = xset ; then
+ $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
+ $as_echo "$0: be upgraded to zsh 4.3.4 or later."
+ else
+ $as_echo "$0: Please tell bug-autoconf@gnu.org about your system,
+$0: including any error possibly output before this
+$0: message. Then install a modern shell, or manually run
+$0: the script under such a shell if you do have one."
+ fi
+ exit 1
+fi
+fi
+fi
+SHELL=${CONFIG_SHELL-/bin/sh}
+export SHELL
+# Unset more variables known to interfere with behavior of common tools.
+CLICOLOR_FORCE= GREP_OPTIONS=
+unset CLICOLOR_FORCE GREP_OPTIONS
+
+## --------------------- ##
+## M4sh Shell Functions. ##
+## --------------------- ##
+# as_fn_unset VAR
+# ---------------
+# Portably unset VAR.
+as_fn_unset ()
+{
+ { eval $1=; unset $1;}
+}
+as_unset=as_fn_unset
+
+# as_fn_set_status STATUS
+# -----------------------
+# Set $? to STATUS, without forking.
+as_fn_set_status ()
+{
+ return $1
+} # as_fn_set_status
+
+# as_fn_exit STATUS
+# -----------------
+# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
+as_fn_exit ()
+{
+ set +e
+ as_fn_set_status $1
+ exit $1
+} # as_fn_exit
+
+# as_fn_mkdir_p
+# -------------
+# Create "$as_dir" as a directory, including parents if necessary.
+as_fn_mkdir_p ()
+{
+
+ case $as_dir in #(
+ -*) as_dir=./$as_dir;;
+ esac
+ test -d "$as_dir" || eval $as_mkdir_p || {
+ as_dirs=
+ while :; do
+ case $as_dir in #(
+ *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
+ *) as_qdir=$as_dir;;
+ esac
+ as_dirs="'$as_qdir' $as_dirs"
+ as_dir=`$as_dirname -- "$as_dir" ||
+$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$as_dir" : 'X\(//\)[^/]' \| \
+ X"$as_dir" : 'X\(//\)$' \| \
+ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$as_dir" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)[^/].*/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+ test -d "$as_dir" && break
+ done
+ test -z "$as_dirs" || eval "mkdir $as_dirs"
+ } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
+
+
+} # as_fn_mkdir_p
+# as_fn_append VAR VALUE
+# ----------------------
+# Append the text in VALUE to the end of the definition contained in VAR. Take
+# advantage of any shell optimizations that allow amortized linear growth over
+# repeated appends, instead of the typical quadratic growth present in naive
+# implementations.
+if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
+ eval 'as_fn_append ()
+ {
+ eval $1+=\$2
+ }'
+else
+ as_fn_append ()
+ {
+ eval $1=\$$1\$2
+ }
+fi # as_fn_append
+
+# as_fn_arith ARG...
+# ------------------
+# Perform arithmetic evaluation on the ARGs, and store the result in the
+# global $as_val. Take advantage of shells that can avoid forks. The arguments
+# must be portable across $(()) and expr.
+if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
+ eval 'as_fn_arith ()
+ {
+ as_val=$(( $* ))
+ }'
+else
+ as_fn_arith ()
+ {
+ as_val=`expr "$@" || test $? -eq 1`
+ }
+fi # as_fn_arith
+
+
+# as_fn_error STATUS ERROR [LINENO LOG_FD]
+# ----------------------------------------
+# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
+# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
+# script with STATUS, using 1 if that was 0.
+as_fn_error ()
+{
+ as_status=$1; test $as_status -eq 0 && as_status=1
+ if test "$4"; then
+ as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
+ fi
+ $as_echo "$as_me: error: $2" >&2
+ as_fn_exit $as_status
+} # as_fn_error
+
+if expr a : '\(a\)' >/dev/null 2>&1 &&
+ test "X`expr 00001 : '.*\(...\)'`" = X001; then
+ as_expr=expr
+else
+ as_expr=false
+fi
+
+if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
+ as_basename=basename
+else
+ as_basename=false
+fi
+
+if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
+ as_dirname=dirname
+else
+ as_dirname=false
+fi
+
+as_me=`$as_basename -- "$0" ||
+$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
+ X"$0" : 'X\(//\)$' \| \
+ X"$0" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X/"$0" |
+ sed '/^.*\/\([^/][^/]*\)\/*$/{
+ s//\1/
+ q
+ }
+ /^X\/\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\/\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+
+# Avoid depending upon Character Ranges.
+as_cr_letters='abcdefghijklmnopqrstuvwxyz'
+as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
+as_cr_Letters=$as_cr_letters$as_cr_LETTERS
+as_cr_digits='0123456789'
+as_cr_alnum=$as_cr_Letters$as_cr_digits
+
+
+ as_lineno_1=$LINENO as_lineno_1a=$LINENO
+ as_lineno_2=$LINENO as_lineno_2a=$LINENO
+ eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
+ test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
+ # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-)
+ sed -n '
+ p
+ /[$]LINENO/=
+ ' <$as_myself |
+ sed '
+ s/[$]LINENO.*/&-/
+ t lineno
+ b
+ :lineno
+ N
+ :loop
+ s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
+ t loop
+ s/-\n.*//
+ ' >$as_me.lineno &&
+ chmod +x "$as_me.lineno" ||
+ { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
+
+ # Don't try to exec as it changes $[0], causing all sort of problems
+ # (the dirname of $[0] is not the place where we might find the
+ # original and so on. Autoconf is especially sensitive to this).
+ . "./$as_me.lineno"
+ # Exit status is that of the last command.
+ exit
+}
+
+ECHO_C= ECHO_N= ECHO_T=
+case `echo -n x` in #(((((
+-n*)
+ case `echo 'xy\c'` in
+ *c*) ECHO_T=' ';; # ECHO_T is single tab character.
+ xy) ECHO_C='\c';;
+ *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
+ ECHO_T=' ';;
+ esac;;
+*)
+ ECHO_N='-n';;
+esac
+
+rm -f conf$$ conf$$.exe conf$$.file
+if test -d conf$$.dir; then
+ rm -f conf$$.dir/conf$$.file
+else
+ rm -f conf$$.dir
+ mkdir conf$$.dir 2>/dev/null
+fi
+if (echo >conf$$.file) 2>/dev/null; then
+ if ln -s conf$$.file conf$$ 2>/dev/null; then
+ as_ln_s='ln -s'
+ # ... but there are two gotchas:
+ # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
+ # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
+ # In both cases, we have to default to `cp -p'.
+ ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
+ as_ln_s='cp -p'
+ elif ln conf$$.file conf$$ 2>/dev/null; then
+ as_ln_s=ln
+ else
+ as_ln_s='cp -p'
+ fi
+else
+ as_ln_s='cp -p'
+fi
+rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
+rmdir conf$$.dir 2>/dev/null
+
+if mkdir -p . 2>/dev/null; then
+ as_mkdir_p='mkdir -p "$as_dir"'
+else
+ test -d ./-p && rmdir ./-p
+ as_mkdir_p=false
+fi
+
+if test -x / >/dev/null 2>&1; then
+ as_test_x='test -x'
+else
+ if ls -dL / >/dev/null 2>&1; then
+ as_ls_L_option=L
+ else
+ as_ls_L_option=
+ fi
+ as_test_x='
+ eval sh -c '\''
+ if test -d "$1"; then
+ test -d "$1/.";
+ else
+ case $1 in #(
+ -*)set "./$1";;
+ esac;
+ case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
+ ???[sx]*):;;*)false;;esac;fi
+ '\'' sh
+ '
+fi
+as_executable_p=$as_test_x
+
+# Sed expression to map a string onto a valid CPP name.
+as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
+
+# Sed expression to map a string onto a valid variable name.
+as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
+
+
+test -n "$DJDIR" || exec 7<&0 </dev/null
+exec 6>&1
+
+# Name of the host.
+# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
+# so uname gets run too.
+ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
+
+#
+# Initializations.
+#
+ac_default_prefix=/usr/local
+ac_clean_files=
+ac_config_libobj_dir=.
+LIBOBJS=
+cross_compiling=no
+subdirs=
+MFLAGS=
+MAKEFLAGS=
+
+# Identity of this package.
+PACKAGE_NAME='newlib'
+PACKAGE_TARNAME='newlib'
+PACKAGE_VERSION='2.4.0'
+PACKAGE_STRING='newlib 2.4.0'
+PACKAGE_BUGREPORT=''
+PACKAGE_URL=''
+
+ac_unique_file="crt0.S"
+ac_subst_vars='LTLIBOBJS
+LIBOBJS
+sys_dir
+machine_dir
+libm_machine_dir
+lpfx
+aext
+oext
+OBJEXT
+USE_LIBTOOL_FALSE
+USE_LIBTOOL_TRUE
+ELIX_LEVEL_4_FALSE
+ELIX_LEVEL_4_TRUE
+ELIX_LEVEL_3_FALSE
+ELIX_LEVEL_3_TRUE
+ELIX_LEVEL_2_FALSE
+ELIX_LEVEL_2_TRUE
+ELIX_LEVEL_1_FALSE
+ELIX_LEVEL_1_TRUE
+ELIX_LEVEL_0_FALSE
+ELIX_LEVEL_0_TRUE
+LDFLAGS
+NO_INCLUDE_LIST
+NEWLIB_CFLAGS
+CCASFLAGS
+CCAS
+MAINT
+MAINTAINER_MODE_FALSE
+MAINTAINER_MODE_TRUE
+READELF
+RANLIB
+AR
+AS
+am__fastdepCC_FALSE
+am__fastdepCC_TRUE
+CCDEPMODE
+am__nodep
+AMDEPBACKSLASH
+AMDEP_FALSE
+AMDEP_TRUE
+am__quote
+am__include
+DEPDIR
+CC
+am__untar
+am__tar
+AMTAR
+am__leading_dot
+SET_MAKE
+AWK
+mkdir_p
+MKDIR_P
+INSTALL_STRIP_PROGRAM
+STRIP
+install_sh
+MAKEINFO
+AUTOHEADER
+AUTOMAKE
+AUTOCONF
+ACLOCAL
+VERSION
+PACKAGE
+CYGPATH_W
+am__isrc
+INSTALL_DATA
+INSTALL_SCRIPT
+INSTALL_PROGRAM
+host_os
+host_vendor
+host_cpu
+host
+build_os
+build_vendor
+build_cpu
+build
+newlib_basedir
+MAY_SUPPLY_SYSCALLS_FALSE
+MAY_SUPPLY_SYSCALLS_TRUE
+target_alias
+host_alias
+build_alias
+LIBS
+ECHO_T
+ECHO_N
+ECHO_C
+DEFS
+mandir
+localedir
+libdir
+psdir
+pdfdir
+dvidir
+htmldir
+infodir
+docdir
+oldincludedir
+includedir
+localstatedir
+sharedstatedir
+sysconfdir
+datadir
+datarootdir
+libexecdir
+sbindir
+bindir
+program_transform_name
+prefix
+exec_prefix
+PACKAGE_URL
+PACKAGE_BUGREPORT
+PACKAGE_STRING
+PACKAGE_VERSION
+PACKAGE_TARNAME
+PACKAGE_NAME
+PATH_SEPARATOR
+SHELL'
+ac_subst_files=''
+ac_user_opts='
+enable_option_checking
+enable_multilib
+enable_target_optspace
+enable_malloc_debugging
+enable_newlib_multithread
+enable_newlib_iconv
+enable_newlib_elix_level
+enable_newlib_io_float
+enable_newlib_supplied_syscalls
+enable_dependency_tracking
+enable_maintainer_mode
+'
+ ac_precious_vars='build_alias
+host_alias
+target_alias
+CCAS
+CCASFLAGS'
+
+
+# Initialize some variables set by options.
+ac_init_help=
+ac_init_version=false
+ac_unrecognized_opts=
+ac_unrecognized_sep=
+# The variables have the same names as the options, with
+# dashes changed to underlines.
+cache_file=/dev/null
+exec_prefix=NONE
+no_create=
+no_recursion=
+prefix=NONE
+program_prefix=NONE
+program_suffix=NONE
+program_transform_name=s,x,x,
+silent=
+site=
+srcdir=
+verbose=
+x_includes=NONE
+x_libraries=NONE
+
+# Installation directory options.
+# These are left unexpanded so users can "make install exec_prefix=/foo"
+# and all the variables that are supposed to be based on exec_prefix
+# by default will actually change.
+# Use braces instead of parens because sh, perl, etc. also accept them.
+# (The list follows the same order as the GNU Coding Standards.)
+bindir='${exec_prefix}/bin'
+sbindir='${exec_prefix}/sbin'
+libexecdir='${exec_prefix}/libexec'
+datarootdir='${prefix}/share'
+datadir='${datarootdir}'
+sysconfdir='${prefix}/etc'
+sharedstatedir='${prefix}/com'
+localstatedir='${prefix}/var'
+includedir='${prefix}/include'
+oldincludedir='/usr/include'
+docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
+infodir='${datarootdir}/info'
+htmldir='${docdir}'
+dvidir='${docdir}'
+pdfdir='${docdir}'
+psdir='${docdir}'
+libdir='${exec_prefix}/lib'
+localedir='${datarootdir}/locale'
+mandir='${datarootdir}/man'
+
+ac_prev=
+ac_dashdash=
+for ac_option
+do
+ # If the previous option needs an argument, assign it.
+ if test -n "$ac_prev"; then
+ eval $ac_prev=\$ac_option
+ ac_prev=
+ continue
+ fi
+
+ case $ac_option in
+ *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
+ *=) ac_optarg= ;;
+ *) ac_optarg=yes ;;
+ esac
+
+ # Accept the important Cygnus configure options, so we can diagnose typos.
+
+ case $ac_dashdash$ac_option in
+ --)
+ ac_dashdash=yes ;;
+
+ -bindir | --bindir | --bindi | --bind | --bin | --bi)
+ ac_prev=bindir ;;
+ -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
+ bindir=$ac_optarg ;;
+
+ -build | --build | --buil | --bui | --bu)
+ ac_prev=build_alias ;;
+ -build=* | --build=* | --buil=* | --bui=* | --bu=*)
+ build_alias=$ac_optarg ;;
+
+ -cache-file | --cache-file | --cache-fil | --cache-fi \
+ | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
+ ac_prev=cache_file ;;
+ -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
+ | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
+ cache_file=$ac_optarg ;;
+
+ --config-cache | -C)
+ cache_file=config.cache ;;
+
+ -datadir | --datadir | --datadi | --datad)
+ ac_prev=datadir ;;
+ -datadir=* | --datadir=* | --datadi=* | --datad=*)
+ datadir=$ac_optarg ;;
+
+ -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
+ | --dataroo | --dataro | --datar)
+ ac_prev=datarootdir ;;
+ -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
+ | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
+ datarootdir=$ac_optarg ;;
+
+ -disable-* | --disable-*)
+ ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
+ # Reject names that are not valid shell variable names.
+ expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
+ as_fn_error $? "invalid feature name: $ac_useropt"
+ ac_useropt_orig=$ac_useropt
+ ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
+ case $ac_user_opts in
+ *"
+"enable_$ac_useropt"
+"*) ;;
+ *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
+ ac_unrecognized_sep=', ';;
+ esac
+ eval enable_$ac_useropt=no ;;
+
+ -docdir | --docdir | --docdi | --doc | --do)
+ ac_prev=docdir ;;
+ -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
+ docdir=$ac_optarg ;;
+
+ -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
+ ac_prev=dvidir ;;
+ -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
+ dvidir=$ac_optarg ;;
+
+ -enable-* | --enable-*)
+ ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
+ # Reject names that are not valid shell variable names.
+ expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
+ as_fn_error $? "invalid feature name: $ac_useropt"
+ ac_useropt_orig=$ac_useropt
+ ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
+ case $ac_user_opts in
+ *"
+"enable_$ac_useropt"
+"*) ;;
+ *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
+ ac_unrecognized_sep=', ';;
+ esac
+ eval enable_$ac_useropt=\$ac_optarg ;;
+
+ -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
+ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
+ | --exec | --exe | --ex)
+ ac_prev=exec_prefix ;;
+ -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
+ | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
+ | --exec=* | --exe=* | --ex=*)
+ exec_prefix=$ac_optarg ;;
+
+ -gas | --gas | --ga | --g)
+ # Obsolete; use --with-gas.
+ with_gas=yes ;;
+
+ -help | --help | --hel | --he | -h)
+ ac_init_help=long ;;
+ -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
+ ac_init_help=recursive ;;
+ -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
+ ac_init_help=short ;;
+
+ -host | --host | --hos | --ho)
+ ac_prev=host_alias ;;
+ -host=* | --host=* | --hos=* | --ho=*)
+ host_alias=$ac_optarg ;;
+
+ -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
+ ac_prev=htmldir ;;
+ -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
+ | --ht=*)
+ htmldir=$ac_optarg ;;
+
+ -includedir | --includedir | --includedi | --included | --include \
+ | --includ | --inclu | --incl | --inc)
+ ac_prev=includedir ;;
+ -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
+ | --includ=* | --inclu=* | --incl=* | --inc=*)
+ includedir=$ac_optarg ;;
+
+ -infodir | --infodir | --infodi | --infod | --info | --inf)
+ ac_prev=infodir ;;
+ -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
+ infodir=$ac_optarg ;;
+
+ -libdir | --libdir | --libdi | --libd)
+ ac_prev=libdir ;;
+ -libdir=* | --libdir=* | --libdi=* | --libd=*)
+ libdir=$ac_optarg ;;
+
+ -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
+ | --libexe | --libex | --libe)
+ ac_prev=libexecdir ;;
+ -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
+ | --libexe=* | --libex=* | --libe=*)
+ libexecdir=$ac_optarg ;;
+
+ -localedir | --localedir | --localedi | --localed | --locale)
+ ac_prev=localedir ;;
+ -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
+ localedir=$ac_optarg ;;
+
+ -localstatedir | --localstatedir | --localstatedi | --localstated \
+ | --localstate | --localstat | --localsta | --localst | --locals)
+ ac_prev=localstatedir ;;
+ -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
+ | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
+ localstatedir=$ac_optarg ;;
+
+ -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
+ ac_prev=mandir ;;
+ -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
+ mandir=$ac_optarg ;;
+
+ -nfp | --nfp | --nf)
+ # Obsolete; use --without-fp.
+ with_fp=no ;;
+
+ -no-create | --no-create | --no-creat | --no-crea | --no-cre \
+ | --no-cr | --no-c | -n)
+ no_create=yes ;;
+
+ -no-recursion | --no-recursion | --no-recursio | --no-recursi \
+ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
+ no_recursion=yes ;;
+
+ -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
+ | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
+ | --oldin | --oldi | --old | --ol | --o)
+ ac_prev=oldincludedir ;;
+ -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
+ | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
+ | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
+ oldincludedir=$ac_optarg ;;
+
+ -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
+ ac_prev=prefix ;;
+ -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
+ prefix=$ac_optarg ;;
+
+ -program-prefix | --program-prefix | --program-prefi | --program-pref \
+ | --program-pre | --program-pr | --program-p)
+ ac_prev=program_prefix ;;
+ -program-prefix=* | --program-prefix=* | --program-prefi=* \
+ | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
+ program_prefix=$ac_optarg ;;
+
+ -program-suffix | --program-suffix | --program-suffi | --program-suff \
+ | --program-suf | --program-su | --program-s)
+ ac_prev=program_suffix ;;
+ -program-suffix=* | --program-suffix=* | --program-suffi=* \
+ | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
+ program_suffix=$ac_optarg ;;
+
+ -program-transform-name | --program-transform-name \
+ | --program-transform-nam | --program-transform-na \
+ | --program-transform-n | --program-transform- \
+ | --program-transform | --program-transfor \
+ | --program-transfo | --program-transf \
+ | --program-trans | --program-tran \
+ | --progr-tra | --program-tr | --program-t)
+ ac_prev=program_transform_name ;;
+ -program-transform-name=* | --program-transform-name=* \
+ | --program-transform-nam=* | --program-transform-na=* \
+ | --program-transform-n=* | --program-transform-=* \
+ | --program-transform=* | --program-transfor=* \
+ | --program-transfo=* | --program-transf=* \
+ | --program-trans=* | --program-tran=* \
+ | --progr-tra=* | --program-tr=* | --program-t=*)
+ program_transform_name=$ac_optarg ;;
+
+ -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
+ ac_prev=pdfdir ;;
+ -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
+ pdfdir=$ac_optarg ;;
+
+ -psdir | --psdir | --psdi | --psd | --ps)
+ ac_prev=psdir ;;
+ -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
+ psdir=$ac_optarg ;;
+
+ -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+ | -silent | --silent | --silen | --sile | --sil)
+ silent=yes ;;
+
+ -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
+ ac_prev=sbindir ;;
+ -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
+ | --sbi=* | --sb=*)
+ sbindir=$ac_optarg ;;
+
+ -sharedstatedir | --sharedstatedir | --sharedstatedi \
+ | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
+ | --sharedst | --shareds | --shared | --share | --shar \
+ | --sha | --sh)
+ ac_prev=sharedstatedir ;;
+ -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
+ | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
+ | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
+ | --sha=* | --sh=*)
+ sharedstatedir=$ac_optarg ;;
+
+ -site | --site | --sit)
+ ac_prev=site ;;
+ -site=* | --site=* | --sit=*)
+ site=$ac_optarg ;;
+
+ -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
+ ac_prev=srcdir ;;
+ -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
+ srcdir=$ac_optarg ;;
+
+ -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
+ | --syscon | --sysco | --sysc | --sys | --sy)
+ ac_prev=sysconfdir ;;
+ -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
+ | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
+ sysconfdir=$ac_optarg ;;
+
+ -target | --target | --targe | --targ | --tar | --ta | --t)
+ ac_prev=target_alias ;;
+ -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
+ target_alias=$ac_optarg ;;
+
+ -v | -verbose | --verbose | --verbos | --verbo | --verb)
+ verbose=yes ;;
+
+ -version | --version | --versio | --versi | --vers | -V)
+ ac_init_version=: ;;
+
+ -with-* | --with-*)
+ ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
+ # Reject names that are not valid shell variable names.
+ expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
+ as_fn_error $? "invalid package name: $ac_useropt"
+ ac_useropt_orig=$ac_useropt
+ ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
+ case $ac_user_opts in
+ *"
+"with_$ac_useropt"
+"*) ;;
+ *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
+ ac_unrecognized_sep=', ';;
+ esac
+ eval with_$ac_useropt=\$ac_optarg ;;
+
+ -without-* | --without-*)
+ ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
+ # Reject names that are not valid shell variable names.
+ expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
+ as_fn_error $? "invalid package name: $ac_useropt"
+ ac_useropt_orig=$ac_useropt
+ ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
+ case $ac_user_opts in
+ *"
+"with_$ac_useropt"
+"*) ;;
+ *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
+ ac_unrecognized_sep=', ';;
+ esac
+ eval with_$ac_useropt=no ;;
+
+ --x)
+ # Obsolete; use --with-x.
+ with_x=yes ;;
+
+ -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
+ | --x-incl | --x-inc | --x-in | --x-i)
+ ac_prev=x_includes ;;
+ -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
+ | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
+ x_includes=$ac_optarg ;;
+
+ -x-libraries | --x-libraries | --x-librarie | --x-librari \
+ | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
+ ac_prev=x_libraries ;;
+ -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
+ | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
+ x_libraries=$ac_optarg ;;
+
+ -*) as_fn_error $? "unrecognized option: \`$ac_option'
+Try \`$0 --help' for more information"
+ ;;
+
+ *=*)
+ ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
+ # Reject names that are not valid shell variable names.
+ case $ac_envvar in #(
+ '' | [0-9]* | *[!_$as_cr_alnum]* )
+ as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
+ esac
+ eval $ac_envvar=\$ac_optarg
+ export $ac_envvar ;;
+
+ *)
+ # FIXME: should be removed in autoconf 3.0.
+ $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
+ expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
+ $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
+ : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
+ ;;
+
+ esac
+done
+
+if test -n "$ac_prev"; then
+ ac_option=--`echo $ac_prev | sed 's/_/-/g'`
+ as_fn_error $? "missing argument to $ac_option"
+fi
+
+if test -n "$ac_unrecognized_opts"; then
+ case $enable_option_checking in
+ no) ;;
+ fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
+ *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
+ esac
+fi
+
+# Check all directory arguments for consistency.
+for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
+ datadir sysconfdir sharedstatedir localstatedir includedir \
+ oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
+ libdir localedir mandir
+do
+ eval ac_val=\$$ac_var
+ # Remove trailing slashes.
+ case $ac_val in
+ */ )
+ ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
+ eval $ac_var=\$ac_val;;
+ esac
+ # Be sure to have absolute directory names.
+ case $ac_val in
+ [\\/$]* | ?:[\\/]* ) continue;;
+ NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
+ esac
+ as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
+done
+
+# There might be people who depend on the old broken behavior: `$host'
+# used to hold the argument of --host etc.
+# FIXME: To remove some day.
+build=$build_alias
+host=$host_alias
+target=$target_alias
+
+# FIXME: To remove some day.
+if test "x$host_alias" != x; then
+ if test "x$build_alias" = x; then
+ cross_compiling=maybe
+ $as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host.
+ If a cross compiler is detected then cross compile mode will be used" >&2
+ elif test "x$build_alias" != "x$host_alias"; then
+ cross_compiling=yes
+ fi
+fi
+
+ac_tool_prefix=
+test -n "$host_alias" && ac_tool_prefix=$host_alias-
+
+test "$silent" = yes && exec 6>/dev/null
+
+
+ac_pwd=`pwd` && test -n "$ac_pwd" &&
+ac_ls_di=`ls -di .` &&
+ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
+ as_fn_error $? "working directory cannot be determined"
+test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
+ as_fn_error $? "pwd does not report name of working directory"
+
+
+# Find the source files, if location was not specified.
+if test -z "$srcdir"; then
+ ac_srcdir_defaulted=yes
+ # Try the directory containing this script, then the parent directory.
+ ac_confdir=`$as_dirname -- "$as_myself" ||
+$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$as_myself" : 'X\(//\)[^/]' \| \
+ X"$as_myself" : 'X\(//\)$' \| \
+ X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$as_myself" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)[^/].*/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+ srcdir=$ac_confdir
+ if test ! -r "$srcdir/$ac_unique_file"; then
+ srcdir=..
+ fi
+else
+ ac_srcdir_defaulted=no
+fi
+if test ! -r "$srcdir/$ac_unique_file"; then
+ test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
+ as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
+fi
+ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
+ac_abs_confdir=`(
+ cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
+ pwd)`
+# When building in place, set srcdir=.
+if test "$ac_abs_confdir" = "$ac_pwd"; then
+ srcdir=.
+fi
+# Remove unnecessary trailing slashes from srcdir.
+# Double slashes in file names in object file debugging info
+# mess up M-x gdb in Emacs.
+case $srcdir in
+*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
+esac
+for ac_var in $ac_precious_vars; do
+ eval ac_env_${ac_var}_set=\${${ac_var}+set}
+ eval ac_env_${ac_var}_value=\$${ac_var}
+ eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
+ eval ac_cv_env_${ac_var}_value=\$${ac_var}
+done
+
+#
+# Report the --help message.
+#
+if test "$ac_init_help" = "long"; then
+ # Omit some internal or obsolete options to make the list less imposing.
+ # This message is too long to be a string in the A/UX 3.1 sh.
+ cat <<_ACEOF
+\`configure' configures newlib 2.4.0 to adapt to many kinds of systems.
+
+Usage: $0 [OPTION]... [VAR=VALUE]...
+
+To assign environment variables (e.g., CC, CFLAGS...), specify them as
+VAR=VALUE. See below for descriptions of some of the useful variables.
+
+Defaults for the options are specified in brackets.
+
+Configuration:
+ -h, --help display this help and exit
+ --help=short display options specific to this package
+ --help=recursive display the short help of all the included packages
+ -V, --version display version information and exit
+ -q, --quiet, --silent do not print \`checking ...' messages
+ --cache-file=FILE cache test results in FILE [disabled]
+ -C, --config-cache alias for \`--cache-file=config.cache'
+ -n, --no-create do not create output files
+ --srcdir=DIR find the sources in DIR [configure dir or \`..']
+
+Installation directories:
+ --prefix=PREFIX install architecture-independent files in PREFIX
+ [$ac_default_prefix]
+ --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
+ [PREFIX]
+
+By default, \`make install' will install all the files in
+\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
+an installation prefix other than \`$ac_default_prefix' using \`--prefix',
+for instance \`--prefix=\$HOME'.
+
+For better control, use the options below.
+
+Fine tuning of the installation directories:
+ --bindir=DIR user executables [EPREFIX/bin]
+ --sbindir=DIR system admin executables [EPREFIX/sbin]
+ --libexecdir=DIR program executables [EPREFIX/libexec]
+ --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
+ --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
+ --localstatedir=DIR modifiable single-machine data [PREFIX/var]
+ --libdir=DIR object code libraries [EPREFIX/lib]
+ --includedir=DIR C header files [PREFIX/include]
+ --oldincludedir=DIR C header files for non-gcc [/usr/include]
+ --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
+ --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
+ --infodir=DIR info documentation [DATAROOTDIR/info]
+ --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
+ --mandir=DIR man documentation [DATAROOTDIR/man]
+ --docdir=DIR documentation root [DATAROOTDIR/doc/newlib]
+ --htmldir=DIR html documentation [DOCDIR]
+ --dvidir=DIR dvi documentation [DOCDIR]
+ --pdfdir=DIR pdf documentation [DOCDIR]
+ --psdir=DIR ps documentation [DOCDIR]
+_ACEOF
+
+ cat <<\_ACEOF
+
+Program names:
+ --program-prefix=PREFIX prepend PREFIX to installed program names
+ --program-suffix=SUFFIX append SUFFIX to installed program names
+ --program-transform-name=PROGRAM run sed PROGRAM on installed program names
+
+System types:
+ --build=BUILD configure for building on BUILD [guessed]
+ --host=HOST cross-compile to build programs to run on HOST [BUILD]
+_ACEOF
+fi
+
+if test -n "$ac_init_help"; then
+ case $ac_init_help in
+ short | recursive ) echo "Configuration of newlib 2.4.0:";;
+ esac
+ cat <<\_ACEOF
+
+Optional Features:
+ --disable-option-checking ignore unrecognized --enable/--with options
+ --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
+ --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
+ --enable-multilib build many library versions (default)
+ --enable-target-optspace optimize for space
+ --enable-malloc-debugging indicate malloc debugging requested
+ --enable-newlib-multithread enable support for multiple threads
+ --enable-newlib-iconv enable iconv library support
+ --enable-newlib-elix-level supply desired elix library level (1-4)
+ --disable-newlib-io-float disable printf/scanf family float support
+ --disable-newlib-supplied-syscalls disable newlib from supplying syscalls
+ --disable-dependency-tracking speeds up one-time build
+ --enable-dependency-tracking do not reject slow dependency extractors
+ --enable-maintainer-mode enable make rules and dependencies not useful
+ (and sometimes confusing) to the casual installer
+
+Some influential environment variables:
+ CCAS assembler compiler command (defaults to CC)
+ CCASFLAGS assembler compiler flags (defaults to CFLAGS)
+
+Use these variables to override the choices made by `configure' or to help
+it to find libraries and programs with nonstandard names/locations.
+
+Report bugs to the package provider.
+_ACEOF
+ac_status=$?
+fi
+
+if test "$ac_init_help" = "recursive"; then
+ # If there are subdirs, report their specific --help.
+ for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
+ test -d "$ac_dir" ||
+ { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
+ continue
+ ac_builddir=.
+
+case "$ac_dir" in
+.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
+*)
+ ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
+ # A ".." for each directory in $ac_dir_suffix.
+ ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
+ case $ac_top_builddir_sub in
+ "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
+ *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
+ esac ;;
+esac
+ac_abs_top_builddir=$ac_pwd
+ac_abs_builddir=$ac_pwd$ac_dir_suffix
+# for backward compatibility:
+ac_top_builddir=$ac_top_build_prefix
+
+case $srcdir in
+ .) # We are building in place.
+ ac_srcdir=.
+ ac_top_srcdir=$ac_top_builddir_sub
+ ac_abs_top_srcdir=$ac_pwd ;;
+ [\\/]* | ?:[\\/]* ) # Absolute name.
+ ac_srcdir=$srcdir$ac_dir_suffix;
+ ac_top_srcdir=$srcdir
+ ac_abs_top_srcdir=$srcdir ;;
+ *) # Relative name.
+ ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
+ ac_top_srcdir=$ac_top_build_prefix$srcdir
+ ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
+esac
+ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
+
+ cd "$ac_dir" || { ac_status=$?; continue; }
+ # Check for guested configure.
+ if test -f "$ac_srcdir/configure.gnu"; then
+ echo &&
+ $SHELL "$ac_srcdir/configure.gnu" --help=recursive
+ elif test -f "$ac_srcdir/configure"; then
+ echo &&
+ $SHELL "$ac_srcdir/configure" --help=recursive
+ else
+ $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
+ fi || ac_status=$?
+ cd "$ac_pwd" || { ac_status=$?; break; }
+ done
+fi
+
+test -n "$ac_init_help" && exit $ac_status
+if $ac_init_version; then
+ cat <<\_ACEOF
+newlib configure 2.4.0
+generated by GNU Autoconf 2.68
+
+Copyright (C) 2010 Free Software Foundation, Inc.
+This configure script is free software; the Free Software Foundation
+gives unlimited permission to copy, distribute and modify it.
+_ACEOF
+ exit
+fi
+
+## ------------------------ ##
+## Autoconf initialization. ##
+## ------------------------ ##
+
+# ac_fn_c_try_compile LINENO
+# --------------------------
+# Try to compile conftest.$ac_ext, and return whether this succeeded.
+ac_fn_c_try_compile ()
+{
+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ rm -f conftest.$ac_objext
+ if { { ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_compile") 2>conftest.err
+ ac_status=$?
+ if test -s conftest.err; then
+ grep -v '^ *+' conftest.err >conftest.er1
+ cat conftest.er1 >&5
+ mv -f conftest.er1 conftest.err
+ fi
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then :
+ ac_retval=0
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_retval=1
+fi
+ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+ as_fn_set_status $ac_retval
+
+} # ac_fn_c_try_compile
+cat >config.log <<_ACEOF
+This file contains any messages produced by compilers while
+running configure, to aid debugging if configure makes a mistake.
+
+It was created by newlib $as_me 2.4.0, which was
+generated by GNU Autoconf 2.68. Invocation command line was
+
+ $ $0 $@
+
+_ACEOF
+exec 5>>config.log
+{
+cat <<_ASUNAME
+## --------- ##
+## Platform. ##
+## --------- ##
+
+hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
+uname -m = `(uname -m) 2>/dev/null || echo unknown`
+uname -r = `(uname -r) 2>/dev/null || echo unknown`
+uname -s = `(uname -s) 2>/dev/null || echo unknown`
+uname -v = `(uname -v) 2>/dev/null || echo unknown`
+
+/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
+/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
+
+/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
+/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
+/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
+/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
+/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
+/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
+/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
+
+_ASUNAME
+
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ $as_echo "PATH: $as_dir"
+ done
+IFS=$as_save_IFS
+
+} >&5
+
+cat >&5 <<_ACEOF
+
+
+## ----------- ##
+## Core tests. ##
+## ----------- ##
+
+_ACEOF
+
+
+# Keep a trace of the command line.
+# Strip out --no-create and --no-recursion so they do not pile up.
+# Strip out --silent because we don't want to record it for future runs.
+# Also quote any args containing shell meta-characters.
+# Make two passes to allow for proper duplicate-argument suppression.
+ac_configure_args=
+ac_configure_args0=
+ac_configure_args1=
+ac_must_keep_next=false
+for ac_pass in 1 2
+do
+ for ac_arg
+ do
+ case $ac_arg in
+ -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
+ -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+ | -silent | --silent | --silen | --sile | --sil)
+ continue ;;
+ *\'*)
+ ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
+ esac
+ case $ac_pass in
+ 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
+ 2)
+ as_fn_append ac_configure_args1 " '$ac_arg'"
+ if test $ac_must_keep_next = true; then
+ ac_must_keep_next=false # Got value, back to normal.
+ else
+ case $ac_arg in
+ *=* | --config-cache | -C | -disable-* | --disable-* \
+ | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
+ | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
+ | -with-* | --with-* | -without-* | --without-* | --x)
+ case "$ac_configure_args0 " in
+ "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
+ esac
+ ;;
+ -* ) ac_must_keep_next=true ;;
+ esac
+ fi
+ as_fn_append ac_configure_args " '$ac_arg'"
+ ;;
+ esac
+ done
+done
+{ ac_configure_args0=; unset ac_configure_args0;}
+{ ac_configure_args1=; unset ac_configure_args1;}
+
+# When interrupted or exit'd, cleanup temporary files, and complete
+# config.log. We remove comments because anyway the quotes in there
+# would cause problems or look ugly.
+# WARNING: Use '\'' to represent an apostrophe within the trap.
+# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
+trap 'exit_status=$?
+ # Save into config.log some information that might help in debugging.
+ {
+ echo
+
+ $as_echo "## ---------------- ##
+## Cache variables. ##
+## ---------------- ##"
+ echo
+ # The following way of writing the cache mishandles newlines in values,
+(
+ for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
+ eval ac_val=\$$ac_var
+ case $ac_val in #(
+ *${as_nl}*)
+ case $ac_var in #(
+ *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
+$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
+ esac
+ case $ac_var in #(
+ _ | IFS | as_nl) ;; #(
+ BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
+ *) { eval $ac_var=; unset $ac_var;} ;;
+ esac ;;
+ esac
+ done
+ (set) 2>&1 |
+ case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
+ *${as_nl}ac_space=\ *)
+ sed -n \
+ "s/'\''/'\''\\\\'\'''\''/g;
+ s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
+ ;; #(
+ *)
+ sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
+ ;;
+ esac |
+ sort
+)
+ echo
+
+ $as_echo "## ----------------- ##
+## Output variables. ##
+## ----------------- ##"
+ echo
+ for ac_var in $ac_subst_vars
+ do
+ eval ac_val=\$$ac_var
+ case $ac_val in
+ *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
+ esac
+ $as_echo "$ac_var='\''$ac_val'\''"
+ done | sort
+ echo
+
+ if test -n "$ac_subst_files"; then
+ $as_echo "## ------------------- ##
+## File substitutions. ##
+## ------------------- ##"
+ echo
+ for ac_var in $ac_subst_files
+ do
+ eval ac_val=\$$ac_var
+ case $ac_val in
+ *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
+ esac
+ $as_echo "$ac_var='\''$ac_val'\''"
+ done | sort
+ echo
+ fi
+
+ if test -s confdefs.h; then
+ $as_echo "## ----------- ##
+## confdefs.h. ##
+## ----------- ##"
+ echo
+ cat confdefs.h
+ echo
+ fi
+ test "$ac_signal" != 0 &&
+ $as_echo "$as_me: caught signal $ac_signal"
+ $as_echo "$as_me: exit $exit_status"
+ } >&5
+ rm -f core *.core core.conftest.* &&
+ rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
+ exit $exit_status
+' 0
+for ac_signal in 1 2 13 15; do
+ trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
+done
+ac_signal=0
+
+# confdefs.h avoids OS command line length limits that DEFS can exceed.
+rm -f -r conftest* confdefs.h
+
+$as_echo "/* confdefs.h */" > confdefs.h
+
+# Predefined preprocessor variables.
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_NAME "$PACKAGE_NAME"
+_ACEOF
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
+_ACEOF
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_VERSION "$PACKAGE_VERSION"
+_ACEOF
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_STRING "$PACKAGE_STRING"
+_ACEOF
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
+_ACEOF
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_URL "$PACKAGE_URL"
+_ACEOF
+
+
+# Let the site file select an alternate cache file if it wants to.
+# Prefer an explicitly selected file to automatically selected ones.
+ac_site_file1=NONE
+ac_site_file2=NONE
+if test -n "$CONFIG_SITE"; then
+ # We do not want a PATH search for config.site.
+ case $CONFIG_SITE in #((
+ -*) ac_site_file1=./$CONFIG_SITE;;
+ */*) ac_site_file1=$CONFIG_SITE;;
+ *) ac_site_file1=./$CONFIG_SITE;;
+ esac
+elif test "x$prefix" != xNONE; then
+ ac_site_file1=$prefix/share/config.site
+ ac_site_file2=$prefix/etc/config.site
+else
+ ac_site_file1=$ac_default_prefix/share/config.site
+ ac_site_file2=$ac_default_prefix/etc/config.site
+fi
+for ac_site_file in "$ac_site_file1" "$ac_site_file2"
+do
+ test "x$ac_site_file" = xNONE && continue
+ if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
+$as_echo "$as_me: loading site script $ac_site_file" >&6;}
+ sed 's/^/| /' "$ac_site_file" >&5
+ . "$ac_site_file" \
+ || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "failed to load site script $ac_site_file
+See \`config.log' for more details" "$LINENO" 5; }
+ fi
+done
+
+if test -r "$cache_file"; then
+ # Some versions of bash will fail to source /dev/null (special files
+ # actually), so we avoid doing that. DJGPP emulates it as a regular file.
+ if test /dev/null != "$cache_file" && test -f "$cache_file"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
+$as_echo "$as_me: loading cache $cache_file" >&6;}
+ case $cache_file in
+ [\\/]* | ?:[\\/]* ) . "$cache_file";;
+ *) . "./$cache_file";;
+ esac
+ fi
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
+$as_echo "$as_me: creating cache $cache_file" >&6;}
+ >$cache_file
+fi
+
+# Check that the precious variables saved in the cache have kept the same
+# value.
+ac_cache_corrupted=false
+for ac_var in $ac_precious_vars; do
+ eval ac_old_set=\$ac_cv_env_${ac_var}_set
+ eval ac_new_set=\$ac_env_${ac_var}_set
+ eval ac_old_val=\$ac_cv_env_${ac_var}_value
+ eval ac_new_val=\$ac_env_${ac_var}_value
+ case $ac_old_set,$ac_new_set in
+ set,)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
+$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
+ ac_cache_corrupted=: ;;
+ ,set)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
+$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
+ ac_cache_corrupted=: ;;
+ ,);;
+ *)
+ if test "x$ac_old_val" != "x$ac_new_val"; then
+ # differences in whitespace do not lead to failure.
+ ac_old_val_w=`echo x $ac_old_val`
+ ac_new_val_w=`echo x $ac_new_val`
+ if test "$ac_old_val_w" != "$ac_new_val_w"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
+$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
+ ac_cache_corrupted=:
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
+$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
+ eval $ac_var=\$ac_old_val
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
+$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
+$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
+ fi;;
+ esac
+ # Pass precious variables to config.status.
+ if test "$ac_new_set" = set; then
+ case $ac_new_val in
+ *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
+ *) ac_arg=$ac_var=$ac_new_val ;;
+ esac
+ case " $ac_configure_args " in
+ *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
+ *) as_fn_append ac_configure_args " '$ac_arg'" ;;
+ esac
+ fi
+done
+if $ac_cache_corrupted; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
+$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
+ as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
+fi
+## -------------------- ##
+## Main body of script. ##
+## -------------------- ##
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+
+
+ac_aux_dir=
+for ac_dir in ../../../../../.. "$srcdir"/../../../../../..; do
+ if test -f "$ac_dir/install-sh"; then
+ ac_aux_dir=$ac_dir
+ ac_install_sh="$ac_aux_dir/install-sh -c"
+ break
+ elif test -f "$ac_dir/install.sh"; then
+ ac_aux_dir=$ac_dir
+ ac_install_sh="$ac_aux_dir/install.sh -c"
+ break
+ elif test -f "$ac_dir/shtool"; then
+ ac_aux_dir=$ac_dir
+ ac_install_sh="$ac_aux_dir/shtool install -c"
+ break
+ fi
+done
+if test -z "$ac_aux_dir"; then
+ as_fn_error $? "cannot find install-sh, install.sh, or shtool in ../../../../../.. \"$srcdir\"/../../../../../.." "$LINENO" 5
+fi
+
+# These three variables are undocumented and unsupported,
+# and are intended to be withdrawn in a future Autoconf release.
+# They can cause serious problems if a builder's source tree is in a directory
+# whose full name contains unusual characters.
+ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
+ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
+ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
+
+
+
+
+# Make sure we can run config.sub.
+$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
+ as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
+$as_echo_n "checking build system type... " >&6; }
+if ${ac_cv_build+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_build_alias=$build_alias
+test "x$ac_build_alias" = x &&
+ ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
+test "x$ac_build_alias" = x &&
+ as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
+ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
+ as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
+$as_echo "$ac_cv_build" >&6; }
+case $ac_cv_build in
+*-*-*) ;;
+*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
+esac
+build=$ac_cv_build
+ac_save_IFS=$IFS; IFS='-'
+set x $ac_cv_build
+shift
+build_cpu=$1
+build_vendor=$2
+shift; shift
+# Remember, the first character of IFS is used to create $*,
+# except with old shells:
+build_os=$*
+IFS=$ac_save_IFS
+case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
+$as_echo_n "checking host system type... " >&6; }
+if ${ac_cv_host+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test "x$host_alias" = x; then
+ ac_cv_host=$ac_cv_build
+else
+ ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
+ as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
+$as_echo "$ac_cv_host" >&6; }
+case $ac_cv_host in
+*-*-*) ;;
+*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
+esac
+host=$ac_cv_host
+ac_save_IFS=$IFS; IFS='-'
+set x $ac_cv_host
+shift
+host_cpu=$1
+host_vendor=$2
+shift; shift
+# Remember, the first character of IFS is used to create $*,
+# except with old shells:
+host_os=$*
+IFS=$ac_save_IFS
+case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
+
+
+am__api_version='1.11'
+
+# Find a good install program. We prefer a C program (faster),
+# so one script is as good as another. But avoid the broken or
+# incompatible versions:
+# SysV /etc/install, /usr/sbin/install
+# SunOS /usr/etc/install
+# IRIX /sbin/install
+# AIX /bin/install
+# AmigaOS /C/install, which installs bootblocks on floppy discs
+# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
+# AFS /usr/afsws/bin/install, which mishandles nonexistent args
+# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
+# OS/2's system install, which has a completely different semantic
+# ./install, which can be erroneously created by make from ./install.sh.
+# Reject install programs that cannot install multiple files.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
+$as_echo_n "checking for a BSD-compatible install... " >&6; }
+if test -z "$INSTALL"; then
+if ${ac_cv_path_install+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ # Account for people who put trailing slashes in PATH elements.
+case $as_dir/ in #((
+ ./ | .// | /[cC]/* | \
+ /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
+ ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
+ /usr/ucb/* ) ;;
+ *)
+ # OSF1 and SCO ODT 3.0 have their own names for install.
+ # Don't use installbsd from OSF since it installs stuff as root
+ # by default.
+ for ac_prog in ginstall scoinst install; do
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
+ if test $ac_prog = install &&
+ grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
+ # AIX install. It has an incompatible calling convention.
+ :
+ elif test $ac_prog = install &&
+ grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
+ # program-specific install script used by HP pwplus--don't use.
+ :
+ else
+ rm -rf conftest.one conftest.two conftest.dir
+ echo one > conftest.one
+ echo two > conftest.two
+ mkdir conftest.dir
+ if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
+ test -s conftest.one && test -s conftest.two &&
+ test -s conftest.dir/conftest.one &&
+ test -s conftest.dir/conftest.two
+ then
+ ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
+ break 3
+ fi
+ fi
+ fi
+ done
+ done
+ ;;
+esac
+
+ done
+IFS=$as_save_IFS
+
+rm -rf conftest.one conftest.two conftest.dir
+
+fi
+ if test "${ac_cv_path_install+set}" = set; then
+ INSTALL=$ac_cv_path_install
+ else
+ # As a last resort, use the slow shell script. Don't cache a
+ # value for INSTALL within a source directory, because that will
+ # break other packages using the cache if that directory is
+ # removed, or if the value is a relative name.
+ INSTALL=$ac_install_sh
+ fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
+$as_echo "$INSTALL" >&6; }
+
+# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
+# It thinks the first close brace ends the variable substitution.
+test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
+
+test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
+
+test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5
+$as_echo_n "checking whether build environment is sane... " >&6; }
+# Just in case
+sleep 1
+echo timestamp > conftest.file
+# Reject unsafe characters in $srcdir or the absolute working directory
+# name. Accept space and tab only in the latter.
+am_lf='
+'
+case `pwd` in
+ *[\\\"\#\$\&\'\`$am_lf]*)
+ as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5;;
+esac
+case $srcdir in
+ *[\\\"\#\$\&\'\`$am_lf\ \ ]*)
+ as_fn_error $? "unsafe srcdir value: \`$srcdir'" "$LINENO" 5;;
+esac
+
+# Do `set' in a subshell so we don't clobber the current shell's
+# arguments. Must try -L first in case configure is actually a
+# symlink; some systems play weird games with the mod time of symlinks
+# (eg FreeBSD returns the mod time of the symlink's containing
+# directory).
+if (
+ set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
+ if test "$*" = "X"; then
+ # -L didn't work.
+ set X `ls -t "$srcdir/configure" conftest.file`
+ fi
+ rm -f conftest.file
+ if test "$*" != "X $srcdir/configure conftest.file" \
+ && test "$*" != "X conftest.file $srcdir/configure"; then
+
+ # If neither matched, then we have a broken ls. This can happen
+ # if, for instance, CONFIG_SHELL is bash and it inherits a
+ # broken ls alias from the environment. This has actually
+ # happened. Such a system could not be considered "sane".
+ as_fn_error $? "ls -t appears to fail. Make sure there is not a broken
+alias in your environment" "$LINENO" 5
+ fi
+
+ test "$2" = conftest.file
+ )
+then
+ # Ok.
+ :
+else
+ as_fn_error $? "newly created file is older than distributed files!
+Check your system clock" "$LINENO" 5
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+test "$program_prefix" != NONE &&
+ program_transform_name="s&^&$program_prefix&;$program_transform_name"
+# Use a double $ so make ignores it.
+test "$program_suffix" != NONE &&
+ program_transform_name="s&\$&$program_suffix&;$program_transform_name"
+# Double any \ or $.
+# By default was `s,x,x', remove it if useless.
+ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
+program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"`
+
+# expand $ac_aux_dir to an absolute path
+am_aux_dir=`cd $ac_aux_dir && pwd`
+
+if test x"${MISSING+set}" != xset; then
+ case $am_aux_dir in
+ *\ * | *\ *)
+ MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
+ *)
+ MISSING="\${SHELL} $am_aux_dir/missing" ;;
+ esac
+fi
+# Use eval to expand $SHELL
+if eval "$MISSING --run true"; then
+ am_missing_run="$MISSING --run "
+else
+ am_missing_run=
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`missing' script is too old or missing" >&5
+$as_echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;}
+fi
+
+if test x"${install_sh}" != xset; then
+ case $am_aux_dir in
+ *\ * | *\ *)
+ install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
+ *)
+ install_sh="\${SHELL} $am_aux_dir/install-sh"
+ esac
+fi
+
+# Installed binaries are usually stripped using `strip' when the user
+# run `make install-strip'. However `strip' might not be the right
+# tool to use in cross-compilation environments, therefore Automake
+# will honor the `STRIP' environment variable to overrule this program.
+if test "$cross_compiling" != no; then
+ if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
+set dummy ${ac_tool_prefix}strip; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_STRIP+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$STRIP"; then
+ ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_STRIP="${ac_tool_prefix}strip"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+STRIP=$ac_cv_prog_STRIP
+if test -n "$STRIP"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
+$as_echo "$STRIP" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_STRIP"; then
+ ac_ct_STRIP=$STRIP
+ # Extract the first word of "strip", so it can be a program name with args.
+set dummy strip; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_ct_STRIP"; then
+ ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_ac_ct_STRIP="strip"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
+if test -n "$ac_ct_STRIP"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
+$as_echo "$ac_ct_STRIP" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+ if test "x$ac_ct_STRIP" = x; then
+ STRIP=":"
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ STRIP=$ac_ct_STRIP
+ fi
+else
+ STRIP="$ac_cv_prog_STRIP"
+fi
+
+fi
+INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
+$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
+if test -z "$MKDIR_P"; then
+ if ${ac_cv_path_mkdir+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_prog in mkdir gmkdir; do
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; } || continue
+ case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
+ 'mkdir (GNU coreutils) '* | \
+ 'mkdir (coreutils) '* | \
+ 'mkdir (fileutils) '4.1*)
+ ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
+ break 3;;
+ esac
+ done
+ done
+ done
+IFS=$as_save_IFS
+
+fi
+
+ test -d ./--version && rmdir ./--version
+ if test "${ac_cv_path_mkdir+set}" = set; then
+ MKDIR_P="$ac_cv_path_mkdir -p"
+ else
+ # As a last resort, use the slow shell script. Don't cache a
+ # value for MKDIR_P within a source directory, because that will
+ # break other packages using the cache if that directory is
+ # removed, or if the value is a relative name.
+ MKDIR_P="$ac_install_sh -d"
+ fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
+$as_echo "$MKDIR_P" >&6; }
+
+mkdir_p="$MKDIR_P"
+case $mkdir_p in
+ [\\/$]* | ?:[\\/]*) ;;
+ */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
+esac
+
+for ac_prog in gawk mawk nawk awk
+do
+ # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_AWK+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$AWK"; then
+ ac_cv_prog_AWK="$AWK" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_AWK="$ac_prog"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+AWK=$ac_cv_prog_AWK
+if test -n "$AWK"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
+$as_echo "$AWK" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+ test -n "$AWK" && break
+done
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
+$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
+set x ${MAKE-make}
+ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
+if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat >conftest.make <<\_ACEOF
+SHELL = /bin/sh
+all:
+ @echo '@@@%%%=$(MAKE)=@@@%%%'
+_ACEOF
+# GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
+case `${MAKE-make} -f conftest.make 2>/dev/null` in
+ *@@@%%%=?*=@@@%%%*)
+ eval ac_cv_prog_make_${ac_make}_set=yes;;
+ *)
+ eval ac_cv_prog_make_${ac_make}_set=no;;
+esac
+rm -f conftest.make
+fi
+if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+ SET_MAKE=
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+ SET_MAKE="MAKE=${MAKE-make}"
+fi
+
+rm -rf .tst 2>/dev/null
+mkdir .tst 2>/dev/null
+if test -d .tst; then
+ am__leading_dot=.
+else
+ am__leading_dot=_
+fi
+rmdir .tst 2>/dev/null
+
+DEPDIR="${am__leading_dot}deps"
+
+ac_config_commands="$ac_config_commands depfiles"
+
+
+am_make=${MAKE-make}
+cat > confinc << 'END'
+am__doit:
+ @echo this is the am__doit target
+.PHONY: am__doit
+END
+# If we don't find an include directive, just comment out the code.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5
+$as_echo_n "checking for style of include used by $am_make... " >&6; }
+am__include="#"
+am__quote=
+_am_result=none
+# First try GNU make style include.
+echo "include confinc" > confmf
+# Ignore all kinds of additional output from `make'.
+case `$am_make -s -f confmf 2> /dev/null` in #(
+*the\ am__doit\ target*)
+ am__include=include
+ am__quote=
+ _am_result=GNU
+ ;;
+esac
+# Now try BSD make style include.
+if test "$am__include" = "#"; then
+ echo '.include "confinc"' > confmf
+ case `$am_make -s -f confmf 2> /dev/null` in #(
+ *the\ am__doit\ target*)
+ am__include=.include
+ am__quote="\""
+ _am_result=BSD
+ ;;
+ esac
+fi
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5
+$as_echo "$_am_result" >&6; }
+rm -f confinc confmf
+
+# Check whether --enable-dependency-tracking was given.
+if test "${enable_dependency_tracking+set}" = set; then :
+ enableval=$enable_dependency_tracking;
+fi
+
+if test "x$enable_dependency_tracking" != xno; then
+ am_depcomp="$ac_aux_dir/depcomp"
+ AMDEPBACKSLASH='\'
+ am__nodep='_no'
+fi
+ if test "x$enable_dependency_tracking" != xno; then
+ AMDEP_TRUE=
+ AMDEP_FALSE='#'
+else
+ AMDEP_TRUE='#'
+ AMDEP_FALSE=
+fi
+
+
+
+# Check whether --enable-multilib was given.
+if test "${enable_multilib+set}" = set; then :
+ enableval=$enable_multilib; case "${enableval}" in
+ yes) multilib=yes ;;
+ no) multilib=no ;;
+ *) as_fn_error $? "bad value ${enableval} for multilib option" "$LINENO" 5 ;;
+ esac
+else
+ multilib=yes
+fi
+
+# Check whether --enable-target-optspace was given.
+if test "${enable_target_optspace+set}" = set; then :
+ enableval=$enable_target_optspace; case "${enableval}" in
+ yes) target_optspace=yes ;;
+ no) target_optspace=no ;;
+ *) as_fn_error $? "bad value ${enableval} for target-optspace option" "$LINENO" 5 ;;
+ esac
+else
+ target_optspace=
+fi
+
+# Check whether --enable-malloc-debugging was given.
+if test "${enable_malloc_debugging+set}" = set; then :
+ enableval=$enable_malloc_debugging; case "${enableval}" in
+ yes) malloc_debugging=yes ;;
+ no) malloc_debugging=no ;;
+ *) as_fn_error $? "bad value ${enableval} for malloc-debugging option" "$LINENO" 5 ;;
+ esac
+else
+ malloc_debugging=
+fi
+
+# Check whether --enable-newlib-multithread was given.
+if test "${enable_newlib_multithread+set}" = set; then :
+ enableval=$enable_newlib_multithread; case "${enableval}" in
+ yes) newlib_multithread=yes ;;
+ no) newlib_multithread=no ;;
+ *) as_fn_error $? "bad value ${enableval} for newlib-multithread option" "$LINENO" 5 ;;
+ esac
+else
+ newlib_multithread=yes
+fi
+
+# Check whether --enable-newlib-iconv was given.
+if test "${enable_newlib_iconv+set}" = set; then :
+ enableval=$enable_newlib_iconv; if test "${newlib_iconv+set}" != set; then
+ case "${enableval}" in
+ yes) newlib_iconv=yes ;;
+ no) newlib_iconv=no ;;
+ *) as_fn_error $? "bad value ${enableval} for newlib-iconv option" "$LINENO" 5 ;;
+ esac
+ fi
+else
+ newlib_iconv=${newlib_iconv}
+fi
+
+# Check whether --enable-newlib-elix-level was given.
+if test "${enable_newlib_elix_level+set}" = set; then :
+ enableval=$enable_newlib_elix_level; case "${enableval}" in
+ 0) newlib_elix_level=0 ;;
+ 1) newlib_elix_level=1 ;;
+ 2) newlib_elix_level=2 ;;
+ 3) newlib_elix_level=3 ;;
+ 4) newlib_elix_level=4 ;;
+ *) as_fn_error $? "bad value ${enableval} for newlib-elix-level option" "$LINENO" 5 ;;
+ esac
+else
+ newlib_elix_level=0
+fi
+
+# Check whether --enable-newlib-io-float was given.
+if test "${enable_newlib_io_float+set}" = set; then :
+ enableval=$enable_newlib_io_float; case "${enableval}" in
+ yes) newlib_io_float=yes ;;
+ no) newlib_io_float=no ;;
+ *) as_fn_error $? "bad value ${enableval} for newlib-io-float option" "$LINENO" 5 ;;
+ esac
+else
+ newlib_io_float=yes
+fi
+
+# Check whether --enable-newlib-supplied-syscalls was given.
+if test "${enable_newlib_supplied_syscalls+set}" = set; then :
+ enableval=$enable_newlib_supplied_syscalls; case "${enableval}" in
+ yes) newlib_may_supply_syscalls=yes ;;
+ no) newlib_may_supply_syscalls=no ;;
+ *) as_fn_error $? "bad value ${enableval} for newlib-supplied-syscalls option" "$LINENO" 5 ;;
+ esac
+else
+ newlib_may_supply_syscalls=yes
+fi
+
+ if test x${newlib_may_supply_syscalls} = xyes; then
+ MAY_SUPPLY_SYSCALLS_TRUE=
+ MAY_SUPPLY_SYSCALLS_FALSE='#'
+else
+ MAY_SUPPLY_SYSCALLS_TRUE='#'
+ MAY_SUPPLY_SYSCALLS_FALSE=
+fi
+
+
+
+test -z "${with_target_subdir}" && with_target_subdir=.
+
+if test "${srcdir}" = "."; then
+ if test "${with_target_subdir}" != "."; then
+ newlib_basedir="${srcdir}/${with_multisrctop}../../../../../.."
+ else
+ newlib_basedir="${srcdir}/${with_multisrctop}../../../../.."
+ fi
+else
+ newlib_basedir="${srcdir}/../../../../.."
+fi
+
+
+
+
+if test "`cd $srcdir && pwd`" != "`pwd`"; then
+ # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
+ # is not polluted with repeated "-I."
+ am__isrc=' -I$(srcdir)'
+ # test to see if srcdir already configured
+ if test -f $srcdir/config.status; then
+ as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5
+ fi
+fi
+
+# test whether we have cygpath
+if test -z "$CYGPATH_W"; then
+ if (cygpath --version) >/dev/null 2>/dev/null; then
+ CYGPATH_W='cygpath -w'
+ else
+ CYGPATH_W=echo
+ fi
+fi
+
+
+# Define the identity of the package.
+ PACKAGE='newlib'
+ VERSION='2.4.0'
+
+
+# Some tools Automake needs.
+
+ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"}
+
+
+AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"}
+
+
+AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"}
+
+
+AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"}
+
+
+MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
+
+# We need awk for the "check" target. The system "awk" is bad on
+# some platforms.
+# Always define AMTAR for backward compatibility. Yes, it's still used
+# in the wild :-( We should find a proper way to deprecate it ...
+AMTAR='$${TAR-tar}'
+
+am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'
+
+
+
+
+
+
+# FIXME: We temporarily define our own version of AC_PROG_CC. This is
+# copied from autoconf 2.12, but does not call AC_PROG_CC_WORKS. We
+# are probably using a cross compiler, which will not be able to fully
+# link an executable. This should really be fixed in autoconf
+# itself.
+
+
+
+
+
+
+
+# Extract the first word of "gcc", so it can be a program name with args.
+set dummy gcc; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_CC+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_CC="gcc"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+$as_echo "$CC" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+
+depcc="$CC" am_compiler_list=
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
+$as_echo_n "checking dependency style of $depcc... " >&6; }
+if ${am_cv_CC_dependencies_compiler_type+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
+ # We make a subdir and do the tests there. Otherwise we can end up
+ # making bogus files that we don't know about and never remove. For
+ # instance it was reported that on HP-UX the gcc test will end up
+ # making a dummy file named `D' -- because `-MD' means `put the output
+ # in D'.
+ rm -rf conftest.dir
+ mkdir conftest.dir
+ # Copy depcomp to subdir because otherwise we won't find it if we're
+ # using a relative directory.
+ cp "$am_depcomp" conftest.dir
+ cd conftest.dir
+ # We will build objects and dependencies in a subdirectory because
+ # it helps to detect inapplicable dependency modes. For instance
+ # both Tru64's cc and ICC support -MD to output dependencies as a
+ # side effect of compilation, but ICC will put the dependencies in
+ # the current directory while Tru64 will put them in the object
+ # directory.
+ mkdir sub
+
+ am_cv_CC_dependencies_compiler_type=none
+ if test "$am_compiler_list" = ""; then
+ am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
+ fi
+ am__universal=false
+ case " $depcc " in #(
+ *\ -arch\ *\ -arch\ *) am__universal=true ;;
+ esac
+
+ for depmode in $am_compiler_list; do
+ # Setup a source with many dependencies, because some compilers
+ # like to wrap large dependency lists on column 80 (with \), and
+ # we should not choose a depcomp mode which is confused by this.
+ #
+ # We need to recreate these files for each test, as the compiler may
+ # overwrite some of them when testing with obscure command lines.
+ # This happens at least with the AIX C compiler.
+ : > sub/conftest.c
+ for i in 1 2 3 4 5 6; do
+ echo '#include "conftst'$i'.h"' >> sub/conftest.c
+ # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
+ # Solaris 8's {/usr,}/bin/sh.
+ touch sub/conftst$i.h
+ done
+ echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
+
+ # We check with `-c' and `-o' for the sake of the "dashmstdout"
+ # mode. It turns out that the SunPro C++ compiler does not properly
+ # handle `-M -o', and we need to detect this. Also, some Intel
+ # versions had trouble with output in subdirs
+ am__obj=sub/conftest.${OBJEXT-o}
+ am__minus_obj="-o $am__obj"
+ case $depmode in
+ gcc)
+ # This depmode causes a compiler race in universal mode.
+ test "$am__universal" = false || continue
+ ;;
+ nosideeffect)
+ # after this tag, mechanisms are not by side-effect, so they'll
+ # only be used when explicitly requested
+ if test "x$enable_dependency_tracking" = xyes; then
+ continue
+ else
+ break
+ fi
+ ;;
+ msvc7 | msvc7msys | msvisualcpp | msvcmsys)
+ # This compiler won't grok `-c -o', but also, the minuso test has
+ # not run yet. These depmodes are late enough in the game, and
+ # so weak that their functioning should not be impacted.
+ am__obj=conftest.${OBJEXT-o}
+ am__minus_obj=
+ ;;
+ none) break ;;
+ esac
+ if depmode=$depmode \
+ source=sub/conftest.c object=$am__obj \
+ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
+ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
+ >/dev/null 2>conftest.err &&
+ grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
+ grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
+ grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
+ ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
+ # icc doesn't choke on unknown options, it will just issue warnings
+ # or remarks (even with -Werror). So we grep stderr for any message
+ # that says an option was ignored or not supported.
+ # When given -MP, icc 7.0 and 7.1 complain thusly:
+ # icc: Command line warning: ignoring option '-M'; no argument required
+ # The diagnosis changed in icc 8.0:
+ # icc: Command line remark: option '-MP' not supported
+ if (grep 'ignoring option' conftest.err ||
+ grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
+ am_cv_CC_dependencies_compiler_type=$depmode
+ break
+ fi
+ fi
+ done
+
+ cd ..
+ rm -rf conftest.dir
+else
+ am_cv_CC_dependencies_compiler_type=none
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
+$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; }
+CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
+
+ if
+ test "x$enable_dependency_tracking" != xno \
+ && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then
+ am__fastdepCC_TRUE=
+ am__fastdepCC_FALSE='#'
+else
+ am__fastdepCC_TRUE='#'
+ am__fastdepCC_FALSE=
+fi
+
+
+if test -z "$CC"; then
+ # Extract the first word of "cc", so it can be a program name with args.
+set dummy cc; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_CC+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+ ac_prog_rejected=no
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
+ ac_prog_rejected=yes
+ continue
+ fi
+ ac_cv_prog_CC="cc"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+if test $ac_prog_rejected = yes; then
+ # We found a bogon in the path, so make sure we never use it.
+ set dummy $ac_cv_prog_CC
+ shift
+ if test $# != 0; then
+ # We chose a different compiler from the bogus one.
+ # However, it has the same basename, so the bogon will be chosen
+ # first if we set CC to just the basename; use the full file name.
+ shift
+ ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
+ fi
+fi
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+$as_echo "$CC" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+ test -z "$CC" && as_fn_error $? "no acceptable cc found in \$PATH" "$LINENO" 5
+fi
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using GNU C" >&5
+$as_echo_n "checking whether we are using GNU C... " >&6; }
+if ${ac_cv_c_compiler_gnu+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat > conftest.c <<EOF
+#ifdef __GNUC__
+ yes;
+#endif
+EOF
+if { ac_try='${CC-cc} -E conftest.c'
+ { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; } | egrep yes >/dev/null 2>&1; then
+ ac_cv_c_compiler_gnu=yes
+else
+ ac_cv_c_compiler_gnu=no
+fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
+$as_echo "$ac_cv_c_compiler_gnu" >&6; }
+
+if test $ac_cv_c_compiler_gnu = yes; then
+ GCC=yes
+ ac_test_CFLAGS="${CFLAGS+set}"
+ ac_save_CFLAGS="$CFLAGS"
+ ac_test_CFLAGS=${CFLAGS+set}
+ac_save_CFLAGS=$CFLAGS
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
+$as_echo_n "checking whether $CC accepts -g... " >&6; }
+if ${ac_cv_prog_cc_g+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_save_c_werror_flag=$ac_c_werror_flag
+ ac_c_werror_flag=yes
+ ac_cv_prog_cc_g=no
+ CFLAGS="-g"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ ac_cv_prog_cc_g=yes
+else
+ CFLAGS=""
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+
+else
+ ac_c_werror_flag=$ac_save_c_werror_flag
+ CFLAGS="-g"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ ac_cv_prog_cc_g=yes
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ ac_c_werror_flag=$ac_save_c_werror_flag
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
+$as_echo "$ac_cv_prog_cc_g" >&6; }
+if test "$ac_test_CFLAGS" = set; then
+ CFLAGS=$ac_save_CFLAGS
+elif test $ac_cv_prog_cc_g = yes; then
+ if test "$GCC" = yes; then
+ CFLAGS="-g -O2"
+ else
+ CFLAGS="-g"
+ fi
+else
+ if test "$GCC" = yes; then
+ CFLAGS="-O2"
+ else
+ CFLAGS=
+ fi
+fi
+ if test "$ac_test_CFLAGS" = set; then
+ CFLAGS="$ac_save_CFLAGS"
+ elif test $ac_cv_prog_cc_g = yes; then
+ CFLAGS="-g -O2"
+ else
+ CFLAGS="-O2"
+ fi
+else
+ GCC=
+ test "${CFLAGS+set}" = set || CFLAGS="-g"
+fi
+
+
+if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args.
+set dummy ${ac_tool_prefix}as; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_AS+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$AS"; then
+ ac_cv_prog_AS="$AS" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_AS="${ac_tool_prefix}as"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+AS=$ac_cv_prog_AS
+if test -n "$AS"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
+$as_echo "$AS" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_AS"; then
+ ac_ct_AS=$AS
+ # Extract the first word of "as", so it can be a program name with args.
+set dummy as; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_AS+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_ct_AS"; then
+ ac_cv_prog_ac_ct_AS="$ac_ct_AS" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_ac_ct_AS="as"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_AS=$ac_cv_prog_ac_ct_AS
+if test -n "$ac_ct_AS"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AS" >&5
+$as_echo "$ac_ct_AS" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+ if test "x$ac_ct_AS" = x; then
+ AS=""
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ AS=$ac_ct_AS
+ fi
+else
+ AS="$ac_cv_prog_AS"
+fi
+
+if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
+set dummy ${ac_tool_prefix}ar; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_AR+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$AR"; then
+ ac_cv_prog_AR="$AR" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_AR="${ac_tool_prefix}ar"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+AR=$ac_cv_prog_AR
+if test -n "$AR"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
+$as_echo "$AR" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_AR"; then
+ ac_ct_AR=$AR
+ # Extract the first word of "ar", so it can be a program name with args.
+set dummy ar; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_AR+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_ct_AR"; then
+ ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_ac_ct_AR="ar"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_AR=$ac_cv_prog_ac_ct_AR
+if test -n "$ac_ct_AR"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
+$as_echo "$ac_ct_AR" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+ if test "x$ac_ct_AR" = x; then
+ AR=""
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ AR=$ac_ct_AR
+ fi
+else
+ AR="$ac_cv_prog_AR"
+fi
+
+if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
+set dummy ${ac_tool_prefix}ranlib; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_RANLIB+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$RANLIB"; then
+ ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+RANLIB=$ac_cv_prog_RANLIB
+if test -n "$RANLIB"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
+$as_echo "$RANLIB" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_RANLIB"; then
+ ac_ct_RANLIB=$RANLIB
+ # Extract the first word of "ranlib", so it can be a program name with args.
+set dummy ranlib; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_ct_RANLIB"; then
+ ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_ac_ct_RANLIB="ranlib"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
+if test -n "$ac_ct_RANLIB"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
+$as_echo "$ac_ct_RANLIB" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+ if test "x$ac_ct_RANLIB" = x; then
+ RANLIB=":"
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ RANLIB=$ac_ct_RANLIB
+ fi
+else
+ RANLIB="$ac_cv_prog_RANLIB"
+fi
+
+if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}readelf", so it can be a program name with args.
+set dummy ${ac_tool_prefix}readelf; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_READELF+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$READELF"; then
+ ac_cv_prog_READELF="$READELF" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_READELF="${ac_tool_prefix}readelf"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+READELF=$ac_cv_prog_READELF
+if test -n "$READELF"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
+$as_echo "$READELF" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_READELF"; then
+ ac_ct_READELF=$READELF
+ # Extract the first word of "readelf", so it can be a program name with args.
+set dummy readelf; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_READELF+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_ct_READELF"; then
+ ac_cv_prog_ac_ct_READELF="$ac_ct_READELF" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_ac_ct_READELF="readelf"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_READELF=$ac_cv_prog_ac_ct_READELF
+if test -n "$ac_ct_READELF"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_READELF" >&5
+$as_echo "$ac_ct_READELF" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+ if test "x$ac_ct_READELF" = x; then
+ READELF=":"
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ READELF=$ac_ct_READELF
+ fi
+else
+ READELF="$ac_cv_prog_READELF"
+fi
+
+
+
+
+# Hack to ensure that INSTALL won't be set to "../" with autoconf 2.13. */
+ac_given_INSTALL=$INSTALL
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5
+$as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; }
+ # Check whether --enable-maintainer-mode was given.
+if test "${enable_maintainer_mode+set}" = set; then :
+ enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval
+else
+ USE_MAINTAINER_MODE=no
+fi
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_MAINTAINER_MODE" >&5
+$as_echo "$USE_MAINTAINER_MODE" >&6; }
+ if test $USE_MAINTAINER_MODE = yes; then
+ MAINTAINER_MODE_TRUE=
+ MAINTAINER_MODE_FALSE='#'
+else
+ MAINTAINER_MODE_TRUE='#'
+ MAINTAINER_MODE_FALSE=
+fi
+
+ MAINT=$MAINTAINER_MODE_TRUE
+
+
+# By default we simply use the C compiler to build assembly code.
+
+test "${CCAS+set}" = set || CCAS=$CC
+test "${CCASFLAGS+set}" = set || CCASFLAGS=$CFLAGS
+
+
+
+
+# We need AC_EXEEXT to keep automake happy in cygnus mode. However,
+# at least currently, we never actually build a program, so we never
+# need to use $(EXEEXT). Moreover, the test for EXEEXT normally
+# fails, because we are probably configuring with a cross compiler
+# which can't create executables. So we include AC_EXEEXT to keep
+# automake happy, but we don't execute it, since we don't care about
+# the result.
+if false; then
+
+ dummy_var=1
+fi
+
+. ${newlib_basedir}/configure.host
+
+newlib_cflags="${newlib_cflags} -fno-builtin"
+
+NEWLIB_CFLAGS=${newlib_cflags}
+
+
+NO_INCLUDE_LIST=${noinclude}
+
+
+LDFLAGS=${ldflags}
+
+
+ if test x${newlib_elix_level} = x0; then
+ ELIX_LEVEL_0_TRUE=
+ ELIX_LEVEL_0_FALSE='#'
+else
+ ELIX_LEVEL_0_TRUE='#'
+ ELIX_LEVEL_0_FALSE=
+fi
+
+ if test x${newlib_elix_level} = x1; then
+ ELIX_LEVEL_1_TRUE=
+ ELIX_LEVEL_1_FALSE='#'
+else
+ ELIX_LEVEL_1_TRUE='#'
+ ELIX_LEVEL_1_FALSE=
+fi
+
+ if test x${newlib_elix_level} = x2; then
+ ELIX_LEVEL_2_TRUE=
+ ELIX_LEVEL_2_FALSE='#'
+else
+ ELIX_LEVEL_2_TRUE='#'
+ ELIX_LEVEL_2_FALSE=
+fi
+
+ if test x${newlib_elix_level} = x3; then
+ ELIX_LEVEL_3_TRUE=
+ ELIX_LEVEL_3_FALSE='#'
+else
+ ELIX_LEVEL_3_TRUE='#'
+ ELIX_LEVEL_3_FALSE=
+fi
+
+ if test x${newlib_elix_level} = x4; then
+ ELIX_LEVEL_4_TRUE=
+ ELIX_LEVEL_4_FALSE='#'
+else
+ ELIX_LEVEL_4_TRUE='#'
+ ELIX_LEVEL_4_FALSE=
+fi
+
+
+ if test x${use_libtool} = xyes; then
+ USE_LIBTOOL_TRUE=
+ USE_LIBTOOL_FALSE='#'
+else
+ USE_LIBTOOL_TRUE='#'
+ USE_LIBTOOL_FALSE=
+fi
+
+
+# Hard-code OBJEXT. Normally it is set by AC_OBJEXT, but we
+# use oext, which is set in configure.host based on the target platform.
+OBJEXT=${oext}
+
+
+
+
+
+
+
+
+
+
+
+ac_config_files="$ac_config_files Makefile"
+
+cat >confcache <<\_ACEOF
+# This file is a shell script that caches the results of configure
+# tests run on this system so they can be shared between configure
+# scripts and configure runs, see configure's option --config-cache.
+# It is not useful on other systems. If it contains results you don't
+# want to keep, you may remove or edit it.
+#
+# config.status only pays attention to the cache file if you give it
+# the --recheck option to rerun configure.
+#
+# `ac_cv_env_foo' variables (set or unset) will be overridden when
+# loading this file, other *unset* `ac_cv_foo' will be assigned the
+# following values.
+
+_ACEOF
+
+# The following way of writing the cache mishandles newlines in values,
+# but we know of no workaround that is simple, portable, and efficient.
+# So, we kill variables containing newlines.
+# Ultrix sh set writes to stderr and can't be redirected directly,
+# and sets the high bit in the cache file unless we assign to the vars.
+(
+ for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
+ eval ac_val=\$$ac_var
+ case $ac_val in #(
+ *${as_nl}*)
+ case $ac_var in #(
+ *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
+$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
+ esac
+ case $ac_var in #(
+ _ | IFS | as_nl) ;; #(
+ BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
+ *) { eval $ac_var=; unset $ac_var;} ;;
+ esac ;;
+ esac
+ done
+
+ (set) 2>&1 |
+ case $as_nl`(ac_space=' '; set) 2>&1` in #(
+ *${as_nl}ac_space=\ *)
+ # `set' does not quote correctly, so add quotes: double-quote
+ # substitution turns \\\\ into \\, and sed turns \\ into \.
+ sed -n \
+ "s/'/'\\\\''/g;
+ s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
+ ;; #(
+ *)
+ # `set' quotes correctly as required by POSIX, so do not add quotes.
+ sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
+ ;;
+ esac |
+ sort
+) |
+ sed '
+ /^ac_cv_env_/b end
+ t clear
+ :clear
+ s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
+ t end
+ s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
+ :end' >>confcache
+if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
+ if test -w "$cache_file"; then
+ if test "x$cache_file" != "x/dev/null"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
+$as_echo "$as_me: updating cache $cache_file" >&6;}
+ if test ! -f "$cache_file" || test -h "$cache_file"; then
+ cat confcache >"$cache_file"
+ else
+ case $cache_file in #(
+ */* | ?:*)
+ mv -f confcache "$cache_file"$$ &&
+ mv -f "$cache_file"$$ "$cache_file" ;; #(
+ *)
+ mv -f confcache "$cache_file" ;;
+ esac
+ fi
+ fi
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
+$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
+ fi
+fi
+rm -f confcache
+
+test "x$prefix" = xNONE && prefix=$ac_default_prefix
+# Let make expand exec_prefix.
+test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
+
+# Transform confdefs.h into DEFS.
+# Protect against shell expansion while executing Makefile rules.
+# Protect against Makefile macro expansion.
+#
+# If the first sed substitution is executed (which looks for macros that
+# take arguments), then branch to the quote section. Otherwise,
+# look for a macro that doesn't take arguments.
+ac_script='
+:mline
+/\\$/{
+ N
+ s,\\\n,,
+ b mline
+}
+t clear
+:clear
+s/^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*([^)]*)\)[ ]*\(.*\)/-D\1=\2/g
+t quote
+s/^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)/-D\1=\2/g
+t quote
+b any
+:quote
+s/[ `~#$^&*(){}\\|;'\''"<>?]/\\&/g
+s/\[/\\&/g
+s/\]/\\&/g
+s/\$/$$/g
+H
+:any
+${
+ g
+ s/^\n//
+ s/\n/ /g
+ p
+}
+'
+DEFS=`sed -n "$ac_script" confdefs.h`
+
+
+ac_libobjs=
+ac_ltlibobjs=
+U=
+for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
+ # 1. Remove the extension, and $U if already installed.
+ ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
+ ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
+ # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
+ # will be set to the directory where LIBOBJS objects are built.
+ as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
+ as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
+done
+LIBOBJS=$ac_libobjs
+
+LTLIBOBJS=$ac_ltlibobjs
+
+
+if test -z "${MAY_SUPPLY_SYSCALLS_TRUE}" && test -z "${MAY_SUPPLY_SYSCALLS_FALSE}"; then
+ as_fn_error $? "conditional \"MAY_SUPPLY_SYSCALLS\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+
+if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then
+ as_fn_error $? "conditional \"AMDEP\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
+ as_fn_error $? "conditional \"am__fastdepCC\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then
+ as_fn_error $? "conditional \"MAINTAINER_MODE\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${ELIX_LEVEL_0_TRUE}" && test -z "${ELIX_LEVEL_0_FALSE}"; then
+ as_fn_error $? "conditional \"ELIX_LEVEL_0\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${ELIX_LEVEL_1_TRUE}" && test -z "${ELIX_LEVEL_1_FALSE}"; then
+ as_fn_error $? "conditional \"ELIX_LEVEL_1\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${ELIX_LEVEL_2_TRUE}" && test -z "${ELIX_LEVEL_2_FALSE}"; then
+ as_fn_error $? "conditional \"ELIX_LEVEL_2\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${ELIX_LEVEL_3_TRUE}" && test -z "${ELIX_LEVEL_3_FALSE}"; then
+ as_fn_error $? "conditional \"ELIX_LEVEL_3\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${ELIX_LEVEL_4_TRUE}" && test -z "${ELIX_LEVEL_4_FALSE}"; then
+ as_fn_error $? "conditional \"ELIX_LEVEL_4\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${USE_LIBTOOL_TRUE}" && test -z "${USE_LIBTOOL_FALSE}"; then
+ as_fn_error $? "conditional \"USE_LIBTOOL\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+
+: "${CONFIG_STATUS=./config.status}"
+ac_write_fail=0
+ac_clean_files_save=$ac_clean_files
+ac_clean_files="$ac_clean_files $CONFIG_STATUS"
+{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
+$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
+as_write_fail=0
+cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
+#! $SHELL
+# Generated by $as_me.
+# Run this file to recreate the current configuration.
+# Compiler output produced by configure, useful for debugging
+# configure, is in config.log if it exists.
+
+debug=false
+ac_cs_recheck=false
+ac_cs_silent=false
+
+SHELL=\${CONFIG_SHELL-$SHELL}
+export SHELL
+_ASEOF
+cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
+## -------------------- ##
+## M4sh Initialization. ##
+## -------------------- ##
+
+# Be more Bourne compatible
+DUALCASE=1; export DUALCASE # for MKS sh
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
+ emulate sh
+ NULLCMD=:
+ # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
+ # is contrary to our usage. Disable this feature.
+ alias -g '${1+"$@"}'='"$@"'
+ setopt NO_GLOB_SUBST
+else
+ case `(set -o) 2>/dev/null` in #(
+ *posix*) :
+ set -o posix ;; #(
+ *) :
+ ;;
+esac
+fi
+
+
+as_nl='
+'
+export as_nl
+# Printing a long string crashes Solaris 7 /usr/bin/printf.
+as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
+as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
+as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
+# Prefer a ksh shell builtin over an external printf program on Solaris,
+# but without wasting forks for bash or zsh.
+if test -z "$BASH_VERSION$ZSH_VERSION" \
+ && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
+ as_echo='print -r --'
+ as_echo_n='print -rn --'
+elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
+ as_echo='printf %s\n'
+ as_echo_n='printf %s'
+else
+ if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
+ as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
+ as_echo_n='/usr/ucb/echo -n'
+ else
+ as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
+ as_echo_n_body='eval
+ arg=$1;
+ case $arg in #(
+ *"$as_nl"*)
+ expr "X$arg" : "X\\(.*\\)$as_nl";
+ arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
+ esac;
+ expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
+ '
+ export as_echo_n_body
+ as_echo_n='sh -c $as_echo_n_body as_echo'
+ fi
+ export as_echo_body
+ as_echo='sh -c $as_echo_body as_echo'
+fi
+
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+ PATH_SEPARATOR=:
+ (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
+ (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
+ PATH_SEPARATOR=';'
+ }
+fi
+
+
+# IFS
+# We need space, tab and new line, in precisely that order. Quoting is
+# there to prevent editors from complaining about space-tab.
+# (If _AS_PATH_WALK were called with IFS unset, it would disable word
+# splitting by setting IFS to empty value.)
+IFS=" "" $as_nl"
+
+# Find who we are. Look in the path if we contain no directory separator.
+as_myself=
+case $0 in #((
+ *[\\/]* ) as_myself=$0 ;;
+ *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
+ done
+IFS=$as_save_IFS
+
+ ;;
+esac
+# We did not find ourselves, most probably we were run as `sh COMMAND'
+# in which case we are not to be found in the path.
+if test "x$as_myself" = x; then
+ as_myself=$0
+fi
+if test ! -f "$as_myself"; then
+ $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
+ exit 1
+fi
+
+# Unset variables that we do not need and which cause bugs (e.g. in
+# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
+# suppresses any "Segmentation fault" message there. '((' could
+# trigger a bug in pdksh 5.2.14.
+for as_var in BASH_ENV ENV MAIL MAILPATH
+do eval test x\${$as_var+set} = xset \
+ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
+done
+PS1='$ '
+PS2='> '
+PS4='+ '
+
+# NLS nuisances.
+LC_ALL=C
+export LC_ALL
+LANGUAGE=C
+export LANGUAGE
+
+# CDPATH.
+(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
+
+
+# as_fn_error STATUS ERROR [LINENO LOG_FD]
+# ----------------------------------------
+# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
+# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
+# script with STATUS, using 1 if that was 0.
+as_fn_error ()
+{
+ as_status=$1; test $as_status -eq 0 && as_status=1
+ if test "$4"; then
+ as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
+ fi
+ $as_echo "$as_me: error: $2" >&2
+ as_fn_exit $as_status
+} # as_fn_error
+
+
+# as_fn_set_status STATUS
+# -----------------------
+# Set $? to STATUS, without forking.
+as_fn_set_status ()
+{
+ return $1
+} # as_fn_set_status
+
+# as_fn_exit STATUS
+# -----------------
+# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
+as_fn_exit ()
+{
+ set +e
+ as_fn_set_status $1
+ exit $1
+} # as_fn_exit
+
+# as_fn_unset VAR
+# ---------------
+# Portably unset VAR.
+as_fn_unset ()
+{
+ { eval $1=; unset $1;}
+}
+as_unset=as_fn_unset
+# as_fn_append VAR VALUE
+# ----------------------
+# Append the text in VALUE to the end of the definition contained in VAR. Take
+# advantage of any shell optimizations that allow amortized linear growth over
+# repeated appends, instead of the typical quadratic growth present in naive
+# implementations.
+if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
+ eval 'as_fn_append ()
+ {
+ eval $1+=\$2
+ }'
+else
+ as_fn_append ()
+ {
+ eval $1=\$$1\$2
+ }
+fi # as_fn_append
+
+# as_fn_arith ARG...
+# ------------------
+# Perform arithmetic evaluation on the ARGs, and store the result in the
+# global $as_val. Take advantage of shells that can avoid forks. The arguments
+# must be portable across $(()) and expr.
+if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
+ eval 'as_fn_arith ()
+ {
+ as_val=$(( $* ))
+ }'
+else
+ as_fn_arith ()
+ {
+ as_val=`expr "$@" || test $? -eq 1`
+ }
+fi # as_fn_arith
+
+
+if expr a : '\(a\)' >/dev/null 2>&1 &&
+ test "X`expr 00001 : '.*\(...\)'`" = X001; then
+ as_expr=expr
+else
+ as_expr=false
+fi
+
+if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
+ as_basename=basename
+else
+ as_basename=false
+fi
+
+if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
+ as_dirname=dirname
+else
+ as_dirname=false
+fi
+
+as_me=`$as_basename -- "$0" ||
+$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
+ X"$0" : 'X\(//\)$' \| \
+ X"$0" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X/"$0" |
+ sed '/^.*\/\([^/][^/]*\)\/*$/{
+ s//\1/
+ q
+ }
+ /^X\/\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\/\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+
+# Avoid depending upon Character Ranges.
+as_cr_letters='abcdefghijklmnopqrstuvwxyz'
+as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
+as_cr_Letters=$as_cr_letters$as_cr_LETTERS
+as_cr_digits='0123456789'
+as_cr_alnum=$as_cr_Letters$as_cr_digits
+
+ECHO_C= ECHO_N= ECHO_T=
+case `echo -n x` in #(((((
+-n*)
+ case `echo 'xy\c'` in
+ *c*) ECHO_T=' ';; # ECHO_T is single tab character.
+ xy) ECHO_C='\c';;
+ *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
+ ECHO_T=' ';;
+ esac;;
+*)
+ ECHO_N='-n';;
+esac
+
+rm -f conf$$ conf$$.exe conf$$.file
+if test -d conf$$.dir; then
+ rm -f conf$$.dir/conf$$.file
+else
+ rm -f conf$$.dir
+ mkdir conf$$.dir 2>/dev/null
+fi
+if (echo >conf$$.file) 2>/dev/null; then
+ if ln -s conf$$.file conf$$ 2>/dev/null; then
+ as_ln_s='ln -s'
+ # ... but there are two gotchas:
+ # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
+ # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
+ # In both cases, we have to default to `cp -p'.
+ ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
+ as_ln_s='cp -p'
+ elif ln conf$$.file conf$$ 2>/dev/null; then
+ as_ln_s=ln
+ else
+ as_ln_s='cp -p'
+ fi
+else
+ as_ln_s='cp -p'
+fi
+rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
+rmdir conf$$.dir 2>/dev/null
+
+
+# as_fn_mkdir_p
+# -------------
+# Create "$as_dir" as a directory, including parents if necessary.
+as_fn_mkdir_p ()
+{
+
+ case $as_dir in #(
+ -*) as_dir=./$as_dir;;
+ esac
+ test -d "$as_dir" || eval $as_mkdir_p || {
+ as_dirs=
+ while :; do
+ case $as_dir in #(
+ *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
+ *) as_qdir=$as_dir;;
+ esac
+ as_dirs="'$as_qdir' $as_dirs"
+ as_dir=`$as_dirname -- "$as_dir" ||
+$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$as_dir" : 'X\(//\)[^/]' \| \
+ X"$as_dir" : 'X\(//\)$' \| \
+ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$as_dir" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)[^/].*/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+ test -d "$as_dir" && break
+ done
+ test -z "$as_dirs" || eval "mkdir $as_dirs"
+ } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
+
+
+} # as_fn_mkdir_p
+if mkdir -p . 2>/dev/null; then
+ as_mkdir_p='mkdir -p "$as_dir"'
+else
+ test -d ./-p && rmdir ./-p
+ as_mkdir_p=false
+fi
+
+if test -x / >/dev/null 2>&1; then
+ as_test_x='test -x'
+else
+ if ls -dL / >/dev/null 2>&1; then
+ as_ls_L_option=L
+ else
+ as_ls_L_option=
+ fi
+ as_test_x='
+ eval sh -c '\''
+ if test -d "$1"; then
+ test -d "$1/.";
+ else
+ case $1 in #(
+ -*)set "./$1";;
+ esac;
+ case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
+ ???[sx]*):;;*)false;;esac;fi
+ '\'' sh
+ '
+fi
+as_executable_p=$as_test_x
+
+# Sed expression to map a string onto a valid CPP name.
+as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
+
+# Sed expression to map a string onto a valid variable name.
+as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
+
+
+exec 6>&1
+## ----------------------------------- ##
+## Main body of $CONFIG_STATUS script. ##
+## ----------------------------------- ##
+_ASEOF
+test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+# Save the log message, to keep $0 and so on meaningful, and to
+# report actual input values of CONFIG_FILES etc. instead of their
+# values after options handling.
+ac_log="
+This file was extended by newlib $as_me 2.4.0, which was
+generated by GNU Autoconf 2.68. Invocation command line was
+
+ CONFIG_FILES = $CONFIG_FILES
+ CONFIG_HEADERS = $CONFIG_HEADERS
+ CONFIG_LINKS = $CONFIG_LINKS
+ CONFIG_COMMANDS = $CONFIG_COMMANDS
+ $ $0 $@
+
+on `(hostname || uname -n) 2>/dev/null | sed 1q`
+"
+
+_ACEOF
+
+case $ac_config_files in *"
+"*) set x $ac_config_files; shift; ac_config_files=$*;;
+esac
+
+
+
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+# Files that config.status was made for.
+config_files="$ac_config_files"
+config_commands="$ac_config_commands"
+
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+ac_cs_usage="\
+\`$as_me' instantiates files and other configuration actions
+from templates according to the current configuration. Unless the files
+and actions are specified as TAGs, all are instantiated by default.
+
+Usage: $0 [OPTION]... [TAG]...
+
+ -h, --help print this help, then exit
+ -V, --version print version number and configuration settings, then exit
+ --config print configuration, then exit
+ -q, --quiet, --silent
+ do not print progress messages
+ -d, --debug don't remove temporary files
+ --recheck update $as_me by reconfiguring in the same conditions
+ --file=FILE[:TEMPLATE]
+ instantiate the configuration file FILE
+
+Configuration files:
+$config_files
+
+Configuration commands:
+$config_commands
+
+Report bugs to the package provider."
+
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
+ac_cs_version="\\
+newlib config.status 2.4.0
+configured by $0, generated by GNU Autoconf 2.68,
+ with options \\"\$ac_cs_config\\"
+
+Copyright (C) 2010 Free Software Foundation, Inc.
+This config.status script is free software; the Free Software Foundation
+gives unlimited permission to copy, distribute and modify it."
+
+ac_pwd='$ac_pwd'
+srcdir='$srcdir'
+INSTALL='$INSTALL'
+MKDIR_P='$MKDIR_P'
+AWK='$AWK'
+test -n "\$AWK" || AWK=awk
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+# The default lists apply if the user does not specify any file.
+ac_need_defaults=:
+while test $# != 0
+do
+ case $1 in
+ --*=?*)
+ ac_option=`expr "X$1" : 'X\([^=]*\)='`
+ ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
+ ac_shift=:
+ ;;
+ --*=)
+ ac_option=`expr "X$1" : 'X\([^=]*\)='`
+ ac_optarg=
+ ac_shift=:
+ ;;
+ *)
+ ac_option=$1
+ ac_optarg=$2
+ ac_shift=shift
+ ;;
+ esac
+
+ case $ac_option in
+ # Handling of the options.
+ -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
+ ac_cs_recheck=: ;;
+ --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
+ $as_echo "$ac_cs_version"; exit ;;
+ --config | --confi | --conf | --con | --co | --c )
+ $as_echo "$ac_cs_config"; exit ;;
+ --debug | --debu | --deb | --de | --d | -d )
+ debug=: ;;
+ --file | --fil | --fi | --f )
+ $ac_shift
+ case $ac_optarg in
+ *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
+ '') as_fn_error $? "missing file argument" ;;
+ esac
+ as_fn_append CONFIG_FILES " '$ac_optarg'"
+ ac_need_defaults=false;;
+ --he | --h | --help | --hel | -h )
+ $as_echo "$ac_cs_usage"; exit ;;
+ -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+ | -silent | --silent | --silen | --sile | --sil | --si | --s)
+ ac_cs_silent=: ;;
+
+ # This is an error.
+ -*) as_fn_error $? "unrecognized option: \`$1'
+Try \`$0 --help' for more information." ;;
+
+ *) as_fn_append ac_config_targets " $1"
+ ac_need_defaults=false ;;
+
+ esac
+ shift
+done
+
+ac_configure_extra_args=
+
+if $ac_cs_silent; then
+ exec 6>/dev/null
+ ac_configure_extra_args="$ac_configure_extra_args --silent"
+fi
+
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+if \$ac_cs_recheck; then
+ set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
+ shift
+ \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
+ CONFIG_SHELL='$SHELL'
+ export CONFIG_SHELL
+ exec "\$@"
+fi
+
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+exec 5>>config.log
+{
+ echo
+ sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
+## Running $as_me. ##
+_ASBOX
+ $as_echo "$ac_log"
+} >&5
+
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+#
+# INIT-COMMANDS
+#
+AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"
+
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+
+# Handling of arguments.
+for ac_config_target in $ac_config_targets
+do
+ case $ac_config_target in
+ "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
+ "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
+
+ *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
+ esac
+done
+
+
+# If the user did not use the arguments to specify the items to instantiate,
+# then the envvar interface is used. Set only those that are not.
+# We use the long form for the default assignment because of an extremely
+# bizarre bug on SunOS 4.1.3.
+if $ac_need_defaults; then
+ test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
+ test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
+fi
+
+# Have a temporary directory for convenience. Make it in the build tree
+# simply because there is no reason against having it here, and in addition,
+# creating and moving files from /tmp can sometimes cause problems.
+# Hook for its removal unless debugging.
+# Note that there is a small window in which the directory will not be cleaned:
+# after its creation but before its name has been assigned to `$tmp'.
+$debug ||
+{
+ tmp= ac_tmp=
+ trap 'exit_status=$?
+ : "${ac_tmp:=$tmp}"
+ { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
+' 0
+ trap 'as_fn_exit 1' 1 2 13 15
+}
+# Create a (secure) tmp directory for tmp files.
+
+{
+ tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
+ test -d "$tmp"
+} ||
+{
+ tmp=./conf$$-$RANDOM
+ (umask 077 && mkdir "$tmp")
+} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
+ac_tmp=$tmp
+
+# Set up the scripts for CONFIG_FILES section.
+# No need to generate them if there are no CONFIG_FILES.
+# This happens for instance with `./config.status config.h'.
+if test -n "$CONFIG_FILES"; then
+
+
+ac_cr=`echo X | tr X '\015'`
+# On cygwin, bash can eat \r inside `` if the user requested igncr.
+# But we know of no other shell where ac_cr would be empty at this
+# point, so we can use a bashism as a fallback.
+if test "x$ac_cr" = x; then
+ eval ac_cr=\$\'\\r\'
+fi
+ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
+if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
+ ac_cs_awk_cr='\\r'
+else
+ ac_cs_awk_cr=$ac_cr
+fi
+
+echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
+_ACEOF
+
+
+{
+ echo "cat >conf$$subs.awk <<_ACEOF" &&
+ echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
+ echo "_ACEOF"
+} >conf$$subs.sh ||
+ as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
+ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
+ac_delim='%!_!# '
+for ac_last_try in false false false false false :; do
+ . ./conf$$subs.sh ||
+ as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
+
+ ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
+ if test $ac_delim_n = $ac_delim_num; then
+ break
+ elif $ac_last_try; then
+ as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
+ else
+ ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
+ fi
+done
+rm -f conf$$subs.sh
+
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
+_ACEOF
+sed -n '
+h
+s/^/S["/; s/!.*/"]=/
+p
+g
+s/^[^!]*!//
+:repl
+t repl
+s/'"$ac_delim"'$//
+t delim
+:nl
+h
+s/\(.\{148\}\)..*/\1/
+t more1
+s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
+p
+n
+b repl
+:more1
+s/["\\]/\\&/g; s/^/"/; s/$/"\\/
+p
+g
+s/.\{148\}//
+t nl
+:delim
+h
+s/\(.\{148\}\)..*/\1/
+t more2
+s/["\\]/\\&/g; s/^/"/; s/$/"/
+p
+b
+:more2
+s/["\\]/\\&/g; s/^/"/; s/$/"\\/
+p
+g
+s/.\{148\}//
+t delim
+' <conf$$subs.awk | sed '
+/^[^""]/{
+ N
+ s/\n//
+}
+' >>$CONFIG_STATUS || ac_write_fail=1
+rm -f conf$$subs.awk
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+_ACAWK
+cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
+ for (key in S) S_is_set[key] = 1
+ FS = ""
+
+}
+{
+ line = $ 0
+ nfields = split(line, field, "@")
+ substed = 0
+ len = length(field[1])
+ for (i = 2; i < nfields; i++) {
+ key = field[i]
+ keylen = length(key)
+ if (S_is_set[key]) {
+ value = S[key]
+ line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
+ len += length(value) + length(field[++i])
+ substed = 1
+ } else
+ len += 1 + keylen
+ }
+
+ print line
+}
+
+_ACAWK
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
+ sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
+else
+ cat
+fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
+ || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
+_ACEOF
+
+# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
+# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
+# trailing colons and then remove the whole line if VPATH becomes empty
+# (actually we leave an empty line to preserve line numbers).
+if test "x$srcdir" = x.; then
+ ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
+h
+s///
+s/^/:/
+s/[ ]*$/:/
+s/:\$(srcdir):/:/g
+s/:\${srcdir}:/:/g
+s/:@srcdir@:/:/g
+s/^:*//
+s/:*$//
+x
+s/\(=[ ]*\).*/\1/
+G
+s/\n//
+s/^[^=]*=[ ]*$//
+}'
+fi
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+fi # test -n "$CONFIG_FILES"
+
+
+eval set X " :F $CONFIG_FILES :C $CONFIG_COMMANDS"
+shift
+for ac_tag
+do
+ case $ac_tag in
+ :[FHLC]) ac_mode=$ac_tag; continue;;
+ esac
+ case $ac_mode$ac_tag in
+ :[FHL]*:*);;
+ :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
+ :[FH]-) ac_tag=-:-;;
+ :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
+ esac
+ ac_save_IFS=$IFS
+ IFS=:
+ set x $ac_tag
+ IFS=$ac_save_IFS
+ shift
+ ac_file=$1
+ shift
+
+ case $ac_mode in
+ :L) ac_source=$1;;
+ :[FH])
+ ac_file_inputs=
+ for ac_f
+ do
+ case $ac_f in
+ -) ac_f="$ac_tmp/stdin";;
+ *) # Look for the file first in the build tree, then in the source tree
+ # (if the path is not absolute). The absolute path cannot be DOS-style,
+ # because $ac_f cannot contain `:'.
+ test -f "$ac_f" ||
+ case $ac_f in
+ [\\/$]*) false;;
+ *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
+ esac ||
+ as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
+ esac
+ case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
+ as_fn_append ac_file_inputs " '$ac_f'"
+ done
+
+ # Let's still pretend it is `configure' which instantiates (i.e., don't
+ # use $as_me), people would be surprised to read:
+ # /* config.h. Generated by config.status. */
+ configure_input='Generated from '`
+ $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
+ `' by configure.'
+ if test x"$ac_file" != x-; then
+ configure_input="$ac_file. $configure_input"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
+$as_echo "$as_me: creating $ac_file" >&6;}
+ fi
+ # Neutralize special characters interpreted by sed in replacement strings.
+ case $configure_input in #(
+ *\&* | *\|* | *\\* )
+ ac_sed_conf_input=`$as_echo "$configure_input" |
+ sed 's/[\\\\&|]/\\\\&/g'`;; #(
+ *) ac_sed_conf_input=$configure_input;;
+ esac
+
+ case $ac_tag in
+ *:-:* | *:-) cat >"$ac_tmp/stdin" \
+ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
+ esac
+ ;;
+ esac
+
+ ac_dir=`$as_dirname -- "$ac_file" ||
+$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$ac_file" : 'X\(//\)[^/]' \| \
+ X"$ac_file" : 'X\(//\)$' \| \
+ X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$ac_file" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)[^/].*/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+ as_dir="$ac_dir"; as_fn_mkdir_p
+ ac_builddir=.
+
+case "$ac_dir" in
+.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
+*)
+ ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
+ # A ".." for each directory in $ac_dir_suffix.
+ ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
+ case $ac_top_builddir_sub in
+ "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
+ *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
+ esac ;;
+esac
+ac_abs_top_builddir=$ac_pwd
+ac_abs_builddir=$ac_pwd$ac_dir_suffix
+# for backward compatibility:
+ac_top_builddir=$ac_top_build_prefix
+
+case $srcdir in
+ .) # We are building in place.
+ ac_srcdir=.
+ ac_top_srcdir=$ac_top_builddir_sub
+ ac_abs_top_srcdir=$ac_pwd ;;
+ [\\/]* | ?:[\\/]* ) # Absolute name.
+ ac_srcdir=$srcdir$ac_dir_suffix;
+ ac_top_srcdir=$srcdir
+ ac_abs_top_srcdir=$srcdir ;;
+ *) # Relative name.
+ ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
+ ac_top_srcdir=$ac_top_build_prefix$srcdir
+ ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
+esac
+ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
+
+
+ case $ac_mode in
+ :F)
+ #
+ # CONFIG_FILE
+ #
+
+ case $INSTALL in
+ [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
+ *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
+ esac
+ ac_MKDIR_P=$MKDIR_P
+ case $MKDIR_P in
+ [\\/$]* | ?:[\\/]* ) ;;
+ */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
+ esac
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+# If the template does not know about datarootdir, expand it.
+# FIXME: This hack should be removed a few years after 2.60.
+ac_datarootdir_hack=; ac_datarootdir_seen=
+ac_sed_dataroot='
+/datarootdir/ {
+ p
+ q
+}
+/@datadir@/p
+/@docdir@/p
+/@infodir@/p
+/@localedir@/p
+/@mandir@/p'
+case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
+*datarootdir*) ac_datarootdir_seen=yes;;
+*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
+$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+ ac_datarootdir_hack='
+ s&@datadir@&$datadir&g
+ s&@docdir@&$docdir&g
+ s&@infodir@&$infodir&g
+ s&@localedir@&$localedir&g
+ s&@mandir@&$mandir&g
+ s&\\\${datarootdir}&$datarootdir&g' ;;
+esac
+_ACEOF
+
+# Neutralize VPATH when `$srcdir' = `.'.
+# Shell code in configure.ac might set extrasub.
+# FIXME: do we really want to maintain this feature?
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+ac_sed_extra="$ac_vpsub
+$extrasub
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+:t
+/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
+s|@configure_input@|$ac_sed_conf_input|;t t
+s&@top_builddir@&$ac_top_builddir_sub&;t t
+s&@top_build_prefix@&$ac_top_build_prefix&;t t
+s&@srcdir@&$ac_srcdir&;t t
+s&@abs_srcdir@&$ac_abs_srcdir&;t t
+s&@top_srcdir@&$ac_top_srcdir&;t t
+s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
+s&@builddir@&$ac_builddir&;t t
+s&@abs_builddir@&$ac_abs_builddir&;t t
+s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
+s&@INSTALL@&$ac_INSTALL&;t t
+s&@MKDIR_P@&$ac_MKDIR_P&;t t
+$ac_datarootdir_hack
+"
+eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
+ >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
+
+test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
+ { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
+ { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
+ "$ac_tmp/out"`; test -z "$ac_out"; } &&
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
+which seems to be undefined. Please make sure it is defined" >&5
+$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
+which seems to be undefined. Please make sure it is defined" >&2;}
+
+ rm -f "$ac_tmp/stdin"
+ case $ac_file in
+ -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
+ *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
+ esac \
+ || as_fn_error $? "could not create $ac_file" "$LINENO" 5
+ ;;
+
+
+ :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
+$as_echo "$as_me: executing $ac_file commands" >&6;}
+ ;;
+ esac
+
+
+ case $ac_file$ac_mode in
+ "depfiles":C) test x"$AMDEP_TRUE" != x"" || {
+ # Autoconf 2.62 quotes --file arguments for eval, but not when files
+ # are listed without --file. Let's play safe and only enable the eval
+ # if we detect the quoting.
+ case $CONFIG_FILES in
+ *\'*) eval set x "$CONFIG_FILES" ;;
+ *) set x $CONFIG_FILES ;;
+ esac
+ shift
+ for mf
+ do
+ # Strip MF so we end up with the name of the file.
+ mf=`echo "$mf" | sed -e 's/:.*$//'`
+ # Check whether this is an Automake generated Makefile or not.
+ # We used to match only the files named `Makefile.in', but
+ # some people rename them; so instead we look at the file content.
+ # Grep'ing the first line is not enough: some people post-process
+ # each Makefile.in and add a new line on top of each file to say so.
+ # Grep'ing the whole file is not good either: AIX grep has a line
+ # limit of 2048, but all sed's we know have understand at least 4000.
+ if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
+ dirpart=`$as_dirname -- "$mf" ||
+$as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$mf" : 'X\(//\)[^/]' \| \
+ X"$mf" : 'X\(//\)$' \| \
+ X"$mf" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$mf" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)[^/].*/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+ else
+ continue
+ fi
+ # Extract the definition of DEPDIR, am__include, and am__quote
+ # from the Makefile without running `make'.
+ DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
+ test -z "$DEPDIR" && continue
+ am__include=`sed -n 's/^am__include = //p' < "$mf"`
+ test -z "am__include" && continue
+ am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
+ # When using ansi2knr, U may be empty or an underscore; expand it
+ U=`sed -n 's/^U = //p' < "$mf"`
+ # Find all dependency output files, they are included files with
+ # $(DEPDIR) in their names. We invoke sed twice because it is the
+ # simplest approach to changing $(DEPDIR) to its actual value in the
+ # expansion.
+ for file in `sed -n "
+ s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
+ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
+ # Make sure the directory exists.
+ test -f "$dirpart/$file" && continue
+ fdir=`$as_dirname -- "$file" ||
+$as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$file" : 'X\(//\)[^/]' \| \
+ X"$file" : 'X\(//\)$' \| \
+ X"$file" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$file" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)[^/].*/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+ as_dir=$dirpart/$fdir; as_fn_mkdir_p
+ # echo "creating $dirpart/$file"
+ echo '# dummy' > "$dirpart/$file"
+ done
+ done
+}
+ ;;
+
+ esac
+done # for ac_tag
+
+
+as_fn_exit 0
+_ACEOF
+ac_clean_files=$ac_clean_files_save
+
+test $ac_write_fail = 0 ||
+ as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
+
+
+# configure is writing to config.log, and then calls config.status.
+# config.status does its own redirection, appending to config.log.
+# Unfortunately, on DOS this fails, as config.log is still kept open
+# by configure, so config.status won't be able to write to it; its
+# output is simply discarded. So we exec the FD to /dev/null,
+# effectively closing config.log, so it can be properly (re)opened and
+# appended to by config.status. When coming back to configure, we
+# need to make the FD available again.
+if test "$no_create" != yes; then
+ ac_cs_success=:
+ ac_config_status_args=
+ test "$silent" = yes &&
+ ac_config_status_args="$ac_config_status_args --quiet"
+ exec 5>/dev/null
+ $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
+ exec 5>>config.log
+ # Use ||, not &&, to avoid exiting from the if with $? = 1, which
+ # would make configure fail if this is the last instruction.
+ $ac_cs_success || as_fn_exit 1
+fi
+if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
+$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
+fi
+
diff --git a/newlib/libc/sys/phoenix/machine/arm/configure.in b/newlib/libc/sys/phoenix/machine/arm/configure.in
new file mode 100644
index 000000000..838f7c89b
--- /dev/null
+++ b/newlib/libc/sys/phoenix/machine/arm/configure.in
@@ -0,0 +1,14 @@
+dnl This is the newlib/libc/sys/phoenix/machine/arm configure.in file.
+dnl Process this file with autoconf to produce a configure script.
+
+AC_PREREQ(2.59)
+AC_INIT([newlib],[NEWLIB_VERSION])
+AC_CONFIG_SRCDIR([crt0.S])
+
+dnl Can't be done in NEWLIB_CONFIGURE because that confuses automake.
+AC_CONFIG_AUX_DIR(../../../../../..)
+
+NEWLIB_CONFIGURE(../../../../..)
+
+AC_CONFIG_FILES([Makefile])
+AC_OUTPUT
diff --git a/newlib/libc/sys/phoenix/machine/arm/crt0.S b/newlib/libc/sys/phoenix/machine/arm/crt0.S
new file mode 100644
index 000000000..7c4869159
--- /dev/null
+++ b/newlib/libc/sys/phoenix/machine/arm/crt0.S
@@ -0,0 +1,47 @@
+/* Copyright (c) 2016 Phoenix Systems
+ 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.*/
+
+ .syntax unified
+ .section .text, "ax"
+ .global _start
+ .global main
+ .global exit
+ .global environ
+
+ .align 4
+
+_start:
+ /* Ignore return address passed on the top of stack. */
+ pop {lr}
+ ldmfd sp, {r0-r2}
+ ldr r3, =environ
+ str r2, [r3]
+
+ /* Align stack. */
+ bic sp, #0x00000007
+ ldr lr, =main
+ blx lr
+ ldr lr, =exit
+ blx lr
+ \ No newline at end of file
diff --git a/newlib/libc/sys/phoenix/machine/arm/regenerate.sh b/newlib/libc/sys/phoenix/machine/arm/regenerate.sh
new file mode 100644
index 000000000..93d2f2343
--- /dev/null
+++ b/newlib/libc/sys/phoenix/machine/arm/regenerate.sh
@@ -0,0 +1,5 @@
+#!/bin/sh
+
+aclocal-1.11 -I ../../../../../ -I ../../../../../../
+/usr/local/bin/autoconf
+automake-1.11 --cygnus Makefile
diff --git a/newlib/libc/sys/phoenix/machine/arm/syscall.S b/newlib/libc/sys/phoenix/machine/arm/syscall.S
new file mode 100644
index 000000000..a77324950
--- /dev/null
+++ b/newlib/libc/sys/phoenix/machine/arm/syscall.S
@@ -0,0 +1,52 @@
+/* Copyright (c) 2016 Phoenix Systems
+ 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.*/
+
+ .thumb
+ .syntax unified
+ .section .text, "ax"
+ .global _syscall5
+ .global _syscall3
+ .global hal_cpuRestoreCtx
+
+ .type _syscall5, %function
+ .func _syscall5
+
+_syscall5:
+ push {r4, r5}
+ ldr r4, [sp, #8]
+ ldr r5, [sp, #12]
+ svc #255
+ pop {r4, r5}
+ bx lr
+ .endfunc
+
+ .type _syscall3, %function
+ .func _syscall3
+
+_syscall3:
+ svc #255
+ bx lr
+ .endfunc
+
+ .end
diff --git a/newlib/libc/sys/phoenix/machine/configure b/newlib/libc/sys/phoenix/machine/configure
new file mode 100644
index 000000000..7540a1d4f
--- /dev/null
+++ b/newlib/libc/sys/phoenix/machine/configure
@@ -0,0 +1,4935 @@
+#! /bin/sh
+# Guess values for system-dependent variables and create Makefiles.
+# Generated by GNU Autoconf 2.68 for newlib 2.4.0.
+#
+#
+# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
+# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software
+# Foundation, Inc.
+#
+#
+# This configure script is free software; the Free Software Foundation
+# gives unlimited permission to copy, distribute and modify it.
+## -------------------- ##
+## M4sh Initialization. ##
+## -------------------- ##
+
+# Be more Bourne compatible
+DUALCASE=1; export DUALCASE # for MKS sh
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
+ emulate sh
+ NULLCMD=:
+ # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
+ # is contrary to our usage. Disable this feature.
+ alias -g '${1+"$@"}'='"$@"'
+ setopt NO_GLOB_SUBST
+else
+ case `(set -o) 2>/dev/null` in #(
+ *posix*) :
+ set -o posix ;; #(
+ *) :
+ ;;
+esac
+fi
+
+
+as_nl='
+'
+export as_nl
+# Printing a long string crashes Solaris 7 /usr/bin/printf.
+as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
+as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
+as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
+# Prefer a ksh shell builtin over an external printf program on Solaris,
+# but without wasting forks for bash or zsh.
+if test -z "$BASH_VERSION$ZSH_VERSION" \
+ && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
+ as_echo='print -r --'
+ as_echo_n='print -rn --'
+elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
+ as_echo='printf %s\n'
+ as_echo_n='printf %s'
+else
+ if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
+ as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
+ as_echo_n='/usr/ucb/echo -n'
+ else
+ as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
+ as_echo_n_body='eval
+ arg=$1;
+ case $arg in #(
+ *"$as_nl"*)
+ expr "X$arg" : "X\\(.*\\)$as_nl";
+ arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
+ esac;
+ expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
+ '
+ export as_echo_n_body
+ as_echo_n='sh -c $as_echo_n_body as_echo'
+ fi
+ export as_echo_body
+ as_echo='sh -c $as_echo_body as_echo'
+fi
+
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+ PATH_SEPARATOR=:
+ (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
+ (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
+ PATH_SEPARATOR=';'
+ }
+fi
+
+
+# IFS
+# We need space, tab and new line, in precisely that order. Quoting is
+# there to prevent editors from complaining about space-tab.
+# (If _AS_PATH_WALK were called with IFS unset, it would disable word
+# splitting by setting IFS to empty value.)
+IFS=" "" $as_nl"
+
+# Find who we are. Look in the path if we contain no directory separator.
+as_myself=
+case $0 in #((
+ *[\\/]* ) as_myself=$0 ;;
+ *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
+ done
+IFS=$as_save_IFS
+
+ ;;
+esac
+# We did not find ourselves, most probably we were run as `sh COMMAND'
+# in which case we are not to be found in the path.
+if test "x$as_myself" = x; then
+ as_myself=$0
+fi
+if test ! -f "$as_myself"; then
+ $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
+ exit 1
+fi
+
+# Unset variables that we do not need and which cause bugs (e.g. in
+# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
+# suppresses any "Segmentation fault" message there. '((' could
+# trigger a bug in pdksh 5.2.14.
+for as_var in BASH_ENV ENV MAIL MAILPATH
+do eval test x\${$as_var+set} = xset \
+ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
+done
+PS1='$ '
+PS2='> '
+PS4='+ '
+
+# NLS nuisances.
+LC_ALL=C
+export LC_ALL
+LANGUAGE=C
+export LANGUAGE
+
+# CDPATH.
+(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
+
+if test "x$CONFIG_SHELL" = x; then
+ as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
+ emulate sh
+ NULLCMD=:
+ # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
+ # is contrary to our usage. Disable this feature.
+ alias -g '\${1+\"\$@\"}'='\"\$@\"'
+ setopt NO_GLOB_SUBST
+else
+ case \`(set -o) 2>/dev/null\` in #(
+ *posix*) :
+ set -o posix ;; #(
+ *) :
+ ;;
+esac
+fi
+"
+ as_required="as_fn_return () { (exit \$1); }
+as_fn_success () { as_fn_return 0; }
+as_fn_failure () { as_fn_return 1; }
+as_fn_ret_success () { return 0; }
+as_fn_ret_failure () { return 1; }
+
+exitcode=0
+as_fn_success || { exitcode=1; echo as_fn_success failed.; }
+as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
+as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
+as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
+if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
+
+else
+ exitcode=1; echo positional parameters were not saved.
+fi
+test x\$exitcode = x0 || exit 1"
+ as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
+ as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
+ eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
+ test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1"
+ if (eval "$as_required") 2>/dev/null; then :
+ as_have_required=yes
+else
+ as_have_required=no
+fi
+ if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
+
+else
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+as_found=false
+for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ as_found=:
+ case $as_dir in #(
+ /*)
+ for as_base in sh bash ksh sh5; do
+ # Try only shells that exist, to save several forks.
+ as_shell=$as_dir/$as_base
+ if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
+ { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
+ CONFIG_SHELL=$as_shell as_have_required=yes
+ if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
+ break 2
+fi
+fi
+ done;;
+ esac
+ as_found=false
+done
+$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
+ { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
+ CONFIG_SHELL=$SHELL as_have_required=yes
+fi; }
+IFS=$as_save_IFS
+
+
+ if test "x$CONFIG_SHELL" != x; then :
+ # We cannot yet assume a decent shell, so we have to provide a
+ # neutralization value for shells without unset; and this also
+ # works around shells that cannot unset nonexistent variables.
+ # Preserve -v and -x to the replacement shell.
+ BASH_ENV=/dev/null
+ ENV=/dev/null
+ (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
+ export CONFIG_SHELL
+ case $- in # ((((
+ *v*x* | *x*v* ) as_opts=-vx ;;
+ *v* ) as_opts=-v ;;
+ *x* ) as_opts=-x ;;
+ * ) as_opts= ;;
+ esac
+ exec "$CONFIG_SHELL" $as_opts "$as_myself" ${1+"$@"}
+fi
+
+ if test x$as_have_required = xno; then :
+ $as_echo "$0: This script requires a shell more modern than all"
+ $as_echo "$0: the shells that I found on your system."
+ if test x${ZSH_VERSION+set} = xset ; then
+ $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
+ $as_echo "$0: be upgraded to zsh 4.3.4 or later."
+ else
+ $as_echo "$0: Please tell bug-autoconf@gnu.org about your system,
+$0: including any error possibly output before this
+$0: message. Then install a modern shell, or manually run
+$0: the script under such a shell if you do have one."
+ fi
+ exit 1
+fi
+fi
+fi
+SHELL=${CONFIG_SHELL-/bin/sh}
+export SHELL
+# Unset more variables known to interfere with behavior of common tools.
+CLICOLOR_FORCE= GREP_OPTIONS=
+unset CLICOLOR_FORCE GREP_OPTIONS
+
+## --------------------- ##
+## M4sh Shell Functions. ##
+## --------------------- ##
+# as_fn_unset VAR
+# ---------------
+# Portably unset VAR.
+as_fn_unset ()
+{
+ { eval $1=; unset $1;}
+}
+as_unset=as_fn_unset
+
+# as_fn_set_status STATUS
+# -----------------------
+# Set $? to STATUS, without forking.
+as_fn_set_status ()
+{
+ return $1
+} # as_fn_set_status
+
+# as_fn_exit STATUS
+# -----------------
+# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
+as_fn_exit ()
+{
+ set +e
+ as_fn_set_status $1
+ exit $1
+} # as_fn_exit
+
+# as_fn_mkdir_p
+# -------------
+# Create "$as_dir" as a directory, including parents if necessary.
+as_fn_mkdir_p ()
+{
+
+ case $as_dir in #(
+ -*) as_dir=./$as_dir;;
+ esac
+ test -d "$as_dir" || eval $as_mkdir_p || {
+ as_dirs=
+ while :; do
+ case $as_dir in #(
+ *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
+ *) as_qdir=$as_dir;;
+ esac
+ as_dirs="'$as_qdir' $as_dirs"
+ as_dir=`$as_dirname -- "$as_dir" ||
+$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$as_dir" : 'X\(//\)[^/]' \| \
+ X"$as_dir" : 'X\(//\)$' \| \
+ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$as_dir" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)[^/].*/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+ test -d "$as_dir" && break
+ done
+ test -z "$as_dirs" || eval "mkdir $as_dirs"
+ } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
+
+
+} # as_fn_mkdir_p
+# as_fn_append VAR VALUE
+# ----------------------
+# Append the text in VALUE to the end of the definition contained in VAR. Take
+# advantage of any shell optimizations that allow amortized linear growth over
+# repeated appends, instead of the typical quadratic growth present in naive
+# implementations.
+if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
+ eval 'as_fn_append ()
+ {
+ eval $1+=\$2
+ }'
+else
+ as_fn_append ()
+ {
+ eval $1=\$$1\$2
+ }
+fi # as_fn_append
+
+# as_fn_arith ARG...
+# ------------------
+# Perform arithmetic evaluation on the ARGs, and store the result in the
+# global $as_val. Take advantage of shells that can avoid forks. The arguments
+# must be portable across $(()) and expr.
+if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
+ eval 'as_fn_arith ()
+ {
+ as_val=$(( $* ))
+ }'
+else
+ as_fn_arith ()
+ {
+ as_val=`expr "$@" || test $? -eq 1`
+ }
+fi # as_fn_arith
+
+
+# as_fn_error STATUS ERROR [LINENO LOG_FD]
+# ----------------------------------------
+# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
+# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
+# script with STATUS, using 1 if that was 0.
+as_fn_error ()
+{
+ as_status=$1; test $as_status -eq 0 && as_status=1
+ if test "$4"; then
+ as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
+ fi
+ $as_echo "$as_me: error: $2" >&2
+ as_fn_exit $as_status
+} # as_fn_error
+
+if expr a : '\(a\)' >/dev/null 2>&1 &&
+ test "X`expr 00001 : '.*\(...\)'`" = X001; then
+ as_expr=expr
+else
+ as_expr=false
+fi
+
+if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
+ as_basename=basename
+else
+ as_basename=false
+fi
+
+if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
+ as_dirname=dirname
+else
+ as_dirname=false
+fi
+
+as_me=`$as_basename -- "$0" ||
+$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
+ X"$0" : 'X\(//\)$' \| \
+ X"$0" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X/"$0" |
+ sed '/^.*\/\([^/][^/]*\)\/*$/{
+ s//\1/
+ q
+ }
+ /^X\/\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\/\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+
+# Avoid depending upon Character Ranges.
+as_cr_letters='abcdefghijklmnopqrstuvwxyz'
+as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
+as_cr_Letters=$as_cr_letters$as_cr_LETTERS
+as_cr_digits='0123456789'
+as_cr_alnum=$as_cr_Letters$as_cr_digits
+
+
+ as_lineno_1=$LINENO as_lineno_1a=$LINENO
+ as_lineno_2=$LINENO as_lineno_2a=$LINENO
+ eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
+ test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
+ # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-)
+ sed -n '
+ p
+ /[$]LINENO/=
+ ' <$as_myself |
+ sed '
+ s/[$]LINENO.*/&-/
+ t lineno
+ b
+ :lineno
+ N
+ :loop
+ s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
+ t loop
+ s/-\n.*//
+ ' >$as_me.lineno &&
+ chmod +x "$as_me.lineno" ||
+ { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
+
+ # Don't try to exec as it changes $[0], causing all sort of problems
+ # (the dirname of $[0] is not the place where we might find the
+ # original and so on. Autoconf is especially sensitive to this).
+ . "./$as_me.lineno"
+ # Exit status is that of the last command.
+ exit
+}
+
+ECHO_C= ECHO_N= ECHO_T=
+case `echo -n x` in #(((((
+-n*)
+ case `echo 'xy\c'` in
+ *c*) ECHO_T=' ';; # ECHO_T is single tab character.
+ xy) ECHO_C='\c';;
+ *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
+ ECHO_T=' ';;
+ esac;;
+*)
+ ECHO_N='-n';;
+esac
+
+rm -f conf$$ conf$$.exe conf$$.file
+if test -d conf$$.dir; then
+ rm -f conf$$.dir/conf$$.file
+else
+ rm -f conf$$.dir
+ mkdir conf$$.dir 2>/dev/null
+fi
+if (echo >conf$$.file) 2>/dev/null; then
+ if ln -s conf$$.file conf$$ 2>/dev/null; then
+ as_ln_s='ln -s'
+ # ... but there are two gotchas:
+ # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
+ # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
+ # In both cases, we have to default to `cp -p'.
+ ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
+ as_ln_s='cp -p'
+ elif ln conf$$.file conf$$ 2>/dev/null; then
+ as_ln_s=ln
+ else
+ as_ln_s='cp -p'
+ fi
+else
+ as_ln_s='cp -p'
+fi
+rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
+rmdir conf$$.dir 2>/dev/null
+
+if mkdir -p . 2>/dev/null; then
+ as_mkdir_p='mkdir -p "$as_dir"'
+else
+ test -d ./-p && rmdir ./-p
+ as_mkdir_p=false
+fi
+
+if test -x / >/dev/null 2>&1; then
+ as_test_x='test -x'
+else
+ if ls -dL / >/dev/null 2>&1; then
+ as_ls_L_option=L
+ else
+ as_ls_L_option=
+ fi
+ as_test_x='
+ eval sh -c '\''
+ if test -d "$1"; then
+ test -d "$1/.";
+ else
+ case $1 in #(
+ -*)set "./$1";;
+ esac;
+ case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
+ ???[sx]*):;;*)false;;esac;fi
+ '\'' sh
+ '
+fi
+as_executable_p=$as_test_x
+
+# Sed expression to map a string onto a valid CPP name.
+as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
+
+# Sed expression to map a string onto a valid variable name.
+as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
+
+
+test -n "$DJDIR" || exec 7<&0 </dev/null
+exec 6>&1
+
+# Name of the host.
+# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
+# so uname gets run too.
+ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
+
+#
+# Initializations.
+#
+ac_default_prefix=/usr/local
+ac_clean_files=
+ac_config_libobj_dir=.
+LIBOBJS=
+cross_compiling=no
+subdirs=
+MFLAGS=
+MAKEFLAGS=
+
+# Identity of this package.
+PACKAGE_NAME='newlib'
+PACKAGE_TARNAME='newlib'
+PACKAGE_VERSION='2.4.0'
+PACKAGE_STRING='newlib 2.4.0'
+PACKAGE_BUGREPORT=''
+PACKAGE_URL=''
+
+ac_unique_file="arm"
+enable_option_checking=no
+ac_subst_vars='LTLIBOBJS
+LIBOBJS
+HAVE_MACHINE_DIR_FALSE
+HAVE_MACHINE_DIR_TRUE
+CRT0
+subdirs
+sys_dir
+machine_dir
+libm_machine_dir
+lpfx
+aext
+oext
+OBJEXT
+USE_LIBTOOL_FALSE
+USE_LIBTOOL_TRUE
+ELIX_LEVEL_4_FALSE
+ELIX_LEVEL_4_TRUE
+ELIX_LEVEL_3_FALSE
+ELIX_LEVEL_3_TRUE
+ELIX_LEVEL_2_FALSE
+ELIX_LEVEL_2_TRUE
+ELIX_LEVEL_1_FALSE
+ELIX_LEVEL_1_TRUE
+ELIX_LEVEL_0_FALSE
+ELIX_LEVEL_0_TRUE
+LDFLAGS
+NO_INCLUDE_LIST
+NEWLIB_CFLAGS
+CCASFLAGS
+CCAS
+MAINT
+MAINTAINER_MODE_FALSE
+MAINTAINER_MODE_TRUE
+READELF
+RANLIB
+AR
+AS
+am__fastdepCC_FALSE
+am__fastdepCC_TRUE
+CCDEPMODE
+am__nodep
+AMDEPBACKSLASH
+AMDEP_FALSE
+AMDEP_TRUE
+am__quote
+am__include
+DEPDIR
+CC
+am__untar
+am__tar
+AMTAR
+am__leading_dot
+SET_MAKE
+AWK
+mkdir_p
+MKDIR_P
+INSTALL_STRIP_PROGRAM
+STRIP
+install_sh
+MAKEINFO
+AUTOHEADER
+AUTOMAKE
+AUTOCONF
+ACLOCAL
+VERSION
+PACKAGE
+CYGPATH_W
+am__isrc
+INSTALL_DATA
+INSTALL_SCRIPT
+INSTALL_PROGRAM
+host_os
+host_vendor
+host_cpu
+host
+build_os
+build_vendor
+build_cpu
+build
+newlib_basedir
+MAY_SUPPLY_SYSCALLS_FALSE
+MAY_SUPPLY_SYSCALLS_TRUE
+target_alias
+host_alias
+build_alias
+LIBS
+ECHO_T
+ECHO_N
+ECHO_C
+DEFS
+mandir
+localedir
+libdir
+psdir
+pdfdir
+dvidir
+htmldir
+infodir
+docdir
+oldincludedir
+includedir
+localstatedir
+sharedstatedir
+sysconfdir
+datadir
+datarootdir
+libexecdir
+sbindir
+bindir
+program_transform_name
+prefix
+exec_prefix
+PACKAGE_URL
+PACKAGE_BUGREPORT
+PACKAGE_STRING
+PACKAGE_VERSION
+PACKAGE_TARNAME
+PACKAGE_NAME
+PATH_SEPARATOR
+SHELL'
+ac_subst_files=''
+ac_user_opts='
+enable_option_checking
+enable_multilib
+enable_target_optspace
+enable_malloc_debugging
+enable_newlib_multithread
+enable_newlib_iconv
+enable_newlib_elix_level
+enable_newlib_io_float
+enable_newlib_supplied_syscalls
+enable_dependency_tracking
+enable_maintainer_mode
+'
+ ac_precious_vars='build_alias
+host_alias
+target_alias
+CCAS
+CCASFLAGS'
+ac_subdirs_all='arm
+esirisc
+i386
+powerpc'
+
+# Initialize some variables set by options.
+ac_init_help=
+ac_init_version=false
+ac_unrecognized_opts=
+ac_unrecognized_sep=
+# The variables have the same names as the options, with
+# dashes changed to underlines.
+cache_file=/dev/null
+exec_prefix=NONE
+no_create=
+no_recursion=
+prefix=NONE
+program_prefix=NONE
+program_suffix=NONE
+program_transform_name=s,x,x,
+silent=
+site=
+srcdir=
+verbose=
+x_includes=NONE
+x_libraries=NONE
+
+# Installation directory options.
+# These are left unexpanded so users can "make install exec_prefix=/foo"
+# and all the variables that are supposed to be based on exec_prefix
+# by default will actually change.
+# Use braces instead of parens because sh, perl, etc. also accept them.
+# (The list follows the same order as the GNU Coding Standards.)
+bindir='${exec_prefix}/bin'
+sbindir='${exec_prefix}/sbin'
+libexecdir='${exec_prefix}/libexec'
+datarootdir='${prefix}/share'
+datadir='${datarootdir}'
+sysconfdir='${prefix}/etc'
+sharedstatedir='${prefix}/com'
+localstatedir='${prefix}/var'
+includedir='${prefix}/include'
+oldincludedir='/usr/include'
+docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
+infodir='${datarootdir}/info'
+htmldir='${docdir}'
+dvidir='${docdir}'
+pdfdir='${docdir}'
+psdir='${docdir}'
+libdir='${exec_prefix}/lib'
+localedir='${datarootdir}/locale'
+mandir='${datarootdir}/man'
+
+ac_prev=
+ac_dashdash=
+for ac_option
+do
+ # If the previous option needs an argument, assign it.
+ if test -n "$ac_prev"; then
+ eval $ac_prev=\$ac_option
+ ac_prev=
+ continue
+ fi
+
+ case $ac_option in
+ *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
+ *=) ac_optarg= ;;
+ *) ac_optarg=yes ;;
+ esac
+
+ # Accept the important Cygnus configure options, so we can diagnose typos.
+
+ case $ac_dashdash$ac_option in
+ --)
+ ac_dashdash=yes ;;
+
+ -bindir | --bindir | --bindi | --bind | --bin | --bi)
+ ac_prev=bindir ;;
+ -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
+ bindir=$ac_optarg ;;
+
+ -build | --build | --buil | --bui | --bu)
+ ac_prev=build_alias ;;
+ -build=* | --build=* | --buil=* | --bui=* | --bu=*)
+ build_alias=$ac_optarg ;;
+
+ -cache-file | --cache-file | --cache-fil | --cache-fi \
+ | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
+ ac_prev=cache_file ;;
+ -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
+ | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
+ cache_file=$ac_optarg ;;
+
+ --config-cache | -C)
+ cache_file=config.cache ;;
+
+ -datadir | --datadir | --datadi | --datad)
+ ac_prev=datadir ;;
+ -datadir=* | --datadir=* | --datadi=* | --datad=*)
+ datadir=$ac_optarg ;;
+
+ -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
+ | --dataroo | --dataro | --datar)
+ ac_prev=datarootdir ;;
+ -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
+ | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
+ datarootdir=$ac_optarg ;;
+
+ -disable-* | --disable-*)
+ ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
+ # Reject names that are not valid shell variable names.
+ expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
+ as_fn_error $? "invalid feature name: $ac_useropt"
+ ac_useropt_orig=$ac_useropt
+ ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
+ case $ac_user_opts in
+ *"
+"enable_$ac_useropt"
+"*) ;;
+ *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
+ ac_unrecognized_sep=', ';;
+ esac
+ eval enable_$ac_useropt=no ;;
+
+ -docdir | --docdir | --docdi | --doc | --do)
+ ac_prev=docdir ;;
+ -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
+ docdir=$ac_optarg ;;
+
+ -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
+ ac_prev=dvidir ;;
+ -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
+ dvidir=$ac_optarg ;;
+
+ -enable-* | --enable-*)
+ ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
+ # Reject names that are not valid shell variable names.
+ expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
+ as_fn_error $? "invalid feature name: $ac_useropt"
+ ac_useropt_orig=$ac_useropt
+ ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
+ case $ac_user_opts in
+ *"
+"enable_$ac_useropt"
+"*) ;;
+ *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
+ ac_unrecognized_sep=', ';;
+ esac
+ eval enable_$ac_useropt=\$ac_optarg ;;
+
+ -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
+ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
+ | --exec | --exe | --ex)
+ ac_prev=exec_prefix ;;
+ -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
+ | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
+ | --exec=* | --exe=* | --ex=*)
+ exec_prefix=$ac_optarg ;;
+
+ -gas | --gas | --ga | --g)
+ # Obsolete; use --with-gas.
+ with_gas=yes ;;
+
+ -help | --help | --hel | --he | -h)
+ ac_init_help=long ;;
+ -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
+ ac_init_help=recursive ;;
+ -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
+ ac_init_help=short ;;
+
+ -host | --host | --hos | --ho)
+ ac_prev=host_alias ;;
+ -host=* | --host=* | --hos=* | --ho=*)
+ host_alias=$ac_optarg ;;
+
+ -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
+ ac_prev=htmldir ;;
+ -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
+ | --ht=*)
+ htmldir=$ac_optarg ;;
+
+ -includedir | --includedir | --includedi | --included | --include \
+ | --includ | --inclu | --incl | --inc)
+ ac_prev=includedir ;;
+ -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
+ | --includ=* | --inclu=* | --incl=* | --inc=*)
+ includedir=$ac_optarg ;;
+
+ -infodir | --infodir | --infodi | --infod | --info | --inf)
+ ac_prev=infodir ;;
+ -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
+ infodir=$ac_optarg ;;
+
+ -libdir | --libdir | --libdi | --libd)
+ ac_prev=libdir ;;
+ -libdir=* | --libdir=* | --libdi=* | --libd=*)
+ libdir=$ac_optarg ;;
+
+ -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
+ | --libexe | --libex | --libe)
+ ac_prev=libexecdir ;;
+ -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
+ | --libexe=* | --libex=* | --libe=*)
+ libexecdir=$ac_optarg ;;
+
+ -localedir | --localedir | --localedi | --localed | --locale)
+ ac_prev=localedir ;;
+ -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
+ localedir=$ac_optarg ;;
+
+ -localstatedir | --localstatedir | --localstatedi | --localstated \
+ | --localstate | --localstat | --localsta | --localst | --locals)
+ ac_prev=localstatedir ;;
+ -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
+ | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
+ localstatedir=$ac_optarg ;;
+
+ -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
+ ac_prev=mandir ;;
+ -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
+ mandir=$ac_optarg ;;
+
+ -nfp | --nfp | --nf)
+ # Obsolete; use --without-fp.
+ with_fp=no ;;
+
+ -no-create | --no-create | --no-creat | --no-crea | --no-cre \
+ | --no-cr | --no-c | -n)
+ no_create=yes ;;
+
+ -no-recursion | --no-recursion | --no-recursio | --no-recursi \
+ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
+ no_recursion=yes ;;
+
+ -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
+ | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
+ | --oldin | --oldi | --old | --ol | --o)
+ ac_prev=oldincludedir ;;
+ -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
+ | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
+ | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
+ oldincludedir=$ac_optarg ;;
+
+ -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
+ ac_prev=prefix ;;
+ -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
+ prefix=$ac_optarg ;;
+
+ -program-prefix | --program-prefix | --program-prefi | --program-pref \
+ | --program-pre | --program-pr | --program-p)
+ ac_prev=program_prefix ;;
+ -program-prefix=* | --program-prefix=* | --program-prefi=* \
+ | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
+ program_prefix=$ac_optarg ;;
+
+ -program-suffix | --program-suffix | --program-suffi | --program-suff \
+ | --program-suf | --program-su | --program-s)
+ ac_prev=program_suffix ;;
+ -program-suffix=* | --program-suffix=* | --program-suffi=* \
+ | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
+ program_suffix=$ac_optarg ;;
+
+ -program-transform-name | --program-transform-name \
+ | --program-transform-nam | --program-transform-na \
+ | --program-transform-n | --program-transform- \
+ | --program-transform | --program-transfor \
+ | --program-transfo | --program-transf \
+ | --program-trans | --program-tran \
+ | --progr-tra | --program-tr | --program-t)
+ ac_prev=program_transform_name ;;
+ -program-transform-name=* | --program-transform-name=* \
+ | --program-transform-nam=* | --program-transform-na=* \
+ | --program-transform-n=* | --program-transform-=* \
+ | --program-transform=* | --program-transfor=* \
+ | --program-transfo=* | --program-transf=* \
+ | --program-trans=* | --program-tran=* \
+ | --progr-tra=* | --program-tr=* | --program-t=*)
+ program_transform_name=$ac_optarg ;;
+
+ -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
+ ac_prev=pdfdir ;;
+ -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
+ pdfdir=$ac_optarg ;;
+
+ -psdir | --psdir | --psdi | --psd | --ps)
+ ac_prev=psdir ;;
+ -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
+ psdir=$ac_optarg ;;
+
+ -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+ | -silent | --silent | --silen | --sile | --sil)
+ silent=yes ;;
+
+ -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
+ ac_prev=sbindir ;;
+ -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
+ | --sbi=* | --sb=*)
+ sbindir=$ac_optarg ;;
+
+ -sharedstatedir | --sharedstatedir | --sharedstatedi \
+ | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
+ | --sharedst | --shareds | --shared | --share | --shar \
+ | --sha | --sh)
+ ac_prev=sharedstatedir ;;
+ -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
+ | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
+ | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
+ | --sha=* | --sh=*)
+ sharedstatedir=$ac_optarg ;;
+
+ -site | --site | --sit)
+ ac_prev=site ;;
+ -site=* | --site=* | --sit=*)
+ site=$ac_optarg ;;
+
+ -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
+ ac_prev=srcdir ;;
+ -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
+ srcdir=$ac_optarg ;;
+
+ -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
+ | --syscon | --sysco | --sysc | --sys | --sy)
+ ac_prev=sysconfdir ;;
+ -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
+ | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
+ sysconfdir=$ac_optarg ;;
+
+ -target | --target | --targe | --targ | --tar | --ta | --t)
+ ac_prev=target_alias ;;
+ -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
+ target_alias=$ac_optarg ;;
+
+ -v | -verbose | --verbose | --verbos | --verbo | --verb)
+ verbose=yes ;;
+
+ -version | --version | --versio | --versi | --vers | -V)
+ ac_init_version=: ;;
+
+ -with-* | --with-*)
+ ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
+ # Reject names that are not valid shell variable names.
+ expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
+ as_fn_error $? "invalid package name: $ac_useropt"
+ ac_useropt_orig=$ac_useropt
+ ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
+ case $ac_user_opts in
+ *"
+"with_$ac_useropt"
+"*) ;;
+ *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
+ ac_unrecognized_sep=', ';;
+ esac
+ eval with_$ac_useropt=\$ac_optarg ;;
+
+ -without-* | --without-*)
+ ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
+ # Reject names that are not valid shell variable names.
+ expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
+ as_fn_error $? "invalid package name: $ac_useropt"
+ ac_useropt_orig=$ac_useropt
+ ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
+ case $ac_user_opts in
+ *"
+"with_$ac_useropt"
+"*) ;;
+ *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
+ ac_unrecognized_sep=', ';;
+ esac
+ eval with_$ac_useropt=no ;;
+
+ --x)
+ # Obsolete; use --with-x.
+ with_x=yes ;;
+
+ -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
+ | --x-incl | --x-inc | --x-in | --x-i)
+ ac_prev=x_includes ;;
+ -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
+ | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
+ x_includes=$ac_optarg ;;
+
+ -x-libraries | --x-libraries | --x-librarie | --x-librari \
+ | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
+ ac_prev=x_libraries ;;
+ -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
+ | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
+ x_libraries=$ac_optarg ;;
+
+ -*) as_fn_error $? "unrecognized option: \`$ac_option'
+Try \`$0 --help' for more information"
+ ;;
+
+ *=*)
+ ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
+ # Reject names that are not valid shell variable names.
+ case $ac_envvar in #(
+ '' | [0-9]* | *[!_$as_cr_alnum]* )
+ as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
+ esac
+ eval $ac_envvar=\$ac_optarg
+ export $ac_envvar ;;
+
+ *)
+ # FIXME: should be removed in autoconf 3.0.
+ $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
+ expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
+ $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
+ : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
+ ;;
+
+ esac
+done
+
+if test -n "$ac_prev"; then
+ ac_option=--`echo $ac_prev | sed 's/_/-/g'`
+ as_fn_error $? "missing argument to $ac_option"
+fi
+
+if test -n "$ac_unrecognized_opts"; then
+ case $enable_option_checking in
+ no) ;;
+ fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
+ *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
+ esac
+fi
+
+# Check all directory arguments for consistency.
+for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
+ datadir sysconfdir sharedstatedir localstatedir includedir \
+ oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
+ libdir localedir mandir
+do
+ eval ac_val=\$$ac_var
+ # Remove trailing slashes.
+ case $ac_val in
+ */ )
+ ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
+ eval $ac_var=\$ac_val;;
+ esac
+ # Be sure to have absolute directory names.
+ case $ac_val in
+ [\\/$]* | ?:[\\/]* ) continue;;
+ NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
+ esac
+ as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
+done
+
+# There might be people who depend on the old broken behavior: `$host'
+# used to hold the argument of --host etc.
+# FIXME: To remove some day.
+build=$build_alias
+host=$host_alias
+target=$target_alias
+
+# FIXME: To remove some day.
+if test "x$host_alias" != x; then
+ if test "x$build_alias" = x; then
+ cross_compiling=maybe
+ $as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host.
+ If a cross compiler is detected then cross compile mode will be used" >&2
+ elif test "x$build_alias" != "x$host_alias"; then
+ cross_compiling=yes
+ fi
+fi
+
+ac_tool_prefix=
+test -n "$host_alias" && ac_tool_prefix=$host_alias-
+
+test "$silent" = yes && exec 6>/dev/null
+
+
+ac_pwd=`pwd` && test -n "$ac_pwd" &&
+ac_ls_di=`ls -di .` &&
+ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
+ as_fn_error $? "working directory cannot be determined"
+test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
+ as_fn_error $? "pwd does not report name of working directory"
+
+
+# Find the source files, if location was not specified.
+if test -z "$srcdir"; then
+ ac_srcdir_defaulted=yes
+ # Try the directory containing this script, then the parent directory.
+ ac_confdir=`$as_dirname -- "$as_myself" ||
+$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$as_myself" : 'X\(//\)[^/]' \| \
+ X"$as_myself" : 'X\(//\)$' \| \
+ X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$as_myself" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)[^/].*/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+ srcdir=$ac_confdir
+ if test ! -r "$srcdir/$ac_unique_file"; then
+ srcdir=..
+ fi
+else
+ ac_srcdir_defaulted=no
+fi
+if test ! -r "$srcdir/$ac_unique_file"; then
+ test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
+ as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
+fi
+ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
+ac_abs_confdir=`(
+ cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
+ pwd)`
+# When building in place, set srcdir=.
+if test "$ac_abs_confdir" = "$ac_pwd"; then
+ srcdir=.
+fi
+# Remove unnecessary trailing slashes from srcdir.
+# Double slashes in file names in object file debugging info
+# mess up M-x gdb in Emacs.
+case $srcdir in
+*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
+esac
+for ac_var in $ac_precious_vars; do
+ eval ac_env_${ac_var}_set=\${${ac_var}+set}
+ eval ac_env_${ac_var}_value=\$${ac_var}
+ eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
+ eval ac_cv_env_${ac_var}_value=\$${ac_var}
+done
+
+#
+# Report the --help message.
+#
+if test "$ac_init_help" = "long"; then
+ # Omit some internal or obsolete options to make the list less imposing.
+ # This message is too long to be a string in the A/UX 3.1 sh.
+ cat <<_ACEOF
+\`configure' configures newlib 2.4.0 to adapt to many kinds of systems.
+
+Usage: $0 [OPTION]... [VAR=VALUE]...
+
+To assign environment variables (e.g., CC, CFLAGS...), specify them as
+VAR=VALUE. See below for descriptions of some of the useful variables.
+
+Defaults for the options are specified in brackets.
+
+Configuration:
+ -h, --help display this help and exit
+ --help=short display options specific to this package
+ --help=recursive display the short help of all the included packages
+ -V, --version display version information and exit
+ -q, --quiet, --silent do not print \`checking ...' messages
+ --cache-file=FILE cache test results in FILE [disabled]
+ -C, --config-cache alias for \`--cache-file=config.cache'
+ -n, --no-create do not create output files
+ --srcdir=DIR find the sources in DIR [configure dir or \`..']
+
+Installation directories:
+ --prefix=PREFIX install architecture-independent files in PREFIX
+ [$ac_default_prefix]
+ --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
+ [PREFIX]
+
+By default, \`make install' will install all the files in
+\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
+an installation prefix other than \`$ac_default_prefix' using \`--prefix',
+for instance \`--prefix=\$HOME'.
+
+For better control, use the options below.
+
+Fine tuning of the installation directories:
+ --bindir=DIR user executables [EPREFIX/bin]
+ --sbindir=DIR system admin executables [EPREFIX/sbin]
+ --libexecdir=DIR program executables [EPREFIX/libexec]
+ --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
+ --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
+ --localstatedir=DIR modifiable single-machine data [PREFIX/var]
+ --libdir=DIR object code libraries [EPREFIX/lib]
+ --includedir=DIR C header files [PREFIX/include]
+ --oldincludedir=DIR C header files for non-gcc [/usr/include]
+ --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
+ --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
+ --infodir=DIR info documentation [DATAROOTDIR/info]
+ --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
+ --mandir=DIR man documentation [DATAROOTDIR/man]
+ --docdir=DIR documentation root [DATAROOTDIR/doc/newlib]
+ --htmldir=DIR html documentation [DOCDIR]
+ --dvidir=DIR dvi documentation [DOCDIR]
+ --pdfdir=DIR pdf documentation [DOCDIR]
+ --psdir=DIR ps documentation [DOCDIR]
+_ACEOF
+
+ cat <<\_ACEOF
+
+Program names:
+ --program-prefix=PREFIX prepend PREFIX to installed program names
+ --program-suffix=SUFFIX append SUFFIX to installed program names
+ --program-transform-name=PROGRAM run sed PROGRAM on installed program names
+
+System types:
+ --build=BUILD configure for building on BUILD [guessed]
+ --host=HOST cross-compile to build programs to run on HOST [BUILD]
+_ACEOF
+fi
+
+if test -n "$ac_init_help"; then
+ case $ac_init_help in
+ short | recursive ) echo "Configuration of newlib 2.4.0:";;
+ esac
+ cat <<\_ACEOF
+
+Optional Features:
+ --disable-option-checking ignore unrecognized --enable/--with options
+ --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
+ --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
+ --enable-multilib build many library versions (default)
+ --enable-target-optspace optimize for space
+ --enable-malloc-debugging indicate malloc debugging requested
+ --enable-newlib-multithread enable support for multiple threads
+ --enable-newlib-iconv enable iconv library support
+ --enable-newlib-elix-level supply desired elix library level (1-4)
+ --disable-newlib-io-float disable printf/scanf family float support
+ --disable-newlib-supplied-syscalls disable newlib from supplying syscalls
+ --disable-dependency-tracking speeds up one-time build
+ --enable-dependency-tracking do not reject slow dependency extractors
+ --enable-maintainer-mode enable make rules and dependencies not useful
+ (and sometimes confusing) to the casual installer
+
+Some influential environment variables:
+ CCAS assembler compiler command (defaults to CC)
+ CCASFLAGS assembler compiler flags (defaults to CFLAGS)
+
+Use these variables to override the choices made by `configure' or to help
+it to find libraries and programs with nonstandard names/locations.
+
+Report bugs to the package provider.
+_ACEOF
+ac_status=$?
+fi
+
+if test "$ac_init_help" = "recursive"; then
+ # If there are subdirs, report their specific --help.
+ for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
+ test -d "$ac_dir" ||
+ { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
+ continue
+ ac_builddir=.
+
+case "$ac_dir" in
+.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
+*)
+ ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
+ # A ".." for each directory in $ac_dir_suffix.
+ ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
+ case $ac_top_builddir_sub in
+ "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
+ *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
+ esac ;;
+esac
+ac_abs_top_builddir=$ac_pwd
+ac_abs_builddir=$ac_pwd$ac_dir_suffix
+# for backward compatibility:
+ac_top_builddir=$ac_top_build_prefix
+
+case $srcdir in
+ .) # We are building in place.
+ ac_srcdir=.
+ ac_top_srcdir=$ac_top_builddir_sub
+ ac_abs_top_srcdir=$ac_pwd ;;
+ [\\/]* | ?:[\\/]* ) # Absolute name.
+ ac_srcdir=$srcdir$ac_dir_suffix;
+ ac_top_srcdir=$srcdir
+ ac_abs_top_srcdir=$srcdir ;;
+ *) # Relative name.
+ ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
+ ac_top_srcdir=$ac_top_build_prefix$srcdir
+ ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
+esac
+ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
+
+ cd "$ac_dir" || { ac_status=$?; continue; }
+ # Check for guested configure.
+ if test -f "$ac_srcdir/configure.gnu"; then
+ echo &&
+ $SHELL "$ac_srcdir/configure.gnu" --help=recursive
+ elif test -f "$ac_srcdir/configure"; then
+ echo &&
+ $SHELL "$ac_srcdir/configure" --help=recursive
+ else
+ $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
+ fi || ac_status=$?
+ cd "$ac_pwd" || { ac_status=$?; break; }
+ done
+fi
+
+test -n "$ac_init_help" && exit $ac_status
+if $ac_init_version; then
+ cat <<\_ACEOF
+newlib configure 2.4.0
+generated by GNU Autoconf 2.68
+
+Copyright (C) 2010 Free Software Foundation, Inc.
+This configure script is free software; the Free Software Foundation
+gives unlimited permission to copy, distribute and modify it.
+_ACEOF
+ exit
+fi
+
+## ------------------------ ##
+## Autoconf initialization. ##
+## ------------------------ ##
+
+# ac_fn_c_try_compile LINENO
+# --------------------------
+# Try to compile conftest.$ac_ext, and return whether this succeeded.
+ac_fn_c_try_compile ()
+{
+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ rm -f conftest.$ac_objext
+ if { { ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_compile") 2>conftest.err
+ ac_status=$?
+ if test -s conftest.err; then
+ grep -v '^ *+' conftest.err >conftest.er1
+ cat conftest.er1 >&5
+ mv -f conftest.er1 conftest.err
+ fi
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then :
+ ac_retval=0
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_retval=1
+fi
+ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+ as_fn_set_status $ac_retval
+
+} # ac_fn_c_try_compile
+cat >config.log <<_ACEOF
+This file contains any messages produced by compilers while
+running configure, to aid debugging if configure makes a mistake.
+
+It was created by newlib $as_me 2.4.0, which was
+generated by GNU Autoconf 2.68. Invocation command line was
+
+ $ $0 $@
+
+_ACEOF
+exec 5>>config.log
+{
+cat <<_ASUNAME
+## --------- ##
+## Platform. ##
+## --------- ##
+
+hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
+uname -m = `(uname -m) 2>/dev/null || echo unknown`
+uname -r = `(uname -r) 2>/dev/null || echo unknown`
+uname -s = `(uname -s) 2>/dev/null || echo unknown`
+uname -v = `(uname -v) 2>/dev/null || echo unknown`
+
+/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
+/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
+
+/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
+/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
+/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
+/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
+/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
+/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
+/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
+
+_ASUNAME
+
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ $as_echo "PATH: $as_dir"
+ done
+IFS=$as_save_IFS
+
+} >&5
+
+cat >&5 <<_ACEOF
+
+
+## ----------- ##
+## Core tests. ##
+## ----------- ##
+
+_ACEOF
+
+
+# Keep a trace of the command line.
+# Strip out --no-create and --no-recursion so they do not pile up.
+# Strip out --silent because we don't want to record it for future runs.
+# Also quote any args containing shell meta-characters.
+# Make two passes to allow for proper duplicate-argument suppression.
+ac_configure_args=
+ac_configure_args0=
+ac_configure_args1=
+ac_must_keep_next=false
+for ac_pass in 1 2
+do
+ for ac_arg
+ do
+ case $ac_arg in
+ -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
+ -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+ | -silent | --silent | --silen | --sile | --sil)
+ continue ;;
+ *\'*)
+ ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
+ esac
+ case $ac_pass in
+ 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
+ 2)
+ as_fn_append ac_configure_args1 " '$ac_arg'"
+ if test $ac_must_keep_next = true; then
+ ac_must_keep_next=false # Got value, back to normal.
+ else
+ case $ac_arg in
+ *=* | --config-cache | -C | -disable-* | --disable-* \
+ | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
+ | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
+ | -with-* | --with-* | -without-* | --without-* | --x)
+ case "$ac_configure_args0 " in
+ "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
+ esac
+ ;;
+ -* ) ac_must_keep_next=true ;;
+ esac
+ fi
+ as_fn_append ac_configure_args " '$ac_arg'"
+ ;;
+ esac
+ done
+done
+{ ac_configure_args0=; unset ac_configure_args0;}
+{ ac_configure_args1=; unset ac_configure_args1;}
+
+# When interrupted or exit'd, cleanup temporary files, and complete
+# config.log. We remove comments because anyway the quotes in there
+# would cause problems or look ugly.
+# WARNING: Use '\'' to represent an apostrophe within the trap.
+# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
+trap 'exit_status=$?
+ # Save into config.log some information that might help in debugging.
+ {
+ echo
+
+ $as_echo "## ---------------- ##
+## Cache variables. ##
+## ---------------- ##"
+ echo
+ # The following way of writing the cache mishandles newlines in values,
+(
+ for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
+ eval ac_val=\$$ac_var
+ case $ac_val in #(
+ *${as_nl}*)
+ case $ac_var in #(
+ *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
+$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
+ esac
+ case $ac_var in #(
+ _ | IFS | as_nl) ;; #(
+ BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
+ *) { eval $ac_var=; unset $ac_var;} ;;
+ esac ;;
+ esac
+ done
+ (set) 2>&1 |
+ case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
+ *${as_nl}ac_space=\ *)
+ sed -n \
+ "s/'\''/'\''\\\\'\'''\''/g;
+ s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
+ ;; #(
+ *)
+ sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
+ ;;
+ esac |
+ sort
+)
+ echo
+
+ $as_echo "## ----------------- ##
+## Output variables. ##
+## ----------------- ##"
+ echo
+ for ac_var in $ac_subst_vars
+ do
+ eval ac_val=\$$ac_var
+ case $ac_val in
+ *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
+ esac
+ $as_echo "$ac_var='\''$ac_val'\''"
+ done | sort
+ echo
+
+ if test -n "$ac_subst_files"; then
+ $as_echo "## ------------------- ##
+## File substitutions. ##
+## ------------------- ##"
+ echo
+ for ac_var in $ac_subst_files
+ do
+ eval ac_val=\$$ac_var
+ case $ac_val in
+ *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
+ esac
+ $as_echo "$ac_var='\''$ac_val'\''"
+ done | sort
+ echo
+ fi
+
+ if test -s confdefs.h; then
+ $as_echo "## ----------- ##
+## confdefs.h. ##
+## ----------- ##"
+ echo
+ cat confdefs.h
+ echo
+ fi
+ test "$ac_signal" != 0 &&
+ $as_echo "$as_me: caught signal $ac_signal"
+ $as_echo "$as_me: exit $exit_status"
+ } >&5
+ rm -f core *.core core.conftest.* &&
+ rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
+ exit $exit_status
+' 0
+for ac_signal in 1 2 13 15; do
+ trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
+done
+ac_signal=0
+
+# confdefs.h avoids OS command line length limits that DEFS can exceed.
+rm -f -r conftest* confdefs.h
+
+$as_echo "/* confdefs.h */" > confdefs.h
+
+# Predefined preprocessor variables.
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_NAME "$PACKAGE_NAME"
+_ACEOF
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
+_ACEOF
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_VERSION "$PACKAGE_VERSION"
+_ACEOF
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_STRING "$PACKAGE_STRING"
+_ACEOF
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
+_ACEOF
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_URL "$PACKAGE_URL"
+_ACEOF
+
+
+# Let the site file select an alternate cache file if it wants to.
+# Prefer an explicitly selected file to automatically selected ones.
+ac_site_file1=NONE
+ac_site_file2=NONE
+if test -n "$CONFIG_SITE"; then
+ # We do not want a PATH search for config.site.
+ case $CONFIG_SITE in #((
+ -*) ac_site_file1=./$CONFIG_SITE;;
+ */*) ac_site_file1=$CONFIG_SITE;;
+ *) ac_site_file1=./$CONFIG_SITE;;
+ esac
+elif test "x$prefix" != xNONE; then
+ ac_site_file1=$prefix/share/config.site
+ ac_site_file2=$prefix/etc/config.site
+else
+ ac_site_file1=$ac_default_prefix/share/config.site
+ ac_site_file2=$ac_default_prefix/etc/config.site
+fi
+for ac_site_file in "$ac_site_file1" "$ac_site_file2"
+do
+ test "x$ac_site_file" = xNONE && continue
+ if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
+$as_echo "$as_me: loading site script $ac_site_file" >&6;}
+ sed 's/^/| /' "$ac_site_file" >&5
+ . "$ac_site_file" \
+ || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "failed to load site script $ac_site_file
+See \`config.log' for more details" "$LINENO" 5; }
+ fi
+done
+
+if test -r "$cache_file"; then
+ # Some versions of bash will fail to source /dev/null (special files
+ # actually), so we avoid doing that. DJGPP emulates it as a regular file.
+ if test /dev/null != "$cache_file" && test -f "$cache_file"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
+$as_echo "$as_me: loading cache $cache_file" >&6;}
+ case $cache_file in
+ [\\/]* | ?:[\\/]* ) . "$cache_file";;
+ *) . "./$cache_file";;
+ esac
+ fi
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
+$as_echo "$as_me: creating cache $cache_file" >&6;}
+ >$cache_file
+fi
+
+# Check that the precious variables saved in the cache have kept the same
+# value.
+ac_cache_corrupted=false
+for ac_var in $ac_precious_vars; do
+ eval ac_old_set=\$ac_cv_env_${ac_var}_set
+ eval ac_new_set=\$ac_env_${ac_var}_set
+ eval ac_old_val=\$ac_cv_env_${ac_var}_value
+ eval ac_new_val=\$ac_env_${ac_var}_value
+ case $ac_old_set,$ac_new_set in
+ set,)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
+$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
+ ac_cache_corrupted=: ;;
+ ,set)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
+$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
+ ac_cache_corrupted=: ;;
+ ,);;
+ *)
+ if test "x$ac_old_val" != "x$ac_new_val"; then
+ # differences in whitespace do not lead to failure.
+ ac_old_val_w=`echo x $ac_old_val`
+ ac_new_val_w=`echo x $ac_new_val`
+ if test "$ac_old_val_w" != "$ac_new_val_w"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
+$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
+ ac_cache_corrupted=:
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
+$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
+ eval $ac_var=\$ac_old_val
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
+$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
+$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
+ fi;;
+ esac
+ # Pass precious variables to config.status.
+ if test "$ac_new_set" = set; then
+ case $ac_new_val in
+ *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
+ *) ac_arg=$ac_var=$ac_new_val ;;
+ esac
+ case " $ac_configure_args " in
+ *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
+ *) as_fn_append ac_configure_args " '$ac_arg'" ;;
+ esac
+ fi
+done
+if $ac_cache_corrupted; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
+$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
+ as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
+fi
+## -------------------- ##
+## Main body of script. ##
+## -------------------- ##
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+
+
+ac_aux_dir=
+for ac_dir in ../../../../.. "$srcdir"/../../../../..; do
+ if test -f "$ac_dir/install-sh"; then
+ ac_aux_dir=$ac_dir
+ ac_install_sh="$ac_aux_dir/install-sh -c"
+ break
+ elif test -f "$ac_dir/install.sh"; then
+ ac_aux_dir=$ac_dir
+ ac_install_sh="$ac_aux_dir/install.sh -c"
+ break
+ elif test -f "$ac_dir/shtool"; then
+ ac_aux_dir=$ac_dir
+ ac_install_sh="$ac_aux_dir/shtool install -c"
+ break
+ fi
+done
+if test -z "$ac_aux_dir"; then
+ as_fn_error $? "cannot find install-sh, install.sh, or shtool in ../../../../.. \"$srcdir\"/../../../../.." "$LINENO" 5
+fi
+
+# These three variables are undocumented and unsupported,
+# and are intended to be withdrawn in a future Autoconf release.
+# They can cause serious problems if a builder's source tree is in a directory
+# whose full name contains unusual characters.
+ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
+ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
+ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
+
+
+
+
+# Make sure we can run config.sub.
+$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
+ as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
+$as_echo_n "checking build system type... " >&6; }
+if ${ac_cv_build+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_build_alias=$build_alias
+test "x$ac_build_alias" = x &&
+ ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
+test "x$ac_build_alias" = x &&
+ as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
+ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
+ as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
+$as_echo "$ac_cv_build" >&6; }
+case $ac_cv_build in
+*-*-*) ;;
+*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
+esac
+build=$ac_cv_build
+ac_save_IFS=$IFS; IFS='-'
+set x $ac_cv_build
+shift
+build_cpu=$1
+build_vendor=$2
+shift; shift
+# Remember, the first character of IFS is used to create $*,
+# except with old shells:
+build_os=$*
+IFS=$ac_save_IFS
+case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
+$as_echo_n "checking host system type... " >&6; }
+if ${ac_cv_host+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test "x$host_alias" = x; then
+ ac_cv_host=$ac_cv_build
+else
+ ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
+ as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
+$as_echo "$ac_cv_host" >&6; }
+case $ac_cv_host in
+*-*-*) ;;
+*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
+esac
+host=$ac_cv_host
+ac_save_IFS=$IFS; IFS='-'
+set x $ac_cv_host
+shift
+host_cpu=$1
+host_vendor=$2
+shift; shift
+# Remember, the first character of IFS is used to create $*,
+# except with old shells:
+host_os=$*
+IFS=$ac_save_IFS
+case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
+
+
+am__api_version='1.11'
+
+# Find a good install program. We prefer a C program (faster),
+# so one script is as good as another. But avoid the broken or
+# incompatible versions:
+# SysV /etc/install, /usr/sbin/install
+# SunOS /usr/etc/install
+# IRIX /sbin/install
+# AIX /bin/install
+# AmigaOS /C/install, which installs bootblocks on floppy discs
+# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
+# AFS /usr/afsws/bin/install, which mishandles nonexistent args
+# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
+# OS/2's system install, which has a completely different semantic
+# ./install, which can be erroneously created by make from ./install.sh.
+# Reject install programs that cannot install multiple files.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
+$as_echo_n "checking for a BSD-compatible install... " >&6; }
+if test -z "$INSTALL"; then
+if ${ac_cv_path_install+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ # Account for people who put trailing slashes in PATH elements.
+case $as_dir/ in #((
+ ./ | .// | /[cC]/* | \
+ /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
+ ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
+ /usr/ucb/* ) ;;
+ *)
+ # OSF1 and SCO ODT 3.0 have their own names for install.
+ # Don't use installbsd from OSF since it installs stuff as root
+ # by default.
+ for ac_prog in ginstall scoinst install; do
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
+ if test $ac_prog = install &&
+ grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
+ # AIX install. It has an incompatible calling convention.
+ :
+ elif test $ac_prog = install &&
+ grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
+ # program-specific install script used by HP pwplus--don't use.
+ :
+ else
+ rm -rf conftest.one conftest.two conftest.dir
+ echo one > conftest.one
+ echo two > conftest.two
+ mkdir conftest.dir
+ if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
+ test -s conftest.one && test -s conftest.two &&
+ test -s conftest.dir/conftest.one &&
+ test -s conftest.dir/conftest.two
+ then
+ ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
+ break 3
+ fi
+ fi
+ fi
+ done
+ done
+ ;;
+esac
+
+ done
+IFS=$as_save_IFS
+
+rm -rf conftest.one conftest.two conftest.dir
+
+fi
+ if test "${ac_cv_path_install+set}" = set; then
+ INSTALL=$ac_cv_path_install
+ else
+ # As a last resort, use the slow shell script. Don't cache a
+ # value for INSTALL within a source directory, because that will
+ # break other packages using the cache if that directory is
+ # removed, or if the value is a relative name.
+ INSTALL=$ac_install_sh
+ fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
+$as_echo "$INSTALL" >&6; }
+
+# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
+# It thinks the first close brace ends the variable substitution.
+test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
+
+test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
+
+test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5
+$as_echo_n "checking whether build environment is sane... " >&6; }
+# Just in case
+sleep 1
+echo timestamp > conftest.file
+# Reject unsafe characters in $srcdir or the absolute working directory
+# name. Accept space and tab only in the latter.
+am_lf='
+'
+case `pwd` in
+ *[\\\"\#\$\&\'\`$am_lf]*)
+ as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5;;
+esac
+case $srcdir in
+ *[\\\"\#\$\&\'\`$am_lf\ \ ]*)
+ as_fn_error $? "unsafe srcdir value: \`$srcdir'" "$LINENO" 5;;
+esac
+
+# Do `set' in a subshell so we don't clobber the current shell's
+# arguments. Must try -L first in case configure is actually a
+# symlink; some systems play weird games with the mod time of symlinks
+# (eg FreeBSD returns the mod time of the symlink's containing
+# directory).
+if (
+ set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
+ if test "$*" = "X"; then
+ # -L didn't work.
+ set X `ls -t "$srcdir/configure" conftest.file`
+ fi
+ rm -f conftest.file
+ if test "$*" != "X $srcdir/configure conftest.file" \
+ && test "$*" != "X conftest.file $srcdir/configure"; then
+
+ # If neither matched, then we have a broken ls. This can happen
+ # if, for instance, CONFIG_SHELL is bash and it inherits a
+ # broken ls alias from the environment. This has actually
+ # happened. Such a system could not be considered "sane".
+ as_fn_error $? "ls -t appears to fail. Make sure there is not a broken
+alias in your environment" "$LINENO" 5
+ fi
+
+ test "$2" = conftest.file
+ )
+then
+ # Ok.
+ :
+else
+ as_fn_error $? "newly created file is older than distributed files!
+Check your system clock" "$LINENO" 5
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+test "$program_prefix" != NONE &&
+ program_transform_name="s&^&$program_prefix&;$program_transform_name"
+# Use a double $ so make ignores it.
+test "$program_suffix" != NONE &&
+ program_transform_name="s&\$&$program_suffix&;$program_transform_name"
+# Double any \ or $.
+# By default was `s,x,x', remove it if useless.
+ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
+program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"`
+
+# expand $ac_aux_dir to an absolute path
+am_aux_dir=`cd $ac_aux_dir && pwd`
+
+if test x"${MISSING+set}" != xset; then
+ case $am_aux_dir in
+ *\ * | *\ *)
+ MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
+ *)
+ MISSING="\${SHELL} $am_aux_dir/missing" ;;
+ esac
+fi
+# Use eval to expand $SHELL
+if eval "$MISSING --run true"; then
+ am_missing_run="$MISSING --run "
+else
+ am_missing_run=
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`missing' script is too old or missing" >&5
+$as_echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;}
+fi
+
+if test x"${install_sh}" != xset; then
+ case $am_aux_dir in
+ *\ * | *\ *)
+ install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
+ *)
+ install_sh="\${SHELL} $am_aux_dir/install-sh"
+ esac
+fi
+
+# Installed binaries are usually stripped using `strip' when the user
+# run `make install-strip'. However `strip' might not be the right
+# tool to use in cross-compilation environments, therefore Automake
+# will honor the `STRIP' environment variable to overrule this program.
+if test "$cross_compiling" != no; then
+ if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
+set dummy ${ac_tool_prefix}strip; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_STRIP+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$STRIP"; then
+ ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_STRIP="${ac_tool_prefix}strip"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+STRIP=$ac_cv_prog_STRIP
+if test -n "$STRIP"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
+$as_echo "$STRIP" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_STRIP"; then
+ ac_ct_STRIP=$STRIP
+ # Extract the first word of "strip", so it can be a program name with args.
+set dummy strip; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_ct_STRIP"; then
+ ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_ac_ct_STRIP="strip"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
+if test -n "$ac_ct_STRIP"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
+$as_echo "$ac_ct_STRIP" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+ if test "x$ac_ct_STRIP" = x; then
+ STRIP=":"
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ STRIP=$ac_ct_STRIP
+ fi
+else
+ STRIP="$ac_cv_prog_STRIP"
+fi
+
+fi
+INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
+$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
+if test -z "$MKDIR_P"; then
+ if ${ac_cv_path_mkdir+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_prog in mkdir gmkdir; do
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; } || continue
+ case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
+ 'mkdir (GNU coreutils) '* | \
+ 'mkdir (coreutils) '* | \
+ 'mkdir (fileutils) '4.1*)
+ ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
+ break 3;;
+ esac
+ done
+ done
+ done
+IFS=$as_save_IFS
+
+fi
+
+ test -d ./--version && rmdir ./--version
+ if test "${ac_cv_path_mkdir+set}" = set; then
+ MKDIR_P="$ac_cv_path_mkdir -p"
+ else
+ # As a last resort, use the slow shell script. Don't cache a
+ # value for MKDIR_P within a source directory, because that will
+ # break other packages using the cache if that directory is
+ # removed, or if the value is a relative name.
+ MKDIR_P="$ac_install_sh -d"
+ fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
+$as_echo "$MKDIR_P" >&6; }
+
+mkdir_p="$MKDIR_P"
+case $mkdir_p in
+ [\\/$]* | ?:[\\/]*) ;;
+ */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
+esac
+
+for ac_prog in gawk mawk nawk awk
+do
+ # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_AWK+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$AWK"; then
+ ac_cv_prog_AWK="$AWK" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_AWK="$ac_prog"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+AWK=$ac_cv_prog_AWK
+if test -n "$AWK"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
+$as_echo "$AWK" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+ test -n "$AWK" && break
+done
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
+$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
+set x ${MAKE-make}
+ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
+if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat >conftest.make <<\_ACEOF
+SHELL = /bin/sh
+all:
+ @echo '@@@%%%=$(MAKE)=@@@%%%'
+_ACEOF
+# GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
+case `${MAKE-make} -f conftest.make 2>/dev/null` in
+ *@@@%%%=?*=@@@%%%*)
+ eval ac_cv_prog_make_${ac_make}_set=yes;;
+ *)
+ eval ac_cv_prog_make_${ac_make}_set=no;;
+esac
+rm -f conftest.make
+fi
+if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+ SET_MAKE=
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+ SET_MAKE="MAKE=${MAKE-make}"
+fi
+
+rm -rf .tst 2>/dev/null
+mkdir .tst 2>/dev/null
+if test -d .tst; then
+ am__leading_dot=.
+else
+ am__leading_dot=_
+fi
+rmdir .tst 2>/dev/null
+
+DEPDIR="${am__leading_dot}deps"
+
+ac_config_commands="$ac_config_commands depfiles"
+
+
+am_make=${MAKE-make}
+cat > confinc << 'END'
+am__doit:
+ @echo this is the am__doit target
+.PHONY: am__doit
+END
+# If we don't find an include directive, just comment out the code.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5
+$as_echo_n "checking for style of include used by $am_make... " >&6; }
+am__include="#"
+am__quote=
+_am_result=none
+# First try GNU make style include.
+echo "include confinc" > confmf
+# Ignore all kinds of additional output from `make'.
+case `$am_make -s -f confmf 2> /dev/null` in #(
+*the\ am__doit\ target*)
+ am__include=include
+ am__quote=
+ _am_result=GNU
+ ;;
+esac
+# Now try BSD make style include.
+if test "$am__include" = "#"; then
+ echo '.include "confinc"' > confmf
+ case `$am_make -s -f confmf 2> /dev/null` in #(
+ *the\ am__doit\ target*)
+ am__include=.include
+ am__quote="\""
+ _am_result=BSD
+ ;;
+ esac
+fi
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5
+$as_echo "$_am_result" >&6; }
+rm -f confinc confmf
+
+# Check whether --enable-dependency-tracking was given.
+if test "${enable_dependency_tracking+set}" = set; then :
+ enableval=$enable_dependency_tracking;
+fi
+
+if test "x$enable_dependency_tracking" != xno; then
+ am_depcomp="$ac_aux_dir/depcomp"
+ AMDEPBACKSLASH='\'
+ am__nodep='_no'
+fi
+ if test "x$enable_dependency_tracking" != xno; then
+ AMDEP_TRUE=
+ AMDEP_FALSE='#'
+else
+ AMDEP_TRUE='#'
+ AMDEP_FALSE=
+fi
+
+
+
+# Check whether --enable-multilib was given.
+if test "${enable_multilib+set}" = set; then :
+ enableval=$enable_multilib; case "${enableval}" in
+ yes) multilib=yes ;;
+ no) multilib=no ;;
+ *) as_fn_error $? "bad value ${enableval} for multilib option" "$LINENO" 5 ;;
+ esac
+else
+ multilib=yes
+fi
+
+# Check whether --enable-target-optspace was given.
+if test "${enable_target_optspace+set}" = set; then :
+ enableval=$enable_target_optspace; case "${enableval}" in
+ yes) target_optspace=yes ;;
+ no) target_optspace=no ;;
+ *) as_fn_error $? "bad value ${enableval} for target-optspace option" "$LINENO" 5 ;;
+ esac
+else
+ target_optspace=
+fi
+
+# Check whether --enable-malloc-debugging was given.
+if test "${enable_malloc_debugging+set}" = set; then :
+ enableval=$enable_malloc_debugging; case "${enableval}" in
+ yes) malloc_debugging=yes ;;
+ no) malloc_debugging=no ;;
+ *) as_fn_error $? "bad value ${enableval} for malloc-debugging option" "$LINENO" 5 ;;
+ esac
+else
+ malloc_debugging=
+fi
+
+# Check whether --enable-newlib-multithread was given.
+if test "${enable_newlib_multithread+set}" = set; then :
+ enableval=$enable_newlib_multithread; case "${enableval}" in
+ yes) newlib_multithread=yes ;;
+ no) newlib_multithread=no ;;
+ *) as_fn_error $? "bad value ${enableval} for newlib-multithread option" "$LINENO" 5 ;;
+ esac
+else
+ newlib_multithread=yes
+fi
+
+# Check whether --enable-newlib-iconv was given.
+if test "${enable_newlib_iconv+set}" = set; then :
+ enableval=$enable_newlib_iconv; if test "${newlib_iconv+set}" != set; then
+ case "${enableval}" in
+ yes) newlib_iconv=yes ;;
+ no) newlib_iconv=no ;;
+ *) as_fn_error $? "bad value ${enableval} for newlib-iconv option" "$LINENO" 5 ;;
+ esac
+ fi
+else
+ newlib_iconv=${newlib_iconv}
+fi
+
+# Check whether --enable-newlib-elix-level was given.
+if test "${enable_newlib_elix_level+set}" = set; then :
+ enableval=$enable_newlib_elix_level; case "${enableval}" in
+ 0) newlib_elix_level=0 ;;
+ 1) newlib_elix_level=1 ;;
+ 2) newlib_elix_level=2 ;;
+ 3) newlib_elix_level=3 ;;
+ 4) newlib_elix_level=4 ;;
+ *) as_fn_error $? "bad value ${enableval} for newlib-elix-level option" "$LINENO" 5 ;;
+ esac
+else
+ newlib_elix_level=0
+fi
+
+# Check whether --enable-newlib-io-float was given.
+if test "${enable_newlib_io_float+set}" = set; then :
+ enableval=$enable_newlib_io_float; case "${enableval}" in
+ yes) newlib_io_float=yes ;;
+ no) newlib_io_float=no ;;
+ *) as_fn_error $? "bad value ${enableval} for newlib-io-float option" "$LINENO" 5 ;;
+ esac
+else
+ newlib_io_float=yes
+fi
+
+# Check whether --enable-newlib-supplied-syscalls was given.
+if test "${enable_newlib_supplied_syscalls+set}" = set; then :
+ enableval=$enable_newlib_supplied_syscalls; case "${enableval}" in
+ yes) newlib_may_supply_syscalls=yes ;;
+ no) newlib_may_supply_syscalls=no ;;
+ *) as_fn_error $? "bad value ${enableval} for newlib-supplied-syscalls option" "$LINENO" 5 ;;
+ esac
+else
+ newlib_may_supply_syscalls=yes
+fi
+
+ if test x${newlib_may_supply_syscalls} = xyes; then
+ MAY_SUPPLY_SYSCALLS_TRUE=
+ MAY_SUPPLY_SYSCALLS_FALSE='#'
+else
+ MAY_SUPPLY_SYSCALLS_TRUE='#'
+ MAY_SUPPLY_SYSCALLS_FALSE=
+fi
+
+
+
+test -z "${with_target_subdir}" && with_target_subdir=.
+
+if test "${srcdir}" = "."; then
+ if test "${with_target_subdir}" != "."; then
+ newlib_basedir="${srcdir}/${with_multisrctop}../../../../.."
+ else
+ newlib_basedir="${srcdir}/${with_multisrctop}../../../.."
+ fi
+else
+ newlib_basedir="${srcdir}/../../../.."
+fi
+
+
+
+
+if test "`cd $srcdir && pwd`" != "`pwd`"; then
+ # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
+ # is not polluted with repeated "-I."
+ am__isrc=' -I$(srcdir)'
+ # test to see if srcdir already configured
+ if test -f $srcdir/config.status; then
+ as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5
+ fi
+fi
+
+# test whether we have cygpath
+if test -z "$CYGPATH_W"; then
+ if (cygpath --version) >/dev/null 2>/dev/null; then
+ CYGPATH_W='cygpath -w'
+ else
+ CYGPATH_W=echo
+ fi
+fi
+
+
+# Define the identity of the package.
+ PACKAGE='newlib'
+ VERSION='2.4.0'
+
+
+# Some tools Automake needs.
+
+ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"}
+
+
+AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"}
+
+
+AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"}
+
+
+AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"}
+
+
+MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
+
+# We need awk for the "check" target. The system "awk" is bad on
+# some platforms.
+# Always define AMTAR for backward compatibility. Yes, it's still used
+# in the wild :-( We should find a proper way to deprecate it ...
+AMTAR='$${TAR-tar}'
+
+am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'
+
+
+
+
+
+
+# FIXME: We temporarily define our own version of AC_PROG_CC. This is
+# copied from autoconf 2.12, but does not call AC_PROG_CC_WORKS. We
+# are probably using a cross compiler, which will not be able to fully
+# link an executable. This should really be fixed in autoconf
+# itself.
+
+
+
+
+
+
+
+# Extract the first word of "gcc", so it can be a program name with args.
+set dummy gcc; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_CC+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_CC="gcc"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+$as_echo "$CC" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+
+depcc="$CC" am_compiler_list=
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
+$as_echo_n "checking dependency style of $depcc... " >&6; }
+if ${am_cv_CC_dependencies_compiler_type+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
+ # We make a subdir and do the tests there. Otherwise we can end up
+ # making bogus files that we don't know about and never remove. For
+ # instance it was reported that on HP-UX the gcc test will end up
+ # making a dummy file named `D' -- because `-MD' means `put the output
+ # in D'.
+ rm -rf conftest.dir
+ mkdir conftest.dir
+ # Copy depcomp to subdir because otherwise we won't find it if we're
+ # using a relative directory.
+ cp "$am_depcomp" conftest.dir
+ cd conftest.dir
+ # We will build objects and dependencies in a subdirectory because
+ # it helps to detect inapplicable dependency modes. For instance
+ # both Tru64's cc and ICC support -MD to output dependencies as a
+ # side effect of compilation, but ICC will put the dependencies in
+ # the current directory while Tru64 will put them in the object
+ # directory.
+ mkdir sub
+
+ am_cv_CC_dependencies_compiler_type=none
+ if test "$am_compiler_list" = ""; then
+ am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
+ fi
+ am__universal=false
+ case " $depcc " in #(
+ *\ -arch\ *\ -arch\ *) am__universal=true ;;
+ esac
+
+ for depmode in $am_compiler_list; do
+ # Setup a source with many dependencies, because some compilers
+ # like to wrap large dependency lists on column 80 (with \), and
+ # we should not choose a depcomp mode which is confused by this.
+ #
+ # We need to recreate these files for each test, as the compiler may
+ # overwrite some of them when testing with obscure command lines.
+ # This happens at least with the AIX C compiler.
+ : > sub/conftest.c
+ for i in 1 2 3 4 5 6; do
+ echo '#include "conftst'$i'.h"' >> sub/conftest.c
+ # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
+ # Solaris 8's {/usr,}/bin/sh.
+ touch sub/conftst$i.h
+ done
+ echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
+
+ # We check with `-c' and `-o' for the sake of the "dashmstdout"
+ # mode. It turns out that the SunPro C++ compiler does not properly
+ # handle `-M -o', and we need to detect this. Also, some Intel
+ # versions had trouble with output in subdirs
+ am__obj=sub/conftest.${OBJEXT-o}
+ am__minus_obj="-o $am__obj"
+ case $depmode in
+ gcc)
+ # This depmode causes a compiler race in universal mode.
+ test "$am__universal" = false || continue
+ ;;
+ nosideeffect)
+ # after this tag, mechanisms are not by side-effect, so they'll
+ # only be used when explicitly requested
+ if test "x$enable_dependency_tracking" = xyes; then
+ continue
+ else
+ break
+ fi
+ ;;
+ msvc7 | msvc7msys | msvisualcpp | msvcmsys)
+ # This compiler won't grok `-c -o', but also, the minuso test has
+ # not run yet. These depmodes are late enough in the game, and
+ # so weak that their functioning should not be impacted.
+ am__obj=conftest.${OBJEXT-o}
+ am__minus_obj=
+ ;;
+ none) break ;;
+ esac
+ if depmode=$depmode \
+ source=sub/conftest.c object=$am__obj \
+ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
+ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
+ >/dev/null 2>conftest.err &&
+ grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
+ grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
+ grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
+ ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
+ # icc doesn't choke on unknown options, it will just issue warnings
+ # or remarks (even with -Werror). So we grep stderr for any message
+ # that says an option was ignored or not supported.
+ # When given -MP, icc 7.0 and 7.1 complain thusly:
+ # icc: Command line warning: ignoring option '-M'; no argument required
+ # The diagnosis changed in icc 8.0:
+ # icc: Command line remark: option '-MP' not supported
+ if (grep 'ignoring option' conftest.err ||
+ grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
+ am_cv_CC_dependencies_compiler_type=$depmode
+ break
+ fi
+ fi
+ done
+
+ cd ..
+ rm -rf conftest.dir
+else
+ am_cv_CC_dependencies_compiler_type=none
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
+$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; }
+CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
+
+ if
+ test "x$enable_dependency_tracking" != xno \
+ && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then
+ am__fastdepCC_TRUE=
+ am__fastdepCC_FALSE='#'
+else
+ am__fastdepCC_TRUE='#'
+ am__fastdepCC_FALSE=
+fi
+
+
+if test -z "$CC"; then
+ # Extract the first word of "cc", so it can be a program name with args.
+set dummy cc; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_CC+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+ ac_prog_rejected=no
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
+ ac_prog_rejected=yes
+ continue
+ fi
+ ac_cv_prog_CC="cc"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+if test $ac_prog_rejected = yes; then
+ # We found a bogon in the path, so make sure we never use it.
+ set dummy $ac_cv_prog_CC
+ shift
+ if test $# != 0; then
+ # We chose a different compiler from the bogus one.
+ # However, it has the same basename, so the bogon will be chosen
+ # first if we set CC to just the basename; use the full file name.
+ shift
+ ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
+ fi
+fi
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+$as_echo "$CC" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+ test -z "$CC" && as_fn_error $? "no acceptable cc found in \$PATH" "$LINENO" 5
+fi
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using GNU C" >&5
+$as_echo_n "checking whether we are using GNU C... " >&6; }
+if ${ac_cv_c_compiler_gnu+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat > conftest.c <<EOF
+#ifdef __GNUC__
+ yes;
+#endif
+EOF
+if { ac_try='${CC-cc} -E conftest.c'
+ { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; } | egrep yes >/dev/null 2>&1; then
+ ac_cv_c_compiler_gnu=yes
+else
+ ac_cv_c_compiler_gnu=no
+fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
+$as_echo "$ac_cv_c_compiler_gnu" >&6; }
+
+if test $ac_cv_c_compiler_gnu = yes; then
+ GCC=yes
+ ac_test_CFLAGS="${CFLAGS+set}"
+ ac_save_CFLAGS="$CFLAGS"
+ ac_test_CFLAGS=${CFLAGS+set}
+ac_save_CFLAGS=$CFLAGS
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
+$as_echo_n "checking whether $CC accepts -g... " >&6; }
+if ${ac_cv_prog_cc_g+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_save_c_werror_flag=$ac_c_werror_flag
+ ac_c_werror_flag=yes
+ ac_cv_prog_cc_g=no
+ CFLAGS="-g"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ ac_cv_prog_cc_g=yes
+else
+ CFLAGS=""
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+
+else
+ ac_c_werror_flag=$ac_save_c_werror_flag
+ CFLAGS="-g"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ ac_cv_prog_cc_g=yes
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ ac_c_werror_flag=$ac_save_c_werror_flag
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
+$as_echo "$ac_cv_prog_cc_g" >&6; }
+if test "$ac_test_CFLAGS" = set; then
+ CFLAGS=$ac_save_CFLAGS
+elif test $ac_cv_prog_cc_g = yes; then
+ if test "$GCC" = yes; then
+ CFLAGS="-g -O2"
+ else
+ CFLAGS="-g"
+ fi
+else
+ if test "$GCC" = yes; then
+ CFLAGS="-O2"
+ else
+ CFLAGS=
+ fi
+fi
+ if test "$ac_test_CFLAGS" = set; then
+ CFLAGS="$ac_save_CFLAGS"
+ elif test $ac_cv_prog_cc_g = yes; then
+ CFLAGS="-g -O2"
+ else
+ CFLAGS="-O2"
+ fi
+else
+ GCC=
+ test "${CFLAGS+set}" = set || CFLAGS="-g"
+fi
+
+
+if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args.
+set dummy ${ac_tool_prefix}as; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_AS+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$AS"; then
+ ac_cv_prog_AS="$AS" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_AS="${ac_tool_prefix}as"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+AS=$ac_cv_prog_AS
+if test -n "$AS"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
+$as_echo "$AS" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_AS"; then
+ ac_ct_AS=$AS
+ # Extract the first word of "as", so it can be a program name with args.
+set dummy as; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_AS+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_ct_AS"; then
+ ac_cv_prog_ac_ct_AS="$ac_ct_AS" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_ac_ct_AS="as"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_AS=$ac_cv_prog_ac_ct_AS
+if test -n "$ac_ct_AS"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AS" >&5
+$as_echo "$ac_ct_AS" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+ if test "x$ac_ct_AS" = x; then
+ AS=""
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ AS=$ac_ct_AS
+ fi
+else
+ AS="$ac_cv_prog_AS"
+fi
+
+if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
+set dummy ${ac_tool_prefix}ar; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_AR+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$AR"; then
+ ac_cv_prog_AR="$AR" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_AR="${ac_tool_prefix}ar"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+AR=$ac_cv_prog_AR
+if test -n "$AR"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
+$as_echo "$AR" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_AR"; then
+ ac_ct_AR=$AR
+ # Extract the first word of "ar", so it can be a program name with args.
+set dummy ar; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_AR+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_ct_AR"; then
+ ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_ac_ct_AR="ar"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_AR=$ac_cv_prog_ac_ct_AR
+if test -n "$ac_ct_AR"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
+$as_echo "$ac_ct_AR" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+ if test "x$ac_ct_AR" = x; then
+ AR=""
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ AR=$ac_ct_AR
+ fi
+else
+ AR="$ac_cv_prog_AR"
+fi
+
+if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
+set dummy ${ac_tool_prefix}ranlib; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_RANLIB+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$RANLIB"; then
+ ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+RANLIB=$ac_cv_prog_RANLIB
+if test -n "$RANLIB"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
+$as_echo "$RANLIB" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_RANLIB"; then
+ ac_ct_RANLIB=$RANLIB
+ # Extract the first word of "ranlib", so it can be a program name with args.
+set dummy ranlib; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_ct_RANLIB"; then
+ ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_ac_ct_RANLIB="ranlib"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
+if test -n "$ac_ct_RANLIB"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
+$as_echo "$ac_ct_RANLIB" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+ if test "x$ac_ct_RANLIB" = x; then
+ RANLIB=":"
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ RANLIB=$ac_ct_RANLIB
+ fi
+else
+ RANLIB="$ac_cv_prog_RANLIB"
+fi
+
+if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}readelf", so it can be a program name with args.
+set dummy ${ac_tool_prefix}readelf; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_READELF+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$READELF"; then
+ ac_cv_prog_READELF="$READELF" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_READELF="${ac_tool_prefix}readelf"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+READELF=$ac_cv_prog_READELF
+if test -n "$READELF"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
+$as_echo "$READELF" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_READELF"; then
+ ac_ct_READELF=$READELF
+ # Extract the first word of "readelf", so it can be a program name with args.
+set dummy readelf; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_READELF+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_ct_READELF"; then
+ ac_cv_prog_ac_ct_READELF="$ac_ct_READELF" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_ac_ct_READELF="readelf"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_READELF=$ac_cv_prog_ac_ct_READELF
+if test -n "$ac_ct_READELF"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_READELF" >&5
+$as_echo "$ac_ct_READELF" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+ if test "x$ac_ct_READELF" = x; then
+ READELF=":"
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ READELF=$ac_ct_READELF
+ fi
+else
+ READELF="$ac_cv_prog_READELF"
+fi
+
+
+
+
+# Hack to ensure that INSTALL won't be set to "../" with autoconf 2.13. */
+ac_given_INSTALL=$INSTALL
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5
+$as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; }
+ # Check whether --enable-maintainer-mode was given.
+if test "${enable_maintainer_mode+set}" = set; then :
+ enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval
+else
+ USE_MAINTAINER_MODE=no
+fi
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_MAINTAINER_MODE" >&5
+$as_echo "$USE_MAINTAINER_MODE" >&6; }
+ if test $USE_MAINTAINER_MODE = yes; then
+ MAINTAINER_MODE_TRUE=
+ MAINTAINER_MODE_FALSE='#'
+else
+ MAINTAINER_MODE_TRUE='#'
+ MAINTAINER_MODE_FALSE=
+fi
+
+ MAINT=$MAINTAINER_MODE_TRUE
+
+
+# By default we simply use the C compiler to build assembly code.
+
+test "${CCAS+set}" = set || CCAS=$CC
+test "${CCASFLAGS+set}" = set || CCASFLAGS=$CFLAGS
+
+
+
+
+# We need AC_EXEEXT to keep automake happy in cygnus mode. However,
+# at least currently, we never actually build a program, so we never
+# need to use $(EXEEXT). Moreover, the test for EXEEXT normally
+# fails, because we are probably configuring with a cross compiler
+# which can't create executables. So we include AC_EXEEXT to keep
+# automake happy, but we don't execute it, since we don't care about
+# the result.
+if false; then
+
+ dummy_var=1
+fi
+
+. ${newlib_basedir}/configure.host
+
+newlib_cflags="${newlib_cflags} -fno-builtin"
+
+NEWLIB_CFLAGS=${newlib_cflags}
+
+
+NO_INCLUDE_LIST=${noinclude}
+
+
+LDFLAGS=${ldflags}
+
+
+ if test x${newlib_elix_level} = x0; then
+ ELIX_LEVEL_0_TRUE=
+ ELIX_LEVEL_0_FALSE='#'
+else
+ ELIX_LEVEL_0_TRUE='#'
+ ELIX_LEVEL_0_FALSE=
+fi
+
+ if test x${newlib_elix_level} = x1; then
+ ELIX_LEVEL_1_TRUE=
+ ELIX_LEVEL_1_FALSE='#'
+else
+ ELIX_LEVEL_1_TRUE='#'
+ ELIX_LEVEL_1_FALSE=
+fi
+
+ if test x${newlib_elix_level} = x2; then
+ ELIX_LEVEL_2_TRUE=
+ ELIX_LEVEL_2_FALSE='#'
+else
+ ELIX_LEVEL_2_TRUE='#'
+ ELIX_LEVEL_2_FALSE=
+fi
+
+ if test x${newlib_elix_level} = x3; then
+ ELIX_LEVEL_3_TRUE=
+ ELIX_LEVEL_3_FALSE='#'
+else
+ ELIX_LEVEL_3_TRUE='#'
+ ELIX_LEVEL_3_FALSE=
+fi
+
+ if test x${newlib_elix_level} = x4; then
+ ELIX_LEVEL_4_TRUE=
+ ELIX_LEVEL_4_FALSE='#'
+else
+ ELIX_LEVEL_4_TRUE='#'
+ ELIX_LEVEL_4_FALSE=
+fi
+
+
+ if test x${use_libtool} = xyes; then
+ USE_LIBTOOL_TRUE=
+ USE_LIBTOOL_FALSE='#'
+else
+ USE_LIBTOOL_TRUE='#'
+ USE_LIBTOOL_FALSE=
+fi
+
+
+# Hard-code OBJEXT. Normally it is set by AC_OBJEXT, but we
+# use oext, which is set in configure.host based on the target platform.
+OBJEXT=${oext}
+
+
+
+
+
+
+
+
+
+
+
+if test -n "${machine_dir}"; then
+ case ${machine_dir} in
+ arm)
+
+subdirs="$subdirs arm"
+ ;;
+ esirisc) subdirs="$subdirs esirisc"
+ ;;
+ i386) subdirs="$subdirs i386"
+ ;;
+ powerpc) subdirs="$subdirs powerpc"
+ ;;
+ esac;
+fi
+
+CRT0=
+if test -n "${machine_dir}"; then
+ CRT0=crt0.o
+fi
+
+
+ if test x${machine_dir} != x; then
+ HAVE_MACHINE_DIR_TRUE=
+ HAVE_MACHINE_DIR_FALSE='#'
+else
+ HAVE_MACHINE_DIR_TRUE='#'
+ HAVE_MACHINE_DIR_FALSE=
+fi
+
+
+ac_config_files="$ac_config_files Makefile"
+
+cat >confcache <<\_ACEOF
+# This file is a shell script that caches the results of configure
+# tests run on this system so they can be shared between configure
+# scripts and configure runs, see configure's option --config-cache.
+# It is not useful on other systems. If it contains results you don't
+# want to keep, you may remove or edit it.
+#
+# config.status only pays attention to the cache file if you give it
+# the --recheck option to rerun configure.
+#
+# `ac_cv_env_foo' variables (set or unset) will be overridden when
+# loading this file, other *unset* `ac_cv_foo' will be assigned the
+# following values.
+
+_ACEOF
+
+# The following way of writing the cache mishandles newlines in values,
+# but we know of no workaround that is simple, portable, and efficient.
+# So, we kill variables containing newlines.
+# Ultrix sh set writes to stderr and can't be redirected directly,
+# and sets the high bit in the cache file unless we assign to the vars.
+(
+ for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
+ eval ac_val=\$$ac_var
+ case $ac_val in #(
+ *${as_nl}*)
+ case $ac_var in #(
+ *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
+$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
+ esac
+ case $ac_var in #(
+ _ | IFS | as_nl) ;; #(
+ BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
+ *) { eval $ac_var=; unset $ac_var;} ;;
+ esac ;;
+ esac
+ done
+
+ (set) 2>&1 |
+ case $as_nl`(ac_space=' '; set) 2>&1` in #(
+ *${as_nl}ac_space=\ *)
+ # `set' does not quote correctly, so add quotes: double-quote
+ # substitution turns \\\\ into \\, and sed turns \\ into \.
+ sed -n \
+ "s/'/'\\\\''/g;
+ s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
+ ;; #(
+ *)
+ # `set' quotes correctly as required by POSIX, so do not add quotes.
+ sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
+ ;;
+ esac |
+ sort
+) |
+ sed '
+ /^ac_cv_env_/b end
+ t clear
+ :clear
+ s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
+ t end
+ s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
+ :end' >>confcache
+if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
+ if test -w "$cache_file"; then
+ if test "x$cache_file" != "x/dev/null"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
+$as_echo "$as_me: updating cache $cache_file" >&6;}
+ if test ! -f "$cache_file" || test -h "$cache_file"; then
+ cat confcache >"$cache_file"
+ else
+ case $cache_file in #(
+ */* | ?:*)
+ mv -f confcache "$cache_file"$$ &&
+ mv -f "$cache_file"$$ "$cache_file" ;; #(
+ *)
+ mv -f confcache "$cache_file" ;;
+ esac
+ fi
+ fi
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
+$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
+ fi
+fi
+rm -f confcache
+
+test "x$prefix" = xNONE && prefix=$ac_default_prefix
+# Let make expand exec_prefix.
+test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
+
+# Transform confdefs.h into DEFS.
+# Protect against shell expansion while executing Makefile rules.
+# Protect against Makefile macro expansion.
+#
+# If the first sed substitution is executed (which looks for macros that
+# take arguments), then branch to the quote section. Otherwise,
+# look for a macro that doesn't take arguments.
+ac_script='
+:mline
+/\\$/{
+ N
+ s,\\\n,,
+ b mline
+}
+t clear
+:clear
+s/^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*([^)]*)\)[ ]*\(.*\)/-D\1=\2/g
+t quote
+s/^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)/-D\1=\2/g
+t quote
+b any
+:quote
+s/[ `~#$^&*(){}\\|;'\''"<>?]/\\&/g
+s/\[/\\&/g
+s/\]/\\&/g
+s/\$/$$/g
+H
+:any
+${
+ g
+ s/^\n//
+ s/\n/ /g
+ p
+}
+'
+DEFS=`sed -n "$ac_script" confdefs.h`
+
+
+ac_libobjs=
+ac_ltlibobjs=
+U=
+for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
+ # 1. Remove the extension, and $U if already installed.
+ ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
+ ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
+ # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
+ # will be set to the directory where LIBOBJS objects are built.
+ as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
+ as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
+done
+LIBOBJS=$ac_libobjs
+
+LTLIBOBJS=$ac_ltlibobjs
+
+
+if test -z "${MAY_SUPPLY_SYSCALLS_TRUE}" && test -z "${MAY_SUPPLY_SYSCALLS_FALSE}"; then
+ as_fn_error $? "conditional \"MAY_SUPPLY_SYSCALLS\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+
+if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then
+ as_fn_error $? "conditional \"AMDEP\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
+ as_fn_error $? "conditional \"am__fastdepCC\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then
+ as_fn_error $? "conditional \"MAINTAINER_MODE\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${ELIX_LEVEL_0_TRUE}" && test -z "${ELIX_LEVEL_0_FALSE}"; then
+ as_fn_error $? "conditional \"ELIX_LEVEL_0\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${ELIX_LEVEL_1_TRUE}" && test -z "${ELIX_LEVEL_1_FALSE}"; then
+ as_fn_error $? "conditional \"ELIX_LEVEL_1\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${ELIX_LEVEL_2_TRUE}" && test -z "${ELIX_LEVEL_2_FALSE}"; then
+ as_fn_error $? "conditional \"ELIX_LEVEL_2\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${ELIX_LEVEL_3_TRUE}" && test -z "${ELIX_LEVEL_3_FALSE}"; then
+ as_fn_error $? "conditional \"ELIX_LEVEL_3\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${ELIX_LEVEL_4_TRUE}" && test -z "${ELIX_LEVEL_4_FALSE}"; then
+ as_fn_error $? "conditional \"ELIX_LEVEL_4\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${USE_LIBTOOL_TRUE}" && test -z "${USE_LIBTOOL_FALSE}"; then
+ as_fn_error $? "conditional \"USE_LIBTOOL\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${HAVE_MACHINE_DIR_TRUE}" && test -z "${HAVE_MACHINE_DIR_FALSE}"; then
+ as_fn_error $? "conditional \"HAVE_MACHINE_DIR\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+
+: "${CONFIG_STATUS=./config.status}"
+ac_write_fail=0
+ac_clean_files_save=$ac_clean_files
+ac_clean_files="$ac_clean_files $CONFIG_STATUS"
+{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
+$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
+as_write_fail=0
+cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
+#! $SHELL
+# Generated by $as_me.
+# Run this file to recreate the current configuration.
+# Compiler output produced by configure, useful for debugging
+# configure, is in config.log if it exists.
+
+debug=false
+ac_cs_recheck=false
+ac_cs_silent=false
+
+SHELL=\${CONFIG_SHELL-$SHELL}
+export SHELL
+_ASEOF
+cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
+## -------------------- ##
+## M4sh Initialization. ##
+## -------------------- ##
+
+# Be more Bourne compatible
+DUALCASE=1; export DUALCASE # for MKS sh
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
+ emulate sh
+ NULLCMD=:
+ # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
+ # is contrary to our usage. Disable this feature.
+ alias -g '${1+"$@"}'='"$@"'
+ setopt NO_GLOB_SUBST
+else
+ case `(set -o) 2>/dev/null` in #(
+ *posix*) :
+ set -o posix ;; #(
+ *) :
+ ;;
+esac
+fi
+
+
+as_nl='
+'
+export as_nl
+# Printing a long string crashes Solaris 7 /usr/bin/printf.
+as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
+as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
+as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
+# Prefer a ksh shell builtin over an external printf program on Solaris,
+# but without wasting forks for bash or zsh.
+if test -z "$BASH_VERSION$ZSH_VERSION" \
+ && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
+ as_echo='print -r --'
+ as_echo_n='print -rn --'
+elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
+ as_echo='printf %s\n'
+ as_echo_n='printf %s'
+else
+ if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
+ as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
+ as_echo_n='/usr/ucb/echo -n'
+ else
+ as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
+ as_echo_n_body='eval
+ arg=$1;
+ case $arg in #(
+ *"$as_nl"*)
+ expr "X$arg" : "X\\(.*\\)$as_nl";
+ arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
+ esac;
+ expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
+ '
+ export as_echo_n_body
+ as_echo_n='sh -c $as_echo_n_body as_echo'
+ fi
+ export as_echo_body
+ as_echo='sh -c $as_echo_body as_echo'
+fi
+
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+ PATH_SEPARATOR=:
+ (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
+ (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
+ PATH_SEPARATOR=';'
+ }
+fi
+
+
+# IFS
+# We need space, tab and new line, in precisely that order. Quoting is
+# there to prevent editors from complaining about space-tab.
+# (If _AS_PATH_WALK were called with IFS unset, it would disable word
+# splitting by setting IFS to empty value.)
+IFS=" "" $as_nl"
+
+# Find who we are. Look in the path if we contain no directory separator.
+as_myself=
+case $0 in #((
+ *[\\/]* ) as_myself=$0 ;;
+ *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
+ done
+IFS=$as_save_IFS
+
+ ;;
+esac
+# We did not find ourselves, most probably we were run as `sh COMMAND'
+# in which case we are not to be found in the path.
+if test "x$as_myself" = x; then
+ as_myself=$0
+fi
+if test ! -f "$as_myself"; then
+ $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
+ exit 1
+fi
+
+# Unset variables that we do not need and which cause bugs (e.g. in
+# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
+# suppresses any "Segmentation fault" message there. '((' could
+# trigger a bug in pdksh 5.2.14.
+for as_var in BASH_ENV ENV MAIL MAILPATH
+do eval test x\${$as_var+set} = xset \
+ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
+done
+PS1='$ '
+PS2='> '
+PS4='+ '
+
+# NLS nuisances.
+LC_ALL=C
+export LC_ALL
+LANGUAGE=C
+export LANGUAGE
+
+# CDPATH.
+(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
+
+
+# as_fn_error STATUS ERROR [LINENO LOG_FD]
+# ----------------------------------------
+# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
+# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
+# script with STATUS, using 1 if that was 0.
+as_fn_error ()
+{
+ as_status=$1; test $as_status -eq 0 && as_status=1
+ if test "$4"; then
+ as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
+ fi
+ $as_echo "$as_me: error: $2" >&2
+ as_fn_exit $as_status
+} # as_fn_error
+
+
+# as_fn_set_status STATUS
+# -----------------------
+# Set $? to STATUS, without forking.
+as_fn_set_status ()
+{
+ return $1
+} # as_fn_set_status
+
+# as_fn_exit STATUS
+# -----------------
+# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
+as_fn_exit ()
+{
+ set +e
+ as_fn_set_status $1
+ exit $1
+} # as_fn_exit
+
+# as_fn_unset VAR
+# ---------------
+# Portably unset VAR.
+as_fn_unset ()
+{
+ { eval $1=; unset $1;}
+}
+as_unset=as_fn_unset
+# as_fn_append VAR VALUE
+# ----------------------
+# Append the text in VALUE to the end of the definition contained in VAR. Take
+# advantage of any shell optimizations that allow amortized linear growth over
+# repeated appends, instead of the typical quadratic growth present in naive
+# implementations.
+if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
+ eval 'as_fn_append ()
+ {
+ eval $1+=\$2
+ }'
+else
+ as_fn_append ()
+ {
+ eval $1=\$$1\$2
+ }
+fi # as_fn_append
+
+# as_fn_arith ARG...
+# ------------------
+# Perform arithmetic evaluation on the ARGs, and store the result in the
+# global $as_val. Take advantage of shells that can avoid forks. The arguments
+# must be portable across $(()) and expr.
+if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
+ eval 'as_fn_arith ()
+ {
+ as_val=$(( $* ))
+ }'
+else
+ as_fn_arith ()
+ {
+ as_val=`expr "$@" || test $? -eq 1`
+ }
+fi # as_fn_arith
+
+
+if expr a : '\(a\)' >/dev/null 2>&1 &&
+ test "X`expr 00001 : '.*\(...\)'`" = X001; then
+ as_expr=expr
+else
+ as_expr=false
+fi
+
+if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
+ as_basename=basename
+else
+ as_basename=false
+fi
+
+if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
+ as_dirname=dirname
+else
+ as_dirname=false
+fi
+
+as_me=`$as_basename -- "$0" ||
+$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
+ X"$0" : 'X\(//\)$' \| \
+ X"$0" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X/"$0" |
+ sed '/^.*\/\([^/][^/]*\)\/*$/{
+ s//\1/
+ q
+ }
+ /^X\/\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\/\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+
+# Avoid depending upon Character Ranges.
+as_cr_letters='abcdefghijklmnopqrstuvwxyz'
+as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
+as_cr_Letters=$as_cr_letters$as_cr_LETTERS
+as_cr_digits='0123456789'
+as_cr_alnum=$as_cr_Letters$as_cr_digits
+
+ECHO_C= ECHO_N= ECHO_T=
+case `echo -n x` in #(((((
+-n*)
+ case `echo 'xy\c'` in
+ *c*) ECHO_T=' ';; # ECHO_T is single tab character.
+ xy) ECHO_C='\c';;
+ *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
+ ECHO_T=' ';;
+ esac;;
+*)
+ ECHO_N='-n';;
+esac
+
+rm -f conf$$ conf$$.exe conf$$.file
+if test -d conf$$.dir; then
+ rm -f conf$$.dir/conf$$.file
+else
+ rm -f conf$$.dir
+ mkdir conf$$.dir 2>/dev/null
+fi
+if (echo >conf$$.file) 2>/dev/null; then
+ if ln -s conf$$.file conf$$ 2>/dev/null; then
+ as_ln_s='ln -s'
+ # ... but there are two gotchas:
+ # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
+ # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
+ # In both cases, we have to default to `cp -p'.
+ ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
+ as_ln_s='cp -p'
+ elif ln conf$$.file conf$$ 2>/dev/null; then
+ as_ln_s=ln
+ else
+ as_ln_s='cp -p'
+ fi
+else
+ as_ln_s='cp -p'
+fi
+rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
+rmdir conf$$.dir 2>/dev/null
+
+
+# as_fn_mkdir_p
+# -------------
+# Create "$as_dir" as a directory, including parents if necessary.
+as_fn_mkdir_p ()
+{
+
+ case $as_dir in #(
+ -*) as_dir=./$as_dir;;
+ esac
+ test -d "$as_dir" || eval $as_mkdir_p || {
+ as_dirs=
+ while :; do
+ case $as_dir in #(
+ *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
+ *) as_qdir=$as_dir;;
+ esac
+ as_dirs="'$as_qdir' $as_dirs"
+ as_dir=`$as_dirname -- "$as_dir" ||
+$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$as_dir" : 'X\(//\)[^/]' \| \
+ X"$as_dir" : 'X\(//\)$' \| \
+ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$as_dir" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)[^/].*/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+ test -d "$as_dir" && break
+ done
+ test -z "$as_dirs" || eval "mkdir $as_dirs"
+ } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
+
+
+} # as_fn_mkdir_p
+if mkdir -p . 2>/dev/null; then
+ as_mkdir_p='mkdir -p "$as_dir"'
+else
+ test -d ./-p && rmdir ./-p
+ as_mkdir_p=false
+fi
+
+if test -x / >/dev/null 2>&1; then
+ as_test_x='test -x'
+else
+ if ls -dL / >/dev/null 2>&1; then
+ as_ls_L_option=L
+ else
+ as_ls_L_option=
+ fi
+ as_test_x='
+ eval sh -c '\''
+ if test -d "$1"; then
+ test -d "$1/.";
+ else
+ case $1 in #(
+ -*)set "./$1";;
+ esac;
+ case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
+ ???[sx]*):;;*)false;;esac;fi
+ '\'' sh
+ '
+fi
+as_executable_p=$as_test_x
+
+# Sed expression to map a string onto a valid CPP name.
+as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
+
+# Sed expression to map a string onto a valid variable name.
+as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
+
+
+exec 6>&1
+## ----------------------------------- ##
+## Main body of $CONFIG_STATUS script. ##
+## ----------------------------------- ##
+_ASEOF
+test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+# Save the log message, to keep $0 and so on meaningful, and to
+# report actual input values of CONFIG_FILES etc. instead of their
+# values after options handling.
+ac_log="
+This file was extended by newlib $as_me 2.4.0, which was
+generated by GNU Autoconf 2.68. Invocation command line was
+
+ CONFIG_FILES = $CONFIG_FILES
+ CONFIG_HEADERS = $CONFIG_HEADERS
+ CONFIG_LINKS = $CONFIG_LINKS
+ CONFIG_COMMANDS = $CONFIG_COMMANDS
+ $ $0 $@
+
+on `(hostname || uname -n) 2>/dev/null | sed 1q`
+"
+
+_ACEOF
+
+case $ac_config_files in *"
+"*) set x $ac_config_files; shift; ac_config_files=$*;;
+esac
+
+
+
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+# Files that config.status was made for.
+config_files="$ac_config_files"
+config_commands="$ac_config_commands"
+
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+ac_cs_usage="\
+\`$as_me' instantiates files and other configuration actions
+from templates according to the current configuration. Unless the files
+and actions are specified as TAGs, all are instantiated by default.
+
+Usage: $0 [OPTION]... [TAG]...
+
+ -h, --help print this help, then exit
+ -V, --version print version number and configuration settings, then exit
+ --config print configuration, then exit
+ -q, --quiet, --silent
+ do not print progress messages
+ -d, --debug don't remove temporary files
+ --recheck update $as_me by reconfiguring in the same conditions
+ --file=FILE[:TEMPLATE]
+ instantiate the configuration file FILE
+
+Configuration files:
+$config_files
+
+Configuration commands:
+$config_commands
+
+Report bugs to the package provider."
+
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
+ac_cs_version="\\
+newlib config.status 2.4.0
+configured by $0, generated by GNU Autoconf 2.68,
+ with options \\"\$ac_cs_config\\"
+
+Copyright (C) 2010 Free Software Foundation, Inc.
+This config.status script is free software; the Free Software Foundation
+gives unlimited permission to copy, distribute and modify it."
+
+ac_pwd='$ac_pwd'
+srcdir='$srcdir'
+INSTALL='$INSTALL'
+MKDIR_P='$MKDIR_P'
+AWK='$AWK'
+test -n "\$AWK" || AWK=awk
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+# The default lists apply if the user does not specify any file.
+ac_need_defaults=:
+while test $# != 0
+do
+ case $1 in
+ --*=?*)
+ ac_option=`expr "X$1" : 'X\([^=]*\)='`
+ ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
+ ac_shift=:
+ ;;
+ --*=)
+ ac_option=`expr "X$1" : 'X\([^=]*\)='`
+ ac_optarg=
+ ac_shift=:
+ ;;
+ *)
+ ac_option=$1
+ ac_optarg=$2
+ ac_shift=shift
+ ;;
+ esac
+
+ case $ac_option in
+ # Handling of the options.
+ -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
+ ac_cs_recheck=: ;;
+ --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
+ $as_echo "$ac_cs_version"; exit ;;
+ --config | --confi | --conf | --con | --co | --c )
+ $as_echo "$ac_cs_config"; exit ;;
+ --debug | --debu | --deb | --de | --d | -d )
+ debug=: ;;
+ --file | --fil | --fi | --f )
+ $ac_shift
+ case $ac_optarg in
+ *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
+ '') as_fn_error $? "missing file argument" ;;
+ esac
+ as_fn_append CONFIG_FILES " '$ac_optarg'"
+ ac_need_defaults=false;;
+ --he | --h | --help | --hel | -h )
+ $as_echo "$ac_cs_usage"; exit ;;
+ -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+ | -silent | --silent | --silen | --sile | --sil | --si | --s)
+ ac_cs_silent=: ;;
+
+ # This is an error.
+ -*) as_fn_error $? "unrecognized option: \`$1'
+Try \`$0 --help' for more information." ;;
+
+ *) as_fn_append ac_config_targets " $1"
+ ac_need_defaults=false ;;
+
+ esac
+ shift
+done
+
+ac_configure_extra_args=
+
+if $ac_cs_silent; then
+ exec 6>/dev/null
+ ac_configure_extra_args="$ac_configure_extra_args --silent"
+fi
+
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+if \$ac_cs_recheck; then
+ set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
+ shift
+ \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
+ CONFIG_SHELL='$SHELL'
+ export CONFIG_SHELL
+ exec "\$@"
+fi
+
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+exec 5>>config.log
+{
+ echo
+ sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
+## Running $as_me. ##
+_ASBOX
+ $as_echo "$ac_log"
+} >&5
+
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+#
+# INIT-COMMANDS
+#
+AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"
+
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+
+# Handling of arguments.
+for ac_config_target in $ac_config_targets
+do
+ case $ac_config_target in
+ "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
+ "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
+
+ *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
+ esac
+done
+
+
+# If the user did not use the arguments to specify the items to instantiate,
+# then the envvar interface is used. Set only those that are not.
+# We use the long form for the default assignment because of an extremely
+# bizarre bug on SunOS 4.1.3.
+if $ac_need_defaults; then
+ test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
+ test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
+fi
+
+# Have a temporary directory for convenience. Make it in the build tree
+# simply because there is no reason against having it here, and in addition,
+# creating and moving files from /tmp can sometimes cause problems.
+# Hook for its removal unless debugging.
+# Note that there is a small window in which the directory will not be cleaned:
+# after its creation but before its name has been assigned to `$tmp'.
+$debug ||
+{
+ tmp= ac_tmp=
+ trap 'exit_status=$?
+ : "${ac_tmp:=$tmp}"
+ { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
+' 0
+ trap 'as_fn_exit 1' 1 2 13 15
+}
+# Create a (secure) tmp directory for tmp files.
+
+{
+ tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
+ test -d "$tmp"
+} ||
+{
+ tmp=./conf$$-$RANDOM
+ (umask 077 && mkdir "$tmp")
+} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
+ac_tmp=$tmp
+
+# Set up the scripts for CONFIG_FILES section.
+# No need to generate them if there are no CONFIG_FILES.
+# This happens for instance with `./config.status config.h'.
+if test -n "$CONFIG_FILES"; then
+
+
+ac_cr=`echo X | tr X '\015'`
+# On cygwin, bash can eat \r inside `` if the user requested igncr.
+# But we know of no other shell where ac_cr would be empty at this
+# point, so we can use a bashism as a fallback.
+if test "x$ac_cr" = x; then
+ eval ac_cr=\$\'\\r\'
+fi
+ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
+if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
+ ac_cs_awk_cr='\\r'
+else
+ ac_cs_awk_cr=$ac_cr
+fi
+
+echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
+_ACEOF
+
+
+{
+ echo "cat >conf$$subs.awk <<_ACEOF" &&
+ echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
+ echo "_ACEOF"
+} >conf$$subs.sh ||
+ as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
+ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
+ac_delim='%!_!# '
+for ac_last_try in false false false false false :; do
+ . ./conf$$subs.sh ||
+ as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
+
+ ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
+ if test $ac_delim_n = $ac_delim_num; then
+ break
+ elif $ac_last_try; then
+ as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
+ else
+ ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
+ fi
+done
+rm -f conf$$subs.sh
+
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
+_ACEOF
+sed -n '
+h
+s/^/S["/; s/!.*/"]=/
+p
+g
+s/^[^!]*!//
+:repl
+t repl
+s/'"$ac_delim"'$//
+t delim
+:nl
+h
+s/\(.\{148\}\)..*/\1/
+t more1
+s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
+p
+n
+b repl
+:more1
+s/["\\]/\\&/g; s/^/"/; s/$/"\\/
+p
+g
+s/.\{148\}//
+t nl
+:delim
+h
+s/\(.\{148\}\)..*/\1/
+t more2
+s/["\\]/\\&/g; s/^/"/; s/$/"/
+p
+b
+:more2
+s/["\\]/\\&/g; s/^/"/; s/$/"\\/
+p
+g
+s/.\{148\}//
+t delim
+' <conf$$subs.awk | sed '
+/^[^""]/{
+ N
+ s/\n//
+}
+' >>$CONFIG_STATUS || ac_write_fail=1
+rm -f conf$$subs.awk
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+_ACAWK
+cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
+ for (key in S) S_is_set[key] = 1
+ FS = ""
+
+}
+{
+ line = $ 0
+ nfields = split(line, field, "@")
+ substed = 0
+ len = length(field[1])
+ for (i = 2; i < nfields; i++) {
+ key = field[i]
+ keylen = length(key)
+ if (S_is_set[key]) {
+ value = S[key]
+ line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
+ len += length(value) + length(field[++i])
+ substed = 1
+ } else
+ len += 1 + keylen
+ }
+
+ print line
+}
+
+_ACAWK
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
+ sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
+else
+ cat
+fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
+ || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
+_ACEOF
+
+# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
+# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
+# trailing colons and then remove the whole line if VPATH becomes empty
+# (actually we leave an empty line to preserve line numbers).
+if test "x$srcdir" = x.; then
+ ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
+h
+s///
+s/^/:/
+s/[ ]*$/:/
+s/:\$(srcdir):/:/g
+s/:\${srcdir}:/:/g
+s/:@srcdir@:/:/g
+s/^:*//
+s/:*$//
+x
+s/\(=[ ]*\).*/\1/
+G
+s/\n//
+s/^[^=]*=[ ]*$//
+}'
+fi
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+fi # test -n "$CONFIG_FILES"
+
+
+eval set X " :F $CONFIG_FILES :C $CONFIG_COMMANDS"
+shift
+for ac_tag
+do
+ case $ac_tag in
+ :[FHLC]) ac_mode=$ac_tag; continue;;
+ esac
+ case $ac_mode$ac_tag in
+ :[FHL]*:*);;
+ :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
+ :[FH]-) ac_tag=-:-;;
+ :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
+ esac
+ ac_save_IFS=$IFS
+ IFS=:
+ set x $ac_tag
+ IFS=$ac_save_IFS
+ shift
+ ac_file=$1
+ shift
+
+ case $ac_mode in
+ :L) ac_source=$1;;
+ :[FH])
+ ac_file_inputs=
+ for ac_f
+ do
+ case $ac_f in
+ -) ac_f="$ac_tmp/stdin";;
+ *) # Look for the file first in the build tree, then in the source tree
+ # (if the path is not absolute). The absolute path cannot be DOS-style,
+ # because $ac_f cannot contain `:'.
+ test -f "$ac_f" ||
+ case $ac_f in
+ [\\/$]*) false;;
+ *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
+ esac ||
+ as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
+ esac
+ case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
+ as_fn_append ac_file_inputs " '$ac_f'"
+ done
+
+ # Let's still pretend it is `configure' which instantiates (i.e., don't
+ # use $as_me), people would be surprised to read:
+ # /* config.h. Generated by config.status. */
+ configure_input='Generated from '`
+ $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
+ `' by configure.'
+ if test x"$ac_file" != x-; then
+ configure_input="$ac_file. $configure_input"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
+$as_echo "$as_me: creating $ac_file" >&6;}
+ fi
+ # Neutralize special characters interpreted by sed in replacement strings.
+ case $configure_input in #(
+ *\&* | *\|* | *\\* )
+ ac_sed_conf_input=`$as_echo "$configure_input" |
+ sed 's/[\\\\&|]/\\\\&/g'`;; #(
+ *) ac_sed_conf_input=$configure_input;;
+ esac
+
+ case $ac_tag in
+ *:-:* | *:-) cat >"$ac_tmp/stdin" \
+ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
+ esac
+ ;;
+ esac
+
+ ac_dir=`$as_dirname -- "$ac_file" ||
+$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$ac_file" : 'X\(//\)[^/]' \| \
+ X"$ac_file" : 'X\(//\)$' \| \
+ X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$ac_file" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)[^/].*/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+ as_dir="$ac_dir"; as_fn_mkdir_p
+ ac_builddir=.
+
+case "$ac_dir" in
+.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
+*)
+ ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
+ # A ".." for each directory in $ac_dir_suffix.
+ ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
+ case $ac_top_builddir_sub in
+ "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
+ *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
+ esac ;;
+esac
+ac_abs_top_builddir=$ac_pwd
+ac_abs_builddir=$ac_pwd$ac_dir_suffix
+# for backward compatibility:
+ac_top_builddir=$ac_top_build_prefix
+
+case $srcdir in
+ .) # We are building in place.
+ ac_srcdir=.
+ ac_top_srcdir=$ac_top_builddir_sub
+ ac_abs_top_srcdir=$ac_pwd ;;
+ [\\/]* | ?:[\\/]* ) # Absolute name.
+ ac_srcdir=$srcdir$ac_dir_suffix;
+ ac_top_srcdir=$srcdir
+ ac_abs_top_srcdir=$srcdir ;;
+ *) # Relative name.
+ ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
+ ac_top_srcdir=$ac_top_build_prefix$srcdir
+ ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
+esac
+ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
+
+
+ case $ac_mode in
+ :F)
+ #
+ # CONFIG_FILE
+ #
+
+ case $INSTALL in
+ [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
+ *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
+ esac
+ ac_MKDIR_P=$MKDIR_P
+ case $MKDIR_P in
+ [\\/$]* | ?:[\\/]* ) ;;
+ */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
+ esac
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+# If the template does not know about datarootdir, expand it.
+# FIXME: This hack should be removed a few years after 2.60.
+ac_datarootdir_hack=; ac_datarootdir_seen=
+ac_sed_dataroot='
+/datarootdir/ {
+ p
+ q
+}
+/@datadir@/p
+/@docdir@/p
+/@infodir@/p
+/@localedir@/p
+/@mandir@/p'
+case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
+*datarootdir*) ac_datarootdir_seen=yes;;
+*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
+$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+ ac_datarootdir_hack='
+ s&@datadir@&$datadir&g
+ s&@docdir@&$docdir&g
+ s&@infodir@&$infodir&g
+ s&@localedir@&$localedir&g
+ s&@mandir@&$mandir&g
+ s&\\\${datarootdir}&$datarootdir&g' ;;
+esac
+_ACEOF
+
+# Neutralize VPATH when `$srcdir' = `.'.
+# Shell code in configure.ac might set extrasub.
+# FIXME: do we really want to maintain this feature?
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+ac_sed_extra="$ac_vpsub
+$extrasub
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+:t
+/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
+s|@configure_input@|$ac_sed_conf_input|;t t
+s&@top_builddir@&$ac_top_builddir_sub&;t t
+s&@top_build_prefix@&$ac_top_build_prefix&;t t
+s&@srcdir@&$ac_srcdir&;t t
+s&@abs_srcdir@&$ac_abs_srcdir&;t t
+s&@top_srcdir@&$ac_top_srcdir&;t t
+s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
+s&@builddir@&$ac_builddir&;t t
+s&@abs_builddir@&$ac_abs_builddir&;t t
+s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
+s&@INSTALL@&$ac_INSTALL&;t t
+s&@MKDIR_P@&$ac_MKDIR_P&;t t
+$ac_datarootdir_hack
+"
+eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
+ >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
+
+test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
+ { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
+ { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
+ "$ac_tmp/out"`; test -z "$ac_out"; } &&
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
+which seems to be undefined. Please make sure it is defined" >&5
+$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
+which seems to be undefined. Please make sure it is defined" >&2;}
+
+ rm -f "$ac_tmp/stdin"
+ case $ac_file in
+ -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
+ *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
+ esac \
+ || as_fn_error $? "could not create $ac_file" "$LINENO" 5
+ ;;
+
+
+ :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
+$as_echo "$as_me: executing $ac_file commands" >&6;}
+ ;;
+ esac
+
+
+ case $ac_file$ac_mode in
+ "depfiles":C) test x"$AMDEP_TRUE" != x"" || {
+ # Autoconf 2.62 quotes --file arguments for eval, but not when files
+ # are listed without --file. Let's play safe and only enable the eval
+ # if we detect the quoting.
+ case $CONFIG_FILES in
+ *\'*) eval set x "$CONFIG_FILES" ;;
+ *) set x $CONFIG_FILES ;;
+ esac
+ shift
+ for mf
+ do
+ # Strip MF so we end up with the name of the file.
+ mf=`echo "$mf" | sed -e 's/:.*$//'`
+ # Check whether this is an Automake generated Makefile or not.
+ # We used to match only the files named `Makefile.in', but
+ # some people rename them; so instead we look at the file content.
+ # Grep'ing the first line is not enough: some people post-process
+ # each Makefile.in and add a new line on top of each file to say so.
+ # Grep'ing the whole file is not good either: AIX grep has a line
+ # limit of 2048, but all sed's we know have understand at least 4000.
+ if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
+ dirpart=`$as_dirname -- "$mf" ||
+$as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$mf" : 'X\(//\)[^/]' \| \
+ X"$mf" : 'X\(//\)$' \| \
+ X"$mf" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$mf" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)[^/].*/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+ else
+ continue
+ fi
+ # Extract the definition of DEPDIR, am__include, and am__quote
+ # from the Makefile without running `make'.
+ DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
+ test -z "$DEPDIR" && continue
+ am__include=`sed -n 's/^am__include = //p' < "$mf"`
+ test -z "am__include" && continue
+ am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
+ # When using ansi2knr, U may be empty or an underscore; expand it
+ U=`sed -n 's/^U = //p' < "$mf"`
+ # Find all dependency output files, they are included files with
+ # $(DEPDIR) in their names. We invoke sed twice because it is the
+ # simplest approach to changing $(DEPDIR) to its actual value in the
+ # expansion.
+ for file in `sed -n "
+ s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
+ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
+ # Make sure the directory exists.
+ test -f "$dirpart/$file" && continue
+ fdir=`$as_dirname -- "$file" ||
+$as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$file" : 'X\(//\)[^/]' \| \
+ X"$file" : 'X\(//\)$' \| \
+ X"$file" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$file" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)[^/].*/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+ as_dir=$dirpart/$fdir; as_fn_mkdir_p
+ # echo "creating $dirpart/$file"
+ echo '# dummy' > "$dirpart/$file"
+ done
+ done
+}
+ ;;
+
+ esac
+done # for ac_tag
+
+
+as_fn_exit 0
+_ACEOF
+ac_clean_files=$ac_clean_files_save
+
+test $ac_write_fail = 0 ||
+ as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
+
+
+# configure is writing to config.log, and then calls config.status.
+# config.status does its own redirection, appending to config.log.
+# Unfortunately, on DOS this fails, as config.log is still kept open
+# by configure, so config.status won't be able to write to it; its
+# output is simply discarded. So we exec the FD to /dev/null,
+# effectively closing config.log, so it can be properly (re)opened and
+# appended to by config.status. When coming back to configure, we
+# need to make the FD available again.
+if test "$no_create" != yes; then
+ ac_cs_success=:
+ ac_config_status_args=
+ test "$silent" = yes &&
+ ac_config_status_args="$ac_config_status_args --quiet"
+ exec 5>/dev/null
+ $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
+ exec 5>>config.log
+ # Use ||, not &&, to avoid exiting from the if with $? = 1, which
+ # would make configure fail if this is the last instruction.
+ $ac_cs_success || as_fn_exit 1
+fi
+
+#
+# CONFIG_SUBDIRS section.
+#
+if test "$no_recursion" != yes; then
+
+ # Remove --cache-file, --srcdir, and --disable-option-checking arguments
+ # so they do not pile up.
+ ac_sub_configure_args=
+ ac_prev=
+ eval "set x $ac_configure_args"
+ shift
+ for ac_arg
+ do
+ if test -n "$ac_prev"; then
+ ac_prev=
+ continue
+ fi
+ case $ac_arg in
+ -cache-file | --cache-file | --cache-fil | --cache-fi \
+ | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
+ ac_prev=cache_file ;;
+ -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
+ | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* \
+ | --c=*)
+ ;;
+ --config-cache | -C)
+ ;;
+ -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
+ ac_prev=srcdir ;;
+ -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
+ ;;
+ -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
+ ac_prev=prefix ;;
+ -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
+ ;;
+ --disable-option-checking)
+ ;;
+ *)
+ case $ac_arg in
+ *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
+ esac
+ as_fn_append ac_sub_configure_args " '$ac_arg'" ;;
+ esac
+ done
+
+ # Always prepend --prefix to ensure using the same prefix
+ # in subdir configurations.
+ ac_arg="--prefix=$prefix"
+ case $ac_arg in
+ *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
+ esac
+ ac_sub_configure_args="'$ac_arg' $ac_sub_configure_args"
+
+ # Pass --silent
+ if test "$silent" = yes; then
+ ac_sub_configure_args="--silent $ac_sub_configure_args"
+ fi
+
+ # Always prepend --disable-option-checking to silence warnings, since
+ # different subdirs can have different --enable and --with options.
+ ac_sub_configure_args="--disable-option-checking $ac_sub_configure_args"
+
+ ac_popdir=`pwd`
+ for ac_dir in : $subdirs; do test "x$ac_dir" = x: && continue
+
+ # Do not complain, so a configure script can configure whichever
+ # parts of a large source tree are present.
+ test -d "$srcdir/$ac_dir" || continue
+
+ ac_msg="=== configuring in $ac_dir (`pwd`/$ac_dir)"
+ $as_echo "$as_me:${as_lineno-$LINENO}: $ac_msg" >&5
+ $as_echo "$ac_msg" >&6
+ as_dir="$ac_dir"; as_fn_mkdir_p
+ ac_builddir=.
+
+case "$ac_dir" in
+.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
+*)
+ ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
+ # A ".." for each directory in $ac_dir_suffix.
+ ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
+ case $ac_top_builddir_sub in
+ "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
+ *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
+ esac ;;
+esac
+ac_abs_top_builddir=$ac_pwd
+ac_abs_builddir=$ac_pwd$ac_dir_suffix
+# for backward compatibility:
+ac_top_builddir=$ac_top_build_prefix
+
+case $srcdir in
+ .) # We are building in place.
+ ac_srcdir=.
+ ac_top_srcdir=$ac_top_builddir_sub
+ ac_abs_top_srcdir=$ac_pwd ;;
+ [\\/]* | ?:[\\/]* ) # Absolute name.
+ ac_srcdir=$srcdir$ac_dir_suffix;
+ ac_top_srcdir=$srcdir
+ ac_abs_top_srcdir=$srcdir ;;
+ *) # Relative name.
+ ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
+ ac_top_srcdir=$ac_top_build_prefix$srcdir
+ ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
+esac
+ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
+
+
+ cd "$ac_dir"
+
+ # Check for guested configure; otherwise get Cygnus style configure.
+ if test -f "$ac_srcdir/configure.gnu"; then
+ ac_sub_configure=$ac_srcdir/configure.gnu
+ elif test -f "$ac_srcdir/configure"; then
+ ac_sub_configure=$ac_srcdir/configure
+ elif test -f "$ac_srcdir/configure.in"; then
+ # This should be Cygnus configure.
+ ac_sub_configure=$ac_aux_dir/configure
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no configuration information is in $ac_dir" >&5
+$as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2;}
+ ac_sub_configure=
+ fi
+
+ # The recursion is here.
+ if test -n "$ac_sub_configure"; then
+ # Make the cache file name correct relative to the subdirectory.
+ case $cache_file in
+ [\\/]* | ?:[\\/]* ) ac_sub_cache_file=$cache_file ;;
+ *) # Relative name.
+ ac_sub_cache_file=$ac_top_build_prefix$cache_file ;;
+ esac
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&5
+$as_echo "$as_me: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&6;}
+ # The eval makes quoting arguments work.
+ eval "\$SHELL \"\$ac_sub_configure\" $ac_sub_configure_args \
+ --cache-file=\"\$ac_sub_cache_file\" --srcdir=\"\$ac_srcdir\"" ||
+ as_fn_error $? "$ac_sub_configure failed for $ac_dir" "$LINENO" 5
+ fi
+
+ cd "$ac_popdir"
+ done
+fi
+if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
+$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
+fi
+
diff --git a/newlib/libc/sys/phoenix/machine/configure.in b/newlib/libc/sys/phoenix/machine/configure.in
new file mode 100644
index 000000000..db68b6dc5
--- /dev/null
+++ b/newlib/libc/sys/phoenix/machine/configure.in
@@ -0,0 +1,31 @@
+dnl This is the newlib/libc/sys configure.in file.
+dnl Process this file with autoconf to produce a configure script.
+
+AC_PREREQ(2.59)
+AC_INIT([newlib],[NEWLIB_VERSION])
+AC_CONFIG_SRCDIR([arm])
+
+dnl Can't be done in NEWLIB_CONFIGURE because that confuses automake.
+AC_CONFIG_AUX_DIR(../../../../..)
+
+NEWLIB_CONFIGURE(../../../..)
+
+if test -n "${machine_dir}"; then
+ case ${machine_dir} in
+ arm) AC_CONFIG_SUBDIRS(arm) ;;
+ esirisc) AC_CONFIG_SUBDIRS(esirisc) ;;
+ i386) AC_CONFIG_SUBDIRS(i386) ;;
+ powerpc) AC_CONFIG_SUBDIRS(powerpc) ;;
+ esac;
+fi
+
+CRT0=
+if test -n "${machine_dir}"; then
+ CRT0=crt0.o
+fi
+AC_SUBST(CRT0)
+
+AM_CONDITIONAL(HAVE_MACHINE_DIR, test x${machine_dir} != x)
+
+AC_CONFIG_FILES([Makefile])
+AC_OUTPUT
diff --git a/newlib/libc/sys/phoenix/machine/regenerate.sh b/newlib/libc/sys/phoenix/machine/regenerate.sh
new file mode 100644
index 000000000..b50534fca
--- /dev/null
+++ b/newlib/libc/sys/phoenix/machine/regenerate.sh
@@ -0,0 +1,5 @@
+#!/bin/sh
+
+aclocal-1.11 -I ../../../../ -I ../../../../../
+/usr/local/bin/autoconf
+automake-1.11 --cygnus Makefile
diff --git a/newlib/libc/sys/phoenix/mmap.c b/newlib/libc/sys/phoenix/mmap.c
new file mode 100644
index 000000000..ea713070d
--- /dev/null
+++ b/newlib/libc/sys/phoenix/mmap.c
@@ -0,0 +1,86 @@
+/* Copyright (c) 2016 Phoenix Systems
+ 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 "syscall.h"
+
+#include <errno.h>
+#include <malloc.h>
+#include <sys/mman.h>
+#include <sys/stat.h>
+#include <unistd.h>
+
+void *mmap(void *addr, size_t length, int prot, int flags, int fd, off_t offset)
+{
+ void *ret = NULL;
+ MmapArg_t arg = {
+ .fd = fd,
+ .addr = addr,
+ .pflags = prot,
+ .mflags = flags,
+ .offs = offset,
+ .len = length,
+ .raddr = &ret
+ };
+
+ struct stat st;
+ if (fstat(fd, &st) < 0)
+ return NULL;
+
+ if (st.st_mode & S_IFREG) {
+ if (prot != PROT_READ) {
+ errno = ENOSYS;
+ return MAP_FAILED;
+ }
+
+ if ((ret = malloc(length)) == 0) {
+ errno = ENOMEM;
+ return MAP_FAILED;
+ }
+
+ if (pread(fd, ret, length, offset) < 0) {
+ free(ret);
+ return MAP_FAILED;
+ }
+ }
+ else {
+ int err = syscall1(int, SYS_MMAP, &arg);
+ if(err < 0) {
+ errno = -err;
+ return MAP_FAILED;
+ }
+ }
+
+ return ret;
+}
+
+int munmap(void *addr, size_t length)
+{
+ int ret = syscall2(int, SYS_MUNMAP, addr, length);
+ if (ret < 0) {
+ errno = -ret;
+ return -1;
+ }
+
+ return ret;
+}
diff --git a/newlib/libc/sys/phoenix/mount.c b/newlib/libc/sys/phoenix/mount.c
new file mode 100644
index 000000000..859c8ecd1
--- /dev/null
+++ b/newlib/libc/sys/phoenix/mount.c
@@ -0,0 +1,54 @@
+/* Copyright (c) 2016 Phoenix Systems
+ 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 "syscall.h"
+
+#include <errno.h>
+
+int mount(const char *source, const char *target, const char *filesystemtype, unsigned long mountflags, const void *data)
+{
+ int ret = syscall5(int, SYS_MOUNT, source, target, filesystemtype, mountflags, data);
+ if (ret < 0) {
+ errno = -ret;
+ return -1;
+ }
+
+ return ret;
+}
+
+int umount2(const char *target, int flags)
+{
+ int ret = syscall2(int, SYS_UMOUNT, target, flags);
+ if (ret < 0) {
+ errno = -ret;
+ return -1;
+ }
+
+ return ret;
+}
+
+int umount(const char *target)
+{
+ return umount2(target, 0);
+}
diff --git a/newlib/libc/sys/phoenix/nanosleep.c b/newlib/libc/sys/phoenix/nanosleep.c
new file mode 100644
index 000000000..042423343
--- /dev/null
+++ b/newlib/libc/sys/phoenix/nanosleep.c
@@ -0,0 +1,40 @@
+/* Copyright (c) 2016 Phoenix Systems
+ 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 "syscall.h"
+
+#include <errno.h>
+#include <sys/time.h>
+#include <sys/types.h>
+
+int nanosleep(const struct timespec *req, struct timespec *rem)
+{
+ int ret = syscall2(int, SYS_NANOSLEEP, req, rem);
+ if (ret < 0) {
+ errno = -ret;
+ return -1;
+ }
+
+ return ret;
+}
diff --git a/newlib/libc/sys/phoenix/net/domainname.c b/newlib/libc/sys/phoenix/net/domainname.c
new file mode 100644
index 000000000..12ed1fe7d
--- /dev/null
+++ b/newlib/libc/sys/phoenix/net/domainname.c
@@ -0,0 +1,52 @@
+/* Copyright (c) 2016 Phoenix Systems
+ 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 "syscall.h"
+
+#include <errno.h>
+
+#define NAME_GET 0
+#define NAME_SET 1
+
+int getdomainname(char *name, size_t len)
+{
+ int ret = syscall3(int, SYS_DOMAINNAME, name, len, NAME_GET);
+ if (ret < 0) {
+ errno = -ret;
+ return -1;
+ }
+
+ return ret;
+}
+
+int setdomainname(const char *name, size_t len)
+{
+ int ret = syscall3(int, SYS_DOMAINNAME, name, len, NAME_SET);
+ if (ret < 0) {
+ errno = -ret;
+ return -1;
+ }
+
+ return ret;
+}
diff --git a/newlib/libc/sys/phoenix/net/freeaddrinfo.c b/newlib/libc/sys/phoenix/net/freeaddrinfo.c
new file mode 100644
index 000000000..19b8bd730
--- /dev/null
+++ b/newlib/libc/sys/phoenix/net/freeaddrinfo.c
@@ -0,0 +1,52 @@
+/* The Inner Net License, Version 2.00
+
+ The author(s) grant permission for redistribution and use in source and
+binary forms, with or without modification, of the software and documentation
+provided that the following conditions are met:
+
+0. If you receive a version of the software that is specifically labelled
+ as not being for redistribution (check the version message and/or README),
+ you are not permitted to redistribute that version of the software in any
+ way or form.
+1. All terms of the all other applicable copyrights and licenses must be
+ followed.
+2. Redistributions of source code must retain the authors' copyright
+ notice(s), this list of conditions, and the following disclaimer.
+3. Redistributions in binary form must reproduce the authors' copyright
+ notice(s), this list of conditions, and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+4. [The copyright holder has authorized the removal of this clause.]
+5. Neither the name(s) of the author(s) 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 ITS AUTHORS 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 AUTHORS 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 these license terms cause you a real problem, contact the author. */
+
+/* This software is Copyright 1996 by Craig Metz, All Rights Reserved. */
+
+/* Copied from Linux, modified for Phoenix-RTOS. */
+
+#include <malloc.h>
+#include <netdb.h>
+#include <stdio.h>
+
+void freeaddrinfo(struct addrinfo *res)
+{
+ while (res != NULL) {
+ struct addrinfo *p = res;
+ res = res->ai_next;
+ free(p->ai_canonname);
+ free(p);
+ }
+}
diff --git a/newlib/libc/sys/phoenix/net/getaddrinfo.c b/newlib/libc/sys/phoenix/net/getaddrinfo.c
new file mode 100644
index 000000000..ad9166de6
--- /dev/null
+++ b/newlib/libc/sys/phoenix/net/getaddrinfo.c
@@ -0,0 +1,185 @@
+/*
+ * Mar 8, 2000 by Hajimu UMEMOTO <ume@mahoroba.org>
+ * $Id: getaddrinfo.c,v 1.2 2002/05/22 17:56:56 snsimon Exp $
+ *
+ * This module is besed on ssh-1.2.27-IPv6-1.5 written by
+ * KIKUCHI Takahiro <kick@kyoto.wide.ad.jp>
+ */
+/*
+ * Copyright (c) 2001 Carnegie Mellon University. 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. The name "Carnegie Mellon University" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For permission or any other legal
+ * details, please contact
+ * Office of Technology Transfer
+ * Carnegie Mellon University
+ * 5000 Forbes Avenue
+ * Pittsburgh, PA 15213-3890
+ * (412) 268-4387, fax: (412) 268-7395
+ * tech-transfer@andrew.cmu.edu
+ *
+ * 4. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ * "This product includes software developed by Computing Services
+ * at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+ *
+ * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+ * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY 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.
+ */
+/*
+ * fake library for ssh
+ *
+ * This file includes getaddrinfo(), freeaddrinfo() and gai_strerror().
+ * These funtions are defined in rfc2133.
+ *
+ * But these functions are not implemented correctly. The minimum subset
+ * is implemented for ssh use only. For example, this routine assumes
+ * that ai_family is AF_INET. Don't use it for another purpose.
+ *
+ * In the case not using 'configure --enable-ipv6', this getaddrinfo.c
+ * will be used if you have broken getaddrinfo or no getaddrinfo.
+ */
+
+#include <arpa/inet.h>
+#include <ctype.h>
+#include <errno.h>
+#include <netdb.h>
+#include <netinet/in.h>
+#include <stdlib.h>
+#include <string.h>
+#include <sys/socket.h>
+
+static struct addrinfo *malloc_ai(int port, u_long addr, int socktype, int proto)
+{
+ struct addrinfo *ai = (struct addrinfo *)malloc(sizeof(struct addrinfo) + sizeof(struct sockaddr_in));
+ if (ai) {
+ memset(ai, 0, sizeof(struct addrinfo) + sizeof(struct sockaddr_in));
+ ai->ai_addr = (struct sockaddr *)(ai + 1);
+ /* XXX -- ssh doesn't use sa_len */
+ ai->ai_addrlen = sizeof(struct sockaddr_in);
+#ifdef HAVE_SOCKADDR_SA_LEN
+ ai->ai_addr->sa_len = sizeof(struct sockaddr_in);
+#endif
+ ai->ai_addr->sa_family = ai->ai_family = AF_INET;
+ ((struct sockaddr_in *)(ai)->ai_addr)->sin_port = port;
+ ((struct sockaddr_in *)(ai)->ai_addr)->sin_addr.s_addr = addr;
+ ai->ai_socktype = socktype;
+ ai->ai_protocol = proto;
+ return ai;
+ }
+
+ return NULL;
+}
+
+int getaddrinfo(const char *node, const char *service, const struct addrinfo *hints, struct addrinfo **res)
+{
+ struct addrinfo *cur, *prev = NULL;
+ struct hostent *hp;
+ struct in_addr in;
+ int i, port = 0, socktype, proto;
+
+ if (hints && hints->ai_family != PF_INET && hints->ai_family != PF_UNSPEC)
+ return EAI_FAMILY;
+
+ socktype = (hints && hints->ai_socktype) ? hints->ai_socktype : SOCK_STREAM;
+ if (hints && hints->ai_protocol)
+ proto = hints->ai_protocol;
+ else {
+ switch (socktype) {
+ case SOCK_DGRAM:
+ proto = IPPROTO_UDP;
+ break;
+ case SOCK_STREAM:
+ proto = IPPROTO_TCP;
+ break;
+ default:
+ proto = 0;
+ break;
+ }
+ }
+
+ if (service) {
+ if (isdigit((int)*service))
+ port = htons(atoi(service));
+ else {
+ struct servent *se;
+ char *pe_proto;
+
+ switch (socktype) {
+ case SOCK_DGRAM:
+ pe_proto = "udp";
+ break;
+ case SOCK_STREAM:
+ pe_proto = "tcp";
+ break;
+ default:
+ pe_proto = NULL;
+ break;
+ }
+ if ((se = getservbyname(service, pe_proto)) == NULL)
+ return EAI_SERVICE;
+
+ port = se->s_port;
+ }
+ }
+ if (!node) {
+ if (hints && hints->ai_flags & AI_PASSIVE)
+ *res = malloc_ai(port, htonl(0x00000000), socktype, proto);
+ else
+ *res = malloc_ai(port, htonl(0x7f000001), socktype, proto);
+ if (*res)
+ return 0;
+ else
+ return EAI_MEMORY;
+ }
+ if (inet_aton(node, &in)) {
+ *res = malloc_ai(port, in.s_addr, socktype, proto);
+ if (*res)
+ return 0;
+ else
+ return EAI_MEMORY;
+ }
+ if (hints && hints->ai_flags & AI_NUMERICHOST)
+ return EAI_NODATA;
+ if ((hp = gethostbyname(node)) && hp->h_name && hp->h_name[0] && hp->h_addr_list[0]) {
+ for (i = 0; hp->h_addr_list[i]; i++) {
+ if ((cur = malloc_ai(port, ((struct in_addr *)hp->h_addr_list[i])->s_addr, socktype, proto)) == NULL) {
+ if (*res)
+ freeaddrinfo(*res);
+ return EAI_MEMORY;
+ }
+ if (prev)
+ prev->ai_next = cur;
+ else
+ *res = cur;
+ prev = cur;
+ }
+ if (hints && hints->ai_flags & AI_CANONNAME && *res) {
+ /* NOT sasl_strdup for compatibility */
+ if (((*res)->ai_canonname = strdup(hp->h_name)) == NULL) {
+ freeaddrinfo(*res);
+ return EAI_MEMORY;
+ }
+ }
+ return 0;
+ }
+ return EAI_NODATA;
+}
diff --git a/newlib/libc/sys/phoenix/net/gethostbyaddr.c b/newlib/libc/sys/phoenix/net/gethostbyaddr.c
new file mode 100644
index 000000000..0a40a44f1
--- /dev/null
+++ b/newlib/libc/sys/phoenix/net/gethostbyaddr.c
@@ -0,0 +1,33 @@
+/* Copyright (c) 2016 Phoenix Systems
+ 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 <errno.h>
+#include <netdb.h>
+
+struct hostent *gethostbyaddr(const void *addr, socklen_t len, int type)
+{
+ /* TODO: implement. */
+ errno = ENOSYS;
+ return NULL;
+}
diff --git a/newlib/libc/sys/phoenix/net/gethostbyname.c b/newlib/libc/sys/phoenix/net/gethostbyname.c
new file mode 100644
index 000000000..a7dbe6aa8
--- /dev/null
+++ b/newlib/libc/sys/phoenix/net/gethostbyname.c
@@ -0,0 +1,33 @@
+/* Copyright (c) 2016 Phoenix Systems
+ 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 <errno.h>
+#include <netdb.h>
+
+struct hostent *gethostbyname(const char *name)
+{
+ /* TODO: implement. */
+ errno = ENOSYS;
+ return NULL;
+}
diff --git a/newlib/libc/sys/phoenix/net/getnameinfo.c b/newlib/libc/sys/phoenix/net/getnameinfo.c
new file mode 100644
index 000000000..db670f7a0
--- /dev/null
+++ b/newlib/libc/sys/phoenix/net/getnameinfo.c
@@ -0,0 +1,33 @@
+/* Copyright (c) 2016 Phoenix Systems
+ 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 <errno.h>
+#include <netdb.h>
+
+int getnameinfo(const struct sockaddr *sa, socklen_t salen, char *host, socklen_t hostlen, char *serv, socklen_t servlen, int flags)
+{
+ /* TODO: implement. */
+ errno = ENOSYS;
+ return EAI_SYSTEM;
+}
diff --git a/newlib/libc/sys/phoenix/net/getservbyname.c b/newlib/libc/sys/phoenix/net/getservbyname.c
new file mode 100644
index 000000000..97ac4652b
--- /dev/null
+++ b/newlib/libc/sys/phoenix/net/getservbyname.c
@@ -0,0 +1,33 @@
+/* Copyright (c) 2016 Phoenix Systems
+ 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 <errno.h>
+#include <netdb.h>
+
+struct servent *getservbyname(const char *name, const char *proto)
+{
+ /* TODO: implement. */
+ errno = ENOSYS;
+ return NULL;
+}
diff --git a/newlib/libc/sys/phoenix/net/getservbyport.c b/newlib/libc/sys/phoenix/net/getservbyport.c
new file mode 100644
index 000000000..ac23fc8f6
--- /dev/null
+++ b/newlib/libc/sys/phoenix/net/getservbyport.c
@@ -0,0 +1,33 @@
+/* Copyright (c) 2016 Phoenix Systems
+ 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 <errno.h>
+#include <netdb.h>
+
+struct servent *getservbyport(int port, const char *proto)
+{
+ /* TODO: implement. */
+ errno = ENOSYS;
+ return NULL;
+}
diff --git a/newlib/libc/sys/phoenix/net/herror.c b/newlib/libc/sys/phoenix/net/herror.c
new file mode 100644
index 000000000..f45ae65ec
--- /dev/null
+++ b/newlib/libc/sys/phoenix/net/herror.c
@@ -0,0 +1,38 @@
+/* Copyright (c) 2016 Phoenix Systems
+ 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 <errno.h>
+#include <netdb.h>
+#include <reent.h>
+
+const char *hstrerror(int err)
+{
+ errno = ENOSYS;
+ return NULL;
+}
+
+int *__h_errno_location()
+{
+ return &(_REENT->_new._reent._h_errno);
+}
diff --git a/newlib/libc/sys/phoenix/net/hostname.c b/newlib/libc/sys/phoenix/net/hostname.c
new file mode 100644
index 000000000..280750b1f
--- /dev/null
+++ b/newlib/libc/sys/phoenix/net/hostname.c
@@ -0,0 +1,52 @@
+/* Copyright (c) 2016 Phoenix Systems
+ 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 "syscall.h"
+
+#include <errno.h>
+
+#define NAME_GET 0
+#define NAME_SET 1
+
+int gethostname(char *name, size_t len)
+{
+ int ret = syscall3(int, SYS_HOSTNAME, name, len, NAME_GET);
+ if (ret < 0) {
+ errno = -ret;
+ return -1;
+ }
+
+ return ret;
+}
+
+int sethostname(const char *name, size_t len)
+{
+ int ret = syscall3(int, SYS_HOSTNAME, name, len, NAME_SET);
+ if (ret < 0) {
+ errno = -ret;
+ return -1;
+ }
+
+ return ret;
+}
diff --git a/newlib/libc/sys/phoenix/net/inet_addr.c b/newlib/libc/sys/phoenix/net/inet_addr.c
new file mode 100644
index 000000000..a95b6e21b
--- /dev/null
+++ b/newlib/libc/sys/phoenix/net/inet_addr.c
@@ -0,0 +1,70 @@
+/* $KAME: inet_addr.c,v 1.5 2001/08/20 02:32:40 itojun Exp $ */
+
+/*
+ * ++Copyright++ 1983, 1990, 1993
+ * -
+ * Copyright (c) 1983, 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.
+ * -
+ * Portions Copyright (c) 1993 by Digital Equipment Corporation.
+ *
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies, and that
+ * the name of Digital Equipment Corporation not be used in advertising or
+ * publicity pertaining to distribution of the document or software without
+ * specific, written prior permission.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND DIGITAL EQUIPMENT CORP. DISCLAIMS ALL
+ * WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL DIGITAL EQUIPMENT
+ * CORPORATION BE LIABLE FOR ANY SPECIAL, DIRECT, 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.
+ * -
+ * --Copyright--
+ */
+
+/* Copied from Linux, modified for Phoenix-RTOS. */
+
+#include <arpa/inet.h>
+
+in_addr_t inet_addr(const char *cp)
+{
+ struct in_addr val;
+
+ if (inet_aton(cp, &val))
+ return val.s_addr;
+
+ return INADDR_NONE;
+}
diff --git a/newlib/libc/sys/phoenix/net/inet_aton.c b/newlib/libc/sys/phoenix/net/inet_aton.c
new file mode 100644
index 000000000..f595e87e3
--- /dev/null
+++ b/newlib/libc/sys/phoenix/net/inet_aton.c
@@ -0,0 +1,166 @@
+/* $KAME: inet_addr.c,v 1.5 2001/08/20 02:32:40 itojun Exp $ */
+
+/*
+ * ++Copyright++ 1983, 1990, 1993
+ * -
+ * Copyright (c) 1983, 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.
+ * -
+ * Portions Copyright (c) 1993 by Digital Equipment Corporation.
+ *
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies, and that
+ * the name of Digital Equipment Corporation not be used in advertising or
+ * publicity pertaining to distribution of the document or software without
+ * specific, written prior permission.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND DIGITAL EQUIPMENT CORP. DISCLAIMS ALL
+ * WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL DIGITAL EQUIPMENT
+ * CORPORATION BE LIABLE FOR ANY SPECIAL, DIRECT, 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.
+ * -
+ * --Copyright--
+ */
+
+/* Copied from Linux, modified for Phoenix-RTOS. */
+
+#include <arpa/inet.h>
+#include <ctype.h>
+#include <errno.h>
+#include <stdlib.h>
+
+int inet_aton(const char *cp, struct in_addr *inp)
+{
+ u_long parts[4];
+ in_addr_t val;
+ char *c;
+ char *endptr;
+ int gotend, n;
+ c = (char *)cp;
+ n = 0;
+ /*
+ * Run through the string, grabbing numbers until
+ * the end of the string, or some error
+ */
+ gotend = 0;
+
+ while (!gotend) {
+ errno = 0;
+ val = strtoul(c, &endptr, 0);
+
+ if (errno == ERANGE) /* Fail completely if it overflowed. */
+ return 0;
+
+ /*
+ * If the whole string is invalid, endptr will equal
+ * c.. this way we can make sure someone hasn't
+ * gone '.12' or something which would get past
+ * the next check.
+ */
+ if (endptr == c)
+ return 0;
+
+ parts[n] = val;
+ c = endptr;
+
+ /* Check the next character past the previous number's end */
+ switch (*c) {
+ case '.':
+
+ /* Make sure we only do 3 dots .. */
+ if (n == 3) /* Whoops. Quit. */
+ return 0;
+
+ n++;
+ c++;
+ break;
+
+ case '\0':
+ gotend = 1;
+ break;
+
+ default:
+ if (isspace((unsigned char)*c)) {
+ gotend = 1;
+ break;
+ }
+
+ else
+ return 0; /* Invalid character, so fail */
+ }
+ }
+
+ /*
+ * Concoct the address according to
+ * the number of parts specified.
+ */
+
+ switch (n) {
+ case 0: /* a -- 32 bits */
+ /*
+ * Nothing is necessary here. Overflow checking was
+ * already done in strtoul().
+ */
+ break;
+
+ case 1: /* a.b -- 8.24 bits */
+ if (val > 0xffffff || parts[0] > 0xff)
+ return 0;
+
+ val |= parts[0] << 24;
+ break;
+
+ case 2: /* a.b.c -- 8.8.16 bits */
+ if (val > 0xffff || parts[0] > 0xff || parts[1] > 0xff)
+ return 0;
+
+ val |= (parts[0] << 24) | (parts[1] << 16);
+ break;
+
+ case 3: /* a.b.c.d -- 8.8.8.8 bits */
+ if (val > 0xff || parts[0] > 0xff || parts[1] > 0xff ||
+ parts[2] > 0xff)
+ return 0;
+
+ val |= (parts[0] << 24) | (parts[1] << 16) | (parts[2] << 8);
+ break;
+ }
+
+ if (inp != NULL)
+ inp->s_addr = htonl(val);
+
+ return 1;
+}
diff --git a/newlib/libc/sys/phoenix/net/inet_lnaof.c b/newlib/libc/sys/phoenix/net/inet_lnaof.c
new file mode 100644
index 000000000..8af1e2282
--- /dev/null
+++ b/newlib/libc/sys/phoenix/net/inet_lnaof.c
@@ -0,0 +1,46 @@
+/*
+ * Copyright (c) 1983, 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.
+ * 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.
+ */
+
+/* Copied from Linux, modified for Phoenix-RTOS. */
+
+#include <arpa/inet.h>
+#include <netinet/in.h>
+#include <sys/param.h>
+
+in_addr_t inet_lnaof(struct in_addr in)
+{
+ register u_int32_t i = ntohl(in.s_addr);
+
+ if (IN_CLASSA(i))
+ return (i) & IN_CLASSA_HOST;
+ else if (IN_CLASSB(i))
+ return (i) & IN_CLASSB_HOST;
+ else
+ return (i) & IN_CLASSC_HOST;
+}
diff --git a/newlib/libc/sys/phoenix/net/inet_makeaddr.c b/newlib/libc/sys/phoenix/net/inet_makeaddr.c
new file mode 100644
index 000000000..5af45414f
--- /dev/null
+++ b/newlib/libc/sys/phoenix/net/inet_makeaddr.c
@@ -0,0 +1,51 @@
+/*
+ * Copyright (c) 1983, 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.
+ * 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.
+ */
+
+/* Copied from Linux, modified for Phoenix-RTOS. */
+
+#include <arpa/inet.h>
+#include <netinet/in.h>
+#include <sys/param.h>
+
+struct in_addr inet_makeaddr(in_addr_t net, in_addr_t host)
+{
+ struct in_addr in;
+
+ if (net < 128)
+ in.s_addr = (net << IN_CLASSA_NSHIFT) | (host & IN_CLASSA_HOST);
+ else if (net < 65536)
+ in.s_addr = (net << IN_CLASSB_NSHIFT) | (host & IN_CLASSB_HOST);
+ else if (net < 16777216L)
+ in.s_addr = (net << IN_CLASSC_NSHIFT) | (host & IN_CLASSC_HOST);
+ else
+ in.s_addr = net | host;
+
+ in.s_addr = htonl(in.s_addr);
+ return in;
+}
diff --git a/newlib/libc/sys/phoenix/net/inet_net_ntop.c b/newlib/libc/sys/phoenix/net/inet_net_ntop.c
new file mode 100644
index 000000000..7b25143a3
--- /dev/null
+++ b/newlib/libc/sys/phoenix/net/inet_net_ntop.c
@@ -0,0 +1,107 @@
+/*
+ * Copyright (c) 1996 by Internet Software Consortium.
+ *
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS
+ * ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
+ * CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, 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.
+ */
+
+/* Author: Paul Vixie (ISC), July 1996 */
+/* Copied from Linux, modified for Phoenix-RTOS. */
+
+#include <arpa/inet.h>
+#include <errno.h>
+#include <netinet/in.h>
+#include <stdio.h>
+#include <sys/types.h>
+
+#ifdef SPRINTF_CHAR
+# define SPRINTF(x) strlen(sprintf/**/x)
+#else
+# define SPRINTF(x) ((size_t)sprintf x)
+#endif
+
+static char *inet_net_ntop_ipv4(const u_char *src, int bits, char *dst, size_t size)
+{
+ char *odst = dst;
+ char *t;
+ u_int m;
+ int b;
+
+ if (bits < 0 || bits > 32) {
+ errno = EINVAL;
+ return (NULL);
+ }
+
+ if (bits == 0) {
+ if (size < sizeof "0")
+ goto emsgsize;
+
+ *dst++ = '0';
+ *dst = '\0';
+ }
+
+ /* Format whole octets. */
+ for (b = bits / 8; b > 0; b--) {
+ if (size < sizeof "255.")
+ goto emsgsize;
+
+ t = dst;
+ dst += SPRINTF((dst, "%u", *src++));
+
+ if (b > 1) {
+ *dst++ = '.';
+ *dst = '\0';
+ }
+
+ size -= (size_t)(dst - t);
+ }
+
+ /* Format partial octet. */
+ b = bits % 8;
+
+ if (b > 0) {
+ if (size < sizeof ".255")
+ goto emsgsize;
+
+ t = dst;
+
+ if (dst != odst)
+ *dst++ = '.';
+
+ m = ((1 << b) - 1) << (8 - b);
+ dst += SPRINTF((dst, "%u", *src & m));
+ size -= (size_t)(dst - t);
+ }
+
+ /* Format CIDR /width. */
+ if (size < sizeof "/32")
+ goto emsgsize;
+
+ dst += SPRINTF((dst, "/%u", bits));
+ return (odst);
+emsgsize:
+ errno = EMSGSIZE;
+ return (NULL);
+}
+
+char *inet_net_ntop(int af, const void *netp, int bits, char *pres, size_t psize)
+{
+ switch (af) {
+ case AF_INET:
+ return inet_net_ntop_ipv4(netp, bits, pres, psize);
+
+ default:
+ errno = EAFNOSUPPORT;
+ return NULL;
+ }
+}
diff --git a/newlib/libc/sys/phoenix/net/inet_net_pton.c b/newlib/libc/sys/phoenix/net/inet_net_pton.c
new file mode 100644
index 000000000..071ada98f
--- /dev/null
+++ b/newlib/libc/sys/phoenix/net/inet_net_pton.c
@@ -0,0 +1,190 @@
+/*
+ * Copyright (c) 1996 by Internet Software Consortium.
+ *
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS
+ * ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
+ * CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, 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.
+ */
+
+/* Author: Paul Vixie (ISC), June 1996 */
+/* Copied from Linux, modified for Phoenix-RTOS. */
+
+#include <arpa/inet.h>
+#include <assert.h>
+#include <ctype.h>
+#include <errno.h>
+#include <netinet/in.h>
+#include <string.h>
+#include <sys/socket.h>
+#include <sys/types.h>
+
+static int inet_net_pton_ipv4(const char *src, u_char *dst, size_t size)
+{
+ static const char xdigits[] = "0123456789abcdef";
+ static const char digits[] = "0123456789";
+ int n, ch, tmp, dirty, bits;
+ const u_char *odst = dst;
+ ch = *src++;
+
+ if (ch == '0' && (src[0] == 'x' || src[0] == 'X') && isascii(src[1]) && isxdigit(src[1])) {
+ /* Hexadecimal: Eat nybble string. */
+ if (size <= 0)
+ goto emsgsize;
+
+ *dst = 0, dirty = 0;
+ src++; /* skip x or X. */
+
+ while ((ch = *src++) != '\0' &&
+ isascii(ch) && isxdigit(ch)) {
+ if (isupper(ch))
+ ch = tolower(ch);
+
+ n = strchr(xdigits, ch) - xdigits;
+ assert(n >= 0 && n <= 15);
+ *dst |= n;
+
+ if (!dirty++)
+ *dst <<= 4;
+
+ else
+ if (size-- > 0)
+ *++dst = 0, dirty = 0;
+
+ else
+ goto emsgsize;
+ }
+
+ if (dirty)
+ size--;
+ }
+ else {
+ if (isascii(ch) && isdigit(ch)) {
+ /* Decimal: eat dotted digit string. */
+ for (;;) {
+ tmp = 0;
+
+ do {
+ n = strchr(digits, ch) - digits;
+ assert(n >= 0 && n <= 9);
+ tmp *= 10;
+ tmp += n;
+
+ if (tmp > 255)
+ goto enoent;
+ }
+ while ((ch = *src++) != '\0' && isascii(ch) && isdigit(ch));
+
+ if (size-- <= 0)
+ goto emsgsize;
+
+ *dst++ = (u_char) tmp;
+
+ if (ch == '\0' || ch == '/')
+ break;
+
+ if (ch != '.')
+ goto enoent;
+
+ ch = *src++;
+
+ if (!isascii(ch) || !isdigit(ch))
+ goto enoent;
+ }
+ }
+ else
+ goto enoent;
+ }
+
+ bits = -1;
+
+ if (ch == '/' && isascii(src[0]) && isdigit(src[0]) && dst > odst) {
+ /* CIDR width specifier. Nothing can follow it. */
+ ch = *src++; /* Skip over the /. */
+ bits = 0;
+
+ do {
+ n = strchr(digits, ch) - digits;
+ assert(n >= 0 && n <= 9);
+ bits *= 10;
+ bits += n;
+ }
+ while ((ch = *src++) != '\0' && isascii(ch) && isdigit(ch));
+
+ if (ch != '\0')
+ goto enoent;
+
+ if (bits > 32)
+ goto emsgsize;
+ }
+
+ /* Firey death and destruction unless we prefetched EOS. */
+ if (ch != '\0')
+ goto enoent;
+
+ /* If nothing was written to the destination, we found no address. */
+ if (dst == odst)
+ goto enoent;
+
+ /* If no CIDR spec was given, infer width from net class. */
+ if (bits == -1) {
+ if (*odst >= 240) /* Class E */
+ bits = 32;
+
+ else
+ if (*odst >= 224) /* Class D */
+ bits = 4;
+
+ else
+ if (*odst >= 192) /* Class C */
+ bits = 24;
+
+ else
+ if (*odst >= 128) /* Class B */
+ bits = 16;
+
+ else /* Class A */
+ bits = 8;
+
+ /* If imputed mask is narrower than specified octets, widen. */
+ if (bits >= 8 && bits < ((dst - odst) * 8))
+ bits = (dst - odst) * 8;
+ }
+
+ /* Extend network to cover the actual mask. */
+ while (bits > ((dst - odst) * 8)) {
+ if (size-- <= 0)
+ goto emsgsize;
+
+ *dst++ = '\0';
+ }
+
+ return (bits);
+enoent:
+ errno = ENOENT;
+ return -1;
+
+emsgsize:
+ errno = EMSGSIZE;
+ return -1;
+}
+
+int inet_net_pton(int af, const char *pres, void *netp, size_t nsize)
+{
+ switch (af) {
+ case AF_INET:
+ return inet_net_pton_ipv4(pres, netp, nsize);
+
+ default:
+ errno = EAFNOSUPPORT;
+ return -1;
+ }
+}
diff --git a/newlib/libc/sys/phoenix/net/inet_netof.c b/newlib/libc/sys/phoenix/net/inet_netof.c
new file mode 100644
index 000000000..b92ce207e
--- /dev/null
+++ b/newlib/libc/sys/phoenix/net/inet_netof.c
@@ -0,0 +1,46 @@
+/*
+ * Copyright (c) 1983, 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.
+ * 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.
+ */
+
+/* Copied from Linux, modified for Phoenix-RTOS. */
+
+#include <arpa/inet.h>
+#include <netinet/in.h>
+#include <sys/param.h>
+
+in_addr_t inet_netof(struct in_addr in)
+{
+ register u_int32_t i = ntohl(in.s_addr);
+
+ if (IN_CLASSA(i))
+ return ((i) & IN_CLASSA_NET) >> IN_CLASSA_NSHIFT;
+ else if (IN_CLASSB(i))
+ return ((i) & IN_CLASSB_NET) >> IN_CLASSB_NSHIFT;
+ else
+ return ((i) & IN_CLASSC_NET) >> IN_CLASSC_NSHIFT;
+}
diff --git a/newlib/libc/sys/phoenix/net/inet_network.c b/newlib/libc/sys/phoenix/net/inet_network.c
new file mode 100644
index 000000000..831b8ee44
--- /dev/null
+++ b/newlib/libc/sys/phoenix/net/inet_network.c
@@ -0,0 +1,102 @@
+/*
+ * Copyright (c) 1983, 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.
+ * 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.
+ */
+
+/* Copied from Linux, modified for Phoenix-RTOS. */
+
+#include <arpa/inet.h>
+#include <ctype.h>
+#include <netinet/in.h>
+#include <sys/types.h>
+
+in_addr_t inet_network(const char *cp)
+{
+ register u_int32_t val, base, n, i;
+ register char c;
+ u_int32_t parts[4], *pp = parts;
+ int digit;
+
+again:
+ val = 0;
+ base = 10;
+ digit = 0;
+
+ if (*cp == '0')
+ digit = 1, base = 8, cp++;
+
+ if (*cp == 'x' || *cp == 'X')
+ base = 16, cp++;
+
+ while ((c = *cp) != 0) {
+ if (isdigit(c)) {
+ if (base == 8 && (c == '8' || c == '9'))
+ return INADDR_NONE;
+
+ val = (val * base) + (c - '0');
+ cp++;
+ digit = 1;
+ continue;
+ }
+
+ if (base == 16 && isxdigit(c)) {
+ val = (val << 4) + (tolower (c) + 10 - 'a');
+ cp++;
+ digit = 1;
+ continue;
+ }
+
+ break;
+ }
+
+ if (!digit)
+ return INADDR_NONE;
+
+ if (pp >= parts + 4 || val > 0xff)
+ return INADDR_NONE;
+
+ if (*cp == '.') {
+ *pp++ = val, cp++;
+ goto again;
+ }
+
+ if (*cp && !isspace(*cp))
+ return INADDR_NONE;
+
+ if (pp >= parts + 4 || val > 0xff)
+ return INADDR_NONE;
+
+ *pp++ = val;
+ n = pp - parts;
+
+ for (val = 0, i = 0; i < n; i++) {
+ val <<= 8;
+ val |= parts[i] & 0xff;
+ }
+
+ return val;
+}
diff --git a/newlib/libc/sys/phoenix/net/inet_ntoa.c b/newlib/libc/sys/phoenix/net/inet_ntoa.c
new file mode 100644
index 000000000..211049c96
--- /dev/null
+++ b/newlib/libc/sys/phoenix/net/inet_ntoa.c
@@ -0,0 +1,35 @@
+/* Copyright (c) 2016 Phoenix Systems
+ 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 <stdio.h>
+#include <arpa/inet.h>
+
+static char static_buffer[18];
+
+char *inet_ntoa(struct in_addr in)
+{
+ unsigned char *bytes = (unsigned char *) &in;
+ snprintf(static_buffer, sizeof(static_buffer), "%d.%d.%d.%d", bytes[0], bytes[1], bytes[2], bytes[3]);
+ return static_buffer;
+}
diff --git a/newlib/libc/sys/phoenix/net/inet_ntop.c b/newlib/libc/sys/phoenix/net/inet_ntop.c
new file mode 100644
index 000000000..5ad0711cf
--- /dev/null
+++ b/newlib/libc/sys/phoenix/net/inet_ntop.c
@@ -0,0 +1,171 @@
+/* Copyright (c) 1996 by Internet Software Consortium.
+ *
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS
+ * ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
+ * CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, 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.
+ */
+
+/* Author: Paul Vixie, 1996 */
+/* Copied from Linux, modified for Phoenix-RTOS. */
+
+#include <arpa/inet.h>
+#include <arpa/nameser.h>
+#include <errno.h>
+#include <netinet/in.h>
+#include <stdio.h>
+#include <string.h>
+#include <sys/socket.h>
+#include <sys/types.h>
+
+#define SPRINTF(x) ((socklen_t) sprintf x)
+
+/*
+ * WARNING: Don't even consider trying to compile this on a system where
+ * sizeof(int) < 4. sizeof(int) > 4 is fine; all the world's not a VAX.
+ */
+
+static const char *inet_ntop4(const u_char *src, char *dst, socklen_t size)
+{
+ static const char fmt[] = "%u.%u.%u.%u";
+ char tmp[sizeof "255.255.255.255"];
+
+ if (SPRINTF((tmp, fmt, src[0], src[1], src[2], src[3])) > size) {
+ errno = ENOSPC;
+ return NULL;
+ }
+
+ strcpy(dst, tmp);
+ return dst;
+}
+
+static const char *inet_ntop6(const u_char *src, char *dst, socklen_t size)
+{
+ /*
+ * Note that int32_t and int16_t need only be "at least" large enough
+ * to contain a value of the specified size. On some systems, like
+ * Crays, there is no such thing as an integer variable with 16 bits.
+ * Keep this in mind if you think this function should have been coded
+ * to use pointer overlays. All the world's not a VAX.
+ */
+ char tmp[sizeof("ffff:ffff:ffff:ffff:ffff:ffff:255.255.255.255")], *tp;
+ struct {
+ int base, len;
+ } best, cur;
+ u_int words[NS_IN6ADDRSZ / NS_INT16SZ];
+ int i;
+ /*
+ * Preprocess:
+ * Copy the input (bytewise) array into a wordwise array.
+ * Find the longest run of 0x00's in src[] for :: shorthanding.
+ */
+ memset(words, '\0', sizeof words);
+
+ for (i = 0; i < NS_IN6ADDRSZ; i++)
+ words[i / 2] |= (src[i] << ((1 - (i % 2)) << 3));
+
+ best.base = -1;
+ cur.base = -1;
+
+ for (i = 0; i < (NS_IN6ADDRSZ / NS_INT16SZ); i++) {
+ if (words[i] == 0) {
+ if (cur.base == -1)
+ cur.base = i, cur.len = 1;
+
+ else
+ cur.len++;
+ }
+
+ else {
+ if (cur.base != -1) {
+ if (best.base == -1 || cur.len > best.len)
+ best = cur;
+
+ cur.base = -1;
+ }
+ }
+ }
+
+ if (cur.base != -1) {
+ if (best.base == -1 || cur.len > best.len)
+ best = cur;
+ }
+
+ if (best.base != -1 && best.len < 2)
+ best.base = -1;
+
+ /*
+ * Format the result.
+ */
+ tp = tmp;
+
+ for (i = 0; i < (NS_IN6ADDRSZ / NS_INT16SZ); i++) {
+ /* Are we inside the best run of 0x00's? */
+ if (best.base != -1 && i >= best.base &&
+ i < (best.base + best.len)) {
+ if (i == best.base)
+ *tp++ = ':';
+
+ continue;
+ }
+
+ /* Are we following an initial run of 0x00s or any real hex? */
+ if (i != 0)
+ *tp++ = ':';
+
+ /* Is this address an encapsulated IPv4? */
+ if (i == 6 && best.base == 0 &&
+ (best.len == 6 || (best.len == 5 && words[5] == 0xffff))) {
+ if (!inet_ntop4(src + 12, tp, sizeof tmp - (tp - tmp)))
+ return NULL;
+
+ tp += strlen(tp);
+ break;
+ }
+
+ tp += SPRINTF((tp, "%x", words[i]));
+ }
+
+ /* Was it a trailing run of 0x00's? */
+ if (best.base != -1 && (best.base + best.len) ==
+ (NS_IN6ADDRSZ / NS_INT16SZ))
+ *tp++ = ':';
+
+ *tp++ = '\0';
+
+ /*
+ * Check for overflow, copy, and we're done.
+ */
+ if ((socklen_t)(tp - tmp) > size) {
+ errno = ENOSPC;
+ return NULL;
+ }
+
+ strcpy(dst, tmp);
+ return dst;
+}
+
+const char *inet_ntop(int af, const void *src, char *dst, socklen_t size)
+{
+ switch (af) {
+ case AF_INET:
+ return inet_ntop4(src, dst, size);
+
+ case AF_INET6:
+ return inet_ntop6(src, dst, size);
+
+ default:
+ errno = EAFNOSUPPORT;
+ return NULL;
+ }
+
+ /* NOTREACHED */
+}
diff --git a/newlib/libc/sys/phoenix/net/inet_pton.c b/newlib/libc/sys/phoenix/net/inet_pton.c
new file mode 100644
index 000000000..3b3296abd
--- /dev/null
+++ b/newlib/libc/sys/phoenix/net/inet_pton.c
@@ -0,0 +1,198 @@
+/* $KAME: inet_pton.c,v 1.5 2001/08/20 02:32:40 itojun Exp $ */
+
+/* Copyright (c) 1996 by Internet Software Consortium.
+ *
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS
+ * ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
+ * CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, 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.
+ */
+
+/* Author: Paul Vixie, 1996 */
+/* Copied from Linux, modified for Phoenix-RTOS. */
+
+#include <arpa/inet.h>
+#include <arpa/nameser.h>
+#include <errno.h>
+#include <netinet/in.h>
+#include <string.h>
+#include <sys/types.h>
+
+/*
+ * WARNING: Don't even consider trying to compile this on a system where
+ * sizeof(int) < 4. sizeof(int) > 4 is fine; all the world's not a VAX.
+ */
+
+static int inet_pton4(const char *src, u_char *dst)
+{
+ static const char digits[] = "0123456789";
+ int saw_digit, octets, ch;
+ u_char tmp[NS_INADDRSZ], *tp;
+ saw_digit = 0;
+ octets = 0;
+ *(tp = tmp) = 0;
+
+ while ((ch = *src++) != '\0') {
+ const char *pch;
+
+ if ((pch = strchr(digits, ch)) != NULL) {
+ u_int new = *tp * 10 + (pch - digits);
+
+ if (new > 255)
+ return 0;
+
+ *tp = new;
+
+ if (! saw_digit) {
+ if (++octets > 4)
+ return 0;
+
+ saw_digit = 1;
+ }
+ }
+
+ else
+ if (ch == '.' && saw_digit) {
+ if (octets == 4)
+ return 0;
+
+ *++tp = 0;
+ saw_digit = 0;
+ }
+
+ else
+ return 0;
+ }
+
+ if (octets < 4)
+ return 0;
+
+ memcpy(dst, tmp, NS_INADDRSZ);
+ return 1;
+}
+
+static int inet_pton6(const char *src, u_char *dst)
+{
+ static const char xdigits_l[] = "0123456789abcdef";
+ static const char xdigits_u[] = "0123456789ABCDEF";
+ u_char tmp[NS_IN6ADDRSZ], *tp, *endp, *colonp;
+ const char *xdigits, *curtok;
+ int ch, saw_xdigit;
+ u_int val;
+
+ memset((tp = tmp), '\0', NS_IN6ADDRSZ);
+ endp = tp + NS_IN6ADDRSZ;
+ colonp = NULL;
+
+ /* Leading :: requires some special handling. */
+ if (*src == ':')
+ if (*++src != ':')
+ return 0;
+
+ curtok = src;
+ saw_xdigit = 0;
+ val = 0;
+
+ while ((ch = *src++) != '\0') {
+ const char *pch;
+
+ if ((pch = strchr((xdigits = xdigits_l), ch)) == NULL)
+ pch = strchr((xdigits = xdigits_u), ch);
+
+ if (pch != NULL) {
+ val <<= 4;
+ val |= (pch - xdigits);
+
+ if (val > 0xffff)
+ return 0;
+
+ saw_xdigit = 1;
+ continue;
+ }
+
+ if (ch == ':') {
+ curtok = src;
+
+ if (!saw_xdigit) {
+ if (colonp)
+ return 0;
+
+ colonp = tp;
+ continue;
+ }
+
+ if (tp + NS_INT16SZ > endp)
+ return 0;
+
+ *tp++ = (u_char) (val >> 8) & 0xff;
+ *tp++ = (u_char) val & 0xff;
+ saw_xdigit = 0;
+ val = 0;
+ continue;
+ }
+
+ if (ch == '.' && ((tp + NS_INADDRSZ) <= endp) &&
+ inet_pton4(curtok, tp) > 0) {
+ tp += NS_INADDRSZ;
+ saw_xdigit = 0;
+ break; /* '\0' was seen by inet_pton4(). */
+ }
+
+ return 0;
+ }
+
+ if (saw_xdigit) {
+ if (tp + NS_INT16SZ > endp)
+ return 0;
+
+ *tp++ = (u_char) (val >> 8) & 0xff;
+ *tp++ = (u_char) val & 0xff;
+ }
+
+ if (colonp != NULL) {
+ /*
+ * Since some memmove()'s erroneously fail to handle
+ * overlapping regions, we'll do the shift by hand.
+ */
+ const int n = tp - colonp;
+ int i;
+
+ for (i = 1; i <= n; i++) {
+ endp[- i] = colonp[n - i];
+ colonp[n - i] = 0;
+ }
+
+ tp = endp;
+ }
+
+ if (tp != endp)
+ return 0;
+
+ memcpy(dst, tmp, NS_IN6ADDRSZ);
+ return 1;
+}
+
+int inet_pton(int af, const char *src, void *dst)
+{
+ switch (af) {
+ case AF_INET:
+ return inet_pton4(src, dst);
+
+ case AF_INET6:
+ return inet_pton6(src, dst);
+
+ default:
+ errno = EAFNOSUPPORT;
+ return -1;
+ }
+
+ /* NOTREACHED */
+}
diff --git a/newlib/libc/sys/phoenix/net/network.c b/newlib/libc/sys/phoenix/net/network.c
new file mode 100644
index 000000000..2f49574ee
--- /dev/null
+++ b/newlib/libc/sys/phoenix/net/network.c
@@ -0,0 +1,49 @@
+/* Copyright (c) 2016 Phoenix Systems
+ 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 "syscall.h"
+
+#include <errno.h>
+
+int network_setUp(const char *interface)
+{
+ int ret = syscall2(int, SYS_NET_CONFIGURE, interface, 1);
+ if (ret < 0) {
+ errno = -ret;
+ return -1;
+ }
+
+ return ret;
+}
+
+int network_setDown(const char *interface)
+{
+ int ret = syscall2(int, SYS_NET_CONFIGURE, interface, 0);
+ if (ret < 0) {
+ errno = -ret;
+ return -1;
+ }
+
+ return ret;
+}
diff --git a/newlib/libc/sys/phoenix/phoenix.c b/newlib/libc/sys/phoenix/phoenix.c
new file mode 100644
index 000000000..8d57546a2
--- /dev/null
+++ b/newlib/libc/sys/phoenix/phoenix.c
@@ -0,0 +1,23 @@
+/* Copyright (c) 2016 Phoenix Systems
+ 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.*/
diff --git a/newlib/libc/sys/phoenix/pid.c b/newlib/libc/sys/phoenix/pid.c
new file mode 100644
index 000000000..09b263650
--- /dev/null
+++ b/newlib/libc/sys/phoenix/pid.c
@@ -0,0 +1,37 @@
+/* Copyright (c) 2016 Phoenix Systems
+ 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 "syscall.h"
+
+#include <sys/types.h>
+
+pid_t getpid()
+{
+ return syscall0(int, SYS_GETPID);
+}
+
+pid_t getppid()
+{
+ return syscall0(int, SYS_GETPPID);
+}
diff --git a/newlib/libc/sys/phoenix/pipe.c b/newlib/libc/sys/phoenix/pipe.c
new file mode 100644
index 000000000..474336239
--- /dev/null
+++ b/newlib/libc/sys/phoenix/pipe.c
@@ -0,0 +1,38 @@
+/* Copyright (c) 2016 Phoenix Systems
+ 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 "syscall.h"
+
+#include <errno.h>
+
+int pipe(int pipefd[2])
+{
+ int ret = syscall1(int, SYS_PIPE, pipefd);
+ if (ret < 0) {
+ errno = -ret;
+ return -1;
+ }
+
+ return ret;
+}
diff --git a/newlib/libc/sys/phoenix/poll.c b/newlib/libc/sys/phoenix/poll.c
new file mode 100644
index 000000000..f15e1ca10
--- /dev/null
+++ b/newlib/libc/sys/phoenix/poll.c
@@ -0,0 +1,39 @@
+/* Copyright (c) 2016 Phoenix Systems
+ 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 "syscall.h"
+
+#include <errno.h>
+#include <poll.h>
+
+int poll(struct pollfd *fds, nfds_t nfds, int timeout)
+{
+ int ret = syscall3(int, SYS_POLL, fds, nfds, timeout);
+ if (ret < 0) {
+ errno = -ret;
+ return -1;
+ }
+
+ return ret;
+}
diff --git a/newlib/libc/sys/phoenix/realpath.c b/newlib/libc/sys/phoenix/realpath.c
new file mode 100644
index 000000000..0727402ca
--- /dev/null
+++ b/newlib/libc/sys/phoenix/realpath.c
@@ -0,0 +1,104 @@
+/* Written 2000 by Werner Almesberger */
+
+#include <errno.h>
+#include <stdlib.h>
+#include <string.h>
+#include <sys/dirent.h>
+#include <sys/stat.h>
+#include <unistd.h>
+
+static int resolve_path(char *path, char *result, char *pos)
+{
+ if (*path == '/') {
+ *result = '/';
+ pos = result+1;
+ ++path;
+ }
+
+ *pos = 0;
+ if (!*path)
+ return 0;
+
+ while (1) {
+ struct stat st;
+
+ char *slash = *path ? strchr(path,'/') : NULL;
+ if (slash)
+ *slash = 0;
+
+ if (!path[0] || (path[0] == '.' && (!path[1] || (path[1] == '.' && !path[2])))) {
+ --pos;
+ if (pos != result && path[0] && path[1])
+ while (*--pos != '/');
+ }
+ else {
+ strcpy(pos,path);
+ if (lstat(result,&st) < 0)
+ return -1;
+
+ if (S_ISLNK(st.st_mode)) {
+ char buf[PATH_MAX_SIZE];
+
+ if (readlink(result,buf,sizeof(buf)) < 0)
+ return -1;
+
+ *pos = 0;
+ if (slash) {
+ *slash = '/';
+ strcat(buf, slash);
+ }
+
+ strcpy(path,buf);
+ if (*path == '/')
+ result[1] = 0;
+
+ pos = strchr(result,0);
+ continue;
+ }
+
+ pos = strchr(result,0);
+ }
+
+ if (slash) {
+ *pos++ = '/';
+ path = slash + 1;
+ }
+
+ *pos = 0;
+ if (!slash)
+ break;
+ }
+
+ return 0;
+}
+
+char *realpath(const char *path, char *resolved_path)
+{
+ char cwd[PATH_MAX_SIZE];
+ char *path_copy;
+ int res;
+
+ if (!*path) {
+ errno = ENOENT;
+ return NULL;
+ }
+
+ if (!getcwd(cwd, sizeof(cwd)))
+ return NULL;
+
+ strcpy(resolved_path, "/");
+ if (resolve_path(cwd, resolved_path, resolved_path))
+ return NULL;
+
+ strcat(resolved_path, "/");
+ path_copy = strdup(path);
+ if (!path_copy)
+ return NULL;
+
+ res = resolve_path(path_copy, resolved_path, strchr(resolved_path, 0));
+ free(path_copy);
+ if (res)
+ return NULL;
+
+ return resolved_path;
+}
diff --git a/newlib/libc/sys/phoenix/reboot.c b/newlib/libc/sys/phoenix/reboot.c
new file mode 100644
index 000000000..4769d7894
--- /dev/null
+++ b/newlib/libc/sys/phoenix/reboot.c
@@ -0,0 +1,38 @@
+/* Copyright (c) 2016 Phoenix Systems
+ 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 "syscall.h"
+
+#include <errno.h>
+
+int reboot(int how)
+{
+ int ret = syscall1(int, SYS_REBOOT, how);
+ if(ret < 0) {
+ errno = -ret;
+ return -1;
+ }
+
+ return ret;
+}
diff --git a/newlib/libc/sys/phoenix/regenerate.sh b/newlib/libc/sys/phoenix/regenerate.sh
new file mode 100644
index 000000000..92f5b96cf
--- /dev/null
+++ b/newlib/libc/sys/phoenix/regenerate.sh
@@ -0,0 +1,5 @@
+#!/bin/sh
+
+aclocal-1.11 -I ../../../ -I ../../../../
+/usr/local/bin/autoconf
+automake-1.11 --cygnus Makefile
diff --git a/newlib/libc/sys/phoenix/resource.c b/newlib/libc/sys/phoenix/resource.c
new file mode 100644
index 000000000..12ba5b2c5
--- /dev/null
+++ b/newlib/libc/sys/phoenix/resource.c
@@ -0,0 +1,88 @@
+/* Copyright (c) 2016 Phoenix Systems
+ 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 "syscall.h"
+
+#include <errno.h>
+#include <sched.h>
+#include <sys/resource.h>
+#include <sys/sched.h>
+#include <sys/types.h>
+
+int getpriority(int which, id_t who)
+{
+ struct sched_param param;
+ if (which != PRIO_PROCESS) {
+ errno = ENOSYS;
+ return -1;
+ }
+
+ int ret = sched_getparam(who, &param);
+ if (ret < 0) {
+ errno = -ret;
+ return -1;
+ }
+
+ errno = EOK;
+ return param.sched_priority;
+}
+
+int setpriority(int which, id_t who, int prio)
+{
+ struct sched_param param;
+ if (which != PRIO_PROCESS) {
+ errno = ENOSYS;
+ return -1;
+ }
+
+ param.sched_priority = prio;
+ int ret = sched_setparam(who, &param);
+ if (ret < 0) {
+ errno = -ret;
+ return -1;
+ }
+
+ return ret;
+}
+
+int getrlimit(int resource, struct rlimit *rlim)
+{
+ /* TODO: implement. */
+ errno = ENOSYS;
+ return -1;
+}
+
+int setrlimit(int resource, const struct rlimit *rlim)
+{
+ /* TODO: implement. */
+ errno = ENOSYS;
+ return -1;
+}
+
+int getrusage(int who, struct rusage *usage)
+{
+ /* TODO: implement. */
+ errno = ENOSYS;
+ return -1;
+}
diff --git a/newlib/libc/sys/phoenix/sbrk.c b/newlib/libc/sys/phoenix/sbrk.c
new file mode 100644
index 000000000..64fba4dfd
--- /dev/null
+++ b/newlib/libc/sys/phoenix/sbrk.c
@@ -0,0 +1,48 @@
+/* Copyright (c) 2016 Phoenix Systems
+ 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 "syscall.h"
+
+#include <errno.h>
+#include <stdint.h>
+
+extern const char _end[]; /* Defined by the linker */
+
+void *sbrk(intptr_t increment)
+{
+ static char *heap_end = (char *) _end;
+ char *prev_heap_end = heap_end;
+
+ if (increment != 0) {
+ int ret= syscall2(int, SYS_SBRK, increment, heap_end);
+ if (ret != 0) {
+ errno = -ret;
+ return (void *) -1;
+ }
+
+ heap_end += increment;
+ }
+
+ return (void *) prev_heap_end;
+}
diff --git a/newlib/libc/sys/phoenix/sched.c b/newlib/libc/sys/phoenix/sched.c
new file mode 100644
index 000000000..9e92363d3
--- /dev/null
+++ b/newlib/libc/sys/phoenix/sched.c
@@ -0,0 +1,107 @@
+/* Copyright (c) 2016 Phoenix Systems
+ 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 "syscall.h"
+
+#include <errno.h>
+
+#include <sys/sched.h>
+#include <sys/types.h>
+
+int sched_getparam(pid_t pid, struct sched_param *param)
+{
+ int ret = syscall2(int, SYS_SCHED_GETPARAM, pid, param);
+ if(ret < 0) {
+ errno = -ret;
+ return -1;
+ }
+
+ return ret;
+}
+
+int sched_setparam(pid_t pid, const struct sched_param *param)
+{
+ int ret = syscall2(int, SYS_SCHED_SETPARAM, pid, param);
+ if(ret < 0) {
+ errno = -ret;
+ return -1;
+ }
+
+ return ret;
+}
+
+int sched_getscheduler(pid_t pid)
+{
+ int ret = syscall1(int, SYS_SCHED_GETSCHEDULER, pid);
+ if(ret < 0) {
+ errno = -ret;
+ return -1;
+ }
+
+ return ret;
+}
+
+int sched_setscheduler(pid_t pid, int policy, const struct sched_param *param)
+{
+ int ret = syscall3(int, SYS_SCHED_SETSCHEDULER, pid, policy, param);
+ if(ret < 0) {
+ errno = -ret;
+ return -1;
+ }
+
+ return ret;
+}
+
+int sched_get_priority_max(int policy)
+{
+ int ret = syscall1(int, SYS_SCHED_GET_PRIORITY_MAX, policy);
+ if(ret < 0) {
+ errno = -ret;
+ return -1;
+ }
+
+ return ret;
+}
+
+int sched_get_priority_min(int policy)
+{
+ int ret = syscall1(int, SYS_SCHED_GET_PRIORITY_MIN, policy);
+ if(ret < 0) {
+ errno = -ret;
+ return -1;
+ }
+
+ return ret;
+}
+
+int sched_yield(void)
+{
+ int ret = syscall0(int, SYS_SCHED_YIELD);
+ if(ret < 0) {
+ errno = -ret;
+ return -1;
+ }
+
+ return ret;
+}
diff --git a/newlib/libc/sys/phoenix/select.c b/newlib/libc/sys/phoenix/select.c
new file mode 100644
index 000000000..23741635c
--- /dev/null
+++ b/newlib/libc/sys/phoenix/select.c
@@ -0,0 +1,40 @@
+/* Copyright (c) 2016 Phoenix Systems
+ 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 "syscall.h"
+
+#include <errno.h>
+#include <sys/time.h>
+#include <sys/types.h>
+
+int select(int nfds, fd_set *readfds, fd_set *writefds, fd_set *exceptfds, struct timeval *timeout)
+{
+ int ret = syscall5(int, SYS_SELECT, nfds, readfds, writefds, exceptfds, timeout);
+ if (ret < 0) {
+ errno = -ret;
+ return -1;
+ }
+
+ return ret;
+}
diff --git a/newlib/libc/sys/phoenix/semaphore.c b/newlib/libc/sys/phoenix/semaphore.c
new file mode 100644
index 000000000..617ffc526
--- /dev/null
+++ b/newlib/libc/sys/phoenix/semaphore.c
@@ -0,0 +1,168 @@
+/* Copyright (c) 2016 Phoenix Systems
+ 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 <errno.h>
+#include <fcntl.h>
+#include <malloc.h>
+#include <semaphore.h>
+#include <stdarg.h>
+#include <string.h>
+#include <sys/dirent.h>
+#include <sys/ioctl.h>
+#include <sys/ipc.h>
+#include <sys/stat.h>
+#include <unistd.h>
+
+int sem_init(sem_t *sem, int pshared, unsigned int value)
+{
+ errno = ENOSYS;
+ return -1;
+}
+
+int sem_destroy(sem_t *sem)
+{
+ errno = ENOSYS;
+ return -1;
+}
+
+sem_t *sem_open(const char *name, int oflag, ...)
+{
+ sem_t *sem = (sem_t *) malloc(sizeof(sem_t));
+ if(sem == NULL) {
+ errno = ENOMEM;
+ return SEM_FAILED;
+ }
+
+ if (*name == '/')
+ ++name;
+
+ char sem_name[PATH_MAX_SIZE + 24] = "/dev/ipc/sem_";
+ strncpy(sem_name + 13, name, PATH_MAX_SIZE + 10);
+
+ int mode = S_IRWXUGO;
+ int initval = 1;
+ if (oflag & O_CREAT) {
+ va_list ap;
+ va_start(ap, oflag);
+ mode = va_arg(ap, int);
+ initval = va_arg(ap, int);
+ va_end(ap);
+ }
+
+ sem->fd = open(sem_name, oflag, mode);
+ if (sem->fd != -1) {
+ int flags = fcntl(sem->fd, F_GETFD, 0);
+ if (flags >= 0) {
+ flags |= FD_CLOEXEC;
+ flags = fcntl (sem->fd, F_SETFD, flags);
+ }
+
+ if (flags == -1) {
+ close (sem->fd);
+ free(sem);
+ return SEM_FAILED;
+ }
+ }
+ else {
+ free(sem);
+ return SEM_FAILED;
+ }
+
+ if (sem != SEM_FAILED && (oflag | O_CREAT)) {
+ if (ioctl(sem->fd, IPC_SEM_INIT, initval) < 0) {
+ free(sem);
+ return SEM_FAILED;
+ }
+ }
+
+ return sem;
+}
+
+int sem_close(sem_t *sem)
+{
+ if (sem == NULL || sem->fd < 0) {
+ errno = EINVAL;
+ return -1;
+ }
+
+ close(sem->fd);
+ free(sem);
+
+ return 0;
+}
+
+int sem_unlink(const char *name)
+{
+ return unlink(name);
+}
+
+int sem_wait(sem_t *sem)
+{
+ if(sem == NULL || sem->fd < 0) {
+ errno = EINVAL;
+ return -1;
+ }
+
+ return ioctl(sem->fd, IPC_SEM_DOWN, 0);
+}
+
+int sem_timedwait(sem_t * sem, const struct timespec *abs_timeout)
+{
+ if(sem == NULL || sem->fd < 0) {
+ errno = EINVAL;
+ return -1;
+ }
+
+ return ioctl(sem->fd, IPC_SEM_DOWN_TIMEOUT, 0);
+}
+
+int sem_trywait(sem_t *sem)
+{
+ if(sem == NULL || sem->fd < 0) {
+ errno = EINVAL;
+ return -1;
+ }
+
+ return ioctl(sem->fd, IPC_SEM_TRYDOWN, 0);
+}
+
+int sem_post(sem_t *sem)
+{
+ if(sem == NULL || sem->fd < 0) {
+ errno = EINVAL;
+ return -1;
+ }
+
+ return ioctl(sem->fd, IPC_SEM_UP, 0);
+}
+
+int sem_getvalue (sem_t *sem, int *sval)
+{
+ if(sem == NULL || sem->fd < 0) {
+ errno = EINVAL;
+ return -1;
+ }
+
+ return ioctl(sem->fd, IPC_SEM_GETVAL, (unsigned long) sval);
+}
diff --git a/newlib/libc/sys/phoenix/setmntent.c b/newlib/libc/sys/phoenix/setmntent.c
new file mode 100644
index 000000000..52cd8b31a
--- /dev/null
+++ b/newlib/libc/sys/phoenix/setmntent.c
@@ -0,0 +1,30 @@
+/* Copyright (c) 2016 Phoenix Systems
+ 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 <stdio.h>
+
+FILE *setmntent(const char *filename, const char *type)
+{
+ return fopen(filename, type);
+}
diff --git a/newlib/libc/sys/phoenix/shm.c b/newlib/libc/sys/phoenix/shm.c
new file mode 100644
index 000000000..caccd48ae
--- /dev/null
+++ b/newlib/libc/sys/phoenix/shm.c
@@ -0,0 +1,68 @@
+/* Copyright (c) 2016 Phoenix Systems
+ 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 <fcntl.h>
+#include <string.h>
+#include <sys/dirent.h>
+#include <sys/ioctl.h>
+#include <sys/ipc.h>
+#include <unistd.h>
+
+int shm_open(const char *name, int oflag, mode_t mode)
+{
+ char shm_name[PATH_MAX_SIZE + 24] = "/dev/ipc/shm_";
+
+ if (*name == '/')
+ ++name;
+
+ strncpy(shm_name + 13, name, PATH_MAX_SIZE + 10);
+
+ int fd = open(shm_name, oflag, mode);
+ if (fd >= 0) {
+ int flags = fcntl(fd, F_GETFD, 0);
+ if (flags >= 0) {
+ flags |= FD_CLOEXEC;
+ flags = fcntl(fd, F_SETFD, flags);
+ }
+
+ if (flags == -1) {
+ close(fd);
+ return -1;
+ }
+ }
+
+ if (fd != -1 && (oflag | O_CREAT)) {
+ if (ioctl(fd, IPC_SHM_INIT, 0) < 0) {
+ close(fd);
+ return -1;
+ }
+ }
+
+ return fd;
+}
+
+int shm_unlink(const char *name)
+{
+ return unlink(name);
+}
diff --git a/newlib/libc/sys/phoenix/signal.c b/newlib/libc/sys/phoenix/signal.c
new file mode 100644
index 000000000..eca78962b
--- /dev/null
+++ b/newlib/libc/sys/phoenix/signal.c
@@ -0,0 +1,75 @@
+/* Copyright (c) 2016 Phoenix Systems
+ 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 "syscall.h"
+
+#include <errno.h>
+#include <signal.h>
+#include <sys/types.h>
+
+int kill(pid_t pid, int sig)
+{
+ int ret = syscall2(int, SYS_KILL, pid, sig);
+ if (ret < 0) {
+ errno = -ret;
+ return -1;
+ }
+
+ return ret;
+}
+
+sighandler_t signal(int signum, sighandler_t handler)
+{
+ /* TODO: implement. */
+ errno = ENOSYS;
+ return SIG_ERR;
+}
+
+int sigprocmask(int how, const sigset_t *set, sigset_t *oldset)
+{
+ /* TODO: implement. */
+ errno = ENOSYS;
+ return -1;
+}
+
+int sigaction(int signum, const struct sigaction *act, struct sigaction *oldact)
+{
+ /* TODO: implement. */
+ errno = ENOSYS;
+ return -1;
+}
+
+int sigsuspend(const sigset_t *mask)
+{
+ /* TODO: implement. */
+ errno = ENOSYS;
+ return -1;
+}
+
+int raise(int sig)
+{
+ /* TODO: implement. */
+ errno = ENOSYS;
+ return -1;
+}
diff --git a/newlib/libc/sys/phoenix/socket.c b/newlib/libc/sys/phoenix/socket.c
new file mode 100644
index 000000000..213345fa3
--- /dev/null
+++ b/newlib/libc/sys/phoenix/socket.c
@@ -0,0 +1,137 @@
+/* Copyright (c) 2016 Phoenix Systems
+ 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 "syscall.h"
+
+#include <errno.h>
+#include <sys/socket.h>
+
+int socket(int domain, int type, int protocol)
+{
+ int ret = syscall3(int, SYS_SOCKET, domain, type, protocol);
+ if (ret < 0) {
+ errno = -ret;
+ return -1;
+ }
+
+ return ret;
+}
+
+int bind(int sockfd, const struct sockaddr *addr, socklen_t addrlen)
+{
+ int ret = syscall3(int, SYS_BIND, sockfd, addr, addrlen);
+ if (ret < 0) {
+ errno = -ret;
+ return -1;
+ }
+
+ return ret;
+}
+
+int listen(int sockfd, int backlog)
+{
+ int ret = syscall2(int, SYS_LISTEN, sockfd, backlog);
+ if (ret < 0) {
+ errno = -ret;
+ return -1;
+ }
+
+ return ret;
+}
+
+int accept(int sockfd, struct sockaddr *addr, socklen_t *addrlen)
+{
+ int ret = syscall3(int, SYS_ACCEPT, sockfd, addr, addrlen);
+ if (ret < 0) {
+ errno = -ret;
+ return -1;
+ }
+
+ return ret;
+}
+
+int connect(int sockfd, const struct sockaddr *addr, socklen_t addrlen)
+{
+ int ret = syscall3(int, SYS_CONNECT, sockfd, addr, addrlen);
+ if (ret < 0) {
+ errno = -ret;
+ return -1;
+ }
+
+ return ret;
+}
+
+int sendto(int sockfd, const void *buf, size_t len, int flags, const struct sockaddr *dest_addr, socklen_t addrlen)
+{
+ struct sendto_args args = { sockfd, buf, len, flags, dest_addr, addrlen };
+
+ int ret = syscall1(int, SYS_SENDTO, &args);
+ if (ret < 0) {
+ errno = -ret;
+ return -1;
+ }
+
+ return ret;
+}
+
+int send(int sockfd, const void *buf, size_t len, int flags)
+{
+ return sendto(sockfd, buf, len, flags, NULL, 0);
+}
+
+int recvfrom(int sockfd, void *buf, size_t len, int flags, struct sockaddr *src_addr, socklen_t *addrlen)
+{
+ struct recvfrom_args args = { sockfd, buf, len, flags, src_addr, addrlen };
+
+ int ret = syscall1(int, SYS_RECVFROM, &args);
+ if (ret < 0) {
+ errno = -ret;
+ return -1;
+ }
+
+ return ret;
+}
+
+int recv(int sockfd, void *buf, size_t len, int flags)
+{
+ return recvfrom(sockfd, buf, len, flags, NULL, NULL);
+}
+
+int shutdown(int sockfd, int how)
+{
+ /* TODO: implement. */
+ errno = ENOSYS;
+ return -1;
+}
+
+int getpeername(int sockfd, struct sockaddr *addr, socklen_t *addrlen)
+{
+ int ret = syscall3(int, SYS_GETPEERNAME, sockfd, addr, addrlen);
+ if (ret < 0) {
+ errno = -ret;
+ return -1;
+ }
+
+ return ret;
+}
diff --git a/newlib/libc/sys/phoenix/sockopt.c b/newlib/libc/sys/phoenix/sockopt.c
new file mode 100644
index 000000000..a0acca82e
--- /dev/null
+++ b/newlib/libc/sys/phoenix/sockopt.c
@@ -0,0 +1,75 @@
+/* Copyright (c) 2016 Phoenix Systems
+ 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 "syscall.h"
+
+#include <errno.h>
+#include <sys/ioctl.h>
+#include <sys/socket.h>
+
+int getsockname(int sockfd, struct sockaddr *addr, socklen_t *addrlen)
+{
+ int ret = syscall3(int, SYS_GETSOCKNAME, sockfd, addr, addrlen);
+ if (ret < 0) {
+ errno = -ret;
+ return -1;
+ }
+
+ return ret;
+}
+
+int getsockopt(int sockfd, int level, int optname, void *optval, socklen_t *optlen)
+{
+ struct setsockopt_args args;
+ args.level = level;
+ args.optname = optname;
+ args.optval = optval;
+ args.optlen = *optlen;
+
+ int ret = ioctl(sockfd, IOC_GETSOCKOPT, &args);
+ if (ret < 0) {
+ errno = -ret;
+ return -1;
+ }
+
+ *optlen = args.optlen;
+ return ret;
+}
+
+int setsockopt(int sockfd, int level, int optname, const void *optval, socklen_t optlen)
+{
+ struct setsockopt_args args;
+ args.level = level;
+ args.optname = optname;
+ args.optval = (void *) optval;
+ args.optlen = optlen;
+
+ int ret = ioctl(sockfd, IOC_SETSOCKOPT, &args);
+ if (ret < 0) {
+ errno = -ret;
+ return -1;
+ }
+
+ return ret;
+}
diff --git a/newlib/libc/sys/phoenix/stat.c b/newlib/libc/sys/phoenix/stat.c
new file mode 100644
index 000000000..aec03679a
--- /dev/null
+++ b/newlib/libc/sys/phoenix/stat.c
@@ -0,0 +1,66 @@
+/* Copyright (c) 2016 Phoenix Systems
+ 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 "syscall.h"
+
+#include <errno.h>
+#include <sys/stat.h>
+
+int stat(const char *pathname, struct stat *buf)
+{
+ int ret = syscall2(int, SYS_STAT, pathname, buf);
+ if (ret < 0) {
+ errno = -ret;
+ return -1;
+ }
+
+ return ret;
+}
+
+int fstat(int fd, struct stat *buf)
+{
+ int ret = syscall2(int, SYS_FSTAT, fd, buf);
+ if (ret < 0) {
+ errno = -ret;
+ return -1;
+ }
+
+ return ret;
+}
+
+int lstat(const char *pathname, struct stat *buf)
+{
+ int ret = syscall2(int, SYS_LSTAT, pathname, buf);
+ if (ret < 0) {
+ errno = -ret;
+ return -1;
+ }
+
+ return ret;
+}
+
+mode_t umask(mode_t mask)
+{
+ return syscall1(int, SYS_UMASK, mask);
+}
diff --git a/newlib/libc/sys/phoenix/statfs.c b/newlib/libc/sys/phoenix/statfs.c
new file mode 100644
index 000000000..3b9202a86
--- /dev/null
+++ b/newlib/libc/sys/phoenix/statfs.c
@@ -0,0 +1,39 @@
+/* Copyright (c) 2016 Phoenix Systems
+ 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 "syscall.h"
+
+#include <errno.h>
+#include <sys/vfs.h>
+
+int statfs(const char *path, struct statfs *buf)
+{
+ int ret = syscall2(int, SYS_STATFS, path, buf);
+ if (ret < 0) {
+ errno = -ret;
+ return -1;
+ }
+
+ return ret;
+}
diff --git a/newlib/libc/sys/phoenix/symlink.c b/newlib/libc/sys/phoenix/symlink.c
new file mode 100644
index 000000000..90fade090
--- /dev/null
+++ b/newlib/libc/sys/phoenix/symlink.c
@@ -0,0 +1,60 @@
+/* Copyright (c) 2016 Phoenix Systems
+ 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 "syscall.h"
+
+#include <errno.h>
+
+int symlink(const char *target, const char *linkpath)
+{
+ int ret = syscall2(int, SYS_SYMLINK, target, linkpath);
+ if (ret < 0) {
+ errno = -ret;
+ ret = -1;
+ }
+
+ return ret;
+}
+
+int readlink(const char *pathname, char *buf, size_t bufsize)
+{
+ int ret = syscall3(int, SYS_READLINK, pathname, buf, bufsize);
+ if (ret < 0) {
+ errno = -ret;
+ return -1;
+ }
+
+ return ret;
+}
+
+int link(const char *oldpath, const char *newpath)
+{
+ int ret = syscall2(int, SYS_LINK, oldpath, newpath);
+ if (ret < 0) {
+ errno = -ret;
+ return -1;
+ }
+
+ return ret;
+}
diff --git a/newlib/libc/sys/phoenix/sync.c b/newlib/libc/sys/phoenix/sync.c
new file mode 100644
index 000000000..de478c91d
--- /dev/null
+++ b/newlib/libc/sys/phoenix/sync.c
@@ -0,0 +1,45 @@
+/* Copyright (c) 2016 Phoenix Systems
+ 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 "syscall.h"
+
+#include <errno.h>
+
+void sync()
+{
+ int ret = syscall0(int, SYS_SYNC);
+ if (ret < 0)
+ errno = -ret;
+}
+
+int fsync(int fd)
+{
+ int ret = syscall1(int, SYS_FSYNC, fd);
+ if (ret < 0) {
+ errno = -ret;
+ return -1;
+ }
+
+ return ret;
+}
diff --git a/newlib/libc/sys/phoenix/sys/_default_fcntl.h b/newlib/libc/sys/phoenix/sys/_default_fcntl.h
new file mode 100644
index 000000000..49b73ddf2
--- /dev/null
+++ b/newlib/libc/sys/phoenix/sys/_default_fcntl.h
@@ -0,0 +1,38 @@
+/* Copyright (c) 2016 Phoenix Systems
+ 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.*/
+
+#ifndef _SYS__DEFAULT_FCNTL_H
+#define _SYS__DEFAULT_FCNTL_H
+
+#include <_ansi.h>
+#include <phoenix/_default_fcntl.h>
+#include <sys/types.h>
+
+int open(const char *pathname, int flags, ...);
+int _open(const char *pathname, int flags, ...);
+int creat(const char *pathname, mode_t mode);
+int fcntl(int fd, int cmd, ...);
+int flock(int fd, int operation);
+
+#endif
diff --git a/newlib/libc/sys/phoenix/sys/_null.h b/newlib/libc/sys/phoenix/sys/_null.h
new file mode 100644
index 000000000..f63ecd0e5
--- /dev/null
+++ b/newlib/libc/sys/phoenix/sys/_null.h
@@ -0,0 +1,41 @@
+/* Copyright (c) 2016 Phoenix Systems
+ 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.*/
+
+#ifndef NULL
+
+#if !defined(__cplusplus)
+#define NULL ((void *) 0)
+#else
+#if defined(__GNUG__) && defined(__GNUC__) && __GNUC__ >= 4
+#define NULL __null
+#else
+#if defined(__LP64__)
+#define NULL (0L)
+#else
+#define NULL 0
+#endif
+#endif
+#endif
+
+#endif
diff --git a/newlib/libc/sys/phoenix/sys/_timespec.h b/newlib/libc/sys/phoenix/sys/_timespec.h
new file mode 100644
index 000000000..8ee632c21
--- /dev/null
+++ b/newlib/libc/sys/phoenix/sys/_timespec.h
@@ -0,0 +1,30 @@
+/* Copyright (c) 2016 Phoenix Systems
+ 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.*/
+
+#ifndef _SYS__TIMESPEC_H
+#define _SYS__TIMESPEC_H
+
+#include <phoenix/time.h>
+
+#endif
diff --git a/newlib/libc/sys/phoenix/sys/_timeval.h b/newlib/libc/sys/phoenix/sys/_timeval.h
new file mode 100644
index 000000000..8a18d8876
--- /dev/null
+++ b/newlib/libc/sys/phoenix/sys/_timeval.h
@@ -0,0 +1,30 @@
+/* Copyright (c) 2016 Phoenix Systems
+ 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.*/
+
+#ifndef _SYS__TIMEVAL_H
+#define _SYS__TIMEVAL_H
+
+#include <phoenix/time.h>
+
+#endif
diff --git a/newlib/libc/sys/phoenix/sys/_types.h b/newlib/libc/sys/phoenix/sys/_types.h
new file mode 100644
index 000000000..39a3c5288
--- /dev/null
+++ b/newlib/libc/sys/phoenix/sys/_types.h
@@ -0,0 +1,72 @@
+/* Copyright (c) 2016 Phoenix Systems
+ 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.*/
+
+#ifndef _SYS__TYPES_H
+#define _SYS__TYPES_H
+
+#include <machine/_types.h>
+
+#if defined(__INT_MAX__) && __INT_MAX__ == 2147483647
+typedef int _ssize_t;
+#else
+typedef long _ssize_t;
+#endif
+
+typedef long _off_t;
+typedef long _fpos_t;
+
+typedef long int __off_t;
+typedef long int __loff_t;
+typedef long __suseconds_t;
+#define _CLOCK_T_ unsigned long
+
+#define __need_wint_t
+#include <stddef.h>
+
+/* Conversion state information. */
+typedef struct {
+ int __count;
+ union {
+ wint_t __wch;
+ unsigned char __wchb[4];
+ } __value;
+} _mbstate_t;
+
+struct __flock_mutex_t_tmp;
+typedef struct {
+ int __a;
+ int __b;
+ struct {
+ long int __c1;
+ int __c2;
+ } __c;
+ int __d;
+ struct __flock_mutex_t_tmp *__e;
+} __flock_mutex_t;
+
+typedef struct {
+ __flock_mutex_t mutex;
+} _flock_t;
+
+#endif
diff --git a/newlib/libc/sys/phoenix/sys/dirent.h b/newlib/libc/sys/phoenix/sys/dirent.h
new file mode 100644
index 000000000..f8c72de02
--- /dev/null
+++ b/newlib/libc/sys/phoenix/sys/dirent.h
@@ -0,0 +1,74 @@
+/* Copyright (c) 2016 Phoenix Systems
+ 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.*/
+
+#ifndef _SYS_DIRENT_H
+#define _SYS_DIRENT_H
+
+#include <phoenix/fs.h>
+#include <sys/lock.h>
+#include <sys/types.h>
+
+#define PATH_MAX_SIZE 1024
+
+#define HAVE_DD_LOCK
+
+typedef struct {
+ int dd_fd; /* Directory file. */
+ int dd_loc; /* Position in buffer. */
+ int dd_seek;
+ char *dd_buf; /* Pointer to buffer. */
+ int dd_len; /* Buffer size. */
+ int dd_size; /* Data size in buffer. */
+ _LOCK_RECURSIVE_T dd_lock;
+} DIR;
+
+#define __dirfd(dir) (dir)->dd_fd
+
+DIR *opendir(const char *name);
+struct dirent *readdir(DIR *dirp);
+void rewinddir(DIR *dirp);
+int closedir(DIR *dirp);
+
+long telldir(DIR *dirp);
+void seekdir(DIR *dirp, off_t loc);
+int scandir(const char *__dir,
+ struct dirent ***__namelist,
+ int (*select) (const struct dirent *),
+ int (*compar) (const struct dirent **, const struct dirent **));
+int alphasort(const struct dirent **__a, const struct dirent **__b);
+
+#define _seekdir seekdir
+
+/* Declare which dirent fields are available in Phoenix-RTOS. */
+#undef _DIRENT_HAVE_D_NAMLEN
+#define _DIRENT_HAVE_D_OFF
+#define _DIRENT_HAVE_D_RECLEN
+
+#define d_fileno d_ino /* Backwards compatibility. */
+
+#ifdef __USE_LARGEFILE64
+#define dirent64 dirent
+#endif
+
+#endif
diff --git a/newlib/libc/sys/phoenix/sys/errno.h b/newlib/libc/sys/phoenix/sys/errno.h
new file mode 100644
index 000000000..e3ec2a40e
--- /dev/null
+++ b/newlib/libc/sys/phoenix/sys/errno.h
@@ -0,0 +1,42 @@
+/* Copyright (c) 2016 Phoenix Systems
+ 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.*/
+
+#ifndef _SYS_ERRNO_H
+#define _SYS_ERRNO_H
+
+#include <phoenix/errno.h>
+#include <sys/reent.h>
+
+#ifndef _REENT_ONLY
+#define errno (*__errno())
+extern int *__errno _PARAMS ((void));
+#endif
+
+/* Don't use these variables directly. Use strerror instead. */
+extern __IMPORT _CONST char * _CONST _sys_errlist[];
+extern __IMPORT int _sys_nerr;
+
+#define __errno_r(ptr) ((ptr)->_errno)
+
+#endif
diff --git a/newlib/libc/sys/phoenix/sys/ioctl.h b/newlib/libc/sys/phoenix/sys/ioctl.h
new file mode 100644
index 000000000..ab246a5e4
--- /dev/null
+++ b/newlib/libc/sys/phoenix/sys/ioctl.h
@@ -0,0 +1,32 @@
+/* Copyright (c) 2016 Phoenix Systems
+ 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.*/
+
+#ifndef _SYS_IOCTL_H
+#define _SYS_IOCTL_H
+
+#include <phoenix/ioctl/pty.h>
+
+int ioctl(int d, int request, ...);
+
+#endif
diff --git a/newlib/libc/sys/phoenix/sys/ipc.h b/newlib/libc/sys/phoenix/sys/ipc.h
new file mode 100644
index 000000000..c2f0da426
--- /dev/null
+++ b/newlib/libc/sys/phoenix/sys/ipc.h
@@ -0,0 +1,30 @@
+/* Copyright (c) 2016 Phoenix Systems
+ 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.*/
+
+#ifndef _SYS_IPC_H
+#define _SYS_IPC_H
+
+#include <phoenix/ipc.h>
+
+#endif
diff --git a/newlib/libc/sys/phoenix/sys/mman.h b/newlib/libc/sys/phoenix/sys/mman.h
new file mode 100644
index 000000000..c5f95395e
--- /dev/null
+++ b/newlib/libc/sys/phoenix/sys/mman.h
@@ -0,0 +1,38 @@
+/* Copyright (c) 2016 Phoenix Systems
+ 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.*/
+
+#ifndef _SYS_MMAN_H
+#define _SYS_MMAN_H
+
+#include <phoenix/shm.h>
+#include <phoenix/mmap.h>
+#include <sys/types.h>
+
+void *mmap(void *addr, size_t length, int prot, int flags, int fd, off_t offset);
+int munmap(void *addr, size_t length);
+
+int shm_open(const char *name, int oflag, mode_t mode);
+int shm_unlink(const char *name);
+
+#endif
diff --git a/newlib/libc/sys/phoenix/sys/mount.h b/newlib/libc/sys/phoenix/sys/mount.h
new file mode 100644
index 000000000..f661eeb9f
--- /dev/null
+++ b/newlib/libc/sys/phoenix/sys/mount.h
@@ -0,0 +1,42 @@
+/* Copyright (c) 2016 Phoenix Systems
+ 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.*/
+
+#ifndef _SYS_MOUNT_H
+#define _SYS_MOUNT_H
+
+#define MS_NOSUID 0x0001
+#define MS_NODEV 0x0002
+#define MS_NOEXEC 0x0004
+#define MS_SYNCHRONOUS 0x0008
+#define MS_NOATIME 0x0010
+#define MS_NODIRATIME 0x0020
+#define MS_MANDLOCK 0x0040
+#define MS_RDONLY 0x0080
+#define MS_REMOUNT 0x0100
+
+int mount(const char *source, const char *target, const char *filesystemtype, unsigned long mountflags, const void *data);
+int umount(const char *target);
+int umount2(const char *target, int flags);
+
+#endif
diff --git a/newlib/libc/sys/phoenix/sys/network.h b/newlib/libc/sys/phoenix/sys/network.h
new file mode 100644
index 000000000..6aaf29904
--- /dev/null
+++ b/newlib/libc/sys/phoenix/sys/network.h
@@ -0,0 +1,31 @@
+/* Copyright (c) 2016 Phoenix Systems
+ 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.*/
+
+#ifndef _SYS_NETWORK_H
+#define _SYS_NETWORK_H
+
+int network_setUp(const char *interface);
+int network_setDown(const char *interface);
+
+#endif
diff --git a/newlib/libc/sys/phoenix/sys/param.h b/newlib/libc/sys/phoenix/sys/param.h
new file mode 100644
index 000000000..c00600954
--- /dev/null
+++ b/newlib/libc/sys/phoenix/sys/param.h
@@ -0,0 +1,50 @@
+/* Copyright (c) 2016 Phoenix Systems
+ 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.*/
+
+#ifndef _SYS_PARAM_H
+#define _SYS_PARAM_H
+
+#include <machine/endian.h>
+#include <machine/param.h>
+#include <sys/config.h>
+
+#ifndef HZ
+#define HZ (60)
+#endif
+
+#ifndef NOFILE
+#define NOFILE (60)
+#endif
+
+#ifndef PATHSIZE
+#define PATHSIZE (1024)
+#endif
+
+#define MAXPATHLEN PATHSIZE
+#define MAXSYMLINKS 20
+
+#define MAX(a,b) ((a) > (b) ? (a) : (b))
+#define MIN(a,b) ((a) < (b) ? (a) : (b))
+
+#endif
diff --git a/newlib/libc/sys/phoenix/sys/poll.h b/newlib/libc/sys/phoenix/sys/poll.h
new file mode 100644
index 000000000..b994ad081
--- /dev/null
+++ b/newlib/libc/sys/phoenix/sys/poll.h
@@ -0,0 +1,32 @@
+/* Copyright (c) 2016 Phoenix Systems
+ 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.*/
+
+#ifndef _SYS_POLL_H
+#define _SYS_POLL_H
+
+#include <phoenix/poll.h>
+
+int poll(struct pollfd *fds, nfds_t nfds, int timeout);
+
+#endif
diff --git a/newlib/libc/sys/phoenix/sys/reboot.h b/newlib/libc/sys/phoenix/sys/reboot.h
new file mode 100644
index 000000000..417ed0f58
--- /dev/null
+++ b/newlib/libc/sys/phoenix/sys/reboot.h
@@ -0,0 +1,32 @@
+/* Copyright (c) 2016 Phoenix Systems
+ 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.*/
+
+#ifndef _SYS_REBOOT_H
+#define _SYS_REBOOT_H
+
+#include <phoenix/reboot.h>
+
+int reboot(int how);
+
+#endif
diff --git a/newlib/libc/sys/phoenix/sys/resource.h b/newlib/libc/sys/phoenix/sys/resource.h
new file mode 100644
index 000000000..a1ca33dbb
--- /dev/null
+++ b/newlib/libc/sys/phoenix/sys/resource.h
@@ -0,0 +1,121 @@
+/* Copyright (c) 2016 Phoenix Systems
+ 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.*/
+
+#ifndef _SYS_RESOURCE_H
+#define _SYS_RESOURCE_H
+
+#include <sys/time.h>
+#include <sys/types.h>
+
+#define RUSAGE_SELF 0
+#define RUSAGE_CHILDREN (-1)
+#define RUSAGE_BOTH (-2) /* sys_wait4() uses this */
+#define RUSAGE_THREAD 1 /* Only the calling thread */
+
+struct rusage {
+ struct timeval ru_utime; /* User time used */
+ struct timeval ru_stime; /* System time used */
+ long ru_maxrss; /* Maximum resident set size */
+ long ru_ixrss; /* Integral shared memory size */
+ long ru_idrss; /* Integral unshared data size */
+ long ru_isrss; /* Integral unshared stack size */
+ long ru_minflt; /* Page reclaims */
+ long ru_majflt; /* Page faults */
+ long ru_nswap; /* Swaps */
+ long ru_inblock; /* Block input operations */
+ long ru_oublock; /* Block output operations */
+ long ru_msgsnd; /* Messages sent */
+ long ru_msgrcv; /* Messages received */
+ long ru_nsignals; /* Signals received */
+ long ru_nvcsw; /* Voluntary context switches */
+ long ru_nivcsw; /* Involuntary */
+};
+
+typedef unsigned long rlim_t;
+
+struct rlimit {
+ rlim_t rlim_cur;
+ rlim_t rlim_max;
+};
+
+#define RLIM64_INFINITY (~0ULL)
+
+struct rlimit64 {
+ uint64_t rlim_cur;
+ uint64_t rlim_max;
+};
+
+#define PRIO_MIN (-20)
+#define PRIO_MAX 20
+#define PRIO_PROCESS 0
+#define PRIO_PGRP 1
+#define PRIO_USER 2
+
+/*
+ * Limit the stack by to some sane default: root can always
+ * increase this limit if needed. 8MB seems reasonable.
+ */
+#define _STK_LIM (8 * 1024 * 1024)
+
+/*
+ * GPG2 wants 64kB of mlocked memory, to make sure pass phrases
+ * and other sensitive information are never written to disk.
+ */
+#define MLOCK_LIMIT ((PAGE_SIZE > 64 * 1024) ? PAGE_SIZE : 64 * 1024)
+
+#define RLIMIT_CPU 0 /* CPU time in sec */
+#define RLIMIT_FSIZE 1 /* Maximum filesize */
+#define RLIMIT_DATA 2 /* Max data size */
+#define RLIMIT_STACK 3 /* Max stack size */
+#define RLIMIT_CORE 4 /* Max core file size */
+#define RLIMIT_RSS 5 /* Max resident set size */
+#define RLIMIT_NPROC 6 /* Max number of processes */
+#define RLIMIT_NOFILE 7 /* Max number of open files */
+#define RLIMIT_OFILE RLIMIT_NOFILE
+#define RLIMIT_MEMLOCK 8 /* Max locked-in-memory address space */
+#define RLIMIT_AS 9 /* Address space limit */
+#define RLIMIT_LOCKS 10 /* Maximum file locks held */
+#define RLIMIT_SIGPENDING 11 /* Max number of pending signals */
+#define RLIMIT_MSGQUEUE 12 /* Maximum bytes in POSIX mqueues */
+#define RLIMIT_NICE 13 /* Max nice prio allowed to raise to 0-39 for nice level 19 .. -20 */
+#define RLIMIT_RTPRIO 14 /* Maximum realtime priority */
+#define RLIMIT_RTTIME 15 /* Timeout for RT tasks in us */
+#define RLIM_NLIMITS 16
+
+#ifndef RLIM_INFINITY
+#define RLIM_INFINITY (~0UL)
+#endif
+
+/* RLIMIT_STACK default maximum - some architectures override it. */
+#ifndef _STK_LIM_MAX
+#define _STK_LIM_MAX RLIM_INFINITY
+#endif
+
+int getpriority(int which, id_t who);
+int setpriority(int which, id_t who, int prio);
+int getrlimit(int resource, struct rlimit *rlim);
+int setrlimit(int resource, const struct rlimit *rlim);
+int getrusage(int who, struct rusage *usage);
+
+#endif
diff --git a/newlib/libc/sys/phoenix/sys/sched.h b/newlib/libc/sys/phoenix/sys/sched.h
new file mode 100644
index 000000000..93b19462b
--- /dev/null
+++ b/newlib/libc/sys/phoenix/sys/sched.h
@@ -0,0 +1,38 @@
+/* Copyright (c) 2016 Phoenix Systems
+ 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.*/
+
+#ifndef _SYS_SCHED_H
+#define _SYS_SCHED_H
+
+#include <bits/posix_opt.h>
+
+#define SCHED_OTHER 0
+#define SCHED_FIFO 1
+#define SCHED_RR 2
+
+struct sched_param {
+ int sched_priority; /* Process execution scheduling priority */
+};
+
+#endif
diff --git a/newlib/libc/sys/phoenix/sys/select.h b/newlib/libc/sys/phoenix/sys/select.h
new file mode 100644
index 000000000..fc9d7c7f0
--- /dev/null
+++ b/newlib/libc/sys/phoenix/sys/select.h
@@ -0,0 +1,36 @@
+/* Copyright (c) 2016 Phoenix Systems
+ 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.*/
+
+#ifndef _SYS_SELECT_H
+#define _SYS_SELECT_H
+
+#include <phoenix/time.h>
+#include <sys/cdefs.h>
+#include <sys/signal.h>
+#include <sys/types.h>
+
+int select(int nfds, fd_set *readfds, fd_set *writefds, fd_set *exceptfds, struct timeval *timeout);
+int pselect(int nfds, fd_set *readfds, fd_set *writefds, fd_set *exceptfds, const struct timespec *timeout, const sigset_t *sigmask);
+
+#endif
diff --git a/newlib/libc/sys/phoenix/sys/shm.h b/newlib/libc/sys/phoenix/sys/shm.h
new file mode 100644
index 000000000..d9332ef12
--- /dev/null
+++ b/newlib/libc/sys/phoenix/sys/shm.h
@@ -0,0 +1,30 @@
+/* Copyright (c) 2016 Phoenix Systems
+ 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.*/
+
+#ifndef _SYS_SHM_H
+#define _SYS_SHM_H
+
+#include <phoenix/shm.h>
+
+#endif
diff --git a/newlib/libc/sys/phoenix/sys/signal.h b/newlib/libc/sys/phoenix/sys/signal.h
new file mode 100644
index 000000000..a5e07e13e
--- /dev/null
+++ b/newlib/libc/sys/phoenix/sys/signal.h
@@ -0,0 +1,102 @@
+/* Copyright (c) 2016 Phoenix Systems
+ 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.*/
+
+#ifndef _SYS_SIGNAL_H
+#define _SYS_SIGNAL_H
+
+#include <phoenix/signal.h>
+#include <sys/types.h>
+
+typedef void (*_sig_func_ptr)(int);
+typedef _sig_func_ptr __sighandler_t;
+typedef _sig_func_ptr sighandler_t;
+typedef unsigned long sigset_t;
+
+#define SIGEV_NONE 1 /* No asynchronous notification shall be delivered when the event of interest occurs. */
+#define SIGEV_SIGNAL 2 /* A queued signal, with an application defined value, shall be delivered when the event of interest occurs. */
+#define SIGEV_THREAD 3 /* A notification function shall be called to perform notification. */
+
+union sigval {
+ int sival_int; /* Integer signal value */
+ void *sival_ptr; /* Pointer signal value */
+};
+
+struct sigevent {
+ int sigev_notify; /* Notification type */
+ int sigev_signo; /* Signal number */
+ union sigval sigev_value; /* Signal value */
+#if defined(_POSIX_THREADS)
+ void (*sigev_notify_function)(union sigval); /* Notification function */
+ pthread_attr_t *sigev_notify_attributes; /* Notification Attributes */
+#endif
+};
+
+#define SI_USER 1 /* Sent by a user. kill(), abort(), etc */
+#define SI_QUEUE 2 /* Sent by sigqueue() */
+#define SI_TIMER 3 /* Sent by expiration of a timer_settime() timer */
+#define SI_ASYNCIO 4 /* Indicates completion of asycnhronous IO */
+#define SI_MESGQ 5 /* Indicates arrival of a message at an empty queue */
+
+typedef struct {
+ int si_signo; /* Signal number */
+ int si_code; /* Cause of the signal */
+ union sigval si_value; /* Signal value */
+} siginfo_t;
+
+#define SA_NOCLDSTOP 1 /* Do not generate SIGCHLD when children stop */
+#define SA_SIGINFO 2 /* Invoke the signal catching function with three arguments instead of one. */
+#define SA_RESTART 4
+
+struct sigaction {
+ int sa_flags; /* Special flags to affect behavior of signal */
+ sigset_t sa_mask; /* Additional set of signals to be blocked during execution of signal-catching function. */
+ union {
+ _sig_func_ptr _handler; /* SIG_DFL, SIG_IGN, or pointer to a function */
+ void (*_sigaction)(int, siginfo_t *, void *);
+ } _signal_handlers;
+};
+
+#define sa_handler _signal_handlers._handler
+#define sa_sigaction _signal_handlers._sigaction
+
+#define SIG_SETMASK 0 /* Set mask with sigprocmask() */
+#define SIG_BLOCK 1 /* Set of signals to block */
+#define SIG_UNBLOCK 2 /* Set of signals to, well, unblock */
+
+int kill(pid_t pid, int sig);
+int sigaction(int signum, const struct sigaction *act, struct sigaction *oldact);
+int sigaddset(sigset_t *set, int signum);
+int sigdelset(sigset_t *set, int signum);
+int sigismember(const sigset_t *set, int signum);
+int sigfillset(sigset_t *set);
+int sigemptyset(sigset_t *set);
+int sigpending(sigset_t *set);
+int sigsuspend(const sigset_t *mask);
+int sigpause(int sigmask);
+int sigprocmask(int how, const sigset_t *set, sigset_t *oldset);
+int sigblock(int mask);
+int sigmask(int signum);
+int sigsetmask(int mask);
+
+#endif
diff --git a/newlib/libc/sys/phoenix/sys/socket.h b/newlib/libc/sys/phoenix/sys/socket.h
new file mode 100644
index 000000000..670dfa150
--- /dev/null
+++ b/newlib/libc/sys/phoenix/sys/socket.h
@@ -0,0 +1,63 @@
+/* Copyright (c) 2016 Phoenix Systems
+ 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.*/
+
+#ifndef _SYS_SOCKET_H
+#define _SYS_SOCKET_H
+
+#include <phoenix/socket.h>
+#include <sys/types.h>
+
+#define _SS_MAXSIZE 128U
+#define _SS_ALIGNSIZE (sizeof(int64_t))
+#define _SS_PAD1SIZE (_SS_ALIGNSIZE - sizeof(unsigned char) - sizeof(sa_family_t))
+#define _SS_PAD2SIZE (_SS_MAXSIZE - sizeof(unsigned char) - sizeof(sa_family_t) - _SS_PAD1SIZE - _SS_ALIGNSIZE)
+
+struct sockaddr_storage {
+ unsigned char ss_len; /* Aaddress length */
+ sa_family_t ss_family; /* Address family */
+ char __ss_pad1[_SS_PAD1SIZE];
+ int64_t __ss_align; /* Force desired structure storage alignment */
+ char __ss_pad2[_SS_PAD2SIZE];
+};
+
+int socket(int domain, int type, int protocol);
+int bind(int sockfd, const struct sockaddr *addr, socklen_t addrlen);
+int listen(int sockfd, int backlog);
+int accept(int sockfd, struct sockaddr *addr, socklen_t *addrlen);
+int connect(int sockfd, const struct sockaddr *addr, socklen_t addrlen);
+int sendto(int sockfd, const void *buf, size_t len, int flags, const struct sockaddr *dest_addr, socklen_t addrlen);
+int send(int sockfd, const void *buf, size_t len, int flags);
+int recvfrom(int sockfd, void *buf, size_t len, int flags, struct sockaddr *src_addr, socklen_t *addrlen);
+int recv(int sockfd, void *buf, size_t len, int flags);
+
+int getsockname(int sockfd, struct sockaddr *addr, socklen_t *addrlen);
+int getsockopt(int sockfd, int level, int optname, void *optval, socklen_t *optlen);
+int setsockopt(int sockfd, int level, int optname, const void *optval, socklen_t optlen);
+
+int shutdown(int, int);
+int socketpair(int, int, int, int *);
+
+int getpeername(int sockfd, struct sockaddr *addr, socklen_t *addrlen);
+
+#endif
diff --git a/newlib/libc/sys/phoenix/sys/stat.h b/newlib/libc/sys/phoenix/sys/stat.h
new file mode 100644
index 000000000..c65b35af9
--- /dev/null
+++ b/newlib/libc/sys/phoenix/sys/stat.h
@@ -0,0 +1,70 @@
+/* Copyright (c) 2016 Phoenix Systems
+ 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.*/
+
+#ifndef _SYS_STAT_H
+#define _SYS_STAT_H
+
+#include <phoenix/stat.h>
+#include <sys/types.h>
+
+#define _IFMT 0170000
+#define _IFDIR 0040000
+#define _IFCHR 0020000
+#define _IFBLK 0060000
+#define _IFREG 0100000
+#define _IFLNK 0120000
+#define _IFSOCK 0140000
+#define _IFIFO 0010000
+
+#define S_BLKSIZE 1024
+
+#define S_IREAD 0000400 /* Read permission, owner. */
+#define S_IWRITE 0000200 /* Write permission, owner. */
+#define S_IEXEC 0000100 /* Execute/search permission, owner. */
+#define S_ENFMT 0002000 /* Enforcement-mode locking. */
+
+#define ACCESSPERMS (S_IRWXU | S_IRWXG | S_IRWXO) /* 0777 */
+#define ALLPERMS (S_ISUID | S_ISGID | S_ISVTX | S_IRWXU | S_IRWXG | S_IRWXO) /* 07777 */
+#define DEFFILEMODE (S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH | S_IWOTH) /* 0666 */
+
+#define S_TYPEISMQ(buf) ((buf)->st_mode - (buf)->st_mode)
+#define S_TYPEISSEM(buf) ((buf)->st_mode - (buf)->st_mode)
+#define S_TYPEISSHM(buf) ((buf)->st_mode - (buf)->st_mode)
+
+int chmod(const char *pathname, mode_t mode);
+int fchmod(int fd, mode_t mode);
+int stat(const char *pathname, struct stat *buf);
+int fstat(int fd, struct stat *buf);
+int lstat(const char *pathname, struct stat *buf);
+int mkdir(const char *pathname, mode_t mode);
+int mkfifo(const char *pathname, mode_t mode);
+int mknod(const char *pathname, mode_t mode, dev_t dev);
+mode_t umask(mode_t mask);
+
+#ifdef __LARGE64_FILES
+struct stat64;
+int fstat64(int fd, struct stat64 *buf);
+#endif
+
+#endif
diff --git a/newlib/libc/sys/phoenix/sys/statfs.h b/newlib/libc/sys/phoenix/sys/statfs.h
new file mode 100644
index 000000000..2fa0613fb
--- /dev/null
+++ b/newlib/libc/sys/phoenix/sys/statfs.h
@@ -0,0 +1,30 @@
+/* Copyright (c) 2016 Phoenix Systems
+ 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.*/
+
+#ifndef _SYS_STATFS_H
+#define _SYS_STATFS_H
+
+#include <sys/vfs.h>
+
+#endif
diff --git a/newlib/libc/sys/phoenix/sys/stdio.h b/newlib/libc/sys/phoenix/sys/stdio.h
new file mode 100644
index 000000000..42da0d259
--- /dev/null
+++ b/newlib/libc/sys/phoenix/sys/stdio.h
@@ -0,0 +1,40 @@
+/* Copyright (c) 2016 Phoenix Systems
+ 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.*/
+
+#ifndef _SYS_STDIO_H
+#define _SYS_STDIO_H
+
+#if !defined(__SINGLE_THREAD__)
+#if !defined(_flockfile)
+#define _flockfile(fp) ((void) 0)
+#endif
+#if !defined(_funlockfile)
+#define _funlockfile(fp) ((void) 0)
+#endif
+#endif
+
+#define getline __getline
+#define getdelim __getdelim
+
+#endif
diff --git a/newlib/libc/sys/phoenix/sys/termios.h b/newlib/libc/sys/phoenix/sys/termios.h
new file mode 100644
index 000000000..ae93d770f
--- /dev/null
+++ b/newlib/libc/sys/phoenix/sys/termios.h
@@ -0,0 +1,38 @@
+/* Copyright (c) 2016 Phoenix Systems
+ 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.*/
+
+#ifndef _SYS_TERMIOS_H_
+#define _SYS_TERMIOS_H_
+
+#include <phoenix/termios.h>
+#include <sys/types.h>
+
+int tcgetattr(int fd, struct termios *termios_p);
+int tcsetattr(int fd, int mode, const struct termios *termios_p);
+int tcsendbreak(int fd, int duration);
+int tcflush(int fd, int queue_selector);
+int tcdrain(int fd);
+pid_t tcgetsid(int fd);
+
+#endif
diff --git a/newlib/libc/sys/phoenix/sys/time.h b/newlib/libc/sys/phoenix/sys/time.h
new file mode 100644
index 000000000..da8e8021d
--- /dev/null
+++ b/newlib/libc/sys/phoenix/sys/time.h
@@ -0,0 +1,46 @@
+/* Copyright (c) 2016 Phoenix Systems
+ 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.*/
+
+#ifndef _SYS_TIME_H
+#define _SYS_TIME_H
+
+#include <phoenix/time.h>
+
+struct timezone {
+ int tz_minuteswest; /* Minutes west of Greenwich */
+ int tz_dsttime; /* Type of dst correction */
+};
+
+#define DST_NONE 0 /* Not on dst */
+#define DST_USA 1 /* USA style dst */
+#define DST_AUST 2 /* Australian style dst */
+#define DST_WET 3 /* Western European dst */
+#define DST_MET 4 /* Middle European dst */
+#define DST_EET 5 /* Eastern European dst */
+#define DST_CAN 6 /* Canada */
+
+int gettimeofday(struct timeval *tv, void *tz);
+int settimeofday(const struct timeval *tv, const struct timezone *tz);
+
+#endif
diff --git a/newlib/libc/sys/phoenix/sys/timespec.h b/newlib/libc/sys/phoenix/sys/timespec.h
new file mode 100644
index 000000000..29f2d8915
--- /dev/null
+++ b/newlib/libc/sys/phoenix/sys/timespec.h
@@ -0,0 +1,30 @@
+/* Copyright (c) 2016 Phoenix Systems
+ 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.*/
+
+#ifndef _SYS_TIMESPEC_H
+#define _SYS_TIMESPEC_H
+
+#include <phoenix/time.h>
+
+#endif
diff --git a/newlib/libc/sys/phoenix/sys/timeval.h b/newlib/libc/sys/phoenix/sys/timeval.h
new file mode 100644
index 000000000..48092149c
--- /dev/null
+++ b/newlib/libc/sys/phoenix/sys/timeval.h
@@ -0,0 +1,30 @@
+/* Copyright (c) 2016 Phoenix Systems
+ 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.*/
+
+#ifndef _SYS_TIMEVAL_H
+#define _SYS_TIMEVAL_H
+
+#include <phoenix/time.h>
+
+#endif
diff --git a/newlib/libc/sys/phoenix/sys/types.h b/newlib/libc/sys/phoenix/sys/types.h
new file mode 100644
index 000000000..f491bd8e7
--- /dev/null
+++ b/newlib/libc/sys/phoenix/sys/types.h
@@ -0,0 +1,112 @@
+/* Copyright (c) 2016 Phoenix Systems
+ 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.*/
+
+#ifndef _SYS_TYPES_H
+#define _SYS_TYPES_H
+
+#include <machine/types.h>
+#include <machine/_types.h>
+#include <stdint.h>
+#include <sys/_types.h>
+#include <sys/_null.h>
+
+#include <phoenix/types.h>
+
+typedef __uint32_t __ino_t ;
+typedef __uint64_t __ino64_t;
+typedef __uint64_t __off64_t;
+typedef __uint32_t __key_t;
+typedef __uint32_t __useconds_t;
+typedef __uint32_t __daddr_t;
+typedef __uint32_t __nlink_t;
+typedef __uint8_t __u_char;
+typedef unsigned short __u_short;
+typedef unsigned __u_int;
+typedef unsigned long __u_long;
+
+typedef _CLOCK_T_ clock_t;
+typedef _ssize_t ssize_t;
+typedef __ino_t ino_t;
+typedef __ino64_t ino64_t;
+typedef __off64_t off64_t;
+typedef __off_t off_t;
+typedef __loff_t loff_t;
+typedef __key_t key_t;
+typedef __suseconds_t suseconds_t;
+typedef __useconds_t useconds_t;
+typedef __daddr_t daddr_t;
+typedef char * caddr_t;
+typedef __nlink_t nlink_t;
+typedef pid_t id_t;
+typedef __u_char u_char;
+typedef __u_short u_short;
+typedef __u_int u_int;
+typedef __u_long u_long;
+typedef __uint8_t u_int8_t;
+typedef __uint16_t u_int16_t;
+typedef __uint32_t u_int32_t;
+typedef __uint64_t u_int64_t;
+typedef __uint8_t uint8_t;
+typedef __uint16_t uint16_t;
+typedef __uint32_t uint32_t;
+typedef __uint64_t uint64_t;
+typedef __int8_t int8_t;
+typedef __int16_t int16_t;
+typedef __int32_t int32_t;
+typedef __int64_t int64_t;
+
+typedef __uint32_t __blksize_t;
+typedef __int64_t __blkcnt_t;
+typedef __int64_t sbintime_t;
+typedef __blkcnt_t blkcnt_t;
+
+#define __time_t_defined
+#define __gid_t_defined
+#define __uid_t_defined
+#define __ssize_t_defined
+#define __key_t_defined
+#define __off_t_defined
+#define __off64_t_defined
+
+static inline unsigned int dev_major (unsigned long int dev)
+{
+ return ((dev >> 16) & 0xffff);
+}
+
+static inline unsigned int dev_minor (unsigned long int dev)
+{
+ return (dev & 0xffff);
+}
+
+static inline unsigned long int dev_makedev (unsigned int major, unsigned int minor)
+{
+ return (minor & 0xffff) | ((major & 0xffff) << 16);
+}
+
+/* Access the functions with their traditional names. */
+# define major(dev) dev_major(dev)
+# define minor(dev) dev_minor(dev)
+# define makedev(maj, min) dev_makedev(maj, min)
+
+#endif
diff --git a/newlib/libc/sys/phoenix/sys/uio.h b/newlib/libc/sys/phoenix/sys/uio.h
new file mode 100644
index 000000000..c9f50d5c7
--- /dev/null
+++ b/newlib/libc/sys/phoenix/sys/uio.h
@@ -0,0 +1,40 @@
+/* Copyright (c) 2016 Phoenix Systems
+ 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.*/
+
+#ifndef _SYS_UIO_H
+#define _SYS_UIO_H
+
+#include <sys/types.h>
+
+#define UIO_MAXIOV 1024
+
+struct iovec {
+ void *iov_base;
+ size_t iov_len;
+};
+
+ssize_t readv(int fd, const struct iovec *iov, int iovcnt);
+ssize_t writev(int fd, const struct iovec *iov, int iovcnt);
+
+#endif
diff --git a/newlib/libc/sys/phoenix/sys/un.h b/newlib/libc/sys/phoenix/sys/un.h
new file mode 100644
index 000000000..02816f7b3
--- /dev/null
+++ b/newlib/libc/sys/phoenix/sys/un.h
@@ -0,0 +1,40 @@
+/* Copyright (c) 2016 Phoenix Systems
+ 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.*/
+
+#ifndef _SYS_UN_H
+#define _SYS_UN_H
+
+#include <netinet/in.h>
+#include <sys/socket.h>
+
+/* Structure describing the address of an AF_LOCAL (aka AF_UNIX) socket. */
+struct sockaddr_un {
+ sa_family_t sun_family;
+ char sun_path[108];
+};
+
+/* Evaluate to actual length of the `sockaddr_un' structure. */
+# define SUN_LEN(ptr) ((size_t) (((struct sockaddr_un *) 0)->sun_path) + strlen ((ptr)->sun_path))
+
+#endif
diff --git a/newlib/libc/sys/phoenix/sys/unistd.h b/newlib/libc/sys/phoenix/sys/unistd.h
new file mode 100644
index 000000000..6e171449c
--- /dev/null
+++ b/newlib/libc/sys/phoenix/sys/unistd.h
@@ -0,0 +1,306 @@
+/* Copyright (c) 2016 Phoenix Systems
+ 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.*/
+
+#ifndef _SYS_UNISTD_H
+#define _SYS_UNISTD_H
+
+#include <_ansi.h>
+#include <features.h>
+#include <sys/types.h>
+#define __need_size_t
+#define __need_ptrdiff_t
+#include <stddef.h>
+
+extern char **environ;
+
+void _exit(int status) _ATTRIBUTE ((noreturn));
+
+int access(const char *pathname, int mode);
+unsigned int alarm(unsigned seconds);
+int chdir(const char *path);
+int chmod(const char *pathname, mode_t mode);
+int chown(const char *pathname, uid_t owner, gid_t group);
+int chroot(const char *path);
+int close(int fd);
+int _close(int fd);
+char *ctermid(char *s);
+char *cuserid(char *string);
+int dup(int oldfd);
+int dup2(int olffd, int newfd);
+int execl(const char *path, const char *arg, ...);
+int execle(const char *path, const char *arg, ...);
+int execlp(const char *file, const char *arg, ...);
+int execv(const char *path, char *const argv[]);
+int execve(const char *filename, char *const argv[], char *const envp[]);
+int _execve(const char *filename, char *const argv[], char *const envp[]);
+int execvp(const char *file, char *const argv[]);
+int execvpe(const char *file, char *const argv[], char *const envp[]);
+int fchdir(int fd);
+int fchmod(int fd, mode_t mode);
+int fchown(int fd, uid_t owner, gid_t group);
+pid_t fork();
+long fpathconf(int fd, int name);
+int fsync(int fd);
+int ftruncate(int fd, off_t length);
+char *getcwd(char *buf, size_t size);
+int getdomainname(char *name, size_t len);
+int getentropy(void *buf, size_t buflen);
+gid_t getegid();
+uid_t geteuid();
+gid_t getgid();
+int getgroups(int size, gid_t list[]);
+int gethostname(char *name, size_t len);
+char *getlogin();
+#if defined(_POSIX_THREAD_SAFE_FUNCTIONS)
+int getlogin_r(char *buf, size_t bufsize);
+#endif
+char *getpass(const char *prompt);
+int getpagesize();
+pid_t getpgid(pid_t pid);
+pid_t getpgrp();
+pid_t getpid();
+pid_t getppid();
+uid_t getuid();
+char *getusershell();
+char *getwd(char *buf);
+int isatty(int fd);
+int _isatty(int fd);
+int issetugid();
+int fchown(int fd, uid_t owner, gid_t group);
+int lchown(const char *pathname, uid_t owner, gid_t group);
+int link(const char *oldpath, const char *newpath);
+int nice(int inc);
+off_t lseek(int fd, off_t offset, int whence);
+long pathconf(const char *path, int name);
+int pause();
+int pipe(int pipefd[2]);
+ssize_t pread(int fd, void *buf, size_t count, off_t offset);
+ssize_t pwrite(int fd, const void *buf, size_t count, off_t offset);
+ssize_t read(int fd, void *buf, size_t count);
+ssize_t readlink(const char *pathname, char *buf, size_t bufsiz);
+int rmdir(const char *pathname);
+void *sbrk(intptr_t increment);
+int setegid(gid_t egid);
+int seteuid(uid_t euid);
+int setgid(gid_t gid);
+int sethostname(const char *name, size_t len);
+int setpgid(pid_t pid, pid_t pgid);
+int setpgrp(void);
+pid_t setsid(void);
+int setuid(uid_t uid);
+unsigned int sleep(unsigned int seconds);
+void swab(const void *from, void *to, ssize_t n);
+int symlink(const char *target, const char *linkpath);
+long sysconf(int name);
+pid_t tcgetpgrp(int fd);
+int tcsetpgrp(int fd, pid_t pgrp);
+int truncate(const char *path, off_t );
+char *ttyname(int fd);
+int ttyname_r(int fd, char *buf, size_t buflen);
+int unlink(const char *pathname);
+int usleep(useconds_t usec);
+int vhangup();
+ssize_t write(int fd, const void *buf, size_t count);
+
+extern char *optarg; /* getopt(3) external variables */
+extern int optind, opterr, optopt;
+int getopt(int argc, char * const argv[], const char *optstring);
+extern int optreset; /* getopt(3) external variable */
+
+pid_t vfork();
+
+extern char *suboptarg; /* getsubopt(3) external variable */
+int getsubopt(char **optionp, char * const *tokens, char **valuep);
+
+#define F_OK 0
+#define R_OK 4
+#define W_OK 2
+#define X_OK 1
+
+#define SEEK_SET 0
+#define SEEK_CUR 1
+#define SEEK_END 2
+
+#include <sys/features.h>
+
+#define STDIN_FILENO 0 /* Standard input file descriptor */
+#define STDOUT_FILENO 1 /* Standard output file descriptor */
+#define STDERR_FILENO 2 /* Standard error file descriptor */
+
+/* sysconf values per IEEE Std 1003.1, 2008 Edition */
+#define _SC_ARG_MAX 0
+#define _SC_CHILD_MAX 1
+#define _SC_CLK_TCK 2
+#define _SC_NGROUPS_MAX 3
+#define _SC_OPEN_MAX 4
+#define _SC_JOB_CONTROL 5
+#define _SC_SAVED_IDS 6
+#define _SC_VERSION 7
+#define _SC_PAGESIZE 8
+#define _SC_PAGE_SIZE _SC_PAGESIZE
+/* These are non-POSIX values we accidentally introduced in 2000 without
+ guarding them. Keeping them unguarded for backward compatibility. */
+#define _SC_NPROCESSORS_CONF 9
+#define _SC_NPROCESSORS_ONLN 10
+#define _SC_PHYS_PAGES 11
+#define _SC_AVPHYS_PAGES 12
+/* End of non-POSIX values. */
+#define _SC_MQ_OPEN_MAX 13
+#define _SC_MQ_PRIO_MAX 14
+#define _SC_RTSIG_MAX 15
+#define _SC_SEM_NSEMS_MAX 16
+#define _SC_SEM_VALUE_MAX 17
+#define _SC_SIGQUEUE_MAX 18
+#define _SC_TIMER_MAX 19
+#define _SC_TZNAME_MAX 20
+#define _SC_ASYNCHRONOUS_IO 21
+#define _SC_FSYNC 22
+#define _SC_MAPPED_FILES 23
+#define _SC_MEMLOCK 24
+#define _SC_MEMLOCK_RANGE 25
+#define _SC_MEMORY_PROTECTION 26
+#define _SC_MESSAGE_PASSING 27
+#define _SC_PRIORITIZED_IO 28
+#define _SC_REALTIME_SIGNALS 29
+#define _SC_SEMAPHORES 30
+#define _SC_SHARED_MEMORY_OBJECTS 31
+#define _SC_SYNCHRONIZED_IO 32
+#define _SC_TIMERS 33
+#define _SC_AIO_LISTIO_MAX 34
+#define _SC_AIO_MAX 35
+#define _SC_AIO_PRIO_DELTA_MAX 36
+#define _SC_DELAYTIMER_MAX 37
+#define _SC_THREAD_KEYS_MAX 38
+#define _SC_THREAD_STACK_MIN 39
+#define _SC_THREAD_THREADS_MAX 40
+#define _SC_TTY_NAME_MAX 41
+#define _SC_THREADS 42
+#define _SC_THREAD_ATTR_STACKADDR 43
+#define _SC_THREAD_ATTR_STACKSIZE 44
+#define _SC_THREAD_PRIORITY_SCHEDULING 45
+#define _SC_THREAD_PRIO_INHERIT 46
+#define _SC_THREAD_PRIO_PROTECT 47
+#define _SC_THREAD_PRIO_CEILING _SC_THREAD_PRIO_PROTECT
+#define _SC_THREAD_PROCESS_SHARED 48
+#define _SC_THREAD_SAFE_FUNCTIONS 49
+#define _SC_GETGR_R_SIZE_MAX 50
+#define _SC_GETPW_R_SIZE_MAX 51
+#define _SC_LOGIN_NAME_MAX 52
+#define _SC_THREAD_DESTRUCTOR_ITERATIONS 53
+#define _SC_ADVISORY_INFO 54
+#define _SC_ATEXIT_MAX 55
+#define _SC_BARRIERS 56
+#define _SC_BC_BASE_MAX 57
+#define _SC_BC_DIM_MAX 58
+#define _SC_BC_SCALE_MAX 59
+#define _SC_BC_STRING_MAX 60
+#define _SC_CLOCK_SELECTION 61
+#define _SC_COLL_WEIGHTS_MAX 62
+#define _SC_CPUTIME 63
+#define _SC_EXPR_NEST_MAX 64
+#define _SC_HOST_NAME_MAX 65
+#define _SC_IOV_MAX 66
+#define _SC_IPV6 67
+#define _SC_LINE_MAX 68
+#define _SC_MONOTONIC_CLOCK 69
+#define _SC_RAW_SOCKETS 70
+#define _SC_READER_WRITER_LOCKS 71
+#define _SC_REGEXP 72
+#define _SC_RE_DUP_MAX 73
+#define _SC_SHELL 74
+#define _SC_SPAWN 75
+#define _SC_SPIN_LOCKS 76
+#define _SC_SPORADIC_SERVER 77
+#define _SC_SS_REPL_MAX 78
+#define _SC_SYMLOOP_MAX 79
+#define _SC_THREAD_CPUTIME 80
+#define _SC_THREAD_SPORADIC_SERVER 81
+#define _SC_TIMEOUTS 82
+#define _SC_TRACE 83
+#define _SC_TRACE_EVENT_FILTER 84
+#define _SC_TRACE_EVENT_NAME_MAX 85
+#define _SC_TRACE_INHERIT 86
+#define _SC_TRACE_LOG 87
+#define _SC_TRACE_NAME_MAX 88
+#define _SC_TRACE_SYS_MAX 89
+#define _SC_TRACE_USER_EVENT_MAX 90
+#define _SC_TYPED_MEMORY_OBJECTS 91
+#define _SC_V7_ILP32_OFF32 92
+#define _SC_V6_ILP32_OFF32 _SC_V7_ILP32_OFF32
+#define _SC_XBS5_ILP32_OFF32 _SC_V7_ILP32_OFF32
+#define _SC_V7_ILP32_OFFBIG 93
+#define _SC_V6_ILP32_OFFBIG _SC_V7_ILP32_OFFBIG
+#define _SC_XBS5_ILP32_OFFBIG _SC_V7_ILP32_OFFBIG
+#define _SC_V7_LP64_OFF64 94
+#define _SC_V6_LP64_OFF64 _SC_V7_LP64_OFF64
+#define _SC_XBS5_LP64_OFF64 _SC_V7_LP64_OFF64
+#define _SC_V7_LPBIG_OFFBIG 95
+#define _SC_V6_LPBIG_OFFBIG _SC_V7_LPBIG_OFFBIG
+#define _SC_XBS5_LPBIG_OFFBIG _SC_V7_LPBIG_OFFBIG
+#define _SC_XOPEN_CRYPT 96
+#define _SC_XOPEN_ENH_I18N 97
+#define _SC_XOPEN_LEGACY 98
+#define _SC_XOPEN_REALTIME 99
+#define _SC_STREAM_MAX 100
+#define _SC_PRIORITY_SCHEDULING 101
+#define _SC_XOPEN_REALTIME_THREADS 102
+#define _SC_XOPEN_SHM 103
+#define _SC_XOPEN_STREAMS 104
+#define _SC_XOPEN_UNIX 105
+#define _SC_XOPEN_VERSION 106
+#define _SC_2_CHAR_TERM 107
+#define _SC_2_C_BIND 108
+#define _SC_2_C_DEV 109
+#define _SC_2_FORT_DEV 110
+#define _SC_2_FORT_RUN 111
+#define _SC_2_LOCALEDEF 112
+#define _SC_2_PBS 113
+#define _SC_2_PBS_ACCOUNTING 114
+#define _SC_2_PBS_CHECKPOINT 115
+#define _SC_2_PBS_LOCATE 116
+#define _SC_2_PBS_MESSAGE 117
+#define _SC_2_PBS_TRACK 118
+#define _SC_2_SW_DEV 119
+#define _SC_2_UPE 120
+#define _SC_2_VERSION 121
+#define _SC_THREAD_ROBUST_PRIO_INHERIT 122
+#define _SC_THREAD_ROBUST_PRIO_PROTECT 123
+#define _SC_XOPEN_UUCP 124
+#define _SC_LEVEL1_ICACHE_SIZE 125
+#define _SC_LEVEL1_ICACHE_ASSOC 126
+#define _SC_LEVEL1_ICACHE_LINESIZE 127
+#define _SC_LEVEL1_DCACHE_SIZE 128
+#define _SC_LEVEL1_DCACHE_ASSOC 129
+#define _SC_LEVEL1_DCACHE_LINESIZE 130
+#define _SC_LEVEL2_CACHE_SIZE 131
+#define _SC_LEVEL2_CACHE_ASSOC 132
+#define _SC_LEVEL2_CACHE_LINESIZE 133
+#define _SC_LEVEL3_CACHE_SIZE 134
+#define _SC_LEVEL3_CACHE_ASSOC 135
+#define _SC_LEVEL3_CACHE_LINESIZE 136
+#define _SC_LEVEL4_CACHE_SIZE 137
+#define _SC_LEVEL4_CACHE_ASSOC 138
+#define _SC_LEVEL4_CACHE_LINESIZE 139
+
+#endif
diff --git a/newlib/libc/sys/phoenix/sys/utmp.h b/newlib/libc/sys/phoenix/sys/utmp.h
new file mode 100644
index 000000000..dfab1572b
--- /dev/null
+++ b/newlib/libc/sys/phoenix/sys/utmp.h
@@ -0,0 +1,45 @@
+/* Written 2000 by Werner Almesberger */
+/* Some things copied from glibc's /usr/include/bits/utmp.h */
+
+#ifndef _SYS_UTMP_H
+#define _SYS_UTMP_H
+
+#include <sys/types.h>
+
+#define UTMP_FILE "/var/run/utmp"
+
+#define UT_LINESIZE 32
+#define UT_NAMESIZE 32
+#define UT_HOSTSIZE 256
+
+struct utmp {
+ short int ut_type;
+ pid_t ut_pid;
+ char ut_line[UT_LINESIZE];
+ char ut_id[4];
+ char ut_user[UT_NAMESIZE];
+ char ut_host[UT_HOSTSIZE];
+ char __filler[52];
+};
+
+#define ut_name ut_user
+
+#define RUN_LVL 1
+#define BOOT_TIME 2
+#define NEW_TIME 3
+#define OLD_TIME 4
+#define INIT_PROCESS 5
+#define LOGIN_PROCESS 6
+#define USER_PROCESS 7
+#define DEAD_PROCESS 8
+
+struct utmp *_getutline(struct utmp *ut);
+struct utmp *getutent();
+struct utmp *getutid(struct utmp *ut);
+struct utmp *getutline(struct utmp *ut);
+void endutent();
+void pututline(struct utmp *ut);
+void setutent();
+void utmpname(const char *file);
+
+#endif
diff --git a/newlib/libc/sys/phoenix/sys/utsname.h b/newlib/libc/sys/phoenix/sys/utsname.h
new file mode 100644
index 000000000..2590f1939
--- /dev/null
+++ b/newlib/libc/sys/phoenix/sys/utsname.h
@@ -0,0 +1,32 @@
+/* Copyright (c) 2016 Phoenix Systems
+ 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.*/
+
+#ifndef _SYS_UTSNAME_H
+#define _SYS_UTSNAME_H
+
+#include <phoenix/uname.h>
+
+int uname(struct utsname *buf);
+
+#endif
diff --git a/newlib/libc/sys/phoenix/sys/vfs.h b/newlib/libc/sys/phoenix/sys/vfs.h
new file mode 100644
index 000000000..918fee72b
--- /dev/null
+++ b/newlib/libc/sys/phoenix/sys/vfs.h
@@ -0,0 +1,38 @@
+/* Copyright (c) 2016 Phoenix Systems
+ 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.*/
+
+#ifndef _SYS_VFS_H
+#define _SYS_VFS_H
+
+#include <phoenix/statfs.h>
+
+/* Declare which statfs fields are available in Phoenix-RTOS. */
+#define _STATFS_F_NAMELEN
+#define _STATFS_F_FRSIZE
+#define _STATFS_F_FLAGS
+
+int statfs(const char *path, struct statfs *buf);
+int fstatfs(int fd, struct statfs *buf);
+
+#endif
diff --git a/newlib/libc/sys/phoenix/sys/wait.h b/newlib/libc/sys/phoenix/sys/wait.h
new file mode 100644
index 000000000..59b0f8ced
--- /dev/null
+++ b/newlib/libc/sys/phoenix/sys/wait.h
@@ -0,0 +1,45 @@
+/* Copyright (c) 2016 Phoenix Systems
+ 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.*/
+
+#ifndef _SYS_WAIT_H
+#define _SYS_WAIT_H
+
+#include <sys/types.h>
+
+#define WNOHANG 1
+#define WUNTRACED 2
+
+#define WIFEXITED(status) (!WTERMSIG(status))
+#define WEXITSTATUS(status) (((status) >> 8) & 0xff)
+#define WIFSIGNALED(status) (!WIFSTOPPED(status) && !WIFEXITED(status))
+#define WTERMSIG(status) ((status ) & 0x7f)
+#define WIFSTOPPED(status) (((status) & 0xff) == 0x7f)
+#define WSTOPSIG(status) WEXITSTATUS(status)
+#define WCOREDUMP(status) ((status) & 0x80)
+
+pid_t wait(int *status);
+pid_t waitpid(pid_t pid, int *status, int options);
+pid_t _wait(int *status);
+
+#endif
diff --git a/newlib/libc/sys/phoenix/syscall.h b/newlib/libc/sys/phoenix/syscall.h
new file mode 100644
index 000000000..e1373ceea
--- /dev/null
+++ b/newlib/libc/sys/phoenix/syscall.h
@@ -0,0 +1,127 @@
+/* Copyright (c) 2016 Phoenix Systems
+ 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.*/
+
+#ifndef PHOENIX_SYSCALL_H
+#define PHOENIX_SYSCALL_H
+
+#include <sys/_null.h>
+
+#define SYS_SBRK 0
+#define SYS_READ 1
+#define SYS_WRITE 2
+#define SYS_OPEN 3
+#define SYS_CLOSE 4
+#define SYS_FORK 5
+#define SYS_NANOSLEEP 6
+#define SYS_EXECVE 7
+#define SYS_GETPID 8
+#define SYS_EXIT 9
+#define SYS_WAITPID 10
+#define SYS_GETPPID 11
+#define SYS_LSEEK 12
+#define SYS_FSTAT 13
+#define SYS_STAT 14
+#define SYS_ISATTY 15
+#define SYS_PIPE 16
+#define SYS_LSTAT 17
+#define SYS_FCNTL 18
+#define SYS_DUP2 19
+#define SYS_SOCKET 20
+#define SYS_CONNECT 21
+#define SYS_SELECT 22
+#define SYS_GETCWD 23
+#define SYS_SETCWD 24
+#define SYS_BIND 25
+#define SYS_LISTEN 26
+#define SYS_ACCEPT 27
+#define SYS_GETDENTS 28
+#define SYS_MKDIR 29
+#define SYS_CHMOD 30
+#define SYS_IOCTL 31
+#define SYS_RMDIR 32
+#define SYS_MKNOD 33
+#define SYS_FSYNC 34
+#define SYS_FTRUNCATE 35
+#define SYS_ACCESS 36
+#define SYS_SENDTO 37
+#define SYS_RECVFROM 38
+#define SYS_GETSOCKNAME 39
+#define SYS_GETPEERNAME 40
+#define SYS_POLL 41
+#define SYS_CLOCK_GETTIME 42
+#define SYS_UNLINK 43
+#define SYS_LINK 44
+#define SYS_SYMLINK 45
+#define SYS_READLINK 46
+#define SYS_GETUID 47
+#define SYS_SETUID 48
+#define SYS_GETEUID 49
+#define SYS_SETEUID 50
+#define SYS_SETREUID 51
+#define SYS_GETGID 52
+#define SYS_SETGID 53
+#define SYS_GETEGID 54
+#define SYS_SETEGID 55
+#define SYS_SETREGID 56
+#define SYS_GETGROUPS 57
+#define SYS_SETGROUPS 58
+#define SYS_GETGRGID 59
+#define SYS_UMASK 60
+#define SYS_CHOWN 61
+#define SYS_LCHOWN 62
+#define SYS_FCHOWN 63
+#define SYS_FCHMOD 64
+#define SYS_TRUNCATE 65
+#define SYS_SCHED_GETPARAM 66
+#define SYS_SCHED_GETSCHEDULER 67
+#define SYS_SCHED_GET_PRIORITY_MAX 68
+#define SYS_SCHED_GET_PRIORITY_MIN 69
+#define SYS_SCHED_SETPARAM 70
+#define SYS_SCHED_SETSCHEDULER 71
+#define SYS_SCHED_YIELD 72
+#define SYS_MOUNT 73
+#define SYS_UMOUNT 74
+#define SYS_KILL 75
+#define SYS_CLOCK_SETTIME 76
+#define SYS_NET_CONFIGURE 77
+#define SYS_UNAME 78
+#define SYS_HOSTNAME 79
+#define SYS_DOMAINNAME 80
+#define SYS_CHTIMES 81
+#define SYS_REBOOT 82
+#define SYS_SYNC 83
+#define SYS_STATFS 84
+#define SYS_MMAP 85
+#define SYS_MUNMAP 86
+
+void *_syscall5(unsigned syscallNo, void *arg1, void *arg2, void *arg3, void *arg4, void *arg5);
+
+#define syscall0(rettype, no) (rettype) _syscall5(no, NULL, NULL, NULL, NULL,NULL)
+#define syscall1(rettype, no, a1) (rettype) _syscall5(no, (void *) a1, NULL, NULL, NULL, NULL)
+#define syscall2(rettype, no, a1, a2) (rettype) _syscall5(no, (void *) a1, (void *) a2, NULL, NULL, NULL)
+#define syscall3(rettype, no, a1, a2, a3) (rettype) _syscall5(no, (void *) a1, (void *) a2, (void *) a3, NULL, NULL)
+#define syscall4(rettype, no, a1, a2, a3, a4) (rettype) _syscall5(no, (void *) a1, (void *) a2, (void *) a3, (void *) a4, NULL)
+#define syscall5(rettype, no, a1, a2, a3, a4, a5) (rettype) _syscall5(no, (void *) a1, (void *) a2, (void *) a3, (void *) a4, (void *) a5)
+
+#endif
diff --git a/newlib/libc/sys/phoenix/sysconf.c b/newlib/libc/sys/phoenix/sysconf.c
new file mode 100644
index 000000000..08eb439ed
--- /dev/null
+++ b/newlib/libc/sys/phoenix/sysconf.c
@@ -0,0 +1,32 @@
+/* Copyright (c) 2016 Phoenix Systems
+ 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 <errno.h>
+
+long sysconf(int name)
+{
+ /* TODO: implement. */
+ errno = ENOSYS;
+ return -1;
+}
diff --git a/newlib/libc/sys/phoenix/syslog.c b/newlib/libc/sys/phoenix/syslog.c
new file mode 100644
index 000000000..c38800e09
--- /dev/null
+++ b/newlib/libc/sys/phoenix/syslog.c
@@ -0,0 +1,106 @@
+/* Copyright (c) 2016 Phoenix Systems
+ 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 <arpa/inet.h>
+#include <errno.h>
+#include <netinet/in.h>
+#include <stdarg.h>
+#include <stdio.h>
+#include <string.h>
+#include <sys/socket.h>
+#include <syslog.h>
+#include <unistd.h>
+
+#define BUFFER_SIZE 1024
+#define LOG_MAX_SIZE (3 * 512)
+
+struct {
+ int socket;
+ struct sockaddr_in addr;
+ const char *ident;
+ int option;
+ int facility;
+ int tried;
+} client = {
+ .ident = NULL,
+ .socket = -1,
+ .option = 0,
+ .facility = 0,
+};
+
+void openlog(const char *ident, int option, int facility)
+{
+ if (client.socket != -1)
+ return;
+
+ client.ident = ident;
+ client.option = option;
+ client.facility = facility;
+
+ if (client.ident == NULL)
+ client.ident = "app";
+
+ if ((client.socket = socket(AF_INET, SOCK_DGRAM, 0)) == -1) {
+ printf("Socket failed: %s\n", strerror(errno));
+ return;
+ }
+
+ memset(&(client.addr), 0, sizeof(client.addr));
+ client.addr.sin_family = AF_INET;
+ client.addr.sin_addr.s_addr = inet_addr("127.0.0.1");
+ client.addr.sin_port = htons(31000);
+}
+
+void syslog(int priority, const char *format, ...)
+{
+ char buffer[BUFFER_SIZE];
+ char msg[LOG_MAX_SIZE];
+ memset(buffer, 0, sizeof(buffer));
+ memset(msg, 0, sizeof(msg));
+
+ if (LOG_FAC(priority) == 0)
+ priority |= client.facility;
+
+ va_list args;
+ va_start(args, format);
+ vsnprintf(buffer, sizeof(buffer), format, args);
+ va_end(args);
+
+ snprintf(msg, sizeof(msg), "<%d> %s[%d]: %s", priority, client.ident, getpid(), buffer);
+
+ if (sendto(client.socket, msg, strlen(msg), 0, (struct sockaddr *) &(client.addr), sizeof(client.addr)) == -1) {
+ printf("Send failed: %s\n", strerror(errno));
+ return;
+ }
+}
+
+void closelog()
+{
+ if (client.socket == -1)
+ return;
+
+ close(client.socket);
+ client.ident = NULL;
+ client.socket = -1;
+}
diff --git a/newlib/libc/sys/phoenix/time.c b/newlib/libc/sys/phoenix/time.c
new file mode 100644
index 000000000..f10de7ff5
--- /dev/null
+++ b/newlib/libc/sys/phoenix/time.c
@@ -0,0 +1,103 @@
+/* Copyright (c) 2016 Phoenix Systems
+ 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 "syscall.h"
+
+#include <errno.h>
+#include <sys/times.h>
+#include <time.h>
+
+/* Global variables. */
+int _daylight = 0;
+long _timezone = 0;
+char *_tzname[2] = {"GMT", "GMT"};
+
+time_t time(time_t *t)
+{
+ struct timespec tp;
+ int ret = clock_gettime(CLOCK_REALTIME, &tp);
+ if (ret < 0) {
+ errno = -ret;
+ return -1;
+ }
+
+ if (t != NULL)
+ *t = tp.tv_sec;
+
+ return tp.tv_sec;
+}
+
+int stime(const time_t *t)
+{
+ if (t == NULL) {
+ errno = EINVAL;
+ return -1;
+ }
+
+ struct timespec tp;
+ tp.tv_sec = *t;
+
+ int ret = clock_settime(CLOCK_REALTIME, &tp);
+ if (ret < 0) {
+ errno = -ret;
+ return -1;
+ }
+
+ return ret;
+}
+
+int gettimeofday(struct timeval *tv, void *tz)
+{
+ struct timespec tp;
+ int ret = clock_gettime(CLOCK_REALTIME, &tp);
+ if (ret < 0) {
+ errno = -ret;
+ return -1;
+ }
+
+ tv->tv_sec = tp.tv_sec;
+ tv->tv_usec = tp.tv_nsec / 1000;
+
+ return ret;
+}
+
+int settimeofday(const struct timeval *tv, const struct timezone *tz)
+{
+ struct timespec tp;
+ tp.tv_sec = tv->tv_sec;
+ tp.tv_nsec = tv->tv_usec * 1000;
+
+ int ret = clock_settime(CLOCK_REALTIME, &tp);
+ if (ret < 0) {
+ errno = -ret;
+ return -1;
+ }
+
+ return ret;
+}
+
+clock_t times(struct tms *buf)
+{
+ errno = ENOSYS;
+ return -1;
+}
diff --git a/newlib/libc/sys/phoenix/truncate.c b/newlib/libc/sys/phoenix/truncate.c
new file mode 100644
index 000000000..06699559e
--- /dev/null
+++ b/newlib/libc/sys/phoenix/truncate.c
@@ -0,0 +1,50 @@
+/* Copyright (c) 2016 Phoenix Systems
+ 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 "syscall.h"
+
+#include <errno.h>
+#include <sys/types.h>
+
+int truncate(const char *path, off_t length)
+{
+ int ret = syscall2(int, SYS_TRUNCATE, path, length);
+ if (ret < 0) {
+ errno = -ret;
+ return -1;
+ }
+
+ return ret;
+}
+
+int ftruncate(int fd, off_t length)
+{
+ int ret = syscall2(int, SYS_FTRUNCATE, fd, length);
+ if (ret < 0) {
+ errno = -ret;
+ return -1;
+ }
+
+ return ret;
+}
diff --git a/newlib/libc/sys/phoenix/tty.c b/newlib/libc/sys/phoenix/tty.c
new file mode 100644
index 000000000..ab944e06f
--- /dev/null
+++ b/newlib/libc/sys/phoenix/tty.c
@@ -0,0 +1,125 @@
+/* Copyright (c) 2016 Phoenix Systems
+ 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 "syscall.h"
+
+#include <errno.h>
+#include <sys/ioctl.h>
+#include <sys/termios.h>
+
+int _isatty(int fd)
+{
+ int ret = syscall1(int, SYS_ISATTY, fd);
+ if (ret < 0) {
+ errno = -ret;
+ return -1;
+ }
+
+ return ret;
+}
+
+int tcgetattr(int fd, struct termios *termios_p)
+{
+ int ret = ioctl(fd, TCGETS, termios_p);
+ if (ret < 0) {
+ errno = -ret;
+ return -1;
+ }
+
+ return ret;
+}
+
+int tcsetattr(int fd, int mode, const struct termios *termios_p)
+{
+ int cmd;
+ switch (mode) {
+ case TCSANOW:
+ cmd = TCSETS;
+ break;
+ case TCSADRAIN:
+ cmd = TCSETSW;
+ break;
+ case TCSAFLUSH:
+ cmd = TCSETSF;
+ break;
+ default:
+ errno = EINVAL;
+ return -1;
+ }
+
+ int ret = ioctl(fd, cmd, termios_p);
+ if (ret < 0) {
+ errno = -ret;
+ return -1;
+ }
+
+ return ret;
+}
+
+int tcsendbreak(int fd, int duration)
+{
+ int ret = ioctl(fd, TCSBRK, duration);
+ if (ret < 0) {
+ errno = -ret;
+ return -1;
+ }
+
+ return ret;
+}
+
+int tcflush(int fd, int queue_selector)
+{
+ int ret = ioctl(fd, TCFLSH, queue_selector);
+ if (ret < 0) {
+ errno = -ret;
+ return -1;
+ }
+
+ return ret;
+}
+
+int tcdrain(int fd)
+{
+ int ret = ioctl(fd, TCDRAIN, 0);
+ if (ret < 0) {
+ errno = -ret;
+ return -1;
+ }
+
+ return ret;
+}
+
+pid_t tcgetsid(int fd)
+{
+ /* TODO: implement. */
+ errno = ENOSYS;
+ return -1;
+}
+
+int tcsetpgrp(int fd, pid_t pgrp)
+{
+ /* TODO: implement. */
+ errno = ENOSYS;
+ return -1;
+}
diff --git a/newlib/libc/sys/phoenix/uname.c b/newlib/libc/sys/phoenix/uname.c
new file mode 100644
index 000000000..9f7b071af
--- /dev/null
+++ b/newlib/libc/sys/phoenix/uname.c
@@ -0,0 +1,39 @@
+/* Copyright (c) 2016 Phoenix Systems
+ 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 "syscall.h"
+
+#include <errno.h>
+#include <sys/utsname.h>
+
+int uname(struct utsname *buf)
+{
+ int ret = syscall1(int, SYS_UNAME, buf);
+ if (ret < 0) {
+ errno = -ret;
+ return -1;
+ }
+
+ return 0;
+}
diff --git a/newlib/libc/sys/phoenix/utime.c b/newlib/libc/sys/phoenix/utime.c
new file mode 100644
index 000000000..265363f9a
--- /dev/null
+++ b/newlib/libc/sys/phoenix/utime.c
@@ -0,0 +1,68 @@
+/* Copyright (c) 2016 Phoenix Systems
+ 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 "syscall.h"
+
+#include <errno.h>
+#include <stdio.h>
+#include <time.h>
+#include <utime.h>
+
+int utime(const char *filename, const struct utimbuf *times)
+{
+ struct timespec t[2];
+ if (times) {
+ t[0].tv_sec = times->actime;
+ t[0].tv_nsec = 0;
+ t[1].tv_sec = times->modtime;
+ t[1].tv_nsec = 0;
+ }
+
+ int ret = syscall2(int, SYS_CHTIMES, filename, times ? &t : NULL);
+ if (ret < 0) {
+ errno = -ret;
+ return -1;
+ }
+
+ return ret;
+}
+
+int utimes(const char *filename, const struct timeval times[2])
+{
+ struct timespec t[2];
+ if (times) {
+ t[0].tv_sec = times[0].tv_sec;
+ t[0].tv_nsec = times[0].tv_usec * 1000;
+ t[1].tv_sec = times[1].tv_sec;
+ t[1].tv_nsec = times[1].tv_usec * 1000;
+ }
+
+ int ret = syscall2(int, SYS_CHTIMES, filename, times ? &t : NULL);
+ if (ret < 0) {
+ errno = -ret;
+ return -1;
+ }
+
+ return ret;
+}
diff --git a/newlib/libc/sys/phoenix/wait.c b/newlib/libc/sys/phoenix/wait.c
new file mode 100644
index 000000000..914e2ab29
--- /dev/null
+++ b/newlib/libc/sys/phoenix/wait.c
@@ -0,0 +1,58 @@
+/* Copyright (c) 2016 Phoenix Systems
+ 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 "syscall.h"
+
+#include <errno.h>
+#include <sys/resource.h>
+#include <sys/wait.h>
+
+pid_t wait(int *status)
+{
+ int ret = waitpid(-1, status, 0);
+ if (ret < 0) {
+ errno = -ret;
+ return -1;
+ }
+
+ return ret;
+}
+
+pid_t waitpid(pid_t pid, int *status, int options)
+{
+ int ret = syscall3(int, SYS_WAITPID, pid, status, options);
+ if (ret < 0) {
+ errno = -ret;
+ return -1;
+ }
+
+ return ret;
+}
+
+pid_t wait3(int *status, int options, struct rusage *rusage)
+{
+ /* TODO: implement. */
+ errno = ENOSYS;
+ return -1;
+}
diff --git a/newlib/libc/sys/rdos/chown.c b/newlib/libc/sys/rdos/chown.c
index 48f33f563..9be0ae89e 100755
--- a/newlib/libc/sys/rdos/chown.c
+++ b/newlib/libc/sys/rdos/chown.c
@@ -1,11 +1,11 @@
-#include "config.h"
-#include <_ansi.h>
-#include <_syslist.h>
-#include <errno.h>
-#include <sys/types.h>
-
-int chown(const char *path, uid_t owner, gid_t group)
-{
- errno = ENOSYS;
- return -1;
-}
+#include "config.h"
+#include <_ansi.h>
+#include <_syslist.h>
+#include <errno.h>
+#include <sys/types.h>
+
+int chown(const char *path, uid_t owner, gid_t group)
+{
+ errno = ENOSYS;
+ return -1;
+}
diff --git a/newlib/libc/sys/rdos/close.c b/newlib/libc/sys/rdos/close.c
index 7f95e24f3..3daf92bf6 100644
--- a/newlib/libc/sys/rdos/close.c
+++ b/newlib/libc/sys/rdos/close.c
@@ -1,36 +1,36 @@
-/*#######################################################################
-# RDOS operating system
-# Copyright (C) 1988-2006, Leif Ekblad
-#
-# This library is free software; you can redistribute it and/or modify
-# it under the terms of the GNU Lesser General Public License as published
-# by the Free Software Foundation; either version 2.1 of the License, or
-# (at your option) any later version.
-#
-# This library is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-#
-# The author of this program may be contacted at leif@rdos.net
-#
-# close.c
-# close function implementation
-#
-##########################################################################*/
-
-#include "config.h"
-#include <_ansi.h>
-#include <_syslist.h>
-#include <errno.h>
-#include "rdos.h"
-
-int close(int fildes)
-{
- RdosCloseFile(fildes);
- return 0;
-}
+/*#######################################################################
+# RDOS operating system
+# Copyright (C) 1988-2006, Leif Ekblad
+#
+# This library is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License as published
+# by the Free Software Foundation; either version 2.1 of the License, or
+# (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+#
+# The author of this program may be contacted at leif@rdos.net
+#
+# close.c
+# close function implementation
+#
+##########################################################################*/
+
+#include "config.h"
+#include <_ansi.h>
+#include <_syslist.h>
+#include <errno.h>
+#include "rdos.h"
+
+int close(int fildes)
+{
+ RdosCloseFile(fildes);
+ return 0;
+}
diff --git a/newlib/libc/sys/rdos/configure b/newlib/libc/sys/rdos/configure
index b7d58a10f..b0fea4d06 100755
--- a/newlib/libc/sys/rdos/configure
+++ b/newlib/libc/sys/rdos/configure
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.68 for newlib 2.0.0.
+# Generated by GNU Autoconf 2.68 for newlib 2.4.0.
#
#
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
@@ -556,8 +556,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='newlib'
PACKAGE_TARNAME='newlib'
-PACKAGE_VERSION='2.0.0'
-PACKAGE_STRING='newlib 2.0.0'
+PACKAGE_VERSION='2.4.0'
+PACKAGE_STRING='newlib 2.4.0'
PACKAGE_BUGREPORT=''
PACKAGE_URL=''
@@ -1239,7 +1239,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures newlib 2.0.0 to adapt to many kinds of systems.
+\`configure' configures newlib 2.4.0 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1309,7 +1309,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of newlib 2.0.0:";;
+ short | recursive ) echo "Configuration of newlib 2.4.0:";;
esac
cat <<\_ACEOF
@@ -1400,7 +1400,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-newlib configure 2.0.0
+newlib configure 2.4.0
generated by GNU Autoconf 2.68
Copyright (C) 2010 Free Software Foundation, Inc.
@@ -1455,7 +1455,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by newlib $as_me 2.0.0, which was
+It was created by newlib $as_me 2.4.0, which was
generated by GNU Autoconf 2.68. Invocation command line was
$ $0 $@
@@ -2527,7 +2527,7 @@ fi
# Define the identity of the package.
PACKAGE='newlib'
- VERSION='2.0.0'
+ VERSION='2.4.0'
# Some tools Automake needs.
@@ -4007,7 +4007,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by newlib $as_me 2.0.0, which was
+This file was extended by newlib $as_me 2.4.0, which was
generated by GNU Autoconf 2.68. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -4064,7 +4064,7 @@ _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
-newlib config.status 2.0.0
+newlib config.status 2.4.0
configured by $0, generated by GNU Autoconf 2.68,
with options \\"\$ac_cs_config\\"
diff --git a/newlib/libc/sys/rdos/execve.c b/newlib/libc/sys/rdos/execve.c
index ac7eeb25c..38465327a 100644
--- a/newlib/libc/sys/rdos/execve.c
+++ b/newlib/libc/sys/rdos/execve.c
@@ -1,10 +1,10 @@
-#include "config.h"
-#include <_ansi.h>
-#include <_syslist.h>
-#include <errno.h>
-
-int execve( char *name, char **argv, char **env)
-{
- errno = ENOSYS;
- return -1;
-}
+#include "config.h"
+#include <_ansi.h>
+#include <_syslist.h>
+#include <errno.h>
+
+int execve( char *name, char **argv, char **env)
+{
+ errno = ENOSYS;
+ return -1;
+}
diff --git a/newlib/libc/sys/rdos/fork.c b/newlib/libc/sys/rdos/fork.c
index fc335bb41..4b3381d61 100755
--- a/newlib/libc/sys/rdos/fork.c
+++ b/newlib/libc/sys/rdos/fork.c
@@ -1,10 +1,10 @@
-#include "config.h"
-#include <_ansi.h>
-#include <_syslist.h>
-#include <errno.h>
-
-int fork()
-{
- errno = ENOSYS;
- return -1;
-}
+#include "config.h"
+#include <_ansi.h>
+#include <_syslist.h>
+#include <errno.h>
+
+int fork()
+{
+ errno = ENOSYS;
+ return -1;
+}
diff --git a/newlib/libc/sys/rdos/fstat.c b/newlib/libc/sys/rdos/fstat.c
index c18dd78ed..59321c1c4 100755
--- a/newlib/libc/sys/rdos/fstat.c
+++ b/newlib/libc/sys/rdos/fstat.c
@@ -1,45 +1,45 @@
-/*#######################################################################
-# RDOS operating system
-# Copyright (C) 1988-2006, Leif Ekblad
-#
-# This library is free software; you can redistribute it and/or modify
-# it under the terms of the GNU Lesser General Public License as published
-# by the Free Software Foundation; either version 2.1 of the License, or
-# (at your option) any later version.
-#
-# This library is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-#
-# The author of this program may be contacted at leif@rdos.net
-#
-# fstat.c
-# fstat function implementation
-#
-##########################################################################*/
-
-#include "config.h"
-#include <_ansi.h>
-#include <_syslist.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <errno.h>
-
-int fstat(int fd, struct stat *st)
-{
- if (fd < 3)
- {
- st->st_mode = S_IFCHR;
- st->st_blksize = 0;
- return 0;
- }
- else
- {
- return -1;
- }
-}
+/*#######################################################################
+# RDOS operating system
+# Copyright (C) 1988-2006, Leif Ekblad
+#
+# This library is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License as published
+# by the Free Software Foundation; either version 2.1 of the License, or
+# (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+#
+# The author of this program may be contacted at leif@rdos.net
+#
+# fstat.c
+# fstat function implementation
+#
+##########################################################################*/
+
+#include "config.h"
+#include <_ansi.h>
+#include <_syslist.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <errno.h>
+
+int fstat(int fd, struct stat *st)
+{
+ if (fd < 3)
+ {
+ st->st_mode = S_IFCHR;
+ st->st_blksize = 0;
+ return 0;
+ }
+ else
+ {
+ return -1;
+ }
+}
diff --git a/newlib/libc/sys/rdos/getpid.c b/newlib/libc/sys/rdos/getpid.c
index d84d673e6..e1ce8c6b4 100644
--- a/newlib/libc/sys/rdos/getpid.c
+++ b/newlib/libc/sys/rdos/getpid.c
@@ -1,10 +1,10 @@
-#include "config.h"
-#include <_ansi.h>
-#include <_syslist.h>
-#include <errno.h>
-
-int getpid()
-{
- errno = ENOSYS;
- return -1;
-}
+#include "config.h"
+#include <_ansi.h>
+#include <_syslist.h>
+#include <errno.h>
+
+int getpid()
+{
+ errno = ENOSYS;
+ return -1;
+}
diff --git a/newlib/libc/sys/rdos/gettod.c b/newlib/libc/sys/rdos/gettod.c
index 66380e75c..82a389935 100644
--- a/newlib/libc/sys/rdos/gettod.c
+++ b/newlib/libc/sys/rdos/gettod.c
@@ -1,15 +1,15 @@
-#include "config.h"
-#include <_ansi.h>
-#include <_syslist.h>
-#include <sys/time.h>
-#include <sys/times.h>
-#include <errno.h>
-
-struct timeval;
-struct timezone;
-
-int gettimeofday(struct timeval *ptimeval, void *ptimezone)
-{
- errno = ENOSYS;
- return -1;
-}
+#include "config.h"
+#include <_ansi.h>
+#include <_syslist.h>
+#include <sys/time.h>
+#include <sys/times.h>
+#include <errno.h>
+
+struct timeval;
+struct timezone;
+
+int gettimeofday(struct timeval *ptimeval, void *ptimezone)
+{
+ errno = ENOSYS;
+ return -1;
+}
diff --git a/newlib/libc/sys/rdos/isatty.c b/newlib/libc/sys/rdos/isatty.c
index 9862a87f8..a3fb36ce8 100644
--- a/newlib/libc/sys/rdos/isatty.c
+++ b/newlib/libc/sys/rdos/isatty.c
@@ -1,9 +1,9 @@
-#include "config.h"
-#include <_ansi.h>
-#include <_syslist.h>
-#include <errno.h>
-
-int isatty(int file)
-{
- return 0;
-}
+#include "config.h"
+#include <_ansi.h>
+#include <_syslist.h>
+#include <errno.h>
+
+int isatty(int file)
+{
+ return 0;
+}
diff --git a/newlib/libc/sys/rdos/kill.c b/newlib/libc/sys/rdos/kill.c
index 4f77906de..3833d441c 100644
--- a/newlib/libc/sys/rdos/kill.c
+++ b/newlib/libc/sys/rdos/kill.c
@@ -1,10 +1,10 @@
-#include "config.h"
-#include <_ansi.h>
-#include <_syslist.h>
-#include <errno.h>
-
-int kill(int pid, int sig)
-{
- errno = ENOSYS;
- return -1;
-}
+#include "config.h"
+#include <_ansi.h>
+#include <_syslist.h>
+#include <errno.h>
+
+int kill(int pid, int sig)
+{
+ errno = ENOSYS;
+ return -1;
+}
diff --git a/newlib/libc/sys/rdos/link.c b/newlib/libc/sys/rdos/link.c
index 23c0b2bee..458e54940 100644
--- a/newlib/libc/sys/rdos/link.c
+++ b/newlib/libc/sys/rdos/link.c
@@ -1,10 +1,10 @@
-#include "config.h"
-#include <_ansi.h>
-#include <_syslist.h>
-#include <errno.h>
-
-int link(char *existing, char *new)
-{
- errno = ENOSYS;
- return -1;
-}
+#include "config.h"
+#include <_ansi.h>
+#include <_syslist.h>
+#include <errno.h>
+
+int link(char *existing, char *new)
+{
+ errno = ENOSYS;
+ return -1;
+}
diff --git a/newlib/libc/sys/rdos/lseek.c b/newlib/libc/sys/rdos/lseek.c
index b1cdb2178..68fb268e0 100755
--- a/newlib/libc/sys/rdos/lseek.c
+++ b/newlib/libc/sys/rdos/lseek.c
@@ -1,59 +1,59 @@
-/*#######################################################################
-# RDOS operating system
-# Copyright (C) 1988-2006, Leif Ekblad
-#
-# This library is free software; you can redistribute it and/or modify
-# it under the terms of the GNU Lesser General Public License as published
-# by the Free Software Foundation; either version 2.1 of the License, or
-# (at your option) any later version.
-#
-# This library is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-#
-# The author of this program may be contacted at leif@rdos.net
-#
-# lseek.c
-# lseek function implementation
-#
-##########################################################################*/
-
-#include "config.h"
-#include <_ansi.h>
-#include <_syslist.h>
-#include <unistd.h>
-#include <errno.h>
-#include <rdos.h>
-
-off_t lseek(int file, off_t pos, int whence)
-{
- off_t temp;
-
- switch (whence)
- {
- case SEEK_CUR:
- temp = RdosGetFilePos(file);
- temp += pos;
- RdosSetFilePos(file, temp);
- return temp;
-
- case SEEK_SET:
- RdosSetFilePos(file, pos);
- return pos;
-
- case SEEK_END:
- temp = RdosGetFilePos(file);
- temp += pos;
- RdosSetFilePos(file, temp);
- return temp;
-
- default:
- errno = EINVAL;
- return - 1;
- }
-}
+/*#######################################################################
+# RDOS operating system
+# Copyright (C) 1988-2006, Leif Ekblad
+#
+# This library is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License as published
+# by the Free Software Foundation; either version 2.1 of the License, or
+# (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+#
+# The author of this program may be contacted at leif@rdos.net
+#
+# lseek.c
+# lseek function implementation
+#
+##########################################################################*/
+
+#include "config.h"
+#include <_ansi.h>
+#include <_syslist.h>
+#include <unistd.h>
+#include <errno.h>
+#include <rdos.h>
+
+off_t lseek(int file, off_t pos, int whence)
+{
+ off_t temp;
+
+ switch (whence)
+ {
+ case SEEK_CUR:
+ temp = RdosGetFilePos(file);
+ temp += pos;
+ RdosSetFilePos(file, temp);
+ return temp;
+
+ case SEEK_SET:
+ RdosSetFilePos(file, pos);
+ return pos;
+
+ case SEEK_END:
+ temp = RdosGetFilePos(file);
+ temp += pos;
+ RdosSetFilePos(file, temp);
+ return temp;
+
+ default:
+ errno = EINVAL;
+ return - 1;
+ }
+}
diff --git a/newlib/libc/sys/rdos/open.c b/newlib/libc/sys/rdos/open.c
index e98910648..f84098857 100755
--- a/newlib/libc/sys/rdos/open.c
+++ b/newlib/libc/sys/rdos/open.c
@@ -1,59 +1,59 @@
-/*#######################################################################
-# RDOS operating system
-# Copyright (C) 1988-2006, Leif Ekblad
-#
-# This library is free software; you can redistribute it and/or modify
-# it under the terms of the GNU Lesser General Public License as published
-# by the Free Software Foundation; either version 2.1 of the License, or
-# (at your option) any later version.
-#
-# This library is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-#
-# The author of this program may be contacted at leif@rdos.net
-#
-# open.c
-# open function implementation
-#
-##########################################################################*/
-
-#include "config.h"
-#include <_ansi.h>
-#include <_syslist.h>
-#include <fcntl.h>
-#include <errno.h>
-#include "rdos.h"
-#include <stdarg.h>
-
-int open(const char *file, int flags, ...)
-{
- int handle;
- int pos;
-
- if (flags & O_CREAT)
- handle = RdosCreateFile(file, flags);
- else
- handle = RdosOpenFile(file, flags);
-
- if (handle >= 0)
- {
- if (flags & O_APPEND)
- {
- pos = RdosGetFileSize(handle);
- RdosSetFilePos(handle, pos);
- }
-
- if (flags & O_TRUNC)
- RdosSetFileSize(handle, 0);
-
- return handle;
- }
- else
- return -1;
-}
+/*#######################################################################
+# RDOS operating system
+# Copyright (C) 1988-2006, Leif Ekblad
+#
+# This library is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License as published
+# by the Free Software Foundation; either version 2.1 of the License, or
+# (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+#
+# The author of this program may be contacted at leif@rdos.net
+#
+# open.c
+# open function implementation
+#
+##########################################################################*/
+
+#include "config.h"
+#include <_ansi.h>
+#include <_syslist.h>
+#include <fcntl.h>
+#include <errno.h>
+#include "rdos.h"
+#include <stdarg.h>
+
+int open(const char *file, int flags, ...)
+{
+ int handle;
+ int pos;
+
+ if (flags & O_CREAT)
+ handle = RdosCreateFile(file, flags);
+ else
+ handle = RdosOpenFile(file, flags);
+
+ if (handle >= 0)
+ {
+ if (flags & O_APPEND)
+ {
+ pos = RdosGetFileSize(handle);
+ RdosSetFilePos(handle, pos);
+ }
+
+ if (flags & O_TRUNC)
+ RdosSetFileSize(handle, 0);
+
+ return handle;
+ }
+ else
+ return -1;
+}
diff --git a/newlib/libc/sys/rdos/rdos.h b/newlib/libc/sys/rdos/rdos.h
index 690500071..a81cdd993 100755
--- a/newlib/libc/sys/rdos/rdos.h
+++ b/newlib/libc/sys/rdos/rdos.h
@@ -1,344 +1,344 @@
-
-#ifndef _RDOS_H
-#define _RDOS_H
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-//#undef WIN32
-
-#define FILE_ATTRIBUTE_READONLY 0x1
-#define FILE_ATTRIBUTE_HIDDEN 0x2
-#define FILE_ATTRIBUTE_SYSTEM 0x4
-#define FILE_ATTRIBUTE_DIRECTORY 0x10
-#define FILE_ATTRIBUTE_ARCHIVE 0x20
-#define FILE_ATTRIBUTE_NORMAL 0x80
-
-#define LGOP_NULL 0
-#define LGOP_NONE 1
-#define LGOP_OR 2
-#define LGOP_AND 3
-#define LGOP_XOR 4
-#define LGOP_INVERT 5
-#define LGOP_INVERT_OR 6
-#define LGOP_INVERT_AND 7
-#define LGOP_INVERT_XOR 8
-#define LGOP_ADD 9
-#define LGOP_SUBTRACT 10
-#define LGOP_MULTIPLY 11
-
-#define getred(pgc) (((pgc)>>16)&0xFF)
-#define getgreen(pgc) (((pgc)>>8)&0xFF)
-#define getblue(pgc) ((pgc)&0xFF)
-#define mkcolor(r,g,b) (((r)<<16)|((g)<<8)|(b))
-
-typedef struct ThreadState
-{
- short int ID;
- char Name[32];
- unsigned long MsbTime;
- unsigned long LsbTime;
- char List[32];
- long Offset;
- short int Sel;
-} ThreadState;
-
-#ifdef __GNUC__
-#define __stdcall
-#else
-#if (sizeof(int) == 2)
-#define __stdcall
-#endif
-#endif
-
-short int __stdcall RdosSwapShort(short int val);
-long __stdcall RdosSwapLong(long val);
-
-void __stdcall RdosSetTextMode();
-int __stdcall RdosSetVideoMode(int *BitsPerPixel, int *xres, int *yres, int *linesize, void **buffer);
-void __stdcall RdosSetClipRect(int handle, int xmin, int ymin, int xmax, int ymax);
-void __stdcall RdosClearClipRect(int handle);
-void __stdcall RdosSetDrawColor(int handle, int color);
-void __stdcall RdosSetLGOP(int handle, int lgop);
-void __stdcall RdosSetHollowStyle(int handle);
-void __stdcall RdosSetFilledStyle(int handle);
-int __stdcall RdosOpenFont(int height);
-void __stdcall RdosCloseFont(int font);
-void __stdcall RdosGetStringMetrics(int font, const char *str, int *width, int *height);
-void __stdcall RdosSetFont(int handle, int font);
-int __stdcall RdosGetPixel(int handle, int x, int y);
-void __stdcall RdosSetPixel(int handle, int x, int y);
-void __stdcall RdosBlit(int SrcHandle, int DestHandle, int width, int height,
- int SrcX, int SrcY, int DestX, int DestY);
-void __stdcall RdosDrawMask(int handle, void *mask, int RowSize, int width, int height,
- int SrcX, int SrcY, int DestX, int DestY);
-void __stdcall RdosDrawLine(int handle, int x1, int y1, int x2, int y2);
-void __stdcall RdosDrawString(int handle, int x, int y, const char *str);
-void __stdcall RdosDrawRect(int handle, int x, int y, int width, int height);
-void __stdcall RdosDrawEllipse(int handle, int x, int y, int width, int height);
-int __stdcall RdosCreateBitmap(int BitsPerPixel, int width, int height);
-int __stdcall RdosDuplicateBitmapHandle(int handle);
-void __stdcall RdosCloseBitmap(int handle);
-int __stdcall RdosCreateStringBitmap(int font, const char *str);
-void __stdcall RdosGetBitmapInfo(int handle, int *BitPerPixel, int *width, int *height,
- int *linesize, void **buffer);
-
-int __stdcall RdosCreateSprite(int DestHandle, int BitmapHandle, int MaskHandle, int lgop);
-void __stdcall RdosCloseSprite(int handle);
-void __stdcall RdosShowSprite(int handle);
-void __stdcall RdosHideSprite(int handle);
-void __stdcall RdosMoveSprite(int handle, int x, int y);
-
-void __stdcall RdosSetForeColor(int color);
-void __stdcall RdosSetBackColor(int color);
-int __stdcall RdosGetMemSize(void *ptr);
-void *__stdcall RdosAllocateMem(int Size);
-void __stdcall RdosFreeMem(void *ptr);
-int __stdcall RdosAppDebug();
-
-int __stdcall RdosOpenCom(int ID, long BaudRate, char Parity, char DataBits, char StopBits, int SendBufSize, int RecBufSize);
-void __stdcall RdosCloseCom(int Handle);
-void __stdcall RdosFlushCom(int Handle);
-char __stdcall RdosReadCom(int Handle);
-int __stdcall RdosWriteCom(int Handle, char Val);
-void __stdcall RdosEnableCts(int Handle);
-void __stdcall RdosDisableCts(int Handle);
-void __stdcall RdosEnableAutoRts(int Handle);
-void __stdcall RdosDisableAutoRts(int Handle);
-void __stdcall RdosSetDtr(int Handle);
-void __stdcall RdosResetDtr(int Handle);
-void __stdcall RdosSetRts(int Handle);
-void __stdcall RdosResetRts(int Handle);
-int __stdcall RdosGetReceiveBufferSpace(int Handle);
-int __stdcall RdosGetSendBufferSpace(int Handle);
-void __stdcall RdosWaitForSendCompletedCom(int Handle);
-
-int __stdcall RdosOpenFile(const char *FileName, char Access);
-int __stdcall RdosCreateFile(const char *FileName, int Attrib);
-void __stdcall RdosCloseFile(int Handle);
-int __stdcall RdosIsDevice(int Handle);
-int __stdcall RdosDuplFile(int Handle);
-long __stdcall RdosGetFileSize(int Handle);
-void __stdcall RdosSetFileSize(int Handle, long Size);
-long __stdcall RdosGetFilePos(int Handle);
-void __stdcall RdosSetFilePos(int Handle, long Pos);
-int __stdcall RdosReadFile(int Handle, void *Buf, int Size);
-int __stdcall RdosWriteFile(int Handle, const void *Buf, int Size);
-void __stdcall RdosGetFileTime(int Handle, unsigned long *MsbTime, unsigned long *LsbTime);
-void __stdcall RdosSetFileTime(int Handle, unsigned long MsbTime, unsigned long LsbTime);
-
-int __stdcall RdosCreateMapping(int Size);
-int __stdcall RdosCreateNamedMapping(const char *Name, int Size);
-int __stdcall RdosCreateNamedFileMapping(const char *Name, int Size, int FileHandle);
-int __stdcall RdosOpenNamedMapping(const char *Name);
-void __stdcall RdosSyncMapping(int Handle);
-void __stdcall RdosCloseMapping(int Handle);
-void __stdcall RdosMapView(int Handle, int Offset, void *Base, int Size);
-void __stdcall RdosUnmapView(int Handle);
-
-int __stdcall RdosSetCurDrive(int Drive);
-int __stdcall RdosGetCurDrive();
-int __stdcall RdosSetCurDir(const char *PathName);
-int __stdcall RdosGetCurDir(int Drive, char *PathName);
-int __stdcall RdosMakeDir(const char *PathName);
-int __stdcall RdosRemoveDir(const char *PathName);
-int __stdcall RdosRenameFile(const char *ToName, const char *FromName);
-int __stdcall RdosDeleteFile(const char *PathName);
-int __stdcall RdosGetFileAttribute(const char *PathName, int *Attribute);
-int __stdcall RdosSetFileAttribute(const char *PathName, int Attribute);
-int __stdcall RdosOpenDir(const char *PathName);
-void __stdcall RdosCloseDir(int Handle);
-int __stdcall RdosReadDir(int Handle, int EntryNr, int MaxNameSize, char *PathName, long *FileSize, int *Attribute, unsigned long *MsbTime, unsigned long *LsbTime);
-
-int __stdcall RdosGetThreadState(int ThreadNr, ThreadState *State);
-int __stdcall RdosSuspendThread(int ThreadNr);
-
-void __stdcall RdosCpuReset();
-void __stdcall RdosGetVersion(int *Major, int *Minor, int *Release);
-void __stdcall RdosCreateThread(void (*Start)(void *Param), const char *Name, void *Param, int StackSize);
-void __stdcall RdosTerminateThread();
-int __stdcall RdosGetThreadHandle();
-int __stdcall RdosExec(const char *prog, const char *param);
-int __stdcall RdosSpawn(const char *prog, const char *param, const char *startdir);
-void __stdcall RdosWaitMilli(int ms);
-void __stdcall RdosGetTics(unsigned long *msb, unsigned long *lsb);
-void __stdcall RdosTicsToRecord(unsigned long msb, unsigned long lsb, int *year, int *month, int *day, int *hour, int *min, int *sec, int *milli);
-void __stdcall RdosRecordToTics(unsigned long *msb, unsigned long *lsb, int year, int month, int day, int hour, int min, int sec, int milli);
-int __stdcall RdosDayOfWeek(int year, int month, int day);
-void __stdcall RdosGetSysTime(int *year, int *month, int *day, int *hour, int *min, int *sec, int *milli);
-void __stdcall RdosGetTime(int *year, int *month, int *day, int *hour, int *min, int *sec, int *milli);
-void __stdcall RdosSetTime(int year, int month, int day, int hour, int min, int sec, int milli);
-void __stdcall RdosAddTics(unsigned long *msb, unsigned long *lsb, long tics);
-void __stdcall RdosAddMilli(unsigned long *msb, unsigned long *lsb, long ms);
-void __stdcall RdosAddSec(unsigned long *msb, unsigned long *lsb, long sec);
-void __stdcall RdosAddMin(unsigned long *msb, unsigned long *lsb, long min);
-void __stdcall RdosAddHour(unsigned long *msb, unsigned long *lsb, long hour);
-void __stdcall RdosAddDay(unsigned long *msb, unsigned long *lsb, long day);
-int __stdcall RdosSyncTime(long IP);
-
-void __stdcall RdosDecodeMsbTics(unsigned long msb, int *days, int *hours);
-void __stdcall RdosDecodeLsbTics(unsigned long lsb, int *min, int *sec, int *milli, int *micro);
-
-int __stdcall RdosCreateSection();
-void __stdcall RdosDeleteSection(int Handle);
-void __stdcall RdosEnterSection(int Handle);
-void __stdcall RdosLeaveSection(int Handle);
-
-int __stdcall RdosCreateWait();
-void __stdcall RdosCloseWait(int Handle);
-void * __stdcall RdosCheckWait(int Handle);
-void * __stdcall RdosWaitForever(int Handle);
-void * __stdcall RdosWaitTimeout(int Handle, int MillSec);
-void __stdcall RdosStopWait(int Handle);
-void __stdcall RdosRemoveWait(int Handle, void *ID);
-void __stdcall RdosAddWaitForKeyboard(int Handle, void *ID);
-void __stdcall RdosAddWaitForMouse(int Handle, void *ID);
-void __stdcall RdosAddWaitForCom(int Handle, int ComHandle, void *ID);
-void __stdcall RdosAddWaitForAdc(int Handle, int AdcHandle, void *ID);
-
-int __stdcall RdosCreateSignal();
-void __stdcall RdosResetSignal(int Handle);
-int __stdcall RdosIsSignalled(int Handle);
-void __stdcall RdosSetSignal(int Handle);
-void __stdcall RdosFreeSignal(int Handle);
-void __stdcall RdosAddWaitForSignal(int Handle, int SignalHandle, void *ID);
-
-long __stdcall RdosGetIp();
-int __stdcall RdosNameToIp(const char *HostName);
-int __stdcall RdosIpToName(int Ip, char *HostName, int MaxSize);
-
-int __stdcall RdosCreateTcpListen(int Port, int MaxConnections, int BufferSize);
-int __stdcall RdosGetTcpListen(int Handle);
-void __stdcall RdosCloseTcpListen(int Handle);
-void __stdcall RdosAddWaitForTcpListen(int Handle, int ConHandle, void *ID);
-
-int __stdcall RdosOpenTcpConnection(int RemoteIp, int LocalPort, int RemotePort, int Timeout, int BufferSize);
-int __stdcall RdosWaitForTcpConnection(int Handle, long Timeout);
-void __stdcall RdosAddWaitForTcpConnection(int Handle, int ConHandle, void *ID);
-void __stdcall RdosCloseTcpConnection(int Handle);
-void __stdcall RdosDeleteTcpConnection(int Handle);
-void __stdcall RdosAbortTcpConnection(int Handle);
-void __stdcall RdosPushTcpConnection(int Handle);
-int __stdcall RdosIsTcpConnectionClosed(int Handle);
-long __stdcall RdosGetRemoteTcpConnectionIP(int Handle);
-int __stdcall RdosGetRemoteTcpConnectionPort(int Handle);
-int __stdcall RdosGetLocalTcpConnectionPort(int Handle);
-int __stdcall RdosReadTcpConnection(int Handle, void *Buf, int Size);
-int __stdcall RdosWriteTcpConnection(int Handle, const void *Buf, int Size);
-int __stdcall RdosPollTcpConnection(int Handle);
-
-int __stdcall RdosGetLocalMailslot(const char *Name);
-int __stdcall RdosGetRemoteMailslot(long Ip, const char *Name);
-void __stdcall RdosFreeMailslot(int Handle);
-int __stdcall RdosSendMailslot(int Handle, const void *Msg, int Size, void *ReplyBuf, int MaxReplySize);
-
-void __stdcall RdosDefineMailslot(const char *Name, int MaxSize);
-int __stdcall RdosReceiveMailslot(void *Msg);
-void __stdcall RdosReplyMailslot(const void *Msg, int Size);
-
-void __stdcall RdosSetFocus(char FocusKey);
-char __stdcall RdosGetFocus();
-
-void __stdcall RdosClearKeyboard();
-int __stdcall RdosPollKeyboard();
-int __stdcall RdosReadKeyboard();
-int __stdcall RdosGetKeyboardState();
-int __stdcall RdosPutKeyboard(int KeyCode, int VirtualKey, int ScanCode);
-int __stdcall RdosPeekKeyEvent(int *ExtKey, int *KeyState, int *VirtualKey, int *ScanCode);
-int __stdcall RdosReadKeyEvent(int *ExtKey, int *KeyState, int *VirtualKey, int *ScanCode);
-
-void __stdcall RdosHideMouse();
-void __stdcall RdosShowMouse();
-void __stdcall RdosGetMousePosition(int *x, int *y);
-void __stdcall RdosSetMousePosition(int x, int y);
-void __stdcall RdosSetMouseWindow(int StartX, int StartY, int EndX, int EndY);
-void __stdcall RdosSetMouseMickey(int x, int y);
-int __stdcall RdosGetLeftButton();
-int __stdcall RdosGetRightButton();
-void __stdcall RdosGetLeftButtonPressPosition(int *x, int *y);
-void __stdcall RdosGetRightButtonPressPosition(int *x, int *y);
-void __stdcall RdosGetLeftButtonReleasePosition(int *x, int *y);
-void __stdcall RdosGetRightButtonReleasePosition(int *x, int *y);
-
-void __stdcall RdosGetCursorPosition(int *Row, int *Col);
-void __stdcall RdosSetCursorPosition(int Row, int Col);
-void __stdcall RdosWriteChar(char ch);
-void __stdcall RdosWriteSizeString(const char *Buf, int Size);
-void __stdcall RdosWriteString(const char *Buf);
-int __stdcall RdosReadLine(char *Buf, int MaxSize);
-
-int __stdcall RdosPing(long Node, long Timeout);
-
-int __stdcall RdosGetIdeDisc(int UnitNr);
-int __stdcall RdosGetFloppyDisc(int UnitNr);
-
-int __stdcall RdosSetDiscInfo(int DiscNr, int SectorSize, long Sectors, int BiosSectorsPerCyl, int BiosHeads);
-int __stdcall RdosGetDiscInfo(int DiscNr, int *SectorSize, long *Sectors, int *BiosSectorsPerCyl, int *BiosHeads);
-int __stdcall RdosReadDisc(int DiscNr, long Sector, char *Buf, int Size);
-int __stdcall RdosWriteDisc(int DiscNr, long Sector, const char *Buf, int Size);
-
-void __stdcall RdosGetRdfsInfo(void *CryptTab, void *KeyTab, void *ExtentSizeTab);
-void __stdcall RdosDemandLoadDrive(int DriveNr);
-int __stdcall RdosFormatDrive(int DiscNr, long StartSector, int Size, const char *FsName);
-
-int __stdcall RdosAllocateFixedDrive(int DriveNr);
-int __stdcall RdosAllocateStaticDrive();
-int __stdcall RdosAllocateDynamicDrive();
-
-int __stdcall RdosGetDriveInfo(int DriveNr, long *FreeUnits, int *BytesPerUnit, long *TotalUnits);
-int __stdcall RdosGetDriveDiscParam(int DriveNr, int *DiscNr, long *StartSector, long *TotalSectors);
-
-int __stdcall RdosCreateFileDrive(int Drive, long Size, const char *FsName, const char *FileName);
-int __stdcall RdosOpenFileDrive(int Drive, const char *FileName);
-
-int __stdcall RdosGetModuleHandle();
-const char * __stdcall RdosGetExeName();
-int __stdcall RdosLoadDll(const char *Name);
-void __stdcall RdosFreeDll(int handle);
-int __stdcall RdosReadResource(int handle, int ID, char *Buf, int Size);
-int __stdcall RdosReadBinaryResource(int handle, int ID, char *Buf, int Size);
-
-int __stdcall RdosOpenAdc(int channel);
-void __stdcall RdosCloseAdc(int handle);
-void __stdcall RdosDefineAdcTime(int handle, unsigned long msg, unsigned long lsb);
-long __stdcall RdosReadAdc(int handle);
-
-int __stdcall RdosReadSerialLines(int device, int *val);
-int __stdcall RdosToggleSerialLine(int device, int line);
-int __stdcall RdosReadSerialVal(int device, int line, int *val);
-int __stdcall RdosWriteSerialVal(int device, int line, int val);
-int __stdcall RdosReadSerialRaw(int device, int line, int *val);
-int __stdcall RdosWriteSerialRaw(int device, int line, int val);
-
-int __stdcall RdosOpenSysEnv();
-int __stdcall RdosOpenProcessEnv();
-void __stdcall RdosCloseEnv(int handle);
-void __stdcall RdosAddEnvVar(int handle, const char *var, const char *value);
-void __stdcall RdosDeleteEnvVar(int handle, const char *var);
-int __stdcall RdosFindEnvVar(int handle, const char *var, char *value);
-void __stdcall RdosGetEnvData(int handle, char *buf);
-void __stdcall RdosSetEnvData(int handle, const char *buf);
-
-int __stdcall RdosOpenSysIni();
-void __stdcall RdosCloseIni(int handle);
-int __stdcall RdosGotoIniSection(int handle, const char *name);
-int __stdcall RdosRemoveIniSection(int handle);
-int __stdcall RdosReadIni(int handle, const char *var, char *str, int maxsize);
-int __stdcall RdosWriteIni(int handle, const char *var, const char *str);
-int __stdcall RdosDeleteIni(int handle, const char *var);
-
-void __stdcall RdosEnableStatusLED();
-void __stdcall RdosDisableStatusLED();
-
-void __stdcall RdosStartWatchdog(int timeout);
-void __stdcall RdosKickWatchdog();
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
-
-
-
+
+#ifndef _RDOS_H
+#define _RDOS_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+//#undef WIN32
+
+#define FILE_ATTRIBUTE_READONLY 0x1
+#define FILE_ATTRIBUTE_HIDDEN 0x2
+#define FILE_ATTRIBUTE_SYSTEM 0x4
+#define FILE_ATTRIBUTE_DIRECTORY 0x10
+#define FILE_ATTRIBUTE_ARCHIVE 0x20
+#define FILE_ATTRIBUTE_NORMAL 0x80
+
+#define LGOP_NULL 0
+#define LGOP_NONE 1
+#define LGOP_OR 2
+#define LGOP_AND 3
+#define LGOP_XOR 4
+#define LGOP_INVERT 5
+#define LGOP_INVERT_OR 6
+#define LGOP_INVERT_AND 7
+#define LGOP_INVERT_XOR 8
+#define LGOP_ADD 9
+#define LGOP_SUBTRACT 10
+#define LGOP_MULTIPLY 11
+
+#define getred(pgc) (((pgc)>>16)&0xFF)
+#define getgreen(pgc) (((pgc)>>8)&0xFF)
+#define getblue(pgc) ((pgc)&0xFF)
+#define mkcolor(r,g,b) (((r)<<16)|((g)<<8)|(b))
+
+typedef struct ThreadState
+{
+ short int ID;
+ char Name[32];
+ unsigned long MsbTime;
+ unsigned long LsbTime;
+ char List[32];
+ long Offset;
+ short int Sel;
+} ThreadState;
+
+#ifdef __GNUC__
+#define __stdcall
+#else
+#if (sizeof(int) == 2)
+#define __stdcall
+#endif
+#endif
+
+short int __stdcall RdosSwapShort(short int val);
+long __stdcall RdosSwapLong(long val);
+
+void __stdcall RdosSetTextMode();
+int __stdcall RdosSetVideoMode(int *BitsPerPixel, int *xres, int *yres, int *linesize, void **buffer);
+void __stdcall RdosSetClipRect(int handle, int xmin, int ymin, int xmax, int ymax);
+void __stdcall RdosClearClipRect(int handle);
+void __stdcall RdosSetDrawColor(int handle, int color);
+void __stdcall RdosSetLGOP(int handle, int lgop);
+void __stdcall RdosSetHollowStyle(int handle);
+void __stdcall RdosSetFilledStyle(int handle);
+int __stdcall RdosOpenFont(int height);
+void __stdcall RdosCloseFont(int font);
+void __stdcall RdosGetStringMetrics(int font, const char *str, int *width, int *height);
+void __stdcall RdosSetFont(int handle, int font);
+int __stdcall RdosGetPixel(int handle, int x, int y);
+void __stdcall RdosSetPixel(int handle, int x, int y);
+void __stdcall RdosBlit(int SrcHandle, int DestHandle, int width, int height,
+ int SrcX, int SrcY, int DestX, int DestY);
+void __stdcall RdosDrawMask(int handle, void *mask, int RowSize, int width, int height,
+ int SrcX, int SrcY, int DestX, int DestY);
+void __stdcall RdosDrawLine(int handle, int x1, int y1, int x2, int y2);
+void __stdcall RdosDrawString(int handle, int x, int y, const char *str);
+void __stdcall RdosDrawRect(int handle, int x, int y, int width, int height);
+void __stdcall RdosDrawEllipse(int handle, int x, int y, int width, int height);
+int __stdcall RdosCreateBitmap(int BitsPerPixel, int width, int height);
+int __stdcall RdosDuplicateBitmapHandle(int handle);
+void __stdcall RdosCloseBitmap(int handle);
+int __stdcall RdosCreateStringBitmap(int font, const char *str);
+void __stdcall RdosGetBitmapInfo(int handle, int *BitPerPixel, int *width, int *height,
+ int *linesize, void **buffer);
+
+int __stdcall RdosCreateSprite(int DestHandle, int BitmapHandle, int MaskHandle, int lgop);
+void __stdcall RdosCloseSprite(int handle);
+void __stdcall RdosShowSprite(int handle);
+void __stdcall RdosHideSprite(int handle);
+void __stdcall RdosMoveSprite(int handle, int x, int y);
+
+void __stdcall RdosSetForeColor(int color);
+void __stdcall RdosSetBackColor(int color);
+int __stdcall RdosGetMemSize(void *ptr);
+void *__stdcall RdosAllocateMem(int Size);
+void __stdcall RdosFreeMem(void *ptr);
+int __stdcall RdosAppDebug();
+
+int __stdcall RdosOpenCom(int ID, long BaudRate, char Parity, char DataBits, char StopBits, int SendBufSize, int RecBufSize);
+void __stdcall RdosCloseCom(int Handle);
+void __stdcall RdosFlushCom(int Handle);
+char __stdcall RdosReadCom(int Handle);
+int __stdcall RdosWriteCom(int Handle, char Val);
+void __stdcall RdosEnableCts(int Handle);
+void __stdcall RdosDisableCts(int Handle);
+void __stdcall RdosEnableAutoRts(int Handle);
+void __stdcall RdosDisableAutoRts(int Handle);
+void __stdcall RdosSetDtr(int Handle);
+void __stdcall RdosResetDtr(int Handle);
+void __stdcall RdosSetRts(int Handle);
+void __stdcall RdosResetRts(int Handle);
+int __stdcall RdosGetReceiveBufferSpace(int Handle);
+int __stdcall RdosGetSendBufferSpace(int Handle);
+void __stdcall RdosWaitForSendCompletedCom(int Handle);
+
+int __stdcall RdosOpenFile(const char *FileName, char Access);
+int __stdcall RdosCreateFile(const char *FileName, int Attrib);
+void __stdcall RdosCloseFile(int Handle);
+int __stdcall RdosIsDevice(int Handle);
+int __stdcall RdosDuplFile(int Handle);
+long __stdcall RdosGetFileSize(int Handle);
+void __stdcall RdosSetFileSize(int Handle, long Size);
+long __stdcall RdosGetFilePos(int Handle);
+void __stdcall RdosSetFilePos(int Handle, long Pos);
+int __stdcall RdosReadFile(int Handle, void *Buf, int Size);
+int __stdcall RdosWriteFile(int Handle, const void *Buf, int Size);
+void __stdcall RdosGetFileTime(int Handle, unsigned long *MsbTime, unsigned long *LsbTime);
+void __stdcall RdosSetFileTime(int Handle, unsigned long MsbTime, unsigned long LsbTime);
+
+int __stdcall RdosCreateMapping(int Size);
+int __stdcall RdosCreateNamedMapping(const char *Name, int Size);
+int __stdcall RdosCreateNamedFileMapping(const char *Name, int Size, int FileHandle);
+int __stdcall RdosOpenNamedMapping(const char *Name);
+void __stdcall RdosSyncMapping(int Handle);
+void __stdcall RdosCloseMapping(int Handle);
+void __stdcall RdosMapView(int Handle, int Offset, void *Base, int Size);
+void __stdcall RdosUnmapView(int Handle);
+
+int __stdcall RdosSetCurDrive(int Drive);
+int __stdcall RdosGetCurDrive();
+int __stdcall RdosSetCurDir(const char *PathName);
+int __stdcall RdosGetCurDir(int Drive, char *PathName);
+int __stdcall RdosMakeDir(const char *PathName);
+int __stdcall RdosRemoveDir(const char *PathName);
+int __stdcall RdosRenameFile(const char *ToName, const char *FromName);
+int __stdcall RdosDeleteFile(const char *PathName);
+int __stdcall RdosGetFileAttribute(const char *PathName, int *Attribute);
+int __stdcall RdosSetFileAttribute(const char *PathName, int Attribute);
+int __stdcall RdosOpenDir(const char *PathName);
+void __stdcall RdosCloseDir(int Handle);
+int __stdcall RdosReadDir(int Handle, int EntryNr, int MaxNameSize, char *PathName, long *FileSize, int *Attribute, unsigned long *MsbTime, unsigned long *LsbTime);
+
+int __stdcall RdosGetThreadState(int ThreadNr, ThreadState *State);
+int __stdcall RdosSuspendThread(int ThreadNr);
+
+void __stdcall RdosCpuReset();
+void __stdcall RdosGetVersion(int *Major, int *Minor, int *Release);
+void __stdcall RdosCreateThread(void (*Start)(void *Param), const char *Name, void *Param, int StackSize);
+void __stdcall RdosTerminateThread();
+int __stdcall RdosGetThreadHandle();
+int __stdcall RdosExec(const char *prog, const char *param);
+int __stdcall RdosSpawn(const char *prog, const char *param, const char *startdir);
+void __stdcall RdosWaitMilli(int ms);
+void __stdcall RdosGetTics(unsigned long *msb, unsigned long *lsb);
+void __stdcall RdosTicsToRecord(unsigned long msb, unsigned long lsb, int *year, int *month, int *day, int *hour, int *min, int *sec, int *milli);
+void __stdcall RdosRecordToTics(unsigned long *msb, unsigned long *lsb, int year, int month, int day, int hour, int min, int sec, int milli);
+int __stdcall RdosDayOfWeek(int year, int month, int day);
+void __stdcall RdosGetSysTime(int *year, int *month, int *day, int *hour, int *min, int *sec, int *milli);
+void __stdcall RdosGetTime(int *year, int *month, int *day, int *hour, int *min, int *sec, int *milli);
+void __stdcall RdosSetTime(int year, int month, int day, int hour, int min, int sec, int milli);
+void __stdcall RdosAddTics(unsigned long *msb, unsigned long *lsb, long tics);
+void __stdcall RdosAddMilli(unsigned long *msb, unsigned long *lsb, long ms);
+void __stdcall RdosAddSec(unsigned long *msb, unsigned long *lsb, long sec);
+void __stdcall RdosAddMin(unsigned long *msb, unsigned long *lsb, long min);
+void __stdcall RdosAddHour(unsigned long *msb, unsigned long *lsb, long hour);
+void __stdcall RdosAddDay(unsigned long *msb, unsigned long *lsb, long day);
+int __stdcall RdosSyncTime(long IP);
+
+void __stdcall RdosDecodeMsbTics(unsigned long msb, int *days, int *hours);
+void __stdcall RdosDecodeLsbTics(unsigned long lsb, int *min, int *sec, int *milli, int *micro);
+
+int __stdcall RdosCreateSection();
+void __stdcall RdosDeleteSection(int Handle);
+void __stdcall RdosEnterSection(int Handle);
+void __stdcall RdosLeaveSection(int Handle);
+
+int __stdcall RdosCreateWait();
+void __stdcall RdosCloseWait(int Handle);
+void * __stdcall RdosCheckWait(int Handle);
+void * __stdcall RdosWaitForever(int Handle);
+void * __stdcall RdosWaitTimeout(int Handle, int MillSec);
+void __stdcall RdosStopWait(int Handle);
+void __stdcall RdosRemoveWait(int Handle, void *ID);
+void __stdcall RdosAddWaitForKeyboard(int Handle, void *ID);
+void __stdcall RdosAddWaitForMouse(int Handle, void *ID);
+void __stdcall RdosAddWaitForCom(int Handle, int ComHandle, void *ID);
+void __stdcall RdosAddWaitForAdc(int Handle, int AdcHandle, void *ID);
+
+int __stdcall RdosCreateSignal();
+void __stdcall RdosResetSignal(int Handle);
+int __stdcall RdosIsSignalled(int Handle);
+void __stdcall RdosSetSignal(int Handle);
+void __stdcall RdosFreeSignal(int Handle);
+void __stdcall RdosAddWaitForSignal(int Handle, int SignalHandle, void *ID);
+
+long __stdcall RdosGetIp();
+int __stdcall RdosNameToIp(const char *HostName);
+int __stdcall RdosIpToName(int Ip, char *HostName, int MaxSize);
+
+int __stdcall RdosCreateTcpListen(int Port, int MaxConnections, int BufferSize);
+int __stdcall RdosGetTcpListen(int Handle);
+void __stdcall RdosCloseTcpListen(int Handle);
+void __stdcall RdosAddWaitForTcpListen(int Handle, int ConHandle, void *ID);
+
+int __stdcall RdosOpenTcpConnection(int RemoteIp, int LocalPort, int RemotePort, int Timeout, int BufferSize);
+int __stdcall RdosWaitForTcpConnection(int Handle, long Timeout);
+void __stdcall RdosAddWaitForTcpConnection(int Handle, int ConHandle, void *ID);
+void __stdcall RdosCloseTcpConnection(int Handle);
+void __stdcall RdosDeleteTcpConnection(int Handle);
+void __stdcall RdosAbortTcpConnection(int Handle);
+void __stdcall RdosPushTcpConnection(int Handle);
+int __stdcall RdosIsTcpConnectionClosed(int Handle);
+long __stdcall RdosGetRemoteTcpConnectionIP(int Handle);
+int __stdcall RdosGetRemoteTcpConnectionPort(int Handle);
+int __stdcall RdosGetLocalTcpConnectionPort(int Handle);
+int __stdcall RdosReadTcpConnection(int Handle, void *Buf, int Size);
+int __stdcall RdosWriteTcpConnection(int Handle, const void *Buf, int Size);
+int __stdcall RdosPollTcpConnection(int Handle);
+
+int __stdcall RdosGetLocalMailslot(const char *Name);
+int __stdcall RdosGetRemoteMailslot(long Ip, const char *Name);
+void __stdcall RdosFreeMailslot(int Handle);
+int __stdcall RdosSendMailslot(int Handle, const void *Msg, int Size, void *ReplyBuf, int MaxReplySize);
+
+void __stdcall RdosDefineMailslot(const char *Name, int MaxSize);
+int __stdcall RdosReceiveMailslot(void *Msg);
+void __stdcall RdosReplyMailslot(const void *Msg, int Size);
+
+void __stdcall RdosSetFocus(char FocusKey);
+char __stdcall RdosGetFocus();
+
+void __stdcall RdosClearKeyboard();
+int __stdcall RdosPollKeyboard();
+int __stdcall RdosReadKeyboard();
+int __stdcall RdosGetKeyboardState();
+int __stdcall RdosPutKeyboard(int KeyCode, int VirtualKey, int ScanCode);
+int __stdcall RdosPeekKeyEvent(int *ExtKey, int *KeyState, int *VirtualKey, int *ScanCode);
+int __stdcall RdosReadKeyEvent(int *ExtKey, int *KeyState, int *VirtualKey, int *ScanCode);
+
+void __stdcall RdosHideMouse();
+void __stdcall RdosShowMouse();
+void __stdcall RdosGetMousePosition(int *x, int *y);
+void __stdcall RdosSetMousePosition(int x, int y);
+void __stdcall RdosSetMouseWindow(int StartX, int StartY, int EndX, int EndY);
+void __stdcall RdosSetMouseMickey(int x, int y);
+int __stdcall RdosGetLeftButton();
+int __stdcall RdosGetRightButton();
+void __stdcall RdosGetLeftButtonPressPosition(int *x, int *y);
+void __stdcall RdosGetRightButtonPressPosition(int *x, int *y);
+void __stdcall RdosGetLeftButtonReleasePosition(int *x, int *y);
+void __stdcall RdosGetRightButtonReleasePosition(int *x, int *y);
+
+void __stdcall RdosGetCursorPosition(int *Row, int *Col);
+void __stdcall RdosSetCursorPosition(int Row, int Col);
+void __stdcall RdosWriteChar(char ch);
+void __stdcall RdosWriteSizeString(const char *Buf, int Size);
+void __stdcall RdosWriteString(const char *Buf);
+int __stdcall RdosReadLine(char *Buf, int MaxSize);
+
+int __stdcall RdosPing(long Node, long Timeout);
+
+int __stdcall RdosGetIdeDisc(int UnitNr);
+int __stdcall RdosGetFloppyDisc(int UnitNr);
+
+int __stdcall RdosSetDiscInfo(int DiscNr, int SectorSize, long Sectors, int BiosSectorsPerCyl, int BiosHeads);
+int __stdcall RdosGetDiscInfo(int DiscNr, int *SectorSize, long *Sectors, int *BiosSectorsPerCyl, int *BiosHeads);
+int __stdcall RdosReadDisc(int DiscNr, long Sector, char *Buf, int Size);
+int __stdcall RdosWriteDisc(int DiscNr, long Sector, const char *Buf, int Size);
+
+void __stdcall RdosGetRdfsInfo(void *CryptTab, void *KeyTab, void *ExtentSizeTab);
+void __stdcall RdosDemandLoadDrive(int DriveNr);
+int __stdcall RdosFormatDrive(int DiscNr, long StartSector, int Size, const char *FsName);
+
+int __stdcall RdosAllocateFixedDrive(int DriveNr);
+int __stdcall RdosAllocateStaticDrive();
+int __stdcall RdosAllocateDynamicDrive();
+
+int __stdcall RdosGetDriveInfo(int DriveNr, long *FreeUnits, int *BytesPerUnit, long *TotalUnits);
+int __stdcall RdosGetDriveDiscParam(int DriveNr, int *DiscNr, long *StartSector, long *TotalSectors);
+
+int __stdcall RdosCreateFileDrive(int Drive, long Size, const char *FsName, const char *FileName);
+int __stdcall RdosOpenFileDrive(int Drive, const char *FileName);
+
+int __stdcall RdosGetModuleHandle();
+const char * __stdcall RdosGetExeName();
+int __stdcall RdosLoadDll(const char *Name);
+void __stdcall RdosFreeDll(int handle);
+int __stdcall RdosReadResource(int handle, int ID, char *Buf, int Size);
+int __stdcall RdosReadBinaryResource(int handle, int ID, char *Buf, int Size);
+
+int __stdcall RdosOpenAdc(int channel);
+void __stdcall RdosCloseAdc(int handle);
+void __stdcall RdosDefineAdcTime(int handle, unsigned long msg, unsigned long lsb);
+long __stdcall RdosReadAdc(int handle);
+
+int __stdcall RdosReadSerialLines(int device, int *val);
+int __stdcall RdosToggleSerialLine(int device, int line);
+int __stdcall RdosReadSerialVal(int device, int line, int *val);
+int __stdcall RdosWriteSerialVal(int device, int line, int val);
+int __stdcall RdosReadSerialRaw(int device, int line, int *val);
+int __stdcall RdosWriteSerialRaw(int device, int line, int val);
+
+int __stdcall RdosOpenSysEnv();
+int __stdcall RdosOpenProcessEnv();
+void __stdcall RdosCloseEnv(int handle);
+void __stdcall RdosAddEnvVar(int handle, const char *var, const char *value);
+void __stdcall RdosDeleteEnvVar(int handle, const char *var);
+int __stdcall RdosFindEnvVar(int handle, const char *var, char *value);
+void __stdcall RdosGetEnvData(int handle, char *buf);
+void __stdcall RdosSetEnvData(int handle, const char *buf);
+
+int __stdcall RdosOpenSysIni();
+void __stdcall RdosCloseIni(int handle);
+int __stdcall RdosGotoIniSection(int handle, const char *name);
+int __stdcall RdosRemoveIniSection(int handle);
+int __stdcall RdosReadIni(int handle, const char *var, char *str, int maxsize);
+int __stdcall RdosWriteIni(int handle, const char *var, const char *str);
+int __stdcall RdosDeleteIni(int handle, const char *var);
+
+void __stdcall RdosEnableStatusLED();
+void __stdcall RdosDisableStatusLED();
+
+void __stdcall RdosStartWatchdog(int timeout);
+void __stdcall RdosKickWatchdog();
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
+
+
+
diff --git a/newlib/libc/sys/rdos/read.c b/newlib/libc/sys/rdos/read.c
index e9f3464f3..61841ffdb 100644
--- a/newlib/libc/sys/rdos/read.c
+++ b/newlib/libc/sys/rdos/read.c
@@ -1,35 +1,35 @@
-/*#######################################################################
-# RDOS operating system
-# Copyright (C) 1988-2006, Leif Ekblad
-#
-# This library is free software; you can redistribute it and/or modify
-# it under the terms of the GNU Lesser General Public License as published
-# by the Free Software Foundation; either version 2.1 of the License, or
-# (at your option) any later version.
-#
-# This library is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-#
-# The author of this program may be contacted at leif@rdos.net
-#
-# read.c
-# read function implementation
-#
-##########################################################################*/
-
-#include "config.h"
-#include <_ansi.h>
-#include <_syslist.h>
-#include <errno.h>
-#include "rdos.h"
-
-int read(int file, char *ptr, int len)
-{
- return RdosReadFile(file, ptr, len);
-}
+/*#######################################################################
+# RDOS operating system
+# Copyright (C) 1988-2006, Leif Ekblad
+#
+# This library is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License as published
+# by the Free Software Foundation; either version 2.1 of the License, or
+# (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+#
+# The author of this program may be contacted at leif@rdos.net
+#
+# read.c
+# read function implementation
+#
+##########################################################################*/
+
+#include "config.h"
+#include <_ansi.h>
+#include <_syslist.h>
+#include <errno.h>
+#include "rdos.h"
+
+int read(int file, char *ptr, int len)
+{
+ return RdosReadFile(file, ptr, len);
+}
diff --git a/newlib/libc/sys/rdos/readlink.c b/newlib/libc/sys/rdos/readlink.c
index ad4c69d1c..9922f4401 100755
--- a/newlib/libc/sys/rdos/readlink.c
+++ b/newlib/libc/sys/rdos/readlink.c
@@ -1,11 +1,11 @@
-#include "config.h"
-#include <_ansi.h>
-#include <_syslist.h>
-#include <errno.h>
-#include <sys/types.h>
-
-int readlink(const char *path, char *buf, size_t bufsize)
-{
- errno = ENOSYS;
- return -1;
-}
+#include "config.h"
+#include <_ansi.h>
+#include <_syslist.h>
+#include <errno.h>
+#include <sys/types.h>
+
+int readlink(const char *__restrict path, char *__restrict buf, size_t bufsize)
+{
+ errno = ENOSYS;
+ return -1;
+}
diff --git a/newlib/libc/sys/rdos/sbrk.c b/newlib/libc/sys/rdos/sbrk.c
index fdcb5fba5..3fd8fcd59 100644
--- a/newlib/libc/sys/rdos/sbrk.c
+++ b/newlib/libc/sys/rdos/sbrk.c
@@ -1,33 +1,33 @@
-/*#######################################################################
-# RDOS operating system
-# Copyright (C) 1988-2006, Leif Ekblad
-#
-# This library is free software; you can redistribute it and/or modify
-# it under the terms of the GNU Lesser General Public License as published
-# by the Free Software Foundation; either version 2.1 of the License, or
-# (at your option) any later version.
-#
-# This library is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-#
-# The author of this program may be contacted at leif@rdos.net
-#
-# sbrk.c
-# sbrk function implementation
-#
-##########################################################################*/
-
-#include "config.h"
-#include <_syslist.h>
-#include "rdos.h"
-
-void *sbrk (int incr)
-{
- return RdosAllocateMem(incr);
-}
+/*#######################################################################
+# RDOS operating system
+# Copyright (C) 1988-2006, Leif Ekblad
+#
+# This library is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License as published
+# by the Free Software Foundation; either version 2.1 of the License, or
+# (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+#
+# The author of this program may be contacted at leif@rdos.net
+#
+# sbrk.c
+# sbrk function implementation
+#
+##########################################################################*/
+
+#include "config.h"
+#include <_syslist.h>
+#include "rdos.h"
+
+void *sbrk (int incr)
+{
+ return RdosAllocateMem(incr);
+}
diff --git a/newlib/libc/sys/rdos/stat.c b/newlib/libc/sys/rdos/stat.c
index f1683b63a..6483f2aff 100755
--- a/newlib/libc/sys/rdos/stat.c
+++ b/newlib/libc/sys/rdos/stat.c
@@ -1,12 +1,12 @@
-#include "config.h"
-#include <_ansi.h>
-#include <_syslist.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <errno.h>
-
-int stat(const char *file, struct stat *st)
-{
- errno = ENOSYS;
- return -1;
-}
+#include "config.h"
+#include <_ansi.h>
+#include <_syslist.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <errno.h>
+
+int stat(const char *__restrict file, struct stat *__restrict st)
+{
+ errno = ENOSYS;
+ return -1;
+}
diff --git a/newlib/libc/sys/rdos/symlink.c b/newlib/libc/sys/rdos/symlink.c
index 4d5fa1e6f..60f371973 100755
--- a/newlib/libc/sys/rdos/symlink.c
+++ b/newlib/libc/sys/rdos/symlink.c
@@ -1,10 +1,10 @@
-#include "config.h"
-#include <_ansi.h>
-#include <_syslist.h>
-#include <errno.h>
-
-int symlink(const char *path1, const char *path2)
-{
- errno = ENOSYS;
- return -1;
-}
+#include "config.h"
+#include <_ansi.h>
+#include <_syslist.h>
+#include <errno.h>
+
+int symlink(const char *path1, const char *path2)
+{
+ errno = ENOSYS;
+ return -1;
+}
diff --git a/newlib/libc/sys/rdos/times.c b/newlib/libc/sys/rdos/times.c
index 47a540b23..b0ba90030 100644
--- a/newlib/libc/sys/rdos/times.c
+++ b/newlib/libc/sys/rdos/times.c
@@ -1,11 +1,11 @@
-#include "config.h"
-#include <_ansi.h>
-#include <_syslist.h>
-#include <sys/times.h>
-#include <errno.h>
-
-clock_t times(struct tms *buf)
-{
- errno = ENOSYS;
- return -1;
-}
+#include "config.h"
+#include <_ansi.h>
+#include <_syslist.h>
+#include <sys/times.h>
+#include <errno.h>
+
+clock_t times(struct tms *buf)
+{
+ errno = ENOSYS;
+ return -1;
+}
diff --git a/newlib/libc/sys/rdos/unlink.c b/newlib/libc/sys/rdos/unlink.c
index d6c3736b3..793631b6c 100644
--- a/newlib/libc/sys/rdos/unlink.c
+++ b/newlib/libc/sys/rdos/unlink.c
@@ -1,10 +1,10 @@
-#include "config.h"
-#include <_ansi.h>
-#include <_syslist.h>
-#include <errno.h>
-
-int unlink(char *name)
-{
- errno = ENOSYS;
- return -1;
-}
+#include "config.h"
+#include <_ansi.h>
+#include <_syslist.h>
+#include <errno.h>
+
+int unlink(char *name)
+{
+ errno = ENOSYS;
+ return -1;
+}
diff --git a/newlib/libc/sys/rdos/wait.c b/newlib/libc/sys/rdos/wait.c
index a7bc8aab5..80f408845 100644
--- a/newlib/libc/sys/rdos/wait.c
+++ b/newlib/libc/sys/rdos/wait.c
@@ -1,10 +1,10 @@
-#include "config.h"
-#include <_ansi.h>
-#include <_syslist.h>
-#include <errno.h>
-
-int wait(int *status)
-{
- errno = ENOSYS;
- return -1;
-}
+#include "config.h"
+#include <_ansi.h>
+#include <_syslist.h>
+#include <errno.h>
+
+int wait(int *status)
+{
+ errno = ENOSYS;
+ return -1;
+}
diff --git a/newlib/libc/sys/rdos/write.c b/newlib/libc/sys/rdos/write.c
index d02faec29..3dfe78631 100644
--- a/newlib/libc/sys/rdos/write.c
+++ b/newlib/libc/sys/rdos/write.c
@@ -1,35 +1,35 @@
-/*#######################################################################
-# RDOS operating system
-# Copyright (C) 1988-2006, Leif Ekblad
-#
-# This library is free software; you can redistribute it and/or modify
-# it under the terms of the GNU Lesser General Public License as published
-# by the Free Software Foundation; either version 2.1 of the License, or
-# (at your option) any later version.
-#
-# This library is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-#
-# The author of this program may be contacted at leif@rdos.net
-#
-# write.c
-# write function implementation
-#
-##########################################################################*/
-
-#include "config.h"
-#include <_ansi.h>
-#include <_syslist.h>
-#include <errno.h>
-#include "rdos.h"
-
-int write(int file, char *ptr, int len)
-{
- return RdosWriteFile(file, ptr, len);
-}
+/*#######################################################################
+# RDOS operating system
+# Copyright (C) 1988-2006, Leif Ekblad
+#
+# This library is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License as published
+# by the Free Software Foundation; either version 2.1 of the License, or
+# (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+#
+# The author of this program may be contacted at leif@rdos.net
+#
+# write.c
+# write function implementation
+#
+##########################################################################*/
+
+#include "config.h"
+#include <_ansi.h>
+#include <_syslist.h>
+#include <errno.h>
+#include "rdos.h"
+
+int write(int file, char *ptr, int len)
+{
+ return RdosWriteFile(file, ptr, len);
+}
diff --git a/newlib/libc/sys/rtems/Makefile.am b/newlib/libc/sys/rtems/Makefile.am
index c516c9b79..e6febfee4 100644
--- a/newlib/libc/sys/rtems/Makefile.am
+++ b/newlib/libc/sys/rtems/Makefile.am
@@ -8,7 +8,7 @@ AM_CCASFLAGS = $(INCLUDES)
noinst_LIBRARIES = lib.a
-lib_a_SOURCES = dummysys.c
+lib_a_SOURCES = dummysys.c cpusetalloc.c cpusetfree.c
lib_a_CCASFLAGS = $(AM_CCASFLAGS)
lib_a_CFLAGS = $(AM_CFLAGS)
diff --git a/newlib/libc/sys/rtems/Makefile.in b/newlib/libc/sys/rtems/Makefile.in
index f819fe151..13dffd476 100644
--- a/newlib/libc/sys/rtems/Makefile.in
+++ b/newlib/libc/sys/rtems/Makefile.in
@@ -69,7 +69,8 @@ LIBRARIES = $(noinst_LIBRARIES)
ARFLAGS = cru
lib_a_AR = $(AR) $(ARFLAGS)
lib_a_LIBADD =
-am_lib_a_OBJECTS = lib_a-dummysys.$(OBJEXT)
+am_lib_a_OBJECTS = lib_a-dummysys.$(OBJEXT) \
+ lib_a-cpusetalloc.$(OBJEXT) lib_a-cpusetfree.$(OBJEXT)
lib_a_OBJECTS = $(am_lib_a_OBJECTS)
DEFAULT_INCLUDES = -I.@am__isrc@
depcomp =
@@ -193,7 +194,7 @@ AUTOMAKE_OPTIONS = cygnus
INCLUDES = $(NEWLIB_CFLAGS) $(CROSS_CFLAGS) $(TARGET_CFLAGS)
AM_CCASFLAGS = $(INCLUDES)
noinst_LIBRARIES = lib.a
-lib_a_SOURCES = dummysys.c
+lib_a_SOURCES = dummysys.c cpusetalloc.c cpusetfree.c
lib_a_CCASFLAGS = $(AM_CCASFLAGS)
lib_a_CFLAGS = $(AM_CFLAGS)
ACLOCAL_AMFLAGS = -I ../../.. -I ../../../..
@@ -262,6 +263,18 @@ lib_a-dummysys.o: dummysys.c
lib_a-dummysys.obj: dummysys.c
$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-dummysys.obj `if test -f 'dummysys.c'; then $(CYGPATH_W) 'dummysys.c'; else $(CYGPATH_W) '$(srcdir)/dummysys.c'; fi`
+lib_a-cpusetalloc.o: cpusetalloc.c
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-cpusetalloc.o `test -f 'cpusetalloc.c' || echo '$(srcdir)/'`cpusetalloc.c
+
+lib_a-cpusetalloc.obj: cpusetalloc.c
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-cpusetalloc.obj `if test -f 'cpusetalloc.c'; then $(CYGPATH_W) 'cpusetalloc.c'; else $(CYGPATH_W) '$(srcdir)/cpusetalloc.c'; fi`
+
+lib_a-cpusetfree.o: cpusetfree.c
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-cpusetfree.o `test -f 'cpusetfree.c' || echo '$(srcdir)/'`cpusetfree.c
+
+lib_a-cpusetfree.obj: cpusetfree.c
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-cpusetfree.obj `if test -f 'cpusetfree.c'; then $(CYGPATH_W) 'cpusetfree.c'; else $(CYGPATH_W) '$(srcdir)/cpusetfree.c'; fi`
+
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
diff --git a/newlib/libc/sys/rtems/configure b/newlib/libc/sys/rtems/configure
index ccb25eceb..968468a37 100755
--- a/newlib/libc/sys/rtems/configure
+++ b/newlib/libc/sys/rtems/configure
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.68 for newlib 2.0.0.
+# Generated by GNU Autoconf 2.68 for newlib 2.4.0.
#
#
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
@@ -556,8 +556,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='newlib'
PACKAGE_TARNAME='newlib'
-PACKAGE_VERSION='2.0.0'
-PACKAGE_STRING='newlib 2.0.0'
+PACKAGE_VERSION='2.4.0'
+PACKAGE_STRING='newlib 2.4.0'
PACKAGE_BUGREPORT=''
PACKAGE_URL=''
@@ -1239,7 +1239,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures newlib 2.0.0 to adapt to many kinds of systems.
+\`configure' configures newlib 2.4.0 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1309,7 +1309,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of newlib 2.0.0:";;
+ short | recursive ) echo "Configuration of newlib 2.4.0:";;
esac
cat <<\_ACEOF
@@ -1400,7 +1400,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-newlib configure 2.0.0
+newlib configure 2.4.0
generated by GNU Autoconf 2.68
Copyright (C) 2010 Free Software Foundation, Inc.
@@ -1455,7 +1455,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by newlib $as_me 2.0.0, which was
+It was created by newlib $as_me 2.4.0, which was
generated by GNU Autoconf 2.68. Invocation command line was
$ $0 $@
@@ -2527,7 +2527,7 @@ fi
# Define the identity of the package.
PACKAGE='newlib'
- VERSION='2.0.0'
+ VERSION='2.4.0'
# Some tools Automake needs.
@@ -4007,7 +4007,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by newlib $as_me 2.0.0, which was
+This file was extended by newlib $as_me 2.4.0, which was
generated by GNU Autoconf 2.68. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -4064,7 +4064,7 @@ _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
-newlib config.status 2.0.0
+newlib config.status 2.4.0
configured by $0, generated by GNU Autoconf 2.68,
with options \\"\$ac_cs_config\\"
diff --git a/newlib/libc/sys/rtems/cpusetalloc.c b/newlib/libc/sys/rtems/cpusetalloc.c
new file mode 100644
index 000000000..e2b198505
--- /dev/null
+++ b/newlib/libc/sys/rtems/cpusetalloc.c
@@ -0,0 +1,38 @@
+/*
+ * Copyright (c) 2013 embedded brains GmbH. All rights reserved.
+ *
+ * embedded brains GmbH
+ * Dornierstr. 4
+ * 82178 Puchheim
+ * Germany
+ * <rtems@embedded-brains.de>
+ *
+ * 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 <sys/cpuset.h>
+#include <stdlib.h>
+
+cpu_set_t *__cpuset_alloc(int num_cpus)
+{
+ return (cpu_set_t *)malloc(CPU_ALLOC_SIZE(num_cpus));
+}
diff --git a/newlib/libc/sys/rtems/cpusetfree.c b/newlib/libc/sys/rtems/cpusetfree.c
new file mode 100644
index 000000000..a94a9405d
--- /dev/null
+++ b/newlib/libc/sys/rtems/cpusetfree.c
@@ -0,0 +1,38 @@
+/*
+ * Copyright (c) 2013 embedded brains GmbH. All rights reserved.
+ *
+ * embedded brains GmbH
+ * Dornierstr. 4
+ * 82178 Puchheim
+ * Germany
+ * <rtems@embedded-brains.de>
+ *
+ * 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 <sys/cpuset.h>
+#include <stdlib.h>
+
+void __cpuset_free(cpu_set_t *set)
+{
+ free(set);
+}
diff --git a/newlib/libc/sys/rtems/crt0.c b/newlib/libc/sys/rtems/crt0.c
index e47d933f6..1a0a055c6 100644
--- a/newlib/libc/sys/rtems/crt0.c
+++ b/newlib/libc/sys/rtems/crt0.c
@@ -15,6 +15,9 @@
#include <signal.h> /* sigset_t */
#include <time.h> /* struct timespec */
#include <unistd.h> /* isatty */
+#include <sys/lock.h> /* _Mutex_recursive_Control */
+#include <machine/_arc4random.h>
+#include <machine/_libatomic.h>
void rtems_provides_crt0( void ) {} /* dummy symbol so file always has one */
@@ -27,6 +30,46 @@ RTEMS_STUB(void *,malloc(size_t s), { return 0; })
RTEMS_STUB(void *,realloc(void* p, size_t s), { return 0; })
RTEMS_STUB(void, free(void* ptr), { })
RTEMS_STUB(_PTR, calloc(size_t s1, size_t s2), { return 0; })
+RTEMS_STUB(int, posix_memalign(void **p, size_t si, size_t s2), { return -1; })
+
+/* Stubs for routines from RTEMS <sys/lock.h> */
+RTEMS_STUB(void, _Mutex_Acquire(struct _Mutex_Control *p), { })
+RTEMS_STUB(int, _Mutex_Acquire_timed(struct _Mutex_Control *p1, const struct timespec *p2), { return -1; })
+RTEMS_STUB(int, _Mutex_Try_Acquire(struct _Mutex_Control *p), { return -1; })
+RTEMS_STUB(void, _Mutex_Release(struct _Mutex_Control *p), { })
+
+RTEMS_STUB(void, _Mutex_recursive_Acquire(struct _Mutex_recursive_Control *p), { })
+RTEMS_STUB(int, _Mutex_recursive_Acquire_timed(struct _Mutex_recursive_Control *p1, const struct timespec *p2), { return -1; })
+RTEMS_STUB(int, _Mutex_recursive_Try_acquire(struct _Mutex_recursive_Control *p), { return -1; })
+RTEMS_STUB(void, _Mutex_recursive_Release(struct _Mutex_recursive_Control *p), { })
+
+RTEMS_STUB(void, _Condition_Wait(struct _Condition_Control *p1, struct _Mutex_Control *p2), { })
+RTEMS_STUB(int, _Condition_Wait_timed(struct _Condition_Control *p1, struct _Mutex_Control *p2, const struct timespec *p3), { return -1; })
+RTEMS_STUB(void, _Condition_Wait_recursive(struct _Condition_Control *p1, struct _Mutex_recursive_Control *p2), { })
+RTEMS_STUB(int, _Condition_Wait_recursive_timed(struct _Condition_Control *p1, struct _Mutex_recursive_Control *p2, const struct timespec *p3), { return -1; })
+RTEMS_STUB(void, _Condition_Signal(struct _Condition_Control *p), { })
+RTEMS_STUB(void, _Condition_Broadcast(struct _Condition_Control *p), { })
+
+RTEMS_STUB(void, _Semaphore_Wait(struct _Semaphore_Control *p), { })
+RTEMS_STUB(void, _Semaphore_Post(struct _Semaphore_Control *p), { })
+
+RTEMS_STUB(int, _Futex_Wait(struct _Futex_Control *p1, int *p2, int i), { return -1; })
+RTEMS_STUB(int, _Futex_Wake(struct _Futex_Control *p, int i), { return -1; })
+
+RTEMS_STUB(int, _Sched_Count(void), { return -1; })
+RTEMS_STUB(int, _Sched_Index(void), { return -1; })
+RTEMS_STUB(int, _Sched_Name_to_index(const char *p, size_t s), { return -1; })
+RTEMS_STUB(int, _Sched_Processor_count(int i), { return 1; })
+
+/* Stubs for routines from RTEMS <machine/_libatomic.h> */
+RTEMS_STUB(__uint32_t, _Libatomic_Protect_start(void *ptr), { return 0; });
+RTEMS_STUB(void, _Libatomic_Protect_end(void *ptr, __uint32_t isr_level), { });
+RTEMS_STUB(void, _Libatomic_Lock_n(void *ptr, __size_t n), { });
+RTEMS_STUB(void, _Libatomic_Unlock_n(void *ptr, __size_t n), { });
+
+/* Stubs for routines for arc4random (from <unistd.h> and <machine/_arc4random.h> */
+RTEMS_STUB(int, getentropy(void *ptr, __size_t n), { });
+RTEMS_STUB(void, _arc4random_getentropy_fail(void), { });
#if defined(__GNUC__)
/*
@@ -59,7 +102,7 @@ RTEMS_STUB(pid_t, fork(void), { return -1; })
RTEMS_STUB(int, fstat(int fd, struct stat *buf), { return -1; })
RTEMS_STUB(int, getdents(int fd, void *dp, int count), { return -1; })
RTEMS_STUB(char *, getlogin(void), { return 0; })
-RTEMS_STUB(int, gettimeofday(struct timeval *tv, struct timezone *tz), { return -1; })
+RTEMS_STUB(int, gettimeofday(struct timeval *__restrict tv, struct timezone *__restrict tz), { return -1; })
RTEMS_STUB(struct passwd *, getpwnam(const char *name), { return 0; })
RTEMS_STUB(struct passwd *, getpwuid(uid_t uid), { return 0; })
RTEMS_STUB(uid_t, getuid(void), { return 0; })
diff --git a/newlib/libc/sys/rtems/include/limits.h b/newlib/libc/sys/rtems/include/limits.h
index 43ede04e6..ac00e0c50 100644
--- a/newlib/libc/sys/rtems/include/limits.h
+++ b/newlib/libc/sys/rtems/include/limits.h
@@ -32,6 +32,7 @@
#define _POSIX_ARG_MAX 4096
#define _POSIX_CHILD_MAX 6
#define _POSIX_DELAYTIMER_MAX 32
+#define _POSIX_HOST_NAME_MAX 255
#define _POSIX_LINK_MAX 8
#define _POSIX_MAX_CANON 255
#define _POSIX_MAX_INPUT 255
@@ -65,7 +66,7 @@
#define DELAYTIMER_MAX 32
#define MQ_OPEN_MAX 8
#define MQ_PRIO_MAX 32
-#define PAGESIZE 1
+#define PAGESIZE (1<<12)
#define RTSIG_MAX 8
#define SEM_NSEMS_MAX 256
#define SEM_VALUE_MAX 32767
diff --git a/newlib/libc/sys/rtems/include/machine/_arc4random.h b/newlib/libc/sys/rtems/include/machine/_arc4random.h
new file mode 100644
index 000000000..7ef296899
--- /dev/null
+++ b/newlib/libc/sys/rtems/include/machine/_arc4random.h
@@ -0,0 +1,35 @@
+/*-
+ * Copyright (c) 2016 embedded brains GmbH
+ * 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 <sys/cdefs.h>
+
+__BEGIN_DECLS
+
+void _arc4random_getentropy_fail(void);
+
+#define _ARC4RANDOM_GETENTROPY_FAIL() _arc4random_getentropy_fail()
+
+__END_DECLS
diff --git a/newlib/libc/sys/rtems/include/machine/_libatomic.h b/newlib/libc/sys/rtems/include/machine/_libatomic.h
new file mode 100644
index 000000000..3456440a2
--- /dev/null
+++ b/newlib/libc/sys/rtems/include/machine/_libatomic.h
@@ -0,0 +1,46 @@
+/*-
+ * Copyright (c) 2016 embedded brains GmbH
+ * 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.
+ */
+
+/*
+ * The libatomic is a part of GCC. It provides library support for C11/C++11
+ * atomic operations. This file defines the interface to the operating system
+ * for the RTEMS configuration of libatomic.
+ */
+
+#include <sys/cdefs.h>
+#include <sys/_types.h>
+
+__BEGIN_DECLS
+
+__uint32_t _Libatomic_Protect_start(void *);
+
+void _Libatomic_Protect_end(void *, __uint32_t);
+
+void _Libatomic_Lock_n(void *, __size_t);
+
+void _Libatomic_Unlock_n(void *, __size_t);
+
+__END_DECLS
diff --git a/newlib/libc/sys/rtems/include/machine/_threads.h b/newlib/libc/sys/rtems/include/machine/_threads.h
new file mode 100644
index 000000000..24db21c0e
--- /dev/null
+++ b/newlib/libc/sys/rtems/include/machine/_threads.h
@@ -0,0 +1,54 @@
+/*
+ * Copyright (c) 2015 embedded brains GmbH. 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 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.
+ */
+
+#ifndef _MACHINE__THREADS_H_
+#define _MACHINE__THREADS_H_
+
+#include <machine/_default_types.h>
+#include <sys/lock.h>
+
+typedef struct _Condition_Control cnd_t;
+
+typedef struct _Mutex_recursive_Control mtx_t;
+
+/* pthread_t */
+typedef __uint32_t thrd_t;
+
+/* pthread_key_t */
+typedef __uint32_t tss_t;
+
+/* pthread_once_t */
+typedef struct {
+ int _is_initialized;
+ int _init_executed;
+} once_flag;
+
+/* PTHREAD_ONCE_INIT */
+#define ONCE_FLAG_INIT { 1, 0 }
+
+/* PTHREAD_DESTRUCTOR_ITERATIONS */
+#define TSS_DTOR_ITERATIONS 4
+
+#endif /* _MACHINE__THREADS_H_ */
diff --git a/newlib/libc/sys/rtems/include/machine/_time.h b/newlib/libc/sys/rtems/include/machine/_time.h
new file mode 100644
index 000000000..44a220d92
--- /dev/null
+++ b/newlib/libc/sys/rtems/include/machine/_time.h
@@ -0,0 +1,199 @@
+/*-
+ * Copyright (c) 1982, 1986, 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.
+ * 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.
+ *
+ * @(#)time.h 8.5 (Berkeley) 5/4/95
+ * $FreeBSD$
+ */
+
+#ifndef _SYS_TIME_H_
+#error "must be included via <sys/time.h>"
+#else /* _SYS_TIME_H_ */
+
+__BEGIN_DECLS
+extern volatile time_t _Timecounter_Time_second;
+extern volatile time_t _Timecounter_Time_uptime;
+extern struct bintime _Timecounter_Boottimebin;
+
+void _Timecounter_Binuptime(struct bintime *);
+void _Timecounter_Nanouptime(struct timespec *);
+void _Timecounter_Microuptime(struct timeval *);
+void _Timecounter_Bintime(struct bintime *);
+void _Timecounter_Nanotime(struct timespec *);
+void _Timecounter_Microtime(struct timeval *);
+void _Timecounter_Getbinuptime(struct bintime *);
+void _Timecounter_Getnanouptime(struct timespec *);
+void _Timecounter_Getmicrouptime(struct timeval *);
+void _Timecounter_Getbintime(struct bintime *);
+void _Timecounter_Getnanotime(struct timespec *);
+void _Timecounter_Getmicrotime(struct timeval *);
+__END_DECLS
+
+#ifdef _KERNEL
+
+/* Operations on timespecs */
+#define timespecclear(tvp) ((tvp)->tv_sec = (tvp)->tv_nsec = 0)
+#define timespecisset(tvp) ((tvp)->tv_sec || (tvp)->tv_nsec)
+#define timespeccmp(tvp, uvp, cmp) \
+ (((tvp)->tv_sec == (uvp)->tv_sec) ? \
+ ((tvp)->tv_nsec cmp (uvp)->tv_nsec) : \
+ ((tvp)->tv_sec cmp (uvp)->tv_sec))
+#define timespecadd(vvp, uvp) \
+ do { \
+ (vvp)->tv_sec += (uvp)->tv_sec; \
+ (vvp)->tv_nsec += (uvp)->tv_nsec; \
+ if ((vvp)->tv_nsec >= 1000000000) { \
+ (vvp)->tv_sec++; \
+ (vvp)->tv_nsec -= 1000000000; \
+ } \
+ } while (0)
+#define timespecsub(vvp, uvp) \
+ do { \
+ (vvp)->tv_sec -= (uvp)->tv_sec; \
+ (vvp)->tv_nsec -= (uvp)->tv_nsec; \
+ if ((vvp)->tv_nsec < 0) { \
+ (vvp)->tv_sec--; \
+ (vvp)->tv_nsec += 1000000000; \
+ } \
+ } while (0)
+
+/* Operations on timevals. */
+
+#define timevalclear(tvp) ((tvp)->tv_sec = (tvp)->tv_usec = 0)
+#define timevalisset(tvp) ((tvp)->tv_sec || (tvp)->tv_usec)
+#define timevalcmp(tvp, uvp, cmp) \
+ (((tvp)->tv_sec == (uvp)->tv_sec) ? \
+ ((tvp)->tv_usec cmp (uvp)->tv_usec) : \
+ ((tvp)->tv_sec cmp (uvp)->tv_sec))
+
+/* timevaladd and timevalsub are not inlined */
+
+/*
+ * Kernel to clock driver interface.
+ */
+void inittodr(time_t base);
+void resettodr(void);
+
+#define time_second _Timecounter_Time_second
+#define time_uptime _Timecounter_Time_uptime
+#define boottimebin _Timecounter_Boottimebin
+extern struct timeval boottime;
+extern struct bintime tc_tick_bt;
+extern sbintime_t tc_tick_sbt;
+extern struct bintime tick_bt;
+extern sbintime_t tick_sbt;
+extern int tc_precexp;
+extern int tc_timepercentage;
+extern struct bintime bt_timethreshold;
+extern struct bintime bt_tickthreshold;
+extern sbintime_t sbt_timethreshold;
+extern sbintime_t sbt_tickthreshold;
+
+/*
+ * Functions for looking at our clock: [get]{bin,nano,micro}[up]time()
+ *
+ * Functions without the "get" prefix returns the best timestamp
+ * we can produce in the given format.
+ *
+ * "bin" == struct bintime == seconds + 64 bit fraction of seconds.
+ * "nano" == struct timespec == seconds + nanoseconds.
+ * "micro" == struct timeval == seconds + microseconds.
+ *
+ * Functions containing "up" returns time relative to boot and
+ * should be used for calculating time intervals.
+ *
+ * Functions without "up" returns UTC time.
+ *
+ * Functions with the "get" prefix returns a less precise result
+ * much faster than the functions without "get" prefix and should
+ * be used where a precision of 1/hz seconds is acceptable or where
+ * performance is priority. (NB: "precision", _not_ "resolution" !)
+ */
+
+#define binuptime(_bt) _Timecounter_Binuptime(_bt)
+#define nanouptime(_tsp) _Timecounter_Nanouptime(_tsp)
+#define microuptime(_tvp) _Timecounter_Microuptime(_tvp)
+
+static __inline sbintime_t
+sbinuptime(void)
+{
+ struct bintime _bt;
+
+ binuptime(&_bt);
+ return (bttosbt(_bt));
+}
+
+#define bintime(_bt) _Timecounter_Bintime(_bt)
+#define nanotime(_tsp) _Timecounter_Nanotime(_tsp)
+#define microtime(_tvp) _Timecounter_Microtime(_tvp)
+
+#define getbinuptime(_bt) _Timecounter_Getbinuptime(_bt)
+#define getnanouptime(_tsp) _Timecounter_Getnanouptime(_tsp)
+#define getmicrouptime(_tvp) _Timecounter_Getmicrouptime(_tvp)
+
+static __inline sbintime_t
+getsbinuptime(void)
+{
+ struct bintime _bt;
+
+ getbinuptime(&_bt);
+ return (bttosbt(_bt));
+}
+
+#define getbintime(_bt) _Timecounter_Getbintime(_bt)
+#define getnanotime(_tsp) _Timecounter_Getnanotime(_tsp)
+#define getmicrotime(_tvp) _Timecounter_Getmicrotime(_tvp)
+
+/* Other functions */
+int itimerdecr(struct itimerval *itp, int usec);
+int itimerfix(struct timeval *tv);
+int ppsratecheck(struct timeval *, int *, int);
+int ratecheck(struct timeval *, const struct timeval *);
+void timevaladd(struct timeval *t1, const struct timeval *t2);
+void timevalsub(struct timeval *t1, const struct timeval *t2);
+int tvtohz(struct timeval *tv);
+
+#define TC_DEFAULTPERC 5
+
+#define BT2FREQ(bt) \
+ (((uint64_t)0x8000000000000000 + ((bt)->frac >> 2)) / \
+ ((bt)->frac >> 1))
+
+#define SBT2FREQ(sbt) ((SBT_1S + ((sbt) >> 1)) / (sbt))
+
+#define FREQ2BT(freq, bt) \
+{ \
+ (bt)->sec = 0; \
+ (bt)->frac = ((uint64_t)0x8000000000000000 / (freq)) << 1; \
+}
+
+#define TIMESEL(sbt, sbt2) \
+ (((sbt2) >= sbt_timethreshold) ? \
+ ((*(sbt) = getsbinuptime()), 1) : ((*(sbt) = sbinuptime()), 0))
+
+#endif /* _KERNEL */
+#endif /* _SYS_TIME_H_ */
diff --git a/newlib/libc/sys/rtems/include/machine/_types.h b/newlib/libc/sys/rtems/include/machine/_types.h
new file mode 100644
index 000000000..f003ce9ed
--- /dev/null
+++ b/newlib/libc/sys/rtems/include/machine/_types.h
@@ -0,0 +1,44 @@
+#ifndef _MACHINE__TYPES_H
+#define _MACHINE__TYPES_H
+
+#include <machine/_default_types.h>
+
+typedef __int32_t __blkcnt_t;
+#define __machine_blkcnt_t_defined
+
+typedef __int32_t __blksize_t;
+#define __machine_blksize_t_defined
+
+typedef __uint64_t __dev_t;
+#define __machine_dev_t_defined
+
+#if defined(__arm__) || defined(__i386__) || defined(__m68k__) || defined(__mips__) || defined(__PPC__) || defined(__sparc__)
+typedef __int64_t _off_t;
+#else
+typedef __int32_t _off_t;
+#endif
+#define __machine_off_t_defined
+
+typedef _off_t _fpos_t;
+#define __machine_fpos_t_defined
+
+typedef unsigned long __ino_t;
+#define __machine_ino_t_defined
+
+typedef __uint32_t __mode_t;
+#define __machine_mode_t_defined
+
+typedef int __accmode_t; /* access permissions */
+typedef __uint32_t __fixpt_t; /* fixed point number */
+typedef int __lwpid_t; /* Thread ID (a.k.a. LWP) */
+typedef __int64_t __rlim_t; /* resource limit - intentionally */
+ /* signed, because of legacy code */
+ /* that uses -1 for RLIM_INFINITY */
+
+#ifdef _KERNEL
+typedef int boolean_t;
+typedef struct device *device_t;
+typedef char vm_memattr_t; /* memory attribute codes */
+#endif /* _KERNEL */
+
+#endif /* _MACHINE__TYPES_H */
diff --git a/newlib/libc/sys/rtems/machine/limits.h b/newlib/libc/sys/rtems/include/machine/limits.h
index 5a6ee0337..2b4c47e48 100644
--- a/newlib/libc/sys/rtems/machine/limits.h
+++ b/newlib/libc/sys/rtems/include/machine/limits.h
@@ -3,4 +3,3 @@
*/
/* intentionally empty file */
-
diff --git a/newlib/libc/sys/rtems/machine/param.h b/newlib/libc/sys/rtems/include/machine/param.h
index 74891f504..74891f504 100644
--- a/newlib/libc/sys/rtems/machine/param.h
+++ b/newlib/libc/sys/rtems/include/machine/param.h
diff --git a/newlib/libc/sys/rtems/include/machine/types.h b/newlib/libc/sys/rtems/include/machine/types.h
new file mode 100644
index 000000000..52ff790ea
--- /dev/null
+++ b/newlib/libc/sys/rtems/include/machine/types.h
@@ -0,0 +1,73 @@
+/*-
+ * Copyright (c) 2016 embedded brains GmbH
+ * 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.
+ */
+
+#ifndef _SYS_TYPES_H
+#error "must be included via <sys/types.h>"
+#endif /* !_SYS_TYPES_H */
+
+#if __BSD_VISIBLE
+
+#ifndef _ACCMODE_T_DECLARED
+typedef __accmode_t accmode_t; /* access permissions */
+#define _ACCMODE_T_DECLARED
+#endif
+
+#ifndef _CAP_RIGHTS_T_DECLARED
+#define _CAP_RIGHTS_T_DECLARED
+struct cap_rights;
+
+typedef struct cap_rights cap_rights_t;
+#endif
+
+typedef const char * c_caddr_t; /* core address, pointer to const */
+
+typedef int cpulevel_t;
+typedef int cpusetid_t;
+typedef int cpuwhich_t;
+
+typedef __fixpt_t fixpt_t; /* fixed point number */
+
+#ifndef _LWPID_T_DECLARED
+typedef __lwpid_t lwpid_t; /* Thread ID (a.k.a. LWP) */
+#define _LWPID_T_DECLARED
+#endif
+
+#ifndef _RLIM_T_DECLARED
+typedef __rlim_t rlim_t; /* resource limit */
+#define _RLIM_T_DECLARED
+#endif
+
+typedef __uintptr_t segsz_t; /* segment size (in pages) */
+
+typedef __uintptr_t uintfptr_t;
+
+typedef __intptr_t vm_ooffset_t;
+typedef __uintptr_t vm_offset_t;
+typedef __uintptr_t vm_paddr_t;
+typedef __uintptr_t vm_pindex_t;
+typedef __uintptr_t vm_size_t;
+
+#endif /* __BSD_VISIBLE */
diff --git a/newlib/libc/sys/rtems/include/semaphore.h b/newlib/libc/sys/rtems/include/semaphore.h
new file mode 100644
index 000000000..e3c61da04
--- /dev/null
+++ b/newlib/libc/sys/rtems/include/semaphore.h
@@ -0,0 +1,56 @@
+/*
+ * Copyright (c) 2010 David Xu <davidxu@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 unmodified, 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 ``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 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.
+ *
+ * $FreeBSD$
+ */
+
+/* semaphore.h: POSIX 1003.1b semaphores */
+
+#ifndef _SEMAPHORE_H_
+#define _SEMAPHORE_H_
+
+#include <sys/cdefs.h>
+#include <sys/_types.h>
+#include <sys/_timespec.h>
+
+typedef __uint32_t sem_t;
+
+#define SEM_FAILED ((sem_t *)0)
+
+__BEGIN_DECLS
+int sem_close(sem_t *);
+int sem_destroy(sem_t *);
+int sem_getvalue(sem_t * __restrict, int * __restrict);
+int sem_init(sem_t *, int, unsigned int);
+sem_t *sem_open(const char *, int, ...);
+int sem_post(sem_t *);
+int sem_timedwait(sem_t * __restrict, const struct timespec * __restrict);
+int sem_trywait(sem_t *);
+int sem_unlink(const char *);
+int sem_wait(sem_t *);
+__END_DECLS
+
+#endif /* !_SEMAPHORE_H_ */
diff --git a/newlib/libc/sys/rtems/include/sys/cpuset.h b/newlib/libc/sys/rtems/include/sys/cpuset.h
new file mode 100644
index 000000000..8fae475a8
--- /dev/null
+++ b/newlib/libc/sys/rtems/include/sys/cpuset.h
@@ -0,0 +1,311 @@
+/*
+ * Copyright (c) 2013 On-Line Applications Research Corporation.
+ * All rights reserved.
+ *
+ * On-Line Applications Research Corporation
+ * 7047 Old Madison Pike Suite 320
+ * Huntsville Alabama 35806
+ * <info@oarcorp.com>
+ *
+ * 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.
+ */
+
+/*
+ * This file implements an API compatible with static portion of
+ * the GNU/Linux cpu_set_t macros but is independently implemented.
+ * The GNU/Linux manual page and the FreeBSD cpuset_t implementation
+ * were used as reference material.
+ *
+ * Not implemented:
+ * + Linux CPU_XXX_S
+ * + FreeBSD CPU_SUBSET
+ * + FreeBSD CPU_OVERLAP
+ */
+
+
+#ifndef _SYS_CPUSET_H_
+#define _SYS_CPUSET_H_
+
+#include <sys/cdefs.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif /* __cplusplus */
+
+/* RTEMS supports a maximum of 32 CPU cores */
+#ifndef CPU_SETSIZE
+#define CPU_SETSIZE 32
+#endif
+
+/* word in the cpu set */
+typedef __uint32_t cpu_set_word_t;
+
+/* Number of bits per cpu_set_t element */
+#define _NCPUBITS (sizeof(cpu_set_word_t) * 8)
+
+/* Number of words in the cpu_set_t array */
+#define _NCPUWORDS (((CPU_SETSIZE)+((_NCPUBITS)-1))/(_NCPUBITS))
+
+/* Define the cpu set structure */
+typedef struct _cpuset {
+ cpu_set_word_t __bits[_NCPUWORDS];
+} cpu_set_t;
+
+/* determine the mask for a particular cpu within the element */
+static __inline cpu_set_word_t __cpuset_mask(int cpu)
+{
+ return (cpu_set_word_t)1 << ((size_t)cpu % _NCPUBITS);
+}
+
+/* determine the index for this cpu within the cpu set array */
+static __inline size_t __cpuset_index(int cpu)
+{
+ return (size_t)cpu / _NCPUBITS;
+}
+
+#define CPU_ALLOC_SIZE(_num_cpus) \
+ (sizeof(cpu_set_word_t) * (((_num_cpus) + _NCPUBITS - 1) / _NCPUBITS))
+
+cpu_set_t *__cpuset_alloc(int num_cpus);
+
+static __inline cpu_set_t *CPU_ALLOC(int num_cpus)
+{
+ return __cpuset_alloc(num_cpus);
+}
+
+void __cpuset_free(cpu_set_t *set);
+
+static __inline void CPU_FREE(cpu_set_t *set)
+{
+ __cpuset_free(set);
+}
+
+static __inline void CPU_ZERO_S(size_t setsize, cpu_set_t *set)
+{
+ cpu_set_word_t *w = &set->__bits[0];
+ size_t n = setsize / sizeof(*w);
+ size_t i;
+
+ for (i = 0; i < n; ++i)
+ w[i] = 0;
+}
+
+static __inline void CPU_ZERO(cpu_set_t *set)
+{
+ CPU_ZERO_S(sizeof(*set), set);
+}
+
+static __inline void CPU_FILL_S(size_t setsize, cpu_set_t *set)
+{
+ cpu_set_word_t *w = &set->__bits[0];
+ size_t n = setsize / sizeof(*w);
+ size_t i;
+
+ for (i = 0; i < n; ++i)
+ w[i] = ~(cpu_set_word_t)0;
+}
+
+static __inline void CPU_FILL(cpu_set_t *set)
+{
+ CPU_FILL_S(sizeof(*set), set);
+}
+
+static __inline void CPU_SET_S(int cpu, size_t setsize, cpu_set_t *set)
+{
+ cpu_set_word_t *w = &set->__bits[0];
+
+ w[__cpuset_index(cpu)] |= __cpuset_mask(cpu);
+}
+
+static __inline void CPU_SET(int cpu, cpu_set_t *set)
+{
+ CPU_SET_S(cpu, sizeof(*set), set);
+}
+
+static __inline void CPU_CLR_S(int cpu, size_t setsize, cpu_set_t *set)
+{
+ cpu_set_word_t *w = &set->__bits[0];
+
+ w[__cpuset_index(cpu)] &= ~__cpuset_mask(cpu);
+}
+
+static __inline void CPU_CLR(int cpu, cpu_set_t *set)
+{
+ CPU_CLR_S(cpu, sizeof(*set), set);
+}
+
+static __inline int CPU_ISSET_S(int cpu, size_t setsize, const cpu_set_t *set)
+{
+ const cpu_set_word_t *w = &set->__bits[0];
+
+ return ((w[__cpuset_index(cpu)] & __cpuset_mask(cpu)) != 0);
+}
+
+static __inline int CPU_ISSET(int cpu, const cpu_set_t *set)
+{
+ return CPU_ISSET_S(cpu, sizeof(*set), set);
+}
+
+/* copy src set to dest set */
+static __inline void CPU_COPY( cpu_set_t *dest, const cpu_set_t *src )
+{
+ *dest = *src;
+}
+
+static __inline void CPU_AND_S(size_t setsize, cpu_set_t *destset,
+ const cpu_set_t *srcset1, const cpu_set_t *srcset2)
+{
+ cpu_set_word_t *wdest = &destset->__bits[0];
+ const cpu_set_word_t *wsrc1 = &srcset1->__bits[0];
+ const cpu_set_word_t *wsrc2 = &srcset2->__bits[0];
+ size_t n = setsize / sizeof(*wdest);
+ size_t i;
+
+ for (i = 0; i < n; ++i)
+ wdest[i] = wsrc1[i] & wsrc2[i];
+}
+
+static __inline void CPU_AND(cpu_set_t *destset, const cpu_set_t *srcset1,
+ const cpu_set_t *srcset2)
+{
+ CPU_AND_S(sizeof(*destset), destset, srcset1, srcset2);
+}
+
+static __inline void CPU_OR_S(size_t setsize, cpu_set_t *destset,
+ const cpu_set_t *srcset1, const cpu_set_t *srcset2)
+{
+ cpu_set_word_t *wdest = &destset->__bits[0];
+ const cpu_set_word_t *wsrc1 = &srcset1->__bits[0];
+ const cpu_set_word_t *wsrc2 = &srcset2->__bits[0];
+ size_t n = setsize / sizeof(*wdest);
+ size_t i;
+
+ for (i = 0; i < n; ++i)
+ wdest[i] = wsrc1[i] | wsrc2[i];
+}
+
+static __inline void CPU_OR(cpu_set_t *destset, const cpu_set_t *srcset1,
+ const cpu_set_t *srcset2)
+{
+ CPU_OR_S(sizeof(*destset), destset, srcset1, srcset2);
+}
+
+static __inline void CPU_XOR_S(size_t setsize, cpu_set_t *destset,
+ const cpu_set_t *srcset1, const cpu_set_t *srcset2)
+{
+ cpu_set_word_t *wdest = &destset->__bits[0];
+ const cpu_set_word_t *wsrc1 = &srcset1->__bits[0];
+ const cpu_set_word_t *wsrc2 = &srcset2->__bits[0];
+ size_t n = setsize / sizeof(*wdest);
+ size_t i;
+
+ for (i = 0; i < n; ++i)
+ wdest[i] = wsrc1[i] ^ wsrc2[i];
+}
+
+static __inline void CPU_XOR(cpu_set_t *destset, const cpu_set_t *srcset1,
+ const cpu_set_t *srcset2)
+{
+ CPU_XOR_S(sizeof(*destset), destset, srcset1, srcset2);
+}
+
+static __inline void CPU_NAND_S(size_t setsize, cpu_set_t *destset,
+ const cpu_set_t *srcset1, const cpu_set_t *srcset2)
+{
+ cpu_set_word_t *wdest = &destset->__bits[0];
+ const cpu_set_word_t *wsrc1 = &srcset1->__bits[0];
+ const cpu_set_word_t *wsrc2 = &srcset2->__bits[0];
+ size_t n = setsize / sizeof(*wdest);
+ size_t i;
+
+ for (i = 0; i < n; ++i)
+ wdest[i] = ~(wsrc1[i] & wsrc2[i]);
+}
+
+static __inline void CPU_NAND(cpu_set_t *destset, const cpu_set_t *srcset1,
+ const cpu_set_t *srcset2)
+{
+ CPU_NAND_S(sizeof(*destset), destset, srcset1, srcset2);
+}
+
+static __inline int CPU_COUNT_S(size_t setsize, const cpu_set_t *set)
+{
+ int count = 0;
+ const cpu_set_word_t *w = &set->__bits[0];
+ size_t n = setsize / sizeof(*w);
+ size_t i;
+ int cpu;
+
+ for (i = 0; i < n; ++i)
+ for (cpu = 0; cpu < (int)_NCPUBITS; ++cpu)
+ count += (w[i] & __cpuset_mask(cpu)) != 0;
+
+ return count;
+}
+
+static __inline int CPU_COUNT(const cpu_set_t *set)
+{
+ return CPU_COUNT_S(sizeof(*set), set);
+}
+
+static __inline int CPU_EQUAL_S(size_t setsize, const cpu_set_t *set1,
+ const cpu_set_t *set2)
+{
+ const cpu_set_word_t *w1 = &set1->__bits[0];
+ const cpu_set_word_t *w2 = &set2->__bits[0];
+ size_t n = setsize / sizeof(*w1);
+ size_t i;
+
+ for (i = 0; i < n; ++i)
+ if (w1[i] != w2[i])
+ return 0;
+
+ return 1;
+}
+
+static __inline int CPU_EQUAL(const cpu_set_t *set1, const cpu_set_t *set2)
+{
+ return CPU_EQUAL_S(sizeof(*set1), set1, set2);
+}
+
+/* return 1 if the sets set1 and set2 are equal, otherwise return 0 */
+static __inline int CPU_CMP( const cpu_set_t *set1, const cpu_set_t *set2 )
+{
+ return CPU_EQUAL(set1, set2);
+}
+
+/* return 1 if the set is empty, otherwise return 0 */
+static __inline int CPU_EMPTY( const cpu_set_t *set )
+{
+ size_t i;
+
+ for (i=0; i < _NCPUWORDS; i++)
+ if (set->__bits[i] != 0 )
+ return 0;
+ return 1;
+}
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
+#endif
diff --git a/newlib/libc/sys/rtems/sys/dirent.h b/newlib/libc/sys/rtems/include/sys/dirent.h
index c52c7bcf7..5a3a54dbf 100644
--- a/newlib/libc/sys/rtems/sys/dirent.h
+++ b/newlib/libc/sys/rtems/include/sys/dirent.h
@@ -26,6 +26,8 @@ typedef struct _dirdesc {
DIR *opendir(const char *);
struct dirent *readdir(DIR *);
+int readdir_r(DIR *__restrict, struct dirent *__restrict,
+ struct dirent **__restrict);
void rewinddir(DIR *);
int closedir(DIR *);
void seekdir(DIR *dir, long loc);
@@ -56,7 +58,7 @@ int scandir ( const char *dirname,
#ifdef __cplusplus
}
-#endif
+#endif
#endif
diff --git a/newlib/libc/sys/rtems/include/sys/lock.h b/newlib/libc/sys/rtems/include/sys/lock.h
new file mode 100644
index 000000000..c261adf68
--- /dev/null
+++ b/newlib/libc/sys/rtems/include/sys/lock.h
@@ -0,0 +1,235 @@
+/*
+ * Copyright (c) 2015, 2016 embedded brains GmbH. 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 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.
+ */
+
+#ifndef _SYS_LOCK_H_
+#define _SYS_LOCK_H_
+
+#include <sys/cdefs.h>
+#include <stddef.h>
+
+__BEGIN_DECLS
+
+struct timespec;
+
+struct _Thread_Control;
+
+struct _Thread_queue_Heads;
+
+struct _Ticket_lock_Control {
+ unsigned int _next_ticket;
+ unsigned int _now_serving;
+};
+
+struct _Thread_queue_Queue {
+ struct _Ticket_lock_Control _Lock;
+ struct _Thread_queue_Heads *_heads;
+ struct _Thread_Control *_owner;
+};
+
+struct _Mutex_Control {
+ struct _Thread_queue_Queue _Queue;
+};
+
+struct _Mutex_recursive_Control {
+ struct _Mutex_Control _Mutex;
+ unsigned int _nest_level;
+};
+
+struct _Condition_Control {
+ struct _Thread_queue_Queue _Queue;
+};
+
+struct _Semaphore_Control {
+ struct _Thread_queue_Queue _Queue;
+ unsigned int _count;
+};
+
+struct _Futex_Control {
+ struct _Thread_queue_Queue _Queue;
+};
+
+#define _THREAD_QUEUE_INITIALIZER { { 0, 0 }, 0, 0 }
+
+#define _MUTEX_INITIALIZER { _THREAD_QUEUE_INITIALIZER }
+
+#define _MUTEX_RECURSIVE_INITIALIZER { _MUTEX_INITIALIZER, 0 }
+
+#define _CONDITION_INITIALIZER { _THREAD_QUEUE_INITIALIZER }
+
+#define _SEMAPHORE_INITIALIZER(_count) { _THREAD_QUEUE_INITIALIZER, _count }
+
+#define _FUTEX_INITIALIZER { _THREAD_QUEUE_INITIALIZER }
+
+static inline void
+_Mutex_Initialize(struct _Mutex_Control *_mutex)
+{
+ struct _Mutex_Control _init = _MUTEX_INITIALIZER;
+
+ *_mutex = _init;
+}
+
+void _Mutex_Acquire(struct _Mutex_Control *);
+
+int _Mutex_Acquire_timed(struct _Mutex_Control *, const struct timespec *);
+
+int _Mutex_Try_acquire(struct _Mutex_Control *);
+
+void _Mutex_Release(struct _Mutex_Control *);
+
+static inline void
+_Mutex_Destroy(struct _Mutex_Control *_mutex)
+{
+
+ (void)_mutex;
+}
+
+static inline void
+_Mutex_recursive_Initialize(struct _Mutex_recursive_Control *_mutex)
+{
+ struct _Mutex_recursive_Control _init = _MUTEX_RECURSIVE_INITIALIZER;
+
+ *_mutex = _init;
+}
+
+void _Mutex_recursive_Acquire(struct _Mutex_recursive_Control *);
+
+int _Mutex_recursive_Acquire_timed(struct _Mutex_recursive_Control *,
+ const struct timespec *);
+
+int _Mutex_recursive_Try_acquire(struct _Mutex_recursive_Control *);
+
+void _Mutex_recursive_Release(struct _Mutex_recursive_Control *);
+
+static inline void
+_Mutex_recursive_Destroy(struct _Mutex_recursive_Control *_mutex)
+{
+
+ (void)_mutex;
+}
+
+static inline void
+_Condition_Initialize(struct _Condition_Control *_cond)
+{
+ struct _Condition_Control _init = _CONDITION_INITIALIZER;
+
+ *_cond = _init;
+}
+
+void _Condition_Wait(struct _Condition_Control *, struct _Mutex_Control *);
+
+int _Condition_Wait_timed(struct _Condition_Control *,
+ struct _Mutex_Control *, const struct timespec *);
+
+void _Condition_Wait_recursive(struct _Condition_Control *,
+ struct _Mutex_recursive_Control *);
+
+int _Condition_Wait_recursive_timed(struct _Condition_Control *,
+ struct _Mutex_recursive_Control *, const struct timespec *);
+
+void _Condition_Signal(struct _Condition_Control *);
+
+void _Condition_Broadcast(struct _Condition_Control *);
+
+static inline void
+_Condition_Destroy(struct _Condition_Control *_cond)
+{
+
+ (void)_cond;
+}
+
+static inline void
+_Semaphore_Initialize(struct _Semaphore_Control *_semaphore,
+ unsigned int _count)
+{
+ struct _Semaphore_Control _init = _SEMAPHORE_INITIALIZER(_count);
+
+ *_semaphore = _init;
+}
+
+void _Semaphore_Wait(struct _Semaphore_Control *);
+
+void _Semaphore_Post(struct _Semaphore_Control *);
+
+static inline void
+_Semaphore_Destroy(struct _Semaphore_Control *_semaphore)
+{
+
+ (void)_semaphore;
+}
+
+static inline void
+_Futex_Initialize(struct _Futex_Control *_futex)
+{
+ struct _Futex_Control _init = _FUTEX_INITIALIZER;
+
+ *_futex = _init;
+}
+
+int _Futex_Wait(struct _Futex_Control *, int *, int);
+
+int _Futex_Wake(struct _Futex_Control *, int);
+
+static inline void
+_Futex_Destroy(struct _Futex_Control *_futex)
+{
+
+ (void)_futex;
+}
+
+int _Sched_Count(void);
+
+int _Sched_Index(void);
+
+int _Sched_Name_to_index(const char *, size_t);
+
+int _Sched_Processor_count(int);
+
+/* Newlib internal locks */
+
+typedef struct _Mutex_Control _LOCK_T;
+
+typedef struct _Mutex_recursive_Control _LOCK_RECURSIVE_T;
+
+#define __LOCK_INIT(_qualifier, _designator) \
+ _qualifier _LOCK_T _designator = _MUTEX_INITIALIZER
+
+#define __LOCK_INIT_RECURSIVE(_qualifier, _designator) \
+ _qualifier _LOCK_RECURSIVE_T _designator = _MUTEX_RECURSIVE_INITIALIZER
+
+#define __lock_init(_lock) _Mutex_Initialize(&_lock)
+#define __lock_acquire(_lock) _Mutex_Acquire(&_lock)
+#define __lock_try_acquire(lock) _Mutex_Try_acquire(&_lock)
+#define __lock_release(_lock) _Mutex_Release(&_lock)
+#define __lock_close(_lock) _Mutex_Destroy(&_lock)
+
+#define __lock_init_recursive(_lock) _Mutex_recursive_Initialize(&_lock)
+#define __lock_acquire_recursive(_lock) _Mutex_recursive_Acquire(&_lock)
+#define __lock_try_acquire_recursive(lock) _Mutex_recursive_Try_acquire(&_lock)
+#define __lock_release_recursive(_lock) _Mutex_recursive_Release(&_lock)
+#define __lock_close_recursive(_lock) _Mutex_recursive_Destroy(&_lock)
+
+__END_DECLS
+
+#endif /* _SYS_LOCK_H_ */
diff --git a/newlib/libc/sys/rtems/sys/param.h b/newlib/libc/sys/rtems/include/sys/param.h
index 7be877d63..db9786b31 100644
--- a/newlib/libc/sys/rtems/sys/param.h
+++ b/newlib/libc/sys/rtems/include/sys/param.h
@@ -47,8 +47,6 @@
/* end of from newlib's <sys/param.h> */
-#include <unistd.h>
-
#define BSD 199506 /* System version (year & month). */
#define BSD4_3 1
#define BSD4_4 1
@@ -66,19 +64,19 @@
* Redefined constants are from POSIX 1003.1 limits file.
*
* MAXCOMLEN should be >= sizeof(ac_comm) (see <acct.h>)
- * MAXLOGNAME should be >= UT_NAMESIZE (see <utmp.h>)
*/
#include <sys/syslimits.h>
-#define MAXCOMLEN 16 /* max command name remembered */
-#define MAXINTERP 32 /* max interpreter file name length */
-#define MAXLOGNAME 12 /* max login name length */
+#define MAXCOMLEN 19 /* max command name remembered */
+#define MAXINTERP PATH_MAX /* max interpreter file name length */
+#define MAXLOGNAME 33 /* max login name length (incl. NUL) */
#define MAXUPRC CHILD_MAX /* max simultaneous processes */
#define NCARGS ARG_MAX /* max bytes for an exec function */
-#define NGROUPS NGROUPS_MAX /* max number groups */
+#define NGROUPS (NGROUPS_MAX+1) /* max number groups */
#define NOFILE OPEN_MAX /* max open files per process */
#define NOGROUP 65535 /* marker for empty group set member */
#define MAXHOSTNAMELEN 256 /* max hostname size */
+#define SPECNAMELEN 63 /* max length of devicename */
/* More types and definitions used throughout the kernel. */
#if defined(KERNEL) || defined(_KERNEL)
@@ -109,6 +107,7 @@
#define NZERO 0 /* default "nice" */
+#define NBBY 8 /* number of bits in a byte */
#define NBPW sizeof(int) /* number of bytes per word (integer) */
#define CMASK 022 /* default file mask: S_IWGRP|S_IWOTH */
@@ -123,21 +122,29 @@
/*
* File system parameters and macros.
*
- * The file system is made out of blocks of at most MAXBSIZE units, with
- * smaller units (fragments) only in the last direct block. MAXBSIZE
- * primarily determines the size of buffers in the buffer pool. It may be
- * made larger without any effect on existing file systems; however making
- * it smaller make make some file systems unmountable. Also, MAXBSIZE
- * must be less than MAXPHYS!!! DFLTBSIZE is the average amount of
- * memory allocated by vfs_bio per nbuf. BKVASIZE is the average amount
- * of kernel virtual space allocated per nbuf. BKVASIZE should be >=
- * DFLTBSIZE. If it is significantly bigger than DFLTBSIZE, then
- * kva fragmentation causes fewer performance problems.
+ * MAXBSIZE - Filesystems are made out of blocks of at most MAXBSIZE bytes
+ * per block. MAXBSIZE may be made larger without effecting
+ * any existing filesystems as long as it does not exceed MAXPHYS,
+ * and may be made smaller at the risk of not being able to use
+ * filesystems which require a block size exceeding MAXBSIZE.
+ *
+ * BKVASIZE - Nominal buffer space per buffer, in bytes. BKVASIZE is the
+ * minimum KVM memory reservation the kernel is willing to make.
+ * Filesystems can of course request smaller chunks. Actual
+ * backing memory uses a chunk size of a page (PAGE_SIZE).
+ *
+ * If you make BKVASIZE too small you risk seriously fragmenting
+ * the buffer KVM map which may slow things down a bit. If you
+ * make it too big the kernel will not be able to optimally use
+ * the KVM memory reserved for the buffer cache and will wind
+ * up with too-few buffers.
+ *
+ * The default is 16384, roughly 2x the block size used by a
+ * normal UFS filesystem.
*/
-#define MAXBSIZE 65536
-#define BKVASIZE 8192
-#define DFLTBSIZE 4096
-#define MAXFRAG 8
+#define MAXBSIZE 65536 /* must be power of 2 */
+#define BKVASIZE 16384 /* must be power of 2 */
+#define BKVAMASK (BKVASIZE-1)
/*
* MAXPATHLEN defines the longest permissible path length after expanding
@@ -148,16 +155,16 @@
* It should be set high enough to allow all legitimate uses, but halt
* infinite loops reasonably quickly.
*/
-#if !defined(__rtems__)
#define MAXPATHLEN PATH_MAX
-#endif
#define MAXSYMLINKS 32
/* Bit map related macros. */
-#define setbit(a,i) ((a)[(i)/NBBY] |= 1<<((i)%NBBY))
-#define clrbit(a,i) ((a)[(i)/NBBY] &= ~(1<<((i)%NBBY)))
-#define isset(a,i) ((a)[(i)/NBBY] & (1<<((i)%NBBY)))
-#define isclr(a,i) (((a)[(i)/NBBY] & (1<<((i)%NBBY))) == 0)
+#define setbit(a,i) (((unsigned char *)(a))[(i)/NBBY] |= 1<<((i)%NBBY))
+#define clrbit(a,i) (((unsigned char *)(a))[(i)/NBBY] &= ~(1<<((i)%NBBY)))
+#define isset(a,i) \
+ (((const unsigned char *)(a))[(i)/NBBY] & (1<<((i)%NBBY)))
+#define isclr(a,i) \
+ ((((const unsigned char *)(a))[(i)/NBBY] & (1<<((i)%NBBY))) == 0)
/* Macros for counting and rounding. */
#ifndef howmany
diff --git a/newlib/libc/sys/rtems/sys/syslimits.h b/newlib/libc/sys/rtems/include/sys/syslimits.h
index 74c4dd273..2295afe34 100644
--- a/newlib/libc/sys/rtems/sys/syslimits.h
+++ b/newlib/libc/sys/rtems/include/sys/syslimits.h
@@ -45,7 +45,7 @@
#define MAX_CANON 255 /* max bytes in term canon input line */
#define MAX_INPUT 255 /* max bytes in terminal input */
#define NAME_MAX 255 /* max bytes in a file name */
-#define NGROUPS_MAX 16 /* max supplemental group id's */
+#define NGROUPS_MAX 15 /* max supplemental group id's */
#ifndef OPEN_MAX
#define OPEN_MAX 64 /* max open files per process */
#endif
diff --git a/newlib/libc/sys/rtems/sys/utime.h b/newlib/libc/sys/rtems/include/sys/utime.h
index 561136bb4..561136bb4 100644
--- a/newlib/libc/sys/rtems/sys/utime.h
+++ b/newlib/libc/sys/rtems/include/sys/utime.h
diff --git a/newlib/libc/sys/rtems/machine/_types.h b/newlib/libc/sys/rtems/machine/_types.h
deleted file mode 100644
index ce8dc47f0..000000000
--- a/newlib/libc/sys/rtems/machine/_types.h
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
- * $Id$
- */
-
-#ifndef _MACHINE__TYPES_H
-#define _MACHINE__TYPES_H
-
-/*
- * GCC wants type symmetry between size_t and ssize_t.
- * It supplies __SIZE_TYPE__, doesn't supply a corresponding __SSIZE_TYPE__,
- * so we have to guess on which type GCC wants ssize_t to be.
- * FIXME: GCC > 4.3.x supplies internal defines __SIZEOF_SIZE_T__ etc. which
- * could be applied here.
- */
-
-#if defined(__i386__) || defined(__m32r__) || defined(__h8300__) || (defined(__arm__) && !defined(__ARM_EABI__)) || defined(__bfin__) || defined(__m68k__) || defined(__MICROBLAZE__)
-#if defined(__H8300__)
-typedef signed int _ssize_t;
-#else
-typedef long signed int _ssize_t;
-#endif
-#define __ssize_t_defined 1
-#elif defined(__sparc__) && defined(__LP64__)
-typedef long signed int _ssize_t;
-#define __ssize_t_defined 1
-#elif defined(__AVR__) || defined(__lm32__) || defined(__m32c__) || defined(__mips__) || defined(__moxie__) || defined(__PPC__) || defined(__sparc__) || defined(__sh__) || defined(__ARM_EABI__) \
- || defined(__v850__) || defined(__v851__)
-typedef signed int _ssize_t;
-#define __ssize_t_defined 1
-#else
-# error unsupported target
-#endif
-
-#include <machine/_default_types.h>
-
-typedef __int32_t blksize_t;
-typedef __int32_t blkcnt_t;
-
-#if defined(__arm__) || defined(__i386__) || defined(__m68k__) || defined(__mips__) || defined(__PPC__) || defined(__sparc__)
-/* Use 64bit types */
-typedef __int64_t _off_t;
-#define __off_t_defined 1
-
-typedef __int64_t _fpos_t;
-#define __fpos_t_defined 1
-#else
-/* Use 32bit types */
-typedef __int32_t _off_t;
-#define __off_t_defined 1
-
-typedef __int32_t _fpos_t;
-#define __fpos_t_defined 1
-#endif
-
-typedef __uint32_t _mode_t;
-#define __mode_t_defined 1
-
-#endif
diff --git a/newlib/libc/sys/sh/configure b/newlib/libc/sys/sh/configure
index 37c583d42..90105dfb8 100755
--- a/newlib/libc/sys/sh/configure
+++ b/newlib/libc/sys/sh/configure
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.68 for newlib 2.0.0.
+# Generated by GNU Autoconf 2.68 for newlib 2.4.0.
#
#
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
@@ -556,8 +556,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='newlib'
PACKAGE_TARNAME='newlib'
-PACKAGE_VERSION='2.0.0'
-PACKAGE_STRING='newlib 2.0.0'
+PACKAGE_VERSION='2.4.0'
+PACKAGE_STRING='newlib 2.4.0'
PACKAGE_BUGREPORT=''
PACKAGE_URL=''
@@ -1239,7 +1239,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures newlib 2.0.0 to adapt to many kinds of systems.
+\`configure' configures newlib 2.4.0 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1309,7 +1309,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of newlib 2.0.0:";;
+ short | recursive ) echo "Configuration of newlib 2.4.0:";;
esac
cat <<\_ACEOF
@@ -1400,7 +1400,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-newlib configure 2.0.0
+newlib configure 2.4.0
generated by GNU Autoconf 2.68
Copyright (C) 2010 Free Software Foundation, Inc.
@@ -1455,7 +1455,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by newlib $as_me 2.0.0, which was
+It was created by newlib $as_me 2.4.0, which was
generated by GNU Autoconf 2.68. Invocation command line was
$ $0 $@
@@ -2527,7 +2527,7 @@ fi
# Define the identity of the package.
PACKAGE='newlib'
- VERSION='2.0.0'
+ VERSION='2.4.0'
# Some tools Automake needs.
@@ -4007,7 +4007,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by newlib $as_me 2.0.0, which was
+This file was extended by newlib $as_me 2.4.0, which was
generated by GNU Autoconf 2.68. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -4064,7 +4064,7 @@ _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
-newlib config.status 2.0.0
+newlib config.status 2.4.0
configured by $0, generated by GNU Autoconf 2.68,
with options \\"\$ac_cs_config\\"
diff --git a/newlib/libc/sys/sparc64/configure b/newlib/libc/sys/sparc64/configure
index f7b386388..6e8870733 100755
--- a/newlib/libc/sys/sparc64/configure
+++ b/newlib/libc/sys/sparc64/configure
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.68 for newlib 2.0.0.
+# Generated by GNU Autoconf 2.68 for newlib 2.4.0.
#
#
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
@@ -556,8 +556,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='newlib'
PACKAGE_TARNAME='newlib'
-PACKAGE_VERSION='2.0.0'
-PACKAGE_STRING='newlib 2.0.0'
+PACKAGE_VERSION='2.4.0'
+PACKAGE_STRING='newlib 2.4.0'
PACKAGE_BUGREPORT=''
PACKAGE_URL=''
@@ -1239,7 +1239,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures newlib 2.0.0 to adapt to many kinds of systems.
+\`configure' configures newlib 2.4.0 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1309,7 +1309,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of newlib 2.0.0:";;
+ short | recursive ) echo "Configuration of newlib 2.4.0:";;
esac
cat <<\_ACEOF
@@ -1400,7 +1400,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-newlib configure 2.0.0
+newlib configure 2.4.0
generated by GNU Autoconf 2.68
Copyright (C) 2010 Free Software Foundation, Inc.
@@ -1455,7 +1455,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by newlib $as_me 2.0.0, which was
+It was created by newlib $as_me 2.4.0, which was
generated by GNU Autoconf 2.68. Invocation command line was
$ $0 $@
@@ -2527,7 +2527,7 @@ fi
# Define the identity of the package.
PACKAGE='newlib'
- VERSION='2.0.0'
+ VERSION='2.4.0'
# Some tools Automake needs.
@@ -4007,7 +4007,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by newlib $as_me 2.0.0, which was
+This file was extended by newlib $as_me 2.4.0, which was
generated by GNU Autoconf 2.68. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -4064,7 +4064,7 @@ _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
-newlib config.status 2.0.0
+newlib config.status 2.4.0
configured by $0, generated by GNU Autoconf 2.68,
with options \\"\$ac_cs_config\\"
diff --git a/newlib/libc/sys/sparc64/sys/time.h b/newlib/libc/sys/sparc64/sys/_timeval.h
index 36f8e1c11..b0aaeda7e 100644
--- a/newlib/libc/sys/sparc64/sys/time.h
+++ b/newlib/libc/sys/sparc64/sys/_timeval.h
@@ -1,6 +1,14 @@
#ifndef _SYS_TIME_H
#define _SYS_TIME_H
+#include <sys/_types.h>
+
+#if !defined(__time_t_defined) && !defined(_TIME_T_DECLARED)
+typedef _TIME_T_ time_t;
+#define __time_t_defined
+#define _TIME_T_DECLARED
+#endif
+
#ifdef __cplusplus
extern "C" {
#endif
diff --git a/newlib/libc/sys/sparc64/sys/dirent.h b/newlib/libc/sys/sparc64/sys/dirent.h
index 864bb5ca1..cb933b457 100644
--- a/newlib/libc/sys/sparc64/sys/dirent.h
+++ b/newlib/libc/sys/sparc64/sys/dirent.h
@@ -21,6 +21,8 @@ typedef struct __dirdesc {
DIR *opendir (const char *);
struct dirent *readdir (DIR *);
+int readdir_r (DIR *__restrict, struct dirent *__restrict,
+ struct dirent **__restrict);
void rewinddir (DIR *);
int closedir (DIR *);
diff --git a/newlib/libc/sys/sparc64/sys/fcntl.h b/newlib/libc/sys/sparc64/sys/fcntl.h
index 940649ac7..b52932b3f 100644
--- a/newlib/libc/sys/sparc64/sys/fcntl.h
+++ b/newlib/libc/sys/sparc64/sys/fcntl.h
@@ -12,6 +12,7 @@ extern "C" {
#endif
#include <_ansi.h>
+#include <sys/cdefs.h>
#define _FOPEN (-1) /* from sys/file.h, kernel use only */
#define _FREAD 0x0001 /* read enabled */
@@ -58,11 +59,10 @@ extern "C" {
/* O_NDELAY _FNBIO set in 5include/fcntl.h */
#define O_NONBLOCK _FNONBLOCK
#define O_NOCTTY _FNOCTTY
-
-#ifndef _POSIX_SOURCE
-
#define O_SYNC _FSYNC
+#if __MISC_VISIBLE
+
/*
* Flags that work for fcntl(fd, F_SETFL, FXXXX)
*/
@@ -93,7 +93,7 @@ extern "C" {
#define FEXCL _FEXCL
#define FNOCTTY _FNOCTTY
-#endif !_POSIX_SOURCE
+#endif /* __MISC_VISIBLE */
/* XXX close on exec request; must match UF_EXCLOSE in user.h */
#define FD_CLOEXEC 1 /* posix */
@@ -104,7 +104,7 @@ extern "C" {
#define F_SETFD 2 /* Set fildes flags (close on exec) */
#define F_GETFL 3 /* Get file flags */
#define F_SETFL 4 /* Set file flags */
-#ifndef _POSIX_SOURCE
+#if __BSD_VISIBLE || __POSIX_VISIBLE >= 200112
#ifdef __svr4__
#define F_GETOWN 23 /* Get owner - for ASYNC */
#define F_SETOWN 24 /* Set owner - for ASYNC */
@@ -112,7 +112,7 @@ extern "C" {
#define F_GETOWN 5 /* Get owner - for ASYNC */
#define F_SETOWN 6 /* Set owner - for ASYNC */
#endif
-#endif /* !_POSIX_SOURCE */
+#endif /* __BSD_VISIBLE || __POSIX_VISIBLE >= 200112 */
#ifdef __svr4__
#define F_GETLK 14 /* Get record-locking information */
#define F_SETLK 6 /* Set or Clear a record-lock (Non-Blocking) */
@@ -122,20 +122,20 @@ extern "C" {
#define F_SETLK 8 /* Set or Clear a record-lock (Non-Blocking) */
#define F_SETLKW 9 /* Set or Clear a record-lock (Blocking) */
#endif
-#ifndef _POSIX_SOURCE
+#if __MISC_VISIBLE
#define F_RGETLK 10 /* Test a remote lock to see if it is blocked */
#define F_RSETLK 11 /* Set or unlock a remote lock */
#define F_CNVT 12 /* Convert a fhandle to an open fd */
#define F_RSETLKW 13 /* Set or Clear remote record-lock(Blocking) */
-#endif /* !_POSIX_SOURCE */
+#endif /* __MISC_VISIBLE */
/* fcntl(2) flags (l_type field of flock structure) */
#define F_RDLCK 1 /* read lock */
#define F_WRLCK 2 /* write lock */
#define F_UNLCK 3 /* remove lock(s) */
-#ifndef _POSIX_SOURCE
+#if __MISC_VISIBLE
#define F_UNLKSYS 4 /* remove remote locks for a given system */
-#endif /* !_POSIX_SOURCE */
+#endif /* __MISC_VISIBLE */
/*#include <sys/stdtypes.h>*/
@@ -149,7 +149,7 @@ struct flock {
short l_xxx; /* reserved for future use */
};
-#ifndef _POSIX_SOURCE
+#if __MISC_VISIBLE
/* extended file segment locking set data type */
struct eflock {
short l_type; /* F_RDLCK, F_WRLCK, or F_UNLCK */
@@ -161,7 +161,7 @@ struct eflock {
long l_rpid; /* Remote process id wanting this lock */
long l_rsys; /* Remote system id wanting this lock */
};
-#endif /* !_POSIX_SOURCE */
+#endif /* __MISC_VISIBLE */
#include <sys/types.h>
diff --git a/newlib/libc/sys/sparc64/sys/stat.h b/newlib/libc/sys/sparc64/sys/stat.h
index 256c1b41b..746406737 100644
--- a/newlib/libc/sys/sparc64/sys/stat.h
+++ b/newlib/libc/sys/sparc64/sys/stat.h
@@ -78,14 +78,15 @@ struct stat
#define S_ISUID 0004000 /* set user id on execution */
#define S_ISGID 0002000 /* set group id on execution */
-#ifndef _POSIX_SOURCE
#define S_ISVTX 0001000 /* save swapped text even after use */
+#if __BSD_VISIBLE
#define S_IREAD 0000400 /* read permission, owner */
#define S_IWRITE 0000200 /* write permission, owner */
#define S_IEXEC 0000100 /* execute/search permission, owner */
-
#define S_ENFMT 0002000 /* enforcement-mode locking */
+#endif /* __BSD_VISIBLE */
+#if __POSIX_VISIBLE >= 200112
#define S_IFMT _IFMT
#define S_IFDIR _IFDIR
#define S_IFCHR _IFCHR
@@ -94,7 +95,7 @@ struct stat
#define S_IFLNK _IFLNK
#define S_IFSOCK _IFSOCK
#define S_IFIFO _IFIFO
-#endif /* !_POSIX_SOURCE */
+#endif /* __POSIX_VISIBLE >= 200112 */
#define S_IRWXU 0000700 /* rwx, owner */
@@ -122,7 +123,7 @@ int _EXFUN(chmod,( const char *_path, mode_t _mode ));
int _EXFUN(fstat,( int _fd, struct stat *_sbuf ));
int _EXFUN(mkdir,( char *_path, mode_t _mode ));
int _EXFUN(mkfifo,( char *_path, mode_t _mode ));
-int _EXFUN(stat,( const char *_path, struct stat *_sbuf ));
+int _EXFUN(stat,( const char *__restrict _path, struct stat *__restrict _sbuf ));
mode_t _EXFUN(umask,( mode_t _mask ));
#ifdef __cplusplus
diff --git a/newlib/libc/sys/sun4/configure b/newlib/libc/sys/sun4/configure
index 071afeea9..4b79f1589 100755
--- a/newlib/libc/sys/sun4/configure
+++ b/newlib/libc/sys/sun4/configure
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.68 for newlib 2.0.0.
+# Generated by GNU Autoconf 2.68 for newlib 2.4.0.
#
#
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
@@ -556,8 +556,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='newlib'
PACKAGE_TARNAME='newlib'
-PACKAGE_VERSION='2.0.0'
-PACKAGE_STRING='newlib 2.0.0'
+PACKAGE_VERSION='2.4.0'
+PACKAGE_STRING='newlib 2.4.0'
PACKAGE_BUGREPORT=''
PACKAGE_URL=''
@@ -1239,7 +1239,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures newlib 2.0.0 to adapt to many kinds of systems.
+\`configure' configures newlib 2.4.0 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1309,7 +1309,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of newlib 2.0.0:";;
+ short | recursive ) echo "Configuration of newlib 2.4.0:";;
esac
cat <<\_ACEOF
@@ -1400,7 +1400,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-newlib configure 2.0.0
+newlib configure 2.4.0
generated by GNU Autoconf 2.68
Copyright (C) 2010 Free Software Foundation, Inc.
@@ -1455,7 +1455,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by newlib $as_me 2.0.0, which was
+It was created by newlib $as_me 2.4.0, which was
generated by GNU Autoconf 2.68. Invocation command line was
$ $0 $@
@@ -2527,7 +2527,7 @@ fi
# Define the identity of the package.
PACKAGE='newlib'
- VERSION='2.0.0'
+ VERSION='2.4.0'
# Some tools Automake needs.
@@ -4007,7 +4007,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by newlib $as_me 2.0.0, which was
+This file was extended by newlib $as_me 2.4.0, which was
generated by GNU Autoconf 2.68. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -4064,7 +4064,7 @@ _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
-newlib config.status 2.0.0
+newlib config.status 2.4.0
configured by $0, generated by GNU Autoconf 2.68,
with options \\"\$ac_cs_config\\"
diff --git a/newlib/libc/sys/sun4/sys/dirent.h b/newlib/libc/sys/sun4/sys/dirent.h
index b7ca90b0d..2e6fc456f 100644
--- a/newlib/libc/sys/sun4/sys/dirent.h
+++ b/newlib/libc/sys/sun4/sys/dirent.h
@@ -23,6 +23,8 @@ typedef struct __dirdesc {
DIR *opendir (const char *);
struct dirent *readdir (DIR *);
+int readdir_r (DIR *__restrict, struct dirent *__restrict,
+ struct dirent **__restrict);
void rewinddir (DIR *);
int closedir (DIR *);
diff --git a/newlib/libc/sys/sysmec/configure b/newlib/libc/sys/sysmec/configure
index 31a481919..56e757e0e 100755
--- a/newlib/libc/sys/sysmec/configure
+++ b/newlib/libc/sys/sysmec/configure
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.68 for newlib 2.0.0.
+# Generated by GNU Autoconf 2.68 for newlib 2.4.0.
#
#
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
@@ -556,8 +556,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='newlib'
PACKAGE_TARNAME='newlib'
-PACKAGE_VERSION='2.0.0'
-PACKAGE_STRING='newlib 2.0.0'
+PACKAGE_VERSION='2.4.0'
+PACKAGE_STRING='newlib 2.4.0'
PACKAGE_BUGREPORT=''
PACKAGE_URL=''
@@ -1239,7 +1239,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures newlib 2.0.0 to adapt to many kinds of systems.
+\`configure' configures newlib 2.4.0 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1309,7 +1309,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of newlib 2.0.0:";;
+ short | recursive ) echo "Configuration of newlib 2.4.0:";;
esac
cat <<\_ACEOF
@@ -1400,7 +1400,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-newlib configure 2.0.0
+newlib configure 2.4.0
generated by GNU Autoconf 2.68
Copyright (C) 2010 Free Software Foundation, Inc.
@@ -1455,7 +1455,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by newlib $as_me 2.0.0, which was
+It was created by newlib $as_me 2.4.0, which was
generated by GNU Autoconf 2.68. Invocation command line was
$ $0 $@
@@ -2527,7 +2527,7 @@ fi
# Define the identity of the package.
PACKAGE='newlib'
- VERSION='2.0.0'
+ VERSION='2.4.0'
# Some tools Automake needs.
@@ -4007,7 +4007,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by newlib $as_me 2.0.0, which was
+This file was extended by newlib $as_me 2.4.0, which was
generated by GNU Autoconf 2.68. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -4064,7 +4064,7 @@ _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
-newlib config.status 2.0.0
+newlib config.status 2.4.0
configured by $0, generated by GNU Autoconf 2.68,
with options \\"\$ac_cs_config\\"
diff --git a/newlib/libc/sys/sysnec810/configure b/newlib/libc/sys/sysnec810/configure
index e632bae7f..cfc4c61d3 100755
--- a/newlib/libc/sys/sysnec810/configure
+++ b/newlib/libc/sys/sysnec810/configure
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.68 for newlib 2.0.0.
+# Generated by GNU Autoconf 2.68 for newlib 2.4.0.
#
#
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
@@ -556,8 +556,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='newlib'
PACKAGE_TARNAME='newlib'
-PACKAGE_VERSION='2.0.0'
-PACKAGE_STRING='newlib 2.0.0'
+PACKAGE_VERSION='2.4.0'
+PACKAGE_STRING='newlib 2.4.0'
PACKAGE_BUGREPORT=''
PACKAGE_URL=''
@@ -1239,7 +1239,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures newlib 2.0.0 to adapt to many kinds of systems.
+\`configure' configures newlib 2.4.0 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1309,7 +1309,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of newlib 2.0.0:";;
+ short | recursive ) echo "Configuration of newlib 2.4.0:";;
esac
cat <<\_ACEOF
@@ -1400,7 +1400,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-newlib configure 2.0.0
+newlib configure 2.4.0
generated by GNU Autoconf 2.68
Copyright (C) 2010 Free Software Foundation, Inc.
@@ -1455,7 +1455,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by newlib $as_me 2.0.0, which was
+It was created by newlib $as_me 2.4.0, which was
generated by GNU Autoconf 2.68. Invocation command line was
$ $0 $@
@@ -2527,7 +2527,7 @@ fi
# Define the identity of the package.
PACKAGE='newlib'
- VERSION='2.0.0'
+ VERSION='2.4.0'
# Some tools Automake needs.
@@ -4007,7 +4007,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by newlib $as_me 2.0.0, which was
+This file was extended by newlib $as_me 2.4.0, which was
generated by GNU Autoconf 2.68. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -4064,7 +4064,7 @@ _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
-newlib config.status 2.0.0
+newlib config.status 2.4.0
configured by $0, generated by GNU Autoconf 2.68,
with options \\"\$ac_cs_config\\"
diff --git a/newlib/libc/sys/sysnecv850/configure b/newlib/libc/sys/sysnecv850/configure
index 31a481919..56e757e0e 100755
--- a/newlib/libc/sys/sysnecv850/configure
+++ b/newlib/libc/sys/sysnecv850/configure
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.68 for newlib 2.0.0.
+# Generated by GNU Autoconf 2.68 for newlib 2.4.0.
#
#
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
@@ -556,8 +556,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='newlib'
PACKAGE_TARNAME='newlib'
-PACKAGE_VERSION='2.0.0'
-PACKAGE_STRING='newlib 2.0.0'
+PACKAGE_VERSION='2.4.0'
+PACKAGE_STRING='newlib 2.4.0'
PACKAGE_BUGREPORT=''
PACKAGE_URL=''
@@ -1239,7 +1239,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures newlib 2.0.0 to adapt to many kinds of systems.
+\`configure' configures newlib 2.4.0 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1309,7 +1309,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of newlib 2.0.0:";;
+ short | recursive ) echo "Configuration of newlib 2.4.0:";;
esac
cat <<\_ACEOF
@@ -1400,7 +1400,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-newlib configure 2.0.0
+newlib configure 2.4.0
generated by GNU Autoconf 2.68
Copyright (C) 2010 Free Software Foundation, Inc.
@@ -1455,7 +1455,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by newlib $as_me 2.0.0, which was
+It was created by newlib $as_me 2.4.0, which was
generated by GNU Autoconf 2.68. Invocation command line was
$ $0 $@
@@ -2527,7 +2527,7 @@ fi
# Define the identity of the package.
PACKAGE='newlib'
- VERSION='2.0.0'
+ VERSION='2.4.0'
# Some tools Automake needs.
@@ -4007,7 +4007,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by newlib $as_me 2.0.0, which was
+This file was extended by newlib $as_me 2.4.0, which was
generated by GNU Autoconf 2.68. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -4064,7 +4064,7 @@ _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
-newlib config.status 2.0.0
+newlib config.status 2.4.0
configured by $0, generated by GNU Autoconf 2.68,
with options \\"\$ac_cs_config\\"
diff --git a/newlib/libc/sys/sysvi386/configure b/newlib/libc/sys/sysvi386/configure
index 2c6a50735..08e832503 100755
--- a/newlib/libc/sys/sysvi386/configure
+++ b/newlib/libc/sys/sysvi386/configure
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.68 for newlib 2.0.0.
+# Generated by GNU Autoconf 2.68 for newlib 2.4.0.
#
#
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
@@ -556,8 +556,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='newlib'
PACKAGE_TARNAME='newlib'
-PACKAGE_VERSION='2.0.0'
-PACKAGE_STRING='newlib 2.0.0'
+PACKAGE_VERSION='2.4.0'
+PACKAGE_STRING='newlib 2.4.0'
PACKAGE_BUGREPORT=''
PACKAGE_URL=''
@@ -1239,7 +1239,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures newlib 2.0.0 to adapt to many kinds of systems.
+\`configure' configures newlib 2.4.0 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1309,7 +1309,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of newlib 2.0.0:";;
+ short | recursive ) echo "Configuration of newlib 2.4.0:";;
esac
cat <<\_ACEOF
@@ -1400,7 +1400,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-newlib configure 2.0.0
+newlib configure 2.4.0
generated by GNU Autoconf 2.68
Copyright (C) 2010 Free Software Foundation, Inc.
@@ -1455,7 +1455,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by newlib $as_me 2.0.0, which was
+It was created by newlib $as_me 2.4.0, which was
generated by GNU Autoconf 2.68. Invocation command line was
$ $0 $@
@@ -2527,7 +2527,7 @@ fi
# Define the identity of the package.
PACKAGE='newlib'
- VERSION='2.0.0'
+ VERSION='2.4.0'
# Some tools Automake needs.
@@ -4007,7 +4007,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by newlib $as_me 2.0.0, which was
+This file was extended by newlib $as_me 2.4.0, which was
generated by GNU Autoconf 2.68. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -4064,7 +4064,7 @@ _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
-newlib config.status 2.0.0
+newlib config.status 2.4.0
configured by $0, generated by GNU Autoconf 2.68,
with options \\"\$ac_cs_config\\"
diff --git a/newlib/libc/sys/sysvi386/sys/dirent.h b/newlib/libc/sys/sysvi386/sys/dirent.h
index 728042176..06af4faac 100644
--- a/newlib/libc/sys/sysvi386/sys/dirent.h
+++ b/newlib/libc/sys/sysvi386/sys/dirent.h
@@ -20,6 +20,8 @@ typedef struct _dirdesc {
DIR *opendir (const char *);
struct dirent *readdir (DIR *);
+int readdir_r (DIR *__restrict, struct dirent *__restrict,
+ struct dirent **__restrict);
void rewinddir (DIR *);
int closedir (DIR *);
diff --git a/newlib/libc/sys/sysvnecv70/configure b/newlib/libc/sys/sysvnecv70/configure
index 6eb77f600..d1fdf7025 100755
--- a/newlib/libc/sys/sysvnecv70/configure
+++ b/newlib/libc/sys/sysvnecv70/configure
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.68 for newlib 2.0.0.
+# Generated by GNU Autoconf 2.68 for newlib 2.4.0.
#
#
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
@@ -556,8 +556,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='newlib'
PACKAGE_TARNAME='newlib'
-PACKAGE_VERSION='2.0.0'
-PACKAGE_STRING='newlib 2.0.0'
+PACKAGE_VERSION='2.4.0'
+PACKAGE_STRING='newlib 2.4.0'
PACKAGE_BUGREPORT=''
PACKAGE_URL=''
@@ -1239,7 +1239,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures newlib 2.0.0 to adapt to many kinds of systems.
+\`configure' configures newlib 2.4.0 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1309,7 +1309,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of newlib 2.0.0:";;
+ short | recursive ) echo "Configuration of newlib 2.4.0:";;
esac
cat <<\_ACEOF
@@ -1400,7 +1400,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-newlib configure 2.0.0
+newlib configure 2.4.0
generated by GNU Autoconf 2.68
Copyright (C) 2010 Free Software Foundation, Inc.
@@ -1455,7 +1455,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by newlib $as_me 2.0.0, which was
+It was created by newlib $as_me 2.4.0, which was
generated by GNU Autoconf 2.68. Invocation command line was
$ $0 $@
@@ -2527,7 +2527,7 @@ fi
# Define the identity of the package.
PACKAGE='newlib'
- VERSION='2.0.0'
+ VERSION='2.4.0'
# Some tools Automake needs.
@@ -4007,7 +4007,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by newlib $as_me 2.0.0, which was
+This file was extended by newlib $as_me 2.4.0, which was
generated by GNU Autoconf 2.68. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -4064,7 +4064,7 @@ _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
-newlib config.status 2.0.0
+newlib config.status 2.4.0
configured by $0, generated by GNU Autoconf 2.68,
with options \\"\$ac_cs_config\\"
diff --git a/newlib/libc/sys/tic80/configure b/newlib/libc/sys/tic80/configure
index ee767b868..c7f25afcf 100755
--- a/newlib/libc/sys/tic80/configure
+++ b/newlib/libc/sys/tic80/configure
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.68 for newlib 2.0.0.
+# Generated by GNU Autoconf 2.68 for newlib 2.4.0.
#
#
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
@@ -556,8 +556,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='newlib'
PACKAGE_TARNAME='newlib'
-PACKAGE_VERSION='2.0.0'
-PACKAGE_STRING='newlib 2.0.0'
+PACKAGE_VERSION='2.4.0'
+PACKAGE_STRING='newlib 2.4.0'
PACKAGE_BUGREPORT=''
PACKAGE_URL=''
@@ -1239,7 +1239,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures newlib 2.0.0 to adapt to many kinds of systems.
+\`configure' configures newlib 2.4.0 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1309,7 +1309,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of newlib 2.0.0:";;
+ short | recursive ) echo "Configuration of newlib 2.4.0:";;
esac
cat <<\_ACEOF
@@ -1400,7 +1400,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-newlib configure 2.0.0
+newlib configure 2.4.0
generated by GNU Autoconf 2.68
Copyright (C) 2010 Free Software Foundation, Inc.
@@ -1455,7 +1455,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by newlib $as_me 2.0.0, which was
+It was created by newlib $as_me 2.4.0, which was
generated by GNU Autoconf 2.68. Invocation command line was
$ $0 $@
@@ -2527,7 +2527,7 @@ fi
# Define the identity of the package.
PACKAGE='newlib'
- VERSION='2.0.0'
+ VERSION='2.4.0'
# Some tools Automake needs.
@@ -4007,7 +4007,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by newlib $as_me 2.0.0, which was
+This file was extended by newlib $as_me 2.4.0, which was
generated by GNU Autoconf 2.68. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -4064,7 +4064,7 @@ _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
-newlib config.status 2.0.0
+newlib config.status 2.4.0
configured by $0, generated by GNU Autoconf 2.68,
with options \\"\$ac_cs_config\\"
diff --git a/newlib/libc/sys/arc/Makefile.am b/newlib/libc/sys/tirtos/Makefile.am
index bd9bbc122..fc6d1f37e 100644
--- a/newlib/libc/sys/arc/Makefile.am
+++ b/newlib/libc/sys/tirtos/Makefile.am
@@ -8,12 +8,9 @@ AM_CCASFLAGS = $(INCLUDES)
noinst_LIBRARIES = lib.a
-lib_a_SOURCES = isatty.c mem-layout.c sbrk.c syscalls.c
-EXTRA_lib_a_SOURCES = dummy.S
+lib_a_SOURCES = lock.c
lib_a_CCASFLAGS = $(AM_CCASFLAGS)
lib_a_CFLAGS = $(AM_CFLAGS)
-all-local: crt0.o
-
ACLOCAL_AMFLAGS = -I ../../.. -I ../../../..
CONFIG_STATUS_DEPENDENCIES = $(newlib_basedir)/configure.host
diff --git a/newlib/libc/sys/tirtos/Makefile.in b/newlib/libc/sys/tirtos/Makefile.in
new file mode 100644
index 000000000..357cab883
--- /dev/null
+++ b/newlib/libc/sys/tirtos/Makefile.in
@@ -0,0 +1,438 @@
+# Makefile.in generated by automake 1.11.6 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 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@
+
+VPATH = @srcdir@
+am__make_dryrun = \
+ { \
+ am__dry=no; \
+ case $$MAKEFLAGS in \
+ *\\[\ \ ]*) \
+ echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \
+ | grep '^AM OK$$' >/dev/null || am__dry=yes;; \
+ *) \
+ for am__flg in $$MAKEFLAGS; do \
+ case $$am__flg in \
+ *=*|--*) ;; \
+ *n*) am__dry=yes; break;; \
+ esac; \
+ done;; \
+ esac; \
+ test $$am__dry = yes; \
+ }
+pkgdatadir = $(datadir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+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@
+subdir = .
+DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
+ $(top_srcdir)/configure $(am__configure_deps) \
+ $(srcdir)/../../../../mkinstalldirs
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/../../../acinclude.m4 \
+ $(top_srcdir)/configure.in
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+ $(ACLOCAL_M4)
+am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
+ configure.lineno config.status.lineno
+mkinstalldirs = $(SHELL) $(top_srcdir)/../../../../mkinstalldirs
+CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+LIBRARIES = $(noinst_LIBRARIES)
+ARFLAGS = cru
+lib_a_AR = $(AR) $(ARFLAGS)
+lib_a_LIBADD =
+am_lib_a_OBJECTS = lib_a-lock.$(OBJEXT)
+lib_a_OBJECTS = $(am_lib_a_OBJECTS)
+DEFAULT_INCLUDES = -I.@am__isrc@
+depcomp =
+am__depfiles_maybe =
+COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+CCLD = $(CC)
+LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
+SOURCES = $(lib_a_SOURCES)
+am__can_run_installinfo = \
+ case $$AM_UPDATE_INFO_DIR in \
+ n|no|NO) false;; \
+ *) (install-info --version) >/dev/null 2>&1;; \
+ esac
+ETAGS = etags
+CTAGS = ctags
+ACLOCAL = @ACLOCAL@
+AMTAR = @AMTAR@
+AR = @AR@
+AS = @AS@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CC = @CC@
+CCAS = @CCAS@
+CCASFLAGS = @CCASFLAGS@
+CCDEPMODE = @CCDEPMODE@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LDFLAGS = @LDFLAGS@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LTLIBOBJS = @LTLIBOBJS@
+MAINT = @MAINT@
+MAKEINFO = @MAKEINFO@
+MKDIR_P = @MKDIR_P@
+NEWLIB_CFLAGS = @NEWLIB_CFLAGS@
+NO_INCLUDE_LIST = @NO_INCLUDE_LIST@
+OBJEXT = @OBJEXT@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+RANLIB = @RANLIB@
+READELF = @READELF@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+VERSION = @VERSION@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+aext = @aext@
+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@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+libm_machine_dir = @libm_machine_dir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+lpfx = @lpfx@
+machine_dir = @machine_dir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+newlib_basedir = @newlib_basedir@
+oext = @oext@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sys_dir = @sys_dir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+AUTOMAKE_OPTIONS = cygnus
+INCLUDES = $(NEWLIB_CFLAGS) $(CROSS_CFLAGS) $(TARGET_CFLAGS)
+AM_CCASFLAGS = $(INCLUDES)
+noinst_LIBRARIES = lib.a
+lib_a_SOURCES = lock.c
+lib_a_CCASFLAGS = $(AM_CCASFLAGS)
+lib_a_CFLAGS = $(AM_CFLAGS)
+ACLOCAL_AMFLAGS = -I ../../.. -I ../../../..
+CONFIG_STATUS_DEPENDENCIES = $(newlib_basedir)/configure.host
+all: all-am
+
+.SUFFIXES:
+.SUFFIXES: .c .o .obj
+am--refresh: Makefile
+ @:
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
+ @for dep in $?; do \
+ case '$(am__configure_deps)' in \
+ *$$dep*) \
+ echo ' cd $(srcdir) && $(AUTOMAKE) --cygnus'; \
+ $(am__cd) $(srcdir) && $(AUTOMAKE) --cygnus \
+ && exit 0; \
+ exit 1;; \
+ esac; \
+ done; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --cygnus Makefile'; \
+ $(am__cd) $(top_srcdir) && \
+ $(AUTOMAKE) --cygnus Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ @case '$?' in \
+ *config.status*) \
+ echo ' $(SHELL) ./config.status'; \
+ $(SHELL) ./config.status;; \
+ *) \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \
+ esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+ $(SHELL) ./config.status --recheck
+
+$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
+ $(am__cd) $(srcdir) && $(AUTOCONF)
+$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
+ $(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
+$(am__aclocal_m4_deps):
+
+clean-noinstLIBRARIES:
+ -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES)
+lib.a: $(lib_a_OBJECTS) $(lib_a_DEPENDENCIES) $(EXTRA_lib_a_DEPENDENCIES)
+ -rm -f lib.a
+ $(lib_a_AR) lib.a $(lib_a_OBJECTS) $(lib_a_LIBADD)
+ $(RANLIB) lib.a
+
+mostlyclean-compile:
+ -rm -f *.$(OBJEXT)
+
+distclean-compile:
+ -rm -f *.tab.c
+
+.c.o:
+ $(COMPILE) -c $<
+
+.c.obj:
+ $(COMPILE) -c `$(CYGPATH_W) '$<'`
+
+lib_a-lock.o: lock.c
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-lock.o `test -f 'lock.c' || echo '$(srcdir)/'`lock.c
+
+lib_a-lock.obj: lock.c
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-lock.obj `if test -f 'lock.c'; then $(CYGPATH_W) 'lock.c'; else $(CYGPATH_W) '$(srcdir)/lock.c'; fi`
+
+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; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ mkid -fID $$unique
+tags: TAGS
+
+TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ set x; \
+ 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; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ shift; \
+ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
+ test -n "$$unique" || unique=$$empty_fix; \
+ if test $$# -gt 0; then \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ "$$@" $$unique; \
+ else \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ $$unique; \
+ fi; \
+ fi
+ctags: CTAGS
+CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ 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; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ test -z "$(CTAGS_ARGS)$$unique" \
+ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+ $$unique
+
+GTAGS:
+ here=`$(am__cd) $(top_builddir) && pwd` \
+ && $(am__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)
+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:
+ if test -z '$(STRIP)'; then \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ install; \
+ else \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
+ fi
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+ -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+ -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_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-noinstLIBRARIES mostlyclean-am
+
+distclean: distclean-am
+ -rm -f $(am__CONFIG_DISTCLEAN_FILES)
+ -rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+ distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+html-am:
+
+info: info-am
+
+info-am:
+
+install-data-am:
+
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
+install-exec-am:
+
+install-html: install-html-am
+
+install-html-am:
+
+install-info: install-info-am
+
+install-info-am:
+
+install-man:
+
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+ -rm -f $(am__CONFIG_DISTCLEAN_FILES)
+ -rm -rf $(top_srcdir)/autom4te.cache
+ -rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am:
+
+.MAKE: install-am install-strip
+
+.PHONY: CTAGS GTAGS all all-am am--refresh check check-am clean \
+ clean-generic clean-noinstLIBRARIES ctags distclean \
+ distclean-compile distclean-generic distclean-tags dvi dvi-am \
+ html html-am info info-am install install-am install-data \
+ install-data-am install-dvi install-dvi-am install-exec \
+ install-exec-am install-html install-html-am install-info \
+ install-info-am install-man install-pdf install-pdf-am \
+ install-ps install-ps-am install-strip installcheck \
+ installcheck-am installdirs maintainer-clean \
+ maintainer-clean-generic mostlyclean mostlyclean-compile \
+ mostlyclean-generic pdf pdf-am ps ps-am tags uninstall \
+ uninstall-am
+
+
+# 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/sys/tirtos/aclocal.m4 b/newlib/libc/sys/tirtos/aclocal.m4
new file mode 100644
index 000000000..18dab02aa
--- /dev/null
+++ b/newlib/libc/sys/tirtos/aclocal.m4
@@ -0,0 +1,1012 @@
+# generated automatically by aclocal 1.11.6 -*- Autoconf -*-
+
+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
+# 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation,
+# Inc.
+# This file 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.
+
+m4_ifndef([AC_AUTOCONF_VERSION],
+ [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
+m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.68],,
+[m4_warning([this file was generated for autoconf 2.68.
+You have another version of autoconf. It may work, but is not guaranteed to.
+If you have problems, you may need to regenerate the build system entirely.
+To do so, use the procedure documented by the package, typically `autoreconf'.])])
+
+# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008, 2011 Free Software
+# Foundation, Inc.
+#
+# This file 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.
+
+# serial 1
+
+# AM_AUTOMAKE_VERSION(VERSION)
+# ----------------------------
+# Automake X.Y traces this macro to ensure aclocal.m4 has been
+# generated from the m4 files accompanying Automake X.Y.
+# (This private macro should not be called outside this file.)
+AC_DEFUN([AM_AUTOMAKE_VERSION],
+[am__api_version='1.11'
+dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
+dnl require some minimum version. Point them to the right macro.
+m4_if([$1], [1.11.6], [],
+ [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
+])
+
+# _AM_AUTOCONF_VERSION(VERSION)
+# -----------------------------
+# aclocal traces this macro to find the Autoconf version.
+# This is a private macro too. Using m4_define simplifies
+# the logic in aclocal, which can simply ignore this definition.
+m4_define([_AM_AUTOCONF_VERSION], [])
+
+# AM_SET_CURRENT_AUTOMAKE_VERSION
+# -------------------------------
+# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
+# This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
+AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
+[AM_AUTOMAKE_VERSION([1.11.6])dnl
+m4_ifndef([AC_AUTOCONF_VERSION],
+ [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
+_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
+
+# AM_AUX_DIR_EXPAND -*- Autoconf -*-
+
+# Copyright (C) 2001, 2003, 2005, 2011 Free Software Foundation, Inc.
+#
+# This file 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.
+
+# serial 1
+
+# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
+# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to
+# `$srcdir', `$srcdir/..', or `$srcdir/../..'.
+#
+# Of course, Automake must honor this variable whenever it calls a
+# tool from the auxiliary directory. The problem is that $srcdir (and
+# therefore $ac_aux_dir as well) can be either absolute or relative,
+# depending on how configure is run. This is pretty annoying, since
+# it makes $ac_aux_dir quite unusable in subdirectories: in the top
+# source directory, any form will work fine, but in subdirectories a
+# relative path needs to be adjusted first.
+#
+# $ac_aux_dir/missing
+# fails when called from a subdirectory if $ac_aux_dir is relative
+# $top_srcdir/$ac_aux_dir/missing
+# fails if $ac_aux_dir is absolute,
+# fails when called from a subdirectory in a VPATH build with
+# a relative $ac_aux_dir
+#
+# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
+# are both prefixed by $srcdir. In an in-source build this is usually
+# harmless because $srcdir is `.', but things will broke when you
+# start a VPATH build or use an absolute $srcdir.
+#
+# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
+# iff we strip the leading $srcdir from $ac_aux_dir. That would be:
+# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
+# and then we would define $MISSING as
+# MISSING="\${SHELL} $am_aux_dir/missing"
+# This will work as long as MISSING is not called from configure, because
+# unfortunately $(top_srcdir) has no meaning in configure.
+# However there are other variables, like CC, which are often used in
+# configure, and could therefore not use this "fixed" $ac_aux_dir.
+#
+# Another solution, used here, is to always expand $ac_aux_dir to an
+# absolute PATH. The drawback is that using absolute paths prevent a
+# configured tree to be moved without reconfiguration.
+
+AC_DEFUN([AM_AUX_DIR_EXPAND],
+[dnl Rely on autoconf to set up CDPATH properly.
+AC_PREREQ([2.50])dnl
+# expand $ac_aux_dir to an absolute path
+am_aux_dir=`cd $ac_aux_dir && pwd`
+])
+
+# AM_CONDITIONAL -*- Autoconf -*-
+
+# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008
+# Free Software Foundation, Inc.
+#
+# This file 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.
+
+# serial 9
+
+# AM_CONDITIONAL(NAME, SHELL-CONDITION)
+# -------------------------------------
+# Define a conditional.
+AC_DEFUN([AM_CONDITIONAL],
+[AC_PREREQ(2.52)dnl
+ ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])],
+ [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
+AC_SUBST([$1_TRUE])dnl
+AC_SUBST([$1_FALSE])dnl
+_AM_SUBST_NOTMAKE([$1_TRUE])dnl
+_AM_SUBST_NOTMAKE([$1_FALSE])dnl
+m4_define([_AM_COND_VALUE_$1], [$2])dnl
+if $2; then
+ $1_TRUE=
+ $1_FALSE='#'
+else
+ $1_TRUE='#'
+ $1_FALSE=
+fi
+AC_CONFIG_COMMANDS_PRE(
+[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
+ AC_MSG_ERROR([[conditional "$1" was never defined.
+Usually this means the macro was only invoked conditionally.]])
+fi])])
+
+# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009,
+# 2010, 2011 Free Software Foundation, Inc.
+#
+# This file 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.
+
+# serial 12
+
+# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
+# written in clear, in which case automake, when reading aclocal.m4,
+# will think it sees a *use*, and therefore will trigger all it's
+# C support machinery. Also note that it means that autoscan, seeing
+# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
+
+
+# _AM_DEPENDENCIES(NAME)
+# ----------------------
+# See how the compiler implements dependency checking.
+# NAME is "CC", "CXX", "GCJ", or "OBJC".
+# We try a few techniques and use that to set a single cache variable.
+#
+# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
+# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
+# dependency, and given that the user is not expected to run this macro,
+# just rely on AC_PROG_CC.
+AC_DEFUN([_AM_DEPENDENCIES],
+[AC_REQUIRE([AM_SET_DEPDIR])dnl
+AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
+AC_REQUIRE([AM_MAKE_INCLUDE])dnl
+AC_REQUIRE([AM_DEP_TRACK])dnl
+
+ifelse([$1], CC, [depcc="$CC" am_compiler_list=],
+ [$1], CXX, [depcc="$CXX" am_compiler_list=],
+ [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
+ [$1], UPC, [depcc="$UPC" am_compiler_list=],
+ [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'],
+ [depcc="$$1" am_compiler_list=])
+
+AC_CACHE_CHECK([dependency style of $depcc],
+ [am_cv_$1_dependencies_compiler_type],
+[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
+ # We make a subdir and do the tests there. Otherwise we can end up
+ # making bogus files that we don't know about and never remove. For
+ # instance it was reported that on HP-UX the gcc test will end up
+ # making a dummy file named `D' -- because `-MD' means `put the output
+ # in D'.
+ rm -rf conftest.dir
+ mkdir conftest.dir
+ # Copy depcomp to subdir because otherwise we won't find it if we're
+ # using a relative directory.
+ cp "$am_depcomp" conftest.dir
+ cd conftest.dir
+ # We will build objects and dependencies in a subdirectory because
+ # it helps to detect inapplicable dependency modes. For instance
+ # both Tru64's cc and ICC support -MD to output dependencies as a
+ # side effect of compilation, but ICC will put the dependencies in
+ # the current directory while Tru64 will put them in the object
+ # directory.
+ mkdir sub
+
+ am_cv_$1_dependencies_compiler_type=none
+ if test "$am_compiler_list" = ""; then
+ am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
+ fi
+ am__universal=false
+ m4_case([$1], [CC],
+ [case " $depcc " in #(
+ *\ -arch\ *\ -arch\ *) am__universal=true ;;
+ esac],
+ [CXX],
+ [case " $depcc " in #(
+ *\ -arch\ *\ -arch\ *) am__universal=true ;;
+ esac])
+
+ for depmode in $am_compiler_list; do
+ # Setup a source with many dependencies, because some compilers
+ # like to wrap large dependency lists on column 80 (with \), and
+ # we should not choose a depcomp mode which is confused by this.
+ #
+ # We need to recreate these files for each test, as the compiler may
+ # overwrite some of them when testing with obscure command lines.
+ # This happens at least with the AIX C compiler.
+ : > sub/conftest.c
+ for i in 1 2 3 4 5 6; do
+ echo '#include "conftst'$i'.h"' >> sub/conftest.c
+ # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
+ # Solaris 8's {/usr,}/bin/sh.
+ touch sub/conftst$i.h
+ done
+ echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
+
+ # We check with `-c' and `-o' for the sake of the "dashmstdout"
+ # mode. It turns out that the SunPro C++ compiler does not properly
+ # handle `-M -o', and we need to detect this. Also, some Intel
+ # versions had trouble with output in subdirs
+ am__obj=sub/conftest.${OBJEXT-o}
+ am__minus_obj="-o $am__obj"
+ case $depmode in
+ gcc)
+ # This depmode causes a compiler race in universal mode.
+ test "$am__universal" = false || continue
+ ;;
+ nosideeffect)
+ # after this tag, mechanisms are not by side-effect, so they'll
+ # only be used when explicitly requested
+ if test "x$enable_dependency_tracking" = xyes; then
+ continue
+ else
+ break
+ fi
+ ;;
+ msvc7 | msvc7msys | msvisualcpp | msvcmsys)
+ # This compiler won't grok `-c -o', but also, the minuso test has
+ # not run yet. These depmodes are late enough in the game, and
+ # so weak that their functioning should not be impacted.
+ am__obj=conftest.${OBJEXT-o}
+ am__minus_obj=
+ ;;
+ none) break ;;
+ esac
+ if depmode=$depmode \
+ source=sub/conftest.c object=$am__obj \
+ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
+ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
+ >/dev/null 2>conftest.err &&
+ grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
+ grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
+ grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
+ ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
+ # icc doesn't choke on unknown options, it will just issue warnings
+ # or remarks (even with -Werror). So we grep stderr for any message
+ # that says an option was ignored or not supported.
+ # When given -MP, icc 7.0 and 7.1 complain thusly:
+ # icc: Command line warning: ignoring option '-M'; no argument required
+ # The diagnosis changed in icc 8.0:
+ # icc: Command line remark: option '-MP' not supported
+ if (grep 'ignoring option' conftest.err ||
+ grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
+ am_cv_$1_dependencies_compiler_type=$depmode
+ break
+ fi
+ fi
+ done
+
+ cd ..
+ rm -rf conftest.dir
+else
+ am_cv_$1_dependencies_compiler_type=none
+fi
+])
+AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
+AM_CONDITIONAL([am__fastdep$1], [
+ test "x$enable_dependency_tracking" != xno \
+ && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
+])
+
+
+# AM_SET_DEPDIR
+# -------------
+# Choose a directory name for dependency files.
+# This macro is AC_REQUIREd in _AM_DEPENDENCIES
+AC_DEFUN([AM_SET_DEPDIR],
+[AC_REQUIRE([AM_SET_LEADING_DOT])dnl
+AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
+])
+
+
+# AM_DEP_TRACK
+# ------------
+AC_DEFUN([AM_DEP_TRACK],
+[AC_ARG_ENABLE(dependency-tracking,
+[ --disable-dependency-tracking speeds up one-time build
+ --enable-dependency-tracking do not reject slow dependency extractors])
+if test "x$enable_dependency_tracking" != xno; then
+ am_depcomp="$ac_aux_dir/depcomp"
+ AMDEPBACKSLASH='\'
+ am__nodep='_no'
+fi
+AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
+AC_SUBST([AMDEPBACKSLASH])dnl
+_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
+AC_SUBST([am__nodep])dnl
+_AM_SUBST_NOTMAKE([am__nodep])dnl
+])
+
+# Generate code to set up dependency tracking. -*- Autoconf -*-
+
+# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008
+# Free Software Foundation, Inc.
+#
+# This file 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.
+
+#serial 5
+
+# _AM_OUTPUT_DEPENDENCY_COMMANDS
+# ------------------------------
+AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
+[{
+ # Autoconf 2.62 quotes --file arguments for eval, but not when files
+ # are listed without --file. Let's play safe and only enable the eval
+ # if we detect the quoting.
+ case $CONFIG_FILES in
+ *\'*) eval set x "$CONFIG_FILES" ;;
+ *) set x $CONFIG_FILES ;;
+ esac
+ shift
+ for mf
+ do
+ # Strip MF so we end up with the name of the file.
+ mf=`echo "$mf" | sed -e 's/:.*$//'`
+ # Check whether this is an Automake generated Makefile or not.
+ # We used to match only the files named `Makefile.in', but
+ # some people rename them; so instead we look at the file content.
+ # Grep'ing the first line is not enough: some people post-process
+ # each Makefile.in and add a new line on top of each file to say so.
+ # Grep'ing the whole file is not good either: AIX grep has a line
+ # limit of 2048, but all sed's we know have understand at least 4000.
+ if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
+ dirpart=`AS_DIRNAME("$mf")`
+ else
+ continue
+ fi
+ # Extract the definition of DEPDIR, am__include, and am__quote
+ # from the Makefile without running `make'.
+ DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
+ test -z "$DEPDIR" && continue
+ am__include=`sed -n 's/^am__include = //p' < "$mf"`
+ test -z "am__include" && continue
+ am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
+ # When using ansi2knr, U may be empty or an underscore; expand it
+ U=`sed -n 's/^U = //p' < "$mf"`
+ # Find all dependency output files, they are included files with
+ # $(DEPDIR) in their names. We invoke sed twice because it is the
+ # simplest approach to changing $(DEPDIR) to its actual value in the
+ # expansion.
+ for file in `sed -n "
+ s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
+ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
+ # Make sure the directory exists.
+ test -f "$dirpart/$file" && continue
+ fdir=`AS_DIRNAME(["$file"])`
+ AS_MKDIR_P([$dirpart/$fdir])
+ # echo "creating $dirpart/$file"
+ echo '# dummy' > "$dirpart/$file"
+ done
+ done
+}
+])# _AM_OUTPUT_DEPENDENCY_COMMANDS
+
+
+# AM_OUTPUT_DEPENDENCY_COMMANDS
+# -----------------------------
+# This macro should only be invoked once -- use via AC_REQUIRE.
+#
+# This code is only required when automatic dependency tracking
+# is enabled. FIXME. This creates each `.P' file that we will
+# need in order to bootstrap the dependency handling code.
+AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
+[AC_CONFIG_COMMANDS([depfiles],
+ [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
+ [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
+])
+
+# Do all the work for Automake. -*- Autoconf -*-
+
+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
+# 2005, 2006, 2008, 2009 Free Software Foundation, Inc.
+#
+# This file 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.
+
+# serial 16
+
+# This macro actually does too much. Some checks are only needed if
+# your package does certain things. But this isn't really a big deal.
+
+# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
+# AM_INIT_AUTOMAKE([OPTIONS])
+# -----------------------------------------------
+# The call with PACKAGE and VERSION arguments is the old style
+# call (pre autoconf-2.50), which is being phased out. PACKAGE
+# and VERSION should now be passed to AC_INIT and removed from
+# the call to AM_INIT_AUTOMAKE.
+# We support both call styles for the transition. After
+# the next Automake release, Autoconf can make the AC_INIT
+# arguments mandatory, and then we can depend on a new Autoconf
+# release and drop the old call support.
+AC_DEFUN([AM_INIT_AUTOMAKE],
+[AC_PREREQ([2.62])dnl
+dnl Autoconf wants to disallow AM_ names. We explicitly allow
+dnl the ones we care about.
+m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
+AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
+AC_REQUIRE([AC_PROG_INSTALL])dnl
+if test "`cd $srcdir && pwd`" != "`pwd`"; then
+ # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
+ # is not polluted with repeated "-I."
+ AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
+ # test to see if srcdir already configured
+ if test -f $srcdir/config.status; then
+ AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
+ fi
+fi
+
+# test whether we have cygpath
+if test -z "$CYGPATH_W"; then
+ if (cygpath --version) >/dev/null 2>/dev/null; then
+ CYGPATH_W='cygpath -w'
+ else
+ CYGPATH_W=echo
+ fi
+fi
+AC_SUBST([CYGPATH_W])
+
+# Define the identity of the package.
+dnl Distinguish between old-style and new-style calls.
+m4_ifval([$2],
+[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
+ AC_SUBST([PACKAGE], [$1])dnl
+ AC_SUBST([VERSION], [$2])],
+[_AM_SET_OPTIONS([$1])dnl
+dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
+m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,,
+ [m4_fatal([AC_INIT should be called with package and version arguments])])dnl
+ AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
+ AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
+
+_AM_IF_OPTION([no-define],,
+[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
+ AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
+
+# Some tools Automake needs.
+AC_REQUIRE([AM_SANITY_CHECK])dnl
+AC_REQUIRE([AC_ARG_PROGRAM])dnl
+AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
+AM_MISSING_PROG(AUTOCONF, autoconf)
+AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
+AM_MISSING_PROG(AUTOHEADER, autoheader)
+AM_MISSING_PROG(MAKEINFO, makeinfo)
+AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
+AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl
+AC_REQUIRE([AM_PROG_MKDIR_P])dnl
+# We need awk for the "check" target. The system "awk" is bad on
+# some platforms.
+AC_REQUIRE([AC_PROG_AWK])dnl
+AC_REQUIRE([AC_PROG_MAKE_SET])dnl
+AC_REQUIRE([AM_SET_LEADING_DOT])dnl
+_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
+ [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
+ [_AM_PROG_TAR([v7])])])
+_AM_IF_OPTION([no-dependencies],,
+[AC_PROVIDE_IFELSE([AC_PROG_CC],
+ [_AM_DEPENDENCIES(CC)],
+ [define([AC_PROG_CC],
+ defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
+AC_PROVIDE_IFELSE([AC_PROG_CXX],
+ [_AM_DEPENDENCIES(CXX)],
+ [define([AC_PROG_CXX],
+ defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
+AC_PROVIDE_IFELSE([AC_PROG_OBJC],
+ [_AM_DEPENDENCIES(OBJC)],
+ [define([AC_PROG_OBJC],
+ defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl
+])
+_AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl
+dnl The `parallel-tests' driver may need to know about EXEEXT, so add the
+dnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This macro
+dnl is hooked onto _AC_COMPILER_EXEEXT early, see below.
+AC_CONFIG_COMMANDS_PRE(dnl
+[m4_provide_if([_AM_COMPILER_EXEEXT],
+ [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
+])
+
+dnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion. Do not
+dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further
+dnl mangled by Autoconf and run in a shell conditional statement.
+m4_define([_AC_COMPILER_EXEEXT],
+m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])])
+
+
+# When config.status generates a header, we must update the stamp-h file.
+# This file resides in the same directory as the config header
+# that is generated. The stamp files are numbered to have different names.
+
+# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
+# loop where config.status creates the headers, so we can generate
+# our stamp files there.
+AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
+[# Compute $1's index in $config_headers.
+_am_arg=$1
+_am_stamp_count=1
+for _am_header in $config_headers :; do
+ case $_am_header in
+ $_am_arg | $_am_arg:* )
+ break ;;
+ * )
+ _am_stamp_count=`expr $_am_stamp_count + 1` ;;
+ esac
+done
+echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
+
+# Copyright (C) 2001, 2003, 2005, 2008, 2011 Free Software Foundation,
+# Inc.
+#
+# This file 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.
+
+# serial 1
+
+# AM_PROG_INSTALL_SH
+# ------------------
+# Define $install_sh.
+AC_DEFUN([AM_PROG_INSTALL_SH],
+[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
+if test x"${install_sh}" != xset; then
+ case $am_aux_dir in
+ *\ * | *\ *)
+ install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
+ *)
+ install_sh="\${SHELL} $am_aux_dir/install-sh"
+ esac
+fi
+AC_SUBST(install_sh)])
+
+# Copyright (C) 2003, 2005 Free Software Foundation, Inc.
+#
+# This file 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.
+
+# serial 2
+
+# Check whether the underlying file-system supports filenames
+# with a leading dot. For instance MS-DOS doesn't.
+AC_DEFUN([AM_SET_LEADING_DOT],
+[rm -rf .tst 2>/dev/null
+mkdir .tst 2>/dev/null
+if test -d .tst; then
+ am__leading_dot=.
+else
+ am__leading_dot=_
+fi
+rmdir .tst 2>/dev/null
+AC_SUBST([am__leading_dot])])
+
+# Add --enable-maintainer-mode option to configure. -*- Autoconf -*-
+# From Jim Meyering
+
+# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005, 2008,
+# 2011 Free Software Foundation, Inc.
+#
+# This file 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.
+
+# serial 5
+
+# AM_MAINTAINER_MODE([DEFAULT-MODE])
+# ----------------------------------
+# Control maintainer-specific portions of Makefiles.
+# Default is to disable them, unless `enable' is passed literally.
+# For symmetry, `disable' may be passed as well. Anyway, the user
+# can override the default with the --enable/--disable switch.
+AC_DEFUN([AM_MAINTAINER_MODE],
+[m4_case(m4_default([$1], [disable]),
+ [enable], [m4_define([am_maintainer_other], [disable])],
+ [disable], [m4_define([am_maintainer_other], [enable])],
+ [m4_define([am_maintainer_other], [enable])
+ m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])])
+AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
+ dnl maintainer-mode's default is 'disable' unless 'enable' is passed
+ AC_ARG_ENABLE([maintainer-mode],
+[ --][am_maintainer_other][-maintainer-mode am_maintainer_other make rules and dependencies not useful
+ (and sometimes confusing) to the casual installer],
+ [USE_MAINTAINER_MODE=$enableval],
+ [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes]))
+ AC_MSG_RESULT([$USE_MAINTAINER_MODE])
+ AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes])
+ MAINT=$MAINTAINER_MODE_TRUE
+ AC_SUBST([MAINT])dnl
+]
+)
+
+AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE])
+
+# Check to see how 'make' treats includes. -*- Autoconf -*-
+
+# Copyright (C) 2001, 2002, 2003, 2005, 2009 Free Software Foundation, Inc.
+#
+# This file 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.
+
+# serial 4
+
+# AM_MAKE_INCLUDE()
+# -----------------
+# Check to see how make treats includes.
+AC_DEFUN([AM_MAKE_INCLUDE],
+[am_make=${MAKE-make}
+cat > confinc << 'END'
+am__doit:
+ @echo this is the am__doit target
+.PHONY: am__doit
+END
+# If we don't find an include directive, just comment out the code.
+AC_MSG_CHECKING([for style of include used by $am_make])
+am__include="#"
+am__quote=
+_am_result=none
+# First try GNU make style include.
+echo "include confinc" > confmf
+# Ignore all kinds of additional output from `make'.
+case `$am_make -s -f confmf 2> /dev/null` in #(
+*the\ am__doit\ target*)
+ am__include=include
+ am__quote=
+ _am_result=GNU
+ ;;
+esac
+# Now try BSD make style include.
+if test "$am__include" = "#"; then
+ echo '.include "confinc"' > confmf
+ case `$am_make -s -f confmf 2> /dev/null` in #(
+ *the\ am__doit\ target*)
+ am__include=.include
+ am__quote="\""
+ _am_result=BSD
+ ;;
+ esac
+fi
+AC_SUBST([am__include])
+AC_SUBST([am__quote])
+AC_MSG_RESULT([$_am_result])
+rm -f confinc confmf
+])
+
+# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*-
+
+# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008
+# Free Software Foundation, Inc.
+#
+# This file 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.
+
+# serial 6
+
+# AM_MISSING_PROG(NAME, PROGRAM)
+# ------------------------------
+AC_DEFUN([AM_MISSING_PROG],
+[AC_REQUIRE([AM_MISSING_HAS_RUN])
+$1=${$1-"${am_missing_run}$2"}
+AC_SUBST($1)])
+
+
+# AM_MISSING_HAS_RUN
+# ------------------
+# Define MISSING if not defined so far and test if it supports --run.
+# If it does, set am_missing_run to use it, otherwise, to nothing.
+AC_DEFUN([AM_MISSING_HAS_RUN],
+[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
+AC_REQUIRE_AUX_FILE([missing])dnl
+if test x"${MISSING+set}" != xset; then
+ case $am_aux_dir in
+ *\ * | *\ *)
+ MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
+ *)
+ MISSING="\${SHELL} $am_aux_dir/missing" ;;
+ esac
+fi
+# Use eval to expand $SHELL
+if eval "$MISSING --run true"; then
+ am_missing_run="$MISSING --run "
+else
+ am_missing_run=
+ AC_MSG_WARN([`missing' script is too old or missing])
+fi
+])
+
+# Copyright (C) 2003, 2004, 2005, 2006, 2011 Free Software Foundation,
+# Inc.
+#
+# This file 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.
+
+# serial 1
+
+# AM_PROG_MKDIR_P
+# ---------------
+# Check for `mkdir -p'.
+AC_DEFUN([AM_PROG_MKDIR_P],
+[AC_PREREQ([2.60])dnl
+AC_REQUIRE([AC_PROG_MKDIR_P])dnl
+dnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P,
+dnl while keeping a definition of mkdir_p for backward compatibility.
+dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile.
+dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of
+dnl Makefile.ins that do not define MKDIR_P, so we do our own
+dnl adjustment using top_builddir (which is defined more often than
+dnl MKDIR_P).
+AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl
+case $mkdir_p in
+ [[\\/$]]* | ?:[[\\/]]*) ;;
+ */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
+esac
+])
+
+# Helper functions for option handling. -*- Autoconf -*-
+
+# Copyright (C) 2001, 2002, 2003, 2005, 2008, 2010 Free Software
+# Foundation, Inc.
+#
+# This file 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.
+
+# serial 5
+
+# _AM_MANGLE_OPTION(NAME)
+# -----------------------
+AC_DEFUN([_AM_MANGLE_OPTION],
+[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
+
+# _AM_SET_OPTION(NAME)
+# --------------------
+# Set option NAME. Presently that only means defining a flag for this option.
+AC_DEFUN([_AM_SET_OPTION],
+[m4_define(_AM_MANGLE_OPTION([$1]), 1)])
+
+# _AM_SET_OPTIONS(OPTIONS)
+# ------------------------
+# OPTIONS is a space-separated list of Automake options.
+AC_DEFUN([_AM_SET_OPTIONS],
+[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
+
+# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
+# -------------------------------------------
+# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
+AC_DEFUN([_AM_IF_OPTION],
+[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
+
+# Check to make sure that the build environment is sane. -*- Autoconf -*-
+
+# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008
+# Free Software Foundation, Inc.
+#
+# This file 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.
+
+# serial 5
+
+# AM_SANITY_CHECK
+# ---------------
+AC_DEFUN([AM_SANITY_CHECK],
+[AC_MSG_CHECKING([whether build environment is sane])
+# Just in case
+sleep 1
+echo timestamp > conftest.file
+# Reject unsafe characters in $srcdir or the absolute working directory
+# name. Accept space and tab only in the latter.
+am_lf='
+'
+case `pwd` in
+ *[[\\\"\#\$\&\'\`$am_lf]]*)
+ AC_MSG_ERROR([unsafe absolute working directory name]);;
+esac
+case $srcdir in
+ *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*)
+ AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);;
+esac
+
+# Do `set' in a subshell so we don't clobber the current shell's
+# arguments. Must try -L first in case configure is actually a
+# symlink; some systems play weird games with the mod time of symlinks
+# (eg FreeBSD returns the mod time of the symlink's containing
+# directory).
+if (
+ set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
+ if test "$[*]" = "X"; then
+ # -L didn't work.
+ set X `ls -t "$srcdir/configure" conftest.file`
+ fi
+ rm -f conftest.file
+ if test "$[*]" != "X $srcdir/configure conftest.file" \
+ && test "$[*]" != "X conftest.file $srcdir/configure"; then
+
+ # If neither matched, then we have a broken ls. This can happen
+ # if, for instance, CONFIG_SHELL is bash and it inherits a
+ # broken ls alias from the environment. This has actually
+ # happened. Such a system could not be considered "sane".
+ AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
+alias in your environment])
+ fi
+
+ test "$[2]" = conftest.file
+ )
+then
+ # Ok.
+ :
+else
+ AC_MSG_ERROR([newly created file is older than distributed files!
+Check your system clock])
+fi
+AC_MSG_RESULT(yes)])
+
+# Copyright (C) 2001, 2003, 2005, 2011 Free Software Foundation, Inc.
+#
+# This file 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.
+
+# serial 1
+
+# AM_PROG_INSTALL_STRIP
+# ---------------------
+# One issue with vendor `install' (even GNU) is that you can't
+# specify the program used to strip binaries. This is especially
+# annoying in cross-compiling environments, where the build's strip
+# is unlikely to handle the host's binaries.
+# Fortunately install-sh will honor a STRIPPROG variable, so we
+# always use install-sh in `make install-strip', and initialize
+# STRIPPROG with the value of the STRIP variable (set by the user).
+AC_DEFUN([AM_PROG_INSTALL_STRIP],
+[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
+# Installed binaries are usually stripped using `strip' when the user
+# run `make install-strip'. However `strip' might not be the right
+# tool to use in cross-compilation environments, therefore Automake
+# will honor the `STRIP' environment variable to overrule this program.
+dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
+if test "$cross_compiling" != no; then
+ AC_CHECK_TOOL([STRIP], [strip], :)
+fi
+INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
+AC_SUBST([INSTALL_STRIP_PROGRAM])])
+
+# Copyright (C) 2006, 2008, 2010 Free Software Foundation, Inc.
+#
+# This file 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.
+
+# serial 3
+
+# _AM_SUBST_NOTMAKE(VARIABLE)
+# ---------------------------
+# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
+# This macro is traced by Automake.
+AC_DEFUN([_AM_SUBST_NOTMAKE])
+
+# AM_SUBST_NOTMAKE(VARIABLE)
+# --------------------------
+# Public sister of _AM_SUBST_NOTMAKE.
+AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
+
+# Check how to create a tarball. -*- Autoconf -*-
+
+# Copyright (C) 2004, 2005, 2012 Free Software Foundation, Inc.
+#
+# This file 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.
+
+# serial 2
+
+# _AM_PROG_TAR(FORMAT)
+# --------------------
+# Check how to create a tarball in format FORMAT.
+# FORMAT should be one of `v7', `ustar', or `pax'.
+#
+# Substitute a variable $(am__tar) that is a command
+# writing to stdout a FORMAT-tarball containing the directory
+# $tardir.
+# tardir=directory && $(am__tar) > result.tar
+#
+# Substitute a variable $(am__untar) that extract such
+# a tarball read from stdin.
+# $(am__untar) < result.tar
+AC_DEFUN([_AM_PROG_TAR],
+[# Always define AMTAR for backward compatibility. Yes, it's still used
+# in the wild :-( We should find a proper way to deprecate it ...
+AC_SUBST([AMTAR], ['$${TAR-tar}'])
+m4_if([$1], [v7],
+ [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'],
+ [m4_case([$1], [ustar],, [pax],,
+ [m4_fatal([Unknown tar format])])
+AC_MSG_CHECKING([how to create a $1 tar archive])
+# Loop over all known methods to create a tar archive until one works.
+_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
+_am_tools=${am_cv_prog_tar_$1-$_am_tools}
+# Do not fold the above two line into one, because Tru64 sh and
+# Solaris sh will not grok spaces in the rhs of `-'.
+for _am_tool in $_am_tools
+do
+ case $_am_tool in
+ gnutar)
+ for _am_tar in tar gnutar gtar;
+ do
+ AM_RUN_LOG([$_am_tar --version]) && break
+ done
+ am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
+ am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
+ am__untar="$_am_tar -xf -"
+ ;;
+ plaintar)
+ # Must skip GNU tar: if it does not support --format= it doesn't create
+ # ustar tarball either.
+ (tar --version) >/dev/null 2>&1 && continue
+ am__tar='tar chf - "$$tardir"'
+ am__tar_='tar chf - "$tardir"'
+ am__untar='tar xf -'
+ ;;
+ pax)
+ am__tar='pax -L -x $1 -w "$$tardir"'
+ am__tar_='pax -L -x $1 -w "$tardir"'
+ am__untar='pax -r'
+ ;;
+ cpio)
+ am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
+ am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
+ am__untar='cpio -i -H $1 -d'
+ ;;
+ none)
+ am__tar=false
+ am__tar_=false
+ am__untar=false
+ ;;
+ esac
+
+ # If the value was cached, stop now. We just wanted to have am__tar
+ # and am__untar set.
+ test -n "${am_cv_prog_tar_$1}" && break
+
+ # tar/untar a dummy directory, and stop if the command works
+ rm -rf conftest.dir
+ mkdir conftest.dir
+ echo GrepMe > conftest.dir/file
+ AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
+ rm -rf conftest.dir
+ if test -s conftest.tar; then
+ AM_RUN_LOG([$am__untar <conftest.tar])
+ grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
+ fi
+done
+rm -rf conftest.dir
+
+AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
+AC_MSG_RESULT([$am_cv_prog_tar_$1])])
+AC_SUBST([am__tar])
+AC_SUBST([am__untar])
+]) # _AM_PROG_TAR
+
+m4_include([../../../acinclude.m4])
diff --git a/newlib/libc/sys/arc/configure b/newlib/libc/sys/tirtos/configure
index fa4c4f56d..5e6397c2a 100755
--- a/newlib/libc/sys/arc/configure
+++ b/newlib/libc/sys/tirtos/configure
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.68 for newlib 2.0.0.
+# Generated by GNU Autoconf 2.68 for newlib 2.4.0.
#
#
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
@@ -556,12 +556,12 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='newlib'
PACKAGE_TARNAME='newlib'
-PACKAGE_VERSION='2.0.0'
-PACKAGE_STRING='newlib 2.0.0'
+PACKAGE_VERSION='2.4.0'
+PACKAGE_STRING='newlib 2.4.0'
PACKAGE_BUGREPORT=''
PACKAGE_URL=''
-ac_unique_file="isatty.c"
+ac_unique_file="lock.c"
ac_subst_vars='LTLIBOBJS
LIBOBJS
sys_dir
@@ -1239,7 +1239,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures newlib 2.0.0 to adapt to many kinds of systems.
+\`configure' configures newlib 2.4.0 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1309,7 +1309,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of newlib 2.0.0:";;
+ short | recursive ) echo "Configuration of newlib 2.4.0:";;
esac
cat <<\_ACEOF
@@ -1400,7 +1400,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-newlib configure 2.0.0
+newlib configure 2.4.0
generated by GNU Autoconf 2.68
Copyright (C) 2010 Free Software Foundation, Inc.
@@ -1455,7 +1455,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by newlib $as_me 2.0.0, which was
+It was created by newlib $as_me 2.4.0, which was
generated by GNU Autoconf 2.68. Invocation command line was
$ $0 $@
@@ -2527,7 +2527,7 @@ fi
# Define the identity of the package.
PACKAGE='newlib'
- VERSION='2.0.0'
+ VERSION='2.4.0'
# Some tools Automake needs.
@@ -4007,7 +4007,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by newlib $as_me 2.0.0, which was
+This file was extended by newlib $as_me 2.4.0, which was
generated by GNU Autoconf 2.68. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -4064,7 +4064,7 @@ _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
-newlib config.status 2.0.0
+newlib config.status 2.4.0
configured by $0, generated by GNU Autoconf 2.68,
with options \\"\$ac_cs_config\\"
diff --git a/newlib/libc/sys/arc/configure.in b/newlib/libc/sys/tirtos/configure.in
index 6651f71c1..461301f75 100644
--- a/newlib/libc/sys/arc/configure.in
+++ b/newlib/libc/sys/tirtos/configure.in
@@ -1,9 +1,9 @@
-dnl This is the newlib/libc/sys/arc configure.in file.
+dnl This is the newlib/libc/sys/tirtos configure.in file.
dnl Process this file with autoconf to produce a configure script.
AC_PREREQ(2.59)
AC_INIT([newlib],[NEWLIB_VERSION])
-AC_CONFIG_SRCDIR([isatty.c])
+AC_CONFIG_SRCDIR([lock.c])
dnl Can't be done in NEWLIB_CONFIGURE because that confuses automake.
AC_CONFIG_AUX_DIR(../../../..)
diff --git a/newlib/libc/sys/tirtos/include/sys/lock.h b/newlib/libc/sys/tirtos/include/sys/lock.h
new file mode 100644
index 000000000..4f2f81603
--- /dev/null
+++ b/newlib/libc/sys/tirtos/include/sys/lock.h
@@ -0,0 +1,109 @@
+/*
+ * Copyright (c) 2014, Texas Instruments 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.
+ *
+ * * Neither the name of Texas Instruments Incorporated 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.
+ */
+
+#ifndef __SYS_LOCK_H__
+#define __SYS_LOCK_H__
+
+/*
+ * Lock routines for TI-RTOS multi-threaded apps. The implementation
+ * is provided by TI-RTOS kernel.
+ */
+
+/*
+ * Dummy semaphore structure of size 32 bytes. This will be
+ * type casted to Semaphore_struct in TI-RTOS.
+ */
+typedef struct {
+ void *dummy[8];
+} __dummy_sem_t;
+
+typedef struct {
+ __dummy_sem_t sem;
+ unsigned char init_done;
+} __lock_mutex_t;
+
+typedef struct {
+ void *owner;
+ __dummy_sem_t sem;
+ unsigned int count;
+ unsigned char init_done;
+} __lock_recursive_mutex_t;
+
+typedef __lock_mutex_t _LOCK_T;
+typedef __lock_recursive_mutex_t _LOCK_RECURSIVE_T;
+
+#include <_ansi.h>
+
+#define __LOCK_INIT(class,lock) \
+ class _LOCK_T lock = { .sem.dummy = {0, 0, 0, 0, 0, 0, 0, 0}, \
+ .init_done = 0 }
+
+#define __LOCK_INIT_RECURSIVE(class,lock) \
+ class _LOCK_RECURSIVE_T lock = { .owner = 0, \
+ .sem.dummy = {0, 0, 0, 0, 0, 0, 0, 0}, .count = 0, \
+ .init_done = 0 }
+
+extern void __libc_lock_init(_LOCK_T *lock);
+extern void __libc_lock_init_recursive(_LOCK_RECURSIVE_T *lock);
+extern void __libc_lock_close(_LOCK_T *lock);
+extern void __libc_lock_close_recursive(_LOCK_RECURSIVE_T *lock);
+extern void __libc_lock_acquire(_LOCK_T *lock);
+extern void __libc_lock_acquire_recursive(_LOCK_RECURSIVE_T *lock);
+extern void __libc_lock_release(_LOCK_T *lock);
+extern void __libc_lock_release_recursive(_LOCK_RECURSIVE_T *lock);
+
+/* Returns 0 for success and non-zero for failure */
+extern int __libc_lock_try_acquire(_LOCK_T *lock);
+extern int __libc_lock_try_acquire_recursive(_LOCK_RECURSIVE_T *lock);
+
+#define __lock_init(lock) \
+ __libc_lock_init(&(lock))
+#define __lock_init_recursive(lock) \
+ __libc_lock_init_recursive(&(lock))
+#define __lock_close(lock) \
+ __libc_lock_close(&(lock))
+#define __lock_close_recursive(lock) \
+ __libc_lock_close_recursive(&(lock))
+#define __lock_acquire(lock) \
+ __libc_lock_acquire(&(lock))
+#define __lock_acquire_recursive(lock) \
+ __libc_lock_acquire_recursive(&(lock))
+#define __lock_try_acquire(lock) \
+ __libc_lock_try_acquire(&(lock))
+#define __lock_try_acquire_recursive(lock) \
+ __libc_lock_try_acquire_recursive(&(lock))
+#define __lock_release(lock) \
+ __libc_lock_release(&(lock))
+#define __lock_release_recursive(lock) \
+ __libc_lock_release_recursive(&(lock))
+
+#endif /* __SYS_LOCK_H__ */
diff --git a/newlib/libc/sys/tirtos/lock.c b/newlib/libc/sys/tirtos/lock.c
new file mode 100644
index 000000000..afd4d015e
--- /dev/null
+++ b/newlib/libc/sys/tirtos/lock.c
@@ -0,0 +1,92 @@
+/*
+ * Copyright (c) 2014, Texas Instruments 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.
+ *
+ * * Neither the name of Texas Instruments Incorporated 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.
+ */
+/*
+ * ======== lock.c ========
+ * TIRTOS provides an implementation for the sys/lock APIs if re-entrancy
+ * support is enabled. If re-entrancy support is disabled or an app is built
+ * without TIRTOS but using the libraries built for TIRTOS, these empty
+ * stubs are required to succesfully link the app.
+ */
+
+#include <sys/lock.h>
+
+/* Empty stubs for sys/lock APIs */
+
+void __libc_lock_init(_LOCK_T *lock)
+{
+ return;
+}
+
+void __libc_lock_init_recursive(_LOCK_RECURSIVE_T *lock)
+{
+ return;
+}
+
+void __libc_lock_close(_LOCK_T *lock)
+{
+ return;
+}
+
+void __libc_lock_close_recursive(_LOCK_RECURSIVE_T *lock)
+{
+ return;
+}
+
+void __libc_lock_acquire(_LOCK_T *lock)
+{
+ return;
+}
+
+void __libc_lock_acquire_recursive(_LOCK_RECURSIVE_T *lock)
+{
+ return;
+}
+
+void __libc_lock_release(_LOCK_T *lock)
+{
+ return;
+}
+
+void __libc_lock_release_recursive(_LOCK_RECURSIVE_T *lock)\
+{
+ return;
+}
+
+int __libc_lock_try_acquire(_LOCK_T *lock)
+{
+ return -1;
+}
+
+int __libc_lock_try_acquire_recursive(_LOCK_RECURSIVE_T *lock)
+{
+ return -1;
+}
diff --git a/newlib/libc/sys/w65/configure b/newlib/libc/sys/w65/configure
index 0c61b8956..3898d345e 100755
--- a/newlib/libc/sys/w65/configure
+++ b/newlib/libc/sys/w65/configure
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.68 for newlib 2.0.0.
+# Generated by GNU Autoconf 2.68 for newlib 2.4.0.
#
#
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
@@ -556,8 +556,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='newlib'
PACKAGE_TARNAME='newlib'
-PACKAGE_VERSION='2.0.0'
-PACKAGE_STRING='newlib 2.0.0'
+PACKAGE_VERSION='2.4.0'
+PACKAGE_STRING='newlib 2.4.0'
PACKAGE_BUGREPORT=''
PACKAGE_URL=''
@@ -1239,7 +1239,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures newlib 2.0.0 to adapt to many kinds of systems.
+\`configure' configures newlib 2.4.0 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1309,7 +1309,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of newlib 2.0.0:";;
+ short | recursive ) echo "Configuration of newlib 2.4.0:";;
esac
cat <<\_ACEOF
@@ -1400,7 +1400,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-newlib configure 2.0.0
+newlib configure 2.4.0
generated by GNU Autoconf 2.68
Copyright (C) 2010 Free Software Foundation, Inc.
@@ -1455,7 +1455,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by newlib $as_me 2.0.0, which was
+It was created by newlib $as_me 2.4.0, which was
generated by GNU Autoconf 2.68. Invocation command line was
$ $0 $@
@@ -2527,7 +2527,7 @@ fi
# Define the identity of the package.
PACKAGE='newlib'
- VERSION='2.0.0'
+ VERSION='2.4.0'
# Some tools Automake needs.
@@ -4007,7 +4007,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by newlib $as_me 2.0.0, which was
+This file was extended by newlib $as_me 2.4.0, which was
generated by GNU Autoconf 2.68. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -4064,7 +4064,7 @@ _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
-newlib config.status 2.0.0
+newlib config.status 2.4.0
configured by $0, generated by GNU Autoconf 2.68,
with options \\"\$ac_cs_config\\"
diff --git a/newlib/libc/sys/z8ksim/configure b/newlib/libc/sys/z8ksim/configure
index 553064794..61bdd451d 100755
--- a/newlib/libc/sys/z8ksim/configure
+++ b/newlib/libc/sys/z8ksim/configure
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.68 for newlib 2.0.0.
+# Generated by GNU Autoconf 2.68 for newlib 2.4.0.
#
#
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
@@ -556,8 +556,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='newlib'
PACKAGE_TARNAME='newlib'
-PACKAGE_VERSION='2.0.0'
-PACKAGE_STRING='newlib 2.0.0'
+PACKAGE_VERSION='2.4.0'
+PACKAGE_STRING='newlib 2.4.0'
PACKAGE_BUGREPORT=''
PACKAGE_URL=''
@@ -1239,7 +1239,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures newlib 2.0.0 to adapt to many kinds of systems.
+\`configure' configures newlib 2.4.0 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1309,7 +1309,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of newlib 2.0.0:";;
+ short | recursive ) echo "Configuration of newlib 2.4.0:";;
esac
cat <<\_ACEOF
@@ -1400,7 +1400,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-newlib configure 2.0.0
+newlib configure 2.4.0
generated by GNU Autoconf 2.68
Copyright (C) 2010 Free Software Foundation, Inc.
@@ -1455,7 +1455,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by newlib $as_me 2.0.0, which was
+It was created by newlib $as_me 2.4.0, which was
generated by GNU Autoconf 2.68. Invocation command line was
$ $0 $@
@@ -2527,7 +2527,7 @@ fi
# Define the identity of the package.
PACKAGE='newlib'
- VERSION='2.0.0'
+ VERSION='2.4.0'
# Some tools Automake needs.
@@ -4007,7 +4007,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by newlib $as_me 2.0.0, which was
+This file was extended by newlib $as_me 2.4.0, which was
generated by GNU Autoconf 2.68. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -4064,7 +4064,7 @@ _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
-newlib config.status 2.0.0
+newlib config.status 2.4.0
configured by $0, generated by GNU Autoconf 2.68,
with options \\"\$ac_cs_config\\"
diff --git a/newlib/libc/syscalls/Makefile.am b/newlib/libc/syscalls/Makefile.am
index 7af406482..31cf65913 100644
--- a/newlib/libc/syscalls/Makefile.am
+++ b/newlib/libc/syscalls/Makefile.am
@@ -53,18 +53,5 @@ endif
include $(srcdir)/../../Makefile.shared
CHEWOUT_FILES =
-
-SUFFIXES = .def
-
-CHEW = ../../doc/makedoc -f $(srcdir)/../../doc/doc.str
-
-.c.def:
- $(CHEW) < $< > $*.def 2> $*.ref
- touch stmp-def
-
-TARGETDOC = ../tmp.texi
-
+CHAPTERS =
# No doc for syscalls.
-doc:
-
-CLEANFILES = $(CHEWOUT_FILES) *.ref
diff --git a/newlib/libc/syscalls/Makefile.in b/newlib/libc/syscalls/Makefile.in
index 1f7b81e20..b2b158377 100644
--- a/newlib/libc/syscalls/Makefile.in
+++ b/newlib/libc/syscalls/Makefile.in
@@ -301,11 +301,15 @@ libsyscalls_la_LDFLAGS = -Xcompiler -nostdlib
@USE_LIBTOOL_FALSE@noinst_LIBRARIES = lib.a
@USE_LIBTOOL_FALSE@lib_a_SOURCES = $(GENERAL_SOURCES) $(ELIX_SOURCES)
@USE_LIBTOOL_FALSE@lib_a_CFLAGS = $(AM_CFLAGS)
-CHEWOUT_FILES =
+
+#
+# documentation rules
+#
SUFFIXES = .def
-CHEW = ../../doc/makedoc -f $(srcdir)/../../doc/doc.str
-TARGETDOC = ../tmp.texi
+CHEW = ${top_builddir}/../doc/makedoc -f $(top_srcdir)/../doc/doc.str
CLEANFILES = $(CHEWOUT_FILES) *.ref
+CHEWOUT_FILES =
+CHAPTERS =
all: all-am
.SUFFIXES:
@@ -677,8 +681,14 @@ objectlist.awk.in: $(noinst_LTLIBRARIES)
$(CHEW) < $< > $*.def 2> $*.ref
touch stmp-def
+TARGETDOC ?= ../tmp.texi
+
+doc: $(CHEWOUT_FILES)
+ for chapter in $(CHAPTERS) ; \
+ do \
+ cat $(srcdir)/$$chapter >> $(TARGETDOC) ; \
+ done
# No doc for syscalls.
-doc:
# 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.
diff --git a/newlib/libc/time/Makefile.am b/newlib/libc/time/Makefile.am
index 95716315b..be040baec 100644
--- a/newlib/libc/time/Makefile.am
+++ b/newlib/libc/time/Makefile.am
@@ -17,10 +17,11 @@ LIB_SOURCES = \
lcltime.c \
lcltime_r.c \
mktime.c \
- mktm_r.c \
+ month_lengths.c \
strftime.c \
strptime.c \
time.c \
+ tzcalc_limits.c \
tzlock.c \
tzset.c \
tzset_r.c \
@@ -59,17 +60,4 @@ CHEWOUT_FILES = \
tzset.def \
wcsftime.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)/time.tex >> $(TARGETDOC)
-
-CLEANFILES = $(CHEWOUT_FILES) *.ref
+CHAPTERS = time.tex
diff --git a/newlib/libc/time/Makefile.in b/newlib/libc/time/Makefile.in
index c28caaf9c..2bcc9eeab 100644
--- a/newlib/libc/time/Makefile.in
+++ b/newlib/libc/time/Makefile.in
@@ -78,19 +78,20 @@ am__objects_1 = lib_a-asctime.$(OBJEXT) lib_a-asctime_r.$(OBJEXT) \
lib_a-gettzinfo.$(OBJEXT) lib_a-gmtime.$(OBJEXT) \
lib_a-gmtime_r.$(OBJEXT) lib_a-lcltime.$(OBJEXT) \
lib_a-lcltime_r.$(OBJEXT) lib_a-mktime.$(OBJEXT) \
- lib_a-mktm_r.$(OBJEXT) lib_a-strftime.$(OBJEXT) \
+ lib_a-month_lengths.$(OBJEXT) lib_a-strftime.$(OBJEXT) \
lib_a-strptime.$(OBJEXT) lib_a-time.$(OBJEXT) \
- lib_a-tzlock.$(OBJEXT) lib_a-tzset.$(OBJEXT) \
- lib_a-tzset_r.$(OBJEXT) lib_a-tzvars.$(OBJEXT) \
- lib_a-wcsftime.$(OBJEXT)
+ lib_a-tzcalc_limits.$(OBJEXT) lib_a-tzlock.$(OBJEXT) \
+ lib_a-tzset.$(OBJEXT) lib_a-tzset_r.$(OBJEXT) \
+ lib_a-tzvars.$(OBJEXT) lib_a-wcsftime.$(OBJEXT)
@USE_LIBTOOL_FALSE@am_lib_a_OBJECTS = $(am__objects_1)
lib_a_OBJECTS = $(am_lib_a_OBJECTS)
LTLIBRARIES = $(noinst_LTLIBRARIES)
libtime_la_LIBADD =
am__objects_2 = asctime.lo asctime_r.lo clock.lo ctime.lo ctime_r.lo \
difftime.lo gettzinfo.lo gmtime.lo gmtime_r.lo lcltime.lo \
- lcltime_r.lo mktime.lo mktm_r.lo strftime.lo strptime.lo \
- time.lo tzlock.lo tzset.lo tzset_r.lo tzvars.lo wcsftime.lo
+ lcltime_r.lo mktime.lo month_lengths.lo strftime.lo \
+ strptime.lo time.lo tzcalc_limits.lo tzlock.lo tzset.lo \
+ tzset_r.lo tzvars.lo wcsftime.lo
@USE_LIBTOOL_TRUE@am_libtime_la_OBJECTS = $(am__objects_2)
libtime_la_OBJECTS = $(am_libtime_la_OBJECTS)
libtime_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
@@ -277,10 +278,11 @@ LIB_SOURCES = \
lcltime.c \
lcltime_r.c \
mktime.c \
- mktm_r.c \
+ month_lengths.c \
strftime.c \
strptime.c \
time.c \
+ tzcalc_limits.c \
tzlock.c \
tzset.c \
tzset_r.c \
@@ -295,6 +297,13 @@ libtime_la_LDFLAGS = -Xcompiler -nostdlib
@USE_LIBTOOL_FALSE@noinst_LIBRARIES = lib.a
@USE_LIBTOOL_FALSE@lib_a_SOURCES = $(LIB_SOURCES)
@USE_LIBTOOL_FALSE@lib_a_CFLAGS = $(AM_CFLAGS)
+
+#
+# documentation rules
+#
+SUFFIXES = .def
+CHEW = ${top_builddir}/../doc/makedoc -f $(top_srcdir)/../doc/doc.str
+CLEANFILES = $(CHEWOUT_FILES) *.ref
CHEWOUT_FILES = \
asctime.def \
clock.def \
@@ -309,10 +318,7 @@ CHEWOUT_FILES = \
tzset.def \
wcsftime.def
-SUFFIXES = .def
-CHEW = ../../doc/makedoc -f $(srcdir)/../../doc/doc.str
-TARGETDOC = ../tmp.texi
-CLEANFILES = $(CHEWOUT_FILES) *.ref
+CHAPTERS = time.tex
all: all-am
.SUFFIXES:
@@ -454,11 +460,11 @@ lib_a-mktime.o: mktime.c
lib_a-mktime.obj: mktime.c
$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-mktime.obj `if test -f 'mktime.c'; then $(CYGPATH_W) 'mktime.c'; else $(CYGPATH_W) '$(srcdir)/mktime.c'; fi`
-lib_a-mktm_r.o: mktm_r.c
- $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-mktm_r.o `test -f 'mktm_r.c' || echo '$(srcdir)/'`mktm_r.c
+lib_a-month_lengths.o: month_lengths.c
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-month_lengths.o `test -f 'month_lengths.c' || echo '$(srcdir)/'`month_lengths.c
-lib_a-mktm_r.obj: mktm_r.c
- $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-mktm_r.obj `if test -f 'mktm_r.c'; then $(CYGPATH_W) 'mktm_r.c'; else $(CYGPATH_W) '$(srcdir)/mktm_r.c'; fi`
+lib_a-month_lengths.obj: month_lengths.c
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-month_lengths.obj `if test -f 'month_lengths.c'; then $(CYGPATH_W) 'month_lengths.c'; else $(CYGPATH_W) '$(srcdir)/month_lengths.c'; fi`
lib_a-strftime.o: strftime.c
$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-strftime.o `test -f 'strftime.c' || echo '$(srcdir)/'`strftime.c
@@ -478,6 +484,12 @@ lib_a-time.o: time.c
lib_a-time.obj: time.c
$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-time.obj `if test -f 'time.c'; then $(CYGPATH_W) 'time.c'; else $(CYGPATH_W) '$(srcdir)/time.c'; fi`
+lib_a-tzcalc_limits.o: tzcalc_limits.c
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-tzcalc_limits.o `test -f 'tzcalc_limits.c' || echo '$(srcdir)/'`tzcalc_limits.c
+
+lib_a-tzcalc_limits.obj: tzcalc_limits.c
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-tzcalc_limits.obj `if test -f 'tzcalc_limits.c'; then $(CYGPATH_W) 'tzcalc_limits.c'; else $(CYGPATH_W) '$(srcdir)/tzcalc_limits.c'; fi`
+
lib_a-tzlock.o: tzlock.c
$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-tzlock.o `test -f 'tzlock.c' || echo '$(srcdir)/'`tzlock.c
@@ -692,16 +704,21 @@ objectlist.awk.in: $(noinst_LTLIBRARIES)
echo $$i `pwd`/$$i >> objectlist.awk.in ; \
done
-# This rule is needed so that wcsftime.o is rebuilt when strftime.c changes.
-
-$(lpfx)wcsftime.$(oext): strftime.c
-
.c.def:
$(CHEW) < $< > $*.def 2> $*.ref
touch stmp-def
+TARGETDOC ?= ../tmp.texi
+
doc: $(CHEWOUT_FILES)
- cat $(srcdir)/time.tex >> $(TARGETDOC)
+ for chapter in $(CHAPTERS) ; \
+ do \
+ cat $(srcdir)/$$chapter >> $(TARGETDOC) ; \
+ done
+
+# This rule is needed so that wcsftime.o is rebuilt when strftime.c changes.
+
+$(lpfx)wcsftime.$(oext): strftime.c
# 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.
diff --git a/newlib/libc/time/asctime_r.c b/newlib/libc/time/asctime_r.c
index e8abff1c0..2ec53698e 100644
--- a/newlib/libc/time/asctime_r.c
+++ b/newlib/libc/time/asctime_r.c
@@ -7,8 +7,8 @@
char *
_DEFUN (asctime_r, (tim_p, result),
- _CONST struct tm *tim_p _AND
- char *result)
+ _CONST struct tm *__restrict tim_p _AND
+ char *__restrict result)
{
static _CONST char day_name[7][3] = {
"Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"
diff --git a/newlib/libc/time/clock.c b/newlib/libc/time/clock.c
index 64cf438fb..0bcfbb6d3 100644
--- a/newlib/libc/time/clock.c
+++ b/newlib/libc/time/clock.c
@@ -59,7 +59,7 @@ clock ()
struct tms tim_s;
clock_t res;
- if ((res = (clock_t) _times_r (_REENT, &tim_s)) != -1)
+ if ((res = (clock_t) _times_r (_REENT, &tim_s)) != (clock_t) -1)
res = (clock_t) (tim_s.tms_utime + tim_s.tms_stime +
tim_s.tms_cutime + tim_s.tms_cstime);
diff --git a/newlib/libc/time/gmtime_r.c b/newlib/libc/time/gmtime_r.c
index fb39238d3..81c7c94b1 100644
--- a/newlib/libc/time/gmtime_r.c
+++ b/newlib/libc/time/gmtime_r.c
@@ -1,14 +1,101 @@
/*
* gmtime_r.c
+ * Original Author: Adapted from tzcode maintained by Arthur David Olson.
+ * Modifications:
+ * - Changed to mktm_r and added __tzcalc_limits - 04/10/02, Jeff Johnston
+ * - Fixed bug in mday computations - 08/12/04, Alex Mogilnikov <alx@intellectronika.ru>
+ * - Fixed bug in __tzcalc_limits - 08/12/04, Alex Mogilnikov <alx@intellectronika.ru>
+ * - Move code from _mktm_r() to gmtime_r() - 05/09/14, Freddie Chopin <freddie_chopin@op.pl>
+ * - Fixed bug in calculations for dates after year 2069 or before year 1901. Ideas for
+ * solution taken from musl's __secs_to_tm() - 07/12/2014, Freddie Chopin
+ * <freddie_chopin@op.pl>
+ * - Use faster algorithm from civil_from_days() by Howard Hinnant - 12/06/2014,
+ * Freddie Chopin <freddie_chopin@op.pl>
+ *
+ * Converts the calendar time pointed to by tim_p into a broken-down time
+ * expressed as local time. Returns a pointer to a structure containing the
+ * broken-down time.
*/
-#include <time.h>
#include "local.h"
+/* Move epoch from 01.01.1970 to 01.03.0000 (yes, Year 0) - this is the first
+ * day of a 400-year long "era", right after additional day of leap year.
+ * This adjustment is required only for date calculation, so instead of
+ * modifying time_t value (which would require 64-bit operations to work
+ * correctly) it's enough to adjust the calculated number of days since epoch.
+ */
+#define EPOCH_ADJUSTMENT_DAYS 719468L
+/* year to which the adjustment was made */
+#define ADJUSTED_EPOCH_YEAR 0
+/* 1st March of year 0 is Wednesday */
+#define ADJUSTED_EPOCH_WDAY 3
+/* there are 97 leap years in 400-year periods. ((400 - 97) * 365 + 97 * 366) */
+#define DAYS_PER_ERA 146097L
+/* there are 24 leap years in 100-year periods. ((100 - 24) * 365 + 24 * 366) */
+#define DAYS_PER_CENTURY 36524L
+/* there is one leap year every 4 years */
+#define DAYS_PER_4_YEARS (3 * 365 + 366)
+/* number of days in a non-leap year */
+#define DAYS_PER_YEAR 365
+/* number of days in January */
+#define DAYS_IN_JANUARY 31
+/* number of days in non-leap February */
+#define DAYS_IN_FEBRUARY 28
+/* number of years per era */
+#define YEARS_PER_ERA 400
+
struct tm *
_DEFUN (gmtime_r, (tim_p, res),
- _CONST time_t * tim_p _AND
- struct tm *res)
+ _CONST time_t *__restrict tim_p _AND
+ struct tm *__restrict res)
{
- return (_mktm_r (tim_p, res, 1));
+ long days, rem;
+ _CONST time_t lcltime = *tim_p;
+ int era, weekday, year;
+ unsigned erayear, yearday, month, day;
+ unsigned long eraday;
+
+ days = ((long)lcltime) / SECSPERDAY + EPOCH_ADJUSTMENT_DAYS;
+ rem = ((long)lcltime) % SECSPERDAY;
+ if (rem < 0)
+ {
+ rem += SECSPERDAY;
+ --days;
+ }
+
+ /* compute hour, min, and sec */
+ res->tm_hour = (int) (rem / SECSPERHOUR);
+ rem %= SECSPERHOUR;
+ res->tm_min = (int) (rem / SECSPERMIN);
+ res->tm_sec = (int) (rem % SECSPERMIN);
+
+ /* compute day of week */
+ if ((weekday = ((ADJUSTED_EPOCH_WDAY + days) % DAYSPERWEEK)) < 0)
+ weekday += DAYSPERWEEK;
+ res->tm_wday = weekday;
+
+ /* compute year, month, day & day of year */
+ /* for description of this algorithm see
+ * http://howardhinnant.github.io/date_algorithms.html#civil_from_days */
+ era = (days >= 0 ? days : days - (DAYS_PER_ERA - 1)) / DAYS_PER_ERA;
+ eraday = days - era * DAYS_PER_ERA; /* [0, 146096] */
+ erayear = (eraday - eraday / (DAYS_PER_4_YEARS - 1) + eraday / DAYS_PER_CENTURY -
+ eraday / (DAYS_PER_ERA - 1)) / 365; /* [0, 399] */
+ yearday = eraday - (DAYS_PER_YEAR * erayear + erayear / 4 - erayear / 100); /* [0, 365] */
+ month = (5 * yearday + 2) / 153; /* [0, 11] */
+ day = yearday - (153 * month + 2) / 5 + 1; /* [1, 31] */
+ month += month < 10 ? 2 : -10;
+ year = ADJUSTED_EPOCH_YEAR + erayear + era * YEARS_PER_ERA + (month <= 1);
+
+ res->tm_yday = yearday >= DAYS_PER_YEAR - DAYS_IN_JANUARY - DAYS_IN_FEBRUARY ?
+ yearday - (DAYS_PER_YEAR - DAYS_IN_JANUARY - DAYS_IN_FEBRUARY) :
+ yearday + DAYS_IN_JANUARY + DAYS_IN_FEBRUARY + isleap(erayear);
+ res->tm_year = year - YEAR_BASE;
+ res->tm_mon = month;
+ res->tm_mday = day;
+
+ res->tm_isdst = 0;
+
+ return (res);
}
diff --git a/newlib/libc/time/lcltime_r.c b/newlib/libc/time/lcltime_r.c
index cf386719c..3342e9906 100644
--- a/newlib/libc/time/lcltime_r.c
+++ b/newlib/libc/time/lcltime_r.c
@@ -1,18 +1,127 @@
/*
* localtime_r.c
+ * Original Author: Adapted from tzcode maintained by Arthur David Olson.
+ * Modifications:
+ * - Changed to mktm_r and added __tzcalc_limits - 04/10/02, Jeff Johnston
+ * - Fixed bug in mday computations - 08/12/04, Alex Mogilnikov <alx@intellectronika.ru>
+ * - Fixed bug in __tzcalc_limits - 08/12/04, Alex Mogilnikov <alx@intellectronika.ru>
+ * - Implement localtime_r() with gmtime_r() and the conditional code moved
+ * from _mktm_r() - 05/09/14, Freddie Chopin <freddie_chopin@op.pl>
*
* Converts the calendar time pointed to by tim_p into a broken-down time
* expressed as local time. Returns a pointer to a structure containing the
* broken-down time.
*/
-#include <time.h>
#include "local.h"
struct tm *
_DEFUN (localtime_r, (tim_p, res),
- _CONST time_t * tim_p _AND
- struct tm *res)
+ _CONST time_t *__restrict tim_p _AND
+ struct tm *__restrict res)
{
- return _mktm_r (tim_p, res, 0);
+ long offset;
+ int hours, mins, secs;
+ int year;
+ __tzinfo_type *_CONST tz = __gettzinfo ();
+ _CONST int *ip;
+
+ res = gmtime_r (tim_p, res);
+
+ year = res->tm_year + YEAR_BASE;
+ ip = __month_lengths[isleap(year)];
+
+ TZ_LOCK;
+ _tzset_unlocked ();
+ if (_daylight)
+ {
+ if (year == tz->__tzyear || __tzcalc_limits (year))
+ res->tm_isdst = (tz->__tznorth
+ ? (*tim_p >= tz->__tzrule[0].change
+ && *tim_p < tz->__tzrule[1].change)
+ : (*tim_p >= tz->__tzrule[0].change
+ || *tim_p < tz->__tzrule[1].change));
+ else
+ res->tm_isdst = -1;
+ }
+ else
+ res->tm_isdst = 0;
+
+ offset = (res->tm_isdst == 1
+ ? tz->__tzrule[1].offset
+ : tz->__tzrule[0].offset);
+
+ hours = (int) (offset / SECSPERHOUR);
+ offset = offset % SECSPERHOUR;
+
+ mins = (int) (offset / SECSPERMIN);
+ secs = (int) (offset % SECSPERMIN);
+
+ res->tm_sec -= secs;
+ res->tm_min -= mins;
+ res->tm_hour -= hours;
+
+ if (res->tm_sec >= SECSPERMIN)
+ {
+ res->tm_min += 1;
+ res->tm_sec -= SECSPERMIN;
+ }
+ else if (res->tm_sec < 0)
+ {
+ res->tm_min -= 1;
+ res->tm_sec += SECSPERMIN;
+ }
+ if (res->tm_min >= MINSPERHOUR)
+ {
+ res->tm_hour += 1;
+ res->tm_min -= MINSPERHOUR;
+ }
+ else if (res->tm_min < 0)
+ {
+ res->tm_hour -= 1;
+ res->tm_min += MINSPERHOUR;
+ }
+ if (res->tm_hour >= HOURSPERDAY)
+ {
+ ++res->tm_yday;
+ ++res->tm_wday;
+ if (res->tm_wday > 6)
+ res->tm_wday = 0;
+ ++res->tm_mday;
+ res->tm_hour -= HOURSPERDAY;
+ if (res->tm_mday > ip[res->tm_mon])
+ {
+ res->tm_mday -= ip[res->tm_mon];
+ res->tm_mon += 1;
+ if (res->tm_mon == 12)
+ {
+ res->tm_mon = 0;
+ res->tm_year += 1;
+ res->tm_yday = 0;
+ }
+ }
+ }
+ else if (res->tm_hour < 0)
+ {
+ res->tm_yday -= 1;
+ res->tm_wday -= 1;
+ if (res->tm_wday < 0)
+ res->tm_wday = 6;
+ res->tm_mday -= 1;
+ res->tm_hour += 24;
+ if (res->tm_mday == 0)
+ {
+ res->tm_mon -= 1;
+ if (res->tm_mon < 0)
+ {
+ res->tm_mon = 11;
+ res->tm_year -= 1;
+ res->tm_yday = 364 + isleap(res->tm_year + YEAR_BASE);
+ }
+ res->tm_mday = ip[res->tm_mon];
+ }
+ }
+ TZ_UNLOCK;
+
+ return (res);
}
diff --git a/newlib/libc/time/local.h b/newlib/libc/time/local.h
index 9d9ef87fa..af5793af9 100644
--- a/newlib/libc/time/local.h
+++ b/newlib/libc/time/local.h
@@ -19,9 +19,13 @@
#define isleap(y) ((((y) % 4) == 0 && ((y) % 100) != 0) || ((y) % 400) == 0)
-struct tm * _EXFUN (_mktm_r, (_CONST time_t *, struct tm *, int __is_gmtime));
int _EXFUN (__tzcalc_limits, (int __year));
+extern _CONST int __month_lengths[2][MONSPERYEAR];
+
+_VOID _EXFUN(_tzset_unlocked_r, (struct _reent *));
+_VOID _EXFUN(_tzset_unlocked, (_VOID));
+
/* locks for multi-threading */
#ifdef __SINGLE_THREAD__
#define TZ_LOCK
diff --git a/newlib/libc/time/mktime.c b/newlib/libc/time/mktime.c
index 5bedf5afc..44c0257f7 100644
--- a/newlib/libc/time/mktime.c
+++ b/newlib/libc/time/mktime.c
@@ -199,6 +199,8 @@ _DEFUN(mktime, (tim_p),
TZ_LOCK;
+ _tzset_unlocked ();
+
if (_daylight)
{
int tm_isdst;
diff --git a/newlib/libc/time/mktm_r.c b/newlib/libc/time/mktm_r.c
deleted file mode 100644
index 9a3bc820e..000000000
--- a/newlib/libc/time/mktm_r.c
+++ /dev/null
@@ -1,259 +0,0 @@
-/*
- * mktm_r.c
- * Original Author: Adapted from tzcode maintained by Arthur David Olson.
- * Modifications: Changed to mktm_r and added __tzcalc_limits - 04/10/02, Jeff Johnston
- * Fixed bug in mday computations - 08/12/04, Alex Mogilnikov <alx@intellectronika.ru>
- * Fixed bug in __tzcalc_limits - 08/12/04, Alex Mogilnikov <alx@intellectronika.ru>
- *
- * Converts the calendar time pointed to by tim_p into a broken-down time
- * expressed as local time. Returns a pointer to a structure containing the
- * broken-down time.
- */
-
-#include <stdlib.h>
-#include <time.h>
-#include "local.h"
-
-static _CONST int mon_lengths[2][MONSPERYEAR] = {
- {31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31},
- {31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31}
-} ;
-
-static _CONST int year_lengths[2] = {
- 365,
- 366
-} ;
-
-struct tm *
-_DEFUN (_mktm_r, (tim_p, res, is_gmtime),
- _CONST time_t * tim_p _AND
- struct tm *res _AND
- int is_gmtime)
-{
- long days, rem;
- time_t lcltime;
- int y;
- int yleap;
- _CONST int *ip;
- __tzinfo_type *tz = __gettzinfo ();
-
- /* base decision about std/dst time on current time */
- lcltime = *tim_p;
-
- days = ((long)lcltime) / SECSPERDAY;
- rem = ((long)lcltime) % SECSPERDAY;
- while (rem < 0)
- {
- rem += SECSPERDAY;
- --days;
- }
- while (rem >= SECSPERDAY)
- {
- rem -= SECSPERDAY;
- ++days;
- }
-
- /* compute hour, min, and sec */
- res->tm_hour = (int) (rem / SECSPERHOUR);
- rem %= SECSPERHOUR;
- res->tm_min = (int) (rem / SECSPERMIN);
- res->tm_sec = (int) (rem % SECSPERMIN);
-
- /* compute day of week */
- if ((res->tm_wday = ((EPOCH_WDAY + days) % DAYSPERWEEK)) < 0)
- res->tm_wday += DAYSPERWEEK;
-
- /* compute year & day of year */
- y = EPOCH_YEAR;
- if (days >= 0)
- {
- for (;;)
- {
- yleap = isleap(y);
- if (days < year_lengths[yleap])
- break;
- y++;
- days -= year_lengths[yleap];
- }
- }
- else
- {
- do
- {
- --y;
- yleap = isleap(y);
- days += year_lengths[yleap];
- } while (days < 0);
- }
-
- res->tm_year = y - YEAR_BASE;
- res->tm_yday = days;
- ip = mon_lengths[yleap];
- for (res->tm_mon = 0; days >= ip[res->tm_mon]; ++res->tm_mon)
- days -= ip[res->tm_mon];
- res->tm_mday = days + 1;
-
- if (!is_gmtime)
- {
- long offset;
- int hours, mins, secs;
-
- TZ_LOCK;
- if (_daylight)
- {
- if (y == tz->__tzyear || __tzcalc_limits (y))
- res->tm_isdst = (tz->__tznorth
- ? (*tim_p >= tz->__tzrule[0].change
- && *tim_p < tz->__tzrule[1].change)
- : (*tim_p >= tz->__tzrule[0].change
- || *tim_p < tz->__tzrule[1].change));
- else
- res->tm_isdst = -1;
- }
- else
- res->tm_isdst = 0;
-
- offset = (res->tm_isdst == 1
- ? tz->__tzrule[1].offset
- : tz->__tzrule[0].offset);
-
- hours = (int) (offset / SECSPERHOUR);
- offset = offset % SECSPERHOUR;
-
- mins = (int) (offset / SECSPERMIN);
- secs = (int) (offset % SECSPERMIN);
-
- res->tm_sec -= secs;
- res->tm_min -= mins;
- res->tm_hour -= hours;
-
- if (res->tm_sec >= SECSPERMIN)
- {
- res->tm_min += 1;
- res->tm_sec -= SECSPERMIN;
- }
- else if (res->tm_sec < 0)
- {
- res->tm_min -= 1;
- res->tm_sec += SECSPERMIN;
- }
- if (res->tm_min >= MINSPERHOUR)
- {
- res->tm_hour += 1;
- res->tm_min -= MINSPERHOUR;
- }
- else if (res->tm_min < 0)
- {
- res->tm_hour -= 1;
- res->tm_min += MINSPERHOUR;
- }
- if (res->tm_hour >= HOURSPERDAY)
- {
- ++res->tm_yday;
- ++res->tm_wday;
- if (res->tm_wday > 6)
- res->tm_wday = 0;
- ++res->tm_mday;
- res->tm_hour -= HOURSPERDAY;
- if (res->tm_mday > ip[res->tm_mon])
- {
- res->tm_mday -= ip[res->tm_mon];
- res->tm_mon += 1;
- if (res->tm_mon == 12)
- {
- res->tm_mon = 0;
- res->tm_year += 1;
- res->tm_yday = 0;
- }
- }
- }
- else if (res->tm_hour < 0)
- {
- res->tm_yday -= 1;
- res->tm_wday -= 1;
- if (res->tm_wday < 0)
- res->tm_wday = 6;
- res->tm_mday -= 1;
- res->tm_hour += 24;
- if (res->tm_mday == 0)
- {
- res->tm_mon -= 1;
- if (res->tm_mon < 0)
- {
- res->tm_mon = 11;
- res->tm_year -= 1;
- res->tm_yday = 364 + isleap(res->tm_year + 1900);
- }
- res->tm_mday = ip[res->tm_mon];
- }
- }
- TZ_UNLOCK;
- }
- else
- res->tm_isdst = 0;
-
- return (res);
-}
-
-int
-_DEFUN (__tzcalc_limits, (year),
- int year)
-{
- int days, year_days, years;
- int i, j;
- __tzinfo_type *tz = __gettzinfo ();
-
- if (year < EPOCH_YEAR)
- return 0;
-
- tz->__tzyear = year;
-
- years = (year - EPOCH_YEAR);
-
- year_days = years * 365 +
- (years - 1 + EPOCH_YEARS_SINCE_LEAP) / 4 - (years - 1 + EPOCH_YEARS_SINCE_CENTURY) / 100 +
- (years - 1 + EPOCH_YEARS_SINCE_LEAP_CENTURY) / 400;
-
- for (i = 0; i < 2; ++i)
- {
- if (tz->__tzrule[i].ch == 'J') {
- /* The Julian day n (1 <= n <= 365). */
- days = year_days + tz->__tzrule[i].d +
- (isleap(year) && tz->__tzrule[i].d >= 60);
- /* Convert to yday */
- --days;
- } else if (tz->__tzrule[i].ch == 'D')
- days = year_days + tz->__tzrule[i].d;
- else
- {
- int yleap = isleap(year);
- int m_day, m_wday, wday_diff;
- _CONST int *ip = mon_lengths[yleap];
-
- days = year_days;
-
- for (j = 1; j < tz->__tzrule[i].m; ++j)
- days += ip[j-1];
-
- m_wday = (EPOCH_WDAY + days) % DAYSPERWEEK;
-
- wday_diff = tz->__tzrule[i].d - m_wday;
- if (wday_diff < 0)
- wday_diff += DAYSPERWEEK;
- m_day = (tz->__tzrule[i].n - 1) * DAYSPERWEEK + wday_diff;
-
- while (m_day >= ip[j-1])
- m_day -= DAYSPERWEEK;
-
- days += m_day;
- }
-
- /* store the change-over time in GMT form by adding offset */
- tz->__tzrule[i].change = days * SECSPERDAY +
- tz->__tzrule[i].s + tz->__tzrule[i].offset;
- }
-
- tz->__tznorth = (tz->__tzrule[0].change < tz->__tzrule[1].change);
-
- return 1;
-}
diff --git a/newlib/libc/time/month_lengths.c b/newlib/libc/time/month_lengths.c
new file mode 100644
index 000000000..2871802f0
--- /dev/null
+++ b/newlib/libc/time/month_lengths.c
@@ -0,0 +1,14 @@
+/*
+ * month_lengths.c
+ *
+ * Array __month_lengths[] is (indirectly) needed by tzset(), mktime(),
+ * gmtime() and localtime(). To break any dependencies, this array is moved to
+ * separate source file.
+ */
+
+#include "local.h"
+
+_CONST int __month_lengths[2][MONSPERYEAR] = {
+ {31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31},
+ {31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31}
+} ;
diff --git a/newlib/libc/time/strftime.c b/newlib/libc/time/strftime.c
index 2bcedb2a0..ced106a5b 100644
--- a/newlib/libc/time/strftime.c
+++ b/newlib/libc/time/strftime.c
@@ -24,8 +24,9 @@ INDEX
ANSI_SYNOPSIS
#include <time.h>
- size_t strftime(char *<[s]>, size_t <[maxsize]>,
- const char *<[format]>, const struct tm *<[timp]>);
+ size_t strftime(char *restrict <[s]>, size_t <[maxsize]>,
+ const char *restrict <[format]>,
+ const struct tm *restrict <[timp]>);
TRAD_SYNOPSIS
#include <time.h>
@@ -78,7 +79,7 @@ The century, that is, the year divided by 100 then truncated. For
4-digit years, the result is zero-padded and exactly two characters;
but for other years, there may a negative sign or more digits. In
this way, `<<%C%y>>' is equivalent to `<<%Y>>'. [tm_year]
-
+
o %d
The day of the month, formatted with two digits (from `<<01>>' to
`<<31>>'). [tm_mday]
@@ -109,7 +110,7 @@ includes January 4th, and begin on Mondays. Therefore, if January 1st,
2nd, or 3rd falls on a Sunday, that day and earlier belong to the last
week of the previous year; and if December 29th, 30th, or 31st falls
on Monday, that day and later belong to week 1 of the next year. For
-consistency with %Y, it always has at least four characters.
+consistency with %Y, it always has at least four characters.
Example: "%G" for Saturday 2nd January 1999 gives "1998", and for
Tuesday 30th December 1997 gives "1998". [tm_year, tm_wday, tm_yday]
@@ -165,6 +166,10 @@ notations, the result is an empty string. [tm_sec, tm_min, tm_hour]
o %R
The 24-hour time, to the minute. Equivalent to "%H:%M". [tm_min, tm_hour]
+o %s
+The time elapsed, in seconds, since the start of the Unix epoch at
+1970-01-01 00:00:00 UTC.
+
o %S
The second, formatted with two digits (from `<<00>>' to `<<60>>'). The
value 60 accounts for the occasional leap second. [tm_sec]
@@ -272,7 +277,7 @@ the "C" locale settings.
#include <wctype.h>
#include "local.h"
#include "../locale/timelocal.h"
-
+
/* Defines to make the file dual use for either strftime() or wcsftime().
* To get wcsftime, define MAKE_WCSFTIME.
* To get strftime, do not define MAKE_WCSFTIME.
@@ -662,10 +667,10 @@ static size_t __strftime (CHAR *, size_t, const CHAR *, const struct tm *,
size_t
_DEFUN (strftime, (s, maxsize, format, tim_p),
- CHAR *s _AND
+ CHAR *__restrict s _AND
size_t maxsize _AND
- _CONST CHAR *format _AND
- _CONST struct tm *tim_p)
+ _CONST CHAR *__restrict format _AND
+ _CONST struct tm *__restrict tim_p)
{
era_info_t *era_info = NULL;
alt_digits_t *alt_digits = NULL;
@@ -686,22 +691,23 @@ __strftime (CHAR *s, size_t maxsize, const CHAR *format,
size_t
_DEFUN (strftime, (s, maxsize, format, tim_p),
- CHAR *s _AND
+ CHAR *__restrict s _AND
size_t maxsize _AND
- _CONST CHAR *format _AND
- _CONST struct tm *tim_p)
+ _CONST CHAR *__restrict format _AND
+ _CONST struct tm *__restrict tim_p)
#endif /* !_WANT_C99_TIME_FORMATS */
{
size_t count = 0;
- int i, len = 0;
+ int len = 0;
const CHAR *ctloc;
#if defined (MAKE_WCSFTIME) && !defined (__HAVE_LOCALE_INFO_EXTENDED__)
CHAR ctlocbuf[CTLOCBUFLEN];
#endif
- size_t ctloclen;
+ size_t i, ctloclen;
CHAR alt;
CHAR pad;
unsigned long width;
+ int tzset_called = 0;
struct lc_time_T *_CurrentTimeLocale = __get_current_time_locale ();
for (;;)
@@ -736,7 +742,7 @@ _DEFUN (strftime, (s, maxsize, format, tim_p),
if (*format == CQ('E'))
{
alt = *format++;
-#ifdef _WANT_C99_TIME_FORMATS
+#ifdef _WANT_C99_TIME_FORMATS
#if defined (MAKE_WCSFTIME) && defined (__HAVE_LOCALE_INFO_EXTENDED__)
if (!*era_info && *_CurrentTimeLocale->wera)
*era_info = get_era_info (tim_p, _CurrentTimeLocale->wera);
@@ -749,7 +755,7 @@ _DEFUN (strftime, (s, maxsize, format, tim_p),
else if (*format == CQ('O'))
{
alt = *format++;
-#ifdef _WANT_C99_TIME_FORMATS
+#ifdef _WANT_C99_TIME_FORMATS
#if defined (MAKE_WCSFTIME) && defined (__HAVE_LOCALE_INFO_EXTENDED__)
if (!*alt_digits && *_CurrentTimeLocale->walt_digits)
*alt_digits = get_alt_digits (_CurrentTimeLocale->walt_digits);
@@ -932,7 +938,7 @@ recurse:
{ /* %F is equivalent to "%+4Y-%m-%d", flags and width can change
that. Recurse to avoid need to replicate %Y formation. */
CHAR fmtbuf[32], *fmt = fmtbuf;
-
+
*fmt++ = CQ('%');
if (pad) /* '0' or '+' */
*fmt++ = pad;
@@ -1107,6 +1113,74 @@ recurse:
tim_p->tm_hour, tim_p->tm_min);
CHECK_LENGTH ();
break;
+ case CQ('s'):
+/*
+ * From:
+ * The Open Group Base Specifications Issue 7
+ * IEEE Std 1003.1, 2013 Edition
+ * Copyright (c) 2001-2013 The IEEE and The Open Group
+ * XBD Base Definitions
+ * 4. General Concepts
+ * 4.15 Seconds Since the Epoch
+ * A value that approximates the number of seconds that have elapsed since the
+ * Epoch. A Coordinated Universal Time name (specified in terms of seconds
+ * (tm_sec), minutes (tm_min), hours (tm_hour), days since January 1 of the year
+ * (tm_yday), and calendar year minus 1900 (tm_year)) is related to a time
+ * represented as seconds since the Epoch, according to the expression below.
+ * If the year is <1970 or the value is negative, the relationship is undefined.
+ * If the year is >=1970 and the value is non-negative, the value is related to a
+ * Coordinated Universal Time name according to the C-language expression, where
+ * tm_sec, tm_min, tm_hour, tm_yday, and tm_year are all integer types:
+ * tm_sec + tm_min*60 + tm_hour*3600 + tm_yday*86400 +
+ * (tm_year-70)*31536000 + ((tm_year-69)/4)*86400 -
+ * ((tm_year-1)/100)*86400 + ((tm_year+299)/400)*86400
+ * OR
+ * ((((tm_year-69)/4 - (tm_year-1)/100 + (tm_year+299)/400 +
+ * (tm_year-70)*365 + tm_yday)*24 + tm_hour)*60 + tm_min)*60 + tm_sec
+ */
+/* modified from %z case by hoisting offset outside if block and initializing */
+ {
+ long offset = 0; /* offset < 0 => W of GMT, > 0 => E of GMT:
+ subtract to get UTC */
+
+ if (tim_p->tm_isdst >= 0)
+ {
+ TZ_LOCK;
+ if (!tzset_called)
+ {
+ _tzset_unlocked ();
+ tzset_called = 1;
+ }
+
+#if defined (__CYGWIN__)
+ /* Cygwin must check if the application has been built with or
+ without the extra tm members for backward compatibility, and
+ then use either that or the old method fetching from tzinfo.
+ Rather than pulling in the version check infrastructure, we
+ just call a Cygwin function. */
+ extern long __cygwin_gettzoffset (const struct tm *tmp);
+ offset = __cygwin_gettzoffset (tim_p);
+#elif defined (__TM_GMTOFF)
+ offset = tim_p->__TM_GMTOFF;
+#else
+ __tzinfo_type *tz = __gettzinfo ();
+ /* The sign of this is exactly opposite the envvar TZ. We
+ could directly use the global _timezone for tm_isdst==0,
+ but have to use __tzrule for daylight savings. */
+ offset = -tz->__tzrule[tim_p->tm_isdst > 0].offset;
+#endif
+ TZ_UNLOCK;
+ }
+ len = snprintf (&s[count], maxsize - count, CQ("%lld"),
+ (((((long long)tim_p->tm_year - 69)/4
+ - (tim_p->tm_year - 1)/100
+ + (tim_p->tm_year + 299)/400
+ + (tim_p->tm_year - 70)*365 + tim_p->tm_yday)*24
+ + tim_p->tm_hour)*60 + tim_p->tm_min)*60
+ + tim_p->tm_sec - offset);
+ CHECK_LENGTH ();
+ }
+ break;
case CQ('S'):
#ifdef _WANT_C99_TIME_FORMATS
if (alt != CQ('O') || !*alt_digits
@@ -1282,12 +1356,31 @@ recurse:
if (tim_p->tm_isdst >= 0)
{
long offset;
- __tzinfo_type *tz = __gettzinfo ();
+
TZ_LOCK;
+ if (!tzset_called)
+ {
+ _tzset_unlocked ();
+ tzset_called = 1;
+ }
+
+#if defined (__CYGWIN__)
+ /* Cygwin must check if the application has been built with or
+ without the extra tm members for backward compatibility, and
+ then use either that or the old method fetching from tzinfo.
+ Rather than pulling in the version check infrastructure, we
+ just call a Cygwin function. */
+ extern long __cygwin_gettzoffset (const struct tm *tmp);
+ offset = __cygwin_gettzoffset (tim_p);
+#elif defined (__TM_GMTOFF)
+ offset = tim_p->__TM_GMTOFF;
+#else
+ __tzinfo_type *tz = __gettzinfo ();
/* The sign of this is exactly opposite the envvar TZ. We
- could directly use the global _timezone for tm_isdst==0,
- but have to use __tzrule for daylight savings. */
+ could directly use the global _timezone for tm_isdst==0,
+ but have to use __tzrule for daylight savings. */
offset = -tz->__tzrule[tim_p->tm_isdst > 0].offset;
+#endif
TZ_UNLOCK;
len = snprintf (&s[count], maxsize - count, CQ("%+03ld%.2ld"),
offset / SECSPERHOUR,
@@ -1298,13 +1391,33 @@ recurse:
case CQ('Z'):
if (tim_p->tm_isdst >= 0)
{
- int size;
+ size_t size;
+ const char *tznam = NULL;
+
TZ_LOCK;
- size = strlen(_tzname[tim_p->tm_isdst > 0]);
+ if (!tzset_called)
+ {
+ _tzset_unlocked ();
+ tzset_called = 1;
+ }
+#if defined (__CYGWIN__)
+ /* See above. */
+ extern const char *__cygwin_gettzname (const struct tm *tmp);
+ tznam = __cygwin_gettzname (tim_p);
+#elif defined (__TM_ZONE)
+ tznam = tim_p->__TM_ZONE;
+#endif
+ if (!tznam)
+ tznam = _tzname[tim_p->tm_isdst > 0];
+ /* Note that in case of wcsftime this loop only works for
+ timezone abbreviations using the portable codeset (aka ASCII).
+ This seems to be the case, but if that ever changes, this
+ loop needs revisiting. */
+ size = strlen (tznam);
for (i = 0; i < size; i++)
{
if (count < maxsize - 1)
- s[count++] = _tzname[tim_p->tm_isdst > 0][i];
+ s[count++] = tznam[i];
else
{
TZ_UNLOCK;
@@ -1337,13 +1450,13 @@ recurse:
/* The remainder of this file can serve as a regression test. Compile
* with -D_REGRESSION_TEST. */
#if defined(_REGRESSION_TEST) /* [Test code: */
-
+
/* This test code relies on ANSI C features, in particular on the ability
* of adjacent strings to be pasted together into one string. */
-
+
/* Test output buffer size (should be larger than all expected results) */
#define OUTSIZE 256
-
+
struct test {
CHAR *fmt; /* Testing format */
size_t max; /* Testing maxsize */
@@ -1355,9 +1468,9 @@ struct list {
const struct test *vec; /* Test vectors */
int cnt; /* Number of vectors */
};
-
+
const char TZ[]="TZ=EST5EDT";
-
+
/* Define list of test inputs and expected outputs, for the given time zone
* and time. */
const struct tm tm0 = {
@@ -1401,6 +1514,7 @@ const struct test Vec0[] = {
{ CQ("%p"), 2+1, EXP(CQ("AM")) },
{ CQ("%r"), 11+1, EXP(CQ("09:53:47 AM")) },
{ CQ("%R"), 5+1, EXP(CQ("09:53")) },
+ { CQ("%s"), 2+1, EXP(CQ("1230648827")) },
{ CQ("%S"), 2+1, EXP(CQ("47")) },
{ CQ("%t"), 1+1, EXP(CQ("\t")) },
{ CQ("%T"), 8+1, EXP(CQ("09:53:47")) },
@@ -1461,6 +1575,7 @@ const struct test Vec1[] = {
{ CQ("%p"), 2+1, EXP(CQ("PM")) },
{ CQ("%r"), 11+1, EXP(CQ("11:01:13 PM")) },
{ CQ("%R"), 5+1, EXP(CQ("23:01")) },
+ { CQ("%s"), 2+1, EXP(CQ("1215054073")) },
{ CQ("%S"), 2+1, EXP(CQ("13")) },
{ CQ("%t"), 1+1, EXP(CQ("\t")) },
{ CQ("%T"), 8+1, EXP(CQ("23:01:13")) },
@@ -1485,7 +1600,7 @@ const struct test Vec1[] = {
#undef VEC
#undef EXP
};
-
+
#if YEAR_BASE == 1900 /* ( */
/* Checks for very large years. YEAR_BASE value relied upon so that the
* answer strings can be predetermined.
@@ -1583,7 +1698,7 @@ const struct test Vecyr1[] = {
#undef CENT
#undef Year
#endif /* YEAR_BASE ) */
-
+
/* Checks for years just over zero (also test for s=60).
* Years less than 4 digits are not mentioned for %Y in the standard, so the
* test for that case is based on the design intent. */
@@ -1654,7 +1769,7 @@ const struct test Vecyrzn[] = {
#undef YEAR
#undef CENT
#undef Year
-
+
const struct list ListYr[] = {
{ &tmyrzp, Vecyrzp, sizeof(Vecyrzp)/sizeof(Vecyrzp[0]) },
{ &tmyrzn, Vecyrzn, sizeof(Vecyrzn)/sizeof(Vecyrzn[0]) },
@@ -1663,19 +1778,19 @@ const struct list ListYr[] = {
{ &tmyr1, Vecyr1, sizeof(Vecyr1)/sizeof(Vecyr1[0]) },
#endif
};
-
-
+
+
/* List of tests to be run */
const struct list List[] = {
{ &tm0, Vec0, sizeof(Vec0)/sizeof(Vec0[0]) },
{ &tm1, Vec1, sizeof(Vec1)/sizeof(Vec1[0]) },
};
-
+
#if defined(STUB_getenv_r)
char *
_getenv_r(struct _reent *p, const char *cp) { return getenv(cp); }
#endif
-
+
int
main(void)
{
@@ -1683,7 +1798,7 @@ int i, l, errr=0, erro=0, tot=0;
const char *cp;
CHAR out[OUTSIZE];
size_t ret;
-
+
/* Set timezone so that %z and %Z tests come out right */
cp = TZ;
if((i=putenv(cp))) {
@@ -1695,7 +1810,7 @@ if(strcmp(getenv("TZ"),strchr(TZ,'=')+1)) {
return(-2);
}
tzset();
-
+
#if defined(VERBOSE)
printf("_timezone=%d, _daylight=%d, _tzname[0]=%s, _tzname[1]=%s\n", _timezone, _daylight, _tzname[0], _tzname[1]);
{
@@ -1707,7 +1822,7 @@ __tzinfo_type *tz = __gettzinfo ();
printf("tz->__tzrule[0].offset=%d, tz->__tzrule[1].offset=%d\n", tz->__tzrule[0].offset, tz->__tzrule[1].offset);
}
#endif
-
+
/* Run all of the exact-length tests as-given--results should match */
for(l=0; l<sizeof(List)/sizeof(List[0]); l++) {
const struct list *test = &List[l];
@@ -1728,7 +1843,7 @@ for(l=0; l<sizeof(List)/sizeof(List[0]); l++) {
}
}
}
-
+
/* Run all of the exact-length tests with the length made too short--expect to
* fail. */
for(l=0; l<sizeof(List)/sizeof(List[0]); l++) {
@@ -1754,7 +1869,7 @@ for(l=0; l<sizeof(List)/sizeof(List[0]); l++) {
}
}
}
-
+
/* Run all of the special year test cases */
for(l=0; l<sizeof(ListYr)/sizeof(ListYr[0]); l++) {
const struct list *test = &ListYr[l];
@@ -1775,14 +1890,14 @@ for(l=0; l<sizeof(ListYr)/sizeof(ListYr[0]); l++) {
}
}
}
-
+
#define STRIZE(f) #f
#define NAME(f) STRIZE(f)
printf(NAME(strftime) "() test ");
if(errr || erro) printf("FAILED %d/%d of", errr, erro);
else printf("passed");
printf(" %d test cases.\n", tot);
-
+
return(errr || erro);
}
#endif /* defined(_REGRESSION_TEST) ] */
diff --git a/newlib/libc/time/strptime.c b/newlib/libc/time/strptime.c
index 601f93e8a..19b9fcede 100644
--- a/newlib/libc/time/strptime.c
+++ b/newlib/libc/time/strptime.c
@@ -68,7 +68,7 @@ is_leap_year (int year)
/* Needed for strptime. */
static int
-match_string (const char **buf, const char **strs)
+match_string (const char *__restrict *buf, const char **strs)
{
int i = 0;
@@ -153,9 +153,9 @@ set_week_number_mon4 (struct tm *timeptr, int wnum)
char *
//strptime (const char *buf, const char *format, struct tm *timeptr)
_DEFUN (strptime, (buf, format, timeptr),
- _CONST char *buf _AND
- _CONST char *format _AND
- struct tm *timeptr)
+ _CONST char *__restrict buf _AND
+ _CONST char *__restrict format _AND
+ struct tm *__restrict timeptr)
{
char c;
int ymd = 0;
diff --git a/newlib/libc/time/time.c b/newlib/libc/time/time.c
index 2506388f6..9de71d457 100644
--- a/newlib/libc/time/time.c
+++ b/newlib/libc/time/time.c
@@ -43,11 +43,10 @@ _DEFUN (time, (t),
{
struct timeval now;
- if (_gettimeofday_r (_REENT, &now, NULL) >= 0)
- {
- if (t)
- *t = now.tv_sec;
- return now.tv_sec;
- }
- return -1;
+ if (_gettimeofday_r (_REENT, &now, NULL) < 0)
+ now.tv_sec = (time_t) -1;
+
+ if (t)
+ *t = now.tv_sec;
+ return now.tv_sec;
}
diff --git a/newlib/libc/time/tzcalc_limits.c b/newlib/libc/time/tzcalc_limits.c
new file mode 100644
index 000000000..8a0bda3da
--- /dev/null
+++ b/newlib/libc/time/tzcalc_limits.c
@@ -0,0 +1,77 @@
+/*
+ * tzcalc_limits.c
+ * Original Author: Adapted from tzcode maintained by Arthur David Olson.
+ * Modifications:
+ * - Changed to mktm_r and added __tzcalc_limits - 04/10/02, Jeff Johnston
+ * - Fixed bug in mday computations - 08/12/04, Alex Mogilnikov <alx@intellectronika.ru>
+ * - Fixed bug in __tzcalc_limits - 08/12/04, Alex Mogilnikov <alx@intellectronika.ru>
+ * - Moved __tzcalc_limits() to separate file - 05/09/14, Freddie Chopin <freddie_chopin@op.pl>
+ */
+
+#include "local.h"
+
+int
+_DEFUN (__tzcalc_limits, (year),
+ int year)
+{
+ int days, year_days, years;
+ int i, j;
+ __tzinfo_type *_CONST tz = __gettzinfo ();
+
+ if (year < EPOCH_YEAR)
+ return 0;
+
+ tz->__tzyear = year;
+
+ years = (year - EPOCH_YEAR);
+
+ year_days = years * 365 +
+ (years - 1 + EPOCH_YEARS_SINCE_LEAP) / 4 -
+ (years - 1 + EPOCH_YEARS_SINCE_CENTURY) / 100 +
+ (years - 1 + EPOCH_YEARS_SINCE_LEAP_CENTURY) / 400;
+
+ for (i = 0; i < 2; ++i)
+ {
+ if (tz->__tzrule[i].ch == 'J')
+ {
+ /* The Julian day n (1 <= n <= 365). */
+ days = year_days + tz->__tzrule[i].d +
+ (isleap(year) && tz->__tzrule[i].d >= 60);
+ /* Convert to yday */
+ --days;
+ }
+ else if (tz->__tzrule[i].ch == 'D')
+ days = year_days + tz->__tzrule[i].d;
+ else
+ {
+ _CONST int yleap = isleap(year);
+ int m_day, m_wday, wday_diff;
+ _CONST int *_CONST ip = __month_lengths[yleap];
+
+ days = year_days;
+
+ for (j = 1; j < tz->__tzrule[i].m; ++j)
+ days += ip[j-1];
+
+ m_wday = (EPOCH_WDAY + days) % DAYSPERWEEK;
+
+ wday_diff = tz->__tzrule[i].d - m_wday;
+ if (wday_diff < 0)
+ wday_diff += DAYSPERWEEK;
+ m_day = (tz->__tzrule[i].n - 1) * DAYSPERWEEK + wday_diff;
+
+ while (m_day >= ip[j-1])
+ m_day -= DAYSPERWEEK;
+
+ days += m_day;
+ }
+
+ /* store the change-over time in GMT form by adding offset */
+ tz->__tzrule[i].change = days * SECSPERDAY +
+ tz->__tzrule[i].s + tz->__tzrule[i].offset;
+ }
+
+ tz->__tznorth = (tz->__tzrule[0].change < tz->__tzrule[1].change);
+
+ return 1;
+}
diff --git a/newlib/libc/time/tzset.c b/newlib/libc/time/tzset.c
index d847a26b0..e0750e1fd 100644
--- a/newlib/libc/time/tzset.c
+++ b/newlib/libc/time/tzset.c
@@ -10,12 +10,12 @@ INDEX
ANSI_SYNOPSIS
#include <time.h>
void tzset(void);
- void _tzset_r (struct _reent *);
+ void _tzset_r (struct _reent *<[reent_ptr]>);
TRAD_SYNOPSIS
#include <time.h>
void tzset();
- void _tzset_r (reent_ptr)
+ void _tzset_r (<[reent_ptr]>);
struct _reent *reent_ptr;
DESCRIPTION
@@ -68,7 +68,15 @@ Supporting OS subroutine required: None
#include "local.h"
_VOID
+_DEFUN_VOID (_tzset_unlocked)
+{
+ _tzset_unlocked_r (_REENT);
+}
+
+_VOID
_DEFUN_VOID (tzset)
{
- _tzset_r (_REENT);
+ TZ_LOCK;
+ _tzset_unlocked_r (_REENT);
+ TZ_UNLOCK;
}
diff --git a/newlib/libc/time/tzset_r.c b/newlib/libc/time/tzset_r.c
index 2c5b72341..6c21e822e 100644
--- a/newlib/libc/time/tzset_r.c
+++ b/newlib/libc/time/tzset_r.c
@@ -14,7 +14,7 @@ static char __tzname_dst[11];
static char *prev_tzenv = NULL;
_VOID
-_DEFUN (_tzset_r, (reent_ptr),
+_DEFUN (_tzset_unlocked_r, (reent_ptr),
struct _reent *reent_ptr)
{
char *tzenv;
@@ -25,24 +25,17 @@ _DEFUN (_tzset_r, (reent_ptr),
if ((tzenv = _getenv_r (reent_ptr, "TZ")) == NULL)
{
- TZ_LOCK;
_timezone = 0;
_daylight = 0;
_tzname[0] = "GMT";
_tzname[1] = "GMT";
free(prev_tzenv);
prev_tzenv = NULL;
- TZ_UNLOCK;
return;
}
- TZ_LOCK;
-
if (prev_tzenv != NULL && strcmp(tzenv, prev_tzenv) == 0)
- {
- TZ_UNLOCK;
- return;
- }
+ return;
free(prev_tzenv);
prev_tzenv = _malloc_r (reent_ptr, strlen(tzenv) + 1);
@@ -54,10 +47,7 @@ _DEFUN (_tzset_r, (reent_ptr),
++tzenv;
if (sscanf (tzenv, "%10[^0-9,+-]%n", __tzname_std, &n) <= 0)
- {
- TZ_UNLOCK;
- return;
- }
+ return;
tzenv += n;
@@ -74,10 +64,7 @@ _DEFUN (_tzset_r, (reent_ptr),
ss = 0;
if (sscanf (tzenv, "%hu%n:%hu%n:%hu%n", &hh, &n, &mm, &n, &ss, &n) < 1)
- {
- TZ_UNLOCK;
- return;
- }
+ return;
tz->__tzrule[0].offset = sign * (ss + SECSPERMIN * mm + SECSPERHOUR * hh);
_tzname[0] = __tzname_std;
@@ -88,7 +75,6 @@ _DEFUN (_tzset_r, (reent_ptr),
_tzname[1] = _tzname[0];
_timezone = tz->__tzrule[0].offset;
_daylight = 0;
- TZ_UNLOCK;
return;
}
else
@@ -127,10 +113,7 @@ _DEFUN (_tzset_r, (reent_ptr),
{
if (sscanf (tzenv, "M%hu%n.%hu%n.%hu%n", &m, &n, &w, &n, &d, &n) != 3 ||
m < 1 || m > 12 || w < 1 || w > 5 || d > 6)
- {
- TZ_UNLOCK;
- return;
- }
+ return;
tz->__tzrule[i].ch = 'M';
tz->__tzrule[i].m = m;
@@ -198,6 +181,13 @@ _DEFUN (_tzset_r, (reent_ptr),
__tzcalc_limits (tz->__tzyear);
_timezone = tz->__tzrule[0].offset;
_daylight = tz->__tzrule[0].offset != tz->__tzrule[1].offset;
+}
+_VOID
+_DEFUN (_tzset_r, (reent_ptr),
+ struct _reent *reent_ptr)
+{
+ TZ_LOCK;
+ _tzset_unlocked_r (reent_ptr);
TZ_UNLOCK;
}
diff --git a/newlib/libc/time/wcsftime.c b/newlib/libc/time/wcsftime.c
index ac71a0941..f77b3d07f 100644
--- a/newlib/libc/time/wcsftime.c
+++ b/newlib/libc/time/wcsftime.c
@@ -8,7 +8,7 @@
/*
FUNCTION
-<<wcsftime>>--convert date and time to a formatted wide-character string
+<<wcsftime>>---convert date and time to a formatted wide-character string
INDEX
wcsftime
diff --git a/newlib/libc/unix/Makefile.am b/newlib/libc/unix/Makefile.am
index 270f99451..9fd30b98e 100644
--- a/newlib/libc/unix/Makefile.am
+++ b/newlib/libc/unix/Makefile.am
@@ -53,18 +53,5 @@ endif # USE_LIBTOOL
include $(srcdir)/../../Makefile.shared
CHEWOUT_FILES =
-
-SUFFIXES = .def
-
-CHEW = ../../doc/makedoc -f $(srcdir)/../../doc/doc.str
-
-.c.def:
- $(CHEW) < $< > $*.def 2> $*.ref
- touch stmp-def
-
-TARGETDOC = ../tmp.texi
-
+CHAPTERS =
# No doc for unix.
-doc:
-
-CLEANFILES = $(CHEWOUT_FILES) *.ref
diff --git a/newlib/libc/unix/Makefile.in b/newlib/libc/unix/Makefile.in
index 093155cc1..412d9576c 100644
--- a/newlib/libc/unix/Makefile.in
+++ b/newlib/libc/unix/Makefile.in
@@ -301,11 +301,15 @@ libunix_la_LDFLAGS = -Xcompiler -nostdlib
@USE_LIBTOOL_FALSE@noinst_LIBRARIES = lib.a
@USE_LIBTOOL_FALSE@lib_a_SOURCES = $(GENERAL_SOURCES) $(ELIX_SOURCES)
@USE_LIBTOOL_FALSE@lib_a_CFLAGS = $(AM_CFLAGS)
-CHEWOUT_FILES =
+
+#
+# documentation rules
+#
SUFFIXES = .def
-CHEW = ../../doc/makedoc -f $(srcdir)/../../doc/doc.str
-TARGETDOC = ../tmp.texi
+CHEW = ${top_builddir}/../doc/makedoc -f $(top_srcdir)/../doc/doc.str
CLEANFILES = $(CHEWOUT_FILES) *.ref
+CHEWOUT_FILES =
+CHAPTERS =
all: all-am
.SUFFIXES:
@@ -635,8 +639,14 @@ objectlist.awk.in: $(noinst_LTLIBRARIES)
$(CHEW) < $< > $*.def 2> $*.ref
touch stmp-def
+TARGETDOC ?= ../tmp.texi
+
+doc: $(CHEWOUT_FILES)
+ for chapter in $(CHAPTERS) ; \
+ do \
+ cat $(srcdir)/$$chapter >> $(TARGETDOC) ; \
+ done
# No doc for unix.
-doc:
# 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.
diff --git a/newlib/libc/unix/getcwd.c b/newlib/libc/unix/getcwd.c
index b49a4b6e0..63f342402 100644
--- a/newlib/libc/unix/getcwd.c
+++ b/newlib/libc/unix/getcwd.c
@@ -32,6 +32,7 @@
static char sccsid[] = "@(#)getcwd.c 5.11 (Berkeley) 2/24/91";
#endif /* LIBC_SCCS and not lint */
+#include <sys/param.h>
#include <sys/stat.h>
#include <errno.h>
#include <dirent.h>
@@ -56,7 +57,7 @@ getcwd (pt, size)
size_t size;
{
register struct dirent *dp;
- register DIR *dir;
+ register DIR *dir = NULL;
register dev_t dev;
register ino_t ino;
register int first;
@@ -236,6 +237,7 @@ getcwd (pt, size)
bpt -= strlen (dp->d_name);
bcopy (dp->d_name, bpt, strlen (dp->d_name));
(void) closedir (dir);
+ dir = NULL;
/* Truncate any file name. */
*bup = '\0';
@@ -255,6 +257,8 @@ notfound:
err:
if (ptsize)
free (pt);
+ if (dir)
+ (void) closedir (dir);
free (up);
return (char *) NULL;
}
diff --git a/newlib/libc/xdr/Makefile.am b/newlib/libc/xdr/Makefile.am
index 3214ad6eb..8d3ee4c4e 100644
--- a/newlib/libc/xdr/Makefile.am
+++ b/newlib/libc/xdr/Makefile.am
@@ -58,20 +58,8 @@ lib_a_CFLAGS = $(AM_CFLAGS)
noinst_DATA =
endif # USE_LIBTOOL
-SUFFIXES = .def
-
CHEWOUT_FILES =
-
-CHEW = ../../doc/makedoc -f $(srcdir)/../../doc/doc.str
-
-.c.def:
- $(CHEW) < $< > $*.def 2> $*.ref
- touch stmp-def
-
-TARGETDOC = ../tmp.texi
-
-doc: $(CHEWOUT_FILES)
-
-CLEANFILES = $(CHEWOUT_FILES) *.ref
+CHAPTERS =
+# No doc for xdr.
include $(srcdir)/../../Makefile.shared
diff --git a/newlib/libc/xdr/Makefile.in b/newlib/libc/xdr/Makefile.in
index 975b4ac39..7170762bb 100644
--- a/newlib/libc/xdr/Makefile.in
+++ b/newlib/libc/xdr/Makefile.in
@@ -295,10 +295,14 @@ libxdr_la_LDFLAGS = -Xcompiler -nostdlib
@USE_LIBTOOL_FALSE@noinst_LIBRARIES = lib.a
@USE_LIBTOOL_FALSE@lib_a_SOURCES = dummy.c $(ELIX_SOURCES)
@USE_LIBTOOL_FALSE@lib_a_CFLAGS = $(AM_CFLAGS)
-SUFFIXES = .def
CHEWOUT_FILES =
-CHEW = ../../doc/makedoc -f $(srcdir)/../../doc/doc.str
-TARGETDOC = ../tmp.texi
+CHAPTERS =
+
+#
+# documentation rules
+#
+SUFFIXES = .def
+CHEW = ${top_builddir}/../doc/makedoc -f $(top_srcdir)/../doc/doc.str
CLEANFILES = $(CHEWOUT_FILES) *.ref
all: all-am
@@ -606,18 +610,25 @@ uninstall-am:
mostlyclean-libtool pdf pdf-am ps ps-am tags uninstall \
uninstall-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
.c.def:
$(CHEW) < $< > $*.def 2> $*.ref
touch stmp-def
+TARGETDOC ?= ../tmp.texi
+
doc: $(CHEWOUT_FILES)
-objectlist.awk.in: $(noinst_LTLIBRARIES)
- -rm -f objectlist.awk.in
- for i in `ls *.lo` ; \
+ for chapter in $(CHAPTERS) ; \
do \
- echo $$i `pwd`/$$i >> objectlist.awk.in ; \
+ cat $(srcdir)/$$chapter >> $(TARGETDOC) ; \
done
+# No doc for xdr.
# 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.
diff --git a/newlib/libm/common/Makefile.am b/newlib/libm/common/Makefile.am
index ed556ef1d..2a2794869 100644
--- a/newlib/libm/common/Makefile.am
+++ b/newlib/libm/common/Makefile.am
@@ -30,7 +30,9 @@ lsrc = atanl.c cosl.c sinl.c tanl.c tanhl.c frexpl.c modfl.c ceill.c fabsl.c \
copysignl.c nanl.c ilogbl.c asinhl.c cbrtl.c nextafterl.c rintl.c \
scalbnl.c exp2l.c scalblnl.c tgammal.c nearbyintl.c lrintl.c llrintl.c \
roundl.c lroundl.c llroundl.c truncl.c remquol.c fdiml.c fmaxl.c fminl.c \
- fmal.c acoshl.c atanhl.c remainderl.c lgammal.c erfl.c erfcl.c
+ fmal.c acoshl.c atanhl.c remainderl.c lgammal.c erfl.c erfcl.c \
+ logbl.c nexttowardf.c nexttoward.c nexttowardl.c log2l.c \
+ sl_finite.c
libcommon_la_LDFLAGS = -Xcompiler -nostdlib
@@ -53,7 +55,7 @@ endif # USE_LIBTOOL
include $(srcdir)/../../Makefile.shared
-chobj = s_cbrt.def s_copysign.def s_exp10.def s_expm1.def s_ilogb.def \
+CHEWOUT_FILES = s_cbrt.def s_copysign.def s_exp10.def s_expm1.def s_ilogb.def \
s_infinity.def s_isnan.def s_log1p.def s_matherr.def s_modf.def \
s_nan.def s_nextafter.def s_pow10.def s_scalbn.def \
s_fdim.def s_fma.def s_fmax.def s_fmin.def \
@@ -61,19 +63,7 @@ chobj = s_cbrt.def s_copysign.def s_exp10.def s_expm1.def s_ilogb.def \
s_remquo.def s_rint.def s_round.def s_signbit.def s_trunc.def \
isgreater.def
-SUFFIXES = .def
-
-CHEW = ../../doc/makedoc -f $(srcdir)/../../doc/doc.str
-
-.c.def:
- $(CHEW) < $< > $*.def 2> $*.ref
- touch stmp-def
-
-TARGETDOC = ../tmp.texi
-
-doc: $(chobj)
-
-CLEANFILES = $(chobj) *.ref
+CHAPTERS =
# A partial dependency list.
diff --git a/newlib/libm/common/Makefile.in b/newlib/libm/common/Makefile.in
index 12b5a30fb..a1b27870f 100644
--- a/newlib/libm/common/Makefile.in
+++ b/newlib/libm/common/Makefile.in
@@ -136,7 +136,10 @@ am__objects_3 = lib_a-atanl.$(OBJEXT) lib_a-cosl.$(OBJEXT) \
lib_a-fminl.$(OBJEXT) lib_a-fmal.$(OBJEXT) \
lib_a-acoshl.$(OBJEXT) lib_a-atanhl.$(OBJEXT) \
lib_a-remainderl.$(OBJEXT) lib_a-lgammal.$(OBJEXT) \
- lib_a-erfl.$(OBJEXT) lib_a-erfcl.$(OBJEXT)
+ lib_a-erfl.$(OBJEXT) lib_a-erfcl.$(OBJEXT) \
+ lib_a-logbl.$(OBJEXT) lib_a-nexttowardf.$(OBJEXT) \
+ lib_a-nexttoward.$(OBJEXT) lib_a-nexttowardl.$(OBJEXT) \
+ lib_a-log2l.$(OBJEXT) lib_a-sl_finite.$(OBJEXT)
@HAVE_LONG_DOUBLE_TRUE@@USE_LIBTOOL_FALSE@am__objects_4 = \
@HAVE_LONG_DOUBLE_TRUE@@USE_LIBTOOL_FALSE@ $(am__objects_3)
@USE_LIBTOOL_FALSE@am_lib_a_OBJECTS = $(am__objects_1) \
@@ -169,7 +172,8 @@ am__objects_7 = atanl.lo cosl.lo sinl.lo tanl.lo tanhl.lo frexpl.lo \
tgammal.lo nearbyintl.lo lrintl.lo llrintl.lo roundl.lo \
lroundl.lo llroundl.lo truncl.lo remquol.lo fdiml.lo fmaxl.lo \
fminl.lo fmal.lo acoshl.lo atanhl.lo remainderl.lo lgammal.lo \
- erfl.lo erfcl.lo
+ erfl.lo erfcl.lo logbl.lo nexttowardf.lo nexttoward.lo \
+ nexttowardl.lo log2l.lo sl_finite.lo
@HAVE_LONG_DOUBLE_TRUE@@USE_LIBTOOL_TRUE@am__objects_8 = \
@HAVE_LONG_DOUBLE_TRUE@@USE_LIBTOOL_TRUE@ $(am__objects_7)
@USE_LIBTOOL_TRUE@am_libcommon_la_OBJECTS = $(am__objects_5) \
@@ -355,7 +359,9 @@ lsrc = atanl.c cosl.c sinl.c tanl.c tanhl.c frexpl.c modfl.c ceill.c fabsl.c \
copysignl.c nanl.c ilogbl.c asinhl.c cbrtl.c nextafterl.c rintl.c \
scalbnl.c exp2l.c scalblnl.c tgammal.c nearbyintl.c lrintl.c llrintl.c \
roundl.c lroundl.c llroundl.c truncl.c remquol.c fdiml.c fmaxl.c fminl.c \
- fmal.c acoshl.c atanhl.c remainderl.c lgammal.c erfl.c erfcl.c
+ fmal.c acoshl.c atanhl.c remainderl.c lgammal.c erfl.c erfcl.c \
+ logbl.c nexttowardf.c nexttoward.c nexttowardl.c log2l.c \
+ sl_finite.c
libcommon_la_LDFLAGS = -Xcompiler -nostdlib
@USE_LIBTOOL_TRUE@noinst_LTLIBRARIES = libcommon.la
@@ -366,7 +372,14 @@ libcommon_la_LDFLAGS = -Xcompiler -nostdlib
@USE_LIBTOOL_FALSE@noinst_LIBRARIES = lib.a
@USE_LIBTOOL_FALSE@lib_a_SOURCES = $(src) $(fsrc) $(am__append_2)
@USE_LIBTOOL_FALSE@lib_a_CFLAGS = $(AM_CFLAGS)
-chobj = s_cbrt.def s_copysign.def s_exp10.def s_expm1.def s_ilogb.def \
+
+#
+# documentation rules
+#
+SUFFIXES = .def
+CHEW = ${top_builddir}/../doc/makedoc -f $(top_srcdir)/../doc/doc.str
+CLEANFILES = $(CHEWOUT_FILES) *.ref
+CHEWOUT_FILES = s_cbrt.def s_copysign.def s_exp10.def s_expm1.def s_ilogb.def \
s_infinity.def s_isnan.def s_log1p.def s_matherr.def s_modf.def \
s_nan.def s_nextafter.def s_pow10.def s_scalbn.def \
s_fdim.def s_fma.def s_fmax.def s_fmin.def \
@@ -374,10 +387,7 @@ chobj = s_cbrt.def s_copysign.def s_exp10.def s_expm1.def s_ilogb.def \
s_remquo.def s_rint.def s_round.def s_signbit.def s_trunc.def \
isgreater.def
-SUFFIXES = .def
-CHEW = ../../doc/makedoc -f $(srcdir)/../../doc/doc.str
-TARGETDOC = ../tmp.texi
-CLEANFILES = $(chobj) *.ref
+CHAPTERS =
all: all-am
.SUFFIXES:
@@ -1203,6 +1213,42 @@ lib_a-erfcl.o: erfcl.c
lib_a-erfcl.obj: erfcl.c
$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-erfcl.obj `if test -f 'erfcl.c'; then $(CYGPATH_W) 'erfcl.c'; else $(CYGPATH_W) '$(srcdir)/erfcl.c'; fi`
+lib_a-logbl.o: logbl.c
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-logbl.o `test -f 'logbl.c' || echo '$(srcdir)/'`logbl.c
+
+lib_a-logbl.obj: logbl.c
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-logbl.obj `if test -f 'logbl.c'; then $(CYGPATH_W) 'logbl.c'; else $(CYGPATH_W) '$(srcdir)/logbl.c'; fi`
+
+lib_a-nexttowardf.o: nexttowardf.c
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-nexttowardf.o `test -f 'nexttowardf.c' || echo '$(srcdir)/'`nexttowardf.c
+
+lib_a-nexttowardf.obj: nexttowardf.c
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-nexttowardf.obj `if test -f 'nexttowardf.c'; then $(CYGPATH_W) 'nexttowardf.c'; else $(CYGPATH_W) '$(srcdir)/nexttowardf.c'; fi`
+
+lib_a-nexttoward.o: nexttoward.c
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-nexttoward.o `test -f 'nexttoward.c' || echo '$(srcdir)/'`nexttoward.c
+
+lib_a-nexttoward.obj: nexttoward.c
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-nexttoward.obj `if test -f 'nexttoward.c'; then $(CYGPATH_W) 'nexttoward.c'; else $(CYGPATH_W) '$(srcdir)/nexttoward.c'; fi`
+
+lib_a-nexttowardl.o: nexttowardl.c
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-nexttowardl.o `test -f 'nexttowardl.c' || echo '$(srcdir)/'`nexttowardl.c
+
+lib_a-nexttowardl.obj: nexttowardl.c
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-nexttowardl.obj `if test -f 'nexttowardl.c'; then $(CYGPATH_W) 'nexttowardl.c'; else $(CYGPATH_W) '$(srcdir)/nexttowardl.c'; fi`
+
+lib_a-log2l.o: log2l.c
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-log2l.o `test -f 'log2l.c' || echo '$(srcdir)/'`log2l.c
+
+lib_a-log2l.obj: log2l.c
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-log2l.obj `if test -f 'log2l.c'; then $(CYGPATH_W) 'log2l.c'; else $(CYGPATH_W) '$(srcdir)/log2l.c'; fi`
+
+lib_a-sl_finite.o: sl_finite.c
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-sl_finite.o `test -f 'sl_finite.c' || echo '$(srcdir)/'`sl_finite.c
+
+lib_a-sl_finite.obj: sl_finite.c
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-sl_finite.obj `if test -f 'sl_finite.c'; then $(CYGPATH_W) 'sl_finite.c'; else $(CYGPATH_W) '$(srcdir)/sl_finite.c'; fi`
+
mostlyclean-libtool:
-rm -f *.lo
@@ -1391,7 +1437,13 @@ objectlist.awk.in: $(noinst_LTLIBRARIES)
$(CHEW) < $< > $*.def 2> $*.ref
touch stmp-def
-doc: $(chobj)
+TARGETDOC ?= ../tmp.texi
+
+doc: $(CHEWOUT_FILES)
+ for chapter in $(CHAPTERS) ; \
+ do \
+ cat $(srcdir)/$$chapter >> $(TARGETDOC) ; \
+ done
# A partial dependency list.
diff --git a/newlib/libm/common/fdlibm.h b/newlib/libm/common/fdlibm.h
index a4b7fffe7..821e4dedb 100644
--- a/newlib/libm/common/fdlibm.h
+++ b/newlib/libm/common/fdlibm.h
@@ -146,6 +146,8 @@ extern double scalb __P((double, double));
#endif
extern double significand __P((double));
+extern long double __ieee754_hypotl __P((long double, long double));
+
/* ieee style elementary functions */
extern double __ieee754_sqrt __P((double));
extern double __ieee754_acos __P((double));
diff --git a/newlib/libm/common/hypotl.c b/newlib/libm/common/hypotl.c
index 3934b8ecc..cf67ccf58 100644
--- a/newlib/libm/common/hypotl.c
+++ b/newlib/libm/common/hypotl.c
@@ -29,14 +29,61 @@ POSSIBILITY OF SUCH DAMAGE.
*/
#include <math.h>
-#include "local.h"
+#include <errno.h>
+#include "fdlibm.h"
-/* On platforms where long double is as wide as double. */
-#ifdef _LDBL_EQ_DBL
long double
hypotl (long double x, long double y)
{
+#ifdef _LDBL_EQ_DBL
+
+ /* On platforms where long double is as wide as double. */
return hypot(x, y);
-}
+
+#else
+
+ long double z;
+
+ z = __ieee754_hypotl (x, y);
+
+ if (_LIB_VERSION == _IEEE_)
+ return z;
+
+ if ((! finitel (z)) && finitel (x) && finitel (y))
+ {
+ /* hypot (finite, finite) overflow. */
+ struct exception exc;
+
+ exc.type = OVERFLOW;
+ exc.name = "hypotl";
+ exc.err = 0;
+ exc.arg1 = x;
+ exc.arg2 = y;
+
+ if (_LIB_VERSION == _SVID_)
+ exc.retval = HUGE;
+ else
+ {
+#ifndef HUGE_VAL
+#define HUGE_VAL inf
+ double inf = 0.0;
+
+ SET_HIGH_WORD (inf, 0x7ff00000); /* Set inf to infinite. */
#endif
+ exc.retval = HUGE_VAL;
+ }
+ if (_LIB_VERSION == _POSIX_)
+ errno = ERANGE;
+ else if (! matherr (& exc))
+ errno = ERANGE;
+
+ if (exc.err != 0)
+ errno = exc.err;
+
+ return (long double) exc.retval;
+ }
+
+ return z;
+#endif /* ! _LDBL_EQ_DBL */
+}
diff --git a/newlib/libm/common/isgreater.c b/newlib/libm/common/isgreater.c
index bd4e95e05..54a8e6d42 100644
--- a/newlib/libm/common/isgreater.c
+++ b/newlib/libm/common/isgreater.c
@@ -3,7 +3,7 @@
* defined in math.h (q.v.). */
/*
FUNCTION
-<<isgreater>>, <<isgreaterequal>>, <<isless>>, <<islessequal>>, <<islessgreater>>, and <<isunordered>>--comparison macros
+<<isgreater>>, <<isgreaterequal>>, <<isless>>, <<islessequal>>, <<islessgreater>>, and <<isunordered>>---comparison macros
INDEX
isgreater
INDEX
diff --git a/newlib/libm/common/log2l.c b/newlib/libm/common/log2l.c
new file mode 100644
index 000000000..e92e9ebf6
--- /dev/null
+++ b/newlib/libm/common/log2l.c
@@ -0,0 +1,38 @@
+/*
+Copyright (c) 2014 Mentor Graphics, Inc.
+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 Mentor Graphics 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 CODESOURCERY, INC. ``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 CODESOURCERY 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 <math.h>
+#include "local.h"
+
+#ifdef _LDBL_EQ_DBL
+long double
+log2l (long double x)
+{
+ return log2(x);
+}
+#endif
+
diff --git a/newlib/libm/common/logbl.c b/newlib/libm/common/logbl.c
new file mode 100644
index 000000000..59d24a2f5
--- /dev/null
+++ b/newlib/libm/common/logbl.c
@@ -0,0 +1,38 @@
+/*
+Copyright (c) 2014 Mentor Graphics, Inc.
+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 Mentor Graphics 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 CODESOURCERY, INC. ``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 CODESOURCERY 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 <math.h>
+#include "local.h"
+
+#ifdef _LDBL_EQ_DBL
+long double
+logbl (long double x)
+{
+ return logb(x);
+}
+#endif
+
diff --git a/newlib/libm/common/modfl.c b/newlib/libm/common/modfl.c
index 32ccc9a7d..3b31c6a29 100644
--- a/newlib/libm/common/modfl.c
+++ b/newlib/libm/common/modfl.c
@@ -36,7 +36,7 @@ POSSIBILITY OF SUCH DAMAGE.
long double
modfl (long double x, long double *iptr)
{
- return modf(x, iptr);
+ return modf(x, (double *)iptr);
}
#endif
diff --git a/newlib/libm/common/nexttoward.c b/newlib/libm/common/nexttoward.c
new file mode 100644
index 000000000..71dd71d09
--- /dev/null
+++ b/newlib/libm/common/nexttoward.c
@@ -0,0 +1,38 @@
+/*
+Copyright (c) 2014 Mentor Graphics, Inc.
+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 Mentor Graphics 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 CODESOURCERY, INC. ``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 CODESOURCERY 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 <math.h>
+#include "local.h"
+
+#ifdef _LDBL_EQ_DBL
+double
+nexttoward (double x, long double y)
+{
+ return nextafter(x, y);
+}
+#endif
+
diff --git a/newlib/libm/common/nexttowardf.c b/newlib/libm/common/nexttowardf.c
new file mode 100644
index 000000000..6f473190f
--- /dev/null
+++ b/newlib/libm/common/nexttowardf.c
@@ -0,0 +1,78 @@
+/*
+ * Copyright © 2005-2014 Rich Felker, et al.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining
+ * a copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sublicense, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be
+ * included in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+ * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+ * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+#include <math.h>
+#include <inttypes.h>
+#include "local.h"
+
+union fshape {
+ float value;
+ uint32_t bits;
+};
+
+// This is only necessary because the implementation of isnan only works
+// properly when long double == double.
+// See: https://sourceware.org/ml/newlib/2014/msg00684.html
+#ifdef _LDBL_EQ_DOUBLE
+
+float
+nexttowardf (float x, long double y)
+{
+ union fshape ux;
+ uint32_t e;
+
+ if (isnan(x) || isnan(y))
+ return x + y;
+ if (x == y)
+ return y;
+ ux.value = x;
+ if (x == 0) {
+ ux.bits = 1;
+ if (signbit(y))
+ ux.bits |= 0x80000000;
+ } else if (x < y) {
+ if (signbit(x))
+ ux.bits--;
+ else
+ ux.bits++;
+ } else {
+ if (signbit(x))
+ ux.bits++;
+ else
+ ux.bits--;
+ }
+ e = ux.bits & 0x7f800000;
+ /* raise overflow if ux.value is infinite and x is finite */
+ if (e == 0x7f800000) {
+ volatile float force_eval;
+ force_eval = x + x;
+ }
+ /* raise underflow if ux.value is subnormal or zero */
+ if (e == 0) {
+ volatile float force_eval;
+ force_eval = x*x + ux.value*ux.value;
+ }
+ return ux.value;
+}
+
+#endif // _LDBL_EQ_DOUBLE
diff --git a/newlib/libm/common/nexttowardl.c b/newlib/libm/common/nexttowardl.c
new file mode 100644
index 000000000..59af4ce36
--- /dev/null
+++ b/newlib/libm/common/nexttowardl.c
@@ -0,0 +1,38 @@
+/*
+Copyright (c) 2014 Mentor Graphics, Inc.
+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 Mentor Graphics 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 CODESOURCERY, INC. ``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 CODESOURCERY 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 <math.h>
+#include "local.h"
+
+#ifdef _LDBL_EQ_DBL
+long double
+nexttowardl (long double x, long double y)
+{
+ return nextafter(x, y);
+}
+#endif
+
diff --git a/newlib/libm/common/s_exp10.c b/newlib/libm/common/s_exp10.c
index 12f30036e..23cedfbf3 100644
--- a/newlib/libm/common/s_exp10.c
+++ b/newlib/libm/common/s_exp10.c
@@ -14,7 +14,7 @@
/*
FUNCTION
- <<exp10>>, <<exp10f>>---exponential
+ <<exp10>>, <<exp10f>>---exponential, base 10
INDEX
exp10
INDEX
diff --git a/newlib/libm/common/s_fdim.c b/newlib/libm/common/s_fdim.c
index 8eb878209..a6c465cc4 100644
--- a/newlib/libm/common/s_fdim.c
+++ b/newlib/libm/common/s_fdim.c
@@ -5,7 +5,7 @@
*/
/*
FUNCTION
-<<fdim>>, <<fdimf>>--positive difference
+<<fdim>>, <<fdimf>>---positive difference
INDEX
fdim
INDEX
diff --git a/newlib/libm/common/s_fma.c b/newlib/libm/common/s_fma.c
index 964a8284a..bbb3eb09b 100644
--- a/newlib/libm/common/s_fma.c
+++ b/newlib/libm/common/s_fma.c
@@ -1,6 +1,6 @@
/*
FUNCTION
-<<fma>>, <<fmaf>>--floating multiply add
+<<fma>>, <<fmaf>>---floating multiply add
INDEX
fma
INDEX
diff --git a/newlib/libm/common/s_fmax.c b/newlib/libm/common/s_fmax.c
index 4003f9a34..8f446e216 100644
--- a/newlib/libm/common/s_fmax.c
+++ b/newlib/libm/common/s_fmax.c
@@ -5,7 +5,7 @@
*/
/*
FUNCTION
-<<fmax>>, <<fmaxf>>--maximum
+<<fmax>>, <<fmaxf>>---maximum
INDEX
fmax
INDEX
diff --git a/newlib/libm/common/s_fmin.c b/newlib/libm/common/s_fmin.c
index 2a059209c..2d0cd8021 100644
--- a/newlib/libm/common/s_fmin.c
+++ b/newlib/libm/common/s_fmin.c
@@ -5,7 +5,7 @@
*/
/*
FUNCTION
-<<fmin>>, <<fminf>>--minimum
+<<fmin>>, <<fminf>>---minimum
INDEX
fmin
INDEX
diff --git a/newlib/libm/common/s_infinity.c b/newlib/libm/common/s_infinity.c
index 02a545edb..9285a762f 100644
--- a/newlib/libm/common/s_infinity.c
+++ b/newlib/libm/common/s_infinity.c
@@ -5,7 +5,7 @@
/*
FUNCTION
- <<infinity>>, <<infinityf>>--representation of infinity
+ <<infinity>>, <<infinityf>>---representation of infinity
INDEX
infinity
diff --git a/newlib/libm/common/s_isinf.c b/newlib/libm/common/s_isinf.c
index db8e8f82b..fe18e2aba 100644
--- a/newlib/libm/common/s_isinf.c
+++ b/newlib/libm/common/s_isinf.c
@@ -4,9 +4,8 @@
*
* isinf is a <math.h> macro in the C99 standard. It was previously
* implemented as a function by newlib and is declared as such in
- * <ieeefp.h>. Newlib supplies it here as a function if the user
- * chooses to use <ieeefp.h> or needs to link older code compiled with the
- * previous <math.h> declaration.
+ * <math.h>. Newlib supplies it here as a function if the user
+ * chooses to use it instead of the C99 macro.
*/
#include "fdlibm.h"
@@ -14,6 +13,8 @@
#ifndef _DOUBLE_IS_32BITS
+#undef isinf
+
int
_DEFUN (isinf, (x),
double x)
diff --git a/newlib/libm/common/s_isnan.c b/newlib/libm/common/s_isnan.c
index 5ae6c9b81..bc0a91631 100644
--- a/newlib/libm/common/s_isnan.c
+++ b/newlib/libm/common/s_isnan.c
@@ -13,7 +13,7 @@
/*
FUNCTION
-<<fpclassify>>, <<isfinite>>, <<isinf>>, <<isnan>>, and <<isnormal>>--floating-point classification macros; <<finite>>, <<finitef>>, <<isinf>>, <<isinff>>, <<isnan>>, <<isnanf>>--test for exceptional numbers
+<<fpclassify>>, <<isfinite>>, <<isinf>>, <<isnan>>, and <<isnormal>>---floating-point classification macros; <<finite>>, <<finitef>>, <<isinf>>, <<isinff>>, <<isnan>>, <<isnanf>>---test for exceptional numbers
@c C99 (start
INDEX
@@ -53,7 +53,7 @@ ANSI_SYNOPSIS
int isnormal(real-floating <[x]>);
[Archaic SUSv2 functions:]
- #include <ieeefp.h>
+ #include <math.h>
int isnan(double <[arg]>);
int isinf(double <[arg]>);
int finite(double <[arg]>);
@@ -142,7 +142,7 @@ o-
and <<isinf>> are macros that operate on multiple types of
floating-point. The SUSv2 standard declares <<isnan>> as
a function taking double. Newlib has decided to declare
- them both as macros in math.h and as functions in ieeefp.h to
+ them both as functions and as macros in math.h to
maintain backward compatibility.
RETURNS
@@ -154,9 +154,11 @@ The isnan macro returns nonzero if <[x]> is an NaN, else 0.@*
The isnormal macro returns nonzero if <[x]> has a normal value, else 0.
PORTABILITY
-math.h macros are C99, POSIX.
+math.h macros are C99, POSIX.1-2001.
-ieeefp.h funtions are outdated and should be avoided.
+The functions originate from BSD; isnan was listed in the X/Open
+Portability Guide and Single Unix Specification, but was dropped when
+the macro was standardized in POSIX.1-2001.
QUICKREF
isnan - pure
@@ -179,8 +181,8 @@ QUICKREF
* The C99 standard dictates that isnan is a macro taking
* multiple floating-point types while the SUSv2 standard
* notes it is a function taking a double argument. Newlib
- * has chosen to implement it as a macro in <math.h> and
- * declare it as a function in <ieeefp.h>.
+ * has chosen to declare it both as a function and as a macro in
+ * <math.h> for compatibility.
*/
#include "fdlibm.h"
@@ -188,6 +190,8 @@ QUICKREF
#ifndef _DOUBLE_IS_32BITS
+#undef isnan
+
#ifdef __STDC__
int isnan(double x)
#else
diff --git a/newlib/libm/common/s_isnand.c b/newlib/libm/common/s_isnand.c
index 75538d907..0ac8c5938 100644
--- a/newlib/libm/common/s_isnand.c
+++ b/newlib/libm/common/s_isnand.c
@@ -28,7 +28,7 @@ INDEX
finitef
ANSI_SYNOPSIS
- #include <ieeefp.h>
+ #include <math.h>
int isnan(double <[arg]>);
int isinf(double <[arg]>);
int finite(double <[arg]>);
@@ -37,7 +37,7 @@ ANSI_SYNOPSIS
int finitef(float <[arg]>);
TRAD_SYNOPSIS
- #include <ieeefp.h>
+ #include <math.h>
int isnan(<[arg]>)
double <[arg]>;
int isinf(<[arg]>)
@@ -77,8 +77,8 @@ DESCRIPTION
Note that by the C99 standard, <<isnan>> and <<isinf>> are macros
taking any type of floating-point and are declared in
- <<math.h>>. Newlib has chosen to declare these as macros in
- <<math.h>> and as functions in <<ieeefp.h>>.
+ <<math.h>>. Newlib has chosen to declare these both as functions
+ and as macros in <<math.h>>.
The <<isnanf>>, <<isinff>> and <<finitef>> functions perform the same
operations as their <<isnan>>, <<isinf>> and <<finite>>
diff --git a/newlib/libm/common/s_log2.c b/newlib/libm/common/s_log2.c
index e5087858b..3b05066b1 100644
--- a/newlib/libm/common/s_log2.c
+++ b/newlib/libm/common/s_log2.c
@@ -14,7 +14,7 @@
/*
FUNCTION
- <<log2>>, <<log2f>>--base 2 logarithm
+ <<log2>>, <<log2f>>---base 2 logarithm
INDEX
log2
INDEX
diff --git a/newlib/libm/common/s_logb.c b/newlib/libm/common/s_logb.c
index 1be4cddb3..7e71457a5 100644
--- a/newlib/libm/common/s_logb.c
+++ b/newlib/libm/common/s_logb.c
@@ -12,7 +12,7 @@
*/
/*
FUNCTION
- <<logb>>, <<logbf>>--get exponent of floating-point number
+ <<logb>>, <<logbf>>---get exponent of floating-point number
INDEX
logb
INDEX
diff --git a/newlib/libm/common/s_lrint.c b/newlib/libm/common/s_lrint.c
index cf35dcfbd..52bb52292 100644
--- a/newlib/libm/common/s_lrint.c
+++ b/newlib/libm/common/s_lrint.c
@@ -12,7 +12,7 @@
*/
/*
FUNCTION
-<<lrint>>, <<lrintf>>, <<llrint>>, <<llrintf>>--round to integer
+<<lrint>>, <<lrintf>>, <<llrint>>, <<llrintf>>---round to integer
INDEX
lrint
INDEX
diff --git a/newlib/libm/common/s_lround.c b/newlib/libm/common/s_lround.c
index 7c1eb3144..52cd74f16 100644
--- a/newlib/libm/common/s_lround.c
+++ b/newlib/libm/common/s_lround.c
@@ -10,7 +10,7 @@
*/
/*
FUNCTION
-<<lround>>, <<lroundf>>, <<llround>>, <<llroundf>>--round to integer, to nearest
+<<lround>>, <<lroundf>>, <<llround>>, <<llroundf>>---round to integer, to nearest
INDEX
lround
INDEX
diff --git a/newlib/libm/common/s_nan.c b/newlib/libm/common/s_nan.c
index 7ff4ef73e..a98650db0 100644
--- a/newlib/libm/common/s_nan.c
+++ b/newlib/libm/common/s_nan.c
@@ -14,8 +14,8 @@ INDEX
ANSI_SYNOPSIS
#include <math.h>
- double nan(const char *);
- float nanf(const char *);
+ double nan(const char *<[unused]>);
+ float nanf(const char *<[unused]>);
TRAD_SYNOPSIS
#include <math.h>
@@ -41,7 +41,11 @@ QUICKREF
{
double x;
+#if __GNUC_PREREQ (3, 3)
+ x = __builtin_nan("");
+#else
INSERT_WORDS(x,0x7ff80000,0);
+#endif
return x;
}
diff --git a/newlib/libm/common/s_nearbyint.c b/newlib/libm/common/s_nearbyint.c
index e7a022072..714b66a5c 100644
--- a/newlib/libm/common/s_nearbyint.c
+++ b/newlib/libm/common/s_nearbyint.c
@@ -10,7 +10,7 @@
*/
/*
FUNCTION
-<<nearbyint>>, <<nearbyintf>>--round to integer
+<<nearbyint>>, <<nearbyintf>>---round to integer
INDEX
nearbyint
INDEX
diff --git a/newlib/libm/common/s_pow10.c b/newlib/libm/common/s_pow10.c
index 16ec0046a..052e26d36 100644
--- a/newlib/libm/common/s_pow10.c
+++ b/newlib/libm/common/s_pow10.c
@@ -14,7 +14,7 @@
/*
FUNCTION
- <<pow10>>, <<pow10f>>---exponential
+ <<pow10>>, <<pow10f>>---base 10 power functions
INDEX
pow10
INDEX
diff --git a/newlib/libm/common/s_remquo.c b/newlib/libm/common/s_remquo.c
index 8ae287575..30bf15f14 100644
--- a/newlib/libm/common/s_remquo.c
+++ b/newlib/libm/common/s_remquo.c
@@ -13,7 +13,7 @@
*/
/*
FUNCTION
-<<remquo>>, <<remquof>>--remainder and part of quotient
+<<remquo>>, <<remquof>>---remainder and part of quotient
INDEX
remquo
INDEX
diff --git a/newlib/libm/common/s_rint.c b/newlib/libm/common/s_rint.c
index 76cff08a1..f06325a8d 100644
--- a/newlib/libm/common/s_rint.c
+++ b/newlib/libm/common/s_rint.c
@@ -12,7 +12,7 @@
*/
/*
FUNCTION
-<<rint>>, <<rintf>>--round to integer
+<<rint>>, <<rintf>>---round to integer
INDEX
rint
INDEX
diff --git a/newlib/libm/common/s_round.c b/newlib/libm/common/s_round.c
index b2cc0f558..07aac9ecf 100644
--- a/newlib/libm/common/s_round.c
+++ b/newlib/libm/common/s_round.c
@@ -10,7 +10,7 @@
*/
/*
FUNCTION
-<<round>>, <<roundf>>--round to integer, to nearest
+<<round>>, <<roundf>>---round to integer, to nearest
INDEX
round
INDEX
diff --git a/newlib/libm/common/s_scalbn.c b/newlib/libm/common/s_scalbn.c
index 50f20efec..7fab5861f 100644
--- a/newlib/libm/common/s_scalbn.c
+++ b/newlib/libm/common/s_scalbn.c
@@ -13,7 +13,7 @@
/*
FUNCTION
-<<scalbn>>, <<scalbnf>>, <<scalbln>>, <<scalblnf>>--scale by power of FLT_RADIX (=2)
+<<scalbn>>, <<scalbnf>>, <<scalbln>>, <<scalblnf>>---scale by power of FLT_RADIX (=2)
INDEX
scalbn
INDEX
diff --git a/newlib/libm/common/s_signbit.c b/newlib/libm/common/s_signbit.c
index 746ab4662..d2ba1fcb9 100644
--- a/newlib/libm/common/s_signbit.c
+++ b/newlib/libm/common/s_signbit.c
@@ -5,7 +5,7 @@
*/
/*
FUNCTION
-<<signbit>>--Does floating-point number have negative sign?
+<<signbit>>---Does floating-point number have negative sign?
INDEX
signbit
@@ -41,19 +41,19 @@ int __signbitd (double x);
int
__signbitf (float x)
{
- unsigned int w;
+ __uint32_t w;
GET_FLOAT_WORD(w,x);
- return (w & 0x80000000);
+ return (w & 0x80000000) != 0;
}
int
__signbitd (double x)
{
- unsigned int msw;
+ __uint32_t msw;
GET_HIGH_WORD(msw, x);
- return (msw & 0x80000000);
+ return (msw & 0x80000000) != 0;
}
diff --git a/newlib/libm/common/s_trunc.c b/newlib/libm/common/s_trunc.c
index daeb7910a..31a1f92b9 100644
--- a/newlib/libm/common/s_trunc.c
+++ b/newlib/libm/common/s_trunc.c
@@ -10,7 +10,7 @@
*/
/*
FUNCTION
-<<trunc>>, <<truncf>>--round to integer, towards zero
+<<trunc>>, <<truncf>>---round to integer, towards zero
INDEX
trunc
INDEX
diff --git a/newlib/libm/common/sf_isinf.c b/newlib/libm/common/sf_isinf.c
index 6595a681c..5b57a346f 100644
--- a/newlib/libm/common/sf_isinf.c
+++ b/newlib/libm/common/sf_isinf.c
@@ -3,9 +3,8 @@
*
* isinf is a <math.h> macro in the C99 standard. It was previously
* implemented as isinf and isinff functions by newlib and are still declared
- * as such in <ieeefp.h>. Newlib supplies it here as a function if the user
- * chooses to use <ieeefp.h> or needs to link older code compiled with the
- * previous <math.h> declaration.
+ * as such in <math.h>. Newlib supplies it here as a function if the user
+ * chooses to use it instead of the C99 macro.
*/
#include "fdlibm.h"
diff --git a/newlib/libm/common/sf_isnan.c b/newlib/libm/common/sf_isnan.c
index ddda6b331..9c813fc24 100644
--- a/newlib/libm/common/sf_isnan.c
+++ b/newlib/libm/common/sf_isnan.c
@@ -15,7 +15,7 @@
/*
* isnanf(x) returns 1 is x is nan, else 0;
*
- * isnanf is an extension declared in <ieeefp.h>.
+ * isnanf is an extension declared in <math.h>.
*/
#include "fdlibm.h"
diff --git a/newlib/libm/common/sf_nan.c b/newlib/libm/common/sf_nan.c
index 831f3f79f..8f0e1a8cf 100644
--- a/newlib/libm/common/sf_nan.c
+++ b/newlib/libm/common/sf_nan.c
@@ -9,7 +9,11 @@
{
float x;
+#if __GNUC_PREREQ (3, 3)
+ x = __builtin_nanf("");
+#else
SET_FLOAT_WORD(x,0x7fc00000);
+#endif
return x;
}
diff --git a/newlib/libm/common/sl_finite.c b/newlib/libm/common/sl_finite.c
new file mode 100644
index 000000000..9ec629018
--- /dev/null
+++ b/newlib/libm/common/sl_finite.c
@@ -0,0 +1,25 @@
+/* Copyright (C) 2015 by Red Hat, Incorporated. All rights reserved.
+ *
+ * Permission to use, copy, modify, and distribute this software
+ * is freely granted, provided that this notice is preserved.
+ */
+
+/* finitel(x) returns 1 is x is finite, else 0; */
+
+#include <math.h>
+
+int
+finitel (long double x)
+{
+#ifdef _LDBL_EQ_DBL
+ return finite (x);
+#else
+ /* Let the compiler do this for us.
+ Note - we do not know how many bits there are in a long double.
+ Some architectures for example have an 80-bit long double whereas
+ others use 128-bits. We use macros and comiler builtin functions
+ to avoid specific knowledge of the long double format. */
+ return __builtin_isfinite (x);
+#endif
+}
+
diff --git a/newlib/libm/common/sqrtl.c b/newlib/libm/common/sqrtl.c
index 1e7d7c1d6..8cd717e19 100644
--- a/newlib/libm/common/sqrtl.c
+++ b/newlib/libm/common/sqrtl.c
@@ -31,12 +31,165 @@ POSSIBILITY OF SUCH DAMAGE.
#include <math.h>
#include "local.h"
-/* On platforms where long double is as wide as double. */
#ifdef _LDBL_EQ_DBL
+/* On platforms where long double is as wide as double. */
long double
sqrtl (long double x)
{
return sqrt(x);
}
+
+#else
+
+ /* This code is based upon the version in the BSD math's library.
+ That code is...
+ *
+ * Copyright (c) 2007 Steven G. Kargl
+ * 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 unmodified, 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 ``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 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 <float.h>
+#include "ieeefp.h"
+
+#ifndef LDBL_NBIT
+#define LDBL_NBIT 0
#endif
+#ifndef LDBL_MAX_EXP
+#define LDBL_MAX_EXP DBL_MAX_EXP
+#endif
+
+/* Return (x + ulp) for normal positive x. Assumes no overflow. */
+
+static inline long double
+inc (long double x)
+{
+ union ieee_ext_u ux = { .extu_ld = x, };
+
+ if (++ux.extu_ext.ext_fracl == 0)
+ {
+ if (++ux.extu_ext.ext_frach == 0)
+ {
+ ux.extu_ext.ext_exp++;
+ ux.extu_ext.ext_frach |= LDBL_NBIT;
+ }
+ }
+
+ return ux.extu_ld;
+}
+
+/* Return (x - ulp) for normal positive x. Assumes no underflow. */
+
+static inline long double
+dec (long double x)
+{
+ union ieee_ext_u ux = { .extu_ld = x, };
+
+ if (ux.extu_ext.ext_fracl-- == 0)
+ {
+ if (ux.extu_ext.ext_frach-- == LDBL_NBIT)
+ {
+ ux.extu_ext.ext_exp--;
+ ux.extu_ext.ext_frach |= LDBL_NBIT;
+ }
+ }
+
+ return ux.extu_ld;
+}
+
+/* This is slow, but simple and portable. */
+
+long double
+sqrtl (long double x)
+{
+ union ieee_ext_u ux = { .extu_ld = x, };
+ int k, r;
+ long double lo, xn;
+
+ /* If x = NaN, then sqrt(x) = NaN. */
+ /* If x = Inf, then sqrt(x) = Inf. */
+ /* If x = -Inf, then sqrt(x) = NaN. */
+ if (ux.extu_ext.ext_exp == LDBL_MAX_EXP * 2 - 1)
+ return (x * x + x);
+
+ /* If x = +-0, then sqrt(x) = +-0. */
+ if (x == 0.0L || x == -0.0L)
+ return x;
+
+ /* If x < 0, then raise invalid and return NaN. */
+ if (ux.extu_ext.ext_sign)
+ return ((x - x) / (x - x));
+
+ if (ux.extu_ext.ext_exp == 0)
+ {
+ /* Adjust subnormal numbers. */
+ ux.extu_ld *= 0x1.0p514;
+ k = -514;
+ }
+ else
+ k = 0;
+
+ /* ux.extu_ld is a normal number, so break it into ux.extu_ld = e*2^n where
+ ux.extu_ld = (2*e)*2^2k for odd n and ux.extu_ld = (4*e)*2^2k for even n. */
+
+ if ((ux.extu_ext.ext_exp - EXT_EXP_BIAS) & 1)
+ {
+ /* n is even. */
+ k += ux.extu_ext.ext_exp - EXT_EXP_BIAS - 1; /* 2k = n - 2. */
+ ux.extu_ext.ext_exp = EXT_EXP_BIAS + 1; /* ux.extu_ld in [2,4). */
+ }
+ else
+ {
+ k += ux.extu_ext.ext_exp - EXT_EXP_BIAS; /* 2k = n - 1. */
+ ux.extu_ext.ext_exp = EXT_EXP_BIAS; /* ux.extu_ld in [1,2). */
+ }
+
+ /* Newton's iteration.
+ Split ux.extu_ld into a high and low part to achieve additional precision. */
+
+ xn = sqrt ((double) ux.extu_ld); /* 53-bit estimate of sqrtl(x). */
+
+#if LDBL_MANT_DIG > 100
+ xn = (xn + (ux.extu_ld / xn)) * 0.5; /* 106-bit estimate. */
+#endif
+
+ lo = ux.extu_ld;
+ ux.extu_ext.ext_fracl = 0; /* Zero out lower bits. */
+ lo = (lo - ux.extu_ld) / xn; /* Low bits divided by xn. */
+ xn = xn + (ux.extu_ld / xn); /* High portion of estimate. */
+ ux.extu_ld = xn + lo; /* Combine everything. */
+ ux.extu_ext.ext_exp += (k >> 1) - 1;
+
+ xn = x / ux.extu_ld; /* Chopped quotient (inexact?). */
+
+ /* For simplicity we round to nearest. */
+ xn = inc (xn); /* xn = xn + ulp. */
+
+ ux.extu_ld = ux.extu_ld + xn; /* Chopped sum. */
+ ux.extu_ext.ext_exp--;
+
+ return ux.extu_ld;
+}
+#endif /* ! _LDBL_EQ_DBL */
+
+
diff --git a/newlib/libm/complex/Makefile.am b/newlib/libm/complex/Makefile.am
index dbbe759be..6ba49b64a 100644
--- a/newlib/libm/complex/Makefile.am
+++ b/newlib/libm/complex/Makefile.am
@@ -6,13 +6,14 @@ INCLUDES = -I$(srcdir)/../common -I$(srcdir)/ $(NEWLIB_CFLAGS) $(CROSS_CFLAGS) $
src = cabs.c cacos.c cacosh.c carg.c casin.c casinh.c \
catan.c catanh.c ccos.c ccosh.c cephes_subr.c \
- cexp.c cimag.c clog.c conj.c \
+ cexp.c cimag.c clog.c clog10.c conj.c \
cpow.c cproj.c creal.c \
csin.c csinh.c csqrt.c ctan.c ctanh.c
-
+
+lsrc = cabsl.c creall.c cimagl.c
fsrc = cabsf.c casinf.c ccosf.c cimagf.c cprojf.c \
- csqrtf.c cacosf.c casinhf.c ccoshf.c clogf.c \
+ csqrtf.c cacosf.c casinhf.c ccoshf.c clogf.c clog10f.c \
crealf.c ctanf.c cacoshf.c catanf.c \
cephes_subrf.c conjf.c csinf.c ctanhf.c \
cargf.c catanhf.c cexpf.c cpowf.c csinhf.c
@@ -21,38 +22,24 @@ libcomplex_la_LDFLAGS = -Xcompiler -nostdlib
if USE_LIBTOOL
noinst_LTLIBRARIES = libcomplex.la
-libcomplex_la_SOURCES = $(src) $(fsrc)
+libcomplex_la_SOURCES = $(src) $(fsrc) $(lsrc)
noinst_DATA = objectlist.awk.in
else
noinst_LIBRARIES = lib.a
-lib_a_SOURCES = $(src) $(fsrc)
+lib_a_SOURCES = $(src) $(fsrc) $(lsrc)
lib_a_CFLAGS = $(AM_CFLAGS)
noinst_DATA =
endif # USE_LIBTOOL
include $(srcdir)/../../Makefile.shared
-chobj = cabs.def cacos.def cacosh.def carg.def \
+CHEWOUT_FILES = cabs.def cacos.def cacosh.def carg.def \
casin.def casinh.def catan.def catanh.def \
ccos.def ccosh.def cexp.def cimag.def clog.def \
- conj.def cpow.def cproj.def creal.def \
+ clog10.def conj.def cpow.def cproj.def creal.def \
csin.def csinh.def csqrt.def ctan.def ctanh.def
-
-SUFFIXES = .def
-
-CHEW = ../../doc/makedoc -f $(srcdir)/../../doc/doc.str
-
-.c.def:
- $(CHEW) < $< > $*.def 2> $*.ref
- touch stmp-def
-
-TARGETDOC = ../tmp.texi
-
-doc: $(chobj)
- cat $(srcdir)/complex.tex >> $(TARGETDOC)
-
-CLEANFILES = $(chobj) *.ref
+CHAPTERS = complex.tex
# A partial dependency list.
diff --git a/newlib/libm/complex/Makefile.in b/newlib/libm/complex/Makefile.in
index 8a0d4b468..0954736fd 100644
--- a/newlib/libm/complex/Makefile.in
+++ b/newlib/libm/complex/Makefile.in
@@ -1,9 +1,9 @@
-# Makefile.in generated by automake 1.11.1 from Makefile.am.
+# Makefile.in generated by automake 1.11.6 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
-# Inc.
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 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.
@@ -18,6 +18,23 @@
VPATH = @srcdir@
+am__make_dryrun = \
+ { \
+ am__dry=no; \
+ case $$MAKEFLAGS in \
+ *\\[\ \ ]*) \
+ echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \
+ | grep '^AM OK$$' >/dev/null || am__dry=yes;; \
+ *) \
+ for am__flg in $$MAKEFLAGS; do \
+ case $$am__flg in \
+ *=*|--*) ;; \
+ *n*) am__dry=yes; break;; \
+ esac; \
+ done;; \
+ esac; \
+ test $$am__dry = yes; \
+ }
pkgdatadir = $(datadir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
@@ -62,39 +79,42 @@ am__objects_1 = lib_a-cabs.$(OBJEXT) lib_a-cacos.$(OBJEXT) \
lib_a-ccos.$(OBJEXT) lib_a-ccosh.$(OBJEXT) \
lib_a-cephes_subr.$(OBJEXT) lib_a-cexp.$(OBJEXT) \
lib_a-cimag.$(OBJEXT) lib_a-clog.$(OBJEXT) \
- lib_a-conj.$(OBJEXT) lib_a-cpow.$(OBJEXT) \
- lib_a-cproj.$(OBJEXT) lib_a-creal.$(OBJEXT) \
- lib_a-csin.$(OBJEXT) lib_a-csinh.$(OBJEXT) \
- lib_a-csqrt.$(OBJEXT) lib_a-ctan.$(OBJEXT) \
- lib_a-ctanh.$(OBJEXT)
+ lib_a-clog10.$(OBJEXT) lib_a-conj.$(OBJEXT) \
+ lib_a-cpow.$(OBJEXT) lib_a-cproj.$(OBJEXT) \
+ lib_a-creal.$(OBJEXT) lib_a-csin.$(OBJEXT) \
+ lib_a-csinh.$(OBJEXT) lib_a-csqrt.$(OBJEXT) \
+ lib_a-ctan.$(OBJEXT) lib_a-ctanh.$(OBJEXT)
am__objects_2 = lib_a-cabsf.$(OBJEXT) lib_a-casinf.$(OBJEXT) \
lib_a-ccosf.$(OBJEXT) lib_a-cimagf.$(OBJEXT) \
lib_a-cprojf.$(OBJEXT) lib_a-csqrtf.$(OBJEXT) \
lib_a-cacosf.$(OBJEXT) lib_a-casinhf.$(OBJEXT) \
lib_a-ccoshf.$(OBJEXT) lib_a-clogf.$(OBJEXT) \
- lib_a-crealf.$(OBJEXT) lib_a-ctanf.$(OBJEXT) \
- lib_a-cacoshf.$(OBJEXT) lib_a-catanf.$(OBJEXT) \
- lib_a-cephes_subrf.$(OBJEXT) lib_a-conjf.$(OBJEXT) \
- lib_a-csinf.$(OBJEXT) lib_a-ctanhf.$(OBJEXT) \
- lib_a-cargf.$(OBJEXT) lib_a-catanhf.$(OBJEXT) \
- lib_a-cexpf.$(OBJEXT) lib_a-cpowf.$(OBJEXT) \
- lib_a-csinhf.$(OBJEXT)
+ lib_a-clog10f.$(OBJEXT) lib_a-crealf.$(OBJEXT) \
+ lib_a-ctanf.$(OBJEXT) lib_a-cacoshf.$(OBJEXT) \
+ lib_a-catanf.$(OBJEXT) lib_a-cephes_subrf.$(OBJEXT) \
+ lib_a-conjf.$(OBJEXT) lib_a-csinf.$(OBJEXT) \
+ lib_a-ctanhf.$(OBJEXT) lib_a-cargf.$(OBJEXT) \
+ lib_a-catanhf.$(OBJEXT) lib_a-cexpf.$(OBJEXT) \
+ lib_a-cpowf.$(OBJEXT) lib_a-csinhf.$(OBJEXT)
+am__objects_3 = lib_a-cabsl.$(OBJEXT) lib_a-creall.$(OBJEXT) \
+ lib_a-cimagl.$(OBJEXT)
@USE_LIBTOOL_FALSE@am_lib_a_OBJECTS = $(am__objects_1) \
-@USE_LIBTOOL_FALSE@ $(am__objects_2)
+@USE_LIBTOOL_FALSE@ $(am__objects_2) $(am__objects_3)
lib_a_OBJECTS = $(am_lib_a_OBJECTS)
LTLIBRARIES = $(noinst_LTLIBRARIES)
libcomplex_la_LIBADD =
-am__objects_3 = cabs.lo cacos.lo cacosh.lo carg.lo casin.lo casinh.lo \
+am__objects_4 = cabs.lo cacos.lo cacosh.lo carg.lo casin.lo casinh.lo \
catan.lo catanh.lo ccos.lo ccosh.lo cephes_subr.lo cexp.lo \
- cimag.lo clog.lo conj.lo cpow.lo cproj.lo creal.lo csin.lo \
- csinh.lo csqrt.lo ctan.lo ctanh.lo
-am__objects_4 = cabsf.lo casinf.lo ccosf.lo cimagf.lo cprojf.lo \
- csqrtf.lo cacosf.lo casinhf.lo ccoshf.lo clogf.lo crealf.lo \
- ctanf.lo cacoshf.lo catanf.lo cephes_subrf.lo conjf.lo \
- csinf.lo ctanhf.lo cargf.lo catanhf.lo cexpf.lo cpowf.lo \
- csinhf.lo
-@USE_LIBTOOL_TRUE@am_libcomplex_la_OBJECTS = $(am__objects_3) \
-@USE_LIBTOOL_TRUE@ $(am__objects_4)
+ cimag.lo clog.lo clog10.lo conj.lo cpow.lo cproj.lo creal.lo \
+ csin.lo csinh.lo csqrt.lo ctan.lo ctanh.lo
+am__objects_5 = cabsf.lo casinf.lo ccosf.lo cimagf.lo cprojf.lo \
+ csqrtf.lo cacosf.lo casinhf.lo ccoshf.lo clogf.lo clog10f.lo \
+ crealf.lo ctanf.lo cacoshf.lo catanf.lo cephes_subrf.lo \
+ conjf.lo csinf.lo ctanhf.lo cargf.lo catanhf.lo cexpf.lo \
+ cpowf.lo csinhf.lo
+am__objects_6 = cabsl.lo creall.lo cimagl.lo
+@USE_LIBTOOL_TRUE@am_libcomplex_la_OBJECTS = $(am__objects_4) \
+@USE_LIBTOOL_TRUE@ $(am__objects_5) $(am__objects_6)
libcomplex_la_OBJECTS = $(am_libcomplex_la_OBJECTS)
libcomplex_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
$(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
@@ -113,6 +133,11 @@ LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
--mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
$(LDFLAGS) -o $@
SOURCES = $(lib_a_SOURCES) $(libcomplex_la_SOURCES)
+am__can_run_installinfo = \
+ case $$AM_UPDATE_INFO_DIR in \
+ n|no|NO) false;; \
+ *) (install-info --version) >/dev/null 2>&1;; \
+ esac
DATA = $(noinst_DATA)
ETAGS = etags
CTAGS = ctags
@@ -164,6 +189,7 @@ MKDIR_P = @MKDIR_P@
NEWLIB_CFLAGS = @NEWLIB_CFLAGS@
NM = @NM@
NMEDIT = @NMEDIT@
+NO_INCLUDE_LIST = @NO_INCLUDE_LIST@
OBJDUMP = @OBJDUMP@
OBJEXT = @OBJEXT@
OTOOL = @OTOOL@
@@ -173,6 +199,7 @@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
PACKAGE_NAME = @PACKAGE_NAME@
PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
RANLIB = @RANLIB@
@@ -245,34 +272,39 @@ AUTOMAKE_OPTIONS = cygnus
INCLUDES = -I$(srcdir)/../common -I$(srcdir)/ $(NEWLIB_CFLAGS) $(CROSS_CFLAGS) $(TARGET_CFLAGS)
src = cabs.c cacos.c cacosh.c carg.c casin.c casinh.c \
catan.c catanh.c ccos.c ccosh.c cephes_subr.c \
- cexp.c cimag.c clog.c conj.c \
+ cexp.c cimag.c clog.c clog10.c conj.c \
cpow.c cproj.c creal.c \
csin.c csinh.c csqrt.c ctan.c ctanh.c
+lsrc = cabsl.c creall.c cimagl.c
fsrc = cabsf.c casinf.c ccosf.c cimagf.c cprojf.c \
- csqrtf.c cacosf.c casinhf.c ccoshf.c clogf.c \
+ csqrtf.c cacosf.c casinhf.c ccoshf.c clogf.c clog10f.c \
crealf.c ctanf.c cacoshf.c catanf.c \
cephes_subrf.c conjf.c csinf.c ctanhf.c \
cargf.c catanhf.c cexpf.c cpowf.c csinhf.c
libcomplex_la_LDFLAGS = -Xcompiler -nostdlib
@USE_LIBTOOL_TRUE@noinst_LTLIBRARIES = libcomplex.la
-@USE_LIBTOOL_TRUE@libcomplex_la_SOURCES = $(src) $(fsrc)
+@USE_LIBTOOL_TRUE@libcomplex_la_SOURCES = $(src) $(fsrc) $(lsrc)
@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 = $(src) $(fsrc)
+@USE_LIBTOOL_FALSE@lib_a_SOURCES = $(src) $(fsrc) $(lsrc)
@USE_LIBTOOL_FALSE@lib_a_CFLAGS = $(AM_CFLAGS)
-chobj = cabs.def cacos.def cacosh.def carg.def \
+
+#
+# documentation rules
+#
+SUFFIXES = .def
+CHEW = ${top_builddir}/../doc/makedoc -f $(top_srcdir)/../doc/doc.str
+CLEANFILES = $(CHEWOUT_FILES) *.ref
+CHEWOUT_FILES = cabs.def cacos.def cacosh.def carg.def \
casin.def casinh.def catan.def catanh.def \
ccos.def ccosh.def cexp.def cimag.def clog.def \
- conj.def cpow.def cproj.def creal.def \
+ clog10.def conj.def cpow.def cproj.def creal.def \
csin.def csinh.def csqrt.def ctan.def ctanh.def
-SUFFIXES = .def
-CHEW = ../../doc/makedoc -f $(srcdir)/../../doc/doc.str
-TARGETDOC = ../tmp.texi
-CLEANFILES = $(chobj) *.ref
+CHAPTERS = complex.tex
all: all-am
.SUFFIXES:
@@ -298,6 +330,7 @@ Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
esac;
+$(srcdir)/../../Makefile.shared:
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
@@ -310,7 +343,7 @@ $(am__aclocal_m4_deps):
clean-noinstLIBRARIES:
-test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES)
-lib.a: $(lib_a_OBJECTS) $(lib_a_DEPENDENCIES)
+lib.a: $(lib_a_OBJECTS) $(lib_a_DEPENDENCIES) $(EXTRA_lib_a_DEPENDENCIES)
-rm -f lib.a
$(lib_a_AR) lib.a $(lib_a_OBJECTS) $(lib_a_LIBADD)
$(RANLIB) lib.a
@@ -323,7 +356,7 @@ clean-noinstLTLIBRARIES:
echo "rm -f \"$${dir}/so_locations\""; \
rm -f "$${dir}/so_locations"; \
done
-libcomplex.la: $(libcomplex_la_OBJECTS) $(libcomplex_la_DEPENDENCIES)
+libcomplex.la: $(libcomplex_la_OBJECTS) $(libcomplex_la_DEPENDENCIES) $(EXTRA_libcomplex_la_DEPENDENCIES)
$(libcomplex_la_LINK) $(am_libcomplex_la_rpath) $(libcomplex_la_OBJECTS) $(libcomplex_la_LIBADD) $(LIBS)
mostlyclean-compile:
@@ -425,6 +458,12 @@ lib_a-clog.o: clog.c
lib_a-clog.obj: clog.c
$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-clog.obj `if test -f 'clog.c'; then $(CYGPATH_W) 'clog.c'; else $(CYGPATH_W) '$(srcdir)/clog.c'; fi`
+lib_a-clog10.o: clog10.c
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-clog10.o `test -f 'clog10.c' || echo '$(srcdir)/'`clog10.c
+
+lib_a-clog10.obj: clog10.c
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-clog10.obj `if test -f 'clog10.c'; then $(CYGPATH_W) 'clog10.c'; else $(CYGPATH_W) '$(srcdir)/clog10.c'; fi`
+
lib_a-conj.o: conj.c
$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-conj.o `test -f 'conj.c' || echo '$(srcdir)/'`conj.c
@@ -539,6 +578,12 @@ lib_a-clogf.o: clogf.c
lib_a-clogf.obj: clogf.c
$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-clogf.obj `if test -f 'clogf.c'; then $(CYGPATH_W) 'clogf.c'; else $(CYGPATH_W) '$(srcdir)/clogf.c'; fi`
+lib_a-clog10f.o: clog10f.c
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-clog10f.o `test -f 'clog10f.c' || echo '$(srcdir)/'`clog10f.c
+
+lib_a-clog10f.obj: clog10f.c
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-clog10f.obj `if test -f 'clog10f.c'; then $(CYGPATH_W) 'clog10f.c'; else $(CYGPATH_W) '$(srcdir)/clog10f.c'; fi`
+
lib_a-crealf.o: crealf.c
$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-crealf.o `test -f 'crealf.c' || echo '$(srcdir)/'`crealf.c
@@ -617,6 +662,24 @@ lib_a-csinhf.o: csinhf.c
lib_a-csinhf.obj: csinhf.c
$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-csinhf.obj `if test -f 'csinhf.c'; then $(CYGPATH_W) 'csinhf.c'; else $(CYGPATH_W) '$(srcdir)/csinhf.c'; fi`
+lib_a-cabsl.o: cabsl.c
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-cabsl.o `test -f 'cabsl.c' || echo '$(srcdir)/'`cabsl.c
+
+lib_a-cabsl.obj: cabsl.c
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-cabsl.obj `if test -f 'cabsl.c'; then $(CYGPATH_W) 'cabsl.c'; else $(CYGPATH_W) '$(srcdir)/cabsl.c'; fi`
+
+lib_a-creall.o: creall.c
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-creall.o `test -f 'creall.c' || echo '$(srcdir)/'`creall.c
+
+lib_a-creall.obj: creall.c
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-creall.obj `if test -f 'creall.c'; then $(CYGPATH_W) 'creall.c'; else $(CYGPATH_W) '$(srcdir)/creall.c'; fi`
+
+lib_a-cimagl.o: cimagl.c
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-cimagl.o `test -f 'cimagl.c' || echo '$(srcdir)/'`cimagl.c
+
+lib_a-cimagl.obj: cimagl.c
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-cimagl.obj `if test -f 'cimagl.c'; then $(CYGPATH_W) 'cimagl.c'; else $(CYGPATH_W) '$(srcdir)/cimagl.c'; fi`
+
mostlyclean-libtool:
-rm -f *.lo
@@ -688,10 +751,15 @@ install-am: all-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
+ if test -z '$(STRIP)'; then \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ install; \
+ else \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
+ fi
mostlyclean-generic:
clean-generic:
@@ -800,8 +868,13 @@ objectlist.awk.in: $(noinst_LTLIBRARIES)
$(CHEW) < $< > $*.def 2> $*.ref
touch stmp-def
-doc: $(chobj)
- cat $(srcdir)/complex.tex >> $(TARGETDOC)
+TARGETDOC ?= ../tmp.texi
+
+doc: $(CHEWOUT_FILES)
+ for chapter in $(CHAPTERS) ; \
+ do \
+ cat $(srcdir)/$$chapter >> $(TARGETDOC) ; \
+ done
# A partial dependency list.
diff --git a/newlib/libm/complex/cabs.c b/newlib/libm/complex/cabs.c
index 2750fab9a..69091d71a 100644
--- a/newlib/libm/complex/cabs.c
+++ b/newlib/libm/complex/cabs.c
@@ -10,17 +10,20 @@
/*
FUNCTION
- <<cabs>>, <<cabsf>>---complex absolute-value
+ <<cabs>>, <<cabsf>>, <<cabsl>>---complex absolute-value
INDEX
cabs
INDEX
cabsf
+INDEX
+ cabsl
ANSI_SYNOPSIS
#include <complex.h>
double cabs(double complex <[z]>);
float cabsf(float complex <[z]>);
+ long double cabsl(long double complex <[z]>);
DESCRIPTION
@@ -28,16 +31,19 @@ DESCRIPTION
(also called norm, modulus, or magnitude) of <[z]>.
<<cabsf>> is identical to <<cabs>>, except that it performs
- its calculations on <<floats complex>>.
+ its calculations on <<float complex>>.
+
+ <<cabsl>> is identical to <<cabs>>, except that it performs
+ its calculations on <<long double complex>>.
RETURNS
- The cabs functions return the complex absolute value.
+ The cabs* functions return the complex absolute value.
PORTABILITY
- <<cabs>> and <<cabsf>> are ISO C99
+ <<cabs>>, <<cabsf>> and <<cabsl>> are ISO C99
QUICKREF
- <<cabs>> and <<cabsf>> are ISO C99
+ <<cabs>>, <<cabsf>> and <<cabsl>> are ISO C99
*/
diff --git a/newlib/libm/complex/cabsl.c b/newlib/libm/complex/cabsl.c
new file mode 100644
index 000000000..091f2cd53
--- /dev/null
+++ b/newlib/libm/complex/cabsl.c
@@ -0,0 +1,18 @@
+/* Copyright (C) 2015 by Red Hat, Incorporated. All rights reserved.
+ *
+ * Permission to use, copy, modify, and distribute this software
+ * is freely granted, provided that this notice is preserved.
+ */
+
+#include <complex.h>
+#include <math.h>
+
+long double
+cabsl (long double complex z)
+{
+#ifdef _LDBL_EQ_DBL
+ return cabs (z);
+#else
+ return hypotl (creall (z), cimagl (z));
+#endif
+}
diff --git a/newlib/libm/complex/cimag.c b/newlib/libm/complex/cimag.c
index 1d2d77414..959dbc9a4 100644
--- a/newlib/libm/complex/cimag.c
+++ b/newlib/libm/complex/cimag.c
@@ -10,33 +10,39 @@
/*
FUNCTION
- <<cimag>>, <<cimagf>>---imaginary part
+ <<cimag>>, <<cimagf>>, <<cimagl>>---imaginary part
INDEX
cimag
INDEX
cimagf
+INDEX
+ cimagl
ANSI_SYNOPSIS
#include <complex.h>
double cimag(double complex <[z]>);
float cimagf(float complex <[z]>);
+ long double cimagl(long double complex <[z]>);
DESCRIPTION
These functions compute the imaginary part of <[z]>.
<<cimagf>> is identical to <<cimag>>, except that it performs
- its calculations on <<floats complex>>.
+ its calculations on <<float complex>>.
+
+ <<cimagl>> is identical to <<cimag>>, except that it performs
+ its calculations on <<long double complex>>.
RETURNS
- The cimag functions return the imaginary part value (as a real).
+ The cimag* functions return the imaginary part value (as a real).
PORTABILITY
- <<cimag>> and <<cimagf>> are ISO C99
+ <<cimag>>, <<cimagf>> and <<cimagl>> are ISO C99
QUICKREF
- <<cimag>> and <<cimagf>> are ISO C99
+ <<cimag>>, <<cimagf>> and <<cimagl>> are ISO C99
*/
diff --git a/newlib/libm/complex/cimagl.c b/newlib/libm/complex/cimagl.c
new file mode 100644
index 000000000..a5afdc456
--- /dev/null
+++ b/newlib/libm/complex/cimagl.c
@@ -0,0 +1,16 @@
+/* Copyright (C) 2015 by Red Hat, Incorporated. All rights reserved.
+ *
+ * Permission to use, copy, modify, and distribute this software
+ * is freely granted, provided that this notice is preserved.
+ */
+
+#include <complex.h>
+#include "../common/fdlibm.h"
+
+long double
+cimagl (long double complex z)
+{
+ long_double_complex w = { .z = z };
+
+ return IMAG_PART (w);
+}
diff --git a/newlib/libm/complex/clog10.c b/newlib/libm/complex/clog10.c
new file mode 100644
index 000000000..c857a65d9
--- /dev/null
+++ b/newlib/libm/complex/clog10.c
@@ -0,0 +1,46 @@
+/*
+FUNCTION
+ <<clog10>>, <<clog10f>>---complex base-10 logarithm
+
+INDEX
+ clog10
+INDEX
+ clog10f
+
+ANSI_SYNOPSIS
+ #define _GNU_SOURCE
+ #include <complex.h>
+ double complex clog10(double complex <[z]>);
+ float complex clog10f(float complex <[z]>);
+
+
+DESCRIPTION
+ These functions compute the complex base-10 logarithm of <[z]>.
+ <<clog10>> is equivalent to <<clog>>(<[z]>)/<<log>>(10).
+
+ <<clog10f>> is identical to <<clog10>>, except that it performs
+ its calculations on <<floats complex>>.
+
+RETURNS
+ The clog10 functions return the complex base-10 logarithm value.
+
+PORTABILITY
+ <<clog10>> and <<clog10f>> are GNU extensions.
+
+*/
+
+#include <complex.h>
+#include <math.h>
+
+double complex
+clog10(double complex z)
+{
+ double complex w;
+ double p, rr;
+
+ rr = cabs(z);
+ p = log10(rr);
+ rr = atan2(cimag(z), creal(z)) * M_IVLN10;
+ w = p + rr * I;
+ return w;
+}
diff --git a/newlib/libm/complex/clog10f.c b/newlib/libm/complex/clog10f.c
new file mode 100644
index 000000000..124273227
--- /dev/null
+++ b/newlib/libm/complex/clog10f.c
@@ -0,0 +1,15 @@
+#include <complex.h>
+#include <math.h>
+
+float complex
+clog10f(float complex z)
+{
+ float complex w;
+ float p, rr;
+
+ rr = cabsf(z);
+ p = log10f(rr);
+ rr = atan2f(cimagf(z), crealf(z)) * (float) M_IVLN10;
+ w = p + rr * I;
+ return w;
+}
diff --git a/newlib/libm/complex/complex.tex b/newlib/libm/complex/complex.tex
index 4ac14c3a9..e91937aa2 100644
--- a/newlib/libm/complex/complex.tex
+++ b/newlib/libm/complex/complex.tex
@@ -19,6 +19,7 @@ Functions and documentations are taken from NetBSD.
* cexp:: Complex exponent
* cimag:: Imaginary part
* clog:: Complex natural (base e) logarithm
+* clog10:: Complex base 10 logarithm
* conj:: Complex conjugate
* cpow:: Complex power function
* cproj:: Compute a projection on the Riemann sphere
@@ -30,26 +31,49 @@ Functions and documentations are taken from NetBSD.
* ctanh:: Complex hyperbolic tangent
@end menu
-
-@page @include complex/cabs.def
-@page @include complex/cacos.def
-@page @include complex/cacosh.def
-@page @include complex/carg.def
-@page @include complex/casin.def
-@page @include complex/casinh.def
-@page @include complex/catan.def
-@page @include complex/catanh.def
-@page @include complex/ccos.def
-@page @include complex/ccosh.def
-@page @include complex/cexp.def
-@page @include complex/cimag.def
-@page @include complex/clog.def
-@page @include complex/conj.def
-@page @include complex/cpow.def
-@page @include complex/cproj.def
-@page @include complex/creal.def
-@page @include complex/csin.def
-@page @include complex/csinh.def
-@page @include complex/csqrt.def
-@page @include complex/ctan.def
-@page @include complex/ctanh.def
+@page
+@include complex/cabs.def
+@page
+@include complex/cacos.def
+@page
+@include complex/cacosh.def
+@page
+@include complex/carg.def
+@page
+@include complex/casin.def
+@page
+@include complex/casinh.def
+@page
+@include complex/catan.def
+@page
+@include complex/catanh.def
+@page
+@include complex/ccos.def
+@page
+@include complex/ccosh.def
+@page
+@include complex/cexp.def
+@page
+@include complex/cimag.def
+@page
+@include complex/clog.def
+@page
+@include complex/clog10.def
+@page
+@include complex/conj.def
+@page
+@include complex/cpow.def
+@page
+@include complex/cproj.def
+@page
+@include complex/creal.def
+@page
+@include complex/csin.def
+@page
+@include complex/csinh.def
+@page
+@include complex/csqrt.def
+@page
+@include complex/ctan.def
+@page
+@include complex/ctanh.def
diff --git a/newlib/libm/complex/creal.c b/newlib/libm/complex/creal.c
index c621561ae..1652a5f8e 100644
--- a/newlib/libm/complex/creal.c
+++ b/newlib/libm/complex/creal.c
@@ -10,33 +10,39 @@
/*
FUNCTION
- <<creal>>, <<crealf>>---real part
+ <<creal>>, <<crealf>>, <<creall>>---real part
INDEX
creal
INDEX
crealf
+INDEX
+ creall
ANSI_SYNOPSIS
#include <complex.h>
double creal(double complex <[z]>);
float crealf(float complex <[z]>);
+ double long creall(long double complex <[z]>);
-
+
DESCRIPTION
These functions compute the real part of <[z]>.
<<crealf>> is identical to <<creal>>, except that it performs
- its calculations on <<floats complex>>.
+ its calculations on <<float complex>>.
+
+ <<creall>> is identical to <<creal>>, except that it performs
+ its calculations on <<long double complex>>.
RETURNS
- The creal functions return the real part value.
+ The creal* functions return the real part value.
PORTABILITY
- <<creal>> and <<crealf>> are ISO C99
+ <<creal>>, <<crealf>> and <<creall>> are ISO C99
QUICKREF
- <<creal>> and <<crealf>> are ISO C99
+ <<creal>>, <<crealf>> and <<creall>> are ISO C99
*/
diff --git a/newlib/libm/complex/creall.c b/newlib/libm/complex/creall.c
new file mode 100644
index 000000000..7aa88c272
--- /dev/null
+++ b/newlib/libm/complex/creall.c
@@ -0,0 +1,16 @@
+/* Copyright (C) 2015 by Red Hat, Incorporated. All rights reserved.
+ *
+ * Permission to use, copy, modify, and distribute this software
+ * is freely granted, provided that this notice is preserved.
+ */
+
+#include <complex.h>
+#include "../common/fdlibm.h"
+
+long double
+creall (long double complex z)
+{
+ long_double_complex w = { .z = z };
+
+ return (REAL_PART(w));
+}
diff --git a/newlib/libm/configure b/newlib/libm/configure
index 2d8e7938b..6f5fa5863 100755
--- a/newlib/libm/configure
+++ b/newlib/libm/configure
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.68 for newlib 2.0.0.
+# Generated by GNU Autoconf 2.68 for newlib 2.4.0.
#
#
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
@@ -567,8 +567,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='newlib'
PACKAGE_TARNAME='newlib'
-PACKAGE_VERSION='2.0.0'
-PACKAGE_STRING='newlib 2.0.0'
+PACKAGE_VERSION='2.4.0'
+PACKAGE_STRING='newlib 2.4.0'
PACKAGE_BUGREPORT=''
PACKAGE_URL=''
@@ -1330,7 +1330,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures newlib 2.0.0 to adapt to many kinds of systems.
+\`configure' configures newlib 2.4.0 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1400,7 +1400,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of newlib 2.0.0:";;
+ short | recursive ) echo "Configuration of newlib 2.4.0:";;
esac
cat <<\_ACEOF
@@ -1512,7 +1512,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-newlib configure 2.0.0
+newlib configure 2.4.0
generated by GNU Autoconf 2.68
Copyright (C) 2010 Free Software Foundation, Inc.
@@ -1790,7 +1790,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by newlib $as_me 2.0.0, which was
+It was created by newlib $as_me 2.4.0, which was
generated by GNU Autoconf 2.68. Invocation command line was
$ $0 $@
@@ -2917,7 +2917,7 @@ fi
# Define the identity of the package.
PACKAGE='newlib'
- VERSION='2.0.0'
+ VERSION='2.4.0'
# Some tools Automake needs.
@@ -6978,7 +6978,7 @@ ia64-*-hpux*)
rm -rf conftest*
;;
-x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \
+x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \
s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
# Find out which ABI we are using.
echo 'int i;' > conftest.$ac_ext
@@ -7003,7 +7003,10 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
;;
esac
;;
- ppc64-*linux*|powerpc64-*linux*)
+ powerpc64le-*linux*)
+ LD="${LD-ld} -m elf32lppclinux"
+ ;;
+ powerpc64-*linux*)
LD="${LD-ld} -m elf32ppclinux"
;;
s390x-*linux*)
@@ -7022,7 +7025,10 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
x86_64-*linux*)
LD="${LD-ld} -m elf_x86_64"
;;
- ppc*-*linux*|powerpc*-*linux*)
+ powerpcle-*linux*)
+ LD="${LD-ld} -m elf64lppc"
+ ;;
+ powerpc-*linux*)
LD="${LD-ld} -m elf64ppc"
;;
s390*-*linux*|s390*-*tpf*)
@@ -7704,7 +7710,7 @@ $as_echo "$lt_cv_ld_force_load" >&6; }
case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
10.0,*86*-darwin8*|10.0,*-darwin[91]*)
_lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
- 10.[012]*)
+ 10.[012][,.]*)
_lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
10.*)
_lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
@@ -9273,7 +9279,7 @@ _LT_EOF
if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
&& test "$tmp_diet" = no
then
- tmp_addflag=
+ tmp_addflag=' $pic_flag'
tmp_sharedflag='-shared'
case $cc_basename,$host_cpu in
pgcc*) # Portland Group C compiler
@@ -9455,7 +9461,7 @@ _LT_EOF
if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
else
- export_symbols_cmds='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
+ export_symbols_cmds='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "L")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
fi
aix_use_runtimelinking=no
@@ -11483,7 +11489,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 11486 "configure"
+#line 11492 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -11589,7 +11595,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 11592 "configure"
+#line 11598 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -12460,7 +12466,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by newlib $as_me 2.0.0, which was
+This file was extended by newlib $as_me 2.4.0, which was
generated by GNU Autoconf 2.68. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -12517,7 +12523,7 @@ _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
-newlib config.status 2.0.0
+newlib config.status 2.4.0
configured by $0, generated by GNU Autoconf 2.68,
with options \\"\$ac_cs_config\\"
diff --git a/newlib/libm/libm.texinfo b/newlib/libm/libm.texinfo
index 147dc7ec6..5c28975fa 100644
--- a/newlib/libm/libm.texinfo
+++ b/newlib/libm/libm.texinfo
@@ -4,16 +4,17 @@
@ifinfo
@format
-START-INFO-DIR-ENTRY
-* libm:: An ANSI-C conforming mathematical library.
-END-INFO-DIR-ENTRY
+@dircategory Newlib
+@direntry
+* libm: (libm). An ANSI-C conforming mathematical library.
+@end direntry
@end format
@end ifinfo
@ifinfo
This file documents an ANSI-C conforming mathematical subroutine library.
-Copyright (C) 1992, 1993, 1995, 1996-2012 Red Hat, Inc.
+Copyright (C) 1992, 1993, 1995, 1996-2014 Red Hat, Inc.
@file{libm} includes software developed at SunPro, a Sun Microsystems,
Inc. business. Permission to use, copy, modify, and distribute this
@@ -46,8 +47,8 @@ into another language, under the above conditions for modified versions.
@titlepage
@title The Red Hat newlib C Math Library
@sp 1
-@subtitle @code{libm} 2.0.0
-@subtitle December 2012
+@subtitle @code{libm} 2.2.0
+@subtitle December 2014
@author {Steve Chamberlain}
@author {Roland Pesch}
@author {Red Hat Support}
@@ -96,7 +97,7 @@ into another language, under the above conditions for modified versions.
* Complex:: The mathematical complex functions (`complex.h').
* Reentrancy:: The functions in libm are not reentrant by default.
* Long Double Functions:: The long double function support of libm.
-* Index::
+* Document Index::
@end menu
@include targetdep.tex
@@ -130,8 +131,8 @@ calls; in that situation, the math functions behave reentrantly.
Currently, the full set of long double math functions is only provided
on platforms where long double equals double.
For such platforms, the long double math functions are implemented as calls to the double versions.
-@node Index
-@unnumbered Index
+@node Document Index
+@unnumbered Document Index
@printindex cp
@tex
diff --git a/newlib/libm/machine/aarch64/Makefile.am b/newlib/libm/machine/aarch64/Makefile.am
index 22706a95f..752f65dd1 100644
--- a/newlib/libm/machine/aarch64/Makefile.am
+++ b/newlib/libm/machine/aarch64/Makefile.am
@@ -6,7 +6,10 @@ INCLUDES = -I $(newlib_basedir)/../newlib/libm/common $(NEWLIB_CFLAGS) \
$(CROSS_CFLAGS) $(TARGET_CFLAGS)
LIB_SOURCES = \
+ e_sqrt.c \
+ ef_sqrt.c \
s_ceil.c \
+ s_fabs.c \
s_floor.c \
s_fma.c \
s_fmax.c \
@@ -20,6 +23,7 @@ LIB_SOURCES = \
s_round.c \
s_trunc.c \
sf_ceil.c \
+ sf_fabs.c \
sf_floor.c \
sf_fma.c \
sf_fmax.c \
diff --git a/newlib/libm/machine/aarch64/Makefile.in b/newlib/libm/machine/aarch64/Makefile.in
index 0e74c750b..883e2e5a0 100644
--- a/newlib/libm/machine/aarch64/Makefile.in
+++ b/newlib/libm/machine/aarch64/Makefile.in
@@ -70,13 +70,15 @@ LIBRARIES = $(noinst_LIBRARIES)
ARFLAGS = cru
lib_a_AR = $(AR) $(ARFLAGS)
lib_a_LIBADD =
-am__objects_1 = lib_a-s_ceil.$(OBJEXT) lib_a-s_floor.$(OBJEXT) \
- lib_a-s_fma.$(OBJEXT) lib_a-s_fmax.$(OBJEXT) \
- lib_a-s_fmin.$(OBJEXT) lib_a-s_llrint.$(OBJEXT) \
- lib_a-s_llround.$(OBJEXT) lib_a-s_lrint.$(OBJEXT) \
- lib_a-s_lround.$(OBJEXT) lib_a-s_nearbyint.$(OBJEXT) \
- lib_a-s_rint.$(OBJEXT) lib_a-s_round.$(OBJEXT) \
- lib_a-s_trunc.$(OBJEXT) lib_a-sf_ceil.$(OBJEXT) \
+am__objects_1 = lib_a-e_sqrt.$(OBJEXT) lib_a-ef_sqrt.$(OBJEXT) \
+ lib_a-s_ceil.$(OBJEXT) lib_a-s_fabs.$(OBJEXT) \
+ lib_a-s_floor.$(OBJEXT) lib_a-s_fma.$(OBJEXT) \
+ lib_a-s_fmax.$(OBJEXT) lib_a-s_fmin.$(OBJEXT) \
+ lib_a-s_llrint.$(OBJEXT) lib_a-s_llround.$(OBJEXT) \
+ lib_a-s_lrint.$(OBJEXT) lib_a-s_lround.$(OBJEXT) \
+ lib_a-s_nearbyint.$(OBJEXT) lib_a-s_rint.$(OBJEXT) \
+ lib_a-s_round.$(OBJEXT) lib_a-s_trunc.$(OBJEXT) \
+ lib_a-sf_ceil.$(OBJEXT) lib_a-sf_fabs.$(OBJEXT) \
lib_a-sf_floor.$(OBJEXT) lib_a-sf_fma.$(OBJEXT) \
lib_a-sf_fmax.$(OBJEXT) lib_a-sf_fmin.$(OBJEXT) \
lib_a-sf_llrint.$(OBJEXT) lib_a-sf_llround.$(OBJEXT) \
@@ -209,7 +211,10 @@ INCLUDES = -I $(newlib_basedir)/../newlib/libm/common $(NEWLIB_CFLAGS) \
$(CROSS_CFLAGS) $(TARGET_CFLAGS)
LIB_SOURCES = \
+ e_sqrt.c \
+ ef_sqrt.c \
s_ceil.c \
+ s_fabs.c \
s_floor.c \
s_fma.c \
s_fmax.c \
@@ -223,6 +228,7 @@ LIB_SOURCES = \
s_round.c \
s_trunc.c \
sf_ceil.c \
+ sf_fabs.c \
sf_floor.c \
sf_fma.c \
sf_fmax.c \
@@ -241,12 +247,19 @@ lib_a_SOURCES = $(LIB_SOURCES)
lib_a_CFLAGS = $(AM_CFLAGS)
lib_a_CCASFLAGS = $(AM_CCASFLAGS)
noinst_DATA =
+
+#
+# documentation rules
+#
+SUFFIXES = .def
+CHEW = ${top_builddir}/../doc/makedoc -f $(top_srcdir)/../doc/doc.str
+CLEANFILES = $(CHEWOUT_FILES) *.ref
ACLOCAL_AMFLAGS = -I ../../.. -I ../../../..
CONFIG_STATUS_DEPENDENCIES = $(newlib_basedir)/configure.host
all: all-am
.SUFFIXES:
-.SUFFIXES: .c .o .obj
+.SUFFIXES: .def .c .o .obj
am--refresh: Makefile
@:
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(srcdir)/../../../Makefile.shared $(am__configure_deps)
@@ -302,12 +315,30 @@ distclean-compile:
.c.obj:
$(COMPILE) -c `$(CYGPATH_W) '$<'`
+lib_a-e_sqrt.o: e_sqrt.c
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-e_sqrt.o `test -f 'e_sqrt.c' || echo '$(srcdir)/'`e_sqrt.c
+
+lib_a-e_sqrt.obj: e_sqrt.c
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-e_sqrt.obj `if test -f 'e_sqrt.c'; then $(CYGPATH_W) 'e_sqrt.c'; else $(CYGPATH_W) '$(srcdir)/e_sqrt.c'; fi`
+
+lib_a-ef_sqrt.o: ef_sqrt.c
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-ef_sqrt.o `test -f 'ef_sqrt.c' || echo '$(srcdir)/'`ef_sqrt.c
+
+lib_a-ef_sqrt.obj: ef_sqrt.c
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-ef_sqrt.obj `if test -f 'ef_sqrt.c'; then $(CYGPATH_W) 'ef_sqrt.c'; else $(CYGPATH_W) '$(srcdir)/ef_sqrt.c'; fi`
+
lib_a-s_ceil.o: s_ceil.c
$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-s_ceil.o `test -f 's_ceil.c' || echo '$(srcdir)/'`s_ceil.c
lib_a-s_ceil.obj: s_ceil.c
$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-s_ceil.obj `if test -f 's_ceil.c'; then $(CYGPATH_W) 's_ceil.c'; else $(CYGPATH_W) '$(srcdir)/s_ceil.c'; fi`
+lib_a-s_fabs.o: s_fabs.c
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-s_fabs.o `test -f 's_fabs.c' || echo '$(srcdir)/'`s_fabs.c
+
+lib_a-s_fabs.obj: s_fabs.c
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-s_fabs.obj `if test -f 's_fabs.c'; then $(CYGPATH_W) 's_fabs.c'; else $(CYGPATH_W) '$(srcdir)/s_fabs.c'; fi`
+
lib_a-s_floor.o: s_floor.c
$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-s_floor.o `test -f 's_floor.c' || echo '$(srcdir)/'`s_floor.c
@@ -386,6 +417,12 @@ lib_a-sf_ceil.o: sf_ceil.c
lib_a-sf_ceil.obj: sf_ceil.c
$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-sf_ceil.obj `if test -f 'sf_ceil.c'; then $(CYGPATH_W) 'sf_ceil.c'; else $(CYGPATH_W) '$(srcdir)/sf_ceil.c'; fi`
+lib_a-sf_fabs.o: sf_fabs.c
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-sf_fabs.o `test -f 'sf_fabs.c' || echo '$(srcdir)/'`sf_fabs.c
+
+lib_a-sf_fabs.obj: sf_fabs.c
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-sf_fabs.obj `if test -f 'sf_fabs.c'; then $(CYGPATH_W) 'sf_fabs.c'; else $(CYGPATH_W) '$(srcdir)/sf_fabs.c'; fi`
+
lib_a-sf_floor.o: sf_floor.c
$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-sf_floor.o `test -f 'sf_floor.c' || echo '$(srcdir)/'`sf_floor.c
@@ -535,6 +572,7 @@ install-strip:
mostlyclean-generic:
clean-generic:
+ -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
distclean-generic:
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
@@ -635,6 +673,18 @@ objectlist.awk.in: $(noinst_LTLIBRARIES)
echo $$i `pwd`/$$i >> objectlist.awk.in ; \
done
+.c.def:
+ $(CHEW) < $< > $*.def 2> $*.ref
+ touch stmp-def
+
+TARGETDOC ?= ../tmp.texi
+
+doc: $(CHEWOUT_FILES)
+ for chapter in $(CHAPTERS) ; \
+ do \
+ cat $(srcdir)/$$chapter >> $(TARGETDOC) ; \
+ done
+
# 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/libm/machine/aarch64/configure b/newlib/libm/machine/aarch64/configure
index 7f4d0d6df..bc041896f 100755
--- a/newlib/libm/machine/aarch64/configure
+++ b/newlib/libm/machine/aarch64/configure
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.68 for newlib 2.0.0.
+# Generated by GNU Autoconf 2.68 for newlib 2.4.0.
#
#
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
@@ -556,8 +556,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='newlib'
PACKAGE_TARNAME='newlib'
-PACKAGE_VERSION='2.0.0'
-PACKAGE_STRING='newlib 2.0.0'
+PACKAGE_VERSION='2.4.0'
+PACKAGE_STRING='newlib 2.4.0'
PACKAGE_BUGREPORT=''
PACKAGE_URL=''
@@ -1239,7 +1239,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures newlib 2.0.0 to adapt to many kinds of systems.
+\`configure' configures newlib 2.4.0 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1309,7 +1309,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of newlib 2.0.0:";;
+ short | recursive ) echo "Configuration of newlib 2.4.0:";;
esac
cat <<\_ACEOF
@@ -1400,7 +1400,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-newlib configure 2.0.0
+newlib configure 2.4.0
generated by GNU Autoconf 2.68
Copyright (C) 2010 Free Software Foundation, Inc.
@@ -1455,7 +1455,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by newlib $as_me 2.0.0, which was
+It was created by newlib $as_me 2.4.0, which was
generated by GNU Autoconf 2.68. Invocation command line was
$ $0 $@
@@ -2527,7 +2527,7 @@ fi
# Define the identity of the package.
PACKAGE='newlib'
- VERSION='2.0.0'
+ VERSION='2.4.0'
# Some tools Automake needs.
@@ -4007,7 +4007,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by newlib $as_me 2.0.0, which was
+This file was extended by newlib $as_me 2.4.0, which was
generated by GNU Autoconf 2.68. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -4064,7 +4064,7 @@ _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
-newlib config.status 2.0.0
+newlib config.status 2.4.0
configured by $0, generated by GNU Autoconf 2.68,
with options \\"\$ac_cs_config\\"
diff --git a/newlib/libm/machine/aarch64/e_sqrt.c b/newlib/libm/machine/aarch64/e_sqrt.c
new file mode 100644
index 000000000..e4b7554ac
--- /dev/null
+++ b/newlib/libm/machine/aarch64/e_sqrt.c
@@ -0,0 +1,35 @@
+/* e_sqrt.c -- define __ieee754_sqrt
+ Copyright (c) 2015 ARM Ltd. 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. The name of the company may not be used to endorse or promote
+ products derived from this software without specific prior written
+ permission.
+
+ THIS SOFTWARE IS PROVIDED BY ARM LTD ``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 ARM LTD 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 <math.h>
+
+double
+__ieee754_sqrt (double x)
+{
+ double result;
+ asm ("fsqrt\t%d0, %d1" : "=w" (result) : "w" (x));
+ return result;
+}
diff --git a/newlib/libm/machine/aarch64/ef_sqrt.c b/newlib/libm/machine/aarch64/ef_sqrt.c
new file mode 100644
index 000000000..19fec9525
--- /dev/null
+++ b/newlib/libm/machine/aarch64/ef_sqrt.c
@@ -0,0 +1,35 @@
+/* ef_sqrt.c -- define __ieee754_sqrtf
+ Copyright (c) 2015 ARM Ltd. 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. The name of the company may not be used to endorse or promote
+ products derived from this software without specific prior written
+ permission.
+
+ THIS SOFTWARE IS PROVIDED BY ARM LTD ``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 ARM LTD 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 <math.h>
+
+float
+__ieee754_sqrtf (float x)
+{
+ float result;
+ asm ("fsqrt\t%s0, %s1" : "=w" (result) : "w" (x));
+ return result;
+}
diff --git a/newlib/libm/machine/aarch64/s_fabs.c b/newlib/libm/machine/aarch64/s_fabs.c
new file mode 100644
index 000000000..60e95ce79
--- /dev/null
+++ b/newlib/libm/machine/aarch64/s_fabs.c
@@ -0,0 +1,35 @@
+/* s_fabs.c -- define fabs
+ Copyright (c) 2015 ARM Ltd. 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. The name of the company may not be used to endorse or promote
+ products derived from this software without specific prior written
+ permission.
+
+ THIS SOFTWARE IS PROVIDED BY ARM LTD ``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 ARM LTD 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 <math.h>
+
+double
+fabs (double x)
+{
+ double result;
+ asm ("fabs\t%d0, %d1" : "=w" (result) : "w" (x));
+ return result;
+}
diff --git a/newlib/libm/machine/aarch64/sf_fabs.c b/newlib/libm/machine/aarch64/sf_fabs.c
new file mode 100644
index 000000000..2b9254645
--- /dev/null
+++ b/newlib/libm/machine/aarch64/sf_fabs.c
@@ -0,0 +1,35 @@
+/* sf_fabs.c -- define fabsf
+ Copyright (c) 2015 ARM Ltd. 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. The name of the company may not be used to endorse or promote
+ products derived from this software without specific prior written
+ permission.
+
+ THIS SOFTWARE IS PROVIDED BY ARM LTD ``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 ARM LTD 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 <math.h>
+
+float
+fabsf (float x)
+{
+ float result;
+ asm ("fabs\t%s0, %s1" : "=w" (result) : "w" (x));
+ return result;
+}
diff --git a/newlib/libm/machine/arm/Makefile.in b/newlib/libm/machine/arm/Makefile.in
index 7bd6b8d97..25fcbdb0f 100644
--- a/newlib/libm/machine/arm/Makefile.in
+++ b/newlib/libm/machine/arm/Makefile.in
@@ -220,12 +220,19 @@ lib_a_SOURCES = $(LIB_SOURCES)
lib_a_CFLAGS = $(AM_CFLAGS)
lib_a_CCASFLAGS = $(AM_CCASFLAGS)
noinst_DATA =
+
+#
+# documentation rules
+#
+SUFFIXES = .def
+CHEW = ${top_builddir}/../doc/makedoc -f $(top_srcdir)/../doc/doc.str
+CLEANFILES = $(CHEWOUT_FILES) *.ref
ACLOCAL_AMFLAGS = -I ../../.. -I ../../../..
CONFIG_STATUS_DEPENDENCIES = $(newlib_basedir)/configure.host
all: all-am
.SUFFIXES:
-.SUFFIXES: .c .o .obj
+.SUFFIXES: .def .c .o .obj
am--refresh: Makefile
@:
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(srcdir)/../../../Makefile.shared $(am__configure_deps)
@@ -430,6 +437,7 @@ install-strip:
mostlyclean-generic:
clean-generic:
+ -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
distclean-generic:
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
@@ -530,6 +538,18 @@ objectlist.awk.in: $(noinst_LTLIBRARIES)
echo $$i `pwd`/$$i >> objectlist.awk.in ; \
done
+.c.def:
+ $(CHEW) < $< > $*.def 2> $*.ref
+ touch stmp-def
+
+TARGETDOC ?= ../tmp.texi
+
+doc: $(CHEWOUT_FILES)
+ for chapter in $(CHAPTERS) ; \
+ do \
+ cat $(srcdir)/$$chapter >> $(TARGETDOC) ; \
+ done
+
# 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/libm/machine/arm/configure b/newlib/libm/machine/arm/configure
index 7f4d0d6df..bc041896f 100755
--- a/newlib/libm/machine/arm/configure
+++ b/newlib/libm/machine/arm/configure
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.68 for newlib 2.0.0.
+# Generated by GNU Autoconf 2.68 for newlib 2.4.0.
#
#
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
@@ -556,8 +556,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='newlib'
PACKAGE_TARNAME='newlib'
-PACKAGE_VERSION='2.0.0'
-PACKAGE_STRING='newlib 2.0.0'
+PACKAGE_VERSION='2.4.0'
+PACKAGE_STRING='newlib 2.4.0'
PACKAGE_BUGREPORT=''
PACKAGE_URL=''
@@ -1239,7 +1239,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures newlib 2.0.0 to adapt to many kinds of systems.
+\`configure' configures newlib 2.4.0 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1309,7 +1309,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of newlib 2.0.0:";;
+ short | recursive ) echo "Configuration of newlib 2.4.0:";;
esac
cat <<\_ACEOF
@@ -1400,7 +1400,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-newlib configure 2.0.0
+newlib configure 2.4.0
generated by GNU Autoconf 2.68
Copyright (C) 2010 Free Software Foundation, Inc.
@@ -1455,7 +1455,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by newlib $as_me 2.0.0, which was
+It was created by newlib $as_me 2.4.0, which was
generated by GNU Autoconf 2.68. Invocation command line was
$ $0 $@
@@ -2527,7 +2527,7 @@ fi
# Define the identity of the package.
PACKAGE='newlib'
- VERSION='2.0.0'
+ VERSION='2.4.0'
# Some tools Automake needs.
@@ -4007,7 +4007,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by newlib $as_me 2.0.0, which was
+This file was extended by newlib $as_me 2.4.0, which was
generated by GNU Autoconf 2.68. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -4064,7 +4064,7 @@ _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
-newlib config.status 2.0.0
+newlib config.status 2.4.0
configured by $0, generated by GNU Autoconf 2.68,
with options \\"\$ac_cs_config\\"
diff --git a/newlib/libm/machine/arm/s_ceil.c b/newlib/libm/machine/arm/s_ceil.c
index ceb5bbfb0..ed1e85a3c 100644
--- a/newlib/libm/machine/arm/s_ceil.c
+++ b/newlib/libm/machine/arm/s_ceil.c
@@ -24,7 +24,7 @@
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */
-#if __ARM_ARCH >= 8 && !defined (__SOFTFP__)
+#if __ARM_ARCH >= 8 && (__ARM_FP & 0x8) && !defined (__SOFTFP__)
#include <math.h>
double
diff --git a/newlib/libm/machine/arm/s_floor.c b/newlib/libm/machine/arm/s_floor.c
index 50019819c..d25132f0d 100644
--- a/newlib/libm/machine/arm/s_floor.c
+++ b/newlib/libm/machine/arm/s_floor.c
@@ -24,7 +24,7 @@
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */
-#if __ARM_ARCH >= 8 && !defined (__SOFTFP__)
+#if __ARM_ARCH >= 8 && (__ARM_FP & 0x8) && !defined (__SOFTFP__)
#include <math.h>
double
diff --git a/newlib/libm/machine/arm/s_nearbyint.c b/newlib/libm/machine/arm/s_nearbyint.c
index c3b50dc7b..7ead69b12 100644
--- a/newlib/libm/machine/arm/s_nearbyint.c
+++ b/newlib/libm/machine/arm/s_nearbyint.c
@@ -24,7 +24,7 @@
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */
-#if __ARM_ARCH >= 8 && !defined (__SOFTFP__)
+#if __ARM_ARCH >= 8 && (__ARM_FP & 0x8) && !defined (__SOFTFP__)
#include <math.h>
double
diff --git a/newlib/libm/machine/arm/s_rint.c b/newlib/libm/machine/arm/s_rint.c
index 9050424a7..02c102250 100644
--- a/newlib/libm/machine/arm/s_rint.c
+++ b/newlib/libm/machine/arm/s_rint.c
@@ -24,7 +24,7 @@
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */
-#if __ARM_ARCH >= 8 && !defined (__SOFTFP__)
+#if __ARM_ARCH >= 8 && (__ARM_FP & 0x8) && !defined (__SOFTFP__)
#include <math.h>
double
diff --git a/newlib/libm/machine/arm/s_round.c b/newlib/libm/machine/arm/s_round.c
index 97f0296c6..a8f246602 100644
--- a/newlib/libm/machine/arm/s_round.c
+++ b/newlib/libm/machine/arm/s_round.c
@@ -24,7 +24,7 @@
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */
-#if __ARM_ARCH >= 8 && !defined (__SOFTFP__)
+#if __ARM_ARCH >= 8 && (__ARM_FP & 0x8) && !defined (__SOFTFP__)
#include <math.h>
double
diff --git a/newlib/libm/machine/arm/s_trunc.c b/newlib/libm/machine/arm/s_trunc.c
index 2f38a3574..6fb696814 100644
--- a/newlib/libm/machine/arm/s_trunc.c
+++ b/newlib/libm/machine/arm/s_trunc.c
@@ -24,7 +24,7 @@
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */
-#if __ARM_ARCH >= 8 && !defined (__SOFTFP__)
+#if __ARM_ARCH >= 8 && (__ARM_FP & 0x8) && !defined (__SOFTFP__)
#include <math.h>
double
diff --git a/newlib/libm/machine/configure b/newlib/libm/machine/configure
index 2e17a9740..215f41d17 100755
--- a/newlib/libm/machine/configure
+++ b/newlib/libm/machine/configure
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.68 for newlib 2.0.0.
+# Generated by GNU Autoconf 2.68 for newlib 2.4.0.
#
#
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
@@ -567,8 +567,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='newlib'
PACKAGE_TARNAME='newlib'
-PACKAGE_VERSION='2.0.0'
-PACKAGE_STRING='newlib 2.0.0'
+PACKAGE_VERSION='2.4.0'
+PACKAGE_STRING='newlib 2.4.0'
PACKAGE_BUGREPORT=''
PACKAGE_URL=''
@@ -788,6 +788,7 @@ CPP'
ac_subdirs_all='aarch64
arm
i386
+nds32
spu'
# Initialize some variables set by options.
@@ -1330,7 +1331,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures newlib 2.0.0 to adapt to many kinds of systems.
+\`configure' configures newlib 2.4.0 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1400,7 +1401,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of newlib 2.0.0:";;
+ short | recursive ) echo "Configuration of newlib 2.4.0:";;
esac
cat <<\_ACEOF
@@ -1511,7 +1512,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-newlib configure 2.0.0
+newlib configure 2.4.0
generated by GNU Autoconf 2.68
Copyright (C) 2010 Free Software Foundation, Inc.
@@ -1789,7 +1790,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by newlib $as_me 2.0.0, which was
+It was created by newlib $as_me 2.4.0, which was
generated by GNU Autoconf 2.68. Invocation command line was
$ $0 $@
@@ -2861,7 +2862,7 @@ fi
# Define the identity of the package.
PACKAGE='newlib'
- VERSION='2.0.0'
+ VERSION='2.4.0'
# Some tools Automake needs.
@@ -6922,7 +6923,7 @@ ia64-*-hpux*)
rm -rf conftest*
;;
-x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \
+x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \
s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
# Find out which ABI we are using.
echo 'int i;' > conftest.$ac_ext
@@ -6947,7 +6948,10 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
;;
esac
;;
- ppc64-*linux*|powerpc64-*linux*)
+ powerpc64le-*linux*)
+ LD="${LD-ld} -m elf32lppclinux"
+ ;;
+ powerpc64-*linux*)
LD="${LD-ld} -m elf32ppclinux"
;;
s390x-*linux*)
@@ -6966,7 +6970,10 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
x86_64-*linux*)
LD="${LD-ld} -m elf_x86_64"
;;
- ppc*-*linux*|powerpc*-*linux*)
+ powerpcle-*linux*)
+ LD="${LD-ld} -m elf64lppc"
+ ;;
+ powerpc-*linux*)
LD="${LD-ld} -m elf64ppc"
;;
s390*-*linux*|s390*-*tpf*)
@@ -7648,7 +7655,7 @@ $as_echo "$lt_cv_ld_force_load" >&6; }
case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
10.0,*86*-darwin8*|10.0,*-darwin[91]*)
_lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
- 10.[012]*)
+ 10.[012][,.]*)
_lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
10.*)
_lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
@@ -9217,7 +9224,7 @@ _LT_EOF
if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
&& test "$tmp_diet" = no
then
- tmp_addflag=
+ tmp_addflag=' $pic_flag'
tmp_sharedflag='-shared'
case $cc_basename,$host_cpu in
pgcc*) # Portland Group C compiler
@@ -9399,7 +9406,7 @@ _LT_EOF
if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
else
- export_symbols_cmds='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
+ export_symbols_cmds='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "L")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
fi
aix_use_runtimelinking=no
@@ -11427,7 +11434,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 11430 "configure"
+#line 11437 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -11533,7 +11540,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 11536 "configure"
+#line 11543 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -11784,6 +11791,8 @@ subdirs="$subdirs aarch64"
;;
i386) subdirs="$subdirs i386"
;;
+ nds32) subdirs="$subdirs nds32"
+ ;;
spu) subdirs="$subdirs spu"
;;
esac;
@@ -12417,7 +12426,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by newlib $as_me 2.0.0, which was
+This file was extended by newlib $as_me 2.4.0, which was
generated by GNU Autoconf 2.68. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -12474,7 +12483,7 @@ _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
-newlib config.status 2.0.0
+newlib config.status 2.4.0
configured by $0, generated by GNU Autoconf 2.68,
with options \\"\$ac_cs_config\\"
diff --git a/newlib/libm/machine/configure.in b/newlib/libm/machine/configure.in
index 85c5c41fe..b1a40e350 100644
--- a/newlib/libm/machine/configure.in
+++ b/newlib/libm/machine/configure.in
@@ -28,6 +28,7 @@ if test -n "${libm_machine_dir}"; then
aarch64) AC_CONFIG_SUBDIRS(aarch64) ;;
arm) AC_CONFIG_SUBDIRS(arm) ;;
i386) AC_CONFIG_SUBDIRS(i386) ;;
+ nds32) AC_CONFIG_SUBDIRS(nds32) ;;
spu) AC_CONFIG_SUBDIRS(spu) ;;
esac;
if test "${use_libtool}" = "yes"; then
diff --git a/newlib/libm/machine/i386/Makefile.in b/newlib/libm/machine/i386/Makefile.in
index dba2ba353..e599d5c42 100644
--- a/newlib/libm/machine/i386/Makefile.in
+++ b/newlib/libm/machine/i386/Makefile.in
@@ -275,12 +275,19 @@ libi386_la_LDFLAGS = -Xcompiler -nostdlib
@USE_LIBTOOL_FALSE@lib_a_SOURCES = $(LIB_SOURCES)
@USE_LIBTOOL_FALSE@lib_a_CFLAGS = $(AM_CFLAGS)
@USE_LIBTOOL_FALSE@lib_a_CCASFLAGS = $(AM_CCASFLAGS)
+
+#
+# documentation rules
+#
+SUFFIXES = .def
+CHEW = ${top_builddir}/../doc/makedoc -f $(top_srcdir)/../doc/doc.str
+CLEANFILES = $(CHEWOUT_FILES) *.ref
ACLOCAL_AMFLAGS = -I ../../.. -I ../../../..
CONFIG_STATUS_DEPENDENCIES = $(newlib_basedir)/configure.host
all: all-am
.SUFFIXES:
-.SUFFIXES: .S .c .lo .o .obj
+.SUFFIXES: .def .S .c .lo .o .obj
am--refresh: Makefile
@:
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(srcdir)/../../../Makefile.shared $(am__configure_deps)
@@ -595,6 +602,7 @@ install-strip:
mostlyclean-generic:
clean-generic:
+ -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
distclean-generic:
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
@@ -698,6 +706,18 @@ objectlist.awk.in: $(noinst_LTLIBRARIES)
echo $$i `pwd`/$$i >> objectlist.awk.in ; \
done
+.c.def:
+ $(CHEW) < $< > $*.def 2> $*.ref
+ touch stmp-def
+
+TARGETDOC ?= ../tmp.texi
+
+doc: $(CHEWOUT_FILES)
+ for chapter in $(CHAPTERS) ; \
+ do \
+ cat $(srcdir)/$$chapter >> $(TARGETDOC) ; \
+ done
+
# 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/libm/machine/i386/configure b/newlib/libm/machine/i386/configure
index 5bc0344d1..259266417 100755
--- a/newlib/libm/machine/i386/configure
+++ b/newlib/libm/machine/i386/configure
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.68 for newlib 2.0.0.
+# Generated by GNU Autoconf 2.68 for newlib 2.4.0.
#
#
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
@@ -567,8 +567,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='newlib'
PACKAGE_TARNAME='newlib'
-PACKAGE_VERSION='2.0.0'
-PACKAGE_STRING='newlib 2.0.0'
+PACKAGE_VERSION='2.4.0'
+PACKAGE_STRING='newlib 2.4.0'
PACKAGE_BUGREPORT=''
PACKAGE_URL=''
@@ -1322,7 +1322,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures newlib 2.0.0 to adapt to many kinds of systems.
+\`configure' configures newlib 2.4.0 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1392,7 +1392,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of newlib 2.0.0:";;
+ short | recursive ) echo "Configuration of newlib 2.4.0:";;
esac
cat <<\_ACEOF
@@ -1503,7 +1503,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-newlib configure 2.0.0
+newlib configure 2.4.0
generated by GNU Autoconf 2.68
Copyright (C) 2010 Free Software Foundation, Inc.
@@ -1781,7 +1781,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by newlib $as_me 2.0.0, which was
+It was created by newlib $as_me 2.4.0, which was
generated by GNU Autoconf 2.68. Invocation command line was
$ $0 $@
@@ -2853,7 +2853,7 @@ fi
# Define the identity of the package.
PACKAGE='newlib'
- VERSION='2.0.0'
+ VERSION='2.4.0'
# Some tools Automake needs.
@@ -6914,7 +6914,7 @@ ia64-*-hpux*)
rm -rf conftest*
;;
-x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \
+x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \
s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
# Find out which ABI we are using.
echo 'int i;' > conftest.$ac_ext
@@ -6939,7 +6939,10 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
;;
esac
;;
- ppc64-*linux*|powerpc64-*linux*)
+ powerpc64le-*linux*)
+ LD="${LD-ld} -m elf32lppclinux"
+ ;;
+ powerpc64-*linux*)
LD="${LD-ld} -m elf32ppclinux"
;;
s390x-*linux*)
@@ -6958,7 +6961,10 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
x86_64-*linux*)
LD="${LD-ld} -m elf_x86_64"
;;
- ppc*-*linux*|powerpc*-*linux*)
+ powerpcle-*linux*)
+ LD="${LD-ld} -m elf64lppc"
+ ;;
+ powerpc-*linux*)
LD="${LD-ld} -m elf64ppc"
;;
s390*-*linux*|s390*-*tpf*)
@@ -7640,7 +7646,7 @@ $as_echo "$lt_cv_ld_force_load" >&6; }
case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
10.0,*86*-darwin8*|10.0,*-darwin[91]*)
_lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
- 10.[012]*)
+ 10.[012][,.]*)
_lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
10.*)
_lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
@@ -9209,7 +9215,7 @@ _LT_EOF
if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
&& test "$tmp_diet" = no
then
- tmp_addflag=
+ tmp_addflag=' $pic_flag'
tmp_sharedflag='-shared'
case $cc_basename,$host_cpu in
pgcc*) # Portland Group C compiler
@@ -9391,7 +9397,7 @@ _LT_EOF
if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
else
- export_symbols_cmds='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
+ export_symbols_cmds='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "L")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
fi
aix_use_runtimelinking=no
@@ -11419,7 +11425,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 11422 "configure"
+#line 11428 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -11525,7 +11531,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 11528 "configure"
+#line 11534 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -12372,7 +12378,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by newlib $as_me 2.0.0, which was
+This file was extended by newlib $as_me 2.4.0, which was
generated by GNU Autoconf 2.68. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -12429,7 +12435,7 @@ _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
-newlib config.status 2.0.0
+newlib config.status 2.4.0
configured by $0, generated by GNU Autoconf 2.68,
with options \\"\$ac_cs_config\\"
diff --git a/newlib/libm/machine/i386/i386mach.h b/newlib/libm/machine/i386/i386mach.h
index 23c32190d..403d24bfe 100644
--- a/newlib/libm/machine/i386/i386mach.h
+++ b/newlib/libm/machine/i386/i386mach.h
@@ -74,7 +74,7 @@
#define SOTYPE_FUNCTION(sym)
#endif
-#ifdef _I386MACH_ALLOW_HW_INTERRUPTS
+#ifndef _I386MACH_DISABLE_HW_INTERRUPTS
#define __CLI
#define __STI
#else
diff --git a/newlib/libm/machine/nds32/Makefile.am b/newlib/libm/machine/nds32/Makefile.am
new file mode 100644
index 000000000..b5afbd399
--- /dev/null
+++ b/newlib/libm/machine/nds32/Makefile.am
@@ -0,0 +1,30 @@
+## Process this file with automake to generate Makefile.in
+
+AUTOMAKE_OPTIONS = cygnus
+
+INCLUDES = -I $(newlib_basedir)/../newlib/libm/common $(NEWLIB_CFLAGS) \
+ $(CROSS_CFLAGS) $(TARGET_CFLAGS)
+
+if HAS_NDS32_FPU_SP_FALSE
+GPR_SOURCES =
+else
+FPU_SP_SOURCES = wf_sqrt.S
+endif
+
+if HAS_NDS32_FPU_DP_FALSE
+else
+FPU_DP_SOURCES = w_sqrt.S
+endif
+
+LIB_SOURCES = $(GPR_SOURCES) $(FPU_SP_SOURCES) $(FPU_DP_SOURCES)
+
+noinst_LIBRARIES = lib.a
+lib_a_SOURCES = $(LIB_SOURCES)
+lib_a_CFLAGS = $(AM_CFLAGS)
+lib_a_CCASFLAGS = $(AM_CCASFLAGS)
+noinst_DATA =
+
+include $(srcdir)/../../../Makefile.shared
+
+ACLOCAL_AMFLAGS = -I ../../.. -I ../../../..
+CONFIG_STATUS_DEPENDENCIES = $(newlib_basedir)/configure.host
diff --git a/newlib/libm/machine/nds32/Makefile.in b/newlib/libm/machine/nds32/Makefile.in
new file mode 100644
index 000000000..2609551c2
--- /dev/null
+++ b/newlib/libm/machine/nds32/Makefile.in
@@ -0,0 +1,489 @@
+# Makefile.in generated by automake 1.11.6 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 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@
+
+
+VPATH = @srcdir@
+am__make_dryrun = \
+ { \
+ am__dry=no; \
+ case $$MAKEFLAGS in \
+ *\\[\ \ ]*) \
+ echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \
+ | grep '^AM OK$$' >/dev/null || am__dry=yes;; \
+ *) \
+ for am__flg in $$MAKEFLAGS; do \
+ case $$am__flg in \
+ *=*|--*) ;; \
+ *n*) am__dry=yes; break;; \
+ esac; \
+ done;; \
+ esac; \
+ test $$am__dry = yes; \
+ }
+pkgdatadir = $(datadir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+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@
+DIST_COMMON = $(srcdir)/../../../Makefile.shared $(srcdir)/Makefile.in \
+ $(srcdir)/Makefile.am $(top_srcdir)/configure \
+ $(am__configure_deps) $(srcdir)/../../../../mkinstalldirs
+subdir = .
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/../../../acinclude.m4 \
+ $(top_srcdir)/configure.in
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+ $(ACLOCAL_M4)
+am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
+ configure.lineno config.status.lineno
+mkinstalldirs = $(SHELL) $(top_srcdir)/../../../../mkinstalldirs
+CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+LIBRARIES = $(noinst_LIBRARIES)
+ARFLAGS = cru
+lib_a_AR = $(AR) $(ARFLAGS)
+lib_a_LIBADD =
+am__objects_1 =
+@HAS_NDS32_FPU_SP_TRUE@am__objects_2 = lib_a-wf_sqrt.$(OBJEXT)
+@HAS_NDS32_FPU_DP_TRUE@am__objects_3 = lib_a-w_sqrt.$(OBJEXT)
+am__objects_4 = $(am__objects_1) $(am__objects_2) $(am__objects_3)
+am_lib_a_OBJECTS = $(am__objects_4)
+lib_a_OBJECTS = $(am_lib_a_OBJECTS)
+DEFAULT_INCLUDES = -I.@am__isrc@
+depcomp =
+am__depfiles_maybe =
+CPPASCOMPILE = $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CCASFLAGS) $(CCASFLAGS)
+COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+CCLD = $(CC)
+LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
+SOURCES = $(lib_a_SOURCES)
+am__can_run_installinfo = \
+ case $$AM_UPDATE_INFO_DIR in \
+ n|no|NO) false;; \
+ *) (install-info --version) >/dev/null 2>&1;; \
+ esac
+DATA = $(noinst_DATA)
+ETAGS = etags
+CTAGS = ctags
+ACLOCAL = @ACLOCAL@
+AMTAR = @AMTAR@
+AR = @AR@
+AS = @AS@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CC = @CC@
+CCAS = @CCAS@
+CCASFLAGS = @CCASFLAGS@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPPFLAGS = @CPPFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EXEEXT = @EXEEXT@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LDFLAGS = @LDFLAGS@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LTLIBOBJS = @LTLIBOBJS@
+MAINT = @MAINT@
+MAKEINFO = @MAKEINFO@
+MKDIR_P = @MKDIR_P@
+NEWLIB_CFLAGS = @NEWLIB_CFLAGS@
+NO_INCLUDE_LIST = @NO_INCLUDE_LIST@
+OBJEXT = @OBJEXT@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+RANLIB = @RANLIB@
+READELF = @READELF@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+VERSION = @VERSION@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_CC = @ac_ct_CC@
+aext = @aext@
+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@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+libm_machine_dir = @libm_machine_dir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+lpfx = @lpfx@
+machine_dir = @machine_dir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+newlib_basedir = @newlib_basedir@
+oext = @oext@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sys_dir = @sys_dir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+AUTOMAKE_OPTIONS = cygnus
+INCLUDES = -I $(newlib_basedir)/../newlib/libm/common $(NEWLIB_CFLAGS) \
+ $(CROSS_CFLAGS) $(TARGET_CFLAGS)
+
+@HAS_NDS32_FPU_SP_FALSE@GPR_SOURCES =
+@HAS_NDS32_FPU_SP_TRUE@FPU_SP_SOURCES = wf_sqrt.S
+@HAS_NDS32_FPU_DP_TRUE@FPU_DP_SOURCES = w_sqrt.S
+LIB_SOURCES = $(GPR_SOURCES) $(FPU_SP_SOURCES) $(FPU_DP_SOURCES)
+noinst_LIBRARIES = lib.a
+lib_a_SOURCES = $(LIB_SOURCES)
+lib_a_CFLAGS = $(AM_CFLAGS)
+lib_a_CCASFLAGS = $(AM_CCASFLAGS)
+noinst_DATA =
+
+#
+# documentation rules
+#
+SUFFIXES = .def
+CHEW = ${top_builddir}/../doc/makedoc -f $(top_srcdir)/../doc/doc.str
+CLEANFILES = $(CHEWOUT_FILES) *.ref
+ACLOCAL_AMFLAGS = -I ../../.. -I ../../../..
+CONFIG_STATUS_DEPENDENCIES = $(newlib_basedir)/configure.host
+all: all-am
+
+.SUFFIXES:
+.SUFFIXES: .def .S .c .o .obj
+am--refresh: Makefile
+ @:
+$(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*) \
+ echo ' cd $(srcdir) && $(AUTOMAKE) --cygnus'; \
+ $(am__cd) $(srcdir) && $(AUTOMAKE) --cygnus \
+ && exit 0; \
+ exit 1;; \
+ esac; \
+ done; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --cygnus Makefile'; \
+ $(am__cd) $(top_srcdir) && \
+ $(AUTOMAKE) --cygnus Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ @case '$?' in \
+ *config.status*) \
+ echo ' $(SHELL) ./config.status'; \
+ $(SHELL) ./config.status;; \
+ *) \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \
+ esac;
+$(srcdir)/../../../Makefile.shared:
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+ $(SHELL) ./config.status --recheck
+
+$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
+ $(am__cd) $(srcdir) && $(AUTOCONF)
+$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
+ $(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
+$(am__aclocal_m4_deps):
+
+clean-noinstLIBRARIES:
+ -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES)
+lib.a: $(lib_a_OBJECTS) $(lib_a_DEPENDENCIES) $(EXTRA_lib_a_DEPENDENCIES)
+ -rm -f lib.a
+ $(lib_a_AR) lib.a $(lib_a_OBJECTS) $(lib_a_LIBADD)
+ $(RANLIB) lib.a
+
+mostlyclean-compile:
+ -rm -f *.$(OBJEXT)
+
+distclean-compile:
+ -rm -f *.tab.c
+
+.S.o:
+ $(CPPASCOMPILE) -c -o $@ $<
+
+.S.obj:
+ $(CPPASCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
+
+lib_a-wf_sqrt.o: wf_sqrt.S
+ $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CCASFLAGS) $(CCASFLAGS) -c -o lib_a-wf_sqrt.o `test -f 'wf_sqrt.S' || echo '$(srcdir)/'`wf_sqrt.S
+
+lib_a-wf_sqrt.obj: wf_sqrt.S
+ $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CCASFLAGS) $(CCASFLAGS) -c -o lib_a-wf_sqrt.obj `if test -f 'wf_sqrt.S'; then $(CYGPATH_W) 'wf_sqrt.S'; else $(CYGPATH_W) '$(srcdir)/wf_sqrt.S'; fi`
+
+lib_a-w_sqrt.o: w_sqrt.S
+ $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CCASFLAGS) $(CCASFLAGS) -c -o lib_a-w_sqrt.o `test -f 'w_sqrt.S' || echo '$(srcdir)/'`w_sqrt.S
+
+lib_a-w_sqrt.obj: w_sqrt.S
+ $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CCASFLAGS) $(CCASFLAGS) -c -o lib_a-w_sqrt.obj `if test -f 'w_sqrt.S'; then $(CYGPATH_W) 'w_sqrt.S'; else $(CYGPATH_W) '$(srcdir)/w_sqrt.S'; fi`
+
+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; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ mkid -fID $$unique
+tags: TAGS
+
+TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ set x; \
+ 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; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ shift; \
+ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
+ test -n "$$unique" || unique=$$empty_fix; \
+ if test $$# -gt 0; then \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ "$$@" $$unique; \
+ else \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ $$unique; \
+ fi; \
+ fi
+ctags: CTAGS
+CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ 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; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ test -z "$(CTAGS_ARGS)$$unique" \
+ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+ $$unique
+
+GTAGS:
+ here=`$(am__cd) $(top_builddir) && pwd` \
+ && $(am__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) $(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:
+ if test -z '$(STRIP)'; then \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ install; \
+ else \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
+ fi
+mostlyclean-generic:
+
+clean-generic:
+ -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
+
+distclean-generic:
+ -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+ -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_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-noinstLIBRARIES mostlyclean-am
+
+distclean: distclean-am
+ -rm -f $(am__CONFIG_DISTCLEAN_FILES)
+ -rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+ distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+html-am:
+
+info: info-am
+
+info-am:
+
+install-data-am:
+
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
+install-exec-am:
+
+install-html: install-html-am
+
+install-html-am:
+
+install-info: install-info-am
+
+install-info-am:
+
+install-man:
+
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+ -rm -f $(am__CONFIG_DISTCLEAN_FILES)
+ -rm -rf $(top_srcdir)/autom4te.cache
+ -rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am:
+
+.MAKE: install-am install-strip
+
+.PHONY: CTAGS GTAGS all all-am am--refresh check check-am clean \
+ clean-generic clean-noinstLIBRARIES ctags distclean \
+ distclean-compile distclean-generic distclean-tags dvi dvi-am \
+ html html-am info info-am install install-am install-data \
+ install-data-am install-dvi install-dvi-am install-exec \
+ install-exec-am install-html install-html-am install-info \
+ install-info-am install-man install-pdf install-pdf-am \
+ install-ps install-ps-am install-strip installcheck \
+ installcheck-am installdirs maintainer-clean \
+ maintainer-clean-generic mostlyclean mostlyclean-compile \
+ mostlyclean-generic pdf pdf-am ps ps-am tags uninstall \
+ uninstall-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
+
+.c.def:
+ $(CHEW) < $< > $*.def 2> $*.ref
+ touch stmp-def
+
+TARGETDOC ?= ../tmp.texi
+
+doc: $(CHEWOUT_FILES)
+ for chapter in $(CHAPTERS) ; \
+ do \
+ cat $(srcdir)/$$chapter >> $(TARGETDOC) ; \
+ done
+
+# 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/libm/machine/nds32/aclocal.m4 b/newlib/libm/machine/nds32/aclocal.m4
new file mode 100644
index 000000000..18dab02aa
--- /dev/null
+++ b/newlib/libm/machine/nds32/aclocal.m4
@@ -0,0 +1,1012 @@
+# generated automatically by aclocal 1.11.6 -*- Autoconf -*-
+
+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
+# 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation,
+# Inc.
+# This file 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.
+
+m4_ifndef([AC_AUTOCONF_VERSION],
+ [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
+m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.68],,
+[m4_warning([this file was generated for autoconf 2.68.
+You have another version of autoconf. It may work, but is not guaranteed to.
+If you have problems, you may need to regenerate the build system entirely.
+To do so, use the procedure documented by the package, typically `autoreconf'.])])
+
+# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008, 2011 Free Software
+# Foundation, Inc.
+#
+# This file 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.
+
+# serial 1
+
+# AM_AUTOMAKE_VERSION(VERSION)
+# ----------------------------
+# Automake X.Y traces this macro to ensure aclocal.m4 has been
+# generated from the m4 files accompanying Automake X.Y.
+# (This private macro should not be called outside this file.)
+AC_DEFUN([AM_AUTOMAKE_VERSION],
+[am__api_version='1.11'
+dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
+dnl require some minimum version. Point them to the right macro.
+m4_if([$1], [1.11.6], [],
+ [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
+])
+
+# _AM_AUTOCONF_VERSION(VERSION)
+# -----------------------------
+# aclocal traces this macro to find the Autoconf version.
+# This is a private macro too. Using m4_define simplifies
+# the logic in aclocal, which can simply ignore this definition.
+m4_define([_AM_AUTOCONF_VERSION], [])
+
+# AM_SET_CURRENT_AUTOMAKE_VERSION
+# -------------------------------
+# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
+# This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
+AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
+[AM_AUTOMAKE_VERSION([1.11.6])dnl
+m4_ifndef([AC_AUTOCONF_VERSION],
+ [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
+_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
+
+# AM_AUX_DIR_EXPAND -*- Autoconf -*-
+
+# Copyright (C) 2001, 2003, 2005, 2011 Free Software Foundation, Inc.
+#
+# This file 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.
+
+# serial 1
+
+# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
+# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to
+# `$srcdir', `$srcdir/..', or `$srcdir/../..'.
+#
+# Of course, Automake must honor this variable whenever it calls a
+# tool from the auxiliary directory. The problem is that $srcdir (and
+# therefore $ac_aux_dir as well) can be either absolute or relative,
+# depending on how configure is run. This is pretty annoying, since
+# it makes $ac_aux_dir quite unusable in subdirectories: in the top
+# source directory, any form will work fine, but in subdirectories a
+# relative path needs to be adjusted first.
+#
+# $ac_aux_dir/missing
+# fails when called from a subdirectory if $ac_aux_dir is relative
+# $top_srcdir/$ac_aux_dir/missing
+# fails if $ac_aux_dir is absolute,
+# fails when called from a subdirectory in a VPATH build with
+# a relative $ac_aux_dir
+#
+# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
+# are both prefixed by $srcdir. In an in-source build this is usually
+# harmless because $srcdir is `.', but things will broke when you
+# start a VPATH build or use an absolute $srcdir.
+#
+# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
+# iff we strip the leading $srcdir from $ac_aux_dir. That would be:
+# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
+# and then we would define $MISSING as
+# MISSING="\${SHELL} $am_aux_dir/missing"
+# This will work as long as MISSING is not called from configure, because
+# unfortunately $(top_srcdir) has no meaning in configure.
+# However there are other variables, like CC, which are often used in
+# configure, and could therefore not use this "fixed" $ac_aux_dir.
+#
+# Another solution, used here, is to always expand $ac_aux_dir to an
+# absolute PATH. The drawback is that using absolute paths prevent a
+# configured tree to be moved without reconfiguration.
+
+AC_DEFUN([AM_AUX_DIR_EXPAND],
+[dnl Rely on autoconf to set up CDPATH properly.
+AC_PREREQ([2.50])dnl
+# expand $ac_aux_dir to an absolute path
+am_aux_dir=`cd $ac_aux_dir && pwd`
+])
+
+# AM_CONDITIONAL -*- Autoconf -*-
+
+# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008
+# Free Software Foundation, Inc.
+#
+# This file 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.
+
+# serial 9
+
+# AM_CONDITIONAL(NAME, SHELL-CONDITION)
+# -------------------------------------
+# Define a conditional.
+AC_DEFUN([AM_CONDITIONAL],
+[AC_PREREQ(2.52)dnl
+ ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])],
+ [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
+AC_SUBST([$1_TRUE])dnl
+AC_SUBST([$1_FALSE])dnl
+_AM_SUBST_NOTMAKE([$1_TRUE])dnl
+_AM_SUBST_NOTMAKE([$1_FALSE])dnl
+m4_define([_AM_COND_VALUE_$1], [$2])dnl
+if $2; then
+ $1_TRUE=
+ $1_FALSE='#'
+else
+ $1_TRUE='#'
+ $1_FALSE=
+fi
+AC_CONFIG_COMMANDS_PRE(
+[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
+ AC_MSG_ERROR([[conditional "$1" was never defined.
+Usually this means the macro was only invoked conditionally.]])
+fi])])
+
+# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009,
+# 2010, 2011 Free Software Foundation, Inc.
+#
+# This file 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.
+
+# serial 12
+
+# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
+# written in clear, in which case automake, when reading aclocal.m4,
+# will think it sees a *use*, and therefore will trigger all it's
+# C support machinery. Also note that it means that autoscan, seeing
+# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
+
+
+# _AM_DEPENDENCIES(NAME)
+# ----------------------
+# See how the compiler implements dependency checking.
+# NAME is "CC", "CXX", "GCJ", or "OBJC".
+# We try a few techniques and use that to set a single cache variable.
+#
+# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
+# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
+# dependency, and given that the user is not expected to run this macro,
+# just rely on AC_PROG_CC.
+AC_DEFUN([_AM_DEPENDENCIES],
+[AC_REQUIRE([AM_SET_DEPDIR])dnl
+AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
+AC_REQUIRE([AM_MAKE_INCLUDE])dnl
+AC_REQUIRE([AM_DEP_TRACK])dnl
+
+ifelse([$1], CC, [depcc="$CC" am_compiler_list=],
+ [$1], CXX, [depcc="$CXX" am_compiler_list=],
+ [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
+ [$1], UPC, [depcc="$UPC" am_compiler_list=],
+ [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'],
+ [depcc="$$1" am_compiler_list=])
+
+AC_CACHE_CHECK([dependency style of $depcc],
+ [am_cv_$1_dependencies_compiler_type],
+[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
+ # We make a subdir and do the tests there. Otherwise we can end up
+ # making bogus files that we don't know about and never remove. For
+ # instance it was reported that on HP-UX the gcc test will end up
+ # making a dummy file named `D' -- because `-MD' means `put the output
+ # in D'.
+ rm -rf conftest.dir
+ mkdir conftest.dir
+ # Copy depcomp to subdir because otherwise we won't find it if we're
+ # using a relative directory.
+ cp "$am_depcomp" conftest.dir
+ cd conftest.dir
+ # We will build objects and dependencies in a subdirectory because
+ # it helps to detect inapplicable dependency modes. For instance
+ # both Tru64's cc and ICC support -MD to output dependencies as a
+ # side effect of compilation, but ICC will put the dependencies in
+ # the current directory while Tru64 will put them in the object
+ # directory.
+ mkdir sub
+
+ am_cv_$1_dependencies_compiler_type=none
+ if test "$am_compiler_list" = ""; then
+ am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
+ fi
+ am__universal=false
+ m4_case([$1], [CC],
+ [case " $depcc " in #(
+ *\ -arch\ *\ -arch\ *) am__universal=true ;;
+ esac],
+ [CXX],
+ [case " $depcc " in #(
+ *\ -arch\ *\ -arch\ *) am__universal=true ;;
+ esac])
+
+ for depmode in $am_compiler_list; do
+ # Setup a source with many dependencies, because some compilers
+ # like to wrap large dependency lists on column 80 (with \), and
+ # we should not choose a depcomp mode which is confused by this.
+ #
+ # We need to recreate these files for each test, as the compiler may
+ # overwrite some of them when testing with obscure command lines.
+ # This happens at least with the AIX C compiler.
+ : > sub/conftest.c
+ for i in 1 2 3 4 5 6; do
+ echo '#include "conftst'$i'.h"' >> sub/conftest.c
+ # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
+ # Solaris 8's {/usr,}/bin/sh.
+ touch sub/conftst$i.h
+ done
+ echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
+
+ # We check with `-c' and `-o' for the sake of the "dashmstdout"
+ # mode. It turns out that the SunPro C++ compiler does not properly
+ # handle `-M -o', and we need to detect this. Also, some Intel
+ # versions had trouble with output in subdirs
+ am__obj=sub/conftest.${OBJEXT-o}
+ am__minus_obj="-o $am__obj"
+ case $depmode in
+ gcc)
+ # This depmode causes a compiler race in universal mode.
+ test "$am__universal" = false || continue
+ ;;
+ nosideeffect)
+ # after this tag, mechanisms are not by side-effect, so they'll
+ # only be used when explicitly requested
+ if test "x$enable_dependency_tracking" = xyes; then
+ continue
+ else
+ break
+ fi
+ ;;
+ msvc7 | msvc7msys | msvisualcpp | msvcmsys)
+ # This compiler won't grok `-c -o', but also, the minuso test has
+ # not run yet. These depmodes are late enough in the game, and
+ # so weak that their functioning should not be impacted.
+ am__obj=conftest.${OBJEXT-o}
+ am__minus_obj=
+ ;;
+ none) break ;;
+ esac
+ if depmode=$depmode \
+ source=sub/conftest.c object=$am__obj \
+ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
+ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
+ >/dev/null 2>conftest.err &&
+ grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
+ grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
+ grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
+ ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
+ # icc doesn't choke on unknown options, it will just issue warnings
+ # or remarks (even with -Werror). So we grep stderr for any message
+ # that says an option was ignored or not supported.
+ # When given -MP, icc 7.0 and 7.1 complain thusly:
+ # icc: Command line warning: ignoring option '-M'; no argument required
+ # The diagnosis changed in icc 8.0:
+ # icc: Command line remark: option '-MP' not supported
+ if (grep 'ignoring option' conftest.err ||
+ grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
+ am_cv_$1_dependencies_compiler_type=$depmode
+ break
+ fi
+ fi
+ done
+
+ cd ..
+ rm -rf conftest.dir
+else
+ am_cv_$1_dependencies_compiler_type=none
+fi
+])
+AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
+AM_CONDITIONAL([am__fastdep$1], [
+ test "x$enable_dependency_tracking" != xno \
+ && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
+])
+
+
+# AM_SET_DEPDIR
+# -------------
+# Choose a directory name for dependency files.
+# This macro is AC_REQUIREd in _AM_DEPENDENCIES
+AC_DEFUN([AM_SET_DEPDIR],
+[AC_REQUIRE([AM_SET_LEADING_DOT])dnl
+AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
+])
+
+
+# AM_DEP_TRACK
+# ------------
+AC_DEFUN([AM_DEP_TRACK],
+[AC_ARG_ENABLE(dependency-tracking,
+[ --disable-dependency-tracking speeds up one-time build
+ --enable-dependency-tracking do not reject slow dependency extractors])
+if test "x$enable_dependency_tracking" != xno; then
+ am_depcomp="$ac_aux_dir/depcomp"
+ AMDEPBACKSLASH='\'
+ am__nodep='_no'
+fi
+AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
+AC_SUBST([AMDEPBACKSLASH])dnl
+_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
+AC_SUBST([am__nodep])dnl
+_AM_SUBST_NOTMAKE([am__nodep])dnl
+])
+
+# Generate code to set up dependency tracking. -*- Autoconf -*-
+
+# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008
+# Free Software Foundation, Inc.
+#
+# This file 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.
+
+#serial 5
+
+# _AM_OUTPUT_DEPENDENCY_COMMANDS
+# ------------------------------
+AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
+[{
+ # Autoconf 2.62 quotes --file arguments for eval, but not when files
+ # are listed without --file. Let's play safe and only enable the eval
+ # if we detect the quoting.
+ case $CONFIG_FILES in
+ *\'*) eval set x "$CONFIG_FILES" ;;
+ *) set x $CONFIG_FILES ;;
+ esac
+ shift
+ for mf
+ do
+ # Strip MF so we end up with the name of the file.
+ mf=`echo "$mf" | sed -e 's/:.*$//'`
+ # Check whether this is an Automake generated Makefile or not.
+ # We used to match only the files named `Makefile.in', but
+ # some people rename them; so instead we look at the file content.
+ # Grep'ing the first line is not enough: some people post-process
+ # each Makefile.in and add a new line on top of each file to say so.
+ # Grep'ing the whole file is not good either: AIX grep has a line
+ # limit of 2048, but all sed's we know have understand at least 4000.
+ if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
+ dirpart=`AS_DIRNAME("$mf")`
+ else
+ continue
+ fi
+ # Extract the definition of DEPDIR, am__include, and am__quote
+ # from the Makefile without running `make'.
+ DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
+ test -z "$DEPDIR" && continue
+ am__include=`sed -n 's/^am__include = //p' < "$mf"`
+ test -z "am__include" && continue
+ am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
+ # When using ansi2knr, U may be empty or an underscore; expand it
+ U=`sed -n 's/^U = //p' < "$mf"`
+ # Find all dependency output files, they are included files with
+ # $(DEPDIR) in their names. We invoke sed twice because it is the
+ # simplest approach to changing $(DEPDIR) to its actual value in the
+ # expansion.
+ for file in `sed -n "
+ s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
+ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
+ # Make sure the directory exists.
+ test -f "$dirpart/$file" && continue
+ fdir=`AS_DIRNAME(["$file"])`
+ AS_MKDIR_P([$dirpart/$fdir])
+ # echo "creating $dirpart/$file"
+ echo '# dummy' > "$dirpart/$file"
+ done
+ done
+}
+])# _AM_OUTPUT_DEPENDENCY_COMMANDS
+
+
+# AM_OUTPUT_DEPENDENCY_COMMANDS
+# -----------------------------
+# This macro should only be invoked once -- use via AC_REQUIRE.
+#
+# This code is only required when automatic dependency tracking
+# is enabled. FIXME. This creates each `.P' file that we will
+# need in order to bootstrap the dependency handling code.
+AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
+[AC_CONFIG_COMMANDS([depfiles],
+ [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
+ [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
+])
+
+# Do all the work for Automake. -*- Autoconf -*-
+
+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
+# 2005, 2006, 2008, 2009 Free Software Foundation, Inc.
+#
+# This file 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.
+
+# serial 16
+
+# This macro actually does too much. Some checks are only needed if
+# your package does certain things. But this isn't really a big deal.
+
+# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
+# AM_INIT_AUTOMAKE([OPTIONS])
+# -----------------------------------------------
+# The call with PACKAGE and VERSION arguments is the old style
+# call (pre autoconf-2.50), which is being phased out. PACKAGE
+# and VERSION should now be passed to AC_INIT and removed from
+# the call to AM_INIT_AUTOMAKE.
+# We support both call styles for the transition. After
+# the next Automake release, Autoconf can make the AC_INIT
+# arguments mandatory, and then we can depend on a new Autoconf
+# release and drop the old call support.
+AC_DEFUN([AM_INIT_AUTOMAKE],
+[AC_PREREQ([2.62])dnl
+dnl Autoconf wants to disallow AM_ names. We explicitly allow
+dnl the ones we care about.
+m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
+AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
+AC_REQUIRE([AC_PROG_INSTALL])dnl
+if test "`cd $srcdir && pwd`" != "`pwd`"; then
+ # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
+ # is not polluted with repeated "-I."
+ AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
+ # test to see if srcdir already configured
+ if test -f $srcdir/config.status; then
+ AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
+ fi
+fi
+
+# test whether we have cygpath
+if test -z "$CYGPATH_W"; then
+ if (cygpath --version) >/dev/null 2>/dev/null; then
+ CYGPATH_W='cygpath -w'
+ else
+ CYGPATH_W=echo
+ fi
+fi
+AC_SUBST([CYGPATH_W])
+
+# Define the identity of the package.
+dnl Distinguish between old-style and new-style calls.
+m4_ifval([$2],
+[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
+ AC_SUBST([PACKAGE], [$1])dnl
+ AC_SUBST([VERSION], [$2])],
+[_AM_SET_OPTIONS([$1])dnl
+dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
+m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,,
+ [m4_fatal([AC_INIT should be called with package and version arguments])])dnl
+ AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
+ AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
+
+_AM_IF_OPTION([no-define],,
+[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
+ AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
+
+# Some tools Automake needs.
+AC_REQUIRE([AM_SANITY_CHECK])dnl
+AC_REQUIRE([AC_ARG_PROGRAM])dnl
+AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
+AM_MISSING_PROG(AUTOCONF, autoconf)
+AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
+AM_MISSING_PROG(AUTOHEADER, autoheader)
+AM_MISSING_PROG(MAKEINFO, makeinfo)
+AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
+AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl
+AC_REQUIRE([AM_PROG_MKDIR_P])dnl
+# We need awk for the "check" target. The system "awk" is bad on
+# some platforms.
+AC_REQUIRE([AC_PROG_AWK])dnl
+AC_REQUIRE([AC_PROG_MAKE_SET])dnl
+AC_REQUIRE([AM_SET_LEADING_DOT])dnl
+_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
+ [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
+ [_AM_PROG_TAR([v7])])])
+_AM_IF_OPTION([no-dependencies],,
+[AC_PROVIDE_IFELSE([AC_PROG_CC],
+ [_AM_DEPENDENCIES(CC)],
+ [define([AC_PROG_CC],
+ defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
+AC_PROVIDE_IFELSE([AC_PROG_CXX],
+ [_AM_DEPENDENCIES(CXX)],
+ [define([AC_PROG_CXX],
+ defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
+AC_PROVIDE_IFELSE([AC_PROG_OBJC],
+ [_AM_DEPENDENCIES(OBJC)],
+ [define([AC_PROG_OBJC],
+ defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl
+])
+_AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl
+dnl The `parallel-tests' driver may need to know about EXEEXT, so add the
+dnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This macro
+dnl is hooked onto _AC_COMPILER_EXEEXT early, see below.
+AC_CONFIG_COMMANDS_PRE(dnl
+[m4_provide_if([_AM_COMPILER_EXEEXT],
+ [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
+])
+
+dnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion. Do not
+dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further
+dnl mangled by Autoconf and run in a shell conditional statement.
+m4_define([_AC_COMPILER_EXEEXT],
+m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])])
+
+
+# When config.status generates a header, we must update the stamp-h file.
+# This file resides in the same directory as the config header
+# that is generated. The stamp files are numbered to have different names.
+
+# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
+# loop where config.status creates the headers, so we can generate
+# our stamp files there.
+AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
+[# Compute $1's index in $config_headers.
+_am_arg=$1
+_am_stamp_count=1
+for _am_header in $config_headers :; do
+ case $_am_header in
+ $_am_arg | $_am_arg:* )
+ break ;;
+ * )
+ _am_stamp_count=`expr $_am_stamp_count + 1` ;;
+ esac
+done
+echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
+
+# Copyright (C) 2001, 2003, 2005, 2008, 2011 Free Software Foundation,
+# Inc.
+#
+# This file 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.
+
+# serial 1
+
+# AM_PROG_INSTALL_SH
+# ------------------
+# Define $install_sh.
+AC_DEFUN([AM_PROG_INSTALL_SH],
+[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
+if test x"${install_sh}" != xset; then
+ case $am_aux_dir in
+ *\ * | *\ *)
+ install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
+ *)
+ install_sh="\${SHELL} $am_aux_dir/install-sh"
+ esac
+fi
+AC_SUBST(install_sh)])
+
+# Copyright (C) 2003, 2005 Free Software Foundation, Inc.
+#
+# This file 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.
+
+# serial 2
+
+# Check whether the underlying file-system supports filenames
+# with a leading dot. For instance MS-DOS doesn't.
+AC_DEFUN([AM_SET_LEADING_DOT],
+[rm -rf .tst 2>/dev/null
+mkdir .tst 2>/dev/null
+if test -d .tst; then
+ am__leading_dot=.
+else
+ am__leading_dot=_
+fi
+rmdir .tst 2>/dev/null
+AC_SUBST([am__leading_dot])])
+
+# Add --enable-maintainer-mode option to configure. -*- Autoconf -*-
+# From Jim Meyering
+
+# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005, 2008,
+# 2011 Free Software Foundation, Inc.
+#
+# This file 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.
+
+# serial 5
+
+# AM_MAINTAINER_MODE([DEFAULT-MODE])
+# ----------------------------------
+# Control maintainer-specific portions of Makefiles.
+# Default is to disable them, unless `enable' is passed literally.
+# For symmetry, `disable' may be passed as well. Anyway, the user
+# can override the default with the --enable/--disable switch.
+AC_DEFUN([AM_MAINTAINER_MODE],
+[m4_case(m4_default([$1], [disable]),
+ [enable], [m4_define([am_maintainer_other], [disable])],
+ [disable], [m4_define([am_maintainer_other], [enable])],
+ [m4_define([am_maintainer_other], [enable])
+ m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])])
+AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
+ dnl maintainer-mode's default is 'disable' unless 'enable' is passed
+ AC_ARG_ENABLE([maintainer-mode],
+[ --][am_maintainer_other][-maintainer-mode am_maintainer_other make rules and dependencies not useful
+ (and sometimes confusing) to the casual installer],
+ [USE_MAINTAINER_MODE=$enableval],
+ [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes]))
+ AC_MSG_RESULT([$USE_MAINTAINER_MODE])
+ AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes])
+ MAINT=$MAINTAINER_MODE_TRUE
+ AC_SUBST([MAINT])dnl
+]
+)
+
+AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE])
+
+# Check to see how 'make' treats includes. -*- Autoconf -*-
+
+# Copyright (C) 2001, 2002, 2003, 2005, 2009 Free Software Foundation, Inc.
+#
+# This file 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.
+
+# serial 4
+
+# AM_MAKE_INCLUDE()
+# -----------------
+# Check to see how make treats includes.
+AC_DEFUN([AM_MAKE_INCLUDE],
+[am_make=${MAKE-make}
+cat > confinc << 'END'
+am__doit:
+ @echo this is the am__doit target
+.PHONY: am__doit
+END
+# If we don't find an include directive, just comment out the code.
+AC_MSG_CHECKING([for style of include used by $am_make])
+am__include="#"
+am__quote=
+_am_result=none
+# First try GNU make style include.
+echo "include confinc" > confmf
+# Ignore all kinds of additional output from `make'.
+case `$am_make -s -f confmf 2> /dev/null` in #(
+*the\ am__doit\ target*)
+ am__include=include
+ am__quote=
+ _am_result=GNU
+ ;;
+esac
+# Now try BSD make style include.
+if test "$am__include" = "#"; then
+ echo '.include "confinc"' > confmf
+ case `$am_make -s -f confmf 2> /dev/null` in #(
+ *the\ am__doit\ target*)
+ am__include=.include
+ am__quote="\""
+ _am_result=BSD
+ ;;
+ esac
+fi
+AC_SUBST([am__include])
+AC_SUBST([am__quote])
+AC_MSG_RESULT([$_am_result])
+rm -f confinc confmf
+])
+
+# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*-
+
+# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008
+# Free Software Foundation, Inc.
+#
+# This file 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.
+
+# serial 6
+
+# AM_MISSING_PROG(NAME, PROGRAM)
+# ------------------------------
+AC_DEFUN([AM_MISSING_PROG],
+[AC_REQUIRE([AM_MISSING_HAS_RUN])
+$1=${$1-"${am_missing_run}$2"}
+AC_SUBST($1)])
+
+
+# AM_MISSING_HAS_RUN
+# ------------------
+# Define MISSING if not defined so far and test if it supports --run.
+# If it does, set am_missing_run to use it, otherwise, to nothing.
+AC_DEFUN([AM_MISSING_HAS_RUN],
+[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
+AC_REQUIRE_AUX_FILE([missing])dnl
+if test x"${MISSING+set}" != xset; then
+ case $am_aux_dir in
+ *\ * | *\ *)
+ MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
+ *)
+ MISSING="\${SHELL} $am_aux_dir/missing" ;;
+ esac
+fi
+# Use eval to expand $SHELL
+if eval "$MISSING --run true"; then
+ am_missing_run="$MISSING --run "
+else
+ am_missing_run=
+ AC_MSG_WARN([`missing' script is too old or missing])
+fi
+])
+
+# Copyright (C) 2003, 2004, 2005, 2006, 2011 Free Software Foundation,
+# Inc.
+#
+# This file 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.
+
+# serial 1
+
+# AM_PROG_MKDIR_P
+# ---------------
+# Check for `mkdir -p'.
+AC_DEFUN([AM_PROG_MKDIR_P],
+[AC_PREREQ([2.60])dnl
+AC_REQUIRE([AC_PROG_MKDIR_P])dnl
+dnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P,
+dnl while keeping a definition of mkdir_p for backward compatibility.
+dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile.
+dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of
+dnl Makefile.ins that do not define MKDIR_P, so we do our own
+dnl adjustment using top_builddir (which is defined more often than
+dnl MKDIR_P).
+AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl
+case $mkdir_p in
+ [[\\/$]]* | ?:[[\\/]]*) ;;
+ */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
+esac
+])
+
+# Helper functions for option handling. -*- Autoconf -*-
+
+# Copyright (C) 2001, 2002, 2003, 2005, 2008, 2010 Free Software
+# Foundation, Inc.
+#
+# This file 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.
+
+# serial 5
+
+# _AM_MANGLE_OPTION(NAME)
+# -----------------------
+AC_DEFUN([_AM_MANGLE_OPTION],
+[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
+
+# _AM_SET_OPTION(NAME)
+# --------------------
+# Set option NAME. Presently that only means defining a flag for this option.
+AC_DEFUN([_AM_SET_OPTION],
+[m4_define(_AM_MANGLE_OPTION([$1]), 1)])
+
+# _AM_SET_OPTIONS(OPTIONS)
+# ------------------------
+# OPTIONS is a space-separated list of Automake options.
+AC_DEFUN([_AM_SET_OPTIONS],
+[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
+
+# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
+# -------------------------------------------
+# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
+AC_DEFUN([_AM_IF_OPTION],
+[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
+
+# Check to make sure that the build environment is sane. -*- Autoconf -*-
+
+# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008
+# Free Software Foundation, Inc.
+#
+# This file 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.
+
+# serial 5
+
+# AM_SANITY_CHECK
+# ---------------
+AC_DEFUN([AM_SANITY_CHECK],
+[AC_MSG_CHECKING([whether build environment is sane])
+# Just in case
+sleep 1
+echo timestamp > conftest.file
+# Reject unsafe characters in $srcdir or the absolute working directory
+# name. Accept space and tab only in the latter.
+am_lf='
+'
+case `pwd` in
+ *[[\\\"\#\$\&\'\`$am_lf]]*)
+ AC_MSG_ERROR([unsafe absolute working directory name]);;
+esac
+case $srcdir in
+ *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*)
+ AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);;
+esac
+
+# Do `set' in a subshell so we don't clobber the current shell's
+# arguments. Must try -L first in case configure is actually a
+# symlink; some systems play weird games with the mod time of symlinks
+# (eg FreeBSD returns the mod time of the symlink's containing
+# directory).
+if (
+ set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
+ if test "$[*]" = "X"; then
+ # -L didn't work.
+ set X `ls -t "$srcdir/configure" conftest.file`
+ fi
+ rm -f conftest.file
+ if test "$[*]" != "X $srcdir/configure conftest.file" \
+ && test "$[*]" != "X conftest.file $srcdir/configure"; then
+
+ # If neither matched, then we have a broken ls. This can happen
+ # if, for instance, CONFIG_SHELL is bash and it inherits a
+ # broken ls alias from the environment. This has actually
+ # happened. Such a system could not be considered "sane".
+ AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
+alias in your environment])
+ fi
+
+ test "$[2]" = conftest.file
+ )
+then
+ # Ok.
+ :
+else
+ AC_MSG_ERROR([newly created file is older than distributed files!
+Check your system clock])
+fi
+AC_MSG_RESULT(yes)])
+
+# Copyright (C) 2001, 2003, 2005, 2011 Free Software Foundation, Inc.
+#
+# This file 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.
+
+# serial 1
+
+# AM_PROG_INSTALL_STRIP
+# ---------------------
+# One issue with vendor `install' (even GNU) is that you can't
+# specify the program used to strip binaries. This is especially
+# annoying in cross-compiling environments, where the build's strip
+# is unlikely to handle the host's binaries.
+# Fortunately install-sh will honor a STRIPPROG variable, so we
+# always use install-sh in `make install-strip', and initialize
+# STRIPPROG with the value of the STRIP variable (set by the user).
+AC_DEFUN([AM_PROG_INSTALL_STRIP],
+[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
+# Installed binaries are usually stripped using `strip' when the user
+# run `make install-strip'. However `strip' might not be the right
+# tool to use in cross-compilation environments, therefore Automake
+# will honor the `STRIP' environment variable to overrule this program.
+dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
+if test "$cross_compiling" != no; then
+ AC_CHECK_TOOL([STRIP], [strip], :)
+fi
+INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
+AC_SUBST([INSTALL_STRIP_PROGRAM])])
+
+# Copyright (C) 2006, 2008, 2010 Free Software Foundation, Inc.
+#
+# This file 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.
+
+# serial 3
+
+# _AM_SUBST_NOTMAKE(VARIABLE)
+# ---------------------------
+# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
+# This macro is traced by Automake.
+AC_DEFUN([_AM_SUBST_NOTMAKE])
+
+# AM_SUBST_NOTMAKE(VARIABLE)
+# --------------------------
+# Public sister of _AM_SUBST_NOTMAKE.
+AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
+
+# Check how to create a tarball. -*- Autoconf -*-
+
+# Copyright (C) 2004, 2005, 2012 Free Software Foundation, Inc.
+#
+# This file 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.
+
+# serial 2
+
+# _AM_PROG_TAR(FORMAT)
+# --------------------
+# Check how to create a tarball in format FORMAT.
+# FORMAT should be one of `v7', `ustar', or `pax'.
+#
+# Substitute a variable $(am__tar) that is a command
+# writing to stdout a FORMAT-tarball containing the directory
+# $tardir.
+# tardir=directory && $(am__tar) > result.tar
+#
+# Substitute a variable $(am__untar) that extract such
+# a tarball read from stdin.
+# $(am__untar) < result.tar
+AC_DEFUN([_AM_PROG_TAR],
+[# Always define AMTAR for backward compatibility. Yes, it's still used
+# in the wild :-( We should find a proper way to deprecate it ...
+AC_SUBST([AMTAR], ['$${TAR-tar}'])
+m4_if([$1], [v7],
+ [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'],
+ [m4_case([$1], [ustar],, [pax],,
+ [m4_fatal([Unknown tar format])])
+AC_MSG_CHECKING([how to create a $1 tar archive])
+# Loop over all known methods to create a tar archive until one works.
+_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
+_am_tools=${am_cv_prog_tar_$1-$_am_tools}
+# Do not fold the above two line into one, because Tru64 sh and
+# Solaris sh will not grok spaces in the rhs of `-'.
+for _am_tool in $_am_tools
+do
+ case $_am_tool in
+ gnutar)
+ for _am_tar in tar gnutar gtar;
+ do
+ AM_RUN_LOG([$_am_tar --version]) && break
+ done
+ am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
+ am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
+ am__untar="$_am_tar -xf -"
+ ;;
+ plaintar)
+ # Must skip GNU tar: if it does not support --format= it doesn't create
+ # ustar tarball either.
+ (tar --version) >/dev/null 2>&1 && continue
+ am__tar='tar chf - "$$tardir"'
+ am__tar_='tar chf - "$tardir"'
+ am__untar='tar xf -'
+ ;;
+ pax)
+ am__tar='pax -L -x $1 -w "$$tardir"'
+ am__tar_='pax -L -x $1 -w "$tardir"'
+ am__untar='pax -r'
+ ;;
+ cpio)
+ am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
+ am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
+ am__untar='cpio -i -H $1 -d'
+ ;;
+ none)
+ am__tar=false
+ am__tar_=false
+ am__untar=false
+ ;;
+ esac
+
+ # If the value was cached, stop now. We just wanted to have am__tar
+ # and am__untar set.
+ test -n "${am_cv_prog_tar_$1}" && break
+
+ # tar/untar a dummy directory, and stop if the command works
+ rm -rf conftest.dir
+ mkdir conftest.dir
+ echo GrepMe > conftest.dir/file
+ AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
+ rm -rf conftest.dir
+ if test -s conftest.tar; then
+ AM_RUN_LOG([$am__untar <conftest.tar])
+ grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
+ fi
+done
+rm -rf conftest.dir
+
+AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
+AC_MSG_RESULT([$am_cv_prog_tar_$1])])
+AC_SUBST([am__tar])
+AC_SUBST([am__untar])
+]) # _AM_PROG_TAR
+
+m4_include([../../../acinclude.m4])
diff --git a/newlib/libm/machine/nds32/configure b/newlib/libm/machine/nds32/configure
new file mode 100644
index 000000000..2f041827f
--- /dev/null
+++ b/newlib/libm/machine/nds32/configure
@@ -0,0 +1,5845 @@
+#! /bin/sh
+# Guess values for system-dependent variables and create Makefiles.
+# Generated by GNU Autoconf 2.68 for newlib 2.4.0.
+#
+#
+# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
+# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software
+# Foundation, Inc.
+#
+#
+# This configure script is free software; the Free Software Foundation
+# gives unlimited permission to copy, distribute and modify it.
+## -------------------- ##
+## M4sh Initialization. ##
+## -------------------- ##
+
+# Be more Bourne compatible
+DUALCASE=1; export DUALCASE # for MKS sh
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
+ emulate sh
+ NULLCMD=:
+ # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
+ # is contrary to our usage. Disable this feature.
+ alias -g '${1+"$@"}'='"$@"'
+ setopt NO_GLOB_SUBST
+else
+ case `(set -o) 2>/dev/null` in #(
+ *posix*) :
+ set -o posix ;; #(
+ *) :
+ ;;
+esac
+fi
+
+
+as_nl='
+'
+export as_nl
+# Printing a long string crashes Solaris 7 /usr/bin/printf.
+as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
+as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
+as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
+# Prefer a ksh shell builtin over an external printf program on Solaris,
+# but without wasting forks for bash or zsh.
+if test -z "$BASH_VERSION$ZSH_VERSION" \
+ && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
+ as_echo='print -r --'
+ as_echo_n='print -rn --'
+elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
+ as_echo='printf %s\n'
+ as_echo_n='printf %s'
+else
+ if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
+ as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
+ as_echo_n='/usr/ucb/echo -n'
+ else
+ as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
+ as_echo_n_body='eval
+ arg=$1;
+ case $arg in #(
+ *"$as_nl"*)
+ expr "X$arg" : "X\\(.*\\)$as_nl";
+ arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
+ esac;
+ expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
+ '
+ export as_echo_n_body
+ as_echo_n='sh -c $as_echo_n_body as_echo'
+ fi
+ export as_echo_body
+ as_echo='sh -c $as_echo_body as_echo'
+fi
+
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+ PATH_SEPARATOR=:
+ (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
+ (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
+ PATH_SEPARATOR=';'
+ }
+fi
+
+
+# IFS
+# We need space, tab and new line, in precisely that order. Quoting is
+# there to prevent editors from complaining about space-tab.
+# (If _AS_PATH_WALK were called with IFS unset, it would disable word
+# splitting by setting IFS to empty value.)
+IFS=" "" $as_nl"
+
+# Find who we are. Look in the path if we contain no directory separator.
+as_myself=
+case $0 in #((
+ *[\\/]* ) as_myself=$0 ;;
+ *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
+ done
+IFS=$as_save_IFS
+
+ ;;
+esac
+# We did not find ourselves, most probably we were run as `sh COMMAND'
+# in which case we are not to be found in the path.
+if test "x$as_myself" = x; then
+ as_myself=$0
+fi
+if test ! -f "$as_myself"; then
+ $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
+ exit 1
+fi
+
+# Unset variables that we do not need and which cause bugs (e.g. in
+# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
+# suppresses any "Segmentation fault" message there. '((' could
+# trigger a bug in pdksh 5.2.14.
+for as_var in BASH_ENV ENV MAIL MAILPATH
+do eval test x\${$as_var+set} = xset \
+ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
+done
+PS1='$ '
+PS2='> '
+PS4='+ '
+
+# NLS nuisances.
+LC_ALL=C
+export LC_ALL
+LANGUAGE=C
+export LANGUAGE
+
+# CDPATH.
+(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
+
+if test "x$CONFIG_SHELL" = x; then
+ as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
+ emulate sh
+ NULLCMD=:
+ # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
+ # is contrary to our usage. Disable this feature.
+ alias -g '\${1+\"\$@\"}'='\"\$@\"'
+ setopt NO_GLOB_SUBST
+else
+ case \`(set -o) 2>/dev/null\` in #(
+ *posix*) :
+ set -o posix ;; #(
+ *) :
+ ;;
+esac
+fi
+"
+ as_required="as_fn_return () { (exit \$1); }
+as_fn_success () { as_fn_return 0; }
+as_fn_failure () { as_fn_return 1; }
+as_fn_ret_success () { return 0; }
+as_fn_ret_failure () { return 1; }
+
+exitcode=0
+as_fn_success || { exitcode=1; echo as_fn_success failed.; }
+as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
+as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
+as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
+if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
+
+else
+ exitcode=1; echo positional parameters were not saved.
+fi
+test x\$exitcode = x0 || exit 1"
+ as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
+ as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
+ eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
+ test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1"
+ if (eval "$as_required") 2>/dev/null; then :
+ as_have_required=yes
+else
+ as_have_required=no
+fi
+ if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
+
+else
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+as_found=false
+for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ as_found=:
+ case $as_dir in #(
+ /*)
+ for as_base in sh bash ksh sh5; do
+ # Try only shells that exist, to save several forks.
+ as_shell=$as_dir/$as_base
+ if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
+ { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
+ CONFIG_SHELL=$as_shell as_have_required=yes
+ if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
+ break 2
+fi
+fi
+ done;;
+ esac
+ as_found=false
+done
+$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
+ { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
+ CONFIG_SHELL=$SHELL as_have_required=yes
+fi; }
+IFS=$as_save_IFS
+
+
+ if test "x$CONFIG_SHELL" != x; then :
+ # We cannot yet assume a decent shell, so we have to provide a
+ # neutralization value for shells without unset; and this also
+ # works around shells that cannot unset nonexistent variables.
+ # Preserve -v and -x to the replacement shell.
+ BASH_ENV=/dev/null
+ ENV=/dev/null
+ (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
+ export CONFIG_SHELL
+ case $- in # ((((
+ *v*x* | *x*v* ) as_opts=-vx ;;
+ *v* ) as_opts=-v ;;
+ *x* ) as_opts=-x ;;
+ * ) as_opts= ;;
+ esac
+ exec "$CONFIG_SHELL" $as_opts "$as_myself" ${1+"$@"}
+fi
+
+ if test x$as_have_required = xno; then :
+ $as_echo "$0: This script requires a shell more modern than all"
+ $as_echo "$0: the shells that I found on your system."
+ if test x${ZSH_VERSION+set} = xset ; then
+ $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
+ $as_echo "$0: be upgraded to zsh 4.3.4 or later."
+ else
+ $as_echo "$0: Please tell bug-autoconf@gnu.org about your system,
+$0: including any error possibly output before this
+$0: message. Then install a modern shell, or manually run
+$0: the script under such a shell if you do have one."
+ fi
+ exit 1
+fi
+fi
+fi
+SHELL=${CONFIG_SHELL-/bin/sh}
+export SHELL
+# Unset more variables known to interfere with behavior of common tools.
+CLICOLOR_FORCE= GREP_OPTIONS=
+unset CLICOLOR_FORCE GREP_OPTIONS
+
+## --------------------- ##
+## M4sh Shell Functions. ##
+## --------------------- ##
+# as_fn_unset VAR
+# ---------------
+# Portably unset VAR.
+as_fn_unset ()
+{
+ { eval $1=; unset $1;}
+}
+as_unset=as_fn_unset
+
+# as_fn_set_status STATUS
+# -----------------------
+# Set $? to STATUS, without forking.
+as_fn_set_status ()
+{
+ return $1
+} # as_fn_set_status
+
+# as_fn_exit STATUS
+# -----------------
+# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
+as_fn_exit ()
+{
+ set +e
+ as_fn_set_status $1
+ exit $1
+} # as_fn_exit
+
+# as_fn_mkdir_p
+# -------------
+# Create "$as_dir" as a directory, including parents if necessary.
+as_fn_mkdir_p ()
+{
+
+ case $as_dir in #(
+ -*) as_dir=./$as_dir;;
+ esac
+ test -d "$as_dir" || eval $as_mkdir_p || {
+ as_dirs=
+ while :; do
+ case $as_dir in #(
+ *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
+ *) as_qdir=$as_dir;;
+ esac
+ as_dirs="'$as_qdir' $as_dirs"
+ as_dir=`$as_dirname -- "$as_dir" ||
+$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$as_dir" : 'X\(//\)[^/]' \| \
+ X"$as_dir" : 'X\(//\)$' \| \
+ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$as_dir" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)[^/].*/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+ test -d "$as_dir" && break
+ done
+ test -z "$as_dirs" || eval "mkdir $as_dirs"
+ } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
+
+
+} # as_fn_mkdir_p
+# as_fn_append VAR VALUE
+# ----------------------
+# Append the text in VALUE to the end of the definition contained in VAR. Take
+# advantage of any shell optimizations that allow amortized linear growth over
+# repeated appends, instead of the typical quadratic growth present in naive
+# implementations.
+if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
+ eval 'as_fn_append ()
+ {
+ eval $1+=\$2
+ }'
+else
+ as_fn_append ()
+ {
+ eval $1=\$$1\$2
+ }
+fi # as_fn_append
+
+# as_fn_arith ARG...
+# ------------------
+# Perform arithmetic evaluation on the ARGs, and store the result in the
+# global $as_val. Take advantage of shells that can avoid forks. The arguments
+# must be portable across $(()) and expr.
+if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
+ eval 'as_fn_arith ()
+ {
+ as_val=$(( $* ))
+ }'
+else
+ as_fn_arith ()
+ {
+ as_val=`expr "$@" || test $? -eq 1`
+ }
+fi # as_fn_arith
+
+
+# as_fn_error STATUS ERROR [LINENO LOG_FD]
+# ----------------------------------------
+# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
+# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
+# script with STATUS, using 1 if that was 0.
+as_fn_error ()
+{
+ as_status=$1; test $as_status -eq 0 && as_status=1
+ if test "$4"; then
+ as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
+ fi
+ $as_echo "$as_me: error: $2" >&2
+ as_fn_exit $as_status
+} # as_fn_error
+
+if expr a : '\(a\)' >/dev/null 2>&1 &&
+ test "X`expr 00001 : '.*\(...\)'`" = X001; then
+ as_expr=expr
+else
+ as_expr=false
+fi
+
+if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
+ as_basename=basename
+else
+ as_basename=false
+fi
+
+if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
+ as_dirname=dirname
+else
+ as_dirname=false
+fi
+
+as_me=`$as_basename -- "$0" ||
+$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
+ X"$0" : 'X\(//\)$' \| \
+ X"$0" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X/"$0" |
+ sed '/^.*\/\([^/][^/]*\)\/*$/{
+ s//\1/
+ q
+ }
+ /^X\/\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\/\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+
+# Avoid depending upon Character Ranges.
+as_cr_letters='abcdefghijklmnopqrstuvwxyz'
+as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
+as_cr_Letters=$as_cr_letters$as_cr_LETTERS
+as_cr_digits='0123456789'
+as_cr_alnum=$as_cr_Letters$as_cr_digits
+
+
+ as_lineno_1=$LINENO as_lineno_1a=$LINENO
+ as_lineno_2=$LINENO as_lineno_2a=$LINENO
+ eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
+ test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
+ # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-)
+ sed -n '
+ p
+ /[$]LINENO/=
+ ' <$as_myself |
+ sed '
+ s/[$]LINENO.*/&-/
+ t lineno
+ b
+ :lineno
+ N
+ :loop
+ s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
+ t loop
+ s/-\n.*//
+ ' >$as_me.lineno &&
+ chmod +x "$as_me.lineno" ||
+ { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
+
+ # Don't try to exec as it changes $[0], causing all sort of problems
+ # (the dirname of $[0] is not the place where we might find the
+ # original and so on. Autoconf is especially sensitive to this).
+ . "./$as_me.lineno"
+ # Exit status is that of the last command.
+ exit
+}
+
+ECHO_C= ECHO_N= ECHO_T=
+case `echo -n x` in #(((((
+-n*)
+ case `echo 'xy\c'` in
+ *c*) ECHO_T=' ';; # ECHO_T is single tab character.
+ xy) ECHO_C='\c';;
+ *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
+ ECHO_T=' ';;
+ esac;;
+*)
+ ECHO_N='-n';;
+esac
+
+rm -f conf$$ conf$$.exe conf$$.file
+if test -d conf$$.dir; then
+ rm -f conf$$.dir/conf$$.file
+else
+ rm -f conf$$.dir
+ mkdir conf$$.dir 2>/dev/null
+fi
+if (echo >conf$$.file) 2>/dev/null; then
+ if ln -s conf$$.file conf$$ 2>/dev/null; then
+ as_ln_s='ln -s'
+ # ... but there are two gotchas:
+ # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
+ # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
+ # In both cases, we have to default to `cp -p'.
+ ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
+ as_ln_s='cp -p'
+ elif ln conf$$.file conf$$ 2>/dev/null; then
+ as_ln_s=ln
+ else
+ as_ln_s='cp -p'
+ fi
+else
+ as_ln_s='cp -p'
+fi
+rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
+rmdir conf$$.dir 2>/dev/null
+
+if mkdir -p . 2>/dev/null; then
+ as_mkdir_p='mkdir -p "$as_dir"'
+else
+ test -d ./-p && rmdir ./-p
+ as_mkdir_p=false
+fi
+
+if test -x / >/dev/null 2>&1; then
+ as_test_x='test -x'
+else
+ if ls -dL / >/dev/null 2>&1; then
+ as_ls_L_option=L
+ else
+ as_ls_L_option=
+ fi
+ as_test_x='
+ eval sh -c '\''
+ if test -d "$1"; then
+ test -d "$1/.";
+ else
+ case $1 in #(
+ -*)set "./$1";;
+ esac;
+ case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
+ ???[sx]*):;;*)false;;esac;fi
+ '\'' sh
+ '
+fi
+as_executable_p=$as_test_x
+
+# Sed expression to map a string onto a valid CPP name.
+as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
+
+# Sed expression to map a string onto a valid variable name.
+as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
+
+
+test -n "$DJDIR" || exec 7<&0 </dev/null
+exec 6>&1
+
+# Name of the host.
+# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
+# so uname gets run too.
+ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
+
+#
+# Initializations.
+#
+ac_default_prefix=/usr/local
+ac_clean_files=
+ac_config_libobj_dir=.
+LIBOBJS=
+cross_compiling=no
+subdirs=
+MFLAGS=
+MAKEFLAGS=
+
+# Identity of this package.
+PACKAGE_NAME='newlib'
+PACKAGE_TARNAME='newlib'
+PACKAGE_VERSION='2.4.0'
+PACKAGE_STRING='newlib 2.4.0'
+PACKAGE_BUGREPORT=''
+PACKAGE_URL=''
+
+ac_unique_file="Makefile.am"
+ac_no_link=no
+ac_subst_vars='am__EXEEXT_FALSE
+am__EXEEXT_TRUE
+LTLIBOBJS
+LIBOBJS
+HAS_NDS32_FPU_DP_FALSE
+HAS_NDS32_FPU_DP_TRUE
+HAS_NDS32_FPU_SP_FALSE
+HAS_NDS32_FPU_SP_TRUE
+EXEEXT
+ac_ct_CC
+CPPFLAGS
+CFLAGS
+sys_dir
+machine_dir
+libm_machine_dir
+lpfx
+aext
+oext
+OBJEXT
+USE_LIBTOOL_FALSE
+USE_LIBTOOL_TRUE
+ELIX_LEVEL_4_FALSE
+ELIX_LEVEL_4_TRUE
+ELIX_LEVEL_3_FALSE
+ELIX_LEVEL_3_TRUE
+ELIX_LEVEL_2_FALSE
+ELIX_LEVEL_2_TRUE
+ELIX_LEVEL_1_FALSE
+ELIX_LEVEL_1_TRUE
+ELIX_LEVEL_0_FALSE
+ELIX_LEVEL_0_TRUE
+LDFLAGS
+NO_INCLUDE_LIST
+NEWLIB_CFLAGS
+CCASFLAGS
+CCAS
+MAINT
+MAINTAINER_MODE_FALSE
+MAINTAINER_MODE_TRUE
+READELF
+RANLIB
+AR
+AS
+am__fastdepCC_FALSE
+am__fastdepCC_TRUE
+CCDEPMODE
+am__nodep
+AMDEPBACKSLASH
+AMDEP_FALSE
+AMDEP_TRUE
+am__quote
+am__include
+DEPDIR
+CC
+am__untar
+am__tar
+AMTAR
+am__leading_dot
+SET_MAKE
+AWK
+mkdir_p
+MKDIR_P
+INSTALL_STRIP_PROGRAM
+STRIP
+install_sh
+MAKEINFO
+AUTOHEADER
+AUTOMAKE
+AUTOCONF
+ACLOCAL
+VERSION
+PACKAGE
+CYGPATH_W
+am__isrc
+INSTALL_DATA
+INSTALL_SCRIPT
+INSTALL_PROGRAM
+host_os
+host_vendor
+host_cpu
+host
+build_os
+build_vendor
+build_cpu
+build
+newlib_basedir
+MAY_SUPPLY_SYSCALLS_FALSE
+MAY_SUPPLY_SYSCALLS_TRUE
+target_alias
+host_alias
+build_alias
+LIBS
+ECHO_T
+ECHO_N
+ECHO_C
+DEFS
+mandir
+localedir
+libdir
+psdir
+pdfdir
+dvidir
+htmldir
+infodir
+docdir
+oldincludedir
+includedir
+localstatedir
+sharedstatedir
+sysconfdir
+datadir
+datarootdir
+libexecdir
+sbindir
+bindir
+program_transform_name
+prefix
+exec_prefix
+PACKAGE_URL
+PACKAGE_BUGREPORT
+PACKAGE_STRING
+PACKAGE_VERSION
+PACKAGE_TARNAME
+PACKAGE_NAME
+PATH_SEPARATOR
+SHELL'
+ac_subst_files=''
+ac_user_opts='
+enable_option_checking
+enable_multilib
+enable_target_optspace
+enable_malloc_debugging
+enable_newlib_multithread
+enable_newlib_iconv
+enable_newlib_elix_level
+enable_newlib_io_float
+enable_newlib_supplied_syscalls
+enable_dependency_tracking
+enable_maintainer_mode
+'
+ ac_precious_vars='build_alias
+host_alias
+target_alias
+CCAS
+CCASFLAGS
+CC
+CFLAGS
+LDFLAGS
+LIBS
+CPPFLAGS'
+
+
+# Initialize some variables set by options.
+ac_init_help=
+ac_init_version=false
+ac_unrecognized_opts=
+ac_unrecognized_sep=
+# The variables have the same names as the options, with
+# dashes changed to underlines.
+cache_file=/dev/null
+exec_prefix=NONE
+no_create=
+no_recursion=
+prefix=NONE
+program_prefix=NONE
+program_suffix=NONE
+program_transform_name=s,x,x,
+silent=
+site=
+srcdir=
+verbose=
+x_includes=NONE
+x_libraries=NONE
+
+# Installation directory options.
+# These are left unexpanded so users can "make install exec_prefix=/foo"
+# and all the variables that are supposed to be based on exec_prefix
+# by default will actually change.
+# Use braces instead of parens because sh, perl, etc. also accept them.
+# (The list follows the same order as the GNU Coding Standards.)
+bindir='${exec_prefix}/bin'
+sbindir='${exec_prefix}/sbin'
+libexecdir='${exec_prefix}/libexec'
+datarootdir='${prefix}/share'
+datadir='${datarootdir}'
+sysconfdir='${prefix}/etc'
+sharedstatedir='${prefix}/com'
+localstatedir='${prefix}/var'
+includedir='${prefix}/include'
+oldincludedir='/usr/include'
+docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
+infodir='${datarootdir}/info'
+htmldir='${docdir}'
+dvidir='${docdir}'
+pdfdir='${docdir}'
+psdir='${docdir}'
+libdir='${exec_prefix}/lib'
+localedir='${datarootdir}/locale'
+mandir='${datarootdir}/man'
+
+ac_prev=
+ac_dashdash=
+for ac_option
+do
+ # If the previous option needs an argument, assign it.
+ if test -n "$ac_prev"; then
+ eval $ac_prev=\$ac_option
+ ac_prev=
+ continue
+ fi
+
+ case $ac_option in
+ *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
+ *=) ac_optarg= ;;
+ *) ac_optarg=yes ;;
+ esac
+
+ # Accept the important Cygnus configure options, so we can diagnose typos.
+
+ case $ac_dashdash$ac_option in
+ --)
+ ac_dashdash=yes ;;
+
+ -bindir | --bindir | --bindi | --bind | --bin | --bi)
+ ac_prev=bindir ;;
+ -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
+ bindir=$ac_optarg ;;
+
+ -build | --build | --buil | --bui | --bu)
+ ac_prev=build_alias ;;
+ -build=* | --build=* | --buil=* | --bui=* | --bu=*)
+ build_alias=$ac_optarg ;;
+
+ -cache-file | --cache-file | --cache-fil | --cache-fi \
+ | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
+ ac_prev=cache_file ;;
+ -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
+ | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
+ cache_file=$ac_optarg ;;
+
+ --config-cache | -C)
+ cache_file=config.cache ;;
+
+ -datadir | --datadir | --datadi | --datad)
+ ac_prev=datadir ;;
+ -datadir=* | --datadir=* | --datadi=* | --datad=*)
+ datadir=$ac_optarg ;;
+
+ -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
+ | --dataroo | --dataro | --datar)
+ ac_prev=datarootdir ;;
+ -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
+ | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
+ datarootdir=$ac_optarg ;;
+
+ -disable-* | --disable-*)
+ ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
+ # Reject names that are not valid shell variable names.
+ expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
+ as_fn_error $? "invalid feature name: $ac_useropt"
+ ac_useropt_orig=$ac_useropt
+ ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
+ case $ac_user_opts in
+ *"
+"enable_$ac_useropt"
+"*) ;;
+ *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
+ ac_unrecognized_sep=', ';;
+ esac
+ eval enable_$ac_useropt=no ;;
+
+ -docdir | --docdir | --docdi | --doc | --do)
+ ac_prev=docdir ;;
+ -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
+ docdir=$ac_optarg ;;
+
+ -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
+ ac_prev=dvidir ;;
+ -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
+ dvidir=$ac_optarg ;;
+
+ -enable-* | --enable-*)
+ ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
+ # Reject names that are not valid shell variable names.
+ expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
+ as_fn_error $? "invalid feature name: $ac_useropt"
+ ac_useropt_orig=$ac_useropt
+ ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
+ case $ac_user_opts in
+ *"
+"enable_$ac_useropt"
+"*) ;;
+ *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
+ ac_unrecognized_sep=', ';;
+ esac
+ eval enable_$ac_useropt=\$ac_optarg ;;
+
+ -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
+ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
+ | --exec | --exe | --ex)
+ ac_prev=exec_prefix ;;
+ -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
+ | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
+ | --exec=* | --exe=* | --ex=*)
+ exec_prefix=$ac_optarg ;;
+
+ -gas | --gas | --ga | --g)
+ # Obsolete; use --with-gas.
+ with_gas=yes ;;
+
+ -help | --help | --hel | --he | -h)
+ ac_init_help=long ;;
+ -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
+ ac_init_help=recursive ;;
+ -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
+ ac_init_help=short ;;
+
+ -host | --host | --hos | --ho)
+ ac_prev=host_alias ;;
+ -host=* | --host=* | --hos=* | --ho=*)
+ host_alias=$ac_optarg ;;
+
+ -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
+ ac_prev=htmldir ;;
+ -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
+ | --ht=*)
+ htmldir=$ac_optarg ;;
+
+ -includedir | --includedir | --includedi | --included | --include \
+ | --includ | --inclu | --incl | --inc)
+ ac_prev=includedir ;;
+ -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
+ | --includ=* | --inclu=* | --incl=* | --inc=*)
+ includedir=$ac_optarg ;;
+
+ -infodir | --infodir | --infodi | --infod | --info | --inf)
+ ac_prev=infodir ;;
+ -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
+ infodir=$ac_optarg ;;
+
+ -libdir | --libdir | --libdi | --libd)
+ ac_prev=libdir ;;
+ -libdir=* | --libdir=* | --libdi=* | --libd=*)
+ libdir=$ac_optarg ;;
+
+ -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
+ | --libexe | --libex | --libe)
+ ac_prev=libexecdir ;;
+ -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
+ | --libexe=* | --libex=* | --libe=*)
+ libexecdir=$ac_optarg ;;
+
+ -localedir | --localedir | --localedi | --localed | --locale)
+ ac_prev=localedir ;;
+ -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
+ localedir=$ac_optarg ;;
+
+ -localstatedir | --localstatedir | --localstatedi | --localstated \
+ | --localstate | --localstat | --localsta | --localst | --locals)
+ ac_prev=localstatedir ;;
+ -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
+ | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
+ localstatedir=$ac_optarg ;;
+
+ -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
+ ac_prev=mandir ;;
+ -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
+ mandir=$ac_optarg ;;
+
+ -nfp | --nfp | --nf)
+ # Obsolete; use --without-fp.
+ with_fp=no ;;
+
+ -no-create | --no-create | --no-creat | --no-crea | --no-cre \
+ | --no-cr | --no-c | -n)
+ no_create=yes ;;
+
+ -no-recursion | --no-recursion | --no-recursio | --no-recursi \
+ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
+ no_recursion=yes ;;
+
+ -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
+ | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
+ | --oldin | --oldi | --old | --ol | --o)
+ ac_prev=oldincludedir ;;
+ -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
+ | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
+ | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
+ oldincludedir=$ac_optarg ;;
+
+ -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
+ ac_prev=prefix ;;
+ -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
+ prefix=$ac_optarg ;;
+
+ -program-prefix | --program-prefix | --program-prefi | --program-pref \
+ | --program-pre | --program-pr | --program-p)
+ ac_prev=program_prefix ;;
+ -program-prefix=* | --program-prefix=* | --program-prefi=* \
+ | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
+ program_prefix=$ac_optarg ;;
+
+ -program-suffix | --program-suffix | --program-suffi | --program-suff \
+ | --program-suf | --program-su | --program-s)
+ ac_prev=program_suffix ;;
+ -program-suffix=* | --program-suffix=* | --program-suffi=* \
+ | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
+ program_suffix=$ac_optarg ;;
+
+ -program-transform-name | --program-transform-name \
+ | --program-transform-nam | --program-transform-na \
+ | --program-transform-n | --program-transform- \
+ | --program-transform | --program-transfor \
+ | --program-transfo | --program-transf \
+ | --program-trans | --program-tran \
+ | --progr-tra | --program-tr | --program-t)
+ ac_prev=program_transform_name ;;
+ -program-transform-name=* | --program-transform-name=* \
+ | --program-transform-nam=* | --program-transform-na=* \
+ | --program-transform-n=* | --program-transform-=* \
+ | --program-transform=* | --program-transfor=* \
+ | --program-transfo=* | --program-transf=* \
+ | --program-trans=* | --program-tran=* \
+ | --progr-tra=* | --program-tr=* | --program-t=*)
+ program_transform_name=$ac_optarg ;;
+
+ -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
+ ac_prev=pdfdir ;;
+ -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
+ pdfdir=$ac_optarg ;;
+
+ -psdir | --psdir | --psdi | --psd | --ps)
+ ac_prev=psdir ;;
+ -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
+ psdir=$ac_optarg ;;
+
+ -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+ | -silent | --silent | --silen | --sile | --sil)
+ silent=yes ;;
+
+ -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
+ ac_prev=sbindir ;;
+ -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
+ | --sbi=* | --sb=*)
+ sbindir=$ac_optarg ;;
+
+ -sharedstatedir | --sharedstatedir | --sharedstatedi \
+ | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
+ | --sharedst | --shareds | --shared | --share | --shar \
+ | --sha | --sh)
+ ac_prev=sharedstatedir ;;
+ -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
+ | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
+ | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
+ | --sha=* | --sh=*)
+ sharedstatedir=$ac_optarg ;;
+
+ -site | --site | --sit)
+ ac_prev=site ;;
+ -site=* | --site=* | --sit=*)
+ site=$ac_optarg ;;
+
+ -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
+ ac_prev=srcdir ;;
+ -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
+ srcdir=$ac_optarg ;;
+
+ -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
+ | --syscon | --sysco | --sysc | --sys | --sy)
+ ac_prev=sysconfdir ;;
+ -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
+ | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
+ sysconfdir=$ac_optarg ;;
+
+ -target | --target | --targe | --targ | --tar | --ta | --t)
+ ac_prev=target_alias ;;
+ -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
+ target_alias=$ac_optarg ;;
+
+ -v | -verbose | --verbose | --verbos | --verbo | --verb)
+ verbose=yes ;;
+
+ -version | --version | --versio | --versi | --vers | -V)
+ ac_init_version=: ;;
+
+ -with-* | --with-*)
+ ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
+ # Reject names that are not valid shell variable names.
+ expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
+ as_fn_error $? "invalid package name: $ac_useropt"
+ ac_useropt_orig=$ac_useropt
+ ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
+ case $ac_user_opts in
+ *"
+"with_$ac_useropt"
+"*) ;;
+ *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
+ ac_unrecognized_sep=', ';;
+ esac
+ eval with_$ac_useropt=\$ac_optarg ;;
+
+ -without-* | --without-*)
+ ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
+ # Reject names that are not valid shell variable names.
+ expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
+ as_fn_error $? "invalid package name: $ac_useropt"
+ ac_useropt_orig=$ac_useropt
+ ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
+ case $ac_user_opts in
+ *"
+"with_$ac_useropt"
+"*) ;;
+ *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
+ ac_unrecognized_sep=', ';;
+ esac
+ eval with_$ac_useropt=no ;;
+
+ --x)
+ # Obsolete; use --with-x.
+ with_x=yes ;;
+
+ -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
+ | --x-incl | --x-inc | --x-in | --x-i)
+ ac_prev=x_includes ;;
+ -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
+ | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
+ x_includes=$ac_optarg ;;
+
+ -x-libraries | --x-libraries | --x-librarie | --x-librari \
+ | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
+ ac_prev=x_libraries ;;
+ -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
+ | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
+ x_libraries=$ac_optarg ;;
+
+ -*) as_fn_error $? "unrecognized option: \`$ac_option'
+Try \`$0 --help' for more information"
+ ;;
+
+ *=*)
+ ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
+ # Reject names that are not valid shell variable names.
+ case $ac_envvar in #(
+ '' | [0-9]* | *[!_$as_cr_alnum]* )
+ as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
+ esac
+ eval $ac_envvar=\$ac_optarg
+ export $ac_envvar ;;
+
+ *)
+ # FIXME: should be removed in autoconf 3.0.
+ $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
+ expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
+ $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
+ : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
+ ;;
+
+ esac
+done
+
+if test -n "$ac_prev"; then
+ ac_option=--`echo $ac_prev | sed 's/_/-/g'`
+ as_fn_error $? "missing argument to $ac_option"
+fi
+
+if test -n "$ac_unrecognized_opts"; then
+ case $enable_option_checking in
+ no) ;;
+ fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
+ *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
+ esac
+fi
+
+# Check all directory arguments for consistency.
+for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
+ datadir sysconfdir sharedstatedir localstatedir includedir \
+ oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
+ libdir localedir mandir
+do
+ eval ac_val=\$$ac_var
+ # Remove trailing slashes.
+ case $ac_val in
+ */ )
+ ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
+ eval $ac_var=\$ac_val;;
+ esac
+ # Be sure to have absolute directory names.
+ case $ac_val in
+ [\\/$]* | ?:[\\/]* ) continue;;
+ NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
+ esac
+ as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
+done
+
+# There might be people who depend on the old broken behavior: `$host'
+# used to hold the argument of --host etc.
+# FIXME: To remove some day.
+build=$build_alias
+host=$host_alias
+target=$target_alias
+
+# FIXME: To remove some day.
+if test "x$host_alias" != x; then
+ if test "x$build_alias" = x; then
+ cross_compiling=maybe
+ $as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host.
+ If a cross compiler is detected then cross compile mode will be used" >&2
+ elif test "x$build_alias" != "x$host_alias"; then
+ cross_compiling=yes
+ fi
+fi
+
+ac_tool_prefix=
+test -n "$host_alias" && ac_tool_prefix=$host_alias-
+
+test "$silent" = yes && exec 6>/dev/null
+
+
+ac_pwd=`pwd` && test -n "$ac_pwd" &&
+ac_ls_di=`ls -di .` &&
+ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
+ as_fn_error $? "working directory cannot be determined"
+test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
+ as_fn_error $? "pwd does not report name of working directory"
+
+
+# Find the source files, if location was not specified.
+if test -z "$srcdir"; then
+ ac_srcdir_defaulted=yes
+ # Try the directory containing this script, then the parent directory.
+ ac_confdir=`$as_dirname -- "$as_myself" ||
+$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$as_myself" : 'X\(//\)[^/]' \| \
+ X"$as_myself" : 'X\(//\)$' \| \
+ X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$as_myself" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)[^/].*/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+ srcdir=$ac_confdir
+ if test ! -r "$srcdir/$ac_unique_file"; then
+ srcdir=..
+ fi
+else
+ ac_srcdir_defaulted=no
+fi
+if test ! -r "$srcdir/$ac_unique_file"; then
+ test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
+ as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
+fi
+ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
+ac_abs_confdir=`(
+ cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
+ pwd)`
+# When building in place, set srcdir=.
+if test "$ac_abs_confdir" = "$ac_pwd"; then
+ srcdir=.
+fi
+# Remove unnecessary trailing slashes from srcdir.
+# Double slashes in file names in object file debugging info
+# mess up M-x gdb in Emacs.
+case $srcdir in
+*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
+esac
+for ac_var in $ac_precious_vars; do
+ eval ac_env_${ac_var}_set=\${${ac_var}+set}
+ eval ac_env_${ac_var}_value=\$${ac_var}
+ eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
+ eval ac_cv_env_${ac_var}_value=\$${ac_var}
+done
+
+#
+# Report the --help message.
+#
+if test "$ac_init_help" = "long"; then
+ # Omit some internal or obsolete options to make the list less imposing.
+ # This message is too long to be a string in the A/UX 3.1 sh.
+ cat <<_ACEOF
+\`configure' configures newlib 2.4.0 to adapt to many kinds of systems.
+
+Usage: $0 [OPTION]... [VAR=VALUE]...
+
+To assign environment variables (e.g., CC, CFLAGS...), specify them as
+VAR=VALUE. See below for descriptions of some of the useful variables.
+
+Defaults for the options are specified in brackets.
+
+Configuration:
+ -h, --help display this help and exit
+ --help=short display options specific to this package
+ --help=recursive display the short help of all the included packages
+ -V, --version display version information and exit
+ -q, --quiet, --silent do not print \`checking ...' messages
+ --cache-file=FILE cache test results in FILE [disabled]
+ -C, --config-cache alias for \`--cache-file=config.cache'
+ -n, --no-create do not create output files
+ --srcdir=DIR find the sources in DIR [configure dir or \`..']
+
+Installation directories:
+ --prefix=PREFIX install architecture-independent files in PREFIX
+ [$ac_default_prefix]
+ --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
+ [PREFIX]
+
+By default, \`make install' will install all the files in
+\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
+an installation prefix other than \`$ac_default_prefix' using \`--prefix',
+for instance \`--prefix=\$HOME'.
+
+For better control, use the options below.
+
+Fine tuning of the installation directories:
+ --bindir=DIR user executables [EPREFIX/bin]
+ --sbindir=DIR system admin executables [EPREFIX/sbin]
+ --libexecdir=DIR program executables [EPREFIX/libexec]
+ --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
+ --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
+ --localstatedir=DIR modifiable single-machine data [PREFIX/var]
+ --libdir=DIR object code libraries [EPREFIX/lib]
+ --includedir=DIR C header files [PREFIX/include]
+ --oldincludedir=DIR C header files for non-gcc [/usr/include]
+ --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
+ --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
+ --infodir=DIR info documentation [DATAROOTDIR/info]
+ --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
+ --mandir=DIR man documentation [DATAROOTDIR/man]
+ --docdir=DIR documentation root [DATAROOTDIR/doc/newlib]
+ --htmldir=DIR html documentation [DOCDIR]
+ --dvidir=DIR dvi documentation [DOCDIR]
+ --pdfdir=DIR pdf documentation [DOCDIR]
+ --psdir=DIR ps documentation [DOCDIR]
+_ACEOF
+
+ cat <<\_ACEOF
+
+Program names:
+ --program-prefix=PREFIX prepend PREFIX to installed program names
+ --program-suffix=SUFFIX append SUFFIX to installed program names
+ --program-transform-name=PROGRAM run sed PROGRAM on installed program names
+
+System types:
+ --build=BUILD configure for building on BUILD [guessed]
+ --host=HOST cross-compile to build programs to run on HOST [BUILD]
+_ACEOF
+fi
+
+if test -n "$ac_init_help"; then
+ case $ac_init_help in
+ short | recursive ) echo "Configuration of newlib 2.4.0:";;
+ esac
+ cat <<\_ACEOF
+
+Optional Features:
+ --disable-option-checking ignore unrecognized --enable/--with options
+ --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
+ --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
+ --enable-multilib build many library versions (default)
+ --enable-target-optspace optimize for space
+ --enable-malloc-debugging indicate malloc debugging requested
+ --enable-newlib-multithread enable support for multiple threads
+ --enable-newlib-iconv enable iconv library support
+ --enable-newlib-elix-level supply desired elix library level (1-4)
+ --disable-newlib-io-float disable printf/scanf family float support
+ --disable-newlib-supplied-syscalls disable newlib from supplying syscalls
+ --disable-dependency-tracking speeds up one-time build
+ --enable-dependency-tracking do not reject slow dependency extractors
+ --enable-maintainer-mode enable make rules and dependencies not useful
+ (and sometimes confusing) to the casual installer
+
+Some influential environment variables:
+ CCAS assembler compiler command (defaults to CC)
+ CCASFLAGS assembler compiler flags (defaults to CFLAGS)
+ CC C compiler command
+ CFLAGS C compiler flags
+ LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
+ nonstandard directory <lib dir>
+ LIBS libraries to pass to the linker, e.g. -l<library>
+ CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
+ you have headers in a nonstandard directory <include dir>
+
+Use these variables to override the choices made by `configure' or to help
+it to find libraries and programs with nonstandard names/locations.
+
+Report bugs to the package provider.
+_ACEOF
+ac_status=$?
+fi
+
+if test "$ac_init_help" = "recursive"; then
+ # If there are subdirs, report their specific --help.
+ for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
+ test -d "$ac_dir" ||
+ { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
+ continue
+ ac_builddir=.
+
+case "$ac_dir" in
+.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
+*)
+ ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
+ # A ".." for each directory in $ac_dir_suffix.
+ ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
+ case $ac_top_builddir_sub in
+ "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
+ *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
+ esac ;;
+esac
+ac_abs_top_builddir=$ac_pwd
+ac_abs_builddir=$ac_pwd$ac_dir_suffix
+# for backward compatibility:
+ac_top_builddir=$ac_top_build_prefix
+
+case $srcdir in
+ .) # We are building in place.
+ ac_srcdir=.
+ ac_top_srcdir=$ac_top_builddir_sub
+ ac_abs_top_srcdir=$ac_pwd ;;
+ [\\/]* | ?:[\\/]* ) # Absolute name.
+ ac_srcdir=$srcdir$ac_dir_suffix;
+ ac_top_srcdir=$srcdir
+ ac_abs_top_srcdir=$srcdir ;;
+ *) # Relative name.
+ ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
+ ac_top_srcdir=$ac_top_build_prefix$srcdir
+ ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
+esac
+ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
+
+ cd "$ac_dir" || { ac_status=$?; continue; }
+ # Check for guested configure.
+ if test -f "$ac_srcdir/configure.gnu"; then
+ echo &&
+ $SHELL "$ac_srcdir/configure.gnu" --help=recursive
+ elif test -f "$ac_srcdir/configure"; then
+ echo &&
+ $SHELL "$ac_srcdir/configure" --help=recursive
+ else
+ $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
+ fi || ac_status=$?
+ cd "$ac_pwd" || { ac_status=$?; break; }
+ done
+fi
+
+test -n "$ac_init_help" && exit $ac_status
+if $ac_init_version; then
+ cat <<\_ACEOF
+newlib configure 2.4.0
+generated by GNU Autoconf 2.68
+
+Copyright (C) 2010 Free Software Foundation, Inc.
+This configure script is free software; the Free Software Foundation
+gives unlimited permission to copy, distribute and modify it.
+_ACEOF
+ exit
+fi
+
+## ------------------------ ##
+## Autoconf initialization. ##
+## ------------------------ ##
+
+# ac_fn_c_try_compile LINENO
+# --------------------------
+# Try to compile conftest.$ac_ext, and return whether this succeeded.
+ac_fn_c_try_compile ()
+{
+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ rm -f conftest.$ac_objext
+ if { { ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_compile") 2>conftest.err
+ ac_status=$?
+ if test -s conftest.err; then
+ grep -v '^ *+' conftest.err >conftest.er1
+ cat conftest.er1 >&5
+ mv -f conftest.er1 conftest.err
+ fi
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then :
+ ac_retval=0
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_retval=1
+fi
+ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+ as_fn_set_status $ac_retval
+
+} # ac_fn_c_try_compile
+cat >config.log <<_ACEOF
+This file contains any messages produced by compilers while
+running configure, to aid debugging if configure makes a mistake.
+
+It was created by newlib $as_me 2.4.0, which was
+generated by GNU Autoconf 2.68. Invocation command line was
+
+ $ $0 $@
+
+_ACEOF
+exec 5>>config.log
+{
+cat <<_ASUNAME
+## --------- ##
+## Platform. ##
+## --------- ##
+
+hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
+uname -m = `(uname -m) 2>/dev/null || echo unknown`
+uname -r = `(uname -r) 2>/dev/null || echo unknown`
+uname -s = `(uname -s) 2>/dev/null || echo unknown`
+uname -v = `(uname -v) 2>/dev/null || echo unknown`
+
+/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
+/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
+
+/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
+/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
+/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
+/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
+/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
+/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
+/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
+
+_ASUNAME
+
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ $as_echo "PATH: $as_dir"
+ done
+IFS=$as_save_IFS
+
+} >&5
+
+cat >&5 <<_ACEOF
+
+
+## ----------- ##
+## Core tests. ##
+## ----------- ##
+
+_ACEOF
+
+
+# Keep a trace of the command line.
+# Strip out --no-create and --no-recursion so they do not pile up.
+# Strip out --silent because we don't want to record it for future runs.
+# Also quote any args containing shell meta-characters.
+# Make two passes to allow for proper duplicate-argument suppression.
+ac_configure_args=
+ac_configure_args0=
+ac_configure_args1=
+ac_must_keep_next=false
+for ac_pass in 1 2
+do
+ for ac_arg
+ do
+ case $ac_arg in
+ -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
+ -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+ | -silent | --silent | --silen | --sile | --sil)
+ continue ;;
+ *\'*)
+ ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
+ esac
+ case $ac_pass in
+ 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
+ 2)
+ as_fn_append ac_configure_args1 " '$ac_arg'"
+ if test $ac_must_keep_next = true; then
+ ac_must_keep_next=false # Got value, back to normal.
+ else
+ case $ac_arg in
+ *=* | --config-cache | -C | -disable-* | --disable-* \
+ | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
+ | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
+ | -with-* | --with-* | -without-* | --without-* | --x)
+ case "$ac_configure_args0 " in
+ "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
+ esac
+ ;;
+ -* ) ac_must_keep_next=true ;;
+ esac
+ fi
+ as_fn_append ac_configure_args " '$ac_arg'"
+ ;;
+ esac
+ done
+done
+{ ac_configure_args0=; unset ac_configure_args0;}
+{ ac_configure_args1=; unset ac_configure_args1;}
+
+# When interrupted or exit'd, cleanup temporary files, and complete
+# config.log. We remove comments because anyway the quotes in there
+# would cause problems or look ugly.
+# WARNING: Use '\'' to represent an apostrophe within the trap.
+# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
+trap 'exit_status=$?
+ # Save into config.log some information that might help in debugging.
+ {
+ echo
+
+ $as_echo "## ---------------- ##
+## Cache variables. ##
+## ---------------- ##"
+ echo
+ # The following way of writing the cache mishandles newlines in values,
+(
+ for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
+ eval ac_val=\$$ac_var
+ case $ac_val in #(
+ *${as_nl}*)
+ case $ac_var in #(
+ *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
+$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
+ esac
+ case $ac_var in #(
+ _ | IFS | as_nl) ;; #(
+ BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
+ *) { eval $ac_var=; unset $ac_var;} ;;
+ esac ;;
+ esac
+ done
+ (set) 2>&1 |
+ case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
+ *${as_nl}ac_space=\ *)
+ sed -n \
+ "s/'\''/'\''\\\\'\'''\''/g;
+ s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
+ ;; #(
+ *)
+ sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
+ ;;
+ esac |
+ sort
+)
+ echo
+
+ $as_echo "## ----------------- ##
+## Output variables. ##
+## ----------------- ##"
+ echo
+ for ac_var in $ac_subst_vars
+ do
+ eval ac_val=\$$ac_var
+ case $ac_val in
+ *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
+ esac
+ $as_echo "$ac_var='\''$ac_val'\''"
+ done | sort
+ echo
+
+ if test -n "$ac_subst_files"; then
+ $as_echo "## ------------------- ##
+## File substitutions. ##
+## ------------------- ##"
+ echo
+ for ac_var in $ac_subst_files
+ do
+ eval ac_val=\$$ac_var
+ case $ac_val in
+ *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
+ esac
+ $as_echo "$ac_var='\''$ac_val'\''"
+ done | sort
+ echo
+ fi
+
+ if test -s confdefs.h; then
+ $as_echo "## ----------- ##
+## confdefs.h. ##
+## ----------- ##"
+ echo
+ cat confdefs.h
+ echo
+ fi
+ test "$ac_signal" != 0 &&
+ $as_echo "$as_me: caught signal $ac_signal"
+ $as_echo "$as_me: exit $exit_status"
+ } >&5
+ rm -f core *.core core.conftest.* &&
+ rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
+ exit $exit_status
+' 0
+for ac_signal in 1 2 13 15; do
+ trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
+done
+ac_signal=0
+
+# confdefs.h avoids OS command line length limits that DEFS can exceed.
+rm -f -r conftest* confdefs.h
+
+$as_echo "/* confdefs.h */" > confdefs.h
+
+# Predefined preprocessor variables.
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_NAME "$PACKAGE_NAME"
+_ACEOF
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
+_ACEOF
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_VERSION "$PACKAGE_VERSION"
+_ACEOF
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_STRING "$PACKAGE_STRING"
+_ACEOF
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
+_ACEOF
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_URL "$PACKAGE_URL"
+_ACEOF
+
+
+# Let the site file select an alternate cache file if it wants to.
+# Prefer an explicitly selected file to automatically selected ones.
+ac_site_file1=NONE
+ac_site_file2=NONE
+if test -n "$CONFIG_SITE"; then
+ # We do not want a PATH search for config.site.
+ case $CONFIG_SITE in #((
+ -*) ac_site_file1=./$CONFIG_SITE;;
+ */*) ac_site_file1=$CONFIG_SITE;;
+ *) ac_site_file1=./$CONFIG_SITE;;
+ esac
+elif test "x$prefix" != xNONE; then
+ ac_site_file1=$prefix/share/config.site
+ ac_site_file2=$prefix/etc/config.site
+else
+ ac_site_file1=$ac_default_prefix/share/config.site
+ ac_site_file2=$ac_default_prefix/etc/config.site
+fi
+for ac_site_file in "$ac_site_file1" "$ac_site_file2"
+do
+ test "x$ac_site_file" = xNONE && continue
+ if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
+$as_echo "$as_me: loading site script $ac_site_file" >&6;}
+ sed 's/^/| /' "$ac_site_file" >&5
+ . "$ac_site_file" \
+ || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "failed to load site script $ac_site_file
+See \`config.log' for more details" "$LINENO" 5; }
+ fi
+done
+
+if test -r "$cache_file"; then
+ # Some versions of bash will fail to source /dev/null (special files
+ # actually), so we avoid doing that. DJGPP emulates it as a regular file.
+ if test /dev/null != "$cache_file" && test -f "$cache_file"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
+$as_echo "$as_me: loading cache $cache_file" >&6;}
+ case $cache_file in
+ [\\/]* | ?:[\\/]* ) . "$cache_file";;
+ *) . "./$cache_file";;
+ esac
+ fi
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
+$as_echo "$as_me: creating cache $cache_file" >&6;}
+ >$cache_file
+fi
+
+# Check that the precious variables saved in the cache have kept the same
+# value.
+ac_cache_corrupted=false
+for ac_var in $ac_precious_vars; do
+ eval ac_old_set=\$ac_cv_env_${ac_var}_set
+ eval ac_new_set=\$ac_env_${ac_var}_set
+ eval ac_old_val=\$ac_cv_env_${ac_var}_value
+ eval ac_new_val=\$ac_env_${ac_var}_value
+ case $ac_old_set,$ac_new_set in
+ set,)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
+$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
+ ac_cache_corrupted=: ;;
+ ,set)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
+$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
+ ac_cache_corrupted=: ;;
+ ,);;
+ *)
+ if test "x$ac_old_val" != "x$ac_new_val"; then
+ # differences in whitespace do not lead to failure.
+ ac_old_val_w=`echo x $ac_old_val`
+ ac_new_val_w=`echo x $ac_new_val`
+ if test "$ac_old_val_w" != "$ac_new_val_w"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
+$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
+ ac_cache_corrupted=:
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
+$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
+ eval $ac_var=\$ac_old_val
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
+$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
+$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
+ fi;;
+ esac
+ # Pass precious variables to config.status.
+ if test "$ac_new_set" = set; then
+ case $ac_new_val in
+ *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
+ *) ac_arg=$ac_var=$ac_new_val ;;
+ esac
+ case " $ac_configure_args " in
+ *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
+ *) as_fn_append ac_configure_args " '$ac_arg'" ;;
+ esac
+ fi
+done
+if $ac_cache_corrupted; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
+$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
+ as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
+fi
+## -------------------- ##
+## Main body of script. ##
+## -------------------- ##
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+
+
+ac_aux_dir=
+for ac_dir in ../../../.. "$srcdir"/../../../..; do
+ if test -f "$ac_dir/install-sh"; then
+ ac_aux_dir=$ac_dir
+ ac_install_sh="$ac_aux_dir/install-sh -c"
+ break
+ elif test -f "$ac_dir/install.sh"; then
+ ac_aux_dir=$ac_dir
+ ac_install_sh="$ac_aux_dir/install.sh -c"
+ break
+ elif test -f "$ac_dir/shtool"; then
+ ac_aux_dir=$ac_dir
+ ac_install_sh="$ac_aux_dir/shtool install -c"
+ break
+ fi
+done
+if test -z "$ac_aux_dir"; then
+ as_fn_error $? "cannot find install-sh, install.sh, or shtool in ../../../.. \"$srcdir\"/../../../.." "$LINENO" 5
+fi
+
+# These three variables are undocumented and unsupported,
+# and are intended to be withdrawn in a future Autoconf release.
+# They can cause serious problems if a builder's source tree is in a directory
+# whose full name contains unusual characters.
+ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
+ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
+ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
+
+
+
+
+# Make sure we can run config.sub.
+$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
+ as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
+$as_echo_n "checking build system type... " >&6; }
+if ${ac_cv_build+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_build_alias=$build_alias
+test "x$ac_build_alias" = x &&
+ ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
+test "x$ac_build_alias" = x &&
+ as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
+ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
+ as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
+$as_echo "$ac_cv_build" >&6; }
+case $ac_cv_build in
+*-*-*) ;;
+*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
+esac
+build=$ac_cv_build
+ac_save_IFS=$IFS; IFS='-'
+set x $ac_cv_build
+shift
+build_cpu=$1
+build_vendor=$2
+shift; shift
+# Remember, the first character of IFS is used to create $*,
+# except with old shells:
+build_os=$*
+IFS=$ac_save_IFS
+case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
+$as_echo_n "checking host system type... " >&6; }
+if ${ac_cv_host+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test "x$host_alias" = x; then
+ ac_cv_host=$ac_cv_build
+else
+ ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
+ as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
+$as_echo "$ac_cv_host" >&6; }
+case $ac_cv_host in
+*-*-*) ;;
+*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
+esac
+host=$ac_cv_host
+ac_save_IFS=$IFS; IFS='-'
+set x $ac_cv_host
+shift
+host_cpu=$1
+host_vendor=$2
+shift; shift
+# Remember, the first character of IFS is used to create $*,
+# except with old shells:
+host_os=$*
+IFS=$ac_save_IFS
+case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
+
+
+am__api_version='1.11'
+
+# Find a good install program. We prefer a C program (faster),
+# so one script is as good as another. But avoid the broken or
+# incompatible versions:
+# SysV /etc/install, /usr/sbin/install
+# SunOS /usr/etc/install
+# IRIX /sbin/install
+# AIX /bin/install
+# AmigaOS /C/install, which installs bootblocks on floppy discs
+# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
+# AFS /usr/afsws/bin/install, which mishandles nonexistent args
+# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
+# OS/2's system install, which has a completely different semantic
+# ./install, which can be erroneously created by make from ./install.sh.
+# Reject install programs that cannot install multiple files.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
+$as_echo_n "checking for a BSD-compatible install... " >&6; }
+if test -z "$INSTALL"; then
+if ${ac_cv_path_install+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ # Account for people who put trailing slashes in PATH elements.
+case $as_dir/ in #((
+ ./ | .// | /[cC]/* | \
+ /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
+ ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
+ /usr/ucb/* ) ;;
+ *)
+ # OSF1 and SCO ODT 3.0 have their own names for install.
+ # Don't use installbsd from OSF since it installs stuff as root
+ # by default.
+ for ac_prog in ginstall scoinst install; do
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
+ if test $ac_prog = install &&
+ grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
+ # AIX install. It has an incompatible calling convention.
+ :
+ elif test $ac_prog = install &&
+ grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
+ # program-specific install script used by HP pwplus--don't use.
+ :
+ else
+ rm -rf conftest.one conftest.two conftest.dir
+ echo one > conftest.one
+ echo two > conftest.two
+ mkdir conftest.dir
+ if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
+ test -s conftest.one && test -s conftest.two &&
+ test -s conftest.dir/conftest.one &&
+ test -s conftest.dir/conftest.two
+ then
+ ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
+ break 3
+ fi
+ fi
+ fi
+ done
+ done
+ ;;
+esac
+
+ done
+IFS=$as_save_IFS
+
+rm -rf conftest.one conftest.two conftest.dir
+
+fi
+ if test "${ac_cv_path_install+set}" = set; then
+ INSTALL=$ac_cv_path_install
+ else
+ # As a last resort, use the slow shell script. Don't cache a
+ # value for INSTALL within a source directory, because that will
+ # break other packages using the cache if that directory is
+ # removed, or if the value is a relative name.
+ INSTALL=$ac_install_sh
+ fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
+$as_echo "$INSTALL" >&6; }
+
+# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
+# It thinks the first close brace ends the variable substitution.
+test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
+
+test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
+
+test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5
+$as_echo_n "checking whether build environment is sane... " >&6; }
+# Just in case
+sleep 1
+echo timestamp > conftest.file
+# Reject unsafe characters in $srcdir or the absolute working directory
+# name. Accept space and tab only in the latter.
+am_lf='
+'
+case `pwd` in
+ *[\\\"\#\$\&\'\`$am_lf]*)
+ as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5;;
+esac
+case $srcdir in
+ *[\\\"\#\$\&\'\`$am_lf\ \ ]*)
+ as_fn_error $? "unsafe srcdir value: \`$srcdir'" "$LINENO" 5;;
+esac
+
+# Do `set' in a subshell so we don't clobber the current shell's
+# arguments. Must try -L first in case configure is actually a
+# symlink; some systems play weird games with the mod time of symlinks
+# (eg FreeBSD returns the mod time of the symlink's containing
+# directory).
+if (
+ set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
+ if test "$*" = "X"; then
+ # -L didn't work.
+ set X `ls -t "$srcdir/configure" conftest.file`
+ fi
+ rm -f conftest.file
+ if test "$*" != "X $srcdir/configure conftest.file" \
+ && test "$*" != "X conftest.file $srcdir/configure"; then
+
+ # If neither matched, then we have a broken ls. This can happen
+ # if, for instance, CONFIG_SHELL is bash and it inherits a
+ # broken ls alias from the environment. This has actually
+ # happened. Such a system could not be considered "sane".
+ as_fn_error $? "ls -t appears to fail. Make sure there is not a broken
+alias in your environment" "$LINENO" 5
+ fi
+
+ test "$2" = conftest.file
+ )
+then
+ # Ok.
+ :
+else
+ as_fn_error $? "newly created file is older than distributed files!
+Check your system clock" "$LINENO" 5
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+test "$program_prefix" != NONE &&
+ program_transform_name="s&^&$program_prefix&;$program_transform_name"
+# Use a double $ so make ignores it.
+test "$program_suffix" != NONE &&
+ program_transform_name="s&\$&$program_suffix&;$program_transform_name"
+# Double any \ or $.
+# By default was `s,x,x', remove it if useless.
+ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
+program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"`
+
+# expand $ac_aux_dir to an absolute path
+am_aux_dir=`cd $ac_aux_dir && pwd`
+
+if test x"${MISSING+set}" != xset; then
+ case $am_aux_dir in
+ *\ * | *\ *)
+ MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
+ *)
+ MISSING="\${SHELL} $am_aux_dir/missing" ;;
+ esac
+fi
+# Use eval to expand $SHELL
+if eval "$MISSING --run true"; then
+ am_missing_run="$MISSING --run "
+else
+ am_missing_run=
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`missing' script is too old or missing" >&5
+$as_echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;}
+fi
+
+if test x"${install_sh}" != xset; then
+ case $am_aux_dir in
+ *\ * | *\ *)
+ install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
+ *)
+ install_sh="\${SHELL} $am_aux_dir/install-sh"
+ esac
+fi
+
+# Installed binaries are usually stripped using `strip' when the user
+# run `make install-strip'. However `strip' might not be the right
+# tool to use in cross-compilation environments, therefore Automake
+# will honor the `STRIP' environment variable to overrule this program.
+if test "$cross_compiling" != no; then
+ if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
+set dummy ${ac_tool_prefix}strip; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_STRIP+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$STRIP"; then
+ ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_STRIP="${ac_tool_prefix}strip"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+STRIP=$ac_cv_prog_STRIP
+if test -n "$STRIP"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
+$as_echo "$STRIP" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_STRIP"; then
+ ac_ct_STRIP=$STRIP
+ # Extract the first word of "strip", so it can be a program name with args.
+set dummy strip; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_ct_STRIP"; then
+ ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_ac_ct_STRIP="strip"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
+if test -n "$ac_ct_STRIP"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
+$as_echo "$ac_ct_STRIP" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+ if test "x$ac_ct_STRIP" = x; then
+ STRIP=":"
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ STRIP=$ac_ct_STRIP
+ fi
+else
+ STRIP="$ac_cv_prog_STRIP"
+fi
+
+fi
+INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
+$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
+if test -z "$MKDIR_P"; then
+ if ${ac_cv_path_mkdir+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_prog in mkdir gmkdir; do
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; } || continue
+ case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
+ 'mkdir (GNU coreutils) '* | \
+ 'mkdir (coreutils) '* | \
+ 'mkdir (fileutils) '4.1*)
+ ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
+ break 3;;
+ esac
+ done
+ done
+ done
+IFS=$as_save_IFS
+
+fi
+
+ test -d ./--version && rmdir ./--version
+ if test "${ac_cv_path_mkdir+set}" = set; then
+ MKDIR_P="$ac_cv_path_mkdir -p"
+ else
+ # As a last resort, use the slow shell script. Don't cache a
+ # value for MKDIR_P within a source directory, because that will
+ # break other packages using the cache if that directory is
+ # removed, or if the value is a relative name.
+ MKDIR_P="$ac_install_sh -d"
+ fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
+$as_echo "$MKDIR_P" >&6; }
+
+mkdir_p="$MKDIR_P"
+case $mkdir_p in
+ [\\/$]* | ?:[\\/]*) ;;
+ */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
+esac
+
+for ac_prog in gawk mawk nawk awk
+do
+ # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_AWK+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$AWK"; then
+ ac_cv_prog_AWK="$AWK" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_AWK="$ac_prog"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+AWK=$ac_cv_prog_AWK
+if test -n "$AWK"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
+$as_echo "$AWK" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+ test -n "$AWK" && break
+done
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
+$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
+set x ${MAKE-make}
+ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
+if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat >conftest.make <<\_ACEOF
+SHELL = /bin/sh
+all:
+ @echo '@@@%%%=$(MAKE)=@@@%%%'
+_ACEOF
+# GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
+case `${MAKE-make} -f conftest.make 2>/dev/null` in
+ *@@@%%%=?*=@@@%%%*)
+ eval ac_cv_prog_make_${ac_make}_set=yes;;
+ *)
+ eval ac_cv_prog_make_${ac_make}_set=no;;
+esac
+rm -f conftest.make
+fi
+if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+ SET_MAKE=
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+ SET_MAKE="MAKE=${MAKE-make}"
+fi
+
+rm -rf .tst 2>/dev/null
+mkdir .tst 2>/dev/null
+if test -d .tst; then
+ am__leading_dot=.
+else
+ am__leading_dot=_
+fi
+rmdir .tst 2>/dev/null
+
+DEPDIR="${am__leading_dot}deps"
+
+ac_config_commands="$ac_config_commands depfiles"
+
+
+am_make=${MAKE-make}
+cat > confinc << 'END'
+am__doit:
+ @echo this is the am__doit target
+.PHONY: am__doit
+END
+# If we don't find an include directive, just comment out the code.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5
+$as_echo_n "checking for style of include used by $am_make... " >&6; }
+am__include="#"
+am__quote=
+_am_result=none
+# First try GNU make style include.
+echo "include confinc" > confmf
+# Ignore all kinds of additional output from `make'.
+case `$am_make -s -f confmf 2> /dev/null` in #(
+*the\ am__doit\ target*)
+ am__include=include
+ am__quote=
+ _am_result=GNU
+ ;;
+esac
+# Now try BSD make style include.
+if test "$am__include" = "#"; then
+ echo '.include "confinc"' > confmf
+ case `$am_make -s -f confmf 2> /dev/null` in #(
+ *the\ am__doit\ target*)
+ am__include=.include
+ am__quote="\""
+ _am_result=BSD
+ ;;
+ esac
+fi
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5
+$as_echo "$_am_result" >&6; }
+rm -f confinc confmf
+
+# Check whether --enable-dependency-tracking was given.
+if test "${enable_dependency_tracking+set}" = set; then :
+ enableval=$enable_dependency_tracking;
+fi
+
+if test "x$enable_dependency_tracking" != xno; then
+ am_depcomp="$ac_aux_dir/depcomp"
+ AMDEPBACKSLASH='\'
+ am__nodep='_no'
+fi
+ if test "x$enable_dependency_tracking" != xno; then
+ AMDEP_TRUE=
+ AMDEP_FALSE='#'
+else
+ AMDEP_TRUE='#'
+ AMDEP_FALSE=
+fi
+
+
+
+# Check whether --enable-multilib was given.
+if test "${enable_multilib+set}" = set; then :
+ enableval=$enable_multilib; case "${enableval}" in
+ yes) multilib=yes ;;
+ no) multilib=no ;;
+ *) as_fn_error $? "bad value ${enableval} for multilib option" "$LINENO" 5 ;;
+ esac
+else
+ multilib=yes
+fi
+
+# Check whether --enable-target-optspace was given.
+if test "${enable_target_optspace+set}" = set; then :
+ enableval=$enable_target_optspace; case "${enableval}" in
+ yes) target_optspace=yes ;;
+ no) target_optspace=no ;;
+ *) as_fn_error $? "bad value ${enableval} for target-optspace option" "$LINENO" 5 ;;
+ esac
+else
+ target_optspace=
+fi
+
+# Check whether --enable-malloc-debugging was given.
+if test "${enable_malloc_debugging+set}" = set; then :
+ enableval=$enable_malloc_debugging; case "${enableval}" in
+ yes) malloc_debugging=yes ;;
+ no) malloc_debugging=no ;;
+ *) as_fn_error $? "bad value ${enableval} for malloc-debugging option" "$LINENO" 5 ;;
+ esac
+else
+ malloc_debugging=
+fi
+
+# Check whether --enable-newlib-multithread was given.
+if test "${enable_newlib_multithread+set}" = set; then :
+ enableval=$enable_newlib_multithread; case "${enableval}" in
+ yes) newlib_multithread=yes ;;
+ no) newlib_multithread=no ;;
+ *) as_fn_error $? "bad value ${enableval} for newlib-multithread option" "$LINENO" 5 ;;
+ esac
+else
+ newlib_multithread=yes
+fi
+
+# Check whether --enable-newlib-iconv was given.
+if test "${enable_newlib_iconv+set}" = set; then :
+ enableval=$enable_newlib_iconv; if test "${newlib_iconv+set}" != set; then
+ case "${enableval}" in
+ yes) newlib_iconv=yes ;;
+ no) newlib_iconv=no ;;
+ *) as_fn_error $? "bad value ${enableval} for newlib-iconv option" "$LINENO" 5 ;;
+ esac
+ fi
+else
+ newlib_iconv=${newlib_iconv}
+fi
+
+# Check whether --enable-newlib-elix-level was given.
+if test "${enable_newlib_elix_level+set}" = set; then :
+ enableval=$enable_newlib_elix_level; case "${enableval}" in
+ 0) newlib_elix_level=0 ;;
+ 1) newlib_elix_level=1 ;;
+ 2) newlib_elix_level=2 ;;
+ 3) newlib_elix_level=3 ;;
+ 4) newlib_elix_level=4 ;;
+ *) as_fn_error $? "bad value ${enableval} for newlib-elix-level option" "$LINENO" 5 ;;
+ esac
+else
+ newlib_elix_level=0
+fi
+
+# Check whether --enable-newlib-io-float was given.
+if test "${enable_newlib_io_float+set}" = set; then :
+ enableval=$enable_newlib_io_float; case "${enableval}" in
+ yes) newlib_io_float=yes ;;
+ no) newlib_io_float=no ;;
+ *) as_fn_error $? "bad value ${enableval} for newlib-io-float option" "$LINENO" 5 ;;
+ esac
+else
+ newlib_io_float=yes
+fi
+
+# Check whether --enable-newlib-supplied-syscalls was given.
+if test "${enable_newlib_supplied_syscalls+set}" = set; then :
+ enableval=$enable_newlib_supplied_syscalls; case "${enableval}" in
+ yes) newlib_may_supply_syscalls=yes ;;
+ no) newlib_may_supply_syscalls=no ;;
+ *) as_fn_error $? "bad value ${enableval} for newlib-supplied-syscalls option" "$LINENO" 5 ;;
+ esac
+else
+ newlib_may_supply_syscalls=yes
+fi
+
+ if test x${newlib_may_supply_syscalls} = xyes; then
+ MAY_SUPPLY_SYSCALLS_TRUE=
+ MAY_SUPPLY_SYSCALLS_FALSE='#'
+else
+ MAY_SUPPLY_SYSCALLS_TRUE='#'
+ MAY_SUPPLY_SYSCALLS_FALSE=
+fi
+
+
+
+test -z "${with_target_subdir}" && with_target_subdir=.
+
+if test "${srcdir}" = "."; then
+ if test "${with_target_subdir}" != "."; then
+ newlib_basedir="${srcdir}/${with_multisrctop}../../../.."
+ else
+ newlib_basedir="${srcdir}/${with_multisrctop}../../.."
+ fi
+else
+ newlib_basedir="${srcdir}/../../.."
+fi
+
+
+
+
+if test "`cd $srcdir && pwd`" != "`pwd`"; then
+ # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
+ # is not polluted with repeated "-I."
+ am__isrc=' -I$(srcdir)'
+ # test to see if srcdir already configured
+ if test -f $srcdir/config.status; then
+ as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5
+ fi
+fi
+
+# test whether we have cygpath
+if test -z "$CYGPATH_W"; then
+ if (cygpath --version) >/dev/null 2>/dev/null; then
+ CYGPATH_W='cygpath -w'
+ else
+ CYGPATH_W=echo
+ fi
+fi
+
+
+# Define the identity of the package.
+ PACKAGE='newlib'
+ VERSION='2.4.0'
+
+
+# Some tools Automake needs.
+
+ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"}
+
+
+AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"}
+
+
+AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"}
+
+
+AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"}
+
+
+MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
+
+# We need awk for the "check" target. The system "awk" is bad on
+# some platforms.
+# Always define AMTAR for backward compatibility. Yes, it's still used
+# in the wild :-( We should find a proper way to deprecate it ...
+AMTAR='$${TAR-tar}'
+
+am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'
+
+
+
+
+
+
+# FIXME: We temporarily define our own version of AC_PROG_CC. This is
+# copied from autoconf 2.12, but does not call AC_PROG_CC_WORKS. We
+# are probably using a cross compiler, which will not be able to fully
+# link an executable. This should really be fixed in autoconf
+# itself.
+
+
+
+
+
+
+
+# Extract the first word of "gcc", so it can be a program name with args.
+set dummy gcc; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_CC+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_CC="gcc"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+$as_echo "$CC" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+
+depcc="$CC" am_compiler_list=
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
+$as_echo_n "checking dependency style of $depcc... " >&6; }
+if ${am_cv_CC_dependencies_compiler_type+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
+ # We make a subdir and do the tests there. Otherwise we can end up
+ # making bogus files that we don't know about and never remove. For
+ # instance it was reported that on HP-UX the gcc test will end up
+ # making a dummy file named `D' -- because `-MD' means `put the output
+ # in D'.
+ rm -rf conftest.dir
+ mkdir conftest.dir
+ # Copy depcomp to subdir because otherwise we won't find it if we're
+ # using a relative directory.
+ cp "$am_depcomp" conftest.dir
+ cd conftest.dir
+ # We will build objects and dependencies in a subdirectory because
+ # it helps to detect inapplicable dependency modes. For instance
+ # both Tru64's cc and ICC support -MD to output dependencies as a
+ # side effect of compilation, but ICC will put the dependencies in
+ # the current directory while Tru64 will put them in the object
+ # directory.
+ mkdir sub
+
+ am_cv_CC_dependencies_compiler_type=none
+ if test "$am_compiler_list" = ""; then
+ am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
+ fi
+ am__universal=false
+ case " $depcc " in #(
+ *\ -arch\ *\ -arch\ *) am__universal=true ;;
+ esac
+
+ for depmode in $am_compiler_list; do
+ # Setup a source with many dependencies, because some compilers
+ # like to wrap large dependency lists on column 80 (with \), and
+ # we should not choose a depcomp mode which is confused by this.
+ #
+ # We need to recreate these files for each test, as the compiler may
+ # overwrite some of them when testing with obscure command lines.
+ # This happens at least with the AIX C compiler.
+ : > sub/conftest.c
+ for i in 1 2 3 4 5 6; do
+ echo '#include "conftst'$i'.h"' >> sub/conftest.c
+ # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
+ # Solaris 8's {/usr,}/bin/sh.
+ touch sub/conftst$i.h
+ done
+ echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
+
+ # We check with `-c' and `-o' for the sake of the "dashmstdout"
+ # mode. It turns out that the SunPro C++ compiler does not properly
+ # handle `-M -o', and we need to detect this. Also, some Intel
+ # versions had trouble with output in subdirs
+ am__obj=sub/conftest.${OBJEXT-o}
+ am__minus_obj="-o $am__obj"
+ case $depmode in
+ gcc)
+ # This depmode causes a compiler race in universal mode.
+ test "$am__universal" = false || continue
+ ;;
+ nosideeffect)
+ # after this tag, mechanisms are not by side-effect, so they'll
+ # only be used when explicitly requested
+ if test "x$enable_dependency_tracking" = xyes; then
+ continue
+ else
+ break
+ fi
+ ;;
+ msvc7 | msvc7msys | msvisualcpp | msvcmsys)
+ # This compiler won't grok `-c -o', but also, the minuso test has
+ # not run yet. These depmodes are late enough in the game, and
+ # so weak that their functioning should not be impacted.
+ am__obj=conftest.${OBJEXT-o}
+ am__minus_obj=
+ ;;
+ none) break ;;
+ esac
+ if depmode=$depmode \
+ source=sub/conftest.c object=$am__obj \
+ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
+ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
+ >/dev/null 2>conftest.err &&
+ grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
+ grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
+ grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
+ ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
+ # icc doesn't choke on unknown options, it will just issue warnings
+ # or remarks (even with -Werror). So we grep stderr for any message
+ # that says an option was ignored or not supported.
+ # When given -MP, icc 7.0 and 7.1 complain thusly:
+ # icc: Command line warning: ignoring option '-M'; no argument required
+ # The diagnosis changed in icc 8.0:
+ # icc: Command line remark: option '-MP' not supported
+ if (grep 'ignoring option' conftest.err ||
+ grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
+ am_cv_CC_dependencies_compiler_type=$depmode
+ break
+ fi
+ fi
+ done
+
+ cd ..
+ rm -rf conftest.dir
+else
+ am_cv_CC_dependencies_compiler_type=none
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
+$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; }
+CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
+
+ if
+ test "x$enable_dependency_tracking" != xno \
+ && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then
+ am__fastdepCC_TRUE=
+ am__fastdepCC_FALSE='#'
+else
+ am__fastdepCC_TRUE='#'
+ am__fastdepCC_FALSE=
+fi
+
+
+if test -z "$CC"; then
+ # Extract the first word of "cc", so it can be a program name with args.
+set dummy cc; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_CC+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+ ac_prog_rejected=no
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
+ ac_prog_rejected=yes
+ continue
+ fi
+ ac_cv_prog_CC="cc"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+if test $ac_prog_rejected = yes; then
+ # We found a bogon in the path, so make sure we never use it.
+ set dummy $ac_cv_prog_CC
+ shift
+ if test $# != 0; then
+ # We chose a different compiler from the bogus one.
+ # However, it has the same basename, so the bogon will be chosen
+ # first if we set CC to just the basename; use the full file name.
+ shift
+ ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
+ fi
+fi
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+$as_echo "$CC" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+ test -z "$CC" && as_fn_error $? "no acceptable cc found in \$PATH" "$LINENO" 5
+fi
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using GNU C" >&5
+$as_echo_n "checking whether we are using GNU C... " >&6; }
+if ${ac_cv_c_compiler_gnu+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat > conftest.c <<EOF
+#ifdef __GNUC__
+ yes;
+#endif
+EOF
+if { ac_try='${CC-cc} -E conftest.c'
+ { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; } | egrep yes >/dev/null 2>&1; then
+ ac_cv_c_compiler_gnu=yes
+else
+ ac_cv_c_compiler_gnu=no
+fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
+$as_echo "$ac_cv_c_compiler_gnu" >&6; }
+
+if test $ac_cv_c_compiler_gnu = yes; then
+ GCC=yes
+ ac_test_CFLAGS="${CFLAGS+set}"
+ ac_save_CFLAGS="$CFLAGS"
+ ac_test_CFLAGS=${CFLAGS+set}
+ac_save_CFLAGS=$CFLAGS
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
+$as_echo_n "checking whether $CC accepts -g... " >&6; }
+if ${ac_cv_prog_cc_g+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_save_c_werror_flag=$ac_c_werror_flag
+ ac_c_werror_flag=yes
+ ac_cv_prog_cc_g=no
+ CFLAGS="-g"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ ac_cv_prog_cc_g=yes
+else
+ CFLAGS=""
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+
+else
+ ac_c_werror_flag=$ac_save_c_werror_flag
+ CFLAGS="-g"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ ac_cv_prog_cc_g=yes
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ ac_c_werror_flag=$ac_save_c_werror_flag
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
+$as_echo "$ac_cv_prog_cc_g" >&6; }
+if test "$ac_test_CFLAGS" = set; then
+ CFLAGS=$ac_save_CFLAGS
+elif test $ac_cv_prog_cc_g = yes; then
+ if test "$GCC" = yes; then
+ CFLAGS="-g -O2"
+ else
+ CFLAGS="-g"
+ fi
+else
+ if test "$GCC" = yes; then
+ CFLAGS="-O2"
+ else
+ CFLAGS=
+ fi
+fi
+ if test "$ac_test_CFLAGS" = set; then
+ CFLAGS="$ac_save_CFLAGS"
+ elif test $ac_cv_prog_cc_g = yes; then
+ CFLAGS="-g -O2"
+ else
+ CFLAGS="-O2"
+ fi
+else
+ GCC=
+ test "${CFLAGS+set}" = set || CFLAGS="-g"
+fi
+
+
+if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args.
+set dummy ${ac_tool_prefix}as; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_AS+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$AS"; then
+ ac_cv_prog_AS="$AS" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_AS="${ac_tool_prefix}as"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+AS=$ac_cv_prog_AS
+if test -n "$AS"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
+$as_echo "$AS" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_AS"; then
+ ac_ct_AS=$AS
+ # Extract the first word of "as", so it can be a program name with args.
+set dummy as; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_AS+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_ct_AS"; then
+ ac_cv_prog_ac_ct_AS="$ac_ct_AS" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_ac_ct_AS="as"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_AS=$ac_cv_prog_ac_ct_AS
+if test -n "$ac_ct_AS"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AS" >&5
+$as_echo "$ac_ct_AS" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+ if test "x$ac_ct_AS" = x; then
+ AS=""
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ AS=$ac_ct_AS
+ fi
+else
+ AS="$ac_cv_prog_AS"
+fi
+
+if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
+set dummy ${ac_tool_prefix}ar; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_AR+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$AR"; then
+ ac_cv_prog_AR="$AR" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_AR="${ac_tool_prefix}ar"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+AR=$ac_cv_prog_AR
+if test -n "$AR"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
+$as_echo "$AR" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_AR"; then
+ ac_ct_AR=$AR
+ # Extract the first word of "ar", so it can be a program name with args.
+set dummy ar; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_AR+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_ct_AR"; then
+ ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_ac_ct_AR="ar"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_AR=$ac_cv_prog_ac_ct_AR
+if test -n "$ac_ct_AR"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
+$as_echo "$ac_ct_AR" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+ if test "x$ac_ct_AR" = x; then
+ AR=""
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ AR=$ac_ct_AR
+ fi
+else
+ AR="$ac_cv_prog_AR"
+fi
+
+if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
+set dummy ${ac_tool_prefix}ranlib; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_RANLIB+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$RANLIB"; then
+ ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+RANLIB=$ac_cv_prog_RANLIB
+if test -n "$RANLIB"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
+$as_echo "$RANLIB" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_RANLIB"; then
+ ac_ct_RANLIB=$RANLIB
+ # Extract the first word of "ranlib", so it can be a program name with args.
+set dummy ranlib; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_ct_RANLIB"; then
+ ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_ac_ct_RANLIB="ranlib"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
+if test -n "$ac_ct_RANLIB"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
+$as_echo "$ac_ct_RANLIB" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+ if test "x$ac_ct_RANLIB" = x; then
+ RANLIB=":"
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ RANLIB=$ac_ct_RANLIB
+ fi
+else
+ RANLIB="$ac_cv_prog_RANLIB"
+fi
+
+if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}readelf", so it can be a program name with args.
+set dummy ${ac_tool_prefix}readelf; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_READELF+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$READELF"; then
+ ac_cv_prog_READELF="$READELF" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_READELF="${ac_tool_prefix}readelf"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+READELF=$ac_cv_prog_READELF
+if test -n "$READELF"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
+$as_echo "$READELF" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_READELF"; then
+ ac_ct_READELF=$READELF
+ # Extract the first word of "readelf", so it can be a program name with args.
+set dummy readelf; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_READELF+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_ct_READELF"; then
+ ac_cv_prog_ac_ct_READELF="$ac_ct_READELF" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_ac_ct_READELF="readelf"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_READELF=$ac_cv_prog_ac_ct_READELF
+if test -n "$ac_ct_READELF"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_READELF" >&5
+$as_echo "$ac_ct_READELF" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+ if test "x$ac_ct_READELF" = x; then
+ READELF=":"
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ READELF=$ac_ct_READELF
+ fi
+else
+ READELF="$ac_cv_prog_READELF"
+fi
+
+
+
+
+# Hack to ensure that INSTALL won't be set to "../" with autoconf 2.13. */
+ac_given_INSTALL=$INSTALL
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5
+$as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; }
+ # Check whether --enable-maintainer-mode was given.
+if test "${enable_maintainer_mode+set}" = set; then :
+ enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval
+else
+ USE_MAINTAINER_MODE=no
+fi
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_MAINTAINER_MODE" >&5
+$as_echo "$USE_MAINTAINER_MODE" >&6; }
+ if test $USE_MAINTAINER_MODE = yes; then
+ MAINTAINER_MODE_TRUE=
+ MAINTAINER_MODE_FALSE='#'
+else
+ MAINTAINER_MODE_TRUE='#'
+ MAINTAINER_MODE_FALSE=
+fi
+
+ MAINT=$MAINTAINER_MODE_TRUE
+
+
+# By default we simply use the C compiler to build assembly code.
+
+test "${CCAS+set}" = set || CCAS=$CC
+test "${CCASFLAGS+set}" = set || CCASFLAGS=$CFLAGS
+
+
+
+
+# We need AC_EXEEXT to keep automake happy in cygnus mode. However,
+# at least currently, we never actually build a program, so we never
+# need to use $(EXEEXT). Moreover, the test for EXEEXT normally
+# fails, because we are probably configuring with a cross compiler
+# which can't create executables. So we include AC_EXEEXT to keep
+# automake happy, but we don't execute it, since we don't care about
+# the result.
+if false; then
+
+ dummy_var=1
+fi
+
+. ${newlib_basedir}/configure.host
+
+newlib_cflags="${newlib_cflags} -fno-builtin"
+
+NEWLIB_CFLAGS=${newlib_cflags}
+
+
+NO_INCLUDE_LIST=${noinclude}
+
+
+LDFLAGS=${ldflags}
+
+
+ if test x${newlib_elix_level} = x0; then
+ ELIX_LEVEL_0_TRUE=
+ ELIX_LEVEL_0_FALSE='#'
+else
+ ELIX_LEVEL_0_TRUE='#'
+ ELIX_LEVEL_0_FALSE=
+fi
+
+ if test x${newlib_elix_level} = x1; then
+ ELIX_LEVEL_1_TRUE=
+ ELIX_LEVEL_1_FALSE='#'
+else
+ ELIX_LEVEL_1_TRUE='#'
+ ELIX_LEVEL_1_FALSE=
+fi
+
+ if test x${newlib_elix_level} = x2; then
+ ELIX_LEVEL_2_TRUE=
+ ELIX_LEVEL_2_FALSE='#'
+else
+ ELIX_LEVEL_2_TRUE='#'
+ ELIX_LEVEL_2_FALSE=
+fi
+
+ if test x${newlib_elix_level} = x3; then
+ ELIX_LEVEL_3_TRUE=
+ ELIX_LEVEL_3_FALSE='#'
+else
+ ELIX_LEVEL_3_TRUE='#'
+ ELIX_LEVEL_3_FALSE=
+fi
+
+ if test x${newlib_elix_level} = x4; then
+ ELIX_LEVEL_4_TRUE=
+ ELIX_LEVEL_4_FALSE='#'
+else
+ ELIX_LEVEL_4_TRUE='#'
+ ELIX_LEVEL_4_FALSE=
+fi
+
+
+ if test x${use_libtool} = xyes; then
+ USE_LIBTOOL_TRUE=
+ USE_LIBTOOL_FALSE='#'
+else
+ USE_LIBTOOL_TRUE='#'
+ USE_LIBTOOL_FALSE=
+fi
+
+
+# Hard-code OBJEXT. Normally it is set by AC_OBJEXT, but we
+# use oext, which is set in configure.host based on the target platform.
+OBJEXT=${oext}
+
+
+
+
+
+
+
+
+
+
+
+
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
+set dummy ${ac_tool_prefix}gcc; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_CC+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_CC="${ac_tool_prefix}gcc"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+$as_echo "$CC" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_CC"; then
+ ac_ct_CC=$CC
+ # Extract the first word of "gcc", so it can be a program name with args.
+set dummy gcc; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_CC+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_ct_CC"; then
+ ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_ac_ct_CC="gcc"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_CC=$ac_cv_prog_ac_ct_CC
+if test -n "$ac_ct_CC"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
+$as_echo "$ac_ct_CC" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+ if test "x$ac_ct_CC" = x; then
+ CC=""
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ CC=$ac_ct_CC
+ fi
+else
+ CC="$ac_cv_prog_CC"
+fi
+
+if test -z "$CC"; then
+ if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
+set dummy ${ac_tool_prefix}cc; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_CC+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_CC="${ac_tool_prefix}cc"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+$as_echo "$CC" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+ fi
+fi
+if test -z "$CC"; then
+ # Extract the first word of "cc", so it can be a program name with args.
+set dummy cc; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_CC+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+ ac_prog_rejected=no
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
+ ac_prog_rejected=yes
+ continue
+ fi
+ ac_cv_prog_CC="cc"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+if test $ac_prog_rejected = yes; then
+ # We found a bogon in the path, so make sure we never use it.
+ set dummy $ac_cv_prog_CC
+ shift
+ if test $# != 0; then
+ # We chose a different compiler from the bogus one.
+ # However, it has the same basename, so the bogon will be chosen
+ # first if we set CC to just the basename; use the full file name.
+ shift
+ ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
+ fi
+fi
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+$as_echo "$CC" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$CC"; then
+ if test -n "$ac_tool_prefix"; then
+ for ac_prog in cl.exe
+ do
+ # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
+set dummy $ac_tool_prefix$ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_CC+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+$as_echo "$CC" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+ test -n "$CC" && break
+ done
+fi
+if test -z "$CC"; then
+ ac_ct_CC=$CC
+ for ac_prog in cl.exe
+do
+ # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_CC+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_ct_CC"; then
+ ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_ac_ct_CC="$ac_prog"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_CC=$ac_cv_prog_ac_ct_CC
+if test -n "$ac_ct_CC"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
+$as_echo "$ac_ct_CC" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+ test -n "$ac_ct_CC" && break
+done
+
+ if test "x$ac_ct_CC" = x; then
+ CC=""
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ CC=$ac_ct_CC
+ fi
+fi
+
+fi
+
+
+test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "no acceptable C compiler found in \$PATH
+See \`config.log' for more details" "$LINENO" 5; }
+
+# Provide some information about the compiler.
+$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
+set X $ac_compile
+ac_compiler=$2
+for ac_option in --version -v -V -qversion; do
+ { { ac_try="$ac_compiler $ac_option >&5"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_compiler $ac_option >&5") 2>conftest.err
+ ac_status=$?
+ if test -s conftest.err; then
+ sed '10a\
+... rest of stderr output deleted ...
+ 10q' conftest.err >conftest.er1
+ cat conftest.er1 >&5
+ fi
+ rm -f conftest.er1 conftest.err
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }
+done
+
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if { { ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_link") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ ac_no_link=no
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+ac_clean_files_save=$ac_clean_files
+ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
+# Try to create an executable without -o first, disregard a.out.
+# It will help us diagnose broken compilers, and finding out an intuition
+# of exeext.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
+$as_echo_n "checking whether the C compiler works... " >&6; }
+ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
+
+# The possible output files:
+ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
+
+ac_rmfiles=
+for ac_file in $ac_files
+do
+ case $ac_file in
+ *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
+ * ) ac_rmfiles="$ac_rmfiles $ac_file";;
+ esac
+done
+rm -f $ac_rmfiles
+
+if { { ac_try="$ac_link_default"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_link_default") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then :
+ # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
+# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
+# in a Makefile. We should not override ac_cv_exeext if it was cached,
+# so that the user can short-circuit this test for compilers unknown to
+# Autoconf.
+for ac_file in $ac_files ''
+do
+ test -f "$ac_file" || continue
+ case $ac_file in
+ *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
+ ;;
+ [ab].out )
+ # We found the default executable, but exeext='' is most
+ # certainly right.
+ break;;
+ *.* )
+ if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
+ then :; else
+ ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
+ fi
+ # We set ac_cv_exeext here because the later test for it is not
+ # safe: cross compilers may not add the suffix if given an `-o'
+ # argument, so we may need to know it at that point already.
+ # Even if this section looks crufty: it has the advantage of
+ # actually working.
+ break;;
+ * )
+ break;;
+ esac
+done
+test "$ac_cv_exeext" = no && ac_cv_exeext=
+
+else
+ ac_file=''
+fi
+if test -z "$ac_file"; then :
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+$as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error 77 "C compiler cannot create executables
+See \`config.log' for more details" "$LINENO" 5; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
+$as_echo_n "checking for C compiler default output file name... " >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
+$as_echo "$ac_file" >&6; }
+ac_exeext=$ac_cv_exeext
+
+rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
+ac_clean_files=$ac_clean_files_save
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
+$as_echo_n "checking for suffix of executables... " >&6; }
+if { { ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_link") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then :
+ # If both `conftest.exe' and `conftest' are `present' (well, observable)
+# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
+# work properly (i.e., refer to `conftest.exe'), while it won't with
+# `rm'.
+for ac_file in conftest.exe conftest conftest.*; do
+ test -f "$ac_file" || continue
+ case $ac_file in
+ *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
+ *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
+ break;;
+ * ) break;;
+ esac
+done
+else
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "cannot compute suffix of executables: cannot compile and link
+See \`config.log' for more details" "$LINENO" 5; }
+fi
+rm -f conftest conftest$ac_cv_exeext
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
+$as_echo "$ac_cv_exeext" >&6; }
+
+rm -f conftest.$ac_ext
+EXEEXT=$ac_cv_exeext
+ac_exeext=$EXEEXT
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <stdio.h>
+int
+main ()
+{
+FILE *f = fopen ("conftest.out", "w");
+ return ferror (f) || fclose (f) != 0;
+
+ ;
+ return 0;
+}
+_ACEOF
+ac_clean_files="$ac_clean_files conftest.out"
+# Check that the compiler produces executables we can run. If not, either
+# the compiler is broken, or we cross compile.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
+$as_echo_n "checking whether we are cross compiling... " >&6; }
+if test "$cross_compiling" != yes; then
+ { { ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_link") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }
+ if { ac_try='./conftest$ac_cv_exeext'
+ { { case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_try") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; }; then
+ cross_compiling=no
+ else
+ if test "$cross_compiling" = maybe; then
+ cross_compiling=yes
+ else
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "cannot run C compiled programs.
+If you meant to cross compile, use \`--host'.
+See \`config.log' for more details" "$LINENO" 5; }
+ fi
+ fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
+$as_echo "$cross_compiling" >&6; }
+
+rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
+ac_clean_files=$ac_clean_files_save
+
+else
+ rm -f -r a.out a.exe b.out conftest.$ac_ext conftest.o conftest.obj conftest.dSYM
+ ac_no_link=yes
+ # Setting cross_compile will disable run tests; it will
+ # also disable AC_CHECK_FILE but that's generally
+ # correct if we can't link.
+ cross_compiling=yes
+ EXEEXT=
+ # Check that the compiler produces executables we can run. If not, either
+# the compiler is broken, or we cross compile.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
+$as_echo_n "checking whether we are cross compiling... " >&6; }
+if test "$cross_compiling" != yes; then
+ { { ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_link") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }
+ if { ac_try='./conftest$ac_cv_exeext'
+ { { case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_try") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; }; then
+ cross_compiling=no
+ else
+ if test "$cross_compiling" = maybe; then
+ cross_compiling=yes
+ else
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "cannot run C compiled programs.
+If you meant to cross compile, use \`--host'.
+See \`config.log' for more details" "$LINENO" 5; }
+ fi
+ fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
+$as_echo "$cross_compiling" >&6; }
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
+$as_echo_n "checking for suffix of object files... " >&6; }
+if ${ac_cv_objext+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.o conftest.obj
+if { { ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_compile") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then :
+ for ac_file in conftest.o conftest.obj conftest.*; do
+ test -f "$ac_file" || continue;
+ case $ac_file in
+ *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
+ *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
+ break;;
+ esac
+done
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "cannot compute suffix of object files: cannot compile
+See \`config.log' for more details" "$LINENO" 5; }
+fi
+rm -f conftest.$ac_cv_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
+$as_echo "$ac_cv_objext" >&6; }
+OBJEXT=$ac_cv_objext
+ac_objext=$OBJEXT
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
+$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
+if ${ac_cv_c_compiler_gnu+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+#ifndef __GNUC__
+ choke me
+#endif
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ ac_compiler_gnu=yes
+else
+ ac_compiler_gnu=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ac_cv_c_compiler_gnu=$ac_compiler_gnu
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
+$as_echo "$ac_cv_c_compiler_gnu" >&6; }
+if test $ac_compiler_gnu = yes; then
+ GCC=yes
+else
+ GCC=
+fi
+ac_test_CFLAGS=${CFLAGS+set}
+ac_save_CFLAGS=$CFLAGS
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
+$as_echo_n "checking whether $CC accepts -g... " >&6; }
+if ${ac_cv_prog_cc_g+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_save_c_werror_flag=$ac_c_werror_flag
+ ac_c_werror_flag=yes
+ ac_cv_prog_cc_g=no
+ CFLAGS="-g"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ ac_cv_prog_cc_g=yes
+else
+ CFLAGS=""
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+
+else
+ ac_c_werror_flag=$ac_save_c_werror_flag
+ CFLAGS="-g"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ ac_cv_prog_cc_g=yes
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ ac_c_werror_flag=$ac_save_c_werror_flag
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
+$as_echo "$ac_cv_prog_cc_g" >&6; }
+if test "$ac_test_CFLAGS" = set; then
+ CFLAGS=$ac_save_CFLAGS
+elif test $ac_cv_prog_cc_g = yes; then
+ if test "$GCC" = yes; then
+ CFLAGS="-g -O2"
+ else
+ CFLAGS="-g"
+ fi
+else
+ if test "$GCC" = yes; then
+ CFLAGS="-O2"
+ else
+ CFLAGS=
+ fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
+$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
+if ${ac_cv_prog_cc_c89+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_cv_prog_cc_c89=no
+ac_save_CC=$CC
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <stdarg.h>
+#include <stdio.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
+struct buf { int x; };
+FILE * (*rcsopen) (struct buf *, struct stat *, int);
+static char *e (p, i)
+ char **p;
+ int i;
+{
+ return p[i];
+}
+static char *f (char * (*g) (char **, int), char **p, ...)
+{
+ char *s;
+ va_list v;
+ va_start (v,p);
+ s = g (p, va_arg (v,int));
+ va_end (v);
+ return s;
+}
+
+/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
+ function prototypes and stuff, but not '\xHH' hex character constants.
+ These don't provoke an error unfortunately, instead are silently treated
+ as 'x'. The following induces an error, until -std is added to get
+ proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
+ array size at least. It's necessary to write '\x00'==0 to get something
+ that's true only with -std. */
+int osf4_cc_array ['\x00' == 0 ? 1 : -1];
+
+/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
+ inside strings and character constants. */
+#define FOO(x) 'x'
+int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
+
+int test (int i, double x);
+struct s1 {int (*f) (int a);};
+struct s2 {int (*f) (double a);};
+int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
+int argc;
+char **argv;
+int
+main ()
+{
+return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
+ ;
+ return 0;
+}
+_ACEOF
+for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
+ -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
+do
+ CC="$ac_save_CC $ac_arg"
+ if ac_fn_c_try_compile "$LINENO"; then :
+ ac_cv_prog_cc_c89=$ac_arg
+fi
+rm -f core conftest.err conftest.$ac_objext
+ test "x$ac_cv_prog_cc_c89" != "xno" && break
+done
+rm -f conftest.$ac_ext
+CC=$ac_save_CC
+
+fi
+# AC_CACHE_VAL
+case "x$ac_cv_prog_cc_c89" in
+ x)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
+$as_echo "none needed" >&6; } ;;
+ xno)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
+$as_echo "unsupported" >&6; } ;;
+ *)
+ CC="$CC $ac_cv_prog_cc_c89"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
+$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
+esac
+if test "x$ac_cv_prog_cc_c89" != xno; then :
+
+fi
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+depcc="$CC" am_compiler_list=
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
+$as_echo_n "checking dependency style of $depcc... " >&6; }
+if ${am_cv_CC_dependencies_compiler_type+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
+ # We make a subdir and do the tests there. Otherwise we can end up
+ # making bogus files that we don't know about and never remove. For
+ # instance it was reported that on HP-UX the gcc test will end up
+ # making a dummy file named `D' -- because `-MD' means `put the output
+ # in D'.
+ rm -rf conftest.dir
+ mkdir conftest.dir
+ # Copy depcomp to subdir because otherwise we won't find it if we're
+ # using a relative directory.
+ cp "$am_depcomp" conftest.dir
+ cd conftest.dir
+ # We will build objects and dependencies in a subdirectory because
+ # it helps to detect inapplicable dependency modes. For instance
+ # both Tru64's cc and ICC support -MD to output dependencies as a
+ # side effect of compilation, but ICC will put the dependencies in
+ # the current directory while Tru64 will put them in the object
+ # directory.
+ mkdir sub
+
+ am_cv_CC_dependencies_compiler_type=none
+ if test "$am_compiler_list" = ""; then
+ am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
+ fi
+ am__universal=false
+ case " $depcc " in #(
+ *\ -arch\ *\ -arch\ *) am__universal=true ;;
+ esac
+
+ for depmode in $am_compiler_list; do
+ # Setup a source with many dependencies, because some compilers
+ # like to wrap large dependency lists on column 80 (with \), and
+ # we should not choose a depcomp mode which is confused by this.
+ #
+ # We need to recreate these files for each test, as the compiler may
+ # overwrite some of them when testing with obscure command lines.
+ # This happens at least with the AIX C compiler.
+ : > sub/conftest.c
+ for i in 1 2 3 4 5 6; do
+ echo '#include "conftst'$i'.h"' >> sub/conftest.c
+ # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
+ # Solaris 8's {/usr,}/bin/sh.
+ touch sub/conftst$i.h
+ done
+ echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
+
+ # We check with `-c' and `-o' for the sake of the "dashmstdout"
+ # mode. It turns out that the SunPro C++ compiler does not properly
+ # handle `-M -o', and we need to detect this. Also, some Intel
+ # versions had trouble with output in subdirs
+ am__obj=sub/conftest.${OBJEXT-o}
+ am__minus_obj="-o $am__obj"
+ case $depmode in
+ gcc)
+ # This depmode causes a compiler race in universal mode.
+ test "$am__universal" = false || continue
+ ;;
+ nosideeffect)
+ # after this tag, mechanisms are not by side-effect, so they'll
+ # only be used when explicitly requested
+ if test "x$enable_dependency_tracking" = xyes; then
+ continue
+ else
+ break
+ fi
+ ;;
+ msvc7 | msvc7msys | msvisualcpp | msvcmsys)
+ # This compiler won't grok `-c -o', but also, the minuso test has
+ # not run yet. These depmodes are late enough in the game, and
+ # so weak that their functioning should not be impacted.
+ am__obj=conftest.${OBJEXT-o}
+ am__minus_obj=
+ ;;
+ none) break ;;
+ esac
+ if depmode=$depmode \
+ source=sub/conftest.c object=$am__obj \
+ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
+ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
+ >/dev/null 2>conftest.err &&
+ grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
+ grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
+ grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
+ ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
+ # icc doesn't choke on unknown options, it will just issue warnings
+ # or remarks (even with -Werror). So we grep stderr for any message
+ # that says an option was ignored or not supported.
+ # When given -MP, icc 7.0 and 7.1 complain thusly:
+ # icc: Command line warning: ignoring option '-M'; no argument required
+ # The diagnosis changed in icc 8.0:
+ # icc: Command line remark: option '-MP' not supported
+ if (grep 'ignoring option' conftest.err ||
+ grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
+ am_cv_CC_dependencies_compiler_type=$depmode
+ break
+ fi
+ fi
+ done
+
+ cd ..
+ rm -rf conftest.dir
+else
+ am_cv_CC_dependencies_compiler_type=none
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
+$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; }
+CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
+
+ if
+ test "x$enable_dependency_tracking" != xno \
+ && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then
+ am__fastdepCC_TRUE=
+ am__fastdepCC_FALSE='#'
+else
+ am__fastdepCC_TRUE='#'
+ am__fastdepCC_FALSE=
+fi
+
+
+
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#if (__NDS32_EXT_FPU_SP__)
+warning: Has nds32 FPU SP extension support
+#endif
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ has_nds32_fpu_sp="no"
+else
+ has_nds32_fpu_sp="yes"
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ if test "$has_nds32_fpu_sp" = "yes"; then
+ HAS_NDS32_FPU_SP_TRUE=
+ HAS_NDS32_FPU_SP_FALSE='#'
+else
+ HAS_NDS32_FPU_SP_TRUE='#'
+ HAS_NDS32_FPU_SP_FALSE=
+fi
+
+
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#if (__NDS32_EXT_FPU_DP__)
+warning: Has nds32 FPU DP extension support
+#endif
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ has_nds32_fpu_dp="no"
+else
+ has_nds32_fpu_dp="yes"
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ if test "$has_nds32_fpu_dp" = "yes"; then
+ HAS_NDS32_FPU_DP_TRUE=
+ HAS_NDS32_FPU_DP_FALSE='#'
+else
+ HAS_NDS32_FPU_DP_TRUE='#'
+ HAS_NDS32_FPU_DP_FALSE=
+fi
+
+
+ac_config_files="$ac_config_files Makefile"
+
+cat >confcache <<\_ACEOF
+# This file is a shell script that caches the results of configure
+# tests run on this system so they can be shared between configure
+# scripts and configure runs, see configure's option --config-cache.
+# It is not useful on other systems. If it contains results you don't
+# want to keep, you may remove or edit it.
+#
+# config.status only pays attention to the cache file if you give it
+# the --recheck option to rerun configure.
+#
+# `ac_cv_env_foo' variables (set or unset) will be overridden when
+# loading this file, other *unset* `ac_cv_foo' will be assigned the
+# following values.
+
+_ACEOF
+
+# The following way of writing the cache mishandles newlines in values,
+# but we know of no workaround that is simple, portable, and efficient.
+# So, we kill variables containing newlines.
+# Ultrix sh set writes to stderr and can't be redirected directly,
+# and sets the high bit in the cache file unless we assign to the vars.
+(
+ for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
+ eval ac_val=\$$ac_var
+ case $ac_val in #(
+ *${as_nl}*)
+ case $ac_var in #(
+ *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
+$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
+ esac
+ case $ac_var in #(
+ _ | IFS | as_nl) ;; #(
+ BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
+ *) { eval $ac_var=; unset $ac_var;} ;;
+ esac ;;
+ esac
+ done
+
+ (set) 2>&1 |
+ case $as_nl`(ac_space=' '; set) 2>&1` in #(
+ *${as_nl}ac_space=\ *)
+ # `set' does not quote correctly, so add quotes: double-quote
+ # substitution turns \\\\ into \\, and sed turns \\ into \.
+ sed -n \
+ "s/'/'\\\\''/g;
+ s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
+ ;; #(
+ *)
+ # `set' quotes correctly as required by POSIX, so do not add quotes.
+ sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
+ ;;
+ esac |
+ sort
+) |
+ sed '
+ /^ac_cv_env_/b end
+ t clear
+ :clear
+ s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
+ t end
+ s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
+ :end' >>confcache
+if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
+ if test -w "$cache_file"; then
+ if test "x$cache_file" != "x/dev/null"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
+$as_echo "$as_me: updating cache $cache_file" >&6;}
+ if test ! -f "$cache_file" || test -h "$cache_file"; then
+ cat confcache >"$cache_file"
+ else
+ case $cache_file in #(
+ */* | ?:*)
+ mv -f confcache "$cache_file"$$ &&
+ mv -f "$cache_file"$$ "$cache_file" ;; #(
+ *)
+ mv -f confcache "$cache_file" ;;
+ esac
+ fi
+ fi
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
+$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
+ fi
+fi
+rm -f confcache
+
+test "x$prefix" = xNONE && prefix=$ac_default_prefix
+# Let make expand exec_prefix.
+test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
+
+# Transform confdefs.h into DEFS.
+# Protect against shell expansion while executing Makefile rules.
+# Protect against Makefile macro expansion.
+#
+# If the first sed substitution is executed (which looks for macros that
+# take arguments), then branch to the quote section. Otherwise,
+# look for a macro that doesn't take arguments.
+ac_script='
+:mline
+/\\$/{
+ N
+ s,\\\n,,
+ b mline
+}
+t clear
+:clear
+s/^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*([^)]*)\)[ ]*\(.*\)/-D\1=\2/g
+t quote
+s/^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)/-D\1=\2/g
+t quote
+b any
+:quote
+s/[ `~#$^&*(){}\\|;'\''"<>?]/\\&/g
+s/\[/\\&/g
+s/\]/\\&/g
+s/\$/$$/g
+H
+:any
+${
+ g
+ s/^\n//
+ s/\n/ /g
+ p
+}
+'
+DEFS=`sed -n "$ac_script" confdefs.h`
+
+
+ac_libobjs=
+ac_ltlibobjs=
+U=
+for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
+ # 1. Remove the extension, and $U if already installed.
+ ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
+ ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
+ # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
+ # will be set to the directory where LIBOBJS objects are built.
+ as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
+ as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
+done
+LIBOBJS=$ac_libobjs
+
+LTLIBOBJS=$ac_ltlibobjs
+
+
+if test -z "${MAY_SUPPLY_SYSCALLS_TRUE}" && test -z "${MAY_SUPPLY_SYSCALLS_FALSE}"; then
+ as_fn_error $? "conditional \"MAY_SUPPLY_SYSCALLS\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+ if test -n "$EXEEXT"; then
+ am__EXEEXT_TRUE=
+ am__EXEEXT_FALSE='#'
+else
+ am__EXEEXT_TRUE='#'
+ am__EXEEXT_FALSE=
+fi
+
+if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then
+ as_fn_error $? "conditional \"AMDEP\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
+ as_fn_error $? "conditional \"am__fastdepCC\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then
+ as_fn_error $? "conditional \"MAINTAINER_MODE\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${ELIX_LEVEL_0_TRUE}" && test -z "${ELIX_LEVEL_0_FALSE}"; then
+ as_fn_error $? "conditional \"ELIX_LEVEL_0\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${ELIX_LEVEL_1_TRUE}" && test -z "${ELIX_LEVEL_1_FALSE}"; then
+ as_fn_error $? "conditional \"ELIX_LEVEL_1\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${ELIX_LEVEL_2_TRUE}" && test -z "${ELIX_LEVEL_2_FALSE}"; then
+ as_fn_error $? "conditional \"ELIX_LEVEL_2\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${ELIX_LEVEL_3_TRUE}" && test -z "${ELIX_LEVEL_3_FALSE}"; then
+ as_fn_error $? "conditional \"ELIX_LEVEL_3\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${ELIX_LEVEL_4_TRUE}" && test -z "${ELIX_LEVEL_4_FALSE}"; then
+ as_fn_error $? "conditional \"ELIX_LEVEL_4\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${USE_LIBTOOL_TRUE}" && test -z "${USE_LIBTOOL_FALSE}"; then
+ as_fn_error $? "conditional \"USE_LIBTOOL\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
+ as_fn_error $? "conditional \"am__fastdepCC\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${HAS_NDS32_FPU_SP_TRUE}" && test -z "${HAS_NDS32_FPU_SP_FALSE}"; then
+ as_fn_error $? "conditional \"HAS_NDS32_FPU_SP\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${HAS_NDS32_FPU_DP_TRUE}" && test -z "${HAS_NDS32_FPU_DP_FALSE}"; then
+ as_fn_error $? "conditional \"HAS_NDS32_FPU_DP\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+
+: "${CONFIG_STATUS=./config.status}"
+ac_write_fail=0
+ac_clean_files_save=$ac_clean_files
+ac_clean_files="$ac_clean_files $CONFIG_STATUS"
+{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
+$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
+as_write_fail=0
+cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
+#! $SHELL
+# Generated by $as_me.
+# Run this file to recreate the current configuration.
+# Compiler output produced by configure, useful for debugging
+# configure, is in config.log if it exists.
+
+debug=false
+ac_cs_recheck=false
+ac_cs_silent=false
+
+SHELL=\${CONFIG_SHELL-$SHELL}
+export SHELL
+_ASEOF
+cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
+## -------------------- ##
+## M4sh Initialization. ##
+## -------------------- ##
+
+# Be more Bourne compatible
+DUALCASE=1; export DUALCASE # for MKS sh
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
+ emulate sh
+ NULLCMD=:
+ # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
+ # is contrary to our usage. Disable this feature.
+ alias -g '${1+"$@"}'='"$@"'
+ setopt NO_GLOB_SUBST
+else
+ case `(set -o) 2>/dev/null` in #(
+ *posix*) :
+ set -o posix ;; #(
+ *) :
+ ;;
+esac
+fi
+
+
+as_nl='
+'
+export as_nl
+# Printing a long string crashes Solaris 7 /usr/bin/printf.
+as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
+as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
+as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
+# Prefer a ksh shell builtin over an external printf program on Solaris,
+# but without wasting forks for bash or zsh.
+if test -z "$BASH_VERSION$ZSH_VERSION" \
+ && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
+ as_echo='print -r --'
+ as_echo_n='print -rn --'
+elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
+ as_echo='printf %s\n'
+ as_echo_n='printf %s'
+else
+ if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
+ as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
+ as_echo_n='/usr/ucb/echo -n'
+ else
+ as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
+ as_echo_n_body='eval
+ arg=$1;
+ case $arg in #(
+ *"$as_nl"*)
+ expr "X$arg" : "X\\(.*\\)$as_nl";
+ arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
+ esac;
+ expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
+ '
+ export as_echo_n_body
+ as_echo_n='sh -c $as_echo_n_body as_echo'
+ fi
+ export as_echo_body
+ as_echo='sh -c $as_echo_body as_echo'
+fi
+
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+ PATH_SEPARATOR=:
+ (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
+ (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
+ PATH_SEPARATOR=';'
+ }
+fi
+
+
+# IFS
+# We need space, tab and new line, in precisely that order. Quoting is
+# there to prevent editors from complaining about space-tab.
+# (If _AS_PATH_WALK were called with IFS unset, it would disable word
+# splitting by setting IFS to empty value.)
+IFS=" "" $as_nl"
+
+# Find who we are. Look in the path if we contain no directory separator.
+as_myself=
+case $0 in #((
+ *[\\/]* ) as_myself=$0 ;;
+ *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
+ done
+IFS=$as_save_IFS
+
+ ;;
+esac
+# We did not find ourselves, most probably we were run as `sh COMMAND'
+# in which case we are not to be found in the path.
+if test "x$as_myself" = x; then
+ as_myself=$0
+fi
+if test ! -f "$as_myself"; then
+ $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
+ exit 1
+fi
+
+# Unset variables that we do not need and which cause bugs (e.g. in
+# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
+# suppresses any "Segmentation fault" message there. '((' could
+# trigger a bug in pdksh 5.2.14.
+for as_var in BASH_ENV ENV MAIL MAILPATH
+do eval test x\${$as_var+set} = xset \
+ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
+done
+PS1='$ '
+PS2='> '
+PS4='+ '
+
+# NLS nuisances.
+LC_ALL=C
+export LC_ALL
+LANGUAGE=C
+export LANGUAGE
+
+# CDPATH.
+(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
+
+
+# as_fn_error STATUS ERROR [LINENO LOG_FD]
+# ----------------------------------------
+# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
+# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
+# script with STATUS, using 1 if that was 0.
+as_fn_error ()
+{
+ as_status=$1; test $as_status -eq 0 && as_status=1
+ if test "$4"; then
+ as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
+ fi
+ $as_echo "$as_me: error: $2" >&2
+ as_fn_exit $as_status
+} # as_fn_error
+
+
+# as_fn_set_status STATUS
+# -----------------------
+# Set $? to STATUS, without forking.
+as_fn_set_status ()
+{
+ return $1
+} # as_fn_set_status
+
+# as_fn_exit STATUS
+# -----------------
+# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
+as_fn_exit ()
+{
+ set +e
+ as_fn_set_status $1
+ exit $1
+} # as_fn_exit
+
+# as_fn_unset VAR
+# ---------------
+# Portably unset VAR.
+as_fn_unset ()
+{
+ { eval $1=; unset $1;}
+}
+as_unset=as_fn_unset
+# as_fn_append VAR VALUE
+# ----------------------
+# Append the text in VALUE to the end of the definition contained in VAR. Take
+# advantage of any shell optimizations that allow amortized linear growth over
+# repeated appends, instead of the typical quadratic growth present in naive
+# implementations.
+if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
+ eval 'as_fn_append ()
+ {
+ eval $1+=\$2
+ }'
+else
+ as_fn_append ()
+ {
+ eval $1=\$$1\$2
+ }
+fi # as_fn_append
+
+# as_fn_arith ARG...
+# ------------------
+# Perform arithmetic evaluation on the ARGs, and store the result in the
+# global $as_val. Take advantage of shells that can avoid forks. The arguments
+# must be portable across $(()) and expr.
+if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
+ eval 'as_fn_arith ()
+ {
+ as_val=$(( $* ))
+ }'
+else
+ as_fn_arith ()
+ {
+ as_val=`expr "$@" || test $? -eq 1`
+ }
+fi # as_fn_arith
+
+
+if expr a : '\(a\)' >/dev/null 2>&1 &&
+ test "X`expr 00001 : '.*\(...\)'`" = X001; then
+ as_expr=expr
+else
+ as_expr=false
+fi
+
+if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
+ as_basename=basename
+else
+ as_basename=false
+fi
+
+if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
+ as_dirname=dirname
+else
+ as_dirname=false
+fi
+
+as_me=`$as_basename -- "$0" ||
+$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
+ X"$0" : 'X\(//\)$' \| \
+ X"$0" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X/"$0" |
+ sed '/^.*\/\([^/][^/]*\)\/*$/{
+ s//\1/
+ q
+ }
+ /^X\/\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\/\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+
+# Avoid depending upon Character Ranges.
+as_cr_letters='abcdefghijklmnopqrstuvwxyz'
+as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
+as_cr_Letters=$as_cr_letters$as_cr_LETTERS
+as_cr_digits='0123456789'
+as_cr_alnum=$as_cr_Letters$as_cr_digits
+
+ECHO_C= ECHO_N= ECHO_T=
+case `echo -n x` in #(((((
+-n*)
+ case `echo 'xy\c'` in
+ *c*) ECHO_T=' ';; # ECHO_T is single tab character.
+ xy) ECHO_C='\c';;
+ *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
+ ECHO_T=' ';;
+ esac;;
+*)
+ ECHO_N='-n';;
+esac
+
+rm -f conf$$ conf$$.exe conf$$.file
+if test -d conf$$.dir; then
+ rm -f conf$$.dir/conf$$.file
+else
+ rm -f conf$$.dir
+ mkdir conf$$.dir 2>/dev/null
+fi
+if (echo >conf$$.file) 2>/dev/null; then
+ if ln -s conf$$.file conf$$ 2>/dev/null; then
+ as_ln_s='ln -s'
+ # ... but there are two gotchas:
+ # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
+ # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
+ # In both cases, we have to default to `cp -p'.
+ ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
+ as_ln_s='cp -p'
+ elif ln conf$$.file conf$$ 2>/dev/null; then
+ as_ln_s=ln
+ else
+ as_ln_s='cp -p'
+ fi
+else
+ as_ln_s='cp -p'
+fi
+rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
+rmdir conf$$.dir 2>/dev/null
+
+
+# as_fn_mkdir_p
+# -------------
+# Create "$as_dir" as a directory, including parents if necessary.
+as_fn_mkdir_p ()
+{
+
+ case $as_dir in #(
+ -*) as_dir=./$as_dir;;
+ esac
+ test -d "$as_dir" || eval $as_mkdir_p || {
+ as_dirs=
+ while :; do
+ case $as_dir in #(
+ *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
+ *) as_qdir=$as_dir;;
+ esac
+ as_dirs="'$as_qdir' $as_dirs"
+ as_dir=`$as_dirname -- "$as_dir" ||
+$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$as_dir" : 'X\(//\)[^/]' \| \
+ X"$as_dir" : 'X\(//\)$' \| \
+ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$as_dir" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)[^/].*/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+ test -d "$as_dir" && break
+ done
+ test -z "$as_dirs" || eval "mkdir $as_dirs"
+ } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
+
+
+} # as_fn_mkdir_p
+if mkdir -p . 2>/dev/null; then
+ as_mkdir_p='mkdir -p "$as_dir"'
+else
+ test -d ./-p && rmdir ./-p
+ as_mkdir_p=false
+fi
+
+if test -x / >/dev/null 2>&1; then
+ as_test_x='test -x'
+else
+ if ls -dL / >/dev/null 2>&1; then
+ as_ls_L_option=L
+ else
+ as_ls_L_option=
+ fi
+ as_test_x='
+ eval sh -c '\''
+ if test -d "$1"; then
+ test -d "$1/.";
+ else
+ case $1 in #(
+ -*)set "./$1";;
+ esac;
+ case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
+ ???[sx]*):;;*)false;;esac;fi
+ '\'' sh
+ '
+fi
+as_executable_p=$as_test_x
+
+# Sed expression to map a string onto a valid CPP name.
+as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
+
+# Sed expression to map a string onto a valid variable name.
+as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
+
+
+exec 6>&1
+## ----------------------------------- ##
+## Main body of $CONFIG_STATUS script. ##
+## ----------------------------------- ##
+_ASEOF
+test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+# Save the log message, to keep $0 and so on meaningful, and to
+# report actual input values of CONFIG_FILES etc. instead of their
+# values after options handling.
+ac_log="
+This file was extended by newlib $as_me 2.4.0, which was
+generated by GNU Autoconf 2.68. Invocation command line was
+
+ CONFIG_FILES = $CONFIG_FILES
+ CONFIG_HEADERS = $CONFIG_HEADERS
+ CONFIG_LINKS = $CONFIG_LINKS
+ CONFIG_COMMANDS = $CONFIG_COMMANDS
+ $ $0 $@
+
+on `(hostname || uname -n) 2>/dev/null | sed 1q`
+"
+
+_ACEOF
+
+case $ac_config_files in *"
+"*) set x $ac_config_files; shift; ac_config_files=$*;;
+esac
+
+
+
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+# Files that config.status was made for.
+config_files="$ac_config_files"
+config_commands="$ac_config_commands"
+
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+ac_cs_usage="\
+\`$as_me' instantiates files and other configuration actions
+from templates according to the current configuration. Unless the files
+and actions are specified as TAGs, all are instantiated by default.
+
+Usage: $0 [OPTION]... [TAG]...
+
+ -h, --help print this help, then exit
+ -V, --version print version number and configuration settings, then exit
+ --config print configuration, then exit
+ -q, --quiet, --silent
+ do not print progress messages
+ -d, --debug don't remove temporary files
+ --recheck update $as_me by reconfiguring in the same conditions
+ --file=FILE[:TEMPLATE]
+ instantiate the configuration file FILE
+
+Configuration files:
+$config_files
+
+Configuration commands:
+$config_commands
+
+Report bugs to the package provider."
+
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
+ac_cs_version="\\
+newlib config.status 2.4.0
+configured by $0, generated by GNU Autoconf 2.68,
+ with options \\"\$ac_cs_config\\"
+
+Copyright (C) 2010 Free Software Foundation, Inc.
+This config.status script is free software; the Free Software Foundation
+gives unlimited permission to copy, distribute and modify it."
+
+ac_pwd='$ac_pwd'
+srcdir='$srcdir'
+INSTALL='$INSTALL'
+MKDIR_P='$MKDIR_P'
+AWK='$AWK'
+test -n "\$AWK" || AWK=awk
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+# The default lists apply if the user does not specify any file.
+ac_need_defaults=:
+while test $# != 0
+do
+ case $1 in
+ --*=?*)
+ ac_option=`expr "X$1" : 'X\([^=]*\)='`
+ ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
+ ac_shift=:
+ ;;
+ --*=)
+ ac_option=`expr "X$1" : 'X\([^=]*\)='`
+ ac_optarg=
+ ac_shift=:
+ ;;
+ *)
+ ac_option=$1
+ ac_optarg=$2
+ ac_shift=shift
+ ;;
+ esac
+
+ case $ac_option in
+ # Handling of the options.
+ -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
+ ac_cs_recheck=: ;;
+ --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
+ $as_echo "$ac_cs_version"; exit ;;
+ --config | --confi | --conf | --con | --co | --c )
+ $as_echo "$ac_cs_config"; exit ;;
+ --debug | --debu | --deb | --de | --d | -d )
+ debug=: ;;
+ --file | --fil | --fi | --f )
+ $ac_shift
+ case $ac_optarg in
+ *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
+ '') as_fn_error $? "missing file argument" ;;
+ esac
+ as_fn_append CONFIG_FILES " '$ac_optarg'"
+ ac_need_defaults=false;;
+ --he | --h | --help | --hel | -h )
+ $as_echo "$ac_cs_usage"; exit ;;
+ -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+ | -silent | --silent | --silen | --sile | --sil | --si | --s)
+ ac_cs_silent=: ;;
+
+ # This is an error.
+ -*) as_fn_error $? "unrecognized option: \`$1'
+Try \`$0 --help' for more information." ;;
+
+ *) as_fn_append ac_config_targets " $1"
+ ac_need_defaults=false ;;
+
+ esac
+ shift
+done
+
+ac_configure_extra_args=
+
+if $ac_cs_silent; then
+ exec 6>/dev/null
+ ac_configure_extra_args="$ac_configure_extra_args --silent"
+fi
+
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+if \$ac_cs_recheck; then
+ set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
+ shift
+ \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
+ CONFIG_SHELL='$SHELL'
+ export CONFIG_SHELL
+ exec "\$@"
+fi
+
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+exec 5>>config.log
+{
+ echo
+ sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
+## Running $as_me. ##
+_ASBOX
+ $as_echo "$ac_log"
+} >&5
+
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+#
+# INIT-COMMANDS
+#
+AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"
+
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+
+# Handling of arguments.
+for ac_config_target in $ac_config_targets
+do
+ case $ac_config_target in
+ "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
+ "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
+
+ *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
+ esac
+done
+
+
+# If the user did not use the arguments to specify the items to instantiate,
+# then the envvar interface is used. Set only those that are not.
+# We use the long form for the default assignment because of an extremely
+# bizarre bug on SunOS 4.1.3.
+if $ac_need_defaults; then
+ test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
+ test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
+fi
+
+# Have a temporary directory for convenience. Make it in the build tree
+# simply because there is no reason against having it here, and in addition,
+# creating and moving files from /tmp can sometimes cause problems.
+# Hook for its removal unless debugging.
+# Note that there is a small window in which the directory will not be cleaned:
+# after its creation but before its name has been assigned to `$tmp'.
+$debug ||
+{
+ tmp= ac_tmp=
+ trap 'exit_status=$?
+ : "${ac_tmp:=$tmp}"
+ { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
+' 0
+ trap 'as_fn_exit 1' 1 2 13 15
+}
+# Create a (secure) tmp directory for tmp files.
+
+{
+ tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
+ test -d "$tmp"
+} ||
+{
+ tmp=./conf$$-$RANDOM
+ (umask 077 && mkdir "$tmp")
+} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
+ac_tmp=$tmp
+
+# Set up the scripts for CONFIG_FILES section.
+# No need to generate them if there are no CONFIG_FILES.
+# This happens for instance with `./config.status config.h'.
+if test -n "$CONFIG_FILES"; then
+
+
+ac_cr=`echo X | tr X '\015'`
+# On cygwin, bash can eat \r inside `` if the user requested igncr.
+# But we know of no other shell where ac_cr would be empty at this
+# point, so we can use a bashism as a fallback.
+if test "x$ac_cr" = x; then
+ eval ac_cr=\$\'\\r\'
+fi
+ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
+if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
+ ac_cs_awk_cr='\\r'
+else
+ ac_cs_awk_cr=$ac_cr
+fi
+
+echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
+_ACEOF
+
+
+{
+ echo "cat >conf$$subs.awk <<_ACEOF" &&
+ echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
+ echo "_ACEOF"
+} >conf$$subs.sh ||
+ as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
+ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
+ac_delim='%!_!# '
+for ac_last_try in false false false false false :; do
+ . ./conf$$subs.sh ||
+ as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
+
+ ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
+ if test $ac_delim_n = $ac_delim_num; then
+ break
+ elif $ac_last_try; then
+ as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
+ else
+ ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
+ fi
+done
+rm -f conf$$subs.sh
+
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
+_ACEOF
+sed -n '
+h
+s/^/S["/; s/!.*/"]=/
+p
+g
+s/^[^!]*!//
+:repl
+t repl
+s/'"$ac_delim"'$//
+t delim
+:nl
+h
+s/\(.\{148\}\)..*/\1/
+t more1
+s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
+p
+n
+b repl
+:more1
+s/["\\]/\\&/g; s/^/"/; s/$/"\\/
+p
+g
+s/.\{148\}//
+t nl
+:delim
+h
+s/\(.\{148\}\)..*/\1/
+t more2
+s/["\\]/\\&/g; s/^/"/; s/$/"/
+p
+b
+:more2
+s/["\\]/\\&/g; s/^/"/; s/$/"\\/
+p
+g
+s/.\{148\}//
+t delim
+' <conf$$subs.awk | sed '
+/^[^""]/{
+ N
+ s/\n//
+}
+' >>$CONFIG_STATUS || ac_write_fail=1
+rm -f conf$$subs.awk
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+_ACAWK
+cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
+ for (key in S) S_is_set[key] = 1
+ FS = ""
+
+}
+{
+ line = $ 0
+ nfields = split(line, field, "@")
+ substed = 0
+ len = length(field[1])
+ for (i = 2; i < nfields; i++) {
+ key = field[i]
+ keylen = length(key)
+ if (S_is_set[key]) {
+ value = S[key]
+ line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
+ len += length(value) + length(field[++i])
+ substed = 1
+ } else
+ len += 1 + keylen
+ }
+
+ print line
+}
+
+_ACAWK
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
+ sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
+else
+ cat
+fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
+ || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
+_ACEOF
+
+# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
+# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
+# trailing colons and then remove the whole line if VPATH becomes empty
+# (actually we leave an empty line to preserve line numbers).
+if test "x$srcdir" = x.; then
+ ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
+h
+s///
+s/^/:/
+s/[ ]*$/:/
+s/:\$(srcdir):/:/g
+s/:\${srcdir}:/:/g
+s/:@srcdir@:/:/g
+s/^:*//
+s/:*$//
+x
+s/\(=[ ]*\).*/\1/
+G
+s/\n//
+s/^[^=]*=[ ]*$//
+}'
+fi
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+fi # test -n "$CONFIG_FILES"
+
+
+eval set X " :F $CONFIG_FILES :C $CONFIG_COMMANDS"
+shift
+for ac_tag
+do
+ case $ac_tag in
+ :[FHLC]) ac_mode=$ac_tag; continue;;
+ esac
+ case $ac_mode$ac_tag in
+ :[FHL]*:*);;
+ :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
+ :[FH]-) ac_tag=-:-;;
+ :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
+ esac
+ ac_save_IFS=$IFS
+ IFS=:
+ set x $ac_tag
+ IFS=$ac_save_IFS
+ shift
+ ac_file=$1
+ shift
+
+ case $ac_mode in
+ :L) ac_source=$1;;
+ :[FH])
+ ac_file_inputs=
+ for ac_f
+ do
+ case $ac_f in
+ -) ac_f="$ac_tmp/stdin";;
+ *) # Look for the file first in the build tree, then in the source tree
+ # (if the path is not absolute). The absolute path cannot be DOS-style,
+ # because $ac_f cannot contain `:'.
+ test -f "$ac_f" ||
+ case $ac_f in
+ [\\/$]*) false;;
+ *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
+ esac ||
+ as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
+ esac
+ case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
+ as_fn_append ac_file_inputs " '$ac_f'"
+ done
+
+ # Let's still pretend it is `configure' which instantiates (i.e., don't
+ # use $as_me), people would be surprised to read:
+ # /* config.h. Generated by config.status. */
+ configure_input='Generated from '`
+ $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
+ `' by configure.'
+ if test x"$ac_file" != x-; then
+ configure_input="$ac_file. $configure_input"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
+$as_echo "$as_me: creating $ac_file" >&6;}
+ fi
+ # Neutralize special characters interpreted by sed in replacement strings.
+ case $configure_input in #(
+ *\&* | *\|* | *\\* )
+ ac_sed_conf_input=`$as_echo "$configure_input" |
+ sed 's/[\\\\&|]/\\\\&/g'`;; #(
+ *) ac_sed_conf_input=$configure_input;;
+ esac
+
+ case $ac_tag in
+ *:-:* | *:-) cat >"$ac_tmp/stdin" \
+ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
+ esac
+ ;;
+ esac
+
+ ac_dir=`$as_dirname -- "$ac_file" ||
+$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$ac_file" : 'X\(//\)[^/]' \| \
+ X"$ac_file" : 'X\(//\)$' \| \
+ X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$ac_file" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)[^/].*/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+ as_dir="$ac_dir"; as_fn_mkdir_p
+ ac_builddir=.
+
+case "$ac_dir" in
+.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
+*)
+ ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
+ # A ".." for each directory in $ac_dir_suffix.
+ ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
+ case $ac_top_builddir_sub in
+ "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
+ *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
+ esac ;;
+esac
+ac_abs_top_builddir=$ac_pwd
+ac_abs_builddir=$ac_pwd$ac_dir_suffix
+# for backward compatibility:
+ac_top_builddir=$ac_top_build_prefix
+
+case $srcdir in
+ .) # We are building in place.
+ ac_srcdir=.
+ ac_top_srcdir=$ac_top_builddir_sub
+ ac_abs_top_srcdir=$ac_pwd ;;
+ [\\/]* | ?:[\\/]* ) # Absolute name.
+ ac_srcdir=$srcdir$ac_dir_suffix;
+ ac_top_srcdir=$srcdir
+ ac_abs_top_srcdir=$srcdir ;;
+ *) # Relative name.
+ ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
+ ac_top_srcdir=$ac_top_build_prefix$srcdir
+ ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
+esac
+ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
+
+
+ case $ac_mode in
+ :F)
+ #
+ # CONFIG_FILE
+ #
+
+ case $INSTALL in
+ [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
+ *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
+ esac
+ ac_MKDIR_P=$MKDIR_P
+ case $MKDIR_P in
+ [\\/$]* | ?:[\\/]* ) ;;
+ */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
+ esac
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+# If the template does not know about datarootdir, expand it.
+# FIXME: This hack should be removed a few years after 2.60.
+ac_datarootdir_hack=; ac_datarootdir_seen=
+ac_sed_dataroot='
+/datarootdir/ {
+ p
+ q
+}
+/@datadir@/p
+/@docdir@/p
+/@infodir@/p
+/@localedir@/p
+/@mandir@/p'
+case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
+*datarootdir*) ac_datarootdir_seen=yes;;
+*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
+$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+ ac_datarootdir_hack='
+ s&@datadir@&$datadir&g
+ s&@docdir@&$docdir&g
+ s&@infodir@&$infodir&g
+ s&@localedir@&$localedir&g
+ s&@mandir@&$mandir&g
+ s&\\\${datarootdir}&$datarootdir&g' ;;
+esac
+_ACEOF
+
+# Neutralize VPATH when `$srcdir' = `.'.
+# Shell code in configure.ac might set extrasub.
+# FIXME: do we really want to maintain this feature?
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+ac_sed_extra="$ac_vpsub
+$extrasub
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+:t
+/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
+s|@configure_input@|$ac_sed_conf_input|;t t
+s&@top_builddir@&$ac_top_builddir_sub&;t t
+s&@top_build_prefix@&$ac_top_build_prefix&;t t
+s&@srcdir@&$ac_srcdir&;t t
+s&@abs_srcdir@&$ac_abs_srcdir&;t t
+s&@top_srcdir@&$ac_top_srcdir&;t t
+s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
+s&@builddir@&$ac_builddir&;t t
+s&@abs_builddir@&$ac_abs_builddir&;t t
+s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
+s&@INSTALL@&$ac_INSTALL&;t t
+s&@MKDIR_P@&$ac_MKDIR_P&;t t
+$ac_datarootdir_hack
+"
+eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
+ >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
+
+test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
+ { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
+ { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
+ "$ac_tmp/out"`; test -z "$ac_out"; } &&
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
+which seems to be undefined. Please make sure it is defined" >&5
+$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
+which seems to be undefined. Please make sure it is defined" >&2;}
+
+ rm -f "$ac_tmp/stdin"
+ case $ac_file in
+ -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
+ *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
+ esac \
+ || as_fn_error $? "could not create $ac_file" "$LINENO" 5
+ ;;
+
+
+ :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
+$as_echo "$as_me: executing $ac_file commands" >&6;}
+ ;;
+ esac
+
+
+ case $ac_file$ac_mode in
+ "depfiles":C) test x"$AMDEP_TRUE" != x"" || {
+ # Autoconf 2.62 quotes --file arguments for eval, but not when files
+ # are listed without --file. Let's play safe and only enable the eval
+ # if we detect the quoting.
+ case $CONFIG_FILES in
+ *\'*) eval set x "$CONFIG_FILES" ;;
+ *) set x $CONFIG_FILES ;;
+ esac
+ shift
+ for mf
+ do
+ # Strip MF so we end up with the name of the file.
+ mf=`echo "$mf" | sed -e 's/:.*$//'`
+ # Check whether this is an Automake generated Makefile or not.
+ # We used to match only the files named `Makefile.in', but
+ # some people rename them; so instead we look at the file content.
+ # Grep'ing the first line is not enough: some people post-process
+ # each Makefile.in and add a new line on top of each file to say so.
+ # Grep'ing the whole file is not good either: AIX grep has a line
+ # limit of 2048, but all sed's we know have understand at least 4000.
+ if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
+ dirpart=`$as_dirname -- "$mf" ||
+$as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$mf" : 'X\(//\)[^/]' \| \
+ X"$mf" : 'X\(//\)$' \| \
+ X"$mf" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$mf" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)[^/].*/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+ else
+ continue
+ fi
+ # Extract the definition of DEPDIR, am__include, and am__quote
+ # from the Makefile without running `make'.
+ DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
+ test -z "$DEPDIR" && continue
+ am__include=`sed -n 's/^am__include = //p' < "$mf"`
+ test -z "am__include" && continue
+ am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
+ # When using ansi2knr, U may be empty or an underscore; expand it
+ U=`sed -n 's/^U = //p' < "$mf"`
+ # Find all dependency output files, they are included files with
+ # $(DEPDIR) in their names. We invoke sed twice because it is the
+ # simplest approach to changing $(DEPDIR) to its actual value in the
+ # expansion.
+ for file in `sed -n "
+ s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
+ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
+ # Make sure the directory exists.
+ test -f "$dirpart/$file" && continue
+ fdir=`$as_dirname -- "$file" ||
+$as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$file" : 'X\(//\)[^/]' \| \
+ X"$file" : 'X\(//\)$' \| \
+ X"$file" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$file" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)[^/].*/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+ as_dir=$dirpart/$fdir; as_fn_mkdir_p
+ # echo "creating $dirpart/$file"
+ echo '# dummy' > "$dirpart/$file"
+ done
+ done
+}
+ ;;
+
+ esac
+done # for ac_tag
+
+
+as_fn_exit 0
+_ACEOF
+ac_clean_files=$ac_clean_files_save
+
+test $ac_write_fail = 0 ||
+ as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
+
+
+# configure is writing to config.log, and then calls config.status.
+# config.status does its own redirection, appending to config.log.
+# Unfortunately, on DOS this fails, as config.log is still kept open
+# by configure, so config.status won't be able to write to it; its
+# output is simply discarded. So we exec the FD to /dev/null,
+# effectively closing config.log, so it can be properly (re)opened and
+# appended to by config.status. When coming back to configure, we
+# need to make the FD available again.
+if test "$no_create" != yes; then
+ ac_cs_success=:
+ ac_config_status_args=
+ test "$silent" = yes &&
+ ac_config_status_args="$ac_config_status_args --quiet"
+ exec 5>/dev/null
+ $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
+ exec 5>>config.log
+ # Use ||, not &&, to avoid exiting from the if with $? = 1, which
+ # would make configure fail if this is the last instruction.
+ $ac_cs_success || as_fn_exit 1
+fi
+if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
+$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
+fi
+
diff --git a/newlib/libm/machine/nds32/configure.in b/newlib/libm/machine/nds32/configure.in
new file mode 100644
index 000000000..2b7a3c0fb
--- /dev/null
+++ b/newlib/libm/machine/nds32/configure.in
@@ -0,0 +1,35 @@
+dnl This is the newlib/libm/machine/nds32 configure.in file.
+dnl Process this file with autoconf to produce a configure script.
+
+AC_PREREQ(2.59)
+AC_INIT([newlib],[NEWLIB_VERSION])
+AC_CONFIG_SRCDIR([Makefile.am])
+
+dnl Can't be done in NEWLIB_CONFIGURE because that confuses automake.
+AC_CONFIG_AUX_DIR(../../../..)
+
+NEWLIB_CONFIGURE(../../..)
+
+
+dnl Use builtin macro to detect if FPU extension support is on.
+AC_NO_EXECUTABLES
+AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
+[[#if (__NDS32_EXT_FPU_SP__)
+warning: Has nds32 FPU SP extension support
+#endif
+]])],
+ [has_nds32_fpu_sp="no"],
+ [has_nds32_fpu_sp="yes"])
+AM_CONDITIONAL(HAS_NDS32_FPU_SP, test "$has_nds32_fpu_sp" = "yes")
+
+AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
+[[#if (__NDS32_EXT_FPU_DP__)
+warning: Has nds32 FPU DP extension support
+#endif
+]])],
+ [has_nds32_fpu_dp="no"],
+ [has_nds32_fpu_dp="yes"])
+AM_CONDITIONAL(HAS_NDS32_FPU_DP, test "$has_nds32_fpu_dp" = "yes")
+
+AC_CONFIG_FILES([Makefile])
+AC_OUTPUT
diff --git a/libgloss/nds32/syscall_read.S b/newlib/libm/machine/nds32/w_sqrt.S
index 5c485c547..a3c543d0d 100644
--- a/libgloss/nds32/syscall_read.S
+++ b/newlib/libm/machine/nds32/w_sqrt.S
@@ -1,5 +1,5 @@
/*
-Copyright (c) 2013 Andes Technology Corporation.
+Copyright (c) 2013-2014 Andes Technology Corporation.
All rights reserved.
Redistribution and use in source and binary forms, with or without
@@ -27,30 +27,42 @@ 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 "../syscall.h"
-#include "syscall_extra.h"
-
-
- .extern errno
-
- .section .text
- .global _read
- .type _read, @function
- .align 2
-_read:
- /* Make syscall 'SYS_read'.
- Reture value '-1' stored in $r0 means there is something wrong.
- If there is something wrong, make syscall 'SYS_geterr' to get
- error code to see what exactly happens and store it in errno . */
- syscall SYS_read
- addi $r1, $r0, 1
- bnez $r1, .Ldone
- syscall SYS_geterr
- /* Return value '11' stored in $r0 means we need to try again. */
- addi $r1, $r0, -11
- beqz $r1, _read
- s.w $r0, errno
- movi $r0, -1
-.Ldone:
+ .text
+ .align 1
+ .global sqrt
+ .type sqrt, @function
+sqrt:
+ /* The input argument is supposed to be stored in $fd0.
+ The return value is supposed to be stored in $fd0 either. */
+
+ /* Clear the IEEE cumulative exceptions flags. ($fpcsr.b[6:2]) */
+ FMFCSR $r0
+ bitci $r0, $r0, #0b1111100
+ FMTCSR $r0
+
+ fsqrtd $fd0, $fd0
+
+ /* Check the IEEE cumulative exceptions flags. */
+ FMFCSR $r0
+ bmski33 $r0, #2 /* Is $fpcsr.IVO('b2) set ? */
+ bnez $r0, .L_EDOM /* Set errno as EDOM. */
+
+ bmski33 $r0, #4 /* Is $fpcsr.OVF('b4) set ? */
+ bnez $r0, .L_ERANGE /* Set errno as ERANGE. */
+
+ bmski33 $r0, #5 /* Is $fpcsr.UDF('b5) set ? */
+ bnez $r0, .L_ERANGE /* Set errno as ERANGE. */
+
+ /* No error at all. Just ret. */
+ ret
+
+.L_EDOM:
+ movi $r0, #33 /* EDOM: Math arg out of domain of func. */
+ j .L_Set_errno
+.L_ERANGE:
+ movi $r0, #34 /* ERANGE: Math result not representable. */
+.L_Set_errno:
+ l.w $r15, _impure_ptr
+ swi $r0, [$r15] /* Set errno. */
ret
- .size _read, .-_read
+ .size sqrt, .-sqrt
diff --git a/newlib/libm/machine/nds32/wf_sqrt.S b/newlib/libm/machine/nds32/wf_sqrt.S
new file mode 100644
index 000000000..e000d7536
--- /dev/null
+++ b/newlib/libm/machine/nds32/wf_sqrt.S
@@ -0,0 +1,68 @@
+/*
+Copyright (c) 2013-2014 Andes Technology Corporation.
+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 the company 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.
+*/
+ .text
+ .align 1
+ .global sqrtf
+ .type sqrtf, @function
+sqrtf:
+ /* The input argument is supposed to be stored in $fs0.
+ The return value is supposed to be stored in $fs0 either. */
+
+ /* Clear the IEEE cumulative exceptions flags. ($fpcsr.b[6:2]) */
+ FMFCSR $r0
+ bitci $r0, $r0, #0b1111100
+ FMTCSR $r0
+
+ fsqrts $fs0, $fs0
+
+ /* Check the IEEE cumulative exceptions flags. */
+ FMFCSR $r5
+ bmski33 $r5, #2 /* Is $fpcsr.IVO('b2) set ? */
+ bnez $r5, .L_EDOM /* Set errno as EDOM. */
+
+ bmski33 $r5, #4 /* Is $fpcsr.OVF('b4) set ? */
+ bnez $r5, .L_ERANGE /* Set errno as ERANGE. */
+
+ bmski33 $r5, #5 /* Is $fpcsr.UDF('b5) set ? */
+ bnez $r5, .L_ERANGE /* Set errno as ERANGE. */
+
+ /* No error at all. Just ret. */
+ ret
+
+.L_EDOM:
+ movi $r0, #33 /* EDOM: Math arg out of domain of func. */
+ j .L_Set_errno
+.L_ERANGE:
+ movi $r0, #34 /* ERANGE: Math result not representable. */
+.L_Set_errno:
+ l.w $r15, _impure_ptr
+ swi $r0, [$r15] /* Set errno. */
+ ret
+ .size sqrtf, .-sqrtf
diff --git a/newlib/libm/machine/spu/Makefile.in b/newlib/libm/machine/spu/Makefile.in
index 3ac4e36ea..b5fcc8d02 100644
--- a/newlib/libm/machine/spu/Makefile.in
+++ b/newlib/libm/machine/spu/Makefile.in
@@ -287,12 +287,19 @@ lib_a_SOURCES = $(LIB_SOURCES)
lib_a_CFLAGS = $(AM_CFLAGS)
lib_a_CCASFLAGS = $(AM_CCASFLAGS)
noinst_DATA =
+
+#
+# documentation rules
+#
+SUFFIXES = .def
+CHEW = ${top_builddir}/../doc/makedoc -f $(top_srcdir)/../doc/doc.str
+CLEANFILES = $(CHEWOUT_FILES) *.ref
ACLOCAL_AMFLAGS = -I ../../.. -I ../../../..
CONFIG_STATUS_DEPENDENCIES = $(newlib_basedir)/configure.host
all: all-am
.SUFFIXES:
-.SUFFIXES: .c .o .obj
+.SUFFIXES: .def .c .o .obj
am--refresh: Makefile
@:
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(srcdir)/../../../Makefile.shared $(am__configure_deps)
@@ -1175,6 +1182,7 @@ install-strip:
mostlyclean-generic:
clean-generic:
+ -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
distclean-generic:
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
@@ -1275,6 +1283,18 @@ objectlist.awk.in: $(noinst_LTLIBRARIES)
echo $$i `pwd`/$$i >> objectlist.awk.in ; \
done
+.c.def:
+ $(CHEW) < $< > $*.def 2> $*.ref
+ touch stmp-def
+
+TARGETDOC ?= ../tmp.texi
+
+doc: $(CHEWOUT_FILES)
+ for chapter in $(CHAPTERS) ; \
+ do \
+ cat $(srcdir)/$$chapter >> $(TARGETDOC) ; \
+ done
+
# 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/libm/machine/spu/configure b/newlib/libm/machine/spu/configure
index 7f4d0d6df..bc041896f 100644
--- a/newlib/libm/machine/spu/configure
+++ b/newlib/libm/machine/spu/configure
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.68 for newlib 2.0.0.
+# Generated by GNU Autoconf 2.68 for newlib 2.4.0.
#
#
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
@@ -556,8 +556,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='newlib'
PACKAGE_TARNAME='newlib'
-PACKAGE_VERSION='2.0.0'
-PACKAGE_STRING='newlib 2.0.0'
+PACKAGE_VERSION='2.4.0'
+PACKAGE_STRING='newlib 2.4.0'
PACKAGE_BUGREPORT=''
PACKAGE_URL=''
@@ -1239,7 +1239,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures newlib 2.0.0 to adapt to many kinds of systems.
+\`configure' configures newlib 2.4.0 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1309,7 +1309,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of newlib 2.0.0:";;
+ short | recursive ) echo "Configuration of newlib 2.4.0:";;
esac
cat <<\_ACEOF
@@ -1400,7 +1400,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-newlib configure 2.0.0
+newlib configure 2.4.0
generated by GNU Autoconf 2.68
Copyright (C) 2010 Free Software Foundation, Inc.
@@ -1455,7 +1455,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by newlib $as_me 2.0.0, which was
+It was created by newlib $as_me 2.4.0, which was
generated by GNU Autoconf 2.68. Invocation command line was
$ $0 $@
@@ -2527,7 +2527,7 @@ fi
# Define the identity of the package.
PACKAGE='newlib'
- VERSION='2.0.0'
+ VERSION='2.4.0'
# Some tools Automake needs.
@@ -4007,7 +4007,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by newlib $as_me 2.0.0, which was
+This file was extended by newlib $as_me 2.4.0, which was
generated by GNU Autoconf 2.68. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -4064,7 +4064,7 @@ _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
-newlib config.status 2.0.0
+newlib config.status 2.4.0
configured by $0, generated by GNU Autoconf 2.68,
with options \\"\$ac_cs_config\\"
diff --git a/newlib/libm/machine/spu/sf_isinf.c b/newlib/libm/machine/spu/sf_isinf.c
index 3c5f8d81f..6460ec13d 100644
--- a/newlib/libm/machine/spu/sf_isinf.c
+++ b/newlib/libm/machine/spu/sf_isinf.c
@@ -34,7 +34,7 @@
/*
* On the SPU isinff(x) always returns 0.
*
- * isinff is an extension declared in <ieeefp.h>.
+ * isinff is an extension declared in <math.h>.
*/
int
isinff (float x)
diff --git a/newlib/libm/math/Makefile.am b/newlib/libm/math/Makefile.am
index a4589ada2..9e8e92840 100644
--- a/newlib/libm/math/Makefile.am
+++ b/newlib/libm/math/Makefile.am
@@ -50,22 +50,24 @@ fsrc = kf_rem_pio2.c \
sf_tan.c sf_tanh.c \
wf_exp2.c wf_tgamma.c
+lsrc = el_hypot.c
+
libmath_la_LDFLAGS = -Xcompiler -nostdlib
if USE_LIBTOOL
noinst_LTLIBRARIES = libmath.la
-libmath_la_SOURCES = $(src) $(fsrc)
+libmath_la_SOURCES = $(src) $(fsrc) $(lsrc)
noinst_DATA = objectlist.awk.in
else
noinst_LIBRARIES = lib.a
-lib_a_SOURCES = $(src) $(fsrc)
+lib_a_SOURCES = $(src) $(fsrc) $(lsrc)
lib_a_CFLAGS = $(AM_CFLAGS)
noinst_DATA =
endif # USE_LIBTOOL
include $(srcdir)/../../Makefile.shared
-chobj = w_acos.def w_acosh.def w_asin.def s_asinh.def \
+CHEWOUT_FILES = w_acos.def w_acosh.def w_asin.def s_asinh.def \
s_atan.def w_atan2.def w_atanh.def w_j0.def \
w_cosh.def s_erf.def w_exp.def w_exp2.def \
s_fabs.def s_floor.def w_fmod.def s_frexp.def \
@@ -74,20 +76,7 @@ chobj = w_acos.def w_acosh.def w_asin.def s_asinh.def \
w_pow.def w_remainder.def s_sin.def w_sinh.def \
w_sqrt.def s_tan.def s_tanh.def
-SUFFIXES = .def
-
-CHEW = ../../doc/makedoc -f $(srcdir)/../../doc/doc.str
-
-.c.def:
- $(CHEW) < $< > $*.def 2> $*.ref
- touch stmp-def
-
-TARGETDOC = ../tmp.texi
-
-doc: $(chobj)
- cat $(srcdir)/math.tex >> $(TARGETDOC)
-
-CLEANFILES = $(chobj) *.ref
+CHAPTERS = math.tex
# A partial dependency list.
diff --git a/newlib/libm/math/Makefile.in b/newlib/libm/math/Makefile.in
index 10f6ca563..0f2aa010e 100644
--- a/newlib/libm/math/Makefile.in
+++ b/newlib/libm/math/Makefile.in
@@ -138,12 +138,13 @@ am__objects_2 = lib_a-kf_rem_pio2.$(OBJEXT) lib_a-kf_cos.$(OBJEXT) \
lib_a-sf_signif.$(OBJEXT) lib_a-sf_sin.$(OBJEXT) \
lib_a-sf_tan.$(OBJEXT) lib_a-sf_tanh.$(OBJEXT) \
lib_a-wf_exp2.$(OBJEXT) lib_a-wf_tgamma.$(OBJEXT)
+am__objects_3 = lib_a-el_hypot.$(OBJEXT)
@USE_LIBTOOL_FALSE@am_lib_a_OBJECTS = $(am__objects_1) \
-@USE_LIBTOOL_FALSE@ $(am__objects_2)
+@USE_LIBTOOL_FALSE@ $(am__objects_2) $(am__objects_3)
lib_a_OBJECTS = $(am_lib_a_OBJECTS)
LTLIBRARIES = $(noinst_LTLIBRARIES)
libmath_la_LIBADD =
-am__objects_3 = k_standard.lo k_rem_pio2.lo k_cos.lo k_sin.lo k_tan.lo \
+am__objects_4 = k_standard.lo k_rem_pio2.lo k_cos.lo k_sin.lo k_tan.lo \
e_acos.lo e_acosh.lo e_asin.lo e_atan2.lo e_atanh.lo e_cosh.lo \
e_exp.lo e_fmod.lo er_gamma.lo e_hypot.lo e_j0.lo e_j1.lo \
e_jn.lo er_lgamma.lo e_log.lo e_log10.lo e_pow.lo \
@@ -155,7 +156,7 @@ am__objects_3 = k_standard.lo k_rem_pio2.lo k_cos.lo k_sin.lo k_tan.lo \
w_sincos.lo w_drem.lo s_asinh.lo s_atan.lo s_ceil.lo s_cos.lo \
s_erf.lo s_fabs.lo s_floor.lo s_frexp.lo s_ldexp.lo \
s_signif.lo s_sin.lo s_tan.lo s_tanh.lo w_exp2.lo w_tgamma.lo
-am__objects_4 = kf_rem_pio2.lo kf_cos.lo kf_sin.lo kf_tan.lo \
+am__objects_5 = kf_rem_pio2.lo kf_cos.lo kf_sin.lo kf_tan.lo \
ef_acos.lo ef_acosh.lo ef_asin.lo ef_atan2.lo ef_atanh.lo \
ef_cosh.lo ef_exp.lo ef_fmod.lo erf_gamma.lo ef_hypot.lo \
ef_j0.lo ef_j1.lo ef_jn.lo erf_lgamma.lo ef_log.lo ef_log10.lo \
@@ -169,8 +170,9 @@ am__objects_4 = kf_rem_pio2.lo kf_cos.lo kf_sin.lo kf_tan.lo \
sf_cos.lo sf_erf.lo sf_fabs.lo sf_floor.lo sf_frexp.lo \
sf_ldexp.lo sf_signif.lo sf_sin.lo sf_tan.lo sf_tanh.lo \
wf_exp2.lo wf_tgamma.lo
-@USE_LIBTOOL_TRUE@am_libmath_la_OBJECTS = $(am__objects_3) \
-@USE_LIBTOOL_TRUE@ $(am__objects_4)
+am__objects_6 = el_hypot.lo
+@USE_LIBTOOL_TRUE@am_libmath_la_OBJECTS = $(am__objects_4) \
+@USE_LIBTOOL_TRUE@ $(am__objects_5) $(am__objects_6)
libmath_la_OBJECTS = $(am_libmath_la_OBJECTS)
libmath_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
$(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
@@ -372,15 +374,23 @@ fsrc = kf_rem_pio2.c \
sf_tan.c sf_tanh.c \
wf_exp2.c wf_tgamma.c
+lsrc = el_hypot.c
libmath_la_LDFLAGS = -Xcompiler -nostdlib
@USE_LIBTOOL_TRUE@noinst_LTLIBRARIES = libmath.la
-@USE_LIBTOOL_TRUE@libmath_la_SOURCES = $(src) $(fsrc)
+@USE_LIBTOOL_TRUE@libmath_la_SOURCES = $(src) $(fsrc) $(lsrc)
@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 = $(src) $(fsrc)
+@USE_LIBTOOL_FALSE@lib_a_SOURCES = $(src) $(fsrc) $(lsrc)
@USE_LIBTOOL_FALSE@lib_a_CFLAGS = $(AM_CFLAGS)
-chobj = w_acos.def w_acosh.def w_asin.def s_asinh.def \
+
+#
+# documentation rules
+#
+SUFFIXES = .def
+CHEW = ${top_builddir}/../doc/makedoc -f $(top_srcdir)/../doc/doc.str
+CLEANFILES = $(CHEWOUT_FILES) *.ref
+CHEWOUT_FILES = w_acos.def w_acosh.def w_asin.def s_asinh.def \
s_atan.def w_atan2.def w_atanh.def w_j0.def \
w_cosh.def s_erf.def w_exp.def w_exp2.def \
s_fabs.def s_floor.def w_fmod.def s_frexp.def \
@@ -389,10 +399,7 @@ chobj = w_acos.def w_acosh.def w_asin.def s_asinh.def \
w_pow.def w_remainder.def s_sin.def w_sinh.def \
w_sqrt.def s_tan.def s_tanh.def
-SUFFIXES = .def
-CHEW = ../../doc/makedoc -f $(srcdir)/../../doc/doc.str
-TARGETDOC = ../tmp.texi
-CLEANFILES = $(chobj) *.ref
+CHAPTERS = math.tex
all: all-am
.SUFFIXES:
@@ -1260,6 +1267,12 @@ lib_a-wf_tgamma.o: wf_tgamma.c
lib_a-wf_tgamma.obj: wf_tgamma.c
$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-wf_tgamma.obj `if test -f 'wf_tgamma.c'; then $(CYGPATH_W) 'wf_tgamma.c'; else $(CYGPATH_W) '$(srcdir)/wf_tgamma.c'; fi`
+lib_a-el_hypot.o: el_hypot.c
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-el_hypot.o `test -f 'el_hypot.c' || echo '$(srcdir)/'`el_hypot.c
+
+lib_a-el_hypot.obj: el_hypot.c
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-el_hypot.obj `if test -f 'el_hypot.c'; then $(CYGPATH_W) 'el_hypot.c'; else $(CYGPATH_W) '$(srcdir)/el_hypot.c'; fi`
+
mostlyclean-libtool:
-rm -f *.lo
@@ -1448,8 +1461,13 @@ objectlist.awk.in: $(noinst_LTLIBRARIES)
$(CHEW) < $< > $*.def 2> $*.ref
touch stmp-def
-doc: $(chobj)
- cat $(srcdir)/math.tex >> $(TARGETDOC)
+TARGETDOC ?= ../tmp.texi
+
+doc: $(CHEWOUT_FILES)
+ for chapter in $(CHAPTERS) ; \
+ do \
+ cat $(srcdir)/$$chapter >> $(TARGETDOC) ; \
+ done
# A partial dependency list.
diff --git a/newlib/libm/math/e_sqrt.c b/newlib/libm/math/e_sqrt.c
index 460125a8f..78fc52417 100644
--- a/newlib/libm/math/e_sqrt.c
+++ b/newlib/libm/math/e_sqrt.c
@@ -99,7 +99,7 @@ static double one = 1.0, tiny=1.0e-300;
#endif
{
double z;
- __int32_t sign = (int)0x80000000;
+ __int32_t sign = 0x80000000;
__uint32_t r,t1,s1,ix1,q1;
__int32_t ix0,s0,q,m,t,i;
diff --git a/newlib/libm/math/el_hypot.c b/newlib/libm/math/el_hypot.c
new file mode 100644
index 000000000..737cde36b
--- /dev/null
+++ b/newlib/libm/math/el_hypot.c
@@ -0,0 +1,18 @@
+/* Copyright (C) 2015 by Red Hat, Incorporated. All rights reserved.
+ *
+ * Permission to use, copy, modify, and distribute this software
+ * is freely granted, provided that this notice is preserved.
+ */
+
+#include "fdlibm.h"
+
+long double
+__ieee754_hypotl (long double x, long double y)
+{
+#ifdef _LDBL_EQ_DBL
+ return __ieee754_hypot (x, y);
+#else
+ /* Keep it simple for now... */
+ return sqrtl ((x * x) + (y * y));
+#endif
+}
diff --git a/newlib/libm/math/math.tex b/newlib/libm/math/math.tex
index 608268ab9..a6f931b3e 100644
--- a/newlib/libm/math/math.tex
+++ b/newlib/libm/math/math.tex
@@ -51,6 +51,7 @@ machines---are available when you include @file{fastmath.h} instead of
* cosh:: Hyperbolic cosine
* erf:: Error function (erf, erfc)
* exp:: Exponential, base e
+* exp10:: Exponential, base 10
* exp2:: Exponential, base 2
* expm1:: Exponential, base e, of x - 1
* fabs:: Absolute value (magnitude)
@@ -81,6 +82,7 @@ machines---are available when you include @file{fastmath.h} instead of
* nearbyint:: Round to integer
* nextafter:: Get next representable number
* pow:: X to the power Y
+* pow10:: 10 to the power X
* remainder:: remainder of X divided by Y
* remquo:: Remainder and part of quotient
* rint:: Round to integer
@@ -162,58 +164,117 @@ registered trademark of The IEEE.
@c to reflect function name of Bessel (as opposed to j; e.g. after atanh,
@c before cbrt).
-@page @include math/w_acos.def
-@page @include math/w_acosh.def
-@page @include math/w_asin.def
-@page @include math/s_asinh.def
-@page @include math/s_atan.def
-@page @include math/w_atan2.def
-@page @include math/w_atanh.def
-@page @include math/w_j0.def
-@page @include common/s_cbrt.def
-@page @include common/s_copysign.def
-@page @include math/w_cosh.def
-@page @include math/s_erf.def
-@page @include math/w_exp.def
-@page @include math/w_exp2.def
-@page @include common/s_expm1.def
-@page @include math/s_fabs.def
-@page @include common/s_fdim.def
-@page @include math/s_floor.def
-@page @include common/s_fma.def
-@page @include common/s_fmax.def
-@page @include common/s_fmin.def
-@page @include math/w_fmod.def
-@page @include math/s_frexp.def
-@page @include math/w_gamma.def
-@page @include math/w_hypot.def
-@page @include common/s_ilogb.def
-@page @include common/s_infinity.def
-@page @include common/isgreater.def
-@page @include common/s_isnan.def
-@page @include math/s_ldexp.def
-@page @include math/w_log.def
-@page @include math/w_log10.def
-@page @include common/s_log1p.def
-@page @include common/s_log2.def
-@page @include common/s_logb.def
-@page @include common/s_lrint.def
-@page @include common/s_lround.def
-@page @include common/s_matherr.def
-@page @include common/s_modf.def
-@page @include common/s_nan.def
-@page @include common/s_nearbyint.def
-@page @include common/s_nextafter.def
-@page @include math/w_pow.def
-@page @include math/w_remainder.def
-@page @include common/s_remquo.def
-@page @include common/s_rint.def
-@page @include common/s_round.def
-@page @include common/s_scalbn.def
-@page @include common/s_signbit.def
-@page @include math/s_sin.def
-@page @include math/w_sinh.def
-@page @include math/w_sqrt.def
-@page @include math/s_tan.def
-@page @include math/s_tanh.def
-@page @include common/s_trunc.def
+@page
+@include math/w_acos.def
+@page
+@include math/w_acosh.def
+@page
+@include math/w_asin.def
+@page
+@include math/s_asinh.def
+@page
+@include math/s_atan.def
+@page
+@include math/w_atan2.def
+@page
+@include math/w_atanh.def
+@page
+@include math/w_j0.def
+@page
+@include common/s_cbrt.def
+@page
+@include common/s_copysign.def
+@page
+@include math/w_cosh.def
+@page
+@include math/s_erf.def
+@page
+@include math/w_exp.def
+@page
+@include common/s_exp10.def
+@page
+@include math/w_exp2.def
+@page
+@include common/s_expm1.def
+@page
+@include math/s_fabs.def
+@page
+@include common/s_fdim.def
+@page
+@include math/s_floor.def
+@page
+@include common/s_fma.def
+@page
+@include common/s_fmax.def
+@page
+@include common/s_fmin.def
+@page
+@include math/w_fmod.def
+@page
+@include math/s_frexp.def
+@page
+@include math/w_gamma.def
+@page
+@include math/w_hypot.def
+@page
+@include common/s_ilogb.def
+@page
+@include common/s_infinity.def
+@page
+@include common/isgreater.def
+@page
+@include common/s_isnan.def
+@page
+@include math/s_ldexp.def
+@page
+@include math/w_log.def
+@page
+@include math/w_log10.def
+@page
+@include common/s_log1p.def
+@page
+@include common/s_log2.def
+@page
+@include common/s_logb.def
+@page
+@include common/s_lrint.def
+@page
+@include common/s_lround.def
+@page
+@include common/s_matherr.def
+@page
+@include common/s_modf.def
+@page
+@include common/s_nan.def
+@page
+@include common/s_nearbyint.def
+@page
+@include common/s_nextafter.def
+@page
+@include math/w_pow.def
+@page
+@include common/s_pow10.def
+@page
+@include math/w_remainder.def
+@page
+@include common/s_remquo.def
+@page
+@include common/s_rint.def
+@page
+@include common/s_round.def
+@page
+@include common/s_scalbn.def
+@page
+@include common/s_signbit.def
+@page
+@include math/s_sin.def
+@page
+@include math/w_sinh.def
+@page
+@include math/w_sqrt.def
+@page
+@include math/s_tan.def
+@page
+@include math/s_tanh.def
+@page
+@include common/s_trunc.def
diff --git a/newlib/libm/math/w_acos.c b/newlib/libm/math/w_acos.c
index fdf2eb07e..8ce7887ea 100644
--- a/newlib/libm/math/w_acos.c
+++ b/newlib/libm/math/w_acos.c
@@ -58,7 +58,8 @@ RETURNS
You can modify error handling for these functions using <<matherr>>.
-QUICKREF ANSI SVID POSIX RENTRANT
+QUICKREF
+ ansi svid posix rentrant
acos y,y,y,m
acosf n,n,n,m
diff --git a/newlib/libm/math/w_acosh.c b/newlib/libm/math/w_acosh.c
index 022c5c6ee..93032600b 100644
--- a/newlib/libm/math/w_acosh.c
+++ b/newlib/libm/math/w_acosh.c
@@ -60,7 +60,8 @@ Neither <<acosh>> nor <<acoshf>> are ANSI C. They are not recommended
for portable programs.
-QUICKREF ANSI SVID POSIX RENTRANT
+QUICKREF
+ ansi svid posix rentrant
acos n,n,n,m
acosf n,n,n,m
diff --git a/newlib/libm/math/w_asin.c b/newlib/libm/math/w_asin.c
index e7884b2e3..c49111d27 100644
--- a/newlib/libm/math/w_asin.c
+++ b/newlib/libm/math/w_asin.c
@@ -59,7 +59,8 @@ return NaN (not a number), set the global variable <<errno>> to
You can change this error treatment using <<matherr>>.
-QUICKREF ANSI SVID POSIX RENTRANT
+QUICKREF
+ ansi svid posix rentrant
asin y,y,y,m
asinf n,n,n,m
diff --git a/newlib/libm/math/w_cosh.c b/newlib/libm/math/w_cosh.c
index ab046f6ed..54bfec37d 100644
--- a/newlib/libm/math/w_cosh.c
+++ b/newlib/libm/math/w_cosh.c
@@ -19,14 +19,14 @@ FUNCTION
ANSI_SYNOPSIS
#include <math.h>
double cosh(double <[x]>);
- float coshf(float <[x]>)
+ float coshf(float <[x]>);
TRAD_SYNOPSIS
#include <math.h>
- double cosh(<[x]>)
+ double cosh(<[x]>);
double <[x]>;
- float coshf(<[x]>)
+ float coshf(<[x]>);
float <[x]>;
DESCRIPTION
diff --git a/newlib/libm/math/w_exp2.c b/newlib/libm/math/w_exp2.c
index efb676df1..857cb0cdc 100644
--- a/newlib/libm/math/w_exp2.c
+++ b/newlib/libm/math/w_exp2.c
@@ -13,7 +13,7 @@
/*
FUNCTION
- <<exp2>>, <<exp2f>>--exponential, base 2
+ <<exp2>>, <<exp2f>>---exponential, base 2
INDEX
exp2
INDEX
diff --git a/newlib/libm/math/w_fmod.c b/newlib/libm/math/w_fmod.c
index 47d1dd081..f9f72c745 100644
--- a/newlib/libm/math/w_fmod.c
+++ b/newlib/libm/math/w_fmod.c
@@ -22,15 +22,15 @@ fmodf
ANSI_SYNOPSIS
#include <math.h>
-double fmod(double <[x]>, double <[y]>)
-float fmodf(float <[x]>, float <[y]>)
+double fmod(double <[x]>, double <[y]>);
+float fmodf(float <[x]>, float <[y]>);
TRAD_SYNOPSIS
#include <math.h>
-double fmod(<[x]>, <[y]>)
+double fmod(<[x]>, <[y]>);
double (<[x]>, <[y]>);
-float fmodf(<[x]>, <[y]>)
+float fmodf(<[x]>, <[y]>);
float (<[x]>, <[y]>);
DESCRIPTION
diff --git a/newlib/libm/math/w_gamma.c b/newlib/libm/math/w_gamma.c
index 3717f53e5..d1a70df2f 100644
--- a/newlib/libm/math/w_gamma.c
+++ b/newlib/libm/math/w_gamma.c
@@ -24,7 +24,7 @@ gamma function.
matching a newer, better definition. */
/*
FUNCTION
- <<gamma>>, <<gammaf>>, <<lgamma>>, <<lgammaf>>, <<gamma_r>>, <<gammaf_r>>, <<lgamma_r>>, <<lgammaf_r>>, <<tgamma>>, and <<tgammaf>>--logarithmic and plain gamma functions
+ <<gamma>>, <<gammaf>>, <<lgamma>>, <<lgammaf>>, <<gamma_r>>, <<gammaf_r>>, <<lgamma_r>>, <<lgammaf_r>>, <<tgamma>>, and <<tgammaf>>---logarithmic and plain gamma functions
INDEX
gamma
diff --git a/newlib/libm/mathfp/Makefile.am b/newlib/libm/mathfp/Makefile.am
index eece67855..db83ea082 100644
--- a/newlib/libm/mathfp/Makefile.am
+++ b/newlib/libm/mathfp/Makefile.am
@@ -58,137 +58,36 @@ endif # USE_LIBTOOL
include $(srcdir)/../../Makefile.shared
-chobj = eacosh.def \
- eatanh.def \
- ehypot.def \
- eremainder.def \
- erlgamma.def \
- sacos.def \
- sasine.def \
- sasinh.def \
- satan.def \
- satan2.def \
- satangent.def \
- scosh.def \
- serf.def \
- sexp.def \
- sfabs.def \
- sfloor.def \
- sfmod.def \
- sfrexp.def \
- sldexp.def \
- slog10.def \
- slogarithm.def \
- spow.def \
- ssine.def \
- ssineh.def \
- ssqrt.def \
- stan.def \
- stanh.def \
- wjn.def
-
-SUFFIXES = .def
-
-CHEW = ../../doc/makedoc -f $(srcdir)/../../doc/doc.str
-
-.c.def:
- $(CHEW) < $< > $*.def 2> $*.ref
- touch stmp-def
-
-TARGETDOC = ../tmp.texi
-
-doc: $(chobj)
- cat $(srcdir)/mathfp.tex >> $(TARGETDOC)
-
-CLEANFILES = $(chobj) *.ref
-
-# Texinfo does not appear to support underscores in file names, so we
-# name the .def files without underscores.
-
-eacosh.def: e_acosh.c
- $(CHEW) < $(srcdir)/e_acosh.c >$@ 2>/dev/null
- touch stmp-def
-eatanh.def: e_atanh.c
- $(CHEW) < $(srcdir)/e_atanh.c >$@ 2>/dev/null
- touch stmp-def
-ehypot.def: e_hypot.c
- $(CHEW) < $(srcdir)/e_hypot.c >$@ 2>/dev/null
- touch stmp-def
-eremainder.def: e_remainder.c
- $(CHEW) < $(srcdir)/e_remainder.c >$@ 2>/dev/null
- touch stmp-def
-erlgamma.def: er_lgamma.c
- $(CHEW) < $(srcdir)/er_lgamma.c >$@ 2>/dev/null
- touch stmp-def
-sacos.def: s_acos.c
- $(CHEW) < $(srcdir)/s_acos.c >$@ 2>/dev/null
- touch stmp-def
-sasine.def: s_asine.c
- $(CHEW) < $(srcdir)/s_asine.c >$@ 2>/dev/null
- touch stmp-def
-sasinh.def: s_asinh.c
- $(CHEW) < $(srcdir)/s_asinh.c >$@ 2>/dev/null
- touch stmp-def
-satan.def: s_atan.c
- $(CHEW) < $(srcdir)/s_atan.c >$@ 2>/dev/null
- touch stmp-def
-satan2.def: s_atan2.c
- $(CHEW) < $(srcdir)/s_atan2.c >$@ 2>/dev/null
- touch stmp-def
-satangent.def: s_atangent.c
- $(CHEW) < $(srcdir)/s_atangent.c >$@ 2>/dev/null
- touch stmp-def
-scosh.def: s_cosh.c
- $(CHEW) < $(srcdir)/s_cosh.c >$@ 2>/dev/null
- touch stmp-def
-serf.def: s_erf.c
- $(CHEW) < $(srcdir)/s_erf.c >$@ 2>/dev/null
- touch stmp-def
-sexp.def: s_exp.c
- $(CHEW) < $(srcdir)/s_exp.c >$@ 2>/dev/null
- touch stmp-def
-sfabs.def: s_fabs.c
- $(CHEW) < $(srcdir)/s_fabs.c >$@ 2>/dev/null
- touch stmp-def
-sfloor.def: s_floor.c
- $(CHEW) < $(srcdir)/s_floor.c >$@ 2>/dev/null
- touch stmp-def
-sfmod.def: s_fmod.c
- $(CHEW) < $(srcdir)/s_fmod.c >$@ 2>/dev/null
- touch stmp-def
-sfrexp.def: s_frexp.c
- $(CHEW) < $(srcdir)/s_frexp.c >$@ 2>/dev/null
- touch stmp-def
-sldexp.def: s_ldexp.c
- $(CHEW) < $(srcdir)/s_ldexp.c >$@ 2>/dev/null
- touch stmp-def
-slog10.def: s_log10.c
- $(CHEW) < $(srcdir)/s_log10.c >$@ 2>/dev/null
- touch stmp-def
-slogarithm.def: s_logarithm.c
- $(CHEW) < $(srcdir)/s_logarithm.c >$@ 2>/dev/null
- touch stmp-def
-spow.def: s_pow.c
- $(CHEW) < $(srcdir)/s_pow.c >$@ 2>/dev/null
- touch stmp-def
-ssine.def: s_sine.c
- $(CHEW) < $(srcdir)/s_sine.c >$@ 2>/dev/null
- touch stmp-def
-ssineh.def: s_sineh.c
- $(CHEW) < $(srcdir)/s_sineh.c >$@ 2>/dev/null
- touch stmp-def
-ssqrt.def: s_sqrt.c
- $(CHEW) < $(srcdir)/s_sqrt.c >$@ 2>/dev/null
- touch stmp-def
-stan.def: s_tan.c
- $(CHEW) < $(srcdir)/s_tan.c >$@ 2>/dev/null
- touch stmp-def
-stanh.def: s_tanh.c
- $(CHEW) < $(srcdir)/s_tanh.c >$@ 2>/dev/null
- touch stmp-def
-wjn.def: w_jn.c
- $(CHEW) < $(srcdir)/w_jn.c >$@ 2>/dev/null
- touch stmp-def
+CHEWOUT_FILES = e_acosh.def \
+ e_atanh.def \
+ e_hypot.def \
+ e_remainder.def \
+ er_lgamma.def \
+ s_acos.def \
+ s_asine.def \
+ s_asinh.def \
+ s_atan.def \
+ s_atan2.def \
+ s_atangent.def \
+ s_cosh.def \
+ s_erf.def \
+ s_exp.def \
+ s_fabs.def \
+ s_floor.def \
+ s_fmod.def \
+ s_frexp.def \
+ s_ldexp.def \
+ s_log10.def \
+ s_logarithm.def \
+ s_pow.def \
+ s_sine.def \
+ s_sineh.def \
+ s_sqrt.def \
+ s_tan.def \
+ s_tanh.def \
+ w_jn.def
+
+CHAPTERS = mathfp.tex
# A partial dependency list.
diff --git a/newlib/libm/mathfp/Makefile.in b/newlib/libm/mathfp/Makefile.in
index 57a24fa1a..a39bec5e9 100644
--- a/newlib/libm/mathfp/Makefile.in
+++ b/newlib/libm/mathfp/Makefile.in
@@ -348,39 +348,43 @@ libmathfp_la_LDFLAGS = -Xcompiler -nostdlib
@USE_LIBTOOL_FALSE@noinst_LIBRARIES = lib.a
@USE_LIBTOOL_FALSE@lib_a_SOURCES = $(src) $(fsrc)
@USE_LIBTOOL_FALSE@lib_a_CFLAGS = $(AM_CFLAGS)
-chobj = eacosh.def \
- eatanh.def \
- ehypot.def \
- eremainder.def \
- erlgamma.def \
- sacos.def \
- sasine.def \
- sasinh.def \
- satan.def \
- satan2.def \
- satangent.def \
- scosh.def \
- serf.def \
- sexp.def \
- sfabs.def \
- sfloor.def \
- sfmod.def \
- sfrexp.def \
- sldexp.def \
- slog10.def \
- slogarithm.def \
- spow.def \
- ssine.def \
- ssineh.def \
- ssqrt.def \
- stan.def \
- stanh.def \
- wjn.def
+#
+# documentation rules
+#
SUFFIXES = .def
-CHEW = ../../doc/makedoc -f $(srcdir)/../../doc/doc.str
-TARGETDOC = ../tmp.texi
-CLEANFILES = $(chobj) *.ref
+CHEW = ${top_builddir}/../doc/makedoc -f $(top_srcdir)/../doc/doc.str
+CLEANFILES = $(CHEWOUT_FILES) *.ref
+CHEWOUT_FILES = e_acosh.def \
+ e_atanh.def \
+ e_hypot.def \
+ e_remainder.def \
+ er_lgamma.def \
+ s_acos.def \
+ s_asine.def \
+ s_asinh.def \
+ s_atan.def \
+ s_atan2.def \
+ s_atangent.def \
+ s_cosh.def \
+ s_erf.def \
+ s_exp.def \
+ s_fabs.def \
+ s_floor.def \
+ s_fmod.def \
+ s_frexp.def \
+ s_ldexp.def \
+ s_log10.def \
+ s_logarithm.def \
+ s_pow.def \
+ s_sine.def \
+ s_sineh.def \
+ s_sqrt.def \
+ s_tan.def \
+ s_tanh.def \
+ w_jn.def
+
+CHAPTERS = mathfp.tex
all: all-am
.SUFFIXES:
@@ -1196,96 +1200,13 @@ objectlist.awk.in: $(noinst_LTLIBRARIES)
$(CHEW) < $< > $*.def 2> $*.ref
touch stmp-def
-doc: $(chobj)
- cat $(srcdir)/mathfp.tex >> $(TARGETDOC)
+TARGETDOC ?= ../tmp.texi
-# Texinfo does not appear to support underscores in file names, so we
-# name the .def files without underscores.
-
-eacosh.def: e_acosh.c
- $(CHEW) < $(srcdir)/e_acosh.c >$@ 2>/dev/null
- touch stmp-def
-eatanh.def: e_atanh.c
- $(CHEW) < $(srcdir)/e_atanh.c >$@ 2>/dev/null
- touch stmp-def
-ehypot.def: e_hypot.c
- $(CHEW) < $(srcdir)/e_hypot.c >$@ 2>/dev/null
- touch stmp-def
-eremainder.def: e_remainder.c
- $(CHEW) < $(srcdir)/e_remainder.c >$@ 2>/dev/null
- touch stmp-def
-erlgamma.def: er_lgamma.c
- $(CHEW) < $(srcdir)/er_lgamma.c >$@ 2>/dev/null
- touch stmp-def
-sacos.def: s_acos.c
- $(CHEW) < $(srcdir)/s_acos.c >$@ 2>/dev/null
- touch stmp-def
-sasine.def: s_asine.c
- $(CHEW) < $(srcdir)/s_asine.c >$@ 2>/dev/null
- touch stmp-def
-sasinh.def: s_asinh.c
- $(CHEW) < $(srcdir)/s_asinh.c >$@ 2>/dev/null
- touch stmp-def
-satan.def: s_atan.c
- $(CHEW) < $(srcdir)/s_atan.c >$@ 2>/dev/null
- touch stmp-def
-satan2.def: s_atan2.c
- $(CHEW) < $(srcdir)/s_atan2.c >$@ 2>/dev/null
- touch stmp-def
-satangent.def: s_atangent.c
- $(CHEW) < $(srcdir)/s_atangent.c >$@ 2>/dev/null
- touch stmp-def
-scosh.def: s_cosh.c
- $(CHEW) < $(srcdir)/s_cosh.c >$@ 2>/dev/null
- touch stmp-def
-serf.def: s_erf.c
- $(CHEW) < $(srcdir)/s_erf.c >$@ 2>/dev/null
- touch stmp-def
-sexp.def: s_exp.c
- $(CHEW) < $(srcdir)/s_exp.c >$@ 2>/dev/null
- touch stmp-def
-sfabs.def: s_fabs.c
- $(CHEW) < $(srcdir)/s_fabs.c >$@ 2>/dev/null
- touch stmp-def
-sfloor.def: s_floor.c
- $(CHEW) < $(srcdir)/s_floor.c >$@ 2>/dev/null
- touch stmp-def
-sfmod.def: s_fmod.c
- $(CHEW) < $(srcdir)/s_fmod.c >$@ 2>/dev/null
- touch stmp-def
-sfrexp.def: s_frexp.c
- $(CHEW) < $(srcdir)/s_frexp.c >$@ 2>/dev/null
- touch stmp-def
-sldexp.def: s_ldexp.c
- $(CHEW) < $(srcdir)/s_ldexp.c >$@ 2>/dev/null
- touch stmp-def
-slog10.def: s_log10.c
- $(CHEW) < $(srcdir)/s_log10.c >$@ 2>/dev/null
- touch stmp-def
-slogarithm.def: s_logarithm.c
- $(CHEW) < $(srcdir)/s_logarithm.c >$@ 2>/dev/null
- touch stmp-def
-spow.def: s_pow.c
- $(CHEW) < $(srcdir)/s_pow.c >$@ 2>/dev/null
- touch stmp-def
-ssine.def: s_sine.c
- $(CHEW) < $(srcdir)/s_sine.c >$@ 2>/dev/null
- touch stmp-def
-ssineh.def: s_sineh.c
- $(CHEW) < $(srcdir)/s_sineh.c >$@ 2>/dev/null
- touch stmp-def
-ssqrt.def: s_sqrt.c
- $(CHEW) < $(srcdir)/s_sqrt.c >$@ 2>/dev/null
- touch stmp-def
-stan.def: s_tan.c
- $(CHEW) < $(srcdir)/s_tan.c >$@ 2>/dev/null
- touch stmp-def
-stanh.def: s_tanh.c
- $(CHEW) < $(srcdir)/s_tanh.c >$@ 2>/dev/null
- touch stmp-def
-wjn.def: w_jn.c
- $(CHEW) < $(srcdir)/w_jn.c >$@ 2>/dev/null
- touch stmp-def
+doc: $(CHEWOUT_FILES)
+ for chapter in $(CHAPTERS) ; \
+ do \
+ cat $(srcdir)/$$chapter >> $(TARGETDOC) ; \
+ done
# A partial dependency list.
diff --git a/newlib/libm/mathfp/e_acosh.c b/newlib/libm/mathfp/e_acosh.c
index c2bf52890..7b199c5d9 100644
--- a/newlib/libm/mathfp/e_acosh.c
+++ b/newlib/libm/mathfp/e_acosh.c
@@ -49,7 +49,8 @@ Neither <<acosh>> nor <<acoshf>> are ANSI C. They are not recommended
for portable programs.
-QUICKREF ANSI SVID POSIX RENTRANT
+QUICKREF
+ ansi svid posix rentrant
acos n,n,n,m
acosf n,n,n,m
diff --git a/newlib/libm/mathfp/s_acos.c b/newlib/libm/mathfp/s_acos.c
index 88d59372d..051afea72 100644
--- a/newlib/libm/mathfp/s_acos.c
+++ b/newlib/libm/mathfp/s_acos.c
@@ -50,7 +50,8 @@ o $\pi$.
You can modify error handling for these functions using <<matherr>>.
-QUICKREF ANSI SVID POSIX RENTRANT
+QUICKREF
+ ansi svid posix rentrant
acos y,y,y,m
acosf n,n,n,m
diff --git a/newlib/libm/mathfp/s_cosh.c b/newlib/libm/mathfp/s_cosh.c
index 24b542092..f91411037 100644
--- a/newlib/libm/mathfp/s_cosh.c
+++ b/newlib/libm/mathfp/s_cosh.c
@@ -9,14 +9,14 @@ FUNCTION
ANSI_SYNOPSIS
#include <math.h>
double cosh(double <[x]>);
- float coshf(float <[x]>)
+ float coshf(float <[x]>);
TRAD_SYNOPSIS
#include <math.h>
- double cosh(<[x]>)
+ double cosh(<[x]>);
double <[x]>;
- float coshf(<[x]>)
+ float coshf(<[x]>);
float <[x]>;
DESCRIPTION
diff --git a/newlib/libm/mathfp/s_fmod.c b/newlib/libm/mathfp/s_fmod.c
index ec86376af..19bba9c18 100644
--- a/newlib/libm/mathfp/s_fmod.c
+++ b/newlib/libm/mathfp/s_fmod.c
@@ -22,15 +22,15 @@ fmodf
ANSI_SYNOPSIS
#include <math.h>
-double fmod(double <[x]>, double <[y]>)
-float fmodf(float <[x]>, float <[y]>)
+double fmod(double <[x]>, double <[y]>);
+float fmodf(float <[x]>, float <[y]>);
TRAD_SYNOPSIS
#include <math.h>
-double fmod(<[x]>, <[y]>)
+double fmod(<[x]>, <[y]>);
double (<[x]>, <[y]>);
-float fmodf(<[x]>, <[y]>)
+float fmodf(<[x]>, <[y]>);
float (<[x]>, <[y]>);
DESCRIPTION
diff --git a/newlib/libm/mathfp/sf_numtest.c b/newlib/libm/mathfp/sf_numtest.c
index 675086c41..00bab3a9d 100644
--- a/newlib/libm/mathfp/sf_numtest.c
+++ b/newlib/libm/mathfp/sf_numtest.c
@@ -40,7 +40,7 @@ _DEFUN (numtestf, (float),
}
/* Check for not a number or infinity. */
- if (exp == 0x7f8)
+ if (exp == 0xff)
{
if(wx & 0x7fffff)
return (NAN);
diff --git a/newlib/newlib.hin b/newlib/newlib.hin
index e4f623049..d03dfac0e 100644
--- a/newlib/newlib.hin
+++ b/newlib/newlib.hin
@@ -10,7 +10,7 @@
#undef _ELIX_LEVEL
/* Newlib version */
-#undef _NEWLIB_VERSION
+#include <_newlib_version.h>
/* C99 formats support (such as %a, %zu, ...) in IO functions like
* printf/scanf enabled */
@@ -55,6 +55,9 @@
/* True if long double supported. */
#undef _HAVE_LONG_DOUBLE
+/* Define if compiler supports -fno-tree-loop-distribute-patterns. */
+#undef _HAVE_CC_INHIBIT_LOOP_TO_LIBCALL
+
/* True if long double supported and it is equal to double. */
#undef _LDBL_EQ_DBL
@@ -73,6 +76,12 @@
/* Define if lite version of exit supported. */
#undef _LITE_EXIT
+/* Define if declare atexit data as global. */
+#undef _REENT_GLOBAL_ATEXIT
+
+/* Define if small footprint nano-formatted-IO implementation used. */
+#undef _NANO_FORMATTED_IO
+
/*
* Iconv encodings enabled ("to" direction)
*/
diff --git a/newlib/testsuite/lib/flags.exp b/newlib/testsuite/lib/flags.exp
index 577efa867..e1e9acb18 100644
--- a/newlib/testsuite/lib/flags.exp
+++ b/newlib/testsuite/lib/flags.exp
@@ -36,7 +36,7 @@ proc libgloss_link_flags { args } {
return ""
}
- set target_build_path "$objdir/$multibuildtop.."
+ set target_build_path "$objdir/.."
set gloss_srcdir [lookfor_file ${srcdir} libgloss/$target_cpu]
diff --git a/newlib/testsuite/newlib.locale/UTF-8.exp b/newlib/testsuite/newlib.locale/UTF-8.exp
index e823a4f96..94fcb5f53 100644
--- a/newlib/testsuite/newlib.locale/UTF-8.exp
+++ b/newlib/testsuite/newlib.locale/UTF-8.exp
@@ -6,6 +6,18 @@
load_lib checkoutput.exp
+# Don't run this test if newlib's build does not support multibyte encodings.
+set newlib_header_name "$objdir/targ-include/newlib.h"
+if [file exists $newlib_header_name] {
+ set newlib_header_fid [open $newlib_header_name r]
+ set newlib_header_text [read $newlib_header_fid]
+ close $newlib_header_fid
+ if {![regexp "#define _MB_CAPABLE" $newlib_header_text] || \
+ [regexp "#define _MB_LEN_MAX 1" $newlib_header_text]} {
+ return
+ }
+}
+
set expected_output {
"Set C-UTF-8 locale."
"* U-00000000"
diff --git a/newlib/testsuite/newlib.stdio/nulprintf.c b/newlib/testsuite/newlib.stdio/nulprintf.c
new file mode 100644
index 000000000..5e4131bc4
--- /dev/null
+++ b/newlib/testsuite/newlib.stdio/nulprintf.c
@@ -0,0 +1,17 @@
+/*
+ * Copyright (C) 2014 by ARM Ltd. All rights reserved.
+ *
+ * Permission to use, copy, modify, and distribute this software
+ * is freely granted, provided that this notice is preserved.
+ */
+
+#include <stdio.h>
+#include "check.h"
+
+const char m[8] = {'M','M','M','M','M','M','M','M'};
+
+int main()
+{
+ printf ("%.*s\n", 8, m);
+ exit (0);
+}
diff --git a/newlib/testsuite/newlib.stdio/swprintf.c b/newlib/testsuite/newlib.stdio/swprintf.c
index b925da487..c20bf898c 100644
--- a/newlib/testsuite/newlib.stdio/swprintf.c
+++ b/newlib/testsuite/newlib.stdio/swprintf.c
@@ -18,7 +18,7 @@ int main()
#else
char cbuf[512];
wchar_t wcbuf[512], wcbuf2[512];
- double val = 1E+308;
+ double val = 1E+30;
snprintf(cbuf, 512, "%.*f", 3, val);
swprintf(wcbuf, 512, L"%.*f", 3, val);
mbstowcs(wcbuf2, cbuf, 512);
diff --git a/newlib/testsuite/newlib.wctype/tiswctype.c b/newlib/testsuite/newlib.wctype/tiswctype.c
index da48fbb77..441cddbe6 100644
--- a/newlib/testsuite/newlib.wctype/tiswctype.c
+++ b/newlib/testsuite/newlib.wctype/tiswctype.c
@@ -8,51 +8,51 @@ int main()
x = wctype ("alpha");
CHECK (x != 0);
- CHECK (iswctype (L'a', x) && isalpha ('a'));
+ CHECK (iswctype (L'a', x) && iswalpha (L'a'));
x = wctype ("alnum");
CHECK (x != 0);
- CHECK (iswctype (L'0', x) && isalnum ('0'));
+ CHECK (iswctype (L'0', x) && iswalnum (L'0'));
x = wctype ("blank");
CHECK (x != 0);
- CHECK (iswctype (L' ', x) && isblank (' '));
+ CHECK (iswctype (L' ', x) && iswblank (L' '));
x = wctype ("cntrl");
CHECK (x != 0);
- CHECK (iswctype (L'\n', x) && iscntrl ('\n'));
+ CHECK (iswctype (L'\n', x) && iswcntrl (L'\n'));
x = wctype ("digit");
CHECK (x != 0);
- CHECK (iswctype (L'7', x) && isdigit ('7'));
+ CHECK (iswctype (L'7', x) && iswdigit (L'7'));
x = wctype ("graph");
CHECK (x != 0);
- CHECK (iswctype (L'!', x) && isgraph ('!'));
+ CHECK (iswctype (L'!', x) && iswgraph (L'!'));
x = wctype ("lower");
CHECK (x != 0);
- CHECK (iswctype (L'k', x) && islower ('k'));
+ CHECK (iswctype (L'k', x) && iswlower (L'k'));
x = wctype ("print");
CHECK (x != 0);
- CHECK (iswctype (L'@', x) && isprint ('@'));
+ CHECK (iswctype (L'@', x) && iswprint (L'@'));
x = wctype ("punct");
CHECK (x != 0);
- CHECK (iswctype (L'.', x) && ispunct ('.'));
+ CHECK (iswctype (L'.', x) && iswpunct (L'.'));
x = wctype ("space");
CHECK (x != 0);
- CHECK (iswctype (L'\t', x) && isspace ('\t'));
+ CHECK (iswctype (L'\t', x) && iswspace (L'\t'));
x = wctype ("upper");
CHECK (x != 0);
- CHECK (iswctype (L'T', x) && isupper ('T'));
+ CHECK (iswctype (L'T', x) && iswupper (L'T'));
x = wctype ("xdigit");
CHECK (x != 0);
- CHECK (iswctype (L'B', x) && isxdigit ('B'));
+ CHECK (iswctype (L'B', x) && iswxdigit (L'B'));
x = wctype ("unknown");
CHECK (x == 0);
diff --git a/newlib/testsuite/newlib.wctype/twctrans.c b/newlib/testsuite/newlib.wctype/twctrans.c
index a70e00175..f8b7b50e5 100644
--- a/newlib/testsuite/newlib.wctype/twctrans.c
+++ b/newlib/testsuite/newlib.wctype/twctrans.c
@@ -8,13 +8,13 @@ int main()
x = wctrans ("tolower");
CHECK (x != 0);
- CHECK (towctrans (L'A', x) == tolower ('A'));
- CHECK (towctrans (L'5', x) == tolower ('5'));
+ CHECK (towctrans (L'A', x) == towlower (L'A'));
+ CHECK (towctrans (L'5', x) == towlower (L'5'));
x = wctrans ("toupper");
CHECK (x != 0);
- CHECK (towctrans (L'c', x) == toupper ('c'));
- CHECK (towctrans (L'9', x) == toupper ('9'));
+ CHECK (towctrans (L'c', x) == towupper (L'c'));
+ CHECK (towctrans (L'9', x) == towupper (L'9'));
x = wctrans ("unknown");
CHECK (x == 0);
diff --git a/newlib/testsuite/newlib.wctype/twctype.c b/newlib/testsuite/newlib.wctype/twctype.c
index d206876f8..95be74d63 100644
--- a/newlib/testsuite/newlib.wctype/twctype.c
+++ b/newlib/testsuite/newlib.wctype/twctype.c
@@ -48,7 +48,7 @@ int main()
CHECK (iswlower(0x03b3));
CHECK (!iswlower(0x04aa));
CHECK (iswprint(0x0b13));
- CHECK (!iswprint(0x0ce2));
+ CHECK (!iswprint(0x0ce4));
CHECK (iswpunct(0x002d));
CHECK (!iswpunct(0x0a84));
CHECK (iswspace(0x000a));
diff --git a/src-release b/src-release
index c2f4727b3..b28597c09 100644
--- a/src-release
+++ b/src-release
@@ -165,7 +165,15 @@ do-proto-toplev: $(DEVO_SUPPORT) $(SUPPORT_FILES) texinfo/texinfo.tex
else \
ln -s ../$$d proto-toplev/$$d ; \
fi ; \
- else ln -s ../$$d proto-toplev/$$d ; fi ; \
+ else \
+ if (echo x$$d | grep / >/dev/null); then \
+ mkdir -p proto-toplev/`dirname $$d` ; \
+ x=`dirname $$d` ; \
+ ln -s ../`echo $$x/ | sed -e 's,[^/]*/,../,g'`$$d proto-toplev/$$d ; \
+ else \
+ ln -s ../$$d proto-toplev/$$d ; \
+ fi ; \
+ fi ; \
done
cd etc && $(MAKE) MAKEINFOFLAGS="$(MAKEINFOFLAGS)" info
$(MAKE) distclean
@@ -286,6 +294,14 @@ gdb.tar: $(DIST_SUPPORT) $(GDB_SUPPORT_DIRS) gdb
MD5PROG="$(MD5PROG)" \
SUPPORT_FILES="$(GDB_SUPPORT_DIRS)"
+# Corresponding to the CVS "sim" module.
+.PHONY: sim.tar.bz2
+SIM_SUPPORT_DIRS= bfd opcodes libiberty include intl gdb/version.in makefile.vms
+sim.tar.bz2: $(DIST_SUPPORT) $(SIM_SUPPORT_DIRS) sim
+ $(MAKE) -f $(SELF) taz TOOL=sim \
+ MD5PROG="$(MD5PROG)" \
+ SUPPORT_FILES="$(SIM_SUPPORT_DIRS)"
+
.PHONY: insight.tar.bz2
INSIGHT_SUPPORT_DIRS= $(GDB_SUPPORT_DIRS) tcl tk itcl libgui
insight.tar.bz2: $(DIST_SUPPORT) $(GDB_SUPPORT_DIRS) gdb
diff --git a/winsup/CONTRIBUTORS b/winsup/CONTRIBUTORS
new file mode 100644
index 000000000..92534d429
--- /dev/null
+++ b/winsup/CONTRIBUTORS
@@ -0,0 +1,92 @@
+This file contains a list of individuals who submit their patches to
+the Cygwin sources under 2-clause BSD license, as well as a list of
+individuals who signed the former Cygwin Copyright Assignment up to 2016.
+
+=========================================================================
+2-clause BSD:
+=========================================================================
+Copyright (c) <YEAR>, <OWNER>
+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 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 HOLDER 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.
+=========================================================================
+
+Individuals submitting their patches under 2-clause BSD:
+
+
+=========================================================================
+
+Individuals who signed the former Cygwin Copyright Assignment:
+
+AJ Reins tbisp@qwest.net
+Brian E. Dessent brian@dessent.net
+Brian Kenneth Ford Brian.Ford@FlightSafety.com
+Charles K. Moore keithmo@exmsft.com
+Christian Franke franke@computer.org
+Christian Lestrade christian.lestrade@free.fr
+Christopher Faylor me@cgf.cx
+Christopher January chris@atomice.net
+Conrad Scott conrad.scott@dsl.pipex.com
+Corinna Vinschen corinna@vinschen.de
+Craig Iain McGeachie slapdau@yahoo.com.au
+David Korn dave.korn.cygwin@gmail.com
+Davis Euresti davie@alum.mit.edu
+Dennis Vshivkov walrus@amur.ru
+Elfyn McBratney elfyn@ubertales.co.uk
+Eric Blake eblake@redhat.com
+Ernie Coskrey ernie.coskrey@steeleye.com
+Gerd Spalink Gerd.Spalink@t-online.de
+Hartmut Honisch hhonisch@users.sourceforge.net
+Igor Pechtchanski pechtcha@cs.nyu.edu
+Jacek Trzcinski jacek@certum.pl
+Jeffrey Eric Altman jaltman@openafs.org
+Jerry D. Hedden jerry@hedden.us
+Joe Loh joel@pivot3.com
+Johan Rydberg johan@rydberg.com
+Johannes Schindelin johannes.schindelin@gmx.de
+John Hood cgull@glup.org
+Jon Turney jon.turney@dronecode.org.uk
+Yoni Londner yonihola2@gmail.com
+Joseph H. Buehler jbuehler@hekimian.com
+Joshua Daniel Franklin joshuadfranklin@yahoo.com
+Ken Brown kbrown@cornell.edu
+Lapo Luchini lapo@lapo.it
+Lev Bishop lev.bishop@gmail.com
+Max Kaehn slothman@electric-cloud.com
+Micha Nelissen mdvpost@hotmail.com
+Michael Haubenwallner michael.haubenwallner@ssi-schaefer.com
+Nicholas S. Wourms nwourms@netscape.com
+Pavel Yonkov Tsekov ptsekov@gmx.net
+Peter Foley pefoley2@pefoley.com
+Pierre A. Humblet phumblet@phumblet.no-ip.org
+Robert G. Byrnes byrnes@curl.com
+Ryan C. Gordon icculus@icculus.org
+Sam Steingold sds@gnu.org
+Stephen Cleary shammah@spamcop.net
+Stephen Osborn bub@io.com
+Takashi Yano takashi.yano@nifty.ne.jp
+Thomas Pfaff tpfaff@gmx.net
+Vaclav Haisman vhaisman@gmail.com
+Yaakov Selkovitz yselkowi@redhat.com
+Yitzchak Scott-Thoennes sthoenna@efn.org
diff --git a/winsup/COPYING.LIB b/winsup/COPYING.LIB
new file mode 100644
index 000000000..65c5ca88a
--- /dev/null
+++ b/winsup/COPYING.LIB
@@ -0,0 +1,165 @@
+ GNU LESSER GENERAL PUBLIC LICENSE
+ Version 3, 29 June 2007
+
+ Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+
+ This version of the GNU Lesser General Public License incorporates
+the terms and conditions of version 3 of the GNU General Public
+License, supplemented by the additional permissions listed below.
+
+ 0. Additional Definitions.
+
+ As used herein, "this License" refers to version 3 of the GNU Lesser
+General Public License, and the "GNU GPL" refers to version 3 of the GNU
+General Public License.
+
+ "The Library" refers to a covered work governed by this License,
+other than an Application or a Combined Work as defined below.
+
+ An "Application" is any work that makes use of an interface provided
+by the Library, but which is not otherwise based on the Library.
+Defining a subclass of a class defined by the Library is deemed a mode
+of using an interface provided by the Library.
+
+ A "Combined Work" is a work produced by combining or linking an
+Application with the Library. The particular version of the Library
+with which the Combined Work was made is also called the "Linked
+Version".
+
+ The "Minimal Corresponding Source" for a Combined Work means the
+Corresponding Source for the Combined Work, excluding any source code
+for portions of the Combined Work that, considered in isolation, are
+based on the Application, and not on the Linked Version.
+
+ The "Corresponding Application Code" for a Combined Work means the
+object code and/or source code for the Application, including any data
+and utility programs needed for reproducing the Combined Work from the
+Application, but excluding the System Libraries of the Combined Work.
+
+ 1. Exception to Section 3 of the GNU GPL.
+
+ You may convey a covered work under sections 3 and 4 of this License
+without being bound by section 3 of the GNU GPL.
+
+ 2. Conveying Modified Versions.
+
+ If you modify a copy of the Library, and, in your modifications, a
+facility refers to a function or data to be supplied by an Application
+that uses the facility (other than as an argument passed when the
+facility is invoked), then you may convey a copy of the modified
+version:
+
+ a) under this License, provided that you make a good faith effort to
+ ensure that, in the event an Application does not supply the
+ function or data, the facility still operates, and performs
+ whatever part of its purpose remains meaningful, or
+
+ b) under the GNU GPL, with none of the additional permissions of
+ this License applicable to that copy.
+
+ 3. Object Code Incorporating Material from Library Header Files.
+
+ The object code form of an Application may incorporate material from
+a header file that is part of the Library. You may convey such object
+code under terms of your choice, provided that, if the incorporated
+material is not limited to numerical parameters, data structure
+layouts and accessors, or small macros, inline functions and templates
+(ten or fewer lines in length), you do both of the following:
+
+ a) Give prominent notice with each copy of the object code that the
+ Library is used in it and that the Library and its use are
+ covered by this License.
+
+ b) Accompany the object code with a copy of the GNU GPL and this license
+ document.
+
+ 4. Combined Works.
+
+ You may convey a Combined Work under terms of your choice that,
+taken together, effectively do not restrict modification of the
+portions of the Library contained in the Combined Work and reverse
+engineering for debugging such modifications, if you also do each of
+the following:
+
+ a) Give prominent notice with each copy of the Combined Work that
+ the Library is used in it and that the Library and its use are
+ covered by this License.
+
+ b) Accompany the Combined Work with a copy of the GNU GPL and this license
+ document.
+
+ c) For a Combined Work that displays copyright notices during
+ execution, include the copyright notice for the Library among
+ these notices, as well as a reference directing the user to the
+ copies of the GNU GPL and this license document.
+
+ d) Do one of the following:
+
+ 0) Convey the Minimal Corresponding Source under the terms of this
+ License, and the Corresponding Application Code in a form
+ suitable for, and under terms that permit, the user to
+ recombine or relink the Application with a modified version of
+ the Linked Version to produce a modified Combined Work, in the
+ manner specified by section 6 of the GNU GPL for conveying
+ Corresponding Source.
+
+ 1) Use a suitable shared library mechanism for linking with the
+ Library. A suitable mechanism is one that (a) uses at run time
+ a copy of the Library already present on the user's computer
+ system, and (b) will operate properly with a modified version
+ of the Library that is interface-compatible with the Linked
+ Version.
+
+ e) Provide Installation Information, but only if you would otherwise
+ be required to provide such information under section 6 of the
+ GNU GPL, and only to the extent that such information is
+ necessary to install and execute a modified version of the
+ Combined Work produced by recombining or relinking the
+ Application with a modified version of the Linked Version. (If
+ you use option 4d0, the Installation Information must accompany
+ the Minimal Corresponding Source and Corresponding Application
+ Code. If you use option 4d1, you must provide the Installation
+ Information in the manner specified by section 6 of the GNU GPL
+ for conveying Corresponding Source.)
+
+ 5. Combined Libraries.
+
+ You may place library facilities that are a work based on the
+Library side by side in a single library together with other library
+facilities that are not Applications and are not covered by this
+License, and convey such a combined library under terms of your
+choice, if you do both of the following:
+
+ a) Accompany the combined library with a copy of the same work based
+ on the Library, uncombined with any other library facilities,
+ conveyed under the terms of this License.
+
+ b) Give prominent notice with the combined library that part of it
+ is a work based on the Library, and explaining where to find the
+ accompanying uncombined form of the same work.
+
+ 6. Revised Versions of the GNU Lesser General Public License.
+
+ The Free Software Foundation may publish revised and/or new versions
+of the GNU Lesser General Public License from time to time. Such new
+versions will be similar in spirit to the present version, but may
+differ in detail to address new problems or concerns.
+
+ Each version is given a distinguishing version number. If the
+Library as you received it specifies that a certain numbered version
+of the GNU Lesser General Public License "or any later version"
+applies to it, you have the option of following the terms and
+conditions either of that published version or of any later version
+published by the Free Software Foundation. If the Library as you
+received it does not specify a version number of the GNU Lesser
+General Public License, you may choose any version of the GNU Lesser
+General Public License ever published by the Free Software Foundation.
+
+ If the Library as you received it specifies that a proxy can decide
+whether future versions of the GNU Lesser General Public License shall
+apply, that proxy's public statement of acceptance of any version is
+permanent authorization for you to choose that version for the
+Library.
diff --git a/winsup/ChangeLog b/winsup/CVSChangeLogs.old/ChangeLog-2015
index 826128805..4756573aa 100644
--- a/winsup/ChangeLog
+++ b/winsup/CVSChangeLogs.old/ChangeLog-2015
@@ -1,3 +1,38 @@
+2014-11-13 Corinna Vinschen <corinna@vinschen.de>
+
+ * configure.ac: Convert to new AC_INIT style.
+ * configure: Regenerate.
+
+2014-08-07 Yaakov Selkowitz <yselkowi@redhat.com>
+
+ * Makefile.common (COMPILE.cc): Add -fno-use-cxa-atexit.
+
+2014-02-18 Christopher Faylor <me.cygwin2014@cgf.cx>
+
+ * Makefile.in: Ignore errors on doc install.
+
+2013-01-22 Corinna Vinschen <corinna@vinschen.de>
+
+ * Makefile.common: Don't drop -gFOO switches when filtering CFLAGS
+ and CXXFLAGS.
+
+2013-11-06 Christopher Faylor <me.cygwin2013@cgf.cx>
+
+ * Makefile.in: Properly cd to directory sans install_ prefix. Report
+ on errors on doc install. Only 'all' is special.
+
+2013-11-06 Christopher Faylor <me.cygwin2013@cgf.cx>
+
+ * configure.ac: Detect windows headers/libs after we've figured out the
+ C compiler.
+ * configure: Regenerate.
+ * aclocal.m4: Regenerate.
+ * configure.cygwin: Default to '.' if can't find a winsup directory.
+
+2013-11-06 Christopher Faylor <me.cygwin2013@cgf.cx>
+
+ * Makefile.in: Reinstate ignoring of errors for doc target.
+
2013-06-18 Corinna Vinschen <corinna@vinschen.de>
* Makefile.common: Add rule to build assembler code.
diff --git a/winsup/cygserver/ChangeLog b/winsup/CVSChangeLogs.old/cygserver/ChangeLog-2015
index a29903af4..f0d6219a4 100644
--- a/winsup/cygserver/ChangeLog
+++ b/winsup/CVSChangeLogs.old/cygserver/ChangeLog-2015
@@ -1,3 +1,100 @@
+2015-02-23 Corinna Vinschen <corinna@vinschen.de>
+
+ * pwdgrp.cc: Handle default fetch_user_arg_type_t in switches
+ throughout to silence compiler.
+
+2015-01-28 Corinna Vinschen <corinna@vinschen.de>
+
+ * Makefile.in: Simplify rule to build dependencies from cygwin dir.
+
+2015-01-19 Corinna Vinschen <corinna@vinschen.de>
+
+ * bsd_helper.h: Throughout, convert "struct thread" to "class thread".
+ * bsd_mutex.cc (_msleep): Fetch signal_arrived handle from thread's
+ ipcblk.
+ * process.h (class process): Drop _signal_arrived and align methods.
+ (process_cache::process): Drop signal_arrived parameter.
+ * process.cc (process::process): Ditto. Drop related code.
+ (process::~process): Drop closing signal_arrived handle.
+ (process_cache::process): Drop signal_arrived parameter in call to
+ process::process.
+ (thread::dup_signal_arrived): New method duplicating thread's
+ signal_arrived handle.
+ (thread::close_signal_arrived): New method closing thread's
+ signal_arrived handle.
+ * msg.cc (client_request_msg::serve): Drop signal_arrived parameter from
+ call to process_cache::process. Use thread constructor to initialize td.
+ * sem.cc (client_request_sem::serve): Ditto.
+ * shm.cc (client_request_shm::serve): Ditto.
+
+2014-11-06 Florian Friesdorf <flo@chaoflow.net>
+
+ * cygserver-config: Add -N option to allow different service name.
+
+2014-08-15 Corinna Vinschen <corinna@vinschen.de>
+
+ * configure.ac: Convert to new AC_INIT style.
+ * configure: Regenerate.
+
+2014-06-23 Corinna Vinschen <corinna@vinschen.de>
+
+ * bsd_helper.cc (ipcexit_creat_hookthread): Delete shs in another error
+ case to make Coverity really happy (CID 59993).
+
+2014-06-23 Corinna Vinschen <corinna@vinschen.de>
+
+ * client.cc: Throughout, fix debug output of signed byte count value.
+
+2014-05-19 Corinna Vinschen <corinna@vinschen.de>
+
+ * bsd_mutex.cc (msleep_sync_array::~msleep_sync_array): New destructor
+ to make Coverity happy (CID 59838).
+
+2014-05-19 Corinna Vinschen <corinna@vinschen.de>
+
+ * bsd_helper.cc (ipcexit_creat_hookthread): Delete shs to make
+ Coverity happy (CID 59993).
+ * transport_pipes.cc (transport_layer_pipes::listen): Make listen_pipe
+ and connect_pipe statics to make Coverity happy (CID 60010/60011).
+
+2014-04-16 Corinna Vinschen <corinna@vinschen.de>
+
+ * pwdgrp.cc (client_request_pwdgrp::pwd_serve): Add 1 to the message
+ length to account for the trailing NUL.
+
+2014-04-16 Corinna Vinschen <corinna@vinschen.de>
+
+ * cygserver-config: Use numeric id 18 instead of "system" in chown.
+
+2014-04-07 Corinna Vinschen <corinna@vinschen.de>
+
+ * process.cc (process::process): Only notice that signal_arrived is
+ NULL in debug output.
+
+2014-03-12 Corinna Vinschen <corinna@vinschen.de>
+
+ * Makefile.in (OBJS): Add pwdgrp.o.
+ * client.cc (client_request::handle_request): Handle
+ CYGSERVER_REQUEST_PWDGRP message.
+ * pwdgrp.cc: New file implementing CYGSERVER_REQUEST_PWDGRP.
+
+2014-03-12 Corinna Vinschen <corinna@vinschen.de>
+
+ * Throughout, fix format specifiers in debug statements to accommodate
+ x86_64.
+
+2014-03-06 Corinna Vinschen <corinna@vinschen.de>
+
+ * setpwd.cc (client_request_setpwd::serve): Use RtlSecureZeroMemory to
+ delete password from memory.
+
+2013-11-06 Christopher Faylor <me.cygwin2013@cgf.cx>
+
+ * configure.ac: Detect windows headers/libs after we've figured out the
+ C compiler.
+ * configure: Regenerate.
+ * aclocal.m4: Regenerate.
+
2013-04-23 Corinna Vinschen <corinna@vinschen.de>
* Merge in cygwin-64bit-branch. See ChangeLog.64bit for details.
diff --git a/winsup/cygserver/ChangeLog.64bit b/winsup/CVSChangeLogs.old/cygserver/ChangeLog.64bit
index 7ab21bf54..7ab21bf54 100644
--- a/winsup/cygserver/ChangeLog.64bit
+++ b/winsup/CVSChangeLogs.old/cygserver/ChangeLog.64bit
diff --git a/winsup/cygwin/ChangeLog-1995 b/winsup/CVSChangeLogs.old/cygwin/ChangeLog-1995
index 43d28a3a1..43d28a3a1 100644
--- a/winsup/cygwin/ChangeLog-1995
+++ b/winsup/CVSChangeLogs.old/cygwin/ChangeLog-1995
diff --git a/winsup/cygwin/ChangeLog-1996 b/winsup/CVSChangeLogs.old/cygwin/ChangeLog-1996
index 9c786c408..9c786c408 100644
--- a/winsup/cygwin/ChangeLog-1996
+++ b/winsup/CVSChangeLogs.old/cygwin/ChangeLog-1996
diff --git a/winsup/cygwin/ChangeLog-1997 b/winsup/CVSChangeLogs.old/cygwin/ChangeLog-1997
index 33b001154..33b001154 100644
--- a/winsup/cygwin/ChangeLog-1997
+++ b/winsup/CVSChangeLogs.old/cygwin/ChangeLog-1997
diff --git a/winsup/cygwin/ChangeLog-1998 b/winsup/CVSChangeLogs.old/cygwin/ChangeLog-1998
index aa657e01e..aa657e01e 100644
--- a/winsup/cygwin/ChangeLog-1998
+++ b/winsup/CVSChangeLogs.old/cygwin/ChangeLog-1998
diff --git a/winsup/cygwin/ChangeLog-1999 b/winsup/CVSChangeLogs.old/cygwin/ChangeLog-1999
index f2da41f51..f2da41f51 100644
--- a/winsup/cygwin/ChangeLog-1999
+++ b/winsup/CVSChangeLogs.old/cygwin/ChangeLog-1999
diff --git a/winsup/cygwin/ChangeLog-2000 b/winsup/CVSChangeLogs.old/cygwin/ChangeLog-2000
index 54494e610..54494e610 100644
--- a/winsup/cygwin/ChangeLog-2000
+++ b/winsup/CVSChangeLogs.old/cygwin/ChangeLog-2000
diff --git a/winsup/cygwin/ChangeLog-2001 b/winsup/CVSChangeLogs.old/cygwin/ChangeLog-2001
index 140b2a9e9..140b2a9e9 100644
--- a/winsup/cygwin/ChangeLog-2001
+++ b/winsup/CVSChangeLogs.old/cygwin/ChangeLog-2001
diff --git a/winsup/cygwin/ChangeLog-2002 b/winsup/CVSChangeLogs.old/cygwin/ChangeLog-2002
index 21fcf2a18..21fcf2a18 100644
--- a/winsup/cygwin/ChangeLog-2002
+++ b/winsup/CVSChangeLogs.old/cygwin/ChangeLog-2002
diff --git a/winsup/cygwin/ChangeLog-2003 b/winsup/CVSChangeLogs.old/cygwin/ChangeLog-2003
index 6c16579a2..6c16579a2 100644
--- a/winsup/cygwin/ChangeLog-2003
+++ b/winsup/CVSChangeLogs.old/cygwin/ChangeLog-2003
diff --git a/winsup/cygwin/ChangeLog-2004 b/winsup/CVSChangeLogs.old/cygwin/ChangeLog-2004
index ebb696237..ebb696237 100644
--- a/winsup/cygwin/ChangeLog-2004
+++ b/winsup/CVSChangeLogs.old/cygwin/ChangeLog-2004
diff --git a/winsup/cygwin/ChangeLog-2005 b/winsup/CVSChangeLogs.old/cygwin/ChangeLog-2005
index a44ab5832..a44ab5832 100644
--- a/winsup/cygwin/ChangeLog-2005
+++ b/winsup/CVSChangeLogs.old/cygwin/ChangeLog-2005
diff --git a/winsup/cygwin/ChangeLog-2006 b/winsup/CVSChangeLogs.old/cygwin/ChangeLog-2006
index bab33364a..bab33364a 100644
--- a/winsup/cygwin/ChangeLog-2006
+++ b/winsup/CVSChangeLogs.old/cygwin/ChangeLog-2006
diff --git a/winsup/cygwin/ChangeLog-2007 b/winsup/CVSChangeLogs.old/cygwin/ChangeLog-2007
index 66cb33130..66cb33130 100644
--- a/winsup/cygwin/ChangeLog-2007
+++ b/winsup/CVSChangeLogs.old/cygwin/ChangeLog-2007
diff --git a/winsup/cygwin/ChangeLog-2008 b/winsup/CVSChangeLogs.old/cygwin/ChangeLog-2008
index 313830261..313830261 100644
--- a/winsup/cygwin/ChangeLog-2008
+++ b/winsup/CVSChangeLogs.old/cygwin/ChangeLog-2008
diff --git a/winsup/cygwin/ChangeLog-2009 b/winsup/CVSChangeLogs.old/cygwin/ChangeLog-2009
index 5638e460c..5638e460c 100644
--- a/winsup/cygwin/ChangeLog-2009
+++ b/winsup/CVSChangeLogs.old/cygwin/ChangeLog-2009
diff --git a/winsup/cygwin/ChangeLog-2010 b/winsup/CVSChangeLogs.old/cygwin/ChangeLog-2010
index cd103f7e9..cd103f7e9 100644
--- a/winsup/cygwin/ChangeLog-2010
+++ b/winsup/CVSChangeLogs.old/cygwin/ChangeLog-2010
diff --git a/winsup/cygwin/ChangeLog-2011 b/winsup/CVSChangeLogs.old/cygwin/ChangeLog-2011
index a8b9a3af5..a8b9a3af5 100644
--- a/winsup/cygwin/ChangeLog-2011
+++ b/winsup/CVSChangeLogs.old/cygwin/ChangeLog-2011
diff --git a/winsup/cygwin/ChangeLog-2012 b/winsup/CVSChangeLogs.old/cygwin/ChangeLog-2012
index 562c48c41..562c48c41 100644
--- a/winsup/cygwin/ChangeLog-2012
+++ b/winsup/CVSChangeLogs.old/cygwin/ChangeLog-2012
diff --git a/winsup/cygwin/ChangeLog b/winsup/CVSChangeLogs.old/cygwin/ChangeLog-2013
index b1eb36602..574984e3c 100644
--- a/winsup/cygwin/ChangeLog
+++ b/winsup/CVSChangeLogs.old/cygwin/ChangeLog-2013
@@ -1,3 +1,612 @@
+2013-12-31 Christopher Faylor <me.cygwin2013@cgf.cx>
+
+ * fhandler_console.cc (region_split): New function.
+ (delta): Ditto.
+ (ReadConsoleOutputWrapper): Ditto.
+ (fhandler_console::char_command): Use ReadConsoleOutputWrapper to avoid
+ OOM condition from ReadConsoleOutputW. Add more debugging.
+
+2013-12-22 Christopher Faylor <me.cygwin2013@cgf.cx>
+
+ * strace.cc (strace::vsprntf): Fix potential (if unlikely) use of
+ uninitialized variable.
+
+2013-12-18 Christopher Faylor <me.cygwin2013@cgf.cx>
+
+ * dcrt0.cc (dll_crt0_1): Remove NtSetTimerResolution.
+ * pinfo.cc (pinfo::init): Increase wait interval when waiting for
+ procinfo to stabilize.
+
+2013-12-17 Christopher Faylor <me.cygwin2013@cgf.cx>
+
+ * autoload.cc (timeBeginPeriod): Delete.
+ * dcrt0.cc (dll_crt0_1): Use NtSetTimerResolution rather than
+ timeBeginPeriod.
+
+2013-12-17 Christopher Faylor <me.cygwin2013@cgf.cx>
+
+ * autoload.cc (timeBeginPeriod): Autoload.
+ * dcrt0.cc (dll_crt0_1): Use timeBeginPeriod to set default resolution
+ to 1 ms.
+ * pinfo.cc (pinfo::thisproc): Set ppid for redirected _pinfo blocks too.
+ (pinfo::init): Avoid using VirtualQuery. Just rely on the assumption that
+ procinfo will be populated.
+ * pinfo.h (_pinfo::ppid): Move into redirected block.
+
+2013-12-17 Christopher Faylor <me.cygwin2013@cgf.cx>
+
+ * external.cc (fillout_pinfo): Remove nonsensical loop.
+ * fork.cc (frok::parent): When initializing pinfo for child new PID_NEW
+ flag + actual defined constant rather than raw number. Don't set
+ start_time here.
+ * pinfo.cc (pinfo::thisproc): Use PID_NEW when initializing pinfo.
+ Avoid checking h for NULL multiple times. Don't set start_time here.
+ (pinfo_init): Aways set ppid last. Tweak strace output.
+ (pinfo::init): Handle new PID_NEW flag. Wait for shared memory to
+ contain useful information. Set start_time if PID_NEW.
+ (_onreturn:h): Define as HANDLE rather than HANDLE *.
+ (_onreturn::~onreturn): Accommodate h definition change.
+ (_onreturn::no_close_handle): Rename from no_close_p_handle. Take a
+ pinfo arg and set hProcess to h before zeroing.
+ (winpids::add): Don't open a handle to our own process. Change logic
+ associated with when a handle gets closed. Accommodate no_close_handle
+ changes.
+ (winpids::enum_processes): Simplify process enumeration loop.
+ (winpids::set): Eliminate ill-considered malloc locking.
+ * sigproc.cc (proc_subproc): Always set ppid last.
+
+2013-12-17 Christopher Faylor <me.cygwin2013@cgf.cx>
+
+ * sigproc.cc (sig_send): Set PIPE_NOWAIT for pipes which are not us.
+
+2013-12-17 Christopher Faylor <me.cygwin2013@cgf.cx>
+
+ * fhandler.h (fhandler_pty_master::~fhandler_pty_master): Delete.
+ * fhandler_tty.cc (fhandler_pty_master::~fhandler_pty_master): Ditto.
+
+2013-12-11 Corinna Vinschen <corinna@vinschen.de>
+
+ * syscalls.cc (NT_TRANSACTIONAL_ERROR): Define.
+ (stop_transaction): Take "trans" HANDLE by reference and set it to
+ NULL after closing it.
+ (unlink_nt): If NtOpenFile fails due to a transactional error, stop
+ transaction and retry NtOpenFile. Simplify check for having to call
+ stop_transaction.
+ (rename): If NtOpenFile fails due to a transactional error, stop
+ transaction and retry NtOpenFile in both affected cases. Simplify check
+ for having to call stop_transaction and add comment from unlink_nt.
+
+2013-12-11 Corinna Vinschen <corinna@vinschen.de>
+
+ * mount.cc (fs_info::update): Fix formatting.
+
+2013-12-10 Corinna Vinschen <corinna@vinschen.de>
+
+ * fhandler.h (fhandler_dev_clipboard): Add private member
+ cygnativeformat. Declare private method set_clipboard.
+ * fhandler_clipboard.cc (cygnativeformat): Convert static variable to
+ fhandler_dev_clipboard member.
+ (fhandler_dev_clipboard::set_clipboard): Convert from static function
+ to fhandler_dev_clipboard method.
+
+2013-12-09 Christopher Faylor <me.cygwin2013@cgf.cx>
+
+ * globals.cc (hntdll): Define/declare.
+ * exceptions.cc (inside_kernel): Don't call GetModuleFileName if we
+ know we're in ntdll.
+ * sigproc.cc (wait_sig): Initialize hntdll.
+
+2013-12-09 Corinna Vinschen <corinna@vinschen.de>
+
+ * include/cygwin/stdlib.h (initstate, random, setstate, srandom):
+ Harden _XOPEN_SOURCE guard against applications defining _XOPEN_SOURCE
+ with empty value.
+
+2013-12-08 Corinna Vinschen <corinna@vinschen.de>
+
+ * include/cygwin/version.h (CYGWIN_VERSION_DLL_MINOR): Bump to 28.
+
+2013-12-07 Corinna Vinschen <corinna@vinschen.de>
+
+ * path.cc (symlink_native): Workaround Windows 8.1 bug: Drop long path
+ prefix from symlink target path. Add comment to explain why.
+
+2013-12-06 Christopher Faylor <me.cygwin2013@cgf.cx>
+
+ * syscalls.cc (dup): Use cygheap_fdnew properly.
+
+2013-12-05 Christopher Faylor <me.cygwin2013@cgf.cx>
+
+ * cygheap.h (cygheap_fdnew): Avoid setting errno directly since it will
+ have been set by a previous function.
+ * dtable.h (dtable::extend): Accept second size_t argument.
+ * dtable.cc (dtable::extend): Accept second "min" argument which allows
+ checking for OPEN_MAX_MAX boundary conditions.
+ (dtable_init): Accommodate second argument to dtable::extend.
+ (dtable::find_unused_handle): Ditto.
+ * syscalls.cc (setdtablesize): Ditto.
+ (dup): Return any error passed by cygheap_fdnew() directly.
+ (getdtablesize): Just return dtable size directly.
+
+2013-12-04 Christopher Faylor <me.cygwin2013@cgf.cx>
+
+ * dtable.cc (dtable::find_unused_handle): When extending, always make
+ sure that there is a NOFILE_INCR chunk following the free fd.
+
+2013-12-03 Christopher Faylor <me.cygwin2013@cgf.cx>
+
+ * select.cc (select): Add workaround for, as yet undebugged,
+ pathological case.
+
+2013-12-01 Christopher Faylor <me.cygwin2013@cgf.cx>
+
+ * dtable.cc (dtable::find_unused_handle): Break out of the right loop.
+
+2013-12-01 Christopher Faylor <me.cygwin2013@cgf.cx>
+
+ * dtable.cc (dtable::find_unused_handle): Fix off-by-one error. Always
+ exit through the bottom.
+ (cygwin_attach_handle_to_fd): Make sure that fd tab is locked for the
+ duration of this function.
+ * dtable.h (dtable::lock): Make public.
+ (dtable::unlock): Ditto.
+ (dtable): Remove friends.
+
+2013-12-01 Corinna Vinschen <corinna@vinschen.de>
+
+ * dtable.cc (dtable::extend): Change local variable new_size to size_t
+ as well.
+
+ * thread.cc: Fix comment.
+
+2013-11-30 Christopher Faylor <me.cygwin2013@cgf.cx>
+
+ * dtable.h (dtable::first_fd_for_open): Change declaration to size_t.
+ (dtable::extend): Change parameter to size_t.
+ (dtable::find_unused_handle): Ditto.
+ * dtable.cc: Remove now-unused header.
+ (dtable::extend): Remove pointless test. Change parameter to size_t.
+ (dtable::find_unused_handle): Rework to avoid MAX calculation in
+ extend() call. Change parameter to size_t.
+
+2013-11-30 Christopher Faylor <me.cygwin2013@cgf.cx>
+
+ * dtable.cc (build_fh_pc): When creating an archetype, use native name
+ rather than unix name if name doesn't exist.
+
+2013-11-29 Christopher Faylor <me.cygwin2013@cgf.cx>
+
+ * include/cygwin/version.h (CYGWIN_VERSION_DLL_MINOR): Bump to 27.
+
+2013-11-29 Jon TURNEY <jon.turney@dronecode.org.uk>
+
+ * include/cygwin/stdlib.h (initstate, random, setstate, srandom):
+ Prototype if not __STRICT_ANSI__ or _XOPEN_SOURCE is defined
+ appropriately.
+
+2013-11-28 Alexey Pavlov <alexpux@gmail.com>
+
+ * include/glob.h: Fix invalid use of 'restrict' error.
+
+2013-11-27 Corinna Vinschen <corinna@vinschen.de>
+
+ * syscalls.cc (try_to_bin): Enhance debug output in case reopen fails.
+
+2013-11-27 Corinna Vinschen <corinna@vinschen.de>
+
+ * syscalls.cc (try_to_bin): Drop fh_dup, reuse tmp_fh instead.
+
+2013-11-27 Corinna Vinschen <corinna@vinschen.de>
+
+ * syscalls.cc (try_to_bin): Take additional parameter to get file open
+ flags. If the file to move to the bin has been opened casesensitive,
+ reopen it caseinsensitive. Explain why. Revert the default name of
+ the Vista-and-later recycler to mixed case for readability.
+ (unlink_nt): Call try_to_bin with file open flags as evaluated.
+
+2013-11-26 Corinna Vinschen <corinna@vinschen.de>
+
+ * nlsfuncs.cc (wcscoll): Add "__restrict" to definition.
+ (wcsxfrm): Ditto.
+
+2013-11-26 Corinna Vinschen <corinna@vinschen.de>
+
+ * common.din: Export posix_spawn[...] functions.
+ * exec.cc (execve): Add EXPORT_ALIAS _execve.
+ * include/cygwin/version.h (CYGWIN_VERSION_API_MINOR): Bump.
+ * posix.sgml (std-susv4): Add posix_spawn[...] here.
+ (std-notimpl): Drop here.
+
+2013-11-26 Corinna Vinschen <corinna@vinschen.de>
+
+ * nlsfuncs.cc (strcoll): Add "__restrict" to definition.
+ (strxfrm): Ditto.
+
+2013-11-25 Corinna Vinschen <corinna@vinschen.de>
+
+ Throughout, keep function definitions and declarations in sync with
+ newlib in terms of C99 "restrict" keyword.
+
+2013-11-24 Corinna Vinschen <corinna@vinschen.de>
+
+ * dtable.cc: Include sys/param.h for MAX definition.
+
+2013-11-24 Corinna Vinschen <corinna@vinschen.de>
+
+ Throughout, drop unnecessary explicit includes of windows header files
+ included by default.
+ * winlean.h: Add long comment to explain why we have to define certain
+ symbols.
+ (_NORMALIZE_): Define.
+ (_WINNLS_): Drop definition and subsequent undef.
+ (_WINNETWK_): Ditto.
+ (_WINSVC_): Ditto.
+
+2013-11-23 Eric Blake <eblake@redhat.com>
+
+ dup2: fix off-by-one crash
+ * dtable.cc (dup3): Fix off-by-one.
+ (find_unused_handle): Reduce time spent expanding during dup.
+ * syscalls.cc (setdtablesize): Report error on invalid value.
+
+2013-11-20 Corinna Vinschen <corinna@vinschen.de>
+
+ * include/cygwin/stdlib.h (realpath): Drop declaration. It's declared
+ in newlib's stdlib.h now.
+
+2013-11-19 Corinna Vinschen <corinna@vinschen.de>
+
+ * ntdll.h (RtlGetVersion): Declare.
+ * wincap.cc (wincapc::init): Rather than GetVersionEx, call
+ RtlGetVersion which is not crippled by missing Windows 8.1 manifest.
+ * wincap.h (wincapc): Change type of version to RTL_OSVERSIONINFOEXW.
+ Align formatting of all class members.
+
+2013-11-19 Corinna Vinschen <corinna@vinschen.de>
+
+ * wincap.cc (wincapc::init): Revert previous change. It's not working.
+
+2013-11-19 Corinna Vinschen <corinna@vinschen.de>
+
+ * net.cc (cygwin_getaddrinfo): Fix a comment. Only memset whints if
+ hints is NULL. Add a comment and set whints.ai_family explicitely to
+ AF_UNSPEC to follow glibc man page closely. Check flags against whints
+ for locality.
+
+2013-11-19 Corinna Vinschen <corinna@vinschen.de>
+
+ * wincap.cc (wincapc::init): Fix dwMinorVersion for Windows 8.1 and
+ Server 2012. Explain why this is necessary.
+
+2013-11-19 Corinna Vinschen <corinna@vinschen.de>
+
+ * autoload.cc (IdnToAscii): Define.
+ (IdnToUnicode): Define.
+ (FreeAddrInfoW): Define.
+ (GetAddrInfoW): Define.
+ (GetNameInfoW): Define.
+ * net.cc: Drop W. Richard STEVENS libgai implementation.
+ (cygwin_freeaddrinfo): Move code from ipv4_freeaddrinfo here. Move
+ definition up in file to avoid forward declaration in ga_duplist.
+ (ga_dup): Take addrinfoW as input. Add parameters to get IDN flags
+ and to set error value. Handle IDN flags and especially AI_CANONIDN.
+ Convert input wchar_t ai_canonname string to multibyte for output.
+ (ga_duplist): Add parameters to get IDN flags and to set error value
+ and propagate to ga_dup. Call cygwin_freeaddrinfo.
+ (gai_errmap): Add comments. Align error strings to GLibc. Add
+ EAI_IDN_ENCODE entry.
+ (get_ipv6_funcs): Remove.
+ (load_ipv6_guard): Remove.
+ (ipv6_inited): Remove.
+ (load_ipv6): Remove.
+ (load_ipv6_funcs): Remove.
+ (cygwin_getaddrinfo): Drop calling load_ipv6. Handle AI_IDN* flags.
+ Convert input strings to wchar_t and call GetAddrInfoW/FreeAddrInfoW.
+ In case hints is NULL, set default ai_flags explicitely to
+ AI_V4MAPPED | AI_ADDRCONFIG, as documented for Glibc. Only add AI_ALL
+ if AI_ADDRCONFIG is not given. Unconditionally add Windows-specific
+ AI_DISABLE_IDN_ENCODING to ai_flags to make IDN behaviour compatible
+ to Glibc even on Windows 8 and later.
+ (cygwin_getnameinfo): Drop calling load_ipv6. Handle NI_IDN* flags.
+ Call GetNameInfoW and convert returned strings from wchar_t to
+ multibyte.
+ * include/netdb.h: Add comments to describe flags and error values.
+ (AI_*): Define all flags using hex values for clearness.
+ (AI_IDN): Define.
+ (AI_CANONIDN): Define.
+ (AI_IDN_ALLOW_UNASSIGNED): Define.
+ (AI_IDN_USE_STD3_ASCII_RULES): Define.
+ (NI_*): Define all flags using hex values for clearness.
+ (NI_IDN): Define.
+ (NI_IDN_ALLOW_UNASSIGNED): Define.
+ (NI_IDN_USE_STD3_ASCII_RULES): Define.
+ (EAI_IDN_ENCODE): Define.
+
+2013-11-06 Christopher Faylor <me.cygwin2013@cgf.cx>
+
+ * configure.ac: Detect windows headers/libs after we've figured out the
+ C compiler.
+ * configure: Regenerate.
+ * aclocal.m4: Regenerate.
+
+2013-10-30 Corinna Vinschen <corinna@vinschen.de>
+
+ * devices.in (dev_cygdrive_storage): Revert mapping to \Device\Null.
+ (dev_storage): Ditto for /dev.
+ * devices.cc: Regenerate.
+ * fhandler.cc (fhandler_base::open_null): New method to open a fake
+ \Device\Null handler.
+ (fhandler_base::open): Fix formatting. Change O_ACCMODE test to a
+ switch statement. Simplify a test which still tested for a now unused
+ create_disposition.
+ * fhandler.h (fhandler_base::open_null): Declare.
+ (fhandler_netdrive::close): Declare.
+ * fhandler_dev.cc (fhandler_dev::open): Open fake \Device\Null handle
+ by just calling new open_null method.
+ * fhandler_disk_file.cc (fhandler_cygdrive::open): Ditto.
+ * fhandler_netdrive.cc (fhandler_netdrive::open): Call open_null
+ rather than setting nohandle.
+ (fhandler_netdrive::close): New method.
+ * fhandler_registry.cc (fetch_hkey): Fix token in RegOpenUserClassesRoot
+ call. Create valid key for HKEY_CURRENT_CONFIG by mapping to real key
+ HKEY_LOCAL_MACHINE\System\CurrentControlSet\Hardware Profiles\Current.
+ (fhandler_registry::open): Set nohandle only when using pseudo registry
+ handle.
+ * fhandler_virtual.cc (fhandler_virtual::opendir): Call open rather
+ than just setting nohandle here.
+ * fhandler_virtual::fstatvfs): Set ST_RDONLY fs flag.
+ * globals.cc (ro_u_null): New readonly UNICODE_STRING for \Device\Null.
+ * path.h (path_conv::set_path): Revert previous change caring for
+ wide_path.
+
+2013-10-30 Corinna Vinschen <corinna@vinschen.de>
+
+ * devices.in (dev_cygdrive_storage): Map to \Device\Null.
+ (dev_storage): Map /dev and /dev/windows to \Device\Null.
+ * devices.cc: Regenerate.
+ * dir.cc (opendir): Create unique id. Explain why.
+ * fhandler.h (fhandler_dev::get_dev): Implement inline.
+ (fhandler_cygdrive::close): Drop declaration.
+ (fhandler_cygdrive::get_dev): Implement inline.
+ (fhandler_windows::get_hwnd): Ditto.
+ (fhandler_windows::set_close_on_exec): Drop declaration.
+ (fhandler_windows::fixup_after_fork): Ditto.
+ * fhandler_dev.cc (fhandler_dev::open): Call fhandler_disk_file::open
+ without O_CREAT flag. Explain why. Create \Device\Null handle if
+ /dev/ doesn't actually exist.
+ (fhandler_dev::close): Drop nohandle case.
+ (fhandler_dev::fstatvfs): Drop nohandle check. Test for fs_got_fs
+ instead. Set ST_RDONLY fs flag for simulated /dev.
+ (fhandler_dev::opendir): If /dev doesn't exist, call open() to create
+ fake \Device\Null handle. Don't set nohandle. Set dir_exists
+ correctly.
+ (fhandler_dev::rewinddir): Call fhandler_disk_file::rewinddir only if
+ /dev is a real directory.
+ * fhandler_disk_file.cc (fhandler_disk_file::opendir): If called for
+ the cygdrive dir, call open() to create fake \Device\Null handle.
+ Only attach __DIR_mounts buffer to dir if not called for cygdrive dir.
+ Don't set nohandle.
+ (fhandler_cygdrive::open): Create \Device\Null handle.
+ (fhandler_cygdrive::close): Remove.
+ (fhandler_cygdrive::fstatvfs): Set ST_RDONLY fs flag.
+ * fhandler_windows.cc (fhandler_windows::open): Create \Device\Null
+ handle.
+ (fhandler_windows::read): Don't add io_handle to WFMO handle array.
+ Change subsequent test for return value accordingly. Fix test for
+ "message arrived".
+ (fhandler_windows::set_close_on_exec): Remove.
+ (fhandler_windows::fixup_after_fork): Remove.
+ * path.h (path_conv::set_path): Make sure wide_path is NULL when
+ setting a new path.
+ * select.cc (peek_windows): Use correct hWnd value, not io_handle.
+ (fhandler_windows::select_read): Don't use io_handle as wait object.
+ (fhandler_windows::select_write): Ditto.
+ (fhandler_windows::select_except): Ditto.
+
+2013-10-27 Corinna Vinschen <corinna@vinschen.de>
+
+ * exception.h: Fold in content of include/exceptions.h.
+ * include/exceptions.h: Remove.
+
+2013-10-26 Corinna Vinschen <corinna@vinschen.de>
+
+ * devices.in (dev_storage): Map /dev/dsp to \Device\Null.
+ * devices.cc: Regenerate.
+ * fhandler_dsp.cc (fhandler_dev_dsp::open): Call fhandler_base::open.
+ (fhandler_dev_dsp::close): Call fhandler_base::close.
+ (fhandler_dev_dsp::fixup_after_fork): Call
+ fhandler_base::fixup_after_fork.
+
+ * fhandler_raw.cc (fhandler_dev_raw::fixup_after_fork): Call
+ fhandler_base::fixup_after_fork.
+
+2013-10-26 Corinna Vinschen <corinna@vinschen.de>
+
+ * exception.h (_exception_list): Drop redefinition for x86_64.
+ * include/exceptions.h: Disable content for x86_64 since it's not
+ using frame based exception handling anymore.
+
+2013-10-25 Corinna Vinschen <corinna@vinschen.de>
+
+ * flock.cc (fhandler_base::lock): Only refuse to lock nohandle and
+ old-style console devices when called to perform BSD flock locking.
+ Add a FIXME to comment and align description.
+
+ * ntdll.h (THREADINFOCLASS): Following MSDN, rename throughout from
+ THREAD_INFORMATION_CLASS.
+
+2013-10-25 Corinna Vinschen <corinna@vinschen.de>
+
+ * devices.in (dev_storage): Map /dev/clipboard to \Device\Null.
+ * devices.cc: Regenerate.
+ * fhandler.h (fhandler_dev_clipboard::open): Drop declaration.
+ * fhandler_clipboard.cc (fhandler_dev_clipboard::dup): Drop call to
+ open. Set private members to 0 and call fhandler_base::dup.
+ (fhandler_dev_clipboard::open): Remove so that default
+ fhandler_base::open is used to open \Device\Null.
+ (set_clipboard): Drop gratuitios call to RegisterClipboardFormatW.
+ (fhandler_dev_clipboard::close): Call fhandler_base::close from here.
+
+2013-10-25 Corinna Vinschen <corinna@vinschen.de>
+
+ * fhandler_disk_file.cc (fhandler_base::fstat_fs): Fix comment.
+
+2013-10-25 Corinna Vinschen <corinna@vinschen.de>
+
+ * fhandler_clipboard.cc (fhandler_dev_clipboard::open): Drop gratuitios
+ handling of membuffer. It's NULL anyway.
+ (fhandler_dev_clipboard::lseek): Set membuffer to NULL after freeing
+ it to avoid subsequent crashes when accessing invalid pointer.
+
+2013-10-25 Corinna Vinschen <corinna@vinschen.de>
+
+ * devices.in (dev_storage): Map /dev/random and /dev/urandom to
+ \Device\Null.
+ * devices.cc: Regenerate.
+ * fhandler.h (fhandler_dev_random::open): Drop declaration.
+ (fhandler_dev_random::close): Ditto.
+ (fhandler_dev_random::crypt_gen_random): Convert to static method.
+ * fhandler_random.cc (fhandler_dev_random::open): Remove so that default
+ fhandler_base::open is used to open \Device\Null.
+ (fhandler_dev_random::close): Ditto.
+ * fhandler_socket.cc (entropy_source): Delete.
+ (fhandler_socket::af_local_set_secret): Remove entropy_source code and
+ call fhandler_dev_random::crypt_gen_random directly instead.
+
+2013-10-24 Corinna Vinschen <corinna@vinschen.de>
+
+ * fhandler.h (fhandler_dev_zero::lseek): Convert to inline method.
+ (class fhandler_dev_random): Drop dummy_offset.
+ (fhandler_dev_random::lseek): Convert to inline method.
+ (fhandler_dev_dsp::lseek): Ditto.
+ * fhandler_dsp.cc (fhandler_dev_dsp::lseek): Drop here.
+ * fhandler_random.cc (fhandler_dev_random::open): Drop setting
+ dummy_offset.
+ (fhandler_dev_random::lseek): Drop here.
+ * fhandler_tape.cc (fhandler_dev_tape::lseek): Make no-op, but keep
+ old code for reference.
+ * fhandler_zero.cc (fhandler_dev_zero::lseek): Drop here.
+
+2013-10-24 Christopher Faylor <me.cygwin2013@cgf.cx>
+
+ * external.cc (fillout_pinfo): If start_time is 0, wait a while before
+ returning the pinfo structure.
+
+ * fhandler.cc (fhandler_base::open_setup): Convert from inline.
+ * fhandler.h (fhandler_base::open_setup): Declare.
+ * fhandler_console.cc (fhandler_console::open_setup): Always call
+ fhandler_base::open_setup.
+ * fhandler_tty.cc (fhandler_pty_slave::open_setup): Ditto.
+ (fhandler_pty_master::open_setup): Ditto.
+
+2013-10-24 Corinna Vinschen <corinna@vinschen.de>
+
+ * devices.in (dev_storage): Map /dev/zero and /dev/full to \Device\Null.
+ * devices.cc: Regenerate.
+ * dtable.h (struct dtable): Make fhandler_base friend, rather
+ than fhandler_disk_file.
+ * fhandler.cc (fhandler_base::open_with_arch): Create unique id.
+ (fhandler_base::cleanup): Call del_my_locks.
+ (fhandler_base::fcntl): Handle F_GETLK, F_SETLK and F_SETLKW.
+ * fhandler.h (fhandler_base::get_dev): Return real device number.
+ (fhandler_base::set_unique_id): New inline method.
+ (fhandler_disk_file::lock): Drop declaration.
+ (fhandler_disk_file::get_dev): New method, return pc.fs_serial_number.
+ (fhandler_dev_zero::open): Drop declaration.
+ * fhandler_disk_file.cc (fhandler_disk_file::close): Move
+ del_my_locks call to fhandler_base::open_with_arch.
+ (fhandler_disk_file::fcntl): Move handling of locking commands to
+ fhandler_base::fcntl.
+ (fhandler_base::open_fs): Drop call to NtAllocateLocallyUniqueId.
+ * fhandler_zero.cc (fhandler_dev_zero::open): Remove so that default
+ fhandler_base::open is used to open \Device\Null.
+ * flock.cc (fixup_lockf_after_exec): Finding a single fhandler is
+ enough here.
+ (fhandler_base::lock): Replace fhandler_disk_file::lock. Refuse to lock
+ nohandle devices. Handle read/write test using POSIX flags. Explain
+ why. Never fail on SEEK_CUR or SEEK_END, rather assume position 0,
+ just as Linux.
+ * net.cc (fdsock): Create unique id.
+
+2013-10-23 Corinna Vinschen <corinna@vinschen.de>
+
+ * include/cygwin/config.h (_READ_WRITE_BUFSIZE_TYPE): Define.
+
+2013-10-23 Corinna Vinschen <corinna@vinschen.de>
+
+ * fhandler.cc (fhandler_base::fstat): Drop FH_FULL case to align
+ /dev/full permissions to Linux.
+
+2013-10-22 Christopher Faylor <me.cygwin2013@cgf.cx>
+
+ * fhandler.h (fhandler_base::cleanup): Mark as extern rather than
+ inline.
+ * fhandler_base.cc (fhandler_base::cleanup): Define.
+ * fhandler_tty.cc (fhandler_pty_slave::cleanup): Call fhandler_base::cleanup.
+ (fhandler_pty_master::cleanup): Ditto.
+
+2013-10-18 Christopher Faylor <me.cygwin2013@cgf.cx>
+
+ * fhandler_termios.cc (tty_min::kill_pgrp): Don't send a signal to
+ myself if this process is exiting.
+
+2013-10-18 Christopher Faylor <me.cygwin2013@cgf.cx>
+
+ * tty.cc (tty_list::allocate): Set sid to 0 rather than -1 since -1 is
+ an error condition.
+
+2013-10-16 Corinna Vinschen <corinna@vinschen.de>
+
+ * fhandler_process.cc (format_process_ctty): Fix random content of
+ /proc/$PID/ctty if the process has no controlling tty. Set to just
+ "\n" instead.
+
+2013-10-15 Corinna Vinschen <corinna@vinschen.de>
+
+ * autoload.cc (CryptAcquireContextW): Remove.
+ (CryptGenRandom): Remove.
+ (CryptReleaseContext): Remove.
+ (SystemFunction036): Define. Add comment to explain that this is
+ actually the RtlGenRandom function.
+ * fhandler.h (class fhandler_dev_random): Drop crypt_prov member.
+ (fhandler_dev_random::fhandler_dev_random): Define inline.
+ (fhandler_dev_random::dup): Drop declaration.
+ * fhandler_random.cc (fhandler_dev_random::fhandler_dev_random): Remove
+ here.
+ (fhandler_dev_random::crypt_gen_random): Use RtlGenRandom to drop
+ dependency to old Crypto API.
+ (fhandler_dev_random::read): Implement an enhanced version of reading
+ random bytes from RtlGenRandom for the sake of a better /dev/random
+ emulation.
+ (fhandler_dev_random::close): Just return 0 since crypt_prov doesn't
+ exisyt anymore.
+ (fhandler_dev_random::dup): Drop entirely for the same reason.
+
+2013-10-15 Corinna Vinschen <corinna@vinschen.de>
+
+ * mmap.cc (mmap64): Convert pagesize from DWORD to size_t to avoid
+ a rounding error for allocations beyond 4 Gigs.
+
+2013-10-05 Christopher Faylor <me.cygwin2013@cgf.cx>
+
+ * ntdll.h: Guard against new header files.
+
+2013-09-25 Christopher Faylor <me.cygwin2013@cgf.cx>
+
+ * include/cygwin/version.h (CYGWIN_VERSION_DLL_MINOR): Bump to 26.
+
+2013-09-25 Christopher Faylor <me.cygwin2013@cgf.cx>
+
+ * sigproc.h (hold_everything::ischild): Declare as reference.
+ (hold_everything::hold_everything): Store address of caller's notion of
+ "ischild".
+
+2013-09-25 Christopher Faylor <me.cygwin2013@cgf.cx>
+ Paul Kunysch <paul.kunysch@emsys.de>
+
+ * thread.cc (semaphore::_getvalue): Set *sval as appropriate. Set
+ errno and return -1 on error.
+
2013-08-31 Corinna Vinschen <corinna@vinschen.de>
* include/cygwin/version.h (CYGWIN_VERSION_DLL_MINOR): Belatedly bump
diff --git a/winsup/CVSChangeLogs.old/cygwin/ChangeLog-2014 b/winsup/CVSChangeLogs.old/cygwin/ChangeLog-2014
new file mode 100644
index 000000000..7feccf499
--- /dev/null
+++ b/winsup/CVSChangeLogs.old/cygwin/ChangeLog-2014
@@ -0,0 +1,2745 @@
+2014-12-18 Yaakov Selkowitz <yselkowitz@cygwin.com>
+
+ * common.din (__fbufsize, __flbf, __fpending, __freadable, __freading,
+ __fsetlocking, __fwritable, __fwriting, clearerr_unlocked,
+ feof_unlocked, ferror_unlocked, fflush_unlocked, fgetc_unlocked,
+ fgets_unlocked, fgetwc_unlocked, fgetws_unlocked, fileno_unlocked,
+ fputc_unlocked, fputs_unlocked, fputwc_unlocked, fputws_unlocked,
+ fread_unlocked, fwrite_unlocked, getwc_unlocked, getwchar_unlocked,
+ putwc_unlocked, putwchar_unlocked): Export.
+ * include/cygwin/version.h (CYGWIN_VERSION_API_MINOR): Bump.
+
+2014-12-16 Corinna Vinschen <corinna@vinschen.de>
+
+ * path.cc (find_fast_cwd): Point to problem reporting web site rather
+ than to mailing list.
+
+2014-12-16 Corinna Vinschen <corinna@vinschen.de>
+
+ * path.cc (warn_msdos): Slightly reformat.
+ (find_fast_cwd): Change warning message to urge an update before
+ reporting the problem.
+
+2014-12-10 Corinna Vinschen <corinna@vinschen.de>
+
+ * winver.rc (LegalCopyright): Fix belatedly (uh-oh).
+
+2014-12-08 Corinna Vinschen <corinna@vinschen.de>
+
+ * environ.cc (regopt): Remove function.
+ (environ_init): Drop undocumented feature to read application-specific
+ environment variables from the registry.
+ * include/cygwin/version.h (CYGWIN_INFO_PROGRAM_OPTIONS_NAME): Remove.
+
+2014-12-05 Corinna Vinschen <corinna@vinschen.de>
+
+ * environ.cc (build_env): Remove loquacious debug statements.
+
+2014-12-05 Yaakov Selkowitz <yselkowitz@cygwin.com>
+
+ * common.din (__bsd_qsort_r): Add.
+ (qsort_r): Add.
+ * include/cygwin/version.h (CYGWIN_VERSION_API_MINOR): Bump.
+
+2014-12-02 Corinna Vinschen <corinna@vinschen.de>
+
+ * flock.cc (create_lock_in_parent): Make lf_obj handle inheritable.
+ Explain why.
+ (lockf_t::create_lock_obj): Use FALSE, rather than 0 for BOOL argument.
+ (lockf_t::del_lock_obj): Check if NtSetEvent succeeded and print system
+ message if not.
+
+2014-12-02 Corinna Vinschen <corinna@vinschen.de>
+
+ * uinfo.cc (fetch_windows_home): New function fetching Windows-compliant
+ home directory. Include longish comment to explain what we're doing.
+ (cygheap_pwdgrp::get_home): Take additional sid parameter. In
+ NSS_SCHEME_WINDOWS case, call fetch_windows_home to create home
+ directory.
+ (pwdgrp::fetch_account_from_windows): Call cygheap_pwdgrp::get_home
+ with additional sid argument.
+ * cygheap.h (cygheap_pwdgrp::get_home): Align declaration to above
+ change.
+
+2014-12-02 Corinna Vinschen <corinna@vinschen.de>
+
+ * uinfo.cc (cygheap_user::ontherange): Fix order of fallbacks creating
+ HOMEDRIVE/HOMEPATH values to be Windows-compliant. Add comments.
+
+2014-12-02 Corinna Vinschen <corinna@vinschen.de>
+
+ * autoload.cc (CreateProfile): Import.
+ (LoadUserProfileW): Import.
+ * registry.cc (get_registry_hive_path): Move to sec_auth.cc.
+ (load_registry_hive): Remove.
+ * registry.h (get_registry_hive_path): Drop declaration.
+ (load_registry_hive): Ditto.
+ * sec_auth.cc (get_user_profile_directory): Moved from registry.cc and
+ renamed. Take third parameter with buffer length.
+ (load_user_profile): New function taking over for load_registry_hive.
+ Use official functions to load profile. If profile is missing, create
+ it on Vista and later.
+ * security.h (get_user_profile_directory): Declare.
+ (load_user_profile): Declare.
+ * syscalls.cc (seteuid32): Replace call to load_registry_hive with call
+ to load_user_profile.
+ * uinfo.cc (cygheap_user::env_userprofile): Replace call to
+ get_registry_hive_path with call to get_user_profile_directory.
+
+2014-12-02 Corinna Vinschen <corinna@vinschen.de>
+
+ * uinfo.cc (fetch_from_description): Make static.
+ (fetch_from_path): Ditto.
+
+2014-12-02 Corinna Vinschen <corinna@vinschen.de>
+
+ * autoload.cc (CreateEnvironmentBlock): Import.
+ (DestroyEnvironmentBlock): Import.
+ * environ.cc (env_compare): New static bsearch comparison function.
+ (build_env): Add parameter taking a user token. If token is non-NULL,
+ fetch user's default Windows environment and merge it into the resulting
+ environment. Explain what we do in preceeding comment.
+ * environ,h (build_env): Align prototype to above change.
+ * external.cc (create_winenv): Call build_env with NULL token.
+ * spawn.cc (child_info_spawn::worker): When spawning new process under
+ another user account, call build_env with new token to allow merging
+ user's default Windows environment.
+ * winlean.h (_USERENV_): Define to override dllimport.
+
+2014-12-02 Corinna Vinschen <corinna@vinschen.de>
+
+ * spawn.cc (child_info_spawn::worker): Fix formatting.
+
+2014-12-02 Corinna Vinschen <corinna@vinschen.de>
+
+ * sec_auth.cc (str2lsa): Remove.
+ (str2buf2lsa): Remove.
+ (lsaauth): Call RtlInitAnsiString instead of str2lsa and str2buf2lsa.
+
+2014-12-02 Corinna Vinschen <corinna@vinschen.de>
+
+ * cygheap.cc (init_cygheap::init_installation_root): Fix typo in
+ comment.
+
+2014-12-02 Corinna Vinschen <corinna@vinschen.de>
+
+ * autoload.cc (IdnToAscii): Use simpler, equivalent LoadDLLfuncEx.
+ (IdnToUnicode): Ditto.
+
+2014-12-01 Corinna Vinschen <corinna@vinschen.de>
+
+ * wincap.cc (wincap_minimal): Remove.
+ (wincaps): Drop has_physical_mem_access.
+ (wincap_10): New global wincaps to support Windows 10.
+ (wincapc::init): Use wincap_10 for version >= 6.4 and as default.
+ * wincap.h (wincaps::has_physical_mem_access): remove.
+
+2014-11-28 Corinna Vinschen <corinna@vinschen.de>
+
+ * cygheap.cc (init_cygheap::init_tls_list): Accommodate threadlist
+ having a new type threadlist_t *. Convert commented out code into an
+ #if 0. Create thread mutex. Explain why.
+ (init_cygheap::remove_tls): Drop timeout value. Always wait infinitely
+ for tls_sentry. Return mutex HANDLE of just deleted threadlist entry.
+ (init_cygheap::find_tls): New implementation taking tls pointer as
+ search parameter. Return threadlist_t *.
+ (init_cygheap::find_tls): Return threadlist_t *. Define ix as auto
+ variable. Drop exception handling since crash must be made impossible
+ due to correct synchronization. Return with locked mutex.
+ * cygheap.h (struct threadlist_t): Define.
+ (struct init_cygheap): Convert threadlist to threadlist_t type.
+ (init_cygheap::remove_tls): Align declaration to above change.
+ (init_cygheap::find_tls): Ditto.
+ (init_cygheap::unlock_tls): Define.
+ * cygtls.cc (_cygtls::remove): Unlock and close mutex when finishing.
+ * exceptions.cc (sigpacket::process): Lock _cygtls area of thread before
+ accessing it.
+ * fhandler_termios.cc (fhandler_termios::bg_check): Ditto.
+ * sigproc.cc (sig_send): Ditto.
+ * thread.cc (pthread::exit): Ditto. Add comment.
+ (pthread::cancel): Ditto.
+
+2014-11-28 Corinna Vinschen <corinna@vinschen.de>
+
+ * cygheap.cc (init_cygheap::find_tls): Add comment.
+ * cygtls.cc (well_known_dlls): Rephrase comment.
+ (bloda_detect): New function.
+ (_cygtls::call2): Call init_thread and bloda_detect for non-pthread
+ threads only.
+ (_cygtls::remove): Move remove_tls and remove_wq calls up to run first.
+ * miscfuncs.cc (struct pthread_wrapper_arg): Rename from struct
+ thread_wrapper_arg.
+ (pthread_wrapper): Rename from thread_wrapper and drop "static". Fix
+ comment. Drop call to _cygtls::remove. Call api_fatal rather than
+ ExitThread. Explain why.
+ * miscfuncs.h (pthread_wrapper): Declare pthread_wrapper.
+ * thread.cc (pthread::exit): Add a FIXME comment. Call _cygtls::remove
+ before calling ExitThread.
+
+2014-11-27 Corinna Vinschen <corinna@vinschen.de>
+
+ * mount.cc (mount_info::init): Take bool argument and allow to
+ initialize mount table in two steps, system and user, depending on
+ bool value.
+ * mount.h (class mount_info): Align declaration of init function to
+ above change.
+ * shared.cc (user_info::initialize): Initialize mount table in two
+ steps to allow internal_getpwsid to create valid POSIX paths from
+ DOS paths given in AD. Add comments.
+ * uinfo.cc (cygheap_pwdgrp::get_home): Allow DOS paths in
+ NSS_SCHEME_FREEATTR attributes.
+ (cygheap_pwdgrp::get_shell): Ditto.
+
+2014-11-27 Corinna Vinschen <corinna@vinschen.de>
+
+ * cygheap.cc (init_cygheap::find_tls): Allow to keep loop going after
+ access to threadlist[ix] faulted. In case of an exception, remove
+ threadlist[ix] from threadlist only. Add comment.
+
+2014-11-26 Corinna Vinschen <corinna@vinschen.de>
+
+ * Makefile.in (install): Add install-ldif target.
+ (install-ldif): New target to install cygwin.ldif.
+ * cygheap.h (class cygheap_pwdgrp): Rename pfx_t to nss_pfx_t. Add
+ PFX to enum value. Add nss_scheme_method enum and nss_scheme_t
+ structure. Add home_scheme, shell_scheme and gecos_scheme members.
+ (NSS_SCHEME_MAX): Define.
+ (cygheap_pwdgrp::get_home): Declare.
+ (cygheap_pwdgrp::get_shell): Declare.
+ (cygheap_pwdgrp::get_gecos): Declare.
+ * cygwin.ldif: New file.
+ * ldap.cc (std_user_attr): New array, just defining the standard
+ attributes.
+ (group_attr): Add cygwinUnixGid.
+ (user_attr): Convert to macro pointing to cygheap->pg.ldap_user_attr.
+ (cygheap_pwdgrp::init_ldap_user_attr): New method.
+ (cyg_ldap::fetch_ad_account): Call cygheap_pwdgrp::init_ldap_user_attr
+ if user_attr initialization is required. Fix comment.
+ (cyg_ldap::get_string_attribute): Implement taking attribute name
+ as argument.
+ * ldap.h: Drop unused macros.
+ (cyg_ldap::get_gecos): Remove.
+ (cyg_ldap::get_home): Remove.
+ (cyg_ldap::get_shell): Remove.
+ (cyg_ldap::get_string_attribute): Declare name argument variant public.
+ * uinfo.cc (cygheap_user::ontherange): Fix indentation.
+ (cygheap_pwdgrp::init): Initialize new home_scheme, shell_scheme and
+ gecos_scheme members. Align comment.
+ (NSS_NCMP): Define comparison macro.
+ (NSS_CMP): Ditto.
+ (cygheap_pwdgrp::nss_init_line): Use aforementioned macros throughout.
+ Fix comment handling. Add db_home, db_shell and db_gecos handling.
+ (fetch_from_description): New function to fetch XML-style attributes
+ from (description) string.
+ (fetch_from_path): New function to evaluate path string with wildcards.
+ (cygheap_pwdgrp::get_home): New methods to fetch pw_dir value.
+ (cygheap_pwdgrp::get_shell): Ditto for pw_shell.
+ (cygheap_pwdgrp::get_gecos): Ditto for pw_gecos.
+ (colon_to_semicolon): Move up.
+ (pwdgrp::fetch_account_from_windows): Convert home, shell, gecos
+ variables to char*. Drop statement breaking extended group info.
+ Fetch home, shell and gecos values using new methods. Use
+ fetch_from_description calls to fetch UNIX id and primary groups from
+ SAM comment field. Accommodate uxid being a char* now. Accommodate
+ the fact that extended info is malloc'ed, rather then alloca'ed.
+ Create linebuf content as multibyte string. Create line buffer by
+ just calling cstrdup.
+
+2014-11-25 Corinna Vinschen <corinna@vinschen.de>
+
+ * include/fcntl.h: Move all open flags (except O_NDELAY) to newlib's
+ sys/_default_fcntl.h.
+
+2014-11-25 Corinna Vinschen <corinna@vinschen.de>
+
+ * binmode.c (cygwin_premain0): Don't use underscore'd variants of the
+ open flags.
+ * textmode.c (cygwin_premain0): Ditto.
+
+2014-11-21 Corinna Vinschen <corinna@vinschen.de>
+
+ * init.cc (dll_entry): Revert previous patch. This requires another
+ solution.
+ * miscfuncs.cc (thread_wrapper): Ditto.
+ * sigproc.cc (exit_thread): Disable sending a signal for synchronization
+ with process exit. Explain why. Keep code in for later inspection,
+ should the problem show up again.
+ (sig_send): Use "tls", rather than "tid" as name for _cygtls arg.
+
+2014-11-20 Corinna Vinschen <corinna@vinschen.de>
+
+ * init.cc (dll_entry): Call _my_tls.remove with INFINITE wait period
+ to avoid SEGVs and subsequent hangs in _cygtls::find_tls.
+ * miscfuncs.cc (thread_wrapper): Ditto.
+
+2014-11-20 Iuliu Rus <rus.iuliu@gmail.com>
+
+ * net.cc (fdsock): Change default values for socket buffers on 32 bit
+ to fix performance on 10Gb networks.
+
+2014-11-17 Corinna Vinschen <corinna@vinschen.de>
+
+ * uinfo.cc (pwdgrp::fetch_account_from_windows): Allow fetching of
+ NT SERVICE accounts by name. Always prepend domain to NT SERVICE
+ accounts. Add U-domain\username string to pw_gecos for predefined
+ builtin accounts as well.
+
+2014-11-14 Corinna Vinschen <corinna@vinschen.de>
+
+ * fhandler_termios.cc (fhandler_termios::line_edit): Fix fatal typo in
+ bytes_read pointer checks.
+
+2014-11-13 Corinna Vinschen <corinna@vinschen.de>
+
+ * fhandler.h (fhandler_termios::line_edit): Add parameter to return
+ written bytes.
+ * fhandler_termios.cc (fhandler_termios::tcinit): Fix formatting.
+ (fhandler_termios::line_edit): Return bytes actually written. Write
+ in 32 byte chunks in non-canonical mode to reduce number of WriteFile
+ calls. Don't just eat unwritten bytes in case of an error condition.
+ Especially, don't report them back to the caller as written.
+ * fhandler_tty.cc (fhandler_pty_slave::read): Disable code reducing
+ the number of bytes read from the pipe to vmin. Add comment.
+ (fhandler_pty_master::write): Convert ret to ssize_t type. Just call
+ line_edit once, not in a loop once for each byte. Return bytes written
+ as returned by line_edit.
+
+2014-11-13 Corinna Vinschen <corinna@vinschen.de>
+
+ * include/cygwin/version.h (CYGWIN_VERSION_DLL_MINOR): Bump to 34.
+
+2014-11-12 Corinna Vinschen <corinna@vinschen.de>
+
+ * cygheap.h (cygheap_pwdgrp): Remove constants NSS_FILES and NSS_DB.
+ Use NSS_SRC_FILES and NSS_SRC_DB throughout instead.
+ (cygheap_pwdgrp::nss_pwd_src): New inline method.
+ (cygheap_pwdgrp::nss_grp_src): Ditto.
+ * external.cc (cygwin_internal): Add CW_GETNSS_PWD_SRC and
+ CW_GETNSS_GRP_SRC cases.
+ * uinfo.cc: Use NSS_SRC_FILES and NSS_SRC_DB throughout.
+ * include/cygwin/version.h (CYGWIN_VERSION_API_MINOR): Bump.
+ * include/sys/cygwin.h (cygwin_getinfo_types): Add CW_GETNSS_PWD_SRC
+ and CW_GETNSS_GRP_SRC.
+ (NSS_SRC_FILES): Define.
+ (NSS_SRC_DB): Define.
+
+2014-11-07 Corinna Vinschen <corinna@vinschen.de>
+
+ * dcrt0.cc (cygwin__cxa_atexit): Fetch correct DSO handle value
+ by searching dll list. Explain why.
+
+2014-11-06 Corinna Vinschen <corinna@vinschen.de>
+
+ * dcrt0.cc (cygwin_atexit): Change preceeding comment to reflect
+ API version numbers.
+ * external.cc (cygwin_internal): disable setting cxx_malloc on 64 bit.
+ Add CW_FIXED_ATEXIT case.
+ * include/cygwin/version.h (CYGWIN_VERSION_API_MINOR): Bump.
+ * include/sys/cygwin.h (cygwin_getinfo_types): Add CW_FIXED_ATEXIT.
+ * lib/atexit.c (atexit): Test running Cygwin version by checking
+ return value of cygwin_internal (CW_FIXED_ATEXIT).
+
+2014-11-05 Corinna Vinschen <corinna@vinschen.de>
+
+ * lib/atexit.c (atexit): Check for being linked into the executable.
+ If so, call __cxa_atexit with NULL DSO handle. Explain why.
+ * lib/dso_handle.c: New file providing fallback __dso_handle.
+
+2014-11-05 Corinna Vinschen <corinna@vinschen.de>
+
+ * Makefile.in (NEW_FUNCTIONS): Add atexit to be not exported.
+ * lib/atexit.c (atexit): New, statically linkable version of atexit.
+ * dcrt0.cc (cygwin_atexit): Add comment to mark this function as old
+ entry point. Indiscriminately check for DSO of function pointer for
+ all functions, if checking for DSO of return address fails on x86_64.
+ Change comment accordingly.
+
+2014-11-05 Corinna Vinschen <corinna@vinschen.de>
+
+ * Makefile.in (NEW_FUNCTIONS): Define target-independent. Add target
+ dependent stuff afterwards. Globally define timezone and all xdr
+ symbols as non-exported from libcygwin.a.
+
+2014-11-03 Corinna Vinschen <corinna@vinschen.de>
+
+ * cygheap.cc: Fix formatting.
+
+2014-10-30 Corinna Vinschen <corinna@vinschen.de>
+
+ * uinfo.cc (cygheap_user::ontherange): Don't mention /etc/passwd.
+
+2014-10-29 Corinna Vinschen <corinna@vinschen.de>
+
+ * cygheap.cc (init_cygheap::init_installation_root): Create content of
+ installation_dir as non-prefixed path, if possible.
+
+2014-10-29 Corinna Vinschen <corinna@vinschen.de>
+
+ * common.din (__cxa_atexit): Define as cygwin__cxa_atexit.
+ * dcrt0.cc (cygwin__cxa_atexit): New function. Explain what we do.
+
+2014-10-28 Corinna Vinschen <corinna@vinschen.de>
+
+ * globals.cc (dos_file_warning): Set to false by default.
+ * path.cc (warn_msdos): Make static. Drop test for dos_file_warning.
+ (path_conv::check): Check for dos_file_warning here to avoid a function
+ call in the default case.
+
+2014-10-27 Corinna Vinschen <corinna@vinschen.de>
+
+ * dcrt0.cc (cygwin_atexit): Add workaround for broken atexit calls
+ in __gcc_register_frame of DLLs built with gcc-4.8.3-3.
+
+2014-10-27 Corinna Vinschen <corinna@vinschen.de>
+
+ * dlfcn.cc (dlopen): Drop patch accommodating SetDllDiretory from
+ 2014-10-14.
+
+2014-10-27 Corinna Vinschen <corinna@vinschen.de>
+
+ * cygheap.cc (cygheap_fixup_in_child): Drop call to set_dll_dir.
+ (init_cygheap::init_installation_root): Set installation_dir_len.
+ (setup_cygheap): Drop call to set_dll_dir.
+ * cygheap.h (struct init_cygheap): Add installation_dir_len member.
+ (init_cygheap::set_dll_dir): Remove.
+ * environ.cc (win_env::add_cache): Use stpcpy for speed.
+ (posify_maybe): Use tmp_pathbuf buffer instead of stack.
+ (raise_envblock): New function to resize Windows environment block.
+ (build_env): Fix indentation. Call raise_envblock function. Check if
+ $PATH exists and is non-empty. If not, add PATH variable with Cygwin
+ installation directory as content to Windows environment. Explain why.
+
+ * uinfo.cc (cygheap_pwdgrp::_nss_init): Fill UNICODE_STRING members
+ on the fly. Drop call to RtlInitUnicodeString.
+ (pwdgrp::check_file): Ditto.
+
+2014-10-26 Corinna Vinschen <corinna@vinschen.de>
+
+ * fhandler_socket.cc (fhandler_socket::af_local_connect): Drop
+ setting connect_state to connect_credxchg.
+ (fhandler_socket::af_local_accept): Ditto.
+ (fhandler_socket::recv_internal): Drop ill-advised connect_state check.
+ Add comment so as not to repeat the exercise.
+ * fhandler.h (enum conn_state): Drop now unneeded connect_credxchg
+ state.
+
+2014-10-24 Corinna Vinschen <corinna@vinschen.de>
+
+ * fhandler_proc.cc (format_proc_cygdrive): Fix symlink path if cygdrive
+ is "/".
+
+2014-10-24 Corinna Vinschen <corinna@vinschen.de>
+
+ * gendef (sigdelayed): 64 bit only: Fix seh_pushreg statements in
+ prologue.
+
+2014-10-24 Kai Tietz <corinna@vinschen.de>
+ Corinna Vinschen <corinna@vinschen.de>
+
+ * gendef (sigdelayed): 64 bit only: Push CPU flags before aligning
+ stack to avoid changing flag values.
+
+2014-10-22 Yaakov Selkowitz <yselkowi@redhat.com>
+
+ * common.din (stime): Export.
+ * times.cc (stime): New function.
+ * include/cygwin/time.h (stime): Declare.
+ * include/cygwin/version.h (CYGWIN_VERSION_API_MINOR): Bump.
+
+2014-10-21 Corinna Vinschen <corinna@vinschen.de>
+
+ * sec_auth.cc (get_user_groups): Remove experimental exception handler
+ added 2014-09-05.
+ (get_user_local_groups): Ditto.
+
+2014-10-20 Corinna Vinschen <corinna@vinschen.de>
+
+ * fhandler_serial.cc: Revert debug code accidentally checked in on
+ 2014-08-18.
+
+2014-10-20 Corinna Vinschen <corinna@vinschen.de>
+
+ * path.cc (symlink_info::check): Set error from status code if opening
+ the parent directory failed, but keep special case for root dirs.
+
+2014-10-17 Corinna Vinschen <corinna@vinschen.de>
+
+ * cygheap.cc (cygheap_fixup_in_child): Call set_dll_dir.
+ (init_cygheap::init_installation_root): Just memmove contents of
+ installation_root instead of calling GetModuleFileNameW again.
+ Copy installation_root to installation_dir before stripping of
+ "bin" dir. Don't call SetDllDirectory here. Explain what we do.
+ (setup_cygheap): New function taking over initial cygheap setup
+ from memory_init. Additionally call set_dll_dir.
+ * cygheap.h (struct init_cygheap): Add installation_dir member.
+ (init_cygheap::set_dll_dir): Define.
+ (setup_cygheap): Declare.
+ * dcrt0.cc: Throughout drop parameter from memory_init call.
+ (dll_crt0_0): Call setup_cygheap prior to memory_init.
+ * dlfcn.cc (dlopen): Change comment to point to the right function.
+ * shared.cc (memory_init): Drop parameter. Drop cygheap setup.
+ * shared_info.h (memory_init): Change declaration accordingly.
+
+2014-10-17 Corinna Vinschen <corinna@vinschen.de>
+
+ * cygtls.h (__try): Define __l_endtry as block-local label in 32 bit
+ case as well.
+
+2014-10-17 Corinna Vinschen <corinna@vinschen.de>
+
+ * Makefile.in (DLL_OFILES): Add quotactl.o.
+ * common.din (quotactl): Export.
+ * ntdll.h: Define FILE_FS_CONTROL_INFORMATION::FileSystemControlFlags
+ flag values.
+ (struct _FILE_FS_CONTROL_INFORMATION): Define.
+ (struct _FILE_GET_QUOTA_INFORMATION): Define.
+ (typedef struct _FILE_QUOTA_INFORMATION): Define.
+ (NtQueryObject): Use PVOID rather than VOID*.
+ (NtQueryVolumeInformationFile): Ditto.
+ (NtQueryQuotaInformationFile): Declare.
+ (NtSetQuotaInformationFile): Declare.
+ (NtSetVolumeInformationFile): Declare.
+ * quotactl.cc: New file implementing quotactl().
+ * include/sys/mount.h (BLOCK_SIZE): Define.
+ (BLOCK_SIZE_BITS): Define.
+ * include/sys/quota.h: New header.
+ * include/cygwin/version.h (CYGWIN_VERSION_API_MINOR): Bump.
+
+2014-10-16 Corinna Vinschen <corinna@vinschen.de>
+
+ * Makefile.in (DLL_OFILES): Rearrange with one file per line.
+
+2014-10-16 Corinna Vinschen <corinna@vinschen.de>
+
+ * fhandler_proc.cc (format_proc_partitions): Extend output to print
+ the windows mount points the device is mounted on.
+
+2014-10-14 Corinna Vinschen <corinna@vinschen.de>
+
+ * fhandler_socket.cc (fhandler_socket::connect): Don't change state
+ on WSAEALREADY error. Change comment accordingly.
+
+2014-10-14 Corinna Vinschen <corinna@vinschen.de>
+
+ * cygheap.cc (init_cygheap::init_installation_root): Install Cygwin's
+ installation dir as DLL search path, instead of ".".
+ * cygheap.h (class cwdstuff): Add parameter names in function
+ declarations for readability.
+ (cwdstuff::get): Add inline implementation fetching the CWD as wide char
+ string.
+ * dlfcn.cc (dlopen): Add searching for dependent DLLs in DLL
+ installation dir or CWD, if all else failed.
+ Add comment to explain scenarios this is accommodating.
+
+2014-10-14 Corinna Vinschen <corinna@vinschen.de>
+
+ * fhandler_socket.cc (fhandler_socket::connect): Init connect_state to
+ connect_pending only on unconnected socket. Set connect_state to
+ connected on WSAEISCONN error. Set connect_state to connect_failed
+ on any other error except WSAEWOULDBLOCK if connect is still pending.
+ Add lots of comment to explain why all of the above.
+
+2014-10-13 Corinna Vinschen <corinna@vinschen.de>
+
+ * net.cc (cygwin_setsockopt): Drop redundant test for AF_LOCAL and
+ SOCK_STREAM in SO_PEERCRED case, as in the original patch.
+
+2014-10-12 Corinna Vinschen <corinna@vinschen.de>
+
+ * dlfcn.cc (gfpod_helper): Only check for POSIX dir separator, same as
+ in get_full_path_of_dll.
+
+2014-10-12 Corinna Vinschen <corinna@vinschen.de>
+
+ * dlfcn.cc (set_dl_error): Drop useless __stdcall.
+ (check_path_access): Ditto. Drop FE_CWD from call to find_exec.
+ (gfpod_helper): Call path_conv::check for all paths containing a dir
+ separator to more closely follow the Linux search algorithm.
+ (get_full_path_of_dll): Drop useless __stdcall.
+ (dlopen): Simplify RTLD_NOLOAD case by calling GetModuleHandleEx
+ instead of GetModuleHandle/LoadLibrary.
+
+2014-10-11 Christian Franke <franke@computer.org>
+
+ Add setsockopt(sd, SOL_SOCKET, SO_PEERCRED, NULL, 0) to disable
+ initial handshake on AF_LOCAL sockets.
+ * fhandler.h (class fhandler_socket): Add no_getpeereid status flag.
+ (fhandler_socket::af_local_set_no_getpeereid): New prototype.
+ * fhandler_socket.cc (fhandler_socket::af_local_connect): Skip handshake
+ if no_getpeereid is set. Add debug output.
+ (fhandler_socket::af_local_accept): Likewise.
+ (fhandler_socket::af_local_set_no_getpeereid): New function.
+ (fhandler_socket::af_local_copy): Copy no_getpeereid.
+ (fhandler_socket::getpeereid): Fail if no_getpeereid is set.
+ * net.cc (cygwin_setsockopt): Add SO_PEERCRED for AF_LOCAL/SOCK_STREAM
+ sockets. Add comment to explain why we need it.
+ * include/cygwin/version.h (CYGWIN_VERSION_API_MINOR): Bump.
+
+2014-10-11 Corinna Vinschen <corinna@vinschen.de>
+
+ * fhandler_socket.cc (fhandler_socket::af_local_connect): Drop outdated
+ comment.
+ (fhandler_socket::evaluate_events): Only set connect_state and call
+ af_local_connect if connect_state is connect_pending. Explain why.
+ Drop redundant test for socket family and type.
+ (fhandler_socket::connect): Extend comment.
+
+2014-10-11 Corinna Vinschen <corinna@vinschen.de>
+
+ * fhandler_socket.cc (fhandler_socket::evaluate_events): Handle
+ connect_state and af_local_connect connect call here, once, independent
+ of FD_CONNECT being requested. Add comment to explain why.
+ (fhandler_socket::connect): Drop connect_state handling and calling
+ af_local_connect. Move remaining AF_LOCAL stuff prior to calling
+ ::connect and explain why. Simplify error case.
+ * poll.cc (poll): Handle connect state independently of POLLOUT being
+ requested for the descriptor to allow setting POLLIN if connect failed.
+ Add comment.
+ * select.cc (set_bits): Drop connect_state and AF_LOCAL handling here.
+
+2014-10-11 Corinna Vinschen <corinna@vinschen.de>
+
+ * fhandler_socket.cc (fhandler_socket::evaluate_events): Slightly
+ rearrange code. Rephrase a comment.
+
+2014-10-10 Corinna Vinschen <corinna@vinschen.de>
+
+ * dlfcn.cc (dlopen): Disable old 32 bit code on 64 bit.
+ * dcrt0.cc (check_sanity_and_sync): Ditto.
+ * dll_init.cc (dll_dllcrt0_1): Fix typo in comment.
+
+2014-10-09 Corinna Vinschen <corinna@vinschen.de>
+
+ * fhandler_procsys.cc (fhandler_procsys::readdir): Just test
+ ObjectTypeName for object types rather than calling lstat to avoid
+ performance hit.
+ * globals.cc (ro_u_natdir): Define.
+ (ro_u_natsyml): Define.
+ (ro_u_natdev): Define.
+
+2014-10-09 Corinna Vinschen <corinna@vinschen.de>
+
+ * fhandler_disk_file.cc (fhandler_disk_file::readdir_helper): Set d_type
+ for virtual directories.
+
+2014-10-09 Corinna Vinschen <corinna@vinschen.de>
+
+ * fhandler_proc.cc (fhandler_proc::readdir): Set dirent d_type.
+ * fhandler_process.cc (fhandler_process::readdir): Ditto.
+ * fhandler_procnet.cc (fhandler_procnet::readdir): Ditto.
+ * fhandler_procsys.cc (fhandler_procsys::readdir): Ditto.
+ * fhandler_procsysvipc.cc (fhandler_procsysvipc::readdir): Ditto.
+ * fhandler_virtual.h (virt_ftype_to_dtype): Define new inline function
+ to generate dirent d_type from virtual_ftype_t.
+
+2014-10-08 Corinna Vinschen <corinna@vinschen.de>
+
+ * common.din (ffsl): Export.
+ (ffsll): Export.
+ * syscalls.cc (ffs): Implement using GCC intrinsic.
+ (ffsl): Ditto.
+ (ffsll): Ditto.
+ * include/cygwin/version.h (CYGWIN_VERSION_API_MINOR): Bump.
+
+2014-10-08 Christian Franke <franke@computer.org>
+
+ * syscalls.cc (ffs): Fix crash of ffs (0x80000000) on 64 bit.
+
+2014-10-08 Corinna Vinschen <corinna@vinschen.de>
+
+ * fhandler_process.cc (format_process_statm): Fix output of dirty
+ pages. Add linefeed.
+
+2014-09-05 Corinna Vinschen <corinna@vinschen.de>
+
+ * fhandler_proc.cc (proc_tab): Add entry for cygdrive symlink.
+ (format_proc_cygdrive): New function to implement /proc/cygdrive.
+
+2014-09-05 Corinna Vinschen <corinna@vinschen.de>
+
+ * exception.h (class exception): Remove unnecessary #ifdef.
+ * uinfo.cc (client_request_pwdgrp::client_request_pwdgrp): Fix length
+ counter to include trailing NUL.
+
+ * sec_auth.cc (get_user_groups): Add experimental exception handler.
+ (get_user_local_groups): Ditto.
+
+2014-09-05 Corinna Vinschen <corinna@vinschen.de>
+
+ * uinfo.cc (pwdgrp::fetch_account_from_windows): Handle APPLICATION
+ PACKAGE AUTHORITY SIDs.
+ * winlean.h (DNLEN): Raise to 31. Explain why.
+
+2014-09-03 Corinna Vinschen <corinna@vinschen.de>
+
+ * sec_acl.cc (aclcheck32): Check for required default entries as well.
+ Enable check for missing CLASS_OBJ entries, now that setfacl creates
+ them.
+
+2014-09-02 Corinna Vinschen <corinna@vinschen.de>
+
+ * sec_acl.cc (aclsort32): Set errno to EINVAL if aclcheck32 failed.
+
+2014-08-31 Corinna Vinschen <corinna@vinschen.de>
+
+ * uinfo.cc (pwdgrp::fetch_account_from_windows): Disallow user accounts
+ as groups. Add comment.
+
+2014-08-31 Corinna Vinschen <corinna@vinschen.de>
+
+ * uinfo.cc (cygheap_pwdgrp::init): Fix comment. Rearrange code for
+ style.
+ (cygheap_pwdgrp::nss_init_line): Disable db_prefix and db_separator
+ settings. Add comment.
+ (pwdgrp::fetch_account_from_windows): Drop outdated comment. Fix code
+ fetching primary group gid of group setting in SAM description field.
+ Change comment accordingly.
+
+2014-08-31 Corinna Vinschen <corinna@vinschen.de>
+
+ * uinfo.cc (pwdgrp::fetch_account_from_windows): Disallow creating an
+ entry for "NULL SID".
+
+2014-08-31 Corinna Vinschen <corinna@vinschen.de>
+
+ * sec_acl.cc (setacl): Add comment. Handle NULL ACE for SUID, SGID,
+ and VTX bits. Create owner, group, other and NULL entries in the same
+ way and in the same order as alloc_sd.
+ (getacl): Skip NULL ACE.
+
+2014-08-28 Corinna Vinschen <corinna@vinschen.de>
+
+ * fhandler.cc (fhandler_base::facl): Drop CLASS_OBJ entry.
+ * fhandler_disk_file.cc (fhandler_disk_file::facl): Ditto in noacl case.
+ * sec_acl.cc (getacl): Compute useful fake CLASS_OBJ and DEF_CLASS_OBJ
+ permission bits based on how these values are generated on Linux.
+ Add comments to explain what the code is doing.
+ * security.cc (get_attribute_from_acl): Compute group permission based
+ on the actual primary group permissions and all secondary user and group
+ ACCESS_ALLOWED_ACEs to emulate Linux' behaviour more closely.
+ (check_access): Fix typos im comment.
+ * include/cygwin/acl.h (MIN_ACL_ENTRIES): Redefine as 3.
+
+2014-08-28 Corinna Vinschen <corinna@vinschen.de>
+
+ * fhandler_disk_file.cc (fhandler_disk_file::fstatvfs): Try the
+ FileFsSizeInformation information class on filesystems choking on
+ FileFsFullSizeInformation (I see you Netapp!)
+
+2014-08-27 Corinna Vinschen <corinna@vinschen.de>
+
+ * fhandler.h (fhandler_pty_slave::fch_open_handles): Add bool parameter
+ to declaration.
+ * fhandler_tty.cc (fhandler_pty_slave::fch_open_handles): Add bool
+ parameter "chown". Only request WRITE_OWNER access when opening pty
+ synchronization objects if "chown" is set.
+ (fhandler_pty_slave::fchmod): Call fch_open_handles with new bool
+ parameter set to false.
+ (fhandler_pty_slave::fchown): Call fch_open_handles with new bool
+ parameter set to true.
+ * kernel32.cc (CreateFileMappingW): Fix default standard rights for
+ file mappings from READ_CONTROL to STANDARD_RIGHTS_REQUIRED to allow
+ changing the DACL (fixes "access denied" error in pinfo::set_acl).
+
+ * fhandler_disk_file.cc (fhandler_base::fstat_helper): Change debug
+ output to print mode bits in octal.
+ * security.cc (alloc_sd): Ditto.
+ (set_file_attribute): Ditto.
+
+2014-08-27 Corinna Vinschen <corinna@vinschen.de>
+
+ * ntea.cc (read_ea): Change left-over return to __leave. Fix
+ condition to close handle. Call NtClose rather than CloseHandle.
+ (write_ea): Fix condition to close handle. Call NtClose rather than
+ CloseHandle.
+ * security.cc (get_file_sd): Call pc.init_reopen_attr if a valid
+ incoming handle was given, pc.get_object_attr otherwise.
+ (set_file_sd): Ditto.
+
+2014-08-26 Corinna Vinschen <corinna@vinschen.de>
+
+ * path.h (path_conv::init_reopen_attr): Change from void to returning
+ POBJECT_ATTRIBUTES. Take OBJECT_ATTRIBUTES reference as argument, not
+ pointer.
+ * fhandler_disk_file.cc: Throughout accommodate above change.
+ * syscalls.cc: Ditto.
+ * ntea.cc (read_ea): Don't set hdl to NULL if it's already NULL. Set
+ attr with pc.init_reopen_attr before trying to reopen file.
+ (write_ea): Ditto.
+ * security.cc (get_file_sd): Use pc.init_reopen_attr rather than
+ pc.get_object_attr when trying to reopen file.
+ (set_file_sd): Ditto.
+
+2014-08-25 Corinna Vinschen <corinna@vinschen.de>
+
+ * cygtls.cc (san::leave/x86_64): Implement.
+ * cygtls.h (class tls_pathbuf): Move counter variables into a union.
+ Add 64 bit element _counters covering both counter variables to
+ optimize save and restore operations.
+ (class san/x86_64): Only store single 64 bit value.
+ (san::san/x86_64): Implement.
+ (san::leave/x86_64): Only declare here, as returns_twice function.
+ Explain why.
+ (class san/i686): Change type of _c_cnt and _w_cnt to uint32_t.
+ (__try/x86_64): Move definition of __sebastian after the first memory
+ barrier. Drop __sebastian.setup call.
+
+2014-08-25 Corinna Vinschen <corinna@vinschen.de>
+
+ * cygtls.cc (_cygtls::remove): Revert previous patch.
+ * cygtls.h (struct _local_storage): Move pathbufs back here.
+ (class san/x86_64): Revert class. Save and restore pathbufs counters
+ only.
+ (class san/i686): Revert saving and restoring pathbufs counters.
+ (__try/x86_64): Add a san variable and call it's setup method.
+ (__except/x86_64): Call san::leave to restore pathbufs counters.
+ * gendef (_sigbe): Revert previous change.
+ * thread.cc (verifyable_object_state): Remove gcc 4.7 workaround in
+ forward declaration as well.
+ * tls_pbuf.cc (tls_pbuf): Revert previous change.
+ * tls_pbuf.h (class tmp_pathbuf): Accommodate reverting pathbufs to
+ locals structure.
+ * tlsoffsets.h: Regenerate.
+ * tlsoffsets64.h: Regenerate.
+
+2014-08-21 Corinna Vinschen <corinna@vinschen.de>
+
+ * Throughout, use __try/__except/__endtry blocks, rather than myfault
+ handler.
+ * cygtls.cc (_cygtls::remove): Accommodate the fact that pathbufs
+ has been moved from _local_storage to _cygtls.
+ * cygtls.h (class tls_pathbuf): Add comment to hint to gendef usage
+ of counters. Change type of counters to uint32_t for clarity.
+ Remove _cygtls as friend class.
+ (struct _local_storage): Move pathbufs from here...
+ (struct _cygtls): ...to here, allowing to access it from _sigbe.
+ (class san): Only define on 32 bit. Remove errno, _c_cnt and _w_cnt
+ members.
+ (san::setup): Drop parameter. Don't initialize removed members.
+ (san::leave): Don't set removed members.
+ (class myfault): Only define on 32 bit.
+ (myfault::faulted): Only keep implementation not taking any parameter.
+ Drop argument in call to sebastian.setup.
+ (__try/__leave/__except/__endtry): Implement to support real SEH. For
+ now stick to SJLJ on 32 bit.
+ * dcrt0.cc (dll_crt0_0): Drop 64 bit call to
+ exception::install_myfault_handler.
+ * exception.h (exception_handler): Define with EXCEPTION_DISPOSITION
+ as return type.
+ (PDISPATCHER_CONTEXT): Define as void * on 32 bit. Define as pointer
+ to _DISPATCHER_CONTEXT on 64 bit.
+ (class exception): Define separately for 32 and 64 bit.
+ (exception::myfault): Add handler for myfault SEH handling on 64 bit.
+ (exception::exception): Fix mangled method name to account for change
+ in type of last parameter.
+ (exception::install_myfault_handler): Remove.
+ * exceptions.cc (exception::myfault_handle): Remove.
+ (exception::myfault): New SEH handler for 64 bit.
+ * gendef (_sigbe): Set tls_pathbuf counters to 0 explicitely when
+ returning to the caller.
+ * ntdll.h: Move a comment to a better place.
+ (struct _SCOPE_TABLE): Define on 64 bit.
+ * thread.cc (verifyable_object_isvalid): Remove gcc 4.7 workaround.
+ * tls_pbuf.cc (tls_pbuf): Fix to accommodate new place of pathbufs.
+ (tls_pathbuf::destroy): Change type of loop variables to uint32_t.
+ * tls_pbuf.h (class tmp_pathbuf): Change type of buffer counters to
+ uint32_t. Accommodate new place of pathbufs.
+ * tlsoffsets.h: Regenerate.
+ * tlsoffsets64.h: Regenerate.
+
+2014-08-21 Corinna Vinschen <corinna@vinschen.de>
+
+ * miscfuncs.cc (__import_address): Cover the first dereference to imp
+ under the fault handler.
+
+2014-08-21 Corinna Vinschen <corinna@vinschen.de>
+
+ * net.cc (if_freenameindex): Don't catch a SEGV from free to fail
+ loudly on double free.
+
+2014-08-21 Corinna Vinschen <corinna@vinschen.de>
+
+ * dir.cc (rmdir): Don't skip deleting fh in the ENOTEMPTY case.
+
+2014-08-20 Corinna Vinschen <corinna@vinschen.de>
+
+ * tls_pbuf.h (tmp_pathbuf::tmp_pathbuf): Convert to inline method.
+ (tmp_pathbuf::~tmp_pathbuf): Ditto.
+ * tls_pbuf.cc (tmp_pathbuf::tmp_pathbuf): Remove here.
+ (tmp_pathbuf::~tmp_pathbuf): Ditto.
+
+2014-08-19 Corinna Vinschen <corinna@vinschen.de>
+
+ * dir.cc (dirfd): Per POSIX, return EINVAL on invalid directory stream.
+ (telldir): Per POSIX, return -1 and set errno to EBADF, rather than
+ just returning 0, on invalid directory stream.
+ * signal.cc (sigwaitinfo): Return -1, not EFAULT, when SEGV was catched.
+
+2014-08-19 Corinna Vinschen <corinna@vinschen.de>
+
+ * fhandler.h (enum conn_state): Add "connect_credxchg" state.
+ (class fhandler_socket): Grant another bit to connect_state flag.
+ * fhandler_socket.cc (fhandler_socket::af_local_connect): Rearrange
+ variable definition. Set connect_state to connect_credxchg.
+ (fhandler_socket::af_local_accept): Ditto.
+ (fhandler_socket::recv_internal): Accept connect_credxchg on connection
+ oriented AF_LOCAL sockets as well to allow the credential exchange.
+ Extend comment to explain.
+
+2014-08-19 Corinna Vinschen <corinna@vinschen.de>
+
+ * autoload.cc: Replace WNet[...]A with WNet[...]W imports.
+ * dcrt0.cc (initial_env): Drop strlwr calls. Call strcasestr instead.
+ * fhandler_netdrive.cc: Throughout, convert to calling WNet UNICODE
+ functions. Use tmp_pathbuf rather than alloca. Replace call to
+ strlwr with call to RtlDowncaseUnicodeString.
+
+2014-08-19 Corinna Vinschen <corinna@vinschen.de>
+
+ * fhandler.h (fhandler_serial::is_tty): Reinstantiate.
+
+2014-08-18 Corinna Vinschen <corinna@vinschen.de>
+
+ * miscfuncs.cc (strlwr): Rename from cygwin_strlwr. Drop __stdcall
+ decoration.
+ (strupr): Rename from cygwin_strupr. Drop __stdcall decoration.
+ * string.h (strlwr): Remove override macro. Simply declare.
+ (strupr): Ditto.
+
+2014-08-18 Corinna Vinschen <corinna@vinschen.de>
+
+ * dtable.cc (dtable::init_std_file_from_handle): Mention that console
+ handles are kernel objects since Windows 8.
+ * fhandler.h (enum conn_state): Add "listener" state.
+ (class fhandler_socket): Drop listener status flag.
+ (fhandler_socket::lseek): Return -1 and errno ESPIPE.
+ (fhandler_serial::lseek): Ditto.
+ (fhandler_serial::is_tty): Remove.
+ * fhandler_socket.cc (fhandler_socket::listen): Set connect_state to
+ listener. Add comment.
+ (fhandler_socket::accept4): Explicitely check if the socket is listening
+ and fail with EINVAL, if not. Explain why we have to do that.
+ (fhandler_socket::recv_internal): Explicitely check if the socket is
+ connected if it's a stream socket. Explain why we have to do that.
+ (fhandler_socket::getpeereid): Drop now redundant test.
+
+2014-08-15 Corinna Vinschen <corinna@vinschen.de>
+
+ * winsup.h (_GNU_SOURCE): Define. Explain why.
+ * configure.ac: Convert to new AC_INIT style.
+ * configure: Regenerate.
+
+2014-08-15 Corinna Vinschen <corinna@vinschen.de>
+
+ * cygerrno.h (seterrno): Define as (always) inline function.
+ * errno.cc (seterrno): Remove.
+
+2014-08-14 Corinna Vinschen <corinna@vinschen.de>
+
+ * dll_init.sgml: Remove.
+ * dtable.sgml: Move into ../doc/misc-funcs.xml.
+ * external.sgml: Ditto.
+ * stackdump.sgml: Ditto.
+
+2014-08-14 Corinna Vinschen <corinna@vinschen.de>
+
+ * security.sgml: Move to ../doc dir and rename to logon-funcs.xml.
+
+2014-08-14 Corinna Vinschen <corinna@vinschen.de>
+
+ * path.sgml: Move to ../doc dir and rename to path.xml.
+ * posix.sgml: Move to ../doc dir and rename to posix.xml.
+
+2014-08-14 Corinna Vinschen <corinna@vinschen.de>
+
+ * dlmalloc.c: Remove unused file.
+ * dlmalloc.h: Ditto.
+ * malloc.cc: Update to Doug Lea's malloc version 2.8.6.
+
+2014-08-13 Corinna Vinschen <corinna@vinschen.de>
+
+ * include/cygwin/version.h (CYGWIN_VERSION_DLL_MINOR): Bump to 33.
+ (CYGWIN_VERSION_API_MINOR): Bump to reflect intermediate 1.7.32 release.
+
+2014-08-11 Corinna Vinschen <corinna@vinschen.de>
+
+ * cpuid.h: Add missing copyright header. Fix formatting. Use uint32_t
+ instead of unsigned throughout. Change functions to static inline and
+ always inline.
+ (cpuid): Add parameter to set ecx, allowing to request extended CPUID
+ info.
+ * fhandler_proc.cc (format_proc_cpuinfo): Use uint32_t instead of
+ unsigned throughout. Add fake decimal places to MHz info. Handle more
+ feature flags.
+ * fhandler_random.cc (fhandler_dev_random::write): Allow up to 4K
+ input to add entropy.
+ * syscalls.cc: Drop including cpuid.h.
+
+2014-08-07 Yaakov Selkowitz <yselkowi@redhat.com>
+
+ * common.din (__cxa_finalize): Export.
+ * dcrt0.cc (cygwin_atexit): Use d->handle with __cxa_atexit.
+ * dll_init.cc (dll_list::detach): Use d->handle with __cxa_finalize.
+ * include/cygwin/version.h (CYGWIN_VERSION_API_MINOR): Use 274 for
+ __cxa_finalize as well.
+
+2014-08-04 Anthony Heading <anthony@ajrh.net>
+
+ * include/sys/file.h: Add extern "C".
+
+2014-08-04 Corinna Vinschen <corinna@vinschen.de>
+
+ * common.din (__cxa_atexit): Export.
+ * include/cygwin/version.h (CYGWIN_VERSION_API_MINOR): Bump to 274.
+
+2014-08-04 Corinna Vinschen <corinna@vinschen.de>
+
+ * uinfo.cc (pwdgrp::fetch_account_from_windows): Drop "plus_prepended"
+ as naming style. Drop enum name_style_t, use a boolean
+ "fully_qualified_name" value instead. Rework function to drop
+ "plus_prepended" handling througout and default to "name only" style
+ as replacement.
+
+2014-07-31 Eric Blake <eblake@redhat.com>
+
+ * include/pthread.h: Decorate attribute names with __, for
+ namespace safety.
+ * include/cygwin/core_dump.h: Likewise.
+ * include/cygwin/cygwin_dll.h: Likewise.
+ * include/sys/cygwin.h: Likewise.
+ * include/sys/strace.h: Likewise.
+
+2014-07-30 Corinna Vinschen <corinna@vinschen.de>
+
+ * uinfo.cc (pwdgrp::fetch_account_from_windows): Fix comment.
+
+2014-07-29 Corinna Vinschen <corinna@vinschen.de>
+
+ * cygheap.h (class cygheap_domain_info): Remove lowest_tdo_posix_offset.
+ * ldap.cc (cyg_ldap::fetch_posix_offset_for_domain): Return UINT32_MAX
+ in case of error.
+ * security.h (PRIMARY_POSIX_OFFSET): Define.
+ (NOACCESS_POSIX_OFFSET): Define.
+ (UNUSABLE_POSIX_OFFSET): Define.
+ * uinfo.cc (cygheap_domain_info::init): Drop initializing
+ lowest_tdo_posix_offset.
+ (pwdgrp::fetch_account_from_file): Set PosixOffset to either
+ UNUSABLE_POSIX_OFFSET or NOACCESS_POSIX_OFFSET in case we don't get a
+ sensible offset from AD. Explain why. Drop setting ch
+ lowest_tdo_posix_offset.
+ (pwdgrp::fetch_account_from_windows): Replace constant 0x100000 with
+ PRIMARY_POSIX_OFFSET throughout.
+
+2014-07-24 Corinna Vinschen <corinna@vinschen.de>
+
+ * fhandler_socket.cc (fhandler_socket::send_internal): Fix value of
+ out_len when tweaking the last buffer so out_len is correct in a
+ subsequent if expression.
+
+2014-07-21 Corinna Vinschen <corinna@vinschen.de>
+
+ * thread.cc (pthread::init_mainthread): Initialize thread mutex to
+ type PTHREAD_MUTEX_RECURSIVE, just as for any other thread.
+
+2014-07-21 Corinna Vinschen <corinna@vinschen.de>
+
+ * include/cygwin/version.h (CYGWIN_VERSION_DLL_MINOR): Bump to 32.
+
+2014-07-21 Corinna Vinschen <corinna@vinschen.de>
+
+ * uinfo.cc: Fix typo in comment.
+
+2014-07-16 Corinna Vinschen <corinna@vinschen.de>
+
+ * thread.cc (pthread::create): Handle stackaddr as upper bound address.
+ Add comment.
+ (pthread_attr_setstack): Store upper bound address in stackaddr.
+ Explain why.
+ (pthread_attr_getstack): Handle stackaddr as upper bound address.
+ Add comment.
+ (pthread_attr_setstackaddr): Add comment.
+ (pthread_attr_getstackaddr): Add comment.
+ (pthread_attr_getstacksize): Return default stacksize if stacksize has
+ not been set by the application, just as on Linux. Add comment.
+ (pthread_getattr_np): Store upper bound address in stackaddr. Explain
+ why.
+ * include/pthread.h: Remove outdated comment.
+ (pthread_attr_getstackaddr): Mark as deprecated, as on Linux.
+ (pthread_attr_setstackaddr): Ditto.
+
+2014-07-15 Christopher Faylor <me.cygwin2014@cgf.cx>
+
+ * sigproc.cc (sigproc_init): Set aside more buffer space for signal
+ pipes.
+ (sig_send): Retry WriteFiles which fail when there is no error but
+ packbytes have not been sent.
+
+2014-07-15 Christopher Faylor <me.cygwin2014@cgf.cx>
+
+ * sigproc.cc (send_sig): Don't report an error if WriteFile succeeds.
+
+2014-07-14 Christopher Faylor <me.cygwin2014@cgf.cx>
+
+ * sigproc.cc (send_sig): Fix bad format in diagnostic output.
+
+2014-07-14 Corinna Vinschen <corinna@vinschen.de>
+
+ * uinfo.cc (cygheap_domain_info::init): Correctly set
+ lowest_tdo_posix_offset to UNIX_POSIX_OFFSET.
+ (fetch_posix_offset): Redesign to fake a POSIX offset in all cases
+ where we can't fetch a non-0 POSIX offset from our primary domain.
+
+2014-07-14 Yaakov Selkowitz <yselkowitz@cygwin.com>
+
+ * thread.cc (pthread_mutex::pthread_mutex): Change default type
+ to PTHREAD_MUTEX_NORMAL.
+ (pthread_mutex::unlock): Return EPERM if the mutex has no owner and
+ the mutex type is PTHREAD_MUTEX_ERRORCHECK, as on Linux.
+ (pthread_mutexattr::pthread_mutexattr): Ditto.
+ (pthread_mutex_unlock): Do not fail if mutex is a normal mutex
+ initializer.
+ * include/pthread.h (PTHREAD_MUTEX_INITIALIZER): Redefine as
+ PTHREAD_NORMAL_MUTEX_INITIALIZER_NP.
+
+2014-07-09 Corinna Vinschen <corinna@vinschen.de>
+
+ * thread.cc (pthread::create): Use PTHREAD_DEFAULT_STACKSIZE stacksize
+ if attr.stacksize is 0.
+ (pthread_attr::pthread_attr): Initialize stacksize to 0 to align more
+ closely to Linux.
+ (pthread_attr_getstack): Fix incorrect stackaddr computation. Return
+ stackaddr just like pthread_attr_getstackaddr. Remove slightly off
+ comment.
+ (pthread_attr_getstackaddr): Remove slightly off comment.
+ (pthread_getattr_np): Return stackaddr and stacksize based on the full
+ allocated stackarea.
+
+2014-07-09 Corinna Vinschen <corinna@vinschen.de>
+
+ * exceptions.cc (exception::myfault_handle): Rephrase comment.
+
+2014-07-09 Corinna Vinschen <corinna@vinschen.de>
+
+ * exceptions.cc (exception::myfault_handle): Fix typo in comment.
+
+2014-07-07 Corinna Vinschen <corinna@vinschen.de>
+
+ * exceptions.cc (exception::myfault_handle): Disable handling
+ STATUS_STACK_OVERFLOW. Explain why.
+
+2014-07-07 Corinna Vinschen <corinna@vinschen.de>
+
+ * fhandler_socket.cc (fhandler_socket::send_internal): Improve loop to
+ write streams in chunks of wmem() bytes to raise performance when
+ writing small buffers. Rename variables and add comments to help
+ understanding the code in years to come.
+
+2014-07-07 Corinna Vinschen <corinna@vinschen.de>
+
+ * passwd.cc (pg_ent::enumerate_ad): Revert to simply skipping a domain
+ if opening the connection to the domain fails.
+
+2014-07-07 Pierre Humblet <Pierre.Humblet@ieee.org>
+ Corinna Vinschen <corinna@vinschen.de>
+
+ * libc/minires.c (minires_dprintf): Change "Minires" to "Resolv" to
+ differ from external minres lib.
+ (res_nquerydomain): Fix off-by-one in domain concatenation. Add debug
+ output.
+
+2014-07-03 Corinna Vinschen <corinna@vinschen.de>
+
+ * fhandler_disk_file.cc (fhandler_disk_file::fstatvfs): Add debug
+ output.
+
+2014-06-25 Corinna Vinschen <corinna@vinschen.de>
+
+ * errno.cc (errmap): Fix order of SERVICE_REQUEST_TIMEOUT.
+
+2014-06-25 Corinna Vinschen <corinna@vinschen.de>
+
+ * errno.cc (errmap): Handle Windows error codes ERROR_CANCELLED,
+ ERROR_CONNECTION_REFUSED, ERROR_DEV_NOT_EXIST, ERROR_DS_GENERIC_ERROR,
+ ERROR_NOT_ENOUGH_QUOTA, ERROR_SERVICE_REQUEST_TIMEOUT, ERROR_TIMEOUT,
+ ERROR_UNEXP_NET_ERR.
+ * ldap.cc (cyg_ldap::map_ldaperr_to_errno): Drop explicit LDAP_TIMEOUT
+ handling.
+
+2014-06-25 Corinna Vinschen <corinna@vinschen.de>
+
+ * ldap.cc (cyg_ldap::map_ldaperr_to_errno): Explicitely map LDAP_TIMEOUT
+ to EIO.
+
+2014-06-25 Corinna Vinschen <corinna@vinschen.de>
+
+ * autoload.cc (ldap_search_sW): Replace ldap_search_stW.
+ (LdapMapErrorToWin32): Import.
+ * fhandler_disk_file.cc (fhandler_base::fstat_by_nfs_ea): Accommodate
+ change to cyg_ldap::open.
+ * ldap.cc (CYG_LDAP_TIMEOUT): Remove.
+ (CYG_LDAP_ENUM_TIMEOUT): Remove.
+ (def_tv): Remove.
+ (enum_tv): Remove.
+ (cyg_ldap::map_ldaperr_to_errno): New method to map LDAP error codes to
+ POSIX errno codes. Explicitly map LDAP_NO_RESULTS_RETURNED to ENMFILE.
+ (cyg_ldap::wait): Ditto.
+ (struct cyg_ldap_init): New struct.
+ (cyg_ldap::connect_ssl): Return ULONG. Drop setting LDAP_OPT_TIMELIMIT.
+ Add call to ldap_search_sW to fetch root DSE.
+ (cyg_ldap::connect_non_ssl): Ditto.
+ (ldap_init_thr): New static thread function.
+ (cyg_ldap::connect): New method to call connect_ssl/connect_non_ssl in
+ an interruptible cygthread.
+ (struct cyg_ldap_search): New struct.
+ (cyg_ldap::search_s): New method to perform generic synchronous search.
+ (ldap_search_thr): New static thread function.
+ (cyg_ldap::search): New method to call search_s in an interruptible
+ cygthread.
+ (struct cyg_ldap_next_page): New struct.
+ (cyg_ldap::next_page_s): New method to perform generic synchronous
+ paged search.
+ (ldap_next_page_thr): New static thread function.
+ (cyg_ldap::next_page): New method to call next_page_s in an
+ interruptible cygthread.
+ (cyg_ldap::open): Return POSIX errno. Call connect method.
+ (cyg_ldap::fetch_ad_account): Call search method rather than
+ ldap_search_stW.
+ (cyg_ldap::enumerate_ad_accounts): Return POSIX errno. Use infinite
+ timeout in call to ldap_search_init_pageW.
+ (cyg_ldap::next_account): Return POSIX errno. Call next_page method
+ rather than ldap_get_next_page_s.
+ (cyg_ldap::fetch_posix_offset_for_domain): Call search method rather
+ than ldap_search_stW.
+ (cyg_ldap::fetch_unix_sid_from_ad): Ditto.
+ (cyg_ldap::fetch_unix_name_from_rfc2307): Ditto.
+ * ldap.h (class cyg_ldap): Accommodate aforementioned changes.
+ * passwd.cc (pg_ent::enumerate_ad): Ditto. Break search if one of
+ cyg_ldap::enumerate_ad_accounts or cldap.next_account returns with
+ an error code other than ENMFILE.
+ * sec_helper.cc (cygpsid::get_id): Accommodate change to cyg_ldap::open.
+ * uinfo.cc (fetch_posix_offset): Ditto.
+
+2014-06-23 Corinna Vinschen <corinna@vinschen.de>
+
+ * spawn.cc (find_exec): Initialize err (CID 60111).
+ * strace.cc (strace::activate): Fix potential buffer overrun (CID 59938)
+ * syscalls.cc (popen): Close parent pipe descriptor via fclosing fp on
+ error to avoid resource leak (CID 59981).
+ * thread.cc (pthread::exit): Avoid accessing cygtls member after
+ deleting "this" (CID 60217).
+
+2014-06-23 Corinna Vinschen <corinna@vinschen.de>
+
+ * select.cc (start_thread_socket): Delete si on early return in case of
+ an error (CID 59967).
+
+2014-06-23 Corinna Vinschen <corinna@vinschen.de>
+
+ * regex/regcomp.c (computematchjumps): Free local memory in case of
+ error (CID 59975).
+
+2014-06-23 Corinna Vinschen <corinna@vinschen.de>
+
+ * mount.cc (fs_info::update): Define dir in the outermost scope to avoid
+ accessing out-of-scope value (CID 60027). Always initialize attr to
+ upath (CID 60113).
+
+2014-06-23 Corinna Vinschen <corinna@vinschen.de>
+
+ * malloc_wrapper.cc (mallinfo): Initialize m if external malloc is used,
+ too (CID 60120).
+
+2014-06-23 Corinna Vinschen <corinna@vinschen.de>
+
+ * localtime.cc (tzload): Fix leaking memory (CID 60001).
+
+2014-06-23 Corinna Vinschen <corinna@vinschen.de>
+
+ * exceptions.cc (try_to_debug): Free environment pointer when not used
+ anymore (CID 59968).
+
+2014-06-23 Corinna Vinschen <corinna@vinschen.de>
+
+ * net.cc (cygwin_getaddrinfo): Fix value of hint->ai_addrlen on 64 bit.
+ Explain why.
+
+2014-06-23 Corinna Vinschen <corinna@vinschen.de>
+
+ * environ.cc (regopt): Allocate small local buffer to avoid copying
+ twice. Fixes resource leak (CID 60012). Add comment.
+
+2014-06-23 Corinna Vinschen <corinna@vinschen.de>
+
+ * dll_init.cc (dll_list::alloc): Fix buffer overrun (CID 59940).
+
+2014-06-23 Corinna Vinschen <corinna@vinschen.de>
+
+ * dcrt0.cc (insert_file): Fix resource leaks (CIDs 59987, 59988).
+
+2014-06-23 Corinna Vinschen <corinna@vinschen.de>
+
+ * ldap.cc (CYG_LDAP_TIMEOUT): Set to 5 secs.
+ (CYG_LDAP_ENUM_TIMEOUT): New timeout value for enumeration only. Set
+ to 60 secs.
+ (CYG_LDAP_ENUM_PAGESIZE): Define as number of entries per single
+ search page. Set to 100. Use throughout.
+ (def_tv): Rename from tv. Use throughout.
+ (enum_tv): New variable. Use in call to ldap_get_next_page_s.
+
+2014-06-17 Corinna Vinschen <corinna@vinschen.de>
+
+ * ldap.cc (CYG_LDAP_TIMEOUT): Define as timeout value. Set to 30 secs
+ for now. Use throughout.
+ * uinfo.cc (colon_to_semicolon): New local function.
+ (pwdgrp::fetch_account_from_windows): Convert all colons in AD gecos
+ entry to semicolons.
+
+2014-06-17 David Stacey <drstacey@tiscali.co.uk>
+
+ * libc/rexec.cc (cygwin_rexec): Make ahostbuf static to avoid returning
+ an out-of-scope address.
+
+2014-06-16 Corinna Vinschen <corinna@vinschen.de>
+
+ * fhandler_socket.cc (fhandler_socket::evaluate_events): Call
+ WSASetLastError after setsockopt. Explain why.
+
+2014-06-16 Denis Excoffier <cygwin@Denis-Excoffier.org>
+
+ * grp.cc (getgrouplist): Fix setting ngroups to make sure to return
+ the right value.
+
+2014-06-05 Christopher Faylor <me.cygwin2014@cgf.cx>
+
+ * timer.cc (timer_tracker::cancel): Demote api_fatal to system_printf,
+ printing more details about odd failure condition.
+
+2014-05-23 Corinna Vinschen <corinna@vinschen.de>
+
+ * autoload.cc (ldap_memfreeW): Remove.
+ (ldap_msgfree): Import.
+ * ldap.cc: Throughout, use ldap_msgfree to free LDAPMessage memory,
+ rather than ldap_memfreeW.
+ (cyg_ldap::next_account): Immediately abandon search when quiting from
+ search.
+
+2014-05-22 Corinna Vinschen <corinna@vinschen.de>
+
+ * autoload.cc (ldap_abandon): Remove.
+ (ldap_count_entries): Import.
+ (ldap_get_next_page_s): Import.
+ (ldap_result): Remove.
+ (ldap_searchW): Remove.
+ (ldap_search_abandon_page): Import.
+ (ldap_search_init_pageW): Import.
+ * ldap.cc (cyg_ldap::close): Use ldap_search_abandon_page to abandon
+ search. Reset srch_id, srch_msg and srch_entry.
+ (cyg_ldap::enumerate_ad_accounts): Use paged search to overcome server
+ side search result set restriction.
+ (cyg_ldap::next_account): Ditto.
+ * ldap.h (class cyg_ldap): Add members srch_id, srch_msg and srch_entry.
+ Remove member msg_id.
+ (cyg_ldap::cyg_ldap): Change initialization accordingly.
+
+2014-05-22 Corinna Vinschen <corinna@vinschen.de>
+
+ * sec_auth.cc (get_server_groups): Call get_user_local_groups only if
+ get_logon_server succeeded.
+
+2014-05-22 Corinna Vinschen <corinna@vinschen.de>
+
+ * ldap.cc (cyg_ldap::fetch_ad_account): Take additional domain string
+ parameter. Convert into likely rootDSE string if not NULL, and use in
+ subsequent call to ldap_search_stW. Add comment to explain that this
+ is not the exactly correct solution.
+ * ldap.h (cyg_ldap::fetch_ad_account): Change prototype accordingly.
+ * uinfo.cc (pwdgrp::fetch_account_from_windows): Always use loc_ldap
+ in call to fetch_posix_offset to make sure we're fetchoinmg the posix
+ offsets from *our* domain controller. Only set domain variable to
+ non-NULL if the account is from a trusted domain. Use domain in call
+ to cyg_ldap::fetch_ad_account.
+
+2014-05-22 Corinna Vinschen <corinna@vinschen.de>
+
+ * gmon.h: Pull in profile.h. Explain why.
+
+2014-05-22 Corinna Vinschen <corinna@vinschen.de>
+
+ * uinfo.cc (pwdgrp::fetch_account_from_windows): Fix potential SEGV
+ referencing NULL pointer.
+
+2014-05-22 Corinna Vinschen <corinna@vinschen.de>
+
+ * libc/bsdlib.cc (forkpty): Close master and slave if fork fails to
+ avoid resource leak (CID 59997).
+ * libc/fts.c: Update to FreeBSD version 1.39 (CID 59947).
+ * libc/minires.c (minires_get_search): Fix out-of-bounds read from
+ words array (CID 59937).
+
+2014-05-20 Corinna Vinschen <corinna@vinschen.de>
+
+ * flock.cc (delete_lock_in_parent): Use LIST_FOREACH_SAFE to avoid
+ dereferencing freed pointer (CID 60224).
+
+2014-05-20 Corinna Vinschen <corinna@vinschen.de>
+
+ * fhandler_procsysvipc.cc (format_procsysvipc_msg): Rearrange code to
+ avoid resource leakage (CID 60002). Don't use tmp_pathbuf, explain why.
+ Fix indentation.
+ (format_procsysvipc_sem): Ditto.
+ (format_procsysvipc_shm): Ditto (CID 60003).
+
+2014-05-20 Corinna Vinschen <corinna@vinschen.de>
+
+ * fhandler_process.cc (get_mem_values): Rearrange code slightly to
+ avoid resource leakage (CID 59973).
+ (format_process_stat): Drop temporary variable wcmd and avoid
+ string copy without length check (CID 60050).
+ (format_process_status): Ditto (CID 60051).
+
+2014-05-20 Corinna Vinschen <corinna@vinschen.de>
+
+ * fhandler_proc.cc (format_proc_swaps): Use tmp_pathbuf for filename,
+ rather than allocating and forgetting to free (CID 59982).
+
+2014-05-20 Corinna Vinschen <corinna@vinschen.de>
+
+ * fhandler_floppy.cc (fhandler_dev_floppy::get_drive_info): Fix floppy
+ drive handling broken with 1.7.19.
+
+2014-05-20 Corinna Vinschen <corinna@vinschen.de>
+
+ * scandir.cc (scandir): Assume namelist is always valid, per POSIX.
+ (CID 60021).
+ * sec_auth.cc (cygwin_logon_user): Securely erase password copy.
+ (lsaprivkeyauth): Avoid trying to dereference data if no key is stored
+ in the registry (CID 60122). Securely erase passwords after usage.
+
+2014-05-19 Corinna Vinschen <corinna@vinschen.de>
+
+ * pseudo-reloc.cc (__report_error): Raise size of module name buffer to
+ PATH_MAX. Fix length in call to GetModuleFileNameW (CID 59947).
+
+2014-05-19 Corinna Vinschen <corinna@vinschen.de>
+
+ * net.cc (call_gaa): Fix setting pa_ret pointer in case of an error
+ from GetAdaptersAddresses (CID 60218).
+ (get_ifs): Add missing braces in AF_INET6 case which broke netmask
+ computation. Break out of loop if prefix gets <= 0 (CID 59939).
+
+2014-05-19 Corinna Vinschen <corinna@vinschen.de>
+
+ * include/cygwin/version.h (CYGWIN_VERSION_DLL_MINOR): Bump to 31.
+
+2014-05-19 Corinna Vinschen <corinna@vinschen.de>
+
+ * dtable.cc (handle_to_fn): Fix length parameter in call to
+ QueryDosDeviceW (CID 59936).
+
+2014-05-19 Corinna Vinschen <corinna@vinschen.de>
+
+ * pinfo.cc (pinfo_basic::pinfo_basic): Fix size of progname array in
+ call to GetModuleFileNameW (CID 59935).
+
+2014-05-19 Corinna Vinschen <corinna@vinschen.de>
+
+ * smallprintf.cc (__small_vsprintf): Add missing break in 'C' case.
+
+2014-05-19 Corinna Vinschen <corinna@vinschen.de>
+
+ * exceptions.cc (try_to_debug): Fix size of dbg_cmd (CID 59929).
+
+2014-05-18 David Stacey <drstacey@tiscali.co.uk>
+
+ * syscalls.cc (getusershell): Fix buffer overrun (Coverity ID 59932).
+
+2014-05-15 Corinna Vinschen <corinna@vinschen.de>
+
+ * external.cc (cygwin_internal): Use local name buffer instead of
+ allocated one in CW_CYGNAME_FROM_WINNAME.
+
+2014-05-15 Corinna Vinschen <corinna@vinschen.de>
+
+ * include/cygwin/version.h (CYGWIN_VERSION_API_MINOR): Bump to 273.
+
+2014-05-15 Corinna Vinschen <corinna@vinschen.de>
+
+ * external.cc (cygwin_internal): Implement CW_CYGNAME_FROM_WINNAME.
+ Add lengthy comment to explain what we do and why.
+ * include/sys/cygwin.h (cygwin_getinfo_types): Add
+ CW_CYGNAME_FROM_WINNAME.
+
+2014-05-14 Corinna Vinschen <corinna@vinschen.de>
+
+ * sec_auth.cc (get_server_groups): Call get_logon_server only for
+ non-builtin accounts.
+ * uinfo.cc (pwdgrp::fetch_account_from_windows): Check incoming
+ account name for validity in terms of the current name prefixing rules
+ and refuse invalid names.
+
+2014-05-13 Corinna Vinschen <corinna@vinschen.de>
+
+ * fhandler_socket.cc (fhandler_socket::ioctl): Handle the different
+ ideas of u_long between Winsock and Cygwin applications on x86_64.
+ Add long comment.
+
+2014-05-09 Christopher Faylor <me.cygwin2014@cgf.cx>
+
+ * signal.cc (sigprocmask): Fix strace output to include "how".
+
+ * fhandler_console.cc (dev_console::save_restore): Only save current
+ dwEnd line rather than the one after that.
+
+2014-05-08 Corinna Vinschen <corinna@vinschen.de>
+
+ * uinfo.cc (cygheap_user::init): Fix formatting in debug output.
+ (struct cyg_USER_INFO_24): Define temporarily. Explain why.
+ (pwdgrp::fetch_account_from_windows): Handle sane primary group
+ setting for Microsoft Accounts. Explain why.
+ * wincap.h (wincaps::has_microsoft_accounts): New element.
+ * wincap.cc: Implement above element throughout.
+
+2014-05-08 Corinna Vinschen <corinna@vinschen.de>
+
+ * grp.cc (gr_ent::enumerate_caches): Fix copy/paste bug introducing
+ an endless loop.
+
+2014-05-07 Corinna Vinschen <corinna@vinschen.de>
+
+ * passwd.cc (pwdgrp::parse_passwd): Fix an off by one computing the
+ buffer len. Add comment.
+ * uinfo.cc (internal_getlogin): Fix typo in comment.
+
+2014-05-07 Corinna Vinschen <corinna@vinschen.de>
+
+ * uinfo.cc (pwdgrp::fetch_account_from_windows): Tweak SID<->uid
+ conversion to cover S-1-5-113, S-1-5-114, and S-1-5-1000 groups.
+
+2014-05-07 Corinna Vinschen <corinna@vinschen.de>
+
+ * grp.cc (pwdgrp::parse_group): Set grp.len. Drop generating any
+ gr_mem entries.
+ (getgrgid_r): Don't try to copy gr_mem entries. Always set gr_mem
+ to an empty list.
+ (getgrnam_r): Ditto.
+ (app_gr): New static struct to store group data propagated to the
+ calling application via getgrgid/getgrnam.
+ (getgr_cp): Fill app_gr and return pointer to app_gr.g.
+ (getgrgid32): Call getgr_cp.
+ (getgrnam32): Ditto.
+ * passwd.cc (pwdgrp::parse_passwd): Set res.len.
+ (app_pw): New static struct to store passwd data propagated to the
+ calling application via getpwuid/getpwnam.
+ (getpw_cp): Fill app_pw and return pointer to app_pw.p.
+ (getpwuid32): Cal getpw_cp.
+ (getpwnam): Ditto.
+ * pwdgrp.h (struct pg_pwd): Add len member.
+ (struct pg_grp): Ditto.
+
+2014-05-06 Corinna Vinschen <corinna@vinschen.de>
+
+ * security.h (MAX_SUBAUTH_CNT): Drop. Use SID_MAX_SUB_AUTHORITIES
+ instead throughout.
+ (MAX_SID_LEN): Drop. Use SECURITY_MAX_SID_SIZE instead throughout.
+
+2014-05-06 Corinna Vinschen <corinna@vinschen.de>
+
+ * grp.cc (internal_getgroups): Drop unused cygsid variable.
+ * sec_helper.cc (cygpsid::pstring): Use sid_sub_auth_count macro.
+ (cygsid::get_sid): Use MAX_SUBAUTH_CNT rather than wrong constant 8.
+ Don't call memcpy to copy subauthorities into SID, use assignment.
+ (cygsid::getfromstr): Use MAX_SUBAUTH_CNT rather than wrong constant 8.
+ * security.h (MAX_SUBAUTH_CNT): New definition. Set to 11 to cover
+ Microsoft Accounts.
+ (MAX_SID_LEN): Define in terms of SID member sizes and MAX_SUBAUTH_CNT.
+ (DBGSID): Use MAX_SUBAUTH_CNT to define size of SubAuthority array.
+ * uinfo.cc (pwdgrp::fetch_account_from_windows): Handle Micosoft
+ Accounts. Handle them as well known group. Compare domain names
+ case-insensitive.
+ * winlean.h (PIPE_REJECT_REMOTE_CLIENTS): Drop temporary definition
+ since Mingw64 catched up.
+ (DNLEN): Redefine as 16. Explain why.
+
+2014-05-05 Corinna Vinschen <corinna@vinschen.de>
+
+ * net.cc (cygwin_getsockopt): Rearrange code slightly and handle
+ TCP_NODELAY just like SO_KEEPALIVE and SO_DONTROUTE.
+
+2014-05-03 Christopher Faylor <me.cygwin2014@cgf.cx>
+
+ * spawn.cc (av::setup): Eat trailing whitespace on #! script.
+
+2014-05-02 Christopher Faylor <me.cygwin2014@cgf.cx>
+
+ * fhandler_dsp.cc (ioctl): Use _ioctl for recursive call.
+
+2014-04-26 Christopher Faylor <me.cygwin2014@cgf.cx>
+
+ * DevNotes: Add entry cgf-000026.
+ * fhandler.h (fhandler_console::save_top): Save top of screen
+ coordinates.
+ * fhandler_console.cc (dev::save_restore): Record top of screen
+ coordinates. Clear entire buffer when restoring saved buffer and try
+ to position the cursor on the save relative place on the screen.
+
+2014-04-25 Corinna Vinschen <corinna@vinschen.de>
+
+ * syscalls.cc (NT_TRANSACTIONAL_ERROR): Cover all status codes up to
+ STATUS_TRANSACTION_NOT_ENLISTED.
+
+2014-04-24 Corinna Vinschen <corinna@vinschen.de>
+
+ * fhandler_socket.cc: On x86_64, define u_long as __ms_u_long before
+ including the windows headers. Explain why.
+ (get_inet_addr): Convert ANY address to LOOPBACK address. Explain why.
+ (fhandler_socket::evaluate_events): Forcibly set SO_ERROR socket option
+ in case a connection attempt failed. Explain why.
+ (fhandler_socket::ioctl): Drop x86_64 re-definition of u_long here.
+ * fhandler_procnet.cc: On x86_64, define u_long as __ms_u_long before
+ including the windows headers. Explain why.
+ * net.cc: Ditto.
+
+2014-04-23 Corinna Vinschen <corinna@vinschen.de>
+
+ * miscfuncs.cc (check_iovec): Allow 0 as valid iovcnt value.
+
+2014-04-22 Corinna Vinschen <corinna@vinschen.de>
+
+ * ldap.cc (user_attr): Remove "uid" attribute.
+ * ldap.h (LDAP_USER_NAME_ATTR): Remove. Change other attribute index
+ values as required.
+ (cyg_ldap::get_user_name): Remove inline function.
+ * uinfo.cc (pwdgrp::fetch_account_from_windows): Remove code to handle
+ Cygwin username different from Windows username.
+ (pwdgrp::add_account_from_cygserver): Remove unnecessary cast.
+
+2014-04-18 Corinna Vinschen <corinna@vinschen.de>
+
+ * winf.cc (linebuf::fromargv): Temporarily revert patch from 2014-01-24.
+
+2014-04-18 Corinna Vinschen <corinna@vinschen.de>
+
+ * cygtls.h (TP_NUM_C_BUFS): Raise to 50 to allow SYMLOOP_MAX recursions
+ path_conv <-> normalize_posix_path, plus a bit of buffer.
+ (TP_NUM_W_BUFS): Ditto.
+ (class san): Change type of _c_cnt and _w_cnt to unsigned.
+ * path.cc (normalize_posix_path): Guard recursion into path_conv
+ against tmp_pathbuf overflow. Generate normalized path in call to
+ path_conv. If the path is valid, replace dst with the normalized_path
+ from path_conv call. Add comment to explain why we're doing this.
+ * tls_pbuf.cc (tls_pathbuf::destroy): Only free buffers until the
+ first buffer pointer is NULL.
+ (tmp_pathbuf::c_get): Simplify error message.
+ (tmp_pathbuf::w_get): Ditto.
+ * tls_pbuf.h (class tmp_pathbuf): Change type of c_buf_old and w_buf_old
+ to unsigned.
+ (tmp_pathbuf::check_usage): New inline method to check if we have
+ enough tmp_pathbuf buffers left to call a function using tmp_pathbuf
+ buffers.
+ * tlsoffsets.h: Regenerate.
+ * tlsoffsets64.h: Regenerate.
+
+2014-04-16 Corinna Vinschen <corinna@vinschen.de>
+
+ * net.cc (cygwin_setsockopt): Ignore IPV6_TCLASS the same way as IP_TOS.
+
+2014-04-12 Corinna Vinschen <corinna@vinschen.de>
+
+ * uinfo.cc (pwdgrp::fetch_account_from_windows): Fix gid evaluation
+ for local accounts.
+
+2014-04-10 Corinna Vinschen <corinna@vinschen.de>
+
+ * include/cygwin/version.h (CYGWIN_VERSION_DLL_MINOR): Bump to 30.
+
+2014-04-09 Corinna Vinschen <corinna@vinschen.de>
+
+ * exceptions.cc (exception::myfault_handle): Only handle the minimum
+ amount of exceptions the myfault handler was designed for.
+
+2014-04-08 Corinna Vinschen <corinna@vinschen.de>
+
+ * cygwin.sc.in: (Temporarily?) workaround serious ld bug which
+ truncates symbols in certain computations to 32 bit. See
+ https://sourceware.org/bugzilla/show_bug.cgi?id=16821
+
+2014-04-07 Corinna Vinschen <corinna@vinschen.de>
+
+ * cygserver_ipc.h (ipc_set_proc_info): Add bool parameter to specify
+ whether or not to send signal_arrived.
+ * shm.cc (client_request_shm::client_request_shm): Call
+ ipc_set_proc_info with bool parameter set to true to not send
+ signal_arrived.
+
+2014-04-04 Corinna Vinschen <corinna@vinschen.de>
+
+ * ntea.cc (EA_BUFSIZ): Fix comment.
+ (read_ea): Use tmp_pathbuf for local buffer rather than alloca.
+ Throughout change ZwQueryEaFile to NtQueryEaFile in comments.
+
+2014-04-04 Corinna Vinschen <corinna@vinschen.de>
+
+ * ntea.cc (EA_BUFSIZ): Reduce to 64K. Add comment to explain why.
+
+2014-03-29 Christopher Faylor <me.cygwin2014@cgf.cx>
+
+ * DevNotes: Add entry cgf-000025.
+ * exceptions.cc (_cygtls::signal_debugger): Reorganize to avoid
+ contacting the debugger if we have already done so via the exception
+ handler. Eliminate need for goto. Remove an ifdef in favor of just
+ allocating a larger buffer.
+
+2014-03-28 Corinna Vinschen <corinna@vinschen.de>
+
+ * dcrt0.cc (dll_crt0_0): Install myfault exception handler on x86_64.
+ * exception.h (exception_list): Typedef as void on x86_64.
+ (exception::handler_installed): Remove.
+ (exception::handle_while_being_debugged): Remove.
+ (exception::myfault_handle): Declare for x86_64.
+ (exception::handle): Declare as ordinary exception handler on x86_64
+ as well.
+ (exception::exception): Drop previous code (again). Install
+ exception::handle as SEH handler.
+ (exception::install_myfault_handler): New x86_64-only method to
+ install exception::myfault_handle as VEH handler. Explain why.
+ (exception::~exception): For x86_64, define frame end label (again).
+ * exceptions.cc (CYG_EXC_CONTINUE_EXECUTION): Drop definition.
+ (CYG_EXC_CONTINUE_SEARCH): Ditto.
+ (exception::myfault_handle): New x86_64-only method, VEH handler to
+ handle myfault exceptions.
+ (exception::handle): Define as ordinary exception handler on x86_64
+ as well. Use ExceptionContinueExecution and ExceptionContinueSearch
+ throughout instead of deleted Cygwin macros. Don't handle myfault
+ exceptions on x86_64.
+
+2014-03-28 Corinna Vinschen <corinna@vinschen.de>
+
+ * sec_auth.cc (create_token): Initialize lsa handle to NULL, rather than
+ to INVALID_HANDLE_VALUE.
+ (lsaauth): Ditto.
+ (lsaprivkeyauth): Ditto.
+ * setlsapwd.cc (setlsapwd): Don't initialize lsa handle.
+
+2014-03-28 Corinna Vinschen <corinna@vinschen.de>
+
+ * exceptions.cc (_cygtls::signal_debugger): Move memcpy to copy context
+ from incoming siginfo_t to thread_context, too.
+
+2014-03-27 Corinna Vinschen <corinna@vinschen.de>
+
+ * gendef (_sigbe/x86_64): Fix typo in .seh_proc pseudo-op.
+ (setjmp/x86_64): Drop storing ExceptionList pointer in jmp_buf->Frame.
+ Drop comment. Store likely frame in rdx. Jump to __setjmpex.
+ (__setjmpex): New function providing setjmp functionality. Fetch
+ jmp_buf->Frame from rdx, like MSVCRT setjmpex.
+ (__sjfault/x86_64): Store rdx content in jmp_buf->Frame.
+ (__ljfault/x86_64): Don't restore ExceptionList pointer.
+ (longjmp/x86_64): Ditto.
+
+2014-03-19 Christopher Faylor <me.cygwin2014@cgf.cx>
+
+ * fhandler_dsp.cc (fhandler_dev_dsp::ioctl): Actually pass ioctl
+ argument to _ioctl.
+
+2014-03-19 Christopher Faylor <me.cygwin2014@cgf.cx>
+
+ * fhandler.h (fhandler_dev_dsp): Remove variable names from
+ declarations.
+ (fhandler_dev_dsp::close_audio_in): Make __reg1.
+ (fhandler_dev_dsp::close_audio_out): Make __reg2.
+ * fhandler_dsp.cc (fhandler_dev_dsp::close_audio_in): Make __reg1.
+ (fhandler_dev_dsp::close_audio_out): Make __reg2.
+ (fhandler_dev_dsp::close): Don't abruptly terminate sound just because
+ we are exiting.
+
+2014-03-19 Corinna Vinschen <corinna@vinschen.de>
+
+ * exception.h (exception::handle_while_being_debugged): Declare.
+ (exception::exception): Install unhandled exception filter.
+ * exceptions.cc (exception::handle_while_being_debugged): New method.
+
+2014-03-19 Corinna Vinschen <corinna@vinschen.de>
+
+ * passwd.cc (pg_ent::enumerate_ad): Ignore primary domain in list of
+ trusted domains only if all trusted domains are enumerated anyway.
+ Explain why.
+
+2014-03-18 Christopher Faylor <me.cygwin2014@cgf.cx>
+
+ * fhandler_dsp.cc (fhandler_dev_dsp::fixup_after_fork): Actually call
+ _fixup_after_fork rather than looping forever.
+ (fhandler_dev_dsp::fixup_after_exec): Ditto.
+
+2014-03-18 Corinna Vinschen <corinna@vinschen.de>
+
+ Partially revert patch from 2014-03-04.
+ * exception.h (exception::handler_installed): Declare.
+ (exception::exception): Install vectored exception handler on x86_64.
+ (exception::~exception): Remove for x86_64.
+ * exceptions.cc (exception::handler_installed): Define.
+
+2014-03-17 Christopher Faylor <me.cygwin2014@cgf.cx>
+
+ * sigproc.h (no_thread_exit_protect): New class.
+ * sigproc.cc (thread_exit): Use no_thread_exit_protect to determine if
+ we need to coordinate ThreadExit/ExitProcess.
+ * fhandler_dsp.cc (fhandler_dev_dsp::Audio_out::stop): Use
+ no_thread_exit_protect to kludge around waiting for waveOutClose as it
+ waits for a thread that never exits.
+ (fhandler_dev_dsp::Audio_in::stop): Ditto for waveInClose.
+
+2014-03-16 Christopher Faylor <me.cygwin2014@cgf.cx>
+
+ * fhandler.h (fhandler_dev_dsp::base): New method.
+ (fhandler_dev_dsp::_read): Ditto.
+ (fhandler_dev_dsp::_write): Ditto.
+ (fhandler_dev_dsp::_ioctl): Ditto.
+ (fhandler_dev_dsp::_fixup_after_fork): Ditto.
+ (fhandler_dev_dsp::_fixup_after_exec): Ditto.
+ * fhandler_dsp.cc (fhandler_dev_dsp::read): Call real function via
+ base() pointer.
+ (fhandler_dev_dsp::write): Ditto.
+ (fhandler_dev_dsp::ioctl): Ditto.
+ (fhandler_dev_dsp::fixup_after_fork): Ditto.
+ (fhandler_dev_dsp::fixup_after_exec): Ditto.
+ (fhandler_dev_dsp::_read): Rename by adding an leading underscore.
+ (fhandler_dev_dsp::_write): Ditto.
+ (fhandler_dev_dsp::_ioctl): Ditto.
+ (fhandler_dev_dsp::_fixup_after_fork): Ditto.
+ (fhandler_dev_dsp::_fixup_after_exec): Ditto.
+
+2014-03-12 Corinna Vinschen <corinna@vinschen.de>
+
+ * cygheap.h (enum cygheap_pwdgrp::cache_t): Remove.
+ (cygheap_pwdgrp::caching): Convert to bool.
+ (cygheap_pwdgrp::pwd_cache): Add cygserver member.
+ (cygheap_pwdgrp::grp_cache): Ditto.
+ (cygheap_pwdgrp::nss_db_caching): Drop.
+ (cygheap_pwdgrp::nss_db_full_caching): Drop.
+ (cygheap_pwdgrp::nss_cygserver_caching): New method.
+ (cygheap_pwdgrp::nss_disable_cygserver_caching): New method.
+ * cygserver.h (client_request::request_code_t): Add
+ CYGSERVER_REQUEST_PWDGRP.
+ * cygserver_pwdgrp.h: New file.
+ * cygtls.h (struct _local_storage): Remove pwbuf and grbuf members.
+ * grp.cc (pwdgrp::prep_tls_grbuf): Drop.
+ (internal_getgrsid): Handle cygserver caching and rearrange to check
+ the caches first.
+ (internal_getgrnam): Ditto.
+ (internal_getgrgid): Ditto.
+ (gr_ent::enumerate_caches): Handle cygserver cache.
+ * passwd.cc (pwdgrp::prep_tls_pwbuf): Drop.
+ (internal_getpwsid): Handle cygserver caching and rearrange to check
+ the caches first.
+ (internal_getpwnam): Ditto.
+ (internal_getpwuid): Ditto.
+ (pw_ent::enumerate_caches): Handle cygserver cache.
+ * pwdgrp.h (pwdgrp::add_account_from_cygserver): New method declaration.
+ (pwdgrp::fetch_account_from_cygserver): New method declaration.
+ (pwdgrp::prep_tls_pwbuf): Drop declaration.
+ (pwdgrp::prep_tls_grbuf): Drop declaration.
+ (pwdgrp::add_user_from_cygserver): New inline methods.
+ (pwdgrp::add_group_from_cygserver): New inline methods.
+ * tlsoffsets.h: Regenerate.
+ * tlsoffsets64.h: Regenerate.
+ * uinfo.cc (internal_getlogin): Call internal_getgroups if cygserver
+ caching is not available.
+ (cygheap_pwdgrp::init): Initialize pwd_cache.cygserver and
+ grp_cache.cygserver. Set caching to true.
+ (cygheap_pwdgrp::nss_init_line): Drop db_cache handling entirely.
+ (pwdgrp::add_account_from_windows): Drop no caching handling.
+ (client_request_pwdgrp::client_request_pwdgrp): New method.
+ (pwdgrp::fetch_account_from_cygserver): New method.
+ (pwdgrp::add_account_from_cygserver): New method.
+
+ * fhandler_disk_file.cc (fhandler_base::fstat_helper): Fix formatting.
+ * include/sys/cygwin.h: Ditto.
+
+2014-03-12 Corinna Vinschen <corinna@vinschen.de>
+
+ * uinfo.cc (pwdgrp::fetch_account_from_windows): Avoid crash on
+ non-domain member machines if an unknown SID comes in.
+
+2014-03-12 Corinna Vinschen <corinna@vinschen.de>
+
+ * include/cygwin/socket.h (IPV6_JOIN_GROUP): Revert.
+ (IPV6_LEAVE_GROUP): Ditto.
+
+2014-03-10 Christopher Faylor <me.cygwin2014@cgf.cx>
+
+ * fhandler.h (dev_console::b): Redefine as CONSOLE_SCREEN_BUFFER_INFO
+ for use with older OS.
+ * fhandler_console.cc (dev_console::fillin): Ditto for
+ GetConsoleScreenBufferInfo.
+
+2014-03-10 Christopher Faylor <me.cygwin2014@cgf.cx>
+
+ * fhandler_console.cc (dev_console::save_restore): Save entire line of
+ current cursor position.
+
+2014-03-09 Christopher Faylor <me.cygwin2014@cgf.cx>
+
+ * fhandler_console.cc (fhandler_console::save_restore): Save only until
+ last written row and, because of this, don't bother trying to restore
+ the screen buffer size. Set cursor position after refilling buffer.
+ (fhandler_console::write): Use absolute paths when saving/restoring
+ cursor position or suffer odd problems after a saved screen is
+ restored.
+
+2014-03-09 Christopher Faylor <me.cygwin2014@cgf.cx>
+
+ * fhandler.h (fhandler_console::dwBufferSize): Delete.
+ (fhandler_console::dwCursorPosition): Ditto.
+ (fhandler_console::wAttributes): Ditto.
+ (fhandler_console::b): New field encompassing previously disparate
+ screen buffer info.
+ (fhandler_console::save_bufsize): Rename from savebufsiz
+ (fhandler_console::save_buf): Rename sfrom savebuf.
+ (fhandler_console::save_cursor): New field.
+ (fhandler_console::save_restore): New function.
+ (fhandler_console::con): Rename from dev_state.
+ (fhandler_console::focus_aware): Accommodate name change.
+ * fhandler_console.cc: Use 'b' field of dev_console throughout instead
+ of disparate names. Accommodate dev_state -> con rename.
+ (dev_state:save_restore): New function. Attempt to save the entire
+ screen buffer rather than just the visible part. Clear the buffer when
+ saving, like Linux.
+ (fhandler_console::char_command): Use con.save_restore() for
+ Save/restore screen sequence.
+
+2014-03-09 Christopher Faylor <me.cygwin2014@cgf.cx>
+
+ * sigproc.cc (_cygtls::remove_wq): Reset thread_ev inside of lock. Set
+ to NULL when done.
+
+2014-03-09 Christopher Faylor <me.cygwin2014@cgf.cx>
+
+ * fhandler_console.cc (fhandler_console::char_command): Properly use
+ calculated value rather than directly using dev_state.args[0].
+
+2014-03-09 Christopher Faylor <me.cygwin2014@cgf.cx>
+
+ * dir.cc (opendir): Propagate any errno from build_fh_name.
+
+2014-03-07 Corinna Vinschen <corinna@vinschen.de>
+
+ * pwdgrp.h (pwdgrp::is_passwd): New inline method.
+ (pwdgrp::is_group): New inline method.
+ (add_account_from_windows): Drop group argument from declaration.
+ (fetch_account_from_windows): Ditto.
+ (check_file): Ditto.
+ (add_user_from_windows): Call add_account_from_windows accordingly.
+ (add_group_from_windows): Ditto.
+ * uinfo.cc (pwdgrp::add_account_from_windows): Drop group argument.
+ Use is_group method instead.
+ (pwdgrp::check_file): Ditto.
+ (pwdgrp::fetch_account_from_windows): Ditto.
+ * grp.cc: Accommodate aforementioned changes.
+ * passwd.cc: Ditto.
+
+2014-03-06 Corinna Vinschen <corinna@vinschen.de>
+
+ * passwd.cc (pg_ent::enumerate_builtin): Convert pwd_builtins and
+ grp_builtins to array of cygpsid pointers. Replace SID strings with
+ pointers to well known SIDs.
+ * sec_helper.cc (well_known_local_service_sid): Define.
+ (well_known_network_service_sid): Define.
+ (trusted_installer_sid): Define.
+ * security.h (well_known_local_service_sid): Declare.
+ (well_known_network_service_sid): Declare.
+ (trusted_installer_sid): Declare.
+ * uinfo.cc (pwdgrp::fetch_account_from_windows): Throughout set acc_type
+ to SidTypeUnknown if LookupAccountXXX function failed. Create
+ simplified passwd entry for non-user accounts, except for LocalSystem.
+ Add comment.
+
+2014-03-06 Corinna Vinschen <corinna@vinschen.de>
+
+ * setlsapwd.cc (setlsapwd): Use RtlSecureZeroMemory to delete password
+ from memory.
+
+2014-03-05 Corinna Vinschen <corinna@vinschen.de>
+
+ * ldap.cc (rediscover_thread): Remove.
+ (cyg_ldap::open): Remove code to rediscover DC. It just won't do the
+ right thing.
+ (cyg_ldap::enumerate_ad_accounts): Change to be self-sufficient (no
+ explicit open call required). Enumerate on a DC of the domain itself
+ instead of relying on delegation. Remove ill-advised code trying to
+ generate rootdse from domain name.
+ * passwd.cc (pg_ent::enumerate_ad): Drop explicit call to
+ cyg_ldap::open.
+
+2014-03-05 Corinna Vinschen <corinna@vinschen.de>
+
+ * include/cygwin/config.h (__TM_GMTOFF): Define.
+ (__TM_ZONE): Define.
+
+2014-03-05 Corinna Vinschen <corinna@vinschen.de>
+
+ * localtime.cc: Define TM_GMTOFF and TM_ZONE based on __TM_GMTOFF and
+ __TM_ZONE being defined. Throughout, write to these struct tm members
+ only if CYGWIN_VERSION_CHECK_FOR_EXTRA_TM_MEMBERS is true.
+ * libc/strptime.cc: Ditto.
+ * include/cygwin/version.h (CYGWIN_VERSION_CHECK_FOR_EXTRA_TM_MEMBERS):
+ Define.
+ (CYGWIN_VERSION_API_MINOR): Bump to 272.
+
+2014-03-04 Corinna Vinschen <corinna@vinschen.de>
+
+ * exception.h (exception::handler_installed): Remove.
+ (exception::exception): Remove old code. Manually install SEH handler
+ instead.
+ (exception::~exception): For x86_64, define frame end label.
+ * exceptions.cc (exception::handler_installed): Remove.
+
+2014-03-03 Corinna Vinschen <corinna@vinschen.de>
+
+ * exception.h (exception::exception): Install vectored exception
+ handler rather than vectored continue handler.
+
+2014-03-03 Corinna Vinschen <corinna@vinschen.de>
+
+ * sec_helper.cc (cygpsid::get_id): Move Samba SID->uid/gid mapping
+ from get_sids_info here.
+ (get_sids_info): Vice versa.
+ * security.cc (convert_samba_sd): New static function to map a Samba
+ security descriptor to a security descriptor with UNIX users and groups
+ converted to Windows SIDs per RFC 2307 mapping.
+ (check_file_access): Call convert_samba_sd on Samba security
+ descriptors.
+
+2014-02-28 Corinna Vinschen <corinna@vinschen.de>
+
+ * uinfo.cc (pwdgrp::fetch_account_from_windows): Only fetch extended
+ user info if we're creating a passwd entry. Add comment.
+
+2014-02-28 Corinna Vinschen <corinna@vinschen.de>
+
+ * cygheap.h (cygheap_user::sid): Return reference to cygpsid rather
+ than PSID.
+ (cygheap_user::saved_sid): Ditto.
+ (cygheap_pwdgrp::cache_t): New type.
+ (cygheap_pwdgrp::caching): Convert to cache_t.
+ (cygheap_pwdgrp::nss_db_caching): Change accordingly.
+ (cygheap_pwdgrp::nss_db_full_caching): New inline method.
+ * grp.cc (internal_getgroups): Reinvent. Take cyg_ldap pointer as
+ third parameter and use throughout.
+ (getgroups32): Call internal_getgroups.
+ * pwdgrp.h (internal_getgroups): Declare.
+ * uinfo.cc (internal_getlogin): Partial rewrite to accommodate having
+ no connection to the DC. Give primary group from user token more
+ weight. Generate group entries for all groups in the user token if
+ caching is set to NSS_FULL_CACHING.
+ (cygheap_pwdgrp::init): Initialize caching to NSS_FULL_CACHING.
+ (cygheap_pwdgrp::nss_init_line): Handle "db_cache: full".
+ (pwdgrp::add_account_from_windows): Fix group handling in non-caching
+ mode.
+ (pwdgrp::fetch_account_from_windows): Default primary group for the
+ current user to primary group from user token. Check for primary
+ domain first after LookupAccountSid failed.
+
+2014-02-27 Corinna Vinschen <corinna@vinschen.de>
+
+ * autoload.cc (CheckTokenMembership): Import.
+ * external.cc (cygwin_internal): Call get_uid/get_gid instead of get_id.
+ * grp.cc (internal_getgrsid): Take additional cyg_ldap pointer.
+ Forward to pwdgrp::add_group_from_windows.
+ (internal_getgrnam): Ditto.
+ (internal_getgrgid): Ditto.
+ (gr_ent::enumerate_local): Drop ugid_caching bool from call to
+ pwdgrp::fetch_account_from_windows.
+ (getgroups32): Rename from internal_getgroups and drop getgroups32 stub.
+ Drop srchsid parameter and code handling it. Add local cyg_ldap
+ instance and forward to internal_getgrXXX.
+ (getgroups): Call getgroups32.
+ (get_groups): Add local cyg_ldap instance and forward to
+ internal_getgrXXX.
+ (getgrouplist): Ditto.
+ (setgroups32): Ditto.
+ * ldap.cc (cyg_ldap::open): Don't call close. Return true if connection
+ is already open.
+ (cyg_ldap::remap_uid): Forward this to internal_getpwsid.
+ (cyg_ldap::remap_gid): Forward this to internal_getgrsid.
+ * passwd.cc (internal_getpwsid): Take additional cyg_ldap pointer.
+ Forward to pwdgrp::add_user_from_windows.
+ (internal_getpwnam): Ditto.
+ (internal_getpwuid): Ditto.
+ (pg_ent::enumerate_builtin): Drop ugid_caching bool from call to
+ pwdgrp::fetch_account_from_windows.
+ (pg_ent::enumerate_sam): Ditto.
+ (pg_ent::enumerate_ad): Ditto. Forward local cldap instead.
+ * pwdgrp.h (internal_getpwsid): Align declaration to above change.
+ (internal_getpwnam): Ditto.
+ (internal_getpwuid): Ditto.
+ (internal_getgrsid): Ditto.
+ (internal_getgrgid): Ditto.
+ (internal_getgrnam): Ditto.
+ (internal_getgroups): Drop declaration.
+ (pwdgrp::add_account_from_windows): Align declaration to below change.
+ (pwdgrp::add_user_from_windows): Ditto.
+ (pwdgrp::add_group_from_windows): Ditto.
+ * sec_acl.cc (setacl): Add local cyg_ldap instance and forward to
+ internal_getpwuid and internal_getgrgid.
+ (getacl): Add local cyg_ldap instance and forward to cygpsid::get_id.
+ (aclfromtext32): Add local cyg_ldap instance and forward to
+ internal_getpwnam and internal_getgrnam.
+ * sec_helper.cc (cygpsid::get_id): Take additional cyg_ldap pointer.
+ Forward to internal_getgrsid and internal_getpwsid.
+ (get_sids_info): Drop ldap_open. Forward local cldap to
+ internal_getpwsid and internal_getgrXXX. Call CheckTokenMembership
+ rather than internal_getgroups.
+ * security.h (cygpsid::get_id): Add cyg_ldap pointer, drop default
+ parameter.
+ (cygpsid::get_uid): Add cyg_ldap pointer. Call get_id accordingly.
+ (cygpsid::get_gid): Ditto.
+ * uinfo.cc (internal_getlogin): Add local cyg_ldap instance and forward
+ to internal_getpwXXX and internal_getgrXXX calls.
+ (pwdgrp::add_account_from_windows): Take additional cyg_ldap pointer.
+ Forward to pwdgrp::fetch_account_from_windows.
+ (fetch_posix_offset): Drop ldap_open argument and handling. Get
+ cyg_ldap instance as pointer.
+ (pwdgrp::fetch_account_from_windows): Take additional cyg_ldap pointer.
+ Use it if it's not NULL, local instance otherwise. Drop ldap_open.
+ Drop fetching extended group arguments from AD for speed.
+
+2014-02-27 Corinna Vinschen <corinna@vinschen.de>
+
+ * path.cc (find_fast_cwd_pointer): Fix preceeding comment.
+
+2014-02-25 Christopher Faylor <me.cygwin2014@cgf.cx>
+
+ * fhandler.h (fhandler_console::scroll_buffer_screen): New function.
+ * fhandler_console.cc (fhandler_console::scroll_buffer_screen): New function.
+ (fhandler_console::char_command): Use scroll_buffer_screen as appropriate.
+ (dev_console::scroll_buffer): Remove if 0'ed block.
+
+2014-02-22 Christopher Faylor <me.cygwin2014@cgf.cx>
+
+ * dev_console::scroll_buffer): Reinstate clipping region.
+
+2014-02-22 Christopher Faylor <me.cygwin2014@cgf.cx>
+
+ * fhandler.h (dev_console::is_fullscreen): Delete.
+ (dev_console::scroll_window): Return bool indicating success.
+ (dev_console::scroll_screen): New function.
+ (dev_console::clear_screen): New function.
+ (fhandler_console::clear_screen): Make __reg3.
+ (fhandler_console::cursor_set): Ditto.
+ (fhandler_console::cursor_get): Ditto.
+ (fhandler_console::cursor_rel): Ditto.
+ * fhandler_console.cc (dev_console::scroll_buffer): Adapt from
+ fhandler_console.
+ (fhandler_console::scroll_buffer): Use dev_console function.
+ (dev_console::is_fullscreen): Delete.
+ (dev_console::scroll_window): Return true if we cleared the screen.
+ Shrink/grow buffer first before scrolling to ensure that there is
+ sufficient space after scrolling.
+ (fhandler_console::clear_screen): Make reg3, use dev_console function.
+ (dev_console::clear_screen): New function adapted from
+ fhandler_console.
+ (fhandler_console::cursor_set): Make __reg3.
+ (fhandler_console::cursor_rel): Ditto.
+ (fhandler_console::cursor_get): Ditto.
+ (fhandler_console::write): Fix "reverse index".
+
+2014-02-22 Corinna Vinschen <corinna@vinschen.de>
+
+ * external.cc (cygwin_internal): Add cases for CW_GETNSSSEP,
+ CW_GETPWSID and CW_GETGRSID.
+ * grp.cc (internal_getgrsid_from_db): New function.
+ * passwd.cc (internal_getpwsid_from_db): New function.
+ (pg_ent::setent): Add special case for call from mkpasswd/mkgroup.
+ * pwdgrp.h (internal_getpwsid_from_db): Declare.
+ (internal_getgrsid_from_db): Declare.
+ (enum nss_enum_t): Move to include/sys/cygwin.h.
+ (class pg_ent): Add comment.
+ * uinfo.cc (pwdgrp::fetch_account_from_windows): Fix typo in comment.
+ Change "UNIX" to "Unix" in domain name.
+ * include/sys/cygwin.h (cygwin_getinfo_types): Add CW_GETNSSSEP,
+ CW_GETPWSID and CW_GETGRSID.
+ (enum nss_enum_t): Define here.
+
+2014-02-21 Corinna Vinschen <corinna@vinschen.de>
+
+ * pwdgrp.h (pwdgrp::fetch_account_from_windows): Add bool parameter
+ to declaration, set to true by default.
+ * uinfo.cc (pwdgrp::fetch_account_from_windows): Add bool parameter
+ "ugid_caching". Only add account to ugid_cache if set to true.
+ * grp.cc (gr_ent::enumerate_local): Call fetch_account_from_windows
+ with ugid_caching parameter set to false.
+ * passwd.cc (pg_ent::enumerate_builtin): Ditto.
+ (pg_ent::enumerate_sam): Ditto.
+ (pg_ent::enumerate_ad): Ditto.
+
+2014-02-20 Corinna Vinschen <corinna@vinschen.de>
+
+ * grp.cc (getgrouplist): Fix previous fix so ret is only set to ngroups
+ if ngroups isn't too small.
+
+2014-02-20 Corinna Vinschen <corinna@vinschen.de>
+
+ * grp.cc (get_groups): Don't add gid to list if it's ILLEGAL_GID.
+ (getgrouplist): Return number of groups, just like glibc.
+
+2014-02-19 Corinna Vinschen <corinna@vinschen.de>
+
+ * passwd.cc (pg_ent::setent): Initialize cygheap domain info.
+ * sec_auth.cc (get_logon_server): Ditto.
+
+2014-02-18 Corinna Vinschen <corinna@vinschen.de>
+
+ * external.cc (cygwin_internal): Handle new CW_SETENT, CW_GETENT and
+ CW_ENDENT info types.
+ * grp.cc (setgrent_filtered): New function, called from cygwin_internal.
+ (getgrent_filtered): Ditto.
+ (endgrent_filtered): Ditto.
+ * passwd.cc (pg_ent::setent): Set state explicitely to from_cache.
+ (pg_ent::getent): Handle the fact that a DC has no SAM and enumerating
+ local accounts is equivalent to enumerating domain accounts.
+ (setpwent_filtered): New function, called from cygwin_internal.
+ (getpwent_filtered): Ditto.
+ (endpwent_filtered): Ditto.
+ * pwdgrp.h (setpwent_filtered): Declare.
+ (getgrent_filtered): Ditto.
+ (endgrent_filtered): Ditto.
+ (setpwent_filtered): Ditto.
+ (getpwent_filtered): Ditto.
+ (endpwent_filtered): Ditto.
+ * include/sys/cygwin.h (cygwin_getinfo_types): Add CW_SETENT, CW_GETENT,
+ and CW_ENDENT.
+
+2014-02-18 Corinna Vinschen <corinna@vinschen.de>
+
+ * setlsapwd.cc (setlsapwd): Fix conditional expression after breaking
+ it on 2014-01-23.
+
+2014-02-17 Corinna Vinschen <corinna@vinschen.de>
+
+ * autoload.cc (ldap_abandon): Import.
+ (ldap_result): Import.
+ (ldap_searchW): Import.
+ (NetGroupEnum): Import.
+ (NetLocalGroupEnum): Import.
+ (NetUserEnum): Import.
+ * cygheap.h (class cygheap_pwdgrp): Add members enums and enum_tdoms.
+ (cygheap_pwdgrp::nss_db_enums): New inline method.
+ (cygheap_pwdgrp::nss_db_enum_tdoms): Ditto.
+ * cygtls.h (struct _local_storage): Drop unused members pw_pos and
+ grp_pos.
+ * grp.cc (grent): New static variable of class gr_ent.
+ (gr_ent::enumerate_caches): New method.
+ (gr_ent::enumerate_local): New method.
+ (gr_ent::getgrent): New method.
+ (setgrent): Call gr_ent method.
+ (getgrent32): Ditto.
+ (endgrent): Ditto.
+ * ldap.cc (sid_attr): Rename from nfs_attr.
+ (cyg_ldap::close): Abandon still running asynchronous search.
+ (cyg_ldap::fetch_ad_account): Reduce filter buffer size.
+ (cyg_ldap::enumerate_ad_accounts): New method.
+ (cyg_ldap::next_account): New method.
+ (cyg_ldap::fetch_posix_offset_for_domain): Reduce filter buffer size.
+ (cyg_ldap::fetch_unix_sid_from_ad): Ditto. Fix return value in case
+ no value has been read.
+ (cyg_ldap::fetch_unix_name_from_rfc2307): Reduce filter buffer size.
+ * ldap.h (class cyg_ldap): Add msg_id member.
+ (cyg_ldap::enumerate_ad_accounts): Declare.
+ (cyg_ldap::next_account): Declare:
+ * passwd.cc (pwent): New static variable of class pw_ent.
+ (pg_ent::clear_cache): New method.
+ (pg_ent::setent): New method.
+ (pg_ent::getent): New method.
+ (pg_ent::endent): New method.
+ (pg_ent::enumerate_file): New method.
+ (pg_ent::enumerate_builtin): New method.
+ (pg_ent::enumerate_sam): New method.
+ (pg_ent::enumerate_ad): New method.
+ (pw_ent::enumerate_caches): New method.
+ (pw_ent::enumerate_local): New method.
+ (pw_ent::getpwent): New method.
+ (setpwent): Call pw_ent method.
+ (getpwent): Ditto.
+ (endpwent): Ditto.
+ * pwdgrp.h (class pwdgrp): Define pg_ent, pw_ent and gr_ent as friend
+ classes.
+ (pwdgrp::add_account_post_fetch): Declare with extra bool parameter.
+ (pwdgrp::file_attr): New inline method.
+ (enum nss_enum_t): Define.
+ (class pg_ent): Define.
+ (class pw_ent): Define.
+ (class gr_ent): Define.
+ * tlsoffsets.h: Regenerate.
+ * tlsoffsets64.h: Ditto.
+ * uinfo.cc (cygheap_pwdgrp::init): Initialize enums and enum_tdoms.
+ (cygheap_pwdgrp::nss_init_line): Fix typo in preceeding comment.
+ Handle new "db_enum" keyword.
+ (pwdgrp::add_account_post_fetch): Take additional `bool lock' parameter
+ and acquire pglock before adding element to array if lock is true.
+ (pwdgrp::add_account_from_file): Call add_account_post_fetch with lock
+ set to true.
+ (pwdgrp::add_account_from_windows): Ditto in case of caching.
+ (pwdgrp::fetch_account_from_windows): Handle builtin aliases only
+ known to the domain controller. Only call NetLocalGroupGetInfo for
+ aliases.
+
+2014-02-16 Corinna Vinschen <corinna@vinschen.de>
+
+ * miscfuncs.h (NT_readline::close): New function to close handle.
+ (NT_readline::~NT_readline): Call close.
+ * sec_auth.cc (verify_token): Use constructor to initialize tok_usersid.
+ * security.h (cygsid::cygsid): Add copy constructor taking cygsid as
+ source.
+
+2014-02-16 Corinna Vinschen <corinna@vinschen.de>
+
+ * dcrt0.cc (dll_crt0_1): Call initial_setlocale before fetching
+ current user information.
+
+2014-02-15 Christopher Faylor <me.cygwin2014@cgf.cx>
+
+ * DevNotes: Add entry cgf-000024.
+ * fhandler.h (dev_console::state): Remove trailing underscore.
+ (dev_console::args): Ditto.
+ (dev_console::nargs): Ditto.
+ (dev_console::info): Eliminate subclass.
+ (dev_console::dwEnd): New field.
+ (dev_console::scroll_window): New function.
+ (dev_console::is_fullscreen): Ditto.
+ (dev_console::fillin): Rename from fillin_info.
+ (fhandler_console::scroll_buffer): Rename from scroll_screen.
+ * fhandler_console.cc: Throughout s/dev_state\.info/dev_state/g.
+ Accommodate other name changes.
+ (dev_console::fillin): Accommodate rename. Notice max x/y written to.
+ Forgo memset if GetConsoleScreenBufferInfo fails.
+ (fhandler_console::scroll_buffer): Accommodate rename. Don't treat y
+ coordinate of zero as top of screen.
+ (dev_console::is_fullscreen): New function.
+ (dev_console::scroll_window): Ditto.
+ (fhandler_console::clear_screen): Just scroll the screen when clearing
+ the screen in a state where the screen buffer is bigger than the
+ screen.
+ (fhandler_console::char_command): Try harder to get 'S' and 'T' working
+ in the presence of a screen buffer. Use temporary 'n' variable rather
+ than dev_state.args[0]. Use GNU ?: shortcut method.
+
+2014-02-14 Christopher Faylor <me.cygwin2014@cgf.cx>
+
+ * pinfo.cc (winpids::add): Always copy pinfo structure when winpid.
+ Fill out dwProcessId explicitly to handle exec from a windows process.
+ (winpids::enum_processes): Reorganize to iterate over known cygwin pids
+ when !winpid. Simplify logic. Don't do duplicate detection for
+ winpid.
+
+2014-02-14 Corinna Vinschen <corinna@vinschen.de>
+
+ * uinfo.cc (pwdgrp::fetch_account_from_windows): Default to /bin/bash
+ as login shell.
+
+2014-02-13 Corinna Vinschen <corinna@vinschen.de>
+
+ * ldap.cc (cyg_ldap::fetch_posix_offset_for_domain): If domain name
+ has no dot, it's a Netbios name. Change the search filter expression
+ accordingly and filter by flatName. Add comment.
+ * uinfo.cc (cygheap_domain_info::init): Gracefully handle NULL
+ DnsDomainName and DomainSid members in DS_DOMAIN_TRUSTSW structure.
+ Add comment. Fix comment preceeding fetching the mapping server
+ from registry.
+ (pwdgrp::fetch_account_from_file): Convert str to a local array.
+ (fetch_posix_offset): New static function.
+ (pwdgrp::fetch_account_from_windows): Add debug output in case
+ LookupAccountSidW fails. Simplify code by calling fetch_posix_offset
+ where appropriate. If LookupAccountSidW fails, check if the SID is
+ one of the known trusted domains. If so, create a more informative
+ account entry.
+
+2014-02-12 Corinna Vinschen <corinna@vinschen.de>
+
+ * uinfo.cc (cygheap_pwdgrp::nss_init_line): Explicitely ignore a colon
+ as separator char.
+
+2014-02-11 Christopher Faylor <me.cygwin2014@cgf.cx>
+
+ * winsup.h: Turn off previous workaround but leave a comment.
+
+2014-02-11 Corinna Vinschen <corinna@vinschen.de>
+
+ * ldap.cc (rediscover_thread): Give argument a useful name.
+ * miscfuncs.cc (NT_readline::init): It's a really bad idea trying to
+ print a pointer to a PUNICODE_STRING as PUNICODE_STRING. Fix it.
+ * uinfo.cc (cygheap_domain_info::init): Print status codes as hex
+ values in debug output.
+
+2014-02-11 Corinna Vinschen <corinna@vinschen.de>
+
+ * autoload.cc (NetLocalGroupGetInfo): Replace NetGroupGetInfo.
+ * cygheap.h (class cygheap_ugid_cache): Move ugid_cache_t type here
+ and rename.
+ (struct init_cygheap): Add cygheap_ugid_cache member "ugid_cache".
+ * pwdgrp.h (class ugid_cache_t): Remove here.
+ * fhandler_disk_file.cc (fhandler_base::fstat_by_nfs_ea): Accommodate
+ move of ugid_cache to cygheap.
+ * sec_helper.cc (get_sids_info): Ditto.
+ * uinfo.cc (ugid_cache): Remove.
+ (pwdgrp::fetch_account_from_windows): Define id_val globally.
+ Move SidTypeAlias handling into SidTypeUser/SidTypeGroup branch since
+ aliases are handled like groups in SAM. Accommodate move of ugid_cache
+ to cygheap. Consolidate code reading SAM comments into a single branch
+ for both, SidTypeUser and SidTypeAlias. For SidTypeAlias, fix thinko
+ and call NetLocalGroupGetInfo rather than NetGroupGetInfo. Simplify
+ code setting Cygwin primary group for SAM accounts. Add code to handle
+ UNIX uid/gid from SAM comment.
+
+2014-02-11 Christopher Faylor <me.cygwin2014@cgf.cx>
+
+ * winsup.h (Interlocked*): Use intrinsic versions of Interlocked
+ functions.
+
+ * cygwin.sc.in: More closely emulate default pe/i386 linker script.
+
+2014-02-10 Corinna Vinschen <corinna@vinschen.de>
+
+ * uinfo.cc (cygheap_domain_info::init): Drop accidentally leftover if
+ statement.
+
+2014-02-10 Corinna Vinschen <corinna@vinschen.de>
+
+ * uinfo.cc (cygheap_domain_info::init): Fix handling of account domain
+ on donmain controllers. Explain why.
+
+2014-02-10 Corinna Vinschen <corinna@vinschen.de>
+
+ * cygheap.cc (cwcsdup): Change parameter to correct PWCSTR.
+ (cwcsdup1): Ditto.
+ * cygheap_malloc.h: Change declarations accordingly.
+
+2014-02-10 Corinna Vinschen <corinna@vinschen.de>
+
+ * uinfo.cc (pwdgrp::fetch_account_from_windows): Add code to allow
+ setting the primary group from the SAM comment field.
+
+2014-02-10 Corinna Vinschen <corinna@vinschen.de>
+
+ * dcrt0.cc (child_info_spawn::handle_spawn): Call fixup_lockf_after_exec
+ with additional argument to specify if the process has been execed
+ or spawned.
+ * flock.cc (fixup_lockf_after_exec): Take bool parameter to handle
+ exec and spawn differently. In case of spawn, just give up POSIX
+ locks in favor of the still running parent. Add comments to explain.
+
+2014-02-09 Christopher Faylor <me.cygwin2014@cgf.cx>
+
+ * environ.cc (strbrk): Properly deal with environment variable sans
+ quote.
+
+2014-02-09 Christopher Faylor <me.cygwin2014@cgf.cx>
+
+ * environ.cc (strbrk): New function.
+ (parse_options): Use strbrk to parse CYGWIN environment variable.
+
+2014-02-09 Corinna Vinschen <corinna@vinschen.de>
+
+ Introduce reading passwd/group entries from SAM/AD. Introduce
+ /etc/nsswitch.conf file to configure it.
+ * Makefile.in (DLL_OFILES): Add ldap.o.
+ * autoload.cc: Import ldap functions from wldap32.dll.
+ (DsEnumerateDomainTrustsW): Import.
+ (NetGroupGetInfo): Import.
+ * cygheap.h (class cygheap_domain_info): New class to keep global
+ domain info.
+ (class cygheap_pwdgrp): New class to keep passwd/group caches and
+ configuration info from /etc/nssswitch.conf.
+ (struct init_cygheap): Add cygheap_domain_info member "dom" and
+ cygheap_pwdgrp member "pg".
+ * cygtls.h (struct _local_storage): Remove unused member "res".
+ Rearrange slightly, Add members pwbuf and grbuf to implement non-caching
+ passwd/group fetching from SAM/AD. Make pw_pos and pw_pos unsigned.
+ * fhandler_disk_file.cc (fhandler_base::fstat_by_nfs_ea): Add RFC 2307
+ uid/gid mapping.
+ * fhandler_process.cc: Drop including pwdgrp.h.
+ * fhandler_procsysvipc.cc: Ditto.
+ * fhandler_registry.cc (fhandler_registry::fstat): Set key uid/gid
+ to ILLEGAL_UID/ILLEGAL_GID rather than UNKNOWN_UID/UNKNOWN_GID.
+ * grp.cc (group_buf): Drop.
+ (gr): Drop.
+ (pwdgrp::parse_group): Fill pg_grp.
+ (pwdgrp::read_group): Remove.
+ (pwdgrp::init_grp): New method.
+ (pwdgrp::prep_tls_grbuf): New method.
+ (pwdgrp::find_group): New methods.
+ (internal_getgrsid): Convert to call new pwdgrp methods.
+ (internal_getgrnam): Ditto.
+ (internal_getgrgid): Ditto.
+ (getgrgid_r): Drop 2nd parameter from internal_getgrgid call.
+ (getgrgid32): Ditto.
+ (getgrnam_r): Ditto for internal_getgrnam.
+ (getgrnam32): Ditto.
+ (getgrent32): Convert to call new pwdgrp methods.
+ (internal_getgrent): Remove.
+ (internal_getgroups): Simplify, especially drop calls to
+ internal_getgrent.
+ * ldap.cc: New file implementing cyg_ldap class for LDAP access to AD
+ and RFC 2307 server.
+ * ldap.h: New header, declaring cyg_ldap class.
+ * passwd.cc (passwd_buf): Drop.
+ (pr): Drop.
+ (pwdgrp::parse_passwd): Fill pg_pwd.
+ (pwdgrp::read_passwd): Remove.
+ (pwdgrp::init_pwd): New method.
+ (pwdgrp::prep_tls_pwbuf): New method.
+ (find_user): New methods.
+ (internal_getpwsid): Convert to call new pwdgrp methods.
+ (internal_getpwnam): Ditto.
+ (internal_getpwuid): Ditto.
+ (getpwuid32): Drop 2nd parameter from internal_getpwuid call.
+ (getpwuid_r): Ditto.
+ (getpwnam): Ditto for internal_getpwnam.
+ (getpwnam_r): Ditto.
+ (getpwent): Convert to call new pwdgrp methods.
+ * path.cc (class etc): Remove all methods.
+ * path.h (class etc): Drop.
+ * pinfo.cc (pinfo_basic::pinfo_basic): Set gid to ILLEGAL_GID rather
+ than UNKNOWN_GID.
+ (pinfo_init): Ditto.
+ * pwdgrp.h (internal_getpwnam): Drop 2nd parameter from declaration.
+ (internal_getpwuid): Ditto.
+ (internal_getgrgid): Ditto.
+ (internal_getgrnam): Ditto.
+ (internal_getgrent): Drop declaration.
+ (enum fetch_user_arg_type_t): New type.
+ (struct fetch_user_arg_t): New type.
+ (struct pg_pwd): New type.
+ (struct pg_grp): New type.
+ (class pwdgrp): Rework to provide functions for file and db requests
+ and caching.
+ (class ugid_cache_t): New class to provide RFC 2307 uid map caching.
+ (ugid_cache): Declare.
+ * sec_acl.cc: Drop including pwdgrp.h.
+ * sec_auth.cc: Drop including dsgetdc.h and pwdgrp.h.
+ (get_logon_server): Convert third parameter to ULONG flags argument
+ to allow arbitrary flags values in DsGetDcNameW call and change calls
+ to this function throughout. Use cached account domain name rather
+ than calling GetComputerNameW.
+ (get_unix_group_sidlist): Remove.
+ (get_server_groups): Drop call to get_unix_group_sidlist.
+ (verify_token): Rework token group check without calling
+ internal_getgrent.
+ * sec_helper.cc (cygpsid::pstring): New methods, like string() but
+ return pointer to end of string.
+ (cygsid::getfromstr): Add wide character implementation.
+ (get_sids_info): Add RFC 2307 uid/gid mapping for Samba shares.
+ * security.cc: Drop including pwdgrp.h.
+ * security.h (DEFAULT_UID): Remove.
+ (UNKNOWN_UID): Remove.
+ (UNKNOWN_GID): Remove.
+ (uinfo_init): Move here from winsup.h.
+ (ILLEGAL_UID): Ditto.
+ (ILLEGAL_GID): Ditto.
+ (UNIX_POSIX_OFFSET): Define. Add lengthy comment.
+ (UNIX_POSIX_MASK): Ditto.
+ (MAP_UNIX_TO_CYGWIN_ID): Ditto.
+ (ILLEGAL_UID16): Move here from winsup.h.
+ (ILLEGAL_GID16): Ditto.
+ (uid16touid32): Ditto.
+ (gid16togid32): Ditto.
+ (sid_id_auth): New convenience macro for SID component access.
+ (sid_sub_auth_count): Ditto.
+ (sid_sub_auth): Ditto.
+ (sid_sub_auth_rid): Ditto.
+ (cygpsid::pstring): Declare.
+ (cygsid::getfromstr): Declare wide character variant.
+ (cygsid::operator=): Ditto.
+ (cygsid::operator*=): Ditto.
+ (get_logon_server): Change declaration according to source code.
+ * setlsapwd.cc (setlsapwd): Drop 2nd parameter from internal_getpwnam
+ call.
+ * shared.cc (memory_init): Call cygheap->pg.init in first process.
+ * syscalls.cc: Drop including pwdgrp.h.
+ * tlsoffsets.h: Regenerate.
+ * tlsoffsets64.h: Ditto.
+ * uinfo.cc (internal_getlogin): Drop gratuitious internal_getpwuid
+ call. Fix debug output. Overwrite user gid in border case of a
+ missing passwd file while a group file exists.
+ (pwdgrp::add_line): Allocate memory on cygheap.
+ (pwdgrp::load): Remove.
+ (ugid_cache): Define.
+ (cygheap_pwdgrp::init): New method.
+ (cygheap_pwdgrp::nss_init_line): New method.
+ (cygheap_pwdgrp::_nss_init): New method.
+ (cygheap_domain_info::init): New method.
+ (logon_sid): Define.
+ (get_logon_sid): New function.
+ (pwdgrp::add_account_post_fetch): New method.
+ (pwdgrp::add_account_from_file): New methods.
+ (pwdgrp::add_account_from_windows): New methods.
+ (pwdgrp::check_file): New method.
+ (pwdgrp::fetch_account_from_line): New method.
+ (pwdgrp::fetch_account_from_file): New method.
+ (pwdgrp::fetch_account_from_windows): New method.
+ * winsup.h: Move aforementioned macros and declarations to security.h.
+
+2014-02-09 Christopher Faylor <me.cygwin2014@cgf.cx>
+
+ * sigproc.cc (sig_send): Don't bother with an error message if we are
+ exiting.
+
+2014-02-08 Corinna Vinschen <corinna@vinschen.de>
+
+ * miscfuncs.h (class NT_readline): New class to implement line-wise
+ reading from file using native NT functions.
+ * miscfuncs.cc (NT_readline::init): New method.
+ (NT_readline::fgets): New method.
+ * mount.cc (mount_info::from_fstab): Utilize NT_readline to read
+ fstab files.
+
+2014-02-06 Corinna Vinschen <corinna@vinschen.de>
+
+ * fhandler_disk_file.cc (fhandler_disk_file::fchown): Fix typo in
+ comment.
+ * mount.cc (mount_info::from_fstab): Use tmp_pathbuf rather than
+ stack for big local buffer.
+ * net.cc (cygwin_gethostname): Call GetComputerNameExA rather than
+ GetComputerNameA if gethostname failed.
+ * shared.cc (user_info::initialize): Fix formatting.
+
+2014-02-06 Corinna Vinschen <corinna@vinschen.de>
+
+ * include/sys/file.h: Define flock and accompanying macros if not
+ already defined in sys/_default_fcntl.h.
+
+2014-02-04 Corinna Vinschen <corinna@vinschen.de>
+
+ * include/cygwin/version.h (CYGWIN_VERSION_DLL_MINOR): Bump to 29.
+
+2014-01-30 Corinna Vinschen <corinna@vinschen.de>
+
+ * dir.cc (opendir): Call set_unique_id only with valid fh.
+
+2014-01-30 Christopher Faylor <me.cygwin2014@cgf.cx>
+
+ * fhandler.h (cltype): Add cl_buf_beg, cl_buf_end.
+ * fhandler_console.cc (dev_console::console_attrs::set_cl_x): Honor
+ buffer locations.
+ (dev_console::console_attrs::set_cl_y): Ditto.
+ (fhandler_console::write): On reset, use absolute positioning to go to
+ beginning of buffer. Clear entire buffer.
+
+2014-01-27 Christopher Faylor <me.cygwin2014@cgf.cx>
+
+ * gendef (_setjmp (x86)): Save FPU control word location in sequential
+ location. Adjust sigstack save accordingly.
+ (_longjmp (x86)): Ditto for restore.
+
+2014-01-27 Corinna Vinschen <corinna@vinschen.de>
+
+ * gendef (sigdelayed (x86_64)): Save and restore FPU control word.
+ (_sigdelayed (x86)): Ditto. Save and restore XMM registers. Add
+ comment.
+ (_setjmp (x86)): Save FPU control word, following FreeBSD here.
+ (_longjmp (x86)): Restore FPU control word.
+
+2014-01-24 Christopher Faylor <me.cygwin2014@cgf.cx>
+
+ * winf.cc (linebuf::fromargv): Treat '=' as a special character.
+
+2014-01-23 Corinna Vinschen <corinna@vinschen.de>
+
+ * security.h (open_local_policy): Remove declaration.
+ (lsa_open_policy): Declare.
+ (lsa_close_policy): Declare.
+ * sec_auth.cc (lsa_open_policy): Rename from open_local_policy. Take
+ server name as parameter. Return NULL in case of error, rather than
+ INVALID_HANDLE_VALUE.
+ (lsa_close_policy): Rename from close_local_policy. Make externally
+ available. Get handle by value.
+ (create_token): Convert call to open_local_policy/close_local_policy
+ according to aforementioned changes.
+ (lsaauth): Ditto.
+ (lsaprivkeyauth): Ditto.
+ * setlsapwd.cc (setlsapwd): Ditto.
+
+2014-01-22 Corinna Vinschen <corinna@vinschen.de>
+
+ * path.cc (etc::test_file_change): In case of NtQueryFullAttributesFile
+ returning an error, only return true if file actually exists.
+
+2014-01-20 Corinna Vinschen <corinna@vinschen.de>
+
+ * include/cygwin/in6.h (struct ipv6_rt_hdr): Define.
+ * include/cygwin/socket.h: Fix formatting.
+ (IP_UNICAST_IF): Define.
+ (IPV6_JOIN_GROUP): Remove Windowism.
+ (IPV6_LEAVE_GROUP): Ditto.
+ (IPV6_UNICAST_IF): Define.
+ (IPV6_TCLASS): Ditto.
+ (IPV6_RECVTCLASS): Ditto.
+
+2014-01-18 Corinna Vinschen <corinna@vinschen.de>
+
+ * include/netinet/ip6.h: New file, copied from FreeBSD vebatim.
+
+2014-01-17 Christopher Faylor <me.cygwin2014@cgf.cx>
+
+ * dtable.h (dtable::lock): Revert static.
+ (dtable::unlock): Ditto.
+
+2014-01-17 Corinna Vinschen <corinna@vinschen.de>
+
+ * passwd.cc (setpassent): Align to BSD definition.
+
+2014-01-17 Corinna Vinschen <corinna@vinschen.de>
+
+ * syscalls.cc (popen): Introduce Glibc 'e' flag to allow thread-safe
+ opening of the pipe with O_CLOEXEC flag. Simplify FD_CLOEXEC handling.
+
+2014-01-17 Corinna Vinschen <corinna@vinschen.de>
+
+ * include/sys/file.h (LOCK_SH): Drop definition in favor of new
+ definitions in newlib.
+ (LOCK_EX): Ditto.
+ (LOCK_NB): Ditto.
+ (LOCK_UN): Ditto.
+ (flock): Ditto.
+ (F_OK): Drop. Already correctly defined in unistd.h.
+ (X_OK): Ditto.
+ (W_OK): Ditto.
+ (R_OK): Ditto.
+
+2014-01-17 Corinna Vinschen <corinna@vinschen.de>
+
+ * include/cygwin/config.h (_STDIO_BSD_SEMANTICS): Define as 1.
+
+2014-01-16 Christopher Faylor <me.cygwin2014@cgf.cx>
+
+ * dtable.h (dtable::lock): Make static.
+ (dtable::unlock): Ditto.
+
+2014-01-08 Christopher Faylor <me.cygwin2014@cgf.cx>
+
+ * exception.h (cygwin_exception::open_stackdumpfile): Move old
+ function into class.
+ (cygwin_exception::h): New member.
+ (cygwin_exception::cygwin_exception): Initialize h to NULL.
+ * exceptions.cc (cygwin_exception::open_stackdumpfile): Move into
+ cygwin_exception class. Use 'h' class member.
+ (cygwin_exception::dumpstack): Close stack dump file handle if opened.
+
+2014-01-04 Christopher Faylor <me.cygwin2014@cgf.cx>
+
+ * fhandler.h (cltype): New enum.
+ (dev_console::console_attrs): Define struct name.
+ (dev_console::console_attrs::set_cl_x): New function.
+ (dev_console::console_attrs::set_cl_y): New function.
+ (fhandler_console::clear_screen): Redefine input params.
+ * fhandler_console.cc: Throughout, reflect change in arguments to
+ fhandler_console::clear_screeen.
+ (fhandler_console::mouse_aware): Simplify logic slightly.
+ (fhandler_console::scroll_screen): Remove hopefully obsolete win95
+ code.
+ (dev_console::console_attrs::set_cl_x): New function.
+ (dev_console::console_attrs::set_cl_y): New function.
+ (fhandler_console::clear_screen): Redefine input params. Calculate
+ position based on enum value.
+ (region_split): Change arguments. Simplify.
+ (ReadConsoleOutputWrapper): Remove coord argument since we now always
+ use 0, 0. Send extra arguments to region_split.
diff --git a/winsup/CVSChangeLogs.old/cygwin/ChangeLog-2015 b/winsup/CVSChangeLogs.old/cygwin/ChangeLog-2015
new file mode 100644
index 000000000..546df2489
--- /dev/null
+++ b/winsup/CVSChangeLogs.old/cygwin/ChangeLog-2015
@@ -0,0 +1,2260 @@
+2015-12-25 Corinna Vinschen <corinna@vinschen.de>
+
+ * fhandler_disk_file.cc (fhandler_disk_file::fchmod): Only request
+ query_write_dac rather than query_write_control access when writing
+ an ACL. Fix a comment.
+
+2015-12-24 Corinna Vinschen <corinna@vinschen.de>
+
+ * sec_acl.cc (__aclcalcmask): New function to recalculate ACL masks.
+ (aclsort32): Honor calclass argument.
+
+2015-12-24 Corinna Vinschen <corinna@vinschen.de>
+
+ * sec_acl.cc (aclfromtext32): Return missing aclcnt parameter.
+
+2015-12-24 Corinna Vinschen <corinna@vinschen.de>
+
+ * sec_acl.cc (acltotext32): Use tmp_pathbuf rather than stack buffer.
+ (aclfromtext32): Ditto.
+
+2015-12-24 Corinna Vinschen <corinna@vinschen.de>
+
+ * sec_acl.cc: Cosmetic changes.
+
+2015-12-18 Corinna Vinschen <corinna@vinschen.de>
+
+ * strfuncs.cc (sys_cp_wcstombs): Delete and move functionality into
+ sys_wcstombs.
+ * wchar.h (sys_cp_wcstombs): Drop declaration.
+ * fhandler_console.cc (dev_console::con_to_str): Call sys_wcstombs.
+
+2015-12-16 Corinna Vinschen <corinna@vinschen.de>
+
+ * grp.cc (pwdgrp::parse_group): Only copy the SID if it's valid.
+ * passwd.cc (pwdgrp::parse_passwd): Ditto.
+
+2015-12-14 Sebastian Huber <sebastian.huber@embedded-brains.de>
+
+ * include/cygwin/signal.h (sigset_t): Move defintition to newlib.
+
+2015-12-11 Ken Brown <kbrown@cornell.edu>
+
+ * fhandler_disk_file.cc (fhandler_base::fstat_helper): Align
+ regparm attribute to declaration in fhandler.h.
+
+2015-12-10 Corinna Vinschen <corinna@vinschen.de>
+
+ * path.h (class path_conv_handle): Use FILE_ALL_INFORMATION instead of
+ FILE_NETWORK_OPEN_INFORMATION. Use definitions from ntdll.h since it's
+ included anyway.
+ (path_conv_handle::fai): Change name from fnoi.
+ (path_conv::fai): Ditto.
+ (file_get_fai): Change name from file_get_fnoi. Drop second parameter.
+ * path.cc (file_get_fai): Ditto. Fetch FileAllInformation rather than
+ FileNetworkOpenInformation. Convert STATUS_BUFFER_OVERFLOW to
+ STATUS_SUCCESS. Remove workaround to fetch FileBasicInformation and
+ FileStandardInformation on filesystems with broken
+ FileNetworkOpenInformation handling.
+ (symlink_info::check): Accommodate above changes. In case of using
+ the NtQueryDirectoryFile fallback, fetch FileIdBothDirectoryInformation
+ to get inode number as well.
+ * fhandler_disk_file.cc (fhandler_base::fstat_by_handle): Drop outdated
+ comment. Accommodate change to using FileAllInformation. Drop
+ extra function calls to fetch NumberOfLinks and IndexNumber. Set ino
+ directly from IndexNumber stored in pc.fai(). Drop second argument
+ from call to fstat_helper.
+ (fhandler_base::fstat_by_name): Drop second argument from call to
+ fstat_helper.
+ (fhandler_base::fstat_helper): Drop second parameter. Accommodate
+ the fact that we access a FILE_ALL_INFORMATION structure now.
+ (fhandler_base::open_fs): Set ino directly from IndexNumber stored in
+ pc.fai().
+ * fhandler.h (fhandler_base::fstat_helper): Fix declaration accrdingly.
+
+2015-12-10 Corinna Vinschen <corinna@vinschen.de>
+
+ * fhandler_disk_file.cc (path_conv::ndisk_links): Drop unused method.
+ (fhandler_base::fstat_helper): Drop unused call to ndisk_links.
+
+2015-12-10 Corinna Vinschen <corinna@vinschen.de>
+
+ * fhandler_disk_file.cc (path_conv::get_ino_by_handle): Rename fai to
+ fii for clearness.
+ (fhandler_disk_file::readdir): Ditto.
+
+2015-12-09 Corinna Vinschen <corinna@vinschen.de>
+
+ * ntdll.h (FILE_ID_BOTH_DIR_INFORMATION): Revert IndexNumber to FileId
+ since it's actually right here.
+ * fhandler_disk_file.cc: Accommodate above change.
+
+2015-12-08 Corinna Vinschen <corinna@vinschen.de>
+
+ * thread.cc (pthread::setcancelstate): Remove unnecessary locking.
+ (pthread::setcanceltype): Ditto.
+
+2015-12-08 Corinna Vinschen <corinna@vinschen.de>
+
+ * ntdll.h (FILE_ID_BOTH_DIR_INFORMATION): Rename FileId to IndexNumber
+ to align with Microsoft naming scheme.
+ (FILE_INTERNAL_INFORMATION): Ditto.
+ * fhandler_disk_file.cc: Rename FileId to IndexNumber throughout.
+ * syscalls.cc: Ditto.
+
+2015-12-07 Johannes Schindelin <johannes.schindelin@gmx.de>
+
+ * mount.cc (mount_info::from_fstab_line): Support mounting the current
+ user's temp folder as /tmp/. This is particularly useful a feature
+ when Cygwin's own files are write-protected.
+
+2015-12-07 Corinna Vinschen <corinna@vinschen.de>
+
+ * include/sys/select.h: Move select(2) macros from newlib's sys/types.h
+ here. Rename howmany to _howmany to unclutter namespace. Move file to
+ newlib.
+ * libc/rexex.cc: Add declaration for cygwin_gethostname.
+ * poll.cc: Include sys/param.h and locale select.h.
+ * select.h (cygwin_select): Declare.
+ * uname.cc: Declare cygwin_gethostname.
+ * winsup.h: Drop declarations of cygwin_select and cygwin_gethostname.
+
+2015-12-07 Corinna Vinschen <corinna@vinschen.de>
+
+ * dcrt0.cc: Semi-revert commit 12743c2d5d2721f3a80b4d7671a349be03c1f520.
+ (dll_crt0_0): Drop setting wow64_needs_stack_adjustment on 64 bit.
+ (_dll_crt0): Split out 64 bit code again and always create new main
+ thread stack, unless forked off from the non main thread in the parent.
+ Call create_new_main_thread_stack with parent stack commitsize if
+ started from the parent's main thread.
+ Only call child_info_fork::alloc_stack for the latter case on 64 bit.
+ Slightly rearrange moving rsp and rbp to new stack and document how.
+ Revert 32 bit wow64 handling to its former self.
+ * miscfunc.cc (create_new_main_thread_stack): Take a commitsize
+ parameter and use it if it's not 0. Don't set _main_tls here, it's
+ done in the caller _dll_crt0 anyway. Return stackbase - 16 bytes,
+ rather than stacklimit (which was very wrong anyway).
+ * miscfuncs.h (create_new_main_thread_stack): Accommodate declaration
+ to aforementioned change.
+ * wincap.h (wincaps::has_3264_stack_broken): Remove element.
+ * wincap.cc: Ditto, throughout.
+ * wow64.cc: Semi-revert to pre-12743c2d5d2721f3a80b4d7671a349be03c1f520
+ but keep architecture-agnostic type changes intact. Fix formatting.
+ * wow64.h: Revert to pre-12743c2d5d2721f3a80b4d7671a349be03c1f520.
+
+2015-12-06 Corinna Vinschen <corinna@vinschen.de>
+
+ * include/sys/cygwin.h (CCP_PROC_CYGDRIVE): New flag.
+ * mount.cc (mount_info::cygdrive_posix_path): Take flag values rather
+ than just a trailing_slash_p bool. Emit /proc/cygdrive path if
+ CCP_PROC_CYGDRIVE flag is given.
+ (mount_info::conv_to_posix_path): Take flag values rather than just
+ a keep_rel_p bool. Rename _p variables. Print flag value as hex in
+ debug_printf. Call cygdrive_posix_path with flag values.
+ * mount.h (mount_info::cygdrive_posix_path): Accommodate above change
+ in declaration.
+ (mount_info::conv_to_posix_path): Ditto.
+ * fhandler_process.cc (format_process_exename): Accommodate change to
+ mount_info::conv_to_posix_path.
+ * path.cc (cygwin_conv_path): Ditto.
+
+2015-12-03 Corinna Vinschen <corinna@vinschen.de>
+
+ * dcrt0.cc (dll_crt0_0): On 64 bit, set wow64_needs_stack_adjustment
+ if not started from a 64 bit process.
+ (_dll_crt0): Enable wow64_needs_stack_adjustment branch on 64 bit
+ as well. Remove 64 bit only code. Introduce CREATE_STACK and
+ FIX_STACK macros to conditionalize the code. Rearrange and
+ partially rewrite comments.
+ * wincap.h (wincaps::has_3264_stack_broken): New element.
+ * wincap.cc: Implement above element throughout.
+ (wincapc::init): Set has_3264_stack_broken to false on 32 bit.
+ * wow64.cc: Enable functionality on 64 bit architecture, except for
+ wow64_revert_to_original_stack. Enhance comments to explain.
+ (wow64_eval_expected_main_stack): Make 64 bit clean.
+ (wow64_test_for_64bit_parent): Ditto.
+ * wow64.h: Export wow64_revert_to_original_stack on 32 bit only,
+ everything else on all architectures.
+
+2015-12-03 Corinna Vinschen <corinna@vinschen.de>
+
+ * fhandler_process.cc (thread_info::thread_info): Accommodate the fact
+ that TEBs take two pages.
+ (thread_info::fill_if_match): Rewrite the method for post W10 1511 TEB
+ detection.
+ (format_process_maps): Add a state member to region. Fix the code
+ to handle PEB/TEB region since W10 1511.
+
+2015-12-03 Corinna Vinschen <corinna@vinschen.de>
+
+ * fhandler_process.cc (heap_info::fill_if_match): Return NULL, not 0.
+ (thread_info::fill_if_match): Ditto.
+ (thread_info::fill_if_match): New method to extract TEB info from
+ PEB/TEB region since W10 1511.
+ (format_process_maps): Drop outdated FIXME comment. Add code to handle
+ PEB/TEB region since W10 1511.
+ * mmap.cc (posix_madvise): Align comment to new W10 1511 version.
+ * wincap.h (wincaps::has_new_pebteb_region): New element.
+ * wincap.cc: Implement above element throughout.
+ (wincap_10_1511): New global wincaps to support Windows 10 since 1511.
+ (wincapc::init): Use wincap_10_1511 for W10 builds >= 10586.
+
+2015-12-03 Corinna Vinschen <corinna@vinschen.de>
+
+ x86_64 only:
+ * dcrt0.cc (_dll_crt0): Always move stack to pthread stack area.
+ Explain why.
+ * miscfuncs.cc (create_new_main_thread_stack): New function to create
+ OS-like stack for main thread in pthread stack area.
+ * miscfuncs.cc (create_new_main_thread_stack): Declare.
+
+2015-12-03 Corinna Vinschen <corinna@vinschen.de>
+
+ * dcrt0.cc (child_info_fork::alloc_stack): Fix formatting.
+ * fork.cc (frok::parent): Fix formatting.
+ (child_copy): Change type of res to BOOL.
+
+2015-12-03 Corinna Vinschen <corinna@vinschen.de>
+
+ * crt0.cc (dll_crt0_1): Always restore the TEB stack info. Especially
+ restore DeallocationStack. Fix comment.
+
+2015-12-03 Corinna Vinschen <corinna@vinschen.de>
+
+ * dcrt0.cc (child_info_fork::alloc_stack): Don't set stackaddr to 0.
+
+2015-12-03 Corinna Vinschen <corinna@vinschen.de>
+
+ * child_info.h (struct child_info): Add member from_main.
+ * fork.cc (frok::child): Check from_main rather than stackaddr.
+ (frok::parent): Set ch.from_main if running in the main thread.
+
+2015-12-02 Corinna Vinschen <corinna@vinschen.de>
+
+ * child_info.h (CURR_CHILD_INFO_MAGIC): Align to below change.
+ (class child_info_fork): Rename stacktop to stacklimit. Rename
+ stackbottom to stackbase. Accommodate name change throughout Cygwin.
+ Rephrase comments to be clearer.
+
+2015-12-02 Corinna Vinschen <corinna@vinschen.de>
+
+ * cygtls.h (_tlsbase): Remove. Replace throughout with
+ NtCurrentTeb()->Tib.StackBase.
+ (_tlstop): Remove. Replace throughout with
+ NtCurrentTeb()->Tib.StackLimit.
+ * dcrt0.cc (child_info_fork::alloc_stack): Move definition of local
+ teb variable up to be used throughout.
+ * include/cygwin/config.h (__getreent): Use inline function on both
+ architectures.
+
+2015-11-29 Corinna Vinschen <corinna@vinschen.de>
+
+ * uinfo.cc (pwdgrp::fetch_account_from_windows): Only create 1-5-32-x
+ SIDs from ids for x <= 999.
+
+2015-11-29 Corinna Vinschen <corinna@vinschen.de>
+
+ * sec_acl.cc (get_posix_access): In case owner SID == group SID, when
+ encountering the group entry, change the value of `id' accordingly.
+ Explain why.
+
+2015-11-28 Corinna Vinschen <corinna@vinschen.de>
+
+ * gendef (sigdelayed): Save and restore content of the MXCSR register
+ on x86_64.
+
+2015-11-27 Corinna Vinschen <corinna@vinschen.de>
+
+ * cygtls.h (_cygtls::wait_signal_arrived): Renamed from
+ set_signal_arrived.
+ (_cygtls::set_signal_arrived): New function signalling signal_arrived.
+ (_cygtls::reset_signal_arrived): Don't reset will_wait_for_signal.
+ (_cygtls::unwait_signal_arrived): New function only resetting
+ will_wait_for_signal.
+ (class wait_signal_arrived): Rename from set_signal_arrived.
+ Accommodate name change throughout Cygwin.
+ (wait_signal_arrived::~wait_signal_arrived): Call
+ _cygtls::unwait_signal_arrived. Add comment.
+ * cygserver_ipc.h (ipc_set_proc_info): Fetch signal_arrived handle
+ via call to _cygtls::get_signal_arrived.
+ * exceptions.cc (_cygtls::interrupt_setup): Signal signal_arrived via
+ call to _cygtls::set_signal_arrived.
+ (_cygtls::handle_SIGCONT): Ditto.
+ * fhandler_socket.cc (fhandler_socket::wait_for_events): Generate
+ WSAEVENT array prior to entering wait loop. Add cancel event object
+ if available. Remove calls to pthread_testcancel and just call
+ pthread::static_cancel_self if the cancel event object is signalled.
+
+2015-11-26 Corinna Vinschen <corinna@vinschen.de>
+
+ * path.cc (symlink_native): Fix index when looking for colon in path.
+
+2015-11-21 Corinna Vinschen <corinna@vinschen.de>
+
+ * nlsfuncs.cc (setlocaleinfo): New macro calling __setlocaleinfo.
+ (__setlocaleinfo): New function to set a locale-specific character
+ to an explicit wchar_t value.
+ (__set_lc_numeric_from_win): Handle fa_IR and ps_AF locales to return
+ same decimal point and thousands separator characters as on Linux.
+ (__set_lc_monetary_from_win): Ditto for monetary characters.
+
+2015-11-20 Corinna Vinschen <corinna@vinschen.de>
+
+ * common.din (strtold): Drop redirection to _strtold.
+
+2015-11-18 Corinna Vinschen <corinna@vinschen.de>
+
+ * sec_acl.cc (get_posix_access): Skip merging permissions if current
+ user has rwx permissions anywa, or if the sum of all group and other
+ permissions is less than or equal to the user's permissions.
+
+2015-11-18 Corinna Vinschen <corinna@vinschen.de>
+
+ * sec_acl.cc (get_posix_access): Fix computation of effective user
+ permissions to handle current user, not only the file owner.
+
+2015-11-18 Corinna Vinschen <corinna@vinschen.de>
+
+ * fhandler_tty.cc (fhandler_pty_slave::open): Add S_IFCHR flag
+ in call to create_object_sd_from_attribute.
+ (fhandler_pty_slave::fstat): Ditto in call to get_object_attribute.
+ (fhandler_pty_slave::fchmod): Add an orig_mode flag and ditto for
+ both calls.
+ (fhandler_pty_master::setup): Ditto in call to
+ create_object_sd_from_attribute.
+ * security.cc (get_object_attribute): Never add S_IFCHR to mode
+ here. Let the caller decide.
+ (create_object_sd_from_attribute): Ditto.
+
+2015-11-18 Corinna Vinschen <corinna@vinschen.de>
+
+ * security.h (authz_get_user_attribute): Declare bool.
+ * sec_helper.cc (authz_ctx::get_user_attribute): Make bool method.
+ Set S_IxOTH bits in returned attributes rather than S_IxUSR bits.
+ (authz_get_user_attribute): Make bool function.
+ * sec_acl.cc (get_posix_access): Introduce cygsid array to keep
+ track of all SIDs in the ACL. Move AuthZ calls into !new_style
+ permission post processing. When not using AuthZ, use
+ CheckTokenMembership to collect group permissions.
+
+2015-11-18 Corinna Vinschen <corinna@vinschen.de>
+
+ * fhandler_disk_file.cc (fhandler_disk_file::fchmod): Disable
+ deviation from POSIX 1003.1e in terms of GROUP_OBJ/CLASS_OBJ
+ permissions. Follow POSIX 1003.1e again. Keep old code in
+ for future reference.
+ * sec_acl.cc: Accommodate changes in ACE creation in leading
+ comment.
+ (set_posix_access): Fix user deny ACE creation. Split group
+ deny ACE creation into two steps, one to reflect CLASS_OBJ,
+ the other to reflect OTHER_OBJ.
+
+2015-11-18 Corinna Vinschen <corinna@vinschen.de>
+
+ * sec_acl.cc (getacl): Use Authz to fetch correct user permissions.
+
+2015-11-18 Corinna Vinschen <corinna@vinschen.de>
+
+ * autoload.cc (AuthzAccessCheck): Import.
+ (AuthzFreeContext): Import.
+ (AuthzInitializeContextFromSid): Import.
+ (AuthzInitializeContextFromToken): Import.
+ (AuthzInitializeResourceManager): Import.
+ * sec_helper.cc (get_sids_info): Remove.
+ (class authz_ctx_cache_entry): New class.
+ (class authz_ctx_cache): New class.
+ (class authz_ctx): New class.
+ (authz_get_user_attribute): New function.
+ * security.h (get_sids_info): Drop prototype.
+ (authz_get_user_attribute): Add prototype.
+ * winlean.h (_AUTHZ_): Define.
+
+2015-11-18 Corinna Vinschen <corinna@vinschen.de>
+
+ * sec_acl.cc (get_posix_access): Fix class_perm in !new_style case.
+
+2015-11-18 Corinna Vinschen <corinna@vinschen.de>
+
+ Reapply POSIX ACL changes.
+
+ * sec_acl.cc (get_posix_access): Check for Cygwin "standard" ACL.
+ Apply umask, if so. Align comments.
+ * security.cc (set_created_file_access): Fix permission masking by
+ incoming requested file mode.
+
+ * sec_acl.cc (set_posix_access): Apply mask only in terms of execute bit
+ for SYSTEM and Admins group.
+
+ * sec_acl.cc (set_posix_access): Don't create DENY ACEs for USER and
+ GROUP entries if they are the same as USER_OBJ or GROUP_OBJ.
+
+ * fhandler.h (fhandler_pty_slave::facl): Add prototype.
+ * fhandler_tty.cc (fhandler_pty_slave::facl): New method.
+ (fhandler_pty_slave::fchown): Fix uid/gid handling.
+ * sec_acl.cc (set_posix_access): Drop superfluous class_idx variable.
+ Simplify and move around code in a few places. To improve ACL
+ readability, add r/w permissions to Admins ACE appended to pty ACL.
+ Add comment to explain Windows ACE Mask filtering being in the way of
+ creating a real CLASS_OBJ.
+ (get_posix_access): Fake CLASS_OBJ for ptys. Explain why.
+ * security.cc (get_object_attribute): Add S_IFCHR flag to attributes
+ when calling get_posix_access.
+
+ * sec_acl.cc (set_posix_access): Move merging group perms into owner
+ perms in case of owner == group after mask has been computed. Take
+ mask into account when doing so to avoid unnecessary ACCESS_DENIED_ACE.
+
+ * sec_acl.cc (get_posix_access): Only set saw_group_obj flag if we saw
+ the ACCESS_ALLOWED_ACE.
+
+ * fhandler_disk_file.cc (fhandler_disk_file::fchmod): Deliberatly
+ set GROUP_OBJ and CLASS_OBJ perms to new group perms. Add comment
+ to explain why.
+ * security.cc (set_created_file_access): Ditto.
+
+ * sec_acl.cc (set_posix_access): Replace previous patch. Return
+ EINVAL if uid and/or guid is invalid and not backed by an actual
+ Windows account.
+
+ * sec_acl.cc (set_posix_access): Workaround owner/group SIDs being NULL.
+
+ * sec_acl.cc (set_posix_access): Handle files with owner == group.
+ Rephrase switch statement checking against unfiltered a_type value.
+ (get_posix_access): Handle files with owner == group.
+
+ * sec_acl.cc (get_posix_access): Don't use GROUP_OBJ access to fix up
+ CLASS_OBJ mask on old-style ACLs. Fix a comment.
+
+ * sec_acl.cc (set_posix_access): Always make sure Admins have
+ WRITE_DAC and WRITE_OWNER permissions.
+ * security.h (create_object_sd_from_attribute): Drop handle parameter
+ from prototype.
+ * security.cc (create_object_sd_from_attribute): Drop handle parameter.
+ Just create the standard POSIXy security descriptor.
+ (set_object_attribute): Accommodate dropped paramter in call to
+ create_object_sd_from_attribute.
+ * fhandler_tty.cc: Ditto, throughout.
+
+ * fhandler_disk_file.cc (fhandler_disk_file::fchmod): Fix typo in
+ mask computation.
+
+ * fhandler.cc (fhandler_base::open_with_arch): Call open with mode
+ not umasked.
+ (fhandler_base::open): Explicitely umask mode on NFS here. Call new
+ set_created_file_access rather than set_file_attribute.
+ * fhandler_disk_file.cc (fhandler_disk_file::fchmod): Reimplement
+ setting permissions on filesystems supporting ACLs using the new
+ set_posix_access call.
+ (fhandler_disk_file::fchown): Ditto.
+ (fhandler_disk_file::mkdir): Call new set_created_file_access rather
+ than set_file_attribute.
+ * fhandler_socket.cc (fhandler_socket::bind): Don't umask here. Add
+ WRITE_OWNER access to allow writing group in case of SGID bit set.
+ Call new set_created_file_access rather than set_file_attribute.
+ * path.cc (symlink_worker): Call new set_created_file_access rather
+ than set_file_attribute.
+ * sec_acl.cc (searchace): Un-staticize.
+ (set_posix_access): New, complementary functionality to
+ get_posix_access.
+ (setacl): Implement in terms of get_posix_access/set_posix_access.
+ (get_posix_access): Add handling for just created files requiring
+ their first Cygwin ACL. Fix new_style recognition. Handle SGID
+ bit. For old-style ACLs, ignore SYSTEM and Administrators when
+ computing the {DEF_}CLASS_OBJ perms.
+ * security.cc (get_file_sd): Revamp comment. Change and (hopefully)
+ speed up inheritance processing for just created files.
+ (alloc_sd): Remove.
+ (set_security_attribute): Call set_posix_access instead of alloc_sd.
+ (get_object_attribute): Fix return value.
+ (create_object_sd_from_attribute): Call set_posix_access instead of
+ alloc_sd.
+ (set_file_attribute): Remove.
+ (set_created_file_access): New function implemented in terms of
+ get_posix_access/set_posix_access.
+ * security.h (set_file_attribute): Remove prototype.
+ (set_created_file_access): Add prototype.
+ (searchace): Ditto.
+ (set_posix_access): Ditto.
+ * syscalls.cc (open): Call open_with_arch with mode not umasked.
+
+ * sec_acl.cc: Change preceeding comment explaining new-style ACLs.
+ Describe how to generate deny ACEs in more detail. Accommodate the
+ fact that a NULL deny ACE is used for {DEF_}CLASS_OBJ, rather than
+ a special Cygwin ACE. Improve further comments.
+ (CYG_ACE_NEW_STYLE): Define.
+ (get_posix_access): Change from Cygwin ACE to NULL deny ACE. Fix
+ CLASS_OBJ handling to generate CLASS_OBJ and DEF_CLASS_OBJ from a single
+ NULL deny ACE if the inheritance flags say so.
+ * sec_helper.cc (well_known_cygwin_sid): Remove.
+ * security.h (well_known_cygwin_sid): Drop declaration.
+
+ * sec_acl.cc (CYG_ACE_ISBITS_TO_WIN): Fix typo.
+ (get_posix_access): Rename index variable from i to idx. Define only
+ once at top level.
+
+ * security.cc (add_access_allowed_ace): Drop unused parameter "offset".
+ Accommodate throughout.
+ (add_access_denied_ace): Ditto.
+ * sec_acl.cc: Accommodate above change throughout.
+ * security.h (add_access_allowed_ace): Adjust prototype to above change.
+ (add_access_denied_ace): Ditto.
+
+ * sec_acl.cc (get_posix_access): Handle multiple ACEs for the
+ owner and primary group of the file. Handle the default primary
+ group ACE as DEF_GROUP_OBJ entry if the directory has the S_ISGID bit
+ set. Add comments. Minor code rearrangements.
+
+ Preliminary read side implementation of new permission handling.
+ * acl.h (MAX_ACL_ENTRIES): Raise to 2730. Add comment to explain.
+ * sec_acl.cc: Add leading comment to explain new ACL style.
+ Add definitions and macros to use for bits in new Cygwin ACL.
+ (DENY_RWX): New mask value for all temporary deny bits.
+ (getace): Add bool parameter to decide when leaving all bits intact,
+ rather than filtering them per the already set bits.
+ (get_posix_access): New function, taking over functionality to read
+ POSIX ACL from SECURITY_DESCRIPTOR.
+ (getacl): Just call get_posix_access.
+ * sec_helper.cc (well_known_cygwin_sid): Define.
+ * security.cc (get_attribute_from_acl): Remove.
+ (get_info_from_sd): Remove.
+ (get_reg_sd): Call get_posix_access instead of get_info_from_sd.
+ (get_file_attribute): Ditto.
+ (get_object_attribute): Ditto.
+ * security.h (well_known_cygwin_sid): Declare.
+ (get_posix_access): Add prototype.
+
+ * Throughout, use simpler ACE macros from Windows' accctrl.h.
+
+2015-11-18 Corinna Vinschen <corinna@vinschen.de>
+
+ * include/cygwin/version.h (CYGWIN_VERSION_DLL_MAJOR): Bump to 2004.
+ (CYGWIN_VERSION_API_MINOR): Reset to 0.
+
+2015-11-18 Corinna Vinschen <corinna@vinschen.de>
+
+ * collate.h (__collate_load_error): Convert to extern declaration.
+ * globals.cc (__collate_load_error): Define and initialize here.
+ * libc/fnmatch.c: Update to latest from FreeBSD.
+
+2015-11-18 Corinna Vinschen <corinna@vinschen.de>
+
+ * path.cc (symlink_native): Don't generate native symlink targeting
+ Cygwin special file. Inform the caller.
+ (symlink_worker): Don;t bail out in WSYM_nativestrict case if the
+ target is a Cygwin special file.
+
+2015-11-18 Corinna Vinschen <corinna@vinschen.de>
+
+ * lc_msg.h: Regenerate.
+
+2015-11-17 Yaakov Selkowitz <yselkowi@redhat.com>
+
+ * common.din (rpmatch): Export.
+ * include/cygwin/version.h (CYGWIN_VERSION_API_MINOR): Bump.
+
+2015-11-12 Corinna Vinschen <corinna@vinschen.de>
+
+ * flock.cc (lockf_t::create_lock_obj): Correctly recreate lock object
+ attributes anew in each loop.
+
+2015-11-12 Corinna Vinschen <corinna@vinschen.de>
+
+ * init.cc (munge_threadfunc): Don't call NtQueryInformationThread with
+ ThreadQuerySetWin32StartAddress info class on XP 64 and Server 2003 64.
+ It crashes.
+
+2015-11-09 Corinna Vinschen <corinna@vinschen.de>
+
+ * include/cygwin/version.h (CYGWIN_VERSION_DLL_MINOR): Bump to 1.
+
+2015-11-05 Corinna Vinschen <corinna@vinschen.de>
+
+ * mount.cc (fs_info::update): Fake a serial number on filesystems not
+ providing one.
+
+2015-11-05 Corinna Vinschen <corinna@vinschen.de>
+
+ * fcntl.cc (fcntl64): Don't lock fd table when performing locking.
+ * flock.cc (flock): Ditto.
+ (lockf): Ditto.
+
+2015-11-05 Corinna Vinschen <corinna@vinschen.de>
+
+ * sigproc.cc (pending_signals::clear): Yet another fix to fix the fix.
+ Actually iterate over the list of pending signals even if there's a
+ signal which doesn't have to be cleared. Other than that, revert loop
+ to it's former self as a while loop.
+
+2015-11-04 Corinna Vinschen <corinna@vinschen.de>
+
+ * globals.cc (ro_u_prlfs): Add trailing NUL. Explain why.
+ * mount.cc (fs_info::update): Add a comment to explain PrlSF.
+ * path.h (path_conv::fs_is_prlfs): Add for symmetry.
+
+2015-11-03 Corinna Vinschen <corinna@vinschen.de>
+
+ * sigproc.cc (pending_signals::clear): Fix previous fix resulting in
+ yet another endless loop.
+
+2015-11-02 Corinna Vinschen <corinna@vinschen.de>
+
+ * include/netinet/ip.h (MAX_IPOPTLEN): Define.
+
+2015-11-02 Corinna Vinschen <corinna@vinschen.de>
+
+ * sigproc.cc (class pending_signals): Drop sigproc_init friendship.
+ (pending_signals::clear): Fix implementation to avoid subsequent
+ endless loop in wait_sig. Improve comment.
+
+2015-11-02 Corinna Vinschen <corinna@vinschen.de>
+
+ * mount.h (enum fs_info_type): Add prlfs (Parallels Desktop FS).
+ (class fs_info): Add has_broken_fnoi flag. Implement prlfs FS flag.
+ * mount.cc (fs_info::update): Handle PrlFS. Fill new has_broken_fnoi
+ flag with life.
+ (fs_names): Add prlfs.
+ * globals.cc (ro_u_prlfs): Define.
+ * path.h (path_conv::has_broken_fnoi): New method.
+ * path.cc (symlink_info::check): Call file_get_fnoi utilizing new
+ has_broken_fnoi filesystem flag.
+ * fhandler_disk_file.cc (fhandler_base::fstat_by_handle): Ditto.
+
+2015-10-30 Corinna Vinschen <corinna@vinschen.de>
+
+ * nlsfuncs.cc (__get_lcid_from_locale): Handle LocaleNameToLCID
+ returning LOCALE_CUSTOM_UNSPECIFIED instead of failing in case of
+ an unsupported locale on Windows 10.
+
+2015-10-30 Corinna Vinschen <corinna@vinschen.de>
+
+ * exceptions.cc (sigpacket::process): Avoid potentially double unlocking
+ the TLS mutex.
+
+2015-10-30 Corinna Vinschen <corinna@vinschen.d>
+
+ * signal.cc (sigwait): Fix return value to reflect errno in case of
+ error according to POSIX. Never return EINTR.
+ * thread.cc (pthread_kill): Return errno if sig_send failed.
+
+2015-10-29 Qian Hong <qhong@codeweavers.com>
+
+ * init.cc (munge_threadfunc): Check that we're actually replacing
+ the correct original function address on the stack.
+ * ntdll.h (enum _THREADINFOCLASS): Add ThreadQuerySetWin32StartAddress.
+
+2015-08-21 Jon Turney <jon.turney@dronecode.org.uk>
+
+ * cygwin-cxx.h: Remove execute permissions.
+ * fenv.cc: Ditto.
+ * how-startup-shutdown-works.txt: Ditto.
+ * include/arpa/nameser.h: Ditto.
+ * include/arpa/nameser_compat.h: Ditto.
+ * include/fenv.h: Ditto.
+ * include/resolv.h: Ditto.
+ * libstdcxx_wrapper.cc: Ditto.
+
+2015-10-23 Corinna Vinschen <corinna@vinschen.de>
+
+ * cygtls.cc (_cygtls::remove): Call remove_pending_sigs.
+ * cygtls.h (_cygtls::remove_pending_sigs): Declare.
+ * sigproc.cc (pending_signals::clear): Define new method taking a
+ _cygtls pointer argument. Drop pending signals for that thread.
+ (_cygtls::remove_pending_sigs): Call pending_signals::clear for this
+ thread.
+
+2015-10-22 Corinna Vinschen <corinna@vinschen.de>
+
+ * common.din (aligned_alloc): Export.
+ (at_quick_exit): Export.
+ (quick_exit): Export.
+
+2015-10-22 Corinna Vinschen <corinna@vinschen.de>
+
+ * sec_helper.cc (cygsid::get_sid): Don't reject SIDs with missing
+ subauthorities.
+
+2015-10-22 Corinna Vinschen <corinna@vinschen.de>
+
+ * strfuncs.cc (sys_cp_wcstombs): Always return number of multibytes
+ without trailing NUL as the documentation implies. Throughout Cygwin,
+ fix usage to align to this pattern.
+ * fhandler_process.cc (format_process_winexename): Drop trailing NUL
+ and LF from output.
+
+2015-10-21 Corinna Vinschen <corinna@vinschen.de>
+
+ * thread.cc (pthread_getattr_np): Fix memory leak, remove usage of
+ malloc for small local buffer.
+
+2015-10-21 Corinna Vinschen <corinna@vinschen.de>
+
+ * path.cc (symlink_info::check_reparse_point): Don't generate an EIO
+ error if NtFsControlFile returns STATUS_NOT_A_REPARSE_POINT.
+
+2015-09-23 Evgeny Grin <k2k@yandex.ru>
+
+ * fhandler_socket.cc (fhandler_socket::wait_for_events): Fix compiler
+ warning in -O3 case.
+ (fhandler_socket::connect): Ditto.
+ * regex/regcomp.c (singleton): Ditto.
+
+2015-09-08 Corinna Vinschen <corinna@vinschen.de>
+
+ * flock.cc (lockf_t::create_lock_obj_attr): Add buffer parameter.
+ Call _everyone_sd with buffer argument from caller rather than
+ everyone_sd with locally allocated stack buffer.
+ (lockf_t::create_lock_obj): Call create_lock_obj_attr only once
+ outside the loop and with additional buffer argument.
+ (lockf_t::open_lock_obj): Call create_lock_obj_attr with additional
+ buffer argument.
+
+2015-08-29 Corinna Vinschen <corinna@vinschen.de>
+
+ * fhandler_proc.cc (format_proc_cpuinfo): Fetch cache information
+ from new cache functions in sysconf.cc, get_cpu_cache_intel and
+ get_cpu_cache_amd.
+ * sysconf.cc (__nt_query_system): New local helper.
+ (get_nproc_values): Utilize __nt_query_system on pre-Windows 7 systems.
+ Use GetLogicalProcessorInformationEx otherwise to handle more than
+ 64 CPUs. Only handle _SC_NPROCESSORS_CONF and _SC_NPROCESSORS_ONLN.
+ (get_phys_pages): New helper to handle _SC_PHYS_PAGES.
+ (cpuid2_cache_descriptor): New array to map Intel CPUID 2 descriptor
+ values to cache type, cache size, associativity and linesize.
+ (cpuid2_cache_desc_compar): Comparision function for bsearch over
+ cpuid2_cache_descriptor.
+ (get_cpu_cache_intel_cpuid2): New function to fetch cache info from
+ Intel CPUID 2.
+ (get_cpu_cache_intel_cpuid4): Ditto from Intel CPUID 4.
+ (get_cpu_cache_intel): New function as CPU-specific entry point.
+ (assoc): New array to map associativity values from AMD CPUID
+ 0x80000006.
+ (get_cpu_cache_amd): New function to fetch cache info from AMD CPUIDs
+ 0x80000005 and 0x80000006.
+ (get_cpu_cache): New function to fetch cache info.
+ (sca): Call get_phys_pages if _SC_PHYS_PAGES is requested. Call
+ get_cpu_cache for new _SC_* cache requests.
+ (SC_MAX): Set to _SC_LEVEL4_CACHE_LINESIZE.
+ (get_phys_pages(void)): Call get_phys_pages(int).
+ * include/cygwin/version.h (CYGWIN_VERSION_API_MINOR): Bump.
+
+2015-08-27 Corinna Vinschen <corinna@vinschen.de>
+
+ * autoload.cc (DiscardVirtualMemory): Import.
+ (PrefetchVirtualMemory): Import.
+ * mmap.cc (posix_madvise): Actually implement POSIX_MADV_WILLNEED
+ utilizing PrefetchVirtualMemory and POSIX_MADV_DONTNEED utilizing
+ DiscardVirtualMemory on systems supporting them.
+ * wincap.h (wincaps::has_broken_prefetchvm): New element.
+ * wincap.cc: Implement above element throughout.
+ (wincapc::init): Make sure has_broken_prefetchvm is only true on
+ W10 under WOW64.
+ * include/cygwin/version.h (CYGWIN_VERSION_DLL_MAJOR): Bump to 2003.
+ (CYGWIN_VERSION_API_MINOR): Reset to 0.
+
+2015-08-26 Corinna Vinschen <corinna@vinschen.de>
+
+ * fhandler_proc.cc (format_proc_cpuinfo): Only fetch group relations,
+ we don't need anything else.
+
+2015-08-25 Corinna Vinschen <corinna@vinschen.de>
+
+ * winsup.h (_WIN32_WINNT): Set to 0x0a00 for Windows 10.
+ (WINVER): Ditto. Remove outdated comment.
+
+2015-08-25 Corinna Vinschen <corinna@vinschen.de>
+
+ * autoload.cc (std_dll_init): Revert using full paths to system DLLs.
+
+2015-08-25 Corinna Vinschen <corinna@vinschen.de>
+
+ * autoload.cc (noload): i686 only: Save and restore $edx when calling
+ SetLastError to avoid clobbering return address stating with Windows 7.
+
+2015-08-25 Corinna Vinschen <corinna@vinschen.de>
+
+ * mmap.cc: Fix a few comments.
+
+2015-08-24 Corinna Vinschen <corinna@vinschen.de>
+
+ * ntdll.h (PROCESSINFOCLASS): Define ProcessDebugFlags.
+ * sigproc.cc (child_info::child_info): Only propagate _CI_STRACED to
+ child if strace is actually tracing child processes.
+
+2015-08-24 Corinna Vinschen <corinna@vinschen.de>
+
+ * include/cygwin/version.h (CYGWIN_VERSION_DLL_MINOR): Bump to 2.
+
+2015-08-18 Corinna Vinschen <corinna@vinschen.de>
+
+ * netdb.cc (parse_services_line): Convert port number to network byte
+ order.
+
+2015-08-18 Corinna Vinschen <corinna@vinschen.de>
+
+ * exceptions.cc: Drop including ucontext.h.
+
+2015-08-17 Corinna Vinschen <corinna@vinschen.de>
+
+ * grp.cc (internal_getgrfull): Drop asking caches. Explain why.
+ (internal_getgroups): In case we're not utilizing the Windows account
+ DBs, don't call LsaLookupSids but iterate over the group SIDs in the
+ token and call internal_getgrsid for each of them. Explain why.
+
+2015-08-17 Corinna Vinschen <corinna@vinschen.de>
+
+ * fhandler_disk_file.cc (fhandler_base::fstat_by_nfs_ea): Rearrange
+ to fall back to myself uid/gid in case we don't utilize Windows
+ account DBs, just as prior to 1.7.34.
+ * sec_helper.cc (cygpsid::get_id): Disable Samba user/group mapping per
+ RFC2307 if we're not utilizing Windows account DBs.
+ * security.cc (convert_samba_sd): Revert previous patch.
+
+2015-08-17 Corinna Vinschen <corinna@vinschen.de>
+
+ * fhandler_proc.cc (format_proc_cpuinfo): Handle AMDs providing
+ extended topology info in CPUID leaf 0x8000001e. Fix handling of
+ AMD CPUs providing extended legacy core info in CPUID leaf 0x80000008.
+
+2015-08-17 Orgad Shaneh <orgads@gmail.com>
+
+ * mkglobals_h: Handle CRLF earlier.
+
+2015-08-17 Corinna Vinschen <corinna@vinschen.de>
+
+ * fhandler_proc.cc (format_proc_cpuinfo): Print cpb and eff_freq_ro
+ power management flags.
+
+2015-08-15 Corinna Vinschen <corinna@vinschen.de>
+
+ * fhandler.cc (fhandler_base_overlapped::raw_write): When performing
+ nonblocking I/O, copy user space data into own buffer. Add longish
+ comment to explain why.
+ * fhandler.h (fhandler_base_overlapped::atomic_write_buf): New member.
+ (fhandler_base_overlapped::fhandler_base_overlapped): Initialize
+ atomic_write_buf.
+ (fhandler_base_overlapped::fhandler_base_overlapped): New destructor,
+ free'ing atomic_write_buf.
+ (fhandler_base_overlapped::copyto): Set atomic_write_buf to NULL in
+ copied fhandler.
+
+2015-08-14 Corinna Vinschen <corinna@vinschen.de>
+
+ * security.cc (convert_samba_sd): Fix copy/paste error in previous
+ patch.
+
+2015-08-14 Corinna Vinschen <corinna@vinschen.de>
+
+ * fhandler_disk_file.cc (fhandler_base::fstat_by_nfs_ea): Only try
+ to map user and group info per RFC2307 if account info is fetched
+ from Windows account DB.
+ * security.cc (convert_samba_sd): Ditto.
+
+2015-08-14 Corinna Vinschen <corinna@vinschen.de>
+
+ * security,cc (get_attribute_from_acl): Merge all group perms into
+ user perms if user is member of group.
+
+2015-08-13 Corinna Vinschen <corinna@vinschen.de>
+
+ * autoload.cc (GetLogicalProcessorInformationEx): Import.
+ (SetThreadGroupAffinity): Import.
+ * fhandler_proc.cc (add_size): New macro.
+ (get_msb): New inline function.
+ (mask_bits): Ditto.
+ (format_proc_cpuinfo): Drop handling of old CPUs. Check if we're
+ running on a OS version supporting porcessor groups. If so, use
+ SetThreadGroupAffinity to set thread affinity. Improve cache info
+ to include 3rd level cache on Intel CPUs. Improve multi core info.
+ * wincap.h (wincaps::has_processor_groups): New element.
+ * wincap.cc: Implement above element throughout.
+
+2015-08-10 Corinna Vinschen <corinna@vinschen.de>
+
+ * miscfuncs.cc: Fix comment preceeding x86_64 memset and friends.
+
+2015-08-10 Corinna Vinschen <corinna@vinschen.de>
+
+ * uinfo.cc (cygheap_user::ontherange): Revert previous patch.
+
+2015-08-03 Corinna Vinschen <corinna@vinschen.de>
+
+ * include/cygwin/version.h (CYGWIN_VERSION_DLL_MINOR): Bump to 1.
+
+2015-07-29 Corinna Vinschen <corinna@vinschen.de>
+
+ * miscfuncs.cc (memset): x86_64 only: Implement in assembler.
+ (memmove,memcpy): x86_64 only: Ditto.
+ (wmemmove,wmemcpy): x86_64 only: Ditto.
+
+2015-07-29 Corinna Vinschen <corinna@vinschen.de>
+
+ * cygtls.h: Include cygtls_padsize.h and define CYGTLS_PADSIZE there.
+ * cygtls_padsize.h: New file. Define CYGTLS_PADSIZE.
+ * environ.cc (parse_options): Fix NULL pointer access.
+ * init.cc (threadfunc_fe): Do not force stack align on x86_64.
+
+2015-07-23 Corinna Vinschen <corinna@vinschen.de>
+
+ * exceptions.cc (__cont_link_context): x86_64: align stack and reserve
+ shadow space for subsequent function calls, otherwise suffer potential
+ buffer overflow.
+
+2015-07-23 Corinna Vinschen <corinna@vinschen.de>
+
+ * uinfo.cc (cygheap_user::ontherange): Ignore $HOME if it's not
+ starting with a slash (aka, absolute POSIX Path).
+
+2015-07-21 Corinna Vinschen <corinna@vinschen.de>
+
+ * common.din (siglongjmp): Export.
+ (sigsetjmp): Export.
+ * gendef: Change formatting of some comments.
+ (sigsetjmp): Implement.
+ (siglongjmp): Implement.
+ (__setjmpex): x86_64 only: Drop entry point.
+ (setjmp): x86_64 only: Store tls stackptr in Frame now, store MXCSR
+ and FPUCW registers in Spare, as MSVCRT does.
+ (longjmp): x86_64 only: Restore tls stackptr from Frame now, restore
+ MXCSR and FPUCW registers from Spare.
+ * include/cygwin/version.h (CYGWIN_VERSION_API_MINOR): Bump.
+
+2015-07-19 Corinna Vinschen <corinna@vinschen.de>
+
+ * include/cygwin/signal.h (MINSIGSTKSZ): Define as 8K, unconditionally.
+ (SIGSTKSZ): Define as 32K, unconditionally.
+
+2015-07-19 Corinna Vinschen <corinna@vinschen.de>
+
+ * dcrt0.cc (initial_env): Reduce size of local path buffers to
+ PATH_MAX. Allocate debugger_command from process heap.
+ (init_windows_system_directory): Very early initialize new global
+ variable global_progname.
+ * dll_init.cc (dll_list::alloc): Make path buffer static. Explain why.
+ (dll_list::populate_deps): Use tmp_pathbuf for local path buffer.
+ * exceptions.cc (debugger_command): Convert to PWCHAR.
+ (error_start_init): Allocate debugger_command and fill with wide char
+ strings. Only allocate if NULL.
+ (try_to_debug): Just check if debugger_command is a NULL pointer to
+ return. Drop conversion from char to WCHAR and drop local variable
+ dbg_cmd.
+ * globals.cc (global_progname): New global variable to store Windows
+ application path.
+ * pinfo.cc (pinfo_basic::pinfo_basic): Just copy progname over from
+ global_progname.
+ (pinfo::status_exit): Let path_conv create the POSIX path to
+ avoid local buffer.
+ * pseudo_reloc.cc (__report_error): Utilize global_progname, drop local
+ buffer.
+ * smallprint.cc (__small_vsprintf): Just utilize global_progname for
+ %P format specifier.
+ (__small_vswprintf): Ditto.
+ * strace.cc (PROTECT): Change to reflect x being a pointer. Reformat.
+ (CHECK): Ditto. Reformat.
+ (strace::activate): Utilize global_progname, drop local buffer.
+ Fix formatting.
+ (strace::vsprntf): Reduce size of local progname buffer to NAME_MAX.
+ Copy and, if necessary, convert only the last path component to
+ progname.
+ (strace_buf_guard): New muto.
+ (buf): New static pointer.
+ (strace::vprntf): Use buf under strace_buf_guard lock only. Allocate
+ buffer space for buf on Windows heap.
+ * wow64.cc (wow64_respawn_process): Utilize global_progname, drop
+ local path buffer.
+
+2015-07-18 Corinna Vinschen <corinna@vinschen.de>
+
+ * gendef: Remove unused 64 bit versions of __sjfault and __ljfault.
+
+2015-07-18 Corinna Vinschen <corinna@vinschen.de>
+
+ * exceptions.cc (makecontext): Rearrange order of initialization and
+ document at great length.
+
+2015-07-17 Corinna Vinschen <corinna@vinschen.de>
+
+ * exceptions.cc (__unwind_single_frame): Define empty macro on i686.
+ (_cygtls::call_signal_handler): Try to make sure signal context makes
+ sense in case we're generating context here. Add comment to explain.
+
+2015-07-17 Corinna Vinschen <corinna@vinschen.de>
+
+ * exceptions.cc (getcontext/x86_64): Drop comment on RtlCaptureContext.
+ (swapcontext/x86_64): Fix comment yet again.
+ (getcontext/i686): Move comment from x86_64 getcontext, slightly
+ rearranged, to preceeding comment.
+
+2015-07-17 Corinna Vinschen <corinna@vinschen.de>
+
+ * exceptions.cc (__unwind_single_frame): Move up in file to be
+ accessible from other places. Move comment to getcontext.
+ (stack_info::walk): Call __unwind_single_frame in 64 bit case. Fix
+ preceeding comment.
+ (myfault_altstack_handler): Call __unwind_single_frame.
+ (getcontext): Give comment from __unwind_single_frame a new home.
+ (swapcontext): Fix comment.
+
+2015-07-17 Corinna Vinschen <corinna@vinschen.de>
+
+ * common.din (getcontext): Export.
+ (makecontext): Export.
+ (setcontext): Export.
+ (swapcontext): Export.
+ * exceptions.cc (__unwind_single_frame): New static functions, 64 bit
+ only.
+ (setcontext): New function.
+ (getcontext): New function.
+ (swapcontext): New function.
+ (__cont_link_context): New function.
+ (makecontext): New function.
+ * include/cygwin/version.h (CYGWIN_VERSION_DLL_MAJOR): Bump to 2002.
+ (CYGWIN_VERSION_API_MINOR): Bump.
+ * include/ucontext.h (getcontext): Add prototype.
+ (setcontext): Ditto.
+ (swapcontext): Ditto.
+ (makecontext): Ditto.
+ * ntdll.h (NtContinue): Ditto.
+
+2015-07-17 Corinna Vinschen <corinna@vinschen.de>
+
+ * include/cygwin/version.h (CYGWIN_VERSION_API_MINOR): Document the
+ fact that we forgot to bump for sigaltstack and sethostname.
+
+2015-07-13 Corinna Vinschen <corinna@vinschen.de>
+
+ * exceptions.cc (exception::handle): Reenable code only disabled for
+ debug purposes.
+
+2015-07-07 Corinna Vinschen <corinna@vinschen.de>
+
+ x86_64 only:
+ * cygtls.cc (san::leave): Restore _my_tls.andreas.
+ * cygtls.h (class san): Add _clemente as in 32 bit case. Add ret and
+ frame members.
+ (san::san): Handle _my_tls.andreas as on 32 bit. Take parameter and
+ write it to new member ret. Store current stack pointer in frame.
+ (san::~san): New destructor to restore _my_tls.andreas.
+ (__try): Use __l_except address as parameter to san::san.
+ * dcrt0.cc (dll_crt0_0): Add myfault_altstack_handler as vectored
+ continuation handler.
+ * exception.h (myfault_altstack_handler): Declare.
+ * exceptions.cc (myfault_altstack_handler): New function. Explain what
+ it's good for.
+
+2015-07-07 Corinna Vinschen <corinna@vinschen.de>
+
+ * child_info.h (CURR_CHILD_INFO_MAGIC): Update.
+ (child_info_fork::alloc_stack_hard_way): Drop declaration.
+ * dcrt0.cc (child_info_fork::alloc_stack_hard_way): Fold into
+ child_info_fork::alloc_stack.
+ (getstack): Remove.
+ (child_info_fork::alloc_stack): Simplify check for application-provided
+ stack in "hard way" code. Don't call getstack for each page, just
+ reallocate stack immediately as required.
+
+2015-07-07 Corinna Vinschen <corinna@vinschen.de>
+
+ * fork.cc (frok::parent): Simplify code propagating stack setup to
+ child process. Tweak comments.
+
+2015-07-06 Yaakov Selkowitz <yselkowi@redhat.com>
+
+ * path.cc: Rework basename redefinition handling. Explain why.
+
+2015-07-05 Corinna Vinschen <corinna@vinschen.de>
+
+ * dcrt0.cc (CYGWIN_GUARD): Remove.
+ (child_info_fork::alloc_stack_hard_way): Align stack commit to changes
+ of thread stack setup in CygwinCreateThread.
+
+2015-07-05 Corinna Vinschen <corinna@vinschen.de>
+
+ * miscfuncs.cc (struct pthread_wrapper_arg): Add member guardsize.
+ (pthread_wrapper): Set thread stack guarantee according to guardsize.
+ Tweak assembler code so that $rax/$eax is not required by GCC to
+ prepare the wrapper_arg value.
+ (CygwinCreateThread): Fix deadzone handling. Drop setting a "POSIX"
+ guardpage (aka page w/ PAGE_NOACCESS). Always use Windows guard
+ pages instead. On post-XP systems (providing SetThreadStackGuarantee)
+ always set up stack Windows like with reserved/commited areas and
+ movable guard pages. Only on XP set up stack fully commited if the
+ guardpage size is not the default system guardpage size.
+ Fill out pthread_wrapper_arg::guardsize. Improve comments.
+ * resource.cc: Implement RSTACK_LIMIT Linux-like.
+ (DEFAULT_STACKSIZE): New macro.
+ (DEFAULT_STACKGUARD): Ditto.
+ (rlimit_stack_guard): New muto.
+ (rlimit_stack): New global variable holding current RSTACK_LIMIT values.
+ (__set_rlimit_stack): Set rlimit_stack under lock.
+ (__get_rlimit_stack): Initialize rlimit_stack from executable header
+ and return rlimit_stack values under lock.
+ (get_rlimit_stack): Filtering function to return useful default
+ stacksize from rlimit_stack.rlim_cur value.
+ (getrlimit): Call __get_rlimit_stack in RLIMIT_STACK case.
+ (setrlimit): Call __set_rlimit_stack in RLIMIT_STACK case.
+ * thread.cc (pthread::create): Fetch default stacksize calling
+ get_rlimit_stack.
+ (pthread_attr::pthread_attr): Fetch default guardsize calling
+ wincap.def_guard_page_size.
+ (pthread_attr_getstacksize): Fetch default stacksize calling
+ get_rlimit_stack.
+ * thread.h (PTHREAD_DEFAULT_STACKSIZE): Remove.
+ (PTHREAD_DEFAULT_GUARDSIZE): Remove.
+ (get_rlimit_stack): Declare.
+
+2015-07-05 Corinna Vinschen <corinna@vinschen.de>
+
+ * fhandler_process.cc (heap_info::heap_info): Disable fetching heap info
+ on 64 bit XP/2003. Explain why.
+ * wincap.h (wincaps::has_broken_rtl_query_process_debug_information):
+ New element.
+ * wincap.cc: Implement above element throughout.
+
+2015-07-04 Corinna Vinschen <corinna@vinschen.de>
+
+ * autoload.cc (SetThreadStackGuarantee): Import.
+ * cygtls.h (struct _cygtls): Replace thread_context with a ucontext_t
+ called context.
+ * exceptions.cc (exception::handle): Exit from process via signal_exit
+ in case sig_send returns from handling a stack overflow SIGSEGV.
+ Explain why.
+ (dumpstack_overflow_wrapper): Thread wrapper to create a stackdump
+ from another thread.
+ (signal_exit): Fix argument list to reflect three-arg signal handler.
+ In case we have to create a stackdump for a stack overflow condition,
+ do so from a separate thread. Explain why.
+ (sigpacket::process): Don't run signal_exit on alternate stack.
+ (altstack_wrapper): Wrapper function to do stack correction when
+ calling the signal handler on an alternate stack to handle a stack
+ overflow. Make sure to have lots of comments.
+ (_cygtls::call_signal_handler): Drop local context variable to reduce
+ stack pressure. Use this->context instead. Change inline assembler
+ to call altstack_wrapper.
+ (_cygtls::signal_debugger): Accommodate aforementioned change to
+ struct _cygtls.
+ * tlsoffset.h: Regenerate.
+ * tlsoffset64.h: Regenerate.
+ * wincap.h (wincaps::def_guard_pages): New element.
+ (wincaps::has_set_thread_stack_guarantee): Ditto.
+ * wincap.cc: Implement above elements throughout.
+
+2015-07-01 Corinna Vinschen <corinna@vinschen.de>
+
+ * fork.cc (frok::parent): Set stacktop value based on requested stack
+ pointer value in child. Explain why.
+
+2015-06-30 Corinna Vinschen <corinna@vinschen.de>
+
+ * signal.cc (sigaltstack): Add comment.
+
+2015-06-27 Corinna Vinschen <corinna@vinschen.de>
+
+ * exceptions.cc (_cygtls::call_signal_handler): Drop manipulating
+ thread's ss_flags here. It's not safe against longjmp.
+ * signal.cc (sigaltstack): Check if we're running on the alternate
+ stack and set ss_flags returned in oss to SS_ONSTACK.
+
+2015-06-26 Corinna Vinschen <corinna@vinschen.de>
+
+ * include/cygwin/signal.h: Revert to define MINSIGSTKSZ and SIGSTKSZ
+ here with bigger values to allow _cygtls to reside on signal stack,
+ should it turn out to be required at one point.
+
+2015-06-26 Corinna Vinschen <corinna@vinschen.de>
+
+ * resource.cc (getrlimit): Fix values returned by RLIMIT_STACK.
+ Explain why this had to be changed.
+
+2015-06-23 Ken Brown <kbrown@cornell.edu>
+
+ * include/cygwin/signal.h (SIGEV_*): Add macros.
+
+2015-06-22 Corinna Vinschen <corinna@vinschen.de>
+
+ * exceptions.cc (_cygtls::call_signal_handler): Drop pushing a register
+ on the original stack, it confuses GCC. Rearrange the assembler code
+ so that $rax/$eax is not used by GCC to prepare an argument value.
+ Use $rax/$eax without saving. Drop clearing $rbp/$epb.
+
+2015-06-21 Corinna Vinschen <corinna@vinschen.de>
+
+ * exceptions.cc (_cygtls::call_signal_handler): Drop subtracting 16
+ bytes from the alternate stack, it's not necessary. Safe all clobbered
+ registers. Safe one on the orignal stack, the others on the alternate
+ stack on both platforms.
+
+2015-06-20 Corinna Vinschen <corinna@vinschen.de>
+
+ * exceptions.cc (_cygtls::call_signal_handler): Implement alternate
+ signal stack handling.
+ * signal.cc (sigaltstack): Add fault handler.
+ * include/cygwin/signal.h: Remove definitions of MINSIGSTKSZ
+ and SIGSTKSZ here.
+
+2015-06-19 Corinna Vinschen <corinna@vinschen.de>
+
+ * common.din (sigaltstack): Export.
+ * cygtls.cc (_cygtls::init_thread): Initialize altstack.
+ * cygtls.h (__tlsstack_t): Rename from __stack_t to distinguish
+ more clearly from stack_t. Accommodate throughout.
+ (_cygtls): Add altstack member.
+ * exceptions.cc (exception::handle): Set SIGSEGV handler to SIG_DFL
+ if we encounter a stack overflow, and no alternate stack has been
+ defined.
+ * include/cygwin/signal.h (MINSIGSTKSZ): Define
+ (SIGSTKSZ): Define.
+ (SA_ONSTACK): Define.
+ * signal.cc (sigaltstack): New function.
+ * tlsoffset.h: Regenerate.
+ * tlsoffset64.h: Ditto.
+
+2015-06-19 Corinna Vinschen <corinna@vinschen.de>
+
+ * exceptions.cc: Minor formatting fixes.
+
+2015-06-18 Corinna Vinschen <corinna@vinschen.de>
+
+ * Makefile.in (install-man): Exclude release subdir from search paths.
+
+2015-06-17 Corinna Vinschen <corinna@vinschen.de>
+
+ * net.cc (sethostname): New function.
+ * common.din (sethostname): Export
+ * include/cygwin/version.h (CYGWIN_VERSION_DLL_MAJOR): Bump to 2001.
+ (CYGWIN_VERSION_DLL_MINOR): Set to 0.
+
+2015-06-15 Corinna Vinschen <corinna@vinschen.de>
+
+ * fhandler_socket.cc (LOCK_EVENTS): Don't enter critical section with
+ invalid mutex handle since then socket has been closed.
+ (UNLOCK_EVENTS): Close critical section.
+ (fhandler_socket::evaluate_events): Handle calling connect on shutdown
+ socket.
+ (fhandler_socket::wait_for_events): Try for pthread_testcancel in case
+ of WAIT_FAILED. Try to come up with a better errno in case we waited
+ on an invalid handle.
+ (fhandler_socket::release_events): Change wsock_mtx and wsock_evt to
+ NULL under lock to avoid accessing invalid handle.
+
+2015-06-15 Corinna Vinschen <corinna@vinschen.de>
+
+ * net.cc (errmap): Handle more Winsock error codes.
+
+2015-06-15 Corinna Vinschen <corinna@vinschen.de>
+
+ * exceptions.cc (_cygtls::call_signal_handler): Disable enforcing
+ SA_RESTART in non-main threads to allow returning with EINTR from
+ system calls.
+
+2015-06-11 Corinna Vinschen <corinna@vinschen.de>
+
+ * include/cygwin/version.h (CYGWIN_VERSION_DLL_MINOR): Bump to 5.
+
+2015-06-08 Corinna Vinschen <corinna@vinschen.de>
+
+ * pinfo.cc (_pinfo::cwd): Initialize s to avoid comiler warning.
+ (_pinfo::cmdline): Ditto.
+
+2015-06-08 Corinna Vinschen <corinna@vinschen.de>
+
+ * pinfo.cc (_pinfo::root): Fake default root for native processes.
+ (open_commune_proc_parms): New helper function to access process
+ parameter block.
+ (_pinfo::cwd): Fetch missing cwd for native processes from processes
+ parameter block.
+ (_pinfo::cmdline): Ditto for command line.
+
+2015-06-08 Corinna Vinschen <corinna@vinschen.de>
+
+ * pinfo.cc (_pinfo::commune_request): Don't try to send commune
+ requests to non-Cygwin processes.
+
+2015-06-08 Takashi Yano <takashi.yano@nifty.ne.jp>
+
+ * fhandler_tty.cc (fhandler_pty_slave::write): Move causing of SIGHUP
+ into fhandler_pty_master::close().
+ (fhandler_pty_slave::read): Ditto.
+ (fhandler_pty_master::close): Ditto.
+
+2015-06-08 Corinna Vinschen <corinna@vinschen.de>
+
+ * include/cygwin/version.h (CYGWIN_VERSION_DLL_MINOR): Bump to 4.
+
+2015-06-02 Corinna Vinschen <corinna@vinschen.de>
+
+ * include/cygwin/version.h (CYGWIN_VERSION_DLL_MINOR): Bump to 3.
+
+2015-05-28 Takashi Yano <takashi.yano@nifty.ne.jp>
+ Corinna Vinschen <corinna@vinschen.de>
+
+ * fhandler_tty.cc (fhandler_pty_common::close): Don't close output_mutex
+ here. Move into callers.
+ (fhandler_pty_master::close): Use NtQueryObject instead of PeekNamedPipe
+ to detect closing the last master handle.
+
+2015-05-27 Takashi Yano <takashi.yano@nifty.ne.jp>
+
+ * net.cc: Define _NETIOAPI_H_ to accomodate newer w32api.
+
+2015-05-03 Corinna Vinschen <corinna@vinschen.de>
+
+ * include/cygwin/version.h (CYGWIN_VERSION_DLL_MINOR): Bump to 2.
+
+2015-04-30 Corinna Vinschen <corinna@vinschen.de>
+
+ * include/cygwin/version.h (CYGWIN_VERSION_DLL_MINOR): Bump to 1.
+
+2015-04-30 Corinna Vinschen <corinna@vinschen.de>
+
+ * security.cc (convert_samba_sd): Fix accidental dropping of all
+ non-Unix User, non-Unix Group accounts.
+
+2015-04-27 Corinna Vinschen <corinna@vinschen.de>
+
+ * include/asm/types.h: Add __s64 and __u64 types.
+
+2015-04-23 Corinna Vinschen <corinna@vinschen.de>
+
+ * path.cc (path_conv::set_nt_native_path): New function.
+ * path.h (path_conv::set_nt_native_path): Add prototype.
+ * syscall.cc (try_to_bin): Handle moving files to the recycler
+ accessed via a local virtual drive (subst). Fix a problem renaming
+ the file to the unique replacement name on Samba. Align comment.
+
+2015-04-22 Corinna Vinschen <corinna@vinschen.de>
+
+ * fhandler_tty.cc (fhandler_pty_slave::fch_close_handles): Don't close
+ handles not opened via fhandler_pty_slave::fch_open_handles.
+
+2015-04-22 Takashi Yano <takashi.yano@nifty.ne.jp>
+
+ * fhandler.h (class fhandler_base): Add virtual function
+ get_io_handle_cyg() to get handle from which OPOST-processed output is
+ read on PTY master.
+ (class fhandler_pty_slave): Add variable output_handle_cyg to store a
+ handle to which OPOST-processed output is written. Add two functions,
+ i.e., set_output_handle_cyg() and get_output_handle_cyg(), regarding
+ variable output_handle_cyg. Now, output_handle is used only by native
+ windows program. The data before OPOST-processing is written to
+ output_handle and OPOST-processing is applied in the master-side. For a
+ cygwin process, OPOST-processing is applied in the slave-side, and the
+ data after OPOST-processing is written to output_handle_cyg.
+ (class fhandler_pty_master): Add two variables, i.e., io_handle_cyg and
+ to_master_cyg, to store handles of a pipe through which OPOST-processed
+ output passes. Add pty_master_fwd_thread and function
+ pty_master_fwd_thread() for a thread which applies OPOST-processing
+ and forwards data from io_handle to to_master_cyg. Add function
+ get_io_handle_cyg() regarding variable io_handle_cyg. Now, the pipe
+ between io_handle and to_master are used only by native windows program
+ for applying OPOST-processing in the master-side. For a cygwin process,
+ the pipe between io_handle_cyg and to_master_cyg is used for passing
+ through the data which is applied OPOST-processing in the slave-side.
+ * fhandler_tty.cc (struct pipe_reply): Add member to_master_cyg.
+ (fhandler_pty_master::process_slave_output): Read slave output from
+ io_handle_cyg rather than io_handle.
+ (fhandler_pty_slave::fhandler_pty_salve): Initialize output_handle_cyg.
+ (fhandler_pty_slave::open): Set output_handle_cyg by duplicating handle
+ to_master_cyg on PTY master.
+ (fhandler_pty_slave::close): Close handle output_handle_cyg.
+ (fhandler_pty_slave::write): Write data to output_handle_cyg rather
+ than output_handle.
+ (fhandler_pty_slave::fch_close_handles): Close handle output_handle_cyg.
+ (fhandler_pty_master::fhandler_pty_master): Initialize io_handle_cyg,
+ to_master_cyg and master_fwd_thread.
+ (fhandler_pty_master::cleanup): Clean up to_master_cyg as well.
+ (fhandler_pty_master::close): Print to_master_cyg as well in debug
+ message. Terminate master forwarding thread. Close handles
+ to_master_cyg and io_handle_cyg.
+ (fhandler_pty_master::ioctl): Use io_handle_cyg rather than to_master.
+ (fhandler_pty_master::pty_master_thread): Add code for duplicating
+ handle to_master_cyg.
+ (fhandler_pty_master::pty_master_fwd_thread): New function for a thread
+ to forward OPOST-processed data from io_handle to to_master_cyg. This
+ thread applies OPOST-processing to the output of native windows program.
+ (::pty_master_fwd_thread): Ditto.
+ (fhandler_pty_master::setup): Create a new pipe to pass thruegh OPOST-
+ processed output. Create new thread to forward data from io_handle to
+ to_master_cyg. Set handle to_master_cyg to tty. Print io_handle_cyg as
+ well in debug message. Close handles io_handle_cyg and to_master_cyg in
+ case of error.
+ (fhandler_pty_master::fixup_after_fork): Set handle to_master_cyg to
+ tty. Copy handle to_master_cyg from arch->to_master_cyg.
+ (fhandler_pty_master::fixup_after_exec): Clean up to_master_cyg.
+ * select.cc: Check handle returned by get_io_handle_cyg() rather than
+ get_handle().
+ * tty.h (class tty): Add variable _to_master_cyg to store a handle to
+ which OPOST-processed data is written. Add two functions,
+ to_master_cyg() and set_to_master_cyg(), regarding _to_master_cyg.
+
+2015-04-22 Corinna Vinschen <corinna@vinschen.de>
+
+ * path.cc (basename): Undefine basename before defining function to
+ avoid type collision with prototype in string.h.
+
+2015-04-21 Corinna Vinschen <corinna@vinschen.de>
+
+ * include/libgen.h: Remove in favor of newlib version.
+
+2015-04-17 Corinna Vinschen <corinna@vinschen.de>
+
+ * uinfo.cc (pwdgrp::fetch_account_from_windows): Always revert SID
+ subauth count after checking for known domain.
+
+2015-04-17 Corinna Vinschen <corinna@vinschen.de>
+
+ * pwdgrp.h: Add comment to explain below change.
+ (struct pg_pwd): Convert sid member to BYTE array.
+ (struct pg_grp): Ditto.
+ * grp.cc (pwdgrp::parse_group): Accommodate above change.
+ * passwd.cc (pwdgrp::parse_passwd): Ditto.
+
+2015-04-12 Corinna Vinschen <corinna@vinschen.de>
+
+ * shm.cc (shmget): Fetch segment size from server rather than using
+ size argument to accommodate existing segments. Add comment to explain
+ why.
+
+2015-04-10 Corinna Vinschen <corinna@vinschen.de>
+
+ * include/cygwin/version.h (CYGWIN_VERSION_DLL_MAJOR): Bump to 2000.
+ (CYGWIN_VERSION_DLL_MINOR): Set to 0.
+
+2015-04-04 Jon TURNEY <jon.turney@dronecode.org.uk>
+
+ * exceptions.cc (call_signal_handler): Set mcontext.cr2 to the
+ faulting address.
+
+2015-04-02 Jon TURNEY <jon.turney@dronecode.org.uk>
+
+ * exceptions.cc (call_signal_handler): Only bother to construct
+ the ucontext for signal handlers with SA_SIGINFO set. Set
+ mcontext.oldmask.
+
+2015-04-04 Jon TURNEY <jon.turney@dronecode.org.uk>
+
+ * exceptions.cc (call_signal_handler): Zero initialize context and set
+ context flags, as RlCaptureContext doesn't.
+
+2015-04-09 Corinna Vinschen <corinna@vinschen.de>
+
+ * fhandler_dsp.cc (fhandler_dev_dsp::open): Call open_null.
+
+2015-04-08 Corinna Vinschen <corinna@vinschen.de>
+
+ * pwdgrp.h (sidfromuid): New inline function.
+ (sidfromgid): Ditto.
+ * fhandler_disk_file.cc (fhandler_disk_file::fchown): Use sidfromuid.
+ * quotactl.cc (quotactl): Use sidfromuid and sidfromgid.
+
+2015-04-08 Corinna Vinschen <corinna@vinschen.de>
+
+ * include/cyggwin/acl.h (struct __acl16): Move from here...
+ * sec_acl.cc: ...to here.
+
+2015-04-07 Corinna Vinschen <corinna@vinschen.de>
+
+ * tty.h (class tty): Remove unused 32/64 bit interoperability
+ considerations.
+
+2015-04-07 Corinna Vinschen <corinna@vinschen.de>
+
+ * tty.h (NTTYS): Raise to 128.
+ * devices.in: Change pty, ptym, and cons expressions accordingly.
+ * devices.cc: Regenerate.
+
+2015-04-04 Jon TURNEY <jon.turney@dronecode.org.uk>
+
+ * Makefile.in : Remove setting -fomit-frame-pointer for compiling
+ various files, it is already the default. Set
+ -fno-omit-frame-pointer for exceptions.cc on x86.
+
+2015-04-03 Takashi Yano <takashi.yano@nifty.ne.jp>
+
+ * fhandler_tty.cc (fhandler_pty_slave::read): Change calculation of
+ "readlen" not to use "bytes_in_pipe" value directly.
+
+2015-04-02 Jon TURNEY <jon.turney@dronecode.org.uk>
+
+ * include/cygwin/signal.h (struct __mcontext): 16-byte align.
+ * include/sys/ucontext.h (ucontext_t): Ditto.
+
+2015-04-01 Corinna Vinschen <corinna@vinschen.de>
+
+ * include/cygwin/types.h: Include sys/_stdint.h rather than stdint.h.
+ * include/stdint.h: Drop in favor of newlib version.
+ * include/inttypes.h: Ditto.
+
+2015-04-01 Jon TURNEY <jon.turney@dronecode.org.uk>
+
+ * include/sys/ucontext.h : New header.
+ * include/ucontext.h : Ditto.
+ * exceptions.cc (call_signal_handler): Provide ucontext_t
+ parameter to signal handler function.
+
+2015-04-01 Jon TURNEY <jon.turney@dronecode.org.uk>
+
+ * external.cc (cygwin_internal): Add operation to retrieve a copy
+ of the EXCEPTION_RECORD from a siginfo_t *.
+ * include/sys/cygwin.h (cygwin_getinfo_types): Ditto.
+ * exception.h (cygwin_exception): Add exception_record accessor.
+
+2015-04-01 Jon TURNEY <jon.turney@dronecode.org.uk>
+
+ * include/cygwin/signal.h : Rename struct ucontext to struct
+ __mcontext. Fix layout differences from the Win32 API CONTEXT
+ type. Remove unused member _internal. Rename member which
+ corresponds to ContextFlags. Add cr2 member.
+
+2015-04-01 Corinna Vinschen <corinna@vinschen.de>
+
+ * grp.cc (internal_getgroups): Handle negative domain index to avoid
+ crashes.
+
+2015-03-31 Renato Silva <br.renatosilva@gmail.com>
+
+ * net.cc (cygwin_gethostname): Fix buffer size error handling.
+
+2015-03-31 Corinna Vinschen <corinna@vinschen.de>
+
+ * uinfo.cc (pwdgrp::fetch_account_from_windows): Don't allow fully
+ qualified Windows account names (domain\user or user@domain).
+
+2015-03-31 Corinna Vinschen <corinna@vinschen.de>
+
+ * localtime.cc (tzset_unlocked): Export as _tzset_unlocked.
+
+2015-03-30 Yaakov Selkowitz <yselkowi@redhat.com>
+
+ * common.din (__gnu_basename): Export.
+ * path.cc (__gnu_basename): New function.
+
+2015-03-30 Corinna Vinschen <corinna@vinschen.de>
+
+ * cygheap.h (cygheap_domain_info::add_domain): Add prototype.
+ * uinfo.cc (cygheap_domain_info::add_domain): New method.
+ (pwdgrp::fetch_account_from_windows): Try to add domain explicitely
+ if it was not in the original list of trusted domains and go ahead
+ rather than bailing out. Add comment to explain why.
+
+2015-03-30 Corinna Vinschen <corinna@vinschen.de>
+
+ * cygtls.h (struct _cygtls): Convert thread_context to type CONTEXT.
+ * exceptions.cc (_cygtls::signal_debugger): Use sizeof (CONTEXT) for
+ size of CONTEXT copied for GDB's digestion.
+ * include/cygwin/signal.h: Add a preliminary comment.
+
+2015-03-25 Corinna Vinschen <corinna@vinschen.de>
+
+ * include/sys/termios.h: Add CMIN and CTIME.
+ * fhandler_termios.cc (fhandler_termios::tcinit): Use CMIN and CTIME.
+
+2015-03-25 Takashi Yano <takashi.yano@nifty.ne.jp>
+
+ * tty.h (class tty_min): Remove variable "write_error" to which any
+ errors are not currently set at anywhere.
+ (class tty): Add variable "column" for handling ONOCR.
+ * tty.cc (tty::init): Add initialization code for variable "column".
+ * fhandler.h (class fhandler_pty_master): Remove variable "need_nl"
+ which is not necessary any more. "need_nl" was needed by OPOST process
+ in fhandler_pty_master::process_slave_output().
+ (class fhandler_pty_common): Add function process_opost_output() for
+ handling post processing for OPOST in write process.
+ * fhandler_tty.cc (fhandler_pty_master::process_slave_output): Count
+ TIOCPKT control byte into length to be read in TIOCPKT mode. Move
+ post processing for OPOST to write process. Remove code related to
+ variable "write_error". Return with EIO error if slave is already
+ closed.
+ (fhandler_pty_master::fhandler_pty_master): Remove initialization
+ code for variable "need_nl".
+ (fhandler_pty_common::process_opost_output): Add this function for
+ handling of OPOST in write process. Add code to avoid blocking in
+ non-blocking mode when output is suspended by ^S.
+ (fhandler_pty_slave::write): Call fhandler_pty_common::
+ process_opost_output() instead of WriteFile(). Remove code related to
+ variable "write_error".
+ (fhandler_pty_master::doecho): Call fhandler_pty_common::
+ process_opost_output() instead of WriteFile().
+ * select.cc (peek_pipe): Remove code related to variable "need_nl".
+
+2015-03-24 Corinna Vinschen <corinna@vinschen.de>
+
+ Per glibc BZ #15366:
+ * inttypes.h: Drop __STDC_FORMAT_MACROS consideration.
+ * stdint.h: Drop __STDC_LIMIT_MACROS and __STDC_CONSTANT_MACROS
+ consideration.
+
+2015-03-23 Corinna Vinschen <corinna@vinschen.de>
+
+ * include/cygwin/_types.h: Drop unused file.
+
+2015-03-18 Corinna Vinschen <corinna@vinschen.de>
+
+ * grp.cc (pwdgrp::parse_group): Call cygsid::getfromgr_passwd.
+ * passwd.cc (pwdgrp::parse_passwd): Call cygsid::getfrompw_gecos.
+ * pwdgrp.h (cygsid::getfrompw): Implement as inline method here,
+ accessing pg_pwd's sid member directly.
+ (cygsid::getfromgr): Implement as inline method here, accessing
+ pg_grp's sid member directly.
+ * sec_auth.cc (extract_nt_dom_user): Call cygsid::getfrompw_gecos.
+ Explain why.
+ * sec_helper.cc (cygsid::getfrompw): Drop implementation.
+ (cygsid::getfromgr): Ditto.
+ * security.h (cygsid::getfrompw_gecos): Implement former getfrompw
+ inline here.
+ (cygsid::getfromgr_passwd): Implement former getfromgr inline here.
+
+2015-03-18 Corinna Vinschen <corinna@vinschen.de>
+
+ * sec_auth.cc (get_server_groups): Drop unused passwd argument. Adjust
+ calls throughout.
+ (get_initgroups_sidlist): Ditto.
+ (get_setgroups_sidlist): Ditto.
+ (create_token): Ditto.
+ (lsaauth): Ditto.
+ * security.h (create_token): Adjust prototype to above change.
+ (lsaauth): Ditto.
+ (get_server_groups): Ditto.
+ * grp.cc (get_groups): Adjust call to get_server_groups.
+ * syscalls.cc (seteuid32): Adjust calls to lsaauth and create_token.
+
+2015-03-17 Corinna Vinschen <corinna@vinschen.de>
+
+ * grp.cc (internal_getgroups): Drop unused timeout parameter.
+ * pwdgrp.h (internal_getgroups): Ditto in prototype.
+ * uinfo.cc (internal_getlogin): Ditto in usage.
+
+2015-03-17 Corinna Vinschen <corinna@vinschen.de>
+
+ * spawn.cc (find_exec): Fix a name change in case of a symlink which
+ can be opened as is.
+
+2015-03-12 Jon TURNEY <jon.turney@dronecode.org.uk>
+
+ * exceptions.cc (stack_info): Add sigstackptr member.
+ (walk): Unwind sigstackptr inside _sigbe and sigdelayed.
+ * gendef (_sigdelayed_end): Add symbol to mark end of sigdelayed.
+
+2015-03-13 Corinna Vinschen <corinna@vinschen.de>
+
+ * include/cygwin/sys_time.h: Remove. Definitions moved to newlib's
+ sys/time.h.
+
+2015-03-13 Alexey Pavlov <alexpux@gmail.com>
+
+ * net.cc (in6addr_any): Remove redundant braces.
+ (in6addr_loopback): Ditto.
+
+2015-03-12 Alexey Pavlov <alexpux@gmail.com>
+
+ * include/cygwin/version.h: Fix typo.
+
+2015-03-12 Corinna Vinschen <corinna@vinschen.de>
+
+ * fhandler_socket.cc: Drop defining _BSDTYPES_DEFINED before including
+ winsup.h.
+
+2015-03-12 Takashi Yano <takashi.yano@nifty.ne.jp>
+
+ * fhandler_tty.cc (fhandler_pty_master::close): Add code to make slave
+ detect closure of master. Fix typo in error message.
+
+2015-03-11 Corinna Vinschen <corinna@vinschen.de>
+
+ * include/cygwin/types.h: Include <sys/_timespec.h>
+
+2015-03-11 Corinna Vinschen <corinna@vinschen.de>
+
+ * autoload.cc (CreateEnvironmentBlock): Make loading non-fatal.
+
+2015-03-11 Corinna Vinschen <corinna@vinschen.de>
+
+ * autoload.cc (std_dll_init): Fix condition for breaking from DLL
+ loading loop.
+
+2015-03-10 Yaakov Selkowitz <yselkowitz@cygwin.com>
+
+ * include/stdint.h: Fix __x86_64__ conditional.
+
+2015-03-05 Corinna Vinschen <corinna@vinschen.de>
+
+ * tty.h (tty::set_master_ctl_closed): Rename from set_master_closed.
+ (tty::is_master_closed): Drop method.
+ * fhandler_tty.cc (fhandler_pty_slave::open): Remove code prematurely
+ bailing out if master control thread is not running.
+ (fhandler_pty_slave::read): Don't generate SIGHUP if master control
+ thread is not running.
+ (fhandler_pty_master::close): Rearrange code to avoid stopping master
+ control thread twice in multi-threaded scenarios.
+
+2015-03-05 Corinna Vinschen <corinna@vinschen.de>
+
+ * fhandler.h (fhandler_base::get_echo_handle): New virtual method.
+ (class fhandler_pty_master): Add echo_r and echo_w handles constituting
+ read and write side of new echo pipe.
+ * select.cc (peek_pipe): On pty masters, check additionally if input
+ from the echo pipe is available.
+ * fhandler_tty.cc (fhandler_pty_master::doecho): Drop output_mutex
+ locking. Write output to echo pipe.
+ (fhandler_pty_master::process_slave_output): Check if input is available
+ in echo pipe and prefer to read from it, if so.
+ (fhandler_pty_slave::write): Drop output_mutex locking.
+ (fhandler_pty_master::fhandler_pty_master): Initialize echo pipe
+ handles to NULL.
+ (fhandler_pty_master::close): Close and NULL echo pipe handles.
+ (fhandler_pty_master::setup): Create echo pipe, close in case of error.
+
+2015-03-04 Corinna Vinschen <corinna@vinschen.de>
+
+ * include/cygwin/version.h (CYGWIN_VERSION_DLL_MINOR): Bump to 36.
+
+2015-03-03 Corinna Vinschen <corinna@vinschen.de>
+
+ * msg.cc: Throughout, drop raising SIGSYS if cygserver is not running.
+ * sem.cc: Ditto.
+ * shm.cc: Ditto.
+
+2015-03-03 Corinna Vinschen <corinna@vinschen.de>
+
+ * common.din (issetugid): Export.
+ * glob.cc (issetugid): Drop macro.
+ * sec_auth.cc (issetugid): New exported function.
+ * include/cygwin/version.h (CYGWIN_VERSION_API_MINOR): Bump.
+
+2015-03-02 Corinna Vinschen <corinna@vinschen.de>
+
+ * security.cc (get_attribute_from_acl): Don't spill Everyone permissions
+ into group permissions if owner SID == group SID.
+ (alloc_sd): Add parenthesis for clarity.
+
+2015-02-28 Corinna Vinschen <corinna@vinschen.de>
+
+ * uinfo.cc (pwdgrp::add_line): Return NULL if parsing a line failed.
+ (pwdgrp::add_account_post_fetch): Check return value from add_line and
+ return NULL if add_line returns NULL.
+
+2015-02-27 Corinna Vinschen <corinna@vinschen.de>
+
+ * security.cc (alloc_sd): For directories, mark inherited ACEs
+ inheritable to better follow POSIX 1003.1e rules.
+
+2015-02-27 Corinna Vinschen <corinna@vinschen.de>
+
+ * sec_acl.cc (getacl): Add mask even if all group and secondary account
+ permissions are 0.
+
+2015-02-27 Corinna Vinschen <corinna@vinschen.de>
+
+ * uinfo.cc (pwdgrp::fetch_account_from_windows): Drop redundant test
+ for SidTypeUser.
+
+2015-02-27 Corinna Vinschen <corinna@vinschen.de>
+
+ * sec_acl.cc (setacl): Fix bug which leads to ACE duplication in
+ case owner SID == group SID.
+ (getacl): Reverse order of SID test against group or owner sid to
+ prefer owner attributes over group attributes. Disable setting group
+ permissions equivalent to owner permissions if owner == group. Add
+ comment to explain why. Fix indentation.
+ * security.cc (get_attribute_from_acl): Change type of local variables
+ containing permission to mode_t. Apply deny mask to group if group SID
+ == owner SID to avoid Everyone permissions to spill over into group
+ permissions. Disable setting group permissions equivalent to owner
+ permissions if owner == group. Add comment to explain why.
+ * uinfo.cc (pwdgrp::fetch_account_from_windows): Allow user SID as
+ group account if user is a "Microsoft Account". Explain why. Drop
+ workaround enforcing primary group "Users" for "Microsoft Accounts".
+
+2015-02-26 Corinna Vinschen <corinna@vinschen.de>
+
+ * ldap.cc (cyg_ldap::wait): Call cygwait with cw_infinite timeout value
+ and with cw_sig_restart instead of cw_sig_eintr. Drop useless
+ _my_tls.call_signal_handler call. Return EIO if cygwait failed.
+
+2015-02-26 Corinna Vinschen <corinna@vinschen.de>
+
+ * posix_ipc.cc (ipc_mutex_lock): Revert unneeded call to signal handler.
+
+2015-02-26 Corinna Vinschen <corinna@vinschen.de>
+
+ * posix_ipc.cc (ipc_mutex_lock): Add bool parameter to influence if
+ cygwait should be in EINTR or in restart mode. Call signal handler
+ if in EINTR mode.
+ (mq_getattr): Call ipc_mutex_lock in restart mode.
+ (mq_setattr): Ditto.
+ (mq_notify): Ditto.
+ (_mq_send): Call ipc_mutex_lock in EINTR mode.
+ (_mq_receive): Ditto.
+
+2015-02-26 Corinna Vinschen <corinna@vinschen.de>
+
+ * fhandler_termios.cc (fhandler_termios::line_edit): Fix condition
+ for writing remaining bytes in readahead buffer in non-canonical mode.
+
+2015-02-25 Corinna Vinschen <corinna@vinschen.de>
+
+ * sec_acl.cc (setacl): Always grant default owner entry
+ STANDARD_RIGHTS_ALL and FILE_WRITE_ATTRIBUTES access, too.
+
+2015-02-25 Corinna Vinschen <corinna@vinschen.de>
+
+ * fhandler_tape.cc (fhandler_dev_tape::_lock): Add cw_sig_restart to
+ cygwait call.
+ * thread.cc (pthread_mutex::lock): Ditto.
+ (semaphore::_timedwait): Fix formatting.
+ (semaphore::_wait): Ditto.
+ * thread.h (fast_mutex::lock): Ditto.
+
+2015-02-25 Corinna Vinschen <corinna@vinschen.de>
+
+ * security.cc (alloc_sd): Don't apply temporary workaround for chmod
+ to DEF_USER_OBJ, DEF_GROUP_OBJ, and DEF_OTHER_OBJ ACEs.
+
+2015-02-25 Corinna Vinschen <corinna@vinschen.de>
+
+ * fhandler_tty.cc (fhandler_pty_slave::read): Having no input is not an
+ error condition for tcflush.
+
+2015-02-25 Corinna Vinschen <corinna@vinschen.de>
+
+ * security.cc (alloc_sd): Fix comment style. Remove code unused for
+ years.
+
+2015-02-25 Corinna Vinschen <corinna@vinschen.de>
+
+ * security.cc (alloc_sd): Add temporary workaround which disallows
+ any secondary user to have more permissions than the primary group
+ in calls to chmod. Add comment to explain why.
+
+2015-02-25 Corinna Vinschen <corinna@vinschen.de>
+
+ * uinfo.cc (client_request_pwdgrp::client_request_pwdgrp): Add missing
+ break in switch statement.
+
+2015-02-24 Corinna Vinschen <corinna@vinschen.de>
+
+ * ldap.h: Remove index macros.
+ (class cyg_ldap): Remove members srch_msg and srch_entry.
+ (cyg_ldap::get_string_attribute): Remove private method taking index
+ argument.
+ (cyg_ldap::get_num_attribute): Ditto. Add method taking attribute name.
+ (cyg_ldap::get_primary_gid): Adjust to aforementioned change.
+ (cyg_ldap::get_unix_uid): Ditto.
+ (cyg_ldap::get_unix_gid): Ditto.
+ * ldap.cc: Throughout, use msg and entry in place of srch_msg and
+ srch_entry.
+ (std_user_attr): Add sAMAccountName and objectSid.
+ (group_attr): Ditto.
+ (cyg_ldap::close): Drop handling of srch_msg and srch_entry.
+ (cyg_ldap::get_string_attribute): Move earlier in file.
+ (cyg_ldap::get_num_attribute): Ditto.
+ (cyg_ldap::enumerate_ad_accounts): Add comments for clarity.
+ Use group_attr or user_attr rather than sid_attr to fetch all desired
+ attributes for an account right away.
+ (cyg_ldap::next_account): Store found SID in last_fetched_sid to
+ skip calls to fetch_ad_account from fetch_account_from_windows.
+ (cyg_ldap::get_string_attribute): Remove method taking index argument.
+ (cyg_ldap::get_num_attribute): Ditto.
+ * pwdgrp.h (class pg_ent): Fix formatting. Add member dom.
+ * passwd.cc (pg_ent::enumerate_ad): Store current flat domain name
+ in dom. Construct fetch_acc_t argument from LDAP attributes and
+ call fetch_account_from_windows with that.
+ * userinfo.h (enum fetch_user_arg_type_t): Rename FULL_grp_arg to
+ FULL_acc_arg. Change throughout.
+ (struct fetch_acc_t): Rename from fetch_full_grp_t. Change throughout.
+ (struct fetch_user_arg_t): Rename full_grp to full_acc. Change
+ throughout.
+
+2015-02-24 Corinna Vinschen <corinna@vinschen.de>
+
+ * fhandler.h (class fhandler_base): Add was_nonblocking status flag.
+ * fhandler.cc (fhandler_base::set_flags): Set was_nonblocking if the
+ O_NONBLOCK flag has been specified.
+ (fhandler_base_overlapped::close): Check for was_nonblocking instead
+ of for is_nonblocking. Explain why.
+ (fhandler_base::set_nonblocking): Set was_nonblocking if noblocking
+ mode gets enabled.
+
+2015-02-24 Ken Brown <kbrown@cornell.edu>
+
+ * include/sys/socket.h (sockatmark): Add prototype.
+
+2015-02-23 Corinna Vinschen <corinna@vinschen.de>
+
+ * userinfo.h (struct fetch_full_grp_t): Define only when building
+ Cygwin itself.
+ (struct fetch_user_arg_t): Ditto.
+
+2015-02-23 Corinna Vinschen <corinna@vinschen.de>
+
+ * autoload.cc (LsaLookupSids): Import.
+ * cygserver_pwdgrp.h: Include userinfo.h. Drop workaround defining
+ fetch_user_arg_type_t locally.
+ * grp.cc (internal_getgrsid_cachedonly): New function.
+ (internal_getgrfull): Ditto.
+ (internal_getgroups): Rearrange function. Center around fetching all
+ cached group info first, calling LsaLookupSids on all so far non-cached
+ groups second. Pass all available info to new internal_getgrfull call.
+ * pwdgrp.h: Include userinfo.h. Move definitions of
+ fetch_user_arg_type_t and fetch_user_arg_t there.
+ (pwdgrp::add_group_from_windows): Declare with getting full group info.
+ Called from internal_getgrfull.
+ * uinfo.cc (pwdgrp::add_group_from_windows): Define.
+ (pwdgrp::fetch_account_from_line): Add default case.
+ (pwdgrp::fetch_account_from_file): Ditto.
+ (pwdgrp::fetch_account_from_windows): Handle FULL_grp_arg.
+ (client_request_pwdgrp::client_request_pwdgrp): Add default case.
+ * userinfo.h: New header.
+ (enum fetch_user_arg_type_t): Add FULL_grp_arg.
+ (struct fetch_full_grp_t): New datatype.
+
+2015-02-23 Corinna Vinschen <corinna@vinschen.de>
+
+ * grp.cc (internal_getgroups): Check for group attributes and
+ Everyone sid before calling internal_getgrsid.
+
+2015-02-23 Corinna Vinschen <corinna@vinschen.de>
+
+ * cygwait.h (enum cw_wait_mask): Add cw_sig_restart. Add comments
+ to explain the meaning of the possible values.
+ * cygwait.cc (is_cw_sig_restart): Define.
+ (is_cw_sig_handle): Check for cw_sig_restart as well.
+ (cygwait): Restart always if cw_sig_restart is set.
+ * thread.cc (pthread::join): Call cygwait with cw_sig_restart flag
+ to avoid having to handle signals at all.
+
+2015-02-23 Corinna Vinschen <corinna@vinschen.de>
+
+ * cygwait.cc (cygwait): Move setting res to WAIT_SIGNALED to clarify
+ when WAIT_SIGNALED is returned to the caller.
+
+2015-02-23 Corinna Vinschen <corinna@vinschen.de>
+
+ * winsup.h (SIGTOMASK): Add cast to sigset_t to avoid int overflow.
+
+2015-02-20 Corinna Vinschen <corinna@vinschen.de>
+
+ * grp.cc (internal_getgroups): Take additional timeout_ns parameter.
+ Restrict fetching group account entries from user token groups by
+ timeout_ns 100ns-intervals. Add preceding comment to explain why.
+ * pwdgrp.h (internal_getgroups): Align prototype.
+ * times.cc (GetTickCount_ns): New function.
+ * uinfo.cc (internal_getlogin): Call internal_getgroups wih 300ms
+ timeout.
+ * winsup.h (GetTickCount_ns): Declare.
+
+2015-02-19 Jon TURNEY <jon.turney@dronecode.org.uk>
+
+ * Makefile.in (sigfe.o): Use CFLAGS.
+
+2015-02-19 Jon TURNEY <jon.turney@dronecode.org.uk>
+
+ * include/cygwin/stdlib.h (initstate, random, setstate, srandom):
+ Check if __XSI_VISIBLE is set by sys/cdefs.h, rather than testing
+ for _XOPEN_SOURCE directly, to work correctly when _GNU_SOURCE is
+ set.
+
+2015-02-19 Corinna Vinschen <corinna@vinschen.de>
+
+ * sec_acl.cc (setacl): Always grant owner FILE_WRITE_ATTRIBUTES access.
+
+2015-02-18 Corinna Vinschen <corinna@vinschen.de>
+
+ * ldap.cc (struct cyg_ldap_search): Add scope member.
+ (cyg_ldap::search_s): Add parameter scope. Use as LDAP search scope
+ instead of fixed LDAP_SCOPE_SUBTREE scope.
+ (ldap_search_thr): Call cyg_ldap::search_s with scope from argument.
+ (cyg_ldap::search): Add parameter scope and fill in to cyg_ldap_search.
+ (cyg_ldap::fetch_ad_account): Call search with LDAP_SCOPE_SUBTREE scope.
+ (cyg_ldap::fetch_posix_offset_for_domain): Call search with
+ LDAP_SCOPE_ONELEVEL scope.
+ (cyg_ldap::fetch_unix_sid_from_ad): Call search with LDAP_SCOPE_SUBTREE
+ scope.
+ (cyg_ldap::fetch_unix_name_from_rfc2307): Ditto.
+ * ldap.h (cyg_ldap::search): Align prototype to above change.
+ (cyg_ldap::search_s): Ditto.
+
+2015-02-18 Corinna Vinschen <corinna@vinschen.de>
+
+ * ldap.cc: Macro-ize filter expressions. Use throughout to compute
+ required filter buffer size if filter is a local buffer.
+
+2015-02-17 Corinna Vinschen <corinna@vinschen.de>
+
+ * ldap.cc (cyg_ldap::fetch_posix_offset_for_domain): Drop stray
+ system_printf.
+
+2015-02-17 Corinna Vinschen <corinna@vinschen.de>
+
+ * ldap.h (class cyg_ldap): Rename rootdse to def_context. Change
+ throughout.
+ * ldap.cc (cyg_ldap::open): Fix debug output.
+ (cyg_ldap::fetch_ad_account): Rename rdse to base. Restrict LDAP
+ query to users and groups only.
+ (cyg_ldap::enumerate_ad_accounts): Rearrange filter expression for
+ user accounts.
+ (SYSTEM_CONTAINER): New macro.
+ (cyg_ldap::fetch_posix_offset_for_domain): Set base in LDAP search
+ to the "System" container in the default naming context to restrict
+ the search scope.
+ (cyg_ldap::fetch_unix_sid_from_ad): Add objectCategory=Person to
+ search filter for users.
+
+2015-02-16 Corinna Vinschen <corinna@vinschen.de>
+
+ * spawn.cc (find_exec): Extend preceeding comment to explain more
+ detailed what's going on in this function. Overwrite potential symlink
+ target with original path.
+
+2015-02-15 Corinna Vinschen <corinna@vinschen.de>
+
+ * i686.din (__mempcpy): Move symbol export from here...
+ * common.din (__mempcpy): ... to here.
+
+2015-02-14 Corinna Vinschen <corinna@vinschen.de>
+
+ * path.h (path_conv): Make path_flags private. Rename known_suffix to
+ suffix and make private. Rename normalized_path to posix_path and
+ make privtae. Accommodate name changes throughout in path_conv
+ methods.
+ (path_conv::known_suffix): New method. Use throughout instead of
+ accessing suffix directly.
+ (path_conv::get_win32): Constify.
+ (path_conv::get_posix): New method to read posix_path. Use throughout
+ instead of accessing normalized_path directly.
+ (path_conv::set_posix): Rename from set_normalized_path. Accommodate
+ name change throughout.
+
+ * spawn.cc (find_exec): Return POSIX path, not Win32 path.
+
+2015-02-12 Corinna Vinschen <corinna@vinschen.de>
+
+ * sec_acl.cc (setacl): Introduce bool array "invalid" to note the
+ invalidation of incoming acl entries while iterating over them.
+
+2015-02-12 Corinna Vinschen <corinna@vinschen.de>
+
+ * cygheap.h (cygheap_pwdgrp::get_home): Add dnsdomain parameter to
+ declaration in ldap-related method.
+ (cygheap_pwdgrp::get_shell): Ditto.
+ (cygheap_pwdgrp::get_gecos): Ditto.
+ * ldap.cc (cyg_ldap::open): Use NO_ERROR instead of 0.
+ (cyg_ldap::close): Reset last_fetched_sid.
+ (cyg_ldap::fetch_ad_account): Return immediately if sid is the same as
+ last_fetched_sid. Open LDAP connection from here. Move initialization
+ of rdse after open call. Set last_fetched_sid if LDAP call was
+ successful.
+ * ldap.h (class cyg_ldap): Add member last_fetched_sid.
+ (cyg_ldap::cyg_ldap): Initialize last_fetched_sid.
+ (cyg_ldap::is_open): New inline method.
+ * uinfo.cc (cygheap_pwdgrp::init): Drop initialization of db_home,
+ db_shell and db_gecos with "cygwin desc", thus only using the fallback
+ by default.
+ (fetch_windows_home): Add parameter dnsdomain. Call
+ cyg_ldap::fetch_ad_account if required.
+ (fetch_from_path): Add parameter dnsdomain. Call fetch_windows_home
+ accordingly.
+ (cygheap_pwdgrp::get_home): Accomodate call to fetch_windows_home.
+ Add dnsdomain parameter in ldap-related method. Call
+ cyg_ldap::fetch_ad_account if required.
+ (cygheap_pwdgrp::get_shell): Ditto.
+ (cygheap_pwdgrp::get_gecos): Ditto.
+ (pwdgrp::fetch_account_from_windows): Drop cyg_ldap::open call prior to
+ cyg_ldap::fetch_ad_account call. Set is_current_user to true if we're
+ handling the current user account. Make sure to perform the LDAP calls
+ only for users, and only if required.
+
+2015-02-11 Corinna Vinschen <corinna@vinschen.de>
+
+ * flock.cc (fhandler_base::lock): Convert accidental system_printf to
+ debug_printf in case of non-matching file modes. Clear up debug output.
+
+2015-02-11 Corinna Vinschen <corinna@vinschen.de>
+
+ * dlfcn.cc (check_path_access): Drop FE_NATIVE from find_exec call.
+ (gfpod_helper): Drop equality sign from environment variable name
+ in call to check_path_access.
+ * exec.cc (execlp): Drop equality sign from environment variable name
+ in call to find_exec.
+ (execvp): Ditto.
+ (execvpe): Ditto.
+ * path.h (enum fe_types): Drop FE_NATIVE.
+ (find_exec): Rename third paramter in declaration from search. Drop
+ equality sign from default value.
+ * spawn.cc (perhaps_suffix): Add PC_POSIX to path_conv::check call.
+ (find_exec): Simplify function. Iterate over POSIX pathlist rather
+ than Windows pathlist. Drop handling of FE_NATIVE flag. Always fill
+ posix path of incoming path_conv buf, unless FE_NNF flag is given.
+ (av::setup): Drop equality sign from environment variable name
+ in call to find_exec. Call unshift with normalized_path.
+ * winf.cc (av::unshift): Drop conv parameter and code converting
+ Windows to POSIX path.
+ * winf.h (av::unshift): Accommodate prototype.
+
+2015-02-10 Corinna Vinschen <corinna@vinschen.de>
+
+ * syscalls.cc (fhandler_base::stat_fixup): Generate unique inode number
+ for /dev/tty under all circumstances. Add to comment.
+
+2015-02-06 Corinna Vinschen <corinna@vinschen.de>
+
+ * common.din: Export cabsl, cimagl, creall, finitel, hypotl, sqrtl.
+ * include/cygwin/version.h (CYGWIN_VERSION_API_MINOR): Bump.
+
+2015-02-06 Corinna Vinschen <corinna@vinschen.de>
+
+ * include/cygwin/version.h (CYGWIN_VERSION_DLL_MINOR): Bump to 35.
+
+2015-02-06 Corinna Vinschen <corinna@vinschen.de>
+
+ * fhandler_proc.cc (format_proc_cpuinfo): Enable multi-core fields
+ on Intel CPUs.
+
+2015-02-04 Corinna Vinschen <corinna@vinschen.de>
+
+ * common.din (wcstold): Export.
+ * include/cygwin/version.h (CYGWIN_VERSION_API_MINOR): Bump.
+
+2015-02-03 Corinna Vinschen <corinna@vinschen.de>
+
+ * mkvers.sh: Automate generating the copyright date in the version
+ resource.
+ * winver.rc: Ditto.
+
+2015-01-28 Corinna Vinschen <corinna@vinschen.de>
+
+ * Makefile.in (VERSION_OFILES): New variable containing object files
+ with version information. Use throughout.
+ (clean): Drop winver_stamp.
+ (version.cc winver.o): Drop empty rule.
+ (winver_stamp): Convert to rule targeting version.cc and winver.o
+ directly. Drop touching winver_stamp. Fix typo.
+
+2015-01-24 Corinna Vinschen <corinna@vinschen.de>
+
+ * uname.cc (uname): Shorten "WOW64" to "WOW" to account for the new
+ Windows 10 OS version "10.0" starting with preview build 9926.
+
+2015-01-23 Pierre A. Humblet <pierre@phumblet.no-ip.org>
+
+ * net.cc (cygwin_inet_pton): Declare.
+ (gethostby_specials): New function.
+ (gethostby_helper): Change returned addrtype in 4-to-6 case.
+ (gethostbyname2): Call gethostby_specials.
+
+2015-01-22 Corinna Vinschen <corinna@vinschen.de>
+
+ * fhandler.h (class fhandler_process): Add fd_type member.
+ * fhandler_process.cc (process_tab): Fix indentation.
+ (fhandler_process::exists): Rely on format_process_fd returning file
+ type in fd_type.
+ (struct process_fd_t): Add fd_type member.
+ (fhandler_process::fill_filebuf): Allow format_process_fd to set
+ this->fd_type member.
+ (format_process_fd): Fix path evaluation to allow recognizing trailing
+ path components. Fix check for file descriptor path component. Return
+ virt_symlink in fd_type if no trailing path compenents exist, return
+ virt_fsdir otherwise and copy full resulting path into destbuf.
+ * path.cc (path_conv::check): If /proc/$PID/fd symlink has trailing
+ path components, reparse resulting path as if it's the incoming path.
+ Add comment to wail over the outdated and hackish check method, and to
+ explain what we do here.
+
+2015-01-21 Corinna Vinschen <corinna@vinschen.de>
+
+ * uinfo.cc (pwdgrp::fetch_account_from_windows): Allow fetching gid,
+ home, shell and gecos info from NT4 domain.
+
+2015-01-21 Corinna Vinschen <corinna@vinschen.de>
+
+ * sec_auth.cc (get_logon_server): Constify domain parameter.
+ * security.h (get_logon_server): Same in prototype.
+
+2015-01-20 Corinna Vinschen <corinna@vinschen.de>
+
+ * common.din (sockatmark): Export.
+ * net.cc (sockatmark): New function.
+ * include/cygwin/version.h (CYGWIN_VERSION_API_MINOR): Bump.
+
+2015-01-19 Corinna Vinschen <corinna@vinschen.de>
+
+ * cygserver_ipc.h (ipc_retval): Add default constructor.
+ (class thread): struct->class. Add prototypes for new private methods
+ dup_signal_arrived and close_signal_arrived. Implement constructor and
+ destructor.
+
+2015-01-16 Marco Atzeri <marco.atzeri@gmail.com>
+ Corinna Vinschen <corinna@vinschen.de>
+
+ * gendef: Export _sigbe on 64 bit as well.
+ * malloc_wrapper.cc (free): In malloc_printf, call caller_return_address
+ instead of __builtin_return_address.
+ (malloc): Ditto.
+ (realloc): Ditto.
+ (calloc): Ditto.
+ * miscfuncs.cc (__caller_return_address): New function.
+ * miscfuncs.h (caller_return_address): New macro calling
+ __caller_return_address.
+ (__caller_return_address): Add prototype.
+
+2015-01-14 Corinna Vinschen <corinna@vinschen.de>
+
+ * uinfo.cc (fetch_windows_home): Disable fetching from homeDrive or
+ usri3_home_dir_drive. Add comment.
+
+2015-01-14 Corinna Vinschen <corinna@vinschen.de>
+
+ * environ.cc (renv_arr): Drop variables not usually in a Windows
+ environment and all variables being uppercase anyway. But keep
+ TMP and TEMP for paranoia.
+
+2015-01-14 Corinna Vinschen <corinna@vinschen.de>
+
+ * environ.cc (build_env): When merging the user's Windows environment,
+ explicitely skip the variables needing conversion to avoid collisions.
+ Extend comment to explain.
+
+2015-01-13 Corinna Vinschen <corinna@vinschen.de>
+
+ * uinfo.cc (pwdgrp::fetch_account_from_windows): Drop code from
+ 2014-11-17, always prepending domain to NT SERVICE accounts when
+ searching by name. Fix test expression to allow fully qualified
+ names for NT SERVICE accounts. Extend comment to explain a bit.
+
+2015-01-12 Pierre A. Humblet <pierre@phumblet.no-ip.org>
+
+ * minires-os-if.c (cygwin_query): Change questions into answers.
+
+2015-01-08 Corinna Vinschen <corinna@vinschen.de>
+
+ * cygheap.h (cygheap_pwdgrp::get_shell): Add sid to argument list.
+ (cygheap_pwdgrp::get_gecos): Ditto.
+ * uinfo.cc (fetch_windows_home): Accept cyg_ldap and PUSER_INFO_3
+ arguments, and fetch db home dir values right here.
+ (fetch_from_path): Accept cyg_ldap, PUSER_INFO_3 pointers and sid
+ arguments. Add '%H' format specifier to fetch Windows home dir in
+ POSIX notation.
+ (cygheap_pwdgrp::get_home): Accommodate changes to fetch_windows_home
+ and fetch_from_path.
+ (cygheap_pwdgrp::get_shell): Ditto.
+ (cygheap_pwdgrp::get_gecos): Ditto.
+ (pwdgrp::fetch_account_from_windows): Accommodate sid argument to
+ cygheap_pwdgrp::get_shell and cygheap_pwdgrp::get_gecos.
+
+2015-01-08 Corinna Vinschen <corinna@vinschen.de>
+
+ * include/cygwin/socket.h (struct cmsghdr): Redefine cmsg_len as type
+ size_t. Add comment to explain why.
+
+2015-01-08 Corinna Vinschen <corinna@vinschen.de>
+
+ * localtime.cc (__cygwin_gettzoffset): New function for access from
+ newlib.
+ (__cygwin_gettzname): Ditto.
+
+2015-01-07 Corinna Vinschen <corinna@vinschen.de>
+
+ * localtime.cc (tzload): Fix loading latest timezone offsets into
+ tzinfo from zoneinfo files. Add comment to explain what we do.
+ (tzparse): Add more comments to explain in case of loading timezone
+ offset from other sources.
+
diff --git a/winsup/cygwin/ChangeLog.64bit b/winsup/CVSChangeLogs.old/cygwin/ChangeLog.64bit
index 3d91c9a4c..3d91c9a4c 100644
--- a/winsup/cygwin/ChangeLog.64bit
+++ b/winsup/CVSChangeLogs.old/cygwin/ChangeLog.64bit
diff --git a/winsup/doc/ChangeLog b/winsup/CVSChangeLogs.old/doc/ChangeLog-2015
index 6ff706446..0f8877b69 100644
--- a/winsup/doc/ChangeLog
+++ b/winsup/CVSChangeLogs.old/doc/ChangeLog-2015
@@ -1,3 +1,759 @@
+2015-12-21 Corinna Vinschen <corinna@vinschen.de>
+
+ * utils.xml (setfacl): Rename --substitute to --set.
+ * new-features.xml (ov-new2.4): Rephrase setfacl changes.
+
+2015-12-07 Johannes Schindelin <johannes.schindelin@gmx.de>
+
+ * pathnames.xml: Document the new usertemp file system type.
+
+2015-12-06 Corinna Vinschen <corinna@vinschen.de>
+
+ * new-features.xml (ov-new2.4): Document cygpath -U option.
+ * utils.xml (cygpath): Ditto.
+ * path.xml (func-cygwin-path): Add CCP_PROC_CYGDRIVE description.
+
+2015-11-25 David Macek <david.macek.0@gmail.com>
+
+ * faq-using.xml: Add MacType to the BLODA. Fix formatting.
+
+2015-11-24 David Macek <david.macek.0@gmail.com>
+
+ * pathnames.xml: Add a section describing peculiarities of how Cygwin
+ creates NTFS symlinks.
+
+2015-11-24 David Macek <david.macek.0@gmail.com>
+
+ * faq-using.xml: Add Forefront TMG to the BLODA.
+
+2015-11-21 Corinna Vinschen <corinna@vinschen.de>
+
+ * new-features.xml (ov-new2.4): Document fa_IR and ps_AF locale fixes.
+
+2015-11-18 Corinna Vinschen <corinna@vinschen.de>
+
+ * new-features.xml (ov-new2.4): Add new ACL changes.
+
+2015-11-18 Corinna Vinschen <corinna@vinschen.de>
+
+ * utils.xml (setfacl): Accommodate -b/-k change.
+ * new-features.xml (ov-new2.4): Add setfacl -b/-k change.
+
+2015-11-18 Corinna Vinschen <corinna@vinschen.de>
+
+ * utils.xml (setfacl): Show new option output.
+ (getfacl): Show new option output.
+
+2015-11-17 Yaakov Selkowitz <yselkowi@redhat.com>
+
+ * new-features.xml (ov-new2.4): New section. Document rpmatch.
+ * posix.xml (std-bsd): Add rpmatch.
+
+2015-11-02 Corinna Vinschen <corinna@vinschen.de>
+
+ * new-features.xml (ov-new2.3): Document Parallels Desktop FS support.
+
+2015-10-27 Corinna Vinschen <corinna@vinschen.de>
+
+ * new-features.xml (ov-new2.3): Document strftime %s addition.
+
+2015-10-22 Corinna Vinschen <corinna@vinschen.de>
+
+ * posix.xml (std-iso): New section.
+ (std-deprec): Rearrange title text.
+ * new-features.xml (ov-new2.3): Document aligned_alloc, at_quick_exit,
+ quick_exit.
+
+2015-10-06 Ken Brown <kbrown@cornell.edu>
+
+ * faq-using.xml (faq.using.same-with-permissions): New entry.
+
+2015-09-07 Brian Inglis <Brian.Inglis@SystematicSw.ab.ca>
+
+ * faq-using.xml (faq.using.man): Replace makewhatis with mandb.
+
+2015-08-29 Corinna Vinschen <corinna@vinschen.de>
+
+ * new-features.xml (ov-new2.3): Document sysconf cache addition.
+
+2015-08-27 Corinna Vinschen <corinna@vinschen.de>
+
+ * new-features.xml (ov-new2.3): New section, document posix_madvise
+ POSIX_MADV_WILLNEED/POSIX_MADV_DONTNEED change.
+
+2015-08-18 Jon Turney <jon.turney@dronecode.org.uk>
+
+ * faq-using.xml (faq.using.bloda): Add Lavasoft Web Companion to
+ BLODA list.
+
+2015-08-03 Jon Turney <jon.turney@dronecode.org.uk>
+
+ * faq-programming.xml: Improve debugging-cygwin answer.
+
+2015-07-21 Corinna Vinschen <corinna@vinschen.de>
+
+ * new-features.xml (ov-new2.2): Document sigsetjmp, siglongjmp.
+
+2015-07-17 Corinna Vinschen <corinna@vinschen.de>
+
+ * new-features.xml (ov-new2.2): Add new section. Document getcontext,
+ setcontext, makecontext, swapcontext.
+ * posix.xml (std-deprec): Add getcontext, setcontext, makecontext,
+ swapcontext.
+
+2015-07-05 Jon Turney <jon.turney@dronecode.org.uk>
+
+ * configure.ac: Add check for DOCBOOK2XTEXI
+ * configure: Regenerate.
+ * Makefile.in (DOCBOOK2XTEXI): Use.
+
+2015-06-22 Jon Turney <jon.turney@dronecode.org.uk>
+
+ * README: Update.
+
+2015-06-22 Jon Turney <jon.turney@dronecode.org.uk>
+
+ * Makefile.in (FAQ_SOURCES): Remove and generate with xidepend.
+
+2015-06-22 Jon Turney <jon.turney@dronecode.org.uk>
+
+ * utils.xml: Remove 'Usage' prefix from synopses.
+
+2015-06-22 Jon Turney <jon.turney@dronecode.org.uk>
+
+ * Makefile.in (intro2man.stamp): Add.
+ * intro.xml: New file.
+
+2015-06-22 Jon Turney <jon.turney@dronecode.org.uk>
+
+ * Makefile.in (install-info, cygwin-ug-net.info)
+ (cygwin-api.info): Add.
+ * cygwin-ug-net.xml: Add texinfo-node.
+ * cygwin-api.xml: Ditto.
+ * ntsec.xml (db_home): Add texinfo-node for titles containing a
+ ':' which are the targets of an xref.
+
+2015-06-20 Corinna Vinschen <corinna@vinschen.de>
+
+ * new-features.xml (ov-new2.1): Add alterante signal stack info.
+ * posix.xml (std-susv4): Move sigaltstack here.
+
+2015-06-19 Jon Turney <jon.turney@dronecode.org.uk>
+
+ * Makefile.in (install-man): Fix command to create man3 install
+ directory.
+
+2015-06-17 Jon Turney <jon.turney@dronecode.org.uk>
+
+ * man.xsl: New file.
+ * Makefile.in (utils2man.stamp, api2man.stamp): Use it.
+
+2015-06-17 Jon Turney <jon.turney@dronecode.org.uk>
+
+ * Makefile.in (api2man.stamp): Add rules to build and install
+ manpages for cygwin-api.
+
+2015-06-17 Jon Turney <jon.turney@dronecode.org.uk>
+
+ * cygwin-api.xml: Move introductory paragraph here.
+ * logon-funcs.xml: Convert from using a sect2 element to using a
+ refentry element for each function.
+ * misc-funcs.xml: Ditto.
+ * path.xml: Ditto.
+
+2015-06-17 Jon Turney <jon.turney@dronecode.org.uk>
+
+ * fo.xsl: Render funcsynopsis elements as ANSI style function
+ prototypes.
+ * html.xsl: Ditto.
+
+2015-06-17 Jon Turney <jon.turney@dronecode.org.uk>
+
+ * html.xsl: Renamed from cygwin.xsl.
+
+2015-06-17 Corinna Vinschen <corinna@vinschen.de>
+
+ * posix.xml (std-bsd): Add sethostname.
+
+2015-06-17 Corinna Vinschen <corinna@vinschen.de>
+
+ * new-features.xml (ov-new): Rename from ov-new1.7.
+ (ov-new2.1): Add new section. Document sethostname.
+
+2015-06-12 Jon Turney <jon.turney@dronecode.org.uk>
+
+ * Makefile.in (install-man, utils2man.stamp): Add rules to build
+ and install manpages for utils.
+
+2015-06-12 Jon Turney <jon.turney@dronecode.org.uk>
+
+ * utils.xml : Convert from using a sect2 element to using a
+ refentry element for each utility program.
+ * cygwin.xsl: Customize autotoc to include refentries.
+ * fo.xsl: Ditto.
+
+2015-06-12 Jon Turney <jon.turney@dronecode.org.uk>
+
+ * Makefile.in (cygwin-ug-net/cygwin-ug-net-nochunks.html.gz):
+ Ensure cygwin-ug-net directory exists.
+
+2015-06-12 Jon Turney <jon.turney@dronecode.org.uk>
+
+ * xidepend: Write a Makefile fragment defining variables
+ containing all the XIncluded sources, rather than a dependency on
+ those sources.
+ * Makefile.in: Use that variable to express the dependency.
+
+2015-06-12 Jon Turney <jon.turney@dronecode.org.uk>
+
+ * Makefile.in (cygwin-ug-net/cygwin-ug-net.pdf)
+ (cygwin-api/cygwin-api.pdf): Use fo.xsl to customized DocBook
+ XML->PDF conversion.
+
+2015-06-12 Jon Turney <jon.turney@dronecode.org.uk>
+
+ * cygwin-ug-net.xml: Remove incorrect unused date.
+ * utils.xml : Remove .exe suffix inconsistently added in a few
+ places. Tidy up some trailing whitespace.
+
+2015-06-12 Jon Turney <jon.turney@dronecode.org.uk>
+
+ * xidepend: Fix to handle relative pathnames.
+
+2015-06-12 Jon Turney <jon.turney@dronecode.org.uk>
+
+ * Makefile.in (.PHONY): Remove tarball target.
+
+2015-06-04 Jon Turney <jon.turney@dronecode.org.uk>
+
+ * Makefile.in: Remove ancient unused rules to make a documentation
+ tarball.
+
+2015-06-01 Jon Turney <jon.turney@dronecode.org.uk>
+
+ * ov-ex-unix.xml: Remove unhelpful mention of and inaccurate size
+ estimate for installing everything.
+ * ov-ex-win.xml: Ditto.
+
+2015-04-27 Mike DePaulo <mikedep333@gmail.com>
+
+ * cygserver.xml (install-cygserver): Add new section. How to install
+ Cygserver.
+
+2015-04-10 Corinna Vinschen <corinna@vinschen.de>
+
+ * new-features.xml (ov-new2.0): Rename from ov-new1.7.36 and change
+ version number to 2.0.
+
+2015-04-02 David A. Wheeler <dwheeler@dwheeler.com>
+
+ * faq-setup.xml: Document how Cygwin secures installation and
+ update against man-in-the-middle (MITM) attacks. Note that
+ setup embeds a public key to check the signature of setup.ini,
+ and that setup.ini includes SHA-512 cryptographic hashes.
+
+2015-03-31 Jon TURNEY <jon.turney@dronecode.org.uk>
+
+ * misc-funcs.xml (cygwin_internal): Correct return type.
+
+2015-03-31 Corinna Vinschen <corinna@vinschen.de>
+
+ * new-features.xml (ov-new1.7.36): Add new section. Document GNU
+ basename.
+
+2015-03-30 Yaakov Selkowitz <yselkowi@redhat.com>
+
+ * posix.xml (std-gnu): Add basename.
+ (std-notes): Add note about two forms of basename.
+
+2015-03-13 Jon TURNEY <jon.turney@dronecode.org.uk>
+
+ * Makefile.in (prefix): Define.
+
+2015-03-12 Corinna Vinschen <corinna@vinschen.de>
+
+ * ntsec.xml (ntsec-mapping-nsswitch-desc): Fix typo.
+ (ntsec-mapping-samba): Ditto.
+
+2015-03-12 Corinna Vinschen <corinna@vinschen.de>
+
+ * ntsec.xml (ntsec-mapping-passwdinfo): Drop the word "Note" from
+ a note.
+ (ntsec-mapping-nsswitch): Fix typo.
+
+2015-03-10 Corinna Vinschen <corinna@vinschen.de>
+
+ * faq-programming.xml: Accommodate switch of Cygwin repo to GIT.
+ * setup-net.xml: Ditto.
+
+2015-03-04 Corinna Vinschen <corinna@vinschen.de>
+
+ * posix.xml (std-bsd): Add issetugid.
+
+2015-03-03 Corinna Vinschen <corinna@vinschen.de>
+
+ * new-features.xml (ov-new1.7.35): Add SIGSYS change.
+
+2015-03-03 Corinna Vinschen <corinna@vinschen.de>
+
+ * new-features.xml (ov-new1.7.35): Add new section.
+
+2015-02-28 Corinna Vinschen <corinna@vinschen.de>
+
+ * utils.xml (getfacl): Adjust options to option nmame change.
+
+2015-02-25 Warren Young <warren@etr-usa.com>
+
+ * faq-using.xml (faq.using.ssh-pubkey-stops-working): More
+ improvements to the chgrp None hack to account for domains
+ and non-English versions of Windows.
+
+2015-02-25 Corinna Vinschen <corinna@vinschen.de>
+
+ * ntsec.xml (ntsec-mapping): Match the description of the default
+ values for db_home, db_shell, and db_gecos to the latest changes.
+
+2015-02-24 Warren Young <warren@etr-usa.com>
+
+ * faq-using.xml (faq.using.ssh-pubkey-stops-working): Added the
+ chgrp None ~/.ssh/* fix for SSH key failure in Cygwin 1.7.34+.
+
+2015-02-17 Warren Young <warren@etr-usa.com>
+
+ * faq-using.xml (faq.using.startup-slow): Applied Andrey Repin's
+ improvements <anrdaemon@yandex.ru>, plus made a few minor ones
+ of my own.
+
+2015-02-16 Corinna Vinschen <corinna@vinschen.de>
+
+ * setup-files.xml (setup-files): Drop hint to set HOME in Windows
+ environment.
+ * setup-env.xml (setup-env-ov): Discourage setting HOME in the Windows
+ environment.
+
+2015-02-15 Corinna Vinschen <corinna@vinschen.de>
+
+ * posix.xml (std-gnu): Add missing __mempcpy.
+
+2015-02-12 Corinna Vinschen <corinna@vinschen.de>
+
+ * ntsec.xml: Throughout fix references to the Cygwin version number.
+
+2015-02-11 Warren Young <warren@etr-usa.com>
+
+ * faq-using.xml (faq.using.startup-slow): New entry.
+
+2015-02-06 Corinna Vinschen <corinna@vinschen.de>
+
+ * posix.xml (std-susv4): Move cabsl, cimagl, creall, hypotl, sqrtl here
+ from std-notimpl. Add finitel.
+
+2015-02-04 Corinna Vinschen <corinna@vinschen.de>
+
+ * posix.xml (std-susv4): Move wcstold here from std-notimpl.
+
+2015-02-04 Corinna Vinschen <corinna@vinschen.de>
+
+ * new-features.xml (ov-new1.7.34): Add wcstold.
+
+2015-02-04 Corinna Vinschen <corinna@vinschen.de>
+
+ * faq-using.xml (faq.using.ssh-pubkey-stops-working): New entry.
+ (faq.using.same-with-rhosts): Ditto.
+
+2015-02-03 Corinna Vinschen <corinna@vinschen.de>
+
+ * utils.xml (regtool): Clarify save action. Add description for
+ restore action.
+ * new-features.xml (ov-new1.7.34): Add regtool restore.
+
+2015-02-03 Corinna Vinschen <corinna@vinschen.de>
+
+ * Throughout, replace http with https as far as cygwin.com and
+ sourceware.org URLs are concerned.
+ * Throughout, simplify ulink expressions if the visible text is the
+ URL anyway.
+ * faq-programming.xml (faq.programming.dll-relocatable): Remove.
+ * faq-setup.xml (faq.setup.name-with-space): Change for 1.7.34.
+ (faq.setup.home): Ditto.
+ * faq-using.xml (faq.using.printing): Clarify old links and availability
+ of a2ps and file.
+ (faq.using.xemacs): Drop outdated version info and pointers to native
+ XEmacs.
+ (faq.using.ntemacs): Remove.
+ * faq-what.xml (faq.what.what): Rephrase to reflect reality.
+ (faq.what.supported): Ditto.
+ (faq.what.who): Rephrase slightly.
+ * legal.xml: Bump copyright.
+ * setup-net.xml (internet-setup): Fix references to setup executables.
+
+2015-01-23 Pierre A. Humblet <phumblet@phumblet.no-ip.org>
+ Corinna Vinschen <corinna@vinschen.de>
+
+ * new-features.xml (ov-new1.7.34): Add extension of gethostbyname2.
+ Add sockatmark.
+
+2015-01-20 Corinna Vinschen <corinna@vinschen.de>
+
+ * posix.xml (std-susv4): Move sockatmark here from std-notimpl.
+
+2015-01-14 Corinna Vinschen <corinna@vinschen.de>
+
+ * ntsec.xml (ntsec-mapping-nsswitch-passwd): Document /path %H wildcard.
+ (ntsec-mapping-nsswitch-home): Disable text explaining how the home
+ directory is fetched from the homeDrive attribute.
+
+2015-01-14 Corinna Vinschen <corinna@vinschen.de>
+
+ * cygwinenv.xml (cygwinenv-removed-options): Accommodate list of
+ always uppercased Windows variables to latest change.
+
+2014-12-18 Yaakov Selkowitz <yselkowitz@cygwin.com>
+
+ * ntsec.xml (ntsec-logonuser): Fix spelling of pw_passwd field.
+
+2014-12-18 Yaakov Selkowitz <yselkowitz@cygwin.com>
+
+ * new-features.xml (ov-new1.7.34): Document Solaris stdio_ext.h
+ functions and BSD/GNU unlocked stdio extensions.
+ * posix.xml (std-bsd): Add BSD unlocked stdio extensions.
+ (std-gnu): Add GNU unlocked stdio extensions.
+ (std-solaris): Add stdio_ext.h functions.
+
+2014-12-15 Corinna Vinschen <corinna@vinschen.de>
+
+ * new-features.xml (ov-new1.7.34): Add setfacl -k option.
+ * utils.xml (setfacl): Ditto.
+
+2014-12-10 Michael DePaulo <mikedep333@gmail.com>
+
+ * ntsec.xml (ntsec-mapping-samba): Clarify Samba file server setup.
+
+2014-12-10 Corinna Vinschen <corinna@vinschen.de>
+
+ * faq-using.xml (faq.using.bloda): Add Lenovo RapidBoot Shield to
+ BLODA list.
+
+2014-12-08 Corinna Vinschen <corinna@vinschen.de>
+
+ * faq-setup.xml (faq.setup.upgrade-mountpoints): Remove.
+ * pathnames.xml (pathnames-mount-ex): Remove note about 1.5->1.7
+ registry mount point updates.
+
+2014-12-06 Corinna Vinschen <corinna@vinschen.de>
+
+2014-12-06 Corinna Vinschen <corinna@vinschen.de>
+
+ * posix.xml (std-solaris): Point to libtirpc for xdr functions.
+
+2014-12-06 Corinna Vinschen <corinna@vinschen.de>
+
+ * cygwin.xsl (toc.section.depth): Set to 4.
+ * ntsec.xml: Revamp account mapping documentation to account for the
+ new db_home, db_shell, db_gecos settings.
+
+2014-12-05 Yaakov Selkowitz <yselkowitz@cygwin.com>
+
+ * new-features.xml (ov-new1.7.34): Document qsort_r and __bsd_qsort_r.
+ * posix.xml (std-bsd): Add qsort_r.
+ (std-gnu): Ditto.
+ (std-notes): Add section for qsort_r.
+
+2014-12-03 Corinna Vinschen <corinna@vinschen.de>
+
+ * new-features.xml (ov-new1.7.34): Add latest changes.
+
+2014-11-28 Yaakov Selkowitz <yselkowi@redhat.com>
+
+ * Makefile.in (XSLTPROC): Remove.
+ (cygwin-ug-net/cygwin-ug-net.pdf): Build with xmlto pdf.
+ (cygwin-api/cygwin-api.pdf): Ditto.
+ (faq/faq.html): Fix extraneous anchor removal.
+
+2014-11-24 Corinna Vinschen <corinna@vinschen.de>
+
+ * utils.xml (passwd): Align to latest changes.
+
+2014-11-13 Corinna Vinschen <corinna@vinschen.de>
+
+ * new-features.xml (ov-new1.7.34): Add new section.
+ (ov-new1.7.33): Reflect intermediate 1.7.33 release.
+
+2014-11-07 Corinna Vinschen <corinna@vinschen.de>
+
+ * utils.xml (mkgroup): Align to changed usage.
+ (mkpasswd): Ditto.
+
+2014-11-07 Corinna Vinschen <corinna@vinschen.de>
+
+ * utils.xml (mkpasswd): Change /etc/group to /etc/passwd.
+
+2014-11-05 Corinna Vinschen <corinna@vinschen.de>
+
+ * new-features.xml (ov-new1.7.33): Document xdr and atexit.
+
+2014-10-30 David Rothenberger <daveroth@acm.org>
+
+ * ntsec.xml: Fix typo.
+
+2014-10-29 Dave Habermann <dahabermann@dow.com>
+
+ * ntsec.xml (ntsec-mapping-caching): Describe service dependencies
+ in terms of cygserver.
+
+2014-10-28 Corinna Vinschen <corinna@vinschen.de>
+
+ * xidepend: Make PDF file dependent on the same input files as the
+ HTML file of the same name to trigger automatic rebuild of PDFs on
+ source file changes as well.
+
+2014-10-28 Corinna Vinschen <corinna@vinschen.de>
+
+ * cygwinenv.xml: Change default setting of dosfilewarning.
+ * new-features.xml (ov-new1.7.33): Document aforementioned change.
+
+2014-10-28 Corinna Vinschen <corinna@vinschen.de>
+
+ * ntsec.xml: Fix Solaris doc URLs.
+
+2014-10-28 Corinna Vinschen <corinna@vinschen.de>
+
+ * ntsec.xml: Try to make an expression less ambiguous.
+
+2014-10-27 Luke Kendall <luke.kendall@cisra.canon.com.au>
+ Corinna Vinschen <corinna@vinschen.de>
+
+ * ntsec.xml: More language fixes.
+
+2014-10-27 Corinna Vinschen <corinna@vinschen.de>
+
+ * new-features.xml (ov-new1.7.33): Document empty $PATH handling.
+
+2014-10-27 Corinna Vinschen <corinna@vinschen.de>
+
+ * new-features.xml (ov-new1.7.33): Fix paragraph order.
+
+2014-10-27 Corinna Vinschen <corinna@vinschen.de>
+
+ * highlights.xml: Rearrange itemizedlist markup slightly.
+ * new-features.xml (ov-new1.7.33): Add setfacl -b option.
+ * utils.xml (setfacl): Ditto.
+
+2014-10-24 Luke Kendall <luke.kendall@cisra.canon.com.au>
+
+ * ntsec.xml: More language and typo fixes.
+
+2014-10-23 Corinna Vinschen <corinna@vinschen.de>
+
+ * ntsec.xml: Fix language.
+
+2014-10-22 Corinna Vinschen <corinna@vinschen.de>
+
+ * Makefile.in: Create install targets.
+ (cygwin-ug-net/cygwin-ug-net.pdf): Create subdir to allow building PDF
+ even if subdir is missing.
+ (cygwin-api/cygwin-api.pdf): Ditto.
+ * configure.ac: Add AC_PROG_INSTALL rule.
+ * configure: Regenerate.
+ * new-features.xml (ov-new1.7.33): Add installation of docs.
+
+2014-10-22 Corinna Vinschen <corinna@vinschen.de>
+
+ * posix.xml (std-gnu): Add ffsl, ffsll, quotactl.
+ (std-notes): Add restrictions of quotactl.
+
+2014-10-22 Yaakov Selkowitz <yselkowi@redhat.com>
+
+ * new-features.xml (ov-new1.7.33): Document stime.
+ * posix.xml (std-deprec): Add stime.
+
+2014-10-22 Corinna Vinschen <corinna@vinschen.de>
+
+ * new-features.xml (ov-new1.7.33): s/Linux/glibc.
+
+2014-10-22 Corinna Vinschen <corinna@vinschen.de>
+
+ * new-features.xml (ov-new1.7.33): Update to current state.
+
+2014-09-05 Corinna Vinschen <corinna@vinschen.de>
+
+ * pathnames.xml (cygdrive): Add /proc/cygdrive description.
+
+2014-09-03 Corinna Vinschen <corinna@vinschen.de>
+
+ * utils.xml (setfacl): Align documentation to help text in setfacl.
+
+2014-08-31 Corinna Vinschen <corinna@vinschen.de>
+
+ * ntsec.xml (ntsec-common): Drop outdated comment about underdeveloped
+ Solaris ACL API support.
+
+2014-08-31 Corinna Vinschen <corinna@vinschen.de>
+
+ * utils.xml (setfacl): Drop outdated note that default ACEs are not
+ taken into account.
+
+2014-08-31 Corinna Vinschen <corinna@vinschen.de>
+
+ * ntsec.xml: Disable description of db_prefix and db_separator settings.
+
+2014-08-31 Corinna Vinschen <corinna@vinschen.de>
+
+ * utils.xml (getfacl): Document additional suid/sgid/vtx flag printing.
+
+2014-08-15 Corinna Vinschen <corinna@vinschen.de>
+
+ * configure.ac: Convert to new AC_INIT style.
+ * configure: Regenerate.
+
+2014-08-14 Corinna Vinschen <corinna@vinschen.de>
+
+ * cygwin-api.xml: Include misc-funcs.xml.
+ * misc-funcs.xml: New file.
+
+2014-08-14 Corinna Vinschen <corinna@vinschen.de>
+
+ * cygwin-api.xml: Move chapter tags from path.xml back here.
+ Include logon-funcs.xml.
+ * logon-funcs.xml: Moved from ../cygwin here and converted to XML.
+ * path.xml: Drop chapter tags. Create subsections.
+
+2014-08-14 Corinna Vinschen <corinna@vinschen.de>
+
+ * Makefile.in: Throughout use parenthesis instead of braces where
+ appropriate.
+ (DBXDIRS): Remove.
+ (XSLTPROC): Define for symmetry. Use throughout.
+ (clean): Drop removing cygwin-api.xml and doctool.*.
+ (cygwin-api.xml): Drop rule.
+ (doctool): Drop rule.
+ (Makefile.dep): Add dependency to cygwin-api.xml.
+ * cygwin-api.in.xml: Rename to cygwin-api.xml. Convert includes to
+ XML XInclude style.
+ * doctool.c: Remove.
+ * doctool.txt: Remove.
+ * faq-programming.xml: Drop reference to local utils.xml file.
+ * path.xml: Moved from ../cygwin and converted to XML.
+ * posix.xml: Ditto.
+ * using.xml: Drop relative path from utils.xml include.
+ * utils.xml: Moved from ../utils.
+
+2014-08-13 Corinna Vinschen <corinna@vinschen.de>
+
+ * new-features.xml (ov-new1.7.33): Add new section.
+ (ov-new1.7.32): Reflect intermediate 1.7.32 release.
+
+2014-08-06 Corinna Vinschen <corinna@vinschen.de>
+
+ * ntsec.xml (ntsec-mapping): Drop plus-prepended builtin accounts as
+ default setting. Add short explanation in db_prefix: always mode.
+ Fix a type. Drop a paragraph with redundant information.
+
+2014-08-03 Yaakov Selkowitz <yselkowitz@cygwin.com>
+
+ * faq-what.xml (faq.what.who): Remove mention of retired setup
+ maintainers. Add link to cygwin-pkg-maint.
+
+2014-07-31 Yaakov Selkowitz <yselkowitz@cygwin.com>
+
+ * faq-what.xml (faq.what.who): CGF has retired.
+
+2014-07-30 Corinna Vinschen <corinna@vinschen.de>
+
+ * ntsec.xml: Small improvments.
+
+2014-07-30 Corinna Vinschen <corinna@vinschen.de>
+
+ * new-features.xml: (ov-new1.7): Change section title.
+
+2014-07-30 Corinna Vinschen <corinna@vinschen.de>
+
+ * new-features.xml: (ov-new1.7.1): Add new section. Move old 1.7
+ sections into section level 3.
+
+2014-07-30 Corinna Vinschen <corinna@vinschen.de>
+
+ * cygwin.xsl: Allow 3 section levels in TOC.
+ * new-features.xml: (ov-new1.7.32): Add new section.
+ * ntsec.xml: Rename top-level section to reflect extension of topics.
+ Remove old /etc/passwd, /etc/group considerations. Add new sections
+ explaining Windows to POSIX account mapping. Make setuid sections
+ third level sections.
+ * pathnames.xml: Note new method of account mapping for fstab.d/$USER.
+ * faq-setup.xml: Rework references to /etc/passwd and /etc/group to
+ reflect changes to account handling.
+ * faq-using.xml: Ditto.
+
+2014-07-21 Corinna Vinschen <corinna@vinschen.de>
+
+ * new-features.xml: (ov-new1.7.31): Add new section.
+
+2014-06-26 Corinna Vinschen <corinna@vinschen.de>
+
+ * legal.xml: Fix copyright.
+
+2014-06-17 Christopher Faylor <me.cygwin2014@cgf.cx>
+
+ * faq-programming.xml: Add gettext-devel to list of packages needed to
+ build Cygwin.
+
+2014-04-04 Corinna Vinschen <corinna@vinschen.de>
+
+ * new-features.xml: (ov-new1.7.29): Fix incomplete XML tagging.
+
+2014-03-31 Christopher Faylor <me.cygwin2014@cgf.cx>
+
+ * new-features.xml: (ov-new1.7.29): Add new section.
+
+2014-01-29 Christopher Faylor <me.cygwin2014@cgf.cx>
+
+ * faq-setup.xml: Minor snapshot instruction rewording. Update
+ discussion about setup*.exe.
+ * faq-using.xml: Update information about setup*.exe.
+ * faq-what.xml: Ditto.
+
+2014-01-27 Corinna Vinschen <corinna@vinschen.de>
+
+ * new-features.xml (ov-new1.7.28): Add new section.
+
+2014-01-07 Mark Geisert <mark@maxrnd.com>
+
+ * faq-programming.xml: Update packages needed to build Cygwin.
+
+2013-12-07 Corinna Vinschen <corinna@vinschen.de>
+
+ * new-features.xml (ov-new1.7.27): Add new section.
+
+2013-11-29 Corinna Vinschen <corinna@vinschen.de>
+
+ * new-features.xml (ov-new1.7.26): Fix section ID and title. Add
+ posix_spawn item.
+
+2013-11-23 Corinna Vinschen <corinna@vinschen.de>
+
+ * new-features.xml (ov-new1.7.26): Add new section.
+
+2013-11-12 Tom Schutter <t.schutter@comcast.net>
+
+ * faq-setup.xml (faq.setup.uninstall-service): Describe how to unhook
+ cyglsa DLL from OS before uninstalling.
+
+2013-11-11 Corinna Vinschen <corinna@vinschen.de>
+
+ * faq-setup.xml: Throughout remove setup.exe, use setup or setup-x86...
+ instead.
+ (faq.setup.cli): Reproduce latest --help output.
+ (faq.setup.noroot): New section.
+ (faq.setup.setup-fails-on-ts): Remove section.
+ * setup-net.xml (internet-setup): Mention setup-x86{_64} in first
+ paragraph. Add note to allow using setup.exe in subsequent paragraphs.
+ Add paragraph to introduce --no-admin option.
+
+2013-11-06 Christopher Faylor <me.cygwin2013@cgf.cx>
+
+ * Makefile.in: Fix problems accessing xidepend when configured with a
+ (discouraged) relative path to source directory.
+
2013-08-23 Christopher Faylor <me.cygwin2013@cgf.cx>
* new-features.xml (ov-new1.7.25): Change wording.
diff --git a/winsup/lsaauth/ChangeLog b/winsup/CVSChangeLogs.old/lsaauth/ChangeLog-2015
index 0056d2bd2..81e3ab1aa 100644
--- a/winsup/lsaauth/ChangeLog
+++ b/winsup/CVSChangeLogs.old/lsaauth/ChangeLog-2015
@@ -1,3 +1,18 @@
+2014-08-15 Corinna Vinschen <corinna@vinschen.de>
+
+ * configure.ac: Convert to new AC_INIT style.
+ * configure: Regenerate.
+
+2013-12-03 Christopher Faylor <me.cygwin2013@cgf.cx>
+
+ * configure.ac: Back out stupid change.
+ * configure: Regenerate.
+
+2013-12-03 Christopher Faylor <me.cygwin2013@cgf.cx>
+
+ * configure.ac: Don't require 64-bit compiler for 32-bit builds.
+ * configure: Regenerate.
+
2013-07-29 Corinna Vinschen <corinna@vinschen.de>
* Makefile.in (cyglsa.dll): Explicitely specify DLL entry point to
diff --git a/winsup/lsaauth/ChangeLog.64bit b/winsup/CVSChangeLogs.old/lsaauth/ChangeLog.64bit
index 32ef85710..32ef85710 100644
--- a/winsup/lsaauth/ChangeLog.64bit
+++ b/winsup/CVSChangeLogs.old/lsaauth/ChangeLog.64bit
diff --git a/winsup/testsuite/ChangeLog b/winsup/CVSChangeLogs.old/testsuite/ChangeLog-2015
index 262971ea0..2e6ed5404 100644
--- a/winsup/testsuite/ChangeLog
+++ b/winsup/CVSChangeLogs.old/testsuite/ChangeLog-2015
@@ -1,3 +1,12 @@
+2015-10-27 Jon Turney <jon.turney@dronecode.org.uk>
+
+ * winsup.api/signal-into-win32-api.c: Remove execute permissions.
+
+2014-08-15 Corinna Vinschen <corinna@vinschen.de>
+
+ * configure.ac: Convert to new AC_INIT style.
+ * configure: Regenerate.
+
2012-11-26 Christopher Faylor <me.cygwin2012@cgf.cx>
* configure.ac: Rename from configure.in.
diff --git a/winsup/utils/ChangeLog-2000 b/winsup/CVSChangeLogs.old/utils/ChangeLog-2000
index 7ea5ae186..7ea5ae186 100644
--- a/winsup/utils/ChangeLog-2000
+++ b/winsup/CVSChangeLogs.old/utils/ChangeLog-2000
diff --git a/winsup/utils/ChangeLog b/winsup/CVSChangeLogs.old/utils/ChangeLog-2015
index 743913077..2ee81fa74 100644
--- a/winsup/utils/ChangeLog
+++ b/winsup/CVSChangeLogs.old/utils/ChangeLog-2015
@@ -1,3 +1,457 @@
+2015-12-25 Corinna Vinschen <corinna@vinschen.de>
+
+ * setfacl.cc (delacl): Remove unused local variable.
+
+2015-12-21 Corinna Vinschen <corinna@vinschen.de>
+
+ * setfacl.cc (delace): New helper function to delete a single ACE.
+ (delacl): Call delace.
+ (modacl): Ditto, if entry is supposed to get deleted. Align comments.
+
+2015-12-21 Corinna Vinschen <corinna@vinschen.de>
+
+ * setfacl.cc (modacl): Move recomputing mask into new function.
+ (check_got_mask): New function checking if mask is in input.
+ (recompute_mask): New function to recompute mask.
+ (addmissing): Align mask computation to Linux setfacl.
+ (setfacl): Call check_got_mask and recompute_mask on Set, Delete and
+ Modify actions.
+ (usage): Rename --substitute to --set.
+ (longopts): Add --set option.
+
+2015-12-20 Houder <houder@xs4all.nl>
+
+ * setfacl.cc (longopts): Drop accidentally requiring an argument to
+ the --mask and --no-mask options.
+
+2015-12-19 Houder <houder@xs4all.nl>
+
+ * setfacl.cc (opts): Add colon to x option.
+
+2015-12-06 Corinna Vinschen <corinna@vinschen.de>
+
+ * cygpath.cc (absolute_flag): Initialize to CCP_RELATIVE to simplify
+ expressions.
+ (cygdrive_flag): New global flag.
+ (long_options): Add --proc-cygdrive option.
+ (options): Add -U option.
+ (usage): Add description for -U option.
+ (do_sysfolders): Or cygdrive_flag to cygwin_conv_path call.
+ (do_pathconv): Simply or absolute_flag to conv_func. Or
+ cygdrive_flag to conv_func.
+ (do_options): Initalize absolute_flag to CCP_RELATIVE. Initialize new
+ cygdrive_flag. Set absolute_flag to CCP_ABSOLUTE on -a. Set
+ cygdrive_flag to CCP_PROC_CYGDRIVE on -U.
+
+2015-11-26 Michael Kwasigroch <mkwasigr@web.de>
+
+ * kill.cc (strsigno): Don't call sys_sigabbrev for signal 0.
+ (listsig): Don't call strsigno for signal 0.
+
+2015-11-18 Corinna Vinschen <corinna@vinschen.de>
+
+ * setfacl.c (action_t): Rename DeleteAll to DeleteExt. Add
+ DeleteAll. Rearrange for bit-wise testing later in the code.
+ (delallacl): Handle -b -k combination.
+ (setfacl): Handle DeleteExt/DeleteAll.
+ (usage): Fix -b/-k output. Rearrange output to better fill 80
+ columns.
+ (main): Allow to combine -b and -k.
+
+2015-11-18 Corinna Vinschen <corinna@vinschen.de>
+
+ Reapply POSIX ACL changes.
+
+ * getfacl.c (main): Special-case SYSTEM and Admins group. Add comments.
+
+ * setfacl.c: Align more to Linux tool.
+ (delacl): New function to delete acl entries only.
+ (modacl): Drop delete functionality. Add handling of recomputing the
+ mask and default mask values.
+ (delallacl): Rename from delacl.
+ (setfacl): Call delacl in Delete case. Call delallacl in DeleteAll
+ and DeleteDef case.
+ (usage): Accommodate new options. Rearrange and rephrase slightly.
+ (longopts): Emit 'x' in --delete case. Add --no-mask and --mask
+ options.
+ (opts): Add -x and -n options.
+ (main): Handle -d and -x the same. Handle -n and --mask options.
+ Drop handling for -r option.
+
+ * getfacl.c (usage): Align more closely to Linux version. Add new
+ options -c, -e, -E. Change formatting to accommodate longer options.
+ (longopts): Rename --noname to --numeric. Keep --noname for backward
+ compatibility. Add --omit-header, --all-effective and --no-effective
+ options.
+ (opts): Add -c, -e and -E option.
+ (main): Handle new -c, -e, and -E options.
+
+2015-10-22 Yaakov Selkowitz <yselkowi@redhat.com>
+
+ * getconf.c (conf_table): Add LEVEL*_CACHE_* variables.
+
+2015-08-30 Corinna Vinschen <corinna@vinschen.de>
+
+ * cygcheck.cc (dump_sysinfo): Fix missing commas in products array.
+
+2015-08-30 Corinna Vinschen <corinna@vinschen.de>
+
+ * cygcheck.cc (load_cygwin): Only unload cygwin DLL if not running
+ under a debugger. Explain why.
+
+2015-08-30 Corinna Vinschen <corinna@vinschen.de>
+
+ * cygcheck.cc (dump_sysinfo): Correctly handle Windows 10/Server 2016.
+ Add missing product types.
+
+2015-08-30 Corinna Vinschen <corinna@vinschen.de>
+
+ * cygcheck.cc (track_down): Skip error output for "api-ms-win-"
+ downlevel DLLs.
+
+2015-08-03 Corinna Vinschen <corinna@vinschen.de>
+
+ * strace.cc (main2): Don't call setvbuf on NULL descriptor.
+ Explicitely fclose ofile.
+
+2015-07-29 Corinna Vinschen <corinna@vinschen.de>
+
+ * strace.cc (main2): Rename from main.
+ (main): Make room for _cygtls area on stack and just call main2. Add
+ comment to explain why.
+
+2015-07-20 Corinna Vinschen <corinna@vinschen.de>
+
+ * ldd.cc (STATUS_DLL_NOT_FOUND): Drop definition.
+ (report): Handle STATUS_ENTRYPOINT_NOT_FOUND exception. Explain why.
+
+2015-07-08 Corinna Vinschen <corinna@vinschen.de>
+
+ * tzset.c (main): Check timezone and country case-insensitive.
+
+2015-06-07 Jon Turney <jon.turney@dronecode.org.uk>
+
+ * strace.cc (proc_child): Log process and thread create and exit,
+ and DLL load and unload.
+ (GetFileNameFromHandle): New function.
+
+2015-06-10 Corinna Vinschen <corinna@vinschen.de>
+
+ * ps.cc (main): Widen UID field in long format to accommodate longer
+ UIDs since Cygwin 1.7.34. Remove Windows 2000 considerations. Fix
+ comments accordingly.
+
+2015-06-08 Corinna Vinschen <corinna@vinschen.de>
+
+ * path.cc (from_fstab_line): Don't convert slashes to backslashes for
+ bind mounts. Explain why.
+
+2015-04-21 Corinna Vinschen <corinna@vinschen.de>
+
+ * tzmap-from-unicode.org: Convert Calcutta to Kolkata.
+ * tzmap.h: Regenerate.
+
+2015-02-28 Corinna Vinschen <corinna@vinschen.de>
+
+ * getfacl.c (usage): Change --all to --access, --dir to --default.
+ Align text to output of Linux tool.
+ (longopts): Add --access and --default options.
+
+2015-02-25 Corinna Vinschen <corinna@vinschen.de>
+
+ * mkgroup.c (MAX_SID_LEN): Remove. Instead, use SECURITY_MAX_SID_SIZE
+ throughout.
+ (enum_unix_groups): Introduce numeric_psid and rearrange code to avoid
+ potential heap corruption.
+ * mkpasswd.c: Ditto.
+
+2015-02-17 Ken Brown <kbrown@cornell.edu>
+
+ * dump_setup.cc (check_package_files): Accommodate postinstall
+ files in any directory whose name contains "/postinstall/", not
+ just /etc/postinstall.
+
+2015-02-03 Corinna Vinschen <corinna@vinschen.de>
+
+ * regtool.cc (longopts): Add --force option.
+ (opts): Add -f option.
+ (restore_flags): New variable.
+ (usage): Clarify working of save action. Add restore action. Add
+ description for -f/--force option.
+ (set_privilege): Drop function. The Cygwin DLL is doing that anyway.
+ (cmd_save): Drop call to set_privilege.
+ (cmd_restore): New function.
+ (main): Handle -f/--force option.
+
+2014-12-15 Corinna Vinschen <corinna@vinschen.de>
+
+ * setfacl.c (action_t): Add DeleteDef value.
+ (delacl): Take new parameter to differe between DeleteAll and DeleteDef.
+ Extend conditional to handle DefaultDef. Change comment accordingly.
+ (setfacl): Call delacl in DefaultDef case as well.
+ (usage): Add and describe -k option. Add -k to require options.
+ (longopts): Add --remove-default option.
+ (opts): Add -k option.
+ (main): Handle -k option.
+
+2014-12-05 Václav Zeman <vhaisman@gmail.com>
+
+ * tzmap-from-unicode.org: Create tzmap as const.
+ * tzmap.h: Regenerate.
+
+2014-12-05 Corinna Vinschen <corinna@vinschen.de>
+
+ * Makefile.in: Add rules to create and depend on tzmap.h.
+ * tzmap-from-unicode.org: New script to create tzmap.h.
+ * tzmap.h: New auto-generated file.
+ * tzset.c: Drop tzmap from here and include tzmap.h instead. Drop
+ Windows 2000 considerations.
+
+2014-11-28 Corinna Vinschen <corinna@vinschen.de>
+
+ * mkgroup.c (main): Call enum_local_groups with offset 0x30000 for local
+ machine, too.
+
+2014-11-27 Corinna Vinschen <corinna@vinschen.de>
+
+ * mkgroup.c (main): Call enum_groups with offset 0x30000 for local
+ machine, same as from DB.
+ * mkpasswd.c (enum_unix_users): Set pw_passwd field to '*'.
+ (enum_users): Ditto.
+ (main): Call enum_users with offset of 0x30000 for local machine,
+ same as from DB.
+
+2014-11-24 Corinna Vinschen <corinna@vinschen.de>
+
+ * passwd.c (GetPW): If server is NULL, and the user is not a local
+ user, try to fetch the DC to use as server.
+ (ChangePW): Get Windows username via extra parameter.
+ (usage): Reduce -d help text to reflect above change.
+ (main): Fix typo in comment. Call GetPW and ChangePW as per the
+ changes above.
+
+2014-11-12 Corinna Vinschen <corinna@vinschen.de>
+
+ * mkgroup.c (usage): Fix language.
+ * mkpasswd.c (usage): Ditto.
+
+2014-11-12 Corinna Vinschen <corinna@vinschen.de>
+
+ * mkgroup.c (enum_unix_groups): Always print groupname with machine
+ prefix.
+ (usage): Extend help output for -l option.
+ (main): Drop superfluous goto and label. Make machine prefixing for
+ local machine when using -l option dependend on options in
+ /etc/nsswitch.conf.
+ * mkpasswd.c: Ditto.
+
+2014-11-10 Corinna Vinschen <corinna@vinschen.de>
+
+ * cygcheck.cc (dump_sysinfo): Handle Windows 10/Server 2014(?).
+
+2014-11-03 Corinna Vinschen <corinna@vinschen.de>
+
+ * mkgroup.c (enum_local_groups): Don't generate leading separator char
+ for builtin accounts.
+
+2014-10-29 Corinna Vinschen <corinna@vinschen.de>
+
+ * setfacl.c (setfacl): Fix bracketing in expression.
+
+2014-10-27 Corinna Vinschen <corinna@vinschen.de>
+
+ * setfacl.c (usage): Add -b to require options.
+
+2014-10-27 Corinna Vinschen <corinna@vinschen.de>
+
+ * setfacl.c (action_t): Add DeleteAll value.
+ (delacl): New function to remove all ACL entries not representing POSIX
+ permissions.
+ (setfacl): Rearrange conditional expression into switch statement.
+ Add DeleteAll case.
+ (usage): Add and describe -b option.
+ (longopts): Add --remove-all option.
+ (opts): Add -b option.
+ (main): Handle -b option.
+
+2014-10-21 Corinna Vinschen <corinna@vinschen.de>
+
+ * cygcheck.cc (CYGLSA64_DLL): Remove unused macro.
+ (dump_sysinfo): If COMSPEC isn't set in the MSVCRT environment, set it.
+ Explain why.
+
+2014-09-03 Corinna Vinschen <corinna@vinschen.de>
+
+ * setfacl.c (addmissing): New function to add missing acl entries to
+ a modified acl per the rules set by aclcheck.
+ (setfacl): Call addmissing unless action is Delete.
+
+2014-09-03 Corinna Vinschen <corinna@vinschen.de>
+
+ * setfacl.c (getaclentry): Fix previous fix again. Allow lone 'm' as
+ well as any lone default entry if action is Delete. Fix comments.
+ (usage): Align usage text.
+
+2014-09-03 Corinna Vinschen <corinna@vinschen.de>
+
+ * setfacl.c (getaclentry): Fix return value in case of a lone 'm' if
+ action is Delete. Drop requirement for a trailing colon if action is
+ Delete.
+
+2014-08-31 Corinna Vinschen <corinna@vinschen.de>
+
+ * setfacl.c (usage): Drop outdated note that default ACEs are not
+ taken into account.
+
+2014-08-31 Corinna Vinschen <corinna@vinschen.de>
+
+ * getfacl.c (usage): Add flags description.
+ (main): Print suid/sgid/vtx flags if available.
+
+2014-08-15 Corinna Vinschen <corinna@vinschen.de>
+
+ * configure.ac: Convert to new AC_INIT style.
+ * configure: Regenerate.
+
+2014-08-14 Corinna Vinschen <corinna@vinschen.de>
+
+ * utils.xml: Move to ../doc.
+
+2014-08-06 Corinna Vinschen <corinna@vinschen.de>
+
+ * passwd.c (usage): Rename DAYS to MINDAYS and MAXDAYS.
+ * utils.xml (passwd): Ditto.
+
+2014-07-29 Corinna Vinschen <corinna@vinschen.de>
+
+ * mkgroup.c (usage): Move info message that this /etc/group isn't really
+ required anymore more to the top of the usage output.
+ * mkpasswd.c (usage): Ditto for /etc/passwd. Drop old text from output.
+ * utils.xml: Fix accordingly.
+
+2014-06-16 Corinna Vinschen <corinna@vinschen.de>
+
+ * passwd.c (main): Fix typo in error output.
+
+2014-04-21 Jon TURNEY <jon.turney@dronecode.org.uk>
+
+ * minidumper.cc (filter_minidump_type): New function.
+ (minidump): Change default dump type from MiniDumpNormal to
+ something with more useful information without getting too
+ big. Use filter_minidump_type() to filter out unsupported dump
+ types.
+
+2014-04-21 Jon TURNEY <jon.turney@dronecode.org.uk>
+
+ * Makefile.in (minidumper.exe): Link directly with dbghelp.
+ * minidumper.cc (minidump): Ditto.
+
+2014-04-21 Jon TURNEY <jon.turney@dronecode.org.uk>
+
+ * minidumper.cc (minidump): Fix copy and paste error in checking
+ result of OpenProcess().
+
+2014-02-24 Corinna Vinschen <corinna@vinschen.de>
+
+ * mkgroup.c (domlist_t): Drop id_offset.
+ (get_dcname): Remove.
+ (current_group): Remove.
+ (enum_unix_groups): Simplify. Change space to underscore in domain
+ name.
+ (enum_local_groups): Simplify to accommodate the fact that it's only
+ called for foreign machines.
+ (enum_groups): Ditto.
+ (print_special_by_sid): Remove.
+ (print_special_by_name): Remove.
+ (usage): Align to new code.
+ (fetch_primary_domain): Remove.
+ (main): Use cygwin_internal CW_SETENT, CW_GETENT and CW_ENDENT method.
+ Call enum_local_groups, enum_groups, and enum_unix_groups only for
+ foreign machines.
+ * mkpasswd.c (get_dcname): Remove.
+ (current_user): Remove.
+ (enum_unix_users): Simplify. Change space to underscore in domain name.
+ (enum_users): Simplify to accommodate the fact that it's only
+ called for foreign machines.
+ (print_special_by_sid): Remove.
+ (usage): Align to new code.
+ (longopts): Add -b/--no-builtin option.
+ (opts): Add -b option.
+ (print_special_by_name): Remove.
+ (enum_std_accounts): Remove.
+ (fetch_primary_domain): Remove.
+ (main): Use cygwin_internal CW_SETENT, CW_GETENT and CW_ENDENT method.
+ Call enum_users and enum_unix_users only for foreign machines.
+ * utils.xml (mkgroup): Align documentation to new usage.
+ (mkpasswd): Ditto.
+
+2014-02-23 Jon TURNEY <jon.turney@dronecode.org.uk>
+
+ * minidumper.cc (minidump): Fix -t option argument handling.
+
+2014-02-07 Jon TURNEY <jon.turney@dronecode.org.uk>
+
+ * minidumper.cc: New file.
+ * Makefile.in (CYGWIN_BINS): Add minidumper.
+ * utils.xml (minidumper): New section.
+
+2013-11-19 Corinna Vinschen <corinna@vinschen.de>
+
+ * cygcheck.cc (RtlGetVersion): Declare.
+ (dump_sysinfo): Call RtlGetVersion rather than GetVersionEx to get
+ correct OS info even on Windows 8.1. Don't check return value since
+ RtlGetVersion never fails per MSDN. Move fetching kernel32 module
+ handle where it's really needed. Drop temporary comment added by
+ previous checkin.
+
+2013-11-19 Corinna Vinschen <corinna@vinschen.de>
+
+ * cygcheck.cc (dump_sysinfo): Revert Windows 8.1 hack. It's not
+ working. Add a (hopefully temporary) comment.
+
+2013-11-19 Corinna Vinschen <corinna@vinschen.de>
+
+ * cygcheck.cc (dump_sysinfo): Drop code trying to fetch OSVERSIONINFO
+ if fetching OSVERSIONINFOEX failed. Drop code handling unsupported
+ platform IDs. Add code to tweak dwMinorVersion on Windows 8.1 if no
+ manifest is present.
+
+2013-11-19 Corinna Vinschen <corinna@vinschen.de>
+
+ * Makefile.in (cygcheck.exe): Link against wininet.dll.
+ (dumper.exe): Link against psapi.dll.
+ * cygcheck.cc (_WIN32_WINNT): Define as 0x0602.
+ (pInternetCloseHandle): Drop pointer.
+ (PRODUCT_UNLICENSED): Drop definition.
+ (PRODUCT_PROFESSIONAL_WMC): Ditto.
+ (package_grep): Delete code loading wininet functions dynamically, just
+ call functions directly.
+ * module_info.cc: Drop code loading psapi functions dynamically since
+ all supported OS versions have it anyway. Call psapi functions
+ directly.
+
+2013-11-19 Corinna Vinschen <corinna@vinschen.de>
+
+ * cygcheck.cc (dump_sysinfo): Distinguish Windows 8 and 8.1, as well
+ as Windows Server 2012 and 2012 R2. Add missing commas in products
+ array to avoid crashes. Drop Windows NT4 and 2000 printouts. Just
+ call IsWow64Process, GetNativeSystemInfo, and GetDiskFreeSpaceEx
+ directly, rather than loading them dynamically, since they are exported
+ by all supported OS versions. Fix questionable type usage in call to
+ GetDiskFreeSpaceEx.
+
+2013-11-06 Christopher Faylor <me.cygwin2013@cgf.cx>
+
+ * configure.ac: Detect windows headers/libs after we've figured out the
+ C compiler.
+ * configure: Regenerate.
+ * aclocal.m4: Regenerate.
+
+2013-09-16 Christopher Faylor <me.cygwin2013@cgf.cx>
+
+ * dump_setup.cc (find_tar_ext): Generalize search for .tar extension,
+ avoiding looking for specific compression types.
+
2013-08-23 Christopher Faylor <me.cygwin2013@cgf.cx>
* cygcheck.cc (package_grep): Accommodate arch-specific package layout.
diff --git a/winsup/utils/ChangeLog.64bit b/winsup/CVSChangeLogs.old/utils/ChangeLog.64bit
index 69c235672..69c235672 100644
--- a/winsup/utils/ChangeLog.64bit
+++ b/winsup/CVSChangeLogs.old/utils/ChangeLog.64bit
diff --git a/winsup/CYGWIN_LICENSE b/winsup/CYGWIN_LICENSE
index d1bf9d9f6..4659b3be6 100644
--- a/winsup/CYGWIN_LICENSE
+++ b/winsup/CYGWIN_LICENSE
@@ -1,70 +1,28 @@
-Cygwin is free software. Red Hat, Inc. licenses Cygwin to you under the
-terms of the GNU General Public License as published by the Free Software
-Foundation; you can redistribute it and/or modify it under the terms of
-the GNU General Public License either version 3 of the license, or (at your
-option) any later version (GPLv3+), along with the additional permissions
-given below.
+THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESSED OR
+IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+
+Unless stated otherwise, the sources under the cygwin subdirectory are
+licensed under the Lesser Gnu Public License, version 3 or (at your
+option) any later version (LGPLv3+). See the COPYING.LIB file for the
+exact wording of that license.
+
+Unless stated otherwise, the sources under the cygserver, the lsaauth,
+and the utils subdirectories are licensed under the Gnu Public License,
+version 3 or (at your option) any later version (GPLv3+). See the
+COPYING file for the exact wording of that license.
+
+Parts of the sources in any subdirectory are licensed using a BSD-like
+license. The affected source files contain explicit copyright notices
+to that effect.
+
+Linking Exception:
+
+ As a special exception, the copyright holders of the Cygwin library
+ grant you additional permission to link libcygwin.a, crt0.o, and
+ gcrt0.o with independent modules to produce an executable, and to
+ convey the resulting executable under terms of your choice, without
+ any need to comply with the conditions of LGPLv3 section 4. An
+ independent module is a module which is not itself based on the
+ Cygwin library.
-There is NO WARRANTY for this software, express or implied, including
-the implied warranties of MERCHANTABILITY or FITNESS FOR A PARTICULAR
-PURPOSE. See the GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License along
-with this program. If not, see <http://gnu.org/licenses/>.
-
-
-Additional Permissions:
-
-
-1. Linking Exception.
-
-As a special exception to GPLv3+, Red Hat grants you permission to link
-software whose sources are distributed under a license that satisfies
-the Open Source Definition with libcygwin.a, without libcygwin.a
-itself causing the resulting program to be covered by GPLv3+.
-
-This means that you can port an Open Source application to Cygwin, and
-distribute that executable as if it didn't include a copy of
-libcygwin.a linked into it. Note that this does not apply to the
-Cygwin DLL itself. If you distribute a (possibly modified) version of
-the Cygwin DLL, you must adhere to the terms of GPLv3+, including the
-requirement to provide sources for the Cygwin DLL, unless you have obtained
-a special Cygwin license to distribute the Cygwin DLL in only its binary
-form (see below).
-
-See http://www.opensource.org/docs/osd/ for the precise Open Source
-Definition referenced above.
-
-
-2. Files Excluded from GPL Coverage.
-
-Red Hat grants you permission to distribute Cygwin with the following
-files, which are not considered part of Cygwin and are not governed by
-GPLv3+, in source or binary form.
-
-winsup\testsuite\winsup.api\msgtest.c
-winsup\testsuite\winsup.api\semtest.c
-winsup\testsuite\winsup.api\shmtest.c
-
-Red Hat grants you permission to link or combine code in Cygwin with
-code in or corresponding to the following files, which are not
-considered part of Cygwin and are not governed by GPLv3+, and to
-distribute such combinations under terms of your choice, provided that
-such terms are otherwise consistent with the application of GPLv3+ to
-Cygwin itself. You must comply with GPLv3+ with respect to all
-portions of such combinations other than those that correspond to or
-are derived from such non-Cygwin code but which do not correspond to
-or are not derived from Cygwin itself.
-
-winsup\cygserver\sysv_shm.cc
-
-
-3. Alternative License.
-
-Red Hat sells a special Cygwin License for customers who are unable to
-provide their application in open source code form. For more
-information, please see: http://www.redhat.com/software/cygwin/, or call
-+1-866-2REDHAT ext. 45300 (toll-free in the US).
-
-Outside the US call your regional Red Hat office, see
-http://www.redhat.com/about/contact/ww/
diff --git a/winsup/Makefile.common b/winsup/Makefile.common
index c71845c47..a04d8e1de 100644
--- a/winsup/Makefile.common
+++ b/winsup/Makefile.common
@@ -1,7 +1,5 @@
# Makefile.common - common definitions for the winsup directory
#
-# Copyright 2000, 2001, 2002, 2003, 2004, 2005, 2009, 2012 Red Hat, Inc.
-#
# This file is part of Cygwin.
#
# This software is a copyrighted work licensed under the terms of the
@@ -19,11 +17,11 @@ endef
export PATH:=${winsup_srcdir}:${PATH}
# Allow CFLAGS=-O,-g to control CXXFLAGS too
-opt=$(filter -O%,${CFLAGS}) $(filter -g,${CFLAGS})
-override CXXFLAGS:=${filter-out -g,$(filter-out -O%,${CXXFLAGS})} ${opt}
+opt=$(filter -O%,${CFLAGS}) $(filter -g%,${CFLAGS})
+override CXXFLAGS:=${filter-out -g%,$(filter-out -O%,${CXXFLAGS})} ${opt}
cflags_common:=-Wall -Wstrict-aliasing -Wwrite-strings -fno-common -pipe -fbuiltin -fmessage-length=0
-COMPILE.cc=c++wrap ${CXXFLAGS} -fno-rtti -fno-exceptions ${cflags_common}
+COMPILE.cc=c++wrap ${CXXFLAGS} -fno-rtti -fno-exceptions -fno-use-cxa-atexit ${cflags_common}
COMPILE.c=ccwrap ${CFLAGS} ${cflags_common}
top_srcdir:=$(call justdir,${winsup_srcdir})
diff --git a/winsup/Makefile.in b/winsup/Makefile.in
index f9b1e6571..148d98531 100644
--- a/winsup/Makefile.in
+++ b/winsup/Makefile.in
@@ -1,6 +1,4 @@
# Makefile.in for windows stuff
-# Copyright 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2006, 2007,
-# 2008, 2009, 2012, 2013 Red Hat, Inc.
#
# This file is part of Cygwin.
#
@@ -33,6 +31,7 @@ endif
else
tooldir:=$(exec_prefix)/$(target_alias)
endif
+datarootdir:=@datarootdir@
datadir:=@datadir@
infodir:=@infodir@
includedir:=@includedir@
@@ -47,7 +46,7 @@ CLEAN_SUBDIRS=${patsubst %,clean_%,$(SUBDIRS)}
INSTALL_LICENSE:=@INSTALL_LICENSE@
-.PHONY: all install clean all-info info install-info install-license check \
+.PHONY: all install clean distclean all-info info install-info install-license check \
$(SUBDIRS) $(INSTALL_SUBDIRS) $(CLEAN_SUBDIRS)
.SUFFIXES:
@@ -70,7 +69,7 @@ install-license: CYGWIN_LICENSE COPYING
install: Makefile $(INSTALL_LICENSE) $(INSTALL_SUBDIRS)
-clean: $(CLEAN_SUBDIRS)
+clean distclean: $(CLEAN_SUBDIRS)
all-info:
@@ -79,17 +78,13 @@ install-info:
info:
$(SUBDIRS):
- @if cd $@ 2>/dev/null; then \
- $(MAKE) all || exit 1; \
- fi || exit 0
+ @${MAKE} -C $@ all || ([ "$@" == doc ] && echo "*** error ignored")
$(INSTALL_SUBDIRS):
- @if cd ${patsubst install_%,%,$@} 2>/dev/null; then \
- $(MAKE) install || exit 1; \
- fi || exit 0
+ @${MAKE} -C $(patsubst install_%,%,$@) install || ([ "$@" == install_doc ] && echo "*** error ignored")
$(CLEAN_SUBDIRS):
- @if cd ${patsubst clean_%,%,$@} 2>/dev/null; then \
+ @if cd $(patsubst clean_%,%,$@) 2>/dev/null; then \
$(MAKE) clean || exit 1; \
fi || exit 0
diff --git a/winsup/README b/winsup/README
index 290275cd7..a55991e8b 100644
--- a/winsup/README
+++ b/winsup/README
@@ -1,9 +1,9 @@
-THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
+THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESSED OR
IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-Cygwin documentation is available on the net at http://cygwin.com
+Cygwin documentation is available on the net at https://cygwin.com
You might especially be interested in
-http://cygwin.com/faq/faq.programming.html#faq.programming.building-cygwin
+https://cygwin.com/faq/faq.html#faq.programming.building-cygwin
diff --git a/winsup/aclocal.m4 b/winsup/aclocal.m4
index cdae6e7f7..e798741a7 100644
--- a/winsup/aclocal.m4
+++ b/winsup/aclocal.m4
@@ -1,7 +1,8 @@
-# generated automatically by aclocal 1.11.1 -*- Autoconf -*-
+# generated automatically by aclocal 1.11.6 -*- Autoconf -*-
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
-# 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
+# 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation,
+# Inc.
# This file 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.
diff --git a/winsup/ccwrap b/winsup/ccwrap
index 7580e7a3b..0c6a17020 100755
--- a/winsup/ccwrap
+++ b/winsup/ccwrap
@@ -12,6 +12,7 @@ if ($ARGV[0] ne '++') {
$cxx = 1;
}
die "$0: $ccorcxx environment variable does not exist\n" unless exists $ENV{$ccorcxx};
+$ENV{'LANG'} = 'C';
my @compiler = split ' ', $ENV{$ccorcxx};
if ("@ARGV" !~ / -nostdinc/o) {
my $fd;
diff --git a/winsup/configure b/winsup/configure
index f9b62676a..23b3a7b78 100755
--- a/winsup/configure
+++ b/winsup/configure
@@ -1,11 +1,11 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.68.
+# Generated by GNU Autoconf 2.69 for Cygwin toplevel 0.
#
+# Report bugs to <cygwin@cygwin.com>.
#
-# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
-# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software
-# Foundation, Inc.
+#
+# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
#
#
# This configure script is free software; the Free Software Foundation
@@ -134,6 +134,31 @@ export LANGUAGE
# CDPATH.
(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
+# Use a proper internal environment variable to ensure we don't fall
+ # into an infinite loop, continuously re-executing ourselves.
+ if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
+ _as_can_reexec=no; export _as_can_reexec;
+ # We cannot yet assume a decent shell, so we have to provide a
+# neutralization value for shells without unset; and this also
+# works around shells that cannot unset nonexistent variables.
+# Preserve -v and -x to the replacement shell.
+BASH_ENV=/dev/null
+ENV=/dev/null
+(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
+case $- in # ((((
+ *v*x* | *x*v* ) as_opts=-vx ;;
+ *v* ) as_opts=-v ;;
+ *x* ) as_opts=-x ;;
+ * ) as_opts= ;;
+esac
+exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
+# Admittedly, this is quite paranoid, since all the known shells bail
+# out after a failed `exec'.
+$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
+as_fn_exit 255
+ fi
+ # We don't want this to propagate to other subprocesses.
+ { _as_can_reexec=; unset _as_can_reexec;}
if test "x$CONFIG_SHELL" = x; then
as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
emulate sh
@@ -167,7 +192,8 @@ if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
else
exitcode=1; echo positional parameters were not saved.
fi
-test x\$exitcode = x0 || exit 1"
+test x\$exitcode = x0 || exit 1
+test -x / || exit 1"
as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
@@ -211,21 +237,25 @@ IFS=$as_save_IFS
if test "x$CONFIG_SHELL" != x; then :
- # We cannot yet assume a decent shell, so we have to provide a
- # neutralization value for shells without unset; and this also
- # works around shells that cannot unset nonexistent variables.
- # Preserve -v and -x to the replacement shell.
- BASH_ENV=/dev/null
- ENV=/dev/null
- (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
- export CONFIG_SHELL
- case $- in # ((((
- *v*x* | *x*v* ) as_opts=-vx ;;
- *v* ) as_opts=-v ;;
- *x* ) as_opts=-x ;;
- * ) as_opts= ;;
- esac
- exec "$CONFIG_SHELL" $as_opts "$as_myself" ${1+"$@"}
+ export CONFIG_SHELL
+ # We cannot yet assume a decent shell, so we have to provide a
+# neutralization value for shells without unset; and this also
+# works around shells that cannot unset nonexistent variables.
+# Preserve -v and -x to the replacement shell.
+BASH_ENV=/dev/null
+ENV=/dev/null
+(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
+case $- in # ((((
+ *v*x* | *x*v* ) as_opts=-vx ;;
+ *v* ) as_opts=-v ;;
+ *x* ) as_opts=-x ;;
+ * ) as_opts= ;;
+esac
+exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
+# Admittedly, this is quite paranoid, since all the known shells bail
+# out after a failed `exec'.
+$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
+exit 255
fi
if test x$as_have_required = xno; then :
@@ -235,10 +265,11 @@ fi
$as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
$as_echo "$0: be upgraded to zsh 4.3.4 or later."
else
- $as_echo "$0: Please tell bug-autoconf@gnu.org about your system,
-$0: including any error possibly output before this
-$0: message. Then install a modern shell, or manually run
-$0: the script under such a shell if you do have one."
+ $as_echo "$0: Please tell bug-autoconf@gnu.org and cygwin@cygwin.com
+$0: about your system, including any error possibly output
+$0: before this message. Then install a modern shell, or
+$0: manually run the script under such a shell if you do
+$0: have one."
fi
exit 1
fi
@@ -327,6 +358,14 @@ $as_echo X"$as_dir" |
} # as_fn_mkdir_p
+
+# as_fn_executable_p FILE
+# -----------------------
+# Test if FILE is an executable regular file.
+as_fn_executable_p ()
+{
+ test -f "$1" && test -x "$1"
+} # as_fn_executable_p
# as_fn_append VAR VALUE
# ----------------------
# Append the text in VALUE to the end of the definition contained in VAR. Take
@@ -448,6 +487,10 @@ as_cr_alnum=$as_cr_Letters$as_cr_digits
chmod +x "$as_me.lineno" ||
{ $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
+ # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
+ # already done that, so ensure we don't try to do so again and fall
+ # in an infinite loop. This has already happened in practice.
+ _as_can_reexec=no; export _as_can_reexec
# Don't try to exec as it changes $[0], causing all sort of problems
# (the dirname of $[0] is not the place where we might find the
# original and so on. Autoconf is especially sensitive to this).
@@ -482,16 +525,16 @@ if (echo >conf$$.file) 2>/dev/null; then
# ... but there are two gotchas:
# 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
# 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
- # In both cases, we have to default to `cp -p'.
+ # In both cases, we have to default to `cp -pR'.
ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
- as_ln_s='cp -p'
+ as_ln_s='cp -pR'
elif ln conf$$.file conf$$ 2>/dev/null; then
as_ln_s=ln
else
- as_ln_s='cp -p'
+ as_ln_s='cp -pR'
fi
else
- as_ln_s='cp -p'
+ as_ln_s='cp -pR'
fi
rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
rmdir conf$$.dir 2>/dev/null
@@ -503,28 +546,8 @@ else
as_mkdir_p=false
fi
-if test -x / >/dev/null 2>&1; then
- as_test_x='test -x'
-else
- if ls -dL / >/dev/null 2>&1; then
- as_ls_L_option=L
- else
- as_ls_L_option=
- fi
- as_test_x='
- eval sh -c '\''
- if test -d "$1"; then
- test -d "$1/.";
- else
- case $1 in #(
- -*)set "./$1";;
- esac;
- case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
- ???[sx]*):;;*)false;;esac;fi
- '\'' sh
- '
-fi
-as_executable_p=$as_test_x
+as_test_x='test -x'
+as_executable_p=as_fn_executable_p
# Sed expression to map a string onto a valid CPP name.
as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
@@ -554,12 +577,12 @@ MFLAGS=
MAKEFLAGS=
# Identity of this package.
-PACKAGE_NAME=
-PACKAGE_TARNAME=
-PACKAGE_VERSION=
-PACKAGE_STRING=
-PACKAGE_BUGREPORT=
-PACKAGE_URL=
+PACKAGE_NAME='Cygwin toplevel'
+PACKAGE_TARNAME='cygwin'
+PACKAGE_VERSION='0'
+PACKAGE_STRING='Cygwin toplevel 0'
+PACKAGE_BUGREPORT='cygwin@cygwin.com'
+PACKAGE_URL='https://cygwin.com'
ac_unique_file="Makefile.in"
ac_no_link=no
@@ -572,6 +595,7 @@ subdirs
cygwin_headers
newlib_headers
windows_headers
+windows_libdir
CPP
ac_ct_CXX
CXXFLAGS
@@ -598,7 +622,6 @@ build
INSTALL_DATA
INSTALL_SCRIPT
INSTALL_PROGRAM
-windows_libdir
target_alias
host_alias
build_alias
@@ -642,6 +665,7 @@ target_builddir'
ac_subst_files=''
ac_user_opts='
enable_option_checking
+with_cross_bootstrap
with_windows_headers
with_windows_libs
'
@@ -657,7 +681,8 @@ CXX
CXXFLAGS
CCC
CPP'
-ac_subdirs_all='cygwin utils cygserver lsaauth doc'
+ac_subdirs_all='cygwin cygserver doc
+utils lsaauth'
# Initialize some variables set by options.
ac_init_help=
@@ -697,7 +722,7 @@ sharedstatedir='${prefix}/com'
localstatedir='${prefix}/var'
includedir='${prefix}/include'
oldincludedir='/usr/include'
-docdir='${datarootdir}/doc/${PACKAGE}'
+docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
infodir='${datarootdir}/info'
htmldir='${docdir}'
dvidir='${docdir}'
@@ -1112,8 +1137,6 @@ target=$target_alias
if test "x$host_alias" != x; then
if test "x$build_alias" = x; then
cross_compiling=maybe
- $as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host.
- If a cross compiler is detected then cross compile mode will be used" >&2
elif test "x$build_alias" != "x$host_alias"; then
cross_compiling=yes
fi
@@ -1199,7 +1222,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures this package to adapt to many kinds of systems.
+\`configure' configures Cygwin toplevel 0 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1247,7 +1270,7 @@ Fine tuning of the installation directories:
--infodir=DIR info documentation [DATAROOTDIR/info]
--localedir=DIR locale-dependent data [DATAROOTDIR/locale]
--mandir=DIR man documentation [DATAROOTDIR/man]
- --docdir=DIR documentation root [DATAROOTDIR/doc/PACKAGE]
+ --docdir=DIR documentation root [DATAROOTDIR/doc/cygwin]
--htmldir=DIR html documentation [DOCDIR]
--dvidir=DIR dvi documentation [DOCDIR]
--pdfdir=DIR pdf documentation [DOCDIR]
@@ -1264,12 +1287,17 @@ _ACEOF
fi
if test -n "$ac_init_help"; then
-
+ case $ac_init_help in
+ short | recursive ) echo "Configuration of Cygwin toplevel 0:";;
+ esac
cat <<\_ACEOF
Optional Packages:
--with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
--without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
+ --with-cross-bootstrap do not build programs using the mingw toolchain or
+ check for mingw libraries (useful for bootstrapping
+ a cross-compiler)
--with-windows-headers=DIR
specify where the windows includes are located
--with-windows-libs=DIR specify where the windows libraries are located
@@ -1289,7 +1317,8 @@ Some influential environment variables:
Use these variables to override the choices made by `configure' or to help
it to find libraries and programs with nonstandard names/locations.
-Report bugs to the package provider.
+Report bugs to <cygwin@cygwin.com>.
+Cygwin toplevel home page: <https://cygwin.com>.
_ACEOF
ac_status=$?
fi
@@ -1352,10 +1381,10 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-configure
-generated by GNU Autoconf 2.68
+Cygwin toplevel configure 0
+generated by GNU Autoconf 2.69
-Copyright (C) 2010 Free Software Foundation, Inc.
+Copyright (C) 2012 Free Software Foundation, Inc.
This configure script is free software; the Free Software Foundation
gives unlimited permission to copy, distribute and modify it.
_ACEOF
@@ -1482,8 +1511,8 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by $as_me, which was
-generated by GNU Autoconf 2.68. Invocation command line was
+It was created by Cygwin toplevel $as_me 0, which was
+generated by GNU Autoconf 2.69. Invocation command line was
$ $0 $@
@@ -1830,6 +1859,7 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $
ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
ac_aux_dir=
for ac_dir in .. "$srcdir"/..; do
if test -f "$ac_dir/install-sh"; then
@@ -1862,34 +1892,6 @@ ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
. ${srcdir}/configure.cygwin
-
-
-# Check whether --with-windows-headers was given.
-if test "${with_windows_headers+set}" = set; then :
- withval=$with_windows_headers; test -z "$withval" && as_fn_error $? "must specify value for --with-windows-headers" "$LINENO" 5
-
-fi
-
-
-
-
-# Check whether --with-windows-libs was given.
-if test "${with_windows_libs+set}" = set; then :
- withval=$with_windows_libs; test -z "$withval" && as_fn_error $? "must specify value for --with-windows-libs" "$LINENO" 5
-
-fi
-
-windows_libdir=$(realdirpath "$with_windows_libs")
-if test -z "$windows_libdir"; then
- windows_libdir=$(realdirpath $(${ac_cv_prog_CC:-$CC} -xc /dev/null -Wl,--verbose=1 -lntdll 2>&1 | sed -rn 's%^.*\s(\S+)/libntdll\..*succeeded%\1%p'))
- if test -z "$windows_libdir"; then
- as_fn_error $? "cannot find windows library files" "$LINENO" 5
- fi
-fi
-
-
-
-
# Find a good install program. We prefer a C program (faster),
# so one script is as good as another. But avoid the broken or
# incompatible versions:
@@ -1927,7 +1929,7 @@ case $as_dir/ in #((
# by default.
for ac_prog in ginstall scoinst install; do
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
if test $ac_prog = install &&
grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
# AIX install. It has an incompatible calling convention.
@@ -2095,7 +2097,6 @@ test -n "$target_alias" &&
NONENONEs,x,x, &&
program_prefix=${target_alias}-
-
ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
@@ -2118,7 +2119,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_CC="${ac_tool_prefix}gcc"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -2158,7 +2159,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_ac_ct_CC="gcc"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -2211,7 +2212,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_CC="${ac_tool_prefix}cc"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -2252,7 +2253,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
ac_prog_rejected=yes
continue
@@ -2310,7 +2311,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -2354,7 +2355,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_ac_ct_CC="$ac_prog"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -2876,8 +2877,7 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <stdarg.h>
#include <stdio.h>
-#include <sys/types.h>
-#include <sys/stat.h>
+struct stat;
/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
struct buf { int x; };
FILE * (*rcsopen) (struct buf *, struct stat *, int);
@@ -2990,7 +2990,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -3034,7 +3034,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_ac_ct_CXX="$ac_prog"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -3362,6 +3362,45 @@ ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+# Check whether --with-cross-bootstrap was given.
+if test "${with_cross_bootstrap+set}" = set; then :
+ withval=$with_cross_bootstrap;
+else
+ with_cross_bootstrap=no
+fi
+
+
+
+
+# Check whether --with-windows-headers was given.
+if test "${with_windows_headers+set}" = set; then :
+ withval=$with_windows_headers; test -z "$withval" && as_fn_error $? "must specify value for --with-windows-headers" "$LINENO" 5
+
+fi
+
+
+if test "x$with_cross_bootstrap" != "xyes"; then
+
+
+# Check whether --with-windows-libs was given.
+if test "${with_windows_libs+set}" = set; then :
+ withval=$with_windows_libs; test -z "$withval" && as_fn_error $? "must specify value for --with-windows-libs" "$LINENO" 5
+
+fi
+
+windows_libdir=$(realdirpath "$with_windows_libs")
+if test -z "$windows_libdir"; then
+ windows_libdir=$(realdirpath $(${ac_cv_prog_CC:-$CC} -xc /dev/null -Wl,--verbose=1 -lntdll 2>&1 | sed -rn 's%^.*\s(\S+)/libntdll\..*succeeded%\1%p'))
+ if test -z "$windows_libdir"; then
+ as_fn_error $? "cannot find windows library files" "$LINENO" 5
+ fi
+fi
+
+
+
+fi
+
ac_ext=cpp
ac_cpp='$CXXCPP $CPPFLAGS'
ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
@@ -3410,7 +3449,12 @@ export CXX
-subdirs="$subdirs cygwin utils cygserver lsaauth doc"
+subdirs="$subdirs cygwin cygserver doc"
+
+if test "x$with_cross_bootstrap" != "xyes"; then
+ subdirs="$subdirs utils lsaauth"
+
+fi
INSTALL_LICENSE="install-license"
@@ -3893,16 +3937,16 @@ if (echo >conf$$.file) 2>/dev/null; then
# ... but there are two gotchas:
# 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
# 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
- # In both cases, we have to default to `cp -p'.
+ # In both cases, we have to default to `cp -pR'.
ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
- as_ln_s='cp -p'
+ as_ln_s='cp -pR'
elif ln conf$$.file conf$$ 2>/dev/null; then
as_ln_s=ln
else
- as_ln_s='cp -p'
+ as_ln_s='cp -pR'
fi
else
- as_ln_s='cp -p'
+ as_ln_s='cp -pR'
fi
rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
rmdir conf$$.dir 2>/dev/null
@@ -3962,28 +4006,16 @@ else
as_mkdir_p=false
fi
-if test -x / >/dev/null 2>&1; then
- as_test_x='test -x'
-else
- if ls -dL / >/dev/null 2>&1; then
- as_ls_L_option=L
- else
- as_ls_L_option=
- fi
- as_test_x='
- eval sh -c '\''
- if test -d "$1"; then
- test -d "$1/.";
- else
- case $1 in #(
- -*)set "./$1";;
- esac;
- case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
- ???[sx]*):;;*)false;;esac;fi
- '\'' sh
- '
-fi
-as_executable_p=$as_test_x
+
+# as_fn_executable_p FILE
+# -----------------------
+# Test if FILE is an executable regular file.
+as_fn_executable_p ()
+{
+ test -f "$1" && test -x "$1"
+} # as_fn_executable_p
+as_test_x='test -x'
+as_executable_p=as_fn_executable_p
# Sed expression to map a string onto a valid CPP name.
as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
@@ -4004,8 +4036,8 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by $as_me, which was
-generated by GNU Autoconf 2.68. Invocation command line was
+This file was extended by Cygwin toplevel $as_me 0, which was
+generated by GNU Autoconf 2.69. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
CONFIG_HEADERS = $CONFIG_HEADERS
@@ -4051,17 +4083,18 @@ Usage: $0 [OPTION]... [TAG]...
Configuration files:
$config_files
-Report bugs to the package provider."
+Report bugs to <cygwin@cygwin.com>.
+Cygwin toplevel home page: <https://cygwin.com>."
_ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
-config.status
-configured by $0, generated by GNU Autoconf 2.68,
+Cygwin toplevel config.status 0
+configured by $0, generated by GNU Autoconf 2.69,
with options \\"\$ac_cs_config\\"
-Copyright (C) 2010 Free Software Foundation, Inc.
+Copyright (C) 2012 Free Software Foundation, Inc.
This config.status script is free software; the Free Software Foundation
gives unlimited permission to copy, distribute and modify it."
@@ -4139,7 +4172,7 @@ fi
_ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
if \$ac_cs_recheck; then
- set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
+ set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
shift
\$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
CONFIG_SHELL='$SHELL'
diff --git a/winsup/configure.ac b/winsup/configure.ac
index a74bf603b..b975dfc1a 100755..100644
--- a/winsup/configure.ac
+++ b/winsup/configure.ac
@@ -1,6 +1,4 @@
dnl Autoconf configure script for Cygwin.
-dnl Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2006, 2009, 2010,
-dnl 2011, 2012 Red Hat, Inc.
dnl
dnl This file is part of Cygwin.
dnl
@@ -10,32 +8,42 @@ dnl details.
dnl
dnl Process this file with autoconf to produce a configure script.
-AC_PREREQ(2.59)dnl
-AC_INIT(Makefile.in)
+AC_PREREQ([2.59])
+AC_INIT([Cygwin toplevel],[0],[cygwin@cygwin.com],[cygwin],[https://cygwin.com])
+AC_CONFIG_SRCDIR(Makefile.in)
AC_CONFIG_AUX_DIR(..)
. ${srcdir}/configure.cygwin
-AC_WINDOWS_HEADERS
-AC_WINDOWS_LIBS
-
AC_PROG_INSTALL
AC_NO_EXECUTABLES
-AC_CANONICAL_SYSTEM
+AC_CANONICAL_TARGET
AC_PROG_CC
AC_PROG_CXX
AC_PROG_CPP
AC_LANG(C)
+AC_ARG_WITH([cross-bootstrap],[AS_HELP_STRING([--with-cross-bootstrap],[do not build programs using the mingw toolchain or check for mingw libraries (useful for bootstrapping a cross-compiler)])],[],[with_cross_bootstrap=no])
+
+AC_WINDOWS_HEADERS
+if test "x$with_cross_bootstrap" != "xyes"; then
+ AC_WINDOWS_LIBS
+fi
+
AC_LANG(C++)
AC_CYGWIN_INCLUDES
-AC_CONFIG_SUBDIRS(cygwin utils cygserver lsaauth doc)
+AC_CONFIG_SUBDIRS(cygwin cygserver doc)
+if test "x$with_cross_bootstrap" != "xyes"; then
+ AC_CONFIG_SUBDIRS([utils lsaauth])
+fi
+
INSTALL_LICENSE="install-license"
AC_SUBST(INSTALL_LICENSE)
AC_PROG_MAKE_SET
-AC_OUTPUT(Makefile)
+AC_CONFIG_FILES([Makefile])
+AC_OUTPUT
diff --git a/winsup/configure.cygwin b/winsup/configure.cygwin
index 6c4d08e30..06df92211 100755
--- a/winsup/configure.cygwin
+++ b/winsup/configure.cygwin
@@ -44,6 +44,5 @@ for d in . .. ../.. ../../..; do
done
if test -z "$target_builddir"; then
- echo "cannot determine top build dir, looking for $lookfor" 1>&2
- exit 1
+ target_builddir=$(pwd)
fi
diff --git a/winsup/cygserver/Makefile.in b/winsup/cygserver/Makefile.in
index e2fe30992..16a2ccc15 100644
--- a/winsup/cygserver/Makefile.in
+++ b/winsup/cygserver/Makefile.in
@@ -1,5 +1,4 @@
# Makefile for Cygwin server
-# Copyright 2003, 2006, 2007, 2008, 2009 Red Hat, Inc.
# This file is part of Cygwin.
@@ -46,7 +45,7 @@ AR:=@AR@
OBJS:= cygserver.o client.o process.o msg.o sem.o shm.o threaded_queue.o \
transport.o transport_pipes.o \
bsd_helper.o bsd_log.o bsd_mutex.o \
- sysv_msg.o sysv_sem.o sysv_shm.o setpwd.o
+ sysv_msg.o sysv_sem.o sysv_shm.o setpwd.o pwdgrp.o
LIBOBJS:=${patsubst %.o,lib%.o,$(OBJS)}
CYGWIN_OBJS:=$(cygwin_build)/version.o
@@ -73,11 +72,8 @@ fullclean: clean libclean
cygserver.exe: $(CYGWIN_LIB) $(OBJS) $(CYGWIN_OBJS)
$(CXX) -o $@ ${wordlist 2,999,$^} -static -static-libgcc -B$(cygwin_build) -lntdll
-$(cygwin_build)/%.o: $(cygwin_source)/%.cc
- @$(MAKE) -C $(@D) $(@F)
-
-$(cygwin_build)/%.o: $(cygwin_source)/%.c
- @$(MAKE) -C $(@D) $(@F)
+$(cygwin_build)/%.o:
+ $(MAKE) -C $(@D) $(@F)
Makefile: Makefile.in configure
./config.status
diff --git a/winsup/cygserver/aclocal.m4 b/winsup/cygserver/aclocal.m4
index 5985aa9a1..5bf14e574 100644
--- a/winsup/cygserver/aclocal.m4
+++ b/winsup/cygserver/aclocal.m4
@@ -1,7 +1,8 @@
-# generated automatically by aclocal 1.11.1 -*- Autoconf -*-
+# generated automatically by aclocal 1.11.6 -*- Autoconf -*-
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
-# 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
+# 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation,
+# Inc.
# This file 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.
diff --git a/winsup/cygserver/bsd_helper.cc b/winsup/cygserver/bsd_helper.cc
index 718c587c3..f4babeec3 100644
--- a/winsup/cygserver/bsd_helper.cc
+++ b/winsup/cygserver/bsd_helper.cc
@@ -1,7 +1,5 @@
/* bsd_helper.cc
- Copyright 2003, 2004, 2005, 2007, 2012 Red Hat Inc.
-
This file is part of Cygwin.
This software is a copyrighted work licensed under the terms of the
@@ -200,7 +198,8 @@ ipcexit_creat_hookthread (struct thread *td)
GetCurrentProcess (), &shs->process_hdl,
0, FALSE, DUPLICATE_SAME_ACCESS))
{
- log (LOG_CRIT, "failed to duplicate process handle, error = %lu",
+ delete shs;
+ log (LOG_CRIT, "failed to duplicate process handle, error = %u",
GetLastError ());
return cygwin_internal (CW_GET_ERRNO_FROM_WINERROR,
GetLastError (), ENOMEM);
@@ -209,7 +208,8 @@ ipcexit_creat_hookthread (struct thread *td)
HANDLE thread = CreateThread (NULL, 0, ipcexit_hookthread, shs, 0, &tid);
if (!thread)
{
- log (LOG_CRIT, "failed to create thread, error = %lu", GetLastError ());
+ delete shs;
+ log (LOG_CRIT, "failed to create thread, error = %u", GetLastError ());
return cygwin_internal (CW_GET_ERRNO_FROM_WINERROR,
GetLastError (), ENOMEM);
}
@@ -235,7 +235,7 @@ init_admin_sid (void)
SID_IDENTIFIER_AUTHORITY nt_auth = {SECURITY_NT_AUTHORITY};
if (! AllocateAndInitializeSid (&nt_auth, 2, 32, 544, 0, 0, 0, 0, 0, 0,
&admininstrator_group_sid))
- panic ("failed to create well known sids, error = %lu",
+ panic ("failed to create well known sids, error = %u",
GetLastError ());
}
@@ -451,7 +451,7 @@ _vm_pager_allocate (int size, int shmflg)
vm_object_t object = CreateFileMapping (INVALID_HANDLE_VALUE, &sec_all_nih,
PAGE_READWRITE, 0, size, NULL);
if (!object)
- panic ("CreateFileMapping in _vm_pager_allocate failed, %lu", GetLastError ());
+ panic ("CreateFileMapping in _vm_pager_allocate failed, %u", GetLastError ());
return object;
}
@@ -462,7 +462,7 @@ vm_object_duplicate (struct thread *td, vm_object_t object)
if (!DuplicateHandle (GetCurrentProcess (), object,
td->client->handle (), &dup_object,
0, TRUE, DUPLICATE_SAME_ACCESS))
- panic ("!DuplicateHandle in vm_object_duplicate failed, %lu", GetLastError ());
+ panic ("!DuplicateHandle in vm_object_duplicate failed, %u", GetLastError ());
return dup_object;
}
@@ -668,7 +668,7 @@ tunable_int_fetch (const char *name, int32_t *tunable_target)
if (!s->value.ival) /* Not set in config file */
return;
*tunable_target = s->value.ival;
- debug ("\nSet %s to %lu\n", name, *tunable_target);
+ debug ("\nSet %s to %u\n", name, *tunable_target);
}
void
diff --git a/winsup/cygserver/bsd_helper.h b/winsup/cygserver/bsd_helper.h
index bc8d22810..b2d866277 100644
--- a/winsup/cygserver/bsd_helper.h
+++ b/winsup/cygserver/bsd_helper.h
@@ -1,7 +1,5 @@
/* bsd_helper.h: Helps integrating BSD kernel code
- Copyright 2003, 2012 Red Hat, Inc.
-
This file is part of Cygwin.
This software is a copyrighted work licensed under the terms of the
@@ -39,24 +37,24 @@ extern SECURITY_ATTRIBUTES sec_all_nih;
void securityinit (void);
-int win_copyin (struct thread *, const void *, void *, size_t);
-int win_copyout (struct thread *, const void *, void *, size_t);
+int win_copyin (class thread *, const void *, void *, size_t);
+int win_copyout (class thread *, const void *, void *, size_t);
#define copyin(a,b,c) win_copyin((td),(a),(b),(c))
#define copyout(a,b,c) win_copyout((td),(a),(b),(c))
void *get_token_info (HANDLE, TOKEN_INFORMATION_CLASS);
-int ipcperm (struct thread *, struct ipc_perm *, unsigned int);
-int suser (struct thread *);
+int ipcperm (class thread *, struct ipc_perm *, unsigned int);
+int suser (class thread *);
bool adjust_identity_info (struct proc *p);
struct vmspace *ipc_p_vmspace (struct proc *);
-int ipcexit_creat_hookthread(struct thread *);
+int ipcexit_creat_hookthread(class thread *);
void ipcinit (void);
int ipcunload (void);
vm_object_t _vm_pager_allocate (int, int);
#define vm_pager_allocate(a,b,s,c,d) _vm_pager_allocate((s),(mode))
-vm_object_t vm_object_duplicate (struct thread *td, vm_object_t object);
+vm_object_t vm_object_duplicate (class thread *td, vm_object_t object);
void vm_object_deallocate (vm_object_t object);
void tunable_param_init (const char *, bool);
diff --git a/winsup/cygserver/bsd_log.cc b/winsup/cygserver/bsd_log.cc
index 18dc1a53b..f08415432 100644
--- a/winsup/cygserver/bsd_log.cc
+++ b/winsup/cygserver/bsd_log.cc
@@ -1,7 +1,5 @@
/* bsd_log.cc
- Copyright 2003, 2004, 2012 Red Hat Inc.
-
This file is part of Cygwin.
This software is a copyrighted work licensed under the terms of the
diff --git a/winsup/cygserver/bsd_log.h b/winsup/cygserver/bsd_log.h
index 0027d4ff5..58d05171d 100644
--- a/winsup/cygserver/bsd_log.h
+++ b/winsup/cygserver/bsd_log.h
@@ -1,7 +1,5 @@
/* bsd_log.h: Helps integrating BSD kernel code
- Copyright 2003, 2012 Red Hat, Inc.
-
This file is part of Cygwin.
This software is a copyrighted work licensed under the terms of the
diff --git a/winsup/cygserver/bsd_mutex.cc b/winsup/cygserver/bsd_mutex.cc
index a13cfe07d..f21e4d7e9 100644
--- a/winsup/cygserver/bsd_mutex.cc
+++ b/winsup/cygserver/bsd_mutex.cc
@@ -1,7 +1,5 @@
/* bsd_mutex.cc
- Copyright 2003, 2004, 2005, 2007, 2012 Red Hat Inc.
-
This file is part of Cygwin.
This software is a copyrighted work licensed under the terms of the
@@ -34,7 +32,7 @@ mtx_init (mtx *m, const char *name, const void *, int)
unlockable by the lock owner. */
m->h = CreateSemaphore (NULL, 1, 1, NULL);
if (!m->h)
- panic ("couldn't allocate %s mutex, %lu\n", name, GetLastError ());
+ panic ("couldn't allocate %s mutex, %u\n", name, GetLastError ());
}
void
@@ -43,7 +41,7 @@ _mtx_lock (mtx *m, DWORD winpid, const char *file, int line)
_log (file, line, LOG_DEBUG, "Try locking mutex %s (%u) (hold: %u)",
m->name, winpid, m->owner);
if (WaitForSingleObject (m->h, INFINITE) != WAIT_OBJECT_0)
- _panic (file, line, "wait for %s in %d failed, %lu", m->name, winpid,
+ _panic (file, line, "wait for %s in %d failed, %u", m->name, winpid,
GetLastError ());
m->owner = winpid;
_log (file, line, LOG_DEBUG, "Locked mutex %s/%u (%u)",
@@ -86,7 +84,7 @@ _mtx_unlock (mtx *m, const char *file, int line)
{
/* Check if the semaphore was already on it's max value. */
if (GetLastError () != ERROR_TOO_MANY_POSTS)
- _panic (file, line, "release of mutex %s failed, %lu", m->name,
+ _panic (file, line, "release of mutex %s failed, %u", m->name,
GetLastError ());
}
_log (file, line, LOG_DEBUG, "Unlocked mutex %s/%u (owner: %u)",
@@ -141,7 +139,7 @@ set_priority (int priority)
int old_prio = GetThreadPriority (GetCurrentThread ());
if (!SetThreadPriority (GetCurrentThread (), win_priority (priority)))
log (LOG_WARNING,
- "Warning: Setting thread priority to %d failed with error %lu\n",
+ "Warning: Setting thread priority to %d failed with error %u\n",
win_priority (priority), GetLastError ());
return old_prio;
}
@@ -201,7 +199,7 @@ class msleep_sync_array
a[i].ident = ident;
a[i].wakeup_evt = CreateEvent (NULL, TRUE, FALSE, NULL);
if (!a[i].wakeup_evt)
- panic ("CreateEvent failed: %lu", GetLastError ());
+ panic ("CreateEvent failed: %u", GetLastError ());
debug ("i = %d, CreateEvent: %x", i, a[i].wakeup_evt);
a[i].threads = 1;
++cnt;
@@ -227,6 +225,8 @@ public:
panic ("Allocating msleep records failed: %d", errno);
}
+ ~msleep_sync_array () { delete a; }
+
HANDLE enter (void *ident)
{
HANDLE evt = NULL;
@@ -284,7 +284,7 @@ msleep_init (void)
msleep_glob_evt = CreateEvent (NULL, TRUE, FALSE, NULL);
if (!msleep_glob_evt)
- panic ("CreateEvent in msleep_init failed: %lu", GetLastError ());
+ panic ("CreateEvent in msleep_init failed: %u", GetLastError ());
int32_t msgmni = support_msgqueues ? msginfo.msgmni : 0;
int32_t semmni = support_semaphores ? seminfo.semmni : 0;
TUNABLE_INT_FETCH ("kern.ipc.msgmni", &msgmni);
@@ -312,13 +312,12 @@ _msleep (void *ident, struct mtx *mtx, int priority,
evt,
msleep_glob_evt,
td->client->handle (),
- td->client->signal_arrived ()
+ td->ipcblk->signal_arrived
};
/* PCATCH handling. If PCATCH is given and signal_arrived is a valid
handle, then it's used in the WaitFor call and EINTR is returned. */
int obj_cnt = 3;
- if ((priority & PCATCH)
- && td->client->signal_arrived () != INVALID_HANDLE_VALUE)
+ if ((priority & PCATCH) && obj[3])
obj_cnt = 4;
switch (WaitForMultipleObjects (obj_cnt, obj, FALSE, timo ?: INFINITE))
{
@@ -348,8 +347,8 @@ _msleep (void *ident, struct mtx *mtx, int priority,
treat an ERROR_INVALID_HANDLE as a normal process termination and
hope for the best. */
if (GetLastError () != ERROR_INVALID_HANDLE)
- panic ("wait in msleep (%s) failed, %lu", wmesg, GetLastError ());
- debug ("wait in msleep (%s) failed for %d, %lu", wmesg,
+ panic ("wait in msleep (%s) failed, %u", wmesg, GetLastError ());
+ debug ("wait in msleep (%s) failed for %d, %u", wmesg,
td->td_proc->winpid, GetLastError ());
ret = EIDRM;
break;
diff --git a/winsup/cygserver/bsd_mutex.h b/winsup/cygserver/bsd_mutex.h
index c9f501576..de38bcece 100644
--- a/winsup/cygserver/bsd_mutex.h
+++ b/winsup/cygserver/bsd_mutex.h
@@ -1,7 +1,5 @@
/* bsd_mutex.h: BSD Mutex helper
- Copyright 2003, 2005 Red Hat, Inc.
-
This file is part of Cygwin.
This software is a copyrighted work licensed under the terms of the
diff --git a/winsup/cygserver/client.cc b/winsup/cygserver/client.cc
index 63ce421c9..0876d0e16 100644
--- a/winsup/cygserver/client.cc
+++ b/winsup/cygserver/client.cc
@@ -1,7 +1,5 @@
/* client.cc
- Copyright 2001, 2002, 2003, 2004, 2008, 2009, 2012, 2013 Red Hat Inc.
-
Written by Egor Duda <deo@logos-m.ru>
This file is part of Cygwin.
@@ -26,6 +24,7 @@ details. */
#include "cygserver_sem.h"
#include "cygserver_shm.h"
#include "cygserver_setpwd.h"
+#include "cygserver_pwdgrp.h"
#include "cygserver.h"
#include "transport.h"
@@ -60,7 +59,7 @@ client_request_get_version::check_version () const
if (!ok)
syscall_printf (("incompatible version of cygwin server: "
"client version %d.%d.%d.%d, "
- "server version %ld.%ld.%ld.%ld"),
+ "server version %d.%d.%d.%d"),
CYGWIN_SERVER_VERSION_MAJOR,
CYGWIN_SERVER_VERSION_API,
CYGWIN_SERVER_VERSION_MINOR,
@@ -83,8 +82,8 @@ client_request_attach_tty::client_request_attach_tty (DWORD nmaster_pid,
req.from_master = nfrom_master;
req.to_master = nto_master;
- syscall_printf (("created: pid = %lu, master_pid = %lu, "
- "from_master = %lu, to_master = %lu"),
+ syscall_printf (("created: pid = %u, master_pid = %u, "
+ "from_master = %p, to_master = %p"),
req.pid, req.master_pid, req.from_master, req.to_master);
}
#endif /* __INSIDE_CYGWIN__ */
@@ -139,8 +138,8 @@ client_request::send (transport_layer_base * const conn)
assert (errno);
error_code (errno);
syscall_printf (("request header write failure: "
- "only %ld bytes sent of %ld, "
- "error = %d(%lu)"),
+ "only %ld bytes sent of %lu, "
+ "error = %d(%u)"),
count, sizeof (_header),
errno, GetLastError ());
return;
@@ -156,17 +155,14 @@ client_request::send (transport_layer_base * const conn)
assert (errno);
error_code (errno);
syscall_printf (("request body write failure: "
- "only %ld bytes sent of %ld, "
- "error = %d(%lu)"),
+ "only %ld bytes sent of %lu, "
+ "error = %d(%u)"),
count, msglen (),
errno, GetLastError ());
return;
}
}
- // verbose: syscall_printf ("request sent (%ld + %ld bytes)",
- // sizeof (_header), msglen ());
-
{
const ssize_t count = conn->read (&_header, sizeof (_header));
@@ -175,8 +171,8 @@ client_request::send (transport_layer_base * const conn)
assert (errno);
error_code (errno);
syscall_printf (("reply header read failure: "
- "only %ld bytes received of %ld, "
- "error = %d(%lu)"),
+ "only %ld bytes received of %lu, "
+ "error = %d(%u)"),
count, sizeof (_header),
errno, GetLastError ());
return;
@@ -185,7 +181,7 @@ client_request::send (transport_layer_base * const conn)
if (msglen () && !_buf)
{
- system_printf ("no client buffer for reply body: %ld bytes needed",
+ system_printf ("no client buffer for reply body: %lu bytes needed",
msglen ());
error_code (EINVAL);
return;
@@ -194,7 +190,7 @@ client_request::send (transport_layer_base * const conn)
if (msglen () > _buflen)
{
system_printf (("client buffer too small for reply body: "
- "have %ld bytes and need %ld"),
+ "have %lu bytes and need %lu"),
_buflen, msglen ());
error_code (EINVAL);
return;
@@ -209,16 +205,13 @@ client_request::send (transport_layer_base * const conn)
assert (errno);
error_code (errno);
syscall_printf (("reply body read failure: "
- "only %ld bytes received of %ld, "
- "error = %d(%lu)"),
+ "only %ld bytes received of %lu, "
+ "error = %d(%u)"),
count, msglen (),
errno, GetLastError ());
return;
}
}
-
- // verbose: syscall_printf ("reply received (%ld + %ld bytes)",
- // sizeof (_header), msglen ());
}
#ifdef __OUTSIDE_CYGWIN__
@@ -258,14 +251,12 @@ client_request::handle_request (transport_layer_base *const conn,
if (count != sizeof (header))
{
syscall_printf (("request header read failure: "
- "only %ld bytes received of %ld, "
- "error = %d(%lu)"),
+ "only %ld bytes received of %lu, "
+ "error = %d(%u)"),
count, sizeof (header),
errno, GetLastError ());
return;
}
-
- // verbose: debug_printf ("got header (%ld)", count);
}
client_request *req = NULL;
@@ -293,6 +284,9 @@ client_request::handle_request (transport_layer_base *const conn,
case CYGSERVER_REQUEST_SETPWD:
req = new client_request_setpwd;
break;
+ case CYGSERVER_REQUEST_PWDGRP:
+ req = new client_request_pwdgrp;
+ break;
default:
syscall_printf ("unknown request code %d received: request ignored",
header.request_code);
@@ -330,7 +324,7 @@ client_request::handle (transport_layer_base *const conn,
{
if (msglen () && !_buf)
{
- system_printf ("no buffer for request body: %ld bytes needed",
+ system_printf ("no buffer for request body: %lu bytes needed",
msglen ());
error_code (EINVAL);
return;
@@ -339,7 +333,7 @@ client_request::handle (transport_layer_base *const conn,
if (msglen () > _buflen)
{
system_printf (("buffer too small for request body: "
- "have %ld bytes and need %ld"),
+ "have %lu bytes and need %lu"),
_buflen, msglen ());
error_code (EINVAL);
return;
@@ -354,17 +348,14 @@ client_request::handle (transport_layer_base *const conn,
assert (errno);
error_code (errno);
syscall_printf (("request body read failure: "
- "only %ld bytes received of %ld, "
- "error = %d(%lu)"),
+ "only %ld bytes received of %lu, "
+ "error = %d(%u)"),
count, msglen (),
errno, GetLastError ());
return;
}
}
- // verbose: syscall_printf ("request received (%ld + %ld bytes)",
- // sizeof (_header), msglen ());
-
error_code (0); // Overwrites the _header.request_code field.
/*
@@ -381,8 +372,8 @@ client_request::handle (transport_layer_base *const conn,
assert (errno);
error_code (errno);
syscall_printf (("reply header write failure: "
- "only %ld bytes sent of %ld, "
- "error = %d(%lu)"),
+ "only %ld bytes sent of %lu, "
+ "error = %d(%u)"),
count, sizeof (_header),
errno, GetLastError ());
return;
@@ -398,16 +389,13 @@ client_request::handle (transport_layer_base *const conn,
assert (errno);
error_code (errno);
syscall_printf (("reply body write failure: "
- "only %ld bytes sent of %ld, "
- "error = %d(%lu)"),
+ "only %ld bytes sent of %lu, "
+ "error = %d(%u)"),
count, msglen (),
errno, GetLastError ());
return;
}
}
-
- // verbose: syscall_printf ("reply sent (%ld + %ld bytes)",
- // sizeof (_header), msglen ());
}
/* The server side implementation of make_request. Very simple. */
diff --git a/winsup/cygserver/configure b/winsup/cygserver/configure
index 8048534ca..71d1592f4 100755
--- a/winsup/cygserver/configure
+++ b/winsup/cygserver/configure
@@ -1,11 +1,11 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.68.
+# Generated by GNU Autoconf 2.69 for Cygwin Cygserver 0.
#
+# Report bugs to <cygwin@cygwin.com>.
#
-# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
-# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software
-# Foundation, Inc.
+#
+# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
#
#
# This configure script is free software; the Free Software Foundation
@@ -134,6 +134,31 @@ export LANGUAGE
# CDPATH.
(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
+# Use a proper internal environment variable to ensure we don't fall
+ # into an infinite loop, continuously re-executing ourselves.
+ if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
+ _as_can_reexec=no; export _as_can_reexec;
+ # We cannot yet assume a decent shell, so we have to provide a
+# neutralization value for shells without unset; and this also
+# works around shells that cannot unset nonexistent variables.
+# Preserve -v and -x to the replacement shell.
+BASH_ENV=/dev/null
+ENV=/dev/null
+(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
+case $- in # ((((
+ *v*x* | *x*v* ) as_opts=-vx ;;
+ *v* ) as_opts=-v ;;
+ *x* ) as_opts=-x ;;
+ * ) as_opts= ;;
+esac
+exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
+# Admittedly, this is quite paranoid, since all the known shells bail
+# out after a failed `exec'.
+$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
+as_fn_exit 255
+ fi
+ # We don't want this to propagate to other subprocesses.
+ { _as_can_reexec=; unset _as_can_reexec;}
if test "x$CONFIG_SHELL" = x; then
as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
emulate sh
@@ -167,7 +192,8 @@ if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
else
exitcode=1; echo positional parameters were not saved.
fi
-test x\$exitcode = x0 || exit 1"
+test x\$exitcode = x0 || exit 1
+test -x / || exit 1"
as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
@@ -211,21 +237,25 @@ IFS=$as_save_IFS
if test "x$CONFIG_SHELL" != x; then :
- # We cannot yet assume a decent shell, so we have to provide a
- # neutralization value for shells without unset; and this also
- # works around shells that cannot unset nonexistent variables.
- # Preserve -v and -x to the replacement shell.
- BASH_ENV=/dev/null
- ENV=/dev/null
- (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
- export CONFIG_SHELL
- case $- in # ((((
- *v*x* | *x*v* ) as_opts=-vx ;;
- *v* ) as_opts=-v ;;
- *x* ) as_opts=-x ;;
- * ) as_opts= ;;
- esac
- exec "$CONFIG_SHELL" $as_opts "$as_myself" ${1+"$@"}
+ export CONFIG_SHELL
+ # We cannot yet assume a decent shell, so we have to provide a
+# neutralization value for shells without unset; and this also
+# works around shells that cannot unset nonexistent variables.
+# Preserve -v and -x to the replacement shell.
+BASH_ENV=/dev/null
+ENV=/dev/null
+(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
+case $- in # ((((
+ *v*x* | *x*v* ) as_opts=-vx ;;
+ *v* ) as_opts=-v ;;
+ *x* ) as_opts=-x ;;
+ * ) as_opts= ;;
+esac
+exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
+# Admittedly, this is quite paranoid, since all the known shells bail
+# out after a failed `exec'.
+$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
+exit 255
fi
if test x$as_have_required = xno; then :
@@ -235,10 +265,11 @@ fi
$as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
$as_echo "$0: be upgraded to zsh 4.3.4 or later."
else
- $as_echo "$0: Please tell bug-autoconf@gnu.org about your system,
-$0: including any error possibly output before this
-$0: message. Then install a modern shell, or manually run
-$0: the script under such a shell if you do have one."
+ $as_echo "$0: Please tell bug-autoconf@gnu.org and cygwin@cygwin.com
+$0: about your system, including any error possibly output
+$0: before this message. Then install a modern shell, or
+$0: manually run the script under such a shell if you do
+$0: have one."
fi
exit 1
fi
@@ -327,6 +358,14 @@ $as_echo X"$as_dir" |
} # as_fn_mkdir_p
+
+# as_fn_executable_p FILE
+# -----------------------
+# Test if FILE is an executable regular file.
+as_fn_executable_p ()
+{
+ test -f "$1" && test -x "$1"
+} # as_fn_executable_p
# as_fn_append VAR VALUE
# ----------------------
# Append the text in VALUE to the end of the definition contained in VAR. Take
@@ -448,6 +487,10 @@ as_cr_alnum=$as_cr_Letters$as_cr_digits
chmod +x "$as_me.lineno" ||
{ $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
+ # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
+ # already done that, so ensure we don't try to do so again and fall
+ # in an infinite loop. This has already happened in practice.
+ _as_can_reexec=no; export _as_can_reexec
# Don't try to exec as it changes $[0], causing all sort of problems
# (the dirname of $[0] is not the place where we might find the
# original and so on. Autoconf is especially sensitive to this).
@@ -482,16 +525,16 @@ if (echo >conf$$.file) 2>/dev/null; then
# ... but there are two gotchas:
# 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
# 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
- # In both cases, we have to default to `cp -p'.
+ # In both cases, we have to default to `cp -pR'.
ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
- as_ln_s='cp -p'
+ as_ln_s='cp -pR'
elif ln conf$$.file conf$$ 2>/dev/null; then
as_ln_s=ln
else
- as_ln_s='cp -p'
+ as_ln_s='cp -pR'
fi
else
- as_ln_s='cp -p'
+ as_ln_s='cp -pR'
fi
rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
rmdir conf$$.dir 2>/dev/null
@@ -503,28 +546,8 @@ else
as_mkdir_p=false
fi
-if test -x / >/dev/null 2>&1; then
- as_test_x='test -x'
-else
- if ls -dL / >/dev/null 2>&1; then
- as_ls_L_option=L
- else
- as_ls_L_option=
- fi
- as_test_x='
- eval sh -c '\''
- if test -d "$1"; then
- test -d "$1/.";
- else
- case $1 in #(
- -*)set "./$1";;
- esac;
- case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
- ???[sx]*):;;*)false;;esac;fi
- '\'' sh
- '
-fi
-as_executable_p=$as_test_x
+as_test_x='test -x'
+as_executable_p=as_fn_executable_p
# Sed expression to map a string onto a valid CPP name.
as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
@@ -554,12 +577,12 @@ MFLAGS=
MAKEFLAGS=
# Identity of this package.
-PACKAGE_NAME=
-PACKAGE_TARNAME=
-PACKAGE_VERSION=
-PACKAGE_STRING=
-PACKAGE_BUGREPORT=
-PACKAGE_URL=
+PACKAGE_NAME='Cygwin Cygserver'
+PACKAGE_TARNAME='cygwin'
+PACKAGE_VERSION='0'
+PACKAGE_STRING='Cygwin Cygserver 0'
+PACKAGE_BUGREPORT='cygwin@cygwin.com'
+PACKAGE_URL='https://cygwin.com'
ac_unique_file="cygserver.cc"
ac_no_link=no
@@ -579,6 +602,7 @@ all_host
cygwin_headers
newlib_headers
windows_headers
+windows_libdir
CPP
ac_ct_CXX
CXXFLAGS
@@ -605,7 +629,6 @@ build
INSTALL_DATA
INSTALL_SCRIPT
INSTALL_PROGRAM
-windows_libdir
target_alias
host_alias
build_alias
@@ -705,7 +728,7 @@ sharedstatedir='${prefix}/com'
localstatedir='${prefix}/var'
includedir='${prefix}/include'
oldincludedir='/usr/include'
-docdir='${datarootdir}/doc/${PACKAGE}'
+docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
infodir='${datarootdir}/info'
htmldir='${docdir}'
dvidir='${docdir}'
@@ -1120,8 +1143,6 @@ target=$target_alias
if test "x$host_alias" != x; then
if test "x$build_alias" = x; then
cross_compiling=maybe
- $as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host.
- If a cross compiler is detected then cross compile mode will be used" >&2
elif test "x$build_alias" != "x$host_alias"; then
cross_compiling=yes
fi
@@ -1207,7 +1228,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures this package to adapt to many kinds of systems.
+\`configure' configures Cygwin Cygserver 0 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1255,7 +1276,7 @@ Fine tuning of the installation directories:
--infodir=DIR info documentation [DATAROOTDIR/info]
--localedir=DIR locale-dependent data [DATAROOTDIR/locale]
--mandir=DIR man documentation [DATAROOTDIR/man]
- --docdir=DIR documentation root [DATAROOTDIR/doc/PACKAGE]
+ --docdir=DIR documentation root [DATAROOTDIR/doc/cygwin]
--htmldir=DIR html documentation [DOCDIR]
--dvidir=DIR dvi documentation [DOCDIR]
--pdfdir=DIR pdf documentation [DOCDIR]
@@ -1272,7 +1293,9 @@ _ACEOF
fi
if test -n "$ac_init_help"; then
-
+ case $ac_init_help in
+ short | recursive ) echo "Configuration of Cygwin Cygserver 0:";;
+ esac
cat <<\_ACEOF
Optional Features:
@@ -1303,7 +1326,8 @@ Some influential environment variables:
Use these variables to override the choices made by `configure' or to help
it to find libraries and programs with nonstandard names/locations.
-Report bugs to the package provider.
+Report bugs to <cygwin@cygwin.com>.
+Cygwin Cygserver home page: <https://cygwin.com>.
_ACEOF
ac_status=$?
fi
@@ -1366,10 +1390,10 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-configure
-generated by GNU Autoconf 2.68
+Cygwin Cygserver configure 0
+generated by GNU Autoconf 2.69
-Copyright (C) 2010 Free Software Foundation, Inc.
+Copyright (C) 2012 Free Software Foundation, Inc.
This configure script is free software; the Free Software Foundation
gives unlimited permission to copy, distribute and modify it.
_ACEOF
@@ -1496,8 +1520,8 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by $as_me, which was
-generated by GNU Autoconf 2.68. Invocation command line was
+It was created by Cygwin Cygserver $as_me 0, which was
+generated by GNU Autoconf 2.69. Invocation command line was
$ $0 $@
@@ -1844,6 +1868,7 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $
ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
ac_aux_dir=
for ac_dir in .. "$srcdir"/..; do
if test -f "$ac_dir/install-sh"; then
@@ -1876,34 +1901,6 @@ ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
. ${srcdir}/../configure.cygwin
-
-
-# Check whether --with-windows-headers was given.
-if test "${with_windows_headers+set}" = set; then :
- withval=$with_windows_headers; test -z "$withval" && as_fn_error $? "must specify value for --with-windows-headers" "$LINENO" 5
-
-fi
-
-
-
-
-# Check whether --with-windows-libs was given.
-if test "${with_windows_libs+set}" = set; then :
- withval=$with_windows_libs; test -z "$withval" && as_fn_error $? "must specify value for --with-windows-libs" "$LINENO" 5
-
-fi
-
-windows_libdir=$(realdirpath "$with_windows_libs")
-if test -z "$windows_libdir"; then
- windows_libdir=$(realdirpath $(${ac_cv_prog_CC:-$CC} -xc /dev/null -Wl,--verbose=1 -lntdll 2>&1 | sed -rn 's%^.*\s(\S+)/libntdll\..*succeeded%\1%p'))
- if test -z "$windows_libdir"; then
- as_fn_error $? "cannot find windows library files" "$LINENO" 5
- fi
-fi
-
-
-
-
# Find a good install program. We prefer a C program (faster),
# so one script is as good as another. But avoid the broken or
# incompatible versions:
@@ -1941,7 +1938,7 @@ case $as_dir/ in #((
# by default.
for ac_prog in ginstall scoinst install; do
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
if test $ac_prog = install &&
grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
# AIX install. It has an incompatible calling convention.
@@ -2109,7 +2106,6 @@ test -n "$target_alias" &&
NONENONEs,x,x, &&
program_prefix=${target_alias}-
-
ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
@@ -2132,7 +2128,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_CC="${ac_tool_prefix}gcc"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -2172,7 +2168,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_ac_ct_CC="gcc"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -2225,7 +2221,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_CC="${ac_tool_prefix}cc"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -2266,7 +2262,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
ac_prog_rejected=yes
continue
@@ -2324,7 +2320,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -2368,7 +2364,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_ac_ct_CC="$ac_prog"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -2890,8 +2886,7 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <stdarg.h>
#include <stdio.h>
-#include <sys/types.h>
-#include <sys/stat.h>
+struct stat;
/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
struct buf { int x; };
FILE * (*rcsopen) (struct buf *, struct stat *, int);
@@ -3004,7 +2999,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -3048,7 +3043,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_ac_ct_CXX="$ac_prog"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -3376,6 +3371,37 @@ ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+
+# Check whether --with-windows-headers was given.
+if test "${with_windows_headers+set}" = set; then :
+ withval=$with_windows_headers; test -z "$withval" && as_fn_error $? "must specify value for --with-windows-headers" "$LINENO" 5
+
+fi
+
+
+if test "x$with_cross_bootstrap" != "xyes"; then
+
+
+# Check whether --with-windows-libs was given.
+if test "${with_windows_libs+set}" = set; then :
+ withval=$with_windows_libs; test -z "$withval" && as_fn_error $? "must specify value for --with-windows-libs" "$LINENO" 5
+
+fi
+
+windows_libdir=$(realdirpath "$with_windows_libs")
+if test -z "$windows_libdir"; then
+ windows_libdir=$(realdirpath $(${ac_cv_prog_CC:-$CC} -xc /dev/null -Wl,--verbose=1 -lntdll 2>&1 | sed -rn 's%^.*\s(\S+)/libntdll\..*succeeded%\1%p'))
+ if test -z "$windows_libdir"; then
+ as_fn_error $? "cannot find windows library files" "$LINENO" 5
+ fi
+fi
+
+
+
+fi
+
ac_ext=cpp
ac_cpp='$CXXCPP $CPPFLAGS'
ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
@@ -3453,7 +3479,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_AR="${ac_tool_prefix}ar"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -3493,7 +3519,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_ac_ct_AR="ar"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -3545,7 +3571,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_AS="${ac_tool_prefix}as"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -3585,7 +3611,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_ac_ct_AS="as"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -3637,7 +3663,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -3677,7 +3703,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_ac_ct_RANLIB="ranlib"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -3729,7 +3755,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_LD="${ac_tool_prefix}ld"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -3769,7 +3795,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_ac_ct_LD="ld"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -3821,7 +3847,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_NM="${ac_tool_prefix}nm"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -3861,7 +3887,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_ac_ct_NM="nm"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -3913,7 +3939,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -3953,7 +3979,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_ac_ct_DLLTOOL="dlltool"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -4005,7 +4031,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_WINDRES="${ac_tool_prefix}windres"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -4045,7 +4071,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_ac_ct_WINDRES="windres"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -4580,16 +4606,16 @@ if (echo >conf$$.file) 2>/dev/null; then
# ... but there are two gotchas:
# 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
# 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
- # In both cases, we have to default to `cp -p'.
+ # In both cases, we have to default to `cp -pR'.
ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
- as_ln_s='cp -p'
+ as_ln_s='cp -pR'
elif ln conf$$.file conf$$ 2>/dev/null; then
as_ln_s=ln
else
- as_ln_s='cp -p'
+ as_ln_s='cp -pR'
fi
else
- as_ln_s='cp -p'
+ as_ln_s='cp -pR'
fi
rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
rmdir conf$$.dir 2>/dev/null
@@ -4649,28 +4675,16 @@ else
as_mkdir_p=false
fi
-if test -x / >/dev/null 2>&1; then
- as_test_x='test -x'
-else
- if ls -dL / >/dev/null 2>&1; then
- as_ls_L_option=L
- else
- as_ls_L_option=
- fi
- as_test_x='
- eval sh -c '\''
- if test -d "$1"; then
- test -d "$1/.";
- else
- case $1 in #(
- -*)set "./$1";;
- esac;
- case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
- ???[sx]*):;;*)false;;esac;fi
- '\'' sh
- '
-fi
-as_executable_p=$as_test_x
+
+# as_fn_executable_p FILE
+# -----------------------
+# Test if FILE is an executable regular file.
+as_fn_executable_p ()
+{
+ test -f "$1" && test -x "$1"
+} # as_fn_executable_p
+as_test_x='test -x'
+as_executable_p=as_fn_executable_p
# Sed expression to map a string onto a valid CPP name.
as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
@@ -4691,8 +4705,8 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by $as_me, which was
-generated by GNU Autoconf 2.68. Invocation command line was
+This file was extended by Cygwin Cygserver $as_me 0, which was
+generated by GNU Autoconf 2.69. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
CONFIG_HEADERS = $CONFIG_HEADERS
@@ -4738,17 +4752,18 @@ Usage: $0 [OPTION]... [TAG]...
Configuration files:
$config_files
-Report bugs to the package provider."
+Report bugs to <cygwin@cygwin.com>.
+Cygwin Cygserver home page: <https://cygwin.com>."
_ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
-config.status
-configured by $0, generated by GNU Autoconf 2.68,
+Cygwin Cygserver config.status 0
+configured by $0, generated by GNU Autoconf 2.69,
with options \\"\$ac_cs_config\\"
-Copyright (C) 2010 Free Software Foundation, Inc.
+Copyright (C) 2012 Free Software Foundation, Inc.
This config.status script is free software; the Free Software Foundation
gives unlimited permission to copy, distribute and modify it."
@@ -4826,7 +4841,7 @@ fi
_ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
if \$ac_cs_recheck; then
- set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
+ set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
shift
\$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
CONFIG_SHELL='$SHELL'
diff --git a/winsup/cygserver/configure.ac b/winsup/cygserver/configure.ac
index 9fc9a0e16..560de0c05 100644
--- a/winsup/cygserver/configure.ac
+++ b/winsup/cygserver/configure.ac
@@ -1,5 +1,4 @@
-dnl Autoconf configure script for Cygwin.
-dnl Copyright 2003 Red Hat, Inc.
+dnl Autoconf configure script for Cygserver.
dnl
dnl This file is part of Cygwin.
dnl
@@ -9,23 +8,27 @@ dnl details.
dnl
dnl Process this file with autoconf to produce a configure script.
-AC_PREREQ(2.59)dnl
-AC_INIT(cygserver.cc)
+AC_PREREQ([2.59])
+AC_INIT([Cygwin Cygserver],[0],[cygwin@cygwin.com],[cygwin],[https://cygwin.com])
+AC_CONFIG_SRCDIR(cygserver.cc)
AC_CONFIG_AUX_DIR(..)
. ${srcdir}/../configure.cygwin
-AC_WINDOWS_HEADERS
-AC_WINDOWS_LIBS
-
AC_PROG_INSTALL
AC_NO_EXECUTABLES
-AC_CANONICAL_SYSTEM
+AC_CANONICAL_TARGET
AC_PROG_CC
AC_PROG_CXX
AC_PROG_CPP
AC_LANG(C)
+
+AC_WINDOWS_HEADERS
+if test "x$with_cross_bootstrap" != "xyes"; then
+ AC_WINDOWS_LIBS
+fi
+
AC_LANG(C++)
AC_CYGWIN_INCLUDES
@@ -63,4 +66,5 @@ esac
])
AC_CONFIGURE_ARGS
-AC_OUTPUT(Makefile)
+AC_CONFIG_FILES([Makefile])
+AC_OUTPUT
diff --git a/winsup/cygserver/cygserver-config b/winsup/cygserver/cygserver-config
index f9515e71e..373bfd24d 100755
--- a/winsup/cygserver/cygserver-config
+++ b/winsup/cygserver/cygserver-config
@@ -1,7 +1,5 @@
#!/bin/bash
#
-# cygserver-config, Copyright 2003 Red Hat Inc.
-#
# This file is part of the Cygwin DLL.
# Directory where the config files are stored
@@ -10,6 +8,7 @@ LOCALSTATEDIR=/var
progname=$0
auto_answer=""
+service_name=cygserver
request()
{
@@ -63,6 +62,11 @@ do
auto_answer=no
;;
+ -N | --name )
+ service_name=$1
+ shift
+ ;;
+
*)
echo "usage: ${progname} [OPTION]..."
echo
@@ -72,6 +76,7 @@ do
echo " --debug -d Enable shell's debug output."
echo " --yes -y Answer all questions with \"yes\" automatically."
echo " --no -n Answer all questions with \"no\" automatically."
+ echo " --name -N <name> cygserver windows service name."
echo
exit 1
;;
@@ -84,10 +89,10 @@ _sys="`uname`"
_nt=`expr "${_sys}" : "CYGWIN_NT"`
# Check for running cygserver processes first.
-if ps -ef | grep -v grep | grep -q cygserver
+if ps -ef | grep -v grep | grep -q ${service_name}
then
echo
- echo "There is a cygserver already running. Nothing to do, apparently."
+ echo "There is a cygserver (${service_name}) already running. Nothing to do, apparently."
echo
exit 1
fi
@@ -157,14 +162,14 @@ then
exit 1
fi
chmod 664 "${SYSCONFDIR}/cygserver.conf"
- chown system.544 "${SYSCONFDIR}/cygserver.conf"
+ chown 18.544 "${SYSCONFDIR}/cygserver.conf"
fi
# On NT ask if cygserver should be installed as service
if [ ${_nt} -gt 0 ]
then
# But only if it is not already installed
- if ! cygrunsrv -Q cygserver > /dev/null 2>&1
+ if ! cygrunsrv -Q ${service_name} > /dev/null 2>&1
then
echo
echo
@@ -173,7 +178,7 @@ then
echo "Do you want to install cygserver as service?"
if request "(Say \"no\" if it's already installed as service)"
then
- if ! cygrunsrv -I cygserver -d "CYGWIN cygserver" -p /usr/sbin/cygserver
+ if ! cygrunsrv -I ${service_name} -d "CYGWIN cygserver" -p /usr/sbin/cygserver
then
echo
echo "Installation of cygserver as service failed. Please check the"
@@ -186,10 +191,10 @@ then
fi
echo
echo "The service has been installed under LocalSystem account."
- echo "To start it, call \`net start cygserver' or \`cygrunsrv -S cygserver'."
+ echo "To start it, call \`net start ${service_name}' or \`cygrunsrv -S ${service_name}'."
fi
touch "${LOCALSTATEDIR}/log/cygserver.log"
- chown system.544 "${LOCALSTATEDIR}/log/cygserver.log"
+ chown 18.544 "${LOCALSTATEDIR}/log/cygserver.log"
fi
fi
diff --git a/winsup/cygserver/cygserver.cc b/winsup/cygserver/cygserver.cc
index bf78e9daf..44efd0230 100644
--- a/winsup/cygserver/cygserver.cc
+++ b/winsup/cygserver/cygserver.cc
@@ -1,7 +1,5 @@
/* cygserver.cc
- Copyright 2001, 2002, 2003, 2004, 2005, 2007, 2011, 2012 Red Hat Inc.
-
Written by Egor Duda <deo@logos-m.ru>
This file is part of Cygwin.
@@ -180,10 +178,10 @@ client_request_attach_tty::serve (transport_layer_base *const conn,
msglen (0); // Until we fill in some fields.
- debug ("pid %ld:(%p,%p) -> pid %ld", req.master_pid, req.from_master,
+ debug ("pid %d:(%p,%p) -> pid %d", req.master_pid, req.from_master,
req.to_master, req.pid);
- debug ("opening process %ld", req.master_pid);
+ debug ("opening process %d", req.master_pid);
const HANDLE from_process_handle =
OpenProcess (PROCESS_DUP_HANDLE, FALSE, req.master_pid);
@@ -195,7 +193,7 @@ client_request_attach_tty::serve (transport_layer_base *const conn,
return;
}
- debug ("opening process %ld", req.pid);
+ debug ("opening process %d", req.pid);
const HANDLE to_process_handle =
OpenProcess (PROCESS_DUP_HANDLE, FALSE, req.pid);
@@ -491,7 +489,7 @@ print_version ()
log (LOG_INFO,
"cygserver (cygwin) %d.%d.%d\n"
"Cygwin background service daemon\n"
- "Copyright (C) 2001 - %s Red Hat, Inc.\n"
+ "Copyright (C) 2001 - %s Cygwin Authors\n"
"This is free software; see the source for copying conditions. There is NO\n"
"warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.",
CYGWIN_VERSION_DLL_MAJOR / 1000,
diff --git a/winsup/cygserver/cygserver.conf b/winsup/cygserver/cygserver.conf
index 589931b11..51cb58c03 100644
--- a/winsup/cygserver/cygserver.conf
+++ b/winsup/cygserver/cygserver.conf
@@ -1,4 +1,4 @@
-# cygserver.conf, Copyright(C) 2003, 2005 Red Hat Inc.
+# cygserver.conf
#
# Contains configurable parameters for the cygserver.
#
diff --git a/winsup/cygserver/msg.cc b/winsup/cygserver/msg.cc
index c92e698b0..bf7d7b2ff 100644
--- a/winsup/cygserver/msg.cc
+++ b/winsup/cygserver/msg.cc
@@ -1,7 +1,5 @@
/* msg.cc: Single unix specification IPC interface for Cygwin.
- Copyright 2003, 2004, 2012 Red Hat, Inc.
-
This file is part of Cygwin.
This software is a copyrighted work licensed under the terms of the
@@ -55,8 +53,7 @@ client_request_msg::serve (transport_layer_base *const conn,
return;
}
process *const client = cache->process (_parameters.in.ipcblk.cygpid,
- _parameters.in.ipcblk.winpid,
- _parameters.in.ipcblk.signal_arrived);
+ _parameters.in.ipcblk.winpid);
if (!client)
{
error_code (EAGAIN);
@@ -82,7 +79,7 @@ client_request_msg::serve (transport_layer_base *const conn,
conn->revert_to_self ();
/* sysv_msg.cc takes care of itself. */
client->release ();
- thread td = { client, &_parameters.in.ipcblk, {-1, -1} };
+ thread td (client, &_parameters.in.ipcblk, true);
int res;
msgop_t msgop = _parameters.in.msgop; /* Get's overwritten otherwise. */
switch (msgop)
diff --git a/winsup/cygserver/process.cc b/winsup/cygserver/process.cc
index cc665d88e..f0fe4ecfd 100644
--- a/winsup/cygserver/process.cc
+++ b/winsup/cygserver/process.cc
@@ -1,7 +1,5 @@
/* process.cc
- Copyright 2001, 2002, 2003, 2004, 2005 Red Hat Inc.
-
Written by Robert Collins <rbtcollins@hotmail.com>
This file is part of Cygwin.
@@ -20,6 +18,8 @@ details. */
#include "process.h"
+#include "cygserver_ipc.h"
+
/*****************************************************************************/
#define elements(ARRAY) (sizeof (ARRAY) / sizeof (*ARRAY))
@@ -39,11 +39,10 @@ process_cleanup::process ()
/*****************************************************************************/
-process::process (const pid_t cygpid, const DWORD winpid, HANDLE signal_arrived)
+process::process (const pid_t cygpid, const DWORD winpid)
: _cygpid (cygpid),
_winpid (winpid),
_hProcess (NULL),
- _signal_arrived (INVALID_HANDLE_VALUE),
_cleaning_up (false),
_exit_status (STILL_ACTIVE),
_routines_head (NULL),
@@ -52,38 +51,22 @@ process::process (const pid_t cygpid, const DWORD winpid, HANDLE signal_arrived)
_hProcess = OpenProcess (PROCESS_ALL_ACCESS, FALSE, winpid);
if (!_hProcess)
{
- system_printf ("unable to obtain handle for new cache process %d(%lu)",
+ system_printf ("unable to obtain handle for new cache process %d(%u)",
_cygpid, _winpid);
_hProcess = INVALID_HANDLE_VALUE;
_exit_status = 0;
}
else
- debug_printf ("got handle %p for new cache process %d(%lu)",
+ debug_printf ("got handle %p for new cache process %d(%u)",
_hProcess, _cygpid, _winpid);
- if (!signal_arrived)
- system_printf ("signal_arrived NULL for process %d(%lu)",
- _cygpid, _winpid);
- else if (signal_arrived != INVALID_HANDLE_VALUE)
- {
- if (!DuplicateHandle (_hProcess, signal_arrived,
- GetCurrentProcess (), &_signal_arrived,
- 0, FALSE, DUPLICATE_SAME_ACCESS))
- {
- system_printf ("error getting signal_arrived to server (%lu)",
- GetLastError ());
- _signal_arrived = INVALID_HANDLE_VALUE;
- }
- }
InitializeCriticalSection (&_access);
- debug ("initialized (%lu)", _cygpid);
+ debug ("initialized (%u)", _cygpid);
}
process::~process ()
{
- debug ("deleting (%lu)", _cygpid);
+ debug ("deleting (%u)", _cygpid);
DeleteCriticalSection (&_access);
- if (_signal_arrived && _signal_arrived != INVALID_HANDLE_VALUE)
- CloseHandle (_signal_arrived);
CloseHandle (_hProcess);
}
@@ -100,7 +83,7 @@ process::check_exit_code ()
&& _exit_status == STILL_ACTIVE
&& !GetExitCodeProcess (_hProcess, &_exit_status))
{
- system_printf ("failed to retrieve exit code for %d(%lu), error = %lu",
+ system_printf ("failed to retrieve exit code for %d(%u), error = %u",
_cygpid, _winpid, GetLastError ());
_hProcess = INVALID_HANDLE_VALUE;
}
@@ -218,7 +201,7 @@ process_cache::process_cache (const size_t max_procs,
if (!_cache_add_trigger)
{
- system_printf ("failed to create cache add trigger, error = %lu",
+ system_printf ("failed to create cache add trigger, error = %u",
GetLastError ());
abort ();
}
@@ -240,8 +223,7 @@ process_cache::~process_cache ()
* have been deleted once it has been unlocked.
*/
class process *
-process_cache::process (const pid_t cygpid, const DWORD winpid,
- HANDLE signal_arrived)
+process_cache::process (const pid_t cygpid, const DWORD winpid)
{
/* TODO: make this more granular, so a search doesn't involve the
* write lock.
@@ -256,12 +238,12 @@ process_cache::process (const pid_t cygpid, const DWORD winpid,
{
LeaveCriticalSection (&_cache_write_access);
system_printf (("process limit (%d processes) reached; "
- "new connection refused for %d(%lu)"),
+ "new connection refused for %d(%u)"),
_max_process_count, cygpid, winpid);
return NULL;
}
- entry = new class process (cygpid, winpid, signal_arrived);
+ entry = new class process (cygpid, winpid);
if (!entry->is_active ())
{
LeaveCriticalSection (&_cache_write_access);
@@ -326,7 +308,7 @@ process_cache::wait_for_processes (const HANDLE interrupt_event)
rc = WaitForMultipleObjects (count, _wait_array, FALSE, INFINITE);
if (rc == WAIT_FAILED)
{
- system_printf ("could not wait on the process handles, error = %lu",
+ system_printf ("could not wait on the process handles, error = %u",
GetLastError ());
abort ();
}
@@ -349,7 +331,7 @@ process_cache::wait_for_processes (const HANDLE interrupt_event)
rc = WaitForMultipleObjects (mcount, main_wait_array, FALSE, INFINITE);
if (rc == WAIT_FAILED)
{
- system_printf ("could not wait on the process handles, error = %lu",
+ system_printf ("could not wait on the process handles, error = %u",
GetLastError ());
abort ();
}
@@ -358,7 +340,7 @@ process_cache::wait_for_processes (const HANDLE interrupt_event)
GetExitCodeThread (main_wait_array[rc], &rc);
if (rc == WAIT_FAILED)
{
- system_printf ("could not wait on the process handles, error = %lu",
+ system_printf ("could not wait on the process handles, error = %u",
GetLastError ());
abort ();
}
@@ -453,7 +435,7 @@ process_cache::check_and_remove_process (const size_t index)
if (process->check_exit_code () == STILL_ACTIVE)
return;
- debug_printf ("process %d(%lu) has left the building ($? = %lu)",
+ debug_printf ("process %d(%u) has left the building ($? = %u)",
process->_cygpid, process->_winpid, process->_exit_status);
/* Unlink the process object from the process list. */
@@ -496,5 +478,26 @@ process_cache::find (const DWORD winpid, class process **previous)
return NULL;
}
+void
+thread::dup_signal_arrived ()
+{
+ if (ipcblk && ipcblk->signal_arrived
+ && !DuplicateHandle (client->handle (), ipcblk->signal_arrived,
+ GetCurrentProcess (), &ipcblk->signal_arrived,
+ 0, FALSE, DUPLICATE_SAME_ACCESS))
+ {
+ system_printf ("error duplicating thread's signal_arrived "
+ "to server (%u)", GetLastError ());
+ ipcblk->signal_arrived = NULL;
+ }
+}
+
+void
+thread::close_signal_arrived ()
+{
+ if (ipcblk && ipcblk->signal_arrived)
+ CloseHandle (ipcblk->signal_arrived);
+}
+
/*****************************************************************************/
#endif /* __OUTSIDE_CYGWIN__ */
diff --git a/winsup/cygserver/process.h b/winsup/cygserver/process.h
index 3de11b6f8..282586e8d 100644
--- a/winsup/cygserver/process.h
+++ b/winsup/cygserver/process.h
@@ -1,7 +1,5 @@
/* process.h
- Copyright 2001, 2002, 2003, 2004, 2005, 2012 Red Hat Inc.
-
Written by Robert Collins <rbtcollins@hotmail.com>
This file is part of Cygwin.
@@ -74,14 +72,12 @@ class process
friend class process_cleanup;
public:
- process (pid_t cygpid, DWORD winpid,
- HANDLE signal_arrived = INVALID_HANDLE_VALUE);
+ process (pid_t cygpid, DWORD winpid);
~process ();
pid_t cygpid () const { return _cygpid; }
DWORD winpid () const { return _winpid; }
HANDLE handle () const { return _hProcess; }
- HANDLE signal_arrived () const { return _signal_arrived; }
bool is_active () const { return _exit_status == STILL_ACTIVE; }
@@ -102,7 +98,6 @@ private:
const pid_t _cygpid;
const DWORD _winpid;
HANDLE _hProcess;
- HANDLE _signal_arrived;
LONG _cleaning_up;
DWORD _exit_status; // Set in the constructor and in exit_code ().
cleanup_routine *_routines_head;
@@ -144,8 +139,7 @@ public:
process_cache (const size_t max_procs, const unsigned int initial_workers);
~process_cache ();
- class process *process (pid_t cygpid, DWORD winpid,
- HANDLE signal_arrived = INVALID_HANDLE_VALUE);
+ class process *process (pid_t cygpid, DWORD winpid);
bool running () const { return _queue.running (); }
diff --git a/winsup/cygserver/pwdgrp.cc b/winsup/cygserver/pwdgrp.cc
new file mode 100644
index 000000000..5f0e40822
--- /dev/null
+++ b/winsup/cygserver/pwdgrp.cc
@@ -0,0 +1,167 @@
+/* pwdgrp.cc: Request account information
+
+This file is part of Cygwin.
+
+This software is a copyrighted work licensed under the terms of the
+Cygwin license. Please consult the file "CYGWIN_LICENSE" for
+details. */
+
+#ifdef __OUTSIDE_CYGWIN__
+#include "woutsup.h"
+
+#include <stdio.h>
+#include <errno.h>
+#include <pwd.h>
+#include <grp.h>
+#include <sys/cygwin.h>
+
+#include "cygserver.h"
+#include "process.h"
+#include "transport.h"
+
+#include "cygserver_pwdgrp.h"
+
+#include <sddl.h>
+
+client_request_pwdgrp::client_request_pwdgrp ()
+ : client_request (CYGSERVER_REQUEST_PWDGRP,
+ &_parameters, sizeof (_parameters))
+{
+}
+
+void
+client_request_pwdgrp::pwd_serve ()
+{
+ struct passwd *pwd = NULL;
+
+ switch (_parameters.in.type)
+ {
+ case SID_arg:
+ pwd = (struct passwd *) cygwin_internal (CW_GETPWSID, 0,
+ &_parameters.in.arg.sid);
+ break;
+ case NAME_arg:
+ pwd = getpwnam (_parameters.in.arg.name);
+ break;
+ case ID_arg:
+ pwd = getpwuid (_parameters.in.arg.id);
+ break;
+ default:
+ break;
+ }
+ if (pwd)
+ msglen (snprintf (_parameters.out.line, sizeof _parameters.out.line,
+ "%s:%s:%u:%u:%s:%s:%s",
+ pwd->pw_name ?: "",
+ pwd->pw_passwd ?: "",
+ (uint32_t) pwd->pw_uid,
+ (uint32_t) pwd->pw_gid,
+ pwd->pw_gecos ?: "",
+ pwd->pw_dir ?: "",
+ pwd->pw_shell ?: "") + 1);
+ else
+ {
+ switch (_parameters.in.type)
+ {
+ case SID_arg:
+ {
+ char *str;
+ if (ConvertSidToStringSid (&_parameters.in.arg.sid, &str))
+ {
+ debug_printf ("User <%s> failed", str);
+ LocalFree (str);
+ }
+ }
+ break;
+ case NAME_arg:
+ debug_printf ("User <%s> failed", _parameters.in.arg.name);
+ break;
+ case ID_arg:
+ debug_printf ("User <%u> failed", _parameters.in.arg.id);
+ break;
+ default:
+ break;
+ }
+ _parameters.out.line[0] = '\0';
+ msglen (0);
+ error_code (ENOENT);
+ }
+}
+
+void
+client_request_pwdgrp::grp_serve ()
+{
+ struct group *grp = NULL;
+
+ switch (_parameters.in.type)
+ {
+ case SID_arg:
+ grp = (struct group *) cygwin_internal (CW_GETGRSID, 0,
+ &_parameters.in.arg.sid);
+ break;
+ case NAME_arg:
+ grp = getgrnam (_parameters.in.arg.name);
+ break;
+ case ID_arg:
+ grp = getgrgid (_parameters.in.arg.id);
+ break;
+ default:
+ break;
+ }
+ if (grp)
+ msglen (snprintf (_parameters.out.line, sizeof _parameters.out.line,
+ "%s:%s:%u:",
+ grp->gr_name ?: "",
+ grp->gr_passwd ?: "",
+ (uint32_t) grp->gr_gid) + 1);
+ else
+ {
+ switch (_parameters.in.type)
+ {
+ case SID_arg:
+ {
+ char *str;
+ if (ConvertSidToStringSid (&_parameters.in.arg.sid, &str))
+ {
+ debug_printf ("Group <%s> failed", str);
+ LocalFree (str);
+ }
+ }
+ break;
+ case NAME_arg:
+ debug_printf ("Group <%s> failed", _parameters.in.arg.name);
+ break;
+ case ID_arg:
+ debug_printf ("Group <%u> failed", _parameters.in.arg.id);
+ break;
+ default:
+ break;
+ }
+ _parameters.out.line[0] = '\0';
+ msglen (0);
+ error_code (ENOENT);
+ }
+}
+
+void
+client_request_pwdgrp::serve (transport_layer_base *const conn,
+ process_cache *const cache)
+{
+ debug_printf ("Request account information");
+ if (msglen () < __builtin_offsetof (struct _pwdgrp_param_t::_pwdgrp_in_t, arg)
+ + sizeof (uint32_t)
+ || msglen () > sizeof (_parameters.in))
+ {
+ syscall_printf ("bad request body length: got %lu", msglen ());
+ error_code (EINVAL);
+ msglen (0);
+ return;
+ }
+ error_code (0);
+ if (_parameters.in.group)
+ grp_serve ();
+ else
+ pwd_serve ();
+ debug_printf ("Request account information returns <%s> error %d", _parameters.out.line, error_code ());
+}
+#endif /* __OUTSIDE_CYGWIN__ */
diff --git a/winsup/cygserver/sem.cc b/winsup/cygserver/sem.cc
index 55cd6e51e..2c0226478 100644
--- a/winsup/cygserver/sem.cc
+++ b/winsup/cygserver/sem.cc
@@ -1,7 +1,5 @@
/* sem.cc: Single unix specification IPC interface for Cygwin.
- Copyright 2003, 2004, 2012 Red Hat, Inc.
-
This file is part of Cygwin.
This software is a copyrighted work licensed under the terms of the
@@ -52,8 +50,7 @@ client_request_sem::serve (transport_layer_base *const conn,
return;
}
process *const client = cache->process (_parameters.in.ipcblk.cygpid,
- _parameters.in.ipcblk.winpid,
- _parameters.in.ipcblk.signal_arrived);
+ _parameters.in.ipcblk.winpid);
if (!client)
{
error_code (EAGAIN);
@@ -79,7 +76,7 @@ client_request_sem::serve (transport_layer_base *const conn,
conn->revert_to_self ();
/* sysv_sem.cc takes care of itself. */
client->release ();
- thread td = { client, &_parameters.in.ipcblk, {-1, -1} };
+ thread td (client, &_parameters.in.ipcblk, true);
int res;
switch (_parameters.in.semop)
{
diff --git a/winsup/cygserver/setpwd.cc b/winsup/cygserver/setpwd.cc
index 8125fd25a..7e79aa29c 100644
--- a/winsup/cygserver/setpwd.cc
+++ b/winsup/cygserver/setpwd.cc
@@ -1,7 +1,5 @@
/* setpwd.cc: Set LSA private data password for current user.
- Copyright 2008 Red Hat, Inc.
-
This file is part of Cygwin.
This software is a copyrighted work licensed under the terms of the
@@ -91,7 +89,7 @@ client_request_setpwd::serve (transport_layer_base *const conn,
RtlInitUnicodeString (&data, _parameters.in.passwd);
status = LsaStorePrivateData (lsa, &key, data.Length ? &data : NULL);
if (data.Length)
- memset (data.Buffer, 0, data.Length);
+ RtlSecureZeroMemory (data.Buffer, data.Length);
/* Success or we're trying to remove a password entry which doesn't exist. */
if (NT_SUCCESS (status)
|| (data.Length == 0 && status == STATUS_OBJECT_NAME_NOT_FOUND))
diff --git a/winsup/cygserver/shm.cc b/winsup/cygserver/shm.cc
index 3be0d15f4..b312c031f 100644
--- a/winsup/cygserver/shm.cc
+++ b/winsup/cygserver/shm.cc
@@ -1,7 +1,5 @@
/* shm.cc: Single unix specification IPC interface for Cygwin.
- Copyright 2003, 2004, 2012 Red Hat, Inc.
-
This file is part of Cygwin.
This software is a copyrighted work licensed under the terms of the
@@ -55,8 +53,7 @@ client_request_shm::serve (transport_layer_base *const conn,
return;
}
process *const client = cache->process (_parameters.in.ipcblk.cygpid,
- _parameters.in.ipcblk.winpid,
- _parameters.in.ipcblk.signal_arrived);
+ _parameters.in.ipcblk.winpid);
if (!client)
{
error_code (EAGAIN);
@@ -82,7 +79,7 @@ client_request_shm::serve (transport_layer_base *const conn,
conn->revert_to_self ();
/* sysv_shm.cc takes care of itself. */
client->release ();
- thread td = { client, &_parameters.in.ipcblk, {0, 0} };
+ thread td (client, &_parameters.in.ipcblk, false);
int res;
shmop_t shmop = _parameters.in.shmop; /* Get's overwritten otherwise. */
switch (shmop)
diff --git a/winsup/cygserver/sysv_msg.cc b/winsup/cygserver/sysv_msg.cc
index 217cc1d97..9e90d05a9 100644
--- a/winsup/cygserver/sysv_msg.cc
+++ b/winsup/cygserver/sysv_msg.cc
@@ -733,7 +733,8 @@ msgsnd(struct thread *td, struct msgsnd_args *uap)
if (error != 0) {
DPRINTF(("msgsnd: interrupted system call\n"));
#ifdef __CYGWIN__
- if (error != EIDRM)
+ if (error == EIDRM)
+ goto done2;
#endif /* __CYGWIN__ */
error = EINTR;
goto done2;
@@ -1089,7 +1090,8 @@ msgrcv(struct thread *td, struct msgrcv_args *uap)
if (error != 0) {
DPRINTF(("msgrcv: interrupted system call\n"));
#ifdef __CYGWIN__
- if (error != EIDRM)
+ if (error == EIDRM)
+ goto done2;
#endif /* __CYGWIN__ */
error = EINTR;
goto done2;
diff --git a/winsup/cygserver/sysv_sem.cc b/winsup/cygserver/sysv_sem.cc
index e7ba48b61..349322c6d 100644
--- a/winsup/cygserver/sysv_sem.cc
+++ b/winsup/cygserver/sysv_sem.cc
@@ -1177,7 +1177,8 @@ semop(struct thread *td, struct semop_args *uap)
*/
if (error != 0) {
#ifdef __CYGWIN__
- if (error != EIDRM)
+ if (error == EIDRM)
+ goto done2;
#endif /* __CYGWIN__ */
error = EINTR;
goto done2;
diff --git a/winsup/cygserver/threaded_queue.cc b/winsup/cygserver/threaded_queue.cc
index 53dd6fa11..0181a21c4 100644
--- a/winsup/cygserver/threaded_queue.cc
+++ b/winsup/cygserver/threaded_queue.cc
@@ -1,7 +1,5 @@
/* threaded_queue.cc
- Copyright 2001, 2002, 2003 Red Hat Inc.
-
Written by Robert Collins <rbtcollins@hotmail.com>
This file is part of Cygwin.
@@ -55,7 +53,7 @@ threaded_queue::threaded_queue (const size_t initial_workers)
if (!_requests_sem)
{
system_printf (("failed to create the request queue semaphore, "
- "error = %lu"),
+ "error = %u"),
GetLastError ());
abort ();
}
@@ -145,7 +143,7 @@ threaded_queue::stop ()
while (_workers_count)
{
debug_printf (("waiting for worker threads to terminate: "
- "%lu still running"),
+ "%u still running"),
_workers_count);
Sleep (1000);
}
@@ -228,7 +226,7 @@ threaded_queue::create_workers (const size_t initial_workers)
if (!hThread)
{
- system_printf ("failed to create thread, error = %lu",
+ system_printf ("failed to create thread, error = %u",
GetLastError ());
abort ();
}
@@ -245,7 +243,7 @@ threaded_queue::worker_loop ()
const DWORD rc = WaitForSingleObject (_requests_sem, INFINITE);
if (rc == WAIT_FAILED)
{
- system_printf ("wait for request semaphore failed, error = %lu",
+ system_printf ("wait for request semaphore failed, error = %u",
GetLastError ());
return;
}
@@ -297,7 +295,7 @@ queue_submission_loop::queue_submission_loop (threaded_queue *const queue,
if (!_interrupt_event)
{
- system_printf ("failed to create interrupt event, error = %lu",
+ system_printf ("failed to create interrupt event, error = %u",
GetLastError ());
abort ();
}
@@ -329,7 +327,7 @@ queue_submission_loop::start ()
_hThread = CreateThread (NULL, 0, start_routine, this, 0, &_tid);
if (!_hThread)
{
- system_printf ("failed to create thread, error = %lu",
+ system_printf ("failed to create thread, error = %u",
GetLastError ());
abort ();
}
@@ -359,14 +357,14 @@ queue_submission_loop::stop ()
if (WaitForSingleObject (_hThread, 1000) == WAIT_TIMEOUT)
{
- system_printf (("request loop thread %lu failed to shutdown "
+ system_printf (("request loop thread %u failed to shutdown "
"when asked politely: about to get heavy"),
_tid);
if (!TerminateThread (_hThread, 0))
{
- system_printf (("failed to kill request loop thread %lu"
- ", error = %lu"),
+ system_printf (("failed to kill request loop thread %u"
+ ", error = %u"),
_tid, GetLastError ());
abort ();
}
@@ -378,11 +376,11 @@ queue_submission_loop::stop ()
// the submission loop is no longer running and shuts down
// voluntarily.
- debug_printf ("killing request loop thread %lu", _tid);
+ debug_printf ("killing request loop thread %u", _tid);
if (!TerminateThread (_hThread, 0))
- system_printf (("failed to kill request loop thread %lu"
- ", error = %lu"),
+ system_printf (("failed to kill request loop thread %u"
+ ", error = %u"),
_tid, GetLastError ());
}
}
diff --git a/winsup/cygserver/threaded_queue.h b/winsup/cygserver/threaded_queue.h
index e17f90434..8a8543058 100644
--- a/winsup/cygserver/threaded_queue.h
+++ b/winsup/cygserver/threaded_queue.h
@@ -1,7 +1,5 @@
/* threaded_queue.h
- Copyright 2001, 2002, 2003, 2012 Red Hat Inc.
-
Written by Robert Collins <rbtcollins@hotmail.com>
This file is part of Cygwin.
diff --git a/winsup/cygserver/transport.cc b/winsup/cygserver/transport.cc
index ff9ce8d80..75376ce7f 100644
--- a/winsup/cygserver/transport.cc
+++ b/winsup/cygserver/transport.cc
@@ -1,7 +1,5 @@
/* transport.cc
- Copyright 2001, 2002, 2003, 2004, 2007 Red Hat Inc.
-
Written by Robert Collins <rbtcollins@hotmail.com>
This file is part of Cygwin.
diff --git a/winsup/cygserver/transport.h b/winsup/cygserver/transport.h
index 80f50fd06..88d561a2c 100644
--- a/winsup/cygserver/transport.h
+++ b/winsup/cygserver/transport.h
@@ -1,7 +1,5 @@
/* transport.h
- Copyright 2001, 2002, 2003, 2004 Red Hat Inc.
-
Written by Robert Collins <rbtcollins@hotmail.com>
This file is part of Cygwin.
diff --git a/winsup/cygserver/transport_pipes.cc b/winsup/cygserver/transport_pipes.cc
index dda15d3d4..bf642c69f 100644
--- a/winsup/cygserver/transport_pipes.cc
+++ b/winsup/cygserver/transport_pipes.cc
@@ -1,7 +1,5 @@
/* transport_pipes.cc
- Copyright 2001, 2002, 2003, 2004, 2009, 2012 Red Hat Inc.
-
Written by Robert Collins <rbtcollins@hotmail.com>
This file is part of Cygwin.
@@ -83,6 +81,9 @@ transport_layer_pipes::~transport_layer_pipes ()
#ifndef __INSIDE_CYGWIN__
+static HANDLE listen_pipe;
+static HANDLE connect_pipe;
+
int
transport_layer_pipes::listen ()
{
@@ -94,16 +95,19 @@ transport_layer_pipes::listen ()
debug ("Try to create named pipe: %ls", _pipe_name);
- HANDLE listen_pipe =
+ /* We have to create the first instance of the listening pipe here, and
+ we also have to create at least one instance of the client side to avoid
+ a race condition.
+ See https://cygwin.com/ml/cygwin/2012-11/threads.html#00144 */
+ listen_pipe =
CreateNamedPipeW (_pipe_name,
PIPE_ACCESS_DUPLEX | FILE_FLAG_FIRST_PIPE_INSTANCE,
PIPE_TYPE_BYTE | PIPE_WAIT, PIPE_UNLIMITED_INSTANCES,
0, 0, 1000, &sec_all_nih);
if (listen_pipe != INVALID_HANDLE_VALUE)
{
- HANDLE connect_pipe =
- CreateFileW (_pipe_name, GENERIC_READ | GENERIC_WRITE, 0, &sec_all_nih,
- OPEN_EXISTING, 0, NULL);
+ connect_pipe = CreateFileW (_pipe_name, GENERIC_READ | GENERIC_WRITE, 0,
+ &sec_all_nih, OPEN_EXISTING, 0, NULL);
if (connect_pipe == INVALID_HANDLE_VALUE)
{
CloseHandle (listen_pipe);
@@ -137,7 +141,7 @@ transport_layer_pipes::accept (bool *const recoverable)
if (accept_pipe == INVALID_HANDLE_VALUE)
{
- debug_printf ("error creating pipe (%lu).", GetLastError ());
+ debug_printf ("error creating pipe (%u).", GetLastError ());
*recoverable = true; // FIXME: case analysis?
return NULL;
}
@@ -145,7 +149,7 @@ transport_layer_pipes::accept (bool *const recoverable)
if (!ConnectNamedPipe (accept_pipe, NULL)
&& GetLastError () != ERROR_PIPE_CONNECTED)
{
- debug_printf ("error connecting to pipe (%lu)", GetLastError ());
+ debug_printf ("error connecting to pipe (%u)", GetLastError ());
(void) CloseHandle (accept_pipe);
*recoverable = true; // FIXME: case analysis?
return NULL;
@@ -199,7 +203,7 @@ transport_layer_pipes::read (void *const buf, const size_t len)
DWORD count;
if (!ReadFile (_hPipe, buf, len, &count, NULL))
{
- debug_printf ("error reading from pipe (%lu)", GetLastError ());
+ debug_printf ("error reading from pipe (%u)", GetLastError ());
SET_ERRNO (EINVAL); // FIXME?
return -1;
}
@@ -219,7 +223,7 @@ transport_layer_pipes::write (void *const buf, const size_t len)
DWORD count;
if (!WriteFile (_hPipe, buf, len, &count, NULL))
{
- debug_printf ("error writing to pipe, error = %lu", GetLastError ());
+ debug_printf ("error writing to pipe, error = %u", GetLastError ());
SET_ERRNO (EINVAL); // FIXME?
return -1;
}
@@ -273,7 +277,7 @@ transport_layer_pipes::connect ()
if (!assume_cygserver && GetLastError () != ERROR_PIPE_BUSY)
{
- debug_printf ("Error opening the pipe (%lu)", GetLastError ());
+ debug_printf ("Error opening the pipe (%u)", GetLastError ());
return -1;
}
@@ -294,7 +298,7 @@ transport_layer_pipes::connect ()
assert (retries == MAX_WAIT_NAMED_PIPE_RETRY);
- system_printf ("lost connection to cygserver, error = %lu",
+ system_printf ("lost connection to cygserver, error = %u",
GetLastError ());
assume_cygserver = false;
@@ -313,7 +317,7 @@ transport_layer_pipes::impersonate_client ()
if (_hPipe && !ImpersonateNamedPipeClient (_hPipe))
{
- debug_printf ("Failed to Impersonate client, (%lu)", GetLastError ());
+ debug_printf ("Failed to Impersonate client, (%u)", GetLastError ());
return false;
}
@@ -327,7 +331,7 @@ transport_layer_pipes::revert_to_self ()
if (!RevertToSelf ())
{
- debug_printf ("Failed to RevertToSelf, (%lu)", GetLastError ());
+ debug_printf ("Failed to RevertToSelf, (%u)", GetLastError ());
return false;
}
return true;
diff --git a/winsup/cygserver/transport_pipes.h b/winsup/cygserver/transport_pipes.h
index 136812106..e101623d2 100644
--- a/winsup/cygserver/transport_pipes.h
+++ b/winsup/cygserver/transport_pipes.h
@@ -1,7 +1,5 @@
/* transport_pipes.h
- Copyright 2001, 2002, 2003 Red Hat Inc.
-
Written by Robert Collins <rbtcollins@hotmail.com>
This file is part of Cygwin.
diff --git a/winsup/cygserver/woutsup.h b/winsup/cygserver/woutsup.h
index 5598c11c2..fbbd4ebc2 100644
--- a/winsup/cygserver/woutsup.h
+++ b/winsup/cygserver/woutsup.h
@@ -1,7 +1,5 @@
/* woutsup.h: for Cygwin code compiled outside the DLL (i.e. cygserver).
- Copyright 2002, 2003, 2007 Red Hat, Inc.
-
This file is part of Cygwin.
This software is a copyrighted work licensed under the terms of the
diff --git a/winsup/cygwin/DevNotes b/winsup/cygwin/DevNotes
index 3016075ec..5d31ed72e 100644
--- a/winsup/cygwin/DevNotes
+++ b/winsup/cygwin/DevNotes
@@ -1,3 +1,28 @@
+2014-04-26 cgf-000026
+
+Forgot to clear to the end of screen when restoring a screen buffer.
+That worked, for some reason, with Take Command but not with normal
+consoles. I don't remember why I didn't resize the screen like a Linux
+X terminal emulator but that might have made things work a little
+better. Right now, there is a scroll bar for apps like less or vi and
+that doesn't feel right.
+
+2014-03-29 cgf-000025
+
+Reorganized _cygtls::signal_debugger to avoid sending anything to the
+debugger if we've seen an exception. I think it used to work that way
+and I changed it without noting why. It sure seems like, if we don't do
+this, gdb will see two signals and, it really does, when there has been
+a Windows-recognized exception.
+
+2014-02-15 cgf-000024
+
+Wow. It's hard getting the screen handling stuff working correctly when
+there is a screen buffer larger than screen size and vice versa. These
+changes attempt to use SetConsoleWindowInfo whenever possible so that
+the contents of the screen buffer are never wiped out. They also fix
+some previously misbehaving "scroll the screen" commands.
+
2013-06-07 cgf-000023
Given the fact that the signal thread never exits there is no need
diff --git a/winsup/cygwin/Makefile.in b/winsup/cygwin/Makefile.in
index b47330379..ec6203d50 100644
--- a/winsup/cygwin/Makefile.in
+++ b/winsup/cygwin/Makefile.in
@@ -1,6 +1,4 @@
# Makefile.in for Cygwin.
-# Copyright 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
-# 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 Red Hat, Inc.
#
# This file is part of Cygwin.
#
@@ -29,7 +27,7 @@ export CCWRAP_HEADERS:=. ${srcdir}
export CCWRAP_SYSTEM_HEADERS:=@cygwin_headers@ @newlib_headers@
export CCWRAP_DIRAFTER_HEADERS:=@windows_headers@
-VPATH+=$(srcdir)/regex $(srcdir)/lib $(srcdir)/libc
+VPATH+=$(srcdir)/regex $(srcdir)/lib $(srcdir)/libc $(srcdir)/math
target_cpu:=@target_cpu@
target_alias:=@target_alias@
@@ -149,35 +147,261 @@ EXTRA_OFILES:=
MALLOC_OFILES:=malloc.o
-DLL_IMPORTS:=${shell $(CC) -print-file-name=w32api/libkernel32.a} ${shell $(CC) -print-file-name=w32api/libntdll.a}
+DLL_IMPORTS:=${foreach i,kernel32 user32 ntdll,\
+ ${shell $(CC) -print-file-name=w32api/lib${i}.a}}
MT_SAFE_OBJECTS:=
#
-DLL_OFILES:=advapi32.o arc4random.o assert.o autoload.o base64.o bsdlib.o ctype.o \
- cxx.o cygheap.o cygthread.o cygtls.o cygwait.o cygxdr.o dcrt0.o debug.o \
- devices.o dir.o dlfcn.o dll_init.o dtable.o environ.o errno.o exceptions.o \
- exec.o external.o fcntl.o fenv.o fhandler.o fhandler_clipboard.o \
- fhandler_console.o fhandler_dev.o fhandler_disk_file.o fhandler_dsp.o \
- fhandler_fifo.o fhandler_floppy.o fhandler_mailslot.o \
- fhandler_netdrive.o fhandler_nodevice.o fhandler_proc.o \
- fhandler_process.o fhandler_procnet.o fhandler_procsys.o \
- fhandler_procsysvipc.o fhandler_random.o fhandler_raw.o \
- fhandler_registry.o fhandler_serial.o fhandler_socket.o fhandler_tape.o \
- fhandler_termios.o fhandler_tty.o fhandler_virtual.o fhandler_windows.o \
- fhandler_zero.o flock.o fnmatch.o fork.o fts.o ftw.o getopt.o glob.o \
- glob_pattern_p.o globals.o grp.o heap.o hookapi.o inet_addr.o \
- inet_network.o init.o ioctl.o ipc.o kernel32.o libstdcxx_wrapper.o \
- localtime.o lsearch.o malloc_wrapper.o minires-os-if.o minires.o \
- miscfuncs.o mktemp.o mmap.o msg.o mount.o net.o netdb.o nfs.o nftw.o \
- nlsfuncs.o ntea.o passwd.o path.o pinfo.o pipe.o poll.o posix_ipc.o \
- pseudo-reloc.o pthread.o random.o regcomp.o regerror.o regexec.o regfree.o \
- registry.o resource.o rexec.o rcmd.o scandir.o sched.o sec_acl.o \
- sec_auth.o sec_helper.o security.o select.o sem.o setlsapwd.o shared.o \
- shm.o sigfe.o signal.o sigproc.o smallprint.o spawn.o strace.o strfmon.o \
- strfuncs.o strptime.o strsep.o strsig.o sync.o syscalls.o sysconf.o \
- syslog.o termios.o thread.o timer.o times.o tls_pbuf.o tty.o uinfo.o \
- uname.o wait.o wincap.o window.o winf.o wow64.o xsique.o \
- $(EXTRA_OFILES) $(MALLOC_OFILES) $(MT_SAFE_OBJECTS)
+MATH_OFILES:= \
+ acoshl.o \
+ acosl.o \
+ asinhl.o \
+ asinl.o \
+ atan2l.o \
+ atanhl.o \
+ atanl.o \
+ cabsl.o \
+ cacosl.o \
+ cargl.o \
+ casinl.o \
+ catanl.o \
+ cbrtl.o \
+ ccosl.o \
+ ceill.o \
+ cephes_emath.o \
+ cexpl.o \
+ cimagl.o \
+ clog10l.o \
+ clogl.o \
+ conjl.o \
+ copysignl.o \
+ coshl.o \
+ cosl.o \
+ cosl_internal.o \
+ cossin.o \
+ cpowl.o \
+ cprojl.o \
+ creall.o \
+ csinl.o \
+ csqrtl.o \
+ ctanl.o \
+ erfl.o \
+ exp10l.o \
+ exp2l.o \
+ expl.o \
+ expm1l.o \
+ fabsl.o \
+ fdiml.o \
+ finite.o \
+ floorl.o \
+ fmal.o \
+ fmaxl.o \
+ fminl.o \
+ fmodl.o \
+ frexpl.o \
+ ilogbl.o \
+ internal_logl.o \
+ isinf.o \
+ isnan.o \
+ ldexpl.o \
+ lgammal.o \
+ llrint.o \
+ llrintf.o \
+ llrintl.o \
+ llroundl.o \
+ log10l.o \
+ log1pl.o \
+ log2l.o \
+ logbl.o \
+ logl.o \
+ lrint.o \
+ lrintf.o \
+ lrintl.o \
+ lroundl.o \
+ modfl.o \
+ nanl.o \
+ nearbyint.o \
+ nearbyintf.o \
+ nearbyintl.o \
+ nextafterl.o \
+ nexttoward.o \
+ nexttowardf.o \
+ pow10l.o \
+ powil.o \
+ powl.o \
+ remainder.o \
+ remainderf.o \
+ remainderl.o \
+ remquol.o \
+ rint.o \
+ rintf.o \
+ rintl.o \
+ roundl.o \
+ scalbl.o \
+ scalbnl.o \
+ sinhl.o \
+ sinl.o \
+ sinl_internal.o \
+ sqrtl.o \
+ tanhl.o \
+ tanl.o \
+ tgammal.o \
+ truncl.o
+
+DLL_OFILES:= \
+ advapi32.o \
+ arc4random_stir.o \
+ assert.o \
+ autoload.o \
+ base64.o \
+ bsdlib.o \
+ ctype.o \
+ cxx.o \
+ cygheap.o \
+ cygthread.o \
+ cygtls.o \
+ cygwait.o \
+ cygxdr.o \
+ dcrt0.o \
+ debug.o \
+ devices.o \
+ dir.o \
+ dlfcn.o \
+ dll_init.o \
+ dtable.o \
+ environ.o \
+ errno.o \
+ exceptions.o \
+ exec.o \
+ external.o \
+ fcntl.o \
+ fenv.o \
+ fhandler.o \
+ fhandler_clipboard.o \
+ fhandler_console.o \
+ fhandler_dev.o \
+ fhandler_disk_file.o \
+ fhandler_dsp.o \
+ fhandler_fifo.o \
+ fhandler_floppy.o \
+ fhandler_mailslot.o \
+ fhandler_netdrive.o \
+ fhandler_nodevice.o \
+ fhandler_proc.o \
+ fhandler_process.o \
+ fhandler_procnet.o \
+ fhandler_procsys.o \
+ fhandler_procsysvipc.o \
+ fhandler_random.o \
+ fhandler_raw.o \
+ fhandler_registry.o \
+ fhandler_serial.o \
+ fhandler_socket.o \
+ fhandler_tape.o \
+ fhandler_termios.o \
+ fhandler_tty.o \
+ fhandler_virtual.o \
+ fhandler_windows.o \
+ fhandler_zero.o \
+ flock.o \
+ fnmatch.o \
+ fork.o \
+ fts.o \
+ ftw.o \
+ getopt.o \
+ glob.o \
+ glob_pattern_p.o \
+ globals.o \
+ grp.o \
+ heap.o \
+ hookapi.o \
+ inet_addr.o \
+ inet_network.o \
+ init.o \
+ ioctl.o \
+ ipc.o \
+ kernel32.o \
+ ldap.o \
+ libstdcxx_wrapper.o \
+ localtime.o \
+ lsearch.o \
+ malloc_wrapper.o \
+ minires-os-if.o \
+ minires.o \
+ miscfuncs.o \
+ mktemp.o \
+ mmap.o \
+ msg.o \
+ mount.o \
+ net.o \
+ netdb.o \
+ nfs.o \
+ nftw.o \
+ nlsfuncs.o \
+ ntea.o \
+ passwd.o \
+ path.o \
+ pinfo.o \
+ pipe.o \
+ poll.o \
+ posix_ipc.o \
+ pseudo-reloc.o \
+ pthread.o \
+ quotactl.o \
+ random.o \
+ regcomp.o \
+ regerror.o \
+ regexec.o \
+ regfree.o \
+ registry.o \
+ resource.o \
+ rexec.o \
+ rcmd.o \
+ scandir.o \
+ sched.o \
+ sec_acl.o \
+ sec_auth.o \
+ sec_helper.o \
+ sec_posixacl.o \
+ security.o \
+ select.o \
+ sem.o \
+ setlsapwd.o \
+ shared.o \
+ shm.o \
+ sigfe.o \
+ signal.o \
+ sigproc.o \
+ smallprint.o \
+ spawn.o \
+ strace.o \
+ strfmon.o \
+ strfuncs.o \
+ strptime.o \
+ strsep.o \
+ strsig.o \
+ sync.o \
+ syscalls.o \
+ sysconf.o \
+ syslog.o \
+ termios.o \
+ thread.o \
+ timer.o \
+ times.o \
+ tls_pbuf.o \
+ tty.o \
+ uinfo.o \
+ uname.o \
+ wait.o \
+ wincap.o \
+ window.o \
+ winf.o \
+ wow64.o \
+ xsique.o \
+ $(EXTRA_OFILES) \
+ $(MALLOC_OFILES) \
+ $(MATH_OFILES) \
+ $(MT_SAFE_OBJECTS)
EXCLUDE_STATIC_OFILES:=$(addprefix --exclude=,\
cygtls.o \
@@ -188,6 +412,8 @@ EXCLUDE_STATIC_OFILES:=$(addprefix --exclude=,\
spawn.o \
)
+VERSION_OFILES:=version.o winver.o
+
ifdef PREPROCESS
override DLL_OFILES:=$(patsubst %.o,%_E,${DLL_OFILES})
override EXCLUDE_STATIC_OFILES:=$(patsubst %.o,%_E,${EXCLUDE_STATIC_OFILES})
@@ -202,10 +428,63 @@ endif
GMON_OFILES:=gmon.o mcount.o profil.o mcountFunc.o
+NEW_FUNCTIONS:=$(addprefix --replace=,\
+ atexit= \
+ timezone= \
+ __xdrrec_getrec= \
+ __xdrrec_setnonblock= \
+ xdr_array= \
+ xdr_bool= \
+ xdr_bytes= \
+ xdr_char= \
+ xdr_double= \
+ xdr_enum= \
+ xdr_float= \
+ xdr_free= \
+ xdr_hyper= \
+ xdr_int= \
+ xdr_int16_t= \
+ xdr_int32_t= \
+ xdr_int64_t= \
+ xdr_int8_t= \
+ xdr_long= \
+ xdr_longlong_t= \
+ xdr_netobj= \
+ xdr_opaque= \
+ xdr_pointer= \
+ xdr_reference= \
+ xdr_short= \
+ xdr_sizeof= \
+ xdr_string= \
+ xdr_u_char= \
+ xdr_u_hyper= \
+ xdr_u_int= \
+ xdr_u_int16_t= \
+ xdr_u_int32_t= \
+ xdr_u_int64_t= \
+ xdr_u_int8_t= \
+ xdr_u_long= \
+ xdr_u_longlong_t= \
+ xdr_u_short= \
+ xdr_uint16_t= \
+ xdr_uint32_t= \
+ xdr_uint64_t= \
+ xdr_uint8_t= \
+ xdr_union= \
+ xdr_vector= \
+ xdr_void= \
+ xdr_wrapstring= \
+ xdrmem_create= \
+ xdrrec_create= \
+ xdrrec_endofrecord= \
+ xdrrec_eof= \
+ xdrrec_skiprecord= \
+ xdrstdio_create= \
+)
ifeq ($(target_cpu),x86_64)
-NEW_FUNCTIONS:=
+NEW_FUNCTIONS+=
else
-NEW_FUNCTIONS:=$(addprefix --replace=,\
+NEW_FUNCTIONS+=$(addprefix --replace=,\
acl=_acl32 \
aclcheck=_aclcheck32 \
aclfrommode=_aclfrommode32 \
@@ -253,7 +532,6 @@ NEW_FUNCTIONS:=$(addprefix --replace=,\
setreuid=_setreuid32 \
setuid=_setuid32 \
stat=_stat64 \
- timezone= \
tmpfile=_tmpfile64 \
truncate=_truncate64 \
)
@@ -262,65 +540,20 @@ endif
API_VER:=$(srcdir)/include/cygwin/version.h
LIB_NAME:=libcygwin.a
-SUBLIBS:=libpthread.a libutil.a ${CURDIR}/libm.a ${CURDIR}/libc.a libdl.a libresolv.a librt.a
+SUBLIBS:=libpthread.a libutil.a ${CURDIR}/libm.a ${CURDIR}/libc.a libdl.a libresolv.a librt.a libacl.a
EXTRALIBS:=libautomode.a libbinmode.a libtextmode.a libtextreadmode.a
INSTOBJS:=automode.o binmode.o textmode.o textreadmode.o
TARGET_LIBS:=$(LIB_NAME) $(CYGWIN_START) $(GMON_START) $(LIBGMON_A) $(SUBLIBS) $(INSTOBJS) $(EXTRALIBS)
ifneq "${filter -O%,$(CFLAGS)}" ""
-cygheap_CFLAGS:=-fomit-frame-pointer
-cygthread_CFLAGS:=-fomit-frame-pointer
-cygtls_CFLAGS:=-fomit-frame-pointer
-cygwait_CFLAGS=-fomit-frame-pointer
-delqueue_CFLAGS:=-fomit-frame-pointer
-devices_CFLAGS:=-fomit-frame-pointer
-dir_CFLAGS:=-fomit-frame-pointer
-dlfcn_CFLAGS:=-fomit-frame-pointer
-dll_init_CFLAGS:=-fomit-frame-pointer
-dtable_CFLAGS:=-fomit-frame-pointer -fcheck-new
-fcntl_CFLAGS:=-fomit-frame-pointer
-fenv_CFLAGS:=-fomit-frame-pointer
-fhandler_CFLAGS:=-fomit-frame-pointer
-fhandler_clipboard_CFLAGS:=-fomit-frame-pointer
-fhandler_console_CFLAGS:=-fomit-frame-pointer
-fhandler_disk_file_CFLAGS:=-fomit-frame-pointer
-fhandler_dsp_CFLAGS:=-fomit-frame-pointer
-fhandler_floppy_CFLAGS:=-fomit-frame-pointer
-fhandler_netdrive_CFLAGS:=-fomit-frame-pointer
-fhandler_proc_CFLAGS:=-fomit-frame-pointer
-fhandler_process_CFLAGS:=-fomit-frame-pointer
-fhandler_random_CFLAGS:=-fomit-frame-pointer
-fhandler_raw_CFLAGS:=-fomit-frame-pointer
-fhandler_registry_CFLAGS:=-fomit-frame-pointer
-fhandler_serial_CFLAGS:=-fomit-frame-pointer
-fhandler_socket_CFLAGS:=-fomit-frame-pointer
-fhandler_syslog_CFLAGS:=-fomit-frame-pointer
-fhandler_tape_CFLAGS:=-fomit-frame-pointer
-fhandler_termios_CFLAGS:=-fomit-frame-pointer
-fhandler_tty_CFLAGS:=-fomit-frame-pointer
-fhandler_virtual_CFLAGS:=-fomit-frame-pointer
-fhandler_windows_CFLAGS:=-fomit-frame-pointer
-fhandler_zero_CFLAGS:=-fomit-frame-pointer
-flock_CFLAGS:=-fomit-frame-pointer
-grp_CFLAGS:=-fomit-frame-pointer
-libstdcxx_wrapper_CFLAGS:=-fomit-frame-pointer
+dtable_CFLAGS:=-fcheck-new
localtime_CFLAGS:=-fwrapv
-malloc_CFLAGS:=-fomit-frame-pointer -O3
-malloc_wrapper_CFLAGS:=-fomit-frame-pointer
-miscfuncs_CFLAGS:=-fomit-frame-pointer
-net_CFLAGS:=-fomit-frame-pointer
-passwd_CFLAGS:=-fomit-frame-pointer
-path_CFLAGS=-fomit-frame-pointer
-regcomp_CFLAGS=-fomit-frame-pointer
-regerror_CFLAGS=-fomit-frame-pointer
-regexec_CFLAGS=-fomit-frame-pointer
-regfree_CFLAGS=-fomit-frame-pointer
-shared_CFLAGS:=-fomit-frame-pointer
-sync_CFLAGS:=-fomit-frame-pointer -O3
-smallprint_CFLAGS:=-fomit-frame-pointer
-syscalls_CFLAGS:=-fomit-frame-pointer
-sysconf_CFLAGS:=-fomit-frame-pointer
-uinfo_CFLAGS:=-fomit-frame-pointer
+malloc_CFLAGS:=-O3
+sync_CFLAGS:=-O3
+ifeq ($(target_cpu),i686)
+# on x86, exceptions.cc must be compiled with a frame-pointer as it uses RtlCaptureContext()
+exceptions_CFLAGS:=-fno-omit-frame-pointer
+endif
endif
fhandler_proc_CFLAGS+=-DUSERNAME="\"$(USER)\"" -DHOSTNAME="\"$(HOSTNAME)\""
@@ -330,8 +563,9 @@ _cygwin_crt0_common_STDINCFLAGS:=yes
libstdcxx_wrapper_STDINCFLAGS:=yes
cxx_STDINCFLAGS:=yes
-.PHONY: all force dll_ofiles install all_target install_target all_host install_host \
- install install-libs install-headers
+.PHONY: all force dll_ofiles install all_target install_target all_host \
+ install_host install install-libs install-headers \
+ clean distclean realclean maintainer-clean
all_host=@all_host@
install_host=@install_host@
@@ -344,7 +578,7 @@ all_host: $(TEST_LIB_NAME)
force:
-install: install-libs install-headers install-man install_target \
+install: install-libs install-headers install-man install-ldif install_target \
$(install_host) $(install_target)
uninstall: uninstall-libs uninstall-headers uninstall-man
@@ -369,19 +603,23 @@ install-headers:
install-man:
@$(MKDIRP) $(DESTDIR)$(mandir)/man2 $(DESTDIR)$(mandir)/man3 $(DESTDIR)$(mandir)/man5 $(DESTDIR)$(mandir)/man7
cd $(srcdir); \
- for i in `find . -type f -name '*.2'`; do \
+ for i in `find . -type f ! -path './release/*' -name '*.2'`; do \
$(INSTALL_DATA) $$i $(DESTDIR)$(mandir)/man2/`basename $$i` ; \
done; \
- for i in `find . -type f -name '*.3'`; do \
+ for i in `find . -type f ! -path './release/*' -name '*.3'`; do \
$(INSTALL_DATA) $$i $(DESTDIR)$(mandir)/man3/`basename $$i` ; \
done; \
- for i in `find . -type f -name '*.5'`; do \
+ for i in `find . -type f ! -path './release/*' -name '*.5'`; do \
$(INSTALL_DATA) $$i $(DESTDIR)$(mandir)/man5/`basename $$i` ; \
done; \
- for i in `find . -type f -name '*.7'`; do \
+ for i in `find . -type f ! -path './release/*' -name '*.7'`; do \
$(INSTALL_DATA) $$i $(DESTDIR)$(mandir)/man7/`basename $$i` ; \
done
+install-ldif:
+ @$(MKDIRP) $(DESTDIR)$(datarootdir)/cygwin
+ $(INSTALL_DATA) $(srcdir)/cygwin.ldif $(DESTDIR)$(datarootdir)/cygwin
+
install_target:
install_host:
@@ -415,26 +653,27 @@ uninstall-man:
rm -f $(DESTDIR)$(mandir)/man7/`basename $$i` ; \
done
-clean:
- -rm -f *.o *.dll *.dbg *.a *.exp junk *.base version.cc winver_stamp *.exe *.d *stamp* *_magic.h sigfe.s cygwin.def globals.h $(srcdir)/$(TLSOFFSETS_H) $(srcdir)/devices.cc
+clean distclean realclean:
+ -rm -f *.o *.dll *.dbg *.a *.exp junk *.base version.cc *.exe *.d *stamp* *_magic.h sigfe.s cygwin.def globals.h
-@$(MAKE) -C ${cygserver_blddir} libclean
-maintainer-clean realclean: clean
+maintainer-clean: clean
@echo "This command is intended for maintainers to use;"
@echo "it deletes files that may require special tools to rebuild."
-rm -fr configure
+ -rm -f $(srcdir)/$(TLSOFFSETS_H) $(srcdir)/devices.cc
# Rule to build LDSCRIPT
$(LDSCRIPT): $(LDSCRIPT).in
$(CC) -E - -P < $^ -o $@
# Rule to build cygwin.dll
-$(TEST_DLL_NAME): $(LDSCRIPT) dllfixdbg $(DLL_OFILES) $(LIBSERVER) $(LIBC) $(LIBM) $(API_VER) Makefile winver_stamp
+$(TEST_DLL_NAME): $(LDSCRIPT) dllfixdbg $(DLL_OFILES) $(LIBSERVER) $(LIBC) $(LIBM) $(API_VER) Makefile $(VERSION_OFILES)
$(CXX) $(CXXFLAGS) \
-mno-use-libstdc-wrappers -L${WINDOWS_LIBDIR} \
-Wl,--gc-sections $(nostdlib) -Wl,-T$(firstword $^) -static \
-Wl,--heap=0 -Wl,--out-implib,cygdll.a -shared -o $@ \
- -e $(DLL_ENTRY) $(DEF_FILE) $(DLL_OFILES) version.o winver.o \
+ -e $(DLL_ENTRY) $(DEF_FILE) $(DLL_OFILES) $(VERSION_OFILES) \
$(MALLOC_OBJ) $(LIBSERVER) $(LIBM) $(LIBC) \
-lgcc $(DLL_IMPORTS) -Wl,-Map,cygwin.map
@$(word 2,$^) $(OBJDUMP) $(OBJCOPY) $@ ${patsubst %0.dll,%1.dbg,$@}
@@ -464,13 +703,10 @@ dll_ofiles: $(DLL_OFILES)
$(LIBGMON_A): $(GMON_OFILES) $(GMON_START)
$(AR) rcv $(LIBGMON_A) $(GMON_OFILES)
-version.cc winver.o: winver_stamp
- @ :
-
globals.h: mkglobals_h globals.cc
$^ > $@
-${DLL_OFILES} ${LIBCOS}: globals.h
+${DLL_OFILES} ${LIBCOS}: globals.h $(srcdir)/$(TLSOFFSETS_H)
shared_info_magic.h: cygmagic shared_info.h
/bin/sh $(word 1,$^) $@ "${COMPILE.cc} -E -x c++" $(word 2,$^) SHARED_MAGIC 'class shared_info' USER_MAGIC 'class user_info'
@@ -488,7 +724,7 @@ $(srcdir)/devices.cc: gendevices devices.in devices.h
${CURDIR}/libc.a: ${LIB_NAME} ${CURDIR}/libm.a libpthread.a libutil.a
${speclib} -v ${@F}
-${CURDIR}/libm.a: ${LIB_NAME} $(LIBM)
+${CURDIR}/libm.a: ${LIB_NAME} $(LIBM) $(MATH_OFILES)
${speclib} ${@F}
libpthread.a: ${LIB_NAME} pthread.o thread.o
@@ -506,14 +742,15 @@ libresolv.a: ${LIB_NAME} minires.o
librt.a: ${LIB_NAME} posix_ipc.o
${speclib} ${@F}
+libacl.a: ${LIB_NAME} sec_posixacl.o
+ ${speclib} ${@F}
+
${EXTRALIBS}: lib%.a: %.o
$(AR) cru $@ $?
-winver_stamp: mkvers.sh include/cygwin/version.h winver.rc $(DLL_OFILES)
- @echo "Making version.o and winver.o";\
- /bin/sh ${word 1,$^} ${word 2,$^} ${word 3,$^} $(WINDRES) ${CFLAGS} $(addprefix -I,${CCWRAP_SYSTEM_HEADERS} ${CCWRAP_DIRAFTER_HEADERS}) S&& \
- $(COMPILE.cc) -c -o version.o version.cc && \
- touch $@
+version.cc winver.o: mkvers.sh include/cygwin/version.h winver.rc $(DLL_OFILES)
+ @echo "Making version.cc and winver.o";\
+ /bin/sh ${word 1,$^} ${word 2,$^} ${word 3,$^} $(WINDRES) ${CFLAGS} $(addprefix -I,${CCWRAP_SYSTEM_HEADERS} ${CCWRAP_DIRAFTER_HEADERS})
Makefile: ${srcdir}/Makefile.in
/bin/sh ./config.status
@@ -522,15 +759,15 @@ $(DEF_FILE): gendef $(srcdir)/$(TLSOFFSETS_H) $(DIN_FILE)
$(word 1,$^) --cpu=${target_cpu} --output-def=$@ --tlsoffsets=$(word 2,$^) $(wordlist 3,99,$^)
$(srcdir)/$(TLSOFFSETS_H): gentls_offsets cygtls.h
- $^ $@ $(target_cpu) $(COMPILE.cc) -c
+ $^ $@ $(target_cpu) $(COMPILE.cc) -c || rm $@
sigfe.s: $(DEF_FILE)
@[ -s $@ ] || \
{ rm -f $(DEF_FILE); $(MAKE) -s -j1 $(DEF_FILE); }; \
[ -s $@ ] && touch $@
-sigfe.o: sigfe.s
- $(CC) -c -o $@ $<
+sigfe.o: sigfe.s $(srcdir)/$(TLSOFFSETS_H)
+ $(CC) ${CFLAGS} -c -o $@ $<
ctags: CTAGS
tags: CTAGS
diff --git a/winsup/cygwin/acconfig.h b/winsup/cygwin/acconfig.h
deleted file mode 100644
index 0c1dc6610..000000000
--- a/winsup/cygwin/acconfig.h
+++ /dev/null
@@ -1,11 +0,0 @@
-/* Define if DEBUGGING support is requested. */
-#undef DEBUGGING
-
-/* Define if GCC supports builtin memset. */
-#undef HAVE_BUILTIN_MEMSET
-
-/* Define if MALLOC_DEBUGGING support is requested. */
-#undef MALLOC_DEBUG
-
-/* Define if using new vfork functionality. */
-#undef NEWVFORK
diff --git a/winsup/cygwin/advapi32.cc b/winsup/cygwin/advapi32.cc
index 07d26e710..56c96c915 100644
--- a/winsup/cygwin/advapi32.cc
+++ b/winsup/cygwin/advapi32.cc
@@ -1,7 +1,5 @@
/* advapi32.cc: Win32 replacement functions.
- Copyright 2011, 2012, 2013 Red Hat, Inc.
-
This file is part of Cygwin.
This software is a copyrighted work licensed under the terms of the
diff --git a/winsup/cygwin/analyze_sigfe b/winsup/cygwin/analyze_sigfe
index 0b9b7219f..8704eea48 100755
--- a/winsup/cygwin/analyze_sigfe
+++ b/winsup/cygwin/analyze_sigfe
@@ -1,5 +1,4 @@
#!/usr/bin/perl -s
-# Copyright 2006 Red Hat, Inc.
#
# This file is part of Cygwin.
#
diff --git a/winsup/cygwin/assert.cc b/winsup/cygwin/assert.cc
index ef54d32ba..d78e6e7d2 100644
--- a/winsup/cygwin/assert.cc
+++ b/winsup/cygwin/assert.cc
@@ -1,7 +1,5 @@
/* assert.cc: Handle the assert macro for WIN32.
- Copyright 1997, 1998, 2000, 2001, 2002, 2007, 2008, 2009, 2011 Red Hat, Inc.
-
This file is part of Cygwin.
This software is a copyrighted work licensed under the terms of the
@@ -9,8 +7,6 @@ Cygwin license. Please consult the file "CYGWIN_LICENSE" for
details. */
#include "winsup.h"
-#include <wingdi.h>
-#include <winuser.h>
#include <assert.h>
#include <stdlib.h>
diff --git a/winsup/cygwin/autoload.cc b/winsup/cygwin/autoload.cc
index ed8080258..5c8dcd8e3 100644
--- a/winsup/cygwin/autoload.cc
+++ b/winsup/cygwin/autoload.cc
@@ -1,8 +1,5 @@
/* autoload.cc: all dynamic load stuff.
- Copyright 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
- 2011, 2012, 2013 Red Hat, Inc.
-
This file is part of Cygwin.
This software is a copyrighted work licensed under the terms of the
@@ -254,11 +251,13 @@ noload: \n\
addl %eax,%esp # Pop off bytes \n\
andl $0xffff0000,%eax# upper word \n\
subl %eax,%esp # adjust for possible return value \n\
- pushl %eax # Save for later \n\
+ pushl %eax # Save return value for later \n\
+ pushl %edx # Save return address for later \n\
movl $127,%eax # ERROR_PROC_NOT_FOUND \n\
pushl %eax # First argument \n\
call _SetLastError@4 # Set it \n\
- popl %eax # Get back argument \n\
+ popl %edx # Get back return address \n\
+ popl %eax # Get back return value \n\
sarl $16,%eax # return value in high order word \n\
jmp *%edx # Return \n\
1: \n\
@@ -330,21 +329,36 @@ union retchain
two_addr_t ll;
};
+/* This function handles the problem described here:
+
+ http://www.microsoft.com/technet/security/advisory/2269637.mspx
+ https://msdn.microsoft.com/library/ff919712
-/* This function is a workaround for the problem reported here:
+ It also contains a workaround for the problem reported here:
http://cygwin.com/ml/cygwin/2011-02/msg00552.html
and discussed here:
http://cygwin.com/ml/cygwin-developers/2011-02/threads.html#00007
To wit: winmm.dll calls FreeLibrary in its DllMain and that can result
- in LoadLibraryExW returning an ERROR_INVALID_ADDRESS. */
+ in LoadLibraryExW returning an ERROR_INVALID_ADDRESS. */
static __inline bool
-dll_load (HANDLE& handle, WCHAR *name)
+dll_load (HANDLE& handle, PWCHAR name)
{
- HANDLE h = LoadLibraryW (name);
+ HANDLE h = NULL;
+ WCHAR dll_path[MAX_PATH];
+
+ /* If that failed, try loading with full path, which sometimes
+ fails for no good reason. */
+ wcpcpy (wcpcpy (dll_path, windows_system_directory), name);
+ h = LoadLibraryW (dll_path);
+ /* If that failed according to the second problem outlined in the
+ comment preceeding this function. */
if (!h && handle && wincap.use_dont_resolve_hack ()
&& GetLastError () == ERROR_INVALID_ADDRESS)
- h = LoadLibraryExW (name, NULL, DONT_RESOLVE_DLL_REFERENCES);
+ h = LoadLibraryExW (dll_path, NULL, DONT_RESOLVE_DLL_REFERENCES);
+ /* Last resort: Try loading just by name. */
+ if (!h)
+ h = LoadLibraryW (name);
if (!h)
return false;
handle = h;
@@ -418,18 +432,15 @@ std_dll_init ()
{
fenv_t fpuenv;
fegetenv (&fpuenv);
- WCHAR dll_path[MAX_PATH];
DWORD err = ERROR_SUCCESS;
int i;
- /* http://www.microsoft.com/technet/security/advisory/2269637.mspx */
- wcpcpy (wcpcpy (dll_path, windows_system_directory), dll->name);
/* MSDN seems to imply that LoadLibrary can fail mysteriously, so,
since there have been reports of this in the mailing list, retry
several times before giving up. */
for (i = 1; i <= RETRY_COUNT; i++)
{
/* If loading the library succeeds, just leave the loop. */
- if (!dll_load (dll->handle, dll_path))
+ if (dll_load (dll->handle, dll->name))
break;
/* Otherwise check error code returned by LoadLibrary. If the
error code is neither NOACCESS nor DLL_INIT_FAILED, break out
@@ -442,15 +453,10 @@ std_dll_init ()
}
if ((uintptr_t) dll->handle <= 1)
{
- /* If LoadLibrary with full path returns one of the weird errors
- reported on the Cygwin mailing list, retry with only the DLL
- name. Only do this when the above retry loop has been exhausted. */
- if (i > RETRY_COUNT && dll_load (dll->handle, dll->name))
- /* got it with the fallback */;
- else if ((func->decoration & 1))
+ if ((func->decoration & 1))
dll->handle = INVALID_HANDLE_VALUE;
else
- api_fatal ("unable to load %W, %E", dll_path);
+ api_fatal ("unable to load %W, %E", dll->name);
}
fesetenv (&fpuenv);
}
@@ -471,7 +477,6 @@ std_dll_init ()
}
/* Initialization function for winsock stuff. */
-WSADATA NO_COPY wsadata;
#ifdef __x86_64__
/* See above comment preceeding std_dll_init. */
@@ -484,6 +489,10 @@ __attribute__ ((used, noinline)) static two_addr_t
wsock_init ()
#endif
{
+ /* CV 2016-03-09: Moved wsadata into wsock_init to workaround a problem
+ with the NO_COPY definition of wsadata and here starting with gcc-5.3.0.
+ See the git log for a description. */
+ static WSADATA NO_COPY wsadata;
static LONG NO_COPY here = -1L;
#ifndef __x86_64__
struct func_info *func = (struct func_info *) __builtin_return_address (0);
@@ -505,7 +514,7 @@ wsock_init ()
GetProcAddress ((HMODULE) (dll->handle), "WSAStartup");
if (wsastartup)
{
- int res = wsastartup ((2<<8) | 2, &wsadata);
+ int res = wsastartup (MAKEWORD (2, 2), &wsadata);
debug_printf ("res %d", res);
debug_printf ("wVersion %d", wsadata.wVersion);
@@ -536,10 +545,8 @@ wsock_init ()
LoadDLLprime (ws2_32, _wsock_init, 0)
+LoadDLLfunc (CheckTokenMembership, 12, advapi32)
LoadDLLfunc (CreateProcessAsUserW, 44, advapi32)
-LoadDLLfunc (CryptAcquireContextW, 20, advapi32)
-LoadDLLfunc (CryptGenRandom, 12, advapi32)
-LoadDLLfunc (CryptReleaseContext, 8, advapi32)
LoadDLLfunc (DeregisterEventSource, 4, advapi32)
LoadDLLfunc (LogonUserW, 24, advapi32)
LoadDLLfunc (LookupAccountNameW, 28, advapi32)
@@ -547,6 +554,7 @@ LoadDLLfunc (LookupAccountSidW, 28, advapi32)
LoadDLLfunc (LsaClose, 4, advapi32)
LoadDLLfunc (LsaEnumerateAccountRights, 16, advapi32)
LoadDLLfunc (LsaFreeMemory, 4, advapi32)
+LoadDLLfunc (LsaLookupSids, 20, advapi32)
LoadDLLfunc (LsaOpenPolicy, 16, advapi32)
LoadDLLfunc (LsaQueryInformationPolicy, 12, advapi32)
LoadDLLfunc (LsaRetrievePrivateData, 12, advapi32)
@@ -563,9 +571,16 @@ LoadDLLfunc (RegQueryInfoKeyW, 48, advapi32)
LoadDLLfunc (RegQueryValueExW, 24, advapi32)
LoadDLLfunc (RegisterEventSourceW, 8, advapi32)
LoadDLLfunc (ReportEventW, 36, advapi32)
+LoadDLLfunc (SystemFunction036, 8, advapi32) /* Aka "RtlGenRandom" */
+
+LoadDLLfunc (AuthzAccessCheck, 36, authz)
+LoadDLLfunc (AuthzFreeContext, 4, authz)
+LoadDLLfunc (AuthzInitializeContextFromSid, 32, authz)
+LoadDLLfunc (AuthzInitializeContextFromToken, 32, authz)
+LoadDLLfunc (AuthzInitializeResourceManager, 24, authz)
LoadDLLfunc (DnsQuery_A, 24, dnsapi)
-LoadDLLfunc (DnsRecordListFree, 8, dnsapi)
+LoadDLLfunc (DnsFree, 8, dnsapi)
LoadDLLfunc (GetAdaptersAddresses, 20, iphlpapi)
LoadDLLfunc (GetIfEntry, 4, iphlpapi)
@@ -576,19 +591,57 @@ LoadDLLfunc (GetUdpTable, 12, iphlpapi)
LoadDLLfuncEx (CancelSynchronousIo, 4, kernel32, 1)
LoadDLLfunc (CreateSymbolicLinkW, 12, kernel32)
+LoadDLLfuncEx2 (DiscardVirtualMemory, 8, kernel32, 1, 127)
+LoadDLLfuncEx (GetLogicalProcessorInformationEx, 12, kernel32, 1)
LoadDLLfuncEx (GetNamedPipeClientProcessId, 8, kernel32, 1)
LoadDLLfunc (GetSystemTimePreciseAsFileTime, 4, kernel32)
+LoadDLLfuncEx (IdnToAscii, 20, kernel32, 1)
+LoadDLLfuncEx (IdnToUnicode, 20, kernel32, 1)
LoadDLLfunc (LocaleNameToLCID, 8, kernel32)
+LoadDLLfuncEx (PrefetchVirtualMemory, 16, kernel32, 1)
+LoadDLLfunc (SetThreadGroupAffinity, 12, kernel32)
+LoadDLLfunc (SetThreadStackGuarantee, 4, kernel32)
+
+/* ldap functions are cdecl! */
+#pragma push_macro ("mangle")
+#undef mangle
+#define mangle(name, n) #name
+LoadDLLfunc (ldap_bind_s, 0, wldap32)
+LoadDLLfunc (ldap_count_entries, 0, wldap32)
+LoadDLLfunc (ldap_count_valuesW, 0, wldap32)
+LoadDLLfunc (ldap_first_entry, 0, wldap32)
+LoadDLLfunc (ldap_get_next_page_s, 0, wldap32)
+LoadDLLfunc (ldap_get_valuesW, 0, wldap32)
+LoadDLLfunc (ldap_get_values_lenW, 0, wldap32)
+LoadDLLfunc (ldap_initW, 0, wldap32)
+LoadDLLfunc (ldap_msgfree, 0, wldap32)
+LoadDLLfunc (ldap_next_entry, 0, wldap32)
+LoadDLLfunc (ldap_search_abandon_page, 0, wldap32)
+LoadDLLfunc (ldap_search_init_pageW, 0, wldap32)
+LoadDLLfunc (ldap_search_sW, 0, wldap32)
+LoadDLLfunc (ldap_set_option, 0, wldap32)
+LoadDLLfunc (ldap_sslinitW, 0, wldap32)
+LoadDLLfunc (ldap_unbind, 0, wldap32)
+LoadDLLfunc (ldap_value_freeW, 0, wldap32)
+LoadDLLfunc (ldap_value_free_len, 0, wldap32)
+LoadDLLfunc (LdapGetLastError, 0, wldap32)
+LoadDLLfunc (LdapMapErrorToWin32, 0, wldap32)
+#pragma pop_macro ("mangle")
LoadDLLfunc (WNetCloseEnum, 4, mpr)
-LoadDLLfunc (WNetEnumResourceA, 16, mpr)
-LoadDLLfunc (WNetGetProviderNameA, 12, mpr)
-LoadDLLfunc (WNetGetResourceInformationA, 16, mpr)
-LoadDLLfunc (WNetOpenEnumA, 20, mpr)
+LoadDLLfunc (WNetEnumResourceW, 16, mpr)
+LoadDLLfunc (WNetGetProviderNameW, 12, mpr)
+LoadDLLfunc (WNetGetResourceInformationW, 16, mpr)
+LoadDLLfunc (WNetOpenEnumW, 20, mpr)
+LoadDLLfunc (DsEnumerateDomainTrustsW, 16, netapi32)
LoadDLLfunc (DsGetDcNameW, 24, netapi32)
LoadDLLfunc (NetApiBufferFree, 4, netapi32)
+LoadDLLfunc (NetGroupEnum, 28, netapi32)
+LoadDLLfunc (NetLocalGroupEnum, 28, netapi32)
+LoadDLLfunc (NetLocalGroupGetInfo, 16, netapi32)
LoadDLLfunc (NetUseGetInfo, 16, netapi32)
+LoadDLLfunc (NetUserEnum, 32, netapi32)
LoadDLLfunc (NetUserGetGroups, 28, netapi32)
LoadDLLfunc (NetUserGetInfo, 16, netapi32)
LoadDLLfunc (NetUserGetLocalGroups, 32, netapi32)
@@ -643,6 +696,11 @@ LoadDLLfunc (SetParent, 8, user32)
LoadDLLfunc (SetProcessWindowStation, 4, user32)
LoadDLLfunc (SetThreadDesktop, 4, user32)
+LoadDLLfuncEx (CreateEnvironmentBlock, 12, userenv, 1)
+LoadDLLfuncEx2 (CreateProfile, 16, userenv, 1, 1)
+LoadDLLfunc (DestroyEnvironmentBlock, 4, userenv)
+LoadDLLfunc (LoadUserProfileW, 8, userenv)
+
LoadDLLfuncEx3 (waveInAddBuffer, 12, winmm, 1, 0, 1)
LoadDLLfuncEx3 (waveInClose, 4, winmm, 1, 0, 1)
LoadDLLfuncEx3 (waveInGetNumDevs, 0, winmm, 1, 0, 1)
@@ -665,6 +723,9 @@ LoadDLLfunc (accept, 12, ws2_32)
LoadDLLfunc (bind, 12, ws2_32)
LoadDLLfunc (closesocket, 4, ws2_32)
LoadDLLfunc (connect, 12, ws2_32)
+LoadDLLfunc (FreeAddrInfoW, 4, ws2_32)
+LoadDLLfunc (GetAddrInfoW, 16, ws2_32)
+LoadDLLfunc (GetNameInfoW, 28, ws2_32)
LoadDLLfunc (gethostbyaddr, 12, ws2_32)
LoadDLLfunc (gethostbyname, 4, ws2_32)
LoadDLLfunc (gethostname, 8, ws2_32)
diff --git a/winsup/cygwin/automode.c b/winsup/cygwin/automode.c
index 6951bfd6b..ab92197c3 100644
--- a/winsup/cygwin/automode.c
+++ b/winsup/cygwin/automode.c
@@ -1,7 +1,5 @@
/* automode.c
- Copyright 2000, 2001, 2010, 2013 Red Hat, Inc.
-
This file is part of Cygwin.
This software is a copyrighted work licensed under the terms of the
diff --git a/winsup/cygwin/binmode.c b/winsup/cygwin/binmode.c
index d4673d17d..fedcd3918 100644
--- a/winsup/cygwin/binmode.c
+++ b/winsup/cygwin/binmode.c
@@ -1,7 +1,5 @@
/* binmode.c
- Copyright 2000, 2001, 2010, 2013 Red Hat, Inc.
-
This file is part of Cygwin.
This software is a copyrighted work licensed under the terms of the
@@ -18,6 +16,6 @@ cygwin_premain0 (int argc __attribute__ ((unused)),
char **argv __attribute__ ((unused)),
struct per_process *myself __attribute__ ((unused)))
{
- _fmode &= ~_O_TEXT;
- _fmode |= _O_BINARY;
+ _fmode &= ~O_TEXT;
+ _fmode |= O_BINARY;
}
diff --git a/winsup/cygwin/child_info.h b/winsup/cygwin/child_info.h
index d9467274f..e682a4ada 100644
--- a/winsup/cygwin/child_info.h
+++ b/winsup/cygwin/child_info.h
@@ -1,8 +1,5 @@
/* child_info.h: shared child info for cygwin
- Copyright 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2008, 2009, 2011, 2012,
- 2013 Red Hat, Inc.
-
This file is part of Cygwin.
This software is a copyrighted work licensed under the terms of the
@@ -39,7 +36,7 @@ enum child_status
#define EXEC_MAGIC_SIZE sizeof(child_info)
/* Change this value if you get a message indicating that it is out-of-sync. */
-#define CURR_CHILD_INFO_MAGIC 0x93737edaU
+#define CURR_CHILD_INFO_MAGIC 0x30ea98f6U
#define NPROCS 256
@@ -103,17 +100,18 @@ class child_info_fork: public child_info
public:
HANDLE forker_finished;// for synchronization with child
jmp_buf jmp; // where child will jump to
- void *stackaddr; // address of parent stack
- void *stacktop; // location of top of parent stack
- void *stackbottom; // location of bottom of parent stack
+ void *stackaddr; // DeallocationStack or user-provided allocation address
+ // of parent thread
+ void *stacklimit; // StackLimit of parent thread
+ void *stackbase; // StackBase of parent thread
size_t guardsize; // size of POSIX guard region or (size_t) -1 if
// user stack
+ bool from_main; // true if started from parent's main thread
char filler[4];
child_info_fork ();
void __reg1 handle_fork ();
bool abort (const char *fmt = NULL, ...);
void alloc_stack ();
- void alloc_stack_hard_way (volatile char *);
};
class fhandler_base;
diff --git a/winsup/cygwin/collate.h b/winsup/cygwin/collate.h
index 3cfb8880c..a89829a83 100644
--- a/winsup/cygwin/collate.h
+++ b/winsup/cygwin/collate.h
@@ -1,7 +1,5 @@
/* collate.h: Internal BSD libc header, used in glob and regcomp, for instance.
- Copyright 2012 Red Hat, Inc.
-
This file is part of Cygwin.
This software is a copyrighted work licensed under the terms of the
@@ -13,10 +11,9 @@ details. */
extern "C" {
#endif
-/* We never have a collate load error. */
-const int __collate_load_error = 0;
+extern const int __collate_load_error;
-int __collate_range_cmp (int c1, int c2);
+extern int __collate_range_cmp (int c1, int c2);
#ifdef __cplusplus
};
diff --git a/winsup/cygwin/common.din b/winsup/cygwin/common.din
index c068911ae..2ae3c81d3 100644
--- a/winsup/cygwin/common.din
+++ b/winsup/cygwin/common.din
@@ -41,22 +41,36 @@ __assert_func NOSIGFE
__assertfail NOSIGFE
__b64_ntop NOSIGFE
__b64_pton NOSIGFE
+__bsd_qsort_r NOSIGFE
+__cxa_atexit = cygwin__cxa_atexit SIGFE
+__cxa_finalize SIGFE
__dn_comp SIGFE
__dn_expand SIGFE
__dn_skipname SIGFE
__eprintf SIGFE
__errno NOSIGFE
+__fbufsize NOSIGFE
+__flbf NOSIGFE
__fpclassifyd NOSIGFE
__fpclassifyf NOSIGFE
+__fpending NOSIGFE
__fpurge SIGFE
+__freadable NOSIGFE
+__freading NOSIGFE
+__fsetlocking SIGFE
+__fwritable NOSIGFE
+__fwriting NOSIGFE
+__getpagesize = getpagesize SIGFE
__getreent NOSIGFE
+__gnu_basename NOSIGFE
__infinity NOSIGFE
-__isinfd NOSIGFE
-__isinff NOSIGFE
-__isnand NOSIGFE
-__isnanf NOSIGFE
+__isinfd = isinf NOSIGFE
+__isinff = isinff NOSIGFE
+__isnand = isnan NOSIGFE
+__isnanf = isnanf NOSIGFE
__locale_mb_cur_max NOSIGFE
__main NOSIGFE
+__mempcpy = mempcpy NOSIGFE
__opendir_with_d_ino SIGFE
__res_close SIGFE
__res_init SIGFE
@@ -104,6 +118,45 @@ accept = cygwin_accept SIGFE
accept4 SIGFE
access SIGFE
acl SIGFE
+acl_add_perm NOSIGFE
+acl_calc_mask SIGFE
+acl_check NOSIGFE
+acl_clear_perms NOSIGFE
+acl_cmp SIGFE
+acl_copy_entry NOSIGFE
+acl_copy_ext NOSIGFE
+acl_copy_int NOSIGFE
+acl_create_entry SIGFE
+acl_delete_def_file SIGFE
+acl_delete_entry NOSIGFE
+acl_delete_perm NOSIGFE
+acl_dup SIGFE
+acl_entries NOSIGFE
+acl_equiv_mode SIGFE
+acl_error NOSIGFE
+acl_extended_fd SIGFE
+acl_extended_file SIGFE
+acl_extended_file_nofollow SIGFE
+acl_free SIGFE
+acl_from_mode NOSIGFE
+acl_from_text SIGFE
+acl_get_entry NOSIGFE
+acl_get_fd SIGFE
+acl_get_file SIGFE
+acl_get_perm NOSIGFE
+acl_get_permset NOSIGFE
+acl_get_qualifier SIGFE
+acl_get_tag_type NOSIGFE
+acl_init SIGFE
+acl_set_fd SIGFE
+acl_set_file SIGFE
+acl_set_permset NOSIGFE
+acl_set_qualifier NOSIGFE
+acl_set_tag_type NOSIGFE
+acl_size NOSIGFE
+acl_to_any_text SIGFE
+acl_to_text SIGFE
+acl_valid NOSIGFE
aclcheck NOSIGFE
aclfrommode SIGFE
aclfrompbits SIGFE
@@ -116,7 +169,10 @@ acos NOSIGFE
acosf NOSIGFE
acosh NOSIGFE
acoshf NOSIGFE
+acoshl NOSIGFE
+acosl NOSIGFE
alarm SIGFE
+aligned_alloc SIGFE
alphasort NOSIGFE
arc4random NOSIGFE
arc4random_addrandom NOSIGFE
@@ -141,20 +197,26 @@ asin NOSIGFE
asinf NOSIGFE
asinh NOSIGFE
asinhf NOSIGFE
+asinhl NOSIGFE
+asinl NOSIGFE
asnprintf SIGFE
asprintf SIGFE
atan NOSIGFE
atan2 NOSIGFE
atan2f NOSIGFE
+atan2l NOSIGFE
atanf NOSIGFE
atanh NOSIGFE
atanhf NOSIGFE
+atanhl NOSIGFE
+atanl NOSIGFE
atexit = cygwin_atexit SIGFE
atof SIGFE
atoff SIGFE
atoi NOSIGFE
atol NOSIGFE
atoll NOSIGFE
+at_quick_exit SIGFE
basename NOSIGFE
bcmp NOSIGFE
bcopy NOSIGFE
@@ -166,32 +228,45 @@ btowc NOSIGFE
bzero NOSIGFE
cabs NOSIGFE
cabsf NOSIGFE
+cabsl NOSIGFE
cacos NOSIGFE
cacosf NOSIGFE
cacosh NOSIGFE
cacoshf NOSIGFE
+cacoshl NOSIGFE
+cacosl NOSIGFE
calloc SIGFE
canonicalize_file_name SIGFE
carg NOSIGFE
cargf NOSIGFE
+cargl NOSIGFE
casin NOSIGFE
casinf NOSIGFE
casinh NOSIGFE
casinhf NOSIGFE
+casinhl NOSIGFE
+casinl NOSIGFE
catan NOSIGFE
catanf NOSIGFE
catanh NOSIGFE
catanhf NOSIGFE
+catanhl NOSIGFE
+catanl NOSIGFE
cbrt NOSIGFE
cbrtf NOSIGFE
+cbrtl NOSIGFE
ccos NOSIGFE
ccosf NOSIGFE
ccosh NOSIGFE
ccoshf NOSIGFE
+ccoshl NOSIGFE
+ccosl NOSIGFE
ceil NOSIGFE
ceilf NOSIGFE
+ceill NOSIGFE
cexp NOSIGFE
cexpf NOSIGFE
+cexpl NOSIGFE
cfgetispeed NOSIGFE
cfgetospeed NOSIGFE
cfmakeraw NOSIGFE
@@ -204,8 +279,10 @@ chown SIGFE
chroot SIGFE
cimag NOSIGFE
cimagf NOSIGFE
+cimagl NOSIGFE
cleanup_glue NOSIGFE
clearerr SIGFE
+clearerr_unlocked SIGFE
clock SIGFE
clock_getcpuclockid SIGFE
clock_getres SIGFE
@@ -214,37 +291,53 @@ clock_nanosleep SIGFE
clock_setres SIGFE
clock_settime SIGFE
clog NOSIGFE
+clog10 NOSIGFE
+clog10f NOSIGFE
+clog10l NOSIGFE
clogf NOSIGFE
+clogl NOSIGFE
close SIGFE
closedir SIGFE
closelog SIGFE
confstr NOSIGFE
conj NOSIGFE
conjf NOSIGFE
+conjl NOSIGFE
connect = cygwin_connect SIGFE
copysign NOSIGFE
copysignf NOSIGFE
+copysignl NOSIGFE
cos NOSIGFE
cosf NOSIGFE
cosh NOSIGFE
coshf NOSIGFE
+coshl NOSIGFE
+cosl NOSIGFE
cpow NOSIGFE
cpowf NOSIGFE
+cpowl NOSIGFE
cproj NOSIGFE
cprojf NOSIGFE
+cprojl NOSIGFE
creal NOSIGFE
crealf NOSIGFE
+creall NOSIGFE
creat SIGFE
csin NOSIGFE
csinf NOSIGFE
csinh NOSIGFE
csinhf NOSIGFE
+csinhl NOSIGFE
+csinl NOSIGFE
csqrt NOSIGFE
csqrtf NOSIGFE
+csqrtl NOSIGFE
ctan NOSIGFE
ctanf NOSIGFE
ctanh NOSIGFE
ctanhf NOSIGFE
+ctanhl NOSIGFE
+ctanl NOSIGFE
ctermid SIGFE
ctime SIGFE
ctime_r SIGFE
@@ -281,8 +374,9 @@ dn_expand = __dn_expand SIGFE
dn_skipname = __dn_skipname SIGFE
dprintf SIGFE
drand48 NOSIGFE
-drem NOSIGFE
-dremf NOSIGFE
+drem = remainder NOSIGFE
+dremf= remainderf NOSIGFE
+dreml= remainderl NOSIGFE
dup SIGFE
dup2 SIGFE
dup3 SIGFE
@@ -309,7 +403,9 @@ erand48 NOSIGFE
erf NOSIGFE
erfc NOSIGFE
erfcf NOSIGFE
+erfcl NOSIGFE
erff NOSIGFE
+erfl NOSIGFE
err SIGFE
error SIGFE
error_at_line SIGFE
@@ -326,13 +422,18 @@ exit = cygwin_exit SIGFE
exp NOSIGFE
exp10 NOSIGFE
exp10f NOSIGFE
+exp10l NOSIGFE
exp2 NOSIGFE
exp2f NOSIGFE
+exp2l NOSIGFE
expf NOSIGFE
+expl NOSIGFE
expm1 NOSIGFE
expm1f NOSIGFE
+expm1l NOSIGFE
fabs NOSIGFE
fabsf NOSIGFE
+fabsl NOSIGFE
faccessat SIGFE
facl SIGFE
fchdir SIGFE
@@ -349,6 +450,7 @@ fcvtf SIGFE
fdatasync SIGFE
fdim NOSIGFE
fdimf NOSIGFE
+fdiml NOSIGFE
fdopen SIGFE
fdopendir SIGFE
feclearexcept NOSIGFE
@@ -361,8 +463,10 @@ fegetprec NOSIGFE
fegetround NOSIGFE
feholdexcept SIGFE
feof SIGFE
+feof_unlocked SIGFE
feraiseexcept SIGFE
ferror SIGFE
+ferror_unlocked SIGFE
fesetenv SIGFE
fesetexceptflag SIGFE
fesetprec NOSIGFE
@@ -371,31 +475,45 @@ fetestexcept NOSIGFE
feupdateenv SIGFE
fexecve SIGFE
fflush SIGFE
+fflush_unlocked SIGFE
ffs NOSIGFE
+ffsl NOSIGFE
+ffsll NOSIGFE
fgetc SIGFE
+fgetc_unlocked SIGFE
fgetpos SIGFE
fgets SIGFE
+fgets_unlocked SIGFE
fgetwc SIGFE
+fgetwc_unlocked SIGFE
fgetws SIGFE
+fgetws_unlocked SIGFE
fgetxattr SIGFE
fileno SIGFE
+fileno_unlocked SIGFE
finite NOSIGFE
finitef NOSIGFE
+finitel NOSIGFE
fiprintf SIGFE
flistxattr SIGFE
flock SIGFE
flockfile SIGFE
floor NOSIGFE
floorf NOSIGFE
+floorl NOSIGFE
fma NOSIGFE
fmaf NOSIGFE
+fmal NOSIGFE
fmax NOSIGFE
fmaxf NOSIGFE
+fmaxl NOSIGFE
fmemopen SIGFE
fmin NOSIGFE
fminf NOSIGFE
+fminl NOSIGFE
fmod NOSIGFE
fmodf NOSIGFE
+fmodl NOSIGFE
fnmatch NOSIGFE
fopen SIGFE
fopencookie SIGFE
@@ -405,10 +523,15 @@ fpathconf SIGFE
fprintf SIGFE
fpurge SIGFE
fputc SIGFE
+fputc_unlocked SIGFE
fputs SIGFE
+fputs_unlocked SIGFE
fputwc SIGFE
+fputwc_unlocked SIGFE
fputws SIGFE
+fputws_unlocked SIGFE
fread SIGFE
+fread_unlocked SIGFE
free SIGFE
freeaddrinfo = cygwin_freeaddrinfo SIGFE
freeifaddrs SIGFE
@@ -416,6 +539,7 @@ fremovexattr SIGFE
freopen SIGFE
frexp NOSIGFE
frexpf NOSIGFE
+frexpl NOSIGFE
fscanf SIGFE
fseek SIGFE
fseeko SIGFE
@@ -449,6 +573,7 @@ futimesat SIGFE
fwide SIGFE
fwprintf SIGFE
fwrite SIGFE
+fwrite_unlocked SIGFE
fwscanf SIGFE
gai_strerror = cygwin_gai_strerror NOSIGFE
gamma NOSIGFE
@@ -469,6 +594,7 @@ getc SIGFE
getc_unlocked SIGFE
getchar SIGFE
getchar_unlocked SIGFE
+getcontext NOSIGFE
getcwd SIGFE
getdelim = __getdelim SIGFE
getdomainname SIGFE
@@ -541,7 +667,9 @@ getutxid SIGFE
getutxline SIGFE
getw SIGFE
getwc SIGFE
+getwc_unlocked SIGFE
getwchar SIGFE
+getwchar_unlocked SIGFE
getwd SIGFE
getxattr SIGFE
glob SIGFE
@@ -562,12 +690,14 @@ htonl NOSIGFE
htons NOSIGFE
hypot NOSIGFE
hypotf NOSIGFE
+hypotl NOSIGFE
if_freenameindex SIGFE
if_indextoname SIGFE
if_nameindex SIGFE
if_nametoindex SIGFE
ilogb NOSIGFE
ilogbf NOSIGFE
+ilogbl NOSIGFE
imaxabs = llabs NOSIGFE
imaxdiv = lldiv NOSIGFE
index NOSIGFE
@@ -598,11 +728,14 @@ isdigit NOSIGFE
isgraph NOSIGFE
isinf NOSIGFE
isinff NOSIGFE
+isinfl NOSIGFE
islower NOSIGFE
isnan NOSIGFE
isnanf NOSIGFE
+isnanl NOSIGFE
isprint NOSIGFE
ispunct NOSIGFE
+issetugid NOSIGFE
isspace NOSIGFE
isupper NOSIGFE
iswalnum NOSIGFE
@@ -634,12 +767,15 @@ lchown SIGFE
lcong48 NOSIGFE
ldexp NOSIGFE
ldexpf NOSIGFE
+ldexpl NOSIGFE
ldiv NOSIGFE
lfind NOSIGFE
lgamma NOSIGFE
lgamma_r NOSIGFE
lgammaf NOSIGFE
lgammaf_r NOSIGFE
+lgammal NOSIGFE
+lgammal_r NOSIGFE
lgetxattr SIGFE
link SIGFE
linkat SIGFE
@@ -648,8 +784,12 @@ listxattr SIGFE
llabs NOSIGFE
lldiv NOSIGFE
llistxattr SIGFE
+llrint NOSIGFE
+llrintf NOSIGFE
+llrintl NOSIGFE
llround NOSIGFE
llroundf NOSIGFE
+llroundl NOSIGFE
localeconv NOSIGFE
localtime SIGFE
localtime_r SIGFE
@@ -657,13 +797,18 @@ lockf SIGFE
log NOSIGFE
log10 NOSIGFE
log10f NOSIGFE
+log10l NOSIGFE
log1p NOSIGFE
log1pf NOSIGFE
+log1pl NOSIGFE
log2 NOSIGFE
log2f NOSIGFE
+log2l NOSIGFE
logb NOSIGFE
logbf NOSIGFE
+logbl NOSIGFE
logf NOSIGFE
+logl NOSIGFE
login SIGFE
login_tty SIGFE
logout SIGFE
@@ -671,14 +816,19 @@ logwtmp SIGFE
longjmp NOSIGFE
lrand48 NOSIGFE
lremovexattr SIGFE
+lrint NOSIGFE
+lrintf NOSIGFE
+lrintl NOSIGFE
lround NOSIGFE
lroundf NOSIGFE
+lroundl NOSIGFE
lsearch NOSIGFE
lseek SIGFE
lsetxattr SIGFE
lstat SIGFE
lutimes SIGFE
madvise = posix_madvise SIGFE
+makecontext NOSIGFE
mallinfo SIGFE
malloc SIGFE
malloc_stats SIGFE
@@ -721,6 +871,7 @@ mlock SIGFE
mmap SIGFE
modf NOSIGFE
modff NOSIGFE
+modfl NOSIGFE
mount SIGFE
mprotect SIGFE
mq_close SIGFE
@@ -743,11 +894,17 @@ munlock SIGFE
munmap SIGFE
nan NOSIGFE
nanf NOSIGFE
+nanl NOSIGFE
nanosleep SIGFE
nearbyint NOSIGFE
nearbyintf NOSIGFE
+nearbyintl NOSIGFE
nextafter NOSIGFE
nextafterf NOSIGFE
+nextafterl NOSIGFE
+nexttoward NOSIGFE
+nexttowardf NOSIGFE
+nexttowardl NOSIGFE
nftw SIGFE
nice SIGFE
nl_langinfo SIGFE
@@ -775,10 +932,33 @@ posix_fallocate SIGFE
posix_madvise SIGFE
posix_memalign SIGFE
posix_openpt SIGFE
+posix_spawn SIGFE
+posix_spawnattr_destroy SIGFE
+posix_spawnattr_init SIGFE
+posix_spawnattr_getflags NOSIGFE
+posix_spawnattr_getpgroup NOSIGFE
+posix_spawnattr_getschedparam NOSIGFE
+posix_spawnattr_getschedpolicy NOSIGFE
+posix_spawnattr_getsigdefault NOSIGFE
+posix_spawnattr_getsigmask NOSIGFE
+posix_spawnattr_setflags NOSIGFE
+posix_spawnattr_setpgroup NOSIGFE
+posix_spawnattr_setschedparam NOSIGFE
+posix_spawnattr_setschedpolicy NOSIGFE
+posix_spawnattr_setsigdefault NOSIGFE
+posix_spawnattr_setsigmask NOSIGFE
+posix_spawnp SIGFE
+posix_spawn_file_actions_destroy SIGFE
+posix_spawn_file_actions_init SIGFE
+posix_spawn_file_actions_addclose SIGFE
+posix_spawn_file_actions_adddup2 SIGFE
+posix_spawn_file_actions_addopen SIGFE
pow NOSIGFE
pow10 NOSIGFE
pow10f NOSIGFE
+pow10l NOSIGFE
powf NOSIGFE
+powl NOSIGFE
ppoll SIGFE
pread SIGFE
printf SIGFE
@@ -806,6 +986,13 @@ pthread_attr_setscope SIGFE
pthread_attr_setstack SIGFE
pthread_attr_setstackaddr SIGFE
pthread_attr_setstacksize SIGFE
+pthread_barrierattr_init SIGFE
+pthread_barrierattr_setpshared SIGFE
+pthread_barrierattr_getpshared SIGFE
+pthread_barrierattr_destroy SIGFE
+pthread_barrier_init SIGFE
+pthread_barrier_destroy SIGFE
+pthread_barrier_wait SIGFE
pthread_cancel SIGFE
pthread_cond_broadcast SIGFE
pthread_cond_destroy SIGFE
@@ -892,9 +1079,14 @@ pututline SIGFE
pututxline SIGFE
putw SIGFE
putwc SIGFE
+putwc_unlocked SIGFE
putwchar SIGFE
+putwchar_unlocked SIGFE
pwrite SIGFE
+quick_exit SIGFE
qsort NOSIGFE
+qsort_r NOSIGFE
+quotactl SIGFE
raise SIGFE
rand NOSIGFE
rand_r NOSIGFE
@@ -920,11 +1112,13 @@ regexec SIGFE
regfree SIGFE
remainder NOSIGFE
remainderf NOSIGFE
+remainderl NOSIGFE
remove SIGFE
removexattr SIGFE
remque NOSIGFE
remquo NOSIGFE
remquof NOSIGFE
+remquol NOSIGFE
rename SIGFE
renameat SIGFE
res_close = __res_close SIGFE
@@ -946,19 +1140,27 @@ rewind SIGFE
rewinddir SIGFE
rexec = cygwin_rexec SIGFE
rindex NOSIGFE
+rint NOSIGFE
+rintf NOSIGFE
+rintl NOSIGFE
rmdir SIGFE
round NOSIGFE
roundf NOSIGFE
+roundl NOSIGFE
+rpmatch SIGFE
rresvport = cygwin_rresvport SIGFE
rresvport_af = cygwin_rresvport_af SIGFE
ruserok SIGFE
sbrk SIGFE
scalb NOSIGFE
scalbf NOSIGFE
+scalbl NOSIGFE
scalbln NOSIGFE
scalblnf NOSIGFE
+scalblnl NOSIGFE
scalbn NOSIGFE
scalbnf NOSIGFE
+scalbnl NOSIGFE
scandir SIGFE
scandirat SIGFE
scanf SIGFE
@@ -991,6 +1193,8 @@ sendmsg = cygwin_sendmsg SIGFE
sendto = cygwin_sendto SIGFE
setbuf SIGFE
setbuffer SIGFE
+setcontext NOSIGFE
+sethostname SIGFE
setdtablesize SIGFE
setegid SIGFE
setenv SIGFE
@@ -1035,6 +1239,7 @@ shmget SIGFE
shutdown = cygwin_shutdown SIGFE
sigaction SIGFE
sigaddset SIGFE
+sigaltstack SIGFE
sigdelset SIGFE
sigemptyset NOSIGFE
sigfillset NOSIGFE
@@ -1042,6 +1247,7 @@ sighold SIGFE
sigignore SIGFE
siginterrupt SIGFE
sigismember SIGFE
+siglongjmp NOSIGFE
signal SIGFE
significand NOSIGFE
significandf NOSIGFE
@@ -1051,18 +1257,23 @@ sigprocmask SIGFE
sigqueue SIGFE
sigrelse SIGFE
sigset SIGFE
+sigsetjmp NOSIGFE
sigsuspend SIGFE
sigwait SIGFE
sigwaitinfo SIGFE
sin NOSIGFE
sincos NOSIGFE
sincosf NOSIGFE
+sincosl NOSIGFE
sinf NOSIGFE
sinh NOSIGFE
sinhf NOSIGFE
+sinhl NOSIGFE
+sinl NOSIGFE
siprintf SIGFE
sleep SIGFE
snprintf SIGFE
+sockatmark SIGFE
socket = cygwin_socket SIGFE
socketpair SIGFE
spawnl SIGFE
@@ -1076,6 +1287,7 @@ spawnvpe SIGFE
sprintf SIGFE
sqrt NOSIGFE
sqrtf NOSIGFE
+sqrtl NOSIGFE
srand NOSIGFE
srand48 NOSIGFE
srandom NOSIGFE
@@ -1083,6 +1295,7 @@ sscanf SIGFE
stat SIGFE
statfs SIGFE
statvfs SIGFE
+stime SIGFE
stpcpy NOSIGFE
stpncpy NOSIGFE
strcasecmp NOSIGFE
@@ -1122,7 +1335,7 @@ strtoimax = strtoll NOSIGFE
strtok NOSIGFE
strtok_r NOSIGFE
strtol NOSIGFE
-strtold = _strtold SIGFE
+strtold SIGFE
strtoll NOSIGFE
strtosigno NOSIGFE
strtoul NOSIGFE
@@ -1131,6 +1344,7 @@ strtoumax = strtoull NOSIGFE
strupr NOSIGFE
strxfrm NOSIGFE
swab NOSIGFE
+swapcontext NOSIGFE
swprintf SIGFE
swscanf SIGFE
symlink SIGFE
@@ -1144,6 +1358,8 @@ tan NOSIGFE
tanf NOSIGFE
tanh NOSIGFE
tanhf NOSIGFE
+tanhl NOSIGFE
+tanl NOSIGFE
tcdrain SIGFE
tcflow SIGFE
tcflush SIGFE
@@ -1160,6 +1376,7 @@ tempnam SIGFE
tfind NOSIGFE
tgamma NOSIGFE
tgammaf NOSIGFE
+tgammal NOSIGFE
time SIGFE
timegm NOSIGFE
timelocal SIGFE
@@ -1180,6 +1397,7 @@ towupper NOSIGFE
trunc NOSIGFE
truncate SIGFE
truncf NOSIGFE
+truncl NOSIGFE
tsearch SIGFE
ttyname SIGFE
ttyname_r SIGFE
@@ -1266,6 +1484,7 @@ wcstof NOSIGFE
wcstoimax = wcstoll NOSIGFE
wcstok NOSIGFE
wcstol NOSIGFE
+wcstold NOSIGFE
wcstoll NOSIGFE
wcstombs NOSIGFE
wcstoul NOSIGFE
diff --git a/winsup/cygwin/config.h.in b/winsup/cygwin/config.h.in
index 32cba72d8..5ddff249f 100644
--- a/winsup/cygwin/config.h.in
+++ b/winsup/cygwin/config.h.in
@@ -1,30 +1,7 @@
-/* config.h.in. Generated from configure.in by autoheader. */
-/* Define if DEBUGGING support is requested. */
-#undef DEBUGGING
-
-/* Define if GCC supports builtin memset. */
-#undef HAVE_BUILTIN_MEMSET
-
-/* Define if MALLOC_DEBUGGING support is requested. */
-#undef MALLOC_DEBUG
-
-/* Define if using new vfork functionality. */
-#undef NEWVFORK
-
-/* Define to one of `_getb67', `GETB67', `getb67' for Cray-2 and Cray-YMP
- systems. This function is required for `alloca.c' support on those systems.
- */
-#undef CRAY_STACKSEG_END
+/* config.h.in. Generated from configure.ac by autoheader. */
-/* Define to 1 if using `alloca.c'. */
-#undef C_ALLOCA
-
-/* Define to 1 if you have `alloca', as a function or macro. */
-#undef HAVE_ALLOCA
-
-/* Define to 1 if you have <alloca.h> and it should be used (not on Ultrix).
- */
-#undef HAVE_ALLOCA_H
+/* Define if DEBUGGING support is requested. */
+#undef DEBUGGING
/* Define to the address where bug reports for this package should be sent. */
#undef PACKAGE_BUGREPORT
@@ -38,13 +15,8 @@
/* Define to the one symbol short name of this package. */
#undef PACKAGE_TARNAME
+/* Define to the home page for this package. */
+#undef PACKAGE_URL
+
/* Define to the version of this package. */
#undef PACKAGE_VERSION
-
-/* If using the C implementation of alloca, define if you know the
- direction of stack growth for your system; otherwise it will be
- automatically deduced at run-time.
- STACK_DIRECTION > 0 => grows toward higher addresses
- STACK_DIRECTION < 0 => grows toward lower addresses
- STACK_DIRECTION = 0 => direction of growth unknown */
-#undef STACK_DIRECTION
diff --git a/winsup/cygwin/configure b/winsup/cygwin/configure
index a81aea704..f655f5738 100755
--- a/winsup/cygwin/configure
+++ b/winsup/cygwin/configure
@@ -1,11 +1,11 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.68.
+# Generated by GNU Autoconf 2.69 for Cygwin DLL 0.
#
+# Report bugs to <cygwin@cygwin.com>.
#
-# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
-# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software
-# Foundation, Inc.
+#
+# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
#
#
# This configure script is free software; the Free Software Foundation
@@ -134,6 +134,31 @@ export LANGUAGE
# CDPATH.
(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
+# Use a proper internal environment variable to ensure we don't fall
+ # into an infinite loop, continuously re-executing ourselves.
+ if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
+ _as_can_reexec=no; export _as_can_reexec;
+ # We cannot yet assume a decent shell, so we have to provide a
+# neutralization value for shells without unset; and this also
+# works around shells that cannot unset nonexistent variables.
+# Preserve -v and -x to the replacement shell.
+BASH_ENV=/dev/null
+ENV=/dev/null
+(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
+case $- in # ((((
+ *v*x* | *x*v* ) as_opts=-vx ;;
+ *v* ) as_opts=-v ;;
+ *x* ) as_opts=-x ;;
+ * ) as_opts= ;;
+esac
+exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
+# Admittedly, this is quite paranoid, since all the known shells bail
+# out after a failed `exec'.
+$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
+as_fn_exit 255
+ fi
+ # We don't want this to propagate to other subprocesses.
+ { _as_can_reexec=; unset _as_can_reexec;}
if test "x$CONFIG_SHELL" = x; then
as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
emulate sh
@@ -167,7 +192,8 @@ if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
else
exitcode=1; echo positional parameters were not saved.
fi
-test x\$exitcode = x0 || exit 1"
+test x\$exitcode = x0 || exit 1
+test -x / || exit 1"
as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
@@ -211,21 +237,25 @@ IFS=$as_save_IFS
if test "x$CONFIG_SHELL" != x; then :
- # We cannot yet assume a decent shell, so we have to provide a
- # neutralization value for shells without unset; and this also
- # works around shells that cannot unset nonexistent variables.
- # Preserve -v and -x to the replacement shell.
- BASH_ENV=/dev/null
- ENV=/dev/null
- (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
- export CONFIG_SHELL
- case $- in # ((((
- *v*x* | *x*v* ) as_opts=-vx ;;
- *v* ) as_opts=-v ;;
- *x* ) as_opts=-x ;;
- * ) as_opts= ;;
- esac
- exec "$CONFIG_SHELL" $as_opts "$as_myself" ${1+"$@"}
+ export CONFIG_SHELL
+ # We cannot yet assume a decent shell, so we have to provide a
+# neutralization value for shells without unset; and this also
+# works around shells that cannot unset nonexistent variables.
+# Preserve -v and -x to the replacement shell.
+BASH_ENV=/dev/null
+ENV=/dev/null
+(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
+case $- in # ((((
+ *v*x* | *x*v* ) as_opts=-vx ;;
+ *v* ) as_opts=-v ;;
+ *x* ) as_opts=-x ;;
+ * ) as_opts= ;;
+esac
+exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
+# Admittedly, this is quite paranoid, since all the known shells bail
+# out after a failed `exec'.
+$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
+exit 255
fi
if test x$as_have_required = xno; then :
@@ -235,10 +265,11 @@ fi
$as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
$as_echo "$0: be upgraded to zsh 4.3.4 or later."
else
- $as_echo "$0: Please tell bug-autoconf@gnu.org about your system,
-$0: including any error possibly output before this
-$0: message. Then install a modern shell, or manually run
-$0: the script under such a shell if you do have one."
+ $as_echo "$0: Please tell bug-autoconf@gnu.org and cygwin@cygwin.com
+$0: about your system, including any error possibly output
+$0: before this message. Then install a modern shell, or
+$0: manually run the script under such a shell if you do
+$0: have one."
fi
exit 1
fi
@@ -327,6 +358,14 @@ $as_echo X"$as_dir" |
} # as_fn_mkdir_p
+
+# as_fn_executable_p FILE
+# -----------------------
+# Test if FILE is an executable regular file.
+as_fn_executable_p ()
+{
+ test -f "$1" && test -x "$1"
+} # as_fn_executable_p
# as_fn_append VAR VALUE
# ----------------------
# Append the text in VALUE to the end of the definition contained in VAR. Take
@@ -448,6 +487,10 @@ as_cr_alnum=$as_cr_Letters$as_cr_digits
chmod +x "$as_me.lineno" ||
{ $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
+ # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
+ # already done that, so ensure we don't try to do so again and fall
+ # in an infinite loop. This has already happened in practice.
+ _as_can_reexec=no; export _as_can_reexec
# Don't try to exec as it changes $[0], causing all sort of problems
# (the dirname of $[0] is not the place where we might find the
# original and so on. Autoconf is especially sensitive to this).
@@ -482,16 +525,16 @@ if (echo >conf$$.file) 2>/dev/null; then
# ... but there are two gotchas:
# 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
# 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
- # In both cases, we have to default to `cp -p'.
+ # In both cases, we have to default to `cp -pR'.
ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
- as_ln_s='cp -p'
+ as_ln_s='cp -pR'
elif ln conf$$.file conf$$ 2>/dev/null; then
as_ln_s=ln
else
- as_ln_s='cp -p'
+ as_ln_s='cp -pR'
fi
else
- as_ln_s='cp -p'
+ as_ln_s='cp -pR'
fi
rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
rmdir conf$$.dir 2>/dev/null
@@ -503,28 +546,8 @@ else
as_mkdir_p=false
fi
-if test -x / >/dev/null 2>&1; then
- as_test_x='test -x'
-else
- if ls -dL / >/dev/null 2>&1; then
- as_ls_L_option=L
- else
- as_ls_L_option=
- fi
- as_test_x='
- eval sh -c '\''
- if test -d "$1"; then
- test -d "$1/.";
- else
- case $1 in #(
- -*)set "./$1";;
- esac;
- case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
- ???[sx]*):;;*)false;;esac;fi
- '\'' sh
- '
-fi
-as_executable_p=$as_test_x
+as_test_x='test -x'
+as_executable_p=as_fn_executable_p
# Sed expression to map a string onto a valid CPP name.
as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
@@ -554,12 +577,12 @@ MFLAGS=
MAKEFLAGS=
# Identity of this package.
-PACKAGE_NAME=
-PACKAGE_TARNAME=
-PACKAGE_VERSION=
-PACKAGE_STRING=
-PACKAGE_BUGREPORT=
-PACKAGE_URL=
+PACKAGE_NAME='Cygwin DLL'
+PACKAGE_TARNAME='cygwin'
+PACKAGE_VERSION='0'
+PACKAGE_STRING='Cygwin DLL 0'
+PACKAGE_BUGREPORT='cygwin@cygwin.com'
+PACKAGE_URL='https://cygwin.com'
ac_unique_file="Makefile.in"
ac_no_link=no
@@ -588,6 +611,7 @@ all_host
cygwin_headers
newlib_headers
windows_headers
+windows_libdir
CPP
ac_ct_CXX
CXXFLAGS
@@ -614,7 +638,6 @@ build
INSTALL_DATA
INSTALL_SCRIPT
INSTALL_PROGRAM
-windows_libdir
target_alias
host_alias
build_alias
@@ -714,7 +737,7 @@ sharedstatedir='${prefix}/com'
localstatedir='${prefix}/var'
includedir='${prefix}/include'
oldincludedir='/usr/include'
-docdir='${datarootdir}/doc/${PACKAGE}'
+docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
infodir='${datarootdir}/info'
htmldir='${docdir}'
dvidir='${docdir}'
@@ -1129,8 +1152,6 @@ target=$target_alias
if test "x$host_alias" != x; then
if test "x$build_alias" = x; then
cross_compiling=maybe
- $as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host.
- If a cross compiler is detected then cross compile mode will be used" >&2
elif test "x$build_alias" != "x$host_alias"; then
cross_compiling=yes
fi
@@ -1216,7 +1237,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures this package to adapt to many kinds of systems.
+\`configure' configures Cygwin DLL 0 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1264,7 +1285,7 @@ Fine tuning of the installation directories:
--infodir=DIR info documentation [DATAROOTDIR/info]
--localedir=DIR locale-dependent data [DATAROOTDIR/locale]
--mandir=DIR man documentation [DATAROOTDIR/man]
- --docdir=DIR documentation root [DATAROOTDIR/doc/PACKAGE]
+ --docdir=DIR documentation root [DATAROOTDIR/doc/cygwin]
--htmldir=DIR html documentation [DOCDIR]
--dvidir=DIR dvi documentation [DOCDIR]
--pdfdir=DIR pdf documentation [DOCDIR]
@@ -1281,7 +1302,9 @@ _ACEOF
fi
if test -n "$ac_init_help"; then
-
+ case $ac_init_help in
+ short | recursive ) echo "Configuration of Cygwin DLL 0:";;
+ esac
cat <<\_ACEOF
Optional Features:
@@ -1312,7 +1335,8 @@ Some influential environment variables:
Use these variables to override the choices made by `configure' or to help
it to find libraries and programs with nonstandard names/locations.
-Report bugs to the package provider.
+Report bugs to <cygwin@cygwin.com>.
+Cygwin DLL home page: <https://cygwin.com>.
_ACEOF
ac_status=$?
fi
@@ -1375,10 +1399,10 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-configure
-generated by GNU Autoconf 2.68
+Cygwin DLL configure 0
+generated by GNU Autoconf 2.69
-Copyright (C) 2010 Free Software Foundation, Inc.
+Copyright (C) 2012 Free Software Foundation, Inc.
This configure script is free software; the Free Software Foundation
gives unlimited permission to copy, distribute and modify it.
_ACEOF
@@ -1505,8 +1529,8 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by $as_me, which was
-generated by GNU Autoconf 2.68. Invocation command line was
+It was created by Cygwin DLL $as_me 0, which was
+generated by GNU Autoconf 2.69. Invocation command line was
$ $0 $@
@@ -1853,6 +1877,7 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $
ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
ac_config_headers="$ac_config_headers config.h"
ac_aux_dir=
@@ -1887,34 +1912,6 @@ ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
. ${srcdir}/../configure.cygwin
-
-
-# Check whether --with-windows-headers was given.
-if test "${with_windows_headers+set}" = set; then :
- withval=$with_windows_headers; test -z "$withval" && as_fn_error $? "must specify value for --with-windows-headers" "$LINENO" 5
-
-fi
-
-
-
-
-# Check whether --with-windows-libs was given.
-if test "${with_windows_libs+set}" = set; then :
- withval=$with_windows_libs; test -z "$withval" && as_fn_error $? "must specify value for --with-windows-libs" "$LINENO" 5
-
-fi
-
-windows_libdir=$(realdirpath "$with_windows_libs")
-if test -z "$windows_libdir"; then
- windows_libdir=$(realdirpath $(${ac_cv_prog_CC:-$CC} -xc /dev/null -Wl,--verbose=1 -lntdll 2>&1 | sed -rn 's%^.*\s(\S+)/libntdll\..*succeeded%\1%p'))
- if test -z "$windows_libdir"; then
- as_fn_error $? "cannot find windows library files" "$LINENO" 5
- fi
-fi
-
-
-
-
# Find a good install program. We prefer a C program (faster),
# so one script is as good as another. But avoid the broken or
# incompatible versions:
@@ -1952,7 +1949,7 @@ case $as_dir/ in #((
# by default.
for ac_prog in ginstall scoinst install; do
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
if test $ac_prog = install &&
grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
# AIX install. It has an incompatible calling convention.
@@ -2120,7 +2117,6 @@ test -n "$target_alias" &&
NONENONEs,x,x, &&
program_prefix=${target_alias}-
-
ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
@@ -2143,7 +2139,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_CC="${ac_tool_prefix}gcc"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -2183,7 +2179,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_ac_ct_CC="gcc"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -2236,7 +2232,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_CC="${ac_tool_prefix}cc"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -2277,7 +2273,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
ac_prog_rejected=yes
continue
@@ -2335,7 +2331,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -2379,7 +2375,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_ac_ct_CC="$ac_prog"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -2901,8 +2897,7 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <stdarg.h>
#include <stdio.h>
-#include <sys/types.h>
-#include <sys/stat.h>
+struct stat;
/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
struct buf { int x; };
FILE * (*rcsopen) (struct buf *, struct stat *, int);
@@ -3015,7 +3010,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -3059,7 +3054,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_ac_ct_CXX="$ac_prog"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -3387,6 +3382,37 @@ ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+
+# Check whether --with-windows-headers was given.
+if test "${with_windows_headers+set}" = set; then :
+ withval=$with_windows_headers; test -z "$withval" && as_fn_error $? "must specify value for --with-windows-headers" "$LINENO" 5
+
+fi
+
+
+if test "x$with_cross_bootstrap" != "xyes"; then
+
+
+# Check whether --with-windows-libs was given.
+if test "${with_windows_libs+set}" = set; then :
+ withval=$with_windows_libs; test -z "$withval" && as_fn_error $? "must specify value for --with-windows-libs" "$LINENO" 5
+
+fi
+
+windows_libdir=$(realdirpath "$with_windows_libs")
+if test -z "$windows_libdir"; then
+ windows_libdir=$(realdirpath $(${ac_cv_prog_CC:-$CC} -xc /dev/null -Wl,--verbose=1 -lntdll 2>&1 | sed -rn 's%^.*\s(\S+)/libntdll\..*succeeded%\1%p'))
+ if test -z "$windows_libdir"; then
+ as_fn_error $? "cannot find windows library files" "$LINENO" 5
+ fi
+fi
+
+
+
+fi
+
ac_ext=cpp
ac_cpp='$CXXCPP $CPPFLAGS'
ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
@@ -3464,7 +3490,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_AR="${ac_tool_prefix}ar"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -3504,7 +3530,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_ac_ct_AR="ar"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -3556,7 +3582,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_AS="${ac_tool_prefix}as"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -3596,7 +3622,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_ac_ct_AS="as"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -3648,7 +3674,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -3688,7 +3714,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_ac_ct_DLLTOOL="dlltool"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -3740,7 +3766,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_LD="${ac_tool_prefix}ld"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -3780,7 +3806,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_ac_ct_LD="ld"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -3832,7 +3858,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_NM="${ac_tool_prefix}nm"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -3872,7 +3898,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_ac_ct_NM="nm"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -3924,7 +3950,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_OBJCOPY="${ac_tool_prefix}objcopy"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -3964,7 +3990,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_ac_ct_OBJCOPY="objcopy"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -4016,7 +4042,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -4056,7 +4082,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_ac_ct_OBJDUMP="objdump"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -4108,7 +4134,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -4148,7 +4174,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_ac_ct_RANLIB="ranlib"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -4200,7 +4226,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_STRIP="${ac_tool_prefix}strip"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -4240,7 +4266,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_ac_ct_STRIP="strip"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -4292,7 +4318,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_WINDRES="${ac_tool_prefix}windres"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -4332,7 +4358,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_ac_ct_WINDRES="windres"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -4403,7 +4429,8 @@ fi
# Check whether --enable-debugging was given.
if test "${enable_debugging+set}" = set; then :
enableval=$enable_debugging; case "${enableval}" in
-yes) $as_echo "#define DEBUGGING 1" >>confdefs.h
+yes)
+$as_echo "#define DEBUGGING 1" >>confdefs.h
;;
no) ;;
esac
@@ -4857,16 +4884,16 @@ if (echo >conf$$.file) 2>/dev/null; then
# ... but there are two gotchas:
# 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
# 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
- # In both cases, we have to default to `cp -p'.
+ # In both cases, we have to default to `cp -pR'.
ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
- as_ln_s='cp -p'
+ as_ln_s='cp -pR'
elif ln conf$$.file conf$$ 2>/dev/null; then
as_ln_s=ln
else
- as_ln_s='cp -p'
+ as_ln_s='cp -pR'
fi
else
- as_ln_s='cp -p'
+ as_ln_s='cp -pR'
fi
rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
rmdir conf$$.dir 2>/dev/null
@@ -4926,28 +4953,16 @@ else
as_mkdir_p=false
fi
-if test -x / >/dev/null 2>&1; then
- as_test_x='test -x'
-else
- if ls -dL / >/dev/null 2>&1; then
- as_ls_L_option=L
- else
- as_ls_L_option=
- fi
- as_test_x='
- eval sh -c '\''
- if test -d "$1"; then
- test -d "$1/.";
- else
- case $1 in #(
- -*)set "./$1";;
- esac;
- case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
- ???[sx]*):;;*)false;;esac;fi
- '\'' sh
- '
-fi
-as_executable_p=$as_test_x
+
+# as_fn_executable_p FILE
+# -----------------------
+# Test if FILE is an executable regular file.
+as_fn_executable_p ()
+{
+ test -f "$1" && test -x "$1"
+} # as_fn_executable_p
+as_test_x='test -x'
+as_executable_p=as_fn_executable_p
# Sed expression to map a string onto a valid CPP name.
as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
@@ -4968,8 +4983,8 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by $as_me, which was
-generated by GNU Autoconf 2.68. Invocation command line was
+This file was extended by Cygwin DLL $as_me 0, which was
+generated by GNU Autoconf 2.69. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
CONFIG_HEADERS = $CONFIG_HEADERS
@@ -5024,17 +5039,18 @@ $config_files
Configuration headers:
$config_headers
-Report bugs to the package provider."
+Report bugs to <cygwin@cygwin.com>.
+Cygwin DLL home page: <https://cygwin.com>."
_ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
-config.status
-configured by $0, generated by GNU Autoconf 2.68,
+Cygwin DLL config.status 0
+configured by $0, generated by GNU Autoconf 2.69,
with options \\"\$ac_cs_config\\"
-Copyright (C) 2010 Free Software Foundation, Inc.
+Copyright (C) 2012 Free Software Foundation, Inc.
This config.status script is free software; the Free Software Foundation
gives unlimited permission to copy, distribute and modify it."
@@ -5123,7 +5139,7 @@ fi
_ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
if \$ac_cs_recheck; then
- set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
+ set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
shift
\$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
CONFIG_SHELL='$SHELL'
diff --git a/winsup/cygwin/configure.ac b/winsup/cygwin/configure.ac
index 4de46ef35..ff12dc259 100644
--- a/winsup/cygwin/configure.ac
+++ b/winsup/cygwin/configure.ac
@@ -1,21 +1,35 @@
-AC_PREREQ(2.59)dnl
-AC_INIT(Makefile.in)
+dnl Autoconf configure script for Cygwin.
+dnl
+dnl This file is part of Cygwin.
+dnl
+dnl This software is a copyrighted work licensed under the terms of the
+dnl Cygwin license. Please consult the file "CYGWIN_LICENSE" for
+dnl details.
+dnl
+dnl Process this file with autoconf to produce a configure script.
+
+AC_PREREQ([2.59])
+AC_INIT([Cygwin DLL],[0],[cygwin@cygwin.com],[cygwin],[https://cygwin.com])
+AC_CONFIG_SRCDIR(Makefile.in)
AC_CONFIG_HEADER(config.h)
AC_CONFIG_AUX_DIR(..)
. ${srcdir}/../configure.cygwin
-AC_WINDOWS_HEADERS
-AC_WINDOWS_LIBS
-
AC_PROG_INSTALL
AC_NO_EXECUTABLES
-AC_CANONICAL_SYSTEM
+AC_CANONICAL_TARGET
AC_PROG_CC
AC_PROG_CXX
AC_PROG_CPP
AC_LANG(C)
+
+AC_WINDOWS_HEADERS
+if test "x$with_cross_bootstrap" != "xyes"; then
+ AC_WINDOWS_LIBS
+fi
+
AC_LANG(C++)
AC_CYGWIN_INCLUDES
@@ -50,7 +64,7 @@ AC_PROG_MAKE_SET
AC_ARG_ENABLE(debugging,
[ --enable-debugging Build a cygwin DLL which has more consistency checking for debugging],
[case "${enableval}" in
-yes) AC_DEFINE(DEBUGGING) ;;
+yes) AC_DEFINE([DEBUGGING],[1],[Define if DEBUGGING support is requested.]) ;;
no) ;;
esac
])
@@ -85,7 +99,7 @@ case "$target_cpu" in
DIN_FILE="x86_64.din"
TLSOFFSETS_H="tlsoffsets64.h"
;;
- *) AC_MSG_ERROR(Invalid target processor \"$target_cpu\") ;;
+ *) AC_MSG_ERROR([Invalid target processor "$target_cpu"]) ;;
esac
AC_CONFIGURE_ARGS
@@ -95,4 +109,5 @@ AC_SUBST(DLL_ENTRY)
AC_SUBST(DEF_DLL_ENTRY)
AC_SUBST(DIN_FILE)
AC_SUBST(TLSOFFSETS_H)
-AC_OUTPUT(Makefile)
+AC_CONFIG_FILES([Makefile])
+AC_OUTPUT
diff --git a/winsup/cygwin/cpuid.h b/winsup/cygwin/cpuid.h
index ff353227e..478d907ee 100644
--- a/winsup/cygwin/cpuid.h
+++ b/winsup/cygwin/cpuid.h
@@ -1,54 +1,62 @@
+/* cpuid.h: Define cpuid instruction
+
+This file is part of Cygwin.
+
+This software is a copyrighted work licensed under the terms of the
+Cygwin license. Please consult the file "CYGWIN_LICENSE" for
+details. */
+
#ifndef CPUID_H
#define CPUID_H
-extern inline void
-cpuid (unsigned *a, unsigned *b, unsigned *c, unsigned *d, unsigned in)
+static inline void __attribute ((always_inline))
+cpuid (uint32_t *a, uint32_t *b, uint32_t *c, uint32_t *d, uint32_t ain,
+ uint32_t cin = 0)
{
- asm ("cpuid"
- : "=a" (*a),
- "=b" (*b),
- "=c" (*c),
- "=d" (*d)
- : "a" (in));
+ asm volatile ("cpuid"
+ : "=a" (*a), "=b" (*b), "=c" (*c), "=d" (*d)
+ : "a" (ain), "c" (cin));
}
#ifdef __x86_64__
-extern inline bool
-can_set_flag (register unsigned long flag)
+static inline bool __attribute ((always_inline))
+can_set_flag (register uint32_t long flag)
{
- register unsigned long r1, r2;
- asm("pushfq\n"
- "popq %0\n"
- "movq %0, %1\n"
- "xorq %2, %0\n"
- "pushq %0\n"
- "popfq\n"
- "pushfq\n"
- "popq %0\n"
- "pushq %1\n"
- "popfq\n"
- : "=&r" (r1), "=&r" (r2)
- : "ir" (flag)
+ register uint32_t long r1, r2;
+
+ asm volatile ("pushfq\n"
+ "popq %0\n"
+ "movq %0, %1\n"
+ "xorq %2, %0\n"
+ "pushq %0\n"
+ "popfq\n"
+ "pushfq\n"
+ "popq %0\n"
+ "pushq %1\n"
+ "popfq\n"
+ : "=&r" (r1), "=&r" (r2)
+ : "ir" (flag)
);
return ((r1 ^ r2) & flag) != 0;
}
#else
-extern inline bool
-can_set_flag (register unsigned flag)
+static inline bool __attribute ((always_inline))
+can_set_flag (register uint32_t flag)
{
- register unsigned r1, r2;
- asm("pushfl\n"
- "popl %0\n"
- "movl %0, %1\n"
- "xorl %2, %0\n"
- "pushl %0\n"
- "popfl\n"
- "pushfl\n"
- "popl %0\n"
- "pushl %1\n"
- "popfl\n"
- : "=&r" (r1), "=&r" (r2)
- : "ir" (flag)
+ register uint32_t r1, r2;
+
+ asm volatile ("pushfl\n"
+ "popl %0\n"
+ "movl %0, %1\n"
+ "xorl %2, %0\n"
+ "pushl %0\n"
+ "popfl\n"
+ "pushfl\n"
+ "popl %0\n"
+ "pushl %1\n"
+ "popfl\n"
+ : "=&r" (r1), "=&r" (r2)
+ : "ir" (flag)
);
return ((r1 ^ r2) & flag) != 0;
}
diff --git a/winsup/cygwin/crt0.c b/winsup/cygwin/crt0.c
index b5a21bd35..f0103b4ca 100644
--- a/winsup/cygwin/crt0.c
+++ b/winsup/cygwin/crt0.c
@@ -1,7 +1,5 @@
/* crt0.c
- Copyright 2001, 2003, 2004, 2005, 2010, 2011 Red Hat, Inc.
-
This software is a copyrighted work licensed under the terms of the
Cygwin license. Please consult the file "CYGWIN_LICENSE" for
details. */
diff --git a/winsup/cygwin/cxx.cc b/winsup/cygwin/cxx.cc
index 0faeaf7ee..be3268549 100644
--- a/winsup/cygwin/cxx.cc
+++ b/winsup/cygwin/cxx.cc
@@ -1,7 +1,5 @@
/* cxx.cc
- Copyright 2002, 2003, 2005, 2009 Red Hat, Inc.
-
This file is part of Cygwin.
This software is a copyrighted work licensed under the terms of the
@@ -30,6 +28,15 @@ operator delete (void *p)
free (p);
}
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wc++14-compat"
+void
+operator delete (void *p, size_t)
+{
+ ::operator delete(p);
+}
+#pragma GCC diagnostic pop
+
void *
operator new[] (std::size_t s)
{
diff --git a/winsup/cygwin/cygerrno.h b/winsup/cygwin/cygerrno.h
index 337dd75fc..ce33d971a 100644
--- a/winsup/cygwin/cygerrno.h
+++ b/winsup/cygwin/cygerrno.h
@@ -1,8 +1,5 @@
/* cygerrno.h: main Cygwin header file.
- Copyright 2000, 2001, 2002, 2003, 2004, 2005, 2009, 2010, 2011, 2012, 2013
- Red Hat, Inc.
-
This file is part of Cygwin.
This software is a copyrighted work licensed under the terms of the
@@ -16,10 +13,15 @@ details. */
void __reg3 seterrno_from_win_error (const char *file, int line, DWORD code);
void __reg3 seterrno_from_nt_status (const char *file, int line, NTSTATUS status);
-void __reg2 seterrno (const char *, int line);
int __reg2 geterrno_from_win_error (DWORD code = GetLastError (), int deferrno = 13 /*EACCESS*/);
int __reg2 geterrno_from_nt_status (NTSTATUS status, int deferrno = 13 /*EACCESS*/);
+inline void __attribute__ ((always_inline))
+seterrno (const char *file, int line)
+{
+ seterrno_from_win_error (file, line, GetLastError ());
+}
+
#define __seterrno() seterrno (__FILE__, __LINE__)
#define __seterrno_from_win_error(val) seterrno_from_win_error (__FILE__, __LINE__, val)
#define __seterrno_from_nt_status(status) seterrno_from_nt_status (__FILE__, __LINE__, status)
diff --git a/winsup/cygwin/cygheap.cc b/winsup/cygwin/cygheap.cc
index ea6eaa1a9..11f868f01 100644
--- a/winsup/cygwin/cygheap.cc
+++ b/winsup/cygwin/cygheap.cc
@@ -1,8 +1,5 @@
/* cygheap.cc: Cygwin heap manager.
- Copyright 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
- 2011, 2012, 2013 Red Hat, Inc.
-
This file is part of Cygwin.
This software is a copyrighted work licensed under the terms of the
@@ -130,7 +127,7 @@ init_cygheap::close_ctty ()
cygcheck can print the paths into which the Cygwin DLL has been
installed for debugging purposes.
- Last but not least, the new cygwin properties datastrcuture is checked
+ Last but not least, the new cygwin properties datastructure is checked
for the "disabled_key" value, which is used to determine whether the
installation key is actually added to all object names or not. This is
used as a last resort for debugging purposes, usually. However, there
@@ -140,6 +137,8 @@ init_cygheap::close_ctty ()
void
init_cygheap::init_installation_root ()
{
+ ptrdiff_t len = 0;
+
if (!GetModuleFileNameW (cygwin_hmodule, installation_root, PATH_MAX))
api_fatal ("Can't initialize Cygwin installation root dir.\n"
"GetModuleFileNameW(%p, %p, %u), %E",
@@ -147,16 +146,18 @@ init_cygheap::init_installation_root ()
PWCHAR p = installation_root;
if (wcsncasecmp (p, L"\\\\", 2)) /* Normal drive letter path */
{
- p = wcpcpy (p, L"\\??\\");
- GetModuleFileNameW (cygwin_hmodule, p, PATH_MAX - 4);
+ len = 4;
+ memmove (p + 4, p, PATH_MAX - 4);
+ p = wcpncpy (p, L"\\\\?\\", 4);
}
else
{
bool unc = false;
if (wcsncmp (p + 2, L"?\\", 2)) /* No long path prefix, so UNC path. */
{
- p = wcpcpy (p, L"\\??\\UN");
- GetModuleFileNameW (cygwin_hmodule, p, PATH_MAX - 6);
+ len = 6;
+ memmove (p + 6, p, PATH_MAX - 6);
+ p = wcpncpy (p, L"\\??\\UN", 6);
*p = L'C';
unc = true;
}
@@ -170,12 +171,12 @@ init_cygheap::init_installation_root ()
}
}
installation_root[1] = L'?';
-
RtlInitEmptyUnicodeString (&installation_key, installation_key_buf,
sizeof installation_key_buf);
RtlInt64ToHexUnicodeString (hash_path_name (0, installation_root),
&installation_key, FALSE);
+ /* Strip off last path component ("\\cygwin1.dll") */
PWCHAR w = wcsrchr (installation_root, L'\\');
if (w)
{
@@ -185,6 +186,20 @@ init_cygheap::init_installation_root ()
if (!w)
api_fatal ("Can't initialize Cygwin installation root dir.\n"
"Invalid DLL path");
+
+ /* Copy result into installation_dir before stripping off "bin" dir and
+ revert to Win32 path. This path is added to the Windows environment
+ in build_env. See there for a description. */
+ installation_dir_len = wcpncpy (installation_dir, installation_root + len,
+ PATH_MAX)
+ - installation_dir;
+ if (len == 4) /* Local path */
+ ;
+ else if (len == 6) /* UNC path */
+ installation_dir[0] = L'\\';
+ else /* Long, prefixed path */
+ installation_dir[1] = L'\\';
+
/* If w < p, the Cygwin DLL resides in the root dir of a drive or network
path. In that case, if we strip off yet another backslash, the path
becomes invalid. We avoid that here so that the DLL also works in this
@@ -201,12 +216,6 @@ init_cygheap::init_installation_root ()
installation_root)))
break;
}
-
- if (cygwin_props.disable_key)
- {
- installation_key.Length = 0;
- installation_key.Buffer[0] = L'\0';
- }
}
void __stdcall
@@ -249,6 +258,17 @@ cygheap_init ()
cygheap->init_tls_list ();
}
+/* Initial Cygwin heap setup.
+ Called by root process of a Cygwin process tree. */
+void
+setup_cygheap ()
+{
+ cygheap_init ();
+ cygheap->user.init ();
+ cygheap->init_installation_root (); /* Requires user.init! */
+ cygheap->pg.init ();
+}
+
#define nextpage(x) ((char *) roundup2 ((uintptr_t) (x), \
wincap.allocation_granularity ()))
#define allocsize(x) ((SIZE_T) nextpage (x))
@@ -386,7 +406,6 @@ creturn (cygheap_types x, cygheap_entry * c, unsigned len, const char *fn = NULL
char *cend = ((char *) c + sizeof (*c) + len);
if (cygheap_max < cend)
cygheap_max = cend;
- MALLOC_CHECK;
return (void *) c->data;
}
@@ -394,7 +413,6 @@ inline static void *
cmalloc (cygheap_types x, size_t n, const char *fn)
{
cygheap_entry *c;
- MALLOC_CHECK;
c = (cygheap_entry *) _cmalloc (sizeof_cygheap (n));
return creturn (x, c, n, fn);
}
@@ -414,7 +432,6 @@ cmalloc_abort (cygheap_types x, size_t n)
inline static void *
crealloc (void *s, size_t n, const char *fn)
{
- MALLOC_CHECK;
if (s == NULL)
return cmalloc (HEAP_STR, n); // kludge
@@ -442,7 +459,6 @@ cfree (void *s)
{
assert (!inheap (s));
_cfree (tocygheap (s));
- MALLOC_CHECK;
}
extern "C" void __reg2
@@ -457,7 +473,6 @@ inline static void *
ccalloc (cygheap_types x, size_t n, size_t size, const char *fn)
{
cygheap_entry *c;
- MALLOC_CHECK;
n *= size;
c = (cygheap_entry *) _cmalloc (sizeof_cygheap (n));
if (c)
@@ -478,50 +493,42 @@ ccalloc_abort (cygheap_types x, size_t n, size_t size)
}
extern "C" PWCHAR __reg1
-cwcsdup (const PWCHAR s)
+cwcsdup (PCWSTR s)
{
- MALLOC_CHECK;
PWCHAR p = (PWCHAR) cmalloc (HEAP_STR, (wcslen (s) + 1) * sizeof (WCHAR));
if (!p)
return NULL;
wcpcpy (p, s);
- MALLOC_CHECK;
return p;
}
extern "C" PWCHAR __reg1
-cwcsdup1 (const PWCHAR s)
+cwcsdup1 (PCWSTR s)
{
- MALLOC_CHECK;
PWCHAR p = (PWCHAR) cmalloc (HEAP_1_STR, (wcslen (s) + 1) * sizeof (WCHAR));
if (!p)
return NULL;
wcpcpy (p, s);
- MALLOC_CHECK;
return p;
}
extern "C" char *__reg1
cstrdup (const char *s)
{
- MALLOC_CHECK;
char *p = (char *) cmalloc (HEAP_STR, strlen (s) + 1);
if (!p)
return NULL;
strcpy (p, s);
- MALLOC_CHECK;
return p;
}
extern "C" char *__reg1
cstrdup1 (const char *s)
{
- MALLOC_CHECK;
char *p = (char *) cmalloc (HEAP_1_STR, strlen (s) + 1);
if (!p)
return NULL;
strcpy (p, s);
- MALLOC_CHECK;
return p;
}
@@ -588,8 +595,9 @@ init_cygheap::init_tls_list ()
else
{
sthreads = THREADLIST_CHUNK;
- threadlist = (_cygtls **) ccalloc_abort (HEAP_TLS, cygheap->sthreads,
- sizeof (cygheap->threadlist[0]));
+ threadlist = (threadlist_t *)
+ ccalloc_abort (HEAP_TLS, cygheap->sthreads,
+ sizeof (cygheap->threadlist[0]));
}
tls_sentry::lock.init ("thread_tls_sentry");
}
@@ -601,62 +609,128 @@ init_cygheap::add_tls (_cygtls *t)
tls_sentry here (INFINITE);
if (nthreads >= cygheap->sthreads)
{
- threadlist = (_cygtls **)
+ threadlist = (threadlist_t *)
crealloc_abort (threadlist, (sthreads += THREADLIST_CHUNK)
* sizeof (threadlist[0]));
- // memset (threadlist + nthreads, 0, THREADLIST_CHUNK * sizeof (threadlist[0]));
+#if 0
+ memset (threadlist + nthreads, 0,
+ THREADLIST_CHUNK * sizeof (threadlist[0]));
+#endif
}
- threadlist[nthreads++] = t;
-}
+ /* Create a mutex to lock the thread's _cygtls area. This is required for
+ the following reason: The thread's _cygtls area is on the thread's
+ own stack. Thus, when the thread exits, its _cygtls area is automatically
+ destroyed by the OS. Thus, when this happens while the signal thread
+ still utilizes the thread's _cygtls area, things go awry.
+
+ The following methods take this into account:
+
+ - The thread mutex is generally only locked under tls_sentry locking.
+ - remove_tls, called from _cygtls::remove, locks the mutex before
+ removing the threadlist entry and _cygtls::remove then unlocks and
+ destroyes the mutex.
+ - find_tls, called from several places but especially from the signal
+ thread, will lock the mutex on exit and the caller can access the
+ _cygtls area locked. Always make sure to unlock the mutex when the
+ _cygtls area isn't needed anymore. */
+ threadlist[nthreads].thread = t;
+ threadlist[nthreads].mutex = CreateMutexW (&sec_none_nih, FALSE, NULL);
+ if (!threadlist[nthreads].mutex)
+ api_fatal ("Can't create per-thread mutex, %E");
+ ++nthreads;
+}
+
+HANDLE __reg3
+init_cygheap::remove_tls (_cygtls *t)
+{
+ HANDLE mutex = NULL;
-void
-init_cygheap::remove_tls (_cygtls *t, DWORD wait)
-{
- tls_sentry here (wait);
+ tls_sentry here (INFINITE);
if (here.acquired ())
{
for (uint32_t i = 0; i < nthreads; i++)
- if (t == threadlist[i])
+ if (t == threadlist[i].thread)
{
+ mutex = threadlist[i].mutex;
+ WaitForSingleObject (mutex, INFINITE);
if (i < --nthreads)
threadlist[i] = threadlist[nthreads];
debug_only_printf ("removed %p element %u", this, i);
break;
}
}
+ /* Leave with locked mutex. The calling function is responsible for
+ unlocking the mutex. */
+ return mutex;
}
-_cygtls __reg3 *
+threadlist_t __reg2 *
+init_cygheap::find_tls (_cygtls *tls)
+{
+ tls_sentry here (INFINITE);
+
+ threadlist_t *t = NULL;
+ int ix = -1;
+ while (++ix < (int) nthreads)
+ {
+ if (!threadlist[ix].thread->tid
+ || !threadlist[ix].thread->initialized)
+ ;
+ if (threadlist[ix].thread == tls)
+ {
+ t = &threadlist[ix];
+ break;
+ }
+ }
+ /* Leave with locked mutex. The calling function is responsible for
+ unlocking the mutex. */
+ if (t)
+ WaitForSingleObject (t->mutex, INFINITE);
+ return t;
+}
+
+threadlist_t __reg3 *
init_cygheap::find_tls (int sig, bool& issig_wait)
{
debug_printf ("sig %d\n", sig);
tls_sentry here (INFINITE);
- static int NO_COPY ix;
-
- _cygtls *t = NULL;
+ threadlist_t *t = NULL;
issig_wait = false;
- myfault efault;
- if (efault.faulted ())
- threadlist[ix]->remove (INFINITE);
- else
+ int ix = -1;
+ /* Scan thread list looking for valid signal-delivery candidates */
+ while (++ix < (int) nthreads)
{
- ix = -1;
- /* Scan thread list looking for valid signal-delivery candidates */
- while (++ix < (int) nthreads)
- if (!threadlist[ix]->tid)
- continue;
- else if (sigismember (&(threadlist[ix]->sigwait_mask), sig))
- {
- t = cygheap->threadlist[ix];
- issig_wait = true;
- goto out;
- }
- else if (!t && !sigismember (&(threadlist[ix]->sigmask), sig))
- t = cygheap->threadlist[ix];
+ /* Only pthreads have tid set to non-0. */
+ if (!threadlist[ix].thread->tid
+ || !threadlist[ix].thread->initialized)
+ ;
+ else if (sigismember (&(threadlist[ix].thread->sigwait_mask), sig))
+ {
+ t = &cygheap->threadlist[ix];
+ issig_wait = true;
+ break;
+ }
+ else if (!t && !sigismember (&(threadlist[ix].thread->sigmask), sig))
+ t = &cygheap->threadlist[ix];
}
-out:
+ /* Leave with locked mutex. The calling function is responsible for
+ unlocking the mutex. */
+ if (t)
+ WaitForSingleObject (t->mutex, INFINITE);
return t;
}
+
+/* Called from profil.c to sample all non-main thread PC values for profiling */
+extern "C" void
+cygheap_profthr_all (void (*profthr_byhandle) (HANDLE))
+{
+ for (uint32_t ix = 0; ix < nthreads; ix++)
+ {
+ _cygtls *tls = cygheap->threadlist[ix].thread;
+ if (tls->tid)
+ profthr_byhandle (tls->tid->win32_obj_id);
+ }
+}
diff --git a/winsup/cygwin/cygheap.h b/winsup/cygwin/cygheap.h
index b4c478ffb..40e8fba20 100644
--- a/winsup/cygwin/cygheap.h
+++ b/winsup/cygwin/cygheap.h
@@ -1,8 +1,5 @@
/* cygheap.h: Cygwin heap manager.
- Copyright 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
- 2011, 2012, 2013 Red Hat, Inc.
-
This file is part of Cygwin.
This software is a copyrighted work licensed under the terms of the
@@ -11,6 +8,7 @@ details. */
#include "hires.h"
#include "cygheap_malloc.h"
+#include "pwdgrp.h"
#define incygheap(s) (cygheap && ((char *) (s) >= (char *) cygheap) && ((char *) (s) <= ((char *) cygheap_max)))
@@ -155,8 +153,8 @@ public:
}
void set_sid (PSID new_sid) { effec_cygsid = new_sid;}
void set_saved_sid () { saved_cygsid = effec_cygsid; }
- PSID sid () { return effec_cygsid; }
- PSID saved_sid () { return saved_cygsid; }
+ cygpsid &sid () { return effec_cygsid; }
+ cygpsid &saved_sid () { return saved_cygsid; }
const char *ontherange (homebodies what, struct passwd * = NULL);
#define NO_IMPERSONATION NULL
bool issetuid () const { return curr_imp_token != NO_IMPERSONATION; }
@@ -307,14 +305,23 @@ private:
available in shared memory avoids to test for the version every time
around. Default to new version. */
fcwd_version_t fast_cwd_version;
- void override_win32_cwd (bool, ULONG);
+ void override_win32_cwd (bool init, ULONG old_dismount_count);
public:
UNICODE_STRING win32;
static muto cwd_lock;
const char *get_posix () const { return posix; };
- void reset_posix (wchar_t *);
- char *get (char *, int = 1, int = 0, unsigned = NT_MAX_PATH);
+ void reset_posix (wchar_t *w_cwd);
+ char *get (char *buf, int need_posix = 1, int with_chroot = 0,
+ unsigned ulen = NT_MAX_PATH);
+ PWCHAR get (PWCHAR buf, unsigned buflen = NT_MAX_PATH)
+ {
+ cwd_lock.acquire ();
+ buf[0] = L'\0';
+ wcsncat (buf, win32.Buffer, buflen - 1);
+ cwd_lock.release ();
+ return buf;
+ }
HANDLE get_handle () { return dir; }
DWORD get_drive (char * dst)
{
@@ -355,6 +362,177 @@ struct user_heap_info
void __reg1 init ();
};
+class cygheap_domain_info
+{
+ PWCHAR pdom_name;
+ PWCHAR pdom_dns_name;
+ cygsid pdom_sid;
+
+ PWCHAR adom_name;
+ cygsid adom_sid;
+
+ PDS_DOMAIN_TRUSTSW tdom;
+ ULONG tdom_count;
+
+ PWCHAR rfc2307_domain_buf;
+
+public:
+ bool init ();
+
+ inline PCWSTR primary_flat_name () const { return pdom_name; }
+ inline PCWSTR primary_dns_name () const { return pdom_dns_name; }
+ inline cygsid &primary_sid () { return pdom_sid; }
+
+ inline bool member_machine () const { return pdom_sid != NO_SID; }
+
+ inline PCWSTR account_flat_name () const { return adom_name; }
+ inline cygsid &account_sid () { return adom_sid; }
+
+ inline PDS_DOMAIN_TRUSTSW trusted_domain (ULONG idx) const
+ { return (idx < tdom_count) ? tdom + idx : NULL; }
+ PDS_DOMAIN_TRUSTSW add_domain (PCWSTR, PSID);
+
+ inline PWCHAR get_rfc2307_domain () const
+ { return rfc2307_domain_buf ?: NULL; }
+};
+
+class cygheap_pwdgrp
+{
+ enum nss_pfx_t {
+ NSS_PFX_AUTO = 0,
+ NSS_PFX_PRIMARY,
+ NSS_PFX_ALWAYS
+ };
+public:
+ enum nss_scheme_method {
+ NSS_SCHEME_FALLBACK = 0,
+ NSS_SCHEME_WINDOWS,
+ NSS_SCHEME_CYGWIN,
+ NSS_SCHEME_UNIX,
+ NSS_SCHEME_DESC,
+ NSS_SCHEME_PATH,
+ NSS_SCHEME_FREEATTR
+ };
+ struct nss_scheme_t {
+ nss_scheme_method method;
+ PWCHAR attrib;
+ };
+private:
+ bool nss_inited;
+ uint32_t pwd_src;
+ uint32_t grp_src;
+ nss_pfx_t prefix;
+ WCHAR separator[2];
+ bool caching;
+
+#define NSS_SCHEME_MAX 4
+ nss_scheme_t home_scheme[NSS_SCHEME_MAX];
+ nss_scheme_t shell_scheme[NSS_SCHEME_MAX];
+ nss_scheme_t gecos_scheme[NSS_SCHEME_MAX];
+
+ uint32_t enums;
+ PWCHAR enum_tdoms;
+
+ void nss_init_line (const char *line);
+ void _nss_init ();
+
+public:
+ struct {
+ pwdgrp cygserver;
+ pwdgrp file;
+ pwdgrp win;
+ } pwd_cache;
+ struct {
+ pwdgrp cygserver;
+ pwdgrp file;
+ pwdgrp win;
+ } grp_cache;
+
+ void init ();
+
+ /* Implemented in ldap.cc */
+ PWCHAR *ldap_user_attr;
+ void init_ldap_user_attr ();
+
+ inline void nss_init () { if (!nss_inited) _nss_init (); }
+ inline bool nss_pwd_files () const { return !!(pwd_src & NSS_SRC_FILES); }
+ inline bool nss_pwd_db () const { return !!(pwd_src & NSS_SRC_DB); }
+ inline int nss_pwd_src () const { return pwd_src; } /* CW_GETNSS_PWD_SRC */
+ inline bool nss_grp_files () const { return !!(grp_src & NSS_SRC_FILES); }
+ inline bool nss_grp_db () const { return !!(grp_src & NSS_SRC_DB); }
+ inline int nss_grp_src () const { return grp_src; } /* CW_GETNSS_GRP_SRC */
+ inline bool nss_prefix_auto () const { return prefix == NSS_PFX_AUTO; }
+ inline bool nss_prefix_primary () const { return prefix == NSS_PFX_PRIMARY; }
+ inline bool nss_prefix_always () const { return prefix == NSS_PFX_ALWAYS; }
+ inline PCWSTR nss_separator () const { return separator; }
+ inline bool nss_cygserver_caching () const { return caching; }
+ inline void nss_disable_cygserver_caching () { caching = false; }
+
+ char *get_home (cyg_ldap *pldap, cygpsid &sid, PCWSTR dom, PCWSTR dnsdomain,
+ PCWSTR name, bool fq);
+ char *get_home (struct _USER_INFO_3 *ui, cygpsid &sid, PCWSTR dom,
+ PCWSTR name, bool fq);
+
+ char *get_shell (cyg_ldap *pldap, cygpsid &sid, PCWSTR dom, PCWSTR dnsdomain,
+ PCWSTR name, bool fq);
+ char *get_shell (struct _USER_INFO_3 *ui, cygpsid &sid, PCWSTR dom,
+ PCWSTR name, bool fq);
+
+ char *get_gecos (cyg_ldap *pldap, cygpsid &sid, PCWSTR dom, PCWSTR dnsdomain,
+ PCWSTR name, bool fq);
+ char *get_gecos (struct _USER_INFO_3 *ui, cygpsid &sid, PCWSTR dom,
+ PCWSTR name, bool fq);
+
+ inline int nss_db_enums () const { return enums; }
+ inline PCWSTR nss_db_enum_tdoms () const { return enum_tdoms; }
+};
+
+class cygheap_ugid_cache
+{
+ struct idmap {
+ uint32_t nfs_id;
+ uint32_t cyg_id;
+ };
+ class idmaps {
+ uint32_t _cnt;
+ uint32_t _max;
+ idmap *_map;
+ public:
+ uint32_t get (uint32_t id) const
+ {
+ for (uint32_t i = 0; i < _cnt; ++i)
+ if (_map[i].nfs_id == id)
+ return _map[i].cyg_id;
+ return (uint32_t) -1;
+ }
+ uint32_t reverse_get (uint32_t id) const
+ {
+ for (uint32_t i = 0; i < _cnt; ++i)
+ if (_map[i].cyg_id == id)
+ return _map[i].nfs_id;
+ return (uint32_t) -1;
+ }
+ void add (uint32_t nfs_id, uint32_t cyg_id)
+ {
+ if (_cnt >= _max)
+ _map = (idmap *) crealloc (_map, (_max += 10) * sizeof (*_map));
+ _map[_cnt].nfs_id = nfs_id;
+ _map[_cnt].cyg_id = cyg_id;
+ ++_cnt;
+ }
+ };
+ idmaps uids;
+ idmaps gids;
+
+public:
+ uid_t get_uid (uid_t uid) const { return uids.get (uid); }
+ gid_t get_gid (gid_t gid) const { return gids.get (gid); }
+ uid_t reverse_get_uid (uid_t uid) const { return uids.reverse_get (uid); }
+ gid_t reverse_get_gid (gid_t gid) const { return gids.reverse_get (gid); }
+ void add_uid (uid_t nfs_uid, uid_t cyg_uid) { uids.add (nfs_uid, cyg_uid); }
+ void add_gid (gid_t nfs_gid, gid_t cyg_gid) { gids.add (nfs_gid, cyg_gid); }
+};
+
struct hook_chain
{
void **loc;
@@ -369,15 +547,28 @@ struct mini_cygheap
#define NBUCKETS 40
+struct threadlist_t
+{
+ struct _cygtls *thread;
+ HANDLE mutex; /* Used to avoid accessing tls area of
+ deleted thread. See comment in
+ cygheap::remove_tls for a description. */
+};
+
struct init_cygheap: public mini_cygheap
{
_cmalloc_entry *chain;
unsigned bucket_val[NBUCKETS];
char *buckets[NBUCKETS];
WCHAR installation_root[PATH_MAX];
+ WCHAR installation_dir[PATH_MAX];
+ size_t installation_dir_len;
UNICODE_STRING installation_key;
WCHAR installation_key_buf[18];
cygheap_root root;
+ cygheap_domain_info dom;
+ cygheap_pwdgrp pg;
+ cygheap_ugid_cache ugid_cache;
cygheap_user user;
user_heap_info user_heap;
mode_t umask;
@@ -391,7 +582,7 @@ struct init_cygheap: public mini_cygheap
struct sigaction *sigs;
fhandler_termios *ctty; /* Current tty */
- struct _cygtls **threadlist;
+ threadlist_t *threadlist;
uint32_t sthreads;
pid_t pid; /* my pid */
struct { /* Equivalent to using LIST_HEAD. */
@@ -402,8 +593,10 @@ struct init_cygheap: public mini_cygheap
void init_installation_root ();
void __reg1 init_tls_list ();;
void __reg2 add_tls (_cygtls *);
- void __reg3 remove_tls (_cygtls *, DWORD);
- _cygtls __reg3 *find_tls (int, bool&);
+ HANDLE __reg3 remove_tls (_cygtls *);
+ threadlist_t __reg2 *find_tls (_cygtls *);
+ threadlist_t __reg3 *find_tls (int, bool&);
+ void unlock_tls (threadlist_t *t) { if (t) ReleaseMutex (t->mutex); }
};
@@ -457,7 +650,7 @@ class cygheap_fdnew : public cygheap_fdmanip
locked = lockit;
else
{
- set_errno (EMFILE);
+ /* errno set by find_unused_handle */
if (lockit)
cygheap->fdtab.unlock ();
locked = false;
@@ -533,4 +726,5 @@ class cygheap_fdenum : public cygheap_fdmanip
void __stdcall cygheap_fixup_in_child (bool);
void __stdcall cygheap_init ();
+void setup_cygheap ();
extern char _cygheap_start[] __attribute__((section(".idata")));
diff --git a/winsup/cygwin/cygheap_malloc.h b/winsup/cygwin/cygheap_malloc.h
index a4ab2462e..74f0bb619 100644
--- a/winsup/cygwin/cygheap_malloc.h
+++ b/winsup/cygwin/cygheap_malloc.h
@@ -1,8 +1,5 @@
/* cygheap_malloc.h: Cygwin heap manager allocation functions.
- Copyright 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2011
- Red Hat, Inc.
-
This file is part of Cygwin.
This software is a copyrighted work licensed under the terms of the
@@ -48,8 +45,8 @@ void *__reg3 ccalloc (cygheap_types, size_t, size_t);
void *__reg2 cmalloc_abort (cygheap_types, size_t);
void *__reg2 crealloc_abort (void *, size_t);
void *__reg3 ccalloc_abort (cygheap_types, size_t, size_t);
-PWCHAR __reg1 cwcsdup (const PWCHAR);
-PWCHAR __reg1 cwcsdup1 (const PWCHAR);
+PWCHAR __reg1 cwcsdup (PCWSTR);
+PWCHAR __reg1 cwcsdup1 (PCWSTR);
char *__reg1 cstrdup (const char *);
char *__reg1 cstrdup1 (const char *);
void __reg2 cfree_and_set (char *&, char * = NULL);
diff --git a/winsup/cygwin/cyglsa.h b/winsup/cygwin/cyglsa.h
index cc180daf3..f9da70735 100644
--- a/winsup/cygwin/cyglsa.h
+++ b/winsup/cygwin/cyglsa.h
@@ -1,7 +1,5 @@
/* cyglsa.h: Header file for Cygwin LSA authentication
- Copyright 2006, 2008 Red Hat, Inc.
-
Written by Corinna Vinschen <corinna@vinschen.de>
This file is part of Cygwin.
diff --git a/winsup/cygwin/cygmagic b/winsup/cygwin/cygmagic
index b94529109..c80ca9f96 100755
--- a/winsup/cygwin/cygmagic
+++ b/winsup/cygwin/cygmagic
@@ -1,8 +1,6 @@
#!/bin/sh
# cygmagic - Generate "magic numbers" from a structure.
#
-# Copyright 2001, 2002, 2005, 2013 Red Hat, Inc.
-#
# This file is part of Cygwin.
#
# This software is a copyrighted work licensed under the terms of the
@@ -24,7 +22,7 @@ sumit() {
while [ -n "$1" ]; do
define=$1; shift
struct=$1; shift
- sum=`$gcc -D__CYGMAGIC__ -E $file | sed -n "/^$struct/,/^};/p" | sed -e 's/[ ]//g' -e '/^$/d' | sumit | awk '{printf "0x%xU", $1}'`
+ sum=`$gcc -D__CYGMAGIC__ -E -P $file | sed -n "/^$struct/,/^};/p" | sed -e 's/[ ]//g' -e '/^$/d' | sumit | awk '{printf "0x%xU", $1}'`
echo "#define $define $sum"
curr=`sed -n "s/^#[ ]*define CURR_$define[ ][ ]*\([^ ][^ ]*\)/\1/p" $file`
[ "$curr" != "$sum" ] && echo "*** WARNING WARNING WARNING WARNING WARNING ***
diff --git a/winsup/cygwin/cygmalloc.h b/winsup/cygwin/cygmalloc.h
index 092e2f695..753ca33e4 100644
--- a/winsup/cygwin/cygmalloc.h
+++ b/winsup/cygwin/cygmalloc.h
@@ -1,7 +1,5 @@
/* cygmalloc.h: cygwin DLL malloc stuff
- Copyright 2002, 2003, 2004, 2005, 2007, 2013 Red Hat, Inc.
-
This file is part of Cygwin.
This software is a copyrighted work licensed under the terms of the
diff --git a/winsup/cygwin/cygprops.h b/winsup/cygwin/cygprops.h
deleted file mode 100644
index 70ea3cc5a..000000000
--- a/winsup/cygwin/cygprops.h
+++ /dev/null
@@ -1,21 +0,0 @@
-/* cygprops.h: Cygwin DLL properties
-
- Copyright 2009, 2012 Red Hat, Inc.
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-#pragma once
-/* DLL properties data. */
-struct cygwin_props_t
-{
- char magic[68];
- ULONG size;
- ULONG disable_key;
-};
-
-#define CYGWIN_PROPS_MAGIC \
- "Fortunately, I keep my feathers numbered for just such an emergency"
diff --git a/winsup/cygwin/cygserver.h b/winsup/cygwin/cygserver.h
index 8bcc271f3..9de8c4470 100644
--- a/winsup/cygwin/cygserver.h
+++ b/winsup/cygwin/cygserver.h
@@ -1,7 +1,5 @@
/* cygserver.h
- Copyright 2001, 2002, 2003, 2004, 2008, 2012, 2013 Red Hat Inc.
-
Written by Egor Duda <deo@logos-m.ru>
This file is part of Cygwin.
@@ -52,6 +50,7 @@ protected:
CYGSERVER_REQUEST_SEM,
CYGSERVER_REQUEST_SHM,
CYGSERVER_REQUEST_SETPWD,
+ CYGSERVER_REQUEST_PWDGRP,
CYGSERVER_REQUEST_LAST
} request_code_t;
diff --git a/winsup/cygwin/cygserver_ipc.h b/winsup/cygwin/cygserver_ipc.h
index 4ed3cdf51..54e15c3de 100644
--- a/winsup/cygwin/cygserver_ipc.h
+++ b/winsup/cygwin/cygserver_ipc.h
@@ -1,7 +1,5 @@
/* cygserver_ipc.h
- Copyright 2002, 2003, 2004, 2012, 2013 Red Hat, Inc.
-
This file is part of Cygwin.
This software is a copyrighted work licensed under the terms of the
@@ -34,7 +32,7 @@ struct proc {
#ifdef __INSIDE_CYGWIN__
#include "sigproc.h"
extern inline void
-ipc_set_proc_info (proc &blk)
+ipc_set_proc_info (proc &blk, bool in_fork = false)
{
blk.cygpid = getpid ();
blk.winpid = GetCurrentProcessId ();
@@ -43,7 +41,7 @@ ipc_set_proc_info (proc &blk)
blk.gidcnt = 0;
blk.gidlist = NULL;
blk.is_admin = false;
- _my_tls.set_signal_arrived (true, blk.signal_arrived);
+ blk.signal_arrived = in_fork ? NULL : _my_tls.get_signal_arrived (true);
}
#endif /* __INSIDE_CYGWIN__ */
@@ -59,6 +57,7 @@ private:
};
public:
+ ipc_retval () { ssz = 0; }
ipc_retval (ssize_t nssz) { ssz = nssz; }
operator int () const { return i; }
@@ -81,10 +80,23 @@ public:
vm_object_t operator = (vm_object_t nobj) { return obj = nobj; }
};
-struct thread {
+class thread {
+private:
+ /* Implemented in cgyserver/process.cc */
+ void dup_signal_arrived ();
+ void close_signal_arrived ();
+public:
class process *client;
proc *ipcblk;
ipc_retval td_retval[2];
+
+ thread (class process *_client, proc *_proc, bool _init_m1)
+ : client (_client), ipcblk (_proc)
+ {
+ td_retval[0] = td_retval[1] = _init_m1 ? -1 : 0;
+ dup_signal_arrived ();
+ }
+ ~thread () { close_signal_arrived (); }
};
#define td_proc ipcblk
#define p_pid cygpid
diff --git a/winsup/cygwin/cygserver_msg.h b/winsup/cygwin/cygserver_msg.h
index fc1277621..b9fa7d77b 100644
--- a/winsup/cygwin/cygserver_msg.h
+++ b/winsup/cygwin/cygserver_msg.h
@@ -1,7 +1,5 @@
/* cygserver_msg.h: Single unix specification IPC interface for Cygwin.
- Copyright 2003, 2004, 2005, 2008 Red Hat, Inc.
-
This file is part of Cygwin.
This software is a copyrighted work licensed under the terms of the
diff --git a/winsup/cygwin/cygserver_pwdgrp.h b/winsup/cygwin/cygserver_pwdgrp.h
new file mode 100644
index 000000000..fb22858dc
--- /dev/null
+++ b/winsup/cygwin/cygserver_pwdgrp.h
@@ -0,0 +1,61 @@
+/* cygserver_pwdgrp.h: Request account information
+
+This file is part of Cygwin.
+
+This software is a copyrighted work licensed under the terms of the
+Cygwin license. Please consult the file "CYGWIN_LICENSE" for
+details. */
+
+#ifndef __CYGSERVER_PWDGRP_H__
+#define __CYGSERVER_PWDGRP_H__
+
+#include <sys/types.h>
+#include "cygserver.h"
+#include "userinfo.h"
+
+class transport_layer_base;
+class process_cache;
+
+class client_request_pwdgrp : public client_request
+{
+ friend class client_request;
+
+private:
+ union _pwdgrp_param_t
+ {
+ struct _pwdgrp_in_t
+ {
+ bool group;
+ fetch_user_arg_type_t type;
+ union
+ {
+ BYTE sid[40];
+ char name[UNLEN + 1];
+ uint32_t id;
+ } arg;
+ } in;
+
+ struct
+ {
+ char line[1024];
+ } out;
+ } _parameters;
+
+#ifndef __INSIDE_CYGWIN__
+ client_request_pwdgrp ();
+ virtual void serve (transport_layer_base *, process_cache *);
+ void pwd_serve ();
+ void grp_serve ();
+#endif
+
+public:
+
+#ifdef __INSIDE_CYGWIN__
+ client_request_pwdgrp (fetch_user_arg_t &arg, bool group);
+#endif
+
+ const char *line () const { return (msglen () > 0) ? _parameters.out.line
+ : NULL; }
+};
+
+#endif /* __CYGSERVER_PWDGRP_H__ */
diff --git a/winsup/cygwin/cygserver_sem.h b/winsup/cygwin/cygserver_sem.h
index e7b8eb237..75c688762 100644
--- a/winsup/cygwin/cygserver_sem.h
+++ b/winsup/cygwin/cygserver_sem.h
@@ -1,7 +1,5 @@
/* cygserver_sem.h: Single unix specification IPC interface for Cygwin.
- Copyright 2003, 2004, 2005, 2008 Red Hat, Inc.
-
This file is part of Cygwin.
This software is a copyrighted work licensed under the terms of the
diff --git a/winsup/cygwin/cygserver_setpwd.h b/winsup/cygwin/cygserver_setpwd.h
index 8fa34793b..fc1576b05 100644
--- a/winsup/cygwin/cygserver_setpwd.h
+++ b/winsup/cygwin/cygserver_setpwd.h
@@ -1,7 +1,5 @@
/* cygserver_setpwd.h: Set LSA private data password for current user.
- Copyright 2008, 2011 Red Hat, Inc.
-
This file is part of Cygwin.
This software is a copyrighted work licensed under the terms of the
diff --git a/winsup/cygwin/cygserver_shm.h b/winsup/cygwin/cygserver_shm.h
index 1d4e837bb..80bbf84f0 100644
--- a/winsup/cygwin/cygserver_shm.h
+++ b/winsup/cygwin/cygserver_shm.h
@@ -1,7 +1,5 @@
/* cygserver_shm.h: Single unix specification IPC interface for Cygwin.
- Copyright 2001, 2002, 2003, 2005, 2008 Red Hat, Inc.
-
This file is part of Cygwin.
This software is a copyrighted work licensed under the terms of the
diff --git a/winsup/cygwin/cygthread.cc b/winsup/cygwin/cygthread.cc
index e48a73e54..fc051cdcd 100644
--- a/winsup/cygwin/cygthread.cc
+++ b/winsup/cygwin/cygthread.cc
@@ -1,8 +1,5 @@
/* cygthread.cc
- Copyright 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2008, 2009,
- 2010, 2011, 2012, 2013 Red Hat, Inc.
-
This software is a copyrighted work licensed under the terms of the
Cygwin license. Please consult the file "CYGWIN_LICENSE" for
details. */
@@ -374,7 +371,7 @@ cygthread::detach (HANDLE sigwait)
unsigned n = 2;
DWORD howlong = INFINITE;
w4[0] = sigwait;
- set_signal_arrived here (w4[1]);
+ wait_signal_arrived here (w4[1]);
/* For a description of the below loop see the end of this file */
for (int i = 0; i < 2; i++)
switch (res = WaitForMultipleObjects (n, w4, FALSE, howlong))
diff --git a/winsup/cygwin/cygtls.cc b/winsup/cygwin/cygtls.cc
index 5cc9405eb..6e9764d0f 100644
--- a/winsup/cygwin/cygtls.cc
+++ b/winsup/cygwin/cygtls.cc
@@ -1,8 +1,5 @@
/* cygtls.cc
- Copyright 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012,
- 2013 Red Hat, Inc.
-
This software is a copyrighted work licensed under the terms of the
Cygwin license. Please consult the file "CYGWIN_LICENSE" for
details. */
@@ -38,10 +35,9 @@ dll_cmp (const void *a, const void *b)
/* Keep sorted!
This is a list of well-known core system DLLs which contain code
- whiuch is started in its own thread by the system. Kernel32.dll,
- for instance, contains the thread called on every Ctrl-C keypress
- in a console window. The DLLs in this list are not recognized as
- BLODAs. */
+ started in its own thread by the system. Kernel32.dll, for instance,
+ contains the thread called on every Ctrl-C keypress in a console window.
+ The DLLs in this list are not recognized as BLODAs. */
const wchar_t *well_known_dlls[] =
{
L"advapi32.dll",
@@ -55,46 +51,58 @@ const wchar_t *well_known_dlls[] =
L"ws2_32.dll",
};
+/* Optional BLODA detection. The idea is that the function address is supposed
+ to be within Cygwin itself. This is also true for pthreads, since pthreads
+ are always calling pthread::thread_init_wrapper() in thread.cc. Therefore,
+ every function call to a function outside of the Cygwin DLL is potentially
+ a thread injected into the Cygwin process by some BLODA.
+
+ But that's too simple. Assuming the application itself calls CreateThread,
+ then this is a bad idea, but not really invalid. So we shouldn't print a
+ BLODA message if the address is within the loaded image of the application.
+ Also, ntdll.dll starts threads into the application which */
+static void
+bloda_detect (DWORD (*func) (void *, void *))
+{
+ PIMAGE_DOS_HEADER img_start = (PIMAGE_DOS_HEADER)
+ GetModuleHandle (NULL);
+ PIMAGE_NT_HEADERS32 ntheader = (PIMAGE_NT_HEADERS32)
+ ((PBYTE) img_start + img_start->e_lfanew);
+ void *img_end = (void *) ((PBYTE) img_start
+ + ntheader->OptionalHeader.SizeOfImage);
+ if (((void *) func < (void *) cygwin_hmodule
+ || (void *) func > (void *) cygheap)
+ && ((void *) func < (void *) img_start || (void *) func >= img_end))
+ {
+ MEMORY_BASIC_INFORMATION mbi;
+ wchar_t modname[PATH_MAX];
+
+ VirtualQuery ((PVOID) func, &mbi, sizeof mbi);
+ GetModuleFileNameW ((HMODULE) mbi.AllocationBase, modname,
+ PATH_MAX);
+ /* Fetch basename and check against list of above system DLLs. */
+ const wchar_t *modbasename = wcsrchr (modname, L'\\') + 1;
+ if (!bsearch (modbasename, well_known_dlls,
+ sizeof well_known_dlls / sizeof well_known_dlls[0],
+ sizeof well_known_dlls[0], dll_cmp))
+ small_printf ("\n\nPotential BLODA detected! Thread function "
+ "called outside of Cygwin DLL:\n %W\n\n",
+ modname);
+ }
+}
+
void
_cygtls::call2 (DWORD (*func) (void *, void *), void *arg, void *buf)
{
- init_thread (buf, func);
-
- /* Optional BLODA detection. The idea is that the function address is
- supposed to be within Cygwin itself. This is also true for pthreads,
- since pthreads are always calling thread_wrapper in miscfuncs.cc.
- Therefore, every function call to a function outside of the Cygwin DLL
- is potentially a thread injected into the Cygwin process by some BLODA.
-
- But that's a bit too simple. Assuming the application itself calls
- CreateThread, then this is a bad idea, but not really invalid. So we
- shouldn't print a BLODA message if the address is within the loaded
- image of the application. Also, ntdll.dll starts threads into the
- application which */
- if (detect_bloda)
+ /* If func is pthread_wrapper, the final stack hasn't been set up yet.
+ This only happens in pthread_wrapper itself. Thus it doesn't make
+ sense to call init_thread or perform BLODA detection. pthread_wrapper
+ eventually calls init_thread by itself. */
+ if ((void *) func != (void *) pthread_wrapper)
{
- PIMAGE_DOS_HEADER img_start = (PIMAGE_DOS_HEADER) GetModuleHandle (NULL);
- PIMAGE_NT_HEADERS32 ntheader = (PIMAGE_NT_HEADERS32)
- ((PBYTE) img_start + img_start->e_lfanew);
- void *img_end = (void *) ((PBYTE) img_start
- + ntheader->OptionalHeader.SizeOfImage);
- if (((void *) func < (void *) cygwin_hmodule
- || (void *) func > (void *) cygheap)
- && ((void *) func < (void *) img_start || (void *) func >= img_end))
- {
- MEMORY_BASIC_INFORMATION mbi;
- wchar_t modname[PATH_MAX];
-
- VirtualQuery ((PVOID) func, &mbi, sizeof mbi);
- GetModuleFileNameW ((HMODULE) mbi.AllocationBase, modname, PATH_MAX);
- /* Fetch basename and check against list of above system DLLs. */
- const wchar_t *modbasename = wcsrchr (modname, L'\\') + 1;
- if (!bsearch (modbasename, well_known_dlls,
- sizeof well_known_dlls / sizeof well_known_dlls[0],
- sizeof well_known_dlls[0], dll_cmp))
- small_printf ("\n\nPotential BLODA detected! Thread function "
- "called outside of Cygwin DLL:\n %W\n\n", modname);
- }
+ init_thread (buf, func);
+ if (detect_bloda)
+ bloda_detect (func);
}
DWORD res = func (arg, buf);
@@ -114,6 +122,7 @@ _cygtls::init_thread (void *x, DWORD (*func) (void *, void *))
memset (this, 0, sizeof (*this));
_REENT_INIT_PTR (&local_clib);
stackptr = stack;
+ altstack.ss_flags = SS_DISABLE;
if (_GLOBAL_REENT)
{
local_clib._stdin = _GLOBAL_REENT->_stdin;
@@ -169,9 +178,13 @@ _cygtls::remove (DWORD wait)
debug_printf ("wait %u", wait);
+ HANDLE mutex = cygheap->remove_tls (this);
+ remove_wq (wait);
+
/* FIXME: Need some sort of atthreadexit function to allow things like
select to control this themselves. */
+ remove_pending_sigs ();
if (signal_arrived)
{
HANDLE h = signal_arrived;
@@ -197,6 +210,18 @@ _cygtls::remove (DWORD wait)
/* Close timer handle. */
if (locals.cw_timer)
NtClose (locals.cw_timer);
- cygheap->remove_tls (this, wait);
- remove_wq (wait);
+ if (mutex)
+ {
+ ReleaseMutex (mutex);
+ CloseHandle (mutex);
+ }
+}
+
+#ifdef __x86_64__
+void san::leave ()
+{
+ /* Restore tls_pathbuf counters in case of error. */
+ _my_tls.locals.pathbufs._counters = _cnt;
+ _my_tls.andreas = _clemente;
}
+#endif
diff --git a/winsup/cygwin/cygtls.h b/winsup/cygwin/cygtls.h
index d475508e2..2a9f8f3fa 100644
--- a/winsup/cygwin/cygtls.h
+++ b/winsup/cygwin/cygtls.h
@@ -1,8 +1,5 @@
/* cygtls.h
- Copyright 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013
- Red Hat, Inc.
-
This software is a copyrighted work licensed under the terms of the
Cygwin license. Please consult the file "CYGWIN_LICENSE" for
details. */
@@ -17,6 +14,7 @@ details. */
#include <mntent.h>
#undef _NOMNTENT_FUNCS
#include <setjmp.h>
+#include <ucontext.h>
#define CYGTLS_INITIALIZED 0xc763173f
@@ -32,8 +30,8 @@ details. */
#include "cygthread.h"
-#define TP_NUM_C_BUFS 10
-#define TP_NUM_W_BUFS 10
+#define TP_NUM_C_BUFS 50
+#define TP_NUM_W_BUFS 50
#ifdef CYGTLS_HANDLE
#include "thread.h"
@@ -44,18 +42,28 @@ details. */
#else
#pragma pack(push,4)
#endif
+
/* Defined here to support auto rebuild of tlsoffsets.h. */
class tls_pathbuf
{
- int c_cnt;
- int w_cnt;
+ /* Make sure that c_cnt and w_cnt are always the first two members of this
+ class, and never change the size (32 bit), unless you also change the
+ mov statements in sigbe! */
+ union
+ {
+ struct
+ {
+ uint32_t c_cnt;
+ uint32_t w_cnt;
+ };
+ uint64_t _counters;
+ };
char *c_buf[TP_NUM_C_BUFS];
WCHAR *w_buf[TP_NUM_W_BUFS];
public:
void destroy ();
friend class tmp_pathbuf;
- friend class _cygtls;
friend class san;
};
@@ -79,20 +87,13 @@ public:
struct _local_storage
{
- /*
- Needed for the group functions
- */
- int grp_pos;
+ /* passwd.cc */
+ char pass[_PASSWORD_LEN];
/* dlfcn.cc */
int dl_error;
char dl_buffer[256];
- /* passwd.cc */
- struct passwd res;
- char pass[_PASSWORD_LEN];
- int pw_pos;
-
/* path.cc */
struct mntent mntbuf;
int iteration;
@@ -136,7 +137,6 @@ struct _local_storage
/* thread.cc */
HANDLE cw_timer;
- /* All functions requiring temporary path buffers. */
tls_pathbuf pathbufs;
char ttybuf[32];
};
@@ -165,7 +165,7 @@ extern "C" int __ljfault (jmp_buf, int);
/*gentls_offsets*/
-typedef uintptr_t __stack_t;
+typedef uintptr_t __tlsstack_t;
class _cygtls
{
@@ -186,10 +186,12 @@ public:
int *errno_addr;
sigset_t sigmask;
sigset_t sigwait_mask;
+ stack_t altstack;
siginfo_t *sigwait_info;
HANDLE signal_arrived;
bool will_wait_for_signal;
- struct ucontext thread_context;
+ long __align; /* Needed to align context to 16 byte. */
+ ucontext_t context;
DWORD thread_id;
siginfo_t infodata;
struct pthread *tid;
@@ -200,17 +202,17 @@ public:
unsigned incyg;
unsigned spinning;
unsigned stacklock;
- __stack_t *stackptr;
- __stack_t stack[TLS_STACK_SIZE];
+ __tlsstack_t *stackptr;
+ __tlsstack_t stack[TLS_STACK_SIZE];
unsigned initialized;
/*gentls_offsets*/
void init_thread (void *, DWORD (*) (void *, void *));
static void call (DWORD (*) (void *, void *), void *);
void remove (DWORD);
- void push (__stack_t addr) {*stackptr++ = (__stack_t) addr;}
- __stack_t __reg1 pop ();
- __stack_t retaddr () {return stackptr[-1];}
+ void push (__tlsstack_t addr) {*stackptr++ = (__tlsstack_t) addr;}
+ __tlsstack_t __reg1 pop ();
+ __tlsstack_t retaddr () {return stackptr[-1];}
bool isinitialized () const
{
return initialized == CYGTLS_INITIALIZED;
@@ -243,7 +245,7 @@ public:
}
return signal_arrived;
}
- void set_signal_arrived (bool setit, HANDLE& h)
+ void wait_signal_arrived (bool setit, HANDLE& h)
{
if (!setit)
will_wait_for_signal = false;
@@ -253,66 +255,85 @@ public:
will_wait_for_signal = true;
}
}
+ void set_signal_arrived ()
+ {
+ SetEvent (get_signal_arrived (false));
+ }
void reset_signal_arrived ()
{
if (signal_arrived)
ResetEvent (signal_arrived);
+ }
+ void unwait_signal_arrived ()
+ {
will_wait_for_signal = false;
}
void handle_SIGCONT ();
private:
void __reg3 call2 (DWORD (*) (void *, void *), void *, void *);
+ void remove_pending_sigs ();
/*gentls_offsets*/
};
#pragma pack(pop)
-/* FIXME: Find some way to autogenerate this value */
-#ifdef __x86_64__
-const int CYGTLS_PADSIZE = 12800; /* Must be 16-byte aligned */
-#else
-const int CYGTLS_PADSIZE = 12700;
-#endif
+#include "cygtls_padsize.h"
/*gentls_offsets*/
#include "cygerrno.h"
#include "ntdll.h"
-#ifdef __x86_64__
-/* When just using a "gs:X" asm for the x86_64 code, gcc wrongly creates
- pc-relative instructions. However, NtCurrentTeb() is inline assembler
- anyway, so using it here should be fast enough on x86_64. */
-#define _tlsbase (NtCurrentTeb()->Tib.StackBase)
-#define _tlstop (NtCurrentTeb()->Tib.StackLimit)
-#else
-extern PVOID _tlsbase __asm__ ("%fs:4");
-extern PVOID _tlstop __asm__ ("%fs:8");
-#endif
-#define _my_tls (*((_cygtls *) ((char *)_tlsbase - CYGTLS_PADSIZE)))
+#define _my_tls (*((_cygtls *) ((PBYTE) NtCurrentTeb()->Tib.StackBase - CYGTLS_PADSIZE)))
extern _cygtls *_main_tls;
extern _cygtls *_sig_tls;
+#ifdef __x86_64__
+class san
+{
+ san *_clemente;
+ uint64_t _cnt;
+public:
+ DWORD64 ret;
+ DWORD64 frame;
+
+ san (PVOID _ret) __attribute__ ((always_inline))
+ {
+ _clemente = _my_tls.andreas;
+ _my_tls.andreas = this;
+ _cnt = _my_tls.locals.pathbufs._counters;
+ /* myfault_altstack_handler needs the current stack pointer and the
+ address of the _except block to restore the context correctly.
+ See comment preceeding myfault_altstack_handler in exception.cc. */
+ ret = (DWORD64) _ret;
+ __asm__ volatile ("movq %%rsp,%0": "=o" (frame));
+ }
+ ~san () __attribute__ ((always_inline))
+ {
+ _my_tls.andreas = _clemente;
+ }
+ /* This is the first thing called in the __except handler. The attribute
+ "returns_twice" makes sure that GCC disregards any register value set
+ earlier in the function, so this call serves as a register barrier. */
+ void leave () __attribute__ ((returns_twice));
+};
+#else
class san
{
san *_clemente;
jmp_buf _context;
- int _errno;
- int _c_cnt;
- int _w_cnt;
+ uint32_t _c_cnt;
+ uint32_t _w_cnt;
public:
- int setup (int myerrno = 0) __attribute__ ((always_inline))
+ int setup () __attribute__ ((always_inline))
{
_clemente = _my_tls.andreas;
_my_tls.andreas = this;
- _errno = myerrno;
_c_cnt = _my_tls.locals.pathbufs.c_cnt;
_w_cnt = _my_tls.locals.pathbufs.w_cnt;
return __sjfault (_context);
}
void leave () __attribute__ ((always_inline))
{
- if (_errno)
- set_errno (_errno);
/* Restore tls_pathbuf counters in case of error. */
_my_tls.locals.pathbufs.c_cnt = _c_cnt;
_my_tls.locals.pathbufs.w_cnt = _w_cnt;
@@ -331,26 +352,89 @@ public:
~myfault () __attribute__ ((always_inline)) { sebastian.reset (); }
inline int faulted () __attribute__ ((always_inline))
{
- return sebastian.setup (0);
+ return sebastian.setup ();
}
- inline int faulted (void const *obj, int myerrno = 0) __attribute__ ((always_inline))
- {
- return !obj || !(*(const char **) obj) || sebastian.setup (myerrno);
+};
+#endif
+
+/* Exception handling macros. These are required because SEH differs a lot
+ between 32 and 64 bit. Essentially, on 64 bit, we have to create compile
+ time SEH tables which define the handler and try/except labels, while on
+ 32 bit we can simply set up an SJLJ handler within the myfault class. */
+#define __mem_barrier __asm__ __volatile__ ("" ::: "memory")
+#ifdef __x86_64__
+#define __try \
+ { \
+ __label__ __l_try, __l_except, __l_endtry; \
+ __mem_barrier; \
+ san __sebastian (&&__l_except); \
+ __asm__ goto ("\n" \
+ " .seh_handler _ZN9exception7myfaultEP17_EXCEPTION_RECORDPvP8_CONTEXTP19_DISPATCHER_CONTEXT, @except \n" \
+ " .seh_handlerdata \n" \
+ " .long 1 \n" \
+ " .rva %l[__l_try],%l[__l_endtry],%l[__l_except],%l[__l_except] \n" \
+ " .seh_code \n" \
+ : : : : __l_try, __l_endtry, __l_except); \
+ { \
+ __l_try: \
+ __mem_barrier;
+
+#define __leave \
+ goto __l_endtry
+
+#define __except(__errno) \
+ goto __l_endtry; \
+ } \
+ { \
+ __l_except: \
+ __mem_barrier; \
+ __sebastian.leave (); \
+ if (__errno) \
+ set_errno (__errno);
+
+#define __endtry \
+ } \
+ __l_endtry: \
+ __mem_barrier; \
}
- inline int faulted (int myerrno) __attribute__ ((always_inline))
- {
- return sebastian.setup (myerrno);
+
+#else /* !__x86_64__ */
+#define __try \
+ { \
+ __label__ __l_endtry; \
+ myfault efault; \
+ if (!efault.faulted ()) \
+ {
+
+#define __leave \
+ goto __l_endtry
+
+#define __except(__errno) \
+ goto __l_endtry; \
+ } \
+ { \
+ if (__errno) \
+ set_errno (__errno);
+
+#define __endtry \
+ } \
+ __l_endtry: \
+ __mem_barrier; \
}
-};
+#endif /* __x86_64__ */
-class set_signal_arrived
+class wait_signal_arrived
{
public:
- set_signal_arrived (bool setit, HANDLE& h) { _my_tls.set_signal_arrived (setit, h); }
- set_signal_arrived (HANDLE& h) { _my_tls.set_signal_arrived (true, h); }
+ wait_signal_arrived (bool setit, HANDLE& h) { _my_tls.wait_signal_arrived (setit, h); }
+ wait_signal_arrived (HANDLE& h) { _my_tls.wait_signal_arrived (true, h); }
operator int () const {return _my_tls.will_wait_for_signal;}
- ~set_signal_arrived () { _my_tls.reset_signal_arrived (); }
+ /* Do not reset the signal_arrived event just because we leave the scope of
+ this wait_signal_arrived object. This may lead to all sorts of races.
+ The only method actually resetting the signal_arrived event is
+ _cygtls::call_signal_handler. */
+ ~wait_signal_arrived () { _my_tls.unwait_signal_arrived (); }
};
#define __getreent() (&_my_tls.local_clib)
diff --git a/winsup/cygwin/cygtls_padsize.h b/winsup/cygwin/cygtls_padsize.h
new file mode 100644
index 000000000..d3f024ad3
--- /dev/null
+++ b/winsup/cygwin/cygtls_padsize.h
@@ -0,0 +1,12 @@
+/* cygtls_padsize.h: Extra file to be included from utils.
+
+This software is a copyrighted work licensed under the terms of the
+Cygwin license. Please consult the file "CYGWIN_LICENSE" for
+details. */
+
+/* FIXME: Find some way to autogenerate this value */
+#ifdef __x86_64__
+const int CYGTLS_PADSIZE = 12800; /* Must be 16-byte aligned */
+#else
+const int CYGTLS_PADSIZE = 12700;
+#endif
diff --git a/winsup/cygwin/cygwait.cc b/winsup/cygwin/cygwait.cc
index b6bffa27f..e520843f0 100644
--- a/winsup/cygwin/cygwait.cc
+++ b/winsup/cygwin/cygwait.cc
@@ -1,7 +1,5 @@
/* cygwait.h
- Copyright 2011, 2012, 2013 Red Hat, Inc.
-
This file is part of Cygwin.
This software is a copyrighted work licensed under the terms of the
@@ -18,8 +16,10 @@
#define is_cw_sig (mask & cw_sig)
#define is_cw_sig_eintr (mask & cw_sig_eintr)
#define is_cw_sig_cont (mask & cw_sig_cont)
+#define is_cw_sig_restart (mask & cw_sig_restart)
-#define is_cw_sig_handle (mask & (cw_sig | cw_sig_eintr | cw_sig_cont))
+#define is_cw_sig_handle (mask & (cw_sig | cw_sig_eintr \
+ | cw_sig_cont | cw_sig_restart))
LARGE_INTEGER cw_nowait_storage;
@@ -38,7 +38,7 @@ cygwait (HANDLE object, PLARGE_INTEGER timeout, unsigned mask)
if (object)
wait_objects[num++] = object;
- set_signal_arrived thread_waiting (is_cw_sig_handle, wait_objects[num]);
+ wait_signal_arrived thread_waiting (is_cw_sig_handle, wait_objects[num]);
debug_only_printf ("object %p, thread waiting %d, signal_arrived %p", object, (int) thread_waiting, _my_tls.signal_arrived);
DWORD sig_n;
if (!thread_waiting)
@@ -87,9 +87,10 @@ cygwait (HANDLE object, PLARGE_INTEGER timeout, unsigned mask)
if (!sig)
continue;
if (is_cw_sig_eintr || (is_cw_sig_cont && sig == SIGCONT))
- res = WAIT_SIGNALED; /* caller will deal with signals */
- else if (_my_tls.call_signal_handler ())
+ ;
+ else if (_my_tls.call_signal_handler () || is_cw_sig_restart)
continue;
+ res = WAIT_SIGNALED; /* caller will deal with signals */
}
break;
}
diff --git a/winsup/cygwin/cygwait.h b/winsup/cygwin/cygwait.h
index 496817bcf..b4270a9fa 100644
--- a/winsup/cygwin/cygwait.h
+++ b/winsup/cygwin/cygwait.h
@@ -1,8 +1,5 @@
/* cygwait.h
- Copyright 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013
- Red Hat, Inc.
-
This file is part of Cygwin.
This software is a copyrighted work licensed under the terms of the
@@ -16,11 +13,12 @@
enum cw_wait_mask
{
- cw_cancel = 0x0001,
- cw_cancel_self = 0x0002,
- cw_sig = 0x0004,
- cw_sig_eintr = 0x0008,
- cw_sig_cont = 0x0010
+ cw_cancel = 0x0001, /* Cancellation point. Return to caller. */
+ cw_cancel_self = 0x0002, /* Cancellation point. Cancel self. */
+ cw_sig = 0x0004, /* Handle signals. */
+ cw_sig_eintr = 0x0008, /* Caller handles signals. */
+ cw_sig_cont = 0x0010, /* Caller handles SIGCONT. */
+ cw_sig_restart = 0x0020 /* Restart even if SA_RESTART isn't set. */
};
extern LARGE_INTEGER cw_nowait_storage;
diff --git a/winsup/cygwin/cygwin-cxx.h b/winsup/cygwin/cygwin-cxx.h
index b0eb8c25c..ccfaa26a0 100755..100644
--- a/winsup/cygwin/cygwin-cxx.h
+++ b/winsup/cygwin/cygwin-cxx.h
@@ -1,7 +1,5 @@
/* cygwin-cxx.h
- Copyright 2009 Red Hat, Inc.
-
This file is part of Cygwin.
This software is a copyrighted work licensed under the terms of the
diff --git a/winsup/cygwin/cygwin.ldif b/winsup/cygwin/cygwin.ldif
new file mode 100644
index 000000000..166a58123
--- /dev/null
+++ b/winsup/cygwin/cygwin.ldif
@@ -0,0 +1,253 @@
+# =========================================================================
+#
+# Schema Extension for Cygwin User and Group auxiliary classes
+#
+# Extend your Active Directory using
+#
+# ldifde -i -f <path>\<this>.ldif -b <username> <domain> <password> \
+# -k -c "CN=schema,CN=Configuration,DC=X" #schemaNamingContext
+#
+# Remember:
+# - you have to be schema admin for your active directory
+# - you have to run the above command directly from your schema master
+#
+# For further information read
+# http://technet.microsoft.com/en-us/magazine/2008.05.schema.aspx
+#
+# ----------------------------------------------------------------------
+#
+# Explanation for the OIDs:
+#
+# Value Meaning Description
+# 1 ISO Identifies the root authority.
+# 3 IANA Group designation assigned by ISO.
+# 6.1.4.1.2312 Red Hat Organization assigned by IANA.
+# 15 Cygwin Assigned by Organization.
+# Y Object Type Number defining the different object type
+# (category) such as classSchema or
+# attributeSchema. For example, 5 defines
+# object class.
+# Z Object Number identifying a particular object
+# within the category. For example, the user
+# class has the number 9 assigned to it.
+#
+# ----------------------------------------------------------------------
+
+# Attribute definition for cygwinHome
+
+dn: CN=cygwin-Home,CN=Schema,CN=Configuration,DC=X
+changetype: ntdsschemaadd
+objectClass: top
+objectClass: attributeSchema
+cn: cygwin-Home
+attributeID: 1.3.6.1.4.1.2312.15.2.1
+# attributeSyntax 2.5.5.12 is String(Unicode) with oMSyntax == 64
+# see http://technet.microsoft.com/en-us/library/cc961740.aspx
+attributeSyntax: 2.5.5.12
+isSingleValued: TRUE
+adminDisplayName: cygwin-Home
+adminDescription: cygwin-Home
+oMSyntax: 64
+searchFlags: 1
+lDAPDisplayName: cygwinHome
+systemOnly: FALSE
+
+dn:
+changetype: modify
+add: schemaUpdateNow
+schemaUpdateNow: 1
+-
+
+# Attribute definition for cygwinShell
+
+dn: CN=cygwin-Shell,CN=Schema,CN=Configuration,DC=X
+changetype: ntdsschemaadd
+objectClass: top
+objectClass: attributeSchema
+cn: cygwin-Shell
+attributeID: 1.3.6.1.4.1.2312.15.2.2
+attributeSyntax: 2.5.5.12
+isSingleValued: TRUE
+adminDisplayName: cygwin-Shell
+adminDescription: cygwin-Shell
+oMSyntax: 64
+searchFlags: 1
+lDAPDisplayName: cygwinShell
+systemOnly: FALSE
+
+dn:
+changetype: modify
+add: schemaUpdateNow
+schemaUpdateNow: 1
+-
+
+# Attribute definition for cygwinGecos
+
+dn: CN=cygwin-Gecos,CN=Schema,CN=Configuration,DC=X
+changetype: ntdsschemaadd
+objectClass: top
+objectClass: attributeSchema
+cn: cygwin-Gecos
+attributeID: 1.3.6.1.4.1.2312.15.2.3
+attributeSyntax: 2.5.5.12
+isSingleValued: TRUE
+adminDisplayName: cygwin-Gecos
+adminDescription: cygwin-Gecos
+oMSyntax: 64
+searchFlags: 1
+lDAPDisplayName: cygwinGecos
+systemOnly: FALSE
+
+dn:
+changetype: modify
+add: schemaUpdateNow
+schemaUpdateNow: 1
+-
+
+# Attribute definition for cygwinFstab
+
+dn: CN=cygwin-Fstab,CN=Schema,CN=Configuration,DC=X
+changetype: ntdsschemaadd
+objectClass: top
+objectClass: attributeSchema
+cn: cygwin-Fstab
+attributeID: 1.3.6.1.4.1.2312.15.2.4
+attributeSyntax: 2.5.5.12
+isSingleValued: FALSE
+adminDisplayName: cygwin-Fstab
+adminDescription: cygwin-Fstab
+oMSyntax: 64
+searchFlags: 1
+lDAPDisplayName: cygwinFstab
+systemOnly: FALSE
+
+dn:
+changetype: modify
+add: schemaUpdateNow
+schemaUpdateNow: 1
+-
+
+# Attribute definition for cygwinUnixUid
+
+dn: CN=cygwin-UnixUid,CN=Schema,CN=Configuration,DC=X
+changetype: ntdsschemaadd
+objectClass: top
+objectClass: attributeSchema
+cn: cygwin-UnixUid
+attributeID: 1.3.6.1.4.1.2312.15.2.5
+# attributeSyntax 2.5.5.9 is Integer with oMSyntax == 2
+attributeSyntax: 2.5.5.9
+isSingleValued: TRUE
+adminDisplayName: cygwin-UnixUid
+adminDescription: cygwin-UnixUid
+oMSyntax: 2
+searchFlags: 1
+lDAPDisplayName: cygwinUnixUid
+systemOnly: FALSE
+
+dn:
+changetype: modify
+add: schemaUpdateNow
+schemaUpdateNow: 1
+-
+
+# Attribute definition for cygwinUnixGid
+
+dn: CN=cygwin-UnixGid,CN=Schema,CN=Configuration,DC=X
+changetype: ntdsschemaadd
+objectClass: top
+objectClass: attributeSchema
+cn: cygwin-UnixGid
+attributeID: 1.3.6.1.4.1.2312.15.2.6
+attributeSyntax: 2.5.5.9
+isSingleValued: TRUE
+adminDisplayName: cygwin-UnixGid
+adminDescription: cygwin-UnixGid
+oMSyntax: 2
+searchFlags: 1
+lDAPDisplayName: cygwinUnixGid
+systemOnly: FALSE
+
+dn:
+changetype: modify
+add: schemaUpdateNow
+schemaUpdateNow: 1
+-
+
+# cygwin-User auxiliary class
+
+dn: CN=cygwin-User,CN=Schema,CN=Configuration,DC=X
+changetype: ntdsschemaadd
+objectClass: top
+objectClass: classSchema
+cn: cygwin-User
+governsID: 1.3.6.1.4.1.2312.15.1.1
+mayContain: cygwinHome
+mayContain: cygwinShell
+mayContain: cygwinGecos
+mayContain: cygwinFstab
+mayContain: cygwinUnixUid
+rDNAttID: cn
+adminDisplayName: cygwin-User
+adminDescription: cygwin-User
+objectClassCategory: 3
+lDAPDisplayName: cygwinUser
+name: cygwin-User
+systemOnly: FALSE
+
+dn:
+changetype: modify
+add: schemaUpdateNow
+schemaUpdateNow: 1
+-
+
+# cygwin-Group auxiliary class
+
+dn: CN=cygwin-Group,CN=Schema,CN=Configuration,DC=X
+changetype: ntdsschemaadd
+objectClass: top
+objectClass: classSchema
+cn: cygwin-Group
+governsID: 1.3.6.1.4.1.2312.15.1.2
+mayContain: cygwinUnixGid
+rDNAttID: cn
+adminDisplayName: cygwin-Group
+adminDescription: cygwin-Group
+objectClassCategory: 3
+lDAPDisplayName: cygwinGroup
+name: cygwin-Group
+systemOnly: FALSE
+
+dn:
+changetype: modify
+add: schemaUpdateNow
+schemaUpdateNow: 1
+-
+
+# Attach cygwin-User to User
+
+dn: CN=User,CN=Schema,CN=Configuration,DC=X
+changetype: ntdsschemamodify
+add: auxiliaryClass
+auxiliaryClass: cygwinUser
+-
+
+dn:
+changetype: modify
+add: schemaUpdateNow
+schemaUpdateNow: 1
+-
+
+# Attach cygwin-Group to Group
+
+dn: CN=Group,CN=Schema,CN=Configuration,DC=X
+changetype: ntdsschemamodify
+add: auxiliaryClass
+auxiliaryClass: cygwinGroup
+-
+
+dn:
+changetype: modify
+add: schemaUpdateNow
+schemaUpdateNow: 1
+-
diff --git a/winsup/cygwin/cygwin.sc.in b/winsup/cygwin/cygwin.sc.in
index db64a80e4..134ae3f76 100644
--- a/winsup/cygwin/cygwin.sc.in
+++ b/winsup/cygwin/cygwin.sc.in
@@ -59,8 +59,12 @@ SECTIONS
{
*(.rdata)
*(SORT(.rdata$*))
- *(.eh_frame)
*(.rdata_cygwin_nocopy)
+ ___RUNTIME_PSEUDO_RELOC_LIST__ = .;
+ __RUNTIME_PSEUDO_RELOC_LIST__ = .;
+ *(.rdata_runtime_pseudo_reloc)
+ ___RUNTIME_PSEUDO_RELOC_LIST_END__ = .;
+ __RUNTIME_PSEUDO_RELOC_LIST_END__ = .;
}
.eh_frame ALIGN(__section_alignment__) :
{
@@ -87,11 +91,6 @@ SECTIONS
{
*(.edata)
}
- .rsrc BLOCK(__section_alignment__) :
- {
- *(.rsrc)
- *(SORT(.rsrc$*))
- }
.reloc BLOCK(__section_alignment__) :
{
*(.reloc)
@@ -100,6 +99,20 @@ SECTIONS
{
*(.cygwin_dll_common)
}
+ .idata ALIGN(__section_alignment__) :
+ {
+ /* This cannot currently be handled with grouped sections.
+ See pe.em:sort_sections. */
+ SORT(*)(.idata$2)
+ SORT(*)(.idata$3)
+ /* These zeroes mark the end of the import list. */
+ LONG (0); LONG (0); LONG (0); LONG (0); LONG (0);
+ SORT(*)(.idata$4)
+ SORT(*)(.idata$5)
+ SORT(*)(.idata$6)
+ SORT(*)(.idata$7)
+ . = ALIGN(16);
+ }
.gnu_debuglink_overlay ALIGN(__section_alignment__) (NOLOAD):
{
BYTE(0) /* c */
@@ -116,20 +129,11 @@ SECTIONS
BYTE(0) /* \0 */
LONG(0) /* checksum */
}
- .idata ALIGN(__section_alignment__) :
+ .rsrc BLOCK(__section_alignment__) :
{
- /* This cannot currently be handled with grouped sections.
- See pe.em:sort_sections. */
- SORT(*)(.idata$2)
- SORT(*)(.idata$3)
- /* These zeroes mark the end of the import list. */
- LONG (0); LONG (0); LONG (0); LONG (0); LONG (0);
- SORT(*)(.idata$4)
- SORT(*)(.idata$5)
- SORT(*)(.idata$6)
- SORT(*)(.idata$7)
- . = ALIGN(16);
- _SYM (_cygheap_start) = ABSOLUTE(.);
+ *(.rsrc)
+ *(SORT(.rsrc$*))
+ _SYM (_cygheap_start) = .;
}
.cygheap ALIGN(__section_alignment__) :
{
@@ -139,7 +143,7 @@ SECTIONS
. = . + (2048 * 1024);
#endif
. = ALIGN(0x10000);
- _SYM (_cygheap_end) = ABSOLUTE(.);
+ _SYM (_cygheap_end) = .;
}
/DISCARD/ :
{
diff --git a/winsup/cygwin/cygwin_version.h b/winsup/cygwin/cygwin_version.h
index 18bdf2416..8e2c4022a 100644
--- a/winsup/cygwin/cygwin_version.h
+++ b/winsup/cygwin/cygwin_version.h
@@ -1,7 +1,5 @@
/* cygwin_version.h: shared info for cygwin
- Copyright 2000, 2001 Red Hat, Inc.
-
This file is part of Cygwin.
This software is a copyrighted work licensed under the terms of the
diff --git a/winsup/cygwin/cygxdr.cc b/winsup/cygwin/cygxdr.cc
index 8686c17ae..d75c59987 100644
--- a/winsup/cygwin/cygxdr.cc
+++ b/winsup/cygwin/cygxdr.cc
@@ -1,7 +1,5 @@
/* cygxdr.cc:
- Copyright 2010, 2011 Red Hat, Inc.
-
This file is part of Cygwin.
This software is a copyrighted work licensed under the terms of the
diff --git a/winsup/cygwin/cygxdr.h b/winsup/cygwin/cygxdr.h
index a2dac36db..d44fd6e6a 100644
--- a/winsup/cygwin/cygxdr.h
+++ b/winsup/cygwin/cygxdr.h
@@ -1,7 +1,5 @@
/* cygxdr.h:
- Copyright 2010, 2011 Red Hat, Inc.
-
This file is part of Cygwin.
This software is a copyrighted work licensed under the terms of the
diff --git a/winsup/cygwin/dcrt0.cc b/winsup/cygwin/dcrt0.cc
index d348d9bd5..fda4b58b8 100644
--- a/winsup/cygwin/dcrt0.cc
+++ b/winsup/cygwin/dcrt0.cc
@@ -1,8 +1,5 @@
/* dcrt0.cc -- essentially the main() for the Cygwin dll
- Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008, 2009, 2010, 2011, 2012, 2013 Red Hat, Inc.
-
This file is part of Cygwin.
This software is a copyrighted work licensed under the terms of the
@@ -16,6 +13,7 @@ details. */
#include "glob.h"
#include <ctype.h>
#include <locale.h>
+#include <sys/param.h>
#include "environ.h"
#include "sigproc.h"
#include "pinfo.h"
@@ -115,6 +113,7 @@ insert_file (char *name, char *&cmd)
size = GetFileSize (f, NULL);
if (size == 0xFFFFFFFF)
{
+ CloseHandle (f);
debug_printf ("couldn't get file size for '%s', %E", name);
return false;
}
@@ -123,6 +122,7 @@ insert_file (char *name, char *&cmd)
char *tmp = (char *) malloc (new_size);
if (!tmp)
{
+ CloseHandle (f);
debug_printf ("malloc failed, %E");
return false;
}
@@ -134,6 +134,7 @@ insert_file (char *name, char *&cmd)
CloseHandle (f);
if (!rf_result || (rf_read != size))
{
+ free (tmp);
debug_printf ("ReadFile failed, %E");
return false;
}
@@ -390,106 +391,103 @@ check_sanity_and_sync (per_process *p)
api_fatal ("cygwin DLL and APP are out of sync -- API version mismatch %u > %u",
p->api_major, cygwin_version.api_major);
+#ifndef __x86_64__
/* This is a kludge to work around a version of _cygwin_common_crt0
which overwrote the cxx_malloc field with the local DLL copy.
Hilarity ensues if the DLL is not loaded while the process
is forking. */
__cygwin_user_data.cxx_malloc = &default_cygwin_cxx_malloc;
+#endif
}
child_info NO_COPY *child_proc_info;
-#define CYGWIN_GUARD (PAGE_READWRITE | PAGE_GUARD)
-
-void
-child_info_fork::alloc_stack_hard_way (volatile char *b)
-{
- void *stack_ptr;
- SIZE_T stacksize;
-
- /* First check if the requested stack area is part of the user heap
- or part of a mmapped region. If so, we have been started from a
- pthread with an application-provided stack, and the stack has just
- to be used as is. */
- if ((stacktop >= cygheap->user_heap.base
- && stackbottom <= cygheap->user_heap.max)
- || is_mmapped_region ((caddr_t) stacktop, (caddr_t) stackbottom))
- return;
- /* First, try to reserve the entire stack. */
- stacksize = (SIZE_T) stackbottom - (SIZE_T) stackaddr;
- if (!VirtualAlloc (stackaddr, stacksize, MEM_RESERVE, PAGE_NOACCESS))
- {
- PTEB teb = NtCurrentTeb ();
- api_fatal ("fork: can't reserve memory for parent stack "
- "%p - %p, (child has %p - %p), %E",
- stackaddr, stackbottom, teb->DeallocationStack, _tlsbase);
- }
- stacksize = (SIZE_T) stackbottom - (SIZE_T) stacktop;
- stack_ptr = VirtualAlloc (stacktop, stacksize, MEM_COMMIT, PAGE_READWRITE);
- if (!stack_ptr)
- abort ("can't commit memory for stack %p(%ly), %E", stacktop, stacksize);
- if (guardsize != (size_t) -1)
- {
- /* Allocate PAGE_GUARD page if it still fits. */
- if (stack_ptr > stackaddr)
- {
- stack_ptr = (void *) ((LPBYTE) stack_ptr
- - wincap.page_size ());
- if (!VirtualAlloc (stack_ptr, wincap.page_size (), MEM_COMMIT,
- CYGWIN_GUARD))
- api_fatal ("fork: couldn't allocate new stack guard page %p, %E",
- stack_ptr);
- }
- /* Allocate POSIX guard pages. */
- if (guardsize > 0)
- VirtualAlloc (stackaddr, guardsize, MEM_COMMIT, PAGE_NOACCESS);
- }
- b[0] = '\0';
-}
-
-void *getstack (void *) __attribute__ ((noinline));
-volatile char *
-getstack (volatile char * volatile p)
-{
- *p ^= 1;
- *p ^= 1;
- return p - 4096;
-}
-
-/* extend the stack prior to fork longjmp */
-
+/* Extend the stack prior to fork longjmp. */
void
child_info_fork::alloc_stack ()
{
- volatile char * volatile stackp;
-#ifdef __x86_64__
- __asm__ volatile ("movq %%rsp,%0": "=r" (stackp));
-#else
- __asm__ volatile ("movl %%esp,%0": "=r" (stackp));
-#endif
/* Make sure not to try a hard allocation if we have been forked off from
the main thread of a Cygwin process which has been started from a 64 bit
- parent. In that case the _tlsbase of the forked child is not the same
- as the _tlsbase of the parent (== stackbottom), but only because the
+ parent. In that case the StackBase of the forked child is not the same
+ as the StackBase of the parent (== this.stackbase), but only because the
stack of the parent has been slightly rearranged. See comment in
wow64_revert_to_original_stack for details. We check here if the
parent stack fits into the child stack. */
- if (_tlsbase != stackbottom
+ PTEB teb = NtCurrentTeb ();
+ if (teb->Tib.StackBase != stackbase
&& (!wincap.is_wow64 ()
- || stacktop < (char *) NtCurrentTeb ()->DeallocationStack
- || stackbottom > _tlsbase))
- alloc_stack_hard_way (stackp);
+ || stacklimit < teb->DeallocationStack
+ || stackbase > teb->Tib.StackBase))
+ {
+ void *stack_ptr;
+ size_t stacksize;
+
+ /* If guardsize is -1, we have been started from a pthread with an
+ application-provided stack, and the stack has just to be used as is. */
+ if (guardsize == (size_t) -1)
+ return;
+ /* Reserve entire stack. */
+ stacksize = (PBYTE) stackbase - (PBYTE) stackaddr;
+ if (!VirtualAlloc (stackaddr, stacksize, MEM_RESERVE, PAGE_NOACCESS))
+ {
+ api_fatal ("fork: can't reserve memory for parent stack "
+ "%p - %p, (child has %p - %p), %E",
+ stackaddr, stackbase, teb->DeallocationStack,
+ teb->Tib.StackBase);
+ }
+ /* Commit the area commited in parent. */
+ stacksize = (PBYTE) stackbase - (PBYTE) stacklimit;
+ stack_ptr = VirtualAlloc (stacklimit, stacksize, MEM_COMMIT,
+ PAGE_READWRITE);
+ if (!stack_ptr)
+ api_fatal ("can't commit memory for stack %p(%ly), %E",
+ stacklimit, stacksize);
+ /* Set up guardpages. */
+ ULONG real_guardsize = guardsize
+ ? roundup2 (guardsize, wincap.page_size ())
+ : wincap.def_guard_page_size ();
+ if (stack_ptr > stackaddr)
+ {
+ stack_ptr = (void *) ((PBYTE) stack_ptr - real_guardsize);
+ if (!VirtualAlloc (stack_ptr, real_guardsize, MEM_COMMIT,
+ PAGE_READWRITE | PAGE_GUARD))
+ api_fatal ("fork: couldn't allocate new stack guard page %p, %E",
+ stack_ptr);
+ }
+ /* On post-XP systems, set thread stack guarantee matching the
+ guardsize. Note that the guardsize is one page bigger than
+ the guarantee. */
+ if (wincap.has_set_thread_stack_guarantee ()
+ && real_guardsize > wincap.def_guard_page_size ())
+ {
+ real_guardsize -= wincap.page_size ();
+ SetThreadStackGuarantee (&real_guardsize);
+ }
+ }
else
{
- char *st = (char *) stacktop;
- while (_tlstop > st)
- stackp = getstack (stackp);
- stackaddr = 0;
+ /* Fork has been called from main thread. Simply commit the region
+ of the stack commited in the parent but not yet commited in the
+ child and create new guardpages. */
+ if (NtCurrentTeb ()->Tib.StackLimit > stacklimit)
+ {
+ SIZE_T commitsize = (PBYTE) NtCurrentTeb ()->Tib.StackLimit
+ - (PBYTE) stacklimit;
+ if (!VirtualAlloc (stacklimit, commitsize, MEM_COMMIT, PAGE_READWRITE))
+ api_fatal ("can't commit child memory for stack %p(%ly), %E",
+ stacklimit, commitsize);
+ PVOID guardpage = (PBYTE) stacklimit - wincap.def_guard_page_size ();
+ if (!VirtualAlloc (guardpage, wincap.def_guard_page_size (),
+ MEM_COMMIT, PAGE_READWRITE | PAGE_GUARD))
+ api_fatal ("fork: couldn't allocate new stack guard page %p, %E",
+ guardpage);
+ NtCurrentTeb ()->Tib.StackLimit = stacklimit;
+ }
/* This only affects forked children of a process started from a native
64 bit process, but it doesn't hurt to do it unconditionally. Fix
StackBase in the child to be the same as in the parent, so that the
computation of _my_tls is correct. */
- _tlsbase = (PVOID) stackbottom;
+ teb->Tib.StackBase = (PVOID) stackbase;
}
}
@@ -509,20 +507,25 @@ initial_env ()
_cygwin_testing = 1;
#ifdef DEBUGGING
- char buf[NT_MAX_PATH];
+ char buf[PATH_MAX];
if (GetEnvironmentVariableA ("CYGWIN_DEBUG", buf, sizeof (buf) - 1))
{
- char buf1[NT_MAX_PATH];
- GetModuleFileName (NULL, buf1, NT_MAX_PATH);
- strlwr (buf1);
- strlwr (buf);
+ char buf1[PATH_MAX];
+ GetModuleFileName (NULL, buf1, PATH_MAX);
char *p = strpbrk (buf, ":=");
if (!p)
p = (char *) "gdb.exe -nw";
else
*p++ = '\0';
- if (strstr (buf1, buf))
+ if (strcasestr (buf1, buf))
{
+ extern PWCHAR debugger_command;
+
+ debugger_command = (PWCHAR) HeapAlloc (GetProcessHeap (), 0,
+ (2 * NT_MAX_PATH + 20)
+ * sizeof (WCHAR));
+ if (!debugger_command)
+ return;
error_start_init (p);
jit_debug = true;
try_to_debug ();
@@ -606,7 +609,7 @@ void
child_info_fork::handle_fork ()
{
cygheap_fixup_in_child (false);
- memory_init (false);
+ memory_init ();
myself.thisproc (NULL);
myself->uid = cygheap->user.real_uid;
myself->gid = cygheap->user.real_gid;
@@ -655,12 +658,12 @@ child_info_spawn::get_parent_handle ()
void
child_info_spawn::handle_spawn ()
{
- extern void fixup_lockf_after_exec ();
+ extern void fixup_lockf_after_exec (bool);
HANDLE h;
if (!dynamically_loaded || get_parent_handle ())
{
cygheap_fixup_in_child (true);
- memory_init (false);
+ memory_init ();
}
if (!moreinfo->myself_pinfo ||
!DuplicateHandle (GetCurrentProcess (), moreinfo->myself_pinfo,
@@ -706,7 +709,7 @@ child_info_spawn::handle_spawn ()
}
signal_fixup_after_exec ();
- fixup_lockf_after_exec ();
+ fixup_lockf_after_exec (type == _CH_EXEC);
}
/* Retrieve and store system directory for later use. Note that the
@@ -738,6 +741,7 @@ void
dll_crt0_0 ()
{
wincap.init ();
+ GetModuleFileNameW (NULL, global_progname, NT_MAX_PATH);
child_proc_info = get_cygwin_startup_info ();
init_windows_system_directory ();
initial_env ();
@@ -766,7 +770,8 @@ dll_crt0_0 ()
if (!child_proc_info)
{
- memory_init (true);
+ setup_cygheap ();
+ memory_init ();
#ifndef __x86_64__
/* WOW64 process on XP/64 or Server 2003/64? Check if we have been
started from 64 bit process and if our stack is at an unusual
@@ -801,6 +806,11 @@ dll_crt0_0 ()
if (!dynamically_loaded)
sigproc_init ();
+#ifdef __x86_64__
+ /* See comment preceeding myfault_altstack_handler in exception.cc. */
+ AddVectoredContinueHandler (0, myfault_altstack_handler);
+#endif
+
debug_printf ("finished dll_crt0_0 initialization");
}
@@ -889,26 +899,21 @@ dll_crt0_1 (void *)
Need to do this before any helper threads start. */
debug_init ();
-#ifdef NEWVFORK
- cygheap->fdtab.vfork_child_fixup ();
- main_vfork = vfork_storage.create ();
-#endif
-
cygbench ("pre-forkee");
if (in_forkee)
{
- /* If we've played with the stack, stacksize != 0. That means that
- fork() was invoked from other than the main thread. Make sure that
- frame pointer is referencing the new stack so that the OS knows what
- to do when it needs to increase the size of the stack.
+ /* Make sure to restore the TEB's stack info. If guardsize is -1 the
+ stack has been provided by the application and must not be deallocated
+ automagically when the thread exits.
NOTE: Don't do anything that involves the stack until you've completed
this step. */
- if (fork_info->stackaddr)
- {
- _tlsbase = (PVOID) fork_info->stackbottom;
- _tlstop = (PVOID) fork_info->stacktop;
- }
+ PTEB teb = NtCurrentTeb ();
+ teb->Tib.StackBase = (PVOID) fork_info->stackbase;
+ teb->Tib.StackLimit = (PVOID) fork_info->stacklimit;
+ teb->DeallocationStack = (fork_info->guardsize == (size_t) -1)
+ ? NULL
+ : (PVOID) fork_info->stackaddr;
/* Not resetting _my_tls.incyg here because presumably fork will overwrite
it with the value of the forker and all will be good. */
@@ -929,20 +934,20 @@ dll_crt0_1 (void *)
/* Allocate cygheap->fdtab */
dtable_init ();
+ /* Set internal locale to the environment settings. */
+ initial_setlocale ();
+
uinfo_init (); /* initialize user info */
/* Connect to tty. */
tty::init_session ();
- /* Set internal locale to the environment settings. */
- initial_setlocale ();
-
if (!__argc)
{
PWCHAR wline = GetCommandLineW ();
- size_t size = sys_wcstombs (NULL, 0, wline);
+ size_t size = sys_wcstombs_no_path (NULL, 0, wline) + 1;
char *line = (char *) alloca (size);
- sys_wcstombs (line, size, wline);
+ sys_wcstombs_no_path (line, size, wline);
/* Scan the command line and build argv. Expand wildcards if not
called from another cygwin process. */
@@ -1003,7 +1008,6 @@ dll_crt0_1 (void *)
/* Disable case-insensitive globbing */
ignore_case_with_glob = false;
- MALLOC_CHECK;
cygbench (__progname);
ld_preload ();
@@ -1049,7 +1053,44 @@ __cygwin_exit_return: \n\
extern "C" void __stdcall
_dll_crt0 ()
{
-#ifndef __x86_64__
+#ifdef __x86_64__
+ /* Starting with Windows 10 rel 1511, the main stack of an application is
+ not reproducible if a 64 bit process has been started from a 32 bit
+ process. Given that we have enough virtual address space on 64 bit
+ anyway, we now always move the main thread stack to the stack area
+ reserved for pthread stacks. This allows a reproducible stack space
+ under our own control and avoids collision with the OS. */
+ if (!dynamically_loaded)
+ {
+ if (!in_forkee || fork_info->from_main)
+ {
+ /* Must be static since it's referenced after the stack and frame
+ pointer registers have been changed. */
+ static PVOID allocationbase;
+ SIZE_T commitsize = in_forkee ? (PBYTE) fork_info->stackbase
+ - (PBYTE) fork_info->stacklimit
+ : 0;
+ PVOID stackaddr = create_new_main_thread_stack (allocationbase,
+ commitsize);
+ if (stackaddr)
+ {
+ /* Set stack pointer to new address. Set frame pointer to
+ stack pointer and subtract 32 bytes for shadow space. */
+ __asm__ ("\n\
+ movq %[ADDR], %%rsp \n\
+ movq %%rsp, %%rbp \n\
+ subq $32,%%rsp \n"
+ : : [ADDR] "r" (stackaddr));
+ /* We're on the new stack now. Free up space taken by the former
+ main thread stack and set DeallocationStack correctly. */
+ VirtualFree (NtCurrentTeb ()->DeallocationStack, 0, MEM_RELEASE);
+ NtCurrentTeb ()->DeallocationStack = allocationbase;
+ }
+ }
+ else
+ fork_info->alloc_stack ();
+ }
+#else
/* Handle WOW64 process on XP/2K3 which has been started from native 64 bit
process. See comment in wow64_test_for_64bit_parent for a full problem
description. */
@@ -1057,40 +1098,32 @@ _dll_crt0 ()
{
/* Must be static since it's referenced after the stack and frame
pointer registers have been changed. */
- static PVOID allocationbase = 0;
+ static PVOID allocationbase;
- /* Check if we just move the stack. If so, wow64_revert_to_original_stack
- returns a non-NULL, 16 byte aligned address. See comments in
- wow64_revert_to_original_stack for the gory details. */
PVOID stackaddr = wow64_revert_to_original_stack (allocationbase);
if (stackaddr)
{
- /* 2nd half of the stack move. Set stack pointer to new address.
- Set frame pointer to 0. */
+ /* Set stack pointer to new address. Set frame pointer to 0. */
__asm__ ("\n\
movl %[ADDR], %%esp \n\
xorl %%ebp, %%ebp \n"
: : [ADDR] "r" (stackaddr));
- /* Now we're back on the original stack. Free up space taken by the
+ /* We're back on the original stack now. Free up space taken by the
former main thread stack and set DeallocationStack correctly. */
VirtualFree (NtCurrentTeb ()->DeallocationStack, 0, MEM_RELEASE);
NtCurrentTeb ()->DeallocationStack = allocationbase;
}
else
- /* Fall back to respawn if wow64_revert_to_original_stack fails. */
+ /* Fall back to respawning if creating a new stack fails. */
wow64_respawn_process ();
}
-#endif /* !__x86_64__ */
- _feinitialise ();
-#ifndef __x86_64__
main_environ = user_data->envptr;
-#endif
if (in_forkee)
- {
- fork_info->alloc_stack ();
- _main_tls = &_my_tls;
- }
+ fork_info->alloc_stack ();
+#endif
+ _feinitialise ();
+ _main_tls = &_my_tls;
_main_tls->call ((DWORD (*) (void *, void *)) dll_crt0_1, NULL);
}
@@ -1155,15 +1188,6 @@ do_exit (int status)
{
syscall_printf ("do_exit (%d), exit_state %d", status, exit_state);
-#ifdef NEWVFORK
- vfork_save *vf = vfork_storage.val ();
- if (vf != NULL && vf->pid < 0)
- {
- exit_state = ES_NOT_EXITING;
- vf->restore_exit (status);
- }
-#endif
-
lock_process until_exit (true);
if (exit_state < ES_EVENTS_TERMINATE)
@@ -1228,12 +1252,63 @@ do_exit (int status)
myself.exit (n);
}
+/* When introducing support for -fuse-cxa-atexit with Cygwin 1.7.32 and
+ GCC 4.8.3-3, we defined __dso_value as &ImageBase. This supposedly allowed
+ a reproducible value which could also be easily evaluated in cygwin_atexit.
+ However, when building C++ applications with -fuse-cxa-atexit, G++ creates
+ calls to __cxa_atexit using the *address* of __dso_handle as DSO handle.
+
+ So what we do here is this: A call to __cxa_atexit from the application
+ actually calls cygwin__cxa_atexit. From dso_handle (which is either
+ &__dso_handle, or __dso_handle == ImageBase or NULL) we fetch the dll
+ structure of the DLL. Then use dll::handle == ImageBase as the actual DSO
+ handle value in calls to __cxa_atexit and __cxa_finalize.
+ Thus, __cxa_atexit becomes entirely independent of the incoming value of
+ dso_handle, as long as it's *some* pointer into the DSO's address space. */
+extern "C" int
+cygwin__cxa_atexit (void (*fn)(void *), void *obj, void *dso_handle)
+{
+ dll *d = dso_handle ? dlls.find (dso_handle) : NULL;
+ return __cxa_atexit (fn, obj, d ? d->handle : NULL);
+}
+
+/* This function is only called for applications built with Cygwin versions
+ up to API 0.279. Starting with API 0.280 (Cygwin 1.7.33/1.8.6-2), atexit
+ is a statically linked function inside of libcygwin.a. The reason is that
+ the old method to fetch the caller return address is unreliable given GCCs
+ ability to perform tail call elimination. For the details, see the below
+ comment. The atexit replacement is defined in libcygwin.a to allow reliable
+ access to the correct DSO handle. */
extern "C" int
cygwin_atexit (void (*fn) (void))
{
int res;
+
dll *d = dlls.find ((void *) _my_tls.retaddr ());
- res = d ? __cxa_atexit ((void (*) (void *)) fn, NULL, d) : atexit (fn);
+#ifdef __x86_64__
+ /* x86_64 DLLs created with GCC 4.8.3-3 register __gcc_deregister_frame
+ as atexit function using a call to atexit, rather than __cxa_atexit.
+ Due to GCC's tail call optimizing, cygwin_atexit doesn't get the correct
+ return address on the stack. As a result it fails to get the HMODULE of
+ the caller and thus calls atexit rather than __cxa_atexit. Then, if the
+ module gets dlclosed, __cxa_finalize (called from dll_list::detach) can't
+ remove __gcc_deregister_frame from the atexit function chain. So at
+ process exit, __call_exitprocs calls __gcc_deregister_frame while the
+ module is already unloaded and the __gcc_deregister_frame function not
+ available ==> SEGV.
+
+ This also occurs for other functions.
+
+ Workaround: If dlls.find fails, try to find the dll entry of the DLL
+ containing fn. If that works, proceed by calling __cxa_atexit, otherwise
+ call atexit.
+
+ This *should* be sufficiently safe. Ultimately, new applications will
+ use the statically linked atexit function though, as outlined above. */
+ if (!d)
+ d = dlls.find ((void *) fn);
+#endif
+ res = d ? __cxa_atexit ((void (*) (void *)) fn, NULL, d->handle) : atexit (fn);
return res;
}
diff --git a/winsup/cygwin/debug.cc b/winsup/cygwin/debug.cc
index 075803cc0..fc2fed4df 100644
--- a/winsup/cygwin/debug.cc
+++ b/winsup/cygwin/debug.cc
@@ -1,9 +1,5 @@
/* debug.cc
- Copyright 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007,
- 2008, 2009, 2011
- Red Hat, Inc.
-
This software is a copyrighted work licensed under the terms of the
Cygwin license. Please consult the file "CYGWIN_LICENSE" for
details. */
diff --git a/winsup/cygwin/debug.h b/winsup/cygwin/debug.h
index 627c77ed6..d3f7ea3ed 100644
--- a/winsup/cygwin/debug.h
+++ b/winsup/cygwin/debug.h
@@ -1,23 +1,9 @@
/* debug.h
- Copyright 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2008, 2010,
- 2013 Red Hat, Inc.
-
This software is a copyrighted work licensed under the terms of the
Cygwin license. Please consult the file "CYGWIN_LICENSE" for
details. */
-#ifndef MALLOC_DEBUG
-#define MALLOC_CHECK do {} while (0)
-#else
-#include <stdlib.h>
-#include <malloc.h>
-#define MALLOC_CHECK ({\
- debug_printf ("checking malloc pool");\
- mallinfo ();\
-})
-#endif
-
#if !defined(_DEBUG_H_)
#define _DEBUG_H_
diff --git a/winsup/cygwin/devices.cc b/winsup/cygwin/devices.cc
index 9f37ef827..fa022ea25 100644
--- a/winsup/cygwin/devices.cc
+++ b/winsup/cygwin/devices.cc
@@ -91,7 +91,7 @@ exists_pty (const device& dev)
}
const device dev_cygdrive_storage =
- {"/cygdrive", {FH_CYGDRIVE}, "/cygdrive", exists};
+ {"/cygdrive", {FH_CYGDRIVE}, "", exists};
const device dev_fs_storage =
{"", {FH_FS}, "", exists};
@@ -141,8 +141,8 @@ const device dev_error_storage =
#define BRACK(x) {devn_int: x}
const _RDATA device dev_storage[] =
{
- {"/dev", BRACK(FH_DEV), "/dev", exists, S_IFDIR, false},
- {"/dev/clipboard", BRACK(FH_CLIPBOARD), "/dev/clipboard", exists, S_IFCHR, true},
+ {"/dev", BRACK(FH_DEV), "", exists, S_IFDIR, false},
+ {"/dev/clipboard", BRACK(FH_CLIPBOARD), "\\Device\\Null", exists_ntdev, S_IFCHR, true},
{"/dev/com1", BRACK(FHDEV(DEV_SERIAL_MAJOR, 0)), "\\??\\COM1", exists_ntdev_silent, S_IFCHR, true},
{"/dev/com2", BRACK(FHDEV(DEV_SERIAL_MAJOR, 1)), "\\??\\COM2", exists_ntdev_silent, S_IFCHR, true},
{"/dev/com3", BRACK(FHDEV(DEV_SERIAL_MAJOR, 2)), "\\??\\COM3", exists_ntdev_silent, S_IFCHR, true},
@@ -225,8 +225,72 @@ const _RDATA device dev_storage[] =
{"/dev/cons61", BRACK(FHDEV(DEV_CONS_MAJOR, 61)), "/dev/cons61", exists_console, S_IFCHR, true},
{"/dev/cons62", BRACK(FHDEV(DEV_CONS_MAJOR, 62)), "/dev/cons62", exists_console, S_IFCHR, true},
{"/dev/cons63", BRACK(FHDEV(DEV_CONS_MAJOR, 63)), "/dev/cons63", exists_console, S_IFCHR, true},
+ {"/dev/cons64", BRACK(FHDEV(DEV_CONS_MAJOR, 64)), "/dev/cons64", exists_console, S_IFCHR, true},
+ {"/dev/cons65", BRACK(FHDEV(DEV_CONS_MAJOR, 65)), "/dev/cons65", exists_console, S_IFCHR, true},
+ {"/dev/cons66", BRACK(FHDEV(DEV_CONS_MAJOR, 66)), "/dev/cons66", exists_console, S_IFCHR, true},
+ {"/dev/cons67", BRACK(FHDEV(DEV_CONS_MAJOR, 67)), "/dev/cons67", exists_console, S_IFCHR, true},
+ {"/dev/cons68", BRACK(FHDEV(DEV_CONS_MAJOR, 68)), "/dev/cons68", exists_console, S_IFCHR, true},
+ {"/dev/cons69", BRACK(FHDEV(DEV_CONS_MAJOR, 69)), "/dev/cons69", exists_console, S_IFCHR, true},
+ {"/dev/cons70", BRACK(FHDEV(DEV_CONS_MAJOR, 70)), "/dev/cons70", exists_console, S_IFCHR, true},
+ {"/dev/cons71", BRACK(FHDEV(DEV_CONS_MAJOR, 71)), "/dev/cons71", exists_console, S_IFCHR, true},
+ {"/dev/cons72", BRACK(FHDEV(DEV_CONS_MAJOR, 72)), "/dev/cons72", exists_console, S_IFCHR, true},
+ {"/dev/cons73", BRACK(FHDEV(DEV_CONS_MAJOR, 73)), "/dev/cons73", exists_console, S_IFCHR, true},
+ {"/dev/cons74", BRACK(FHDEV(DEV_CONS_MAJOR, 74)), "/dev/cons74", exists_console, S_IFCHR, true},
+ {"/dev/cons75", BRACK(FHDEV(DEV_CONS_MAJOR, 75)), "/dev/cons75", exists_console, S_IFCHR, true},
+ {"/dev/cons76", BRACK(FHDEV(DEV_CONS_MAJOR, 76)), "/dev/cons76", exists_console, S_IFCHR, true},
+ {"/dev/cons77", BRACK(FHDEV(DEV_CONS_MAJOR, 77)), "/dev/cons77", exists_console, S_IFCHR, true},
+ {"/dev/cons78", BRACK(FHDEV(DEV_CONS_MAJOR, 78)), "/dev/cons78", exists_console, S_IFCHR, true},
+ {"/dev/cons79", BRACK(FHDEV(DEV_CONS_MAJOR, 79)), "/dev/cons79", exists_console, S_IFCHR, true},
+ {"/dev/cons80", BRACK(FHDEV(DEV_CONS_MAJOR, 80)), "/dev/cons80", exists_console, S_IFCHR, true},
+ {"/dev/cons81", BRACK(FHDEV(DEV_CONS_MAJOR, 81)), "/dev/cons81", exists_console, S_IFCHR, true},
+ {"/dev/cons82", BRACK(FHDEV(DEV_CONS_MAJOR, 82)), "/dev/cons82", exists_console, S_IFCHR, true},
+ {"/dev/cons83", BRACK(FHDEV(DEV_CONS_MAJOR, 83)), "/dev/cons83", exists_console, S_IFCHR, true},
+ {"/dev/cons84", BRACK(FHDEV(DEV_CONS_MAJOR, 84)), "/dev/cons84", exists_console, S_IFCHR, true},
+ {"/dev/cons85", BRACK(FHDEV(DEV_CONS_MAJOR, 85)), "/dev/cons85", exists_console, S_IFCHR, true},
+ {"/dev/cons86", BRACK(FHDEV(DEV_CONS_MAJOR, 86)), "/dev/cons86", exists_console, S_IFCHR, true},
+ {"/dev/cons87", BRACK(FHDEV(DEV_CONS_MAJOR, 87)), "/dev/cons87", exists_console, S_IFCHR, true},
+ {"/dev/cons88", BRACK(FHDEV(DEV_CONS_MAJOR, 88)), "/dev/cons88", exists_console, S_IFCHR, true},
+ {"/dev/cons89", BRACK(FHDEV(DEV_CONS_MAJOR, 89)), "/dev/cons89", exists_console, S_IFCHR, true},
+ {"/dev/cons90", BRACK(FHDEV(DEV_CONS_MAJOR, 90)), "/dev/cons90", exists_console, S_IFCHR, true},
+ {"/dev/cons91", BRACK(FHDEV(DEV_CONS_MAJOR, 91)), "/dev/cons91", exists_console, S_IFCHR, true},
+ {"/dev/cons92", BRACK(FHDEV(DEV_CONS_MAJOR, 92)), "/dev/cons92", exists_console, S_IFCHR, true},
+ {"/dev/cons93", BRACK(FHDEV(DEV_CONS_MAJOR, 93)), "/dev/cons93", exists_console, S_IFCHR, true},
+ {"/dev/cons94", BRACK(FHDEV(DEV_CONS_MAJOR, 94)), "/dev/cons94", exists_console, S_IFCHR, true},
+ {"/dev/cons95", BRACK(FHDEV(DEV_CONS_MAJOR, 95)), "/dev/cons95", exists_console, S_IFCHR, true},
+ {"/dev/cons96", BRACK(FHDEV(DEV_CONS_MAJOR, 96)), "/dev/cons96", exists_console, S_IFCHR, true},
+ {"/dev/cons97", BRACK(FHDEV(DEV_CONS_MAJOR, 97)), "/dev/cons97", exists_console, S_IFCHR, true},
+ {"/dev/cons98", BRACK(FHDEV(DEV_CONS_MAJOR, 98)), "/dev/cons98", exists_console, S_IFCHR, true},
+ {"/dev/cons99", BRACK(FHDEV(DEV_CONS_MAJOR, 99)), "/dev/cons99", exists_console, S_IFCHR, true},
+ {"/dev/cons100", BRACK(FHDEV(DEV_CONS_MAJOR, 100)), "/dev/cons100", exists_console, S_IFCHR, true},
+ {"/dev/cons101", BRACK(FHDEV(DEV_CONS_MAJOR, 101)), "/dev/cons101", exists_console, S_IFCHR, true},
+ {"/dev/cons102", BRACK(FHDEV(DEV_CONS_MAJOR, 102)), "/dev/cons102", exists_console, S_IFCHR, true},
+ {"/dev/cons103", BRACK(FHDEV(DEV_CONS_MAJOR, 103)), "/dev/cons103", exists_console, S_IFCHR, true},
+ {"/dev/cons104", BRACK(FHDEV(DEV_CONS_MAJOR, 104)), "/dev/cons104", exists_console, S_IFCHR, true},
+ {"/dev/cons105", BRACK(FHDEV(DEV_CONS_MAJOR, 105)), "/dev/cons105", exists_console, S_IFCHR, true},
+ {"/dev/cons106", BRACK(FHDEV(DEV_CONS_MAJOR, 106)), "/dev/cons106", exists_console, S_IFCHR, true},
+ {"/dev/cons107", BRACK(FHDEV(DEV_CONS_MAJOR, 107)), "/dev/cons107", exists_console, S_IFCHR, true},
+ {"/dev/cons108", BRACK(FHDEV(DEV_CONS_MAJOR, 108)), "/dev/cons108", exists_console, S_IFCHR, true},
+ {"/dev/cons109", BRACK(FHDEV(DEV_CONS_MAJOR, 109)), "/dev/cons109", exists_console, S_IFCHR, true},
+ {"/dev/cons110", BRACK(FHDEV(DEV_CONS_MAJOR, 110)), "/dev/cons110", exists_console, S_IFCHR, true},
+ {"/dev/cons111", BRACK(FHDEV(DEV_CONS_MAJOR, 111)), "/dev/cons111", exists_console, S_IFCHR, true},
+ {"/dev/cons112", BRACK(FHDEV(DEV_CONS_MAJOR, 112)), "/dev/cons112", exists_console, S_IFCHR, true},
+ {"/dev/cons113", BRACK(FHDEV(DEV_CONS_MAJOR, 113)), "/dev/cons113", exists_console, S_IFCHR, true},
+ {"/dev/cons114", BRACK(FHDEV(DEV_CONS_MAJOR, 114)), "/dev/cons114", exists_console, S_IFCHR, true},
+ {"/dev/cons115", BRACK(FHDEV(DEV_CONS_MAJOR, 115)), "/dev/cons115", exists_console, S_IFCHR, true},
+ {"/dev/cons116", BRACK(FHDEV(DEV_CONS_MAJOR, 116)), "/dev/cons116", exists_console, S_IFCHR, true},
+ {"/dev/cons117", BRACK(FHDEV(DEV_CONS_MAJOR, 117)), "/dev/cons117", exists_console, S_IFCHR, true},
+ {"/dev/cons118", BRACK(FHDEV(DEV_CONS_MAJOR, 118)), "/dev/cons118", exists_console, S_IFCHR, true},
+ {"/dev/cons119", BRACK(FHDEV(DEV_CONS_MAJOR, 119)), "/dev/cons119", exists_console, S_IFCHR, true},
+ {"/dev/cons120", BRACK(FHDEV(DEV_CONS_MAJOR, 120)), "/dev/cons120", exists_console, S_IFCHR, true},
+ {"/dev/cons121", BRACK(FHDEV(DEV_CONS_MAJOR, 121)), "/dev/cons121", exists_console, S_IFCHR, true},
+ {"/dev/cons122", BRACK(FHDEV(DEV_CONS_MAJOR, 122)), "/dev/cons122", exists_console, S_IFCHR, true},
+ {"/dev/cons123", BRACK(FHDEV(DEV_CONS_MAJOR, 123)), "/dev/cons123", exists_console, S_IFCHR, true},
+ {"/dev/cons124", BRACK(FHDEV(DEV_CONS_MAJOR, 124)), "/dev/cons124", exists_console, S_IFCHR, true},
+ {"/dev/cons125", BRACK(FHDEV(DEV_CONS_MAJOR, 125)), "/dev/cons125", exists_console, S_IFCHR, true},
+ {"/dev/cons126", BRACK(FHDEV(DEV_CONS_MAJOR, 126)), "/dev/cons126", exists_console, S_IFCHR, true},
+ {"/dev/cons127", BRACK(FHDEV(DEV_CONS_MAJOR, 127)), "/dev/cons127", exists_console, S_IFCHR, true},
{"/dev/console", BRACK(FH_CONSOLE), "/dev/console", exists_console, S_IFCHR, true},
- {"/dev/dsp", BRACK(FH_OSS_DSP), "/dev/dsp", exists, S_IFCHR, true},
+ {"/dev/dsp", BRACK(FH_OSS_DSP), "\\Device\\Null", exists_ntdev, S_IFCHR, true},
{"/dev/fd0", BRACK(FHDEV(DEV_FLOPPY_MAJOR, 0)), "\\Device\\Floppy0", exists_ntdev, S_IFBLK, true},
{"/dev/fd1", BRACK(FHDEV(DEV_FLOPPY_MAJOR, 1)), "\\Device\\Floppy1", exists_ntdev, S_IFBLK, true},
{"/dev/fd2", BRACK(FHDEV(DEV_FLOPPY_MAJOR, 2)), "\\Device\\Floppy2", exists_ntdev, S_IFBLK, true},
@@ -243,7 +307,7 @@ const _RDATA device dev_storage[] =
{"/dev/fd13", BRACK(FHDEV(DEV_FLOPPY_MAJOR, 13)), "\\Device\\Floppy13", exists_ntdev, S_IFBLK, true},
{"/dev/fd14", BRACK(FHDEV(DEV_FLOPPY_MAJOR, 14)), "\\Device\\Floppy14", exists_ntdev, S_IFBLK, true},
{"/dev/fd15", BRACK(FHDEV(DEV_FLOPPY_MAJOR, 15)), "\\Device\\Floppy15", exists_ntdev, S_IFBLK, true},
- {"/dev/full", BRACK(FH_FULL), "/dev/full", exists, S_IFCHR, true},
+ {"/dev/full", BRACK(FH_FULL), "\\Device\\Null", exists_ntdev, S_IFCHR, true},
{"/dev/kmsg", BRACK(FH_KMSG), "\\Device\\MailSlot\\cygwin\\dev\\kmsg", exists_ntdev, S_IFCHR, true},
{"/dev/nst0", BRACK(FHDEV(DEV_TAPE_MAJOR, 128)), "\\Device\\Tape0", exists_ntdev, S_IFBLK, true},
{"/dev/nst1", BRACK(FHDEV(DEV_TAPE_MAJOR, 129)), "\\Device\\Tape1", exists_ntdev, S_IFBLK, true},
@@ -439,7 +503,71 @@ const _RDATA device dev_storage[] =
{"/dev/pty61", BRACK(FHDEV(DEV_PTYS_MAJOR, 61)), "/dev/pty61", exists_pty, S_IFCHR, true},
{"/dev/pty62", BRACK(FHDEV(DEV_PTYS_MAJOR, 62)), "/dev/pty62", exists_pty, S_IFCHR, true},
{"/dev/pty63", BRACK(FHDEV(DEV_PTYS_MAJOR, 63)), "/dev/pty63", exists_pty, S_IFCHR, true},
- {"/dev/random", BRACK(FH_RANDOM), "/dev/random", exists, S_IFCHR, true},
+ {"/dev/pty64", BRACK(FHDEV(DEV_PTYS_MAJOR, 64)), "/dev/pty64", exists_pty, S_IFCHR, true},
+ {"/dev/pty65", BRACK(FHDEV(DEV_PTYS_MAJOR, 65)), "/dev/pty65", exists_pty, S_IFCHR, true},
+ {"/dev/pty66", BRACK(FHDEV(DEV_PTYS_MAJOR, 66)), "/dev/pty66", exists_pty, S_IFCHR, true},
+ {"/dev/pty67", BRACK(FHDEV(DEV_PTYS_MAJOR, 67)), "/dev/pty67", exists_pty, S_IFCHR, true},
+ {"/dev/pty68", BRACK(FHDEV(DEV_PTYS_MAJOR, 68)), "/dev/pty68", exists_pty, S_IFCHR, true},
+ {"/dev/pty69", BRACK(FHDEV(DEV_PTYS_MAJOR, 69)), "/dev/pty69", exists_pty, S_IFCHR, true},
+ {"/dev/pty70", BRACK(FHDEV(DEV_PTYS_MAJOR, 70)), "/dev/pty70", exists_pty, S_IFCHR, true},
+ {"/dev/pty71", BRACK(FHDEV(DEV_PTYS_MAJOR, 71)), "/dev/pty71", exists_pty, S_IFCHR, true},
+ {"/dev/pty72", BRACK(FHDEV(DEV_PTYS_MAJOR, 72)), "/dev/pty72", exists_pty, S_IFCHR, true},
+ {"/dev/pty73", BRACK(FHDEV(DEV_PTYS_MAJOR, 73)), "/dev/pty73", exists_pty, S_IFCHR, true},
+ {"/dev/pty74", BRACK(FHDEV(DEV_PTYS_MAJOR, 74)), "/dev/pty74", exists_pty, S_IFCHR, true},
+ {"/dev/pty75", BRACK(FHDEV(DEV_PTYS_MAJOR, 75)), "/dev/pty75", exists_pty, S_IFCHR, true},
+ {"/dev/pty76", BRACK(FHDEV(DEV_PTYS_MAJOR, 76)), "/dev/pty76", exists_pty, S_IFCHR, true},
+ {"/dev/pty77", BRACK(FHDEV(DEV_PTYS_MAJOR, 77)), "/dev/pty77", exists_pty, S_IFCHR, true},
+ {"/dev/pty78", BRACK(FHDEV(DEV_PTYS_MAJOR, 78)), "/dev/pty78", exists_pty, S_IFCHR, true},
+ {"/dev/pty79", BRACK(FHDEV(DEV_PTYS_MAJOR, 79)), "/dev/pty79", exists_pty, S_IFCHR, true},
+ {"/dev/pty80", BRACK(FHDEV(DEV_PTYS_MAJOR, 80)), "/dev/pty80", exists_pty, S_IFCHR, true},
+ {"/dev/pty81", BRACK(FHDEV(DEV_PTYS_MAJOR, 81)), "/dev/pty81", exists_pty, S_IFCHR, true},
+ {"/dev/pty82", BRACK(FHDEV(DEV_PTYS_MAJOR, 82)), "/dev/pty82", exists_pty, S_IFCHR, true},
+ {"/dev/pty83", BRACK(FHDEV(DEV_PTYS_MAJOR, 83)), "/dev/pty83", exists_pty, S_IFCHR, true},
+ {"/dev/pty84", BRACK(FHDEV(DEV_PTYS_MAJOR, 84)), "/dev/pty84", exists_pty, S_IFCHR, true},
+ {"/dev/pty85", BRACK(FHDEV(DEV_PTYS_MAJOR, 85)), "/dev/pty85", exists_pty, S_IFCHR, true},
+ {"/dev/pty86", BRACK(FHDEV(DEV_PTYS_MAJOR, 86)), "/dev/pty86", exists_pty, S_IFCHR, true},
+ {"/dev/pty87", BRACK(FHDEV(DEV_PTYS_MAJOR, 87)), "/dev/pty87", exists_pty, S_IFCHR, true},
+ {"/dev/pty88", BRACK(FHDEV(DEV_PTYS_MAJOR, 88)), "/dev/pty88", exists_pty, S_IFCHR, true},
+ {"/dev/pty89", BRACK(FHDEV(DEV_PTYS_MAJOR, 89)), "/dev/pty89", exists_pty, S_IFCHR, true},
+ {"/dev/pty90", BRACK(FHDEV(DEV_PTYS_MAJOR, 90)), "/dev/pty90", exists_pty, S_IFCHR, true},
+ {"/dev/pty91", BRACK(FHDEV(DEV_PTYS_MAJOR, 91)), "/dev/pty91", exists_pty, S_IFCHR, true},
+ {"/dev/pty92", BRACK(FHDEV(DEV_PTYS_MAJOR, 92)), "/dev/pty92", exists_pty, S_IFCHR, true},
+ {"/dev/pty93", BRACK(FHDEV(DEV_PTYS_MAJOR, 93)), "/dev/pty93", exists_pty, S_IFCHR, true},
+ {"/dev/pty94", BRACK(FHDEV(DEV_PTYS_MAJOR, 94)), "/dev/pty94", exists_pty, S_IFCHR, true},
+ {"/dev/pty95", BRACK(FHDEV(DEV_PTYS_MAJOR, 95)), "/dev/pty95", exists_pty, S_IFCHR, true},
+ {"/dev/pty96", BRACK(FHDEV(DEV_PTYS_MAJOR, 96)), "/dev/pty96", exists_pty, S_IFCHR, true},
+ {"/dev/pty97", BRACK(FHDEV(DEV_PTYS_MAJOR, 97)), "/dev/pty97", exists_pty, S_IFCHR, true},
+ {"/dev/pty98", BRACK(FHDEV(DEV_PTYS_MAJOR, 98)), "/dev/pty98", exists_pty, S_IFCHR, true},
+ {"/dev/pty99", BRACK(FHDEV(DEV_PTYS_MAJOR, 99)), "/dev/pty99", exists_pty, S_IFCHR, true},
+ {"/dev/pty100", BRACK(FHDEV(DEV_PTYS_MAJOR, 100)), "/dev/pty100", exists_pty, S_IFCHR, true},
+ {"/dev/pty101", BRACK(FHDEV(DEV_PTYS_MAJOR, 101)), "/dev/pty101", exists_pty, S_IFCHR, true},
+ {"/dev/pty102", BRACK(FHDEV(DEV_PTYS_MAJOR, 102)), "/dev/pty102", exists_pty, S_IFCHR, true},
+ {"/dev/pty103", BRACK(FHDEV(DEV_PTYS_MAJOR, 103)), "/dev/pty103", exists_pty, S_IFCHR, true},
+ {"/dev/pty104", BRACK(FHDEV(DEV_PTYS_MAJOR, 104)), "/dev/pty104", exists_pty, S_IFCHR, true},
+ {"/dev/pty105", BRACK(FHDEV(DEV_PTYS_MAJOR, 105)), "/dev/pty105", exists_pty, S_IFCHR, true},
+ {"/dev/pty106", BRACK(FHDEV(DEV_PTYS_MAJOR, 106)), "/dev/pty106", exists_pty, S_IFCHR, true},
+ {"/dev/pty107", BRACK(FHDEV(DEV_PTYS_MAJOR, 107)), "/dev/pty107", exists_pty, S_IFCHR, true},
+ {"/dev/pty108", BRACK(FHDEV(DEV_PTYS_MAJOR, 108)), "/dev/pty108", exists_pty, S_IFCHR, true},
+ {"/dev/pty109", BRACK(FHDEV(DEV_PTYS_MAJOR, 109)), "/dev/pty109", exists_pty, S_IFCHR, true},
+ {"/dev/pty110", BRACK(FHDEV(DEV_PTYS_MAJOR, 110)), "/dev/pty110", exists_pty, S_IFCHR, true},
+ {"/dev/pty111", BRACK(FHDEV(DEV_PTYS_MAJOR, 111)), "/dev/pty111", exists_pty, S_IFCHR, true},
+ {"/dev/pty112", BRACK(FHDEV(DEV_PTYS_MAJOR, 112)), "/dev/pty112", exists_pty, S_IFCHR, true},
+ {"/dev/pty113", BRACK(FHDEV(DEV_PTYS_MAJOR, 113)), "/dev/pty113", exists_pty, S_IFCHR, true},
+ {"/dev/pty114", BRACK(FHDEV(DEV_PTYS_MAJOR, 114)), "/dev/pty114", exists_pty, S_IFCHR, true},
+ {"/dev/pty115", BRACK(FHDEV(DEV_PTYS_MAJOR, 115)), "/dev/pty115", exists_pty, S_IFCHR, true},
+ {"/dev/pty116", BRACK(FHDEV(DEV_PTYS_MAJOR, 116)), "/dev/pty116", exists_pty, S_IFCHR, true},
+ {"/dev/pty117", BRACK(FHDEV(DEV_PTYS_MAJOR, 117)), "/dev/pty117", exists_pty, S_IFCHR, true},
+ {"/dev/pty118", BRACK(FHDEV(DEV_PTYS_MAJOR, 118)), "/dev/pty118", exists_pty, S_IFCHR, true},
+ {"/dev/pty119", BRACK(FHDEV(DEV_PTYS_MAJOR, 119)), "/dev/pty119", exists_pty, S_IFCHR, true},
+ {"/dev/pty120", BRACK(FHDEV(DEV_PTYS_MAJOR, 120)), "/dev/pty120", exists_pty, S_IFCHR, true},
+ {"/dev/pty121", BRACK(FHDEV(DEV_PTYS_MAJOR, 121)), "/dev/pty121", exists_pty, S_IFCHR, true},
+ {"/dev/pty122", BRACK(FHDEV(DEV_PTYS_MAJOR, 122)), "/dev/pty122", exists_pty, S_IFCHR, true},
+ {"/dev/pty123", BRACK(FHDEV(DEV_PTYS_MAJOR, 123)), "/dev/pty123", exists_pty, S_IFCHR, true},
+ {"/dev/pty124", BRACK(FHDEV(DEV_PTYS_MAJOR, 124)), "/dev/pty124", exists_pty, S_IFCHR, true},
+ {"/dev/pty125", BRACK(FHDEV(DEV_PTYS_MAJOR, 125)), "/dev/pty125", exists_pty, S_IFCHR, true},
+ {"/dev/pty126", BRACK(FHDEV(DEV_PTYS_MAJOR, 126)), "/dev/pty126", exists_pty, S_IFCHR, true},
+ {"/dev/pty127", BRACK(FHDEV(DEV_PTYS_MAJOR, 127)), "/dev/pty127", exists_pty, S_IFCHR, true},
+ {"/dev/random", BRACK(FH_RANDOM), "\\Device\\Null", exists_ntdev, S_IFCHR, true},
{"/dev/scd0", BRACK(FHDEV(DEV_CDROM_MAJOR, 0)), "\\Device\\CdRom0", exists_ntdev, S_IFBLK, true},
{"/dev/scd1", BRACK(FHDEV(DEV_CDROM_MAJOR, 1)), "\\Device\\CdRom1", exists_ntdev, S_IFBLK, true},
{"/dev/scd2", BRACK(FHDEV(DEV_CDROM_MAJOR, 2)), "\\Device\\CdRom2", exists_ntdev, S_IFBLK, true},
@@ -2713,9 +2841,9 @@ const _RDATA device dev_storage[] =
{"/dev/ttyS61", BRACK(FHDEV(DEV_SERIAL_MAJOR, 61)), "\\??\\COM62", exists_ntdev, S_IFCHR, true},
{"/dev/ttyS62", BRACK(FHDEV(DEV_SERIAL_MAJOR, 62)), "\\??\\COM63", exists_ntdev, S_IFCHR, true},
{"/dev/ttyS63", BRACK(FHDEV(DEV_SERIAL_MAJOR, 63)), "\\??\\COM64", exists_ntdev, S_IFCHR, true},
- {"/dev/urandom", BRACK(FH_URANDOM), "/dev/urandom", exists, S_IFCHR, true},
- {"/dev/windows", BRACK(FH_WINDOWS), "/dev/windows", exists, S_IFCHR, true},
- {"/dev/zero", BRACK(FH_ZERO), "/dev/zero", exists, S_IFCHR, true},
+ {"/dev/urandom", BRACK(FH_URANDOM), "\\Device\\Null", exists_ntdev, S_IFCHR, true},
+ {"/dev/windows", BRACK(FH_WINDOWS), "\\Device\\Null", exists_ntdev, S_IFCHR, true},
+ {"/dev/zero", BRACK(FH_ZERO), "\\Device\\Null", exists_ntdev, S_IFCHR, true},
{":fifo", BRACK(FH_FIFO), "/dev/fifo", exists_internal, S_IFCHR, false},
{":pipe", BRACK(FH_PIPE), "/dev/pipe", exists_internal, S_IFCHR, false},
{":ptym0", BRACK(FHDEV(DEV_PTYM_MAJOR, 0)), "/dev/ptym0", exists_internal, S_IFCHR, false},
@@ -2781,14 +2909,78 @@ const _RDATA device dev_storage[] =
{":ptym60", BRACK(FHDEV(DEV_PTYM_MAJOR, 60)), "/dev/ptym60", exists_internal, S_IFCHR, false},
{":ptym61", BRACK(FHDEV(DEV_PTYM_MAJOR, 61)), "/dev/ptym61", exists_internal, S_IFCHR, false},
{":ptym62", BRACK(FHDEV(DEV_PTYM_MAJOR, 62)), "/dev/ptym62", exists_internal, S_IFCHR, false},
- {":ptym63", BRACK(FHDEV(DEV_PTYM_MAJOR, 63)), "/dev/ptym63", exists_internal, S_IFCHR, false}
+ {":ptym63", BRACK(FHDEV(DEV_PTYM_MAJOR, 63)), "/dev/ptym63", exists_internal, S_IFCHR, false},
+ {":ptym64", BRACK(FHDEV(DEV_PTYM_MAJOR, 64)), "/dev/ptym64", exists_internal, S_IFCHR, false},
+ {":ptym65", BRACK(FHDEV(DEV_PTYM_MAJOR, 65)), "/dev/ptym65", exists_internal, S_IFCHR, false},
+ {":ptym66", BRACK(FHDEV(DEV_PTYM_MAJOR, 66)), "/dev/ptym66", exists_internal, S_IFCHR, false},
+ {":ptym67", BRACK(FHDEV(DEV_PTYM_MAJOR, 67)), "/dev/ptym67", exists_internal, S_IFCHR, false},
+ {":ptym68", BRACK(FHDEV(DEV_PTYM_MAJOR, 68)), "/dev/ptym68", exists_internal, S_IFCHR, false},
+ {":ptym69", BRACK(FHDEV(DEV_PTYM_MAJOR, 69)), "/dev/ptym69", exists_internal, S_IFCHR, false},
+ {":ptym70", BRACK(FHDEV(DEV_PTYM_MAJOR, 70)), "/dev/ptym70", exists_internal, S_IFCHR, false},
+ {":ptym71", BRACK(FHDEV(DEV_PTYM_MAJOR, 71)), "/dev/ptym71", exists_internal, S_IFCHR, false},
+ {":ptym72", BRACK(FHDEV(DEV_PTYM_MAJOR, 72)), "/dev/ptym72", exists_internal, S_IFCHR, false},
+ {":ptym73", BRACK(FHDEV(DEV_PTYM_MAJOR, 73)), "/dev/ptym73", exists_internal, S_IFCHR, false},
+ {":ptym74", BRACK(FHDEV(DEV_PTYM_MAJOR, 74)), "/dev/ptym74", exists_internal, S_IFCHR, false},
+ {":ptym75", BRACK(FHDEV(DEV_PTYM_MAJOR, 75)), "/dev/ptym75", exists_internal, S_IFCHR, false},
+ {":ptym76", BRACK(FHDEV(DEV_PTYM_MAJOR, 76)), "/dev/ptym76", exists_internal, S_IFCHR, false},
+ {":ptym77", BRACK(FHDEV(DEV_PTYM_MAJOR, 77)), "/dev/ptym77", exists_internal, S_IFCHR, false},
+ {":ptym78", BRACK(FHDEV(DEV_PTYM_MAJOR, 78)), "/dev/ptym78", exists_internal, S_IFCHR, false},
+ {":ptym79", BRACK(FHDEV(DEV_PTYM_MAJOR, 79)), "/dev/ptym79", exists_internal, S_IFCHR, false},
+ {":ptym80", BRACK(FHDEV(DEV_PTYM_MAJOR, 80)), "/dev/ptym80", exists_internal, S_IFCHR, false},
+ {":ptym81", BRACK(FHDEV(DEV_PTYM_MAJOR, 81)), "/dev/ptym81", exists_internal, S_IFCHR, false},
+ {":ptym82", BRACK(FHDEV(DEV_PTYM_MAJOR, 82)), "/dev/ptym82", exists_internal, S_IFCHR, false},
+ {":ptym83", BRACK(FHDEV(DEV_PTYM_MAJOR, 83)), "/dev/ptym83", exists_internal, S_IFCHR, false},
+ {":ptym84", BRACK(FHDEV(DEV_PTYM_MAJOR, 84)), "/dev/ptym84", exists_internal, S_IFCHR, false},
+ {":ptym85", BRACK(FHDEV(DEV_PTYM_MAJOR, 85)), "/dev/ptym85", exists_internal, S_IFCHR, false},
+ {":ptym86", BRACK(FHDEV(DEV_PTYM_MAJOR, 86)), "/dev/ptym86", exists_internal, S_IFCHR, false},
+ {":ptym87", BRACK(FHDEV(DEV_PTYM_MAJOR, 87)), "/dev/ptym87", exists_internal, S_IFCHR, false},
+ {":ptym88", BRACK(FHDEV(DEV_PTYM_MAJOR, 88)), "/dev/ptym88", exists_internal, S_IFCHR, false},
+ {":ptym89", BRACK(FHDEV(DEV_PTYM_MAJOR, 89)), "/dev/ptym89", exists_internal, S_IFCHR, false},
+ {":ptym90", BRACK(FHDEV(DEV_PTYM_MAJOR, 90)), "/dev/ptym90", exists_internal, S_IFCHR, false},
+ {":ptym91", BRACK(FHDEV(DEV_PTYM_MAJOR, 91)), "/dev/ptym91", exists_internal, S_IFCHR, false},
+ {":ptym92", BRACK(FHDEV(DEV_PTYM_MAJOR, 92)), "/dev/ptym92", exists_internal, S_IFCHR, false},
+ {":ptym93", BRACK(FHDEV(DEV_PTYM_MAJOR, 93)), "/dev/ptym93", exists_internal, S_IFCHR, false},
+ {":ptym94", BRACK(FHDEV(DEV_PTYM_MAJOR, 94)), "/dev/ptym94", exists_internal, S_IFCHR, false},
+ {":ptym95", BRACK(FHDEV(DEV_PTYM_MAJOR, 95)), "/dev/ptym95", exists_internal, S_IFCHR, false},
+ {":ptym96", BRACK(FHDEV(DEV_PTYM_MAJOR, 96)), "/dev/ptym96", exists_internal, S_IFCHR, false},
+ {":ptym97", BRACK(FHDEV(DEV_PTYM_MAJOR, 97)), "/dev/ptym97", exists_internal, S_IFCHR, false},
+ {":ptym98", BRACK(FHDEV(DEV_PTYM_MAJOR, 98)), "/dev/ptym98", exists_internal, S_IFCHR, false},
+ {":ptym99", BRACK(FHDEV(DEV_PTYM_MAJOR, 99)), "/dev/ptym99", exists_internal, S_IFCHR, false},
+ {":ptym100", BRACK(FHDEV(DEV_PTYM_MAJOR, 100)), "/dev/ptym100", exists_internal, S_IFCHR, false},
+ {":ptym101", BRACK(FHDEV(DEV_PTYM_MAJOR, 101)), "/dev/ptym101", exists_internal, S_IFCHR, false},
+ {":ptym102", BRACK(FHDEV(DEV_PTYM_MAJOR, 102)), "/dev/ptym102", exists_internal, S_IFCHR, false},
+ {":ptym103", BRACK(FHDEV(DEV_PTYM_MAJOR, 103)), "/dev/ptym103", exists_internal, S_IFCHR, false},
+ {":ptym104", BRACK(FHDEV(DEV_PTYM_MAJOR, 104)), "/dev/ptym104", exists_internal, S_IFCHR, false},
+ {":ptym105", BRACK(FHDEV(DEV_PTYM_MAJOR, 105)), "/dev/ptym105", exists_internal, S_IFCHR, false},
+ {":ptym106", BRACK(FHDEV(DEV_PTYM_MAJOR, 106)), "/dev/ptym106", exists_internal, S_IFCHR, false},
+ {":ptym107", BRACK(FHDEV(DEV_PTYM_MAJOR, 107)), "/dev/ptym107", exists_internal, S_IFCHR, false},
+ {":ptym108", BRACK(FHDEV(DEV_PTYM_MAJOR, 108)), "/dev/ptym108", exists_internal, S_IFCHR, false},
+ {":ptym109", BRACK(FHDEV(DEV_PTYM_MAJOR, 109)), "/dev/ptym109", exists_internal, S_IFCHR, false},
+ {":ptym110", BRACK(FHDEV(DEV_PTYM_MAJOR, 110)), "/dev/ptym110", exists_internal, S_IFCHR, false},
+ {":ptym111", BRACK(FHDEV(DEV_PTYM_MAJOR, 111)), "/dev/ptym111", exists_internal, S_IFCHR, false},
+ {":ptym112", BRACK(FHDEV(DEV_PTYM_MAJOR, 112)), "/dev/ptym112", exists_internal, S_IFCHR, false},
+ {":ptym113", BRACK(FHDEV(DEV_PTYM_MAJOR, 113)), "/dev/ptym113", exists_internal, S_IFCHR, false},
+ {":ptym114", BRACK(FHDEV(DEV_PTYM_MAJOR, 114)), "/dev/ptym114", exists_internal, S_IFCHR, false},
+ {":ptym115", BRACK(FHDEV(DEV_PTYM_MAJOR, 115)), "/dev/ptym115", exists_internal, S_IFCHR, false},
+ {":ptym116", BRACK(FHDEV(DEV_PTYM_MAJOR, 116)), "/dev/ptym116", exists_internal, S_IFCHR, false},
+ {":ptym117", BRACK(FHDEV(DEV_PTYM_MAJOR, 117)), "/dev/ptym117", exists_internal, S_IFCHR, false},
+ {":ptym118", BRACK(FHDEV(DEV_PTYM_MAJOR, 118)), "/dev/ptym118", exists_internal, S_IFCHR, false},
+ {":ptym119", BRACK(FHDEV(DEV_PTYM_MAJOR, 119)), "/dev/ptym119", exists_internal, S_IFCHR, false},
+ {":ptym120", BRACK(FHDEV(DEV_PTYM_MAJOR, 120)), "/dev/ptym120", exists_internal, S_IFCHR, false},
+ {":ptym121", BRACK(FHDEV(DEV_PTYM_MAJOR, 121)), "/dev/ptym121", exists_internal, S_IFCHR, false},
+ {":ptym122", BRACK(FHDEV(DEV_PTYM_MAJOR, 122)), "/dev/ptym122", exists_internal, S_IFCHR, false},
+ {":ptym123", BRACK(FHDEV(DEV_PTYM_MAJOR, 123)), "/dev/ptym123", exists_internal, S_IFCHR, false},
+ {":ptym124", BRACK(FHDEV(DEV_PTYM_MAJOR, 124)), "/dev/ptym124", exists_internal, S_IFCHR, false},
+ {":ptym125", BRACK(FHDEV(DEV_PTYM_MAJOR, 125)), "/dev/ptym125", exists_internal, S_IFCHR, false},
+ {":ptym126", BRACK(FHDEV(DEV_PTYM_MAJOR, 126)), "/dev/ptym126", exists_internal, S_IFCHR, false},
+ {":ptym127", BRACK(FHDEV(DEV_PTYM_MAJOR, 127)), "/dev/ptym127", exists_internal, S_IFCHR, false}
};
const device *cons_dev = dev_storage + 20;
-const device *console_dev = dev_storage + 84;
-const device *ptym_dev = dev_storage + 2577;
-const device *ptys_dev = dev_storage + 234;
-const device *urandom_dev = dev_storage + 2572;
+const device *console_dev = dev_storage + 148;
+const device *ptym_dev = dev_storage + 2705;
+const device *ptys_dev = dev_storage + 298;
+const device *urandom_dev = dev_storage + 2700;
static KR_device_t KR_find_keyword (const char *KR_keyword, int KR_length)
@@ -2818,7 +3010,7 @@ return NULL;
if (strncmp (KR_keyword, ":pipe", 5) == 0)
{
{
-return dev_storage + 2576;
+return dev_storage + 2704;
}
}
@@ -2833,7 +3025,7 @@ return NULL;
if (strncmp (KR_keyword, ":fifo", 5) == 0)
{
{
-return dev_storage + 2575;
+return dev_storage + 2703;
}
}
@@ -2857,7 +3049,7 @@ return NULL;
if (strncmp (KR_keyword, ":ptym9", 6) == 0)
{
{
-return dev_storage + 2586;
+return dev_storage + 2714;
}
}
@@ -2872,7 +3064,7 @@ return NULL;
if (strncmp (KR_keyword, ":ptym8", 6) == 0)
{
{
-return dev_storage + 2585;
+return dev_storage + 2713;
}
}
@@ -2887,7 +3079,7 @@ return NULL;
if (strncmp (KR_keyword, ":ptym7", 6) == 0)
{
{
-return dev_storage + 2584;
+return dev_storage + 2712;
}
}
@@ -2902,7 +3094,7 @@ return NULL;
if (strncmp (KR_keyword, ":ptym6", 6) == 0)
{
{
-return dev_storage + 2583;
+return dev_storage + 2711;
}
}
@@ -2917,7 +3109,7 @@ return NULL;
if (strncmp (KR_keyword, ":ptym5", 6) == 0)
{
{
-return dev_storage + 2582;
+return dev_storage + 2710;
}
}
@@ -2932,7 +3124,7 @@ return NULL;
if (strncmp (KR_keyword, ":ptym4", 6) == 0)
{
{
-return dev_storage + 2581;
+return dev_storage + 2709;
}
}
@@ -2947,7 +3139,7 @@ return NULL;
if (strncmp (KR_keyword, ":ptym3", 6) == 0)
{
{
-return dev_storage + 2580;
+return dev_storage + 2708;
}
}
@@ -2962,7 +3154,7 @@ return NULL;
if (strncmp (KR_keyword, ":ptym2", 6) == 0)
{
{
-return dev_storage + 2579;
+return dev_storage + 2707;
}
}
@@ -2977,7 +3169,7 @@ return NULL;
if (strncmp (KR_keyword, ":ptym1", 6) == 0)
{
{
-return dev_storage + 2578;
+return dev_storage + 2706;
}
}
@@ -2992,7 +3184,7 @@ return NULL;
if (strncmp (KR_keyword, ":ptym0", 6) == 0)
{
{
-return dev_storage + 2577;
+return dev_storage + 2705;
}
}
@@ -3012,14 +3204,581 @@ return NULL;
case 7:
switch (KR_keyword [5])
{
+ case '9':
+ switch (KR_keyword [6])
+ {
+ case '9':
+ if (strncmp (KR_keyword, ":ptym99", 7) == 0)
+ {
+{
+return dev_storage + 2804;
+
+}
+ }
+ else
+ {
+{
+return NULL;
+
+}
+ }
+ case '8':
+ if (strncmp (KR_keyword, ":ptym98", 7) == 0)
+ {
+{
+return dev_storage + 2803;
+
+}
+ }
+ else
+ {
+{
+return NULL;
+
+}
+ }
+ case '7':
+ if (strncmp (KR_keyword, ":ptym97", 7) == 0)
+ {
+{
+return dev_storage + 2802;
+
+}
+ }
+ else
+ {
+{
+return NULL;
+
+}
+ }
+ case '6':
+ if (strncmp (KR_keyword, ":ptym96", 7) == 0)
+ {
+{
+return dev_storage + 2801;
+
+}
+ }
+ else
+ {
+{
+return NULL;
+
+}
+ }
+ case '5':
+ if (strncmp (KR_keyword, ":ptym95", 7) == 0)
+ {
+{
+return dev_storage + 2800;
+
+}
+ }
+ else
+ {
+{
+return NULL;
+
+}
+ }
+ case '4':
+ if (strncmp (KR_keyword, ":ptym94", 7) == 0)
+ {
+{
+return dev_storage + 2799;
+
+}
+ }
+ else
+ {
+{
+return NULL;
+
+}
+ }
+ case '3':
+ if (strncmp (KR_keyword, ":ptym93", 7) == 0)
+ {
+{
+return dev_storage + 2798;
+
+}
+ }
+ else
+ {
+{
+return NULL;
+
+}
+ }
+ case '2':
+ if (strncmp (KR_keyword, ":ptym92", 7) == 0)
+ {
+{
+return dev_storage + 2797;
+
+}
+ }
+ else
+ {
+{
+return NULL;
+
+}
+ }
+ case '1':
+ if (strncmp (KR_keyword, ":ptym91", 7) == 0)
+ {
+{
+return dev_storage + 2796;
+
+}
+ }
+ else
+ {
+{
+return NULL;
+
+}
+ }
+ case '0':
+ if (strncmp (KR_keyword, ":ptym90", 7) == 0)
+ {
+{
+return dev_storage + 2795;
+
+}
+ }
+ else
+ {
+{
+return NULL;
+
+}
+ }
+ default:
+{
+return NULL;
+
+}
+ }
+ case '8':
+ switch (KR_keyword [6])
+ {
+ case '9':
+ if (strncmp (KR_keyword, ":ptym89", 7) == 0)
+ {
+{
+return dev_storage + 2794;
+
+}
+ }
+ else
+ {
+{
+return NULL;
+
+}
+ }
+ case '8':
+ if (strncmp (KR_keyword, ":ptym88", 7) == 0)
+ {
+{
+return dev_storage + 2793;
+
+}
+ }
+ else
+ {
+{
+return NULL;
+
+}
+ }
+ case '7':
+ if (strncmp (KR_keyword, ":ptym87", 7) == 0)
+ {
+{
+return dev_storage + 2792;
+
+}
+ }
+ else
+ {
+{
+return NULL;
+
+}
+ }
+ case '6':
+ if (strncmp (KR_keyword, ":ptym86", 7) == 0)
+ {
+{
+return dev_storage + 2791;
+
+}
+ }
+ else
+ {
+{
+return NULL;
+
+}
+ }
+ case '5':
+ if (strncmp (KR_keyword, ":ptym85", 7) == 0)
+ {
+{
+return dev_storage + 2790;
+
+}
+ }
+ else
+ {
+{
+return NULL;
+
+}
+ }
+ case '4':
+ if (strncmp (KR_keyword, ":ptym84", 7) == 0)
+ {
+{
+return dev_storage + 2789;
+
+}
+ }
+ else
+ {
+{
+return NULL;
+
+}
+ }
+ case '3':
+ if (strncmp (KR_keyword, ":ptym83", 7) == 0)
+ {
+{
+return dev_storage + 2788;
+
+}
+ }
+ else
+ {
+{
+return NULL;
+
+}
+ }
+ case '2':
+ if (strncmp (KR_keyword, ":ptym82", 7) == 0)
+ {
+{
+return dev_storage + 2787;
+
+}
+ }
+ else
+ {
+{
+return NULL;
+
+}
+ }
+ case '1':
+ if (strncmp (KR_keyword, ":ptym81", 7) == 0)
+ {
+{
+return dev_storage + 2786;
+
+}
+ }
+ else
+ {
+{
+return NULL;
+
+}
+ }
+ case '0':
+ if (strncmp (KR_keyword, ":ptym80", 7) == 0)
+ {
+{
+return dev_storage + 2785;
+
+}
+ }
+ else
+ {
+{
+return NULL;
+
+}
+ }
+ default:
+{
+return NULL;
+
+}
+ }
+ case '7':
+ switch (KR_keyword [6])
+ {
+ case '9':
+ if (strncmp (KR_keyword, ":ptym79", 7) == 0)
+ {
+{
+return dev_storage + 2784;
+
+}
+ }
+ else
+ {
+{
+return NULL;
+
+}
+ }
+ case '8':
+ if (strncmp (KR_keyword, ":ptym78", 7) == 0)
+ {
+{
+return dev_storage + 2783;
+
+}
+ }
+ else
+ {
+{
+return NULL;
+
+}
+ }
+ case '7':
+ if (strncmp (KR_keyword, ":ptym77", 7) == 0)
+ {
+{
+return dev_storage + 2782;
+
+}
+ }
+ else
+ {
+{
+return NULL;
+
+}
+ }
+ case '6':
+ if (strncmp (KR_keyword, ":ptym76", 7) == 0)
+ {
+{
+return dev_storage + 2781;
+
+}
+ }
+ else
+ {
+{
+return NULL;
+
+}
+ }
+ case '5':
+ if (strncmp (KR_keyword, ":ptym75", 7) == 0)
+ {
+{
+return dev_storage + 2780;
+
+}
+ }
+ else
+ {
+{
+return NULL;
+
+}
+ }
+ case '4':
+ if (strncmp (KR_keyword, ":ptym74", 7) == 0)
+ {
+{
+return dev_storage + 2779;
+
+}
+ }
+ else
+ {
+{
+return NULL;
+
+}
+ }
+ case '3':
+ if (strncmp (KR_keyword, ":ptym73", 7) == 0)
+ {
+{
+return dev_storage + 2778;
+
+}
+ }
+ else
+ {
+{
+return NULL;
+
+}
+ }
+ case '2':
+ if (strncmp (KR_keyword, ":ptym72", 7) == 0)
+ {
+{
+return dev_storage + 2777;
+
+}
+ }
+ else
+ {
+{
+return NULL;
+
+}
+ }
+ case '1':
+ if (strncmp (KR_keyword, ":ptym71", 7) == 0)
+ {
+{
+return dev_storage + 2776;
+
+}
+ }
+ else
+ {
+{
+return NULL;
+
+}
+ }
+ case '0':
+ if (strncmp (KR_keyword, ":ptym70", 7) == 0)
+ {
+{
+return dev_storage + 2775;
+
+}
+ }
+ else
+ {
+{
+return NULL;
+
+}
+ }
+ default:
+{
+return NULL;
+
+}
+ }
case '6':
switch (KR_keyword [6])
{
+ case '9':
+ if (strncmp (KR_keyword, ":ptym69", 7) == 0)
+ {
+{
+return dev_storage + 2774;
+
+}
+ }
+ else
+ {
+{
+return NULL;
+
+}
+ }
+ case '8':
+ if (strncmp (KR_keyword, ":ptym68", 7) == 0)
+ {
+{
+return dev_storage + 2773;
+
+}
+ }
+ else
+ {
+{
+return NULL;
+
+}
+ }
+ case '7':
+ if (strncmp (KR_keyword, ":ptym67", 7) == 0)
+ {
+{
+return dev_storage + 2772;
+
+}
+ }
+ else
+ {
+{
+return NULL;
+
+}
+ }
+ case '6':
+ if (strncmp (KR_keyword, ":ptym66", 7) == 0)
+ {
+{
+return dev_storage + 2771;
+
+}
+ }
+ else
+ {
+{
+return NULL;
+
+}
+ }
+ case '5':
+ if (strncmp (KR_keyword, ":ptym65", 7) == 0)
+ {
+{
+return dev_storage + 2770;
+
+}
+ }
+ else
+ {
+{
+return NULL;
+
+}
+ }
+ case '4':
+ if (strncmp (KR_keyword, ":ptym64", 7) == 0)
+ {
+{
+return dev_storage + 2769;
+
+}
+ }
+ else
+ {
+{
+return NULL;
+
+}
+ }
case '3':
if (strncmp (KR_keyword, ":ptym63", 7) == 0)
{
{
-return dev_storage + 2640;
+return dev_storage + 2768;
}
}
@@ -3034,7 +3793,7 @@ return NULL;
if (strncmp (KR_keyword, ":ptym62", 7) == 0)
{
{
-return dev_storage + 2639;
+return dev_storage + 2767;
}
}
@@ -3049,7 +3808,7 @@ return NULL;
if (strncmp (KR_keyword, ":ptym61", 7) == 0)
{
{
-return dev_storage + 2638;
+return dev_storage + 2766;
}
}
@@ -3064,7 +3823,7 @@ return NULL;
if (strncmp (KR_keyword, ":ptym60", 7) == 0)
{
{
-return dev_storage + 2637;
+return dev_storage + 2765;
}
}
@@ -3088,7 +3847,7 @@ return NULL;
if (strncmp (KR_keyword, ":ptym59", 7) == 0)
{
{
-return dev_storage + 2636;
+return dev_storage + 2764;
}
}
@@ -3103,7 +3862,7 @@ return NULL;
if (strncmp (KR_keyword, ":ptym58", 7) == 0)
{
{
-return dev_storage + 2635;
+return dev_storage + 2763;
}
}
@@ -3118,7 +3877,7 @@ return NULL;
if (strncmp (KR_keyword, ":ptym57", 7) == 0)
{
{
-return dev_storage + 2634;
+return dev_storage + 2762;
}
}
@@ -3133,7 +3892,7 @@ return NULL;
if (strncmp (KR_keyword, ":ptym56", 7) == 0)
{
{
-return dev_storage + 2633;
+return dev_storage + 2761;
}
}
@@ -3148,7 +3907,7 @@ return NULL;
if (strncmp (KR_keyword, ":ptym55", 7) == 0)
{
{
-return dev_storage + 2632;
+return dev_storage + 2760;
}
}
@@ -3163,7 +3922,7 @@ return NULL;
if (strncmp (KR_keyword, ":ptym54", 7) == 0)
{
{
-return dev_storage + 2631;
+return dev_storage + 2759;
}
}
@@ -3178,7 +3937,7 @@ return NULL;
if (strncmp (KR_keyword, ":ptym53", 7) == 0)
{
{
-return dev_storage + 2630;
+return dev_storage + 2758;
}
}
@@ -3193,7 +3952,7 @@ return NULL;
if (strncmp (KR_keyword, ":ptym52", 7) == 0)
{
{
-return dev_storage + 2629;
+return dev_storage + 2757;
}
}
@@ -3208,7 +3967,7 @@ return NULL;
if (strncmp (KR_keyword, ":ptym51", 7) == 0)
{
{
-return dev_storage + 2628;
+return dev_storage + 2756;
}
}
@@ -3223,7 +3982,7 @@ return NULL;
if (strncmp (KR_keyword, ":ptym50", 7) == 0)
{
{
-return dev_storage + 2627;
+return dev_storage + 2755;
}
}
@@ -3247,7 +4006,7 @@ return NULL;
if (strncmp (KR_keyword, ":ptym49", 7) == 0)
{
{
-return dev_storage + 2626;
+return dev_storage + 2754;
}
}
@@ -3262,7 +4021,7 @@ return NULL;
if (strncmp (KR_keyword, ":ptym48", 7) == 0)
{
{
-return dev_storage + 2625;
+return dev_storage + 2753;
}
}
@@ -3277,7 +4036,7 @@ return NULL;
if (strncmp (KR_keyword, ":ptym47", 7) == 0)
{
{
-return dev_storage + 2624;
+return dev_storage + 2752;
}
}
@@ -3292,7 +4051,7 @@ return NULL;
if (strncmp (KR_keyword, ":ptym46", 7) == 0)
{
{
-return dev_storage + 2623;
+return dev_storage + 2751;
}
}
@@ -3307,7 +4066,7 @@ return NULL;
if (strncmp (KR_keyword, ":ptym45", 7) == 0)
{
{
-return dev_storage + 2622;
+return dev_storage + 2750;
}
}
@@ -3322,7 +4081,7 @@ return NULL;
if (strncmp (KR_keyword, ":ptym44", 7) == 0)
{
{
-return dev_storage + 2621;
+return dev_storage + 2749;
}
}
@@ -3337,7 +4096,7 @@ return NULL;
if (strncmp (KR_keyword, ":ptym43", 7) == 0)
{
{
-return dev_storage + 2620;
+return dev_storage + 2748;
}
}
@@ -3352,7 +4111,7 @@ return NULL;
if (strncmp (KR_keyword, ":ptym42", 7) == 0)
{
{
-return dev_storage + 2619;
+return dev_storage + 2747;
}
}
@@ -3367,7 +4126,7 @@ return NULL;
if (strncmp (KR_keyword, ":ptym41", 7) == 0)
{
{
-return dev_storage + 2618;
+return dev_storage + 2746;
}
}
@@ -3382,7 +4141,7 @@ return NULL;
if (strncmp (KR_keyword, ":ptym40", 7) == 0)
{
{
-return dev_storage + 2617;
+return dev_storage + 2745;
}
}
@@ -3406,7 +4165,7 @@ return NULL;
if (strncmp (KR_keyword, ":ptym39", 7) == 0)
{
{
-return dev_storage + 2616;
+return dev_storage + 2744;
}
}
@@ -3421,7 +4180,7 @@ return NULL;
if (strncmp (KR_keyword, ":ptym38", 7) == 0)
{
{
-return dev_storage + 2615;
+return dev_storage + 2743;
}
}
@@ -3436,7 +4195,7 @@ return NULL;
if (strncmp (KR_keyword, ":ptym37", 7) == 0)
{
{
-return dev_storage + 2614;
+return dev_storage + 2742;
}
}
@@ -3451,7 +4210,7 @@ return NULL;
if (strncmp (KR_keyword, ":ptym36", 7) == 0)
{
{
-return dev_storage + 2613;
+return dev_storage + 2741;
}
}
@@ -3466,7 +4225,7 @@ return NULL;
if (strncmp (KR_keyword, ":ptym35", 7) == 0)
{
{
-return dev_storage + 2612;
+return dev_storage + 2740;
}
}
@@ -3481,7 +4240,7 @@ return NULL;
if (strncmp (KR_keyword, ":ptym34", 7) == 0)
{
{
-return dev_storage + 2611;
+return dev_storage + 2739;
}
}
@@ -3496,7 +4255,7 @@ return NULL;
if (strncmp (KR_keyword, ":ptym33", 7) == 0)
{
{
-return dev_storage + 2610;
+return dev_storage + 2738;
}
}
@@ -3511,7 +4270,7 @@ return NULL;
if (strncmp (KR_keyword, ":ptym32", 7) == 0)
{
{
-return dev_storage + 2609;
+return dev_storage + 2737;
}
}
@@ -3526,7 +4285,7 @@ return NULL;
if (strncmp (KR_keyword, ":ptym31", 7) == 0)
{
{
-return dev_storage + 2608;
+return dev_storage + 2736;
}
}
@@ -3541,7 +4300,7 @@ return NULL;
if (strncmp (KR_keyword, ":ptym30", 7) == 0)
{
{
-return dev_storage + 2607;
+return dev_storage + 2735;
}
}
@@ -3565,7 +4324,7 @@ return NULL;
if (strncmp (KR_keyword, ":ptym29", 7) == 0)
{
{
-return dev_storage + 2606;
+return dev_storage + 2734;
}
}
@@ -3580,7 +4339,7 @@ return NULL;
if (strncmp (KR_keyword, ":ptym28", 7) == 0)
{
{
-return dev_storage + 2605;
+return dev_storage + 2733;
}
}
@@ -3595,7 +4354,7 @@ return NULL;
if (strncmp (KR_keyword, ":ptym27", 7) == 0)
{
{
-return dev_storage + 2604;
+return dev_storage + 2732;
}
}
@@ -3610,7 +4369,7 @@ return NULL;
if (strncmp (KR_keyword, ":ptym26", 7) == 0)
{
{
-return dev_storage + 2603;
+return dev_storage + 2731;
}
}
@@ -3625,7 +4384,7 @@ return NULL;
if (strncmp (KR_keyword, ":ptym25", 7) == 0)
{
{
-return dev_storage + 2602;
+return dev_storage + 2730;
}
}
@@ -3640,7 +4399,7 @@ return NULL;
if (strncmp (KR_keyword, ":ptym24", 7) == 0)
{
{
-return dev_storage + 2601;
+return dev_storage + 2729;
}
}
@@ -3655,7 +4414,7 @@ return NULL;
if (strncmp (KR_keyword, ":ptym23", 7) == 0)
{
{
-return dev_storage + 2600;
+return dev_storage + 2728;
}
}
@@ -3670,7 +4429,7 @@ return NULL;
if (strncmp (KR_keyword, ":ptym22", 7) == 0)
{
{
-return dev_storage + 2599;
+return dev_storage + 2727;
}
}
@@ -3685,7 +4444,7 @@ return NULL;
if (strncmp (KR_keyword, ":ptym21", 7) == 0)
{
{
-return dev_storage + 2598;
+return dev_storage + 2726;
}
}
@@ -3700,7 +4459,7 @@ return NULL;
if (strncmp (KR_keyword, ":ptym20", 7) == 0)
{
{
-return dev_storage + 2597;
+return dev_storage + 2725;
}
}
@@ -3724,7 +4483,7 @@ return NULL;
if (strncmp (KR_keyword, ":ptym19", 7) == 0)
{
{
-return dev_storage + 2596;
+return dev_storage + 2724;
}
}
@@ -3739,7 +4498,7 @@ return NULL;
if (strncmp (KR_keyword, ":ptym18", 7) == 0)
{
{
-return dev_storage + 2595;
+return dev_storage + 2723;
}
}
@@ -3754,7 +4513,7 @@ return NULL;
if (strncmp (KR_keyword, ":ptym17", 7) == 0)
{
{
-return dev_storage + 2594;
+return dev_storage + 2722;
}
}
@@ -3769,7 +4528,7 @@ return NULL;
if (strncmp (KR_keyword, ":ptym16", 7) == 0)
{
{
-return dev_storage + 2593;
+return dev_storage + 2721;
}
}
@@ -3784,7 +4543,7 @@ return NULL;
if (strncmp (KR_keyword, ":ptym15", 7) == 0)
{
{
-return dev_storage + 2592;
+return dev_storage + 2720;
}
}
@@ -3799,7 +4558,7 @@ return NULL;
if (strncmp (KR_keyword, ":ptym14", 7) == 0)
{
{
-return dev_storage + 2591;
+return dev_storage + 2719;
}
}
@@ -3814,7 +4573,7 @@ return NULL;
if (strncmp (KR_keyword, ":ptym13", 7) == 0)
{
{
-return dev_storage + 2590;
+return dev_storage + 2718;
}
}
@@ -3829,7 +4588,7 @@ return NULL;
if (strncmp (KR_keyword, ":ptym12", 7) == 0)
{
{
-return dev_storage + 2589;
+return dev_storage + 2717;
}
}
@@ -3844,7 +4603,7 @@ return NULL;
if (strncmp (KR_keyword, ":ptym11", 7) == 0)
{
{
-return dev_storage + 2588;
+return dev_storage + 2716;
}
}
@@ -3859,7 +4618,7 @@ return NULL;
if (strncmp (KR_keyword, ":ptym10", 7) == 0)
{
{
-return dev_storage + 2587;
+return dev_storage + 2715;
}
}
@@ -3889,7 +4648,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdz", 8) == 0)
{
{
-return dev_storage + 340;
+return dev_storage + 468;
}
}
@@ -3907,7 +4666,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/tty", 8) == 0)
{
{
-return dev_storage + 2507;
+return dev_storage + 2635;
}
}
@@ -3922,7 +4681,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdy", 8) == 0)
{
{
-return dev_storage + 339;
+return dev_storage + 467;
}
}
@@ -3943,7 +4702,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdx", 8) == 0)
{
{
-return dev_storage + 338;
+return dev_storage + 466;
}
}
@@ -3958,7 +4717,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdw", 8) == 0)
{
{
-return dev_storage + 337;
+return dev_storage + 465;
}
}
@@ -3973,7 +4732,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdv", 8) == 0)
{
{
-return dev_storage + 336;
+return dev_storage + 464;
}
}
@@ -3988,7 +4747,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdu", 8) == 0)
{
{
-return dev_storage + 335;
+return dev_storage + 463;
}
}
@@ -4003,7 +4762,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdt", 8) == 0)
{
{
-return dev_storage + 334;
+return dev_storage + 462;
}
}
@@ -4018,7 +4777,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sds", 8) == 0)
{
{
-return dev_storage + 333;
+return dev_storage + 461;
}
}
@@ -4033,7 +4792,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdr", 8) == 0)
{
{
-return dev_storage + 332;
+return dev_storage + 460;
}
}
@@ -4048,7 +4807,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdq", 8) == 0)
{
{
-return dev_storage + 331;
+return dev_storage + 459;
}
}
@@ -4066,7 +4825,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdp", 8) == 0)
{
{
-return dev_storage + 330;
+return dev_storage + 458;
}
}
@@ -4081,7 +4840,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/dsp", 8) == 0)
{
{
-return dev_storage + 85;
+return dev_storage + 149;
}
}
@@ -4102,7 +4861,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdo", 8) == 0)
{
{
-return dev_storage + 329;
+return dev_storage + 457;
}
}
@@ -4117,7 +4876,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdn", 8) == 0)
{
{
-return dev_storage + 328;
+return dev_storage + 456;
}
}
@@ -4132,7 +4891,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdm", 8) == 0)
{
{
-return dev_storage + 327;
+return dev_storage + 455;
}
}
@@ -4147,7 +4906,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdl", 8) == 0)
{
{
-return dev_storage + 326;
+return dev_storage + 454;
}
}
@@ -4162,7 +4921,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdk", 8) == 0)
{
{
-return dev_storage + 325;
+return dev_storage + 453;
}
}
@@ -4177,7 +4936,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdj", 8) == 0)
{
{
-return dev_storage + 324;
+return dev_storage + 452;
}
}
@@ -4192,7 +4951,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdi", 8) == 0)
{
{
-return dev_storage + 323;
+return dev_storage + 451;
}
}
@@ -4207,7 +4966,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdh", 8) == 0)
{
{
-return dev_storage + 322;
+return dev_storage + 450;
}
}
@@ -4222,7 +4981,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdg", 8) == 0)
{
{
-return dev_storage + 321;
+return dev_storage + 449;
}
}
@@ -4237,7 +4996,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdf", 8) == 0)
{
{
-return dev_storage + 320;
+return dev_storage + 448;
}
}
@@ -4252,7 +5011,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sde", 8) == 0)
{
{
-return dev_storage + 319;
+return dev_storage + 447;
}
}
@@ -4267,7 +5026,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdd", 8) == 0)
{
{
-return dev_storage + 318;
+return dev_storage + 446;
}
}
@@ -4282,7 +5041,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdc", 8) == 0)
{
{
-return dev_storage + 317;
+return dev_storage + 445;
}
}
@@ -4297,7 +5056,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdb", 8) == 0)
{
{
-return dev_storage + 316;
+return dev_storage + 444;
}
}
@@ -4312,7 +5071,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sda", 8) == 0)
{
{
-return dev_storage + 315;
+return dev_storage + 443;
}
}
@@ -4330,7 +5089,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/st9", 8) == 0)
{
{
-return dev_storage + 2388;
+return dev_storage + 2516;
}
}
@@ -4345,7 +5104,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sr9", 8) == 0)
{
{
-return dev_storage + 2372;
+return dev_storage + 2500;
}
}
@@ -4360,7 +5119,37 @@ return NULL;
if (strncmp (KR_keyword, "/dev/fd9", 8) == 0)
{
{
-return dev_storage + 95;
+return dev_storage + 159;
+
+}
+ }
+ else
+ {
+{
+return NULL;
+
+}
+ }
+ case '1':
+ if (strncmp (KR_keyword, ":ptym119", 8) == 0)
+ {
+{
+return dev_storage + 2824;
+
+}
+ }
+ else
+ {
+{
+return NULL;
+
+}
+ }
+ case '0':
+ if (strncmp (KR_keyword, ":ptym109", 8) == 0)
+ {
+{
+return dev_storage + 2814;
}
}
@@ -4384,7 +5173,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/st8", 8) == 0)
{
{
-return dev_storage + 2387;
+return dev_storage + 2515;
}
}
@@ -4399,7 +5188,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sr8", 8) == 0)
{
{
-return dev_storage + 2371;
+return dev_storage + 2499;
}
}
@@ -4414,7 +5203,37 @@ return NULL;
if (strncmp (KR_keyword, "/dev/fd8", 8) == 0)
{
{
-return dev_storage + 94;
+return dev_storage + 158;
+
+}
+ }
+ else
+ {
+{
+return NULL;
+
+}
+ }
+ case '1':
+ if (strncmp (KR_keyword, ":ptym118", 8) == 0)
+ {
+{
+return dev_storage + 2823;
+
+}
+ }
+ else
+ {
+{
+return NULL;
+
+}
+ }
+ case '0':
+ if (strncmp (KR_keyword, ":ptym108", 8) == 0)
+ {
+{
+return dev_storage + 2813;
}
}
@@ -4438,7 +5257,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/st7", 8) == 0)
{
{
-return dev_storage + 2386;
+return dev_storage + 2514;
}
}
@@ -4453,7 +5272,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sr7", 8) == 0)
{
{
-return dev_storage + 2370;
+return dev_storage + 2498;
}
}
@@ -4468,7 +5287,52 @@ return NULL;
if (strncmp (KR_keyword, "/dev/fd7", 8) == 0)
{
{
-return dev_storage + 93;
+return dev_storage + 157;
+
+}
+ }
+ else
+ {
+{
+return NULL;
+
+}
+ }
+ case '2':
+ if (strncmp (KR_keyword, ":ptym127", 8) == 0)
+ {
+{
+return dev_storage + 2832;
+
+}
+ }
+ else
+ {
+{
+return NULL;
+
+}
+ }
+ case '1':
+ if (strncmp (KR_keyword, ":ptym117", 8) == 0)
+ {
+{
+return dev_storage + 2822;
+
+}
+ }
+ else
+ {
+{
+return NULL;
+
+}
+ }
+ case '0':
+ if (strncmp (KR_keyword, ":ptym107", 8) == 0)
+ {
+{
+return dev_storage + 2812;
}
}
@@ -4492,7 +5356,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/st6", 8) == 0)
{
{
-return dev_storage + 2385;
+return dev_storage + 2513;
}
}
@@ -4507,7 +5371,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sr6", 8) == 0)
{
{
-return dev_storage + 2369;
+return dev_storage + 2497;
}
}
@@ -4522,7 +5386,52 @@ return NULL;
if (strncmp (KR_keyword, "/dev/fd6", 8) == 0)
{
{
-return dev_storage + 92;
+return dev_storage + 156;
+
+}
+ }
+ else
+ {
+{
+return NULL;
+
+}
+ }
+ case '2':
+ if (strncmp (KR_keyword, ":ptym126", 8) == 0)
+ {
+{
+return dev_storage + 2831;
+
+}
+ }
+ else
+ {
+{
+return NULL;
+
+}
+ }
+ case '1':
+ if (strncmp (KR_keyword, ":ptym116", 8) == 0)
+ {
+{
+return dev_storage + 2821;
+
+}
+ }
+ else
+ {
+{
+return NULL;
+
+}
+ }
+ case '0':
+ if (strncmp (KR_keyword, ":ptym106", 8) == 0)
+ {
+{
+return dev_storage + 2811;
}
}
@@ -4546,7 +5455,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/st5", 8) == 0)
{
{
-return dev_storage + 2384;
+return dev_storage + 2512;
}
}
@@ -4561,7 +5470,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sr5", 8) == 0)
{
{
-return dev_storage + 2368;
+return dev_storage + 2496;
}
}
@@ -4576,7 +5485,52 @@ return NULL;
if (strncmp (KR_keyword, "/dev/fd5", 8) == 0)
{
{
-return dev_storage + 91;
+return dev_storage + 155;
+
+}
+ }
+ else
+ {
+{
+return NULL;
+
+}
+ }
+ case '2':
+ if (strncmp (KR_keyword, ":ptym125", 8) == 0)
+ {
+{
+return dev_storage + 2830;
+
+}
+ }
+ else
+ {
+{
+return NULL;
+
+}
+ }
+ case '1':
+ if (strncmp (KR_keyword, ":ptym115", 8) == 0)
+ {
+{
+return dev_storage + 2820;
+
+}
+ }
+ else
+ {
+{
+return NULL;
+
+}
+ }
+ case '0':
+ if (strncmp (KR_keyword, ":ptym105", 8) == 0)
+ {
+{
+return dev_storage + 2810;
}
}
@@ -4600,7 +5554,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/st4", 8) == 0)
{
{
-return dev_storage + 2383;
+return dev_storage + 2511;
}
}
@@ -4615,7 +5569,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sr4", 8) == 0)
{
{
-return dev_storage + 2367;
+return dev_storage + 2495;
}
}
@@ -4630,7 +5584,52 @@ return NULL;
if (strncmp (KR_keyword, "/dev/fd4", 8) == 0)
{
{
-return dev_storage + 90;
+return dev_storage + 154;
+
+}
+ }
+ else
+ {
+{
+return NULL;
+
+}
+ }
+ case '2':
+ if (strncmp (KR_keyword, ":ptym124", 8) == 0)
+ {
+{
+return dev_storage + 2829;
+
+}
+ }
+ else
+ {
+{
+return NULL;
+
+}
+ }
+ case '1':
+ if (strncmp (KR_keyword, ":ptym114", 8) == 0)
+ {
+{
+return dev_storage + 2819;
+
+}
+ }
+ else
+ {
+{
+return NULL;
+
+}
+ }
+ case '0':
+ if (strncmp (KR_keyword, ":ptym104", 8) == 0)
+ {
+{
+return dev_storage + 2809;
}
}
@@ -4654,7 +5653,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/st3", 8) == 0)
{
{
-return dev_storage + 2382;
+return dev_storage + 2510;
}
}
@@ -4669,7 +5668,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sr3", 8) == 0)
{
{
-return dev_storage + 2366;
+return dev_storage + 2494;
}
}
@@ -4684,7 +5683,52 @@ return NULL;
if (strncmp (KR_keyword, "/dev/fd3", 8) == 0)
{
{
-return dev_storage + 89;
+return dev_storage + 153;
+
+}
+ }
+ else
+ {
+{
+return NULL;
+
+}
+ }
+ case '2':
+ if (strncmp (KR_keyword, ":ptym123", 8) == 0)
+ {
+{
+return dev_storage + 2828;
+
+}
+ }
+ else
+ {
+{
+return NULL;
+
+}
+ }
+ case '1':
+ if (strncmp (KR_keyword, ":ptym113", 8) == 0)
+ {
+{
+return dev_storage + 2818;
+
+}
+ }
+ else
+ {
+{
+return NULL;
+
+}
+ }
+ case '0':
+ if (strncmp (KR_keyword, ":ptym103", 8) == 0)
+ {
+{
+return dev_storage + 2808;
}
}
@@ -4708,7 +5752,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/st2", 8) == 0)
{
{
-return dev_storage + 2381;
+return dev_storage + 2509;
}
}
@@ -4723,7 +5767,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sr2", 8) == 0)
{
{
-return dev_storage + 2365;
+return dev_storage + 2493;
}
}
@@ -4738,7 +5782,52 @@ return NULL;
if (strncmp (KR_keyword, "/dev/fd2", 8) == 0)
{
{
-return dev_storage + 88;
+return dev_storage + 152;
+
+}
+ }
+ else
+ {
+{
+return NULL;
+
+}
+ }
+ case '2':
+ if (strncmp (KR_keyword, ":ptym122", 8) == 0)
+ {
+{
+return dev_storage + 2827;
+
+}
+ }
+ else
+ {
+{
+return NULL;
+
+}
+ }
+ case '1':
+ if (strncmp (KR_keyword, ":ptym112", 8) == 0)
+ {
+{
+return dev_storage + 2817;
+
+}
+ }
+ else
+ {
+{
+return NULL;
+
+}
+ }
+ case '0':
+ if (strncmp (KR_keyword, ":ptym102", 8) == 0)
+ {
+{
+return dev_storage + 2807;
}
}
@@ -4762,7 +5851,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/st1", 8) == 0)
{
{
-return dev_storage + 2380;
+return dev_storage + 2508;
}
}
@@ -4777,7 +5866,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sr1", 8) == 0)
{
{
-return dev_storage + 2364;
+return dev_storage + 2492;
}
}
@@ -4792,7 +5881,52 @@ return NULL;
if (strncmp (KR_keyword, "/dev/fd1", 8) == 0)
{
{
-return dev_storage + 87;
+return dev_storage + 151;
+
+}
+ }
+ else
+ {
+{
+return NULL;
+
+}
+ }
+ case '2':
+ if (strncmp (KR_keyword, ":ptym121", 8) == 0)
+ {
+{
+return dev_storage + 2826;
+
+}
+ }
+ else
+ {
+{
+return NULL;
+
+}
+ }
+ case '1':
+ if (strncmp (KR_keyword, ":ptym111", 8) == 0)
+ {
+{
+return dev_storage + 2816;
+
+}
+ }
+ else
+ {
+{
+return NULL;
+
+}
+ }
+ case '0':
+ if (strncmp (KR_keyword, ":ptym101", 8) == 0)
+ {
+{
+return dev_storage + 2806;
}
}
@@ -4816,7 +5950,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/st0", 8) == 0)
{
{
-return dev_storage + 2379;
+return dev_storage + 2507;
}
}
@@ -4831,7 +5965,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sr0", 8) == 0)
{
{
-return dev_storage + 2363;
+return dev_storage + 2491;
}
}
@@ -4846,7 +5980,52 @@ return NULL;
if (strncmp (KR_keyword, "/dev/fd0", 8) == 0)
{
{
-return dev_storage + 86;
+return dev_storage + 150;
+
+}
+ }
+ else
+ {
+{
+return NULL;
+
+}
+ }
+ case '2':
+ if (strncmp (KR_keyword, ":ptym120", 8) == 0)
+ {
+{
+return dev_storage + 2825;
+
+}
+ }
+ else
+ {
+{
+return NULL;
+
+}
+ }
+ case '1':
+ if (strncmp (KR_keyword, ":ptym110", 8) == 0)
+ {
+{
+return dev_storage + 2815;
+
+}
+ }
+ else
+ {
+{
+return NULL;
+
+}
+ }
+ case '0':
+ if (strncmp (KR_keyword, ":ptym100", 8) == 0)
+ {
+{
+return dev_storage + 2805;
}
}
@@ -4879,7 +6058,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdz9", 9) == 0)
{
{
-return dev_storage + 724;
+return dev_storage + 852;
}
}
@@ -4894,7 +6073,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdz8", 9) == 0)
{
{
-return dev_storage + 723;
+return dev_storage + 851;
}
}
@@ -4909,7 +6088,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdz7", 9) == 0)
{
{
-return dev_storage + 722;
+return dev_storage + 850;
}
}
@@ -4924,7 +6103,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdz6", 9) == 0)
{
{
-return dev_storage + 721;
+return dev_storage + 849;
}
}
@@ -4939,7 +6118,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdz5", 9) == 0)
{
{
-return dev_storage + 720;
+return dev_storage + 848;
}
}
@@ -4954,7 +6133,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdz4", 9) == 0)
{
{
-return dev_storage + 719;
+return dev_storage + 847;
}
}
@@ -4969,7 +6148,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdz3", 9) == 0)
{
{
-return dev_storage + 718;
+return dev_storage + 846;
}
}
@@ -4984,7 +6163,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdz2", 9) == 0)
{
{
-return dev_storage + 717;
+return dev_storage + 845;
}
}
@@ -4999,7 +6178,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdz1", 9) == 0)
{
{
-return dev_storage + 716;
+return dev_storage + 844;
}
}
@@ -5026,7 +6205,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdy9", 9) == 0)
{
{
-return dev_storage + 709;
+return dev_storage + 837;
}
}
@@ -5041,7 +6220,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/pty9", 9) == 0)
{
{
-return dev_storage + 243;
+return dev_storage + 307;
}
}
@@ -5065,7 +6244,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdy8", 9) == 0)
{
{
-return dev_storage + 708;
+return dev_storage + 836;
}
}
@@ -5080,7 +6259,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/pty8", 9) == 0)
{
{
-return dev_storage + 242;
+return dev_storage + 306;
}
}
@@ -5104,7 +6283,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdy7", 9) == 0)
{
{
-return dev_storage + 707;
+return dev_storage + 835;
}
}
@@ -5119,7 +6298,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/pty7", 9) == 0)
{
{
-return dev_storage + 241;
+return dev_storage + 305;
}
}
@@ -5143,7 +6322,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdy6", 9) == 0)
{
{
-return dev_storage + 706;
+return dev_storage + 834;
}
}
@@ -5158,7 +6337,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/pty6", 9) == 0)
{
{
-return dev_storage + 240;
+return dev_storage + 304;
}
}
@@ -5182,7 +6361,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdy5", 9) == 0)
{
{
-return dev_storage + 705;
+return dev_storage + 833;
}
}
@@ -5197,7 +6376,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/pty5", 9) == 0)
{
{
-return dev_storage + 239;
+return dev_storage + 303;
}
}
@@ -5221,7 +6400,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdy4", 9) == 0)
{
{
-return dev_storage + 704;
+return dev_storage + 832;
}
}
@@ -5236,7 +6415,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/pty4", 9) == 0)
{
{
-return dev_storage + 238;
+return dev_storage + 302;
}
}
@@ -5260,7 +6439,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdy3", 9) == 0)
{
{
-return dev_storage + 703;
+return dev_storage + 831;
}
}
@@ -5275,7 +6454,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/pty3", 9) == 0)
{
{
-return dev_storage + 237;
+return dev_storage + 301;
}
}
@@ -5299,7 +6478,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdy2", 9) == 0)
{
{
-return dev_storage + 702;
+return dev_storage + 830;
}
}
@@ -5314,7 +6493,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/pty2", 9) == 0)
{
{
-return dev_storage + 236;
+return dev_storage + 300;
}
}
@@ -5338,7 +6517,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdy1", 9) == 0)
{
{
-return dev_storage + 701;
+return dev_storage + 829;
}
}
@@ -5353,7 +6532,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/pty1", 9) == 0)
{
{
-return dev_storage + 235;
+return dev_storage + 299;
}
}
@@ -5374,7 +6553,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/pty0", 9) == 0)
{
{
-return dev_storage + 234;
+return dev_storage + 298;
}
}
@@ -5398,7 +6577,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdx9", 9) == 0)
{
{
-return dev_storage + 694;
+return dev_storage + 822;
}
}
@@ -5413,7 +6592,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdx8", 9) == 0)
{
{
-return dev_storage + 693;
+return dev_storage + 821;
}
}
@@ -5428,7 +6607,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdx7", 9) == 0)
{
{
-return dev_storage + 692;
+return dev_storage + 820;
}
}
@@ -5443,7 +6622,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdx6", 9) == 0)
{
{
-return dev_storage + 691;
+return dev_storage + 819;
}
}
@@ -5458,7 +6637,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdx5", 9) == 0)
{
{
-return dev_storage + 690;
+return dev_storage + 818;
}
}
@@ -5473,7 +6652,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdx4", 9) == 0)
{
{
-return dev_storage + 689;
+return dev_storage + 817;
}
}
@@ -5488,7 +6667,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdx3", 9) == 0)
{
{
-return dev_storage + 688;
+return dev_storage + 816;
}
}
@@ -5503,7 +6682,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdx2", 9) == 0)
{
{
-return dev_storage + 687;
+return dev_storage + 815;
}
}
@@ -5518,7 +6697,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdx1", 9) == 0)
{
{
-return dev_storage + 686;
+return dev_storage + 814;
}
}
@@ -5542,7 +6721,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdw9", 9) == 0)
{
{
-return dev_storage + 679;
+return dev_storage + 807;
}
}
@@ -5557,7 +6736,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdw8", 9) == 0)
{
{
-return dev_storage + 678;
+return dev_storage + 806;
}
}
@@ -5572,7 +6751,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdw7", 9) == 0)
{
{
-return dev_storage + 677;
+return dev_storage + 805;
}
}
@@ -5587,7 +6766,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdw6", 9) == 0)
{
{
-return dev_storage + 676;
+return dev_storage + 804;
}
}
@@ -5602,7 +6781,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdw5", 9) == 0)
{
{
-return dev_storage + 675;
+return dev_storage + 803;
}
}
@@ -5617,7 +6796,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdw4", 9) == 0)
{
{
-return dev_storage + 674;
+return dev_storage + 802;
}
}
@@ -5632,7 +6811,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdw3", 9) == 0)
{
{
-return dev_storage + 673;
+return dev_storage + 801;
}
}
@@ -5647,7 +6826,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdw2", 9) == 0)
{
{
-return dev_storage + 672;
+return dev_storage + 800;
}
}
@@ -5662,7 +6841,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdw1", 9) == 0)
{
{
-return dev_storage + 671;
+return dev_storage + 799;
}
}
@@ -5686,7 +6865,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdv9", 9) == 0)
{
{
-return dev_storage + 664;
+return dev_storage + 792;
}
}
@@ -5701,7 +6880,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdv8", 9) == 0)
{
{
-return dev_storage + 663;
+return dev_storage + 791;
}
}
@@ -5716,7 +6895,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdv7", 9) == 0)
{
{
-return dev_storage + 662;
+return dev_storage + 790;
}
}
@@ -5731,7 +6910,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdv6", 9) == 0)
{
{
-return dev_storage + 661;
+return dev_storage + 789;
}
}
@@ -5746,7 +6925,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdv5", 9) == 0)
{
{
-return dev_storage + 660;
+return dev_storage + 788;
}
}
@@ -5761,7 +6940,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdv4", 9) == 0)
{
{
-return dev_storage + 659;
+return dev_storage + 787;
}
}
@@ -5776,7 +6955,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdv3", 9) == 0)
{
{
-return dev_storage + 658;
+return dev_storage + 786;
}
}
@@ -5791,7 +6970,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdv2", 9) == 0)
{
{
-return dev_storage + 657;
+return dev_storage + 785;
}
}
@@ -5806,7 +6985,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdv1", 9) == 0)
{
{
-return dev_storage + 656;
+return dev_storage + 784;
}
}
@@ -5830,7 +7009,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdu9", 9) == 0)
{
{
-return dev_storage + 649;
+return dev_storage + 777;
}
}
@@ -5845,7 +7024,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdu8", 9) == 0)
{
{
-return dev_storage + 648;
+return dev_storage + 776;
}
}
@@ -5860,7 +7039,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdu7", 9) == 0)
{
{
-return dev_storage + 647;
+return dev_storage + 775;
}
}
@@ -5875,7 +7054,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdu6", 9) == 0)
{
{
-return dev_storage + 646;
+return dev_storage + 774;
}
}
@@ -5890,7 +7069,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdu5", 9) == 0)
{
{
-return dev_storage + 645;
+return dev_storage + 773;
}
}
@@ -5905,7 +7084,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdu4", 9) == 0)
{
{
-return dev_storage + 644;
+return dev_storage + 772;
}
}
@@ -5920,7 +7099,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdu3", 9) == 0)
{
{
-return dev_storage + 643;
+return dev_storage + 771;
}
}
@@ -5935,7 +7114,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdu2", 9) == 0)
{
{
-return dev_storage + 642;
+return dev_storage + 770;
}
}
@@ -5950,7 +7129,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdu1", 9) == 0)
{
{
-return dev_storage + 641;
+return dev_storage + 769;
}
}
@@ -5977,7 +7156,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdt9", 9) == 0)
{
{
-return dev_storage + 634;
+return dev_storage + 762;
}
}
@@ -5992,7 +7171,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/nst9", 9) == 0)
{
{
-return dev_storage + 113;
+return dev_storage + 177;
}
}
@@ -6016,7 +7195,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdt8", 9) == 0)
{
{
-return dev_storage + 633;
+return dev_storage + 761;
}
}
@@ -6031,7 +7210,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/nst8", 9) == 0)
{
{
-return dev_storage + 112;
+return dev_storage + 176;
}
}
@@ -6055,7 +7234,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdt7", 9) == 0)
{
{
-return dev_storage + 632;
+return dev_storage + 760;
}
}
@@ -6070,7 +7249,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/nst7", 9) == 0)
{
{
-return dev_storage + 111;
+return dev_storage + 175;
}
}
@@ -6094,7 +7273,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdt6", 9) == 0)
{
{
-return dev_storage + 631;
+return dev_storage + 759;
}
}
@@ -6109,7 +7288,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/nst6", 9) == 0)
{
{
-return dev_storage + 110;
+return dev_storage + 174;
}
}
@@ -6133,7 +7312,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdt5", 9) == 0)
{
{
-return dev_storage + 630;
+return dev_storage + 758;
}
}
@@ -6148,7 +7327,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/nst5", 9) == 0)
{
{
-return dev_storage + 109;
+return dev_storage + 173;
}
}
@@ -6172,7 +7351,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdt4", 9) == 0)
{
{
-return dev_storage + 629;
+return dev_storage + 757;
}
}
@@ -6187,7 +7366,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/nst4", 9) == 0)
{
{
-return dev_storage + 108;
+return dev_storage + 172;
}
}
@@ -6211,7 +7390,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdt3", 9) == 0)
{
{
-return dev_storage + 628;
+return dev_storage + 756;
}
}
@@ -6226,7 +7405,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/nst3", 9) == 0)
{
{
-return dev_storage + 107;
+return dev_storage + 171;
}
}
@@ -6250,7 +7429,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdt2", 9) == 0)
{
{
-return dev_storage + 627;
+return dev_storage + 755;
}
}
@@ -6265,7 +7444,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/nst2", 9) == 0)
{
{
-return dev_storage + 106;
+return dev_storage + 170;
}
}
@@ -6289,7 +7468,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdt1", 9) == 0)
{
{
-return dev_storage + 626;
+return dev_storage + 754;
}
}
@@ -6304,7 +7483,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/nst1", 9) == 0)
{
{
-return dev_storage + 105;
+return dev_storage + 169;
}
}
@@ -6325,7 +7504,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/nst0", 9) == 0)
{
{
-return dev_storage + 104;
+return dev_storage + 168;
}
}
@@ -6349,7 +7528,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/kmsg", 9) == 0)
{
{
-return dev_storage + 103;
+return dev_storage + 167;
}
}
@@ -6364,7 +7543,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sds9", 9) == 0)
{
{
-return dev_storage + 619;
+return dev_storage + 747;
}
}
@@ -6379,7 +7558,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sds8", 9) == 0)
{
{
-return dev_storage + 618;
+return dev_storage + 746;
}
}
@@ -6394,7 +7573,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sds7", 9) == 0)
{
{
-return dev_storage + 617;
+return dev_storage + 745;
}
}
@@ -6409,7 +7588,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sds6", 9) == 0)
{
{
-return dev_storage + 616;
+return dev_storage + 744;
}
}
@@ -6424,7 +7603,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sds5", 9) == 0)
{
{
-return dev_storage + 615;
+return dev_storage + 743;
}
}
@@ -6439,7 +7618,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sds4", 9) == 0)
{
{
-return dev_storage + 614;
+return dev_storage + 742;
}
}
@@ -6454,7 +7633,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sds3", 9) == 0)
{
{
-return dev_storage + 613;
+return dev_storage + 741;
}
}
@@ -6469,7 +7648,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sds2", 9) == 0)
{
{
-return dev_storage + 612;
+return dev_storage + 740;
}
}
@@ -6484,7 +7663,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sds1", 9) == 0)
{
{
-return dev_storage + 611;
+return dev_storage + 739;
}
}
@@ -6508,7 +7687,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/zero", 9) == 0)
{
{
-return dev_storage + 2574;
+return dev_storage + 2702;
}
}
@@ -6523,7 +7702,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdr9", 9) == 0)
{
{
-return dev_storage + 604;
+return dev_storage + 732;
}
}
@@ -6538,7 +7717,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdr8", 9) == 0)
{
{
-return dev_storage + 603;
+return dev_storage + 731;
}
}
@@ -6553,7 +7732,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdr7", 9) == 0)
{
{
-return dev_storage + 602;
+return dev_storage + 730;
}
}
@@ -6568,7 +7747,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdr6", 9) == 0)
{
{
-return dev_storage + 601;
+return dev_storage + 729;
}
}
@@ -6583,7 +7762,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdr5", 9) == 0)
{
{
-return dev_storage + 600;
+return dev_storage + 728;
}
}
@@ -6598,7 +7777,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdr4", 9) == 0)
{
{
-return dev_storage + 599;
+return dev_storage + 727;
}
}
@@ -6613,7 +7792,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdr3", 9) == 0)
{
{
-return dev_storage + 598;
+return dev_storage + 726;
}
}
@@ -6628,7 +7807,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdr2", 9) == 0)
{
{
-return dev_storage + 597;
+return dev_storage + 725;
}
}
@@ -6643,7 +7822,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdr1", 9) == 0)
{
{
-return dev_storage + 596;
+return dev_storage + 724;
}
}
@@ -6667,7 +7846,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdq9", 9) == 0)
{
{
-return dev_storage + 589;
+return dev_storage + 717;
}
}
@@ -6682,7 +7861,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdq8", 9) == 0)
{
{
-return dev_storage + 588;
+return dev_storage + 716;
}
}
@@ -6697,7 +7876,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdq7", 9) == 0)
{
{
-return dev_storage + 587;
+return dev_storage + 715;
}
}
@@ -6712,7 +7891,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdq6", 9) == 0)
{
{
-return dev_storage + 586;
+return dev_storage + 714;
}
}
@@ -6727,7 +7906,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdq5", 9) == 0)
{
{
-return dev_storage + 585;
+return dev_storage + 713;
}
}
@@ -6742,7 +7921,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdq4", 9) == 0)
{
{
-return dev_storage + 584;
+return dev_storage + 712;
}
}
@@ -6757,7 +7936,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdq3", 9) == 0)
{
{
-return dev_storage + 583;
+return dev_storage + 711;
}
}
@@ -6772,7 +7951,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdq2", 9) == 0)
{
{
-return dev_storage + 582;
+return dev_storage + 710;
}
}
@@ -6787,7 +7966,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdq1", 9) == 0)
{
{
-return dev_storage + 581;
+return dev_storage + 709;
}
}
@@ -6811,7 +7990,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdp9", 9) == 0)
{
{
-return dev_storage + 574;
+return dev_storage + 702;
}
}
@@ -6826,7 +8005,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdp8", 9) == 0)
{
{
-return dev_storage + 573;
+return dev_storage + 701;
}
}
@@ -6841,7 +8020,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdp7", 9) == 0)
{
{
-return dev_storage + 572;
+return dev_storage + 700;
}
}
@@ -6856,7 +8035,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdp6", 9) == 0)
{
{
-return dev_storage + 571;
+return dev_storage + 699;
}
}
@@ -6871,7 +8050,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdp5", 9) == 0)
{
{
-return dev_storage + 570;
+return dev_storage + 698;
}
}
@@ -6886,7 +8065,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdp4", 9) == 0)
{
{
-return dev_storage + 569;
+return dev_storage + 697;
}
}
@@ -6901,7 +8080,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdp3", 9) == 0)
{
{
-return dev_storage + 568;
+return dev_storage + 696;
}
}
@@ -6916,7 +8095,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdp2", 9) == 0)
{
{
-return dev_storage + 567;
+return dev_storage + 695;
}
}
@@ -6931,7 +8110,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdp1", 9) == 0)
{
{
-return dev_storage + 566;
+return dev_storage + 694;
}
}
@@ -6955,7 +8134,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdo9", 9) == 0)
{
{
-return dev_storage + 559;
+return dev_storage + 687;
}
}
@@ -6970,7 +8149,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdo8", 9) == 0)
{
{
-return dev_storage + 558;
+return dev_storage + 686;
}
}
@@ -6985,7 +8164,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdo7", 9) == 0)
{
{
-return dev_storage + 557;
+return dev_storage + 685;
}
}
@@ -7000,7 +8179,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdo6", 9) == 0)
{
{
-return dev_storage + 556;
+return dev_storage + 684;
}
}
@@ -7015,7 +8194,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdo5", 9) == 0)
{
{
-return dev_storage + 555;
+return dev_storage + 683;
}
}
@@ -7030,7 +8209,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdo4", 9) == 0)
{
{
-return dev_storage + 554;
+return dev_storage + 682;
}
}
@@ -7045,7 +8224,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdo3", 9) == 0)
{
{
-return dev_storage + 553;
+return dev_storage + 681;
}
}
@@ -7060,7 +8239,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdo2", 9) == 0)
{
{
-return dev_storage + 552;
+return dev_storage + 680;
}
}
@@ -7075,7 +8254,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdo1", 9) == 0)
{
{
-return dev_storage + 551;
+return dev_storage + 679;
}
}
@@ -7099,7 +8278,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdn9", 9) == 0)
{
{
-return dev_storage + 544;
+return dev_storage + 672;
}
}
@@ -7114,7 +8293,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdn8", 9) == 0)
{
{
-return dev_storage + 543;
+return dev_storage + 671;
}
}
@@ -7129,7 +8308,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdn7", 9) == 0)
{
{
-return dev_storage + 542;
+return dev_storage + 670;
}
}
@@ -7144,7 +8323,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdn6", 9) == 0)
{
{
-return dev_storage + 541;
+return dev_storage + 669;
}
}
@@ -7159,7 +8338,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdn5", 9) == 0)
{
{
-return dev_storage + 540;
+return dev_storage + 668;
}
}
@@ -7174,7 +8353,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdn4", 9) == 0)
{
{
-return dev_storage + 539;
+return dev_storage + 667;
}
}
@@ -7189,7 +8368,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdn3", 9) == 0)
{
{
-return dev_storage + 538;
+return dev_storage + 666;
}
}
@@ -7204,7 +8383,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdn2", 9) == 0)
{
{
-return dev_storage + 537;
+return dev_storage + 665;
}
}
@@ -7219,7 +8398,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdn1", 9) == 0)
{
{
-return dev_storage + 536;
+return dev_storage + 664;
}
}
@@ -7246,7 +8425,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdm9", 9) == 0)
{
{
-return dev_storage + 529;
+return dev_storage + 657;
}
}
@@ -7261,7 +8440,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdm8", 9) == 0)
{
{
-return dev_storage + 528;
+return dev_storage + 656;
}
}
@@ -7276,7 +8455,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdm7", 9) == 0)
{
{
-return dev_storage + 527;
+return dev_storage + 655;
}
}
@@ -7291,7 +8470,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdm6", 9) == 0)
{
{
-return dev_storage + 526;
+return dev_storage + 654;
}
}
@@ -7306,7 +8485,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdm5", 9) == 0)
{
{
-return dev_storage + 525;
+return dev_storage + 653;
}
}
@@ -7321,7 +8500,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdm4", 9) == 0)
{
{
-return dev_storage + 524;
+return dev_storage + 652;
}
}
@@ -7336,7 +8515,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdm3", 9) == 0)
{
{
-return dev_storage + 523;
+return dev_storage + 651;
}
}
@@ -7351,7 +8530,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdm2", 9) == 0)
{
{
-return dev_storage + 522;
+return dev_storage + 650;
}
}
@@ -7366,7 +8545,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdm1", 9) == 0)
{
{
-return dev_storage + 521;
+return dev_storage + 649;
}
}
@@ -7387,7 +8566,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/ptmx", 9) == 0)
{
{
-return dev_storage + 233;
+return dev_storage + 297;
}
}
@@ -7558,7 +8737,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/null", 9) == 0)
{
{
-return dev_storage + 232;
+return dev_storage + 296;
}
}
@@ -7573,7 +8752,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/full", 9) == 0)
{
{
-return dev_storage + 102;
+return dev_storage + 166;
}
}
@@ -7594,7 +8773,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdl9", 9) == 0)
{
{
-return dev_storage + 514;
+return dev_storage + 642;
}
}
@@ -7609,7 +8788,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdl8", 9) == 0)
{
{
-return dev_storage + 513;
+return dev_storage + 641;
}
}
@@ -7624,7 +8803,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdl7", 9) == 0)
{
{
-return dev_storage + 512;
+return dev_storage + 640;
}
}
@@ -7639,7 +8818,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdl6", 9) == 0)
{
{
-return dev_storage + 511;
+return dev_storage + 639;
}
}
@@ -7654,7 +8833,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdl5", 9) == 0)
{
{
-return dev_storage + 510;
+return dev_storage + 638;
}
}
@@ -7669,7 +8848,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdl4", 9) == 0)
{
{
-return dev_storage + 509;
+return dev_storage + 637;
}
}
@@ -7684,7 +8863,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdl3", 9) == 0)
{
{
-return dev_storage + 508;
+return dev_storage + 636;
}
}
@@ -7699,7 +8878,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdl2", 9) == 0)
{
{
-return dev_storage + 507;
+return dev_storage + 635;
}
}
@@ -7714,7 +8893,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdl1", 9) == 0)
{
{
-return dev_storage + 506;
+return dev_storage + 634;
}
}
@@ -7738,7 +8917,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdk9", 9) == 0)
{
{
-return dev_storage + 499;
+return dev_storage + 627;
}
}
@@ -7753,7 +8932,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdk8", 9) == 0)
{
{
-return dev_storage + 498;
+return dev_storage + 626;
}
}
@@ -7768,7 +8947,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdk7", 9) == 0)
{
{
-return dev_storage + 497;
+return dev_storage + 625;
}
}
@@ -7783,7 +8962,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdk6", 9) == 0)
{
{
-return dev_storage + 496;
+return dev_storage + 624;
}
}
@@ -7798,7 +8977,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdk5", 9) == 0)
{
{
-return dev_storage + 495;
+return dev_storage + 623;
}
}
@@ -7813,7 +8992,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdk4", 9) == 0)
{
{
-return dev_storage + 494;
+return dev_storage + 622;
}
}
@@ -7828,7 +9007,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdk3", 9) == 0)
{
{
-return dev_storage + 493;
+return dev_storage + 621;
}
}
@@ -7843,7 +9022,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdk2", 9) == 0)
{
{
-return dev_storage + 492;
+return dev_storage + 620;
}
}
@@ -7858,7 +9037,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdk1", 9) == 0)
{
{
-return dev_storage + 491;
+return dev_storage + 619;
}
}
@@ -7882,7 +9061,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdj9", 9) == 0)
{
{
-return dev_storage + 484;
+return dev_storage + 612;
}
}
@@ -7897,7 +9076,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdj8", 9) == 0)
{
{
-return dev_storage + 483;
+return dev_storage + 611;
}
}
@@ -7912,7 +9091,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdj7", 9) == 0)
{
{
-return dev_storage + 482;
+return dev_storage + 610;
}
}
@@ -7927,7 +9106,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdj6", 9) == 0)
{
{
-return dev_storage + 481;
+return dev_storage + 609;
}
}
@@ -7942,7 +9121,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdj5", 9) == 0)
{
{
-return dev_storage + 480;
+return dev_storage + 608;
}
}
@@ -7957,7 +9136,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdj4", 9) == 0)
{
{
-return dev_storage + 479;
+return dev_storage + 607;
}
}
@@ -7972,7 +9151,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdj3", 9) == 0)
{
{
-return dev_storage + 478;
+return dev_storage + 606;
}
}
@@ -7987,7 +9166,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdj2", 9) == 0)
{
{
-return dev_storage + 477;
+return dev_storage + 605;
}
}
@@ -8002,7 +9181,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdj1", 9) == 0)
{
{
-return dev_storage + 476;
+return dev_storage + 604;
}
}
@@ -8026,7 +9205,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdi9", 9) == 0)
{
{
-return dev_storage + 469;
+return dev_storage + 597;
}
}
@@ -8041,7 +9220,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdi8", 9) == 0)
{
{
-return dev_storage + 468;
+return dev_storage + 596;
}
}
@@ -8056,7 +9235,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdi7", 9) == 0)
{
{
-return dev_storage + 467;
+return dev_storage + 595;
}
}
@@ -8071,7 +9250,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdi6", 9) == 0)
{
{
-return dev_storage + 466;
+return dev_storage + 594;
}
}
@@ -8086,7 +9265,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdi5", 9) == 0)
{
{
-return dev_storage + 465;
+return dev_storage + 593;
}
}
@@ -8101,7 +9280,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdi4", 9) == 0)
{
{
-return dev_storage + 464;
+return dev_storage + 592;
}
}
@@ -8116,7 +9295,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdi3", 9) == 0)
{
{
-return dev_storage + 463;
+return dev_storage + 591;
}
}
@@ -8131,7 +9310,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdi2", 9) == 0)
{
{
-return dev_storage + 462;
+return dev_storage + 590;
}
}
@@ -8146,7 +9325,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdi1", 9) == 0)
{
{
-return dev_storage + 461;
+return dev_storage + 589;
}
}
@@ -8170,7 +9349,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdh9", 9) == 0)
{
{
-return dev_storage + 454;
+return dev_storage + 582;
}
}
@@ -8185,7 +9364,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdh8", 9) == 0)
{
{
-return dev_storage + 453;
+return dev_storage + 581;
}
}
@@ -8200,7 +9379,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdh7", 9) == 0)
{
{
-return dev_storage + 452;
+return dev_storage + 580;
}
}
@@ -8215,7 +9394,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdh6", 9) == 0)
{
{
-return dev_storage + 451;
+return dev_storage + 579;
}
}
@@ -8230,7 +9409,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdh5", 9) == 0)
{
{
-return dev_storage + 450;
+return dev_storage + 578;
}
}
@@ -8245,7 +9424,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdh4", 9) == 0)
{
{
-return dev_storage + 449;
+return dev_storage + 577;
}
}
@@ -8260,7 +9439,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdh3", 9) == 0)
{
{
-return dev_storage + 448;
+return dev_storage + 576;
}
}
@@ -8275,7 +9454,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdh2", 9) == 0)
{
{
-return dev_storage + 447;
+return dev_storage + 575;
}
}
@@ -8290,7 +9469,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdh1", 9) == 0)
{
{
-return dev_storage + 446;
+return dev_storage + 574;
}
}
@@ -8314,7 +9493,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdg9", 9) == 0)
{
{
-return dev_storage + 439;
+return dev_storage + 567;
}
}
@@ -8329,7 +9508,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdg8", 9) == 0)
{
{
-return dev_storage + 438;
+return dev_storage + 566;
}
}
@@ -8344,7 +9523,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdg7", 9) == 0)
{
{
-return dev_storage + 437;
+return dev_storage + 565;
}
}
@@ -8359,7 +9538,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdg6", 9) == 0)
{
{
-return dev_storage + 436;
+return dev_storage + 564;
}
}
@@ -8374,7 +9553,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdg5", 9) == 0)
{
{
-return dev_storage + 435;
+return dev_storage + 563;
}
}
@@ -8389,7 +9568,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdg4", 9) == 0)
{
{
-return dev_storage + 434;
+return dev_storage + 562;
}
}
@@ -8404,7 +9583,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdg3", 9) == 0)
{
{
-return dev_storage + 433;
+return dev_storage + 561;
}
}
@@ -8419,7 +9598,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdg2", 9) == 0)
{
{
-return dev_storage + 432;
+return dev_storage + 560;
}
}
@@ -8434,7 +9613,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdg1", 9) == 0)
{
{
-return dev_storage + 431;
+return dev_storage + 559;
}
}
@@ -8458,7 +9637,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdf9", 9) == 0)
{
{
-return dev_storage + 424;
+return dev_storage + 552;
}
}
@@ -8473,7 +9652,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdf8", 9) == 0)
{
{
-return dev_storage + 423;
+return dev_storage + 551;
}
}
@@ -8488,7 +9667,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdf7", 9) == 0)
{
{
-return dev_storage + 422;
+return dev_storage + 550;
}
}
@@ -8503,7 +9682,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdf6", 9) == 0)
{
{
-return dev_storage + 421;
+return dev_storage + 549;
}
}
@@ -8518,7 +9697,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdf5", 9) == 0)
{
{
-return dev_storage + 420;
+return dev_storage + 548;
}
}
@@ -8533,7 +9712,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdf4", 9) == 0)
{
{
-return dev_storage + 419;
+return dev_storage + 547;
}
}
@@ -8548,7 +9727,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdf3", 9) == 0)
{
{
-return dev_storage + 418;
+return dev_storage + 546;
}
}
@@ -8563,7 +9742,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdf2", 9) == 0)
{
{
-return dev_storage + 417;
+return dev_storage + 545;
}
}
@@ -8578,7 +9757,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdf1", 9) == 0)
{
{
-return dev_storage + 416;
+return dev_storage + 544;
}
}
@@ -8602,7 +9781,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sde9", 9) == 0)
{
{
-return dev_storage + 409;
+return dev_storage + 537;
}
}
@@ -8617,7 +9796,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sde8", 9) == 0)
{
{
-return dev_storage + 408;
+return dev_storage + 536;
}
}
@@ -8632,7 +9811,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sde7", 9) == 0)
{
{
-return dev_storage + 407;
+return dev_storage + 535;
}
}
@@ -8647,7 +9826,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sde6", 9) == 0)
{
{
-return dev_storage + 406;
+return dev_storage + 534;
}
}
@@ -8662,7 +9841,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sde5", 9) == 0)
{
{
-return dev_storage + 405;
+return dev_storage + 533;
}
}
@@ -8677,7 +9856,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sde4", 9) == 0)
{
{
-return dev_storage + 404;
+return dev_storage + 532;
}
}
@@ -8692,7 +9871,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sde3", 9) == 0)
{
{
-return dev_storage + 403;
+return dev_storage + 531;
}
}
@@ -8707,7 +9886,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sde2", 9) == 0)
{
{
-return dev_storage + 402;
+return dev_storage + 530;
}
}
@@ -8722,7 +9901,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sde1", 9) == 0)
{
{
-return dev_storage + 401;
+return dev_storage + 529;
}
}
@@ -8746,7 +9925,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sddx", 9) == 0)
{
{
-return dev_storage + 2002;
+return dev_storage + 2130;
}
}
@@ -8761,7 +9940,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sddw", 9) == 0)
{
{
-return dev_storage + 2001;
+return dev_storage + 2129;
}
}
@@ -8776,7 +9955,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sddv", 9) == 0)
{
{
-return dev_storage + 2000;
+return dev_storage + 2128;
}
}
@@ -8791,7 +9970,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sddu", 9) == 0)
{
{
-return dev_storage + 1999;
+return dev_storage + 2127;
}
}
@@ -8806,7 +9985,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sddt", 9) == 0)
{
{
-return dev_storage + 1998;
+return dev_storage + 2126;
}
}
@@ -8821,7 +10000,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdds", 9) == 0)
{
{
-return dev_storage + 1997;
+return dev_storage + 2125;
}
}
@@ -8836,7 +10015,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sddr", 9) == 0)
{
{
-return dev_storage + 1996;
+return dev_storage + 2124;
}
}
@@ -8851,7 +10030,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sddq", 9) == 0)
{
{
-return dev_storage + 1995;
+return dev_storage + 2123;
}
}
@@ -8866,7 +10045,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sddp", 9) == 0)
{
{
-return dev_storage + 1994;
+return dev_storage + 2122;
}
}
@@ -8881,7 +10060,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sddo", 9) == 0)
{
{
-return dev_storage + 1993;
+return dev_storage + 2121;
}
}
@@ -8896,7 +10075,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sddn", 9) == 0)
{
{
-return dev_storage + 1992;
+return dev_storage + 2120;
}
}
@@ -8911,7 +10090,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sddm", 9) == 0)
{
{
-return dev_storage + 1991;
+return dev_storage + 2119;
}
}
@@ -8926,7 +10105,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sddl", 9) == 0)
{
{
-return dev_storage + 1990;
+return dev_storage + 2118;
}
}
@@ -8941,7 +10120,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sddk", 9) == 0)
{
{
-return dev_storage + 1989;
+return dev_storage + 2117;
}
}
@@ -8956,7 +10135,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sddj", 9) == 0)
{
{
-return dev_storage + 1988;
+return dev_storage + 2116;
}
}
@@ -8971,7 +10150,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sddi", 9) == 0)
{
{
-return dev_storage + 1987;
+return dev_storage + 2115;
}
}
@@ -8986,7 +10165,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sddh", 9) == 0)
{
{
-return dev_storage + 1986;
+return dev_storage + 2114;
}
}
@@ -9001,7 +10180,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sddg", 9) == 0)
{
{
-return dev_storage + 1985;
+return dev_storage + 2113;
}
}
@@ -9016,7 +10195,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sddf", 9) == 0)
{
{
-return dev_storage + 1984;
+return dev_storage + 2112;
}
}
@@ -9031,7 +10210,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdde", 9) == 0)
{
{
-return dev_storage + 1983;
+return dev_storage + 2111;
}
}
@@ -9046,7 +10225,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sddd", 9) == 0)
{
{
-return dev_storage + 1982;
+return dev_storage + 2110;
}
}
@@ -9061,7 +10240,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sddc", 9) == 0)
{
{
-return dev_storage + 1981;
+return dev_storage + 2109;
}
}
@@ -9076,7 +10255,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sddb", 9) == 0)
{
{
-return dev_storage + 1980;
+return dev_storage + 2108;
}
}
@@ -9091,7 +10270,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdda", 9) == 0)
{
{
-return dev_storage + 1979;
+return dev_storage + 2107;
}
}
@@ -9109,7 +10288,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdd9", 9) == 0)
{
{
-return dev_storage + 394;
+return dev_storage + 522;
}
}
@@ -9124,7 +10303,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/scd9", 9) == 0)
{
{
-return dev_storage + 308;
+return dev_storage + 436;
}
}
@@ -9148,7 +10327,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdd8", 9) == 0)
{
{
-return dev_storage + 393;
+return dev_storage + 521;
}
}
@@ -9163,7 +10342,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/scd8", 9) == 0)
{
{
-return dev_storage + 307;
+return dev_storage + 435;
}
}
@@ -9187,7 +10366,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdd7", 9) == 0)
{
{
-return dev_storage + 392;
+return dev_storage + 520;
}
}
@@ -9202,7 +10381,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/scd7", 9) == 0)
{
{
-return dev_storage + 306;
+return dev_storage + 434;
}
}
@@ -9226,7 +10405,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdd6", 9) == 0)
{
{
-return dev_storage + 391;
+return dev_storage + 519;
}
}
@@ -9241,7 +10420,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/scd6", 9) == 0)
{
{
-return dev_storage + 305;
+return dev_storage + 433;
}
}
@@ -9265,7 +10444,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdd5", 9) == 0)
{
{
-return dev_storage + 390;
+return dev_storage + 518;
}
}
@@ -9280,7 +10459,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/scd5", 9) == 0)
{
{
-return dev_storage + 304;
+return dev_storage + 432;
}
}
@@ -9304,7 +10483,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdd4", 9) == 0)
{
{
-return dev_storage + 389;
+return dev_storage + 517;
}
}
@@ -9319,7 +10498,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/scd4", 9) == 0)
{
{
-return dev_storage + 303;
+return dev_storage + 431;
}
}
@@ -9343,7 +10522,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdd3", 9) == 0)
{
{
-return dev_storage + 388;
+return dev_storage + 516;
}
}
@@ -9358,7 +10537,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/scd3", 9) == 0)
{
{
-return dev_storage + 302;
+return dev_storage + 430;
}
}
@@ -9382,7 +10561,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdd2", 9) == 0)
{
{
-return dev_storage + 387;
+return dev_storage + 515;
}
}
@@ -9397,7 +10576,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/scd2", 9) == 0)
{
{
-return dev_storage + 301;
+return dev_storage + 429;
}
}
@@ -9421,7 +10600,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdd1", 9) == 0)
{
{
-return dev_storage + 386;
+return dev_storage + 514;
}
}
@@ -9436,7 +10615,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/scd1", 9) == 0)
{
{
-return dev_storage + 300;
+return dev_storage + 428;
}
}
@@ -9457,7 +10636,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/scd0", 9) == 0)
{
{
-return dev_storage + 299;
+return dev_storage + 427;
}
}
@@ -9481,7 +10660,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdcz", 9) == 0)
{
{
-return dev_storage + 1588;
+return dev_storage + 1716;
}
}
@@ -9496,7 +10675,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdcy", 9) == 0)
{
{
-return dev_storage + 1587;
+return dev_storage + 1715;
}
}
@@ -9511,7 +10690,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdcx", 9) == 0)
{
{
-return dev_storage + 1586;
+return dev_storage + 1714;
}
}
@@ -9526,7 +10705,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdcw", 9) == 0)
{
{
-return dev_storage + 1585;
+return dev_storage + 1713;
}
}
@@ -9541,7 +10720,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdcv", 9) == 0)
{
{
-return dev_storage + 1584;
+return dev_storage + 1712;
}
}
@@ -9556,7 +10735,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdcu", 9) == 0)
{
{
-return dev_storage + 1583;
+return dev_storage + 1711;
}
}
@@ -9571,7 +10750,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdct", 9) == 0)
{
{
-return dev_storage + 1582;
+return dev_storage + 1710;
}
}
@@ -9586,7 +10765,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdcs", 9) == 0)
{
{
-return dev_storage + 1581;
+return dev_storage + 1709;
}
}
@@ -9601,7 +10780,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdcr", 9) == 0)
{
{
-return dev_storage + 1580;
+return dev_storage + 1708;
}
}
@@ -9616,7 +10795,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdcq", 9) == 0)
{
{
-return dev_storage + 1579;
+return dev_storage + 1707;
}
}
@@ -9631,7 +10810,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdcp", 9) == 0)
{
{
-return dev_storage + 1578;
+return dev_storage + 1706;
}
}
@@ -9646,7 +10825,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdco", 9) == 0)
{
{
-return dev_storage + 1577;
+return dev_storage + 1705;
}
}
@@ -9661,7 +10840,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdcn", 9) == 0)
{
{
-return dev_storage + 1576;
+return dev_storage + 1704;
}
}
@@ -9676,7 +10855,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdcm", 9) == 0)
{
{
-return dev_storage + 1575;
+return dev_storage + 1703;
}
}
@@ -9691,7 +10870,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdcl", 9) == 0)
{
{
-return dev_storage + 1574;
+return dev_storage + 1702;
}
}
@@ -9706,7 +10885,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdck", 9) == 0)
{
{
-return dev_storage + 1573;
+return dev_storage + 1701;
}
}
@@ -9721,7 +10900,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdcj", 9) == 0)
{
{
-return dev_storage + 1572;
+return dev_storage + 1700;
}
}
@@ -9736,7 +10915,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdci", 9) == 0)
{
{
-return dev_storage + 1571;
+return dev_storage + 1699;
}
}
@@ -9751,7 +10930,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdch", 9) == 0)
{
{
-return dev_storage + 1570;
+return dev_storage + 1698;
}
}
@@ -9766,7 +10945,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdcg", 9) == 0)
{
{
-return dev_storage + 1569;
+return dev_storage + 1697;
}
}
@@ -9781,7 +10960,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdcf", 9) == 0)
{
{
-return dev_storage + 1568;
+return dev_storage + 1696;
}
}
@@ -9796,7 +10975,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdce", 9) == 0)
{
{
-return dev_storage + 1567;
+return dev_storage + 1695;
}
}
@@ -9811,7 +10990,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdcd", 9) == 0)
{
{
-return dev_storage + 1566;
+return dev_storage + 1694;
}
}
@@ -9826,7 +11005,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdcc", 9) == 0)
{
{
-return dev_storage + 1565;
+return dev_storage + 1693;
}
}
@@ -9841,7 +11020,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdcb", 9) == 0)
{
{
-return dev_storage + 1564;
+return dev_storage + 1692;
}
}
@@ -9856,7 +11035,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdca", 9) == 0)
{
{
-return dev_storage + 1563;
+return dev_storage + 1691;
}
}
@@ -9871,7 +11050,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdc9", 9) == 0)
{
{
-return dev_storage + 379;
+return dev_storage + 507;
}
}
@@ -9886,7 +11065,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdc8", 9) == 0)
{
{
-return dev_storage + 378;
+return dev_storage + 506;
}
}
@@ -9901,7 +11080,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdc7", 9) == 0)
{
{
-return dev_storage + 377;
+return dev_storage + 505;
}
}
@@ -9916,7 +11095,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdc6", 9) == 0)
{
{
-return dev_storage + 376;
+return dev_storage + 504;
}
}
@@ -9931,7 +11110,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdc5", 9) == 0)
{
{
-return dev_storage + 375;
+return dev_storage + 503;
}
}
@@ -9946,7 +11125,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdc4", 9) == 0)
{
{
-return dev_storage + 374;
+return dev_storage + 502;
}
}
@@ -9961,7 +11140,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdc3", 9) == 0)
{
{
-return dev_storage + 373;
+return dev_storage + 501;
}
}
@@ -9976,7 +11155,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdc2", 9) == 0)
{
{
-return dev_storage + 372;
+return dev_storage + 500;
}
}
@@ -9991,7 +11170,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdc1", 9) == 0)
{
{
-return dev_storage + 371;
+return dev_storage + 499;
}
}
@@ -10015,7 +11194,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdbz", 9) == 0)
{
{
-return dev_storage + 1172;
+return dev_storage + 1300;
}
}
@@ -10030,7 +11209,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdby", 9) == 0)
{
{
-return dev_storage + 1171;
+return dev_storage + 1299;
}
}
@@ -10045,7 +11224,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdbx", 9) == 0)
{
{
-return dev_storage + 1170;
+return dev_storage + 1298;
}
}
@@ -10060,7 +11239,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdbw", 9) == 0)
{
{
-return dev_storage + 1169;
+return dev_storage + 1297;
}
}
@@ -10075,7 +11254,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdbv", 9) == 0)
{
{
-return dev_storage + 1168;
+return dev_storage + 1296;
}
}
@@ -10090,7 +11269,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdbu", 9) == 0)
{
{
-return dev_storage + 1167;
+return dev_storage + 1295;
}
}
@@ -10105,7 +11284,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdbt", 9) == 0)
{
{
-return dev_storage + 1166;
+return dev_storage + 1294;
}
}
@@ -10120,7 +11299,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdbs", 9) == 0)
{
{
-return dev_storage + 1165;
+return dev_storage + 1293;
}
}
@@ -10135,7 +11314,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdbr", 9) == 0)
{
{
-return dev_storage + 1164;
+return dev_storage + 1292;
}
}
@@ -10150,7 +11329,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdbq", 9) == 0)
{
{
-return dev_storage + 1163;
+return dev_storage + 1291;
}
}
@@ -10165,7 +11344,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdbp", 9) == 0)
{
{
-return dev_storage + 1162;
+return dev_storage + 1290;
}
}
@@ -10180,7 +11359,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdbo", 9) == 0)
{
{
-return dev_storage + 1161;
+return dev_storage + 1289;
}
}
@@ -10195,7 +11374,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdbn", 9) == 0)
{
{
-return dev_storage + 1160;
+return dev_storage + 1288;
}
}
@@ -10210,7 +11389,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdbm", 9) == 0)
{
{
-return dev_storage + 1159;
+return dev_storage + 1287;
}
}
@@ -10225,7 +11404,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdbl", 9) == 0)
{
{
-return dev_storage + 1158;
+return dev_storage + 1286;
}
}
@@ -10240,7 +11419,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdbk", 9) == 0)
{
{
-return dev_storage + 1157;
+return dev_storage + 1285;
}
}
@@ -10255,7 +11434,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdbj", 9) == 0)
{
{
-return dev_storage + 1156;
+return dev_storage + 1284;
}
}
@@ -10270,7 +11449,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdbi", 9) == 0)
{
{
-return dev_storage + 1155;
+return dev_storage + 1283;
}
}
@@ -10285,7 +11464,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdbh", 9) == 0)
{
{
-return dev_storage + 1154;
+return dev_storage + 1282;
}
}
@@ -10300,7 +11479,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdbg", 9) == 0)
{
{
-return dev_storage + 1153;
+return dev_storage + 1281;
}
}
@@ -10315,7 +11494,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdbf", 9) == 0)
{
{
-return dev_storage + 1152;
+return dev_storage + 1280;
}
}
@@ -10330,7 +11509,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdbe", 9) == 0)
{
{
-return dev_storage + 1151;
+return dev_storage + 1279;
}
}
@@ -10345,7 +11524,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdbd", 9) == 0)
{
{
-return dev_storage + 1150;
+return dev_storage + 1278;
}
}
@@ -10360,7 +11539,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdbc", 9) == 0)
{
{
-return dev_storage + 1149;
+return dev_storage + 1277;
}
}
@@ -10375,7 +11554,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdbb", 9) == 0)
{
{
-return dev_storage + 1148;
+return dev_storage + 1276;
}
}
@@ -10390,7 +11569,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdba", 9) == 0)
{
{
-return dev_storage + 1147;
+return dev_storage + 1275;
}
}
@@ -10405,7 +11584,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdb9", 9) == 0)
{
{
-return dev_storage + 364;
+return dev_storage + 492;
}
}
@@ -10420,7 +11599,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdb8", 9) == 0)
{
{
-return dev_storage + 363;
+return dev_storage + 491;
}
}
@@ -10435,7 +11614,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdb7", 9) == 0)
{
{
-return dev_storage + 362;
+return dev_storage + 490;
}
}
@@ -10450,7 +11629,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdb6", 9) == 0)
{
{
-return dev_storage + 361;
+return dev_storage + 489;
}
}
@@ -10465,7 +11644,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdb5", 9) == 0)
{
{
-return dev_storage + 360;
+return dev_storage + 488;
}
}
@@ -10480,7 +11659,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdb4", 9) == 0)
{
{
-return dev_storage + 359;
+return dev_storage + 487;
}
}
@@ -10495,7 +11674,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdb3", 9) == 0)
{
{
-return dev_storage + 358;
+return dev_storage + 486;
}
}
@@ -10510,7 +11689,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdb2", 9) == 0)
{
{
-return dev_storage + 357;
+return dev_storage + 485;
}
}
@@ -10525,7 +11704,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdb1", 9) == 0)
{
{
-return dev_storage + 356;
+return dev_storage + 484;
}
}
@@ -10549,7 +11728,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdaz", 9) == 0)
{
{
-return dev_storage + 756;
+return dev_storage + 884;
}
}
@@ -10564,7 +11743,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sday", 9) == 0)
{
{
-return dev_storage + 755;
+return dev_storage + 883;
}
}
@@ -10579,7 +11758,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdax", 9) == 0)
{
{
-return dev_storage + 754;
+return dev_storage + 882;
}
}
@@ -10594,7 +11773,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdaw", 9) == 0)
{
{
-return dev_storage + 753;
+return dev_storage + 881;
}
}
@@ -10609,7 +11788,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdav", 9) == 0)
{
{
-return dev_storage + 752;
+return dev_storage + 880;
}
}
@@ -10624,7 +11803,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdau", 9) == 0)
{
{
-return dev_storage + 751;
+return dev_storage + 879;
}
}
@@ -10639,7 +11818,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdat", 9) == 0)
{
{
-return dev_storage + 750;
+return dev_storage + 878;
}
}
@@ -10654,7 +11833,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdas", 9) == 0)
{
{
-return dev_storage + 749;
+return dev_storage + 877;
}
}
@@ -10669,7 +11848,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdar", 9) == 0)
{
{
-return dev_storage + 748;
+return dev_storage + 876;
}
}
@@ -10684,7 +11863,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdaq", 9) == 0)
{
{
-return dev_storage + 747;
+return dev_storage + 875;
}
}
@@ -10699,7 +11878,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdap", 9) == 0)
{
{
-return dev_storage + 746;
+return dev_storage + 874;
}
}
@@ -10714,7 +11893,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdao", 9) == 0)
{
{
-return dev_storage + 745;
+return dev_storage + 873;
}
}
@@ -10729,7 +11908,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdan", 9) == 0)
{
{
-return dev_storage + 744;
+return dev_storage + 872;
}
}
@@ -10744,7 +11923,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdam", 9) == 0)
{
{
-return dev_storage + 743;
+return dev_storage + 871;
}
}
@@ -10759,7 +11938,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdal", 9) == 0)
{
{
-return dev_storage + 742;
+return dev_storage + 870;
}
}
@@ -10774,7 +11953,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdak", 9) == 0)
{
{
-return dev_storage + 741;
+return dev_storage + 869;
}
}
@@ -10789,7 +11968,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdaj", 9) == 0)
{
{
-return dev_storage + 740;
+return dev_storage + 868;
}
}
@@ -10804,7 +11983,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdai", 9) == 0)
{
{
-return dev_storage + 739;
+return dev_storage + 867;
}
}
@@ -10819,7 +11998,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdah", 9) == 0)
{
{
-return dev_storage + 738;
+return dev_storage + 866;
}
}
@@ -10834,7 +12013,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdag", 9) == 0)
{
{
-return dev_storage + 737;
+return dev_storage + 865;
}
}
@@ -10849,7 +12028,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdaf", 9) == 0)
{
{
-return dev_storage + 736;
+return dev_storage + 864;
}
}
@@ -10864,7 +12043,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdae", 9) == 0)
{
{
-return dev_storage + 735;
+return dev_storage + 863;
}
}
@@ -10879,7 +12058,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdad", 9) == 0)
{
{
-return dev_storage + 734;
+return dev_storage + 862;
}
}
@@ -10894,7 +12073,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdac", 9) == 0)
{
{
-return dev_storage + 733;
+return dev_storage + 861;
}
}
@@ -10909,7 +12088,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdab", 9) == 0)
{
{
-return dev_storage + 732;
+return dev_storage + 860;
}
}
@@ -10924,7 +12103,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdaa", 9) == 0)
{
{
-return dev_storage + 731;
+return dev_storage + 859;
}
}
@@ -10939,7 +12118,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sda9", 9) == 0)
{
{
-return dev_storage + 349;
+return dev_storage + 477;
}
}
@@ -10954,7 +12133,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sda8", 9) == 0)
{
{
-return dev_storage + 348;
+return dev_storage + 476;
}
}
@@ -10969,7 +12148,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sda7", 9) == 0)
{
{
-return dev_storage + 347;
+return dev_storage + 475;
}
}
@@ -10984,7 +12163,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sda6", 9) == 0)
{
{
-return dev_storage + 346;
+return dev_storage + 474;
}
}
@@ -10999,7 +12178,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sda5", 9) == 0)
{
{
-return dev_storage + 345;
+return dev_storage + 473;
}
}
@@ -11014,7 +12193,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sda4", 9) == 0)
{
{
-return dev_storage + 344;
+return dev_storage + 472;
}
}
@@ -11029,7 +12208,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sda3", 9) == 0)
{
{
-return dev_storage + 343;
+return dev_storage + 471;
}
}
@@ -11044,7 +12223,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sda2", 9) == 0)
{
{
-return dev_storage + 342;
+return dev_storage + 470;
}
}
@@ -11059,7 +12238,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sda1", 9) == 0)
{
{
-return dev_storage + 341;
+return dev_storage + 469;
}
}
@@ -11083,7 +12262,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/st99", 9) == 0)
{
{
-return dev_storage + 2478;
+return dev_storage + 2606;
}
}
@@ -11098,7 +12277,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/st98", 9) == 0)
{
{
-return dev_storage + 2477;
+return dev_storage + 2605;
}
}
@@ -11113,7 +12292,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/st97", 9) == 0)
{
{
-return dev_storage + 2476;
+return dev_storage + 2604;
}
}
@@ -11128,7 +12307,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/st96", 9) == 0)
{
{
-return dev_storage + 2475;
+return dev_storage + 2603;
}
}
@@ -11143,7 +12322,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/st95", 9) == 0)
{
{
-return dev_storage + 2474;
+return dev_storage + 2602;
}
}
@@ -11158,7 +12337,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/st94", 9) == 0)
{
{
-return dev_storage + 2473;
+return dev_storage + 2601;
}
}
@@ -11173,7 +12352,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/st93", 9) == 0)
{
{
-return dev_storage + 2472;
+return dev_storage + 2600;
}
}
@@ -11188,7 +12367,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/st92", 9) == 0)
{
{
-return dev_storage + 2471;
+return dev_storage + 2599;
}
}
@@ -11203,7 +12382,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/st91", 9) == 0)
{
{
-return dev_storage + 2470;
+return dev_storage + 2598;
}
}
@@ -11218,7 +12397,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/st90", 9) == 0)
{
{
-return dev_storage + 2469;
+return dev_storage + 2597;
}
}
@@ -11242,7 +12421,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/st89", 9) == 0)
{
{
-return dev_storage + 2468;
+return dev_storage + 2596;
}
}
@@ -11257,7 +12436,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/st88", 9) == 0)
{
{
-return dev_storage + 2467;
+return dev_storage + 2595;
}
}
@@ -11272,7 +12451,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/st87", 9) == 0)
{
{
-return dev_storage + 2466;
+return dev_storage + 2594;
}
}
@@ -11287,7 +12466,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/st86", 9) == 0)
{
{
-return dev_storage + 2465;
+return dev_storage + 2593;
}
}
@@ -11302,7 +12481,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/st85", 9) == 0)
{
{
-return dev_storage + 2464;
+return dev_storage + 2592;
}
}
@@ -11317,7 +12496,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/st84", 9) == 0)
{
{
-return dev_storage + 2463;
+return dev_storage + 2591;
}
}
@@ -11332,7 +12511,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/st83", 9) == 0)
{
{
-return dev_storage + 2462;
+return dev_storage + 2590;
}
}
@@ -11347,7 +12526,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/st82", 9) == 0)
{
{
-return dev_storage + 2461;
+return dev_storage + 2589;
}
}
@@ -11362,7 +12541,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/st81", 9) == 0)
{
{
-return dev_storage + 2460;
+return dev_storage + 2588;
}
}
@@ -11377,7 +12556,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/st80", 9) == 0)
{
{
-return dev_storage + 2459;
+return dev_storage + 2587;
}
}
@@ -11401,7 +12580,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/st79", 9) == 0)
{
{
-return dev_storage + 2458;
+return dev_storage + 2586;
}
}
@@ -11416,7 +12595,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/st78", 9) == 0)
{
{
-return dev_storage + 2457;
+return dev_storage + 2585;
}
}
@@ -11431,7 +12610,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/st77", 9) == 0)
{
{
-return dev_storage + 2456;
+return dev_storage + 2584;
}
}
@@ -11446,7 +12625,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/st76", 9) == 0)
{
{
-return dev_storage + 2455;
+return dev_storage + 2583;
}
}
@@ -11461,7 +12640,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/st75", 9) == 0)
{
{
-return dev_storage + 2454;
+return dev_storage + 2582;
}
}
@@ -11476,7 +12655,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/st74", 9) == 0)
{
{
-return dev_storage + 2453;
+return dev_storage + 2581;
}
}
@@ -11491,7 +12670,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/st73", 9) == 0)
{
{
-return dev_storage + 2452;
+return dev_storage + 2580;
}
}
@@ -11506,7 +12685,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/st72", 9) == 0)
{
{
-return dev_storage + 2451;
+return dev_storage + 2579;
}
}
@@ -11521,7 +12700,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/st71", 9) == 0)
{
{
-return dev_storage + 2450;
+return dev_storage + 2578;
}
}
@@ -11536,7 +12715,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/st70", 9) == 0)
{
{
-return dev_storage + 2449;
+return dev_storage + 2577;
}
}
@@ -11560,7 +12739,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/st69", 9) == 0)
{
{
-return dev_storage + 2448;
+return dev_storage + 2576;
}
}
@@ -11575,7 +12754,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/st68", 9) == 0)
{
{
-return dev_storage + 2447;
+return dev_storage + 2575;
}
}
@@ -11590,7 +12769,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/st67", 9) == 0)
{
{
-return dev_storage + 2446;
+return dev_storage + 2574;
}
}
@@ -11605,7 +12784,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/st66", 9) == 0)
{
{
-return dev_storage + 2445;
+return dev_storage + 2573;
}
}
@@ -11620,7 +12799,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/st65", 9) == 0)
{
{
-return dev_storage + 2444;
+return dev_storage + 2572;
}
}
@@ -11635,7 +12814,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/st64", 9) == 0)
{
{
-return dev_storage + 2443;
+return dev_storage + 2571;
}
}
@@ -11650,7 +12829,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/st63", 9) == 0)
{
{
-return dev_storage + 2442;
+return dev_storage + 2570;
}
}
@@ -11665,7 +12844,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/st62", 9) == 0)
{
{
-return dev_storage + 2441;
+return dev_storage + 2569;
}
}
@@ -11680,7 +12859,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/st61", 9) == 0)
{
{
-return dev_storage + 2440;
+return dev_storage + 2568;
}
}
@@ -11695,7 +12874,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/st60", 9) == 0)
{
{
-return dev_storage + 2439;
+return dev_storage + 2567;
}
}
@@ -11719,7 +12898,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/st59", 9) == 0)
{
{
-return dev_storage + 2438;
+return dev_storage + 2566;
}
}
@@ -11734,7 +12913,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/st58", 9) == 0)
{
{
-return dev_storage + 2437;
+return dev_storage + 2565;
}
}
@@ -11749,7 +12928,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/st57", 9) == 0)
{
{
-return dev_storage + 2436;
+return dev_storage + 2564;
}
}
@@ -11764,7 +12943,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/st56", 9) == 0)
{
{
-return dev_storage + 2435;
+return dev_storage + 2563;
}
}
@@ -11779,7 +12958,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/st55", 9) == 0)
{
{
-return dev_storage + 2434;
+return dev_storage + 2562;
}
}
@@ -11794,7 +12973,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/st54", 9) == 0)
{
{
-return dev_storage + 2433;
+return dev_storage + 2561;
}
}
@@ -11809,7 +12988,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/st53", 9) == 0)
{
{
-return dev_storage + 2432;
+return dev_storage + 2560;
}
}
@@ -11824,7 +13003,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/st52", 9) == 0)
{
{
-return dev_storage + 2431;
+return dev_storage + 2559;
}
}
@@ -11839,7 +13018,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/st51", 9) == 0)
{
{
-return dev_storage + 2430;
+return dev_storage + 2558;
}
}
@@ -11854,7 +13033,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/st50", 9) == 0)
{
{
-return dev_storage + 2429;
+return dev_storage + 2557;
}
}
@@ -11878,7 +13057,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/st49", 9) == 0)
{
{
-return dev_storage + 2428;
+return dev_storage + 2556;
}
}
@@ -11893,7 +13072,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/st48", 9) == 0)
{
{
-return dev_storage + 2427;
+return dev_storage + 2555;
}
}
@@ -11908,7 +13087,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/st47", 9) == 0)
{
{
-return dev_storage + 2426;
+return dev_storage + 2554;
}
}
@@ -11923,7 +13102,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/st46", 9) == 0)
{
{
-return dev_storage + 2425;
+return dev_storage + 2553;
}
}
@@ -11938,7 +13117,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/st45", 9) == 0)
{
{
-return dev_storage + 2424;
+return dev_storage + 2552;
}
}
@@ -11953,7 +13132,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/st44", 9) == 0)
{
{
-return dev_storage + 2423;
+return dev_storage + 2551;
}
}
@@ -11968,7 +13147,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/st43", 9) == 0)
{
{
-return dev_storage + 2422;
+return dev_storage + 2550;
}
}
@@ -11983,7 +13162,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/st42", 9) == 0)
{
{
-return dev_storage + 2421;
+return dev_storage + 2549;
}
}
@@ -11998,7 +13177,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/st41", 9) == 0)
{
{
-return dev_storage + 2420;
+return dev_storage + 2548;
}
}
@@ -12013,7 +13192,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/st40", 9) == 0)
{
{
-return dev_storage + 2419;
+return dev_storage + 2547;
}
}
@@ -12037,7 +13216,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/st39", 9) == 0)
{
{
-return dev_storage + 2418;
+return dev_storage + 2546;
}
}
@@ -12052,7 +13231,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/st38", 9) == 0)
{
{
-return dev_storage + 2417;
+return dev_storage + 2545;
}
}
@@ -12067,7 +13246,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/st37", 9) == 0)
{
{
-return dev_storage + 2416;
+return dev_storage + 2544;
}
}
@@ -12082,7 +13261,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/st36", 9) == 0)
{
{
-return dev_storage + 2415;
+return dev_storage + 2543;
}
}
@@ -12097,7 +13276,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/st35", 9) == 0)
{
{
-return dev_storage + 2414;
+return dev_storage + 2542;
}
}
@@ -12112,7 +13291,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/st34", 9) == 0)
{
{
-return dev_storage + 2413;
+return dev_storage + 2541;
}
}
@@ -12127,7 +13306,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/st33", 9) == 0)
{
{
-return dev_storage + 2412;
+return dev_storage + 2540;
}
}
@@ -12142,7 +13321,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/st32", 9) == 0)
{
{
-return dev_storage + 2411;
+return dev_storage + 2539;
}
}
@@ -12157,7 +13336,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/st31", 9) == 0)
{
{
-return dev_storage + 2410;
+return dev_storage + 2538;
}
}
@@ -12172,7 +13351,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/st30", 9) == 0)
{
{
-return dev_storage + 2409;
+return dev_storage + 2537;
}
}
@@ -12196,7 +13375,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/st29", 9) == 0)
{
{
-return dev_storage + 2408;
+return dev_storage + 2536;
}
}
@@ -12211,7 +13390,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/st28", 9) == 0)
{
{
-return dev_storage + 2407;
+return dev_storage + 2535;
}
}
@@ -12226,7 +13405,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/st27", 9) == 0)
{
{
-return dev_storage + 2406;
+return dev_storage + 2534;
}
}
@@ -12241,7 +13420,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/st26", 9) == 0)
{
{
-return dev_storage + 2405;
+return dev_storage + 2533;
}
}
@@ -12256,7 +13435,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/st25", 9) == 0)
{
{
-return dev_storage + 2404;
+return dev_storage + 2532;
}
}
@@ -12271,7 +13450,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/st24", 9) == 0)
{
{
-return dev_storage + 2403;
+return dev_storage + 2531;
}
}
@@ -12286,7 +13465,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/st23", 9) == 0)
{
{
-return dev_storage + 2402;
+return dev_storage + 2530;
}
}
@@ -12301,7 +13480,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/st22", 9) == 0)
{
{
-return dev_storage + 2401;
+return dev_storage + 2529;
}
}
@@ -12316,7 +13495,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/st21", 9) == 0)
{
{
-return dev_storage + 2400;
+return dev_storage + 2528;
}
}
@@ -12331,7 +13510,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/st20", 9) == 0)
{
{
-return dev_storage + 2399;
+return dev_storage + 2527;
}
}
@@ -12355,7 +13534,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/st19", 9) == 0)
{
{
-return dev_storage + 2398;
+return dev_storage + 2526;
}
}
@@ -12370,7 +13549,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/st18", 9) == 0)
{
{
-return dev_storage + 2397;
+return dev_storage + 2525;
}
}
@@ -12385,7 +13564,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/st17", 9) == 0)
{
{
-return dev_storage + 2396;
+return dev_storage + 2524;
}
}
@@ -12400,7 +13579,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/st16", 9) == 0)
{
{
-return dev_storage + 2395;
+return dev_storage + 2523;
}
}
@@ -12418,7 +13597,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/st15", 9) == 0)
{
{
-return dev_storage + 2394;
+return dev_storage + 2522;
}
}
@@ -12433,7 +13612,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sr15", 9) == 0)
{
{
-return dev_storage + 2378;
+return dev_storage + 2506;
}
}
@@ -12448,7 +13627,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/fd15", 9) == 0)
{
{
-return dev_storage + 101;
+return dev_storage + 165;
}
}
@@ -12472,7 +13651,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/st14", 9) == 0)
{
{
-return dev_storage + 2393;
+return dev_storage + 2521;
}
}
@@ -12487,7 +13666,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sr14", 9) == 0)
{
{
-return dev_storage + 2377;
+return dev_storage + 2505;
}
}
@@ -12502,7 +13681,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/fd14", 9) == 0)
{
{
-return dev_storage + 100;
+return dev_storage + 164;
}
}
@@ -12526,7 +13705,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/st13", 9) == 0)
{
{
-return dev_storage + 2392;
+return dev_storage + 2520;
}
}
@@ -12541,7 +13720,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sr13", 9) == 0)
{
{
-return dev_storage + 2376;
+return dev_storage + 2504;
}
}
@@ -12556,7 +13735,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/fd13", 9) == 0)
{
{
-return dev_storage + 99;
+return dev_storage + 163;
}
}
@@ -12580,7 +13759,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/st12", 9) == 0)
{
{
-return dev_storage + 2391;
+return dev_storage + 2519;
}
}
@@ -12595,7 +13774,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sr12", 9) == 0)
{
{
-return dev_storage + 2375;
+return dev_storage + 2503;
}
}
@@ -12610,7 +13789,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/fd12", 9) == 0)
{
{
-return dev_storage + 98;
+return dev_storage + 162;
}
}
@@ -12634,7 +13813,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/st11", 9) == 0)
{
{
-return dev_storage + 2390;
+return dev_storage + 2518;
}
}
@@ -12649,7 +13828,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sr11", 9) == 0)
{
{
-return dev_storage + 2374;
+return dev_storage + 2502;
}
}
@@ -12664,7 +13843,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/fd11", 9) == 0)
{
{
-return dev_storage + 97;
+return dev_storage + 161;
}
}
@@ -12688,7 +13867,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/st10", 9) == 0)
{
{
-return dev_storage + 2389;
+return dev_storage + 2517;
}
}
@@ -12703,7 +13882,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sr10", 9) == 0)
{
{
-return dev_storage + 2373;
+return dev_storage + 2501;
}
}
@@ -12718,7 +13897,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/fd10", 9) == 0)
{
{
-return dev_storage + 96;
+return dev_storage + 160;
}
}
@@ -12775,7 +13954,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdcz9", 10) == 0)
{
{
-return dev_storage + 1972;
+return dev_storage + 2100;
}
}
@@ -12790,7 +13969,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdbz9", 10) == 0)
{
{
-return dev_storage + 1556;
+return dev_storage + 1684;
}
}
@@ -12805,7 +13984,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdaz9", 10) == 0)
{
{
-return dev_storage + 1140;
+return dev_storage + 1268;
}
}
@@ -12829,7 +14008,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdcy9", 10) == 0)
{
{
-return dev_storage + 1957;
+return dev_storage + 2085;
}
}
@@ -12844,7 +14023,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdby9", 10) == 0)
{
{
-return dev_storage + 1541;
+return dev_storage + 1669;
}
}
@@ -12859,7 +14038,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sday9", 10) == 0)
{
{
-return dev_storage + 1125;
+return dev_storage + 1253;
}
}
@@ -12883,7 +14062,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sddx9", 10) == 0)
{
{
-return dev_storage + 2356;
+return dev_storage + 2484;
}
}
@@ -12898,7 +14077,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdcx9", 10) == 0)
{
{
-return dev_storage + 1942;
+return dev_storage + 2070;
}
}
@@ -12913,7 +14092,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdbx9", 10) == 0)
{
{
-return dev_storage + 1526;
+return dev_storage + 1654;
}
}
@@ -12928,7 +14107,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdax9", 10) == 0)
{
{
-return dev_storage + 1110;
+return dev_storage + 1238;
}
}
@@ -12952,7 +14131,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sddw9", 10) == 0)
{
{
-return dev_storage + 2341;
+return dev_storage + 2469;
}
}
@@ -12967,7 +14146,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdcw9", 10) == 0)
{
{
-return dev_storage + 1927;
+return dev_storage + 2055;
}
}
@@ -12982,7 +14161,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdbw9", 10) == 0)
{
{
-return dev_storage + 1511;
+return dev_storage + 1639;
}
}
@@ -12997,7 +14176,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdaw9", 10) == 0)
{
{
-return dev_storage + 1095;
+return dev_storage + 1223;
}
}
@@ -13021,7 +14200,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sddv9", 10) == 0)
{
{
-return dev_storage + 2326;
+return dev_storage + 2454;
}
}
@@ -13036,7 +14215,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdcv9", 10) == 0)
{
{
-return dev_storage + 1912;
+return dev_storage + 2040;
}
}
@@ -13051,7 +14230,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdbv9", 10) == 0)
{
{
-return dev_storage + 1496;
+return dev_storage + 1624;
}
}
@@ -13066,7 +14245,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdav9", 10) == 0)
{
{
-return dev_storage + 1080;
+return dev_storage + 1208;
}
}
@@ -13090,7 +14269,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sddu9", 10) == 0)
{
{
-return dev_storage + 2311;
+return dev_storage + 2439;
}
}
@@ -13105,7 +14284,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdcu9", 10) == 0)
{
{
-return dev_storage + 1897;
+return dev_storage + 2025;
}
}
@@ -13120,7 +14299,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdbu9", 10) == 0)
{
{
-return dev_storage + 1481;
+return dev_storage + 1609;
}
}
@@ -13135,7 +14314,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdau9", 10) == 0)
{
{
-return dev_storage + 1065;
+return dev_storage + 1193;
}
}
@@ -13159,7 +14338,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sddt9", 10) == 0)
{
{
-return dev_storage + 2296;
+return dev_storage + 2424;
}
}
@@ -13174,7 +14353,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdct9", 10) == 0)
{
{
-return dev_storage + 1882;
+return dev_storage + 2010;
}
}
@@ -13189,7 +14368,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdbt9", 10) == 0)
{
{
-return dev_storage + 1466;
+return dev_storage + 1594;
}
}
@@ -13204,7 +14383,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdat9", 10) == 0)
{
{
-return dev_storage + 1050;
+return dev_storage + 1178;
}
}
@@ -13243,7 +14422,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdds9", 10) == 0)
{
{
-return dev_storage + 2281;
+return dev_storage + 2409;
}
}
@@ -13258,7 +14437,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdcs9", 10) == 0)
{
{
-return dev_storage + 1867;
+return dev_storage + 1995;
}
}
@@ -13273,7 +14452,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdbs9", 10) == 0)
{
{
-return dev_storage + 1451;
+return dev_storage + 1579;
}
}
@@ -13288,7 +14467,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdas9", 10) == 0)
{
{
-return dev_storage + 1035;
+return dev_storage + 1163;
}
}
@@ -13312,7 +14491,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sddr9", 10) == 0)
{
{
-return dev_storage + 2266;
+return dev_storage + 2394;
}
}
@@ -13327,7 +14506,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdcr9", 10) == 0)
{
{
-return dev_storage + 1852;
+return dev_storage + 1980;
}
}
@@ -13342,7 +14521,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdbr9", 10) == 0)
{
{
-return dev_storage + 1436;
+return dev_storage + 1564;
}
}
@@ -13357,7 +14536,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdar9", 10) == 0)
{
{
-return dev_storage + 1020;
+return dev_storage + 1148;
}
}
@@ -13381,7 +14560,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sddq9", 10) == 0)
{
{
-return dev_storage + 2251;
+return dev_storage + 2379;
}
}
@@ -13396,7 +14575,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdcq9", 10) == 0)
{
{
-return dev_storage + 1837;
+return dev_storage + 1965;
}
}
@@ -13411,7 +14590,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdbq9", 10) == 0)
{
{
-return dev_storage + 1421;
+return dev_storage + 1549;
}
}
@@ -13426,7 +14605,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdaq9", 10) == 0)
{
{
-return dev_storage + 1005;
+return dev_storage + 1133;
}
}
@@ -13450,7 +14629,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sddp9", 10) == 0)
{
{
-return dev_storage + 2236;
+return dev_storage + 2364;
}
}
@@ -13465,7 +14644,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdcp9", 10) == 0)
{
{
-return dev_storage + 1822;
+return dev_storage + 1950;
}
}
@@ -13480,7 +14659,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdbp9", 10) == 0)
{
{
-return dev_storage + 1406;
+return dev_storage + 1534;
}
}
@@ -13495,7 +14674,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdap9", 10) == 0)
{
{
-return dev_storage + 990;
+return dev_storage + 1118;
}
}
@@ -13519,7 +14698,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sddo9", 10) == 0)
{
{
-return dev_storage + 2221;
+return dev_storage + 2349;
}
}
@@ -13534,7 +14713,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdco9", 10) == 0)
{
{
-return dev_storage + 1807;
+return dev_storage + 1935;
}
}
@@ -13549,7 +14728,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdbo9", 10) == 0)
{
{
-return dev_storage + 1391;
+return dev_storage + 1519;
}
}
@@ -13564,7 +14743,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdao9", 10) == 0)
{
{
-return dev_storage + 975;
+return dev_storage + 1103;
}
}
@@ -13588,7 +14767,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sddn9", 10) == 0)
{
{
-return dev_storage + 2206;
+return dev_storage + 2334;
}
}
@@ -13603,7 +14782,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdcn9", 10) == 0)
{
{
-return dev_storage + 1792;
+return dev_storage + 1920;
}
}
@@ -13618,7 +14797,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdbn9", 10) == 0)
{
{
-return dev_storage + 1376;
+return dev_storage + 1504;
}
}
@@ -13633,7 +14812,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdan9", 10) == 0)
{
{
-return dev_storage + 960;
+return dev_storage + 1088;
}
}
@@ -13657,7 +14836,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sddm9", 10) == 0)
{
{
-return dev_storage + 2191;
+return dev_storage + 2319;
}
}
@@ -13672,7 +14851,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdcm9", 10) == 0)
{
{
-return dev_storage + 1777;
+return dev_storage + 1905;
}
}
@@ -13687,7 +14866,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdbm9", 10) == 0)
{
{
-return dev_storage + 1361;
+return dev_storage + 1489;
}
}
@@ -13702,7 +14881,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdam9", 10) == 0)
{
{
-return dev_storage + 945;
+return dev_storage + 1073;
}
}
@@ -13726,7 +14905,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sddl9", 10) == 0)
{
{
-return dev_storage + 2176;
+return dev_storage + 2304;
}
}
@@ -13741,7 +14920,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdcl9", 10) == 0)
{
{
-return dev_storage + 1762;
+return dev_storage + 1890;
}
}
@@ -13756,7 +14935,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdbl9", 10) == 0)
{
{
-return dev_storage + 1346;
+return dev_storage + 1474;
}
}
@@ -13771,7 +14950,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdal9", 10) == 0)
{
{
-return dev_storage + 930;
+return dev_storage + 1058;
}
}
@@ -13795,7 +14974,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sddk9", 10) == 0)
{
{
-return dev_storage + 2161;
+return dev_storage + 2289;
}
}
@@ -13810,7 +14989,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdck9", 10) == 0)
{
{
-return dev_storage + 1747;
+return dev_storage + 1875;
}
}
@@ -13825,7 +15004,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdbk9", 10) == 0)
{
{
-return dev_storage + 1331;
+return dev_storage + 1459;
}
}
@@ -13840,7 +15019,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdak9", 10) == 0)
{
{
-return dev_storage + 915;
+return dev_storage + 1043;
}
}
@@ -13864,7 +15043,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sddj9", 10) == 0)
{
{
-return dev_storage + 2146;
+return dev_storage + 2274;
}
}
@@ -13879,7 +15058,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdcj9", 10) == 0)
{
{
-return dev_storage + 1732;
+return dev_storage + 1860;
}
}
@@ -13894,7 +15073,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdbj9", 10) == 0)
{
{
-return dev_storage + 1316;
+return dev_storage + 1444;
}
}
@@ -13909,7 +15088,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdaj9", 10) == 0)
{
{
-return dev_storage + 900;
+return dev_storage + 1028;
}
}
@@ -13933,7 +15112,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sddi9", 10) == 0)
{
{
-return dev_storage + 2131;
+return dev_storage + 2259;
}
}
@@ -13948,7 +15127,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdci9", 10) == 0)
{
{
-return dev_storage + 1717;
+return dev_storage + 1845;
}
}
@@ -13963,7 +15142,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdbi9", 10) == 0)
{
{
-return dev_storage + 1301;
+return dev_storage + 1429;
}
}
@@ -13978,7 +15157,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdai9", 10) == 0)
{
{
-return dev_storage + 885;
+return dev_storage + 1013;
}
}
@@ -14002,7 +15181,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sddh9", 10) == 0)
{
{
-return dev_storage + 2116;
+return dev_storage + 2244;
}
}
@@ -14017,7 +15196,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdch9", 10) == 0)
{
{
-return dev_storage + 1702;
+return dev_storage + 1830;
}
}
@@ -14032,7 +15211,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdbh9", 10) == 0)
{
{
-return dev_storage + 1286;
+return dev_storage + 1414;
}
}
@@ -14047,7 +15226,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdah9", 10) == 0)
{
{
-return dev_storage + 870;
+return dev_storage + 998;
}
}
@@ -14071,7 +15250,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sddg9", 10) == 0)
{
{
-return dev_storage + 2101;
+return dev_storage + 2229;
}
}
@@ -14086,7 +15265,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdcg9", 10) == 0)
{
{
-return dev_storage + 1687;
+return dev_storage + 1815;
}
}
@@ -14101,7 +15280,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdbg9", 10) == 0)
{
{
-return dev_storage + 1271;
+return dev_storage + 1399;
}
}
@@ -14116,7 +15295,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdag9", 10) == 0)
{
{
-return dev_storage + 855;
+return dev_storage + 983;
}
}
@@ -14140,7 +15319,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sddf9", 10) == 0)
{
{
-return dev_storage + 2086;
+return dev_storage + 2214;
}
}
@@ -14155,7 +15334,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdcf9", 10) == 0)
{
{
-return dev_storage + 1672;
+return dev_storage + 1800;
}
}
@@ -14170,7 +15349,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdbf9", 10) == 0)
{
{
-return dev_storage + 1256;
+return dev_storage + 1384;
}
}
@@ -14185,7 +15364,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdaf9", 10) == 0)
{
{
-return dev_storage + 840;
+return dev_storage + 968;
}
}
@@ -14209,7 +15388,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdde9", 10) == 0)
{
{
-return dev_storage + 2071;
+return dev_storage + 2199;
}
}
@@ -14224,7 +15403,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdce9", 10) == 0)
{
{
-return dev_storage + 1657;
+return dev_storage + 1785;
}
}
@@ -14239,7 +15418,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdbe9", 10) == 0)
{
{
-return dev_storage + 1241;
+return dev_storage + 1369;
}
}
@@ -14254,7 +15433,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdae9", 10) == 0)
{
{
-return dev_storage + 825;
+return dev_storage + 953;
}
}
@@ -14278,7 +15457,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sddd9", 10) == 0)
{
{
-return dev_storage + 2056;
+return dev_storage + 2184;
}
}
@@ -14293,7 +15472,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdcd9", 10) == 0)
{
{
-return dev_storage + 1642;
+return dev_storage + 1770;
}
}
@@ -14308,7 +15487,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdbd9", 10) == 0)
{
{
-return dev_storage + 1226;
+return dev_storage + 1354;
}
}
@@ -14323,7 +15502,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdad9", 10) == 0)
{
{
-return dev_storage + 810;
+return dev_storage + 938;
}
}
@@ -14347,7 +15526,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sddc9", 10) == 0)
{
{
-return dev_storage + 2041;
+return dev_storage + 2169;
}
}
@@ -14362,7 +15541,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdcc9", 10) == 0)
{
{
-return dev_storage + 1627;
+return dev_storage + 1755;
}
}
@@ -14377,7 +15556,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdbc9", 10) == 0)
{
{
-return dev_storage + 1211;
+return dev_storage + 1339;
}
}
@@ -14392,7 +15571,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdac9", 10) == 0)
{
{
-return dev_storage + 795;
+return dev_storage + 923;
}
}
@@ -14416,7 +15595,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sddb9", 10) == 0)
{
{
-return dev_storage + 2026;
+return dev_storage + 2154;
}
}
@@ -14431,7 +15610,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdcb9", 10) == 0)
{
{
-return dev_storage + 1612;
+return dev_storage + 1740;
}
}
@@ -14446,7 +15625,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdbb9", 10) == 0)
{
{
-return dev_storage + 1196;
+return dev_storage + 1324;
}
}
@@ -14461,7 +15640,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdab9", 10) == 0)
{
{
-return dev_storage + 780;
+return dev_storage + 908;
}
}
@@ -14485,7 +15664,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdda9", 10) == 0)
{
{
-return dev_storage + 2011;
+return dev_storage + 2139;
}
}
@@ -14500,7 +15679,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdca9", 10) == 0)
{
{
-return dev_storage + 1597;
+return dev_storage + 1725;
}
}
@@ -14515,7 +15694,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdba9", 10) == 0)
{
{
-return dev_storage + 1181;
+return dev_storage + 1309;
}
}
@@ -14530,7 +15709,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdaa9", 10) == 0)
{
{
-return dev_storage + 765;
+return dev_storage + 893;
}
}
@@ -14551,7 +15730,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/ttyS9", 10) == 0)
{
{
-return dev_storage + 2517;
+return dev_storage + 2645;
}
}
@@ -14563,60 +15742,156 @@ return NULL;
}
}
case '9':
- if (strncmp (KR_keyword, "/dev/nst99", 10) == 0)
+ switch (KR_keyword [5])
{
+ case 'p':
+ if (strncmp (KR_keyword, "/dev/pty99", 10) == 0)
+ {
{
-return dev_storage + 203;
+return dev_storage + 397;
}
- }
- else
- {
+ }
+ else
+ {
+{
+return NULL;
+
+}
+ }
+ case 'n':
+ if (strncmp (KR_keyword, "/dev/nst99", 10) == 0)
+ {
+{
+return dev_storage + 267;
+
+}
+ }
+ else
+ {
+{
+return NULL;
+
+}
+ }
+ default:
{
return NULL;
}
}
case '8':
- if (strncmp (KR_keyword, "/dev/nst89", 10) == 0)
+ switch (KR_keyword [5])
{
+ case 'p':
+ if (strncmp (KR_keyword, "/dev/pty89", 10) == 0)
+ {
{
-return dev_storage + 193;
+return dev_storage + 387;
}
- }
- else
- {
+ }
+ else
+ {
+{
+return NULL;
+
+}
+ }
+ case 'n':
+ if (strncmp (KR_keyword, "/dev/nst89", 10) == 0)
+ {
+{
+return dev_storage + 257;
+
+}
+ }
+ else
+ {
+{
+return NULL;
+
+}
+ }
+ default:
{
return NULL;
}
}
case '7':
- if (strncmp (KR_keyword, "/dev/nst79", 10) == 0)
+ switch (KR_keyword [5])
{
+ case 'p':
+ if (strncmp (KR_keyword, "/dev/pty79", 10) == 0)
+ {
{
-return dev_storage + 183;
+return dev_storage + 377;
}
- }
- else
- {
+ }
+ else
+ {
+{
+return NULL;
+
+}
+ }
+ case 'n':
+ if (strncmp (KR_keyword, "/dev/nst79", 10) == 0)
+ {
+{
+return dev_storage + 247;
+
+}
+ }
+ else
+ {
+{
+return NULL;
+
+}
+ }
+ default:
{
return NULL;
}
}
case '6':
- if (strncmp (KR_keyword, "/dev/nst69", 10) == 0)
+ switch (KR_keyword [5])
{
+ case 'p':
+ if (strncmp (KR_keyword, "/dev/pty69", 10) == 0)
+ {
{
-return dev_storage + 173;
+return dev_storage + 367;
}
- }
- else
- {
+ }
+ else
+ {
+{
+return NULL;
+
+}
+ }
+ case 'n':
+ if (strncmp (KR_keyword, "/dev/nst69", 10) == 0)
+ {
+{
+return dev_storage + 237;
+
+}
+ }
+ else
+ {
+{
+return NULL;
+
+}
+ }
+ default:
{
return NULL;
@@ -14629,7 +15904,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/pty59", 10) == 0)
{
{
-return dev_storage + 293;
+return dev_storage + 357;
}
}
@@ -14644,7 +15919,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/nst59", 10) == 0)
{
{
-return dev_storage + 163;
+return dev_storage + 227;
}
}
@@ -14668,7 +15943,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/pty49", 10) == 0)
{
{
-return dev_storage + 283;
+return dev_storage + 347;
}
}
@@ -14683,7 +15958,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/nst49", 10) == 0)
{
{
-return dev_storage + 153;
+return dev_storage + 217;
}
}
@@ -14707,7 +15982,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/pty39", 10) == 0)
{
{
-return dev_storage + 273;
+return dev_storage + 337;
}
}
@@ -14722,7 +15997,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/nst39", 10) == 0)
{
{
-return dev_storage + 143;
+return dev_storage + 207;
}
}
@@ -14746,7 +16021,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/pty29", 10) == 0)
{
{
-return dev_storage + 263;
+return dev_storage + 327;
}
}
@@ -14761,7 +16036,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/nst29", 10) == 0)
{
{
-return dev_storage + 133;
+return dev_storage + 197;
}
}
@@ -14785,7 +16060,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/st119", 10) == 0)
{
{
-return dev_storage + 2498;
+return dev_storage + 2626;
}
}
@@ -14800,7 +16075,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/pty19", 10) == 0)
{
{
-return dev_storage + 253;
+return dev_storage + 317;
}
}
@@ -14815,7 +16090,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/nst19", 10) == 0)
{
{
-return dev_storage + 123;
+return dev_storage + 187;
}
}
@@ -14836,7 +16111,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/st109", 10) == 0)
{
{
-return dev_storage + 2488;
+return dev_storage + 2616;
}
}
@@ -14863,7 +16138,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdcz8", 10) == 0)
{
{
-return dev_storage + 1971;
+return dev_storage + 2099;
}
}
@@ -14878,7 +16153,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdbz8", 10) == 0)
{
{
-return dev_storage + 1555;
+return dev_storage + 1683;
}
}
@@ -14893,7 +16168,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdaz8", 10) == 0)
{
{
-return dev_storage + 1139;
+return dev_storage + 1267;
}
}
@@ -14917,7 +16192,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdcy8", 10) == 0)
{
{
-return dev_storage + 1956;
+return dev_storage + 2084;
}
}
@@ -14932,7 +16207,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdby8", 10) == 0)
{
{
-return dev_storage + 1540;
+return dev_storage + 1668;
}
}
@@ -14947,7 +16222,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sday8", 10) == 0)
{
{
-return dev_storage + 1124;
+return dev_storage + 1252;
}
}
@@ -14971,7 +16246,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sddx8", 10) == 0)
{
{
-return dev_storage + 2355;
+return dev_storage + 2483;
}
}
@@ -14986,7 +16261,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdcx8", 10) == 0)
{
{
-return dev_storage + 1941;
+return dev_storage + 2069;
}
}
@@ -15001,7 +16276,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdbx8", 10) == 0)
{
{
-return dev_storage + 1525;
+return dev_storage + 1653;
}
}
@@ -15016,7 +16291,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdax8", 10) == 0)
{
{
-return dev_storage + 1109;
+return dev_storage + 1237;
}
}
@@ -15040,7 +16315,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sddw8", 10) == 0)
{
{
-return dev_storage + 2340;
+return dev_storage + 2468;
}
}
@@ -15055,7 +16330,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdcw8", 10) == 0)
{
{
-return dev_storage + 1926;
+return dev_storage + 2054;
}
}
@@ -15070,7 +16345,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdbw8", 10) == 0)
{
{
-return dev_storage + 1510;
+return dev_storage + 1638;
}
}
@@ -15085,7 +16360,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdaw8", 10) == 0)
{
{
-return dev_storage + 1094;
+return dev_storage + 1222;
}
}
@@ -15109,7 +16384,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sddv8", 10) == 0)
{
{
-return dev_storage + 2325;
+return dev_storage + 2453;
}
}
@@ -15124,7 +16399,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdcv8", 10) == 0)
{
{
-return dev_storage + 1911;
+return dev_storage + 2039;
}
}
@@ -15139,7 +16414,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdbv8", 10) == 0)
{
{
-return dev_storage + 1495;
+return dev_storage + 1623;
}
}
@@ -15154,7 +16429,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdav8", 10) == 0)
{
{
-return dev_storage + 1079;
+return dev_storage + 1207;
}
}
@@ -15178,7 +16453,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sddu8", 10) == 0)
{
{
-return dev_storage + 2310;
+return dev_storage + 2438;
}
}
@@ -15193,7 +16468,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdcu8", 10) == 0)
{
{
-return dev_storage + 1896;
+return dev_storage + 2024;
}
}
@@ -15208,7 +16483,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdbu8", 10) == 0)
{
{
-return dev_storage + 1480;
+return dev_storage + 1608;
}
}
@@ -15223,7 +16498,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdau8", 10) == 0)
{
{
-return dev_storage + 1064;
+return dev_storage + 1192;
}
}
@@ -15247,7 +16522,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sddt8", 10) == 0)
{
{
-return dev_storage + 2295;
+return dev_storage + 2423;
}
}
@@ -15262,7 +16537,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdct8", 10) == 0)
{
{
-return dev_storage + 1881;
+return dev_storage + 2009;
}
}
@@ -15277,7 +16552,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdbt8", 10) == 0)
{
{
-return dev_storage + 1465;
+return dev_storage + 1593;
}
}
@@ -15292,7 +16567,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdat8", 10) == 0)
{
{
-return dev_storage + 1049;
+return dev_storage + 1177;
}
}
@@ -15331,7 +16606,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdds8", 10) == 0)
{
{
-return dev_storage + 2280;
+return dev_storage + 2408;
}
}
@@ -15346,7 +16621,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdcs8", 10) == 0)
{
{
-return dev_storage + 1866;
+return dev_storage + 1994;
}
}
@@ -15361,7 +16636,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdbs8", 10) == 0)
{
{
-return dev_storage + 1450;
+return dev_storage + 1578;
}
}
@@ -15376,7 +16651,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdas8", 10) == 0)
{
{
-return dev_storage + 1034;
+return dev_storage + 1162;
}
}
@@ -15400,7 +16675,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sddr8", 10) == 0)
{
{
-return dev_storage + 2265;
+return dev_storage + 2393;
}
}
@@ -15415,7 +16690,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdcr8", 10) == 0)
{
{
-return dev_storage + 1851;
+return dev_storage + 1979;
}
}
@@ -15430,7 +16705,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdbr8", 10) == 0)
{
{
-return dev_storage + 1435;
+return dev_storage + 1563;
}
}
@@ -15445,7 +16720,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdar8", 10) == 0)
{
{
-return dev_storage + 1019;
+return dev_storage + 1147;
}
}
@@ -15469,7 +16744,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sddq8", 10) == 0)
{
{
-return dev_storage + 2250;
+return dev_storage + 2378;
}
}
@@ -15484,7 +16759,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdcq8", 10) == 0)
{
{
-return dev_storage + 1836;
+return dev_storage + 1964;
}
}
@@ -15499,7 +16774,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdbq8", 10) == 0)
{
{
-return dev_storage + 1420;
+return dev_storage + 1548;
}
}
@@ -15514,7 +16789,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdaq8", 10) == 0)
{
{
-return dev_storage + 1004;
+return dev_storage + 1132;
}
}
@@ -15538,7 +16813,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sddp8", 10) == 0)
{
{
-return dev_storage + 2235;
+return dev_storage + 2363;
}
}
@@ -15553,7 +16828,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdcp8", 10) == 0)
{
{
-return dev_storage + 1821;
+return dev_storage + 1949;
}
}
@@ -15568,7 +16843,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdbp8", 10) == 0)
{
{
-return dev_storage + 1405;
+return dev_storage + 1533;
}
}
@@ -15583,7 +16858,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdap8", 10) == 0)
{
{
-return dev_storage + 989;
+return dev_storage + 1117;
}
}
@@ -15607,7 +16882,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sddo8", 10) == 0)
{
{
-return dev_storage + 2220;
+return dev_storage + 2348;
}
}
@@ -15622,7 +16897,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdco8", 10) == 0)
{
{
-return dev_storage + 1806;
+return dev_storage + 1934;
}
}
@@ -15637,7 +16912,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdbo8", 10) == 0)
{
{
-return dev_storage + 1390;
+return dev_storage + 1518;
}
}
@@ -15652,7 +16927,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdao8", 10) == 0)
{
{
-return dev_storage + 974;
+return dev_storage + 1102;
}
}
@@ -15676,7 +16951,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sddn8", 10) == 0)
{
{
-return dev_storage + 2205;
+return dev_storage + 2333;
}
}
@@ -15691,7 +16966,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdcn8", 10) == 0)
{
{
-return dev_storage + 1791;
+return dev_storage + 1919;
}
}
@@ -15706,7 +16981,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdbn8", 10) == 0)
{
{
-return dev_storage + 1375;
+return dev_storage + 1503;
}
}
@@ -15721,7 +16996,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdan8", 10) == 0)
{
{
-return dev_storage + 959;
+return dev_storage + 1087;
}
}
@@ -15745,7 +17020,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sddm8", 10) == 0)
{
{
-return dev_storage + 2190;
+return dev_storage + 2318;
}
}
@@ -15760,7 +17035,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdcm8", 10) == 0)
{
{
-return dev_storage + 1776;
+return dev_storage + 1904;
}
}
@@ -15775,7 +17050,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdbm8", 10) == 0)
{
{
-return dev_storage + 1360;
+return dev_storage + 1488;
}
}
@@ -15790,7 +17065,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdam8", 10) == 0)
{
{
-return dev_storage + 944;
+return dev_storage + 1072;
}
}
@@ -15814,7 +17089,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sddl8", 10) == 0)
{
{
-return dev_storage + 2175;
+return dev_storage + 2303;
}
}
@@ -15829,7 +17104,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdcl8", 10) == 0)
{
{
-return dev_storage + 1761;
+return dev_storage + 1889;
}
}
@@ -15844,7 +17119,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdbl8", 10) == 0)
{
{
-return dev_storage + 1345;
+return dev_storage + 1473;
}
}
@@ -15859,7 +17134,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdal8", 10) == 0)
{
{
-return dev_storage + 929;
+return dev_storage + 1057;
}
}
@@ -15883,7 +17158,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sddk8", 10) == 0)
{
{
-return dev_storage + 2160;
+return dev_storage + 2288;
}
}
@@ -15898,7 +17173,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdck8", 10) == 0)
{
{
-return dev_storage + 1746;
+return dev_storage + 1874;
}
}
@@ -15913,7 +17188,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdbk8", 10) == 0)
{
{
-return dev_storage + 1330;
+return dev_storage + 1458;
}
}
@@ -15928,7 +17203,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdak8", 10) == 0)
{
{
-return dev_storage + 914;
+return dev_storage + 1042;
}
}
@@ -15952,7 +17227,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sddj8", 10) == 0)
{
{
-return dev_storage + 2145;
+return dev_storage + 2273;
}
}
@@ -15967,7 +17242,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdcj8", 10) == 0)
{
{
-return dev_storage + 1731;
+return dev_storage + 1859;
}
}
@@ -15982,7 +17257,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdbj8", 10) == 0)
{
{
-return dev_storage + 1315;
+return dev_storage + 1443;
}
}
@@ -15997,7 +17272,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdaj8", 10) == 0)
{
{
-return dev_storage + 899;
+return dev_storage + 1027;
}
}
@@ -16021,7 +17296,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sddi8", 10) == 0)
{
{
-return dev_storage + 2130;
+return dev_storage + 2258;
}
}
@@ -16036,7 +17311,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdci8", 10) == 0)
{
{
-return dev_storage + 1716;
+return dev_storage + 1844;
}
}
@@ -16051,7 +17326,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdbi8", 10) == 0)
{
{
-return dev_storage + 1300;
+return dev_storage + 1428;
}
}
@@ -16066,7 +17341,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdai8", 10) == 0)
{
{
-return dev_storage + 884;
+return dev_storage + 1012;
}
}
@@ -16090,7 +17365,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sddh8", 10) == 0)
{
{
-return dev_storage + 2115;
+return dev_storage + 2243;
}
}
@@ -16105,7 +17380,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdch8", 10) == 0)
{
{
-return dev_storage + 1701;
+return dev_storage + 1829;
}
}
@@ -16120,7 +17395,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdbh8", 10) == 0)
{
{
-return dev_storage + 1285;
+return dev_storage + 1413;
}
}
@@ -16135,7 +17410,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdah8", 10) == 0)
{
{
-return dev_storage + 869;
+return dev_storage + 997;
}
}
@@ -16159,7 +17434,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sddg8", 10) == 0)
{
{
-return dev_storage + 2100;
+return dev_storage + 2228;
}
}
@@ -16174,7 +17449,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdcg8", 10) == 0)
{
{
-return dev_storage + 1686;
+return dev_storage + 1814;
}
}
@@ -16189,7 +17464,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdbg8", 10) == 0)
{
{
-return dev_storage + 1270;
+return dev_storage + 1398;
}
}
@@ -16204,7 +17479,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdag8", 10) == 0)
{
{
-return dev_storage + 854;
+return dev_storage + 982;
}
}
@@ -16228,7 +17503,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sddf8", 10) == 0)
{
{
-return dev_storage + 2085;
+return dev_storage + 2213;
}
}
@@ -16243,7 +17518,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdcf8", 10) == 0)
{
{
-return dev_storage + 1671;
+return dev_storage + 1799;
}
}
@@ -16258,7 +17533,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdbf8", 10) == 0)
{
{
-return dev_storage + 1255;
+return dev_storage + 1383;
}
}
@@ -16273,7 +17548,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdaf8", 10) == 0)
{
{
-return dev_storage + 839;
+return dev_storage + 967;
}
}
@@ -16297,7 +17572,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdde8", 10) == 0)
{
{
-return dev_storage + 2070;
+return dev_storage + 2198;
}
}
@@ -16312,7 +17587,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdce8", 10) == 0)
{
{
-return dev_storage + 1656;
+return dev_storage + 1784;
}
}
@@ -16327,7 +17602,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdbe8", 10) == 0)
{
{
-return dev_storage + 1240;
+return dev_storage + 1368;
}
}
@@ -16342,7 +17617,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdae8", 10) == 0)
{
{
-return dev_storage + 824;
+return dev_storage + 952;
}
}
@@ -16366,7 +17641,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sddd8", 10) == 0)
{
{
-return dev_storage + 2055;
+return dev_storage + 2183;
}
}
@@ -16381,7 +17656,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdcd8", 10) == 0)
{
{
-return dev_storage + 1641;
+return dev_storage + 1769;
}
}
@@ -16396,7 +17671,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdbd8", 10) == 0)
{
{
-return dev_storage + 1225;
+return dev_storage + 1353;
}
}
@@ -16411,7 +17686,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdad8", 10) == 0)
{
{
-return dev_storage + 809;
+return dev_storage + 937;
}
}
@@ -16435,7 +17710,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sddc8", 10) == 0)
{
{
-return dev_storage + 2040;
+return dev_storage + 2168;
}
}
@@ -16450,7 +17725,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdcc8", 10) == 0)
{
{
-return dev_storage + 1626;
+return dev_storage + 1754;
}
}
@@ -16465,7 +17740,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdbc8", 10) == 0)
{
{
-return dev_storage + 1210;
+return dev_storage + 1338;
}
}
@@ -16480,7 +17755,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdac8", 10) == 0)
{
{
-return dev_storage + 794;
+return dev_storage + 922;
}
}
@@ -16504,7 +17779,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sddb8", 10) == 0)
{
{
-return dev_storage + 2025;
+return dev_storage + 2153;
}
}
@@ -16519,7 +17794,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdcb8", 10) == 0)
{
{
-return dev_storage + 1611;
+return dev_storage + 1739;
}
}
@@ -16534,7 +17809,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdbb8", 10) == 0)
{
{
-return dev_storage + 1195;
+return dev_storage + 1323;
}
}
@@ -16549,7 +17824,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdab8", 10) == 0)
{
{
-return dev_storage + 779;
+return dev_storage + 907;
}
}
@@ -16573,7 +17848,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdda8", 10) == 0)
{
{
-return dev_storage + 2010;
+return dev_storage + 2138;
}
}
@@ -16588,7 +17863,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdca8", 10) == 0)
{
{
-return dev_storage + 1596;
+return dev_storage + 1724;
}
}
@@ -16603,7 +17878,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdba8", 10) == 0)
{
{
-return dev_storage + 1180;
+return dev_storage + 1308;
}
}
@@ -16618,7 +17893,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdaa8", 10) == 0)
{
{
-return dev_storage + 764;
+return dev_storage + 892;
}
}
@@ -16639,7 +17914,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/ttyS8", 10) == 0)
{
{
-return dev_storage + 2516;
+return dev_storage + 2644;
}
}
@@ -16651,60 +17926,156 @@ return NULL;
}
}
case '9':
- if (strncmp (KR_keyword, "/dev/nst98", 10) == 0)
+ switch (KR_keyword [5])
{
+ case 'p':
+ if (strncmp (KR_keyword, "/dev/pty98", 10) == 0)
+ {
{
-return dev_storage + 202;
+return dev_storage + 396;
}
- }
- else
- {
+ }
+ else
+ {
+{
+return NULL;
+
+}
+ }
+ case 'n':
+ if (strncmp (KR_keyword, "/dev/nst98", 10) == 0)
+ {
+{
+return dev_storage + 266;
+
+}
+ }
+ else
+ {
+{
+return NULL;
+
+}
+ }
+ default:
{
return NULL;
}
}
case '8':
- if (strncmp (KR_keyword, "/dev/nst88", 10) == 0)
+ switch (KR_keyword [5])
{
+ case 'p':
+ if (strncmp (KR_keyword, "/dev/pty88", 10) == 0)
+ {
{
-return dev_storage + 192;
+return dev_storage + 386;
}
- }
- else
- {
+ }
+ else
+ {
+{
+return NULL;
+
+}
+ }
+ case 'n':
+ if (strncmp (KR_keyword, "/dev/nst88", 10) == 0)
+ {
+{
+return dev_storage + 256;
+
+}
+ }
+ else
+ {
+{
+return NULL;
+
+}
+ }
+ default:
{
return NULL;
}
}
case '7':
- if (strncmp (KR_keyword, "/dev/nst78", 10) == 0)
+ switch (KR_keyword [5])
{
+ case 'p':
+ if (strncmp (KR_keyword, "/dev/pty78", 10) == 0)
+ {
{
-return dev_storage + 182;
+return dev_storage + 376;
}
- }
- else
- {
+ }
+ else
+ {
+{
+return NULL;
+
+}
+ }
+ case 'n':
+ if (strncmp (KR_keyword, "/dev/nst78", 10) == 0)
+ {
+{
+return dev_storage + 246;
+
+}
+ }
+ else
+ {
+{
+return NULL;
+
+}
+ }
+ default:
{
return NULL;
}
}
case '6':
- if (strncmp (KR_keyword, "/dev/nst68", 10) == 0)
+ switch (KR_keyword [5])
{
+ case 'p':
+ if (strncmp (KR_keyword, "/dev/pty68", 10) == 0)
+ {
{
-return dev_storage + 172;
+return dev_storage + 366;
}
- }
- else
- {
+ }
+ else
+ {
+{
+return NULL;
+
+}
+ }
+ case 'n':
+ if (strncmp (KR_keyword, "/dev/nst68", 10) == 0)
+ {
+{
+return dev_storage + 236;
+
+}
+ }
+ else
+ {
+{
+return NULL;
+
+}
+ }
+ default:
{
return NULL;
@@ -16717,7 +18088,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/pty58", 10) == 0)
{
{
-return dev_storage + 292;
+return dev_storage + 356;
}
}
@@ -16732,7 +18103,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/nst58", 10) == 0)
{
{
-return dev_storage + 162;
+return dev_storage + 226;
}
}
@@ -16756,7 +18127,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/pty48", 10) == 0)
{
{
-return dev_storage + 282;
+return dev_storage + 346;
}
}
@@ -16771,7 +18142,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/nst48", 10) == 0)
{
{
-return dev_storage + 152;
+return dev_storage + 216;
}
}
@@ -16795,7 +18166,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/pty38", 10) == 0)
{
{
-return dev_storage + 272;
+return dev_storage + 336;
}
}
@@ -16810,7 +18181,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/nst38", 10) == 0)
{
{
-return dev_storage + 142;
+return dev_storage + 206;
}
}
@@ -16834,7 +18205,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/pty28", 10) == 0)
{
{
-return dev_storage + 262;
+return dev_storage + 326;
}
}
@@ -16849,7 +18220,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/nst28", 10) == 0)
{
{
-return dev_storage + 132;
+return dev_storage + 196;
}
}
@@ -16873,7 +18244,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/st118", 10) == 0)
{
{
-return dev_storage + 2497;
+return dev_storage + 2625;
}
}
@@ -16888,7 +18259,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/pty18", 10) == 0)
{
{
-return dev_storage + 252;
+return dev_storage + 316;
}
}
@@ -16903,7 +18274,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/nst18", 10) == 0)
{
{
-return dev_storage + 122;
+return dev_storage + 186;
}
}
@@ -16924,7 +18295,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/st108", 10) == 0)
{
{
-return dev_storage + 2487;
+return dev_storage + 2615;
}
}
@@ -16951,7 +18322,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdcz7", 10) == 0)
{
{
-return dev_storage + 1970;
+return dev_storage + 2098;
}
}
@@ -16966,7 +18337,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdbz7", 10) == 0)
{
{
-return dev_storage + 1554;
+return dev_storage + 1682;
}
}
@@ -16981,7 +18352,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdaz7", 10) == 0)
{
{
-return dev_storage + 1138;
+return dev_storage + 1266;
}
}
@@ -17005,7 +18376,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdcy7", 10) == 0)
{
{
-return dev_storage + 1955;
+return dev_storage + 2083;
}
}
@@ -17020,7 +18391,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdby7", 10) == 0)
{
{
-return dev_storage + 1539;
+return dev_storage + 1667;
}
}
@@ -17035,7 +18406,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sday7", 10) == 0)
{
{
-return dev_storage + 1123;
+return dev_storage + 1251;
}
}
@@ -17059,7 +18430,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sddx7", 10) == 0)
{
{
-return dev_storage + 2354;
+return dev_storage + 2482;
}
}
@@ -17074,7 +18445,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdcx7", 10) == 0)
{
{
-return dev_storage + 1940;
+return dev_storage + 2068;
}
}
@@ -17089,7 +18460,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdbx7", 10) == 0)
{
{
-return dev_storage + 1524;
+return dev_storage + 1652;
}
}
@@ -17104,7 +18475,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdax7", 10) == 0)
{
{
-return dev_storage + 1108;
+return dev_storage + 1236;
}
}
@@ -17128,7 +18499,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sddw7", 10) == 0)
{
{
-return dev_storage + 2339;
+return dev_storage + 2467;
}
}
@@ -17143,7 +18514,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdcw7", 10) == 0)
{
{
-return dev_storage + 1925;
+return dev_storage + 2053;
}
}
@@ -17158,7 +18529,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdbw7", 10) == 0)
{
{
-return dev_storage + 1509;
+return dev_storage + 1637;
}
}
@@ -17173,7 +18544,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdaw7", 10) == 0)
{
{
-return dev_storage + 1093;
+return dev_storage + 1221;
}
}
@@ -17197,7 +18568,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sddv7", 10) == 0)
{
{
-return dev_storage + 2324;
+return dev_storage + 2452;
}
}
@@ -17212,7 +18583,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdcv7", 10) == 0)
{
{
-return dev_storage + 1910;
+return dev_storage + 2038;
}
}
@@ -17227,7 +18598,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdbv7", 10) == 0)
{
{
-return dev_storage + 1494;
+return dev_storage + 1622;
}
}
@@ -17242,7 +18613,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdav7", 10) == 0)
{
{
-return dev_storage + 1078;
+return dev_storage + 1206;
}
}
@@ -17266,7 +18637,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sddu7", 10) == 0)
{
{
-return dev_storage + 2309;
+return dev_storage + 2437;
}
}
@@ -17281,7 +18652,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdcu7", 10) == 0)
{
{
-return dev_storage + 1895;
+return dev_storage + 2023;
}
}
@@ -17296,7 +18667,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdbu7", 10) == 0)
{
{
-return dev_storage + 1479;
+return dev_storage + 1607;
}
}
@@ -17311,7 +18682,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdau7", 10) == 0)
{
{
-return dev_storage + 1063;
+return dev_storage + 1191;
}
}
@@ -17335,7 +18706,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sddt7", 10) == 0)
{
{
-return dev_storage + 2294;
+return dev_storage + 2422;
}
}
@@ -17350,7 +18721,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdct7", 10) == 0)
{
{
-return dev_storage + 1880;
+return dev_storage + 2008;
}
}
@@ -17365,7 +18736,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdbt7", 10) == 0)
{
{
-return dev_storage + 1464;
+return dev_storage + 1592;
}
}
@@ -17380,7 +18751,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdat7", 10) == 0)
{
{
-return dev_storage + 1048;
+return dev_storage + 1176;
}
}
@@ -17419,7 +18790,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdds7", 10) == 0)
{
{
-return dev_storage + 2279;
+return dev_storage + 2407;
}
}
@@ -17434,7 +18805,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdcs7", 10) == 0)
{
{
-return dev_storage + 1865;
+return dev_storage + 1993;
}
}
@@ -17449,7 +18820,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdbs7", 10) == 0)
{
{
-return dev_storage + 1449;
+return dev_storage + 1577;
}
}
@@ -17464,7 +18835,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdas7", 10) == 0)
{
{
-return dev_storage + 1033;
+return dev_storage + 1161;
}
}
@@ -17488,7 +18859,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sddr7", 10) == 0)
{
{
-return dev_storage + 2264;
+return dev_storage + 2392;
}
}
@@ -17503,7 +18874,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdcr7", 10) == 0)
{
{
-return dev_storage + 1850;
+return dev_storage + 1978;
}
}
@@ -17518,7 +18889,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdbr7", 10) == 0)
{
{
-return dev_storage + 1434;
+return dev_storage + 1562;
}
}
@@ -17533,7 +18904,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdar7", 10) == 0)
{
{
-return dev_storage + 1018;
+return dev_storage + 1146;
}
}
@@ -17557,7 +18928,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sddq7", 10) == 0)
{
{
-return dev_storage + 2249;
+return dev_storage + 2377;
}
}
@@ -17572,7 +18943,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdcq7", 10) == 0)
{
{
-return dev_storage + 1835;
+return dev_storage + 1963;
}
}
@@ -17587,7 +18958,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdbq7", 10) == 0)
{
{
-return dev_storage + 1419;
+return dev_storage + 1547;
}
}
@@ -17602,7 +18973,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdaq7", 10) == 0)
{
{
-return dev_storage + 1003;
+return dev_storage + 1131;
}
}
@@ -17626,7 +18997,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sddp7", 10) == 0)
{
{
-return dev_storage + 2234;
+return dev_storage + 2362;
}
}
@@ -17641,7 +19012,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdcp7", 10) == 0)
{
{
-return dev_storage + 1820;
+return dev_storage + 1948;
}
}
@@ -17656,7 +19027,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdbp7", 10) == 0)
{
{
-return dev_storage + 1404;
+return dev_storage + 1532;
}
}
@@ -17671,7 +19042,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdap7", 10) == 0)
{
{
-return dev_storage + 988;
+return dev_storage + 1116;
}
}
@@ -17695,7 +19066,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sddo7", 10) == 0)
{
{
-return dev_storage + 2219;
+return dev_storage + 2347;
}
}
@@ -17710,7 +19081,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdco7", 10) == 0)
{
{
-return dev_storage + 1805;
+return dev_storage + 1933;
}
}
@@ -17725,7 +19096,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdbo7", 10) == 0)
{
{
-return dev_storage + 1389;
+return dev_storage + 1517;
}
}
@@ -17740,7 +19111,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdao7", 10) == 0)
{
{
-return dev_storage + 973;
+return dev_storage + 1101;
}
}
@@ -17764,7 +19135,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sddn7", 10) == 0)
{
{
-return dev_storage + 2204;
+return dev_storage + 2332;
}
}
@@ -17779,7 +19150,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdcn7", 10) == 0)
{
{
-return dev_storage + 1790;
+return dev_storage + 1918;
}
}
@@ -17794,7 +19165,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdbn7", 10) == 0)
{
{
-return dev_storage + 1374;
+return dev_storage + 1502;
}
}
@@ -17809,7 +19180,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdan7", 10) == 0)
{
{
-return dev_storage + 958;
+return dev_storage + 1086;
}
}
@@ -17833,7 +19204,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sddm7", 10) == 0)
{
{
-return dev_storage + 2189;
+return dev_storage + 2317;
}
}
@@ -17848,7 +19219,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdcm7", 10) == 0)
{
{
-return dev_storage + 1775;
+return dev_storage + 1903;
}
}
@@ -17863,7 +19234,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdbm7", 10) == 0)
{
{
-return dev_storage + 1359;
+return dev_storage + 1487;
}
}
@@ -17878,7 +19249,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdam7", 10) == 0)
{
{
-return dev_storage + 943;
+return dev_storage + 1071;
}
}
@@ -17902,7 +19273,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sddl7", 10) == 0)
{
{
-return dev_storage + 2174;
+return dev_storage + 2302;
}
}
@@ -17917,7 +19288,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdcl7", 10) == 0)
{
{
-return dev_storage + 1760;
+return dev_storage + 1888;
}
}
@@ -17932,7 +19303,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdbl7", 10) == 0)
{
{
-return dev_storage + 1344;
+return dev_storage + 1472;
}
}
@@ -17947,7 +19318,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdal7", 10) == 0)
{
{
-return dev_storage + 928;
+return dev_storage + 1056;
}
}
@@ -17971,7 +19342,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sddk7", 10) == 0)
{
{
-return dev_storage + 2159;
+return dev_storage + 2287;
}
}
@@ -17986,7 +19357,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdck7", 10) == 0)
{
{
-return dev_storage + 1745;
+return dev_storage + 1873;
}
}
@@ -18001,7 +19372,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdbk7", 10) == 0)
{
{
-return dev_storage + 1329;
+return dev_storage + 1457;
}
}
@@ -18016,7 +19387,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdak7", 10) == 0)
{
{
-return dev_storage + 913;
+return dev_storage + 1041;
}
}
@@ -18040,7 +19411,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sddj7", 10) == 0)
{
{
-return dev_storage + 2144;
+return dev_storage + 2272;
}
}
@@ -18055,7 +19426,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdcj7", 10) == 0)
{
{
-return dev_storage + 1730;
+return dev_storage + 1858;
}
}
@@ -18070,7 +19441,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdbj7", 10) == 0)
{
{
-return dev_storage + 1314;
+return dev_storage + 1442;
}
}
@@ -18085,7 +19456,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdaj7", 10) == 0)
{
{
-return dev_storage + 898;
+return dev_storage + 1026;
}
}
@@ -18109,7 +19480,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sddi7", 10) == 0)
{
{
-return dev_storage + 2129;
+return dev_storage + 2257;
}
}
@@ -18124,7 +19495,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdci7", 10) == 0)
{
{
-return dev_storage + 1715;
+return dev_storage + 1843;
}
}
@@ -18139,7 +19510,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdbi7", 10) == 0)
{
{
-return dev_storage + 1299;
+return dev_storage + 1427;
}
}
@@ -18154,7 +19525,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdai7", 10) == 0)
{
{
-return dev_storage + 883;
+return dev_storage + 1011;
}
}
@@ -18178,7 +19549,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sddh7", 10) == 0)
{
{
-return dev_storage + 2114;
+return dev_storage + 2242;
}
}
@@ -18193,7 +19564,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdch7", 10) == 0)
{
{
-return dev_storage + 1700;
+return dev_storage + 1828;
}
}
@@ -18208,7 +19579,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdbh7", 10) == 0)
{
{
-return dev_storage + 1284;
+return dev_storage + 1412;
}
}
@@ -18223,7 +19594,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdah7", 10) == 0)
{
{
-return dev_storage + 868;
+return dev_storage + 996;
}
}
@@ -18247,7 +19618,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sddg7", 10) == 0)
{
{
-return dev_storage + 2099;
+return dev_storage + 2227;
}
}
@@ -18262,7 +19633,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdcg7", 10) == 0)
{
{
-return dev_storage + 1685;
+return dev_storage + 1813;
}
}
@@ -18277,7 +19648,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdbg7", 10) == 0)
{
{
-return dev_storage + 1269;
+return dev_storage + 1397;
}
}
@@ -18292,7 +19663,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdag7", 10) == 0)
{
{
-return dev_storage + 853;
+return dev_storage + 981;
}
}
@@ -18316,7 +19687,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sddf7", 10) == 0)
{
{
-return dev_storage + 2084;
+return dev_storage + 2212;
}
}
@@ -18331,7 +19702,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdcf7", 10) == 0)
{
{
-return dev_storage + 1670;
+return dev_storage + 1798;
}
}
@@ -18346,7 +19717,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdbf7", 10) == 0)
{
{
-return dev_storage + 1254;
+return dev_storage + 1382;
}
}
@@ -18361,7 +19732,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdaf7", 10) == 0)
{
{
-return dev_storage + 838;
+return dev_storage + 966;
}
}
@@ -18385,7 +19756,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdde7", 10) == 0)
{
{
-return dev_storage + 2069;
+return dev_storage + 2197;
}
}
@@ -18400,7 +19771,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdce7", 10) == 0)
{
{
-return dev_storage + 1655;
+return dev_storage + 1783;
}
}
@@ -18415,7 +19786,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdbe7", 10) == 0)
{
{
-return dev_storage + 1239;
+return dev_storage + 1367;
}
}
@@ -18430,7 +19801,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdae7", 10) == 0)
{
{
-return dev_storage + 823;
+return dev_storage + 951;
}
}
@@ -18454,7 +19825,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sddd7", 10) == 0)
{
{
-return dev_storage + 2054;
+return dev_storage + 2182;
}
}
@@ -18469,7 +19840,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdcd7", 10) == 0)
{
{
-return dev_storage + 1640;
+return dev_storage + 1768;
}
}
@@ -18484,7 +19855,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdbd7", 10) == 0)
{
{
-return dev_storage + 1224;
+return dev_storage + 1352;
}
}
@@ -18499,7 +19870,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdad7", 10) == 0)
{
{
-return dev_storage + 808;
+return dev_storage + 936;
}
}
@@ -18523,7 +19894,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sddc7", 10) == 0)
{
{
-return dev_storage + 2039;
+return dev_storage + 2167;
}
}
@@ -18538,7 +19909,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdcc7", 10) == 0)
{
{
-return dev_storage + 1625;
+return dev_storage + 1753;
}
}
@@ -18553,7 +19924,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdbc7", 10) == 0)
{
{
-return dev_storage + 1209;
+return dev_storage + 1337;
}
}
@@ -18568,7 +19939,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdac7", 10) == 0)
{
{
-return dev_storage + 793;
+return dev_storage + 921;
}
}
@@ -18592,7 +19963,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sddb7", 10) == 0)
{
{
-return dev_storage + 2024;
+return dev_storage + 2152;
}
}
@@ -18607,7 +19978,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdcb7", 10) == 0)
{
{
-return dev_storage + 1610;
+return dev_storage + 1738;
}
}
@@ -18622,7 +19993,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdbb7", 10) == 0)
{
{
-return dev_storage + 1194;
+return dev_storage + 1322;
}
}
@@ -18637,7 +20008,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdab7", 10) == 0)
{
{
-return dev_storage + 778;
+return dev_storage + 906;
}
}
@@ -18661,7 +20032,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdda7", 10) == 0)
{
{
-return dev_storage + 2009;
+return dev_storage + 2137;
}
}
@@ -18676,7 +20047,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdca7", 10) == 0)
{
{
-return dev_storage + 1595;
+return dev_storage + 1723;
}
}
@@ -18691,7 +20062,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdba7", 10) == 0)
{
{
-return dev_storage + 1179;
+return dev_storage + 1307;
}
}
@@ -18706,7 +20077,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdaa7", 10) == 0)
{
{
-return dev_storage + 763;
+return dev_storage + 891;
}
}
@@ -18727,7 +20098,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/ttyS7", 10) == 0)
{
{
-return dev_storage + 2515;
+return dev_storage + 2643;
}
}
@@ -18739,60 +20110,156 @@ return NULL;
}
}
case '9':
- if (strncmp (KR_keyword, "/dev/nst97", 10) == 0)
+ switch (KR_keyword [5])
{
+ case 'p':
+ if (strncmp (KR_keyword, "/dev/pty97", 10) == 0)
+ {
{
-return dev_storage + 201;
+return dev_storage + 395;
}
- }
- else
- {
+ }
+ else
+ {
+{
+return NULL;
+
+}
+ }
+ case 'n':
+ if (strncmp (KR_keyword, "/dev/nst97", 10) == 0)
+ {
+{
+return dev_storage + 265;
+
+}
+ }
+ else
+ {
+{
+return NULL;
+
+}
+ }
+ default:
{
return NULL;
}
}
case '8':
- if (strncmp (KR_keyword, "/dev/nst87", 10) == 0)
+ switch (KR_keyword [5])
{
+ case 'p':
+ if (strncmp (KR_keyword, "/dev/pty87", 10) == 0)
+ {
{
-return dev_storage + 191;
+return dev_storage + 385;
}
- }
- else
- {
+ }
+ else
+ {
+{
+return NULL;
+
+}
+ }
+ case 'n':
+ if (strncmp (KR_keyword, "/dev/nst87", 10) == 0)
+ {
+{
+return dev_storage + 255;
+
+}
+ }
+ else
+ {
+{
+return NULL;
+
+}
+ }
+ default:
{
return NULL;
}
}
case '7':
- if (strncmp (KR_keyword, "/dev/nst77", 10) == 0)
+ switch (KR_keyword [5])
{
+ case 'p':
+ if (strncmp (KR_keyword, "/dev/pty77", 10) == 0)
+ {
{
-return dev_storage + 181;
+return dev_storage + 375;
}
- }
- else
- {
+ }
+ else
+ {
+{
+return NULL;
+
+}
+ }
+ case 'n':
+ if (strncmp (KR_keyword, "/dev/nst77", 10) == 0)
+ {
+{
+return dev_storage + 245;
+
+}
+ }
+ else
+ {
+{
+return NULL;
+
+}
+ }
+ default:
{
return NULL;
}
}
case '6':
- if (strncmp (KR_keyword, "/dev/nst67", 10) == 0)
+ switch (KR_keyword [5])
{
+ case 'p':
+ if (strncmp (KR_keyword, "/dev/pty67", 10) == 0)
+ {
{
-return dev_storage + 171;
+return dev_storage + 365;
}
- }
- else
- {
+ }
+ else
+ {
+{
+return NULL;
+
+}
+ }
+ case 'n':
+ if (strncmp (KR_keyword, "/dev/nst67", 10) == 0)
+ {
+{
+return dev_storage + 235;
+
+}
+ }
+ else
+ {
+{
+return NULL;
+
+}
+ }
+ default:
{
return NULL;
@@ -18805,7 +20272,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/pty57", 10) == 0)
{
{
-return dev_storage + 291;
+return dev_storage + 355;
}
}
@@ -18820,7 +20287,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/nst57", 10) == 0)
{
{
-return dev_storage + 161;
+return dev_storage + 225;
}
}
@@ -18844,7 +20311,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/pty47", 10) == 0)
{
{
-return dev_storage + 281;
+return dev_storage + 345;
}
}
@@ -18859,7 +20326,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/nst47", 10) == 0)
{
{
-return dev_storage + 151;
+return dev_storage + 215;
}
}
@@ -18883,7 +20350,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/pty37", 10) == 0)
{
{
-return dev_storage + 271;
+return dev_storage + 335;
}
}
@@ -18898,7 +20365,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/nst37", 10) == 0)
{
{
-return dev_storage + 141;
+return dev_storage + 205;
}
}
@@ -18922,7 +20389,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/st127", 10) == 0)
{
{
-return dev_storage + 2506;
+return dev_storage + 2634;
}
}
@@ -18937,7 +20404,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/pty27", 10) == 0)
{
{
-return dev_storage + 261;
+return dev_storage + 325;
}
}
@@ -18952,7 +20419,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/nst27", 10) == 0)
{
{
-return dev_storage + 131;
+return dev_storage + 195;
}
}
@@ -18976,7 +20443,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/st117", 10) == 0)
{
{
-return dev_storage + 2496;
+return dev_storage + 2624;
}
}
@@ -18991,7 +20458,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/pty17", 10) == 0)
{
{
-return dev_storage + 251;
+return dev_storage + 315;
}
}
@@ -19006,7 +20473,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/nst17", 10) == 0)
{
{
-return dev_storage + 121;
+return dev_storage + 185;
}
}
@@ -19027,7 +20494,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/st107", 10) == 0)
{
{
-return dev_storage + 2486;
+return dev_storage + 2614;
}
}
@@ -19045,16 +20512,16 @@ return NULL;
}
}
case '6':
- switch (KR_keyword [8])
+ switch (KR_keyword [7])
{
- case 'z':
- switch (KR_keyword [7])
+ case 'y':
+ switch (KR_keyword [8])
{
- case 'c':
- if (strncmp (KR_keyword, "/dev/sdcz6", 10) == 0)
+ case 'S':
+ if (strncmp (KR_keyword, "/dev/ttyS6", 10) == 0)
{
{
-return dev_storage + 1969;
+return dev_storage + 2642;
}
}
@@ -19065,11 +20532,11 @@ return NULL;
}
}
- case 'b':
- if (strncmp (KR_keyword, "/dev/sdbz6", 10) == 0)
+ case '9':
+ if (strncmp (KR_keyword, "/dev/pty96", 10) == 0)
{
{
-return dev_storage + 1553;
+return dev_storage + 394;
}
}
@@ -19080,11 +20547,11 @@ return NULL;
}
}
- case 'a':
- if (strncmp (KR_keyword, "/dev/sdaz6", 10) == 0)
+ case '8':
+ if (strncmp (KR_keyword, "/dev/pty86", 10) == 0)
{
{
-return dev_storage + 1137;
+return dev_storage + 384;
}
}
@@ -19095,20 +20562,11 @@ return NULL;
}
}
- default:
-{
-return NULL;
-
-}
- }
- case 'y':
- switch (KR_keyword [7])
- {
- case 'c':
- if (strncmp (KR_keyword, "/dev/sdcy6", 10) == 0)
+ case '7':
+ if (strncmp (KR_keyword, "/dev/pty76", 10) == 0)
{
{
-return dev_storage + 1954;
+return dev_storage + 374;
}
}
@@ -19119,11 +20577,11 @@ return NULL;
}
}
- case 'b':
- if (strncmp (KR_keyword, "/dev/sdby6", 10) == 0)
+ case '6':
+ if (strncmp (KR_keyword, "/dev/pty66", 10) == 0)
{
{
-return dev_storage + 1538;
+return dev_storage + 364;
}
}
@@ -19134,11 +20592,11 @@ return NULL;
}
}
- case 'a':
- if (strncmp (KR_keyword, "/dev/sday6", 10) == 0)
+ case '5':
+ if (strncmp (KR_keyword, "/dev/pty56", 10) == 0)
{
{
-return dev_storage + 1122;
+return dev_storage + 354;
}
}
@@ -19149,20 +20607,11 @@ return NULL;
}
}
- default:
-{
-return NULL;
-
-}
- }
- case 'x':
- switch (KR_keyword [7])
- {
- case 'd':
- if (strncmp (KR_keyword, "/dev/sddx6", 10) == 0)
+ case '4':
+ if (strncmp (KR_keyword, "/dev/pty46", 10) == 0)
{
{
-return dev_storage + 2353;
+return dev_storage + 344;
}
}
@@ -19173,11 +20622,11 @@ return NULL;
}
}
- case 'c':
- if (strncmp (KR_keyword, "/dev/sdcx6", 10) == 0)
+ case '3':
+ if (strncmp (KR_keyword, "/dev/pty36", 10) == 0)
{
{
-return dev_storage + 1939;
+return dev_storage + 334;
}
}
@@ -19188,11 +20637,11 @@ return NULL;
}
}
- case 'b':
- if (strncmp (KR_keyword, "/dev/sdbx6", 10) == 0)
+ case '2':
+ if (strncmp (KR_keyword, "/dev/pty26", 10) == 0)
{
{
-return dev_storage + 1523;
+return dev_storage + 324;
}
}
@@ -19203,11 +20652,11 @@ return NULL;
}
}
- case 'a':
- if (strncmp (KR_keyword, "/dev/sdax6", 10) == 0)
+ case '1':
+ if (strncmp (KR_keyword, "/dev/pty16", 10) == 0)
{
{
-return dev_storage + 1107;
+return dev_storage + 314;
}
}
@@ -19224,14 +20673,14 @@ return NULL;
}
}
- case 'w':
- switch (KR_keyword [7])
+ case 't':
+ switch (KR_keyword [8])
{
- case 'd':
- if (strncmp (KR_keyword, "/dev/sddw6", 10) == 0)
+ case '9':
+ if (strncmp (KR_keyword, "/dev/nst96", 10) == 0)
{
{
-return dev_storage + 2338;
+return dev_storage + 264;
}
}
@@ -19242,11 +20691,11 @@ return NULL;
}
}
- case 'c':
- if (strncmp (KR_keyword, "/dev/sdcw6", 10) == 0)
+ case '8':
+ if (strncmp (KR_keyword, "/dev/nst86", 10) == 0)
{
{
-return dev_storage + 1924;
+return dev_storage + 254;
}
}
@@ -19257,11 +20706,11 @@ return NULL;
}
}
- case 'b':
- if (strncmp (KR_keyword, "/dev/sdbw6", 10) == 0)
+ case '7':
+ if (strncmp (KR_keyword, "/dev/nst76", 10) == 0)
{
{
-return dev_storage + 1508;
+return dev_storage + 244;
}
}
@@ -19272,11 +20721,11 @@ return NULL;
}
}
- case 'a':
- if (strncmp (KR_keyword, "/dev/sdaw6", 10) == 0)
+ case '6':
+ if (strncmp (KR_keyword, "/dev/nst66", 10) == 0)
{
{
-return dev_storage + 1092;
+return dev_storage + 234;
}
}
@@ -19287,20 +20736,26 @@ return NULL;
}
}
- default:
+ case '5':
+ if (strncmp (KR_keyword, "/dev/nst56", 10) == 0)
+ {
+{
+return dev_storage + 224;
+
+}
+ }
+ else
+ {
{
return NULL;
}
- }
- case 'v':
- switch (KR_keyword [7])
- {
- case 'd':
- if (strncmp (KR_keyword, "/dev/sddv6", 10) == 0)
+ }
+ case '4':
+ if (strncmp (KR_keyword, "/dev/nst46", 10) == 0)
{
{
-return dev_storage + 2323;
+return dev_storage + 214;
}
}
@@ -19311,11 +20766,11 @@ return NULL;
}
}
- case 'c':
- if (strncmp (KR_keyword, "/dev/sdcv6", 10) == 0)
+ case '3':
+ if (strncmp (KR_keyword, "/dev/nst36", 10) == 0)
{
{
-return dev_storage + 1909;
+return dev_storage + 204;
}
}
@@ -19326,11 +20781,11 @@ return NULL;
}
}
- case 'b':
- if (strncmp (KR_keyword, "/dev/sdbv6", 10) == 0)
+ case '2':
+ if (strncmp (KR_keyword, "/dev/nst26", 10) == 0)
{
{
-return dev_storage + 1493;
+return dev_storage + 194;
}
}
@@ -19341,11 +20796,11 @@ return NULL;
}
}
- case 'a':
- if (strncmp (KR_keyword, "/dev/sdav6", 10) == 0)
+ case '1':
+ if (strncmp (KR_keyword, "/dev/nst16", 10) == 0)
{
{
-return dev_storage + 1077;
+return dev_storage + 184;
}
}
@@ -19362,29 +20817,44 @@ return NULL;
}
}
- case 'u':
- switch (KR_keyword [7])
+ case 'n':
+ if (strncmp (KR_keyword, "/dev/cons6", 10) == 0)
{
- case 'd':
- if (strncmp (KR_keyword, "/dev/sddu6", 10) == 0)
- {
{
-return dev_storage + 2308;
+return dev_storage + 26;
}
- }
- else
- {
+ }
+ else
+ {
{
return NULL;
}
- }
- case 'c':
- if (strncmp (KR_keyword, "/dev/sdcu6", 10) == 0)
+ }
+ case 'm':
+ if (strncmp (KR_keyword, "/dev/com16", 10) == 0)
+ {
+{
+return dev_storage + 17;
+
+}
+ }
+ else
+ {
+{
+return NULL;
+
+}
+ }
+ case 'd':
+ switch (KR_keyword [8])
+ {
+ case 'x':
+ if (strncmp (KR_keyword, "/dev/sddx6", 10) == 0)
{
{
-return dev_storage + 1894;
+return dev_storage + 2481;
}
}
@@ -19395,11 +20865,11 @@ return NULL;
}
}
- case 'b':
- if (strncmp (KR_keyword, "/dev/sdbu6", 10) == 0)
+ case 'w':
+ if (strncmp (KR_keyword, "/dev/sddw6", 10) == 0)
{
{
-return dev_storage + 1478;
+return dev_storage + 2466;
}
}
@@ -19410,11 +20880,11 @@ return NULL;
}
}
- case 'a':
- if (strncmp (KR_keyword, "/dev/sdau6", 10) == 0)
+ case 'v':
+ if (strncmp (KR_keyword, "/dev/sddv6", 10) == 0)
{
{
-return dev_storage + 1062;
+return dev_storage + 2451;
}
}
@@ -19425,20 +20895,11 @@ return NULL;
}
}
- default:
-{
-return NULL;
-
-}
- }
- case 't':
- switch (KR_keyword [7])
- {
- case 'd':
- if (strncmp (KR_keyword, "/dev/sddt6", 10) == 0)
+ case 'u':
+ if (strncmp (KR_keyword, "/dev/sddu6", 10) == 0)
{
{
-return dev_storage + 2293;
+return dev_storage + 2436;
}
}
@@ -19449,11 +20910,11 @@ return NULL;
}
}
- case 'c':
- if (strncmp (KR_keyword, "/dev/sdct6", 10) == 0)
+ case 't':
+ if (strncmp (KR_keyword, "/dev/sddt6", 10) == 0)
{
{
-return dev_storage + 1879;
+return dev_storage + 2421;
}
}
@@ -19464,11 +20925,11 @@ return NULL;
}
}
- case 'b':
- if (strncmp (KR_keyword, "/dev/sdbt6", 10) == 0)
+ case 's':
+ if (strncmp (KR_keyword, "/dev/sdds6", 10) == 0)
{
{
-return dev_storage + 1463;
+return dev_storage + 2406;
}
}
@@ -19479,11 +20940,11 @@ return NULL;
}
}
- case 'a':
- if (strncmp (KR_keyword, "/dev/sdat6", 10) == 0)
+ case 'r':
+ if (strncmp (KR_keyword, "/dev/sddr6", 10) == 0)
{
{
-return dev_storage + 1047;
+return dev_storage + 2391;
}
}
@@ -19494,20 +20955,11 @@ return NULL;
}
}
- default:
-{
-return NULL;
-
-}
- }
- case 's':
- switch (KR_keyword [7])
- {
- case 'n':
- if (strncmp (KR_keyword, "/dev/cons6", 10) == 0)
+ case 'q':
+ if (strncmp (KR_keyword, "/dev/sddq6", 10) == 0)
{
{
-return dev_storage + 26;
+return dev_storage + 2376;
}
}
@@ -19518,11 +20970,11 @@ return NULL;
}
}
- case 'd':
- if (strncmp (KR_keyword, "/dev/sdds6", 10) == 0)
+ case 'p':
+ if (strncmp (KR_keyword, "/dev/sddp6", 10) == 0)
{
{
-return dev_storage + 2278;
+return dev_storage + 2361;
}
}
@@ -19533,11 +20985,11 @@ return NULL;
}
}
- case 'c':
- if (strncmp (KR_keyword, "/dev/sdcs6", 10) == 0)
+ case 'o':
+ if (strncmp (KR_keyword, "/dev/sddo6", 10) == 0)
{
{
-return dev_storage + 1864;
+return dev_storage + 2346;
}
}
@@ -19548,11 +21000,11 @@ return NULL;
}
}
- case 'b':
- if (strncmp (KR_keyword, "/dev/sdbs6", 10) == 0)
+ case 'n':
+ if (strncmp (KR_keyword, "/dev/sddn6", 10) == 0)
{
{
-return dev_storage + 1448;
+return dev_storage + 2331;
}
}
@@ -19563,11 +21015,11 @@ return NULL;
}
}
- case 'a':
- if (strncmp (KR_keyword, "/dev/sdas6", 10) == 0)
+ case 'm':
+ if (strncmp (KR_keyword, "/dev/sddm6", 10) == 0)
{
{
-return dev_storage + 1032;
+return dev_storage + 2316;
}
}
@@ -19578,20 +21030,11 @@ return NULL;
}
}
- default:
-{
-return NULL;
-
-}
- }
- case 'r':
- switch (KR_keyword [7])
- {
- case 'd':
- if (strncmp (KR_keyword, "/dev/sddr6", 10) == 0)
+ case 'l':
+ if (strncmp (KR_keyword, "/dev/sddl6", 10) == 0)
{
{
-return dev_storage + 2263;
+return dev_storage + 2301;
}
}
@@ -19602,11 +21045,11 @@ return NULL;
}
}
- case 'c':
- if (strncmp (KR_keyword, "/dev/sdcr6", 10) == 0)
+ case 'k':
+ if (strncmp (KR_keyword, "/dev/sddk6", 10) == 0)
{
{
-return dev_storage + 1849;
+return dev_storage + 2286;
}
}
@@ -19617,11 +21060,11 @@ return NULL;
}
}
- case 'b':
- if (strncmp (KR_keyword, "/dev/sdbr6", 10) == 0)
+ case 'j':
+ if (strncmp (KR_keyword, "/dev/sddj6", 10) == 0)
{
{
-return dev_storage + 1433;
+return dev_storage + 2271;
}
}
@@ -19632,11 +21075,11 @@ return NULL;
}
}
- case 'a':
- if (strncmp (KR_keyword, "/dev/sdar6", 10) == 0)
+ case 'i':
+ if (strncmp (KR_keyword, "/dev/sddi6", 10) == 0)
{
{
-return dev_storage + 1017;
+return dev_storage + 2256;
}
}
@@ -19647,20 +21090,11 @@ return NULL;
}
}
- default:
-{
-return NULL;
-
-}
- }
- case 'q':
- switch (KR_keyword [7])
- {
- case 'd':
- if (strncmp (KR_keyword, "/dev/sddq6", 10) == 0)
+ case 'h':
+ if (strncmp (KR_keyword, "/dev/sddh6", 10) == 0)
{
{
-return dev_storage + 2248;
+return dev_storage + 2241;
}
}
@@ -19671,11 +21105,11 @@ return NULL;
}
}
- case 'c':
- if (strncmp (KR_keyword, "/dev/sdcq6", 10) == 0)
+ case 'g':
+ if (strncmp (KR_keyword, "/dev/sddg6", 10) == 0)
{
{
-return dev_storage + 1834;
+return dev_storage + 2226;
}
}
@@ -19686,11 +21120,11 @@ return NULL;
}
}
- case 'b':
- if (strncmp (KR_keyword, "/dev/sdbq6", 10) == 0)
+ case 'f':
+ if (strncmp (KR_keyword, "/dev/sddf6", 10) == 0)
{
{
-return dev_storage + 1418;
+return dev_storage + 2211;
}
}
@@ -19701,11 +21135,11 @@ return NULL;
}
}
- case 'a':
- if (strncmp (KR_keyword, "/dev/sdaq6", 10) == 0)
+ case 'e':
+ if (strncmp (KR_keyword, "/dev/sdde6", 10) == 0)
{
{
-return dev_storage + 1002;
+return dev_storage + 2196;
}
}
@@ -19716,20 +21150,11 @@ return NULL;
}
}
- default:
-{
-return NULL;
-
-}
- }
- case 'p':
- switch (KR_keyword [7])
- {
case 'd':
- if (strncmp (KR_keyword, "/dev/sddp6", 10) == 0)
+ if (strncmp (KR_keyword, "/dev/sddd6", 10) == 0)
{
{
-return dev_storage + 2233;
+return dev_storage + 2181;
}
}
@@ -19741,10 +21166,10 @@ return NULL;
}
}
case 'c':
- if (strncmp (KR_keyword, "/dev/sdcp6", 10) == 0)
+ if (strncmp (KR_keyword, "/dev/sddc6", 10) == 0)
{
{
-return dev_storage + 1819;
+return dev_storage + 2166;
}
}
@@ -19756,10 +21181,10 @@ return NULL;
}
}
case 'b':
- if (strncmp (KR_keyword, "/dev/sdbp6", 10) == 0)
+ if (strncmp (KR_keyword, "/dev/sddb6", 10) == 0)
{
{
-return dev_storage + 1403;
+return dev_storage + 2151;
}
}
@@ -19771,10 +21196,10 @@ return NULL;
}
}
case 'a':
- if (strncmp (KR_keyword, "/dev/sdap6", 10) == 0)
+ if (strncmp (KR_keyword, "/dev/sdda6", 10) == 0)
{
{
-return dev_storage + 987;
+return dev_storage + 2136;
}
}
@@ -19791,14 +21216,14 @@ return NULL;
}
}
- case 'o':
- switch (KR_keyword [7])
+ case 'c':
+ switch (KR_keyword [8])
{
- case 'd':
- if (strncmp (KR_keyword, "/dev/sddo6", 10) == 0)
+ case 'z':
+ if (strncmp (KR_keyword, "/dev/sdcz6", 10) == 0)
{
{
-return dev_storage + 2218;
+return dev_storage + 2097;
}
}
@@ -19809,11 +21234,11 @@ return NULL;
}
}
- case 'c':
- if (strncmp (KR_keyword, "/dev/sdco6", 10) == 0)
+ case 'y':
+ if (strncmp (KR_keyword, "/dev/sdcy6", 10) == 0)
{
{
-return dev_storage + 1804;
+return dev_storage + 2082;
}
}
@@ -19824,11 +21249,11 @@ return NULL;
}
}
- case 'b':
- if (strncmp (KR_keyword, "/dev/sdbo6", 10) == 0)
+ case 'x':
+ if (strncmp (KR_keyword, "/dev/sdcx6", 10) == 0)
{
{
-return dev_storage + 1388;
+return dev_storage + 2067;
}
}
@@ -19839,11 +21264,11 @@ return NULL;
}
}
- case 'a':
- if (strncmp (KR_keyword, "/dev/sdao6", 10) == 0)
+ case 'w':
+ if (strncmp (KR_keyword, "/dev/sdcw6", 10) == 0)
{
{
-return dev_storage + 972;
+return dev_storage + 2052;
}
}
@@ -19854,20 +21279,11 @@ return NULL;
}
}
- default:
-{
-return NULL;
-
-}
- }
- case 'n':
- switch (KR_keyword [7])
- {
- case 'd':
- if (strncmp (KR_keyword, "/dev/sddn6", 10) == 0)
+ case 'v':
+ if (strncmp (KR_keyword, "/dev/sdcv6", 10) == 0)
{
{
-return dev_storage + 2203;
+return dev_storage + 2037;
}
}
@@ -19878,11 +21294,11 @@ return NULL;
}
}
- case 'c':
- if (strncmp (KR_keyword, "/dev/sdcn6", 10) == 0)
+ case 'u':
+ if (strncmp (KR_keyword, "/dev/sdcu6", 10) == 0)
{
{
-return dev_storage + 1789;
+return dev_storage + 2022;
}
}
@@ -19893,11 +21309,11 @@ return NULL;
}
}
- case 'b':
- if (strncmp (KR_keyword, "/dev/sdbn6", 10) == 0)
+ case 't':
+ if (strncmp (KR_keyword, "/dev/sdct6", 10) == 0)
{
{
-return dev_storage + 1373;
+return dev_storage + 2007;
}
}
@@ -19908,11 +21324,11 @@ return NULL;
}
}
- case 'a':
- if (strncmp (KR_keyword, "/dev/sdan6", 10) == 0)
+ case 's':
+ if (strncmp (KR_keyword, "/dev/sdcs6", 10) == 0)
{
{
-return dev_storage + 957;
+return dev_storage + 1992;
}
}
@@ -19923,20 +21339,11 @@ return NULL;
}
}
- default:
-{
-return NULL;
-
-}
- }
- case 'm':
- switch (KR_keyword [7])
- {
- case 'd':
- if (strncmp (KR_keyword, "/dev/sddm6", 10) == 0)
+ case 'r':
+ if (strncmp (KR_keyword, "/dev/sdcr6", 10) == 0)
{
{
-return dev_storage + 2188;
+return dev_storage + 1977;
}
}
@@ -19947,11 +21354,11 @@ return NULL;
}
}
- case 'c':
- if (strncmp (KR_keyword, "/dev/sdcm6", 10) == 0)
+ case 'q':
+ if (strncmp (KR_keyword, "/dev/sdcq6", 10) == 0)
{
{
-return dev_storage + 1774;
+return dev_storage + 1962;
}
}
@@ -19962,11 +21369,11 @@ return NULL;
}
}
- case 'b':
- if (strncmp (KR_keyword, "/dev/sdbm6", 10) == 0)
+ case 'p':
+ if (strncmp (KR_keyword, "/dev/sdcp6", 10) == 0)
{
{
-return dev_storage + 1358;
+return dev_storage + 1947;
}
}
@@ -19977,11 +21384,11 @@ return NULL;
}
}
- case 'a':
- if (strncmp (KR_keyword, "/dev/sdam6", 10) == 0)
+ case 'o':
+ if (strncmp (KR_keyword, "/dev/sdco6", 10) == 0)
{
{
-return dev_storage + 942;
+return dev_storage + 1932;
}
}
@@ -19992,20 +21399,26 @@ return NULL;
}
}
- default:
+ case 'n':
+ if (strncmp (KR_keyword, "/dev/sdcn6", 10) == 0)
+ {
+{
+return dev_storage + 1917;
+
+}
+ }
+ else
+ {
{
return NULL;
}
- }
- case 'l':
- switch (KR_keyword [7])
- {
- case 'd':
- if (strncmp (KR_keyword, "/dev/sddl6", 10) == 0)
+ }
+ case 'm':
+ if (strncmp (KR_keyword, "/dev/sdcm6", 10) == 0)
{
{
-return dev_storage + 2173;
+return dev_storage + 1902;
}
}
@@ -20016,11 +21429,11 @@ return NULL;
}
}
- case 'c':
+ case 'l':
if (strncmp (KR_keyword, "/dev/sdcl6", 10) == 0)
{
{
-return dev_storage + 1759;
+return dev_storage + 1887;
}
}
@@ -20031,11 +21444,11 @@ return NULL;
}
}
- case 'b':
- if (strncmp (KR_keyword, "/dev/sdbl6", 10) == 0)
+ case 'k':
+ if (strncmp (KR_keyword, "/dev/sdck6", 10) == 0)
{
{
-return dev_storage + 1343;
+return dev_storage + 1872;
}
}
@@ -20046,11 +21459,11 @@ return NULL;
}
}
- case 'a':
- if (strncmp (KR_keyword, "/dev/sdal6", 10) == 0)
+ case 'j':
+ if (strncmp (KR_keyword, "/dev/sdcj6", 10) == 0)
{
{
-return dev_storage + 927;
+return dev_storage + 1857;
}
}
@@ -20061,20 +21474,11 @@ return NULL;
}
}
- default:
-{
-return NULL;
-
-}
- }
- case 'k':
- switch (KR_keyword [7])
- {
- case 'd':
- if (strncmp (KR_keyword, "/dev/sddk6", 10) == 0)
+ case 'i':
+ if (strncmp (KR_keyword, "/dev/sdci6", 10) == 0)
{
{
-return dev_storage + 2158;
+return dev_storage + 1842;
}
}
@@ -20085,11 +21489,11 @@ return NULL;
}
}
- case 'c':
- if (strncmp (KR_keyword, "/dev/sdck6", 10) == 0)
+ case 'h':
+ if (strncmp (KR_keyword, "/dev/sdch6", 10) == 0)
{
{
-return dev_storage + 1744;
+return dev_storage + 1827;
}
}
@@ -20100,11 +21504,11 @@ return NULL;
}
}
- case 'b':
- if (strncmp (KR_keyword, "/dev/sdbk6", 10) == 0)
+ case 'g':
+ if (strncmp (KR_keyword, "/dev/sdcg6", 10) == 0)
{
{
-return dev_storage + 1328;
+return dev_storage + 1812;
}
}
@@ -20115,11 +21519,11 @@ return NULL;
}
}
- case 'a':
- if (strncmp (KR_keyword, "/dev/sdak6", 10) == 0)
+ case 'f':
+ if (strncmp (KR_keyword, "/dev/sdcf6", 10) == 0)
{
{
-return dev_storage + 912;
+return dev_storage + 1797;
}
}
@@ -20130,20 +21534,26 @@ return NULL;
}
}
- default:
+ case 'e':
+ if (strncmp (KR_keyword, "/dev/sdce6", 10) == 0)
+ {
+{
+return dev_storage + 1782;
+
+}
+ }
+ else
+ {
{
return NULL;
}
- }
- case 'j':
- switch (KR_keyword [7])
- {
+ }
case 'd':
- if (strncmp (KR_keyword, "/dev/sddj6", 10) == 0)
+ if (strncmp (KR_keyword, "/dev/sdcd6", 10) == 0)
{
{
-return dev_storage + 2143;
+return dev_storage + 1767;
}
}
@@ -20155,10 +21565,10 @@ return NULL;
}
}
case 'c':
- if (strncmp (KR_keyword, "/dev/sdcj6", 10) == 0)
+ if (strncmp (KR_keyword, "/dev/sdcc6", 10) == 0)
{
{
-return dev_storage + 1729;
+return dev_storage + 1752;
}
}
@@ -20170,10 +21580,10 @@ return NULL;
}
}
case 'b':
- if (strncmp (KR_keyword, "/dev/sdbj6", 10) == 0)
+ if (strncmp (KR_keyword, "/dev/sdcb6", 10) == 0)
{
{
-return dev_storage + 1313;
+return dev_storage + 1737;
}
}
@@ -20185,10 +21595,10 @@ return NULL;
}
}
case 'a':
- if (strncmp (KR_keyword, "/dev/sdaj6", 10) == 0)
+ if (strncmp (KR_keyword, "/dev/sdca6", 10) == 0)
{
{
-return dev_storage + 897;
+return dev_storage + 1722;
}
}
@@ -20205,14 +21615,14 @@ return NULL;
}
}
- case 'i':
- switch (KR_keyword [7])
+ case 'b':
+ switch (KR_keyword [8])
{
- case 'd':
- if (strncmp (KR_keyword, "/dev/sddi6", 10) == 0)
+ case 'z':
+ if (strncmp (KR_keyword, "/dev/sdbz6", 10) == 0)
{
{
-return dev_storage + 2128;
+return dev_storage + 1681;
}
}
@@ -20223,11 +21633,11 @@ return NULL;
}
}
- case 'c':
- if (strncmp (KR_keyword, "/dev/sdci6", 10) == 0)
+ case 'y':
+ if (strncmp (KR_keyword, "/dev/sdby6", 10) == 0)
{
{
-return dev_storage + 1714;
+return dev_storage + 1666;
}
}
@@ -20238,11 +21648,11 @@ return NULL;
}
}
- case 'b':
- if (strncmp (KR_keyword, "/dev/sdbi6", 10) == 0)
+ case 'x':
+ if (strncmp (KR_keyword, "/dev/sdbx6", 10) == 0)
{
{
-return dev_storage + 1298;
+return dev_storage + 1651;
}
}
@@ -20253,11 +21663,11 @@ return NULL;
}
}
- case 'a':
- if (strncmp (KR_keyword, "/dev/sdai6", 10) == 0)
+ case 'w':
+ if (strncmp (KR_keyword, "/dev/sdbw6", 10) == 0)
{
{
-return dev_storage + 882;
+return dev_storage + 1636;
}
}
@@ -20268,20 +21678,11 @@ return NULL;
}
}
- default:
-{
-return NULL;
-
-}
- }
- case 'h':
- switch (KR_keyword [7])
- {
- case 'd':
- if (strncmp (KR_keyword, "/dev/sddh6", 10) == 0)
+ case 'v':
+ if (strncmp (KR_keyword, "/dev/sdbv6", 10) == 0)
{
{
-return dev_storage + 2113;
+return dev_storage + 1621;
}
}
@@ -20292,11 +21693,11 @@ return NULL;
}
}
- case 'c':
- if (strncmp (KR_keyword, "/dev/sdch6", 10) == 0)
+ case 'u':
+ if (strncmp (KR_keyword, "/dev/sdbu6", 10) == 0)
{
{
-return dev_storage + 1699;
+return dev_storage + 1606;
}
}
@@ -20307,11 +21708,11 @@ return NULL;
}
}
- case 'b':
- if (strncmp (KR_keyword, "/dev/sdbh6", 10) == 0)
+ case 't':
+ if (strncmp (KR_keyword, "/dev/sdbt6", 10) == 0)
{
{
-return dev_storage + 1283;
+return dev_storage + 1591;
}
}
@@ -20322,11 +21723,11 @@ return NULL;
}
}
- case 'a':
- if (strncmp (KR_keyword, "/dev/sdah6", 10) == 0)
+ case 's':
+ if (strncmp (KR_keyword, "/dev/sdbs6", 10) == 0)
{
{
-return dev_storage + 867;
+return dev_storage + 1576;
}
}
@@ -20337,20 +21738,11 @@ return NULL;
}
}
- default:
-{
-return NULL;
-
-}
- }
- case 'g':
- switch (KR_keyword [7])
- {
- case 'd':
- if (strncmp (KR_keyword, "/dev/sddg6", 10) == 0)
+ case 'r':
+ if (strncmp (KR_keyword, "/dev/sdbr6", 10) == 0)
{
{
-return dev_storage + 2098;
+return dev_storage + 1561;
}
}
@@ -20361,11 +21753,11 @@ return NULL;
}
}
- case 'c':
- if (strncmp (KR_keyword, "/dev/sdcg6", 10) == 0)
+ case 'q':
+ if (strncmp (KR_keyword, "/dev/sdbq6", 10) == 0)
{
{
-return dev_storage + 1684;
+return dev_storage + 1546;
}
}
@@ -20376,11 +21768,11 @@ return NULL;
}
}
- case 'b':
- if (strncmp (KR_keyword, "/dev/sdbg6", 10) == 0)
+ case 'p':
+ if (strncmp (KR_keyword, "/dev/sdbp6", 10) == 0)
{
{
-return dev_storage + 1268;
+return dev_storage + 1531;
}
}
@@ -20391,11 +21783,11 @@ return NULL;
}
}
- case 'a':
- if (strncmp (KR_keyword, "/dev/sdag6", 10) == 0)
+ case 'o':
+ if (strncmp (KR_keyword, "/dev/sdbo6", 10) == 0)
{
{
-return dev_storage + 852;
+return dev_storage + 1516;
}
}
@@ -20406,20 +21798,11 @@ return NULL;
}
}
- default:
-{
-return NULL;
-
-}
- }
- case 'f':
- switch (KR_keyword [7])
- {
- case 'd':
- if (strncmp (KR_keyword, "/dev/sddf6", 10) == 0)
+ case 'n':
+ if (strncmp (KR_keyword, "/dev/sdbn6", 10) == 0)
{
{
-return dev_storage + 2083;
+return dev_storage + 1501;
}
}
@@ -20430,11 +21813,11 @@ return NULL;
}
}
- case 'c':
- if (strncmp (KR_keyword, "/dev/sdcf6", 10) == 0)
+ case 'm':
+ if (strncmp (KR_keyword, "/dev/sdbm6", 10) == 0)
{
{
-return dev_storage + 1669;
+return dev_storage + 1486;
}
}
@@ -20445,11 +21828,11 @@ return NULL;
}
}
- case 'b':
- if (strncmp (KR_keyword, "/dev/sdbf6", 10) == 0)
+ case 'l':
+ if (strncmp (KR_keyword, "/dev/sdbl6", 10) == 0)
{
{
-return dev_storage + 1253;
+return dev_storage + 1471;
}
}
@@ -20460,11 +21843,11 @@ return NULL;
}
}
- case 'a':
- if (strncmp (KR_keyword, "/dev/sdaf6", 10) == 0)
+ case 'k':
+ if (strncmp (KR_keyword, "/dev/sdbk6", 10) == 0)
{
{
-return dev_storage + 837;
+return dev_storage + 1456;
}
}
@@ -20475,20 +21858,26 @@ return NULL;
}
}
- default:
+ case 'j':
+ if (strncmp (KR_keyword, "/dev/sdbj6", 10) == 0)
+ {
+{
+return dev_storage + 1441;
+
+}
+ }
+ else
+ {
{
return NULL;
}
- }
- case 'e':
- switch (KR_keyword [7])
- {
- case 'd':
- if (strncmp (KR_keyword, "/dev/sdde6", 10) == 0)
+ }
+ case 'i':
+ if (strncmp (KR_keyword, "/dev/sdbi6", 10) == 0)
{
{
-return dev_storage + 2068;
+return dev_storage + 1426;
}
}
@@ -20499,11 +21888,11 @@ return NULL;
}
}
- case 'c':
- if (strncmp (KR_keyword, "/dev/sdce6", 10) == 0)
+ case 'h':
+ if (strncmp (KR_keyword, "/dev/sdbh6", 10) == 0)
{
{
-return dev_storage + 1654;
+return dev_storage + 1411;
}
}
@@ -20514,11 +21903,11 @@ return NULL;
}
}
- case 'b':
- if (strncmp (KR_keyword, "/dev/sdbe6", 10) == 0)
+ case 'g':
+ if (strncmp (KR_keyword, "/dev/sdbg6", 10) == 0)
{
{
-return dev_storage + 1238;
+return dev_storage + 1396;
}
}
@@ -20529,11 +21918,11 @@ return NULL;
}
}
- case 'a':
- if (strncmp (KR_keyword, "/dev/sdae6", 10) == 0)
+ case 'f':
+ if (strncmp (KR_keyword, "/dev/sdbf6", 10) == 0)
{
{
-return dev_storage + 822;
+return dev_storage + 1381;
}
}
@@ -20544,20 +21933,26 @@ return NULL;
}
}
- default:
+ case 'e':
+ if (strncmp (KR_keyword, "/dev/sdbe6", 10) == 0)
+ {
+{
+return dev_storage + 1366;
+
+}
+ }
+ else
+ {
{
return NULL;
}
- }
- case 'd':
- switch (KR_keyword [7])
- {
+ }
case 'd':
- if (strncmp (KR_keyword, "/dev/sddd6", 10) == 0)
+ if (strncmp (KR_keyword, "/dev/sdbd6", 10) == 0)
{
{
-return dev_storage + 2053;
+return dev_storage + 1351;
}
}
@@ -20569,10 +21964,10 @@ return NULL;
}
}
case 'c':
- if (strncmp (KR_keyword, "/dev/sdcd6", 10) == 0)
+ if (strncmp (KR_keyword, "/dev/sdbc6", 10) == 0)
{
{
-return dev_storage + 1639;
+return dev_storage + 1336;
}
}
@@ -20584,10 +21979,10 @@ return NULL;
}
}
case 'b':
- if (strncmp (KR_keyword, "/dev/sdbd6", 10) == 0)
+ if (strncmp (KR_keyword, "/dev/sdbb6", 10) == 0)
{
{
-return dev_storage + 1223;
+return dev_storage + 1321;
}
}
@@ -20599,10 +21994,10 @@ return NULL;
}
}
case 'a':
- if (strncmp (KR_keyword, "/dev/sdad6", 10) == 0)
+ if (strncmp (KR_keyword, "/dev/sdba6", 10) == 0)
{
{
-return dev_storage + 807;
+return dev_storage + 1306;
}
}
@@ -20619,14 +22014,14 @@ return NULL;
}
}
- case 'c':
- switch (KR_keyword [7])
+ case 'a':
+ switch (KR_keyword [8])
{
- case 'd':
- if (strncmp (KR_keyword, "/dev/sddc6", 10) == 0)
+ case 'z':
+ if (strncmp (KR_keyword, "/dev/sdaz6", 10) == 0)
{
{
-return dev_storage + 2038;
+return dev_storage + 1265;
}
}
@@ -20637,11 +22032,11 @@ return NULL;
}
}
- case 'c':
- if (strncmp (KR_keyword, "/dev/sdcc6", 10) == 0)
+ case 'y':
+ if (strncmp (KR_keyword, "/dev/sday6", 10) == 0)
{
{
-return dev_storage + 1624;
+return dev_storage + 1250;
}
}
@@ -20652,11 +22047,11 @@ return NULL;
}
}
- case 'b':
- if (strncmp (KR_keyword, "/dev/sdbc6", 10) == 0)
+ case 'x':
+ if (strncmp (KR_keyword, "/dev/sdax6", 10) == 0)
{
{
-return dev_storage + 1208;
+return dev_storage + 1235;
}
}
@@ -20667,11 +22062,11 @@ return NULL;
}
}
- case 'a':
- if (strncmp (KR_keyword, "/dev/sdac6", 10) == 0)
+ case 'w':
+ if (strncmp (KR_keyword, "/dev/sdaw6", 10) == 0)
{
{
-return dev_storage + 792;
+return dev_storage + 1220;
}
}
@@ -20682,20 +22077,11 @@ return NULL;
}
}
- default:
-{
-return NULL;
-
-}
- }
- case 'b':
- switch (KR_keyword [7])
- {
- case 'd':
- if (strncmp (KR_keyword, "/dev/sddb6", 10) == 0)
+ case 'v':
+ if (strncmp (KR_keyword, "/dev/sdav6", 10) == 0)
{
{
-return dev_storage + 2023;
+return dev_storage + 1205;
}
}
@@ -20706,11 +22092,11 @@ return NULL;
}
}
- case 'c':
- if (strncmp (KR_keyword, "/dev/sdcb6", 10) == 0)
+ case 'u':
+ if (strncmp (KR_keyword, "/dev/sdau6", 10) == 0)
{
{
-return dev_storage + 1609;
+return dev_storage + 1190;
}
}
@@ -20721,11 +22107,11 @@ return NULL;
}
}
- case 'b':
- if (strncmp (KR_keyword, "/dev/sdbb6", 10) == 0)
+ case 't':
+ if (strncmp (KR_keyword, "/dev/sdat6", 10) == 0)
{
{
-return dev_storage + 1193;
+return dev_storage + 1175;
}
}
@@ -20736,11 +22122,11 @@ return NULL;
}
}
- case 'a':
- if (strncmp (KR_keyword, "/dev/sdab6", 10) == 0)
+ case 's':
+ if (strncmp (KR_keyword, "/dev/sdas6", 10) == 0)
{
{
-return dev_storage + 777;
+return dev_storage + 1160;
}
}
@@ -20751,20 +22137,11 @@ return NULL;
}
}
- default:
-{
-return NULL;
-
-}
- }
- case 'a':
- switch (KR_keyword [7])
- {
- case 'd':
- if (strncmp (KR_keyword, "/dev/sdda6", 10) == 0)
+ case 'r':
+ if (strncmp (KR_keyword, "/dev/sdar6", 10) == 0)
{
{
-return dev_storage + 2008;
+return dev_storage + 1145;
}
}
@@ -20775,11 +22152,11 @@ return NULL;
}
}
- case 'c':
- if (strncmp (KR_keyword, "/dev/sdca6", 10) == 0)
+ case 'q':
+ if (strncmp (KR_keyword, "/dev/sdaq6", 10) == 0)
{
{
-return dev_storage + 1594;
+return dev_storage + 1130;
}
}
@@ -20790,11 +22167,11 @@ return NULL;
}
}
- case 'b':
- if (strncmp (KR_keyword, "/dev/sdba6", 10) == 0)
+ case 'p':
+ if (strncmp (KR_keyword, "/dev/sdap6", 10) == 0)
{
{
-return dev_storage + 1178;
+return dev_storage + 1115;
}
}
@@ -20805,11 +22182,11 @@ return NULL;
}
}
- case 'a':
- if (strncmp (KR_keyword, "/dev/sdaa6", 10) == 0)
+ case 'o':
+ if (strncmp (KR_keyword, "/dev/sdao6", 10) == 0)
{
{
-return dev_storage + 762;
+return dev_storage + 1100;
}
}
@@ -20820,95 +22197,86 @@ return NULL;
}
}
- default:
-{
-return NULL;
-
-}
- }
- case 'S':
- if (strncmp (KR_keyword, "/dev/ttyS6", 10) == 0)
- {
+ case 'n':
+ if (strncmp (KR_keyword, "/dev/sdan6", 10) == 0)
+ {
{
-return dev_storage + 2514;
+return dev_storage + 1085;
}
- }
- else
- {
+ }
+ else
+ {
{
return NULL;
}
- }
- case '9':
- if (strncmp (KR_keyword, "/dev/nst96", 10) == 0)
- {
+ }
+ case 'm':
+ if (strncmp (KR_keyword, "/dev/sdam6", 10) == 0)
+ {
{
-return dev_storage + 200;
+return dev_storage + 1070;
}
- }
- else
- {
+ }
+ else
+ {
{
return NULL;
}
- }
- case '8':
- if (strncmp (KR_keyword, "/dev/nst86", 10) == 0)
- {
+ }
+ case 'l':
+ if (strncmp (KR_keyword, "/dev/sdal6", 10) == 0)
+ {
{
-return dev_storage + 190;
+return dev_storage + 1055;
}
- }
- else
- {
+ }
+ else
+ {
{
return NULL;
}
- }
- case '7':
- if (strncmp (KR_keyword, "/dev/nst76", 10) == 0)
- {
+ }
+ case 'k':
+ if (strncmp (KR_keyword, "/dev/sdak6", 10) == 0)
+ {
{
-return dev_storage + 180;
+return dev_storage + 1040;
}
- }
- else
- {
+ }
+ else
+ {
{
return NULL;
}
- }
- case '6':
- if (strncmp (KR_keyword, "/dev/nst66", 10) == 0)
- {
+ }
+ case 'j':
+ if (strncmp (KR_keyword, "/dev/sdaj6", 10) == 0)
+ {
{
-return dev_storage + 170;
+return dev_storage + 1025;
}
- }
- else
- {
+ }
+ else
+ {
{
return NULL;
}
- }
- case '5':
- switch (KR_keyword [5])
- {
- case 'p':
- if (strncmp (KR_keyword, "/dev/pty56", 10) == 0)
+ }
+ case 'i':
+ if (strncmp (KR_keyword, "/dev/sdai6", 10) == 0)
{
{
-return dev_storage + 290;
+return dev_storage + 1010;
}
}
@@ -20919,11 +22287,11 @@ return NULL;
}
}
- case 'n':
- if (strncmp (KR_keyword, "/dev/nst56", 10) == 0)
+ case 'h':
+ if (strncmp (KR_keyword, "/dev/sdah6", 10) == 0)
{
{
-return dev_storage + 160;
+return dev_storage + 995;
}
}
@@ -20934,20 +22302,11 @@ return NULL;
}
}
- default:
-{
-return NULL;
-
-}
- }
- case '4':
- switch (KR_keyword [5])
- {
- case 'p':
- if (strncmp (KR_keyword, "/dev/pty46", 10) == 0)
+ case 'g':
+ if (strncmp (KR_keyword, "/dev/sdag6", 10) == 0)
{
{
-return dev_storage + 280;
+return dev_storage + 980;
}
}
@@ -20958,11 +22317,11 @@ return NULL;
}
}
- case 'n':
- if (strncmp (KR_keyword, "/dev/nst46", 10) == 0)
+ case 'f':
+ if (strncmp (KR_keyword, "/dev/sdaf6", 10) == 0)
{
{
-return dev_storage + 150;
+return dev_storage + 965;
}
}
@@ -20973,20 +22332,11 @@ return NULL;
}
}
- default:
-{
-return NULL;
-
-}
- }
- case '3':
- switch (KR_keyword [5])
- {
- case 'p':
- if (strncmp (KR_keyword, "/dev/pty36", 10) == 0)
+ case 'e':
+ if (strncmp (KR_keyword, "/dev/sdae6", 10) == 0)
{
{
-return dev_storage + 270;
+return dev_storage + 950;
}
}
@@ -20997,11 +22347,11 @@ return NULL;
}
}
- case 'n':
- if (strncmp (KR_keyword, "/dev/nst36", 10) == 0)
+ case 'd':
+ if (strncmp (KR_keyword, "/dev/sdad6", 10) == 0)
{
{
-return dev_storage + 140;
+return dev_storage + 935;
}
}
@@ -21012,20 +22362,11 @@ return NULL;
}
}
- default:
-{
-return NULL;
-
-}
- }
- case '2':
- switch (KR_keyword [5])
- {
- case 's':
- if (strncmp (KR_keyword, "/dev/st126", 10) == 0)
+ case 'c':
+ if (strncmp (KR_keyword, "/dev/sdac6", 10) == 0)
{
{
-return dev_storage + 2505;
+return dev_storage + 920;
}
}
@@ -21036,11 +22377,11 @@ return NULL;
}
}
- case 'p':
- if (strncmp (KR_keyword, "/dev/pty26", 10) == 0)
+ case 'b':
+ if (strncmp (KR_keyword, "/dev/sdab6", 10) == 0)
{
{
-return dev_storage + 260;
+return dev_storage + 905;
}
}
@@ -21051,11 +22392,11 @@ return NULL;
}
}
- case 'n':
- if (strncmp (KR_keyword, "/dev/nst26", 10) == 0)
+ case 'a':
+ if (strncmp (KR_keyword, "/dev/sdaa6", 10) == 0)
{
{
-return dev_storage + 130;
+return dev_storage + 890;
}
}
@@ -21073,28 +22414,13 @@ return NULL;
}
}
case '1':
- switch (KR_keyword [5])
+ switch (KR_keyword [8])
{
- case 's':
- if (strncmp (KR_keyword, "/dev/st116", 10) == 0)
- {
-{
-return dev_storage + 2495;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
- case 'p':
- if (strncmp (KR_keyword, "/dev/pty16", 10) == 0)
+ case '2':
+ if (strncmp (KR_keyword, "/dev/st126", 10) == 0)
{
{
-return dev_storage + 250;
+return dev_storage + 2633;
}
}
@@ -21105,11 +22431,11 @@ return NULL;
}
}
- case 'n':
- if (strncmp (KR_keyword, "/dev/nst16", 10) == 0)
+ case '1':
+ if (strncmp (KR_keyword, "/dev/st116", 10) == 0)
{
{
-return dev_storage + 120;
+return dev_storage + 2623;
}
}
@@ -21120,11 +22446,11 @@ return NULL;
}
}
- case 'c':
- if (strncmp (KR_keyword, "/dev/com16", 10) == 0)
+ case '0':
+ if (strncmp (KR_keyword, "/dev/st106", 10) == 0)
{
{
-return dev_storage + 17;
+return dev_storage + 2613;
}
}
@@ -21141,21 +22467,6 @@ return NULL;
}
}
- case '0':
- if (strncmp (KR_keyword, "/dev/st106", 10) == 0)
- {
-{
-return dev_storage + 2485;
-
-}
- }
- else
- {
-{
-return NULL;
-
-}
- }
default:
{
return NULL;
@@ -21169,7 +22480,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdz15", 10) == 0)
{
{
-return dev_storage + 730;
+return dev_storage + 858;
}
}
@@ -21187,7 +22498,67 @@ return NULL;
if (strncmp (KR_keyword, "/dev/ttyS5", 10) == 0)
{
{
-return dev_storage + 2513;
+return dev_storage + 2641;
+
+}
+ }
+ else
+ {
+{
+return NULL;
+
+}
+ }
+ case '9':
+ if (strncmp (KR_keyword, "/dev/pty95", 10) == 0)
+ {
+{
+return dev_storage + 393;
+
+}
+ }
+ else
+ {
+{
+return NULL;
+
+}
+ }
+ case '8':
+ if (strncmp (KR_keyword, "/dev/pty85", 10) == 0)
+ {
+{
+return dev_storage + 383;
+
+}
+ }
+ else
+ {
+{
+return NULL;
+
+}
+ }
+ case '7':
+ if (strncmp (KR_keyword, "/dev/pty75", 10) == 0)
+ {
+{
+return dev_storage + 373;
+
+}
+ }
+ else
+ {
+{
+return NULL;
+
+}
+ }
+ case '6':
+ if (strncmp (KR_keyword, "/dev/pty65", 10) == 0)
+ {
+{
+return dev_storage + 363;
}
}
@@ -21202,7 +22573,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/pty55", 10) == 0)
{
{
-return dev_storage + 289;
+return dev_storage + 353;
}
}
@@ -21217,7 +22588,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/pty45", 10) == 0)
{
{
-return dev_storage + 279;
+return dev_storage + 343;
}
}
@@ -21232,7 +22603,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/pty35", 10) == 0)
{
{
-return dev_storage + 269;
+return dev_storage + 333;
}
}
@@ -21247,7 +22618,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/pty25", 10) == 0)
{
{
-return dev_storage + 259;
+return dev_storage + 323;
}
}
@@ -21265,7 +22636,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdy15", 10) == 0)
{
{
-return dev_storage + 715;
+return dev_storage + 843;
}
}
@@ -21280,7 +22651,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/pty15", 10) == 0)
{
{
-return dev_storage + 249;
+return dev_storage + 313;
}
}
@@ -21307,7 +22678,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdx15", 10) == 0)
{
{
-return dev_storage + 700;
+return dev_storage + 828;
}
}
@@ -21322,7 +22693,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdw15", 10) == 0)
{
{
-return dev_storage + 685;
+return dev_storage + 813;
}
}
@@ -21337,7 +22708,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdv15", 10) == 0)
{
{
-return dev_storage + 670;
+return dev_storage + 798;
}
}
@@ -21352,7 +22723,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdu15", 10) == 0)
{
{
-return dev_storage + 655;
+return dev_storage + 783;
}
}
@@ -21370,7 +22741,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/nst95", 10) == 0)
{
{
-return dev_storage + 199;
+return dev_storage + 263;
}
}
@@ -21385,7 +22756,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/nst85", 10) == 0)
{
{
-return dev_storage + 189;
+return dev_storage + 253;
}
}
@@ -21400,7 +22771,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/nst75", 10) == 0)
{
{
-return dev_storage + 179;
+return dev_storage + 243;
}
}
@@ -21415,7 +22786,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/nst65", 10) == 0)
{
{
-return dev_storage + 169;
+return dev_storage + 233;
}
}
@@ -21430,7 +22801,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/nst55", 10) == 0)
{
{
-return dev_storage + 159;
+return dev_storage + 223;
}
}
@@ -21445,7 +22816,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/nst45", 10) == 0)
{
{
-return dev_storage + 149;
+return dev_storage + 213;
}
}
@@ -21460,7 +22831,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/nst35", 10) == 0)
{
{
-return dev_storage + 139;
+return dev_storage + 203;
}
}
@@ -21475,7 +22846,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/nst25", 10) == 0)
{
{
-return dev_storage + 129;
+return dev_storage + 193;
}
}
@@ -21493,7 +22864,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdt15", 10) == 0)
{
{
-return dev_storage + 640;
+return dev_storage + 768;
}
}
@@ -21508,7 +22879,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/nst15", 10) == 0)
{
{
-return dev_storage + 119;
+return dev_storage + 183;
}
}
@@ -21535,7 +22906,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sds15", 10) == 0)
{
{
-return dev_storage + 625;
+return dev_storage + 753;
}
}
@@ -21550,7 +22921,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdr15", 10) == 0)
{
{
-return dev_storage + 610;
+return dev_storage + 738;
}
}
@@ -21565,7 +22936,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdq15", 10) == 0)
{
{
-return dev_storage + 595;
+return dev_storage + 723;
}
}
@@ -21580,7 +22951,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdp15", 10) == 0)
{
{
-return dev_storage + 580;
+return dev_storage + 708;
}
}
@@ -21595,7 +22966,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdo15", 10) == 0)
{
{
-return dev_storage + 565;
+return dev_storage + 693;
}
}
@@ -21613,7 +22984,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdn15", 10) == 0)
{
{
-return dev_storage + 550;
+return dev_storage + 678;
}
}
@@ -21652,7 +23023,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdm15", 10) == 0)
{
{
-return dev_storage + 535;
+return dev_storage + 663;
}
}
@@ -21688,7 +23059,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdl15", 10) == 0)
{
{
-return dev_storage + 520;
+return dev_storage + 648;
}
}
@@ -21703,7 +23074,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdk15", 10) == 0)
{
{
-return dev_storage + 505;
+return dev_storage + 633;
}
}
@@ -21718,7 +23089,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdj15", 10) == 0)
{
{
-return dev_storage + 490;
+return dev_storage + 618;
}
}
@@ -21733,7 +23104,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdi15", 10) == 0)
{
{
-return dev_storage + 475;
+return dev_storage + 603;
}
}
@@ -21748,7 +23119,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdh15", 10) == 0)
{
{
-return dev_storage + 460;
+return dev_storage + 588;
}
}
@@ -21763,7 +23134,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdg15", 10) == 0)
{
{
-return dev_storage + 445;
+return dev_storage + 573;
}
}
@@ -21778,7 +23149,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdf15", 10) == 0)
{
{
-return dev_storage + 430;
+return dev_storage + 558;
}
}
@@ -21793,7 +23164,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sde15", 10) == 0)
{
{
-return dev_storage + 415;
+return dev_storage + 543;
}
}
@@ -21811,7 +23182,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sddx5", 10) == 0)
{
{
-return dev_storage + 2352;
+return dev_storage + 2480;
}
}
@@ -21826,7 +23197,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sddw5", 10) == 0)
{
{
-return dev_storage + 2337;
+return dev_storage + 2465;
}
}
@@ -21841,7 +23212,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sddv5", 10) == 0)
{
{
-return dev_storage + 2322;
+return dev_storage + 2450;
}
}
@@ -21856,7 +23227,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sddu5", 10) == 0)
{
{
-return dev_storage + 2307;
+return dev_storage + 2435;
}
}
@@ -21871,7 +23242,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sddt5", 10) == 0)
{
{
-return dev_storage + 2292;
+return dev_storage + 2420;
}
}
@@ -21886,7 +23257,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdds5", 10) == 0)
{
{
-return dev_storage + 2277;
+return dev_storage + 2405;
}
}
@@ -21901,7 +23272,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sddr5", 10) == 0)
{
{
-return dev_storage + 2262;
+return dev_storage + 2390;
}
}
@@ -21916,7 +23287,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sddq5", 10) == 0)
{
{
-return dev_storage + 2247;
+return dev_storage + 2375;
}
}
@@ -21931,7 +23302,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sddp5", 10) == 0)
{
{
-return dev_storage + 2232;
+return dev_storage + 2360;
}
}
@@ -21946,7 +23317,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sddo5", 10) == 0)
{
{
-return dev_storage + 2217;
+return dev_storage + 2345;
}
}
@@ -21961,7 +23332,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sddn5", 10) == 0)
{
{
-return dev_storage + 2202;
+return dev_storage + 2330;
}
}
@@ -21976,7 +23347,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sddm5", 10) == 0)
{
{
-return dev_storage + 2187;
+return dev_storage + 2315;
}
}
@@ -21991,7 +23362,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sddl5", 10) == 0)
{
{
-return dev_storage + 2172;
+return dev_storage + 2300;
}
}
@@ -22006,7 +23377,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sddk5", 10) == 0)
{
{
-return dev_storage + 2157;
+return dev_storage + 2285;
}
}
@@ -22021,7 +23392,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sddj5", 10) == 0)
{
{
-return dev_storage + 2142;
+return dev_storage + 2270;
}
}
@@ -22036,7 +23407,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sddi5", 10) == 0)
{
{
-return dev_storage + 2127;
+return dev_storage + 2255;
}
}
@@ -22051,7 +23422,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sddh5", 10) == 0)
{
{
-return dev_storage + 2112;
+return dev_storage + 2240;
}
}
@@ -22066,7 +23437,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sddg5", 10) == 0)
{
{
-return dev_storage + 2097;
+return dev_storage + 2225;
}
}
@@ -22081,7 +23452,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sddf5", 10) == 0)
{
{
-return dev_storage + 2082;
+return dev_storage + 2210;
}
}
@@ -22096,7 +23467,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdde5", 10) == 0)
{
{
-return dev_storage + 2067;
+return dev_storage + 2195;
}
}
@@ -22111,7 +23482,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sddd5", 10) == 0)
{
{
-return dev_storage + 2052;
+return dev_storage + 2180;
}
}
@@ -22126,7 +23497,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sddc5", 10) == 0)
{
{
-return dev_storage + 2037;
+return dev_storage + 2165;
}
}
@@ -22141,7 +23512,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sddb5", 10) == 0)
{
{
-return dev_storage + 2022;
+return dev_storage + 2150;
}
}
@@ -22156,7 +23527,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdda5", 10) == 0)
{
{
-return dev_storage + 2007;
+return dev_storage + 2135;
}
}
@@ -22174,7 +23545,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdd15", 10) == 0)
{
{
-return dev_storage + 400;
+return dev_storage + 528;
}
}
@@ -22189,7 +23560,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/scd15", 10) == 0)
{
{
-return dev_storage + 314;
+return dev_storage + 442;
}
}
@@ -22219,7 +23590,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdcz5", 10) == 0)
{
{
-return dev_storage + 1968;
+return dev_storage + 2096;
}
}
@@ -22234,7 +23605,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdcy5", 10) == 0)
{
{
-return dev_storage + 1953;
+return dev_storage + 2081;
}
}
@@ -22249,7 +23620,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdcx5", 10) == 0)
{
{
-return dev_storage + 1938;
+return dev_storage + 2066;
}
}
@@ -22264,7 +23635,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdcw5", 10) == 0)
{
{
-return dev_storage + 1923;
+return dev_storage + 2051;
}
}
@@ -22279,7 +23650,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdcv5", 10) == 0)
{
{
-return dev_storage + 1908;
+return dev_storage + 2036;
}
}
@@ -22294,7 +23665,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdcu5", 10) == 0)
{
{
-return dev_storage + 1893;
+return dev_storage + 2021;
}
}
@@ -22309,7 +23680,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdct5", 10) == 0)
{
{
-return dev_storage + 1878;
+return dev_storage + 2006;
}
}
@@ -22324,7 +23695,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdcs5", 10) == 0)
{
{
-return dev_storage + 1863;
+return dev_storage + 1991;
}
}
@@ -22339,7 +23710,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdcr5", 10) == 0)
{
{
-return dev_storage + 1848;
+return dev_storage + 1976;
}
}
@@ -22354,7 +23725,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdcq5", 10) == 0)
{
{
-return dev_storage + 1833;
+return dev_storage + 1961;
}
}
@@ -22369,7 +23740,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdcp5", 10) == 0)
{
{
-return dev_storage + 1818;
+return dev_storage + 1946;
}
}
@@ -22384,7 +23755,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdco5", 10) == 0)
{
{
-return dev_storage + 1803;
+return dev_storage + 1931;
}
}
@@ -22399,7 +23770,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdcn5", 10) == 0)
{
{
-return dev_storage + 1788;
+return dev_storage + 1916;
}
}
@@ -22414,7 +23785,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdcm5", 10) == 0)
{
{
-return dev_storage + 1773;
+return dev_storage + 1901;
}
}
@@ -22429,7 +23800,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdcl5", 10) == 0)
{
{
-return dev_storage + 1758;
+return dev_storage + 1886;
}
}
@@ -22444,7 +23815,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdck5", 10) == 0)
{
{
-return dev_storage + 1743;
+return dev_storage + 1871;
}
}
@@ -22459,7 +23830,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdcj5", 10) == 0)
{
{
-return dev_storage + 1728;
+return dev_storage + 1856;
}
}
@@ -22474,7 +23845,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdci5", 10) == 0)
{
{
-return dev_storage + 1713;
+return dev_storage + 1841;
}
}
@@ -22489,7 +23860,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdch5", 10) == 0)
{
{
-return dev_storage + 1698;
+return dev_storage + 1826;
}
}
@@ -22504,7 +23875,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdcg5", 10) == 0)
{
{
-return dev_storage + 1683;
+return dev_storage + 1811;
}
}
@@ -22519,7 +23890,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdcf5", 10) == 0)
{
{
-return dev_storage + 1668;
+return dev_storage + 1796;
}
}
@@ -22534,7 +23905,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdce5", 10) == 0)
{
{
-return dev_storage + 1653;
+return dev_storage + 1781;
}
}
@@ -22549,7 +23920,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdcd5", 10) == 0)
{
{
-return dev_storage + 1638;
+return dev_storage + 1766;
}
}
@@ -22564,7 +23935,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdcc5", 10) == 0)
{
{
-return dev_storage + 1623;
+return dev_storage + 1751;
}
}
@@ -22579,7 +23950,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdcb5", 10) == 0)
{
{
-return dev_storage + 1608;
+return dev_storage + 1736;
}
}
@@ -22594,7 +23965,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdca5", 10) == 0)
{
{
-return dev_storage + 1593;
+return dev_storage + 1721;
}
}
@@ -22609,7 +23980,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdc15", 10) == 0)
{
{
-return dev_storage + 385;
+return dev_storage + 513;
}
}
@@ -22633,7 +24004,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdbz5", 10) == 0)
{
{
-return dev_storage + 1552;
+return dev_storage + 1680;
}
}
@@ -22648,7 +24019,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdby5", 10) == 0)
{
{
-return dev_storage + 1537;
+return dev_storage + 1665;
}
}
@@ -22663,7 +24034,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdbx5", 10) == 0)
{
{
-return dev_storage + 1522;
+return dev_storage + 1650;
}
}
@@ -22678,7 +24049,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdbw5", 10) == 0)
{
{
-return dev_storage + 1507;
+return dev_storage + 1635;
}
}
@@ -22693,7 +24064,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdbv5", 10) == 0)
{
{
-return dev_storage + 1492;
+return dev_storage + 1620;
}
}
@@ -22708,7 +24079,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdbu5", 10) == 0)
{
{
-return dev_storage + 1477;
+return dev_storage + 1605;
}
}
@@ -22723,7 +24094,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdbt5", 10) == 0)
{
{
-return dev_storage + 1462;
+return dev_storage + 1590;
}
}
@@ -22738,7 +24109,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdbs5", 10) == 0)
{
{
-return dev_storage + 1447;
+return dev_storage + 1575;
}
}
@@ -22753,7 +24124,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdbr5", 10) == 0)
{
{
-return dev_storage + 1432;
+return dev_storage + 1560;
}
}
@@ -22768,7 +24139,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdbq5", 10) == 0)
{
{
-return dev_storage + 1417;
+return dev_storage + 1545;
}
}
@@ -22783,7 +24154,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdbp5", 10) == 0)
{
{
-return dev_storage + 1402;
+return dev_storage + 1530;
}
}
@@ -22798,7 +24169,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdbo5", 10) == 0)
{
{
-return dev_storage + 1387;
+return dev_storage + 1515;
}
}
@@ -22813,7 +24184,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdbn5", 10) == 0)
{
{
-return dev_storage + 1372;
+return dev_storage + 1500;
}
}
@@ -22828,7 +24199,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdbm5", 10) == 0)
{
{
-return dev_storage + 1357;
+return dev_storage + 1485;
}
}
@@ -22843,7 +24214,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdbl5", 10) == 0)
{
{
-return dev_storage + 1342;
+return dev_storage + 1470;
}
}
@@ -22858,7 +24229,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdbk5", 10) == 0)
{
{
-return dev_storage + 1327;
+return dev_storage + 1455;
}
}
@@ -22873,7 +24244,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdbj5", 10) == 0)
{
{
-return dev_storage + 1312;
+return dev_storage + 1440;
}
}
@@ -22888,7 +24259,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdbi5", 10) == 0)
{
{
-return dev_storage + 1297;
+return dev_storage + 1425;
}
}
@@ -22903,7 +24274,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdbh5", 10) == 0)
{
{
-return dev_storage + 1282;
+return dev_storage + 1410;
}
}
@@ -22918,7 +24289,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdbg5", 10) == 0)
{
{
-return dev_storage + 1267;
+return dev_storage + 1395;
}
}
@@ -22933,7 +24304,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdbf5", 10) == 0)
{
{
-return dev_storage + 1252;
+return dev_storage + 1380;
}
}
@@ -22948,7 +24319,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdbe5", 10) == 0)
{
{
-return dev_storage + 1237;
+return dev_storage + 1365;
}
}
@@ -22963,7 +24334,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdbd5", 10) == 0)
{
{
-return dev_storage + 1222;
+return dev_storage + 1350;
}
}
@@ -22978,7 +24349,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdbc5", 10) == 0)
{
{
-return dev_storage + 1207;
+return dev_storage + 1335;
}
}
@@ -22993,7 +24364,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdbb5", 10) == 0)
{
{
-return dev_storage + 1192;
+return dev_storage + 1320;
}
}
@@ -23008,7 +24379,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdba5", 10) == 0)
{
{
-return dev_storage + 1177;
+return dev_storage + 1305;
}
}
@@ -23023,7 +24394,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdb15", 10) == 0)
{
{
-return dev_storage + 370;
+return dev_storage + 498;
}
}
@@ -23047,7 +24418,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdaz5", 10) == 0)
{
{
-return dev_storage + 1136;
+return dev_storage + 1264;
}
}
@@ -23062,7 +24433,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sday5", 10) == 0)
{
{
-return dev_storage + 1121;
+return dev_storage + 1249;
}
}
@@ -23077,7 +24448,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdax5", 10) == 0)
{
{
-return dev_storage + 1106;
+return dev_storage + 1234;
}
}
@@ -23092,7 +24463,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdaw5", 10) == 0)
{
{
-return dev_storage + 1091;
+return dev_storage + 1219;
}
}
@@ -23107,7 +24478,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdav5", 10) == 0)
{
{
-return dev_storage + 1076;
+return dev_storage + 1204;
}
}
@@ -23122,7 +24493,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdau5", 10) == 0)
{
{
-return dev_storage + 1061;
+return dev_storage + 1189;
}
}
@@ -23137,7 +24508,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdat5", 10) == 0)
{
{
-return dev_storage + 1046;
+return dev_storage + 1174;
}
}
@@ -23152,7 +24523,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdas5", 10) == 0)
{
{
-return dev_storage + 1031;
+return dev_storage + 1159;
}
}
@@ -23167,7 +24538,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdar5", 10) == 0)
{
{
-return dev_storage + 1016;
+return dev_storage + 1144;
}
}
@@ -23182,7 +24553,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdaq5", 10) == 0)
{
{
-return dev_storage + 1001;
+return dev_storage + 1129;
}
}
@@ -23197,7 +24568,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdap5", 10) == 0)
{
{
-return dev_storage + 986;
+return dev_storage + 1114;
}
}
@@ -23212,7 +24583,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdao5", 10) == 0)
{
{
-return dev_storage + 971;
+return dev_storage + 1099;
}
}
@@ -23227,7 +24598,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdan5", 10) == 0)
{
{
-return dev_storage + 956;
+return dev_storage + 1084;
}
}
@@ -23242,7 +24613,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdam5", 10) == 0)
{
{
-return dev_storage + 941;
+return dev_storage + 1069;
}
}
@@ -23257,7 +24628,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdal5", 10) == 0)
{
{
-return dev_storage + 926;
+return dev_storage + 1054;
}
}
@@ -23272,7 +24643,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdak5", 10) == 0)
{
{
-return dev_storage + 911;
+return dev_storage + 1039;
}
}
@@ -23287,7 +24658,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdaj5", 10) == 0)
{
{
-return dev_storage + 896;
+return dev_storage + 1024;
}
}
@@ -23302,7 +24673,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdai5", 10) == 0)
{
{
-return dev_storage + 881;
+return dev_storage + 1009;
}
}
@@ -23317,7 +24688,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdah5", 10) == 0)
{
{
-return dev_storage + 866;
+return dev_storage + 994;
}
}
@@ -23332,7 +24703,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdag5", 10) == 0)
{
{
-return dev_storage + 851;
+return dev_storage + 979;
}
}
@@ -23347,7 +24718,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdaf5", 10) == 0)
{
{
-return dev_storage + 836;
+return dev_storage + 964;
}
}
@@ -23362,7 +24733,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdae5", 10) == 0)
{
{
-return dev_storage + 821;
+return dev_storage + 949;
}
}
@@ -23377,7 +24748,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdad5", 10) == 0)
{
{
-return dev_storage + 806;
+return dev_storage + 934;
}
}
@@ -23392,7 +24763,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdac5", 10) == 0)
{
{
-return dev_storage + 791;
+return dev_storage + 919;
}
}
@@ -23407,7 +24778,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdab5", 10) == 0)
{
{
-return dev_storage + 776;
+return dev_storage + 904;
}
}
@@ -23422,7 +24793,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdaa5", 10) == 0)
{
{
-return dev_storage + 761;
+return dev_storage + 889;
}
}
@@ -23437,7 +24808,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sda15", 10) == 0)
{
{
-return dev_storage + 355;
+return dev_storage + 483;
}
}
@@ -23461,7 +24832,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/st125", 10) == 0)
{
{
-return dev_storage + 2504;
+return dev_storage + 2632;
}
}
@@ -23476,7 +24847,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/st115", 10) == 0)
{
{
-return dev_storage + 2494;
+return dev_storage + 2622;
}
}
@@ -23491,7 +24862,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/st105", 10) == 0)
{
{
-return dev_storage + 2484;
+return dev_storage + 2612;
}
}
@@ -23521,7 +24892,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdz14", 10) == 0)
{
{
-return dev_storage + 729;
+return dev_storage + 857;
}
}
@@ -23539,7 +24910,67 @@ return NULL;
if (strncmp (KR_keyword, "/dev/ttyS4", 10) == 0)
{
{
-return dev_storage + 2512;
+return dev_storage + 2640;
+
+}
+ }
+ else
+ {
+{
+return NULL;
+
+}
+ }
+ case '9':
+ if (strncmp (KR_keyword, "/dev/pty94", 10) == 0)
+ {
+{
+return dev_storage + 392;
+
+}
+ }
+ else
+ {
+{
+return NULL;
+
+}
+ }
+ case '8':
+ if (strncmp (KR_keyword, "/dev/pty84", 10) == 0)
+ {
+{
+return dev_storage + 382;
+
+}
+ }
+ else
+ {
+{
+return NULL;
+
+}
+ }
+ case '7':
+ if (strncmp (KR_keyword, "/dev/pty74", 10) == 0)
+ {
+{
+return dev_storage + 372;
+
+}
+ }
+ else
+ {
+{
+return NULL;
+
+}
+ }
+ case '6':
+ if (strncmp (KR_keyword, "/dev/pty64", 10) == 0)
+ {
+{
+return dev_storage + 362;
}
}
@@ -23554,7 +24985,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/pty54", 10) == 0)
{
{
-return dev_storage + 288;
+return dev_storage + 352;
}
}
@@ -23569,7 +25000,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/pty44", 10) == 0)
{
{
-return dev_storage + 278;
+return dev_storage + 342;
}
}
@@ -23584,7 +25015,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/pty34", 10) == 0)
{
{
-return dev_storage + 268;
+return dev_storage + 332;
}
}
@@ -23599,7 +25030,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/pty24", 10) == 0)
{
{
-return dev_storage + 258;
+return dev_storage + 322;
}
}
@@ -23617,7 +25048,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdy14", 10) == 0)
{
{
-return dev_storage + 714;
+return dev_storage + 842;
}
}
@@ -23632,7 +25063,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/pty14", 10) == 0)
{
{
-return dev_storage + 248;
+return dev_storage + 312;
}
}
@@ -23659,7 +25090,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdx14", 10) == 0)
{
{
-return dev_storage + 699;
+return dev_storage + 827;
}
}
@@ -23674,7 +25105,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdw14", 10) == 0)
{
{
-return dev_storage + 684;
+return dev_storage + 812;
}
}
@@ -23689,7 +25120,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdv14", 10) == 0)
{
{
-return dev_storage + 669;
+return dev_storage + 797;
}
}
@@ -23704,7 +25135,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdu14", 10) == 0)
{
{
-return dev_storage + 654;
+return dev_storage + 782;
}
}
@@ -23722,7 +25153,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/nst94", 10) == 0)
{
{
-return dev_storage + 198;
+return dev_storage + 262;
}
}
@@ -23737,7 +25168,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/nst84", 10) == 0)
{
{
-return dev_storage + 188;
+return dev_storage + 252;
}
}
@@ -23752,7 +25183,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/nst74", 10) == 0)
{
{
-return dev_storage + 178;
+return dev_storage + 242;
}
}
@@ -23767,7 +25198,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/nst64", 10) == 0)
{
{
-return dev_storage + 168;
+return dev_storage + 232;
}
}
@@ -23782,7 +25213,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/nst54", 10) == 0)
{
{
-return dev_storage + 158;
+return dev_storage + 222;
}
}
@@ -23797,7 +25228,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/nst44", 10) == 0)
{
{
-return dev_storage + 148;
+return dev_storage + 212;
}
}
@@ -23812,7 +25243,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/nst34", 10) == 0)
{
{
-return dev_storage + 138;
+return dev_storage + 202;
}
}
@@ -23827,7 +25258,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/nst24", 10) == 0)
{
{
-return dev_storage + 128;
+return dev_storage + 192;
}
}
@@ -23845,7 +25276,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdt14", 10) == 0)
{
{
-return dev_storage + 639;
+return dev_storage + 767;
}
}
@@ -23860,7 +25291,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/nst14", 10) == 0)
{
{
-return dev_storage + 118;
+return dev_storage + 182;
}
}
@@ -23887,7 +25318,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sds14", 10) == 0)
{
{
-return dev_storage + 624;
+return dev_storage + 752;
}
}
@@ -23902,7 +25333,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdr14", 10) == 0)
{
{
-return dev_storage + 609;
+return dev_storage + 737;
}
}
@@ -23917,7 +25348,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdq14", 10) == 0)
{
{
-return dev_storage + 594;
+return dev_storage + 722;
}
}
@@ -23932,7 +25363,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdp14", 10) == 0)
{
{
-return dev_storage + 579;
+return dev_storage + 707;
}
}
@@ -23947,7 +25378,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdo14", 10) == 0)
{
{
-return dev_storage + 564;
+return dev_storage + 692;
}
}
@@ -23965,7 +25396,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdn14", 10) == 0)
{
{
-return dev_storage + 549;
+return dev_storage + 677;
}
}
@@ -24004,7 +25435,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdm14", 10) == 0)
{
{
-return dev_storage + 534;
+return dev_storage + 662;
}
}
@@ -24040,7 +25471,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdl14", 10) == 0)
{
{
-return dev_storage + 519;
+return dev_storage + 647;
}
}
@@ -24055,7 +25486,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdk14", 10) == 0)
{
{
-return dev_storage + 504;
+return dev_storage + 632;
}
}
@@ -24070,7 +25501,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdj14", 10) == 0)
{
{
-return dev_storage + 489;
+return dev_storage + 617;
}
}
@@ -24085,7 +25516,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdi14", 10) == 0)
{
{
-return dev_storage + 474;
+return dev_storage + 602;
}
}
@@ -24100,7 +25531,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdh14", 10) == 0)
{
{
-return dev_storage + 459;
+return dev_storage + 587;
}
}
@@ -24115,7 +25546,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdg14", 10) == 0)
{
{
-return dev_storage + 444;
+return dev_storage + 572;
}
}
@@ -24130,7 +25561,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdf14", 10) == 0)
{
{
-return dev_storage + 429;
+return dev_storage + 557;
}
}
@@ -24145,7 +25576,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sde14", 10) == 0)
{
{
-return dev_storage + 414;
+return dev_storage + 542;
}
}
@@ -24163,7 +25594,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sddx4", 10) == 0)
{
{
-return dev_storage + 2351;
+return dev_storage + 2479;
}
}
@@ -24178,7 +25609,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sddw4", 10) == 0)
{
{
-return dev_storage + 2336;
+return dev_storage + 2464;
}
}
@@ -24193,7 +25624,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sddv4", 10) == 0)
{
{
-return dev_storage + 2321;
+return dev_storage + 2449;
}
}
@@ -24208,7 +25639,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sddu4", 10) == 0)
{
{
-return dev_storage + 2306;
+return dev_storage + 2434;
}
}
@@ -24223,7 +25654,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sddt4", 10) == 0)
{
{
-return dev_storage + 2291;
+return dev_storage + 2419;
}
}
@@ -24238,7 +25669,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdds4", 10) == 0)
{
{
-return dev_storage + 2276;
+return dev_storage + 2404;
}
}
@@ -24253,7 +25684,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sddr4", 10) == 0)
{
{
-return dev_storage + 2261;
+return dev_storage + 2389;
}
}
@@ -24268,7 +25699,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sddq4", 10) == 0)
{
{
-return dev_storage + 2246;
+return dev_storage + 2374;
}
}
@@ -24283,7 +25714,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sddp4", 10) == 0)
{
{
-return dev_storage + 2231;
+return dev_storage + 2359;
}
}
@@ -24298,7 +25729,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sddo4", 10) == 0)
{
{
-return dev_storage + 2216;
+return dev_storage + 2344;
}
}
@@ -24313,7 +25744,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sddn4", 10) == 0)
{
{
-return dev_storage + 2201;
+return dev_storage + 2329;
}
}
@@ -24328,7 +25759,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sddm4", 10) == 0)
{
{
-return dev_storage + 2186;
+return dev_storage + 2314;
}
}
@@ -24343,7 +25774,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sddl4", 10) == 0)
{
{
-return dev_storage + 2171;
+return dev_storage + 2299;
}
}
@@ -24358,7 +25789,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sddk4", 10) == 0)
{
{
-return dev_storage + 2156;
+return dev_storage + 2284;
}
}
@@ -24373,7 +25804,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sddj4", 10) == 0)
{
{
-return dev_storage + 2141;
+return dev_storage + 2269;
}
}
@@ -24388,7 +25819,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sddi4", 10) == 0)
{
{
-return dev_storage + 2126;
+return dev_storage + 2254;
}
}
@@ -24403,7 +25834,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sddh4", 10) == 0)
{
{
-return dev_storage + 2111;
+return dev_storage + 2239;
}
}
@@ -24418,7 +25849,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sddg4", 10) == 0)
{
{
-return dev_storage + 2096;
+return dev_storage + 2224;
}
}
@@ -24433,7 +25864,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sddf4", 10) == 0)
{
{
-return dev_storage + 2081;
+return dev_storage + 2209;
}
}
@@ -24448,7 +25879,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdde4", 10) == 0)
{
{
-return dev_storage + 2066;
+return dev_storage + 2194;
}
}
@@ -24463,7 +25894,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sddd4", 10) == 0)
{
{
-return dev_storage + 2051;
+return dev_storage + 2179;
}
}
@@ -24478,7 +25909,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sddc4", 10) == 0)
{
{
-return dev_storage + 2036;
+return dev_storage + 2164;
}
}
@@ -24493,7 +25924,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sddb4", 10) == 0)
{
{
-return dev_storage + 2021;
+return dev_storage + 2149;
}
}
@@ -24508,7 +25939,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdda4", 10) == 0)
{
{
-return dev_storage + 2006;
+return dev_storage + 2134;
}
}
@@ -24526,7 +25957,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdd14", 10) == 0)
{
{
-return dev_storage + 399;
+return dev_storage + 527;
}
}
@@ -24541,7 +25972,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/scd14", 10) == 0)
{
{
-return dev_storage + 313;
+return dev_storage + 441;
}
}
@@ -24571,7 +26002,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdcz4", 10) == 0)
{
{
-return dev_storage + 1967;
+return dev_storage + 2095;
}
}
@@ -24586,7 +26017,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdcy4", 10) == 0)
{
{
-return dev_storage + 1952;
+return dev_storage + 2080;
}
}
@@ -24601,7 +26032,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdcx4", 10) == 0)
{
{
-return dev_storage + 1937;
+return dev_storage + 2065;
}
}
@@ -24616,7 +26047,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdcw4", 10) == 0)
{
{
-return dev_storage + 1922;
+return dev_storage + 2050;
}
}
@@ -24631,7 +26062,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdcv4", 10) == 0)
{
{
-return dev_storage + 1907;
+return dev_storage + 2035;
}
}
@@ -24646,7 +26077,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdcu4", 10) == 0)
{
{
-return dev_storage + 1892;
+return dev_storage + 2020;
}
}
@@ -24661,7 +26092,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdct4", 10) == 0)
{
{
-return dev_storage + 1877;
+return dev_storage + 2005;
}
}
@@ -24676,7 +26107,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdcs4", 10) == 0)
{
{
-return dev_storage + 1862;
+return dev_storage + 1990;
}
}
@@ -24691,7 +26122,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdcr4", 10) == 0)
{
{
-return dev_storage + 1847;
+return dev_storage + 1975;
}
}
@@ -24706,7 +26137,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdcq4", 10) == 0)
{
{
-return dev_storage + 1832;
+return dev_storage + 1960;
}
}
@@ -24721,7 +26152,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdcp4", 10) == 0)
{
{
-return dev_storage + 1817;
+return dev_storage + 1945;
}
}
@@ -24736,7 +26167,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdco4", 10) == 0)
{
{
-return dev_storage + 1802;
+return dev_storage + 1930;
}
}
@@ -24751,7 +26182,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdcn4", 10) == 0)
{
{
-return dev_storage + 1787;
+return dev_storage + 1915;
}
}
@@ -24766,7 +26197,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdcm4", 10) == 0)
{
{
-return dev_storage + 1772;
+return dev_storage + 1900;
}
}
@@ -24781,7 +26212,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdcl4", 10) == 0)
{
{
-return dev_storage + 1757;
+return dev_storage + 1885;
}
}
@@ -24796,7 +26227,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdck4", 10) == 0)
{
{
-return dev_storage + 1742;
+return dev_storage + 1870;
}
}
@@ -24811,7 +26242,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdcj4", 10) == 0)
{
{
-return dev_storage + 1727;
+return dev_storage + 1855;
}
}
@@ -24826,7 +26257,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdci4", 10) == 0)
{
{
-return dev_storage + 1712;
+return dev_storage + 1840;
}
}
@@ -24841,7 +26272,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdch4", 10) == 0)
{
{
-return dev_storage + 1697;
+return dev_storage + 1825;
}
}
@@ -24856,7 +26287,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdcg4", 10) == 0)
{
{
-return dev_storage + 1682;
+return dev_storage + 1810;
}
}
@@ -24871,7 +26302,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdcf4", 10) == 0)
{
{
-return dev_storage + 1667;
+return dev_storage + 1795;
}
}
@@ -24886,7 +26317,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdce4", 10) == 0)
{
{
-return dev_storage + 1652;
+return dev_storage + 1780;
}
}
@@ -24901,7 +26332,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdcd4", 10) == 0)
{
{
-return dev_storage + 1637;
+return dev_storage + 1765;
}
}
@@ -24916,7 +26347,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdcc4", 10) == 0)
{
{
-return dev_storage + 1622;
+return dev_storage + 1750;
}
}
@@ -24931,7 +26362,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdcb4", 10) == 0)
{
{
-return dev_storage + 1607;
+return dev_storage + 1735;
}
}
@@ -24946,7 +26377,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdca4", 10) == 0)
{
{
-return dev_storage + 1592;
+return dev_storage + 1720;
}
}
@@ -24961,7 +26392,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdc14", 10) == 0)
{
{
-return dev_storage + 384;
+return dev_storage + 512;
}
}
@@ -24985,7 +26416,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdbz4", 10) == 0)
{
{
-return dev_storage + 1551;
+return dev_storage + 1679;
}
}
@@ -25000,7 +26431,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdby4", 10) == 0)
{
{
-return dev_storage + 1536;
+return dev_storage + 1664;
}
}
@@ -25015,7 +26446,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdbx4", 10) == 0)
{
{
-return dev_storage + 1521;
+return dev_storage + 1649;
}
}
@@ -25030,7 +26461,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdbw4", 10) == 0)
{
{
-return dev_storage + 1506;
+return dev_storage + 1634;
}
}
@@ -25045,7 +26476,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdbv4", 10) == 0)
{
{
-return dev_storage + 1491;
+return dev_storage + 1619;
}
}
@@ -25060,7 +26491,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdbu4", 10) == 0)
{
{
-return dev_storage + 1476;
+return dev_storage + 1604;
}
}
@@ -25075,7 +26506,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdbt4", 10) == 0)
{
{
-return dev_storage + 1461;
+return dev_storage + 1589;
}
}
@@ -25090,7 +26521,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdbs4", 10) == 0)
{
{
-return dev_storage + 1446;
+return dev_storage + 1574;
}
}
@@ -25105,7 +26536,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdbr4", 10) == 0)
{
{
-return dev_storage + 1431;
+return dev_storage + 1559;
}
}
@@ -25120,7 +26551,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdbq4", 10) == 0)
{
{
-return dev_storage + 1416;
+return dev_storage + 1544;
}
}
@@ -25135,7 +26566,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdbp4", 10) == 0)
{
{
-return dev_storage + 1401;
+return dev_storage + 1529;
}
}
@@ -25150,7 +26581,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdbo4", 10) == 0)
{
{
-return dev_storage + 1386;
+return dev_storage + 1514;
}
}
@@ -25165,7 +26596,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdbn4", 10) == 0)
{
{
-return dev_storage + 1371;
+return dev_storage + 1499;
}
}
@@ -25180,7 +26611,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdbm4", 10) == 0)
{
{
-return dev_storage + 1356;
+return dev_storage + 1484;
}
}
@@ -25195,7 +26626,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdbl4", 10) == 0)
{
{
-return dev_storage + 1341;
+return dev_storage + 1469;
}
}
@@ -25210,7 +26641,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdbk4", 10) == 0)
{
{
-return dev_storage + 1326;
+return dev_storage + 1454;
}
}
@@ -25225,7 +26656,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdbj4", 10) == 0)
{
{
-return dev_storage + 1311;
+return dev_storage + 1439;
}
}
@@ -25240,7 +26671,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdbi4", 10) == 0)
{
{
-return dev_storage + 1296;
+return dev_storage + 1424;
}
}
@@ -25255,7 +26686,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdbh4", 10) == 0)
{
{
-return dev_storage + 1281;
+return dev_storage + 1409;
}
}
@@ -25270,7 +26701,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdbg4", 10) == 0)
{
{
-return dev_storage + 1266;
+return dev_storage + 1394;
}
}
@@ -25285,7 +26716,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdbf4", 10) == 0)
{
{
-return dev_storage + 1251;
+return dev_storage + 1379;
}
}
@@ -25300,7 +26731,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdbe4", 10) == 0)
{
{
-return dev_storage + 1236;
+return dev_storage + 1364;
}
}
@@ -25315,7 +26746,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdbd4", 10) == 0)
{
{
-return dev_storage + 1221;
+return dev_storage + 1349;
}
}
@@ -25330,7 +26761,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdbc4", 10) == 0)
{
{
-return dev_storage + 1206;
+return dev_storage + 1334;
}
}
@@ -25345,7 +26776,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdbb4", 10) == 0)
{
{
-return dev_storage + 1191;
+return dev_storage + 1319;
}
}
@@ -25360,7 +26791,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdba4", 10) == 0)
{
{
-return dev_storage + 1176;
+return dev_storage + 1304;
}
}
@@ -25375,7 +26806,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdb14", 10) == 0)
{
{
-return dev_storage + 369;
+return dev_storage + 497;
}
}
@@ -25399,7 +26830,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdaz4", 10) == 0)
{
{
-return dev_storage + 1135;
+return dev_storage + 1263;
}
}
@@ -25414,7 +26845,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sday4", 10) == 0)
{
{
-return dev_storage + 1120;
+return dev_storage + 1248;
}
}
@@ -25429,7 +26860,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdax4", 10) == 0)
{
{
-return dev_storage + 1105;
+return dev_storage + 1233;
}
}
@@ -25444,7 +26875,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdaw4", 10) == 0)
{
{
-return dev_storage + 1090;
+return dev_storage + 1218;
}
}
@@ -25459,7 +26890,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdav4", 10) == 0)
{
{
-return dev_storage + 1075;
+return dev_storage + 1203;
}
}
@@ -25474,7 +26905,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdau4", 10) == 0)
{
{
-return dev_storage + 1060;
+return dev_storage + 1188;
}
}
@@ -25489,7 +26920,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdat4", 10) == 0)
{
{
-return dev_storage + 1045;
+return dev_storage + 1173;
}
}
@@ -25504,7 +26935,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdas4", 10) == 0)
{
{
-return dev_storage + 1030;
+return dev_storage + 1158;
}
}
@@ -25519,7 +26950,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdar4", 10) == 0)
{
{
-return dev_storage + 1015;
+return dev_storage + 1143;
}
}
@@ -25534,7 +26965,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdaq4", 10) == 0)
{
{
-return dev_storage + 1000;
+return dev_storage + 1128;
}
}
@@ -25549,7 +26980,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdap4", 10) == 0)
{
{
-return dev_storage + 985;
+return dev_storage + 1113;
}
}
@@ -25564,7 +26995,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdao4", 10) == 0)
{
{
-return dev_storage + 970;
+return dev_storage + 1098;
}
}
@@ -25579,7 +27010,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdan4", 10) == 0)
{
{
-return dev_storage + 955;
+return dev_storage + 1083;
}
}
@@ -25594,7 +27025,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdam4", 10) == 0)
{
{
-return dev_storage + 940;
+return dev_storage + 1068;
}
}
@@ -25609,7 +27040,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdal4", 10) == 0)
{
{
-return dev_storage + 925;
+return dev_storage + 1053;
}
}
@@ -25624,7 +27055,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdak4", 10) == 0)
{
{
-return dev_storage + 910;
+return dev_storage + 1038;
}
}
@@ -25639,7 +27070,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdaj4", 10) == 0)
{
{
-return dev_storage + 895;
+return dev_storage + 1023;
}
}
@@ -25654,7 +27085,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdai4", 10) == 0)
{
{
-return dev_storage + 880;
+return dev_storage + 1008;
}
}
@@ -25669,7 +27100,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdah4", 10) == 0)
{
{
-return dev_storage + 865;
+return dev_storage + 993;
}
}
@@ -25684,7 +27115,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdag4", 10) == 0)
{
{
-return dev_storage + 850;
+return dev_storage + 978;
}
}
@@ -25699,7 +27130,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdaf4", 10) == 0)
{
{
-return dev_storage + 835;
+return dev_storage + 963;
}
}
@@ -25714,7 +27145,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdae4", 10) == 0)
{
{
-return dev_storage + 820;
+return dev_storage + 948;
}
}
@@ -25729,7 +27160,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdad4", 10) == 0)
{
{
-return dev_storage + 805;
+return dev_storage + 933;
}
}
@@ -25744,7 +27175,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdac4", 10) == 0)
{
{
-return dev_storage + 790;
+return dev_storage + 918;
}
}
@@ -25759,7 +27190,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdab4", 10) == 0)
{
{
-return dev_storage + 775;
+return dev_storage + 903;
}
}
@@ -25774,7 +27205,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdaa4", 10) == 0)
{
{
-return dev_storage + 760;
+return dev_storage + 888;
}
}
@@ -25789,7 +27220,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sda14", 10) == 0)
{
{
-return dev_storage + 354;
+return dev_storage + 482;
}
}
@@ -25813,7 +27244,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/st124", 10) == 0)
{
{
-return dev_storage + 2503;
+return dev_storage + 2631;
}
}
@@ -25828,7 +27259,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/st114", 10) == 0)
{
{
-return dev_storage + 2493;
+return dev_storage + 2621;
}
}
@@ -25843,7 +27274,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/st104", 10) == 0)
{
{
-return dev_storage + 2483;
+return dev_storage + 2611;
}
}
@@ -25873,7 +27304,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdz13", 10) == 0)
{
{
-return dev_storage + 728;
+return dev_storage + 856;
}
}
@@ -25891,7 +27322,52 @@ return NULL;
if (strncmp (KR_keyword, "/dev/ttyS3", 10) == 0)
{
{
-return dev_storage + 2511;
+return dev_storage + 2639;
+
+}
+ }
+ else
+ {
+{
+return NULL;
+
+}
+ }
+ case '9':
+ if (strncmp (KR_keyword, "/dev/pty93", 10) == 0)
+ {
+{
+return dev_storage + 391;
+
+}
+ }
+ else
+ {
+{
+return NULL;
+
+}
+ }
+ case '8':
+ if (strncmp (KR_keyword, "/dev/pty83", 10) == 0)
+ {
+{
+return dev_storage + 381;
+
+}
+ }
+ else
+ {
+{
+return NULL;
+
+}
+ }
+ case '7':
+ if (strncmp (KR_keyword, "/dev/pty73", 10) == 0)
+ {
+{
+return dev_storage + 371;
}
}
@@ -25906,7 +27382,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/pty63", 10) == 0)
{
{
-return dev_storage + 297;
+return dev_storage + 361;
}
}
@@ -25921,7 +27397,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/pty53", 10) == 0)
{
{
-return dev_storage + 287;
+return dev_storage + 351;
}
}
@@ -25936,7 +27412,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/pty43", 10) == 0)
{
{
-return dev_storage + 277;
+return dev_storage + 341;
}
}
@@ -25951,7 +27427,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/pty33", 10) == 0)
{
{
-return dev_storage + 267;
+return dev_storage + 331;
}
}
@@ -25966,7 +27442,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/pty23", 10) == 0)
{
{
-return dev_storage + 257;
+return dev_storage + 321;
}
}
@@ -25984,7 +27460,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdy13", 10) == 0)
{
{
-return dev_storage + 713;
+return dev_storage + 841;
}
}
@@ -25999,7 +27475,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/pty13", 10) == 0)
{
{
-return dev_storage + 247;
+return dev_storage + 311;
}
}
@@ -26026,7 +27502,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdx13", 10) == 0)
{
{
-return dev_storage + 698;
+return dev_storage + 826;
}
}
@@ -26041,7 +27517,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdw13", 10) == 0)
{
{
-return dev_storage + 683;
+return dev_storage + 811;
}
}
@@ -26056,7 +27532,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdv13", 10) == 0)
{
{
-return dev_storage + 668;
+return dev_storage + 796;
}
}
@@ -26071,7 +27547,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdu13", 10) == 0)
{
{
-return dev_storage + 653;
+return dev_storage + 781;
}
}
@@ -26089,7 +27565,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/nst93", 10) == 0)
{
{
-return dev_storage + 197;
+return dev_storage + 261;
}
}
@@ -26104,7 +27580,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/nst83", 10) == 0)
{
{
-return dev_storage + 187;
+return dev_storage + 251;
}
}
@@ -26119,7 +27595,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/nst73", 10) == 0)
{
{
-return dev_storage + 177;
+return dev_storage + 241;
}
}
@@ -26134,7 +27610,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/nst63", 10) == 0)
{
{
-return dev_storage + 167;
+return dev_storage + 231;
}
}
@@ -26149,7 +27625,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/nst53", 10) == 0)
{
{
-return dev_storage + 157;
+return dev_storage + 221;
}
}
@@ -26164,7 +27640,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/nst43", 10) == 0)
{
{
-return dev_storage + 147;
+return dev_storage + 211;
}
}
@@ -26179,7 +27655,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/nst33", 10) == 0)
{
{
-return dev_storage + 137;
+return dev_storage + 201;
}
}
@@ -26194,7 +27670,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/nst23", 10) == 0)
{
{
-return dev_storage + 127;
+return dev_storage + 191;
}
}
@@ -26212,7 +27688,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdt13", 10) == 0)
{
{
-return dev_storage + 638;
+return dev_storage + 766;
}
}
@@ -26227,7 +27703,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/nst13", 10) == 0)
{
{
-return dev_storage + 117;
+return dev_storage + 181;
}
}
@@ -26254,7 +27730,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sds13", 10) == 0)
{
{
-return dev_storage + 623;
+return dev_storage + 751;
}
}
@@ -26269,7 +27745,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdr13", 10) == 0)
{
{
-return dev_storage + 608;
+return dev_storage + 736;
}
}
@@ -26284,7 +27760,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdq13", 10) == 0)
{
{
-return dev_storage + 593;
+return dev_storage + 721;
}
}
@@ -26299,7 +27775,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdp13", 10) == 0)
{
{
-return dev_storage + 578;
+return dev_storage + 706;
}
}
@@ -26314,7 +27790,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdo13", 10) == 0)
{
{
-return dev_storage + 563;
+return dev_storage + 691;
}
}
@@ -26332,7 +27808,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdn13", 10) == 0)
{
{
-return dev_storage + 548;
+return dev_storage + 676;
}
}
@@ -26371,7 +27847,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdm13", 10) == 0)
{
{
-return dev_storage + 533;
+return dev_storage + 661;
}
}
@@ -26407,7 +27883,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdl13", 10) == 0)
{
{
-return dev_storage + 518;
+return dev_storage + 646;
}
}
@@ -26422,7 +27898,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdk13", 10) == 0)
{
{
-return dev_storage + 503;
+return dev_storage + 631;
}
}
@@ -26437,7 +27913,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdj13", 10) == 0)
{
{
-return dev_storage + 488;
+return dev_storage + 616;
}
}
@@ -26452,7 +27928,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdi13", 10) == 0)
{
{
-return dev_storage + 473;
+return dev_storage + 601;
}
}
@@ -26467,7 +27943,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdh13", 10) == 0)
{
{
-return dev_storage + 458;
+return dev_storage + 586;
}
}
@@ -26482,7 +27958,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdg13", 10) == 0)
{
{
-return dev_storage + 443;
+return dev_storage + 571;
}
}
@@ -26497,7 +27973,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdf13", 10) == 0)
{
{
-return dev_storage + 428;
+return dev_storage + 556;
}
}
@@ -26512,7 +27988,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sde13", 10) == 0)
{
{
-return dev_storage + 413;
+return dev_storage + 541;
}
}
@@ -26530,7 +28006,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sddx3", 10) == 0)
{
{
-return dev_storage + 2350;
+return dev_storage + 2478;
}
}
@@ -26545,7 +28021,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sddw3", 10) == 0)
{
{
-return dev_storage + 2335;
+return dev_storage + 2463;
}
}
@@ -26560,7 +28036,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sddv3", 10) == 0)
{
{
-return dev_storage + 2320;
+return dev_storage + 2448;
}
}
@@ -26575,7 +28051,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sddu3", 10) == 0)
{
{
-return dev_storage + 2305;
+return dev_storage + 2433;
}
}
@@ -26590,7 +28066,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sddt3", 10) == 0)
{
{
-return dev_storage + 2290;
+return dev_storage + 2418;
}
}
@@ -26605,7 +28081,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdds3", 10) == 0)
{
{
-return dev_storage + 2275;
+return dev_storage + 2403;
}
}
@@ -26620,7 +28096,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sddr3", 10) == 0)
{
{
-return dev_storage + 2260;
+return dev_storage + 2388;
}
}
@@ -26635,7 +28111,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sddq3", 10) == 0)
{
{
-return dev_storage + 2245;
+return dev_storage + 2373;
}
}
@@ -26650,7 +28126,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sddp3", 10) == 0)
{
{
-return dev_storage + 2230;
+return dev_storage + 2358;
}
}
@@ -26665,7 +28141,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sddo3", 10) == 0)
{
{
-return dev_storage + 2215;
+return dev_storage + 2343;
}
}
@@ -26680,7 +28156,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sddn3", 10) == 0)
{
{
-return dev_storage + 2200;
+return dev_storage + 2328;
}
}
@@ -26695,7 +28171,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sddm3", 10) == 0)
{
{
-return dev_storage + 2185;
+return dev_storage + 2313;
}
}
@@ -26710,7 +28186,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sddl3", 10) == 0)
{
{
-return dev_storage + 2170;
+return dev_storage + 2298;
}
}
@@ -26725,7 +28201,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sddk3", 10) == 0)
{
{
-return dev_storage + 2155;
+return dev_storage + 2283;
}
}
@@ -26740,7 +28216,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sddj3", 10) == 0)
{
{
-return dev_storage + 2140;
+return dev_storage + 2268;
}
}
@@ -26755,7 +28231,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sddi3", 10) == 0)
{
{
-return dev_storage + 2125;
+return dev_storage + 2253;
}
}
@@ -26770,7 +28246,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sddh3", 10) == 0)
{
{
-return dev_storage + 2110;
+return dev_storage + 2238;
}
}
@@ -26785,7 +28261,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sddg3", 10) == 0)
{
{
-return dev_storage + 2095;
+return dev_storage + 2223;
}
}
@@ -26800,7 +28276,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sddf3", 10) == 0)
{
{
-return dev_storage + 2080;
+return dev_storage + 2208;
}
}
@@ -26815,7 +28291,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdde3", 10) == 0)
{
{
-return dev_storage + 2065;
+return dev_storage + 2193;
}
}
@@ -26830,7 +28306,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sddd3", 10) == 0)
{
{
-return dev_storage + 2050;
+return dev_storage + 2178;
}
}
@@ -26845,7 +28321,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sddc3", 10) == 0)
{
{
-return dev_storage + 2035;
+return dev_storage + 2163;
}
}
@@ -26860,7 +28336,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sddb3", 10) == 0)
{
{
-return dev_storage + 2020;
+return dev_storage + 2148;
}
}
@@ -26875,7 +28351,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdda3", 10) == 0)
{
{
-return dev_storage + 2005;
+return dev_storage + 2133;
}
}
@@ -26893,7 +28369,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdd13", 10) == 0)
{
{
-return dev_storage + 398;
+return dev_storage + 526;
}
}
@@ -26908,7 +28384,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/scd13", 10) == 0)
{
{
-return dev_storage + 312;
+return dev_storage + 440;
}
}
@@ -26938,7 +28414,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdcz3", 10) == 0)
{
{
-return dev_storage + 1966;
+return dev_storage + 2094;
}
}
@@ -26953,7 +28429,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdcy3", 10) == 0)
{
{
-return dev_storage + 1951;
+return dev_storage + 2079;
}
}
@@ -26968,7 +28444,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdcx3", 10) == 0)
{
{
-return dev_storage + 1936;
+return dev_storage + 2064;
}
}
@@ -26983,7 +28459,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdcw3", 10) == 0)
{
{
-return dev_storage + 1921;
+return dev_storage + 2049;
}
}
@@ -26998,7 +28474,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdcv3", 10) == 0)
{
{
-return dev_storage + 1906;
+return dev_storage + 2034;
}
}
@@ -27013,7 +28489,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdcu3", 10) == 0)
{
{
-return dev_storage + 1891;
+return dev_storage + 2019;
}
}
@@ -27028,7 +28504,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdct3", 10) == 0)
{
{
-return dev_storage + 1876;
+return dev_storage + 2004;
}
}
@@ -27043,7 +28519,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdcs3", 10) == 0)
{
{
-return dev_storage + 1861;
+return dev_storage + 1989;
}
}
@@ -27058,7 +28534,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdcr3", 10) == 0)
{
{
-return dev_storage + 1846;
+return dev_storage + 1974;
}
}
@@ -27073,7 +28549,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdcq3", 10) == 0)
{
{
-return dev_storage + 1831;
+return dev_storage + 1959;
}
}
@@ -27088,7 +28564,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdcp3", 10) == 0)
{
{
-return dev_storage + 1816;
+return dev_storage + 1944;
}
}
@@ -27103,7 +28579,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdco3", 10) == 0)
{
{
-return dev_storage + 1801;
+return dev_storage + 1929;
}
}
@@ -27118,7 +28594,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdcn3", 10) == 0)
{
{
-return dev_storage + 1786;
+return dev_storage + 1914;
}
}
@@ -27133,7 +28609,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdcm3", 10) == 0)
{
{
-return dev_storage + 1771;
+return dev_storage + 1899;
}
}
@@ -27148,7 +28624,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdcl3", 10) == 0)
{
{
-return dev_storage + 1756;
+return dev_storage + 1884;
}
}
@@ -27163,7 +28639,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdck3", 10) == 0)
{
{
-return dev_storage + 1741;
+return dev_storage + 1869;
}
}
@@ -27178,7 +28654,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdcj3", 10) == 0)
{
{
-return dev_storage + 1726;
+return dev_storage + 1854;
}
}
@@ -27193,7 +28669,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdci3", 10) == 0)
{
{
-return dev_storage + 1711;
+return dev_storage + 1839;
}
}
@@ -27208,7 +28684,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdch3", 10) == 0)
{
{
-return dev_storage + 1696;
+return dev_storage + 1824;
}
}
@@ -27223,7 +28699,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdcg3", 10) == 0)
{
{
-return dev_storage + 1681;
+return dev_storage + 1809;
}
}
@@ -27238,7 +28714,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdcf3", 10) == 0)
{
{
-return dev_storage + 1666;
+return dev_storage + 1794;
}
}
@@ -27253,7 +28729,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdce3", 10) == 0)
{
{
-return dev_storage + 1651;
+return dev_storage + 1779;
}
}
@@ -27268,7 +28744,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdcd3", 10) == 0)
{
{
-return dev_storage + 1636;
+return dev_storage + 1764;
}
}
@@ -27283,7 +28759,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdcc3", 10) == 0)
{
{
-return dev_storage + 1621;
+return dev_storage + 1749;
}
}
@@ -27298,7 +28774,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdcb3", 10) == 0)
{
{
-return dev_storage + 1606;
+return dev_storage + 1734;
}
}
@@ -27313,7 +28789,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdca3", 10) == 0)
{
{
-return dev_storage + 1591;
+return dev_storage + 1719;
}
}
@@ -27328,7 +28804,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdc13", 10) == 0)
{
{
-return dev_storage + 383;
+return dev_storage + 511;
}
}
@@ -27352,7 +28828,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdbz3", 10) == 0)
{
{
-return dev_storage + 1550;
+return dev_storage + 1678;
}
}
@@ -27367,7 +28843,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdby3", 10) == 0)
{
{
-return dev_storage + 1535;
+return dev_storage + 1663;
}
}
@@ -27382,7 +28858,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdbx3", 10) == 0)
{
{
-return dev_storage + 1520;
+return dev_storage + 1648;
}
}
@@ -27397,7 +28873,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdbw3", 10) == 0)
{
{
-return dev_storage + 1505;
+return dev_storage + 1633;
}
}
@@ -27412,7 +28888,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdbv3", 10) == 0)
{
{
-return dev_storage + 1490;
+return dev_storage + 1618;
}
}
@@ -27427,7 +28903,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdbu3", 10) == 0)
{
{
-return dev_storage + 1475;
+return dev_storage + 1603;
}
}
@@ -27442,7 +28918,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdbt3", 10) == 0)
{
{
-return dev_storage + 1460;
+return dev_storage + 1588;
}
}
@@ -27457,7 +28933,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdbs3", 10) == 0)
{
{
-return dev_storage + 1445;
+return dev_storage + 1573;
}
}
@@ -27472,7 +28948,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdbr3", 10) == 0)
{
{
-return dev_storage + 1430;
+return dev_storage + 1558;
}
}
@@ -27487,7 +28963,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdbq3", 10) == 0)
{
{
-return dev_storage + 1415;
+return dev_storage + 1543;
}
}
@@ -27502,7 +28978,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdbp3", 10) == 0)
{
{
-return dev_storage + 1400;
+return dev_storage + 1528;
}
}
@@ -27517,7 +28993,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdbo3", 10) == 0)
{
{
-return dev_storage + 1385;
+return dev_storage + 1513;
}
}
@@ -27532,7 +29008,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdbn3", 10) == 0)
{
{
-return dev_storage + 1370;
+return dev_storage + 1498;
}
}
@@ -27547,7 +29023,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdbm3", 10) == 0)
{
{
-return dev_storage + 1355;
+return dev_storage + 1483;
}
}
@@ -27562,7 +29038,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdbl3", 10) == 0)
{
{
-return dev_storage + 1340;
+return dev_storage + 1468;
}
}
@@ -27577,7 +29053,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdbk3", 10) == 0)
{
{
-return dev_storage + 1325;
+return dev_storage + 1453;
}
}
@@ -27592,7 +29068,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdbj3", 10) == 0)
{
{
-return dev_storage + 1310;
+return dev_storage + 1438;
}
}
@@ -27607,7 +29083,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdbi3", 10) == 0)
{
{
-return dev_storage + 1295;
+return dev_storage + 1423;
}
}
@@ -27622,7 +29098,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdbh3", 10) == 0)
{
{
-return dev_storage + 1280;
+return dev_storage + 1408;
}
}
@@ -27637,7 +29113,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdbg3", 10) == 0)
{
{
-return dev_storage + 1265;
+return dev_storage + 1393;
}
}
@@ -27652,7 +29128,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdbf3", 10) == 0)
{
{
-return dev_storage + 1250;
+return dev_storage + 1378;
}
}
@@ -27667,7 +29143,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdbe3", 10) == 0)
{
{
-return dev_storage + 1235;
+return dev_storage + 1363;
}
}
@@ -27682,7 +29158,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdbd3", 10) == 0)
{
{
-return dev_storage + 1220;
+return dev_storage + 1348;
}
}
@@ -27697,7 +29173,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdbc3", 10) == 0)
{
{
-return dev_storage + 1205;
+return dev_storage + 1333;
}
}
@@ -27712,7 +29188,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdbb3", 10) == 0)
{
{
-return dev_storage + 1190;
+return dev_storage + 1318;
}
}
@@ -27727,7 +29203,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdba3", 10) == 0)
{
{
-return dev_storage + 1175;
+return dev_storage + 1303;
}
}
@@ -27742,7 +29218,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdb13", 10) == 0)
{
{
-return dev_storage + 368;
+return dev_storage + 496;
}
}
@@ -27766,7 +29242,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdaz3", 10) == 0)
{
{
-return dev_storage + 1134;
+return dev_storage + 1262;
}
}
@@ -27781,7 +29257,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sday3", 10) == 0)
{
{
-return dev_storage + 1119;
+return dev_storage + 1247;
}
}
@@ -27796,7 +29272,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdax3", 10) == 0)
{
{
-return dev_storage + 1104;
+return dev_storage + 1232;
}
}
@@ -27811,7 +29287,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdaw3", 10) == 0)
{
{
-return dev_storage + 1089;
+return dev_storage + 1217;
}
}
@@ -27826,7 +29302,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdav3", 10) == 0)
{
{
-return dev_storage + 1074;
+return dev_storage + 1202;
}
}
@@ -27841,7 +29317,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdau3", 10) == 0)
{
{
-return dev_storage + 1059;
+return dev_storage + 1187;
}
}
@@ -27856,7 +29332,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdat3", 10) == 0)
{
{
-return dev_storage + 1044;
+return dev_storage + 1172;
}
}
@@ -27871,7 +29347,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdas3", 10) == 0)
{
{
-return dev_storage + 1029;
+return dev_storage + 1157;
}
}
@@ -27886,7 +29362,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdar3", 10) == 0)
{
{
-return dev_storage + 1014;
+return dev_storage + 1142;
}
}
@@ -27901,7 +29377,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdaq3", 10) == 0)
{
{
-return dev_storage + 999;
+return dev_storage + 1127;
}
}
@@ -27916,7 +29392,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdap3", 10) == 0)
{
{
-return dev_storage + 984;
+return dev_storage + 1112;
}
}
@@ -27931,7 +29407,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdao3", 10) == 0)
{
{
-return dev_storage + 969;
+return dev_storage + 1097;
}
}
@@ -27946,7 +29422,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdan3", 10) == 0)
{
{
-return dev_storage + 954;
+return dev_storage + 1082;
}
}
@@ -27961,7 +29437,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdam3", 10) == 0)
{
{
-return dev_storage + 939;
+return dev_storage + 1067;
}
}
@@ -27976,7 +29452,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdal3", 10) == 0)
{
{
-return dev_storage + 924;
+return dev_storage + 1052;
}
}
@@ -27991,7 +29467,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdak3", 10) == 0)
{
{
-return dev_storage + 909;
+return dev_storage + 1037;
}
}
@@ -28006,7 +29482,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdaj3", 10) == 0)
{
{
-return dev_storage + 894;
+return dev_storage + 1022;
}
}
@@ -28021,7 +29497,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdai3", 10) == 0)
{
{
-return dev_storage + 879;
+return dev_storage + 1007;
}
}
@@ -28036,7 +29512,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdah3", 10) == 0)
{
{
-return dev_storage + 864;
+return dev_storage + 992;
}
}
@@ -28051,7 +29527,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdag3", 10) == 0)
{
{
-return dev_storage + 849;
+return dev_storage + 977;
}
}
@@ -28066,7 +29542,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdaf3", 10) == 0)
{
{
-return dev_storage + 834;
+return dev_storage + 962;
}
}
@@ -28081,7 +29557,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdae3", 10) == 0)
{
{
-return dev_storage + 819;
+return dev_storage + 947;
}
}
@@ -28096,7 +29572,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdad3", 10) == 0)
{
{
-return dev_storage + 804;
+return dev_storage + 932;
}
}
@@ -28111,7 +29587,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdac3", 10) == 0)
{
{
-return dev_storage + 789;
+return dev_storage + 917;
}
}
@@ -28126,7 +29602,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdab3", 10) == 0)
{
{
-return dev_storage + 774;
+return dev_storage + 902;
}
}
@@ -28141,7 +29617,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdaa3", 10) == 0)
{
{
-return dev_storage + 759;
+return dev_storage + 887;
}
}
@@ -28156,7 +29632,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sda13", 10) == 0)
{
{
-return dev_storage + 353;
+return dev_storage + 481;
}
}
@@ -28180,7 +29656,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/st123", 10) == 0)
{
{
-return dev_storage + 2502;
+return dev_storage + 2630;
}
}
@@ -28195,7 +29671,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/st113", 10) == 0)
{
{
-return dev_storage + 2492;
+return dev_storage + 2620;
}
}
@@ -28210,7 +29686,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/st103", 10) == 0)
{
{
-return dev_storage + 2482;
+return dev_storage + 2610;
}
}
@@ -28240,7 +29716,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdz12", 10) == 0)
{
{
-return dev_storage + 727;
+return dev_storage + 855;
}
}
@@ -28258,7 +29734,52 @@ return NULL;
if (strncmp (KR_keyword, "/dev/ttyS2", 10) == 0)
{
{
-return dev_storage + 2510;
+return dev_storage + 2638;
+
+}
+ }
+ else
+ {
+{
+return NULL;
+
+}
+ }
+ case '9':
+ if (strncmp (KR_keyword, "/dev/pty92", 10) == 0)
+ {
+{
+return dev_storage + 390;
+
+}
+ }
+ else
+ {
+{
+return NULL;
+
+}
+ }
+ case '8':
+ if (strncmp (KR_keyword, "/dev/pty82", 10) == 0)
+ {
+{
+return dev_storage + 380;
+
+}
+ }
+ else
+ {
+{
+return NULL;
+
+}
+ }
+ case '7':
+ if (strncmp (KR_keyword, "/dev/pty72", 10) == 0)
+ {
+{
+return dev_storage + 370;
}
}
@@ -28273,7 +29794,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/pty62", 10) == 0)
{
{
-return dev_storage + 296;
+return dev_storage + 360;
}
}
@@ -28288,7 +29809,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/pty52", 10) == 0)
{
{
-return dev_storage + 286;
+return dev_storage + 350;
}
}
@@ -28303,7 +29824,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/pty42", 10) == 0)
{
{
-return dev_storage + 276;
+return dev_storage + 340;
}
}
@@ -28318,7 +29839,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/pty32", 10) == 0)
{
{
-return dev_storage + 266;
+return dev_storage + 330;
}
}
@@ -28333,7 +29854,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/pty22", 10) == 0)
{
{
-return dev_storage + 256;
+return dev_storage + 320;
}
}
@@ -28351,7 +29872,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdy12", 10) == 0)
{
{
-return dev_storage + 712;
+return dev_storage + 840;
}
}
@@ -28366,7 +29887,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/pty12", 10) == 0)
{
{
-return dev_storage + 246;
+return dev_storage + 310;
}
}
@@ -28393,7 +29914,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdx12", 10) == 0)
{
{
-return dev_storage + 697;
+return dev_storage + 825;
}
}
@@ -28408,7 +29929,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdw12", 10) == 0)
{
{
-return dev_storage + 682;
+return dev_storage + 810;
}
}
@@ -28423,7 +29944,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdv12", 10) == 0)
{
{
-return dev_storage + 667;
+return dev_storage + 795;
}
}
@@ -28438,7 +29959,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdu12", 10) == 0)
{
{
-return dev_storage + 652;
+return dev_storage + 780;
}
}
@@ -28456,7 +29977,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/nst92", 10) == 0)
{
{
-return dev_storage + 196;
+return dev_storage + 260;
}
}
@@ -28471,7 +29992,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/nst82", 10) == 0)
{
{
-return dev_storage + 186;
+return dev_storage + 250;
}
}
@@ -28486,7 +30007,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/nst72", 10) == 0)
{
{
-return dev_storage + 176;
+return dev_storage + 240;
}
}
@@ -28501,7 +30022,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/nst62", 10) == 0)
{
{
-return dev_storage + 166;
+return dev_storage + 230;
}
}
@@ -28516,7 +30037,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/nst52", 10) == 0)
{
{
-return dev_storage + 156;
+return dev_storage + 220;
}
}
@@ -28531,7 +30052,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/nst42", 10) == 0)
{
{
-return dev_storage + 146;
+return dev_storage + 210;
}
}
@@ -28546,7 +30067,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/nst32", 10) == 0)
{
{
-return dev_storage + 136;
+return dev_storage + 200;
}
}
@@ -28561,7 +30082,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/nst22", 10) == 0)
{
{
-return dev_storage + 126;
+return dev_storage + 190;
}
}
@@ -28579,7 +30100,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdt12", 10) == 0)
{
{
-return dev_storage + 637;
+return dev_storage + 765;
}
}
@@ -28594,7 +30115,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/nst12", 10) == 0)
{
{
-return dev_storage + 116;
+return dev_storage + 180;
}
}
@@ -28621,7 +30142,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sds12", 10) == 0)
{
{
-return dev_storage + 622;
+return dev_storage + 750;
}
}
@@ -28636,7 +30157,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdr12", 10) == 0)
{
{
-return dev_storage + 607;
+return dev_storage + 735;
}
}
@@ -28651,7 +30172,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdq12", 10) == 0)
{
{
-return dev_storage + 592;
+return dev_storage + 720;
}
}
@@ -28666,7 +30187,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdp12", 10) == 0)
{
{
-return dev_storage + 577;
+return dev_storage + 705;
}
}
@@ -28681,7 +30202,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdo12", 10) == 0)
{
{
-return dev_storage + 562;
+return dev_storage + 690;
}
}
@@ -28699,7 +30220,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdn12", 10) == 0)
{
{
-return dev_storage + 547;
+return dev_storage + 675;
}
}
@@ -28738,7 +30259,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdm12", 10) == 0)
{
{
-return dev_storage + 532;
+return dev_storage + 660;
}
}
@@ -28774,7 +30295,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdl12", 10) == 0)
{
{
-return dev_storage + 517;
+return dev_storage + 645;
}
}
@@ -28789,7 +30310,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdk12", 10) == 0)
{
{
-return dev_storage + 502;
+return dev_storage + 630;
}
}
@@ -28804,7 +30325,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdj12", 10) == 0)
{
{
-return dev_storage + 487;
+return dev_storage + 615;
}
}
@@ -28819,7 +30340,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdi12", 10) == 0)
{
{
-return dev_storage + 472;
+return dev_storage + 600;
}
}
@@ -28834,7 +30355,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdh12", 10) == 0)
{
{
-return dev_storage + 457;
+return dev_storage + 585;
}
}
@@ -28849,7 +30370,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdg12", 10) == 0)
{
{
-return dev_storage + 442;
+return dev_storage + 570;
}
}
@@ -28864,7 +30385,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdf12", 10) == 0)
{
{
-return dev_storage + 427;
+return dev_storage + 555;
}
}
@@ -28879,7 +30400,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sde12", 10) == 0)
{
{
-return dev_storage + 412;
+return dev_storage + 540;
}
}
@@ -28897,7 +30418,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sddx2", 10) == 0)
{
{
-return dev_storage + 2349;
+return dev_storage + 2477;
}
}
@@ -28912,7 +30433,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sddw2", 10) == 0)
{
{
-return dev_storage + 2334;
+return dev_storage + 2462;
}
}
@@ -28927,7 +30448,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sddv2", 10) == 0)
{
{
-return dev_storage + 2319;
+return dev_storage + 2447;
}
}
@@ -28942,7 +30463,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sddu2", 10) == 0)
{
{
-return dev_storage + 2304;
+return dev_storage + 2432;
}
}
@@ -28957,7 +30478,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sddt2", 10) == 0)
{
{
-return dev_storage + 2289;
+return dev_storage + 2417;
}
}
@@ -28972,7 +30493,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdds2", 10) == 0)
{
{
-return dev_storage + 2274;
+return dev_storage + 2402;
}
}
@@ -28987,7 +30508,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sddr2", 10) == 0)
{
{
-return dev_storage + 2259;
+return dev_storage + 2387;
}
}
@@ -29002,7 +30523,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sddq2", 10) == 0)
{
{
-return dev_storage + 2244;
+return dev_storage + 2372;
}
}
@@ -29017,7 +30538,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sddp2", 10) == 0)
{
{
-return dev_storage + 2229;
+return dev_storage + 2357;
}
}
@@ -29032,7 +30553,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sddo2", 10) == 0)
{
{
-return dev_storage + 2214;
+return dev_storage + 2342;
}
}
@@ -29047,7 +30568,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sddn2", 10) == 0)
{
{
-return dev_storage + 2199;
+return dev_storage + 2327;
}
}
@@ -29062,7 +30583,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sddm2", 10) == 0)
{
{
-return dev_storage + 2184;
+return dev_storage + 2312;
}
}
@@ -29077,7 +30598,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sddl2", 10) == 0)
{
{
-return dev_storage + 2169;
+return dev_storage + 2297;
}
}
@@ -29092,7 +30613,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sddk2", 10) == 0)
{
{
-return dev_storage + 2154;
+return dev_storage + 2282;
}
}
@@ -29107,7 +30628,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sddj2", 10) == 0)
{
{
-return dev_storage + 2139;
+return dev_storage + 2267;
}
}
@@ -29122,7 +30643,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sddi2", 10) == 0)
{
{
-return dev_storage + 2124;
+return dev_storage + 2252;
}
}
@@ -29137,7 +30658,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sddh2", 10) == 0)
{
{
-return dev_storage + 2109;
+return dev_storage + 2237;
}
}
@@ -29152,7 +30673,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sddg2", 10) == 0)
{
{
-return dev_storage + 2094;
+return dev_storage + 2222;
}
}
@@ -29167,7 +30688,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sddf2", 10) == 0)
{
{
-return dev_storage + 2079;
+return dev_storage + 2207;
}
}
@@ -29182,7 +30703,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdde2", 10) == 0)
{
{
-return dev_storage + 2064;
+return dev_storage + 2192;
}
}
@@ -29197,7 +30718,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sddd2", 10) == 0)
{
{
-return dev_storage + 2049;
+return dev_storage + 2177;
}
}
@@ -29212,7 +30733,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sddc2", 10) == 0)
{
{
-return dev_storage + 2034;
+return dev_storage + 2162;
}
}
@@ -29227,7 +30748,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sddb2", 10) == 0)
{
{
-return dev_storage + 2019;
+return dev_storage + 2147;
}
}
@@ -29242,7 +30763,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdda2", 10) == 0)
{
{
-return dev_storage + 2004;
+return dev_storage + 2132;
}
}
@@ -29260,7 +30781,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdd12", 10) == 0)
{
{
-return dev_storage + 397;
+return dev_storage + 525;
}
}
@@ -29275,7 +30796,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/scd12", 10) == 0)
{
{
-return dev_storage + 311;
+return dev_storage + 439;
}
}
@@ -29305,7 +30826,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdcz2", 10) == 0)
{
{
-return dev_storage + 1965;
+return dev_storage + 2093;
}
}
@@ -29320,7 +30841,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdcy2", 10) == 0)
{
{
-return dev_storage + 1950;
+return dev_storage + 2078;
}
}
@@ -29335,7 +30856,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdcx2", 10) == 0)
{
{
-return dev_storage + 1935;
+return dev_storage + 2063;
}
}
@@ -29350,7 +30871,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdcw2", 10) == 0)
{
{
-return dev_storage + 1920;
+return dev_storage + 2048;
}
}
@@ -29365,7 +30886,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdcv2", 10) == 0)
{
{
-return dev_storage + 1905;
+return dev_storage + 2033;
}
}
@@ -29380,7 +30901,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdcu2", 10) == 0)
{
{
-return dev_storage + 1890;
+return dev_storage + 2018;
}
}
@@ -29395,7 +30916,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdct2", 10) == 0)
{
{
-return dev_storage + 1875;
+return dev_storage + 2003;
}
}
@@ -29410,7 +30931,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdcs2", 10) == 0)
{
{
-return dev_storage + 1860;
+return dev_storage + 1988;
}
}
@@ -29425,7 +30946,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdcr2", 10) == 0)
{
{
-return dev_storage + 1845;
+return dev_storage + 1973;
}
}
@@ -29440,7 +30961,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdcq2", 10) == 0)
{
{
-return dev_storage + 1830;
+return dev_storage + 1958;
}
}
@@ -29455,7 +30976,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdcp2", 10) == 0)
{
{
-return dev_storage + 1815;
+return dev_storage + 1943;
}
}
@@ -29470,7 +30991,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdco2", 10) == 0)
{
{
-return dev_storage + 1800;
+return dev_storage + 1928;
}
}
@@ -29485,7 +31006,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdcn2", 10) == 0)
{
{
-return dev_storage + 1785;
+return dev_storage + 1913;
}
}
@@ -29500,7 +31021,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdcm2", 10) == 0)
{
{
-return dev_storage + 1770;
+return dev_storage + 1898;
}
}
@@ -29515,7 +31036,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdcl2", 10) == 0)
{
{
-return dev_storage + 1755;
+return dev_storage + 1883;
}
}
@@ -29530,7 +31051,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdck2", 10) == 0)
{
{
-return dev_storage + 1740;
+return dev_storage + 1868;
}
}
@@ -29545,7 +31066,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdcj2", 10) == 0)
{
{
-return dev_storage + 1725;
+return dev_storage + 1853;
}
}
@@ -29560,7 +31081,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdci2", 10) == 0)
{
{
-return dev_storage + 1710;
+return dev_storage + 1838;
}
}
@@ -29575,7 +31096,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdch2", 10) == 0)
{
{
-return dev_storage + 1695;
+return dev_storage + 1823;
}
}
@@ -29590,7 +31111,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdcg2", 10) == 0)
{
{
-return dev_storage + 1680;
+return dev_storage + 1808;
}
}
@@ -29605,7 +31126,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdcf2", 10) == 0)
{
{
-return dev_storage + 1665;
+return dev_storage + 1793;
}
}
@@ -29620,7 +31141,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdce2", 10) == 0)
{
{
-return dev_storage + 1650;
+return dev_storage + 1778;
}
}
@@ -29635,7 +31156,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdcd2", 10) == 0)
{
{
-return dev_storage + 1635;
+return dev_storage + 1763;
}
}
@@ -29650,7 +31171,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdcc2", 10) == 0)
{
{
-return dev_storage + 1620;
+return dev_storage + 1748;
}
}
@@ -29665,7 +31186,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdcb2", 10) == 0)
{
{
-return dev_storage + 1605;
+return dev_storage + 1733;
}
}
@@ -29680,7 +31201,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdca2", 10) == 0)
{
{
-return dev_storage + 1590;
+return dev_storage + 1718;
}
}
@@ -29695,7 +31216,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdc12", 10) == 0)
{
{
-return dev_storage + 382;
+return dev_storage + 510;
}
}
@@ -29719,7 +31240,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdbz2", 10) == 0)
{
{
-return dev_storage + 1549;
+return dev_storage + 1677;
}
}
@@ -29734,7 +31255,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdby2", 10) == 0)
{
{
-return dev_storage + 1534;
+return dev_storage + 1662;
}
}
@@ -29749,7 +31270,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdbx2", 10) == 0)
{
{
-return dev_storage + 1519;
+return dev_storage + 1647;
}
}
@@ -29764,7 +31285,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdbw2", 10) == 0)
{
{
-return dev_storage + 1504;
+return dev_storage + 1632;
}
}
@@ -29779,7 +31300,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdbv2", 10) == 0)
{
{
-return dev_storage + 1489;
+return dev_storage + 1617;
}
}
@@ -29794,7 +31315,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdbu2", 10) == 0)
{
{
-return dev_storage + 1474;
+return dev_storage + 1602;
}
}
@@ -29809,7 +31330,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdbt2", 10) == 0)
{
{
-return dev_storage + 1459;
+return dev_storage + 1587;
}
}
@@ -29824,7 +31345,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdbs2", 10) == 0)
{
{
-return dev_storage + 1444;
+return dev_storage + 1572;
}
}
@@ -29839,7 +31360,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdbr2", 10) == 0)
{
{
-return dev_storage + 1429;
+return dev_storage + 1557;
}
}
@@ -29854,7 +31375,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdbq2", 10) == 0)
{
{
-return dev_storage + 1414;
+return dev_storage + 1542;
}
}
@@ -29869,7 +31390,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdbp2", 10) == 0)
{
{
-return dev_storage + 1399;
+return dev_storage + 1527;
}
}
@@ -29884,7 +31405,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdbo2", 10) == 0)
{
{
-return dev_storage + 1384;
+return dev_storage + 1512;
}
}
@@ -29899,7 +31420,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdbn2", 10) == 0)
{
{
-return dev_storage + 1369;
+return dev_storage + 1497;
}
}
@@ -29914,7 +31435,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdbm2", 10) == 0)
{
{
-return dev_storage + 1354;
+return dev_storage + 1482;
}
}
@@ -29929,7 +31450,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdbl2", 10) == 0)
{
{
-return dev_storage + 1339;
+return dev_storage + 1467;
}
}
@@ -29944,7 +31465,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdbk2", 10) == 0)
{
{
-return dev_storage + 1324;
+return dev_storage + 1452;
}
}
@@ -29959,7 +31480,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdbj2", 10) == 0)
{
{
-return dev_storage + 1309;
+return dev_storage + 1437;
}
}
@@ -29974,7 +31495,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdbi2", 10) == 0)
{
{
-return dev_storage + 1294;
+return dev_storage + 1422;
}
}
@@ -29989,7 +31510,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdbh2", 10) == 0)
{
{
-return dev_storage + 1279;
+return dev_storage + 1407;
}
}
@@ -30004,7 +31525,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdbg2", 10) == 0)
{
{
-return dev_storage + 1264;
+return dev_storage + 1392;
}
}
@@ -30019,7 +31540,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdbf2", 10) == 0)
{
{
-return dev_storage + 1249;
+return dev_storage + 1377;
}
}
@@ -30034,7 +31555,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdbe2", 10) == 0)
{
{
-return dev_storage + 1234;
+return dev_storage + 1362;
}
}
@@ -30049,7 +31570,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdbd2", 10) == 0)
{
{
-return dev_storage + 1219;
+return dev_storage + 1347;
}
}
@@ -30064,7 +31585,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdbc2", 10) == 0)
{
{
-return dev_storage + 1204;
+return dev_storage + 1332;
}
}
@@ -30079,7 +31600,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdbb2", 10) == 0)
{
{
-return dev_storage + 1189;
+return dev_storage + 1317;
}
}
@@ -30094,7 +31615,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdba2", 10) == 0)
{
{
-return dev_storage + 1174;
+return dev_storage + 1302;
}
}
@@ -30109,7 +31630,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdb12", 10) == 0)
{
{
-return dev_storage + 367;
+return dev_storage + 495;
}
}
@@ -30133,7 +31654,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdaz2", 10) == 0)
{
{
-return dev_storage + 1133;
+return dev_storage + 1261;
}
}
@@ -30148,7 +31669,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sday2", 10) == 0)
{
{
-return dev_storage + 1118;
+return dev_storage + 1246;
}
}
@@ -30163,7 +31684,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdax2", 10) == 0)
{
{
-return dev_storage + 1103;
+return dev_storage + 1231;
}
}
@@ -30178,7 +31699,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdaw2", 10) == 0)
{
{
-return dev_storage + 1088;
+return dev_storage + 1216;
}
}
@@ -30193,7 +31714,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdav2", 10) == 0)
{
{
-return dev_storage + 1073;
+return dev_storage + 1201;
}
}
@@ -30208,7 +31729,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdau2", 10) == 0)
{
{
-return dev_storage + 1058;
+return dev_storage + 1186;
}
}
@@ -30223,7 +31744,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdat2", 10) == 0)
{
{
-return dev_storage + 1043;
+return dev_storage + 1171;
}
}
@@ -30238,7 +31759,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdas2", 10) == 0)
{
{
-return dev_storage + 1028;
+return dev_storage + 1156;
}
}
@@ -30253,7 +31774,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdar2", 10) == 0)
{
{
-return dev_storage + 1013;
+return dev_storage + 1141;
}
}
@@ -30268,7 +31789,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdaq2", 10) == 0)
{
{
-return dev_storage + 998;
+return dev_storage + 1126;
}
}
@@ -30283,7 +31804,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdap2", 10) == 0)
{
{
-return dev_storage + 983;
+return dev_storage + 1111;
}
}
@@ -30298,7 +31819,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdao2", 10) == 0)
{
{
-return dev_storage + 968;
+return dev_storage + 1096;
}
}
@@ -30313,7 +31834,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdan2", 10) == 0)
{
{
-return dev_storage + 953;
+return dev_storage + 1081;
}
}
@@ -30328,7 +31849,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdam2", 10) == 0)
{
{
-return dev_storage + 938;
+return dev_storage + 1066;
}
}
@@ -30343,7 +31864,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdal2", 10) == 0)
{
{
-return dev_storage + 923;
+return dev_storage + 1051;
}
}
@@ -30358,7 +31879,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdak2", 10) == 0)
{
{
-return dev_storage + 908;
+return dev_storage + 1036;
}
}
@@ -30373,7 +31894,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdaj2", 10) == 0)
{
{
-return dev_storage + 893;
+return dev_storage + 1021;
}
}
@@ -30388,7 +31909,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdai2", 10) == 0)
{
{
-return dev_storage + 878;
+return dev_storage + 1006;
}
}
@@ -30403,7 +31924,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdah2", 10) == 0)
{
{
-return dev_storage + 863;
+return dev_storage + 991;
}
}
@@ -30418,7 +31939,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdag2", 10) == 0)
{
{
-return dev_storage + 848;
+return dev_storage + 976;
}
}
@@ -30433,7 +31954,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdaf2", 10) == 0)
{
{
-return dev_storage + 833;
+return dev_storage + 961;
}
}
@@ -30448,7 +31969,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdae2", 10) == 0)
{
{
-return dev_storage + 818;
+return dev_storage + 946;
}
}
@@ -30463,7 +31984,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdad2", 10) == 0)
{
{
-return dev_storage + 803;
+return dev_storage + 931;
}
}
@@ -30478,7 +31999,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdac2", 10) == 0)
{
{
-return dev_storage + 788;
+return dev_storage + 916;
}
}
@@ -30493,7 +32014,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdab2", 10) == 0)
{
{
-return dev_storage + 773;
+return dev_storage + 901;
}
}
@@ -30508,7 +32029,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdaa2", 10) == 0)
{
{
-return dev_storage + 758;
+return dev_storage + 886;
}
}
@@ -30523,7 +32044,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sda12", 10) == 0)
{
{
-return dev_storage + 352;
+return dev_storage + 480;
}
}
@@ -30547,7 +32068,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/st122", 10) == 0)
{
{
-return dev_storage + 2501;
+return dev_storage + 2629;
}
}
@@ -30562,7 +32083,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/st112", 10) == 0)
{
{
-return dev_storage + 2491;
+return dev_storage + 2619;
}
}
@@ -30577,7 +32098,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/st102", 10) == 0)
{
{
-return dev_storage + 2481;
+return dev_storage + 2609;
}
}
@@ -30607,7 +32128,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdz11", 10) == 0)
{
{
-return dev_storage + 726;
+return dev_storage + 854;
}
}
@@ -30625,7 +32146,52 @@ return NULL;
if (strncmp (KR_keyword, "/dev/ttyS1", 10) == 0)
{
{
-return dev_storage + 2509;
+return dev_storage + 2637;
+
+}
+ }
+ else
+ {
+{
+return NULL;
+
+}
+ }
+ case '9':
+ if (strncmp (KR_keyword, "/dev/pty91", 10) == 0)
+ {
+{
+return dev_storage + 389;
+
+}
+ }
+ else
+ {
+{
+return NULL;
+
+}
+ }
+ case '8':
+ if (strncmp (KR_keyword, "/dev/pty81", 10) == 0)
+ {
+{
+return dev_storage + 379;
+
+}
+ }
+ else
+ {
+{
+return NULL;
+
+}
+ }
+ case '7':
+ if (strncmp (KR_keyword, "/dev/pty71", 10) == 0)
+ {
+{
+return dev_storage + 369;
}
}
@@ -30640,7 +32206,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/pty61", 10) == 0)
{
{
-return dev_storage + 295;
+return dev_storage + 359;
}
}
@@ -30655,7 +32221,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/pty51", 10) == 0)
{
{
-return dev_storage + 285;
+return dev_storage + 349;
}
}
@@ -30670,7 +32236,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/pty41", 10) == 0)
{
{
-return dev_storage + 275;
+return dev_storage + 339;
}
}
@@ -30685,7 +32251,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/pty31", 10) == 0)
{
{
-return dev_storage + 265;
+return dev_storage + 329;
}
}
@@ -30700,7 +32266,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/pty21", 10) == 0)
{
{
-return dev_storage + 255;
+return dev_storage + 319;
}
}
@@ -30718,7 +32284,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdy11", 10) == 0)
{
{
-return dev_storage + 711;
+return dev_storage + 839;
}
}
@@ -30733,7 +32299,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/pty11", 10) == 0)
{
{
-return dev_storage + 245;
+return dev_storage + 309;
}
}
@@ -30760,7 +32326,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdx11", 10) == 0)
{
{
-return dev_storage + 696;
+return dev_storage + 824;
}
}
@@ -30775,7 +32341,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdw11", 10) == 0)
{
{
-return dev_storage + 681;
+return dev_storage + 809;
}
}
@@ -30790,7 +32356,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdv11", 10) == 0)
{
{
-return dev_storage + 666;
+return dev_storage + 794;
}
}
@@ -30805,7 +32371,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdu11", 10) == 0)
{
{
-return dev_storage + 651;
+return dev_storage + 779;
}
}
@@ -30823,7 +32389,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/nst91", 10) == 0)
{
{
-return dev_storage + 195;
+return dev_storage + 259;
}
}
@@ -30838,7 +32404,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/nst81", 10) == 0)
{
{
-return dev_storage + 185;
+return dev_storage + 249;
}
}
@@ -30853,7 +32419,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/nst71", 10) == 0)
{
{
-return dev_storage + 175;
+return dev_storage + 239;
}
}
@@ -30868,7 +32434,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/nst61", 10) == 0)
{
{
-return dev_storage + 165;
+return dev_storage + 229;
}
}
@@ -30883,7 +32449,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/nst51", 10) == 0)
{
{
-return dev_storage + 155;
+return dev_storage + 219;
}
}
@@ -30898,7 +32464,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/nst41", 10) == 0)
{
{
-return dev_storage + 145;
+return dev_storage + 209;
}
}
@@ -30913,7 +32479,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/nst31", 10) == 0)
{
{
-return dev_storage + 135;
+return dev_storage + 199;
}
}
@@ -30928,7 +32494,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/nst21", 10) == 0)
{
{
-return dev_storage + 125;
+return dev_storage + 189;
}
}
@@ -30946,7 +32512,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdt11", 10) == 0)
{
{
-return dev_storage + 636;
+return dev_storage + 764;
}
}
@@ -30961,7 +32527,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/nst11", 10) == 0)
{
{
-return dev_storage + 115;
+return dev_storage + 179;
}
}
@@ -30988,7 +32554,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sds11", 10) == 0)
{
{
-return dev_storage + 621;
+return dev_storage + 749;
}
}
@@ -31003,7 +32569,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdr11", 10) == 0)
{
{
-return dev_storage + 606;
+return dev_storage + 734;
}
}
@@ -31018,7 +32584,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdq11", 10) == 0)
{
{
-return dev_storage + 591;
+return dev_storage + 719;
}
}
@@ -31033,7 +32599,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdp11", 10) == 0)
{
{
-return dev_storage + 576;
+return dev_storage + 704;
}
}
@@ -31048,7 +32614,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdo11", 10) == 0)
{
{
-return dev_storage + 561;
+return dev_storage + 689;
}
}
@@ -31066,7 +32632,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdn11", 10) == 0)
{
{
-return dev_storage + 546;
+return dev_storage + 674;
}
}
@@ -31105,7 +32671,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdm11", 10) == 0)
{
{
-return dev_storage + 531;
+return dev_storage + 659;
}
}
@@ -31141,7 +32707,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdl11", 10) == 0)
{
{
-return dev_storage + 516;
+return dev_storage + 644;
}
}
@@ -31156,7 +32722,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdk11", 10) == 0)
{
{
-return dev_storage + 501;
+return dev_storage + 629;
}
}
@@ -31171,7 +32737,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdj11", 10) == 0)
{
{
-return dev_storage + 486;
+return dev_storage + 614;
}
}
@@ -31186,7 +32752,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdi11", 10) == 0)
{
{
-return dev_storage + 471;
+return dev_storage + 599;
}
}
@@ -31201,7 +32767,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdh11", 10) == 0)
{
{
-return dev_storage + 456;
+return dev_storage + 584;
}
}
@@ -31216,7 +32782,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdg11", 10) == 0)
{
{
-return dev_storage + 441;
+return dev_storage + 569;
}
}
@@ -31231,7 +32797,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdf11", 10) == 0)
{
{
-return dev_storage + 426;
+return dev_storage + 554;
}
}
@@ -31246,7 +32812,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sde11", 10) == 0)
{
{
-return dev_storage + 411;
+return dev_storage + 539;
}
}
@@ -31264,7 +32830,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sddx1", 10) == 0)
{
{
-return dev_storage + 2348;
+return dev_storage + 2476;
}
}
@@ -31279,7 +32845,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sddw1", 10) == 0)
{
{
-return dev_storage + 2333;
+return dev_storage + 2461;
}
}
@@ -31294,7 +32860,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sddv1", 10) == 0)
{
{
-return dev_storage + 2318;
+return dev_storage + 2446;
}
}
@@ -31309,7 +32875,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sddu1", 10) == 0)
{
{
-return dev_storage + 2303;
+return dev_storage + 2431;
}
}
@@ -31324,7 +32890,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sddt1", 10) == 0)
{
{
-return dev_storage + 2288;
+return dev_storage + 2416;
}
}
@@ -31339,7 +32905,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdds1", 10) == 0)
{
{
-return dev_storage + 2273;
+return dev_storage + 2401;
}
}
@@ -31354,7 +32920,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sddr1", 10) == 0)
{
{
-return dev_storage + 2258;
+return dev_storage + 2386;
}
}
@@ -31369,7 +32935,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sddq1", 10) == 0)
{
{
-return dev_storage + 2243;
+return dev_storage + 2371;
}
}
@@ -31384,7 +32950,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sddp1", 10) == 0)
{
{
-return dev_storage + 2228;
+return dev_storage + 2356;
}
}
@@ -31399,7 +32965,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sddo1", 10) == 0)
{
{
-return dev_storage + 2213;
+return dev_storage + 2341;
}
}
@@ -31414,7 +32980,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sddn1", 10) == 0)
{
{
-return dev_storage + 2198;
+return dev_storage + 2326;
}
}
@@ -31429,7 +32995,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sddm1", 10) == 0)
{
{
-return dev_storage + 2183;
+return dev_storage + 2311;
}
}
@@ -31444,7 +33010,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sddl1", 10) == 0)
{
{
-return dev_storage + 2168;
+return dev_storage + 2296;
}
}
@@ -31459,7 +33025,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sddk1", 10) == 0)
{
{
-return dev_storage + 2153;
+return dev_storage + 2281;
}
}
@@ -31474,7 +33040,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sddj1", 10) == 0)
{
{
-return dev_storage + 2138;
+return dev_storage + 2266;
}
}
@@ -31489,7 +33055,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sddi1", 10) == 0)
{
{
-return dev_storage + 2123;
+return dev_storage + 2251;
}
}
@@ -31504,7 +33070,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sddh1", 10) == 0)
{
{
-return dev_storage + 2108;
+return dev_storage + 2236;
}
}
@@ -31519,7 +33085,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sddg1", 10) == 0)
{
{
-return dev_storage + 2093;
+return dev_storage + 2221;
}
}
@@ -31534,7 +33100,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sddf1", 10) == 0)
{
{
-return dev_storage + 2078;
+return dev_storage + 2206;
}
}
@@ -31549,7 +33115,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdde1", 10) == 0)
{
{
-return dev_storage + 2063;
+return dev_storage + 2191;
}
}
@@ -31564,7 +33130,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sddd1", 10) == 0)
{
{
-return dev_storage + 2048;
+return dev_storage + 2176;
}
}
@@ -31579,7 +33145,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sddc1", 10) == 0)
{
{
-return dev_storage + 2033;
+return dev_storage + 2161;
}
}
@@ -31594,7 +33160,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sddb1", 10) == 0)
{
{
-return dev_storage + 2018;
+return dev_storage + 2146;
}
}
@@ -31609,7 +33175,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdda1", 10) == 0)
{
{
-return dev_storage + 2003;
+return dev_storage + 2131;
}
}
@@ -31627,7 +33193,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdd11", 10) == 0)
{
{
-return dev_storage + 396;
+return dev_storage + 524;
}
}
@@ -31642,7 +33208,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/scd11", 10) == 0)
{
{
-return dev_storage + 310;
+return dev_storage + 438;
}
}
@@ -31672,7 +33238,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdcz1", 10) == 0)
{
{
-return dev_storage + 1964;
+return dev_storage + 2092;
}
}
@@ -31687,7 +33253,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdcy1", 10) == 0)
{
{
-return dev_storage + 1949;
+return dev_storage + 2077;
}
}
@@ -31702,7 +33268,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdcx1", 10) == 0)
{
{
-return dev_storage + 1934;
+return dev_storage + 2062;
}
}
@@ -31717,7 +33283,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdcw1", 10) == 0)
{
{
-return dev_storage + 1919;
+return dev_storage + 2047;
}
}
@@ -31732,7 +33298,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdcv1", 10) == 0)
{
{
-return dev_storage + 1904;
+return dev_storage + 2032;
}
}
@@ -31747,7 +33313,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdcu1", 10) == 0)
{
{
-return dev_storage + 1889;
+return dev_storage + 2017;
}
}
@@ -31762,7 +33328,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdct1", 10) == 0)
{
{
-return dev_storage + 1874;
+return dev_storage + 2002;
}
}
@@ -31777,7 +33343,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdcs1", 10) == 0)
{
{
-return dev_storage + 1859;
+return dev_storage + 1987;
}
}
@@ -31792,7 +33358,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdcr1", 10) == 0)
{
{
-return dev_storage + 1844;
+return dev_storage + 1972;
}
}
@@ -31807,7 +33373,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdcq1", 10) == 0)
{
{
-return dev_storage + 1829;
+return dev_storage + 1957;
}
}
@@ -31822,7 +33388,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdcp1", 10) == 0)
{
{
-return dev_storage + 1814;
+return dev_storage + 1942;
}
}
@@ -31837,7 +33403,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdco1", 10) == 0)
{
{
-return dev_storage + 1799;
+return dev_storage + 1927;
}
}
@@ -31852,7 +33418,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdcn1", 10) == 0)
{
{
-return dev_storage + 1784;
+return dev_storage + 1912;
}
}
@@ -31867,7 +33433,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdcm1", 10) == 0)
{
{
-return dev_storage + 1769;
+return dev_storage + 1897;
}
}
@@ -31882,7 +33448,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdcl1", 10) == 0)
{
{
-return dev_storage + 1754;
+return dev_storage + 1882;
}
}
@@ -31897,7 +33463,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdck1", 10) == 0)
{
{
-return dev_storage + 1739;
+return dev_storage + 1867;
}
}
@@ -31912,7 +33478,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdcj1", 10) == 0)
{
{
-return dev_storage + 1724;
+return dev_storage + 1852;
}
}
@@ -31927,7 +33493,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdci1", 10) == 0)
{
{
-return dev_storage + 1709;
+return dev_storage + 1837;
}
}
@@ -31942,7 +33508,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdch1", 10) == 0)
{
{
-return dev_storage + 1694;
+return dev_storage + 1822;
}
}
@@ -31957,7 +33523,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdcg1", 10) == 0)
{
{
-return dev_storage + 1679;
+return dev_storage + 1807;
}
}
@@ -31972,7 +33538,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdcf1", 10) == 0)
{
{
-return dev_storage + 1664;
+return dev_storage + 1792;
}
}
@@ -31987,7 +33553,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdce1", 10) == 0)
{
{
-return dev_storage + 1649;
+return dev_storage + 1777;
}
}
@@ -32002,7 +33568,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdcd1", 10) == 0)
{
{
-return dev_storage + 1634;
+return dev_storage + 1762;
}
}
@@ -32017,7 +33583,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdcc1", 10) == 0)
{
{
-return dev_storage + 1619;
+return dev_storage + 1747;
}
}
@@ -32032,7 +33598,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdcb1", 10) == 0)
{
{
-return dev_storage + 1604;
+return dev_storage + 1732;
}
}
@@ -32047,7 +33613,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdca1", 10) == 0)
{
{
-return dev_storage + 1589;
+return dev_storage + 1717;
}
}
@@ -32062,7 +33628,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdc11", 10) == 0)
{
{
-return dev_storage + 381;
+return dev_storage + 509;
}
}
@@ -32086,7 +33652,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdbz1", 10) == 0)
{
{
-return dev_storage + 1548;
+return dev_storage + 1676;
}
}
@@ -32101,7 +33667,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdby1", 10) == 0)
{
{
-return dev_storage + 1533;
+return dev_storage + 1661;
}
}
@@ -32116,7 +33682,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdbx1", 10) == 0)
{
{
-return dev_storage + 1518;
+return dev_storage + 1646;
}
}
@@ -32131,7 +33697,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdbw1", 10) == 0)
{
{
-return dev_storage + 1503;
+return dev_storage + 1631;
}
}
@@ -32146,7 +33712,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdbv1", 10) == 0)
{
{
-return dev_storage + 1488;
+return dev_storage + 1616;
}
}
@@ -32161,7 +33727,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdbu1", 10) == 0)
{
{
-return dev_storage + 1473;
+return dev_storage + 1601;
}
}
@@ -32176,7 +33742,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdbt1", 10) == 0)
{
{
-return dev_storage + 1458;
+return dev_storage + 1586;
}
}
@@ -32191,7 +33757,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdbs1", 10) == 0)
{
{
-return dev_storage + 1443;
+return dev_storage + 1571;
}
}
@@ -32206,7 +33772,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdbr1", 10) == 0)
{
{
-return dev_storage + 1428;
+return dev_storage + 1556;
}
}
@@ -32221,7 +33787,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdbq1", 10) == 0)
{
{
-return dev_storage + 1413;
+return dev_storage + 1541;
}
}
@@ -32236,7 +33802,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdbp1", 10) == 0)
{
{
-return dev_storage + 1398;
+return dev_storage + 1526;
}
}
@@ -32251,7 +33817,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdbo1", 10) == 0)
{
{
-return dev_storage + 1383;
+return dev_storage + 1511;
}
}
@@ -32266,7 +33832,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdbn1", 10) == 0)
{
{
-return dev_storage + 1368;
+return dev_storage + 1496;
}
}
@@ -32281,7 +33847,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdbm1", 10) == 0)
{
{
-return dev_storage + 1353;
+return dev_storage + 1481;
}
}
@@ -32296,7 +33862,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdbl1", 10) == 0)
{
{
-return dev_storage + 1338;
+return dev_storage + 1466;
}
}
@@ -32311,7 +33877,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdbk1", 10) == 0)
{
{
-return dev_storage + 1323;
+return dev_storage + 1451;
}
}
@@ -32326,7 +33892,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdbj1", 10) == 0)
{
{
-return dev_storage + 1308;
+return dev_storage + 1436;
}
}
@@ -32341,7 +33907,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdbi1", 10) == 0)
{
{
-return dev_storage + 1293;
+return dev_storage + 1421;
}
}
@@ -32356,7 +33922,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdbh1", 10) == 0)
{
{
-return dev_storage + 1278;
+return dev_storage + 1406;
}
}
@@ -32371,7 +33937,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdbg1", 10) == 0)
{
{
-return dev_storage + 1263;
+return dev_storage + 1391;
}
}
@@ -32386,7 +33952,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdbf1", 10) == 0)
{
{
-return dev_storage + 1248;
+return dev_storage + 1376;
}
}
@@ -32401,7 +33967,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdbe1", 10) == 0)
{
{
-return dev_storage + 1233;
+return dev_storage + 1361;
}
}
@@ -32416,7 +33982,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdbd1", 10) == 0)
{
{
-return dev_storage + 1218;
+return dev_storage + 1346;
}
}
@@ -32431,7 +33997,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdbc1", 10) == 0)
{
{
-return dev_storage + 1203;
+return dev_storage + 1331;
}
}
@@ -32446,7 +34012,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdbb1", 10) == 0)
{
{
-return dev_storage + 1188;
+return dev_storage + 1316;
}
}
@@ -32461,7 +34027,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdba1", 10) == 0)
{
{
-return dev_storage + 1173;
+return dev_storage + 1301;
}
}
@@ -32476,7 +34042,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdb11", 10) == 0)
{
{
-return dev_storage + 366;
+return dev_storage + 494;
}
}
@@ -32500,7 +34066,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdaz1", 10) == 0)
{
{
-return dev_storage + 1132;
+return dev_storage + 1260;
}
}
@@ -32515,7 +34081,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sday1", 10) == 0)
{
{
-return dev_storage + 1117;
+return dev_storage + 1245;
}
}
@@ -32530,7 +34096,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdax1", 10) == 0)
{
{
-return dev_storage + 1102;
+return dev_storage + 1230;
}
}
@@ -32545,7 +34111,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdaw1", 10) == 0)
{
{
-return dev_storage + 1087;
+return dev_storage + 1215;
}
}
@@ -32560,7 +34126,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdav1", 10) == 0)
{
{
-return dev_storage + 1072;
+return dev_storage + 1200;
}
}
@@ -32575,7 +34141,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdau1", 10) == 0)
{
{
-return dev_storage + 1057;
+return dev_storage + 1185;
}
}
@@ -32590,7 +34156,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdat1", 10) == 0)
{
{
-return dev_storage + 1042;
+return dev_storage + 1170;
}
}
@@ -32605,7 +34171,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdas1", 10) == 0)
{
{
-return dev_storage + 1027;
+return dev_storage + 1155;
}
}
@@ -32620,7 +34186,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdar1", 10) == 0)
{
{
-return dev_storage + 1012;
+return dev_storage + 1140;
}
}
@@ -32635,7 +34201,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdaq1", 10) == 0)
{
{
-return dev_storage + 997;
+return dev_storage + 1125;
}
}
@@ -32650,7 +34216,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdap1", 10) == 0)
{
{
-return dev_storage + 982;
+return dev_storage + 1110;
}
}
@@ -32665,7 +34231,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdao1", 10) == 0)
{
{
-return dev_storage + 967;
+return dev_storage + 1095;
}
}
@@ -32680,7 +34246,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdan1", 10) == 0)
{
{
-return dev_storage + 952;
+return dev_storage + 1080;
}
}
@@ -32695,7 +34261,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdam1", 10) == 0)
{
{
-return dev_storage + 937;
+return dev_storage + 1065;
}
}
@@ -32710,7 +34276,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdal1", 10) == 0)
{
{
-return dev_storage + 922;
+return dev_storage + 1050;
}
}
@@ -32725,7 +34291,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdak1", 10) == 0)
{
{
-return dev_storage + 907;
+return dev_storage + 1035;
}
}
@@ -32740,7 +34306,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdaj1", 10) == 0)
{
{
-return dev_storage + 892;
+return dev_storage + 1020;
}
}
@@ -32755,7 +34321,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdai1", 10) == 0)
{
{
-return dev_storage + 877;
+return dev_storage + 1005;
}
}
@@ -32770,7 +34336,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdah1", 10) == 0)
{
{
-return dev_storage + 862;
+return dev_storage + 990;
}
}
@@ -32785,7 +34351,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdag1", 10) == 0)
{
{
-return dev_storage + 847;
+return dev_storage + 975;
}
}
@@ -32800,7 +34366,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdaf1", 10) == 0)
{
{
-return dev_storage + 832;
+return dev_storage + 960;
}
}
@@ -32815,7 +34381,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdae1", 10) == 0)
{
{
-return dev_storage + 817;
+return dev_storage + 945;
}
}
@@ -32830,7 +34396,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdad1", 10) == 0)
{
{
-return dev_storage + 802;
+return dev_storage + 930;
}
}
@@ -32845,7 +34411,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdac1", 10) == 0)
{
{
-return dev_storage + 787;
+return dev_storage + 915;
}
}
@@ -32860,7 +34426,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdab1", 10) == 0)
{
{
-return dev_storage + 772;
+return dev_storage + 900;
}
}
@@ -32875,7 +34441,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdaa1", 10) == 0)
{
{
-return dev_storage + 757;
+return dev_storage + 885;
}
}
@@ -32890,7 +34456,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sda11", 10) == 0)
{
{
-return dev_storage + 351;
+return dev_storage + 479;
}
}
@@ -32914,7 +34480,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/st121", 10) == 0)
{
{
-return dev_storage + 2500;
+return dev_storage + 2628;
}
}
@@ -32929,7 +34495,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/st111", 10) == 0)
{
{
-return dev_storage + 2490;
+return dev_storage + 2618;
}
}
@@ -32944,7 +34510,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/st101", 10) == 0)
{
{
-return dev_storage + 2480;
+return dev_storage + 2608;
}
}
@@ -32974,7 +34540,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdz10", 10) == 0)
{
{
-return dev_storage + 725;
+return dev_storage + 853;
}
}
@@ -32992,7 +34558,52 @@ return NULL;
if (strncmp (KR_keyword, "/dev/ttyS0", 10) == 0)
{
{
-return dev_storage + 2508;
+return dev_storage + 2636;
+
+}
+ }
+ else
+ {
+{
+return NULL;
+
+}
+ }
+ case '9':
+ if (strncmp (KR_keyword, "/dev/pty90", 10) == 0)
+ {
+{
+return dev_storage + 388;
+
+}
+ }
+ else
+ {
+{
+return NULL;
+
+}
+ }
+ case '8':
+ if (strncmp (KR_keyword, "/dev/pty80", 10) == 0)
+ {
+{
+return dev_storage + 378;
+
+}
+ }
+ else
+ {
+{
+return NULL;
+
+}
+ }
+ case '7':
+ if (strncmp (KR_keyword, "/dev/pty70", 10) == 0)
+ {
+{
+return dev_storage + 368;
}
}
@@ -33007,7 +34618,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/pty60", 10) == 0)
{
{
-return dev_storage + 294;
+return dev_storage + 358;
}
}
@@ -33022,7 +34633,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/pty50", 10) == 0)
{
{
-return dev_storage + 284;
+return dev_storage + 348;
}
}
@@ -33037,7 +34648,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/pty40", 10) == 0)
{
{
-return dev_storage + 274;
+return dev_storage + 338;
}
}
@@ -33052,7 +34663,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/pty30", 10) == 0)
{
{
-return dev_storage + 264;
+return dev_storage + 328;
}
}
@@ -33067,7 +34678,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/pty20", 10) == 0)
{
{
-return dev_storage + 254;
+return dev_storage + 318;
}
}
@@ -33085,7 +34696,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdy10", 10) == 0)
{
{
-return dev_storage + 710;
+return dev_storage + 838;
}
}
@@ -33100,7 +34711,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/pty10", 10) == 0)
{
{
-return dev_storage + 244;
+return dev_storage + 308;
}
}
@@ -33127,7 +34738,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdx10", 10) == 0)
{
{
-return dev_storage + 695;
+return dev_storage + 823;
}
}
@@ -33142,7 +34753,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdw10", 10) == 0)
{
{
-return dev_storage + 680;
+return dev_storage + 808;
}
}
@@ -33157,7 +34768,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdv10", 10) == 0)
{
{
-return dev_storage + 665;
+return dev_storage + 793;
}
}
@@ -33172,7 +34783,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdu10", 10) == 0)
{
{
-return dev_storage + 650;
+return dev_storage + 778;
}
}
@@ -33190,7 +34801,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/nst90", 10) == 0)
{
{
-return dev_storage + 194;
+return dev_storage + 258;
}
}
@@ -33205,7 +34816,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/nst80", 10) == 0)
{
{
-return dev_storage + 184;
+return dev_storage + 248;
}
}
@@ -33220,7 +34831,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/nst70", 10) == 0)
{
{
-return dev_storage + 174;
+return dev_storage + 238;
}
}
@@ -33235,7 +34846,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/nst60", 10) == 0)
{
{
-return dev_storage + 164;
+return dev_storage + 228;
}
}
@@ -33250,7 +34861,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/nst50", 10) == 0)
{
{
-return dev_storage + 154;
+return dev_storage + 218;
}
}
@@ -33265,7 +34876,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/nst40", 10) == 0)
{
{
-return dev_storage + 144;
+return dev_storage + 208;
}
}
@@ -33280,7 +34891,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/nst30", 10) == 0)
{
{
-return dev_storage + 134;
+return dev_storage + 198;
}
}
@@ -33295,7 +34906,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/nst20", 10) == 0)
{
{
-return dev_storage + 124;
+return dev_storage + 188;
}
}
@@ -33313,7 +34924,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdt10", 10) == 0)
{
{
-return dev_storage + 635;
+return dev_storage + 763;
}
}
@@ -33328,7 +34939,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/nst10", 10) == 0)
{
{
-return dev_storage + 114;
+return dev_storage + 178;
}
}
@@ -33355,7 +34966,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sds10", 10) == 0)
{
{
-return dev_storage + 620;
+return dev_storage + 748;
}
}
@@ -33370,7 +34981,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdr10", 10) == 0)
{
{
-return dev_storage + 605;
+return dev_storage + 733;
}
}
@@ -33385,7 +34996,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdq10", 10) == 0)
{
{
-return dev_storage + 590;
+return dev_storage + 718;
}
}
@@ -33400,7 +35011,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdp10", 10) == 0)
{
{
-return dev_storage + 575;
+return dev_storage + 703;
}
}
@@ -33415,7 +35026,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdo10", 10) == 0)
{
{
-return dev_storage + 560;
+return dev_storage + 688;
}
}
@@ -33433,7 +35044,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdn10", 10) == 0)
{
{
-return dev_storage + 545;
+return dev_storage + 673;
}
}
@@ -33472,7 +35083,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdm10", 10) == 0)
{
{
-return dev_storage + 530;
+return dev_storage + 658;
}
}
@@ -33508,7 +35119,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdl10", 10) == 0)
{
{
-return dev_storage + 515;
+return dev_storage + 643;
}
}
@@ -33523,7 +35134,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdk10", 10) == 0)
{
{
-return dev_storage + 500;
+return dev_storage + 628;
}
}
@@ -33538,7 +35149,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdj10", 10) == 0)
{
{
-return dev_storage + 485;
+return dev_storage + 613;
}
}
@@ -33553,7 +35164,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdi10", 10) == 0)
{
{
-return dev_storage + 470;
+return dev_storage + 598;
}
}
@@ -33568,7 +35179,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdh10", 10) == 0)
{
{
-return dev_storage + 455;
+return dev_storage + 583;
}
}
@@ -33583,7 +35194,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdg10", 10) == 0)
{
{
-return dev_storage + 440;
+return dev_storage + 568;
}
}
@@ -33598,7 +35209,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdf10", 10) == 0)
{
{
-return dev_storage + 425;
+return dev_storage + 553;
}
}
@@ -33613,7 +35224,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sde10", 10) == 0)
{
{
-return dev_storage + 410;
+return dev_storage + 538;
}
}
@@ -33631,7 +35242,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdd10", 10) == 0)
{
{
-return dev_storage + 395;
+return dev_storage + 523;
}
}
@@ -33646,7 +35257,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/scd10", 10) == 0)
{
{
-return dev_storage + 309;
+return dev_storage + 437;
}
}
@@ -33667,7 +35278,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdc10", 10) == 0)
{
{
-return dev_storage + 380;
+return dev_storage + 508;
}
}
@@ -33682,7 +35293,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdb10", 10) == 0)
{
{
-return dev_storage + 365;
+return dev_storage + 493;
}
}
@@ -33697,7 +35308,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sda10", 10) == 0)
{
{
-return dev_storage + 350;
+return dev_storage + 478;
}
}
@@ -33715,7 +35326,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/st120", 10) == 0)
{
{
-return dev_storage + 2499;
+return dev_storage + 2627;
}
}
@@ -33730,7 +35341,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/st110", 10) == 0)
{
{
-return dev_storage + 2489;
+return dev_storage + 2617;
}
}
@@ -33745,7 +35356,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/st100", 10) == 0)
{
{
-return dev_storage + 2479;
+return dev_storage + 2607;
}
}
@@ -33796,7 +35407,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/random", 11) == 0)
{
{
-return dev_storage + 298;
+return dev_storage + 426;
}
}
@@ -33810,6 +35421,66 @@ return NULL;
case '9':
switch (KR_keyword [9])
{
+ case '9':
+ if (strncmp (KR_keyword, "/dev/cons99", 11) == 0)
+ {
+{
+return dev_storage + 119;
+
+}
+ }
+ else
+ {
+{
+return NULL;
+
+}
+ }
+ case '8':
+ if (strncmp (KR_keyword, "/dev/cons89", 11) == 0)
+ {
+{
+return dev_storage + 109;
+
+}
+ }
+ else
+ {
+{
+return NULL;
+
+}
+ }
+ case '7':
+ if (strncmp (KR_keyword, "/dev/cons79", 11) == 0)
+ {
+{
+return dev_storage + 99;
+
+}
+ }
+ else
+ {
+{
+return NULL;
+
+}
+ }
+ case '6':
+ if (strncmp (KR_keyword, "/dev/cons69", 11) == 0)
+ {
+{
+return dev_storage + 89;
+
+}
+ }
+ else
+ {
+{
+return NULL;
+
+}
+ }
case '5':
switch (KR_keyword [5])
{
@@ -33817,7 +35488,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/ttyS59", 11) == 0)
{
{
-return dev_storage + 2567;
+return dev_storage + 2695;
}
}
@@ -33856,7 +35527,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/ttyS49", 11) == 0)
{
{
-return dev_storage + 2557;
+return dev_storage + 2685;
}
}
@@ -33895,7 +35566,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/ttyS39", 11) == 0)
{
{
-return dev_storage + 2547;
+return dev_storage + 2675;
}
}
@@ -33934,7 +35605,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/ttyS29", 11) == 0)
{
{
-return dev_storage + 2537;
+return dev_storage + 2665;
}
}
@@ -33973,7 +35644,22 @@ return NULL;
if (strncmp (KR_keyword, "/dev/ttyS19", 11) == 0)
{
{
-return dev_storage + 2527;
+return dev_storage + 2655;
+
+}
+ }
+ else
+ {
+{
+return NULL;
+
+}
+ }
+ case 'p':
+ if (strncmp (KR_keyword, "/dev/pty119", 11) == 0)
+ {
+{
+return dev_storage + 417;
}
}
@@ -33988,7 +35674,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/nst119", 11) == 0)
{
{
-return dev_storage + 223;
+return dev_storage + 287;
}
}
@@ -34021,15 +35707,39 @@ return NULL;
}
}
case '0':
- if (strncmp (KR_keyword, "/dev/nst109", 11) == 0)
+ switch (KR_keyword [5])
{
+ case 'p':
+ if (strncmp (KR_keyword, "/dev/pty109", 11) == 0)
+ {
{
-return dev_storage + 213;
+return dev_storage + 407;
}
- }
- else
- {
+ }
+ else
+ {
+{
+return NULL;
+
+}
+ }
+ case 'n':
+ if (strncmp (KR_keyword, "/dev/nst109", 11) == 0)
+ {
+{
+return dev_storage + 277;
+
+}
+ }
+ else
+ {
+{
+return NULL;
+
+}
+ }
+ default:
{
return NULL;
@@ -34044,6 +35754,66 @@ return NULL;
case '8':
switch (KR_keyword [9])
{
+ case '9':
+ if (strncmp (KR_keyword, "/dev/cons98", 11) == 0)
+ {
+{
+return dev_storage + 118;
+
+}
+ }
+ else
+ {
+{
+return NULL;
+
+}
+ }
+ case '8':
+ if (strncmp (KR_keyword, "/dev/cons88", 11) == 0)
+ {
+{
+return dev_storage + 108;
+
+}
+ }
+ else
+ {
+{
+return NULL;
+
+}
+ }
+ case '7':
+ if (strncmp (KR_keyword, "/dev/cons78", 11) == 0)
+ {
+{
+return dev_storage + 98;
+
+}
+ }
+ else
+ {
+{
+return NULL;
+
+}
+ }
+ case '6':
+ if (strncmp (KR_keyword, "/dev/cons68", 11) == 0)
+ {
+{
+return dev_storage + 88;
+
+}
+ }
+ else
+ {
+{
+return NULL;
+
+}
+ }
case '5':
switch (KR_keyword [5])
{
@@ -34051,7 +35821,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/ttyS58", 11) == 0)
{
{
-return dev_storage + 2566;
+return dev_storage + 2694;
}
}
@@ -34090,7 +35860,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/ttyS48", 11) == 0)
{
{
-return dev_storage + 2556;
+return dev_storage + 2684;
}
}
@@ -34129,7 +35899,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/ttyS38", 11) == 0)
{
{
-return dev_storage + 2546;
+return dev_storage + 2674;
}
}
@@ -34168,7 +35938,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/ttyS28", 11) == 0)
{
{
-return dev_storage + 2536;
+return dev_storage + 2664;
}
}
@@ -34207,7 +35977,22 @@ return NULL;
if (strncmp (KR_keyword, "/dev/ttyS18", 11) == 0)
{
{
-return dev_storage + 2526;
+return dev_storage + 2654;
+
+}
+ }
+ else
+ {
+{
+return NULL;
+
+}
+ }
+ case 'p':
+ if (strncmp (KR_keyword, "/dev/pty118", 11) == 0)
+ {
+{
+return dev_storage + 416;
}
}
@@ -34222,7 +36007,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/nst118", 11) == 0)
{
{
-return dev_storage + 222;
+return dev_storage + 286;
}
}
@@ -34255,15 +36040,39 @@ return NULL;
}
}
case '0':
- if (strncmp (KR_keyword, "/dev/nst108", 11) == 0)
+ switch (KR_keyword [5])
{
+ case 'p':
+ if (strncmp (KR_keyword, "/dev/pty108", 11) == 0)
+ {
{
-return dev_storage + 212;
+return dev_storage + 406;
}
- }
- else
- {
+ }
+ else
+ {
+{
+return NULL;
+
+}
+ }
+ case 'n':
+ if (strncmp (KR_keyword, "/dev/nst108", 11) == 0)
+ {
+{
+return dev_storage + 276;
+
+}
+ }
+ else
+ {
+{
+return NULL;
+
+}
+ }
+ default:
{
return NULL;
@@ -34278,6 +36087,66 @@ return NULL;
case '7':
switch (KR_keyword [9])
{
+ case '9':
+ if (strncmp (KR_keyword, "/dev/cons97", 11) == 0)
+ {
+{
+return dev_storage + 117;
+
+}
+ }
+ else
+ {
+{
+return NULL;
+
+}
+ }
+ case '8':
+ if (strncmp (KR_keyword, "/dev/cons87", 11) == 0)
+ {
+{
+return dev_storage + 107;
+
+}
+ }
+ else
+ {
+{
+return NULL;
+
+}
+ }
+ case '7':
+ if (strncmp (KR_keyword, "/dev/cons77", 11) == 0)
+ {
+{
+return dev_storage + 97;
+
+}
+ }
+ else
+ {
+{
+return NULL;
+
+}
+ }
+ case '6':
+ if (strncmp (KR_keyword, "/dev/cons67", 11) == 0)
+ {
+{
+return dev_storage + 87;
+
+}
+ }
+ else
+ {
+{
+return NULL;
+
+}
+ }
case '5':
switch (KR_keyword [5])
{
@@ -34285,7 +36154,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/ttyS57", 11) == 0)
{
{
-return dev_storage + 2565;
+return dev_storage + 2693;
}
}
@@ -34324,7 +36193,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/ttyS47", 11) == 0)
{
{
-return dev_storage + 2555;
+return dev_storage + 2683;
}
}
@@ -34363,7 +36232,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/ttyS37", 11) == 0)
{
{
-return dev_storage + 2545;
+return dev_storage + 2673;
}
}
@@ -34402,7 +36271,22 @@ return NULL;
if (strncmp (KR_keyword, "/dev/ttyS27", 11) == 0)
{
{
-return dev_storage + 2535;
+return dev_storage + 2663;
+
+}
+ }
+ else
+ {
+{
+return NULL;
+
+}
+ }
+ case 'p':
+ if (strncmp (KR_keyword, "/dev/pty127", 11) == 0)
+ {
+{
+return dev_storage + 425;
}
}
@@ -34417,7 +36301,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/nst127", 11) == 0)
{
{
-return dev_storage + 231;
+return dev_storage + 295;
}
}
@@ -34456,7 +36340,22 @@ return NULL;
if (strncmp (KR_keyword, "/dev/ttyS17", 11) == 0)
{
{
-return dev_storage + 2525;
+return dev_storage + 2653;
+
+}
+ }
+ else
+ {
+{
+return NULL;
+
+}
+ }
+ case 'p':
+ if (strncmp (KR_keyword, "/dev/pty117", 11) == 0)
+ {
+{
+return dev_storage + 415;
}
}
@@ -34471,7 +36370,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/nst117", 11) == 0)
{
{
-return dev_storage + 221;
+return dev_storage + 285;
}
}
@@ -34504,15 +36403,39 @@ return NULL;
}
}
case '0':
- if (strncmp (KR_keyword, "/dev/nst107", 11) == 0)
+ switch (KR_keyword [5])
{
+ case 'p':
+ if (strncmp (KR_keyword, "/dev/pty107", 11) == 0)
+ {
{
-return dev_storage + 211;
+return dev_storage + 405;
}
- }
- else
- {
+ }
+ else
+ {
+{
+return NULL;
+
+}
+ }
+ case 'n':
+ if (strncmp (KR_keyword, "/dev/nst107", 11) == 0)
+ {
+{
+return dev_storage + 275;
+
+}
+ }
+ else
+ {
+{
+return NULL;
+
+}
+ }
+ default:
{
return NULL;
@@ -34527,6 +36450,66 @@ return NULL;
case '6':
switch (KR_keyword [9])
{
+ case '9':
+ if (strncmp (KR_keyword, "/dev/cons96", 11) == 0)
+ {
+{
+return dev_storage + 116;
+
+}
+ }
+ else
+ {
+{
+return NULL;
+
+}
+ }
+ case '8':
+ if (strncmp (KR_keyword, "/dev/cons86", 11) == 0)
+ {
+{
+return dev_storage + 106;
+
+}
+ }
+ else
+ {
+{
+return NULL;
+
+}
+ }
+ case '7':
+ if (strncmp (KR_keyword, "/dev/cons76", 11) == 0)
+ {
+{
+return dev_storage + 96;
+
+}
+ }
+ else
+ {
+{
+return NULL;
+
+}
+ }
+ case '6':
+ if (strncmp (KR_keyword, "/dev/cons66", 11) == 0)
+ {
+{
+return dev_storage + 86;
+
+}
+ }
+ else
+ {
+{
+return NULL;
+
+}
+ }
case '5':
switch (KR_keyword [5])
{
@@ -34534,7 +36517,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/ttyS56", 11) == 0)
{
{
-return dev_storage + 2564;
+return dev_storage + 2692;
}
}
@@ -34573,7 +36556,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/ttyS46", 11) == 0)
{
{
-return dev_storage + 2554;
+return dev_storage + 2682;
}
}
@@ -34612,7 +36595,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/ttyS36", 11) == 0)
{
{
-return dev_storage + 2544;
+return dev_storage + 2672;
}
}
@@ -34651,7 +36634,22 @@ return NULL;
if (strncmp (KR_keyword, "/dev/ttyS26", 11) == 0)
{
{
-return dev_storage + 2534;
+return dev_storage + 2662;
+
+}
+ }
+ else
+ {
+{
+return NULL;
+
+}
+ }
+ case 'p':
+ if (strncmp (KR_keyword, "/dev/pty126", 11) == 0)
+ {
+{
+return dev_storage + 424;
}
}
@@ -34666,7 +36664,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/nst126", 11) == 0)
{
{
-return dev_storage + 230;
+return dev_storage + 294;
}
}
@@ -34705,7 +36703,22 @@ return NULL;
if (strncmp (KR_keyword, "/dev/ttyS16", 11) == 0)
{
{
-return dev_storage + 2524;
+return dev_storage + 2652;
+
+}
+ }
+ else
+ {
+{
+return NULL;
+
+}
+ }
+ case 'p':
+ if (strncmp (KR_keyword, "/dev/pty116", 11) == 0)
+ {
+{
+return dev_storage + 414;
}
}
@@ -34720,7 +36733,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/nst116", 11) == 0)
{
{
-return dev_storage + 220;
+return dev_storage + 284;
}
}
@@ -34753,15 +36766,39 @@ return NULL;
}
}
case '0':
- if (strncmp (KR_keyword, "/dev/nst106", 11) == 0)
+ switch (KR_keyword [5])
{
+ case 'p':
+ if (strncmp (KR_keyword, "/dev/pty106", 11) == 0)
+ {
{
-return dev_storage + 210;
+return dev_storage + 404;
}
- }
- else
- {
+ }
+ else
+ {
+{
+return NULL;
+
+}
+ }
+ case 'n':
+ if (strncmp (KR_keyword, "/dev/nst106", 11) == 0)
+ {
+{
+return dev_storage + 274;
+
+}
+ }
+ else
+ {
+{
+return NULL;
+
+}
+ }
+ default:
{
return NULL;
@@ -34783,7 +36820,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/ttyS55", 11) == 0)
{
{
-return dev_storage + 2563;
+return dev_storage + 2691;
}
}
@@ -34798,7 +36835,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/ttyS45", 11) == 0)
{
{
-return dev_storage + 2553;
+return dev_storage + 2681;
}
}
@@ -34813,7 +36850,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/ttyS35", 11) == 0)
{
{
-return dev_storage + 2543;
+return dev_storage + 2671;
}
}
@@ -34825,25 +36862,88 @@ return NULL;
}
}
case '2':
- if (strncmp (KR_keyword, "/dev/ttyS25", 11) == 0)
+ switch (KR_keyword [5])
{
+ case 't':
+ if (strncmp (KR_keyword, "/dev/ttyS25", 11) == 0)
+ {
{
-return dev_storage + 2533;
+return dev_storage + 2661;
+
+}
+ }
+ else
+ {
+{
+return NULL;
+
+}
+ }
+ case 'p':
+ if (strncmp (KR_keyword, "/dev/pty125", 11) == 0)
+ {
+{
+return dev_storage + 423;
+
+}
+ }
+ else
+ {
+{
+return NULL;
+
+}
+ }
+ default:
+{
+return NULL;
}
}
- else
+ case '1':
+ switch (KR_keyword [5])
{
+ case 't':
+ if (strncmp (KR_keyword, "/dev/ttyS15", 11) == 0)
+ {
+{
+return dev_storage + 2651;
+
+}
+ }
+ else
+ {
+{
+return NULL;
+
+}
+ }
+ case 'p':
+ if (strncmp (KR_keyword, "/dev/pty115", 11) == 0)
+ {
+{
+return dev_storage + 413;
+
+}
+ }
+ else
+ {
+{
+return NULL;
+
+}
+ }
+ default:
{
return NULL;
}
}
- case '1':
- if (strncmp (KR_keyword, "/dev/ttyS15", 11) == 0)
+ case '0':
+ if (strncmp (KR_keyword, "/dev/pty105", 11) == 0)
{
{
-return dev_storage + 2523;
+return dev_storage + 403;
}
}
@@ -34867,7 +36967,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/nst125", 11) == 0)
{
{
-return dev_storage + 229;
+return dev_storage + 293;
}
}
@@ -34882,7 +36982,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/nst115", 11) == 0)
{
{
-return dev_storage + 219;
+return dev_storage + 283;
}
}
@@ -34897,7 +36997,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/nst105", 11) == 0)
{
{
-return dev_storage + 209;
+return dev_storage + 273;
}
}
@@ -34917,6 +37017,66 @@ return NULL;
case 'n':
switch (KR_keyword [9])
{
+ case '9':
+ if (strncmp (KR_keyword, "/dev/cons95", 11) == 0)
+ {
+{
+return dev_storage + 115;
+
+}
+ }
+ else
+ {
+{
+return NULL;
+
+}
+ }
+ case '8':
+ if (strncmp (KR_keyword, "/dev/cons85", 11) == 0)
+ {
+{
+return dev_storage + 105;
+
+}
+ }
+ else
+ {
+{
+return NULL;
+
+}
+ }
+ case '7':
+ if (strncmp (KR_keyword, "/dev/cons75", 11) == 0)
+ {
+{
+return dev_storage + 95;
+
+}
+ }
+ else
+ {
+{
+return NULL;
+
+}
+ }
+ case '6':
+ if (strncmp (KR_keyword, "/dev/cons65", 11) == 0)
+ {
+{
+return dev_storage + 85;
+
+}
+ }
+ else
+ {
+{
+return NULL;
+
+}
+ }
case '5':
if (strncmp (KR_keyword, "/dev/cons55", 11) == 0)
{
@@ -35005,7 +37165,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sddx15", 11) == 0)
{
{
-return dev_storage + 2362;
+return dev_storage + 2490;
}
}
@@ -35020,7 +37180,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sddw15", 11) == 0)
{
{
-return dev_storage + 2347;
+return dev_storage + 2475;
}
}
@@ -35035,7 +37195,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sddv15", 11) == 0)
{
{
-return dev_storage + 2332;
+return dev_storage + 2460;
}
}
@@ -35050,7 +37210,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sddu15", 11) == 0)
{
{
-return dev_storage + 2317;
+return dev_storage + 2445;
}
}
@@ -35065,7 +37225,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sddt15", 11) == 0)
{
{
-return dev_storage + 2302;
+return dev_storage + 2430;
}
}
@@ -35080,7 +37240,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdds15", 11) == 0)
{
{
-return dev_storage + 2287;
+return dev_storage + 2415;
}
}
@@ -35095,7 +37255,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sddr15", 11) == 0)
{
{
-return dev_storage + 2272;
+return dev_storage + 2400;
}
}
@@ -35110,7 +37270,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sddq15", 11) == 0)
{
{
-return dev_storage + 2257;
+return dev_storage + 2385;
}
}
@@ -35125,7 +37285,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sddp15", 11) == 0)
{
{
-return dev_storage + 2242;
+return dev_storage + 2370;
}
}
@@ -35140,7 +37300,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sddo15", 11) == 0)
{
{
-return dev_storage + 2227;
+return dev_storage + 2355;
}
}
@@ -35155,7 +37315,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sddn15", 11) == 0)
{
{
-return dev_storage + 2212;
+return dev_storage + 2340;
}
}
@@ -35170,7 +37330,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sddm15", 11) == 0)
{
{
-return dev_storage + 2197;
+return dev_storage + 2325;
}
}
@@ -35185,7 +37345,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sddl15", 11) == 0)
{
{
-return dev_storage + 2182;
+return dev_storage + 2310;
}
}
@@ -35200,7 +37360,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sddk15", 11) == 0)
{
{
-return dev_storage + 2167;
+return dev_storage + 2295;
}
}
@@ -35215,7 +37375,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sddj15", 11) == 0)
{
{
-return dev_storage + 2152;
+return dev_storage + 2280;
}
}
@@ -35230,7 +37390,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sddi15", 11) == 0)
{
{
-return dev_storage + 2137;
+return dev_storage + 2265;
}
}
@@ -35245,7 +37405,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sddh15", 11) == 0)
{
{
-return dev_storage + 2122;
+return dev_storage + 2250;
}
}
@@ -35260,7 +37420,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sddg15", 11) == 0)
{
{
-return dev_storage + 2107;
+return dev_storage + 2235;
}
}
@@ -35275,7 +37435,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sddf15", 11) == 0)
{
{
-return dev_storage + 2092;
+return dev_storage + 2220;
}
}
@@ -35290,7 +37450,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdde15", 11) == 0)
{
{
-return dev_storage + 2077;
+return dev_storage + 2205;
}
}
@@ -35305,7 +37465,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sddd15", 11) == 0)
{
{
-return dev_storage + 2062;
+return dev_storage + 2190;
}
}
@@ -35320,7 +37480,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sddc15", 11) == 0)
{
{
-return dev_storage + 2047;
+return dev_storage + 2175;
}
}
@@ -35335,7 +37495,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sddb15", 11) == 0)
{
{
-return dev_storage + 2032;
+return dev_storage + 2160;
}
}
@@ -35350,7 +37510,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdda15", 11) == 0)
{
{
-return dev_storage + 2017;
+return dev_storage + 2145;
}
}
@@ -35374,7 +37534,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdcz15", 11) == 0)
{
{
-return dev_storage + 1978;
+return dev_storage + 2106;
}
}
@@ -35389,7 +37549,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdcy15", 11) == 0)
{
{
-return dev_storage + 1963;
+return dev_storage + 2091;
}
}
@@ -35404,7 +37564,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdcx15", 11) == 0)
{
{
-return dev_storage + 1948;
+return dev_storage + 2076;
}
}
@@ -35419,7 +37579,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdcw15", 11) == 0)
{
{
-return dev_storage + 1933;
+return dev_storage + 2061;
}
}
@@ -35434,7 +37594,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdcv15", 11) == 0)
{
{
-return dev_storage + 1918;
+return dev_storage + 2046;
}
}
@@ -35449,7 +37609,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdcu15", 11) == 0)
{
{
-return dev_storage + 1903;
+return dev_storage + 2031;
}
}
@@ -35464,7 +37624,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdct15", 11) == 0)
{
{
-return dev_storage + 1888;
+return dev_storage + 2016;
}
}
@@ -35479,7 +37639,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdcs15", 11) == 0)
{
{
-return dev_storage + 1873;
+return dev_storage + 2001;
}
}
@@ -35494,7 +37654,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdcr15", 11) == 0)
{
{
-return dev_storage + 1858;
+return dev_storage + 1986;
}
}
@@ -35509,7 +37669,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdcq15", 11) == 0)
{
{
-return dev_storage + 1843;
+return dev_storage + 1971;
}
}
@@ -35524,7 +37684,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdcp15", 11) == 0)
{
{
-return dev_storage + 1828;
+return dev_storage + 1956;
}
}
@@ -35539,7 +37699,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdco15", 11) == 0)
{
{
-return dev_storage + 1813;
+return dev_storage + 1941;
}
}
@@ -35554,7 +37714,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdcn15", 11) == 0)
{
{
-return dev_storage + 1798;
+return dev_storage + 1926;
}
}
@@ -35569,7 +37729,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdcm15", 11) == 0)
{
{
-return dev_storage + 1783;
+return dev_storage + 1911;
}
}
@@ -35584,7 +37744,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdcl15", 11) == 0)
{
{
-return dev_storage + 1768;
+return dev_storage + 1896;
}
}
@@ -35599,7 +37759,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdck15", 11) == 0)
{
{
-return dev_storage + 1753;
+return dev_storage + 1881;
}
}
@@ -35614,7 +37774,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdcj15", 11) == 0)
{
{
-return dev_storage + 1738;
+return dev_storage + 1866;
}
}
@@ -35629,7 +37789,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdci15", 11) == 0)
{
{
-return dev_storage + 1723;
+return dev_storage + 1851;
}
}
@@ -35644,7 +37804,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdch15", 11) == 0)
{
{
-return dev_storage + 1708;
+return dev_storage + 1836;
}
}
@@ -35659,7 +37819,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdcg15", 11) == 0)
{
{
-return dev_storage + 1693;
+return dev_storage + 1821;
}
}
@@ -35674,7 +37834,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdcf15", 11) == 0)
{
{
-return dev_storage + 1678;
+return dev_storage + 1806;
}
}
@@ -35689,7 +37849,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdce15", 11) == 0)
{
{
-return dev_storage + 1663;
+return dev_storage + 1791;
}
}
@@ -35704,7 +37864,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdcd15", 11) == 0)
{
{
-return dev_storage + 1648;
+return dev_storage + 1776;
}
}
@@ -35719,7 +37879,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdcc15", 11) == 0)
{
{
-return dev_storage + 1633;
+return dev_storage + 1761;
}
}
@@ -35734,7 +37894,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdcb15", 11) == 0)
{
{
-return dev_storage + 1618;
+return dev_storage + 1746;
}
}
@@ -35749,7 +37909,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdca15", 11) == 0)
{
{
-return dev_storage + 1603;
+return dev_storage + 1731;
}
}
@@ -35773,7 +37933,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdbz15", 11) == 0)
{
{
-return dev_storage + 1562;
+return dev_storage + 1690;
}
}
@@ -35788,7 +37948,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdby15", 11) == 0)
{
{
-return dev_storage + 1547;
+return dev_storage + 1675;
}
}
@@ -35803,7 +37963,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdbx15", 11) == 0)
{
{
-return dev_storage + 1532;
+return dev_storage + 1660;
}
}
@@ -35818,7 +37978,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdbw15", 11) == 0)
{
{
-return dev_storage + 1517;
+return dev_storage + 1645;
}
}
@@ -35833,7 +37993,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdbv15", 11) == 0)
{
{
-return dev_storage + 1502;
+return dev_storage + 1630;
}
}
@@ -35848,7 +38008,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdbu15", 11) == 0)
{
{
-return dev_storage + 1487;
+return dev_storage + 1615;
}
}
@@ -35863,7 +38023,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdbt15", 11) == 0)
{
{
-return dev_storage + 1472;
+return dev_storage + 1600;
}
}
@@ -35878,7 +38038,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdbs15", 11) == 0)
{
{
-return dev_storage + 1457;
+return dev_storage + 1585;
}
}
@@ -35893,7 +38053,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdbr15", 11) == 0)
{
{
-return dev_storage + 1442;
+return dev_storage + 1570;
}
}
@@ -35908,7 +38068,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdbq15", 11) == 0)
{
{
-return dev_storage + 1427;
+return dev_storage + 1555;
}
}
@@ -35923,7 +38083,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdbp15", 11) == 0)
{
{
-return dev_storage + 1412;
+return dev_storage + 1540;
}
}
@@ -35938,7 +38098,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdbo15", 11) == 0)
{
{
-return dev_storage + 1397;
+return dev_storage + 1525;
}
}
@@ -35953,7 +38113,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdbn15", 11) == 0)
{
{
-return dev_storage + 1382;
+return dev_storage + 1510;
}
}
@@ -35968,7 +38128,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdbm15", 11) == 0)
{
{
-return dev_storage + 1367;
+return dev_storage + 1495;
}
}
@@ -35983,7 +38143,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdbl15", 11) == 0)
{
{
-return dev_storage + 1352;
+return dev_storage + 1480;
}
}
@@ -35998,7 +38158,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdbk15", 11) == 0)
{
{
-return dev_storage + 1337;
+return dev_storage + 1465;
}
}
@@ -36013,7 +38173,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdbj15", 11) == 0)
{
{
-return dev_storage + 1322;
+return dev_storage + 1450;
}
}
@@ -36028,7 +38188,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdbi15", 11) == 0)
{
{
-return dev_storage + 1307;
+return dev_storage + 1435;
}
}
@@ -36043,7 +38203,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdbh15", 11) == 0)
{
{
-return dev_storage + 1292;
+return dev_storage + 1420;
}
}
@@ -36058,7 +38218,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdbg15", 11) == 0)
{
{
-return dev_storage + 1277;
+return dev_storage + 1405;
}
}
@@ -36073,7 +38233,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdbf15", 11) == 0)
{
{
-return dev_storage + 1262;
+return dev_storage + 1390;
}
}
@@ -36088,7 +38248,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdbe15", 11) == 0)
{
{
-return dev_storage + 1247;
+return dev_storage + 1375;
}
}
@@ -36103,7 +38263,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdbd15", 11) == 0)
{
{
-return dev_storage + 1232;
+return dev_storage + 1360;
}
}
@@ -36118,7 +38278,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdbc15", 11) == 0)
{
{
-return dev_storage + 1217;
+return dev_storage + 1345;
}
}
@@ -36133,7 +38293,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdbb15", 11) == 0)
{
{
-return dev_storage + 1202;
+return dev_storage + 1330;
}
}
@@ -36148,7 +38308,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdba15", 11) == 0)
{
{
-return dev_storage + 1187;
+return dev_storage + 1315;
}
}
@@ -36172,7 +38332,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdaz15", 11) == 0)
{
{
-return dev_storage + 1146;
+return dev_storage + 1274;
}
}
@@ -36187,7 +38347,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sday15", 11) == 0)
{
{
-return dev_storage + 1131;
+return dev_storage + 1259;
}
}
@@ -36202,7 +38362,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdax15", 11) == 0)
{
{
-return dev_storage + 1116;
+return dev_storage + 1244;
}
}
@@ -36217,7 +38377,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdaw15", 11) == 0)
{
{
-return dev_storage + 1101;
+return dev_storage + 1229;
}
}
@@ -36232,7 +38392,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdav15", 11) == 0)
{
{
-return dev_storage + 1086;
+return dev_storage + 1214;
}
}
@@ -36247,7 +38407,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdau15", 11) == 0)
{
{
-return dev_storage + 1071;
+return dev_storage + 1199;
}
}
@@ -36262,7 +38422,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdat15", 11) == 0)
{
{
-return dev_storage + 1056;
+return dev_storage + 1184;
}
}
@@ -36277,7 +38437,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdas15", 11) == 0)
{
{
-return dev_storage + 1041;
+return dev_storage + 1169;
}
}
@@ -36292,7 +38452,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdar15", 11) == 0)
{
{
-return dev_storage + 1026;
+return dev_storage + 1154;
}
}
@@ -36307,7 +38467,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdaq15", 11) == 0)
{
{
-return dev_storage + 1011;
+return dev_storage + 1139;
}
}
@@ -36322,7 +38482,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdap15", 11) == 0)
{
{
-return dev_storage + 996;
+return dev_storage + 1124;
}
}
@@ -36337,7 +38497,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdao15", 11) == 0)
{
{
-return dev_storage + 981;
+return dev_storage + 1109;
}
}
@@ -36352,7 +38512,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdan15", 11) == 0)
{
{
-return dev_storage + 966;
+return dev_storage + 1094;
}
}
@@ -36367,7 +38527,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdam15", 11) == 0)
{
{
-return dev_storage + 951;
+return dev_storage + 1079;
}
}
@@ -36382,7 +38542,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdal15", 11) == 0)
{
{
-return dev_storage + 936;
+return dev_storage + 1064;
}
}
@@ -36397,7 +38557,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdak15", 11) == 0)
{
{
-return dev_storage + 921;
+return dev_storage + 1049;
}
}
@@ -36412,7 +38572,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdaj15", 11) == 0)
{
{
-return dev_storage + 906;
+return dev_storage + 1034;
}
}
@@ -36427,7 +38587,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdai15", 11) == 0)
{
{
-return dev_storage + 891;
+return dev_storage + 1019;
}
}
@@ -36442,7 +38602,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdah15", 11) == 0)
{
{
-return dev_storage + 876;
+return dev_storage + 1004;
}
}
@@ -36457,7 +38617,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdag15", 11) == 0)
{
{
-return dev_storage + 861;
+return dev_storage + 989;
}
}
@@ -36472,7 +38632,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdaf15", 11) == 0)
{
{
-return dev_storage + 846;
+return dev_storage + 974;
}
}
@@ -36487,7 +38647,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdae15", 11) == 0)
{
{
-return dev_storage + 831;
+return dev_storage + 959;
}
}
@@ -36502,7 +38662,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdad15", 11) == 0)
{
{
-return dev_storage + 816;
+return dev_storage + 944;
}
}
@@ -36517,7 +38677,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdac15", 11) == 0)
{
{
-return dev_storage + 801;
+return dev_storage + 929;
}
}
@@ -36532,7 +38692,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdab15", 11) == 0)
{
{
-return dev_storage + 786;
+return dev_storage + 914;
}
}
@@ -36547,7 +38707,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdaa15", 11) == 0)
{
{
-return dev_storage + 771;
+return dev_storage + 899;
}
}
@@ -36580,7 +38740,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/ttyS54", 11) == 0)
{
{
-return dev_storage + 2562;
+return dev_storage + 2690;
}
}
@@ -36595,7 +38755,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/ttyS44", 11) == 0)
{
{
-return dev_storage + 2552;
+return dev_storage + 2680;
}
}
@@ -36610,7 +38770,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/ttyS34", 11) == 0)
{
{
-return dev_storage + 2542;
+return dev_storage + 2670;
}
}
@@ -36622,25 +38782,88 @@ return NULL;
}
}
case '2':
- if (strncmp (KR_keyword, "/dev/ttyS24", 11) == 0)
+ switch (KR_keyword [5])
{
+ case 't':
+ if (strncmp (KR_keyword, "/dev/ttyS24", 11) == 0)
+ {
{
-return dev_storage + 2532;
+return dev_storage + 2660;
+
+}
+ }
+ else
+ {
+{
+return NULL;
+
+}
+ }
+ case 'p':
+ if (strncmp (KR_keyword, "/dev/pty124", 11) == 0)
+ {
+{
+return dev_storage + 422;
+
+}
+ }
+ else
+ {
+{
+return NULL;
+
+}
+ }
+ default:
+{
+return NULL;
}
}
- else
+ case '1':
+ switch (KR_keyword [5])
{
+ case 't':
+ if (strncmp (KR_keyword, "/dev/ttyS14", 11) == 0)
+ {
+{
+return dev_storage + 2650;
+
+}
+ }
+ else
+ {
+{
+return NULL;
+
+}
+ }
+ case 'p':
+ if (strncmp (KR_keyword, "/dev/pty114", 11) == 0)
+ {
+{
+return dev_storage + 412;
+
+}
+ }
+ else
+ {
+{
+return NULL;
+
+}
+ }
+ default:
{
return NULL;
}
}
- case '1':
- if (strncmp (KR_keyword, "/dev/ttyS14", 11) == 0)
+ case '0':
+ if (strncmp (KR_keyword, "/dev/pty104", 11) == 0)
{
{
-return dev_storage + 2522;
+return dev_storage + 402;
}
}
@@ -36664,7 +38887,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/nst124", 11) == 0)
{
{
-return dev_storage + 228;
+return dev_storage + 292;
}
}
@@ -36679,7 +38902,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/nst114", 11) == 0)
{
{
-return dev_storage + 218;
+return dev_storage + 282;
}
}
@@ -36694,7 +38917,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/nst104", 11) == 0)
{
{
-return dev_storage + 208;
+return dev_storage + 272;
}
}
@@ -36714,6 +38937,66 @@ return NULL;
case 'n':
switch (KR_keyword [9])
{
+ case '9':
+ if (strncmp (KR_keyword, "/dev/cons94", 11) == 0)
+ {
+{
+return dev_storage + 114;
+
+}
+ }
+ else
+ {
+{
+return NULL;
+
+}
+ }
+ case '8':
+ if (strncmp (KR_keyword, "/dev/cons84", 11) == 0)
+ {
+{
+return dev_storage + 104;
+
+}
+ }
+ else
+ {
+{
+return NULL;
+
+}
+ }
+ case '7':
+ if (strncmp (KR_keyword, "/dev/cons74", 11) == 0)
+ {
+{
+return dev_storage + 94;
+
+}
+ }
+ else
+ {
+{
+return NULL;
+
+}
+ }
+ case '6':
+ if (strncmp (KR_keyword, "/dev/cons64", 11) == 0)
+ {
+{
+return dev_storage + 84;
+
+}
+ }
+ else
+ {
+{
+return NULL;
+
+}
+ }
case '5':
if (strncmp (KR_keyword, "/dev/cons54", 11) == 0)
{
@@ -36802,7 +39085,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sddx14", 11) == 0)
{
{
-return dev_storage + 2361;
+return dev_storage + 2489;
}
}
@@ -36817,7 +39100,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sddw14", 11) == 0)
{
{
-return dev_storage + 2346;
+return dev_storage + 2474;
}
}
@@ -36832,7 +39115,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sddv14", 11) == 0)
{
{
-return dev_storage + 2331;
+return dev_storage + 2459;
}
}
@@ -36847,7 +39130,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sddu14", 11) == 0)
{
{
-return dev_storage + 2316;
+return dev_storage + 2444;
}
}
@@ -36862,7 +39145,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sddt14", 11) == 0)
{
{
-return dev_storage + 2301;
+return dev_storage + 2429;
}
}
@@ -36877,7 +39160,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdds14", 11) == 0)
{
{
-return dev_storage + 2286;
+return dev_storage + 2414;
}
}
@@ -36892,7 +39175,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sddr14", 11) == 0)
{
{
-return dev_storage + 2271;
+return dev_storage + 2399;
}
}
@@ -36907,7 +39190,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sddq14", 11) == 0)
{
{
-return dev_storage + 2256;
+return dev_storage + 2384;
}
}
@@ -36922,7 +39205,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sddp14", 11) == 0)
{
{
-return dev_storage + 2241;
+return dev_storage + 2369;
}
}
@@ -36937,7 +39220,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sddo14", 11) == 0)
{
{
-return dev_storage + 2226;
+return dev_storage + 2354;
}
}
@@ -36952,7 +39235,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sddn14", 11) == 0)
{
{
-return dev_storage + 2211;
+return dev_storage + 2339;
}
}
@@ -36967,7 +39250,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sddm14", 11) == 0)
{
{
-return dev_storage + 2196;
+return dev_storage + 2324;
}
}
@@ -36982,7 +39265,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sddl14", 11) == 0)
{
{
-return dev_storage + 2181;
+return dev_storage + 2309;
}
}
@@ -36997,7 +39280,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sddk14", 11) == 0)
{
{
-return dev_storage + 2166;
+return dev_storage + 2294;
}
}
@@ -37012,7 +39295,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sddj14", 11) == 0)
{
{
-return dev_storage + 2151;
+return dev_storage + 2279;
}
}
@@ -37027,7 +39310,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sddi14", 11) == 0)
{
{
-return dev_storage + 2136;
+return dev_storage + 2264;
}
}
@@ -37042,7 +39325,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sddh14", 11) == 0)
{
{
-return dev_storage + 2121;
+return dev_storage + 2249;
}
}
@@ -37057,7 +39340,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sddg14", 11) == 0)
{
{
-return dev_storage + 2106;
+return dev_storage + 2234;
}
}
@@ -37072,7 +39355,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sddf14", 11) == 0)
{
{
-return dev_storage + 2091;
+return dev_storage + 2219;
}
}
@@ -37087,7 +39370,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdde14", 11) == 0)
{
{
-return dev_storage + 2076;
+return dev_storage + 2204;
}
}
@@ -37102,7 +39385,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sddd14", 11) == 0)
{
{
-return dev_storage + 2061;
+return dev_storage + 2189;
}
}
@@ -37117,7 +39400,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sddc14", 11) == 0)
{
{
-return dev_storage + 2046;
+return dev_storage + 2174;
}
}
@@ -37132,7 +39415,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sddb14", 11) == 0)
{
{
-return dev_storage + 2031;
+return dev_storage + 2159;
}
}
@@ -37147,7 +39430,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdda14", 11) == 0)
{
{
-return dev_storage + 2016;
+return dev_storage + 2144;
}
}
@@ -37171,7 +39454,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdcz14", 11) == 0)
{
{
-return dev_storage + 1977;
+return dev_storage + 2105;
}
}
@@ -37186,7 +39469,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdcy14", 11) == 0)
{
{
-return dev_storage + 1962;
+return dev_storage + 2090;
}
}
@@ -37201,7 +39484,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdcx14", 11) == 0)
{
{
-return dev_storage + 1947;
+return dev_storage + 2075;
}
}
@@ -37216,7 +39499,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdcw14", 11) == 0)
{
{
-return dev_storage + 1932;
+return dev_storage + 2060;
}
}
@@ -37231,7 +39514,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdcv14", 11) == 0)
{
{
-return dev_storage + 1917;
+return dev_storage + 2045;
}
}
@@ -37246,7 +39529,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdcu14", 11) == 0)
{
{
-return dev_storage + 1902;
+return dev_storage + 2030;
}
}
@@ -37261,7 +39544,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdct14", 11) == 0)
{
{
-return dev_storage + 1887;
+return dev_storage + 2015;
}
}
@@ -37276,7 +39559,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdcs14", 11) == 0)
{
{
-return dev_storage + 1872;
+return dev_storage + 2000;
}
}
@@ -37291,7 +39574,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdcr14", 11) == 0)
{
{
-return dev_storage + 1857;
+return dev_storage + 1985;
}
}
@@ -37306,7 +39589,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdcq14", 11) == 0)
{
{
-return dev_storage + 1842;
+return dev_storage + 1970;
}
}
@@ -37321,7 +39604,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdcp14", 11) == 0)
{
{
-return dev_storage + 1827;
+return dev_storage + 1955;
}
}
@@ -37336,7 +39619,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdco14", 11) == 0)
{
{
-return dev_storage + 1812;
+return dev_storage + 1940;
}
}
@@ -37351,7 +39634,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdcn14", 11) == 0)
{
{
-return dev_storage + 1797;
+return dev_storage + 1925;
}
}
@@ -37366,7 +39649,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdcm14", 11) == 0)
{
{
-return dev_storage + 1782;
+return dev_storage + 1910;
}
}
@@ -37381,7 +39664,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdcl14", 11) == 0)
{
{
-return dev_storage + 1767;
+return dev_storage + 1895;
}
}
@@ -37396,7 +39679,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdck14", 11) == 0)
{
{
-return dev_storage + 1752;
+return dev_storage + 1880;
}
}
@@ -37411,7 +39694,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdcj14", 11) == 0)
{
{
-return dev_storage + 1737;
+return dev_storage + 1865;
}
}
@@ -37426,7 +39709,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdci14", 11) == 0)
{
{
-return dev_storage + 1722;
+return dev_storage + 1850;
}
}
@@ -37441,7 +39724,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdch14", 11) == 0)
{
{
-return dev_storage + 1707;
+return dev_storage + 1835;
}
}
@@ -37456,7 +39739,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdcg14", 11) == 0)
{
{
-return dev_storage + 1692;
+return dev_storage + 1820;
}
}
@@ -37471,7 +39754,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdcf14", 11) == 0)
{
{
-return dev_storage + 1677;
+return dev_storage + 1805;
}
}
@@ -37486,7 +39769,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdce14", 11) == 0)
{
{
-return dev_storage + 1662;
+return dev_storage + 1790;
}
}
@@ -37501,7 +39784,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdcd14", 11) == 0)
{
{
-return dev_storage + 1647;
+return dev_storage + 1775;
}
}
@@ -37516,7 +39799,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdcc14", 11) == 0)
{
{
-return dev_storage + 1632;
+return dev_storage + 1760;
}
}
@@ -37531,7 +39814,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdcb14", 11) == 0)
{
{
-return dev_storage + 1617;
+return dev_storage + 1745;
}
}
@@ -37546,7 +39829,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdca14", 11) == 0)
{
{
-return dev_storage + 1602;
+return dev_storage + 1730;
}
}
@@ -37570,7 +39853,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdbz14", 11) == 0)
{
{
-return dev_storage + 1561;
+return dev_storage + 1689;
}
}
@@ -37585,7 +39868,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdby14", 11) == 0)
{
{
-return dev_storage + 1546;
+return dev_storage + 1674;
}
}
@@ -37600,7 +39883,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdbx14", 11) == 0)
{
{
-return dev_storage + 1531;
+return dev_storage + 1659;
}
}
@@ -37615,7 +39898,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdbw14", 11) == 0)
{
{
-return dev_storage + 1516;
+return dev_storage + 1644;
}
}
@@ -37630,7 +39913,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdbv14", 11) == 0)
{
{
-return dev_storage + 1501;
+return dev_storage + 1629;
}
}
@@ -37645,7 +39928,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdbu14", 11) == 0)
{
{
-return dev_storage + 1486;
+return dev_storage + 1614;
}
}
@@ -37660,7 +39943,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdbt14", 11) == 0)
{
{
-return dev_storage + 1471;
+return dev_storage + 1599;
}
}
@@ -37675,7 +39958,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdbs14", 11) == 0)
{
{
-return dev_storage + 1456;
+return dev_storage + 1584;
}
}
@@ -37690,7 +39973,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdbr14", 11) == 0)
{
{
-return dev_storage + 1441;
+return dev_storage + 1569;
}
}
@@ -37705,7 +39988,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdbq14", 11) == 0)
{
{
-return dev_storage + 1426;
+return dev_storage + 1554;
}
}
@@ -37720,7 +40003,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdbp14", 11) == 0)
{
{
-return dev_storage + 1411;
+return dev_storage + 1539;
}
}
@@ -37735,7 +40018,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdbo14", 11) == 0)
{
{
-return dev_storage + 1396;
+return dev_storage + 1524;
}
}
@@ -37750,7 +40033,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdbn14", 11) == 0)
{
{
-return dev_storage + 1381;
+return dev_storage + 1509;
}
}
@@ -37765,7 +40048,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdbm14", 11) == 0)
{
{
-return dev_storage + 1366;
+return dev_storage + 1494;
}
}
@@ -37780,7 +40063,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdbl14", 11) == 0)
{
{
-return dev_storage + 1351;
+return dev_storage + 1479;
}
}
@@ -37795,7 +40078,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdbk14", 11) == 0)
{
{
-return dev_storage + 1336;
+return dev_storage + 1464;
}
}
@@ -37810,7 +40093,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdbj14", 11) == 0)
{
{
-return dev_storage + 1321;
+return dev_storage + 1449;
}
}
@@ -37825,7 +40108,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdbi14", 11) == 0)
{
{
-return dev_storage + 1306;
+return dev_storage + 1434;
}
}
@@ -37840,7 +40123,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdbh14", 11) == 0)
{
{
-return dev_storage + 1291;
+return dev_storage + 1419;
}
}
@@ -37855,7 +40138,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdbg14", 11) == 0)
{
{
-return dev_storage + 1276;
+return dev_storage + 1404;
}
}
@@ -37870,7 +40153,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdbf14", 11) == 0)
{
{
-return dev_storage + 1261;
+return dev_storage + 1389;
}
}
@@ -37885,7 +40168,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdbe14", 11) == 0)
{
{
-return dev_storage + 1246;
+return dev_storage + 1374;
}
}
@@ -37900,7 +40183,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdbd14", 11) == 0)
{
{
-return dev_storage + 1231;
+return dev_storage + 1359;
}
}
@@ -37915,7 +40198,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdbc14", 11) == 0)
{
{
-return dev_storage + 1216;
+return dev_storage + 1344;
}
}
@@ -37930,7 +40213,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdbb14", 11) == 0)
{
{
-return dev_storage + 1201;
+return dev_storage + 1329;
}
}
@@ -37945,7 +40228,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdba14", 11) == 0)
{
{
-return dev_storage + 1186;
+return dev_storage + 1314;
}
}
@@ -37969,7 +40252,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdaz14", 11) == 0)
{
{
-return dev_storage + 1145;
+return dev_storage + 1273;
}
}
@@ -37984,7 +40267,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sday14", 11) == 0)
{
{
-return dev_storage + 1130;
+return dev_storage + 1258;
}
}
@@ -37999,7 +40282,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdax14", 11) == 0)
{
{
-return dev_storage + 1115;
+return dev_storage + 1243;
}
}
@@ -38014,7 +40297,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdaw14", 11) == 0)
{
{
-return dev_storage + 1100;
+return dev_storage + 1228;
}
}
@@ -38029,7 +40312,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdav14", 11) == 0)
{
{
-return dev_storage + 1085;
+return dev_storage + 1213;
}
}
@@ -38044,7 +40327,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdau14", 11) == 0)
{
{
-return dev_storage + 1070;
+return dev_storage + 1198;
}
}
@@ -38059,7 +40342,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdat14", 11) == 0)
{
{
-return dev_storage + 1055;
+return dev_storage + 1183;
}
}
@@ -38074,7 +40357,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdas14", 11) == 0)
{
{
-return dev_storage + 1040;
+return dev_storage + 1168;
}
}
@@ -38089,7 +40372,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdar14", 11) == 0)
{
{
-return dev_storage + 1025;
+return dev_storage + 1153;
}
}
@@ -38104,7 +40387,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdaq14", 11) == 0)
{
{
-return dev_storage + 1010;
+return dev_storage + 1138;
}
}
@@ -38119,7 +40402,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdap14", 11) == 0)
{
{
-return dev_storage + 995;
+return dev_storage + 1123;
}
}
@@ -38134,7 +40417,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdao14", 11) == 0)
{
{
-return dev_storage + 980;
+return dev_storage + 1108;
}
}
@@ -38149,7 +40432,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdan14", 11) == 0)
{
{
-return dev_storage + 965;
+return dev_storage + 1093;
}
}
@@ -38164,7 +40447,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdam14", 11) == 0)
{
{
-return dev_storage + 950;
+return dev_storage + 1078;
}
}
@@ -38179,7 +40462,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdal14", 11) == 0)
{
{
-return dev_storage + 935;
+return dev_storage + 1063;
}
}
@@ -38194,7 +40477,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdak14", 11) == 0)
{
{
-return dev_storage + 920;
+return dev_storage + 1048;
}
}
@@ -38209,7 +40492,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdaj14", 11) == 0)
{
{
-return dev_storage + 905;
+return dev_storage + 1033;
}
}
@@ -38224,7 +40507,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdai14", 11) == 0)
{
{
-return dev_storage + 890;
+return dev_storage + 1018;
}
}
@@ -38239,7 +40522,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdah14", 11) == 0)
{
{
-return dev_storage + 875;
+return dev_storage + 1003;
}
}
@@ -38254,7 +40537,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdag14", 11) == 0)
{
{
-return dev_storage + 860;
+return dev_storage + 988;
}
}
@@ -38269,7 +40552,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdaf14", 11) == 0)
{
{
-return dev_storage + 845;
+return dev_storage + 973;
}
}
@@ -38284,7 +40567,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdae14", 11) == 0)
{
{
-return dev_storage + 830;
+return dev_storage + 958;
}
}
@@ -38299,7 +40582,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdad14", 11) == 0)
{
{
-return dev_storage + 815;
+return dev_storage + 943;
}
}
@@ -38314,7 +40597,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdac14", 11) == 0)
{
{
-return dev_storage + 800;
+return dev_storage + 928;
}
}
@@ -38329,7 +40612,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdab14", 11) == 0)
{
{
-return dev_storage + 785;
+return dev_storage + 913;
}
}
@@ -38344,7 +40627,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdaa14", 11) == 0)
{
{
-return dev_storage + 770;
+return dev_storage + 898;
}
}
@@ -38377,7 +40660,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/ttyS63", 11) == 0)
{
{
-return dev_storage + 2571;
+return dev_storage + 2699;
}
}
@@ -38392,7 +40675,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/ttyS53", 11) == 0)
{
{
-return dev_storage + 2561;
+return dev_storage + 2689;
}
}
@@ -38407,7 +40690,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/ttyS43", 11) == 0)
{
{
-return dev_storage + 2551;
+return dev_storage + 2679;
}
}
@@ -38422,7 +40705,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/ttyS33", 11) == 0)
{
{
-return dev_storage + 2541;
+return dev_storage + 2669;
}
}
@@ -38434,25 +40717,88 @@ return NULL;
}
}
case '2':
- if (strncmp (KR_keyword, "/dev/ttyS23", 11) == 0)
+ switch (KR_keyword [5])
{
+ case 't':
+ if (strncmp (KR_keyword, "/dev/ttyS23", 11) == 0)
+ {
{
-return dev_storage + 2531;
+return dev_storage + 2659;
+
+}
+ }
+ else
+ {
+{
+return NULL;
+
+}
+ }
+ case 'p':
+ if (strncmp (KR_keyword, "/dev/pty123", 11) == 0)
+ {
+{
+return dev_storage + 421;
+
+}
+ }
+ else
+ {
+{
+return NULL;
+
+}
+ }
+ default:
+{
+return NULL;
}
}
- else
+ case '1':
+ switch (KR_keyword [5])
{
+ case 't':
+ if (strncmp (KR_keyword, "/dev/ttyS13", 11) == 0)
+ {
+{
+return dev_storage + 2649;
+
+}
+ }
+ else
+ {
+{
+return NULL;
+
+}
+ }
+ case 'p':
+ if (strncmp (KR_keyword, "/dev/pty113", 11) == 0)
+ {
+{
+return dev_storage + 411;
+
+}
+ }
+ else
+ {
+{
+return NULL;
+
+}
+ }
+ default:
{
return NULL;
}
}
- case '1':
- if (strncmp (KR_keyword, "/dev/ttyS13", 11) == 0)
+ case '0':
+ if (strncmp (KR_keyword, "/dev/pty103", 11) == 0)
{
{
-return dev_storage + 2521;
+return dev_storage + 401;
}
}
@@ -38476,7 +40822,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/nst123", 11) == 0)
{
{
-return dev_storage + 227;
+return dev_storage + 291;
}
}
@@ -38491,7 +40837,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/nst113", 11) == 0)
{
{
-return dev_storage + 217;
+return dev_storage + 281;
}
}
@@ -38506,7 +40852,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/nst103", 11) == 0)
{
{
-return dev_storage + 207;
+return dev_storage + 271;
}
}
@@ -38526,6 +40872,51 @@ return NULL;
case 'n':
switch (KR_keyword [9])
{
+ case '9':
+ if (strncmp (KR_keyword, "/dev/cons93", 11) == 0)
+ {
+{
+return dev_storage + 113;
+
+}
+ }
+ else
+ {
+{
+return NULL;
+
+}
+ }
+ case '8':
+ if (strncmp (KR_keyword, "/dev/cons83", 11) == 0)
+ {
+{
+return dev_storage + 103;
+
+}
+ }
+ else
+ {
+{
+return NULL;
+
+}
+ }
+ case '7':
+ if (strncmp (KR_keyword, "/dev/cons73", 11) == 0)
+ {
+{
+return dev_storage + 93;
+
+}
+ }
+ else
+ {
+{
+return NULL;
+
+}
+ }
case '6':
if (strncmp (KR_keyword, "/dev/cons63", 11) == 0)
{
@@ -38629,7 +41020,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sddx13", 11) == 0)
{
{
-return dev_storage + 2360;
+return dev_storage + 2488;
}
}
@@ -38644,7 +41035,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sddw13", 11) == 0)
{
{
-return dev_storage + 2345;
+return dev_storage + 2473;
}
}
@@ -38659,7 +41050,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sddv13", 11) == 0)
{
{
-return dev_storage + 2330;
+return dev_storage + 2458;
}
}
@@ -38674,7 +41065,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sddu13", 11) == 0)
{
{
-return dev_storage + 2315;
+return dev_storage + 2443;
}
}
@@ -38689,7 +41080,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sddt13", 11) == 0)
{
{
-return dev_storage + 2300;
+return dev_storage + 2428;
}
}
@@ -38704,7 +41095,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdds13", 11) == 0)
{
{
-return dev_storage + 2285;
+return dev_storage + 2413;
}
}
@@ -38719,7 +41110,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sddr13", 11) == 0)
{
{
-return dev_storage + 2270;
+return dev_storage + 2398;
}
}
@@ -38734,7 +41125,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sddq13", 11) == 0)
{
{
-return dev_storage + 2255;
+return dev_storage + 2383;
}
}
@@ -38749,7 +41140,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sddp13", 11) == 0)
{
{
-return dev_storage + 2240;
+return dev_storage + 2368;
}
}
@@ -38764,7 +41155,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sddo13", 11) == 0)
{
{
-return dev_storage + 2225;
+return dev_storage + 2353;
}
}
@@ -38779,7 +41170,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sddn13", 11) == 0)
{
{
-return dev_storage + 2210;
+return dev_storage + 2338;
}
}
@@ -38794,7 +41185,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sddm13", 11) == 0)
{
{
-return dev_storage + 2195;
+return dev_storage + 2323;
}
}
@@ -38809,7 +41200,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sddl13", 11) == 0)
{
{
-return dev_storage + 2180;
+return dev_storage + 2308;
}
}
@@ -38824,7 +41215,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sddk13", 11) == 0)
{
{
-return dev_storage + 2165;
+return dev_storage + 2293;
}
}
@@ -38839,7 +41230,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sddj13", 11) == 0)
{
{
-return dev_storage + 2150;
+return dev_storage + 2278;
}
}
@@ -38854,7 +41245,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sddi13", 11) == 0)
{
{
-return dev_storage + 2135;
+return dev_storage + 2263;
}
}
@@ -38869,7 +41260,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sddh13", 11) == 0)
{
{
-return dev_storage + 2120;
+return dev_storage + 2248;
}
}
@@ -38884,7 +41275,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sddg13", 11) == 0)
{
{
-return dev_storage + 2105;
+return dev_storage + 2233;
}
}
@@ -38899,7 +41290,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sddf13", 11) == 0)
{
{
-return dev_storage + 2090;
+return dev_storage + 2218;
}
}
@@ -38914,7 +41305,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdde13", 11) == 0)
{
{
-return dev_storage + 2075;
+return dev_storage + 2203;
}
}
@@ -38929,7 +41320,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sddd13", 11) == 0)
{
{
-return dev_storage + 2060;
+return dev_storage + 2188;
}
}
@@ -38944,7 +41335,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sddc13", 11) == 0)
{
{
-return dev_storage + 2045;
+return dev_storage + 2173;
}
}
@@ -38959,7 +41350,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sddb13", 11) == 0)
{
{
-return dev_storage + 2030;
+return dev_storage + 2158;
}
}
@@ -38974,7 +41365,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdda13", 11) == 0)
{
{
-return dev_storage + 2015;
+return dev_storage + 2143;
}
}
@@ -38998,7 +41389,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdcz13", 11) == 0)
{
{
-return dev_storage + 1976;
+return dev_storage + 2104;
}
}
@@ -39013,7 +41404,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdcy13", 11) == 0)
{
{
-return dev_storage + 1961;
+return dev_storage + 2089;
}
}
@@ -39028,7 +41419,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdcx13", 11) == 0)
{
{
-return dev_storage + 1946;
+return dev_storage + 2074;
}
}
@@ -39043,7 +41434,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdcw13", 11) == 0)
{
{
-return dev_storage + 1931;
+return dev_storage + 2059;
}
}
@@ -39058,7 +41449,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdcv13", 11) == 0)
{
{
-return dev_storage + 1916;
+return dev_storage + 2044;
}
}
@@ -39073,7 +41464,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdcu13", 11) == 0)
{
{
-return dev_storage + 1901;
+return dev_storage + 2029;
}
}
@@ -39088,7 +41479,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdct13", 11) == 0)
{
{
-return dev_storage + 1886;
+return dev_storage + 2014;
}
}
@@ -39103,7 +41494,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdcs13", 11) == 0)
{
{
-return dev_storage + 1871;
+return dev_storage + 1999;
}
}
@@ -39118,7 +41509,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdcr13", 11) == 0)
{
{
-return dev_storage + 1856;
+return dev_storage + 1984;
}
}
@@ -39133,7 +41524,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdcq13", 11) == 0)
{
{
-return dev_storage + 1841;
+return dev_storage + 1969;
}
}
@@ -39148,7 +41539,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdcp13", 11) == 0)
{
{
-return dev_storage + 1826;
+return dev_storage + 1954;
}
}
@@ -39163,7 +41554,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdco13", 11) == 0)
{
{
-return dev_storage + 1811;
+return dev_storage + 1939;
}
}
@@ -39178,7 +41569,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdcn13", 11) == 0)
{
{
-return dev_storage + 1796;
+return dev_storage + 1924;
}
}
@@ -39193,7 +41584,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdcm13", 11) == 0)
{
{
-return dev_storage + 1781;
+return dev_storage + 1909;
}
}
@@ -39208,7 +41599,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdcl13", 11) == 0)
{
{
-return dev_storage + 1766;
+return dev_storage + 1894;
}
}
@@ -39223,7 +41614,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdck13", 11) == 0)
{
{
-return dev_storage + 1751;
+return dev_storage + 1879;
}
}
@@ -39238,7 +41629,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdcj13", 11) == 0)
{
{
-return dev_storage + 1736;
+return dev_storage + 1864;
}
}
@@ -39253,7 +41644,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdci13", 11) == 0)
{
{
-return dev_storage + 1721;
+return dev_storage + 1849;
}
}
@@ -39268,7 +41659,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdch13", 11) == 0)
{
{
-return dev_storage + 1706;
+return dev_storage + 1834;
}
}
@@ -39283,7 +41674,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdcg13", 11) == 0)
{
{
-return dev_storage + 1691;
+return dev_storage + 1819;
}
}
@@ -39298,7 +41689,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdcf13", 11) == 0)
{
{
-return dev_storage + 1676;
+return dev_storage + 1804;
}
}
@@ -39313,7 +41704,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdce13", 11) == 0)
{
{
-return dev_storage + 1661;
+return dev_storage + 1789;
}
}
@@ -39328,7 +41719,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdcd13", 11) == 0)
{
{
-return dev_storage + 1646;
+return dev_storage + 1774;
}
}
@@ -39343,7 +41734,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdcc13", 11) == 0)
{
{
-return dev_storage + 1631;
+return dev_storage + 1759;
}
}
@@ -39358,7 +41749,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdcb13", 11) == 0)
{
{
-return dev_storage + 1616;
+return dev_storage + 1744;
}
}
@@ -39373,7 +41764,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdca13", 11) == 0)
{
{
-return dev_storage + 1601;
+return dev_storage + 1729;
}
}
@@ -39397,7 +41788,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdbz13", 11) == 0)
{
{
-return dev_storage + 1560;
+return dev_storage + 1688;
}
}
@@ -39412,7 +41803,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdby13", 11) == 0)
{
{
-return dev_storage + 1545;
+return dev_storage + 1673;
}
}
@@ -39427,7 +41818,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdbx13", 11) == 0)
{
{
-return dev_storage + 1530;
+return dev_storage + 1658;
}
}
@@ -39442,7 +41833,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdbw13", 11) == 0)
{
{
-return dev_storage + 1515;
+return dev_storage + 1643;
}
}
@@ -39457,7 +41848,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdbv13", 11) == 0)
{
{
-return dev_storage + 1500;
+return dev_storage + 1628;
}
}
@@ -39472,7 +41863,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdbu13", 11) == 0)
{
{
-return dev_storage + 1485;
+return dev_storage + 1613;
}
}
@@ -39487,7 +41878,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdbt13", 11) == 0)
{
{
-return dev_storage + 1470;
+return dev_storage + 1598;
}
}
@@ -39502,7 +41893,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdbs13", 11) == 0)
{
{
-return dev_storage + 1455;
+return dev_storage + 1583;
}
}
@@ -39517,7 +41908,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdbr13", 11) == 0)
{
{
-return dev_storage + 1440;
+return dev_storage + 1568;
}
}
@@ -39532,7 +41923,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdbq13", 11) == 0)
{
{
-return dev_storage + 1425;
+return dev_storage + 1553;
}
}
@@ -39547,7 +41938,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdbp13", 11) == 0)
{
{
-return dev_storage + 1410;
+return dev_storage + 1538;
}
}
@@ -39562,7 +41953,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdbo13", 11) == 0)
{
{
-return dev_storage + 1395;
+return dev_storage + 1523;
}
}
@@ -39577,7 +41968,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdbn13", 11) == 0)
{
{
-return dev_storage + 1380;
+return dev_storage + 1508;
}
}
@@ -39592,7 +41983,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdbm13", 11) == 0)
{
{
-return dev_storage + 1365;
+return dev_storage + 1493;
}
}
@@ -39607,7 +41998,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdbl13", 11) == 0)
{
{
-return dev_storage + 1350;
+return dev_storage + 1478;
}
}
@@ -39622,7 +42013,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdbk13", 11) == 0)
{
{
-return dev_storage + 1335;
+return dev_storage + 1463;
}
}
@@ -39637,7 +42028,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdbj13", 11) == 0)
{
{
-return dev_storage + 1320;
+return dev_storage + 1448;
}
}
@@ -39652,7 +42043,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdbi13", 11) == 0)
{
{
-return dev_storage + 1305;
+return dev_storage + 1433;
}
}
@@ -39667,7 +42058,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdbh13", 11) == 0)
{
{
-return dev_storage + 1290;
+return dev_storage + 1418;
}
}
@@ -39682,7 +42073,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdbg13", 11) == 0)
{
{
-return dev_storage + 1275;
+return dev_storage + 1403;
}
}
@@ -39697,7 +42088,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdbf13", 11) == 0)
{
{
-return dev_storage + 1260;
+return dev_storage + 1388;
}
}
@@ -39712,7 +42103,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdbe13", 11) == 0)
{
{
-return dev_storage + 1245;
+return dev_storage + 1373;
}
}
@@ -39727,7 +42118,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdbd13", 11) == 0)
{
{
-return dev_storage + 1230;
+return dev_storage + 1358;
}
}
@@ -39742,7 +42133,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdbc13", 11) == 0)
{
{
-return dev_storage + 1215;
+return dev_storage + 1343;
}
}
@@ -39757,7 +42148,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdbb13", 11) == 0)
{
{
-return dev_storage + 1200;
+return dev_storage + 1328;
}
}
@@ -39772,7 +42163,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdba13", 11) == 0)
{
{
-return dev_storage + 1185;
+return dev_storage + 1313;
}
}
@@ -39796,7 +42187,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdaz13", 11) == 0)
{
{
-return dev_storage + 1144;
+return dev_storage + 1272;
}
}
@@ -39811,7 +42202,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sday13", 11) == 0)
{
{
-return dev_storage + 1129;
+return dev_storage + 1257;
}
}
@@ -39826,7 +42217,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdax13", 11) == 0)
{
{
-return dev_storage + 1114;
+return dev_storage + 1242;
}
}
@@ -39841,7 +42232,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdaw13", 11) == 0)
{
{
-return dev_storage + 1099;
+return dev_storage + 1227;
}
}
@@ -39856,7 +42247,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdav13", 11) == 0)
{
{
-return dev_storage + 1084;
+return dev_storage + 1212;
}
}
@@ -39871,7 +42262,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdau13", 11) == 0)
{
{
-return dev_storage + 1069;
+return dev_storage + 1197;
}
}
@@ -39886,7 +42277,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdat13", 11) == 0)
{
{
-return dev_storage + 1054;
+return dev_storage + 1182;
}
}
@@ -39901,7 +42292,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdas13", 11) == 0)
{
{
-return dev_storage + 1039;
+return dev_storage + 1167;
}
}
@@ -39916,7 +42307,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdar13", 11) == 0)
{
{
-return dev_storage + 1024;
+return dev_storage + 1152;
}
}
@@ -39931,7 +42322,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdaq13", 11) == 0)
{
{
-return dev_storage + 1009;
+return dev_storage + 1137;
}
}
@@ -39946,7 +42337,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdap13", 11) == 0)
{
{
-return dev_storage + 994;
+return dev_storage + 1122;
}
}
@@ -39961,7 +42352,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdao13", 11) == 0)
{
{
-return dev_storage + 979;
+return dev_storage + 1107;
}
}
@@ -39976,7 +42367,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdan13", 11) == 0)
{
{
-return dev_storage + 964;
+return dev_storage + 1092;
}
}
@@ -39991,7 +42382,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdam13", 11) == 0)
{
{
-return dev_storage + 949;
+return dev_storage + 1077;
}
}
@@ -40006,7 +42397,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdal13", 11) == 0)
{
{
-return dev_storage + 934;
+return dev_storage + 1062;
}
}
@@ -40021,7 +42412,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdak13", 11) == 0)
{
{
-return dev_storage + 919;
+return dev_storage + 1047;
}
}
@@ -40036,7 +42427,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdaj13", 11) == 0)
{
{
-return dev_storage + 904;
+return dev_storage + 1032;
}
}
@@ -40051,7 +42442,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdai13", 11) == 0)
{
{
-return dev_storage + 889;
+return dev_storage + 1017;
}
}
@@ -40066,7 +42457,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdah13", 11) == 0)
{
{
-return dev_storage + 874;
+return dev_storage + 1002;
}
}
@@ -40081,7 +42472,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdag13", 11) == 0)
{
{
-return dev_storage + 859;
+return dev_storage + 987;
}
}
@@ -40096,7 +42487,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdaf13", 11) == 0)
{
{
-return dev_storage + 844;
+return dev_storage + 972;
}
}
@@ -40111,7 +42502,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdae13", 11) == 0)
{
{
-return dev_storage + 829;
+return dev_storage + 957;
}
}
@@ -40126,7 +42517,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdad13", 11) == 0)
{
{
-return dev_storage + 814;
+return dev_storage + 942;
}
}
@@ -40141,7 +42532,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdac13", 11) == 0)
{
{
-return dev_storage + 799;
+return dev_storage + 927;
}
}
@@ -40156,7 +42547,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdab13", 11) == 0)
{
{
-return dev_storage + 784;
+return dev_storage + 912;
}
}
@@ -40171,7 +42562,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdaa13", 11) == 0)
{
{
-return dev_storage + 769;
+return dev_storage + 897;
}
}
@@ -40204,7 +42595,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/ttyS62", 11) == 0)
{
{
-return dev_storage + 2570;
+return dev_storage + 2698;
}
}
@@ -40219,7 +42610,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/ttyS52", 11) == 0)
{
{
-return dev_storage + 2560;
+return dev_storage + 2688;
}
}
@@ -40234,7 +42625,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/ttyS42", 11) == 0)
{
{
-return dev_storage + 2550;
+return dev_storage + 2678;
}
}
@@ -40249,7 +42640,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/ttyS32", 11) == 0)
{
{
-return dev_storage + 2540;
+return dev_storage + 2668;
}
}
@@ -40261,25 +42652,88 @@ return NULL;
}
}
case '2':
- if (strncmp (KR_keyword, "/dev/ttyS22", 11) == 0)
+ switch (KR_keyword [5])
{
+ case 't':
+ if (strncmp (KR_keyword, "/dev/ttyS22", 11) == 0)
+ {
{
-return dev_storage + 2530;
+return dev_storage + 2658;
+
+}
+ }
+ else
+ {
+{
+return NULL;
+
+}
+ }
+ case 'p':
+ if (strncmp (KR_keyword, "/dev/pty122", 11) == 0)
+ {
+{
+return dev_storage + 420;
+
+}
+ }
+ else
+ {
+{
+return NULL;
+
+}
+ }
+ default:
+{
+return NULL;
}
}
- else
+ case '1':
+ switch (KR_keyword [5])
{
+ case 't':
+ if (strncmp (KR_keyword, "/dev/ttyS12", 11) == 0)
+ {
+{
+return dev_storage + 2648;
+
+}
+ }
+ else
+ {
+{
+return NULL;
+
+}
+ }
+ case 'p':
+ if (strncmp (KR_keyword, "/dev/pty112", 11) == 0)
+ {
+{
+return dev_storage + 410;
+
+}
+ }
+ else
+ {
+{
+return NULL;
+
+}
+ }
+ default:
{
return NULL;
}
}
- case '1':
- if (strncmp (KR_keyword, "/dev/ttyS12", 11) == 0)
+ case '0':
+ if (strncmp (KR_keyword, "/dev/pty102", 11) == 0)
{
{
-return dev_storage + 2520;
+return dev_storage + 400;
}
}
@@ -40303,7 +42757,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/nst122", 11) == 0)
{
{
-return dev_storage + 226;
+return dev_storage + 290;
}
}
@@ -40318,7 +42772,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/nst112", 11) == 0)
{
{
-return dev_storage + 216;
+return dev_storage + 280;
}
}
@@ -40333,7 +42787,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/nst102", 11) == 0)
{
{
-return dev_storage + 206;
+return dev_storage + 270;
}
}
@@ -40353,6 +42807,51 @@ return NULL;
case 'n':
switch (KR_keyword [9])
{
+ case '9':
+ if (strncmp (KR_keyword, "/dev/cons92", 11) == 0)
+ {
+{
+return dev_storage + 112;
+
+}
+ }
+ else
+ {
+{
+return NULL;
+
+}
+ }
+ case '8':
+ if (strncmp (KR_keyword, "/dev/cons82", 11) == 0)
+ {
+{
+return dev_storage + 102;
+
+}
+ }
+ else
+ {
+{
+return NULL;
+
+}
+ }
+ case '7':
+ if (strncmp (KR_keyword, "/dev/cons72", 11) == 0)
+ {
+{
+return dev_storage + 92;
+
+}
+ }
+ else
+ {
+{
+return NULL;
+
+}
+ }
case '6':
if (strncmp (KR_keyword, "/dev/cons62", 11) == 0)
{
@@ -40456,7 +42955,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sddx12", 11) == 0)
{
{
-return dev_storage + 2359;
+return dev_storage + 2487;
}
}
@@ -40471,7 +42970,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sddw12", 11) == 0)
{
{
-return dev_storage + 2344;
+return dev_storage + 2472;
}
}
@@ -40486,7 +42985,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sddv12", 11) == 0)
{
{
-return dev_storage + 2329;
+return dev_storage + 2457;
}
}
@@ -40501,7 +43000,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sddu12", 11) == 0)
{
{
-return dev_storage + 2314;
+return dev_storage + 2442;
}
}
@@ -40516,7 +43015,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sddt12", 11) == 0)
{
{
-return dev_storage + 2299;
+return dev_storage + 2427;
}
}
@@ -40531,7 +43030,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdds12", 11) == 0)
{
{
-return dev_storage + 2284;
+return dev_storage + 2412;
}
}
@@ -40546,7 +43045,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sddr12", 11) == 0)
{
{
-return dev_storage + 2269;
+return dev_storage + 2397;
}
}
@@ -40561,7 +43060,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sddq12", 11) == 0)
{
{
-return dev_storage + 2254;
+return dev_storage + 2382;
}
}
@@ -40576,7 +43075,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sddp12", 11) == 0)
{
{
-return dev_storage + 2239;
+return dev_storage + 2367;
}
}
@@ -40591,7 +43090,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sddo12", 11) == 0)
{
{
-return dev_storage + 2224;
+return dev_storage + 2352;
}
}
@@ -40606,7 +43105,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sddn12", 11) == 0)
{
{
-return dev_storage + 2209;
+return dev_storage + 2337;
}
}
@@ -40621,7 +43120,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sddm12", 11) == 0)
{
{
-return dev_storage + 2194;
+return dev_storage + 2322;
}
}
@@ -40636,7 +43135,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sddl12", 11) == 0)
{
{
-return dev_storage + 2179;
+return dev_storage + 2307;
}
}
@@ -40651,7 +43150,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sddk12", 11) == 0)
{
{
-return dev_storage + 2164;
+return dev_storage + 2292;
}
}
@@ -40666,7 +43165,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sddj12", 11) == 0)
{
{
-return dev_storage + 2149;
+return dev_storage + 2277;
}
}
@@ -40681,7 +43180,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sddi12", 11) == 0)
{
{
-return dev_storage + 2134;
+return dev_storage + 2262;
}
}
@@ -40696,7 +43195,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sddh12", 11) == 0)
{
{
-return dev_storage + 2119;
+return dev_storage + 2247;
}
}
@@ -40711,7 +43210,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sddg12", 11) == 0)
{
{
-return dev_storage + 2104;
+return dev_storage + 2232;
}
}
@@ -40726,7 +43225,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sddf12", 11) == 0)
{
{
-return dev_storage + 2089;
+return dev_storage + 2217;
}
}
@@ -40741,7 +43240,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdde12", 11) == 0)
{
{
-return dev_storage + 2074;
+return dev_storage + 2202;
}
}
@@ -40756,7 +43255,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sddd12", 11) == 0)
{
{
-return dev_storage + 2059;
+return dev_storage + 2187;
}
}
@@ -40771,7 +43270,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sddc12", 11) == 0)
{
{
-return dev_storage + 2044;
+return dev_storage + 2172;
}
}
@@ -40786,7 +43285,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sddb12", 11) == 0)
{
{
-return dev_storage + 2029;
+return dev_storage + 2157;
}
}
@@ -40801,7 +43300,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdda12", 11) == 0)
{
{
-return dev_storage + 2014;
+return dev_storage + 2142;
}
}
@@ -40825,7 +43324,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdcz12", 11) == 0)
{
{
-return dev_storage + 1975;
+return dev_storage + 2103;
}
}
@@ -40840,7 +43339,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdcy12", 11) == 0)
{
{
-return dev_storage + 1960;
+return dev_storage + 2088;
}
}
@@ -40855,7 +43354,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdcx12", 11) == 0)
{
{
-return dev_storage + 1945;
+return dev_storage + 2073;
}
}
@@ -40870,7 +43369,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdcw12", 11) == 0)
{
{
-return dev_storage + 1930;
+return dev_storage + 2058;
}
}
@@ -40885,7 +43384,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdcv12", 11) == 0)
{
{
-return dev_storage + 1915;
+return dev_storage + 2043;
}
}
@@ -40900,7 +43399,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdcu12", 11) == 0)
{
{
-return dev_storage + 1900;
+return dev_storage + 2028;
}
}
@@ -40915,7 +43414,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdct12", 11) == 0)
{
{
-return dev_storage + 1885;
+return dev_storage + 2013;
}
}
@@ -40930,7 +43429,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdcs12", 11) == 0)
{
{
-return dev_storage + 1870;
+return dev_storage + 1998;
}
}
@@ -40945,7 +43444,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdcr12", 11) == 0)
{
{
-return dev_storage + 1855;
+return dev_storage + 1983;
}
}
@@ -40960,7 +43459,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdcq12", 11) == 0)
{
{
-return dev_storage + 1840;
+return dev_storage + 1968;
}
}
@@ -40975,7 +43474,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdcp12", 11) == 0)
{
{
-return dev_storage + 1825;
+return dev_storage + 1953;
}
}
@@ -40990,7 +43489,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdco12", 11) == 0)
{
{
-return dev_storage + 1810;
+return dev_storage + 1938;
}
}
@@ -41005,7 +43504,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdcn12", 11) == 0)
{
{
-return dev_storage + 1795;
+return dev_storage + 1923;
}
}
@@ -41020,7 +43519,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdcm12", 11) == 0)
{
{
-return dev_storage + 1780;
+return dev_storage + 1908;
}
}
@@ -41035,7 +43534,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdcl12", 11) == 0)
{
{
-return dev_storage + 1765;
+return dev_storage + 1893;
}
}
@@ -41050,7 +43549,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdck12", 11) == 0)
{
{
-return dev_storage + 1750;
+return dev_storage + 1878;
}
}
@@ -41065,7 +43564,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdcj12", 11) == 0)
{
{
-return dev_storage + 1735;
+return dev_storage + 1863;
}
}
@@ -41080,7 +43579,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdci12", 11) == 0)
{
{
-return dev_storage + 1720;
+return dev_storage + 1848;
}
}
@@ -41095,7 +43594,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdch12", 11) == 0)
{
{
-return dev_storage + 1705;
+return dev_storage + 1833;
}
}
@@ -41110,7 +43609,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdcg12", 11) == 0)
{
{
-return dev_storage + 1690;
+return dev_storage + 1818;
}
}
@@ -41125,7 +43624,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdcf12", 11) == 0)
{
{
-return dev_storage + 1675;
+return dev_storage + 1803;
}
}
@@ -41140,7 +43639,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdce12", 11) == 0)
{
{
-return dev_storage + 1660;
+return dev_storage + 1788;
}
}
@@ -41155,7 +43654,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdcd12", 11) == 0)
{
{
-return dev_storage + 1645;
+return dev_storage + 1773;
}
}
@@ -41170,7 +43669,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdcc12", 11) == 0)
{
{
-return dev_storage + 1630;
+return dev_storage + 1758;
}
}
@@ -41185,7 +43684,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdcb12", 11) == 0)
{
{
-return dev_storage + 1615;
+return dev_storage + 1743;
}
}
@@ -41200,7 +43699,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdca12", 11) == 0)
{
{
-return dev_storage + 1600;
+return dev_storage + 1728;
}
}
@@ -41224,7 +43723,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdbz12", 11) == 0)
{
{
-return dev_storage + 1559;
+return dev_storage + 1687;
}
}
@@ -41239,7 +43738,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdby12", 11) == 0)
{
{
-return dev_storage + 1544;
+return dev_storage + 1672;
}
}
@@ -41254,7 +43753,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdbx12", 11) == 0)
{
{
-return dev_storage + 1529;
+return dev_storage + 1657;
}
}
@@ -41269,7 +43768,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdbw12", 11) == 0)
{
{
-return dev_storage + 1514;
+return dev_storage + 1642;
}
}
@@ -41284,7 +43783,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdbv12", 11) == 0)
{
{
-return dev_storage + 1499;
+return dev_storage + 1627;
}
}
@@ -41299,7 +43798,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdbu12", 11) == 0)
{
{
-return dev_storage + 1484;
+return dev_storage + 1612;
}
}
@@ -41314,7 +43813,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdbt12", 11) == 0)
{
{
-return dev_storage + 1469;
+return dev_storage + 1597;
}
}
@@ -41329,7 +43828,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdbs12", 11) == 0)
{
{
-return dev_storage + 1454;
+return dev_storage + 1582;
}
}
@@ -41344,7 +43843,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdbr12", 11) == 0)
{
{
-return dev_storage + 1439;
+return dev_storage + 1567;
}
}
@@ -41359,7 +43858,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdbq12", 11) == 0)
{
{
-return dev_storage + 1424;
+return dev_storage + 1552;
}
}
@@ -41374,7 +43873,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdbp12", 11) == 0)
{
{
-return dev_storage + 1409;
+return dev_storage + 1537;
}
}
@@ -41389,7 +43888,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdbo12", 11) == 0)
{
{
-return dev_storage + 1394;
+return dev_storage + 1522;
}
}
@@ -41404,7 +43903,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdbn12", 11) == 0)
{
{
-return dev_storage + 1379;
+return dev_storage + 1507;
}
}
@@ -41419,7 +43918,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdbm12", 11) == 0)
{
{
-return dev_storage + 1364;
+return dev_storage + 1492;
}
}
@@ -41434,7 +43933,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdbl12", 11) == 0)
{
{
-return dev_storage + 1349;
+return dev_storage + 1477;
}
}
@@ -41449,7 +43948,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdbk12", 11) == 0)
{
{
-return dev_storage + 1334;
+return dev_storage + 1462;
}
}
@@ -41464,7 +43963,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdbj12", 11) == 0)
{
{
-return dev_storage + 1319;
+return dev_storage + 1447;
}
}
@@ -41479,7 +43978,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdbi12", 11) == 0)
{
{
-return dev_storage + 1304;
+return dev_storage + 1432;
}
}
@@ -41494,7 +43993,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdbh12", 11) == 0)
{
{
-return dev_storage + 1289;
+return dev_storage + 1417;
}
}
@@ -41509,7 +44008,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdbg12", 11) == 0)
{
{
-return dev_storage + 1274;
+return dev_storage + 1402;
}
}
@@ -41524,7 +44023,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdbf12", 11) == 0)
{
{
-return dev_storage + 1259;
+return dev_storage + 1387;
}
}
@@ -41539,7 +44038,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdbe12", 11) == 0)
{
{
-return dev_storage + 1244;
+return dev_storage + 1372;
}
}
@@ -41554,7 +44053,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdbd12", 11) == 0)
{
{
-return dev_storage + 1229;
+return dev_storage + 1357;
}
}
@@ -41569,7 +44068,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdbc12", 11) == 0)
{
{
-return dev_storage + 1214;
+return dev_storage + 1342;
}
}
@@ -41584,7 +44083,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdbb12", 11) == 0)
{
{
-return dev_storage + 1199;
+return dev_storage + 1327;
}
}
@@ -41599,7 +44098,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdba12", 11) == 0)
{
{
-return dev_storage + 1184;
+return dev_storage + 1312;
}
}
@@ -41623,7 +44122,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdaz12", 11) == 0)
{
{
-return dev_storage + 1143;
+return dev_storage + 1271;
}
}
@@ -41638,7 +44137,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sday12", 11) == 0)
{
{
-return dev_storage + 1128;
+return dev_storage + 1256;
}
}
@@ -41653,7 +44152,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdax12", 11) == 0)
{
{
-return dev_storage + 1113;
+return dev_storage + 1241;
}
}
@@ -41668,7 +44167,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdaw12", 11) == 0)
{
{
-return dev_storage + 1098;
+return dev_storage + 1226;
}
}
@@ -41683,7 +44182,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdav12", 11) == 0)
{
{
-return dev_storage + 1083;
+return dev_storage + 1211;
}
}
@@ -41698,7 +44197,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdau12", 11) == 0)
{
{
-return dev_storage + 1068;
+return dev_storage + 1196;
}
}
@@ -41713,7 +44212,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdat12", 11) == 0)
{
{
-return dev_storage + 1053;
+return dev_storage + 1181;
}
}
@@ -41728,7 +44227,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdas12", 11) == 0)
{
{
-return dev_storage + 1038;
+return dev_storage + 1166;
}
}
@@ -41743,7 +44242,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdar12", 11) == 0)
{
{
-return dev_storage + 1023;
+return dev_storage + 1151;
}
}
@@ -41758,7 +44257,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdaq12", 11) == 0)
{
{
-return dev_storage + 1008;
+return dev_storage + 1136;
}
}
@@ -41773,7 +44272,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdap12", 11) == 0)
{
{
-return dev_storage + 993;
+return dev_storage + 1121;
}
}
@@ -41788,7 +44287,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdao12", 11) == 0)
{
{
-return dev_storage + 978;
+return dev_storage + 1106;
}
}
@@ -41803,7 +44302,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdan12", 11) == 0)
{
{
-return dev_storage + 963;
+return dev_storage + 1091;
}
}
@@ -41818,7 +44317,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdam12", 11) == 0)
{
{
-return dev_storage + 948;
+return dev_storage + 1076;
}
}
@@ -41833,7 +44332,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdal12", 11) == 0)
{
{
-return dev_storage + 933;
+return dev_storage + 1061;
}
}
@@ -41848,7 +44347,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdak12", 11) == 0)
{
{
-return dev_storage + 918;
+return dev_storage + 1046;
}
}
@@ -41863,7 +44362,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdaj12", 11) == 0)
{
{
-return dev_storage + 903;
+return dev_storage + 1031;
}
}
@@ -41878,7 +44377,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdai12", 11) == 0)
{
{
-return dev_storage + 888;
+return dev_storage + 1016;
}
}
@@ -41893,7 +44392,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdah12", 11) == 0)
{
{
-return dev_storage + 873;
+return dev_storage + 1001;
}
}
@@ -41908,7 +44407,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdag12", 11) == 0)
{
{
-return dev_storage + 858;
+return dev_storage + 986;
}
}
@@ -41923,7 +44422,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdaf12", 11) == 0)
{
{
-return dev_storage + 843;
+return dev_storage + 971;
}
}
@@ -41938,7 +44437,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdae12", 11) == 0)
{
{
-return dev_storage + 828;
+return dev_storage + 956;
}
}
@@ -41953,7 +44452,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdad12", 11) == 0)
{
{
-return dev_storage + 813;
+return dev_storage + 941;
}
}
@@ -41968,7 +44467,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdac12", 11) == 0)
{
{
-return dev_storage + 798;
+return dev_storage + 926;
}
}
@@ -41983,7 +44482,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdab12", 11) == 0)
{
{
-return dev_storage + 783;
+return dev_storage + 911;
}
}
@@ -41998,7 +44497,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdaa12", 11) == 0)
{
{
-return dev_storage + 768;
+return dev_storage + 896;
}
}
@@ -42031,7 +44530,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/ttyS61", 11) == 0)
{
{
-return dev_storage + 2569;
+return dev_storage + 2697;
}
}
@@ -42046,7 +44545,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/ttyS51", 11) == 0)
{
{
-return dev_storage + 2559;
+return dev_storage + 2687;
}
}
@@ -42061,7 +44560,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/ttyS41", 11) == 0)
{
{
-return dev_storage + 2549;
+return dev_storage + 2677;
}
}
@@ -42076,7 +44575,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/ttyS31", 11) == 0)
{
{
-return dev_storage + 2539;
+return dev_storage + 2667;
}
}
@@ -42088,25 +44587,88 @@ return NULL;
}
}
case '2':
- if (strncmp (KR_keyword, "/dev/ttyS21", 11) == 0)
+ switch (KR_keyword [5])
{
+ case 't':
+ if (strncmp (KR_keyword, "/dev/ttyS21", 11) == 0)
+ {
{
-return dev_storage + 2529;
+return dev_storage + 2657;
+
+}
+ }
+ else
+ {
+{
+return NULL;
+
+}
+ }
+ case 'p':
+ if (strncmp (KR_keyword, "/dev/pty121", 11) == 0)
+ {
+{
+return dev_storage + 419;
+
+}
+ }
+ else
+ {
+{
+return NULL;
+
+}
+ }
+ default:
+{
+return NULL;
}
}
- else
+ case '1':
+ switch (KR_keyword [5])
{
+ case 't':
+ if (strncmp (KR_keyword, "/dev/ttyS11", 11) == 0)
+ {
+{
+return dev_storage + 2647;
+
+}
+ }
+ else
+ {
+{
+return NULL;
+
+}
+ }
+ case 'p':
+ if (strncmp (KR_keyword, "/dev/pty111", 11) == 0)
+ {
+{
+return dev_storage + 409;
+
+}
+ }
+ else
+ {
+{
+return NULL;
+
+}
+ }
+ default:
{
return NULL;
}
}
- case '1':
- if (strncmp (KR_keyword, "/dev/ttyS11", 11) == 0)
+ case '0':
+ if (strncmp (KR_keyword, "/dev/pty101", 11) == 0)
{
{
-return dev_storage + 2519;
+return dev_storage + 399;
}
}
@@ -42130,7 +44692,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/nst121", 11) == 0)
{
{
-return dev_storage + 225;
+return dev_storage + 289;
}
}
@@ -42145,7 +44707,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/nst111", 11) == 0)
{
{
-return dev_storage + 215;
+return dev_storage + 279;
}
}
@@ -42160,7 +44722,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/nst101", 11) == 0)
{
{
-return dev_storage + 205;
+return dev_storage + 269;
}
}
@@ -42180,6 +44742,51 @@ return NULL;
case 'n':
switch (KR_keyword [9])
{
+ case '9':
+ if (strncmp (KR_keyword, "/dev/cons91", 11) == 0)
+ {
+{
+return dev_storage + 111;
+
+}
+ }
+ else
+ {
+{
+return NULL;
+
+}
+ }
+ case '8':
+ if (strncmp (KR_keyword, "/dev/cons81", 11) == 0)
+ {
+{
+return dev_storage + 101;
+
+}
+ }
+ else
+ {
+{
+return NULL;
+
+}
+ }
+ case '7':
+ if (strncmp (KR_keyword, "/dev/cons71", 11) == 0)
+ {
+{
+return dev_storage + 91;
+
+}
+ }
+ else
+ {
+{
+return NULL;
+
+}
+ }
case '6':
if (strncmp (KR_keyword, "/dev/cons61", 11) == 0)
{
@@ -42283,7 +44890,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sddx11", 11) == 0)
{
{
-return dev_storage + 2358;
+return dev_storage + 2486;
}
}
@@ -42298,7 +44905,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sddw11", 11) == 0)
{
{
-return dev_storage + 2343;
+return dev_storage + 2471;
}
}
@@ -42313,7 +44920,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sddv11", 11) == 0)
{
{
-return dev_storage + 2328;
+return dev_storage + 2456;
}
}
@@ -42328,7 +44935,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sddu11", 11) == 0)
{
{
-return dev_storage + 2313;
+return dev_storage + 2441;
}
}
@@ -42343,7 +44950,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sddt11", 11) == 0)
{
{
-return dev_storage + 2298;
+return dev_storage + 2426;
}
}
@@ -42358,7 +44965,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdds11", 11) == 0)
{
{
-return dev_storage + 2283;
+return dev_storage + 2411;
}
}
@@ -42373,7 +44980,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sddr11", 11) == 0)
{
{
-return dev_storage + 2268;
+return dev_storage + 2396;
}
}
@@ -42388,7 +44995,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sddq11", 11) == 0)
{
{
-return dev_storage + 2253;
+return dev_storage + 2381;
}
}
@@ -42403,7 +45010,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sddp11", 11) == 0)
{
{
-return dev_storage + 2238;
+return dev_storage + 2366;
}
}
@@ -42418,7 +45025,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sddo11", 11) == 0)
{
{
-return dev_storage + 2223;
+return dev_storage + 2351;
}
}
@@ -42433,7 +45040,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sddn11", 11) == 0)
{
{
-return dev_storage + 2208;
+return dev_storage + 2336;
}
}
@@ -42448,7 +45055,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sddm11", 11) == 0)
{
{
-return dev_storage + 2193;
+return dev_storage + 2321;
}
}
@@ -42463,7 +45070,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sddl11", 11) == 0)
{
{
-return dev_storage + 2178;
+return dev_storage + 2306;
}
}
@@ -42478,7 +45085,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sddk11", 11) == 0)
{
{
-return dev_storage + 2163;
+return dev_storage + 2291;
}
}
@@ -42493,7 +45100,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sddj11", 11) == 0)
{
{
-return dev_storage + 2148;
+return dev_storage + 2276;
}
}
@@ -42508,7 +45115,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sddi11", 11) == 0)
{
{
-return dev_storage + 2133;
+return dev_storage + 2261;
}
}
@@ -42523,7 +45130,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sddh11", 11) == 0)
{
{
-return dev_storage + 2118;
+return dev_storage + 2246;
}
}
@@ -42538,7 +45145,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sddg11", 11) == 0)
{
{
-return dev_storage + 2103;
+return dev_storage + 2231;
}
}
@@ -42553,7 +45160,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sddf11", 11) == 0)
{
{
-return dev_storage + 2088;
+return dev_storage + 2216;
}
}
@@ -42568,7 +45175,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdde11", 11) == 0)
{
{
-return dev_storage + 2073;
+return dev_storage + 2201;
}
}
@@ -42583,7 +45190,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sddd11", 11) == 0)
{
{
-return dev_storage + 2058;
+return dev_storage + 2186;
}
}
@@ -42598,7 +45205,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sddc11", 11) == 0)
{
{
-return dev_storage + 2043;
+return dev_storage + 2171;
}
}
@@ -42613,7 +45220,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sddb11", 11) == 0)
{
{
-return dev_storage + 2028;
+return dev_storage + 2156;
}
}
@@ -42628,7 +45235,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdda11", 11) == 0)
{
{
-return dev_storage + 2013;
+return dev_storage + 2141;
}
}
@@ -42652,7 +45259,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdcz11", 11) == 0)
{
{
-return dev_storage + 1974;
+return dev_storage + 2102;
}
}
@@ -42667,7 +45274,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdcy11", 11) == 0)
{
{
-return dev_storage + 1959;
+return dev_storage + 2087;
}
}
@@ -42682,7 +45289,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdcx11", 11) == 0)
{
{
-return dev_storage + 1944;
+return dev_storage + 2072;
}
}
@@ -42697,7 +45304,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdcw11", 11) == 0)
{
{
-return dev_storage + 1929;
+return dev_storage + 2057;
}
}
@@ -42712,7 +45319,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdcv11", 11) == 0)
{
{
-return dev_storage + 1914;
+return dev_storage + 2042;
}
}
@@ -42727,7 +45334,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdcu11", 11) == 0)
{
{
-return dev_storage + 1899;
+return dev_storage + 2027;
}
}
@@ -42742,7 +45349,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdct11", 11) == 0)
{
{
-return dev_storage + 1884;
+return dev_storage + 2012;
}
}
@@ -42757,7 +45364,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdcs11", 11) == 0)
{
{
-return dev_storage + 1869;
+return dev_storage + 1997;
}
}
@@ -42772,7 +45379,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdcr11", 11) == 0)
{
{
-return dev_storage + 1854;
+return dev_storage + 1982;
}
}
@@ -42787,7 +45394,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdcq11", 11) == 0)
{
{
-return dev_storage + 1839;
+return dev_storage + 1967;
}
}
@@ -42802,7 +45409,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdcp11", 11) == 0)
{
{
-return dev_storage + 1824;
+return dev_storage + 1952;
}
}
@@ -42817,7 +45424,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdco11", 11) == 0)
{
{
-return dev_storage + 1809;
+return dev_storage + 1937;
}
}
@@ -42832,7 +45439,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdcn11", 11) == 0)
{
{
-return dev_storage + 1794;
+return dev_storage + 1922;
}
}
@@ -42847,7 +45454,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdcm11", 11) == 0)
{
{
-return dev_storage + 1779;
+return dev_storage + 1907;
}
}
@@ -42862,7 +45469,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdcl11", 11) == 0)
{
{
-return dev_storage + 1764;
+return dev_storage + 1892;
}
}
@@ -42877,7 +45484,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdck11", 11) == 0)
{
{
-return dev_storage + 1749;
+return dev_storage + 1877;
}
}
@@ -42892,7 +45499,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdcj11", 11) == 0)
{
{
-return dev_storage + 1734;
+return dev_storage + 1862;
}
}
@@ -42907,7 +45514,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdci11", 11) == 0)
{
{
-return dev_storage + 1719;
+return dev_storage + 1847;
}
}
@@ -42922,7 +45529,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdch11", 11) == 0)
{
{
-return dev_storage + 1704;
+return dev_storage + 1832;
}
}
@@ -42937,7 +45544,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdcg11", 11) == 0)
{
{
-return dev_storage + 1689;
+return dev_storage + 1817;
}
}
@@ -42952,7 +45559,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdcf11", 11) == 0)
{
{
-return dev_storage + 1674;
+return dev_storage + 1802;
}
}
@@ -42967,7 +45574,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdce11", 11) == 0)
{
{
-return dev_storage + 1659;
+return dev_storage + 1787;
}
}
@@ -42982,7 +45589,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdcd11", 11) == 0)
{
{
-return dev_storage + 1644;
+return dev_storage + 1772;
}
}
@@ -42997,7 +45604,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdcc11", 11) == 0)
{
{
-return dev_storage + 1629;
+return dev_storage + 1757;
}
}
@@ -43012,7 +45619,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdcb11", 11) == 0)
{
{
-return dev_storage + 1614;
+return dev_storage + 1742;
}
}
@@ -43027,7 +45634,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdca11", 11) == 0)
{
{
-return dev_storage + 1599;
+return dev_storage + 1727;
}
}
@@ -43051,7 +45658,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdbz11", 11) == 0)
{
{
-return dev_storage + 1558;
+return dev_storage + 1686;
}
}
@@ -43066,7 +45673,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdby11", 11) == 0)
{
{
-return dev_storage + 1543;
+return dev_storage + 1671;
}
}
@@ -43081,7 +45688,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdbx11", 11) == 0)
{
{
-return dev_storage + 1528;
+return dev_storage + 1656;
}
}
@@ -43096,7 +45703,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdbw11", 11) == 0)
{
{
-return dev_storage + 1513;
+return dev_storage + 1641;
}
}
@@ -43111,7 +45718,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdbv11", 11) == 0)
{
{
-return dev_storage + 1498;
+return dev_storage + 1626;
}
}
@@ -43126,7 +45733,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdbu11", 11) == 0)
{
{
-return dev_storage + 1483;
+return dev_storage + 1611;
}
}
@@ -43141,7 +45748,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdbt11", 11) == 0)
{
{
-return dev_storage + 1468;
+return dev_storage + 1596;
}
}
@@ -43156,7 +45763,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdbs11", 11) == 0)
{
{
-return dev_storage + 1453;
+return dev_storage + 1581;
}
}
@@ -43171,7 +45778,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdbr11", 11) == 0)
{
{
-return dev_storage + 1438;
+return dev_storage + 1566;
}
}
@@ -43186,7 +45793,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdbq11", 11) == 0)
{
{
-return dev_storage + 1423;
+return dev_storage + 1551;
}
}
@@ -43201,7 +45808,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdbp11", 11) == 0)
{
{
-return dev_storage + 1408;
+return dev_storage + 1536;
}
}
@@ -43216,7 +45823,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdbo11", 11) == 0)
{
{
-return dev_storage + 1393;
+return dev_storage + 1521;
}
}
@@ -43231,7 +45838,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdbn11", 11) == 0)
{
{
-return dev_storage + 1378;
+return dev_storage + 1506;
}
}
@@ -43246,7 +45853,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdbm11", 11) == 0)
{
{
-return dev_storage + 1363;
+return dev_storage + 1491;
}
}
@@ -43261,7 +45868,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdbl11", 11) == 0)
{
{
-return dev_storage + 1348;
+return dev_storage + 1476;
}
}
@@ -43276,7 +45883,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdbk11", 11) == 0)
{
{
-return dev_storage + 1333;
+return dev_storage + 1461;
}
}
@@ -43291,7 +45898,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdbj11", 11) == 0)
{
{
-return dev_storage + 1318;
+return dev_storage + 1446;
}
}
@@ -43306,7 +45913,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdbi11", 11) == 0)
{
{
-return dev_storage + 1303;
+return dev_storage + 1431;
}
}
@@ -43321,7 +45928,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdbh11", 11) == 0)
{
{
-return dev_storage + 1288;
+return dev_storage + 1416;
}
}
@@ -43336,7 +45943,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdbg11", 11) == 0)
{
{
-return dev_storage + 1273;
+return dev_storage + 1401;
}
}
@@ -43351,7 +45958,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdbf11", 11) == 0)
{
{
-return dev_storage + 1258;
+return dev_storage + 1386;
}
}
@@ -43366,7 +45973,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdbe11", 11) == 0)
{
{
-return dev_storage + 1243;
+return dev_storage + 1371;
}
}
@@ -43381,7 +45988,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdbd11", 11) == 0)
{
{
-return dev_storage + 1228;
+return dev_storage + 1356;
}
}
@@ -43396,7 +46003,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdbc11", 11) == 0)
{
{
-return dev_storage + 1213;
+return dev_storage + 1341;
}
}
@@ -43411,7 +46018,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdbb11", 11) == 0)
{
{
-return dev_storage + 1198;
+return dev_storage + 1326;
}
}
@@ -43426,7 +46033,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdba11", 11) == 0)
{
{
-return dev_storage + 1183;
+return dev_storage + 1311;
}
}
@@ -43450,7 +46057,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdaz11", 11) == 0)
{
{
-return dev_storage + 1142;
+return dev_storage + 1270;
}
}
@@ -43465,7 +46072,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sday11", 11) == 0)
{
{
-return dev_storage + 1127;
+return dev_storage + 1255;
}
}
@@ -43480,7 +46087,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdax11", 11) == 0)
{
{
-return dev_storage + 1112;
+return dev_storage + 1240;
}
}
@@ -43495,7 +46102,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdaw11", 11) == 0)
{
{
-return dev_storage + 1097;
+return dev_storage + 1225;
}
}
@@ -43510,7 +46117,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdav11", 11) == 0)
{
{
-return dev_storage + 1082;
+return dev_storage + 1210;
}
}
@@ -43525,7 +46132,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdau11", 11) == 0)
{
{
-return dev_storage + 1067;
+return dev_storage + 1195;
}
}
@@ -43540,7 +46147,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdat11", 11) == 0)
{
{
-return dev_storage + 1052;
+return dev_storage + 1180;
}
}
@@ -43555,7 +46162,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdas11", 11) == 0)
{
{
-return dev_storage + 1037;
+return dev_storage + 1165;
}
}
@@ -43570,7 +46177,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdar11", 11) == 0)
{
{
-return dev_storage + 1022;
+return dev_storage + 1150;
}
}
@@ -43585,7 +46192,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdaq11", 11) == 0)
{
{
-return dev_storage + 1007;
+return dev_storage + 1135;
}
}
@@ -43600,7 +46207,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdap11", 11) == 0)
{
{
-return dev_storage + 992;
+return dev_storage + 1120;
}
}
@@ -43615,7 +46222,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdao11", 11) == 0)
{
{
-return dev_storage + 977;
+return dev_storage + 1105;
}
}
@@ -43630,7 +46237,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdan11", 11) == 0)
{
{
-return dev_storage + 962;
+return dev_storage + 1090;
}
}
@@ -43645,7 +46252,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdam11", 11) == 0)
{
{
-return dev_storage + 947;
+return dev_storage + 1075;
}
}
@@ -43660,7 +46267,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdal11", 11) == 0)
{
{
-return dev_storage + 932;
+return dev_storage + 1060;
}
}
@@ -43675,7 +46282,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdak11", 11) == 0)
{
{
-return dev_storage + 917;
+return dev_storage + 1045;
}
}
@@ -43690,7 +46297,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdaj11", 11) == 0)
{
{
-return dev_storage + 902;
+return dev_storage + 1030;
}
}
@@ -43705,7 +46312,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdai11", 11) == 0)
{
{
-return dev_storage + 887;
+return dev_storage + 1015;
}
}
@@ -43720,7 +46327,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdah11", 11) == 0)
{
{
-return dev_storage + 872;
+return dev_storage + 1000;
}
}
@@ -43735,7 +46342,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdag11", 11) == 0)
{
{
-return dev_storage + 857;
+return dev_storage + 985;
}
}
@@ -43750,7 +46357,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdaf11", 11) == 0)
{
{
-return dev_storage + 842;
+return dev_storage + 970;
}
}
@@ -43765,7 +46372,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdae11", 11) == 0)
{
{
-return dev_storage + 827;
+return dev_storage + 955;
}
}
@@ -43780,7 +46387,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdad11", 11) == 0)
{
{
-return dev_storage + 812;
+return dev_storage + 940;
}
}
@@ -43795,7 +46402,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdac11", 11) == 0)
{
{
-return dev_storage + 797;
+return dev_storage + 925;
}
}
@@ -43810,7 +46417,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdab11", 11) == 0)
{
{
-return dev_storage + 782;
+return dev_storage + 910;
}
}
@@ -43825,7 +46432,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdaa11", 11) == 0)
{
{
-return dev_storage + 767;
+return dev_storage + 895;
}
}
@@ -43858,7 +46465,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/ttyS60", 11) == 0)
{
{
-return dev_storage + 2568;
+return dev_storage + 2696;
}
}
@@ -43873,7 +46480,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/ttyS50", 11) == 0)
{
{
-return dev_storage + 2558;
+return dev_storage + 2686;
}
}
@@ -43888,7 +46495,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/ttyS40", 11) == 0)
{
{
-return dev_storage + 2548;
+return dev_storage + 2676;
}
}
@@ -43903,7 +46510,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/ttyS30", 11) == 0)
{
{
-return dev_storage + 2538;
+return dev_storage + 2666;
}
}
@@ -43915,25 +46522,88 @@ return NULL;
}
}
case '2':
- if (strncmp (KR_keyword, "/dev/ttyS20", 11) == 0)
+ switch (KR_keyword [5])
{
+ case 't':
+ if (strncmp (KR_keyword, "/dev/ttyS20", 11) == 0)
+ {
{
-return dev_storage + 2528;
+return dev_storage + 2656;
+
+}
+ }
+ else
+ {
+{
+return NULL;
+
+}
+ }
+ case 'p':
+ if (strncmp (KR_keyword, "/dev/pty120", 11) == 0)
+ {
+{
+return dev_storage + 418;
+
+}
+ }
+ else
+ {
+{
+return NULL;
+
+}
+ }
+ default:
+{
+return NULL;
}
}
- else
+ case '1':
+ switch (KR_keyword [5])
{
+ case 't':
+ if (strncmp (KR_keyword, "/dev/ttyS10", 11) == 0)
+ {
+{
+return dev_storage + 2646;
+
+}
+ }
+ else
+ {
+{
+return NULL;
+
+}
+ }
+ case 'p':
+ if (strncmp (KR_keyword, "/dev/pty110", 11) == 0)
+ {
+{
+return dev_storage + 408;
+
+}
+ }
+ else
+ {
+{
+return NULL;
+
+}
+ }
+ default:
{
return NULL;
}
}
- case '1':
- if (strncmp (KR_keyword, "/dev/ttyS10", 11) == 0)
+ case '0':
+ if (strncmp (KR_keyword, "/dev/pty100", 11) == 0)
{
{
-return dev_storage + 2518;
+return dev_storage + 398;
}
}
@@ -43957,7 +46627,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/nst120", 11) == 0)
{
{
-return dev_storage + 224;
+return dev_storage + 288;
}
}
@@ -43972,7 +46642,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/nst110", 11) == 0)
{
{
-return dev_storage + 214;
+return dev_storage + 278;
}
}
@@ -43987,7 +46657,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/nst100", 11) == 0)
{
{
-return dev_storage + 204;
+return dev_storage + 268;
}
}
@@ -44007,6 +46677,51 @@ return NULL;
case 'n':
switch (KR_keyword [9])
{
+ case '9':
+ if (strncmp (KR_keyword, "/dev/cons90", 11) == 0)
+ {
+{
+return dev_storage + 110;
+
+}
+ }
+ else
+ {
+{
+return NULL;
+
+}
+ }
+ case '8':
+ if (strncmp (KR_keyword, "/dev/cons80", 11) == 0)
+ {
+{
+return dev_storage + 100;
+
+}
+ }
+ else
+ {
+{
+return NULL;
+
+}
+ }
+ case '7':
+ if (strncmp (KR_keyword, "/dev/cons70", 11) == 0)
+ {
+{
+return dev_storage + 90;
+
+}
+ }
+ else
+ {
+{
+return NULL;
+
+}
+ }
case '6':
if (strncmp (KR_keyword, "/dev/cons60", 11) == 0)
{
@@ -44110,7 +46825,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sddx10", 11) == 0)
{
{
-return dev_storage + 2357;
+return dev_storage + 2485;
}
}
@@ -44125,7 +46840,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sddw10", 11) == 0)
{
{
-return dev_storage + 2342;
+return dev_storage + 2470;
}
}
@@ -44140,7 +46855,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sddv10", 11) == 0)
{
{
-return dev_storage + 2327;
+return dev_storage + 2455;
}
}
@@ -44155,7 +46870,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sddu10", 11) == 0)
{
{
-return dev_storage + 2312;
+return dev_storage + 2440;
}
}
@@ -44170,7 +46885,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sddt10", 11) == 0)
{
{
-return dev_storage + 2297;
+return dev_storage + 2425;
}
}
@@ -44185,7 +46900,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdds10", 11) == 0)
{
{
-return dev_storage + 2282;
+return dev_storage + 2410;
}
}
@@ -44200,7 +46915,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sddr10", 11) == 0)
{
{
-return dev_storage + 2267;
+return dev_storage + 2395;
}
}
@@ -44215,7 +46930,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sddq10", 11) == 0)
{
{
-return dev_storage + 2252;
+return dev_storage + 2380;
}
}
@@ -44230,7 +46945,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sddp10", 11) == 0)
{
{
-return dev_storage + 2237;
+return dev_storage + 2365;
}
}
@@ -44245,7 +46960,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sddo10", 11) == 0)
{
{
-return dev_storage + 2222;
+return dev_storage + 2350;
}
}
@@ -44260,7 +46975,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sddn10", 11) == 0)
{
{
-return dev_storage + 2207;
+return dev_storage + 2335;
}
}
@@ -44275,7 +46990,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sddm10", 11) == 0)
{
{
-return dev_storage + 2192;
+return dev_storage + 2320;
}
}
@@ -44290,7 +47005,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sddl10", 11) == 0)
{
{
-return dev_storage + 2177;
+return dev_storage + 2305;
}
}
@@ -44305,7 +47020,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sddk10", 11) == 0)
{
{
-return dev_storage + 2162;
+return dev_storage + 2290;
}
}
@@ -44320,7 +47035,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sddj10", 11) == 0)
{
{
-return dev_storage + 2147;
+return dev_storage + 2275;
}
}
@@ -44335,7 +47050,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sddi10", 11) == 0)
{
{
-return dev_storage + 2132;
+return dev_storage + 2260;
}
}
@@ -44350,7 +47065,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sddh10", 11) == 0)
{
{
-return dev_storage + 2117;
+return dev_storage + 2245;
}
}
@@ -44365,7 +47080,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sddg10", 11) == 0)
{
{
-return dev_storage + 2102;
+return dev_storage + 2230;
}
}
@@ -44380,7 +47095,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sddf10", 11) == 0)
{
{
-return dev_storage + 2087;
+return dev_storage + 2215;
}
}
@@ -44395,7 +47110,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdde10", 11) == 0)
{
{
-return dev_storage + 2072;
+return dev_storage + 2200;
}
}
@@ -44410,7 +47125,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sddd10", 11) == 0)
{
{
-return dev_storage + 2057;
+return dev_storage + 2185;
}
}
@@ -44425,7 +47140,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sddc10", 11) == 0)
{
{
-return dev_storage + 2042;
+return dev_storage + 2170;
}
}
@@ -44440,7 +47155,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sddb10", 11) == 0)
{
{
-return dev_storage + 2027;
+return dev_storage + 2155;
}
}
@@ -44455,7 +47170,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdda10", 11) == 0)
{
{
-return dev_storage + 2012;
+return dev_storage + 2140;
}
}
@@ -44479,7 +47194,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdcz10", 11) == 0)
{
{
-return dev_storage + 1973;
+return dev_storage + 2101;
}
}
@@ -44494,7 +47209,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdcy10", 11) == 0)
{
{
-return dev_storage + 1958;
+return dev_storage + 2086;
}
}
@@ -44509,7 +47224,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdcx10", 11) == 0)
{
{
-return dev_storage + 1943;
+return dev_storage + 2071;
}
}
@@ -44524,7 +47239,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdcw10", 11) == 0)
{
{
-return dev_storage + 1928;
+return dev_storage + 2056;
}
}
@@ -44539,7 +47254,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdcv10", 11) == 0)
{
{
-return dev_storage + 1913;
+return dev_storage + 2041;
}
}
@@ -44554,7 +47269,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdcu10", 11) == 0)
{
{
-return dev_storage + 1898;
+return dev_storage + 2026;
}
}
@@ -44569,7 +47284,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdct10", 11) == 0)
{
{
-return dev_storage + 1883;
+return dev_storage + 2011;
}
}
@@ -44584,7 +47299,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdcs10", 11) == 0)
{
{
-return dev_storage + 1868;
+return dev_storage + 1996;
}
}
@@ -44599,7 +47314,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdcr10", 11) == 0)
{
{
-return dev_storage + 1853;
+return dev_storage + 1981;
}
}
@@ -44614,7 +47329,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdcq10", 11) == 0)
{
{
-return dev_storage + 1838;
+return dev_storage + 1966;
}
}
@@ -44629,7 +47344,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdcp10", 11) == 0)
{
{
-return dev_storage + 1823;
+return dev_storage + 1951;
}
}
@@ -44644,7 +47359,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdco10", 11) == 0)
{
{
-return dev_storage + 1808;
+return dev_storage + 1936;
}
}
@@ -44659,7 +47374,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdcn10", 11) == 0)
{
{
-return dev_storage + 1793;
+return dev_storage + 1921;
}
}
@@ -44674,7 +47389,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdcm10", 11) == 0)
{
{
-return dev_storage + 1778;
+return dev_storage + 1906;
}
}
@@ -44689,7 +47404,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdcl10", 11) == 0)
{
{
-return dev_storage + 1763;
+return dev_storage + 1891;
}
}
@@ -44704,7 +47419,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdck10", 11) == 0)
{
{
-return dev_storage + 1748;
+return dev_storage + 1876;
}
}
@@ -44719,7 +47434,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdcj10", 11) == 0)
{
{
-return dev_storage + 1733;
+return dev_storage + 1861;
}
}
@@ -44734,7 +47449,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdci10", 11) == 0)
{
{
-return dev_storage + 1718;
+return dev_storage + 1846;
}
}
@@ -44749,7 +47464,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdch10", 11) == 0)
{
{
-return dev_storage + 1703;
+return dev_storage + 1831;
}
}
@@ -44764,7 +47479,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdcg10", 11) == 0)
{
{
-return dev_storage + 1688;
+return dev_storage + 1816;
}
}
@@ -44779,7 +47494,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdcf10", 11) == 0)
{
{
-return dev_storage + 1673;
+return dev_storage + 1801;
}
}
@@ -44794,7 +47509,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdce10", 11) == 0)
{
{
-return dev_storage + 1658;
+return dev_storage + 1786;
}
}
@@ -44809,7 +47524,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdcd10", 11) == 0)
{
{
-return dev_storage + 1643;
+return dev_storage + 1771;
}
}
@@ -44824,7 +47539,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdcc10", 11) == 0)
{
{
-return dev_storage + 1628;
+return dev_storage + 1756;
}
}
@@ -44839,7 +47554,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdcb10", 11) == 0)
{
{
-return dev_storage + 1613;
+return dev_storage + 1741;
}
}
@@ -44854,7 +47569,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdca10", 11) == 0)
{
{
-return dev_storage + 1598;
+return dev_storage + 1726;
}
}
@@ -44878,7 +47593,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdbz10", 11) == 0)
{
{
-return dev_storage + 1557;
+return dev_storage + 1685;
}
}
@@ -44893,7 +47608,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdby10", 11) == 0)
{
{
-return dev_storage + 1542;
+return dev_storage + 1670;
}
}
@@ -44908,7 +47623,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdbx10", 11) == 0)
{
{
-return dev_storage + 1527;
+return dev_storage + 1655;
}
}
@@ -44923,7 +47638,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdbw10", 11) == 0)
{
{
-return dev_storage + 1512;
+return dev_storage + 1640;
}
}
@@ -44938,7 +47653,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdbv10", 11) == 0)
{
{
-return dev_storage + 1497;
+return dev_storage + 1625;
}
}
@@ -44953,7 +47668,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdbu10", 11) == 0)
{
{
-return dev_storage + 1482;
+return dev_storage + 1610;
}
}
@@ -44968,7 +47683,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdbt10", 11) == 0)
{
{
-return dev_storage + 1467;
+return dev_storage + 1595;
}
}
@@ -44983,7 +47698,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdbs10", 11) == 0)
{
{
-return dev_storage + 1452;
+return dev_storage + 1580;
}
}
@@ -44998,7 +47713,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdbr10", 11) == 0)
{
{
-return dev_storage + 1437;
+return dev_storage + 1565;
}
}
@@ -45013,7 +47728,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdbq10", 11) == 0)
{
{
-return dev_storage + 1422;
+return dev_storage + 1550;
}
}
@@ -45028,7 +47743,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdbp10", 11) == 0)
{
{
-return dev_storage + 1407;
+return dev_storage + 1535;
}
}
@@ -45043,7 +47758,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdbo10", 11) == 0)
{
{
-return dev_storage + 1392;
+return dev_storage + 1520;
}
}
@@ -45058,7 +47773,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdbn10", 11) == 0)
{
{
-return dev_storage + 1377;
+return dev_storage + 1505;
}
}
@@ -45073,7 +47788,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdbm10", 11) == 0)
{
{
-return dev_storage + 1362;
+return dev_storage + 1490;
}
}
@@ -45088,7 +47803,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdbl10", 11) == 0)
{
{
-return dev_storage + 1347;
+return dev_storage + 1475;
}
}
@@ -45103,7 +47818,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdbk10", 11) == 0)
{
{
-return dev_storage + 1332;
+return dev_storage + 1460;
}
}
@@ -45118,7 +47833,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdbj10", 11) == 0)
{
{
-return dev_storage + 1317;
+return dev_storage + 1445;
}
}
@@ -45133,7 +47848,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdbi10", 11) == 0)
{
{
-return dev_storage + 1302;
+return dev_storage + 1430;
}
}
@@ -45148,7 +47863,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdbh10", 11) == 0)
{
{
-return dev_storage + 1287;
+return dev_storage + 1415;
}
}
@@ -45163,7 +47878,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdbg10", 11) == 0)
{
{
-return dev_storage + 1272;
+return dev_storage + 1400;
}
}
@@ -45178,7 +47893,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdbf10", 11) == 0)
{
{
-return dev_storage + 1257;
+return dev_storage + 1385;
}
}
@@ -45193,7 +47908,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdbe10", 11) == 0)
{
{
-return dev_storage + 1242;
+return dev_storage + 1370;
}
}
@@ -45208,7 +47923,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdbd10", 11) == 0)
{
{
-return dev_storage + 1227;
+return dev_storage + 1355;
}
}
@@ -45223,7 +47938,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdbc10", 11) == 0)
{
{
-return dev_storage + 1212;
+return dev_storage + 1340;
}
}
@@ -45238,7 +47953,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdbb10", 11) == 0)
{
{
-return dev_storage + 1197;
+return dev_storage + 1325;
}
}
@@ -45253,7 +47968,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdba10", 11) == 0)
{
{
-return dev_storage + 1182;
+return dev_storage + 1310;
}
}
@@ -45277,7 +47992,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdaz10", 11) == 0)
{
{
-return dev_storage + 1141;
+return dev_storage + 1269;
}
}
@@ -45292,7 +48007,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sday10", 11) == 0)
{
{
-return dev_storage + 1126;
+return dev_storage + 1254;
}
}
@@ -45307,7 +48022,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdax10", 11) == 0)
{
{
-return dev_storage + 1111;
+return dev_storage + 1239;
}
}
@@ -45322,7 +48037,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdaw10", 11) == 0)
{
{
-return dev_storage + 1096;
+return dev_storage + 1224;
}
}
@@ -45337,7 +48052,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdav10", 11) == 0)
{
{
-return dev_storage + 1081;
+return dev_storage + 1209;
}
}
@@ -45352,7 +48067,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdau10", 11) == 0)
{
{
-return dev_storage + 1066;
+return dev_storage + 1194;
}
}
@@ -45367,7 +48082,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdat10", 11) == 0)
{
{
-return dev_storage + 1051;
+return dev_storage + 1179;
}
}
@@ -45382,7 +48097,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdas10", 11) == 0)
{
{
-return dev_storage + 1036;
+return dev_storage + 1164;
}
}
@@ -45397,7 +48112,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdar10", 11) == 0)
{
{
-return dev_storage + 1021;
+return dev_storage + 1149;
}
}
@@ -45412,7 +48127,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdaq10", 11) == 0)
{
{
-return dev_storage + 1006;
+return dev_storage + 1134;
}
}
@@ -45427,7 +48142,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdap10", 11) == 0)
{
{
-return dev_storage + 991;
+return dev_storage + 1119;
}
}
@@ -45442,7 +48157,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdao10", 11) == 0)
{
{
-return dev_storage + 976;
+return dev_storage + 1104;
}
}
@@ -45457,7 +48172,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdan10", 11) == 0)
{
{
-return dev_storage + 961;
+return dev_storage + 1089;
}
}
@@ -45472,7 +48187,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdam10", 11) == 0)
{
{
-return dev_storage + 946;
+return dev_storage + 1074;
}
}
@@ -45487,7 +48202,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdal10", 11) == 0)
{
{
-return dev_storage + 931;
+return dev_storage + 1059;
}
}
@@ -45502,7 +48217,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdak10", 11) == 0)
{
{
-return dev_storage + 916;
+return dev_storage + 1044;
}
}
@@ -45517,7 +48232,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdaj10", 11) == 0)
{
{
-return dev_storage + 901;
+return dev_storage + 1029;
}
}
@@ -45532,7 +48247,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdai10", 11) == 0)
{
{
-return dev_storage + 886;
+return dev_storage + 1014;
}
}
@@ -45547,7 +48262,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdah10", 11) == 0)
{
{
-return dev_storage + 871;
+return dev_storage + 999;
}
}
@@ -45562,7 +48277,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdag10", 11) == 0)
{
{
-return dev_storage + 856;
+return dev_storage + 984;
}
}
@@ -45577,7 +48292,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdaf10", 11) == 0)
{
{
-return dev_storage + 841;
+return dev_storage + 969;
}
}
@@ -45592,7 +48307,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdae10", 11) == 0)
{
{
-return dev_storage + 826;
+return dev_storage + 954;
}
}
@@ -45607,7 +48322,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdad10", 11) == 0)
{
{
-return dev_storage + 811;
+return dev_storage + 939;
}
}
@@ -45622,7 +48337,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdac10", 11) == 0)
{
{
-return dev_storage + 796;
+return dev_storage + 924;
}
}
@@ -45637,7 +48352,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdab10", 11) == 0)
{
{
-return dev_storage + 781;
+return dev_storage + 909;
}
}
@@ -45652,7 +48367,7 @@ return NULL;
if (strncmp (KR_keyword, "/dev/sdaa10", 11) == 0)
{
{
-return dev_storage + 766;
+return dev_storage + 894;
}
}
@@ -45682,13 +48397,13 @@ return NULL;
}
}
case 12:
- switch (KR_keyword [5])
+ switch (KR_keyword [10])
{
case 'w':
if (strncmp (KR_keyword, "/dev/windows", 12) == 0)
{
{
-return dev_storage + 2573;
+return dev_storage + 2701;
}
}
@@ -45699,11 +48414,11 @@ return NULL;
}
}
- case 'u':
+ case 'o':
if (strncmp (KR_keyword, "/dev/urandom", 12) == 0)
{
{
-return dev_storage + 2572;
+return dev_storage + 2700;
}
}
@@ -45714,11 +48429,11 @@ return NULL;
}
}
- case 'c':
+ case 'l':
if (strncmp (KR_keyword, "/dev/console", 12) == 0)
{
{
-return dev_storage + 84;
+return dev_storage + 148;
}
}
@@ -45729,6 +48444,453 @@ return NULL;
}
}
+ case '2':
+ switch (KR_keyword [11])
+ {
+ case '7':
+ if (strncmp (KR_keyword, "/dev/cons127", 12) == 0)
+ {
+{
+return dev_storage + 147;
+
+}
+ }
+ else
+ {
+{
+return NULL;
+
+}
+ }
+ case '6':
+ if (strncmp (KR_keyword, "/dev/cons126", 12) == 0)
+ {
+{
+return dev_storage + 146;
+
+}
+ }
+ else
+ {
+{
+return NULL;
+
+}
+ }
+ case '5':
+ if (strncmp (KR_keyword, "/dev/cons125", 12) == 0)
+ {
+{
+return dev_storage + 145;
+
+}
+ }
+ else
+ {
+{
+return NULL;
+
+}
+ }
+ case '4':
+ if (strncmp (KR_keyword, "/dev/cons124", 12) == 0)
+ {
+{
+return dev_storage + 144;
+
+}
+ }
+ else
+ {
+{
+return NULL;
+
+}
+ }
+ case '3':
+ if (strncmp (KR_keyword, "/dev/cons123", 12) == 0)
+ {
+{
+return dev_storage + 143;
+
+}
+ }
+ else
+ {
+{
+return NULL;
+
+}
+ }
+ case '2':
+ if (strncmp (KR_keyword, "/dev/cons122", 12) == 0)
+ {
+{
+return dev_storage + 142;
+
+}
+ }
+ else
+ {
+{
+return NULL;
+
+}
+ }
+ case '1':
+ if (strncmp (KR_keyword, "/dev/cons121", 12) == 0)
+ {
+{
+return dev_storage + 141;
+
+}
+ }
+ else
+ {
+{
+return NULL;
+
+}
+ }
+ case '0':
+ if (strncmp (KR_keyword, "/dev/cons120", 12) == 0)
+ {
+{
+return dev_storage + 140;
+
+}
+ }
+ else
+ {
+{
+return NULL;
+
+}
+ }
+ default:
+{
+return NULL;
+
+}
+ }
+ case '1':
+ switch (KR_keyword [11])
+ {
+ case '9':
+ if (strncmp (KR_keyword, "/dev/cons119", 12) == 0)
+ {
+{
+return dev_storage + 139;
+
+}
+ }
+ else
+ {
+{
+return NULL;
+
+}
+ }
+ case '8':
+ if (strncmp (KR_keyword, "/dev/cons118", 12) == 0)
+ {
+{
+return dev_storage + 138;
+
+}
+ }
+ else
+ {
+{
+return NULL;
+
+}
+ }
+ case '7':
+ if (strncmp (KR_keyword, "/dev/cons117", 12) == 0)
+ {
+{
+return dev_storage + 137;
+
+}
+ }
+ else
+ {
+{
+return NULL;
+
+}
+ }
+ case '6':
+ if (strncmp (KR_keyword, "/dev/cons116", 12) == 0)
+ {
+{
+return dev_storage + 136;
+
+}
+ }
+ else
+ {
+{
+return NULL;
+
+}
+ }
+ case '5':
+ if (strncmp (KR_keyword, "/dev/cons115", 12) == 0)
+ {
+{
+return dev_storage + 135;
+
+}
+ }
+ else
+ {
+{
+return NULL;
+
+}
+ }
+ case '4':
+ if (strncmp (KR_keyword, "/dev/cons114", 12) == 0)
+ {
+{
+return dev_storage + 134;
+
+}
+ }
+ else
+ {
+{
+return NULL;
+
+}
+ }
+ case '3':
+ if (strncmp (KR_keyword, "/dev/cons113", 12) == 0)
+ {
+{
+return dev_storage + 133;
+
+}
+ }
+ else
+ {
+{
+return NULL;
+
+}
+ }
+ case '2':
+ if (strncmp (KR_keyword, "/dev/cons112", 12) == 0)
+ {
+{
+return dev_storage + 132;
+
+}
+ }
+ else
+ {
+{
+return NULL;
+
+}
+ }
+ case '1':
+ if (strncmp (KR_keyword, "/dev/cons111", 12) == 0)
+ {
+{
+return dev_storage + 131;
+
+}
+ }
+ else
+ {
+{
+return NULL;
+
+}
+ }
+ case '0':
+ if (strncmp (KR_keyword, "/dev/cons110", 12) == 0)
+ {
+{
+return dev_storage + 130;
+
+}
+ }
+ else
+ {
+{
+return NULL;
+
+}
+ }
+ default:
+{
+return NULL;
+
+}
+ }
+ case '0':
+ switch (KR_keyword [11])
+ {
+ case '9':
+ if (strncmp (KR_keyword, "/dev/cons109", 12) == 0)
+ {
+{
+return dev_storage + 129;
+
+}
+ }
+ else
+ {
+{
+return NULL;
+
+}
+ }
+ case '8':
+ if (strncmp (KR_keyword, "/dev/cons108", 12) == 0)
+ {
+{
+return dev_storage + 128;
+
+}
+ }
+ else
+ {
+{
+return NULL;
+
+}
+ }
+ case '7':
+ if (strncmp (KR_keyword, "/dev/cons107", 12) == 0)
+ {
+{
+return dev_storage + 127;
+
+}
+ }
+ else
+ {
+{
+return NULL;
+
+}
+ }
+ case '6':
+ if (strncmp (KR_keyword, "/dev/cons106", 12) == 0)
+ {
+{
+return dev_storage + 126;
+
+}
+ }
+ else
+ {
+{
+return NULL;
+
+}
+ }
+ case '5':
+ if (strncmp (KR_keyword, "/dev/cons105", 12) == 0)
+ {
+{
+return dev_storage + 125;
+
+}
+ }
+ else
+ {
+{
+return NULL;
+
+}
+ }
+ case '4':
+ if (strncmp (KR_keyword, "/dev/cons104", 12) == 0)
+ {
+{
+return dev_storage + 124;
+
+}
+ }
+ else
+ {
+{
+return NULL;
+
+}
+ }
+ case '3':
+ if (strncmp (KR_keyword, "/dev/cons103", 12) == 0)
+ {
+{
+return dev_storage + 123;
+
+}
+ }
+ else
+ {
+{
+return NULL;
+
+}
+ }
+ case '2':
+ if (strncmp (KR_keyword, "/dev/cons102", 12) == 0)
+ {
+{
+return dev_storage + 122;
+
+}
+ }
+ else
+ {
+{
+return NULL;
+
+}
+ }
+ case '1':
+ if (strncmp (KR_keyword, "/dev/cons101", 12) == 0)
+ {
+{
+return dev_storage + 121;
+
+}
+ }
+ else
+ {
+{
+return NULL;
+
+}
+ }
+ case '0':
+ if (strncmp (KR_keyword, "/dev/cons100", 12) == 0)
+ {
+{
+return dev_storage + 120;
+
+}
+ }
+ else
+ {
+{
+return NULL;
+
+}
+ }
+ default:
+{
+return NULL;
+
+}
+ }
default:
{
return NULL;
diff --git a/winsup/cygwin/devices.h b/winsup/cygwin/devices.h
index 21120bdfc..991fd0538 100644
--- a/winsup/cygwin/devices.h
+++ b/winsup/cygwin/devices.h
@@ -13,7 +13,6 @@ details. */
typedef unsigned short _major_t;
typedef unsigned short _minor_t;
-typedef mode_t _mode_t;
#define FHDEV(maj, min) ((((unsigned) (maj)) << (sizeof (_major_t) * 8)) | (unsigned) (min))
#define _minor(dev) ((dev) & ((1 << (sizeof (_minor_t) * 8)) - 1))
@@ -271,7 +270,7 @@ struct device
} d;
const char *native;
int (*exists_func) (const device&);
- _mode_t mode;
+ __mode_t mode;
bool lives_in_dev:4;
bool dev_on_fs:4;
static const device *lookup (const char *, unsigned int = UINT32_MAX);
diff --git a/winsup/cygwin/devices.in b/winsup/cygwin/devices.in
index 785aff0bf..c337053bb 100644
--- a/winsup/cygwin/devices.in
+++ b/winsup/cygwin/devices.in
@@ -87,7 +87,7 @@ exists_pty (const device& dev)
}
const device dev_cygdrive_storage =
- {"/cygdrive", {FH_CYGDRIVE}, "/cygdrive", exists};
+ {"/cygdrive", {FH_CYGDRIVE}, "", exists};
const device dev_fs_storage =
{"", {FH_FS}, "", exists};
@@ -140,23 +140,23 @@ const device dev_error_storage =
/* Internal devices below are prefixed with a ":". This moves them out of
the POSIX namespace. */
%%
-"/dev", BRACK(FH_DEV), "/dev", exists, S_IFDIR
+"/dev", BRACK(FH_DEV), "", exists, S_IFDIR
"/dev/tty", BRACK(FH_TTY), "/dev/tty", exists, S_IFCHR
-"/dev/pty%(0-63)d", BRACK(FHDEV(DEV_PTYS_MAJOR, {$1})), "/dev/pty{$1}", exists_pty, S_IFCHR, =ptys_dev
-":ptym%(0-63)d", BRACK(FHDEV(DEV_PTYM_MAJOR, {$1})), "/dev/ptym{$1}", exists_internal, S_IFCHR, =ptym_dev
-"/dev/cons%(0-63)d", BRACK(FHDEV(DEV_CONS_MAJOR, {$1})), "/dev/cons{$1}", exists_console, S_IFCHR, =cons_dev
+"/dev/pty%(0-127)d", BRACK(FHDEV(DEV_PTYS_MAJOR, {$1})), "/dev/pty{$1}", exists_pty, S_IFCHR, =ptys_dev
+":ptym%(0-127)d", BRACK(FHDEV(DEV_PTYM_MAJOR, {$1})), "/dev/ptym{$1}", exists_internal, S_IFCHR, =ptym_dev
+"/dev/cons%(0-127)d", BRACK(FHDEV(DEV_CONS_MAJOR, {$1})), "/dev/cons{$1}", exists_console, S_IFCHR, =cons_dev
"/dev/console", BRACK(FH_CONSOLE), "/dev/console", exists_console, S_IFCHR, =console_dev
"/dev/ptmx", BRACK(FH_PTMX), "/dev/ptmx", exists, S_IFCHR
-"/dev/windows", BRACK(FH_WINDOWS), "/dev/windows", exists, S_IFCHR
-"/dev/dsp", BRACK(FH_OSS_DSP), "/dev/dsp", exists, S_IFCHR
+"/dev/windows", BRACK(FH_WINDOWS), "\\Device\\Null", exists_ntdev, S_IFCHR
+"/dev/dsp", BRACK(FH_OSS_DSP), "\\Device\\Null", exists_ntdev, S_IFCHR
"/dev/conin", BRACK(FH_CONIN), "/dev/conin", exists_console, S_IFCHR
"/dev/conout", BRACK(FH_CONOUT), "/dev/conout", exists_console, S_IFCHR
"/dev/null", BRACK(FH_NULL), "\\Device\\Null", exists_ntdev, S_IFCHR
-"/dev/zero", BRACK(FH_ZERO), "/dev/zero", exists, S_IFCHR
-"/dev/full", BRACK(FH_FULL), "/dev/full", exists, S_IFCHR
-"/dev/random", BRACK(FH_RANDOM), "/dev/random", exists, S_IFCHR
-"/dev/urandom", BRACK(FH_URANDOM), "/dev/urandom", exists, S_IFCHR, =urandom_dev
-"/dev/clipboard", BRACK(FH_CLIPBOARD), "/dev/clipboard", exists, S_IFCHR
+"/dev/zero", BRACK(FH_ZERO), "\\Device\\Null", exists_ntdev, S_IFCHR
+"/dev/full", BRACK(FH_FULL), "\\Device\\Null", exists_ntdev, S_IFCHR
+"/dev/random", BRACK(FH_RANDOM), "\\Device\\Null", exists_ntdev, S_IFCHR
+"/dev/urandom", BRACK(FH_URANDOM), "\\Device\\Null", exists_ntdev, S_IFCHR, =urandom_dev
+"/dev/clipboard", BRACK(FH_CLIPBOARD), "\\Device\\Null", exists_ntdev, S_IFCHR
"/dev/com%(1-16)d", BRACK(FHDEV(DEV_SERIAL_MAJOR, {$1 - 1})), "\\??\\COM{$1}", exists_ntdev_silent, S_IFCHR
"/dev/ttyS%(0-63)d", BRACK(FHDEV(DEV_SERIAL_MAJOR, {$1})), "\\??\\COM{$1 + 1}", exists_ntdev, S_IFCHR
":pipe", BRACK(FH_PIPE), "/dev/pipe", exists_internal, S_IFCHR
diff --git a/winsup/cygwin/dir.cc b/winsup/cygwin/dir.cc
index 478a41862..f43eae461 100644
--- a/winsup/cygwin/dir.cc
+++ b/winsup/cygwin/dir.cc
@@ -1,8 +1,5 @@
/* dir.cc: Posix directory-related routines
- Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008, 2009, 2010, 2011, 2012 Red Hat, Inc.
-
This file is part of Cygwin.
This software is a copyrighted work licensed under the terms of the
@@ -28,16 +25,16 @@ details. */
extern "C" int
dirfd (DIR *dir)
{
- myfault efault;
- if (efault.faulted (EFAULT))
- return -1;
- if (dir->__d_cookie != __DIRENT_COOKIE)
+ __try
{
- set_errno (EBADF);
+ if (dir->__d_cookie == __DIRENT_COOKIE)
+ return dir->__d_fd;
syscall_printf ("-1 = dirfd (%p)", dir);
- return -1;
+ set_errno (EINVAL);
}
- return dir->__d_fd;
+ __except (EFAULT) {}
+ __endtry
+ return -1;
}
/* Symbol kept for backward compatibility. Don't remove. Don't declare
@@ -58,6 +55,11 @@ opendir (const char *name)
fh = build_fh_name (name, PC_SYM_FOLLOW);
if (!fh)
res = NULL;
+ else if (fh->error ())
+ {
+ set_errno (fh->error ());
+ res = NULL;
+ }
else if (fh->exists ())
res = fh->opendir (-1);
else
@@ -68,6 +70,9 @@ opendir (const char *name)
if (!res && fh)
delete fh;
+ /* Applications calling flock(2) on dirfd(fd) need this... */
+ if (res && !fh->nohandle ())
+ fh->set_unique_id ();
return res;
}
@@ -85,79 +90,86 @@ fdopendir (int fd)
static int
readdir_worker (DIR *dir, dirent *de)
{
- myfault efault;
- if (efault.faulted ())
- return EFAULT;
-
- if (dir->__d_cookie != __DIRENT_COOKIE)
- {
- syscall_printf ("%p = readdir (%p)", NULL, dir);
- return EBADF;
- }
-
- de->d_ino = 0;
- de->d_type = DT_UNKNOWN;
- memset (&de->__d_unused1, 0, sizeof (de->__d_unused1));
+ int res = 0;
- int res = ((fhandler_base *) dir->__fh)->readdir (dir, de);
-
- if (res == ENMFILE)
+ __try
{
- if (!(dir->__flags & dirent_saw_dot))
- {
- strcpy (de->d_name, ".");
- dir->__flags |= dirent_saw_dot;
- dir->__d_position++;
- res = 0;
- }
- else if (!(dir->__flags & dirent_saw_dot_dot))
+ if (dir->__d_cookie != __DIRENT_COOKIE)
{
- strcpy (de->d_name, "..");
- dir->__flags |= dirent_saw_dot_dot;
- dir->__d_position++;
- res = 0;
+ syscall_printf ("%p = readdir (%p)", NULL, dir);
+ res = EBADF;
+ __leave;
}
- }
- if (!res && !de->d_ino)
- {
- bool is_dot = false;
- bool is_dot_dot = false;
+ de->d_ino = 0;
+ de->d_type = DT_UNKNOWN;
+ memset (&de->__d_unused1, 0, sizeof (de->__d_unused1));
- if (de->d_name[0] == '.')
+ res = ((fhandler_base *) dir->__fh)->readdir (dir, de);
+
+ if (res == ENMFILE)
{
- if (de->d_name[1] == '\0')
- is_dot = true;
- else if (de->d_name[1] == '.' && de->d_name[2] == '\0')
- is_dot_dot = true;
+ if (!(dir->__flags & dirent_saw_dot))
+ {
+ strcpy (de->d_name, ".");
+ dir->__flags |= dirent_saw_dot;
+ dir->__d_position++;
+ res = 0;
+ }
+ else if (!(dir->__flags & dirent_saw_dot_dot))
+ {
+ strcpy (de->d_name, "..");
+ dir->__flags |= dirent_saw_dot_dot;
+ dir->__d_position++;
+ res = 0;
+ }
}
- if (is_dot_dot && !(dir->__flags & dirent_isroot))
- de->d_ino = readdir_get_ino (((fhandler_base *) dir->__fh)->get_name (),
- true);
- else
+ if (!res && !de->d_ino)
{
- /* Compute d_ino by combining filename hash with directory hash. */
- de->d_ino = ((fhandler_base *) dir->__fh)->get_ino ();
- if (!is_dot && !is_dot_dot)
+ bool is_dot = false;
+ bool is_dot_dot = false;
+
+ if (de->d_name[0] == '.')
+ {
+ if (de->d_name[1] == '\0')
+ is_dot = true;
+ else if (de->d_name[1] == '.' && de->d_name[2] == '\0')
+ is_dot_dot = true;
+ }
+
+ if (is_dot_dot && !(dir->__flags & dirent_isroot))
+ de->d_ino = readdir_get_ino (((fhandler_base *)
+ dir->__fh)->get_name (),
+ true);
+ else
{
- PUNICODE_STRING w32name =
- ((fhandler_base *) dir->__fh)->pc.get_nt_native_path ();
- DWORD devn = ((fhandler_base *) dir->__fh)->get_device ();
- /* Paths below /proc don't have a Win32 pendant. */
- if (isproc_dev (devn))
- de->d_ino = hash_path_name (de->d_ino, L"/");
- else if (w32name->Buffer[w32name->Length / sizeof (WCHAR) - 1]
- != L'\\')
- de->d_ino = hash_path_name (de->d_ino, L"\\");
- de->d_ino = hash_path_name (de->d_ino, de->d_name);
+ /* Compute d_ino by combining filename hash with directory hash. */
+ de->d_ino = ((fhandler_base *) dir->__fh)->get_ino ();
+ if (!is_dot && !is_dot_dot)
+ {
+ PUNICODE_STRING w32name =
+ ((fhandler_base *) dir->__fh)->pc.get_nt_native_path ();
+ DWORD devn = ((fhandler_base *) dir->__fh)->get_device ();
+ /* Paths below /proc don't have a Win32 pendant. */
+ if (isproc_dev (devn))
+ de->d_ino = hash_path_name (de->d_ino, L"/");
+ else if (w32name->Buffer[w32name->Length / sizeof (WCHAR) - 1]
+ != L'\\')
+ de->d_ino = hash_path_name (de->d_ino, L"\\");
+ de->d_ino = hash_path_name (de->d_ino, de->d_name);
+ }
}
}
+ /* This fills out the old 32 bit d_ino field for old applications,
+ build under Cygwin before 1.5.x. */
+ de->__d_internal1 = de->d_ino;
}
- /* This fills out the old 32 bit d_ino field for old applications,
- build under Cygwin before 1.5.x. */
- de->__d_internal1 = de->d_ino;
-
+ __except (NO_ERROR)
+ {
+ res = EFAULT;
+ }
+ __endtry
return res;
}
@@ -174,7 +186,7 @@ readdir (DIR *dir)
}
extern "C" int
-readdir_r (DIR *dir, dirent *de, dirent **ode)
+readdir_r (DIR *__restrict dir, dirent *__restrict de, dirent **__restrict ode)
{
int res = readdir_worker (dir, de);
if (!res)
@@ -192,13 +204,15 @@ readdir_r (DIR *dir, dirent *de, dirent **ode)
extern "C" long
telldir (DIR *dir)
{
- myfault efault;
- if (efault.faulted (EFAULT))
- return -1;
-
- if (dir->__d_cookie != __DIRENT_COOKIE)
- return 0;
- return ((fhandler_base *) dir->__fh)->telldir (dir);
+ __try
+ {
+ if (dir->__d_cookie == __DIRENT_COOKIE)
+ return ((fhandler_base *) dir->__fh)->telldir (dir);
+ set_errno (EBADF);
+ }
+ __except (EFAULT) {}
+ __endtry
+ return -1;
}
/* telldir was never defined using off_t in POSIX, only in early versions
@@ -214,14 +228,17 @@ telldir64 (DIR *dir)
extern "C" void
seekdir (DIR *dir, long loc)
{
- myfault efault;
- if (efault.faulted (EFAULT))
- return;
-
- if (dir->__d_cookie != __DIRENT_COOKIE)
- return;
- dir->__flags &= dirent_info_mask;
- return ((fhandler_base *) dir->__fh)->seekdir (dir, loc);
+ __try
+ {
+ if (dir->__d_cookie == __DIRENT_COOKIE)
+ {
+ dir->__flags &= dirent_info_mask;
+ ((fhandler_base *) dir->__fh)->seekdir (dir, loc);
+ }
+ set_errno (EINVAL); /* Diagnosis */
+ }
+ __except (EFAULT) {}
+ __endtry
}
/* seekdir was never defined using off_t in POSIX, only in early versions
@@ -237,42 +254,45 @@ seekdir64 (DIR *dir, off_t loc)
extern "C" void
rewinddir (DIR *dir)
{
- myfault efault;
- if (efault.faulted (EFAULT))
- return;
-
- if (dir->__d_cookie != __DIRENT_COOKIE)
- return;
- dir->__flags &= dirent_info_mask;
- return ((fhandler_base *) dir->__fh)->rewinddir (dir);
+ __try
+ {
+ if (dir->__d_cookie == __DIRENT_COOKIE)
+ {
+ dir->__flags &= dirent_info_mask;
+ ((fhandler_base *) dir->__fh)->rewinddir (dir);
+ }
+ set_errno (EINVAL); /* Diagnosis */
+ }
+ __except (EFAULT) {}
+ __endtry
}
/* closedir: POSIX 5.1.2.1 */
extern "C" int
closedir (DIR *dir)
{
- myfault efault;
- if (efault.faulted (EFAULT))
- return -1;
-
- if (dir->__d_cookie != __DIRENT_COOKIE)
+ __try
{
- set_errno (EBADF);
- syscall_printf ("%R = closedir(%p)", -1, dir);
- return -1;
- }
-
- /* Reset the marker in case the caller tries to use `dir' again. */
- dir->__d_cookie = 0;
+ if (dir->__d_cookie == __DIRENT_COOKIE)
+ {
+ /* Reset the marker in case the caller tries to use `dir' again. */
+ dir->__d_cookie = 0;
- int res = ((fhandler_base *) dir->__fh)->closedir (dir);
+ int res = ((fhandler_base *) dir->__fh)->closedir (dir);
- close (dir->__d_fd);
- free (dir->__d_dirname);
- free (dir->__d_dirent);
- free (dir);
- syscall_printf ("%R = closedir(%p)", res, dir);
- return res;
+ close (dir->__d_fd);
+ free (dir->__d_dirname);
+ free (dir->__d_dirent);
+ free (dir);
+ syscall_printf ("%R = closedir(%p)", res, dir);
+ return res;
+ }
+ set_errno (EBADF);
+ }
+ __except (EFAULT) {}
+ __endtry
+ syscall_printf ("%R = closedir(%p)", -1, dir);
+ return -1;
}
/* mkdir: POSIX 5.4.1.1 */
@@ -283,43 +303,42 @@ mkdir (const char *dir, mode_t mode)
fhandler_base *fh = NULL;
tmp_pathbuf tp;
- myfault efault;
- if (efault.faulted (EFAULT))
- return -1;
-
- /* POSIX says mkdir("symlink-to-missing/") should create the
- directory "missing", but Linux rejects it with EEXIST. Copy
- Linux behavior for now. */
-
- if (!*dir)
- {
- set_errno (ENOENT);
- goto done;
- }
- if (isdirsep (dir[strlen (dir) - 1]))
+ __try
{
- /* This converts // to /, but since both give EEXIST, we're okay. */
- char *buf;
- char *p = stpcpy (buf = tp.c_get (), dir) - 1;
- dir = buf;
- while (p > dir && isdirsep (*p))
- *p-- = '\0';
- }
- if (!(fh = build_fh_name (dir, PC_SYM_NOFOLLOW)))
- goto done; /* errno already set */;
+ /* POSIX says mkdir("symlink-to-missing/") should create the
+ directory "missing", but Linux rejects it with EEXIST. Copy
+ Linux behavior for now. */
- if (fh->error ())
- {
- debug_printf ("got %d error from build_fh_name", fh->error ());
- set_errno (fh->error ());
- }
- else if (has_dot_last_component (dir, true))
- set_errno (fh->exists () ? EEXIST : ENOENT);
- else if (!fh->mkdir (mode))
- res = 0;
- delete fh;
+ if (!*dir)
+ {
+ set_errno (ENOENT);
+ __leave;
+ }
+ if (isdirsep (dir[strlen (dir) - 1]))
+ {
+ /* This converts // to /, but since both give EEXIST, we're okay. */
+ char *buf;
+ char *p = stpcpy (buf = tp.c_get (), dir) - 1;
+ dir = buf;
+ while (p > dir && isdirsep (*p))
+ *p-- = '\0';
+ }
+ if (!(fh = build_fh_name (dir, PC_SYM_NOFOLLOW)))
+ __leave; /* errno already set */;
- done:
+ if (fh->error ())
+ {
+ debug_printf ("got %d error from build_fh_name", fh->error ());
+ set_errno (fh->error ());
+ }
+ else if (has_dot_last_component (dir, true))
+ set_errno (fh->exists () ? EEXIST : ENOENT);
+ else if (!fh->mkdir (mode))
+ res = 0;
+ delete fh;
+ }
+ __except (EFAULT) {}
+ __endtry
syscall_printf ("%R = mkdir(%s, %d)", res, dir, mode);
return res;
}
@@ -331,33 +350,28 @@ rmdir (const char *dir)
int res = -1;
fhandler_base *fh = NULL;
- myfault efault;
- if (efault.faulted (EFAULT))
- return -1;
-
- if (!(fh = build_fh_name (dir, PC_SYM_NOFOLLOW)))
- goto done; /* errno already set */;
-
- if (fh->error ())
+ __try
{
- debug_printf ("got %d error from build_fh_name", fh->error ());
- set_errno (fh->error ());
- }
- else if (!fh->exists ())
- set_errno (ENOENT);
- else if (has_dot_last_component (dir, false))
- set_errno (EINVAL);
- else if (isdev_dev (fh->dev ()))
- {
- set_errno (ENOTEMPTY);
- goto done;
- }
- else if (!fh->rmdir ())
- res = 0;
-
- delete fh;
+ if (!(fh = build_fh_name (dir, PC_SYM_NOFOLLOW)))
+ __leave; /* errno already set */;
- done:
+ if (fh->error ())
+ {
+ debug_printf ("got %d error from build_fh_name", fh->error ());
+ set_errno (fh->error ());
+ }
+ else if (!fh->exists ())
+ set_errno (ENOENT);
+ else if (has_dot_last_component (dir, false))
+ set_errno (EINVAL);
+ else if (isdev_dev (fh->dev ()))
+ set_errno (ENOTEMPTY);
+ else if (!fh->rmdir ())
+ res = 0;
+ delete fh;
+ }
+ __except (EFAULT) {}
+ __endtry
syscall_printf ("%R = rmdir(%s)", res, dir);
return res;
}
diff --git a/winsup/cygwin/dlfcn.cc b/winsup/cygwin/dlfcn.cc
index c27adf675..255a6d51c 100644
--- a/winsup/cygwin/dlfcn.cc
+++ b/winsup/cygwin/dlfcn.cc
@@ -1,8 +1,5 @@
/* dlfcn.cc
- Copyright 1998, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009,
- 2010, 2011, 2013 Red Hat, Inc.
-
This file is part of Cygwin.
This software is a copyrighted work licensed under the terms of the
@@ -13,14 +10,18 @@ details. */
#include <psapi.h>
#include <stdlib.h>
#include <ctype.h>
+#include <wctype.h>
#include "path.h"
+#include "fhandler.h"
+#include "dtable.h"
+#include "cygheap.h"
#include "perprocess.h"
#include "dlfcn.h"
#include "cygtls.h"
#include "tls_pbuf.h"
#include "ntdll.h"
-static void __stdcall
+static void
set_dl_error (const char *str)
{
strcpy (_my_tls.locals.dl_buffer, strerror (get_errno ()));
@@ -30,10 +31,10 @@ set_dl_error (const char *str)
/* Look for an executable file given the name and the environment
variable to use for searching (eg., PATH); returns the full
pathname (static buffer) if found or NULL if not. */
-inline const char * __stdcall
+inline const char *
check_path_access (const char *mywinenv, const char *name, path_conv& buf)
{
- return find_exec (name, buf, mywinenv, FE_NNF | FE_NATIVE | FE_CWD | FE_DLL);
+ return find_exec (name, buf, mywinenv, FE_NNF | FE_DLL);
}
/* Search LD_LIBRARY_PATH for dll, if it exists. Search /usr/bin and /usr/lib
@@ -41,16 +42,16 @@ check_path_access (const char *mywinenv, const char *name, path_conv& buf)
static inline bool
gfpod_helper (const char *name, path_conv &real_filename)
{
- if (isabspath (name))
+ if (strchr (name, '/'))
real_filename.check (name, PC_SYM_FOLLOW | PC_NULLEMPTY);
- else if (!check_path_access ("LD_LIBRARY_PATH=", name, real_filename))
+ else if (!check_path_access ("LD_LIBRARY_PATH", name, real_filename))
check_path_access ("/usr/bin:/usr/lib", name, real_filename);
if (!real_filename.exists ())
real_filename.error = ENOENT;
return !real_filename.error;
}
-static bool __stdcall
+static bool
get_full_path_of_dll (const char* str, path_conv &real_filename)
{
int len = strlen (str);
@@ -131,10 +132,11 @@ dlopen (const char *name, int flags)
/* Check if the last path component contains a dot. If so,
leave the filename alone. Otherwise add a trailing dot
to override LoadLibrary's automatic adding of a ".dll" suffix. */
- wchar_t *last_bs = wcsrchr (path, L'\\');
+ wchar_t *last_bs = wcsrchr (path, L'\\') ?: path;
if (last_bs && !wcschr (last_bs, L'.'))
wcscat (last_bs, L".");
+#ifndef __x86_64__
/* Workaround for broken DLLs built against Cygwin versions 1.7.0-49
up to 1.7.0-57. They override the cxx_malloc pointer in their
DLL initialization code even if loaded dynamically. This is a
@@ -150,18 +152,20 @@ dlopen (const char *name, int flags)
/* Store original cxx_malloc pointer. */
struct per_process_cxx_malloc *tmp_malloc;
tmp_malloc = __cygwin_user_data.cxx_malloc;
+#endif
- if (!(flags & RTLD_NOLOAD)
- || (ret = GetModuleHandleW (path)) != NULL)
- {
- ret = (void *) LoadLibraryW (path);
- if (ret && (flags & RTLD_NODELETE))
- GetModuleHandleExW (GET_MODULE_HANDLE_EX_FLAG_PIN, path,
- (HMODULE *) &ret);
- }
+ if (flags & RTLD_NOLOAD)
+ GetModuleHandleExW (0, path, (HMODULE *) &ret);
+ else
+ ret = (void *) LoadLibraryW (path);
+ if (ret && (flags & RTLD_NODELETE))
+ GetModuleHandleExW (GET_MODULE_HANDLE_EX_FLAG_PIN, path,
+ (HMODULE *) &ret);
+#ifndef __x86_64__
/* Restore original cxx_malloc pointer. */
__cygwin_user_data.cxx_malloc = tmp_malloc;
+#endif
if (!ret)
__seterrno ();
diff --git a/winsup/cygwin/dll_init.cc b/winsup/cygwin/dll_init.cc
index c61bbdb8c..7d01bf9c9 100644
--- a/winsup/cygwin/dll_init.cc
+++ b/winsup/cygwin/dll_init.cc
@@ -1,8 +1,5 @@
/* dll_init.cc
- Copyright 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008,
- 2009, 2010, 2011, 2012, 2013 Red Hat, Inc.
-
This software is a copyrighted work licensed under the terms of the
Cygwin license. Please consult the file "CYGWIN_LICENSE" for
details. */
@@ -25,6 +22,7 @@ details. */
#include <wchar.h>
#include <sys/reent.h>
#include <assert.h>
+#include <tls_pbuf.h>
extern void __stdcall check_sanity_and_sync (per_process *);
@@ -178,8 +176,10 @@ dll_list::find_by_modname (const PWCHAR modname)
dll *
dll_list::alloc (HINSTANCE h, per_process *p, dll_type type)
{
- WCHAR buf[NT_MAX_PATH];
- GetModuleFileNameW (h, buf, sizeof (buf));
+ /* Called under loader lock conditions so this function can't be called
+ multiple times in parallel. A static buffer is safe. */
+ static WCHAR buf[NT_MAX_PATH];
+ GetModuleFileNameW (h, buf, NT_MAX_PATH);
PWCHAR name = buf;
if (!wcsncmp (name, L"\\\\?\\", 4))
{
@@ -264,7 +264,9 @@ dll_list::append (dll* d)
void dll_list::populate_deps (dll* d)
{
- WCHAR wmodname[NT_MAX_PATH];
+ tmp_pathbuf tp;
+
+ PWCHAR wmodname = tp.w_get ();
pefile* pef = (pefile*) d->handle;
PIMAGE_DATA_DIRECTORY dd = pef->idata_dir (IMAGE_DIRECTORY_ENTRY_IMPORT);
/* Annoyance: calling crealloc with a NULL pointer will use the
@@ -401,7 +403,7 @@ dll_list::detach (void *retaddr)
exception protect;
/* Call finalize function if we are not already exiting */
if (!exit_state)
- __cxa_finalize (d);
+ __cxa_finalize (d->handle);
d->run_dtors ();
d->prev->next = d->next;
if (d->next)
@@ -640,7 +642,7 @@ dll_dllcrt0_1 (VOID *x)
when loaded either statically or dynamically. Because this leaves
a stale pointer into demapped memory space if the DLL is unloaded
by a call to dlclose, we prevent this happening for dynamically
- loaded DLLS in dlopen by saving and restoring cxx_malloc around
+ loaded DLLs in dlopen by saving and restoring cxx_malloc around
the call to LoadLibrary, which invokes the DLL's startup sequence.
Modern DLLs won't even attempt to override the pointer when loaded
statically, but will write their overrides directly into the
diff --git a/winsup/cygwin/dll_init.h b/winsup/cygwin/dll_init.h
index 8127d0bb4..8448813e1 100644
--- a/winsup/cygwin/dll_init.h
+++ b/winsup/cygwin/dll_init.h
@@ -1,8 +1,5 @@
/* dll_init.h
- Copyright 1998, 1999, 2000, 2001, 2002, 2003, 2005, 2007, 2008, 2009, 2010,
- 2011, 2012, 2013 Red Hat, Inc.
-
This file is part of Cygwin.
This software is a copyrighted work licensed under the terms of the
diff --git a/winsup/cygwin/dll_init.sgml b/winsup/cygwin/dll_init.sgml
deleted file mode 100644
index a66c43cb6..000000000
--- a/winsup/cygwin/dll_init.sgml
+++ /dev/null
@@ -1,11 +0,0 @@
-
-<sect1 id="func-cygwin-detach-dll">
-<title>cygwin_detach_dll</title>
-
-<funcsynopsis><funcprototype>
-<funcdef>extern "C" void
-<function>cygwin_detach_dll</function></funcdef>
-<paramdef>int <parameter>dll_index</parameter></paramdef>
-</funcprototype></funcsynopsis>
-
-</sect1>
diff --git a/winsup/cygwin/dllfixdbg b/winsup/cygwin/dllfixdbg
index 95c4470cd..70a496584 100755
--- a/winsup/cygwin/dllfixdbg
+++ b/winsup/cygwin/dllfixdbg
@@ -1,5 +1,4 @@
#!/usr/bin/perl
-# Copyright 2005, 2006, 2007, 2008, 2011 Red Hat, Inc.
#
# This file is part of Cygwin.
#
diff --git a/winsup/cygwin/dlmalloc.c b/winsup/cygwin/dlmalloc.c
deleted file mode 100644
index b64bed8eb..000000000
--- a/winsup/cygwin/dlmalloc.c
+++ /dev/null
@@ -1,3815 +0,0 @@
-/*
- * To do:
- * - strdup? maybe shouldn't bother yet, it seems difficult to get includes
- * right using dlmalloc.h
- * - add STD_C prototyping
- * - adhere to comment conventions
- * - maybe fix ALLOCFILL vs. MOATFILL in do_init_realloced_chunk()
- * - keep a list of mmaped regions for checking in malloc_update_mallinfo()
- * - I think memalign() is wrong: it aligns the chunk rather than the memory
- * portion of the chunk.
- * - "& -alignment" in memalign() is suspect: should use "& ~alignment"
- * instead?
- * - malloc.h doesn't need malloc_COPY or probably a bunch of other stuff
- * - add mallopt options for e.g. fill?
- * - come up with a non-BBC version of M_C
- * - document necessity of checking chunk address in do_check_chunk prior to
- * accessing any of its fields
- * Done:
- * minor speedup due to extend check before mremap
- * minor speedup due to returning malloc() result in memalign() if aligned
- * made malloc_update_mallinfo() check alloced regions at start of sbrk area
- * fixed bug: After discovering foreign sbrk, if old_top was MINSIZE, would
- * reduce old_top_size to 0, thus making inuse(old_top) return 0; other
- * functions would consequently attempt to access old_top->{fd,bk}, which
- * were invalid. This is in malloc_extend_top(), in the "double
- * fencepost" section.
- * Documentation:
- * malloc_usable_size(P) is equivalent to realloc(P, malloc_usable_size(P))
- *
- * $Log$
- * Revision 1.9 2004/05/12 16:21:18 cgf
- * remove keyword stuff
- *
- * Revision 1.1 1997/12/24 18:34:47 nsd
- * Initial revision
- *
- */
-/* ---------- 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.
- 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.
- 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 0)
- 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*/
-
-#define __MALLOC_H_INCLUDED
-
-#if __STD_C
-#include <stddef.h> /* for size_t */
-#else
-#include <sys/types.h>
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include <sys/types.h>
-#include "cygmalloc.h"
-#define __INSIDE_CYGWIN__
-#include <stdio.h> /* needed for malloc_stats */
-#include <string.h>
-
-/*
- Compile-time options
-*/
-
-
-/*
- 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.
-
-*/
-
-#ifdef MALLOC_DEBUG
-#define DEBUG 1
-#define DEBUG1 1
-#define DEBUG2 1
-#define DEBUG3 1
-#endif
-
-#if DEBUG
-#include <assert.h>
-#else
-#define assert(x) ((void)0)
-#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
-
-/*
- 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
-
-#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);
-#else
-Void_t* memset();
-Void_t* memcpy();
-#endif
-#endif
-
-#ifndef DEBUG3
-
-#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 memcpy(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
-
-#else /* DEBUG3 */
-
-/* The trailing moat invalidates the above prediction about the nbytes
- parameter to malloc_ZERO and malloc_COPY. */
-
-#define malloc_ZERO(charp, nbytes) \
-do { \
- char *mzp = (char *)(charp); \
- long mzn = (nbytes); \
- while (mzn--) \
- *mzp++ = '\0'; \
-} while(0)
-
-#define malloc_COPY(dest,src,nbytes) \
-do { \
- char *mcsrc = (char *)(src); \
- char *mcdst = (char *)(dest); \
- long mcn = (nbytes); \
- while (mcn--) \
- *mcdst++ = *mcsrc++; \
-} while(0)
-
-#endif /* DEBUG3 */
-
-/*
- 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)
-# if __STD_C
- extern size_t getpagesize(void);
-# else
- extern size_t getpagesize();
-# endif
-# 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
-#define M_SCANHEAP -5
-#define M_FILL
-
-
-
-#ifndef DEFAULT_TRIM_THRESHOLD
-#define DEFAULT_TRIM_THRESHOLD (128 * 1024)
-#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 */
-
-#if __STD_C
-/* extern Void_t* sbrk(ptrdiff_t);*/
-#else
-extern Void_t* sbrk();
-#endif
-
-#ifndef MORECORE
-#define MORECORE sbrk
-#endif
-
-#ifndef MORECORE_FAILURE
-#define MORECORE_FAILURE -1
-#endif
-
-#ifndef MORECORE_CLEARS
-#define MORECORE_CLEARS 0
-#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
-
-#ifndef cALLOc
-#define cALLOc dlcalloc
-#endif
-#ifndef fREe
-#define fREe dlfree
-#endif
-#ifndef mALLOc
-#define mALLOc dlmalloc
-#endif
-#ifndef mEMALIGn
-#define mEMALIGn dlmemalign
-#endif
-#ifndef rEALLOc
-#define rEALLOc dlrealloc
-#endif
-#ifndef vALLOc
-#define vALLOc dlvalloc
-#endif
-#ifndef pvALLOc
-#define pvALLOc dlpvalloc
-#endif
-#ifndef mALLINFo
-#define mALLINFo dlmallinfo
-#endif
-#ifndef mALLOPt
-#define mALLOPt dlmallopt
-#endif
-
-#endif
-
-/* Public routines */
-
-#ifdef DEBUG2
-#define malloc(size) malloc_dbg(size, __FILE__, __LINE__)
-#define free(p) free_dbg(p, __FILE__, __LINE__)
-#define realloc(p, size) realloc_dbg(p, size, __FILE__, __LINE__)
-#define calloc(n, size) calloc_dbg(n, size, __FILE__, __LINE__)
-#define memalign(align, size) memalign_dbg(align, size, __FILE__, __LINE__)
-#define valloc(size) valloc_dbg(size, __FILE__, __LINE__)
-#define pvalloc(size) pvalloc_dbg(size, __FILE__, __LINE__)
-#define malloc_trim(pad) malloc_trim_dbg(pad, __FILE__, __LINE__)
-#define malloc_usable_size(p) malloc_usable_size_dbg(p, __FILE__, __LINE__)
-#define malloc_stats(void) malloc_stats_dbg(__FILE__, __LINE__)
-#define mallopt(flag, val) mallopt_dbg(flag, val, __FILE__, __LINE__)
-#define mallinfo(void) mallinfo_dbg(__FILE__, __LINE__)
-
-#if __STD_C
-Void_t* malloc_dbg(size_t, const char *, int);
-void free_dbg(Void_t*, const char *, int);
-Void_t* realloc_dbg(Void_t*, size_t, const char *, int);
-Void_t* calloc_dbg(size_t, size_t, const char *, int);
-Void_t* memalign_dbg(size_t, size_t, const char *, int);
-Void_t* valloc_dbg(size_t, const char *, int);
-Void_t* pvalloc_dbg(size_t, const char *, int);
-int malloc_trim_dbg(size_t, const char *, int);
-size_t malloc_usable_size_dbg(Void_t*, const char *, int);
-void malloc_stats_dbg(const char *, int);
-int mallopt_dbg(int, int, const char *, int);
-struct mallinfo mallinfo_dbg(const char *, int);
-#else
-Void_t* malloc_dbg();
-void free_dbg();
-Void_t* realloc_dbg();
-Void_t* calloc_dbg();
-Void_t* memalign_dbg();
-Void_t* valloc_dbg();
-Void_t* pvalloc_dbg();
-int malloc_trim_dbg();
-size_t malloc_usable_size_dbg();
-void malloc_stats_dbg();
-int mallopt_dbg();
-struct mallinfo mallinfo_dbg();
-#endif /* !__STD_C */
-
-#else /* !DEBUG2 */
-
-#if __STD_C
-
-Void_t* mALLOc(size_t);
-void fREe(Void_t*);
-Void_t* rEALLOc(Void_t*, size_t);
-Void_t* cALLOc(size_t, size_t);
-Void_t* mEMALIGn(size_t, size_t);
-Void_t* vALLOc(size_t);
-Void_t* pvALLOc(size_t);
-int malloc_trim(size_t);
-size_t malloc_usable_size(Void_t*);
-void malloc_stats(void);
-int mALLOPt(int, int);
-struct mallinfo mALLINFo(void);
-#else
-Void_t* mALLOc();
-void fREe();
-Void_t* rEALLOc();
-Void_t* cALLOc();
-Void_t* mEMALIGn();
-Void_t* vALLOc();
-Void_t* pvALLOc();
-int malloc_trim();
-size_t malloc_usable_size();
-void malloc_stats();
-int mALLOPt();
-struct mallinfo mALLINFo();
-#endif
-#endif /* !DEBUG2 */
-
-#ifdef __cplusplus
-}; /* end of extern "C" */
-#endif
-
-/* ---------- To make a malloc.h, end cutting here ------------ */
-
-#ifdef DEBUG2
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#undef malloc
-#undef free
-#undef realloc
-#undef calloc
-#undef memalign
-#undef valloc
-#undef pvalloc
-#undef malloc_trim
-#undef malloc_usable_size
-#undef malloc_stats
-#undef mallopt
-#undef mallinfo
-
-#if __STD_C
-Void_t* mALLOc(size_t);
-void fREe(Void_t*);
-Void_t* rEALLOc(Void_t*, size_t);
-Void_t* cALLOc(size_t, size_t);
-Void_t* mEMALIGn(size_t, size_t);
-Void_t* vALLOc(size_t);
-Void_t* pvALLOc(size_t);
-int malloc_trim(size_t);
-size_t malloc_usable_size(Void_t*);
-void malloc_stats(void);
-int mALLOPt(int, int);
-struct mallinfo mALLINFo(void);
-#else
-Void_t* mALLOc();
-void fREe();
-Void_t* rEALLOc();
-Void_t* cALLOc();
-Void_t* mEMALIGn();
-Void_t* vALLOc();
-Void_t* pvALLOc();
-int malloc_trim();
-size_t malloc_usable_size();
-void malloc_stats();
-int mALLOPt();
-struct mallinfo mALLINFo();
-#endif
-
-#include <ctype.h> /* isprint() */
-#ifdef DEBUG3
-#include <stdlib.h> /* atexit() */
-#endif
-
-#ifdef __cplusplus
-}; /* end of extern "C" */
-#endif
-
-#endif /* DEBUG2 */
-
-/*
- 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
-*/
-
-#ifdef DEBUG3
-# define MOATWIDTH 4 /* number of guard bytes at each end of
- allocated region */
-# define MOATFILL 5 /* moat fill character */
-# define ALLOCFILL 1 /* fill char for allocated */
-# define FREEFILL 2 /* and freed regions */
-#endif
-
-typedef 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;
-#ifdef DEBUG3
- const char *file; /* file and */
- int line; /* line number of [re]allocation */
- size_t pad; /* nr pad bytes at mem end, excluding moat */
- int alloced; /* whether the chunk is allocated -- less prone
- to segv than inuse(chunk) */
- char moat[MOATWIDTH]; /* actual leading moat is last MOATWIDTH bytes
- of chunk header; those bytes may follow this
- field due to header alignment padding */
-#endif
-} Chunk;
-
-typedef 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)
-#define ALIGNMENT (SIZE_SZ + SIZE_SZ)
-#define ALIGN_MASK (ALIGNMENT - 1)
-#ifndef DEBUG3
-# define MEMOFFSET (2*SIZE_SZ)
-# define OVERHEAD SIZE_SZ
-# define MMAP_EXTRA SIZE_SZ /* for correct alignment */
-# define MINSIZE sizeof(Chunk)
-#else
-typedef union {
- char strut[(sizeof(Chunk) - 1) / ALIGNMENT + 1][ALIGNMENT];
- Chunk chunk;
-} PaddedChunk;
-# define MEMOFFSET sizeof(PaddedChunk)
-# define OVERHEAD (MEMOFFSET + MOATWIDTH)
-# define MMAP_EXTRA 0
-# define MINSIZE ((OVERHEAD + ALIGN_MASK) & ~ALIGN_MASK)
-#endif
-
-/* conversion from malloc headers to user pointers, and back */
-
-#define chunk2mem(p) ((Void_t*)((char*)(p) + MEMOFFSET))
-#define mem2chunk(mem) ((mchunkptr)((char*)(mem) - MEMOFFSET))
-
-/* pad request bytes into a usable size, including overhead */
-
-#define request2size(req) \
- ((long)((req) + OVERHEAD) < (long)MINSIZE ? MINSIZE : \
- ((req) + OVERHEAD + ALIGN_MASK) & ~ALIGN_MASK)
-
-/* Check if m has acceptable alignment */
-
-#define aligned_OK(m) (((unsigned long)((m)) & 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 */
-
-#if HAVE_MMAP
-# define chunk_is_mmapped(p) ((p)->size & IS_MMAPPED)
-#else
-# define chunk_is_mmapped(p) 0
-#endif
-
-/* 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.
-
-*/
-
-#define NAV 128 /* number of bins */
-
-typedef 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)
-
-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)
-};
-
-
-
-/* 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 8 bytes apart, and hold
- identically sized chunks. This is exploited in malloc.
-*/
-
-#define MAX_SMALLBIN 63
-#define MAX_SMALLBIN_SIZE 512
-#define SMALLBIN_WIDTH 8
-
-#define smallbin_index(sz) (((unsigned long)(sz)) >> 3)
-
-/*
- 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)1 << (ix / BINBLOCKWIDTH))
-#define mark_binblock(ii) (binblocks |= idx2binblock(ii))
-#define clear_binblock(ii) (binblocks &= ~(idx2binblock(ii)))
-
-
-
-
-
-/* Other static bookkeeping data */
-
-/* variables holding tunable values */
-
-static unsigned long trim_threshold = DEFAULT_TRIM_THRESHOLD;
-static unsigned long top_pad = DEFAULT_TOP_PAD;
-static unsigned int n_mmaps_max = DEFAULT_MMAP_MAX;
-static unsigned long mmap_threshold = DEFAULT_MMAP_THRESHOLD;
-#ifdef DEBUG2
-static int scanheap = 1;
-#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 };
-
-/* The total memory obtained from system via sbrk */
-#define sbrked_mem (current_mallinfo.arena)
-
-/* Tracking mmaps */
-
-static unsigned int n_mmaps = 0;
-static unsigned long mmapped_mem = 0;
-#if HAVE_MMAP
-static unsigned int max_n_mmaps = 0;
-static unsigned long max_mmapped_mem = 0;
-#endif
-
-
-
-/*
- Debugging support
-*/
-
-#if DEBUG
-
-#ifndef DEBUG2
-# define unless(cond, err, p) assert(cond)
-#else
-# define unless(cond, err, p) do { if (!(cond)) malloc_err(err, p); } while (0)
-
-/*
- * When debug_file is non-null, it and debug_line respectively contain the
- * file and line number of the current invocation of malloc(), calloc(),
- * realloc(), or free().
- */
-static const char *debug_file = NULL;
-static int debug_line;
-
-/*
- * Avoid dereferencing invalid chunk.file pointers by tracking the range of
- * valid ones. Could add an "unallocated" flag to init_freed_chunk() for
- * more protection, but that's probably not necessary.
- */
-static const char *debug_file_min = (char *)~0;
-static const char *debug_file_max = NULL;
-
-static char *itos(int n)
-{
-#define NDIGITS (sizeof(int) * 3)
- static char s[NDIGITS + 1];
- int i = NDIGITS;
- do {
- s[--i] = '0' + n % 10;
- n /= 10;
- } while (n);
- return s + i;
-#undef NDIGITS
-}
-
-static int recurs = 0;
-
-static void errprint(const char *file, int line, const char *err)
-{
- if (recurs++) {
- recurs--;
- return;
- }
-
- if (file) {
- write(2, file, strlen(file));
- if (line) {
- write(2, ":", 1);
- write(2, itos(line), strlen(itos(line)));
- }
- write(2, ": ", 2);
- }
- write(2, err, strlen(err));
- write(2, "\n", 1);
- recurs--;
-}
-
-static void malloc_err(const char *err, mchunkptr p)
-{
- /*
- * Display ERR on stderr, accompanying it with the caller's file and line
- * number if available. If P is non-null, also attempt to display the file
- * and line number at which P was most recently [re]allocated.
- *
- * This function's name begins with "malloc_" to make setting debugger
- * breakpoints here more convenient.
- */
- errprint(debug_file, debug_line, err);
-
-# ifndef DEBUG3
- p = 0; /* avoid "unused param" warning */
-# else
- if (p && p->file &&
- /* avoid invalid pointers */
- debug_file_min &&
- p->file >= debug_file_min &&
- p->file <= debug_file_max)
- errprint(p->file, p->line, "in block allocated here");
-# endif
-}
-
-#undef malloc
-#undef free
-#undef realloc
-#undef memalign
-#undef valloc
-#undef pvalloc
-#undef calloc
-#undef malloc_trim
-#undef malloc_usable_size
-#undef malloc_stats
-#undef mallopt
-#undef mallinfo
-
-static void malloc_update_mallinfo(void);
-
-/*
- * Define front-end functions for all user-visible entry points that may
- * trigger error().
- */
-#define skel(retdecl, retassign, call, retstmt) \
- retdecl \
- debug_file = file; \
- debug_line = line; \
- if (debug_file < debug_file_min) \
- debug_file_min = debug_file; \
- if (debug_file > debug_file_max) \
- debug_file_max = debug_file; \
- if (scanheap) \
- malloc_update_mallinfo(); \
- retassign call; \
- if (scanheap) \
- malloc_update_mallinfo(); \
- debug_file = NULL; \
- retstmt
-
-/*
- * The final letter of the names of the following macros is either r or v,
- * indicating that the macro handles functions with or without a return value,
- * respectively.
- */
-# define skelr(rettype, call) \
- skel(rettype ret;, ret = , call, return ret)
-/*
- * AIX's xlc compiler doesn't like empty macro args, so specify useless but
- * compilable retdecl, retassign, and retstmt args:
- */
-#define skelv(call) \
- skel(line += 0;, if (1), call, return)
-
-#define dbgargs const char *file, int line
-
-/*
- * Front-end function definitions:
- */
-Void_t* malloc_dbg(size_t bytes, dbgargs) {
- skelr(Void_t*, malloc(bytes));
-}
-void free_dbg(Void_t *mem, dbgargs) {
- skelv(free(mem));
-}
-Void_t* realloc_dbg(Void_t *oldmem, size_t bytes, dbgargs) {
- skelr(Void_t*, realloc(oldmem, bytes));
-}
-Void_t* memalign_dbg(size_t alignment, size_t bytes, dbgargs) {
- skelr(Void_t*, dlmemalign(alignment, bytes));
-}
-Void_t* valloc_dbg(size_t bytes, dbgargs) {
- skelr(Void_t*, dlvalloc(bytes));
-}
-Void_t* pvalloc_dbg(size_t bytes, dbgargs) {
- skelr(Void_t*, dlpvalloc(bytes));
-}
-Void_t* calloc_dbg(size_t n, size_t elem_size, dbgargs) {
- skelr(Void_t*, calloc(n, elem_size));
-}
-int malloc_trim_dbg(size_t pad, dbgargs) {
- skelr(int, malloc_trim(pad));
-}
-size_t malloc_usable_size_dbg(Void_t *mem, dbgargs) {
- skelr(size_t, malloc_usable_size(mem));
-}
-void malloc_stats_dbg(dbgargs) {
- skelv(malloc_stats());
-}
-int mallopt_dbg(int flag, int value, dbgargs) {
- skelr(int, dlmallopt(flag, value));
-}
-struct mallinfo mallinfo_dbg(dbgargs) {
- skelr(struct mallinfo, dlmallinfo());
-}
-
-#undef skel
-#undef skelr
-#undef skelv
-#undef dbgargs
-
-#endif /* DEBUG2 */
-
-/*
- 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!)
-*/
-
-#ifdef DEBUG3
-static int memtest(void *s, int c, size_t n)
-{
- /*
- * Return whether the N-byte memory region starting at S consists
- * entirely of bytes with value C.
- */
- unsigned char *p = (unsigned char *)s;
- size_t i;
- for (i = 0; i < n; i++)
- if (p[i] != (unsigned char)c)
- return 0;
- return 1;
-}
-#endif /* DEBUG3 */
-
-#ifndef DEBUG3
-#define check_moats(P)
-#else
-#define check_moats do_check_moats
-static void do_check_moats(mchunkptr p)
-{
- INTERNAL_SIZE_T sz = chunksize(p);
- unless(memtest((char *)chunk2mem(p) - MOATWIDTH, MOATFILL,
- MOATWIDTH), "region underflow", p);
- unless(memtest((char *)p + sz - MOATWIDTH - p->pad, MOATFILL,
- MOATWIDTH + p->pad), "region overflow", p);
-}
-#endif /* DEBUG3 */
-
-#if __STD_C
-static void do_check_chunk(mchunkptr p)
-#else
-static void do_check_chunk(p) mchunkptr p;
-#endif
-{
- /* Try to ensure legal addresses before accessing any chunk fields, in the
- * hope of issuing an informative message rather than causing a segv.
- *
- * The following chunk_is_mmapped() call accesses p->size #if HAVE_MMAP.
- * This is unavoidable without maintaining a record of mmapped regions.
- */
- if (!chunk_is_mmapped(p))
- {
- INTERNAL_SIZE_T sz;
-
- unless((char*)p >= sbrk_base, "chunk precedes sbrk_base", p);
- unless((char*)p + MINSIZE <= (char*)top + chunksize(top),
- "chunk past sbrk area", p);
-
- sz = chunksize(p);
- if (p != top)
- unless((char*)p + sz <= (char*)top, "chunk extends beyond top", p);
- else
- unless((char*)p + sz <= sbrk_base + sbrked_mem,
- "chunk extends past sbrk area", p);
- }
- check_moats(p);
-}
-
-#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 = chunksize(p);
- mchunkptr next = chunk_at_offset(p, sz);
-
- do_check_chunk(p);
-
- /* Check whether it claims to be free ... */
- unless(!inuse(p), "free chunk marked inuse", p);
-
- /* Unless a special marker, must have OK fields */
- if ((long)sz >= (long)MINSIZE)
- {
- unless((sz & ALIGN_MASK) == 0, "freed size defies alignment", p);
- unless(aligned_OK(chunk2mem(p)), "misaligned freed region", p);
- /* ... matching footer field */
- unless(next->prev_size == sz, "chunk size mismatch", p);
- /* ... and is fully consolidated */
- unless(prev_inuse(p), "free chunk not joined with prev", p);
- unless(next == top || inuse(next), "free chunk not joined with next", p);
-
- /* ... and has minimally sane links */
- unless(p->fd->bk == p, "broken forward link", p);
- unless(p->bk->fd == p, "broken backward link", p);
- }
- else /* markers are always of size SIZE_SZ */
- unless(sz == SIZE_SZ, "invalid small chunk size", p);
-}
-
-#if __STD_C
-static void do_check_inuse_chunk(mchunkptr p)
-#else
-static void do_check_inuse_chunk(p) mchunkptr p;
-#endif
-{
- mchunkptr next;
- do_check_chunk(p);
-
- if (chunk_is_mmapped(p))
- return;
-
- /* Check whether it claims to be in use ... */
-#ifdef DEBUG3
- unless(p->alloced, "memory not allocated", p);
-#endif
- unless(inuse(p), "memory not allocated", 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);
- unless(next_chunk(prv) == p, "prev link scrambled", p);
- do_check_free_chunk(prv);
- }
- next = next_chunk(p);
- if (next == top)
- {
- unless(prev_inuse(next), "top chunk wrongly thinks prev is unused", p);
- unless(chunksize(next) >= MINSIZE, "top chunk too small", p);
- }
- 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 = chunksize(p);
- long room = sz - s;
-
- do_check_inuse_chunk(p);
-
- /* Legal size ... */
- unless((long)sz >= (long)MINSIZE, "chunk size too small", p);
- unless((sz & ALIGN_MASK) == 0, "malloced size defies alignment", p);
- unless(room >= 0, "chunk size too small for contents", p);
- unless(room < (long)MINSIZE, "chunk size leaves too much spare room", p);
-
- /* ... and alignment */
- unless(aligned_OK(chunk2mem(p)), "misaligned malloced region", p);
-
-
- /* ... and was allocated at front of an available chunk */
- unless(prev_inuse(p), "malloced from the middle of a free chunk", p);
-}
-
-#ifdef DEBUG3
-static void init_alloced_chunk(mchunkptr p, size_t bytes)
-{
- Void_t* mem = chunk2mem(p);
- p->file = debug_file;
- p->line = debug_line;
- p->pad = chunksize(p) - OVERHEAD - bytes;
- p->alloced = 1;
- memset((char *)mem + bytes, MOATFILL, p->pad + MOATWIDTH);
-}
-
-static void do_init_malloced_chunk(mchunkptr p, size_t bytes)
-{
- Void_t* mem = chunk2mem(p);
- init_alloced_chunk(p, bytes);
- memset((char *)mem - MOATWIDTH, MOATFILL, MOATWIDTH);
- memset(mem, ALLOCFILL, bytes);
-}
-
-static void do_init_realloced_chunk(mchunkptr p, size_t bytes,
- INTERNAL_SIZE_T oldsize)
-{
- Void_t* mem = chunk2mem(p);
- INTERNAL_SIZE_T newsize = chunksize(p);
- init_alloced_chunk(p, bytes);
- if (oldsize < newsize)
- /* This incorrectly leaves the leading pad area of the old trailing moat
- * set to MOATFILL rather than ALLOCFILL. An alternative is to save the
- * old p->pad in rEALLOc() below and pass it to this function.
- */
- memset((char *)mem + oldsize - OVERHEAD, ALLOCFILL,
- bytes - (oldsize - OVERHEAD));
-}
-
-static void do_check_freefill(mchunkptr p, long newsize,
- INTERNAL_SIZE_T oldsize)
-{
- /* The first newsize bytes of oldsize-byte chunk p are about to be
- * allocated. Issue a warning if any freefill locations in p that are about
- * to be overwritten do not contain the character FREEFILL.
- */
- size_t bytes, maxbytes;
- if (newsize <= 0)
- return;
- bytes = newsize - MEMOFFSET /* don't check p's header */
- + MEMOFFSET; /* header of split-off remainder */
- maxbytes = oldsize - OVERHEAD;
- if (bytes > maxbytes)
- bytes = maxbytes;
- unless(memtest(chunk2mem(p), FREEFILL, bytes),
- "detected write to freed region", p);
-}
-
-static void do_init_freed_chunk(mchunkptr p, INTERNAL_SIZE_T freehead,
- INTERNAL_SIZE_T freetail)
-{
- /* freehead and freetail are the number of bytes at the beginning of p and
- * end of p respectively that should already be initialized as free regions.
- */
- Void_t* mem = chunk2mem(p);
- size_t size = chunksize(p);
- size_t bytes = size - OVERHEAD;
- p->pad = 0;
- p->alloced = 0;
- memset((char *)mem - MOATWIDTH, MOATFILL, MOATWIDTH);
- memset((char *)mem + bytes, MOATFILL, MOATWIDTH);
-
- /* To avoid terrible O(n^2) performance when free() repeatedly grows a free
- * chunk, it's important not to free-fill regions that are already
- * free-filled.
- */
- if (freehead + freetail < size) {
- Void_t* start = !freehead ? mem : (char *)p + freehead - MOATWIDTH;
- size_t len = (char *)p + size - (char *)start -
- (!freetail ? MOATWIDTH : freetail - OVERHEAD);
- memset(start, FREEFILL, len);
- }
-}
-
-static void do_init_freeable_chunk(mchunkptr p)
-{
- /* Arrange for the subsequent fREe(p) not to generate any warnings. */
- init_alloced_chunk(p, chunksize(p) - OVERHEAD);
- memset((char *)chunk2mem(p) - MOATWIDTH, MOATFILL, MOATWIDTH);
-}
-
-static void do_maximize_chunk(mchunkptr p)
-{
- if (p->pad) {
- Void_t* mem = chunk2mem(p);
- size_t bytes = chunksize(p) - OVERHEAD - p->pad;
- memset((char *)mem + bytes, ALLOCFILL, p->pad);
- p->pad = 0;
- }
-}
-
-static int do_check_init(void)
-{
- /* Called from the first invocation of malloc_extend_top(), as detected by
- * sbrk_base == -1. Return whether this function allocated any memory.
- */
- static int state = 0; /* 1 => initializing, 2 => initialized */
- if (state == 1)
- return 0;
- unless(state == 0, "multiple calls to check_init", NULL);
- state++;
- atexit(malloc_update_mallinfo); /* calls malloc on WinNT */
- return sbrk_base != (char *)-1;
-}
-#endif /* DEBUG3 */
-
-static mchunkptr lowest_chunk;
-
-#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 /* !DEBUG */
-#define check_free_chunk(P)
-#define check_inuse_chunk(P)
-#define check_chunk(P)
-#define check_malloced_chunk(P,N)
-#endif /* !DEBUG */
-
-#ifdef DEBUG3
-#define check_init do_check_init
-#define init_malloced_chunk do_init_malloced_chunk
-#define init_realloced_chunk do_init_realloced_chunk
-#define check_freefill do_check_freefill
-#define init_freed_chunk do_init_freed_chunk
-#define init_freeable_chunk do_init_freeable_chunk
-#define maximize_chunk do_maximize_chunk
-#else
-#define check_init() 0
-#define init_malloced_chunk(P,B)
-#define init_realloced_chunk(P,B,O)
-#define check_freefill(P,N,O)
-#define init_freed_chunk(P,H,T)
-#define init_freeable_chunk(P)
-#define maximize_chunk(P)
-#endif /* !DEBUG3 */
-
-
-
-/*
- 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
-
-#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 */
-
- size = (size + MMAP_EXTRA + 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;
-}
-
-#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);
-}
-
-#if HAVE_MREMAP
-
-#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);
-
- new_size = (new_size + offset + MMAP_EXTRA + 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 /* HAVE_MREMAP */
-
-#endif /* HAVE_MMAP */
-
-
-
-
-/*
- 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(INTERNAL_SIZE_T nb)
-#else
-static void malloc_extend_top(nb) INTERNAL_SIZE_T nb;
-#endif
-{
- char* lim; /* 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 */
- char* new_lim; /* 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);
-
- else if (check_init()) {
- if (chunksize(top) - nb < (long)MINSIZE)
- malloc_extend_top(nb);
- return;
- }
-
- lim = (char*)(MORECORE (sbrk_size));
-
- /* Fail if sbrk failed or if a foreign sbrk call killed our space */
- if (lim == (char*)(MORECORE_FAILURE) ||
- (lim < old_end && old_top != initial_top))
- return;
-
- sbrked_mem += sbrk_size;
-
- if (lim == old_end) /* can just add bytes to current top */
- {
- top_size = sbrk_size + old_top_size;
- set_head(top, top_size | PREV_INUSE);
- }
- else
- {
-#ifdef SBRKDBG
- INTERNAL_SIZE_T padding = (char *)sbrk (0) - (lim + sbrk_size);
- sbrk_size += padding;
- sbrked_mem += padding;
-#endif
-
- if (sbrk_base == (char*)(-1)) /* First time through. Record base */
- sbrk_base = lim;
- else /* Someone else called sbrk(). Count those bytes as sbrked_mem. */
- sbrked_mem += lim - (char*)old_end;
-
- /* Guarantee alignment of first new chunk made from this space */
- front_misalign = (unsigned long)chunk2mem(lim) & ALIGN_MASK;
- if (front_misalign > 0)
- {
- correction = (ALIGNMENT) - front_misalign;
- lim += correction;
- }
- else
- correction = 0;
-
- /* Guarantee the next brk will be at a page boundary */
- correction += pagesz - ((unsigned long)(lim + sbrk_size) & (pagesz - 1));
-
- /* Allocate correction */
- new_lim = (char*)(MORECORE (correction));
- if (new_lim == (char*)(MORECORE_FAILURE)) return;
-
- sbrked_mem += correction;
-
- top = (mchunkptr)lim;
- top_size = new_lim - lim + correction;
- set_head(top, top_size | PREV_INUSE);
-#if DEBUG
- lowest_chunk = top;
-#endif
-
-#ifdef OTHER_SBRKS
- 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;
- }
-
- old_top_size -= 2*SIZE_SZ;
- 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) {
- init_freeable_chunk(old_top);
- fREe(chunk2mem(old_top));
- }
- }
-#endif /* OTHER_SBRKS */
- }
-
- init_freed_chunk(top, old_top == initial_top ? old_top_size : 0, 0);
-
- if ((unsigned long)sbrked_mem > (unsigned long)max_sbrked_mem)
- max_sbrked_mem = sbrked_mem;
- if ((unsigned long)(mmapped_mem + sbrked_mem) > (unsigned long)max_total_mem)
- max_total_mem = mmapped_mem + sbrked_mem;
-
- /* We always land on a page boundary */
- assert(((unsigned long)((char*)top + top_size) & (pagesz - 1)) == 0);
-}
-
-
-
-
-/* Main public routines */
-
-
-/*
- 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(size_t bytes)
-#else
-Void_t* mALLOc(bytes) size_t bytes;
-#endif
-{
- 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 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);
-
- /* Also scan the next one, since it would have a remainder < MINSIZE */
- if (victim == q)
- {
- q = next_bin(q);
- victim = last(q);
- }
- if (victim != q)
- {
- victim_size = chunksize(victim);
- unlink(victim, bck, fwd);
- set_inuse_bit_at_offset(victim, victim_size);
- check_freefill(victim, victim_size, victim_size);
- init_malloced_chunk(victim, bytes);
- check_malloced_chunk(victim, nb);
-
- 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 = 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_freefill(victim, victim_size, victim_size);
- init_malloced_chunk(victim, bytes);
- check_malloced_chunk(victim, nb);
- 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 = victim_size - nb;
-
- if (remainder_size >= (long)MINSIZE) /* re-split */
- {
- remainder = chunk_at_offset(victim, nb);
- set_head(victim, nb | PREV_INUSE);
- check_freefill(victim, nb, victim_size);
- init_malloced_chunk(victim, bytes);
- link_last_remainder(remainder);
- set_head(remainder, remainder_size | PREV_INUSE);
- set_foot(remainder, remainder_size);
- init_freed_chunk(remainder, remainder_size, 0);
- check_malloced_chunk(victim, nb);
- return chunk2mem(victim);
- }
-
- clear_last_remainder;
-
- if (remainder_size >= 0) /* exhaust */
- {
- set_inuse_bit_at_offset(victim, victim_size);
- check_freefill(victim, victim_size, victim_size);
- init_malloced_chunk(victim, bytes);
- check_malloced_chunk(victim, nb);
- 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 = victim_size - nb;
-
- if (remainder_size >= (long)MINSIZE) /* split */
- {
- remainder = chunk_at_offset(victim, nb);
- set_head(victim, nb | PREV_INUSE);
- check_freefill(victim, nb, victim_size);
- unlink(victim, bck, fwd);
- init_malloced_chunk(victim, bytes);
- link_last_remainder(remainder);
- set_head(remainder, remainder_size | PREV_INUSE);
- set_foot(remainder, remainder_size);
- init_freed_chunk(remainder, remainder_size, 0);
- check_malloced_chunk(victim, nb);
- return chunk2mem(victim);
- }
-
- else if (remainder_size >= 0) /* take */
- {
- check_freefill(victim, victim_size, victim_size);
- set_inuse_bit_at_offset(victim, victim_size);
- unlink(victim, bck, fwd);
- init_malloced_chunk(victim, bytes);
- check_malloced_chunk(victim, nb);
- return chunk2mem(victim);
- }
-
- }
-
- bin = next_bin(bin);
-
- } 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 */
- if ( (remainder_size = chunksize(top) - nb) < (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) {
- init_malloced_chunk(victim, bytes);
- return chunk2mem(victim);
- }
-#endif
-
- /* Try to extend */
- malloc_extend_top(nb);
- if ( (remainder_size = chunksize(top) - nb) < (long)MINSIZE)
- return 0; /* propagate failure */
- }
-
- victim = top;
- set_head(victim, nb | PREV_INUSE);
- check_freefill(victim, nb, nb + remainder_size);
- init_malloced_chunk(victim, bytes);
- top = chunk_at_offset(victim, nb);
- set_head(top, remainder_size | PREV_INUSE);
- init_freed_chunk(top, remainder_size, 0);
- check_malloced_chunk(victim, nb);
- return chunk2mem(victim);
-
-}
-
-
-
-
-/*
-
- 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(Void_t* mem)
-#else
-void fREe(mem) Void_t* mem;
-#endif
-{
- 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;
-
- p = mem2chunk(mem);
- check_inuse_chunk(p);
-
- hd = p->size;
-
-#if HAVE_MMAP
- if (hd & IS_MMAPPED) /* release mmapped memory. */
- {
- munmap_chunk(p);
- return;
- }
-#endif
-
- sz = hd & ~PREV_INUSE;
- next = chunk_at_offset(p, sz);
- nextsz = chunksize(next);
- prevsz = 0; /* avoid compiler warnings */
-
- if (next == top) /* merge with top */
- {
- sz += nextsz;
-
- if (!(hd & PREV_INUSE)) /* consolidate backward */
- {
- prevsz = p->prev_size;
- p = chunk_at_offset(p, -(long)prevsz);
- sz += prevsz;
- unlink(p, bck, fwd);
- }
-
- set_head(p, sz | PREV_INUSE);
- top = p;
- init_freed_chunk(top, !(hd & PREV_INUSE) ? prevsz : 0, nextsz);
- if ((unsigned long)(sz) >= trim_threshold)
- malloc_trim(top_pad);
- 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, -(long)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);
- init_freed_chunk(p, !(hd & PREV_INUSE) ? prevsz : 0,
- !inuse_bit_at_offset(next, nextsz) ? nextsz : 0);
-}
-
-
-
-
-
-/*
-
- 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(Void_t* oldmem, size_t bytes)
-#else
-Void_t* rEALLOc(oldmem, bytes) Void_t* oldmem; size_t bytes;
-#endif
-{
- 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(oldmem); return 0; }
-#endif
-
-
- /* realloc of null is supposed to be same as malloc */
- if (oldmem == 0) return mALLOc(bytes);
-
- newp = oldp = mem2chunk(oldmem);
- newsize = oldsize = chunksize(oldp);
-
-
- nb = request2size(bytes);
-
- check_inuse_chunk(oldp);
-
-#if HAVE_MMAP
- if (chunk_is_mmapped(oldp))
- {
- if (oldsize - MMAP_EXTRA >= nb) {
- init_realloced_chunk(oldp, bytes, oldsize);
- return oldmem; /* do nothing */
- }
-#if HAVE_MREMAP
- newp = mremap_chunk(oldp, nb);
- if (newp) {
- init_realloced_chunk(newp, bytes, oldsize);
- return chunk2mem(newp);
- }
-#endif
- /* Must alloc, copy, free. */
- newmem = mALLOc(bytes);
- if (newmem == 0) return 0; /* propagate failure */
- malloc_COPY(newmem, oldmem, oldsize - OVERHEAD - MMAP_EXTRA);
- munmap_chunk(oldp);
- return newmem;
- }
-#endif
-
- if (oldsize < 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))
- {
- check_freefill(next, nb - oldsize, nextsize);
- newsize += nextsize;
- top = chunk_at_offset(oldp, nb);
- set_head(top, (newsize - nb) | PREV_INUSE);
- init_freed_chunk(top, newsize - nb, 0);
- set_head_size(oldp, nb);
- init_realloced_chunk(oldp, bytes, oldsize);
- return chunk2mem(oldp);
- }
- }
-
- /* Forward into next chunk */
- else if (((long)(nextsize + newsize) >= (long)nb))
- {
- check_freefill(next, nb - oldsize, nextsize);
- 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))
- {
- check_freefill(prev, nb, prevsize);
- check_freefill(next, nb - (prevsize + newsize), nextsize);
- unlink(prev, bck, fwd);
- newp = prev;
- newsize += prevsize + nextsize;
- newmem = chunk2mem(newp);
- malloc_COPY(newmem, oldmem, oldsize - OVERHEAD);
- top = chunk_at_offset(newp, nb);
- set_head(top, (newsize - nb) | PREV_INUSE);
- init_freed_chunk(top, newsize - nb, 0);
- set_head_size(newp, nb);
- init_realloced_chunk(newp, bytes, oldsize);
- return newmem;
- }
- }
-
- /* into next chunk */
- else if (((long)(nextsize + prevsize + newsize) >= (long)(nb)))
- {
- check_freefill(prev, nb, prevsize);
- check_freefill(next, nb - (prevsize + newsize), nextsize);
- unlink(next, bck, fwd);
- unlink(prev, bck, fwd);
- newp = prev;
- newsize += nextsize + prevsize;
- newmem = chunk2mem(newp);
- malloc_COPY(newmem, oldmem, oldsize - OVERHEAD);
- goto split;
- }
- }
-
- /* backward only */
- if (prev != 0 && (long)(prevsize + newsize) >= (long)nb)
- {
- check_freefill(prev, nb, prevsize);
- unlink(prev, bck, fwd);
- newp = prev;
- newsize += prevsize;
- newmem = chunk2mem(newp);
- malloc_COPY(newmem, oldmem, oldsize - OVERHEAD);
- goto split;
- }
- }
-
- /* Must allocate */
-
- newmem = mALLOc (bytes);
-
- if (newmem == 0) /* propagate failure */
- 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 - OVERHEAD);
- fREe(oldmem);
- return newmem;
- }
-
-
- split: /* split off extra room in old or expanded chunk */
-
- if (newsize - nb >= MINSIZE) /* split off remainder */
- {
- remainder = chunk_at_offset(newp, nb);
- remainder_size = newsize - nb;
- set_head_size(newp, nb);
- set_head(remainder, remainder_size | PREV_INUSE);
- set_inuse_bit_at_offset(remainder, remainder_size);
- init_malloced_chunk(remainder, remainder_size - OVERHEAD);
- fREe(chunk2mem(remainder)); /* let free() deal with it */
- }
- else
- {
- set_head_size(newp, newsize);
- set_inuse_bit_at_offset(newp, newsize);
- }
-
- init_realloced_chunk(newp, bytes, oldsize);
- check_inuse_chunk(newp);
- return chunk2mem(newp);
-}
-
-
-
-
-/*
-
- 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(size_t alignment, size_t bytes)
-#else
-Void_t* mEMALIGn(alignment, bytes) 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* lim; /* 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 <= ALIGNMENT) return mALLOc(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);
- m = (char*)mALLOc(nb + alignment + MINSIZE);
-
- if (m == 0) return 0; /* propagate failure */
-
- p = mem2chunk(m);
-
- if ((((unsigned long)(m)) % alignment) == 0) /* aligned */
- {
- init_realloced_chunk(p, bytes, chunksize(p));
- return chunk2mem(p); /* nothing more to do */
- }
- 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.
- */
-
- lim = (char*)mem2chunk(((unsigned long)(m + alignment - 1)) &
- ~(alignment - 1));
- if ((lim - (char*)p) < (long)MINSIZE) lim = lim + alignment;
-
- newp = (mchunkptr)lim;
- leadsize = lim - (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);
- init_malloced_chunk(newp, bytes);
- 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);
- init_freeable_chunk(p);
- fREe(chunk2mem(p));
- p = newp;
-
- assert (newsize >= nb && (((unsigned long)(chunk2mem(p))) % alignment) == 0);
- }
-
- /* Also give back spare room at the end */
-
- remainder_size = 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);
- init_freeable_chunk(remainder);
- fREe(chunk2mem(remainder));
- }
-
- init_malloced_chunk(p, bytes);
- check_inuse_chunk(p);
- return chunk2mem(p);
-
-}
-
-
-
-
-/*
- 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(size_t bytes)
-#else
-Void_t* vALLOc(bytes) size_t bytes;
-#endif
-{
- return mEMALIGn (malloc_getpagesize, bytes);
-}
-
-/*
- pvalloc just invokes valloc for the nearest pagesize
- that will accommodate request
-*/
-
-
-#if __STD_C
-Void_t* pvALLOc(size_t bytes)
-#else
-Void_t* pvALLOc(bytes) size_t bytes;
-#endif
-{
- size_t pagesize = malloc_getpagesize;
- return mEMALIGn (pagesize, (bytes + pagesize - 1) & ~(pagesize - 1));
-}
-
-/*
-
- calloc calls malloc, then zeroes out the allocated chunk.
-
-*/
-
-#if __STD_C
-Void_t* cALLOc(size_t n, size_t elem_size)
-#else
-Void_t* cALLOc(n, elem_size) size_t n; size_t elem_size;
-#endif
-{
- mchunkptr p;
- INTERNAL_SIZE_T csz;
-
- INTERNAL_SIZE_T sz = n * elem_size;
-
- /* check if expand_top called, in which case don't need to clear */
-#if MORECORE_CLEARS
- mchunkptr oldtop = top;
- INTERNAL_SIZE_T oldtopsize = chunksize(top);
-#endif
- Void_t* mem = mALLOc (sz);
-
- if (mem == 0)
- return 0;
- else
- {
- p = mem2chunk(mem);
-
- /* Two optional cases in which clearing not necessary */
-
-
-#if HAVE_MMAP
- if (chunk_is_mmapped(p)) 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;
- }
-#endif
-
- malloc_ZERO(mem, csz - OVERHEAD);
- /* reinstate moat fill in pad region */
- init_realloced_chunk(p, sz, chunksize(p));
- return mem;
- }
-}
-
-
-
-/*
-
- 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 dlmalloc_trim(size_t pad)
-#else
-int malloc_trim(pad) size_t pad;
-#endif
-{
- long top_size; /* Amount of top-most memory */
- long extra; /* Amount to release */
- char* current_lim; /* address returned by pre-check sbrk call */
- char* new_lim; /* address returned by negative sbrk call */
-
- unsigned long pagesz = malloc_getpagesize;
-
- top_size = chunksize(top);
- extra = ((top_size - pad - MINSIZE + (pagesz-1)) / pagesz - 1) * pagesz;
-
- if (extra < (long)pagesz) /* Not enough memory to release */
- return 0;
-
- else
- {
-#ifdef OTHER_SBRKS
- /* Test to make sure no one else called sbrk */
- current_lim = (char*)(MORECORE (0));
- if (current_lim != (char*)(top) + top_size)
- return 0; /* Apparently we don't own memory; must fail */
-
- else
-#endif
- {
- new_lim = (char*)(MORECORE (-extra));
-
- if (new_lim == (char*)(MORECORE_FAILURE)) /* sbrk failed? */
- {
- /* Try to figure out what we have */
- current_lim = (char*)(MORECORE (0));
- top_size = current_lim - (char*)top;
- if (top_size >= (long)MINSIZE) /* if not, we are very very dead! */
- {
- sbrked_mem = current_lim - sbrk_base;
- set_head(top, top_size | PREV_INUSE);
- init_freed_chunk(top, top_size, 0);
- }
- check_chunk(top);
- return 0;
- }
-
- else
- {
- /* Success. Adjust top accordingly. */
- set_head(top, (top_size - extra) | PREV_INUSE);
- sbrked_mem -= extra;
- init_freed_chunk(top, top_size - extra, 0);
- check_chunk(top);
- return 1;
- }
- }
- }
-}
-
-
-
-/*
- 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 dlmalloc_usable_size(Void_t* mem)
-#else
-size_t malloc_usable_size(mem) Void_t* mem;
-#endif
-{
- mchunkptr p;
- if (mem == 0)
- return 0;
- else
- {
- p = mem2chunk(mem);
- check_inuse_chunk(p);
- maximize_chunk(p);
- if(!chunk_is_mmapped(p))
- {
- if (!inuse(p)) return 0;
- return chunksize(p) - OVERHEAD;
- }
- return chunksize(p) - OVERHEAD - MMAP_EXTRA;
- }
-}
-
-
-
-
-/* Utility to update current_mallinfo for malloc_stats and mallinfo() */
-
-static void malloc_update_mallinfo(void)
-{
- int i;
- mbinptr b;
- mchunkptr p;
-#if DEBUG
- mchunkptr q;
-#endif
-
- INTERNAL_SIZE_T avail = chunksize(top);
- int navail = avail >= MINSIZE ? 1 : 0;
- check_freefill(top, avail, avail);
-
-#if DEBUG
- if (lowest_chunk)
- for (p = lowest_chunk;
- p < top && inuse(p) && chunksize(p) >= MINSIZE;
- p = next_chunk(p))
- check_inuse_chunk(p);
-#endif
-
- 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);
- check_freefill(p, chunksize(p), chunksize(p));
- for (q = next_chunk(p);
- q < top && inuse(q) && chunksize(q) >= 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;
- current_mallinfo.hblks = n_mmaps;
- current_mallinfo.hblkhd = mmapped_mem;
- current_mallinfo.keepcost = chunksize(top);
-
-}
-
-
-
-/*
-
- 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.)
-
-*/
-
-void dlmalloc_stats(void)
-{
- malloc_update_mallinfo();
- fprintf(stderr, "max system bytes = %10u\n",
- (unsigned int)(max_total_mem));
- fprintf(stderr, "system bytes = %10u\n",
- (unsigned int)(sbrked_mem + mmapped_mem));
- fprintf(stderr, "in use bytes = %10u\n",
- (unsigned int)(current_mallinfo.uordblks + mmapped_mem));
-#if HAVE_MMAP
- fprintf(stderr, "max mmap regions = %10u\n",
- (unsigned int)max_n_mmaps);
-#endif
-}
-
-/*
- mallinfo returns a copy of updated current mallinfo.
-*/
-
-struct mallinfo mALLINFo(void)
-{
- malloc_update_mallinfo();
- return current_mallinfo;
-}
-
-
-
-
-/*
- 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(int param_number, int value)
-#else
-int mALLOPt(param_number, value) int param_number; int value;
-#endif
-{
- switch(param_number)
- {
- case M_TRIM_THRESHOLD:
- trim_threshold = value; return 1;
- case M_TOP_PAD:
- top_pad = value; return 1;
- case M_MMAP_THRESHOLD:
- mmap_threshold = value; return 1;
- case M_MMAP_MAX:
-#if HAVE_MMAP
- n_mmaps_max = value; return 1;
-#else
- if (value != 0) return 0; else n_mmaps_max = value; return 1;
-#endif
- case M_SCANHEAP:
-#ifdef DEBUG2
- scanheap = value;
-#endif
- return 1;
-
- default:
- return 0;
- }
-}
-
-/*
-
-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.)
-
-*/
diff --git a/winsup/cygwin/dlmalloc.h b/winsup/cygwin/dlmalloc.h
deleted file mode 100644
index d7bd86927..000000000
--- a/winsup/cygwin/dlmalloc.h
+++ /dev/null
@@ -1,93 +0,0 @@
-
-/*
- * Header file for BBCized version of Doug Lea's malloc.c, automatically
- * generated by
- * /source/prod/libbbc/compat/dlmalloc/cvt
- * from
- * /source/prod/libbbc/compat/dlmalloc/malloc.c
- *
- * bbclabel: autogenerated
- */
-#define _INCLUDE_MALLOC_H_ 1
-void malloc_outofmem(void (*)(void));
-
-
-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 */
-};
-
-
-#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 */
-
-
-#define M_TRIM_THRESHOLD -1
-#define M_TOP_PAD -2
-#define M_MMAP_THRESHOLD -3
-#define M_MMAP_MAX -4
-#define M_SCANHEAP -5
-#define M_FILL
-
-#ifdef MALLOC_DEBUG
-
-#define dlmalloc(size) malloc_dbg(size, __FILE__, __LINE__)
-#define dlfree(p) free_dbg(p, __FILE__, __LINE__)
-#define dlrealloc(p, size) realloc_dbg(p, size, __FILE__, __LINE__)
-#define dlcalloc(n, size) calloc_dbg(n, size, __FILE__, __LINE__)
-#define dlmemalign(align, size) memalign_dbg(align, size, __FILE__, __LINE__)
-#define dlvalloc(size) valloc_dbg(size, __FILE__, __LINE__)
-#define dlpvalloc(size) pvalloc_dbg(size, __FILE__, __LINE__)
-#define dlmalloc_trim(pad) malloc_trim_dbg(pad, __FILE__, __LINE__)
-#define dlmalloc_usable_size(p) malloc_usable_size_dbg(p, __FILE__, __LINE__)
-#define dlmalloc_stats() malloc_stats_dbg(__FILE__, __LINE__)
-#define dlmallopt(flag, val) mallopt_dbg(flag, val, __FILE__, __LINE__)
-#define dlmallinfo() mallinfo_dbg(__FILE__, __LINE__)
-
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-void* malloc_dbg(size_t, const char *, int);
-void free_dbg(void*, const char *, int);
-void* realloc_dbg(void*, size_t, const char *, int);
-void* calloc_dbg(size_t, size_t, const char *, int);
-void* memalign_dbg(size_t, size_t, const char *, int);
-void* valloc_dbg(size_t, const char *, int);
-void* pvalloc_dbg(size_t, const char *, int);
-int malloc_trim_dbg(size_t, const char *, int);
-size_t malloc_usable_size_dbg(void*, const char *, int);
-void malloc_stats_dbg(const char *, int);
-int mallopt_dbg(int, int, const char *, int);
-struct mallinfo mallinfo_dbg(const char *, int);
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* MALLOC_DEBUG */
-
-#ifndef MALLOC_DEBUG
-
-void* malloc(size_t);
-void free(void*);
-void* realloc(void*, size_t);
-void* calloc(size_t, size_t);
-void* memalign(size_t, size_t);
-void* valloc(size_t);
-void* pvalloc(size_t);
-int malloc_trim(size_t);
-size_t malloc_usable_size(void*);
-void malloc_stats(void);
-int mallopt(int, int);
-struct mallinfo mallinfo(void);
-#endif /* !MALLOC_DEBUG */
diff --git a/winsup/cygwin/dtable.cc b/winsup/cygwin/dtable.cc
index 2501a26fd..0f995e4290 100644
--- a/winsup/cygwin/dtable.cc
+++ b/winsup/cygwin/dtable.cc
@@ -1,8 +1,5 @@
/* dtable.cc: file descriptor support.
- Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008, 2009, 2010, 2011, 2012, 2013 Red Hat, Inc.
-
This file is part of Cygwin.
This software is a copyrighted work licensed under the terms of the
@@ -58,7 +55,7 @@ void
dtable_init ()
{
if (!cygheap->fdtab.size)
- cygheap->fdtab.extend (NOFILE_INCR);
+ cygheap->fdtab.extend (NOFILE_INCR, 0);
}
void __stdcall
@@ -72,15 +69,16 @@ set_std_handle (int fd)
}
int
-dtable::extend (int howmuch)
+dtable::extend (size_t howmuch, size_t min)
{
- int new_size = size + howmuch;
+ size_t new_size = size + howmuch;
fhandler_base **newfds;
- if (howmuch <= 0)
- return 0;
-
- if (new_size > OPEN_MAX_MAX)
+ if (new_size <= OPEN_MAX_MAX)
+ /* ok */;
+ else if (size < OPEN_MAX_MAX && min < OPEN_MAX_MAX)
+ new_size = OPEN_MAX_MAX;
+ else
{
set_errno (EMFILE);
return 0;
@@ -224,17 +222,26 @@ dtable::delete_archetype (fhandler_base *fh)
}
int
-dtable::find_unused_handle (int start)
+dtable::find_unused_handle (size_t start)
{
+ /* When extending, try to allocate a NOFILE_INCR chunk
+ following the empty fd. */
+ size_t extendby = NOFILE_INCR + ((start >= size) ? 1 + start - size : 0);
+
+ /* This do loop should only ever execute twice. */
+ int res = -1;
do
{
for (size_t i = start; i < size; i++)
- /* See if open -- no need for overhead of not_open */
if (fds[i] == NULL)
- return i;
+ {
+ res = (int) i;
+ goto out;
+ }
}
- while (extend (NOFILE_INCR));
- return -1;
+ while (extend (extendby, start));
+out:
+ return res;
}
void
@@ -252,14 +259,19 @@ extern "C" int
cygwin_attach_handle_to_fd (char *name, int fd, HANDLE handle, mode_t bin,
DWORD myaccess)
{
+ cygheap->fdtab.lock ();
if (fd == -1)
fd = cygheap->fdtab.find_unused_handle ();
fhandler_base *fh = build_fh_name (name);
if (!fh)
- return -1;
- cygheap->fdtab[fd] = fh;
- cygheap->fdtab[fd]->inc_refcnt ();
- fh->init (handle, myaccess, bin ?: fh->pc_binmode ());
+ fd = -1;
+ else
+ {
+ cygheap->fdtab[fd] = fh;
+ cygheap->fdtab[fd]->inc_refcnt ();
+ fh->init (handle, myaccess, bin ?: fh->pc_binmode ());
+ }
+ cygheap->fdtab.unlock ();
return fd;
}
@@ -356,9 +368,10 @@ dtable::init_std_file_from_handle (int fd, HANDLE handle)
FILE_ACCESS_INFORMATION fai;
int openflags = O_BINARY;
- /* Console windows are not kernel objects, so the access mask returned
- by NtQueryInformationFile is meaningless. CMD always hands down
- stdin handles as R/O handles, but our tty slave sides are R/W. */
+ /* Console windows are no kernel objects up to Windows 7/2008R2, so the
+ access mask returned by NtQueryInformationFile is meaningless. CMD
+ always hands down stdin handles as R/O handles, but our tty slave
+ sides are R/W. */
if (fh->is_tty ())
{
openflags |= O_RDWR;
@@ -436,9 +449,9 @@ build_fh_dev (const device& dev, const char *unix_name)
{
path_conv pc (dev);
if (unix_name)
- pc.set_normalized_path (unix_name);
+ pc.set_posix (unix_name);
else
- pc.set_normalized_path (dev.name);
+ pc.set_posix (dev.name);
return build_fh_pc (pc);
}
@@ -640,7 +653,7 @@ build_fh_pc (path_conv& pc)
else
{
if (!fh->get_name ())
- fh->set_name (fh->dev ().name);
+ fh->set_name (fh->dev ().native);
fh->archetype = fh->clone ();
debug_printf ("created an archetype (%p) for %s(%d/%d)", fh->archetype, fh->get_name (), fh->dev ().get_major (), fh->dev ().get_minor ());
fh->archetype->archetype = NULL;
@@ -704,7 +717,6 @@ dtable::dup3 (int oldfd, int newfd, int flags)
int res = -1;
fhandler_base *newfh = NULL; // = NULL to avoid an incorrect warning
- MALLOC_CHECK;
debug_printf ("dup3 (%d, %d, %y)", oldfd, newfd, flags);
lock ();
bool do_unlock = true;
@@ -754,7 +766,7 @@ dtable::dup3 (int oldfd, int newfd, int flags)
if (!not_open (newfd))
close (newfd);
- else if ((size_t) newfd > size
+ else if ((size_t) newfd >= size
&& find_unused_handle (newfd) < 0)
/* couldn't extend fdtab */
{
@@ -770,7 +782,6 @@ dtable::dup3 (int oldfd, int newfd, int flags)
do_unlock = unlock_on_return;
done:
- MALLOC_CHECK;
if (do_unlock)
unlock ();
syscall_printf ("%R = dup3(%d, %d, %y)", res, oldfd, newfd, flags);
@@ -981,7 +992,7 @@ handle_to_fn (HANDLE h, char *posix_fn)
WCHAR fnbuf[64 * 1024];
if (wcsncasecmp (w32, DEVICE_PREFIX, DEVICE_PREFIX_LEN) != 0
- || !QueryDosDeviceW (NULL, fnbuf, sizeof (fnbuf)))
+ || !QueryDosDeviceW (NULL, fnbuf, sizeof (fnbuf) / sizeof (WCHAR)))
{
sys_wcstombs (posix_fn, NT_MAX_PATH, w32, w32len);
return false;
diff --git a/winsup/cygwin/dtable.h b/winsup/cygwin/dtable.h
index 5fae60523..0f745a75a 100644
--- a/winsup/cygwin/dtable.h
+++ b/winsup/cygwin/dtable.h
@@ -1,8 +1,5 @@
/* dtable.h: fd table definition.
- Copyright 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
- 2011, 2012, 2013 Red Hat, Inc.
-
This file is part of Cygwin.
This software is a copyrighted work licensed under the terms of the
@@ -25,17 +22,12 @@ class suffix_info;
class dtable
{
fhandler_base **fds;
-#ifdef NEWVFORK
- fhandler_base **fds_on_hold;
-#endif
fhandler_base **archetypes;
unsigned narchetypes;
unsigned farchetype;
static const int initial_archetype_size = 8;
- int first_fd_for_open;
+ size_t first_fd_for_open;
int cnt_need_fixup_before;
- void lock () {lock_process::locker.acquire ();}
- void unlock () {lock_process::locker.release ();}
public:
size_t size;
@@ -54,7 +46,7 @@ public:
void vfork_parent_restore ();
void vfork_child_fixup ();
fhandler_base *dup_worker (fhandler_base *oldfh, int flags);
- int extend (int howmuch);
+ int extend (size_t, size_t) __reg3;
void fixup_after_fork (HANDLE);
void fixup_close (size_t, fhandler_base *);
@@ -65,7 +57,7 @@ public:
unlock ();
return res;
}
- int find_unused_handle (int start);
+ int find_unused_handle (size_t start);
int find_unused_handle () { return find_unused_handle (first_fd_for_open);}
void __reg2 release (int fd);
void init_std_file_from_handle (int fd, HANDLE handle);
@@ -79,23 +71,13 @@ public:
void stdio_init ();
void get_debugger_info ();
void set_file_pointers_for_exec ();
-#ifdef NEWVFORK
- bool in_vfork_cleanup () {return fds_on_hold == fds;}
-#endif
fhandler_base *find_archetype (device& dev);
fhandler_base **add_archetype ();
void delete_archetype (fhandler_base *);
void fixup_before_exec (DWORD win_proc_id);
void fixup_before_fork (DWORD win_proc_id);
- friend void dtable_init ();
- friend void __stdcall close_all_files (bool);
- friend int dup_finish (int, int, int);
- friend class fhandler_disk_file;
- friend class cygheap_fdmanip;
- friend class cygheap_fdget;
- friend class cygheap_fdnew;
- friend class cygheap_fdenum;
- friend class lock_process;
+ void lock () {lock_process::locker.acquire ();}
+ void unlock () {lock_process::locker.release ();}
};
fhandler_base *build_fh_dev (const device&, const char * = NULL);
diff --git a/winsup/cygwin/dtable.sgml b/winsup/cygwin/dtable.sgml
deleted file mode 100644
index 73d8b78cc..000000000
--- a/winsup/cygwin/dtable.sgml
+++ /dev/null
@@ -1,20 +0,0 @@
-
-<sect1 id="func-cygwin-attach-handle-to-fd">
-<title>cygwin_attach_handle_to_fd</title>
-
-<funcsynopsis><funcprototype>
-<funcdef>extern "C" int
-<function>cygwin_attach_handle_to_fd</function></funcdef>
-<paramdef>char *<parameter>name</parameter></paramdef>
-<paramdef>int <parameter>fd</parameter></paramdef>
-<paramdef>HANDLE <parameter>handle</parameter></paramdef>
-<paramdef>int <parameter>bin</parameter></paramdef>
-<paramdef>int <parameter>access</parameter></paramdef>
-</funcprototype></funcsynopsis>
-
-<para>This function can be used to turn a Win32 "handle" into a
-posix-style file handle. <parameter>fd</parameter> may be -1 to
-make cygwin allocate a handle; the actual handle is returned
-in all cases.</para>
-
-</sect1>
diff --git a/winsup/cygwin/environ.cc b/winsup/cygwin/environ.cc
index 54b724286..287114985 100644
--- a/winsup/cygwin/environ.cc
+++ b/winsup/cygwin/environ.cc
@@ -1,22 +1,20 @@
/* environ.cc: Cygwin-adopted functions from newlib to manipulate
process's environment.
- Copyright 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007,
- 2008, 2009, 2010, 2011, 2012, 2013 Red Hat, Inc.
-
This software is a copyrighted work licensed under the terms of the
Cygwin license. Please consult the file "CYGWIN_LICENSE" for
details. */
#include "winsup.h"
+#include <userenv.h>
#include <stdlib.h>
#include <wchar.h>
#include <wctype.h>
#include <ctype.h>
#include <locale.h>
#include <assert.h>
+#include <sys/param.h>
#include <cygwin/version.h>
-#include <winnls.h>
#include "pinfo.h"
#include "perprocess.h"
#include "path.h"
@@ -34,7 +32,7 @@ details. */
static char **lastenviron;
-/* Parse CYGWIN options */
+/* Parse CYGNAL options */
static NO_COPY bool export_settings = false;
@@ -90,7 +88,7 @@ set_winsymlinks (const char *buf)
{
if (!user_shared->warned_nonativesyms)
{
- small_printf ("\"winsymlinks:%s\" option detected in CYGWIN environment variable.\n"
+ small_printf ("\"winsymlinks:%s\" option detected in CYGNAL environment variable.\n"
"Native symlinks are not supported on Windows versions prior to\n"
"Windows Vista/Server 2008. This option will be ignored.\n", buf);
user_shared->warned_nonativesyms = 1;
@@ -103,7 +101,7 @@ set_winsymlinks (const char *buf)
}
/* The structure below is used to set up an array which is used to
- parse the CYGWIN environment variable or, if enabled, options from
+ parse the CYGNAL environment variable or, if enabled, options from
the registry. */
static struct parse_thing
{
@@ -138,13 +136,54 @@ static struct parse_thing
{NULL, {0}, setdword, 0, {{0}, {0}}}
};
+/* Return a possibly-quoted token.
+ Returns NULL when no more tokens available. */
+static char *
+strbrk(char *&buf)
+{
+ buf += strspn(buf, " \t");
+ if (!*buf)
+ return NULL;
+ char *tok = buf;
+ char *sep = buf + strcspn(buf, " \t");
+ char *quotestart = strchr(buf, '"');
+ if (!quotestart || quotestart > sep)
+ {
+ buf = sep + !!*sep; /* Don't point beyond EOS */
+ quotestart = NULL;
+ }
+ else
+ {
+ char *quote = quotestart;
+ sep = NULL;
+ while (!sep)
+ {
+ char *clquote = strchr (quote + 1, '"');
+ if (!clquote)
+ sep = strchr (quote, '\0');
+ else if (clquote[-1] != '\\')
+ sep = clquote;
+ else
+ {
+ memmove (clquote - 1, clquote, 1 + strchr (clquote, '\0') - clquote);
+ quote = clquote - 1;
+ }
+ }
+ buf = sep + 1;
+ memmove (quotestart, quotestart + 1, sep - quotestart);
+ sep--;
+ }
+ *sep = '\0';
+ return tok;
+}
+
+
/* Parse a string of the form "something=stuff somethingelse=more-stuff",
silently ignoring unknown "somethings". */
static void __stdcall
parse_options (const char *inbuf)
{
int istrue;
- char *p, *lasts;
parse_thing *k;
if (inbuf == NULL)
@@ -163,15 +202,14 @@ parse_options (const char *inbuf)
if (export_settings)
{
debug_printf ("%s", newbuf + 1);
- setenv ("CYGWIN", newbuf + 1, 1);
+ setenv ("CYGNAL", newbuf + 1, 1);
}
return;
}
char *buf = strcpy ((char *) alloca (strlen (inbuf) + 1), inbuf);
- for (p = strtok_r (buf, " \t", &lasts);
- p != NULL;
- p = strtok_r (NULL, " \t", &lasts))
+
+ while (char *p = strbrk (buf))
{
char *keyword_here = p;
if (!(istrue = !ascii_strncasematch (p, "no", 2)))
@@ -191,8 +229,7 @@ parse_options (const char *inbuf)
switch (k->disposition)
{
case isfunc:
- k->setting.func ((!eq || !istrue) ?
- k->values[istrue].s : eq);
+ k->setting.func ((!eq || !istrue) ? k->values[istrue].s : eq);
debug_printf ("%s (called func)", k->name);
break;
case setdword:
@@ -217,10 +254,12 @@ parse_options (const char *inbuf)
break;
}
+ int n = 0;
if (eq)
- *--eq = ch;
-
- int n = eq - p;
+ {
+ *--eq = ch;
+ n = eq - p;
+ }
p = strdup (keyword_here);
if (n > 0)
p[n] = ':';
@@ -268,66 +307,8 @@ env_path_to_win32 (const void *posix, void *win32, size_t size)
<= CYGWIN_VERSION_DLL_MALLOC_ENV)
#define NL(x) x, (sizeof (x) - 1)
-/* List of names which are converted from dos to unix
- on the way in and back again on the way out.
-
- PATH needs to be here because CreateProcess uses it and gdb uses
- CreateProcess. HOME is here because most shells use it and would be
- confused by Windows style path names. */
-static win_env conv_envvars[] =
- {
- {NL ("PATH="), NULL, NULL, env_PATH_to_posix, env_plist_to_win32, true},
- {NL ("HOME="), NULL, NULL, env_path_to_posix, env_path_to_win32, false},
- {NL ("LD_LIBRARY_PATH="), NULL, NULL,
- env_plist_to_posix, env_plist_to_win32, true},
- {NL ("TMPDIR="), NULL, NULL, env_path_to_posix, env_path_to_win32, false},
- {NL ("TMP="), NULL, NULL, env_path_to_posix, env_path_to_win32, false},
- {NL ("TEMP="), NULL, NULL, env_path_to_posix, env_path_to_win32, false},
- {NULL, 0, NULL, NULL, 0, 0}
- };
#define WC ((unsigned char) 1)
-/* Note: You *must* fill in this array setting the ordinal value of the first
- character of the above environment variable names to 1.
- This table is intended to speed up lookup of these variables. */
-
-static const unsigned char conv_start_chars[256] =
- {
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
-/* A B C D E F G */
- 0, 0, 0, 0, 0, 0, 0, 0,
- /* 72 */
-/* H I J K L M N O */
- WC, 0, 0, 0, WC, 0, 0, 0,
- /* 80 */
-/* P Q R S T U V W */
- WC, 0, 0, 0, WC, 0, 0, 0,
- /* 88 */
-/* x Y Z */
- 0, 0, 0, 0, 0, 0, 0, 0,
- /* 96 */
-/* a b c d e f g */
- 0, 0, 0, 0, 0, 0, 0, 0,
- /* 104 */
-/* h i j k l m n o */
- WC, 0, 0, 0, WC, 0, 0, 0,
- /* 112 */
-/* p q r s t u v w */
- WC, 0, 0, 0, WC, 0, 0, 0,
- };
-
-static inline char
-match_first_char (const char *s, unsigned char m)
-{
- return conv_start_chars[(unsigned) *s] & m;
-}
struct win_env&
win_env::operator = (struct win_env& x)
@@ -351,26 +332,21 @@ win_env::~win_env ()
void
win_env::add_cache (const char *in_posix, const char *in_native)
{
- MALLOC_CHECK;
posix = (char *) realloc (posix, strlen (in_posix) + 1);
strcpy (posix, in_posix);
if (in_native)
{
native = (char *) realloc (native, namelen + 1 + strlen (in_native));
- strcpy (native, name);
- strcpy (native + namelen, in_native);
+ stpcpy (stpcpy (native, name), in_native);
}
else
{
tmp_pathbuf tp;
char *buf = tp.c_get ();
- strcpy (buf, name + namelen);
towin32 (in_posix, buf, NT_MAX_PATH);
native = (char *) realloc (native, namelen + 1 + strlen (buf));
- strcpy (native, name);
- strcpy (native + namelen, buf);
+ stpcpy (stpcpy (native, name), buf);
}
- MALLOC_CHECK;
if (immediate && cygwin_finished_initializing)
{
wchar_t s[sys_mbstowcs (NULL, 0, native) + 1];
@@ -391,28 +367,10 @@ win_env::add_cache (const char *in_posix, const char *in_native)
win_env * __reg3
getwinenv (const char *env, const char *in_posix, win_env *temp)
{
- if (!match_first_char (env, WC))
- return NULL;
-
- for (int i = 0; conv_envvars[i].name != NULL; i++)
- if (strncmp (env, conv_envvars[i].name, conv_envvars[i].namelen) == 0)
- {
- win_env *we = conv_envvars + i;
- const char *val;
- if (!cur_environ () || !(val = in_posix ?: getenv (we->name)))
- debug_printf ("can't set native for %s since no environ yet",
- we->name);
- else if (!we->posix || strcmp (val, we->posix) != 0)
- {
- if (temp)
- {
- *temp = *we;
- we = temp;
- }
- we->add_cache (val);
- }
- return we;
- }
+ /* in Cygnal, we don't do any of this. A native
+ * library should leave environment variables alone,
+ * passing them as-is to subordinate processes.
+ */
return NULL;
}
@@ -441,15 +399,15 @@ posify_maybe (char **here, const char *value, char *outenv)
{
/* The conversion routine removed elements from a path list so we have
to recalculate the windows path to remove elements there, too. */
- char cleanvalue[strlen (value) + 1];
- conv->towin32 (newvalue, cleanvalue, sizeof cleanvalue);
+ tmp_pathbuf tp;
+ char *cleanvalue = tp.c_get ();
+ conv->towin32 (newvalue, cleanvalue, NT_MAX_PATH);
conv->add_cache (newvalue, cleanvalue);
}
debug_printf ("env var converted to %s", outenv);
*here = strdup (outenv);
free (src);
- MALLOC_CHECK;
}
/* Returns pointer to value associated with name, if any, else NULL.
@@ -479,7 +437,6 @@ my_findenv (const char *name, int *offset)
*offset = p - cur_environ ();
return (char *) (++c);
}
- MALLOC_CHECK;
return NULL;
}
@@ -614,10 +571,9 @@ _addenv (const char *name, const char *value, int overwrite)
win_env *spenv;
if ((spenv = getwinenv (envhere)))
spenv->add_cache (value);
- if (strcmp (name, "CYGWIN") == 0)
+ if (strcmp (name, "CYGNAL") == 0)
parse_options (value);
- MALLOC_CHECK;
return 0;
}
@@ -625,19 +581,22 @@ _addenv (const char *name, const char *value, int overwrite)
extern "C" int
putenv (char *str)
{
- myfault efault;
- if (efault.faulted (EFAULT))
- return -1;
- if (*str)
+ __try
{
- char *eq = strchr (str, '=');
- if (eq)
- return _addenv (str, eq + 1, -1);
+ if (*str)
+ {
+ char *eq = strchr (str, '=');
+ if (eq)
+ return _addenv (str, eq + 1, -1);
- /* Remove str from the environment. */
- unsetenv (str);
+ /* Remove str from the environment. */
+ unsetenv (str);
+ }
+ return 0;
}
- return 0;
+ __except (EFAULT) {}
+ __endtry
+ return -1;
}
/* Set the value of the environment variable "name" to be
@@ -645,15 +604,18 @@ putenv (char *str)
extern "C" int
setenv (const char *name, const char *value, int overwrite)
{
- myfault efault;
- if (efault.faulted (EFAULT))
- return -1;
- if (!name || !*name || strchr (name, '='))
+ __try
{
- set_errno (EINVAL);
- return -1;
+ if (!name || !*name || strchr (name, '='))
+ {
+ set_errno (EINVAL);
+ __leave;
+ }
+ return _addenv (name, value, !!overwrite);
}
- return _addenv (name, value, !!overwrite);
+ __except (EFAULT) {}
+ __endtry
+ return -1;
}
/* Delete environment variable "name". */
@@ -662,22 +624,26 @@ unsetenv (const char *name)
{
register char **e;
int offset;
- myfault efault;
- if (efault.faulted (EFAULT))
- return -1;
- if (!name || *name == '\0' || strchr (name, '='))
+
+ __try
{
- set_errno (EINVAL);
- return -1;
- }
+ if (!name || *name == '\0' || strchr (name, '='))
+ {
+ set_errno (EINVAL);
+ __leave;
+ }
- while (my_findenv (name, &offset)) /* if set multiple times */
- /* Move up the rest of the array */
- for (e = cur_environ () + offset; ; e++)
- if (!(*e = *(e + 1)))
- break;
+ while (my_findenv (name, &offset)) /* if set multiple times */
+ /* Move up the rest of the array */
+ for (e = cur_environ () + offset; ; e++)
+ if (!(*e = *(e + 1)))
+ break;
- return 0;
+ return 0;
+ }
+ __except (EFAULT) {}
+ __endtry
+ return -1;
}
/* Minimal list of Windows vars which must be converted to uppercase.
@@ -687,37 +653,23 @@ static struct renv {
const char *name;
const size_t namelen;
} renv_arr[] = {
- { NL("ALLUSERSPROFILE=") }, // 0
- { NL("COMMONPROGRAMFILES=") }, // 1
- { NL("COMPUTERNAME=") },
+ { NL("COMMONPROGRAMFILES=") }, // 0
{ NL("COMSPEC=") },
- { NL("HOME=") }, // 4
- { NL("HOMEDRIVE=") },
- { NL("HOMEPATH=") },
- { NL("NUMBER_OF_PROCESSORS=") }, // 7
- { NL("OS=") }, // 8
- { NL("PATH=") }, // 9
- { NL("PATHEXT=") },
- { NL("PROCESSOR_ARCHITECTURE=") },
- { NL("PROCESSOR_IDENTIFIER=") },
- { NL("PROCESSOR_LEVEL=") },
- { NL("PROCESSOR_REVISION=") },
+ { NL("PATH=") }, // 2
{ NL("PROGRAMFILES=") },
- { NL("SYSTEMDRIVE=") }, // 16
+ { NL("SYSTEMDRIVE=") }, // 4
{ NL("SYSTEMROOT=") },
- { NL("TEMP=") }, // 18
- { NL("TERM=") },
+ { NL("TEMP=") }, // 6
{ NL("TMP=") },
- { NL("TMPDIR=") },
- { NL("WINDIR=") } // 22
+ { NL("WINDIR=") } // 8
};
#define RENV_SIZE (sizeof (renv_arr) / sizeof (renv_arr[0]))
/* Set of first characters of the above list of variables. */
-static const char idx_arr[] = "ACHNOPSTW";
+static const char idx_arr[] = "CPSTW";
/* Index into renv_arr at which the variables with this specific character
starts. */
-static const int start_at[] = { 0, 1, 4, 7, 8, 9, 16, 18, 22 };
+static const int start_at[] = { 0, 2, 4, 6, 8 };
/* Turn environment variable part of a=b string into uppercase - for some
environment variables only. */
@@ -739,39 +691,8 @@ ucenv (char *p, const char *eq)
}
}
-/* Set options from the registry. */
-static bool __stdcall
-regopt (const WCHAR *name, char *buf)
-{
- bool parsed_something = false;
- UNICODE_STRING lname;
- size_t len = (wcslen(name) + 1) * sizeof (WCHAR);
- RtlInitEmptyUnicodeString(&lname, (PWCHAR) alloca (len), len);
- wcscpy(lname.Buffer, name);
- RtlDowncaseUnicodeString(&lname, &lname, FALSE);
-
- for (int i = 0; i < 2; i++)
- {
- reg_key r (i, KEY_READ, _WIDE (CYGWIN_INFO_PROGRAM_OPTIONS_NAME), NULL);
-
- if (NT_SUCCESS (r.get_string (lname.Buffer, (PWCHAR) buf,
- NT_MAX_PATH, L"")))
- {
- char *newp;
- sys_wcstombs_alloc(&newp, HEAP_NOTHEAP, (PWCHAR) buf);
- strcpy(buf, newp);
- parse_options (buf);
- parsed_something = true;
- break;
- }
- }
-
- MALLOC_CHECK;
- return parsed_something;
-}
-
-/* Initialize the environ array. Look for the CYGWIN environment
- environment variable and set appropriate options from it. */
+/* Initialize the environ array. Look for the CYGNAL environment variable and
+ set appropriate options from it. */
void
environ_init (char **envp, int envc)
{
@@ -781,98 +702,92 @@ environ_init (char **envp, int envc)
char *newp;
int sawTERM = 0;
bool envp_passed_in;
- bool got_something_from_registry;
static char NO_COPY cygterm[] = "TERM=cygwin";
- myfault efault;
tmp_pathbuf tp;
- if (efault.faulted ())
- api_fatal ("internal error reading the windows environment - too many environment variables?");
-
- char *tmpbuf = tp.t_get ();
- got_something_from_registry = regopt (L"default", tmpbuf);
- if (myself->progname[0])
- got_something_from_registry = regopt (myself->progname, tmpbuf)
- || got_something_from_registry;
-
- if (!envp)
- envp_passed_in = 0;
- else
+ __try
{
- envc++;
- envc *= sizeof (char *);
- char **newenv = (char **) malloc (envc);
- memcpy (newenv, envp, envc);
- cfree (envp);
-
- /* Older applications relied on the fact that cygwin malloced elements of the
- environment list. */
- envp = newenv;
- if (ENVMALLOC)
- for (char **e = newenv; *e; e++)
- {
- char *p = *e;
- *e = strdup (p);
- cfree (p);
- }
- envp_passed_in = 1;
- goto out;
- }
+ char *tmpbuf = tp.t_get ();
+ if (!envp)
+ envp_passed_in = 0;
+ else
+ {
+ envc++;
+ envc *= sizeof (char *);
+ char **newenv = (char **) malloc (envc);
+ memcpy (newenv, envp, envc);
+ cfree (envp);
+
+ /* Older applications relied on the fact that cygwin malloced elements of the
+ environment list. */
+ envp = newenv;
+ if (ENVMALLOC)
+ for (char **e = newenv; *e; e++)
+ {
+ char *p = *e;
+ *e = strdup (p);
+ cfree (p);
+ }
+ envp_passed_in = 1;
+ goto out;
+ }
- /* Allocate space for environment + trailing NULL + CYGWIN env. */
- lastenviron = envp = (char **) malloc ((4 + (envc = 100)) * sizeof (char *));
+ /* Allocate space for environment + trailing NULL + CYGNAL env. */
+ lastenviron = envp = (char **) malloc ((4 + (envc = 100)) * sizeof (char *));
- rawenv = GetEnvironmentStringsW ();
- if (!rawenv)
- {
- system_printf ("GetEnvironmentStrings returned NULL, %E");
- return;
- }
- debug_printf ("GetEnvironmentStrings returned %p", rawenv);
+ rawenv = GetEnvironmentStringsW ();
+ if (!rawenv)
+ {
+ system_printf ("GetEnvironmentStrings returned NULL, %E");
+ return;
+ }
+ debug_printf ("GetEnvironmentStrings returned %p", rawenv);
- /* Current directory information is recorded as variables of the
- form "=X:=X:\foo\bar; these must be changed into something legal
- (we could just ignore them but maybe an application will
- eventually want to use them). */
- for (i = 0, w = rawenv; *w != L'\0'; w = wcschr (w, L'\0') + 1, i++)
- {
- sys_wcstombs_alloc (&newp, HEAP_NOTHEAP, w);
- if (i >= envc)
- envp = (char **) realloc (envp, (4 + (envc += 100)) * sizeof (char *));
- envp[i] = newp;
- if (*newp == '=')
- *newp = '!';
- char *eq = strchrnul (newp, '=');
- ucenv (newp, eq); /* uppercase env vars which need it */
- if (*newp == 'T' && strncmp (newp, "TERM=", 5) == 0)
- sawTERM = 1;
- else if (*newp == 'C' && strncmp (newp, "CYGWIN=", 7) == 0)
- parse_options (newp + 7);
- if (*eq)
- posify_maybe (envp + i, *++eq ? eq : --eq, tmpbuf);
- debug_printf ("%p: %s", envp[i], envp[i]);
- }
+ /* Current directory information is recorded as variables of the
+ form "=X:=X:\foo\bar; these must be changed into something legal
+ (we could just ignore them but maybe an application will
+ eventually want to use them). */
+ for (i = 0, w = rawenv; *w != L'\0'; w = wcschr (w, L'\0') + 1, i++)
+ {
+ sys_wcstombs_alloc_no_path (&newp, HEAP_NOTHEAP, w);
+ if (i >= envc)
+ envp = (char **) realloc (envp, (4 + (envc += 100)) * sizeof (char *));
+ envp[i] = newp;
+ if (*newp == '=')
+ *newp = '!';
+ char *eq = strchrnul (newp, '=');
+ ucenv (newp, eq); /* uppercase env vars which need it */
+ if (*newp == 'T' && strncmp (newp, "TERM=", 5) == 0)
+ sawTERM = 1;
+ else if (*newp == 'C' && strncmp (newp, "CYGNAL=", 7) == 0)
+ parse_options (newp + 7);
+ if (*eq)
+ posify_maybe (envp + i, *++eq ? eq : --eq, tmpbuf);
+ debug_printf ("%p: %s", envp[i], envp[i]);
+ }
- if (!sawTERM)
- envp[i++] = strdup (cygterm);
- envp[i] = NULL;
- FreeEnvironmentStringsW (rawenv);
+ if (!sawTERM)
+ envp[i++] = strdup (cygterm);
+ envp[i] = NULL;
+ FreeEnvironmentStringsW (rawenv);
-out:
- findenv_func = (char * (*)(const char*, int*)) my_findenv;
- __cygwin_environ = envp;
- update_envptrs ();
- if (envp_passed_in)
+ out:
+ findenv_func = (char * (*)(const char*, int*)) my_findenv;
+ __cygwin_environ = envp;
+ update_envptrs ();
+ if (envp_passed_in)
+ {
+ p = getenv ("CYGNAL");
+ if (p)
+ parse_options (p);
+ }
+ }
+ __except (NO_ERROR)
{
- p = getenv ("CYGWIN");
- if (p)
- parse_options (p);
+ api_fatal ("internal error reading the windows environment "
+ "- too many environment variables?");
}
-
- if (got_something_from_registry)
- parse_options (NULL); /* possibly export registry settings to
- environment */
- MALLOC_CHECK;
+ __endtry
}
/* Function called by qsort to sort environment strings. */
@@ -895,7 +810,7 @@ getwinenveq (const char *name, size_t namelen, int x)
int totlen = GetEnvironmentVariableW (name0, valbuf, 32768);
if (totlen > 0)
{
- totlen = sys_wcstombs (NULL, 0, valbuf);
+ totlen = sys_wcstombs_no_path (NULL, 0, valbuf) + 1;
if (x == HEAP_1_STR)
totlen += namelen;
else
@@ -903,7 +818,7 @@ getwinenveq (const char *name, size_t namelen, int x)
char *p = (char *) cmalloc_abort ((cygheap_types) x, totlen);
if (namelen)
strcpy (p, name);
- sys_wcstombs (p + namelen, totlen, valbuf);
+ sys_wcstombs_no_path (p + namelen, totlen, valbuf);
debug_printf ("using value from GetEnvironmentVariable for '%W'", name0);
return p;
}
@@ -929,7 +844,7 @@ struct spenv
static NO_COPY spenv spenvs[] =
{
#ifdef DEBUGGING
- {NL ("CYGWIN_DEBUG="), false, true, NULL},
+ {NL ("CYGNAL_DEBUG="), false, true, NULL},
#endif
{NL ("HOMEDRIVE="), false, false, &cygheap_user::env_homedrive},
{NL ("HOMEPATH="), false, false, &cygheap_user::env_homepath},
@@ -978,16 +893,56 @@ spenv::retrieve (bool no_envblock, const char *const env)
return getwinenveq (name, namelen, HEAP_1_STR);
}
+static inline int
+raise_envblock (int new_tl, PWCHAR &envblock, PWCHAR &s)
+{
+ int tl = new_tl + 100;
+ PWCHAR new_envblock =
+ (PWCHAR) realloc (envblock, (2 + tl) * sizeof (WCHAR));
+ /* If realloc moves the block, move `s' with it. */
+ if (new_envblock != envblock)
+ {
+ s += new_envblock - envblock;
+ envblock = new_envblock;
+ }
+ return tl;
+}
+
#define SPENVS_SIZE (sizeof (spenvs) / sizeof (spenvs[0]))
+int
+env_compare (const void *key, const void *memb)
+{
+ const char *k = *(const char **) key;
+ const char *m = *(const char **) memb;
+
+ char *ke = strchr (k, '=');
+ char *me = strchr (m, '=');
+ if (ke == NULL || me == NULL)
+ return strcasecmp (k, m);
+ int ret = strncasecmp (k, m, MIN (ke - k, me - m));
+ if (!ret)
+ ret = (ke - k) - (me - m);
+ return ret;
+}
+
/* Create a Windows-style environment block, i.e. a typical character buffer
filled with null terminated strings, terminated by double null characters.
Converts environment variables noted in conv_envvars into win32 form
- prior to placing them in the string. */
+ prior to placing them in the string.
+
+ If new_token is set, we're going to switch the user account in
+ child_info_spawn::worker. If so, we're also fetching the Windows default
+ environment for the new user, and merge it into the environment we propage
+ to the child. */
char ** __reg3
build_env (const char * const *envp, PWCHAR &envblock, int &envc,
- bool no_envblock)
+ bool no_envblock, HANDLE new_token)
{
+ PWCHAR cwinenv = NULL;
+ size_t winnum = 0;
+ char **winenv = NULL;
+
int len, n;
const char * const *srcp;
char **dstp;
@@ -999,13 +954,57 @@ build_env (const char * const *envp, PWCHAR &envblock, int &envc,
for (n = 0; envp[n]; n++)
continue;
+ /* Fetch windows env and convert to POSIX-style env. */
+ if (new_token
+ && CreateEnvironmentBlock ((LPVOID *) &cwinenv, new_token, FALSE))
+ {
+ PWCHAR var = cwinenv;
+ while (*var)
+ {
+ ++winnum;
+ var = wcschr (var, L'\0') + 1;
+ }
+ winenv = (char **) calloc (winnum + 1, sizeof (char *));
+ if (winenv)
+ {
+ for (winnum = 0, var = cwinenv;
+ *var;
+ ++winnum, var = wcschr (var, L'\0') + 1)
+ sys_wcstombs_alloc_no_path (&winenv[winnum], HEAP_NOTHEAP, var);
+ }
+ DestroyEnvironmentBlock (cwinenv);
+ /* Eliminate variables which are already available in envp.
+ The windows env is sorted, so we can use bsearch. We're doing this
+ first step, so the following code doesn't
+ allocate too much memory. */
+ if (winenv)
+ {
+ for (srcp = envp; *srcp; srcp++)
+ {
+ char **elem = (char **) bsearch (srcp, winenv, winnum,
+ sizeof *winenv, env_compare);
+ if (elem)
+ {
+ free (*elem);
+ /* Use memmove to keep array sorted.
+ winnum - (elem - winenv) copies all elements following
+ elem, including the trailing NULL pointer. */
+ memmove (elem, elem + 1,
+ (winnum - (elem - winenv)) * sizeof *elem);
+ --winnum;
+ }
+ }
+ }
+ }
+
/* Allocate a new "argv-style" environ list with room for extra stuff. */
char **newenv = (char **) cmalloc_abort (HEAP_1_ARGV, sizeof (char *) *
- (n + SPENVS_SIZE + 1));
+ (n + winnum + SPENVS_SIZE + 1));
int tl = 0;
char **pass_dstp;
- char **pass_env = (char **) alloca (sizeof (char *) * (n + SPENVS_SIZE + 1));
+ char **pass_env = (char **) alloca (sizeof (char *)
+ * (n + winnum + SPENVS_SIZE + 1));
/* Iterate over input list, generating a new environment list and refreshing
"special" entries, if necessary. */
for (srcp = envp, dstp = newenv, pass_dstp = pass_env; *srcp; srcp++)
@@ -1040,19 +1039,48 @@ build_env (const char * const *envp, PWCHAR &envblock, int &envc,
assert ((srcp - envp) == n);
/* Fill in any required-but-missing environment variables. */
for (unsigned i = 0; i < SPENVS_SIZE; i++)
- if (!saw_spenv[i] && (spenvs[i].force_into_environment || cygheap->user.issetuid ()))
+ if (!saw_spenv[i] && (spenvs[i].force_into_environment
+ || cygheap->user.issetuid ()))
{
- *dstp = spenvs[i].retrieve (false);
- if (*dstp && *dstp != env_dontadd)
- {
- *pass_dstp++ = *dstp;
- tl += strlen (*dstp) + 1;
- dstp++;
- }
+ *dstp = spenvs[i].retrieve (false);
+ if (*dstp && *dstp != env_dontadd)
+ {
+ *pass_dstp++ = *dstp;
+ tl += strlen (*dstp) + 1;
+ /* Eliminate from winenv. */
+ if (winenv)
+ {
+ char **elem = (char **) bsearch (dstp, winenv, winnum,
+ sizeof *winenv, env_compare);
+ if (elem)
+ {
+ free (*elem);
+ memmove (elem, elem + 1,
+ (winnum - (elem - winenv)) * sizeof *elem);
+ --winnum;
+ }
+ }
+ dstp++;
+ }
+ }
+
+ /* Fill in any Windows environment vars still missing. */
+ if (winenv)
+ {
+ char **elem;
+ for (elem = winenv; *elem; ++elem)
+ {
+ *dstp = cstrdup1 (*elem);
+ free (*elem);
+ *pass_dstp++ = *dstp;
+ tl += strlen (*dstp) + 1;
+ ++dstp;
}
+ free (winenv);
+ }
envc = dstp - newenv; /* Number of entries in newenv */
- assert ((size_t) envc <= (n + SPENVS_SIZE));
+ assert ((size_t) envc <= (n + winnum + SPENVS_SIZE));
*dstp = NULL; /* Terminate */
size_t pass_envc = pass_dstp - pass_env;
@@ -1072,6 +1100,7 @@ build_env (const char * const *envp, PWCHAR &envblock, int &envc,
PWCHAR s;
envblock = (PWCHAR) malloc ((2 + tl) * sizeof (WCHAR));
int new_tl = 0;
+ bool saw_PATH = false;
for (srcp = pass_env, s = envblock; *srcp; srcp++)
{
const char *p;
@@ -1090,7 +1119,17 @@ build_env (const char * const *envp, PWCHAR &envblock, int &envc,
/* See if this entry requires posix->win32 conversion. */
conv = getwinenv (*srcp, rest, &temp);
if (conv)
- p = conv->native; /* Use win32 path */
+ {
+ p = conv->native; /* Use win32 path */
+ /* Does PATH exist in the environment? */
+ if (**srcp == 'P')
+ {
+ /* And is it non-empty? */
+ if (!conv->native || !conv->native[0])
+ continue;
+ saw_PATH = true;
+ }
+ }
else
p = *srcp; /* Don't worry about it */
@@ -1099,19 +1138,9 @@ build_env (const char * const *envp, PWCHAR &envblock, int &envc,
/* See if we need to increase the size of the block. */
if (new_tl > tl)
- {
- tl = new_tl + 100;
- PWCHAR new_envblock =
- (PWCHAR) realloc (envblock, (2 + tl) * sizeof (WCHAR));
- /* If realloc moves the block, move `s' with it. */
- if (new_envblock != envblock)
- {
- s += new_envblock - envblock;
- envblock = new_envblock;
- }
- }
+ tl = raise_envblock (new_tl, envblock, s);
- int slen = sys_mbstowcs (s, len, p);
+ len = sys_mbstowcs (s, len, p);
/* See if environment variable is "special" in a Windows sense.
Under NT, the current directories for visited drives are stored
@@ -1120,7 +1149,17 @@ build_env (const char * const *envp, PWCHAR &envblock, int &envc,
if (s[0] == L'!' && (iswdrive (s + 1) || (s[1] == L':' && s[2] == L':'))
&& s[3] == L'=')
*s = L'=';
- s += slen + 1;
+ s += len + 1;
+ }
+ /* If PATH doesn't exist in the environment, add a PATH with just
+ Cygwin's bin dir to the Windows env to allow loading system DLLs
+ during execve. */
+ if (!saw_PATH)
+ {
+ new_tl += cygheap->installation_dir_len + 5;
+ if (new_tl > tl)
+ tl = raise_envblock (new_tl, envblock, s);
+ s = wcpcpy (wcpcpy (s, L"PATH="), cygheap->installation_dir) + 1;
}
*s = L'\0'; /* Two null bytes at the end */
assert ((s - envblock) <= tl); /* Detect if we somehow ran over end
diff --git a/winsup/cygwin/environ.h b/winsup/cygwin/environ.h
index b2d65c8bd..46beb2d1a 100644
--- a/winsup/cygwin/environ.h
+++ b/winsup/cygwin/environ.h
@@ -1,7 +1,5 @@
/* environ.h: Declarations for environ manipulation
- Copyright 2000, 2001, 2002, 2003, 2005, 2006, 2008, 2013 Red Hat, Inc.
-
This file is part of Cygwin.
This software is a copyrighted work licensed under the terms of the
@@ -45,6 +43,6 @@ extern "C" char **__cygwin_environ, ***main_environ;
extern "C" char __stdcall **cur_environ ();
#endif
char ** __reg3 build_env (const char * const *envp, PWCHAR &envblock,
- int &envc, bool need_envblock);
+ int &envc, bool need_envblock, HANDLE new_token);
#define ENV_CVT -1
diff --git a/winsup/cygwin/errno.cc b/winsup/cygwin/errno.cc
index 2a5f711bd..7e07a6178 100644
--- a/winsup/cygwin/errno.cc
+++ b/winsup/cygwin/errno.cc
@@ -1,8 +1,5 @@
/* errno.cc: errno-related functions
- Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2008, 2009, 2010, 2011, 2012, 2013 Red Hat, Inc.
-
This file is part of Cygwin.
This software is a copyrighted work licensed under the terms of the
@@ -59,17 +56,21 @@ static const struct
X (BUSY, EBUSY),
X (BUS_RESET, EIO),
X (CALL_NOT_IMPLEMENTED, ENOSYS),
+ X (CANCELLED, EINTR),
X (CANNOT_MAKE, EPERM),
X (CHILD_NOT_COMPLETE, EBUSY),
X (COMMITMENT_LIMIT, EAGAIN),
+ X (CONNECTION_REFUSED, ECONNREFUSED),
X (CRC, EIO),
X (DEVICE_DOOR_OPEN, EIO),
X (DEVICE_IN_USE, EAGAIN),
X (DEVICE_REQUIRES_CLEANING, EIO),
+ X (DEV_NOT_EXIST, ENOENT),
X (DIRECTORY, ENOTDIR),
X (DIR_NOT_EMPTY, ENOTEMPTY),
X (DISK_CORRUPT, EIO),
X (DISK_FULL, ENOSPC),
+ X (DS_GENERIC_ERROR, EIO),
X (DUP_NAME, ENOTUNIQ),
X (EAS_DIDNT_FIT, ENOSPC),
X (EAS_NOT_SUPPORTED, ENOTSUP),
@@ -115,6 +116,7 @@ static const struct
X (NONPAGED_SYSTEM_RESOURCES, EAGAIN),
X (NOT_CONNECTED, ENOLINK),
X (NOT_ENOUGH_MEMORY, ENOMEM),
+ X (NOT_ENOUGH_QUOTA, EIO),
X (NOT_OWNER, EPERM),
X (NOT_READY, ENOMEDIUM),
X (NOT_SAME_DEVICE, EXDEV),
@@ -146,6 +148,7 @@ static const struct
X (REM_NOT_LIST, ENONET),
X (SECTOR_NOT_FOUND, EINVAL),
X (SEEK, EINVAL),
+ X (SERVICE_REQUEST_TIMEOUT, EBUSY),
X (SETMARK_DETECTED, EIO),
X (SHARING_BUFFER_EXCEEDED, ENOLCK),
X (SHARING_VIOLATION, EBUSY),
@@ -153,8 +156,10 @@ static const struct
X (SIGNAL_REFUSED, EIO),
X (SXS_CANT_GEN_ACTCTX, ELIBBAD),
X (THREAD_1_INACTIVE, EINVAL),
+ X (TIMEOUT, EBUSY),
X (TOO_MANY_LINKS, EMLINK),
X (TOO_MANY_OPEN_FILES, EMFILE),
+ X (UNEXP_NET_ERR, EIO),
X (WAIT_NO_CHILDREN, ECHILD),
X (WORKING_SET_QUOTA, EAGAIN),
X (WRITE_PROTECT, EROFS),
@@ -355,13 +360,6 @@ seterrno_from_nt_status (const char *file, int line, NTSTATUS status)
errno = _impure_ptr->_errno = geterrno_from_win_error (code, EACCES);
}
-/* seterrno: Set `errno' based on GetLastError (). */
-void __reg2
-seterrno (const char *file, int line)
-{
- seterrno_from_win_error (file, line, GetLastError ());
-}
-
static char *
strerror_worker (int errnum)
{
diff --git a/winsup/cygwin/exception.h b/winsup/cygwin/exception.h
index 5b11b0c00..e4564b044 100644
--- a/winsup/cygwin/exception.h
+++ b/winsup/cygwin/exception.h
@@ -1,68 +1,178 @@
/* exception.h
- Copyright 2010, 2011, 2012, 2013 Red Hat, Inc.
-
This software is a copyrighted work licensed under the terms of the
Cygwin license. Please consult the file "CYGWIN_LICENSE" for
details. */
#pragma once
-#ifdef __x86_64__
-#define _exception_list _EXCEPTION_REGISTRATION_RECORD
-#endif
+#ifndef __x86_64__
+/* Documentation on the innards of 32 bit Windows exception handling (i.e.
+ from the perspective of a compiler implementor) apparently doesn't exist.
+ However, the following came from Onno Hovers <onno@stack.urc.tue.nl>
-#include <exceptions.h>
+The first pointer to the chain of handlers is in the thread environment block
+at FS:[0]. This chain has the following format:
+
+typedef struct __EXCEPTION_FRAME
+{
+ struct __EXCEPTION_FRAME *Prev; /-* pointer to the previous frame *-/
+ PEXCEPTION_HANDLER Handler; /-* handler function *-/
+}
+
+You register an exception handler in your compiler with this simple ASM
+sequence:
+ PUSH _MyExceptionHandler
+ PUSH FS:[0]
+ MOV FS:[0],ESP
+An exception frame MUST be on the stack! The frame may have more fields and
+both Visual C++ and Borland C++ use more fields for themselves.
+
+When an exception occurs the system calls all handlers starting with the
+handler at FS:0, and then the previous etc. until one handler returns
+ExceptionContinueExecution, which is 0. If a handler does not want to handle
+the exception it should just return ExceptionContinueSearch, which is 1.
+
+The handler has the following parameters:
+ehandler (
+ PEXCEPTION_RECORD erecord,
+ PEXCEPTION_FRAME myframe,
+ PCONTEXT context, /-* context before and after *-/
+ PVOID dispatch) /-* something *-/
+
+When a handler wants to handle the exception, it has some alternatives:
+
+-one is to do do something about the exception condition, like emulating
+an invalid instruction, mapping memory where there was a page fault, etc.
+If the handler wants to have the context of the thread that causes the
+exception changed, it should make that change in the context passed to the
+handler.
+
+-the second alternative is to call all exception handlers again, indicating
+that you want them to clean up. This way all the __finally blocks get
+executed. After doing that you change the context passed to the handler so
+the code starts executing in the except block. For this purpose you could
+call RtlUnwind. This (undocumented) function calls all exception handlers
+up to but not including the exception frame passed to it. If NULL is passed
+as exception frame RtlUnwind calls all exception handlers and then exits the
+process. The parameters to RtlUnwind are:
+
+RtlUnwind (
+ PEXCEPTION_FRAME endframe,
+ PVOID unusedEip,
+ PEXCEPTION_RECORD erecord,
+ DWORD returnEax)
+
+You should set unusedEip to the address where RtlUnwind should return like
+this:
+ PUSH 0
+ PUSH OFFSET ReturnUnwind
+ PUSH 0
+ PUSH 0
+ CALL RtlUnwind
+ReturnUnwind:
+ .....
+
+If no EXCEPTION_RECORD is passed, RtlUnwind makes a default exception
+record. In any case, the ExceptionFlags part of this record has the
+EH_UNWINDING (=2), flag set. (and EH_EXIT_UNWIND (=4), when NULL is passed as the end
+frame.).
+
+The handler for a exception as well as a for unwinds may be executed in the
+thread causing the exception, but may also be executed in another (special
+exception) thread. So it is not wise to make any assumptions about that!
+
+As an alternative you may consider the SetUnhandledExceptionFilter API
+to install your own exception filter. This one is documented.
+*/
+
+/* The January 1994 MSJ has an article entitled "Clearer, More Comprehensive
+ Error Processing with Win32 Structured Exception Handling". It goes into
+ a teensy bit of detail of the innards of exception handling (i.e. what we
+ have to do). */
+
+typedef EXCEPTION_DISPOSITION (exception_handler) (EXCEPTION_RECORD *,
+ struct _exception_list *,
+ CONTEXT *,
+ void *);
+
+typedef struct _exception_list
+{
+ struct _exception_list *prev;
+ exception_handler *handler;
+} exception_list;
-#ifndef __x86_64__
extern exception_list *_except_list asm ("%fs:0");
-#endif
+typedef void *PDISPATCHER_CONTEXT;
class exception
{
-#ifdef __x86_64__
- static bool handler_installed;
- static int handle (LPEXCEPTION_POINTERS);
-#else
exception_list el;
exception_list *save;
- static int handle (EXCEPTION_RECORD *, exception_list *, CONTEXT *, void *);
-#endif
+ static EXCEPTION_DISPOSITION handle (EXCEPTION_RECORD *, exception_list *,
+ CONTEXT *, PDISPATCHER_CONTEXT);
public:
exception () __attribute__ ((always_inline))
{
-#ifdef __x86_64__
- if (!handler_installed)
- {
- handler_installed = true;
- /* The unhandled exception filter goes first. It won't work if the
- executable is debugged, but then the vectored continue handler
- kicks in. For some reason the vectored continue handler doesn't
- get called if no unhandled exception filter is installed. */
- SetUnhandledExceptionFilter (handle);
- AddVectoredContinueHandler (1, handle);
- }
-#else
+ /* Install SEH handler. */
save = _except_list;
el.handler = handle;
el.prev = _except_list;
_except_list = &el;
-#endif
};
-#ifndef __x86_64__
~exception () __attribute__ ((always_inline)) { _except_list = save; }
-#endif
};
+#else /* __x86_64__ */
+
+#define exception_list void
+typedef struct _DISPATCHER_CONTEXT *PDISPATCHER_CONTEXT;
+
+class exception
+{
+ static EXCEPTION_DISPOSITION myfault (EXCEPTION_RECORD *, exception_list *,
+ CONTEXT *, PDISPATCHER_CONTEXT);
+ static EXCEPTION_DISPOSITION handle (EXCEPTION_RECORD *, exception_list *,
+ CONTEXT *, PDISPATCHER_CONTEXT);
+public:
+ exception () __attribute__ ((always_inline))
+ {
+ /* Install SEH handler. */
+ asm volatile ("\n\
+ 1: \n\
+ .seh_handler \
+ _ZN9exception6handleEP17_EXCEPTION_RECORDPvP8_CONTEXTP19_DISPATCHER_CONTEXT, \
+ @except \n\
+ .seh_handlerdata \n\
+ .long 1 \n\
+ .rva 1b, 2f, 2f, 2f \n\
+ .seh_code \n");
+ };
+ ~exception () __attribute__ ((always_inline))
+ {
+ asm volatile ("\n\
+ nop \n\
+ 2: \n\
+ nop \n");
+ }
+};
+
+LONG CALLBACK myfault_altstack_handler (EXCEPTION_POINTERS *);
+
+#endif /* !__x86_64__ */
+
class cygwin_exception
{
PUINT_PTR framep;
PCONTEXT ctx;
EXCEPTION_RECORD *e;
+ HANDLE h;
void dump_exception ();
+ void open_stackdumpfile ();
public:
cygwin_exception (PUINT_PTR in_framep, PCONTEXT in_ctx = NULL, EXCEPTION_RECORD *in_e = NULL):
- framep (in_framep), ctx (in_ctx), e (in_e) {}
+ framep (in_framep), ctx (in_ctx), e (in_e), h (NULL) {}
void dumpstack ();
PCONTEXT context () const {return ctx;}
+ EXCEPTION_RECORD *exception_record () const {return e;}
};
diff --git a/winsup/cygwin/exceptions.cc b/winsup/cygwin/exceptions.cc
index 40ff8f0ce..7ad99888d 100644
--- a/winsup/cygwin/exceptions.cc
+++ b/winsup/cygwin/exceptions.cc
@@ -1,8 +1,5 @@
/* exceptions.cc
- Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
- 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 Red Hat, Inc.
-
This file is part of Cygwin.
This software is a copyrighted work licensed under the terms of the
@@ -12,10 +9,9 @@ details. */
#define CYGTLS_HANDLE
#include "winsup.h"
#include "miscfuncs.h"
-#include <wingdi.h>
-#include <winuser.h>
#include <imagehlp.h>
#include <stdlib.h>
+#include <stdarg.h>
#include <syslog.h>
#include <wchar.h>
@@ -46,7 +42,9 @@ details. */
#define CALL_HANDLER_RETRY_OUTER 10
#define CALL_HANDLER_RETRY_INNER 10
-char debugger_command[2 * NT_MAX_PATH + 20];
+PWCHAR debugger_command;
+extern uint8_t _sigbe;
+extern uint8_t _sigdelayed_end;
static BOOL WINAPI ctrl_c_handler (DWORD);
@@ -110,22 +108,23 @@ extern "C" void
error_start_init (const char *buf)
{
if (!buf || !*buf)
- {
- debugger_command[0] = '\0';
- return;
- }
-
- char pgm[NT_MAX_PATH];
- if (!GetModuleFileName (NULL, pgm, NT_MAX_PATH))
- strcpy (pgm, "cygwin1.dll");
- for (char *p = strchr (pgm, '\\'); p; p = strchr (p, '\\'))
- *p = '/';
+ return;
+ if (!debugger_command &&
+ !(debugger_command = (PWCHAR) malloc ((2 * NT_MAX_PATH + 20)
+ * sizeof (WCHAR))))
+ return;
- __small_sprintf (debugger_command, "%s \"%s\"", buf, pgm);
+ PWCHAR cp = debugger_command
+ + sys_mbstowcs (debugger_command, NT_MAX_PATH, buf) - 1;
+ cp = wcpcpy (cp, L" \"");
+ wcpcpy (cp, global_progname);
+ for (PWCHAR p = wcschr (cp, L'\\'); p; p = wcschr (p, L'\\'))
+ *p = L'/';
+ wcscat (cp, L"\"");
}
-static void
-open_stackdumpfile ()
+void
+cygwin_exception::open_stackdumpfile ()
{
/* If we have no executable name, or if the CWD handle is NULL,
which means, the CWD is a virtual path, don't even try to open
@@ -151,7 +150,6 @@ open_stackdumpfile ()
in Cygwin's cwd. Stick to caseinsensitivity. */
InitializeObjectAttributes (&attr, &ucore, OBJ_CASE_INSENSITIVE,
cygheap->cwd.get_handle (), NULL);
- HANDLE h;
IO_STATUS_BLOCK io;
NTSTATUS status;
/* Try to open it to dump the stack in it. */
@@ -194,10 +192,14 @@ cygwin_exception::dump_exception ()
small_printf ("Exception: %s at rip=%011X\r\n", exception_name, ctx->Rip);
else
small_printf ("Signal %d at rip=%011X\r\n", e->ExceptionCode, ctx->Rip);
- small_printf ("rax=%016X rbx=%016X rcx=%016X\r\n", ctx->Rax, ctx->Rbx, ctx->Rcx);
- small_printf ("rdx=%016X rsi=%016X rdi=%016X\r\n", ctx->Rdx, ctx->Rsi, ctx->Rdi);
- small_printf ("r8 =%016X r9 =%016X r10=%016X\r\n", ctx->R8, ctx->R9, ctx->R10);
- small_printf ("r11=%016X r12=%016X r13=%016X\r\n", ctx->R11, ctx->R12, ctx->R13);
+ small_printf ("rax=%016X rbx=%016X rcx=%016X\r\n",
+ ctx->Rax, ctx->Rbx, ctx->Rcx);
+ small_printf ("rdx=%016X rsi=%016X rdi=%016X\r\n",
+ ctx->Rdx, ctx->Rsi, ctx->Rdi);
+ small_printf ("r8 =%016X r9 =%016X r10=%016X\r\n",
+ ctx->R8, ctx->R9, ctx->R10);
+ small_printf ("r11=%016X r12=%016X r13=%016X\r\n",
+ ctx->R11, ctx->R12, ctx->R13);
small_printf ("r14=%016X r15=%016X\r\n", ctx->R14, ctx->R15);
small_printf ("rbp=%016X rsp=%016X\r\n", ctx->Rbp, ctx->Rsp);
small_printf ("program=%W, pid %u, thread %s\r\n",
@@ -214,7 +216,8 @@ cygwin_exception::dump_exception ()
cygthread::name ());
#endif
small_printf ("cs=%04x ds=%04x es=%04x fs=%04x gs=%04x ss=%04x\r\n",
- ctx->SegCs, ctx->SegDs, ctx->SegEs, ctx->SegFs, ctx->SegGs, ctx->SegSs);
+ ctx->SegCs, ctx->SegDs, ctx->SegEs, ctx->SegFs,
+ ctx->SegGs, ctx->SegSs);
}
/* A class for manipulating the stack. */
@@ -227,6 +230,7 @@ class stack_info
#ifdef __x86_64__
CONTEXT c;
UNWIND_HISTORY_TABLE hist;
+ __tlsstack_t *sigstackptr;
#endif
public:
STACKFRAME sf; /* For storing the stack information */
@@ -255,6 +259,7 @@ stack_info::init (PUINT_PTR framep, bool wantargs, PCONTEXT ctx)
memset (&c, 0, sizeof c);
c.ContextFlags = CONTEXT_ALL;
}
+ sigstackptr = _my_tls.stackptr;
#endif
memset (&sf, 0, sizeof (sf));
if (ctx)
@@ -272,17 +277,38 @@ stack_info::init (PUINT_PTR framep, bool wantargs, PCONTEXT ctx)
extern "C" void _cygwin_exit_return ();
-/* Walk the stack by looking at successive stored 'bp' frames.
- This is not foolproof. */
-int
-stack_info::walk ()
-{
#ifdef __x86_64__
+static inline void
+__unwind_single_frame (PCONTEXT ctx)
+{
PRUNTIME_FUNCTION f;
ULONG64 imagebase;
+ UNWIND_HISTORY_TABLE hist;
DWORD64 establisher;
PVOID hdl;
+ f = RtlLookupFunctionEntry (ctx->Rip, &imagebase, &hist);
+ if (f)
+ RtlVirtualUnwind (0, imagebase, ctx->Rip, f, ctx, &hdl, &establisher,
+ NULL);
+ else
+ {
+ ctx->Rip = *(ULONG_PTR *) ctx->Rsp;
+ ctx->Rsp += 8;
+ }
+}
+#else
+#define __unwind_single_frame(ctx)
+#endif
+
+/* Walk the stack.
+
+ On 32 bit we're doing this by looking at successive stored 'ebp' frames.
+ This is not foolproof. */
+int
+stack_info::walk ()
+{
+#ifdef __x86_64__
if (!c.Rip)
return 0;
@@ -290,14 +316,15 @@ stack_info::walk ()
sf.AddrStack.Offset = c.Rsp;
sf.AddrFrame.Offset = c.Rbp;
- f = RtlLookupFunctionEntry (c.Rip, &imagebase, &hist);
- if (f)
- RtlVirtualUnwind (0, imagebase, c.Rip, f, &c, &hdl, &establisher, NULL);
- else
+ if ((c.Rip >= (DWORD64)&_sigbe) && (c.Rip < (DWORD64)&_sigdelayed_end))
{
- c.Rip = *(ULONG_PTR *) c.Rsp;
- c.Rsp += 8;
+ /* _sigbe and sigdelayed don't have SEH unwinding data, so virtually
+ unwind the tls sigstack */
+ c.Rip = sigstackptr[-1];
+ sigstackptr--;
+ return 1;
}
+ __unwind_single_frame (&c);
if (needargs && c.Rip)
{
PULONG_PTR p = (PULONG_PTR) c.Rsp;
@@ -344,36 +371,41 @@ void
cygwin_exception::dumpstack ()
{
static bool already_dumped;
- myfault efault;
- if (efault.faulted ())
- return;
- if (already_dumped || cygheap->rlim_core == 0Ul)
- return;
- already_dumped = true;
- open_stackdumpfile ();
+ __try
+ {
+ if (already_dumped || cygheap->rlim_core == 0Ul)
+ return;
+ already_dumped = true;
+ open_stackdumpfile ();
- if (e)
- dump_exception ();
+ if (e)
+ dump_exception ();
- int i;
+ int i;
- thestack.init (framep, 1, ctx); /* Initialize from the input CONTEXT */
+ thestack.init (framep, 1, ctx); /* Initialize from the input CONTEXT */
#ifdef __x86_64__
- small_printf ("Stack trace:\r\nFrame Function Args\r\n");
+ small_printf ("Stack trace:\r\nFrame Function Args\r\n");
#else
- small_printf ("Stack trace:\r\nFrame Function Args\r\n");
+ small_printf ("Stack trace:\r\nFrame Function Args\r\n");
#endif
- for (i = 0; i < 16 && thestack++; i++)
- {
- small_printf (_AFMT " " _AFMT, thestack.sf.AddrFrame.Offset,
- thestack.sf.AddrPC.Offset);
- for (unsigned j = 0; j < NPARAMS; j++)
- small_printf ("%s" _AFMT, j == 0 ? " (" : ", ", thestack.sf.Params[j]);
- small_printf (")\r\n");
+ for (i = 0; i < 16 && thestack++; i++)
+ {
+ small_printf (_AFMT " " _AFMT, thestack.sf.AddrFrame.Offset,
+ thestack.sf.AddrPC.Offset);
+ for (unsigned j = 0; j < NPARAMS; j++)
+ small_printf ("%s" _AFMT, j == 0 ? " (" : ", ",
+ thestack.sf.Params[j]);
+ small_printf (")\r\n");
+ }
+ small_printf ("End of stack trace%s\n",
+ i == 16 ? " (more stack frames may be present)" : "");
+ if (h)
+ NtClose (h);
}
- small_printf ("End of stack trace%s\n",
- i == 16 ? " (more stack frames may be present)" : "");
+ __except (NO_ERROR) {}
+ __endtry
}
bool
@@ -396,9 +428,13 @@ _cygtls::inside_kernel (CONTEXT *cx)
# define h ((HMODULE) m.AllocationBase)
if (!h || m.State != MEM_COMMIT) /* Be defensive */
res = true;
+ else if (h == hntdll)
+ res = true; /* Calling GetModuleFilename on ntdll.dll
+ can hang */
else if (h == user_data->hmodule)
res = false;
- else if (!GetModuleFileNameW (h, checkdir, windows_system_directory_length + 6))
+ else if (!GetModuleFileNameW (h, checkdir,
+ windows_system_directory_length + 6))
res = false;
else
{
@@ -435,9 +471,9 @@ cygwin_stackdump ()
extern "C" int
try_to_debug (bool waitloop)
{
- debug_printf ("debugger_command '%s'", debugger_command);
- if (*debugger_command == '\0')
+ if (!debugger_command)
return 0;
+ debug_printf ("debugger_command '%W'", debugger_command);
if (being_debugged ())
{
extern void break_here ();
@@ -445,13 +481,15 @@ try_to_debug (bool waitloop)
return 0;
}
- __small_sprintf (strchr (debugger_command, '\0'), " %u", GetCurrentProcessId ());
+ PWCHAR dbg_end = wcschr (debugger_command, L'\0');
+ __small_swprintf (dbg_end, L" %u", GetCurrentProcessId ());
LONG prio = GetThreadPriority (GetCurrentThread ());
SetThreadPriority (GetCurrentThread (), THREAD_PRIORITY_HIGHEST);
PROCESS_INFORMATION pi = {NULL, 0, 0, 0};
- STARTUPINFOW si = {0, NULL, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, NULL, NULL, NULL, NULL};
+ STARTUPINFOW si = {0, NULL, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ NULL, NULL, NULL, NULL};
si.lpReserved = NULL;
si.lpDesktop = NULL;
si.dwFlags = 0;
@@ -480,17 +518,16 @@ try_to_debug (bool waitloop)
*q = L'_' ;
SetEnvironmentVariableW (L"CYGWIN", p + wcslen (L"CYGWIN=")) ;
}
- break ;
+ break;
}
}
+ FreeEnvironmentStringsW (rawenv);
console_printf ("*** starting debugger for pid %u, tid %u\n",
cygwin_pid (GetCurrentProcessId ()), GetCurrentThreadId ());
BOOL dbg;
- WCHAR dbg_cmd[strlen(debugger_command)];
- sys_mbstowcs (dbg_cmd, strlen(debugger_command) + 1, debugger_command);
dbg = CreateProcessW (NULL,
- dbg_cmd,
+ debugger_command,
NULL,
NULL,
FALSE,
@@ -500,6 +537,7 @@ try_to_debug (bool waitloop)
&si,
&pi);
+ *dbg_end = L'\0';
if (!dbg)
system_printf ("Failed to start debugger, %E");
else
@@ -524,7 +562,9 @@ try_to_debug (bool waitloop)
exception handler. */
#define rtl_unwind(el,er)
#else
-static void __reg3 rtl_unwind (exception_list *, PEXCEPTION_RECORD) __attribute__ ((noinline, regparm (3)));
+static void __reg3 rtl_unwind (exception_list *, PEXCEPTION_RECORD)
+ __attribute__ ((noinline, regparm (3)));
+
void __reg3
rtl_unwind (exception_list *frame, PEXCEPTION_RECORD e)
{
@@ -543,47 +583,75 @@ rtl_unwind (exception_list *frame, PEXCEPTION_RECORD e)
popl %%ebx \n\
": : "r" (frame), "r" (e));
}
-#endif
-
-/* Main exception handler. */
+#endif /* __x86_64 */
#ifdef __x86_64__
-#define CYG_EXC_CONTINUE_EXECUTION EXCEPTION_CONTINUE_EXECUTION
-#define CYG_EXC_CONTINUE_SEARCH EXCEPTION_CONTINUE_SEARCH
+/* myfault exception handler. */
+EXCEPTION_DISPOSITION
+exception::myfault (EXCEPTION_RECORD *e, exception_list *frame, CONTEXT *in,
+ PDISPATCHER_CONTEXT dispatch)
+{
+ PSCOPE_TABLE table = (PSCOPE_TABLE) dispatch->HandlerData;
+ RtlUnwindEx (frame,
+ (char *) dispatch->ImageBase + table->ScopeRecord[0].JumpTarget,
+ e, 0, in, dispatch->HistoryTable);
+ /* NOTREACHED, make gcc happy. */
+ return ExceptionContinueSearch;
+}
-bool exception::handler_installed NO_COPY;
+/* If another exception occurs while running a signal handler on an alternate
+ signal stack, the normal SEH handlers are skipped, because the OS exception
+ handling considers the current (alternate) stack "broken". However, it
+ still calls vectored exception handlers.
-int
-exception::handle (LPEXCEPTION_POINTERS ep)
-#else
-#define CYG_EXC_CONTINUE_EXECUTION ExceptionContinueExecution
-#define CYG_EXC_CONTINUE_SEARCH ExceptionContinueSearch
+ TODO: What we do here is to handle only __try/__except blocks in Cygwin.
+ "Normal" exceptions will simply exit the process. Still, better
+ than nothing... */
+LONG WINAPI
+myfault_altstack_handler (EXCEPTION_POINTERS *exc)
+{
+ _cygtls& me = _my_tls;
+
+ if (me.andreas)
+ {
+ CONTEXT *c = exc->ContextRecord;
+
+ /* Unwind the stack manually and call RtlRestoreContext. This
+ is necessary because RtlUnwindEx checks the stack for validity,
+ which, as outlined above, fails for the alternate stack. */
+ while (c->Rsp < me.andreas->frame)
+ __unwind_single_frame (c);
+ c->Rip = me.andreas->ret;
+ RtlRestoreContext (c, NULL);
+ }
+ return EXCEPTION_CONTINUE_SEARCH;
+}
-int
-exception::handle (EXCEPTION_RECORD *e, exception_list *frame, CONTEXT *in, void *)
#endif
+
+/* Main exception handler. */
+EXCEPTION_DISPOSITION
+exception::handle (EXCEPTION_RECORD *e, exception_list *frame, CONTEXT *in,
+ PDISPATCHER_CONTEXT dispatch)
{
- static bool NO_COPY debugging;
+ static int NO_COPY debugging = 0;
_cygtls& me = _my_tls;
+#ifndef __x86_64__
if (me.andreas)
me.andreas->leave (); /* Return from a "san" caught fault */
-
-#ifdef __x86_64__
- EXCEPTION_RECORD *e = ep->ExceptionRecord;
- CONTEXT *in = ep->ContextRecord;
#endif
if (debugging && ++debugging < 500000)
{
SetThreadPriority (hMainThread, THREAD_PRIORITY_NORMAL);
- return CYG_EXC_CONTINUE_EXECUTION;
+ return ExceptionContinueExecution;
}
/* If we're exiting, tell Windows to keep looking for an
exception handler. */
if (exit_state || e->ExceptionFlags)
- return CYG_EXC_CONTINUE_SEARCH;
+ return ExceptionContinueSearch;
siginfo_t si = {};
si.si_code = SI_KERNEL;
@@ -652,7 +720,7 @@ exception::handle (EXCEPTION_RECORD *e, exception_list *frame, CONTEXT *in, void
1))
{
case MMAP_NORESERVE_COMMITED:
- return CYG_EXC_CONTINUE_EXECUTION;
+ return ExceptionContinueExecution;
case MMAP_RAISE_SIGBUS: /* MAP_NORESERVE page, commit failed, or
access to mmap page beyond EOF. */
si.si_signo = SIGBUS;
@@ -667,11 +735,17 @@ exception::handle (EXCEPTION_RECORD *e, exception_list *frame, CONTEXT *in, void
}
break;
+ case STATUS_STACK_OVERFLOW:
+ /* If we encounter a stack overflow, and if the thread has no alternate
+ stack, don't even try to call a signal handler. This is in line with
+ Linux behaviour and also makes a lot of sense on Windows. */
+ if (me.altstack.ss_flags)
+ global_sigs[SIGSEGV].sa_handler = SIG_DFL;
+ /*FALLTHRU*/
case STATUS_ARRAY_BOUNDS_EXCEEDED:
case STATUS_IN_PAGE_ERROR:
case STATUS_NO_MEMORY:
case STATUS_INVALID_DISPOSITION:
- case STATUS_STACK_OVERFLOW:
si.si_signo = SIGSEGV;
si.si_code = SEGV_MAPERR;
break;
@@ -686,17 +760,19 @@ exception::handle (EXCEPTION_RECORD *e, exception_list *frame, CONTEXT *in, void
want CloseHandle to return an error. This can be revisited
if gcc ever supports Windows style structured exception
handling. */
- return CYG_EXC_CONTINUE_EXECUTION;
+ return ExceptionContinueExecution;
default:
/* If we don't recognize the exception, we have to assume that
we are doing structured exception handling, and we let
something else handle it. */
- return CYG_EXC_CONTINUE_SEARCH;
+ return ExceptionContinueSearch;
}
- debug_printf ("In cygwin_except_handler exception %y at %p sp %p", e->ExceptionCode, in->_GR(ip), in->_GR(sp));
- debug_printf ("In cygwin_except_handler signal %d at %p", si.si_signo, in->_GR(ip));
+ debug_printf ("In cygwin_except_handler exception %y at %p sp %p",
+ e->ExceptionCode, in->_GR(ip), in->_GR(sp));
+ debug_printf ("In cygwin_except_handler signal %d at %p",
+ si.si_signo, in->_GR(ip));
#ifdef __x86_64__
PUINT_PTR framep = (PUINT_PTR) in->Rbp;
@@ -707,7 +783,9 @@ exception::handle (EXCEPTION_RECORD *e, exception_list *frame, CONTEXT *in, void
framep = (PUINT_PTR) in->Rsp;
#else
PUINT_PTR framep = (PUINT_PTR) in->_GR(sp);
- for (PUINT_PTR bpend = (PUINT_PTR) __builtin_frame_address (0); framep > bpend; framep--)
+ for (PUINT_PTR bpend = (PUINT_PTR) __builtin_frame_address (0);
+ framep > bpend;
+ framep--)
if (*framep == in->SegCs && framep[-1] == in->_GR(ip))
{
framep -= 2;
@@ -727,8 +805,8 @@ exception::handle (EXCEPTION_RECORD *e, exception_list *frame, CONTEXT *in, void
rtl_unwind (frame, e);
else
{
- debugging = true;
- return CYG_EXC_CONTINUE_EXECUTION;
+ debugging = 1;
+ return ExceptionContinueExecution;
}
/* FIXME: Probably should be handled in signal processing code */
@@ -747,9 +825,9 @@ exception::handle (EXCEPTION_RECORD *e, exception_list *frame, CONTEXT *in, void
#else
"%s[%d]: segfault at %08x rip %08x rsp %08x error %d",
#endif
- __progname, myself->pid,
- e->ExceptionInformation[1], in->_GR(ip), in->_GR(sp),
- error_code);
+ __progname, myself->pid,
+ e->ExceptionInformation[1], in->_GR(ip), in->_GR(sp),
+ error_code);
}
cygwin_exception exc (framep, in, e);
si.si_cyg = (void *) &exc;
@@ -761,9 +839,22 @@ exception::handle (EXCEPTION_RECORD *e, exception_list *frame, CONTEXT *in, void
? (void *) e->ExceptionInformation[1] : (void *) in->_GR(ip);
me.incyg++;
sig_send (NULL, si, &me); /* Signal myself */
+ if ((NTSTATUS) e->ExceptionCode == STATUS_STACK_OVERFLOW)
+ {
+ /* If we catched a stack overflow, and if the signal handler didn't exit
+ or longjmp, we're back here and about to continue, supposed to run the
+ offending instruction again. That works on Linux, but not on Windows.
+ In case of a stack overflow we're not immediately returning to the
+ system exception handler, but to NTDLL::__stkchk. __stkchk will then
+ terminate the applicaton. So what we do here is to signal our current
+ process again, but this time with SIG_DFL action. This creates a
+ stackdump and then exits through our own means. */
+ global_sigs[SIGSEGV].sa_handler = SIG_DFL;
+ sig_send (NULL, si, &me);
+ }
me.incyg--;
e->ExceptionFlags = 0;
- return CYG_EXC_CONTINUE_EXECUTION;
+ return ExceptionContinueExecution;
}
/* Utilities to call a user supplied exception handler. */
@@ -861,7 +952,7 @@ _cygtls::interrupt_now (CONTEXT *cx, siginfo_t& si, void *handler,
void __reg3
_cygtls::interrupt_setup (siginfo_t& si, void *handler, struct sigaction& siga)
{
- push ((__stack_t) sigdelayed);
+ push ((__tlsstack_t) sigdelayed);
deltamask = siga.sa_mask & ~SIG_NONMASKABLE;
sa_flags = siga.sa_flags;
func = (void (*) (int, siginfo_t *, void *)) handler;
@@ -875,14 +966,15 @@ _cygtls::interrupt_setup (siginfo_t& si, void *handler, struct sigaction& siga)
}
infodata = si;
- this->sig = si.si_signo; // Should always be last thing set to avoid a race
+ this->sig = si.si_signo; /* Should always be last thing set to avoid race */
if (incyg)
- SetEvent (get_signal_arrived (false));
+ set_signal_arrived ();
if (!have_execed)
proc_subproc (PROC_CLEARWAIT, 1);
- sigproc_printf ("armed signal_arrived %p, signal %d", signal_arrived, si.si_signo);
+ sigproc_printf ("armed signal_arrived %p, signal %d",
+ signal_arrived, si.si_signo);
}
extern "C" void __stdcall
@@ -912,7 +1004,8 @@ sigpacket::setup_handler (void *handler, struct sigaction& siga, _cygtls *tls)
tls->lock ();
if (tls->incyg)
{
- sigproc_printf ("controlled interrupt. stackptr %p, stack %p, stackptr[-1] %p",
+ sigproc_printf ("controlled interrupt. stackptr %p, stack %p, "
+ "stackptr[-1] %p",
tls->stackptr, tls->stack, tls->stackptr[-1]);
tls->interrupt_setup (si, handler, siga);
interrupted = true;
@@ -931,10 +1024,11 @@ sigpacket::setup_handler (void *handler, struct sigaction& siga, _cygtls *tls)
{
/* Suspend the thread which will receive the signal.
If one of these conditions is not true we loop.
- If the thread is already suspended (which can occur when a program
- has called SuspendThread on itself) then just queue the signal. */
-
- sigproc_printf ("suspending thread, tls %p, _main_tls %p", tls, _main_tls);
+ If the thread is already suspended (which can occur when a
+ program has called SuspendThread on itself) then just queue
+ the signal. */
+ sigproc_printf ("suspending thread, tls %p, _main_tls %p",
+ tls, _main_tls);
res = SuspendThread (hth);
/* Just set pending if thread is already suspended */
if (res)
@@ -964,7 +1058,8 @@ sigpacket::setup_handler (void *handler, struct sigaction& siga, _cygtls *tls)
}
out:
- sigproc_printf ("signal %d %sdelivered", si.si_signo, interrupted ? "" : "not ");
+ sigproc_printf ("signal %d %sdelivered", si.si_signo,
+ interrupted ? "" : "not ");
return interrupted;
}
@@ -1057,14 +1152,14 @@ ctrl_c_handler (DWORD type)
return TRUE;
tty_min *t = cygwin_shared->tty.get_cttyp ();
- /* Ignore this if we're not the process group leader since it should be handled
- *by* the process group leader. */
+ /* Ignore this if we're not the process group leader since it should be
+ handled *by* the process group leader. */
if (t && (!have_execed || have_execed_cygwin)
&& t->getpgid () == myself->pid &&
(GetTickCount () - t->last_ctrl_c) >= MIN_CTRL_C_SLOP)
- /* Otherwise we just send a SIGINT to the process group and return TRUE (to indicate
- that we have handled the signal). At this point, type should be
- a CTRL_C_EVENT or CTRL_BREAK_EVENT. */
+ /* Otherwise we just send a SIGINT to the process group and return TRUE
+ (to indicate that we have handled the signal). At this point, type
+ should be a CTRL_C_EVENT or CTRL_BREAK_EVENT. */
{
int sig = SIGINT;
/* If intr and quit are both mapped to ^C, send SIGQUIT on ^BREAK */
@@ -1194,10 +1289,20 @@ set_signal_mask (sigset_t& setmask, sigset_t newmask)
sig_dispatch_pending (true);
}
+
+DWORD WINAPI
+dumpstack_overflow_wrapper (PVOID arg)
+{
+ cygwin_exception *exc = (cygwin_exception *) arg;
+
+ exc->dumpstack ();
+ return 0;
+}
+
/* Exit due to a signal. Should only be called from the signal thread. */
extern "C" {
static void
-signal_exit (int sig, siginfo_t *si)
+signal_exit (int sig, siginfo_t *si, void *)
{
debug_printf ("exiting due to signal %d", sig);
exit_state = ES_SIGNAL_EXIT;
@@ -1219,7 +1324,27 @@ signal_exit (int sig, siginfo_t *si)
if (try_to_debug ())
break;
if (si->si_code != SI_USER && si->si_cyg)
- ((cygwin_exception *) si->si_cyg)->dumpstack ();
+ {
+ cygwin_exception *exc = (cygwin_exception *) si->si_cyg;
+ if ((NTSTATUS) exc->exception_record ()->ExceptionCode
+ == STATUS_STACK_OVERFLOW)
+ {
+ /* We're handling a stack overflow so we're running low
+ on stack (surprise!) The dumpstack method needs lots
+ of stack for buffers. So what we do here is to run
+ dumpstack in another thread with its own stack. */
+ HANDLE thread = CreateThread (&sec_none_nih, 0,
+ dumpstack_overflow_wrapper,
+ exc, 0, NULL);
+ if (thread)
+ {
+ WaitForSingleObject (thread, INFINITE);
+ CloseHandle (thread);
+ }
+ }
+ else
+ ((cygwin_exception *) si->si_cyg)->dumpstack ();
+ }
else
{
CONTEXT c;
@@ -1276,7 +1401,7 @@ _cygtls::handle_SIGCONT ()
else
{
sig = SIGCONT;
- SetEvent (signal_arrived); /* alert sig_handle_tty_stop */
+ set_signal_arrived (); /* alert sig_handle_tty_stop */
sigsent = true;
}
/* Clear pending stop signals */
@@ -1294,6 +1419,9 @@ sigpacket::process ()
struct sigaction& thissig = global_sigs[si.si_signo];
void *handler = have_execed ? NULL : (void *) thissig.sa_handler;
+ threadlist_t *tl_entry = NULL;
+ _cygtls *tls = NULL;
+
/* Don't try to send signals if we're just starting up since signal masks
may not be available. */
if (!cygwin_finished_initializing)
@@ -1306,12 +1434,19 @@ sigpacket::process ()
myself->rusage_self.ru_nsignals++;
- _cygtls *tls;
if (si.si_signo == SIGCONT)
- _main_tls->handle_SIGCONT ();
+ {
+ tl_entry = cygheap->find_tls (_main_tls);
+ _main_tls->handle_SIGCONT ();
+ cygheap->unlock_tls (tl_entry);
+ }
+ /* SIGKILL is special. It always goes through. */
if (si.si_signo == SIGKILL)
- tls = _main_tls; /* SIGKILL is special. It always goes through. */
+ {
+ tl_entry = cygheap->find_tls (_main_tls);
+ tls = _main_tls;
+ }
else if (ISSTATE (myself, PID_STOPPED))
{
rc = -1; /* Don't send signals when stopped */
@@ -1319,18 +1454,26 @@ sigpacket::process ()
}
else if (!sigtls)
{
- tls = cygheap->find_tls (si.si_signo, issig_wait);
- sigproc_printf ("using tls %p", tls);
+ tl_entry = cygheap->find_tls (si.si_signo, issig_wait);
+ if (tl_entry)
+ {
+ tls = tl_entry->thread;
+ sigproc_printf ("using tls %p", tls);
+ }
}
else
{
- tls = sigtls;
- if (sigismember (&tls->sigwait_mask, si.si_signo))
- issig_wait = true;
- else if (!sigismember (&tls->sigmask, si.si_signo))
- issig_wait = false;
- else
- tls = NULL;
+ tl_entry = cygheap->find_tls (sigtls);
+ if (tl_entry)
+ {
+ tls = tl_entry->thread;
+ if (sigismember (&tls->sigwait_mask, si.si_signo))
+ issig_wait = true;
+ else if (!sigismember (&tls->sigmask, si.si_signo))
+ issig_wait = false;
+ else
+ tls = NULL;
+ }
}
/* !tls means no threads available to catch a signal. */
@@ -1366,19 +1509,22 @@ sigpacket::process ()
}
/* Clear pending SIGCONT on stop signals */
- if (si.si_signo == SIGTSTP || si.si_signo == SIGTTIN || si.si_signo == SIGTTOU)
+ if (si.si_signo == SIGTSTP || si.si_signo == SIGTTIN
+ || si.si_signo == SIGTTOU)
sig_clear (SIGCONT);
if (handler == (void *) SIG_DFL)
{
- if (si.si_signo == SIGCHLD || si.si_signo == SIGIO || si.si_signo == SIGCONT || si.si_signo == SIGWINCH
+ if (si.si_signo == SIGCHLD || si.si_signo == SIGIO
+ || si.si_signo == SIGCONT || si.si_signo == SIGWINCH
|| si.si_signo == SIGURG)
{
sigproc_printf ("signal %d default is currently ignore", si.si_signo);
goto done;
}
- if (si.si_signo == SIGTSTP || si.si_signo == SIGTTIN || si.si_signo == SIGTTOU)
+ if (si.si_signo == SIGTSTP || si.si_signo == SIGTTIN
+ || si.si_signo == SIGTTOU)
goto stop;
goto exit_sig;
@@ -1390,7 +1536,12 @@ sigpacket::process ()
goto dosig;
stop:
- tls = _main_tls;
+ if (tls != _main_tls)
+ {
+ cygheap->unlock_tls (tl_entry);
+ tl_entry = cygheap->find_tls (_main_tls);
+ tls = _main_tls;
+ }
handler = (void *) sig_handle_tty_stop;
thissig = global_sigs[SIGSTOP];
goto dosig;
@@ -1398,6 +1549,8 @@ stop:
exit_sig:
handler = (void *) signal_exit;
thissig.sa_flags |= SA_SIGINFO;
+ /* Don't run signal_exit on alternate stack. */
+ thissig.sa_flags &= ~SA_ONSTACK;
dosig:
if (have_execed)
@@ -1410,11 +1563,64 @@ dosig:
rc = setup_handler (handler, thissig, tls);
done:
+ cygheap->unlock_tls (tl_entry);
sigproc_printf ("returning %d", rc);
return rc;
}
+static void
+altstack_wrapper (int sig, siginfo_t *siginfo, ucontext_t *sigctx,
+ void (*handler) (int, siginfo_t *, void *))
+{
+ siginfo_t si = *siginfo;
+ ULONG guard_size = 0;
+ DWORD old_prot = (DWORD) -1;
+ PTEB teb = NtCurrentTeb ();
+ PVOID old_limit = NULL;
+
+ /* Check if we're just handling a stack overflow. If so... */
+ if (sig == SIGSEGV && si.si_cyg
+ && ((cygwin_exception *) si.si_cyg)->exception_record ()->ExceptionCode
+ == (DWORD) STATUS_STACK_OVERFLOW)
+ {
+ /* ...restore guard pages in original stack as if MSVCRT::_resetstkovlw
+ has been called.
+
+ Compute size of guard pages. If SetThreadStackGuarantee isn't
+ supported, or if it returns 0, use the default guard page size. */
+ if (wincap.has_set_thread_stack_guarantee ())
+ SetThreadStackGuarantee (&guard_size);
+ if (!guard_size)
+ guard_size = wincap.def_guard_page_size ();
+ else
+ guard_size += wincap.page_size ();
+ old_limit = teb->Tib.StackLimit;
+ /* Amazing but true: This VirtualProtect call automatically fixes the
+ value of teb->Tib.StackLimit on some systems.*/
+ if (VirtualProtect (teb->Tib.StackLimit, guard_size,
+ PAGE_READWRITE | PAGE_GUARD, &old_prot)
+ && old_limit == teb->Tib.StackLimit)
+ teb->Tib.StackLimit = (caddr_t) old_limit + guard_size;
+ }
+ handler (sig, &si, sigctx);
+ if (old_prot != (DWORD) -1)
+ {
+ /* Typically the handler would exit or at least perform a siglongjmp
+ trying to overcome a SEGV condition. However, if we return from a
+ segv handler after a stack overflow, we're dead. While on Linux the
+ process returns to the offending code and thus the handler is called
+ ad infinitum, on Windows the NTDLL::__stkchk function will simply kill
+ the process. So what we do here is to remove the guard pages again so
+ we can return to exception::handle. exception::handle will then call
+ sig_send again, this time with SIG_DFL action, so at least we get a
+ stackdump. */
+ if (VirtualProtect ((caddr_t) teb->Tib.StackLimit - guard_size,
+ guard_size, old_prot, &old_prot))
+ teb->Tib.StackLimit = old_limit;
+ }
+}
+
int
_cygtls::call_signal_handler ()
{
@@ -1430,26 +1636,190 @@ _cygtls::call_signal_handler ()
/* Pop the stack if the next "return address" is sigdelayed, since
this function is doing what sigdelayed would have done anyway. */
- if (retaddr () == (__stack_t) sigdelayed)
+ if (retaddr () == (__tlsstack_t) sigdelayed)
pop ();
debug_only_printf ("dealing with signal %d", sig);
this_sa_flags = sa_flags;
+ sigset_t this_oldmask = set_process_mask_delta ();
+
/* Save information locally on stack to pass to handler. */
int thissig = sig;
siginfo_t thissi = infodata;
void (*thisfunc) (int, siginfo_t *, void *) = func;
- sigset_t this_oldmask = set_process_mask_delta ();
+ ucontext_t *thiscontext = NULL;
+
+ /* Only make a context for SA_SIGINFO handlers */
+ if (this_sa_flags & SA_SIGINFO)
+ {
+ context.uc_link = 0;
+ context.uc_flags = 0;
+ if (thissi.si_cyg)
+ memcpy (&context.uc_mcontext,
+ ((cygwin_exception *) thissi.si_cyg)->context (),
+ sizeof (CONTEXT));
+ else
+ {
+ /* Software-generated signal. We're fetching the current
+ context, unwind to the caller and in case we're called
+ from sigdelayed, fix rip/eip accordingly. */
+ context.uc_mcontext.ctxflags = CONTEXT_FULL;
+ RtlCaptureContext ((PCONTEXT) &context.uc_mcontext);
+ __unwind_single_frame ((PCONTEXT) &context.uc_mcontext);
+ if (stackptr > stack)
+ {
+#ifdef __x86_64__
+ context.uc_mcontext.rip = retaddr ();
+#else
+ context.uc_mcontext.eip = retaddr ();
+#endif
+ }
+ }
+
+ if (this_sa_flags & SA_ONSTACK
+ && !_my_tls.altstack.ss_flags
+ && _my_tls.altstack.ss_sp)
+ {
+ context.uc_stack = _my_tls.altstack;
+ context.uc_stack.ss_flags = SS_ONSTACK;
+ }
+ else
+ {
+ context.uc_stack.ss_sp = NtCurrentTeb ()->Tib.StackBase;
+ context.uc_stack.ss_flags = 0;
+ if (!NtCurrentTeb ()->DeallocationStack)
+ context.uc_stack.ss_size
+ = (uintptr_t) NtCurrentTeb ()->Tib.StackLimit
+ - (uintptr_t) NtCurrentTeb ()->Tib.StackBase;
+ else
+ context.uc_stack.ss_size
+ = (uintptr_t) NtCurrentTeb ()->DeallocationStack
+ - (uintptr_t) NtCurrentTeb ()->Tib.StackBase;
+ }
+ context.uc_sigmask = context.uc_mcontext.oldmask = this_oldmask;
+
+ context.uc_mcontext.cr2 = (thissi.si_signo == SIGSEGV
+ || thissi.si_signo == SIGBUS)
+ ? (uintptr_t) thissi.si_addr : 0;
+
+ thiscontext = &context;
+ }
+
int this_errno = saved_errno;
reset_signal_arrived ();
incyg = false;
sig = 0; /* Flag that we can accept another signal */
unlock (); /* unlock signal stack */
- /* no ucontext_t information provided yet, so third arg is NULL */
- thisfunc (thissig, &thissi, NULL);
+ /* Alternate signal stack requested for this signal and alternate signal
+ stack set up for this thread? */
+ if (this_sa_flags & SA_ONSTACK
+ && !_my_tls.altstack.ss_flags
+ && _my_tls.altstack.ss_sp)
+ {
+ /* Yes, use alternate signal stack.
+
+ NOTE:
+
+ We DO NOT change the TEB's stack addresses and we DO NOT move the
+ _cygtls area to the alternate stack. This seems to work fine on
+ 32 and 64 bit, but there may be Windows functions not working
+ correctly under these circumstances. Especially 32 bit exception
+ handling may be broken.
+
+ On the other hand, if a Windows function crashed and we're handling
+ this here, moving the TEB stack addresses may be fatal.
+
+ If the current code does not work as expected in the "usual"
+ POSIX circumstances, this problem must be revisited. */
+
+ /* Compute new stackbase. We start from the high address, aligned
+ to 16 byte. */
+ uintptr_t new_sp = ((uintptr_t) _my_tls.altstack.ss_sp
+ + _my_tls.altstack.ss_size) & ~0xf;
+ /* In assembler: Save regs on new stack, move to alternate stack,
+ call thisfunc, revert stack regs. */
+#ifdef __x86_64__
+ /* Clobbered regs: rcx, rdx, r8, r9, r10, r11, rbp, rsp */
+ __asm__ ("\n\
+ movq %[NEW_SP], %%rax # Load alt stack into rax \n\
+ subq $0x60, %%rax # Make room on alt stack \n\
+ # for clobbered regs and \n\
+ # required shadow space \n\
+ movq %%rcx, 0x20(%%rax)# Save clobbered regs \n\
+ movq %%rdx, 0x28(%%rax) \n\
+ movq %%r8, 0x30(%%rax) \n\
+ movq %%r9, 0x38(%%rax) \n\
+ movq %%r10, 0x40(%%rax) \n\
+ movq %%r11, 0x48(%%rax) \n\
+ movq %%rbp, 0x50(%%rax) \n\
+ movq %%rsp, 0x58(%%rax) \n\
+ movl %[SIG], %%ecx # thissig to 1st arg reg \n\
+ leaq %[SI], %%rdx # &thissi to 2nd arg reg \n\
+ movq %[CTX], %%r8 # thiscontext to 3rd arg reg \n\
+ movq %[FUNC], %%r9 # thisfunc to r9 \n\
+ leaq %[WRAPPER], %%r10 # wrapper address to r10 \n\
+ movq %%rax, %%rsp # Move alt stack into rsp \n\
+ call *%%r10 # Call wrapper \n\
+ movq %%rsp, %%rax # Restore clobbered regs \n\
+ movq 0x58(%%rax), %%rsp \n\
+ movq 0x50(%%rax), %%rbp \n\
+ movq 0x48(%%rax), %%r11 \n\
+ movq 0x40(%%rax), %%r10 \n\
+ movq 0x38(%%rax), %%r9 \n\
+ movq 0x30(%%rax), %%r8 \n\
+ movq 0x28(%%rax), %%rdx \n\
+ movq 0x20(%%rax), %%rcx \n"
+ : : [NEW_SP] "o" (new_sp),
+ [SIG] "o" (thissig),
+ [SI] "o" (thissi),
+ [CTX] "o" (thiscontext),
+ [FUNC] "o" (thisfunc),
+ [WRAPPER] "o" (altstack_wrapper)
+ : "memory");
+#else
+ /* Clobbered regs: ecx, edx, ebp, esp */
+ __asm__ ("\n\
+ movl %[NEW_SP], %%eax # Load alt stack into eax \n\
+ subl $32, %%eax # Make room on alt stack for \n\
+ # clobbered regs and args to \n\
+ # signal handler \n\
+ movl %%ecx, 16(%%eax) # Save clobbered regs \n\
+ movl %%edx, 20(%%eax) \n\
+ movl %%ebp, 24(%%eax) \n\
+ movl %%esp, 28(%%eax) \n\
+ movl %[SIG], %%ecx # thissig to 1st arg slot \n\
+ movl %%ecx, (%%eax) \n\
+ leal %[SI], %%ecx # &thissi to 2nd arg slot \n\
+ movl %%ecx, 4(%%eax) \n\
+ movl %[CTX], %%ecx # thiscontext to 3rd arg slot\n\
+ movl %%ecx, 8(%%eax) \n\
+ movl %[FUNC], %%ecx # thisfunc to 4th arg slot \n\
+ movl %%ecx, 12(%%eax) \n\
+ leal %[WRAPPER], %%ecx # thisfunc to ecx \n\
+ movl %%eax, %%esp # Move alt stack into esp \n\
+ call *%%ecx # Call thisfunc \n\
+ movl %%esp, %%eax # Restore clobbered regs \n\
+ movl 28(%%eax), %%esp \n\
+ movl 24(%%eax), %%ebp \n\
+ movl 20(%%eax), %%edx \n\
+ movl 16(%%eax), %%eax \n"
+ : : [NEW_SP] "o" (new_sp),
+ [SIG] "o" (thissig),
+ [SI] "o" (thissi),
+ [CTX] "o" (thiscontext),
+ [FUNC] "o" (thisfunc),
+ [WRAPPER] "o" (altstack_wrapper)
+ : "memory");
+#endif
+ }
+ else
+ /* No alternate signal stack requested or available, just call
+ signal handler. */
+ thisfunc (thissig, &thissi, thiscontext);
+
incyg = true;
set_signal_mask (_my_tls.sigmask, this_oldmask);
@@ -1457,49 +1827,272 @@ _cygtls::call_signal_handler ()
set_errno (this_errno);
}
- return this_sa_flags & SA_RESTART || (this != _main_tls);
+ /* FIXME: Since 2011 this return statement always returned 1 (meaning
+ SA_RESTART is effective) if the thread we're running in is not the
+ main thread. We're disabling this check to enable EINTR behaviour
+ on system calls not running in the main thread. It's not quite clear
+ if that has undesired side-effects, therefore this comment. */
+ return this_sa_flags & SA_RESTART;
}
void
_cygtls::signal_debugger (siginfo_t& si)
{
- HANDLE th = NULL;
- if (isinitialized () && being_debugged ())
+ HANDLE th;
+ /* If si.si_cyg is set then the signal was already sent to the debugger. */
+ if (isinitialized () && !si.si_cyg && (th = (HANDLE) *this)
+ && being_debugged () && SuspendThread (th) >= 0)
{
CONTEXT c;
- CONTEXT *pc;
-
- if (si.si_cyg)
- pc = ((cygwin_exception *) si.si_cyg)->context ();
- else if (!(th = (HANDLE) *this))
- return;
- else
+ c.ContextFlags = CONTEXT_FULL;
+ if (GetThreadContext (th, &c))
{
- SuspendThread (th);
- c.ContextFlags = CONTEXT_FULL;
- if (GetThreadContext (th, &c))
- pc = &c;
- else
- goto out;
if (incyg)
#ifdef __x86_64__
c.Rip = retaddr ();
#else
c.Eip = retaddr ();
#endif
- memcpy (&thread_context, pc, (&thread_context._internal -
- (unsigned char *) &thread_context));
+ memcpy (&context.uc_mcontext, &c, sizeof (CONTEXT));
+ /* Enough space for 32/64 bit addresses */
+ char sigmsg[2 * sizeof (_CYGWIN_SIGNAL_STRING
+ " ffffffff ffffffffffffffff")];
+ __small_sprintf (sigmsg, _CYGWIN_SIGNAL_STRING " %d %y %p",
+ si.si_signo, thread_id, &context.uc_mcontext);
+ OutputDebugString (sigmsg);
}
+ ResumeThread (th);
+ }
+}
+
+extern "C" int
+setcontext (const ucontext_t *ucp)
+{
+ PCONTEXT ctx = (PCONTEXT) &ucp->uc_mcontext;
+ _my_tls.sigmask = ucp->uc_sigmask;
#ifdef __x86_64__
- char sigmsg[2 * sizeof (_CYGWIN_SIGNAL_STRING " ffffffff ffffffffffffffff")];
+ /* Apparently a call to NtContinue works on 64 bit as well, but using
+ RtlRestoreContext is the blessed way. */
+ RtlRestoreContext (ctx, NULL);
#else
- char sigmsg[2 * sizeof (_CYGWIN_SIGNAL_STRING " ffffffff ffffffff")];
+ NtContinue (ctx, FALSE);
+#endif
+ /* If we got here, something was wrong. */
+ set_errno (EINVAL);
+ return -1;
+}
+
+#ifdef __x86_64__
+
+extern "C" int
+getcontext (ucontext_t *ucp)
+{
+ PCONTEXT ctx = (PCONTEXT) &ucp->uc_mcontext;
+ ctx->ContextFlags = CONTEXT_FULL;
+ RtlCaptureContext (ctx);
+ __unwind_single_frame (ctx);
+ /* Successful getcontext is supposed to return 0. If we don't set rax to 0
+ here, there's a chance that code like this:
+
+ if (getcontext (&ctx) != 0)
+
+ assumes that getcontext failed after calling setcontext (&ctx).
+ Same goes for eax on 32 bit, see assembler implementation below. */
+ ucp->uc_mcontext.rax = 0;
+ ucp->uc_sigmask = ucp->uc_mcontext.oldmask = _my_tls.sigmask;
+ /* Do not touch any other member of ucontext_t. */
+ return 0;
+}
+
+extern "C" int
+swapcontext (ucontext_t *oucp, const ucontext_t *ucp)
+{
+ PCONTEXT ctx = (PCONTEXT) &oucp->uc_mcontext;
+ ctx->ContextFlags = CONTEXT_FULL;
+ RtlCaptureContext (ctx);
+ __unwind_single_frame (ctx);
+ /* See comment in getcontext. */
+ oucp->uc_mcontext.rax = 0;
+ oucp->uc_sigmask = oucp->uc_mcontext.oldmask = _my_tls.sigmask;
+ return setcontext (ucp);
+}
+
+/* Trampoline function to set the context to uc_link. The pointer to the
+ address of uc_link is stored in the callee-saved register $rbx. If uc_link
+ is NULL, call exit. */
+__asm__ (" \n\
+ .global __cont_link_context \n\
+ .seh_proc __cont_link_context \n\
+__cont_link_context: \n\
+ .seh_endprologue \n\
+ movq %rbx, %rsp \n\
+ movq (%rsp), %rcx \n\
+ # align stack and subtract shadow space \n\
+ andq $~0xf, %rsp \n\
+ subq $0x20, %rsp \n\
+ testq %rcx, %rcx \n\
+ je 1f \n\
+ call setcontext \n\
+ movq $0xff, %rcx \n\
+1: \n\
+ call cygwin_exit \n\
+ nop \n\
+ .seh_endproc \n\
+ ");
+
+#else
+
+/* On 32 bit it's crucial to call RtlCaptureContext in a way which makes sure
+ the callee-saved registers, especially $ebx, are not changed by the calling
+ function. If so, makecontext/__cont_link_context would be broken.
+
+ Amazing, but true: While on 64 bit RtlCaptureContext returns the exact
+ context of its own caller, as expected, on 32 bit RtlCaptureContext returns
+ the context of the callers caller. So while we have to unwind another frame
+ on 64 bit, we can skip this step on 32 bit.
+
+ Both functions are split into the first half in assembler, and the second
+ half in C to allow easy access to _my_tls. */
+
+extern "C" int
+__getcontext (ucontext_t *ucp)
+{
+ ucp->uc_mcontext.eax = 0;
+ ucp->uc_sigmask = ucp->uc_mcontext.oldmask = _my_tls.sigmask;
+ return 0;
+}
+
+__asm__ (" \n\
+ .global _getcontext \n\
+_getcontext: \n\
+ pushl %ebp \n\
+ movl %esp, %ebp \n\
+ movl 8(%esp), %eax \n\
+ pushl %eax \n\
+ call _RtlCaptureContext@4 \n\
+ popl %ebp \n\
+ jmp ___getcontext \n\
+ nop \n\
+ ");
+
+extern "C" int
+__swapcontext (ucontext_t *oucp, const ucontext_t *ucp)
+{
+ oucp->uc_mcontext.eax = 0;
+ oucp->uc_sigmask = oucp->uc_mcontext.oldmask = _my_tls.sigmask;
+ return setcontext (ucp);
+}
+
+__asm__ (" \n\
+ .global _swapcontext \n\
+_swapcontext: \n\
+ pushl %ebp \n\
+ movl %esp, %ebp \n\
+ movl 8(%esp), %eax \n\
+ pushl %eax \n\
+ call _RtlCaptureContext@4 \n\
+ popl %ebp \n\
+ jmp ___swapcontext \n\
+ nop \n\
+ ");
+
+/* Trampoline function to set the context to uc_link. The pointer to the
+ address of uc_link is stored in the callee-saved register $ebx. If uc_link
+ is NULL, call exit. */
+__asm__ (" \n\
+ .global ___cont_link_context \n\
+___cont_link_context: \n\
+ movl %ebx, %esp \n\
+ movl (%esp), %eax \n\
+ testl %eax, %eax \n\
+ je 1f \n\
+ call _setcontext \n\
+ movl $0xff, (%esp) \n\
+1: \n\
+ call _cygwin_exit \n\
+ nop \n\
+ ");
+#endif
+
+/* makecontext is modelled after GLibc's makecontext. The stack from uc_stack
+ is prepared so that it starts with a pointer to the linked context uc_link,
+ followed by the arguments to func, and finally at the bottom the "return"
+ address set to __cont_link_context. In the ucp context, rbx/ebx is set to
+ point to the stack address where the pointer to uc_link is stored. The
+ requirement to make this work is that rbx/ebx are callee-saved registers
+ per the ABI. If any function is called which doesn't follow the ABI
+ conventions, e.g. assembler code, this method will break. But that's ok. */
+extern "C" void
+makecontext (ucontext_t *ucp, void (*func) (void), int argc, ...)
+{
+ extern void __cont_link_context (void);
+ uintptr_t *sp;
+ va_list ap;
+
+ /* Initialize sp to the top of the stack. */
+ sp = (uintptr_t *) ((uintptr_t) ucp->uc_stack.ss_sp + ucp->uc_stack.ss_size);
+ /* Subtract slots required for arguments and the pointer to uc_link. */
+ sp -= (argc + 1);
+ /* Align. */
+ sp = (uintptr_t *) ((uintptr_t) sp & ~0xf);
+ /* Subtract one slot for setting the return address. */
+ --sp;
+ /* Set return address to the trampolin function __cont_link_context. */
+ sp[0] = (uintptr_t) __cont_link_context;
+ /* Fetch arguments and store them on the stack.
+
+ x86_64 only:
+
+ - Store first four args in the AMD64 ABI arg registers.
+
+ - Note that the stack is not short by these four register args. The
+ reason is the shadow space for these regs required by the AMD64 ABI.
+
+ - The definition of makecontext only allows for "int" sized arguments to
+ func, 32 bit, likely for historical reasons. However, the argument
+ slots on x86_64 are 64 bit anyway, so we can fetch and store the args
+ as 64 bit values, and func can request 64 bit args without violating
+ the definition. This potentially allows porting 32 bit applications
+ providing pointer values to func without additional porting effort. */
+ va_start (ap, argc);
+ for (int i = 0; i < argc; ++i)
+#ifdef __x86_64__
+ switch (i)
+ {
+ case 0:
+ ucp->uc_mcontext.rcx = va_arg (ap, uintptr_t);
+ break;
+ case 1:
+ ucp->uc_mcontext.rdx = va_arg (ap, uintptr_t);
+ break;
+ case 2:
+ ucp->uc_mcontext.r8 = va_arg (ap, uintptr_t);
+ break;
+ case 3:
+ ucp->uc_mcontext.r9 = va_arg (ap, uintptr_t);
+ break;
+ default:
+ sp[i + 1] = va_arg (ap, uintptr_t);
+ break;
+ }
+#else
+ sp[i + 1] = va_arg (ap, uintptr_t);
+#endif
+ va_end (ap);
+ /* Store pointer to uc_link at the top of the stack. */
+ sp[argc + 1] = (uintptr_t) ucp->uc_link;
+ /* Last but not least set the register in the context at ucp so that a
+ subsequent setcontext or swapcontext picks up the right values:
+ - Set rip/eip to the target function.
+ - Set rsp/esp to the just computed stack pointer value.
+ - Set rbx/ebx to the address of the pointer to uc_link. */
+#ifdef __x86_64__
+ ucp->uc_mcontext.rip = (uint64_t) func;
+ ucp->uc_mcontext.rsp = (uint64_t) sp;
+ ucp->uc_mcontext.rbx = (uint64_t) (sp + argc + 1);
+#else
+ ucp->uc_mcontext.eip = (uint32_t) func;
+ ucp->uc_mcontext.esp = (uint32_t) sp;
+ ucp->uc_mcontext.ebx = (uint32_t) (sp + argc + 1);
#endif
- __small_sprintf (sigmsg, _CYGWIN_SIGNAL_STRING " %d %y %p", si.si_signo,
- thread_id, &thread_context);
- OutputDebugString (sigmsg);
- }
-out:
- if (th)
- ResumeThread (th);
}
diff --git a/winsup/cygwin/exec.cc b/winsup/cygwin/exec.cc
index fb92fdcb8..6ed714d6a 100644
--- a/winsup/cygwin/exec.cc
+++ b/winsup/cygwin/exec.cc
@@ -1,8 +1,5 @@
/* exec.cc: exec system call support.
- Copyright 1996, 1997, 1998, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2008,
- 2009, 2011, 2012 Red Hat, Inc.
-
This file is part of Cygwin.
This software is a copyrighted work licensed under the terms of the
@@ -35,7 +32,6 @@ execl (const char *path, const char *arg0, ...)
argv[i] = va_arg (args, const char *);
while (argv[i++] != NULL);
va_end (args);
- MALLOC_CHECK;
return spawnve (_P_OVERLAY, path, (char * const *) argv, cur_environ ());
}
@@ -55,7 +51,6 @@ execle (const char *path, const char *arg0, ...)
while (argv[i++] != NULL);
envp = va_arg (args, const char * const *);
va_end (args);
- MALLOC_CHECK;
return spawnve (_P_OVERLAY, path, (char * const *) argv, envp);
}
@@ -74,34 +69,31 @@ execlp (const char *file, const char *arg0, ...)
argv[i] = va_arg (args, const char *);
while (argv[i++] != NULL);
va_end (args);
- MALLOC_CHECK;
return spawnve (_P_OVERLAY | _P_PATH_TYPE_EXEC,
- find_exec (file, buf, "PATH=", FE_NNF) ?: "",
+ find_exec (file, buf, "PATH", FE_NNF) ?: "",
(char * const *) argv, cur_environ ());
}
extern "C" int
execv (const char *path, char * const *argv)
{
- MALLOC_CHECK;
return spawnve (_P_OVERLAY, path, argv, cur_environ ());
}
extern "C" int
execve (const char *path, char *const argv[], char *const envp[])
{
- MALLOC_CHECK;
return spawnve (_P_OVERLAY, path, argv, envp);
}
+EXPORT_ALIAS (execve, _execve) /* For newlib */
extern "C" int
execvp (const char *file, char * const *argv)
{
path_conv buf;
- MALLOC_CHECK;
return spawnve (_P_OVERLAY | _P_PATH_TYPE_EXEC,
- find_exec (file, buf, "PATH=", FE_NNF) ?: "",
+ find_exec (file, buf, "PATH", FE_NNF) ?: "",
argv, cur_environ ());
}
@@ -110,9 +102,8 @@ execvpe (const char *file, char * const *argv, char *const *envp)
{
path_conv buf;
- MALLOC_CHECK;
return spawnve (_P_OVERLAY | _P_PATH_TYPE_EXEC,
- find_exec (file, buf, "PATH=", FE_NNF) ?: "",
+ find_exec (file, buf, "PATH", FE_NNF) ?: "",
argv, envp);
}
@@ -126,7 +117,6 @@ fexecve (int fd, char * const *argv, char *const *envp)
return -1;
}
- MALLOC_CHECK;
return spawnve (_P_OVERLAY, cfd->pc.get_win32 (), argv, envp);
}
diff --git a/winsup/cygwin/external.cc b/winsup/cygwin/external.cc
index 4dc87bf80..c81bdc0fa 100644
--- a/winsup/cygwin/external.cc
+++ b/winsup/cygwin/external.cc
@@ -1,8 +1,5 @@
/* external.cc: Interface to Cygwin internals from external programs.
- Copyright 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007,
- 2008, 2009, 2010, 2011, 2012 Red Hat, Inc.
-
Written by Christopher Faylor <cgf@cygnus.com>
This file is part of Cygwin.
@@ -26,6 +23,8 @@ details. */
#include "child_info.h"
#include "environ.h"
#include "cygserver_setpwd.h"
+#include "pwdgrp.h"
+#include "exception.h"
#include <unistd.h>
#include <stdlib.h>
#include <wchar.h>
@@ -137,7 +136,8 @@ create_winenv (const char * const *env)
{
int unused_envc;
PWCHAR envblock = NULL;
- char **envp = build_env (env ?: cur_environ (), envblock, unused_envc, false);
+ char **envp = build_env (env ?: cur_environ (), envblock, unused_envc, false,
+ NULL);
PWCHAR p = envblock;
if (envp)
@@ -242,11 +242,13 @@ cygwin_internal (cygwin_getinfo_types t, ...)
break;
case CW_USER_DATA:
+#ifndef __x86_64__
/* This is a kludge to work around a version of _cygwin_common_crt0
which overwrote the cxx_malloc field with the local DLL copy.
Hilarity ensues if the DLL is not loaded like while the process
is forking. */
__cygwin_user_data.cxx_malloc = &default_cygwin_cxx_malloc;
+#endif
res = (uintptr_t) &__cygwin_user_data;
break;
@@ -379,13 +381,13 @@ cygwin_internal (cygwin_getinfo_types t, ...)
case CW_GET_UID_FROM_SID:
{
cygpsid psid = va_arg (arg, PSID);
- res = psid.get_id (false, NULL);
+ res = psid.get_uid (NULL);
}
break;
case CW_GET_GID_FROM_SID:
{
cygpsid psid = va_arg (arg, PSID);
- res = psid.get_id (true, NULL);
+ res = psid.get_gid (NULL);
}
break;
case CW_GET_BINMODE:
@@ -553,6 +555,161 @@ cygwin_internal (cygwin_getinfo_types t, ...)
}
break;
+ case CW_SETENT:
+ {
+ int group = va_arg (arg, int);
+ int enums = va_arg (arg, int);
+ PCWSTR enum_tdoms = va_arg (arg, PCWSTR);
+ if (group)
+ res = (uintptr_t) setgrent_filtered (enums, enum_tdoms);
+ else
+ res = (uintptr_t) setpwent_filtered (enums, enum_tdoms);
+ }
+ break;
+
+ case CW_GETENT:
+ {
+ int group = va_arg (arg, int);
+ void *obj = va_arg (arg, void *);
+ if (obj)
+ {
+ if (group)
+ res = (uintptr_t) getgrent_filtered (obj);
+ else
+ res = (uintptr_t) getpwent_filtered (obj);
+ }
+ }
+ break;
+
+ case CW_ENDENT:
+ {
+ int group = va_arg (arg, int);
+ void *obj = va_arg (arg, void *);
+ if (obj)
+ {
+ if (group)
+ endgrent_filtered (obj);
+ else
+ endpwent_filtered (obj);
+ res = 0;
+ }
+ }
+ break;
+
+ case CW_GETNSSSEP:
+ res = (uintptr_t) cygheap->pg.nss_separator ();
+ break;
+
+ case CW_GETNSS_PWD_SRC:
+ res = (uintptr_t) cygheap->pg.nss_pwd_src ();
+ break;
+
+ case CW_GETNSS_GRP_SRC:
+ res = (uintptr_t) cygheap->pg.nss_grp_src ();
+ break;
+
+ case CW_GETPWSID:
+ {
+ int db_only = va_arg (arg, int);
+ PSID psid = va_arg (arg, PSID);
+ cygpsid sid (psid);
+ res = (uintptr_t) (db_only ? internal_getpwsid_from_db (sid)
+ : internal_getpwsid (sid));
+ }
+ break;
+
+ case CW_GETGRSID:
+ {
+ int db_only = va_arg (arg, int);
+ PSID psid = va_arg (arg, PSID);
+ cygpsid sid (psid);
+ res = (uintptr_t) (db_only ? internal_getgrsid_from_db (sid)
+ : internal_getgrsid (sid));
+ }
+ break;
+
+ case CW_CYGNAME_FROM_WINNAME:
+ {
+ /* This functionality has been added mainly for sshd. Sshd
+ calls getpwnam() with the username of the non-privileged
+ user used for privilege separation. This is usually a
+ fixed string "sshd". However, when using usernames from
+ the Windows DBs, it's no safe bet anymore if the username
+ is "sshd", it could also be "DOMAIN+sshd". So what we do
+ here is this:
+
+ Sshd calls cygwin_internal (CW_CYGNAME_FROM_WINNAME,
+ "sshd",
+ username_buffer,
+ sizeof username_buffer);
+
+ If this call succeeds, sshd expects the correct Cygwin
+ username of the unprivileged sshd account in username_buffer.
+
+ The below code checks for a Windows username matching the
+ incoming username, and then fetches the Cygwin username with
+ the matching SID. This is our username used for privsep then.
+
+ Of course, other applications with similar needs can use the
+ same method. */
+ const char *winname = va_arg (arg, const char *);
+ char *buffer = va_arg (arg, char *);
+ size_t buflen = va_arg (arg, size_t);
+
+ if (!winname || !buffer || !buflen)
+ break;
+
+ WCHAR name[UNLEN + 1];
+ sys_mbstowcs (name, sizeof name, winname);
+
+ cygsid sid;
+ DWORD slen = SECURITY_MAX_SID_SIZE;
+ WCHAR dom[DNLEN + 1];
+ DWORD dlen = DNLEN + 1;
+ SID_NAME_USE acc_type;
+
+ if (!LookupAccountNameW (NULL, name, sid, &slen, dom, &dlen,
+ &acc_type))
+ break;
+
+ struct passwd *pw = internal_getpwsid (sid);
+ if (!pw)
+ break;
+
+ buffer[0] = '\0';
+ strncat (buffer, pw->pw_name, buflen - 1);
+ res = 0;
+ }
+ break;
+
+ case CW_FIXED_ATEXIT:
+ res = 0;
+ break;
+
+ case CW_EXCEPTION_RECORD_FROM_SIGINFO_T:
+ {
+ siginfo_t *si = va_arg(arg, siginfo_t *);
+ EXCEPTION_RECORD *er = va_arg(arg, EXCEPTION_RECORD *);
+ if (si && si->si_cyg && er)
+ {
+ memcpy(er, ((cygwin_exception *)si->si_cyg)->exception_record(),
+ sizeof(EXCEPTION_RECORD));
+ res = 0;
+ }
+ }
+ break;
+
+ case CW_CYGHEAP_PROFTHR_ALL:
+ {
+ typedef void (*func_t) (HANDLE);
+ extern void cygheap_profthr_all (func_t);
+
+ func_t profthr_byhandle = va_arg(arg, func_t);
+ cygheap_profthr_all (profthr_byhandle);
+ res = 0;
+ }
+ break;
+
default:
set_errno (ENOSYS);
}
diff --git a/winsup/cygwin/external.sgml b/winsup/cygwin/external.sgml
deleted file mode 100644
index bbfdd0fb8..000000000
--- a/winsup/cygwin/external.sgml
+++ /dev/null
@@ -1,18 +0,0 @@
-
-<sect1 id="func-cygwin-internal">
-<title>cygwin_internal</title>
-
-<funcsynopsis><funcprototype>
-<funcdef>extern "C" DWORD
-<function>cygwin_internal</function></funcdef>
-<paramdef>cygwin_getinfo_types <parameter>t</parameter></paramdef>
-<paramdef><parameter>...</parameter></paramdef>
-</funcprototype></funcsynopsis>
-
-<para>This function gives you access to various internal data and functions.
-It takes two arguments. The first argument is a type from the 'cygwin_getinfo_types'
-enum. The second is an optional pointer.</para>
-<para>Stay away unless you know what you're doing.</para>
-
-</sect1>
-
diff --git a/winsup/cygwin/fcntl.cc b/winsup/cygwin/fcntl.cc
index ea9a71a5e..4859b131c 100644
--- a/winsup/cygwin/fcntl.cc
+++ b/winsup/cygwin/fcntl.cc
@@ -1,8 +1,5 @@
/* fcntl.cc: fcntl syscall
- Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2005, 2008, 2009,
- 2010, 2011, 2012, 2013 Red Hat, Inc.
-
This file is part of Cygwin.
This software is a copyrighted work licensed under the terms of the
@@ -28,53 +25,56 @@ fcntl64 (int fd, int cmd, ...)
pthread_testcancel ();
- debug_printf ("fcntl(%d, %d, ...)", fd, cmd);
- myfault efault;
- if (efault.faulted (EFAULT))
- return -1;
+ __try
+ {
- cygheap_fdget cfd (fd, true);
- if (cfd < 0)
- goto done;
+ debug_printf ("fcntl(%d, %d, ...)", fd, cmd);
- /* FIXME? All numerical args to fcntl are defined as long on Linux.
- This relies on a really dirty trick on x86_64: A 32 bit mov to
- a register (e.g. mov $1, %edx) always sets the high 32 bit to 0.
- We're following the Linux lead here since the third arg to any
- function is in a register anyway (%r8 in MS ABI). That's the easy
- case which is covered here by always reading the arg with
- sizeof (intptr_t) == sizeof (long) == sizeof (void*) which matches
- all targets.
-
- However, the POSIX standard defines all numerical args as type int.
- If we take that literally, we had a (small) problem on 64 bit, since
- sizeof (void*) != sizeof (int). If we would like to follow POSIX
- more closely than Linux, we'd have to call va_arg on a per cmd basis. */
+ /* Don't lock the fd table when performing locking calls. */
+ cygheap_fdget cfd (fd, cmd < F_GETLK || cmd > F_SETLKW);
+ if (cfd < 0)
+ __leave;
- va_start (args, cmd);
- arg = va_arg (args, intptr_t);
- va_end (args);
+ /* FIXME? All numerical args to fcntl are defined as long on Linux.
+ This relies on a really dirty trick on x86_64: A 32 bit mov to
+ a register (e.g. mov $1, %edx) always sets the high 32 bit to 0.
+ We're following the Linux lead here since the third arg to any
+ function is in a register anyway (%r8 in MS ABI). That's the easy
+ case which is covered here by always reading the arg with
+ sizeof (intptr_t) == sizeof (long) == sizeof (void*) which matches
+ all targets.
+
+ However, the POSIX standard defines all numerical args as type int.
+ If we take that literally, we had a (small) problem on 64 bit, since
+ sizeof (void*) != sizeof (int). If we would like to follow POSIX more
+ closely than Linux, we'd have to call va_arg on a per cmd basis. */
- switch (cmd)
- {
- case F_DUPFD:
- case F_DUPFD_CLOEXEC:
- if (arg >= 0 && arg < OPEN_MAX_MAX)
- {
- int flags = cmd == F_DUPFD_CLOEXEC ? O_CLOEXEC : 0;
- res = cygheap->fdtab.dup3 (fd, cygheap_fdnew ((arg) - 1), flags);
- }
- else
+ va_start (args, cmd);
+ arg = va_arg (args, intptr_t);
+ va_end (args);
+
+ switch (cmd)
{
- set_errno (EINVAL);
- res = -1;
+ case F_DUPFD:
+ case F_DUPFD_CLOEXEC:
+ if (arg >= 0 && arg < OPEN_MAX_MAX)
+ {
+ int flags = cmd == F_DUPFD_CLOEXEC ? O_CLOEXEC : 0;
+ res = cygheap->fdtab.dup3 (fd, cygheap_fdnew ((arg) - 1), flags);
+ }
+ else
+ {
+ set_errno (EINVAL);
+ res = -1;
+ }
+ break;
+ default:
+ res = cfd->fcntl (cmd, arg);
+ break;
}
- break;
- default:
- res = cfd->fcntl (cmd, arg);
- break;
}
-done:
+ __except (EFAULT) {}
+ __endtry
syscall_printf ("%R = fcntl(%d, %d, %ly)", res, fd, cmd, arg);
return res;
}
@@ -91,32 +91,34 @@ _fcntl (int fd, int cmd, ...)
struct __flock32 *src = NULL;
struct flock dst;
- myfault efault;
- if (efault.faulted (EFAULT))
- return -1;
-
- va_start (args, cmd);
- arg = va_arg (args, intptr_t);
- va_end (args);
- if (cmd == F_GETLK || cmd == F_SETLK || cmd == F_SETLKW)
+ __try
{
- src = (struct __flock32 *) arg;
- dst.l_type = src->l_type;
- dst.l_whence = src->l_whence;
- dst.l_start = src->l_start;
- dst.l_len = src->l_len;
- dst.l_pid = src->l_pid;
- arg = (intptr_t) &dst;
- }
- int res = fcntl64 (fd, cmd, arg);
- if (cmd == F_GETLK)
- {
- src->l_type = dst.l_type;
- src->l_whence = dst.l_whence;
- src->l_start = dst.l_start;
- src->l_len = dst.l_len;
- src->l_pid = (short) dst.l_pid;
+ va_start (args, cmd);
+ arg = va_arg (args, intptr_t);
+ va_end (args);
+ if (cmd == F_GETLK || cmd == F_SETLK || cmd == F_SETLKW)
+ {
+ src = (struct __flock32 *) arg;
+ dst.l_type = src->l_type;
+ dst.l_whence = src->l_whence;
+ dst.l_start = src->l_start;
+ dst.l_len = src->l_len;
+ dst.l_pid = src->l_pid;
+ arg = (intptr_t) &dst;
+ }
+ int res = fcntl64 (fd, cmd, arg);
+ if (cmd == F_GETLK)
+ {
+ src->l_type = dst.l_type;
+ src->l_whence = dst.l_whence;
+ src->l_start = dst.l_start;
+ src->l_len = dst.l_len;
+ src->l_pid = (short) dst.l_pid;
+ }
+ return res;
}
- return res;
+ __except (EFAULT)
+ __endtry
+ return -1;
}
#endif
diff --git a/winsup/cygwin/fenv.cc b/winsup/cygwin/fenv.cc
index 5443681f9..bd3f90495 100755..100644
--- a/winsup/cygwin/fenv.cc
+++ b/winsup/cygwin/fenv.cc
@@ -1,7 +1,5 @@
/* fenv.cc
- Copyright 2010, 2011, 2012 Red Hat, Inc.
-
This file is part of Cygwin.
This software is a copyrighted work licensed under the terms of the
@@ -295,9 +293,8 @@ fegetexceptflag (fexcept_t *flagp, int excepts)
if (use_sse)
__asm__ volatile ("stmxcsr %0" : "=m" (mxcsr) : );
- /* Mask undesired bits out and set result struct. */
- flagp->_fpu_exceptions = (sw & excepts);
- flagp->_sse_exceptions = (mxcsr & excepts);
+ /* Mask undesired bits out and set result. */
+ *flagp = (sw | mxcsr) & excepts;
return 0;
}
@@ -317,9 +314,9 @@ fesetexceptflag (const fexcept_t *flagp, int excepts)
/* Set/Clear desired exception bits. */
fenv._fpu._fpu_sw &= ~excepts;
- fenv._fpu._fpu_sw |= (excepts & flagp->_fpu_exceptions);
+ fenv._fpu._fpu_sw |= excepts & *flagp;
fenv._sse_mxcsr &= ~excepts;
- fenv._sse_mxcsr |= (excepts & flagp->_sse_exceptions);
+ fenv._sse_mxcsr |= excepts & *flagp;
/* Set back into FPU state. */
return fesetenv (&fenv);
diff --git a/winsup/cygwin/fhandler.cc b/winsup/cygwin/fhandler.cc
index 920ab7f49..53fe6b0e6 100644
--- a/winsup/cygwin/fhandler.cc
+++ b/winsup/cygwin/fhandler.cc
@@ -1,8 +1,5 @@
/* fhandler.cc. See console.cc for fhandler_console functions.
- Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008, 2009, 2010, 2011, 2012, 2013 Red Hat, Inc.
-
This file is part of Cygwin.
This software is a copyrighted work licensed under the terms of the
@@ -13,7 +10,7 @@ details. */
#include <unistd.h>
#include <stdlib.h>
#include <sys/uio.h>
-#include <sys/acl.h>
+#include <cygwin/acl.h>
#include <sys/param.h>
#include "cygerrno.h"
#include "perprocess.h"
@@ -205,6 +202,8 @@ fhandler_base::set_flags (int flags, int supplied_bin)
bin = wbinary () || rbinary () ? O_BINARY : O_TEXT;
openflags = flags | bin;
+ if (openflags & O_NONBLOCK)
+ was_nonblocking (true);
bin &= O_BINARY;
rbinary (bin ? true : false);
@@ -461,7 +460,7 @@ fhandler_base::open_with_arch (int flags, mode_t mode)
{
int res;
if (!(res = (archetype && archetype->io_handle)
- || open (flags, (mode & 07777) & ~cygheap->umask)))
+ || open (flags, mode & 07777)))
{
if (archetype)
delete archetype;
@@ -498,6 +497,44 @@ fhandler_base::open_with_arch (int flags, mode_t mode)
}
close_on_exec (flags & O_CLOEXEC);
+ /* A unique ID is necessary to recognize fhandler entries which are
+ duplicated by dup(2) or fork(2). This is used in BSD flock calls
+ to identify the descriptor. Skip nohandle fhandlers since advisory
+ locking is unusable for those anyway. */
+ if (!nohandle ())
+ set_unique_id ();
+ return res;
+}
+
+/* Open a fake handle to \\Device\\Null. This is a helper function for
+ fhandlers which just need some handle to keep track of BSD flock locks. */
+int
+fhandler_base::open_null (int flags)
+{
+ int res = 0;
+ HANDLE fh;
+ OBJECT_ATTRIBUTES attr;
+ IO_STATUS_BLOCK io;
+ NTSTATUS status;
+
+ InitializeObjectAttributes (&attr, &ro_u_null, OBJ_CASE_INSENSITIVE |
+ ((flags & O_CLOEXEC) ? 0 : OBJ_INHERIT),
+ NULL, NULL);
+ status = NtCreateFile (&fh, GENERIC_READ | SYNCHRONIZE, &attr, &io, NULL, 0,
+ FILE_SHARE_READ | FILE_SHARE_WRITE, FILE_OPEN,
+ FILE_SYNCHRONOUS_IO_NONALERT, NULL, 0);
+ if (!NT_SUCCESS (status))
+ {
+ __seterrno_from_nt_status (status);
+ goto done;
+ }
+ set_io_handle (fh);
+ set_flags (flags, pc.binmode ());
+ res = 1;
+ set_open_status ();
+done:
+ debug_printf ("%y = NtCreateFile (%p, ... %S ...)", status, fh, &ro_u_null);
+ syscall_printf ("%d = fhandler_base::open_null (%y)", res, flags);
return res;
}
@@ -523,38 +560,44 @@ fhandler_base::open (int flags, mode_t mode)
options = FILE_OPEN_FOR_BACKUP_INTENT;
switch (query_open ())
{
- case query_read_control:
- access = READ_CONTROL;
- break;
- case query_read_attributes:
- access = READ_CONTROL | FILE_READ_ATTRIBUTES;
- break;
- case query_write_control:
- access = READ_CONTROL | WRITE_OWNER | WRITE_DAC | FILE_WRITE_ATTRIBUTES;
- break;
- case query_write_dac:
- access = READ_CONTROL | WRITE_DAC | FILE_WRITE_ATTRIBUTES;
- break;
- case query_write_attributes:
- access = READ_CONTROL | FILE_WRITE_ATTRIBUTES;
- break;
- default:
- if ((flags & O_ACCMODE) == O_RDONLY)
+ case query_read_control:
+ access = READ_CONTROL;
+ break;
+ case query_read_attributes:
+ access = READ_CONTROL | FILE_READ_ATTRIBUTES;
+ break;
+ case query_write_control:
+ access = READ_CONTROL | WRITE_OWNER | WRITE_DAC | FILE_WRITE_ATTRIBUTES;
+ break;
+ case query_write_dac:
+ access = READ_CONTROL | WRITE_DAC | FILE_WRITE_ATTRIBUTES;
+ break;
+ case query_write_attributes:
+ access = READ_CONTROL | FILE_WRITE_ATTRIBUTES;
+ break;
+ default:
+ switch (flags & O_ACCMODE)
+ {
+ case O_RDONLY:
access = GENERIC_READ;
- else if ((flags & O_ACCMODE) == O_WRONLY)
+ break;
+ case O_WRONLY:
access = GENERIC_WRITE | READ_CONTROL | FILE_READ_ATTRIBUTES;
- else
+ break;
+ default:
access = GENERIC_READ | GENERIC_WRITE;
- if (flags & O_SYNC)
- options |= FILE_WRITE_THROUGH;
- if (flags & O_DIRECT)
- options |= FILE_NO_INTERMEDIATE_BUFFERING;
- if (get_major () != DEV_SERIAL_MAJOR && get_major () != DEV_TAPE_MAJOR)
- {
- options |= FILE_SYNCHRONOUS_IO_NONALERT;
- access |= SYNCHRONIZE;
- }
- break;
+ break;
+ }
+ if (flags & O_SYNC)
+ options |= FILE_WRITE_THROUGH;
+ if (flags & O_DIRECT)
+ options |= FILE_NO_INTERMEDIATE_BUFFERING;
+ if (get_major () != DEV_SERIAL_MAJOR && get_major () != DEV_TAPE_MAJOR)
+ {
+ options |= FILE_SYNCHRONOUS_IO_NONALERT;
+ access |= SYNCHRONIZE;
+ }
+ break;
}
/* Don't use the FILE_OVERWRITE{_IF} flags here. See below for an
@@ -590,7 +633,7 @@ fhandler_base::open (int flags, mode_t mode)
and/or FILE_ATTRIBUTE_SYSTEM attribute set, NtCreateFile fails with
STATUS_ACCESS_DENIED. Per MSDN you have to create the file with the
same attributes as already specified for the file. */
- if (((flags & O_CREAT) || create_disposition == FILE_OVERWRITE)
+ if (create_disposition == FILE_CREATE
&& has_attribute (FILE_ATTRIBUTE_HIDDEN | FILE_ATTRIBUTE_SYSTEM))
file_attributes |= pc.file_attributes ();
@@ -616,9 +659,10 @@ fhandler_base::open (int flags, mode_t mode)
+ p->EaNameLength + 1);
memset (nfs_attr, 0, sizeof (fattr3));
nfs_attr->type = NF3REG;
- nfs_attr->mode = mode;
+ nfs_attr->mode = (mode & 07777) & ~cygheap->umask;
}
- else if (!has_acls () && !(mode & (S_IWUSR | S_IWGRP | S_IWOTH)))
+ else if (!has_acls ()
+ && !(mode & ~cygheap->umask & (S_IWUSR | S_IWGRP | S_IWOTH)))
/* If mode has no write bits set, and ACLs are not used, we set
the DOS R/O attribute. */
file_attributes |= FILE_ATTRIBUTE_READONLY;
@@ -670,7 +714,7 @@ fhandler_base::open (int flags, mode_t mode)
This is the result of a discussion on the samba-technical list, starting at
http://lists.samba.org/archive/samba-technical/2008-July/060247.html */
if (io.Information == FILE_CREATED && has_acls ())
- set_file_attribute (fh, pc, ILLEGAL_UID, ILLEGAL_GID, S_JUSTCREATED | mode);
+ set_created_file_access (fh, pc, mode);
/* If you O_TRUNC a file on Linux, the data is truncated, but the EAs are
preserved. If you open a file on Windows with FILE_OVERWRITE{_IF} or
@@ -714,6 +758,11 @@ done:
return res;
}
+void
+fhandler_base::open_setup (int)
+{
+}
+
/* states:
open buffer in binary mode? Just do the read.
@@ -1109,6 +1158,15 @@ fhandler_base::close_with_arch ()
return res;
}
+void
+fhandler_base::cleanup ()
+{
+ /* Delete all POSIX locks on the file. Delete all flock locks on the
+ file if this is the last reference to this file. */
+ if (unique_id)
+ del_my_locks (on_close);
+}
+
int
fhandler_base::close ()
{
@@ -1184,8 +1242,13 @@ fhandler_base_overlapped::close ()
int res;
int writer = (get_access () & GENERIC_WRITE);
/* Need to treat non-blocking I/O specially because Windows appears to
- be brain-dead */
- if (writer && is_nonblocking () && has_ongoing_io ())
+ be brain-dead. We're checking here if the descriptor was ever set
+ to nonblocking, rather than checking if it's nonblocking at close time.
+ The reason is that applications may switch back to blocking (for the
+ sake of some other application accessing this descriptor) without
+ performaing any further I/O. These applications would suffer data
+ loss, which this workaround is trying to fix. */
+ if (writer && was_nonblocking () && has_ongoing_io ())
{
clone (HEAP_3_FHANDLER)->check_later ();
res = 0;
@@ -1245,9 +1308,6 @@ fhandler_base::fstat (struct stat *buf)
case FH_PIPER:
buf->st_mode = S_IFIFO | S_IRUSR;
break;
- case FH_FULL:
- buf->st_mode = S_IFCHR | S_IRUSR | S_IWUSR | S_IWGRP | S_IWOTH;
- break;
default:
buf->st_mode = S_IFCHR | STD_RBITS | STD_WBITS | S_IWGRP | S_IWOTH;
break;
@@ -1364,6 +1424,15 @@ int fhandler_base::fcntl (int cmd, intptr_t arg)
}
res = 0;
break;
+ case F_GETLK:
+ case F_SETLK:
+ case F_SETLKW:
+ {
+ struct flock *fl = (struct flock *) arg;
+ fl->l_type &= F_RDLCK | F_WRLCK | F_UNLCK;
+ res = mandatory_locking () ? mand_lock (cmd, fl) : lock (cmd, fl);
+ }
+ break;
default:
set_errno (EINVAL);
res = -1;
@@ -1565,6 +1634,8 @@ fhandler_base::set_nonblocking (int yes)
int current = openflags & O_NONBLOCK_MASK;
int new_flags = yes ? (!current ? O_NONBLOCK : current) : 0;
openflags = (openflags & ~O_NONBLOCK_MASK) | new_flags;
+ if (new_flags)
+ was_nonblocking (true);
}
int
@@ -1673,9 +1744,6 @@ fhandler_base::facl (int cmd, int nentries, aclent_t *aclbufp)
aclbufp[2].a_type = OTHER_OBJ;
aclbufp[2].a_id = ILLEGAL_GID;
aclbufp[2].a_perm = S_IROTH | S_IWOTH;
- aclbufp[3].a_type = CLASS_OBJ;
- aclbufp[3].a_id = ILLEGAL_GID;
- aclbufp[3].a_perm = S_IRWXU | S_IRWXG | S_IRWXO;
res = MIN_ACL_ENTRIES;
}
break;
@@ -2023,6 +2091,46 @@ fhandler_base_overlapped::raw_write (const void *ptr, size_t len)
else
chunk = max_atomic_write;
+ /* MSDN "WriteFile" contains the following note: "Accessing the output
+ buffer while a write operation is using the buffer may lead to
+ corruption of the data written from that buffer. [...] This can
+ be particularly problematic when using an asynchronous file handle.
+ (https://msdn.microsoft.com/en-us/library/windows/desktop/aa365747)
+
+ MSDN "Synchronous and Asynchronous I/O" contains the following note:
+ "Do not deallocate or modify [...] the data buffer until all
+ asynchronous I/O operations to the file object have been completed."
+ (https://msdn.microsoft.com/en-us/library/windows/desktop/aa365683)
+
+ This problem is a non-issue for blocking I/O, but it can lead to
+ problems when using nonblocking I/O. Consider:
+ - The application uses a static buffer in repeated calls to
+ non-blocking write.
+ - The previous write returned with success, but the overlapped I/O
+ operation is ongoing.
+ - The application copies the next set of data to the static buffer,
+ thus overwriting data still accessed by the previous write call.
+ --> potential data corruption.
+
+ What we do here is to allocate a per-fhandler buffer big enough
+ to perform the maximum atomic operation from, copy the user space
+ data over to this buffer and then call NtWriteFile on this buffer.
+ This decouples the write operation from the user buffer and the
+ user buffer can be reused without data corruption issues.
+
+ Since no further write can occur while we're still having ongoing
+ I/O, this should be reasanably safe.
+
+ Note: We only have proof that this problem actually occurs on Wine
+ yet. However, the MSDN language indicates that this may be a real
+ problem on real Windows as well. */
+ if (is_nonblocking ())
+ {
+ if (!atomic_write_buf)
+ atomic_write_buf = cmalloc_abort (HEAP_BUF, max_atomic_write);
+ ptr = memcpy (atomic_write_buf, ptr, chunk);
+ }
+
nbytes = 0;
DWORD nbytes_now = 0;
/* Write to fd in smaller chunks, accumulating a total.
diff --git a/winsup/cygwin/fhandler.h b/winsup/cygwin/fhandler.h
index fe5e3accd..4af584be2 100644
--- a/winsup/cygwin/fhandler.h
+++ b/winsup/cygwin/fhandler.h
@@ -1,8 +1,5 @@
/* fhandler.h
- Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008, 2009, 2010, 2011, 2012, 2013 Red Hat, Inc.
-
This file is part of Cygwin.
This software is a copyrighted work licensed under the terms of the
@@ -56,6 +53,7 @@ typedef struct __DIR DIR;
struct dirent;
struct iovec;
struct acl;
+struct __acl_t;
enum dirent_states
{
@@ -77,7 +75,8 @@ enum conn_state
unconnected = 0,
connect_pending = 1,
connected = 2,
- connect_failed = 3
+ listener = 3,
+ connect_failed = 4
};
enum line_edit_status
@@ -148,12 +147,16 @@ class fhandler_base
unsigned need_fork_fixup : 1; /* Set if need to fixup after fork. */
unsigned isclosed : 1; /* Set when fhandler is closed. */
unsigned mandatory_locking : 1; /* Windows mandatory locking */
+ unsigned was_nonblocking : 1; /* Set when setting O_NONBLOCK. Never
+ reset. This is for the sake of
+ fhandler_base_overlapped::close. */
public:
status_flags () :
rbinary (0), rbinset (0), wbinary (0), wbinset (0), nohandle (0),
did_lseek (0), query_open (no_query), close_on_exec (0),
- need_fork_fixup (0), isclosed (0), mandatory_locking (0)
+ need_fork_fixup (0), isclosed (0), mandatory_locking (0),
+ was_nonblocking (0)
{}
} status, open_status;
@@ -177,8 +180,9 @@ class fhandler_base
size_t rabuflen;
/* Used for advisory file locking. See flock.cc. */
- long long unique_id;
+ int64_t unique_id;
void del_my_locks (del_lock_called_from);
+ void set_ino (ino_t i) { ino = i; }
HANDLE read_state;
@@ -195,7 +199,7 @@ class fhandler_base
virtual void set_name (path_conv &pc);
virtual void set_name (const char *s)
{
- pc.set_normalized_path (s);
+ pc.set_posix (s);
pc.set_path (s);
}
int error () const {return pc.error;}
@@ -249,6 +253,7 @@ class fhandler_base
IMPLEMENT_STATUS_FLAG (bool, need_fork_fixup)
IMPLEMENT_STATUS_FLAG (bool, isclosed)
IMPLEMENT_STATUS_FLAG (bool, mandatory_locking)
+ IMPLEMENT_STATUS_FLAG (bool, was_nonblocking)
int get_default_fmode (int flags);
@@ -294,11 +299,13 @@ class fhandler_base
bool isremote () { return pc.isremote (); }
bool has_attribute (DWORD x) const {return pc.has_attribute (x);}
- const char *get_name () const { return pc.normalized_path; }
+ const char *get_name () const { return pc.get_posix (); }
const char *get_win32_name () { return pc.get_win32 (); }
- dev_t get_dev () { return pc.fs_serial_number (); }
+ virtual dev_t get_dev () { return get_device (); }
+ /* Use get_plain_ino if the caller needs to avoid hashing if ino is 0. */
+ ino_t get_plain_ino () { return ino; }
ino_t get_ino () { return ino ?: ino = hash_path_name (0, pc.get_nt_native_path ()); }
- long long get_unique_id () const { return unique_id; }
+ int64_t get_unique_id () const { return unique_id; }
/* Returns name used for /proc/<pid>/fd in buf. */
virtual char *get_proc_fd_name (char *buf);
@@ -310,12 +317,15 @@ class fhandler_base
virtual bool need_fixup_before () const {return false;}
int open_with_arch (int, mode_t = 0);
+ int open_null (int flags);
virtual int open (int, mode_t);
- virtual void open_setup (int flags) { return; }
+ virtual void open_setup (int flags);
+ void set_unique_id (int64_t u) { unique_id = u; }
+ void set_unique_id () { NtAllocateLocallyUniqueId ((PLUID) &unique_id); }
int close_with_arch ();
virtual int close ();
- virtual void cleanup () { return; }
+ virtual void cleanup ();
int _archetype_usecount (const char *fn, int ln, int n)
{
if (!archetype)
@@ -333,8 +343,7 @@ class fhandler_base
void __reg2 stat_fixup (struct stat *buf);
int __reg2 fstat_fs (struct stat *buf);
private:
- int __reg3 fstat_helper (struct stat *buf,
- DWORD nNumberOfLinks);
+ int __reg2 fstat_helper (struct stat *buf);
int __reg2 fstat_by_nfs_ea (struct stat *buf);
int __reg2 fstat_by_handle (struct stat *buf);
int __reg2 fstat_by_name (struct stat *buf);
@@ -344,6 +353,8 @@ public:
virtual int __reg1 fchmod (mode_t mode);
virtual int __reg2 fchown (uid_t uid, gid_t gid);
virtual int __reg3 facl (int, int, struct acl *);
+ virtual struct __acl_t * __reg2 acl_get (uint32_t);
+ virtual int __reg3 acl_set (struct __acl_t *, uint32_t);
virtual ssize_t __reg3 fgetxattr (const char *, void *, size_t);
virtual int __reg3 fsetxattr (const char *, const void *, size_t, int);
virtual int __reg3 fadvise (off_t, off_t, int);
@@ -371,7 +382,7 @@ public:
virtual int munmap (HANDLE h, caddr_t addr, size_t len);
virtual int msync (HANDLE h, caddr_t addr, size_t len, int flags);
virtual bool fixup_mmap_after_fork (HANDLE h, int prot, int flags,
- off_t offset, DWORD size,
+ off_t offset, SIZE_T size,
void *address);
void *operator new (size_t, void *p) __attribute__ ((nothrow)) {return p;}
@@ -404,8 +415,10 @@ public:
that some fd's have two handles. */
virtual HANDLE& get_handle () { return io_handle; }
virtual HANDLE& get_io_handle () { return io_handle; }
+ virtual HANDLE& get_io_handle_cyg () { return io_handle; }
virtual HANDLE& get_output_handle () { return io_handle; }
virtual HANDLE get_stat_handle () { return pc.handle () ?: io_handle; }
+ virtual HANDLE get_echo_handle () const { return NULL; }
virtual bool hit_eof () {return false;}
virtual select_record *select_read (select_stuff *);
virtual select_record *select_write (select_stuff *);
@@ -500,6 +513,7 @@ class fhandler_socket: public fhandler_base
int af_local_accept ();
public:
int af_local_connect ();
+ int af_local_set_no_getpeereid ();
void af_local_set_sockpair_cred ();
private:
@@ -526,12 +540,12 @@ class fhandler_socket: public fhandler_base
unsigned saw_shutdown_read : 1; /* Socket saw a SHUT_RD */
unsigned saw_shutdown_write : 1; /* Socket saw a SHUT_WR */
unsigned saw_reuseaddr : 1; /* Socket saw SO_REUSEADDR call */
- unsigned listener : 1; /* listen called */
- unsigned connect_state : 2;
+ unsigned connect_state : 3;
+ unsigned no_getpeereid : 1;
public:
status_flags () :
async_io (0), saw_shutdown_read (0), saw_shutdown_write (0),
- listener (0), connect_state (unconnected)
+ connect_state (unconnected), no_getpeereid (0)
{}
} status;
@@ -552,8 +566,8 @@ class fhandler_socket: public fhandler_base
IMPLEMENT_STATUS_FLAG (bool, saw_shutdown_read)
IMPLEMENT_STATUS_FLAG (bool, saw_shutdown_write)
IMPLEMENT_STATUS_FLAG (bool, saw_reuseaddr)
- IMPLEMENT_STATUS_FLAG (bool, listener)
IMPLEMENT_STATUS_FLAG (conn_state, connect_state)
+ IMPLEMENT_STATUS_FLAG (bool, no_getpeereid)
int bind (const struct sockaddr *name, int namelen);
int connect (const struct sockaddr *name, int namelen);
@@ -580,7 +594,11 @@ class fhandler_socket: public fhandler_base
int ioctl (unsigned int cmd, void *);
int fcntl (int cmd, intptr_t);
- off_t lseek (off_t, int) { return 0; }
+ off_t lseek (off_t, int)
+ {
+ set_errno (ESPIPE);
+ return -1;
+ }
int shutdown (int how);
int close ();
void hclose (HANDLE) {close ();}
@@ -646,6 +664,7 @@ protected:
OVERLAPPED io_status;
OVERLAPPED *overlapped;
size_t max_atomic_write;
+ void *atomic_write_buf;
public:
wait_return __reg3 wait_overlapped (bool, bool, DWORD *, bool, DWORD = 0);
int __reg1 setup_overlapped ();
@@ -655,7 +674,7 @@ public:
OVERLAPPED *&get_overlapped () {return overlapped;}
OVERLAPPED *get_overlapped_buffer () {return &io_status;}
void set_overlapped (OVERLAPPED *ov) {overlapped = ov;}
- fhandler_base_overlapped (): io_pending (false), overlapped (NULL), max_atomic_write (0)
+ fhandler_base_overlapped (): io_pending (false), overlapped (NULL), max_atomic_write (0), atomic_write_buf (NULL)
{
memset (&io_status, 0, sizeof io_status);
}
@@ -671,11 +690,17 @@ public:
static void __reg1 flush_all_async_io ();;
fhandler_base_overlapped (void *) {}
+ ~fhandler_base_overlapped ()
+ {
+ if (atomic_write_buf)
+ cfree (atomic_write_buf);
+ }
virtual void copyto (fhandler_base *x)
{
x->pc.free_strings ();
*reinterpret_cast<fhandler_base_overlapped *> (x) = *this;
+ reinterpret_cast<fhandler_base_overlapped *> (x)->atomic_write_buf = NULL;
x->reset (this);
}
@@ -710,13 +735,14 @@ public:
int open (int flags, mode_t mode = 0);
int dup (fhandler_base *child, int);
int ioctl (unsigned int cmd, void *);
+ int __reg2 fstat (struct stat *buf);
int __reg2 fstatvfs (struct statvfs *buf);
int __reg3 fadvise (off_t, off_t, int);
int __reg3 ftruncate (off_t, bool);
- int init (HANDLE, DWORD, mode_t);
+ int init (HANDLE, DWORD, mode_t, int64_t);
static int create (fhandler_pipe *[2], unsigned, int);
static DWORD create (LPSECURITY_ATTRIBUTES, HANDLE *, HANDLE *, DWORD,
- const char *, DWORD);
+ const char *, DWORD, int64_t *unique_id = NULL);
fhandler_pipe (void *) {}
void copyto (fhandler_base *x)
@@ -979,13 +1005,14 @@ class fhandler_disk_file: public fhandler_base
int fcntl (int cmd, intptr_t);
int dup (fhandler_base *child, int);
void fixup_after_fork (HANDLE parent);
- int lock (int, struct flock *);
int mand_lock (int, struct flock *);
bool isdevice () const { return false; }
int __reg2 fstat (struct stat *buf);
int __reg1 fchmod (mode_t mode);
int __reg2 fchown (uid_t uid, gid_t gid);
int __reg3 facl (int, int, struct acl *);
+ struct __acl_t * __reg2 acl_get (uint32_t);
+ int __reg3 acl_set (struct __acl_t *, uint32_t);
ssize_t __reg3 fgetxattr (const char *, void *, size_t);
int __reg3 fsetxattr (const char *, const void *, size_t, int);
int __reg3 fadvise (off_t, off_t, int);
@@ -998,7 +1025,7 @@ class fhandler_disk_file: public fhandler_base
int munmap (HANDLE h, caddr_t addr, size_t len);
int msync (HANDLE h, caddr_t addr, size_t len, int flags);
bool fixup_mmap_after_fork (HANDLE h, int prot, int flags,
- off_t offset, DWORD size, void *address);
+ off_t offset, SIZE_T size, void *address);
int mkdir (mode_t mode);
int rmdir ();
DIR __reg2 *opendir (int fd);
@@ -1012,6 +1039,7 @@ class fhandler_disk_file: public fhandler_base
ssize_t __reg3 pwrite (void *, size_t, off_t);
fhandler_disk_file (void *) {}
+ dev_t get_dev () { return pc.fs_serial_number (); }
void copyto (fhandler_base *x)
{
@@ -1044,6 +1072,8 @@ public:
void rewinddir (DIR *);
fhandler_dev (void *) {}
+ dev_t get_dev () { return dir_exists ? pc.fs_serial_number ()
+ : get_device (); }
void copyto (fhandler_base *x)
{
@@ -1074,7 +1104,6 @@ class fhandler_cygdrive: public fhandler_disk_file
public:
fhandler_cygdrive ();
int open (int flags, mode_t mode);
- int close ();
DIR __reg2 *opendir (int fd);
int __reg3 readdir (DIR *, dirent *);
void rewinddir (DIR *);
@@ -1083,6 +1112,7 @@ class fhandler_cygdrive: public fhandler_disk_file
int __reg2 fstatvfs (struct statvfs *buf);
fhandler_cygdrive (void *) {}
+ dev_t get_dev () { return get_device (); }
void copyto (fhandler_base *x)
{
@@ -1131,7 +1161,11 @@ class fhandler_serial: public fhandler_base
int switch_modem_lines (int set, int clr);
int tcsetattr (int a, const struct termios *t);
int tcgetattr (struct termios *t);
- off_t lseek (off_t, int) { return 0; }
+ off_t lseek (off_t, int)
+ {
+ set_errno (ESPIPE);
+ return -1;
+ }
int tcflush (int);
bool is_tty () const { return true; }
void fixup_after_fork (HANDLE parent);
@@ -1190,7 +1224,8 @@ class fhandler_termios: public fhandler_base
need_fork_fixup (true);
}
HANDLE& get_output_handle () { return output_handle; }
- line_edit_status line_edit (const char *rptr, int nread, termios&);
+ line_edit_status line_edit (const char *rptr, size_t nread, termios&,
+ ssize_t *bytes_read = NULL);
void set_output_handle (HANDLE h) { output_handle = h; }
void tcinit (bool force);
bool is_tty () const { return true; }
@@ -1242,6 +1277,15 @@ enum ansi_intensity
#define gotrparen 9
#define MAXARGS 10
+enum cltype
+{
+ cl_curr_pos = 1,
+ cl_disp_beg,
+ cl_disp_end,
+ cl_buf_beg,
+ cl_buf_end
+};
+
class dev_console
{
WORD default_color, underline_color, dim_color;
@@ -1250,9 +1294,9 @@ class dev_console
int meta_mask;
/* Output state */
- int state_;
- int args_[MAXARGS];
- int nargs_;
+ int state;
+ int args[MAXARGS];
+ int nargs;
unsigned rarg;
bool saw_question_mark;
bool saw_greater_than_sign;
@@ -1262,6 +1306,7 @@ class dev_console
bool iso_2022_G1;
bool alternate_charset_active;
bool metabit;
+ bool eat_newline;
char backspace_keycode;
char my_title_buf [TITLESIZE + 1];
@@ -1274,23 +1319,22 @@ class dev_console
/* saved cursor coordinates */
int savex, savey;
- /* saved screen */
- COORD savebufsiz;
- PCHAR_INFO savebuf;
struct
{
- short Top, Bottom;
+ short Top;
+ short Bottom;
} scroll_region;
- struct
- {
- SHORT winTop;
- SHORT winBottom;
- COORD dwWinSize;
- COORD dwBufferSize;
- COORD dwCursorPosition;
- WORD wAttributes;
- } info;
+
+ CONSOLE_SCREEN_BUFFER_INFO b;
+ COORD dwWinSize;
+ COORD dwEnd;
+
+ /* saved screen */
+ COORD save_bufsize;
+ PCHAR_INFO save_buf;
+ COORD save_cursor;
+ SHORT save_top;
COORD dwLastCursorPosition;
COORD dwMousePosition; /* scroll-adjusted coord of mouse event */
@@ -1306,13 +1350,21 @@ class dev_console
bool ext_mouse_mode15;
bool use_focus;
bool raw_win32_keyboard_mode;
+ char cons_rabuf[40]; // cannot get longer than char buf[40] in char_command
+ char *cons_rapoi;
inline UINT get_console_cp ();
DWORD con_to_str (char *d, int dlen, WCHAR w);
DWORD str_to_con (mbtowc_p, const char *, PWCHAR d, const char *s, DWORD sz);
void set_color (HANDLE);
- bool fillin_info (HANDLE);
void set_default_attr ();
+ int set_cl_x (cltype);
+ int set_cl_y (cltype);
+ bool fillin (HANDLE);
+ bool __reg3 clear_should_scroll (HANDLE, int, int, int, int);
+ void __reg3 scroll_buffer (HANDLE, int, int, int, int, int, int);
+ void __reg3 clear_screen (HANDLE, int, int, int, int);
+ void __reg3 save_restore (HANDLE, char);
friend class fhandler_console;
};
@@ -1324,7 +1376,7 @@ public:
struct console_state
{
tty_min tty_min_state;
- dev_console dev_state;
+ dev_console con;
};
private:
static const unsigned MAX_WRITE_CHARS;
@@ -1342,11 +1394,12 @@ private:
/* Output calls */
void set_default_attr ();
- void clear_screen (int, int, int, int);
- void scroll_screen (int, int, int, int, int, int);
- void cursor_set (bool, int, int);
- void cursor_get (int *, int *);
- void cursor_rel (int, int);
+ void scroll_buffer (int, int, int, int, int, int);
+ void scroll_buffer_screen (int, int, int, int, int, int);
+ void __reg3 clear_screen (cltype, cltype, cltype, cltype);
+ void __reg3 cursor_set (bool, int, int);
+ void __reg3 cursor_get (int *, int *);
+ void __reg3 cursor_rel (int, int);
inline void write_replacement_char ();
inline bool write_console (PWCHAR, DWORD, DWORD&);
const unsigned char *write_normal (unsigned const char*, unsigned const char *);
@@ -1395,7 +1448,12 @@ private:
int ioctl (unsigned int cmd, void *);
int init (HANDLE, DWORD, mode_t);
bool mouse_aware (MOUSE_EVENT_RECORD& mouse_event);
- bool focus_aware () {return shared_console_info->dev_state.use_focus;}
+ bool focus_aware () {return shared_console_info->con.use_focus;}
+ bool get_cons_readahead_valid ()
+ {
+ return shared_console_info->con.cons_rapoi != NULL &&
+ *shared_console_info->con.cons_rapoi;
+ }
select_record *select_read (select_stuff *);
select_record *select_write (select_stuff *);
@@ -1410,6 +1468,7 @@ private:
bool set_unit ();
static bool need_invisible ();
static void free_console ();
+ static const char *get_nonascii_key (INPUT_RECORD& input_rec, char *);
fhandler_console (void *) {}
@@ -1472,14 +1531,18 @@ class fhandler_pty_common: public fhandler_termios
copyto (fh);
return fh;
}
+
+ protected:
+ BOOL process_opost_output (HANDLE h, const void *ptr, ssize_t& len, bool is_echo);
};
class fhandler_pty_slave: public fhandler_pty_common
{
HANDLE inuse; // used to indicate that a tty is in use
+ HANDLE output_handle_cyg;
/* Helper functions for fchmod and fchown. */
- bool fch_open_handles ();
+ bool fch_open_handles (bool chown);
int fch_set_sd (security_descriptor &sd, bool chown);
void fch_close_handles ();
@@ -1487,6 +1550,9 @@ class fhandler_pty_slave: public fhandler_pty_common
/* Constructor */
fhandler_pty_slave (int);
+ void set_output_handle_cyg (HANDLE h) { output_handle_cyg = h; }
+ HANDLE& get_output_handle_cyg () { return output_handle_cyg; }
+
int open (int flags, mode_t mode = 0);
void open_setup (int flags);
ssize_t __stdcall write (const void *ptr, size_t len);
@@ -1506,6 +1572,7 @@ class fhandler_pty_slave: public fhandler_pty_common
select_record *select_read (select_stuff *);
virtual char const *ttyname () { return pc.dev.name; }
int __reg2 fstat (struct stat *buf);
+ int __reg3 facl (int, int, struct acl *);
int __reg1 fchmod (mode_t mode);
int __reg2 fchown (uid_t uid, gid_t gid);
@@ -1534,15 +1601,19 @@ class fhandler_pty_master: public fhandler_pty_common
HANDLE master_ctl; // Control socket for handle duplication
cygthread *master_thread; // Master control thread
HANDLE from_master, to_master;
+ HANDLE echo_r, echo_w;
DWORD dwProcessId; // Owner of master handles
+ HANDLE io_handle_cyg, to_master_cyg;
+ cygthread *master_fwd_thread; // Master forwarding thread
public:
- int need_nl; // Next read should start with \n
-
+ HANDLE get_echo_handle () const { return echo_r; }
+ HANDLE& get_io_handle_cyg () { return io_handle_cyg; }
/* Constructor */
fhandler_pty_master (int);
DWORD pty_master_thread ();
+ DWORD pty_master_fwd_thread ();
int process_slave_output (char *buf, size_t len, int pktmode_on);
void doecho (const void *str, DWORD len);
int accept_input ();
@@ -1569,7 +1640,6 @@ public:
void flush_to_slave ();
fhandler_pty_master (void *) {}
- ~fhandler_pty_master ();
void copyto (fhandler_base *x)
{
@@ -1618,17 +1688,16 @@ class fhandler_dev_zero: public fhandler_base
{
public:
fhandler_dev_zero ();
- int open (int flags, mode_t mode = 0);
ssize_t __stdcall write (const void *ptr, size_t len);
void __reg3 read (void *ptr, size_t& len);
- off_t lseek (off_t offset, int whence);
+ off_t lseek (off_t, int) { return 0; }
virtual HANDLE mmap (caddr_t *addr, size_t len, int prot,
int flags, off_t off);
virtual int munmap (HANDLE h, caddr_t addr, size_t len);
virtual int msync (HANDLE h, caddr_t addr, size_t len, int flags);
virtual bool fixup_mmap_after_fork (HANDLE h, int prot, int flags,
- off_t offset, DWORD size,
+ off_t offset, SIZE_T size,
void *address);
fhandler_dev_zero (void *) {}
@@ -1652,23 +1721,17 @@ class fhandler_dev_zero: public fhandler_base
class fhandler_dev_random: public fhandler_base
{
protected:
- HCRYPTPROV crypt_prov;
uint32_t pseudo;
- off_t dummy_offset;
- bool crypt_gen_random (void *ptr, size_t len);
int pseudo_write (const void *ptr, size_t len);
int pseudo_read (void *ptr, size_t len);
public:
- fhandler_dev_random ();
- int open (int flags, mode_t mode = 0);
ssize_t __stdcall write (const void *ptr, size_t len);
void __reg3 read (void *ptr, size_t& len);
- off_t lseek (off_t offset, int whence);
- int close ();
- int dup (fhandler_base *child, int);
+ off_t lseek (off_t, int) { return 0; }
+ fhandler_dev_random () : fhandler_base () {}
fhandler_dev_random (void *) {}
void copyto (fhandler_base *x)
@@ -1689,13 +1752,15 @@ class fhandler_dev_random: public fhandler_base
class fhandler_dev_clipboard: public fhandler_base
{
+ UINT cygnativeformat;
off_t pos;
void *membuffer;
size_t msize;
+ int set_clipboard (const void *buf, size_t len);
+
public:
fhandler_dev_clipboard ();
int is_windows () { return 1; }
- int open (int flags, mode_t mode = 0);
int __reg2 fstat (struct stat *buf);
ssize_t __stdcall write (const void *ptr, size_t len);
void __reg3 read (void *ptr, size_t& len);
@@ -1731,6 +1796,7 @@ class fhandler_windows: public fhandler_base
public:
fhandler_windows ();
int is_windows () { return 1; }
+ HWND get_hwnd () { return hWnd_; }
int open (int flags, mode_t mode = 0);
ssize_t __stdcall write (const void *ptr, size_t len);
void __reg3 read (void *ptr, size_t& len);
@@ -1738,8 +1804,6 @@ class fhandler_windows: public fhandler_base
off_t lseek (off_t, int) { return 0; }
int close () { return 0; }
- void set_close_on_exec (bool val);
- void fixup_after_fork (HANDLE parent);
select_record *select_read (select_stuff *);
select_record *select_write (select_stuff *);
select_record *select_except (select_stuff *);
@@ -1777,18 +1841,25 @@ class fhandler_dev_dsp: public fhandler_base
Audio_in *audio_in_;
public:
fhandler_dev_dsp ();
+ fhandler_dev_dsp *base () const {return (fhandler_dev_dsp *)archetype;}
- int open (int flags, mode_t mode = 0);
- ssize_t __stdcall write (const void *ptr, size_t len);
- void __reg3 read (void *ptr, size_t& len);
- int ioctl (unsigned int cmd, void *);
- off_t lseek (off_t, int);
+ int open (int, mode_t mode = 0);
+ ssize_t __stdcall write (const void *, size_t);
+ void __reg3 read (void *, size_t&);
+ int ioctl (unsigned int, void *);
int close ();
- void fixup_after_fork (HANDLE parent);
+ void fixup_after_fork (HANDLE);
void fixup_after_exec ();
+
private:
- void close_audio_in ();
- void close_audio_out (bool immediately = false);
+ ssize_t __stdcall _write (const void *, size_t);
+ void __reg3 _read (void *, size_t&);
+ int _ioctl (unsigned int, void *);
+ void _fixup_after_fork (HANDLE);
+ void _fixup_after_exec ();
+
+ void __reg1 close_audio_in ();
+ void __reg2 close_audio_out (bool = false);
bool use_archetype () const {return true;}
fhandler_dev_dsp (void *) {}
@@ -1966,6 +2037,7 @@ class fhandler_netdrive: public fhandler_virtual
void rewinddir (DIR *);
int closedir (DIR *);
int open (int flags, mode_t mode = 0);
+ int close ();
int __reg2 fstat (struct stat *buf);
fhandler_netdrive (void *) {}
@@ -2031,6 +2103,7 @@ class pinfo;
class fhandler_process: public fhandler_proc
{
pid_t pid;
+ virtual_ftype_t fd_type;
public:
fhandler_process ();
virtual_ftype_t exists();
diff --git a/winsup/cygwin/fhandler_clipboard.cc b/winsup/cygwin/fhandler_clipboard.cc
index db72b9787..ccdb295f3 100644
--- a/winsup/cygwin/fhandler_clipboard.cc
+++ b/winsup/cygwin/fhandler_clipboard.cc
@@ -1,8 +1,5 @@
/* fhandler_dev_clipboard: code to access /dev/clipboard
- Copyright 2000, 2001, 2002, 2003, 2004, 2005, 2008, 2009, 2011, 2012, 2013
- Red Hat, Inc
-
Written by Charles Wilson (cwilson@ece.gatech.edu)
This file is part of Cygwin.
@@ -13,8 +10,6 @@ details. */
#include "winsup.h"
#include <wchar.h>
-#include <wingdi.h>
-#include <winuser.h>
#include "cygerrno.h"
#include "path.h"
#include "fhandler.h"
@@ -30,8 +25,6 @@ details. */
*/
static const WCHAR *CYGWIN_NATIVE = L"CYGWIN_NATIVE_CLIPBOARD";
-/* this is MT safe because windows format id's are atomic */
-static UINT cygnativeformat;
typedef struct
{
@@ -55,32 +48,16 @@ fhandler_dev_clipboard::fhandler_dev_clipboard ()
*/
int
-fhandler_dev_clipboard::dup (fhandler_base * child, int)
+fhandler_dev_clipboard::dup (fhandler_base * child, int flags)
{
fhandler_dev_clipboard *fhc = (fhandler_dev_clipboard *) child;
-
- if (!fhc->open (get_flags (), 0))
- system_printf ("error opening clipboard, %E");
- return 0;
+ fhc->pos = fhc->msize = 0;
+ fhc->membuffer = NULL;
+ return fhandler_base::dup (child, flags);
}
int
-fhandler_dev_clipboard::open (int flags, mode_t)
-{
- set_flags (flags | O_TEXT);
- pos = 0;
- if (membuffer)
- free (membuffer);
- membuffer = NULL;
- if (!cygnativeformat)
- cygnativeformat = RegisterClipboardFormatW (CYGWIN_NATIVE);
- nohandle (true);
- set_open_status ();
- return 1;
-}
-
-static int
-set_clipboard (const void *buf, size_t len)
+fhandler_dev_clipboard::set_clipboard (const void *buf, size_t len)
{
HGLOBAL hmem;
/* Native CYGWIN format */
@@ -103,8 +80,6 @@ set_clipboard (const void *buf, size_t len)
GlobalUnlock (hmem);
EmptyClipboard ();
- if (!cygnativeformat)
- cygnativeformat = RegisterClipboardFormatW (CYGWIN_NATIVE);
HANDLE ret = SetClipboardData (cygnativeformat, hmem);
CloseClipboard ();
/* According to MSDN, hmem must not be free'd after transferring the
@@ -336,7 +311,10 @@ fhandler_dev_clipboard::lseek (off_t offset, int whence)
pos = offset;
/* treat seek like rewind */
if (membuffer)
- free (membuffer);
+ {
+ free (membuffer);
+ membuffer = NULL;
+ }
msize = 0;
return 0;
}
@@ -346,15 +324,14 @@ fhandler_dev_clipboard::close ()
{
if (!have_execed)
{
- pos = 0;
+ pos = msize = 0;
if (membuffer)
{
free (membuffer);
membuffer = NULL;
}
- msize = 0;
}
- return 0;
+ return fhandler_base::close ();
}
void
diff --git a/winsup/cygwin/fhandler_console.cc b/winsup/cygwin/fhandler_console.cc
index 14802790a..380aeecf5 100644
--- a/winsup/cygwin/fhandler_console.cc
+++ b/winsup/cygwin/fhandler_console.cc
@@ -1,8 +1,5 @@
/* fhandler_console.cc
- Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008, 2009, 2010, 2011, 2012, 2013 Red Hat, Inc.
-
This file is part of Cygwin.
This software is a copyrighted work licensed under the terms of the
@@ -14,9 +11,6 @@ details. */
#include <stdio.h>
#include <stdlib.h>
#include <wchar.h>
-#include <wingdi.h>
-#include <winuser.h>
-#include <winnls.h>
#include <ctype.h>
#include <sys/param.h>
#include <sys/cygwin.h>
@@ -45,19 +39,9 @@ details. */
#define ALT_PRESSED (LEFT_ALT_PRESSED | RIGHT_ALT_PRESSED)
#define CTRL_PRESSED (LEFT_CTRL_PRESSED | RIGHT_CTRL_PRESSED)
-/*
- * Scroll the screen context.
- * x1, y1 - ul corner
- * x2, y2 - dr corner
- * xn, yn - new ul corner
- * Negative values represents current screen dimensions
- */
-
-#define dev_state (shared_console_info->dev_state)
-#define srTop (dev_state.info.winTop + dev_state.scroll_region.Top)
-#define srBottom ((dev_state.scroll_region.Bottom < 0) ? dev_state.info.winBottom : dev_state.info.winTop + dev_state.scroll_region.Bottom)
-
-const char *get_nonascii_key (INPUT_RECORD&, char *);
+#define con (shared_console_info->con)
+#define srTop (con.b.srWindow.Top + con.scroll_region.Top)
+#define srBottom ((con.scroll_region.Bottom < 0) ? con.b.srWindow.Bottom : con.b.srWindow.Top + con.scroll_region.Bottom)
const unsigned fhandler_console::MAX_WRITE_CHARS = 16384;
@@ -95,6 +79,7 @@ fhandler_console::open_shared_console (HWND hw, HANDLE& h, bool& create)
create = m != SH_JUSTOPEN;
return res;
}
+
class console_unit
{
int n;
@@ -183,17 +168,16 @@ fhandler_console::setup ()
{
if (set_unit ())
{
-
- dev_state.scroll_region.Bottom = -1;
- dev_state.dwLastCursorPosition.X = -1;
- dev_state.dwLastCursorPosition.Y = -1;
- dev_state.dwLastMousePosition.X = -1;
- dev_state.dwLastMousePosition.Y = -1;
- dev_state.dwLastButtonState = 0; /* none pressed */
- dev_state.last_button_code = 3; /* released */
- dev_state.underline_color = FOREGROUND_GREEN | FOREGROUND_BLUE;
- dev_state.dim_color = FOREGROUND_RED | FOREGROUND_GREEN | FOREGROUND_BLUE;
- dev_state.meta_mask = LEFT_ALT_PRESSED;
+ con.scroll_region.Bottom = -1;
+ con.dwLastCursorPosition.X = -1;
+ con.dwLastCursorPosition.Y = -1;
+ con.dwLastMousePosition.X = -1;
+ con.dwLastMousePosition.Y = -1;
+ con.dwLastButtonState = 0; /* none pressed */
+ con.last_button_code = 3; /* released */
+ con.underline_color = FOREGROUND_GREEN | FOREGROUND_BLUE;
+ con.dim_color = FOREGROUND_RED | FOREGROUND_GREEN | FOREGROUND_BLUE;
+ con.meta_mask = LEFT_ALT_PRESSED;
/* Set the mask that determines if an input keystroke is modified by
META. We set this based on the keyboard layout language loaded
for the current thread. The left <ALT> key always generates
@@ -204,9 +188,10 @@ fhandler_console::setup ()
these keyboards right <ALT> (called AltGr) is used to produce the
shell symbols and should not be interpreted as META. */
if (PRIMARYLANGID (LOWORD (GetKeyboardLayout (0))) == LANG_ENGLISH)
- dev_state.meta_mask |= RIGHT_ALT_PRESSED;
- dev_state.set_default_attr ();
- dev_state.backspace_keycode = CERASE;
+ con.meta_mask |= RIGHT_ALT_PRESSED;
+ con.set_default_attr ();
+ con.backspace_keycode = CERASE;
+ con.cons_rapoi = NULL;
shared_console_info->tty_min_state.is_console = true;
}
}
@@ -229,8 +214,7 @@ tty_list::get_cttyp ()
inline DWORD
dev_console::con_to_str (char *d, int dlen, WCHAR w)
{
- return sys_cp_wcstombs (cygheap->locale.wctomb, cygheap->locale.charset,
- d, dlen, &w, 1);
+ return sys_wcstombs (d, dlen, &w, 1);
}
inline UINT
@@ -250,39 +234,35 @@ dev_console::str_to_con (mbtowc_p f_mbtowc, const char *charset,
bool
fhandler_console::set_raw_win32_keyboard_mode (bool new_mode)
{
- bool old_mode = dev_state.raw_win32_keyboard_mode;
- dev_state.raw_win32_keyboard_mode = new_mode;
- syscall_printf ("raw keyboard mode %sabled", dev_state.raw_win32_keyboard_mode ? "en" : "dis");
+ bool old_mode = con.raw_win32_keyboard_mode;
+ con.raw_win32_keyboard_mode = new_mode;
+ syscall_printf ("raw keyboard mode %sabled", con.raw_win32_keyboard_mode ? "en" : "dis");
return old_mode;
};
void
fhandler_console::set_cursor_maybe ()
{
- CONSOLE_SCREEN_BUFFER_INFO now;
-
- if (!GetConsoleScreenBufferInfo (get_output_handle (), &now))
- return;
-
- if (dev_state.dwLastCursorPosition.X != now.dwCursorPosition.X ||
- dev_state.dwLastCursorPosition.Y != now.dwCursorPosition.Y)
+ con.fillin (get_output_handle ());
+ if (con.dwLastCursorPosition.X != con.b.dwCursorPosition.X ||
+ con.dwLastCursorPosition.Y != con.b.dwCursorPosition.Y)
{
- SetConsoleCursorPosition (get_output_handle (), now.dwCursorPosition);
- dev_state.dwLastCursorPosition = now.dwCursorPosition;
+ SetConsoleCursorPosition (get_output_handle (), con.b.dwCursorPosition);
+ con.dwLastCursorPosition = con.b.dwCursorPosition;
}
}
void
fhandler_console::send_winch_maybe ()
{
- SHORT y = dev_state.info.dwWinSize.Y;
- SHORT x = dev_state.info.dwWinSize.X;
- dev_state.fillin_info (get_output_handle ());
+ SHORT y = con.dwWinSize.Y;
+ SHORT x = con.dwWinSize.X;
+ con.fillin (get_output_handle ());
- if (y != dev_state.info.dwWinSize.Y || x != dev_state.info.dwWinSize.X)
+ if (y != con.dwWinSize.Y || x != con.dwWinSize.X)
{
- dev_state.scroll_region.Top = 0;
- dev_state.scroll_region.Bottom = -1;
+ con.scroll_region.Top = 0;
+ con.scroll_region.Bottom = -1;
get_ttyp ()->kill_pgrp (SIGWINCH);
}
}
@@ -291,31 +271,27 @@ fhandler_console::send_winch_maybe ()
bool
fhandler_console::mouse_aware (MOUSE_EVENT_RECORD& mouse_event)
{
- if (!dev_state.use_mouse)
+ if (!con.use_mouse)
return 0;
/* Adjust mouse position by window scroll buffer offset
and remember adjusted position in state for use by read() */
CONSOLE_SCREEN_BUFFER_INFO now;
- if (GetConsoleScreenBufferInfo (get_output_handle (), &now))
- {
- dev_state.dwMousePosition.X = mouse_event.dwMousePosition.X - now.srWindow.Left;
- dev_state.dwMousePosition.Y = mouse_event.dwMousePosition.Y - now.srWindow.Top;
- }
- else
- {
- /* Cannot adjust position by window scroll buffer offset */
- return 0;
- }
+ if (!GetConsoleScreenBufferInfo (get_output_handle (), &now))
+ /* Cannot adjust position by window scroll buffer offset */
+ return 0;
+
+ con.dwMousePosition.X = mouse_event.dwMousePosition.X - now.srWindow.Left;
+ con.dwMousePosition.Y = mouse_event.dwMousePosition.Y - now.srWindow.Top;
return ((mouse_event.dwEventFlags == 0 || mouse_event.dwEventFlags == DOUBLE_CLICK)
- && mouse_event.dwButtonState != dev_state.dwLastButtonState)
+ && mouse_event.dwButtonState != con.dwLastButtonState)
|| mouse_event.dwEventFlags == MOUSE_WHEELED
|| (mouse_event.dwEventFlags == MOUSE_MOVED
- && (dev_state.dwMousePosition.X != dev_state.dwLastMousePosition.X
- || dev_state.dwMousePosition.Y != dev_state.dwLastMousePosition.Y)
- && ((dev_state.use_mouse >= 2 && mouse_event.dwButtonState)
- || dev_state.use_mouse >= 3));
+ && (con.dwMousePosition.X != con.dwLastMousePosition.X
+ || con.dwMousePosition.Y != con.dwLastMousePosition.Y)
+ && ((con.use_mouse >= 2 && mouse_event.dwButtonState)
+ || con.use_mouse >= 3));
}
void __reg3
@@ -330,6 +306,14 @@ fhandler_console::read (void *pv, size_t& buflen)
int ch;
set_input_state ();
+ /* Check console read-ahead buffer filled from terminal requests */
+ if (con.cons_rapoi && *con.cons_rapoi)
+ {
+ *buf = *con.cons_rapoi++;
+ buflen = 1;
+ return;
+ }
+
int copied_chars = get_readahead_into_buffer (buf, buflen);
if (copied_chars)
@@ -387,7 +371,7 @@ fhandler_console::read (void *pv, size_t& buflen)
#define virtual_key_code (input_rec.Event.KeyEvent.wVirtualKeyCode)
#define control_key_state (input_rec.Event.KeyEvent.dwControlKeyState)
- dev_state.nModifiers = 0;
+ con.nModifiers = 0;
#ifdef DEBUGGING
/* allow manual switching to/from raw mode via ctrl-alt-scrolllock */
@@ -396,12 +380,12 @@ fhandler_console::read (void *pv, size_t& buflen)
((control_key_state & (LEFT_ALT_PRESSED | LEFT_CTRL_PRESSED)) == (LEFT_ALT_PRESSED | LEFT_CTRL_PRESSED))
)
{
- set_raw_win32_keyboard_mode (!dev_state.raw_win32_keyboard_mode);
+ set_raw_win32_keyboard_mode (!con.raw_win32_keyboard_mode);
continue;
}
#endif
- if (dev_state.raw_win32_keyboard_mode)
+ if (con.raw_win32_keyboard_mode)
{
__small_sprintf (tmp, "\033{%u;%u;%u;%u;%u;%luK",
input_rec.Event.KeyEvent.bKeyDown,
@@ -434,22 +418,22 @@ fhandler_console::read (void *pv, size_t& buflen)
continue;
if (control_key_state & SHIFT_PRESSED)
- dev_state.nModifiers |= 1;
+ con.nModifiers |= 1;
if (control_key_state & RIGHT_ALT_PRESSED)
- dev_state.nModifiers |= 2;
+ con.nModifiers |= 2;
if (control_key_state & CTRL_PRESSED)
- dev_state.nModifiers |= 4;
+ con.nModifiers |= 4;
if (control_key_state & LEFT_ALT_PRESSED)
- dev_state.nModifiers |= 8;
+ con.nModifiers |= 8;
/* Allow Backspace to emit ^? and escape sequences. */
if (input_rec.Event.KeyEvent.wVirtualKeyCode == VK_BACK)
{
- char c = dev_state.backspace_keycode;
+ char c = con.backspace_keycode;
nread = 0;
if (control_key_state & ALT_PRESSED)
{
- if (dev_state.metabit)
+ if (con.metabit)
c |= 0x80;
else
tmp[nread++] = '\e';
@@ -470,14 +454,14 @@ fhandler_console::read (void *pv, size_t& buflen)
toadd = get_nonascii_key (input_rec, tmp);
if (!toadd)
{
- dev_state.nModifiers = 0;
+ con.nModifiers = 0;
continue;
}
nread = strlen (toadd);
}
else
{
- nread = dev_state.con_to_str (tmp + 1, 59, wch);
+ nread = con.con_to_str (tmp + 1, 59, wch);
/* Determine if the keystroke is modified by META. The tricky
part is to distinguish whether the right Alt key should be
recognized as Alt, or as AltGr. */
@@ -501,7 +485,7 @@ fhandler_console::read (void *pv, size_t& buflen)
else
toadd = tmp + 1;
}
- else if (dev_state.metabit)
+ else if (con.metabit)
{
tmp[1] |= 0x80;
toadd = tmp + 1;
@@ -512,7 +496,7 @@ fhandler_console::read (void *pv, size_t& buflen)
tmp[1] = cyg_tolower (tmp[1]);
toadd = tmp;
nread++;
- dev_state.nModifiers &= ~4;
+ con.nModifiers &= ~4;
}
}
#undef ich
@@ -566,34 +550,34 @@ fhandler_console::read (void *pv, size_t& buflen)
if (mouse_event.dwEventFlags == MOUSE_MOVED)
{
- b = dev_state.last_button_code;
+ b = con.last_button_code;
}
- else if (mouse_event.dwButtonState < dev_state.dwLastButtonState && !dev_state.ext_mouse_mode6)
+ else if (mouse_event.dwButtonState < con.dwLastButtonState && !con.ext_mouse_mode6)
{
b = 3;
strcpy (sz, "btn up");
}
- else if ((mouse_event.dwButtonState & 1) != (dev_state.dwLastButtonState & 1))
+ else if ((mouse_event.dwButtonState & 1) != (con.dwLastButtonState & 1))
{
b = 0;
strcpy (sz, "btn1 down");
}
- else if ((mouse_event.dwButtonState & 2) != (dev_state.dwLastButtonState & 2))
+ else if ((mouse_event.dwButtonState & 2) != (con.dwLastButtonState & 2))
{
b = 2;
strcpy (sz, "btn2 down");
}
- else if ((mouse_event.dwButtonState & 4) != (dev_state.dwLastButtonState & 4))
+ else if ((mouse_event.dwButtonState & 4) != (con.dwLastButtonState & 4))
{
b = 1;
strcpy (sz, "btn3 down");
}
- if (dev_state.ext_mouse_mode6 /* distinguish release */
- && mouse_event.dwButtonState < dev_state.dwLastButtonState)
+ if (con.ext_mouse_mode6 /* distinguish release */
+ && mouse_event.dwButtonState < con.dwLastButtonState)
mode6_term = 'm';
- dev_state.last_button_code = b;
+ con.last_button_code = b;
if (mouse_event.dwEventFlags == MOUSE_MOVED)
{
@@ -603,46 +587,46 @@ fhandler_console::read (void *pv, size_t& buflen)
else
{
/* Remember the modified button state */
- dev_state.dwLastButtonState = mouse_event.dwButtonState;
+ con.dwLastButtonState = mouse_event.dwButtonState;
}
}
/* Remember mouse position */
- dev_state.dwLastMousePosition.X = dev_state.dwMousePosition.X;
- dev_state.dwLastMousePosition.Y = dev_state.dwMousePosition.Y;
+ con.dwLastMousePosition.X = con.dwMousePosition.X;
+ con.dwLastMousePosition.Y = con.dwMousePosition.Y;
/* Remember the modifiers */
- dev_state.nModifiers = 0;
+ con.nModifiers = 0;
if (mouse_event.dwControlKeyState & SHIFT_PRESSED)
- dev_state.nModifiers |= 0x4;
+ con.nModifiers |= 0x4;
if (mouse_event.dwControlKeyState & ALT_PRESSED)
- dev_state.nModifiers |= 0x8;
+ con.nModifiers |= 0x8;
if (mouse_event.dwControlKeyState & CTRL_PRESSED)
- dev_state.nModifiers |= 0x10;
+ con.nModifiers |= 0x10;
/* Indicate the modifiers */
- b |= dev_state.nModifiers;
+ b |= con.nModifiers;
/* We can now create the code. */
- if (dev_state.ext_mouse_mode6)
+ if (con.ext_mouse_mode6)
{
__small_sprintf (tmp, "\033[<%d;%d;%d%c", b,
- dev_state.dwMousePosition.X + 1,
- dev_state.dwMousePosition.Y + 1,
+ con.dwMousePosition.X + 1,
+ con.dwMousePosition.Y + 1,
mode6_term);
nread = strlen (tmp);
}
- else if (dev_state.ext_mouse_mode15)
+ else if (con.ext_mouse_mode15)
{
__small_sprintf (tmp, "\033[%d;%d;%dM", b + 32,
- dev_state.dwMousePosition.X + 1,
- dev_state.dwMousePosition.Y + 1);
+ con.dwMousePosition.X + 1,
+ con.dwMousePosition.Y + 1);
nread = strlen (tmp);
}
- else if (dev_state.ext_mouse_mode5)
+ else if (con.ext_mouse_mode5)
{
- unsigned int xcode = dev_state.dwMousePosition.X + ' ' + 1;
- unsigned int ycode = dev_state.dwMousePosition.Y + ' ' + 1;
+ unsigned int xcode = con.dwMousePosition.X + ' ' + 1;
+ unsigned int ycode = con.dwMousePosition.Y + ' ' + 1;
__small_sprintf (tmp, "\033[M%c", b + ' ');
nread = 4;
@@ -669,8 +653,8 @@ fhandler_console::read (void *pv, size_t& buflen)
}
else
{
- unsigned int xcode = dev_state.dwMousePosition.X + ' ' + 1;
- unsigned int ycode = dev_state.dwMousePosition.Y + ' ' + 1;
+ unsigned int xcode = con.dwMousePosition.X + ' ' + 1;
+ unsigned int ycode = con.dwMousePosition.Y + ' ' + 1;
if (xcode >= 256)
xcode = 0;
if (ycode >= 256)
@@ -680,8 +664,8 @@ fhandler_console::read (void *pv, size_t& buflen)
nread = 6; /* tmp may contain NUL bytes */
}
syscall_printf ("mouse: %s at (%d,%d)", sz,
- dev_state.dwMousePosition.X,
- dev_state.dwMousePosition.Y);
+ con.dwMousePosition.X,
+ con.dwMousePosition.Y);
toadd = tmp;
}
@@ -689,7 +673,7 @@ fhandler_console::read (void *pv, size_t& buflen)
break;
case FOCUS_EVENT:
- if (dev_state.use_focus)
+ if (con.use_focus)
{
if (input_rec.Event.FocusEvent.bSetFocus)
__small_sprintf (tmp, "\033[I");
@@ -749,74 +733,77 @@ fhandler_console::set_input_state ()
}
bool
-dev_console::fillin_info (HANDLE h)
+dev_console::fillin (HANDLE h)
{
bool ret;
- CONSOLE_SCREEN_BUFFER_INFO linfo;
- if ((ret = GetConsoleScreenBufferInfo (h, &linfo)))
+ if ((ret = GetConsoleScreenBufferInfo (h, &b)))
{
- info.winTop = linfo.srWindow.Top;
- info.winBottom = linfo.srWindow.Bottom;
- info.dwWinSize.Y = 1 + linfo.srWindow.Bottom - linfo.srWindow.Top;
- info.dwWinSize.X = 1 + linfo.srWindow.Right - linfo.srWindow.Left;
- info.dwBufferSize = linfo.dwSize;
- info.dwCursorPosition = linfo.dwCursorPosition;
- info.wAttributes = linfo.wAttributes;
+ dwWinSize.Y = 1 + b.srWindow.Bottom - b.srWindow.Top;
+ dwWinSize.X = 1 + b.srWindow.Right - b.srWindow.Left;
+ if (b.dwCursorPosition.Y > dwEnd.Y
+ || (b.dwCursorPosition.Y >= dwEnd.Y && b.dwCursorPosition.X > dwEnd.X))
+ dwEnd = b.dwCursorPosition;
}
else
{
- memset (&info, 0, sizeof info);
- info.dwWinSize.Y = 25;
- info.dwWinSize.X = 80;
- info.winBottom = 24;
+ memset (&b, 0, sizeof (b));
+ dwWinSize.Y = 25;
+ dwWinSize.X = 80;
+ b.srWindow.Bottom = 24;
+ b.srWindow.Right = 79;
}
return ret;
}
-void
-fhandler_console::scroll_screen (int x1, int y1, int x2, int y2, int xn, int yn)
+void __reg3
+dev_console::scroll_buffer (HANDLE h, int x1, int y1, int x2, int y2, int xn, int yn)
{
+/* Scroll the screen context.
+ x1, y1 - ul corner
+ x2, y2 - dr corner
+ xn, yn - new ul corner
+ Negative values represents current screen dimensions
+*/
SMALL_RECT sr1, sr2;
CHAR_INFO fill;
COORD dest;
-
- dev_state.fillin_info (get_output_handle ());
- sr1.Left = x1 >= 0 ? x1 : dev_state.info.dwWinSize.X - 1;
- if (y1 == 0)
- sr1.Top = dev_state.info.winTop;
- else
- sr1.Top = y1 > 0 ? y1 : dev_state.info.winBottom;
- sr1.Right = x2 >= 0 ? x2 : dev_state.info.dwWinSize.X - 1;
- if (y2 == 0)
- sr1.Bottom = dev_state.info.winTop;
- else
- sr1.Bottom = y2 > 0 ? y2 : dev_state.info.winBottom;
- sr2.Top = srTop;
+ fill.Char.AsciiChar = ' ';
+ fill.Attributes = current_win32_attr;
+
+ fillin (h);
+ sr1.Left = x1 >= 0 ? x1 : dwWinSize.X - 1;
+ sr1.Top = y1 >= 0 ? y1 : b.srWindow.Bottom;
+ sr1.Right = x2 >= 0 ? x2 : dwWinSize.X - 1;
+ sr1.Bottom = y2 >= 0 ? y2 : b.srWindow.Bottom;
+ sr2.Top = b.srWindow.Top + scroll_region.Top;
sr2.Left = 0;
- sr2.Bottom = srBottom;
- sr2.Right = dev_state.info.dwWinSize.X - 1;
+ sr2.Bottom = (scroll_region.Bottom < 0) ? b.srWindow.Bottom : b.srWindow.Top + scroll_region.Bottom;
+ sr2.Right = dwWinSize.X - 1;
if (sr1.Bottom > sr2.Bottom && sr1.Top <= sr2.Bottom)
sr1.Bottom = sr2.Bottom;
- dest.X = xn >= 0 ? xn : dev_state.info.dwWinSize.X - 1;
- if (yn == 0)
- dest.Y = dev_state.info.winTop;
- else
- dest.Y = yn > 0 ? yn : dev_state.info.winBottom;
- fill.Char.AsciiChar = ' ';
- fill.Attributes = dev_state.current_win32_attr;
- ScrollConsoleScreenBuffer (get_output_handle (), &sr1, &sr2, dest, &fill);
+ dest.X = xn >= 0 ? xn : dwWinSize.X - 1;
+ dest.Y = yn >= 0 ? yn : b.srWindow.Bottom;
+ ScrollConsoleScreenBuffer (h, &sr1, &sr2, dest, &fill);
+}
- /* ScrollConsoleScreenBuffer on Windows 95 is buggy - when scroll distance
- * is more than half of screen, filling doesn't work as expected */
+inline void
+fhandler_console::scroll_buffer (int x1, int y1, int x2, int y2, int xn, int yn)
+{
+ con.scroll_buffer (get_output_handle (), x1, y1, x2, y2, xn, yn);
+}
- if (sr1.Top == sr1.Bottom)
- /* nothing to do */;
- else if (dest.Y <= sr1.Top) /* forward scroll */
- clear_screen (0, 1 + dest.Y + sr1.Bottom - sr1.Top, sr2.Right, sr2.Bottom);
- else /* reverse scroll */
- clear_screen (0, sr1.Top, sr2.Right, dest.Y - 1);
+inline void
+fhandler_console::scroll_buffer_screen (int x1, int y1, int x2, int y2, int xn, int yn)
+{
+ if (y1 >= 0)
+ y1 += con.b.srWindow.Top;
+ if (y2 >= 0)
+ y1 += con.b.srWindow.Top;
+ if (yn >= 0)
+ yn += con.b.srWindow.Top;
+ con.scroll_buffer (get_output_handle (), x1, y1, x2, y2, xn, yn);
}
int
@@ -867,12 +854,12 @@ fhandler_console::open (int flags, mode_t)
}
set_output_handle (h);
- if (dev_state.fillin_info (get_output_handle ()))
+ if (con.fillin (get_output_handle ()))
{
- dev_state.current_win32_attr = dev_state.info.wAttributes;
- if (!dev_state.default_color)
- dev_state.default_color = dev_state.info.wAttributes;
- dev_state.set_default_attr ();
+ con.current_win32_attr = con.b.wAttributes;
+ if (!con.default_color)
+ con.default_color = con.b.wAttributes;
+ con.set_default_attr ();
}
get_ttyp ()->rstcons (false);
@@ -895,6 +882,7 @@ fhandler_console::open_setup (int flags)
set_flags ((flags & ~O_TEXT) | O_BINARY);
if (myself->set_ctty (this, flags) && !myself->cygstarted)
init_console_handler (true);
+ fhandler_base::open_setup (flags);
}
int
@@ -918,13 +906,13 @@ fhandler_console::ioctl (unsigned int cmd, void *arg)
case TIOCGWINSZ:
int st;
- st = dev_state.fillin_info (get_output_handle ());
+ st = con.fillin (get_output_handle ());
if (st)
{
/* *not* the buffer size, the actual screen size... */
/* based on Left Top Right Bottom of srWindow */
- ((struct winsize *) arg)->ws_row = dev_state.info.dwWinSize.Y;
- ((struct winsize *) arg)->ws_col = dev_state.info.dwWinSize.X;
+ ((struct winsize *) arg)->ws_row = con.dwWinSize.Y;
+ ((struct winsize *) arg)->ws_col = con.dwWinSize.X;
syscall_printf ("WINSZ: (row=%d,col=%d)",
((struct winsize *) arg)->ws_row,
((struct winsize *) arg)->ws_col);
@@ -941,13 +929,13 @@ fhandler_console::ioctl (unsigned int cmd, void *arg)
bg_check (SIGTTOU);
return 0;
case KDGKBMETA:
- *(int *) arg = (dev_state.metabit) ? K_METABIT : K_ESCPREFIX;
+ *(int *) arg = (con.metabit) ? K_METABIT : K_ESCPREFIX;
return 0;
case KDSKBMETA:
if ((intptr_t) arg == K_METABIT)
- dev_state.metabit = TRUE;
+ con.metabit = TRUE;
else if ((intptr_t) arg == K_ESCPREFIX)
- dev_state.metabit = FALSE;
+ con.metabit = FALSE;
else
{
set_errno (EINVAL);
@@ -957,7 +945,7 @@ fhandler_console::ioctl (unsigned int cmd, void *arg)
case TIOCLINUX:
if (*(unsigned char *) arg == 6)
{
- *(unsigned char *) arg = (unsigned char) dev_state.nModifiers;
+ *(unsigned char *) arg = (unsigned char) con.nModifiers;
return 0;
}
set_errno (EINVAL);
@@ -1194,31 +1182,91 @@ dev_console::set_default_attr ()
set_color (NULL);
}
+int
+dev_console::set_cl_x (cltype x)
+{
+ if (x == cl_disp_beg || x == cl_buf_beg)
+ return 0;
+ if (x == cl_disp_end)
+ return dwWinSize.X - 1;
+ if (x == cl_buf_end)
+ return b.dwSize.X - 1;
+ return b.dwCursorPosition.X;
+}
+
+int
+dev_console::set_cl_y (cltype y)
+{
+ if (y == cl_buf_beg)
+ return 0;
+ if (y == cl_disp_beg)
+ return b.srWindow.Top;
+ if (y == cl_disp_end)
+ return b.srWindow.Bottom;
+ if (y == cl_buf_end)
+ return b.dwSize.Y - 1;
+ return b.dwCursorPosition.Y;
+}
+
+bool
+dev_console::clear_should_scroll (HANDLE h, int x1, int y1, int x2, int y2)
+{
+ if (save_buf || x1 != 0 || x2 != dwWinSize.X - 1 || y1 != b.srWindow.Top
+ || y2 != b.srWindow.Bottom || b.dwSize.Y <= dwWinSize.Y)
+ return false;
+ return true;
+}
+
/*
* Clear the screen context from x1/y1 to x2/y2 cell.
* Negative values represents current screen dimensions
*/
-void
-fhandler_console::clear_screen (int x1, int y1, int x2, int y2)
+void __reg3
+fhandler_console::clear_screen (cltype xc1, cltype yc1, cltype xc2, cltype yc2)
{
- COORD tlc;
+ HANDLE h = get_output_handle ();
+ con.fillin (h);
+
+ int x1 = con.set_cl_x (xc1);
+ int y1 = con.set_cl_y (yc1);
+ int x2 = con.set_cl_x (xc2);
+ int y2 = con.set_cl_y (yc2);
+
+ /* Detect special case - scroll the screen if we have a buffer in order to
+ preserve the buffer. */
+ if (!con.clear_should_scroll (h, x1, y1, x2, y2))
+ {
+ con.clear_screen (h, x1, y1, x2, y2);
+ return;
+ }
+
+ int xpos, ypos;
DWORD done;
- int num;
+ cursor_get(&xpos, &ypos);
+ cursor_set(false, 0, con.b.dwSize.Y - 1);
- dev_state.fillin_info (get_output_handle ());
+ for (int i = 0; i < con.dwWinSize.Y; i += done)
+ {
+ if (!WriteConsoleW (h, L"\n", 1, &done, 0))
+ {
+ __seterrno ();
+ break;
+ }
+ }
- if (x1 < 0)
- x1 = dev_state.info.dwWinSize.X - 1;
- if (y1 < 0)
- y1 = dev_state.info.winBottom;
- if (x2 < 0)
- x2 = dev_state.info.dwWinSize.X - 1;
- if (y2 < 0)
- y2 = dev_state.info.winBottom;
+ cursor_set(false, xpos, ypos);
+}
- num = abs (y1 - y2) * dev_state.info.dwBufferSize.X + abs (x1 - x2) + 1;
+void __reg3
+dev_console::clear_screen (HANDLE h, int x1, int y1, int x2, int y2)
+{
+ COORD tlc;
+ DWORD done;
+ int num;
+
+ num = abs (y1 - y2) * b.dwSize.X + abs (x1 - x2) + 1;
- if ((y2 * dev_state.info.dwBufferSize.X + x2) > (y1 * dev_state.info.dwBufferSize.X + x1))
+ if ((y2 * b.dwSize.X + x2) > (y1 * b.dwSize.X + x1))
{
tlc.X = x1;
tlc.Y = y1;
@@ -1228,42 +1276,41 @@ fhandler_console::clear_screen (int x1, int y1, int x2, int y2)
tlc.X = x2;
tlc.Y = y2;
}
- FillConsoleOutputCharacterA (get_output_handle (), ' ',
- num,
- tlc,
- &done);
- FillConsoleOutputAttribute (get_output_handle (),
- dev_state.current_win32_attr,
- num,
- tlc,
- &done);
+ FillConsoleOutputCharacterA (h, ' ', num, tlc, &done);
+ FillConsoleOutputAttribute (h, current_win32_attr, num, tlc, &done);
}
-void
+void __reg3
fhandler_console::cursor_set (bool rel_to_top, int x, int y)
{
COORD pos;
- dev_state.fillin_info (get_output_handle ());
+ con.fillin (get_output_handle ());
#if 0
- /* Setting y to the current winBottom here is the reason that the window
+ /* Setting y to the current b.srWindow.Bottom here is the reason that the window
isn't scrolled back to the current cursor position like it's done in
any other terminal. Rather, the curser is forced to the bottom of the
currently scrolled region. This breaks the console buffer content if
output is generated while the user had the window scrolled back. This
behaviour is very old, it has no matching ChangeLog entry.
Just disable for now but keep the code in for future reference. */
- if (y > dev_state.info.winBottom)
- y = dev_state.info.winBottom;
+ if (y > con.b.srWindow.Bottom)
+ y = con.b.srWindow.Bottom;
else
#endif
if (y < 0)
y = 0;
else if (rel_to_top)
- y += dev_state.info.winTop;
+ y += con.b.srWindow.Top;
- if (x > dev_state.info.dwWinSize.X)
- x = dev_state.info.dwWinSize.X - 1;
+ con.eat_newline = false;
+
+ if (x >= con.dwWinSize.X)
+ {
+ y++;
+ x = 0;
+ con.eat_newline = true;
+ }
else if (x < 0)
x = 0;
@@ -1272,21 +1319,30 @@ fhandler_console::cursor_set (bool rel_to_top, int x, int y)
SetConsoleCursorPosition (get_output_handle (), pos);
}
-void
-fhandler_console::cursor_rel (int x, int y)
+void __reg3
+fhandler_console::cursor_rel (int xdelta, int ydelta)
{
- dev_state.fillin_info (get_output_handle ());
- x += dev_state.info.dwCursorPosition.X;
- y += dev_state.info.dwCursorPosition.Y;
+ int x, y;
+ cursor_get(&x, &y);
+ x += xdelta;
+ y += ydelta;
cursor_set (false, x, y);
}
-void
+void __reg3
fhandler_console::cursor_get (int *x, int *y)
{
- dev_state.fillin_info (get_output_handle ());
- *y = dev_state.info.dwCursorPosition.Y;
- *x = dev_state.info.dwCursorPosition.X;
+ con.fillin (get_output_handle ());
+ if (!con.eat_newline)
+ {
+ *y = con.b.dwCursorPosition.Y;
+ *x = con.b.dwCursorPosition.X;
+ }
+ else
+ {
+ *y = con.b.dwCursorPosition.Y - 1;
+ *x = con.dwWinSize.X;
+ }
}
/* VT100 line drawing graphics mode maps `abcdefghijklmnopqrstuvwxyz{|}~ to
@@ -1328,9 +1384,9 @@ static const wchar_t __vt100_conv[31] = {
inline
bool fhandler_console::write_console (PWCHAR buf, DWORD len, DWORD& done)
{
- if (dev_state.iso_2022_G1
- ? dev_state.vt100_graphics_mode_G1
- : dev_state.vt100_graphics_mode_G0)
+ if (con.iso_2022_G1
+ ? con.vt100_graphics_mode_G1
+ : con.vt100_graphics_mode_G0)
for (DWORD i = 0; i < len; i ++)
if (buf[i] >= (unsigned char) '`' && buf[i] <= (unsigned char) '~')
buf[i] = __vt100_conv[buf[i] - (unsigned char) '`'];
@@ -1349,6 +1405,123 @@ bool fhandler_console::write_console (PWCHAR buf, DWORD len, DWORD& done)
return true;
}
+/* The following three functions were adapted (i.e., mildly modified) from
+ http://stackoverflow.com/questions/14699043/replacement-to-systemcolor */
+
+/* Split a rectangular region into two smaller rectangles based on the
+ largest dimension. */
+static void
+region_split (PCHAR_INFO& buf, COORD& bufsiz, SMALL_RECT& region,
+ PCHAR_INFO& buf_b, COORD& bufsiz_b, SMALL_RECT& region_b)
+{
+ region_b = region;
+ bufsiz_b = bufsiz;
+
+ SHORT half = (1 + region.Bottom - region.Top) / 2;
+ region_b.Top += half;
+ region.Bottom = (bufsiz.Y = region_b.Top) - 1;
+ buf_b = buf + (half * (1 + region.Right));
+ bufsiz_b.Y = region_b.Bottom - region_b.Top;
+}
+
+/* Utility function to figure out the distance between two points. */
+static SHORT
+delta (SHORT first, SHORT second)
+{
+ return (second >= first) ? (second - first + 1) : 0;
+}
+
+/* Subdivide the ReadConsoleInput operation into smaller and smaller chunks as
+ needed until it succeeds in reading the entire screen buffer. */
+static BOOL
+ReadConsoleOutputWrapper (HANDLE h, PCHAR_INFO buf, COORD bufsiz,
+ SMALL_RECT region)
+{
+ COORD coord = {};
+ SHORT width = delta (region.Left, region.Right);
+ SHORT height = delta (region.Top, region.Bottom);
+
+ if ((width == 0) || (height == 0))
+ return TRUE;
+
+ BOOL success = ReadConsoleOutputW (h, buf, bufsiz, coord, &region);
+ if (success)
+ /* it worked */;
+ else if (GetLastError () == ERROR_NOT_ENOUGH_MEMORY && (width * height) > 1)
+ {
+ PCHAR_INFO buf_b;
+ COORD bufsiz_b;
+ SMALL_RECT region_b;
+ region_split (buf, bufsiz, region, buf_b, bufsiz_b, region_b);
+ success = ReadConsoleOutputWrapper (h, buf, bufsiz, region)
+ && ReadConsoleOutputWrapper (h, buf_b, bufsiz_b, region_b);
+ }
+ return success;
+}
+
+void
+dev_console::save_restore (HANDLE h, char c)
+{
+ if (c == 'h') /* save */
+ {
+ fillin (h);
+ save_bufsize.X = b.dwSize.X;
+ if ((save_bufsize.Y = dwEnd.Y + 1) > b.dwSize.Y)
+ save_bufsize.X = b.dwSize.Y;
+
+ if (save_buf)
+ cfree (save_buf);
+ size_t screen_size = sizeof (CHAR_INFO) * save_bufsize.X * save_bufsize.Y;
+ save_buf = (PCHAR_INFO) cmalloc_abort (HEAP_1_BUF, screen_size);
+
+ save_cursor = b.dwCursorPosition; /* Remember where we were. */
+ save_top = b.srWindow.Top;
+
+ SMALL_RECT now = {}; /* Read the whole buffer */
+ now.Bottom = save_bufsize.Y - 1;
+ now.Right = save_bufsize.X - 1;
+ if (!ReadConsoleOutputWrapper (h, save_buf, save_bufsize, now))
+ debug_printf ("ReadConsoleOutputWrapper(h, ...) failed during save, %E");
+
+ /* Position at top of buffer */
+ COORD cob = {};
+ if (!SetConsoleCursorPosition (h, cob))
+ debug_printf ("SetConsoleCursorInfo(%p, ...) failed during save, %E", h);
+
+ /* Clear entire buffer */
+ clear_screen (h, 0, 0, now.Right, now.Bottom);
+ b.dwCursorPosition.X = b.dwCursorPosition.Y = dwEnd.X = dwEnd.Y = 0;
+ }
+ else if (save_buf)
+ {
+ COORD cob = {};
+ SMALL_RECT now = {};
+ now.Bottom = save_bufsize.Y - 1;
+ now.Right = save_bufsize.X - 1;
+ /* Restore whole buffer */
+ clear_screen (h, 0, 0, b.dwSize.X - 1, b.dwSize.Y - 1);
+ BOOL res = WriteConsoleOutputW (h, save_buf, save_bufsize, cob, &now);
+ if (!res)
+ debug_printf ("WriteConsoleOutputW failed, %E");
+
+ cfree (save_buf);
+ save_buf = NULL;
+
+ cob.X = 0;
+ cob.Y = save_top;
+ /* CGF: NOOP? Doesn't seem to position screen as expected */
+ /* Temporarily position at top of screen */
+ if (!SetConsoleCursorPosition (h, cob))
+ debug_printf ("SetConsoleCursorInfo(%p, cob) failed during restore, %E", h);
+ /* Position where we were previously */
+ if (!SetConsoleCursorPosition (h, save_cursor))
+ debug_printf ("SetConsoleCursorInfo(%p, save_cursor) failed during restore, %E", h);
+ /* Get back correct version of buffer information */
+ dwEnd.X = dwEnd.Y = 0;
+ fillin (h);
+ }
+}
+
#define BAK 1
#define ESC 2
#define NOR 0
@@ -1404,151 +1577,151 @@ static const char base_chars[256] =
void
fhandler_console::char_command (char c)
{
- int x, y;
+ int x, y, n;
char buf[40];
switch (c)
{
case 'm': /* Set Graphics Rendition */
- for (int i = 0; i <= dev_state.nargs_; i++)
- switch (dev_state.args_[i])
+ for (int i = 0; i <= con.nargs; i++)
+ switch (con.args[i])
{
case 0: /* normal color */
- dev_state.set_default_attr ();
+ con.set_default_attr ();
break;
case 1: /* bold */
- dev_state.intensity = INTENSITY_BOLD;
+ con.intensity = INTENSITY_BOLD;
break;
case 2: /* dim */
- dev_state.intensity = INTENSITY_DIM;
+ con.intensity = INTENSITY_DIM;
break;
case 4: /* underlined */
- dev_state.underline = 1;
+ con.underline = 1;
break;
case 5: /* blink mode */
- dev_state.blink = true;
+ con.blink = true;
break;
case 7: /* reverse */
- dev_state.reverse = true;
+ con.reverse = true;
break;
case 8: /* invisible */
- dev_state.intensity = INTENSITY_INVISIBLE;
+ con.intensity = INTENSITY_INVISIBLE;
break;
case 10: /* end alternate charset */
- dev_state.alternate_charset_active = false;
+ con.alternate_charset_active = false;
break;
case 11: /* start alternate charset */
- dev_state.alternate_charset_active = true;
+ con.alternate_charset_active = true;
break;
case 22:
case 28:
- dev_state.intensity = INTENSITY_NORMAL;
+ con.intensity = INTENSITY_NORMAL;
break;
case 24:
- dev_state.underline = false;
+ con.underline = false;
break;
case 25:
- dev_state.blink = false;
+ con.blink = false;
break;
case 27:
- dev_state.reverse = false;
+ con.reverse = false;
break;
case 30: /* BLACK foreground */
- dev_state.fg = 0;
+ con.fg = 0;
break;
case 31: /* RED foreground */
- dev_state.fg = FOREGROUND_RED;
+ con.fg = FOREGROUND_RED;
break;
case 32: /* GREEN foreground */
- dev_state.fg = FOREGROUND_GREEN;
+ con.fg = FOREGROUND_GREEN;
break;
case 33: /* YELLOW foreground */
- dev_state.fg = FOREGROUND_RED | FOREGROUND_GREEN;
+ con.fg = FOREGROUND_RED | FOREGROUND_GREEN;
break;
case 34: /* BLUE foreground */
- dev_state.fg = FOREGROUND_BLUE;
+ con.fg = FOREGROUND_BLUE;
break;
case 35: /* MAGENTA foreground */
- dev_state.fg = FOREGROUND_RED | FOREGROUND_BLUE;
+ con.fg = FOREGROUND_RED | FOREGROUND_BLUE;
break;
case 36: /* CYAN foreground */
- dev_state.fg = FOREGROUND_BLUE | FOREGROUND_GREEN;
+ con.fg = FOREGROUND_BLUE | FOREGROUND_GREEN;
break;
case 37: /* WHITE foreg */
- dev_state.fg = FOREGROUND_BLUE | FOREGROUND_GREEN | FOREGROUND_RED;
+ con.fg = FOREGROUND_BLUE | FOREGROUND_GREEN | FOREGROUND_RED;
break;
case 39:
- dev_state.fg = dev_state.default_color & FOREGROUND_ATTR_MASK;
+ con.fg = con.default_color & FOREGROUND_ATTR_MASK;
break;
case 40: /* BLACK background */
- dev_state.bg = 0;
+ con.bg = 0;
break;
case 41: /* RED background */
- dev_state.bg = BACKGROUND_RED;
+ con.bg = BACKGROUND_RED;
break;
case 42: /* GREEN background */
- dev_state.bg = BACKGROUND_GREEN;
+ con.bg = BACKGROUND_GREEN;
break;
case 43: /* YELLOW background */
- dev_state.bg = BACKGROUND_RED | BACKGROUND_GREEN;
+ con.bg = BACKGROUND_RED | BACKGROUND_GREEN;
break;
case 44: /* BLUE background */
- dev_state.bg = BACKGROUND_BLUE;
+ con.bg = BACKGROUND_BLUE;
break;
case 45: /* MAGENTA background */
- dev_state.bg = BACKGROUND_RED | BACKGROUND_BLUE;
+ con.bg = BACKGROUND_RED | BACKGROUND_BLUE;
break;
case 46: /* CYAN background */
- dev_state.bg = BACKGROUND_BLUE | BACKGROUND_GREEN;
+ con.bg = BACKGROUND_BLUE | BACKGROUND_GREEN;
break;
case 47: /* WHITE background */
- dev_state.bg = BACKGROUND_BLUE | BACKGROUND_GREEN | BACKGROUND_RED;
+ con.bg = BACKGROUND_BLUE | BACKGROUND_GREEN | BACKGROUND_RED;
break;
case 49:
- dev_state.bg = dev_state.default_color & BACKGROUND_ATTR_MASK;
+ con.bg = con.default_color & BACKGROUND_ATTR_MASK;
break;
}
- dev_state.set_color (get_output_handle ());
+ con.set_color (get_output_handle ());
break;
case 'q': /* Set cursor style (DECSCUSR) */
- if (dev_state.saw_space)
+ if (con.saw_space)
{
CONSOLE_CURSOR_INFO console_cursor_info;
- GetConsoleCursorInfo (get_output_handle (), & console_cursor_info);
- switch (dev_state.args_[0])
+ GetConsoleCursorInfo (get_output_handle (), &console_cursor_info);
+ switch (con.args[0])
{
case 0: /* blinking block */
case 1: /* blinking block (default) */
case 2: /* steady block */
console_cursor_info.dwSize = 100;
- SetConsoleCursorInfo (get_output_handle (), & console_cursor_info);
+ SetConsoleCursorInfo (get_output_handle (), &console_cursor_info);
break;
case 3: /* blinking underline */
case 4: /* steady underline */
console_cursor_info.dwSize = 10; /* or Windows default 25? */
- SetConsoleCursorInfo (get_output_handle (), & console_cursor_info);
+ SetConsoleCursorInfo (get_output_handle (), &console_cursor_info);
break;
default: /* use value as percentage */
- console_cursor_info.dwSize = dev_state.args_[0];
- SetConsoleCursorInfo (get_output_handle (), & console_cursor_info);
+ console_cursor_info.dwSize = con.args[0];
+ SetConsoleCursorInfo (get_output_handle (), &console_cursor_info);
break;
}
}
break;
case 'h':
case 'l':
- if (!dev_state.saw_question_mark)
+ if (!con.saw_question_mark)
{
- switch (dev_state.args_[0])
+ switch (con.args[0])
{
case 4: /* Insert mode */
- dev_state.insert_mode = (c == 'h') ? true : false;
- syscall_printf ("insert mode %sabled", dev_state.insert_mode ? "en" : "dis");
+ con.insert_mode = (c == 'h') ? true : false;
+ syscall_printf ("insert mode %sabled", con.insert_mode ? "en" : "dis");
break;
}
break;
}
- switch (dev_state.args_[0])
+ switch (con.args[0])
{
case 25: /* Show/Hide Cursor (DECTCEM) */
{
@@ -1562,75 +1735,39 @@ fhandler_console::char_command (char c)
break;
}
case 47: /* Save/Restore screen */
- if (c == 'h') /* save */
- {
- CONSOLE_SCREEN_BUFFER_INFO now;
- COORD cob = { 0, 0 };
-
- if (!GetConsoleScreenBufferInfo (get_output_handle (), &now))
- break;
-
- dev_state.savebufsiz.X = now.srWindow.Right - now.srWindow.Left + 1;
- dev_state.savebufsiz.Y = now.srWindow.Bottom - now.srWindow.Top + 1;
-
- if (dev_state.savebuf)
- cfree (dev_state.savebuf);
- dev_state.savebuf = (PCHAR_INFO) cmalloc_abort (HEAP_1_BUF, sizeof (CHAR_INFO) *
- dev_state.savebufsiz.X * dev_state.savebufsiz.Y);
-
- ReadConsoleOutputW (get_output_handle (), dev_state.savebuf,
- dev_state.savebufsiz, cob, &now.srWindow);
- }
- else /* restore */
- {
- CONSOLE_SCREEN_BUFFER_INFO now;
- COORD cob = { 0, 0 };
-
- if (!GetConsoleScreenBufferInfo (get_output_handle (), &now))
- break;
-
- if (!dev_state.savebuf)
- break;
-
- WriteConsoleOutputW (get_output_handle (), dev_state.savebuf,
- dev_state.savebufsiz, cob, &now.srWindow);
-
- cfree (dev_state.savebuf);
- dev_state.savebuf = NULL;
- dev_state.savebufsiz.X = dev_state.savebufsiz.Y = 0;
- }
+ con.save_restore (get_output_handle (), c);
break;
case 67: /* DECBKM ("DEC Backarrow Key Mode") */
- dev_state.backspace_keycode = (c == 'h' ? CTRL('H') : CERASE);
+ con.backspace_keycode = (c == 'h' ? CTRL('H') : CERASE);
break;
case 1000: /* Mouse tracking */
- dev_state.use_mouse = (c == 'h') ? 1 : 0;
+ con.use_mouse = (c == 'h') ? 1 : 0;
break;
case 1002: /* Mouse button event tracking */
- dev_state.use_mouse = (c == 'h') ? 2 : 0;
+ con.use_mouse = (c == 'h') ? 2 : 0;
break;
case 1003: /* Mouse any event tracking */
- dev_state.use_mouse = (c == 'h') ? 3 : 0;
+ con.use_mouse = (c == 'h') ? 3 : 0;
break;
case 1004: /* Focus in/out event reporting */
- dev_state.use_focus = (c == 'h') ? true : false;
+ con.use_focus = (c == 'h') ? true : false;
break;
case 1005: /* Extended mouse mode */
- dev_state.ext_mouse_mode5 = c == 'h';
+ con.ext_mouse_mode5 = c == 'h';
break;
case 1006: /* SGR extended mouse mode */
- dev_state.ext_mouse_mode6 = c == 'h';
+ con.ext_mouse_mode6 = c == 'h';
break;
case 1015: /* Urxvt extended mouse mode */
- dev_state.ext_mouse_mode15 = c == 'h';
+ con.ext_mouse_mode15 = c == 'h';
break;
case 2000: /* Raw keyboard mode */
@@ -1638,24 +1775,23 @@ fhandler_console::char_command (char c)
break;
default: /* Ignore */
- syscall_printf ("unknown h/l command: %d", dev_state.args_[0]);
+ syscall_printf ("unknown h/l command: %d", con.args[0]);
break;
}
break;
case 'J':
- switch (dev_state.args_[0])
+ switch (con.args[0])
{
case 0: /* Clear to end of screen */
- cursor_get (&x, &y);
- clear_screen (x, y, -1, -1);
+ clear_screen (cl_curr_pos, cl_curr_pos, cl_disp_end, cl_disp_end);
break;
case 1: /* Clear from beginning of screen to cursor */
- cursor_get (&x, &y);
- clear_screen (0, 0, x, y);
+ clear_screen (cl_disp_beg, cl_disp_beg, cl_curr_pos, cl_curr_pos);
break;
case 2: /* Clear screen */
- clear_screen (0, 0, -1, -1);
- cursor_set (true, 0,0);
+ cursor_get (&x, &y);
+ clear_screen (cl_disp_beg, cl_disp_beg, cl_disp_end, cl_disp_end);
+ cursor_set (false, x, y);
break;
default:
goto bad_escape;
@@ -1663,31 +1799,28 @@ fhandler_console::char_command (char c)
break;
case 'A':
- cursor_rel (0, -(dev_state.args_[0] ? dev_state.args_[0] : 1));
+ cursor_rel (0, -(con.args[0] ?: 1));
break;
case 'B':
- cursor_rel (0, dev_state.args_[0] ? dev_state.args_[0] : 1);
+ cursor_rel (0, con.args[0] ?: 1);
break;
case 'C':
- cursor_rel (dev_state.args_[0] ? dev_state.args_[0] : 1, 0);
+ cursor_rel (con.args[0] ?: 1, 0);
break;
case 'D':
- cursor_rel (-(dev_state.args_[0] ? dev_state.args_[0] : 1),0);
+ cursor_rel (-(con.args[0] ?: 1),0);
break;
case 'K':
- switch (dev_state.args_[0])
+ switch (con.args[0])
{
case 0: /* Clear to end of line */
- cursor_get (&x, &y);
- clear_screen (x, y, -1, y);
+ clear_screen (cl_curr_pos, cl_curr_pos, cl_disp_end, cl_curr_pos);
break;
case 2: /* Clear line */
- cursor_get (&x, &y);
- clear_screen (0, y, -1, y);
+ clear_screen (cl_disp_beg, cl_curr_pos, cl_disp_end, cl_curr_pos);
break;
case 1: /* Clear from bol to cursor */
- cursor_get (&x, &y);
- clear_screen (0, y, x, y);
+ clear_screen (cl_disp_beg, cl_curr_pos, cl_curr_pos, cl_curr_pos);
break;
default:
goto bad_escape;
@@ -1695,78 +1828,78 @@ fhandler_console::char_command (char c)
break;
case 'H':
case 'f':
- cursor_set (true, (dev_state.args_[1] ? dev_state.args_[1] : 1) - 1,
- (dev_state.args_[0] ? dev_state.args_[0] : 1) - 1);
+ cursor_set (true, (con.args[1] ?: 1) - 1,
+ (con.args[0] ?: 1) - 1);
break;
case 'G': /* hpa - position cursor at column n - 1 */
cursor_get (&x, &y);
- cursor_set (false, (dev_state.args_[0] ? dev_state.args_[0] - 1 : 0), y);
+ cursor_set (false, (con.args[0] ? con.args[0] - 1 : 0), y);
break;
case 'd': /* vpa - position cursor at line n */
cursor_get (&x, &y);
- cursor_set (true, x, (dev_state.args_[0] ? dev_state.args_[0] - 1 : 0));
+ cursor_set (true, x, (con.args[0] ? con.args[0] - 1 : 0));
break;
case 's': /* Save cursor position */
- cursor_get (&dev_state.savex, &dev_state.savey);
- dev_state.savey -= dev_state.info.winTop;
+ cursor_get (&con.savex, &con.savey);
+ con.savey -= con.b.srWindow.Top;
break;
case 'u': /* Restore cursor position */
- cursor_set (true, dev_state.savex, dev_state.savey);
+ cursor_set (true, con.savex, con.savey);
break;
case 'I': /* TAB */
cursor_get (&x, &y);
cursor_set (false, 8 * (x / 8 + 1), y);
break;
case 'L': /* AL - insert blank lines */
- dev_state.args_[0] = dev_state.args_[0] ? dev_state.args_[0] : 1;
+ n = con.args[0] ?: 1;
cursor_get (&x, &y);
- scroll_screen (0, y, -1, -1, 0, y + dev_state.args_[0]);
+ scroll_buffer (0, y, -1, -1, 0, y + n);
break;
case 'M': /* DL - delete lines */
- dev_state.args_[0] = dev_state.args_[0] ? dev_state.args_[0] : 1;
+ n = con.args[0] ?: 1;
cursor_get (&x, &y);
- scroll_screen (0, y + dev_state.args_[0], -1, -1, 0, y);
+ scroll_buffer (0, y + n, -1, -1, 0, y);
break;
case '@': /* IC - insert chars */
- dev_state.args_[0] = dev_state.args_[0] ? dev_state.args_[0] : 1;
+ n = con.args[0] ?: 1;
cursor_get (&x, &y);
- scroll_screen (x, y, -1, y, x + dev_state.args_[0], y);
+ scroll_buffer (x, y, -1, y, x + n, y);
break;
case 'P': /* DC - delete chars */
- dev_state.args_[0] = dev_state.args_[0] ? dev_state.args_[0] : 1;
+ n = con.args[0] ?: 1;
cursor_get (&x, &y);
- scroll_screen (x + dev_state.args_[0], y, -1, y, x, y);
+ scroll_buffer (x + n, y, -1, y, x, y);
break;
case 'S': /* SF - Scroll forward */
- dev_state.args_[0] = dev_state.args_[0] ? dev_state.args_[0] : 1;
- scroll_screen (0, dev_state.args_[0], -1, -1, 0, 0);
+ n = con.args[0] ?: 1;
+ scroll_buffer_screen (0, n, -1, -1, 0, 0);
break;
case 'T': /* SR - Scroll down */
- dev_state.fillin_info (get_output_handle ());
- dev_state.args_[0] = dev_state.args_[0] ? dev_state.args_[0] : 1;
- scroll_screen (0, 0, -1, -1, 0, dev_state.info.winTop + dev_state.args_[0]);
+ con.fillin (get_output_handle ());
+ n = con.b.srWindow.Top + con.args[0] ?: 1;
+ scroll_buffer_screen (0, 0, -1, -1, 0, n);
break;
case 'X': /* ec - erase chars */
- dev_state.args_[0] = dev_state.args_[0] ? dev_state.args_[0] : 1;
+ n = con.args[0] ?: 1;
cursor_get (&x, &y);
- scroll_screen (x + dev_state.args_[0], y, -1, y, x, y);
- scroll_screen (x, y, -1, y, x + dev_state.args_[0], y);
+ scroll_buffer (x + n, y, -1, y, x, y);
+ scroll_buffer (x, y, -1, y, x + n, y);
break;
case 'Z': /* Back tab */
cursor_get (&x, &y);
cursor_set (false, ((8 * (x / 8 + 1)) - 8), y);
break;
case 'b': /* Repeat char #1 #2 times */
- if (dev_state.insert_mode)
+ if (con.insert_mode)
{
cursor_get (&x, &y);
- scroll_screen (x, y, -1, y, x + dev_state.args_[1], y);
+ scroll_buffer (x, y, -1, y, x + con.args[1], y);
}
- while (dev_state.args_[1]--)
- WriteFile (get_output_handle (), &dev_state.args_[0], 1, (DWORD *) &x, 0);
+ while (con.args[1]--)
+ WriteFile (get_output_handle (), &con.args[0], 1, (DWORD *) &x, 0);
break;
case 'c': /* u9 - Terminal enquire string */
- if (dev_state.saw_greater_than_sign)
+ if (con.saw_greater_than_sign)
/* Generate Secondary Device Attribute report, using 67 = ASCII 'C'
to indicate Cygwin (convention used by Rxvt, Urxvt, Screen, Mintty),
and cygwin version for terminal version. */
@@ -1775,26 +1908,31 @@ fhandler_console::char_command (char c)
strcpy (buf, "\033[?6c");
/* The generated report needs to be injected for read-ahead into the
fhandler_console object associated with standard input.
- The current call does not work. */
- puts_readahead (buf);
+ So puts_readahead does not work.
+ Use a common console read-ahead buffer instead. */
+ con.cons_rapoi = NULL;
+ strcpy (con.cons_rabuf, buf);
+ con.cons_rapoi = con.cons_rabuf;
break;
case 'n':
- switch (dev_state.args_[0])
+ switch (con.args[0])
{
case 6: /* u7 - Cursor position request */
cursor_get (&x, &y);
- y -= dev_state.info.winTop;
- /* x -= dev_state.info.winLeft; // not available yet */
+ y -= con.b.srWindow.Top;
+ /* x -= con.b.srWindow.Left; // not available yet */
__small_sprintf (buf, "\033[%d;%dR", y + 1, x + 1);
- puts_readahead (buf);
+ con.cons_rapoi = NULL;
+ strcpy (con.cons_rabuf, buf);
+ con.cons_rapoi = con.cons_rabuf;
break;
- default:
+ default:
goto bad_escape;
}
break;
case 'r': /* Set Scroll region */
- dev_state.scroll_region.Top = dev_state.args_[0] ? dev_state.args_[0] - 1 : 0;
- dev_state.scroll_region.Bottom = dev_state.args_[1] ? dev_state.args_[1] - 1 : -1;
+ con.scroll_region.Top = con.args[0] ? con.args[0] - 1 : 0;
+ con.scroll_region.Bottom = con.args[1] ? con.args[1] - 1 : -1;
cursor_set (true, 0, 0);
break;
case 'g': /* TAB set/clear */
@@ -1826,7 +1964,7 @@ fhandler_console::write_normal (const unsigned char *src,
const unsigned char *found = src;
size_t ret;
mbstate_t ps;
- UINT cp = dev_state.get_console_cp ();
+ UINT cp = con.get_console_cp ();
const char *charset;
mbtowc_p f_mbtowc;
@@ -1876,7 +2014,7 @@ fhandler_console::write_normal (const unsigned char *src,
/* Valid multibyte sequence? Process. */
if (nfound)
{
- buf_len = dev_state.str_to_con (f_mbtowc, charset, write_buf,
+ buf_len = con.str_to_con (f_mbtowc, charset, write_buf,
(const char *) trunc_buf.buf,
nfound - trunc_buf.buf);
if (!write_console (write_buf, buf_len, done))
@@ -1922,7 +2060,7 @@ do_print:
if (found != src)
{
DWORD len = found - src;
- buf_len = dev_state.str_to_con (f_mbtowc, charset, write_buf,
+ buf_len = con.str_to_con (f_mbtowc, charset, write_buf,
(const char *) src, len);
if (!buf_len)
{
@@ -1932,11 +2070,11 @@ do_print:
return 0;
}
- if (dev_state.insert_mode)
+ if (con.insert_mode)
{
int x, y;
cursor_get (&x, &y);
- scroll_screen (x, y, -1, y, x + buf_len, y);
+ scroll_buffer (x, y, -1, y, x + buf_len, y);
}
if (!write_console (write_buf, buf_len, done))
@@ -1947,7 +2085,19 @@ do_print:
/* Stop here if we reached the conversion limit. */
if (len >= CONVERT_LIMIT)
return found + trunc_buf.len;
+ /* If we output something and now x is at the left
+ * column, it means that we just output to the last column.
+ * In this case we can pretend we are still in the original
+ * line and swallow the next character if it is a newline,
+ * or a newline followed by a carriage return.
+ */
+ {
+ int x, y;
+ cursor_get (&x, &y);
+ con.eat_newline = (x == 0);
+ }
}
+
/* If there's still something in the src buffer, but it's not a truncated
multibyte sequence, then we stumbled over a control character or an
invalid multibyte sequence. Print it. */
@@ -1957,26 +2107,32 @@ do_print:
switch (base_chars[*found])
{
case SO: /* Shift Out: Invoke G1 character set (ISO 2022) */
- dev_state.iso_2022_G1 = true;
+ con.iso_2022_G1 = true;
break;
case SI: /* Shift In: Invoke G0 character set (ISO 2022) */
- dev_state.iso_2022_G1 = false;
+ con.iso_2022_G1 = false;
break;
case BEL:
beep ();
break;
case ESC:
- dev_state.state_ = gotesc;
+ con.state = gotesc;
break;
case DWN:
cursor_get (&x, &y);
+
+ if (con.eat_newline) {
+ con.eat_newline = false;
+ break;
+ }
+
if (y >= srBottom)
{
- if (y >= dev_state.info.winBottom && !dev_state.scroll_region.Top)
+ if (y >= con.b.srWindow.Bottom && !con.scroll_region.Top)
WriteConsoleW (get_output_handle (), L"\n", 1, &done, 0);
else
{
- scroll_screen (0, srTop + 1, -1, srBottom, 0, srTop);
+ scroll_buffer (0, srTop + 1, -1, srBottom, 0, srTop);
y--;
}
}
@@ -1984,8 +2140,10 @@ do_print:
break;
case BAK:
cursor_rel (-1, 0);
+ con.eat_newline = false;
break;
case IGN:
+ con.eat_newline = false;
cursor_rel (1, 0);
break;
case CR:
@@ -2014,10 +2172,12 @@ do_print:
}
break;
case TAB:
+ con.eat_newline = false;
cursor_get (&x, &y);
cursor_set (false, 8 * (x / 8 + 1), y);
break;
case NOR:
+ con.eat_newline = false;
write_replacement_char ();
break;
}
@@ -2048,8 +2208,8 @@ fhandler_console::write (const void *vsrc, size_t len)
while (src < end)
{
- paranoid_printf ("char %0c state is %d", *src, dev_state.state_);
- switch (dev_state.state_)
+ paranoid_printf ("char %0c state is %d", *src, con.state);
+ switch (con.state)
{
case normal:
src = write_normal (src, end);
@@ -2059,114 +2219,111 @@ fhandler_console::write (const void *vsrc, size_t len)
case gotesc:
if (*src == '[') /* CSI Control Sequence Introducer */
{
- dev_state.state_ = gotsquare;
- dev_state.saw_question_mark = false;
- dev_state.saw_greater_than_sign = false;
- dev_state.saw_space = false;
- for (dev_state.nargs_ = 0; dev_state.nargs_ < MAXARGS; dev_state.nargs_++)
- dev_state.args_[dev_state.nargs_] = 0;
- dev_state.nargs_ = 0;
+ con.state = gotsquare;
+ con.saw_question_mark = false;
+ con.saw_greater_than_sign = false;
+ con.saw_space = false;
+ for (con.nargs = 0; con.nargs < MAXARGS; con.nargs++)
+ con.args[con.nargs] = 0;
+ con.nargs = 0;
}
else if (*src == ']') /* OSC Operating System Command */
{
- dev_state.rarg = 0;
- dev_state.my_title_buf[0] = '\0';
- dev_state.state_ = gotrsquare;
+ con.rarg = 0;
+ con.my_title_buf[0] = '\0';
+ con.state = gotrsquare;
}
else if (*src == '(') /* Designate G0 character set */
{
- dev_state.state_ = gotparen;
+ con.state = gotparen;
}
else if (*src == ')') /* Designate G1 character set */
{
- dev_state.state_ = gotrparen;
+ con.state = gotrparen;
}
else if (*src == 'M') /* Reverse Index (scroll down) */
{
- dev_state.fillin_info (get_output_handle ());
- scroll_screen (0, 0, -1, -1, 0, dev_state.info.winTop + 1);
- dev_state.state_ = normal;
+ con.fillin (get_output_handle ());
+ scroll_buffer_screen (0, 0, -1, -1, 0, 1);
+ con.state = normal;
}
else if (*src == 'c') /* RIS Full Reset */
{
- dev_state.set_default_attr ();
- dev_state.vt100_graphics_mode_G0 = false;
- dev_state.vt100_graphics_mode_G1 = false;
- dev_state.iso_2022_G1 = false;
- clear_screen (0, 0, -1, -1);
- cursor_set (true, 0, 0);
- dev_state.state_ = normal;
+ con.set_default_attr ();
+ con.vt100_graphics_mode_G0 = false;
+ con.vt100_graphics_mode_G1 = false;
+ con.iso_2022_G1 = false;
+ cursor_set (false, 0, 0);
+ clear_screen (cl_buf_beg, cl_buf_beg, cl_buf_end, cl_buf_end);
+ con.state = normal;
}
else if (*src == '8') /* DECRC Restore cursor position */
{
- cursor_set (true, dev_state.savex, dev_state.savey);
- dev_state.state_ = normal;
+ cursor_set (false, con.savex, con.savey);
+ con.state = normal;
}
else if (*src == '7') /* DECSC Save cursor position */
{
- cursor_get (&dev_state.savex, &dev_state.savey);
- dev_state.savey -= dev_state.info.winTop;
- dev_state.state_ = normal;
+ cursor_get (&con.savex, &con.savey);
+ con.state = normal;
}
else if (*src == 'R') /* ? */
- dev_state.state_ = normal;
+ con.state = normal;
else
{
- dev_state.state_ = normal;
+ con.state = normal;
}
src++;
break;
case gotarg1:
if (isdigit (*src))
{
- dev_state.args_[dev_state.nargs_] = dev_state.args_[dev_state.nargs_] * 10 + *src - '0';
+ con.args[con.nargs] = con.args[con.nargs] * 10 + *src - '0';
src++;
}
else if (*src == ';')
{
src++;
- dev_state.nargs_++;
- if (dev_state.nargs_ >= MAXARGS)
- dev_state.nargs_--;
+ con.nargs++;
+ if (con.nargs >= MAXARGS)
+ con.nargs--;
}
else if (*src == ' ')
{
src++;
- dev_state.saw_space = true;
- dev_state.state_ = gotcommand;
+ con.saw_space = true;
+ con.state = gotcommand;
}
else
- {
- dev_state.state_ = gotcommand;
- }
+ con.state = gotcommand;
break;
case gotcommand:
char_command (*src++);
- dev_state.state_ = normal;
+ con.state = normal;
break;
case gotrsquare:
if (isdigit (*src))
- dev_state.rarg = dev_state.rarg * 10 + (*src - '0');
- else if (*src == ';' && (dev_state.rarg == 2 || dev_state.rarg == 0))
- dev_state.state_ = gettitle;
+ con.rarg = con.rarg * 10 + (*src - '0');
+ else if (*src == ';' && (con.rarg == 2 || con.rarg == 0))
+ con.state = gettitle;
else
- dev_state.state_ = eattitle;
+ con.state = eattitle;
src++;
break;
case eattitle:
case gettitle:
{
- int n = strlen (dev_state.my_title_buf);
+ int n = strlen (con.my_title_buf);
if (*src < ' ')
{
- if (*src == '\007' && dev_state.state_ == gettitle)
- set_console_title (dev_state.my_title_buf);
- dev_state.state_ = normal;
+ if (*src == '\007' && con.state == gettitle)
+ set_console_title (con.my_title_buf);
+ con.state = normal;
}
else if (n < TITLESIZE)
{
- dev_state.my_title_buf[n++] = *src;
- dev_state.my_title_buf[n] = '\0';
+ con.my_title_buf[n++] = *src;
+ con.my_title_buf[n] = '\0';
}
src++;
break;
@@ -2174,38 +2331,38 @@ fhandler_console::write (const void *vsrc, size_t len)
case gotsquare:
if (*src == ';')
{
- dev_state.state_ = gotarg1;
- dev_state.nargs_++;
+ con.state = gotarg1;
+ con.nargs++;
src++;
}
else if (isalpha (*src))
- dev_state.state_ = gotcommand;
+ con.state = gotcommand;
else if (*src != '@' && !isalpha (*src) && !isdigit (*src))
{
if (*src == '?')
- dev_state.saw_question_mark = true;
+ con.saw_question_mark = true;
else if (*src == '>')
- dev_state.saw_greater_than_sign = true;
+ con.saw_greater_than_sign = true;
/* ignore any extra chars between [ and first arg or command */
src++;
}
else
- dev_state.state_ = gotarg1;
+ con.state = gotarg1;
break;
case gotparen: /* Designate G0 Character Set (ISO 2022) */
if (*src == '0')
- dev_state.vt100_graphics_mode_G0 = true;
+ con.vt100_graphics_mode_G0 = true;
else
- dev_state.vt100_graphics_mode_G0 = false;
- dev_state.state_ = normal;
+ con.vt100_graphics_mode_G0 = false;
+ con.state = normal;
src++;
break;
case gotrparen: /* Designate G1 Character Set (ISO 2022) */
if (*src == '0')
- dev_state.vt100_graphics_mode_G1 = true;
+ con.vt100_graphics_mode_G1 = true;
else
- dev_state.vt100_graphics_mode_G1 = false;
- dev_state.state_ = normal;
+ con.vt100_graphics_mode_G1 = false;
+ con.state = normal;
src++;
break;
}
@@ -2256,7 +2413,7 @@ static const struct {
};
const char *
-get_nonascii_key (INPUT_RECORD& input_rec, char *tmp)
+fhandler_console::get_nonascii_key (INPUT_RECORD& input_rec, char *tmp)
{
#define NORMAL 0
#define SHIFT 1
diff --git a/winsup/cygwin/fhandler_dev.cc b/winsup/cygwin/fhandler_dev.cc
index 48ac0b70f..c79d4c3ec 100644
--- a/winsup/cygwin/fhandler_dev.cc
+++ b/winsup/cygwin/fhandler_dev.cc
@@ -1,7 +1,5 @@
/* fhandler_dev.cc, Implement /dev.
- Copyright 2012, 2013 Red Hat, Inc.
-
This file is part of Cygwin.
This software is a copyrighted work licensed under the terms of the
@@ -49,21 +47,20 @@ fhandler_dev::open (int flags, mode_t mode)
set_errno (EISDIR);
return 0;
}
- int ret = fhandler_disk_file::open (flags, mode);
+ /* Filter O_CREAT flag to avoid creating a file called /dev accidentally. */
+ int ret = fhandler_disk_file::open (flags & ~O_CREAT, mode);
if (!ret)
{
- flags |= O_DIROPEN;
- set_flags (flags);
- nohandle (true);
+ /* Open a fake handle to \\Device\\Null */
+ ret = open_null (flags);
+ dir_exists = false;
}
- return 1;
+ return ret;
}
int
fhandler_dev::close ()
{
- if (nohandle ())
- return 0;
return fhandler_disk_file::close ();
}
@@ -87,25 +84,24 @@ fhandler_dev::fstatvfs (struct statvfs *sfs)
int ret = -1, opened = 0;
HANDLE fh = get_handle ();
- if (!fh && !nohandle ())
+ if (!fh)
{
if (!open (O_RDONLY, 0))
return -1;
opened = 1;
}
- if (!nohandle ())
+ if (pc.fs_got_fs ())
+ ret = fhandler_disk_file::fstatvfs (sfs);
+ else
{
- ret = fhandler_disk_file::fstatvfs (sfs);
- goto out;
+ /* Virtual file system. Just return an empty buffer with a few values
+ set to something useful similar to Linux. */
+ memset (sfs, 0, sizeof (*sfs));
+ sfs->f_bsize = sfs->f_frsize = 4096;
+ sfs->f_flag = ST_RDONLY;
+ sfs->f_namemax = NAME_MAX;
+ ret = 0;
}
- /* Virtual file system. Just return an empty buffer with a few values
- set to something useful. Just as on Linux. */
- memset (sfs, 0, sizeof (*sfs));
- sfs->f_bsize = sfs->f_frsize = 4096;
- sfs->f_namemax = NAME_MAX;
- ret = 0;
-
-out:
if (opened)
close ();
return ret;
@@ -114,13 +110,10 @@ out:
DIR *
fhandler_dev::opendir (int fd)
{
- DIR *dir;
- DIR *res = NULL;
-
- dir = fhandler_disk_file::opendir (fd);
+ DIR *dir = fhandler_disk_file::opendir (fd);
if (dir)
- return dir;
- if ((dir = (DIR *) malloc (sizeof (DIR))) == NULL)
+ dir_exists = true;
+ else if ((dir = (DIR *) malloc (sizeof (DIR))) == NULL)
set_errno (ENOMEM);
else if ((dir->__d_dirent =
(struct dirent *) malloc (sizeof (struct dirent))) == NULL)
@@ -144,26 +137,28 @@ fhandler_dev::opendir (int fd)
if (fd >= 0)
dir->__d_fd = fd;
+ else if (!open (O_RDONLY, 0))
+ goto free_dirent;
else
{
cfd = this;
dir->__d_fd = cfd;
- cfd->nohandle (true);
}
set_close_on_exec (true);
dir->__fh = this;
- devidx = dev_storage_scan_start;
- res = dir;
+ dir_exists = false;
}
- syscall_printf ("%p = opendir (%s)", res, get_name ());
- return res;
+ devidx = dir_exists ? NULL : dev_storage_scan_start;
+
+ syscall_printf ("%p = opendir (%s)", dir, get_name ());
+ return dir;
free_dirent:
free (dir->__d_dirent);
free_dir:
free (dir);
- return res;
+ return NULL;
}
int
@@ -226,5 +221,7 @@ void
fhandler_dev::rewinddir (DIR *dir)
{
devidx = dir_exists ? NULL : dev_storage_scan_start;
- fhandler_disk_file::rewinddir (dir);
+ dir->__d_position = 0;
+ if (dir_exists)
+ fhandler_disk_file::rewinddir (dir);
}
diff --git a/winsup/cygwin/fhandler_disk_file.cc b/winsup/cygwin/fhandler_disk_file.cc
index fe321cda0..1d5b7dee5 100644
--- a/winsup/cygwin/fhandler_disk_file.cc
+++ b/winsup/cygwin/fhandler_disk_file.cc
@@ -1,8 +1,5 @@
/* fhandler_disk_file.cc
- Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008, 2009, 2010, 2011, 2012, 2013 Red Hat, Inc.
-
This file is part of Cygwin.
This software is a copyrighted work licensed under the terms of the
@@ -10,8 +7,10 @@ Cygwin license. Please consult the file "CYGWIN_LICENSE" for
details. */
#include "winsup.h"
+#include <winioctl.h>
+#include <lm.h>
#include <stdlib.h>
-#include <sys/acl.h>
+#include <cygwin/acl.h>
#include <sys/statvfs.h>
#include "cygerrno.h"
#include "security.h"
@@ -23,10 +22,8 @@ details. */
#include "pinfo.h"
#include "ntdll.h"
#include "tls_pbuf.h"
-#include "pwdgrp.h"
-#include <winioctl.h>
-#include <lm.h>
#include "devices.h"
+#include "ldap.h"
#define _COMPILING_NEWLIB
#include <dirent.h>
@@ -224,97 +221,15 @@ inline ino_t
path_conv::get_ino_by_handle (HANDLE hdl)
{
IO_STATUS_BLOCK io;
- FILE_INTERNAL_INFORMATION fai;
+ FILE_INTERNAL_INFORMATION fii;
- if (NT_SUCCESS (NtQueryInformationFile (hdl, &io, &fai, sizeof fai,
+ if (NT_SUCCESS (NtQueryInformationFile (hdl, &io, &fii, sizeof fii,
FileInternalInformation))
- && isgood_inode (fai.FileId.QuadPart))
- return fai.FileId.QuadPart;
+ && isgood_inode (fii.IndexNumber.QuadPart))
+ return fii.IndexNumber.QuadPart;
return 0;
}
-#if 0
-/* This function is obsolete. We're keeping it in so we don't forget
- that we already did all that at one point. */
-unsigned __stdcall
-path_conv::ndisk_links (DWORD nNumberOfLinks)
-{
- if (!isdir () || isremote ())
- return nNumberOfLinks;
-
- OBJECT_ATTRIBUTES attr;
- IO_STATUS_BLOCK io;
- HANDLE fh;
-
- if (!NT_SUCCESS (NtOpenFile (&fh, SYNCHRONIZE | FILE_LIST_DIRECTORY,
- get_object_attr (attr, sec_none_nih),
- &io, FILE_SHARE_VALID_FLAGS,
- FILE_SYNCHRONOUS_IO_NONALERT
- | FILE_OPEN_FOR_BACKUP_INTENT
- | FILE_DIRECTORY_FILE)))
- return nNumberOfLinks;
-
- unsigned count = 0;
- bool first = true;
- PFILE_BOTH_DIR_INFORMATION fdibuf = (PFILE_BOTH_DIR_INFORMATION)
- alloca (65536);
- __DIR_mounts *dir = new __DIR_mounts (normalized_path);
- while (NT_SUCCESS (NtQueryDirectoryFile (fh, NULL, NULL, NULL, &io, fdibuf,
- 65536, FileBothDirectoryInformation,
- FALSE, NULL, first)))
- {
- if (first)
- {
- first = false;
- /* All directories have . and .. as their first entries.
- If . is not present as first entry, we're on a drive's
- root direcotry, which doesn't have these entries. */
- if (fdibuf->FileNameLength != 2 || fdibuf->FileName[0] != L'.')
- count = 2;
- }
- for (PFILE_BOTH_DIR_INFORMATION pfdi = fdibuf;
- pfdi;
- pfdi = (PFILE_BOTH_DIR_INFORMATION)
- (pfdi->NextEntryOffset ? (PBYTE) pfdi + pfdi->NextEntryOffset
- : NULL))
- {
- switch (pfdi->FileAttributes
- & (FILE_ATTRIBUTE_DIRECTORY | FILE_ATTRIBUTE_REPARSE_POINT))
- {
- case FILE_ATTRIBUTE_DIRECTORY:
- /* Just a directory */
- ++count;
- break;
- case FILE_ATTRIBUTE_DIRECTORY | FILE_ATTRIBUTE_REPARSE_POINT:
- /* Volume mount point or symlink to directory */
- {
- UNICODE_STRING fname;
-
- RtlInitCountedUnicodeString (&fname, pfdi->FileName,
- pfdi->FileNameLength);
- InitializeObjectAttributes (&attr, &fname,
- objcaseinsensitive (), fh, NULL);
- if (is_volume_mountpoint (&attr))
- ++count;
- }
- break;
- default:
- break;
- }
- UNICODE_STRING fname;
- RtlInitCountedUnicodeString (&fname, pfdi->FileName,
- pfdi->FileNameLength);
- dir->check_mount (&fname, 0, false);
- }
- }
- while (dir->check_missing_mount ())
- ++count;
- NtClose (fh);
- delete dir;
- return count;
-}
-#endif
-
/* For files on NFS shares, we request an EA of type NfsV3Attributes.
This returns the content of a struct fattr3 as defined in RFC 1813.
The content is the NFS equivalent of struct stat. so there's not much
@@ -323,6 +238,9 @@ int __reg2
fhandler_base::fstat_by_nfs_ea (struct stat *buf)
{
fattr3 *nfs_attr = pc.nfsattr ();
+ PWCHAR domain;
+ cyg_ldap cldap;
+ bool ldap_open = false;
if (get_io_handle ())
{
@@ -333,21 +251,54 @@ fhandler_base::fstat_by_nfs_ea (struct stat *buf)
NFS client. */
if (get_access () & GENERIC_WRITE)
FlushFileBuffers (get_io_handle ());
- nfs_fetch_fattr3 (get_io_handle (), nfs_attr);
+ pc.get_finfo (get_io_handle ());
}
buf->st_dev = nfs_attr->fsid;
buf->st_ino = nfs_attr->fileid;
buf->st_mode = (nfs_attr->mode & 0xfff)
| nfs_type_mapping[nfs_attr->type & 7];
buf->st_nlink = nfs_attr->nlink;
- /* FIXME: How to convert UNIX uid/gid to Windows SIDs? */
-#if 0
- buf->st_uid = nfs_attr->uid;
- buf->st_gid = nfs_attr->gid;
-#else
- buf->st_uid = myself->uid;
- buf->st_gid = myself->gid;
-#endif
+ if (cygheap->pg.nss_pwd_db ())
+ {
+ /* Try to map UNIX uid/gid to Cygwin uid/gid. If there's no mapping in
+ the cache, try to fetch it from the configured RFC 2307 domain (see
+ last comment in cygheap_domain_info::init() for more information) and
+ add it to the mapping cache. */
+ buf->st_uid = cygheap->ugid_cache.get_uid (nfs_attr->uid);
+ if (buf->st_uid == ILLEGAL_UID)
+ {
+ uid_t map_uid = ILLEGAL_UID;
+
+ domain = cygheap->dom.get_rfc2307_domain ();
+ if ((ldap_open = (cldap.open (domain) == NO_ERROR)))
+ map_uid = cldap.remap_uid (nfs_attr->uid);
+ if (map_uid == ILLEGAL_UID)
+ map_uid = MAP_UNIX_TO_CYGWIN_ID (nfs_attr->uid);
+ cygheap->ugid_cache.add_uid (nfs_attr->uid, map_uid);
+ buf->st_uid = map_uid;
+ }
+ }
+ else /* fake files being owned by current user. */
+ buf->st_uid = myself->uid;
+ if (cygheap->pg.nss_grp_db ())
+ {
+ /* See above */
+ buf->st_gid = cygheap->ugid_cache.get_gid (nfs_attr->gid);
+ if (buf->st_gid == ILLEGAL_GID)
+ {
+ gid_t map_gid = ILLEGAL_GID;
+
+ domain = cygheap->dom.get_rfc2307_domain ();
+ if ((ldap_open || cldap.open (domain) == NO_ERROR))
+ map_gid = cldap.remap_gid (nfs_attr->gid);
+ if (map_gid == ILLEGAL_GID)
+ map_gid = MAP_UNIX_TO_CYGWIN_ID (nfs_attr->gid);
+ cygheap->ugid_cache.add_gid (nfs_attr->gid, map_gid);
+ buf->st_gid = map_gid;
+ }
+ }
+ else /* fake files being owned by current group. */
+ buf->st_gid = myself->gid;
buf->st_rdev = makedev (nfs_attr->rdev.specdata1,
nfs_attr->rdev.specdata2);
buf->st_size = nfs_attr->size;
@@ -365,59 +316,24 @@ fhandler_base::fstat_by_nfs_ea (struct stat *buf)
int __reg2
fhandler_base::fstat_by_handle (struct stat *buf)
{
- /* Don't use FileAllInformation info class. It returns a pathname rather
- than a filename, so it needs a really big buffer for no good reason
- since we don't need the name anyway. So we just call the three info
- classes necessary to get all information required by stat(2). */
- FILE_STANDARD_INFORMATION fsi;
- FILE_INTERNAL_INFORMATION fii;
-
HANDLE h = get_stat_handle ();
NTSTATUS status = 0;
- IO_STATUS_BLOCK io;
/* If the file has been opened for other purposes than stat, we can't rely
- on the information stored in pc.fnoi. So we overwrite them here. */
+ on the information stored in pc.fai. So we overwrite them here. */
if (get_io_handle ())
{
- status = file_get_fnoi (h, pc.fs_is_netapp (), pc.fnoi ());
+ status = pc.get_finfo (h);
if (!NT_SUCCESS (status))
{
- debug_printf ("%y = NtQueryInformationFile(%S, "
- "FileNetworkOpenInformation)",
+ debug_printf ("%y = NtQueryInformationFile(%S, FileAllInformation)",
status, pc.get_nt_native_path ());
return -1;
}
}
- if (!pc.hasgood_inode ())
- fsi.NumberOfLinks = 1;
- else
- {
- status = NtQueryInformationFile (h, &io, &fsi, sizeof fsi,
- FileStandardInformation);
- if (!NT_SUCCESS (status))
- {
- debug_printf ("%y = NtQueryInformationFile(%S, "
- "FileStandardInformation)",
- status, pc.get_nt_native_path ());
- return -1;
- }
- if (!ino)
- {
- status = NtQueryInformationFile (h, &io, &fii, sizeof fii,
- FileInternalInformation);
- if (!NT_SUCCESS (status))
- {
- debug_printf ("%y = NtQueryInformationFile(%S, "
- "FileInternalInformation)",
- status, pc.get_nt_native_path ());
- return -1;
- }
- else if (pc.isgood_inode (fii.FileId.QuadPart))
- ino = fii.FileId.QuadPart;
- }
- }
- return fstat_helper (buf, fsi.NumberOfLinks);
+ if (pc.isgood_inode (pc.fai ()->InternalInformation.IndexNumber.QuadPart))
+ ino = pc.fai ()->InternalInformation.IndexNumber.QuadPart;
+ return fstat_helper (buf);
}
int __reg2
@@ -461,7 +377,7 @@ fhandler_base::fstat_by_name (struct stat *buf)
ino = fdi_buf.fdi.FileId.QuadPart;
}
}
- return fstat_helper (buf, 1);
+ return fstat_helper (buf);
}
int __reg2
@@ -492,7 +408,7 @@ fhandler_base::fstat_fs (struct stat *buf)
if (oret)
{
/* We now have a valid handle, regardless of the "nohandle" state.
- Since fhandler_base::open only calls CloseHandle if !nohandle,
+ Since fhandler_base::close only calls CloseHandle if !nohandle,
we have to set it to false before calling close and restore
the state afterwards. */
res = pc.fs_is_nfs () ? fstat_by_nfs_ea (buf) : fstat_by_handle (buf);
@@ -508,24 +424,24 @@ fhandler_base::fstat_fs (struct stat *buf)
return res;
}
-int __reg3
-fhandler_base::fstat_helper (struct stat *buf,
- DWORD nNumberOfLinks)
+int __reg2
+fhandler_base::fstat_helper (struct stat *buf)
{
IO_STATUS_BLOCK st;
FILE_COMPRESSION_INFORMATION fci;
HANDLE h = get_stat_handle ();
- PFILE_NETWORK_OPEN_INFORMATION pfnoi = pc.fnoi ();
+ PFILE_ALL_INFORMATION pfai = pc.fai ();
ULONG attributes = pc.file_attributes ();
- to_timestruc_t (&pfnoi->LastAccessTime, &buf->st_atim);
- to_timestruc_t (&pfnoi->LastWriteTime, &buf->st_mtim);
+ to_timestruc_t (&pfai->BasicInformation.LastAccessTime, &buf->st_atim);
+ to_timestruc_t (&pfai->BasicInformation.LastWriteTime, &buf->st_mtim);
/* If the ChangeTime is 0, the underlying FS doesn't support this timestamp
(FAT for instance). If so, it's faked using LastWriteTime. */
- to_timestruc_t (pfnoi->ChangeTime.QuadPart ? &pfnoi->ChangeTime
- : &pfnoi->LastWriteTime,
+ to_timestruc_t (pfai->BasicInformation.ChangeTime.QuadPart
+ ? &pfai->BasicInformation.ChangeTime
+ : &pfai->BasicInformation.LastWriteTime,
&buf->st_ctim);
- to_timestruc_t (&pfnoi->CreationTime, &buf->st_birthtim);
+ to_timestruc_t (&pfai->BasicInformation.CreationTime, &buf->st_birthtim);
buf->st_dev = get_dev ();
/* CV 2011-01-13: Observations on the Cygwin mailing list point to an
interesting behaviour in some Windows versions. Apparently the size of
@@ -534,29 +450,24 @@ fhandler_base::fstat_helper (struct stat *buf,
0 in the first call and size > 0 in the second call. This in turn can
affect applications like newer tar.
FIXME: Is the allocation size affected as well? */
- buf->st_size = pc.isdir () ? 0 : (off_t) pfnoi->EndOfFile.QuadPart;
+ buf->st_size = pc.isdir ()
+ ? 0
+ : (off_t) pfai->StandardInformation.EndOfFile.QuadPart;
/* The number of links to a directory includes the number of subdirectories
in the directory, since all those subdirectories point to it. However,
this is painfully slow, so we do without it. */
-#if 0
- buf->st_nlink = pc.ndisk_links (nNumberOfLinks);
-#else
- buf->st_nlink = nNumberOfLinks;
-#endif
+ buf->st_nlink = pc.fai()->StandardInformation.NumberOfLinks;
/* Enforce namehash as inode number on untrusted file systems. */
- if (ino && pc.isgood_inode (ino))
- buf->st_ino = (ino_t) ino;
- else
- buf->st_ino = get_ino ();
+ buf->st_ino = ino ?: get_ino ();
buf->st_blksize = PREFERRED_IO_BLKSIZE;
- if (pfnoi->AllocationSize.QuadPart >= 0LL)
+ if (pfai->StandardInformation.AllocationSize.QuadPart >= 0LL)
/* A successful NtQueryInformationFile returns the allocation size
correctly for compressed and sparse files as well. */
- buf->st_blocks = (pfnoi->AllocationSize.QuadPart + S_BLKSIZE - 1)
- / S_BLKSIZE;
+ buf->st_blocks = (pfai->StandardInformation.AllocationSize.QuadPart
+ + S_BLKSIZE - 1) / S_BLKSIZE;
else if (::has_attribute (attributes, FILE_ATTRIBUTE_COMPRESSED
| FILE_ATTRIBUTE_SPARSE_FILE)
&& h && !is_fs_special ()
@@ -648,9 +559,9 @@ fhandler_base::fstat_helper (struct stat *buf,
/* We have to re-open the file. Either the file is not opened
for reading, or the read will change the file position of the
original handle. */
- pc.init_reopen_attr (&attr, h);
status = NtOpenFile (&h, SYNCHRONIZE | FILE_READ_DATA,
- &attr, &io, FILE_SHARE_VALID_FLAGS,
+ pc.init_reopen_attr (attr, h), &io,
+ FILE_SHARE_VALID_FLAGS,
FILE_OPEN_FOR_BACKUP_INTENT
| FILE_SYNCHRONOUS_IO_NONALERT);
if (!NT_SUCCESS (status))
@@ -690,7 +601,7 @@ fhandler_base::fstat_helper (struct stat *buf,
}
done:
- syscall_printf ("0 = fstat (%S, %p) st_size=%D, st_mode=%y, st_ino=%D"
+ syscall_printf ("0 = fstat (%S, %p) st_size=%D, st_mode=0%o, st_ino=%D"
"st_atim=%lx.%lx st_ctim=%lx.%lx "
"st_mtim=%lx.%lx st_birthtim=%lx.%lx",
pc.get_nt_native_path (), buf,
@@ -776,6 +687,30 @@ fhandler_disk_file::fstatvfs (struct statvfs *sfs)
}
ret = 0;
}
+ else if (status == STATUS_INVALID_PARAMETER /* Netapp */
+ || status == STATUS_INVALID_INFO_CLASS)
+ {
+ FILE_FS_SIZE_INFORMATION fsi;
+ status = NtQueryVolumeInformationFile (fh, &io, &fsi, sizeof fsi,
+ FileFsSizeInformation);
+ if (NT_SUCCESS (status))
+ {
+ sfs->f_bsize = fsi.BytesPerSector * fsi.SectorsPerAllocationUnit;
+ sfs->f_frsize = sfs->f_bsize;
+ sfs->f_blocks = (fsblkcnt_t) fsi.TotalAllocationUnits.QuadPart;
+ sfs->f_bfree = sfs->f_bavail =
+ (fsblkcnt_t) fsi.AvailableAllocationUnits.QuadPart;
+ ret = 0;
+ }
+ else
+ debug_printf ("%y = NtQueryVolumeInformationFile"
+ "(%S, FileFsSizeInformation)",
+ status, pc.get_nt_native_path ());
+ }
+ else
+ debug_printf ("%y = NtQueryVolumeInformationFile"
+ "(%S, FileFsFullSizeInformation)",
+ status, pc.get_nt_native_path ());
out:
if (opened)
NtClose (fh);
@@ -787,7 +722,7 @@ int __reg1
fhandler_disk_file::fchmod (mode_t mode)
{
extern int chmod_device (path_conv& pc, mode_t mode);
- int res = -1;
+ int ret = -1;
int oret = 0;
NTSTATUS status;
IO_STATUS_BLOCK io;
@@ -800,7 +735,7 @@ fhandler_disk_file::fchmod (mode_t mode)
query_open (query_write_dac);
if (!(oret = open (O_BINARY, 0)))
{
- /* Need WRITE_DAC|WRITE_OWNER to write ACLs. */
+ /* Need WRITE_DAC to write ACLs. */
if (pc.has_acls ())
return -1;
/* Otherwise FILE_WRITE_ATTRIBUTES is sufficient. */
@@ -834,17 +769,55 @@ fhandler_disk_file::fchmod (mode_t mode)
if (!NT_SUCCESS (status))
__seterrno_from_nt_status (status);
else
- res = 0;
+ ret = 0;
goto out;
}
if (pc.has_acls ())
{
- if (pc.isdir ())
- mode |= S_IFDIR;
- if (!set_file_attribute (get_handle (), pc,
- ILLEGAL_UID, ILLEGAL_GID, mode))
- res = 0;
+ security_descriptor sd, sd_ret;
+ uid_t uid;
+ gid_t gid;
+ tmp_pathbuf tp;
+ aclent_t *aclp;
+ bool standard_acl = false;
+ int nentries, idx;
+
+ if (!get_file_sd (get_handle (), pc, sd, false))
+ {
+ aclp = (aclent_t *) tp.c_get ();
+ if ((nentries = get_posix_access (sd, NULL, &uid, &gid,
+ aclp, MAX_ACL_ENTRIES,
+ &standard_acl)) >= 0)
+ {
+ /* Overwrite ACL permissions as required by POSIX 1003.1e
+ draft 17. */
+ aclp[0].a_perm = (mode >> 6) & S_IRWXO;
+
+ /* POSIXly correct: If CLASS_OBJ is present, chmod only modifies
+ CLASS_OBJ, not GROUP_OBJ.
+
+ Deliberate deviation from POSIX 1003.1e: If the ACL is a
+ "standard" ACL, that is, it only contains POSIX permissions
+ as well as entries for the Administrators group and SYSTEM,
+ then it's kind of a POSIX-only ACL in a twisted, Windowsy
+ way. If so, we change GROUP_OBJ and CLASS_OBJ perms. */
+ if (standard_acl
+ && (idx = searchace (aclp, nentries, GROUP_OBJ)) >= 0)
+ aclp[idx].a_perm = (mode >> 3) & S_IRWXO;
+ if (nentries > MIN_ACL_ENTRIES
+ && (idx = searchace (aclp, nentries, CLASS_OBJ)) >= 0)
+ aclp[idx].a_perm = (mode >> 3) & S_IRWXO;
+
+ if ((idx = searchace (aclp, nentries, OTHER_OBJ)) >= 0)
+ aclp[idx].a_perm = mode & S_IRWXO;
+ if (pc.isdir ())
+ mode |= S_IFDIR;
+ if (set_posix_access (mode, uid, gid, aclp, nentries, sd_ret,
+ pc.fs_is_samba ()))
+ ret = set_file_sd (get_handle (), pc, sd_ret, false);
+ }
+ }
}
/* If the mode has any write bits set, the DOS R/O flag is in the way. */
@@ -866,9 +839,9 @@ fhandler_disk_file::fchmod (mode_t mode)
OBJECT_ATTRIBUTES attr;
HANDLE fh;
- pc.init_reopen_attr (&attr, get_handle ());
- if (NT_SUCCESS (NtOpenFile (&fh, FILE_WRITE_ATTRIBUTES, &attr, &io,
- FILE_SHARE_VALID_FLAGS,
+ if (NT_SUCCESS (NtOpenFile (&fh, FILE_WRITE_ATTRIBUTES,
+ pc.init_reopen_attr (attr, get_handle ()),
+ &io, FILE_SHARE_VALID_FLAGS,
FILE_OPEN_FOR_BACKUP_INTENT)))
{
NtSetAttributesFile (fh, pc.file_attributes ());
@@ -881,20 +854,28 @@ fhandler_disk_file::fchmod (mode_t mode)
if (!NT_SUCCESS (status))
__seterrno_from_nt_status (status);
else
- res = 0;
+ ret = 0;
}
out:
if (oret)
close_fs ();
- return res;
+ return ret;
}
int __reg2
fhandler_disk_file::fchown (uid_t uid, gid_t gid)
{
int oret = 0;
+ int ret = -1;
+ security_descriptor sd, sd_ret;
+ mode_t attr = pc.isdir () ? S_IFDIR : 0;
+ uid_t old_uid;
+ gid_t old_gid;
+ tmp_pathbuf tp;
+ aclent_t *aclp;
+ int nentries;
if (!pc.has_acls ())
{
@@ -911,52 +892,71 @@ fhandler_disk_file::fchown (uid_t uid, gid_t gid)
return -1;
}
- mode_t attrib = 0;
- if (pc.isdir ())
- attrib |= S_IFDIR;
- uid_t old_uid;
- int res = get_file_attribute (get_handle (), pc, &attrib, &old_uid, NULL);
- if (!res)
+ if (get_file_sd (get_handle (), pc, sd, false))
+ goto out;
+
+ aclp = (aclent_t *) tp.c_get ();
+ if ((nentries = get_posix_access (sd, &attr, &old_uid, &old_gid,
+ aclp, MAX_ACL_ENTRIES)) < 0)
+ goto out;
+
+ if (uid == ILLEGAL_UID)
+ uid = old_uid;
+ if (gid == ILLEGAL_GID)
+ gid = old_gid;
+ if (uid == old_uid && gid == old_gid)
{
- /* Typical Windows default ACLs can contain permissions for one
- group, while being owned by another user/group. The permission
- bits returned above are pretty much useless then. Creating a
- new ACL with these useless permissions results in a potentially
- broken symlink. So what we do here is to set the underlying
- permissions of symlinks to a sensible value which allows the
- world to read the symlink and only the new owner to change it. */
- if (pc.issymlink ())
- attrib = S_IFLNK | STD_RBITS | STD_WBITS;
- res = set_file_attribute (get_handle (), pc, uid, gid, attrib);
- /* If you're running a Samba server which has no winbidd running, the
- uid<->SID mapping is disfunctional. Even trying to chown to your
- own account fails since the account used on the server is the UNIX
- account which gets used for the standard user mapping. This is a
- default mechanism which doesn't know your real Windows SID.
- There are two possible error codes in different Samba releases for
- this situation, one of them is unfortunately the not very significant
- STATUS_ACCESS_DENIED. Instead of relying on the error codes, we're
- using the below very simple heuristic. If set_file_attribute failed,
- and the original user account was either already unknown, or one of
- the standard UNIX accounts, we're faking success. */
- if (res == -1 && pc.fs_is_samba ())
- {
- cygsid sid;
+ ret = 0;
+ goto out;
+ }
- if (old_uid == ILLEGAL_UID
- || (sid.getfrompw (internal_getpwuid (old_uid))
- && RtlEqualPrefixSid (sid,
- well_known_samba_unix_user_fake_sid)))
- {
- debug_printf ("Faking chown worked on standalone Samba");
- res = 0;
- }
+ /* Windows ACLs can contain permissions for one group, while being owned by
+ another user/group. The permission bits returned above are pretty much
+ useless then. Creating a new ACL with these useless permissions results
+ in a potentially broken symlink. So what we do here is to set the
+ underlying permissions of symlinks to a sensible value which allows the
+ world to read the symlink and only the new owner to change it. */
+ if (pc.issymlink ())
+ for (int idx = 0; idx < nentries; ++idx)
+ {
+ aclp[idx].a_perm |= S_IROTH;
+ if (aclp[idx].a_type & USER_OBJ)
+ aclp[idx].a_perm |= S_IWOTH;
+ }
+
+ if (set_posix_access (attr, uid, gid, aclp, nentries, sd_ret,
+ pc.fs_is_samba ()))
+ ret = set_file_sd (get_handle (), pc, sd_ret, true);
+
+ /* If you're running a Samba server with no winbind, the uid<->SID mapping
+ is disfunctional. Even trying to chown to your own account fails since
+ the account used on the server is the UNIX account which gets used for
+ the standard user mapping. This is a default mechanism which doesn't
+ know your real Windows SID. There are two possible error codes in
+ different Samba releases for this situation, one of them unfortunately
+ the not very significant STATUS_ACCESS_DENIED. Instead of relying on
+ the error codes, we're using the below very simple heuristic.
+ If set_file_sd failed, and the original user account was either already
+ unknown, or one of the standard UNIX accounts, we're faking success. */
+ if (ret == -1 && pc.fs_is_samba ())
+ {
+ PSID sid;
+
+ if (uid == old_uid
+ || ((sid = sidfromuid (old_uid, NULL)) != NO_SID
+ && RtlEqualPrefixSid (sid,
+ well_known_samba_unix_user_fake_sid)))
+ {
+ debug_printf ("Faking chown worked on standalone Samba");
+ ret = 0;
}
}
+
+out:
if (oret)
close_fs ();
- return res;
+ return ret;
}
int __reg3
@@ -997,9 +997,6 @@ cant_access_acl:
aclbufp[2].a_type = OTHER_OBJ;
aclbufp[2].a_id = ILLEGAL_GID;
aclbufp[2].a_perm = st.st_mode & S_IRWXO;
- aclbufp[3].a_type = CLASS_OBJ;
- aclbufp[3].a_id = ILLEGAL_GID;
- aclbufp[3].a_perm = S_IRWXU | S_IRWXG | S_IRWXO;
res = MIN_ACL_ENTRIES;
}
}
@@ -1017,7 +1014,7 @@ cant_access_acl:
if ((cmd == SETACL && !get_handle ())
|| (cmd != SETACL && !get_stat_handle ()))
{
- query_open (cmd == SETACL ? query_write_control : query_read_control);
+ query_open (cmd == SETACL ? query_write_dac : query_read_control);
if (!(oret = open (O_BINARY, 0)))
{
if (cmd == GETACL || cmd == GETACLCNT)
@@ -1051,11 +1048,12 @@ cant_access_acl:
case GETACL:
if (!aclbufp)
set_errno(EFAULT);
- else
+ else {
res = getacl (get_stat_handle (), pc, nentries, aclbufp);
/* For this ENOSYS case, see security.cc:get_file_attribute(). */
if (res == -1 && get_errno () == ENOSYS)
goto cant_access_acl;
+ }
break;
case GETACLCNT:
res = getacl (get_stat_handle (), pc, 0, NULL);
@@ -1356,9 +1354,9 @@ fhandler_base::utimens_fs (const struct timespec *tvp)
OBJECT_ATTRIBUTES attr;
HANDLE fh;
- pc.init_reopen_attr (&attr, get_handle ());
- if (NT_SUCCESS (NtOpenFile (&fh, FILE_WRITE_ATTRIBUTES, &attr, &io,
- FILE_SHARE_VALID_FLAGS,
+ if (NT_SUCCESS (NtOpenFile (&fh, FILE_WRITE_ATTRIBUTES,
+ pc.init_reopen_attr (attr, get_handle ()),
+ &io, FILE_SHARE_VALID_FLAGS,
FILE_OPEN_FOR_BACKUP_INTENT)))
{
NtSetInformationFile (fh, &io, &fbi, sizeof fbi,
@@ -1401,9 +1399,6 @@ fhandler_disk_file::close ()
/* Close extra pread/pwrite handle, if it exists. */
if (prw_handle)
NtClose (prw_handle);
- /* Delete all POSIX locks on the file. Delete all flock locks on the
- file if this is the last reference to this file. */
- del_my_locks (on_close);
return fhandler_base::close ();
}
@@ -1414,20 +1409,11 @@ fhandler_disk_file::fcntl (int cmd, intptr_t arg)
switch (cmd)
{
- case F_LCK_MANDATORY:
+ case F_LCK_MANDATORY: /* Mandatory locking only works on files. */
mandatory_locking (!!arg);
need_fork_fixup (true);
res = 0;
break;
- case F_GETLK:
- case F_SETLK:
- case F_SETLKW:
- {
- struct flock *fl = (struct flock *) arg;
- fl->l_type &= F_RDLCK | F_WRLCK | F_UNLCK;
- res = mandatory_locking () ? mand_lock (cmd, fl) : lock (cmd, fl);
- }
- break;
default:
res = fhandler_base::fcntl (cmd, arg);
break;
@@ -1468,6 +1454,8 @@ fhandler_base::open_fs (int flags, mode_t mode)
return 0;
}
+ bool new_file = !exists ();
+
int res = fhandler_base::open (flags | O_DIROPEN, mode);
if (!res)
goto out;
@@ -1486,10 +1474,13 @@ fhandler_base::open_fs (int flags, mode_t mode)
return 0;
}
- ino = pc.get_ino_by_handle (get_handle ());
- /* A unique ID is necessary to recognize fhandler entries which are
- duplicated by dup(2) or fork(2). */
- NtAllocateLocallyUniqueId ((PLUID) &unique_id);
+ /* The file info in pc is wrong at this point for newly created files.
+ Refresh it before fetching any file info. */
+ if (new_file)
+ pc.get_finfo (get_io_handle ());
+
+ if (pc.isgood_inode (pc.get_ino ()))
+ ino = pc.get_ino ();
out:
syscall_printf ("%d = fhandler_disk_file::open(%S, %y)", res,
@@ -1542,8 +1533,8 @@ fhandler_disk_file::prw_open (bool write)
/* First try to open with the original access mask */
ACCESS_MASK access = get_access ();
- pc.init_reopen_attr (&attr, get_handle ());
- status = NtOpenFile (&prw_handle, access, &attr, &io,
+ status = NtOpenFile (&prw_handle, access,
+ pc.init_reopen_attr (attr, get_handle ()), &io,
FILE_SHARE_VALID_FLAGS, get_options ());
if (status == STATUS_ACCESS_DENIED)
{
@@ -1733,10 +1724,11 @@ fhandler_disk_file::mkdir (mode_t mode)
p, plen);
if (NT_SUCCESS (status))
{
+ /* Set the "directory attribute" so that pc.isdir() returns correct
+ value in subsequent function calls. */
+ pc.file_attributes (FILE_ATTRIBUTE_DIRECTORY);
if (has_acls ())
- set_file_attribute (dir, pc, ILLEGAL_UID, ILLEGAL_GID,
- S_JUSTCREATED | S_IFDIR
- | ((mode & 07777) & ~cygheap->umask));
+ set_created_file_access (dir, pc, mode & 07777);
NtClose (dir);
res = 0;
}
@@ -1848,11 +1840,17 @@ fhandler_disk_file::opendir (int fd)
dir->__d_position = 0;
dir->__flags = (get_name ()[0] == '/' && get_name ()[1] == '\0')
? dirent_isroot : 0;
- dir->__d_internal = (uintptr_t) new __DIR_mounts (get_name ());
- d_cachepos (dir) = 0;
+ dir->__d_internal = 0;
- if (!pc.iscygdrive ())
+ if (pc.iscygdrive ())
{
+ if (fd < 0 && !open (O_RDONLY, 0))
+ goto free_mounts;
+ }
+ else
+ {
+ dir->__d_internal = (uintptr_t) new __DIR_mounts (get_name ());
+ d_cachepos (dir) = 0;
if (fd < 0)
{
/* opendir() case. Initialize with given directory name and
@@ -1933,8 +1931,6 @@ fhandler_disk_file::opendir (int fd)
time on exit. Nasty, nasty... */
cfd = this;
dir->__d_fd = cfd;
- if (pc.iscygdrive ())
- cfd->nohandle (true);
}
set_close_on_exec (true);
dir->__fh = this;
@@ -2012,7 +2008,8 @@ fhandler_disk_file::readdir_helper (DIR *dir, dirent *de, DWORD w32_err,
fname->Length = 0;
return geterrno_from_win_error (w32_err);
}
-
+ if (de->d_ino == 2) /* Inode number for virtual dirs. */
+ de->d_type = DT_DIR;
attr = 0;
dir->__flags &= ~dirent_set_d_ino;
}
@@ -2075,7 +2072,7 @@ fhandler_disk_file::readdir_helper (DIR *dir, dirent *de, DWORD w32_err,
{
tmp_pathbuf tp;
char *file = tp.c_get ();
- char *p = stpcpy (file, pc.normalized_path);
+ char *p = stpcpy (file, pc.get_posix ());
if (p[-1] != '/')
*p++ = '/';
sys_wcstombs (p, NT_MAX_PATH - (p - file),
@@ -2295,14 +2292,14 @@ go_ahead:
/* We call NtQueryInformationFile here, rather than
pc.get_ino_by_handle(), otherwise we can't short-circuit
dirent_set_d_ino correctly. */
- FILE_INTERNAL_INFORMATION fai;
- f_status = NtQueryInformationFile (hdl, &io, &fai, sizeof fai,
+ FILE_INTERNAL_INFORMATION fii;
+ f_status = NtQueryInformationFile (hdl, &io, &fii, sizeof fii,
FileInternalInformation);
NtClose (hdl);
if (NT_SUCCESS (f_status))
{
- if (pc.isgood_inode (fai.FileId.QuadPart))
- de->d_ino = fai.FileId.QuadPart;
+ if (pc.isgood_inode (fii.IndexNumber.QuadPart))
+ de->d_ino = fii.IndexNumber.QuadPart;
else
/* Untrusted file system. Don't try to fetch inode
number again. */
@@ -2395,16 +2392,8 @@ fhandler_cygdrive::open (int flags, mode_t mode)
set_errno (EISDIR);
return 0;
}
- flags |= O_DIROPEN;
- set_flags (flags);
- nohandle (true);
- return 1;
-}
-
-int
-fhandler_cygdrive::close ()
-{
- return 0;
+ /* Open a fake handle to \\Device\\Null */
+ return open_null (flags);
}
void
@@ -2431,6 +2420,7 @@ fhandler_cygdrive::fstatvfs (struct statvfs *sfs)
set to something useful. Just as on Linux. */
memset (sfs, 0, sizeof (*sfs));
sfs->f_bsize = sfs->f_frsize = 4096;
+ sfs->f_flag = ST_RDONLY;
sfs->f_namemax = NAME_MAX;
return 0;
}
diff --git a/winsup/cygwin/fhandler_dsp.cc b/winsup/cygwin/fhandler_dsp.cc
index 72256b056..5ae3309f8 100644
--- a/winsup/cygwin/fhandler_dsp.cc
+++ b/winsup/cygwin/fhandler_dsp.cc
@@ -1,7 +1,5 @@
/* fhandler_dev_dsp: code to emulate OSS sound model /dev/dsp
- Copyright 2001, 2002, 2003, 2004, 2008, 2011, 2012 Red Hat, Inc
-
Written by Andy Younger (andy@snoogie.demon.co.uk)
Extended by Gerd Spalink (Gerd.Spalink@t-online.de)
to support recording from the audio input
@@ -435,6 +433,7 @@ fhandler_dev_dsp::Audio_out::stop (bool immediately)
debug_printf ("%u = waveOutUnprepareHeader(%p)", rc, pHdr);
}
+ no_thread_exit_protect for_now (true);
rc = waveOutClose (dev_);
debug_printf ("%u = waveOutClose()", rc);
@@ -810,6 +809,7 @@ fhandler_dev_dsp::Audio_in::stop ()
debug_printf ("%u = waveInUnprepareHeader(%p)", rc, pHdr);
}
+ no_thread_exit_protect for_now (true);
rc = waveInClose (dev_);
debug_printf ("%u = waveInClose()", rc);
@@ -1003,10 +1003,41 @@ fhandler_dev_dsp::fhandler_dev_dsp ():
dev ().parse (FH_OSS_DSP);
}
+ssize_t __stdcall
+fhandler_dev_dsp::write (const void *ptr, size_t len)
+{
+ return base ()->_write (ptr, len);
+}
+
+void __reg3
+fhandler_dev_dsp::read (void *ptr, size_t& len)
+{
+ return base ()->_read (ptr, len);
+}
+
int
-fhandler_dev_dsp::open (int flags, mode_t mode)
+fhandler_dev_dsp::ioctl (unsigned int cmd, void *buf)
+{
+ return base ()->_ioctl (cmd, buf);
+}
+
+void
+fhandler_dev_dsp::fixup_after_fork (HANDLE parent)
{
- int err = 0;
+ base ()->_fixup_after_fork (parent);
+}
+
+void
+fhandler_dev_dsp::fixup_after_exec ()
+{
+ base ()->_fixup_after_exec ();
+}
+
+
+int
+fhandler_dev_dsp::open (int flags, mode_t)
+{
+ int ret = 0, err = 0;
UINT num_in = 0, num_out = 0;
set_flags ((flags & ~O_TEXT) | O_BINARY);
// Work out initial sample format & frequency, /dev/dsp defaults
@@ -1032,25 +1063,21 @@ fhandler_dev_dsp::open (int flags, mode_t mode)
err = EINVAL;
}
- if (!err)
- {
- set_open_status ();
- need_fork_fixup (true);
- nohandle (true);
- }
- else
+ if (err)
set_errno (err);
+ else
+ ret = open_null (flags);
- debug_printf ("ACCMODE=%y audio_in=%d audio_out=%d, err=%d",
- flags & O_ACCMODE, num_in, num_out, err);
- return !err;
+ debug_printf ("ACCMODE=%y audio_in=%d audio_out=%d, err=%d, ret=%d",
+ flags & O_ACCMODE, num_in, num_out, err, ret);
+ return ret;
}
#define IS_WRITE() ((get_flags() & O_ACCMODE) != O_RDONLY)
#define IS_READ() ((get_flags() & O_ACCMODE) != O_WRONLY)
ssize_t __stdcall
-fhandler_dev_dsp::write (const void *ptr, size_t len)
+fhandler_dev_dsp::_write (const void *ptr, size_t len)
{
debug_printf ("ptr=%p len=%ld", ptr, len);
int len_s = len;
@@ -1096,7 +1123,7 @@ fhandler_dev_dsp::write (const void *ptr, size_t len)
}
void __reg3
-fhandler_dev_dsp::read (void *ptr, size_t& len)
+fhandler_dev_dsp::_read (void *ptr, size_t& len)
{
debug_printf ("ptr=%p len=%ld", ptr, len);
@@ -1131,13 +1158,7 @@ fhandler_dev_dsp::read (void *ptr, size_t& len)
audio_in_->read ((char *)ptr, (int&)len);
}
-off_t
-fhandler_dev_dsp::lseek (off_t offset, int whence)
-{
- return 0;
-}
-
-void
+void __reg1
fhandler_dev_dsp::close_audio_in ()
{
if (audio_in_)
@@ -1148,7 +1169,7 @@ fhandler_dev_dsp::close_audio_in ()
}
}
-void
+void __reg2
fhandler_dev_dsp::close_audio_out (bool immediately)
{
if (audio_out_)
@@ -1164,12 +1185,12 @@ fhandler_dev_dsp::close ()
{
debug_printf ("audio_in=%p audio_out=%p", audio_in_, audio_out_);
close_audio_in ();
- close_audio_out (exit_state != ES_NOT_EXITING);
- return 0;
+ close_audio_out ();
+ return fhandler_base::close ();
}
int
-fhandler_dev_dsp::ioctl (unsigned int cmd, void *buf)
+fhandler_dev_dsp::_ioctl (unsigned int cmd, void *buf)
{
debug_printf ("audio_in=%p audio_out=%p", audio_in_, audio_out_);
int *intbuf = (int *) buf;
@@ -1280,7 +1301,7 @@ fhandler_dev_dsp::ioctl (unsigned int cmd, void *buf)
CASE (SNDCTL_DSP_STEREO)
{
int nChannels = *intbuf + 1;
- int res = ioctl (SNDCTL_DSP_CHANNELS, &nChannels);
+ int res = _ioctl (SNDCTL_DSP_CHANNELS, &nChannels);
*intbuf = nChannels - 1;
return res;
}
@@ -1372,11 +1393,12 @@ fhandler_dev_dsp::ioctl (unsigned int cmd, void *buf)
}
void
-fhandler_dev_dsp::fixup_after_fork (HANDLE parent)
+fhandler_dev_dsp::_fixup_after_fork (HANDLE parent)
{ // called from new child process
debug_printf ("audio_in=%p audio_out=%p",
audio_in_, audio_out_);
+ fhandler_base::fixup_after_fork (parent);
if (audio_in_)
audio_in_->fork_fixup (parent);
if (audio_out_)
@@ -1384,7 +1406,7 @@ fhandler_dev_dsp::fixup_after_fork (HANDLE parent)
}
void
-fhandler_dev_dsp::fixup_after_exec ()
+fhandler_dev_dsp::_fixup_after_exec ()
{
debug_printf ("audio_in=%p audio_out=%p, close_on_exec %d",
audio_in_, audio_out_, close_on_exec ());
diff --git a/winsup/cygwin/fhandler_fifo.cc b/winsup/cygwin/fhandler_fifo.cc
index 46a0aba58..642949aea 100644
--- a/winsup/cygwin/fhandler_fifo.cc
+++ b/winsup/cygwin/fhandler_fifo.cc
@@ -1,8 +1,5 @@
/* fhandler_fifo.cc - See fhandler.h for a description of the fhandler classes.
- Copyright 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012
- Red Hat, Inc.
-
This file is part of Cygwin.
This software is a copyrighted work licensed under the terms of the
diff --git a/winsup/cygwin/fhandler_floppy.cc b/winsup/cygwin/fhandler_floppy.cc
index 9e4b1ce1d..15b727bef 100644
--- a/winsup/cygwin/fhandler_floppy.cc
+++ b/winsup/cygwin/fhandler_floppy.cc
@@ -1,9 +1,6 @@
/* fhandler_floppy.cc. See fhandler.h for a description of the
fhandler classes.
- Copyright 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009,
- 2011, 2012, 2013 Red Hat, Inc.
-
This file is part of Cygwin.
This software is a copyrighted work licensed under the terms of the
@@ -63,12 +60,6 @@ fhandler_dev_floppy::get_drive_info (struct hd_geometry *geo)
{
dix = (DISK_GEOMETRY_EX *) dbuf;
di = &dix->Geometry;
- if (!DeviceIoControl (get_handle (),
- IOCTL_DISK_GET_PARTITION_INFO_EX, NULL, 0,
- pbuf, 256, &bytes_read, NULL))
- __seterrno ();
- else
- pix = (PARTITION_INFORMATION_EX *) pbuf;
}
}
if (!di)
@@ -81,6 +72,23 @@ fhandler_dev_floppy::get_drive_info (struct hd_geometry *geo)
return -1;
}
di = (DISK_GEOMETRY *) dbuf;
+ }
+ if (dix) /* Don't try IOCTL_DISK_GET_PARTITION_INFO_EX if
+ IOCTL_DISK_GET_DRIVE_GEOMETRY_EX didn't work.
+ Probably a floppy.*/
+ {
+ if (!DeviceIoControl (get_handle (),
+ IOCTL_DISK_GET_PARTITION_INFO_EX, NULL, 0,
+ pbuf, 256, &bytes_read, NULL))
+ __seterrno ();
+ else
+ pix = (PARTITION_INFORMATION_EX *) pbuf;
+ }
+ if (!pix && get_major () != DEV_FLOPPY_MAJOR)
+ {
+ /* It's unlikely that this code path will be used at all. Either the
+ _EX call already worked, or it's a floppy. But it doesn't hurt to
+ keep the code in. */
if (!DeviceIoControl (get_handle (),
IOCTL_DISK_GET_PARTITION_INFO, NULL, 0,
pbuf, 256, &bytes_read, NULL))
@@ -101,13 +109,16 @@ fhandler_dev_floppy::get_drive_info (struct hd_geometry *geo)
pix->PartitionLength.QuadPart);
drive_size = pix->PartitionLength.QuadPart;
}
- else
+ else if (pi)
{
debug_printf ("partition info: offset %D length %D",
pi->StartingOffset.QuadPart,
pi->PartitionLength.QuadPart);
drive_size = pi->PartitionLength.QuadPart;
}
+ else /* Floppy drive. */
+ drive_size = di->Cylinders.QuadPart * di->TracksPerCylinder
+ * di->SectorsPerTrack * di->BytesPerSector;
if (geo)
{
geo->heads = di->TracksPerCylinder;
diff --git a/winsup/cygwin/fhandler_mailslot.cc b/winsup/cygwin/fhandler_mailslot.cc
index 217e3b7ee..fa3d525c0 100644
--- a/winsup/cygwin/fhandler_mailslot.cc
+++ b/winsup/cygwin/fhandler_mailslot.cc
@@ -1,7 +1,5 @@
/* fhandler_mailslot.cc. See fhandler.h for a description of the fhandler classes.
- Copyright 2005, 2007, 2008, 2009, 2010, 2011, 2012, 2013 Red Hat, Inc.
-
This file is part of Cygwin.
This software is a copyrighted work licensed under the terms of the
diff --git a/winsup/cygwin/fhandler_netdrive.cc b/winsup/cygwin/fhandler_netdrive.cc
index af9abcada..654360f22 100644
--- a/winsup/cygwin/fhandler_netdrive.cc
+++ b/winsup/cygwin/fhandler_netdrive.cc
@@ -1,7 +1,5 @@
/* fhandler_netdrive.cc: fhandler for // and //MACHINE handling
- Copyright 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 Red Hat, Inc.
-
This file is part of Cygwin.
This software is a copyrighted work licensed under the terms of the
@@ -17,7 +15,7 @@ details. */
#include "dtable.h"
#include "cygheap.h"
#include "cygthread.h"
-#include <winnetwk.h>
+#include "tls_pbuf.h"
#include <dirent.h>
@@ -48,19 +46,20 @@ static DWORD WINAPI
thread_netdrive (void *arg)
{
netdriveinf *ndi = (netdriveinf *) arg;
- char provider[256], *dummy = NULL;
- LPNETRESOURCE nro;
+ WCHAR provider[256], *dummy = NULL;
+ LPNETRESOURCEW nro;
DWORD cnt, size;
struct net_hdls *nh;
+ tmp_pathbuf tp;
ReleaseSemaphore (ndi->sem, 1, NULL);
switch (ndi->what)
{
case GET_RESOURCE_OPENENUMTOP:
- nro = (LPNETRESOURCE) alloca (size = 4096);
+ nro = (LPNETRESOURCEW) tp.c_get ();
nh = (struct net_hdls *) ndi->out;
- ndi->ret = WNetGetProviderName (WNNC_NET_LANMAN, provider,
- (size = 256, &size));
+ ndi->ret = WNetGetProviderNameW (WNNC_NET_LANMAN, provider,
+ (size = 256, &size));
if (ndi->ret != NO_ERROR)
break;
memset (nro, 0, sizeof *nro);
@@ -70,33 +69,35 @@ thread_netdrive (void *arg)
nro->dwUsage = RESOURCEUSAGE_RESERVED | RESOURCEUSAGE_CONTAINER;
nro->lpRemoteName = provider;
nro->lpProvider = provider;
- ndi->ret = WNetOpenEnum (RESOURCE_GLOBALNET, RESOURCETYPE_DISK,
- RESOURCEUSAGE_ALL, nro, &nh->net);
+ ndi->ret = WNetOpenEnumW (RESOURCE_GLOBALNET, RESOURCETYPE_DISK,
+ RESOURCEUSAGE_ALL, nro, &nh->net);
if (ndi->ret != NO_ERROR)
break;
- while ((ndi->ret = WNetEnumResource (nh->net, (cnt = 1, &cnt), nro,
- (size = 4096, &size))) == NO_ERROR)
+ while ((ndi->ret = WNetEnumResourceW (nh->net, (cnt = 1, &cnt), nro,
+ (size = NT_MAX_PATH, &size)))
+ == NO_ERROR)
{
- ndi->ret = WNetOpenEnum (RESOURCE_GLOBALNET, RESOURCETYPE_DISK,
- RESOURCEUSAGE_ALL, nro, &nh->dom);
+ ndi->ret = WNetOpenEnumW (RESOURCE_GLOBALNET, RESOURCETYPE_DISK,
+ RESOURCEUSAGE_ALL, nro, &nh->dom);
if (ndi->ret == NO_ERROR)
break;
}
break;
case GET_RESOURCE_OPENENUM:
- nro = (LPNETRESOURCE) alloca (size = 4096);
+ nro = (LPNETRESOURCEW) tp.c_get ();
nh = (struct net_hdls *) ndi->out;
- ndi->ret = WNetGetProviderName (WNNC_NET_LANMAN, provider,
+ ndi->ret = WNetGetProviderNameW (WNNC_NET_LANMAN, provider,
(size = 256, &size));
if (ndi->ret != NO_ERROR)
break;
- ((LPNETRESOURCE) ndi->in)->lpProvider = provider;
- ndi->ret = WNetGetResourceInformation ((LPNETRESOURCE) ndi->in,
- nro, &size, &dummy);
+ ((LPNETRESOURCEW) ndi->in)->lpProvider = provider;
+ ndi->ret = WNetGetResourceInformationW ((LPNETRESOURCEW) ndi->in, nro,
+ (size = NT_MAX_PATH, &size),
+ &dummy);
if (ndi->ret != NO_ERROR)
break;
- ndi->ret = WNetOpenEnum (RESOURCE_GLOBALNET, RESOURCETYPE_DISK,
- RESOURCEUSAGE_ALL, nro, &nh->dom);
+ ndi->ret = WNetOpenEnumW (RESOURCE_GLOBALNET, RESOURCETYPE_DISK,
+ RESOURCEUSAGE_ALL, nro, &nh->dom);
break;
case GET_RESOURCE_ENUM:
nh = (struct net_hdls *) ndi->in;
@@ -105,19 +106,20 @@ thread_netdrive (void *arg)
ndi->ret = ERROR_NO_MORE_ITEMS;
break;
}
- while ((ndi->ret = WNetEnumResource (nh->dom, (cnt = 1, &cnt),
- (LPNETRESOURCE) ndi->out,
- &ndi->outsize)) != NO_ERROR
+ nro = (LPNETRESOURCEW) tp.c_get ();
+ while ((ndi->ret = WNetEnumResourceW (nh->dom, (cnt = 1, &cnt),
+ (LPNETRESOURCEW) ndi->out,
+ &ndi->outsize)) != NO_ERROR
&& nh->net)
{
WNetCloseEnum (nh->dom);
nh->dom = NULL;
- nro = (LPNETRESOURCE) alloca (size = 4096);
- while ((ndi->ret = WNetEnumResource (nh->net, (cnt = 1, &cnt), nro,
- (size = 4096, &size))) == NO_ERROR)
+ while ((ndi->ret = WNetEnumResourceW (nh->net, (cnt = 1, &cnt), nro,
+ (size = NT_MAX_PATH, &size)))
+ == NO_ERROR)
{
- ndi->ret = WNetOpenEnum (RESOURCE_GLOBALNET, RESOURCETYPE_DISK,
- RESOURCEUSAGE_ALL, nro, &nh->dom);
+ ndi->ret = WNetOpenEnumW (RESOURCE_GLOBALNET, RESOURCETYPE_DISK,
+ RESOURCEUSAGE_ALL, nro, &nh->dom);
if (ndi->ret == NO_ERROR)
break;
}
@@ -153,15 +155,20 @@ fhandler_netdrive::exists ()
size_t len = strlen (get_name ());
if (len == 2)
return virt_rootdir;
+
char namebuf[len + 1];
+ tmp_pathbuf tp;
+ PWCHAR name = tp.w_get ();
+
for (to = namebuf, from = get_name (); *from; to++, from++)
*to = (*from == '/') ? '\\' : *from;
*to = '\0';
struct net_hdls nh = { NULL, NULL };
- NETRESOURCE nr = {0};
+ NETRESOURCEW nr = {0};
nr.dwType = RESOURCETYPE_DISK;
- nr.lpRemoteName = namebuf;
+ sys_mbstowcs (name, NT_MAX_PATH, namebuf);
+ nr.lpRemoteName = name;
DWORD ret = create_thread_and_wait (GET_RESOURCE_OPENENUM,
&nr, &nh, 0, "WNetOpenEnum");
if (nh.dom)
@@ -191,28 +198,30 @@ fhandler_netdrive::fstat (struct stat *buf)
int
fhandler_netdrive::readdir (DIR *dir, dirent *de)
{
- NETRESOURCE *nro;
+ NETRESOURCEW *nro;
DWORD ret;
int res;
+ tmp_pathbuf tp;
if (!dir->__d_position)
{
size_t len = strlen (get_name ());
- char *namebuf = NULL;
- NETRESOURCE nr = { 0 };
+ PWCHAR name = NULL;
+ NETRESOURCEW nr = { 0 };
struct net_hdls *nh;
if (len != 2) /* // */
{
const char *from;
char *to;
- namebuf = (char *) alloca (len + 1);
+ char *namebuf = (char *) alloca (len + 1);
for (to = namebuf, from = get_name (); *from; to++, from++)
*to = (*from == '/') ? '\\' : *from;
*to = '\0';
+ name = tp.w_get ();
+ sys_mbstowcs (name, NT_MAX_PATH, namebuf);
}
-
- nr.lpRemoteName = namebuf;
+ nr.lpRemoteName = name;
nr.dwType = RESOURCETYPE_DISK;
nh = (struct net_hdls *) ccalloc (HEAP_FHANDLER, 1, sizeof *nh);
ret = create_thread_and_wait (len == 2 ? GET_RESOURCE_OPENENUMTOP
@@ -226,28 +235,37 @@ fhandler_netdrive::readdir (DIR *dir, dirent *de)
}
dir->__handle = (HANDLE) nh;
}
- ret = create_thread_and_wait (GET_RESOURCE_ENUM, dir->__handle,
- nro = (LPNETRESOURCE) alloca (16384),
- 16384, "WnetEnumResource");
+ nro = (LPNETRESOURCEW) tp.c_get ();
+ ret = create_thread_and_wait (GET_RESOURCE_ENUM, dir->__handle, nro,
+ NT_MAX_PATH, "WnetEnumResource");
if (ret != NO_ERROR)
res = geterrno_from_win_error (ret);
else
{
dir->__d_position++;
- char *bs = strrchr (nro->lpRemoteName, '\\');
- strcpy (de->d_name, bs ? bs + 1 : nro->lpRemoteName);
+ PWCHAR bs = wcsrchr (nro->lpRemoteName, L'\\');
+ bs = bs ? bs + 1 : nro->lpRemoteName;
if (strlen (get_name ()) == 2)
{
- strlwr (de->d_name);
+ UNICODE_STRING ss, ds;
+
+ tp.u_get (&ds);
+ RtlInitUnicodeString (&ss, bs);
+ RtlDowncaseUnicodeString (&ds, &ss, FALSE);
+ sys_wcstombs (de->d_name, sizeof de->d_name,
+ ds.Buffer, ds.Length / sizeof (WCHAR));
de->d_ino = hash_path_name (get_ino (), de->d_name);
}
else
{
- de->d_ino = readdir_get_ino (nro->lpRemoteName, false);
+ sys_wcstombs (de->d_name, sizeof de->d_name, bs);
+ char *rpath = tp.c_get ();
+ sys_wcstombs (rpath, NT_MAX_PATH, nro->lpRemoteName);
+ de->d_ino = readdir_get_ino (rpath, false);
/* We can't trust remote inode numbers of only 32 bit. That means,
remote NT4 NTFS, as well as shares of Samba version < 3.0. */
if (de->d_ino <= UINT32_MAX)
- de->d_ino = hash_path_name (0, nro->lpRemoteName);
+ de->d_ino = hash_path_name (0, rpath);
}
de->d_type = DT_DIR;
@@ -295,30 +313,23 @@ fhandler_netdrive::closedir (DIR *dir)
int
fhandler_netdrive::open (int flags, mode_t mode)
{
- int res = fhandler_virtual::open (flags, mode);
- if (!res)
- goto out;
-
- nohandle (true);
-
if ((flags & (O_CREAT | O_EXCL)) == (O_CREAT | O_EXCL))
{
set_errno (EEXIST);
- res = 0;
- goto out;
+ return 0;
}
- else if (flags & O_WRONLY)
+ if (flags & O_WRONLY)
{
set_errno (EISDIR);
- res = 0;
- goto out;
+ return 0;
}
-
- res = 1;
- set_flags ((flags & ~O_TEXT) | O_BINARY | O_DIROPEN);
- set_open_status ();
-out:
- syscall_printf ("%d = fhandler_netdrive::open(%y, 0%o)", res, flags, mode);
- return res;
+ /* Open a fake handle to \\Device\\Null */
+ return open_null (flags);
}
+int
+fhandler_netdrive::close ()
+{
+ /* Skip fhandler_virtual::close, which is a no-op. */
+ return fhandler_base::close ();
+}
diff --git a/winsup/cygwin/fhandler_nodevice.cc b/winsup/cygwin/fhandler_nodevice.cc
index 39842d394..515b1ae58 100644
--- a/winsup/cygwin/fhandler_nodevice.cc
+++ b/winsup/cygwin/fhandler_nodevice.cc
@@ -1,8 +1,5 @@
/* fhandler_nodevice.cc. "No such device" handler.
- Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2008, 2009
- Red Hat, Inc.
-
This file is part of Cygwin.
This software is a copyrighted work licensed under the terms of the
diff --git a/winsup/cygwin/fhandler_proc.cc b/winsup/cygwin/fhandler_proc.cc
index 45723718d..468746774 100644
--- a/winsup/cygwin/fhandler_proc.cc
+++ b/winsup/cygwin/fhandler_proc.cc
@@ -1,8 +1,5 @@
/* fhandler_proc.cc: fhandler for /proc virtual filesystem
- Copyright 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012,
- 2013 Red Hat, Inc.
-
This file is part of Cygwin.
This software is a copyrighted work licensed under the terms of the
@@ -17,6 +14,7 @@ details. */
#include "cygerrno.h"
#include "security.h"
#include "path.h"
+#include "shared_info.h"
#include "fhandler.h"
#include "fhandler_virtual.h"
#include "pinfo.h"
@@ -44,6 +42,7 @@ static off_t format_proc_uptime (void *, char *&);
static off_t format_proc_cpuinfo (void *, char *&);
static off_t format_proc_partitions (void *, char *&);
static off_t format_proc_self (void *, char *&);
+static off_t format_proc_cygdrive (void *, char *&);
static off_t format_proc_mounts (void *, char *&);
static off_t format_proc_filesystems (void *, char *&);
static off_t format_proc_swaps (void *, char *&);
@@ -55,6 +54,7 @@ static const virt_tab_t proc_tab[] = {
{ _VN ("."), FH_PROC, virt_directory, NULL },
{ _VN (".."), FH_PROC, virt_directory, NULL },
{ _VN ("cpuinfo"), FH_PROC, virt_file, format_proc_cpuinfo },
+ { _VN ("cygdrive"), FH_PROC, virt_symlink, format_proc_cygdrive },
{ _VN ("devices"), FH_PROC, virt_file, format_proc_devices },
{ _VN ("filesystems"), FH_PROC, virt_file, format_proc_filesystems },
{ _VN ("loadavg"), FH_PROC, virt_file, format_proc_loadavg },
@@ -251,7 +251,9 @@ fhandler_proc::readdir (DIR *dir, dirent *de)
int res;
if (dir->__d_position < PROC_LINK_COUNT)
{
- strcpy (de->d_name, proc_tab[dir->__d_position++].name);
+ strcpy (de->d_name, proc_tab[dir->__d_position].name);
+ de->d_type = virt_ftype_to_dtype (proc_tab[dir->__d_position].type);
+ dir->__d_position++;
dir->__flags |= dirent_saw_dot | dirent_saw_dot_dot;
res = 0;
}
@@ -264,6 +266,7 @@ fhandler_proc::readdir (DIR *dir, dirent *de)
if (found++ == dir->__d_position - PROC_LINK_COUNT)
{
__small_sprintf (de->d_name, "%d", pids[i]->pid);
+ de->d_type = DT_DIR;
dir->__d_position++;
res = 0;
break;
@@ -587,12 +590,30 @@ format_proc_stat (void *, char *&destbuf)
return eobuf - buf;
}
+#define add_size(p,s) ((p) = ((__typeof__(p))((PBYTE)(p)+(s))))
#define print(x) { bufptr = stpcpy (bufptr, (x)); }
+static inline uint32_t
+get_msb (uint32_t in)
+{
+ return 32 - __builtin_clz (in);
+}
+
+static inline uint32_t
+mask_bits (uint32_t in)
+{
+ uint32_t bits = get_msb (in) - 1;
+ if (in & (in - 1))
+ ++bits;
+ return bits;
+}
+
static off_t
format_proc_cpuinfo (void *, char *&destbuf)
{
- DWORD orig_affinity_mask;
+ WCHAR cpu_key[128], *cpu_num_p;
+ DWORD orig_affinity_mask = 0;
+ GROUP_AFFINITY orig_group_affinity;
int cpu_number;
const int BUFSIZE = 256;
union
@@ -601,476 +622,666 @@ format_proc_cpuinfo (void *, char *&destbuf)
char s[BUFSIZE];
WCHAR w[BUFSIZE / sizeof (WCHAR)];
DWORD d;
- unsigned m[13];
+ uint32_t m[13];
} in_buf;
tmp_pathbuf tp;
char *buf = tp.c_get ();
char *bufptr = buf;
+ DWORD lpi_size = NT_MAX_PATH;
+ //WORD num_cpu_groups = 1; /* Pre Windows 7, only one group... */
+ WORD num_cpu_per_group = 64; /* ...and a max of 64 CPUs. */
+
+ if (wincap.has_processor_groups ())
+ {
+ PSYSTEM_LOGICAL_PROCESSOR_INFORMATION_EX lpi =
+ (PSYSTEM_LOGICAL_PROCESSOR_INFORMATION_EX) tp.c_get ();
+ lpi_size = NT_MAX_PATH;
+ if (!GetLogicalProcessorInformationEx (RelationGroup, lpi, &lpi_size))
+ lpi = NULL;
+ else
+ {
+ PSYSTEM_LOGICAL_PROCESSOR_INFORMATION_EX plpi = lpi;
+ for (DWORD size = lpi_size; size > 0;
+ size -= plpi->Size, add_size (plpi, plpi->Size))
+ if (plpi->Relationship == RelationGroup)
+ {
+ //num_cpu_groups = plpi->Group.MaximumGroupCount;
+ num_cpu_per_group
+ = plpi->Group.GroupInfo[0].MaximumProcessorCount;
+ break;
+ }
+ }
+ }
+
+ cpu_num_p = wcpcpy (cpu_key, L"\\Registry\\Machine\\HARDWARE\\DESCRIPTION"
+ "\\System\\CentralProcessor\\");
for (cpu_number = 0; ; cpu_number++)
{
- WCHAR cpu_key[128];
- __small_swprintf (cpu_key, L"\\Registry\\Machine\\HARDWARE\\DESCRIPTION"
- "\\System\\CentralProcessor\\%d", cpu_number);
+ __small_swprintf (cpu_num_p, L"%d", cpu_number);
if (!NT_SUCCESS (RtlCheckRegistryKey (RTL_REGISTRY_ABSOLUTE, cpu_key)))
break;
if (cpu_number)
print ("\n");
- orig_affinity_mask = SetThreadAffinityMask (GetCurrentThread (),
- 1 << cpu_number);
- if (orig_affinity_mask == 0)
- debug_printf ("SetThreadAffinityMask failed %E");
+ WORD cpu_group = cpu_number / num_cpu_per_group;
+ KAFFINITY cpu_mask = 1L << (cpu_number % num_cpu_per_group);
+
+ if (wincap.has_processor_groups ())
+ {
+ GROUP_AFFINITY affinity = {
+ .Mask = cpu_mask,
+ .Group = cpu_group,
+ };
+
+ if (!SetThreadGroupAffinity (GetCurrentThread (), &affinity,
+ &orig_group_affinity))
+ system_printf ("SetThreadGroupAffinity(%x,%d (%x/%d)) failed %E", cpu_mask, cpu_group, cpu_number, cpu_number);
+ orig_affinity_mask = 1; /* Just mark success. */
+ }
+ else
+ {
+ orig_affinity_mask = SetThreadAffinityMask (GetCurrentThread (),
+ 1 << cpu_number);
+ if (orig_affinity_mask == 0)
+ debug_printf ("SetThreadAffinityMask failed %E");
+ }
/* I'm not sure whether the thread changes processor immediately
and I'm not sure whether this function will cause the thread
to be rescheduled */
yield ();
- bool has_cpuid = false;
-
- if (!can_set_flag (0x00040000))
- debug_printf ("386 processor - no cpuid");
+ DWORD cpu_mhz = 0;
+ RTL_QUERY_REGISTRY_TABLE tab[2] = {
+ { NULL, RTL_QUERY_REGISTRY_DIRECT | RTL_QUERY_REGISTRY_NOSTRING,
+ L"~Mhz", &cpu_mhz, REG_NONE, NULL, 0 },
+ { NULL, 0, NULL, NULL, 0, NULL, 0 }
+ };
+
+ RtlQueryRegistryValues (RTL_REGISTRY_ABSOLUTE, cpu_key, tab,
+ NULL, NULL);
+ bufptr += __small_sprintf (bufptr, "processor\t: %d\n", cpu_number);
+ uint32_t maxf, vendor_id[4], unused;
+
+ cpuid (&maxf, &vendor_id[0], &vendor_id[2], &vendor_id[1], 0x00000000);
+ maxf &= 0xffff;
+ vendor_id[3] = 0;
+
+ /* Vendor identification. */
+ bool is_amd = false, is_intel = false;
+ if (!strcmp ((char*)vendor_id, "AuthenticAMD"))
+ is_amd = true;
+ else if (!strcmp ((char*)vendor_id, "GenuineIntel"))
+ is_intel = true;
+
+ bufptr += __small_sprintf (bufptr, "vendor_id\t: %s\n",
+ (char *)vendor_id);
+
+ uint32_t features1, features2, extra_info, cpuid_sig;
+ cpuid (&cpuid_sig, &extra_info, &features2, &features1, 0x00000001);
+ uint32_t family = (cpuid_sig & 0x00000f00) >> 8,
+ model = (cpuid_sig & 0x000000f0) >> 4,
+ stepping = cpuid_sig & 0x0000000f,
+ apic_id = (extra_info & 0xff000000) >> 24;
+ if (family == 15)
+ family += (cpuid_sig >> 20) & 0xff;
+ if (family >= 6)
+ model += ((cpuid_sig >> 16) & 0x0f) << 4;
+
+ uint32_t maxe = 0;
+ cpuid (&maxe, &unused, &unused, &unused, 0x80000000);
+ if (maxe >= 0x80000004)
+ {
+ cpuid (&in_buf.m[0], &in_buf.m[1], &in_buf.m[2],
+ &in_buf.m[3], 0x80000002);
+ cpuid (&in_buf.m[4], &in_buf.m[5], &in_buf.m[6],
+ &in_buf.m[7], 0x80000003);
+ cpuid (&in_buf.m[8], &in_buf.m[9], &in_buf.m[10],
+ &in_buf.m[11], 0x80000004);
+ in_buf.m[12] = 0;
+ }
else
{
- debug_printf ("486 processor");
- if (can_set_flag (0x00200000))
+ /* Could implement a lookup table here if someone needs it. */
+ strcpy (in_buf.s, "unknown");
+ }
+ int cache_size = -1,
+ clflush = 64,
+ cache_alignment = 64;
+ if (features1 & (1 << 19)) /* CLFSH */
+ clflush = ((extra_info >> 8) & 0xff) << 3;
+ if (is_intel && family == 15)
+ cache_alignment = clflush * 2;
+ if (is_intel)
+ {
+ extern long get_cpu_cache_intel (int sysc, uint32_t maxf);
+ long cs;
+
+ /* As on Linux, don't check for L3 cache. */
+ cs = get_cpu_cache_intel (_SC_LEVEL2_CACHE_SIZE, maxf);
+ if (cs == -1)
{
- debug_printf ("processor supports CPUID instruction");
- has_cpuid = true;
+ cs = get_cpu_cache_intel (_SC_LEVEL1_ICACHE_SIZE, maxf);
+ if (cs != -1)
+ cache_size = cs;
+ cs = get_cpu_cache_intel (_SC_LEVEL1_DCACHE_SIZE, maxf);
+ if (cs != -1)
+ cache_size += cs;
}
else
- debug_printf ("processor does not support CPUID instruction");
+ cache_size = cs;
+ if (cache_size != -1)
+ cache_size >>= 10;
}
-
- if (!has_cpuid)
+ else if (is_amd)
{
- WCHAR vendor[64], id[64];
- UNICODE_STRING uvendor, uid;
- RtlInitEmptyUnicodeString (&uvendor, vendor, sizeof (vendor));
- RtlInitEmptyUnicodeString (&uid, id, sizeof (id));
- DWORD cpu_mhz = 0;
- RTL_QUERY_REGISTRY_TABLE tab[4] = {
- { NULL, RTL_QUERY_REGISTRY_NOEXPAND | RTL_QUERY_REGISTRY_DIRECT,
- L"VendorIdentifier", &uvendor, REG_NONE, NULL, 0 },
- { NULL, RTL_QUERY_REGISTRY_NOEXPAND | RTL_QUERY_REGISTRY_DIRECT,
- L"Identifier", &uid, REG_NONE, NULL, 0 },
- { NULL, RTL_QUERY_REGISTRY_DIRECT | RTL_QUERY_REGISTRY_NOSTRING,
- L"~Mhz", &cpu_mhz, REG_NONE, NULL, 0 },
- { NULL, 0, NULL, NULL, 0, NULL, 0 }
- };
+ extern long get_cpu_cache_amd (int sysc, uint32_t maxe);
+ long cs;
- RtlQueryRegistryValues (RTL_REGISTRY_ABSOLUTE, cpu_key, tab,
- NULL, NULL);
- bufptr += __small_sprintf (bufptr,
- "processor : %d\n"
- "vendor_id : %S\n"
- "identifier : %S\n"
- "cpu MHz : %u\n",
- cpu_number, &uvendor, &uid, cpu_mhz);
- print ("flags :");
- if (IsProcessorFeaturePresent (PF_3DNOW_INSTRUCTIONS_AVAILABLE))
- print (" 3dnow");
- if (IsProcessorFeaturePresent (PF_COMPARE_EXCHANGE_DOUBLE))
- print (" cx8");
- if (!IsProcessorFeaturePresent (PF_FLOATING_POINT_EMULATED))
- print (" fpu");
- if (IsProcessorFeaturePresent (PF_MMX_INSTRUCTIONS_AVAILABLE))
- print (" mmx");
- if (IsProcessorFeaturePresent (PF_PAE_ENABLED))
- print (" pae");
- if (IsProcessorFeaturePresent (PF_RDTSC_INSTRUCTION_AVAILABLE))
- print (" tsc");
- if (IsProcessorFeaturePresent (PF_XMMI_INSTRUCTIONS_AVAILABLE))
- print (" sse");
- if (IsProcessorFeaturePresent (PF_XMMI64_INSTRUCTIONS_AVAILABLE))
- print (" sse2");
+ cs = get_cpu_cache_amd (_SC_LEVEL3_CACHE_SIZE, maxe);
+ if (cs == -1)
+ cs = get_cpu_cache_amd (_SC_LEVEL2_CACHE_SIZE, maxe);
+ if (cs == -1)
+ {
+ cs = get_cpu_cache_amd (_SC_LEVEL1_ICACHE_SIZE, maxe);
+ if (cs != -1)
+ cache_size = cs;
+ cs = get_cpu_cache_amd (_SC_LEVEL1_DCACHE_SIZE, maxe);
+ if (cs != -1)
+ cache_size += cs;
+ }
+ else
+ cache_size = cs;
+ if (cache_size != -1)
+ cache_size >>= 10;
}
- else
+ bufptr += __small_sprintf (bufptr, "cpu family\t: %d\n"
+ "model\t\t: %d\n"
+ "model name\t: %s\n"
+ "stepping\t: %d\n"
+ "cpu MHz\t\t: %d.000\n",
+ family,
+ model,
+ in_buf.s + strspn (in_buf.s, " "),
+ stepping,
+ cpu_mhz);
+
+ if (cache_size >= 0)
+ bufptr += __small_sprintf (bufptr, "cache size\t: %d KB\n",
+ cache_size);
+
+ /* Recognize multi-core CPUs. */
+ if (features1 & (1 << 28)) /* HTT */
{
- DWORD cpu_mhz = 0;
- RTL_QUERY_REGISTRY_TABLE tab[2] = {
- { NULL, RTL_QUERY_REGISTRY_DIRECT | RTL_QUERY_REGISTRY_NOSTRING,
- L"~Mhz", &cpu_mhz, REG_NONE, NULL, 0 },
- { NULL, 0, NULL, NULL, 0, NULL, 0 }
- };
+ uint32_t siblings = 0;
+ uint32_t cpu_cores = 0;
+ uint32_t phys_id = 0;
+ uint32_t core_id = 0;
+ uint32_t initial_apic_id = apic_id;
+
+ uint32_t logical_bits = 0; /* # of logical core bits in apicid. */
+ uint32_t ht_bits = 0; /* # of thread bits in apic_id. */
- RtlQueryRegistryValues (RTL_REGISTRY_ABSOLUTE, cpu_key, tab,
- NULL, NULL);
- bufptr += __small_sprintf (bufptr, "processor\t: %d\n", cpu_number);
- unsigned maxf, vendor_id[4], unused;
- cpuid (&maxf, &vendor_id[0], &vendor_id[2], &vendor_id[1], 0);
- maxf &= 0xffff;
- vendor_id[3] = 0;
-
- /* Vendor identification. */
- bool is_amd = false, is_intel = false;
- if (!strcmp ((char*)vendor_id, "AuthenticAMD"))
- is_amd = true;
- else if (!strcmp ((char*)vendor_id, "GenuineIntel"))
- is_intel = true;
-
- bufptr += __small_sprintf (bufptr, "vendor_id\t: %s\n",
- (char *)vendor_id);
- if (maxf >= 1)
+ if (is_intel)
{
- unsigned features2, features1, extra_info, cpuid_sig;
- cpuid (&cpuid_sig, &extra_info, &features2, &features1, 1);
- /* unsigned extended_family = (cpuid_sig & 0x0ff00000) >> 20,
- extended_model = (cpuid_sig & 0x000f0000) >> 16,
- type = (cpuid_sig & 0x00003000) >> 12; */
- unsigned family = (cpuid_sig & 0x00000f00) >> 8,
- model = (cpuid_sig & 0x000000f0) >> 4,
- stepping = cpuid_sig & 0x0000000f;
- /* Not printed on Linux */
- //unsigned brand_id = extra_info & 0x0000000f;
- //unsigned cpu_count = (extra_info & 0x00ff0000) >> 16;
- unsigned apic_id = (extra_info & 0xff000000) >> 24;
- if (family == 15)
- family += (cpuid_sig >> 20) & 0xff;
- if (family >= 6)
- model += ((cpuid_sig >> 16) & 0x0f) << 4;
- unsigned maxe = 0;
- cpuid (&maxe, &unused, &unused, &unused, 0x80000000);
- if (maxe >= 0x80000004)
+ bool valid = false;
+ if (maxf >= 0x0000000b) /* topoext supported? */
{
- cpuid (&in_buf.m[0], &in_buf.m[1], &in_buf.m[2],
- &in_buf.m[3], 0x80000002);
- cpuid (&in_buf.m[4], &in_buf.m[5], &in_buf.m[6],
- &in_buf.m[7], 0x80000003);
- cpuid (&in_buf.m[8], &in_buf.m[9], &in_buf.m[10],
- &in_buf.m[11], 0x80000004);
- in_buf.m[12] = 0;
+ uint32_t bits, logical, level, unused;
+
+ /* Threads */
+ cpuid (&bits, &logical, &level, &unused,
+ 0x0000000b, 0x00);
+ /* Even if topoext is supposedly supported, it can return
+ "invalid". */
+ if (bits != 0 && ((level >> 8) & 0xff) == 1)
+ {
+ valid = true;
+ ht_bits = (bits & 0x1f);
+ siblings = (logical & 0xffff);
+ cpu_cores = siblings;
+ for (uint32_t idx = 1; ; ++idx)
+ {
+ cpuid (&bits, &logical, &level, &initial_apic_id,
+ 0x0000000b, idx);
+
+ uint32_t level_type = ((level >> 8) & 0xff);
+ if (level_type == 0) /* Invalid */
+ break;
+ if (level_type == 2) /* Core */
+ {
+ logical_bits = (bits & 0x1f);
+ siblings = (logical & 0xffff);
+ cpu_cores = siblings >> ht_bits;
+ break;
+ }
+ }
+ }
}
- else
+ if (!valid && maxf >= 0x00000004)
{
- /* Could implement a lookup table here if someone needs it. */
- strcpy (in_buf.s, "unknown");
+ uint32_t apic_reserved;
+
+ cpuid (&apic_reserved, &unused, &unused, &unused,
+ 0x00000004, 0x00);
+ if (apic_reserved & 0x1f)
+ {
+ valid = true;
+ cpu_cores = ((apic_reserved >> 26) & 0x3f) + 1;
+ siblings = (extra_info >> 16) & 0xff;
+ if (siblings <= 1) /* HT could be fused out */
+ {
+ logical_bits = mask_bits (cpu_cores);
+ ht_bits = 0;
+ }
+ else
+ {
+ logical_bits = mask_bits (siblings);
+ ht_bits = mask_bits (siblings / cpu_cores);
+ }
+ }
}
- int cache_size = -1,
- tlb_size = -1,
- clflush = 64,
- cache_alignment = 64;
- if (features1 & (1 << 19)) /* CLFSH */
- clflush = ((extra_info >> 8) & 0xff) << 3;
- if (is_intel && family == 15)
- cache_alignment = clflush * 2;
- if (maxe >= 0x80000005) /* L1 Cache and TLB Identifiers. */
+ if (!valid) /* single core, multi thread */
{
- unsigned data_cache, inst_cache;
- cpuid (&unused, &unused, &data_cache, &inst_cache,
- 0x80000005);
-
- cache_size = (inst_cache >> 24) + (data_cache >> 24);
- tlb_size = 0;
+ cpu_cores = 1;
+ siblings = (extra_info >> 16) & 0xff;
+ logical_bits = mask_bits (siblings);
+ ht_bits = logical_bits;
}
- if (maxe >= 0x80000006) /* L2 Cache and L2 TLB Identifiers. */
+ }
+ else if (is_amd)
+ {
+ if (maxe >= 0x8000001e)
{
- unsigned tlb, l2;
- cpuid (&unused, &tlb, &l2, &unused, 0x80000006);
+ uint32_t cus, core_info;
- cache_size = l2 >> 16;
- tlb_size = ((tlb >> 16) & 0xfff) + (tlb & 0xfff);
+ cpuid (&unused, &unused, &core_info, &unused, 0x80000008);
+ cpuid (&unused, &cus, &unused, &unused, 0x8000001e);
+ siblings = (core_info & 0xff) + 1;
+ logical_bits = (core_info >> 12) & 0xf;
+ cus = ((cus >> 8) & 0x3) + 1;
+ ht_bits = mask_bits (cus);
+ cpu_cores = siblings >> ht_bits;
}
- bufptr += __small_sprintf (bufptr, "cpu family\t: %d\n"
- "model\t\t: %d\n"
- "model name\t: %s\n"
- "stepping\t: %d\n"
- "cpu MHz\t\t: %d\n",
- family,
- model,
- in_buf.s + strspn (in_buf.s, " "),
- stepping,
- cpu_mhz);
- if (cache_size >= 0)
- bufptr += __small_sprintf (bufptr, "cache size\t: %d KB\n",
- cache_size);
-
- /* Recognize multi-core CPUs. */
- if (is_amd && maxe >= 0x80000008)
+ else if (maxe >= 0x80000008)
{
- unsigned core_info;
- cpuid (&unused, &unused, &core_info, &unused, 0x80000008);
+ uint32_t core_info;
- int max_cores = 1 + (core_info & 0xff);
- if (max_cores > 1)
- {
- int shift = (core_info >> 12) & 0x0f;
- if (!shift)
- while ((1 << shift) < max_cores)
- ++shift;
- int core_id = apic_id & ((1 << shift) - 1);
- apic_id >>= shift;
-
- bufptr += __small_sprintf (bufptr, "physical id\t: %d\n"
- "core id\t\t: %d\n"
- "cpu cores\t: %d\n",
- apic_id, core_id, max_cores);
- }
+ cpuid (&unused, &unused, &core_info, &unused, 0x80000008);
+ siblings = (core_info & 0xff) + 1;
+ cpu_cores = siblings;
+ logical_bits = (core_info >> 12) & 0xf;
+ if (!logical_bits)
+ logical_bits = mask_bits (siblings);
+ ht_bits = 0;
}
- /* Recognize Intel Hyper-Transport CPUs. */
- else if (is_intel && (features1 & (1 << 28)) && maxf >= 4)
+ else
{
- /* TODO */
+ siblings = (extra_info >> 16) & 0xff;
+ cpu_cores = siblings;
+ logical_bits = mask_bits (siblings);
+ ht_bits = 0;
}
+ }
+ phys_id = initial_apic_id >> logical_bits;
+ core_id = (initial_apic_id & ((1 << logical_bits) - 1)) >> ht_bits;
+
+ bufptr += __small_sprintf (bufptr, "physical id\t: %d\n", phys_id);
+ if (siblings > 0)
+ bufptr += __small_sprintf (bufptr, "siblings\t: %u\n", siblings);
+ bufptr += __small_sprintf (bufptr, "core id\t\t: %d\n"
+ "cpu cores\t: %d\n",
+ core_id, cpu_cores);
+ if (features1 & (1 << 9)) /* apic */
+ bufptr += __small_sprintf (bufptr, "apicid\t\t: %d\n"
+ "initial apicid\t: %d\n",
+ apic_id, initial_apic_id);
+
+ }
- bufptr += __small_sprintf (bufptr, "fpu\t\t: %s\n"
- "fpu_exception\t: %s\n"
- "cpuid level\t: %d\n"
- "wp\t\t: yes\n",
- (features1 & (1 << 0)) ? "yes" : "no",
- (features1 & (1 << 0)) ? "yes" : "no",
- maxf);
- print ("flags\t\t:");
- if (features1 & (1 << 0))
- print (" fpu");
- if (features1 & (1 << 1))
- print (" vme");
+ bufptr += __small_sprintf (bufptr, "fpu\t\t: %s\n"
+ "fpu_exception\t: %s\n"
+ "cpuid level\t: %d\n"
+ "wp\t\t: yes\n",
+ (features1 & (1 << 0)) ? "yes" : "no",
+ (features1 & (1 << 0)) ? "yes" : "no",
+ maxf);
+ print ("flags\t\t:");
+ if (features1 & (1 << 0))
+ print (" fpu");
+ if (features1 & (1 << 1))
+ print (" vme");
+ if (features1 & (1 << 2))
+ print (" de");
+ if (features1 & (1 << 3))
+ print (" pse");
+ if (features1 & (1 << 4))
+ print (" tsc");
+ if (features1 & (1 << 5))
+ print (" msr");
+ if (features1 & (1 << 6))
+ print (" pae");
+ if (features1 & (1 << 7))
+ print (" mce");
+ if (features1 & (1 << 8))
+ print (" cx8");
+ if (features1 & (1 << 9))
+ print (" apic");
+ if (features1 & (1 << 11))
+ print (" sep");
+ if (features1 & (1 << 12))
+ print (" mtrr");
+ if (features1 & (1 << 13))
+ print (" pge");
+ if (features1 & (1 << 14))
+ print (" mca");
+ if (features1 & (1 << 15))
+ print (" cmov");
+ if (features1 & (1 << 16))
+ print (" pat");
+ if (features1 & (1 << 17))
+ print (" pse36");
+ if (features1 & (1 << 18))
+ print (" pn");
+ if (features1 & (1 << 19))
+ print (" clflush");
+ if (is_intel && features1 & (1 << 21))
+ print (" dts");
+ if (is_intel && features1 & (1 << 22))
+ print (" acpi");
+ if (features1 & (1 << 23))
+ print (" mmx");
+ if (features1 & (1 << 24))
+ print (" fxsr");
+ if (features1 & (1 << 25))
+ print (" sse");
+ if (features1 & (1 << 26))
+ print (" sse2");
+ if (is_intel && (features1 & (1 << 27)))
+ print (" ss");
+ if (features1 & (1 << 28))
+ print (" ht");
+ if (is_intel)
+ {
+ if (features1 & (1 << 29))
+ print (" tm");
+ if (features1 & (1 << 30))
+ print (" ia64");
+ if (features1 & (1 << 31))
+ print (" pbe");
+ }
+
+ if (is_amd && maxe >= 0x80000001)
+ {
+ cpuid (&unused, &unused, &unused, &features1, 0x80000001);
+
+ if (features1 & (1 << 11))
+ print (" syscall");
+ if (features1 & (1 << 19)) /* Huh? Not in AMD64 specs. */
+ print (" mp");
+ if (features1 & (1 << 20))
+ print (" nx");
+ if (features1 & (1 << 22))
+ print (" mmxext");
+ if (features1 & (1 << 25))
+ print (" fxsr_opt");
+ if (features1 & (1 << 26))
+ print (" pdpe1gb");
+ if (features1 & (1 << 27))
+ print (" rdtscp");
+ if (features1 & (1 << 29))
+ print (" lm");
+ if (features1 & (1 << 30)) /* 31th bit is on. */
+ print (" 3dnowext");
+ if (features1 & (1 << 31)) /* 32th bit (highest) is on. */
+ print (" 3dnow");
+ }
+
+ if (features2 & (1 << 0))
+ print (" pni");
+ if (is_intel)
+ {
+ if (features2 & (1 << 2))
+ print (" dtes64");
+ if (features2 & (1 << 3))
+ print (" monitor");
+ if (features2 & (1 << 4))
+ print (" ds_cpl");
+ if (features2 & (1 << 5))
+ print (" vmx");
+ if (features2 & (1 << 6))
+ print (" smx");
+ if (features2 & (1 << 7))
+ print (" est");
+ if (features2 & (1 << 8))
+ print (" tm2");
+ if (features2 & (1 << 9))
+ print (" ssse3");
+ if (features2 & (1 << 10))
+ print (" cid");
+ if (features2 & (1 << 12))
+ print (" fma");
+ }
+ if (features2 & (1 << 13))
+ print (" cx16");
+ if (is_intel)
+ {
+ if (features2 & (1 << 14))
+ print (" xtpr");
+ if (features2 & (1 << 15))
+ print (" pdcm");
+ if (features2 & (1 << 18))
+ print (" dca");
+ if (features2 & (1 << 19))
+ print (" sse4_1");
+ if (features2 & (1 << 20))
+ print (" sse4_2");
+ if (features2 & (1 << 21))
+ print (" x2apic");
+ if (features2 & (1 << 22))
+ print (" movbe");
+ if (features2 & (1 << 23))
+ print (" popcnt");
+ if (features2 & (1 << 25))
+ print (" aes");
+ if (features2 & (1 << 26))
+ print (" xsave");
+ if (features2 & (1 << 27))
+ print (" osxsave");
+ if (features2 & (1 << 28))
+ print (" avx");
+ if (features2 & (1 << 29))
+ print (" f16c");
+ if (features2 & (1 << 30))
+ print (" rdrand");
+ if (features2 & (1 << 31))
+ print (" hypervisor");
+ }
+
+ if (maxe >= 0x80000001)
+ {
+ cpuid (&unused, &unused, &features1, &unused, 0x80000001);
+
+ if (features1 & (1 << 0))
+ print (" lahf_lm");
+ if (features1 & (1 << 1))
+ print (" cmp_legacy");
+ if (is_amd)
+ {
if (features1 & (1 << 2))
- print (" de");
+ print (" svm");
if (features1 & (1 << 3))
- print (" pse");
+ print (" extapic");
if (features1 & (1 << 4))
- print (" tsc");
+ print (" cr8_legacy");
if (features1 & (1 << 5))
- print (" msr");
+ print (" abm");
if (features1 & (1 << 6))
- print (" pae");
+ print (" sse4a");
if (features1 & (1 << 7))
- print (" mce");
+ print (" misalignsse");
if (features1 & (1 << 8))
- print (" cx8");
+ print (" 3dnowprefetch");
if (features1 & (1 << 9))
- print (" apic");
+ print (" osvw");
+ }
+ if (features1 & (1 << 10))
+ print (" ibs");
+ if (is_amd)
+ {
if (features1 & (1 << 11))
- print (" sep");
+ print (" sse5");
if (features1 & (1 << 12))
- print (" mtrr");
+ print (" skinit");
if (features1 & (1 << 13))
- print (" pge");
- if (features1 & (1 << 14))
- print (" mca");
+ print (" wdt");
if (features1 & (1 << 15))
- print (" cmov");
+ print (" lwp");
if (features1 & (1 << 16))
- print (" pat");
+ print (" fma4");
if (features1 & (1 << 17))
- print (" pse36");
- if (features1 & (1 << 18))
- print (" pn");
+ print (" tce");
if (features1 & (1 << 19))
- print (" clflush");
- if (is_intel && features1 & (1 << 21))
- print (" dts");
- if (is_intel && features1 & (1 << 22))
- print (" acpi");
+ print (" nodeid_msr");
+ if (features1 & (1 << 21))
+ print (" tbm");
+ if (features1 & (1 << 22))
+ print (" topoext");
if (features1 & (1 << 23))
- print (" mmx");
+ print (" perfctr_core");
if (features1 & (1 << 24))
- print (" fxsr");
- if (features1 & (1 << 25))
- print (" sse");
- if (features1 & (1 << 26))
- print (" sse2");
- if (is_intel && (features1 & (1 << 27)))
- print (" ss");
+ print (" perfctr_nb");
if (features1 & (1 << 28))
- print (" ht");
- if (is_intel)
- {
- if (features1 & (1 << 29))
- print (" tm");
- if (features1 & (1 << 30))
- print (" ia64");
- if (features1 & (1 << 31))
- print (" pbe");
- }
-
- if (is_amd && maxe >= 0x80000001)
- {
- unsigned features;
- cpuid (&unused, &unused, &unused, &features, 0x80000001);
-
- if (features & (1 << 11))
- print (" syscall");
- if (features & (1 << 19)) /* Huh? Not in AMD64 specs. */
- print (" mp");
- if (features & (1 << 20))
- print (" nx");
- if (features & (1 << 22))
- print (" mmxext");
- if (features & (1 << 25))
- print (" fxsr_opt");
- if (features & (1 << 26))
- print (" pdpe1gb");
- if (features & (1 << 27))
- print (" rdtscp");
- if (features & (1 << 29))
- print (" lm");
- if (features & (1 << 30)) /* 31th bit is on. */
- print (" 3dnowext");
- if (features & (1 << 31)) /* 32th bit (highest) is on. */
- print (" 3dnow");
- }
-
- if (features2 & (1 << 0))
- print (" pni");
- if (is_intel)
- {
- if (features2 & (1 << 2))
- print (" dtes64");
- if (features2 & (1 << 3))
- print (" monitor");
- if (features2 & (1 << 4))
- print (" ds_cpl");
- if (features2 & (1 << 5))
- print (" vmx");
- if (features2 & (1 << 6))
- print (" smx");
- if (features2 & (1 << 7))
- print (" est");
- if (features2 & (1 << 8))
- print (" tm2");
- if (features2 & (1 << 9))
- print (" ssse3");
- if (features2 & (1 << 10))
- print (" cid");
- if (features2 & (1 << 12))
- print (" fma");
- }
- if (features2 & (1 << 13))
- print (" cx16");
- if (is_intel)
- {
- if (features2 & (1 << 14))
- print (" xtpr");
- if (features2 & (1 << 15))
- print (" pdcm");
- if (features2 & (1 << 18))
- print (" dca");
- if (features2 & (1 << 19))
- print (" sse4_1");
- if (features2 & (1 << 20))
- print (" sse4_2");
- if (features2 & (1 << 21))
- print (" x2apic");
- if (features2 & (1 << 22))
- print (" movbe");
- if (features2 & (1 << 23))
- print (" popcnt");
- if (features2 & (1 << 25))
- print (" aes");
- if (features2 & (1 << 26))
- print (" xsave");
- if (features2 & (1 << 27))
- print (" osxsave");
- if (features2 & (1 << 28))
- print (" avx");
- }
+ print (" perfctr_l2");
+ }
+ }
+ if (is_intel) /* features scattered in various CPUID levels. */
+ {
+ cpuid (&features1, &unused, &features2, &unused, 0x06);
+
+ if (features1 & (1 << 1))
+ print (" ida");
+ if (features1 & (1 << 2))
+ print (" arat");
+ if (features2 & (1 << 3))
+ print (" epb");
+
+ cpuid (&features2, &unused, &unused, &unused, 0x0d, 1);
+ if (features2 & (1 << 0))
+ print (" xsaveopt");
+
+ if (features1 & (1 << 4))
+ print (" pln");
+ if (features1 & (1 << 6))
+ print (" pts");
+ if (features1 & (1 << 0))
+ print (" dtherm");
+ }
+ if (is_intel) /* Extended feature flags */
+ {
+ cpuid (&unused, &features1, &unused, &unused, 0x07, 0);
+
+ if (features1 & (1 << 0))
+ print (" fsgsbase");
+ if (features1 & (1 << 1))
+ print (" tsc_adjust");
+ if (features1 & (1 << 3))
+ print (" bmi1");
+ if (features1 & (1 << 4))
+ print (" hle");
+ if (features1 & (1 << 5))
+ print (" avx2");
+ if (features1 & (1 << 7))
+ print (" smep");
+ if (features1 & (1 << 8))
+ print (" bmi2");
+ if (features1 & (1 << 9))
+ print (" erms");
+ if (features1 & (1 << 10))
+ print (" invpcid");
+ if (features1 & (1 << 11))
+ print (" rtm");
+ if (features1 & (1 << 14))
+ print (" mpx");
+ if (features1 & (1 << 16))
+ print (" avx512f");
+ if (features1 & (1 << 18))
+ print (" rdseed");
+ if (features1 & (1 << 19))
+ print (" adx");
+ if (features1 & (1 << 20))
+ print (" smap");
+ if (features1 & (1 << 23))
+ print (" clflushopt");
+ if (features1 & (1 << 26))
+ print (" avx512pf");
+ if (features1 & (1 << 27))
+ print (" avx512er");
+ if (features1 & (1 << 28))
+ print (" avx512cd");
+ }
- if (maxe >= 0x80000001)
- {
- unsigned features;
- cpuid (&unused, &unused, &features, &unused, 0x80000001);
-
- if (features & (1 << 0))
- print (" lahf_lm");
- if (features & (1 << 1))
- print (" cmp_legacy");
- if (is_amd)
- {
- if (features & (1 << 2))
- print (" svm");
- if (features & (1 << 3))
- print (" extapic");
- if (features & (1 << 4))
- print (" cr8_legacy");
- if (features & (1 << 5))
- print (" abm");
- if (features & (1 << 6))
- print (" sse4a");
- if (features & (1 << 7))
- print (" misalignsse");
- if (features & (1 << 8))
- print (" 3dnowprefetch");
- if (features & (1 << 9))
- print (" osvw");
- }
- if (features & (1 << 10))
- print (" ibs");
- if (is_amd)
- {
- if (features & (1 << 11))
- print (" sse5");
- if (features & (1 << 12))
- print (" skinit");
- if (features & (1 << 13))
- print (" wdt");
- }
- }
+ print ("\n");
- print ("\n");
+ /* TODO: bogomips */
- /* TODO: bogomips */
+ bufptr += __small_sprintf (bufptr, "clflush size\t: %d\n"
+ "cache_alignment\t: %d\n",
+ clflush,
+ cache_alignment);
- if (tlb_size >= 0)
- bufptr += __small_sprintf (bufptr,
- "TLB size\t: %d 4K pages\n",
- tlb_size);
- bufptr += __small_sprintf (bufptr, "clflush size\t: %d\n"
- "cache_alignment\t: %d\n",
- clflush,
- cache_alignment);
+ if (maxe >= 0x80000008) /* Address size. */
+ {
+ uint32_t addr_size, phys, virt;
+ cpuid (&addr_size, &unused, &unused, &unused, 0x80000008);
+
+ phys = addr_size & 0xff;
+ virt = (addr_size >> 8) & 0xff;
+ /* Fix an errata on Intel CPUs */
+ if (is_intel && family == 15 && model == 3 && stepping == 4)
+ phys = 36;
+ bufptr += __small_sprintf (bufptr, "address sizes\t: "
+ "%u bits physical, "
+ "%u bits virtual\n",
+ phys, virt);
+ }
- if (maxe >= 0x80000008) /* Address size. */
- {
- unsigned addr_size, phys, virt;
- cpuid (&addr_size, &unused, &unused, &unused, 0x80000008);
-
- phys = addr_size & 0xff;
- virt = (addr_size >> 8) & 0xff;
- /* Fix an errata on Intel CPUs */
- if (is_intel && family == 15 && model == 3 && stepping == 4)
- phys = 36;
- bufptr += __small_sprintf (bufptr, "address sizes\t: "
- "%u bits physical, "
- "%u bits virtual\n",
- phys, virt);
- }
+ if (maxe >= 0x80000007) /* Advanced power management. */
+ {
+ cpuid (&unused, &unused, &unused, &features1, 0x80000007);
+
+ print ("power management:");
+ if (features1 & (1 << 0))
+ print (" ts");
+ if (features1 & (1 << 1))
+ print (" fid");
+ if (features1 & (1 << 2))
+ print (" vid");
+ if (features1 & (1 << 3))
+ print (" ttp");
+ if (features1 & (1 << 4))
+ print (" tm");
+ if (features1 & (1 << 5))
+ print (" stc");
+ if (features1 & (1 << 6))
+ print (" 100mhzsteps");
+ if (features1 & (1 << 7))
+ print (" hwpstate");
+ if (features1 & (1 << 9))
+ print (" cpb");
+ if (features1 & (1 << 10))
+ print (" eff_freq_ro");
+ }
- if (maxe >= 0x80000007) /* Advanced power management. */
- {
- cpuid (&unused, &unused, &unused, &features2, 0x80000007);
-
- print ("power management:");
- if (features2 & (1 << 0))
- print (" ts");
- if (features2 & (1 << 1))
- print (" fid");
- if (features2 & (1 << 2))
- print (" vid");
- if (features2 & (1 << 3))
- print (" ttp");
- if (features2 & (1 << 4))
- print (" tm");
- if (features2 & (1 << 5))
- print (" stc");
- if (features2 & (1 << 6))
- print (" 100mhzsteps");
- if (features2 & (1 << 7))
- print (" hwpstate");
- }
- }
+ if (orig_affinity_mask != 0)
+ {
+ if (wincap.has_processor_groups ())
+ SetThreadGroupAffinity (GetCurrentThread (), &orig_group_affinity,
+ NULL);
else
- {
- bufptr += __small_sprintf (bufptr, "cpu MHz : %d\n"
- "fpu : %s\n",
- cpu_mhz,
- IsProcessorFeaturePresent (PF_FLOATING_POINT_EMULATED) ? "no" : "yes");
- }
+ SetThreadAffinityMask (GetCurrentThread (), orig_affinity_mask);
}
- if (orig_affinity_mask != 0)
- SetThreadAffinityMask (GetCurrentThread (), orig_affinity_mask);
print ("\n");
}
@@ -1091,6 +1302,10 @@ format_proc_partitions (void *, char *&destbuf)
char *buf = tp.c_get ();
char *bufptr = buf;
char *ioctl_buf = tp.c_get ();
+ PWCHAR mp_buf = tp.w_get ();
+ WCHAR fpath[MAX_PATH];
+ WCHAR gpath[MAX_PATH];
+ DWORD len;
/* Open \Device object directory. */
wchar_t wpath[MAX_PATH] = L"\\Device";
@@ -1129,13 +1344,12 @@ format_proc_partitions (void *, char *&destbuf)
continue;
/* Got it. Now construct the path to the entire disk, which is
"\\Device\\HarddiskX\\Partition0", and open the disk with
- minimum permssions. */
+ minimum permissions. */
unsigned long drive_num = wcstoul (dbi->ObjectName.Buffer + 8, NULL, 10);
wcscpy (wpath, dbi->ObjectName.Buffer);
PWCHAR wpart = wpath + dbi->ObjectName.Length / sizeof (WCHAR);
- __small_swprintf (wpart, L"\\Partition0");
- upath.Length = dbi->ObjectName.Length
- + wcslen (wpart) * sizeof (WCHAR);
+ wcpcpy (wpart, L"\\Partition0");
+ upath.Length = dbi->ObjectName.Length + 22;
upath.MaximumLength = upath.Length + sizeof (WCHAR);
InitializeObjectAttributes (&attr, &upath, OBJ_CASE_INSENSITIVE,
dirhdl, NULL);
@@ -1149,7 +1363,7 @@ format_proc_partitions (void *, char *&destbuf)
}
if (!got_one)
{
- print ("major minor #blocks name\n\n");
+ print ("major minor #blocks name win-mounts\n\n");
got_one = true;
}
/* Fetch partition info for the entire disk to get its size. */
@@ -1218,9 +1432,27 @@ format_proc_partitions (void *, char *&destbuf)
if (part_num == 0)
continue;
dev.parsedisk (drive_num, part_num);
- bufptr += __small_sprintf (bufptr, "%5d %5d %9U %s\n",
+
+ bufptr += __small_sprintf (bufptr, "%5d %5d %9U %s",
dev.get_major (), dev.get_minor (),
size >> 10, dev.name + 5);
+ /* Check if the partition is mounted in Windows and, if so,
+ print the mount point list. */
+ __small_swprintf (fpath,
+ L"\\\\?\\GLOBALROOT\\Device\\%S\\Partition%u\\",
+ &dbi->ObjectName, part_num);
+ if (GetVolumeNameForVolumeMountPointW (fpath, gpath, MAX_PATH)
+ && GetVolumePathNamesForVolumeNameW (gpath, mp_buf,
+ NT_MAX_PATH, &len))
+ {
+ len = strlen (dev.name + 5);
+ while (len++ < 6)
+ *bufptr++ = ' ';
+ for (PWCHAR p = mp_buf; *p; p = wcschr (p, L'\0') + 1)
+ bufptr += __small_sprintf (bufptr, " %W", p);
+ }
+
+ *bufptr++ = '\n';
}
NtClose (devhdl);
}
@@ -1242,6 +1474,16 @@ format_proc_self (void *, char *&destbuf)
}
static off_t
+format_proc_cygdrive (void *, char *&destbuf)
+{
+ destbuf = (char *) crealloc_abort (destbuf, mount_table->cygdrive_len + 1);
+ char *dend = stpcpy (destbuf, mount_table->cygdrive);
+ if (dend > destbuf + 1) /* cygdrive != "/"? */
+ *--dend = '\0';
+ return dend - destbuf;
+}
+
+static off_t
format_proc_mounts (void *, char *&destbuf)
{
destbuf = (char *) crealloc_abort (destbuf, sizeof ("self/mounts"));
@@ -1270,8 +1512,6 @@ static off_t
format_proc_swaps (void *, char *&destbuf)
{
unsigned long long total = 0ULL, used = 0ULL;
- char *filename = NULL;
- ssize_t filename_len;
PSYSTEM_PAGEFILE_INFORMATION spi = NULL;
ULONG size = 512;
NTSTATUS status = STATUS_SUCCESS;
@@ -1301,17 +1541,13 @@ format_proc_swaps (void *, char *&destbuf)
if (spi && NT_SUCCESS (status))
{
PSYSTEM_PAGEFILE_INFORMATION spp = spi;
+ char *filename = tp.c_get ();
do
{
total = (unsigned long long) spp->CurrentSize * wincap.page_size ();
used = (unsigned long long) spp->TotalUsed * wincap.page_size ();
-
- filename_len = cygwin_conv_path (CCP_WIN_W_TO_POSIX,
- spp->FileName.Buffer, filename, 0);
- filename = (char *) malloc (filename_len);
cygwin_conv_path (CCP_WIN_W_TO_POSIX, spp->FileName.Buffer,
- filename, filename_len);
-
+ filename, NT_MAX_PATH);
bufptr += sprintf (bufptr, "%-40s%-16s%-8llu%-8llu%-8d\n",
filename, "file", total >> 10, used >> 10, 0);
}
diff --git a/winsup/cygwin/fhandler_process.cc b/winsup/cygwin/fhandler_process.cc
index 044757d74..064f7f9fd 100644
--- a/winsup/cygwin/fhandler_process.cc
+++ b/winsup/cygwin/fhandler_process.cc
@@ -1,8 +1,5 @@
/* fhandler_process.cc: fhandler for /proc/<pid> virtual filesystem
- Copyright 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012,
- 2013 Red Hat, Inc.
-
This file is part of Cygwin.
This software is a copyrighted work licensed under the terms of the
@@ -24,7 +21,6 @@ details. */
#include "cygheap.h"
#include "ntdll.h"
#include "cygtls.h"
-#include "pwdgrp.h"
#include "mount.h"
#include "tls_pbuf.h"
#include <sys/sysmacros.h>
@@ -78,7 +74,7 @@ static const virt_tab_t process_tab[] =
{ _VN ("uid"), FH_PROCESS, virt_file, format_process_uid },
{ _VN ("winexename"), FH_PROCESS, virt_file, format_process_winexename },
{ _VN ("winpid"), FH_PROCESS, virt_file, format_process_winpid },
- { NULL, 0, FH_NADA, virt_none, NULL }
+ { NULL, 0, FH_NADA, virt_none, NULL }
};
static const int PROCESS_LINK_COUNT =
@@ -112,11 +108,11 @@ fhandler_process::exists ()
fileid = entry - process_tab;
return entry->type;
}
- if (entry->type == virt_directory)
+ if (entry->type == virt_directory) /* fd subdir only */
{
fileid = entry - process_tab;
if (fill_filebuf ())
- return virt_symlink;
+ return fd_type;
/* Check for nameless device entries. */
path = strrchr (path, '/');
if (path && *++path)
@@ -231,9 +227,14 @@ fhandler_process::readdir (DIR *dir, dirent *de)
{
int *p = (int *) filebuf;
__small_sprintf (de->d_name, "%d", p[dir->__d_position++ - 2]);
+ de->d_type = DT_LNK;
}
else
- strcpy (de->d_name, process_tab[dir->__d_position++].name);
+ {
+ strcpy (de->d_name, process_tab[dir->__d_position].name);
+ de->d_type = virt_ftype_to_dtype (process_tab[dir->__d_position].type);
+ dir->__d_position++;
+ }
dir->__flags |= dirent_saw_dot | dirent_saw_dot_dot;
res = 0;
out:
@@ -321,6 +322,7 @@ out:
struct process_fd_t {
const char *path;
_pinfo *p;
+ virtual_ftype_t *fd_type;
};
bool
@@ -346,7 +348,7 @@ fhandler_process::fill_filebuf ()
{
if (process_tab[fileid].fhandler == FH_PROCESSFD)
{
- process_fd_t fd = { path, p };
+ process_fd_t fd = { path, p , &fd_type };
filesize = process_tab[fileid].format_func (&fd, filebuf);
}
else
@@ -362,20 +364,27 @@ format_process_fd (void *data, char *&destbuf)
_pinfo *p = ((process_fd_t *) data)->p;
const char *path = ((process_fd_t *) data)->path;
size_t fs = 0;
- char *fdp = strrchr (path, '/');
-
- if (!fdp || *++fdp == 'f') /* The "fd" directory itself. */
+ /* path looks like "$PID/fd", "$PID/fd/", "$PID/fd/[0-9]*". In the latter
+ case a trailing slash and more followup chars are allowed, provided the
+ descriptor symlink points to a directory. */
+ char *fdp = strchr (path, '/') + 3;
+ /* The "fd" directory itself? */
+ if (fdp[0] =='\0' || (fdp[0] == '/' && fdp[1] == '\0'))
{
if (destbuf)
cfree (destbuf);
destbuf = p->fds (fs);
+ *((process_fd_t *) data)->fd_type = virt_symlink;
}
else
{
+ char *e;
+ int fd;
+
if (destbuf)
cfree (destbuf);
- int fd = atoi (fdp);
- if (fd < 0 || (fd == 0 && !isdigit (*fdp)))
+ fd = strtol (++fdp, &e, 10);
+ if (fd < 0 || e == fdp || (*e != '/' && *e != '\0'))
{
set_errno (ENOENT);
return 0;
@@ -386,6 +395,17 @@ format_process_fd (void *data, char *&destbuf)
set_errno (ENOENT);
return 0;
}
+ if (*e == '\0')
+ *((process_fd_t *) data)->fd_type = virt_symlink;
+ else /* trailing path */
+ {
+ char *newbuf = (char *) cmalloc_abort (HEAP_STR, strlen (destbuf)
+ + strlen (e) + 1);
+ stpcpy (stpcpy (newbuf, destbuf), e);
+ cfree (destbuf);
+ destbuf = newbuf;
+ *((process_fd_t *) data)->fd_type = virt_fsdir;
+ }
}
return fs;
}
@@ -433,8 +453,13 @@ format_process_gid (void *data, char *&destbuf)
static off_t
format_process_ctty (void *data, char *&destbuf)
{
- device d;
_pinfo *p = (_pinfo *) data;
+ if (p->ctty < 0)
+ {
+ destbuf = (char *) crealloc_abort (destbuf, 2);
+ return __small_sprintf (destbuf, "\n");
+ }
+ device d;
d.parse (p->ctty);
destbuf = (char *) crealloc_abort (destbuf, strlen (d.name) + 2);
return __small_sprintf (destbuf, "%s\n", d.name);
@@ -512,7 +537,7 @@ format_process_exename (void *data, char *&destbuf)
stpcpy (buf, "<defunct>");
else
{
- mount_table->conv_to_posix_path (p->progname, buf, 1);
+ mount_table->conv_to_posix_path (p->progname, buf, CCP_RELATIVE);
len = strlen (buf);
if (len > 4)
{
@@ -540,9 +565,9 @@ format_process_winexename (void *data, char *&destbuf)
_pinfo *p = (_pinfo *) data;
size_t len = sys_wcstombs (NULL, 0, p->progname);
destbuf = (char *) crealloc_abort (destbuf, len + 1);
- sys_wcstombs (destbuf, len, p->progname);
- destbuf[len] = '\n';
- return len + 1;
+ /* With trailing \0 for backward compat reasons. */
+ sys_wcstombs (destbuf, len + 1, p->progname);
+ return len;
}
struct heap_info
@@ -564,7 +589,11 @@ struct heap_info
NTSTATUS status;
PDEBUG_HEAP_ARRAY harray;
- buf = RtlCreateQueryDebugBuffer (0, FALSE);
+ /* FIXME? RtlQueryProcessDebugInformation/CreateToolhelp32Snapshot both
+ crash the target process on 64 bit XP/2003 in native 64 bit mode. */
+ if (wincap.has_broken_rtl_query_process_debug_information ())
+ return;
+ buf = RtlCreateQueryDebugBuffer (16 * 65536, FALSE);
if (!buf)
return;
status = RtlQueryProcessDebugInformation (pid, PDI_HEAPS | PDI_HEAP_BLOCKS,
@@ -616,7 +645,7 @@ struct heap_info
stpcpy (p, "]");
return dest;
}
- return 0;
+ return NULL;
}
~heap_info ()
@@ -699,7 +728,8 @@ struct thread_info
{
*r = (region) { regions, (ULONG) (ULONG_PTR) thread[i].ClientId.UniqueThread,
(char *) tbi.TebBaseAddress,
- (char *) tbi.TebBaseAddress + wincap.page_size (),
+ (char *) tbi.TebBaseAddress
+ + 2 * wincap.page_size (),
true };
regions = r;
}
@@ -737,7 +767,18 @@ struct thread_info
stpcpy (p, "]");
return dest;
}
- return 0;
+ return NULL;
+ }
+ /* Helper to look for TEBs inside single allocated region since W10 1511. */
+ char *fill_if_match (char *start, char *dest)
+ {
+ for (region *r = regions; r; r = r->next)
+ if (r->teb && start == r->start)
+ {
+ __small_sprintf (dest, "[teb (tid %ld)]", r->thread_id);
+ return r->end;
+ }
+ return NULL;
}
~thread_info ()
@@ -793,6 +834,7 @@ format_process_maps (void *data, char *&destbuf)
char *abase;
char *rbase;
char *rend;
+ DWORD state;
} cur = {{{'\0'}}, (char *)1, 0, 0};
MEMORY_BASIC_INFORMATION mb;
@@ -806,6 +848,7 @@ format_process_maps (void *data, char *&destbuf)
PMEMORY_SECTION_NAME msi = (PMEMORY_SECTION_NAME) tp.w_get ();
char *posix_modname = tp.c_get ();
size_t maxsize = 0;
+ char *peb_teb_abase = NULL;
if (destbuf)
{
@@ -815,12 +858,7 @@ format_process_maps (void *data, char *&destbuf)
/* Iterate over each VM region in the address space, coalescing
memory regions with the same permissions. Once we run out, do one
- last_pass to trigger output of the last accumulated region.
-
- FIXME: 32 bit processes can't get address information beyond the
- 32 bit address space from 64 bit processes. We have to run
- this functionality in the target process, if the target
- process is 64 bit and our own process is 32 bit. */
+ last_pass to trigger output of the last accumulated region. */
for (char *i = 0;
VirtualQueryEx (proc, i, &mb, sizeof(mb)) || (1 == ++last_pass);
i = cur.rend)
@@ -856,7 +894,8 @@ format_process_maps (void *data, char *&destbuf)
region next = { a,
(char *) mb.AllocationBase,
(char *) mb.BaseAddress,
- (char *) mb.BaseAddress+mb.RegionSize
+ (char *) mb.BaseAddress+mb.RegionSize,
+ mb.State
};
/* Windows permissions are more fine-grained than the unix rwxp,
@@ -867,6 +906,57 @@ format_process_maps (void *data, char *&destbuf)
cur.rend = next.rend; /* merge with previous */
else
{
+ char *peb_teb_end = NULL;
+peb_teb_rinse_repeat:
+ /* Starting with W10 1511, PEB and TEBs don't get allocated
+ separately. Rather they are created in a single region. Examine
+ the region starting at the PEB address page-wise. */
+ if (wincap.has_new_pebteb_region ())
+ {
+ if (peb_teb_abase && !peb_teb_end && cur.abase == peb_teb_abase)
+ {
+ posix_modname[0] = '\0';
+ peb_teb_end = cur.rend;
+ if (cur.state == MEM_COMMIT)
+ cur.rend = cur.rbase + wincap.page_size ();
+ }
+ if (cur.state == MEM_COMMIT)
+ {
+ if (!peb_teb_abase && cur.rbase == (char *) peb)
+ {
+ peb_teb_abase = cur.abase;
+ peb_teb_end = cur.rend;
+ cur.rend = cur.rbase + wincap.page_size ();
+ strcpy (posix_modname, "[peb]");
+ }
+ else if (peb_teb_end)
+ {
+ char *end;
+ posix_modname[0] = '\0';
+ end = threads.fill_if_match (cur.rbase, posix_modname);
+
+ if (end)
+ cur.rend = end;
+ else
+ {
+ char *base = cur.rbase;
+ do
+ {
+ base += wincap.page_size ();
+ }
+ while (!threads.fill_if_match (base, posix_modname)
+ && base < peb_teb_end);
+ if (posix_modname[0])
+ {
+ posix_modname[0] = '\0';
+ cur.rend = base;
+ }
+ else
+ cur.rend = peb_teb_end;
+ }
+ }
+ }
+ }
/* output the current region if it's "interesting". */
if (cur.a.word)
{
@@ -887,10 +977,18 @@ format_process_maps (void *data, char *&destbuf)
len += written;
len += __small_sprintf (destbuf + len, "%s\n", posix_modname);
}
+
+ if (peb_teb_end && cur.state == MEM_COMMIT)
+ {
+ cur.rbase = cur.rend;
+ cur.rend += wincap.page_size ();
+ if (cur.rbase < peb_teb_end)
+ goto peb_teb_rinse_repeat;
+ }
/* start of a new region (but possibly still the same allocation). */
cur = next;
/* if a new allocation, figure out what kind it is. */
- if (newbase && !last_pass && mb.State != MEM_FREE)
+ if (newbase && !last_pass && cur.state != MEM_FREE)
{
/* If the return length pointer is missing, NtQueryVirtualMemory
returns with STATUS_ACCESS_VIOLATION on Windows 2000. */
@@ -942,7 +1040,6 @@ format_process_stat (void *data, char *&destbuf)
{
_pinfo *p = (_pinfo *) data;
char cmd[NAME_MAX + 1];
- WCHAR wcmd[NAME_MAX + 1];
int state = 'R';
unsigned long fault_count = 0UL,
utime = 0UL, stime = 0UL,
@@ -954,8 +1051,8 @@ format_process_stat (void *data, char *&destbuf)
else
{
PWCHAR last_slash = wcsrchr (p->progname, L'\\');
- wcscpy (wcmd, last_slash ? last_slash + 1 : p->progname);
- sys_wcstombs (cmd, NAME_MAX + 1, wcmd);
+ sys_wcstombs (cmd, NAME_MAX + 1,
+ last_slash ? last_slash + 1 : p->progname);
int len = strlen (cmd);
if (len > 4)
{
@@ -1066,14 +1163,13 @@ format_process_status (void *data, char *&destbuf)
{
_pinfo *p = (_pinfo *) data;
char cmd[NAME_MAX + 1];
- WCHAR wcmd[NAME_MAX + 1];
int state = 'R';
const char *state_str = "unknown";
- unsigned long vmsize = 0UL, vmrss = 0UL, vmdata = 0UL, vmlib = 0UL, vmtext = 0UL,
- vmshare = 0UL;
+ unsigned long vmsize = 0UL, vmrss = 0UL, vmdata = 0UL, vmlib = 0UL,
+ vmtext = 0UL, vmshare = 0UL;
+
PWCHAR last_slash = wcsrchr (p->progname, L'\\');
- wcscpy (wcmd, last_slash ? last_slash + 1 : p->progname);
- sys_wcstombs (cmd, NAME_MAX + 1, wcmd);
+ sys_wcstombs (cmd, NAME_MAX + 1, last_slash ? last_slash + 1 : p->progname);
int len = strlen (cmd);
if (len > 4)
{
@@ -1158,8 +1254,8 @@ format_process_statm (void *data, char *&destbuf)
&vmlib, &vmshare))
return 0;
destbuf = (char *) crealloc_abort (destbuf, 96);
- return __small_sprintf (destbuf, "%ld %ld %ld %ld %ld %ld %ld",
- vmsize, vmrss, vmshare, vmtext, vmlib, vmdata, 0);
+ return __small_sprintf (destbuf, "%ld %ld %ld %ld %ld %ld 0\n",
+ vmsize, vmrss, vmshare, vmtext, vmlib, vmdata);
}
extern "C" {
@@ -1341,9 +1437,6 @@ get_mem_values (DWORD dwProcessId, unsigned long *vmsize, unsigned long *vmrss,
PMEMORY_WORKING_SET_LIST p;
SIZE_T n = 0x4000, length;
- p = (PMEMORY_WORKING_SET_LIST) malloc (n);
- if (!p)
- return false;
hProcess = OpenProcess (PROCESS_QUERY_INFORMATION, FALSE, dwProcessId);
if (hProcess == NULL)
{
@@ -1351,6 +1444,9 @@ get_mem_values (DWORD dwProcessId, unsigned long *vmsize, unsigned long *vmrss,
debug_printf ("OpenProcess, %E");
return false;
}
+ p = (PMEMORY_WORKING_SET_LIST) malloc (n);
+ if (!p)
+ goto out;
while (true)
{
status = NtQueryVirtualMemory (hProcess, 0, MemoryWorkingSetList,
diff --git a/winsup/cygwin/fhandler_procnet.cc b/winsup/cygwin/fhandler_procnet.cc
index 73f06f637..8a81623d3 100644
--- a/winsup/cygwin/fhandler_procnet.cc
+++ b/winsup/cygwin/fhandler_procnet.cc
@@ -1,7 +1,5 @@
/* fhandler_procnet.cc: fhandler for /proc/net virtual filesystem
- Copyright 2007, 2008, 2009, 2010, 2011, 2012, 2013 Red Hat, Inc.
-
This file is part of Cygwin.
This software is a copyrighted work licensed under the terms of the
@@ -11,6 +9,13 @@ details. */
#define __INSIDE_CYGWIN_NET__
#define USE_SYS_TYPES_FD_SET
#include "winsup.h"
+#ifdef __x86_64__
+/* 2014-04-24: Current Mingw headers define sockaddr_in6 using u_long (8 byte)
+ because a redefinition for LP64 systems is missing. This leads to a wrong
+ definition and size of sockaddr_in6 when building with winsock headers. */
+#undef u_long
+#define u_long __ms_u_long
+#endif
#include <ws2tcpip.h>
#include <iphlpapi.h>
#include "cygerrno.h"
@@ -108,7 +113,9 @@ fhandler_procnet::readdir (DIR *dir, dirent *de)
if (procnet_tab[dir->__d_position].type == virt_file
&& !get_adapters_addresses (NULL, AF_INET6))
goto out;
- strcpy (de->d_name, procnet_tab[dir->__d_position++].name);
+ strcpy (de->d_name, procnet_tab[dir->__d_position].name);
+ de->d_type = virt_ftype_to_dtype (procnet_tab[dir->__d_position].type);
+ dir->__d_position++;
dir->__flags |= dirent_saw_dot | dirent_saw_dot_dot;
res = 0;
out:
diff --git a/winsup/cygwin/fhandler_procsys.cc b/winsup/cygwin/fhandler_procsys.cc
index 759712f04..e2aebd5b1 100644
--- a/winsup/cygwin/fhandler_procsys.cc
+++ b/winsup/cygwin/fhandler_procsys.cc
@@ -1,7 +1,5 @@
/* fhandler_procsys.cc: fhandler for native NT namespace.
- Copyright 2010, 2011, 2012, 2013 Red Hat, Inc.
-
This file is part of Cygwin.
This software is a copyrighted work licensed under the terms of the
@@ -177,30 +175,28 @@ fhandler_procsys::exists (struct stat *buf)
/* Don't call NtQueryInformationFile unless we know it's a safe type.
The call is known to crash machines, if the underlying driver is
badly written. */
- if (!NT_SUCCESS (status))
- {
- NtClose (h);
- return file_type;
- }
- if (ffdi.DeviceType == FILE_DEVICE_NETWORK_FILE_SYSTEM)
- file_type = virt_blk;
- else if (ffdi.DeviceType == FILE_DEVICE_NAMED_PIPE)
- file_type = internal ? virt_blk : virt_pipe;
- else if (ffdi.DeviceType == FILE_DEVICE_DISK
- || ffdi.DeviceType == FILE_DEVICE_CD_ROM
- || ffdi.DeviceType == FILE_DEVICE_DFS
- || ffdi.DeviceType == FILE_DEVICE_VIRTUAL_DISK)
+ if (NT_SUCCESS (status))
{
- /* Check for file attributes. If we get them, we peeked
- into a real FS through /proc/sys. */
- status = NtQueryInformationFile (h, &io, &fbi, sizeof fbi,
- FileBasicInformation);
- debug_printf ("NtQueryInformationFile: %y", status);
- if (!NT_SUCCESS (status))
+ if (ffdi.DeviceType == FILE_DEVICE_NETWORK_FILE_SYSTEM)
file_type = virt_blk;
- else
- file_type = (fbi.FileAttributes & FILE_ATTRIBUTE_DIRECTORY)
- ? virt_fsdir : virt_fsfile;
+ else if (ffdi.DeviceType == FILE_DEVICE_NAMED_PIPE)
+ file_type = internal ? virt_blk : virt_pipe;
+ else if (ffdi.DeviceType == FILE_DEVICE_DISK
+ || ffdi.DeviceType == FILE_DEVICE_CD_ROM
+ || ffdi.DeviceType == FILE_DEVICE_DFS
+ || ffdi.DeviceType == FILE_DEVICE_VIRTUAL_DISK)
+ {
+ /* Check for file attributes. If we get them, we peeked
+ into a real FS through /proc/sys. */
+ status = NtQueryInformationFile (h, &io, &fbi, sizeof fbi,
+ FileBasicInformation);
+ debug_printf ("NtQueryInformationFile: %y", status);
+ if (!NT_SUCCESS (status))
+ file_type = virt_blk;
+ else
+ file_type = (fbi.FileAttributes & FILE_ATTRIBUTE_DIRECTORY)
+ ? virt_fsdir : virt_fsfile;
+ }
}
NtClose (h);
}
@@ -360,7 +356,17 @@ fhandler_procsys::readdir (DIR *dir, dirent *de)
sys_wcstombs (de->d_name, NAME_MAX + 1, f.dbi.ObjectName.Buffer,
f.dbi.ObjectName.Length / sizeof (WCHAR));
de->d_ino = hash_path_name (get_ino (), de->d_name);
- de->d_type = 0;
+ if (RtlEqualUnicodeString (&f.dbi.ObjectTypeName, &ro_u_natdir,
+ FALSE))
+ de->d_type = DT_DIR;
+ else if (RtlEqualUnicodeString (&f.dbi.ObjectTypeName, &ro_u_natsyml,
+ FALSE))
+ de->d_type = DT_LNK;
+ else if (!RtlEqualUnicodeString (&f.dbi.ObjectTypeName, &ro_u_natdev,
+ FALSE))
+ de->d_type = DT_CHR;
+ else /* Can't nail down "Device" objects without further testing. */
+ de->d_type = DT_UNKNOWN;
res = 0;
}
}
diff --git a/winsup/cygwin/fhandler_procsysvipc.cc b/winsup/cygwin/fhandler_procsysvipc.cc
index 6c2aa4006..440771aeb 100644
--- a/winsup/cygwin/fhandler_procsysvipc.cc
+++ b/winsup/cygwin/fhandler_procsysvipc.cc
@@ -1,7 +1,5 @@
/* fhandler_procsysvipc.cc: fhandler for /proc/sysvipc virtual filesystem
- Copyright 2011, 2012, 2013 Red Hat, Inc.
-
This file is part of Cygwin.
This software is a copyrighted work licensed under the terms of the
@@ -24,7 +22,6 @@ details. */
#include "cygheap.h"
#include "ntdll.h"
#include "cygtls.h"
-#include "pwdgrp.h"
#include "tls_pbuf.h"
#include <sys/param.h>
#include <ctype.h>
@@ -72,7 +69,7 @@ fhandler_procsysvipc::exists ()
virt_tab_t *entry = virt_tab_search (path + 1, true, procsysvipc_tab,
PROCSYSVIPC_LINK_COUNT);
- cygserver_init();
+ cygserver_init ();
if (entry)
{
@@ -122,11 +119,13 @@ fhandler_procsysvipc::readdir (DIR *dir, dirent *de)
if (dir->__d_position >= PROCSYSVIPC_LINK_COUNT)
goto out;
{
- cygserver_init();
+ cygserver_init ();
if (cygserver_running != CYGSERVER_OK)
goto out;
}
- strcpy (de->d_name, procsysvipc_tab[dir->__d_position++].name);
+ strcpy (de->d_name, procsysvipc_tab[dir->__d_position].name);
+ de->d_type = virt_ftype_to_dtype (procsysvipc_tab[dir->__d_position].type);
+ dir->__d_position++;
dir->__flags |= dirent_saw_dot | dirent_saw_dot_dot;
res = 0;
out:
@@ -217,131 +216,177 @@ fhandler_procsysvipc::fill_filebuf ()
return false;
}
+#define MSG_HEADLINE " key msqid perms cbytes qnum lspid lrpid uid gid cuid cgid stime rtime ctime\n"
+
static off_t
format_procsysvipc_msg (void *, char *&destbuf)
{
- tmp_pathbuf tp;
- char *buf = tp.c_get ();
- char *bufptr = buf;
+ char *buf;
struct msginfo msginfo;
struct msqid_ds *xmsqids;
- size_t xmsqids_len;
msgctl (0, IPC_INFO, (struct msqid_ds *) &msginfo);
- xmsqids_len = sizeof (struct msqid_ds) * msginfo.msgmni;
- xmsqids = (struct msqid_ds *) malloc (xmsqids_len);
- msgctl (msginfo.msgmni, IPC_INFO, (struct msqid_ds *) xmsqids);
-
- bufptr += __small_sprintf (bufptr,
- " key msqid perms cbytes qnum lspid lrpid uid gid cuid cgid stime rtime ctime\n");
-
- for (int i = 0; i < msginfo.msgmni; i++) {
- if (xmsqids[i].msg_qbytes != 0) {
- bufptr += sprintf (bufptr,
- "%10llu %10u %5o %11u %10u %5d %5d %5u %5u %5u %5u %10ld %10ld %10ld\n",
- xmsqids[i].msg_perm.key,
- IXSEQ_TO_IPCID(i, xmsqids[i].msg_perm),
- xmsqids[i].msg_perm.mode,
- xmsqids[i].msg_cbytes,
- xmsqids[i].msg_qnum,
- xmsqids[i].msg_lspid,
- xmsqids[i].msg_lrpid,
- (unsigned) xmsqids[i].msg_perm.uid,
- (unsigned) xmsqids[i].msg_perm.gid,
- (unsigned) xmsqids[i].msg_perm.cuid,
- (unsigned) xmsqids[i].msg_perm.cgid,
- xmsqids[i].msg_stime,
- xmsqids[i].msg_rtime,
- xmsqids[i].msg_ctime);
+ /* Don't use tmp_pathbuf. The required buffer sizes can be up to 128K! */
+ xmsqids = (struct msqid_ds *) malloc (sizeof (struct msqid_ds)
+ * msginfo.msgmni);
+ if (!xmsqids)
+ return 0;
+ /* buf size = sizeof headline + 128 bytes per msg queue entry. */
+ buf = (char *) malloc (sizeof (MSG_HEADLINE) + msginfo.msgmni * 128);
+ if (!buf)
+ {
+ free (xmsqids);
+ return 0;
}
- }
- destbuf = (char *) crealloc_abort (destbuf, bufptr - buf);
- memcpy (destbuf, buf, bufptr - buf);
- return bufptr - buf;
+ char *bufptr = stpcpy (buf, MSG_HEADLINE);
+ msgctl (msginfo.msgmni, IPC_INFO, (struct msqid_ds *) xmsqids);
+ for (int i = 0; i < msginfo.msgmni; i++)
+ {
+ if (xmsqids[i].msg_qbytes != 0)
+ {
+ bufptr += sprintf (bufptr,
+ "%10llu %10u %5o %11u %10u %5d %5d %5u %5u %5u %5u "
+ "%10ld %10ld %10ld\n",
+ xmsqids[i].msg_perm.key,
+ IXSEQ_TO_IPCID(i, xmsqids[i].msg_perm),
+ xmsqids[i].msg_perm.mode,
+ xmsqids[i].msg_cbytes,
+ xmsqids[i].msg_qnum,
+ xmsqids[i].msg_lspid,
+ xmsqids[i].msg_lrpid,
+ (unsigned) xmsqids[i].msg_perm.uid,
+ (unsigned) xmsqids[i].msg_perm.gid,
+ (unsigned) xmsqids[i].msg_perm.cuid,
+ (unsigned) xmsqids[i].msg_perm.cgid,
+ xmsqids[i].msg_stime,
+ xmsqids[i].msg_rtime,
+ xmsqids[i].msg_ctime);
+ }
+ }
+
+ off_t size = bufptr - buf;
+ destbuf = (char *) crealloc_abort (destbuf, size);
+ memcpy (destbuf, buf, size);
+ free (buf);
+ free (xmsqids);
+ return size;
}
+#undef MSG_HEADLINE
+
+#define SEM_HEADLINE " key semid perms nsems uid gid cuid cgid otime ctime\n"
+
static off_t
format_procsysvipc_sem (void *, char *&destbuf)
{
- tmp_pathbuf tp;
- char *buf = tp.c_get ();
- char *bufptr = buf;
+ char *buf;
union semun semun;
struct seminfo seminfo;
struct semid_ds *xsemids;
- size_t xsemids_len;
semun.buf = (struct semid_ds *) &seminfo;
semctl (0, 0, IPC_INFO, semun);
- xsemids_len = sizeof (struct semid_ds) * seminfo.semmni;
- xsemids = (struct semid_ds *) malloc (xsemids_len);
+ /* Don't use tmp_pathbuf. The required buffer sizes can be up to 96K! */
+ xsemids = (struct semid_ds *) malloc (sizeof (struct semid_ds)
+ * seminfo.semmni);
+ if (!xsemids)
+ return 0;
+ /* buf size = sizeof headline + 96 bytes per semaphore entry. */
+ buf = (char *) malloc (sizeof (SEM_HEADLINE) + seminfo.semmni * 96);
+ if (!buf)
+ {
+ free (xsemids);
+ return 0;
+ }
+
+ char *bufptr = stpcpy (buf, SEM_HEADLINE);
semun.buf = xsemids;
semctl (seminfo.semmni, 0, IPC_INFO, semun);
-
- bufptr += __small_sprintf (bufptr,
- " key semid perms nsems uid gid cuid cgid otime ctime\n");
- for (int i = 0; i < seminfo.semmni; i++) {
- if ((xsemids[i].sem_perm.mode & SEM_ALLOC) != 0) {
- bufptr += sprintf (bufptr,
- "%10llu %10u %5o %10d %5u %5u %5u %5u %10ld %10ld\n",
- xsemids[i].sem_perm.key,
- IXSEQ_TO_IPCID(i, xsemids[i].sem_perm),
- xsemids[i].sem_perm.mode,
- xsemids[i].sem_nsems,
- (unsigned) xsemids[i].sem_perm.uid,
- (unsigned) xsemids[i].sem_perm.gid,
- (unsigned) xsemids[i].sem_perm.cuid,
- (unsigned) xsemids[i].sem_perm.cgid,
- xsemids[i].sem_otime,
- xsemids[i].sem_ctime);
+ for (int i = 0; i < seminfo.semmni; i++)
+ {
+ if ((xsemids[i].sem_perm.mode & SEM_ALLOC) != 0)
+ {
+ bufptr += sprintf (bufptr,
+ "%10llu %10u %5o %10d %5u %5u %5u %5u %10ld %10ld\n",
+ xsemids[i].sem_perm.key,
+ IXSEQ_TO_IPCID(i, xsemids[i].sem_perm),
+ xsemids[i].sem_perm.mode,
+ xsemids[i].sem_nsems,
+ (unsigned) xsemids[i].sem_perm.uid,
+ (unsigned) xsemids[i].sem_perm.gid,
+ (unsigned) xsemids[i].sem_perm.cuid,
+ (unsigned) xsemids[i].sem_perm.cgid,
+ xsemids[i].sem_otime,
+ xsemids[i].sem_ctime);
+ }
}
- }
- destbuf = (char *) crealloc_abort (destbuf, bufptr - buf);
- memcpy (destbuf, buf, bufptr - buf);
- return bufptr - buf;
+ off_t size = bufptr - buf;
+ destbuf = (char *) crealloc_abort (destbuf, size);
+ memcpy (destbuf, buf, size);
+ free (buf);
+ free (xsemids);
+ return size;
}
+#undef SEM_HEADLINE
+
+#define SHM_HEADLINE " key shmid perms size cpid lpid nattch uid gid cuid cgid atime dtime ctime\n"
+
static off_t
format_procsysvipc_shm (void *, char *&destbuf)
{
- tmp_pathbuf tp;
- char *buf = tp.c_get ();
- char *bufptr = buf;
+ char *buf;
struct shminfo shminfo;
struct shmid_ds *xshmids;
- size_t xshmids_len;
shmctl (0, IPC_INFO, (struct shmid_ds *) &shminfo);
- xshmids_len = sizeof (struct shmid_ds) * shminfo.shmmni;
- xshmids = (struct shmid_ds *) malloc (xshmids_len);
- shmctl (shminfo.shmmni, IPC_INFO, (struct shmid_ds *) xshmids);
-
- bufptr += __small_sprintf (bufptr,
- " key shmid perms size cpid lpid nattch uid gid cuid cgid atime dtime ctime\n");
- for (int i = 0; i < shminfo.shmmni; i++) {
- if (xshmids[i].shm_perm.mode & 0x0800) {
- bufptr += sprintf (bufptr,
- "%10llu %10u %5o %10u %5d %5d %6u %5u %5u %5u %5u %10ld %10ld %10ld\n",
- xshmids[i].shm_perm.key,
- IXSEQ_TO_IPCID(i, xshmids[i].shm_perm),
- xshmids[i].shm_perm.mode,
- xshmids[i].shm_segsz,
- xshmids[i].shm_cpid,
- xshmids[i].shm_lpid,
- xshmids[i].shm_nattch,
- (unsigned) xshmids[i].shm_perm.uid,
- (unsigned) xshmids[i].shm_perm.gid,
- (unsigned) xshmids[i].shm_perm.cuid,
- (unsigned) xshmids[i].shm_perm.cgid,
- xshmids[i].shm_atime,
- xshmids[i].shm_dtime,
- xshmids[i].shm_ctime);
- }
- }
+ /* Don't use tmp_pathbuf. The required buffer sizes can be up to 120K! */
+ xshmids = (struct shmid_ds *) malloc (sizeof (struct shmid_ds)
+ * shminfo.shmmni);
+ if (!xshmids)
+ return 0;
+ /* buf size = sizeof headline + 120 bytes per shmem entry. */
+ buf = (char *) malloc (sizeof (SHM_HEADLINE) + shminfo.shmmni * 120);
+ if (!buf)
+ {
+ free (xshmids);
+ return 0;
+ }
- destbuf = (char *) crealloc_abort (destbuf, bufptr - buf);
- memcpy (destbuf, buf, bufptr - buf);
- return bufptr - buf;
+ char *bufptr = stpcpy (buf, SHM_HEADLINE);
+ shmctl (shminfo.shmmni, IPC_INFO, (struct shmid_ds *) xshmids);
+ for (int i = 0; i < shminfo.shmmni; i++)
+ {
+ if (xshmids[i].shm_perm.mode & 0x0800)
+ {
+ bufptr += sprintf (bufptr,
+ "%10llu %10u %5o %10u %5d %5d %6u %5u %5u %5u %5u "
+ "%10ld %10ld %10ld\n",
+ xshmids[i].shm_perm.key,
+ IXSEQ_TO_IPCID(i, xshmids[i].shm_perm),
+ xshmids[i].shm_perm.mode,
+ xshmids[i].shm_segsz,
+ xshmids[i].shm_cpid,
+ xshmids[i].shm_lpid,
+ xshmids[i].shm_nattch,
+ (unsigned) xshmids[i].shm_perm.uid,
+ (unsigned) xshmids[i].shm_perm.gid,
+ (unsigned) xshmids[i].shm_perm.cuid,
+ (unsigned) xshmids[i].shm_perm.cgid,
+ xshmids[i].shm_atime,
+ xshmids[i].shm_dtime,
+ xshmids[i].shm_ctime);
+ }
+ }
+
+ off_t size = bufptr - buf;
+ destbuf = (char *) crealloc_abort (destbuf, size);
+ memcpy (destbuf, buf, size);
+ free (buf);
+ free (xshmids);
+ return size;
}
+
+#undef SHM_HEADLINE
diff --git a/winsup/cygwin/fhandler_random.cc b/winsup/cygwin/fhandler_random.cc
index 56c8d107f..af76a6614 100644
--- a/winsup/cygwin/fhandler_random.cc
+++ b/winsup/cygwin/fhandler_random.cc
@@ -1,9 +1,5 @@
/* fhandler_random.cc: code to access /dev/random and /dev/urandom
- Copyright 2000, 2001, 2002, 2003, 2004, 2005, 2007, 2009, 2011 Red Hat, Inc.
-
- Written by Corinna Vinschen (vinschen@cygnus.com)
-
This file is part of Cygwin.
This software is a copyrighted work licensed under the terms of the
@@ -12,6 +8,7 @@ details. */
#include "winsup.h"
#include <unistd.h>
+#include <sys/param.h>
#include "cygerrno.h"
#include "path.h"
#include "fhandler.h"
@@ -23,45 +20,12 @@ details. */
#define RANDOM 8
#define URANDOM 9
+/* The system PRNG is reseeded after reading 128K bytes. */
+#define RESEED_INTERVAL (128 * 1024)
+
#define PSEUDO_MULTIPLIER (6364136223846793005LL)
#define PSEUDO_SHIFTVAL (21)
-fhandler_dev_random::fhandler_dev_random ()
- : fhandler_base (), crypt_prov ((HCRYPTPROV) NULL)
-{
-}
-
-int
-fhandler_dev_random::open (int flags, mode_t)
-{
- set_flags ((flags & ~O_TEXT) | O_BINARY);
- nohandle (true);
- set_open_status ();
- dummy_offset = 0;
- return 1;
-}
-
-bool
-fhandler_dev_random::crypt_gen_random (void *ptr, size_t len)
-{
- if (!crypt_prov
- && !CryptAcquireContextW (&crypt_prov, NULL, MS_DEF_PROV_W, PROV_RSA_FULL,
- CRYPT_VERIFYCONTEXT | CRYPT_MACHINE_KEYSET)
- && !CryptAcquireContextW (&crypt_prov, NULL, MS_DEF_PROV_W, PROV_RSA_FULL,
- CRYPT_VERIFYCONTEXT | CRYPT_MACHINE_KEYSET
- | CRYPT_NEWKEYSET))
- {
- debug_printf ("%E = CryptAquireContext()");
- return false;
- }
- if (!CryptGenRandom (crypt_prov, len, (BYTE *)ptr))
- {
- debug_printf ("%E = CryptGenRandom()");
- return false;
- }
- return true;
-}
-
int
fhandler_dev_random::pseudo_write (const void *ptr, size_t len)
{
@@ -82,18 +46,15 @@ fhandler_dev_random::write (const void *ptr, size_t len)
return -1;
}
- /* Limit len to a value <= 512 since we don't want to overact.
+ /* Limit len to a value <= 4096 since we don't want to overact.
Copy to local buffer because CryptGenRandom violates const. */
- unsigned char buf[512];
- size_t limited_len = len <= 512 ? len : 512;
+ size_t limited_len = MIN (len, 4096);
+ unsigned char buf[limited_len];
memcpy (buf, ptr, limited_len);
/* Mess up system entropy source. Return error if device is /dev/random. */
- if (!crypt_gen_random (buf, limited_len) && dev () == FH_RANDOM)
- {
- __seterrno ();
- return -1;
- }
+ if (getentropy (buf, limited_len) && dev () == FH_RANDOM)
+ return -1;
/* Mess up the pseudo random number generator. */
pseudo_write (buf, limited_len);
return len;
@@ -127,64 +88,32 @@ fhandler_dev_random::read (void *ptr, size_t& len)
return;
}
- if (crypt_gen_random (ptr, len))
- return;
-
- /* If device is /dev/urandom, use pseudo number generator as fallback.
- Don't do this for /dev/random since it's intended for uses that need
- very high quality randomness. */
- if (dev () == FH_URANDOM)
- {
- len = pseudo_read (ptr, len);
- return;
- }
-
- __seterrno ();
- len = (size_t) -1;
-}
-
-off_t
-fhandler_dev_random::lseek (off_t off, int whence)
-{
- /* As on Linux, fake being able to set an offset. The fact that neither
- reading nor writing changes the dummy offset is also the same as on
- Linux (tested with kernel 2.6.23). */
- off_t new_off;
-
- switch (whence)
- {
- case SEEK_SET:
- new_off = off;
- break;
- case SEEK_CUR:
- new_off = dummy_offset + off;
- break;
- default:
- set_errno (EINVAL);
- return (off_t) -1;
- }
- if (new_off < 0)
+ /* /dev/random has to provide high quality random numbers. Therefore we
+ re-seed the system PRNG for each block of 512 bytes. This results in
+ sufficiently random sequences, comparable to the Linux /dev/random. */
+ if (dev () == FH_RANDOM)
{
- set_errno (EINVAL);
- return (off_t) -1;
+ void *dummy = malloc (RESEED_INTERVAL);
+ if (!dummy)
+ {
+ __seterrno ();
+ len = (size_t) -1;
+ return;
+ }
+ for (size_t offset = 0; offset < len; offset += 512)
+ {
+ if (getentropy (dummy, RESEED_INTERVAL) ||
+ getentropy ((PBYTE) ptr + offset, len - offset))
+ {
+ len = (size_t) -1;
+ break;
+ }
+ }
+ free (dummy);
}
- return dummy_offset = new_off;
-}
-
-int
-fhandler_dev_random::close ()
-{
- if (!have_execed && crypt_prov)
- while (!CryptReleaseContext (crypt_prov, 0)
- && GetLastError () == ERROR_BUSY)
- Sleep (10);
- return 0;
-}
-int
-fhandler_dev_random::dup (fhandler_base *child, int)
-{
- fhandler_dev_random *fhr = (fhandler_dev_random *) child;
- fhr->crypt_prov = (HCRYPTPROV)NULL;
- return 0;
+ /* If device is /dev/urandom, just use system RNG as is, with our own
+ PRNG as fallback. */
+ else if (getentropy (ptr, len))
+ len = pseudo_read (ptr, len);
}
diff --git a/winsup/cygwin/fhandler_raw.cc b/winsup/cygwin/fhandler_raw.cc
index 04f40f387..bd47b6010 100644
--- a/winsup/cygwin/fhandler_raw.cc
+++ b/winsup/cygwin/fhandler_raw.cc
@@ -1,8 +1,5 @@
/* fhandler_raw.cc. See fhandler.h for a description of the fhandler classes.
- Copyright 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2007, 2008, 2009, 2011,
- 2012, 2013 Red Hat, Inc.
-
This file is part of Cygwin.
This software is a copyrighted work licensed under the terms of the
@@ -105,8 +102,9 @@ fhandler_dev_raw::dup (fhandler_base *child, int flags)
}
void
-fhandler_dev_raw::fixup_after_fork (HANDLE)
+fhandler_dev_raw::fixup_after_fork (HANDLE parent)
{
+ fhandler_base::fixup_after_fork (parent);
devbufstart = 0;
devbufend = 0;
lastblk_to_read (false);
diff --git a/winsup/cygwin/fhandler_registry.cc b/winsup/cygwin/fhandler_registry.cc
index 10370550a..6c6702afd 100644
--- a/winsup/cygwin/fhandler_registry.cc
+++ b/winsup/cygwin/fhandler_registry.cc
@@ -1,8 +1,5 @@
/* fhandler_registry.cc: fhandler for /proc/registry virtual filesystem
- Copyright 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012,
- 2013 Red Hat, Inc.
-
This file is part of Cygwin.
This software is a copyrighted work licensed under the terms of the
@@ -87,7 +84,7 @@ fetch_hkey (int idx) /* idx *must* be valid */
if (registry_keys[idx] == HKEY_CLASSES_ROOT)
{
if (RegOpenUserClassesRoot (cygheap->user.issetuid ()
- ? cygheap->user.imp_token () : hProcImpToken,
+ ? cygheap->user.imp_token () : hProcToken,
0, KEY_READ, &key) == ERROR_SUCCESS)
return key;
}
@@ -96,6 +93,17 @@ fetch_hkey (int idx) /* idx *must* be valid */
if (RegOpenCurrentUser (KEY_READ, &key) == ERROR_SUCCESS)
return key;
}
+ else if (registry_keys[idx] == HKEY_CURRENT_CONFIG)
+ {
+ if (RegOpenKeyExW (HKEY_LOCAL_MACHINE,
+ L"System\\CurrentControlSet\\Hardware Profiles\\Current",
+ 0, KEY_READ, &key) == ERROR_SUCCESS)
+ return key;
+ }
+ /* Unfortunately there's no way to generate a valid OS registry key for
+ the other root keys. HKEY_USERS and HKEY_LOCAL_MACHINE are file
+ handles internally, HKEY_PERFORMANCE_DATA is just a bad hack and
+ no registry key at all. */
return registry_keys[idx];
}
@@ -275,7 +283,7 @@ multi_wcstombs (char *dst, size_t len, const wchar_t *src, size_t nwc)
while (nwc)
{
- siz = sys_wcstombs (dst, len, src, nwc);
+ siz = sys_wcstombs (dst, len, src, nwc) + 1;
sum += siz;
if (dst)
{
@@ -441,12 +449,12 @@ out:
void
fhandler_registry::set_name (path_conv &in_pc)
{
- if (strncasematch (in_pc.normalized_path, "/proc/registry32", 16))
+ if (strncasematch (in_pc.get_posix (), "/proc/registry32", 16))
{
wow64 = KEY_WOW64_32KEY;
prefix_len += 2;
}
- else if (strncasematch (in_pc.normalized_path, "/proc/registry64", 16))
+ else if (strncasematch (in_pc.get_posix (), "/proc/registry64", 16))
{
wow64 = KEY_WOW64_64KEY;
prefix_len += 2;
@@ -544,7 +552,8 @@ fhandler_registry::fstat (struct stat *buf)
else
buf->st_size = sys_wcstombs (NULL, 0,
(wchar_t *) tmpbuf,
- dwSize / sizeof (wchar_t));
+ dwSize / sizeof (wchar_t))
+ + 1;
if (tmpbuf)
free (tmpbuf);
}
@@ -575,8 +584,8 @@ fhandler_registry::fstat (struct stat *buf)
and it's also rather unlikely that the user is the owner.
Therefore it's probably most safe to assume unknown ownership
and no permissions for nobody. */
- buf->st_uid = UNKNOWN_UID;
- buf->st_gid = UNKNOWN_GID;
+ buf->st_uid = ILLEGAL_UID;
+ buf->st_gid = ILLEGAL_GID;
buf->st_mode &= ~0777;
}
}
@@ -820,7 +829,8 @@ fhandler_registry::open (int flags, mode_t mode)
set_io_handle (fetch_hkey (i));
/* Marking as nohandle allows to call dup on pseudo registry
handles. */
- nohandle (true);
+ if (get_handle () >= HKEY_CLASSES_ROOT)
+ nohandle (true);
flags |= O_DIROPEN;
goto success;
}
@@ -960,7 +970,7 @@ fhandler_registry::fill_filebuf ()
}
if (type == REG_SZ || type == REG_EXPAND_SZ || type == REG_LINK)
bufalloc = sys_wcstombs (NULL, 0, (wchar_t *) tmpbuf,
- size / sizeof (wchar_t));
+ size / sizeof (wchar_t)) + 1;
else if (type == REG_MULTI_SZ)
bufalloc = multi_wcstombs (NULL, 0, (wchar_t *) tmpbuf,
size / sizeof (wchar_t));
diff --git a/winsup/cygwin/fhandler_serial.cc b/winsup/cygwin/fhandler_serial.cc
index b6641e5e4..615b2513f 100644
--- a/winsup/cygwin/fhandler_serial.cc
+++ b/winsup/cygwin/fhandler_serial.cc
@@ -1,8 +1,5 @@
/* fhandler_serial.cc
- Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008, 2009, 2011, 2012 Red Hat, Inc.
-
This file is part of Cygwin.
This software is a copyrighted work licensed under the terms of the
diff --git a/winsup/cygwin/fhandler_socket.cc b/winsup/cygwin/fhandler_socket.cc
index b2a7f5c82..a2548589c 100644
--- a/winsup/cygwin/fhandler_socket.cc
+++ b/winsup/cygwin/fhandler_socket.cc
@@ -1,8 +1,5 @@
/* fhandler_socket.cc. See fhandler.h for a description of the fhandler classes.
- Copyright 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
- 2011, 2012, 2013 Red Hat, Inc.
-
This file is part of Cygwin.
This software is a copyrighted work licensed under the terms of the
@@ -14,9 +11,16 @@
#define __INSIDE_CYGWIN_NET__
#define USE_SYS_TYPES_FD_SET
-#define _BSDTYPES_DEFINED
#include "winsup.h"
-#undef _BSDTYPES_DEFINED
+#ifdef __x86_64__
+/* 2014-04-24: Current Mingw headers define sockaddr_in6 using u_long (8 byte)
+ because a redefinition for LP64 systems is missing. This leads to a wrong
+ definition and size of sockaddr_in6 when building with winsock headers.
+ This definition is also required to use the right u_long type in subsequent
+ function calls. */
+#undef u_long
+#define u_long __ms_u_long
+#endif
#include <ws2tcpip.h>
#include <mswsock.h>
#include <iphlpapi.h>
@@ -34,7 +38,7 @@
#include "wininfo.h"
#include <unistd.h>
#include <sys/param.h>
-#include <sys/acl.h>
+#include <cygwin/acl.h>
#include "cygtls.h"
#include <sys/un.h>
#include "ntdll.h"
@@ -48,8 +52,6 @@ extern "C" {
int sscanf (const char *, const char *, ...);
} /* End of "C" section */
-fhandler_dev_random* entropy_source;
-
static inline mode_t
adjust_socket_file_mode (mode_t mode)
{
@@ -91,9 +93,20 @@ get_inet_addr (const struct sockaddr *in, int inlen,
}
break;
case AF_INET:
+ memcpy (out, in, inlen);
+ *outlen = inlen;
+ /* If the peer address given in connect or sendto is the ANY address,
+ Winsock fails with WSAEADDRNOTAVAIL, while Linux converts that into
+ a connection/send attempt to LOOPBACK. We're doing the same here. */
+ if (((struct sockaddr_in *) out)->sin_addr.s_addr == htonl (INADDR_ANY))
+ ((struct sockaddr_in *) out)->sin_addr.s_addr = htonl (INADDR_LOOPBACK);
+ return 0;
case AF_INET6:
memcpy (out, in, inlen);
*outlen = inlen;
+ /* See comment in AF_INET case. */
+ if (IN6_IS_ADDR_UNSPECIFIED (&((struct sockaddr_in6 *) out)->sin6_addr))
+ ((struct sockaddr_in6 *) out)->sin6_addr = in6addr_loopback;
return 0;
default:
set_errno (EAFNOSUPPORT);
@@ -234,7 +247,7 @@ fhandler_socket::~fhandler_socket ()
char *
fhandler_socket::get_proc_fd_name (char *buf)
{
- __small_sprintf (buf, "socket:[%lu]", get_socket ());
+ __small_sprintf (buf, "socket:[%lu]", get_plain_ino ());
return buf;
}
@@ -378,12 +391,15 @@ fhandler_socket::af_local_send_cred ()
int
fhandler_socket::af_local_connect ()
{
- /* This keeps the test out of select. */
+ bool orig_async_io, orig_is_nonblocking;
+
if (get_addr_family () != AF_LOCAL || get_socket_type () != SOCK_STREAM)
return 0;
- debug_printf ("af_local_connect called");
- bool orig_async_io, orig_is_nonblocking;
+ debug_printf ("af_local_connect called, no_getpeereid=%d", no_getpeereid ());
+ if (no_getpeereid ())
+ return 0;
+
af_local_setblocking (orig_async_io, orig_is_nonblocking);
if (!af_local_send_secret () || !af_local_recv_secret ()
|| !af_local_send_cred () || !af_local_recv_cred ())
@@ -400,8 +416,12 @@ fhandler_socket::af_local_connect ()
int
fhandler_socket::af_local_accept ()
{
- debug_printf ("af_local_accept called");
bool orig_async_io, orig_is_nonblocking;
+
+ debug_printf ("af_local_accept called, no_getpeereid=%d", no_getpeereid ());
+ if (no_getpeereid ())
+ return 0;
+
af_local_setblocking (orig_async_io, orig_is_nonblocking);
if (!af_local_recv_secret () || !af_local_send_secret ()
|| !af_local_recv_cred () || !af_local_send_cred ())
@@ -416,6 +436,25 @@ fhandler_socket::af_local_accept ()
return 0;
}
+int
+fhandler_socket::af_local_set_no_getpeereid ()
+{
+ if (get_addr_family () != AF_LOCAL || get_socket_type () != SOCK_STREAM)
+ {
+ set_errno (EINVAL);
+ return -1;
+ }
+ if (connect_state () != unconnected)
+ {
+ set_errno (EALREADY);
+ return -1;
+ }
+
+ debug_printf ("no_getpeereid set");
+ no_getpeereid (true);
+ return 0;
+}
+
void
fhandler_socket::af_local_set_cred ()
{
@@ -440,30 +479,14 @@ fhandler_socket::af_local_copy (fhandler_socket *sock)
sock->sec_peer_pid = sec_peer_pid;
sock->sec_peer_uid = sec_peer_uid;
sock->sec_peer_gid = sec_peer_gid;
+ sock->no_getpeereid (no_getpeereid ());
}
void
fhandler_socket::af_local_set_secret (char *buf)
{
- if (!entropy_source)
- {
- void *buf = malloc (sizeof (fhandler_dev_random));
- entropy_source = new (buf) fhandler_dev_random ();
- entropy_source->dev () = *urandom_dev;
- }
- if (entropy_source &&
- !entropy_source->open (O_RDONLY))
- {
- delete entropy_source;
- entropy_source = NULL;
- }
- if (entropy_source)
- {
- size_t len = sizeof (connect_secret);
- entropy_source->read (connect_secret, len);
- if (len != sizeof (connect_secret))
- bzero ((char*) connect_secret, sizeof (connect_secret));
- }
+ if (getentropy (connect_secret, sizeof (connect_secret)))
+ bzero ((char*) connect_secret, sizeof (connect_secret));
__small_sprintf (buf, "%08x-%08x-%08x-%08x",
connect_secret [0], connect_secret [1],
connect_secret [2], connect_secret [3]);
@@ -474,8 +497,14 @@ fhandler_socket::af_local_set_secret (char *buf)
counted as one socket. */
#define NUM_SOCKS (32768 / sizeof (wsa_event))
-#define LOCK_EVENTS WaitForSingleObject (wsock_mtx, INFINITE)
-#define UNLOCK_EVENTS ReleaseMutex (wsock_mtx)
+#define LOCK_EVENTS \
+ if (wsock_mtx && \
+ WaitForSingleObject (wsock_mtx, INFINITE) != WAIT_FAILED) \
+ {
+
+#define UNLOCK_EVENTS \
+ ReleaseMutex (wsock_mtx); \
+ }
static wsa_event wsa_events[NUM_SOCKS] __attribute__((section (".cygwin_dll_common"), shared));
@@ -561,6 +590,7 @@ fhandler_socket::init_events ()
InterlockedIncrement (&socket_serial_number);
if (!new_serial_number) /* 0 is reserved for global mutex */
InterlockedIncrement (&socket_serial_number);
+ set_ino (new_serial_number);
RtlInitUnicodeString (&uname, sock_shared_name (name, new_serial_number));
InitializeObjectAttributes (&attr, &uname, OBJ_INHERIT | OBJ_OPENIF,
get_session_parent_dir (),
@@ -615,7 +645,35 @@ fhandler_socket::evaluate_events (const long event_mask, long &events,
wsock_events->events |= evts.lNetworkEvents;
events_now = (wsock_events->events & event_mask);
if (evts.lNetworkEvents & FD_CONNECT)
- wsock_events->connect_errorcode = evts.iErrorCode[FD_CONNECT_BIT];
+ {
+ wsock_events->connect_errorcode = evts.iErrorCode[FD_CONNECT_BIT];
+
+ /* Setting the connect_state and calling the AF_LOCAL handshake
+ here allows to handle this stuff from a single point. This
+ is independent of FD_CONNECT being requested. Consider a
+ server calling connect(2) and then immediately poll(2) with
+ only polling for POLLIN (example: postfix), or select(2) just
+ asking for descriptors ready to read.
+
+ Something weird occurs in Winsock: If you fork off and call
+ recv/send on the duplicated, already connected socket, another
+ FD_CONNECT event is generated in the child process. This
+ would trigger a call to af_local_connect which obviously fail.
+ Avoid this by calling set_connect_state only if connect_state
+ is connect_pending. */
+ if (connect_state () == connect_pending)
+ {
+ if (wsock_events->connect_errorcode)
+ connect_state (connect_failed);
+ else if (af_local_connect ())
+ {
+ wsock_events->connect_errorcode = WSAGetLastError ();
+ connect_state (connect_failed);
+ }
+ else
+ connect_state (connected);
+ }
+ }
UNLOCK_EVENTS;
if ((evts.lNetworkEvents & FD_OOB) && wsock_events->owner)
kill (wsock_events->owner, SIGURG);
@@ -628,9 +686,24 @@ fhandler_socket::evaluate_events (const long event_mask, long &events,
{
if (events & FD_CONNECT)
{
- int wsa_err = 0;
- if ((wsa_err = wsock_events->connect_errorcode) != 0)
+ int wsa_err = wsock_events->connect_errorcode;
+ if (wsa_err)
{
+ /* CV 2014-04-23: This is really weird. If you call connect
+ asynchronously on a socket and then select, an error like
+ "Connection refused" is set in the event and in the SO_ERROR
+ socket option. If you call connect, then dup, then select,
+ the error is set in the event, but not in the SO_ERROR socket
+ option, despite the dup'ed socket handle referring to the same
+ socket. We're trying to workaround this problem here by
+ taking the connect errorcode from the event and write it back
+ into the SO_ERROR socket option.
+
+ CV 2014-06-16: Call WSASetLastError *after* setsockopt since,
+ apparently, setsockopt sets the last WSA error code to 0 on
+ success. */
+ setsockopt (get_socket (), SOL_SOCKET, SO_ERROR,
+ (const char *) &wsa_err, sizeof wsa_err);
WSASetLastError (wsa_err);
ret = SOCKET_ERROR;
}
@@ -639,14 +712,21 @@ fhandler_socket::evaluate_events (const long event_mask, long &events,
wsock_events->events &= ~FD_CONNECT;
wsock_events->connect_errorcode = 0;
}
- /* This test makes the accept function behave as on Linux when
- accept is called on a socket for which shutdown for the read side
- has been called. The second half of this code is in the shutdown
- method. See there for more info. */
- if ((event_mask & FD_ACCEPT) && (events & FD_CLOSE))
+ /* This test makes accept/connect behave as on Linux when accept/connect
+ is called on a socket for which shutdown has been called. The second
+ half of this code is in the shutdown method. */
+ if (events & FD_CLOSE)
{
- WSASetLastError (WSAEINVAL);
- ret = SOCKET_ERROR;
+ if ((event_mask & FD_ACCEPT) && saw_shutdown_read ())
+ {
+ WSASetLastError (WSAEINVAL);
+ ret = SOCKET_ERROR;
+ }
+ if (event_mask & FD_CONNECT)
+ {
+ WSASetLastError (WSAECONNRESET);
+ ret = SOCKET_ERROR;
+ }
}
if (erase)
wsock_events->events &= ~(events & ~(FD_WRITE | FD_CLOSE));
@@ -663,7 +743,13 @@ fhandler_socket::wait_for_events (const long event_mask, const DWORD flags)
return 0;
int ret;
- long events;
+ long events = 0;
+
+ WSAEVENT ev[3] = { wsock_evt, NULL, NULL };
+ wait_signal_arrived here (ev[1]);
+ DWORD ev_cnt = 2;
+ if ((ev[2] = pthread::get_cancel_event ()) != NULL)
+ ++ev_cnt;
while (!(ret = evaluate_events (event_mask, events, !(flags & MSG_PEEK)))
&& !events)
@@ -674,13 +760,9 @@ fhandler_socket::wait_for_events (const long event_mask, const DWORD flags)
return SOCKET_ERROR;
}
- WSAEVENT ev[2] = { wsock_evt };
- set_signal_arrived here (ev[1]);
- switch (WSAWaitForMultipleEvents (2, ev, FALSE, 50, FALSE))
+ switch (WSAWaitForMultipleEvents (ev_cnt, ev, FALSE, 50, FALSE))
{
case WSA_WAIT_TIMEOUT:
- pthread_testcancel ();
- /*FALLTHRU*/
case WSA_WAIT_EVENT_0:
break;
@@ -690,20 +772,35 @@ fhandler_socket::wait_for_events (const long event_mask, const DWORD flags)
WSASetLastError (WSAEINTR);
return SOCKET_ERROR;
+ case WSA_WAIT_EVENT_0 + 2:
+ pthread::static_cancel_self ();
+ break;
+
default:
- WSASetLastError (WSAEFAULT);
+ /* wsock_evt can be NULL. We're generating the same errno values
+ as for sockets on which shutdown has been called. */
+ if (WSAGetLastError () != WSA_INVALID_HANDLE)
+ WSASetLastError (WSAEFAULT);
+ else
+ WSASetLastError ((event_mask & FD_CONNECT) ? WSAECONNRESET
+ : WSAEINVAL);
return SOCKET_ERROR;
}
}
-
return ret;
}
void
fhandler_socket::release_events ()
{
- NtClose (wsock_evt);
- NtClose (wsock_mtx);
+ HANDLE evt = wsock_evt;
+ HANDLE mtx = wsock_mtx;
+
+ LOCK_EVENTS;
+ wsock_evt = wsock_mtx = NULL;
+ } ReleaseMutex (mtx); /* == UNLOCK_EVENTS, but note using local mtx here. */
+ NtClose (evt);
+ NtClose (mtx);
}
/* Called from net.cc:fdsock() if a freshly created socket is not
@@ -837,8 +934,10 @@ fhandler_socket::fstat (struct stat *buf)
res = fhandler_base::fstat (buf);
if (!res)
{
- buf->st_dev = 0;
- buf->st_ino = (ino_t) ((uintptr_t) get_handle ());
+ buf->st_dev = FHDEV (DEV_TCP_MAJOR, 0);
+ if (!(buf->st_ino = get_plain_ino ()))
+ sscanf (get_name (), "/proc/%*d/fd/socket:[%lld]",
+ (long long *) &buf->st_ino);
buf->st_mode = S_IFSOCK | S_IRWXU | S_IRWXG | S_IRWXO;
buf->st_size = 0;
}
@@ -969,10 +1068,10 @@ fhandler_socket::bind (const struct sockaddr *name, int namelen)
sin.sin_port = ntohs (sin.sin_port);
debug_printf ("AF_LOCAL: socket bound to port %u", sin.sin_port);
- mode_t mode = adjust_socket_file_mode ((S_IRWXU | S_IRWXG | S_IRWXO)
- & ~cygheap->umask);
+ mode_t mode = S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH | S_IWOTH;
DWORD fattr = FILE_ATTRIBUTE_SYSTEM;
- if (!(mode & (S_IWUSR | S_IWGRP | S_IWOTH)) && !pc.has_acls ())
+ if (!pc.has_acls ()
+ && !(mode & ~cygheap->umask & (S_IWUSR | S_IWGRP | S_IWOTH)))
fattr |= FILE_ATTRIBUTE_READONLY;
SECURITY_ATTRIBUTES sa = sec_none_nih;
NTSTATUS status;
@@ -990,7 +1089,7 @@ fhandler_socket::bind (const struct sockaddr *name, int namelen)
I don't know what setting that is or how to recognize such a share,
so for now we don't request WRITE_DAC on remote drives. */
if (pc.has_acls () && !pc.isremote ())
- access |= READ_CONTROL | WRITE_DAC;
+ access |= READ_CONTROL | WRITE_DAC | WRITE_OWNER;
status = NtCreateFile (&fh, access, pc.get_object_attr (attr, sa), &io,
NULL, fattr, 0, FILE_CREATE,
@@ -1008,8 +1107,7 @@ fhandler_socket::bind (const struct sockaddr *name, int namelen)
else
{
if (pc.has_acls ())
- set_file_attribute (fh, pc, ILLEGAL_UID, ILLEGAL_GID,
- S_JUSTCREATED | mode);
+ set_created_file_access (fh, pc, mode);
char buf[sizeof (SOCKET_COOKIE) + 80];
__small_sprintf (buf, "%s%u %c ", SOCKET_COOKIE, sin.sin_port,
get_socket_type () == SOCK_STREAM ? 's'
@@ -1063,21 +1161,45 @@ out:
int
fhandler_socket::connect (const struct sockaddr *name, int namelen)
{
- bool in_progress = false;
struct sockaddr_storage sst;
- DWORD err;
- int type;
+ int type = 0;
if (get_inet_addr (name, namelen, &sst, &namelen, &type, connect_secret)
== SOCKET_ERROR)
return SOCKET_ERROR;
- if (get_addr_family () == AF_LOCAL && get_socket_type () != type)
+ if (get_addr_family () == AF_LOCAL)
{
- WSASetLastError (WSAEPROTOTYPE);
- set_winsock_errno ();
- return SOCKET_ERROR;
+ if (get_socket_type () != type)
+ {
+ WSASetLastError (WSAEPROTOTYPE);
+ set_winsock_errno ();
+ return SOCKET_ERROR;
+ }
+
+ set_peer_sun_path (name->sa_data);
+
+ /* Don't move af_local_set_cred into af_local_connect which may be called
+ via select, possibly running under another identity. Call early here,
+ because af_local_connect is called in wait_for_events. */
+ if (get_socket_type () == SOCK_STREAM)
+ af_local_set_cred ();
}
+
+ /* Initialize connect state to "connect_pending". State is ultimately set
+ to "connected" or "connect_failed" in wait_for_events when the FD_CONNECT
+ event occurs. Note that the underlying OS sockets are always non-blocking
+ and a successfully initiated non-blocking Winsock connect always returns
+ WSAEWOULDBLOCK. Thus it's safe to rely on event handling.
+
+ Check for either unconnected or connect_failed since in both cases it's
+ allowed to retry connecting the socket. It's also ok (albeit ugly) to
+ call connect to check if a previous non-blocking connect finished.
+
+ Set connect_state before calling connect, otherwise a race condition with
+ an already running select or poll might occur. */
+ if (connect_state () == unconnected || connect_state () == connect_failed)
+ connect_state (connect_pending);
int res = ::connect (get_socket (), (struct sockaddr *) &sst, namelen);
if (!is_nonblocking ()
@@ -1085,48 +1207,31 @@ fhandler_socket::connect (const struct sockaddr *name, int namelen)
&& WSAGetLastError () == WSAEWOULDBLOCK)
res = wait_for_events (FD_CONNECT | FD_CLOSE, 0);
- if (!res)
- err = 0;
- else
+ if (res)
{
- err = WSAGetLastError ();
- /* Special handling for connect to return the correct error code
- when called on a non-blocking socket. */
- if (is_nonblocking ())
- {
- if (err == WSAEWOULDBLOCK || err == WSAEALREADY)
- in_progress = true;
-
- if (err == WSAEWOULDBLOCK)
- WSASetLastError (err = WSAEINPROGRESS);
- }
- if (err == WSAEINVAL)
- WSASetLastError (err = WSAEISCONN);
+ DWORD err = WSAGetLastError ();
+
+ /* Some applications use the ugly technique to check if a non-blocking
+ connect succeeded by calling connect again, until it returns EISCONN.
+ This circumvents the event handling and connect_state is never set.
+ Thus we check for this situation here. */
+ if (err == WSAEISCONN)
+ connect_state (connected);
+ /* Winsock returns WSAEWOULDBLOCK if the non-blocking socket cannot be
+ conected immediately. Convert to POSIX/Linux compliant EINPROGRESS. */
+ else if (is_nonblocking () && err == WSAEWOULDBLOCK)
+ WSASetLastError (WSAEINPROGRESS);
+ /* Winsock returns WSAEINVAL if the socket is already a listener.
+ Convert to POSIX/Linux compliant EISCONN. */
+ else if (err == WSAEINVAL && connect_state () == listener)
+ WSASetLastError (WSAEISCONN);
+ /* Any other error except WSAEALREADY during connect_pending means the
+ connect failed. */
+ else if (connect_state () == connect_pending && err != WSAEALREADY)
+ connect_state (connect_failed);
set_winsock_errno ();
}
- if (get_addr_family () == AF_LOCAL && (!res || in_progress))
- set_peer_sun_path (name->sa_data);
-
- if (get_addr_family () == AF_LOCAL && get_socket_type () == SOCK_STREAM)
- {
- af_local_set_cred (); /* Don't move into af_local_connect since
- af_local_connect is called from select,
- possibly running under another identity. */
- if (!res && af_local_connect ())
- {
- set_winsock_errno ();
- return SOCKET_ERROR;
- }
- }
-
- if (err == WSAEINPROGRESS || err == WSAEALREADY)
- connect_state (connect_pending);
- else if (err)
- connect_state (connect_failed);
- else
- connect_state (connected);
-
return res;
}
@@ -1163,8 +1268,7 @@ fhandler_socket::listen (int backlog)
{
if (get_addr_family () == AF_LOCAL && get_socket_type () == SOCK_STREAM)
af_local_set_cred ();
- connect_state (connected);
- listener (true);
+ connect_state (listener); /* gets set to connected on accepted socket. */
}
else
set_winsock_errno ();
@@ -1178,7 +1282,17 @@ fhandler_socket::accept4 (struct sockaddr *peer, int *len, int flags)
struct sockaddr_storage lpeer;
int llen = sizeof (struct sockaddr_storage);
- int res = 0;
+ int res = (int) INVALID_SOCKET;
+
+ /* Windows event handling does not check for the validity of the desired
+ flags so we have to do it here. */
+ if (connect_state () != listener)
+ {
+ WSASetLastError (WSAEINVAL);
+ set_winsock_errno ();
+ goto out;
+ }
+
while (!(res = wait_for_events (FD_ACCEPT | FD_CLOSE, 0))
&& (res = ::accept (get_socket (), (struct sockaddr *) &lpeer, &llen))
== SOCKET_ERROR
@@ -1375,6 +1489,13 @@ fhandler_socket::recv_internal (LPWSAMSG wsamsg, bool use_recvmsg)
static NO_COPY LPFN_WSARECVMSG WSARecvMsg;
int orig_namelen = wsamsg->namelen;
+ /* CV 2014-10-26: Do not check for the connect_state at this point. In
+ certain scenarios there's no way to check the connect state reliably.
+ Example (hexchat): Parent process creates socket, forks, child process
+ calls connect, parent process calls read. Even if the event handling
+ allows to check for FD_CONNECT in the parent, there is always yet another
+ scenario we can easily break. */
+
DWORD wait_flags = wsamsg->dwFlags;
bool waitall = !!(wait_flags & MSG_WAITALL);
wsamsg->dwFlags &= (MSG_OOB | MSG_PEEK | MSG_DONTROUTE);
@@ -1647,8 +1768,8 @@ inline ssize_t
fhandler_socket::send_internal (struct _WSAMSG *wsamsg, int flags)
{
ssize_t res = 0;
- DWORD ret = 0, err = 0, sum = 0, off = 0;
- WSABUF buf;
+ DWORD ret = 0, err = 0, sum = 0;
+ WSABUF out_buf[wsamsg->dwBufferCount];
bool use_sendmsg = false;
DWORD wait_flags = flags & MSG_DONTWAIT;
bool nosignal = !!(flags & MSG_NOSIGNAL);
@@ -1656,19 +1777,45 @@ fhandler_socket::send_internal (struct _WSAMSG *wsamsg, int flags)
flags &= (MSG_OOB | MSG_DONTROUTE);
if (wsamsg->Control.len > 0)
use_sendmsg = true;
- for (DWORD i = 0; i < wsamsg->dwBufferCount;
- off >= wsamsg->lpBuffers[i].len && (++i, off = 0))
- {
- /* CV 2009-12-02: Don't split datagram messages. */
- /* FIXME: Look for a way to split a message into the least number of
- pieces to minimize the number of WsaSendTo calls. */
+ /* Workaround for MSDN KB 823764: Split a message into chunks <= SO_SNDBUF.
+ in_idx is the index of the current lpBuffers from the input wsamsg buffer.
+ in_off is used to keep track of the next byte to write from a wsamsg
+ buffer which only gets partially written. */
+ for (DWORD in_idx = 0, in_off = 0;
+ in_idx < wsamsg->dwBufferCount;
+ in_off >= wsamsg->lpBuffers[in_idx].len && (++in_idx, in_off = 0))
+ {
+ /* Split a message into the least number of pieces to minimize the
+ number of WsaSendTo calls. Don't split datagram messages (bad idea).
+ out_idx is the index of the next buffer in the out_buf WSABUF,
+ also the number of buffers given to WSASendTo.
+ out_len is the number of bytes in the buffers given to WSASendTo.
+ Don't split datagram messages (very bad idea). */
+ DWORD out_idx = 0;
+ DWORD out_len = 0;
if (get_socket_type () == SOCK_STREAM)
{
- buf.buf = wsamsg->lpBuffers[i].buf + off;
- buf.len = wsamsg->lpBuffers[i].len - off;
- /* See net.cc:fdsock() and MSDN KB 823764 */
- if (buf.len >= (unsigned) wmem ())
- buf.len = (unsigned) wmem ();
+ do
+ {
+ out_buf[out_idx].buf = wsamsg->lpBuffers[in_idx].buf + in_off;
+ out_buf[out_idx].len = wsamsg->lpBuffers[in_idx].len - in_off;
+ out_len += out_buf[out_idx].len;
+ out_idx++;
+ }
+ while (out_len < (unsigned) wmem ()
+ && (in_off = 0, ++in_idx < wsamsg->dwBufferCount));
+ /* Tweak len of the last out_buf buffer so the entire number of bytes
+ is (less than or) equal to wmem (). Fix out_len as well since it's
+ used in a subsequent test expression. */
+ if (out_len > (unsigned) wmem ())
+ {
+ out_buf[out_idx - 1].len -= out_len - (unsigned) wmem ();
+ out_len = (unsigned) wmem ();
+ }
+ /* Add the bytes written from the current last buffer to in_off,
+ so in_off points to the next byte to be written from that buffer,
+ or beyond which lets the outper loop skip to the next buffer. */
+ in_off += out_buf[out_idx - 1].len;
}
do
@@ -1676,7 +1823,7 @@ fhandler_socket::send_internal (struct _WSAMSG *wsamsg, int flags)
if (use_sendmsg)
res = WSASendMsg (get_socket (), wsamsg, flags, &ret, NULL, NULL);
else if (get_socket_type () == SOCK_STREAM)
- res = WSASendTo (get_socket (), &buf, 1, &ret, flags,
+ res = WSASendTo (get_socket (), out_buf, out_idx, &ret, flags,
wsamsg->name, wsamsg->namelen, NULL, NULL);
else
res = WSASendTo (get_socket (), wsamsg->lpBuffers,
@@ -1694,9 +1841,13 @@ fhandler_socket::send_internal (struct _WSAMSG *wsamsg, int flags)
if (!res)
{
- off += ret;
sum += ret;
- if (get_socket_type () != SOCK_STREAM)
+ /* For streams, return to application if the number of bytes written
+ is less than the number of bytes we intended to write in a single
+ call to WSASendTo. Otherwise we would have to add code to
+ backtrack in the input buffers, which is questionable. There was
+ probably a good reason we couldn't write more. */
+ if (get_socket_type () != SOCK_STREAM || ret < out_len)
break;
}
else if (is_nonblocking () || err != WSAEWOULDBLOCK)
@@ -2080,7 +2231,22 @@ fhandler_socket::ioctl (unsigned int cmd, void *p)
}
break;
}
+ /* From this point on we handle only ioctl commands which are understood by
+ Winsock. However, we have a problem, which is, the different size of
+ u_long in Windows and 64 bit Cygwin. This affects the definitions of
+ FIOASYNC, etc, because they are defined in terms of sizeof(u_long).
+ So we have to use case labels which are independent of the sizeof
+ u_long. Since we're redefining u_long at the start of this file to
+ matching Winsock's idea of u_long, we can use the real definitions in
+ calls to Windows. In theory we also have to make sure to convert the
+ different ideas of u_long between the application and Winsock, but
+ fortunately, the parameters defined as u_long pointers are on Linux
+ and BSD systems defined as int pointer, so the applications will
+ use a type of the expected size. Hopefully. */
case FIOASYNC:
+#ifdef __x86_64__
+ case _IOW('f', 125, u_long):
+#endif
res = WSAAsyncSelect (get_socket (), winmsg, WM_ASYNCIO,
*(int *) p ? ASYNC_MASK : 0);
syscall_printf ("Async I/O on socket %s",
@@ -2092,14 +2258,7 @@ fhandler_socket::ioctl (unsigned int cmd, void *p)
break;
case FIONREAD:
#ifdef __x86_64__
-/* FIXME: This looks broken in the Mingw64 headers. If I make sure
-to use the Windows u_long definition, I'd expect that it's defined
-as a 4 byte type on LP64 as well. But that's not the case right now.
-The *additional* type __ms_u_long is available on LP64, and that's
-used in subsequent function declarations, but that's not available
-on 32 bit or LLP64. The LP64-ness shouldn't require to use another
-type name in the application code. */
-#define u_long __ms_u_long
+ case _IOR('f', 127, u_long):
#endif
res = ioctlsocket (get_socket (), FIONREAD, (u_long *) p);
if (res == SOCKET_ERROR)
@@ -2108,6 +2267,11 @@ type name in the application code. */
default:
/* Sockets are always non-blocking internally. So we just note the
state here. */
+#ifdef __x86_64__
+ /* Convert the different idea of u_long in the definition of cmd. */
+ if (((cmd >> 16) & IOCPARM_MASK) == sizeof (unsigned long))
+ cmd = (cmd & ~(IOCPARM_MASK << 16)) | (sizeof (u_long) << 16);
+#endif
if (cmd == FIONBIO)
{
syscall_printf ("socket is now %sblocking",
@@ -2199,26 +2363,28 @@ fhandler_socket::getpeereid (pid_t *pid, uid_t *euid, gid_t *egid)
set_errno (EINVAL);
return -1;
}
- if (connect_state () != connected)
+ if (no_getpeereid ())
{
- set_errno (ENOTCONN);
+ set_errno (ENOTSUP);
return -1;
}
- if (sec_peer_pid == (pid_t) 0)
+ if (connect_state () != connected)
{
- set_errno (ENOTCONN); /* Usually when calling getpeereid on
- accepting (instead of accepted) socket. */
+ set_errno (ENOTCONN);
return -1;
}
- myfault efault;
- if (efault.faulted (EFAULT))
- return -1;
- if (pid)
- *pid = sec_peer_pid;
- if (euid)
- *euid = sec_peer_uid;
- if (egid)
- *egid = sec_peer_gid;
- return 0;
+ __try
+ {
+ if (pid)
+ *pid = sec_peer_pid;
+ if (euid)
+ *euid = sec_peer_uid;
+ if (egid)
+ *egid = sec_peer_gid;
+ return 0;
+ }
+ __except (EFAULT) {}
+ __endtry
+ return -1;
}
diff --git a/winsup/cygwin/fhandler_tape.cc b/winsup/cygwin/fhandler_tape.cc
index eb35f6599..9cfa2bbb3 100644
--- a/winsup/cygwin/fhandler_tape.cc
+++ b/winsup/cygwin/fhandler_tape.cc
@@ -1,9 +1,6 @@
/* fhandler_tape.cc. See fhandler.h for a description of the fhandler
classes.
- Copyright 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009,
- 2010, 2011, 2012, 2013 Red Hat, Inc.
-
This file is part of Cygwin.
This software is a copyrighted work licensed under the terms of the
@@ -977,159 +974,163 @@ mtinfo_drive::set_options (HANDLE mt, int32_t options)
int
mtinfo_drive::ioctl (HANDLE mt, unsigned int cmd, void *buf)
{
- myfault efault;
- if (efault.faulted ())
- return ERROR_NOACCESS;
- if (cmd == MTIOCTOP)
+ __try
{
- struct mtop *op = (struct mtop *) buf;
- if (lasterr == ERROR_BUS_RESET)
+ if (cmd == MTIOCTOP)
{
- /* If a bus reset occurs, block further access to this device
- until the user rewinds, unloads or in any other way tries
- to maintain a well-known tape position. */
- if (op->mt_op != MTREW && op->mt_op != MTOFFL
- && op->mt_op != MTRETEN && op->mt_op != MTERASE
- && op->mt_op != MTSEEK && op->mt_op != MTEOM)
- return ERROR_BUS_RESET;
- /* Try to maintain last lock state after bus reset. */
- if (lock >= auto_locked && PrepareTape (mt, TAPE_LOCK, FALSE))
+ struct mtop *op = (struct mtop *) buf;
+ if (lasterr == ERROR_BUS_RESET)
{
- debug_printf ("Couldn't relock drive after bus reset.");
- lock = unlocked;
+ /* If a bus reset occurs, block further access to this device
+ until the user rewinds, unloads or in any other way tries
+ to maintain a well-known tape position. */
+ if (op->mt_op != MTREW && op->mt_op != MTOFFL
+ && op->mt_op != MTRETEN && op->mt_op != MTERASE
+ && op->mt_op != MTSEEK && op->mt_op != MTEOM)
+ return ERROR_BUS_RESET;
+ /* Try to maintain last lock state after bus reset. */
+ if (lock >= auto_locked && PrepareTape (mt, TAPE_LOCK, FALSE))
+ {
+ debug_printf ("Couldn't relock drive after bus reset.");
+ lock = unlocked;
+ }
}
- }
- switch (op->mt_op)
- {
- case MTRESET:
- break;
- case MTFSF:
- set_pos (mt, TAPE_SPACE_FILEMARKS, op->mt_count, false);
- break;
- case MTBSF:
- set_pos (mt, TAPE_SPACE_FILEMARKS, -op->mt_count, false);
- break;
- case MTFSR:
- set_pos (mt, TAPE_SPACE_RELATIVE_BLOCKS, op->mt_count, false);
- break;
- case MTBSR:
- set_pos (mt, TAPE_SPACE_RELATIVE_BLOCKS, -op->mt_count, false);
- break;
- case MTWEOF:
- write_marks (mt, TAPE_FILEMARKS, op->mt_count);
- break;
- case MTREW:
- set_pos (mt, TAPE_REWIND, 0, false);
- break;
- case MTOFFL:
- case MTUNLOAD:
- prepare (mt, TAPE_UNLOAD);
- break;
- case MTNOP:
- lasterr = 0;
- break;
- case MTRETEN:
- if (!get_feature (TAPE_DRIVE_TENSION))
- lasterr = ERROR_INVALID_PARAMETER;
- else if (!set_pos (mt, TAPE_REWIND, 0, false))
- prepare (mt, TAPE_TENSION);
- break;
- case MTBSFM:
- set_pos (mt, TAPE_SPACE_FILEMARKS, -op->mt_count, true);
- break;
- case MTFSFM:
- set_pos (mt, TAPE_SPACE_FILEMARKS, op->mt_count, true);
- break;
- case MTEOM:
- if (fast_eom () && get_feature (TAPE_DRIVE_END_OF_DATA))
- set_pos (mt, TAPE_SPACE_END_OF_DATA, 0, false);
- else
- set_pos (mt, TAPE_SPACE_FILEMARKS, 32767, false);
- break;
- case MTERASE:
- erase (mt, TAPE_ERASE_LONG);
- break;
- case MTRAS1:
- case MTRAS2:
- case MTRAS3:
- lasterr = ERROR_INVALID_PARAMETER;
- break;
- case MTSETBLK:
- if (!get_feature (TAPE_DRIVE_SET_BLOCK_SIZE))
- {
- lasterr = ERROR_INVALID_PARAMETER;
+ switch (op->mt_op)
+ {
+ case MTRESET:
break;
- }
- if ((DWORD) op->mt_count == mp ()->BlockSize)
- {
- /* Nothing has changed. */
+ case MTFSF:
+ set_pos (mt, TAPE_SPACE_FILEMARKS, op->mt_count, false);
+ break;
+ case MTBSF:
+ set_pos (mt, TAPE_SPACE_FILEMARKS, -op->mt_count, false);
+ break;
+ case MTFSR:
+ set_pos (mt, TAPE_SPACE_RELATIVE_BLOCKS, op->mt_count, false);
+ break;
+ case MTBSR:
+ set_pos (mt, TAPE_SPACE_RELATIVE_BLOCKS, -op->mt_count, false);
+ break;
+ case MTWEOF:
+ write_marks (mt, TAPE_FILEMARKS, op->mt_count);
+ break;
+ case MTREW:
+ set_pos (mt, TAPE_REWIND, 0, false);
+ break;
+ case MTOFFL:
+ case MTUNLOAD:
+ prepare (mt, TAPE_UNLOAD);
+ break;
+ case MTNOP:
lasterr = 0;
break;
- }
- if ((op->mt_count == 0 && !get_feature (TAPE_DRIVE_VARIABLE_BLOCK))
- || (op->mt_count > 0
- && ((DWORD) op->mt_count < dp ()->MinimumBlockSize
- || (DWORD) op->mt_count > dp ()->MaximumBlockSize)))
- {
+ case MTRETEN:
+ if (!get_feature (TAPE_DRIVE_TENSION))
+ lasterr = ERROR_INVALID_PARAMETER;
+ else if (!set_pos (mt, TAPE_REWIND, 0, false))
+ prepare (mt, TAPE_TENSION);
+ break;
+ case MTBSFM:
+ set_pos (mt, TAPE_SPACE_FILEMARKS, -op->mt_count, true);
+ break;
+ case MTFSFM:
+ set_pos (mt, TAPE_SPACE_FILEMARKS, op->mt_count, true);
+ break;
+ case MTEOM:
+ if (fast_eom () && get_feature (TAPE_DRIVE_END_OF_DATA))
+ set_pos (mt, TAPE_SPACE_END_OF_DATA, 0, false);
+ else
+ set_pos (mt, TAPE_SPACE_FILEMARKS, 32767, false);
+ break;
+ case MTERASE:
+ erase (mt, TAPE_ERASE_LONG);
+ break;
+ case MTRAS1:
+ case MTRAS2:
+ case MTRAS3:
lasterr = ERROR_INVALID_PARAMETER;
break;
- }
- if (set_blocksize (mt, op->mt_count)
- && lasterr == ERROR_INVALID_FUNCTION)
- lasterr = ERROR_INVALID_BLOCK_LENGTH;
- break;
- case MTSEEK:
- if (get_feature (TAPE_DRIVE_LOGICAL_BLK))
- set_pos (mt, TAPE_LOGICAL_BLOCK, op->mt_count, false);
- else if (!get_pos (mt))
- set_pos (mt, TAPE_SPACE_RELATIVE_BLOCKS,
- op->mt_count - block, false);
- break;
- case MTTELL:
- if (!get_pos (mt))
- op->mt_count = (int) block;
- break;
- case MTFSS:
- set_pos (mt, TAPE_SPACE_SETMARKS, op->mt_count, false);
- break;
- case MTBSS:
- set_pos (mt, TAPE_SPACE_SETMARKS, -op->mt_count, false);
- break;
- case MTWSM:
- write_marks (mt, TAPE_SETMARKS, op->mt_count);
- break;
- case MTLOCK:
- prepare (mt, TAPE_LOCK);
- break;
- case MTUNLOCK:
- prepare (mt, TAPE_UNLOCK);
- break;
- case MTLOAD:
- prepare (mt, TAPE_LOAD);
- break;
- case MTCOMPRESSION:
- set_compression (mt, op->mt_count);
- break;
- case MTSETPART:
- set_partition (mt, op->mt_count);
- break;
- case MTMKPART:
- create_partitions (mt, op->mt_count);
- break;
- case MTSETDRVBUFFER:
- set_options (mt, op->mt_count);
- break;
- case MTSETDENSITY:
- default:
- lasterr = ERROR_INVALID_PARAMETER;
- break;
+ case MTSETBLK:
+ if (!get_feature (TAPE_DRIVE_SET_BLOCK_SIZE))
+ {
+ lasterr = ERROR_INVALID_PARAMETER;
+ break;
+ }
+ if ((DWORD) op->mt_count == mp ()->BlockSize)
+ {
+ /* Nothing has changed. */
+ lasterr = 0;
+ break;
+ }
+ if ((op->mt_count == 0 && !get_feature (TAPE_DRIVE_VARIABLE_BLOCK))
+ || (op->mt_count > 0
+ && ((DWORD) op->mt_count < dp ()->MinimumBlockSize
+ || (DWORD) op->mt_count > dp ()->MaximumBlockSize)))
+ {
+ lasterr = ERROR_INVALID_PARAMETER;
+ break;
+ }
+ if (set_blocksize (mt, op->mt_count)
+ && lasterr == ERROR_INVALID_FUNCTION)
+ lasterr = ERROR_INVALID_BLOCK_LENGTH;
+ break;
+ case MTSEEK:
+ if (get_feature (TAPE_DRIVE_LOGICAL_BLK))
+ set_pos (mt, TAPE_LOGICAL_BLOCK, op->mt_count, false);
+ else if (!get_pos (mt))
+ set_pos (mt, TAPE_SPACE_RELATIVE_BLOCKS,
+ op->mt_count - block, false);
+ break;
+ case MTTELL:
+ if (!get_pos (mt))
+ op->mt_count = (int) block;
+ break;
+ case MTFSS:
+ set_pos (mt, TAPE_SPACE_SETMARKS, op->mt_count, false);
+ break;
+ case MTBSS:
+ set_pos (mt, TAPE_SPACE_SETMARKS, -op->mt_count, false);
+ break;
+ case MTWSM:
+ write_marks (mt, TAPE_SETMARKS, op->mt_count);
+ break;
+ case MTLOCK:
+ prepare (mt, TAPE_LOCK);
+ break;
+ case MTUNLOCK:
+ prepare (mt, TAPE_UNLOCK);
+ break;
+ case MTLOAD:
+ prepare (mt, TAPE_LOAD);
+ break;
+ case MTCOMPRESSION:
+ set_compression (mt, op->mt_count);
+ break;
+ case MTSETPART:
+ set_partition (mt, op->mt_count);
+ break;
+ case MTMKPART:
+ create_partitions (mt, op->mt_count);
+ break;
+ case MTSETDRVBUFFER:
+ set_options (mt, op->mt_count);
+ break;
+ case MTSETDENSITY:
+ default:
+ lasterr = ERROR_INVALID_PARAMETER;
+ break;
+ }
}
+ else if (cmd == MTIOCGET)
+ get_status (mt, (struct mtget *) buf);
+ else if (cmd == MTIOCPOS && !get_pos (mt))
+ ((struct mtpos *) buf)->mt_blkno = (long) block;
}
- else if (cmd == MTIOCGET)
- get_status (mt, (struct mtget *) buf);
- else if (cmd == MTIOCPOS && !get_pos (mt))
- ((struct mtpos *) buf)->mt_blkno = (long) block;
-
+ __except (NO_ERROR)
+ {
+ lasterr = ERROR_NOACCESS;
+ }
+ __endtry
return lasterr;
}
@@ -1156,7 +1157,8 @@ fhandler_dev_tape::_lock (bool cancelable)
/* O_NONBLOCK is only valid in a read or write call. Only those are
cancelable. */
DWORD timeout = cancelable && is_nonblocking () ? 0 : INFINITE;
- switch (cygwait (mt_mtx, timeout, cw_sig | cw_cancel | cw_cancel_self))
+ switch (cygwait (mt_mtx, timeout,
+ cw_sig | cw_sig_restart | cw_cancel | cw_cancel_self))
{
case WAIT_OBJECT_0:
return true;
@@ -1368,6 +1370,11 @@ fhandler_dev_tape::raw_write (const void *ptr, size_t len)
off_t
fhandler_dev_tape::lseek (off_t offset, int whence)
{
+#if 1
+ /* On Linux lseek on tapes is a no-op. For now, let's keep the old code
+ intact but commented out, should incompatibilities arise. */
+ return 0;
+#else
struct mtop op;
struct mtpos pos;
DWORD block_size;
@@ -1426,6 +1433,7 @@ fhandler_dev_tape::lseek (off_t offset, int whence)
out:
return unlock (ret);
+#endif
}
int __reg2
diff --git a/winsup/cygwin/fhandler_termios.cc b/winsup/cygwin/fhandler_termios.cc
index fdf758918..8bbe301ad 100644
--- a/winsup/cygwin/fhandler_termios.cc
+++ b/winsup/cygwin/fhandler_termios.cc
@@ -1,8 +1,5 @@
/* fhandler_termios.cc
- Copyright 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2008, 2009, 2010,
- 2011, 2012 Red Hat, Inc.
-
This file is part of Cygwin.
This software is a copyrighted work licensed under the terms of the
@@ -39,21 +36,21 @@ fhandler_termios::tcinit (bool is_pty_master)
tc ()->ti.c_lflag = ISIG | ICANON | ECHO | IEXTEN;
tc ()->ti.c_cc[VDISCARD] = CFLUSH;
- tc ()->ti.c_cc[VEOL] = CEOL;
+ tc ()->ti.c_cc[VEOL] = CEOL;
tc ()->ti.c_cc[VEOL2] = CEOL2;
- tc ()->ti.c_cc[VEOF] = CEOF;
+ tc ()->ti.c_cc[VEOF] = CEOF;
tc ()->ti.c_cc[VERASE] = CERASE;
tc ()->ti.c_cc[VINTR] = CINTR;
tc ()->ti.c_cc[VKILL] = CKILL;
tc ()->ti.c_cc[VLNEXT] = CLNEXT;
- tc ()->ti.c_cc[VMIN] = 1;
+ tc ()->ti.c_cc[VMIN] = CMIN;
tc ()->ti.c_cc[VQUIT] = CQUIT;
tc ()->ti.c_cc[VREPRINT] = CRPRNT;
tc ()->ti.c_cc[VSTART] = CSTART;
tc ()->ti.c_cc[VSTOP] = CSTOP;
tc ()->ti.c_cc[VSUSP] = CSUSP;
tc ()->ti.c_cc[VSWTC] = CSWTCH;
- tc ()->ti.c_cc[VTIME] = 0;
+ tc ()->ti.c_cc[VTIME] = CTIME;
tc ()->ti.c_cc[VWERASE] = CWERASE;
tc ()->ti.c_ispeed = tc ()->ti.c_ospeed = B38400;
@@ -137,7 +134,7 @@ tty_min::kill_pgrp (int sig)
if (!p->exists () || p->ctty != ntty || p->pgid != pgid)
continue;
if (p == myself)
- killself = sig != __SIGSETPGRP;
+ killself = sig != __SIGSETPGRP && !exit_state;
else
sig_send (p, si);
}
@@ -193,9 +190,12 @@ fhandler_termios::bg_check (int sig)
return bg_eof;
}
+ threadlist_t *tl_entry;
+ tl_entry = cygheap->find_tls (_main_tls);
int sigs_ignored =
((void *) global_sigs[sig].sa_handler == (void *) SIG_IGN) ||
(_main_tls->sigmask & SIGTOMASK (sig));
+ cygheap->unlock_tls (tl_entry);
/* If the process is ignoring SIGTT*, then background IO is OK. If
the process is not ignoring SIGTT*, then the sig is to be sent to
@@ -234,7 +234,8 @@ fhandler_termios::echo_erase (int force)
}
line_edit_status
-fhandler_termios::line_edit (const char *rptr, int nread, termios& ti)
+fhandler_termios::line_edit (const char *rptr, size_t nread, termios& ti,
+ ssize_t *bytes_read)
{
line_edit_status ret = line_edit_ok;
char c;
@@ -242,11 +243,13 @@ fhandler_termios::line_edit (const char *rptr, int nread, termios& ti)
bool sawsig = false;
int iscanon = ti.c_lflag & ICANON;
+ if (bytes_read)
+ *bytes_read = nread;
while (nread-- > 0)
{
c = *rptr++;
- paranoid_printf ("char %0c", c);
+ paranoid_printf ("char %0o", c);
if (ti.c_iflag & ISTRIP)
c &= 0x7f;
@@ -370,13 +373,15 @@ fhandler_termios::line_edit (const char *rptr, int nread, termios& ti)
put_readahead (c);
if (ti.c_lflag & ECHO)
doecho (&c, 1);
- if (!iscanon || input_done)
+ /* Write in chunks of 32 bytes to reduce the number of WriteFile calls
+ in non-canonical mode. */
+ if ((!iscanon && ralen >= 32) || input_done)
{
int status = accept_input ();
if (status != 1)
{
ret = status ? line_edit_error : line_edit_pipe_full;
- eat_readahead (1);
+ nread += ralen;
break;
}
ret = line_edit_input_done;
@@ -384,8 +389,23 @@ fhandler_termios::line_edit (const char *rptr, int nread, termios& ti)
}
}
- if (!iscanon && ralen > 0)
- ret = line_edit_input_done;
+ /* If we didn't write all bytes in non-canonical mode, write them now. */
+ if (!iscanon && ralen > 0
+ && (ret == line_edit_ok || ret == line_edit_input_done))
+ {
+ int status = accept_input ();
+ if (status != 1)
+ {
+ ret = status ? line_edit_error : line_edit_pipe_full;
+ nread += ralen;
+ }
+ else
+ ret = line_edit_input_done;
+ }
+
+ /* Adding one compensates for the postdecrement in the above loop. */
+ if (bytes_read)
+ *bytes_read -= (nread + 1);
if (sawsig)
ret = line_edit_signalled;
diff --git a/winsup/cygwin/fhandler_tty.cc b/winsup/cygwin/fhandler_tty.cc
index 34c879503..95c47c491 100644
--- a/winsup/cygwin/fhandler_tty.cc
+++ b/winsup/cygwin/fhandler_tty.cc
@@ -1,8 +1,5 @@
/* fhandler_tty.cc
- Copyright 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007,
- 2008, 2009, 2010, 2011, 2012, 2013 Red Hat, Inc.
-
This file is part of Cygwin.
This software is a copyrighted work licensed under the terms of the
@@ -12,6 +9,7 @@ details. */
#include "winsup.h"
#include <stdlib.h>
#include <sys/param.h>
+#include <cygwin/acl.h>
#include <cygwin/kd.h>
#include "cygerrno.h"
#include "security.h"
@@ -42,6 +40,7 @@ struct pipe_request {
struct pipe_reply {
HANDLE from_master;
HANDLE to_master;
+ HANDLE to_master_cyg;
DWORD error;
};
@@ -145,10 +144,9 @@ fhandler_pty_common::__release_output_mutex (const char *fn, int ln)
void
fhandler_pty_master::doecho (const void *str, DWORD len)
{
- acquire_output_mutex (INFINITE);
- if (!WriteFile (to_master, str, len, &len, NULL))
- termios_printf ("Write to %p failed, %E", to_master);
- release_output_mutex ();
+ ssize_t towrite = len;
+ if (!process_opost_output (echo_w, str, towrite, true))
+ termios_printf ("Write to echo pipe failed, %E");
}
int
@@ -219,9 +217,9 @@ int
fhandler_pty_master::process_slave_output (char *buf, size_t len, int pktmode_on)
{
size_t rlen;
- char outbuf[OUT_BUFFER_SIZE + 1];
+ char outbuf[OUT_BUFFER_SIZE];
DWORD n;
- int column = 0;
+ DWORD echo_cnt;
int rc = 0;
flush_to_slave ();
@@ -229,43 +227,24 @@ fhandler_pty_master::process_slave_output (char *buf, size_t len, int pktmode_on
if (len == 0)
goto out;
- if (need_nl)
- {
- /* We need to return a left over \n character, resulting from
- \r\n conversion. Note that we already checked for FLUSHO and
- output_stopped at the time that we read the character, so we
- don't check again here. */
- if (buf)
- buf[0] = '\n';
- need_nl = 0;
- rc = 1;
- goto out;
- }
-
for (;;)
{
- /* Set RLEN to the number of bytes to read from the pipe. */
- rlen = len;
- if (get_ttyp ()->ti.c_oflag & OPOST && get_ttyp ()->ti.c_oflag & ONLCR)
- {
- /* We are going to expand \n to \r\n, so don't read more than
- half of the number of bytes requested. */
- rlen /= 2;
- if (rlen == 0)
- rlen = 1;
- }
- if (rlen > sizeof outbuf)
- rlen = sizeof outbuf;
-
- n = 0;
+ n = echo_cnt = 0;
for (;;)
{
- if (!bytes_available (n))
+ /* Check echo pipe first. */
+ if (::bytes_available (echo_cnt, echo_r) && echo_cnt > 0)
+ break;
+ if (!::bytes_available (n, get_io_handle_cyg ()))
goto err;
if (n)
break;
if (hit_eof ())
- goto out;
+ {
+ set_errno (EIO);
+ rc = -1;
+ goto out;
+ }
/* DISCARD (FLUSHO) and tcflush can finish here. */
if ((get_ttyp ()->ti.c_lflag & FLUSHO || !buf))
goto out;
@@ -287,75 +266,49 @@ fhandler_pty_master::process_slave_output (char *buf, size_t len, int pktmode_on
flush_to_slave ();
}
- if (!ReadFile (get_handle (), outbuf, rlen, &n, NULL))
- {
- termios_printf ("ReadFile failed, %E");
- goto err;
- }
-
- termios_printf ("bytes read %u", n);
- get_ttyp ()->write_error = 0;
-
- if (get_ttyp ()->ti.c_lflag & FLUSHO || !buf)
- continue;
+ /* Set RLEN to the number of bytes to read from the pipe. */
+ rlen = len;
char *optr;
optr = buf;
- if (pktmode_on)
- *optr++ = TIOCPKT_DATA;
-
- if (!(get_ttyp ()->ti.c_oflag & OPOST)) // post-process output
+ if (pktmode_on && buf)
{
- memcpy (optr, outbuf, n);
- optr += n;
+ *optr++ = TIOCPKT_DATA;
+ rlen -= 1;
}
- else // raw output mode
- {
- char *iptr = outbuf;
- while (n--)
- {
- switch (*iptr)
- {
- case '\r':
- if ((get_ttyp ()->ti.c_oflag & ONOCR) && column == 0)
- {
- iptr++;
- continue;
- }
- if (get_ttyp ()->ti.c_oflag & OCRNL)
- *iptr = '\n';
- else
- column = 0;
- break;
- case '\n':
- if (get_ttyp ()->ti.c_oflag & ONLCR)
- {
- *optr++ = '\r';
- column = 0;
- }
- if (get_ttyp ()->ti.c_oflag & ONLRET)
- column = 0;
- break;
- default:
- column++;
- break;
- }
+ if (rlen == 0)
+ {
+ rc = optr - buf;
+ goto out;
+ }
- /* Don't store data past the end of the user's buffer. This
- can happen if the user requests a read of 1 byte when
- doing \r\n expansion. */
- if (optr - buf >= (int) len)
- {
- if (*iptr != '\n' || n != 0)
- system_printf ("internal error: %u unexpected characters", n);
- need_nl = 1;
- break;
- }
+ if (rlen > sizeof outbuf)
+ rlen = sizeof outbuf;
- *optr++ = *iptr++;
+ /* If echo pipe has data (something has been typed or pasted), prefer
+ it over slave output. */
+ if (echo_cnt > 0)
+ {
+ if (!ReadFile (echo_r, outbuf, rlen, &n, NULL))
+ {
+ termios_printf ("ReadFile on echo pipe failed, %E");
+ goto err;
}
}
+ else if (!ReadFile (get_io_handle_cyg (), outbuf, rlen, &n, NULL))
+ {
+ termios_printf ("ReadFile failed, %E");
+ goto err;
+ }
+
+ termios_printf ("bytes read %u", n);
+
+ if (get_ttyp ()->ti.c_lflag & FLUSHO || !buf)
+ continue;
+
+ memcpy (optr, outbuf, n);
+ optr += n;
rc = optr - buf;
break;
@@ -378,7 +331,7 @@ out:
/* pty slave stuff */
fhandler_pty_slave::fhandler_pty_slave (int unit)
- : fhandler_pty_common (), inuse (NULL)
+ : fhandler_pty_common (), inuse (NULL), output_handle_cyg (NULL)
{
if (unit >= 0)
dev ().parse (DEV_PTYS_MAJOR, unit);
@@ -387,11 +340,11 @@ fhandler_pty_slave::fhandler_pty_slave (int unit)
int
fhandler_pty_slave::open (int flags, mode_t)
{
- HANDLE pty_owner, from_master_local, to_master_local;
+ HANDLE pty_owner, from_master_local, to_master_local, to_master_cyg_local;
HANDLE *handles[] =
{
&from_master_local, &input_available_event, &input_mutex, &inuse,
- &output_mutex, &to_master_local, &pty_owner,
+ &output_mutex, &to_master_local, &pty_owner, &to_master_cyg_local,
NULL
};
@@ -433,7 +386,7 @@ fhandler_pty_slave::open (int flags, mode_t)
sd.malloc (sizeof (SECURITY_DESCRIPTOR));
RtlCreateSecurityDescriptor (sd, SECURITY_DESCRIPTOR_REVISION);
SECURITY_ATTRIBUTES sa = { sizeof (SECURITY_ATTRIBUTES), NULL, TRUE };
- if (!create_object_sd_from_attribute (NULL, myself->uid, myself->gid,
+ if (!create_object_sd_from_attribute (myself->uid, myself->gid,
S_IFCHR | S_IRUSR | S_IWUSR | S_IWGRP,
sd))
sa.lpSecurityDescriptor = (PSECURITY_DESCRIPTOR) sd;
@@ -443,19 +396,14 @@ fhandler_pty_slave::open (int flags, mode_t)
release_output_mutex ();
}
- if (!get_ttyp ()->from_master () || !get_ttyp ()->to_master ())
+ if (!get_ttyp ()->from_master () ||
+ !get_ttyp ()->to_master () || !get_ttyp ()->to_master_cyg ())
{
errmsg = "pty handles have been closed";
set_errno (EACCES);
goto err_no_errno;
}
- if (get_ttyp ()->is_master_closed ())
- {
- errmsg = "*** master is closed";
- set_errno (EAGAIN);
- goto err_no_errno;
- }
/* Three case for duplicating the pipe handles:
- Either we're the master. In this case, just duplicate the handles.
- Or, we have the right to open the master process for handle duplication.
@@ -500,6 +448,13 @@ fhandler_pty_slave::open (int flags, mode_t)
errmsg = "can't duplicate output, %E";
goto err;
}
+ if (!DuplicateHandle (pty_owner, get_ttyp ()->to_master_cyg (),
+ GetCurrentProcess (), &to_master_cyg_local, 0, TRUE,
+ DUPLICATE_SAME_ACCESS))
+ {
+ errmsg = "can't duplicate output for cygwin, %E";
+ goto err;
+ }
if (pty_owner != GetCurrentProcess ())
CloseHandle (pty_owner);
}
@@ -520,7 +475,8 @@ fhandler_pty_slave::open (int flags, mode_t)
}
from_master_local = repl.from_master;
to_master_local = repl.to_master;
- if (!from_master_local || !to_master_local)
+ to_master_cyg_local = repl.to_master_cyg;
+ if (!from_master_local || !to_master_local || !to_master_cyg_local)
{
SetLastError (repl.error);
errmsg = "error duplicating pipes, %E";
@@ -529,14 +485,18 @@ fhandler_pty_slave::open (int flags, mode_t)
}
VerifyHandle (from_master_local);
VerifyHandle (to_master_local);
+ VerifyHandle (to_master_cyg_local);
termios_printf ("duplicated from_master %p->%p from pty_owner",
get_ttyp ()->from_master (), from_master_local);
termios_printf ("duplicated to_master %p->%p from pty_owner",
get_ttyp ()->to_master (), to_master_local);
+ termios_printf ("duplicated to_master_cyg %p->%p from pty_owner",
+ get_ttyp ()->to_master_cyg (), to_master_cyg_local);
set_io_handle (from_master_local);
set_output_handle (to_master_local);
+ set_output_handle_cyg (to_master_cyg_local);
fhandler_console::need_invisible ();
set_open_status ();
@@ -562,6 +522,7 @@ fhandler_pty_slave::open_setup (int flags)
set_flags ((flags & ~O_TEXT) | O_BINARY);
myself->set_ctty (this, flags);
report_tty_counts (this, "opened", "");
+ fhandler_base::open_setup (flags);
}
void
@@ -573,6 +534,7 @@ fhandler_pty_slave::cleanup ()
synced or before a non-cygwin process has exited, it should be safe to
just close this normally. cgf 2006-05-20 */
report_tty_counts (this, "closed", "");
+ fhandler_base::cleanup ();
}
int
@@ -583,9 +545,15 @@ fhandler_pty_slave::close ()
termios_printf ("CloseHandle (inuse), %E");
if (!ForceCloseHandle (input_available_event))
termios_printf ("CloseHandle (input_available_event<%p>), %E", input_available_event);
+ if (!ForceCloseHandle (get_output_handle_cyg ()))
+ termios_printf ("CloseHandle (get_output_handle_cyg ()<%p>), %E",
+ get_output_handle_cyg ());
if ((unsigned) myself->ctty == FHDEV (DEV_PTYS_MAJOR, get_minor ()))
fhandler_console::free_console (); /* assumes that we are the last pty closer */
- return fhandler_pty_common::close ();
+ fhandler_pty_common::close ();
+ if (!ForceCloseHandle (output_mutex))
+ termios_printf ("CloseHandle (output_mutex<%p>), %E", output_mutex);
+ return 0;
}
int
@@ -631,7 +599,6 @@ fhandler_pty_slave::init (HANDLE h, DWORD a, mode_t)
ssize_t __stdcall
fhandler_pty_slave::write (const void *ptr, size_t len)
{
- DWORD n;
ssize_t towrite = len;
bg_check_types bg = bg_check (SIGTTOU);
@@ -642,46 +609,18 @@ fhandler_pty_slave::write (const void *ptr, size_t len)
push_process_state process_state (PID_TTYOU);
- while (len)
+ if (!process_opost_output (get_output_handle_cyg (), ptr, towrite, false))
{
- n = MIN (OUT_BUFFER_SIZE, len);
- char *buf = (char *)ptr;
- ptr = (char *) ptr + n;
- len -= n;
-
- while (tc ()->output_stopped)
- cygwait (10);
- acquire_output_mutex (INFINITE);
-
- /* Previous write may have set write_error to != 0. Check it here.
- This is less than optimal, but the alternative slows down pty
- writes enormously. */
- if (get_ttyp ()->write_error)
- {
- set_errno (get_ttyp ()->write_error);
- towrite = -1;
- get_ttyp ()->write_error = 0;
- release_output_mutex ();
- break;
- }
-
- BOOL res = WriteFile (get_output_handle (), buf, n, &n, NULL);
- release_output_mutex ();
- if (!res)
+ DWORD err = GetLastError ();
+ termios_printf ("WriteFile failed, %E");
+ switch (err)
{
- DWORD err = GetLastError ();
- termios_printf ("WriteFile failed, %E");
- switch (err)
- {
- case ERROR_NO_DATA:
- err = ERROR_IO_DEVICE;
- default:
- __seterrno_from_win_error (err);
- }
- raise (SIGHUP); /* FIXME: Should this be SIGTTOU? */
- towrite = -1;
- break;
+ case ERROR_NO_DATA:
+ err = ERROR_IO_DEVICE;
+ default:
+ __seterrno_from_win_error (err);
}
+ towrite = -1;
}
return towrite;
}
@@ -733,12 +672,6 @@ fhandler_pty_slave::read (void *ptr, size_t& len)
switch (cygwait (input_available_event, time_to_wait))
{
case WAIT_OBJECT_0:
- if (get_ttyp ()->is_master_closed ())
- {
- raise (SIGHUP);
- totalread = 0;
- goto out;
- }
break;
case WAIT_SIGNALED:
if (totalread > 0)
@@ -753,7 +686,8 @@ fhandler_pty_slave::read (void *ptr, size_t& len)
/*NOTREACHED*/
case WAIT_TIMEOUT:
termios_printf ("wait timed out, time_to_wait %u", time_to_wait);
- if (!totalread)
+ /* No error condition when called from tcflush. */
+ if (!totalread && ptr)
{
set_sig_errno (EAGAIN);
totalread = -1;
@@ -812,11 +746,12 @@ fhandler_pty_slave::read (void *ptr, size_t& len)
goto out;
}
if (!bytes_available (bytes_in_pipe))
- raise (SIGHUP);
-
- /* On first peek determine no. of bytes to flush. */
- if (!ptr && len == UINT_MAX)
- len = (size_t) bytes_in_pipe;
+ {
+ ReleaseMutex (input_mutex);
+ set_errno (EIO);
+ totalread = -1;
+ goto out;
+ }
if (ptr && !bytes_in_pipe && !vmin && !time_to_wait)
{
@@ -825,10 +760,17 @@ fhandler_pty_slave::read (void *ptr, size_t& len)
return;
}
- readlen = MIN (bytes_in_pipe, MIN (len, sizeof (buf)));
+ readlen = bytes_in_pipe ? MIN (len, sizeof (buf)) : 0;
+ if (get_ttyp ()->ti.c_lflag & ICANON && ptr)
+ readlen = MIN (bytes_in_pipe, readlen);
+#if 0
+ /* Why on earth is the read length reduced to vmin, even if more bytes
+ are available *and* len is bigger *and* the local buf is big enough?
+ Disable this code for now, it looks like a remnant of old. */
if (ptr && vmin && readlen > (unsigned) vmin)
readlen = vmin;
+#endif
DWORD n = 0;
if (readlen)
@@ -837,9 +779,10 @@ fhandler_pty_slave::read (void *ptr, size_t& len)
if (!ReadFile (get_handle (), buf, readlen, &n, NULL))
{
termios_printf ("read failed, %E");
- raise (SIGHUP);
- bytes_in_pipe = 0;
- ptr = NULL;
+ ReleaseMutex (input_mutex);
+ set_errno (EIO);
+ totalread = -1;
+ goto out;
}
else
{
@@ -848,10 +791,16 @@ fhandler_pty_slave::read (void *ptr, size_t& len)
change after successful read. So we have to peek into the pipe
again to see if input is still available */
if (!bytes_available (bytes_in_pipe))
- raise (SIGHUP);
+ {
+ ReleaseMutex (input_mutex);
+ set_errno (EIO);
+ totalread = -1;
+ goto out;
+ }
if (n)
{
- len -= n;
+ if (!(!ptr && len == UINT_MAX)) /* not tcflush() */
+ len -= n;
totalread += n;
if (ptr)
{
@@ -1082,6 +1031,7 @@ fhandler_pty_slave::fstat (struct stat *st)
if (input_available_event)
to_close = true;
}
+ st->st_mode = S_IFCHR;
if (!input_available_event
|| get_object_attribute (input_available_event, &st->st_uid, &st->st_gid,
&st->st_mode))
@@ -1097,20 +1047,77 @@ fhandler_pty_slave::fstat (struct stat *st)
return 0;
}
+int __reg3
+fhandler_pty_slave::facl (int cmd, int nentries, aclent_t *aclbufp)
+{
+ int res = -1;
+ bool to_close = false;
+ security_descriptor sd;
+ mode_t attr = S_IFCHR;
+
+ switch (cmd)
+ {
+ case SETACL:
+ if (!aclsort32 (nentries, 0, aclbufp))
+ set_errno (ENOTSUP);
+ break;
+ case GETACL:
+ if (!aclbufp)
+ {
+ set_errno (EFAULT);
+ break;
+ }
+ /*FALLTHRU*/
+ case GETACLCNT:
+ if (!input_available_event)
+ {
+ char buf[MAX_PATH];
+ shared_name (buf, INPUT_AVAILABLE_EVENT, get_minor ());
+ input_available_event = OpenEvent (READ_CONTROL, TRUE, buf);
+ if (input_available_event)
+ to_close = true;
+ }
+ if (!input_available_event
+ || get_object_sd (input_available_event, sd))
+ {
+ res = get_posix_access (NULL, &attr, NULL, NULL, aclbufp, nentries);
+ if (aclbufp && res == MIN_ACL_ENTRIES)
+ {
+ aclbufp[0].a_perm = S_IROTH | S_IWOTH;
+ aclbufp[0].a_id = 18;
+ aclbufp[1].a_id = 544;
+ }
+ break;
+ }
+ if (cmd == GETACL)
+ res = get_posix_access (sd, &attr, NULL, NULL, aclbufp, nentries);
+ else
+ res = get_posix_access (sd, &attr, NULL, NULL, NULL, 0);
+ break;
+ default:
+ set_errno (EINVAL);
+ break;
+ }
+ if (to_close)
+ CloseHandle (input_available_event);
+ return res;
+}
+
/* Helper function for fchmod and fchown, which just opens all handles
and signals success via bool return. */
bool
-fhandler_pty_slave::fch_open_handles ()
+fhandler_pty_slave::fch_open_handles (bool chown)
{
char buf[MAX_PATH];
+ DWORD write_access = WRITE_DAC | (chown ? WRITE_OWNER : 0);
_tc = cygwin_shared->tty[get_minor ()];
shared_name (buf, INPUT_AVAILABLE_EVENT, get_minor ());
- input_available_event = OpenEvent (READ_CONTROL | WRITE_DAC | WRITE_OWNER,
+ input_available_event = OpenEvent (READ_CONTROL | write_access,
TRUE, buf);
- output_mutex = get_ttyp ()->open_output_mutex (WRITE_DAC | WRITE_OWNER);
- input_mutex = get_ttyp ()->open_input_mutex (WRITE_DAC | WRITE_OWNER);
- inuse = get_ttyp ()->open_inuse (WRITE_DAC | WRITE_OWNER);
+ output_mutex = get_ttyp ()->open_output_mutex (write_access);
+ input_mutex = get_ttyp ()->open_input_mutex (write_access);
+ inuse = get_ttyp ()->open_inuse (write_access);
if (!input_available_event || !output_mutex || !input_mutex || !inuse)
{
__seterrno ();
@@ -1144,8 +1151,6 @@ fhandler_pty_slave::fch_set_sd (security_descriptor &sd, bool chown)
void
fhandler_pty_slave::fch_close_handles ()
{
- close_maybe (get_io_handle ());
- close_maybe (get_output_handle ());
close_maybe (input_available_event);
close_maybe (output_mutex);
close_maybe (input_mutex);
@@ -1160,17 +1165,18 @@ fhandler_pty_slave::fchmod (mode_t mode)
security_descriptor sd;
uid_t uid;
gid_t gid;
+ mode_t orig_mode = S_IFCHR;
if (!input_available_event)
{
to_close = true;
- if (!fch_open_handles ())
+ if (!fch_open_handles (false))
goto errout;
}
sd.malloc (sizeof (SECURITY_DESCRIPTOR));
RtlCreateSecurityDescriptor (sd, SECURITY_DESCRIPTOR_REVISION);
- if (!get_object_attribute (input_available_event, &uid, &gid, NULL)
- && !create_object_sd_from_attribute (NULL, uid, gid, S_IFCHR | mode, sd))
+ if (!get_object_attribute (input_available_event, &uid, &gid, &orig_mode)
+ && !create_object_sd_from_attribute (uid, gid, S_IFCHR | mode, sd))
ret = fch_set_sd (sd, false);
errout:
if (to_close)
@@ -1183,28 +1189,30 @@ fhandler_pty_slave::fchown (uid_t uid, gid_t gid)
{
int ret = -1;
bool to_close = false;
- mode_t mode = 0;
+ security_descriptor sd;
uid_t o_uid;
gid_t o_gid;
- security_descriptor sd;
+ mode_t mode = S_IFCHR;
if (uid == ILLEGAL_UID && gid == ILLEGAL_GID)
return 0;
if (!input_available_event)
{
to_close = true;
- if (!fch_open_handles ())
+ if (!fch_open_handles (true))
goto errout;
}
sd.malloc (sizeof (SECURITY_DESCRIPTOR));
RtlCreateSecurityDescriptor (sd, SECURITY_DESCRIPTOR_REVISION);
if (!get_object_attribute (input_available_event, &o_uid, &o_gid, &mode))
{
- if ((uid == ILLEGAL_UID || uid == o_uid)
- && (gid == ILLEGAL_GID || gid == o_gid))
+ if (uid == ILLEGAL_UID)
+ uid = o_uid;
+ if (gid == ILLEGAL_GID)
+ gid = o_gid;
+ if (uid == o_uid && gid == o_gid)
ret = 0;
- else if (!create_object_sd_from_attribute (input_available_event,
- uid, gid, S_IFCHR | mode, sd))
+ else if (!create_object_sd_from_attribute (uid, gid, mode, sd))
ret = fch_set_sd (sd, true);
}
errout:
@@ -1219,7 +1227,8 @@ errout:
fhandler_pty_master::fhandler_pty_master (int unit)
: fhandler_pty_common (), pktmode (0), master_ctl (NULL),
master_thread (NULL), from_master (NULL), to_master (NULL),
- dwProcessId (0), need_nl (0)
+ echo_r (NULL), echo_w (NULL), dwProcessId (0),
+ io_handle_cyg (NULL), to_master_cyg (NULL), master_fwd_thread (NULL)
{
if (unit >= 0)
dev ().parse (DEV_PTYM_MAJOR, unit);
@@ -1246,6 +1255,7 @@ fhandler_pty_master::open_setup (int flags)
char buf[sizeof ("opened pty master for ptyNNNNNNNNNNN")];
__small_sprintf (buf, "opened pty master for pty%d", get_minor ());
report_tty_counts (this, buf, "");
+ fhandler_base::open_setup (flags);
}
off_t
@@ -1261,8 +1271,6 @@ fhandler_pty_common::close ()
termios_printf ("pty%d <%p,%p> closing", get_minor (), get_handle (), get_output_handle ());
if (!ForceCloseHandle (input_mutex))
termios_printf ("CloseHandle (input_mutex<%p>), %E", input_mutex);
- if (!ForceCloseHandle (output_mutex))
- termios_printf ("CloseHandle (output_mutex<%p>), %E", output_mutex);
if (!ForceCloseHandle1 (get_handle (), from_pty))
termios_printf ("CloseHandle (get_handle ()<%p>), %E", get_handle ());
if (!ForceCloseHandle1 (get_output_handle (), to_pty))
@@ -1276,14 +1284,18 @@ fhandler_pty_master::cleanup ()
{
report_tty_counts (this, "closing master", "");
if (archetype)
- from_master = to_master = NULL;
+ from_master = to_master = to_master_cyg = NULL;
+ fhandler_base::cleanup ();
}
int
fhandler_pty_master::close ()
{
- termios_printf ("closing from_master(%p)/to_master(%p) since we own them(%u)",
- from_master, to_master, dwProcessId);
+ OBJECT_BASIC_INFORMATION obi;
+ NTSTATUS status;
+
+ termios_printf ("closing from_master(%p)/to_master(%p)/to_master_cyg(%p) since we own them(%u)",
+ from_master, to_master, to_master_cyg, dwProcessId);
if (cygwin_finished_initializing)
{
if (master_ctl && get_ttyp ()->master_pid == myself->pid)
@@ -1295,46 +1307,66 @@ fhandler_pty_master::close ()
__small_sprintf (buf, "\\\\.\\pipe\\cygwin-%S-pty%d-master-ctl",
&cygheap->installation_key, get_minor ());
- CallNamedPipe (buf, &req, sizeof req, &repl, sizeof repl, &len, 500);
- CloseHandle (master_ctl);
- master_thread->detach ();
+ acquire_output_mutex (INFINITE);
+ if (master_ctl)
+ {
+ CallNamedPipe (buf, &req, sizeof req, &repl, sizeof repl, &len,
+ 500);
+ CloseHandle (master_ctl);
+ master_thread->detach ();
+ get_ttyp ()->set_master_ctl_closed ();
+ master_ctl = NULL;
+ }
+ release_output_mutex ();
+ master_fwd_thread->terminate_thread ();
}
}
+ /* Check if the last master handle has been closed. If so, set
+ input_available_event to wake up potentially waiting slaves. */
+ acquire_output_mutex (INFINITE);
+ status = NtQueryObject (get_output_handle (), ObjectBasicInformation,
+ &obi, sizeof obi, NULL);
+ fhandler_pty_common::close ();
+ release_output_mutex ();
+ if (!ForceCloseHandle (output_mutex))
+ termios_printf ("CloseHandle (output_mutex<%p>), %E", output_mutex);
+ if (!NT_SUCCESS (status))
+ debug_printf ("NtQueryObject: %y", status);
+ else if (obi.HandleCount == 1)
+ {
+ termios_printf("Closing last master of pty%d", get_minor ());
+ if (get_ttyp ()->getsid () > 0)
+ kill (get_ttyp ()->getsid (), SIGHUP);
+ SetEvent (input_available_event);
+ }
+
if (!ForceCloseHandle (from_master))
termios_printf ("error closing from_master %p, %E", from_master);
if (!ForceCloseHandle (to_master))
- termios_printf ("error closing from_master %p, %E", to_master);
+ termios_printf ("error closing to_master %p, %E", to_master);
from_master = to_master = NULL;
-
- fhandler_pty_common::close ();
+ if (!ForceCloseHandle (get_io_handle_cyg ()))
+ termios_printf ("error closing io_handle_cyg %p, %E", get_io_handle_cyg ());
+ if (!ForceCloseHandle (to_master_cyg))
+ termios_printf ("error closing to_master_cyg %p, %E", to_master_cyg);
+ get_io_handle_cyg () = to_master_cyg = NULL;
+ ForceCloseHandle (echo_r);
+ ForceCloseHandle (echo_w);
+ echo_r = echo_w = NULL;
if (have_execed || get_ttyp ()->master_pid != myself->pid)
termios_printf ("not clearing: %d, master_pid %d", have_execed, get_ttyp ()->master_pid);
- else
- {
- get_ttyp ()->set_master_closed ();
- SetEvent (input_available_event);
- }
if (!ForceCloseHandle (input_available_event))
termios_printf ("CloseHandle (input_available_event<%p>), %E", input_available_event);
return 0;
}
-/* This is just to catch error conditions. Since the constructor
- actually opens some handles, and stat() does not open an fd, they need
- to be closed when the fhandler goes away. */
-fhandler_pty_master::~fhandler_pty_master ()
-{
- if (from_master && to_master)
- close_with_arch ();
-}
-
ssize_t __stdcall
fhandler_pty_master::write (const void *ptr, size_t len)
{
- int i;
+ ssize_t ret;
char *p = (char *) ptr;
termios ti = tc ()->ti;
@@ -1343,18 +1375,10 @@ fhandler_pty_master::write (const void *ptr, size_t len)
return (ssize_t) bg;
push_process_state process_state (PID_TTYOU);
-
- for (i = 0; i < (int) len; i++)
- {
- line_edit_status status = line_edit (p++, 1, ti);
- if (status > line_edit_signalled)
- {
- if (status != line_edit_pipe_full)
- i = -1;
- break;
- }
- }
- return i;
+ line_edit_status status = line_edit (p++, len, ti, &ret);
+ if (status > line_edit_signalled && status != line_edit_pipe_full)
+ ret = -1;
+ return ret;
}
void __reg3
@@ -1433,7 +1457,7 @@ fhandler_pty_master::ioctl (unsigned int cmd, void *arg)
case FIONREAD:
{
DWORD n;
- if (!::bytes_available (n, to_master))
+ if (!::bytes_available (n, get_io_handle_cyg ()))
{
set_errno (EINVAL);
return -1;
@@ -1603,6 +1627,13 @@ fhandler_pty_master::pty_master_thread ()
termios_printf ("DuplicateHandle (to_master), %E");
goto reply;
}
+ if (!DuplicateHandle (GetCurrentProcess (), to_master_cyg,
+ client, &repl.to_master_cyg,
+ 0, TRUE, DUPLICATE_SAME_ACCESS))
+ {
+ termios_printf ("DuplicateHandle (to_master_cyg), %E");
+ goto reply;
+ }
}
reply:
repl.error = GetLastError ();
@@ -1628,6 +1659,40 @@ pty_master_thread (VOID *arg)
return ((fhandler_pty_master *) arg)->pty_master_thread ();
}
+DWORD
+fhandler_pty_master::pty_master_fwd_thread ()
+{
+ DWORD rlen;
+ char outbuf[OUT_BUFFER_SIZE];
+
+ termios_printf("Started.");
+ for (;;)
+ {
+ if (!ReadFile (get_io_handle (), outbuf, sizeof outbuf, &rlen, NULL))
+ {
+ termios_printf ("ReadFile for forwarding failed, %E");
+ break;
+ }
+ ssize_t wlen = rlen;
+ while (rlen>0)
+ {
+ if (!process_opost_output (to_master_cyg, outbuf, wlen, false))
+ {
+ termios_printf ("WriteFile for forwarding failed, %E");
+ break;
+ }
+ rlen -= wlen;
+ }
+ }
+ return 0;
+}
+
+static DWORD WINAPI
+pty_master_fwd_thread (VOID *arg)
+{
+ return ((fhandler_pty_master *) arg)->pty_master_fwd_thread ();
+}
+
bool
fhandler_pty_master::setup ()
{
@@ -1654,7 +1719,7 @@ fhandler_pty_master::setup ()
termios_printf ("can't set output_handle(%p) to non-blocking mode",
get_output_handle ());
- char pipename[sizeof("ptyNNNN-from-master")];
+ char pipename[sizeof("ptyNNNN-to-master-cyg")];
__small_sprintf (pipename, "pty%d-to-master", unit);
res = fhandler_pipe::create (&sec_none, &get_io_handle (), &to_master,
fhandler_pty_common::pipesize, pipename, 0);
@@ -1664,12 +1729,30 @@ fhandler_pty_master::setup ()
goto err;
}
+ __small_sprintf (pipename, "pty%d-to-master-cyg", unit);
+ res = fhandler_pipe::create (&sec_none, &get_io_handle_cyg (), &to_master_cyg,
+ fhandler_pty_common::pipesize, pipename, 0);
+ if (res)
+ {
+ errstr = "output pipe for cygwin";
+ goto err;
+ }
+
ProtectHandle1 (get_io_handle (), from_pty);
+ __small_sprintf (pipename, "pty%d-echoloop", unit);
+ res = fhandler_pipe::create (&sec_none, &echo_r, &echo_w,
+ fhandler_pty_common::pipesize, pipename, 0);
+ if (res)
+ {
+ errstr = "echo pipe";
+ goto err;
+ }
+
/* Create security attribute. Default permissions are 0620. */
sd.malloc (sizeof (SECURITY_DESCRIPTOR));
RtlCreateSecurityDescriptor (sd, SECURITY_DESCRIPTOR_REVISION);
- if (!create_object_sd_from_attribute (NULL, myself->uid, myself->gid,
+ if (!create_object_sd_from_attribute (myself->uid, myself->gid,
S_IFCHR | S_IRUSR | S_IWUSR | S_IWGRP,
sd))
sa.lpSecurityDescriptor = (PSECURITY_DESCRIPTOR) sd;
@@ -1714,28 +1797,40 @@ fhandler_pty_master::setup ()
errstr = "pty master control thread";
goto err;
}
+ master_fwd_thread = new cygthread (::pty_master_fwd_thread, this, "ptymf");
+ if (!master_fwd_thread)
+ {
+ errstr = "pty master forwarding thread";
+ goto err;
+ }
t.set_from_master (from_master);
t.set_to_master (to_master);
+ t.set_to_master_cyg (to_master_cyg);
t.winsize.ws_col = 80;
t.winsize.ws_row = 25;
t.master_pid = myself->pid;
dev ().parse (DEV_PTYM_MAJOR, unit);
- termios_printf ("this %p, pty%d opened - from_pty %p, to_pty %p", this, unit,
- get_io_handle (), get_output_handle ());
+ termios_printf ("this %p, pty%d opened - from_pty <%p,%p>, to_pty %p",
+ this, unit, get_io_handle (), get_io_handle_cyg (),
+ get_output_handle ());
return true;
err:
__seterrno ();
close_maybe (get_io_handle ());
+ close_maybe (get_io_handle_cyg ());
close_maybe (get_output_handle ());
close_maybe (input_available_event);
close_maybe (output_mutex);
close_maybe (input_mutex);
close_maybe (from_master);
close_maybe (to_master);
+ close_maybe (to_master_cyg);
+ close_maybe (echo_r);
+ close_maybe (echo_w);
close_maybe (master_ctl);
termios_printf ("pty%d open failed - failed to create %s", unit, errstr);
return false;
@@ -1753,11 +1848,13 @@ fhandler_pty_master::fixup_after_fork (HANDLE parent)
{
t.set_from_master (arch->from_master);
t.set_to_master (arch->to_master);
+ t.set_to_master_cyg (arch->to_master_cyg);
}
arch->dwProcessId = wpid;
}
from_master = arch->from_master;
to_master = arch->to_master;
+ to_master_cyg = arch->to_master_cyg;
report_tty_counts (this, "inherited master", "");
}
@@ -1767,5 +1864,95 @@ fhandler_pty_master::fixup_after_exec ()
if (!close_on_exec ())
fixup_after_fork (spawn_info->parent);
else
- from_master = to_master = NULL;
+ from_master = to_master = to_master_cyg = NULL;
+}
+
+BOOL
+fhandler_pty_common::process_opost_output (HANDLE h, const void *ptr, ssize_t& len, bool is_echo)
+{
+ ssize_t towrite = len;
+ BOOL res = TRUE;
+ while (towrite)
+ {
+ if (!is_echo)
+ {
+ if (tc ()->output_stopped && is_nonblocking ())
+ {
+ if (towrite < len)
+ break;
+ else
+ {
+ set_errno(EAGAIN);
+ len = -1;
+ return TRUE;
+ }
+ }
+ while (tc ()->output_stopped)
+ cygwait (10);
+ }
+
+ if (!(get_ttyp ()->ti.c_oflag & OPOST)) // raw output mode
+ {
+ DWORD n = MIN (OUT_BUFFER_SIZE, towrite);
+ res = WriteFile (h, ptr, n, &n, NULL);
+ if (!res)
+ break;
+ ptr = (char *) ptr + n;
+ towrite -= n;
+ }
+ else // post-process output
+ {
+ char outbuf[OUT_BUFFER_SIZE + 1];
+ char *buf = (char *)ptr;
+ DWORD n = 0;
+ ssize_t rc = 0;
+ acquire_output_mutex (INFINITE);
+ while (n < OUT_BUFFER_SIZE && rc < towrite)
+ {
+ switch (buf[rc])
+ {
+ case '\r':
+ if ((get_ttyp ()->ti.c_oflag & ONOCR)
+ && get_ttyp ()->column == 0)
+ {
+ rc++;
+ continue;
+ }
+ if (get_ttyp ()->ti.c_oflag & OCRNL)
+ {
+ outbuf[n++] = '\n';
+ rc++;
+ }
+ else
+ {
+ outbuf[n++] = buf[rc++];
+ get_ttyp ()->column = 0;
+ }
+ break;
+ case '\n':
+ if (get_ttyp ()->ti.c_oflag & ONLCR)
+ {
+ outbuf[n++] = '\r';
+ get_ttyp ()->column = 0;
+ }
+ if (get_ttyp ()->ti.c_oflag & ONLRET)
+ get_ttyp ()->column = 0;
+ outbuf[n++] = buf[rc++];
+ break;
+ default:
+ outbuf[n++] = buf[rc++];
+ get_ttyp ()->column++;
+ break;
+ }
+ }
+ release_output_mutex ();
+ res = WriteFile (h, outbuf, n, &n, NULL);
+ if (!res)
+ break;
+ ptr = (char *) ptr + rc;
+ towrite -= rc;
+ }
+ }
+ len -= towrite;
+ return res;
}
diff --git a/winsup/cygwin/fhandler_virtual.cc b/winsup/cygwin/fhandler_virtual.cc
index 07b8e4b0b..b6b95f967 100644
--- a/winsup/cygwin/fhandler_virtual.cc
+++ b/winsup/cygwin/fhandler_virtual.cc
@@ -1,8 +1,5 @@
/* fhandler_virtual.cc: base fhandler class for virtual filesystems
- Copyright 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012
- Red Hat, Inc.
-
This file is part of Cygwin.
This software is a copyrighted work licensed under the terms of the
@@ -10,7 +7,7 @@ Cygwin license. Please consult the file "CYGWIN_LICENSE" for
details. */
#include "winsup.h"
-#include <sys/acl.h>
+#include <cygwin/acl.h>
#include <sys/statvfs.h>
#include "cygerrno.h"
#include "path.h"
@@ -84,10 +81,9 @@ fhandler_virtual::opendir (int fd)
else
{
cygheap_fdnew cfd;
- if (cfd >= 0)
+ if (cfd >= 0 && open (O_RDONLY, 0))
{
cfd = this;
- cfd->nohandle (true);
dir->__d_fd = cfd;
dir->__fh = this;
res = dir;
@@ -273,6 +269,7 @@ fhandler_virtual::fstatvfs (struct statvfs *sfs)
set to something useful. Just as on Linux. */
memset (sfs, 0, sizeof (*sfs));
sfs->f_bsize = sfs->f_frsize = 4096;
+ sfs->f_flag = ST_RDONLY;
sfs->f_namemax = NAME_MAX;
return 0;
}
diff --git a/winsup/cygwin/fhandler_virtual.h b/winsup/cygwin/fhandler_virtual.h
index 9747dd2cb..cbd7a0d94 100644
--- a/winsup/cygwin/fhandler_virtual.h
+++ b/winsup/cygwin/fhandler_virtual.h
@@ -1,7 +1,5 @@
/* fhandler_virtual.h: Header for virtual fhandlers
- Copyright 2009, 2010, 2011 Red Hat, Inc.
-
This file is part of Cygwin.
This software is a copyrighted work licensed under the terms of the
@@ -20,3 +18,26 @@ struct virt_tab_t {
extern virt_tab_t *virt_tab_search (const char *, bool, const virt_tab_t *,
size_t);
+
+static inline unsigned char
+virt_ftype_to_dtype (virtual_ftype_t type)
+{
+ unsigned char d_type;
+
+ switch (type)
+ {
+ case virt_directory:
+ d_type = DT_DIR;
+ break;
+ case virt_symlink:
+ d_type = DT_LNK;
+ break;
+ case virt_file:
+ d_type = DT_REG;
+ break;
+ default:
+ d_type = DT_UNKNOWN;
+ break;
+ }
+ return d_type;
+}
diff --git a/winsup/cygwin/fhandler_windows.cc b/winsup/cygwin/fhandler_windows.cc
index 12ab5265b..c9ef66c0b 100644
--- a/winsup/cygwin/fhandler_windows.cc
+++ b/winsup/cygwin/fhandler_windows.cc
@@ -1,8 +1,5 @@
/* fhandler_windows.cc: code to access windows message queues.
- Copyright 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2009, 2011, 2012
- Red Hat, Inc.
-
Written by Sergey S. Okhapkin (sos@prospect.com.ru).
Feedback and testing by Andy Piper (andyp@parallax.co.uk).
@@ -13,8 +10,6 @@ Cygwin license. Please consult the file "CYGWIN_LICENSE" for
details. */
#include "winsup.h"
-#include <wingdi.h>
-#include <winuser.h>
#include "cygerrno.h"
#include "path.h"
#include "fhandler.h"
@@ -54,12 +49,9 @@ fhandler_windows::fhandler_windows ()
}
int
-fhandler_windows::open (int flags, mode_t)
+fhandler_windows::open (int flags, mode_t mode)
{
- set_flags ((flags & ~O_TEXT) | O_BINARY);
- close_on_exec (true);
- set_open_status ();
- return 1;
+ return fhandler_base::open ((flags & ~O_TEXT) | O_BINARY, mode);
}
ssize_t __stdcall
@@ -96,10 +88,10 @@ fhandler_windows::read (void *buf, size_t& len)
return;
}
- HANDLE w4[3] = { get_handle (), };
- set_signal_arrived here (w4[1]);
- DWORD cnt = 2;
- if ((w4[cnt] = pthread::get_cancel_event ()) != NULL)
+ HANDLE w4[2];
+ wait_signal_arrived here (w4[0]);
+ DWORD cnt = 1;
+ if ((w4[1] = pthread::get_cancel_event ()) != NULL)
++cnt;
for (;;)
{
@@ -109,6 +101,19 @@ fhandler_windows::read (void *buf, size_t& len)
MWMO_INPUTAVAILABLE))
{
case WAIT_OBJECT_0:
+ if (_my_tls.call_signal_handler ())
+ continue;
+ len = (size_t) -1;
+ set_errno (EINTR);
+ break;
+ case WAIT_OBJECT_0 + 1:
+ if (cnt > 1) /* WAIT_OBJECT_0 + 1 is the cancel event object. */
+ {
+ pthread::static_cancel_self ();
+ break;
+ }
+ /*FALLTHRU*/
+ case WAIT_OBJECT_0 + 2:
if (!PeekMessageW (ptr, hWnd_, 0, 0, PM_REMOVE))
{
len = (size_t) -1;
@@ -119,15 +124,6 @@ fhandler_windows::read (void *buf, size_t& len)
else
len = sizeof (MSG);
break;
- case WAIT_OBJECT_0 + 1:
- if (_my_tls.call_signal_handler ())
- continue;
- len = (size_t) -1;
- set_errno (EINTR);
- break;
- case WAIT_OBJECT_0 + 2:
- pthread::static_cancel_self ();
- break;
case WAIT_TIMEOUT:
len = (size_t) -1;
set_errno (EAGAIN);
@@ -163,25 +159,3 @@ fhandler_windows::ioctl (unsigned int cmd, void *val)
}
return 0;
}
-
-void
-fhandler_windows::set_close_on_exec (bool val)
-{
- if (get_handle ())
- fhandler_base::set_close_on_exec (val);
- else
- fhandler_base::close_on_exec (val);
- void *h = hWnd_;
- if (h)
- set_no_inheritance (h, val);
-}
-
-void
-fhandler_windows::fixup_after_fork (HANDLE parent)
-{
- if (get_handle ())
- fhandler_base::fixup_after_fork (parent);
- void *h = hWnd_;
- if (h)
- fork_fixup (parent, h, "hWnd_");
-}
diff --git a/winsup/cygwin/fhandler_zero.cc b/winsup/cygwin/fhandler_zero.cc
index 1fd874614..1f758214e 100644
--- a/winsup/cygwin/fhandler_zero.cc
+++ b/winsup/cygwin/fhandler_zero.cc
@@ -1,7 +1,5 @@
/* fhandler_dev_zero.cc: code to access /dev/zero
- Copyright 2000, 2001, 2002, 2003, 2004, 2005, 2008, 2009 Red Hat, Inc.
-
Written by DJ Delorie (dj@cygnus.com)
This file is part of Cygwin.
@@ -21,15 +19,6 @@ fhandler_dev_zero::fhandler_dev_zero ()
{
}
-int
-fhandler_dev_zero::open (int flags, mode_t)
-{
- set_flags ((flags & ~O_TEXT) | O_BINARY);
- nohandle (true);
- set_open_status ();
- return 1;
-}
-
ssize_t __stdcall
fhandler_dev_zero::write (const void *, size_t len)
{
@@ -46,9 +35,3 @@ fhandler_dev_zero::read (void *ptr, size_t& len)
{
memset (ptr, 0, len);
}
-
-off_t
-fhandler_dev_zero::lseek (off_t, int)
-{
- return 0;
-}
diff --git a/winsup/cygwin/flock.cc b/winsup/cygwin/flock.cc
index 33f16af06..ef5f6078b 100644
--- a/winsup/cygwin/flock.cc
+++ b/winsup/cygwin/flock.cc
@@ -1,7 +1,5 @@
/* flock.cc. NT specific implementation of advisory file locking.
- Copyright 2003, 2008, 2009, 2010, 2011, 2012, 2013 Red Hat, Inc.
-
This file is part of Cygwin.
This software is a copyrighted work licensed under the terms of the
@@ -290,7 +288,7 @@ class lockf_t
{ cfree (p); }
POBJECT_ATTRIBUTES create_lock_obj_attr (lockfattr_t *attr,
- ULONG flags);
+ ULONG flags, void *sd_buf);
void create_lock_obj ();
bool open_lock_obj ();
@@ -439,7 +437,7 @@ fhandler_base::del_my_locks (del_lock_called_from from)
wait on. If the node has been abandoned due to close_on_exec on the
referencing fhandlers, remove the inode entirely. */
void
-fixup_lockf_after_exec ()
+fixup_lockf_after_exec (bool exec)
{
inode_t *node, *next_node;
@@ -454,7 +452,7 @@ fixup_lockf_after_exec ()
while (cfd.next () >= 0)
if (cfd->get_dev () == node->i_dev
&& cfd->get_ino () == node->i_ino
- && ++cnt > 1)
+ && ++cnt >= 1)
break;
if (cnt == 0)
{
@@ -464,13 +462,29 @@ fixup_lockf_after_exec ()
else
{
node->LOCK ();
- for (lockf_t *lock = node->i_lockf; lock; lock = lock->lf_next)
+ lockf_t *lock, *n_lock;
+ lockf_t **prev = &node->i_lockf;
+ for (lock = *prev; lock && (n_lock = lock->lf_next, 1); lock = n_lock)
if (lock->lf_flags & F_POSIX)
{
- lock->del_lock_obj (NULL);
- lock->lf_wid = myself->dwProcessId;
- lock->lf_ver = 0;
- lock->create_lock_obj ();
+ if (exec)
+ {
+ /* The parent called exec. The lock is passed to the child.
+ Recreate lock object with changed ownership. */
+ lock->del_lock_obj (NULL);
+ lock->lf_wid = myself->dwProcessId;
+ lock->lf_ver = 0;
+ lock->create_lock_obj ();
+ }
+ else
+ {
+ /* The parent called spawn. The parent continues to hold
+ the POSIX lock, ownership is not passed to the child.
+ Give up the lock in the child. */
+ *prev = n_lock;
+ lock->close_lock_obj ();
+ delete lock;
+ }
}
node->UNLOCK ();
}
@@ -620,7 +634,7 @@ inode_t::get_all_locks_list ()
/* Create the lock object name. The name is constructed from the lock
properties which identify it uniquely, all values in hex. */
POBJECT_ATTRIBUTES
-lockf_t::create_lock_obj_attr (lockfattr_t *attr, ULONG flags)
+lockf_t::create_lock_obj_attr (lockfattr_t *attr, ULONG flags, void *sd_buf)
{
__small_swprintf (attr->name, LOCK_OBJ_NAME_FMT,
lf_flags & (F_POSIX | F_FLOCK), lf_type, lf_start, lf_end,
@@ -628,7 +642,7 @@ lockf_t::create_lock_obj_attr (lockfattr_t *attr, ULONG flags)
RtlInitCountedUnicodeString (&attr->uname, attr->name,
LOCK_OBJ_NAME_LEN * sizeof (WCHAR));
InitializeObjectAttributes (&attr->attr, &attr->uname, flags, lf_inode->i_dir,
- everyone_sd (FLOCK_EVENT_ACCESS));
+ _everyone_sd (sd_buf, FLOCK_EVENT_ACCESS));
return &attr->attr;
}
@@ -687,6 +701,12 @@ create_lock_in_parent (PVOID param)
NtClose (lf_obj);
return 0;
}
+ /* The handle gets created non-inheritable. That's fine, unless the parent
+ starts another process accessing this object. So, after it's clear we
+ have to store the handle for further use, make sure it gets inheritable
+ by child processes. */
+ if (!SetHandleInformation (lf_obj, HANDLE_FLAG_INHERIT, HANDLE_FLAG_INHERIT))
+ goto err;
/* otherwise generate inode from directory name... */
node = inode_t::get (dev, ino, true, false);
/* ...and generate lock from object name. */
@@ -708,13 +728,13 @@ err:
DWORD WINAPI
delete_lock_in_parent (PVOID param)
{
- inode_t *node;
+ inode_t *node, *next_node;
lockf_t *lock, **prev;
/* Scan list of all inodes, and reap stale BSD lock if lf_id matches.
Remove inode if empty. */
INODE_LIST_LOCK ();
- LIST_FOREACH (node, &cygheap->inode_list, i_next)
+ LIST_FOREACH_SAFE (node, &cygheap->inode_list, i_next, next_node)
if (!node->inuse ())
{
for (prev = &node->i_lockf, lock = *prev; lock; lock = *prev)
@@ -744,11 +764,13 @@ lockf_t::create_lock_obj ()
{
lockfattr_t attr;
NTSTATUS status;
+ PSECURITY_DESCRIPTOR sd_buf = alloca (SD_MIN_SIZE);
+ POBJECT_ATTRIBUTES lock_obj_attr;
do
{
- status = NtCreateEvent (&lf_obj, CYG_EVENT_ACCESS,
- create_lock_obj_attr (&attr, OBJ_INHERIT),
+ lock_obj_attr = create_lock_obj_attr (&attr, OBJ_INHERIT, sd_buf);
+ status = NtCreateEvent (&lf_obj, CYG_EVENT_ACCESS, lock_obj_attr,
NotificationEvent, FALSE);
if (!NT_SUCCESS (status))
{
@@ -794,7 +816,7 @@ lockf_t::create_lock_obj ()
return;
}
if (!DuplicateHandle (GetCurrentProcess (), lf_obj, parent_proc,
- &parent_lf_obj, TRUE, 0, DUPLICATE_SAME_ACCESS))
+ &parent_lf_obj, TRUE, FALSE, DUPLICATE_SAME_ACCESS))
debug_printf ("DuplicateHandle (lf_obj): %E");
else
{
@@ -830,7 +852,7 @@ lockf_t::open_lock_obj ()
NTSTATUS status;
status = NtOpenEvent (&lf_obj, FLOCK_EVENT_ACCESS,
- create_lock_obj_attr (&attr, 0));
+ create_lock_obj_attr (&attr, 0, alloca (SD_MIN_SIZE)));
if (!NT_SUCCESS (status))
{
SetLastError (RtlNtStatusToDosError (status));
@@ -857,7 +879,9 @@ lockf_t::del_lock_obj (HANDLE fhdl, bool signal)
if ((lf_flags & F_POSIX) || signal
|| (fhdl && get_obj_handle_count (fhdl) <= 1))
{
- NtSetEvent (lf_obj, NULL);
+ NTSTATUS status = NtSetEvent (lf_obj, NULL);
+ if (!NT_SUCCESS (status))
+ system_printf ("NtSetEvent, %y", status);
/* For BSD locks, notify the parent process. */
if (lf_flags & F_FLOCK)
{
@@ -919,14 +943,7 @@ static void lf_wakelock (lockf_t *, HANDLE);
of mandatory locks using the Windows mandatory locking functions, see the
fhandler_disk_file::mand_lock method at the end of this file. */
int
-fhandler_base::lock (int, struct flock *)
-{
- set_errno (EINVAL);
- return -1;
-}
-
-int
-fhandler_disk_file::lock (int a_op, struct flock *fl)
+fhandler_base::lock (int a_op, struct flock *fl)
{
off_t start, end, oadd;
int error = 0;
@@ -936,6 +953,19 @@ fhandler_disk_file::lock (int a_op, struct flock *fl)
if (!a_flags)
a_flags = F_POSIX; /* default */
+
+ /* FIXME: For BSD flock(2) we need a valid, per file table entry OS handle.
+ Therefore we can't allow using flock(2) on nohandle devices and
+ pre-Windows 8 console handles (recognized by their odd handle value). */
+ if ((a_flags & F_FLOCK)
+ && (nohandle () || (((uintptr_t) get_handle () & 0x3) == 0x3)))
+ {
+ set_errno (EINVAL);
+ debug_printf ("BSD locking on nohandle and old-style console devices "
+ "not supported");
+ return -1;
+ }
+
if (a_op == F_SETLKW)
{
a_op = F_SETLK;
@@ -952,16 +982,24 @@ fhandler_disk_file::lock (int a_op, struct flock *fl)
been opened with a specific open mode, in contrast to POSIX locks
which require that a file is opened for reading to place a read
lock and opened for writing to place a write lock. */
- if ((a_flags & F_POSIX) && !(get_access () & GENERIC_READ))
+ /* CV 2013-10-22: Test POSIX R/W mode flags rather than Windows R/W
+ access flags. The reason is that POSIX mode flags are set for
+ all types of fhandlers, while Windows access flags are only set
+ for most of the actual Windows device backed fhandlers. */
+ if ((a_flags & F_POSIX)
+ && ((get_flags () & O_ACCMODE) == O_WRONLY))
{
+ debug_printf ("request F_RDLCK on O_WRONLY file: EBADF");
set_errno (EBADF);
return -1;
}
break;
case F_WRLCK:
/* See above comment. */
- if ((a_flags & F_POSIX) && !(get_access () & GENERIC_WRITE))
+ if ((a_flags & F_POSIX)
+ && ((get_flags () & O_ACCMODE) == O_RDONLY))
{
+ debug_printf ("request F_WRLCK on O_RDONLY file: EBADF");
set_errno (EBADF);
return -1;
}
@@ -982,29 +1020,32 @@ fhandler_disk_file::lock (int a_op, struct flock *fl)
case SEEK_CUR:
if ((start = lseek (0, SEEK_CUR)) == ILLEGAL_SEEK)
- return -1;
+ start = 0;
break;
case SEEK_END:
- {
- NTSTATUS status;
- IO_STATUS_BLOCK io;
- FILE_STANDARD_INFORMATION fsi;
+ if (get_device () != FH_FS)
+ start = 0;
+ else
+ {
+ NTSTATUS status;
+ IO_STATUS_BLOCK io;
+ FILE_STANDARD_INFORMATION fsi;
- status = NtQueryInformationFile (get_handle (), &io, &fsi, sizeof fsi,
- FileStandardInformation);
- if (!NT_SUCCESS (status))
- {
- __seterrno_from_nt_status (status);
- return -1;
- }
- if (fl->l_start > 0 && fsi.EndOfFile.QuadPart > OFF_MAX - fl->l_start)
- {
- set_errno (EOVERFLOW);
- return -1;
- }
- start = fsi.EndOfFile.QuadPart + fl->l_start;
- }
+ status = NtQueryInformationFile (get_handle (), &io, &fsi, sizeof fsi,
+ FileStandardInformation);
+ if (!NT_SUCCESS (status))
+ {
+ __seterrno_from_nt_status (status);
+ return -1;
+ }
+ if (fl->l_start > 0 && fsi.EndOfFile.QuadPart > OFF_MAX - fl->l_start)
+ {
+ set_errno (EOVERFLOW);
+ return -1;
+ }
+ start = fsi.EndOfFile.QuadPart + fl->l_start;
+ }
break;
default:
@@ -1257,7 +1298,7 @@ lf_setlock (lockf_t *lock, inode_t *node, lockf_t **clean, HANDLE fhdl)
timeout = 100L;
DWORD WAIT_SIGNAL_ARRIVED = WAIT_OBJECT_0 + wait_count;
- set_signal_arrived here (w4[wait_count++]);
+ wait_signal_arrived here (w4[wait_count++]);
DWORD WAIT_THREAD_CANCELED = WAIT_TIMEOUT + 1;
HANDLE cancel_event = pthread::get_cancel_event ();
@@ -1728,37 +1769,37 @@ flock (int fd, int operation)
int cmd;
struct flock fl = { 0, SEEK_SET, 0, 0, 0 };
- myfault efault;
- if (efault.faulted (EFAULT))
- return -1;
-
- cygheap_fdget cfd (fd, true);
- if (cfd < 0)
- goto done;
-
- cmd = (operation & LOCK_NB) ? F_SETLK : F_SETLKW;
- switch (operation & (~LOCK_NB))
+ __try
{
- case LOCK_EX:
- fl.l_type = F_WRLCK;
- break;
- case LOCK_SH:
- fl.l_type = F_RDLCK;
- break;
- case LOCK_UN:
- fl.l_type = F_UNLCK;
- break;
- default:
- set_errno (EINVAL);
- goto done;
+ cygheap_fdget cfd (fd);
+ if (cfd < 0)
+ __leave;
+
+ cmd = (operation & LOCK_NB) ? F_SETLK : F_SETLKW;
+ switch (operation & (~LOCK_NB))
+ {
+ case LOCK_EX:
+ fl.l_type = F_WRLCK;
+ break;
+ case LOCK_SH:
+ fl.l_type = F_RDLCK;
+ break;
+ case LOCK_UN:
+ fl.l_type = F_UNLCK;
+ break;
+ default:
+ set_errno (EINVAL);
+ __leave;
+ }
+ if (!cfd->mandatory_locking ())
+ fl.l_type |= F_FLOCK;
+ res = cfd->mandatory_locking () ? cfd->mand_lock (cmd, &fl)
+ : cfd->lock (cmd, &fl);
+ if ((res == -1) && ((get_errno () == EAGAIN) || (get_errno () == EACCES)))
+ set_errno (EWOULDBLOCK);
}
- if (!cfd->mandatory_locking ())
- fl.l_type |= F_FLOCK;
- res = cfd->mandatory_locking () ? cfd->mand_lock (cmd, &fl)
- : cfd->lock (cmd, &fl);
- if ((res == -1) && ((get_errno () == EAGAIN) || (get_errno () == EACCES)))
- set_errno (EWOULDBLOCK);
-done:
+ __except (EFAULT) {}
+ __endtry
syscall_printf ("%R = flock(%d, %d)", res, fd, operation);
return res;
}
@@ -1772,50 +1813,50 @@ lockf (int filedes, int function, off_t size)
pthread_testcancel ();
- myfault efault;
- if (efault.faulted (EFAULT))
- return -1;
-
- cygheap_fdget cfd (filedes, true);
- if (cfd < 0)
- goto done;
+ __try
+ {
+ cygheap_fdget cfd (filedes);
+ if (cfd < 0)
+ __leave;
- fl.l_start = 0;
- fl.l_len = size;
- fl.l_whence = SEEK_CUR;
+ fl.l_start = 0;
+ fl.l_len = size;
+ fl.l_whence = SEEK_CUR;
- switch (function)
- {
- case F_ULOCK:
- cmd = F_SETLK;
- fl.l_type = F_UNLCK;
- break;
- case F_LOCK:
- cmd = F_SETLKW;
- fl.l_type = F_WRLCK;
- break;
- case F_TLOCK:
- cmd = F_SETLK;
- fl.l_type = F_WRLCK;
- break;
- case F_TEST:
- fl.l_type = F_WRLCK;
- if (cfd->lock (F_GETLK, &fl) == -1)
- goto done;
- if (fl.l_type == F_UNLCK || fl.l_pid == getpid ())
- res = 0;
- else
- errno = EAGAIN;
- goto done;
- /* NOTREACHED */
- default:
- errno = EINVAL;
- goto done;
- /* NOTREACHED */
+ switch (function)
+ {
+ case F_ULOCK:
+ cmd = F_SETLK;
+ fl.l_type = F_UNLCK;
+ break;
+ case F_LOCK:
+ cmd = F_SETLKW;
+ fl.l_type = F_WRLCK;
+ break;
+ case F_TLOCK:
+ cmd = F_SETLK;
+ fl.l_type = F_WRLCK;
+ break;
+ case F_TEST:
+ fl.l_type = F_WRLCK;
+ if (cfd->lock (F_GETLK, &fl) == -1)
+ __leave;
+ if (fl.l_type == F_UNLCK || fl.l_pid == getpid ())
+ res = 0;
+ else
+ errno = EAGAIN;
+ __leave;
+ /* NOTREACHED */
+ default:
+ errno = EINVAL;
+ __leave;
+ /* NOTREACHED */
+ }
+ res = cfd->mandatory_locking () ? cfd->mand_lock (cmd, &fl)
+ : cfd->lock (cmd, &fl);
}
- res = cfd->mandatory_locking () ? cfd->mand_lock (cmd, &fl)
- : cfd->lock (cmd, &fl);
-done:
+ __except (EFAULT) {}
+ __endtry
syscall_printf ("%R = lockf(%d, %d, %D)", res, filedes, function, size);
return res;
}
diff --git a/winsup/cygwin/fork.cc b/winsup/cygwin/fork.cc
index 58b109fa9..ef5a26843 100644
--- a/winsup/cygwin/fork.cc
+++ b/winsup/cygwin/fork.cc
@@ -1,8 +1,5 @@
/* fork.cc
- Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008, 2009, 2010, 2011, 2012 Red Hat, Inc.
-
This file is part of Cygwin.
This software is a copyrighted work licensed under the terms of the
@@ -149,7 +146,7 @@ frok::child (volatile char * volatile here)
/* If we've played with the stack, stacksize != 0. That means that
fork() was invoked from other than the main thread. Make sure that
the threadinfo information is properly set up. */
- if (fork_info->stackaddr)
+ if (!fork_info->from_main)
{
_main_tls = &_my_tls;
_main_tls->init_thread (NULL, NULL);
@@ -174,8 +171,6 @@ frok::child (volatile char * volatile here)
}
#endif
- MALLOC_CHECK;
-
/* Incredible but true: If we use sockets and SYSV IPC shared memory,
there's a good chance that a duplicated socket in the child occupies
memory which is needed to duplicate shared memory from the parent
@@ -186,8 +181,6 @@ frok::child (volatile char * volatile here)
if (fixup_shms_after_fork ())
api_fatal ("recreate_shm areas after fork failed");
- MALLOC_CHECK;
-
/* If we haven't dynamically loaded any dlls, just signal
the parent. Otherwise, load all the dlls, tell the parent
that we're done, and wait for the parent to fill in the.
@@ -307,30 +300,34 @@ frok::parent (volatile char * volatile stack_here)
ch.forker_finished = forker_finished;
- PTEB teb = NtCurrentTeb ();
- ch.stackbottom = _tlsbase;
- ch.stacktop = (void *) _tlstop;
- ch.stackaddr = teb->DeallocationStack;
- ch.guardsize = 0;
- if (&_my_tls != _main_tls)
+ ch.from_main = &_my_tls == _main_tls;
+ ch.stackbase = NtCurrentTeb ()->Tib.StackBase;
+ ch.stackaddr = NtCurrentTeb ()->DeallocationStack;
+ if (!ch.stackaddr)
{
- /* We have not been started from the main thread. Fetch the
- information required to set up the thread stack identically
- in the child. */
- if (!ch.stackaddr)
- {
- /* Pthread with application-provided stack. Don't set up a
- PAGE_GUARD page. guardsize == -1 is used in alloc_stack_hard_way
- to recognize this type of stack. */
- ch.stackaddr = _my_tls.tid->attr.stackaddr;
- ch.guardsize = (size_t) -1;
- }
- else if (_my_tls.tid)
- /* If it's a pthread, fetch guardsize from thread attributes. */
- ch.guardsize = _my_tls.tid->attr.guardsize;
+ /* If DeallocationStack is NULL, we're running on an application-provided
+ stack. If so, the entire stack is committed anyway and StackLimit
+ points to the allocation address of the stack. Mark in guardsize that
+ we must not set up guard pages. */
+ ch.stackaddr = ch.stacklimit = NtCurrentTeb ()->Tib.StackLimit;
+ ch.guardsize = (size_t) -1;
+ }
+ else
+ {
+ /* Otherwise we're running on a system-allocated stack. Since stack_here
+ is the address of the stack pointer we start the child with anyway, we
+ can set ch.stacklimit to this value rounded down to page size. The
+ child will not need the rest of the stack anyway. Guardsize depends
+ on whether we're running on a pthread or not. If pthread, we fetch
+ the guardpage size from the pthread attribs, otherwise we use the
+ system default. */
+ ch.stacklimit = (void *) ((uintptr_t) stack_here & ~wincap.page_size ());
+ ch.guardsize = (&_my_tls != _main_tls && _my_tls.tid)
+ ? _my_tls.tid->attr.guardsize
+ : wincap.def_guard_page_size ();
}
debug_printf ("stack - bottom %p, top %p, addr %p, guardsize %ly",
- ch.stackbottom, ch.stacktop, ch.stackaddr, ch.guardsize);
+ ch.stackbase, ch.stacklimit, ch.stackaddr, ch.guardsize);
PROCESS_INFORMATION pi;
STARTUPINFOW si;
@@ -344,7 +341,6 @@ frok::parent (volatile char * volatile stack_here)
syscall_printf ("CreateProcessW (%W, %W, 0, 0, 1, %y, 0, 0, %p, %p)",
myself->progname, myself->progname, c_flags, &si, &pi);
bool locked = __malloc_lock ();
- time_t start_time = time (NULL);
/* Remove impersonation */
cygheap->user.deimpersonate ();
@@ -412,7 +408,7 @@ frok::parent (volatile char * volatile stack_here)
fix_impersonation = false;
child_pid = cygwin_pid (pi.dwProcessId);
- child.init (child_pid, 1, NULL);
+ child.init (child_pid, PID_IN_USE | PID_NEW, NULL);
if (!child)
{
@@ -421,7 +417,6 @@ frok::parent (volatile char * volatile stack_here)
goto cleanup;
}
- child->start_time = start_time; /* Register child's starting time. */
child->nice = myself->nice;
/* Initialize things that are done later in dll_crt0_1 that aren't done
@@ -461,7 +456,6 @@ frok::parent (volatile char * volatile stack_here)
Note: variables marked as NO_COPY will not be copied since they are
placed in a protected segment. */
- MALLOC_CHECK;
const void *impure_beg;
const void *impure_end;
const char *impure;
@@ -474,13 +468,12 @@ frok::parent (volatile char * volatile stack_here)
impure_end = _impure_ptr + 1;
}
rc = child_copy (hchild, true,
- "stack", stack_here, ch.stackbottom,
+ "stack", stack_here, ch.stackbase,
impure, impure_beg, impure_end,
NULL);
__malloc_unlock ();
locked = false;
- MALLOC_CHECK;
if (!rc)
{
this_errno = get_errno ();
@@ -620,7 +613,6 @@ fork ()
}
}
- MALLOC_CHECK;
if (ischild)
{
myself->process_state |= PID_ACTIVE;
@@ -681,7 +673,7 @@ child_copy (HANDLE hp, bool write, ...)
SIZE_T done = 0;
if (here + todo > high)
todo = high - here;
- int res;
+ BOOL res;
if (write)
res = WriteProcessMemory (hp, here, here, todo, &done);
else
diff --git a/winsup/cygwin/gcrt0.c b/winsup/cygwin/gcrt0.c
index 87c7d36ad..f02b3be59 100644
--- a/winsup/cygwin/gcrt0.c
+++ b/winsup/cygwin/gcrt0.c
@@ -1,7 +1,5 @@
/* gcrt0.c
- Copyright 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
-
This file is part of Cygwin.
This software is a copyrighted work licensed under the terms of the
@@ -20,8 +18,8 @@ details. */
#include <_bsd_types.h>
#endif
-extern u_char etext asm ("etext");
-extern u_char eprol asm ("__eprol");
+extern uint8_t etext asm ("etext");
+extern uint8_t eprol asm ("__eprol");
extern void _mcleanup (void);
extern void monstartup (size_t, size_t);
void _monstartup (void) __attribute__((__constructor__));
diff --git a/winsup/cygwin/gendef b/winsup/cygwin/gendef
index 2bb790588..431ec67d3 100755
--- a/winsup/cygwin/gendef
+++ b/winsup/cygwin/gendef
@@ -1,6 +1,4 @@
#!/usr/bin/perl
-# Copyright 2003, 2004, 2005, 2006, 2008, 2009, 2010, 2011, 2012, 2013
-# Red Hat, Inc.
#
# This file is part of Cygwin.
#
@@ -164,7 +162,8 @@ _sigfe: # stack is aligned on entry!
jmp *%rax # and jmp to it
.seh_endproc
- .seh_proc _sigfe
+ .global _sigbe
+ .seh_proc _sigbe
_sigbe: # return here after cygwin syscall
# stack is aligned on entry!
.seh_endprologue
@@ -188,10 +187,12 @@ _sigbe: # return here after cygwin syscall
.seh_proc sigdelayed
sigdelayed:
pushq %r10 # used for return address injection
- .seh_pushreg %rbp
+ .seh_pushreg %r10
pushq %rbp
.seh_pushreg %rbp
movq %rsp,%rbp
+ pushf
+ .seh_pushreg %rax # fake, there's no .seh_pushreg for the flags
# stack is aligned or unaligned on entry!
# make sure it is aligned from here on
# We could be called from an interrupted thread which doesn't know
@@ -224,9 +225,10 @@ sigdelayed:
.seh_pushreg %rbx
pushq %rax
.seh_pushreg %rax
- pushf
- subq \$0x120,%rsp
- .seh_stackalloc 0x120
+ subq \$0x128,%rsp
+ .seh_stackalloc 0x128
+ stmxcsr 0x124(%rsp)
+ fnstcw 0x120(%rsp)
movdqa %xmm15,0x110(%rsp)
movdqa %xmm14,0x100(%rsp)
movdqa %xmm13,0xf0(%rsp)
@@ -285,8 +287,10 @@ sigdelayed:
movdqa 0xf0(%rsp),%xmm13
movdqa 0x100(%rsp),%xmm14
movdqa 0x110(%rsp),%xmm15
- addq \$0x120,%rsp
- popf
+ fninit
+ fldcw 0x120(%rsp)
+ ldmxcsr 0x124(%rsp)
+ addq \$0x128,%rsp
popq %rax
popq %rbx
popq %rcx
@@ -301,10 +305,14 @@ sigdelayed:
popq %r14
popq %r15
movq %rbp,%rsp
+ subq \$8, %rsp
+ popf
popq %rbp
xchgq %r10,(%rsp)
ret
.seh_endproc
+_sigdelayed_end:
+ .global _sigdelayed_end
# _cygtls::pop
.global _ZN7_cygtls3popEv
@@ -363,7 +371,7 @@ stabilize_sig_stack:
movq %gs:8,%r12
1: movl \$1,%r10d
xchgl %r10d,$tls::stacklock(%r12)
- movl %r10d,$tls::spinning(%r12) # flag if we are waiting for lock
+ movl %r10d,$tls::spinning(%r12) # flag if we are waiting for lock
testl %r10d,%r10d
jz 2f
pause
@@ -371,14 +379,14 @@ stabilize_sig_stack:
2: incl $tls::incyg(%r12)
cmpl \$0,$tls::sig(%r12)
jz 3f
- decl $tls::stacklock(%r12) # unlock
- movq \$$tls::start_offset,%rcx # point to beginning
- addq %r12,%rcx # of tls block
+ decl $tls::stacklock(%r12) # unlock
+ movq \$$tls::start_offset,%rcx # point to beginning
+ addq %r12,%rcx # of tls block
call _ZN7_cygtls19call_signal_handlerEv
jmp 1b
3: decl $tls::incyg(%r12)
addq \$0x20,%rsp
- movq %r12,%r11 # return tls addr in r11
+ movq %r12,%r11 # return tls addr in r11
popq %r12
ret
.seh_endproc
@@ -390,13 +398,13 @@ EOF
__sigfe_maybe:
pushl %ebx
pushl %edx
- movl %fs:4,%ebx # location of bottom of stack
- addl \$$tls::initialized,%ebx # where we will be looking
- cmpl %ebx,%esp # stack loc > than tls
- jge 0f # yep. we don't have a tls.
- subl \$$tls::initialized,%ebx # where we will be looking
+ movl %fs:4,%ebx # location of bottom of stack
+ addl \$$tls::initialized,%ebx # where we will be looking
+ cmpl %ebx,%esp # stack loc > than tls
+ jge 0f # yep. we don't have a tls.
+ subl \$$tls::initialized,%ebx # where we will be looking
movl $tls::initialized(%ebx),%eax
- cmpl \$0xc763173f,%eax # initialized?
+ cmpl \$0xc763173f,%eax # initialized?
je 1f
0: popl %edx
popl %ebx
@@ -405,43 +413,43 @@ __sigfe_maybe:
__sigfe:
pushl %ebx
pushl %edx
- movl %fs:4,%ebx # location of bottom of stack
-1: movl \$1,%eax # potential lock value
- xchgl %eax,$tls::stacklock(%ebx) # see if we can grab it
- movl %eax,$tls::spinning(%ebx) # flag if we are waiting for lock
- testl %eax,%eax # it will be zero
- jz 2f # if so
- call _yield # should be a short-time thing, so
- jmp 1b # sleep and loop
-2: movl \$4,%eax # have the lock, now increment the
- xadd %eax,$tls::stackptr(%ebx) # stack pointer and get pointer
- leal __sigbe,%edx # new place to return to
- xchgl %edx,12(%esp) # exchange with real return value
- movl %edx,(%eax) # store real return value on alt stack
+ movl %fs:4,%ebx # location of bottom of stack
+1: movl \$1,%eax # potential lock value
+ xchgl %eax,$tls::stacklock(%ebx) # see if we can grab it
+ movl %eax,$tls::spinning(%ebx) # flag if we are waiting for lock
+ testl %eax,%eax # it will be zero
+ jz 2f # if so
+ call _yield # should be a short-time thing, so
+ jmp 1b # sleep and loop
+2: movl \$4,%eax # have the lock, now increment the
+ xadd %eax,$tls::stackptr(%ebx) # stack pointer and get pointer
+ leal __sigbe,%edx # new place to return to
+ xchgl %edx,12(%esp) # exchange with real return value
+ movl %edx,(%eax) # store real return value on alt stack
incl $tls::incyg(%ebx)
- decl $tls::stacklock(%ebx) # remove lock
- popl %edx # restore saved value
+ decl $tls::stacklock(%ebx) # remove lock
+ popl %edx # restore saved value
popl %ebx
ret
.global __sigbe
-__sigbe: # return here after cygwin syscall
- pushl %eax # don't clobber
- pushl %ebx # tls pointer
-1: movl %fs:4,%ebx # address of bottom of tls
- movl \$1,%eax # potential lock value
- xchgl %eax,$tls::stacklock(%ebx) # see if we can grab it
- movl %eax,$tls::spinning(%ebx) # flag if we are waiting for lock
- testl %eax,%eax # it will be zero
- jz 2f # if so
- call _yield # sleep
- jmp 1b # and loop
-2: movl \$-4,%eax # now decrement aux stack
- xadd %eax,$tls::stackptr(%ebx) # and get pointer
- movl -4(%eax),%eax # get return address from signal stack
- xchgl %eax,4(%esp) # swap return address with saved eax
+__sigbe: # return here after cygwin syscall
+ pushl %eax # don't clobber
+ pushl %ebx # tls pointer
+1: movl %fs:4,%ebx # address of bottom of tls
+ movl \$1,%eax # potential lock value
+ xchgl %eax,$tls::stacklock(%ebx) # see if we can grab it
+ movl %eax,$tls::spinning(%ebx) # flag if we are waiting for lock
+ testl %eax,%eax # it will be zero
+ jz 2f # if so
+ call _yield # sleep
+ jmp 1b # and loop
+2: movl \$-4,%eax # now decrement aux stack
+ xadd %eax,$tls::stackptr(%ebx) # and get pointer
+ movl -4(%eax),%eax # get return address from signal stack
+ xchgl %eax,4(%esp) # swap return address with saved eax
decl $tls::incyg(%ebx)
- decl $tls::stacklock(%ebx) # release lock
+ decl $tls::stacklock(%ebx) # release lock
popl %ebx
ret
@@ -449,6 +457,8 @@ __sigbe: # return here after cygwin syscall
_sigdelayed:
pushl %ebp
movl %esp,%ebp
+ # We could be called from an interrupted thread which doesn't know
+ # about his fate, so save and restore everything and the kitchen sink.
pushf
pushl %esi
pushl %edi
@@ -456,6 +466,16 @@ _sigdelayed:
pushl %ecx
pushl %ebx
pushl %eax
+ subl \$0x84,%esp
+ fnstcw 0x80(%esp)
+ movdqu %xmm7,0x70(%esp)
+ movdqu %xmm6,0x60(%esp)
+ movdqu %xmm5,0x50(%esp)
+ movdqu %xmm4,0x40(%esp)
+ movdqu %xmm3,0x30(%esp)
+ movdqu %xmm2,0x20(%esp)
+ movdqu %xmm1,0x10(%esp)
+ movdqu %xmm0,(%esp)
movl %fs:4,%ebx # get tls
pushl $tls::saved_errno(%ebx) # saved errno
@@ -480,11 +500,22 @@ _sigdelayed:
xadd %eax,$tls::stackptr(%ebx) # and get pointer
xorl %ebp,%ebp
xchgl %ebp,-4(%eax) # get return address from signal stack
- xchgl %ebp,28(%esp) # store real return address
+ xchgl %ebp,0xa0(%esp) # store real return address
leave: xorl %eax,%eax
movl %eax,$tls::incyg(%ebx)
movl %eax,$tls::stacklock(%ebx) # unlock
+ movdqu (%esp),%xmm0
+ movdqu 0x10(%esp),%xmm1
+ movdqu 0x20(%esp),%xmm2
+ movdqu 0x30(%esp),%xmm3
+ movdqu 0x40(%esp),%xmm4
+ movdqu 0x50(%esp),%xmm5
+ movdqu 0x60(%esp),%xmm6
+ movdqu 0x70(%esp),%xmm7
+ fninit
+ fldcw 0x80(%esp)
+ addl \$0x84,%esp
popl %eax
popl %ebx
popl %ecx
@@ -559,14 +590,32 @@ sub longjmp {
if ($is64bit) {
return <<EOF;
+ .globl sigsetjmp
+ .seh_proc sigsetjmp
+sigsetjmp:
+ .seh_endprologue
+ movl %edx,0x100(%rcx) # store savemask
+ testl %edx,%edx # savemask != 0?
+ je setjmp # no, skip fetching sigmask
+ pushq %rcx
+ subq \$0x20,%rsp
+ leaq 0x108(%rcx),%r8 # &sigjmp_buf.sigmask
+ xorq %rdx,%rdx # NULL
+ xorl %ecx,%ecx # SIG_SETMASK
+ call pthread_sigmask
+ addq \$0x20,%rsp
+ popq %rcx
+ jmp setjmp
+ .seh_endproc
+
.globl setjmp
.seh_proc setjmp
setjmp:
.seh_endprologue
- # We use the Windows jmp_buf layout. Store ExceptionList in Frame.
- # Store alternative stackptr in Spare.
- movq %gs:0,%r10
- movq %r10,(%rcx)
+ # We use the Windows jmp_buf layout with two small twists.
+ # - we store the tls stackptr in Frame, MSVCRT stores a second copy
+ # of %rbp in Frame (twice? why?)
+ # - we just store %rsp as is, MSVCRT stores %rsp of the caller in Rsp
movq %rbx,0x8(%rcx)
movq %rsp,0x10(%rcx)
movq %rbp,0x18(%rcx)
@@ -578,6 +627,8 @@ setjmp:
movq %r15,0x48(%rcx)
movq (%rsp),%r10
movq %r10,0x50(%rcx)
+ stmxcsr 0x58(%rcx)
+ fnstcw 0x5c(%rcx)
# jmp_buf is potentially unaligned!
movdqu %xmm6,0x60(%rcx)
movdqu %xmm7,0x70(%rcx)
@@ -594,77 +645,29 @@ setjmp:
call stabilize_sig_stack # returns tls in r11
popq %rcx
movq $tls::stackptr(%r11),%r10
- movq %r10,0x58(%rcx)
+ movq %r10,(%rcx)
decl $tls::stacklock(%r11)
- movl \$0,%eax
+ xorl %eax,%eax
ret
.seh_endproc
- .globl __sjfault
- .seh_proc __sjfault
-__sjfault:
+ .globl siglongjmp
+ .seh_proc siglongjmp
+siglongjmp:
+ pushq %rcx
+ .seh_pushreg %rcx
.seh_endprologue
- # Like setjmp, just w/o storing the alternate stackptr.
- movq %gs:0,%r10
- movq %r10,(%rcx)
- movq %rbx,0x8(%rcx)
- movq %rsp,0x10(%rcx)
- movq %rbp,0x18(%rcx)
- movq %rsi,0x20(%rcx)
- movq %rdi,0x28(%rcx)
- movq %r12,0x30(%rcx)
- movq %r13,0x38(%rcx)
- movq %r14,0x40(%rcx)
- movq %r15,0x48(%rcx)
- movq (%rsp),%r10
- movq %r10,0x50(%rcx)
- # jmp_buf is potentially unaligned!
- movdqu %xmm6,0x60(%rcx)
- movdqu %xmm7,0x70(%rcx)
- movdqu %xmm8,0x80(%rcx)
- movdqu %xmm9,0x90(%rcx)
- movdqu %xmm10,0xa0(%rcx)
- movdqu %xmm11,0xb0(%rcx)
- movdqu %xmm12,0xc0(%rcx)
- movdqu %xmm13,0xd0(%rcx)
- movdqu %xmm14,0xe0(%rcx)
- movdqu %xmm15,0xf0(%rcx)
- movl \$0,%eax
- ret
- .seh_endproc
-
- .globl __ljfault
- .seh_proc __ljfault
-__ljfault:
- movq (%rcx),%r10
- movq %r10,%gs:0
- movq 0x8(%rcx),%rbx
- movq 0x10(%rcx),%rsp
- movq 0x18(%rcx),%rbp
- movq 0x20(%rcx),%rsi
- movq 0x28(%rcx),%rdi
- movq 0x30(%rcx),%r12
- movq 0x38(%rcx),%r13
- movq 0x40(%rcx),%r14
- movq 0x48(%rcx),%r15
- movq 0x50(%rcx),%r10
- movq %r10,(%rsp)
- # jmp_buf is potentially unaligned!
- movdqu 0x60(%rcx),%xmm6
- movdqu 0x70(%rcx),%xmm7
- movdqu 0x80(%rcx),%xmm8
- movdqu 0x90(%rcx),%xmm9
- movdqu 0xa0(%rcx),%xmm10
- movdqu 0xb0(%rcx),%xmm11
- movdqu 0xc0(%rcx),%xmm12
- movdqu 0xd0(%rcx),%xmm13
- movdqu 0xe0(%rcx),%xmm14
- movdqu 0xf0(%rcx),%xmm15
- movl %edx,%eax
- testl %eax,%eax
- jne 0f
- incl %eax
-0: ret
+ movl %edx, %r12d
+ movl 0x100(%rcx),%r8d # savemask
+ testl %r8d,%r8d # savemask != 0?
+ je 1f # no, jmp to longjmp
+ xorq %r8,%r8 # NULL
+ leaq 0x108(%rcx),%rdx # &sigjmp_buf.sigmask
+ xorl %ecx,%ecx # SIG_SETMASK
+ subq \$0x20,%rsp
+ call pthread_sigmask
+ addq \$0x20,%rsp
+ jmp 1f
.seh_endproc
.globl longjmp
@@ -673,17 +676,16 @@ longjmp:
pushq %rcx
.seh_pushreg %rcx
.seh_endprologue
- movl %edx,%r12d # save return value (r12 is overwritten anyway)
+ movl %edx,%r12d # save return value
+1:
call stabilize_sig_stack # returns tls in r11
popq %rcx
movl %r12d,%eax # restore return value
- movq 0x58(%rcx),%r10 # get old signal stack
+ movq (%rcx),%r10 # get old signal stack
movq %r10,$tls::stackptr(%r11) # restore
decl $tls::stacklock(%r11) # relinquish lock
xorl %r10d,%r10d
- movl %r10d,$tls::incyg(%r11) # we're definitely not in cygwin anymore
- movq (%rcx),%r10
- movq %r10,%gs:0
+ movl %r10d,$tls::incyg(%r11) # we're not in cygwin anymore
movq 0x8(%rcx),%rbx
movq 0x10(%rcx),%rsp
movq 0x18(%rcx),%rbp
@@ -695,6 +697,9 @@ longjmp:
movq 0x48(%rcx),%r15
movq 0x50(%rcx),%r10
movq %r10,(%rsp)
+ ldmxcsr 0x58(%rcx)
+ fnclex
+ fldcw 0x5c(%rcx)
# jmp_buf is potentially unaligned!
movdqu 0x60(%rcx),%xmm6
movdqu 0x70(%rcx),%xmm7
@@ -715,12 +720,33 @@ EOF
} else {
return <<EOF;
+ .globl _sigsetjmp
+_sigsetjmp:
+ pushl %ebp
+ movl %esp,%ebp
+ pushl %edi
+ movl 8(%ebp),%edi # &sigjmp_buf
+ movl 12(%ebp),%eax # savemask
+ movl %eax,208(%edi) # store savemask
+ testl %eax,%eax # savemask != 0?
+ je 1f # no, skip fetching sigmask
+ subl \$12,%esp
+ leal 212(%edi),%eax # &sigjmp_buf.sigmask
+ movl %eax,8(%esp) # -> 3rd param "oldset"
+ xorl %eax,%eax
+ movl %eax,4(%esp) # NULL -> 2nd param "set"
+ movl %eax,(%esp) # SIG_SETMASK -> 1st param "how"
+ call _pthread_sigmask
+ addl \$12,%esp
+ jmp 1f
+
.globl _setjmp
_setjmp:
pushl %ebp
movl %esp,%ebp
pushl %edi
movl 8(%ebp),%edi
+1:
movl %eax,0(%edi)
movl %ebx,4(%edi)
movl %ecx,8(%edi)
@@ -745,12 +771,13 @@ _setjmp:
movw %ax,42(%edi)
movl %fs:0,%eax
movl %eax,44(%edi)
+ fnstcw 48(%edi)
pushl %ebx
call stabilize_sig_stack
- movl $tls::stackptr(%ebx),%eax # save stack pointer contents
+ movl $tls::stackptr(%ebx),%eax # save stack pointer contents
decl $tls::stacklock(%ebx)
popl %ebx
- movl %eax,48(%edi)
+ movl %eax,52(%edi)
popl %edi
movl \$0,%eax
leave
@@ -826,17 +853,36 @@ ___ljfault:
popfl
ret
+ .globl _siglongjmp
+_siglongjmp:
+ pushl %ebp
+ movl %esp,%ebp
+ movl 8(%ebp),%edi # &sigjmp_buf
+ movl 208(%edi),%eax # load savemask
+ testl %eax,%eax # savemask != 0?
+ je 1f # no, skip restoring sigmask
+ subl \$12,%esp
+ leal 212(%edi),%eax # &sigjmp_buf.sigmask
+ movl %eax,4(%esp) # -> 2nd param "set"
+ xorl %eax,%eax
+ movl %eax,8(%esp) # NULL -> 3rd param "oldset"
+ movl %eax,(%esp) # SIG_SETMASK -> 1st param "how"
+ call _pthread_sigmask
+ addl \$12,%esp
+ jmp 1f
+
.globl _longjmp
_longjmp:
pushl %ebp
movl %esp,%ebp
- movl 8(%ebp),%edi # address of buffer
+ movl 8(%ebp),%edi # &jmp_buf
+1:
call stabilize_sig_stack
- movl 48(%edi),%eax # get old signal stack
- movl %eax,$tls::stackptr(%ebx) # restore
- decl $tls::stacklock(%ebx) # relinquish lock
+ movl 52(%edi),%eax # get old signal stack
+ movl %eax,$tls::stackptr(%ebx) # restore
+ decl $tls::stacklock(%ebx) # relinquish lock
xorl %eax,%eax
- movl %eax,$tls::incyg(%ebx) # we're definitely not in cygwin anymore
+ movl %eax,$tls::incyg(%ebx) # we're not in cygwin anymore
movl 12(%ebp),%eax
testl %eax,%eax
@@ -847,6 +893,8 @@ _longjmp:
movl 24(%edi),%ebp
pushfl
popl %ebx
+ fninit
+ fldcw 48(%edi)
movl 44(%edi),%eax
movl %eax,%fs:0
movw 42(%edi),%ax
diff --git a/winsup/cygwin/gendevices b/winsup/cygwin/gendevices
index 3e514bcab..33c70ce6e 100755
--- a/winsup/cygwin/gendevices
+++ b/winsup/cygwin/gendevices
@@ -1,5 +1,4 @@
#!/usr/bin/perl
-# Copyright 2003, 2004, 2005, 2006, 2012 Red Hat, Inc.
#
# This file is part of Cygwin.
#
diff --git a/winsup/cygwin/gentls_offsets b/winsup/cygwin/gentls_offsets
index e4543f597..745ea27a0 100755
--- a/winsup/cygwin/gentls_offsets
+++ b/winsup/cygwin/gentls_offsets
@@ -1,5 +1,4 @@
#!/usr/bin/perl -s
-# Copyright 2003, 2004, 2005, 2012, 2013 Red Hat, Inc.
#
# This file is part of Cygwin.
#
diff --git a/winsup/cygwin/glob.cc b/winsup/cygwin/glob.cc
index 296cd7fbc..b61436de1 100644
--- a/winsup/cygwin/glob.cc
+++ b/winsup/cygwin/glob.cc
@@ -103,7 +103,6 @@ __FBSDID("$FreeBSD: src/lib/libc/gen/glob.c,v 1.28 2010/05/12 17:44:00 gordon Ex
#define getpwuid(uid) getpwuid32 (uid)
#define getuid() getuid32 ()
-#define issetugid() (cygheap->user.issetuid ())
#define CCHAR(c) (ignore_case_with_glob ? towlower (CHAR (c)) : CHAR (c))
#define Cchar(c) (ignore_case_with_glob ? towlower (c) : (c))
@@ -186,7 +185,7 @@ static void qprintf(const char *, Char *);
#endif
int
-glob(const char *pattern, int flags, int (*errfunc)(const char *, int), glob_t *pglob)
+glob(const char *__restrict pattern, int flags, int (*errfunc)(const char *, int), glob_t *__restrict pglob)
{
const char *patnext;
size_t limit;
diff --git a/winsup/cygwin/globals.cc b/winsup/cygwin/globals.cc
index fa32749ba..5d25c4085 100644
--- a/winsup/cygwin/globals.cc
+++ b/winsup/cygwin/globals.cc
@@ -1,8 +1,5 @@
/* globals.cc - Define global variables here.
- Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008, 2009, 2010, 2011, 2012, 2013 Red Hat, Inc.
-
This file is part of Cygwin.
This software is a copyrighted work licensed under the terms of the
@@ -13,7 +10,6 @@ details. */
#include "winsup.h"
#include "cygtls.h"
#include "perprocess.h"
-#include "cygprops.h"
#include "thread.h"
#include <malloc.h>
#include <cygwin/version.h>
@@ -23,6 +19,7 @@ HANDLE NO_COPY hProcToken;
HANDLE NO_COPY hProcImpToken;
HANDLE my_wr_proc_pipe;
HMODULE NO_COPY cygwin_hmodule;
+HMODULE NO_COPY hntdll;
int NO_COPY sigExeced;
WCHAR windows_system_directory[MAX_PATH];
UINT windows_system_directory_length;
@@ -30,6 +27,7 @@ UINT windows_system_directory_length;
WCHAR system_wow64_directory[MAX_PATH];
UINT system_wow64_directory_length;
#endif /* !__x86_64__ */
+WCHAR global_progname[NT_MAX_PATH];
/* program exit the program */
@@ -68,12 +66,12 @@ int NO_COPY dynamically_loaded;
/* Some CYGWIN environment variable variables. */
bool allow_glob = true;
bool detect_bloda;
-bool dos_file_warning = true;
+bool dos_file_warning;
bool ignore_case_with_glob;
bool pipe_byte;
bool reset_com;
bool wincmdln;
-winsym_t allow_winsymlinks = WSYM_sysfile;
+winsym_t allow_winsymlinks = WSYM_lnk;
bool NO_COPY in_forkee;
@@ -87,9 +85,6 @@ int NO_COPY __isthreaded = 0;
int __argc_safe;
int __argc;
char **__argv;
-#ifdef NEWVFORK
-vfork_save NO_COPY *main_vfork;
-#endif
_cygtls NO_COPY *_main_tls /* !globals.h */;
@@ -101,6 +96,9 @@ char NO_COPY almost_null[1];
extern "C" {
+/* We never have a collate load error. */
+const int __collate_load_error = 0;
+
/* Heavily-used const UNICODE_STRINGs are defined here once. The idea is a
speed improvement by not having to initialize a UNICODE_STRING every time
we make a string comparison. The _RDATA trick allows defining the strings
@@ -136,6 +134,9 @@ extern "C" {
extern UNICODE_STRING _RDATA ro_u_mvfs = _ROU (L"MVFS");
extern UNICODE_STRING _RDATA ro_u_nfs = _ROU (L"NFS");
extern UNICODE_STRING _RDATA ro_u_ntfs = _ROU (L"NTFS");
+ /* No typo! It's actually "SF", not "FS", and the trailing NUL is counted
+ in the reply from the filesystem. */
+ extern UNICODE_STRING _RDATA ro_u_prlfs = _ROU (L"PrlSF\0");
extern UNICODE_STRING _RDATA ro_u_refs = _ROU (L"ReFS");
extern UNICODE_STRING _RDATA ro_u_sunwnfs = _ROU (L"SUNWNFS");
extern UNICODE_STRING _RDATA ro_u_udf = _ROU (L"UDF");
@@ -146,21 +147,12 @@ extern "C" {
extern UNICODE_STRING _RDATA ro_u_volume = _ROU (L"\\??\\Volume{");
extern UNICODE_STRING _RDATA ro_u_pipedir = _ROU (L"\\\\?\\PIPE\\");
extern UNICODE_STRING _RDATA ro_u_globalroot = _ROU (L"\\\\.\\GLOBALROOT");
+ extern UNICODE_STRING _RDATA ro_u_null = _ROU (L"\\Device\\Null");
+ extern UNICODE_STRING _RDATA ro_u_natdir = _ROU (L"Directory");
+ extern UNICODE_STRING _RDATA ro_u_natsyml = _ROU (L"SymbolicLink");
+ extern UNICODE_STRING _RDATA ro_u_natdev = _ROU (L"Device");
#undef _ROU
- /* Cygwin properties are meant to be readonly data placed in the DLL, but
- which can be changed by external tools to make adjustments to the
- behaviour of a DLL based on the binary of the DLL itself. This is
- different from $CYGWIN since it only affects that very DLL, not all
- DLLs which have access to the $CYGWIN environment variable. We use the
- same _RDATA trick as for the above UNICODE_STRINGs. */
- extern cygwin_props_t _RDATA cygwin_props =
- {
- CYGWIN_PROPS_MAGIC,
- sizeof (cygwin_props_t),
- 0
- };
-
/* This is an exported copy of environ which can be used by DLLs
which use cygwin.dll. */
char **__cygwin_environ;
diff --git a/winsup/cygwin/gmon.c b/winsup/cygwin/gmon.c
index 96b1189ee..b31842cd9 100644
--- a/winsup/cygwin/gmon.c
+++ b/winsup/cygwin/gmon.c
@@ -117,9 +117,9 @@ monstartup (size_t lowpc, size_t highpc)
p->tos = (struct tostruct *)cp;
cp += p->tossize;
- p->kcount = (u_short *)cp;
+ p->kcount = (u_int16_t *)cp;
cp += p->kcountsize;
- p->froms = (u_short *)cp;
+ p->froms = (u_int16_t *)cp;
/* XXX minbrk needed? */
//minbrk = fake_sbrk(0);
@@ -151,7 +151,6 @@ void _mcleanup (void);
void
_mcleanup(void)
{
- static char gmon_out[] = "gmon.out";
int fd;
int hz;
int fromindex;
@@ -161,7 +160,8 @@ _mcleanup(void)
struct rawarc rawarc;
struct gmonparam *p = &_gmonparam;
struct gmonhdr gmonhdr, *hdr;
- const char *proffile;
+ char *filename = (char *) "gmon.out";
+ char *prefix;
#ifdef DEBUG
int log, len;
char dbuf[200];
@@ -173,58 +173,44 @@ _mcleanup(void)
hz = PROF_HZ;
moncontrol(0);
-#ifdef nope
- if ((profdir = getenv("PROFDIR")) != NULL) {
- extern char *__progname;
- char *s, *t, *limit;
- pid_t pid;
- long divisor;
-
- /* If PROFDIR contains a null value, no profiling
- output is produced */
- if (*profdir == '\0') {
- return;
- }
-
- limit = buf + sizeof buf - 1 - 10 - 1 -
- strlen(__progname) - 1;
- t = buf;
- s = profdir;
- while((*t = *s) != '\0' && t < limit) {
- t++;
- s++;
- }
- *t++ = '/';
-
- /*
- * Copy and convert pid from a pid_t to a string. For
- * best performance, divisor should be initialized to
- * the largest power of 10 less than PID_MAX.
- */
- pid = getpid();
- divisor=10000;
- while (divisor > pid) divisor /= 10; /* skip leading zeros */
- do {
- *t++ = (pid/divisor) + '0';
+ /* We copy an undocumented glibc feature: customizing the profiler's
+ output file name somewhat, depending on the env var GMON_OUT_PREFIX.
+ if GMON_OUT_PREFIX is unspecified, the file's name is "gmon.out".
+
+ if GMON_OUT_PREFIX is specified with at least one character, the
+ file's name is computed as "$GMON_OUT_PREFIX.$pid".
+
+ if GMON_OUT_PREFIX is specified but contains no characters, the
+ file's name is computed as "gmon.out.$pid". Cygwin-specific.
+ */
+ if ((prefix = getenv("GMON_OUT_PREFIX")) != NULL) {
+ char *buf;
+ /* Covers positive pid_t values. */
+ int32_t divisor = 1000*1000*1000;
+ pid_t pid = getpid();
+ size_t len = strlen(prefix);
+
+ if (len == 0)
+ len = strlen(prefix = filename);
+ buf = alloca(len + 13);// allow for '.', 10-digit pid, NUL, +1
+
+ memcpy(buf, prefix, len);
+ buf[len++] = '.';
+
+ while (divisor > pid) // skip leading zeroes
+ divisor /= 10;
+ do { // convert pid to digits and store 'em
+ buf[len++] = (pid / divisor) + '0';
pid %= divisor;
} while (divisor /= 10);
- *t++ = '.';
-
- s = __progname;
- while ((*t++ = *s++) != '\0')
- ;
- proffile = buf;
- } else {
- proffile = gmon_out;
+ buf[len] = '\0';
+ filename = buf;
}
-#else
- proffile = gmon_out;
-#endif
- fd = open(proffile , O_CREAT|O_TRUNC|O_WRONLY|O_BINARY, 0666);
+ fd = open(filename, O_CREAT|O_TRUNC|O_WRONLY|O_BINARY, 0666);
if (fd < 0) {
- perror( proffile );
+ perror(filename);
return;
}
#ifdef DEBUG
diff --git a/winsup/cygwin/gmon.h b/winsup/cygwin/gmon.h
index 919a1f21c..38070d3c7 100644
--- a/winsup/cygwin/gmon.h
+++ b/winsup/cygwin/gmon.h
@@ -44,11 +44,30 @@
#define __P(x) x
#endif
+/* On POSIX systems, profile.h is a KRB5 header. To avoid collisions, just
+ pull in profile.h's content here. The profile.h header won't be provided
+ by Mingw-w64 anymore at one point. */
+#if 0
#include <profile.h>
+#else
+#ifndef _WIN64
+#define _MCOUNT_CALL __attribute__ ((regparm (2)))
+extern void _mcount(void);
+#else
+#define _MCOUNT_CALL
+extern void mcount(void);
+#endif
+#define _MCOUNT_DECL __attribute__((gnu_inline)) __inline__ \
+ void _MCOUNT_CALL _mcount_private
+#define MCOUNT
+#endif
#ifdef __MINGW32__
#include <_bsd_types.h>
#endif /* __MINGW32__*/
+#ifdef __CYGWIN__
+#include <winsup.h>
+#endif
/*
* Structure prepended to gmon.out profiling data file.
@@ -111,10 +130,10 @@ struct gmonhdr {
#define MAXARCS ((1 << (8 * sizeof(HISTCOUNTER))) - 2)
struct tostruct {
- size_t selfpc;
- long count;
- u_short link;
- u_short pad;
+ size_t selfpc;
+ long count;
+ u_int16_t link;
+ u_int16_t pad;
};
/*
@@ -137,10 +156,10 @@ struct rawarc {
* The profiling data structures are housed in this structure.
*/
struct gmonparam {
- int state;
- u_short *kcount;
+ volatile LONG state;
+ u_int16_t *kcount;
size_t kcountsize;
- u_short *froms;
+ u_int16_t *froms;
size_t fromssize;
struct tostruct *tos;
size_t tossize;
diff --git a/winsup/cygwin/grp.cc b/winsup/cygwin/grp.cc
index 7ff9e59b2..40f85feec 100644
--- a/winsup/cygwin/grp.cc
+++ b/winsup/cygwin/grp.cc
@@ -1,8 +1,5 @@
/* grp.cc
- Copyright 1996, 1997, 1998, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007,
- 2008, 2009, 2011, 2012, 2013 Red Hat, Inc.
-
Original stubs by Jason Molenda of Cygnus Support, crash@cygnus.com
First implementation by Gunther Ebert, gunther.ebert@ixos-leipzig.de
@@ -13,6 +10,8 @@ Cygwin license. Please consult the file "CYGWIN_LICENSE" for
details. */
#include "winsup.h"
+#include <lm.h>
+#include <ntsecapi.h>
#include <assert.h>
#include <stdio.h>
#include <stdlib.h>
@@ -23,134 +22,219 @@ details. */
#include "dtable.h"
#include "cygheap.h"
#include "ntdll.h"
-#include "pwdgrp.h"
+#include "miscfuncs.h"
+#include "ldap.h"
+#include "tls_pbuf.h"
-static group *group_buf;
-static pwdgrp gr (group_buf);
static char * NO_COPY_RO null_ptr;
bool
pwdgrp::parse_group ()
{
- group &grp = (*group_buf)[curr_lines];
- grp.gr_name = next_str (':');
- if (!*grp.gr_name)
+ pg_grp &grp = group ()[curr_lines];
+ grp.g.gr_name = next_str (':');
+ if (!*grp.g.gr_name)
return false;
-
- grp.gr_passwd = next_str (':');
-
- if (!next_num (grp.gr_gid))
+ grp.g.gr_passwd = next_str (':');
+ /* Note that lptr points to the first byte of the gr_gid field.
+ We deliberately ignore the gr_gid and gr_mem entries when copying
+ the buffer content since they are not referenced anymore. */
+ grp.len = lptr - grp.g.gr_name;
+ if (!next_num (grp.g.gr_gid))
return false;
-
- int n;
- char *dp = raw_ptr ();
- for (n = 0; *next_str (','); n++)
- continue;
-
- grp.gr_mem = &null_ptr;
- if (n)
- {
- char **namearray = (char **) calloc (n + 1, sizeof (char *));
- if (namearray)
- {
- for (int i = 0; i < n; i++, dp = strchr (dp, '\0') + 1)
- namearray[i] = dp;
- grp.gr_mem = namearray;
- }
- }
-
+ /* Don't generate gr_mem entries. */
+ grp.g.gr_mem = &null_ptr;
+ cygsid csid;
+ if (csid.getfromgr_passwd (&grp.g))
+ RtlCopySid (SECURITY_MAX_SID_SIZE, grp.sid, csid);
return true;
}
-/* Cygwin internal */
-/* Read in /etc/group and save contents in the group cache */
-/* This sets group_in_memory_p to 1 so functions in this file can
- tell that /etc/group has been read in */
+muto NO_COPY pwdgrp::pglock;
+
void
-pwdgrp::read_group ()
+pwdgrp::init_grp ()
{
- for (int i = 0; i < gr.curr_lines; i++)
- if ((*group_buf)[i].gr_mem != &null_ptr)
- free ((*group_buf)[i].gr_mem);
-
- load (L"\\etc\\group");
-
- /* Complete /etc/group in memory if needed */
- if (!internal_getgrgid (myself->gid))
- {
- static char linebuf [200];
- char group_name [UNLEN + 1] = "mkgroup";
- char strbuf[128] = "";
- struct group *gr;
-
- cygheap->user.groups.pgsid.string (strbuf);
- if ((gr = internal_getgrsid (cygheap->user.groups.pgsid)))
- snprintf (group_name, sizeof (group_name),
- "passwd/group_GID_clash(%u/%u)", myself->gid, gr->gr_gid);
- if (myself->uid == UNKNOWN_UID)
- strcpy (group_name, "mkpasswd"); /* Feedback... */
- snprintf (linebuf, sizeof (linebuf), "%s:%s:%u:%s",
- group_name, strbuf, myself->gid, cygheap->user.name ());
- debug_printf ("Completing /etc/group: %s", linebuf);
- add_line (linebuf);
- }
- static char NO_COPY pretty_ls[] = "????????::-1:";
- add_line (pretty_ls);
+ pwdgrp_buf_elem_size = sizeof (pg_grp);
+ parse = &pwdgrp::parse_group;
+ pwd_sep = ':';
}
-muto NO_COPY pwdgrp::pglock;
+struct group *
+pwdgrp::find_group (cygpsid &sid)
+{
+ for (ULONG i = 0; i < curr_lines; i++)
+ if (sid == group ()[i].sid)
+ return &group ()[i].g;
+ return NULL;
+}
-pwdgrp::pwdgrp (passwd *&pbuf) :
- pwdgrp_buf_elem_size (sizeof (*pbuf)), passwd_buf (&pbuf)
+struct group *
+pwdgrp::find_group (const char *name)
{
- read = &pwdgrp::read_passwd;
- parse = &pwdgrp::parse_passwd;
- pglock.init ("pglock");
+ for (ULONG i = 0; i < curr_lines; i++)
+ if (strcasematch (group ()[i].g.gr_name, name))
+ return &group ()[i].g;
+ return NULL;
}
-pwdgrp::pwdgrp (group *&gbuf) :
- pwdgrp_buf_elem_size (sizeof (*gbuf)), group_buf (&gbuf)
+struct group *
+pwdgrp::find_group (gid_t gid)
{
- read = &pwdgrp::read_group;
- parse = &pwdgrp::parse_group;
- pglock.init ("pglock");
+ for (ULONG i = 0; i < curr_lines; i++)
+ if (gid == group ()[i].g.gr_gid)
+ return &group ()[i].g;
+ return NULL;
}
struct group *
-internal_getgrsid (cygpsid &sid)
+internal_getgrsid (cygpsid &sid, cyg_ldap *pldap)
{
- char sid_string[128];
+ struct group *ret;
+
+ cygheap->pg.nss_init ();
+ /* Check caches first. */
+ if (cygheap->pg.nss_cygserver_caching ()
+ && (ret = cygheap->pg.grp_cache.cygserver.find_group (sid)))
+ return ret;
+ if (cygheap->pg.nss_grp_files ()
+ && (ret = cygheap->pg.grp_cache.file.find_group (sid)))
+ return ret;
+ if (cygheap->pg.nss_grp_db ()
+ && (ret = cygheap->pg.grp_cache.win.find_group (sid)))
+ return ret;
+ /* Ask sources afterwards. */
+ if (cygheap->pg.nss_cygserver_caching ()
+ && (ret = cygheap->pg.grp_cache.cygserver.add_group_from_cygserver (sid)))
+ return ret;
+ if (cygheap->pg.nss_grp_files ())
+ {
+ cygheap->pg.grp_cache.file.check_file ();
+ if ((ret = cygheap->pg.grp_cache.file.add_group_from_file (sid)))
+ return ret;
+ }
+ if (cygheap->pg.nss_grp_db ())
+ return cygheap->pg.grp_cache.win.add_group_from_windows (sid, pldap);
+ return NULL;
+}
- gr.refresh (false);
+/* Like internal_getgrsid but return only already cached data,
+ NULL otherwise. */
+static struct group *
+internal_getgrsid_cachedonly (cygpsid &sid)
+{
+ struct group *ret;
+
+ /* Check caches only. */
+ if (cygheap->pg.nss_cygserver_caching ()
+ && (ret = cygheap->pg.grp_cache.cygserver.find_group (sid)))
+ return ret;
+ if (cygheap->pg.nss_grp_files ()
+ && (ret = cygheap->pg.grp_cache.file.find_group (sid)))
+ return ret;
+ if (cygheap->pg.nss_grp_db ()
+ && (ret = cygheap->pg.grp_cache.win.find_group (sid)))
+ return ret;
+ return NULL;
+}
- if (sid.string (sid_string))
- for (int i = 0; i < gr.curr_lines; i++)
- if (!strcmp (sid_string, group_buf[i].gr_passwd))
- return group_buf + i;
+/* Called from internal_getgroups. The full information required to create
+ a group account entry is already available from the LookupAccountSids
+ call. internal_getgrfull passes all available info into
+ pwdgrp::fetch_account_from_line, thus avoiding a LookupAccountSid call
+ for each group. This is quite a bit faster, especially in slower
+ environments. */
+static struct group * __attribute__((used))
+internal_getgrfull (fetch_acc_t &full_acc, cyg_ldap *pldap)
+{
+ struct group *ret;
+
+ cygheap->pg.nss_init ();
+ /* Skip local caches, internal_getgroups already called
+ internal_getgrsid_cachedonly. */
+ if (cygheap->pg.nss_cygserver_caching ()
+ && (ret = cygheap->pg.grp_cache.cygserver.add_group_from_cygserver
+ (full_acc.sid)))
+ return ret;
+ if (cygheap->pg.nss_grp_files ())
+ {
+ cygheap->pg.grp_cache.file.check_file ();
+ if ((ret = cygheap->pg.grp_cache.file.add_group_from_file
+ (full_acc.sid)))
+ return ret;
+ }
+ if (cygheap->pg.nss_grp_db ())
+ return cygheap->pg.grp_cache.win.add_group_from_windows (full_acc, pldap);
return NULL;
}
+/* This function gets only called from mkgroup via cygwin_internal. */
struct group *
-internal_getgrgid (gid_t gid, bool check)
+internal_getgrsid_from_db (cygpsid &sid)
{
- gr.refresh (check);
+ cygheap->pg.nss_init ();
+ return cygheap->pg.grp_cache.win.add_group_from_windows (sid);
+}
- for (int i = 0; i < gr.curr_lines; i++)
- if (group_buf[i].gr_gid == gid)
- return group_buf + i;
+struct group *
+internal_getgrnam (const char *name, cyg_ldap *pldap)
+{
+ struct group *ret;
+
+ cygheap->pg.nss_init ();
+ /* Check caches first. */
+ if (cygheap->pg.nss_cygserver_caching ()
+ && (ret = cygheap->pg.grp_cache.cygserver.find_group (name)))
+ return ret;
+ if (cygheap->pg.nss_grp_files ()
+ && (ret = cygheap->pg.grp_cache.file.find_group (name)))
+ return ret;
+ if (cygheap->pg.nss_grp_db ()
+ && (ret = cygheap->pg.grp_cache.win.find_group (name)))
+ return ret;
+ /* Ask sources afterwards. */
+ if (cygheap->pg.nss_cygserver_caching ()
+ && (ret = cygheap->pg.grp_cache.cygserver.add_group_from_cygserver (name)))
+ return ret;
+ if (cygheap->pg.nss_grp_files ())
+ {
+ cygheap->pg.grp_cache.file.check_file ();
+ if ((ret = cygheap->pg.grp_cache.file.add_group_from_file (name)))
+ return ret;
+ }
+ if (cygheap->pg.nss_grp_db ())
+ return cygheap->pg.grp_cache.win.add_group_from_windows (name, pldap);
return NULL;
}
struct group *
-internal_getgrnam (const char *name, bool check)
+internal_getgrgid (gid_t gid, cyg_ldap *pldap)
{
- gr.refresh (check);
-
- for (int i = 0; i < gr.curr_lines; i++)
- if (strcasematch (group_buf[i].gr_name, name))
- return group_buf + i;
-
- /* Didn't find requested group */
+ struct group *ret;
+
+ cygheap->pg.nss_init ();
+ /* Check caches first. */
+ if (cygheap->pg.nss_cygserver_caching ()
+ && (ret = cygheap->pg.grp_cache.cygserver.find_group (gid)))
+ return ret;
+ if (cygheap->pg.nss_grp_files ()
+ && (ret = cygheap->pg.grp_cache.file.find_group (gid)))
+ return ret;
+ if (cygheap->pg.nss_grp_db ()
+ && (ret = cygheap->pg.grp_cache.win.find_group (gid)))
+ return ret;
+ /* Ask sources afterwards. */
+ if (cygheap->pg.nss_cygserver_caching ()
+ && (ret = cygheap->pg.grp_cache.cygserver.add_group_from_cygserver (gid)))
+ return ret;
+ if (cygheap->pg.nss_grp_files ())
+ {
+ cygheap->pg.grp_cache.file.check_file ();
+ if ((ret = cygheap->pg.grp_cache.file.add_group_from_file (gid)))
+ return ret;
+ }
+ if (cygheap->pg.nss_grp_db () || gid == ILLEGAL_GID)
+ return cygheap->pg.grp_cache.win.add_group_from_windows (gid, pldap);
return NULL;
}
@@ -181,37 +265,65 @@ getgrgid_r (gid_t gid, struct group *grp, char *buffer, size_t bufsize,
if (!grp || !buffer)
return ERANGE;
- struct group *tempgr = internal_getgrgid (gid, true);
+ struct group *tempgr = internal_getgrgid (gid);
pthread_testcancel ();
if (!tempgr)
return 0;
- /* check needed buffer size. */
- int i;
+ /* Check needed buffer size. Deliberately ignore gr_mem. */
size_t needsize = strlen (tempgr->gr_name) + strlen (tempgr->gr_passwd)
+ 2 + sizeof (char *);
- for (i = 0; tempgr->gr_mem[i]; ++i)
- needsize += strlen (tempgr->gr_mem[i]) + 1 + sizeof (char *);
if (needsize > bufsize)
return ERANGE;
- /* make a copy of tempgr */
+ /* Make a copy of tempgr. Deliberately ignore gr_mem. */
*result = grp;
grp->gr_gid = tempgr->gr_gid;
buffer = stpcpy (grp->gr_name = buffer, tempgr->gr_name);
buffer = stpcpy (grp->gr_passwd = buffer + 1, tempgr->gr_passwd);
grp->gr_mem = (char **) (buffer + 1);
- buffer = (char *) grp->gr_mem + (i + 1) * sizeof (char *);
- for (i = 0; tempgr->gr_mem[i]; ++i)
- buffer = stpcpy (grp->gr_mem[i] = buffer, tempgr->gr_mem[i]) + 1;
- grp->gr_mem[i] = NULL;
+ grp->gr_mem[0] = NULL;
return 0;
}
+/* getgrgid/getgrnam are not reentrant. */
+static struct {
+ struct group g;
+ char *buf;
+ size_t bufsiz;
+} app_gr;
+
+static struct group *
+getgr_cp (struct group *tempgr)
+{
+ if (!tempgr)
+ return NULL;
+ pg_grp *gr = (pg_grp *) tempgr;
+ if (app_gr.bufsiz < gr->len)
+ {
+ char *newbuf = (char *) realloc (app_gr.buf, gr->len);
+ if (!newbuf)
+ {
+ set_errno (ENOMEM);
+ return NULL;
+ }
+ app_gr.buf = newbuf;
+ app_gr.bufsiz = gr->len;
+ }
+ memcpy (app_gr.buf, gr->g.gr_name, gr->len);
+ memcpy (&app_gr.g, &gr->g, sizeof gr->g);
+ ptrdiff_t diff = app_gr.buf - gr->g.gr_name;
+ app_gr.g.gr_name += diff;
+ app_gr.g.gr_passwd += diff;
+ return &app_gr.g;
+}
+
extern "C" struct group *
getgrgid32 (gid_t gid)
{
- return internal_getgrgid (gid, true);
+ struct group *tempgr = internal_getgrgid (gid);
+ pthread_testcancel ();
+ return getgr_cp (tempgr);
}
#ifdef __x86_64__
@@ -235,37 +347,33 @@ getgrnam_r (const char *nam, struct group *grp, char *buffer,
if (!grp || !buffer)
return ERANGE;
- struct group *tempgr = internal_getgrnam (nam, true);
+ struct group *tempgr = internal_getgrnam (nam);
pthread_testcancel ();
if (!tempgr)
return 0;
- /* check needed buffer size. */
- int i;
+ /* Check needed buffer size. Deliberately ignore gr_mem. */
size_t needsize = strlen (tempgr->gr_name) + strlen (tempgr->gr_passwd)
+ 2 + sizeof (char *);
- for (i = 0; tempgr->gr_mem[i]; ++i)
- needsize += strlen (tempgr->gr_mem[i]) + 1 + sizeof (char *);
if (needsize > bufsize)
return ERANGE;
- /* make a copy of tempgr */
+ /* Make a copy of tempgr. Deliberately ignore gr_mem. */
*result = grp;
grp->gr_gid = tempgr->gr_gid;
buffer = stpcpy (grp->gr_name = buffer, tempgr->gr_name);
buffer = stpcpy (grp->gr_passwd = buffer + 1, tempgr->gr_passwd);
grp->gr_mem = (char **) (buffer + 1);
- buffer = (char *) grp->gr_mem + (i + 1) * sizeof (char *);
- for (i = 0; tempgr->gr_mem[i]; ++i)
- buffer = stpcpy (grp->gr_mem[i] = buffer, tempgr->gr_mem[i]) + 1;
- grp->gr_mem[i] = NULL;
+ grp->gr_mem[0] = NULL;
return 0;
}
extern "C" struct group *
getgrnam32 (const char *name)
{
- return internal_getgrnam (name, true);
+ struct group *tempgr = internal_getgrnam (name);
+ pthread_testcancel ();
+ return getgr_cp (tempgr);
}
#ifdef __x86_64__
@@ -280,21 +388,119 @@ getgrnam (const char *name)
}
#endif
+/* getgrent functions are not reentrant. */
+static gr_ent grent;
+
+void *
+gr_ent::enumerate_caches ()
+{
+ switch (max)
+ {
+ case 0:
+ if (cygheap->pg.nss_cygserver_caching ())
+ {
+ pwdgrp &grc = cygheap->pg.grp_cache.cygserver;
+ if (cnt < grc.cached_groups ())
+ return &grc.group ()[cnt++].g;
+ }
+ cnt = 0;
+ max = 1;
+ /*FALLTHRU*/
+ case 1:
+ if (from_files)
+ {
+ pwdgrp &grf = cygheap->pg.grp_cache.file;
+ grf.check_file ();
+ if (cnt < grf.cached_groups ())
+ return &grf.group ()[cnt++].g;
+ }
+ cnt = 0;
+ max = 2;
+ /*FALLTHRU*/
+ case 2:
+ if (from_db)
+ {
+ pwdgrp &grw = cygheap->pg.grp_cache.win;
+ if (cnt < grw.cached_groups ())
+ return &grw.group ()[cnt++].g;
+ }
+ break;
+ }
+ cnt = max = 0;
+ return NULL;
+}
+
+void *
+gr_ent::enumerate_local ()
+{
+ while (true)
+ {
+ if (!cnt)
+ {
+ DWORD total;
+ NET_API_STATUS ret;
+
+ if (buf)
+ {
+ NetApiBufferFree (buf);
+ buf = NULL;
+ }
+ if (resume == ULONG_MAX)
+ ret = ERROR_NO_MORE_ITEMS;
+ else
+ ret = NetLocalGroupEnum (NULL, 0, (PBYTE *) &buf,
+ MAX_PREFERRED_LENGTH,
+ &max, &total, &resume);
+ if (ret == NERR_Success)
+ resume = ULONG_MAX;
+ else if (ret != ERROR_MORE_DATA)
+ {
+ cnt = max = resume = 0;
+ return NULL;
+ }
+ }
+ while (cnt < max)
+ {
+ cygsid sid;
+ DWORD slen = SECURITY_MAX_SID_SIZE;
+ WCHAR dom[DNLEN + 1];
+ DWORD dlen = DNLEN + 1;
+ SID_NAME_USE acc_type;
+
+ LookupAccountNameW (NULL,
+ ((PLOCALGROUP_INFO_0) buf)[cnt++].lgrpi0_name,
+ sid, &slen, dom, &dlen, &acc_type);
+ fetch_user_arg_t arg;
+ arg.type = SID_arg;
+ arg.sid = &sid;
+ char *line = pg.fetch_account_from_windows (arg);
+ if (line)
+ return pg.add_account_post_fetch (line, false);
+ }
+ cnt = 0;
+ }
+}
+
+struct group *
+gr_ent::getgrent (void)
+{
+ if (state == rewound)
+ setent (true);
+ else
+ clear_cache ();
+ return (struct group *) getent ();
+}
+
extern "C" void
-endgrent ()
+setgrent ()
{
- _my_tls.locals.grp_pos = 0;
+ grent.setgrent ();
}
extern "C" struct group *
-getgrent32 ()
+getgrent32 (void)
{
- if (_my_tls.locals.grp_pos == 0)
- gr.refresh (true);
- if (_my_tls.locals.grp_pos < gr.curr_lines)
- return group_buf + _my_tls.locals.grp_pos++;
-
- return NULL;
+ return grent.getgrent ();
}
#ifdef __x86_64__
@@ -310,105 +516,190 @@ getgrent ()
#endif
extern "C" void
-setgrent ()
+endgrent (void)
{
- _my_tls.locals.grp_pos = 0;
+ grent.endgrent ();
}
-/* Internal function. ONLY USE THIS INTERNALLY, NEVER `getgrent'!!! */
-struct group *
-internal_getgrent (int pos)
+/* *_filtered functions are called from mkgroup */
+void *
+setgrent_filtered (int enums, PCWSTR enum_tdoms)
{
- gr.refresh (false);
+ gr_ent *gr = new gr_ent;
+ if (gr)
+ gr->setgrent (enums, enum_tdoms);
+ return (void *) gr;
+}
- if (pos < gr.curr_lines)
- return group_buf + pos;
- return NULL;
+void *
+getgrent_filtered (void *gr)
+{
+ return (void *) ((gr_ent *) gr)->getgrent ();
+}
+
+void
+endgrent_filtered (void *gr)
+{
+ ((gr_ent *) gr)->endgrent ();
}
int
-internal_getgroups (int gidsetsize, gid_t *grouplist, cygpsid * srchsid)
+internal_getgroups (int gidsetsize, gid_t *grouplist, cyg_ldap *pldap)
{
NTSTATUS status;
- HANDLE hToken = NULL;
+ HANDLE tok;
ULONG size;
+ PTOKEN_GROUPS groups;
+ PSID *sidp_buf;
+ ULONG scnt;
+ PLSA_REFERENCED_DOMAIN_LIST dlst = NULL;
+ PLSA_TRANSLATED_NAME nlst = NULL;
+
+ tmp_pathbuf tp;
+ struct group *grp;
int cnt = 0;
- struct group *gr;
- if (!srchsid && cygheap->user.groups.issetgroups ())
+ if (cygheap->user.groups.issetgroups ())
{
- cygsid sid;
- for (int gidx = 0; (gr = internal_getgrent (gidx)); ++gidx)
- if (sid.getfromgr (gr))
- for (int pg = 0; pg < cygheap->user.groups.sgsids.count (); ++pg)
- if (sid == cygheap->user.groups.sgsids.sids[pg]
- && sid != well_known_world_sid)
+ for (int pg = 0; pg < cygheap->user.groups.sgsids.count (); ++pg)
+ if ((grp = internal_getgrsid (cygheap->user.groups.sgsids.sids[pg],
+ pldap)))
+ {
+ if (cnt < gidsetsize)
+ grouplist[cnt] = grp->gr_gid;
+ ++cnt;
+ if (gidsetsize && cnt > gidsetsize)
{
- if (cnt < gidsetsize)
- grouplist[cnt] = gr->gr_gid;
- ++cnt;
- if (gidsetsize && cnt > gidsetsize)
- goto error;
+ cnt = -1;
break;
}
- return cnt;
+ }
+ goto out;
}
-
/* If impersonated, use impersonation token. */
- if (cygheap->user.issetuid ())
- hToken = cygheap->user.primary_token ();
- else
- hToken = hProcToken;
-
- status = NtQueryInformationToken (hToken, TokenGroups, NULL, 0, &size);
- if (NT_SUCCESS (status) || status == STATUS_BUFFER_TOO_SMALL)
+ tok = cygheap->user.issetuid () ? cygheap->user.primary_token ()
+ : hProcToken;
+
+ /* Fetch groups from user token. */
+ groups = (PTOKEN_GROUPS) tp.w_get ();
+ status = NtQueryInformationToken (tok, TokenGroups, groups, 2 * NT_MAX_PATH,
+ &size);
+ if (!NT_SUCCESS (status))
{
- PTOKEN_GROUPS groups = (PTOKEN_GROUPS) alloca (size);
-
- status = NtQueryInformationToken (hToken, TokenGroups, groups,
- size, &size);
- if (NT_SUCCESS (status))
+ debug_printf ("NtQueryInformationToken(TokenGroups) %y", status);
+ goto out;
+ }
+ /* Iterate over the group list and check which of them are already cached.
+ Those are simply copied to grouplist. The non-cached ones are collected
+ in sidp_buf for a later call to LsaLookupSids. */
+ sidp_buf = (PSID *) tp.w_get ();
+ scnt = 0;
+ for (DWORD pg = 0; pg < groups->GroupCount; ++pg)
+ {
+ cygpsid sid = groups->Groups[pg].Sid;
+ if ((groups->Groups[pg].Attributes
+ & (SE_GROUP_ENABLED | SE_GROUP_INTEGRITY_ENABLED)) == 0
+ || sid == well_known_world_sid)
+ continue;
+ if ((grp = internal_getgrsid_cachedonly (sid)))
{
- cygsid sid;
-
- if (srchsid)
+ if (cnt < gidsetsize)
+ grouplist[cnt] = grp->gr_gid;
+ ++cnt;
+ if (gidsetsize && cnt > gidsetsize)
{
- for (DWORD pg = 0; pg < groups->GroupCount; ++pg)
- if ((cnt = (*srchsid == groups->Groups[pg].Sid)))
- break;
+ cnt = -1;
+ goto out;
}
- else
- for (int gidx = 0; (gr = internal_getgrent (gidx)); ++gidx)
- if (sid.getfromgr (gr))
- for (DWORD pg = 0; pg < groups->GroupCount; ++pg)
- if (sid == groups->Groups[pg].Sid
- && (groups->Groups[pg].Attributes
- & (SE_GROUP_ENABLED | SE_GROUP_INTEGRITY_ENABLED))
- && sid != well_known_world_sid)
+ }
+ else
+ sidp_buf[scnt++] = sid;
+ }
+ /* If there are non-cached groups left, try to fetch them. */
+ if (scnt > 0)
+ {
+ /* Don't call LsaLookupSids if we're not utilizing the Windows account
+ DBs. If we don't have access to the AD, which is one good reason to
+ disable passwd/group: db in nsswitch.conf, then the subsequent call
+ to LsaLookupSids will take 5 - 10 seconds in some environments. */
+ if (!cygheap->pg.nss_grp_db ())
+ {
+ for (DWORD pg = 0; pg < scnt; ++pg)
+ {
+ cygpsid sid = sidp_buf[pg];
+ if ((grp = internal_getgrsid (sid, NULL)))
+ {
+ if (cnt < gidsetsize)
+ grouplist[cnt] = grp->gr_gid;
+ ++cnt;
+ if (gidsetsize && cnt > gidsetsize)
{
- if (cnt < gidsetsize)
- grouplist[cnt] = gr->gr_gid;
- ++cnt;
- if (gidsetsize && cnt > gidsetsize)
- goto error;
+ cnt = -1;
break;
}
+ }
+ }
+ goto out;
+ }
+ /* Otherwise call LsaLookupSids and call internal_getgrfull on the
+ returned groups. This performs a lot better than calling
+ internal_getgrsid on each group. */
+ status = STATUS_ACCESS_DENIED;
+ HANDLE lsa = lsa_open_policy (NULL, POLICY_LOOKUP_NAMES);
+ if (!lsa)
+ {
+ debug_printf ("POLICY_LOOKUP_NAMES right not given?");
+ goto out;
+ }
+ status = LsaLookupSids (lsa, scnt, sidp_buf, &dlst, &nlst);
+ lsa_close_policy (lsa);
+ if (NT_SUCCESS (status))
+ {
+ for (ULONG ncnt = 0; ncnt < scnt; ++ncnt)
+ {
+ static UNICODE_STRING empty = { 0, 0, (PWSTR) L"" };
+ fetch_acc_t full_acc =
+ {
+ .sid = sidp_buf[ncnt],
+ .name = &nlst[ncnt].Name,
+ .dom = &empty,
+ .acc_type = nlst[ncnt].Use
+ };
+
+ if (nlst[ncnt].DomainIndex >= 0)
+ full_acc.dom = &dlst->Domains[nlst[ncnt].DomainIndex].Name;
+ if ((grp = internal_getgrfull (full_acc, pldap)))
+ {
+ if (cnt < gidsetsize)
+ grouplist[cnt] = grp->gr_gid;
+ ++cnt;
+ if (gidsetsize && cnt > gidsetsize)
+ {
+ cnt = -1;
+ break;
+ }
+ }
+ }
}
}
- else
- debug_printf ("%u = NtQueryInformationToken(NULL) %y", size, status);
- return cnt;
-error:
- set_errno (EINVAL);
- return -1;
+out:
+ if (dlst)
+ LsaFreeMemory (dlst);
+ if (nlst)
+ LsaFreeMemory (nlst);
+ if (cnt == -1)
+ set_errno (EINVAL);
+ return cnt;
}
extern "C" int
getgroups32 (int gidsetsize, gid_t *grouplist)
{
- return internal_getgroups (gidsetsize, grouplist);
+ cyg_ldap cldap;
+
+ return internal_getgroups (gidsetsize, grouplist, &cldap);
}
#ifdef __x86_64__
@@ -427,7 +718,7 @@ getgroups (int gidsetsize, __gid16_t *grouplist)
if (gidsetsize > 0 && grouplist)
grouplist32 = (gid_t *) alloca (gidsetsize * sizeof (gid_t));
- int ret = internal_getgroups (gidsetsize, grouplist32);
+ int ret = getgroups32 (gidsetsize, grouplist32);
if (gidsetsize > 0 && grouplist)
for (int i = 0; i < ret; ++ i)
@@ -441,13 +732,15 @@ getgroups (int gidsetsize, __gid16_t *grouplist)
static void
get_groups (const char *user, gid_t gid, cygsidlist &gsids)
{
+ cyg_ldap cldap;
+
cygheap->user.deimpersonate ();
- struct passwd *pw = internal_getpwnam (user);
- struct group *gr = internal_getgrgid (gid);
+ struct passwd *pw = internal_getpwnam (user, &cldap);
+ struct group *grp = internal_getgrgid (gid, &cldap);
cygsid usersid, grpsid;
if (usersid.getfrompw (pw))
- get_server_groups (gsids, usersid, pw);
- if (grpsid.getfromgr (gr))
+ get_server_groups (gsids, usersid);
+ if (gid != ILLEGAL_GID && grpsid.getfromgr (grp))
gsids += grpsid;
cygheap->user.reimpersonate ();
}
@@ -482,7 +775,8 @@ getgrouplist (const char *user, gid_t gid, gid_t *groups, int *ngroups)
{
int ret = 0;
int cnt = 0;
- struct group *gr;
+ struct group *grp;
+ cyg_ldap cldap;
/* Note that it's not defined if groups or ngroups may be NULL!
GLibc does not check the pointers on entry and just uses them.
@@ -495,14 +789,16 @@ getgrouplist (const char *user, gid_t gid, gid_t *groups, int *ngroups)
cygsidlist tmp_gsids (cygsidlist_auto, 12);
get_groups (user, gid, tmp_gsids);
for (int i = 0; i < tmp_gsids.count (); i++)
- if ((gr = internal_getgrsid (tmp_gsids.sids[i])) != NULL)
+ if ((grp = internal_getgrsid (tmp_gsids.sids[i], &cldap)) != NULL)
{
if (groups && cnt < *ngroups)
- groups[cnt] = gr->gr_gid;
+ groups[cnt] = grp->gr_gid;
++cnt;
}
if (cnt > *ngroups)
ret = -1;
+ else
+ ret = cnt;
*ngroups = cnt;
syscall_printf ( "%d = getgrouplist(%s, %u, %p, %d)",
@@ -522,15 +818,16 @@ setgroups32 (int ngroups, const gid_t *grouplist)
}
cygsidlist gsids (cygsidlist_alloc, ngroups);
- struct group *gr;
+ struct group *grp;
+ cyg_ldap cldap;
if (ngroups && !gsids.sids)
return -1;
for (int gidx = 0; gidx < ngroups; ++gidx)
{
- if ((gr = internal_getgrgid (grouplist[gidx]))
- && gsids.addfromgr (gr))
+ if ((grp = internal_getgrgid (grouplist[gidx], &cldap))
+ && gsids.addfromgr (grp))
continue;
debug_printf ("No sid found for gid %u", grouplist[gidx]);
gsids.free_sids ();
diff --git a/winsup/cygwin/heap.cc b/winsup/cygwin/heap.cc
index d08e8bf17..deb4d6143 100644
--- a/winsup/cygwin/heap.cc
+++ b/winsup/cygwin/heap.cc
@@ -1,8 +1,5 @@
/* heap.cc: Cygwin heap manager.
- Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008, 2009, 2010, 2011, 2012, 2013 Red Hat, Inc.
-
This file is part of Cygwin.
This software is a copyrighted work licensed under the terms of the
diff --git a/winsup/cygwin/heap.h b/winsup/cygwin/heap.h
index bd15189b1..565758e48 100644
--- a/winsup/cygwin/heap.h
+++ b/winsup/cygwin/heap.h
@@ -1,7 +1,5 @@
/* heap.h: Cygwin heap manager definitions.
- Copyright 2000, 2001, 2002 Red Hat, Inc.
-
This file is part of Cygwin.
This software is a copyrighted work licensed under the terms of the
diff --git a/winsup/cygwin/hires.h b/winsup/cygwin/hires.h
index 23b2391d2..c6a286cff 100644
--- a/winsup/cygwin/hires.h
+++ b/winsup/cygwin/hires.h
@@ -1,7 +1,5 @@
/* hires.h: Definitions for hires clock calculations
- Copyright 2002, 2003, 2004, 2005, 2009, 2010, 2011, 2012, 2013 Red Hat, Inc.
-
This file is part of Cygwin.
This software is a copyrighted work licensed under the terms of the
diff --git a/winsup/cygwin/hookapi.cc b/winsup/cygwin/hookapi.cc
index 133d8cbf5..4078e65bd 100644
--- a/winsup/cygwin/hookapi.cc
+++ b/winsup/cygwin/hookapi.cc
@@ -1,7 +1,5 @@
/* hookapi.cc
- Copyright 2005, 2006, 2007, 2008, 2011, 2012, 2013 Red Hat, Inc.
-
This file is part of Cygwin.
This software is a copyrighted work licensed under the terms of the
diff --git a/winsup/cygwin/how-autoload-works.txt b/winsup/cygwin/how-autoload-works.txt
index 8cff52900..d1765031a 100644
--- a/winsup/cygwin/how-autoload-works.txt
+++ b/winsup/cygwin/how-autoload-works.txt
@@ -1,4 +1,4 @@
-Copyright 2002 Red Hat Inc., Egor Duda
+Contributed by Egor Duda
How does function autoloading work?
diff --git a/winsup/cygwin/how-cygheap-works.txt b/winsup/cygwin/how-cygheap-works.txt
index b60f88808..3aee07701 100644
--- a/winsup/cygwin/how-cygheap-works.txt
+++ b/winsup/cygwin/how-cygheap-works.txt
@@ -1,4 +1,4 @@
-Copyright 2001 Red Hat Inc., Christopher Faylor
+Contributed by Christopher Faylor
Cygwin has recently adopted something called the "cygwin heap". This is
an internal heap that is inherited by forked/execed children. It
diff --git a/winsup/cygwin/how-cygtls-works.txt b/winsup/cygwin/how-cygtls-works.txt
index 69363f1fb..8bba0a7a0 100644
--- a/winsup/cygwin/how-cygtls-works.txt
+++ b/winsup/cygwin/how-cygtls-works.txt
@@ -1,4 +1,4 @@
-Copyright 2005 Red Hat Inc., Max Kaehn
+Contributed by Max Kaehn
All cygwin threads have separate context in an object of class _cygtls. The
storage for this object is kept on the stack in the bottom CYGTLS_PADSIZE
diff --git a/winsup/cygwin/how-fhandlers-work.txt b/winsup/cygwin/how-fhandlers-work.txt
index cef46fedc..ba3a8dcbb 100644
--- a/winsup/cygwin/how-fhandlers-work.txt
+++ b/winsup/cygwin/how-fhandlers-work.txt
@@ -1,4 +1,4 @@
-Copyright 2001 Red Hat Inc., Robert Collins
+Contributed by Robert Collins
fhandlers are the core mechanism by which cygwin provides a file descripter (fd)
interface to things such as a random number generated, winsock sockets, raw disk
diff --git a/winsup/cygwin/how-signals-work.txt b/winsup/cygwin/how-signals-work.txt
index 4d94c79dc..09d7d0aa5 100644
--- a/winsup/cygwin/how-signals-work.txt
+++ b/winsup/cygwin/how-signals-work.txt
@@ -1,4 +1,4 @@
-Copyright 2001, 2002, 2003, 2004 Red Hat Inc., Christopher Faylor
+Contributed by Christopher Faylor
[note that the following discussion is still incomplete]
diff --git a/winsup/cygwin/how-startup-shutdown-works.txt b/winsup/cygwin/how-startup-shutdown-works.txt
index 578deeb30..0a534b898 100755..100644
--- a/winsup/cygwin/how-startup-shutdown-works.txt
+++ b/winsup/cygwin/how-startup-shutdown-works.txt
@@ -1,5 +1,4 @@
-Copyright 2010 Red Hat Inc., contributed by Dave Korn.
-
+Contributed by Dave Korn
How the C runtime handles startup and termination.
--------------------------------------------------
diff --git a/winsup/cygwin/how-to-debug-cygwin.txt b/winsup/cygwin/how-to-debug-cygwin.txt
index fcf53a27f..61e91c88d 100644
--- a/winsup/cygwin/how-to-debug-cygwin.txt
+++ b/winsup/cygwin/how-to-debug-cygwin.txt
@@ -1,4 +1,4 @@
-Copyright 2001, 2002, 2005 Red Hat Inc., Egor Duda
+Contributed by Egor Duda
So, your favorite program has crashed? And did you say something about
'stackdump'? Or it just prints its output from left to right and
diff --git a/winsup/cygwin/i686.din b/winsup/cygwin/i686.din
index 2ef0135fd..f3cd2fd37 100644
--- a/winsup/cygwin/i686.din
+++ b/winsup/cygwin/i686.din
@@ -43,7 +43,6 @@ __f_tan = _f_tan NOSIGFE
__f_tanf = _f_tanf NOSIGFE
__getdelim SIGFE
__getline SIGFE
-__mempcpy = mempcpy NOSIGFE
__wrap__Znaj NOSIGFE # void *operator new[](std::size_t sz) throw (std::bad_alloc)
__wrap__ZnajRKSt9nothrow_t NOSIGFE # void *operator new[](std::size_t sz, const std::nothrow_t &nt) throw()
__wrap__Znwj NOSIGFE # void *operator new(std::size_t sz) throw (std::bad_alloc)
@@ -165,21 +164,21 @@ _f_frexp NOSIGFE
_f_frexpf NOSIGFE
_f_ldexp NOSIGFE
_f_ldexpf NOSIGFE
-_f_llrint NOSIGFE
-_f_llrintf NOSIGFE
-_f_llrintl NOSIGFE
+_f_llrint = llrint NOSIGFE
+_f_llrintf = llrintf NOSIGFE
+_f_llrintl = llrintl NOSIGFE
_f_log NOSIGFE
_f_log10 NOSIGFE
_f_log10f NOSIGFE
_f_logf NOSIGFE
-_f_lrint NOSIGFE
-_f_lrintf NOSIGFE
-_f_lrintl NOSIGFE
+_f_lrint = lrint NOSIGFE
+_f_lrintf = lrintf NOSIGFE
+_f_lrintl = lrintl NOSIGFE
_f_pow NOSIGFE
_f_powf NOSIGFE
-_f_rint NOSIGFE
-_f_rintf NOSIGFE
-_f_rintl NOSIGFE
+_f_rint = rint NOSIGFE
+_f_rintf = rintf NOSIGFE
+_f_rintl = rintl NOSIGFE
_f_tan NOSIGFE
_f_tanf NOSIGFE
_fabs = fabs NOSIGFE
@@ -623,19 +622,10 @@ fscanf_r = _fscanf_r SIGFE
get_osfhandle = _get_osfhandle SIGFE
getpwduid NOSIGFE
lacl SIGFE
-llrint = _f_llrint NOSIGFE
-llrintf = _f_llrintf NOSIGFE
-llrintl = _f_llrintl NOSIGFE
-lrint = _f_lrint NOSIGFE
-lrintf = _f_lrintf NOSIGFE
-lrintl = _f_lrintl NOSIGFE
posix_regcomp = regcomp SIGFE
posix_regerror = regerror SIGFE
posix_regexec = regexec SIGFE
posix_regfree = regfree SIGFE
-rint = _f_rint NOSIGFE
-rintf = _f_rintf NOSIGFE
-rintl = _f_rintl NOSIGFE
scanf_r = _scanf_r SIGFE
setmode = cygwin_setmode SIGFE
setregid32 SIGFE
diff --git a/winsup/cygwin/import/rexec.c b/winsup/cygwin/import/rexec.c
new file mode 100644
index 000000000..4e01eb659
--- /dev/null
+++ b/winsup/cygwin/import/rexec.c
@@ -0,0 +1,391 @@
+/*
+ * Copyright (c) 1980, 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.
+ * 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.
+ *
+ * $FreeBSD$
+ */
+
+#if defined(LIBC_SCCS) && !defined(lint)
+static char sccsid[] = "@(#)rexec.c 8.1 (Berkeley) 6/4/93";
+#endif /* LIBC_SCCS and not lint */
+
+#include <sys/types.h>
+#include <sys/uio.h>
+#include <sys/socket.h>
+#include <sys/param.h>
+#include <sys/stat.h>
+
+#include <netinet/in.h>
+
+#include <stdio.h>
+#include <unistd.h>
+#include <string.h>
+#include <netdb.h>
+#include <errno.h>
+#include <ctype.h>
+#include <err.h>
+#include <stdlib.h>
+#include <unistd.h>
+
+int rexecoptions;
+char *getpass(), *getlogin();
+
+/*
+ * Options and other state info.
+ */
+struct macel {
+ char mac_name[9]; /* macro name */
+ char *mac_start; /* start of macro in macbuf */
+ char *mac_end; /* end of macro in macbuf */
+};
+
+int macnum; /* number of defined macros */
+struct macel macros[16];
+char macbuf[4096];
+
+static FILE *cfile;
+
+#define DEFAULT 1
+#define LOGIN 2
+#define PASSWD 3
+#define ACCOUNT 4
+#define MACDEF 5
+#define ID 10
+#define MACH 11
+
+static char tokval[100];
+
+static struct toktab {
+ char *tokstr;
+ int tval;
+} toktab[]= {
+ { "default", DEFAULT },
+ { "login", LOGIN },
+ { "password", PASSWD },
+ { "passwd", PASSWD },
+ { "account", ACCOUNT },
+ { "machine", MACH },
+ { "macdef", MACDEF },
+ { NULL, 0 }
+};
+
+static int
+token()
+{
+ char *cp;
+ int c;
+ struct toktab *t;
+
+ if (feof(cfile) || ferror(cfile))
+ return (0);
+ while ((c = getc(cfile)) != EOF &&
+ (c == '\n' || c == '\t' || c == ' ' || c == ','))
+ continue;
+ if (c == EOF)
+ return (0);
+ cp = tokval;
+ if (c == '"') {
+ while ((c = getc(cfile)) != EOF && c != '"') {
+ if (c == '\\')
+ c = getc(cfile);
+ *cp++ = c;
+ }
+ } else {
+ *cp++ = c;
+ while ((c = getc(cfile)) != EOF
+ && c != '\n' && c != '\t' && c != ' ' && c != ',') {
+ if (c == '\\')
+ c = getc(cfile);
+ *cp++ = c;
+ }
+ }
+ *cp = 0;
+ if (tokval[0] == 0)
+ return (0);
+ for (t = toktab; t->tokstr; t++)
+ if (!strcmp(t->tokstr, tokval))
+ return (t->tval);
+ return (ID);
+}
+
+static int
+ruserpass(host, aname, apass, aacct)
+ char *host, **aname, **apass, **aacct;
+{
+ char *hdir, buf[BUFSIZ], *tmp;
+ char myname[MAXHOSTNAMELEN], *mydomain;
+ int t, i, c, usedefault = 0;
+ struct stat stb;
+
+ hdir = getenv("HOME");
+ if (hdir == NULL)
+ hdir = ".";
+ if (strlen(hdir) + 8 > sizeof(buf))
+ return (0);
+ (void) sprintf(buf, "%s/.netrc", hdir);
+ cfile = fopen(buf, "r");
+ if (cfile == NULL) {
+ if (errno != ENOENT)
+ warn("%s", buf);
+ return (0);
+ }
+ if (gethostname(myname, sizeof(myname)) < 0)
+ myname[0] = '\0';
+ if ((mydomain = strchr(myname, '.')) == NULL)
+ mydomain = "";
+next:
+ while ((t = token())) switch(t) {
+
+ case DEFAULT:
+ usedefault = 1;
+ /* FALL THROUGH */
+
+ case MACH:
+ if (!usedefault) {
+ if (token() != ID)
+ continue;
+ /*
+ * Allow match either for user's input host name
+ * or official hostname. Also allow match of
+ * incompletely-specified host in local domain.
+ */
+ if (strcasecmp(host, tokval) == 0)
+ goto match;
+ if ((tmp = strchr(host, '.')) != NULL &&
+ strcasecmp(tmp, mydomain) == 0 &&
+ strncasecmp(host, tokval, tmp - host) == 0 &&
+ tokval[tmp - host] == '\0')
+ goto match;
+ continue;
+ }
+ match:
+ while ((t = token()) && t != MACH && t != DEFAULT) switch(t) {
+
+ case LOGIN:
+ if (token())
+ if (*aname == 0) {
+ *aname = malloc((unsigned) strlen(tokval) + 1);
+ (void) strcpy(*aname, tokval);
+ } else {
+ if (strcmp(*aname, tokval))
+ goto next;
+ }
+ break;
+ case PASSWD:
+ if ((*aname == 0 || strcmp(*aname, "anonymous")) &&
+ fstat(fileno(cfile), &stb) >= 0 &&
+ (stb.st_mode & 077) != 0) {
+ warnx("Error: .netrc file is readable by others.");
+ warnx("Remove password or make file unreadable by others.");
+ goto bad;
+ }
+ if (token() && *apass == 0) {
+ *apass = malloc((unsigned) strlen(tokval) + 1);
+ (void) strcpy(*apass, tokval);
+ }
+ break;
+ case ACCOUNT:
+ if (fstat(fileno(cfile), &stb) >= 0
+ && (stb.st_mode & 077) != 0) {
+ warnx("Error: .netrc file is readable by others.");
+ warnx("Remove account or make file unreadable by others.");
+ goto bad;
+ }
+ if (token() && *aacct == 0) {
+ *aacct = malloc((unsigned) strlen(tokval) + 1);
+ (void) strcpy(*aacct, tokval);
+ }
+ break;
+ case MACDEF:
+ while ((c=getc(cfile)) != EOF &&
+ (c == ' ' || c == '\t'))
+ ;
+ if (c == EOF || c == '\n') {
+ printf("Missing macdef name argument.\n");
+ goto bad;
+ }
+ if (macnum == 16) {
+ printf("Limit of 16 macros have already been defined\n");
+ goto bad;
+ }
+ tmp = macros[macnum].mac_name;
+ *tmp++ = c;
+ for (i=0; i < 8 && (c=getc(cfile)) != EOF &&
+ !isspace(c); ++i) {
+ *tmp++ = c;
+ }
+ if (c == EOF) {
+ printf("Macro definition missing null line terminator.\n");
+ goto bad;
+ }
+ *tmp = '\0';
+ if (c != '\n') {
+ while ((c=getc(cfile)) != EOF && c != '\n');
+ }
+ if (c == EOF) {
+ printf("Macro definition missing null line terminator.\n");
+ goto bad;
+ }
+ if (macnum == 0) {
+ macros[macnum].mac_start = macbuf;
+ }
+ else {
+ macros[macnum].mac_start = macros[macnum-1].mac_end + 1;
+ }
+ tmp = macros[macnum].mac_start;
+ while (tmp != macbuf + 4096) {
+ if ((c=getc(cfile)) == EOF) {
+ printf("Macro definition missing null line terminator.\n");
+ goto bad;
+ }
+ *tmp = c;
+ if (*tmp == '\n') {
+ if (*(tmp-1) == '\0') {
+ macros[macnum++].mac_end = tmp - 1;
+ break;
+ }
+ *tmp = '\0';
+ }
+ tmp++;
+ }
+ if (tmp == macbuf + 4096) {
+ printf("4K macro buffer exceeded\n");
+ goto bad;
+ }
+ break;
+ default:
+ warnx("Unknown .netrc keyword %s", tokval);
+ break;
+ }
+ goto done;
+ }
+done:
+ (void) fclose(cfile);
+ return (0);
+bad:
+ (void) fclose(cfile);
+ return (-1);
+}
+
+int
+rexec(ahost, rport, name, pass, cmd, fd2p)
+ char **ahost;
+ int rport;
+ char *name, *pass, *cmd;
+ int *fd2p;
+{
+ struct sockaddr_in sin, sin2, from;
+ struct hostent *hp;
+ u_short port;
+ int s, timo = 1, s3;
+ char c, *acct;
+
+ hp = gethostbyname(*ahost);
+ if (hp == 0) {
+ herror(*ahost);
+ return (-1);
+ }
+ *ahost = hp->h_name;
+ acct = NULL;
+ ruserpass(hp->h_name, &name, &pass, &acct);
+ free(acct);
+retry:
+ s = socket(AF_INET, SOCK_STREAM, 0);
+ if (s < 0) {
+ perror("rexec: socket");
+ return (-1);
+ }
+ sin.sin_family = hp->h_addrtype;
+ sin.sin_port = rport;
+ bcopy(hp->h_addr, (caddr_t)&sin.sin_addr, hp->h_length);
+ if (connect(s, (struct sockaddr *)&sin, sizeof(sin)) < 0) {
+ if (errno == ECONNREFUSED && timo <= 16) {
+ (void) close(s);
+ sleep(timo);
+ timo *= 2;
+ goto retry;
+ }
+ perror(hp->h_name);
+ return (-1);
+ }
+ if (fd2p == 0) {
+ (void) write(s, "", 1);
+ port = 0;
+ } else {
+ char num[8];
+ int s2, sin2len;
+
+ s2 = socket(AF_INET, SOCK_STREAM, 0);
+ if (s2 < 0) {
+ (void) close(s);
+ return (-1);
+ }
+ listen(s2, 1);
+ sin2len = sizeof (sin2);
+ if (getsockname(s2, (struct sockaddr *)&sin2, &sin2len) < 0 ||
+ sin2len != sizeof (sin2)) {
+ perror("getsockname");
+ (void) close(s2);
+ goto bad;
+ }
+ port = ntohs((u_short)sin2.sin_port);
+ (void) sprintf(num, "%u", port);
+ (void) write(s, num, strlen(num)+1);
+ { int len = sizeof (from);
+ s3 = accept(s2, (struct sockaddr *)&from, &len);
+ close(s2);
+ if (s3 < 0) {
+ perror("accept");
+ port = 0;
+ goto bad;
+ }
+ }
+ *fd2p = s3;
+ }
+ (void) write(s, name, strlen(name) + 1);
+ /* should public key encypt the password here */
+ (void) write(s, pass, strlen(pass) + 1);
+ (void) write(s, cmd, strlen(cmd) + 1);
+ if (read(s, &c, 1) != 1) {
+ perror(*ahost);
+ goto bad;
+ }
+ if (c != 0) {
+ while (read(s, &c, 1) == 1) {
+ (void) write(2, &c, 1);
+ if (c == '\n')
+ break;
+ }
+ goto bad;
+ }
+ return (s);
+bad:
+ if (port)
+ (void) close(*fd2p);
+ (void) close(s);
+ return (-1);
+}
diff --git a/winsup/cygwin/include/a.out.h b/winsup/cygwin/include/a.out.h
index ad9b5a56f..1a7a60be5 100644
--- a/winsup/cygwin/include/a.out.h
+++ b/winsup/cygwin/include/a.out.h
@@ -1,7 +1,5 @@
/* a.out.h
- Copyright 1997, 1998, 1999, 2000, 2001, 2013 Red Hat, Inc.
-
This file is part of Cygwin.
This software is a copyrighted work licensed under the terms of the
diff --git a/winsup/cygwin/include/acl/libacl.h b/winsup/cygwin/include/acl/libacl.h
new file mode 100644
index 000000000..b93d686b1
--- /dev/null
+++ b/winsup/cygwin/include/acl/libacl.h
@@ -0,0 +1,55 @@
+/* acl/libacl.h: Non-POSIX extensions of libacl
+
+This file is part of Cygwin.
+
+This software is a copyrighted work licensed under the terms of the
+Cygwin license. Please consult the file "CYGWIN_LICENSE" for
+details. */
+
+#ifndef _ACL_LIBACL_H
+#define _ACL_LIBACL_H
+
+#include <sys/acl.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/* Sync'd with cygwin/acl.h values. */
+#define ACL_MULTI_ERROR (0x4)
+#define ACL_DUPLICATE_ERROR (0x5)
+#define ACL_ENTRY_ERROR (0x6)
+#define ACL_MISS_ERROR (0x7)
+
+/* acl_to_any_text options. */
+#define TEXT_ABBREVIATE (0x01)
+#define TEXT_NUMERIC_IDS (0x02)
+#define TEXT_SOME_EFFECTIVE (0x04)
+#define TEXT_ALL_EFFECTIVE (0x08)
+#define TEXT_SMART_INDENT (0x10)
+
+extern int acl_check (acl_t __acl, int *__last);
+extern int acl_cmp (acl_t __acl1, acl_t __acl2);
+extern int acl_entries (acl_t __acl);
+extern int acl_equiv_mode (acl_t __acl, mode_t *__mode_p);
+extern const char *acl_error (int __code);
+extern int acl_extended_fd (int __fd);
+extern int acl_extended_file (const char *__path_p);
+extern int acl_extended_file_nofollow (const char *__path_p);
+extern acl_t acl_from_mode (mode_t __mode);
+extern int acl_get_perm (acl_permset_t __permset_d, acl_perm_t __perm);
+extern char *acl_to_any_text (acl_t __acl, const char *__prefix,
+ char __separator, int __options);
+
+#if 0
+/* TODO */
+struct error_context;
+extern int perm_copy_file (const char *, const char *, struct error_context *);
+extern int perm_copy_fd (const char *, int, const char *, int,
+ struct error_context *);
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+#endif /* _ACL_LIBACL_H */
diff --git a/winsup/cygwin/include/arpa/inet.h b/winsup/cygwin/include/arpa/inet.h
index 4a3ee90e2..bba3bcd18 100644
--- a/winsup/cygwin/include/arpa/inet.h
+++ b/winsup/cygwin/include/arpa/inet.h
@@ -1,7 +1,5 @@
/* arpa/inet.h
- Copyright 1997, 1998, 2000, 2001, 2002, 2003, 2005 Red Hat, Inc.
-
This file is part of Cygwin.
This software is a copyrighted work licensed under the terms of the
diff --git a/winsup/cygwin/include/arpa/nameser.h b/winsup/cygwin/include/arpa/nameser.h
index ddb32302b..ddb32302b 100755..100644
--- a/winsup/cygwin/include/arpa/nameser.h
+++ b/winsup/cygwin/include/arpa/nameser.h
diff --git a/winsup/cygwin/include/arpa/nameser_compat.h b/winsup/cygwin/include/arpa/nameser_compat.h
index 9579913be..9579913be 100755..100644
--- a/winsup/cygwin/include/arpa/nameser_compat.h
+++ b/winsup/cygwin/include/arpa/nameser_compat.h
diff --git a/winsup/cygwin/include/asm/byteorder.h b/winsup/cygwin/include/asm/byteorder.h
index 4f5d7cb59..af125cffb 100644
--- a/winsup/cygwin/include/asm/byteorder.h
+++ b/winsup/cygwin/include/asm/byteorder.h
@@ -1,7 +1,5 @@
/* asm/byteorder.h
- Copyright 1996, 1998, 2001, 2006, 2009, 2011, 2012 Red Hat, Inc.
-
This file is part of Cygwin.
This software is a copyrighted work licensed under the terms of the
@@ -11,9 +9,8 @@ details. */
#ifndef _I386_BYTEORDER_H
#define _I386_BYTEORDER_H
-#include <_ansi.h>
#include <stdint.h>
-#include <bits/endian.h>
+#include <machine/endian.h>
#ifdef __cplusplus
extern "C" {
@@ -28,37 +25,16 @@ extern uint16_t ntohs(uint16_t);
extern uint32_t htonl(uint32_t);
extern uint16_t htons(uint16_t);
-_ELIDABLE_INLINE uint32_t __ntohl(uint32_t);
-_ELIDABLE_INLINE uint16_t __ntohs(uint16_t);
-
-_ELIDABLE_INLINE uint32_t
-__ntohl(uint32_t x)
-{
- __asm__("bswap %0" : "=r" (x) : "0" (x));
- return x;
-}
-
#define __constant_ntohl(x) \
((uint32_t)((((uint32_t)(x) & 0x000000ffU) << 24) | \
(((uint32_t)(x) & 0x0000ff00U) << 8) | \
(((uint32_t)(x) & 0x00ff0000U) >> 8) | \
(((uint32_t)(x) & 0xff000000U) >> 24)))
-_ELIDABLE_INLINE uint16_t
-__ntohs(uint16_t x)
-{
- __asm__("xchgb %b0,%h0" /* swap bytes */
- : "=Q" (x)
- : "0" (x));
- return x;
-}
-
#define __constant_ntohs(x) \
((uint16_t)((((uint16_t)(x) & 0x00ff) << 8) | \
(((uint16_t)(x) & 0xff00) >> 8))) \
-#define __htonl(x) __ntohl(x)
-#define __htons(x) __ntohs(x)
#define __constant_htonl(x) __constant_ntohl(x)
#define __constant_htons(x) __constant_ntohs(x)
diff --git a/winsup/cygwin/include/asm/socket.h b/winsup/cygwin/include/asm/socket.h
index d5d91f495..8c0132997 100644
--- a/winsup/cygwin/include/asm/socket.h
+++ b/winsup/cygwin/include/asm/socket.h
@@ -1,7 +1,5 @@
/* asm/socket.h
- Copyright 1996, 1997, 1998, 2000, 2001, 2005, 2007 Red Hat, Inc.
-
This file is part of Cygwin.
This software is a copyrighted work licensed under the terms of the
@@ -22,15 +20,15 @@ details. */
#define _IOR(x,y,t) (IOC_OUT|(((long)sizeof(t)&IOCPARM_MASK)<<16)|(x<<8)|y)
#define _IOW(x,y,t) (IOC_IN|(((long)sizeof(t)&IOCPARM_MASK)<<16)|(x<<8)|y)
-#define SIOCATMARK _IOR('s', 7, u_long) /* at oob mark? */
-#define FIONREAD _IOR('f', 127, u_long) /* get # bytes to read */
-#define FIONBIO 0x8004667e /* To be compatible with termiost version */
-#define REAL_FIONBIO _IOW('f', 126, u_long) /* set/clear non-blocking i/o */
-#define FIOASYNC _IOW('f', 125, u_long) /* set/clear async i/o */
-#define SIOCSHIWAT _IOW('s', 0, u_long) /* set high watermark */
-#define SIOCGHIWAT _IOR('s', 1, u_long) /* get high watermark */
-#define SIOCSLOWAT _IOW('s', 2, u_long) /* set low watermark */
-#define SIOCGLOWAT _IOR('s', 3, u_long) /* get low watermark */
+#define SIOCATMARK _IOR('s', 7, long) /* at oob mark? */
+#define FIONREAD _IOR('f', 127, long) /* get # bytes to read */
+/* Compatible with termios.h */
+#define FIONBIO 0x8004667e /* set/clear non-blocking i/o */
+#define FIOASYNC _IOW('f', 125, long) /* set/clear async i/o */
+#define SIOCSHIWAT _IOW('s', 0, long) /* set high watermark */
+#define SIOCGHIWAT _IOR('s', 1, long) /* get high watermark */
+#define SIOCSLOWAT _IOW('s', 2, long) /* set low watermark */
+#define SIOCGLOWAT _IOR('s', 3, long) /* get low watermark */
/* Needed for if queries */
#define SIOCGIFCONF _IOW('s', 100, struct ifconf) /* get if list */
@@ -57,7 +55,7 @@ details. */
#define SO_USELOOPBACK 0x0040 /* bypass hardware when possible */
#define SO_LINGER 0x0080 /* linger on close if data present */
#define SO_OOBINLINE 0x0100 /* leave received OOB data in line */
-#define SO_DONTLINGER (u_int)(~SO_LINGER)
+#define SO_DONTLINGER (unsigned int)(~SO_LINGER)
#define SO_PEERCRED 0x0200 /* same as getpeereid */
/*
diff --git a/winsup/cygwin/include/asm/types.h b/winsup/cygwin/include/asm/types.h
index 19cc2ca60..c2342efc1 100644
--- a/winsup/cygwin/include/asm/types.h
+++ b/winsup/cygwin/include/asm/types.h
@@ -1,7 +1,5 @@
/* asm/types.h
- Copyright 1998, 2000, 2001 Red Hat, Inc.
-
This file is part of Cygwin.
This software is a copyrighted work licensed under the terms of the
@@ -20,4 +18,8 @@ typedef unsigned short __u16;
typedef __signed__ int __s32;
typedef unsigned int __u32;
+/* As on Linux. Works for both platforms, i686 and x86_64. */
+typedef __signed__ long long __s64;
+typedef unsigned long long __u64;
+
#endif /* _ASM_TYPES_H */
diff --git a/winsup/cygwin/include/attr/xattr.h b/winsup/cygwin/include/attr/xattr.h
index 421e6871d..7e410414d 100644
--- a/winsup/cygwin/include/attr/xattr.h
+++ b/winsup/cygwin/include/attr/xattr.h
@@ -1,7 +1,5 @@
/* attr/xattr.h
- Copyright 2008 Red Hat, Inc.
-
This file is part of Cygwin.
This software is a copyrighted work licensed under the terms of the
diff --git a/winsup/cygwin/include/bits/endian.h b/winsup/cygwin/include/bits/endian.h
index 492932990..28ed0a217 100644
--- a/winsup/cygwin/include/bits/endian.h
+++ b/winsup/cygwin/include/bits/endian.h
@@ -1,7 +1,5 @@
/* bits/endian.h
- Copyright 2011 Red Hat, Inc.
-
This file is part of Cygwin.
This software is a copyrighted work licensed under the terms of the
diff --git a/winsup/cygwin/include/byteswap.h b/winsup/cygwin/include/byteswap.h
index cd5a726d4..5e3f22196 100644
--- a/winsup/cygwin/include/byteswap.h
+++ b/winsup/cygwin/include/byteswap.h
@@ -1,7 +1,5 @@
/* byteswap.h
-Copyright 2005 Red Hat, Inc.
-
This file is part of Cygwin.
This software is a copyrighted work licensed under the terms of the
@@ -16,23 +14,27 @@ extern "C" {
#endif
static __inline unsigned short
-bswap_16 (unsigned short __x)
+__bswap_16 (unsigned short __x)
{
return (__x >> 8) | (__x << 8);
}
static __inline unsigned int
-bswap_32 (unsigned int __x)
+__bswap_32 (unsigned int __x)
{
- return (bswap_16 (__x & 0xffff) << 16) | (bswap_16 (__x >> 16));
+ return (__bswap_16 (__x & 0xffff) << 16) | (__bswap_16 (__x >> 16));
}
static __inline unsigned long long
-bswap_64 (unsigned long long __x)
+__bswap_64 (unsigned long long __x)
{
- return (((unsigned long long) bswap_32 (__x & 0xffffffffull)) << 32) | (bswap_32 (__x >> 32));
+ return (((unsigned long long) __bswap_32 (__x & 0xffffffffull)) << 32) | (__bswap_32 (__x >> 32));
}
+#define bswap_16(x) __bswap_16(x)
+#define bswap_32(x) __bswap_32(x)
+#define bswap_64(x) __bswap_64(x)
+
#ifdef __cplusplus
}
#endif
diff --git a/winsup/cygwin/include/cygwin/acl.h b/winsup/cygwin/include/cygwin/acl.h
index 9a62e325e..885fffe62 100644
--- a/winsup/cygwin/include/cygwin/acl.h
+++ b/winsup/cygwin/include/cygwin/acl.h
@@ -1,6 +1,4 @@
/* cygwin/acl.h header file for Cygwin.
-
- Copyright 1999, 2000, 2001, 2002, 2010 Red Hat, Inc.
Written by C. Vinschen.
This file is part of Cygwin.
@@ -25,66 +23,70 @@ extern "C" {
#define GETACL (0x1)
#define GETACLCNT (0x2)
-#define MIN_ACL_ENTRIES (4) // minimal acl entries from GETACLCNT
-#define MAX_ACL_ENTRIES (256) // max entries of each type
+/* Windows ACLs have a maximum size of 64K. Counting the most pessimistic way,
+ the maximum number of ACEs is 3276. Technet claims "approximately 1820",
+ which uses the length of normal user and group SIDs for the computation.
+ We're now going with 2730, the number of aclent_t entries matching a 32K
+ buffer.
+ On one hand, there are only a limited number of SIDs shorter than the normal
+ user/group SIDs, on the other hand there are no deny aclent_t entries, so we
+ should be fine with 32K aclbuf_t buffers provided by the caller. */
+#define MIN_ACL_ENTRIES (3) /* minimal acl entries from GETACLCNT */
+#define MAX_ACL_ENTRIES (2730) /* max entries of each type */
-// Return values of aclcheck(3) in case of error */
+/* Return values of aclcheck(3) in case of error */
#define GRP_ERROR (0x1)
#define USER_ERROR (0x2)
#define CLASS_ERROR (0x3)
#define OTHER_ERROR (0x4)
#define DUPLICATE_ERROR (0x5)
#define ENTRY_ERROR (0x6)
-#define MISS_ERROR (0x7) // which = -1
-#define MEM_ERROR (0x8) // which = -1
+#define MISS_ERROR (0x7) /* which = -1 */
+#define MEM_ERROR (0x8) /* which = -1 */
-// Values for entry type of struct acl
-#define USER_OBJ (0x0001) // owner
-#define USER (0x0002) // additional user
-#define GROUP_OBJ (0x0004) // owning group
-#define GROUP (0x0008) // additional group
-#define CLASS_OBJ (0x0010) // mask entry
-#define OTHER_OBJ (0x0020) // others
-#define ACL_DEFAULT (0x1000) // default flag
-#define DEF_USER_OBJ (ACL_DEFAULT|USER_OBJ) // default owner
-#define DEF_USER (ACL_DEFAULT|USER) // default additional user
-#define DEF_GROUP_OBJ (ACL_DEFAULT|GROUP_OBJ) // default owning group
-#define DEF_GROUP (ACL_DEFAULT|GROUP) // default additional group
-#define DEF_CLASS_OBJ (ACL_DEFAULT|CLASS_OBJ) // default mask entry
-#define DEF_OTHER_OBJ (ACL_DEFAULT|OTHER_OBJ) // default others
-// Values with equivalent meanings
+/* Values for entry type of struct acl */
+#define USER_OBJ (0x0001) /* owner */
+#define USER (0x0002) /* additional user */
+#define GROUP_OBJ (0x0004) /* owning group */
+#define GROUP (0x0008) /* additional group */
+#define CLASS_OBJ (0x0010) /* mask entry */
+#define OTHER_OBJ (0x0020) /* others */
+#define ACL_DEFAULT (0x1000) /* default flag */
+#define DEF_USER_OBJ (ACL_DEFAULT|USER_OBJ) /* default owner */
+#define DEF_USER (ACL_DEFAULT|USER) /* default additional user */
+#define DEF_GROUP_OBJ (ACL_DEFAULT|GROUP_OBJ) /* default owning group */
+#define DEF_GROUP (ACL_DEFAULT|GROUP) /* default additional group */
+#define DEF_CLASS_OBJ (ACL_DEFAULT|CLASS_OBJ) /* default mask entry */
+#define DEF_OTHER_OBJ (ACL_DEFAULT|OTHER_OBJ) /* default others */
+/* Values with equivalent meanings */
#define USER_OWNER USER_OBJ
#define GROUP_OWNER GROUP_OBJ
#define MASK CLASS_OBJ
#define OTHER OTHER_OBJ
-#ifdef __INSIDE_CYGWIN__
-#ifndef __x86_64__
-typedef struct __acl16 {
- int a_type;
- __uid16_t a_id;
- mode_t a_perm;
-} __aclent16_t;
-#endif
-#endif
-
typedef struct acl {
- int a_type; /* entry type */
- uid_t a_id; /* UID | GID */
+ int a_type; /* entry type */
+ id_t a_id; /* UID | GID */
mode_t a_perm; /* permissions */
} aclent_t;
#ifndef __INSIDE_CYGWIN__
-int _EXFUN(acl,(const char *path, int cmd, int nentries, aclent_t *aclbufp));
-int _EXFUN(facl,(int fd, int cmd, int nentries, aclent_t *aclbufp));
-int _EXFUN(aclcheck,(aclent_t *aclbufp, int nentries, int *which));
-int _EXFUN(aclsort,(int nentries, int calclass, aclent_t *aclbufp));
-int _EXFUN(acltomode,(aclent_t *aclbufp, int nentries, mode_t *modep));
-int _EXFUN(aclfrommode,(aclent_t *aclbufp, int nentries, mode_t *modep));
-int _EXFUN(acltopbits,(aclent_t *aclbufp, int nentries, mode_t *pbitsp));
-int _EXFUN(aclfrompbits,(aclent_t *aclbufp, int nentries, mode_t *pbitsp));
-char *_EXFUN(acltotext,(aclent_t *aclbufp, int aclcnt));
-aclent_t *_EXFUN(aclfromtext,(char *acltextp, int *aclcnt));
+extern int acl (const char *__path, int __cmd, int __nentries,
+ aclent_t *__aclbufp);
+extern int facl (int __fd, int __cmd, int __nentries,
+ aclent_t *__aclbufp);
+extern int aclcheck (aclent_t *__aclbufp, int __nentries, int *__which);
+extern int aclsort (int __nentries, int __calclass, aclent_t *__aclbufp);
+extern int acltomode (aclent_t *__aclbufp, int __nentries,
+ mode_t *__modep);
+extern int aclfrommode (aclent_t *__aclbufp, int __nentries,
+ mode_t *__modep);
+extern int acltopbits (aclent_t *__aclbufp, int __nentries,
+ mode_t *__pbitsp);
+extern int aclfrompbits (aclent_t *__aclbufp, int __nentries,
+ mode_t *__pbitsp);
+extern char *acltotext (aclent_t *__aclbufp, int __aclcnt);
+extern aclent_t *aclfromtext (char *__acltextp, int *__aclcnt);
#endif
#ifdef __cplusplus
diff --git a/winsup/cygwin/include/cygwin/config.h b/winsup/cygwin/include/cygwin/config.h
index cd73388d5..c09641ed1 100644
--- a/winsup/cygwin/include/cygwin/config.h
+++ b/winsup/cygwin/include/cygwin/config.h
@@ -3,8 +3,6 @@
This wraps Cygwin configuration setting which were in newlib's
sys/config.h before. This way we can manaage our configuration
setting without bothering newlib.
-
- Copyright 2003, 2007, 2008, 2009, 2010, 2012, 2013 Red Hat, Inc.
Written by C. Vinschen.
This file is part of Cygwin.
@@ -40,20 +38,20 @@ extern "C" {
#ifdef _COMPILING_NEWLIB
#ifdef __x86_64__
#include "../tlsoffsets64.h"
-/* We would like to use just "%gs:8", but on x86_64 gcc uses pc-relative
- addressing and translates "gs:8" into the wrong addressing mode. */
-static inline char *___getreent (void)
+#else
+#include "../tlsoffsets.h"
+#endif
+__attribute__((gnu_inline))
+extern inline struct _reent *__getreent (void)
{
register char *ret;
+#ifdef __x86_64__
__asm __volatile__ ("movq %%gs:8,%0" : "=r" (ret));
- return ret + tls_local_clib;
-}
-#define __getreent() ((struct _reent *) ___getreent())
#else
-#include "../tlsoffsets.h"
-extern char *_tlsbase __asm__ ("%fs:4");
-#define __getreent() (struct _reent *)(_tlsbase + tls_local_clib)
+ __asm __volatile__ ("movl %%fs:4,%0" : "=r" (ret));
#endif
+ return (struct _reent *) (ret + tls_local_clib);
+}
#endif /* _COMPILING_NEWLIB */
#ifdef __x86_64__
@@ -69,6 +67,7 @@ extern char *_tlsbase __asm__ ("%fs:4");
Cygwin. Changing them in applications has no or not the desired effect.
Just leave them alone. */
#define _READ_WRITE_RETURN_TYPE _ssize_t
+#define _READ_WRITE_BUFSIZE_TYPE size_t
#define __LARGE64_FILES 1
#define __USE_INTERNAL_STAT64 1
#define __LINUX_ERRNO_EXTENSIONS__ 1
@@ -77,6 +76,10 @@ extern char *_tlsbase __asm__ ("%fs:4");
#define __HAVE_LOCALE_INFO_EXTENDED__ 1
#define _WANT_C99_TIME_FORMATS 1
#define _GLIBC_EXTENSION 1
+#define _STDIO_BSD_SEMANTICS 1
+#define __TM_GMTOFF tm_gmtoff
+#define __TM_ZONE tm_zone
+
#if defined(__INSIDE_CYGWIN__) || defined(_COMPILING_NEWLIB)
#define __EXPORT __declspec(dllexport)
#define __IMPORT
diff --git a/winsup/cygwin/include/cygwin/core_dump.h b/winsup/cygwin/include/cygwin/core_dump.h
index b1943937b..92ecae7ab 100644
--- a/winsup/cygwin/include/cygwin/core_dump.h
+++ b/winsup/cygwin/include/cygwin/core_dump.h
@@ -1,7 +1,5 @@
/* core_dump.h
- Copyright 1999, 2000, 2001 Red Hat, Inc.
-
Written by Egor Duda <deo@logos-m.ru>
This file is part of Cygwin.
@@ -27,7 +25,7 @@ struct win32_core_process_info
char command_line[1];
}
#ifdef __GNUC__
- __attribute__ ((packed))
+ __attribute__ ((__packed__))
#endif
;
@@ -38,7 +36,7 @@ struct win32_core_thread_info
CONTEXT thread_context;
}
#ifdef __GNUC__
- __attribute__ ((packed))
+ __attribute__ ((__packed__))
#endif
;
@@ -49,7 +47,7 @@ struct win32_core_module_info
char module_name[1];
}
#ifdef __GNUC__
- __attribute__ ((packed))
+ __attribute__ ((__packed__))
#endif
;
@@ -64,7 +62,7 @@ struct win32_pstatus
} data ;
}
#ifdef __GNUC__
- __attribute__ ((packed))
+ __attribute__ ((__packed__))
#endif
;
diff --git a/winsup/cygwin/include/cygwin/cygwin_dll.h b/winsup/cygwin/include/cygwin/cygwin_dll.h
index d3da87ddd..56b4363ce 100644
--- a/winsup/cygwin/include/cygwin/cygwin_dll.h
+++ b/winsup/cygwin/include/cygwin/cygwin_dll.h
@@ -1,7 +1,5 @@
/* cygwin_dll.h
- Copyright 1998, 1999, 2000, 2001, 2009, 2011, 2012, 2013 Red Hat, Inc.
-
This file is part of Cygwin.
This software is a copyrighted work licensed under the terms of the
@@ -35,9 +33,9 @@ static DWORD storedReason; \
static void* storedPtr; \
int __dynamically_loaded; \
\
-static int __dllMain (int a __attribute__ ((unused)), \
- char **b __attribute__ ((unused)), \
- char **c __attribute__ ((unused))) \
+static int __dllMain (int a __attribute__ ((__unused__)), \
+ char **b __attribute__ ((__unused__)), \
+ char **c __attribute__ ((__unused__))) \
{ \
return Entry (storedHandle, storedReason, storedPtr); \
} \
diff --git a/winsup/cygwin/include/cygwin/fs.h b/winsup/cygwin/include/cygwin/fs.h
index 509b9c555..f606ffc39 100644
--- a/winsup/cygwin/include/cygwin/fs.h
+++ b/winsup/cygwin/include/cygwin/fs.h
@@ -1,6 +1,4 @@
/* cygwin/fs.h
-
- Copyright 2002, 2003, 2012 Red Hat Inc.
Written by Chris January <chris@atomice.net>
This file is part of Cygwin.
diff --git a/winsup/cygwin/include/cygwin/grp.h b/winsup/cygwin/include/cygwin/grp.h
index 056c5f618..35265dbec 100644
--- a/winsup/cygwin/include/cygwin/grp.h
+++ b/winsup/cygwin/include/cygwin/grp.h
@@ -1,6 +1,4 @@
/* cygwin/grp.h
-
- Copyright 2002, 2011 Red Hat Inc.
Written by Corinna Vinschen <corinna@vinschen.de>
This file is part of Cygwin.
diff --git a/winsup/cygwin/include/cygwin/hdreg.h b/winsup/cygwin/include/cygwin/hdreg.h
index dc8157838..7167f4fc9 100644
--- a/winsup/cygwin/include/cygwin/hdreg.h
+++ b/winsup/cygwin/include/cygwin/hdreg.h
@@ -1,6 +1,4 @@
/* cygwin/hdreg.h
-
- Copyright 2002 Red Hat Inc.
Written by Chris January <chris@atomice.net>
This file is part of Cygwin.
diff --git a/winsup/cygwin/include/cygwin/if.h b/winsup/cygwin/include/cygwin/if.h
index 2cd6ac5f3..cca8fd5f0 100644
--- a/winsup/cygwin/include/cygwin/if.h
+++ b/winsup/cygwin/include/cygwin/if.h
@@ -1,7 +1,5 @@
/* cygwin/if.h
- Copyright 1996, 2000, 2001, 2007, 2012, 2013 Red Hat, Inc.
-
This file is part of Cygwin.
This software is a copyrighted work licensed under the terms of the
diff --git a/winsup/cygwin/include/cygwin/in.h b/winsup/cygwin/include/cygwin/in.h
index a64160e8f..9d7331d30 100644
--- a/winsup/cygwin/include/cygwin/in.h
+++ b/winsup/cygwin/include/cygwin/in.h
@@ -20,8 +20,15 @@
#include <cygwin/socket.h>
-typedef uint16_t in_port_t;
-typedef uint32_t in_addr_t;
+#ifndef _IN_ADDR_T_DECLARED
+typedef __uint32_t in_addr_t;
+#define _IN_ADDR_T_DECLARED
+#endif
+
+#ifndef _IN_PORT_T_DECLARED
+typedef __uint16_t in_port_t;
+#define _IN_PORT_T_DECLARED
+#endif
#ifndef __INSIDE_CYGWIN_NET__
diff --git a/winsup/cygwin/include/cygwin/in6.h b/winsup/cygwin/include/cygwin/in6.h
index bdb812c99..fb787c0ea 100644
--- a/winsup/cygwin/include/cygwin/in6.h
+++ b/winsup/cygwin/include/cygwin/in6.h
@@ -1,7 +1,5 @@
/* cygwin/in6.h
- Copyright 2006, 2007 Red Hat, Inc.
-
This file is part of Cygwin.
This software is a copyrighted work licensed under the terms of the
@@ -91,6 +89,14 @@ struct ipv6_mreq
uint32_t ipv6mr_interface;
};
+struct ipv6_rt_hdr {
+ uint8_t nexthdr;
+ uint8_t hdrlen;
+ uint8_t type;
+ uint8_t segments_left;
+ /* type specific data, variable length */
+};
+
struct in6_pktinfo
{
struct in6_addr ipi6_addr;
diff --git a/winsup/cygwin/include/cygwin/ipc.h b/winsup/cygwin/include/cygwin/ipc.h
index c660d960a..6cc1b9633 100644
--- a/winsup/cygwin/include/cygwin/ipc.h
+++ b/winsup/cygwin/include/cygwin/ipc.h
@@ -1,6 +1,4 @@
/* sys/ipc.h
-
- Copyright 2001, 2002, 2012, 2013 Red Hat Inc.
Written by Robert Collins <rbtcollins@hotmail.com>
This file is part of Cygwin.
diff --git a/winsup/cygwin/include/cygwin/kd.h b/winsup/cygwin/include/cygwin/kd.h
index b4ec7c523..4a73cac81 100644
--- a/winsup/cygwin/include/cygwin/kd.h
+++ b/winsup/cygwin/include/cygwin/kd.h
@@ -1,6 +1,4 @@
/* cygwin/kd.h
-
- Copyright 2006 Red Hat Inc.
Written by Kazuhiro Fujieda <fujieda@jaist.ac.jp>
This file is part of Cygwin.
diff --git a/winsup/cygwin/include/cygwin/msg.h b/winsup/cygwin/include/cygwin/msg.h
index c737971ea..b6096ff78 100644
--- a/winsup/cygwin/include/cygwin/msg.h
+++ b/winsup/cygwin/include/cygwin/msg.h
@@ -1,6 +1,4 @@
/* sys/msg.h
-
- Copyright 2002, 2012, 2013 Red Hat Inc.
Written by Conrad Scott <conrad.scott@dsl.pipex.com>
This file is part of Cygwin.
diff --git a/winsup/cygwin/include/cygwin/mtio.h b/winsup/cygwin/include/cygwin/mtio.h
index ae3aa8d33..f298a91a7 100644
--- a/winsup/cygwin/include/cygwin/mtio.h
+++ b/winsup/cygwin/include/cygwin/mtio.h
@@ -1,7 +1,5 @@
/* cygwin/mtio.h
- Copyright 1999, 2000, 2001, 2004, 2013 Red Hat, Inc.
-
Written by Corinna Vinschen <corinna@vinschen.de>
This file is part of Cygwin.
diff --git a/winsup/cygwin/include/cygwin/rdevio.h b/winsup/cygwin/include/cygwin/rdevio.h
index 2333abe43..ebbd00ccb 100644
--- a/winsup/cygwin/include/cygwin/rdevio.h
+++ b/winsup/cygwin/include/cygwin/rdevio.h
@@ -1,7 +1,5 @@
/* cygwin/rdevio.h
- Copyright 1999, 2000, 2001 Red Hat, Inc.
-
Written by Corinna Vinschen <corinna@vinschen.de>
This file is part of Cygwin.
diff --git a/winsup/cygwin/include/cygwin/sem.h b/winsup/cygwin/include/cygwin/sem.h
index 71592e52f..57abf1cb4 100644
--- a/winsup/cygwin/include/cygwin/sem.h
+++ b/winsup/cygwin/include/cygwin/sem.h
@@ -1,6 +1,4 @@
/* sys/sem.h
-
- Copyright 2002, 2012, 2013 Red Hat Inc.
Written by Conrad Scott <conrad.scott@dsl.pipex.com>
This file is part of Cygwin.
diff --git a/winsup/cygwin/include/cygwin/shm.h b/winsup/cygwin/include/cygwin/shm.h
index c58599379..bbe0e951b 100644
--- a/winsup/cygwin/include/cygwin/shm.h
+++ b/winsup/cygwin/include/cygwin/shm.h
@@ -1,6 +1,4 @@
/* sys/shm.h
-
- Copyright 2001, 2002, 2012, 2013 Red Hat Inc.
Written by Robert Collins <rbtcollins@hotmail.com>
This file is part of Cygwin.
@@ -13,7 +11,6 @@ details. */
#define _CYGWIN_SHM_H
#include <cygwin/ipc.h>
-#include <sys/cygwin.h>
#ifdef __cplusplus
extern "C"
@@ -24,7 +21,9 @@ extern "C"
*
* 64 Kb was hardcoded for x86. MS states this may change so the constant
* expression is replaced by a function call returning the correct value. */
-#define SHMLBA (cygwin_internal (CW_GET_SHMLBA))
+#define SHMLBA (__getpagesize ())
+/* internal alias of legacy getpagesize to avoid polluting global namespace */
+int __getpagesize (void);
/* Shared memory operation flags:
*/
diff --git a/winsup/cygwin/include/cygwin/signal.h b/winsup/cygwin/include/cygwin/signal.h
index 3d74c9c8d..f30499505 100644
--- a/winsup/cygwin/include/cygwin/signal.h
+++ b/winsup/cygwin/include/cygwin/signal.h
@@ -1,8 +1,5 @@
/* signal.h
- Copyright 2003, 2004, 2005, 2006, 2007, 2008, 2010, 2011, 2012, 2013
- Red Hat, Inc.
-
This file is part of Cygwin.
This software is a copyrighted work licensed under the terms of the
@@ -18,6 +15,10 @@
extern "C" {
#endif
+/*
+ Define a struct __mcontext, which should be identical in layout to the Win32
+ API type CONTEXT with the addition of oldmask and cr2 fields at the end.
+*/
#ifdef __x86_64__
struct _uc_fpxreg {
@@ -45,7 +46,7 @@ struct _fpstate
__uint32_t padding[24];
};
-struct ucontext
+struct __attribute__ ((aligned (16))) __mcontext
{
__uint64_t p1home;
__uint64_t p2home;
@@ -53,7 +54,7 @@ struct ucontext
__uint64_t p4home;
__uint64_t p5home;
__uint64_t p6home;
- __uint32_t cr2;
+ __uint32_t ctxflags;
__uint32_t mxcsr;
__uint16_t cs;
__uint16_t ds;
@@ -86,14 +87,15 @@ struct ucontext
__uint64_t r15;
__uint64_t rip;
struct _fpstate fpregs;
+ __uint64_t vregs[52];
__uint64_t vcx;
__uint64_t dbc;
__uint64_t btr;
__uint64_t bfr;
__uint64_t etr;
__uint64_t efr;
- __uint8_t _internal;
__uint64_t oldmask;
+ __uint64_t cr2;
};
#else /* !x86_64 */
@@ -117,9 +119,9 @@ struct _fpstate
__uint32_t nxst;
};
-struct ucontext
+struct __mcontext
{
- __uint32_t cr2;
+ __uint32_t ctxflags;
__uint32_t dr0;
__uint32_t dr1;
__uint32_t dr2;
@@ -143,13 +145,20 @@ struct ucontext
__uint32_t eflags;
__uint32_t esp;
__uint32_t ss;
- __uint8_t _internal;
+ __uint32_t reserved[128];
__uint32_t oldmask;
+ __uint32_t cr2;
};
#endif /* !x86_64 */
-#define __COPY_CONTEXT_SIZE ((size_t) (uintptr_t) &((struct ucontext *) 0)->_internal)
+/* Needed for GDB. It only compiles in the context copy code if this macro is
+ defined. This is not sizeof(CONTEXT) due to historical accidents. */
+#ifdef __x86_64__
+#define __COPY_CONTEXT_SIZE 816
+#else
+#define __COPY_CONTEXT_SIZE 204
+#endif
typedef union sigval
{
@@ -176,7 +185,7 @@ struct _sigcommune
__extension__ union
{
int _si_fd;
- void *_si_pipe_fhandler;
+ int64_t _si_pipe_unique_id;
char *_si_str;
};
};
@@ -299,13 +308,9 @@ enum
perform notification */
};
-#if __WORDSIZE == 64
-typedef __uint64_t sigset_t;
-#else
-/* FIXME: We should probably raise the # of signals for 32 bit as well.
- Unfortunately this is an ABI change so requires some forethought. */
-typedef __uint32_t sigset_t;
-#endif
+#define SIGEV_SIGNAL SIGEV_SIGNAL
+#define SIGEV_NONE SIGEV_NONE
+#define SIGEV_THREAD SIGEV_THREAD
typedef void (*_sig_func_ptr)(int);
@@ -326,6 +331,9 @@ struct sigaction
with three arguments instead of one
*/
#define SA_RESTART 0x10000000 /* Restart syscall on signal return */
+#define SA_ONSTACK 0x20000000 /* Call signal handler on alternate
+ signal stack provided by
+ sigaltstack(2). */
#define SA_NODEFER 0x40000000 /* Don't automatically block the signal
when its handler is being executed */
#define SA_RESETHAND 0x80000000 /* Reset to SIG_DFL on entry to handler */
@@ -336,12 +344,18 @@ struct sigaction
Do not use. */
#define _SA_INTERNAL_MASK 0xf000 /* bits in this range are internal */
+#undef MINSIGSTKSZ
+#define MINSIGSTKSZ 8192
+#undef SIGSTKSZ
+#define SIGSTKSZ 32768
+
#define SIGHUP 1 /* hangup */
#define SIGINT 2 /* interrupt */
#define SIGQUIT 3 /* quit */
#define SIGILL 4 /* illegal instruction (not reset when caught) */
#define SIGTRAP 5 /* trace trap (not reset when caught) */
#define SIGABRT 6 /* used by abort */
+#define SIGIOT SIGABRT /* synonym for SIGABRT on most systems */
#define SIGEMT 7 /* EMT instruction */
#define SIGFPE 8 /* floating point exception */
#define SIGKILL 9 /* kill (cannot be caught or ignored) */
diff --git a/winsup/cygwin/include/cygwin/socket.h b/winsup/cygwin/include/cygwin/socket.h
index 5ed83bef9..87cee0747 100644
--- a/winsup/cygwin/include/cygwin/socket.h
+++ b/winsup/cygwin/include/cygwin/socket.h
@@ -1,8 +1,5 @@
/* cygwin/socket.h
- Copyright 1999, 2000, 2001, 2002, 2003, 2005, 2006, 2007, 2009, 2010, 2012,
- 2013 Red Hat, Inc.
-
This file is part of Cygwin.
This software is a copyrighted work licensed under the terms of the
@@ -16,16 +13,15 @@ details. */
extern "C" {
#endif /* __cplusplus */
-#include <stdint.h>
+#include <sys/types.h>
-/* Not unsigned for backward compatibility. Keep #define for backward
- compatibility. */
+/* Keep #define socklen_t for backward compatibility. */
#ifndef socklen_t
-typedef int socklen_t;
+typedef __socklen_t socklen_t;
#define socklen_t socklen_t
#endif
-typedef uint16_t sa_family_t;
+typedef __sa_family_t sa_family_t;
#ifndef __INSIDE_CYGWIN_NET__
struct sockaddr {
@@ -51,7 +47,6 @@ struct sockaddr_storage {
#include <asm/socket.h> /* arch-dependent defines */
#include <cygwin/sockios.h> /* the SIOCxxx I/O controls */
#include <sys/uio.h> /* iovec support */
-#include <sys/types.h>
struct ucred {
pid_t pid;
@@ -77,7 +72,10 @@ struct msghdr
struct cmsghdr
{
- socklen_t cmsg_len; /* Length of cmsghdr + data */
+ /* Amazing but true: The type of cmsg_len should be socklen_t but, just
+ as on Linux, the definition of the kernel is incompatible with this,
+ so the Windows socket headers define cmsg_len as SIZE_T. */
+ size_t cmsg_len; /* Length of cmsghdr + data */
int cmsg_level; /* Protocol */
int cmsg_type; /* Protocol type */
};
@@ -233,21 +231,22 @@ struct OLD_msghdr
#define IP_MAX_MEMBERSHIPS 20
/* IP options for use with getsockopt/setsockopt */
-#define IP_OPTIONS 1
-#define IP_HDRINCL 2
-#define IP_TOS 3
-#define IP_TTL 4
-#define IP_MULTICAST_IF 9
-#define IP_MULTICAST_TTL 10
-#define IP_MULTICAST_LOOP 11
-#define IP_ADD_MEMBERSHIP 12
-#define IP_DROP_MEMBERSHIP 13
-#define IP_DONTFRAGMENT 14
+#define IP_OPTIONS 1
+#define IP_HDRINCL 2
+#define IP_TOS 3
+#define IP_TTL 4
+#define IP_MULTICAST_IF 9
+#define IP_MULTICAST_TTL 10
+#define IP_MULTICAST_LOOP 11
+#define IP_ADD_MEMBERSHIP 12
+#define IP_DROP_MEMBERSHIP 13
+#define IP_DONTFRAGMENT 14
#define IP_ADD_SOURCE_MEMBERSHIP 15
#define IP_DROP_SOURCE_MEMBERSHIP 16
#define IP_BLOCK_SOURCE 17
#define IP_UNBLOCK_SOURCE 18
#define IP_PKTINFO 19
+#define IP_UNICAST_IF 31
/* IPv6 options for use with getsockopt/setsockopt */
#define IPV6_HOPOPTS 1
@@ -264,8 +263,11 @@ struct OLD_msghdr
#define IPV6_HOPLIMIT 21
#define IPV6_CHECKSUM 26
#define IPV6_V6ONLY 27
+#define IPV6_UNICAST_IF 31
#define IPV6_RTHDR 32
#define IPV6_RECVRTHDR 38
+#define IPV6_TCLASS 39
+#define IPV6_RECVTCLASS 40
/* IP agnostic options for use with getsockopt/setsockopt */
#define MCAST_JOIN_GROUP 41
diff --git a/winsup/cygwin/include/cygwin/stat.h b/winsup/cygwin/include/cygwin/stat.h
index ed96fafd9..bbc58135c 100644
--- a/winsup/cygwin/include/cygwin/stat.h
+++ b/winsup/cygwin/include/cygwin/stat.h
@@ -1,6 +1,4 @@
/* cygwin/stat.h
-
- Copyright 2002, 2007, 2010 Red Hat Inc.
Written by Corinna Vinschen <corinna@vinschen.de>
This file is part of Cygwin.
@@ -56,8 +54,10 @@ struct __stat32
#endif
extern int fstat64 (int fd, struct stat *buf);
-extern int stat64 (const char *file_name, struct stat *buf);
-extern int lstat64 (const char *file_name, struct stat *buf);
+extern int stat64 (const char *__restrict file_name,
+ struct stat *__restrict buf);
+extern int lstat64 (const char *__restrict file_name,
+ struct stat *__restrict buf);
#endif
diff --git a/winsup/cygwin/include/cygwin/stdlib.h b/winsup/cygwin/include/cygwin/stdlib.h
index 3abe00ef3..744a08d95 100644
--- a/winsup/cygwin/include/cygwin/stdlib.h
+++ b/winsup/cygwin/include/cygwin/stdlib.h
@@ -1,7 +1,5 @@
/* stdlib.h
- Copyright 2005, 2006, 2007, 2008, 2009, 2011, 2013 Red Hat Inc.
-
This file is part of Cygwin.
This software is a copyrighted work licensed under the terms of the
@@ -11,6 +9,7 @@ details. */
#ifndef _CYGWIN_STDLIB_H
#define _CYGWIN_STDLIB_H
+#include <sys/cdefs.h>
#include <cygwin/wait.h>
#ifdef __cplusplus
@@ -18,32 +17,28 @@ extern "C"
{
#endif
-__uint32_t arc4random(void);
-void arc4random_addrandom(unsigned char *, int);
-void arc4random_buf(void *, size_t);
-void arc4random_stir(void);
-__uint32_t arc4random_uniform(__uint32_t);
-
const char *getprogname (void);
void setprogname (const char *);
-#ifndef __STRICT_ANSI__
-char *realpath (const char *, char *);
+#if __GNU_VISIBLE
char *canonicalize_file_name (const char *);
+#endif
+#if __BSD_VISIBLE || __POSIX_VISIBLE >= 200112
int unsetenv (const char *);
-char *initstate (unsigned seed, char *state, size_t size);
-long random (void);
-char *setstate (const char *state);
-void srandom (unsigned);
+#endif
+#if __XSI_VISIBLE
char *ptsname (int);
-int ptsname_r(int, char *, size_t);
-int getpt (void);
int grantpt (int);
int unlockpt (int);
-#endif /*__STRICT_ANSI__*/
+#endif
+#if __GNU_VISIBLE
+int ptsname_r(int, char *, size_t);
+int getpt (void);
+#endif
+#if __XSI_VISIBLE >= 600
int posix_openpt (int);
-int posix_memalign (void **, size_t, size_t);
+#endif
#ifdef _COMPILING_NEWLIB
#define unsetenv UNUSED_unsetenv
@@ -51,7 +46,9 @@ int posix_memalign (void **, size_t, size_t);
#endif
extern _PTR memalign _PARAMS ((size_t, size_t));
+#if __BSD_VISIBLE || (__XSI_VISIBLE >= 4 && __POSIX_VISIBLE < 200112)
extern _PTR valloc _PARAMS ((size_t));
+#endif
#undef _malloc_r
#define _malloc_r(r, s) malloc (s)
diff --git a/winsup/cygwin/include/cygwin/sys_time.h b/winsup/cygwin/include/cygwin/sys_time.h
deleted file mode 100644
index 1cbd8ae59..000000000
--- a/winsup/cygwin/include/cygwin/sys_time.h
+++ /dev/null
@@ -1,27 +0,0 @@
-/* sys_time.h
-
- Copyright 2005 Red Hat Inc.
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-#ifndef _CYGWIN_SYS_TIME_H
-#define _CYGWIN_SYS_TIME_H
-#include <sys/select.h>
-
-#ifdef __cplusplus
-extern "C"
-{
-#endif
-
-int futimes (int, const struct timeval *);
-int lutimes (const char *, const struct timeval *);
-
-
-#ifdef __cplusplus
-}
-#endif
-#endif /*_CYGWIN_SYS_TIME_H*/
diff --git a/winsup/cygwin/include/cygwin/sysproto.h b/winsup/cygwin/include/cygwin/sysproto.h
index 838555002..1ffd3107c 100644
--- a/winsup/cygwin/include/cygwin/sysproto.h
+++ b/winsup/cygwin/include/cygwin/sysproto.h
@@ -1,7 +1,5 @@
/* cygwin/sysproto.h
- Copyright 2003, 2005, 2012, 2013 Red Hat, Inc.
-
This file is part of Cygwin.
This software is a copyrighted work licensed under the terms of the
diff --git a/winsup/cygwin/include/cygwin/time.h b/winsup/cygwin/include/cygwin/time.h
index 3dbc372a3..a1080a1c0 100644
--- a/winsup/cygwin/include/cygwin/time.h
+++ b/winsup/cygwin/include/cygwin/time.h
@@ -1,7 +1,5 @@
/* time.h
- Copyright 2005, 2007 Red Hat Inc.
-
This file is part of Cygwin.
This software is a copyrighted work licensed under the terms of the
@@ -24,15 +22,18 @@ time_t __cdecl timegm (struct tm *);
#define TIMER_RELTIME 0 /* For compatibility with HP/UX, Solaris, others? */
-#ifndef __STRICT_ANSI__
+#if __SVID_VISIBLE
+extern int stime (const time_t *);
+#endif
+#if __SVID_VISIBLE || __XSI_VISIBLE
extern int daylight __asm__ (_SYMSTR (_daylight));
#ifndef __timezonefunc__
extern long timezone __asm__ (_SYMSTR (_timezone));
#endif
-#endif /*__STRICT_ANSI__*/
+#endif /* __SVID_VISIBLE || __XSI_VISIBLE */
#ifdef __cplusplus
}
diff --git a/winsup/cygwin/include/cygwin/utmp.h b/winsup/cygwin/include/cygwin/utmp.h
index 56a137ffe..9b06e5806 100644
--- a/winsup/cygwin/include/cygwin/utmp.h
+++ b/winsup/cygwin/include/cygwin/utmp.h
@@ -1,7 +1,5 @@
/* cygwin/utmp.h
- Copyright 2004 Red Hat, Inc.
-
This software is a copyrighted work licensed under the terms of the
Cygwin license. Please consult the file "CYGWIN_LICENSE" for
details. */
diff --git a/winsup/cygwin/include/cygwin/version.h b/winsup/cygwin/include/cygwin/version.h
index d8a69c1c3..9351ea907 100644
--- a/winsup/cygwin/include/cygwin/version.h
+++ b/winsup/cygwin/include/cygwin/version.h
@@ -1,82 +1,49 @@
/* version.h -- Cygwin version numbers and accompanying documentation.
- Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008, 2009, 2010, 2011, 2012, 2013 Red Hat, Inc.
-
This file is part of Cygwin.
This software is a copyrighted work licensed under the terms of the
Cygwin license. Please consult the file "CYGWIN_LICENSE" for
details. */
-/* Cygwin versioning is relatively complicated because of its status
- as a shared library. Let's start with how versioning used to be done.
-
- Historical versioning in Cygwin 16.0 to 19.5:
-
- In the olden days of Cygwin, we had a dll major and minor version
- and a registry version. The major number started at 16 because the
- "b15" GNU-Win32 release of the compiler tools was out when this
- scheme was started. We incremented the DLL name frequently (for
- every official release) and towards the end of this period every
- release used a different shared memory area to prevent DLLs from
- interfering with each other (embedding a build timestamp into the
- name of the shared memory area). This turned out to be a Bad Idea
- (tm) because people needed to mingle separate releases and have
- them work together more than we thought they would. This was
- especially problematic when tty info needed to be retained when an
- old Cygwin executable executed a newer one.
-
- In the old scheme, we incremented the major number whenever a
- change to the dll invalidated existing executables. This can
- happen for a number of reasons, including when functions are
- removed from the export list of the dll. The minor number was
- incremented when a change was made that we wanted to record, but
- that didn't invalidate existing executables. Both numbers were
- recorded in the executable and in the dll.
-
- In October 1998 (starting with Cygwin 19.6), we started a new method
- of Cygwin versioning: */
-
- /* The DLL major and minor numbers correspond to the "version of
- the Cygwin shared library". This version is used to track important
- changes to the DLL and is mainly informative in nature. */
-
-#define CYGWIN_VERSION_DLL_MAJOR 1007
-#define CYGWIN_VERSION_DLL_MINOR 25
-
- /* Major numbers before CYGWIN_VERSION_DLL_EPOCH are
- incompatible. */
+/* The DLL major and minor numbers correspond to the "version of
+ the Cygwin shared library". This version is used to track important
+ changes to the DLL and is mainly informative in nature. */
+
+#define CYGWIN_VERSION_DLL_MAJOR 2005
+#define CYGWIN_VERSION_DLL_MINOR 2
+
+/* Major numbers before CYGWIN_VERSION_DLL_EPOCH are incompatible. */
#define CYGWIN_VERSION_DLL_EPOCH 19
- /* CYGWIN_VERSION_DLL_COMBINED gives us a single number
- representing the combined DLL major and minor numbers. */
+/* CYGWIN_VERSION_DLL_COMBINED gives us a single number representing the
+ combined DLL major and minor numbers. */
- /* WATCH OUT FOR OCTAL! Don't use, say, "00020" for 0.20 */
+/* WATCH OUT FOR OCTAL! Don't use, say, "00020" for 0.20 */
#define CYGWIN_VERSION_DLL_MAKE_COMBINED(maj, min) (((maj) * 1000) + min)
#define CYGWIN_VERSION_DLL_COMBINED \
CYGWIN_VERSION_DLL_MAKE_COMBINED (CYGWIN_VERSION_DLL_MAJOR, CYGWIN_VERSION_DLL_MINOR)
- /* Every version of cygwin <= this uses an old, incorrect method
- to determine signal masks. */
-
+/* Every version of cygwin <= this uses an old, incorrect method to determine
+ signal masks. */
#define CYGWIN_VERSION_PER_PROCESS_API_VERSION_COMBINED(u) \
CYGWIN_VERSION_DLL_MAKE_COMBINED ((u)->api_major, (u)->api_minor)
#define CYGWIN_VERSION_USER_API_VERSION_COMBINED \
CYGWIN_VERSION_PER_PROCESS_API_VERSION_COMBINED (user_data)
- /* API versions <= this had a termios structure whose members were
- too small to accomodate modern settings. */
+/* API versions <= this had a termios structure whose members were too small
+ to accomodate modern settings. */
#define CYGWIN_VERSION_DLL_OLD_TERMIOS 5
#define CYGWIN_VERSION_DLL_IS_OLD_TERMIOS \
(CYGWIN_VERSION_USER_API_VERSION_COMBINED <= CYGWIN_VERSION_DLL_OLD_TERMIOS)
#define CYGWIN_VERSION_DLL_MALLOC_ENV 28
- /* Old APIs had getc/putc macros that conflict with new CR/LF
- handling in the stdio buffers */
+
+/* Old APIs had getc/putc macros that conflict with new CR/LF handling in the
+ stdio buffers */
#define CYGWIN_VERSION_OLD_STDIO_CRLF_HANDLING \
(CYGWIN_VERSION_USER_API_VERSION_COMBINED <= 20)
@@ -104,415 +71,452 @@ details. */
#define CYGWIN_VERSION_USE_PSEUDO_RELOC_IN_DLL(u) \
(CYGWIN_VERSION_PER_PROCESS_API_VERSION_COMBINED (u) >= 227)
+#define CYGWIN_VERSION_CHECK_FOR_EXTRA_TM_MEMBERS \
+ (CYGWIN_VERSION_USER_API_VERSION_COMBINED >= 272)
+
#define CYGWIN_VERSION_CYGWIN_CONV 181
- /* API_MAJOR 0.0: Initial version. API_MINOR changes:
- 1: Export cygwin32_ calls as cygwin_ as well.
- 2: Export j1, jn, y1, yn.
- 3: Export dll_noncygwin_dllcrt0.
- 4: New socket ioctls, revamped ifconf support.
- 5: Thread support/exports.
- 6: Change in termios handling.
- 7: Export scandir and alphasort.
- 8: Export _ctype_, _sys_errlist, _sys_nerr.
- 9: Mount-related changes, new cygwin_umount export.
- Raw device support (tape, floppies).
- 10: Fast math routine support added.
- 11: Export seekdir, telldir.
- 12: Export pthread_join, pthread_detach.
- 13: Export math funcs gamma and friends, also _j0, _j1, etc.
- 14: Export snprintf and vnsprintf.
- 15: Export glob
- 16: Export cygwin_stackdump
- 17: Export fast math stuff
- 18: Stop exporting _strace_wm
- 19: Export fchown, lchown, lacl
- 20: regsub, inet_network
- 21: incompatible change to stdio cr/lf and buffering
- 22: Export cygwin_logon_user, cygwin_set_impersonation_token.
- geteuid, getegid return effective uid/gid.
- getuid, getgid return real uid/gid.
- seteuid, setegid set only effective uid/gid.
- setuid, setgid set effective and real uid/gid.
- 23: Export new dll_crt0 interface and cygwin_user_data for use
- with crt0 startup code.
- 24: Export poll and _poll.
- 25: Export getmode and _getmode.
- 26: CW_GET_CYGDRIVE_PREFIXES addition to external.cc
- 27: CW_GETPINFO_FULL addition to external.cc
- 28: Accidentally bumped by cgf
- 29: Export hstrerror
- 30: CW_GET_CYGDRIVE_INFO addition to external.cc
- 31: Export inet_aton
- 32: Export getrlimit/setrlimit
- 33: Export setlogmask
- 34: Separated out mount table
- 35: Export drand48, erand48, jrand48, lcong48, lrand48,
- mrand48, nrand48, seed48, and srand48.
- 36: Added _cygwin_S_IEXEC, et al
- 37: [f]pathconv support _PC_POSIX_PERMISSIONS and _PC_POSIX_SECURITY
- 38: vscanf, vscanf_r, and random pthread functions
- 39: asctime_r, ctime_r, gmtime_r, localtime_r
- 40: fchdir
- 41: __signgam
- 42: sys_errlist, sys_nerr
- 43: sigsetjmp, siglongjmp fixed
- 44: Export dirfd
- 45: perprocess change, gamma_r, gammaf_r, lgamma_r, lgammaf_r
- 46: Remove cygwin_getshared
- 47: Report EOTWarningZoneSize in struct mtget.
- 48: Export "posix" regex functions
- 49: Export setutent, endutent, utmpname, getutent, getutid, getutline.
- 50: Export fnmatch.
- 51: Export recvmsg, sendmsg.
- 52: Export strptime
- 53: Export strlcat, strlcpy.
- 54: Export __fpclassifyd, __fpclassifyf, __signbitd, __signbitf.
- 55: Export fcloseall, fcloseall_r.
- 56: Make ntsec on by default.
- 57: Export setgroups.
- 58: Export memalign, valloc, malloc_trim, malloc_usable_size, mallopt,
- malloc_stats
- 59: getsid
- 60: MSG_NOSIGNAL
- 61: Export getc_unlocked, getchar_unlocked, putc_unlocked,
- putchar_unlocked
- 62: Erroneously bumped
- 63: Export pututline
- 64: Export fseeko, ftello
- 65: Export siginterrupt
- 66: Export nl_langinfo
- 67: Export pthread_getsequence_np
- 68: Export netdb stuff
- 69: Export strtof
- 70: Export asprintf, _asprintf_r, vasprintf, _vasprintf_r
- 71: Export strerror_r
- 72: Export nanosleep
- 73: Export setreuid32, setreuid, setregid32, setregid
- 74: Export _strtold a64l hcreate hcreate_r hdestroy hdestroy_r hsearch
- hsearch_r isblank iswalnum iswalpha iswblank iswcntrl iswctype
- iswdigit iswgraph iswlower iswprint iswpunct iswspace iswupper
- iswxdigit l64a mbrlen mbrtowc mbsinit mbsrtowcs mempcpy
- on_exit setbuffer setlinebuf strndup strnlen tdelete tdestroy
- tfind towctrans towlower towupper tsearch twalk wcrtomb wcscat
- wcschr wcscpy wcscspn wcslcat wcslcpy wcsncat wcsncmp wcsncpy
- wcspbrk wcsrchr wcsrtombs wcsspn wcsstr wctob wctob wctrans
- wctype wmemchr wmemcmp wmemcpy wmemmove wmemset
- 75: Export exp2 exp2f fdim fdimf fma fmaf fmax fmaxf fmin fminf lrint
- lrintf lround lroundf nearbyint nearbyintf remquo remquof
- round roundf scalbln scalblnf sincos sincosf tgamma tgammaf
- truncf
- 76: mallinfo
- 77: thread-safe exit/at_exit
- 78: Use stat and fstat rather than _stat, and _fstat.
- Export btowc and trunc.
- 79: Export acl32 aclcheck32 aclfrommode32 aclfrompbits32 aclfromtext32
- aclsort32 acltomode32 acltopbits32 acltotext32 facl32
- fgetpos64 fopen64 freopen64 fseeko64 fsetpos64 ftello64
- _open64 _lseek64 _fstat64 _stat64 mknod32
- 80: Export pthread_rwlock stuff
- 81: CW_CHECK_NTSEC addition to external.cc
- 82: Export wcscoll wcswidth wcwidth
- 83: Export gethostid
- 84: Pty open allocates invisible console. 64 bit interface
- 85: Export new 32/64 functions from API 0.79 only with leading
- underscore. No problems with backward compatibility since no
- official release has been made so far. This change removes
- exported symbols like fopen64, which might confuse configure.
- 86: Export ftok
- 87: Export vsyslog
- 88: Export _getreent
- 89: Export __mempcpy
- 90: Export _fopen64
- 91: Export argz_add argz_add_sep argz_append argz_count argz_create
- argz_create_sep argz_delete argz_extract argz_insert
- argz_next argz_replace argz_stringify envz_add envz_entry
- envz_get envz_merge envz_remove envz_strip
- 92: Export getusershell, setusershell, endusershell
- 93: Export daemon, forkpty, openpty, iruserok, ruserok, login_tty,
- openpty, forkpty, revoke, logwtmp, updwtmp
- 94: Export getopt, getopt_long, optarg, opterr, optind, optopt,
- optreset, __check_rhosts_file, __rcmd_errstr.
- 95: Export shmat, shmctl, shmdt, shmget.
- 96: CW_GET_ERRNO_FROM_WINERROR addition to external.cc
- 97: Export sem_open, sem_close, sem_timedwait, sem_getvalue.
- 98: Export _tmpfile64.
- 99: CW_GET_POSIX_SECURITY_ATTRIBUTE addition to external.cc.
- 100: CW_GET_SHMLBA addition to external.cc.
- 101: Export err, errx, verr, verrx, warn, warnx, vwarn, vwarnx.
- 102: CW_GET_UID_FROM_SID and CW_GET_GID_FROM_SID addition to external.cc.
- 103: Export getprogname, setprogname.
- 104: Export msgctl, msgget, msgrcv, msgsnd, semctl, semget, semop.
- 105: Export sigwait.
- 106: Export flock.
- 107: Export fcntl64.
- 108: Remove unused (hopefully) reent_data export.
- 109: Oh well. Someone uses reent_data.
- 110: Export clock_gettime, sigwaitinfo, timer_create, timer_delete,
- timer_settime
- 111: Export sigqueue, sighold.
- 112: Redefine some mtget fields.
- 113: Again redefine some mtget fields. Use mt_fileno and mt_blkno as
- on Linux.
- 114: Export rand_r, ttyname_r.
- 115: Export flockfile, ftrylockfile, funlockfile, getgrgid_r, getgrnam_r,
- getlogin_r.
- 116: Export atoll.
- 117: Export utmpx functions, Return utmp * from pututent.
- 118: Export getpriority, setpriority.
- 119: Export fdatasync.
- 120: Export basename, dirname.
- 122: Export statvfs, fstatvfs.
- 123: Export utmpxname.
- 124: Add MAP_AUTOGROW flag to mmap.
- 125: LD_PRELOAD/CW_HOOK available.
- 126: Export lsearch, lfind, timer_gettime.
- 127: Export sigrelese.
- 128: Export pselect.
- 129: Export mkdtemp.
- 130: Export strtoimax, strtoumax, llabs, imaxabs, lldiv, imaxdiv.
- 131: Export inet_ntop, inet_pton.
- 132: Add GLOB_LIMIT flag to glob.
- 133: Export __getline, __getdelim.
- 134: Export getline, getdelim.
- 135: Export pread, pwrite
- 136: Add TIOCMBIS/TIOCMBIC ioctl codes.
- 137: fts_children, fts_close, fts_get_clientptr, fts_get_stream,
- fts_open, fts_read, fts_set, fts_set_clientptr, ftw, nftw.
- 138: Export readdir_r.
- 139: Start using POSIX definition of struct msghdr and WinSock2
- IPPROTO_IP values.
- 140: Export mlock, munlock.
- 141: Export futimes, lutimes.
- 142: Export memmem
- 143: Export clock_getres, clock_setres
- 144: Export timelocal, timegm.
- 145: Add MAP_NORESERVE flag to mmap.
- 146: Change SI_USER definition. FIXME: Need to develop compatibility
- macro for this?
- 147: Eliminate problematic d_ino from dirent structure. unsetenv now
- returns int, as per linux.
- 148: Add open(2) flags O_SYNC, O_RSYNC, O_DSYNC and O_DIRECT.
- 149: Add open(2) flag O_NOFOLLOW.
- 150: Export getsubopt.
- 151: Export __opendir_with_d_ino
- 152: Revert to having d_ino in dirent unconditionally.
- 153: Export updwtmpx, Implement CW_SETUP_WINENV.
- 154: Export sigset, sigignore.
- 155: Export __isinff, __isinfd, __isnanf, __isnand.
- 156: Export __srbuf_r, __swget_r.
- 157: Export gai_strerror, getaddrinfo, getnameinfo, freeaddrinfo,
- in6addr_any, in6addr_loopback.
- 158: Export bindresvport, bindresvport_sa, iruserok_sa, rcmd_af,
- rresvport_af.
- 159: Export posix_openpt.
- 160: Export posix_fadvise, posix_fallocate.
- 161: Export resolver functions.
- 162: New struct ifreq. Export if_nametoindex, if_indextoname,
- if_nameindex, if_freenameindex.
- 163: Export posix_madvise, posix_memalign.
- 164: Export shm_open, shm_unlink.
- 165: Export mq_close, mq_getattr, mq_notify, mq_open, mq_receive,
- mq_send, mq_setattr, mq_timedreceive, mq_timedsend, mq_unlink.
- 166: Export sem_unlink.
- 167: Add st_birthtim to struct stat.
- 168: Export asnprintf, dprintf, _Exit, vasnprintf, vdprintf.
- 169: Export confstr.
- 170: Export insque, remque.
- 171: Export exp10, exp10f, pow10, pow10f, strcasestr, funopen,
- fopencookie.
- 172: Export getifaddrs, freeifaddrs.
- 173: Export __assert_func.
- 174: Export stpcpy, stpncpy.
- 175: Export fdopendir.
- 176: Export wcstol, wcstoll, wcstoul, wcstoull, wcsxfrm.
- 177: Export sys_sigabbrev
- 178: Export wcpcpy, wcpncpy.
- 179: Export _f_llrint, _f_llrintf, _f_llrintl, _f_lrint, _f_lrintf,
- _f_lrintl, _f_rint, _f_rintf, _f_rintl, llrint, llrintf, llrintl,
- rintl, lrintl, and redirect exports of lrint, lrintf, rint, rintf.
- 180: Export getxattr, lgetxattr, fgetxattr, listxattr, llistxattr,
- flistxattr, setxattr, lsetxattr, fsetxattr, removexattr,
- lremovexattr, fremovexattr.
- 181: Export cygwin_conv_path, cygwin_create_path, cygwin_conv_path_list.
- 182: Export lockf.
- FIXME: Removed 12 year old and entirely wrong wprintf function at
- this point. We need a working implementation soon.
- 183: Export open_memstream, fmemopen.
- 184: Export openat, faccessat, fchmodat, fchownat, fstatat, futimesat,
- linkat, mkdirat, mkfifoat, mknodat, readlinkat, renameat, symlinkat,
- unlinkat.
- 185: Export futimens, utimensat.
- 186: Remove ancient V8 regexp functions. Also eliminate old crt0 interface
- which provided its own user_data structure.
- 187: Export cfmakeraw.
- 188: Export CW_SET_PRIV_KEY.
- 189: Implement dirent.d_type.
- 190: Export fgetwc, fgetws, fputwc, fputws, fwide, getwc, getwchar,
- putwc, putwchar, ungetwc.
- 191: Export glob_pattern_p
- 192: CW_SETERRNO added
- 193: Export wcstok.
- 194: fcntl.h flags O_DIRECTORY, O_EXEC and O_SEARCH added.
- 195: Export wcstod, wcstof.
- 196: Export wcsnlen.
- 197: Export wcstoimax, wcstoumax.
- 198: Export reallocf.
- 199: Export open_wmemstream.
- 200: Export mbsnrtowcs, wcsnrtombs.
- 201: Export wprintf, fwprintf, swprintf, vwprintf, vfwprintf, vswprintf.
- 202: Export gethostbyname2.
- 203: Export wcsftime.
- 204: recv/send flag MSG_DONTWAIT added.
- 205: Export wscanf, fwscanf, swscanf, vwscanf, vfwscanf, vswscanf.
- 206: Export wcscasecmp, wcsncasecmp.
- 207: Export wcsdup.
- 208: Export log2, log2f.
- 209: Export wordexp, wordfree.
- 210: New ctype layout using variable ctype pointer. Export __ctype_ptr__.
- 211: Export fpurge, mkstemps.
- 212: Add and export libstdc++ malloc wrappers.
- 213: Export canonicalize_file_name, eaccess, euidaccess.
- 214: Export execvpe, fexecve.
- 215: CW_EXIT_PROCESS added.
- 216: CW_SET_EXTERNAL_TOKEN added.
- 217: CW_GET_INSTKEY added.
- 218: Export get_nprocs, get_nprocs_conf, get_phys_pages, get_avphys_pages.
- 219: Export dup3, pipe2, O_CLOEXEC, F_DUPFD_CLOEXEC.
- 220: Export accept4, SOCK_CLOEXEC, SOCK_NONBLOCK.
- 221: Export strfmon.
- 222: CW_INT_SETLOCALE added.
- 223: SIGPWR added.
- 224: Export xdr* functions.
- 225: Export __xdr* functions.
- 226: Export __locale_mb_cur_max.
- 227: Add pseudo_reloc_start, pseudo_reloc_end, image_base to per_process.
- 228: CW_STRERROR added.
- 229: Add mkostemp, mkostemps.
- 230: Add CLOCK_MONOTONIC.
- 231: Add fenv.h functions.
- 232: Export cacos, cacosf, cacosh, cacoshf, carg, cargf, casin, casinf,
- casinh, casinhf, catan, catanf, catanh, catanhf, ccos, ccosf, ccosh,
- ccoshf, cexp, cexpf, cimag, cimagf, clog, clogf, conj, conjf, cpow,
- cpowf, cproj, cprojf, creal, crealf, csin, csinf, csinh, csinhf,
- csqrt, csqrtf, ctan, ctanf, ctanh, ctanhf.
- 233: Add TIOCGPGRP, TIOCSPGRP. Export llround, llroundf.
- 234: Export program_invocation_name, program_invocation_short_name.
- 235: Export madvise.
- 236: Export pthread_yield, __xpg_strerror_r.
- 237: Export strchrnul.
- 238: Export pthread_spin_destroy, pthread_spin_init, pthread_spin_lock,
- pthread_spin_trylock, pthread_spin_unlock.
- 239: Export pthread_setschedprio.
- 240: Export ppoll.
- 241: Export pthread_attr_getstack, pthread_attr_getstackaddr,
- pthread_getattr_np.
- 242: Export psiginfo, psignal, sys_siglist.
- 243: Export sysinfo.
- 244: Export clock_settime.
- 245: Export pthread_attr_getguardsize, pthread_attr_setguardsize,
- pthread_attr_setstack, pthread_attr_setstackaddr.
- 246: Add CLOCK_PROCESS_CPUTIME_ID, CLOCK_THREAD_CPUTIME_ID.
- Export clock_getcpuclockid, pthread_getcpuclockid.
- 247: Export error, error_at_line, error_message_count, error_one_per_line,
- error_print_progname.
- 248: Export __fpurge.
- 249: Export pthread_condattr_getclock, pthread_condattr_setclock.
- 250: Export clock_nanosleep.
- 251: RTLD_NODELETE, RTLD_NOLOAD, RTLD_DEEPBIND added.
- 252: CW_CVT_ENV_TO_WINENV added.
- 253: Export TIOCSCTTY, tcgetsid.
- 254: Export getgrouplist.
- 255: Export ptsname_r.
- 256: Add CW_ALLOC_DRIVE_MAP, CW_MAP_DRIVE_MAP, CW_FREE_DRIVE_MAP.
- 257: Export getpt.
- 258: Export get_current_dir_name.
- 259: Export pthread_sigqueue.
- 260: Export scandirat.
- 261: Export memrchr.
- 262: Export getmntent_r.
- 263: Export cfsetspeed.
- 264: Consistently export strtold
- 265: Export __b64_ntop, __b64_pton.
- 266: Export arc4random, arc4random_addrandom, arc4random_buf,
- arc4random_stir, arc4random_uniform.
- 267: Export rawmemchr.
- 268: Export GetCommandLineA, GetCommandLineW
- 269: Allow application override of posix_memalign.
- 270: Redefine mtget.mt_resid field to contain current partition as well
- as number of partitions on tape.
- */
-
- /* Note that we forgot to bump the api for ualarm, strtoll, strtoull */
+/* API_MAJOR 0.0: Initial version. API_MINOR changes:
+ 1: Export cygwin32_ calls as cygwin_ as well.
+ 2: Export j1, jn, y1, yn.
+ 3: Export dll_noncygwin_dllcrt0.
+ 4: New socket ioctls, revamped ifconf support.
+ 5: Thread support/exports.
+ 6: Change in termios handling.
+ 7: Export scandir and alphasort.
+ 8: Export _ctype_, _sys_errlist, _sys_nerr.
+ 9: Mount-related changes, new cygwin_umount export.
+ Raw device support (tape, floppies).
+ 10: Fast math routine support added.
+ 11: Export seekdir, telldir.
+ 12: Export pthread_join, pthread_detach.
+ 13: Export math funcs gamma and friends, also _j0, _j1, etc.
+ 14: Export snprintf and vnsprintf.
+ 15: Export glob
+ 16: Export cygwin_stackdump
+ 17: Export fast math stuff
+ 18: Stop exporting _strace_wm
+ 19: Export fchown, lchown, lacl
+ 20: regsub, inet_network
+ 21: incompatible change to stdio cr/lf and buffering
+ 22: Export cygwin_logon_user, cygwin_set_impersonation_token.
+ geteuid, getegid return effective uid/gid.
+ getuid, getgid return real uid/gid.
+ seteuid, setegid set only effective uid/gid.
+ setuid, setgid set effective and real uid/gid.
+ 23: Export new dll_crt0 interface and cygwin_user_data for use
+ with crt0 startup code.
+ 24: Export poll and _poll.
+ 25: Export getmode and _getmode.
+ 26: CW_GET_CYGDRIVE_PREFIXES addition to external.cc
+ 27: CW_GETPINFO_FULL addition to external.cc
+ 28: Accidentally bumped by cgf
+ 29: Export hstrerror
+ 30: CW_GET_CYGDRIVE_INFO addition to external.cc
+ 31: Export inet_aton
+ 32: Export getrlimit/setrlimit
+ 33: Export setlogmask
+ 34: Separated out mount table
+ 35: Export drand48, erand48, jrand48, lcong48, lrand48,
+ mrand48, nrand48, seed48, and srand48.
+ 36: Added _cygwin_S_IEXEC, et al
+ 37: [f]pathconv support _PC_POSIX_PERMISSIONS and _PC_POSIX_SECURITY
+ 38: vscanf, vscanf_r, and random pthread functions
+ 39: asctime_r, ctime_r, gmtime_r, localtime_r
+ 40: fchdir
+ 41: __signgam
+ 42: sys_errlist, sys_nerr
+ 43: sigsetjmp, siglongjmp fixed
+ 44: Export dirfd
+ 45: perprocess change, gamma_r, gammaf_r, lgamma_r, lgammaf_r
+ 46: Remove cygwin_getshared
+ 47: Report EOTWarningZoneSize in struct mtget.
+ 48: Export "posix" regex functions
+ 49: Export setutent, endutent, utmpname, getutent, getutid, getutline.
+ 50: Export fnmatch.
+ 51: Export recvmsg, sendmsg.
+ 52: Export strptime
+ 53: Export strlcat, strlcpy.
+ 54: Export __fpclassifyd, __fpclassifyf, __signbitd, __signbitf.
+ 55: Export fcloseall, fcloseall_r.
+ 56: Make ntsec on by default.
+ 57: Export setgroups.
+ 58: Export memalign, valloc, malloc_trim, malloc_usable_size, mallopt,
+ malloc_stats
+ 59: getsid
+ 60: MSG_NOSIGNAL
+ 61: Export getc_unlocked, getchar_unlocked, putc_unlocked,
+ putchar_unlocked
+ 62: Erroneously bumped
+ 63: Export pututline
+ 64: Export fseeko, ftello
+ 65: Export siginterrupt
+ 66: Export nl_langinfo
+ 67: Export pthread_getsequence_np
+ 68: Export netdb stuff
+ 69: Export strtof
+ 70: Export asprintf, _asprintf_r, vasprintf, _vasprintf_r
+ 71: Export strerror_r
+ 72: Export nanosleep
+ 73: Export setreuid32, setreuid, setregid32, setregid
+ 74: Export _strtold a64l hcreate hcreate_r hdestroy hdestroy_r hsearch
+ hsearch_r isblank iswalnum iswalpha iswblank iswcntrl iswctype
+ iswdigit iswgraph iswlower iswprint iswpunct iswspace iswupper
+ iswxdigit l64a mbrlen mbrtowc mbsinit mbsrtowcs mempcpy
+ on_exit setbuffer setlinebuf strndup strnlen tdelete tdestroy
+ tfind towctrans towlower towupper tsearch twalk wcrtomb wcscat
+ wcschr wcscpy wcscspn wcslcat wcslcpy wcsncat wcsncmp wcsncpy
+ wcspbrk wcsrchr wcsrtombs wcsspn wcsstr wctob wctob wctrans
+ wctype wmemchr wmemcmp wmemcpy wmemmove wmemset
+ 75: Export exp2 exp2f fdim fdimf fma fmaf fmax fmaxf fmin fminf lrint
+ lrintf lround lroundf nearbyint nearbyintf remquo remquof
+ round roundf scalbln scalblnf sincos sincosf tgamma tgammaf
+ truncf
+ 76: mallinfo
+ 77: thread-safe exit/at_exit
+ 78: Use stat and fstat rather than _stat, and _fstat.
+ Export btowc and trunc.
+ 79: Export acl32 aclcheck32 aclfrommode32 aclfrompbits32 aclfromtext32
+ aclsort32 acltomode32 acltopbits32 acltotext32 facl32
+ fgetpos64 fopen64 freopen64 fseeko64 fsetpos64 ftello64
+ _open64 _lseek64 _fstat64 _stat64 mknod32
+ 80: Export pthread_rwlock stuff
+ 81: CW_CHECK_NTSEC addition to external.cc
+ 82: Export wcscoll wcswidth wcwidth
+ 83: Export gethostid
+ 84: Pty open allocates invisible console. 64 bit interface
+ 85: Export new 32/64 functions from API 0.79 only with leading
+ underscore. No problems with backward compatibility since no
+ official release has been made so far. This change removes
+ exported symbols like fopen64, which might confuse configure.
+ 86: Export ftok
+ 87: Export vsyslog
+ 88: Export _getreent
+ 89: Export __mempcpy
+ 90: Export _fopen64
+ 91: Export argz_add argz_add_sep argz_append argz_count argz_create
+ argz_create_sep argz_delete argz_extract argz_insert
+ argz_next argz_replace argz_stringify envz_add envz_entry
+ envz_get envz_merge envz_remove envz_strip
+ 92: Export getusershell, setusershell, endusershell
+ 93: Export daemon, forkpty, openpty, iruserok, ruserok, login_tty,
+ openpty, forkpty, revoke, logwtmp, updwtmp
+ 94: Export getopt, getopt_long, optarg, opterr, optind, optopt,
+ optreset, __check_rhosts_file, __rcmd_errstr.
+ 95: Export shmat, shmctl, shmdt, shmget.
+ 96: CW_GET_ERRNO_FROM_WINERROR addition to external.cc
+ 97: Export sem_open, sem_close, sem_timedwait, sem_getvalue.
+ 98: Export _tmpfile64.
+ 99: CW_GET_POSIX_SECURITY_ATTRIBUTE addition to external.cc.
+ 100: CW_GET_SHMLBA addition to external.cc.
+ 101: Export err, errx, verr, verrx, warn, warnx, vwarn, vwarnx.
+ 102: CW_GET_UID_FROM_SID and CW_GET_GID_FROM_SID addition to external.cc.
+ 103: Export getprogname, setprogname.
+ 104: Export msgctl, msgget, msgrcv, msgsnd, semctl, semget, semop.
+ 105: Export sigwait.
+ 106: Export flock.
+ 107: Export fcntl64.
+ 108: Remove unused (hopefully) reent_data export.
+ 109: Oh well. Someone uses reent_data.
+ 110: Export clock_gettime, sigwaitinfo, timer_create, timer_delete,
+ timer_settime
+ 111: Export sigqueue, sighold.
+ 112: Redefine some mtget fields.
+ 113: Again redefine some mtget fields. Use mt_fileno and mt_blkno as
+ on Linux.
+ 114: Export rand_r, ttyname_r.
+ 115: Export flockfile, ftrylockfile, funlockfile, getgrgid_r, getgrnam_r,
+ getlogin_r.
+ 116: Export atoll.
+ 117: Export utmpx functions, Return utmp * from pututent.
+ 118: Export getpriority, setpriority.
+ 119: Export fdatasync.
+ 120: Export basename, dirname.
+ 122: Export statvfs, fstatvfs.
+ 123: Export utmpxname.
+ 124: Add MAP_AUTOGROW flag to mmap.
+ 125: LD_PRELOAD/CW_HOOK available.
+ 126: Export lsearch, lfind, timer_gettime.
+ 127: Export sigrelese.
+ 128: Export pselect.
+ 129: Export mkdtemp.
+ 130: Export strtoimax, strtoumax, llabs, imaxabs, lldiv, imaxdiv.
+ 131: Export inet_ntop, inet_pton.
+ 132: Add GLOB_LIMIT flag to glob.
+ 133: Export __getline, __getdelim.
+ 134: Export getline, getdelim.
+ 135: Export pread, pwrite
+ 136: Add TIOCMBIS/TIOCMBIC ioctl codes.
+ 137: fts_children, fts_close, fts_get_clientptr, fts_get_stream,
+ fts_open, fts_read, fts_set, fts_set_clientptr, ftw, nftw.
+ 138: Export readdir_r.
+ 139: Start using POSIX definition of struct msghdr and WinSock2
+ IPPROTO_IP values.
+ 140: Export mlock, munlock.
+ 141: Export futimes, lutimes.
+ 142: Export memmem
+ 143: Export clock_getres, clock_setres
+ 144: Export timelocal, timegm.
+ 145: Add MAP_NORESERVE flag to mmap.
+ 146: Change SI_USER definition. FIXME: Need to develop compatibility
+ macro for this?
+ 147: Eliminate problematic d_ino from dirent structure. unsetenv now
+ returns int, as per linux.
+ 148: Add open(2) flags O_SYNC, O_RSYNC, O_DSYNC and O_DIRECT.
+ 149: Add open(2) flag O_NOFOLLOW.
+ 150: Export getsubopt.
+ 151: Export __opendir_with_d_ino
+ 152: Revert to having d_ino in dirent unconditionally.
+ 153: Export updwtmpx, Implement CW_SETUP_WINENV.
+ 154: Export sigset, sigignore.
+ 155: Export __isinff, __isinfd, __isnanf, __isnand.
+ 156: Export __srbuf_r, __swget_r.
+ 157: Export gai_strerror, getaddrinfo, getnameinfo, freeaddrinfo,
+ in6addr_any, in6addr_loopback.
+ 158: Export bindresvport, bindresvport_sa, iruserok_sa, rcmd_af,
+ rresvport_af.
+ 159: Export posix_openpt.
+ 160: Export posix_fadvise, posix_fallocate.
+ 161: Export resolver functions.
+ 162: New struct ifreq. Export if_nametoindex, if_indextoname,
+ if_nameindex, if_freenameindex.
+ 163: Export posix_madvise, posix_memalign.
+ 164: Export shm_open, shm_unlink.
+ 165: Export mq_close, mq_getattr, mq_notify, mq_open, mq_receive,
+ mq_send, mq_setattr, mq_timedreceive, mq_timedsend, mq_unlink.
+ 166: Export sem_unlink.
+ 167: Add st_birthtim to struct stat.
+ 168: Export asnprintf, dprintf, _Exit, vasnprintf, vdprintf.
+ 169: Export confstr.
+ 170: Export insque, remque.
+ 171: Export exp10, exp10f, pow10, pow10f, strcasestr, funopen,
+ fopencookie.
+ 172: Export getifaddrs, freeifaddrs.
+ 173: Export __assert_func.
+ 174: Export stpcpy, stpncpy.
+ 175: Export fdopendir.
+ 176: Export wcstol, wcstoll, wcstoul, wcstoull, wcsxfrm.
+ 177: Export sys_sigabbrev
+ 178: Export wcpcpy, wcpncpy.
+ 179: Export _f_llrint, _f_llrintf, _f_llrintl, _f_lrint, _f_lrintf,
+ _f_lrintl, _f_rint, _f_rintf, _f_rintl, llrint, llrintf, llrintl,
+ rintl, lrintl, and redirect exports of lrint, lrintf, rint, rintf.
+ 180: Export getxattr, lgetxattr, fgetxattr, listxattr, llistxattr,
+ flistxattr, setxattr, lsetxattr, fsetxattr, removexattr,
+ lremovexattr, fremovexattr.
+ 181: Export cygwin_conv_path, cygwin_create_path, cygwin_conv_path_list.
+ 182: Export lockf.
+ 183: Export open_memstream, fmemopen.
+ 184: Export openat, faccessat, fchmodat, fchownat, fstatat, futimesat,
+ linkat, mkdirat, mkfifoat, mknodat, readlinkat, renameat, symlinkat,
+ unlinkat.
+ 185: Export futimens, utimensat.
+ 186: Remove ancient V8 regexp functions. Also eliminate old crt0 interface
+ which provided its own user_data structure.
+ 187: Export cfmakeraw.
+ 188: Export CW_SET_PRIV_KEY.
+ 189: Implement dirent.d_type.
+ 190: Export fgetwc, fgetws, fputwc, fputws, fwide, getwc, getwchar,
+ putwc, putwchar, ungetwc.
+ 191: Export glob_pattern_p
+ 192: CW_SETERRNO added
+ 193: Export wcstok.
+ 194: fcntl.h flags O_DIRECTORY, O_EXEC and O_SEARCH added.
+ 195: Export wcstod, wcstof.
+ 196: Export wcsnlen.
+ 197: Export wcstoimax, wcstoumax.
+ 198: Export reallocf.
+ 199: Export open_wmemstream.
+ 200: Export mbsnrtowcs, wcsnrtombs.
+ 201: Export wprintf, fwprintf, swprintf, vwprintf, vfwprintf, vswprintf.
+ 202: Export gethostbyname2.
+ 203: Export wcsftime.
+ 204: recv/send flag MSG_DONTWAIT added.
+ 205: Export wscanf, fwscanf, swscanf, vwscanf, vfwscanf, vswscanf.
+ 206: Export wcscasecmp, wcsncasecmp.
+ 207: Export wcsdup.
+ 208: Export log2, log2f.
+ 209: Export wordexp, wordfree.
+ 210: New ctype layout using variable ctype pointer. Export __ctype_ptr__.
+ 211: Export fpurge, mkstemps.
+ 212: Add and export libstdc++ malloc wrappers.
+ 213: Export canonicalize_file_name, eaccess, euidaccess.
+ 214: Export execvpe, fexecve.
+ 215: CW_EXIT_PROCESS added.
+ 216: CW_SET_EXTERNAL_TOKEN added.
+ 217: CW_GET_INSTKEY added.
+ 218: Export get_nprocs, get_nprocs_conf, get_phys_pages, get_avphys_pages.
+ 219: Export dup3, pipe2, O_CLOEXEC, F_DUPFD_CLOEXEC.
+ 220: Export accept4, SOCK_CLOEXEC, SOCK_NONBLOCK.
+ 221: Export strfmon.
+ 222: CW_INT_SETLOCALE added.
+ 223: SIGPWR added.
+ 224: Export xdr* functions.
+ 225: Export __xdr* functions.
+ 226: Export __locale_mb_cur_max.
+ 227: Add pseudo_reloc_start, pseudo_reloc_end, image_base to per_process.
+ 228: CW_STRERROR added.
+ 229: Add mkostemp, mkostemps.
+ 230: Add CLOCK_MONOTONIC.
+ 231: Add fenv.h functions.
+ 232: Export cacos, cacosf, cacosh, cacoshf, carg, cargf, casin, casinf,
+ casinh, casinhf, catan, catanf, catanh, catanhf, ccos, ccosf, ccosh,
+ ccoshf, cexp, cexpf, cimag, cimagf, clog, clogf, conj, conjf, cpow,
+ cpowf, cproj, cprojf, creal, crealf, csin, csinf, csinh, csinhf,
+ csqrt, csqrtf, ctan, ctanf, ctanh, ctanhf.
+ 233: Add TIOCGPGRP, TIOCSPGRP. Export llround, llroundf.
+ 234: Export program_invocation_name, program_invocation_short_name.
+ 235: Export madvise.
+ 236: Export pthread_yield, __xpg_strerror_r.
+ 237: Export strchrnul.
+ 238: Export pthread_spin_destroy, pthread_spin_init, pthread_spin_lock,
+ pthread_spin_trylock, pthread_spin_unlock.
+ 239: Export pthread_setschedprio.
+ 240: Export ppoll.
+ 241: Export pthread_attr_getstack, pthread_attr_getstackaddr,
+ pthread_getattr_np.
+ 242: Export psiginfo, psignal, sys_siglist.
+ 243: Export sysinfo.
+ 244: Export clock_settime.
+ 245: Export pthread_attr_getguardsize, pthread_attr_setguardsize,
+ pthread_attr_setstack, pthread_attr_setstackaddr.
+ 246: Add CLOCK_PROCESS_CPUTIME_ID, CLOCK_THREAD_CPUTIME_ID.
+ Export clock_getcpuclockid, pthread_getcpuclockid.
+ 247: Export error, error_at_line, error_message_count, error_one_per_line,
+ error_print_progname.
+ 248: Export __fpurge.
+ 249: Export pthread_condattr_getclock, pthread_condattr_setclock.
+ 250: Export clock_nanosleep.
+ 251: RTLD_NODELETE, RTLD_NOLOAD, RTLD_DEEPBIND added.
+ 252: CW_CVT_ENV_TO_WINENV added.
+ 253: Export TIOCSCTTY, tcgetsid.
+ 254: Export getgrouplist.
+ 255: Export ptsname_r.
+ 256: Add CW_ALLOC_DRIVE_MAP, CW_MAP_DRIVE_MAP, CW_FREE_DRIVE_MAP.
+ 257: Export getpt.
+ 258: Export get_current_dir_name.
+ 259: Export pthread_sigqueue.
+ 260: Export scandirat.
+ 261: Export memrchr.
+ 262: Export getmntent_r.
+ 263: Export cfsetspeed.
+ 264: Consistently export strtold
+ 265: Export __b64_ntop, __b64_pton.
+ 266: Export arc4random, arc4random_addrandom, arc4random_buf,
+ arc4random_stir, arc4random_uniform.
+ 267: Export rawmemchr.
+ 268: Export GetCommandLineA, GetCommandLineW
+ 269: Allow application override of posix_memalign.
+ 270: Redefine mtget.mt_resid field to contain current partition as well
+ as number of partitions on tape.
+ 271: Export posix_spawn, posix_spawnp, and helper functions.
+ 272: Export tm_gmtoff and tm_zone members.
+ 273: Skipped.
+ 274: Export __cxa_atexit and __cxa_finalize.
+ 275: Introduce account mapping from Windows account DBs. Add CW_SETENT,
+ CW_GETENT, CW_ENDENT, CW_GETNSSSEP, CW_GETPWSID, CW_GETGRSID,
+ CW_CYGNAME_FROM_WINNAME.
+ 276: Export ffsl, ffsll.
+ 277: Add setsockopt(SO_PEERCRED).
+ 278: Add quotactl.
+ 279: Export stime.
+ 280: Static atexit in libcygwin.a, CW_FIXED_ATEXIT.
+ 281: Add CW_GETNSS_PWD_SRC, CW_GETNSS_GRP_SRC.
+ 282: Export __bsd_qsort_r, qsort_r.
+ 283: Export __fbufsize, __flbf, __fpending, __freadable, __freading,
+ __fsetlocking, __fwritable, __fwriting. clearerr_unlocked,
+ feof_unlocked, ferror_unlocked, fflush_unlocked, fgetc_unlocked,
+ fgets_unlocked, fgetwc_unlocked, fgetws_unlocked, fileno_unlocked,
+ fputc_unlocked, fputs_unlocked, fputwc_unlocked, fputws_unlocked,
+ fread_unlocked, fwrite_unlocked, getwc_unlocked, getwchar_unlocked,
+ putwc_unlocked, putwchar_unlocked.
+ 284: Export sockatmark.
+ 285: Export wcstold.
+ 286: Export cabsl, cimagl, creall, finitel, hypotl, sqrtl.
+ 287: Export issetugid.
+ 288: Export getcontext, makecontext, setcontext, swapcontext.
+ 289: Export sigsetjmp, siglongjmp.
+ 290: Add sysconf cache handling.
+ 291: Export aligned_alloc, at_quick_exit, quick_exit.
+ 292: Export rpmatch.
+ 293: Convert utmpname/utmpxname to int.
+ 294: Export clog10, clog10f.
+ 295: Export POSIX ACL functions.
+ 296: Export __getpagesize.
+ 297: Export missing math functions, acoshl, acosl, asinhl, asinl, atan2l,
+ atanhl, atanl, cacoshl, cacosl, cargl, casinhl, casinl, catanhl,
+ catanl, ccoshl, ccosl, ceill, cexpl, clog10l, clogl, conjl,
+ copysignl, coshl, cosl, cpowl, cprojl, csinhl, csinl, csqrtl, ctanhl,
+ ctanl, dreml, erfcl, erfl, exp10l, exp2l, expl, expm1l, fabsl, fdiml,
+ floorl, fmal, fmaxl, fminl, fmodl, frexpl, ilogbl, isinfl, isnanl,
+ ldexpl, lgammal, lgammal_r, llroundl, log10l, log1pl, log2l, logbl,
+ logl, lroundl, modfl, nearbyintl, nextafterl, nexttoward,
+ nexttowardf, nexttowardl, pow10l, powl, remainderl, remquol, roundl,
+ scalbl, scalblnl, scalbnl, sincosl, sinhl, sinl, tanhl, tanl,
+ tgammal, truncl.
+
+ Note that we forgot to bump the api for ualarm, strtoll, strtoull,
+ sigaltstack, sethostname. */
#define CYGWIN_VERSION_API_MAJOR 0
-#define CYGWIN_VERSION_API_MINOR 270
+#define CYGWIN_VERSION_API_MINOR 297
- /* There is also a compatibity version number associated with the
- shared memory regions. It is incremented when incompatible
- changes are made to the shared memory region *or* to any named
- shared mutexes, semaphores, etc. The arbitrary starting
- version was 0 (cygwin release 98r2).
- Bump to 4 since this hasn't been rigorously updated in a
- while. */
+/* There is also a compatibity version number associated with the shared memory
+ regions. It is incremented when incompatible changes are made to the shared
+ memory region *or* to any named shared mutexes, semaphores, etc. */
#define CYGWIN_VERSION_SHARED_DATA 5
- /* An identifier used in the names used to create shared objects.
- The full names include the CYGWIN_VERSION_SHARED_DATA version
- as well as this identifier. */
+/* An identifier used in the names used to create shared objects. The full
+ names include the CYGWIN_VERSION_SHARED_DATA version as well as this
+ identifier. */
#define CYGWIN_VERSION_DLL_IDENTIFIER "cygwin1"
- /* The Cygwin mount table interface in the Win32 registry also
- has a version number associated with it in case that is
- changed in a non-backwards compatible fashion. Increment this
- version number whenever incompatible changes in mount table
- registry usage are made.
+/* The Cygwin mount table interface in the Win32 registry also has a version
+ number associated with it in case that is changed in a non-backwards
+ compatible fashion. Increment this version number whenever incompatible
+ changes in mount table registry usage are made.
- 1: Original number version.
- 2: New mount registry layout, system-wide mount accessibility.
- 3: The mount table is not in the registry anymore, but in /etc/fstab.
- */
+ 1: Original number version.
+ 2: New mount registry layout, system-wide mount accessibility.
+ 3: The mount table is not in the registry anymore, but in /etc/fstab.
+*/
#define CYGWIN_VERSION_MOUNT_REGISTRY 3
- /* Identifiers used in the Win32 registry. */
+/* Identifiers used in the Win32 registry. */
#define CYGWIN_INFO_CYGWIN_REGISTRY_NAME "Cygwin"
-#define CYGWIN_INFO_PROGRAM_OPTIONS_NAME "Program Options"
#define CYGWIN_INFO_INSTALLATIONS_NAME "Installations"
- /* The default cygdrive prefix. */
+/* The default cygdrive prefix. */
#define CYGWIN_INFO_CYGDRIVE_DEFAULT_PREFIX "/cygdrive"
- /* In addition to the above version number strings, the build
- process adds some strings that may be useful in
- debugging/identifying a particular Cygwin DLL:
-
- The mkvers.sh script at the top level produces a .cc file
- which initializes a cygwin_version structure based on the
- above version information and creates a string table for
- grepping via "fgrep '%%%' cygwinwhatever.dll" if you are
- using GNU grep. Otherwise you may want to do a
- "strings cygwinwhatever.dll | fgrep '%%%'" instead.
-
- This will produce output such as:
-
- %%% Cygwin dll_identifier: cygwin
- %%% Cygwin api_major: 0
- %%% Cygwin api_minor: 0
- %%% Cygwin dll_major: 19
- %%% Cygwin dll_minor: 6
- %%% Cygwin shared_data: 1
- %%% Cygwin registry: b15
- %%% Cygwin build date: Wed Oct 14 16:26:51 EDT 1998
- %%% Cygwin shared id: cygwinS1
-
- This information can also be obtained through a call to
- cygwin_internal (CW_GETVERSIONINFO).
- */
+/* In addition to the above version number strings, the build process adds some
+ strings that may be useful in debugging/identifying a particular Cygwin DLL:
+
+ The mkvers.sh script at the top level produces a .cc file which initializes
+ a cygwin_version structure based on the above version information and
+ creates a string table for grepping via "fgrep '%%%' cygwinwhatever.dll"
+ if you are using GNU grep. Otherwise you may want to do a
+ "strings cygwinwhatever.dll | fgrep '%%%'" instead.
+
+ This will produce output such as:
+
+ %%% Cygwin dll_identifier: cygwin
+ %%% Cygwin api_major: 0
+ %%% Cygwin api_minor: 0
+ %%% Cygwin dll_major: 19
+ %%% Cygwin dll_minor: 6
+ %%% Cygwin shared_data: 1
+ %%% Cygwin registry: b15
+ %%% Cygwin build date: Wed Oct 14 16:26:51 EDT 1998
+ %%% Cygwin shared id: cygwinS1
+
+ This information can also be obtained through a call to
+ cygwin_internal (CW_GETVERSIONINFO). */
#define CYGWIN_VERSION_MAGIC(a, b) ((unsigned) ((((unsigned short) a) << 16) | (unsigned short) b))
#define CYGWIN_VERSION_MAGIC_VERSION(a) ((unsigned) ((unsigned)a & 0xffff))
diff --git a/winsup/cygwin/include/cygwin/wait.h b/winsup/cygwin/include/cygwin/wait.h
index 08649f8a2..89343143c 100644
--- a/winsup/cygwin/include/cygwin/wait.h
+++ b/winsup/cygwin/include/cygwin/wait.h
@@ -1,7 +1,5 @@
/* cygwin/wait.h
- Copyright 2006, 2009, 2011, 2012 Red Hat, Inc.
-
This file is part of Cygwin.
This software is a copyrighted work licensed under the terms of the
diff --git a/winsup/cygwin/include/dlfcn.h b/winsup/cygwin/include/dlfcn.h
index 37fb3df9b..8522ec579 100644
--- a/winsup/cygwin/include/dlfcn.h
+++ b/winsup/cygwin/include/dlfcn.h
@@ -1,7 +1,5 @@
/* dlfcn.h
- Copyright 1998, 1999, 2000, 2001, 2004, 2010, 2011 Red Hat, Inc.
-
This file is part of Cygwin.
This software is a copyrighted work licensed under the terms of the
diff --git a/winsup/cygwin/include/endian.h b/winsup/cygwin/include/endian.h
index d59d2c89b..a17ff9917 100644
--- a/winsup/cygwin/include/endian.h
+++ b/winsup/cygwin/include/endian.h
@@ -1,7 +1,5 @@
/* endian.h
- Copyright 2005, 2010, 2011 Red Hat, Inc.
-
This file is part of Cygwin.
This software is a copyrighted work licensed under the terms of the
@@ -12,13 +10,21 @@ details. */
#define _ENDIAN_H_
#include <sys/config.h>
-#include <bits/endian.h>
+#include <machine/endian.h>
/*#ifdef __USE_BSD*/
-# define LITTLE_ENDIAN __LITTLE_ENDIAN
-# define BIG_ENDIAN __BIG_ENDIAN
-# define PDP_ENDIAN __PDP_ENDIAN
-# define BYTE_ORDER __BYTE_ORDER
+# ifndef LITTLE_ENDIAN
+# define LITTLE_ENDIAN __LITTLE_ENDIAN
+# endif
+# ifndef BIG_ENDIAN
+# define BIG_ENDIAN __BIG_ENDIAN
+# endif
+# ifndef PDP_ENDIAN
+# define PDP_ENDIAN __PDP_ENDIAN
+# endif
+# ifndef BYTE_ORDER
+# define BYTE_ORDER __BYTE_ORDER
+# endif
/*#endif*/
#if __BYTE_ORDER == __LITTLE_ENDIAN
@@ -27,7 +33,7 @@ details. */
# define __LONG_LONG_PAIR(HI, LO) HI, LO
#endif
-#if /*defined __USE_BSD ||*/ ! defined _POSIX_SOURCE
+#if __BSD_VISIBLE
#include <byteswap.h>
@@ -71,7 +77,7 @@ details. */
#endif /*__BYTE_ORDER == __BIG_ENDIAN*/
-#endif /*__USE_BSD || !_POSIX_SOURCE*/
+#endif /*__BSD_VISIBLE*/
#endif /*_ENDIAN_H_*/
diff --git a/winsup/cygwin/include/err.h b/winsup/cygwin/include/err.h
index 4f3a3602a..d38b3ded3 100644
--- a/winsup/cygwin/include/err.h
+++ b/winsup/cygwin/include/err.h
@@ -1,7 +1,5 @@
/* err.h
- Copyright 2003, 2011 Red Hat, Inc.
-
This file is part of Cygwin.
This software is a copyrighted work licensed under the terms of the
diff --git a/winsup/cygwin/include/error.h b/winsup/cygwin/include/error.h
index c5ec62064..2aa6ed592 100644
--- a/winsup/cygwin/include/error.h
+++ b/winsup/cygwin/include/error.h
@@ -1,7 +1,5 @@
/* error.h: GNU error reporting functions
- Copyright 2011 Red Hat, Inc.
-
This file is part of Cygwin.
This software is a copyrighted work licensed under the terms of the
diff --git a/winsup/cygwin/include/exceptions.h b/winsup/cygwin/include/exceptions.h
deleted file mode 100644
index 498d584a9..000000000
--- a/winsup/cygwin/include/exceptions.h
+++ /dev/null
@@ -1,115 +0,0 @@
-/* exceptions.h
-
- Copyright 1996, 1997, 1998, 2000, 2001, 2005 Red Hat, Inc.
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-#ifndef _EXCEPTIONS_H
-#define _EXCEPTIONS_H
-
-#ifdef __cplusplus
-extern "C" {
-#endif /* __cplusplus */
-
-/* Documentation on the innards of exception handling (i.e. from the
- perspective of a compiler implementor) apparently doesn't exist. Sigh.
- However, the following came from Onno Hovers <onno@stack.urc.tue.nl>
-
-The first pointer to the chain of handlers is in the thread environment block
-at FS:[0]. This chain has the following format:
-
-typedef struct __EXCEPTION_FRAME
-{
- struct __EXCEPTION_FRAME *Prev; /-* pointer to the previous frame *-/
- PEXCEPTION_HANDLER Handler; /-* handler function *-/
-}
-
-You register an exception handler in your compiler with this simple ASM
-sequence:
- PUSH _MyExceptionHandler
- PUSH FS:[0]
- MOV FS:[0],ESP
-An exception frame MUST be on the stack! The frame may have more fields and
-both Visual C++ and Borland C++ use more fields for themselves.
-
-When an exception occurs the system calls all handlers starting with the
-handler at FS:0, and then the previous etc. until one handler returns
-ExceptionContinueExecution, which is 0. If a handler does not want to handle
-the exception it should just return ExceptionContinueSearch, which is 1.
-
-The handler has the following parameters:
-ehandler (
- PEXCEPTION_RECORD erecord,
- PEXCEPTION_FRAME myframe,
- PCONTEXT context, /-* context before and after *-/
- PVOID dispatch) /-* something *-/
-
-When a handler wants to handle the exception, it has some alternatives:
-
--one is to do do something about the exception condition, like emulating
-an invalid instruction, mapping memory where there was a page fault, etc.
-If the handler wants to have the context of the thread that causes the
-exception changed, it should make that change in the context passed to the
-handler.
-
--the second alternative is to call all exception handlers again, indicating
-that you want them to clean up. This way all the __finally blocks get
-executed. After doing that you change the context passed to the handler so
-the code starts executing in the except block. For this purpose you could
-call RtlUnwind. This (undocumented) function calls all exception handlers
-up to but not including the exception frame passed to it. If NULL is passed
-as exception frame RtlUnwind calls all exception handlers and then exits the
-process. The parameters to RtlUnwind are:
-
-RtlUnwind (
- PEXCEPTION_FRAME endframe,
- PVOID unusedEip,
- PEXCEPTION_RECORD erecord,
- DWORD returnEax)
-
-You should set unusedEip to the address where RtlUnwind should return like
-this:
- PUSH 0
- PUSH OFFSET ReturnUnwind
- PUSH 0
- PUSH 0
- CALL RtlUnwind
-ReturnUnwind:
- .....
-
-If no EXCEPTION_RECORD is passed, RtlUnwind makes a default exception
-record. In any case, the ExceptionFlags part of this record has the
-EH_UNWINDING (=2), flag set. (and EH_EXIT_UNWIND (=4), when NULL is passed as the end
-frame.).
-
-The handler for a exception as well as a for unwinds may be executed in the
-thread causing the exception, but may also be executed in another (special
-exception) thread. So it is not wise to make any assumptions about that!
-
-As an alternative you may consider the SetUnhandledExceptionFilter API
-to install your own exception filter. This one is documented.
-*/
-
-/* The January 1994 MSJ has an article entitled "Clearer, More Comprehensive
- Error Processing with Win32 Structured Exception Handling". It goes into
- a teensy bit of detail of the innards of exception handling (i.e. what we
- have to do). */
-
-typedef int (exception_handler) (EXCEPTION_RECORD *, struct _exception_list *,
- CONTEXT *, void *);
-
-typedef struct _exception_list
-{
- struct _exception_list *prev;
- exception_handler *handler;
-} exception_list;
-
-#ifdef __cplusplus
-};
-#endif /* __cplusplus */
-
-#endif /* _EXCEPTIONS_H */
diff --git a/winsup/cygwin/include/fcntl.h b/winsup/cygwin/include/fcntl.h
index fe8a1fc42..3dad0889f 100644
--- a/winsup/cygwin/include/fcntl.h
+++ b/winsup/cygwin/include/fcntl.h
@@ -1,7 +1,5 @@
/* fcntl.h
- Copyright 1996, 1998, 2000, 2001, 2005, 2006, 2009, 2010, 2013 Red Hat, Inc.
-
This file is part of Cygwin.
This software is a copyrighted work licensed under the terms of the
@@ -14,12 +12,6 @@ details. */
#include <sys/fcntl.h>
#define O_NDELAY _FNDELAY
-/* sys/_default_fcntl.h defines values up to 0x40000 (O_NOINHERIT). */
-#define _FDIRECT 0x80000
-#define _FNOFOLLOW 0x100000
-#define _FDIRECTORY 0x200000
-#define _FEXECSRCH 0x400000
-
/* F_LCK_MANDATORY: Request mandatory locks for this file descriptor.
Cygwin extension to fcntl file locking mechanism. By default, fcntl file
@@ -41,14 +33,6 @@ details. */
functionality is not required. */
#define O_TTY_INIT 0
-#define O_DIRECT _FDIRECT
-#define O_NOFOLLOW _FNOFOLLOW
-#define O_DSYNC _FSYNC
-#define O_RSYNC _FSYNC
-#define O_DIRECTORY _FDIRECTORY
-#define O_EXEC _FEXECSRCH
-#define O_SEARCH _FEXECSRCH
-
#define POSIX_FADV_NORMAL 0
#define POSIX_FADV_SEQUENTIAL 1
#define POSIX_FADV_RANDOM 2
diff --git a/winsup/cygwin/include/features.h b/winsup/cygwin/include/features.h
index ffeb4f843..502bd874b 100644
--- a/winsup/cygwin/include/features.h
+++ b/winsup/cygwin/include/features.h
@@ -1,7 +1,5 @@
/* features.h
- Copyright 2000, 2001, 2002, 2003, 2004, 2006, 2011 Red Hat, Inc.
-
This file is part of Cygwin.
This software is a copyrighted work licensed under the terms of the
diff --git a/winsup/cygwin/include/fenv.h b/winsup/cygwin/include/fenv.h
index b49033f29..95c2e31ea 100755..100644
--- a/winsup/cygwin/include/fenv.h
+++ b/winsup/cygwin/include/fenv.h
@@ -1,15 +1,15 @@
/* fenv.h
- Copyright 2010, 2011 Red Hat, Inc.
-
This file is part of Cygwin.
This software is a copyrighted work licensed under the terms of the
Cygwin license. Please consult the file "CYGWIN_LICENSE" for
details. */
-#ifndef _FENV_H_
-#define _FENV_H_
+#ifndef _FENV_H
+#define _FENV_H 1
+
+#include <sys/cdefs.h>
#ifdef __cplusplus
extern "C" {
@@ -70,13 +70,9 @@ typedef struct _fenv_t
of exceptional floating-point arithmetic to provide auxiliary information.
A floating-point control mode is a system variable whose value may be
set by the user to affect the subsequent behavior of floating-point
- arithmetic. */
+ arithmetic. */
-typedef struct _fexcept_t
-{
- unsigned short _fpu_exceptions;
- unsigned short _sse_exceptions;
-} fexcept_t;
+typedef __uint32_t fexcept_t;
/* The <fenv.h> header shall define the following constants if and only
if the implementation supports the floating-point exception by means
@@ -133,14 +129,14 @@ extern const fenv_t *_fe_dfl_env;
type "pointer to const-qualified fenv_t",may also be specified by
the implementation. */
-#ifdef _GNU_SOURCE
+#if __GNU_VISIBLE
/* If possible, the GNU C Library defines a macro FE_NOMASK_ENV which
represents an environment where every exception raised causes a trap
to occur. You can test for this macro using #ifdef. It is only defined
if _GNU_SOURCE is defined. */
extern const fenv_t *_fe_nomask_env;
#define FE_NOMASK_ENV (_fe_nomask_env)
-#endif /* _GNU_SOURCE */
+#endif /* __GNU_VISIBLE */
/* The following shall be declared as functions and may also be
@@ -174,4 +170,4 @@ extern int fegetexcept (void);
}
#endif
-#endif /* _FENV_H_ */
+#endif /* _FENV_H */
diff --git a/winsup/cygwin/include/fnmatch.h b/winsup/cygwin/include/fnmatch.h
index e4500abe2..556d3b1da 100644
--- a/winsup/cygwin/include/fnmatch.h
+++ b/winsup/cygwin/include/fnmatch.h
@@ -39,21 +39,21 @@
#ifndef _FNMATCH_H_
#define _FNMATCH_H_
+#include <sys/cdefs.h>
+
#define FNM_NOMATCH 1 /* Match failed. */
#define FNM_NOSYS 2 /* Function not supported (unused). */
#define FNM_NOESCAPE 0x01 /* Disable backslash escaping. */
#define FNM_PATHNAME 0x02 /* Slash must be matched by slash. */
#define FNM_PERIOD 0x04 /* Period must be matched by period. */
-#ifndef _POSIX_SOURCE
+#if __GNU_VISIBLE
#define FNM_LEADING_DIR 0x08 /* Ignore /<tail> after Imatch. */
#define FNM_CASEFOLD 0x10 /* Case insensitive search. */
#define FNM_IGNORECASE FNM_CASEFOLD
#define FNM_FILE_NAME FNM_PATHNAME
#endif
-#include <sys/cdefs.h>
-
__BEGIN_DECLS
int fnmatch __P((const char *, const char *, int));
__END_DECLS
diff --git a/winsup/cygwin/include/glob.h b/winsup/cygwin/include/glob.h
index 35745196b..0376cc3fe 100644
--- a/winsup/cygwin/include/glob.h
+++ b/winsup/cygwin/include/glob.h
@@ -80,7 +80,7 @@ typedef struct {
#define GLOB_NOMATCH (-3) /* No match and GLOB_NOCHECK was not set. */
#define GLOB_NOSYS (-4) /* Obsolete: source comptability only. */
-#ifndef _POSIX_SOURCE
+#if __GNU_VISIBLE
#define GLOB_ALTDIRFUNC 0x0040 /* Use alternately specified directory funcs. */
#define GLOB_BRACE 0x0080 /* Expand braces ala csh. */
#define GLOB_MAGCHAR 0x0100 /* Pattern had globbing characters. */
@@ -92,7 +92,7 @@ typedef struct {
/* source compatibility, these are the old names */
#define GLOB_MAXPATH GLOB_LIMIT
#define GLOB_ABEND GLOB_ABORTED
-#endif /* __BSD_VISIBLE */
+#endif /* __GNU_VISIBLE */
__BEGIN_DECLS
@@ -103,7 +103,7 @@ __BEGIN_DECLS
# define DLLEXPORT __declspec(dllimport)
#endif
-int DLLEXPORT glob (const char *, int, int (*)(const char *, int), glob_t *);
+int DLLEXPORT glob (const char *__restrict , int, int (*)(const char *, int), glob_t *__restrict);
void DLLEXPORT globfree (glob_t *);
int DLLEXPORT glob_pattern_p (const char *, int);
__END_DECLS
diff --git a/winsup/cygwin/include/ifaddrs.h b/winsup/cygwin/include/ifaddrs.h
index f6c28e798..cbe716a4e 100644
--- a/winsup/cygwin/include/ifaddrs.h
+++ b/winsup/cygwin/include/ifaddrs.h
@@ -38,6 +38,19 @@ struct ifaddrs {
void *ifa_data;
};
+#ifdef __CYGWIN__
+#include <cygwin/if.h>
+/* On Cygwin the ifa_data member points to this structure, independent of
+ the address family. */
+struct ifaddrs_hwdata {
+ struct sockaddr ifa_hwaddr;
+ int ifa_metric;
+ int ifa_mtu;
+ int ifa_ifindex;
+ struct ifreq_frndlyname ifa_frndlyname;
+};
+#endif
+
/*
* This may have been defined in <net/if.h>. Note that if <net/if.h> is
* to be included it must be included before this header file.
diff --git a/winsup/cygwin/include/inttypes.h b/winsup/cygwin/include/inttypes.h
deleted file mode 100644
index eb60e79e4..000000000
--- a/winsup/cygwin/include/inttypes.h
+++ /dev/null
@@ -1,274 +0,0 @@
-/* inttypes.h - fixed size integer types
-
- Copyright 2003, 2005, 2009, 2010, 2012 Red Hat, Inc.
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-#ifndef _INTTYPES_H
-#define _INTTYPES_H
-
-#include <stdint.h>
-#define __need_wchar_t
-#include <stddef.h>
-#include <bits/wordsize.h>
-
-/* C99 requires that in C++ the following macros should be defined only
- if requested. */
-#if !defined (__cplusplus) || defined (__STDC_FORMAT_MACROS) \
- || defined (__INSIDE_CYGWIN__)
-
-#if __WORDSIZE == 64
-#define __PRI64 "l"
-#define __PRIFAST "l"
-#define __PRIPTR "l"
-#else
-#define __PRI64 "ll"
-#define __PRIFAST
-#define __PRIPTR
-#endif
-
-/* fprintf() macros for signed integers */
-
-#define PRId8 "d"
-#define PRId16 "d"
-#define PRId32 "d"
-#define PRId64 __PRI64 "d"
-
-#define PRIdLEAST8 "d"
-#define PRIdLEAST16 "d"
-#define PRIdLEAST32 "d"
-#define PRIdLEAST64 __PRI64 "d"
-
-#define PRIdFAST8 "d"
-#define PRIdFAST16 __PRIFAST "d"
-#define PRIdFAST32 __PRIFAST "d"
-#define PRIdFAST64 __PRI64 "d"
-
-#define PRIdMAX __PRI64 "d"
-#define PRIdPTR __PRIPTR "d"
-
-#define PRIi8 "i"
-#define PRIi16 "i"
-#define PRIi32 "i"
-#define PRIi64 __PRI64 "i"
-
-#define PRIiLEAST8 "i"
-#define PRIiLEAST16 "i"
-#define PRIiLEAST32 "i"
-#define PRIiLEAST64 __PRI64 "i"
-
-#define PRIiFAST8 "i"
-#define PRIiFAST16 __PRIFAST "i"
-#define PRIiFAST32 __PRIFAST "i"
-#define PRIiFAST64 __PRI64 "i"
-
-#define PRIiMAX __PRI64 "i"
-#define PRIiPTR __PRIPTR "i"
-
-/* fprintf() macros for unsigned integers */
-
-#define PRIo8 "o"
-#define PRIo16 "o"
-#define PRIo32 "o"
-#define PRIo64 __PRI64 "o"
-
-#define PRIoLEAST8 "o"
-#define PRIoLEAST16 "o"
-#define PRIoLEAST32 "o"
-#define PRIoLEAST64 __PRI64 "o"
-
-#define PRIoFAST8 "o"
-#define PRIoFAST16 __PRIFAST "o"
-#define PRIoFAST32 __PRIFAST "o"
-#define PRIoFAST64 __PRI64 "o"
-
-#define PRIoMAX __PRI64 "o"
-#define PRIoPTR __PRIPTR "o"
-
-#define PRIu8 "u"
-#define PRIu16 "u"
-#define PRIu32 "u"
-#define PRIu64 __PRI64 "u"
-
-#define PRIuLEAST8 "u"
-#define PRIuLEAST16 "u"
-#define PRIuLEAST32 "u"
-#define PRIuLEAST64 __PRI64 "u"
-
-#define PRIuFAST8 "u"
-#define PRIuFAST16 __PRIFAST "u"
-#define PRIuFAST32 __PRIFAST "u"
-#define PRIuFAST64 __PRI64 "u"
-
-#define PRIuMAX __PRI64 "u"
-#define PRIuPTR __PRIPTR "u"
-
-#define PRIx8 "x"
-#define PRIx16 "x"
-#define PRIx32 "x"
-#define PRIx64 __PRI64 "x"
-
-#define PRIxLEAST8 "x"
-#define PRIxLEAST16 "x"
-#define PRIxLEAST32 "x"
-#define PRIxLEAST64 __PRI64 "x"
-
-#define PRIxFAST8 "x"
-#define PRIxFAST16 __PRIFAST "x"
-#define PRIxFAST32 __PRIFAST "x"
-#define PRIxFAST64 __PRI64 "x"
-
-#define PRIxMAX __PRI64 "x"
-#define PRIxPTR __PRIPTR "x"
-
-#define PRIX8 "X"
-#define PRIX16 "X"
-#define PRIX32 "X"
-#define PRIX64 __PRI64 "X"
-
-#define PRIXLEAST8 "X"
-#define PRIXLEAST16 "X"
-#define PRIXLEAST32 "X"
-#define PRIXLEAST64 __PRI64 "X"
-
-#define PRIXFAST8 "X"
-#define PRIXFAST16 __PRIFAST "X"
-#define PRIXFAST32 __PRIFAST "X"
-#define PRIXFAST64 __PRI64 "X"
-
-#define PRIXMAX __PRI64 "X"
-#define PRIXPTR __PRIPTR "X"
-
-/* fscanf() macros for signed integers */
-
-#if __WORDSIZE == 64
-#define __SCN64 "l"
-#define __SCNFAST "l"
-#define __SCNPTR "l"
-#else
-#define __SCN64 "ll"
-#define __SCNFAST
-#define __SCNPTR
-#endif
-
-#define SCNd8 "hhd"
-#define SCNd16 "hd"
-#define SCNd32 "d"
-#define SCNd64 __SCN64 "d"
-
-#define SCNdLEAST8 "hhd"
-#define SCNdLEAST16 "hd"
-#define SCNdLEAST32 "d"
-#define SCNdLEAST64 __SCN64 "d"
-
-#define SCNdFAST8 "hhd"
-#define SCNdFAST16 __SCNFAST "d"
-#define SCNdFAST32 __SCNFAST "d"
-#define SCNdFAST64 __SCN64 "d"
-
-#define SCNdMAX __SCN64 "d"
-#define SCNdPTR __SCNPTR "d"
-
-#define SCNi8 "hhi"
-#define SCNi16 "hi"
-#define SCNi32 "i"
-#define SCNi64 __SCN64 "i"
-
-#define SCNiLEAST8 "hhi"
-#define SCNiLEAST16 "hi"
-#define SCNiLEAST32 "i"
-#define SCNiLEAST64 __SCN64 "i"
-
-#define SCNiFAST8 "hhi"
-#define SCNiFAST16 __SCNFAST "i"
-#define SCNiFAST32 __SCNFAST "i"
-#define SCNiFAST64 __SCN64 "i"
-
-#define SCNiMAX __SCN64 "i"
-#define SCNiPTR __SCNPTR "i"
-
-/* fscanf() macros for unsigned integers */
-
-#define SCNo8 "hho"
-#define SCNo16 "ho"
-#define SCNo32 "o"
-#define SCNo64 __SCN64 "o"
-
-#define SCNoLEAST8 "hho"
-#define SCNoLEAST16 "ho"
-#define SCNoLEAST32 "o"
-#define SCNoLEAST64 __SCN64 "o"
-
-#define SCNoFAST8 "hho"
-#define SCNoFAST16 __SCNFAST "o"
-#define SCNoFAST32 __SCNFAST "o"
-#define SCNoFAST64 __SCN64 "o"
-
-#define SCNoMAX __SCN64 "o"
-#define SCNoPTR __SCNPTR "o"
-
-#define SCNu8 "hhu"
-#define SCNu16 "hu"
-#define SCNu32 "u"
-#define SCNu64 __SCN64 "u"
-
-#define SCNuLEAST8 "hhu"
-#define SCNuLEAST16 "hu"
-#define SCNuLEAST32 "u"
-#define SCNuLEAST64 __SCN64 "u"
-
-#define SCNuFAST8 "hhu"
-#define SCNuFAST16 __SCNFAST "u"
-#define SCNuFAST32 __SCNFAST "u"
-#define SCNuFAST64 __SCN64 "u"
-
-#define SCNuMAX __SCN64 "u"
-#define SCNuPTR __SCNPTR "u"
-
-#define SCNx8 "hhx"
-#define SCNx16 "hx"
-#define SCNx32 "x"
-#define SCNx64 __SCN64 "x"
-
-#define SCNxLEAST8 "hhx"
-#define SCNxLEAST16 "hx"
-#define SCNxLEAST32 "x"
-#define SCNxLEAST64 __SCN64 "x"
-
-#define SCNxFAST8 "hhx"
-#define SCNxFAST16 __SCNFAST "x"
-#define SCNxFAST32 __SCNFAST "x"
-#define SCNxFAST64 __SCN64 "x"
-
-#define SCNxMAX __SCN64 "x"
-#define SCNxPTR __SCNPTR "x"
-
-#endif /* !__cplusplus || __STDC_FORMAT_MACROS || __INSIDE_CYGWIN__ */
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include <_ansi.h>
-
-typedef struct {
- intmax_t quot;
- intmax_t rem;
-} imaxdiv_t;
-
-intmax_t _EXFUN(imaxabs, (intmax_t));
-imaxdiv_t _EXFUN(imaxdiv, (intmax_t, intmax_t));
-intmax_t _EXFUN(strtoimax, (const char *, char **, int));
-uintmax_t _EXFUN(strtoumax, (const char *, char **, int));
-intmax_t _EXFUN(wcstoimax, (const wchar_t *, wchar_t **, int));
-uintmax_t _EXFUN(wcstoumax, (const wchar_t *, wchar_t **, int));
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _INTTYPES_H */
diff --git a/winsup/cygwin/include/io.h b/winsup/cygwin/include/io.h
index 517f871fe..9525f6ba0 100644
--- a/winsup/cygwin/include/io.h
+++ b/winsup/cygwin/include/io.h
@@ -1,7 +1,5 @@
/* io.h
- Copyright 1999, 2000, 2001 Red Hat, Inc.
-
This file is part of Cygwin.
This software is a copyrighted work licensed under the terms of the
diff --git a/winsup/cygwin/include/lastlog.h b/winsup/cygwin/include/lastlog.h
index fefff78a4..2cab4b48e 100644
--- a/winsup/cygwin/include/lastlog.h
+++ b/winsup/cygwin/include/lastlog.h
@@ -1,7 +1,5 @@
/* lastlog.h
- Copyright 2000, 2001 Red Hat, Inc.
-
This file is part of Cygwin.
This software is a copyrighted work licensed under the terms of the
diff --git a/winsup/cygwin/include/libgen.h b/winsup/cygwin/include/libgen.h
deleted file mode 100644
index f5c24a8cc..000000000
--- a/winsup/cygwin/include/libgen.h
+++ /dev/null
@@ -1,23 +0,0 @@
-/* libgen.h
-
- Copyright 2005 Red Hat, Inc.
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-#ifndef _LIBGEN_H
-#define _LIBGEN_H
-
-#include <sys/cdefs.h>
-
-__BEGIN_DECLS
-
-extern char *basename (char *path);
-extern char *dirname (char *path);
-
-__END_DECLS
-
-#endif /* _LIBGEN_H */
diff --git a/winsup/cygwin/include/limits.h b/winsup/cygwin/include/limits.h
index e093d283d..2083e3e64 100644
--- a/winsup/cygwin/include/limits.h
+++ b/winsup/cygwin/include/limits.h
@@ -1,8 +1,5 @@
/* limits.h
- Copyright 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009,
- 2011, 2012, 2013 Red Hat, Inc.
-
This file is part of Cygwin.
This software is a copyrighted work licensed under the terms of the
@@ -110,7 +107,7 @@ details. */
#define __LONG_LONG_MAX__ 9223372036854775807LL
#endif
-#if defined (__GNU_LIBRARY__) ? defined (__USE_GNU) : !defined (__STRICT_ANSI__)
+#if __GNU_VISIBLE
#undef LONG_LONG_MIN
#define LONG_LONG_MIN (-LONG_LONG_MAX-1)
#undef LONG_LONG_MAX
diff --git a/winsup/cygwin/include/machine/_arc4random.h b/winsup/cygwin/include/machine/_arc4random.h
new file mode 100644
index 000000000..69a4ce657
--- /dev/null
+++ b/winsup/cygwin/include/machine/_arc4random.h
@@ -0,0 +1,28 @@
+/* machine/_arc4random.h
+
+This file is part of Cygwin.
+
+This software is a copyrighted work licensed under the terms of the
+Cygwin license. Please consult the file "CYGWIN_LICENSE" for
+details. */
+
+#ifndef _MACHINE_ARC4RANDOM_H
+#define _MACHINE_ARC4RANDOM_H
+
+extern int __isthreaded;
+
+#define _ARC4_LOCK_INIT __LOCK_INIT(static, _arc4random_mutex);
+
+#define _ARC4_LOCK() \
+ do { \
+ if (__isthreaded) \
+ __lock_acquire (_arc4random_mutex); \
+ } while (0)
+
+#define _ARC4_UNLOCK() \
+ do { \
+ if (__isthreaded) \
+ __lock_release (_arc4random_mutex); \
+ } while (0)
+
+#endif /* _MACHINE_ARC4RANDOM_H */
diff --git a/winsup/cygwin/include/machine/_endian.h b/winsup/cygwin/include/machine/_endian.h
new file mode 100644
index 000000000..dbd4429b8
--- /dev/null
+++ b/winsup/cygwin/include/machine/_endian.h
@@ -0,0 +1,43 @@
+/* machine/_endian.h
+
+This file is part of Cygwin.
+
+This software is a copyrighted work licensed under the terms of the
+Cygwin license. Please consult the file "CYGWIN_LICENSE" for
+details. */
+
+#ifndef __MACHINE_ENDIAN_H__
+#error "must be included via <machine/endian.h>"
+#endif /* !__MACHINE_ENDIAN_H__ */
+
+#include <_ansi.h>
+#include <bits/endian.h>
+
+#define _LITTLE_ENDIAN __LITTLE_ENDIAN
+#define _BIG_ENDIAN __BIG_ENDIAN
+#define _PDP_ENDIAN __PDP_ENDIAN
+#define _BYTE_ORDER __BYTE_ORDER
+
+#define __machine_host_to_from_network_defined
+
+_ELIDABLE_INLINE __uint32_t __ntohl(__uint32_t);
+_ELIDABLE_INLINE __uint16_t __ntohs(__uint16_t);
+
+_ELIDABLE_INLINE __uint32_t
+__ntohl(__uint32_t _x)
+{
+ __asm__("bswap %0" : "=r" (_x) : "0" (_x));
+ return _x;
+}
+
+_ELIDABLE_INLINE __uint16_t
+__ntohs(__uint16_t _x)
+{
+ __asm__("xchgb %b0,%h0" /* swap bytes */
+ : "=Q" (_x)
+ : "0" (_x));
+ return _x;
+}
+
+#define __htonl(_x) __ntohl(_x)
+#define __htons(_x) __ntohs(_x)
diff --git a/winsup/cygwin/include/machine/_types.h b/winsup/cygwin/include/machine/_types.h
new file mode 100644
index 000000000..e6ed31389
--- /dev/null
+++ b/winsup/cygwin/include/machine/_types.h
@@ -0,0 +1,52 @@
+/* Cygwin's machine/_types.h */
+
+#ifndef _MACHINE__TYPES_H
+#define _MACHINE__TYPES_H
+
+#include <machine/_default_types.h>
+
+#if defined (__INSIDE_CYGWIN__) || defined (_COMPILING_NEWLIB)
+typedef __int32_t __blkcnt32_t;
+typedef __int16_t __dev16_t;
+typedef __uint16_t __uid16_t;
+typedef __uint16_t __gid16_t;
+typedef __uint32_t __ino32_t;
+#endif
+
+#define __machine_blkcnt_t_defined
+typedef __uint64_t __blkcnt_t;
+
+#define __machine_blksize_t_defined
+typedef __int32_t __blksize_t;
+
+#define __machine_dev_t_defined
+typedef __uint32_t __dev_t;
+
+#define __machine_fsblkcnt_t_defined
+/* Keep as is. 32 bit on i386, 64 bit on x86_64. */
+typedef unsigned long __fsblkcnt_t;
+
+#define __machine_fsfilcnt_t_defined
+/* Keep as is. 32 bit on i386, 64 bit on x86_64. */
+typedef unsigned long __fsfilcnt_t;
+
+#define __machine_uid_t_defined
+typedef __uint32_t __uid_t;
+
+#define __machine_gid_t_defined
+typedef __uint32_t __gid_t;
+
+#define __machine_ino_t_defined
+typedef __uint64_t __ino_t;
+
+#define __machine_key_t_defined
+typedef long long __key_t;
+
+#define __machine_sa_family_t_defined
+typedef __uint16_t __sa_family_t;
+
+/* Not unsigned for backward compatibility. */
+#define __machine_socklen_t_defined
+typedef int __socklen_t;
+
+#endif /* _MACHINE__TYPES_H */
diff --git a/winsup/cygwin/include/machine/stdlib.h b/winsup/cygwin/include/machine/stdlib.h
index 2d1539e2c..42e63ce60 100644
--- a/winsup/cygwin/include/machine/stdlib.h
+++ b/winsup/cygwin/include/machine/stdlib.h
@@ -1,7 +1,5 @@
/* machine/stdlib.h
- Copyright 2005 Red Hat, Inc.
-
This file is part of Cygwin.
This software is a copyrighted work licensed under the terms of the
diff --git a/winsup/cygwin/include/cygwin/types.h b/winsup/cygwin/include/machine/types.h
index 54c0c5ba5..065696ada 100644
--- a/winsup/cygwin/include/cygwin/types.h
+++ b/winsup/cygwin/include/machine/types.h
@@ -1,6 +1,4 @@
-/* types.h
-
- Copyright 2001, 2002, 2003, 2005, 2006, 2010, 2011 Red Hat Inc.
+/* machine/types.h
Written by Robert Collins <rbtcollins@hotmail.com>
This file is part of Cygwin.
@@ -9,17 +7,18 @@ This software is a copyrighted work licensed under the terms of the
Cygwin license. Please consult the file "CYGWIN_LICENSE" for
details. */
-#ifndef _CYGWIN_TYPES_H
-#define _CYGWIN_TYPES_H
+#ifndef _SYS_TYPES_H
+#error "must be included via <sys/types.h>"
+#endif /* !_SYS_TYPES_H */
#ifdef __cplusplus
extern "C"
{
#endif
-#include <stdint.h>
#include <endian.h>
#include <bits/wordsize.h>
+#include <sys/_timespec.h>
#ifndef __timespec_t_defined
#define __timespec_t_defined
@@ -31,73 +30,8 @@ typedef struct timespec timespec_t;
typedef struct timespec timestruc_t;
#endif /*__timestruc_t_defined*/
-#ifndef __off_t_defined
-#define __off_t_defined
-/* Based on the newlib definitions. */
-#if __WORDSIZE == 64
-typedef _off_t off_t;
-#else
-typedef _off64_t off_t;
-#endif
-#endif /*__off_t_defined*/
-
typedef __loff_t loff_t;
-#ifndef __dev_t_defined
-#define __dev_t_defined
-typedef __int16_t __dev16_t;
-typedef __uint32_t dev_t;
-#endif /*__dev_t_defined*/
-
-#ifndef __blksize_t_defined
-#define __blksize_t_defined
-typedef __int32_t blksize_t;
-#endif /*__blksize_t_defined*/
-
-#ifndef __blkcnt_t_defined
-#define __blkcnt_t_defined
-typedef __int32_t __blkcnt32_t;
-typedef __int64_t blkcnt_t;
-#endif /*__blkcnt_t_defined*/
-
-#ifndef __fsblkcnt_t_defined
-#define __fsblkcnt_t_defined
-/* Keep as is. 32 bit on i386, 64 bit on x86_64. */
-typedef unsigned long fsblkcnt_t;
-#endif /* __fsblkcnt_t_defined */
-
-#ifndef __fsfilcnt_t_defined
-#define __fsfilcnt_t_defined
-/* Keep as is. 32 bit on i386, 64 bit on x86_64. */
-typedef unsigned long fsfilcnt_t;
-#endif /* __fsfilcnt_t_defined */
-
-#ifndef __uid_t_defined
-#define __uid_t_defined
-typedef unsigned short __uid16_t;
-typedef __uint32_t uid_t;
-#endif /*__uid_t_defined*/
-
-#ifndef __gid_t_defined
-#define __gid_t_defined
-typedef unsigned short __gid16_t;
-typedef __uint32_t gid_t;
-#endif /*__gid_t_defined*/
-
-#ifndef __ino_t_defined
-#define __ino_t_defined
-#ifndef __x86_64__
-typedef __uint32_t __ino32_t;
-#endif
-typedef __uint64_t ino_t;
-#endif /*__ino_t_defined*/
-
-/* Generic ID type, must match at least pid_t, uid_t and gid_t in size. */
-#ifndef __id_t_defined
-#define __id_t_defined
-typedef __uint32_t id_t;
-#endif /* __id_t_defined */
-
#if defined (__INSIDE_CYGWIN__) && !defined (__x86_64__)
struct __flock32 {
short l_type; /* F_RDLCK, F_WRLCK, or F_UNLCK */
@@ -117,11 +51,6 @@ struct flock {
pid_t l_pid; /* returned with F_GETLK */
};
-#ifndef __key_t_defined
-#define __key_t_defined
-typedef long long key_t;
-#endif /* __key_t_defined */
-
#ifndef __BIT_TYPES_DEFINED
#define __BIT_TYPES_DEFINED__ 1
@@ -140,37 +69,11 @@ typedef unsigned long vm_size_t;
typedef void *vm_object_t;
#endif /* __vm_object_t_defined */
-#ifndef __u_int8_t_defined
-#define __u_int8_t_defined
-typedef unsigned char u_int8_t;
-#endif
-#ifndef __u_int16_t_defined
-#define __u_int16_t_defined
-typedef __uint16_t u_int16_t;
-#endif
-#ifndef __u_int32_t_defined
-#define __u_int32_t_defined
-typedef __uint32_t u_int32_t;
-#endif
-#ifndef __u_int64_t_defined
-#define __u_int64_t_defined
-typedef __uint64_t u_int64_t;
-#endif
-
-#ifndef __register_t_defined
-#define __register_t_defined
-typedef __int32_t register_t;
-#endif
-
#ifndef __addr_t_defined
#define __addr_t_defined
typedef char *addr_t;
#endif
-#ifndef __mode_t_defined
-#define __mode_t_defined
-typedef unsigned mode_t;
-#endif
#endif /*__BIT_TYPES_DEFINED*/
#if !defined(__INSIDE_CYGWIN__) || !defined(__cplusplus)
@@ -183,6 +86,8 @@ typedef struct __pthread_attr_t {char __dummy;} *pthread_attr_t;
typedef struct __pthread_mutexattr_t {char __dummy;} *pthread_mutexattr_t;
typedef struct __pthread_condattr_t {char __dummy;} *pthread_condattr_t;
typedef struct __pthread_cond_t {char __dummy;} *pthread_cond_t;
+typedef struct __pthread_barrierattr_t {char __dummy;} *pthread_barrierattr_t;
+typedef struct __pthread_barrier_t {char __dummy;} *pthread_barrier_t;
/* These variables are not user alterable. This means you!. */
typedef struct
@@ -206,6 +111,8 @@ typedef class pthread_attr *pthread_attr_t;
typedef class pthread_mutexattr *pthread_mutexattr_t;
typedef class pthread_condattr *pthread_condattr_t;
typedef class pthread_cond *pthread_cond_t;
+typedef class pthread_barrier *pthread_barrier_t;
+typedef class pthread_barrierattr *pthread_barrierattr_t;
typedef class pthread_once pthread_once_t;
typedef class pthread_spinlock *pthread_spinlock_t;
typedef class pthread_rwlock *pthread_rwlock_t;
@@ -221,5 +128,3 @@ typedef class semaphore *sem_t;
#ifdef __cplusplus
}
#endif
-
-#endif /* _CYGWIN_TYPES_H */
diff --git a/winsup/cygwin/include/mapi.h b/winsup/cygwin/include/mapi.h
index e2d47e264..e59950b97 100644
--- a/winsup/cygwin/include/mapi.h
+++ b/winsup/cygwin/include/mapi.h
@@ -1,7 +1,5 @@
/* mapi.h
- Copyright 1997, 1998, 1999, 2000, 2001 Red Hat, Inc.
-
This file is part of Cygwin.
This software is a copyrighted work licensed under the terms of the
diff --git a/winsup/cygwin/include/memory.h b/winsup/cygwin/include/memory.h
index 491f4855e..42370a9bf 100644
--- a/winsup/cygwin/include/memory.h
+++ b/winsup/cygwin/include/memory.h
@@ -1,7 +1,5 @@
/* memory.h
- Copyright 1998, 2000, 2001 Red Hat, Inc.
-
This file is part of Cygwin.
This software is a copyrighted work licensed under the terms of the
diff --git a/winsup/cygwin/include/mntent.h b/winsup/cygwin/include/mntent.h
index 5a0c13054..7510f7b1a 100644
--- a/winsup/cygwin/include/mntent.h
+++ b/winsup/cygwin/include/mntent.h
@@ -1,7 +1,5 @@
/* mntent.h
- Copyright 1996, 1998, 1999, 2000, 2001, 2006, 2009, 2010, 2012 Red Hat, Inc.
-
This file is part of Cygwin.
This software is a copyrighted work licensed under the terms of the
diff --git a/winsup/cygwin/include/mqueue.h b/winsup/cygwin/include/mqueue.h
index 59c32dbe4..69b426158 100644
--- a/winsup/cygwin/include/mqueue.h
+++ b/winsup/cygwin/include/mqueue.h
@@ -1,7 +1,5 @@
/* mqueue.h: POSIX message queue interface
- Copyright 2007 Red Hat, Inc.
-
This file is part of Cygwin.
This software is a copyrighted work licensed under the terms of the
diff --git a/winsup/cygwin/include/net/if.h b/winsup/cygwin/include/net/if.h
index cba90d3f8..49cff2b61 100644
--- a/winsup/cygwin/include/net/if.h
+++ b/winsup/cygwin/include/net/if.h
@@ -1,7 +1,5 @@
/* net/if.h
- Copyright 1998, 2000, 2001 Red Hat, Inc.
-
This file is part of Cygwin.
This software is a copyrighted work licensed under the terms of the
diff --git a/winsup/cygwin/include/netdb.h b/winsup/cygwin/include/netdb.h
index e4b85c6a7..596fb33d2 100644
--- a/winsup/cygwin/include/netdb.h
+++ b/winsup/cygwin/include/netdb.h
@@ -152,38 +152,61 @@ extern __declspec(dllimport) int h_errno;
#define NO_DATA 4 /* Valid name, no data record of requested type */
#define NO_ADDRESS NO_DATA /* no address, look for MX record */
-#define AI_PASSIVE 1
-#define AI_CANONNAME 2
-#define AI_NUMERICHOST 4
-#define AI_NUMERICSERV 8
-#define AI_ALL 256
-#define AI_ADDRCONFIG 1024 /* Only available on Vista. Unchangable default
- on older systems. */
-#define AI_V4MAPPED 2048
-
-#define NI_NOFQDN 1
-#define NI_NUMERICHOST 2
-#define NI_NAMEREQD 4
-#define NI_NUMERICSERV 8
-#define NI_DGRAM 16
-
-#define NI_MAXHOST 1025
-#define NI_MAXSERV 32
-
-#define EAI_ADDRFAMILY 1
-#define EAI_AGAIN 2
-#define EAI_BADFLAGS 3
-#define EAI_FAIL 4
-#define EAI_FAMILY 5
-#define EAI_MEMORY 6
-#define EAI_NODATA 7
-#define EAI_NONAME 8
-#define EAI_SERVICE 9
-#define EAI_SOCKTYPE 10
-#define EAI_SYSTEM 11
-#define EAI_BADHINTS 12
-#define EAI_PROTOCOL 13
-#define EAI_OVERFLOW 14
+/* Flag values for getaddrinfo function. */
+#define AI_PASSIVE 0x1 /* Intend socket address for bind. */
+#define AI_CANONNAME 0x2 /* Return canonical node name. */
+#define AI_NUMERICHOST 0x4 /* Input is address, don't resolve. */
+#define AI_NUMERICSERV 0x8 /* Input is port number, don't resolve. */
+#define AI_ALL 0x100 /* Return v4-mapped and v6 addresses. */
+#define AI_ADDRCONFIG 0x400 /* Only available on Vista. Unchangable default
+ on older systems. */
+#define AI_V4MAPPED 0x800
+/* Glibc extensions. We use numerical values taken by winsock-specific
+ extensions. */
+#define AI_IDN 0x4000 /* Encode IDN input from current local to
+ punycode per RFC 3490. */
+#define AI_CANONIDN 0x8000 /* Convert ai_canonname from punycode to IDN
+ in current locale. */
+#define AI_IDN_ALLOW_UNASSIGNED 0x10000 /* Allow unassigned code points in
+ input string. */
+#define AI_IDN_USE_STD3_ASCII_RULES 0x20000 /* Filter ASCII chars according to
+ STD3 rules. */
+
+/* Flag values for getnameinfo function. */
+#define NI_NOFQDN 0x1 /* Don't lookup hostname. */
+#define NI_NUMERICHOST 0x2 /* Return host address, rather than name. */
+#define NI_NAMEREQD 0x4 /* Not being able to resolve is an error. */
+#define NI_NUMERICSERV 0x8 /* Return port number, rather than name. */
+#define NI_DGRAM 0x10 /* Lookup datagram (UDP) service. */
+/* Glibc extensions. We use numerical values taken by winsock-specific
+ extensions. */
+#define NI_IDN 0x4000 /* Decode name from punycode to IDN in
+ current locale. */
+#define NI_IDN_ALLOW_UNASSIGNED 0x10000 /* Allow unassigned code points in
+ output string. */
+#define NI_IDN_USE_STD3_ASCII_RULES 0x20000 /* Filter ASCII chars according to
+ STD3 rules. */
+
+#define NI_MAXHOST 1025 /* Best effort maximum hostname length. */
+#define NI_MAXSERV 32 /* Best effort maximum service name length. */
+
+/* Error codes returned by getaddrinfo and getnameinfo. */
+#define EAI_ADDRFAMILY 1 /* Address family for hostname not supported */
+#define EAI_AGAIN 2 /* Temporary failure in name resolution */
+#define EAI_BADFLAGS 3 /* Bad value for ai_flags */
+#define EAI_FAIL 4 /* Non-recoverable failure in name resolution */
+#define EAI_FAMILY 5 /* ai_family not supported */
+#define EAI_MEMORY 6 /* Memory allocation failure */
+#define EAI_NODATA 7 /* No address associated with hostname */
+#define EAI_NONAME 8 /* Name or service not known */
+#define EAI_SERVICE 9 /* Servname not supported for ai_socktype */
+#define EAI_SOCKTYPE 10 /* ai_socktype not supported */
+#define EAI_SYSTEM 11 /* System error */
+#define EAI_BADHINTS 12 /* Invalid value for hints */
+#define EAI_PROTOCOL 13 /* Resolved protocol is unknown */
+#define EAI_OVERFLOW 14 /* An argument buffer overflowed */
+/* Glibc extensions. */
+#define EAI_IDN_ENCODE 15 /* Parameter string not correctly encoded */
#ifndef __INSIDE_CYGWIN_NET__
void endhostent (void);
@@ -195,7 +218,7 @@ struct hostent *gethostbyaddr (const char *, int, int);
struct hostent *gethostbyname (const char *);
struct hostent *gethostbyname2 (const char *, int);
struct hostent *gethostent (void);
-struct netent *getnetbyaddr (long, int); /* u_long? */
+struct netent *getnetbyaddr (uint32_t, int);
struct netent *getnetbyname (const char *);
struct netent *getnetent (void);
struct protoent *getprotobyname (const char *);
diff --git a/winsup/cygwin/include/netinet/in.h b/winsup/cygwin/include/netinet/in.h
index 6d666312a..da0265bee 100644
--- a/winsup/cygwin/include/netinet/in.h
+++ b/winsup/cygwin/include/netinet/in.h
@@ -1,7 +1,5 @@
/* netinet/in.h
- Copyright 1998, 2000, 2001, 2006 Red Hat, Inc.
-
This file is part of Cygwin.
This software is a copyrighted work licensed under the terms of the
diff --git a/winsup/cygwin/include/netinet/in_systm.h b/winsup/cygwin/include/netinet/in_systm.h
index 17b5feb8d..a94955fc1 100644
--- a/winsup/cygwin/include/netinet/in_systm.h
+++ b/winsup/cygwin/include/netinet/in_systm.h
@@ -1,7 +1,5 @@
/* netinet/in_systm.h
- Copyright 2000, 2001 Red Hat, Inc.
-
This file is part of Cygwin.
This software is a copyrighted work licensed under the terms of the
diff --git a/winsup/cygwin/include/netinet/ip.h b/winsup/cygwin/include/netinet/ip.h
index dd701512e..1f6ebbe4a 100644
--- a/winsup/cygwin/include/netinet/ip.h
+++ b/winsup/cygwin/include/netinet/ip.h
@@ -52,28 +52,28 @@
*/
struct ip {
#ifdef _IP_VHL
- u_char ip_vhl; /* version << 4 | header length >> 2 */
+ u_int8_t ip_vhl; /* version << 4 | header length >> 2 */
#else
#if __BYTE_ORDER == __LITTLE_ENDIAN
- u_int ip_hl:4, /* header length */
- ip_v:4; /* version */
+ unsigned int ip_hl:4, /* header length */
+ ip_v:4; /* version */
#endif
#if __BYTE_ORDER == __BIG_ENDIAN
- u_int ip_v:4, /* version */
- ip_hl:4; /* header length */
+ unsigned int ip_v:4, /* version */
+ ip_hl:4; /* header length */
#endif
#endif /* not _IP_VHL */
- u_char ip_tos; /* type of service */
- u_short ip_len; /* total length */
- u_short ip_id; /* identification */
- u_short ip_off; /* fragment offset field */
+ u_int8_t ip_tos; /* type of service */
+ u_int16_t ip_len; /* total length */
+ u_int16_t ip_id; /* identification */
+ u_int16_t ip_off; /* fragment offset field */
#define IP_RF 0x8000 /* reserved fragment flag */
#define IP_DF 0x4000 /* dont fragment flag */
#define IP_MF 0x2000 /* more fragments flag */
#define IP_OFFMASK 0x1fff /* mask for fragmenting bits */
- u_char ip_ttl; /* time to live */
- u_char ip_p; /* protocol */
- u_short ip_sum; /* checksum */
+ u_int8_t ip_ttl; /* time to live */
+ u_int8_t ip_p; /* protocol */
+ u_int16_t ip_sum; /* checksum */
struct in_addr ip_src,ip_dst; /* source and dest address */
};
@@ -202,20 +202,22 @@ struct ip {
#define IPOPT_OFFSET 2 /* offset within option */
#define IPOPT_MINOFF 4 /* min value of above */
+#define MAX_IPOPTLEN 40
+
/*
* Time stamp option structure.
*/
struct ip_timestamp {
- u_char ipt_code; /* IPOPT_TS */
- u_char ipt_len; /* size of structure (variable) */
- u_char ipt_ptr; /* index of current entry */
+ u_int8_t ipt_code; /* IPOPT_TS */
+ u_int8_t ipt_len; /* size of structure (variable) */
+ u_int8_t ipt_ptr; /* index of current entry */
#if __BYTE_ORDER == __LITTLE_ENDIAN
- u_int ipt_flg:4, /* flags, see below */
- ipt_oflw:4; /* overflow counter */
+ unsigned int ipt_flg:4, /* flags, see below */
+ ipt_oflw:4; /* overflow counter */
#endif
#if __BYTE_ORDER == __BIG_ENDIAN
- u_int ipt_oflw:4, /* overflow counter */
- ipt_flg:4; /* flags, see below */
+ unsigned int ipt_oflw:4, /* overflow counter */
+ ipt_flg:4; /* flags, see below */
#endif
union ipt_timestamp {
n_long ipt_time[1];
diff --git a/winsup/cygwin/include/netinet/ip6.h b/winsup/cygwin/include/netinet/ip6.h
new file mode 100644
index 000000000..3f4cad092
--- /dev/null
+++ b/winsup/cygwin/include/netinet/ip6.h
@@ -0,0 +1,352 @@
+/* $FreeBSD: src/sys/netinet/ip6.h,v 1.22 2013/04/10 00:26:22 svnexp Exp $ */
+/* $KAME: ip6.h,v 1.18 2001/03/29 05:34:30 itojun Exp $ */
+
+/*-
+ * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
+ * 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. Neither the name of the project 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 PROJECT 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 PROJECT 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.
+ */
+
+/*-
+ * Copyright (c) 1982, 1986, 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.
+ * 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.
+ *
+ * @(#)ip.h 8.1 (Berkeley) 6/10/93
+ */
+
+#ifndef _NETINET_IP6_H_
+#define _NETINET_IP6_H_
+
+/*
+ * Definition for internet protocol version 6.
+ * RFC 2460
+ */
+
+struct ip6_hdr {
+ union {
+ struct ip6_hdrctl {
+ u_int32_t ip6_un1_flow; /* 20 bits of flow-ID */
+ u_int16_t ip6_un1_plen; /* payload length */
+ u_int8_t ip6_un1_nxt; /* next header */
+ u_int8_t ip6_un1_hlim; /* hop limit */
+ } ip6_un1;
+ u_int8_t ip6_un2_vfc; /* 4 bits version, top 4 bits class */
+ } ip6_ctlun;
+ struct in6_addr ip6_src; /* source address */
+ struct in6_addr ip6_dst; /* destination address */
+} __packed;
+
+#define ip6_vfc ip6_ctlun.ip6_un2_vfc
+#define ip6_flow ip6_ctlun.ip6_un1.ip6_un1_flow
+#define ip6_plen ip6_ctlun.ip6_un1.ip6_un1_plen
+#define ip6_nxt ip6_ctlun.ip6_un1.ip6_un1_nxt
+#define ip6_hlim ip6_ctlun.ip6_un1.ip6_un1_hlim
+#define ip6_hops ip6_ctlun.ip6_un1.ip6_un1_hlim
+
+#define IPV6_VERSION 0x60
+#define IPV6_VERSION_MASK 0xf0
+
+#if BYTE_ORDER == BIG_ENDIAN
+#define IPV6_FLOWINFO_MASK 0x0fffffff /* flow info (28 bits) */
+#define IPV6_FLOWLABEL_MASK 0x000fffff /* flow label (20 bits) */
+#else
+#if BYTE_ORDER == LITTLE_ENDIAN
+#define IPV6_FLOWINFO_MASK 0xffffff0f /* flow info (28 bits) */
+#define IPV6_FLOWLABEL_MASK 0xffff0f00 /* flow label (20 bits) */
+#endif /* LITTLE_ENDIAN */
+#endif
+#if 1
+/* ECN bits proposed by Sally Floyd */
+#define IP6TOS_CE 0x01 /* congestion experienced */
+#define IP6TOS_ECT 0x02 /* ECN-capable transport */
+#endif
+
+/*
+ * Extension Headers
+ */
+
+struct ip6_ext {
+ u_int8_t ip6e_nxt;
+ u_int8_t ip6e_len;
+} __packed;
+
+/* Hop-by-Hop options header */
+/* XXX should we pad it to force alignment on an 8-byte boundary? */
+struct ip6_hbh {
+ u_int8_t ip6h_nxt; /* next header */
+ u_int8_t ip6h_len; /* length in units of 8 octets */
+ /* followed by options */
+} __packed;
+
+/* Destination options header */
+/* XXX should we pad it to force alignment on an 8-byte boundary? */
+struct ip6_dest {
+ u_int8_t ip6d_nxt; /* next header */
+ u_int8_t ip6d_len; /* length in units of 8 octets */
+ /* followed by options */
+} __packed;
+
+/* Option types and related macros */
+#define IP6OPT_PAD1 0x00 /* 00 0 00000 */
+#define IP6OPT_PADN 0x01 /* 00 0 00001 */
+#define IP6OPT_JUMBO 0xC2 /* 11 0 00010 = 194 */
+#define IP6OPT_NSAP_ADDR 0xC3 /* 11 0 00011 */
+#define IP6OPT_TUNNEL_LIMIT 0x04 /* 00 0 00100 */
+#ifndef _KERNEL
+#define IP6OPT_RTALERT 0x05 /* 00 0 00101 (KAME definition) */
+#endif
+#define IP6OPT_ROUTER_ALERT 0x05 /* 00 0 00101 (RFC3542, recommended) */
+
+#define IP6OPT_RTALERT_LEN 4
+#define IP6OPT_RTALERT_MLD 0 /* Datagram contains an MLD message */
+#define IP6OPT_RTALERT_RSVP 1 /* Datagram contains an RSVP message */
+#define IP6OPT_RTALERT_ACTNET 2 /* contains an Active Networks msg */
+#define IP6OPT_MINLEN 2
+
+#define IP6OPT_EID 0x8a /* 10 0 01010 */
+
+#define IP6OPT_TYPE(o) ((o) & 0xC0)
+#define IP6OPT_TYPE_SKIP 0x00
+#define IP6OPT_TYPE_DISCARD 0x40
+#define IP6OPT_TYPE_FORCEICMP 0x80
+#define IP6OPT_TYPE_ICMP 0xC0
+
+#define IP6OPT_MUTABLE 0x20
+
+/* IPv6 options: common part */
+struct ip6_opt {
+ u_int8_t ip6o_type;
+ u_int8_t ip6o_len;
+} __packed;
+
+/* Jumbo Payload Option */
+struct ip6_opt_jumbo {
+ u_int8_t ip6oj_type;
+ u_int8_t ip6oj_len;
+ u_int8_t ip6oj_jumbo_len[4];
+} __packed;
+#define IP6OPT_JUMBO_LEN 6
+
+/* NSAP Address Option */
+struct ip6_opt_nsap {
+ u_int8_t ip6on_type;
+ u_int8_t ip6on_len;
+ u_int8_t ip6on_src_nsap_len;
+ u_int8_t ip6on_dst_nsap_len;
+ /* followed by source NSAP */
+ /* followed by destination NSAP */
+} __packed;
+
+/* Tunnel Limit Option */
+struct ip6_opt_tunnel {
+ u_int8_t ip6ot_type;
+ u_int8_t ip6ot_len;
+ u_int8_t ip6ot_encap_limit;
+} __packed;
+
+/* Router Alert Option */
+struct ip6_opt_router {
+ u_int8_t ip6or_type;
+ u_int8_t ip6or_len;
+ u_int8_t ip6or_value[2];
+} __packed;
+/* Router alert values (in network byte order) */
+#if BYTE_ORDER == BIG_ENDIAN
+#define IP6_ALERT_MLD 0x0000
+#define IP6_ALERT_RSVP 0x0001
+#define IP6_ALERT_AN 0x0002
+#else
+#if BYTE_ORDER == LITTLE_ENDIAN
+#define IP6_ALERT_MLD 0x0000
+#define IP6_ALERT_RSVP 0x0100
+#define IP6_ALERT_AN 0x0200
+#endif /* LITTLE_ENDIAN */
+#endif
+
+/* Routing header */
+struct ip6_rthdr {
+ u_int8_t ip6r_nxt; /* next header */
+ u_int8_t ip6r_len; /* length in units of 8 octets */
+ u_int8_t ip6r_type; /* routing type */
+ u_int8_t ip6r_segleft; /* segments left */
+ /* followed by routing type specific data */
+} __packed;
+
+/* Type 0 Routing header, deprecated by RFC 5095. */
+struct ip6_rthdr0 {
+ u_int8_t ip6r0_nxt; /* next header */
+ u_int8_t ip6r0_len; /* length in units of 8 octets */
+ u_int8_t ip6r0_type; /* always zero */
+ u_int8_t ip6r0_segleft; /* segments left */
+ u_int32_t ip6r0_reserved; /* reserved field */
+ /* followed by up to 127 struct in6_addr */
+} __packed;
+
+/* Fragment header */
+struct ip6_frag {
+ u_int8_t ip6f_nxt; /* next header */
+ u_int8_t ip6f_reserved; /* reserved field */
+ u_int16_t ip6f_offlg; /* offset, reserved, and flag */
+ u_int32_t ip6f_ident; /* identification */
+} __packed;
+
+#if BYTE_ORDER == BIG_ENDIAN
+#define IP6F_OFF_MASK 0xfff8 /* mask out offset from _offlg */
+#define IP6F_RESERVED_MASK 0x0006 /* reserved bits in ip6f_offlg */
+#define IP6F_MORE_FRAG 0x0001 /* more-fragments flag */
+#else /* BYTE_ORDER == LITTLE_ENDIAN */
+#define IP6F_OFF_MASK 0xf8ff /* mask out offset from _offlg */
+#define IP6F_RESERVED_MASK 0x0600 /* reserved bits in ip6f_offlg */
+#define IP6F_MORE_FRAG 0x0100 /* more-fragments flag */
+#endif /* BYTE_ORDER == LITTLE_ENDIAN */
+
+/*
+ * Internet implementation parameters.
+ */
+#define IPV6_MAXHLIM 255 /* maximum hoplimit */
+#define IPV6_DEFHLIM 64 /* default hlim */
+#define IPV6_FRAGTTL 120 /* ttl for fragment packets, in slowtimo tick */
+#define IPV6_HLIMDEC 1 /* subtracted when forwarding */
+
+#define IPV6_MMTU 1280 /* minimal MTU and reassembly. 1024 + 256 */
+#define IPV6_MAXPACKET 65535 /* ip6 max packet size without Jumbo payload*/
+#define IPV6_MAXOPTHDR 2048 /* max option header size, 256 64-bit words */
+
+#ifdef _KERNEL
+/*
+ * IP6_EXTHDR_CHECK ensures that region between the IP6 header and the
+ * target header (including IPv6 itself, extension headers and
+ * TCP/UDP/ICMP6 headers) are contiguous. KAME requires drivers
+ * to store incoming data into one internal mbuf or one or more external
+ * mbufs(never into two or more internal mbufs). Thus, the third case is
+ * supposed to never be matched but is prepared just in case.
+ */
+
+#define IP6_EXTHDR_CHECK(m, off, hlen, ret) \
+do { \
+ if ((m)->m_next != NULL) { \
+ if (((m)->m_flags & M_LOOP) && \
+ ((m)->m_len < (off) + (hlen)) && \
+ (((m) = m_pullup((m), (off) + (hlen))) == NULL)) { \
+ IP6STAT_INC(ip6s_exthdrtoolong); \
+ return ret; \
+ } else if ((m)->m_flags & M_EXT) { \
+ if ((m)->m_len < (off) + (hlen)) { \
+ IP6STAT_INC(ip6s_exthdrtoolong); \
+ m_freem(m); \
+ return ret; \
+ } \
+ } else { \
+ if ((m)->m_len < (off) + (hlen)) { \
+ IP6STAT_INC(ip6s_exthdrtoolong); \
+ m_freem(m); \
+ return ret; \
+ } \
+ } \
+ } else { \
+ if ((m)->m_len < (off) + (hlen)) { \
+ IP6STAT_INC(ip6s_tooshort); \
+ in6_ifstat_inc(m->m_pkthdr.rcvif, ifs6_in_truncated); \
+ m_freem(m); \
+ return ret; \
+ } \
+ } \
+} while (/*CONSTCOND*/ 0)
+
+/*
+ * IP6_EXTHDR_GET ensures that intermediate protocol header (from "off" to
+ * "len") is located in single mbuf, on contiguous memory region.
+ * The pointer to the region will be returned to pointer variable "val",
+ * with type "typ".
+ * IP6_EXTHDR_GET0 does the same, except that it aligns the structure at the
+ * very top of mbuf. GET0 is likely to make memory copy than GET.
+ *
+ * XXX we're now testing this, needs m_pulldown()
+ */
+#define IP6_EXTHDR_GET(val, typ, m, off, len) \
+do { \
+ struct mbuf *t; \
+ int tmp; \
+ if ((m)->m_len >= (off) + (len)) \
+ (val) = (typ)(mtod((m), caddr_t) + (off)); \
+ else { \
+ t = m_pulldown((m), (off), (len), &tmp); \
+ if (t) { \
+ if (t->m_len < tmp + (len)) \
+ panic("m_pulldown malfunction"); \
+ (val) = (typ)(mtod(t, caddr_t) + tmp); \
+ } else { \
+ (val) = (typ)NULL; \
+ (m) = NULL; \
+ } \
+ } \
+} while (/*CONSTCOND*/ 0)
+
+#define IP6_EXTHDR_GET0(val, typ, m, off, len) \
+do { \
+ struct mbuf *t; \
+ if ((off) == 0) \
+ (val) = (typ)mtod(m, caddr_t); \
+ else { \
+ t = m_pulldown((m), (off), (len), NULL); \
+ if (t) { \
+ if (t->m_len < (len)) \
+ panic("m_pulldown malfunction"); \
+ (val) = (typ)mtod(t, caddr_t); \
+ } else { \
+ (val) = (typ)NULL; \
+ (m) = NULL; \
+ } \
+ } \
+} while (/*CONSTCOND*/ 0)
+
+#endif /*_KERNEL*/
+
+#endif /* not _NETINET_IP6_H_ */
diff --git a/winsup/cygwin/include/netinet/ip_icmp.h b/winsup/cygwin/include/netinet/ip_icmp.h
index 43bae5324..cb8df65c3 100644
--- a/winsup/cygwin/include/netinet/ip_icmp.h
+++ b/winsup/cygwin/include/netinet/ip_icmp.h
@@ -1,7 +1,5 @@
/* netinet/ip_icmp.h
- Copyright 1998, 2000, 2001 Red Hat, Inc.
-
This file is part of Cygwin.
This software is a copyrighted work licensed under the terms of the
diff --git a/winsup/cygwin/include/netinet/tcp.h b/winsup/cygwin/include/netinet/tcp.h
index 8a6994326..becbec54f 100644
--- a/winsup/cygwin/include/netinet/tcp.h
+++ b/winsup/cygwin/include/netinet/tcp.h
@@ -50,19 +50,19 @@ typedef u_int32_t tcp_cc; /* connection count per rfc1644 */
* Per RFC 793, September, 1981.
*/
struct tcphdr {
- u_short th_sport; /* source port */
- u_short th_dport; /* destination port */
- tcp_seq th_seq; /* sequence number */
- tcp_seq th_ack; /* acknowledgement number */
+ u_int16_t th_sport; /* source port */
+ u_int16_t th_dport; /* destination port */
+ tcp_seq th_seq; /* sequence number */
+ tcp_seq th_ack; /* acknowledgement number */
#if __BYTE_ORDER == __LITTLE_ENDIAN
- u_int th_x2:4, /* (unused) */
- th_off:4; /* data offset */
+ unsigned int th_x2:4, /* (unused) */
+ th_off:4; /* data offset */
#endif
#if __BYTE_ORDER == __BIG_ENDIAN
- u_int th_off:4, /* data offset */
- th_x2:4; /* (unused) */
+ unsigned int th_off:4, /* data offset */
+ th_x2:4; /* (unused) */
#endif
- u_char th_flags;
+ u_int8_t th_flags;
#define TH_FIN 0x01
#define TH_SYN 0x02
#define TH_RST 0x04
@@ -71,9 +71,9 @@ struct tcphdr {
#define TH_URG 0x20
#define TH_FLAGS (TH_FIN|TH_SYN|TH_RST|TH_ACK|TH_URG)
- u_short th_win; /* window */
- u_short th_sum; /* checksum */
- u_short th_urp; /* urgent pointer */
+ u_int16_t th_win; /* window */
+ u_int16_t th_sum; /* checksum */
+ u_int16_t th_urp; /* urgent pointer */
};
#define TCPOPT_EOL 0
diff --git a/winsup/cygwin/include/netinet/udp.h b/winsup/cygwin/include/netinet/udp.h
index 61932720b..21fbc01cd 100644
--- a/winsup/cygwin/include/netinet/udp.h
+++ b/winsup/cygwin/include/netinet/udp.h
@@ -42,10 +42,10 @@
* Per RFC 768, September, 1981.
*/
struct udphdr {
- u_short uh_sport; /* source port */
- u_short uh_dport; /* destination port */
- u_short uh_ulen; /* udp length */
- u_short uh_sum; /* udp checksum */
+ u_int16_t uh_sport; /* source port */
+ u_int16_t uh_dport; /* destination port */
+ u_int16_t uh_ulen; /* udp length */
+ u_int16_t uh_sum; /* udp checksum */
};
#endif
diff --git a/winsup/cygwin/include/paths.h b/winsup/cygwin/include/paths.h
index 8934563d8..8dc9594fc 100644
--- a/winsup/cygwin/include/paths.h
+++ b/winsup/cygwin/include/paths.h
@@ -1,7 +1,5 @@
/* paths.h
- Copyright 2000, 2001, 2002, 2003, 2010, 2011 Red Hat, Inc.
-
This file is part of Cygwin.
This software is a copyrighted work licensed under the terms of the
@@ -31,5 +29,4 @@ details. */
#define _PATH_VARTMP "/var/tmp/"
#define _PATH_VI "/bin/vi"
#define _PATH_WTMP "/var/log/wtmp"
-
#endif /* _PATHS_H_ */
diff --git a/winsup/cygwin/include/poll.h b/winsup/cygwin/include/poll.h
index a836b2af4..423b5cde6 100644
--- a/winsup/cygwin/include/poll.h
+++ b/winsup/cygwin/include/poll.h
@@ -1,7 +1,5 @@
/* poll.h
- Copyright 2000, 2001 Red Hat, Inc.
-
This file is part of Cygwin.
This software is a copyrighted work licensed under the terms of the
diff --git a/winsup/cygwin/include/pthread.h b/winsup/cygwin/include/pthread.h
index c6798f13a..609eac2bd 100644
--- a/winsup/cygwin/include/pthread.h
+++ b/winsup/cygwin/include/pthread.h
@@ -1,8 +1,5 @@
/* pthread.h: POSIX pthread interface
- Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2011, 2012, 2013 Red Hat, Inc.
-
Written by Marco Fuykschot <marco@ddi.nl>
This file is part of Cygwin.
@@ -49,7 +46,7 @@ extern "C"
#define PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP (pthread_mutex_t)18
#define PTHREAD_NORMAL_MUTEX_INITIALIZER_NP (pthread_mutex_t)19
#define PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP (pthread_mutex_t)20
-#define PTHREAD_MUTEX_INITIALIZER PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP
+#define PTHREAD_MUTEX_INITIALIZER PTHREAD_NORMAL_MUTEX_INITIALIZER_NP
#define PTHREAD_ONCE_INIT { PTHREAD_MUTEX_INITIALIZER, 0 }
#if defined(_POSIX_THREAD_PRIO_INHERIT) && _POSIX_THREAD_PRIO_INHERIT >= 0
#define PTHREAD_PRIO_NONE 0
@@ -62,6 +59,7 @@ extern "C"
/* process is the default */
#define PTHREAD_SCOPE_PROCESS 0
#define PTHREAD_SCOPE_SYSTEM 1
+#define PTHREAD_BARRIER_SERIAL_THREAD (-1)
/* Register Fork Handlers */
int pthread_atfork (void (*)(void), void (*)(void), void (*)(void));
@@ -74,8 +72,6 @@ int pthread_attr_getinheritsched (const pthread_attr_t *, int *);
int pthread_attr_getschedparam (const pthread_attr_t *, struct sched_param *);
int pthread_attr_getschedpolicy (const pthread_attr_t *, int *);
int pthread_attr_getscope (const pthread_attr_t *, int *);
-int pthread_attr_getstack (const pthread_attr_t *, void **, size_t *);
-int pthread_attr_getstackaddr (const pthread_attr_t *, void **);
int pthread_attr_init (pthread_attr_t *);
int pthread_attr_setdetachstate (pthread_attr_t *, int);
int pthread_attr_setguardsize (pthread_attr_t *, size_t);
@@ -84,19 +80,18 @@ int pthread_attr_setschedparam (pthread_attr_t *, const struct sched_param *);
int pthread_attr_setschedpolicy (pthread_attr_t *, int);
int pthread_attr_setscope (pthread_attr_t *, int);
-#ifdef _POSIX_THREAD_ATTR_STACKADDR
-/* These functions may be implementable via some low level trickery. For now they are
- * Not supported or implemented. The prototypes are here so if someone greps the
- * source they will see these comments
- */
+#if __POSIX_VISIBLE >= 200112
+int pthread_attr_getstack (const pthread_attr_t *, void **, size_t *);
int pthread_attr_setstack (pthread_attr_t *, void *, size_t);
-int pthread_attr_setstackaddr (pthread_attr_t *, void *);
#endif
-
-#ifdef _POSIX_THREAD_ATTR_STACKSIZE
+#if __POSIX_VISIBLE < 200809
+int pthread_attr_getstackaddr (const pthread_attr_t *, void **)
+ __attribute__ ((__deprecated__));
+int pthread_attr_setstackaddr (pthread_attr_t *, void *)
+ __attribute__ ((__deprecated__));
+#endif
int pthread_attr_getstacksize (const pthread_attr_t *, size_t *);
int pthread_attr_setstacksize (pthread_attr_t *, size_t);
-#endif
int pthread_cancel (pthread_t);
/* Macros for cleanup_push and pop;
@@ -135,12 +130,27 @@ int pthread_condattr_init (pthread_condattr_t *);
int pthread_condattr_setclock (pthread_condattr_t *, clockid_t);
int pthread_condattr_setpshared (pthread_condattr_t *, int);
+/* Barriers */
+#if __POSIX_VISIBLE >= 200112
+int pthread_barrierattr_init (pthread_barrierattr_t *);
+int pthread_barrierattr_setpshared (pthread_barrierattr_t *, int);
+int pthread_barrierattr_getpshared (const pthread_barrierattr_t *, int *);
+int pthread_barrierattr_destroy (pthread_barrierattr_t *);
+int pthread_barrier_init (pthread_barrier_t *,
+ const pthread_barrierattr_t *, unsigned);
+int pthread_barrier_destroy (pthread_barrier_t *);
+int pthread_barrier_wait (pthread_barrier_t *);
+#endif
+
+/* Threads */
int pthread_create (pthread_t *, const pthread_attr_t *,
void *(*)(void *), void *);
int pthread_detach (pthread_t);
int pthread_equal (pthread_t, pthread_t);
-void pthread_exit (void *) __attribute__ ((noreturn));
+void pthread_exit (void *) __attribute__ ((__noreturn__));
+#if __POSIX_VISIBLE >= 200112
int pthread_getcpuclockid (pthread_t, clockid_t *);
+#endif
int pthread_getschedparam (pthread_t, int *, struct sched_param *);
void *pthread_getspecific (pthread_key_t);
int pthread_join (pthread_t, void **);
@@ -167,13 +177,16 @@ int pthread_mutexattr_setpshared (pthread_mutexattr_t *, int);
int pthread_mutexattr_settype (pthread_mutexattr_t *, int);
/* Spinlocks */
+#if __POSIX_VISIBLE >= 200112
int pthread_spin_destroy (pthread_spinlock_t *);
int pthread_spin_init (pthread_spinlock_t *, int);
int pthread_spin_lock (pthread_spinlock_t *);
int pthread_spin_trylock (pthread_spinlock_t *);
int pthread_spin_unlock (pthread_spinlock_t *);
+#endif
/* RW Locks */
+#if __XSI_VISIBLE >= 500 || __POSIX_VISIBLE >= 200112
int pthread_rwlock_destroy (pthread_rwlock_t *rwlock);
int pthread_rwlock_init (pthread_rwlock_t *rwlock, const pthread_rwlockattr_t *attr);
int pthread_rwlock_rdlock (pthread_rwlock_t *rwlock);
@@ -186,12 +199,15 @@ int pthread_rwlockattr_getpshared (const pthread_rwlockattr_t *attr,
int *pshared);
int pthread_rwlockattr_setpshared (pthread_rwlockattr_t *attr, int pshared);
int pthread_rwlockattr_destroy (pthread_rwlockattr_t *rwlockattr);
+#endif
int pthread_once (pthread_once_t *, void (*)(void));
+#if __XSI_VISIBLE >= 500
/* Concurrency levels - X/Open interface */
int pthread_getconcurrency (void);
int pthread_setconcurrency (int);
+#endif
pthread_t pthread_self (void);
@@ -204,11 +220,15 @@ void pthread_testcancel (void);
/* Non posix calls */
+#if __GNU_VISIBLE
int pthread_getattr_np (pthread_t, pthread_attr_t *);
int pthread_sigqueue (pthread_t *, int, const union sigval);
+int pthread_yield (void);
+#endif
+#if __MISC_VISIBLE /* HP-UX, others? */
int pthread_suspend (pthread_t);
int pthread_continue (pthread_t);
-int pthread_yield (void);
+#endif
#ifdef __cplusplus
}
diff --git a/winsup/cygwin/include/resolv.h b/winsup/cygwin/include/resolv.h
index 6cafcaaca..6cafcaaca 100755..100644
--- a/winsup/cygwin/include/resolv.h
+++ b/winsup/cygwin/include/resolv.h
diff --git a/winsup/cygwin/include/semaphore.h b/winsup/cygwin/include/semaphore.h
index b16d13751..89a43fff2 100644
--- a/winsup/cygwin/include/semaphore.h
+++ b/winsup/cygwin/include/semaphore.h
@@ -1,7 +1,5 @@
/* semaphore.h: POSIX semaphore interface
- Copyright 2001, 2003, 2007 Red Hat, Inc.
-
Written by Robert Collins <rbtcollins@hotmail.com>
This file is part of Cygwin.
diff --git a/winsup/cygwin/include/stdint.h b/winsup/cygwin/include/stdint.h
deleted file mode 100644
index b670884a7..000000000
--- a/winsup/cygwin/include/stdint.h
+++ /dev/null
@@ -1,290 +0,0 @@
-/* stdint.h - integer types
-
- Copyright 2003, 2005, 2006, 2007, 2008, 2009, 2010, 2012 Red Hat, Inc.
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-#ifndef _STDINT_H
-#define _STDINT_H
-
-#include <bits/wordsize.h>
-
-/* Exact-width integer types */
-
-#ifndef __int8_t_defined
-#define __int8_t_defined
-typedef signed char int8_t;
-typedef short int16_t;
-typedef int int32_t;
-#if __WORDSIZE == 64
-typedef long int64_t;
-#else
-typedef long long int64_t;
-#endif
-#endif
-
-typedef unsigned char uint8_t;
-typedef unsigned short uint16_t;
-#ifndef __uint32_t_defined
-#define __uint32_t_defined
-typedef unsigned int uint32_t;
-#endif
-#if __WORDSIZE == 64
-typedef unsigned long uint64_t;
-#else
-typedef unsigned long long uint64_t;
-#endif
-
-/* Minimum-width integer types */
-
-typedef signed char int_least8_t;
-typedef short int_least16_t;
-typedef int int_least32_t;
-#if __WORDSIZE == 64
-typedef long int_least64_t;
-#else
-typedef long long int_least64_t;
-#endif
-
-typedef unsigned char uint_least8_t;
-typedef unsigned short uint_least16_t;
-typedef unsigned int uint_least32_t;
-#if __WORDSIZE == 64
-typedef unsigned long uint_least64_t;
-#else
-typedef unsigned long long uint_least64_t;
-#endif
-
-/* Fastest minimum-width integer types */
-
-typedef signed char int_fast8_t;
-#if __WORDSIZE == 64
-typedef long int_fast16_t;
-typedef long int_fast32_t;
-typedef long int_fast64_t;
-#else
-typedef int int_fast16_t;
-typedef int int_fast32_t;
-typedef long long int_fast64_t;
-#endif
-
-typedef unsigned char uint_fast8_t;
-#if __WORDSIZE == 64
-typedef unsigned long uint_fast16_t;
-typedef unsigned long uint_fast32_t;
-typedef unsigned long uint_fast64_t;
-#else
-typedef unsigned int uint_fast16_t;
-typedef unsigned int uint_fast32_t;
-typedef unsigned long long uint_fast64_t;
-#endif
-
-/* Integer types capable of holding object pointers */
-
-#ifndef __intptr_t_defined
-#define __intptr_t_defined
-#if __WORDSIZE == 64
-typedef long intptr_t;
-#else
-typedef int intptr_t;
-#endif
-#endif
-#if __WORDSIZE == 64
-typedef unsigned long uintptr_t;
-#else
-typedef unsigned int uintptr_t;
-#endif
-
-/* Greatest-width integer types */
-
-#if __WORDSIZE == 64
-typedef long intmax_t;
-typedef unsigned long uintmax_t;
-#else
-typedef long long intmax_t;
-typedef unsigned long long uintmax_t;
-#endif
-
-/* C99 requires that in C++ the following macros should be defined only
- if requested. */
-#if !defined (__cplusplus) || defined (__STDC_LIMIT_MACROS) \
- || defined (__INSIDE_CYGWIN__)
-
-#if __x86_64__
-# define __I64(n) n ## L
-# define __U64(n) n ## UL
-#else
-# define __I64(n) n ## LL
-# define __U64(n) n ## ULL
-#endif
-
-/* Limits of exact-width integer types */
-
-#define INT8_MIN (-128)
-#define INT16_MIN (-32768)
-#define INT32_MIN (-2147483647 - 1)
-#define INT64_MIN (-__I64(9223372036854775807) - 1)
-
-#define INT8_MAX (127)
-#define INT16_MAX (32767)
-#define INT32_MAX (2147483647)
-#define INT64_MAX (__I64(9223372036854775807))
-
-#define UINT8_MAX (255)
-#define UINT16_MAX (65535)
-#define UINT32_MAX (4294967295U)
-#define UINT64_MAX (__U64(18446744073709551615))
-
-/* Limits of minimum-width integer types */
-
-#define INT_LEAST8_MIN (-128)
-#define INT_LEAST16_MIN (-32768)
-#define INT_LEAST32_MIN (-2147483647 - 1)
-#define INT_LEAST64_MIN (-__I64(9223372036854775807) - 1)
-
-#define INT_LEAST8_MAX (127)
-#define INT_LEAST16_MAX (32767)
-#define INT_LEAST32_MAX (2147483647)
-#define INT_LEAST64_MAX (__I64(9223372036854775807))
-
-#define UINT_LEAST8_MAX (255)
-#define UINT_LEAST16_MAX (65535)
-#define UINT_LEAST32_MAX (4294967295U)
-#define UINT_LEAST64_MAX (__U64(18446744073709551615))
-
-/* Limits of fastest minimum-width integer types */
-
-#define INT_FAST8_MIN (-128)
-#if __WORDSIZE == 64
-#define INT_FAST16_MIN (-__I64(9223372036854775807) - 1)
-#define INT_FAST32_MIN (-__I64(9223372036854775807) - 1)
-#else
-#define INT_FAST16_MIN (-2147483647 - 1)
-#define INT_FAST32_MIN (-2147483647 - 1)
-#endif
-#define INT_FAST64_MIN (-__I64(9223372036854775807) - 1)
-
-#define INT_FAST8_MAX (127)
-#if __WORDSIZE == 64
-#define INT_FAST16_MAX (__I64(9223372036854775807))
-#define INT_FAST32_MAX (__I64(9223372036854775807))
-#else
-#define INT_FAST16_MAX (2147483647)
-#define INT_FAST32_MAX (2147483647)
-#endif
-#define INT_FAST64_MAX (__I64(9223372036854775807))
-
-#define UINT_FAST8_MAX (255)
-#if __WORDSIZE == 64
-#define UINT_FAST16_MAX (__U64(18446744073709551615))
-#define UINT_FAST32_MAX (__U64(18446744073709551615))
-#else
-#define UINT_FAST16_MAX (4294967295U)
-#define UINT_FAST32_MAX (4294967295U)
-#endif
-#define UINT_FAST64_MAX (__U64(18446744073709551615))
-
-/* Limits of integer types capable of holding object pointers */
-
-#if __WORDSIZE == 64
-#define INTPTR_MIN (-__I64(9223372036854775807) - 1)
-#define INTPTR_MAX (__I64(9223372036854775807))
-#define UINTPTR_MAX (__U64(18446744073709551615))
-#else
-#define INTPTR_MIN (-2147483647 - 1)
-#define INTPTR_MAX (2147483647)
-#define UINTPTR_MAX (4294967295U)
-#endif
-
-/* Limits of greatest-width integer types */
-
-#define INTMAX_MIN (-__I64(9223372036854775807) - 1)
-#define INTMAX_MAX (__I64(9223372036854775807))
-#define UINTMAX_MAX (__U64(18446744073709551615))
-
-/* Limits of other integer types */
-
-#ifndef PTRDIFF_MIN
-#if __WORDSIZE == 64
-#define PTRDIFF_MIN (-9223372036854775807L - 1)
-#define PTRDIFF_MAX (9223372036854775807L)
-#else
-#define PTRDIFF_MIN (-2147483647 - 1)
-#define PTRDIFF_MAX (2147483647)
-#endif
-#endif
-
-#ifndef SIG_ATOMIC_MIN
-#define SIG_ATOMIC_MIN (-2147483647 - 1)
-#endif
-#ifndef SIG_ATOMIC_MAX
-#define SIG_ATOMIC_MAX (2147483647)
-#endif
-
-#ifndef SIZE_MAX
-#if __WORDSIZE == 64
-#define SIZE_MAX (18446744073709551615UL)
-#else
-#define SIZE_MAX (4294967295U)
-#endif
-#endif
-
-#ifndef WCHAR_MIN
-#ifdef __WCHAR_MIN__
-#define WCHAR_MIN __WCHAR_MIN__
-#define WCHAR_MAX __WCHAR_MAX__
-#else
-#define WCHAR_MIN (0)
-#define WCHAR_MAX (65535)
-#endif
-#endif
-
-#ifndef WINT_MIN
-#define WINT_MIN 0U
-#define WINT_MAX (4294967295U)
-#endif
-
-#endif /* !__cplusplus || __STDC_LIMIT_MACROS || __INSIDE_CYGWIN__ */
-
-/* C99 requires that in C++ the following macros should be defined only
- if requested. */
-#if !defined (__cplusplus) || defined (__STDC_CONSTANT_MACROS) \
- || defined (__INSIDE_CYGWIN__)
-
-/* Macros for minimum-width integer constant expressions */
-
-#define INT8_C(x) x
-#define INT16_C(x) x
-#define INT32_C(x) x
-#if __WORDSIZE == 64
-#define INT64_C(x) x ## L
-#else
-#define INT64_C(x) x ## LL
-#endif
-
-#define UINT8_C(x) x
-#define UINT16_C(x) x
-#define UINT32_C(x) x ## U
-#if __WORDSIZE == 64
-#define UINT64_C(x) x ## UL
-#else
-#define UINT64_C(x) x ## ULL
-#endif
-
-/* Macros for greatest-width integer constant expressions */
-
-#if __WORDSIZE == 64
-#define INTMAX_C(x) x ## L
-#define UINTMAX_C(x) x ## UL
-#else
-#define INTMAX_C(x) x ## LL
-#define UINTMAX_C(x) x ## ULL
-#endif
-
-#endif /* !__cplusplus || __STDC_CONSTANT_MACROS || __INSIDE_CYGWIN__ */
-
-#endif /* _STDINT_H */
diff --git a/winsup/cygwin/include/sys/acl.h b/winsup/cygwin/include/sys/acl.h
index 89c38bc0f..74e50ba9e 100644
--- a/winsup/cygwin/include/sys/acl.h
+++ b/winsup/cygwin/include/sys/acl.h
@@ -1,6 +1,4 @@
/* sys/acl.h header file for Cygwin.
-
- Copyright 1999, 2000, 2001 Red Hat, Inc.
Written by C. Vinschen.
This file is part of Cygwin.
@@ -12,6 +10,89 @@ details. */
#ifndef _SYS_ACL_H
#define _SYS_ACL_H
-#include <cygwin/acl.h>
+#include <_ansi.h>
+
+#include <sys/types.h>
+#include <sys/stat.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/* POSIX ACL types and functions. The implementation is based on the
+ internal original Solaris implementation as defined in cygwin/acl.h.
+ However, we don't include cygwin/acl.h from here to avoid poisoning
+ the namespace. */
+
+/* acl_perm_t constants */
+#define ACL_READ (0x4)
+#define ACL_WRITE (0x2)
+#define ACL_EXECUTE (0x1)
+
+/* acl_tag_t constants, in sync with values from cygwin/acl.h */
+#define ACL_UNDEFINED_TAG (0x0000)
+#define ACL_USER_OBJ (0x0001)
+#define ACL_USER (0x0002)
+#define ACL_GROUP_OBJ (0x0004)
+#define ACL_GROUP (0x0008)
+#define ACL_MASK (0x0010)
+#define ACL_OTHER (0x0020)
+
+/* acl_type_t constants */
+#define ACL_TYPE_ACCESS (0x0)
+#define ACL_TYPE_DEFAULT (0x1)
+
+/* qualifier constant */
+#define ACL_UNDEFINED_ID ((id_t) -1)
+
+/* entry_id constants */
+#define ACL_FIRST_ENTRY (0x0)
+#define ACL_NEXT_ENTRY (0x1)
+
+/* types */
+typedef uint32_t acl_perm_t, acl_type_t, acl_tag_t;
+typedef uint64_t acl_permset_t;
+typedef uint64_t acl_entry_t;
+
+struct __acl_t;
+typedef struct __acl_t *acl_t;
+
+extern int acl_add_perm (acl_permset_t __permset_d, acl_perm_t __perm);
+extern int acl_calc_mask (acl_t *__acl_p);
+extern int acl_clear_perms (acl_permset_t __permset_d);
+extern int acl_copy_entry (acl_entry_t __dest_d, acl_entry_t __src_d);
+extern ssize_t acl_copy_ext (void *__buf_p, acl_t __acl, ssize_t __size);
+extern acl_t acl_copy_int (const void *__buf_p);
+extern int acl_create_entry (acl_t *__acl_p, acl_entry_t *__entry_p);
+extern int acl_delete_def_file (const char *__path_p);
+extern int acl_delete_entry (acl_t __acl, acl_entry_t __entry_d);
+extern int acl_delete_perm (acl_permset_t __permset_d, acl_perm_t __perm);
+extern acl_t acl_dup (acl_t __acl);
+extern int acl_free (void *__obj_p);
+extern acl_t acl_from_text (const char *__buf_p);
+extern int acl_get_entry (acl_t __acl, int __entry_id,
+ acl_entry_t *__entry_p);
+extern acl_t acl_get_fd (int __fd);
+extern acl_t acl_get_file (const char *__path_p, acl_type_t __type);
+extern int acl_get_permset (acl_entry_t __entry_d,
+ acl_permset_t *__permset_p);
+extern void *acl_get_qualifier (acl_entry_t __entry_d);
+extern int acl_get_tag_type (acl_entry_t __entry_d,
+ acl_tag_t *__tag_type_p);
+extern acl_t acl_init (int __count);
+extern int acl_set_fd (int __fd, acl_t __acl);
+extern int acl_set_file (const char *__path_p, acl_type_t __type,
+ acl_t __acl);
+extern int acl_set_permset (acl_entry_t __entry_d,
+ acl_permset_t __permset_d);
+extern int acl_set_qualifier (acl_entry_t __entry_d,
+ const void *__tag_qualifier_p);
+extern int acl_set_tag_type (acl_entry_t __entry_d, acl_tag_t __tag_type);
+extern ssize_t acl_size (acl_t __acl);
+extern char *acl_to_text (acl_t __acl, ssize_t *__len_p);
+extern int acl_valid (acl_t __acl);
+#ifdef __cplusplus
+}
+#endif
#endif /* _SYS_ACL_H */
diff --git a/winsup/cygwin/include/sys/cygwin.h b/winsup/cygwin/include/sys/cygwin.h
index ca2f92996..5990e469a 100644
--- a/winsup/cygwin/include/sys/cygwin.h
+++ b/winsup/cygwin/include/sys/cygwin.h
@@ -1,7 +1,5 @@
-/* sys/cygwin.h
- Copyright 1997, 1998, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008,
- 2009, 2010, 2011, 2012, 2013 Red Hat, Inc.
+/* sys/cygwin.h
This file is part of Cygwin.
@@ -26,21 +24,21 @@ extern "C" {
/* DEPRECATED INTERFACES. These are restricted to MAX_PATH length.
Don't use in modern applications. They don't exist on x86_64. */
extern int cygwin_win32_to_posix_path_list (const char *, char *)
- __attribute__ ((deprecated));
+ __attribute__ ((__deprecated__));
extern int cygwin_win32_to_posix_path_list_buf_size (const char *)
- __attribute__ ((deprecated));
+ __attribute__ ((__deprecated__));
extern int cygwin_posix_to_win32_path_list (const char *, char *)
- __attribute__ ((deprecated));
+ __attribute__ ((__deprecated__));
extern int cygwin_posix_to_win32_path_list_buf_size (const char *)
- __attribute__ ((deprecated));
+ __attribute__ ((__deprecated__));
extern int cygwin_conv_to_win32_path (const char *, char *)
- __attribute__ ((deprecated));
+ __attribute__ ((__deprecated__));
extern int cygwin_conv_to_full_win32_path (const char *, char *)
- __attribute__ ((deprecated));
+ __attribute__ ((__deprecated__));
extern int cygwin_conv_to_posix_path (const char *, char *)
- __attribute__ ((deprecated));
+ __attribute__ ((__deprecated__));
extern int cygwin_conv_to_full_posix_path (const char *, char *)
- __attribute__ ((deprecated));
+ __attribute__ ((__deprecated__));
#endif /* !__x86_64__ */
/* Use these interfaces in favor of the above. */
@@ -56,8 +54,12 @@ enum
CCP_CONVTYPE_MASK = 3,
/* Or these values to the above as needed. */
- CCP_ABSOLUTE = 0, /* Request absolute path (default). */
- CCP_RELATIVE = 0x100 /* Request to keep path relative. */
+ CCP_ABSOLUTE = 0, /* Request absolute path (default). */
+ CCP_RELATIVE = 0x100, /* Request to keep path relative. */
+ CCP_PROC_CYGDRIVE = 0x200, /* Request to return /proc/cygdrive
+ path (only with CCP_*_TO_POSIX). */
+
+ CCP_CONVFLAGS_MASK = 0x300,
};
typedef unsigned int cygwin_conv_path_t;
@@ -143,7 +145,19 @@ typedef enum
CW_CVT_ENV_TO_WINENV,
CW_ALLOC_DRIVE_MAP,
CW_MAP_DRIVE_MAP,
- CW_FREE_DRIVE_MAP
+ CW_FREE_DRIVE_MAP,
+ CW_SETENT,
+ CW_GETENT,
+ CW_ENDENT,
+ CW_GETNSSSEP,
+ CW_GETPWSID,
+ CW_GETGRSID,
+ CW_CYGNAME_FROM_WINNAME,
+ CW_FIXED_ATEXIT,
+ CW_GETNSS_PWD_SRC,
+ CW_GETNSS_GRP_SRC,
+ CW_EXCEPTION_RECORD_FROM_SIGINFO_T,
+ CW_CYGHEAP_PROFTHR_ALL,
} cygwin_getinfo_types;
#define CW_LOCK_PINFO CW_LOCK_PINFO
@@ -194,12 +208,45 @@ typedef enum
#define CW_ALLOC_DRIVE_MAP CW_ALLOC_DRIVE_MAP
#define CW_MAP_DRIVE_MAP CW_MAP_DRIVE_MAP
#define CW_FREE_DRIVE_MAP CW_FREE_DRIVE_MAP
+#define CW_SETENT CW_SETENT
+#define CW_GETENT CW_GETENT
+#define CW_ENDENT CW_ENDENT
+#define CW_GETNSSSEP CW_GETNSSSEP
+#define CW_GETPWSID CW_GETPWSID
+#define CW_GETGRSID CW_GETGRSID
+#define CW_CYGNAME_FROM_WINNAME CW_CYGNAME_FROM_WINNAME
+#define CW_FIXED_ATEXIT CW_FIXED_ATEXIT
+#define CW_GETNSS_PWD_SRC CW_GETNSS_PWD_SRC
+#define CW_GETNSS_GRP_SRC CW_GETNSS_GRP_SRC
+#define CW_EXCEPTION_RECORD_FROM_SIGINFO_T CW_EXCEPTION_RECORD_FROM_SIGINFO_T
+#define CW_CYGHEAP_PROFTHR_ALL CW_CYGHEAP_PROFTHR_ALL
/* Token type for CW_SET_EXTERNAL_TOKEN */
enum
{
-CW_TOKEN_IMPERSONATION = 0,
-CW_TOKEN_RESTRICTED = 1
+ CW_TOKEN_IMPERSONATION = 0,
+ CW_TOKEN_RESTRICTED = 1
+};
+
+/* Source type for CW_GETNSS_PWD_SRC and CW_GETNSS_GRP_SRC. */
+enum
+{
+ NSS_SRC_FILES = 1,
+ NSS_SRC_DB = 2
+};
+
+/* Enumeration source constants for CW_SETENT called from mkpasswd/mkgroup. */
+enum nss_enum_t
+{
+ ENUM_NONE = 0x00,
+ ENUM_CACHE = 0x01,
+ ENUM_FILES = 0x02,
+ ENUM_BUILTIN = 0x04,
+ ENUM_LOCAL = 0x08,
+ ENUM_PRIMARY = 0x10,
+ ENUM_TDOMS = 0x20,
+ ENUM_TDOMS_ALL = 0x40,
+ ENUM_ALL = 0x7f
};
#define CW_NEXTPID 0x80000000 /* or with pid to get next one */
@@ -220,7 +267,7 @@ enum
PID_MYSELF = 0x00200, /* Flag that pid is me. */
PID_NOCLDSTOP = 0x00400, /* Set if no SIGCHLD signal on stop. */
PID_INITIALIZING = 0x00800, /* Set until ready to receive signals. */
- PID_UNUSED1 = 0x01000, /* Available. */
+ PID_NEW = 0x01000, /* Available. */
PID_ALLPIDS = 0x02000, /* used by pinfo scanner */
PID_EXECED = 0x04000, /* redirect to original pid info block */
PID_NOREDIR = 0x08000, /* don't redirect if execed */
@@ -347,11 +394,9 @@ extern void cygwin_premain3 (int, char **, struct per_process *);
#define EXTERNAL_PINFO_VERSION_32_LP 2
#define EXTERNAL_PINFO_VERSION EXTERNAL_PINFO_VERSION_32_LP
-#ifndef __uid_t_defined
+#ifndef __INSIDE_CYGWIN__
typedef __uint16_t __uid16_t;
typedef __uint16_t __gid16_t;
-typedef __uint32_t uid_t;
-typedef __uint32_t gid_t;
#endif
struct external_pinfo
diff --git a/winsup/cygwin/include/sys/dirent.h b/winsup/cygwin/include/sys/dirent.h
index 027fa8f73..771f71620 100644
--- a/winsup/cygwin/include/sys/dirent.h
+++ b/winsup/cygwin/include/sys/dirent.h
@@ -1,8 +1,5 @@
/* Posix dirent.h for WIN32.
- Copyright 2001, 2002, 2003, 2005, 2006, 2007, 2008, 2010, 2012,
- 2013 Red Hat, Inc.
-
This software is a copyrighted work licensed under the terms of the
Cygwin license. Please consult the file "CYGWIN_LICENSE" for
details. */
@@ -12,6 +9,7 @@
#ifndef _SYS_DIRENT_H
#define _SYS_DIRENT_H
+#include <sys/cdefs.h>
#include <sys/types.h>
#include <limits.h>
@@ -65,28 +63,35 @@ typedef struct __DIR
DIR *opendir (const char *);
DIR *fdopendir (int);
struct dirent *readdir (DIR *);
-int readdir_r (DIR *, struct dirent *, struct dirent **);
+int readdir_r (DIR * __restrict, struct dirent * __restrict,
+ struct dirent ** __restrict);
void rewinddir (DIR *);
int closedir (DIR *);
int dirfd (DIR *);
-#ifndef _POSIX_SOURCE
+#if __MISC_VISIBLE || __XSI_VISIBLE
#ifndef __INSIDE_CYGWIN__
long telldir (DIR *);
void seekdir (DIR *, long loc);
#endif
+#endif
+#if __MISC_VISIBLE || __POSIX_VISIBLE >= 200809
int scandir (const char *__dir,
struct dirent ***__namelist,
int (*select) (const struct dirent *),
int (*compar) (const struct dirent **, const struct dirent **));
+int alphasort (const struct dirent **__a, const struct dirent **__b);
+#endif
+#if __GNU_VISIBLE
int scandirat (int __dirfd, const char *__dir, struct dirent ***__namelist,
int (*select) (const struct dirent *),
int (*compar) (const struct dirent **, const struct dirent **));
+#endif
-int alphasort (const struct dirent **__a, const struct dirent **__b);
+#if __BSD_VISIBLE
#ifdef _DIRENT_HAVE_D_TYPE
/* File types for `d_type'. */
enum
@@ -115,5 +120,5 @@ enum
# define IFTODT(mode) (((mode) & 0170000) >> 12)
# define DTTOIF(dirtype) ((dirtype) << 12)
#endif /* _DIRENT_HAVE_D_TYPE */
-#endif /* _POSIX_SOURCE */
+#endif /* __BSD_VISIBLE */
#endif /*_SYS_DIRENT_H*/
diff --git a/winsup/cygwin/include/sys/file.h b/winsup/cygwin/include/sys/file.h
index af07df4cf..6dabeb70c 100644
--- a/winsup/cygwin/include/sys/file.h
+++ b/winsup/cygwin/include/sys/file.h
@@ -23,7 +23,6 @@
#ifndef _FILE_H_
#define _FILE_H_
-#include <sys/cdefs.h>
#include <fcntl.h>
/* Whence values for lseek(); renamed by POSIX 1003.1 */
@@ -32,23 +31,25 @@
#define L_INCR SEEK_CUR
#define L_XTND SEEK_END
-/* Operations for flock() function */
-#define LOCK_SH 1 /* Shared lock. */
-#define LOCK_EX 2 /* Exclusive lock. */
-#define LOCK_NB 4 /* Don't block when locking. */
-#define LOCK_UN 8 /* Unlock. */
+/* Including <sys/file.h> always defines flock & macros. */
+#if __BSD_VISIBLE - 0 == 0
-/* Operations for access function */
-#define F_OK 0 /* does file exist */
-#define X_OK 1 /* is it executable or searchable by caller */
-#define W_OK 2 /* is it writable by caller */
-#define R_OK 4 /* is it readable by caller */
+#define LOCK_SH 0x01 /* shared file lock */
+#define LOCK_EX 0x02 /* exclusive file lock */
+#define LOCK_NB 0x04 /* don't block when locking */
+#define LOCK_UN 0x08 /* unlock file */
-/* Apply or remove an advisory lock on the file fd refers to. */
-__BEGIN_DECLS
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+extern int flock _PARAMS ((int, int));
-int _EXFUN(flock, (int, int));
+#ifdef __cplusplus
+}
+#endif
-__END_DECLS
+#endif
#endif
diff --git a/winsup/cygwin/include/sys/ioctl.h b/winsup/cygwin/include/sys/ioctl.h
index 9c0c08157..4c7121471 100644
--- a/winsup/cygwin/include/sys/ioctl.h
+++ b/winsup/cygwin/include/sys/ioctl.h
@@ -1,7 +1,5 @@
/* sys/ioctl.h
- Copyright 1998, 2000, 2001, 2002, 2003, 2004, 2005, 2006 Red Hat, Inc.
-
This file is part of Cygwin.
This software is a copyrighted work licensed under the terms of the
diff --git a/winsup/cygwin/include/sys/ipc.h b/winsup/cygwin/include/sys/ipc.h
index 9a4095733..eaca63976 100644
--- a/winsup/cygwin/include/sys/ipc.h
+++ b/winsup/cygwin/include/sys/ipc.h
@@ -1,7 +1,5 @@
/* sys/ipc.h
- Copyright 2001, 2002, 2003 Red Hat, Inc.
-
This file is part of Cygwin.
This software is a copyrighted work licensed under the terms of the
diff --git a/winsup/cygwin/include/sys/kd.h b/winsup/cygwin/include/sys/kd.h
index 5900efdd7..c5de20151 100644
--- a/winsup/cygwin/include/sys/kd.h
+++ b/winsup/cygwin/include/sys/kd.h
@@ -1,7 +1,5 @@
/* sys/kd.h
- Copyright 2006 Red Hat, Inc.
-
Written by Kazuhiro Fujieda <fujieda@jaist.ac.jp>
This file is part of Cygwin.
diff --git a/winsup/cygwin/include/sys/lock.h b/winsup/cygwin/include/sys/lock.h
index cf4d17846..85c398eed 100644
--- a/winsup/cygwin/include/sys/lock.h
+++ b/winsup/cygwin/include/sys/lock.h
@@ -1,7 +1,5 @@
/* sys/lock.h
- Copyright 2004, 2005 Red Hat, Inc.
-
This file is part of Cygwin.
This software is a copyrighted work licensed under the terms of the
diff --git a/winsup/cygwin/include/sys/mman.h b/winsup/cygwin/include/sys/mman.h
index 6942c2ad8..35fa9e9d2 100644
--- a/winsup/cygwin/include/sys/mman.h
+++ b/winsup/cygwin/include/sys/mman.h
@@ -1,7 +1,5 @@
/* sys/mman.h
- Copyright 1996, 1997, 1998, 2000, 2001, 2003, 2005, 2007, 2011 Red Hat, Inc.
-
This file is part of Cygwin.
This software is a copyrighted work licensed under the terms of the
diff --git a/winsup/cygwin/include/sys/mount.h b/winsup/cygwin/include/sys/mount.h
index 0f5c17240..bdc7f30ab 100644
--- a/winsup/cygwin/include/sys/mount.h
+++ b/winsup/cygwin/include/sys/mount.h
@@ -1,8 +1,5 @@
/* sys/mount.h
- Copyright 1998, 1999, 2000, 2001, 2002, 2003, 2005, 2008, 2009, 2010, 2012
- Red Hat, Inc.
-
This file is part of Cygwin.
This software is a copyrighted work licensed under the terms of the
@@ -12,6 +9,9 @@ details. */
#ifndef _SYS_MOUNT_H
#define _SYS_MOUNT_H
+#define BLOCK_SIZE 1024
+#define BLOCK_SIZE_BITS 10
+
#ifdef __cplusplus
extern "C" {
#endif
@@ -41,7 +41,8 @@ enum
MOUNT_DOS = 0x40000, /* convert leading spaces and trailing
dots and spaces to private use area */
MOUNT_IHASH = 0x80000, /* Enforce hash values for inode numbers */
- MOUNT_BIND = 0x100000 /* Allows bind syntax in fstab file. */
+ MOUNT_BIND = 0x100000, /* Allows bind syntax in fstab file. */
+ MOUNT_USER_TEMP = 0x200000 /* Mount the user's $TMP. */
};
int mount (const char *, const char *, unsigned __flags);
diff --git a/winsup/cygwin/include/sys/msg.h b/winsup/cygwin/include/sys/msg.h
index bbcc56ec5..b302e4009 100644
--- a/winsup/cygwin/include/sys/msg.h
+++ b/winsup/cygwin/include/sys/msg.h
@@ -1,7 +1,5 @@
/* sys/msg.h
- Copyright 2002, 2003 Red Hat, Inc.
-
This file is part of Cygwin.
This software is a copyrighted work licensed under the terms of the
diff --git a/winsup/cygwin/include/sys/mtio.h b/winsup/cygwin/include/sys/mtio.h
index 2bd4632e9..729a89f09 100644
--- a/winsup/cygwin/include/sys/mtio.h
+++ b/winsup/cygwin/include/sys/mtio.h
@@ -1,7 +1,5 @@
/* sys/mtio.h
- Copyright 1999, 2000, 2001 Red Hat, Inc.
-
This file is part of Cygwin.
This software is a copyrighted work licensed under the terms of the
diff --git a/winsup/cygwin/include/sys/poll.h b/winsup/cygwin/include/sys/poll.h
index 1a3a95b75..822827825 100644
--- a/winsup/cygwin/include/sys/poll.h
+++ b/winsup/cygwin/include/sys/poll.h
@@ -1,7 +1,5 @@
/* sys/poll.h
- Copyright 2000, 2001, 2006, 2011 Red Hat, Inc.
-
This file is part of Cygwin.
This software is a copyrighted work licensed under the terms of the
diff --git a/winsup/cygwin/include/sys/procfs.h b/winsup/cygwin/include/sys/procfs.h
index 78485f678..4f42334d6 100644
--- a/winsup/cygwin/include/sys/procfs.h
+++ b/winsup/cygwin/include/sys/procfs.h
@@ -1,7 +1,5 @@
/* sys/procfs.h
- Copyright 2000, 2001 Red Hat, Inc.
-
This file is part of Cygwin.
This software is a copyrighted work licensed under the terms of the
diff --git a/winsup/cygwin/include/sys/quota.h b/winsup/cygwin/include/sys/quota.h
new file mode 100644
index 000000000..7edb53e8a
--- /dev/null
+++ b/winsup/cygwin/include/sys/quota.h
@@ -0,0 +1,239 @@
+/* Copyright (c) 1982, 1986 Regents of the University of California.
+ * All rights reserved.
+ *
+ * This code is derived from software contributed to Berkeley by
+ * Robert Elz at The University of Melbourne.
+ *
+ * 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.
+ * 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.
+ */
+
+#ifndef _SYS_QUOTA_H
+#define _SYS_QUOTA_H 1
+
+#include <features.h>
+#include <sys/types.h>
+
+/* This file is copied from Linux and kept verbatim, except for the below
+ Cygwin-specific blocks. */
+
+#ifdef __CYGWIN__
+/* On Linux these defines live in <linux/quota.h>. Move them here for easier
+ access. */
+/* Quota format type IDs */
+#define QFMT_VFS_OLD 1
+#define QFMT_VFS_V0 2
+#define QFMT_OCFS2 3
+#define QFMT_VFS_V1 4
+#endif
+
+/*
+ * Select between different incompatible quota versions.
+ * Default to the version used by Linux kernel version 2.4.22
+ * or later. */
+#ifndef _LINUX_QUOTA_VERSION
+# define _LINUX_QUOTA_VERSION 2
+#endif
+
+#if defined (__CYGWIN__) && _LINUX_QUOTA_VERSION != 2
+#error Cygwin only supports quota version 2.
+#endif
+
+/*
+ * Convert diskblocks to blocks and the other way around.
+ * currently only to fool the BSD source. :-)
+ */
+#define dbtob(num) ((num) << 10)
+#define btodb(num) ((num) >> 10)
+
+/*
+ * Convert count of filesystem blocks to diskquota blocks, meant
+ * for filesystems where i_blksize != BLOCK_SIZE
+ */
+#define fs_to_dq_blocks(num, blksize) (((num) * (blksize)) / BLOCK_SIZE)
+
+/*
+ * Definitions for disk quotas imposed on the average user
+ * (big brother finally hits Linux).
+ *
+ * The following constants define the amount of time given a user
+ * before the soft limits are treated as hard limits (usually resulting
+ * in an allocation failure). The timer is started when the user crosses
+ * their soft limit, it is reset when they go below their soft limit.
+ */
+#define MAX_IQ_TIME 604800 /* (7*24*60*60) 1 week */
+#define MAX_DQ_TIME 604800 /* (7*24*60*60) 1 week */
+
+#define MAXQUOTAS 2
+#define USRQUOTA 0 /* element used for user quotas */
+#define GRPQUOTA 1 /* element used for group quotas */
+
+/*
+ * Definitions for the default names of the quotas files.
+ */
+#define INITQFNAMES { \
+ "user", /* USRQUOTA */ \
+ "group", /* GRPQUOTA */ \
+ "undefined", \
+};
+
+#define QUOTAFILENAME "quota"
+#define QUOTAGROUP "staff"
+
+#define NR_DQHASH 43 /* Just an arbitrary number any suggestions ? */
+#define NR_DQUOTS 256 /* Number of quotas active at one time */
+
+/*
+ * Command definitions for the 'quotactl' system call.
+ * The commands are broken into a main command defined below
+ * and a subcommand that is used to convey the type of
+ * quota that is being manipulated (see above).
+ */
+#define SUBCMDMASK 0x00ff
+#define SUBCMDSHIFT 8
+#define QCMD(cmd, type) (((cmd) << SUBCMDSHIFT) | ((type) & SUBCMDMASK))
+
+#if _LINUX_QUOTA_VERSION < 2
+# define Q_QUOTAON 0x0100 /* enable quotas */
+# define Q_QUOTAOFF 0x0200 /* disable quotas */
+# define Q_GETQUOTA 0x0300 /* get limits and usage */
+# define Q_SETQUOTA 0x0400 /* set limits and usage */
+# define Q_SETUSE 0x0500 /* set usage */
+# define Q_SYNC 0x0600 /* sync disk copy of a filesystems quotas */
+# define Q_SETQLIM 0x0700 /* set limits */
+# define Q_GETSTATS 0x0800 /* get collected stats */
+# define Q_RSQUASH 0x1000 /* set root_squash option */
+#else
+# define Q_SYNC 0x800001 /* sync disk copy of a filesystems quotas */
+# define Q_QUOTAON 0x800002 /* turn quotas on */
+# define Q_QUOTAOFF 0x800003 /* turn quotas off */
+# define Q_GETFMT 0x800004 /* get quota format used on given filesystem */
+# define Q_GETINFO 0x800005 /* get information about quota files */
+# define Q_SETINFO 0x800006 /* set information about quota files */
+# define Q_GETQUOTA 0x800007 /* get user quota structure */
+# define Q_SETQUOTA 0x800008 /* set user quota structure */
+#endif
+
+/*
+ * The following structure defines the format of the disk quota file
+ * (as it appears on disk) - the file is an array of these structures
+ * indexed by user or group number.
+ */
+#if _LINUX_QUOTA_VERSION < 2
+struct dqblk
+ {
+ u_int32_t dqb_bhardlimit; /* absolute limit on disk blks alloc */
+ u_int32_t dqb_bsoftlimit; /* preferred limit on disk blks */
+ u_int32_t dqb_curblocks; /* current block count */
+ u_int32_t dqb_ihardlimit; /* maximum # allocated inodes */
+ u_int32_t dqb_isoftlimit; /* preferred inode limit */
+ u_int32_t dqb_curinodes; /* current # allocated inodes */
+ time_t dqb_btime; /* time limit for excessive disk use */
+ time_t dqb_itime; /* time limit for excessive files */
+ };
+#else
+
+/* Flags that indicate which fields in dqblk structure are valid. */
+#define QIF_BLIMITS 1
+#define QIF_SPACE 2
+#define QIF_ILIMITS 4
+#define QIF_INODES 8
+#define QIF_BTIME 16
+#define QIF_ITIME 32
+#define QIF_LIMITS (QIF_BLIMITS | QIF_ILIMITS)
+#define QIF_USAGE (QIF_SPACE | QIF_INODES)
+#define QIF_TIMES (QIF_BTIME | QIF_ITIME)
+#define QIF_ALL (QIF_LIMITS | QIF_USAGE | QIF_TIMES)
+
+struct dqblk
+ {
+ u_int64_t dqb_bhardlimit; /* absolute limit on disk quota blocks alloc */
+ u_int64_t dqb_bsoftlimit; /* preferred limit on disk quota blocks */
+ u_int64_t dqb_curspace; /* current quota block count */
+ u_int64_t dqb_ihardlimit; /* maximum # allocated inodes */
+ u_int64_t dqb_isoftlimit; /* preferred inode limit */
+ u_int64_t dqb_curinodes; /* current # allocated inodes */
+ u_int64_t dqb_btime; /* time limit for excessive disk use */
+ u_int64_t dqb_itime; /* time limit for excessive files */
+ u_int32_t dqb_valid; /* bitmask of QIF_* constants */
+ };
+#endif
+
+/*
+ * Shorthand notation.
+ */
+#define dq_bhardlimit dq_dqb.dqb_bhardlimit
+#define dq_bsoftlimit dq_dqb.dqb_bsoftlimit
+#if _LINUX_QUOTA_VERSION < 2
+# define dq_curblocks dq_dqb.dqb_curblocks
+#else
+# define dq_curspace dq_dqb.dqb_curspace
+# define dq_valid dq_dqb.dqb_valid
+#endif
+#define dq_ihardlimit dq_dqb.dqb_ihardlimit
+#define dq_isoftlimit dq_dqb.dqb_isoftlimit
+#define dq_curinodes dq_dqb.dqb_curinodes
+#define dq_btime dq_dqb.dqb_btime
+#define dq_itime dq_dqb.dqb_itime
+
+#define dqoff(UID) ((loff_t)((UID) * sizeof (struct dqblk)))
+
+#if _LINUX_QUOTA_VERSION < 2
+struct dqstats
+ {
+ u_int32_t lookups;
+ u_int32_t drops;
+ u_int32_t reads;
+ u_int32_t writes;
+ u_int32_t cache_hits;
+ u_int32_t pages_allocated;
+ u_int32_t allocated_dquots;
+ u_int32_t free_dquots;
+ u_int32_t syncs;
+ };
+#else
+
+/* Flags that indicate which fields in dqinfo structure are valid. */
+# define IIF_BGRACE 1
+# define IIF_IGRACE 2
+# define IIF_FLAGS 4
+# define IIF_ALL (IIF_BGRACE | IIF_IGRACE | IIF_FLAGS)
+
+struct dqinfo
+ {
+ u_int64_t dqi_bgrace;
+ u_int64_t dqi_igrace;
+ u_int32_t dqi_flags;
+ u_int32_t dqi_valid;
+ };
+#endif
+
+__BEGIN_DECLS
+
+extern int quotactl (int __cmd, const char *__special, int __id,
+ caddr_t __addr) __THROW;
+
+__END_DECLS
+
+#endif /* sys/quota.h */
diff --git a/winsup/cygwin/include/sys/resource.h b/winsup/cygwin/include/sys/resource.h
index d9419d150..16dcdcd0a 100644
--- a/winsup/cygwin/include/sys/resource.h
+++ b/winsup/cygwin/include/sys/resource.h
@@ -1,7 +1,5 @@
/* sys/resource.h
- Copyright 1997, 1998, 2000, 2001, 2005 Red Hat, Inc.
-
This file is part of Cygwin.
This software is a copyrighted work licensed under the terms of the
diff --git a/winsup/cygwin/include/sys/select.h b/winsup/cygwin/include/sys/select.h
deleted file mode 100644
index 9cc6c1eca..000000000
--- a/winsup/cygwin/include/sys/select.h
+++ /dev/null
@@ -1,41 +0,0 @@
-/* select.h
- Copyright 1998, 1999, 2000, 2001, 2005, 2009 Red Hat, Inc.
-
- Written by Geoffrey Noer <noer@cygnus.com>
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-#ifndef _SYS_SELECT_H
-#define _SYS_SELECT_H
-
-#if !defined (_POSIX_SOURCE) && !defined (__INSIDE_CYGWIN_NET__) && !defined (__USE_W32_SOCKETS)
-
-#include <sys/cdefs.h>
-
-/* Get fd_set, and macros like FD_SET */
-#include <sys/types.h>
-
-/* Get definition of timeval. */
-#include <sys/time.h>
-#include <time.h>
-
-/* Get definition of sigset_t. */
-#include <signal.h>
-
-__BEGIN_DECLS
-
-int select __P ((int __n, fd_set *__readfds, fd_set *__writefds,
- fd_set *__exceptfds, struct timeval *__timeout));
-int pselect __P ((int __n, fd_set *__readfds, fd_set *__writefds,
- fd_set *__exceptfds, const struct timespec *__timeout,
- const sigset_t *__set));
-
-__END_DECLS
-
-#endif /* !_POSIX_SOURCE, !__INSIDE_CYGWIN_NET__ */
-
-#endif /* sys/select.h */
diff --git a/winsup/cygwin/include/sys/sem.h b/winsup/cygwin/include/sys/sem.h
index 15f46c806..9953533b0 100644
--- a/winsup/cygwin/include/sys/sem.h
+++ b/winsup/cygwin/include/sys/sem.h
@@ -1,7 +1,5 @@
/* sys/sem.h
- Copyright 2002, 2003 Red Hat, Inc.
-
This file is part of Cygwin.
This software is a copyrighted work licensed under the terms of the
diff --git a/winsup/cygwin/include/sys/shm.h b/winsup/cygwin/include/sys/shm.h
index 40cfdcee7..5e3949007 100644
--- a/winsup/cygwin/include/sys/shm.h
+++ b/winsup/cygwin/include/sys/shm.h
@@ -1,7 +1,5 @@
/* sys/shm.h
- Copyright 2001, 2002, 2003 Red Hat, Inc.
-
This file is part of Cygwin.
This software is a copyrighted work licensed under the terms of the
diff --git a/winsup/cygwin/include/sys/smallprint.h b/winsup/cygwin/include/sys/smallprint.h
index 776e3ca22..4c685676e 100644
--- a/winsup/cygwin/include/sys/smallprint.h
+++ b/winsup/cygwin/include/sys/smallprint.h
@@ -1,7 +1,5 @@
/* sys/smallprint.h
- Copyright 1998, 2000, 2001 Red Hat, Inc.
-
This file is part of Cygwin.
This software is a copyrighted work licensed under the terms of the
diff --git a/winsup/cygwin/include/sys/socket.h b/winsup/cygwin/include/sys/socket.h
index 2d66abb26..8bab35b68 100644
--- a/winsup/cygwin/include/sys/socket.h
+++ b/winsup/cygwin/include/sys/socket.h
@@ -1,8 +1,5 @@
/* sys/socket.h
- Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2005, 2006, 2009, 2010,
- 2013 Red Hat, Inc.
-
This file is part of Cygwin.
This software is a copyrighted work licensed under the terms of the
@@ -43,6 +40,7 @@ extern "C"
socklen_t *__optlen);
int shutdown (int, int);
int socket (int __family, int __type, int __protocol);
+ int sockatmark (int __fd);
int socketpair (int __domain, int __type, int __protocol, int *__socket_vec);
struct servent *getservbyname (const char *__name, const char *__proto);
diff --git a/winsup/cygwin/include/sys/statfs.h b/winsup/cygwin/include/sys/statfs.h
index 51ad3c6b1..cc9a8b862 100644
--- a/winsup/cygwin/include/sys/statfs.h
+++ b/winsup/cygwin/include/sys/statfs.h
@@ -1,7 +1,5 @@
/* sys/statfs.h
- Copyright 2002 Red Hat, Inc.
-
This file is part of Cygwin.
This software is a copyrighted work licensed under the terms of the
diff --git a/winsup/cygwin/include/sys/statvfs.h b/winsup/cygwin/include/sys/statvfs.h
index aa86674af..62a989412 100644
--- a/winsup/cygwin/include/sys/statvfs.h
+++ b/winsup/cygwin/include/sys/statvfs.h
@@ -1,7 +1,5 @@
/* sys/statvfs.h
- Copyright 2005 Red Hat, Inc.
-
This file is part of Cygwin.
This software is a copyrighted work licensed under the terms of the
diff --git a/winsup/cygwin/include/sys/stdio.h b/winsup/cygwin/include/sys/stdio.h
index 6664a0b33..ac22a3940 100644
--- a/winsup/cygwin/include/sys/stdio.h
+++ b/winsup/cygwin/include/sys/stdio.h
@@ -1,7 +1,5 @@
/* sys/stdio.h
- Copyright 2004, 2005, 2006, 2007, 2008, 2010 Red Hat, Inc.
-
This file is part of Cygwin.
This software is a copyrighted work licensed under the terms of the
diff --git a/winsup/cygwin/include/sys/strace.h b/winsup/cygwin/include/sys/strace.h
index 164af1e50..3334b0403 100644
--- a/winsup/cygwin/include/sys/strace.h
+++ b/winsup/cygwin/include/sys/strace.h
@@ -1,8 +1,5 @@
/* sys/strace.h
- Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008,
- 2010, 2011, 2012 Red Hat, Inc.
-
This file is part of Cygwin.
This software is a copyrighted work licensed under the terms of the
@@ -40,17 +37,17 @@ class strace
void write (unsigned category, const char *buf, int count);
unsigned char _active;
public:
- void activate (bool) __attribute__ ((regparm (2)));;
+ void activate (bool) __attribute__ ((__regparm__ (2)));;
strace () {}
int microseconds ();
int version;
int lmicrosec;
bool execing;
- void dll_info () __attribute__ ((regparm (1)));
- void prntf (unsigned, const char *func, const char *, ...) /*__attribute__ ((regparm(3)))*/;
- void vprntf (unsigned, const char *func, const char *, va_list ap) /*__attribute__ ((regparm(3)))*/;
- void wm (int message, int word, int lon) __attribute__ ((regparm(3)));
- void write_childpid (pid_t) __attribute__ ((regparm (3)));
+ void dll_info () __attribute__ ((__regparm__ (1)));
+ void prntf (unsigned, const char *func, const char *, ...) /*__attribute__ ((__regparm__(3)))*/;
+ void vprntf (unsigned, const char *func, const char *, va_list ap) /*__attribute__ ((__regparm__(3)))*/;
+ void wm (int message, int word, int lon) __attribute__ ((__regparm__(3)));
+ void write_childpid (pid_t) __attribute__ ((__regparm__ (3)));
bool attached () const {return _active == 3;}
bool active () const {return _active & 1;}
unsigned char& active_val () {return _active;}
diff --git a/winsup/cygwin/include/sys/sysinfo.h b/winsup/cygwin/include/sys/sysinfo.h
index 32fa05bd1..b0f8590fc 100644
--- a/winsup/cygwin/include/sys/sysinfo.h
+++ b/winsup/cygwin/include/sys/sysinfo.h
@@ -1,7 +1,5 @@
/* sys/sysinfo.h
- Copyright 2009, 2011, 2013 Red Hat, Inc.
-
This file is part of Cygwin.
This software is a copyrighted work licensed under the terms of the
diff --git a/winsup/cygwin/include/sys/syslimits.h b/winsup/cygwin/include/sys/syslimits.h
index b501de81e..ff14e76cd 100644
--- a/winsup/cygwin/include/sys/syslimits.h
+++ b/winsup/cygwin/include/sys/syslimits.h
@@ -1,7 +1,5 @@
/* sys/syslimits.h
- Copyright 2006 Red Hat, Inc.
-
This file is part of Cygwin.
This software is a copyrighted work licensed under the terms of the
diff --git a/winsup/cygwin/include/sys/syslog.h b/winsup/cygwin/include/sys/syslog.h
index b88bb8dd8..be6dc2de6 100644
--- a/winsup/cygwin/include/sys/syslog.h
+++ b/winsup/cygwin/include/sys/syslog.h
@@ -1,7 +1,5 @@
/* sys/syslog.h
- Copyright 1996, 1998, 2000, 2001, 2003, 2005 Red Hat, Inc.
-
This file is part of Cygwin.
This software is a copyrighted work licensed under the terms of the
diff --git a/winsup/cygwin/include/sys/sysmacros.h b/winsup/cygwin/include/sys/sysmacros.h
index 25a738a7d..1bc39941b 100644
--- a/winsup/cygwin/include/sys/sysmacros.h
+++ b/winsup/cygwin/include/sys/sysmacros.h
@@ -1,7 +1,5 @@
/* sys/sysmacros.h
- Copyright 1998, 2000, 2001, 2002, 2010, 2011, 2012 Red Hat, Inc.
-
This file is part of Cygwin.
This software is a copyrighted work licensed under the terms of the
diff --git a/winsup/cygwin/include/sys/sysproto.h b/winsup/cygwin/include/sys/sysproto.h
index 488782b89..b3995adb6 100644
--- a/winsup/cygwin/include/sys/sysproto.h
+++ b/winsup/cygwin/include/sys/sysproto.h
@@ -1,7 +1,5 @@
/* sys/sysproto.h
- Copyright 2003 Red Hat, Inc.
-
This file is part of Cygwin.
This software is a copyrighted work licensed under the terms of the
diff --git a/winsup/cygwin/include/sys/termio.h b/winsup/cygwin/include/sys/termio.h
index 60dcf7e08..954af3f52 100644
--- a/winsup/cygwin/include/sys/termio.h
+++ b/winsup/cygwin/include/sys/termio.h
@@ -1,7 +1,5 @@
/* sys/termio.h
- Copyright 2000, 2001 Red Hat, Inc.
-
This file is part of Cygwin.
This software is a copyrighted work licensed under the terms of the
diff --git a/winsup/cygwin/include/sys/termios.h b/winsup/cygwin/include/sys/termios.h
index 687c0085e..38de08744 100644
--- a/winsup/cygwin/include/sys/termios.h
+++ b/winsup/cygwin/include/sys/termios.h
@@ -1,8 +1,5 @@
/* sys/termios.h
- Copyright 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007,
- 2008, 2009, 2010, 2011, 2012 Red Hat, Inc.
-
This file is part of Cygwin.
This software is a copyrighted work licensed under the terms of the
@@ -71,7 +68,8 @@ POSIX commands */
#define TIOCPKT_NOSTOP 16
#define TIOCPKT_DOSTOP 32
-#define FIONBIO 0x8004667e /* To be compatible with socket version */
+/* Compatible with asm/socket.h */
+#define FIONBIO 0x8004667e /* set/clear non-blocking i/o */
#define CTRL(ch) ((ch)&0x1F)
@@ -99,6 +97,8 @@ POSIX commands */
#define CDISCARD CFLUSH
#define CWERASE CTRL('W')
#define CLNEXT CTRL('V')
+#define CMIN 1
+#define CTIME 0
/* iflag bits */
#define IGNBRK 0x00001
diff --git a/winsup/cygwin/include/sys/ucontext.h b/winsup/cygwin/include/sys/ucontext.h
new file mode 100644
index 000000000..8795476fc
--- /dev/null
+++ b/winsup/cygwin/include/sys/ucontext.h
@@ -0,0 +1,24 @@
+/* ucontext.h
+
+This file is part of Cygwin.
+
+This software is a copyrighted work licensed under the terms of the
+Cygwin license. Please consult the file "CYGWIN_LICENSE" for
+details. */
+
+#ifndef _SYS_UCONTEXT_H_
+#define _SYS_UCONTEXT_H_
+
+#include <signal.h>
+
+typedef struct __mcontext mcontext_t;
+
+typedef __attribute__ ((aligned (16))) struct __ucontext {
+ mcontext_t uc_mcontext;
+ struct __ucontext *uc_link;
+ sigset_t uc_sigmask;
+ stack_t uc_stack;
+ unsigned long int uc_flags;
+} ucontext_t;
+
+#endif /* !_SYS_UCONTEXT_H_ */
diff --git a/winsup/cygwin/include/sys/uio.h b/winsup/cygwin/include/sys/uio.h
index e28f14e7e..c13cee3c4 100644
--- a/winsup/cygwin/include/sys/uio.h
+++ b/winsup/cygwin/include/sys/uio.h
@@ -1,7 +1,5 @@
/* sys/uio.h
- Copyright 1996, 2000, 2001, 2002 Red Hat, Inc.
-
This file is part of Cygwin.
This software is a copyrighted work licensed under the terms of the
diff --git a/winsup/cygwin/include/sys/un.h b/winsup/cygwin/include/sys/un.h
index a2f3dacb1..fa5ce278f 100644
--- a/winsup/cygwin/include/sys/un.h
+++ b/winsup/cygwin/include/sys/un.h
@@ -1,7 +1,5 @@
/* sys/un.h
- Copyright 1999, 2000, 2001, 2005, 2009, 2013 Red Hat, Inc.
-
This file is part of Cygwin.
This software is a copyrighted work licensed under the terms of the
diff --git a/winsup/cygwin/include/sys/utime.h b/winsup/cygwin/include/sys/utime.h
index 9ec57ab08..8408fa1df 100644
--- a/winsup/cygwin/include/sys/utime.h
+++ b/winsup/cygwin/include/sys/utime.h
@@ -1,7 +1,5 @@
/* sys/utime.h
- Copyright 2001, 2003, 2005 Red Hat, Inc.
-
This software is a copyrighted work licensed under the terms of the
Cygwin license. Please consult the file "CYGWIN_LICENSE" for
details. */
diff --git a/winsup/cygwin/include/sys/utmp.h b/winsup/cygwin/include/sys/utmp.h
index 8a63b348b..d90517cdd 100644
--- a/winsup/cygwin/include/sys/utmp.h
+++ b/winsup/cygwin/include/sys/utmp.h
@@ -1,7 +1,5 @@
/* sys/utmp.h
- Copyright 2001, 2003, 2004, 2005, 2008 Red Hat, Inc.
-
This software is a copyrighted work licensed under the terms of the
Cygwin license. Please consult the file "CYGWIN_LICENSE" for
details. */
@@ -40,7 +38,7 @@ extern struct utmp *getutline (const struct utmp *);
extern struct utmp *pututline (const struct utmp *);
extern void endutent (void);
extern void setutent (void);
-extern void utmpname (const char *);
+extern int utmpname (const char *);
void login (const struct utmp *);
int logout (const char *);
diff --git a/winsup/cygwin/include/sys/utsname.h b/winsup/cygwin/include/sys/utsname.h
index 23ca5ab65..e9dd019df 100644
--- a/winsup/cygwin/include/sys/utsname.h
+++ b/winsup/cygwin/include/sys/utsname.h
@@ -1,7 +1,5 @@
/* sys/utsname.h
- Copyright 2000, 2001 Red Hat, Inc.
-
This file is part of Cygwin.
This software is a copyrighted work licensed under the terms of the
diff --git a/winsup/cygwin/include/sys/vfs.h b/winsup/cygwin/include/sys/vfs.h
index 1310c4693..669d05459 100644
--- a/winsup/cygwin/include/sys/vfs.h
+++ b/winsup/cygwin/include/sys/vfs.h
@@ -1,7 +1,5 @@
/* sys/vfs.h
- Copyright 1997, 1998, 2000, 2001, 2002 Red Hat, Inc.
-
This file is part of Cygwin.
This software is a copyrighted work licensed under the terms of the
diff --git a/winsup/cygwin/include/sys/xattr.h b/winsup/cygwin/include/sys/xattr.h
index 1f3239238..c63ab5e1a 100644
--- a/winsup/cygwin/include/sys/xattr.h
+++ b/winsup/cygwin/include/sys/xattr.h
@@ -1,7 +1,5 @@
/* sys/xattr.h
- Copyright 2011 Red Hat, Inc.
-
This file is part of Cygwin.
This software is a copyrighted work licensed under the terms of the
@@ -13,6 +11,7 @@ details. */
#ifndef _SYS_XATTR_H
#define _SYS_XATTR_H
+#include <sys/types.h>
#include <attr/xattr.h>
#endif /* _SYS_XATTR_H */
diff --git a/winsup/cygwin/include/syslog.h b/winsup/cygwin/include/syslog.h
index 28fb68aee..a777e853c 100644
--- a/winsup/cygwin/include/syslog.h
+++ b/winsup/cygwin/include/syslog.h
@@ -1,7 +1,5 @@
/* syslog.h
- Copyright 1996, 1998, 2000, 2001 Red Hat, Inc.
-
This file is part of Cygwin.
This software is a copyrighted work licensed under the terms of the
diff --git a/winsup/cygwin/include/termio.h b/winsup/cygwin/include/termio.h
index 4b8d86595..92689cc00 100644
--- a/winsup/cygwin/include/termio.h
+++ b/winsup/cygwin/include/termio.h
@@ -1,7 +1,5 @@
/* termio.h
- Copyright 2000, 2001 Red Hat, Inc.
-
This file is part of Cygwin.
This software is a copyrighted work licensed under the terms of the
diff --git a/winsup/cygwin/include/tzfile.h b/winsup/cygwin/include/tzfile.h
index d39ae6fd6..6bb16a9d4 100644
--- a/winsup/cygwin/include/tzfile.h
+++ b/winsup/cygwin/include/tzfile.h
@@ -1,7 +1,5 @@
/* tzfile.h
- Copyright 2000, 2001, 2002, 2003 Red Hat, Inc.
-
This file is part of Cygwin.
This software is a copyrighted work licensed under the terms of the
diff --git a/winsup/cygwin/include/ucontext.h b/winsup/cygwin/include/ucontext.h
new file mode 100644
index 000000000..96d8cfce0
--- /dev/null
+++ b/winsup/cygwin/include/ucontext.h
@@ -0,0 +1,26 @@
+/* ucontext.h
+
+This file is part of Cygwin.
+
+This software is a copyrighted work licensed under the terms of the
+Cygwin license. Please consult the file "CYGWIN_LICENSE" for
+details. */
+
+#ifndef _UCONTEXT_H
+#define _UCONTEXT_H
+
+#include <sys/cdefs.h>
+#include <sys/ucontext.h>
+
+__BEGIN_DECLS
+
+extern int getcontext (ucontext_t *) __attribute__((__nonnull__));
+extern int setcontext (const ucontext_t *) __attribute__((__nonnull__));
+extern int swapcontext (ucontext_t *, const ucontext_t *)
+ __attribute__((__nonnull__));
+extern void makecontext (ucontext_t *, void (*) (void), int, ...)
+ __attribute__((__nonnull__ (1)));
+
+__END_DECLS
+
+#endif /* _UCONTEXT_H */
diff --git a/winsup/cygwin/include/utmpx.h b/winsup/cygwin/include/utmpx.h
index 548ad80a3..e658d8543 100644
--- a/winsup/cygwin/include/utmpx.h
+++ b/winsup/cygwin/include/utmpx.h
@@ -1,7 +1,5 @@
/* utmpx.h
- Copyright 2004, 2005, 2006 Red Hat, Inc.
-
This software is a copyrighted work licensed under the terms of the
Cygwin license. Please consult the file "CYGWIN_LICENSE" for
details. */
@@ -12,6 +10,7 @@
#include <cygwin/utmp.h>
#include <sys/time.h>
+#define _PATH_UTMPX _PATH_UTMP
#define UTMPX_FILE _PATH_UTMP
#ifdef __cplusplus
@@ -46,7 +45,7 @@ extern struct utmpx *getutxid (const struct utmpx *id);
extern struct utmpx *getutxline (const struct utmpx *line);
extern struct utmpx *pututxline (const struct utmpx *utmpx);
extern void setutxent (void);
-extern void utmpxname (const char *file);
+extern int utmpxname (const char *file);
extern void updwtmpx (const char *file, const struct utmpx *utmpx);
#ifdef __cplusplus
diff --git a/winsup/cygwin/include/wait.h b/winsup/cygwin/include/wait.h
index f0f1281e2..d20cf8608 100644
--- a/winsup/cygwin/include/wait.h
+++ b/winsup/cygwin/include/wait.h
@@ -1,7 +1,5 @@
/* wait.h
- Copyright 2008 Red Hat, Inc.
-
This file is part of Cygwin.
This software is a copyrighted work licensed under the terms of the
diff --git a/winsup/cygwin/init.cc b/winsup/cygwin/init.cc
index 78e88b94b..d1b342886 100644
--- a/winsup/cygwin/init.cc
+++ b/winsup/cygwin/init.cc
@@ -1,8 +1,5 @@
/* init.cc
- Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008, 2009, 2010, 2011, 2012, 2013 Red Hat, Inc.
-
This file is part of Cygwin.
This software is a copyrighted work licensed under the terms of the
@@ -25,8 +22,10 @@ static bool dll_finished_loading;
static void WINAPI
threadfunc_fe (VOID *arg)
{
+#ifndef __x86_64__
(void)__builtin_return_address(1);
asm volatile ("andl $-16,%%esp" ::: "%esp");
+#endif
_cygtls::call ((DWORD (*) (void *, void *)) TlsGetValue (_my_oldfunc), arg);
}
@@ -40,7 +39,7 @@ munge_threadfunc ()
if (!threadfunc_ix[0])
{
char **peb;
- char **top = (char **) _tlsbase;
+ char **top = (char **) NtCurrentTeb()->Tib.StackBase;
for (peb = ebp, i = 0; peb < top && i < 7; peb++)
if (*peb == search_for)
threadfunc_ix[i++] = peb - ebp;
@@ -53,12 +52,22 @@ munge_threadfunc ()
if (threadfunc_ix[0])
{
- char *threadfunc = ebp[threadfunc_ix[0]];
+ char *threadfunc = NULL;
+
+ /* This call to NtQueryInformationThread crashes under WOW64 on
+ 64 bit XP and Server 2003. */
+ if (wincap.wow64_has_secondary_stack ())
+ threadfunc = ebp[threadfunc_ix[0]];
+ else
+ NtQueryInformationThread (NtCurrentThread (),
+ ThreadQuerySetWin32StartAddress,
+ &threadfunc, sizeof threadfunc, NULL);
if (!search_for || threadfunc == search_for)
{
search_for = NULL;
for (i = 0; threadfunc_ix[i]; i++)
- ebp[threadfunc_ix[i]] = (char *) threadfunc_fe;
+ if (!threadfunc || ebp[threadfunc_ix[i]] == threadfunc)
+ ebp[threadfunc_ix[i]] = (char *) threadfunc_fe;
TlsSetValue (_my_oldfunc, threadfunc);
}
}
diff --git a/winsup/cygwin/ioctl.cc b/winsup/cygwin/ioctl.cc
index 326c6e28b..3f93160d8 100644
--- a/winsup/cygwin/ioctl.cc
+++ b/winsup/cygwin/ioctl.cc
@@ -1,8 +1,5 @@
/* ioctl.cc: ioctl routines.
- Copyright 1996, 1998, 1999, 2000, 2001, 2002, 2003, 2006, 2008, 2009, 2011,
- 2012 Red Hat, Inc.
-
Written by Doug Evans of Cygnus Support
dje@cygnus.com
diff --git a/winsup/cygwin/ipc.cc b/winsup/cygwin/ipc.cc
index 3be8666fb..571ac8701 100644
--- a/winsup/cygwin/ipc.cc
+++ b/winsup/cygwin/ipc.cc
@@ -1,7 +1,5 @@
/* ipc.cc: Single unix specification IPC interface for Cygwin
- Copyright 2001, 2002, 2003, 2008, 2010 Red Hat, Inc.
-
Originally written by Robert Collins <robert.collins@hotmail.com>
Updated to 64 bit key_t by Charles Wilson <cygwin@cwilson.fastmail.fm>
diff --git a/winsup/cygwin/kernel32.cc b/winsup/cygwin/kernel32.cc
index 06bc7d082..05c5d4d70 100644
--- a/winsup/cygwin/kernel32.cc
+++ b/winsup/cygwin/kernel32.cc
@@ -1,7 +1,5 @@
/* kernel32.cc: Win32 replacement functions.
- Copyright 2008, 2009, 2010, 2011, 2012, 2013 Red Hat, Inc.
-
This file is part of Cygwin.
This software is a copyrighted work licensed under the terms of the
@@ -311,7 +309,8 @@ CreateFileMappingW (HANDLE hFile, LPSECURITY_ATTRIBUTES lpAttributes,
OBJECT_ATTRIBUTES attr;
NTSTATUS status;
ULONG flags = 0;
- ACCESS_MASK access = READ_CONTROL | SECTION_QUERY | SECTION_MAP_READ;
+ ACCESS_MASK access = STANDARD_RIGHTS_REQUIRED
+ | SECTION_QUERY | SECTION_MAP_READ;
ULONG prot = flProtect & (PAGE_NOACCESS | PAGE_READONLY | PAGE_READWRITE
| PAGE_WRITECOPY | PAGE_EXECUTE
| PAGE_EXECUTE_READ | PAGE_EXECUTE_READWRITE
diff --git a/winsup/cygwin/lc_msg.h b/winsup/cygwin/lc_msg.h
index 6d9fb6bf9..15c970711 100644
--- a/winsup/cygwin/lc_msg.h
+++ b/winsup/cygwin/lc_msg.h
@@ -1,5 +1,5 @@
/* This struct of LC_MESSAGES data has been generated by fetching locale
- data from a Linux system using glibc-2.17-11.fc19.x86_64 on 2013-08-19. */
+ data from a Linux system using glibc-2.21-8.fc22.x86_64 on 2015-11-17. */
struct lc_msg_t
{
@@ -17,8 +17,10 @@ static struct lc_msg_t lc_msg[] =
{ "aa_ER@saaho", L"^[yY].*", L"^[mnMN].*", L"", L"" },
{ "aa_ET", L"^[yY].*", L"^[mnMN].*", L"", L"" },
{ "af_ZA", L"^[jJyY]", L"^[nN]", L"", L"" },
+ { "ak_GH", L"^[yY].*", L"^[dDnN].*", L"Yiw", L"Daabi" },
{ "am_ET", L"^[yY].*", L"^[nN].*", L"", L"" },
{ "an_ES", L"^[sSyY].*", L"^[nN].*", L"", L"" },
+ { "anp_IN", L"^[\x0939\x0935yY]", L"^[\x0928\x0907nN]", L"", L"" },
{ "ar_AE", L"^[\x0646yY].*", L"^[\x0644nN].*", L"\x0646\x0639\x0645", L"\x0644\x0627" },
{ "ar_BH", L"^[\x0646yY].*", L"^[\x0644nN].*", L"\x0646\x0639\x0645", L"\x0644\x0627" },
{ "ar_DZ", L"^[\x0646yY].*", L"^[\x0644nN].*", L"\x0646\x0639\x0645", L"\x0644\x0627" },
@@ -34,6 +36,7 @@ static struct lc_msg_t lc_msg[] =
{ "ar_QA", L"^[\x0646yY].*", L"^[\x0644nN].*", L"\x0646\x0639\x0645", L"\x0644\x0627" },
{ "ar_SA", L"^[\x0646yY].*", L"^[\x0644nN].*", L"\x0646\x0639\x0645", L"\x0644\x0627" },
{ "ar_SD", L"^[\x0646yY].*", L"^[\x0644nN].*", L"\x0646\x0639\x0645", L"\x0644\x0627" },
+ { "ar_SS", L"^[\x0646yY].*", L"^[\x0644nN].*", L"\x0646\x0639\x0645", L"\x0644\x0627" },
{ "ar_SY", L"^[\x0646yY].*", L"^[\x0644nN].*", L"\x0646\x0639\x0645", L"\x0644\x0627" },
{ "ar_TN", L"^[\x0646yY].*", L"^[\x0644nN].*", L"\x0646\x0639\x0645", L"\x0644\x0627" },
{ "ar_YE", L"^[\x0646yY].*", L"^[\x0644nN].*", L"\x0646\x0639\x0645", L"\x0644\x0627" },
@@ -62,6 +65,8 @@ static struct lc_msg_t lc_msg[] =
{ "ca_ES@euro", L"^[sSyY].*", L"^[nN].*", L"", L"" },
{ "ca_FR", L"^[sSyY].*", L"^[nN].*", L"", L"" },
{ "ca_IT", L"^[sSyY].*", L"^[nN].*", L"", L"" },
+ { "ce_RU", L"^[\x0414\x0434Yy].*", L"^[\x041c\x043cNn].*", L"", L"" },
+ { "cmn_TW", L"^[yY\x662f]", L"^[nN\x4e0d\x5426]", L"", L"" },
{ "crh_UA", L"^[yYeE]", L"^[nNhH]", L"ebet", L"hay\x0131r" },
{ "cs_CZ", L"^[aAyY].*", L"^[nN].*", L"ano", L"ne" },
{ "csb_PL", L"^[JjTtYy].*", L"^[nN].*", L"", L"" },
@@ -85,7 +90,7 @@ static struct lc_msg_t lc_msg[] =
{ "en_AG", L"^[yY].*", L"^[nN].*", L"", L"" },
{ "en_AU", L"^[yY].*", L"^[nN].*", L"", L"" },
{ "en_BW", L"^[yY]", L"^[nN]", L"", L"" },
- { "en_CA", L"^[yYoO].*", L"^[nN].*", L"", L"" },
+ { "en_CA", L"^[yYoO].*", L"^[nN].*", L"Yes", L"No" },
{ "en_DK", L"^[1JjsSyYoO].*", L"^[0nN].*", L"", L"" },
{ "en_GB", L"^[yY].*", L"^[nN].*", L"", L"" },
{ "en_HK", L"^[yY]", L"^[nN]", L"Yes", L"No" },
@@ -100,35 +105,35 @@ static struct lc_msg_t lc_msg[] =
{ "en_ZA", L"^[yY]", L"^[nN]", L"", L"" },
{ "en_ZM", L"^[yYeE].*", L"^[nNaA].*", L"", L"" },
{ "en_ZW", L"^[yY]", L"^[nN]", L"", L"" },
- { "es_AR", L"^[sSyY].*", L"^[nN].*", L"", L"" },
- { "es_BO", L"^[sSyY].*", L"^[nN].*", L"", L"" },
- { "es_CL", L"^[sSyY].*", L"^[nN].*", L"", L"" },
- { "es_CO", L"^[sSyY].*", L"^[nN].*", L"", L"" },
- { "es_CR", L"^[sSyY].*", L"^[nN].*", L"", L"" },
- { "es_CU", L"^[sSyY].*", L"^[nN].*", L"", L"" },
- { "es_DO", L"^[sSyY].*", L"^[nN].*", L"", L"" },
- { "es_EC", L"^[sSyY].*", L"^[nN].*", L"", L"" },
- { "es_ES", L"^[sSyY].*", L"^[nN].*", L"", L"" },
- { "es_ES@euro", L"^[sSyY].*", L"^[nN].*", L"", L"" },
- { "es_GT", L"^[sSyY].*", L"^[nN].*", L"", L"" },
- { "es_HN", L"^[sSyY].*", L"^[nN].*", L"", L"" },
- { "es_MX", L"^[sSyY].*", L"^[nN].*", L"", L"" },
- { "es_NI", L"^[sSyY].*", L"^[nN].*", L"", L"" },
- { "es_PA", L"^[sSyY].*", L"^[nN].*", L"", L"" },
- { "es_PE", L"^[sSyY].*", L"^[nN].*", L"", L"" },
- { "es_PR", L"^[sSyY].*", L"^[nN].*", L"", L"" },
- { "es_PY", L"^[sSyY].*", L"^[nN].*", L"", L"" },
- { "es_SV", L"^[sSyY].*", L"^[nN].*", L"", L"" },
+ { "es_AR", L"^[sSyY].*", L"^[nN].*", L"Si", L"No" },
+ { "es_BO", L"^[sSyY].*", L"^[nN].*", L"Si", L"No" },
+ { "es_CL", L"^[sSyY].*", L"^[nN].*", L"Si", L"No" },
+ { "es_CO", L"^[sSyY].*", L"^[nN].*", L"Si", L"No" },
+ { "es_CR", L"^[sSyY].*", L"^[nN].*", L"Si", L"No" },
+ { "es_CU", L"^[sSyY].*", L"^[nN].*", L"Si", L"No" },
+ { "es_DO", L"^[sSyY].*", L"^[nN].*", L"Si", L"No" },
+ { "es_EC", L"^[sSyY].*", L"^[nN].*", L"Si", L"No" },
+ { "es_ES", L"^[sSyY].*", L"^[nN].*", L"Si", L"No" },
+ { "es_ES@euro", L"^[sSyY].*", L"^[nN].*", L"Si", L"No" },
+ { "es_GT", L"^[sSyY].*", L"^[nN].*", L"Si", L"No" },
+ { "es_HN", L"^[sSyY].*", L"^[nN].*", L"Si", L"No" },
+ { "es_MX", L"^[sSyY].*", L"^[nN].*", L"Si", L"No" },
+ { "es_NI", L"^[sSyY].*", L"^[nN].*", L"Si", L"No" },
+ { "es_PA", L"^[sSyY].*", L"^[nN].*", L"Si", L"No" },
+ { "es_PE", L"^[sSyY].*", L"^[nN].*", L"Si", L"No" },
+ { "es_PR", L"^[sSyY].*", L"^[nN].*", L"Si", L"No" },
+ { "es_PY", L"^[sSyY].*", L"^[nN].*", L"Si", L"No" },
+ { "es_SV", L"^[sSyY].*", L"^[nN].*", L"Si", L"No" },
{ "es_US", L"^[sSyY].*", L"^[nN].*", L"", L"" },
- { "es_UY", L"^[sSyY].*", L"^[nN].*", L"", L"" },
- { "es_VE", L"^[sSyY].*", L"^[nN].*", L"", L"" },
+ { "es_UY", L"^[sSyY].*", L"^[nN].*", L"Si", L"No" },
+ { "es_VE", L"^[sSyY].*", L"^[nN].*", L"Si", L"No" },
{ "et_EE", L"^[JjYy].*", L"^[EeNn].*", L"", L"" },
{ "eu_ES", L"^[bBsSyY].*", L"^[eEnN].*", L"", L"" },
{ "eu_ES@euro", L"^[bBsSyY].*", L"^[eEnN].*", L"", L"" },
{ "fa_IR", L"^[yY\x0622\x0628Hf].*", L"^[nN\x062e\x0646ok].*", L"", L"" },
{ "ff_SN", L"^[yYeE].*", L"^[nNaA].*", L"", L"" },
- { "fi_FI", L"^[KkYy].*", L"^[EeNn].*", L"", L"" },
- { "fi_FI@euro", L"^[KkYy].*", L"^[EeNn].*", L"", L"" },
+ { "fi_FI", L"^[KkYy].*", L"^[EeNn].*", L"Kyll\x00e4", L"Ei" },
+ { "fi_FI@euro", L"^[KkYy].*", L"^[EeNn].*", L"Kyll\x00e4", L"Ei" },
{ "fil_PH", L"[oOyY].*", L"[hHnN].*", L"oo", L"hindi" },
{ "fo_FO", L"^[JjYy].*", L"^[Nn].*", L"", L"" },
{ "fr_BE", L"^[oOjJyY1].*", L"^[nN0].*", L"", L"" },
@@ -144,7 +149,7 @@ static struct lc_msg_t lc_msg[] =
{ "fy_NL", L"^[jJyY].*", L"^[nN].*", L"", L"" },
{ "ga_IE", L"^[tTyY].*", L"^[nN].*", L"", L"" },
{ "ga_IE@euro", L"^[tTyY].*", L"^[nN].*", L"", L"" },
- { "gd_GB", L"^[yY].*", L"^[nN].*", L"", L"" },
+ { "gd_GB", L"^[tTyY].*", L"^[cCnN].*", L"", L"" },
{ "gez_ER", L"^[yY].*", L"^[nN].*", L"", L"" },
{ "gez_ER@abegede", L"^[yY].*", L"^[nN].*", L"", L"" },
{ "gez_ET", L"^[yY].*", L"^[nN].*", L"", L"" },
@@ -154,12 +159,13 @@ static struct lc_msg_t lc_msg[] =
{ "gu_IN", L"^[yY\x0ab9]", L"^[nN\x0aa8]", L"", L"" },
{ "gv_GB", L"^[yY].*", L"^[nN].*", L"", L"" },
{ "ha_NG", L"^[TtiIYy].*", L"^[bBaAnN].*", L"Toh", L"Babu" },
+ { "hak_TW", L"^[yY\x4fc2]", L"^[nN\x6bcb]", L"", L"" },
{ "he_IL", L"^[Yy\x05db].*", L"^[Nn\x05dc].*", L"", L"" },
{ "hi_IN", L"^[yY].*", L"^[nN].*", L"", L"" },
{ "hne_IN", L"^[\x0939\x0935yY]", L"^[\x0928\x0907nN]", L"\x0939\x0935", L"\x0928\x0907" },
{ "hr_HR", L"^[dDyY].*", L"^[nN].*", L"", L"" },
{ "hsb_DE", L"^[hHyY].*", L"^[nN].*", L"haj", L"n\x011b" },
- { "ht_HT", L"^[ooyy].*", L"^[nn].*", L"", L"" },
+ { "ht_HT", L"^[wWoOyY].*", L"^[nN].*", L"Wi", L"Non" },
{ "hu_HU", L"^[IiYy].*", L"^[nN].*", L"", L"" },
{ "hy_AM", L"^[yYsS\x0561\x0531]", L"^[nN\x0578\x0548]", L"\x0561\x0575\x0578", L"\x0578\x0579" },
{ "ia_FR", L"^[sSyY].*", L"^[nN].*", L"Si", L"No" },
@@ -193,6 +199,7 @@ static struct lc_msg_t lc_msg[] =
{ "lo_LA", L"^[yY\x0ea1]", L"^[nN\x0e9a]", L"\x0ec1\x0ea1\x0ec8\x0e99", L"\x0e9a\x0ecd\x0ec8\x0ec1\x0ea1\x0ec8\x0e99" },
{ "lt_LT", L"^[TtYy].*", L"^[Nn].*", L"", L"" },
{ "lv_LV", L"^[JjYy].*", L"^[Nn].*", L"", L"" },
+ { "lzh_TW", L"^[yY\x662f]", L"^[nN\x975e]", L"", L"" },
{ "mag_IN", L"^[yY].*", L"^[nN].*", L"", L"" },
{ "mai_IN", L"^[yY].*", L"^[nN].*", L"", L"" },
{ "mg_MG", L"^[eEyY].*", L"^[tTnN].*", L"", L"" },
@@ -206,6 +213,7 @@ static struct lc_msg_t lc_msg[] =
{ "ms_MY", L"^[yY]", L"^[tT]", L"Ya", L"Tidak" },
{ "mt_MT", L"^(Yes|[yY])", L"^(No|[nN])", L"", L"" },
{ "my_MM", L"^[yY\x101f].*", L"^[nN\x1019].*", L"\x101f\x102f\x1010\x103a\x1010\x101a\x103a", L"\x1019\x101f\x102f\x1010\x103a\x1018\x1030\x1038" },
+ { "nan_TW", L"^[yY\x662f]", L"^[nN\x4f13]", L"", L"" },
{ "nan_TW@latin", L"^[sS].*", L"^[mM].*", L"S\x012b", L"M\x0304-S\x012b" },
{ "nb_NO", L"^[JjYy].*", L"^[Nn].*", L"", L"" },
{ "nds_DE", L"^[jJyY].*", L"^[nN].*", L"", L"" },
@@ -231,11 +239,15 @@ static struct lc_msg_t lc_msg[] =
{ "pa_IN", L"^[yY].*", L"^[nN].*", L"", L"" },
{ "pa_PK", L"^[yY\x0647\x0628\x0066].*", L"^[nN\x0646o].*", L"\x0628\x0644\x0643\x0644", L"\x0646\x0647\x064a\x06ba" },
{ "pap_AN", L"^[jJyY].*", L"^[nN].*", L"", L"" },
+ { "pap_AW", L"^[jJyY].*", L"^[nN].*", L"", L"" },
+ { "pap_CW", L"^[jJyY].*", L"^[nN].*", L"", L"" },
{ "pl_PL", L"^[TtYy].*", L"^[nN].*", L"", L"" },
{ "ps_AF", L"^[yY\x0628\x0066].*", L"^[nN\x062e\x0646o].*", L"", L"" },
{ "pt_BR", L"^[SsyY].*", L"^[nN].*", L"", L"" },
{ "pt_PT", L"^[SsyY].*", L"^[nN].*", L"", L"" },
{ "pt_PT@euro", L"^[SsyY].*", L"^[nN].*", L"", L"" },
+ { "quz_PE", L"^[aAsSyY].*", L"^[mMnN].*", L"Ar\x00ed", L"Manan" },
+ { "raj_IN", L"^[yY].*", L"^[nN].*", L"", L"" },
{ "ro_RO", L"^[DdYy].*", L"^[nN].*", L"", L"" },
{ "ru_RU", L"^[\x0414\x0434Yy].*", L"^[\x041d\x043dNn].*", L"", L"" },
{ "ru_UA", L"^[\x0414\x0434Yy].*", L"^[\x041d\x043dNn].*", L"", L"" },
@@ -246,7 +258,7 @@ static struct lc_msg_t lc_msg[] =
{ "sd_IN", L"^[\x0646yY].*", L"^[\x0644nN].*", L"\x0646\x0639\x0645", L"\x0644\x0627" },
{ "sd_IN@devanagari", L"^[yY].*", L"^[nN].*", L"", L"" },
{ "se_NO", L"^[JjYy].*", L"^[Ii].*", L"", L"" },
- { "shs_CA", L"^[yYoO].*", L"^[nN].*", L"", L"" },
+ { "shs_CA", L"^[yYoO].*", L"^[nN].*", L"Yes", L"No" },
{ "si_LK", L"^[\x0d94Yy]", L"^[\x0db1Nn]", L"\x0d94\x0dc0\x0dca", L"\x0db1\x0dd0\x0dad" },
{ "sid_ET", L"^[yY].*", L"^[nN].*", L"", L"" },
{ "sk_SK", L"^[aA\x00e1\x00c1yY].*", L"^[nN].*", L"\x00e1no", L"nie" },
@@ -278,6 +290,7 @@ static struct lc_msg_t lc_msg[] =
{ "te_IN", L"^[yY\x0c05].*", L"^[nN\x0c15].*", L"\x0c05\x0c35\x0c28\x0c41", L"\x0c15\x0c3e\x0c26\x0c41" },
{ "tg_TJ", L"^[\x04b2\x04b3\x0425\x0445\x0414\x0434Yy].*", L"^[\x041d\x043dNn].*", L"\x0434\x0430", L"\x043d\x0435\x0442" },
{ "th_TH", L"^[yY\x0e0a]", L"^[nN\x0e21]", L"\x0e43\x0e0a\x0e48", L"\x0e44\x0e21\x0e48\x0e43\x0e0a\x0e48" },
+ { "the_NP", L"^[yY].*", L"^[nN].*", L"", L"" },
{ "ti_ER", L"^[yY].*", L"^[nN].*", L"", L"" },
{ "ti_ET", L"^[yY].*", L"^[nN].*", L"", L"" },
{ "tig_ER", L"^[yY].*", L"^[nN].*", L"", L"" },
@@ -294,7 +307,7 @@ static struct lc_msg_t lc_msg[] =
{ "unm_US", L"^[yY].*", L"^[kKmM].*", L"", L"" },
{ "ur_IN", L"^[\x06c1yY].*", L"^[\x0646nN].*", L"\x06c1\x0627\x06ba", L"\x0646\x06c1\x06cc\x06ba" },
{ "ur_PK", L"^[yY\x0647\x0628\x0066].*", L"^[nN\x0646o].*", L"\x0628\x0644\x0643\x0644", L"\x0646\x0647\x064a\x06ba" },
- { "uz_UZ", L"^[yY\x0647\x0628\x0066].*", L"^[nN\x0646o].*", L"\x0628\x0644\x0643\x0644", L"\x0646\x0647\x064a\x06ba" },
+ { "uz_UZ", L"^[YyHh].*", L"^[JjNn].*", L"Ha", L"Yo'q" },
{ "uz_UZ@cyrillic", L"^[\x04b2\x04b3Yy].*", L"^[\x0419\x0439Nn].*", L"\x04b2\x0430", L"\x0419\x045e\x049b" },
{ "ve_ZA", L"^[yYeE]", L"^[nNhH]", L"", L"" },
{ "vi_VN", L"^[1yYcC].*", L"^[0nNkK].*", L"C\x00f3", L"Kh\x00f4ng" },
diff --git a/winsup/cygwin/ldap.cc b/winsup/cygwin/ldap.cc
new file mode 100644
index 000000000..6ccf8998c
--- /dev/null
+++ b/winsup/cygwin/ldap.cc
@@ -0,0 +1,714 @@
+/* ldap.cc: Helper functions for ldap access to Active Directory.
+
+This file is part of Cygwin.
+
+This software is a copyrighted work licensed under the terms of the
+Cygwin license. Please consult the file "CYGWIN_LICENSE" for
+details. */
+
+#include "winsup.h"
+#include "ldap.h"
+#include "cygerrno.h"
+#include "security.h"
+#include "path.h"
+#include "fhandler.h"
+#include "dtable.h"
+#include "cygheap.h"
+#include "registry.h"
+#include "pinfo.h"
+#include "lm.h"
+#include "dsgetdc.h"
+#include "tls_pbuf.h"
+#include <sys/param.h>
+
+#define CYG_LDAP_ENUM_PAGESIZE 100 /* entries per page */
+
+static PWCHAR rootdse_attr[] =
+{
+ (PWCHAR) L"defaultNamingContext",
+ (PWCHAR) L"supportedCapabilities",
+ NULL
+};
+
+static const PCWSTR std_user_attr[] =
+{
+ L"sAMAccountName",
+ L"objectSid",
+ L"primaryGroupID",
+ L"uidNumber",
+ L"cygwinUnixUid", /* TODO */
+ /* windows scheme */
+ L"displayName",
+ L"homeDrive",
+ L"homeDirectory",
+ /* cygwin scheme */
+ L"cygwinGecos",
+ L"cygwinHome",
+ L"cygwinShell",
+ /* unix scheme */
+ L"gecos",
+ L"unixHomeDirectory",
+ L"loginShell",
+ /* desc scheme */
+ L"description"
+};
+
+static PWCHAR group_attr[] =
+{
+ (PWCHAR) L"sAMAccountName",
+ (PWCHAR) L"objectSid",
+ (PWCHAR) L"gidNumber",
+ (PWCHAR) L"cygwinUnixGid", /* TODO */
+ NULL
+};
+
+PWCHAR tdom_attr[] =
+{
+ (PWCHAR) L"trustPosixOffset",
+ NULL
+};
+
+PWCHAR sid_attr[] =
+{
+ (PWCHAR) L"objectSid",
+ NULL
+};
+
+PWCHAR rfc2307_uid_attr[] =
+{
+ (PWCHAR) L"uid",
+ NULL
+};
+
+PWCHAR rfc2307_gid_attr[] =
+{
+ (PWCHAR) L"cn",
+ NULL
+};
+
+/* ================================================================= */
+/* Helper method of cygheap_pwdgrp class. It sets the user attribs */
+/* from the settings in nsswitch.conf. */
+/* ================================================================= */
+
+#define user_attr (cygheap->pg.ldap_user_attr)
+
+void
+cygheap_pwdgrp::init_ldap_user_attr ()
+{
+ ldap_user_attr = (PWCHAR *)
+ ccalloc_abort (HEAP_BUF, sizeof (std_user_attr) / sizeof (*std_user_attr)
+ + 3 * NSS_SCHEME_MAX + 1, sizeof (PWCHAR));
+ memcpy (ldap_user_attr, std_user_attr, sizeof (std_user_attr));
+ uint16_t freeattr_idx = sizeof (std_user_attr) / sizeof (*std_user_attr);
+ for (uint16_t idx = 0; idx < NSS_SCHEME_MAX; ++idx)
+ {
+ if (home_scheme[idx].method == NSS_SCHEME_FREEATTR)
+ ldap_user_attr[freeattr_idx++] = home_scheme[idx].attrib;
+ if (shell_scheme[idx].method == NSS_SCHEME_FREEATTR)
+ ldap_user_attr[freeattr_idx++] = shell_scheme[idx].attrib;
+ if (gecos_scheme[idx].method == NSS_SCHEME_FREEATTR)
+ ldap_user_attr[freeattr_idx++] = gecos_scheme[idx].attrib;
+ }
+}
+
+/* ================================================================= */
+/* Helper methods. */
+/* ================================================================= */
+
+inline int
+cyg_ldap::map_ldaperr_to_errno (ULONG lerr)
+{
+ switch (lerr)
+ {
+ case LDAP_SUCCESS:
+ return NO_ERROR;
+ case LDAP_NO_RESULTS_RETURNED:
+ /* LdapMapErrorToWin32 maps LDAP_NO_RESULTS_RETURNED to ERROR_MORE_DATA,
+ which in turn is mapped to EMSGSIZE by geterrno_from_win_error. This
+ is SO wrong, especially considering that LDAP_MORE_RESULTS_TO_RETURN
+ is mapped to ERROR_MORE_DATA as well :-P */
+ return ENMFILE;
+ default:
+ break;
+ }
+ return geterrno_from_win_error (LdapMapErrorToWin32 (lerr));
+}
+
+inline int
+cyg_ldap::wait (cygthread *thr)
+{
+ if (!thr)
+ return EIO;
+ if (cygwait (*thr, cw_infinite, cw_sig | cw_sig_restart) != WAIT_OBJECT_0)
+ {
+ thr->terminate_thread ();
+ return EIO;
+ }
+ thr->detach ();
+ return 0;
+}
+
+/* ================================================================= */
+/* Helper struct and functions for interruptible LDAP initalization. */
+/* ================================================================= */
+
+struct cyg_ldap_init {
+ cyg_ldap *that;
+ PCWSTR domain;
+ bool ssl;
+ ULONG ret;
+};
+
+ULONG
+cyg_ldap::connect_ssl (PCWSTR domain)
+{
+ ULONG ret;
+
+ if (!(lh = ldap_sslinitW ((PWCHAR) domain, LDAP_SSL_PORT, 1)))
+ {
+ debug_printf ("ldap_init(%W) error 0x%02x", domain, LdapGetLastError ());
+ return LdapGetLastError ();
+ }
+ if ((ret = ldap_bind_s (lh, NULL, NULL, LDAP_AUTH_NEGOTIATE)) != LDAP_SUCCESS)
+ debug_printf ("ldap_bind(%W) 0x%02x", domain, ret);
+ else if ((ret = ldap_search_sW (lh, NULL, LDAP_SCOPE_BASE,
+ (PWCHAR) L"(objectclass=*)", rootdse_attr,
+ 0, &msg))
+ != LDAP_SUCCESS)
+ debug_printf ("ldap_search(%W, ROOTDSE) error 0x%02x", domain, ret);
+ return ret;
+}
+
+ULONG
+cyg_ldap::connect_non_ssl (PCWSTR domain)
+{
+ ULONG ret;
+
+ if (!(lh = ldap_initW ((PWCHAR) domain, LDAP_PORT)))
+ {
+ debug_printf ("ldap_init(%W) error 0x%02x", domain, LdapGetLastError ());
+ return LdapGetLastError ();
+ }
+ if ((ret = ldap_set_option (lh, LDAP_OPT_SIGN, LDAP_OPT_ON))
+ != LDAP_SUCCESS)
+ debug_printf ("ldap_set_option(LDAP_OPT_SIGN) error 0x%02x", ret);
+ if ((ret = ldap_set_option (lh, LDAP_OPT_ENCRYPT, LDAP_OPT_ON))
+ != LDAP_SUCCESS)
+ debug_printf ("ldap_set_option(LDAP_OPT_ENCRYPT) error 0x%02x", ret);
+ if ((ret = ldap_bind_s (lh, NULL, NULL, LDAP_AUTH_NEGOTIATE)) != LDAP_SUCCESS)
+ debug_printf ("ldap_bind(%W) 0x%02x", domain, ret);
+ else if ((ret = ldap_search_sW (lh, NULL, LDAP_SCOPE_BASE,
+ (PWCHAR) L"(objectclass=*)", rootdse_attr,
+ 0, &msg))
+ != LDAP_SUCCESS)
+ debug_printf ("ldap_search(%W, ROOTDSE) error 0x%02x", domain, ret);
+ return ret;
+}
+
+static DWORD WINAPI
+ldap_init_thr (LPVOID param)
+{
+ cyg_ldap_init *cl = (cyg_ldap_init *) param;
+ cl->ret = cl->ssl ? cl->that->connect_ssl (cl->domain)
+ : cl->that->connect_non_ssl (cl->domain);
+ return 0;
+}
+
+inline int
+cyg_ldap::connect (PCWSTR domain)
+{
+ /* FIXME? connect_ssl can take ages even when failing, so we're trying to
+ do everything the non-SSL (but still encrypted) way. */
+ cyg_ldap_init cl = { this, domain, false, NO_ERROR };
+ cygthread *thr = new cygthread (ldap_init_thr, &cl, "ldap_init");
+ return wait (thr) ?: map_ldaperr_to_errno (cl.ret);
+}
+
+/* ================================================================= */
+/* Helper struct and functions for interruptible LDAP search. */
+/* ================================================================= */
+
+struct cyg_ldap_search {
+ cyg_ldap *that;
+ PWCHAR base;
+ ULONG scope;
+ PWCHAR filter;
+ PWCHAR *attrs;
+ ULONG ret;
+};
+
+ULONG
+cyg_ldap::search_s (PWCHAR base, ULONG scope, PWCHAR filter, PWCHAR *attrs)
+{
+ ULONG ret;
+
+ if ((ret = ldap_search_sW (lh, base, scope, filter, attrs, 0, &msg))
+ != LDAP_SUCCESS)
+ debug_printf ("ldap_search_sW(%W,%W) error 0x%02x", base, filter, ret);
+ return ret;
+}
+
+static DWORD WINAPI
+ldap_search_thr (LPVOID param)
+{
+ cyg_ldap_search *cl = (cyg_ldap_search *) param;
+ cl->ret = cl->that->search_s (cl->base, cl->scope, cl->filter, cl->attrs);
+ return 0;
+}
+
+inline int
+cyg_ldap::search (PWCHAR base, ULONG scope, PWCHAR filter, PWCHAR *attrs)
+{
+ cyg_ldap_search cl = { this, base, scope, filter, attrs, NO_ERROR };
+ cygthread *thr = new cygthread (ldap_search_thr, &cl, "ldap_search");
+ return wait (thr) ?: map_ldaperr_to_errno (cl.ret);
+}
+
+/* ================================================================= */
+/* Helper struct and functions for interruptible LDAP page search. */
+/* ================================================================= */
+
+struct cyg_ldap_next_page {
+ cyg_ldap *that;
+ ULONG ret;
+};
+
+ULONG
+cyg_ldap::next_page_s ()
+{
+ ULONG total;
+ ULONG ret;
+
+ do
+ {
+ ret = ldap_get_next_page_s (lh, srch_id, NULL, CYG_LDAP_ENUM_PAGESIZE,
+ &total, &msg);
+ }
+ while (ret == LDAP_SUCCESS && ldap_count_entries (lh, msg) == 0);
+ if (ret && ret != LDAP_NO_RESULTS_RETURNED)
+ debug_printf ("ldap_result() error 0x%02x", ret);
+ return ret;
+}
+
+static DWORD WINAPI
+ldap_next_page_thr (LPVOID param)
+{
+ cyg_ldap_next_page *cl = (cyg_ldap_next_page *) param;
+ cl->ret = cl->that->next_page_s ();
+ return 0;
+}
+
+inline int
+cyg_ldap::next_page ()
+{
+ cyg_ldap_next_page cl = { this, NO_ERROR };
+ cygthread *thr = new cygthread (ldap_next_page_thr, &cl, "ldap_next_page");
+ return wait (thr) ?: map_ldaperr_to_errno (cl.ret);
+}
+
+/* ================================================================= */
+/* Public methods. */
+/* ================================================================= */
+
+int
+cyg_ldap::open (PCWSTR domain)
+{
+ int ret = NO_ERROR;
+
+ /* Already open? */
+ if (lh)
+ return NO_ERROR;
+
+ if ((ret = connect (domain)) != NO_ERROR)
+ goto err;
+ /* Prime `ret' and fetch ROOTDSE search result. */
+ ret = EIO;
+ if (!(entry = ldap_first_entry (lh, msg)))
+ {
+ debug_printf ("No ROOTDSE entry for %W", domain);
+ goto err;
+ }
+ if (!(val = ldap_get_valuesW (lh, entry, rootdse_attr[0])))
+ {
+ debug_printf ("No %W value for %W", rootdse_attr[0], domain);
+ goto err;
+ }
+ if (!(def_context = wcsdup (val[0])))
+ {
+ debug_printf ("wcsdup(%W, %W) %d", domain, rootdse_attr[0],
+ get_errno ());
+ goto err;
+ }
+ ldap_value_freeW (val);
+ if ((val = ldap_get_valuesW (lh, entry, rootdse_attr[1])))
+ {
+ for (ULONG idx = 0; idx < ldap_count_valuesW (val); ++idx)
+ if (!wcscmp (val[idx], LDAP_CAP_ACTIVE_DIRECTORY_OID_W))
+ {
+ isAD = true;
+ break;
+ }
+ }
+ ldap_value_freeW (val);
+ val = NULL;
+ ldap_msgfree (msg);
+ msg = entry = NULL;
+ return NO_ERROR;
+err:
+ close ();
+ return ret;
+}
+
+void
+cyg_ldap::close ()
+{
+ if (srch_id != NULL)
+ ldap_search_abandon_page (lh, srch_id);
+ if (lh)
+ ldap_unbind (lh);
+ if (msg)
+ ldap_msgfree (msg);
+ if (val)
+ ldap_value_freeW (val);
+ if (def_context)
+ free (def_context);
+ lh = NULL;
+ msg = entry = NULL;
+ val = NULL;
+ def_context = NULL;
+ srch_id = NULL;
+ last_fetched_sid = NO_SID;
+}
+
+PWCHAR
+cyg_ldap::get_string_attribute (PCWSTR name)
+{
+ if (val)
+ ldap_value_freeW (val);
+ val = ldap_get_valuesW (lh, entry, (PWCHAR) name);
+ if (val)
+ return val[0];
+ return NULL;
+}
+
+uint32_t
+cyg_ldap::get_num_attribute (PCWSTR name)
+{
+ PWCHAR ret = get_string_attribute (name);
+ if (ret)
+ return (uint32_t) wcstoul (ret, NULL, 10);
+ return (uint32_t) -1;
+}
+
+#define ACCOUNT_FILTER_START L"(&(|(&(objectCategory=Person)" \
+ "(objectClass=User))" \
+ "(objectClass=Group))" \
+ "(objectSid="
+
+#define ACCOUNT_FILTER_END L"))"
+
+bool
+cyg_ldap::fetch_ad_account (PSID sid, bool group, PCWSTR domain)
+{
+ WCHAR filter[sizeof (ACCOUNT_FILTER_START) + sizeof (ACCOUNT_FILTER_END)
+ + 3 * SECURITY_MAX_SID_SIZE + 1];
+ PWCHAR f, base = NULL;
+ LONG len = (LONG) RtlLengthSid (sid);
+ PBYTE s = (PBYTE) sid;
+ static WCHAR hex_wchars[] = L"0123456789abcdef";
+ tmp_pathbuf tp;
+
+ if (last_fetched_sid == sid)
+ return true;
+
+ if (open (NULL) != NO_ERROR)
+ return false;
+
+ if (msg)
+ {
+ ldap_msgfree (msg);
+ msg = entry = NULL;
+ }
+ if (val)
+ {
+ ldap_value_freeW (val);
+ val = NULL;
+ }
+ f = wcpcpy (filter, ACCOUNT_FILTER_START);
+ while (len-- > 0)
+ {
+ *f++ = L'\\';
+ *f++ = hex_wchars[*s >> 4];
+ *f++ = hex_wchars[*s++ & 0xf];
+ }
+ wcpcpy (f, ACCOUNT_FILTER_END);
+ if (domain)
+ {
+ /* FIXME: This is a hack. The most correct solution is probably to
+ open a connection to the DC of the trusted domain. But this always
+ takes extra time, so we're trying to avoid it. If this results in
+ problems, we know what to do. */
+ base = tp.w_get ();
+ PWCHAR b = base;
+ for (PWCHAR dotp = (PWCHAR) domain; dotp && *dotp; domain = dotp)
+ {
+ dotp = wcschr (domain, L'.');
+ if (dotp)
+ *dotp++ = L'\0';
+ if (b > base)
+ *b++ = L',';
+ b = wcpcpy (b, L"DC=");
+ b = wcpcpy (b, domain);
+ }
+ }
+ else
+ {
+ /* def_context is only valid after open. */
+ base = def_context;
+ }
+ if (!user_attr)
+ cygheap->pg.init_ldap_user_attr ();
+ attr = group ? group_attr : user_attr;
+ if (search (base, LDAP_SCOPE_SUBTREE, filter, attr) != 0)
+ return false;
+ if (!(entry = ldap_first_entry (lh, msg)))
+ {
+ debug_printf ("No entry for %W in base %W", filter, base);
+ return false;
+ }
+ last_fetched_sid = sid;
+ return true;
+}
+
+int
+cyg_ldap::enumerate_ad_accounts (PCWSTR domain, bool group)
+{
+ int ret;
+ tmp_pathbuf tp;
+ PCWSTR filter;
+
+ close ();
+ if ((ret = open (domain)) != NO_ERROR)
+ return ret;
+
+ if (!group)
+ filter = L"(&(objectCategory=Person)"
+ "(objectClass=User)"
+ /* 512 == ADS_UF_NORMAL_ACCOUNT
+ Without checking this flag we'd enumerate undesired accounts
+ like, e.g., interdomain trusts. */
+ "(userAccountControl:" LDAP_MATCHING_RULE_BIT_AND ":=512)"
+ "(objectSid=*))";
+ else if (!domain)
+ /* From the local domain, we fetch well-known groups. */
+ filter = L"(&(objectClass=Group)"
+ "(objectSid=*))";
+ else
+ /* From foreign domains, we don't. */
+ filter = L"(&(objectClass=Group)"
+ /* 1 == BUILTIN_LOCAL_GROUP */
+ "(!(groupType:" LDAP_MATCHING_RULE_BIT_AND ":=1))"
+ "(objectSid=*))";
+ if (!user_attr)
+ cygheap->pg.init_ldap_user_attr ();
+ attr = group ? group_attr : user_attr;
+ srch_id = ldap_search_init_pageW (lh, def_context, LDAP_SCOPE_SUBTREE,
+ (PWCHAR) filter, attr, 0, NULL, NULL,
+ INFINITE, CYG_LDAP_ENUM_PAGESIZE, NULL);
+ if (srch_id == NULL)
+ {
+ debug_printf ("ldap_search_init_pageW(%W,%W) error 0x%02x",
+ def_context, filter, LdapGetLastError ());
+ return map_ldaperr_to_errno (LdapGetLastError ());
+ }
+ return NO_ERROR;
+}
+
+int
+cyg_ldap::next_account (cygsid &sid)
+{
+ ULONG ret;
+ PLDAP_BERVAL *bval;
+
+ if (entry)
+ {
+ if ((entry = ldap_next_entry (lh, entry))
+ && (bval = ldap_get_values_lenW (lh, entry, (PWCHAR) L"objectSid")))
+ {
+ last_fetched_sid = sid = (PSID) bval[0]->bv_val;
+ ldap_value_free_len (bval);
+ return NO_ERROR;
+ }
+ ldap_msgfree (msg);
+ msg = entry = NULL;
+ }
+ ret = next_page ();
+ if (ret == NO_ERROR)
+ {
+ if ((entry = ldap_first_entry (lh, msg))
+ && (bval = ldap_get_values_lenW (lh, entry, (PWCHAR) L"objectSid")))
+ {
+ last_fetched_sid = sid = (PSID) bval[0]->bv_val;
+ ldap_value_free_len (bval);
+ return NO_ERROR;
+ }
+ ret = EIO;
+ }
+ ldap_search_abandon_page (lh, srch_id);
+ srch_id = NULL;
+ return ret;
+}
+
+#define SYSTEM_CONTAINER L"CN=System,"
+
+#define PSX_OFFSET_FILTER L"(&(objectClass=trustedDomain)(name=%W))"
+#define PSX_OFFSET_FILTER_FLAT L"(&(objectClass=trustedDomain)(flatName=%W))"
+
+/* Return UINT32_MAX on error to allow differing between not being able
+ to fetch a value and a real 0 offset. */
+uint32_t
+cyg_ldap::fetch_posix_offset_for_domain (PCWSTR domain)
+{
+ WCHAR base[wcslen (def_context) + sizeof (SYSTEM_CONTAINER) / sizeof (WCHAR)];
+ WCHAR filter[sizeof (PSX_OFFSET_FILTER_FLAT) + wcslen (domain) + 1];
+
+ if (msg)
+ {
+ ldap_msgfree (msg);
+ msg = entry = NULL;
+ }
+ if (val)
+ {
+ ldap_value_freeW (val);
+ val = NULL;
+ }
+ /* As base, use system container within default naming context to restrict
+ the search to this container only. */
+ wcpcpy (wcpcpy (base, SYSTEM_CONTAINER), def_context);
+ /* If domain name has no dot, it's a Netbios name. In that case, filter
+ by flatName rather than by name. */
+ __small_swprintf (filter, wcschr (domain, L'.') ? PSX_OFFSET_FILTER
+ : PSX_OFFSET_FILTER_FLAT,
+ domain);
+ if (search (base, LDAP_SCOPE_ONELEVEL, filter, attr = tdom_attr) != 0)
+ return UINT32_MAX;
+ if (!(entry = ldap_first_entry (lh, msg)))
+ {
+ debug_printf ("No entry for %W in def_context %W", filter, def_context);
+ return UINT32_MAX;
+ }
+ return get_num_attribute (tdom_attr[0]);
+}
+
+#define UXID_FILTER_GRP L"(&(objectClass=Group)" \
+ "(gidNumber=%u))"
+
+#define UXID_FILTER_USR L"(&(objectCategory=Person)" \
+ "(objectClass=User)" \
+ "(uidNumber=%u))"
+
+bool
+cyg_ldap::fetch_unix_sid_from_ad (uint32_t id, cygsid &sid, bool group)
+{
+ WCHAR filter[MAX (sizeof (UXID_FILTER_GRP), sizeof (UXID_FILTER_USR)) + 16];
+ PLDAP_BERVAL *bval;
+
+ if (msg)
+ {
+ ldap_msgfree (msg);
+ msg = entry = NULL;
+ }
+ __small_swprintf (filter, group ? UXID_FILTER_GRP : UXID_FILTER_USR, id);
+ if (search (def_context, LDAP_SCOPE_SUBTREE, filter, sid_attr) != 0)
+ return false;
+ if ((entry = ldap_first_entry (lh, msg))
+ && (bval = ldap_get_values_lenW (lh, entry, (PWCHAR) L"objectSid")))
+ {
+ sid = (PSID) bval[0]->bv_val;
+ ldap_value_free_len (bval);
+ return true;
+ }
+ return false;
+}
+
+#define PSXID_FILTER_GRP L"(&(objectClass=posixGroup)" \
+ "(gidNumber=%u))"
+
+#define PSXID_FILTER_USR L"(&(objectClass=posixAccount)" \
+ "(uidNumber=%u))"
+
+PWCHAR
+cyg_ldap::fetch_unix_name_from_rfc2307 (uint32_t id, bool group)
+{
+ WCHAR filter[MAX (sizeof (PSXID_FILTER_GRP), sizeof (PSXID_FILTER_USR)) + 16];
+
+ if (msg)
+ {
+ ldap_msgfree (msg);
+ msg = entry = NULL;
+ }
+ if (val)
+ {
+ ldap_value_freeW (val);
+ val = NULL;
+ }
+ attr = group ? rfc2307_gid_attr : rfc2307_uid_attr;
+ __small_swprintf (filter, group ? PSXID_FILTER_GRP : PSXID_FILTER_USR, id);
+ if (search (def_context, LDAP_SCOPE_SUBTREE, filter, attr) != 0)
+ return NULL;
+ if (!(entry = ldap_first_entry (lh, msg)))
+ {
+ debug_printf ("No entry for %W in def_context %W", filter, def_context);
+ return NULL;
+ }
+ return get_string_attribute (attr[0]);
+}
+
+uid_t
+cyg_ldap::remap_uid (uid_t uid)
+{
+ cygsid user (NO_SID);
+ PWCHAR name;
+ struct passwd *pw;
+
+ if (isAD)
+ {
+ if (fetch_unix_sid_from_ad (uid, user, false)
+ && user != NO_SID
+ && (pw = internal_getpwsid (user, this)))
+ return pw->pw_uid;
+ }
+ else if ((name = fetch_unix_name_from_rfc2307 (uid, false)))
+ {
+ char *mbname = NULL;
+ sys_wcstombs_alloc (&mbname, HEAP_NOTHEAP, name);
+ if ((pw = internal_getpwnam (mbname)))
+ return pw->pw_uid;
+ }
+ return ILLEGAL_UID;
+}
+
+gid_t
+cyg_ldap::remap_gid (gid_t gid)
+{
+ cygsid group (NO_SID);
+ PWCHAR name;
+ struct group *gr;
+
+ if (isAD)
+ {
+ if (fetch_unix_sid_from_ad (gid, group, true)
+ && group != NO_SID
+ && (gr = internal_getgrsid (group, this)))
+ return gr->gr_gid;
+ }
+ else if ((name = fetch_unix_name_from_rfc2307 (gid, true)))
+ {
+ char *mbname = NULL;
+ sys_wcstombs_alloc (&mbname, HEAP_NOTHEAP, name);
+ if ((gr = internal_getgrnam (mbname)))
+ return gr->gr_gid;
+ }
+ return ILLEGAL_GID;
+}
diff --git a/winsup/cygwin/ldap.h b/winsup/cygwin/ldap.h
new file mode 100644
index 000000000..993f5100c
--- /dev/null
+++ b/winsup/cygwin/ldap.h
@@ -0,0 +1,67 @@
+/* ldap.h.
+
+This file is part of Cygwin.
+
+This software is a copyrighted work licensed under the terms of the
+Cygwin license. Please consult the file "CYGWIN_LICENSE" for
+details. */
+
+#pragma once
+
+#pragma push_macro ("DECLSPEC_IMPORT")
+#undef DECLSPEC_IMPORT
+#define DECLSPEC_IMPORT
+#include <winldap.h>
+#include <ntldap.h>
+#pragma pop_macro ("DECLSPEC_IMPORT")
+
+class cyg_ldap {
+ PLDAP lh;
+ PWCHAR def_context;
+ PLDAPMessage msg, entry;
+ PWCHAR *val;
+ PWCHAR *attr;
+ bool isAD;
+ PLDAPSearch srch_id;
+ cygsid last_fetched_sid;
+
+ inline int map_ldaperr_to_errno (ULONG lerr);
+ inline int wait (cygthread *thr);
+ inline int connect (PCWSTR domain);
+ inline int search (PWCHAR base, ULONG scope, PWCHAR filter, PWCHAR *attrs);
+ inline int next_page ();
+ bool fetch_unix_sid_from_ad (uint32_t id, cygsid &sid, bool group);
+ PWCHAR fetch_unix_name_from_rfc2307 (uint32_t id, bool group);
+
+public:
+ cyg_ldap () : lh (NULL), def_context (NULL), msg (NULL), entry (NULL),
+ val (NULL), isAD (false), srch_id (NULL),
+ last_fetched_sid (NO_SID)
+ {}
+ ~cyg_ldap () { close (); }
+
+ ULONG connect_ssl (PCWSTR domain);
+ ULONG connect_non_ssl (PCWSTR domain);
+ ULONG search_s (PWCHAR base, ULONG scope, PWCHAR filter, PWCHAR *attrs);
+ ULONG next_page_s ();
+
+ bool is_open () const { return !!lh; }
+ operator PLDAP () const { return lh; }
+ int open (PCWSTR in_domain);
+ void close ();
+ PWCHAR get_string_attribute (PCWSTR name);
+ uint32_t get_num_attribute (PCWSTR name);
+ bool fetch_ad_account (PSID sid, bool group, PCWSTR domain = NULL);
+ int enumerate_ad_accounts (PCWSTR domain, bool group);
+ int next_account (cygsid &sid);
+ uint32_t fetch_posix_offset_for_domain (PCWSTR domain);
+ uid_t remap_uid (uid_t uid);
+ gid_t remap_gid (gid_t gid);
+ /* User only */
+ gid_t get_primary_gid () { return get_num_attribute (L"primaryGroupID"); }
+ gid_t get_unix_uid () { return get_num_attribute (L"uidNumber"); }
+ /* group only */
+ PWCHAR get_group_name ()
+ { return get_string_attribute (L"sAMAccountName"); }
+ gid_t get_unix_gid () { return get_num_attribute (L"gidNumber"); }
+};
diff --git a/winsup/cygwin/lib/_cygwin_crt0_common.cc b/winsup/cygwin/lib/_cygwin_crt0_common.cc
index 718ce941e..612aa123d 100644
--- a/winsup/cygwin/lib/_cygwin_crt0_common.cc
+++ b/winsup/cygwin/lib/_cygwin_crt0_common.cc
@@ -1,8 +1,5 @@
/* _cygwin_crt0_common.cc: common crt0 function for cygwin crt0's.
- Copyright 2000, 2001, 2002, 2003, 2004, 2009, 2010, 2011, 2012, 2013
- Red Hat, Inc.
-
This file is part of Cygwin.
This software is a copyrighted work licensed under the terms of the
@@ -135,9 +132,8 @@ _cygwin_crt0_common (MainFunc f, per_process *u)
u->premain[3] = cygwin_premain3;
u->fmode_ptr = &_fmode;
- /* This is used to record what the initial sp was. The value is needed
- when copying the parent's stack to the child during a fork. */
- u->initial_sp = (char *) __builtin_frame_address (1);
+ /* Unused */
+ u->initial_sp = NULL;
/* Remember whatever the user linked his application with - or
point to entries in the dll. */
diff --git a/winsup/cygwin/lib/atexit.c b/winsup/cygwin/lib/atexit.c
new file mode 100644
index 000000000..067c64eae
--- /dev/null
+++ b/winsup/cygwin/lib/atexit.c
@@ -0,0 +1,47 @@
+/* atexit.c: atexit entry point
+
+This file is part of Cygwin.
+
+This software is a copyrighted work licensed under the terms of the
+Cygwin license. Please consult the file "CYGWIN_LICENSE" for
+details. */
+
+#include <stddef.h>
+#include <sys/cygwin.h>
+#include <windows.h>
+
+/* Statically linked replacement for the former cygwin_atexit. We need
+ the function here to be able to access the correct __dso_handle of the
+ caller's DSO. */
+
+int
+atexit (void (*fn) (void))
+{
+ extern int __cxa_atexit(void (*)(void*), void*, void*);
+ extern void *__dso_handle;
+ extern void *__ImageBase;
+
+ void *fixed_dso_handle = &__dso_handle;
+ /* Check for being called from inside the executable. If so, use NULL
+ as __dso_handle. This allows to link executables with GCC versions
+ not providing __dso_handle in crtbegin{S}.o. In this case our own
+ __dso_handle defined in lib/dso_handle.c is used. However, our
+ __dso_handle always points to &__ImageBase, while the __dso_handle
+ for executables provided by crtbegin.o usually points to NULL.
+ That's what we remodel here. */
+ if (&__ImageBase == (void **) GetModuleHandleW (NULL))
+ fixed_dso_handle = NULL;
+ /* With recent Cygwin versions starting with API version 0.280 we call
+ __cxa_atexit (which is actually the cygwin__cxa_atexit wrapper in
+ dcrt0.cc) with the address of __dso_handle since that's how g++ generates
+ calls to __cxa_atexit as well. However, when running an application
+ built with this atexit under an older Cygwin version, the __cxa_atexit
+ entry point is the one from newlib, which expects the *value* of
+ __dso_handle. So, check for the Cygwin version we're running under.
+ Older version prior to 0.280 don't know CW_FIXED_ATEXIT and return -1.
+ 0.280 and later return 0. */
+ else if (cygwin_internal (CW_FIXED_ATEXIT) != 0)
+ fixed_dso_handle = __dso_handle;
+
+ return __cxa_atexit ((void (*)(void*))fn, NULL, fixed_dso_handle);
+}
diff --git a/winsup/cygwin/lib/crt0.h b/winsup/cygwin/lib/crt0.h
index d289e7824..c551de78f 100644
--- a/winsup/cygwin/lib/crt0.h
+++ b/winsup/cygwin/lib/crt0.h
@@ -1,7 +1,5 @@
/* crt0.h: header file for crt0.
- Copyright 2000, 2001, 2008, 2012 Red Hat, Inc.
-
This file is part of Cygwin.
This software is a copyrighted work licensed under the terms of the
diff --git a/winsup/cygwin/lib/cygwin_attach_dll.c b/winsup/cygwin/lib/cygwin_attach_dll.c
index 543073c89..866bfd80f 100644
--- a/winsup/cygwin/lib/cygwin_attach_dll.c
+++ b/winsup/cygwin/lib/cygwin_attach_dll.c
@@ -1,7 +1,5 @@
/* attach_dll.cc: crt0 for attaching cygwin DLL from a non-cygwin app.
- Copyright 2000, 2001, 2007, 2010 Red Hat, Inc.
-
This file is part of Cygwin.
This software is a copyrighted work licensed under the terms of the
diff --git a/winsup/cygwin/lib/cygwin_crt0.c b/winsup/cygwin/lib/cygwin_crt0.c
index 952ae28b7..776e7e8de 100644
--- a/winsup/cygwin/lib/cygwin_crt0.c
+++ b/winsup/cygwin/lib/cygwin_crt0.c
@@ -1,7 +1,5 @@
/* cygwin_crt0.c: crt0 for cygwin
- Copyright 2000, 2001, 2007, 2008, 2009, 2011 Red Hat, Inc.
-
This file is part of Cygwin.
This software is a copyrighted work licensed under the terms of the
diff --git a/winsup/cygwin/lib/dll_entry.c b/winsup/cygwin/lib/dll_entry.c
index 781f6a3ea..d0c390dde 100644
--- a/winsup/cygwin/lib/dll_entry.c
+++ b/winsup/cygwin/lib/dll_entry.c
@@ -1,7 +1,5 @@
/* dll_entry.cc: Provide the default user DLL linker entry point.
- Copyright 1998, 2000, 2001 Red Hat, Inc.
-
This software is a copyrighted work licensed under the terms of the
Cygwin license. Please consult the file "CYGWIN_LICENSE" for
details. */
diff --git a/winsup/cygwin/lib/dll_main.cc b/winsup/cygwin/lib/dll_main.cc
index 558c3485b..2e8b410eb 100644
--- a/winsup/cygwin/lib/dll_main.cc
+++ b/winsup/cygwin/lib/dll_main.cc
@@ -1,7 +1,5 @@
/* dll_main.cc: Provide the DllMain stub that the user can override.
- Copyright 1998, 2000, 2001, 2009, 2010 Red Hat, Inc.
-
This software is a copyrighted work licensed under the terms of the
Cygwin license. Please consult the file "CYGWIN_LICENSE" for
details. */
diff --git a/winsup/cygwin/include/cygwin/_types.h b/winsup/cygwin/lib/dso_handle.c
index b96267622..25572bf36 100644
--- a/winsup/cygwin/include/cygwin/_types.h
+++ b/winsup/cygwin/lib/dso_handle.c
@@ -1,6 +1,4 @@
-/* cygwin/_types.h
-
- Copyright 2004 Red Hat, Inc.
+/* dso_handle.c: Provide default __dso_handle.
This file is part of Cygwin.
@@ -8,9 +6,5 @@ This software is a copyrighted work licensed under the terms of the
Cygwin license. Please consult the file "CYGWIN_LICENSE" for
details. */
-#ifndef _CYGWIN__TYPES_H
-#define _CYGWIN__TYPES_H
-
-typedef void *_flock_t;
-
-#endif /* _CYGWIN__TYPES_H */
+extern void *__ImageBase;
+void *__dso_handle = &__ImageBase;
diff --git a/winsup/cygwin/lib/libcmain.c b/winsup/cygwin/lib/libcmain.c
index 73c698d31..e796d3b63 100644
--- a/winsup/cygwin/lib/libcmain.c
+++ b/winsup/cygwin/lib/libcmain.c
@@ -1,7 +1,5 @@
/* libcmain.c
- Copyright 1996, 1997, 1998, 2000, 2001, 2004, 2006, 2009 Red Hat, Inc.
-
This file is part of Cygwin.
This software is a copyrighted work licensed under the terms of the
diff --git a/winsup/cygwin/lib/premain0.c b/winsup/cygwin/lib/premain0.c
index 20e4e7712..5c3b1cb3c 100644
--- a/winsup/cygwin/lib/premain0.c
+++ b/winsup/cygwin/lib/premain0.c
@@ -1,7 +1,5 @@
/* premain0.c
- Copyright 2000, 2013 Red Hat, Inc.
-
This file is part of Cygwin.
This software is a copyrighted work licensed under the terms of the
diff --git a/winsup/cygwin/lib/premain1.c b/winsup/cygwin/lib/premain1.c
index e30d11265..557d1f836 100644
--- a/winsup/cygwin/lib/premain1.c
+++ b/winsup/cygwin/lib/premain1.c
@@ -1,7 +1,5 @@
/* premain1.c
- Copyright 2000, 2013 Red Hat, Inc.
-
This file is part of Cygwin.
This software is a copyrighted work licensed under the terms of the
diff --git a/winsup/cygwin/lib/premain2.c b/winsup/cygwin/lib/premain2.c
index 437562dc5..e5d5a1efb 100644
--- a/winsup/cygwin/lib/premain2.c
+++ b/winsup/cygwin/lib/premain2.c
@@ -1,7 +1,5 @@
/* premain2.c
- Copyright 2000, 2013 Red Hat, Inc.
-
This file is part of Cygwin.
This software is a copyrighted work licensed under the terms of the
diff --git a/winsup/cygwin/lib/premain3.c b/winsup/cygwin/lib/premain3.c
index b37758600..6440ea825 100644
--- a/winsup/cygwin/lib/premain3.c
+++ b/winsup/cygwin/lib/premain3.c
@@ -1,7 +1,5 @@
/* premain3.c
- Copyright 2000, 2013 Red Hat, Inc.
-
This file is part of Cygwin.
This software is a copyrighted work licensed under the terms of the
diff --git a/winsup/cygwin/libc/arc4random.cc b/winsup/cygwin/libc/arc4random.cc
deleted file mode 100644
index 2a38b1355..000000000
--- a/winsup/cygwin/libc/arc4random.cc
+++ /dev/null
@@ -1,363 +0,0 @@
-/* $OpenBSD: arc4random.c,v 1.22 2010/12/22 08:23:42 otto Exp $ */
-
-/*
- * Copyright (c) 1996, David Mazieres <dm@uun.org>
- * Copyright (c) 2008, Damien Miller <djm@openbsd.org>
- *
- * Permission to use, copy, modify, and distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
- * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
- * ANY SPECIAL, DIRECT, 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.
- */
-
-/*
- * Arc4 random number generator for OpenBSD.
- *
- * This code is derived from section 17.1 of Applied Cryptography,
- * second edition, which describes a stream cipher allegedly
- * compatible with RSA Labs "RC4" cipher (the actual description of
- * which is a trade secret). The same algorithm is used as a stream
- * cipher called "arcfour" in Tatu Ylonen's ssh package.
- *
- * RC4 is a registered trademark of RSA Laboratories.
- */
-
-#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/lib/libc/gen/arc4random.c,v 1.30 2012/11/17 01:49:23 svnexp Exp $");
-
-#ifdef __CYGWIN__
-#include "winsup.h"
-#include "sync.h"
-#else
-#include "namespace.h"
-#endif
-#include <fcntl.h>
-#include <limits.h>
-#include <stdlib.h>
-#include <unistd.h>
-#include <sys/types.h>
-#include <sys/param.h>
-#ifndef __CYGWIN__
-#include <sys/sysctl.h>
-#endif
-#include <sys/time.h>
-#include <pthread.h>
-
-#ifndef __CYGWIN__
-#include "libc_private.h"
-#include "un-namespace.h"
-#endif
-
-#ifdef __CYGWIN__
-#define _open open
-#define _read read
-#define _close close
-#endif
-
-#ifdef __GNUC__
-#define inline __inline
-#else /* !__GNUC__ */
-#define inline
-#endif /* !__GNUC__ */
-
-struct arc4_stream {
- u_int8_t i;
- u_int8_t j;
- u_int8_t s[256];
-};
-
-#ifdef __CYGWIN__
-static NO_COPY muto arc4random_mtx;
-#else
-static pthread_mutex_t arc4random_mtx = PTHREAD_MUTEX_INITIALIZER;
-#endif
-
-#define RANDOMDEV "/dev/random"
-#define KEYSIZE 128
-#ifdef __CYGWIN__
-#define _ARC4_LOCK() \
- do { \
- if (__isthreaded) \
- arc4random_mtx.init ("arc4random_mtx")->acquire (); \
- } while (0)
-#define _ARC4_UNLOCK() \
- do { \
- if (__isthreaded) \
- arc4random_mtx.release (); \
- } while (0)
-#else
-#define _ARC4_LOCK() \
- do { \
- if (__isthreaded) \
- _pthread_mutex_lock(&arc4random_mtx); \
- } while (0)
-
-#define _ARC4_UNLOCK() \
- do { \
- if (__isthreaded) \
- _pthread_mutex_unlock(&arc4random_mtx); \
- } while (0)
-#endif
-
-static int rs_initialized;
-static struct arc4_stream rs;
-static pid_t arc4_stir_pid;
-static int arc4_count;
-
-#ifndef __CYGWIN__
-extern int __sysctl(int *name, u_int namelen, void *oldp, size_t *oldlenp,
- void *newp, size_t newlen);
-#endif
-
-static inline u_int8_t arc4_getbyte(void);
-static void arc4_stir(void);
-
-static inline void
-arc4_init(void)
-{
- int n;
-
- for (n = 0; n < 256; n++)
- rs.s[n] = n;
- rs.i = 0;
- rs.j = 0;
-}
-
-static inline void
-arc4_addrandom(u_char *dat, int datlen)
-{
- int n;
- u_int8_t si;
-
- rs.i--;
- for (n = 0; n < 256; n++) {
- rs.i = (rs.i + 1);
- si = rs.s[rs.i];
- rs.j = (rs.j + si + dat[n % datlen]);
- rs.s[rs.i] = rs.s[rs.j];
- rs.s[rs.j] = si;
- }
- rs.j = rs.i;
-}
-
-#ifndef __CYGWIN__
-static size_t
-arc4_sysctl(u_char *buf, size_t size)
-{
- int mib[2];
- size_t len, done;
-
- mib[0] = CTL_KERN;
- mib[1] = KERN_ARND;
- done = 0;
-
- do {
- len = size;
- if (__sysctl(mib, 2, buf, &len, NULL, 0) == -1)
- return (done);
- done += len;
- buf += len;
- size -= len;
- } while (size > 0);
-
- return (done);
-}
-#endif
-
-static void
-arc4_stir(void)
-{
- int done, fd, i;
- struct {
- struct timeval tv;
- pid_t pid;
- u_char rnd[KEYSIZE];
- } rdat;
-
- if (!rs_initialized) {
- arc4_init();
- rs_initialized = 1;
- }
- done = 0;
-#ifndef __CYGWIN__
- if (arc4_sysctl((u_char *)&rdat, KEYSIZE) == KEYSIZE)
- done = 1;
-#endif
- if (!done) {
- fd = _open(RANDOMDEV, O_RDONLY | O_CLOEXEC, 0);
- if (fd >= 0) {
- if (_read(fd, &rdat, KEYSIZE) == KEYSIZE)
- done = 1;
- (void)_close(fd);
- }
- }
- if (!done) {
- (void)gettimeofday(&rdat.tv, NULL);
- rdat.pid = getpid();
- /* We'll just take whatever was on the stack too... */
- }
-
- arc4_addrandom((u_char *)&rdat, KEYSIZE);
-
- /*
- * Discard early keystream, as per recommendations in:
- * "(Not So) Random Shuffles of RC4" by Ilya Mironov.
- */
- for (i = 0; i < 1024; i++)
- (void)arc4_getbyte();
- arc4_count = 1600000;
-}
-
-static void
-arc4_stir_if_needed(void)
-{
- pid_t pid = getpid();
-
- if (arc4_count <= 0 || !rs_initialized || arc4_stir_pid != pid)
- {
- arc4_stir_pid = pid;
- arc4_stir();
- }
-}
-
-static inline u_int8_t
-arc4_getbyte(void)
-{
- u_int8_t si, sj;
-
- rs.i = (rs.i + 1);
- si = rs.s[rs.i];
- rs.j = (rs.j + si);
- sj = rs.s[rs.j];
- rs.s[rs.i] = sj;
- rs.s[rs.j] = si;
- return (rs.s[(si + sj) & 0xff]);
-}
-
-static inline u_int32_t
-arc4_getword(void)
-{
- u_int32_t val;
- val = arc4_getbyte() << 24;
- val |= arc4_getbyte() << 16;
- val |= arc4_getbyte() << 8;
- val |= arc4_getbyte();
- return val;
-}
-
-void
-arc4random_stir(void)
-{
- _ARC4_LOCK();
- arc4_stir();
- _ARC4_UNLOCK();
-}
-
-void
-arc4random_addrandom(u_char *dat, int datlen)
-{
- _ARC4_LOCK();
- if (!rs_initialized)
- arc4_stir();
- arc4_addrandom(dat, datlen);
- _ARC4_UNLOCK();
-}
-
-u_int32_t
-arc4random(void)
-{
- u_int32_t val;
- _ARC4_LOCK();
- arc4_count -= 4;
- arc4_stir_if_needed();
- val = arc4_getword();
- _ARC4_UNLOCK();
- return val;
-}
-
-void
-arc4random_buf(void *_buf, size_t n)
-{
- u_char *buf = (u_char *)_buf;
- _ARC4_LOCK();
- arc4_stir_if_needed();
- while (n--) {
- if (--arc4_count <= 0)
- arc4_stir();
- buf[n] = arc4_getbyte();
- }
- _ARC4_UNLOCK();
-}
-
-/*
- * Calculate a uniformly distributed random number less than upper_bound
- * avoiding "modulo bias".
- *
- * Uniformity is achieved by generating new random numbers until the one
- * returned is outside the range [0, 2**32 % upper_bound). This
- * guarantees the selected random number will be inside
- * [2**32 % upper_bound, 2**32) which maps back to [0, upper_bound)
- * after reduction modulo upper_bound.
- */
-u_int32_t
-arc4random_uniform(u_int32_t upper_bound)
-{
- u_int32_t r, min;
-
- if (upper_bound < 2)
- return 0;
-
-#if (ULONG_MAX > 0xffffffffUL)
- min = 0x100000000UL % upper_bound;
-#else
- /* Calculate (2**32 % upper_bound) avoiding 64-bit math */
- if (upper_bound > 0x80000000)
- min = 1 + ~upper_bound; /* 2**32 - upper_bound */
- else {
- /* (2**32 - (x * 2)) % x == 2**32 % x when x <= 2**31 */
- min = ((0xffffffff - (upper_bound * 2)) + 1) % upper_bound;
- }
-#endif
-
- /*
- * This could theoretically loop forever but each retry has
- * p > 0.5 (worst case, usually far better) of selecting a
- * number inside the range we need, so it should rarely need
- * to re-roll.
- */
- for (;;) {
- r = arc4random();
- if (r >= min)
- break;
- }
-
- return r % upper_bound;
-}
-
-#if 0
-/*-------- Test code for i386 --------*/
-#include <stdio.h>
-#include <machine/pctr.h>
-int
-main(int argc, char **argv)
-{
- const int iter = 1000000;
- int i;
- pctrval v;
-
- v = rdtsc();
- for (i = 0; i < iter; i++)
- arc4random();
- v = rdtsc() - v;
- v /= iter;
-
- printf("%qd cycles\n", v);
-}
-#endif
diff --git a/winsup/cygwin/libc/arc4random_stir.c b/winsup/cygwin/libc/arc4random_stir.c
new file mode 100644
index 000000000..6b26101b2
--- /dev/null
+++ b/winsup/cygwin/libc/arc4random_stir.c
@@ -0,0 +1,22 @@
+/* libc/arc4random_stir.c
+
+This file is part of Cygwin.
+
+This software is a copyrighted work licensed under the terms of the
+Cygwin license. Please consult the file "CYGWIN_LICENSE" for
+details. */
+
+#include <sys/types.h>
+
+/* Exported functions removed from OpenBSD in the meantime. Keep them,
+ but make them non-functional. They don't return a value anyway. */
+
+void
+arc4random_stir(void)
+{
+}
+
+void
+arc4random_addrandom(u_int8_t *dat, int datlen)
+{
+}
diff --git a/winsup/cygwin/libc/base64.c b/winsup/cygwin/libc/base64.c
index 933c92721..a067fe2eb 100644
--- a/winsup/cygwin/libc/base64.c
+++ b/winsup/cygwin/libc/base64.c
@@ -128,10 +128,12 @@ static const char Pad64 = '=';
*/
int
-b64_ntop(u_char const *src, size_t srclength, char *target, size_t targsize) {
+b64_ntop(unsigned char const *src, size_t srclength, char *target,
+ size_t targsize)
+{
size_t datalength = 0;
- u_char input[3];
- u_char output[4];
+ unsigned char input[3];
+ unsigned char output[4];
size_t i;
while (2 < srclength) {
@@ -194,10 +196,7 @@ b64_ntop(u_char const *src, size_t srclength, char *target, size_t targsize) {
*/
int
-b64_pton(src, target, targsize)
- char const *src;
- u_char *target;
- size_t targsize;
+b64_pton(char const *src, unsigned char *target, size_t targsize)
{
int tarindex, state, ch;
char *pos;
diff --git a/winsup/cygwin/libc/bsdlib.cc b/winsup/cygwin/libc/bsdlib.cc
index 66cffc7d3..89bc9431c 100644
--- a/winsup/cygwin/libc/bsdlib.cc
+++ b/winsup/cygwin/libc/bsdlib.cc
@@ -150,6 +150,8 @@ forkpty (int *amaster, char *name, const struct termios *termp,
switch (pid = fork ())
{
case -1:
+ close (master);
+ close (slave);
return -1;
case 0:
close (master);
@@ -247,8 +249,7 @@ getprogname (void)
extern "C" void
setprogname (const char *newprogname)
{
- myfault efault;
- if (!efault.faulted (EFAULT))
+ __try
{
/* Per BSD man page, setprogname keeps a pointer to the last
path component of the argument. It does *not* copy the
@@ -259,6 +260,8 @@ setprogname (const char *newprogname)
else
__progname = (char *)newprogname;
}
+ __except (EFAULT) {}
+ __endtry
}
extern "C" void
diff --git a/winsup/cygwin/libc/fnmatch.c b/winsup/cygwin/libc/fnmatch.c
index 295f4c413..fc4376510 100644
--- a/winsup/cygwin/libc/fnmatch.c
+++ b/winsup/cygwin/libc/fnmatch.c
@@ -5,6 +5,11 @@
* This code is derived from software contributed to Berkeley by
* Guido van Rossum.
*
+ * Copyright (c) 2011 The FreeBSD Foundation
+ * All rights reserved.
+ * Portions of this software were developed by David Chisnall
+ * under sponsorship from the FreeBSD Foundation.
+ *
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
@@ -33,10 +38,9 @@
#if defined(LIBC_SCCS) && !defined(lint)
static char sccsid[] = "@(#)fnmatch.c 8.2 (Berkeley) 4/16/94";
#endif /* LIBC_SCCS and not lint */
+#include "winsup.h"
#include <sys/cdefs.h>
-#if 0
-__FBSDID("$FreeBSD: src/lib/libc/gen/fnmatch.c,v 1.18 2007/01/09 00:27:53 imp Exp $");
-#endif
+__FBSDID("$FreeBSD: head/lib/libc/gen/fnmatch.c 288309 2015-09-27 12:52:18Z jilles $");
/*
* Function fnmatch() as specified in POSIX 1003.2-1992, section B.6.
@@ -60,7 +64,11 @@ __FBSDID("$FreeBSD: src/lib/libc/gen/fnmatch.c,v 1.18 2007/01/09 00:27:53 imp Ex
#include <wchar.h>
#include <wctype.h>
-#include "../posix/collate.h"
+#ifdef __CYGWIN__
+#include "../collate.h"
+#else
+#include "collate.h"
+#endif
#define EOS '\0'
@@ -69,31 +77,30 @@ __FBSDID("$FreeBSD: src/lib/libc/gen/fnmatch.c,v 1.18 2007/01/09 00:27:53 imp Ex
#define RANGE_ERROR (-1)
static int rangematch(const char *, wchar_t, int, char **, mbstate_t *);
-static int fnmatch1(const char *, const char *, int, mbstate_t, mbstate_t);
+static int fnmatch1(const char *, const char *, const char *, int, mbstate_t,
+ mbstate_t);
int
-fnmatch(pattern, string, flags)
- const char *pattern, *string;
- int flags;
+fnmatch(const char *pattern, const char *string, int flags)
{
static const mbstate_t initial;
- return (fnmatch1(pattern, string, flags, initial, initial));
+ return (fnmatch1(pattern, string, string, flags, initial, initial));
}
static int
-fnmatch1(pattern, string, flags, patmbs, strmbs)
- const char *pattern, *string;
- int flags;
- mbstate_t patmbs, strmbs;
+fnmatch1(const char *pattern, const char *string, const char *stringstart,
+ int flags, mbstate_t patmbs, mbstate_t strmbs)
{
- const char *stringstart;
+ const char *bt_pattern, *bt_string;
+ mbstate_t bt_patmbs, bt_strmbs;
char *newp;
char c;
wchar_t pc, sc;
size_t pclen, sclen;
- for (stringstart = string;;) {
+ bt_pattern = bt_string = NULL;
+ for (;;) {
pclen = mbrtowc(&pc, pattern, MB_LEN_MAX, &patmbs);
if (pclen == (size_t)-1 || pclen == (size_t)-2)
return (FNM_NOMATCH);
@@ -108,16 +115,18 @@ fnmatch1(pattern, string, flags, patmbs, strmbs)
case EOS:
if ((flags & FNM_LEADING_DIR) && sc == '/')
return (0);
- return (sc == EOS ? 0 : FNM_NOMATCH);
+ if (sc == EOS)
+ return (0);
+ goto backtrack;
case '?':
if (sc == EOS)
return (FNM_NOMATCH);
if (sc == '/' && (flags & FNM_PATHNAME))
- return (FNM_NOMATCH);
+ goto backtrack;
if (sc == '.' && (flags & FNM_PERIOD) &&
(string == stringstart ||
((flags & FNM_PATHNAME) && *(string - 1) == '/')))
- return (FNM_NOMATCH);
+ goto backtrack;
string += sclen;
break;
case '*':
@@ -129,7 +138,7 @@ fnmatch1(pattern, string, flags, patmbs, strmbs)
if (sc == '.' && (flags & FNM_PERIOD) &&
(string == stringstart ||
((flags & FNM_PATHNAME) && *(string - 1) == '/')))
- return (FNM_NOMATCH);
+ goto backtrack;
/* Optimize for pattern with * at end or before /. */
if (c == EOS)
@@ -145,33 +154,24 @@ fnmatch1(pattern, string, flags, patmbs, strmbs)
break;
}
- /* General case, use recursion. */
- while (sc != EOS) {
- if (!fnmatch1(pattern, string,
- flags & ~FNM_PERIOD, patmbs, strmbs))
- return (0);
- sclen = mbrtowc(&sc, string, MB_LEN_MAX,
- &strmbs);
- if (sclen == (size_t)-1 ||
- sclen == (size_t)-2) {
- sc = (unsigned char)*string;
- sclen = 1;
- memset(&strmbs, 0, sizeof(strmbs));
- }
- if (sc == '/' && flags & FNM_PATHNAME)
- break;
- string += sclen;
- }
- return (FNM_NOMATCH);
+ /*
+ * First try the shortest match for the '*' that
+ * could work. We can forget any earlier '*' since
+ * there is no way having it match more characters
+ * can help us, given that we are already here.
+ */
+ bt_pattern = pattern, bt_patmbs = patmbs;
+ bt_string = string, bt_strmbs = strmbs;
+ break;
case '[':
if (sc == EOS)
return (FNM_NOMATCH);
if (sc == '/' && (flags & FNM_PATHNAME))
- return (FNM_NOMATCH);
+ goto backtrack;
if (sc == '.' && (flags & FNM_PERIOD) &&
(string == stringstart ||
((flags & FNM_PATHNAME) && *(string - 1) == '/')))
- return (FNM_NOMATCH);
+ goto backtrack;
switch (rangematch(pattern, sc, flags, &newp,
&patmbs)) {
@@ -181,7 +181,7 @@ fnmatch1(pattern, string, flags, patmbs, strmbs)
pattern = newp;
break;
case RANGE_NOMATCH:
- return (FNM_NOMATCH);
+ goto backtrack;
}
string += sclen;
break;
@@ -191,21 +191,44 @@ fnmatch1(pattern, string, flags, patmbs, strmbs)
&patmbs);
if (pclen == (size_t)-1 || pclen == (size_t)-2)
return (FNM_NOMATCH);
- if (pclen == 0)
- pc = '\\';
pattern += pclen;
}
/* FALLTHROUGH */
default:
norm:
+ string += sclen;
if (pc == sc)
;
else if ((flags & FNM_CASEFOLD) &&
(towlower(pc) == towlower(sc)))
;
- else
- return (FNM_NOMATCH);
- string += sclen;
+ else {
+ backtrack:
+ /*
+ * If we have a mismatch (other than hitting
+ * the end of the string), go back to the last
+ * '*' seen and have it match one additional
+ * character.
+ */
+ if (bt_pattern == NULL)
+ return (FNM_NOMATCH);
+ sclen = mbrtowc(&sc, bt_string, MB_LEN_MAX,
+ &bt_strmbs);
+ if (sclen == (size_t)-1 ||
+ sclen == (size_t)-2) {
+ sc = (unsigned char)*bt_string;
+ sclen = 1;
+ memset(&bt_strmbs, 0,
+ sizeof(bt_strmbs));
+ }
+ if (sc == EOS)
+ return (FNM_NOMATCH);
+ if (sc == '/' && flags & FNM_PATHNAME)
+ return (FNM_NOMATCH);
+ bt_string += sclen;
+ pattern = bt_pattern, patmbs = bt_patmbs;
+ string = bt_string, strmbs = bt_strmbs;
+ }
break;
}
}
@@ -213,17 +236,17 @@ fnmatch1(pattern, string, flags, patmbs, strmbs)
}
static int
-rangematch(pattern, test, flags, newp, patmbs)
- const char *pattern;
- wchar_t test;
- int flags;
- char **newp;
- mbstate_t *patmbs;
+rangematch(const char *pattern, wchar_t test, int flags, char **newp,
+ mbstate_t *patmbs)
{
int negate, ok;
wchar_t c, c2;
size_t pclen;
const char *origpat;
+#ifndef __CYGWIN__
+ struct xlocale_collate *table =
+ (struct xlocale_collate*)__get_locale()->components[XLC_COLLATE];
+#endif
/*
* A bracket expression starting with an unquoted circumflex
@@ -278,11 +301,19 @@ rangematch(pattern, test, flags, newp, patmbs)
if (flags & FNM_CASEFOLD)
c2 = towlower(c2);
+#ifdef __CYGWIN__
if (__collate_load_error ?
c <= test && test <= c2 :
__collate_range_cmp(c, test) <= 0
&& __collate_range_cmp(test, c2) <= 0
)
+#else
+ if (table->__collate_load_error ?
+ c <= test && test <= c2 :
+ __collate_range_cmp(table, c, test) <= 0
+ && __collate_range_cmp(table, test, c2) <= 0
+ )
+#endif
ok = 1;
} else if (c == test)
ok = 1;
diff --git a/winsup/cygwin/libc/fts.c b/winsup/cygwin/libc/fts.c
index e82ec3fd7..003f85146 100644
--- a/winsup/cygwin/libc/fts.c
+++ b/winsup/cygwin/libc/fts.c
@@ -34,14 +34,9 @@
static char sccsid[] = "@(#)fts.c 8.6 (Berkeley) 8/14/94";
#endif /* LIBC_SCCS and not lint */
#endif
-#ifdef __CYGWIN__
-#include "winsup.h"
-#include <sys/statfs.h>
-#define _open open
-#define _close close
-#endif
+
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: /repoman/r/ncvs/src/lib/libc/gen/fts.c,v 1.27 2004/06/08 06:23:23 das Exp $");
+__FBSDID("$FreeBSD: src/lib/libc/gen/fts.c,v 1.39 2013/02/11 02:00:16 svnexp Exp $");
#ifndef __CYGWIN__
#include "namespace.h"
@@ -57,19 +52,37 @@ __FBSDID("$FreeBSD: /repoman/r/ncvs/src/lib/libc/gen/fts.c,v 1.27 2004/06/08 06:
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
-#ifndef __CYGWIN__
+#ifdef __CYGWIN__
+#include "winsup.h"
+#include <sys/statfs.h>
+#define _open open
+#define _close close
+#define _dirfd dirfd
+#ifdef __x86_64__
+#define _fstat fstat
+#else
+extern int stat64 (const char *path, struct stat *buf);
+extern int fstat64 (int fd, struct stat *buf);
+extern int lstat64 (const char *path, struct stat *buf);
+#define stat(a,b) stat64((a),(b))
+#define _fstat(a,b) fstat64((a),(b))
+#define lstat(a,b) lstat64((a),(b))
+#endif
+#else
#include "un-namespace.h"
+
+#include "gen-private.h"
#endif
-static FTSENT *fts_alloc(FTS *, const char *, int);
+static FTSENT *fts_alloc(FTS *, const char *, size_t);
static FTSENT *fts_build(FTS *, int);
static void fts_lfree(FTSENT *);
static void fts_load(FTS *, FTSENT *);
static size_t fts_maxarglen(char * const *);
static void fts_padjust(FTS *, FTSENT *);
static int fts_palloc(FTS *, size_t);
-static FTSENT *fts_sort(FTS *, FTSENT *, int);
-static u_short fts_stat(FTS *, FTSENT *, int);
+static FTSENT *fts_sort(FTS *, FTSENT *, size_t);
+static int fts_stat(FTS *, FTSENT *, int);
static int fts_safe_changedir(FTS *, FTSENT *, int, const char *);
static int fts_ufslinks(FTS *, const FTSENT *);
@@ -110,6 +123,7 @@ struct _fts_private {
#ifndef __CYGWIN__
static const char *ufslike_filesystems[] = {
"ufs",
+ "zfs",
"nfs",
"nfs4",
"ext2fs",
@@ -126,9 +140,8 @@ fts_open(argv, options, compar)
struct _fts_private *priv;
FTS *sp;
FTSENT *p, *root;
- int nitems;
FTSENT *parent, *tmp;
- int len;
+ size_t len, nitems;
/* Options check. */
if (options & ~FTS_OPTIONMASK) {
@@ -136,10 +149,15 @@ fts_open(argv, options, compar)
return (NULL);
}
+ /* fts_open() requires at least one path */
+ if (*argv == NULL) {
+ errno = EINVAL;
+ return (NULL);
+ }
+
/* Allocate/initialize the stream. */
- if ((priv = malloc(sizeof(*priv))) == NULL)
+ if ((priv = calloc(1, sizeof(*priv))) == NULL)
return (NULL);
- memset(priv, 0, sizeof(*priv));
sp = &priv->ftsp_fts;
sp->fts_compar = compar;
sp->fts_options = options;
@@ -218,7 +236,8 @@ fts_open(argv, options, compar)
* and ".." are all fairly nasty problems. Note, if we can't get the
* descriptor we run anyway, just more slowly.
*/
- if (!ISSET(FTS_NOCHDIR) && (sp->fts_rfd = _open(".", O_RDONLY, 0)) < 0)
+ if (!ISSET(FTS_NOCHDIR) &&
+ (sp->fts_rfd = _open(".", O_RDONLY | O_CLOEXEC, 0)) < 0)
SET(FTS_NOCHDIR);
return (sp);
@@ -231,11 +250,9 @@ mem1: free(sp);
}
static void
-fts_load(sp, p)
- FTS *sp;
- FTSENT *p;
+fts_load(FTS *sp, FTSENT *p)
{
- int len;
+ size_t len;
char *cp;
/*
@@ -257,8 +274,7 @@ fts_load(sp, p)
}
int
-fts_close(sp)
- FTS *sp;
+fts_close(FTS *sp)
{
FTSENT *freep, *p;
int saved_errno;
@@ -312,8 +328,7 @@ fts_close(sp)
? p->fts_pathlen - 1 : p->fts_pathlen)
FTSENT *
-fts_read(sp)
- FTS *sp;
+fts_read(FTS *sp)
{
FTSENT *p, *tmp;
int instr;
@@ -347,7 +362,8 @@ fts_read(sp)
(p->fts_info == FTS_SL || p->fts_info == FTS_SLNONE)) {
p->fts_info = fts_stat(sp, p, 1);
if (p->fts_info == FTS_D && !ISSET(FTS_NOCHDIR)) {
- if ((p->fts_symfd = _open(".", O_RDONLY, 0)) < 0) {
+ if ((p->fts_symfd = _open(".", O_RDONLY | O_CLOEXEC,
+ 0)) < 0) {
p->fts_errno = errno;
p->fts_info = FTS_ERR;
} else
@@ -438,7 +454,7 @@ next: tmp = p;
p->fts_info = fts_stat(sp, p, 1);
if (p->fts_info == FTS_D && !ISSET(FTS_NOCHDIR)) {
if ((p->fts_symfd =
- _open(".", O_RDONLY, 0)) < 0) {
+ _open(".", O_RDONLY | O_CLOEXEC, 0)) < 0) {
p->fts_errno = errno;
p->fts_info = FTS_ERR;
} else
@@ -506,10 +522,7 @@ name: t = sp->fts_path + NAPPEND(p->fts_parent);
*/
/* ARGSUSED */
int
-fts_set(sp, p, instr)
- FTS *sp __attribute__ ((unused));
- FTSENT *p;
- int instr;
+fts_set(FTS *sp, FTSENT *p, int instr)
{
if (instr != 0 && instr != FTS_AGAIN && instr != FTS_FOLLOW &&
instr != FTS_NOINSTR && instr != FTS_SKIP) {
@@ -521,9 +534,7 @@ fts_set(sp, p, instr)
}
FTSENT *
-fts_children(sp, instr)
- FTS *sp;
- int instr;
+fts_children(FTS *sp, int instr)
{
FTSENT *p;
int fd;
@@ -579,11 +590,13 @@ fts_children(sp, instr)
ISSET(FTS_NOCHDIR))
return (sp->fts_child = fts_build(sp, instr));
- if ((fd = _open(".", O_RDONLY, 0)) < 0)
+ if ((fd = _open(".", O_RDONLY | O_CLOEXEC, 0)) < 0)
return (NULL);
sp->fts_child = fts_build(sp, instr);
- if (fchdir(fd))
+ if (fchdir(fd)) {
+ (void)_close(fd);
return (NULL);
+ }
(void)_close(fd);
return (sp->fts_child);
}
@@ -631,20 +644,18 @@ fts_set_clientptr(FTS *sp, void *clientptr)
* been found, cutting the stat calls by about 2/3.
*/
static FTSENT *
-fts_build(sp, type)
- FTS *sp;
- int type;
+fts_build(FTS *sp, int type)
{
struct dirent *dp;
FTSENT *p, *head;
- int nitems;
FTSENT *cur, *tail;
DIR *dirp;
void *oldaddr;
- size_t dnamlen;
- int cderrno, descend, len, level, maxlen, nlinks, /*oflag,*/ saved_errno,
- nostat, doadjust;
char *cp;
+ int cderrno, descend, /* oflag, */ saved_errno, nostat, doadjust;
+ long level;
+ long nlinks; /* has to be signed because -1 is a magic value */
+ size_t dnamlen, len, maxlen, nitems;
/* Set current node pointer. */
cur = sp->fts_cur;
@@ -711,7 +722,7 @@ fts_build(sp, type)
*/
cderrno = 0;
if (nlinks || type == BREAD) {
- if (fts_safe_changedir(sp, cur, dirfd(dirp), NULL)) {
+ if (fts_safe_changedir(sp, cur, _dirfd(dirp), NULL)) {
if (nlinks && type == BREAD)
cur->fts_errno = errno;
cur->fts_flags |= FTS_DONTCHDIR;
@@ -756,9 +767,9 @@ fts_build(sp, type)
if (!ISSET(FTS_SEEDOT) && ISDOT(dp->d_name))
continue;
- if ((p = fts_alloc(sp, dp->d_name, (int)dnamlen)) == NULL)
+ if ((p = fts_alloc(sp, dp->d_name, dnamlen)) == NULL)
goto mem1;
- if ((int) dnamlen >= maxlen) { /* include space for NUL */
+ if (dnamlen >= maxlen) { /* include space for NUL */
oldaddr = sp->fts_path;
if (fts_palloc(sp, dnamlen + len + 1)) {
/*
@@ -785,21 +796,6 @@ mem1: saved_errno = errno;
maxlen = sp->fts_pathlen - len;
}
- if (len + dnamlen >= USHRT_MAX) {
- /*
- * In an FTSENT, fts_pathlen is a u_short so it is
- * possible to wraparound here. If we do, free up
- * the current structure and the structures already
- * allocated, then error out with ENAMETOOLONG.
- */
- free(p);
- fts_lfree(head);
- (void)closedir(dirp);
- cur->fts_info = FTS_ERR;
- SET(FTS_STOP);
- errno = ENAMETOOLONG;
- return (NULL);
- }
p->fts_level = level;
p->fts_parent = sp->fts_cur;
p->fts_pathlen = len + dnamlen;
@@ -817,7 +813,7 @@ mem1: saved_errno = errno;
p->fts_info = FTS_NSOK;
p->fts_accpath = cur->fts_accpath;
} else if (nlinks == 0
-#if defined(DT_DIR)
+#ifdef DT_DIR
|| (nostat &&
dp->d_type != DT_DIR && dp->d_type != DT_UNKNOWN)
#endif
@@ -865,11 +861,8 @@ mem1: saved_errno = errno;
* If not changing directories, reset the path back to original
* state.
*/
- if (ISSET(FTS_NOCHDIR)) {
- if (len == sp->fts_pathlen || nitems == 0)
- --cp;
- *cp = '\0';
- }
+ if (ISSET(FTS_NOCHDIR))
+ sp->fts_path[cur->fts_pathlen] = '\0';
/*
* If descended after called from fts_children or after called from
@@ -900,11 +893,8 @@ mem1: saved_errno = errno;
return (head);
}
-static u_short
-fts_stat(sp, p, follow)
- FTS *sp;
- FTSENT *p;
- int follow;
+static int
+fts_stat(FTS *sp, FTSENT *p, int follow)
{
FTSENT *t;
dev_t dev;
@@ -932,16 +922,16 @@ fts_stat(sp, p, follow)
* fail, set the errno from the stat call.
*/
if (ISSET(FTS_LOGICAL) || follow) {
- if (stat64(p->fts_accpath, sbp)) {
+ if (stat(p->fts_accpath, sbp)) {
saved_errno = errno;
- if (!lstat64(p->fts_accpath, sbp)) {
+ if (!lstat(p->fts_accpath, sbp)) {
errno = 0;
return (FTS_SLNONE);
}
p->fts_errno = saved_errno;
goto err;
}
- } else if (lstat64(p->fts_accpath, sbp)) {
+ } else if (lstat(p->fts_accpath, sbp)) {
p->fts_errno = errno;
err: memset(sbp, 0, sizeof(struct stat));
return (FTS_NS);
@@ -999,10 +989,7 @@ fts_compar(const void *a, const void *b)
}
static FTSENT *
-fts_sort(sp, head, nitems)
- FTS *sp;
- FTSENT *head;
- int nitems;
+fts_sort(FTS *sp, FTSENT *head, size_t nitems)
{
FTSENT **ap, *p;
@@ -1031,10 +1018,7 @@ fts_sort(sp, head, nitems)
}
static FTSENT *
-fts_alloc(sp, name, namelen)
- FTS *sp;
- const char *name;
- int namelen;
+fts_alloc(FTS *sp, const char *name, size_t namelen)
{
FTSENT *p;
size_t len;
@@ -1081,8 +1065,7 @@ fts_alloc(sp, name, namelen)
}
static void
-fts_lfree(head)
- FTSENT *head;
+fts_lfree(FTSENT *head)
{
FTSENT *p;
@@ -1100,24 +1083,10 @@ fts_lfree(head)
* plus 256 bytes so don't realloc the path 2 bytes at a time.
*/
static int
-fts_palloc(sp, more)
- FTS *sp;
- size_t more;
+fts_palloc(FTS *sp, size_t more)
{
sp->fts_pathlen += more + 256;
- /*
- * Check for possible wraparound. In an FTS, fts_pathlen is
- * a signed int but in an FTSENT it is an unsigned short.
- * We limit fts_pathlen to USHRT_MAX to be safe in both cases.
- */
- if (sp->fts_pathlen < 0 || sp->fts_pathlen >= USHRT_MAX) {
- if (sp->fts_path)
- free(sp->fts_path);
- sp->fts_path = NULL;
- errno = ENAMETOOLONG;
- return (1);
- }
sp->fts_path = reallocf(sp->fts_path, sp->fts_pathlen);
return (sp->fts_path == NULL);
}
@@ -1127,9 +1096,7 @@ fts_palloc(sp, more)
* already returned.
*/
static void
-fts_padjust(sp, head)
- FTS *sp;
- FTSENT *head;
+fts_padjust(FTS *sp, FTSENT *head)
{
FTSENT *p;
char *addr = sp->fts_path;
@@ -1170,11 +1137,7 @@ fts_maxarglen(argv)
* Assumes p->fts_dev and p->fts_ino are filled in.
*/
static int
-fts_safe_changedir(sp, p, fd, path)
- FTS *sp;
- FTSENT *p;
- int fd;
- const char *path;
+fts_safe_changedir(FTS *sp, FTSENT *p, int fd, const char *path)
{
int ret, oerrno, newfd;
struct stat sb;
@@ -1182,9 +1145,10 @@ fts_safe_changedir(sp, p, fd, path)
newfd = fd;
if (ISSET(FTS_NOCHDIR))
return (0);
- if (fd < 0 && (newfd = _open(path, O_RDONLY, 0)) < 0)
+ if (fd < 0 && (newfd = _open(path, O_RDONLY | O_DIRECTORY |
+ O_CLOEXEC, 0)) < 0)
return (-1);
- if (fstat64(newfd, &sb)) {
+ if (_fstat(newfd, &sb)) {
ret = -1;
goto bail;
}
diff --git a/winsup/cygwin/libc/inet_addr.c b/winsup/cygwin/libc/inet_addr.c
index 465e86ed3..9e464e67a 100644
--- a/winsup/cygwin/libc/inet_addr.c
+++ b/winsup/cygwin/libc/inet_addr.c
@@ -100,7 +100,7 @@ __FBSDID("$FreeBSD$");
*/
extern int
cygwin_inet_aton(const char *cp, struct in_addr *addr) {
- u_long val;
+ u_int32_t val;
int base, n;
char c;
u_int8_t parts[4];
diff --git a/winsup/cygwin/libc/minires-os-if.c b/winsup/cygwin/libc/minires-os-if.c
index 94460ffb2..565158150 100644
--- a/winsup/cygwin/libc/minires-os-if.c
+++ b/winsup/cygwin/libc/minires-os-if.c
@@ -1,7 +1,5 @@
/* minires-os-if.c. Stub synchronous resolver for Cygwin.
- Copyright 2006, 2007, 2008, 2009, 2011, 2012 Red Hat, Inc.
-
Written by Pierre A. Humblet <Pierre.Humblet@ieee.org>
This file is part of Cygwin.
@@ -39,10 +37,12 @@ details. */
#define PUTDOMAIN(d,p)\
{int res = dn_comp(d, p, EndPtr - p, dnptrs, lastdnptr); p += res < 0 ? (int) strlen(d) : res; }
-static u_char * write_record(unsigned char * ptr, PDNS_RECORD rr, unsigned char * EndPtr,
- unsigned char ** dnptrs, unsigned char ** lastdnptr, int debug)
+static unsigned char * write_record(unsigned char * ptr, PDNS_RECORD rr,
+ unsigned char * EndPtr,
+ unsigned char ** dnptrs,
+ unsigned char ** lastdnptr, int debug)
{
- u_char * rd_length_ptr;
+ unsigned char * rd_length_ptr;
PUTDOMAIN(rr->pName, ptr);
@@ -70,7 +70,7 @@ static u_char * write_record(unsigned char * ptr, PDNS_RECORD rr, unsigned char
switch(rr->wType) {
case DNS_TYPE_A:
{
- u_char * aptr = (u_char *) & rr->Data.A.IpAddress;
+ u_int8_t * aptr = (u_int8_t *) & rr->Data.A.IpAddress;
if (ptr + 4 <= EndPtr) {
ptr[0] = aptr[0];
ptr[1] = aptr[1];
@@ -249,6 +249,13 @@ static int cygwin_query(res_state statp, const char * DomName, int Class, int Ty
rr = pQueryResultsSet;
section = 0;
while (rr) {
+ /* Some Windows versions return questions when providing locally generated
+ answers, for example for "localhost" or for the computer name. */
+ if (((rr->Flags.DW & 0x3) == DnsSectionQuestion) &&
+ (rr->wDataLength > 0)) {
+ DPRINTF(debug, "Changing record below from question to answer\n");
+ rr->Flags.DW ^= DnsSectionQuestion ^ DnsSectionAnswer;
+ }
if (!counts[0] && (rr->Flags.DW & 0x3)) {
/* No question. Adopt the first name as the name in the question */
if ((len = dn_comp(rr->pName, ptr, AnsLength - 4,
@@ -279,7 +286,7 @@ static int cygwin_query(res_state statp, const char * DomName, int Class, int Ty
rr = rr->pNext;
}
- DnsRecordListFree(pQueryResultsSet, DnsFreeRecordList);
+ DnsFree(pQueryResultsSet, DnsFreeRecordList);
len = ptr - AnsPtr;
done:
diff --git a/winsup/cygwin/libc/minires.c b/winsup/cygwin/libc/minires.c
index c73ad3c58..0979daae3 100644
--- a/winsup/cygwin/libc/minires.c
+++ b/winsup/cygwin/libc/minires.c
@@ -1,7 +1,5 @@
/* minires.c. Stub synchronous resolver for Cygwin.
- Copyright 2006, 2008, 2009, 2010, 2011 Red Hat, Inc.
-
Written by Pierre A. Humblet <Pierre.Humblet@ieee.org>
This file is part of Cygwin.
@@ -26,7 +24,7 @@ void minires_dprintf(const char * format, ...)
va_list args;
va_start(args, format);
- fprintf(stderr, "Minires: ");
+ fprintf(stderr, "Resolv: ");
vfprintf(stderr, format, args);
va_end(args);
}
@@ -77,7 +75,7 @@ void minires_get_search(char * string, res_state statp)
ptr += sizes[j];
DPRINTF(debug, "search \"%s\"\n", words[j]);
}
- else
+ else if (j < MAXDNSRCH + 1)
DPRINTF(debug, "no space for \"%s\"\n", words[j]);
}
}
@@ -375,7 +373,7 @@ static int get_tcp(struct sockaddr_in *CliAddr,
{
int fd, res = -1;
unsigned short ans_length;
- union {short len; u_char buf[sizeof(short)];} len_buf;
+ union {short len; u_int8_t buf[sizeof(short)];} len_buf;
DPRINTF(debug, "retrying with TCP\n");
@@ -694,7 +692,7 @@ int res_mkquery (int op, const char * dnameptr, int qclass, int qtype,
int res_nquery( res_state statp, const char * DomName, int Class, int Type,
unsigned char * AnsPtr, int AnsLength)
{
- u_char packet[PACKETSZ];
+ u_int8_t packet[PACKETSZ];
int len;
DPRINTF(statp->options & RES_DEBUG, "query \"%s\" type %d\n", DomName, Type);
@@ -726,6 +724,9 @@ int res_nquerydomain( res_state statp, const char * Name, const char * DomName,
char fqdn[MAXDNAME], *ptr;
size_t nlen;
+ DPRINTF(statp->options & RES_DEBUG, "querydomain \"%s\" \"%s\" type %d\n",
+ Name, DomName, Type);
+
if (!DomName)
ptr = (char *) Name;
else if ((nlen = strlen(Name)) >= sizeof(fqdn) - 1)
@@ -734,7 +735,7 @@ int res_nquerydomain( res_state statp, const char * Name, const char * DomName,
strcpy(fqdn, Name);
ptr = &fqdn[nlen];
if (nlen && *(ptr - 1) != '.')
- *(ptr++ - 1) = '.';
+ *ptr++ = '.';
fqdn[sizeof(fqdn) - 1] = 0;
strncpy(ptr, DomName, sizeof(fqdn) - (ptr - fqdn));
if (fqdn[sizeof(fqdn) - 1])
@@ -877,12 +878,12 @@ expand_fail:
preserve the letter cases.
*****************************************************************/
-int dn_comp(const char * exp_dn, u_char * comp_dn, int length,
- u_char ** dnptrs, u_char ** lastdnptr)
+int dn_comp(const char * exp_dn, unsigned char * comp_dn, int length,
+ unsigned char ** dnptrs, unsigned char ** lastdnptr)
{
- u_char *cptr = comp_dn, *dptr, *lptr, *rptr;
+ unsigned char *cptr = comp_dn, *dptr, *lptr, *rptr;
unsigned int i, len;
- u_char * const eptr = comp_dn + length - 1; /* Last valid */
+ unsigned char * const eptr = comp_dn + length - 1; /* Last valid */
errno = EINVAL;
@@ -901,7 +902,7 @@ int dn_comp(const char * exp_dn, u_char * comp_dn, int length,
dptr = dnptrs[i];
if (dptr >= comp_dn) /* Handle name.name */
continue;
- rptr = (u_char *) exp_dn;
+ rptr = (unsigned char *) exp_dn;
len = *dptr++;
while (1) {
do {
@@ -938,12 +939,12 @@ int dn_comp(const char * exp_dn, u_char * comp_dn, int length,
}
/* Write label */
lptr = cptr++; /* Length byte */
- rptr = (u_char *) exp_dn;
+ rptr = (unsigned char *) exp_dn;
do {
if (cptr <= eptr)
*cptr++ = *rptr;
} while ((*++rptr != '.') && (*rptr != 0));
- len = rptr - (u_char *) exp_dn;
+ len = rptr - (unsigned char *) exp_dn;
if (len > MAXLABEL)
return -1;
*lptr = len;
diff --git a/winsup/cygwin/libc/minires.h b/winsup/cygwin/libc/minires.h
index ecbbcc180..b1d98c6d4 100644
--- a/winsup/cygwin/libc/minires.h
+++ b/winsup/cygwin/libc/minires.h
@@ -1,7 +1,5 @@
/* minires.h. Stub synchronous resolver for Cygwin.
- Copyright 2006, 2008, 2012 Red Hat, Inc.
-
Written by Pierre A. Humblet <Pierre.Humblet@ieee.org>
This file is part of Cygwin.
diff --git a/winsup/cygwin/libc/rcmd.cc b/winsup/cygwin/libc/rcmd.cc
index 4ebdd062a..0e6efa47a 100644
--- a/winsup/cygwin/libc/rcmd.cc
+++ b/winsup/cygwin/libc/rcmd.cc
@@ -363,7 +363,7 @@ cygwin_rresvport_af(int *alport, int family)
{
int s;
struct sockaddr_storage ss;
- u_short *sport;
+ u_int16_t *sport;
memset(&ss, 0, sizeof(ss));
ss.ss_family = family;
diff --git a/winsup/cygwin/libc/rexec.cc b/winsup/cygwin/libc/rexec.cc
index d5548bf15..a9d0048d3 100644
--- a/winsup/cygwin/libc/rexec.cc
+++ b/winsup/cygwin/libc/rexec.cc
@@ -63,6 +63,7 @@ static char sccsid[] = "@(#)rexec.c 8.1 (Berkeley) 6/4/93";
extern "C" {
int cygwin_accept (int, struct sockaddr *, socklen_t *);
int cygwin_connect (int, const struct sockaddr *, socklen_t);
+ int cygwin_gethostname (char *__name, size_t __len);
int cygwin_getsockname (int, struct sockaddr *, socklen_t *);
void cygwin_herror (const char *);
int cygwin_listen (int, int);
@@ -312,100 +313,101 @@ extern "C" int
cygwin_rexec (char **ahost, unsigned short rport, char *name, char *pass,
char *cmd, int *fd2p)
{
- struct sockaddr_in sin, sin2, from;
- struct hostent *hp;
- u_short port = 0;
- int s, timo = 1, s3;
- char c;
- char ahostbuf[INTERNET_MAX_HOST_NAME_LENGTH + 1];
+ struct sockaddr_in sin, sin2, from;
+ struct hostent *hp;
+ uint16_t port = 0;
+ int s, timo = 1, s3;
+ char c;
+ static char ahostbuf[INTERNET_MAX_HOST_NAME_LENGTH + 1];
- myfault efault;
- if (efault.faulted (EFAULT))
- return -1;
-
- hp = cygwin_gethostbyname(*ahost);
- if (hp == 0) {
- cygwin_herror(*ahost);
- return (-1);
- }
- *ahost = strcpy (ahostbuf, hp->h_name);
- ruserpass(hp->h_name, &name, &pass, NULL);
- if (!name)
- name = getlogin ();
- if (!pass)
- pass = almost_null;
+ __try
+ {
+ hp = cygwin_gethostbyname(*ahost);
+ if (hp == 0) {
+ cygwin_herror(*ahost);
+ return (-1);
+ }
+ *ahost = strcpy (ahostbuf, hp->h_name);
+ ruserpass(hp->h_name, &name, &pass, NULL);
+ if (!name)
+ name = getlogin ();
+ if (!pass)
+ pass = almost_null;
retry:
- s = cygwin_socket(AF_INET, SOCK_STREAM, 0);
- if (s < 0) {
- perror("rexec: socket");
- return (-1);
- }
- sin.sin_family = hp->h_addrtype;
- sin.sin_port = rport;
- bcopy(hp->h_addr, (caddr_t)&sin.sin_addr, hp->h_length);
- if (cygwin_connect(s, (struct sockaddr *)&sin, sizeof(sin)) < 0) {
- if (errno == ECONNREFUSED && timo <= 16) {
- (void) close(s);
- sleep(timo);
- timo *= 2;
- goto retry;
- }
- perror(hp->h_name);
- return (-1);
- }
- if (fd2p == 0) {
- (void) write(s, "", 1);
- } else {
- char num[8];
- int s2, sin2len;
+ s = cygwin_socket(AF_INET, SOCK_STREAM, 0);
+ if (s < 0) {
+ perror("rexec: socket");
+ return (-1);
+ }
+ sin.sin_family = hp->h_addrtype;
+ sin.sin_port = rport;
+ bcopy(hp->h_addr, (caddr_t)&sin.sin_addr, hp->h_length);
+ if (cygwin_connect(s, (struct sockaddr *)&sin, sizeof(sin)) < 0) {
+ if (errno == ECONNREFUSED && timo <= 16) {
+ (void) close(s);
+ sleep(timo);
+ timo *= 2;
+ goto retry;
+ }
+ perror(hp->h_name);
+ return (-1);
+ }
+ if (fd2p == 0) {
+ (void) write(s, "", 1);
+ } else {
+ char num[8];
+ int s2, sin2len;
- s2 = cygwin_socket(AF_INET, SOCK_STREAM, 0);
- if (s2 < 0) {
- (void) close(s);
- return (-1);
- }
- cygwin_listen(s2, 1);
- sin2len = sizeof (sin2);
- if (cygwin_getsockname(s2, (struct sockaddr *)&sin2, &sin2len) < 0 ||
- sin2len != sizeof (sin2)) {
- perror("getsockname");
- (void) close(s2);
- goto bad;
+ s2 = cygwin_socket(AF_INET, SOCK_STREAM, 0);
+ if (s2 < 0) {
+ (void) close(s);
+ return (-1);
+ }
+ cygwin_listen(s2, 1);
+ sin2len = sizeof (sin2);
+ if (cygwin_getsockname(s2, (struct sockaddr *)&sin2, &sin2len) < 0 ||
+ sin2len != sizeof (sin2)) {
+ perror("getsockname");
+ (void) close(s2);
+ goto bad;
+ }
+ port = ntohs((uint16_t)sin2.sin_port);
+ (void) sprintf(num, "%u", port);
+ (void) write(s, num, strlen(num)+1);
+ { int len = sizeof (from);
+ s3 = cygwin_accept(s2, (struct sockaddr *)&from, &len);
+ close(s2);
+ if (s3 < 0) {
+ perror("accept");
+ port = 0;
+ goto bad;
}
- port = ntohs((u_short)sin2.sin_port);
- (void) sprintf(num, "%u", port);
- (void) write(s, num, strlen(num)+1);
- { int len = sizeof (from);
- s3 = cygwin_accept(s2, (struct sockaddr *)&from, &len);
- close(s2);
- if (s3 < 0) {
- perror("accept");
- port = 0;
- goto bad;
- }
- }
- *fd2p = s3;
- }
- (void) write(s, name, strlen(name) + 1);
- /* should public key encypt the password here */
- (void) write(s, pass, strlen(pass) + 1);
- (void) write(s, cmd, strlen(cmd) + 1);
- if (read(s, &c, 1) != 1) {
- perror(*ahost);
- goto bad;
- }
- if (c != 0) {
- while (read(s, &c, 1) == 1) {
- (void) write(2, &c, 1);
- if (c == '\n')
- break;
- }
- goto bad;
- }
- return (s);
+ }
+ *fd2p = s3;
+ }
+ (void) write(s, name, strlen(name) + 1);
+ /* should public key encypt the password here */
+ (void) write(s, pass, strlen(pass) + 1);
+ (void) write(s, cmd, strlen(cmd) + 1);
+ if (read(s, &c, 1) != 1) {
+ perror(*ahost);
+ goto bad;
+ }
+ if (c != 0) {
+ while (read(s, &c, 1) == 1) {
+ (void) write(2, &c, 1);
+ if (c == '\n')
+ break;
+ }
+ goto bad;
+ }
+ return (s);
bad:
- if (port)
- (void) close(*fd2p);
- (void) close(s);
- return (-1);
+ if (port)
+ (void) close(*fd2p);
+ (void) close(s);
+ }
+ __except (EFAULT) {}
+ __endtry
+ return (-1);
}
diff --git a/winsup/cygwin/libc/strfmon.c b/winsup/cygwin/libc/strfmon.c
index d06bbabf6..91f0f8442 100644
--- a/winsup/cygwin/libc/strfmon.c
+++ b/winsup/cygwin/libc/strfmon.c
@@ -25,12 +25,12 @@
*
*/
-#include <sys/cdefs.h>
#if 0
__FBSDID("$FreeBSD: src/lib/libc/stdlib/strfmon.c,v 1.19 2008/04/24 07:49:00 ru Exp $");
#endif
#include "winsup.h"
+#include <sys/cdefs.h>
#include <sys/types.h>
#include <ctype.h>
#include <errno.h>
diff --git a/winsup/cygwin/libc/strptime.cc b/winsup/cygwin/libc/strptime.cc
index ca059842a..ad4d66150 100644
--- a/winsup/cygwin/libc/strptime.cc
+++ b/winsup/cygwin/libc/strptime.cc
@@ -48,6 +48,13 @@ __RCSID("$NetBSD: strptime.c,v 1.28 2008/04/28 20:23:01 martin Exp $");
#include <tzfile.h>
#include "../locale/timelocal.h"
+#ifdef __TM_GMTOFF
+# define TM_GMTOFF __TM_GMTOFF
+#endif
+#ifdef __TM_ZONE
+# define TM_ZONE __TM_ZONE
+#endif
+
#ifdef __weak_alias
__weak_alias(strptime,_strptime)
#endif
@@ -294,10 +301,11 @@ first_day (int year)
/* This simplifies the calls to conv_num enormously. */
#define ALT_DIGITS ((alt_format & ALT_O) ? *alt_digits : NULL)
-static const u_char *conv_num(const unsigned char *, int *, uint, uint,
- alt_digits_t *);
-static const u_char *find_string(const u_char *, int *, const char * const *,
- const char * const *, int);
+static const unsigned char *conv_num(const unsigned char *, int *, uint, uint,
+ alt_digits_t *);
+static const unsigned char *find_string(const unsigned char *, int *,
+ const char * const *,
+ const char * const *, int);
static char *
__strptime(const char *buf, const char *fmt, struct tm *tm,
@@ -314,7 +322,7 @@ __strptime(const char *buf, const char *fmt, struct tm *tm,
uint ulim;
int ymd = 0;
- bp = (const u_char *)buf;
+ bp = (const unsigned char *)buf;
struct lc_time_T *_CurrentTimeLocale = __get_current_time_locale ();
while (bp != NULL && (c = *fmt++) != '\0') {
@@ -435,9 +443,9 @@ literal:
LEGAL_ALT(ALT_E);
ymd |= SET_YMD;
recurse:
- bp = (const u_char *)__strptime((const char *)bp,
- new_fmt, tm,
- era_info, alt_digits);
+ bp = (const unsigned char *)
+ __strptime((const char *)bp, new_fmt, tm,
+ era_info, alt_digits);
continue;
/*
@@ -653,10 +661,12 @@ literal:
if (strncmp((const char *)bp, gmt, 3) == 0) {
tm->tm_isdst = 0;
#ifdef TM_GMTOFF
- tm->TM_GMTOFF = 0;
+ if (CYGWIN_VERSION_CHECK_FOR_EXTRA_TM_MEMBERS)
+ tm->TM_GMTOFF = 0;
#endif
#ifdef TM_ZONE
- tm->TM_ZONE = gmt;
+ if (CYGWIN_VERSION_CHECK_FOR_EXTRA_TM_MEMBERS)
+ tm->TM_ZONE = gmt;
#endif
bp += 3;
} else {
@@ -668,10 +678,12 @@ literal:
if (ep != NULL) {
tm->tm_isdst = i;
#ifdef TM_GMTOFF
- tm->TM_GMTOFF = -(timezone);
+ if (CYGWIN_VERSION_CHECK_FOR_EXTRA_TM_MEMBERS)
+ tm->TM_GMTOFF = -(timezone);
#endif
#ifdef TM_ZONE
- tm->TM_ZONE = tzname[i];
+ if (CYGWIN_VERSION_CHECK_FOR_EXTRA_TM_MEMBERS)
+ tm->TM_ZONE = tzname[i];
#endif
}
bp = ep;
@@ -763,7 +775,8 @@ literal:
}
char *
-strptime (const char *buf, const char *fmt, struct tm *tm)
+strptime (const char *__restrict buf, const char *__restrict fmt,
+ struct tm *__restrict tm)
{
era_info_t *era_info = NULL;
alt_digits_t *alt_digits = NULL;
@@ -775,7 +788,7 @@ strptime (const char *buf, const char *fmt, struct tm *tm)
return ret;
}
-static const u_char *
+static const unsigned char *
conv_num(const unsigned char *buf, int *dest, uint llim, uint ulim,
alt_digits_t *alt_digits)
{
@@ -808,9 +821,9 @@ conv_num(const unsigned char *buf, int *dest, uint llim, uint ulim,
return buf;
}
-static const u_char *
-find_string(const u_char *bp, int *tgt, const char * const *n1,
- const char * const *n2, int c)
+static const unsigned char *
+find_string(const unsigned char *bp, int *tgt, const char * const *n1,
+ const char * const *n2, int c)
{
int i;
unsigned int len;
diff --git a/winsup/cygwin/libc/xsique.cc b/winsup/cygwin/libc/xsique.cc
index 05bff661e..c8cb65874 100644
--- a/winsup/cygwin/libc/xsique.cc
+++ b/winsup/cygwin/libc/xsique.cc
@@ -1,7 +1,5 @@
/* xsique.cc. XSI insque and remque functions.
- Copyright 2007, 2008 Red Hat, Inc.
-
This file is part of Cygwin.
This software is a copyrighted work licensed under the terms of the
diff --git a/winsup/cygwin/libstdcxx_wrapper.cc b/winsup/cygwin/libstdcxx_wrapper.cc
index 80861b738..6cd4c754d 100755..100644
--- a/winsup/cygwin/libstdcxx_wrapper.cc
+++ b/winsup/cygwin/libstdcxx_wrapper.cc
@@ -1,7 +1,5 @@
/* libstdcxx_wrapper.cc
- Copyright 2009 Red Hat, Inc.
-
This file is part of Cygwin.
This software is a copyrighted work licensed under the terms of the
diff --git a/winsup/cygwin/localtime.cc b/winsup/cygwin/localtime.cc
index 19eef6759..2d10508d1 100644
--- a/winsup/cygwin/localtime.cc
+++ b/winsup/cygwin/localtime.cc
@@ -344,6 +344,13 @@ struct tzhead {
#include "fcntl.h"
+#ifdef __TM_GMTOFF
+# define TM_GMTOFF __TM_GMTOFF
+#endif
+#ifdef __TM_ZONE
+# define TM_ZONE __TM_ZONE
+#endif
+
/*
** SunOS 4.1.1 headers lack O_BINARY.
*/
@@ -493,7 +500,11 @@ static int tzload(timezone_t sp, const char * name,
int doextend);
static int tzparse(timezone_t sp, const char * name,
int lastditch);
+#ifdef __CYGWIN__
+extern "C" void tzset_unlocked(void);
+#else
static void tzset_unlocked(void);
+#endif
static long leapcorr(const timezone_t sp, time_t * timep);
static timezone_t lclptr;
@@ -691,7 +702,7 @@ tzload(timezone_t sp, const char *name, const int doextend)
else
base = name;
if (strcmp(base, "posixrules"))
- return -1;
+ goto oops;
/* We've got a built-in copy of posixrules just in case */
fid = -2;
@@ -893,12 +904,18 @@ tzload(timezone_t sp, const char *name, const int doextend)
}
}
free(up);
+ /*
+ ** Get latest zone offsets into tzinfo (for newlib). . .
+ */
if (sp == lclptr)
{
- __gettzinfo ()->__tzrule[0].offset
- = -sp->ttis[1].tt_gmtoff;
- __gettzinfo ()->__tzrule[1].offset
- = -sp->ttis[0].tt_gmtoff;
+ for (i = 0; i < sp->timecnt; ++i)
+ {
+ const struct ttinfo *const ttisp = &sp->ttis[sp->types[i]];
+
+ __gettzinfo ()->__tzrule[ttisp->tt_isdst].offset
+ = -ttisp->tt_gmtoff;
+ }
}
return 0;
oops:
@@ -1348,6 +1365,9 @@ tzparse(timezone_t sp, const char *name, const int lastditch)
break;
janfirst = newfirst;
}
+ /*
+ ** Get zone offsets into tzinfo (for newlib). . .
+ */
if (sp == lclptr)
{
__gettzinfo ()->__tzrule[0].offset
@@ -1440,6 +1460,9 @@ tzparse(timezone_t sp, const char *name, const int lastditch)
sp->ttis[1].tt_isdst = TRUE;
sp->ttis[1].tt_abbrind = (int)(stdlen + 1);
sp->typecnt = 2;
+ /*
+ ** Get zone offsets into tzinfo (for newlib). . .
+ */
if (sp == lclptr)
{
__gettzinfo ()->__tzrule[0].offset
@@ -1456,6 +1479,9 @@ tzparse(timezone_t sp, const char *name, const int lastditch)
sp->ttis[0].tt_gmtoff = -stdoffset;
sp->ttis[0].tt_isdst = 0;
sp->ttis[0].tt_abbrind = 0;
+ /*
+ ** Get zone offsets into tzinfo (for newlib). . .
+ */
if (sp == lclptr)
{
__gettzinfo ()->__tzrule[0].offset = -sp->ttis[0].tt_gmtoff;
@@ -1517,7 +1543,8 @@ tzsetwall (void)
GetTimeZoneInformation(&tz);
dst = cp = buf;
for (src = tz.StandardName; *src; src++)
- if (isupper(*src)) *dst++ = *src;
+ if (*src >= L'A' && *src <= L'Z')
+ *dst++ = *src;
if ((dst - cp) < 3)
{
/* In non-english Windows, converted tz.StandardName
@@ -1535,7 +1562,8 @@ tzsetwall (void)
cp = strchr(cp, 0);
dst = cp;
for (src = tz.DaylightName; *src; src++)
- if (isupper(*src)) *dst++ = *src;
+ if (*src >= L'A' && *src <= L'Z')
+ *dst++ = *src;
if ((dst - cp) < 3)
{
/* In non-english Windows, converted tz.DaylightName
@@ -1591,6 +1619,9 @@ tzsetwall (void)
static NO_COPY muto tzset_guard;
+#ifdef __CYGWIN__
+extern "C"
+#else
#ifndef STD_INSPIRED
/*
** A non-static declaration of tzsetwall in a system header file
@@ -1598,6 +1629,7 @@ static NO_COPY muto tzset_guard;
*/
static
#endif /* !defined STD_INSPIRED */
+#endif
void
tzset_unlocked(void)
{
@@ -1641,6 +1673,8 @@ tzset_unlocked(void)
settzname();
}
+EXPORT_ALIAS (tzset_unlocked, _tzset_unlocked)
+
extern "C" void
tzset(void)
{
@@ -1740,7 +1774,8 @@ localsub(const timezone_t sp, const time_t * const timep, const long offset,
if (sp == lclptr)
tzname[tmp->tm_isdst] = &sp->chars[ttisp->tt_abbrind];
#ifdef TM_ZONE
- tmp->TM_ZONE = &sp->chars[ttisp->tt_abbrind];
+ if (CYGWIN_VERSION_CHECK_FOR_EXTRA_TM_MEMBERS)
+ tmp->TM_ZONE = &sp->chars[ttisp->tt_abbrind];
#endif /* defined TM_ZONE */
return result;
}
@@ -1749,7 +1784,7 @@ localsub(const timezone_t sp, const time_t * const timep, const long offset,
** Re-entrant version of localtime.
*/
extern "C" struct tm *
-localtime_r(const time_t *timep, struct tm *tmp)
+localtime_r(const time_t *__restrict timep, struct tm *__restrict tmp)
{
tzset_guard.init ("tzset_guard")->acquire ();
tzset_unlocked();
@@ -1793,13 +1828,16 @@ gmtsub(const timezone_t sp, const time_t *const timep, const long offset,
** "UTC+xxxx" or "UTC-xxxx" if offset is non-zero,
** but this is no time for a treasure hunt.
*/
- if (offset != 0)
- tmp->TM_ZONE = wildabbr;
- else {
- if (gmtptr == NULL)
- tmp->TM_ZONE = gmt;
- else tmp->TM_ZONE = gmtptr->chars;
- }
+ if (CYGWIN_VERSION_CHECK_FOR_EXTRA_TM_MEMBERS)
+ {
+ if (offset != 0)
+ tmp->TM_ZONE = wildabbr;
+ else {
+ if (gmtptr == NULL)
+ tmp->TM_ZONE = gmt;
+ else tmp->TM_ZONE = gmtptr->chars;
+ }
+ }
#endif /* defined TM_ZONE */
return result;
}
@@ -1820,7 +1858,7 @@ gmtime(const time_t *const timep)
*/
extern "C" struct tm *
-gmtime_r(const time_t * const timep, struct tm *tmp)
+gmtime_r(const time_t *__restrict const timep, struct tm *__restrict tmp)
{
tmp = gmtsub(NULL, timep, 0L, tmp);
@@ -1978,7 +2016,8 @@ timesub(const timezone_t sp, const time_t *const timep, const long offset,
tmp->tm_mday = (int) (idays + 1);
tmp->tm_isdst = 0;
#ifdef TM_GMTOFF
- tmp->TM_GMTOFF = offset;
+ if (CYGWIN_VERSION_CHECK_FOR_EXTRA_TM_MEMBERS)
+ tmp->TM_GMTOFF = offset;
#endif /* defined TM_GMTOFF */
return tmp;
}
@@ -2531,3 +2570,28 @@ posix2time(time_t t)
}
#endif /* defined STD_INSPIRED */
+
+extern "C" long
+__cygwin_gettzoffset (const struct tm *tmp)
+{
+#ifdef TM_GMTOFF
+ if (CYGWIN_VERSION_CHECK_FOR_EXTRA_TM_MEMBERS)
+ return tmp->TM_GMTOFF;
+#endif /* defined TM_GMTOFF */
+ __tzinfo_type *tz = __gettzinfo ();
+ /* The sign of this is exactly opposite the envvar TZ. We
+ could directly use the global _timezone for tm_isdst==0,
+ but have to use __tzrule for daylight savings. */
+ long offset = -tz->__tzrule[tmp->tm_isdst > 0].offset;
+ return offset;
+}
+
+extern "C" const char *
+__cygwin_gettzname (const struct tm *tmp)
+{
+#ifdef TM_ZONE
+ if (CYGWIN_VERSION_CHECK_FOR_EXTRA_TM_MEMBERS)
+ return tmp->TM_ZONE;
+#endif
+ return _tzname[tmp->tm_isdst > 0];
+}
diff --git a/winsup/cygwin/malloc.cc b/winsup/cygwin/malloc.cc
index f9c3d557a..b1d5f6c04 100644
--- a/winsup/cygwin/malloc.cc
+++ b/winsup/cygwin/malloc.cc
@@ -1,14 +1,13 @@
/*
This is a version (aka dlmalloc) of malloc/free/realloc written by
Doug Lea and released to the public domain, as explained at
- http://creativecommons.org/licenses/publicdomain. Send questions,
+ http://creativecommons.org/publicdomain/zero/1.0/ Send questions,
comments, complaints, performance data, etc to dl@cs.oswego.edu
-* Version 2.8.3 Thu Sep 22 11:16:15 2005 Doug Lea (dl at gee)
-
+* Version 2.8.6 Wed Aug 29 06:57:58 2012 Doug Lea
Note: There may be an updated version of this malloc obtainable at
- ftp://gee.cs.oswego.edu/pub/misc/malloc.c
- Check before installing!
+ ftp://gee.cs.oswego.edu/pub/misc/malloc.c
+ Check before installing!
* Quickstart
@@ -19,7 +18,7 @@
compile-time and dynamic tuning options.
For convenience, an include file for code using this malloc is at:
- ftp://gee.cs.oswego.edu/pub/misc/malloc-2.8.3.h
+ ftp://gee.cs.oswego.edu/pub/misc/malloc-2.8.6.h
You don't really need this .h file unless you call functions not
defined in your system include files. The .h file contains only the
excerpts from this file needed for using this malloc on ANSI C/C++
@@ -41,19 +40,19 @@
than pointers, you can use a previous release of this malloc
(e.g. 2.7.2) supporting these.)
- Alignment: 8 bytes (default)
+ Alignment: 8 bytes (minimum)
This suffices for nearly all current machines and C compilers.
However, you can define MALLOC_ALIGNMENT to be wider than this
if necessary (up to 128bytes), at the expense of using more space.
Minimum overhead per allocated chunk: 4 or 8 bytes (if 4byte sizes)
- 8 or 16 bytes (if 8byte sizes)
+ 8 or 16 bytes (if 8byte sizes)
Each malloced chunk has a hidden word of overhead holding size
and status information, and additional cross-check word
if FOOTERS is defined.
Minimum allocated size: 4-byte ptrs: 16 bytes (including overhead)
- 8-byte ptrs: 32 bytes (including overhead)
+ 8-byte ptrs: 32 bytes (including overhead)
Even a request for zero bytes (i.e., malloc(0)) returns a
pointer to something of the minimum allocatable size.
@@ -104,15 +103,28 @@
no errors or vulnerabilities, you can define INSECURE to 1,
which might (or might not) provide a small performance improvement.
- Thread-safety: NOT thread-safe unless USE_LOCKS defined
+ It is also possible to limit the maximum total allocatable
+ space, using malloc_set_footprint_limit. This is not
+ designed as a security feature in itself (calls to set limits
+ are not screened or privileged), but may be useful as one
+ aspect of a secure implementation.
+
+ Thread-safety: NOT thread-safe unless USE_LOCKS defined non-zero
When USE_LOCKS is defined, each public call to malloc, free,
- etc is surrounded with either a pthread mutex or a win32
- spinlock (depending on WIN32). This is not especially fast, and
- can be a major bottleneck. It is designed only to provide
- minimal protection in concurrent environments, and to provide a
- basis for extensions. If you are using malloc in a concurrent
- program, consider instead using ptmalloc, which is derived from
- a version of this malloc. (See http://www.malloc.de).
+ etc is surrounded with a lock. By default, this uses a plain
+ pthread mutex, win32 critical section, or a spin-lock if if
+ available for the platform and not disabled by setting
+ USE_SPIN_LOCKS=0. However, if USE_RECURSIVE_LOCKS is defined,
+ recursive versions are used instead (which are not required for
+ base functionality but may be needed in layered extensions).
+ Using a global lock is not especially fast, and can be a major
+ bottleneck. It is designed only to provide minimal protection
+ in concurrent environments, and to provide a basis for
+ extensions. If you are using malloc in a concurrent program,
+ consider instead using nedmalloc
+ (http://www.nedprod.com/programs/portable/nedmalloc/) or
+ ptmalloc (See http://www.malloc.de), which are derived from
+ versions of this malloc.
System requirements: Any combination of MORECORE and/or MMAP/MUNMAP
This malloc can use unix sbrk or any emulation (invoked using
@@ -153,7 +165,11 @@
a size_t, not counting any clearing in calloc or copying in realloc,
or actions surrounding MORECORE and MMAP that have times
proportional to the number of non-contiguous regions returned by
- system allocation routines, which is often just 1.
+ system allocation routines, which is often just 1. In real-time
+ applications, you can optionally suppress segment traversals using
+ NO_SEGMENT_TRAVERSAL, which assures bounded execution even when
+ system allocators return non-contiguous spaces, at the typical
+ expense of carrying around more memory and increased fragmentation.
The implementation is not very modular and seriously overuses
macros. Perhaps someday all C compilers will do as good a job
@@ -197,19 +213,39 @@
conformance is only weakly checked, so usage errors are not always
caught). If FOOTERS is defined, then each chunk carries around a tag
indicating its originating mspace, and frees are directed to their
- originating spaces.
+ originating spaces. Normally, this requires use of locks.
------------------------- Compile-time options ---------------------------
Be careful in setting #define values for numerical constants of type
size_t. On some systems, literal values are not automatically extended
-to size_t precision unless they are explicitly casted.
+to size_t precision unless they are explicitly casted. You can also
+use the symbolic values MAX_SIZE_T, SIZE_T_ONE, etc below.
WIN32 default: defined if _WIN32 defined
Defining WIN32 sets up defaults for MS environment and compilers.
- Otherwise defaults are for unix.
-
-MALLOC_ALIGNMENT default: (size_t)8
+ Otherwise defaults are for unix. Beware that there seem to be some
+ cases where this malloc might not be a pure drop-in replacement for
+ Win32 malloc: Random-looking failures from Win32 GDI API's (eg;
+ SetDIBits()) may be due to bugs in some video driver implementations
+ when pixel buffers are malloc()ed, and the region spans more than
+ one VirtualAlloc()ed region. Because dlmalloc uses a small (64Kb)
+ default granularity, pixel buffers may straddle virtual allocation
+ regions more often than when using the Microsoft allocator. You can
+ avoid this by using VirtualAlloc() and VirtualFree() for all pixel
+ buffers rather than using malloc(). If this is not possible,
+ recompile this malloc with a larger DEFAULT_GRANULARITY. Note:
+ in cases where MSC and gcc (cygwin) are known to differ on WIN32,
+ conditions use _MSC_VER to distinguish them.
+
+DLMALLOC_EXPORT default: extern
+ Defines how public APIs are declared. If you want to export via a
+ Windows DLL, you might define this as
+ #define DLMALLOC_EXPORT extern __declspec(dllexport)
+ If you want a POSIX ELF shared object, you might use
+ #define DLMALLOC_EXPORT extern __attribute__((visibility("default")))
+
+MALLOC_ALIGNMENT default: (size_t)(2 * sizeof(void *))
Controls the minimum alignment for malloc'ed chunks. It must be a
power of two and at least 8, even on machines for which smaller
alignments would suffice. It may be defined as larger than this
@@ -226,7 +262,27 @@ ONLY_MSPACES default: 0 (false)
USE_LOCKS default: 0 (false)
Causes each call to each public routine to be surrounded with
pthread or WIN32 mutex lock/unlock. (If set true, this can be
- overridden on a per-mspace basis for mspace versions.)
+ overridden on a per-mspace basis for mspace versions.) If set to a
+ non-zero value other than 1, locks are used, but their
+ implementation is left out, so lock functions must be supplied manually,
+ as described below.
+
+USE_SPIN_LOCKS default: 1 iff USE_LOCKS and spin locks available
+ If true, uses custom spin locks for locking. This is currently
+ supported only gcc >= 4.1, older gccs on x86 platforms, and recent
+ MS compilers. Otherwise, posix locks or win32 critical sections are
+ used.
+
+USE_RECURSIVE_LOCKS default: not defined
+ If defined nonzero, uses recursive (aka reentrant) locks, otherwise
+ uses plain mutexes. This is not required for malloc proper, but may
+ be needed for layered allocators such as nedmalloc.
+
+LOCK_AT_FORK default: not defined
+ If defined nonzero, performs pthread_atfork upon initialization
+ to initialize child lock while holding parent lock. The implementation
+ assumes that pthread locks (not custom locks) are being used. In other
+ cases, you may need to customize the implementation.
FOOTERS default: 0
If true, provide extra checking and dispatching by placing
@@ -241,6 +297,12 @@ USE_DL_PREFIX default: NOT defined
This can be useful when you only want to use this malloc in one part
of a program, using your regular system malloc elsewhere.
+MALLOC_INSPECT_ALL default: NOT defined
+ If defined, compiles malloc_inspect_all and mspace_inspect_all, that
+ perform traversal of all heap space. Unless access to these
+ functions is otherwise restricted, you probably do not want to
+ include them in secure implementations.
+
ABORT default: defined as abort()
Defines how to abort on failed checks. On most systems, a failed
check cannot die with an "assert" or even print an informative
@@ -297,11 +359,9 @@ MORECORE default: sbrk
size_t (sometimes declared as "intptr_t"). It doesn't much matter
though. Internally, we only call it with arguments less than half
the max value of a size_t, which should work across all reasonable
- possibilities, although sometimes generating compiler warnings. See
- near the end of this file for guidelines for creating a custom
- version of MORECORE.
+ possibilities, although sometimes generating compiler warnings.
-MORECORE_CONTIGUOUS default: 1 (true)
+MORECORE_CONTIGUOUS default: 1 (true) if HAVE_MORECORE
If true, take advantage of fact that consecutive calls to MORECORE
with positive arguments always return contiguous increasing
addresses. This is true of unix sbrk. It does not hurt too much to
@@ -315,6 +375,12 @@ MORECORE_CANNOT_TRIM default: NOT defined
using a hand-crafted MORECORE function that cannot handle negative
arguments.
+NO_SEGMENT_TRAVERSAL default: 0
+ If non-zero, suppresses traversals of memory segments
+ returned by either MORECORE or CALL_MMAP. This disables
+ merging of segments that are contiguous, and selectively
+ releasing them to the OS if unused, but bounds execution times.
+
HAVE_MMAP default: 1 (true)
True if this system supports mmap or an emulation of it. If so, and
HAVE_MORECORE is not true, MMAP is used for all system
@@ -329,17 +395,17 @@ HAVE_MREMAP default: 1 on linux, else 0
If true realloc() uses mremap() to re-allocate large blocks and
extend or shrink allocation spaces.
-MMAP_CLEARS default: 1 on unix
+MMAP_CLEARS default: 1 except on WINCE.
True if mmap clears memory so calloc doesn't need to. This is true
- for standard unix mmap using /dev/zero.
+ for standard unix mmap using /dev/zero and on WIN32 except for WINCE.
USE_BUILTIN_FFS default: 0 (i.e., not used)
Causes malloc to use the builtin ffs() function to compute indices.
Some compilers may recognize and intrinsify ffs to be faster than the
supplied C version. Also, the case of x86 using gcc is special-cased
to an asm instruction, so is already as fast as it can be, and so
- this setting has no effect. (On most x86s, the asm version is only
- slightly faster than the C version.)
+ this setting has no effect. Similarly for Win32 under recent MS compilers.
+ (On most x86s, the asm version is only slightly faster than the C version.)
malloc_getpagesize default: derive from system includes, or 4096.
The system page size. To the extent possible, this malloc manages
@@ -362,6 +428,10 @@ MALLINFO_FIELD_TYPE default: size_t
defined as "int" in SVID etc, but is more usefully defined as
size_t. The value is used only if HAVE_USR_INCLUDE_MALLOC_H is not set
+NO_MALLOC_STATS default: 0
+ If defined, don't compile "malloc_stats". This avoids calls to
+ fprintf and bringing in stdio dependencies you might not want.
+
REALLOC_ZERO_BYTES_FREES default: not defined
This 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,
@@ -370,13 +440,13 @@ REALLOC_ZERO_BYTES_FREES default: not defined
LACKS_UNISTD_H, LACKS_FCNTL_H, LACKS_SYS_PARAM_H, LACKS_SYS_MMAN_H
LACKS_STRINGS_H, LACKS_STRING_H, LACKS_SYS_TYPES_H, LACKS_ERRNO_H
-LACKS_STDLIB_H default: NOT defined unless on WIN32
+LACKS_STDLIB_H LACKS_SCHED_H LACKS_TIME_H default: NOT defined unless on WIN32
Define these if your system does not have these header files.
You might need to manually insert some of the declarations they provide.
DEFAULT_GRANULARITY default: page size if MORECORE_CONTIGUOUS,
- system_info.dwAllocationGranularity in WIN32,
- otherwise 64K.
+ system_info.dwAllocationGranularity in WIN32,
+ otherwise 64K.
Also settable using mallopt(M_GRANULARITY, x)
The unit for allocating and deallocating memory from the system. On
most systems with contiguous MORECORE, there is no reason to
@@ -436,16 +506,43 @@ DEFAULT_MMAP_THRESHOLD default: 256K
empirically derived value that works well in most systems. You can
disable mmap by setting to MAX_SIZE_T.
+MAX_RELEASE_CHECK_RATE default: 4095 unless not HAVE_MMAP
+ The number of consolidated frees between checks to release
+ unused segments when freeing. When using non-contiguous segments,
+ especially with multiple mspaces, checking only for topmost space
+ doesn't always suffice to trigger trimming. To compensate for this,
+ free() will, with a period of MAX_RELEASE_CHECK_RATE (or the
+ current number of segments, if greater) try to release unused
+ segments to the OS when freeing chunks that result in
+ consolidation. The best value for this parameter is a compromise
+ between slowing down frees with relatively costly checks that
+ rarely trigger versus holding on to unused memory. To effectively
+ disable, set to MAX_SIZE_T. This may lead to a very slight speed
+ improvement at the expense of carrying around more memory.
*/
+/* Version identifier to allow people to support multiple versions */
+#ifndef DLMALLOC_VERSION
+#define DLMALLOC_VERSION 20806
+#endif /* DLMALLOC_VERSION */
+
+#ifndef DLMALLOC_EXPORT
+#define DLMALLOC_EXPORT extern
+#endif
+
#ifndef WIN32
#ifdef _WIN32
#define WIN32 1
#endif /* _WIN32 */
+#ifdef _WIN32_WCE
+#define LACKS_FCNTL_H
+#define WIN32 1
+#endif /* _WIN32_WCE */
#endif /* WIN32 */
#ifdef WIN32
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
+#include <tchar.h>
#define HAVE_MMAP 1
#define HAVE_MORECORE 0
#define LACKS_UNISTD_H
@@ -455,8 +552,17 @@ DEFAULT_MMAP_THRESHOLD default: 256K
#define LACKS_STRINGS_H
#define LACKS_SYS_TYPES_H
#define LACKS_ERRNO_H
+#define LACKS_SCHED_H
+#ifndef MALLOC_FAILURE_ACTION
#define MALLOC_FAILURE_ACTION
-#define MMAP_CLEARS 0 /* WINCE and some others apparently don't clear */
+#endif /* MALLOC_FAILURE_ACTION */
+#ifndef MMAP_CLEARS
+#ifdef _WIN32_WCE /* WINCE reportedly does not clear */
+#define MMAP_CLEARS 0
+#else
+#define MMAP_CLEARS 1
+#endif /* _WIN32_WCE */
+#endif /*MMAP_CLEARS */
#endif /* WIN32 */
#if defined(DARWIN) || defined(_DARWIN)
@@ -464,6 +570,10 @@ DEFAULT_MMAP_THRESHOLD default: 256K
#ifndef HAVE_MORECORE
#define HAVE_MORECORE 0
#define HAVE_MMAP 1
+/* OSX allocators provide 16 byte alignment */
+#ifndef MALLOC_ALIGNMENT
+#define MALLOC_ALIGNMENT ((size_t)16U)
+#endif
#endif /* HAVE_MORECORE */
#endif /* DARWIN */
@@ -477,6 +587,26 @@ DEFAULT_MMAP_THRESHOLD default: 256K
/* The maximum possible size_t value has all bits set */
#define MAX_SIZE_T (~(size_t)0)
+#ifndef USE_LOCKS /* ensure true if spin or recursive locks set */
+#define USE_LOCKS ((defined(USE_SPIN_LOCKS) && USE_SPIN_LOCKS != 0) || \
+ (defined(USE_RECURSIVE_LOCKS) && USE_RECURSIVE_LOCKS != 0))
+#endif /* USE_LOCKS */
+
+#if USE_LOCKS /* Spin locks for gcc >= 4.1, older gcc on x86, MSC >= 1310 */
+#if ((defined(__GNUC__) && \
+ ((__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 1)) || \
+ defined(__i386__) || defined(__x86_64__))) || \
+ (defined(_MSC_VER) && _MSC_VER>=1310))
+#ifndef USE_SPIN_LOCKS
+#define USE_SPIN_LOCKS 1
+#endif /* USE_SPIN_LOCKS */
+#elif USE_SPIN_LOCKS
+#error "USE_SPIN_LOCKS defined without implementation"
+#endif /* ... locks available... */
+#elif !defined(USE_SPIN_LOCKS)
+#define USE_SPIN_LOCKS 0
+#endif /* USE_LOCKS */
+
#ifndef ONLY_MSPACES
#define ONLY_MSPACES 0
#endif /* ONLY_MSPACES */
@@ -488,7 +618,7 @@ DEFAULT_MMAP_THRESHOLD default: 256K
#endif /* ONLY_MSPACES */
#endif /* MSPACES */
#ifndef MALLOC_ALIGNMENT
-#define MALLOC_ALIGNMENT ((size_t)8U)
+#define MALLOC_ALIGNMENT ((size_t)(2 * sizeof(void *)))
#endif /* MALLOC_ALIGNMENT */
#ifndef FOOTERS
#define FOOTERS 0
@@ -502,12 +632,13 @@ DEFAULT_MMAP_THRESHOLD default: 256K
#ifndef PROCEED_ON_ERROR
#define PROCEED_ON_ERROR 0
#endif /* PROCEED_ON_ERROR */
-#ifndef USE_LOCKS
-#define USE_LOCKS 0
-#endif /* USE_LOCKS */
+
#ifndef INSECURE
#define INSECURE 0
#endif /* INSECURE */
+#ifndef MALLOC_INSPECT_ALL
+#define MALLOC_INSPECT_ALL 0
+#endif /* MALLOC_INSPECT_ALL */
#ifndef HAVE_MMAP
#define HAVE_MMAP 1
#endif /* HAVE_MMAP */
@@ -517,6 +648,7 @@ DEFAULT_MMAP_THRESHOLD default: 256K
#ifndef HAVE_MREMAP
#ifdef linux
#define HAVE_MREMAP 1
+#define _GNU_SOURCE /* Turns on mremap() definition */
#else /* linux */
#define HAVE_MREMAP 0
#endif /* linux */
@@ -534,15 +666,13 @@ DEFAULT_MMAP_THRESHOLD default: 256K
#if !HAVE_MORECORE
#define MORECORE_CONTIGUOUS 0
#else /* !HAVE_MORECORE */
-#ifndef MORECORE
-#define MORECORE sbrk
-#endif /* MORECORE */
+#define MORECORE_DEFAULT sbrk
#ifndef MORECORE_CONTIGUOUS
#define MORECORE_CONTIGUOUS 1
#endif /* MORECORE_CONTIGUOUS */
#endif /* HAVE_MORECORE */
#ifndef DEFAULT_GRANULARITY
-#if MORECORE_CONTIGUOUS
+#if (MORECORE_CONTIGUOUS || defined(WIN32))
#define DEFAULT_GRANULARITY (0) /* 0 means to compute in init_mparams */
#else /* MORECORE_CONTIGUOUS */
#define DEFAULT_GRANULARITY ((size_t)64U * (size_t)1024U)
@@ -562,6 +692,13 @@ DEFAULT_MMAP_THRESHOLD default: 256K
#define DEFAULT_MMAP_THRESHOLD MAX_SIZE_T
#endif /* HAVE_MMAP */
#endif /* DEFAULT_MMAP_THRESHOLD */
+#ifndef MAX_RELEASE_CHECK_RATE
+#if HAVE_MMAP
+#define MAX_RELEASE_CHECK_RATE 4095
+#else
+#define MAX_RELEASE_CHECK_RATE MAX_SIZE_T
+#endif /* HAVE_MMAP */
+#endif /* MAX_RELEASE_CHECK_RATE */
#ifndef USE_BUILTIN_FFS
#define USE_BUILTIN_FFS 0
#endif /* USE_BUILTIN_FFS */
@@ -574,6 +711,12 @@ DEFAULT_MMAP_THRESHOLD default: 256K
#ifndef MALLINFO_FIELD_TYPE
#define MALLINFO_FIELD_TYPE size_t
#endif /* MALLINFO_FIELD_TYPE */
+#ifndef NO_MALLOC_STATS
+#define NO_MALLOC_STATS 0
+#endif /* NO_MALLOC_STATS */
+#ifndef NO_SEGMENT_TRAVERSAL
+#define NO_SEGMENT_TRAVERSAL 0
+#endif /* NO_SEGMENT_TRAVERSAL */
/*
mallopt tuning options. SVID/XPG defines four standard parameter
@@ -616,7 +759,10 @@ DEFAULT_MMAP_THRESHOLD default: 256K
#ifdef HAVE_USR_INCLUDE_MALLOC_H
#include "/usr/include/malloc.h"
#else /* HAVE_USR_INCLUDE_MALLOC_H */
-
+#ifndef STRUCT_MALLINFO_DECLARED
+/* HP-UX (and others?) redefines mallinfo unless _STRUCT_MALLINFO is defined */
+#define _STRUCT_MALLINFO
+#define STRUCT_MALLINFO_DECLARED 1
struct mallinfo {
MALLINFO_FIELD_TYPE arena; /* non-mmapped space allocated from system */
MALLINFO_FIELD_TYPE ordblks; /* number of free chunks */
@@ -629,13 +775,41 @@ struct mallinfo {
MALLINFO_FIELD_TYPE fordblks; /* total free space */
MALLINFO_FIELD_TYPE keepcost; /* releasable (via malloc_trim) space */
};
-
+#endif /* STRUCT_MALLINFO_DECLARED */
#endif /* HAVE_USR_INCLUDE_MALLOC_H */
#endif /* NO_MALLINFO */
+/*
+ Try to persuade compilers to inline. The most critical functions for
+ inlining are defined as macros, so these aren't used for them.
+*/
+
+#ifndef FORCEINLINE
+ #if defined(__GNUC__)
+#define FORCEINLINE __inline __attribute__ ((always_inline))
+ #elif defined(_MSC_VER)
+ #define FORCEINLINE __forceinline
+ #endif
+#endif
+#ifndef NOINLINE
+ #if defined(__GNUC__)
+ #define NOINLINE __attribute__ ((noinline))
+ #elif defined(_MSC_VER)
+ #define NOINLINE __declspec(noinline)
+ #else
+ #define NOINLINE
+ #endif
+#endif
+
#ifdef __cplusplus
extern "C" {
+#ifndef FORCEINLINE
+ #define FORCEINLINE inline
+#endif
#endif /* __cplusplus */
+#ifndef FORCEINLINE
+ #define FORCEINLINE
+#endif
#if !ONLY_MSPACES
@@ -646,7 +820,9 @@ extern "C" {
#define dlfree free
#define dlmalloc malloc
#define dlmemalign memalign
+#define dlposix_memalign posix_memalign
#define dlrealloc realloc
+#define dlrealloc_in_place realloc_in_place
#define dlvalloc valloc
#define dlpvalloc pvalloc
#define dlmallinfo mallinfo
@@ -656,11 +832,14 @@ extern "C" {
#define dlmalloc_usable_size malloc_usable_size
#define dlmalloc_footprint malloc_footprint
#define dlmalloc_max_footprint malloc_max_footprint
+#define dlmalloc_footprint_limit malloc_footprint_limit
+#define dlmalloc_set_footprint_limit malloc_set_footprint_limit
+#define dlmalloc_inspect_all malloc_inspect_all
#define dlindependent_calloc independent_calloc
#define dlindependent_comalloc independent_comalloc
+#define dlbulk_free bulk_free
#endif /* USE_DL_PREFIX */
-
/*
malloc(size_t n)
Returns a pointer to a newly allocated chunk of at least n bytes, or
@@ -675,7 +854,7 @@ extern "C" {
maximum supported value of n differs across systems, but is in all
cases less than the maximum representable value of a size_t.
*/
-void* dlmalloc(size_t);
+DLMALLOC_EXPORT void* dlmalloc(size_t);
/*
free(void* p)
@@ -684,14 +863,14 @@ void* dlmalloc(size_t);
It has no effect if p is null. If p was not malloced or already
freed, free(p) will by default cause the current program to abort.
*/
-void dlfree(void*);
+DLMALLOC_EXPORT void dlfree(void*);
/*
calloc(size_t n_elements, size_t element_size);
Returns a pointer to n_elements * element_size bytes, with all locations
set to zero.
*/
-void* dlcalloc(size_t, size_t);
+DLMALLOC_EXPORT void* dlcalloc(size_t, size_t);
/*
realloc(void* p, size_t n)
@@ -715,8 +894,22 @@ void* dlcalloc(size_t, size_t);
The old unix realloc convention of allowing the last-free'd chunk
to be used as an argument to realloc is not supported.
*/
+DLMALLOC_EXPORT void* dlrealloc(void*, size_t);
-void* dlrealloc(void*, size_t);
+/*
+ realloc_in_place(void* p, size_t n)
+ Resizes the space allocated for p to size n, only if this can be
+ done without moving p (i.e., only if there is adjacent space
+ available if n is greater than p's current allocated size, or n is
+ less than or equal to p's size). This may be used instead of plain
+ realloc if an alternative allocation strategy is needed upon failure
+ to expand space; for example, reallocation of a buffer that must be
+ memory-aligned or cleared. You can use realloc_in_place to trigger
+ these alternatives only when needed.
+
+ Returns p if successful; otherwise null.
+*/
+DLMALLOC_EXPORT void* dlrealloc_in_place(void*, size_t);
/*
memalign(size_t alignment, size_t n);
@@ -730,14 +923,24 @@ void* dlrealloc(void*, size_t);
Overreliance on memalign is a sure way to fragment space.
*/
-void* dlmemalign(size_t, size_t);
+DLMALLOC_EXPORT void* dlmemalign(size_t, size_t);
+
+/*
+ int posix_memalign(void** pp, size_t alignment, size_t n);
+ Allocates a chunk of n bytes, aligned in accord with the alignment
+ argument. Differs from memalign only in that it (1) assigns the
+ allocated memory to *pp rather than returning it, (2) fails and
+ returns EINVAL if the alignment is not a power of two (3) fails and
+ returns ENOMEM if memory cannot be allocated.
+*/
+DLMALLOC_EXPORT int dlposix_memalign(void**, size_t, size_t);
/*
valloc(size_t n);
Equivalent to memalign(pagesize, n), where pagesize is the page
size of the system. If the pagesize is unknown, 4096 is used.
*/
-void* dlvalloc(size_t);
+DLMALLOC_EXPORT void* dlvalloc(size_t);
/*
mallopt(int parameter_number, int parameter_value)
@@ -745,7 +948,11 @@ void* dlvalloc(size_t);
(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. SVID/XPG/ANSI defines four standard param numbers for mallopt,
+ 0. To workaround the fact that mallopt is specified to use int,
+ not size_t parameters, the value -1 is specially treated as the
+ maximum unsigned size_t value.
+
+ SVID/XPG/ANSI defines four standard param numbers for mallopt,
normally defined in malloc.h. None of these are use in this malloc,
so setting them has no effect. But this malloc also supports other
options in mallopt. See below for details. Briefly, supported
@@ -753,11 +960,11 @@ void* dlvalloc(size_t);
configurations).
Symbol param # default allowed param values
- M_TRIM_THRESHOLD -1 2*1024*1024 any (MAX_SIZE_T disables)
+ M_TRIM_THRESHOLD -1 2*1024*1024 any (-1 disables)
M_GRANULARITY -2 page size any power of 2 >= page size
M_MMAP_THRESHOLD -3 256*1024 any (or 0 if no MMAP support)
*/
-int dlmallopt(int, int);
+DLMALLOC_EXPORT int dlmallopt(int, int);
/*
malloc_footprint();
@@ -768,7 +975,7 @@ int dlmallopt(int, int);
Even if locks are otherwise defined, this function does not use them,
so results might not be up to date.
*/
-size_t dlmalloc_footprint(void);
+DLMALLOC_EXPORT size_t dlmalloc_footprint(void);
/*
malloc_max_footprint();
@@ -781,7 +988,66 @@ size_t dlmalloc_footprint(void);
otherwise defined, this function does not use them, so results might
not be up to date.
*/
-size_t dlmalloc_max_footprint(void);
+DLMALLOC_EXPORT size_t dlmalloc_max_footprint(void);
+
+/*
+ malloc_footprint_limit();
+ Returns the number of bytes that the heap is allowed to obtain from
+ the system, returning the last value returned by
+ malloc_set_footprint_limit, or the maximum size_t value if
+ never set. The returned value reflects a permission. There is no
+ guarantee that this number of bytes can actually be obtained from
+ the system.
+*/
+DLMALLOC_EXPORT size_t dlmalloc_footprint_limit();
+
+/*
+ malloc_set_footprint_limit();
+ Sets the maximum number of bytes to obtain from the system, causing
+ failure returns from malloc and related functions upon attempts to
+ exceed this value. The argument value may be subject to page
+ rounding to an enforceable limit; this actual value is returned.
+ Using an argument of the maximum possible size_t effectively
+ disables checks. If the argument is less than or equal to the
+ current malloc_footprint, then all future allocations that require
+ additional system memory will fail. However, invocation cannot
+ retroactively deallocate existing used memory.
+*/
+DLMALLOC_EXPORT size_t dlmalloc_set_footprint_limit(size_t bytes);
+
+#if MALLOC_INSPECT_ALL
+/*
+ malloc_inspect_all(void(*handler)(void *start,
+ void *end,
+ size_t used_bytes,
+ void* callback_arg),
+ void* arg);
+ Traverses the heap and calls the given handler for each managed
+ region, skipping all bytes that are (or may be) used for bookkeeping
+ purposes. Traversal does not include include chunks that have been
+ directly memory mapped. Each reported region begins at the start
+ address, and continues up to but not including the end address. The
+ first used_bytes of the region contain allocated data. If
+ used_bytes is zero, the region is unallocated. The handler is
+ invoked with the given callback argument. If locks are defined, they
+ are held during the entire traversal. It is a bad idea to invoke
+ other malloc functions from within the handler.
+
+ For example, to count the number of in-use chunks with size greater
+ than 1000, you could write:
+ static int count = 0;
+ void count_chunks(void* start, void* end, size_t used, void* arg) {
+ if (used >= 1000) ++count;
+ }
+ then:
+ malloc_inspect_all(count_chunks, NULL);
+
+ malloc_inspect_all is compiled only if MALLOC_INSPECT_ALL is defined.
+*/
+DLMALLOC_EXPORT void dlmalloc_inspect_all(void(*handler)(void*, void *, size_t, void*),
+ void* arg);
+
+#endif /* MALLOC_INSPECT_ALL */
#if !NO_MALLINFO
/*
@@ -794,19 +1060,19 @@ size_t dlmalloc_max_footprint(void);
hblks: current number of mmapped regions
hblkhd: total bytes held in mmapped regions
usmblks: the maximum total allocated space. This will be greater
- than current total if trimming has occurred.
+ than current total if trimming has occurred.
fsmblks: always zero
uordblks: current total allocated space (normal or mmapped)
fordblks: total free space
keepcost: the maximum number of bytes that could ideally be released
- back to system via malloc_trim. ("ideally" means that
- it ignores page restrictions etc.)
+ back to system via malloc_trim. ("ideally" means that
+ it ignores page restrictions etc.)
Because these fields are ints, but internal bookkeeping may
be kept as longs, the reported values may wrap around zero and
thus be inaccurate.
*/
-struct mallinfo dlmallinfo(void);
+DLMALLOC_EXPORT struct mallinfo dlmallinfo(void);
#endif /* NO_MALLINFO */
/*
@@ -833,11 +1099,8 @@ struct mallinfo dlmallinfo(void);
is null, it returns a chunk representing an array with zero elements
(which should be freed if not wanted).
- Each element must be individually freed when it is no longer
- needed. If you'd like to instead be able to free all at once, you
- should instead use regular calloc and assign pointers into this
- space to represent elements. (In this case though, you cannot
- independently free elements.)
+ Each element must be freed when it is no longer needed. This can be
+ done all at once using bulk_free.
independent_calloc simplifies and speeds up implementations of many
kinds of pools. It may also be useful when constructing large data
@@ -861,7 +1124,7 @@ struct mallinfo dlmallinfo(void);
return first;
}
*/
-void** dlindependent_calloc(size_t, size_t, void**);
+DLMALLOC_EXPORT void** dlindependent_calloc(size_t, size_t, void**);
/*
independent_comalloc(size_t n_elements, size_t sizes[], void* chunks[]);
@@ -885,11 +1148,8 @@ void** dlindependent_calloc(size_t, size_t, void**);
null, it returns a chunk representing an array with zero elements
(which should be freed if not wanted).
- Each element must be individually freed when it is no longer
- needed. If you'd like to instead be able to free all at once, you
- should instead use a single regular malloc, and assign pointers at
- particular offsets in the aggregate space. (In this case though, you
- cannot independently free elements.)
+ Each element must be freed when it is no longer needed. This can be
+ done all at once using bulk_free.
independent_comallac differs from independent_calloc in that each
element may have a different size, and also that it does not
@@ -922,15 +1182,25 @@ void** dlindependent_calloc(size_t, size_t, void**);
since it cannot reuse existing noncontiguous small chunks that
might be available for some of the elements.
*/
-void** dlindependent_comalloc(size_t, size_t*, void**);
+DLMALLOC_EXPORT void** dlindependent_comalloc(size_t, size_t*, void**);
+/*
+ bulk_free(void* array[], size_t n_elements)
+ Frees and clears (sets to null) each non-null pointer in the given
+ array. This is likely to be faster than freeing them one-by-one.
+ If footers are used, pointers that have been allocated in different
+ mspaces are not freed or cleared, and the count of all such pointers
+ is returned. For large arrays of pointers with poor locality, it
+ may be worthwhile to sort this array before calling bulk_free.
+*/
+DLMALLOC_EXPORT size_t dlbulk_free(void**, size_t n_elements);
/*
pvalloc(size_t n);
Equivalent to valloc(minimum-page-that-holds(n)), that is,
round up n to nearest pagesize.
*/
-void* dlpvalloc(size_t);
+DLMALLOC_EXPORT void* dlpvalloc(size_t);
/*
malloc_trim(size_t pad);
@@ -953,23 +1223,7 @@ void* dlpvalloc(size_t);
Malloc_trim returns 1 if it actually released any memory, else 0.
*/
-int dlmalloc_trim(size_t);
-
-/*
- malloc_usable_size(void* p);
-
- Returns the number of bytes you can actually use in
- an allocated chunk, which may be more than you requested (although
- often not) due to alignment and minimum size constraints.
- You can use this many bytes without worrying about
- overwriting other allocated objects. This is not a particularly great
- programming practice. malloc_usable_size can be more useful in
- debugging and assertions, for example:
-
- p = malloc(n);
- assert(malloc_usable_size(p) >= 256);
-*/
-size_t dlmalloc_usable_size(void*);
+DLMALLOC_EXPORT int dlmalloc_trim(size_t);
/*
malloc_stats();
@@ -990,7 +1244,23 @@ size_t dlmalloc_usable_size(void*);
malloc_stats prints only the most commonly interesting statistics.
More information can be obtained by calling mallinfo.
*/
-void dlmalloc_stats(void);
+DLMALLOC_EXPORT void dlmalloc_stats(void);
+
+/*
+ malloc_usable_size(void* p);
+
+ Returns the number of bytes you can actually use in
+ an allocated chunk, which may be more than you requested (although
+ often not) due to alignment and minimum size constraints.
+ You can use this many bytes without worrying about
+ overwriting other allocated objects. This is not a particularly great
+ programming practice. malloc_usable_size can be more useful in
+ debugging and assertions, for example:
+
+ p = malloc(n);
+ assert(malloc_usable_size(p) >= 256);
+*/
+size_t dlmalloc_usable_size(void*);
#endif /* ONLY_MSPACES */
@@ -1013,7 +1283,7 @@ typedef void* mspace;
compiling with a different DEFAULT_GRANULARITY or dynamically
setting with mallopt(M_GRANULARITY, value).
*/
-mspace create_mspace(size_t capacity, int locked);
+DLMALLOC_EXPORT mspace create_mspace(size_t capacity, int locked);
/*
destroy_mspace destroys the given space, and attempts to return all
@@ -1021,7 +1291,7 @@ mspace create_mspace(size_t capacity, int locked);
bytes freed. After destruction, the results of access to all memory
used by the space become undefined.
*/
-size_t destroy_mspace(mspace msp);
+DLMALLOC_EXPORT size_t destroy_mspace(mspace msp);
/*
create_mspace_with_base uses the memory supplied as the initial base
@@ -1032,13 +1302,27 @@ size_t destroy_mspace(mspace msp);
Destroying this space will deallocate all additionally allocated
space (if possible) but not the initial base.
*/
-mspace create_mspace_with_base(void* base, size_t capacity, int locked);
+DLMALLOC_EXPORT mspace create_mspace_with_base(void* base, size_t capacity, int locked);
+
+/*
+ mspace_track_large_chunks controls whether requests for large chunks
+ are allocated in their own untracked mmapped regions, separate from
+ others in this mspace. By default large chunks are not tracked,
+ which reduces fragmentation. However, such chunks are not
+ necessarily released to the system upon destroy_mspace. Enabling
+ tracking by setting to true may increase fragmentation, but avoids
+ leakage when relying on destroy_mspace to release all memory
+ allocated using this space. The function returns the previous
+ setting.
+*/
+DLMALLOC_EXPORT int mspace_track_large_chunks(mspace msp, int enable);
+
/*
mspace_malloc behaves as malloc, but operates within
the given space.
*/
-void* mspace_malloc(mspace msp, size_t bytes);
+DLMALLOC_EXPORT void* mspace_malloc(mspace msp, size_t bytes);
/*
mspace_free behaves as free, but operates within
@@ -1048,7 +1332,7 @@ void* mspace_malloc(mspace msp, size_t bytes);
free may be called instead of mspace_free because freed chunks from
any space are handled by their originating spaces.
*/
-void mspace_free(mspace msp, void* mem);
+DLMALLOC_EXPORT void mspace_free(mspace msp, void* mem);
/*
mspace_realloc behaves as realloc, but operates within
@@ -1059,45 +1343,45 @@ void mspace_free(mspace msp, void* mem);
realloced chunks from any space are handled by their originating
spaces.
*/
-void* mspace_realloc(mspace msp, void* mem, size_t newsize);
+DLMALLOC_EXPORT void* mspace_realloc(mspace msp, void* mem, size_t newsize);
/*
mspace_calloc behaves as calloc, but operates within
the given space.
*/
-void* mspace_calloc(mspace msp, size_t n_elements, size_t elem_size);
+DLMALLOC_EXPORT void* mspace_calloc(mspace msp, size_t n_elements, size_t elem_size);
/*
mspace_memalign behaves as memalign, but operates within
the given space.
*/
-void* mspace_memalign(mspace msp, size_t alignment, size_t bytes);
+DLMALLOC_EXPORT void* mspace_memalign(mspace msp, size_t alignment, size_t bytes);
/*
mspace_independent_calloc behaves as independent_calloc, but
operates within the given space.
*/
-void** mspace_independent_calloc(mspace msp, size_t n_elements,
- size_t elem_size, void* chunks[]);
+DLMALLOC_EXPORT void** mspace_independent_calloc(mspace msp, size_t n_elements,
+ size_t elem_size, void* chunks[]);
/*
mspace_independent_comalloc behaves as independent_comalloc, but
operates within the given space.
*/
-void** mspace_independent_comalloc(mspace msp, size_t n_elements,
- size_t sizes[], void* chunks[]);
+DLMALLOC_EXPORT void** mspace_independent_comalloc(mspace msp, size_t n_elements,
+ size_t sizes[], void* chunks[]);
/*
mspace_footprint() returns the number of bytes obtained from the
system for this space.
*/
-size_t mspace_footprint(mspace msp);
+DLMALLOC_EXPORT size_t mspace_footprint(mspace msp);
/*
mspace_max_footprint() returns the peak number of bytes obtained from the
system for this space.
*/
-size_t mspace_max_footprint(mspace msp);
+DLMALLOC_EXPORT size_t mspace_max_footprint(mspace msp);
#if !NO_MALLINFO
@@ -1105,30 +1389,35 @@ size_t mspace_max_footprint(mspace msp);
mspace_mallinfo behaves as mallinfo, but reports properties of
the given space.
*/
-struct mallinfo mspace_mallinfo(mspace msp);
+DLMALLOC_EXPORT struct mallinfo mspace_mallinfo(mspace msp);
#endif /* NO_MALLINFO */
/*
+ malloc_usable_size(void* p) behaves the same as malloc_usable_size;
+*/
+DLMALLOC_EXPORT size_t mspace_usable_size(const void* mem);
+
+/*
mspace_malloc_stats behaves as malloc_stats, but reports
properties of the given space.
*/
-void mspace_malloc_stats(mspace msp);
+DLMALLOC_EXPORT void mspace_malloc_stats(mspace msp);
/*
mspace_trim behaves as malloc_trim, but
operates within the given space.
*/
-int mspace_trim(mspace msp, size_t pad);
+DLMALLOC_EXPORT int mspace_trim(mspace msp, size_t pad);
/*
An alias for mallopt.
*/
-int mspace_mallopt(int, int);
+DLMALLOC_EXPORT int mspace_mallopt(int, int);
#endif /* MSPACES */
#ifdef __cplusplus
-}; /* end of extern "C" */
+} /* end of extern "C" */
#endif /* __cplusplus */
/*
@@ -1143,30 +1432,34 @@ int mspace_mallopt(int, int);
/*------------------------------ internal #includes ---------------------- */
-#ifdef WIN32
+#ifdef _MSC_VER
#pragma warning( disable : 4146 ) /* no "unsigned" warnings */
-#endif /* WIN32 */
-
+#endif /* _MSC_VER */
+#if !NO_MALLOC_STATS
#include <stdio.h> /* for printing in malloc_stats */
-
+#endif /* NO_MALLOC_STATS */
#ifndef LACKS_ERRNO_H
#include <errno.h> /* for MALLOC_FAILURE_ACTION */
#endif /* LACKS_ERRNO_H */
-#if FOOTERS
-#include <time.h> /* for magic initialization */
-#endif /* FOOTERS */
-#ifndef LACKS_STDLIB_H
-#include <stdlib.h> /* for abort() */
-#endif /* LACKS_STDLIB_H */
#ifdef DEBUG
#if ABORT_ON_ASSERT_FAILURE
+#undef assert
#define assert(x) if(!(x)) ABORT
#else /* ABORT_ON_ASSERT_FAILURE */
#include <assert.h>
#endif /* ABORT_ON_ASSERT_FAILURE */
#else /* DEBUG */
+#ifndef assert
#define assert(x)
+#endif
+#define DEBUG 0
#endif /* DEBUG */
+#if !defined(WIN32) && !defined(LACKS_TIME_H)
+#include <time.h> /* for magic initialization */
+#endif /* WIN32 */
+#ifndef LACKS_STDLIB_H
+#include <stdlib.h> /* for abort() */
+#endif /* LACKS_STDLIB_H */
#ifndef LACKS_STRING_H
#include <string.h> /* for memset etc */
#endif /* LACKS_STRING_H */
@@ -1177,21 +1470,83 @@ int mspace_mallopt(int, int);
#endif /* USE_BUILTIN_FFS */
#if HAVE_MMAP
#ifndef LACKS_SYS_MMAN_H
+/* On some versions of linux, mremap decl in mman.h needs __USE_GNU set */
+#if (defined(linux) && !defined(__USE_GNU))
+#define __USE_GNU 1
+#include <sys/mman.h> /* for mmap */
+#undef __USE_GNU
+#else
#include <sys/mman.h> /* for mmap */
+#endif /* linux */
#endif /* LACKS_SYS_MMAN_H */
#ifndef LACKS_FCNTL_H
#include <fcntl.h>
#endif /* LACKS_FCNTL_H */
#endif /* HAVE_MMAP */
-#if HAVE_MORECORE
#ifndef LACKS_UNISTD_H
-#include <unistd.h> /* for sbrk */
+#include <unistd.h> /* for sbrk, sysconf */
#else /* LACKS_UNISTD_H */
#if !defined(__FreeBSD__) && !defined(__OpenBSD__) && !defined(__NetBSD__)
extern void* sbrk(ptrdiff_t);
#endif /* FreeBSD etc */
#endif /* LACKS_UNISTD_H */
-#endif /* HAVE_MMAP */
+
+/* Declarations for locking */
+#if USE_LOCKS
+#ifndef WIN32
+#if defined (__SVR4) && defined (__sun) /* solaris */
+#include <thread.h>
+#elif !defined(LACKS_SCHED_H)
+#include <sched.h>
+#endif /* solaris or LACKS_SCHED_H */
+#if (defined(USE_RECURSIVE_LOCKS) && USE_RECURSIVE_LOCKS != 0) || !USE_SPIN_LOCKS
+#include <pthread.h>
+#endif /* USE_RECURSIVE_LOCKS ... */
+#elif defined(_MSC_VER)
+#ifndef _M_AMD64
+/* These are already defined on AMD64 builds */
+#ifdef __cplusplus
+extern "C" {
+#endif /* __cplusplus */
+LONG __cdecl _InterlockedCompareExchange(LONG volatile *Dest, LONG Exchange, LONG Comp);
+LONG __cdecl _InterlockedExchange(LONG volatile *Target, LONG Value);
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+#endif /* _M_AMD64 */
+#pragma intrinsic (_InterlockedCompareExchange)
+#pragma intrinsic (_InterlockedExchange)
+#define interlockedcompareexchange _InterlockedCompareExchange
+#define interlockedexchange _InterlockedExchange
+#elif defined(WIN32) && defined(__GNUC__)
+#define interlockedcompareexchange(a, b, c) __sync_val_compare_and_swap(a, c, b)
+#define interlockedexchange __sync_lock_test_and_set
+#endif /* Win32 */
+#else /* USE_LOCKS */
+#endif /* USE_LOCKS */
+
+#ifndef LOCK_AT_FORK
+#define LOCK_AT_FORK 0
+#endif
+
+/* Declarations for bit scanning on win32 */
+#if defined(_MSC_VER) && _MSC_VER>=1300
+#ifndef BitScanForward /* Try to avoid pulling in WinNT.h */
+#ifdef __cplusplus
+extern "C" {
+#endif /* __cplusplus */
+unsigned char _BitScanForward(unsigned long *index, unsigned long mask);
+unsigned char _BitScanReverse(unsigned long *index, unsigned long mask);
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
+#define BitScanForward _BitScanForward
+#define BitScanReverse _BitScanReverse
+#pragma intrinsic(_BitScanForward)
+#pragma intrinsic(_BitScanReverse)
+#endif /* BitScanForward */
+#endif /* defined(_MSC_VER) && _MSC_VER>=1300 */
#ifndef WIN32
#ifndef malloc_getpagesize
@@ -1247,10 +1602,11 @@ extern void* sbrk(ptrdiff_t);
#define SIZE_T_BITSIZE (sizeof(size_t) << 3)
/* Some constants coerced to size_t */
-/* Annoying but necessary to avoid errors on some plaftorms */
+/* Annoying but necessary to avoid errors on some platforms */
#define SIZE_T_ZERO ((size_t)0)
#define SIZE_T_ONE ((size_t)1)
#define SIZE_T_TWO ((size_t)2)
+#define SIZE_T_FOUR ((size_t)4)
#define TWO_SIZE_T_SIZES (SIZE_T_SIZE<<1)
#define FOUR_SIZE_T_SIZES (SIZE_T_SIZE<<2)
#define SIX_SIZE_T_SIZES (FOUR_SIZE_T_SIZES+TWO_SIZE_T_SIZES)
@@ -1280,26 +1636,17 @@ extern void* sbrk(ptrdiff_t);
#define MFAIL ((void*)(MAX_SIZE_T))
#define CMFAIL ((char*)(MFAIL)) /* defined for convenience */
-#if !HAVE_MMAP
-#define IS_MMAPPED_BIT (SIZE_T_ZERO)
-#define USE_MMAP_BIT (SIZE_T_ZERO)
-#define CALL_MMAP(s) MFAIL
-#define CALL_MUNMAP(a, s) (-1)
-#define DIRECT_MMAP(s) MFAIL
-
-#else /* HAVE_MMAP */
-#define IS_MMAPPED_BIT (SIZE_T_ONE)
-#define USE_MMAP_BIT (SIZE_T_ONE)
+#if HAVE_MMAP
#ifndef WIN32
-#define CALL_MUNMAP(a, s) munmap((a), (s))
+#define MUNMAP_DEFAULT(a, s) munmap((a), (s))
#define MMAP_PROT (PROT_READ|PROT_WRITE)
#if !defined(MAP_ANONYMOUS) && defined(MAP_ANON)
#define MAP_ANONYMOUS MAP_ANON
#endif /* MAP_ANON */
#ifdef MAP_ANONYMOUS
#define MMAP_FLAGS (MAP_PRIVATE|MAP_ANONYMOUS)
-#define CALL_MMAP(s) mmap(0, (s), MMAP_PROT, MMAP_FLAGS, -1, 0)
+#define MMAP_DEFAULT(s) mmap(0, (s), MMAP_PROT, MMAP_FLAGS, -1, 0)
#else /* MAP_ANONYMOUS */
/*
Nearly all versions of mmap support MAP_ANONYMOUS, so the following
@@ -1307,37 +1654,38 @@ extern void* sbrk(ptrdiff_t);
*/
#define MMAP_FLAGS (MAP_PRIVATE)
static int dev_zero_fd = -1; /* Cached file descriptor for /dev/zero. */
-#define CALL_MMAP(s) ((dev_zero_fd < 0) ? \
- (dev_zero_fd = open("/dev/zero", O_RDWR), \
- mmap(0, (s), MMAP_PROT, MMAP_FLAGS, dev_zero_fd, 0)) : \
- mmap(0, (s), MMAP_PROT, MMAP_FLAGS, dev_zero_fd, 0))
+#define MMAP_DEFAULT(s) ((dev_zero_fd < 0) ? \
+ (dev_zero_fd = open("/dev/zero", O_RDWR), \
+ mmap(0, (s), MMAP_PROT, MMAP_FLAGS, dev_zero_fd, 0)) : \
+ mmap(0, (s), MMAP_PROT, MMAP_FLAGS, dev_zero_fd, 0))
#endif /* MAP_ANONYMOUS */
-#define DIRECT_MMAP(s) CALL_MMAP(s)
+#define DIRECT_MMAP_DEFAULT(s) MMAP_DEFAULT(s)
+
#else /* WIN32 */
/* Win32 MMAP via VirtualAlloc */
-static void* win32mmap(size_t size) {
+static FORCEINLINE void* win32mmap(size_t size) {
void* ptr = VirtualAlloc(0, size, MEM_RESERVE|MEM_COMMIT, PAGE_READWRITE);
return (ptr != 0)? ptr: MFAIL;
}
/* For direct MMAP, use MEM_TOP_DOWN to minimize interference */
-static void* win32direct_mmap(size_t size) {
+static FORCEINLINE void* win32direct_mmap(size_t size) {
void* ptr = VirtualAlloc(0, size, MEM_RESERVE|MEM_COMMIT|MEM_TOP_DOWN,
- PAGE_READWRITE);
+ PAGE_READWRITE);
return (ptr != 0)? ptr: MFAIL;
}
/* This function supports releasing coalesed segments */
-static int win32munmap(void* ptr, size_t size) {
+static FORCEINLINE int win32munmap(void* ptr, size_t size) {
MEMORY_BASIC_INFORMATION minfo;
- char* cptr = ptr;
+ char* cptr = (char*)ptr;
while (size) {
if (VirtualQuery(cptr, &minfo, sizeof(minfo)) == 0)
return -1;
if (minfo.BaseAddress != cptr || minfo.AllocationBase != cptr ||
- minfo.State != MEM_COMMIT || minfo.RegionSize > size)
+ minfo.State != MEM_COMMIT || minfo.RegionSize > size)
return -1;
if (VirtualFree(cptr, 0, MEM_RELEASE) == 0)
return -1;
@@ -1347,24 +1695,76 @@ static int win32munmap(void* ptr, size_t size) {
return 0;
}
-#define CALL_MMAP(s) win32mmap(s)
-#define CALL_MUNMAP(a, s) win32munmap((a), (s))
-#define DIRECT_MMAP(s) win32direct_mmap(s)
+#define MMAP_DEFAULT(s) win32mmap(s)
+#define MUNMAP_DEFAULT(a, s) win32munmap((a), (s))
+#define DIRECT_MMAP_DEFAULT(s) win32direct_mmap(s)
#endif /* WIN32 */
#endif /* HAVE_MMAP */
-#if HAVE_MMAP && HAVE_MREMAP
-#define CALL_MREMAP(addr, osz, nsz, mv) mremap((addr), (osz), (nsz), (mv))
-#else /* HAVE_MMAP && HAVE_MREMAP */
-#define CALL_MREMAP(addr, osz, nsz, mv) MFAIL
-#endif /* HAVE_MMAP && HAVE_MREMAP */
+#if HAVE_MREMAP
+#ifndef WIN32
+#define MREMAP_DEFAULT(addr, osz, nsz, mv) mremap((addr), (osz), (nsz), (mv))
+#endif /* WIN32 */
+#endif /* HAVE_MREMAP */
+/**
+ * Define CALL_MORECORE
+ */
#if HAVE_MORECORE
-#define CALL_MORECORE(S) MORECORE(S)
+ #ifdef MORECORE
+ #define CALL_MORECORE(S) MORECORE(S)
+ #else /* MORECORE */
+ #define CALL_MORECORE(S) MORECORE_DEFAULT(S)
+ #endif /* MORECORE */
#else /* HAVE_MORECORE */
-#define CALL_MORECORE(S) MFAIL
+ #define CALL_MORECORE(S) MFAIL
#endif /* HAVE_MORECORE */
+/**
+ * Define CALL_MMAP/CALL_MUNMAP/CALL_DIRECT_MMAP
+ */
+#if HAVE_MMAP
+ #define USE_MMAP_BIT (SIZE_T_ONE)
+
+ #ifdef MMAP
+ #define CALL_MMAP(s) MMAP(s)
+ #else /* MMAP */
+ #define CALL_MMAP(s) MMAP_DEFAULT(s)
+ #endif /* MMAP */
+ #ifdef MUNMAP
+ #define CALL_MUNMAP(a, s) MUNMAP((a), (s))
+ #else /* MUNMAP */
+ #define CALL_MUNMAP(a, s) MUNMAP_DEFAULT((a), (s))
+ #endif /* MUNMAP */
+ #ifdef DIRECT_MMAP
+ #define CALL_DIRECT_MMAP(s) DIRECT_MMAP(s)
+ #else /* DIRECT_MMAP */
+ #define CALL_DIRECT_MMAP(s) DIRECT_MMAP_DEFAULT(s)
+ #endif /* DIRECT_MMAP */
+#else /* HAVE_MMAP */
+ #define USE_MMAP_BIT (SIZE_T_ZERO)
+
+ #define MMAP(s) MFAIL
+ #define MUNMAP(a, s) (-1)
+ #define DIRECT_MMAP(s) MFAIL
+ #define CALL_DIRECT_MMAP(s) DIRECT_MMAP(s)
+ #define CALL_MMAP(s) MMAP(s)
+ #define CALL_MUNMAP(a, s) MUNMAP((a), (s))
+#endif /* HAVE_MMAP */
+
+/**
+ * Define CALL_MREMAP
+ */
+#if HAVE_MMAP && HAVE_MREMAP
+ #ifdef MREMAP
+ #define CALL_MREMAP(addr, osz, nsz, mv) MREMAP((addr), (osz), (nsz), (mv))
+ #else /* MREMAP */
+ #define CALL_MREMAP(addr, osz, nsz, mv) MREMAP_DEFAULT((addr), (osz), (nsz), (mv))
+ #endif /* MREMAP */
+#else /* HAVE_MMAP && HAVE_MREMAP */
+ #define CALL_MREMAP(addr, osz, nsz, mv) MFAIL
+#endif /* HAVE_MMAP && HAVE_MREMAP */
+
/* mstate bit set if continguous morecore disabled or failed */
#define USE_NONCONTIGUOUS_BIT (4U)
@@ -1374,91 +1774,276 @@ static int win32munmap(void* ptr, size_t size) {
/* --------------------------- Lock preliminaries ------------------------ */
-#if USE_LOCKS
-
/*
- When locks are defined, there are up to two global locks:
+ When locks are defined, there is one global lock, plus
+ one per-mspace lock.
+
+ The global lock_ensures that mparams.magic and other unique
+ mparams values are initialized only once. It also protects
+ sequences of calls to MORECORE. In many cases sys_alloc requires
+ two calls, that should not be interleaved with calls by other
+ threads. This does not protect against direct calls to MORECORE
+ by other threads not using this lock, so there is still code to
+ cope the best we can on interference.
+
+ Per-mspace locks surround calls to malloc, free, etc.
+ By default, locks are simple non-reentrant mutexes.
+
+ Because lock-protected regions generally have bounded times, it is
+ OK to use the supplied simple spinlocks. Spinlocks are likely to
+ improve performance for lightly contended applications, but worsen
+ performance under heavy contention.
+
+ If USE_LOCKS is > 1, the definitions of lock routines here are
+ bypassed, in which case you will need to define the type MLOCK_T,
+ and at least INITIAL_LOCK, DESTROY_LOCK, ACQUIRE_LOCK, RELEASE_LOCK
+ and TRY_LOCK. You must also declare a
+ static MLOCK_T malloc_global_mutex = { initialization values };.
- * If HAVE_MORECORE, morecore_mutex protects sequences of calls to
- MORECORE. In many cases sys_alloc requires two calls, that should
- not be interleaved with calls by other threads. This does not
- protect against direct calls to MORECORE by other threads not
- using this lock, so there is still code to cope the best we can on
- interference.
-
- * magic_init_mutex ensures that mparams.magic and other
- unique mparams values are initialized only once.
*/
-#ifndef WIN32
-/* By default use posix locks */
-#include <pthread.h>
-#define MLOCK_T pthread_mutex_t
-#define INITIAL_LOCK(l) pthread_mutex_init(l, NULL)
-#define ACQUIRE_LOCK(l) pthread_mutex_lock(l)
-#define RELEASE_LOCK(l) pthread_mutex_unlock(l)
+#if !USE_LOCKS
+#define USE_LOCK_BIT (0U)
+#define INITIAL_LOCK(l) (0)
+#define DESTROY_LOCK(l) (0)
+#define ACQUIRE_MALLOC_GLOBAL_LOCK()
+#define RELEASE_MALLOC_GLOBAL_LOCK()
+
+#else
+#if USE_LOCKS > 1
+/* ----------------------- User-defined locks ------------------------ */
+/* Define your own lock implementation here */
+/* #define INITIAL_LOCK(lk) ... */
+/* #define DESTROY_LOCK(lk) ... */
+/* #define ACQUIRE_LOCK(lk) ... */
+/* #define RELEASE_LOCK(lk) ... */
+/* #define TRY_LOCK(lk) ... */
+/* static MLOCK_T malloc_global_mutex = ... */
+
+#elif USE_SPIN_LOCKS
+
+/* First, define CAS_LOCK and CLEAR_LOCK on ints */
+/* Note CAS_LOCK defined to return 0 on success */
+
+#if defined(__GNUC__)&& (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 1))
+#define CAS_LOCK(sl) __sync_lock_test_and_set(sl, 1)
+#define CLEAR_LOCK(sl) __sync_lock_release(sl)
+
+#elif (defined(__GNUC__) && (defined(__i386__) || defined(__x86_64__)))
+/* Custom spin locks for older gcc on x86 */
+static FORCEINLINE int x86_cas_lock(int *sl) {
+ int ret;
+ int val = 1;
+ int cmp = 0;
+ __asm__ __volatile__ ("lock; cmpxchgl %1, %2"
+ : "=a" (ret)
+ : "r" (val), "m" (*(sl)), "0"(cmp)
+ : "memory", "cc");
+ return ret;
+}
-#if HAVE_MORECORE
-static MLOCK_T morecore_mutex = PTHREAD_MUTEX_INITIALIZER;
-#endif /* HAVE_MORECORE */
+static FORCEINLINE void x86_clear_lock(int* sl) {
+ assert(*sl != 0);
+ int prev = 0;
+ int ret;
+ __asm__ __volatile__ ("lock; xchgl %0, %1"
+ : "=r" (ret)
+ : "m" (*(sl)), "0"(prev)
+ : "memory");
+}
+
+#define CAS_LOCK(sl) x86_cas_lock(sl)
+#define CLEAR_LOCK(sl) x86_clear_lock(sl)
+
+#else /* Win32 MSC */
+#define CAS_LOCK(sl) interlockedexchange(sl, (LONG)1)
+#define CLEAR_LOCK(sl) interlockedexchange (sl, (LONG)0)
+
+#endif /* ... gcc spins locks ... */
+
+/* How to yield for a spin lock */
+#define SPINS_PER_YIELD 63
+#if defined(_MSC_VER)
+#define SLEEP_EX_DURATION 50 /* delay for yield/sleep */
+#define SPIN_LOCK_YIELD SleepEx(SLEEP_EX_DURATION, FALSE)
+#elif defined (__SVR4) && defined (__sun) /* solaris */
+#define SPIN_LOCK_YIELD thr_yield();
+#elif !defined(LACKS_SCHED_H)
+#define SPIN_LOCK_YIELD sched_yield();
+#else
+#define SPIN_LOCK_YIELD
+#endif /* ... yield ... */
+
+#if !defined(USE_RECURSIVE_LOCKS) || USE_RECURSIVE_LOCKS == 0
+/* Plain spin locks use single word (embedded in malloc_states) */
+static int spin_acquire_lock(int *sl) {
+ int spins = 0;
+ while (*(volatile int *)sl != 0 || CAS_LOCK(sl)) {
+ if ((++spins & SPINS_PER_YIELD) == 0) {
+ SPIN_LOCK_YIELD;
+ }
+ }
+ return 0;
+}
-static MLOCK_T magic_init_mutex = PTHREAD_MUTEX_INITIALIZER;
+#define MLOCK_T int
+#define TRY_LOCK(sl) !CAS_LOCK(sl)
+#define RELEASE_LOCK(sl) CLEAR_LOCK(sl)
+#define ACQUIRE_LOCK(sl) (CAS_LOCK(sl)? spin_acquire_lock(sl) : 0)
+#define INITIAL_LOCK(sl) (*sl = 0)
+#define DESTROY_LOCK(sl) (0)
+static MLOCK_T malloc_global_mutex = 0;
-#else /* WIN32 */
+#else /* USE_RECURSIVE_LOCKS */
+/* types for lock owners */
+#ifdef WIN32
+#define THREAD_ID_T DWORD
+#define CURRENT_THREAD GetCurrentThreadId()
+#define EQ_OWNER(X,Y) ((X) == (Y))
+#else
/*
- Because lock-protected regions have bounded times, and there
- are no recursive lock calls, we can use simple spinlocks.
+ Note: the following assume that pthread_t is a type that can be
+ initialized to (casted) zero. If this is not the case, you will need to
+ somehow redefine these or not use spin locks.
*/
+#define THREAD_ID_T pthread_t
+#define CURRENT_THREAD pthread_self()
+#define EQ_OWNER(X,Y) pthread_equal(X, Y)
+#endif
-#define MLOCK_T long
-static int win32_acquire_lock (MLOCK_T *sl) {
+struct malloc_recursive_lock {
+ int sl;
+ unsigned int c;
+ THREAD_ID_T threadid;
+};
+
+#define MLOCK_T struct malloc_recursive_lock
+static MLOCK_T malloc_global_mutex = { 0, 0, (THREAD_ID_T)0};
+
+static FORCEINLINE void recursive_release_lock(MLOCK_T *lk) {
+ assert(lk->sl != 0);
+ if (--lk->c == 0) {
+ CLEAR_LOCK(&lk->sl);
+ }
+}
+
+static FORCEINLINE int recursive_acquire_lock(MLOCK_T *lk) {
+ THREAD_ID_T mythreadid = CURRENT_THREAD;
+ int spins = 0;
for (;;) {
-#ifdef InterlockedCompareExchangePointer
- if (!InterlockedCompareExchange(sl, 1, 0))
- return 0;
-#else /* Use older void* version */
- if (!InterlockedCompareExchange((void**)sl, (void*)1, (void*)0))
+ if (*((volatile int *)(&lk->sl)) == 0) {
+ if (!CAS_LOCK(&lk->sl)) {
+ lk->threadid = mythreadid;
+ lk->c = 1;
+ return 0;
+ }
+ }
+ else if (EQ_OWNER(lk->threadid, mythreadid)) {
+ ++lk->c;
return 0;
-#endif /* InterlockedCompareExchangePointer */
- Sleep (0);
+ }
+ if ((++spins & SPINS_PER_YIELD) == 0) {
+ SPIN_LOCK_YIELD;
+ }
}
}
-static void win32_release_lock (MLOCK_T *sl) {
- InterlockedExchange (sl, 0);
+static FORCEINLINE int recursive_try_lock(MLOCK_T *lk) {
+ THREAD_ID_T mythreadid = CURRENT_THREAD;
+ if (*((volatile int *)(&lk->sl)) == 0) {
+ if (!CAS_LOCK(&lk->sl)) {
+ lk->threadid = mythreadid;
+ lk->c = 1;
+ return 1;
+ }
+ }
+ else if (EQ_OWNER(lk->threadid, mythreadid)) {
+ ++lk->c;
+ return 1;
+ }
+ return 0;
}
-#define INITIAL_LOCK(l) *(l)=0
-#define ACQUIRE_LOCK(l) win32_acquire_lock(l)
-#define RELEASE_LOCK(l) win32_release_lock(l)
-#if HAVE_MORECORE
-static MLOCK_T morecore_mutex;
-#endif /* HAVE_MORECORE */
-static MLOCK_T magic_init_mutex;
-#endif /* WIN32 */
+#define RELEASE_LOCK(lk) recursive_release_lock(lk)
+#define TRY_LOCK(lk) recursive_try_lock(lk)
+#define ACQUIRE_LOCK(lk) recursive_acquire_lock(lk)
+#define INITIAL_LOCK(lk) ((lk)->threadid = (THREAD_ID_T)0, (lk)->sl = 0, (lk)->c = 0)
+#define DESTROY_LOCK(lk) (0)
+#endif /* USE_RECURSIVE_LOCKS */
+
+#elif defined(WIN32) /* Win32 critical sections */
+#define MLOCK_T CRITICAL_SECTION
+#define ACQUIRE_LOCK(lk) (EnterCriticalSection(lk), 0)
+#define RELEASE_LOCK(lk) LeaveCriticalSection(lk)
+#define TRY_LOCK(lk) TryEnterCriticalSection(lk)
+#define INITIAL_LOCK(lk) (!InitializeCriticalSectionAndSpinCount((lk), 0x80000000|4000))
+#define DESTROY_LOCK(lk) (DeleteCriticalSection(lk), 0)
+#define NEED_GLOBAL_LOCK_INIT
+
+static MLOCK_T malloc_global_mutex;
+static volatile LONG malloc_global_mutex_status;
+
+/* Use spin loop to initialize global lock */
+static void init_malloc_global_mutex() {
+ for (;;) {
+ long stat = malloc_global_mutex_status;
+ if (stat > 0)
+ return;
+ /* transition to < 0 while initializing, then to > 0) */
+ if (stat == 0 &&
+ interlockedcompareexchange(&malloc_global_mutex_status, (LONG)-1, (LONG)0) == 0) {
+ InitializeCriticalSection(&malloc_global_mutex);
+ interlockedexchange(&malloc_global_mutex_status, (LONG)1);
+ return;
+ }
+ SleepEx(0, FALSE);
+ }
+}
+
+#else /* pthreads-based locks */
+#define MLOCK_T pthread_mutex_t
+#define ACQUIRE_LOCK(lk) pthread_mutex_lock(lk)
+#define RELEASE_LOCK(lk) pthread_mutex_unlock(lk)
+#define TRY_LOCK(lk) (!pthread_mutex_trylock(lk))
+#define INITIAL_LOCK(lk) pthread_init_lock(lk)
+#define DESTROY_LOCK(lk) pthread_mutex_destroy(lk)
+
+#if defined(USE_RECURSIVE_LOCKS) && USE_RECURSIVE_LOCKS != 0 && defined(linux) && !defined(PTHREAD_MUTEX_RECURSIVE)
+/* Cope with old-style linux recursive lock initialization by adding */
+/* skipped internal declaration from pthread.h */
+extern int pthread_mutexattr_setkind_np __P ((pthread_mutexattr_t *__attr,
+ int __kind));
+#define PTHREAD_MUTEX_RECURSIVE PTHREAD_MUTEX_RECURSIVE_NP
+#define pthread_mutexattr_settype(x,y) pthread_mutexattr_setkind_np(x,y)
+#endif /* USE_RECURSIVE_LOCKS ... */
+
+static MLOCK_T malloc_global_mutex = PTHREAD_MUTEX_INITIALIZER;
+
+static int pthread_init_lock (MLOCK_T *lk) {
+ pthread_mutexattr_t attr;
+ if (pthread_mutexattr_init(&attr)) return 1;
+#if defined(USE_RECURSIVE_LOCKS) && USE_RECURSIVE_LOCKS != 0
+ if (pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE)) return 1;
+#endif
+ if (pthread_mutex_init(lk, &attr)) return 1;
+ if (pthread_mutexattr_destroy(&attr)) return 1;
+ return 0;
+}
+
+#endif /* ... lock types ... */
+/* Common code for all lock types */
#define USE_LOCK_BIT (2U)
-#else /* USE_LOCKS */
-#define USE_LOCK_BIT (0U)
-#define INITIAL_LOCK(l)
-#endif /* USE_LOCKS */
-#if USE_LOCKS && HAVE_MORECORE
-#define ACQUIRE_MORECORE_LOCK() ACQUIRE_LOCK(&morecore_mutex);
-#define RELEASE_MORECORE_LOCK() RELEASE_LOCK(&morecore_mutex);
-#else /* USE_LOCKS && HAVE_MORECORE */
-#define ACQUIRE_MORECORE_LOCK()
-#define RELEASE_MORECORE_LOCK()
-#endif /* USE_LOCKS && HAVE_MORECORE */
+#ifndef ACQUIRE_MALLOC_GLOBAL_LOCK
+#define ACQUIRE_MALLOC_GLOBAL_LOCK() ACQUIRE_LOCK(&malloc_global_mutex);
+#endif
-#if USE_LOCKS
-#define ACQUIRE_MAGIC_INIT_LOCK() ACQUIRE_LOCK(&magic_init_mutex);
-#define RELEASE_MAGIC_INIT_LOCK() RELEASE_LOCK(&magic_init_mutex);
-#else /* USE_LOCKS */
-#define ACQUIRE_MAGIC_INIT_LOCK()
-#define RELEASE_MAGIC_INIT_LOCK()
-#endif /* USE_LOCKS */
+#ifndef RELEASE_MALLOC_GLOBAL_LOCK
+#define RELEASE_MALLOC_GLOBAL_LOCK() RELEASE_LOCK(&malloc_global_mutex);
+#endif
+#endif /* USE_LOCKS */
/* ----------------------- Chunk representations ------------------------ */
@@ -1485,21 +2070,21 @@ static MLOCK_T magic_init_mutex;
A chunk that's in use looks like:
chunk-> +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- | Size of previous chunk (if P = 1) |
- +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |P|
- | Size of this chunk 1| +-+
+ | Size of previous chunk (if P = 0) |
+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |P|
+ | Size of this chunk 1| +-+
mem-> +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- | |
- +- -+
- | |
- +- -+
- | :
- +- size - sizeof(size_t) available payload bytes -+
- : |
+ | |
+ +- -+
+ | |
+ +- -+
+ | :
+ +- size - sizeof(size_t) available payload bytes -+
+ : |
chunk-> +- -+
- | |
- +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ | |
+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |1|
| Size of next chunk (may or may not be in use) | +-+
mem-> +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
@@ -1507,21 +2092,21 @@ static MLOCK_T magic_init_mutex;
And if it's free, it looks like this:
chunk-> +- -+
- | User payload (must be in use, or we would have merged!) |
- +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |P|
- | Size of this chunk 0| +-+
+ | User payload (must be in use, or we would have merged!) |
+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |P|
+ | Size of this chunk 0| +-+
mem-> +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- | Next pointer |
- +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- | Prev pointer |
- +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- | :
- +- size - sizeof(struct chunk) unused bytes -+
- : |
+ | Next pointer |
+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ | Prev pointer |
+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ | :
+ +- size - sizeof(struct chunk) unused bytes -+
+ : |
chunk-> +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- | Size of this chunk |
- +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ | Size of this chunk |
+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |0|
| Size of next chunk (must be in use, or we would have merged)| +-+
mem-> +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
@@ -1529,8 +2114,8 @@ static MLOCK_T magic_init_mutex;
+- User payload -+
: |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- |0|
- +-+
+ |0|
+ +-+
Note that since we always merge adjacent free chunks, the chunks
adjacent to a free chunk must be in use.
@@ -1556,13 +2141,14 @@ static MLOCK_T magic_init_mutex;
The C (CINUSE_BIT) bit, stored in the unused second-lowest bit of
the chunk size redundantly records whether the current chunk is
- inuse. This redundancy enables usage checks within free and realloc,
- and reduces indirection when freeing and consolidating chunks.
+ inuse (unless the chunk is mmapped). This redundancy enables usage
+ checks within free and realloc, and reduces indirection when freeing
+ and consolidating chunks.
Each freshly allocated chunk must have both cinuse and pinuse set.
That is, each allocated chunk borders either a previously allocated
and still in-use chunk, or the base of its memory arena. This is
- ensured by making all allocations from the the `lowest' part of any
+ ensured by making all allocations from the `lowest' part of any
found chunk. Further, no free chunk physically borders another one,
so each free chunk is known to be preceded and followed by either
inuse chunks or the ends of memory.
@@ -1575,25 +2161,24 @@ static MLOCK_T magic_init_mutex;
The exceptions to all this are
1. The special chunk `top' is the top-most available chunk (i.e.,
- the one bordering the end of available memory). It is treated
- specially. Top 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). In effect,
- the top chunk is treated as larger (and thus less well
- fitting) than any other available chunk. The top chunk
- doesn't update its trailing size field since there is no next
- contiguous chunk that would have to index off it. However,
- space is still allocated for it (TOP_FOOT_SIZE) to enable
- separation or merging when space is extended.
-
- 3. Chunks allocated via mmap, which have the lowest-order bit
- (IS_MMAPPED_BIT) set in their prev_foot fields, and do not set
- PINUSE_BIT in their head fields. Because they are allocated
- one-by-one, each must carry its own prev_foot field, which is
- also used to hold the offset this chunk has within its mmapped
- region, which is needed to preserve alignment. Each mmapped
- chunk is trailed by the first two fields of a fake next-chunk
- for sake of usage checks.
+ the one bordering the end of available memory). It is treated
+ specially. Top 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). In effect,
+ the top chunk is treated as larger (and thus less well
+ fitting) than any other available chunk. The top chunk
+ doesn't update its trailing size field since there is no next
+ contiguous chunk that would have to index off it. However,
+ space is still allocated for it (TOP_FOOT_SIZE) to enable
+ separation or merging when space is extended.
+
+ 3. Chunks allocated via mmap, have both cinuse and pinuse bits
+ cleared in their head fields. Because they are allocated
+ one-by-one, each must carry its own prev_foot field, which is
+ also used to hold the offset this chunk has within its mmapped
+ region, which is needed to preserve alignment. Each mmapped
+ chunk is trailed by the first two fields of a fake next-chunk
+ for sake of usage checks.
*/
@@ -1654,14 +2239,16 @@ typedef unsigned int flag_t; /* The type of various bit flag sets */
/*
The head field of a chunk is or'ed with PINUSE_BIT when previous
adjacent chunk in use, and or'ed with CINUSE_BIT if this chunk is in
- use. If the chunk was obtained with mmap, the prev_foot field has
- IS_MMAPPED_BIT set, otherwise holding the offset of the base of the
- mmapped region to the base of the chunk.
+ use, unless mmapped, in which case both bits are cleared.
+
+ FLAG4_BIT is not used by this malloc, but might be useful in extensions.
*/
#define PINUSE_BIT (SIZE_T_ONE)
#define CINUSE_BIT (SIZE_T_TWO)
+#define FLAG4_BIT (SIZE_T_FOUR)
#define INUSE_BITS (PINUSE_BIT|CINUSE_BIT)
+#define FLAG_BITS (PINUSE_BIT|CINUSE_BIT|FLAG4_BIT)
/* Head value for fenceposts */
#define FENCEPOST_HEAD (INUSE_BITS|SIZE_T_SIZE)
@@ -1669,17 +2256,22 @@ typedef unsigned int flag_t; /* The type of various bit flag sets */
/* extraction of fields from head words */
#define cinuse(p) ((p)->head & CINUSE_BIT)
#define pinuse(p) ((p)->head & PINUSE_BIT)
-#define chunksize(p) ((p)->head & ~(INUSE_BITS))
+#define flag4inuse(p) ((p)->head & FLAG4_BIT)
+#define is_inuse(p) (((p)->head & INUSE_BITS) != PINUSE_BIT)
+#define is_mmapped(p) (((p)->head & INUSE_BITS) == 0)
+
+#define chunksize(p) ((p)->head & ~(FLAG_BITS))
#define clear_pinuse(p) ((p)->head &= ~PINUSE_BIT)
-#define clear_cinuse(p) ((p)->head &= ~CINUSE_BIT)
+#define set_flag4(p) ((p)->head |= FLAG4_BIT)
+#define clear_flag4(p) ((p)->head &= ~FLAG4_BIT)
/* Treat space at ptr +/- offset as a chunk */
#define chunk_plus_offset(p, s) ((mchunkptr)(((char*)(p)) + (s)))
#define chunk_minus_offset(p, s) ((mchunkptr)(((char*)(p)) - (s)))
/* Ptr to next or previous physical malloc_chunk. */
-#define next_chunk(p) ((mchunkptr)( ((char*)(p)) + ((p)->head & ~INUSE_BITS)))
+#define next_chunk(p) ((mchunkptr)( ((char*)(p)) + ((p)->head & ~FLAG_BITS)))
#define prev_chunk(p) ((mchunkptr)( ((char*)(p)) - ((p)->prev_foot) ))
/* extract next chunk's pinuse bit */
@@ -1697,9 +2289,6 @@ typedef unsigned int flag_t; /* The type of various bit flag sets */
#define set_free_with_pinuse(p, s, n)\
(clear_pinuse(n), set_size_and_pinuse_of_free_chunk(p, s))
-#define is_mmapped(p)\
- (!((p)->head & PINUSE_BIT) && ((p)->prev_foot & IS_MMAPPED_BIT))
-
/* Get the internal overhead associated with chunk p */
#define overhead_for(p)\
(is_mmapped(p)? MMAP_CHUNK_OVERHEAD : CHUNK_OVERHEAD)
@@ -1721,20 +2310,20 @@ typedef unsigned int flag_t; /* The type of various bit flag sets */
like this:
chunk-> +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- | Size of previous 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) .
- . .
- . |
+ | 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 |
- +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Larger chunks are kept in a form of bitwise digital trees (aka
tries) keyed on chunksizes. Because malloc_tree_chunks are only for
@@ -1742,27 +2331,27 @@ nextchunk-> +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
constraints on user chunk sizes. Each node looks like:
chunk-> +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- | Size of previous chunk |
- +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ | Size of previous chunk |
+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
`head:' | Size of chunk, in bytes |P|
mem-> +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- | Forward pointer to next chunk of same size |
- +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- | Back pointer to previous chunk of same size |
- +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- | Pointer to left child (child[0]) |
- +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- | Pointer to right child (child[1]) |
- +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- | Pointer to parent |
- +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- | bin index of this chunk |
- +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- | Unused space .
- . |
+ | Forward pointer to next chunk of same size |
+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ | Back pointer to previous chunk of same size |
+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ | Pointer to left child (child[0]) |
+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ | Pointer to right child (child[1]) |
+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ | Pointer to parent |
+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ | bin index of this chunk |
+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ | Unused space .
+ . |
nextchunk-> +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
`foot:' | Size of chunk, in bytes |
- +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Each tree holding treenodes is a tree of unique chunk sizes. Chunks
of the same size are arranged in a circularly-linked list, with only
@@ -1870,7 +2459,7 @@ typedef struct malloc_tree_chunk* tbinptr; /* The type of bins of trees */
and so should not try to deallocate or merge with others.
(This currently holds only for the initial segment passed
into create_mspace_with_base.)
- * If IS_MMAPPED_BIT set, the segment may be merged with
+ * If USE_MMAP_BIT set, the segment may be merged with
other surrounding mmapped segments and trimmed/de-allocated
using munmap.
* If neither bit is set, then the segment was obtained using
@@ -1885,7 +2474,7 @@ struct malloc_segment {
flag_t sflags; /* mmap and extern flag */
};
-#define is_mmapped_segment(S) ((S)->sflags & IS_MMAPPED_BIT)
+#define is_mmapped_segment(S) ((S)->sflags & USE_MMAP_BIT)
#define is_extern_segment(S) ((S)->sflags & EXTERN_BIT)
typedef struct malloc_segment msegment;
@@ -1954,6 +2543,9 @@ typedef struct malloc_segment* msegmentptr;
Magic tag
A cross-check field that should always hold same value as mparams.magic.
+ Max allowed footprint
+ The maximum allowed bytes to allocate from system (zero means no limit)
+
Flags
Bits recording whether to use MMAP, locks, or contiguous MORECORE
@@ -1961,9 +2553,18 @@ typedef struct malloc_segment* msegmentptr;
Each space keeps track of current and maximum system memory
obtained via MORECORE or MMAP.
+ Trim support
+ Fields holding the amount of unused topmost memory that should trigger
+ trimming, and a counter to force periodic scanning to release unused
+ non-topmost segments.
+
Locking
If USE_LOCKS is defined, the "mutex" lock is acquired and released
around every public call using this mspace.
+
+ Extension support
+ A void* pointer and a size_t field that can be used to help implement
+ extensions to this malloc.
*/
/* Bin types, widths and sizes */
@@ -1985,16 +2586,20 @@ struct malloc_state {
mchunkptr dv;
mchunkptr top;
size_t trim_check;
+ size_t release_checks;
size_t magic;
mchunkptr smallbins[(NSMALLBINS+1)*2];
tbinptr treebins[NTREEBINS];
size_t footprint;
size_t max_footprint;
+ size_t footprint_limit; /* zero means no limit */
flag_t mflags;
#if USE_LOCKS
MLOCK_T mutex; /* locate lock among fields that rarely change */
#endif /* USE_LOCKS */
msegment seg;
+ void* extp; /* Unused but available for extensions */
+ size_t exts;
};
typedef struct malloc_state* mstate;
@@ -2004,7 +2609,8 @@ typedef struct malloc_state* mstate;
/*
malloc_params holds global properties, including those that can be
dynamically set using mallopt. There is a single instance, mparams,
- initialized in init_mparams.
+ initialized in init_mparams. Note that the non-zeroness of "magic"
+ also serves as an initialization flag.
*/
struct malloc_params {
@@ -2018,10 +2624,18 @@ struct malloc_params {
static struct malloc_params mparams;
+/* Ensure mparams initialized */
+#define ensure_initialization() (void)(mparams.magic != 0 || init_mparams())
+
+#if !ONLY_MSPACES
+
/* The global malloc_state used for all non-"mspace" calls */
static struct malloc_state _gm_;
#define gm (&_gm_)
#define is_global(M) ((M) == &_gm_)
+
+#endif /* !ONLY_MSPACES */
+
#define is_initialized(M) ((M)->top != 0)
/* -------------------------- system alloc setup ------------------------- */
@@ -2030,11 +2644,19 @@ static struct malloc_state _gm_;
#define use_lock(M) ((M)->mflags & USE_LOCK_BIT)
#define enable_lock(M) ((M)->mflags |= USE_LOCK_BIT)
+#if USE_LOCKS
#define disable_lock(M) ((M)->mflags &= ~USE_LOCK_BIT)
+#else
+#define disable_lock(M)
+#endif
#define use_mmap(M) ((M)->mflags & USE_MMAP_BIT)
#define enable_mmap(M) ((M)->mflags |= USE_MMAP_BIT)
+#if HAVE_MMAP
#define disable_mmap(M) ((M)->mflags &= ~USE_MMAP_BIT)
+#else
+#define disable_mmap(M)
+#endif
#define use_noncontiguous(M) ((M)->mflags & USE_NONCONTIGUOUS_BIT)
#define disable_contiguous(M) ((M)->mflags |= USE_NONCONTIGUOUS_BIT)
@@ -2046,11 +2668,23 @@ static struct malloc_state _gm_;
/* page-align a size */
#define page_align(S)\
- (((S) + (mparams.page_size)) & ~(mparams.page_size - SIZE_T_ONE))
+ (((S) + (mparams.page_size - SIZE_T_ONE)) & ~(mparams.page_size - SIZE_T_ONE))
/* granularity-align a size */
#define granularity_align(S)\
- (((S) + (mparams.granularity)) & ~(mparams.granularity - SIZE_T_ONE))
+ (((S) + (mparams.granularity - SIZE_T_ONE))\
+ & ~(mparams.granularity - SIZE_T_ONE))
+
+
+/* For mmap, use granularity alignment on windows, else page-align */
+#ifdef WIN32
+#define mmap_align(S) granularity_align(S)
+#else
+#define mmap_align(S) page_align(S)
+#endif
+
+/* For sys_alloc, enough padding to ensure can malloc request on success */
+#define SYS_ALLOC_PADDING (TOP_FOOT_SIZE + MALLOC_ALIGNMENT)
#define is_page_aligned(S)\
(((size_t)(S) & (mparams.page_size - SIZE_T_ONE)) == 0)
@@ -2107,11 +2741,7 @@ static int has_segment_link(mstate m, msegmentptr ss) {
*/
#if USE_LOCKS
-
-/* Ensure locks are initialized */
-#define GLOBALLY_INITIALIZE() (mparams.page_size == 0 && init_mparams())
-
-#define PREACTION(M) ((GLOBALLY_INITIALIZE() || use_lock(M))? ACQUIRE_LOCK(&(M)->mutex) : 0)
+#define PREACTION(M) ((use_lock(M))? ACQUIRE_LOCK(&(M)->mutex) : 0)
#define POSTACTION(M) { if (use_lock(M)) RELEASE_LOCK(&(M)->mutex); }
#else /* USE_LOCKS */
@@ -2156,6 +2786,7 @@ static void reset_on_error(mstate m);
#endif /* PROCEED_ON_ERROR */
+
/* -------------------------- Debugging setup ---------------------------- */
#if ! DEBUG
@@ -2192,7 +2823,7 @@ static size_t traverse_and_check(mstate m);
/* ---------------------------- Indexing Bins ---------------------------- */
#define is_small(s) (((s) >> SMALLBIN_SHIFT) < NSMALLBINS)
-#define small_index(s) ((s) >> SMALLBIN_SHIFT)
+#define small_index(s) (bindex_t)((s) >> SMALLBIN_SHIFT)
#define small_index2size(i) ((i) << SMALLBIN_SHIFT)
#define MIN_SMALL_INDEX (small_index(MIN_CHUNK_SIZE))
@@ -2200,8 +2831,36 @@ static size_t traverse_and_check(mstate m);
#define smallbin_at(M, i) ((sbinptr)((char*)&((M)->smallbins[(i)<<1])))
#define treebin_at(M,i) (&((M)->treebins[i]))
-/* assign tree index for size S to variable I */
-#if defined(__GNUC__) && defined(i386)
+/* assign tree index for size S to variable I. Use x86 asm if possible */
+#if defined(__GNUC__) && (defined(__i386__) || defined(__x86_64__))
+#define compute_tree_index(S, I)\
+{\
+ unsigned int X = S >> TREEBIN_SHIFT;\
+ if (X == 0)\
+ I = 0;\
+ else if (X > 0xFFFF)\
+ I = NTREEBINS-1;\
+ else {\
+ unsigned int K = (unsigned) sizeof(X)*__CHAR_BIT__ - 1 - (unsigned) __builtin_clz(X); \
+ I = (bindex_t)((K << 1) + ((S >> (K + (TREEBIN_SHIFT-1)) & 1)));\
+ }\
+}
+
+#elif defined (__INTEL_COMPILER)
+#define compute_tree_index(S, I)\
+{\
+ size_t X = S >> TREEBIN_SHIFT;\
+ if (X == 0)\
+ I = 0;\
+ else if (X > 0xFFFF)\
+ I = NTREEBINS-1;\
+ else {\
+ unsigned int K = _bit_scan_reverse (X); \
+ I = (bindex_t)((K << 1) + ((S >> (K + (TREEBIN_SHIFT-1)) & 1)));\
+ }\
+}
+
+#elif defined(_MSC_VER) && _MSC_VER>=1300
#define compute_tree_index(S, I)\
{\
size_t X = S >> TREEBIN_SHIFT;\
@@ -2211,10 +2870,11 @@ static size_t traverse_and_check(mstate m);
I = NTREEBINS-1;\
else {\
unsigned int K;\
- __asm__("bsrl %1,%0\n\t" : "=r" (K) : "rm" (X));\
+ _BitScanReverse((DWORD *) &K, (DWORD) X);\
I = (bindex_t)((K << 1) + ((S >> (K + (TREEBIN_SHIFT-1)) & 1)));\
}\
}
+
#else /* GNUC */
#define compute_tree_index(S, I)\
{\
@@ -2264,21 +2924,45 @@ static size_t traverse_and_check(mstate m);
#define clear_treemap(M,i) ((M)->treemap &= ~idx2bit(i))
#define treemap_is_marked(M,i) ((M)->treemap & idx2bit(i))
-/* index corresponding to given bit */
+/* isolate the least set bit of a bitmap */
+#define least_bit(x) ((x) & -(x))
+
+/* mask with all bits to left of least bit of x on */
+#define left_bits(x) ((x<<1) | -(x<<1))
+
+/* mask with all bits to left of or equal to least bit of x on */
+#define same_or_left_bits(x) ((x) | -(x))
+
+/* index corresponding to given bit. Use x86 asm if possible */
-#if defined(__GNUC__) && defined(i386)
+#if defined(__GNUC__) && (defined(__i386__) || defined(__x86_64__))
#define compute_bit2idx(X, I)\
{\
unsigned int J;\
- __asm__("bsfl %1,%0\n\t" : "=r" (J) : "rm" (X));\
+ J = __builtin_ctz(X); \
I = (bindex_t)J;\
}
-#else /* GNUC */
-#if USE_BUILTIN_FFS
+#elif defined (__INTEL_COMPILER)
+#define compute_bit2idx(X, I)\
+{\
+ unsigned int J;\
+ J = _bit_scan_forward (X); \
+ I = (bindex_t)J;\
+}
+
+#elif defined(_MSC_VER) && _MSC_VER>=1300
+#define compute_bit2idx(X, I)\
+{\
+ unsigned int J;\
+ _BitScanForward((DWORD *) &J, X);\
+ I = (bindex_t)J;\
+}
+
+#elif USE_BUILTIN_FFS
#define compute_bit2idx(X, I) I = ffs(X)-1
-#else /* USE_BUILTIN_FFS */
+#else
#define compute_bit2idx(X, I)\
{\
unsigned int Y = X - 1;\
@@ -2290,18 +2974,8 @@ static size_t traverse_and_check(mstate m);
N += K = Y >> (1-0) & 1; Y >>= K;\
I = (bindex_t)(N + Y);\
}
-#endif /* USE_BUILTIN_FFS */
#endif /* GNUC */
-/* isolate the least set bit of a bitmap */
-#define least_bit(x) ((x) & -(x))
-
-/* mask with all bits to left of least bit of x on */
-#define left_bits(x) ((x<<1) | -(x<<1))
-
-/* mask with all bits to left of or equal to least bit of x on */
-#define same_or_left_bits(x) ((x) | -(x))
-
/* ----------------------- Runtime Check Support ------------------------- */
@@ -2323,7 +2997,7 @@ static size_t traverse_and_check(mstate m);
http://www.usenix.org/events/lisa03/tech/robertson.html The footer
of an inuse chunk holds the xor of its mstate and a random seed,
that is checked upon calls to free() and realloc(). This is
- (probablistically) unguessable from outside the program, but can be
+ (probabalistically) unguessable from outside the program, but can be
computed by any code successfully malloc'ing any chunk, so does not
itself provide protection against code that has already broken
security through some other means. Unlike Robertson et al, we
@@ -2336,15 +3010,15 @@ static size_t traverse_and_check(mstate m);
#define ok_address(M, a) ((char*)(a) >= (M)->least_addr)
/* Check if address of next chunk n is higher than base chunk p */
#define ok_next(p, n) ((char*)(p) < (char*)(n))
-/* Check if p has its cinuse bit on */
-#define ok_cinuse(p) cinuse(p)
+/* Check if p has inuse status */
+#define ok_inuse(p) is_inuse(p)
/* Check if p has its pinuse bit on */
#define ok_pinuse(p) pinuse(p)
#else /* !INSECURE */
#define ok_address(M, a) (1)
#define ok_next(b, n) (1)
-#define ok_cinuse(p) (1)
+#define ok_inuse(p) (1)
#define ok_pinuse(p) (1)
#endif /* !INSECURE */
@@ -2355,7 +3029,6 @@ static size_t traverse_and_check(mstate m);
#define ok_magic(M) (1)
#endif /* (FOOTERS && !INSECURE) */
-
/* In gcc, use __builtin_expect to minimize impact of checks */
#if !INSECURE
#if defined(__GNUC__) && __GNUC__ >= 3
@@ -2373,6 +3046,8 @@ static size_t traverse_and_check(mstate m);
#define mark_inuse_foot(M,p,s)
+/* Macros for setting head/foot of non-mmapped chunks */
+
/* Set cinuse bit and pinuse bit of next chunk */
#define set_inuse(M,p,s)\
((p)->head = (((p)->head & PINUSE_BIT)|s|CINUSE_BIT),\
@@ -2415,11 +3090,55 @@ static size_t traverse_and_check(mstate m);
/* ---------------------------- setting mparams -------------------------- */
+#if LOCK_AT_FORK
+static void pre_fork(void) { ACQUIRE_LOCK(&(gm)->mutex); }
+static void post_fork_parent(void) { RELEASE_LOCK(&(gm)->mutex); }
+static void post_fork_child(void) { INITIAL_LOCK(&(gm)->mutex); }
+#endif /* LOCK_AT_FORK */
+
/* Initialize mparams */
static int init_mparams(void) {
- if (mparams.page_size == 0) {
- size_t s;
+#ifdef NEED_GLOBAL_LOCK_INIT
+ if (malloc_global_mutex_status <= 0)
+ init_malloc_global_mutex();
+#endif
+ ACQUIRE_MALLOC_GLOBAL_LOCK();
+ if (mparams.magic == 0) {
+ size_t magic;
+ size_t psize;
+ size_t gsize;
+
+#ifndef WIN32
+ psize = malloc_getpagesize;
+ gsize = ((DEFAULT_GRANULARITY != 0)? DEFAULT_GRANULARITY : psize);
+#else /* WIN32 */
+ {
+ SYSTEM_INFO system_info;
+ GetSystemInfo(&system_info);
+ psize = system_info.dwPageSize;
+ gsize = ((DEFAULT_GRANULARITY != 0)?
+ DEFAULT_GRANULARITY : system_info.dwAllocationGranularity);
+ }
+#endif /* WIN32 */
+
+ /* Sanity-check configuration:
+ size_t must be unsigned and as wide as pointer type.
+ ints must be at least 4 bytes.
+ alignment must be at least 8.
+ Alignment, min chunk size, and page size must all be powers of 2.
+ */
+ if ((sizeof(size_t) != sizeof(char*)) ||
+ (MAX_SIZE_T < MIN_CHUNK_SIZE) ||
+ (sizeof(int) < 4) ||
+ (MALLOC_ALIGNMENT < (size_t)8U) ||
+ ((MALLOC_ALIGNMENT & (MALLOC_ALIGNMENT-SIZE_T_ONE)) != 0) ||
+ ((MCHUNK_SIZE & (MCHUNK_SIZE-SIZE_T_ONE)) != 0) ||
+ ((gsize & (gsize-SIZE_T_ONE)) != 0) ||
+ ((psize & (psize-SIZE_T_ONE)) != 0))
+ ABORT;
+ mparams.granularity = gsize;
+ mparams.page_size = psize;
mparams.mmap_threshold = DEFAULT_MMAP_THRESHOLD;
mparams.trim_threshold = DEFAULT_TRIM_THRESHOLD;
#if MORECORE_CONTIGUOUS
@@ -2428,73 +3147,50 @@ static int init_mparams(void) {
mparams.default_mflags = USE_LOCK_BIT|USE_MMAP_BIT|USE_NONCONTIGUOUS_BIT;
#endif /* MORECORE_CONTIGUOUS */
-#if (FOOTERS && !INSECURE)
+#if !ONLY_MSPACES
+ /* Set up lock for main malloc area */
+ gm->mflags = mparams.default_mflags;
+ (void)INITIAL_LOCK(&gm->mutex);
+#endif
+#if LOCK_AT_FORK
+ pthread_atfork(&pre_fork, &post_fork_parent, &post_fork_child);
+#endif
+
{
#if USE_DEV_RANDOM
int fd;
unsigned char buf[sizeof(size_t)];
/* Try to use /dev/urandom, else fall back on using time */
if ((fd = open("/dev/urandom", O_RDONLY)) >= 0 &&
- read(fd, buf, sizeof(buf)) == sizeof(buf)) {
- s = *((size_t *) buf);
- close(fd);
+ read(fd, buf, sizeof(buf)) == sizeof(buf)) {
+ magic = *((size_t *) buf);
+ close(fd);
}
else
#endif /* USE_DEV_RANDOM */
- s = (size_t)(time(0) ^ (size_t)0x55555555U);
-
- s |= (size_t)8U; /* ensure nonzero */
- s &= ~(size_t)7U; /* improve chances of fault for bad values */
-
- }
-#else /* (FOOTERS && !INSECURE) */
- s = (size_t)0x58585858U;
-#endif /* (FOOTERS && !INSECURE) */
- ACQUIRE_MAGIC_INIT_LOCK();
- if (mparams.magic == 0) {
- mparams.magic = s;
- /* Set up lock for main malloc area */
- INITIAL_LOCK(&gm->mutex);
- gm->mflags = mparams.default_mflags;
- }
- RELEASE_MAGIC_INIT_LOCK();
-
-#ifndef WIN32
- mparams.page_size = malloc_getpagesize;
- mparams.granularity = ((DEFAULT_GRANULARITY != 0)?
- DEFAULT_GRANULARITY : mparams.page_size);
-#else /* WIN32 */
- {
- SYSTEM_INFO system_info;
- GetSystemInfo(&system_info);
- mparams.page_size = system_info.dwPageSize;
- mparams.granularity = system_info.dwAllocationGranularity;
+#ifdef WIN32
+ magic = (size_t)(GetTickCount() ^ (size_t)0x55555555U);
+#elif defined(LACKS_TIME_H)
+ magic = (size_t)&magic ^ (size_t)0x55555555U;
+#else
+ magic = (size_t)(time(0) ^ (size_t)0x55555555U);
+#endif
+ magic |= (size_t)8U; /* ensure nonzero */
+ magic &= ~(size_t)7U; /* improve chances of fault for bad values */
+ /* Until memory modes commonly available, use volatile-write */
+ (*(volatile size_t *)(&(mparams.magic))) = magic;
}
-#endif /* WIN32 */
-
- /* Sanity-check configuration:
- size_t must be unsigned and as wide as pointer type.
- ints must be at least 4 bytes.
- alignment must be at least 8.
- Alignment, min chunk size, and page size must all be powers of 2.
- */
- if ((sizeof(size_t) != sizeof(char*)) ||
- (MAX_SIZE_T < MIN_CHUNK_SIZE) ||
- (sizeof(int) < 4) ||
- (MALLOC_ALIGNMENT < (size_t)8U) ||
- ((MALLOC_ALIGNMENT & (MALLOC_ALIGNMENT-SIZE_T_ONE)) != 0) ||
- ((MCHUNK_SIZE & (MCHUNK_SIZE-SIZE_T_ONE)) != 0) ||
- ((mparams.granularity & (mparams.granularity-SIZE_T_ONE)) != 0) ||
- ((mparams.page_size & (mparams.page_size-SIZE_T_ONE)) != 0))
- ABORT;
}
- return 0;
+
+ RELEASE_MALLOC_GLOBAL_LOCK();
+ return 1;
}
/* support for mallopt */
static int change_mparam(int param_number, int value) {
- size_t val = (size_t)value;
- init_mparams();
+ size_t val;
+ ensure_initialization();
+ val = (value == -1)? MAX_SIZE_T : (size_t)value;
switch(param_number) {
case M_TRIM_THRESHOLD:
mparams.trim_threshold = val;
@@ -2526,7 +3222,7 @@ static void do_check_any_chunk(mstate m, mchunkptr p) {
/* Check properties of top chunk */
static void do_check_top_chunk(mstate m, mchunkptr p) {
msegmentptr sp = segment_holding(m, (char*)p);
- size_t sz = chunksize(p);
+ size_t sz = p->head & ~INUSE_BITS; /* third-lowest bit can be set! */
assert(sp != 0);
assert((is_aligned(chunk2mem(p))) || (p->head == FENCEPOST_HEAD));
assert(ok_address(m, p));
@@ -2534,13 +3230,13 @@ static void do_check_top_chunk(mstate m, mchunkptr p) {
assert(sz > 0);
assert(sz == ((sp->base + sp->size) - (char*)p) - TOP_FOOT_SIZE);
assert(pinuse(p));
- assert(!next_pinuse(p));
+ assert(!pinuse(chunk_plus_offset(p, sz)));
}
/* Check properties of (inuse) mmapped chunks */
static void do_check_mmapped_chunk(mstate m, mchunkptr p) {
size_t sz = chunksize(p);
- size_t len = (sz + (p->prev_foot & ~IS_MMAPPED_BIT) + MMAP_FOOT_PAD);
+ size_t len = (sz + (p->prev_foot) + MMAP_FOOT_PAD);
assert(is_mmapped(p));
assert(use_mmap(m));
assert((is_aligned(chunk2mem(p))) || (p->head == FENCEPOST_HEAD));
@@ -2554,7 +3250,7 @@ static void do_check_mmapped_chunk(mstate m, mchunkptr p) {
/* Check properties of inuse chunks */
static void do_check_inuse_chunk(mstate m, mchunkptr p) {
do_check_any_chunk(m, p);
- assert(cinuse(p));
+ assert(is_inuse(p));
assert(next_pinuse(p));
/* If not pinuse and not mmapped, previous chunk has OK offset */
assert(is_mmapped(p) || pinuse(p) || next_chunk(prev_chunk(p)) == p);
@@ -2564,10 +3260,10 @@ static void do_check_inuse_chunk(mstate m, mchunkptr p) {
/* Check properties of free chunks */
static void do_check_free_chunk(mstate m, mchunkptr p) {
- size_t sz = p->head & ~(PINUSE_BIT|CINUSE_BIT);
+ size_t sz = chunksize(p);
mchunkptr next = chunk_plus_offset(p, sz);
do_check_any_chunk(m, p);
- assert(!cinuse(p));
+ assert(!is_inuse(p));
assert(!next_pinuse(p));
assert (!is_mmapped(p));
if (p != m->dv && p != m->top) {
@@ -2576,7 +3272,7 @@ static void do_check_free_chunk(mstate m, mchunkptr p) {
assert(is_aligned(chunk2mem(p)));
assert(next->prev_foot == sz);
assert(pinuse(p));
- assert (next == m->top || cinuse(next));
+ assert (next == m->top || is_inuse(next));
assert(p->fd->bk == p);
assert(p->bk->fd == p);
}
@@ -2589,7 +3285,7 @@ static void do_check_free_chunk(mstate m, mchunkptr p) {
static void do_check_malloced_chunk(mstate m, void* mem, size_t s) {
if (mem != 0) {
mchunkptr p = mem2chunk(mem);
- size_t sz = p->head & ~(PINUSE_BIT|CINUSE_BIT);
+ size_t sz = p->head & ~INUSE_BITS;
do_check_inuse_chunk(m, p);
assert((sz & CHUNK_ALIGN_MASK) == 0);
assert(sz >= MIN_CHUNK_SIZE);
@@ -2616,7 +3312,7 @@ static void do_check_tree(mstate m, tchunkptr t) {
do_check_any_chunk(m, ((mchunkptr)u));
assert(u->index == tindex);
assert(chunksize(u) == tsize);
- assert(!cinuse(u));
+ assert(!is_inuse(u));
assert(!next_pinuse(u));
assert(u->fd->bk == u);
assert(u->bk->fd == u);
@@ -2629,20 +3325,20 @@ static void do_check_tree(mstate m, tchunkptr t) {
head = u;
assert(u->parent != u);
assert (u->parent->child[0] == u ||
- u->parent->child[1] == u ||
- *((tbinptr*)(u->parent)) == u);
+ u->parent->child[1] == u ||
+ *((tbinptr*)(u->parent)) == u);
if (u->child[0] != 0) {
- assert(u->child[0]->parent == u);
- assert(u->child[0] != u);
- do_check_tree(m, u->child[0]);
+ assert(u->child[0]->parent == u);
+ assert(u->child[0] != u);
+ do_check_tree(m, u->child[0]);
}
if (u->child[1] != 0) {
- assert(u->child[1]->parent == u);
- assert(u->child[1] != u);
- do_check_tree(m, u->child[1]);
+ assert(u->child[1]->parent == u);
+ assert(u->child[1] != u);
+ do_check_tree(m, u->child[1]);
}
if (u->child[0] != 0 && u->child[1] != 0) {
- assert(chunksize(u->child[0]) < chunksize(u->child[1]));
+ assert(chunksize(u->child[0]) < chunksize(u->child[1]));
}
}
u = u->fd;
@@ -2680,7 +3376,7 @@ static void do_check_smallbin(mstate m, bindex_t i) {
/* chunk is followed by an inuse chunk */
q = next_chunk(p);
if (q->head != FENCEPOST_HEAD)
- do_check_inuse_chunk(m, q);
+ do_check_inuse_chunk(m, q);
}
}
}
@@ -2694,8 +3390,8 @@ static int bin_find(mstate m, mchunkptr x) {
if (smallmap_is_marked(m, sidx)) {
mchunkptr p = b;
do {
- if (p == x)
- return 1;
+ if (p == x)
+ return 1;
} while ((p = p->fd) != b);
}
}
@@ -2706,15 +3402,15 @@ static int bin_find(mstate m, mchunkptr x) {
tchunkptr t = *treebin_at(m, tidx);
size_t sizebits = size << leftshift_for_tree_index(tidx);
while (t != 0 && chunksize(t) != size) {
- t = t->child[(sizebits >> (SIZE_T_BITSIZE-SIZE_T_ONE)) & 1];
- sizebits <<= 1;
+ t = t->child[(sizebits >> (SIZE_T_BITSIZE-SIZE_T_ONE)) & 1];
+ sizebits <<= 1;
}
if (t != 0) {
- tchunkptr u = t;
- do {
- if (u == (tchunkptr)x)
- return 1;
- } while ((u = u->fd) != t);
+ tchunkptr u = t;
+ do {
+ if (u == (tchunkptr)x)
+ return 1;
+ } while ((u = u->fd) != t);
}
}
}
@@ -2732,19 +3428,19 @@ static size_t traverse_and_check(mstate m) {
mchunkptr lastq = 0;
assert(pinuse(q));
while (segment_holds(s, q) &&
- q != m->top && q->head != FENCEPOST_HEAD) {
- sum += chunksize(q);
- if (cinuse(q)) {
- assert(!bin_find(m, q));
- do_check_inuse_chunk(m, q);
- }
- else {
- assert(q == m->dv || bin_find(m, q));
- assert(lastq == 0 || cinuse(lastq)); /* Not 2 consecutive free */
- do_check_free_chunk(m, q);
- }
- lastq = q;
- q = next_chunk(q);
+ q != m->top && q->head != FENCEPOST_HEAD) {
+ sum += chunksize(q);
+ if (is_inuse(q)) {
+ assert(!bin_find(m, q));
+ do_check_inuse_chunk(m, q);
+ }
+ else {
+ assert(q == m->dv || bin_find(m, q));
+ assert(lastq == 0 || is_inuse(lastq)); /* Not 2 consecutive free */
+ do_check_free_chunk(m, q);
+ }
+ lastq = q;
+ q = next_chunk(q);
}
s = s->next;
}
@@ -2752,6 +3448,7 @@ static size_t traverse_and_check(mstate m) {
return sum;
}
+
/* Check all properties of malloc_state. */
static void do_check_malloc_state(mstate m) {
bindex_t i;
@@ -2771,7 +3468,7 @@ static void do_check_malloc_state(mstate m) {
if (m->top != 0) { /* check top chunk */
do_check_top_chunk(m, m->top);
- assert(m->topsize == chunksize(m->top));
+ /*assert(m->topsize == chunksize(m->top)); redundant */
assert(m->topsize > 0);
assert(bin_find(m, m->top) == 0);
}
@@ -2787,6 +3484,7 @@ static void do_check_malloc_state(mstate m) {
#if !NO_MALLINFO
static struct mallinfo internal_mallinfo(mstate m) {
struct mallinfo nm = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
+ ensure_initialization();
if (!PREACTION(m)) {
check_malloc_state(m);
if (is_initialized(m)) {
@@ -2795,18 +3493,18 @@ static struct mallinfo internal_mallinfo(mstate m) {
size_t sum = mfree;
msegmentptr s = &m->seg;
while (s != 0) {
- mchunkptr q = align_as_chunk(s->base);
- while (segment_holds(s, q) &&
- q != m->top && q->head != FENCEPOST_HEAD) {
- size_t sz = chunksize(q);
- sum += sz;
- if (!cinuse(q)) {
- mfree += sz;
- ++nfree;
- }
- q = next_chunk(q);
- }
- s = s->next;
+ mchunkptr q = align_as_chunk(s->base);
+ while (segment_holds(s, q) &&
+ q != m->top && q->head != FENCEPOST_HEAD) {
+ size_t sz = chunksize(q);
+ sum += sz;
+ if (!is_inuse(q)) {
+ mfree += sz;
+ ++nfree;
+ }
+ q = next_chunk(q);
+ }
+ s = s->next;
}
nm.arena = sum;
@@ -2824,7 +3522,9 @@ static struct mallinfo internal_mallinfo(mstate m) {
}
#endif /* !NO_MALLINFO */
+#if !NO_MALLOC_STATS
static void internal_malloc_stats(mstate m) {
+ ensure_initialization();
if (!PREACTION(m)) {
size_t maxfp = 0;
size_t fp = 0;
@@ -2837,24 +3537,23 @@ static void internal_malloc_stats(mstate m) {
used = fp - (m->topsize + TOP_FOOT_SIZE);
while (s != 0) {
- mchunkptr q = align_as_chunk(s->base);
- while (segment_holds(s, q) &&
- q != m->top && q->head != FENCEPOST_HEAD) {
- if (!cinuse(q))
- used -= chunksize(q);
- q = next_chunk(q);
- }
- s = s->next;
+ mchunkptr q = align_as_chunk(s->base);
+ while (segment_holds(s, q) &&
+ q != m->top && q->head != FENCEPOST_HEAD) {
+ if (!is_inuse(q))
+ used -= chunksize(q);
+ q = next_chunk(q);
+ }
+ s = s->next;
}
}
-
+ POSTACTION(m); /* drop lock */
fprintf(stderr, "max system bytes = %10lu\n", (unsigned long)(maxfp));
fprintf(stderr, "system bytes = %10lu\n", (unsigned long)(fp));
fprintf(stderr, "in use bytes = %10lu\n", (unsigned long)(used));
-
- POSTACTION(m);
}
}
+#endif /* NO_MALLOC_STATS */
/* ----------------------- Operations on smallbins ----------------------- */
@@ -2892,12 +3591,18 @@ static void internal_malloc_stats(mstate m) {
assert(P != B);\
assert(P != F);\
assert(chunksize(P) == small_index2size(I));\
- if (F == B)\
- clear_smallmap(M, I);\
- else if (RTCHECK((F == smallbin_at(M,I) || ok_address(M, F)) &&\
- (B == smallbin_at(M,I) || ok_address(M, B)))) {\
- F->bk = B;\
- B->fd = F;\
+ if (RTCHECK(F == smallbin_at(M,I) || (ok_address(M, F) && F->bk == P))) { \
+ if (B == F) {\
+ clear_smallmap(M, I);\
+ }\
+ else if (RTCHECK(B == smallbin_at(M,I) ||\
+ (ok_address(M, B) && B->fd == P))) {\
+ F->bk = B;\
+ B->fd = F;\
+ }\
+ else {\
+ CORRUPTION_ERROR_ACTION(M);\
+ }\
}\
else {\
CORRUPTION_ERROR_ACTION(M);\
@@ -2910,11 +3615,12 @@ static void internal_malloc_stats(mstate m) {
assert(P != B);\
assert(P != F);\
assert(chunksize(P) == small_index2size(I));\
- if (B == F)\
+ if (B == F) {\
clear_smallmap(M, I);\
- else if (RTCHECK(ok_address(M, F))) {\
- B->fd = F;\
+ }\
+ else if (RTCHECK(ok_address(M, F) && F->bk == P)) {\
F->bk = B;\
+ B->fd = F;\
}\
else {\
CORRUPTION_ERROR_ACTION(M);\
@@ -2925,9 +3631,9 @@ static void internal_malloc_stats(mstate m) {
/* Used only when dvsize known to be small */
#define replace_dv(M, P, S) {\
size_t DVS = M->dvsize;\
+ assert(is_small(DVS));\
if (DVS != 0) {\
mchunkptr DV = M->dv;\
- assert(is_small(DVS));\
insert_small_chunk(M, DV, DVS);\
}\
M->dvsize = S;\
@@ -2955,34 +3661,34 @@ static void internal_malloc_stats(mstate m) {
size_t K = S << leftshift_for_tree_index(I);\
for (;;) {\
if (chunksize(T) != S) {\
- tchunkptr* C = &(T->child[(K >> (SIZE_T_BITSIZE-SIZE_T_ONE)) & 1]);\
- K <<= 1;\
- if (*C != 0)\
- T = *C;\
- else if (RTCHECK(ok_address(M, C))) {\
- *C = X;\
- X->parent = T;\
- X->fd = X->bk = X;\
- break;\
- }\
- else {\
- CORRUPTION_ERROR_ACTION(M);\
- break;\
- }\
+ tchunkptr* C = &(T->child[(K >> (SIZE_T_BITSIZE-SIZE_T_ONE)) & 1]);\
+ K <<= 1;\
+ if (*C != 0)\
+ T = *C;\
+ else if (RTCHECK(ok_address(M, C))) {\
+ *C = X;\
+ X->parent = T;\
+ X->fd = X->bk = X;\
+ break;\
+ }\
+ else {\
+ CORRUPTION_ERROR_ACTION(M);\
+ break;\
+ }\
}\
else {\
- tchunkptr F = T->fd;\
- if (RTCHECK(ok_address(M, T) && ok_address(M, F))) {\
- T->fd = F->bk = X;\
- X->fd = F;\
- X->bk = T;\
- X->parent = 0;\
- break;\
- }\
- else {\
- CORRUPTION_ERROR_ACTION(M);\
- break;\
- }\
+ tchunkptr F = T->fd;\
+ if (RTCHECK(ok_address(M, T) && ok_address(M, F))) {\
+ T->fd = F->bk = X;\
+ X->fd = F;\
+ X->bk = T;\
+ X->parent = 0;\
+ break;\
+ }\
+ else {\
+ CORRUPTION_ERROR_ACTION(M);\
+ break;\
+ }\
}\
}\
}\
@@ -3011,7 +3717,7 @@ static void internal_malloc_stats(mstate m) {
if (X->bk != X) {\
tchunkptr F = X->fd;\
R = X->bk;\
- if (RTCHECK(ok_address(M, F))) {\
+ if (RTCHECK(ok_address(M, F) && F->bk == X && R->fd == X)) {\
F->bk = R;\
R->fd = F;\
}\
@@ -3022,16 +3728,16 @@ static void internal_malloc_stats(mstate m) {
else {\
tchunkptr* RP;\
if (((R = *(RP = &(X->child[1]))) != 0) ||\
- ((R = *(RP = &(X->child[0]))) != 0)) {\
+ ((R = *(RP = &(X->child[0]))) != 0)) {\
tchunkptr* CP;\
while ((*(CP = &(R->child[1])) != 0) ||\
- (*(CP = &(R->child[0])) != 0)) {\
- R = *(RP = CP);\
+ (*(CP = &(R->child[0])) != 0)) {\
+ R = *(RP = CP);\
}\
if (RTCHECK(ok_address(M, RP)))\
- *RP = 0;\
+ *RP = 0;\
else {\
- CORRUPTION_ERROR_ACTION(M);\
+ CORRUPTION_ERROR_ACTION(M);\
}\
}\
}\
@@ -3039,39 +3745,39 @@ static void internal_malloc_stats(mstate m) {
tbinptr* H = treebin_at(M, X->index);\
if (X == *H) {\
if ((*H = R) == 0) \
- clear_treemap(M, X->index);\
+ clear_treemap(M, X->index);\
}\
else if (RTCHECK(ok_address(M, XP))) {\
if (XP->child[0] == X) \
- XP->child[0] = R;\
+ XP->child[0] = R;\
else \
- XP->child[1] = R;\
+ XP->child[1] = R;\
}\
else\
CORRUPTION_ERROR_ACTION(M);\
if (R != 0) {\
if (RTCHECK(ok_address(M, R))) {\
- tchunkptr C0, C1;\
- R->parent = XP;\
- if ((C0 = X->child[0]) != 0) {\
- if (RTCHECK(ok_address(M, C0))) {\
- R->child[0] = C0;\
- C0->parent = R;\
- }\
- else\
- CORRUPTION_ERROR_ACTION(M);\
- }\
- if ((C1 = X->child[1]) != 0) {\
- if (RTCHECK(ok_address(M, C1))) {\
- R->child[1] = C1;\
- C1->parent = R;\
- }\
- else\
- CORRUPTION_ERROR_ACTION(M);\
- }\
+ tchunkptr C0, C1;\
+ R->parent = XP;\
+ if ((C0 = X->child[0]) != 0) {\
+ if (RTCHECK(ok_address(M, C0))) {\
+ R->child[0] = C0;\
+ C0->parent = R;\
+ }\
+ else\
+ CORRUPTION_ERROR_ACTION(M);\
+ }\
+ if ((C1 = X->child[1]) != 0) {\
+ if (RTCHECK(ok_address(M, C1))) {\
+ R->child[1] = C1;\
+ C1->parent = R;\
+ }\
+ else\
+ CORRUPTION_ERROR_ACTION(M);\
+ }\
}\
else\
- CORRUPTION_ERROR_ACTION(M);\
+ CORRUPTION_ERROR_ACTION(M);\
}\
}\
}
@@ -3095,7 +3801,7 @@ static void internal_malloc_stats(mstate m) {
#else /* ONLY_MSPACES */
#if MSPACES
#define internal_malloc(m, b)\
- (m == gm)? dlmalloc(b) : mspace_malloc(m, b)
+ ((m == gm)? dlmalloc(b) : mspace_malloc(m, b))
#define internal_free(m, mem)\
if (m == gm) dlfree(mem); else mspace_free(m,mem);
#else /* MSPACES */
@@ -3111,30 +3817,33 @@ static void internal_malloc_stats(mstate m) {
the mmapped region stored in the prev_foot field of the chunk. This
allows reconstruction of the required argument to MUNMAP when freed,
and also allows adjustment of the returned chunk to meet alignment
- requirements (especially in memalign). There is also enough space
- allocated to hold a fake next chunk of size SIZE_T_SIZE to maintain
- the PINUSE bit so frees can be checked.
+ requirements (especially in memalign).
*/
/* Malloc using mmap */
static void* mmap_alloc(mstate m, size_t nb) {
- size_t mmsize = granularity_align(nb + SIX_SIZE_T_SIZES + CHUNK_ALIGN_MASK);
+ size_t mmsize = mmap_align(nb + SIX_SIZE_T_SIZES + CHUNK_ALIGN_MASK);
+ if (m->footprint_limit != 0) {
+ size_t fp = m->footprint + mmsize;
+ if (fp <= m->footprint || fp > m->footprint_limit)
+ return 0;
+ }
if (mmsize > nb) { /* Check for wrap around 0 */
- char* mm = (char*)(DIRECT_MMAP(mmsize));
+ char* mm = (char*)(CALL_DIRECT_MMAP(mmsize));
if (mm != CMFAIL) {
size_t offset = align_offset(chunk2mem(mm));
size_t psize = mmsize - offset - MMAP_FOOT_PAD;
mchunkptr p = (mchunkptr)(mm + offset);
- p->prev_foot = offset | IS_MMAPPED_BIT;
- (p)->head = (psize|CINUSE_BIT);
+ p->prev_foot = offset;
+ p->head = psize;
mark_inuse_foot(m, p, psize);
chunk_plus_offset(p, psize)->head = FENCEPOST_HEAD;
chunk_plus_offset(p, psize+SIZE_T_SIZE)->head = 0;
- if (mm < m->least_addr)
- m->least_addr = mm;
+ if (m->least_addr == 0 || mm < m->least_addr)
+ m->least_addr = mm;
if ((m->footprint += mmsize) > m->max_footprint)
- m->max_footprint = m->footprint;
+ m->max_footprint = m->footprint;
assert(is_aligned(chunk2mem(p)));
check_mmapped_chunk(m, p);
return chunk2mem(p);
@@ -3144,8 +3853,9 @@ static void* mmap_alloc(mstate m, size_t nb) {
}
/* Realloc using mmap */
-static mchunkptr mmap_resize(mstate m, mchunkptr oldp, size_t nb) {
+static mchunkptr mmap_resize(mstate m, mchunkptr oldp, size_t nb, int flags) {
size_t oldsize = chunksize(oldp);
+ (void)flags; /* placate people compiling -Wunused */
if (is_small(nb)) /* Can't shrink mmap regions below small size */
return 0;
/* Keep old chunk if big enough but not too big */
@@ -3153,24 +3863,23 @@ static mchunkptr mmap_resize(mstate m, mchunkptr oldp, size_t nb) {
(oldsize - nb) <= (mparams.granularity << 1))
return oldp;
else {
- size_t offset = oldp->prev_foot & ~IS_MMAPPED_BIT;
+ size_t offset = oldp->prev_foot;
size_t oldmmsize = oldsize + offset + MMAP_FOOT_PAD;
- size_t newmmsize = granularity_align(nb + SIX_SIZE_T_SIZES +
- CHUNK_ALIGN_MASK);
+ size_t newmmsize = mmap_align(nb + SIX_SIZE_T_SIZES + CHUNK_ALIGN_MASK);
char* cp = (char*)CALL_MREMAP((char*)oldp - offset,
- oldmmsize, newmmsize, 1);
+ oldmmsize, newmmsize, flags);
if (cp != CMFAIL) {
mchunkptr newp = (mchunkptr)(cp + offset);
size_t psize = newmmsize - offset - MMAP_FOOT_PAD;
- newp->head = (psize|CINUSE_BIT);
+ newp->head = psize;
mark_inuse_foot(m, newp, psize);
chunk_plus_offset(newp, psize)->head = FENCEPOST_HEAD;
chunk_plus_offset(newp, psize+SIZE_T_SIZE)->head = 0;
if (cp < m->least_addr)
- m->least_addr = cp;
+ m->least_addr = cp;
if ((m->footprint += newmmsize - oldmmsize) > m->max_footprint)
- m->max_footprint = m->footprint;
+ m->max_footprint = m->footprint;
check_mmapped_chunk(m, newp);
return newp;
}
@@ -3178,6 +3887,7 @@ static mchunkptr mmap_resize(mstate m, mchunkptr oldp, size_t nb) {
return 0;
}
+
/* -------------------------- mspace management -------------------------- */
/* Initialize top chunk and its size */
@@ -3212,7 +3922,7 @@ static void reset_on_error(mstate m) {
int i;
++malloc_corruption_error_count;
/* Reinitialize fields to forget about all memory */
- m->smallbins = m->treebins = 0;
+ m->smallmap = m->treemap = 0;
m->dvsize = m->topsize = 0;
m->seg.base = 0;
m->seg.size = 0;
@@ -3226,7 +3936,7 @@ static void reset_on_error(mstate m) {
/* Allocate chunk and prepend remainder with chunk in successor base. */
static void* prepend_alloc(mstate m, char* newbase, char* oldbase,
- size_t nb) {
+ size_t nb) {
mchunkptr p = align_as_chunk(newbase);
mchunkptr oldfirst = align_as_chunk(oldbase);
size_t psize = (char*)oldfirst - (char*)p;
@@ -3251,7 +3961,7 @@ static void* prepend_alloc(mstate m, char* newbase, char* oldbase,
set_size_and_pinuse_of_free_chunk(q, dsize);
}
else {
- if (!cinuse(oldfirst)) {
+ if (!is_inuse(oldfirst)) {
size_t nsize = chunksize(oldfirst);
unlink_chunk(m, oldfirst, nsize);
oldfirst = chunk_plus_offset(oldfirst, nsize);
@@ -3266,7 +3976,6 @@ static void* prepend_alloc(mstate m, char* newbase, char* oldbase,
return chunk2mem(p);
}
-
/* Add a segment to hold a new noncontiguous region */
static void add_segment(mstate m, char* tbase, size_t tsize, flag_t mmapped) {
/* Determine locations and sizes of segment, fenceposts, old top */
@@ -3327,16 +4036,26 @@ static void* sys_alloc(mstate m, size_t nb) {
char* tbase = CMFAIL;
size_t tsize = 0;
flag_t mmap_flag = 0;
+ size_t asize; /* allocation size */
- init_mparams();
+ ensure_initialization();
- /* Directly map large chunks */
- if (use_mmap(m) && nb >= mparams.mmap_threshold) {
+ /* Directly map large chunks, but only if already initialized */
+ if (use_mmap(m) && nb >= mparams.mmap_threshold && m->topsize != 0) {
void* mem = mmap_alloc(m, nb);
if (mem != 0)
return mem;
}
+ asize = granularity_align(nb + SYS_ALLOC_PADDING);
+ if (asize <= nb)
+ return 0; /* wraparound */
+ if (m->footprint_limit != 0) {
+ size_t fp = m->footprint + asize;
+ if (fp <= m->footprint || fp > m->footprint_limit)
+ return 0;
+ }
+
/*
Try getting memory in any of three ways (in most-preferred to
least-preferred order):
@@ -3352,95 +4071,97 @@ static void* sys_alloc(mstate m, size_t nb) {
find space.
3. A call to MORECORE that cannot usually contiguously extend memory.
(disabled if not HAVE_MORECORE)
+
+ In all cases, we need to request enough bytes from system to ensure
+ we can malloc nb bytes upon success, so pad with enough space for
+ top_foot, plus alignment-pad to make sure we don't lose bytes if
+ not on boundary, and round this up to a granularity unit.
*/
if (MORECORE_CONTIGUOUS && !use_noncontiguous(m)) {
char* br = CMFAIL;
+ size_t ssize = asize; /* sbrk call size */
msegmentptr ss = (m->top == 0)? 0 : segment_holding(m, (char*)m->top);
- size_t asize = 0;
- ACQUIRE_MORECORE_LOCK();
+ ACQUIRE_MALLOC_GLOBAL_LOCK();
if (ss == 0) { /* First time through or recovery */
char* base = (char*)CALL_MORECORE(0);
if (base != CMFAIL) {
- asize = granularity_align(nb + TOP_FOOT_SIZE + SIZE_T_ONE);
- /* Adjust to end on a page boundary */
- if (!is_page_aligned(base))
- asize += (page_align((size_t)base) - (size_t)base);
- /* Can't call MORECORE if size is negative when treated as signed */
- if (asize < HALF_MAX_SIZE_T &&
- (br = (char*)(CALL_MORECORE(asize))) == base) {
- tbase = base;
- tsize = asize;
- }
+ size_t fp;
+ /* Adjust to end on a page boundary */
+ if (!is_page_aligned(base))
+ ssize += (page_align((size_t)base) - (size_t)base);
+ fp = m->footprint + ssize; /* recheck limits */
+ if (ssize > nb && ssize < HALF_MAX_SIZE_T &&
+ (m->footprint_limit == 0 ||
+ (fp > m->footprint && fp <= m->footprint_limit)) &&
+ (br = (char*)(CALL_MORECORE(ssize))) == base) {
+ tbase = base;
+ tsize = ssize;
+ }
}
}
else {
/* Subtract out existing available top space from MORECORE request. */
- asize = granularity_align(nb - m->topsize + TOP_FOOT_SIZE + SIZE_T_ONE);
+ ssize = granularity_align(nb - m->topsize + SYS_ALLOC_PADDING);
/* Use mem here only if it did continuously extend old space */
- if (asize < HALF_MAX_SIZE_T &&
- (br = (char*)(CALL_MORECORE(asize))) == ss->base+ss->size) {
- tbase = br;
- tsize = asize;
+ if (ssize < HALF_MAX_SIZE_T &&
+ (br = (char*)(CALL_MORECORE(ssize))) == ss->base+ss->size) {
+ tbase = br;
+ tsize = ssize;
}
}
if (tbase == CMFAIL) { /* Cope with partial failure */
if (br != CMFAIL) { /* Try to use/extend the space we did get */
- if (asize < HALF_MAX_SIZE_T &&
- asize < nb + TOP_FOOT_SIZE + SIZE_T_ONE) {
- size_t esize = granularity_align(nb + TOP_FOOT_SIZE + SIZE_T_ONE - asize);
- if (esize < HALF_MAX_SIZE_T) {
- char* end = (char*)CALL_MORECORE(esize);
- if (end != CMFAIL)
- asize += esize;
- else { /* Can't use; try to release */
- CALL_MORECORE(-asize);
- br = CMFAIL;
- }
- }
- }
+ if (ssize < HALF_MAX_SIZE_T &&
+ ssize < nb + SYS_ALLOC_PADDING) {
+ size_t esize = granularity_align(nb + SYS_ALLOC_PADDING - ssize);
+ if (esize < HALF_MAX_SIZE_T) {
+ char* end = (char*)CALL_MORECORE(esize);
+ if (end != CMFAIL)
+ ssize += esize;
+ else { /* Can't use; try to release */
+ (void) CALL_MORECORE(-ssize);
+ br = CMFAIL;
+ }
+ }
+ }
}
if (br != CMFAIL) { /* Use the space we did get */
- tbase = br;
- tsize = asize;
+ tbase = br;
+ tsize = ssize;
}
else
- disable_contiguous(m); /* Don't try contiguous path in the future */
+ disable_contiguous(m); /* Don't try contiguous path in the future */
}
- RELEASE_MORECORE_LOCK();
+ RELEASE_MALLOC_GLOBAL_LOCK();
}
if (HAVE_MMAP && tbase == CMFAIL) { /* Try MMAP */
- size_t req = nb + TOP_FOOT_SIZE + SIZE_T_ONE;
- size_t rsize = granularity_align(req);
- if (rsize > nb) { /* Fail if wraps around zero */
- char* mp = (char*)(CALL_MMAP(rsize));
- if (mp != CMFAIL) {
- tbase = mp;
- tsize = rsize;
- mmap_flag = IS_MMAPPED_BIT;
- }
+ char* mp = (char*)(CALL_MMAP(asize));
+ if (mp != CMFAIL) {
+ tbase = mp;
+ tsize = asize;
+ mmap_flag = USE_MMAP_BIT;
}
}
if (HAVE_MORECORE && tbase == CMFAIL) { /* Try noncontiguous MORECORE */
- size_t asize = granularity_align(nb + TOP_FOOT_SIZE + SIZE_T_ONE);
if (asize < HALF_MAX_SIZE_T) {
char* br = CMFAIL;
char* end = CMFAIL;
- ACQUIRE_MORECORE_LOCK();
+ ACQUIRE_MALLOC_GLOBAL_LOCK();
br = (char*)(CALL_MORECORE(asize));
end = (char*)(CALL_MORECORE(0));
- RELEASE_MORECORE_LOCK();
+ RELEASE_MALLOC_GLOBAL_LOCK();
if (br != CMFAIL && end != CMFAIL && br < end) {
- size_t ssize = end - br;
- if (ssize > nb + TOP_FOOT_SIZE) {
- tbase = br;
- tsize = ssize;
- }
+ size_t ssize = end - br;
+ if (ssize > nb + TOP_FOOT_SIZE) {
+ tbase = br;
+ tsize = ssize;
+ }
}
}
}
@@ -3451,48 +4172,55 @@ static void* sys_alloc(mstate m, size_t nb) {
m->max_footprint = m->footprint;
if (!is_initialized(m)) { /* first-time initialization */
- m->seg.base = m->least_addr = tbase;
+ if (m->least_addr == 0 || tbase < m->least_addr)
+ m->least_addr = tbase;
+ m->seg.base = tbase;
m->seg.size = tsize;
m->seg.sflags = mmap_flag;
m->magic = mparams.magic;
+ m->release_checks = MAX_RELEASE_CHECK_RATE;
init_bins(m);
+#if !ONLY_MSPACES
if (is_global(m))
- init_top(m, (mchunkptr)tbase, tsize - TOP_FOOT_SIZE);
- else {
- /* Offset top by embedded malloc_state */
- mchunkptr mn = next_chunk(mem2chunk(m));
- init_top(m, mn, (size_t)((tbase + tsize) - (char*)mn) -TOP_FOOT_SIZE);
+ init_top(m, (mchunkptr)tbase, tsize - TOP_FOOT_SIZE);
+ else
+#endif
+ {
+ /* Offset top by embedded malloc_state */
+ mchunkptr mn = next_chunk(mem2chunk(m));
+ init_top(m, mn, (size_t)((tbase + tsize) - (char*)mn) -TOP_FOOT_SIZE);
}
}
else {
/* Try to merge with an existing segment */
msegmentptr sp = &m->seg;
+ /* Only consider most recent segment if traversal suppressed */
while (sp != 0 && tbase != sp->base + sp->size)
- sp = sp->next;
+ sp = (NO_SEGMENT_TRAVERSAL) ? 0 : sp->next;
if (sp != 0 &&
- !is_extern_segment(sp) &&
- (sp->sflags & IS_MMAPPED_BIT) == mmap_flag &&
- segment_holds(sp, m->top)) { /* append */
- sp->size += tsize;
- init_top(m, m->top, m->topsize + tsize);
+ !is_extern_segment(sp) &&
+ (sp->sflags & USE_MMAP_BIT) == mmap_flag &&
+ segment_holds(sp, m->top)) { /* append */
+ sp->size += tsize;
+ init_top(m, m->top, m->topsize + tsize);
}
else {
- if (tbase < m->least_addr)
- m->least_addr = tbase;
- sp = &m->seg;
- while (sp != 0 && sp->base != tbase + tsize)
- sp = sp->next;
- if (sp != 0 &&
- !is_extern_segment(sp) &&
- (sp->sflags & IS_MMAPPED_BIT) == mmap_flag) {
- char* oldbase = sp->base;
- sp->base = tbase;
- sp->size += tsize;
- return prepend_alloc(m, tbase, oldbase, nb);
- }
- else
- add_segment(m, tbase, tsize, mmap_flag);
+ if (tbase < m->least_addr)
+ m->least_addr = tbase;
+ sp = &m->seg;
+ while (sp != 0 && sp->base != tbase + tsize)
+ sp = (NO_SEGMENT_TRAVERSAL) ? 0 : sp->next;
+ if (sp != 0 &&
+ !is_extern_segment(sp) &&
+ (sp->sflags & USE_MMAP_BIT) == mmap_flag) {
+ char* oldbase = sp->base;
+ sp->base = tbase;
+ sp->size += tsize;
+ return prepend_alloc(m, tbase, oldbase, nb);
+ }
+ else
+ add_segment(m, tbase, tsize, mmap_flag);
}
}
@@ -3517,46 +4245,54 @@ static void* sys_alloc(mstate m, size_t nb) {
/* Unmap and unlink any mmapped segments that don't contain used chunks */
static size_t release_unused_segments(mstate m) {
size_t released = 0;
+ int nsegs = 0;
msegmentptr pred = &m->seg;
msegmentptr sp = pred->next;
while (sp != 0) {
char* base = sp->base;
size_t size = sp->size;
msegmentptr next = sp->next;
+ ++nsegs;
if (is_mmapped_segment(sp) && !is_extern_segment(sp)) {
mchunkptr p = align_as_chunk(base);
size_t psize = chunksize(p);
/* Can unmap if first chunk holds entire segment and not pinned */
- if (!cinuse(p) && (char*)p + psize >= base + size - TOP_FOOT_SIZE) {
- tchunkptr tp = (tchunkptr)p;
- assert(segment_holds(sp, (char*)sp));
- if (p == m->dv) {
- m->dv = 0;
- m->dvsize = 0;
- }
- else {
- unlink_large_chunk(m, tp);
- }
- if (CALL_MUNMAP(base, size) == 0) {
- released += size;
- m->footprint -= size;
- /* unlink obsoleted record */
- sp = pred;
- sp->next = next;
- }
- else { /* back out if cannot unmap */
- insert_large_chunk(m, tp, psize);
- }
+ if (!is_inuse(p) && (char*)p + psize >= base + size - TOP_FOOT_SIZE) {
+ tchunkptr tp = (tchunkptr)p;
+ assert(segment_holds(sp, (char*)sp));
+ if (p == m->dv) {
+ m->dv = 0;
+ m->dvsize = 0;
+ }
+ else {
+ unlink_large_chunk(m, tp);
+ }
+ if (CALL_MUNMAP(base, size) == 0) {
+ released += size;
+ m->footprint -= size;
+ /* unlink obsoleted record */
+ sp = pred;
+ sp->next = next;
+ }
+ else { /* back out if cannot unmap */
+ insert_large_chunk(m, tp, psize);
+ }
}
}
+ if (NO_SEGMENT_TRAVERSAL) /* scan only first segment */
+ break;
pred = sp;
sp = next;
}
+ /* Reset check counter */
+ m->release_checks = (((size_t) nsegs > (size_t) MAX_RELEASE_CHECK_RATE)?
+ (size_t) nsegs : (size_t) MAX_RELEASE_CHECK_RATE);
return released;
}
static int sys_trim(mstate m, size_t pad) {
size_t released = 0;
+ ensure_initialization();
if (pad < MAX_REQUEST && is_initialized(m)) {
pad += TOP_FOOT_SIZE; /* ensure enough room for segment overhead */
@@ -3564,45 +4300,46 @@ static int sys_trim(mstate m, size_t pad) {
/* Shrink top space in granularity-size units, keeping at least one */
size_t unit = mparams.granularity;
size_t extra = ((m->topsize - pad + (unit - SIZE_T_ONE)) / unit -
- SIZE_T_ONE) * unit;
+ SIZE_T_ONE) * unit;
msegmentptr sp = segment_holding(m, (char*)m->top);
if (!is_extern_segment(sp)) {
- if (is_mmapped_segment(sp)) {
- if (HAVE_MMAP &&
- sp->size >= extra &&
- !has_segment_link(m, sp)) { /* can't shrink if pinned */
- size_t newsize = sp->size - extra;
- /* Prefer mremap, fall back to munmap */
- if ((CALL_MREMAP(sp->base, sp->size, newsize, 0) != MFAIL) ||
- (CALL_MUNMAP(sp->base + newsize, extra) == 0)) {
- released = extra;
- }
- }
- }
- else if (HAVE_MORECORE) {
- if (extra >= HALF_MAX_SIZE_T) /* Avoid wrapping negative */
- extra = (HALF_MAX_SIZE_T) + SIZE_T_ONE - unit;
- ACQUIRE_MORECORE_LOCK();
- {
- /* Make sure end of memory is where we last set it. */
- char* old_br = (char*)(CALL_MORECORE(0));
- if (old_br == sp->base + sp->size) {
- char* rel_br = (char*)(CALL_MORECORE(-extra));
- char* new_br = (char*)(CALL_MORECORE(0));
- if (rel_br != CMFAIL && new_br < old_br)
- released = old_br - new_br;
- }
- }
- RELEASE_MORECORE_LOCK();
- }
+ if (is_mmapped_segment(sp)) {
+ if (HAVE_MMAP &&
+ sp->size >= extra &&
+ !has_segment_link(m, sp)) { /* can't shrink if pinned */
+ size_t newsize = sp->size - extra;
+ (void)newsize; /* placate people compiling -Wunused-variable */
+ /* Prefer mremap, fall back to munmap */
+ if ((CALL_MREMAP(sp->base, sp->size, newsize, 0) != MFAIL) ||
+ (CALL_MUNMAP(sp->base + newsize, extra) == 0)) {
+ released = extra;
+ }
+ }
+ }
+ else if (HAVE_MORECORE) {
+ if (extra >= HALF_MAX_SIZE_T) /* Avoid wrapping negative */
+ extra = (HALF_MAX_SIZE_T) + SIZE_T_ONE - unit;
+ ACQUIRE_MALLOC_GLOBAL_LOCK();
+ {
+ /* Make sure end of memory is where we last set it. */
+ char* old_br = (char*)(CALL_MORECORE(0));
+ if (old_br == sp->base + sp->size) {
+ char* rel_br = (char*)(CALL_MORECORE(-extra));
+ char* new_br = (char*)(CALL_MORECORE(0));
+ if (rel_br != CMFAIL && new_br < old_br)
+ released = old_br - new_br;
+ }
+ }
+ RELEASE_MALLOC_GLOBAL_LOCK();
+ }
}
if (released != 0) {
- sp->size -= released;
- m->footprint -= released;
- init_top(m, m->top, m->topsize - released);
- check_top_chunk(m, m->top);
+ sp->size -= released;
+ m->footprint -= released;
+ init_top(m, m->top, m->topsize - released);
+ check_top_chunk(m, m->top);
}
}
@@ -3611,14 +4348,85 @@ static int sys_trim(mstate m, size_t pad) {
released += release_unused_segments(m);
/* On failure, disable autotrim to avoid repeated failed future calls */
- if (released == 0)
+ if (released == 0 && m->topsize > m->trim_check)
m->trim_check = MAX_SIZE_T;
}
return (released != 0)? 1 : 0;
}
-/* ---------------------------- malloc support --------------------------- */
+/* Consolidate and bin a chunk. Differs from exported versions
+ of free mainly in that the chunk need not be marked as inuse.
+*/
+static void dispose_chunk(mstate m, mchunkptr p, size_t psize) {
+ mchunkptr next = chunk_plus_offset(p, psize);
+ if (!pinuse(p)) {
+ mchunkptr prev;
+ size_t prevsize = p->prev_foot;
+ if (is_mmapped(p)) {
+ psize += prevsize + MMAP_FOOT_PAD;
+ if (CALL_MUNMAP((char*)p - prevsize, psize) == 0)
+ m->footprint -= psize;
+ return;
+ }
+ prev = chunk_minus_offset(p, prevsize);
+ psize += prevsize;
+ p = prev;
+ if (RTCHECK(ok_address(m, prev))) { /* consolidate backward */
+ if (p != m->dv) {
+ unlink_chunk(m, p, prevsize);
+ }
+ else if ((next->head & INUSE_BITS) == INUSE_BITS) {
+ m->dvsize = psize;
+ set_free_with_pinuse(p, psize, next);
+ return;
+ }
+ }
+ else {
+ CORRUPTION_ERROR_ACTION(m);
+ return;
+ }
+ }
+ if (RTCHECK(ok_address(m, next))) {
+ if (!cinuse(next)) { /* consolidate forward */
+ if (next == m->top) {
+ size_t tsize = m->topsize += psize;
+ m->top = p;
+ p->head = tsize | PINUSE_BIT;
+ if (p == m->dv) {
+ m->dv = 0;
+ m->dvsize = 0;
+ }
+ return;
+ }
+ else if (next == m->dv) {
+ size_t dsize = m->dvsize += psize;
+ m->dv = p;
+ set_size_and_pinuse_of_free_chunk(p, dsize);
+ return;
+ }
+ else {
+ size_t nsize = chunksize(next);
+ psize += nsize;
+ unlink_chunk(m, next, nsize);
+ set_size_and_pinuse_of_free_chunk(p, psize);
+ if (p == m->dv) {
+ m->dvsize = psize;
+ return;
+ }
+ }
+ }
+ else {
+ set_free_with_pinuse(p, psize, next);
+ }
+ insert_chunk(m, p, psize);
+ }
+ else {
+ CORRUPTION_ERROR_ACTION(m);
+ }
+}
+
+/* ---------------------------- malloc --------------------------- */
/* allocate a large request from the best fitting chunk in a treebin */
static void* tmalloc_large(mstate m, size_t nb) {
@@ -3627,7 +4435,6 @@ static void* tmalloc_large(mstate m, size_t nb) {
tchunkptr t;
bindex_t idx;
compute_tree_index(nb, idx);
-
if ((t = *treebin_at(m, idx)) != 0) {
/* Traverse tree for this bin looking for node with size == nb */
size_t sizebits = nb << leftshift_for_tree_index(idx);
@@ -3636,22 +4443,21 @@ static void* tmalloc_large(mstate m, size_t nb) {
tchunkptr rt;
size_t trem = chunksize(t) - nb;
if (trem < rsize) {
- v = t;
- if ((rsize = trem) == 0)
- break;
+ v = t;
+ if ((rsize = trem) == 0)
+ break;
}
rt = t->child[1];
t = t->child[(sizebits >> (SIZE_T_BITSIZE-SIZE_T_ONE)) & 1];
if (rt != 0 && rt != t)
- rst = rt;
+ rst = rt;
if (t == 0) {
- t = rst; /* set t to least subtree holding sizes > nb */
- break;
+ t = rst; /* set t to least subtree holding sizes > nb */
+ break;
}
sizebits <<= 1;
}
}
-
if (t == 0 && v == 0) { /* set t to root of next non-empty treebin */
binmap_t leftbits = left_bits(idx2bit(idx)) & m->treemap;
if (leftbits != 0) {
@@ -3677,15 +4483,15 @@ static void* tmalloc_large(mstate m, size_t nb) {
mchunkptr r = chunk_plus_offset(v, nb);
assert(chunksize(v) == rsize + nb);
if (RTCHECK(ok_next(v, r))) {
- unlink_large_chunk(m, v);
- if (rsize < MIN_CHUNK_SIZE)
- set_inuse_and_pinuse(m, v, (rsize + nb));
- else {
- set_size_and_pinuse_of_inuse_chunk(m, v, nb);
- set_size_and_pinuse_of_free_chunk(r, rsize);
- insert_chunk(m, r, rsize);
- }
- return chunk2mem(v);
+ unlink_large_chunk(m, v);
+ if (rsize < MIN_CHUNK_SIZE)
+ set_inuse_and_pinuse(m, v, (rsize + nb));
+ else {
+ set_size_and_pinuse_of_inuse_chunk(m, v, nb);
+ set_size_and_pinuse_of_free_chunk(r, rsize);
+ insert_chunk(m, r, rsize);
+ }
+ return chunk2mem(v);
}
}
CORRUPTION_ERROR_ACTION(m);
@@ -3700,7 +4506,6 @@ static void* tmalloc_small(mstate m, size_t nb) {
bindex_t i;
binmap_t leastbit = least_bit(m->treemap);
compute_bit2idx(leastbit, i);
-
v = t = *treebin_at(m, i);
rsize = chunksize(t) - nb;
@@ -3718,11 +4523,11 @@ static void* tmalloc_small(mstate m, size_t nb) {
if (RTCHECK(ok_next(v, r))) {
unlink_large_chunk(m, v);
if (rsize < MIN_CHUNK_SIZE)
- set_inuse_and_pinuse(m, v, (rsize + nb));
+ set_inuse_and_pinuse(m, v, (rsize + nb));
else {
- set_size_and_pinuse_of_inuse_chunk(m, v, nb);
- set_size_and_pinuse_of_free_chunk(r, rsize);
- replace_dv(m, r, rsize);
+ set_size_and_pinuse_of_inuse_chunk(m, v, nb);
+ set_size_and_pinuse_of_free_chunk(r, rsize);
+ replace_dv(m, r, rsize);
}
return chunk2mem(v);
}
@@ -3732,82 +4537,356 @@ static void* tmalloc_small(mstate m, size_t nb) {
return 0;
}
-/* --------------------------- realloc support --------------------------- */
+#if !ONLY_MSPACES
-static void* internal_realloc(mstate m, void* oldmem, size_t bytes) {
- if (bytes >= MAX_REQUEST) {
- MALLOC_FAILURE_ACTION;
- return 0;
- }
- if (!PREACTION(m)) {
- mchunkptr oldp = mem2chunk(oldmem);
- size_t oldsize = chunksize(oldp);
- mchunkptr next = chunk_plus_offset(oldp, oldsize);
- mchunkptr newp = 0;
- void* extra = 0;
+void* dlmalloc(size_t bytes) {
+ /*
+ Basic algorithm:
+ If a small request (< 256 bytes minus per-chunk overhead):
+ 1. If one exists, use a remainderless chunk in associated smallbin.
+ (Remainderless means that there are too few excess bytes to
+ represent as a chunk.)
+ 2. If it is big enough, use the dv chunk, which is normally the
+ chunk adjacent to the one used for the most recent small request.
+ 3. If one exists, split the smallest available chunk in a bin,
+ saving remainder in dv.
+ 4. If it is big enough, use the top chunk.
+ 5. If available, get memory from system and use it
+ Otherwise, for a large request:
+ 1. Find the smallest available binned chunk that fits, and use it
+ if it is better fitting than dv chunk, splitting if necessary.
+ 2. If better fitting than any binned chunk, use the dv chunk.
+ 3. If it is big enough, use the top chunk.
+ 4. If request size >= mmap threshold, try to directly mmap this chunk.
+ 5. If available, get memory from system and use it
- /* Try to either shrink or extend into top. Else malloc-copy-free */
+ The ugly goto's here ensure that postaction occurs along all paths.
+ */
- if (RTCHECK(ok_address(m, oldp) && ok_cinuse(oldp) &&
- ok_next(oldp, next) && ok_pinuse(next))) {
- size_t nb = request2size(bytes);
- if (is_mmapped(oldp))
- newp = mmap_resize(m, oldp, nb);
- else if (oldsize >= nb) { /* already big enough */
- size_t rsize = oldsize - nb;
- newp = oldp;
- if (rsize >= MIN_CHUNK_SIZE) {
- mchunkptr remainder = chunk_plus_offset(newp, nb);
- set_inuse(m, newp, nb);
- set_inuse(m, remainder, rsize);
- extra = chunk2mem(remainder);
- }
+#if USE_LOCKS
+ ensure_initialization(); /* initialize in sys_alloc if not using locks */
+#endif
+
+ if (!PREACTION(gm)) {
+ void* mem;
+ size_t nb;
+ if (bytes <= MAX_SMALL_REQUEST) {
+ bindex_t idx;
+ binmap_t smallbits;
+ nb = (bytes < MIN_REQUEST)? MIN_CHUNK_SIZE : pad_request(bytes);
+ idx = small_index(nb);
+ smallbits = gm->smallmap >> idx;
+
+ if ((smallbits & 0x3U) != 0) { /* Remainderless fit to a smallbin. */
+ mchunkptr b, p;
+ idx += ~smallbits & 1; /* Uses next bin if idx empty */
+ b = smallbin_at(gm, idx);
+ p = b->fd;
+ assert(chunksize(p) == small_index2size(idx));
+ unlink_first_small_chunk(gm, b, p, idx);
+ set_inuse_and_pinuse(gm, p, small_index2size(idx));
+ mem = chunk2mem(p);
+ check_malloced_chunk(gm, mem, nb);
+ goto postaction;
}
- else if (next == m->top && oldsize + m->topsize > nb) {
- /* Expand into top */
- size_t newsize = oldsize + m->topsize;
- size_t newtopsize = newsize - nb;
- mchunkptr newtop = chunk_plus_offset(oldp, nb);
- set_inuse(m, oldp, nb);
- newtop->head = newtopsize |PINUSE_BIT;
- m->top = newtop;
- m->topsize = newtopsize;
- newp = oldp;
+
+ else if (nb > gm->dvsize) {
+ if (smallbits != 0) { /* Use chunk in next nonempty smallbin */
+ mchunkptr b, p, r;
+ size_t rsize;
+ bindex_t i;
+ binmap_t leftbits = (smallbits << idx) & left_bits(idx2bit(idx));
+ binmap_t leastbit = least_bit(leftbits);
+ compute_bit2idx(leastbit, i);
+ b = smallbin_at(gm, i);
+ p = b->fd;
+ assert(chunksize(p) == small_index2size(i));
+ unlink_first_small_chunk(gm, b, p, i);
+ rsize = small_index2size(i) - nb;
+ /* Fit here cannot be remainderless if 4byte sizes */
+ if (SIZE_T_SIZE != 4 && rsize < MIN_CHUNK_SIZE)
+ set_inuse_and_pinuse(gm, p, small_index2size(i));
+ else {
+ set_size_and_pinuse_of_inuse_chunk(gm, p, nb);
+ r = chunk_plus_offset(p, nb);
+ set_size_and_pinuse_of_free_chunk(r, rsize);
+ replace_dv(gm, r, rsize);
+ }
+ mem = chunk2mem(p);
+ check_malloced_chunk(gm, mem, nb);
+ goto postaction;
+ }
+
+ else if (gm->treemap != 0 && (mem = tmalloc_small(gm, nb)) != 0) {
+ check_malloced_chunk(gm, mem, nb);
+ goto postaction;
+ }
}
}
+ else if (bytes >= MAX_REQUEST)
+ nb = MAX_SIZE_T; /* Too big to allocate. Force failure (in sys alloc) */
else {
- USAGE_ERROR_ACTION(m, oldmem);
- POSTACTION(m);
- return 0;
+ nb = pad_request(bytes);
+ if (gm->treemap != 0 && (mem = tmalloc_large(gm, nb)) != 0) {
+ check_malloced_chunk(gm, mem, nb);
+ goto postaction;
+ }
}
- POSTACTION(m);
-
- if (newp != 0) {
- if (extra != 0) {
- internal_free(m, extra);
+ if (nb <= gm->dvsize) {
+ size_t rsize = gm->dvsize - nb;
+ mchunkptr p = gm->dv;
+ if (rsize >= MIN_CHUNK_SIZE) { /* split dv */
+ mchunkptr r = gm->dv = chunk_plus_offset(p, nb);
+ gm->dvsize = rsize;
+ set_size_and_pinuse_of_free_chunk(r, rsize);
+ set_size_and_pinuse_of_inuse_chunk(gm, p, nb);
}
- check_inuse_chunk(m, newp);
- return chunk2mem(newp);
- }
- else {
- void* newmem = internal_malloc(m, bytes);
- if (newmem != 0) {
- size_t oc = oldsize - overhead_for(oldp);
- memcpy(newmem, oldmem, (oc < bytes)? oc : bytes);
- internal_free(m, oldmem);
+ else { /* exhaust dv */
+ size_t dvs = gm->dvsize;
+ gm->dvsize = 0;
+ gm->dv = 0;
+ set_inuse_and_pinuse(gm, p, dvs);
}
- return newmem;
+ mem = chunk2mem(p);
+ check_malloced_chunk(gm, mem, nb);
+ goto postaction;
+ }
+
+ else if (nb < gm->topsize) { /* Split top */
+ size_t rsize = gm->topsize -= nb;
+ mchunkptr p = gm->top;
+ mchunkptr r = gm->top = chunk_plus_offset(p, nb);
+ r->head = rsize | PINUSE_BIT;
+ set_size_and_pinuse_of_inuse_chunk(gm, p, nb);
+ mem = chunk2mem(p);
+ check_top_chunk(gm, gm->top);
+ check_malloced_chunk(gm, mem, nb);
+ goto postaction;
}
+
+ mem = sys_alloc(gm, nb);
+
+ postaction:
+ POSTACTION(gm);
+ return mem;
}
+
return 0;
}
-/* --------------------------- memalign support -------------------------- */
+/* ---------------------------- free --------------------------- */
+
+void dlfree(void* mem) {
+ /*
+ Consolidate freed chunks with preceeding or succeeding bordering
+ free chunks, if they exist, and then place in a bin. Intermixed
+ with special cases for top, dv, mmapped chunks, and usage errors.
+ */
+
+ if (mem != 0) {
+ mchunkptr p = mem2chunk(mem);
+#if FOOTERS
+ mstate fm = get_mstate_for(p);
+ if (!ok_magic(fm)) {
+ USAGE_ERROR_ACTION(fm, p);
+ return;
+ }
+#else /* FOOTERS */
+#define fm gm
+#endif /* FOOTERS */
+ if (!PREACTION(fm)) {
+ check_inuse_chunk(fm, p);
+ if (RTCHECK(ok_address(fm, p) && ok_inuse(p))) {
+ size_t psize = chunksize(p);
+ mchunkptr next = chunk_plus_offset(p, psize);
+ if (!pinuse(p)) {
+ size_t prevsize = p->prev_foot;
+ if (is_mmapped(p)) {
+ psize += prevsize + MMAP_FOOT_PAD;
+ if (CALL_MUNMAP((char*)p - prevsize, psize) == 0)
+ fm->footprint -= psize;
+ goto postaction;
+ }
+ else {
+ mchunkptr prev = chunk_minus_offset(p, prevsize);
+ psize += prevsize;
+ p = prev;
+ if (RTCHECK(ok_address(fm, prev))) { /* consolidate backward */
+ if (p != fm->dv) {
+ unlink_chunk(fm, p, prevsize);
+ }
+ else if ((next->head & INUSE_BITS) == INUSE_BITS) {
+ fm->dvsize = psize;
+ set_free_with_pinuse(p, psize, next);
+ goto postaction;
+ }
+ }
+ else
+ goto erroraction;
+ }
+ }
+
+ if (RTCHECK(ok_next(p, next) && ok_pinuse(next))) {
+ if (!cinuse(next)) { /* consolidate forward */
+ if (next == fm->top) {
+ size_t tsize = fm->topsize += psize;
+ fm->top = p;
+ p->head = tsize | PINUSE_BIT;
+ if (p == fm->dv) {
+ fm->dv = 0;
+ fm->dvsize = 0;
+ }
+ if (should_trim(fm, tsize))
+ sys_trim(fm, 0);
+ goto postaction;
+ }
+ else if (next == fm->dv) {
+ size_t dsize = fm->dvsize += psize;
+ fm->dv = p;
+ set_size_and_pinuse_of_free_chunk(p, dsize);
+ goto postaction;
+ }
+ else {
+ size_t nsize = chunksize(next);
+ psize += nsize;
+ unlink_chunk(fm, next, nsize);
+ set_size_and_pinuse_of_free_chunk(p, psize);
+ if (p == fm->dv) {
+ fm->dvsize = psize;
+ goto postaction;
+ }
+ }
+ }
+ else
+ set_free_with_pinuse(p, psize, next);
+
+ if (is_small(psize)) {
+ insert_small_chunk(fm, p, psize);
+ check_free_chunk(fm, p);
+ }
+ else {
+ tchunkptr tp = (tchunkptr)p;
+ insert_large_chunk(fm, tp, psize);
+ check_free_chunk(fm, p);
+ if (--fm->release_checks == 0)
+ release_unused_segments(fm);
+ }
+ goto postaction;
+ }
+ }
+ erroraction:
+ USAGE_ERROR_ACTION(fm, p);
+ postaction:
+ POSTACTION(fm);
+ }
+ }
+#if !FOOTERS
+#undef fm
+#endif /* FOOTERS */
+}
+
+void* dlcalloc(size_t n_elements, size_t elem_size) {
+ void* mem;
+ size_t req = 0;
+ if (n_elements != 0) {
+ req = n_elements * elem_size;
+ if (((n_elements | elem_size) & ~(size_t)0xffff) &&
+ (req / n_elements != elem_size))
+ req = MAX_SIZE_T; /* force downstream failure on overflow */
+ }
+ mem = dlmalloc(req);
+ if (mem != 0 && calloc_must_clear(mem2chunk(mem)))
+ memset(mem, 0, req);
+ return mem;
+}
+
+#endif /* !ONLY_MSPACES */
+
+/* ------------ Internal support for realloc, memalign, etc -------------- */
+
+/* Try to realloc; only in-place unless can_move true */
+static mchunkptr try_realloc_chunk(mstate m, mchunkptr p, size_t nb,
+ int can_move) {
+ mchunkptr newp = 0;
+ size_t oldsize = chunksize(p);
+ mchunkptr next = chunk_plus_offset(p, oldsize);
+ if (RTCHECK(ok_address(m, p) && ok_inuse(p) &&
+ ok_next(p, next) && ok_pinuse(next))) {
+ if (is_mmapped(p)) {
+ newp = mmap_resize(m, p, nb, can_move);
+ }
+ else if (oldsize >= nb) { /* already big enough */
+ size_t rsize = oldsize - nb;
+ if (rsize >= MIN_CHUNK_SIZE) { /* split off remainder */
+ mchunkptr r = chunk_plus_offset(p, nb);
+ set_inuse(m, p, nb);
+ set_inuse(m, r, rsize);
+ dispose_chunk(m, r, rsize);
+ }
+ newp = p;
+ }
+ else if (next == m->top) { /* extend into top */
+ if (oldsize + m->topsize > nb) {
+ size_t newsize = oldsize + m->topsize;
+ size_t newtopsize = newsize - nb;
+ mchunkptr newtop = chunk_plus_offset(p, nb);
+ set_inuse(m, p, nb);
+ newtop->head = newtopsize |PINUSE_BIT;
+ m->top = newtop;
+ m->topsize = newtopsize;
+ newp = p;
+ }
+ }
+ else if (next == m->dv) { /* extend into dv */
+ size_t dvs = m->dvsize;
+ if (oldsize + dvs >= nb) {
+ size_t dsize = oldsize + dvs - nb;
+ if (dsize >= MIN_CHUNK_SIZE) {
+ mchunkptr r = chunk_plus_offset(p, nb);
+ mchunkptr n = chunk_plus_offset(r, dsize);
+ set_inuse(m, p, nb);
+ set_size_and_pinuse_of_free_chunk(r, dsize);
+ clear_pinuse(n);
+ m->dvsize = dsize;
+ m->dv = r;
+ }
+ else { /* exhaust dv */
+ size_t newsize = oldsize + dvs;
+ set_inuse(m, p, newsize);
+ m->dvsize = 0;
+ m->dv = 0;
+ }
+ newp = p;
+ }
+ }
+ else if (!cinuse(next)) { /* extend into next free chunk */
+ size_t nextsize = chunksize(next);
+ if (oldsize + nextsize >= nb) {
+ size_t rsize = oldsize + nextsize - nb;
+ unlink_chunk(m, next, nextsize);
+ if (rsize < MIN_CHUNK_SIZE) {
+ size_t newsize = oldsize + nextsize;
+ set_inuse(m, p, newsize);
+ }
+ else {
+ mchunkptr r = chunk_plus_offset(p, nb);
+ set_inuse(m, p, nb);
+ set_inuse(m, r, rsize);
+ dispose_chunk(m, r, rsize);
+ }
+ newp = p;
+ }
+ }
+ }
+ else {
+ USAGE_ERROR_ACTION(m, chunk2mem(p));
+ }
+ return newp;
+}
static void* internal_memalign(mstate m, size_t alignment, size_t bytes) {
- if (alignment <= MALLOC_ALIGNMENT) /* Can just use malloc */
- return internal_malloc(m, bytes);
+ void* mem = 0;
if (alignment < MIN_CHUNK_SIZE) /* must be at least a minimum chunk size */
alignment = MIN_CHUNK_SIZE;
if ((alignment & (alignment-SIZE_T_ONE)) != 0) {/* Ensure a power of 2 */
@@ -3815,7 +4894,6 @@ static void* internal_memalign(mstate m, size_t alignment, size_t bytes) {
while (a < alignment) a <<= 1;
alignment = a;
}
-
if (bytes >= MAX_REQUEST - alignment) {
if (m != 0) { /* Test isn't needed but avoids compiler warning */
MALLOC_FAILURE_ACTION;
@@ -3824,87 +4902,75 @@ static void* internal_memalign(mstate m, size_t alignment, size_t bytes) {
else {
size_t nb = request2size(bytes);
size_t req = nb + alignment + MIN_CHUNK_SIZE - CHUNK_OVERHEAD;
- char* mem = (char*)internal_malloc(m, req);
+ mem = internal_malloc(m, req);
if (mem != 0) {
- void* leader = 0;
- void* trailer = 0;
mchunkptr p = mem2chunk(mem);
-
- if (PREACTION(m)) return 0;
- if ((((size_t)(mem)) % alignment) != 0) { /* misaligned */
- /*
- Find an aligned spot inside chunk. Since we need to give
- back leading space in a chunk of at least MIN_CHUNK_SIZE, if
- the first calculation places us at a spot with less than
- MIN_CHUNK_SIZE leader, we can move to the next aligned spot.
- We've allocated enough total room so that this is always
- possible.
- */
- char* br = (char*)mem2chunk((size_t)(((size_t)(mem +
- alignment -
- SIZE_T_ONE)) &
- -alignment));
- char* pos = ((size_t)(br - (char*)(p)) >= MIN_CHUNK_SIZE)?
- br : br+alignment;
- mchunkptr newp = (mchunkptr)pos;
- size_t leadsize = pos - (char*)(p);
- size_t newsize = chunksize(p) - leadsize;
-
- if (is_mmapped(p)) { /* For mmapped chunks, just adjust offset */
- newp->prev_foot = p->prev_foot + leadsize;
- newp->head = (newsize|CINUSE_BIT);
- }
- else { /* Otherwise, give back leader, use the rest */
- set_inuse(m, newp, newsize);
- set_inuse(m, p, leadsize);
- leader = chunk2mem(p);
- }
- p = newp;
+ if (PREACTION(m))
+ return 0;
+ if ((((size_t)(mem)) & (alignment - 1)) != 0) { /* misaligned */
+ /*
+ Find an aligned spot inside chunk. Since we need to give
+ back leading space in a chunk of at least MIN_CHUNK_SIZE, if
+ the first calculation places us at a spot with less than
+ MIN_CHUNK_SIZE leader, we can move to the next aligned spot.
+ We've allocated enough total room so that this is always
+ possible.
+ */
+ char* br = (char*)mem2chunk((size_t)(((size_t)((char*)mem + alignment -
+ SIZE_T_ONE)) &
+ -alignment));
+ char* pos = ((size_t)(br - (char*)(p)) >= MIN_CHUNK_SIZE)?
+ br : br+alignment;
+ mchunkptr newp = (mchunkptr)pos;
+ size_t leadsize = pos - (char*)(p);
+ size_t newsize = chunksize(p) - leadsize;
+
+ if (is_mmapped(p)) { /* For mmapped chunks, just adjust offset */
+ newp->prev_foot = p->prev_foot + leadsize;
+ newp->head = newsize;
+ }
+ else { /* Otherwise, give back leader, use the rest */
+ set_inuse(m, newp, newsize);
+ set_inuse(m, p, leadsize);
+ dispose_chunk(m, p, leadsize);
+ }
+ p = newp;
}
/* Give back spare room at the end */
if (!is_mmapped(p)) {
- size_t size = chunksize(p);
- if (size > nb + MIN_CHUNK_SIZE) {
- size_t remainder_size = size - nb;
- mchunkptr remainder = chunk_plus_offset(p, nb);
- set_inuse(m, p, nb);
- set_inuse(m, remainder, remainder_size);
- trailer = chunk2mem(remainder);
- }
+ size_t size = chunksize(p);
+ if (size > nb + MIN_CHUNK_SIZE) {
+ size_t remainder_size = size - nb;
+ mchunkptr remainder = chunk_plus_offset(p, nb);
+ set_inuse(m, p, nb);
+ set_inuse(m, remainder, remainder_size);
+ dispose_chunk(m, remainder, remainder_size);
+ }
}
+ mem = chunk2mem(p);
assert (chunksize(p) >= nb);
- assert((((size_t)(chunk2mem(p))) % alignment) == 0);
+ assert(((size_t)mem & (alignment - 1)) == 0);
check_inuse_chunk(m, p);
POSTACTION(m);
- if (leader != 0) {
- internal_free(m, leader);
- }
- if (trailer != 0) {
- internal_free(m, trailer);
- }
- return chunk2mem(p);
}
}
- return 0;
+ return mem;
}
-/* ------------------------ comalloc/coalloc support --------------------- */
-
-static void** ialloc(mstate m,
- size_t n_elements,
- size_t* sizes,
- int opts,
- void* chunks[]) {
- /*
- This provides common support for independent_X routines, handling
+/*
+ Common support for independent_X routines, handling
all of the combinations that can result.
-
- The opts arg has:
+ The opts arg has:
bit 0 set if all elements are same size (using sizes[0])
bit 1 set if elements should be zeroed
- */
+*/
+static void** ialloc(mstate m,
+ size_t n_elements,
+ size_t* sizes,
+ int opts,
+ void* chunks[]) {
size_t element_size; /* chunksize of each element, if all same */
size_t contents_size; /* total size of elements */
@@ -3918,6 +4984,7 @@ static void** ialloc(mstate m,
size_t size;
size_t i;
+ ensure_initialization();
/* compute array length, if needed */
if (chunks != 0) {
if (n_elements == 0)
@@ -3985,9 +5052,9 @@ static void** ialloc(mstate m,
marray[i] = chunk2mem(p);
if (i != n_elements-1) {
if (element_size != 0)
- size = element_size;
+ size = element_size;
else
- size = request2size(sizes[i]);
+ size = request2size(sizes[i]);
remainder_size -= size;
set_size_and_pinuse_of_inuse_chunk(m, p, size);
p = chunk_plus_offset(p, size);
@@ -4018,312 +5085,253 @@ static void** ialloc(mstate m,
return marray;
}
-
-/* -------------------------- public routines ---------------------------- */
-
-#if !ONLY_MSPACES
-
-void* dlmalloc(size_t bytes) {
- /*
- Basic algorithm:
- If a small request (< 256 bytes minus per-chunk overhead):
- 1. If one exists, use a remainderless chunk in associated smallbin.
- (Remainderless means that there are too few excess bytes to
- represent as a chunk.)
- 2. If it is big enough, use the dv chunk, which is normally the
- chunk adjacent to the one used for the most recent small request.
- 3. If one exists, split the smallest available chunk in a bin,
- saving remainder in dv.
- 4. If it is big enough, use the top chunk.
- 5. If available, get memory from system and use it
- Otherwise, for a large request:
- 1. Find the smallest available binned chunk that fits, and use it
- if it is better fitting than dv chunk, splitting if necessary.
- 2. If better fitting than any binned chunk, use the dv chunk.
- 3. If it is big enough, use the top chunk.
- 4. If request size >= mmap threshold, try to directly mmap this chunk.
- 5. If available, get memory from system and use it
-
- The ugly goto's here ensure that postaction occurs along all paths.
- */
-
- if (!PREACTION(gm)) {
- void* mem;
- size_t nb;
- if (bytes <= MAX_SMALL_REQUEST) {
- bindex_t idx;
- binmap_t smallbits;
- nb = (bytes < MIN_REQUEST)? MIN_CHUNK_SIZE : pad_request(bytes);
- idx = small_index(nb);
- smallbits = gm->smallmap >> idx;
-
- if ((smallbits & 0x3U) != 0) { /* Remainderless fit to a smallbin. */
- mchunkptr b, p;
- idx += ~smallbits & 1; /* Uses next bin if idx empty */
- b = smallbin_at(gm, idx);
- p = b->fd;
- assert(chunksize(p) == small_index2size(idx));
- unlink_first_small_chunk(gm, b, p, idx);
- set_inuse_and_pinuse(gm, p, small_index2size(idx));
- mem = chunk2mem(p);
- check_malloced_chunk(gm, mem, nb);
- goto postaction;
- }
-
- else if (nb > gm->dvsize) {
- if (smallbits != 0) { /* Use chunk in next nonempty smallbin */
- mchunkptr b, p, r;
- size_t rsize;
- bindex_t i;
- binmap_t leftbits = (smallbits << idx) & left_bits(idx2bit(idx));
- binmap_t leastbit = least_bit(leftbits);
- compute_bit2idx(leastbit, i);
- b = smallbin_at(gm, i);
- p = b->fd;
- assert(chunksize(p) == small_index2size(i));
- unlink_first_small_chunk(gm, b, p, i);
- rsize = small_index2size(i) - nb;
- /* Fit here cannot be remainderless if 4byte sizes */
- if (SIZE_T_SIZE != 4 && rsize < MIN_CHUNK_SIZE)
- set_inuse_and_pinuse(gm, p, small_index2size(i));
- else {
- set_size_and_pinuse_of_inuse_chunk(gm, p, nb);
- r = chunk_plus_offset(p, nb);
- set_size_and_pinuse_of_free_chunk(r, rsize);
- replace_dv(gm, r, rsize);
- }
- mem = chunk2mem(p);
- check_malloced_chunk(gm, mem, nb);
- goto postaction;
- }
-
- else if (gm->treemap != 0 && (mem = tmalloc_small(gm, nb)) != 0) {
- check_malloced_chunk(gm, mem, nb);
- goto postaction;
- }
- }
- }
- else if (bytes >= MAX_REQUEST)
- nb = MAX_SIZE_T; /* Too big to allocate. Force failure (in sys alloc) */
- else {
- nb = pad_request(bytes);
- if (gm->treemap != 0 && (mem = tmalloc_large(gm, nb)) != 0) {
- check_malloced_chunk(gm, mem, nb);
- goto postaction;
- }
- }
-
- if (nb <= gm->dvsize) {
- size_t rsize = gm->dvsize - nb;
- mchunkptr p = gm->dv;
- if (rsize >= MIN_CHUNK_SIZE) { /* split dv */
- mchunkptr r = gm->dv = chunk_plus_offset(p, nb);
- gm->dvsize = rsize;
- set_size_and_pinuse_of_free_chunk(r, rsize);
- set_size_and_pinuse_of_inuse_chunk(gm, p, nb);
- }
- else { /* exhaust dv */
- size_t dvs = gm->dvsize;
- gm->dvsize = 0;
- gm->dv = 0;
- set_inuse_and_pinuse(gm, p, dvs);
+/* Try to free all pointers in the given array.
+ Note: this could be made faster, by delaying consolidation,
+ at the price of disabling some user integrity checks, We
+ still optimize some consolidations by combining adjacent
+ chunks before freeing, which will occur often if allocated
+ with ialloc or the array is sorted.
+*/
+static size_t internal_bulk_free(mstate m, void* array[], size_t nelem) {
+ size_t unfreed = 0;
+ if (!PREACTION(m)) {
+ void** a;
+ void** fence = &(array[nelem]);
+ for (a = array; a != fence; ++a) {
+ void* mem = *a;
+ if (mem != 0) {
+ mchunkptr p = mem2chunk(mem);
+ size_t psize = chunksize(p);
+#if FOOTERS
+ if (get_mstate_for(p) != m) {
+ ++unfreed;
+ continue;
+ }
+#endif
+ check_inuse_chunk(m, p);
+ *a = 0;
+ if (RTCHECK(ok_address(m, p) && ok_inuse(p))) {
+ void ** b = a + 1; /* try to merge with next chunk */
+ mchunkptr next = next_chunk(p);
+ if (b != fence && *b == chunk2mem(next)) {
+ size_t newsize = chunksize(next) + psize;
+ set_inuse(m, p, newsize);
+ *b = chunk2mem(p);
+ }
+ else
+ dispose_chunk(m, p, psize);
+ }
+ else {
+ CORRUPTION_ERROR_ACTION(m);
+ break;
+ }
}
- mem = chunk2mem(p);
- check_malloced_chunk(gm, mem, nb);
- goto postaction;
- }
-
- else if (nb < gm->topsize) { /* Split top */
- size_t rsize = gm->topsize -= nb;
- mchunkptr p = gm->top;
- mchunkptr r = gm->top = chunk_plus_offset(p, nb);
- r->head = rsize | PINUSE_BIT;
- set_size_and_pinuse_of_inuse_chunk(gm, p, nb);
- mem = chunk2mem(p);
- check_top_chunk(gm, gm->top);
- check_malloced_chunk(gm, mem, nb);
- goto postaction;
}
-
- mem = sys_alloc(gm, nb);
-
- postaction:
- POSTACTION(gm);
- return mem;
+ if (should_trim(m, m->topsize))
+ sys_trim(m, 0);
+ POSTACTION(m);
}
-
- return 0;
+ return unfreed;
}
-void dlfree(void* mem) {
- /*
- Consolidate freed chunks with preceeding or succeeding bordering
- free chunks, if they exist, and then place in a bin. Intermixed
- with special cases for top, dv, mmapped chunks, and usage errors.
- */
-
- if (mem != 0) {
- mchunkptr p = mem2chunk(mem);
-#if FOOTERS
- mstate fm = get_mstate_for(p);
- if (!ok_magic(fm)) {
- USAGE_ERROR_ACTION(fm, p);
- return;
- }
-#else /* FOOTERS */
-#define fm gm
-#endif /* FOOTERS */
- if (!PREACTION(fm)) {
- check_inuse_chunk(fm, p);
- if (RTCHECK(ok_address(fm, p) && ok_cinuse(p))) {
- size_t psize = chunksize(p);
- mchunkptr next = chunk_plus_offset(p, psize);
- if (!pinuse(p)) {
- size_t prevsize = p->prev_foot;
- if ((prevsize & IS_MMAPPED_BIT) != 0) {
- prevsize &= ~IS_MMAPPED_BIT;
- psize += prevsize + MMAP_FOOT_PAD;
- if (CALL_MUNMAP((char*)p - prevsize, psize) == 0)
- fm->footprint -= psize;
- goto postaction;
- }
- else {
- mchunkptr prev = chunk_minus_offset(p, prevsize);
- psize += prevsize;
- p = prev;
- if (RTCHECK(ok_address(fm, prev))) { /* consolidate backward */
- if (p != fm->dv) {
- unlink_chunk(fm, p, prevsize);
- }
- else if ((next->head & INUSE_BITS) == INUSE_BITS) {
- fm->dvsize = psize;
- set_free_with_pinuse(p, psize, next);
- goto postaction;
- }
- }
- else
- goto erroraction;
- }
- }
-
- if (RTCHECK(ok_next(p, next) && ok_pinuse(next))) {
- if (!cinuse(next)) { /* consolidate forward */
- if (next == fm->top) {
- size_t tsize = fm->topsize += psize;
- fm->top = p;
- p->head = tsize | PINUSE_BIT;
- if (p == fm->dv) {
- fm->dv = 0;
- fm->dvsize = 0;
- }
- if (should_trim(fm, tsize))
- sys_trim(fm, 0);
- goto postaction;
- }
- else if (next == fm->dv) {
- size_t dsize = fm->dvsize += psize;
- fm->dv = p;
- set_size_and_pinuse_of_free_chunk(p, dsize);
- goto postaction;
- }
- else {
- size_t nsize = chunksize(next);
- psize += nsize;
- unlink_chunk(fm, next, nsize);
- set_size_and_pinuse_of_free_chunk(p, psize);
- if (p == fm->dv) {
- fm->dvsize = psize;
- goto postaction;
- }
- }
- }
- else
- set_free_with_pinuse(p, psize, next);
- insert_chunk(fm, p, psize);
- check_free_chunk(fm, p);
- goto postaction;
- }
+/* Traversal */
+#if MALLOC_INSPECT_ALL
+static void internal_inspect_all(mstate m,
+ void(*handler)(void *start,
+ void *end,
+ size_t used_bytes,
+ void* callback_arg),
+ void* arg) {
+ if (is_initialized(m)) {
+ mchunkptr top = m->top;
+ msegmentptr s;
+ for (s = &m->seg; s != 0; s = s->next) {
+ mchunkptr q = align_as_chunk(s->base);
+ while (segment_holds(s, q) && q->head != FENCEPOST_HEAD) {
+ mchunkptr next = next_chunk(q);
+ size_t sz = chunksize(q);
+ size_t used;
+ void* start;
+ if (is_inuse(q)) {
+ used = sz - CHUNK_OVERHEAD; /* must not be mmapped */
+ start = chunk2mem(q);
+ }
+ else {
+ used = 0;
+ if (is_small(sz)) { /* offset by possible bookkeeping */
+ start = (void*)((char*)q + sizeof(struct malloc_chunk));
+ }
+ else {
+ start = (void*)((char*)q + sizeof(struct malloc_tree_chunk));
+ }
+ }
+ if (start < (void*)next) /* skip if all space is bookkeeping */
+ handler(start, next, used, arg);
+ if (q == top)
+ break;
+ q = next;
}
- erroraction:
- USAGE_ERROR_ACTION(fm, p);
- postaction:
- POSTACTION(fm);
}
}
-#if !FOOTERS
-#undef fm
-#endif /* FOOTERS */
}
+#endif /* MALLOC_INSPECT_ALL */
-void* dlcalloc(size_t n_elements, size_t elem_size) {
- void* mem;
- size_t req = 0;
- if (n_elements != 0) {
- req = n_elements * elem_size;
- if (((n_elements | elem_size) & ~(size_t)0xffff) &&
- (req / n_elements != elem_size))
- req = MAX_SIZE_T; /* force downstream failure on overflow */
- }
- mem = dlmalloc(req);
- if (mem != 0 && calloc_must_clear(mem2chunk(mem)))
- memset(mem, 0, req);
- return mem;
-}
+/* ------------------ Exported realloc, memalign, etc -------------------- */
+
+#if !ONLY_MSPACES
void* dlrealloc(void* oldmem, size_t bytes) {
- if (oldmem == 0)
- return dlmalloc(bytes);
+ void* mem = 0;
+ if (oldmem == 0) {
+ mem = dlmalloc(bytes);
+ }
+ else if (bytes >= MAX_REQUEST) {
+ MALLOC_FAILURE_ACTION;
+ }
#ifdef REALLOC_ZERO_BYTES_FREES
- if (bytes == 0) {
+ else if (bytes == 0) {
dlfree(oldmem);
- return 0;
}
#endif /* REALLOC_ZERO_BYTES_FREES */
else {
+ size_t nb = request2size(bytes);
+ mchunkptr oldp = mem2chunk(oldmem);
#if ! FOOTERS
mstate m = gm;
#else /* FOOTERS */
- mstate m = get_mstate_for(mem2chunk(oldmem));
+ mstate m = get_mstate_for(oldp);
if (!ok_magic(m)) {
USAGE_ERROR_ACTION(m, oldmem);
return 0;
}
#endif /* FOOTERS */
- return internal_realloc(m, oldmem, bytes);
+ if (!PREACTION(m)) {
+ mchunkptr newp = try_realloc_chunk(m, oldp, nb, 1);
+ POSTACTION(m);
+ if (newp != 0) {
+ check_inuse_chunk(m, newp);
+ mem = chunk2mem(newp);
+ }
+ else {
+ mem = internal_malloc(m, bytes);
+ if (mem != 0) {
+ size_t oc = chunksize(oldp) - overhead_for(oldp);
+ memcpy(mem, oldmem, (oc < bytes)? oc : bytes);
+ internal_free(m, oldmem);
+ }
+ }
+ }
}
+ return mem;
}
-void* dlmemalign(size_t alignment, size_t bytes) {
- return internal_memalign(gm, alignment, bytes);
+void* dlrealloc_in_place(void* oldmem, size_t bytes) {
+ void* mem = 0;
+ if (oldmem != 0) {
+ if (bytes >= MAX_REQUEST) {
+ MALLOC_FAILURE_ACTION;
+ }
+ else {
+ size_t nb = request2size(bytes);
+ mchunkptr oldp = mem2chunk(oldmem);
+#if ! FOOTERS
+ mstate m = gm;
+#else /* FOOTERS */
+ mstate m = get_mstate_for(oldp);
+ if (!ok_magic(m)) {
+ USAGE_ERROR_ACTION(m, oldmem);
+ return 0;
+ }
+#endif /* FOOTERS */
+ if (!PREACTION(m)) {
+ mchunkptr newp = try_realloc_chunk(m, oldp, nb, 0);
+ POSTACTION(m);
+ if (newp == oldp) {
+ check_inuse_chunk(m, newp);
+ mem = oldmem;
+ }
+ }
+ }
+ }
+ return mem;
}
-void** dlindependent_calloc(size_t n_elements, size_t elem_size,
- void* chunks[]) {
- size_t sz = elem_size; /* serves as 1-element array */
- return ialloc(gm, n_elements, &sz, 3, chunks);
+void* dlmemalign(size_t alignment, size_t bytes) {
+ if (alignment <= MALLOC_ALIGNMENT) {
+ return dlmalloc(bytes);
+ }
+ return internal_memalign(gm, alignment, bytes);
}
-void** dlindependent_comalloc(size_t n_elements, size_t sizes[],
- void* chunks[]) {
- return ialloc(gm, n_elements, sizes, 0, chunks);
+int dlposix_memalign(void** pp, size_t alignment, size_t bytes) {
+ void* mem = 0;
+ if (alignment == MALLOC_ALIGNMENT)
+ mem = dlmalloc(bytes);
+ else {
+ size_t d = alignment / sizeof(void*);
+ size_t r = alignment % sizeof(void*);
+ if (r != 0 || d == 0 || (d & (d-SIZE_T_ONE)) != 0)
+ return EINVAL;
+ else if (bytes <= MAX_REQUEST - alignment) {
+ if (alignment < MIN_CHUNK_SIZE)
+ alignment = MIN_CHUNK_SIZE;
+ mem = internal_memalign(gm, alignment, bytes);
+ }
+ }
+ if (mem == 0)
+ return ENOMEM;
+ else {
+ *pp = mem;
+ return 0;
+ }
}
void* dlvalloc(size_t bytes) {
size_t pagesz;
- init_mparams();
+ ensure_initialization();
pagesz = mparams.page_size;
return dlmemalign(pagesz, bytes);
}
void* dlpvalloc(size_t bytes) {
size_t pagesz;
- init_mparams();
+ ensure_initialization();
pagesz = mparams.page_size;
return dlmemalign(pagesz, (bytes + pagesz - SIZE_T_ONE) & ~(pagesz - SIZE_T_ONE));
}
+void** dlindependent_calloc(size_t n_elements, size_t elem_size,
+ void* chunks[]) {
+ size_t sz = elem_size; /* serves as 1-element array */
+ return ialloc(gm, n_elements, &sz, 3, chunks);
+}
+
+void** dlindependent_comalloc(size_t n_elements, size_t sizes[],
+ void* chunks[]) {
+ return ialloc(gm, n_elements, sizes, 0, chunks);
+}
+
+size_t dlbulk_free(void* array[], size_t nelem) {
+ return internal_bulk_free(gm, array, nelem);
+}
+
+#if MALLOC_INSPECT_ALL
+void dlmalloc_inspect_all(void(*handler)(void *start,
+ void *end,
+ size_t used_bytes,
+ void* callback_arg),
+ void* arg) {
+ ensure_initialization();
+ if (!PREACTION(gm)) {
+ internal_inspect_all(gm, handler, arg);
+ POSTACTION(gm);
+ }
+}
+#endif /* MALLOC_INSPECT_ALL */
+
int dlmalloc_trim(size_t pad) {
int result = 0;
+ ensure_initialization();
if (!PREACTION(gm)) {
result = sys_trim(gm, pad);
POSTACTION(gm);
@@ -4339,29 +5347,47 @@ size_t dlmalloc_max_footprint(void) {
return gm->max_footprint;
}
+size_t dlmalloc_footprint_limit(void) {
+ size_t maf = gm->footprint_limit;
+ return maf == 0 ? MAX_SIZE_T : maf;
+}
+
+size_t dlmalloc_set_footprint_limit(size_t bytes) {
+ size_t result; /* invert sense of 0 */
+ if (bytes == 0)
+ result = granularity_align(1); /* Use minimal size */
+ if (bytes == MAX_SIZE_T)
+ result = 0; /* disable */
+ else
+ result = granularity_align(bytes);
+ return gm->footprint_limit = result;
+}
+
#if !NO_MALLINFO
struct mallinfo dlmallinfo(void) {
return internal_mallinfo(gm);
}
#endif /* NO_MALLINFO */
+#if !NO_MALLOC_STATS
void dlmalloc_stats() {
internal_malloc_stats(gm);
}
+#endif /* NO_MALLOC_STATS */
+
+int dlmallopt(int param_number, int value) {
+ return change_mparam(param_number, value);
+}
size_t dlmalloc_usable_size(void* mem) {
if (mem != 0) {
mchunkptr p = mem2chunk(mem);
- if (cinuse(p))
+ if (is_inuse(p))
return chunksize(p) - overhead_for(p);
}
return 0;
}
-int dlmallopt(int param_number, int value) {
- return change_mparam(param_number, value);
-}
-
#endif /* !ONLY_MSPACES */
/* ----------------------------- user mspaces ---------------------------- */
@@ -4374,12 +5400,15 @@ static mstate init_user_mstate(char* tbase, size_t tsize) {
mchunkptr msp = align_as_chunk(tbase);
mstate m = (mstate)(chunk2mem(msp));
memset(m, 0, msize);
- INITIAL_LOCK(&m->mutex);
- msp->head = (msize|PINUSE_BIT|CINUSE_BIT);
+ (void)INITIAL_LOCK(&m->mutex);
+ msp->head = (msize|INUSE_BITS);
m->seg.base = m->least_addr = tbase;
m->seg.size = m->footprint = m->max_footprint = tsize;
m->magic = mparams.magic;
+ m->release_checks = MAX_RELEASE_CHECK_RATE;
m->mflags = mparams.default_mflags;
+ m->extp = 0;
+ m->exts = 0;
disable_contiguous(m);
init_bins(m);
mn = next_chunk(mem2chunk(m));
@@ -4390,17 +5419,17 @@ static mstate init_user_mstate(char* tbase, size_t tsize) {
mspace create_mspace(size_t capacity, int locked) {
mstate m = 0;
- size_t msize = pad_request(sizeof(struct malloc_state));
- init_mparams(); /* Ensure pagesize etc initialized */
-
+ size_t msize;
+ ensure_initialization();
+ msize = pad_request(sizeof(struct malloc_state));
if (capacity < (size_t) -(msize + TOP_FOOT_SIZE + mparams.page_size)) {
size_t rs = ((capacity == 0)? mparams.granularity :
- (capacity + TOP_FOOT_SIZE + msize));
+ (capacity + TOP_FOOT_SIZE + msize));
size_t tsize = granularity_align(rs);
char* tbase = (char*)(CALL_MMAP(tsize));
if (tbase != CMFAIL) {
m = init_user_mstate(tbase, tsize);
- m->seg.sflags = IS_MMAPPED_BIT;
+ m->seg.sflags = USE_MMAP_BIT;
set_lock(m, locked);
}
}
@@ -4409,9 +5438,9 @@ mspace create_mspace(size_t capacity, int locked) {
mspace create_mspace_with_base(void* base, size_t capacity, int locked) {
mstate m = 0;
- size_t msize = pad_request(sizeof(struct malloc_state));
- init_mparams(); /* Ensure pagesize etc initialized */
-
+ size_t msize;
+ ensure_initialization();
+ msize = pad_request(sizeof(struct malloc_state));
if (capacity > msize + TOP_FOOT_SIZE &&
capacity < (size_t) -(msize + TOP_FOOT_SIZE + mparams.page_size)) {
m = init_user_mstate((char*)base, capacity);
@@ -4421,19 +5450,38 @@ mspace create_mspace_with_base(void* base, size_t capacity, int locked) {
return (mspace)m;
}
+int mspace_track_large_chunks(mspace msp, int enable) {
+ int ret = 0;
+ mstate ms = (mstate)msp;
+ if (!PREACTION(ms)) {
+ if (!use_mmap(ms)) {
+ ret = 1;
+ }
+ if (!enable) {
+ enable_mmap(ms);
+ } else {
+ disable_mmap(ms);
+ }
+ POSTACTION(ms);
+ }
+ return ret;
+}
+
size_t destroy_mspace(mspace msp) {
size_t freed = 0;
mstate ms = (mstate)msp;
if (ok_magic(ms)) {
msegmentptr sp = &ms->seg;
+ (void)DESTROY_LOCK(&ms->mutex); /* destroy before unmapped */
while (sp != 0) {
char* base = sp->base;
size_t size = sp->size;
flag_t flag = sp->sflags;
+ (void)base; /* placate people compiling -Wunused-variable */
sp = sp->next;
- if ((flag & IS_MMAPPED_BIT) && !(flag & EXTERN_BIT) &&
- CALL_MUNMAP(base, size) == 0)
- freed += size;
+ if ((flag & USE_MMAP_BIT) && !(flag & EXTERN_BIT) &&
+ CALL_MUNMAP(base, size) == 0)
+ freed += size;
}
}
else {
@@ -4447,7 +5495,6 @@ size_t destroy_mspace(mspace msp) {
versions. This is not so nice but better than the alternatives.
*/
-
void* mspace_malloc(mspace msp, size_t bytes) {
mstate ms = (mstate)msp;
if (!ok_magic(ms)) {
@@ -4465,49 +5512,49 @@ void* mspace_malloc(mspace msp, size_t bytes) {
smallbits = ms->smallmap >> idx;
if ((smallbits & 0x3U) != 0) { /* Remainderless fit to a smallbin. */
- mchunkptr b, p;
- idx += ~smallbits & 1; /* Uses next bin if idx empty */
- b = smallbin_at(ms, idx);
- p = b->fd;
- assert(chunksize(p) == small_index2size(idx));
- unlink_first_small_chunk(ms, b, p, idx);
- set_inuse_and_pinuse(ms, p, small_index2size(idx));
- mem = chunk2mem(p);
- check_malloced_chunk(ms, mem, nb);
- goto postaction;
+ mchunkptr b, p;
+ idx += ~smallbits & 1; /* Uses next bin if idx empty */
+ b = smallbin_at(ms, idx);
+ p = b->fd;
+ assert(chunksize(p) == small_index2size(idx));
+ unlink_first_small_chunk(ms, b, p, idx);
+ set_inuse_and_pinuse(ms, p, small_index2size(idx));
+ mem = chunk2mem(p);
+ check_malloced_chunk(ms, mem, nb);
+ goto postaction;
}
else if (nb > ms->dvsize) {
- if (smallbits != 0) { /* Use chunk in next nonempty smallbin */
- mchunkptr b, p, r;
- size_t rsize;
- bindex_t i;
- binmap_t leftbits = (smallbits << idx) & left_bits(idx2bit(idx));
- binmap_t leastbit = least_bit(leftbits);
- compute_bit2idx(leastbit, i);
- b = smallbin_at(ms, i);
- p = b->fd;
- assert(chunksize(p) == small_index2size(i));
- unlink_first_small_chunk(ms, b, p, i);
- rsize = small_index2size(i) - nb;
- /* Fit here cannot be remainderless if 4byte sizes */
- if (SIZE_T_SIZE != 4 && rsize < MIN_CHUNK_SIZE)
- set_inuse_and_pinuse(ms, p, small_index2size(i));
- else {
- set_size_and_pinuse_of_inuse_chunk(ms, p, nb);
- r = chunk_plus_offset(p, nb);
- set_size_and_pinuse_of_free_chunk(r, rsize);
- replace_dv(ms, r, rsize);
- }
- mem = chunk2mem(p);
- check_malloced_chunk(ms, mem, nb);
- goto postaction;
- }
-
- else if (ms->treemap != 0 && (mem = tmalloc_small(ms, nb)) != 0) {
- check_malloced_chunk(ms, mem, nb);
- goto postaction;
- }
+ if (smallbits != 0) { /* Use chunk in next nonempty smallbin */
+ mchunkptr b, p, r;
+ size_t rsize;
+ bindex_t i;
+ binmap_t leftbits = (smallbits << idx) & left_bits(idx2bit(idx));
+ binmap_t leastbit = least_bit(leftbits);
+ compute_bit2idx(leastbit, i);
+ b = smallbin_at(ms, i);
+ p = b->fd;
+ assert(chunksize(p) == small_index2size(i));
+ unlink_first_small_chunk(ms, b, p, i);
+ rsize = small_index2size(i) - nb;
+ /* Fit here cannot be remainderless if 4byte sizes */
+ if (SIZE_T_SIZE != 4 && rsize < MIN_CHUNK_SIZE)
+ set_inuse_and_pinuse(ms, p, small_index2size(i));
+ else {
+ set_size_and_pinuse_of_inuse_chunk(ms, p, nb);
+ r = chunk_plus_offset(p, nb);
+ set_size_and_pinuse_of_free_chunk(r, rsize);
+ replace_dv(ms, r, rsize);
+ }
+ mem = chunk2mem(p);
+ check_malloced_chunk(ms, mem, nb);
+ goto postaction;
+ }
+
+ else if (ms->treemap != 0 && (mem = tmalloc_small(ms, nb)) != 0) {
+ check_malloced_chunk(ms, mem, nb);
+ goto postaction;
+ }
}
}
else if (bytes >= MAX_REQUEST)
@@ -4515,8 +5562,8 @@ void* mspace_malloc(mspace msp, size_t bytes) {
else {
nb = pad_request(bytes);
if (ms->treemap != 0 && (mem = tmalloc_large(ms, nb)) != 0) {
- check_malloced_chunk(ms, mem, nb);
- goto postaction;
+ check_malloced_chunk(ms, mem, nb);
+ goto postaction;
}
}
@@ -4524,16 +5571,16 @@ void* mspace_malloc(mspace msp, size_t bytes) {
size_t rsize = ms->dvsize - nb;
mchunkptr p = ms->dv;
if (rsize >= MIN_CHUNK_SIZE) { /* split dv */
- mchunkptr r = ms->dv = chunk_plus_offset(p, nb);
- ms->dvsize = rsize;
- set_size_and_pinuse_of_free_chunk(r, rsize);
- set_size_and_pinuse_of_inuse_chunk(ms, p, nb);
+ mchunkptr r = ms->dv = chunk_plus_offset(p, nb);
+ ms->dvsize = rsize;
+ set_size_and_pinuse_of_free_chunk(r, rsize);
+ set_size_and_pinuse_of_inuse_chunk(ms, p, nb);
}
else { /* exhaust dv */
- size_t dvs = ms->dvsize;
- ms->dvsize = 0;
- ms->dv = 0;
- set_inuse_and_pinuse(ms, p, dvs);
+ size_t dvs = ms->dvsize;
+ ms->dvsize = 0;
+ ms->dv = 0;
+ set_inuse_and_pinuse(ms, p, dvs);
}
mem = chunk2mem(p);
check_malloced_chunk(ms, mem, nb);
@@ -4567,6 +5614,7 @@ void mspace_free(mspace msp, void* mem) {
mchunkptr p = mem2chunk(mem);
#if FOOTERS
mstate fm = get_mstate_for(p);
+ (void)msp; /* placate people compiling -Wunused */
#else /* FOOTERS */
mstate fm = (mstate)msp;
#endif /* FOOTERS */
@@ -4576,74 +5624,83 @@ void mspace_free(mspace msp, void* mem) {
}
if (!PREACTION(fm)) {
check_inuse_chunk(fm, p);
- if (RTCHECK(ok_address(fm, p) && ok_cinuse(p))) {
- size_t psize = chunksize(p);
- mchunkptr next = chunk_plus_offset(p, psize);
- if (!pinuse(p)) {
- size_t prevsize = p->prev_foot;
- if ((prevsize & IS_MMAPPED_BIT) != 0) {
- prevsize &= ~IS_MMAPPED_BIT;
- psize += prevsize + MMAP_FOOT_PAD;
- if (CALL_MUNMAP((char*)p - prevsize, psize) == 0)
- fm->footprint -= psize;
- goto postaction;
- }
- else {
- mchunkptr prev = chunk_minus_offset(p, prevsize);
- psize += prevsize;
- p = prev;
- if (RTCHECK(ok_address(fm, prev))) { /* consolidate backward */
- if (p != fm->dv) {
- unlink_chunk(fm, p, prevsize);
- }
- else if ((next->head & INUSE_BITS) == INUSE_BITS) {
- fm->dvsize = psize;
- set_free_with_pinuse(p, psize, next);
- goto postaction;
- }
- }
- else
- goto erroraction;
- }
- }
-
- if (RTCHECK(ok_next(p, next) && ok_pinuse(next))) {
- if (!cinuse(next)) { /* consolidate forward */
- if (next == fm->top) {
- size_t tsize = fm->topsize += psize;
- fm->top = p;
- p->head = tsize | PINUSE_BIT;
- if (p == fm->dv) {
- fm->dv = 0;
- fm->dvsize = 0;
- }
- if (should_trim(fm, tsize))
- sys_trim(fm, 0);
- goto postaction;
- }
- else if (next == fm->dv) {
- size_t dsize = fm->dvsize += psize;
- fm->dv = p;
- set_size_and_pinuse_of_free_chunk(p, dsize);
- goto postaction;
- }
- else {
- size_t nsize = chunksize(next);
- psize += nsize;
- unlink_chunk(fm, next, nsize);
- set_size_and_pinuse_of_free_chunk(p, psize);
- if (p == fm->dv) {
- fm->dvsize = psize;
- goto postaction;
- }
- }
- }
- else
- set_free_with_pinuse(p, psize, next);
- insert_chunk(fm, p, psize);
- check_free_chunk(fm, p);
- goto postaction;
- }
+ if (RTCHECK(ok_address(fm, p) && ok_inuse(p))) {
+ size_t psize = chunksize(p);
+ mchunkptr next = chunk_plus_offset(p, psize);
+ if (!pinuse(p)) {
+ size_t prevsize = p->prev_foot;
+ if (is_mmapped(p)) {
+ psize += prevsize + MMAP_FOOT_PAD;
+ if (CALL_MUNMAP((char*)p - prevsize, psize) == 0)
+ fm->footprint -= psize;
+ goto postaction;
+ }
+ else {
+ mchunkptr prev = chunk_minus_offset(p, prevsize);
+ psize += prevsize;
+ p = prev;
+ if (RTCHECK(ok_address(fm, prev))) { /* consolidate backward */
+ if (p != fm->dv) {
+ unlink_chunk(fm, p, prevsize);
+ }
+ else if ((next->head & INUSE_BITS) == INUSE_BITS) {
+ fm->dvsize = psize;
+ set_free_with_pinuse(p, psize, next);
+ goto postaction;
+ }
+ }
+ else
+ goto erroraction;
+ }
+ }
+
+ if (RTCHECK(ok_next(p, next) && ok_pinuse(next))) {
+ if (!cinuse(next)) { /* consolidate forward */
+ if (next == fm->top) {
+ size_t tsize = fm->topsize += psize;
+ fm->top = p;
+ p->head = tsize | PINUSE_BIT;
+ if (p == fm->dv) {
+ fm->dv = 0;
+ fm->dvsize = 0;
+ }
+ if (should_trim(fm, tsize))
+ sys_trim(fm, 0);
+ goto postaction;
+ }
+ else if (next == fm->dv) {
+ size_t dsize = fm->dvsize += psize;
+ fm->dv = p;
+ set_size_and_pinuse_of_free_chunk(p, dsize);
+ goto postaction;
+ }
+ else {
+ size_t nsize = chunksize(next);
+ psize += nsize;
+ unlink_chunk(fm, next, nsize);
+ set_size_and_pinuse_of_free_chunk(p, psize);
+ if (p == fm->dv) {
+ fm->dvsize = psize;
+ goto postaction;
+ }
+ }
+ }
+ else
+ set_free_with_pinuse(p, psize, next);
+
+ if (is_small(psize)) {
+ insert_small_chunk(fm, p, psize);
+ check_free_chunk(fm, p);
+ }
+ else {
+ tchunkptr tp = (tchunkptr)p;
+ insert_large_chunk(fm, tp, psize);
+ check_free_chunk(fm, p);
+ if (--fm->release_checks == 0)
+ release_unused_segments(fm);
+ }
+ goto postaction;
+ }
}
erroraction:
USAGE_ERROR_ACTION(fm, p);
@@ -4664,7 +5721,7 @@ void* mspace_calloc(mspace msp, size_t n_elements, size_t elem_size) {
if (n_elements != 0) {
req = n_elements * elem_size;
if (((n_elements | elem_size) & ~(size_t)0xffff) &&
- (req / n_elements != elem_size))
+ (req / n_elements != elem_size))
req = MAX_SIZE_T; /* force downstream failure on overflow */
}
mem = internal_malloc(ms, req);
@@ -4674,27 +5731,80 @@ void* mspace_calloc(mspace msp, size_t n_elements, size_t elem_size) {
}
void* mspace_realloc(mspace msp, void* oldmem, size_t bytes) {
- if (oldmem == 0)
- return mspace_malloc(msp, bytes);
+ void* mem = 0;
+ if (oldmem == 0) {
+ mem = mspace_malloc(msp, bytes);
+ }
+ else if (bytes >= MAX_REQUEST) {
+ MALLOC_FAILURE_ACTION;
+ }
#ifdef REALLOC_ZERO_BYTES_FREES
- if (bytes == 0) {
+ else if (bytes == 0) {
mspace_free(msp, oldmem);
- return 0;
}
#endif /* REALLOC_ZERO_BYTES_FREES */
else {
-#if FOOTERS
- mchunkptr p = mem2chunk(oldmem);
- mstate ms = get_mstate_for(p);
+ size_t nb = request2size(bytes);
+ mchunkptr oldp = mem2chunk(oldmem);
+#if ! FOOTERS
+ mstate m = (mstate)msp;
#else /* FOOTERS */
- mstate ms = (mstate)msp;
-#endif /* FOOTERS */
- if (!ok_magic(ms)) {
- USAGE_ERROR_ACTION(ms,ms);
+ mstate m = get_mstate_for(oldp);
+ if (!ok_magic(m)) {
+ USAGE_ERROR_ACTION(m, oldmem);
return 0;
}
- return internal_realloc(ms, oldmem, bytes);
+#endif /* FOOTERS */
+ if (!PREACTION(m)) {
+ mchunkptr newp = try_realloc_chunk(m, oldp, nb, 1);
+ POSTACTION(m);
+ if (newp != 0) {
+ check_inuse_chunk(m, newp);
+ mem = chunk2mem(newp);
+ }
+ else {
+ mem = mspace_malloc(m, bytes);
+ if (mem != 0) {
+ size_t oc = chunksize(oldp) - overhead_for(oldp);
+ memcpy(mem, oldmem, (oc < bytes)? oc : bytes);
+ mspace_free(m, oldmem);
+ }
+ }
+ }
}
+ return mem;
+}
+
+void* mspace_realloc_in_place(mspace msp, void* oldmem, size_t bytes) {
+ void* mem = 0;
+ if (oldmem != 0) {
+ if (bytes >= MAX_REQUEST) {
+ MALLOC_FAILURE_ACTION;
+ }
+ else {
+ size_t nb = request2size(bytes);
+ mchunkptr oldp = mem2chunk(oldmem);
+#if ! FOOTERS
+ mstate m = (mstate)msp;
+#else /* FOOTERS */
+ mstate m = get_mstate_for(oldp);
+ (void)msp; /* placate people compiling -Wunused */
+ if (!ok_magic(m)) {
+ USAGE_ERROR_ACTION(m, oldmem);
+ return 0;
+ }
+#endif /* FOOTERS */
+ if (!PREACTION(m)) {
+ mchunkptr newp = try_realloc_chunk(m, oldp, nb, 0);
+ POSTACTION(m);
+ if (newp == oldp) {
+ check_inuse_chunk(m, newp);
+ mem = oldmem;
+ }
+ }
+ }
+ }
+ return mem;
}
void* mspace_memalign(mspace msp, size_t alignment, size_t bytes) {
@@ -4703,11 +5813,13 @@ void* mspace_memalign(mspace msp, size_t alignment, size_t bytes) {
USAGE_ERROR_ACTION(ms,ms);
return 0;
}
+ if (alignment <= MALLOC_ALIGNMENT)
+ return mspace_malloc(msp, bytes);
return internal_memalign(ms, alignment, bytes);
}
void** mspace_independent_calloc(mspace msp, size_t n_elements,
- size_t elem_size, void* chunks[]) {
+ size_t elem_size, void* chunks[]) {
size_t sz = elem_size; /* serves as 1-element array */
mstate ms = (mstate)msp;
if (!ok_magic(ms)) {
@@ -4718,7 +5830,7 @@ void** mspace_independent_calloc(mspace msp, size_t n_elements,
}
void** mspace_independent_comalloc(mspace msp, size_t n_elements,
- size_t sizes[], void* chunks[]) {
+ size_t sizes[], void* chunks[]) {
mstate ms = (mstate)msp;
if (!ok_magic(ms)) {
USAGE_ERROR_ACTION(ms,ms);
@@ -4727,6 +5839,30 @@ void** mspace_independent_comalloc(mspace msp, size_t n_elements,
return ialloc(ms, n_elements, sizes, 0, chunks);
}
+size_t mspace_bulk_free(mspace msp, void* array[], size_t nelem) {
+ return internal_bulk_free((mstate)msp, array, nelem);
+}
+
+#if MALLOC_INSPECT_ALL
+void mspace_inspect_all(mspace msp,
+ void(*handler)(void *start,
+ void *end,
+ size_t used_bytes,
+ void* callback_arg),
+ void* arg) {
+ mstate ms = (mstate)msp;
+ if (ok_magic(ms)) {
+ if (!PREACTION(ms)) {
+ internal_inspect_all(ms, handler, arg);
+ POSTACTION(ms);
+ }
+ }
+ else {
+ USAGE_ERROR_ACTION(ms,ms);
+ }
+}
+#endif /* MALLOC_INSPECT_ALL */
+
int mspace_trim(mspace msp, size_t pad) {
int result = 0;
mstate ms = (mstate)msp;
@@ -4742,6 +5878,7 @@ int mspace_trim(mspace msp, size_t pad) {
return result;
}
+#if !NO_MALLOC_STATS
void mspace_malloc_stats(mspace msp) {
mstate ms = (mstate)msp;
if (ok_magic(ms)) {
@@ -4751,28 +5888,62 @@ void mspace_malloc_stats(mspace msp) {
USAGE_ERROR_ACTION(ms,ms);
}
}
+#endif /* NO_MALLOC_STATS */
size_t mspace_footprint(mspace msp) {
- size_t result;
+ size_t result = 0;
mstate ms = (mstate)msp;
if (ok_magic(ms)) {
result = ms->footprint;
}
- USAGE_ERROR_ACTION(ms,ms);
+ else {
+ USAGE_ERROR_ACTION(ms,ms);
+ }
return result;
}
-
size_t mspace_max_footprint(mspace msp) {
- size_t result;
+ size_t result = 0;
mstate ms = (mstate)msp;
if (ok_magic(ms)) {
result = ms->max_footprint;
}
- USAGE_ERROR_ACTION(ms,ms);
+ else {
+ USAGE_ERROR_ACTION(ms,ms);
+ }
+ return result;
+}
+
+size_t mspace_footprint_limit(mspace msp) {
+ size_t result = 0;
+ mstate ms = (mstate)msp;
+ if (ok_magic(ms)) {
+ size_t maf = ms->footprint_limit;
+ result = (maf == 0) ? MAX_SIZE_T : maf;
+ }
+ else {
+ USAGE_ERROR_ACTION(ms,ms);
+ }
return result;
}
+size_t mspace_set_footprint_limit(mspace msp, size_t bytes) {
+ size_t result = 0;
+ mstate ms = (mstate)msp;
+ if (ok_magic(ms)) {
+ if (bytes == 0)
+ result = granularity_align(1); /* Use minimal size */
+ if (bytes == MAX_SIZE_T)
+ result = 0; /* disable */
+ else
+ result = granularity_align(bytes);
+ ms->footprint_limit = result;
+ }
+ else {
+ USAGE_ERROR_ACTION(ms,ms);
+ }
+ return result;
+}
#if !NO_MALLINFO
struct mallinfo mspace_mallinfo(mspace msp) {
@@ -4784,12 +5955,22 @@ struct mallinfo mspace_mallinfo(mspace msp) {
}
#endif /* NO_MALLINFO */
+size_t mspace_usable_size(const void* mem) {
+ if (mem != 0) {
+ mchunkptr p = mem2chunk(mem);
+ if (is_inuse(p))
+ return chunksize(p) - overhead_for(p);
+ }
+ return 0;
+}
+
int mspace_mallopt(int param_number, int value) {
return change_mparam(param_number, value);
}
#endif /* MSPACES */
+
/* -------------------- Alternative MORECORE functions ------------------- */
/*
@@ -4839,12 +6020,12 @@ int mspace_mallopt(int param_number, int value) {
if (size > 0)
{
if (size < MINIMUM_MORECORE_SIZE)
- size = MINIMUM_MORECORE_SIZE;
+ size = MINIMUM_MORECORE_SIZE;
if (CurrentExecutionLevel() == kTaskLevel)
- ptr = PoolAllocateResident(size + RM_PAGE_SIZE, 0);
+ ptr = PoolAllocateResident(size + RM_PAGE_SIZE, 0);
if (ptr == 0)
{
- return (void *) MFAIL;
+ return (void *) MFAIL;
}
// save ptrs so they can be freed during cleanup
our_os_pools[next_os_pool] = ptr;
@@ -4874,8 +6055,8 @@ int mspace_mallopt(int param_number, int value) {
for (ptr = our_os_pools; ptr < &our_os_pools[MAX_POOL_ENTRIES]; ptr++)
if (*ptr)
{
- PoolDeallocate(*ptr);
- *ptr = 0;
+ PoolDeallocate(*ptr);
+ *ptr = 0;
}
}
@@ -4884,12 +6065,50 @@ int mspace_mallopt(int param_number, int value) {
/* -----------------------------------------------------------------------
History:
+ v2.8.6 Wed Aug 29 06:57:58 2012 Doug Lea
+ * fix bad comparison in dlposix_memalign
+ * don't reuse adjusted asize in sys_alloc
+ * add LOCK_AT_FORK -- thanks to Kirill Artamonov for the suggestion
+ * reduce compiler warnings -- thanks to all who reported/suggested these
+
+ v2.8.5 Sun May 22 10:26:02 2011 Doug Lea (dl at gee)
+ * Always perform unlink checks unless INSECURE
+ * Add posix_memalign.
+ * Improve realloc to expand in more cases; expose realloc_in_place.
+ Thanks to Peter Buhr for the suggestion.
+ * Add footprint_limit, inspect_all, bulk_free. Thanks
+ to Barry Hayes and others for the suggestions.
+ * Internal refactorings to avoid calls while holding locks
+ * Use non-reentrant locks by default. Thanks to Roland McGrath
+ for the suggestion.
+ * Small fixes to mspace_destroy, reset_on_error.
+ * Various configuration extensions/changes. Thanks
+ to all who contributed these.
+
+ V2.8.4a Thu Apr 28 14:39:43 2011 (dl at gee.cs.oswego.edu)
+ * Update Creative Commons URL
+
+ V2.8.4 Wed May 27 09:56:23 2009 Doug Lea (dl at gee)
+ * Use zeros instead of prev foot for is_mmapped
+ * Add mspace_track_large_chunks; thanks to Jean Brouwers
+ * Fix set_inuse in internal_realloc; thanks to Jean Brouwers
+ * Fix insufficient sys_alloc padding when using 16byte alignment
+ * Fix bad error check in mspace_footprint
+ * Adaptations for ptmalloc; thanks to Wolfram Gloger.
+ * Reentrant spin locks; thanks to Earl Chew and others
+ * Win32 improvements; thanks to Niall Douglas and Earl Chew
+ * Add NO_SEGMENT_TRAVERSAL and MAX_RELEASE_CHECK_RATE options
+ * Extension hook in malloc_state
+ * Various small adjustments to reduce warnings on some compilers
+ * Various configuration extensions/changes for more platforms. Thanks
+ to all who contributed these.
+
V2.8.3 Thu Sep 22 11:16:32 2005 Doug Lea (dl at gee)
* Add max_footprint functions
* Ensure all appropriate literals are size_t
* Fix conditional compilation problem for some #define settings
* Avoid concatenating segments with the one provided
- in create_mspace_with_base
+ in create_mspace_with_base
* Rename some variables to avoid compiler shadowing warnings
* Use explicit lock initialization.
* Better handling of sbrk interference.
@@ -4908,13 +6127,13 @@ History:
* Use trees for large bins
* Support mspaces
* Use segments to unify sbrk-based and mmap-based system allocation,
- removing need for emulation on most platforms without sbrk.
+ removing need for emulation on most platforms without sbrk.
* Default safety checks
* Optional footer checks. Thanks to William Robertson for the idea.
* Internal code refactoring
* Incorporate suggestions and platform-specific changes.
- Thanks to Dennis Flanagan, Colin Plumb, Niall Douglas,
- Aaron Bachmann, Emery Berger, and others.
+ Thanks to Dennis Flanagan, Colin Plumb, Niall Douglas,
+ Aaron Bachmann, Emery Berger, and others.
* Speed up non-fastbin processing enough to remove fastbins.
* Remove useless cfree() to avoid conflicts with other apps.
* Remove internal memcpy, memset. Compilers handle builtins better.
@@ -4927,7 +6146,7 @@ History:
* Allow tuning of FIRST_SORTED_BIN_SIZE
* Use PTR_UINT as type for all ptr->int casts. Thanks to John Belmonte.
* Better detection and support for non-contiguousness of MORECORE.
- Thanks to Andreas Mueller, Conal Walsh, and Wolfram Gloger
+ Thanks to Andreas Mueller, Conal Walsh, and Wolfram Gloger
* Bypass most of malloc if no frees. Thanks To Emery Berger.
* Fix freeing of old top non-contiguous chunk im sysmalloc.
* Raised default trim and map thresholds to 256K.
@@ -4938,18 +6157,18 @@ History:
V2.7.0 Sun Mar 11 14:14:06 2001 Doug Lea (dl at gee)
* Introduce independent_comalloc and independent_calloc.
- Thanks to Michael Pachos for motivation and help.
+ Thanks to Michael Pachos for motivation and help.
* Make optional .h file available
* Allow > 2GB requests on 32bit systems.
* new WIN32 sbrk, mmap, munmap, lock code from <Walter@GeNeSys-e.de>.
- Thanks also to Andreas Mueller <a.mueller at paradatec.de>,
- and Anonymous.
+ Thanks also to Andreas Mueller <a.mueller at paradatec.de>,
+ and Anonymous.
* Allow override of MALLOC_ALIGNMENT (Thanks to Ruud Waij for
- helping test this.)
+ helping test this.)
* memalign: check alignment arg
* realloc: don't try to shift chunks backwards, since this
- leads to more fragmentation in some programs and doesn't
- seem to help in any others.
+ leads to more fragmentation in some programs and doesn't
+ seem to help in any others.
* Collect all cases in malloc requiring system memory into sysmalloc
* Use mmap as backup to sbrk
* Place all internal state in malloc_state
@@ -4957,23 +6176,23 @@ History:
* Many minor tunings and cosmetic improvements
* Introduce USE_PUBLIC_MALLOC_WRAPPERS, USE_MALLOC_LOCK
* Introduce MALLOC_FAILURE_ACTION, MORECORE_CONTIGUOUS
- Thanks to Tony E. Bennett <tbennett@nvidia.com> and others.
+ Thanks to Tony E. Bennett <tbennett@nvidia.com> and others.
* Include errno.h to support default failure action.
V2.6.6 Sun Dec 5 07:42:19 1999 Doug Lea (dl at gee)
* return null for negative arguments
* Added Several WIN32 cleanups from Martin C. Fong <mcfong at yahoo.com>
- * Add 'LACKS_SYS_PARAM_H' for those systems without 'sys/param.h'
- (e.g. WIN32 platforms)
- * Cleanup header file inclusion for WIN32 platforms
- * Cleanup code to avoid Microsoft Visual C++ compiler complaints
- * Add 'USE_DL_PREFIX' to quickly allow co-existence with existing
- memory allocation routines
- * Set 'malloc_getpagesize' for WIN32 platforms (needs more work)
- * Use 'assert' rather than 'ASSERT' in WIN32 code to conform to
- usage of 'assert' in non-WIN32 code
- * Improve WIN32 'sbrk()' emulation's 'findRegion()' routine to
- avoid infinite loop
+ * Add 'LACKS_SYS_PARAM_H' for those systems without 'sys/param.h'
+ (e.g. WIN32 platforms)
+ * Cleanup header file inclusion for WIN32 platforms
+ * Cleanup code to avoid Microsoft Visual C++ compiler complaints
+ * Add 'USE_DL_PREFIX' to quickly allow co-existence with existing
+ memory allocation routines
+ * Set 'malloc_getpagesize' for WIN32 platforms (needs more work)
+ * Use 'assert' rather than 'ASSERT' in WIN32 code to conform to
+ usage of 'assert' in non-WIN32 code
+ * Improve WIN32 'sbrk()' emulation's 'findRegion()' routine to
+ avoid infinite loop
* Always call 'fREe()' rather than 'free()'
V2.6.5 Wed Jun 17 15:57:31 1998 Doug Lea (dl at gee)
@@ -4985,13 +6204,13 @@ History:
* 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
+ 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).
+ 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
@@ -4999,34 +6218,34 @@ History:
* 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.
+ avoid surprises about sbrk alignment conventions.
* Add mallinfo, mallopt. Thanks to Raymond Nijssen
- (raymond@es.ele.tue.nl) for the suggestion.
+ (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).
+ 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)
+ 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.
+ 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.
+ 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.
+ 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).
+ (wmglo@Dent.MED.Uni-Muenchen.DE).
V2.5.3 Tue Apr 26 10:16:01 1994 Doug Lea (dl at g)
@@ -5042,11 +6261,11 @@ History:
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)
+ (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
+ 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
@@ -5054,11 +6273,11 @@ History:
* 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.)
+ 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.)
+ structure of old version, but most details differ.)
*/
diff --git a/winsup/cygwin/malloc_wrapper.cc b/winsup/cygwin/malloc_wrapper.cc
index 17347ae3d..5d917cabc 100644
--- a/winsup/cygwin/malloc_wrapper.cc
+++ b/winsup/cygwin/malloc_wrapper.cc
@@ -1,8 +1,5 @@
/* malloc_wrapper.cc
- Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008, 2009, 2013 Red Hat, Inc.
-
This file is part of Cygwin.
This software is a copyrighted work licensed under the terms of the
@@ -18,9 +15,7 @@ details. */
#include "perprocess.h"
#include "miscfuncs.h"
#include "cygmalloc.h"
-#ifndef MALLOC_DEBUG
#include <malloc.h>
-#endif
extern "C" struct mallinfo dlmallinfo ();
/* we provide these stubs to call into a user's
@@ -38,7 +33,7 @@ static bool internal_malloc_determined;
extern "C" void
free (void *p)
{
- malloc_printf ("(%p), called by %p", p, __builtin_return_address (0));
+ malloc_printf ("(%p), called by %p", p, caller_return_address ());
if (!use_internal)
user_data->free (p);
else
@@ -61,7 +56,8 @@ malloc (size_t size)
res = dlmalloc (size);
__malloc_unlock ();
}
- malloc_printf ("(%ld) = %p, called by %p", size, res, __builtin_return_address (0));
+ malloc_printf ("(%ld) = %p, called by %p", size, res,
+ caller_return_address ());
return res;
}
@@ -77,7 +73,8 @@ realloc (void *p, size_t size)
res = dlrealloc (p, size);
__malloc_unlock ();
}
- malloc_printf ("(%p, %ld) = %p, called by %p", p, size, res, __builtin_return_address (0));
+ malloc_printf ("(%p, %ld) = %p, called by %p", p, size, res,
+ caller_return_address ());
return res;
}
@@ -104,7 +101,8 @@ calloc (size_t nmemb, size_t size)
res = dlcalloc (nmemb, size);
__malloc_unlock ();
}
- malloc_printf ("(%ld, %ld) = %p, called by %p", nmemb, size, res, __builtin_return_address (0));
+ malloc_printf ("(%ld, %ld) = %p, called by %p", nmemb, size, res,
+ caller_return_address ());
return res;
}
@@ -123,8 +121,7 @@ posix_memalign (void **memptr, size_t alignment, size_t bytes)
__malloc_unlock ();
if (!res)
return ENOMEM;
- if (memptr)
- *memptr = res;
+ *memptr = res;
return 0;
}
@@ -241,7 +238,10 @@ mallinfo ()
{
struct mallinfo m;
if (!use_internal)
- set_errno (ENOSYS);
+ {
+ memset (&m, 0, sizeof m);
+ set_errno (ENOSYS);
+ }
else
{
__malloc_lock ();
@@ -276,7 +276,6 @@ malloc_init ()
{
mallock.init ("mallock");
-#ifndef MALLOC_DEBUG
/* Check if malloc is provided by application. If so, redirect all
calls to malloc/free/realloc to application provided. This may
happen if some other dll calls cygwin's malloc, but main code provides
@@ -291,7 +290,6 @@ malloc_init ()
malloc_printf ("using %s malloc", use_internal ? "internal" : "external");
internal_malloc_determined = true;
}
-#endif
}
extern "C" void
diff --git a/winsup/cygwin/math.h b/winsup/cygwin/math.h
new file mode 100644
index 000000000..d30ecf9e2
--- /dev/null
+++ b/winsup/cygwin/math.h
@@ -0,0 +1,43 @@
+#ifndef _LOCAL_MATH_H_
+#define _LOCAL_MATH_H_
+
+/* This header is required to define the types used by some of the
+ mingw-w64 based files in the math subdir. */
+
+typedef union __mingw_dbl_type_t {
+ double x;
+ unsigned long long val;
+ struct {
+ unsigned int low, high;
+ } lh;
+} __mingw_dbl_type_t;
+
+typedef union __mingw_flt_type_t {
+ float x;
+ unsigned int val;
+} __mingw_flt_type_t;
+
+typedef union __mingw_ldbl_type_t
+{
+ long double x;
+ struct {
+ unsigned int low, high;
+ int sign_exponent : 16;
+ int res1 : 16;
+ int res0 : 32;
+ } lh;
+} __mingw_ldbl_type_t;
+
+typedef union __mingw_fp_types_t
+{
+ long double *ld;
+ double *d;
+ float *f;
+ __mingw_ldbl_type_t *ldt;
+ __mingw_dbl_type_t *dt;
+ __mingw_flt_type_t *ft;
+} __mingw_fp_types_t;
+
+#include_next <math.h>
+
+#endif /* _LOCAL_MATH_H_ */
diff --git a/winsup/cygwin/math/DISCLAIMER.PD b/winsup/cygwin/math/DISCLAIMER.PD
new file mode 100644
index 000000000..6c2a7c3bb
--- /dev/null
+++ b/winsup/cygwin/math/DISCLAIMER.PD
@@ -0,0 +1,9 @@
+/**
+ * DISCLAIMER
+ * This file has no copyright assigned and is placed in the Public Domain.
+ *
+ * Its code is distributed in the hope that it will be useful but WITHOUT
+ * ANY WARRANTY. ALL WARRANTIES, EXPRESSED OR IMPLIED ARE HEREBY DISCLAIMED.
+ * This includes but is not limited to warranties of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.
+ */
diff --git a/winsup/cygwin/math/acosh.def.h b/winsup/cygwin/math/acosh.def.h
new file mode 100644
index 000000000..c039bd8eb
--- /dev/null
+++ b/winsup/cygwin/math/acosh.def.h
@@ -0,0 +1,70 @@
+/*
+ This Software is provided under the Zope Public License (ZPL) Version 2.1.
+
+ Copyright (c) 2009, 2010 by the mingw-w64 project
+
+ See the AUTHORS file for the list of contributors to the mingw-w64 project.
+
+ This license has been certified as open source. It has also been designated
+ as GPL compatible by the Free Software Foundation (FSF).
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions in source code must retain the accompanying copyright
+ notice, this list of conditions, and the following disclaimer.
+ 2. Redistributions in binary form must reproduce the accompanying
+ copyright notice, this list of conditions, and the following disclaimer
+ in the documentation and/or other materials provided with the
+ distribution.
+ 3. Names of the copyright holders must not be used to endorse or promote
+ products derived from this software without prior written permission
+ from the copyright holders.
+ 4. The right to distribute this software or to use it for any purpose does
+ not give you the right to use Servicemarks (sm) or Trademarks (tm) of
+ the copyright holders. Use of them is covered by separate agreement
+ with the copyright holders.
+ 5. If any files are modified, you must cause the modified files to carry
+ prominent notices stating that you changed the files and the date of
+ any change.
+
+ Disclaimer
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY EXPRESSED
+ 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 HOLDERS 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 "complex_internal.h"
+#include <errno.h>
+#include "fastmath.h"
+
+__FLT_TYPE
+__FLT_ABI(acosh) (__FLT_TYPE x)
+{
+ int x_class = fpclassify (x);
+ if (x_class == FP_NAN || x < __FLT_CST(1.0))
+ {
+ __FLT_RPT_DOMAIN ("acosh", x, 0.0, __FLT_NAN);
+ return __FLT_NAN;
+ }
+ else if (x_class == FP_INFINITE)
+ {
+ __FLT_RPT_DOMAIN ("acosh", x, 0.0, __FLT_NAN);
+ return __FLT_NAN;
+ }
+
+ if (x > __FLT_CST(0x1p32))
+ return __FLT_ABI (__fast_log) (x) + 6.9314718055994530941723E-1L;
+
+ return __FLT_ABI (__fast_log) (x +
+ __FLT_ABI (__fast_sqrt) ((x + __FLT_CST(1.0)) * (x - __FLT_CST(1.0))));
+}
+
diff --git a/winsup/cygwin/math/acoshl.c b/winsup/cygwin/math/acoshl.c
new file mode 100644
index 000000000..88f9f130e
--- /dev/null
+++ b/winsup/cygwin/math/acoshl.c
@@ -0,0 +1,46 @@
+/*
+ This Software is provided under the Zope Public License (ZPL) Version 2.1.
+
+ Copyright (c) 2009, 2010 by the mingw-w64 project
+
+ See the AUTHORS file for the list of contributors to the mingw-w64 project.
+
+ This license has been certified as open source. It has also been designated
+ as GPL compatible by the Free Software Foundation (FSF).
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions in source code must retain the accompanying copyright
+ notice, this list of conditions, and the following disclaimer.
+ 2. Redistributions in binary form must reproduce the accompanying
+ copyright notice, this list of conditions, and the following disclaimer
+ in the documentation and/or other materials provided with the
+ distribution.
+ 3. Names of the copyright holders must not be used to endorse or promote
+ products derived from this software without prior written permission
+ from the copyright holders.
+ 4. The right to distribute this software or to use it for any purpose does
+ not give you the right to use Servicemarks (sm) or Trademarks (tm) of
+ the copyright holders. Use of them is covered by separate agreement
+ with the copyright holders.
+ 5. If any files are modified, you must cause the modified files to carry
+ prominent notices stating that you changed the files and the date of
+ any change.
+
+ Disclaimer
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY EXPRESSED
+ 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 HOLDERS 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.
+*/
+
+#define _NEW_COMPLEX_LDOUBLE 1
+#include "acosh.def.h"
diff --git a/winsup/cygwin/math/acosl.c b/winsup/cygwin/math/acosl.c
new file mode 100644
index 000000000..511b5def2
--- /dev/null
+++ b/winsup/cygwin/math/acosl.c
@@ -0,0 +1,22 @@
+/**
+ * This file has no copyright assigned and is placed in the Public Domain.
+ * This file is part of the mingw-w64 runtime package.
+ * No warranty is given; refer to the file DISCLAIMER.PD within this package.
+ */
+long double acosl (long double x);
+
+long double acosl (long double x)
+{
+ long double res = 0.0L;
+
+ /* acosl = atanl (sqrtl(1 - x^2) / x) */
+ asm ( "fld %%st\n\t"
+ "fmul %%st(0)\n\t" /* x^2 */
+ "fld1\n\t"
+ "fsubp\n\t" /* 1 - x^2 */
+ "fsqrt\n\t" /* sqrtl (1 - x^2) */
+ "fxch %%st(1)\n\t"
+ "fpatan"
+ : "=t" (res) : "0" (x) : "st(1)");
+ return res;
+}
diff --git a/winsup/cygwin/math/asinhl.c b/winsup/cygwin/math/asinhl.c
new file mode 100644
index 000000000..bb2ca97b2
--- /dev/null
+++ b/winsup/cygwin/math/asinhl.c
@@ -0,0 +1,33 @@
+/**
+ * This file has no copyright assigned and is placed in the Public Domain.
+ * This file is part of the mingw-w64 runtime package.
+ * No warranty is given; refer to the file DISCLAIMER.PD within this package.
+ */
+#include <math.h>
+#include <errno.h>
+#include "fastmath.h"
+
+ /* asinh(x) = copysign(log(fabs(x) + sqrt(x * x + 1.0)), x) */
+long double asinhl(long double x)
+{
+ long double z;
+ if (!isfinite (x))
+ return x;
+
+ z = fabsl (x);
+
+ /* Avoid setting FPU underflow exception flag in x * x. */
+#if 0
+ if ( z < 0x1p-32)
+ return x;
+#endif
+
+ /* Use log1p to avoid cancellation with small x. Put
+ x * x in denom, so overflow is harmless.
+ asinh(x) = log1p (x + sqrt (x * x + 1.0) - 1.0)
+ = log1p (x + x * x / (sqrt (x * x + 1.0) + 1.0)) */
+
+ z = __fast_log1pl (z + z * z / (__fast_sqrtl (z * z + 1.0L) + 1.0L));
+
+ return ( x > 0.0 ? z : -z);
+}
diff --git a/winsup/cygwin/math/asinl.c b/winsup/cygwin/math/asinl.c
new file mode 100644
index 000000000..a4d8746be
--- /dev/null
+++ b/winsup/cygwin/math/asinl.c
@@ -0,0 +1,27 @@
+/**
+ * This file has no copyright assigned and is placed in the Public Domain.
+ * This file is part of the mingw-w64 runtime package.
+ * No warranty is given; refer to the file DISCLAIMER.PD within this package.
+ */
+/*
+ * Written by J.T. Conklin <jtc@netbsd.org>.
+ * Public domain.
+ * Adapted for long double type by Danny Smith <dannysmith@users.sourceforge.net>.
+ */
+
+/* asin = atan (x / sqrt(1 - x^2)) */
+long double asinl (long double x);
+
+long double asinl (long double x)
+{
+ long double res = 0.0L;
+
+ asm ( "fld %%st\n\t"
+ "fmul %%st(0)\n\t" /* x^2 */
+ "fld1\n\t"
+ "fsubp\n\t" /* 1 - x^2 */
+ "fsqrt\n\t" /* sqrt (1 - x^2) */
+ "fpatan"
+ : "=t" (res) : "0" (x) : "st(1)");
+ return res;
+}
diff --git a/winsup/cygwin/math/atan2l.c b/winsup/cygwin/math/atan2l.c
new file mode 100644
index 000000000..a32b097fb
--- /dev/null
+++ b/winsup/cygwin/math/atan2l.c
@@ -0,0 +1,14 @@
+/**
+ * This file has no copyright assigned and is placed in the Public Domain.
+ * This file is part of the mingw-w64 runtime package.
+ * No warranty is given; refer to the file DISCLAIMER.PD within this package.
+ */
+long double atan2l (long double y, long double x);
+
+long double
+atan2l (long double y, long double x)
+{
+ long double res = 0.0L;
+ asm ("fpatan" : "=t" (res) : "u" (y), "0" (x) : "st(1)");
+ return res;
+}
diff --git a/winsup/cygwin/math/atanhl.c b/winsup/cygwin/math/atanhl.c
new file mode 100644
index 000000000..59eb1bd91
--- /dev/null
+++ b/winsup/cygwin/math/atanhl.c
@@ -0,0 +1,34 @@
+/**
+ * This file has no copyright assigned and is placed in the Public Domain.
+ * This file is part of the mingw-w64 runtime package.
+ * No warranty is given; refer to the file DISCLAIMER.PD within this package.
+ */
+#include <math.h>
+#include <errno.h>
+#include "fastmath.h"
+
+/* atanh (x) = 0.5 * log ((1.0 + x)/(1.0 - x)) */
+long double atanhl (long double x)
+{
+ long double z;
+ if (isnan (x))
+ return x;
+ z = fabsl (x);
+ if (z == 1.0L)
+ {
+ errno = ERANGE;
+ return (x > 0 ? INFINITY : -INFINITY);
+ }
+ if ( z > 1.0L)
+ {
+ errno = EDOM;
+ return nanl("");
+ }
+ /* Rearrange formula to avoid precision loss for small x.
+ atanh(x) = 0.5 * log ((1.0 + x)/(1.0 - x))
+ = 0.5 * log1p ((1.0 + x)/(1.0 - x) - 1.0)
+ = 0.5 * log1p ((1.0 + x - 1.0 + x) /(1.0 - x))
+ = 0.5 * log1p ((2.0 * x ) / (1.0 - x)) */
+ z = 0.5L * __fast_log1pl ((z + z) / (1.0L - z));
+ return x >= 0 ? z : -z;
+}
diff --git a/winsup/cygwin/math/atanl.c b/winsup/cygwin/math/atanl.c
new file mode 100644
index 000000000..b85d05350
--- /dev/null
+++ b/winsup/cygwin/math/atanl.c
@@ -0,0 +1,17 @@
+/**
+ * This file has no copyright assigned and is placed in the Public Domain.
+ * This file is part of the mingw-w64 runtime package.
+ * No warranty is given; refer to the file DISCLAIMER.PD within this package.
+ */
+long double atanl (long double x);
+
+long double
+atanl (long double x)
+{
+ long double res = 0.0L;
+
+ asm ("fld1\n\t"
+ "fpatan"
+ : "=t" (res) : "0" (x));
+ return res;
+}
diff --git a/winsup/cygwin/math/cabs.def.h b/winsup/cygwin/math/cabs.def.h
new file mode 100644
index 000000000..b3ea09764
--- /dev/null
+++ b/winsup/cygwin/math/cabs.def.h
@@ -0,0 +1,49 @@
+/*
+ This Software is provided under the Zope Public License (ZPL) Version 2.1.
+
+ Copyright (c) 2009, 2010 by the mingw-w64 project
+
+ See the AUTHORS file for the list of contributors to the mingw-w64 project.
+
+ This license has been certified as open source. It has also been designated
+ as GPL compatible by the Free Software Foundation (FSF).
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions in source code must retain the accompanying copyright
+ notice, this list of conditions, and the following disclaimer.
+ 2. Redistributions in binary form must reproduce the accompanying
+ copyright notice, this list of conditions, and the following disclaimer
+ in the documentation and/or other materials provided with the
+ distribution.
+ 3. Names of the copyright holders must not be used to endorse or promote
+ products derived from this software without prior written permission
+ from the copyright holders.
+ 4. The right to distribute this software or to use it for any purpose does
+ not give you the right to use Servicemarks (sm) or Trademarks (tm) of
+ the copyright holders. Use of them is covered by separate agreement
+ with the copyright holders.
+ 5. If any files are modified, you must cause the modified files to carry
+ prominent notices stating that you changed the files and the date of
+ any change.
+
+ Disclaimer
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY EXPRESSED
+ 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 HOLDERS 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.
+*/
+
+__FLT_TYPE __cdecl
+__FLT_ABI(cabs) (__FLT_TYPE __complex__ z)
+{
+ return __FLT_ABI(hypot) (__real__ z, __imag__ z);
+}
diff --git a/winsup/cygwin/math/cabsl.c b/winsup/cygwin/math/cabsl.c
new file mode 100644
index 000000000..c750e877d
--- /dev/null
+++ b/winsup/cygwin/math/cabsl.c
@@ -0,0 +1,48 @@
+/*
+ This Software is provided under the Zope Public License (ZPL) Version 2.1.
+
+ Copyright (c) 2009, 2010 by the mingw-w64 project
+
+ See the AUTHORS file for the list of contributors to the mingw-w64 project.
+
+ This license has been certified as open source. It has also been designated
+ as GPL compatible by the Free Software Foundation (FSF).
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions in source code must retain the accompanying copyright
+ notice, this list of conditions, and the following disclaimer.
+ 2. Redistributions in binary form must reproduce the accompanying
+ copyright notice, this list of conditions, and the following disclaimer
+ in the documentation and/or other materials provided with the
+ distribution.
+ 3. Names of the copyright holders must not be used to endorse or promote
+ products derived from this software without prior written permission
+ from the copyright holders.
+ 4. The right to distribute this software or to use it for any purpose does
+ not give you the right to use Servicemarks (sm) or Trademarks (tm) of
+ the copyright holders. Use of them is covered by separate agreement
+ with the copyright holders.
+ 5. If any files are modified, you must cause the modified files to carry
+ prominent notices stating that you changed the files and the date of
+ any change.
+
+ Disclaimer
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY EXPRESSED
+ 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 HOLDERS 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.
+*/
+
+/* long double version of the functions. */
+#define _NEW_COMPLEX_LDOUBLE 1
+#include "complex_internal.h"
+#include "cabs.def.h"
diff --git a/winsup/cygwin/math/cacos.def.h b/winsup/cygwin/math/cacos.def.h
new file mode 100644
index 000000000..300faffac
--- /dev/null
+++ b/winsup/cygwin/math/cacos.def.h
@@ -0,0 +1,57 @@
+/*
+ This Software is provided under the Zope Public License (ZPL) Version 2.1.
+
+ Copyright (c) 2009, 2010 by the mingw-w64 project
+
+ See the AUTHORS file for the list of contributors to the mingw-w64 project.
+
+ This license has been certified as open source. It has also been designated
+ as GPL compatible by the Free Software Foundation (FSF).
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions in source code must retain the accompanying copyright
+ notice, this list of conditions, and the following disclaimer.
+ 2. Redistributions in binary form must reproduce the accompanying
+ copyright notice, this list of conditions, and the following disclaimer
+ in the documentation and/or other materials provided with the
+ distribution.
+ 3. Names of the copyright holders must not be used to endorse or promote
+ products derived from this software without prior written permission
+ from the copyright holders.
+ 4. The right to distribute this software or to use it for any purpose does
+ not give you the right to use Servicemarks (sm) or Trademarks (tm) of
+ the copyright holders. Use of them is covered by separate agreement
+ with the copyright holders.
+ 5. If any files are modified, you must cause the modified files to carry
+ prominent notices stating that you changed the files and the date of
+ any change.
+
+ Disclaimer
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY EXPRESSED
+ 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 HOLDERS 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.
+*/
+
+__FLT_TYPE __complex__ __cdecl
+__FLT_ABI(cacos) (__FLT_TYPE __complex__ z)
+{
+ __complex__ __FLT_TYPE x;
+ __complex__ __FLT_TYPE ret;
+
+ x = __FLT_ABI(casin) (z);
+
+ __real__ ret = (__FLT_TYPE) __FLT_PI_2 - __real__ x;
+ __imag__ ret = -__imag__ x;
+
+ return ret;
+}
diff --git a/winsup/cygwin/math/cacosh.def.h b/winsup/cygwin/math/cacosh.def.h
new file mode 100644
index 000000000..f4ea2da07
--- /dev/null
+++ b/winsup/cygwin/math/cacosh.def.h
@@ -0,0 +1,100 @@
+/*
+ This Software is provided under the Zope Public License (ZPL) Version 2.1.
+
+ Copyright (c) 2009, 2010 by the mingw-w64 project
+
+ See the AUTHORS file for the list of contributors to the mingw-w64 project.
+
+ This license has been certified as open source. It has also been designated
+ as GPL compatible by the Free Software Foundation (FSF).
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions in source code must retain the accompanying copyright
+ notice, this list of conditions, and the following disclaimer.
+ 2. Redistributions in binary form must reproduce the accompanying
+ copyright notice, this list of conditions, and the following disclaimer
+ in the documentation and/or other materials provided with the
+ distribution.
+ 3. Names of the copyright holders must not be used to endorse or promote
+ products derived from this software without prior written permission
+ from the copyright holders.
+ 4. The right to distribute this software or to use it for any purpose does
+ not give you the right to use Servicemarks (sm) or Trademarks (tm) of
+ the copyright holders. Use of them is covered by separate agreement
+ with the copyright holders.
+ 5. If any files are modified, you must cause the modified files to carry
+ prominent notices stating that you changed the files and the date of
+ any change.
+
+ Disclaimer
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY EXPRESSED
+ 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 HOLDERS 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.
+*/
+
+__FLT_TYPE __complex__ __cdecl
+__FLT_ABI(cacosh) (__FLT_TYPE __complex__ z)
+{
+ __complex__ __FLT_TYPE ret;
+ __complex__ __FLT_TYPE x;
+ int r_class = fpclassify (__real__ z);
+ int i_class = fpclassify (__imag__ z);
+
+ if (i_class == FP_INFINITE)
+ {
+ __real__ ret = __FLT_HUGE_VAL;
+ __imag__ ret = (r_class == FP_NAN ? __FLT_NAN : __FLT_ABI(copysign) (
+ (r_class == FP_INFINITE ? (__real__ z < __FLT_CST(0.0) ? __FLT_PI_3_4 : __FLT_PI_4) : __FLT_PI_2), __imag__ z));
+ return ret;
+ }
+
+ if (r_class == FP_INFINITE)
+ {
+ __real__ ret = __FLT_HUGE_VAL;
+ __imag__ ret = ((i_class != FP_NAN && i_class != FP_INFINITE)
+ ? __FLT_ABI(copysign) (signbit (__real__ z) ? __FLT_PI : __FLT_CST(0.0), __imag__ z) : __FLT_NAN);
+ return ret;
+ }
+
+ if (r_class == FP_NAN || i_class == FP_NAN)
+ {
+ __real__ ret = __FLT_NAN;
+ __imag__ ret = __FLT_NAN;
+ return ret;
+ }
+
+ if (r_class == FP_ZERO && i_class == FP_ZERO)
+ {
+ __real__ ret = __FLT_CST(0.0);
+ __imag__ ret = __FLT_ABI(copysign) (__FLT_PI_2, __imag__ z);
+ return ret;
+ }
+
+ __real__ x = (__real__ z - __imag__ z) * (__real__ z + __imag__ z) - __FLT_CST(1.0);
+ __imag__ x = __FLT_CST(2.0) * __real__ z * __imag__ z;
+
+ x = __FLT_ABI(csqrt) (x);
+
+ if (__real__ z < __FLT_CST(0.0))
+ x = -x;
+
+ __real__ x += __real__ z;
+ __imag__ x += __imag__ z;
+
+ ret = __FLT_ABI(clog) (x);
+
+ if (__real__ ret < __FLT_CST(0.0))
+ ret = -ret;
+
+ return ret;
+}
diff --git a/winsup/cygwin/math/cacosl.c b/winsup/cygwin/math/cacosl.c
new file mode 100644
index 000000000..7a8df652d
--- /dev/null
+++ b/winsup/cygwin/math/cacosl.c
@@ -0,0 +1,50 @@
+/*
+ This Software is provided under the Zope Public License (ZPL) Version 2.1.
+
+ Copyright (c) 2009, 2010 by the mingw-w64 project
+
+ See the AUTHORS file for the list of contributors to the mingw-w64 project.
+
+ This license has been certified as open source. It has also been designated
+ as GPL compatible by the Free Software Foundation (FSF).
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions in source code must retain the accompanying copyright
+ notice, this list of conditions, and the following disclaimer.
+ 2. Redistributions in binary form must reproduce the accompanying
+ copyright notice, this list of conditions, and the following disclaimer
+ in the documentation and/or other materials provided with the
+ distribution.
+ 3. Names of the copyright holders must not be used to endorse or promote
+ products derived from this software without prior written permission
+ from the copyright holders.
+ 4. The right to distribute this software or to use it for any purpose does
+ not give you the right to use Servicemarks (sm) or Trademarks (tm) of
+ the copyright holders. Use of them is covered by separate agreement
+ with the copyright holders.
+ 5. If any files are modified, you must cause the modified files to carry
+ prominent notices stating that you changed the files and the date of
+ any change.
+
+ Disclaimer
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY EXPRESSED
+ 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 HOLDERS 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.
+*/
+
+/* long double version of the functions. */
+#define _NEW_COMPLEX_LDOUBLE 1
+#include "complex_internal.h"
+
+#include "cacosh.def.h"
+#include "cacos.def.h"
diff --git a/winsup/cygwin/math/carg.def.h b/winsup/cygwin/math/carg.def.h
new file mode 100644
index 000000000..2ccf84189
--- /dev/null
+++ b/winsup/cygwin/math/carg.def.h
@@ -0,0 +1,49 @@
+/*
+ This Software is provided under the Zope Public License (ZPL) Version 2.1.
+
+ Copyright (c) 2009, 2010 by the mingw-w64 project
+
+ See the AUTHORS file for the list of contributors to the mingw-w64 project.
+
+ This license has been certified as open source. It has also been designated
+ as GPL compatible by the Free Software Foundation (FSF).
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions in source code must retain the accompanying copyright
+ notice, this list of conditions, and the following disclaimer.
+ 2. Redistributions in binary form must reproduce the accompanying
+ copyright notice, this list of conditions, and the following disclaimer
+ in the documentation and/or other materials provided with the
+ distribution.
+ 3. Names of the copyright holders must not be used to endorse or promote
+ products derived from this software without prior written permission
+ from the copyright holders.
+ 4. The right to distribute this software or to use it for any purpose does
+ not give you the right to use Servicemarks (sm) or Trademarks (tm) of
+ the copyright holders. Use of them is covered by separate agreement
+ with the copyright holders.
+ 5. If any files are modified, you must cause the modified files to carry
+ prominent notices stating that you changed the files and the date of
+ any change.
+
+ Disclaimer
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY EXPRESSED
+ 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 HOLDERS 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.
+*/
+
+__FLT_TYPE __cdecl
+__FLT_ABI(carg) (__FLT_TYPE __complex__ z)
+{
+ return __FLT_ABI(atan2) (__imag__ z, __real__ z);
+}
diff --git a/winsup/cygwin/math/cargl.c b/winsup/cygwin/math/cargl.c
new file mode 100644
index 000000000..e70f580ea
--- /dev/null
+++ b/winsup/cygwin/math/cargl.c
@@ -0,0 +1,48 @@
+/*
+ This Software is provided under the Zope Public License (ZPL) Version 2.1.
+
+ Copyright (c) 2009, 2010 by the mingw-w64 project
+
+ See the AUTHORS file for the list of contributors to the mingw-w64 project.
+
+ This license has been certified as open source. It has also been designated
+ as GPL compatible by the Free Software Foundation (FSF).
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions in source code must retain the accompanying copyright
+ notice, this list of conditions, and the following disclaimer.
+ 2. Redistributions in binary form must reproduce the accompanying
+ copyright notice, this list of conditions, and the following disclaimer
+ in the documentation and/or other materials provided with the
+ distribution.
+ 3. Names of the copyright holders must not be used to endorse or promote
+ products derived from this software without prior written permission
+ from the copyright holders.
+ 4. The right to distribute this software or to use it for any purpose does
+ not give you the right to use Servicemarks (sm) or Trademarks (tm) of
+ the copyright holders. Use of them is covered by separate agreement
+ with the copyright holders.
+ 5. If any files are modified, you must cause the modified files to carry
+ prominent notices stating that you changed the files and the date of
+ any change.
+
+ Disclaimer
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY EXPRESSED
+ 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 HOLDERS 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.
+*/
+
+/* long double version of the functions. */
+#define _NEW_COMPLEX_LDOUBLE 1
+#include "complex_internal.h"
+#include "carg.def.h"
diff --git a/winsup/cygwin/math/casin.def.h b/winsup/cygwin/math/casin.def.h
new file mode 100644
index 000000000..808c1bef0
--- /dev/null
+++ b/winsup/cygwin/math/casin.def.h
@@ -0,0 +1,61 @@
+/*
+ This Software is provided under the Zope Public License (ZPL) Version 2.1.
+
+ Copyright (c) 2009, 2010 by the mingw-w64 project
+
+ See the AUTHORS file for the list of contributors to the mingw-w64 project.
+
+ This license has been certified as open source. It has also been designated
+ as GPL compatible by the Free Software Foundation (FSF).
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions in source code must retain the accompanying copyright
+ notice, this list of conditions, and the following disclaimer.
+ 2. Redistributions in binary form must reproduce the accompanying
+ copyright notice, this list of conditions, and the following disclaimer
+ in the documentation and/or other materials provided with the
+ distribution.
+ 3. Names of the copyright holders must not be used to endorse or promote
+ products derived from this software without prior written permission
+ from the copyright holders.
+ 4. The right to distribute this software or to use it for any purpose does
+ not give you the right to use Servicemarks (sm) or Trademarks (tm) of
+ the copyright holders. Use of them is covered by separate agreement
+ with the copyright holders.
+ 5. If any files are modified, you must cause the modified files to carry
+ prominent notices stating that you changed the files and the date of
+ any change.
+
+ Disclaimer
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY EXPRESSED
+ 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 HOLDERS 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.
+*/
+
+__FLT_TYPE __complex__ __cdecl
+__FLT_ABI(casin) (__FLT_TYPE __complex__ z)
+{
+ /* Annex G.6: casin(z) = -i casinh (iz) */
+ __complex__ __FLT_TYPE ret;
+ __complex__ __FLT_TYPE x;
+
+ __real__ x = -__imag__ z;
+ __imag__ x = __real__ z;
+
+ x = __FLT_ABI(casinh) (x);
+
+ __real__ ret = __imag__ x;
+ __imag__ ret = -__real__ x;
+
+ return ret;
+}
diff --git a/winsup/cygwin/math/casinh.def.h b/winsup/cygwin/math/casinh.def.h
new file mode 100644
index 000000000..050d885a0
--- /dev/null
+++ b/winsup/cygwin/math/casinh.def.h
@@ -0,0 +1,99 @@
+/*
+ This Software is provided under the Zope Public License (ZPL) Version 2.1.
+
+ Copyright (c) 2009, 2010 by the mingw-w64 project
+
+ See the AUTHORS file for the list of contributors to the mingw-w64 project.
+
+ This license has been certified as open source. It has also been designated
+ as GPL compatible by the Free Software Foundation (FSF).
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions in source code must retain the accompanying copyright
+ notice, this list of conditions, and the following disclaimer.
+ 2. Redistributions in binary form must reproduce the accompanying
+ copyright notice, this list of conditions, and the following disclaimer
+ in the documentation and/or other materials provided with the
+ distribution.
+ 3. Names of the copyright holders must not be used to endorse or promote
+ products derived from this software without prior written permission
+ from the copyright holders.
+ 4. The right to distribute this software or to use it for any purpose does
+ not give you the right to use Servicemarks (sm) or Trademarks (tm) of
+ the copyright holders. Use of them is covered by separate agreement
+ with the copyright holders.
+ 5. If any files are modified, you must cause the modified files to carry
+ prominent notices stating that you changed the files and the date of
+ any change.
+
+ Disclaimer
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY EXPRESSED
+ 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 HOLDERS 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.
+*/
+
+__FLT_TYPE __complex__ __cdecl
+__FLT_ABI(casinh) (__FLT_TYPE __complex__ z)
+{
+ __complex__ __FLT_TYPE ret;
+ __complex__ __FLT_TYPE x;
+ int r_class = fpclassify (__real__ z);
+ int i_class = fpclassify (__imag__ z);
+
+ if (i_class == FP_INFINITE)
+ {
+ __real__ ret = __FLT_ABI(copysign) (__FLT_HUGE_VAL, __real__ z);
+ __imag__ ret = (r_class == FP_NAN
+ ? __FLT_NAN
+ : (__FLT_ABI(copysign) ((r_class != FP_NAN && r_class != FP_INFINITE) ? __FLT_PI_2 : __FLT_PI_4, __imag__ z)));
+ return ret;
+ }
+
+ if (r_class == FP_INFINITE)
+ {
+ __real__ ret = __real__ z;
+ __imag__ ret = (i_class != FP_NAN
+ ? __FLT_ABI(copysign) (__FLT_CST(0.0), __imag__ z)
+ : __FLT_NAN);
+ return ret;
+ }
+
+ if (r_class == FP_NAN)
+ {
+ __real__ ret = __real__ z;
+ __imag__ ret = (i_class == FP_ZERO
+ ? __FLT_ABI(copysign) (__FLT_CST(0.0), __imag__ z)
+ : __FLT_NAN);
+ return ret;
+ }
+
+ if (i_class == FP_NAN)
+ {
+ __real__ ret = __FLT_NAN;
+ __imag__ ret = __FLT_NAN;
+ return ret;
+ }
+
+ if (r_class == FP_ZERO && i_class == FP_ZERO)
+ return z;
+
+ __real__ x = (__real__ z - __imag__ z) * (__real__ z + __imag__ z) + __FLT_CST(1.0);
+ __imag__ x = __FLT_CST(2.0) * __real__ z * __imag__ z;
+
+ x = __FLT_ABI(csqrt) (x);
+
+ __real__ x += __real__ z;
+ __imag__ x += __imag__ z;
+
+ return __FLT_ABI(clog) (x);
+}
diff --git a/winsup/cygwin/math/casinl.c b/winsup/cygwin/math/casinl.c
new file mode 100644
index 000000000..1d7e24785
--- /dev/null
+++ b/winsup/cygwin/math/casinl.c
@@ -0,0 +1,50 @@
+/*
+ This Software is provided under the Zope Public License (ZPL) Version 2.1.
+
+ Copyright (c) 2009, 2010 by the mingw-w64 project
+
+ See the AUTHORS file for the list of contributors to the mingw-w64 project.
+
+ This license has been certified as open source. It has also been designated
+ as GPL compatible by the Free Software Foundation (FSF).
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions in source code must retain the accompanying copyright
+ notice, this list of conditions, and the following disclaimer.
+ 2. Redistributions in binary form must reproduce the accompanying
+ copyright notice, this list of conditions, and the following disclaimer
+ in the documentation and/or other materials provided with the
+ distribution.
+ 3. Names of the copyright holders must not be used to endorse or promote
+ products derived from this software without prior written permission
+ from the copyright holders.
+ 4. The right to distribute this software or to use it for any purpose does
+ not give you the right to use Servicemarks (sm) or Trademarks (tm) of
+ the copyright holders. Use of them is covered by separate agreement
+ with the copyright holders.
+ 5. If any files are modified, you must cause the modified files to carry
+ prominent notices stating that you changed the files and the date of
+ any change.
+
+ Disclaimer
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY EXPRESSED
+ 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 HOLDERS 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.
+*/
+
+/* long double version of the functions. */
+#define _NEW_COMPLEX_LDOUBLE 1
+#include "complex_internal.h"
+
+#include "casinh.def.h"
+#include "casin.def.h"
diff --git a/winsup/cygwin/math/catan.def.h b/winsup/cygwin/math/catan.def.h
new file mode 100644
index 000000000..19db6b78b
--- /dev/null
+++ b/winsup/cygwin/math/catan.def.h
@@ -0,0 +1,61 @@
+/*
+ This Software is provided under the Zope Public License (ZPL) Version 2.1.
+
+ Copyright (c) 2009, 2010 by the mingw-w64 project
+
+ See the AUTHORS file for the list of contributors to the mingw-w64 project.
+
+ This license has been certified as open source. It has also been designated
+ as GPL compatible by the Free Software Foundation (FSF).
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions in source code must retain the accompanying copyright
+ notice, this list of conditions, and the following disclaimer.
+ 2. Redistributions in binary form must reproduce the accompanying
+ copyright notice, this list of conditions, and the following disclaimer
+ in the documentation and/or other materials provided with the
+ distribution.
+ 3. Names of the copyright holders must not be used to endorse or promote
+ products derived from this software without prior written permission
+ from the copyright holders.
+ 4. The right to distribute this software or to use it for any purpose does
+ not give you the right to use Servicemarks (sm) or Trademarks (tm) of
+ the copyright holders. Use of them is covered by separate agreement
+ with the copyright holders.
+ 5. If any files are modified, you must cause the modified files to carry
+ prominent notices stating that you changed the files and the date of
+ any change.
+
+ Disclaimer
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY EXPRESSED
+ 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 HOLDERS 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.
+*/
+
+__FLT_TYPE __complex__ __cdecl
+__FLT_ABI(catan) (__FLT_TYPE __complex__ z)
+{
+ /* Annex G.6: catan(z) = -i catanh (iz) */
+ __complex__ __FLT_TYPE ret;
+ __complex__ __FLT_TYPE x;
+
+ __real__ x = -__imag__ z;
+ __imag__ x = __real__ z;
+
+ x = __FLT_ABI(catanh) (x);
+
+ __real__ ret = __imag__ x;
+ __imag__ ret = -__real__ x;
+
+ return ret;
+}
diff --git a/winsup/cygwin/math/catanh.def.h b/winsup/cygwin/math/catanh.def.h
new file mode 100644
index 000000000..68949d139
--- /dev/null
+++ b/winsup/cygwin/math/catanh.def.h
@@ -0,0 +1,93 @@
+/*
+ This Software is provided under the Zope Public License (ZPL) Version 2.1.
+
+ Copyright (c) 2009, 2010 by the mingw-w64 project
+
+ See the AUTHORS file for the list of contributors to the mingw-w64 project.
+
+ This license has been certified as open source. It has also been designated
+ as GPL compatible by the Free Software Foundation (FSF).
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions in source code must retain the accompanying copyright
+ notice, this list of conditions, and the following disclaimer.
+ 2. Redistributions in binary form must reproduce the accompanying
+ copyright notice, this list of conditions, and the following disclaimer
+ in the documentation and/or other materials provided with the
+ distribution.
+ 3. Names of the copyright holders must not be used to endorse or promote
+ products derived from this software without prior written permission
+ from the copyright holders.
+ 4. The right to distribute this software or to use it for any purpose does
+ not give you the right to use Servicemarks (sm) or Trademarks (tm) of
+ the copyright holders. Use of them is covered by separate agreement
+ with the copyright holders.
+ 5. If any files are modified, you must cause the modified files to carry
+ prominent notices stating that you changed the files and the date of
+ any change.
+
+ Disclaimer
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY EXPRESSED
+ 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 HOLDERS 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.
+*/
+
+__FLT_TYPE __complex__ __cdecl
+__FLT_ABI(catanh) (__FLT_TYPE __complex__ z)
+{
+ __complex__ __FLT_TYPE ret;
+ __FLT_TYPE i2, n, d;
+ int r_class = fpclassify (__real__ z);
+ int i_class = fpclassify (__imag__ z);
+
+ if (r_class == FP_INFINITE || r_class == FP_NAN || i_class == FP_INFINITE || i_class == FP_NAN)
+ {
+ if (i_class == FP_INFINITE)
+ {
+ __real__ ret = __FLT_ABI(copysign) (__FLT_CST(0.0), __real__ z);
+ __imag__ ret = __FLT_ABI(copysign) (__FLT_PI_2, __imag__ z);
+ return ret;
+ }
+
+ if (r_class == FP_INFINITE || r_class == FP_ZERO)
+ {
+ __real__ ret = __FLT_ABI(copysign) (__FLT_CST(0.0), __real__ z);
+ __imag__ ret = ((i_class != FP_NAN && i_class != FP_INFINITE)
+ ? __FLT_ABI(copysign) (__FLT_PI_2, __imag__ z) : __FLT_NAN);
+ return ret;
+ }
+
+ __real__ ret = __FLT_NAN;
+ __imag__ ret = __FLT_NAN;
+ return ret;
+ }
+
+ if (r_class == FP_ZERO && i_class == FP_ZERO)
+ return z;
+
+ i2 = __imag__ z * __imag__ z;
+
+ n = __FLT_CST(1.0) + __real__ z;
+ n = i2 + n * n;
+
+ d = __FLT_CST(1.0) - __real__ z;
+ d = i2 + d * d;
+
+ __real__ ret = __FLT_CST(0.25) * (__FLT_ABI(log) (n) - __FLT_ABI(log) (d));
+
+ d = 1 - __real__ z * __real__ z - i2;
+
+ __imag__ ret = __FLT_CST(0.5) * __FLT_ABI(atan2) (__FLT_CST(2.0) * __imag__ z, d);
+
+ return ret;
+}
diff --git a/winsup/cygwin/math/catanl.c b/winsup/cygwin/math/catanl.c
new file mode 100644
index 000000000..9c1ccdfcb
--- /dev/null
+++ b/winsup/cygwin/math/catanl.c
@@ -0,0 +1,50 @@
+/*
+ This Software is provided under the Zope Public License (ZPL) Version 2.1.
+
+ Copyright (c) 2009, 2010 by the mingw-w64 project
+
+ See the AUTHORS file for the list of contributors to the mingw-w64 project.
+
+ This license has been certified as open source. It has also been designated
+ as GPL compatible by the Free Software Foundation (FSF).
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions in source code must retain the accompanying copyright
+ notice, this list of conditions, and the following disclaimer.
+ 2. Redistributions in binary form must reproduce the accompanying
+ copyright notice, this list of conditions, and the following disclaimer
+ in the documentation and/or other materials provided with the
+ distribution.
+ 3. Names of the copyright holders must not be used to endorse or promote
+ products derived from this software without prior written permission
+ from the copyright holders.
+ 4. The right to distribute this software or to use it for any purpose does
+ not give you the right to use Servicemarks (sm) or Trademarks (tm) of
+ the copyright holders. Use of them is covered by separate agreement
+ with the copyright holders.
+ 5. If any files are modified, you must cause the modified files to carry
+ prominent notices stating that you changed the files and the date of
+ any change.
+
+ Disclaimer
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY EXPRESSED
+ 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 HOLDERS 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.
+*/
+
+/* long double version of the functions. */
+#define _NEW_COMPLEX_LDOUBLE 1
+#include "complex_internal.h"
+
+#include "catanh.def.h"
+#include "catan.def.h"
diff --git a/winsup/cygwin/math/cbrtl.c b/winsup/cygwin/math/cbrtl.c
new file mode 100644
index 000000000..95074e964
--- /dev/null
+++ b/winsup/cygwin/math/cbrtl.c
@@ -0,0 +1,80 @@
+/**
+ * This file has no copyright assigned and is placed in the Public Domain.
+ * This file is part of the mingw-w64 runtime package.
+ * No warranty is given; refer to the file DISCLAIMER.PD within this package.
+ */
+#include <math.h>
+
+static const long double CBRT2 = 1.2599210498948731647672L;
+static const long double CBRT4 = 1.5874010519681994747517L;
+static const long double CBRT2I = 0.79370052598409973737585L;
+static const long double CBRT4I = 0.62996052494743658238361L;
+
+long double cbrtl(long double x)
+{
+ int e, rem, sign;
+ long double z;
+
+ if (!isfinite (x) || x == 0.0L)
+ return (x);
+
+ if (x > 0)
+ sign = 1;
+ else
+ {
+ sign = -1;
+ x = -x;
+ }
+
+ z = x;
+ /* extract power of 2, leaving
+ * mantissa between 0.5 and 1
+ */
+ x = frexpl(x, &e);
+
+ /* Approximate cube root of number between .5 and 1,
+ * peak relative error = 1.2e-6
+ */
+ x = (((( 1.3584464340920900529734e-1L * x
+ - 6.3986917220457538402318e-1L) * x
+ + 1.2875551670318751538055e0L) * x
+ - 1.4897083391357284957891e0L) * x
+ + 1.3304961236013647092521e0L) * x
+ + 3.7568280825958912391243e-1L;
+
+ /* exponent divided by 3 */
+ if (e >= 0)
+ {
+ rem = e;
+ e /= 3;
+ rem -= 3*e;
+ if (rem == 1)
+ x *= CBRT2;
+ else if (rem == 2)
+ x *= CBRT4;
+ }
+ else
+ { /* argument less than 1 */
+ e = -e;
+ rem = e;
+ e /= 3;
+ rem -= 3*e;
+ if (rem == 1)
+ x *= CBRT2I;
+ else if (rem == 2)
+ x *= CBRT4I;
+ e = -e;
+ }
+
+ /* multiply by power of 2 */
+ x = ldexpl(x, e);
+
+ /* Newton iteration */
+
+ x -= ( x - (z/(x*x)) )*0.3333333333333333333333L;
+ x -= ( x - (z/(x*x)) )*0.3333333333333333333333L;
+
+ if (sign < 0)
+ x = -x;
+ return (x);
+}
diff --git a/winsup/cygwin/math/ccos.def.h b/winsup/cygwin/math/ccos.def.h
new file mode 100644
index 000000000..2e7472cd9
--- /dev/null
+++ b/winsup/cygwin/math/ccos.def.h
@@ -0,0 +1,54 @@
+/*
+ This Software is provided under the Zope Public License (ZPL) Version 2.1.
+
+ Copyright (c) 2009, 2010 by the mingw-w64 project
+
+ See the AUTHORS file for the list of contributors to the mingw-w64 project.
+
+ This license has been certified as open source. It has also been designated
+ as GPL compatible by the Free Software Foundation (FSF).
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions in source code must retain the accompanying copyright
+ notice, this list of conditions, and the following disclaimer.
+ 2. Redistributions in binary form must reproduce the accompanying
+ copyright notice, this list of conditions, and the following disclaimer
+ in the documentation and/or other materials provided with the
+ distribution.
+ 3. Names of the copyright holders must not be used to endorse or promote
+ products derived from this software without prior written permission
+ from the copyright holders.
+ 4. The right to distribute this software or to use it for any purpose does
+ not give you the right to use Servicemarks (sm) or Trademarks (tm) of
+ the copyright holders. Use of them is covered by separate agreement
+ with the copyright holders.
+ 5. If any files are modified, you must cause the modified files to carry
+ prominent notices stating that you changed the files and the date of
+ any change.
+
+ Disclaimer
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY EXPRESSED
+ 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 HOLDERS 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.
+*/
+
+__FLT_TYPE __complex__ __cdecl
+__FLT_ABI(ccos) (__FLT_TYPE __complex__ z)
+{
+ /* Annex G.6, ccos(z) = ccosh(iz) */
+ __complex__ __FLT_TYPE x;
+ __real__ x = -__imag__ z;
+ __imag__ x = __real__ z;
+
+ return __FLT_ABI(ccosh) (x);
+}
diff --git a/winsup/cygwin/math/ccosh.def.h b/winsup/cygwin/math/ccosh.def.h
new file mode 100644
index 000000000..c18d657bf
--- /dev/null
+++ b/winsup/cygwin/math/ccosh.def.h
@@ -0,0 +1,95 @@
+/*
+ This Software is provided under the Zope Public License (ZPL) Version 2.1.
+
+ Copyright (c) 2009, 2010 by the mingw-w64 project
+
+ See the AUTHORS file for the list of contributors to the mingw-w64 project.
+
+ This license has been certified as open source. It has also been designated
+ as GPL compatible by the Free Software Foundation (FSF).
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions in source code must retain the accompanying copyright
+ notice, this list of conditions, and the following disclaimer.
+ 2. Redistributions in binary form must reproduce the accompanying
+ copyright notice, this list of conditions, and the following disclaimer
+ in the documentation and/or other materials provided with the
+ distribution.
+ 3. Names of the copyright holders must not be used to endorse or promote
+ products derived from this software without prior written permission
+ from the copyright holders.
+ 4. The right to distribute this software or to use it for any purpose does
+ not give you the right to use Servicemarks (sm) or Trademarks (tm) of
+ the copyright holders. Use of them is covered by separate agreement
+ with the copyright holders.
+ 5. If any files are modified, you must cause the modified files to carry
+ prominent notices stating that you changed the files and the date of
+ any change.
+
+ Disclaimer
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY EXPRESSED
+ 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 HOLDERS 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.
+*/
+
+__FLT_TYPE __complex__ __cdecl
+__FLT_ABI(ccosh) (__FLT_TYPE __complex__ z)
+{
+ __complex__ __FLT_TYPE ret;
+ __FLT_TYPE s_x, c_x;
+ int r_class = fpclassify (__real__ z);
+ int i_class = fpclassify (__imag__ z);
+
+ if (r_class == FP_NAN)
+ {
+ __real__ ret = __FLT_NAN;
+ __imag__ ret = __imag__ z == __FLT_CST(0.0) ? __imag__ z : __FLT_NAN;
+ return ret;
+ }
+
+ if (r_class == FP_INFINITE)
+ {
+ if (i_class == FP_ZERO)
+ {
+ __real__ ret = __FLT_HUGE_VAL;
+ __imag__ ret = __imag__ z * __FLT_ABI(copysign) (__FLT_CST(1.0), __real__ z);
+ return ret;
+ }
+
+ if (i_class == FP_NAN || i_class == FP_INFINITE)
+ {
+ __real__ ret = __FLT_HUGE_VAL;
+ __imag__ ret = __FLT_NAN + __FLT_NAN;
+ return ret;
+ }
+
+ __FLT_ABI(sincos) (__imag__ z, &s_x, &c_x);
+
+ __real__ ret = __FLT_ABI(copysign) (__FLT_HUGE_VAL, c_x);
+ __imag__ ret = (__FLT_ABI(copysign) (__FLT_HUGE_VAL, s_x) * __FLT_ABI(copysign) (__FLT_CST(1.0), __real__ z));
+ return ret;
+ }
+
+ if (i_class == FP_NAN || i_class == FP_INFINITE)
+ {
+ __imag__ ret = __real__ z == __FLT_CST(0.0) ? __FLT_CST(0.0) : __FLT_NAN;
+ __real__ ret = __FLT_NAN + __FLT_NAN;
+ return ret;
+ }
+
+ __FLT_ABI(sincos) (__imag__ z, &s_x, &c_x);
+
+ __real__ ret = __FLT_ABI(cosh) (__real__ z) * c_x;
+ __imag__ ret = __FLT_ABI(sinh) (__real__ z) * s_x;
+ return ret;
+}
diff --git a/winsup/cygwin/math/ccosl.c b/winsup/cygwin/math/ccosl.c
new file mode 100644
index 000000000..594a4d1de
--- /dev/null
+++ b/winsup/cygwin/math/ccosl.c
@@ -0,0 +1,50 @@
+/*
+ This Software is provided under the Zope Public License (ZPL) Version 2.1.
+
+ Copyright (c) 2009, 2010 by the mingw-w64 project
+
+ See the AUTHORS file for the list of contributors to the mingw-w64 project.
+
+ This license has been certified as open source. It has also been designated
+ as GPL compatible by the Free Software Foundation (FSF).
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions in source code must retain the accompanying copyright
+ notice, this list of conditions, and the following disclaimer.
+ 2. Redistributions in binary form must reproduce the accompanying
+ copyright notice, this list of conditions, and the following disclaimer
+ in the documentation and/or other materials provided with the
+ distribution.
+ 3. Names of the copyright holders must not be used to endorse or promote
+ products derived from this software without prior written permission
+ from the copyright holders.
+ 4. The right to distribute this software or to use it for any purpose does
+ not give you the right to use Servicemarks (sm) or Trademarks (tm) of
+ the copyright holders. Use of them is covered by separate agreement
+ with the copyright holders.
+ 5. If any files are modified, you must cause the modified files to carry
+ prominent notices stating that you changed the files and the date of
+ any change.
+
+ Disclaimer
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY EXPRESSED
+ 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 HOLDERS 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.
+*/
+
+/* long double version of the functions. */
+#define _NEW_COMPLEX_LDOUBLE 1
+#include "complex_internal.h"
+
+#include "ccosh.def.h"
+#include "ccos.def.h"
diff --git a/winsup/cygwin/math/ceil.S b/winsup/cygwin/math/ceil.S
new file mode 100644
index 000000000..636df1e30
--- /dev/null
+++ b/winsup/cygwin/math/ceil.S
@@ -0,0 +1,124 @@
+/**
+ * This file has no copyright assigned and is placed in the Public Domain.
+ * This file is part of the mingw-w64 runtime package.
+ * No warranty is given; refer to the file DISCLAIMER.PD within this package.
+ */
+#include <_mingw_mac.h>
+
+ .file "ceil.S"
+ .text
+ .align 4
+ .globl __MINGW_USYMBOL(ceil)
+ .def __MINGW_USYMBOL(ceil); .scl 2; .type 32; .endef
+#ifdef __x86_64__
+ .seh_proc __MINGW_USYMBOL(ceil)
+#endif
+
+__MINGW_USYMBOL(ceil):
+#if defined(_AMD64_) || defined(__x86_64__)
+ .seh_endprologue
+ movd %xmm0, %rax
+ movq %rax, %rcx
+ sarq $52, %rcx
+ andl $2047, %ecx
+ subl $1023, %ecx
+ cmpl $51, %ecx
+ jg .is_intnaninf
+ /* Is x zero? */
+ testq %rax, %rax
+ je .ret_org
+ /* Is x signed? */
+ testl %ecx, %ecx
+ js .signed_val
+ /* Is x integral? */
+ movabsq $4503599627370495, %rdx
+ sarq %cl, %rdx
+ testq %rax, %rdx
+ je .ret_org
+ addsd .huge(%rip), %xmm0
+ ucomisd .zero(%rip), %xmm0
+ jbe .doret
+ testq %rax, %rax
+ jle .l1
+ /* inexact ... */
+ movabsq $4503599627370496, %r8
+ shrq %cl, %r8
+ addq %r8, %rax
+.l1:
+ notq %rdx
+ andq %rdx, %rax
+.doret:
+ movd %rax, %xmm0
+ ret
+ .p2align 4,,10
+.signed_val:
+ addsd .huge(%rip), %xmm0
+ ucomisd .zero(%rip), %xmm0
+ jbe .doret2
+ testq %rax, %rax
+ movabsq $4607182418800017408, %rdx
+ movabsq $-9223372036854775808, %rax
+ cmovns %rdx, %rax
+ .p2align 4,,10
+.doret2:
+ movd %rax, %xmm0
+ ret
+
+ .p2align 4,,10
+.is_intnaninf:
+ /* Is Nan or Inf? */
+ cmpl $1024, %ecx
+ je .ret_naninf
+ .p2align 4,,10
+.ret_org:
+ /* return x. */
+ rep
+ ret
+ .p2align 4,,10
+.ret_naninf:
+ /* return x + x; */
+ addsd %xmm0, %xmm0
+ ret
+ .seh_endproc
+
+/* local data. */
+ .section .rdata,"dr"
+ .align 8
+.huge:
+ .long -2013235812
+ .long 2117592124
+ .align 8
+.zero:
+ .long 0
+ .long 0
+#elif defined(_ARM_) || defined(__arm__)
+ vmrs r1, fpscr
+ bic r0, r1, #0x00c00000
+ orr r0, r0, #0x00400000 /* Round towards Plus Infinity */
+ vmsr fpscr, r0
+ vcvtr.s32.f64 s0, d0
+ vcvt.f64.s32 d0, s0
+ vmsr fpscr, r1
+ bx lr
+#elif defined(_X86_) || defined(__i386__)
+ fldl 4(%esp)
+ subl $8,%esp
+
+ fstcw 4(%esp) /* store fpu control word */
+
+ /* We use here %edx although only the low 1 bits are defined.
+ But none of the operations should care and they are faster
+ than the 16 bit operations. */
+ movl $0x0800,%edx /* round towards +oo */
+ orl 4(%esp),%edx
+ andl $0xfbff,%edx
+ movl %edx,(%esp)
+ fldcw (%esp) /* load modified control word */
+
+ frndint /* round */
+
+ fldcw 4(%esp) /* restore original control word */
+
+ addl $8,%esp
+ ret
+#endif
diff --git a/winsup/cygwin/math/ceilf.S b/winsup/cygwin/math/ceilf.S
new file mode 100644
index 000000000..605c7bffa
--- /dev/null
+++ b/winsup/cygwin/math/ceilf.S
@@ -0,0 +1,120 @@
+/**
+ * This file has no copyright assigned and is placed in the Public Domain.
+ * This file is part of the mingw-w64 runtime package.
+ * No warranty is given; refer to the file DISCLAIMER.PD within this package.
+ */
+#include <_mingw_mac.h>
+
+ .file "ceilf.S"
+ .text
+ .align 4
+ .globl __MINGW_USYMBOL(ceilf)
+ .def __MINGW_USYMBOL(ceilf); .scl 2; .type 32; .endef
+#ifdef __x86_64__
+ .seh_proc __MINGW_USYMBOL(ceilf)
+#endif
+
+__MINGW_USYMBOL(ceilf):
+#if defined(_AMD64_) || defined(__x86_64__)
+ subq $24, %rsp
+ .seh_stackalloc 24
+ .seh_endprologue
+ movd %xmm0, 12(%rsp)
+ movl 12(%rsp), %eax
+ movl %eax, %ecx
+ movl %eax, %edx
+ sarl $23, %ecx
+ andl $255, %ecx
+ subl $127, %ecx
+ cmpl $22, %ecx
+ jg .l4
+ testl %ecx, %ecx
+ js .l5
+ movl $8388607, %r8d
+ sarl %cl, %r8d
+ testl %eax, %r8d
+ je .l3
+ addss .hugeval(%rip), %xmm0
+ ucomiss .zeroval(%rip), %xmm0
+ jbe .l2
+ testl %eax, %eax
+ jle .l1
+ movl $8388608, %eax
+ sarl %cl, %eax
+ addl %eax, %edx
+.l1:
+ movl %r8d, %eax
+ notl %eax
+ andl %edx, %eax
+.l2:
+ movl %eax, 8(%rsp)
+ movss 8(%rsp), %xmm0
+.l3:
+ addq $24, %rsp
+ ret
+ .p2align 4,,10
+.l4:
+ addl $-128, %ecx
+ jne .l3
+ addss %xmm0, %xmm0
+ addq $24, %rsp
+ ret
+ .p2align 4,,10
+.l5:
+ addss .hugeval(%rip), %xmm0
+ ucomiss .zeroval(%rip), %xmm0
+ jbe .islesseqzero
+ testl %eax, %eax
+ js .l6
+ movl $1065353216, %edx
+ cmovne %edx, %eax
+.islesseqzero:
+ movl %eax, 8(%rsp)
+ movss 8(%rsp), %xmm0
+ addq $24, %rsp
+ ret
+ .p2align 4,,10
+.l6:
+ movl $-2147483648, 8(%rsp)
+ movss 8(%rsp), %xmm0
+ addq $24, %rsp
+ ret
+ .seh_endproc
+ .section .rdata,"dr"
+ .align 4
+.hugeval:
+ .long 1900671690
+ .align 4
+.zeroval:
+ .long 0
+#elif defined(_ARM_) || defined(__arm__)
+ vmrs r1, fpscr
+ bic r0, r1, #0x00c00000
+ orr r0, r0, #0x00400000 /* Round towards Plus Infinity */
+ vmsr fpscr, r0
+ vcvt.s32.f32 s0, s0
+ vcvt.f32.s32 s0, s0
+ vmsr fpscr, r1
+ bx lr
+#elif defined(_X86_) || defined(__i386__)
+ flds 4(%esp)
+ subl $8,%esp
+
+ fstcw 4(%esp) /* store fpu control word */
+
+ /* We use here %edx although only the low 1 bits are defined.
+ But none of the operations should care and they are faster
+ than the 16 bit operations. */
+ movl $0x0800,%edx /* round towards +oo */
+ orl 4(%esp),%edx
+ andl $0xfbff,%edx
+ movl %edx,(%esp)
+ fldcw (%esp) /* load modified control word */
+
+ frndint /* round */
+
+ fldcw 4(%esp) /* restore original control word */
+
+ addl $8,%esp
+ ret
+#endif
diff --git a/winsup/cygwin/math/ceill.S b/winsup/cygwin/math/ceill.S
new file mode 100644
index 000000000..61d619929
--- /dev/null
+++ b/winsup/cygwin/math/ceill.S
@@ -0,0 +1,64 @@
+/**
+ * This file has no copyright assigned and is placed in the Public Domain.
+ * This file is part of the mingw-w64 runtime package.
+ * No warranty is given; refer to the file DISCLAIMER.PD within this package.
+ */
+#include <_mingw_mac.h>
+
+ .file "ceill.S"
+ .text
+#ifdef __x86_64__
+ .align 8
+#else
+ .align 4
+#endif
+ .globl __MINGW_USYMBOL(ceill)
+ .def __MINGW_USYMBOL(ceill); .scl 2; .type 32; .endef
+__MINGW_USYMBOL(ceill):
+#if defined(_AMD64_) || defined(__x86_64__)
+ fldt (%rdx)
+ subq $24,%rsp
+
+ fstcw 8(%rsp) /* store fpu control word */
+
+ /* We use here %edx although only the low 1 bits are defined.
+ But none of the operations should care and they are faster
+ than the 16 bit operations. */
+ movl $0x0800,%edx /* round towards +oo */
+ orl 8(%rsp),%edx
+ andl $0xfbff,%edx
+ movl %edx,(%rsp)
+ fldcw (%rsp) /* load modified control word */
+
+ frndint /* round */
+
+ fldcw 8(%rsp) /* restore original control word */
+
+ addq $24,%rsp
+ movq %rcx,%rax
+ movq $0,8(%rcx)
+ fstpt (%rcx)
+ ret
+#elif defined(_ARM_) || defined(__arm__)
+ vmrs r1, fpscr
+ bic r0, r1, #0x00c00000
+ orr r0, r0, #0x00400000 /* Round towards Plus Infinity */
+ vmsr fpscr, r0
+ vcvtr.s32.f64 s0, d0
+ vcvt.f64.s32 d0, s0
+ vmsr fpscr, r1
+ bx lr
+#elif defined(_X86_) || defined(__i386__)
+ fldt 4(%esp)
+ subl $8,%esp
+ fstcw 4(%esp)
+ movl $0x0800,%edx
+ orl 4(%esp),%edx
+ andl $0xfbff,%edx
+ movl %edx,(%esp)
+ fldcw (%esp)
+ frndint
+ fldcw 4(%esp)
+ addl $8,%esp
+ ret
+#endif
diff --git a/winsup/cygwin/math/cephes_emath.c b/winsup/cygwin/math/cephes_emath.c
new file mode 100644
index 000000000..8fb44346c
--- /dev/null
+++ b/winsup/cygwin/math/cephes_emath.c
@@ -0,0 +1,1283 @@
+/**
+ * This file has no copyright assigned and is placed in the Public Domain.
+ * This file is part of the mingw-w64 runtime package.
+ * No warranty is given; refer to the file DISCLAIMER.PD within this package.
+ */
+#include "cephes_emath.h"
+
+/*
+ * The constants are for 64 bit precision.
+ */
+
+
+/* Move in external format number,
+ * converting it to internal format.
+ */
+void __emovi(const short unsigned int * __restrict__ a,
+ short unsigned int * __restrict__ b)
+{
+ register const unsigned short *p;
+ register unsigned short *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 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;
+}
+
+
+/*
+; Add significands
+; x + y replaces y
+*/
+
+void __eaddm(const short unsigned int * __restrict__ x,
+ short unsigned int * __restrict__ 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
+*/
+
+void __esubm(const short unsigned int * __restrict__ x,
+ short unsigned int * __restrict__ 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;
+ }
+}
+
+
+/* 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 * __restrict__ b,
+ short unsigned int * __restrict__ 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. */
+
+int __edivm(short unsigned int * __restrict__ den,
+ short unsigned int * __restrict__ num)
+{
+ int i;
+ register unsigned short *p;
+ unsigned long tnum;
+ unsigned short j, tdenm, tquot;
+ unsigned short tprod[NI + 1];
+ unsigned short equot[NI];
+
+ 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);
+ }
+ }
+ __esubm(tprod, num);
+ 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 */
+int __emulm(const short unsigned int * __restrict__ a,
+ short unsigned int * __restrict__ b)
+{
+ const unsigned short *p;
+ unsigned short *q;
+ unsigned short pprod[NI];
+ unsigned short equot[NI];
+ unsigned short j;
+ int i;
+
+ 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 );
+}
+
+
+/*
+ * 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 "expo" is the biased exponent, which may be negative.
+ * the exponent field of "s" is ignored but is replaced by
+ * "expo" as adjusted by normalization and rounding.
+ *
+ * Input "rcntrl" is the rounding control.
+ *
+ * Input "rnprc" is precison control (64 or NBITS).
+ */
+
+void __emdnorm(short unsigned int *s, int lost, int subflg, int expo, int rcntrl, int rndprc)
+{
+ int i, j;
+ unsigned short r;
+ int rw = NI-1; /* low guard word */
+ int re = NI-2;
+ const unsigned short rmsk = 0xffff;
+ const unsigned short rmbit = 0x8000;
+#if NE == 6
+ unsigned short rbit[NI] = {0,0,0,0,0,0,0,1,0};
+#else
+ unsigned short rbit[NI] = {0,0,0,0,0,0,0,0,0,0,0,1,0};
+#endif
+
+ /* Normalize */
+ j = __enormlz(s);
+
+ /* a blank significand could mean either zero or infinity. */
+#ifndef INFINITY
+ if (j > NBITS)
+ {
+ __ecleazs(s);
+ return;
+ }
+#endif
+ expo -= j;
+#ifndef INFINITY
+ if (expo >= 32767)
+ goto overf;
+#else
+ if ((j > NBITS) && (expo < 32767))
+ {
+ __ecleazs(s);
+ return;
+ }
+#endif
+ if (expo < 0)
+ {
+ if (expo > (-NBITS - 1))
+ {
+ j = expo;
+ 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;
+ if (rndprc == 64)
+ {
+ rw = 7;
+ re = 6;
+ rbit[NI - 2] = 0;
+ rbit[6] = 1;
+ }
+
+ /* 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 ((expo <= 0) && (rndprc != NBITS))
+#else
+ if ((expo <= 0) && (rndprc != 64) && (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[rw] & rmsk;
+ if (rndprc < NBITS)
+ {
+ i = rw + 1;
+ while (i < NI)
+ {
+ if( s[i] )
+ r |= 1;
+ s[i] = 0;
+ ++i;
+ }
+ }
+ s[rw] &= (rmsk ^ 0xffff);
+ if ((r & rmbit) != 0)
+ {
+ if (r == rmbit)
+ {
+ if (lost == 0)
+ { /* round to even */
+ if ((s[re] & 1) == 0)
+ goto mddone;
+ }
+ else
+ {
+ if (subflg != 0)
+ goto mddone;
+ }
+ }
+ __eaddm(rbit, s);
+ }
+mddone:
+#if IBMPC
+ if ((expo <= 0) && (rndprc != NBITS))
+#else
+ if ((expo <= 0) && (rndprc != 64) && (rndprc != NBITS))
+#endif
+ {
+ __eshup1(s);
+ }
+ if (s[2] != 0)
+ { /* overflow on roundoff */
+ __eshdn1(s);
+ expo += 1;
+ }
+mdfin:
+ s[NI - 1] = 0;
+ if (expo >= 32767)
+ {
+#ifndef INFINITY
+overf:
+#endif
+#ifdef 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 ((rndprc < 64) || (rndprc == 113))
+ s[rw] &= (rmsk ^ 0xffff);
+#endif
+ return;
+ }
+ if (expo < 0)
+ s[1] = 0;
+ else
+ s[1] = (unsigned short)expo;
+}
+
+
+/*
+; Multiply.
+;
+; unsigned short a[NE], b[NE], c[NE];
+; emul( a, b, c ); c = b * a
+*/
+void __emul(const short unsigned int *a,
+ const short unsigned int *b,
+ short unsigned int *c)
+{
+ 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) && __eiiszero(b))
+ || (__eisinf(b) && __eiiszero(a)))
+ {
+ mtherr( "emul", DOMAIN);
+ __enan_NBITS(c);
+ return;
+ }
+#endif
+/* Infinity times anything else is infinity. */
+#ifdef INFINITY
+ if (__eisinf(a) || __eisinf(b))
+ {
+ if (__eisneg(a) ^ __eisneg(b))
+ *(c + (NE-1)) = 0x8000;
+ else
+ *(c + (NE-1)) = 0;
+ __einfin(c);
+ 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);
+ /* calculate exponent */
+ lt = lta + ltb - (EXONE - 1);
+ __emdnorm(bi, j, 0, lt, 64, NBITS);
+ /* calculate sign of product */
+ if (ai[0] == bi[0])
+ bi[0] = 0;
+ else
+ bi[0] = 0xffff;
+ __emovo(bi, c);
+}
+
+
+/* move out internal format to ieee long double */
+void __toe64(short unsigned int *a, short unsigned int *b)
+{
+ register unsigned short *p, *q;
+ unsigned short i;
+
+#ifdef NANS
+ if (__eiisnan(a))
+ {
+ __enan_64(b);
+ 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 */
+#if 1
+ /* NOTE: if data type is 96 bits wide, clear the last word here. */
+ *(q + 1)= 0;
+#endif
+#endif
+
+ /* combine sign and exponent */
+ i = *p++;
+#ifdef MIEEE
+ if (i)
+ *q++ = *p++ | 0x8000;
+ else
+ *q++ = *p++;
+ *q++ = 0;
+#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 INFINITY
+ if (__eiisinf(a))
+ {
+ /* Intel long double infinity. */
+ *q-- = 0x8000;
+ *q-- = 0;
+ *q-- = 0;
+ *q = 0;
+ return;
+ }
+#endif
+ for (i = 0; i < 4; i++)
+ *q-- = *p++;
+#endif
+}
+
+
+/* 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.
+ */
+int __ecmp(const short unsigned int * __restrict__ a,
+ const short unsigned int * __restrict__ 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.
+*/
+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.
+*/
+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);
+}
+
+
+/* Move internal format number out,
+ * converting it to external format.
+ */
+void __emovo(const short unsigned int * __restrict__ a,
+ short unsigned int * __restrict__ b)
+{
+ register const unsigned short *p;
+ register unsigned short *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 INFINITY
+ if (*(p - 1) == 0x7fff)
+ {
+#ifdef NANS
+ if (__eiisnan(a))
+ {
+ __enan_NBITS(b);
+ return;
+ }
+#endif
+ __einfin(b);
+ return;
+ }
+#endif
+ /* skip over guard word */
+ ++p;
+ /* move the significand */
+ for (i = 0; i < NE - 1; i++)
+ *q-- = *p++;
+}
+
+
+#if USE_LDTOA
+
+void __eiremain(short unsigned int *den, short unsigned int *num,
+ short unsigned int *equot )
+{
+ long ld, ln;
+ unsigned short j;
+
+ 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, NBITS );
+}
+
+
+void __eadd1(const short unsigned int * __restrict__ a,
+ const short unsigned int * __restrict__ b,
+ short unsigned int * __restrict__ c,
+ int subflg)
+{
+ unsigned short ai[NI], bi[NI], ci[NI];
+ int i, lost, j, k;
+ long lt, lta, ltb;
+
+#ifdef 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 (sub)
+ 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, NBITS);
+
+done:
+ __emovo(bi, c);
+}
+
+
+/* y = largest integer not greater than x
+ * (truncated toward minus infinity)
+ *
+ * unsigned short x[NE], y[NE]
+ *
+ * efloor( x, y );
+ */
+
+
+void __efloor(short unsigned int *x, short unsigned int *y)
+{
+ register unsigned short *p;
+ int e, expon, i;
+ unsigned short f[NE];
+ const unsigned short bmask[] = {
+ 0xffff,
+ 0xfffe,
+ 0xfffc,
+ 0xfff8,
+ 0xfff0,
+ 0xffe0,
+ 0xffc0,
+ 0xff80,
+ 0xff00,
+ 0xfe00,
+ 0xfc00,
+ 0xf800,
+ 0xf000,
+ 0xe000,
+ 0xc000,
+ 0x8000,
+ 0x0000,
+ };
+
+ __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 );
+ break;
+ }
+ }
+ }
+}
+
+/*
+; Subtract external format numbers.
+;
+; unsigned short a[NE], b[NE], c[NE];
+; esub( a, b, c ); c = b - a
+*/
+
+void __esub(const short unsigned int * a,
+ const short unsigned int * b,
+ short unsigned int * c)
+{
+#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_NBITS( c );
+ return;
+ }
+#endif
+ __eadd1(a, b, c, 1);
+}
+
+
+/*
+; Divide.
+;
+; unsigned short a[NI], b[NI], c[NI];
+; ediv( a, b, c ); c = b / a
+*/
+
+void __ediv(const short unsigned int *a,
+ const short unsigned int *b,
+ short unsigned int *c)
+{
+ 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 ((__eiszero(a) && __eiszero(b))
+ || (__eisinf (a) && __eisinf (b)))
+ {
+ mtherr("ediv", DOMAIN);
+ __enan_NBITS( c );
+ return;
+ }
+#endif
+/* Infinity over anything else is infinity. */
+#ifdef INFINITY
+ if (__eisinf(b))
+ {
+ if (__eisneg(a) ^ __eisneg(b))
+ *(c + (NE - 1)) = 0x8000;
+ else
+ *(c + (NE - 1)) = 0;
+ __einfin(c);
+ 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);
+ mtherr("ediv", SING);
+ return;
+ }
+dnzro2:
+
+ i = __edivm(ai, bi);
+ /* calculate exponent */
+ lt = ltb - lta + EXONE;
+ __emdnorm(bi, i, 0, lt, 64, NBITS);
+ /* set the sign */
+ if (ai[0] == bi[0])
+ bi[0] = 0;
+ else
+ bi[0] = 0Xffff;
+ __emovo(bi, c);
+}
+
+void __e64toe(short unsigned int *pe, short unsigned int *y)
+{
+ 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;
+ 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);
+ return;
+ }
+#endif
+#ifdef INFINITY
+ /* Point to the exponent field. */
+ p = &yy[NE - 1];
+ if (*p == 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_NBITS(y);
+ return;
+ }
+ }
+#else
+ for (i = 1; i <= 4; i++)
+ {
+ if (pe[i] != 0)
+ {
+ __enan_NBITS(y);
+ return;
+ }
+ }
+#endif
+#endif /* NANS */
+ __eclear(y);
+ __einfin(y);
+ if (*p & 0x8000)
+ __eneg(y);
+ return;
+ }
+#endif
+ p = yy;
+ q = y;
+ for (i = 0; i < NE; i++)
+ *q++ = *p++;
+}
+
+#endif /* USE_LDTOA */
diff --git a/winsup/cygwin/math/cephes_emath.h b/winsup/cygwin/math/cephes_emath.h
new file mode 100644
index 000000000..b92d710f6
--- /dev/null
+++ b/winsup/cygwin/math/cephes_emath.h
@@ -0,0 +1,719 @@
+/**
+ * This file has no copyright assigned and is placed in the Public Domain.
+ * This file is part of the mingw-w64 runtime package.
+ * No warranty is given; refer to the file DISCLAIMER.PD within this package.
+ */
+#ifndef _CEPHES_EMATH_H
+#define _CEPHES_EMATH_H
+
+/**
+ * This is a workaround for a gcc bug
+ */
+#define __restrict__
+
+/* This file is extracted from S L Moshier's ioldoubl.c,
+ * modified for use in MinGW
+ *
+ * Extended precision arithmetic functions for long double I/O.
+ * This program has been placed in the public domain.
+ */
+
+
+/*
+ * 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
+ *
+ * Author: S. L. Moshier.
+ *
+ * 6 Oct 02 Modified for MinGW by inlining utility routines,
+ * removing global variables, and splitting out strtold
+ * from _IO_ldtoa and _IO_ldtostr.
+ *
+ * Danny Smith <dannysmith@users.sourceforge.net>
+ *
+ */
+
+
+/* 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
+ *
+ * __asctoe64( string, &d ) ASCII string to long double
+ * __asctoeg( string, e, prec ) ASCII string to specified precision
+ * __e64toe( &d, e ) IEEE long double precision to e type
+ * __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 ) c = b / a
+ * __efloor( a, b ) 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 ) 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 ) c = b * a
+ * __eneg(e) e = -e
+ * __eround( a, b ) b = nearest integer value to a
+ * __esub( a, b, c ) 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 ) 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
+ * __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 ) divide significands, bi = bi / ai
+ * __emdnorm(ai,l,s,exp) normalize and round off
+ * __emovi( a, ai ) convert external a to internal ai
+ * __emovo( ai, a ) convert internal ai to external a
+ * __emovz( ai, bi ) bi = ai, low guard word of bi = 0
+ * __emulm( ai, bi ) 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 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).
+ */
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <errno.h>
+#include <math.h>
+#include <locale.h>
+#include <ctype.h>
+
+#undef alloca
+#define alloca __builtin_alloca
+
+/* Don't build non-ANSI _IO_ldtoa. It is not thread safe. */
+#ifndef USE_LDTOA
+#define USE_LDTOA 0
+#endif
+
+
+ /* Number of 16 bit words in external x type format */
+#define NE 6
+
+ /* 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)
+
+
+#define mtherr(x,y)
+
+
+extern long double strtold (const char * __restrict__ s, char ** __restrict__ se);
+extern int __asctoe64(const char * __restrict__ ss,
+ short unsigned int * __restrict__ y);
+extern void __emul(const short unsigned int * a,
+ const short unsigned int * b,
+ short unsigned int * c);
+extern int __ecmp(const short unsigned int * __restrict__ a,
+ const short unsigned int * __restrict__ b);
+extern int __enormlz(short unsigned int *x);
+extern int __eshift(short unsigned int *x, int sc);
+extern void __eaddm(const short unsigned int * __restrict__ x,
+ short unsigned int * __restrict__ y);
+extern void __esubm(const short unsigned int * __restrict__ x,
+ short unsigned int * __restrict__ y);
+extern void __emdnorm(short unsigned int *s, int lost, int subflg,
+ int exp, int rcntrl, const int rndprc);
+extern void __toe64(short unsigned int * __restrict__ a,
+ short unsigned int * __restrict__ b);
+extern int __edivm(short unsigned int * __restrict__ den,
+ short unsigned int * __restrict__ num);
+extern int __emulm(const short unsigned int * __restrict__ a,
+ short unsigned int * __restrict__ b);
+extern void __emovi(const short unsigned int * __restrict__ a,
+ short unsigned int * __restrict__ b);
+extern void __emovo(const short unsigned int * __restrict__ a,
+ short unsigned int * __restrict__ b);
+
+#if USE_LDTOA
+
+extern char * _IO_ldtoa(long double, int, int, int *, int *, char **);
+extern void _IO_ldtostr(long double *x, char *string, int ndigs,
+ int flags, char fmt);
+
+extern void __eiremain(short unsigned int * __restrict__ den,
+ short unsigned int *__restrict__ num,
+ short unsigned int *__restrict__ equot);
+extern void __efloor(short unsigned int *x, short unsigned int *y);
+extern void __eadd1(const short unsigned int * __restrict__ a,
+ const short unsigned int * __restrict__ b,
+ short unsigned int * __restrict__ c,
+ int subflg);
+extern void __esub(const short unsigned int *a, const short unsigned int *b,
+ short unsigned int *c);
+extern void __ediv(const short unsigned int *a, const short unsigned int *b,
+ short unsigned int *c);
+extern void __e64toe(short unsigned int *pe, short unsigned int *y);
+
+
+#endif
+
+static __inline__ int __eisneg(const short unsigned int *x);
+static __inline__ int __eisinf(const short unsigned int *x);
+static __inline__ int __eisnan(const short unsigned int *x);
+static __inline__ int __eiszero(const short unsigned int *a);
+static __inline__ void __emovz(register const short unsigned int * __restrict__ a,
+ register short unsigned int * __restrict__ b);
+static __inline__ void __eclear(register short unsigned int *x);
+static __inline__ void __ecleaz(register short unsigned int *xi);
+static __inline__ void __ecleazs(register short unsigned int *xi);
+static __inline__ int __eiisinf(const short unsigned int *x);
+static __inline__ int __eiisnan(const short unsigned int *x);
+static __inline__ int __eiiszero(const short unsigned int *x);
+static __inline__ void __enan_64(short unsigned int *nanptr);
+static __inline__ void __enan_NBITS (short unsigned int *nanptr);
+static __inline__ void __enan_NI16 (short unsigned int *nanptr);
+static __inline__ void __einfin(register short unsigned int *x);
+static __inline__ void __eneg(short unsigned int *x);
+static __inline__ void __eshup1(register short unsigned int *x);
+static __inline__ void __eshup8(register short unsigned int *x);
+static __inline__ void __eshup6(register short unsigned int *x);
+static __inline__ void __eshdn1(register short unsigned int *x);
+static __inline__ void __eshdn8(register short unsigned int *x);
+static __inline__ void __eshdn6(register short unsigned int *x);
+
+
+
+/* Intel IEEE, low order words come first:
+ */
+#define IBMPC 1
+
+/* Define 1 for ANSI C atan2() function
+ * See atan.c and clog.c.
+ */
+#define ANSIC 1
+
+/*define VOLATILE volatile*/
+#define VOLATILE
+
+/* For 12-byte long doubles on an i386, pad a 16-bit short 0
+ * to the end of real constants initialized by integer arrays.
+ *
+ * #define XPD 0,
+ *
+ * Otherwise, the type is 10 bytes long and XPD should be
+ * defined blank.
+ *
+ * #define XPD
+ */
+#define XPD 0,
+/* #define XPD */
+#define NANS
+
+/* NaN's require infinity support. */
+#ifdef NANS
+#ifndef INFINITY
+#define INFINITY
+#endif
+#endif
+
+/* This handles 64-bit long ints. */
+#define LONGBITS (8 * sizeof(long))
+
+
+#define NTEN 12
+#define MAXP 4096
+
+/*
+; Clear out entire external format number.
+;
+; unsigned short x[];
+; eclear( x );
+*/
+
+static __inline__ void __eclear(register short unsigned int *x)
+{
+ memset(x, 0, NE * sizeof(unsigned short));
+}
+
+
+/* Move external format number from a to b.
+ *
+ * emov( a, b );
+ */
+
+static __inline__ void __emov(register const short unsigned int * __restrict__ a,
+ register short unsigned int * __restrict__ b)
+{
+ memcpy(b, a, NE * sizeof(unsigned short));
+}
+
+
+/*
+; Negate external format number
+;
+; unsigned short x[NE];
+; eneg( x );
+*/
+
+static __inline__ 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 __inline__ int __eisneg(const 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 __inline__ int __eisinf(const 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 __inline__ int __eisnan(const short unsigned int *x)
+{
+#ifdef NANS
+ int i;
+ /* NaN has maximum __exponent */
+ if ((x[NE - 1] & 0x7fff) == 0x7fff)
+ /* ... 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 __inline__ void __einfin(register short unsigned int *x)
+{
+ register int i;
+#ifdef INFINITY
+ for (i = 0; i < NE - 1; i++)
+ *x++ = 0;
+ *x |= 32767;
+#else
+ for (i = 0; i < NE - 1; i++)
+ *x++ = 0xffff;
+ *x |= 32766;
+ *(x - 5) = 0;
+#endif
+}
+
+/* Clear out internal format number.
+ */
+
+static __inline__ void __ecleaz(register short unsigned int *xi)
+{
+ memset(xi, 0, NI * sizeof(unsigned short));
+}
+
+/* same, but don't touch the sign. */
+
+static __inline__ void __ecleazs(register short unsigned int *xi)
+{
+ ++xi;
+ memset(xi, 0, (NI-1) * sizeof(unsigned short));
+}
+
+/* Move internal format number from a to b.
+ */
+static __inline__ void __emovz(register const short unsigned int * __restrict__ a,
+ register short unsigned int * __restrict__ b)
+{
+ memcpy(b, a, (NI-1) * sizeof(unsigned short));
+ b[NI - 1] = 0;
+}
+
+/* Return nonzero if internal format number is a NaN.
+ */
+
+static __inline__ int __eiisnan (const 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);
+}
+
+/* Return nonzero if external format number is zero. */
+
+static __inline__ int
+__eiszero(const short unsigned int * a)
+{
+ union {
+ long double ld;
+ unsigned short sh[8];
+ } av;
+ av.ld = 0.0;
+ memcpy (av.sh, a, 12);
+ if (av.ld == 0.0)
+ return (1);
+ return (0);
+}
+
+/* Return nonzero if internal format number is zero. */
+
+static __inline__ int
+__eiiszero(const short unsigned int * ai)
+{
+ int i;
+ /* skip the sign word */
+ for (i = 1; i < NI - 1; i++ )
+ {
+ if (ai[i] != 0)
+ return (0);
+ }
+ return (1);
+}
+
+
+/* Return nonzero if internal format number is infinite. */
+
+static __inline__ int
+__eiisinf (const unsigned short *x)
+{
+#ifdef NANS
+ if (__eiisnan (x))
+ return (0);
+#endif
+ if ((x[E] & 0x7fff) == 0x7fff)
+ return (1);
+ return (0);
+}
+
+/*
+; 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 __inline__ int __ecmpm(register const short unsigned int * __restrict__ a,
+ register const short unsigned int * __restrict__ 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 __inline__ 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 __inline__ 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 __inline__ 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 __inline__ 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 __inline__ 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 __inline__ 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 __inline__ void __enan_64(unsigned short* nanptr)
+{
+ int i;
+ for (i = 0; i < 3; i++)
+ *nanptr++ = 0;
+ *nanptr++ = 0xc000;
+ *nanptr++ = 0x7fff;
+ *nanptr = 0;
+ return;
+}
+
+static __inline__ void __enan_NBITS(unsigned short* nanptr)
+{
+ int i;
+ for (i = 0; i < NE - 2; i++)
+ *nanptr++ = 0;
+ *nanptr++ = 0xc000;
+ *nanptr = 0x7fff;
+ return;
+}
+
+static __inline__ void __enan_NI16(unsigned short* nanptr)
+{
+ int i;
+ *nanptr++ = 0;
+ *nanptr++ = 0x7fff;
+ *nanptr++ = 0;
+ *nanptr++ = 0xc000;
+ for (i = 4; i < NI; i++)
+ *nanptr++ = 0;
+ return;
+}
+
+#endif /* _CEPHES_EMATH_H */
+
diff --git a/winsup/cygwin/math/cephes_mconf.h b/winsup/cygwin/math/cephes_mconf.h
new file mode 100644
index 000000000..832fae0df
--- /dev/null
+++ b/winsup/cygwin/math/cephes_mconf.h
@@ -0,0 +1,417 @@
+#include <math.h>
+#include <errno.h>
+
+
+#define IBMPC 1
+#define ANSIPROT 1
+#define MINUSZERO 1
+#define INFINITIES 1
+#define NANS 1
+#define DENORMAL 1
+#define VOLATILE
+#define mtherr(fname, code)
+#define XPD 0,
+#ifdef __x86_64__
+#define XPD_SHORT 0, 0,
+#define XPD_LONG 0,
+#else
+#define XPD_SHORT
+#define XPD_LONG
+#endif
+
+#if UNK
+typedef union uLD { long double ld; unsigned short sh[8]; long lo[4]; } uLD;
+typedef union uD { double d; unsigned short sh[4]; } uD;
+#elif IBMPC
+typedef union uLD { unsigned short sh[8]; long double ld; long lo[4]; } uLD;
+typedef union uD { unsigned short sh[4]; double d; } uD;
+#elif MIEEE
+typedef union uLD { long lo[4]; long double ld; unsigned short sh[8]; } uLD;
+typedef union uD { unsigned short sh[4]; double d; } uD;
+#else
+#error Unknown uLD/uD type definition
+#endif
+
+#define _CEPHES_USE_ERRNO
+
+#ifdef _CEPHES_USE_ERRNO
+#define _SET_ERRNO(x) errno = (x)
+#else
+#define _SET_ERRNO(x)
+#endif
+
+/* constants used by cephes functions */
+
+/* double */
+#define MAXNUM 1.7976931348623158E308
+#define MAXLOG 7.09782712893383996843E2
+#define MINLOG -7.08396418532264106224E2
+#define LOGE2 6.93147180559945309417E-1
+#define LOG2E 1.44269504088896340736
+#define PI 3.14159265358979323846
+#define PIO2 1.57079632679489661923
+#define PIO4 7.85398163397448309616E-1
+
+#define NEGZERO (-0.0)
+#undef NAN
+#undef INFINITY
+#if (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ > 2))
+#define INFINITY __builtin_huge_val()
+#define NAN __builtin_nan("")
+#else
+extern double __INF;
+#define INFINITY (__INF)
+extern double __QNAN;
+#define NAN (__QNAN)
+#endif
+
+/*long double*/
+#if defined(__arm__) || defined(_ARM_)
+#define MAXNUML 1.7976931348623158E308
+#define MAXLOGL 7.09782712893383996843E2
+#define MINLOGL -7.08396418532264106224E2
+#define LOGE2L 6.93147180559945309417E-1
+#define LOG2EL 1.44269504088896340736
+#define PIL 3.14159265358979323846
+#define PIO2L 1.57079632679489661923
+#define PIO4L 7.85398163397448309616E-1
+#else
+#define MAXNUML 1.189731495357231765021263853E4932L
+#define MAXLOGL 1.1356523406294143949492E4L
+#define MINLOGL -1.13994985314888605586758E4L
+#define LOGE2L 6.9314718055994530941723E-1L
+#define LOG2EL 1.4426950408889634073599E0L
+#define PIL 3.1415926535897932384626L
+#define PIO2L 1.5707963267948966192313L
+#define PIO4L 7.8539816339744830961566E-1L
+#endif /* defined(__arm__) || defined(_ARM_) */
+
+#define isfinitel isfinite
+#define isinfl isinf
+#define isnanl isnan
+#define signbitl signbit
+
+#define NEGZEROL (-0.0L)
+
+#undef NANL
+#undef INFINITYL
+#if (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ > 2))
+#define INFINITYL __builtin_huge_vall()
+#define NANL __builtin_nanl("")
+#else
+extern long double __INFL;
+#define INFINITYL (__INFL)
+extern long double __QNANL;
+#define NANL (__QNANL)
+#endif
+
+/* float */
+
+#define MAXNUMF 3.4028234663852885981170418348451692544e38F
+#define MAXLOGF 88.72283905206835F
+#define MINLOGF -103.278929903431851103F /* log(2^-149) */
+#define LOG2EF 1.44269504088896341F
+#define LOGE2F 0.693147180559945309F
+#define PIF 3.141592653589793238F
+#define PIO2F 1.5707963267948966192F
+#define PIO4F 0.7853981633974483096F
+
+#define isfinitef isfinite
+#define isinff isinf
+#define isnanf isnan
+#define signbitf signbit
+
+#define NEGZEROF (-0.0F)
+
+#undef NANF
+#undef INFINITYF
+#if (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ > 2))
+#define INFINITYF __builtin_huge_valf()
+#define NANF __builtin_nanf("")
+#else
+extern float __INFF;
+#define INFINITYF (__INFF)
+extern float __QNANF;
+#define NANF (__QNANF)
+#endif
+
+
+/* double */
+
+/*
+Cephes Math Library Release 2.2: July, 1992
+Copyright 1984, 1987, 1988, 1992 by Stephen L. Moshier
+Direct inquiries to 30 Frost Street, Cambridge, MA 02140
+*/
+
+
+/* polevl.c
+ * p1evl.c
+ *
+ * Evaluate polynomial
+ *
+ *
+ *
+ * SYNOPSIS:
+ *
+ * int N;
+ * double x, y, coef[N+1], polevl[];
+ *
+ * y = polevl( x, coef, N );
+ *
+ *
+ *
+ * DESCRIPTION:
+ *
+ * Evaluates polynomial of degree N:
+ *
+ * 2 N
+ * y = C + C x + C x +...+ C x
+ * 0 1 2 N
+ *
+ * Coefficients are stored in reverse order:
+ *
+ * coef[0] = C , ..., coef[N] = C .
+ * N 0
+ *
+ * The function p1evl() assumes that coef[N] = 1.0 and is
+ * omitted from the array. Its calling arguments are
+ * otherwise the same as polevl().
+ *
+ *
+ * SPEED:
+ *
+ * In the interest of speed, there are no checks for out
+ * of bounds arithmetic. This routine is used by most of
+ * the functions in the library. Depending on available
+ * equipment features, the user may wish to rewrite the
+ * program in microcode or assembly language.
+ *
+ */
+
+/* Polynomial evaluator:
+ * P[0] x^n + P[1] x^(n-1) + ... + P[n]
+ */
+static __inline__ double polevl(double x, const uD *p, int n)
+{
+ register double y;
+
+ y = p->d;
+ p++;
+ do
+ {
+ y = y * x + p->d;
+ p++;
+ }
+ while (--n);
+ return (y);
+}
+
+
+/* Polynomial evaluator:
+ * x^n + P[0] x^(n-1) + P[1] x^(n-2) + ... + P[n]
+ */
+static __inline__ double p1evl(double x, const uD *p, int n)
+{
+ register double y;
+
+ n -= 1;
+ y = x + p->d; p++;
+ do
+ {
+ y = y * x + p->d; p++;
+ }
+ while (--n);
+ return (y);
+}
+
+
+/* long double */
+/*
+Cephes Math Library Release 2.2: July, 1992
+Copyright 1984, 1987, 1988, 1992 by Stephen L. Moshier
+Direct inquiries to 30 Frost Street, Cambridge, MA 02140
+*/
+
+
+/* polevll.c
+ * p1evll.c
+ *
+ * Evaluate polynomial
+ *
+ *
+ *
+ * SYNOPSIS:
+ *
+ * int N;
+ * long double x, y, coef[N+1], polevl[];
+ *
+ * y = polevll( x, coef, N );
+ *
+ *
+ *
+ * DESCRIPTION:
+ *
+ * Evaluates polynomial of degree N:
+ *
+ * 2 N
+ * y = C + C x + C x +...+ C x
+ * 0 1 2 N
+ *
+ * Coefficients are stored in reverse order:
+ *
+ * coef[0] = C , ..., coef[N] = C .
+ * N 0
+ *
+ * The function p1evll() assumes that coef[N] = 1.0 and is
+ * omitted from the array. Its calling arguments are
+ * otherwise the same as polevll().
+ *
+ *
+ * SPEED:
+ *
+ * In the interest of speed, there are no checks for out
+ * of bounds arithmetic. This routine is used by most of
+ * the functions in the library. Depending on available
+ * equipment features, the user may wish to rewrite the
+ * program in microcode or assembly language.
+ *
+ */
+
+/* Polynomial evaluator:
+ * P[0] x^n + P[1] x^(n-1) + ... + P[n]
+ */
+static __inline__ long double polevll(long double x, const uLD *p, int n)
+{
+ register long double y;
+
+ y = p->ld;
+ p++;
+ do
+ {
+ y = y * x + p->ld;
+ p++;
+ }
+ while (--n);
+ return y;
+}
+
+
+
+/* Polynomial evaluator:
+ * x^n + P[0] x^(n-1) + P[1] x^(n-2) + ... + P[n]
+ */
+static __inline__ long double p1evll(long double x, const uLD *p, int n)
+{
+ register long double y;
+
+ n -= 1;
+ y = x + p->ld;
+ p++;
+
+ do
+ {
+ y = y * x + p->ld;
+ p++;
+ }
+ while (--n);
+ return (y);
+}
+
+/* Float version */
+
+/* polevlf.c
+ * p1evlf.c
+ *
+ * Evaluate polynomial
+ *
+ *
+ *
+ * SYNOPSIS:
+ *
+ * int N;
+ * float x, y, coef[N+1], polevlf[];
+ *
+ * y = polevlf( x, coef, N );
+ *
+ *
+ *
+ * DESCRIPTION:
+ *
+ * Evaluates polynomial of degree N:
+ *
+ * 2 N
+ * y = C + C x + C x +...+ C x
+ * 0 1 2 N
+ *
+ * Coefficients are stored in reverse order:
+ *
+ * coef[0] = C , ..., coef[N] = C .
+ * N 0
+ *
+ * The function p1evl() assumes that coef[N] = 1.0 and is
+ * omitted from the array. Its calling arguments are
+ * otherwise the same as polevl().
+ *
+ *
+ * SPEED:
+ *
+ * In the interest of speed, there are no checks for out
+ * of bounds arithmetic. This routine is used by most of
+ * the functions in the library. Depending on available
+ * equipment features, the user may wish to rewrite the
+ * program in microcode or assembly language.
+ *
+ */
+
+/*
+Cephes Math Library Release 2.1: December, 1988
+Copyright 1984, 1987, 1988 by Stephen L. Moshier
+Direct inquiries to 30 Frost Street, Cambridge, MA 02140
+*/
+
+static __inline__ float polevlf(float x, const float* coef, int N)
+{
+ float ans;
+ float *p;
+ int i;
+
+ p = (float*)coef;
+ ans = *p++;
+
+ /*
+ for (i = 0; i < N; i++)
+ ans = ans * x + *p++;
+ */
+
+ i = N;
+ do
+ ans = ans * x + *p++;
+ while (--i);
+
+ return (ans);
+}
+
+/* p1evl() */
+/* N
+ * Evaluate polynomial when coefficient of x is 1.0.
+ * Otherwise same as polevl.
+ */
+
+static __inline__ float p1evlf(float x, const float *coef, int N)
+{
+ float ans;
+ float *p;
+ int i;
+
+ p = (float*)coef;
+ ans = x + *p++;
+ i = N - 1;
+
+ do
+ ans = ans * x + *p++;
+ while (--i);
+
+ return (ans);
+}
+
diff --git a/winsup/cygwin/math/cexp.def.h b/winsup/cygwin/math/cexp.def.h
new file mode 100644
index 000000000..c0c97b70f
--- /dev/null
+++ b/winsup/cygwin/math/cexp.def.h
@@ -0,0 +1,111 @@
+/*
+ This Software is provided under the Zope Public License (ZPL) Version 2.1.
+
+ Copyright (c) 2009, 2010 by the mingw-w64 project
+
+ See the AUTHORS file for the list of contributors to the mingw-w64 project.
+
+ This license has been certified as open source. It has also been designated
+ as GPL compatible by the Free Software Foundation (FSF).
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions in source code must retain the accompanying copyright
+ notice, this list of conditions, and the following disclaimer.
+ 2. Redistributions in binary form must reproduce the accompanying
+ copyright notice, this list of conditions, and the following disclaimer
+ in the documentation and/or other materials provided with the
+ distribution.
+ 3. Names of the copyright holders must not be used to endorse or promote
+ products derived from this software without prior written permission
+ from the copyright holders.
+ 4. The right to distribute this software or to use it for any purpose does
+ not give you the right to use Servicemarks (sm) or Trademarks (tm) of
+ the copyright holders. Use of them is covered by separate agreement
+ with the copyright holders.
+ 5. If any files are modified, you must cause the modified files to carry
+ prominent notices stating that you changed the files and the date of
+ any change.
+
+ Disclaimer
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY EXPRESSED
+ 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 HOLDERS 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.
+*/
+
+__FLT_TYPE __complex__ __cdecl
+__FLT_ABI(cexp) (__FLT_TYPE __complex__ z)
+{
+ __complex__ __FLT_TYPE ret;
+ __FLT_TYPE s_x, c_x, exp_val, v;
+ int r_class = fpclassify (__real__ z);
+ int i_class = fpclassify (__imag__ z);
+
+ if (r_class == FP_INFINITE)
+ {
+ if (i_class != FP_NAN && i_class != FP_INFINITE)
+ {
+ v = signbit (__real__ z) ? __FLT_CST(0.0) : __FLT_HUGE_VAL;
+
+ if (i_class == FP_ZERO)
+ {
+ __real__ ret = v;
+ __imag__ ret = __imag__ z;
+ return ret;
+ }
+
+ __FLT_ABI(sincos) (__imag__ z, &s_x, &c_x);
+
+ __real__ ret = __FLT_ABI(copysign) (v, c_x);
+ __imag__ ret = __FLT_ABI(copysign) (v, s_x);
+ return ret;
+ }
+
+ if (signbit (__real__ z) == 0)
+ {
+ __real__ ret = __FLT_HUGE_VAL;
+ __imag__ ret = __FLT_NAN;
+ }
+ else
+ {
+ __real__ ret = __FLT_CST(0.0);
+ __imag__ ret = __FLT_ABI(copysign) (__FLT_CST(0.0), __imag__ z);
+ }
+ return ret;
+ }
+
+ if (r_class == FP_NAN || i_class == FP_NAN || i_class == FP_INFINITE)
+ {
+ __real__ ret = __FLT_NAN;
+ if (i_class == FP_ZERO)
+ __imag__ ret = __FLT_ABI(copysign) (__FLT_CST(0.0), __imag__ z);
+ else
+ __imag__ ret = __FLT_NAN;
+ return ret;
+ }
+
+ exp_val = __FLT_ABI(exp) (__real__ z);
+
+ __FLT_ABI(sincos) (__imag__ z, &s_x, &c_x);
+
+ if (isfinite (exp_val))
+ {
+ __real__ ret = exp_val * c_x;
+ __imag__ ret = exp_val * s_x;
+ }
+ else
+ {
+ __real__ ret = __FLT_ABI(copysign) (exp_val, c_x);
+ __imag__ ret = __FLT_ABI(copysign) (exp_val, s_x);
+ }
+ return ret;
+}
diff --git a/winsup/cygwin/math/cexpl.c b/winsup/cygwin/math/cexpl.c
new file mode 100644
index 000000000..9c33bc05c
--- /dev/null
+++ b/winsup/cygwin/math/cexpl.c
@@ -0,0 +1,48 @@
+/*
+ This Software is provided under the Zope Public License (ZPL) Version 2.1.
+
+ Copyright (c) 2009, 2010 by the mingw-w64 project
+
+ See the AUTHORS file for the list of contributors to the mingw-w64 project.
+
+ This license has been certified as open source. It has also been designated
+ as GPL compatible by the Free Software Foundation (FSF).
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions in source code must retain the accompanying copyright
+ notice, this list of conditions, and the following disclaimer.
+ 2. Redistributions in binary form must reproduce the accompanying
+ copyright notice, this list of conditions, and the following disclaimer
+ in the documentation and/or other materials provided with the
+ distribution.
+ 3. Names of the copyright holders must not be used to endorse or promote
+ products derived from this software without prior written permission
+ from the copyright holders.
+ 4. The right to distribute this software or to use it for any purpose does
+ not give you the right to use Servicemarks (sm) or Trademarks (tm) of
+ the copyright holders. Use of them is covered by separate agreement
+ with the copyright holders.
+ 5. If any files are modified, you must cause the modified files to carry
+ prominent notices stating that you changed the files and the date of
+ any change.
+
+ Disclaimer
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY EXPRESSED
+ 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 HOLDERS 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.
+*/
+
+/* long double version of the functions. */
+#define _NEW_COMPLEX_LDOUBLE 1
+#include "complex_internal.h"
+#include "cexp.def.h"
diff --git a/winsup/cygwin/math/cimag.def.h b/winsup/cygwin/math/cimag.def.h
new file mode 100644
index 000000000..0212d9390
--- /dev/null
+++ b/winsup/cygwin/math/cimag.def.h
@@ -0,0 +1,49 @@
+/*
+ This Software is provided under the Zope Public License (ZPL) Version 2.1.
+
+ Copyright (c) 2009, 2010 by the mingw-w64 project
+
+ See the AUTHORS file for the list of contributors to the mingw-w64 project.
+
+ This license has been certified as open source. It has also been designated
+ as GPL compatible by the Free Software Foundation (FSF).
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions in source code must retain the accompanying copyright
+ notice, this list of conditions, and the following disclaimer.
+ 2. Redistributions in binary form must reproduce the accompanying
+ copyright notice, this list of conditions, and the following disclaimer
+ in the documentation and/or other materials provided with the
+ distribution.
+ 3. Names of the copyright holders must not be used to endorse or promote
+ products derived from this software without prior written permission
+ from the copyright holders.
+ 4. The right to distribute this software or to use it for any purpose does
+ not give you the right to use Servicemarks (sm) or Trademarks (tm) of
+ the copyright holders. Use of them is covered by separate agreement
+ with the copyright holders.
+ 5. If any files are modified, you must cause the modified files to carry
+ prominent notices stating that you changed the files and the date of
+ any change.
+
+ Disclaimer
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY EXPRESSED
+ 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 HOLDERS 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.
+*/
+
+__FLT_TYPE __cdecl
+__FLT_ABI(cimag) (__FLT_TYPE __complex z)
+{
+ return __imag__ z;
+}
diff --git a/winsup/cygwin/math/cimagl.c b/winsup/cygwin/math/cimagl.c
new file mode 100644
index 000000000..94835d745
--- /dev/null
+++ b/winsup/cygwin/math/cimagl.c
@@ -0,0 +1,48 @@
+/*
+ This Software is provided under the Zope Public License (ZPL) Version 2.1.
+
+ Copyright (c) 2009, 2010 by the mingw-w64 project
+
+ See the AUTHORS file for the list of contributors to the mingw-w64 project.
+
+ This license has been certified as open source. It has also been designated
+ as GPL compatible by the Free Software Foundation (FSF).
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions in source code must retain the accompanying copyright
+ notice, this list of conditions, and the following disclaimer.
+ 2. Redistributions in binary form must reproduce the accompanying
+ copyright notice, this list of conditions, and the following disclaimer
+ in the documentation and/or other materials provided with the
+ distribution.
+ 3. Names of the copyright holders must not be used to endorse or promote
+ products derived from this software without prior written permission
+ from the copyright holders.
+ 4. The right to distribute this software or to use it for any purpose does
+ not give you the right to use Servicemarks (sm) or Trademarks (tm) of
+ the copyright holders. Use of them is covered by separate agreement
+ with the copyright holders.
+ 5. If any files are modified, you must cause the modified files to carry
+ prominent notices stating that you changed the files and the date of
+ any change.
+
+ Disclaimer
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY EXPRESSED
+ 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 HOLDERS 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.
+*/
+
+/* long double version of the functions. */
+#define _NEW_COMPLEX_LDOUBLE 1
+#include "complex_internal.h"
+#include "cimag.def.h"
diff --git a/winsup/cygwin/math/clog.def.h b/winsup/cygwin/math/clog.def.h
new file mode 100644
index 000000000..604c3f321
--- /dev/null
+++ b/winsup/cygwin/math/clog.def.h
@@ -0,0 +1,71 @@
+/*
+ This Software is provided under the Zope Public License (ZPL) Version 2.1.
+
+ Copyright (c) 2009, 2010 by the mingw-w64 project
+
+ See the AUTHORS file for the list of contributors to the mingw-w64 project.
+
+ This license has been certified as open source. It has also been designated
+ as GPL compatible by the Free Software Foundation (FSF).
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions in source code must retain the accompanying copyright
+ notice, this list of conditions, and the following disclaimer.
+ 2. Redistributions in binary form must reproduce the accompanying
+ copyright notice, this list of conditions, and the following disclaimer
+ in the documentation and/or other materials provided with the
+ distribution.
+ 3. Names of the copyright holders must not be used to endorse or promote
+ products derived from this software without prior written permission
+ from the copyright holders.
+ 4. The right to distribute this software or to use it for any purpose does
+ not give you the right to use Servicemarks (sm) or Trademarks (tm) of
+ the copyright holders. Use of them is covered by separate agreement
+ with the copyright holders.
+ 5. If any files are modified, you must cause the modified files to carry
+ prominent notices stating that you changed the files and the date of
+ any change.
+
+ Disclaimer
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY EXPRESSED
+ 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 HOLDERS 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.
+*/
+
+__FLT_TYPE __complex__ __cdecl
+__FLT_ABI(clog) (__FLT_TYPE __complex__ z)
+{
+ __complex__ __FLT_TYPE ret;
+ int r_class = fpclassify (__real__ z);
+ int i_class = fpclassify (__imag__ z);
+
+ if (r_class == FP_ZERO && i_class == FP_ZERO)
+ {
+ __imag__ ret = signbit (__real__ z) ? __FLT_PI : __FLT_CST(0.0);
+ __imag__ ret = __FLT_ABI(copysign) (__imag__ ret, __imag__ z);
+ __real__ ret = -__FLT_CST(1.0) / __FLT_ABI(fabs) (__real__ z);
+ return ret;
+ }
+
+ if (r_class == FP_NAN || i_class == FP_NAN)
+ {
+ __imag__ ret = __FLT_NAN;
+ __real__ ret = ((r_class == FP_INFINITE || i_class == FP_INFINITE) ? __FLT_HUGE_VAL : __FLT_NAN);
+
+ return ret;
+ }
+
+ __real__ ret = __FLT_ABI(log) (__FLT_ABI(hypot) (__real__ z, __imag__ z));
+ __imag__ ret = __FLT_ABI(atan2) (__imag__ z, __real__ z);
+ return ret;
+}
diff --git a/winsup/cygwin/math/clog10.def.h b/winsup/cygwin/math/clog10.def.h
new file mode 100644
index 000000000..cdd4eb6b5
--- /dev/null
+++ b/winsup/cygwin/math/clog10.def.h
@@ -0,0 +1,71 @@
+/*
+ This Software is provided under the Zope Public License (ZPL) Version 2.1.
+
+ Copyright (c) 2009, 2010 by the mingw-w64 project
+
+ See the AUTHORS file for the list of contributors to the mingw-w64 project.
+
+ This license has been certified as open source. It has also been designated
+ as GPL compatible by the Free Software Foundation (FSF).
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions in source code must retain the accompanying copyright
+ notice, this list of conditions, and the following disclaimer.
+ 2. Redistributions in binary form must reproduce the accompanying
+ copyright notice, this list of conditions, and the following disclaimer
+ in the documentation and/or other materials provided with the
+ distribution.
+ 3. Names of the copyright holders must not be used to endorse or promote
+ products derived from this software without prior written permission
+ from the copyright holders.
+ 4. The right to distribute this software or to use it for any purpose does
+ not give you the right to use Servicemarks (sm) or Trademarks (tm) of
+ the copyright holders. Use of them is covered by separate agreement
+ with the copyright holders.
+ 5. If any files are modified, you must cause the modified files to carry
+ prominent notices stating that you changed the files and the date of
+ any change.
+
+ Disclaimer
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY EXPRESSED
+ 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 HOLDERS 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.
+*/
+
+__FLT_TYPE __complex__ __cdecl
+__FLT_ABI(clog10) (__FLT_TYPE __complex__ z)
+{
+ __complex__ __FLT_TYPE ret;
+ int r_class = fpclassify (__real__ z);
+ int i_class = fpclassify (__imag__ z);
+
+ if (r_class == FP_ZERO && i_class == FP_ZERO)
+ {
+ __imag__ ret = signbit (__real__ z) ? __FLT_PI : __FLT_CST(0.0);
+ __imag__ ret = __FLT_ABI(copysign) (__imag__ ret, __imag__ z);
+ __real__ ret = -__FLT_CST(1.0) / __FLT_ABI(fabs) (__real__ z);
+ return ret;
+ }
+
+ if (r_class == FP_NAN || i_class == FP_NAN)
+ {
+ __imag__ ret = __FLT_NAN;
+ __real__ ret = ((r_class == FP_INFINITE || i_class == FP_INFINITE) ? __FLT_HUGE_VAL : __FLT_NAN);
+
+ return ret;
+ }
+
+ __real__ ret = __FLT_ABI(log10) (__FLT_ABI(hypot) (__real__ z, __imag__ z));
+ __imag__ ret = __FLT_LOG10E * __FLT_ABI(atan2) (__imag__ z, __real__ z);
+ return ret;
+}
diff --git a/winsup/cygwin/math/clog10l.c b/winsup/cygwin/math/clog10l.c
new file mode 100644
index 000000000..8baa2aafd
--- /dev/null
+++ b/winsup/cygwin/math/clog10l.c
@@ -0,0 +1,48 @@
+/*
+ This Software is provided under the Zope Public License (ZPL) Version 2.1.
+
+ Copyright (c) 2009, 2010 by the mingw-w64 project
+
+ See the AUTHORS file for the list of contributors to the mingw-w64 project.
+
+ This license has been certified as open source. It has also been designated
+ as GPL compatible by the Free Software Foundation (FSF).
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions in source code must retain the accompanying copyright
+ notice, this list of conditions, and the following disclaimer.
+ 2. Redistributions in binary form must reproduce the accompanying
+ copyright notice, this list of conditions, and the following disclaimer
+ in the documentation and/or other materials provided with the
+ distribution.
+ 3. Names of the copyright holders must not be used to endorse or promote
+ products derived from this software without prior written permission
+ from the copyright holders.
+ 4. The right to distribute this software or to use it for any purpose does
+ not give you the right to use Servicemarks (sm) or Trademarks (tm) of
+ the copyright holders. Use of them is covered by separate agreement
+ with the copyright holders.
+ 5. If any files are modified, you must cause the modified files to carry
+ prominent notices stating that you changed the files and the date of
+ any change.
+
+ Disclaimer
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY EXPRESSED
+ 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 HOLDERS 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.
+*/
+
+/* long double version of the functions. */
+#define _NEW_COMPLEX_LDOUBLE 1
+#include "complex_internal.h"
+#include "clog10.def.h"
diff --git a/winsup/cygwin/math/clogl.c b/winsup/cygwin/math/clogl.c
new file mode 100644
index 000000000..383fcfa0f
--- /dev/null
+++ b/winsup/cygwin/math/clogl.c
@@ -0,0 +1,48 @@
+/*
+ This Software is provided under the Zope Public License (ZPL) Version 2.1.
+
+ Copyright (c) 2009, 2010 by the mingw-w64 project
+
+ See the AUTHORS file for the list of contributors to the mingw-w64 project.
+
+ This license has been certified as open source. It has also been designated
+ as GPL compatible by the Free Software Foundation (FSF).
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions in source code must retain the accompanying copyright
+ notice, this list of conditions, and the following disclaimer.
+ 2. Redistributions in binary form must reproduce the accompanying
+ copyright notice, this list of conditions, and the following disclaimer
+ in the documentation and/or other materials provided with the
+ distribution.
+ 3. Names of the copyright holders must not be used to endorse or promote
+ products derived from this software without prior written permission
+ from the copyright holders.
+ 4. The right to distribute this software or to use it for any purpose does
+ not give you the right to use Servicemarks (sm) or Trademarks (tm) of
+ the copyright holders. Use of them is covered by separate agreement
+ with the copyright holders.
+ 5. If any files are modified, you must cause the modified files to carry
+ prominent notices stating that you changed the files and the date of
+ any change.
+
+ Disclaimer
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY EXPRESSED
+ 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 HOLDERS 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.
+*/
+
+/* long double version of the functions. */
+#define _NEW_COMPLEX_LDOUBLE 1
+#include "complex_internal.h"
+#include "clog.def.h"
diff --git a/winsup/cygwin/math/complex_internal.h b/winsup/cygwin/math/complex_internal.h
new file mode 100644
index 000000000..b230b15b8
--- /dev/null
+++ b/winsup/cygwin/math/complex_internal.h
@@ -0,0 +1,153 @@
+/*
+ This Software is provided under the Zope Public License (ZPL) Version 2.1.
+
+ Copyright (c) 2009, 2010 by the mingw-w64 project
+
+ See the AUTHORS file for the list of contributors to the mingw-w64 project.
+
+ This license has been certified as open source. It has also been designated
+ as GPL compatible by the Free Software Foundation (FSF).
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions in source code must retain the accompanying copyright
+ notice, this list of conditions, and the following disclaimer.
+ 2. Redistributions in binary form must reproduce the accompanying
+ copyright notice, this list of conditions, and the following disclaimer
+ in the documentation and/or other materials provided with the
+ distribution.
+ 3. Names of the copyright holders must not be used to endorse or promote
+ products derived from this software without prior written permission
+ from the copyright holders.
+ 4. The right to distribute this software or to use it for any purpose does
+ not give you the right to use Servicemarks (sm) or Trademarks (tm) of
+ the copyright holders. Use of them is covered by separate agreement
+ with the copyright holders.
+ 5. If any files are modified, you must cause the modified files to carry
+ prominent notices stating that you changed the files and the date of
+ any change.
+
+ Disclaimer
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY EXPRESSED
+ 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 HOLDERS 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 __CYGWIN__
+/* Disable __IMPORT when defining __fdlib_version. */
+#define _COMPILING_NEWLIB
+#define _GNU_SOURCE
+#endif
+#include <math.h>
+#include <complex.h>
+
+/* Define some PI constants for long double, as they are not defined in math.h */
+#ifndef M_PI_4l
+#define M_PI_4l 0.7853981633974483096156608458198757L
+#define M_PI_2l 1.5707963267948966192313216916397514L
+#define M_PIl 3.1415926535897932384626433832795029L
+#endif
+
+/* NAN builtins for gcc, as they are not part of math.h */
+#ifndef NANF
+#define NANF __builtin_nanf ("")
+#endif
+#ifndef NANL
+#define NANL __builtin_nanl ("")
+#endif
+
+/* Some more helpers. */
+#define M_PI_3_4 (M_PI - M_PI_4)
+#define M_PI_3_4l (M_PIl - M_PI_4l)
+
+#if defined(_NEW_COMPLEX_FLOAT)
+# define __FLT_TYPE float
+# define __FLT_ABI(N) N##f
+# define __FLT_CST(N) N##F
+# define __FLT_EPSILON __FLT_EPSILON__
+# define __FLT_NAN NANF
+# define __FLT_HUGE_VAL HUGE_VALF
+# define __FLT_PI M_PI
+# define __FLT_PI_2 M_PI_2
+# define __FLT_PI_4 M_PI_4
+# define __FLT_PI_3_4 M_PI_3_4
+# define __FLT_MAXLOG 88.72283905206835F
+# define __FLT_MINLOG -103.278929903431851103F
+# define __FLT_LOGE2 0.693147180559945309F
+# define __FLT_LOG10E 0.434294481903251828F
+# define __FLT_REPORT(NAME) NAME "f"
+#elif defined(_NEW_COMPLEX_DOUBLE)
+# define __FLT_TYPE double
+# define __FLT_ABI(N) N
+# define __FLT_EPSILON __DBL_EPSILON__
+# define __FLT_CST(N) N
+# define __FLT_NAN NAN
+# define __FLT_HUGE_VAL HUGE_VAL
+# define __FLT_PI M_PI
+# define __FLT_PI_2 M_PI_2
+# define __FLT_PI_4 M_PI_4
+# define __FLT_PI_3_4 M_PI_3_4
+# define __FLT_MAXLOG 7.09782712893383996843E2
+# define __FLT_MINLOG -7.45133219101941108420E2
+# define __FLT_LOGE2 6.93147180559945309417E-1
+# define __FLT_LOG10E 4.34294481903251827651E-1
+# define __FLT_REPORT(NAME) NAME
+#elif defined(_NEW_COMPLEX_LDOUBLE)
+# define __FLT_TYPE long double
+# define __FLT_ABI(N) N##l
+# define __FLT_CST(N) N##L
+# define __FLT_EPSILON __LDBL_EPSILON__
+# define __FLT_NAN NANL
+# define __FLT_HUGE_VAL HUGE_VALL
+# define __FLT_PI M_PIl
+# define __FLT_PI_2 M_PI_2l
+# define __FLT_PI_4 M_PI_4l
+# define __FLT_PI_3_4 M_PI_3_4l
+# define __FLT_MAXLOG 1.1356523406294143949492E4L
+# define __FLT_MINLOG -1.1355137111933024058873E4L
+# define __FLT_LOGE2 6.9314718055994530941723E-1L
+# define __FLT_LOG10E 4.3429448190325182765113E-1L
+# define __FLT_REPORT(NAME) NAME "l"
+#else
+# error "Unknown complex number type"
+#endif
+
+#define __FLT_RPT_DOMAIN(NAME, ARG1, ARG2, RSLT) \
+ errno = EDOM, \
+ __mingw_raise_matherr (_DOMAIN, __FLT_REPORT(NAME), (double) (ARG1), \
+ (double) (ARG2), (double) (RSLT))
+#define __FLT_RPT_ERANGE(NAME, ARG1, ARG2, RSLT, OVL) \
+ errno = ERANGE, \
+ __mingw_raise_matherr (((OVL) ? _OVERFLOW : _UNDERFLOW), \
+ __FLT_REPORT(NAME), (double) (ARG1), \
+ (double) (ARG2), (double) (RSLT))
+
+#ifdef __CYGWIN__
+inline void __attribute__ ((always_inline))
+__mingw_raise_matherr (int typ, const char *name, double a1, double a2,
+ double rslt)
+{
+ if (_LIB_VERSION != _POSIX_)
+ {
+ struct exception ex;
+ ex.type = typ;
+ ex.name = (char*)name;
+ ex.arg1 = a1;
+ ex.arg2 = a2;
+ ex.retval = rslt;
+ matherr(&ex);
+ }
+}
+#define _DOMAIN DOMAIN
+#define _OVERFLOW OVERFLOW
+#define _UNDERFLOW UNDERFLOW
+#endif
diff --git a/winsup/cygwin/math/conj.def.h b/winsup/cygwin/math/conj.def.h
new file mode 100644
index 000000000..35fa8989d
--- /dev/null
+++ b/winsup/cygwin/math/conj.def.h
@@ -0,0 +1,49 @@
+/*
+ This Software is provided under the Zope Public License (ZPL) Version 2.1.
+
+ Copyright (c) 2009, 2010 by the mingw-w64 project
+
+ See the AUTHORS file for the list of contributors to the mingw-w64 project.
+
+ This license has been certified as open source. It has also been designated
+ as GPL compatible by the Free Software Foundation (FSF).
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions in source code must retain the accompanying copyright
+ notice, this list of conditions, and the following disclaimer.
+ 2. Redistributions in binary form must reproduce the accompanying
+ copyright notice, this list of conditions, and the following disclaimer
+ in the documentation and/or other materials provided with the
+ distribution.
+ 3. Names of the copyright holders must not be used to endorse or promote
+ products derived from this software without prior written permission
+ from the copyright holders.
+ 4. The right to distribute this software or to use it for any purpose does
+ not give you the right to use Servicemarks (sm) or Trademarks (tm) of
+ the copyright holders. Use of them is covered by separate agreement
+ with the copyright holders.
+ 5. If any files are modified, you must cause the modified files to carry
+ prominent notices stating that you changed the files and the date of
+ any change.
+
+ Disclaimer
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY EXPRESSED
+ 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 HOLDERS 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.
+*/
+
+__FLT_TYPE __complex__ __cdecl
+__FLT_ABI(conj) (__FLT_TYPE __complex__ z)
+{
+ return ~z;
+}
diff --git a/winsup/cygwin/math/conjl.c b/winsup/cygwin/math/conjl.c
new file mode 100644
index 000000000..52e32e65a
--- /dev/null
+++ b/winsup/cygwin/math/conjl.c
@@ -0,0 +1,48 @@
+/*
+ This Software is provided under the Zope Public License (ZPL) Version 2.1.
+
+ Copyright (c) 2009, 2010 by the mingw-w64 project
+
+ See the AUTHORS file for the list of contributors to the mingw-w64 project.
+
+ This license has been certified as open source. It has also been designated
+ as GPL compatible by the Free Software Foundation (FSF).
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions in source code must retain the accompanying copyright
+ notice, this list of conditions, and the following disclaimer.
+ 2. Redistributions in binary form must reproduce the accompanying
+ copyright notice, this list of conditions, and the following disclaimer
+ in the documentation and/or other materials provided with the
+ distribution.
+ 3. Names of the copyright holders must not be used to endorse or promote
+ products derived from this software without prior written permission
+ from the copyright holders.
+ 4. The right to distribute this software or to use it for any purpose does
+ not give you the right to use Servicemarks (sm) or Trademarks (tm) of
+ the copyright holders. Use of them is covered by separate agreement
+ with the copyright holders.
+ 5. If any files are modified, you must cause the modified files to carry
+ prominent notices stating that you changed the files and the date of
+ any change.
+
+ Disclaimer
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY EXPRESSED
+ 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 HOLDERS 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.
+*/
+
+/* long double version of the functions. */
+#define _NEW_COMPLEX_LDOUBLE 1
+#include "complex_internal.h"
+#include "conj.def.h"
diff --git a/winsup/cygwin/math/copysignl.S b/winsup/cygwin/math/copysignl.S
new file mode 100644
index 000000000..ffe6240d5
--- /dev/null
+++ b/winsup/cygwin/math/copysignl.S
@@ -0,0 +1,56 @@
+/**
+ * This file has no copyright assigned and is placed in the Public Domain.
+ * This file is part of the mingw-w64 runtime package.
+ * No warranty is given; refer to the file DISCLAIMER.PD within this package.
+ */
+/*
+ * Written by J.T. Conklin <jtc@netbsd.org>.
+ * Changes for long double by Ulrich Drepper <drepper@cygnus.com>
+ * Public domain.
+ */
+#include <_mingw_mac.h>
+
+ .file "copysignl.S"
+ .text
+#ifdef __x86_64__
+ .align 8
+#else
+ .align 4
+#endif
+
+ .globl __MINGW_USYMBOL(copysignl)
+ .def __MINGW_USYMBOL(copysignl); .scl 2; .type 32; .endef
+__MINGW_USYMBOL(copysignl):
+#if defined(_AMD64_) || defined(__x86_64__)
+ movq (%rdx), %rax
+ movq %rax, (%rcx)
+ movq 8(%rdx), %rax
+ movq 8(%r8), %rdx
+ andq $0x777f, %rax
+ andq $0x8000, %rdx
+ orq %rdx, %rax
+ movq %rax, 8(%rcx)
+ movq %rcx, %rax
+ ret
+#elif defined(_ARM_) || defined(__arm__)
+ fcmpzd d1
+ fmstat
+ bmi 1f /* jump if d1 is negative */
+ fcmpzd d0
+ fmstat
+ vnegmi.f64 d0, d0 /* negate d0 if it is negative */
+ bx lr
+ 1: fcmpzd d0
+ fmstat
+ vnegpl.f64 d0, d0 /* negate d0 if it is positive */
+ bx lr
+#elif defined(_X86_) || defined(__i386__)
+ movl 24(%esp),%edx
+ movl 12(%esp),%eax
+ andl $0x8000,%edx
+ andl $0x7fff,%eax
+ orl %edx,%eax
+ movl %eax,12(%esp)
+ fldt 4(%esp)
+ ret
+#endif
diff --git a/winsup/cygwin/math/cos.def.h b/winsup/cygwin/math/cos.def.h
new file mode 100644
index 000000000..1058d031f
--- /dev/null
+++ b/winsup/cygwin/math/cos.def.h
@@ -0,0 +1,65 @@
+/*
+ This Software is provided under the Zope Public License (ZPL) Version 2.1.
+
+ Copyright (c) 2009, 2010 by the mingw-w64 project
+
+ See the AUTHORS file for the list of contributors to the mingw-w64 project.
+
+ This license has been certified as open source. It has also been designated
+ as GPL compatible by the Free Software Foundation (FSF).
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions in source code must retain the accompanying copyright
+ notice, this list of conditions, and the following disclaimer.
+ 2. Redistributions in binary form must reproduce the accompanying
+ copyright notice, this list of conditions, and the following disclaimer
+ in the documentation and/or other materials provided with the
+ distribution.
+ 3. Names of the copyright holders must not be used to endorse or promote
+ products derived from this software without prior written permission
+ from the copyright holders.
+ 4. The right to distribute this software or to use it for any purpose does
+ not give you the right to use Servicemarks (sm) or Trademarks (tm) of
+ the copyright holders. Use of them is covered by separate agreement
+ with the copyright holders.
+ 5. If any files are modified, you must cause the modified files to carry
+ prominent notices stating that you changed the files and the date of
+ any change.
+
+ Disclaimer
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY EXPRESSED
+ 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 HOLDERS 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 "complex_internal.h"
+#include <errno.h>
+
+extern long double __cosl_internal (long double);
+
+__FLT_TYPE
+__FLT_ABI(cos) (__FLT_TYPE x)
+{
+ int x_class = fpclassify (x);
+ if (x_class == FP_NAN)
+ {
+ __FLT_RPT_DOMAIN ("cos", x, 0.0, x);
+ return x;
+ }
+ else if (x_class == FP_INFINITE)
+ {
+ __FLT_RPT_DOMAIN ("cos", x, 0.0, __FLT_NAN);
+ return __FLT_NAN;
+ }
+ return (__FLT_TYPE) __cosl_internal ((long double) x);
+}
diff --git a/winsup/cygwin/math/coshl.c b/winsup/cygwin/math/coshl.c
new file mode 100644
index 000000000..d7eb4b7cb
--- /dev/null
+++ b/winsup/cygwin/math/coshl.c
@@ -0,0 +1,45 @@
+/**
+ * This file has no copyright assigned and is placed in the Public Domain.
+ * This file is part of the mingw-w64 runtime package.
+ * No warranty is given; refer to the file DISCLAIMER.PD within this package.
+ */
+#include "cephes_mconf.h"
+
+#ifndef _SET_ERRNO
+#define _SET_ERRNO(x)
+#endif
+
+long double coshl(long double x)
+{
+ long double y;
+ int x_class = fpclassify (x);
+ if (x_class == FP_NAN)
+ {
+ errno = EDOM;
+ return x;
+ }
+ else if (x_class == FP_INFINITE)
+ {
+ errno = ERANGE;
+ return x;
+ }
+ x = fabsl (x);
+ if (x > (MAXLOGL + LOGE2L))
+ {
+ errno = ERANGE;
+#ifdef INFINITIES
+ return (INFINITYL);
+#else
+ return (MAXNUML);
+#endif
+ }
+ if (x >= (MAXLOGL - LOGE2L))
+ {
+ y = expl(0.5L * x);
+ y = (0.5L * y) * y;
+ return y;
+ }
+ y = expl(x);
+ y = 0.5L * (y + 1.0L / y);
+ return y;
+}
diff --git a/winsup/cygwin/math/cosl.c b/winsup/cygwin/math/cosl.c
new file mode 100644
index 000000000..f798862d3
--- /dev/null
+++ b/winsup/cygwin/math/cosl.c
@@ -0,0 +1,46 @@
+/*
+ This Software is provided under the Zope Public License (ZPL) Version 2.1.
+
+ Copyright (c) 2009, 2010 by the mingw-w64 project
+
+ See the AUTHORS file for the list of contributors to the mingw-w64 project.
+
+ This license has been certified as open source. It has also been designated
+ as GPL compatible by the Free Software Foundation (FSF).
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions in source code must retain the accompanying copyright
+ notice, this list of conditions, and the following disclaimer.
+ 2. Redistributions in binary form must reproduce the accompanying
+ copyright notice, this list of conditions, and the following disclaimer
+ in the documentation and/or other materials provided with the
+ distribution.
+ 3. Names of the copyright holders must not be used to endorse or promote
+ products derived from this software without prior written permission
+ from the copyright holders.
+ 4. The right to distribute this software or to use it for any purpose does
+ not give you the right to use Servicemarks (sm) or Trademarks (tm) of
+ the copyright holders. Use of them is covered by separate agreement
+ with the copyright holders.
+ 5. If any files are modified, you must cause the modified files to carry
+ prominent notices stating that you changed the files and the date of
+ any change.
+
+ Disclaimer
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY EXPRESSED
+ 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 HOLDERS 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.
+*/
+
+#define _NEW_COMPLEX_LDOUBLE 1
+#include "cos.def.h"
diff --git a/winsup/cygwin/math/cosl_internal.S b/winsup/cygwin/math/cosl_internal.S
new file mode 100644
index 000000000..3c8f60d14
--- /dev/null
+++ b/winsup/cygwin/math/cosl_internal.S
@@ -0,0 +1,55 @@
+/**
+ * This file has no copyright assigned and is placed in the Public Domain.
+ * This file is part of the mingw-w64 runtime package.
+ * No warranty is given; refer to the file DISCLAIMER.PD within this package.
+ */
+#include <_mingw_mac.h>
+
+ .file "cosl_internal.S"
+ .text
+#ifdef __x86_64__
+ .align 8
+#else
+ .align 4
+#endif
+.globl __MINGW_USYMBOL(__cosl_internal)
+ .def __MINGW_USYMBOL(__cosl_internal); .scl 2; .type 32; .endef
+__MINGW_USYMBOL(__cosl_internal):
+#ifdef __x86_64__
+ fldt (%rdx)
+ fcos
+ fnstsw %ax
+ testl $0x400,%eax
+ jz 1f
+ fldpi
+ fadd %st(0)
+ fxch %st(1)
+2: fprem1
+ fnstsw %ax
+ testl $0x400,%eax
+ jnz 2b
+ fstp %st(1)
+ fcos
+1: movq %rcx,%rax
+ movq $0,8(%rcx)
+ fstpt (%rcx)
+ ret
+#else
+ fldt 4(%esp)
+ fcos
+ fnstsw %ax
+ testl $0x400,%eax
+ jnz 1f
+ ret
+1: fldpi
+ fadd %st(0)
+ fxch %st(1)
+2: fprem1
+ fnstsw %ax
+ testl $0x400,%eax
+ jnz 2b
+ fstp %st(1)
+ fcos
+ ret
+#endif
+
diff --git a/winsup/cygwin/math/cossin.c b/winsup/cygwin/math/cossin.c
new file mode 100644
index 000000000..0095daa66
--- /dev/null
+++ b/winsup/cygwin/math/cossin.c
@@ -0,0 +1,75 @@
+/**
+ * This file has no copyright assigned and is placed in the Public Domain.
+ * This file is part of the mingw-w64 runtime package.
+ * No warranty is given; refer to the file DISCLAIMER.PD within this package.
+ */
+
+void sincos (double __x, double *p_sin, double *p_cos);
+void sincosl (long double __x, long double *p_sin, long double *p_cos);
+void sincosf (float __x, float *p_sin, float *p_cos);
+
+void sincos (double __x, double *p_sin, double *p_cos)
+{
+ long double c, s;
+
+ __asm__ __volatile__ ("fsincos\n\t"
+ "fnstsw %%ax\n\t"
+ "testl $0x400, %%eax\n\t"
+ "jz 1f\n\t"
+ "fldpi\n\t"
+ "fadd %%st(0)\n\t"
+ "fxch %%st(1)\n\t"
+ "2: fprem1\n\t"
+ "fnstsw %%ax\n\t"
+ "testl $0x400, %%eax\n\t"
+ "jnz 2b\n\t"
+ "fstp %%st(1)\n\t"
+ "fsincos\n\t"
+ "1:" : "=t" (c), "=u" (s) : "0" (__x));
+ *p_sin = (double) s;
+ *p_cos = (double) c;
+}
+
+void sincosf (float __x, float *p_sin, float *p_cos)
+{
+ long double c, s;
+
+ __asm__ __volatile__ ("fsincos\n\t"
+ "fnstsw %%ax\n\t"
+ "testl $0x400, %%eax\n\t"
+ "jz 1f\n\t"
+ "fldpi\n\t"
+ "fadd %%st(0)\n\t"
+ "fxch %%st(1)\n\t"
+ "2: fprem1\n\t"
+ "fnstsw %%ax\n\t"
+ "testl $0x400, %%eax\n\t"
+ "jnz 2b\n\t"
+ "fstp %%st(1)\n\t"
+ "fsincos\n\t"
+ "1:" : "=t" (c), "=u" (s) : "0" (__x));
+ *p_sin = (float) s;
+ *p_cos = (float) c;
+}
+
+void sincosl (long double __x, long double *p_sin, long double *p_cos)
+{
+ long double c, s;
+
+ __asm__ __volatile__ ("fsincos\n\t"
+ "fnstsw %%ax\n\t"
+ "testl $0x400, %%eax\n\t"
+ "jz 1f\n\t"
+ "fldpi\n\t"
+ "fadd %%st(0)\n\t"
+ "fxch %%st(1)\n\t"
+ "2: fprem1\n\t"
+ "fnstsw %%ax\n\t"
+ "testl $0x400, %%eax\n\t"
+ "jnz 2b\n\t"
+ "fstp %%st(1)\n\t"
+ "fsincos\n\t"
+ "1:" : "=t" (c), "=u" (s) : "0" (__x));
+ *p_sin = s;
+ *p_cos = c;
+}
diff --git a/winsup/cygwin/math/cpow.def.h b/winsup/cygwin/math/cpow.def.h
new file mode 100644
index 000000000..984224b96
--- /dev/null
+++ b/winsup/cygwin/math/cpow.def.h
@@ -0,0 +1,49 @@
+/*
+ This Software is provided under the Zope Public License (ZPL) Version 2.1.
+
+ Copyright (c) 2009, 2010 by the mingw-w64 project
+
+ See the AUTHORS file for the list of contributors to the mingw-w64 project.
+
+ This license has been certified as open source. It has also been designated
+ as GPL compatible by the Free Software Foundation (FSF).
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions in source code must retain the accompanying copyright
+ notice, this list of conditions, and the following disclaimer.
+ 2. Redistributions in binary form must reproduce the accompanying
+ copyright notice, this list of conditions, and the following disclaimer
+ in the documentation and/or other materials provided with the
+ distribution.
+ 3. Names of the copyright holders must not be used to endorse or promote
+ products derived from this software without prior written permission
+ from the copyright holders.
+ 4. The right to distribute this software or to use it for any purpose does
+ not give you the right to use Servicemarks (sm) or Trademarks (tm) of
+ the copyright holders. Use of them is covered by separate agreement
+ with the copyright holders.
+ 5. If any files are modified, you must cause the modified files to carry
+ prominent notices stating that you changed the files and the date of
+ any change.
+
+ Disclaimer
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY EXPRESSED
+ 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 HOLDERS 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.
+*/
+
+__FLT_TYPE __complex__ __cdecl
+__FLT_ABI(cpow) (__FLT_TYPE __complex__ z, __FLT_TYPE __complex__ x)
+{
+ return __FLT_ABI(cexp) (x * __FLT_ABI(clog) (z));
+}
diff --git a/winsup/cygwin/math/cpowl.c b/winsup/cygwin/math/cpowl.c
new file mode 100644
index 000000000..42edb7996
--- /dev/null
+++ b/winsup/cygwin/math/cpowl.c
@@ -0,0 +1,48 @@
+/*
+ This Software is provided under the Zope Public License (ZPL) Version 2.1.
+
+ Copyright (c) 2009, 2010 by the mingw-w64 project
+
+ See the AUTHORS file for the list of contributors to the mingw-w64 project.
+
+ This license has been certified as open source. It has also been designated
+ as GPL compatible by the Free Software Foundation (FSF).
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions in source code must retain the accompanying copyright
+ notice, this list of conditions, and the following disclaimer.
+ 2. Redistributions in binary form must reproduce the accompanying
+ copyright notice, this list of conditions, and the following disclaimer
+ in the documentation and/or other materials provided with the
+ distribution.
+ 3. Names of the copyright holders must not be used to endorse or promote
+ products derived from this software without prior written permission
+ from the copyright holders.
+ 4. The right to distribute this software or to use it for any purpose does
+ not give you the right to use Servicemarks (sm) or Trademarks (tm) of
+ the copyright holders. Use of them is covered by separate agreement
+ with the copyright holders.
+ 5. If any files are modified, you must cause the modified files to carry
+ prominent notices stating that you changed the files and the date of
+ any change.
+
+ Disclaimer
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY EXPRESSED
+ 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 HOLDERS 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.
+*/
+
+/* long double version of the functions. */
+#define _NEW_COMPLEX_LDOUBLE 1
+#include "complex_internal.h"
+#include "cpow.def.h"
diff --git a/winsup/cygwin/math/cproj.def.h b/winsup/cygwin/math/cproj.def.h
new file mode 100644
index 000000000..e15d779f7
--- /dev/null
+++ b/winsup/cygwin/math/cproj.def.h
@@ -0,0 +1,58 @@
+/*
+ This Software is provided under the Zope Public License (ZPL) Version 2.1.
+
+ Copyright (c) 2009, 2010 by the mingw-w64 project
+
+ See the AUTHORS file for the list of contributors to the mingw-w64 project.
+
+ This license has been certified as open source. It has also been designated
+ as GPL compatible by the Free Software Foundation (FSF).
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions in source code must retain the accompanying copyright
+ notice, this list of conditions, and the following disclaimer.
+ 2. Redistributions in binary form must reproduce the accompanying
+ copyright notice, this list of conditions, and the following disclaimer
+ in the documentation and/or other materials provided with the
+ distribution.
+ 3. Names of the copyright holders must not be used to endorse or promote
+ products derived from this software without prior written permission
+ from the copyright holders.
+ 4. The right to distribute this software or to use it for any purpose does
+ not give you the right to use Servicemarks (sm) or Trademarks (tm) of
+ the copyright holders. Use of them is covered by separate agreement
+ with the copyright holders.
+ 5. If any files are modified, you must cause the modified files to carry
+ prominent notices stating that you changed the files and the date of
+ any change.
+
+ Disclaimer
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY EXPRESSED
+ 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 HOLDERS 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.
+*/
+
+__FLT_TYPE __complex__ __cdecl
+__FLT_ABI(cproj) (__FLT_TYPE __complex__ z)
+{
+ __complex__ __FLT_TYPE ret;
+
+ if (isinf (__real__ z) || isinf (__imag__ z))
+ {
+ __real__ ret = INFINITY;
+ __imag__ ret = __FLT_ABI(copysign) (__FLT_CST(0.0), __imag__ z);
+ return ret;
+ }
+
+ return z;
+}
diff --git a/winsup/cygwin/math/cprojl.c b/winsup/cygwin/math/cprojl.c
new file mode 100644
index 000000000..d48d10877
--- /dev/null
+++ b/winsup/cygwin/math/cprojl.c
@@ -0,0 +1,48 @@
+/*
+ This Software is provided under the Zope Public License (ZPL) Version 2.1.
+
+ Copyright (c) 2009, 2010 by the mingw-w64 project
+
+ See the AUTHORS file for the list of contributors to the mingw-w64 project.
+
+ This license has been certified as open source. It has also been designated
+ as GPL compatible by the Free Software Foundation (FSF).
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions in source code must retain the accompanying copyright
+ notice, this list of conditions, and the following disclaimer.
+ 2. Redistributions in binary form must reproduce the accompanying
+ copyright notice, this list of conditions, and the following disclaimer
+ in the documentation and/or other materials provided with the
+ distribution.
+ 3. Names of the copyright holders must not be used to endorse or promote
+ products derived from this software without prior written permission
+ from the copyright holders.
+ 4. The right to distribute this software or to use it for any purpose does
+ not give you the right to use Servicemarks (sm) or Trademarks (tm) of
+ the copyright holders. Use of them is covered by separate agreement
+ with the copyright holders.
+ 5. If any files are modified, you must cause the modified files to carry
+ prominent notices stating that you changed the files and the date of
+ any change.
+
+ Disclaimer
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY EXPRESSED
+ 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 HOLDERS 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.
+*/
+
+/* long double version of the functions. */
+#define _NEW_COMPLEX_LDOUBLE 1
+#include "complex_internal.h"
+#include "cproj.def.h"
diff --git a/winsup/cygwin/math/creal.def.h b/winsup/cygwin/math/creal.def.h
new file mode 100644
index 000000000..554c99d8c
--- /dev/null
+++ b/winsup/cygwin/math/creal.def.h
@@ -0,0 +1,49 @@
+/*
+ This Software is provided under the Zope Public License (ZPL) Version 2.1.
+
+ Copyright (c) 2009, 2010 by the mingw-w64 project
+
+ See the AUTHORS file for the list of contributors to the mingw-w64 project.
+
+ This license has been certified as open source. It has also been designated
+ as GPL compatible by the Free Software Foundation (FSF).
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions in source code must retain the accompanying copyright
+ notice, this list of conditions, and the following disclaimer.
+ 2. Redistributions in binary form must reproduce the accompanying
+ copyright notice, this list of conditions, and the following disclaimer
+ in the documentation and/or other materials provided with the
+ distribution.
+ 3. Names of the copyright holders must not be used to endorse or promote
+ products derived from this software without prior written permission
+ from the copyright holders.
+ 4. The right to distribute this software or to use it for any purpose does
+ not give you the right to use Servicemarks (sm) or Trademarks (tm) of
+ the copyright holders. Use of them is covered by separate agreement
+ with the copyright holders.
+ 5. If any files are modified, you must cause the modified files to carry
+ prominent notices stating that you changed the files and the date of
+ any change.
+
+ Disclaimer
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY EXPRESSED
+ 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 HOLDERS 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.
+*/
+
+__FLT_TYPE
+__FLT_ABI(creal) (__FLT_TYPE __complex__ z)
+{
+ return __real__ z;
+}
diff --git a/winsup/cygwin/math/creall.c b/winsup/cygwin/math/creall.c
new file mode 100644
index 000000000..e46c8ea37
--- /dev/null
+++ b/winsup/cygwin/math/creall.c
@@ -0,0 +1,48 @@
+/*
+ This Software is provided under the Zope Public License (ZPL) Version 2.1.
+
+ Copyright (c) 2009, 2010 by the mingw-w64 project
+
+ See the AUTHORS file for the list of contributors to the mingw-w64 project.
+
+ This license has been certified as open source. It has also been designated
+ as GPL compatible by the Free Software Foundation (FSF).
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions in source code must retain the accompanying copyright
+ notice, this list of conditions, and the following disclaimer.
+ 2. Redistributions in binary form must reproduce the accompanying
+ copyright notice, this list of conditions, and the following disclaimer
+ in the documentation and/or other materials provided with the
+ distribution.
+ 3. Names of the copyright holders must not be used to endorse or promote
+ products derived from this software without prior written permission
+ from the copyright holders.
+ 4. The right to distribute this software or to use it for any purpose does
+ not give you the right to use Servicemarks (sm) or Trademarks (tm) of
+ the copyright holders. Use of them is covered by separate agreement
+ with the copyright holders.
+ 5. If any files are modified, you must cause the modified files to carry
+ prominent notices stating that you changed the files and the date of
+ any change.
+
+ Disclaimer
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY EXPRESSED
+ 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 HOLDERS 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.
+*/
+
+/* long double version of the functions. */
+#define _NEW_COMPLEX_LDOUBLE 1
+#include "complex_internal.h"
+#include "creal.def.h"
diff --git a/winsup/cygwin/math/csin.def.h b/winsup/cygwin/math/csin.def.h
new file mode 100644
index 000000000..cf9cfe108
--- /dev/null
+++ b/winsup/cygwin/math/csin.def.h
@@ -0,0 +1,61 @@
+/*
+ This Software is provided under the Zope Public License (ZPL) Version 2.1.
+
+ Copyright (c) 2009, 2010 by the mingw-w64 project
+
+ See the AUTHORS file for the list of contributors to the mingw-w64 project.
+
+ This license has been certified as open source. It has also been designated
+ as GPL compatible by the Free Software Foundation (FSF).
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions in source code must retain the accompanying copyright
+ notice, this list of conditions, and the following disclaimer.
+ 2. Redistributions in binary form must reproduce the accompanying
+ copyright notice, this list of conditions, and the following disclaimer
+ in the documentation and/or other materials provided with the
+ distribution.
+ 3. Names of the copyright holders must not be used to endorse or promote
+ products derived from this software without prior written permission
+ from the copyright holders.
+ 4. The right to distribute this software or to use it for any purpose does
+ not give you the right to use Servicemarks (sm) or Trademarks (tm) of
+ the copyright holders. Use of them is covered by separate agreement
+ with the copyright holders.
+ 5. If any files are modified, you must cause the modified files to carry
+ prominent notices stating that you changed the files and the date of
+ any change.
+
+ Disclaimer
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY EXPRESSED
+ 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 HOLDERS 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.
+*/
+
+__FLT_TYPE __complex__ __cdecl
+__FLT_ABI(csin) (__FLT_TYPE __complex__ z)
+{
+ /* Annex G.6: csin(z) = -i csinh (iz) */
+ __complex__ __FLT_TYPE ret;
+ __complex__ __FLT_TYPE x;
+
+ __real__ x = -__imag__ z;
+ __imag__ x = __real__ z;
+
+ x = __FLT_ABI(csinh) (x);
+
+ __real__ ret = __imag__ x;
+ __imag__ ret = -__real__ x;
+
+ return ret;
+}
diff --git a/winsup/cygwin/math/csinh.def.h b/winsup/cygwin/math/csinh.def.h
new file mode 100644
index 000000000..3e07d2bab
--- /dev/null
+++ b/winsup/cygwin/math/csinh.def.h
@@ -0,0 +1,107 @@
+/*
+ This Software is provided under the Zope Public License (ZPL) Version 2.1.
+
+ Copyright (c) 2009, 2010 by the mingw-w64 project
+
+ See the AUTHORS file for the list of contributors to the mingw-w64 project.
+
+ This license has been certified as open source. It has also been designated
+ as GPL compatible by the Free Software Foundation (FSF).
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions in source code must retain the accompanying copyright
+ notice, this list of conditions, and the following disclaimer.
+ 2. Redistributions in binary form must reproduce the accompanying
+ copyright notice, this list of conditions, and the following disclaimer
+ in the documentation and/or other materials provided with the
+ distribution.
+ 3. Names of the copyright holders must not be used to endorse or promote
+ products derived from this software without prior written permission
+ from the copyright holders.
+ 4. The right to distribute this software or to use it for any purpose does
+ not give you the right to use Servicemarks (sm) or Trademarks (tm) of
+ the copyright holders. Use of them is covered by separate agreement
+ with the copyright holders.
+ 5. If any files are modified, you must cause the modified files to carry
+ prominent notices stating that you changed the files and the date of
+ any change.
+
+ Disclaimer
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY EXPRESSED
+ 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 HOLDERS 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.
+*/
+
+__FLT_TYPE __complex__ __cdecl
+__FLT_ABI(csinh) (__FLT_TYPE __complex__ z)
+{
+ __complex__ __FLT_TYPE ret;
+ __FLT_TYPE s_x, c_x;
+ int negate = signbit (__real__ z);
+ int r_class = fpclassify (__real__ z);
+ int i_class = fpclassify (__imag__ z);
+
+ __real__ z = __FLT_ABI(fabs) (__real__ z);
+
+ if (r_class == FP_NAN)
+ {
+ __real__ ret = __FLT_NAN;
+ __imag__ ret = __imag__ z == __FLT_CST(0.0) ? __imag__ z : __FLT_NAN;
+
+ return ret;
+ }
+
+ if (r_class == FP_INFINITE)
+ {
+ if (i_class == FP_ZERO)
+ {
+ __real__ ret = negate ? -__FLT_HUGE_VAL : __FLT_HUGE_VAL;
+ __imag__ ret = __imag__ z;
+ return ret;
+ }
+
+ if (i_class == FP_NAN || i_class == FP_INFINITE)
+ {
+ __real__ ret = __FLT_HUGE_VAL;
+ __imag__ ret = __FLT_NAN + __FLT_NAN;
+
+ return ret;
+ }
+ __FLT_ABI(sincos) (__imag__ z, &s_x, &c_x);
+
+ __real__ ret = __FLT_ABI(copysign) (__FLT_HUGE_VAL, c_x);
+ __imag__ ret = __FLT_ABI(copysign) (__FLT_HUGE_VAL, s_x);
+
+ if (negate)
+ __real__ ret = -__real__ ret;
+ return ret;
+ }
+
+ if (i_class == FP_NAN || i_class == FP_INFINITE)
+ {
+ __real__ ret = (r_class == FP_ZERO
+ ? (__FLT_ABI(copysign) (__FLT_CST(0.0), negate ? -__FLT_CST(1.0) : __FLT_CST(1.0))) : __FLT_NAN);
+ __imag__ ret = (r_class == FP_ZERO ? (__FLT_NAN + __FLT_NAN) : __FLT_NAN);
+
+ return ret;
+ }
+
+ __FLT_ABI(sincos) (__imag__ z, &s_x, &c_x);
+
+ __real__ ret = __FLT_ABI(sinh) (__real__ z) * c_x;
+ __imag__ ret = __FLT_ABI(cosh) (__real__ z) * s_x;
+
+ if (negate)
+ __real__ ret = -__real__ ret;
+ return ret;
+}
diff --git a/winsup/cygwin/math/csinl.c b/winsup/cygwin/math/csinl.c
new file mode 100644
index 000000000..de04104c8
--- /dev/null
+++ b/winsup/cygwin/math/csinl.c
@@ -0,0 +1,50 @@
+/*
+ This Software is provided under the Zope Public License (ZPL) Version 2.1.
+
+ Copyright (c) 2009, 2010 by the mingw-w64 project
+
+ See the AUTHORS file for the list of contributors to the mingw-w64 project.
+
+ This license has been certified as open source. It has also been designated
+ as GPL compatible by the Free Software Foundation (FSF).
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions in source code must retain the accompanying copyright
+ notice, this list of conditions, and the following disclaimer.
+ 2. Redistributions in binary form must reproduce the accompanying
+ copyright notice, this list of conditions, and the following disclaimer
+ in the documentation and/or other materials provided with the
+ distribution.
+ 3. Names of the copyright holders must not be used to endorse or promote
+ products derived from this software without prior written permission
+ from the copyright holders.
+ 4. The right to distribute this software or to use it for any purpose does
+ not give you the right to use Servicemarks (sm) or Trademarks (tm) of
+ the copyright holders. Use of them is covered by separate agreement
+ with the copyright holders.
+ 5. If any files are modified, you must cause the modified files to carry
+ prominent notices stating that you changed the files and the date of
+ any change.
+
+ Disclaimer
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY EXPRESSED
+ 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 HOLDERS 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.
+*/
+
+/* long double version of the functions. */
+#define _NEW_COMPLEX_LDOUBLE 1
+#include "complex_internal.h"
+
+#include "csinh.def.h"
+#include "csin.def.h"
diff --git a/winsup/cygwin/math/csqrt.def.h b/winsup/cygwin/math/csqrt.def.h
new file mode 100644
index 000000000..714f303c1
--- /dev/null
+++ b/winsup/cygwin/math/csqrt.def.h
@@ -0,0 +1,122 @@
+/*
+ This Software is provided under the Zope Public License (ZPL) Version 2.1.
+
+ Copyright (c) 2009, 2010 by the mingw-w64 project
+
+ See the AUTHORS file for the list of contributors to the mingw-w64 project.
+
+ This license has been certified as open source. It has also been designated
+ as GPL compatible by the Free Software Foundation (FSF).
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions in source code must retain the accompanying copyright
+ notice, this list of conditions, and the following disclaimer.
+ 2. Redistributions in binary form must reproduce the accompanying
+ copyright notice, this list of conditions, and the following disclaimer
+ in the documentation and/or other materials provided with the
+ distribution.
+ 3. Names of the copyright holders must not be used to endorse or promote
+ products derived from this software without prior written permission
+ from the copyright holders.
+ 4. The right to distribute this software or to use it for any purpose does
+ not give you the right to use Servicemarks (sm) or Trademarks (tm) of
+ the copyright holders. Use of them is covered by separate agreement
+ with the copyright holders.
+ 5. If any files are modified, you must cause the modified files to carry
+ prominent notices stating that you changed the files and the date of
+ any change.
+
+ Disclaimer
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY EXPRESSED
+ 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 HOLDERS 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.
+*/
+
+__FLT_TYPE __complex__ __cdecl
+__FLT_ABI(csqrt) (__FLT_TYPE __complex__ z)
+{
+ __complex__ __FLT_TYPE ret;
+ __FLT_TYPE d, r, s;
+ int r_class = fpclassify (__real__ z);
+ int i_class = fpclassify (__imag__ z);
+
+ if (r_class == FP_INFINITE || r_class == FP_NAN || i_class == FP_INFINITE || i_class == FP_NAN)
+ {
+ if (i_class == FP_INFINITE)
+ {
+ __real__ ret = __FLT_HUGE_VAL;
+ __imag__ ret = __imag__ z;
+ return ret;
+ }
+
+ if (r_class == FP_INFINITE)
+ {
+ if (__real__ z < __FLT_CST(0.0))
+ {
+ __real__ ret = i_class == FP_NAN ? __FLT_NAN : __FLT_CST(0.0);
+ __imag__ ret = __FLT_ABI(copysign) (__FLT_HUGE_VAL, __imag__ z);
+ return ret;
+ }
+
+ __real__ ret = __real__ z;
+ __imag__ ret = (i_class == FP_NAN
+ ? __FLT_NAN : __FLT_ABI(copysign) (__FLT_CST(0.0), __imag__ z));
+ return ret;
+ }
+
+ __real__ ret = __FLT_NAN;
+ __imag__ ret = __FLT_NAN;
+ return ret;
+ }
+
+ if (i_class == FP_ZERO)
+ {
+ if (__real__ z < __FLT_CST(0.0))
+ {
+ __real__ ret = __FLT_CST(0.0);
+ __imag__ ret = __FLT_ABI(copysign) (__FLT_ABI(sqrt) (-__real__ z), __imag__ z);
+ }
+ else
+ {
+ __real__ ret = __FLT_ABI(fabs) (__FLT_ABI(sqrt) (__real__ z));
+ __imag__ ret = __FLT_ABI(copysign) (__FLT_CST(0.0), __imag__ z);
+ }
+ return ret;
+ }
+
+ if (r_class == FP_ZERO)
+ {
+ r = __FLT_ABI(sqrt) (__FLT_CST(0.5) * __FLT_ABI(fabs) (__imag__ z));
+
+ __real__ ret = r;
+ __imag__ ret = __FLT_ABI(copysign) (r, __imag__ z);
+ return ret;
+ }
+
+ d = __FLT_ABI(hypot) (__real__ z, __imag__ z);
+ if (__real__ z > __FLT_CST(0.0))
+ {
+ r = __FLT_ABI(sqrt) (__FLT_CST(0.5) * d + __FLT_CST(0.5) * __real__ z);
+ s = (__FLT_CST(0.5) * __imag__ z) / r;
+ }
+ else
+ {
+ s = __FLT_ABI(sqrt) (__FLT_CST(0.5) * d - __FLT_CST(0.5) * __real__ z);
+ r = __FLT_ABI(fabs) ((__FLT_CST(0.5) * __imag__ z) / s);
+ }
+
+ __real__ ret = r;
+ __imag__ ret = __FLT_ABI(copysign) (s, __imag__ z);
+
+ return ret;
+}
diff --git a/winsup/cygwin/math/csqrtl.c b/winsup/cygwin/math/csqrtl.c
new file mode 100644
index 000000000..1993289b5
--- /dev/null
+++ b/winsup/cygwin/math/csqrtl.c
@@ -0,0 +1,48 @@
+/*
+ This Software is provided under the Zope Public License (ZPL) Version 2.1.
+
+ Copyright (c) 2009, 2010 by the mingw-w64 project
+
+ See the AUTHORS file for the list of contributors to the mingw-w64 project.
+
+ This license has been certified as open source. It has also been designated
+ as GPL compatible by the Free Software Foundation (FSF).
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions in source code must retain the accompanying copyright
+ notice, this list of conditions, and the following disclaimer.
+ 2. Redistributions in binary form must reproduce the accompanying
+ copyright notice, this list of conditions, and the following disclaimer
+ in the documentation and/or other materials provided with the
+ distribution.
+ 3. Names of the copyright holders must not be used to endorse or promote
+ products derived from this software without prior written permission
+ from the copyright holders.
+ 4. The right to distribute this software or to use it for any purpose does
+ not give you the right to use Servicemarks (sm) or Trademarks (tm) of
+ the copyright holders. Use of them is covered by separate agreement
+ with the copyright holders.
+ 5. If any files are modified, you must cause the modified files to carry
+ prominent notices stating that you changed the files and the date of
+ any change.
+
+ Disclaimer
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY EXPRESSED
+ 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 HOLDERS 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.
+*/
+
+/* long double version of the functions. */
+#define _NEW_COMPLEX_LDOUBLE 1
+#include "complex_internal.h"
+#include "csqrt.def.h"
diff --git a/winsup/cygwin/math/ctan.def.h b/winsup/cygwin/math/ctan.def.h
new file mode 100644
index 000000000..28df5f330
--- /dev/null
+++ b/winsup/cygwin/math/ctan.def.h
@@ -0,0 +1,61 @@
+/*
+ This Software is provided under the Zope Public License (ZPL) Version 2.1.
+
+ Copyright (c) 2009, 2010 by the mingw-w64 project
+
+ See the AUTHORS file for the list of contributors to the mingw-w64 project.
+
+ This license has been certified as open source. It has also been designated
+ as GPL compatible by the Free Software Foundation (FSF).
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions in source code must retain the accompanying copyright
+ notice, this list of conditions, and the following disclaimer.
+ 2. Redistributions in binary form must reproduce the accompanying
+ copyright notice, this list of conditions, and the following disclaimer
+ in the documentation and/or other materials provided with the
+ distribution.
+ 3. Names of the copyright holders must not be used to endorse or promote
+ products derived from this software without prior written permission
+ from the copyright holders.
+ 4. The right to distribute this software or to use it for any purpose does
+ not give you the right to use Servicemarks (sm) or Trademarks (tm) of
+ the copyright holders. Use of them is covered by separate agreement
+ with the copyright holders.
+ 5. If any files are modified, you must cause the modified files to carry
+ prominent notices stating that you changed the files and the date of
+ any change.
+
+ Disclaimer
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY EXPRESSED
+ 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 HOLDERS 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.
+*/
+
+__FLT_TYPE __complex__ __cdecl
+__FLT_ABI(ctan) (__FLT_TYPE __complex__ z)
+{
+ /* Annex G.6: ctan(z) = -i ctanh (iz) */
+ __complex__ __FLT_TYPE ret;
+ __complex__ __FLT_TYPE x;
+
+ __real__ x = -__imag__ z;
+ __imag__ x = __real__ z;
+
+ x = __FLT_ABI(ctanh) (x);
+
+ __real__ ret = __imag__ x;
+ __imag__ ret = -__real__ x;
+
+ return ret;
+}
diff --git a/winsup/cygwin/math/ctanh.def.h b/winsup/cygwin/math/ctanh.def.h
new file mode 100644
index 000000000..11a183648
--- /dev/null
+++ b/winsup/cygwin/math/ctanh.def.h
@@ -0,0 +1,94 @@
+/*
+ This Software is provided under the Zope Public License (ZPL) Version 2.1.
+
+ Copyright (c) 2009, 2010 by the mingw-w64 project
+
+ See the AUTHORS file for the list of contributors to the mingw-w64 project.
+
+ This license has been certified as open source. It has also been designated
+ as GPL compatible by the Free Software Foundation (FSF).
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions in source code must retain the accompanying copyright
+ notice, this list of conditions, and the following disclaimer.
+ 2. Redistributions in binary form must reproduce the accompanying
+ copyright notice, this list of conditions, and the following disclaimer
+ in the documentation and/or other materials provided with the
+ distribution.
+ 3. Names of the copyright holders must not be used to endorse or promote
+ products derived from this software without prior written permission
+ from the copyright holders.
+ 4. The right to distribute this software or to use it for any purpose does
+ not give you the right to use Servicemarks (sm) or Trademarks (tm) of
+ the copyright holders. Use of them is covered by separate agreement
+ with the copyright holders.
+ 5. If any files are modified, you must cause the modified files to carry
+ prominent notices stating that you changed the files and the date of
+ any change.
+
+ Disclaimer
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY EXPRESSED
+ 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 HOLDERS 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.
+*/
+
+__FLT_TYPE __complex__ __cdecl
+__FLT_ABI(ctanh) (__FLT_TYPE __complex__ z)
+{
+ __complex__ __FLT_TYPE ret;
+ __FLT_TYPE s, c, d;
+
+ if (!isfinite (__real__ z) || !isfinite (__imag__ z))
+ {
+ if (isinf (__real__ z))
+ {
+ __real__ ret = __FLT_ABI(copysign) (__FLT_CST(1.0), __real__ z);
+
+ /* fmod will return NaN if __imag__ z is infinity. This is actually
+ OK, because imaginary infinity returns a + or - zero (unspecified).
+ For +x, sin (x) is negative if fmod (x, 2pi) > pi.
+ For -x, sin (x) is positive if fmod (x, 2pi) < pi.
+ We use epsilon to ensure that the zeros are detected properly with
+ float and long double comparisons. */
+ s = __FLT_ABI(fmod) (__imag__ z, __FLT_PI);
+ if (signbit (__imag__ z))
+ __imag__ ret = s + __FLT_PI_2 < -__FLT_EPSILON ? 0.0 : -0.0;
+ else
+ __imag__ ret = s - __FLT_PI_2 > __FLT_EPSILON ? -0.0 : 0.0;
+ return ret;
+ }
+
+ if (__imag__ z == __FLT_CST(0.0))
+ return z;
+
+ __real__ ret = __FLT_NAN;
+ __imag__ ret = __FLT_NAN;
+ return ret;
+ }
+
+ __FLT_ABI(sincos) (__FLT_CST(2.0) * __imag__ z, &s, &c);
+
+ d = (__FLT_ABI(cosh) (__FLT_CST(2.0) * __real__ z) + c);
+
+ if (d == __FLT_CST(0.0))
+ {
+ __complex__ __FLT_TYPE ez = __FLT_ABI(cexp) (z);
+ __complex__ __FLT_TYPE emz = __FLT_ABI(cexp) (-z);
+
+ return (ez - emz) / (ez + emz);
+ }
+
+ __real__ ret = __FLT_ABI(sinh) (__FLT_CST(2.0) * __real__ z) / d;
+ __imag__ ret = s / d;
+ return ret;
+}
diff --git a/winsup/cygwin/math/ctanl.c b/winsup/cygwin/math/ctanl.c
new file mode 100644
index 000000000..eb7e37807
--- /dev/null
+++ b/winsup/cygwin/math/ctanl.c
@@ -0,0 +1,50 @@
+/*
+ This Software is provided under the Zope Public License (ZPL) Version 2.1.
+
+ Copyright (c) 2009, 2010 by the mingw-w64 project
+
+ See the AUTHORS file for the list of contributors to the mingw-w64 project.
+
+ This license has been certified as open source. It has also been designated
+ as GPL compatible by the Free Software Foundation (FSF).
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions in source code must retain the accompanying copyright
+ notice, this list of conditions, and the following disclaimer.
+ 2. Redistributions in binary form must reproduce the accompanying
+ copyright notice, this list of conditions, and the following disclaimer
+ in the documentation and/or other materials provided with the
+ distribution.
+ 3. Names of the copyright holders must not be used to endorse or promote
+ products derived from this software without prior written permission
+ from the copyright holders.
+ 4. The right to distribute this software or to use it for any purpose does
+ not give you the right to use Servicemarks (sm) or Trademarks (tm) of
+ the copyright holders. Use of them is covered by separate agreement
+ with the copyright holders.
+ 5. If any files are modified, you must cause the modified files to carry
+ prominent notices stating that you changed the files and the date of
+ any change.
+
+ Disclaimer
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY EXPRESSED
+ 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 HOLDERS 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.
+*/
+
+/* long double version of the functions. */
+#define _NEW_COMPLEX_LDOUBLE 1
+#include "complex_internal.h"
+
+#include "ctanh.def.h"
+#include "ctan.def.h"
diff --git a/winsup/cygwin/math/erfl.c b/winsup/cygwin/math/erfl.c
new file mode 100644
index 000000000..3832fe9e0
--- /dev/null
+++ b/winsup/cygwin/math/erfl.c
@@ -0,0 +1,303 @@
+/**
+ * This file has no copyright assigned and is placed in the Public Domain.
+ * This file is part of the mingw-w64 runtime package.
+ * No warranty is given; refer to the file DISCLAIMER.PD within this package.
+ */
+/* erfl.c
+ *
+ * Error function
+ *
+ *
+ *
+ * SYNOPSIS:
+ *
+ * long double x, y, erfl();
+ *
+ * y = erfl( x );
+ *
+ *
+ *
+ * DESCRIPTION:
+ *
+ * The integral is
+ *
+ * x
+ * -
+ * 2 | | 2
+ * erf(x) = -------- | exp( - t ) dt.
+ * sqrt(pi) | |
+ * -
+ * 0
+ *
+ * The magnitude of x is limited to about 106.56 for IEEE
+ * arithmetic; 1 or -1 is returned outside this range.
+ *
+ * For 0 <= |x| < 1, erf(x) = x * P6(x^2)/Q6(x^2);
+ * Otherwise: erf(x) = 1 - erfc(x).
+ *
+ *
+ *
+ * ACCURACY:
+ *
+ * Relative error:
+ * arithmetic domain # trials peak rms
+ * IEEE 0,1 50000 2.0e-19 5.7e-20
+ *
+ */
+
+/* erfcl.c
+ *
+ * Complementary error function
+ *
+ *
+ *
+ * SYNOPSIS:
+ *
+ * long double x, y, erfcl();
+ *
+ * y = erfcl( x );
+ *
+ *
+ *
+ * DESCRIPTION:
+ *
+ *
+ * 1 - erf(x) =
+ *
+ * inf.
+ * -
+ * 2 | | 2
+ * erfc(x) = -------- | exp( - t ) dt
+ * sqrt(pi) | |
+ * -
+ * x
+ *
+ *
+ * For small x, erfc(x) = 1 - erf(x); otherwise rational
+ * approximations are computed.
+ *
+ * A special function expx2l.c is used to suppress error amplification
+ * in computing exp(-x^2).
+ *
+ *
+ * ACCURACY:
+ *
+ * Relative error:
+ * arithmetic domain # trials peak rms
+ * IEEE 0,13 50000 8.4e-19 9.7e-20
+ * IEEE 6,106.56 20000 2.9e-19 7.1e-20
+ *
+ *
+ * ERROR MESSAGES:
+ *
+ * message condition value returned
+ * erfcl underflow x^2 > MAXLOGL 0.0
+ *
+ *
+ */
+
+
+/*
+Modified from file ndtrl.c
+Cephes Math Library Release 2.3: January, 1995
+Copyright 1984, 1995 by Stephen L. Moshier
+*/
+
+#include <math.h>
+#include "cephes_mconf.h"
+
+long double erfl(long double x);
+
+/* erfc(x) = exp(-x^2) P(1/x)/Q(1/x)
+ 1/8 <= 1/x <= 1
+ Peak relative error 5.8e-21 */
+
+static const uLD P[10] = {
+ { { 0x4bf0,0x9ad8,0x7a03,0x86c7,0x401d, 0, 0, 0 } },
+ { { 0xdf23,0xd843,0x4032,0x8881,0x401e, 0, 0, 0 } },
+ { { 0xd025,0xcfd5,0x8494,0x88d3,0x401e, 0, 0, 0 } },
+ { { 0xb6d0,0xc92b,0x5417,0xacb1,0x401d, 0, 0, 0 } },
+ { { 0xada8,0x356a,0x4982,0x94a6,0x401c, 0, 0, 0 } },
+ { { 0x4e13,0xcaee,0x9e31,0xb258,0x401a, 0, 0, 0 } },
+ { { 0x5840,0x554d,0x37a3,0x9239,0x4018, 0, 0, 0 } },
+ { { 0x3b58,0x3da2,0xaf02,0x9780,0x4015, 0, 0, 0 } },
+ { { 0x0144,0x489e,0xbe68,0x9c31,0x4011, 0, 0, 0 } },
+ { { 0x333b,0xd9e6,0xd404,0x986f,0xbfee, 0, 0, 0 } }
+};
+static const uLD Q[] = {
+ { { 0x0e43,0x302d,0x79ed,0x86c7,0x401d, 0, 0, 0 } },
+ { { 0xf817,0x9128,0xc0f8,0xd48b,0x401e, 0, 0, 0 } },
+ { { 0x8eae,0x8dad,0x6eb4,0x9aa2,0x401f, 0, 0, 0 } },
+ { { 0x00e7,0x7595,0xcd06,0x88bb,0x401f, 0, 0, 0 } },
+ { { 0x4991,0xcfda,0x52f1,0xa2a9,0x401e, 0, 0, 0 } },
+ { { 0xc39d,0xe415,0xc43d,0x87c0,0x401d, 0, 0, 0 } },
+ { { 0xa75d,0x436f,0x30dd,0xa027,0x401b, 0, 0, 0 } },
+ { { 0xc4cb,0x305a,0xbf78,0x8220,0x4019, 0, 0, 0 } },
+ { { 0x3708,0x33b1,0x07fa,0x8644,0x4016, 0, 0, 0 } },
+ { { 0x24fa,0x96f6,0x7153,0x8a6c,0x4012, 0, 0, 0 } }
+};
+
+/* erfc(x) = exp(-x^2) 1/x R(1/x^2) / S(1/x^2)
+ 1/128 <= 1/x < 1/8
+ Peak relative error 1.9e-21 */
+
+static const uLD R[] = {
+ { { 0x260a,0xab95,0x2fc7,0xe7c4,0x4000, 0, 0, 0 } },
+ { { 0x4761,0x613e,0xdf6d,0xe58e,0x4001, 0, 0, 0 } },
+ { { 0x0615,0x4b00,0x575f,0xdc7b,0x4000, 0, 0, 0 } },
+ { { 0x521d,0x8527,0x3435,0x8dc2,0x3ffe, 0, 0, 0 } },
+ { { 0x22cf,0xc711,0x6c5b,0xdcfb,0x3ff9, 0, 0, 0 } }
+};
+static const uLD S[] = {
+ { { 0x5de6,0x17d7,0x54d6,0xaba9,0x4002, 0, 0, 0 } },
+ { { 0x55d5,0xd300,0xe71e,0xf564,0x4002, 0, 0, 0 } },
+ { { 0xb611,0x8f76,0xf020,0xd255,0x4001, 0, 0, 0 } },
+ { { 0x3684,0x3798,0xb793,0x80b0,0x3fff, 0, 0, 0 } },
+ { { 0xf5af,0x2fb2,0x1e57,0xc3d7,0x3ffa, 0, 0, 0 } }
+};
+
+/* erf(x) = x T(x^2)/U(x^2)
+ 0 <= x <= 1
+ Peak relative error 7.6e-23 */
+
+static const uLD T[] = {
+ { { 0xfd7a,0x3a1a,0x705b,0xe0c4,0x3ffb, 0, 0, 0 } },
+ { { 0x3128,0xc337,0x3716,0xace5,0x4001, 0, 0, 0 } },
+ { { 0x9517,0x4e93,0x540e,0x8f97,0x4007, 0, 0, 0 } },
+ { { 0x6118,0x6059,0x9093,0xa757,0x400a, 0, 0, 0 } },
+ { { 0xb954,0xa987,0xc60c,0xbc83,0x400e, 0, 0, 0 } },
+ { { 0x7a56,0xe45a,0xa4bd,0x975b,0x4010, 0, 0, 0 } },
+ { { 0xc446,0x6bab,0x0b2a,0x86d0,0x4013, 0, 0, 0 } }
+};
+
+static const uLD U[] = {
+ { { 0x3453,0x1f8e,0xf688,0xb507,0x4004, 0, 0, 0 } },
+ { { 0x71ac,0xb12f,0x21ca,0xf2e2,0x4008, 0, 0, 0 } },
+ { { 0xffe8,0x9cac,0x3b84,0xc2ac,0x400c, 0, 0, 0 } },
+ { { 0x481d,0x445b,0xc807,0xc232,0x400f, 0, 0, 0 } },
+ { { 0x9ad5,0x1aef,0x45b1,0xe25e,0x4011, 0, 0, 0 } },
+ { { 0x71a7,0x1cad,0x012e,0xeef3,0x4012, 0, 0, 0 } }
+};
+
+/* expx2l.c
+ *
+ * Exponential of squared argument
+ *
+ *
+ *
+ * SYNOPSIS:
+ *
+ * long double x, y, expmx2l();
+ * int sign;
+ *
+ * y = expx2l( x );
+ *
+ *
+ *
+ * DESCRIPTION:
+ *
+ * Computes y = exp(x*x) while suppressing error amplification
+ * that would ordinarily arise from the inexactness of the
+ * exponential argument x*x.
+ *
+ *
+ *
+ * ACCURACY:
+ *
+ * Relative error:
+ * arithmetic domain # trials peak rms
+ * IEEE -106.566, 106.566 10^5 1.6e-19 4.4e-20
+ *
+ */
+
+#define M 32768.0L
+#define MINV 3.0517578125e-5L
+
+static long double expx2l (long double x)
+{
+ long double u, u1, m, f;
+
+ x = fabsl (x);
+ /* Represent x as an exact multiple of M plus a residual.
+ M is a power of 2 chosen so that exp(m * m) does not overflow
+ or underflow and so that |x - m| is small. */
+ m = MINV * floorl(M * x + 0.5L);
+ f = x - m;
+
+ /* x^2 = m^2 + 2mf + f^2 */
+ u = m * m;
+ u1 = 2 * m * f + f * f;
+
+ if ((u + u1) > MAXLOGL)
+ return (INFINITYL);
+
+ /* u is exact, u1 is small. */
+ u = expl(u) * expl(u1);
+ return (u);
+}
+
+long double erfcl(long double a)
+{
+ long double p, q, x, y, z;
+
+ if (isinf (a))
+ return (signbit(a) ? 2.0 : 0.0);
+
+ x = fabsl (a);
+
+ if (x < 1.0L)
+ return (1.0L - erfl(a));
+
+ z = a * a;
+
+ if (z > MAXLOGL)
+ {
+under:
+ mtherr("erfcl", UNDERFLOW);
+ errno = ERANGE;
+ return (signbit(a) ? 2.0 : 0.0);
+ }
+
+ /* Compute z = expl(a * a). */
+ z = expx2l(a);
+ y = 1.0L/x;
+
+ if (x < 8.0L)
+ {
+ p = polevll(y, P, 9);
+ q = p1evll(y, Q, 10);
+ }
+ else
+ {
+ q = y * y;
+ p = y * polevll(q, R, 4);
+ q = p1evll(q, S, 5);
+ }
+ y = p/(q * z);
+
+ if (a < 0.0L)
+ y = 2.0L - y;
+
+ if (y == 0.0L)
+ goto under;
+
+ return (y);
+}
+
+long double erfl(long double x)
+{
+ long double y, z;
+
+ if (x == 0.0L)
+ return (x);
+
+ if (isinf (x))
+ return (signbit(x) ? -1.0L : 1.0L);
+
+ if (fabsl(x) > 1.0L)
+ return (1.0L - erfcl(x));
+
+ z = x * x;
+ y = x * polevll(z, T, 6) / p1evll(z, U, 6);
+ return (y);
+}
diff --git a/winsup/cygwin/math/exp.def.h b/winsup/cygwin/math/exp.def.h
new file mode 100644
index 000000000..2419ef6d1
--- /dev/null
+++ b/winsup/cygwin/math/exp.def.h
@@ -0,0 +1,136 @@
+/*
+ This Software is provided under the Zope Public License (ZPL) Version 2.1.
+
+ Copyright (c) 2009, 2010 by the mingw-w64 project
+
+ See the AUTHORS file for the list of contributors to the mingw-w64 project.
+
+ This license has been certified as open source. It has also been designated
+ as GPL compatible by the Free Software Foundation (FSF).
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions in source code must retain the accompanying copyright
+ notice, this list of conditions, and the following disclaimer.
+ 2. Redistributions in binary form must reproduce the accompanying
+ copyright notice, this list of conditions, and the following disclaimer
+ in the documentation and/or other materials provided with the
+ distribution.
+ 3. Names of the copyright holders must not be used to endorse or promote
+ products derived from this software without prior written permission
+ from the copyright holders.
+ 4. The right to distribute this software or to use it for any purpose does
+ not give you the right to use Servicemarks (sm) or Trademarks (tm) of
+ the copyright holders. Use of them is covered by separate agreement
+ with the copyright holders.
+ 5. If any files are modified, you must cause the modified files to carry
+ prominent notices stating that you changed the files and the date of
+ any change.
+
+ Disclaimer
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY EXPRESSED
+ 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 HOLDERS 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 "complex_internal.h"
+#include <errno.h>
+
+static long double c0 = 1.44268798828125L; // INV_LN2
+static long double c1 = 7.05260771340735992468e-6L;
+
+static long double
+__expl_internal (long double x)
+{
+ long double res = 0.0L;
+ asm ("fldl2e\n\t" /* 1 log2(e) */
+ "fmul %%st(1),%%st\n\t" /* 1 x log2(e) */
+
+#ifdef __x86_64__
+ "subq $8, %%rsp\n"
+ "fnstcw 4(%%rsp)\n"
+ "movzwl 4(%%rsp), %%eax\n"
+ "orb $12, %%ah\n"
+ "movw %%ax, (%%rsp)\n"
+ "fldcw (%%rsp)\n"
+ "frndint\n\t" /* 1 i */
+ "fld %%st(1)\n\t" /* 2 x */
+ "frndint\n\t" /* 2 xi */
+ "fldcw 4(%%rsp)\n"
+ "addq $8, %%rsp\n"
+#else
+ "push %%eax\n\tsubl $8, %%esp\n"
+ "fnstcw 4(%%esp)\n"
+ "movzwl 4(%%esp), %%eax\n"
+ "orb $12, %%ah\n"
+ "movw %%ax, (%%esp)\n"
+ "fldcw (%%esp)\n"
+ "frndint\n\t" /* 1 i */
+ "fld %%st(1)\n\t" /* 2 x */
+ "frndint\n\t" /* 2 xi */
+ "fldcw 4(%%esp)\n"
+ "addl $8, %%esp\n\tpop %%eax\n"
+#endif
+ "fld %%st(1)\n\t" /* 3 i */
+ "fldt %2\n\t" /* 4 c0 */
+ "fld %%st(2)\n\t" /* 5 xi */
+ "fmul %%st(1),%%st\n\t" /* 5 c0 xi */
+ "fsubp %%st,%%st(2)\n\t" /* 4 f = c0 xi - i */
+ "fld %%st(4)\n\t" /* 5 x */
+ "fsub %%st(3),%%st\n\t" /* 5 xf = x - xi */
+ "fmulp %%st,%%st(1)\n\t" /* 4 c0 xf */
+ "faddp %%st,%%st(1)\n\t" /* 3 f = f + c0 xf */
+ "fldt %3\n\t" /* 4 */
+ "fmul %%st(4),%%st\n\t" /* 4 c1 * x */
+ "faddp %%st,%%st(1)\n\t" /* 3 f = f + c1 * x */
+ "f2xm1\n\t" /* 3 2^(fract(x * log2(e))) - 1 */
+ "fld1\n\t" /* 4 1.0 */
+ "faddp\n\t" /* 3 2^(fract(x * log2(e))) */
+ "fstp %%st(1)\n\t" /* 2 */
+ "fscale\n\t" /* 2 scale factor is st(1); e^x */
+ "fstp %%st(1)\n\t" /* 1 */
+ "fstp %%st(1)\n\t" /* 0 */
+ : "=t" (res) : "0" (x), "m" (c0), "m" (c1) : "ax", "dx");
+ return res;
+}
+
+__FLT_TYPE
+__FLT_ABI(exp) (__FLT_TYPE x)
+{
+ int x_class = fpclassify (x);
+ if (x_class == FP_NAN)
+ {
+ __FLT_RPT_DOMAIN ("exp", x, 0.0, x);
+ return x;
+ }
+ else if (x_class == FP_INFINITE)
+ {
+ __FLT_TYPE r = (signbit (x) ? __FLT_CST (0.0) : __FLT_HUGE_VAL);
+ __FLT_RPT_ERANGE ("exp", x, 0.0, r, signbit (x));
+ return r;
+ }
+ else if (x_class == FP_ZERO)
+ {
+ return __FLT_CST (1.0);
+ }
+ else if (x > __FLT_MAXLOG)
+ {
+ __FLT_RPT_ERANGE ("exp", x, 0.0, __FLT_HUGE_VAL, 1);
+ return __FLT_HUGE_VAL;
+ }
+ else if (x < __FLT_MINLOG)
+ {
+ return __FLT_CST(0.0);
+ }
+ else
+ return (__FLT_TYPE) __expl_internal ((long double) x);
+}
diff --git a/winsup/cygwin/math/exp10l.c b/winsup/cygwin/math/exp10l.c
new file mode 100644
index 000000000..821b8f5c3
--- /dev/null
+++ b/winsup/cygwin/math/exp10l.c
@@ -0,0 +1,8 @@
+#undef exp10l
+#include <math.h>
+
+long double
+exp10l (long double x)
+{
+ return powl (10.0L, x);
+}
diff --git a/winsup/cygwin/math/exp2.S b/winsup/cygwin/math/exp2.S
new file mode 100644
index 000000000..37d4a2b89
--- /dev/null
+++ b/winsup/cygwin/math/exp2.S
@@ -0,0 +1,94 @@
+/**
+ * This file has no copyright assigned and is placed in the Public Domain.
+ * This file is part of the mingw-w64 runtime package.
+ * No warranty is given; refer to the file DISCLAIMER.PD within this package.
+ */
+#include <_mingw_mac.h>
+
+ .file "exp2.S"
+ .text
+#ifdef __x86_64__
+ .align 8
+#else
+ .align 4
+#endif
+.globl __MINGW_USYMBOL(exp2)
+ .def __MINGW_USYMBOL(exp2); .scl 2; .type 32; .endef
+__MINGW_USYMBOL(exp2):
+#ifdef __x86_64__
+ subq $24, %rsp
+ movsd %xmm0,(%rsp)
+ fldl (%rsp)
+ fxam /* Is NaN or +-Inf? */
+ fstsw %ax
+ movb $0x45, %dh
+ andb %ah, %dh
+ cmpb $0x05, %dh
+ je 1f /* Is +-Inf, jump. */
+ fld %st
+ subq $8, %rsp /* int(x) */
+ fnstcw 4(%rsp)
+ movzwl 4(%rsp), %eax
+ orb $12, %ah
+ movw %ax, (%rsp)
+ fldcw (%rsp)
+ frndint
+ fldcw 4(%rsp)
+ addq $8, %rsp
+ fsubr %st,%st(1) /* fract(x) */
+ fxch
+ f2xm1 /* 2^(fract(x)) - 1 */
+ fld1
+ faddp /* 2^(fract(x)) */
+ fscale /* e^x */
+ fstp %st(1)
+ fstpl (%rsp)
+ movsd (%rsp),%xmm0
+ addq $24, %rsp
+ ret
+
+1: testl $0x200, %eax /* Test sign. */
+ jz 2f /* If positive, jump. */
+ fstp %st
+ fldz /* Set result to 0. */
+2: fstpl (%rsp)
+ movsd (%rsp),%xmm0
+ addq $24,%rsp
+ ret
+#else
+ fldl 4(%esp)
+/* I added the following ugly construct because exp(+-Inf) resulted
+ in NaN. The ugliness results from the bright minds at Intel.
+ For the i686 the code can be written better.
+ -- drepper@cygnus.com. */
+ fxam /* Is NaN or +-Inf? */
+ fstsw %ax
+ movb $0x45, %dh
+ andb %ah, %dh
+ cmpb $0x05, %dh
+ je 1f /* Is +-Inf, jump. */
+ fld %st
+ subl $8, %esp /* int(x) */
+ fnstcw 4(%esp)
+ movzwl 4(%esp), %eax
+ orb $12, %ah
+ movw %ax, (%esp)
+ fldcw (%esp)
+ frndint
+ fldcw 4(%esp)
+ addl $8, %esp
+ fsubr %st,%st(1) /* fract(x) */
+ fxch
+ f2xm1 /* 2^(fract(x)) - 1 */
+ fld1
+ faddp /* 2^(fract(x)) */
+ fscale /* e^x */
+ fstp %st(1)
+ ret
+
+1: testl $0x200, %eax /* Test sign. */
+ jz 2f /* If positive, jump. */
+ fstp %st
+ fldz /* Set result to 0. */
+2: ret
+#endif
diff --git a/winsup/cygwin/math/exp2l.S b/winsup/cygwin/math/exp2l.S
new file mode 100644
index 000000000..2e58c37b8
--- /dev/null
+++ b/winsup/cygwin/math/exp2l.S
@@ -0,0 +1,92 @@
+/**
+ * This file has no copyright assigned and is placed in the Public Domain.
+ * This file is part of the mingw-w64 runtime package.
+ * No warranty is given; refer to the file DISCLAIMER.PD within this package.
+ */
+#include <_mingw_mac.h>
+
+ .file "exp2l.S"
+ .text
+#ifdef __x86_64__
+ .align 8
+#else
+ .align 4
+#endif
+.globl __MINGW_USYMBOL(exp2l)
+ .def __MINGW_USYMBOL(exp2l); .scl 2; .type 32; .endef
+__MINGW_USYMBOL(exp2l):
+#ifdef __x86_64__
+ fldt (%rdx)
+ fxam /* Is NaN or +-Inf? */
+ fstsw %ax
+ movb $0x45, %dh
+ andb %ah, %dh
+ cmpb $0x05, %dh
+ je 1f /* Is +-Inf, jump. */
+ fld %st
+ subq $8, %rsp /* int(x) */
+ fnstcw 4(%rsp)
+ movzwl 4(%rsp), %eax
+ orb $12, %ah
+ movw %ax, (%rsp)
+ fldcw (%rsp)
+ frndint
+ fldcw 4(%rsp)
+ addq $8, %rsp
+ fsubr %st,%st(1) /* fract(x) */
+ fxch
+ f2xm1 /* 2^(fract(x)) - 1 */
+ fld1
+ faddp /* 2^(fract(x)) */
+ fscale /* e^x */
+ fstp %st(1)
+ movq %rcx,%rax
+ movq $0,8(%rcx)
+ fstpt (%rcx)
+ ret
+
+1: testl $0x200, %eax /* Test sign. */
+ jz 2f /* If positive, jump. */
+ fstp %st
+ fldz /* Set result to 0. */
+2: movq %rcx,%rax
+ movq $0,8(%rcx)
+ fstpt (%rcx)
+ ret
+#else
+ fldt 4(%esp)
+/* I added the following ugly construct because exp(+-Inf) resulted
+ in NaN. The ugliness results from the bright minds at Intel.
+ For the i686 the code can be written better.
+ -- drepper@cygnus.com. */
+ fxam /* Is NaN or +-Inf? */
+ fstsw %ax
+ movb $0x45, %dh
+ andb %ah, %dh
+ cmpb $0x05, %dh
+ je 1f /* Is +-Inf, jump. */
+ fld %st
+ subl $8, %esp /* int(x) */
+ fnstcw 4(%esp)
+ movzwl 4(%esp), %eax
+ orb $12, %ah
+ movw %ax, (%esp)
+ fldcw (%esp)
+ frndint
+ fldcw 4(%esp)
+ addl $8, %esp
+ fsubr %st,%st(1) /* fract(x) */
+ fxch
+ f2xm1 /* 2^(fract(x)) - 1 */
+ fld1
+ faddp /* 2^(fract(x)) */
+ fscale /* e^x */
+ fstp %st(1)
+ ret
+
+1: testl $0x200, %eax /* Test sign. */
+ jz 2f /* If positive, jump. */
+ fstp %st
+ fldz /* Set result to 0. */
+2: ret
+#endif
diff --git a/winsup/cygwin/math/expl.c b/winsup/cygwin/math/expl.c
new file mode 100644
index 000000000..7f4be6239
--- /dev/null
+++ b/winsup/cygwin/math/expl.c
@@ -0,0 +1,46 @@
+/*
+ This Software is provided under the Zope Public License (ZPL) Version 2.1.
+
+ Copyright (c) 2009, 2010 by the mingw-w64 project
+
+ See the AUTHORS file for the list of contributors to the mingw-w64 project.
+
+ This license has been certified as open source. It has also been designated
+ as GPL compatible by the Free Software Foundation (FSF).
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions in source code must retain the accompanying copyright
+ notice, this list of conditions, and the following disclaimer.
+ 2. Redistributions in binary form must reproduce the accompanying
+ copyright notice, this list of conditions, and the following disclaimer
+ in the documentation and/or other materials provided with the
+ distribution.
+ 3. Names of the copyright holders must not be used to endorse or promote
+ products derived from this software without prior written permission
+ from the copyright holders.
+ 4. The right to distribute this software or to use it for any purpose does
+ not give you the right to use Servicemarks (sm) or Trademarks (tm) of
+ the copyright holders. Use of them is covered by separate agreement
+ with the copyright holders.
+ 5. If any files are modified, you must cause the modified files to carry
+ prominent notices stating that you changed the files and the date of
+ any change.
+
+ Disclaimer
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY EXPRESSED
+ 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 HOLDERS 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.
+*/
+
+#define _NEW_COMPLEX_LDOUBLE 1
+#include "exp.def.h"
diff --git a/winsup/cygwin/math/expm1.def.h b/winsup/cygwin/math/expm1.def.h
new file mode 100644
index 000000000..5a2b6f498
--- /dev/null
+++ b/winsup/cygwin/math/expm1.def.h
@@ -0,0 +1,72 @@
+/*
+ This Software is provided under the Zope Public License (ZPL) Version 2.1.
+
+ Copyright (c) 2009, 2010 by the mingw-w64 project
+
+ See the AUTHORS file for the list of contributors to the mingw-w64 project.
+
+ This license has been certified as open source. It has also been designated
+ as GPL compatible by the Free Software Foundation (FSF).
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions in source code must retain the accompanying copyright
+ notice, this list of conditions, and the following disclaimer.
+ 2. Redistributions in binary form must reproduce the accompanying
+ copyright notice, this list of conditions, and the following disclaimer
+ in the documentation and/or other materials provided with the
+ distribution.
+ 3. Names of the copyright holders must not be used to endorse or promote
+ products derived from this software without prior written permission
+ from the copyright holders.
+ 4. The right to distribute this software or to use it for any purpose does
+ not give you the right to use Servicemarks (sm) or Trademarks (tm) of
+ the copyright holders. Use of them is covered by separate agreement
+ with the copyright holders.
+ 5. If any files are modified, you must cause the modified files to carry
+ prominent notices stating that you changed the files and the date of
+ any change.
+
+ Disclaimer
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY EXPRESSED
+ 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 HOLDERS 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 "complex_internal.h"
+#include <errno.h>
+
+__FLT_TYPE
+__FLT_ABI(expm1) (__FLT_TYPE x)
+{
+ int x_class = fpclassify (x);
+ if (x_class == FP_NAN)
+ {
+ __FLT_RPT_DOMAIN ("expm1", x, 0.0, x);
+ return x;
+ }
+ else if (x_class == FP_INFINITE)
+ {
+ return (signbit (x) ? -__FLT_CST(1.0) : __FLT_HUGE_VAL);
+ }
+ else if (x_class == FP_ZERO)
+ {
+ return x;
+ }
+ if (__FLT_ABI (fabs) (x) < __FLT_LOGE2)
+ {
+ x /= __FLT_LOGE2;
+ __asm__ __volatile__ ("f2xm1" : "=t" (x) : "0" (x));
+ return x;
+ }
+ return __FLT_ABI (exp) (x) - __FLT_CST (1.0);
+}
diff --git a/winsup/cygwin/math/expm1l.c b/winsup/cygwin/math/expm1l.c
new file mode 100644
index 000000000..625fbb1d7
--- /dev/null
+++ b/winsup/cygwin/math/expm1l.c
@@ -0,0 +1,46 @@
+/*
+ This Software is provided under the Zope Public License (ZPL) Version 2.1.
+
+ Copyright (c) 2009, 2010 by the mingw-w64 project
+
+ See the AUTHORS file for the list of contributors to the mingw-w64 project.
+
+ This license has been certified as open source. It has also been designated
+ as GPL compatible by the Free Software Foundation (FSF).
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions in source code must retain the accompanying copyright
+ notice, this list of conditions, and the following disclaimer.
+ 2. Redistributions in binary form must reproduce the accompanying
+ copyright notice, this list of conditions, and the following disclaimer
+ in the documentation and/or other materials provided with the
+ distribution.
+ 3. Names of the copyright holders must not be used to endorse or promote
+ products derived from this software without prior written permission
+ from the copyright holders.
+ 4. The right to distribute this software or to use it for any purpose does
+ not give you the right to use Servicemarks (sm) or Trademarks (tm) of
+ the copyright holders. Use of them is covered by separate agreement
+ with the copyright holders.
+ 5. If any files are modified, you must cause the modified files to carry
+ prominent notices stating that you changed the files and the date of
+ any change.
+
+ Disclaimer
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY EXPRESSED
+ 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 HOLDERS 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.
+*/
+
+#define _NEW_COMPLEX_LDOUBLE 1
+#include "expm1.def.h"
diff --git a/winsup/cygwin/math/fabsl.c b/winsup/cygwin/math/fabsl.c
new file mode 100644
index 000000000..2dfdfaa45
--- /dev/null
+++ b/winsup/cygwin/math/fabsl.c
@@ -0,0 +1,18 @@
+/**
+ * This file has no copyright assigned and is placed in the Public Domain.
+ * This file is part of the mingw-w64 runtime package.
+ * No warranty is given; refer to the file DISCLAIMER.PD within this package.
+ */
+long double fabsl (long double x);
+
+long double
+fabsl (long double x)
+{
+#if defined(__x86_64__) || defined(_AMD64_) || defined(__i386__) || defined(_X86_)
+ long double res = 0.0L;
+ asm ("fabs;" : "=t" (res) : "0" (x));
+ return res;
+#elif defined(__arm__) || defined(_ARM_)
+ return __builtin_fabsl (x);
+#endif /* defined(__x86_64__) || defined(_AMD64_) || defined(__i386__) || defined(_X86_) */
+}
diff --git a/winsup/cygwin/math/fastmath.h b/winsup/cygwin/math/fastmath.h
new file mode 100644
index 000000000..a6bb467c2
--- /dev/null
+++ b/winsup/cygwin/math/fastmath.h
@@ -0,0 +1,120 @@
+/**
+ * This file has no copyright assigned and is placed in the Public Domain.
+ * This file is part of the mingw-w64 runtime package.
+ * No warranty is given; refer to the file DISCLAIMER.PD within this package.
+ */
+#ifndef _MINGWEX_FASTMATH_H_
+#define _MINGWEX_FASTMATH_H_
+
+/* Fast math inlines
+ No range or domain checks. No setting of errno. No tweaks to
+ protect precision near range limits. */
+
+/* For now this is an internal header with just the functions that
+ are currently used in building libmingwex.a math components */
+
+/* FIXME: We really should get rid of the code duplication using euther
+ C++ templates or tgmath-type macros. */
+
+static __inline__ double __fast_sqrt (double x)
+{
+ double res;
+ asm __volatile__ ("fsqrt" : "=t" (res) : "0" (x));
+ return res;
+}
+
+static __inline__ long double __fast_sqrtl (long double x)
+{
+ long double res;
+ asm __volatile__ ("fsqrt" : "=t" (res) : "0" (x));
+ return res;
+}
+
+static __inline__ float __fast_sqrtf (float x)
+{
+ float res;
+ asm __volatile__ ("fsqrt" : "=t" (res) : "0" (x));
+ return res;
+}
+
+
+static __inline__ double __fast_log (double x)
+{
+ double res;
+ asm __volatile__
+ ("fldln2\n\t"
+ "fxch\n\t"
+ "fyl2x"
+ : "=t" (res) : "0" (x) : "st(1)");
+ return res;
+}
+
+static __inline__ long double __fast_logl (long double x)
+{
+ long double res;
+ asm __volatile__
+ ("fldln2\n\t"
+ "fxch\n\t"
+ "fyl2x"
+ : "=t" (res) : "0" (x) : "st(1)");
+ return res;
+}
+
+
+static __inline__ float __fast_logf (float x)
+{
+ float res;
+ asm __volatile__
+ ("fldln2\n\t"
+ "fxch\n\t"
+ "fyl2x"
+ : "=t" (res) : "0" (x) : "st(1)");
+ return res;
+}
+
+static __inline__ double __fast_log1p (double x)
+{
+ double res;
+ /* fyl2xp1 accurate only for |x| <= 1.0 - 0.5 * sqrt (2.0) */
+ if (fabs (x) >= 1.0 - 0.5 * 1.41421356237309504880)
+ res = __fast_log (1.0 + x);
+ else
+ asm __volatile__
+ ("fldln2\n\t"
+ "fxch\n\t"
+ "fyl2xp1"
+ : "=t" (res) : "0" (x) : "st(1)");
+ return res;
+}
+
+static __inline__ long double __fast_log1pl (long double x)
+{
+ long double res;
+ /* fyl2xp1 accurate only for |x| <= 1.0 - 0.5 * sqrt (2.0) */
+ if (fabsl (x) >= 1.0L - 0.5L * 1.41421356237309504880L)
+ res = __fast_logl (1.0L + x);
+ else
+ asm __volatile__
+ ("fldln2\n\t"
+ "fxch\n\t"
+ "fyl2xp1"
+ : "=t" (res) : "0" (x) : "st(1)");
+ return res;
+}
+
+static __inline__ float __fast_log1pf (float x)
+{
+ float res;
+ /* fyl2xp1 accurate only for |x| <= 1.0 - 0.5 * sqrt (2.0) */
+ if (fabsf (x) >= 1.0 - 0.5 * 1.41421356237309504880)
+ res = __fast_logf (1.0 + x);
+ else
+ asm __volatile__
+ ("fldln2\n\t"
+ "fxch\n\t"
+ "fyl2xp1"
+ : "=t" (res) : "0" (x) : "st(1)");
+ return res;
+}
+
+#endif
diff --git a/winsup/cygwin/math/fdiml.c b/winsup/cygwin/math/fdiml.c
new file mode 100644
index 000000000..3be0679ac
--- /dev/null
+++ b/winsup/cygwin/math/fdiml.c
@@ -0,0 +1,24 @@
+/**
+ * This file has no copyright assigned and is placed in the Public Domain.
+ * This file is part of the mingw-w64 runtime package.
+ * No warranty is given; refer to the file DISCLAIMER.PD within this package.
+ */
+#include <errno.h>
+#include <math.h>
+
+long double
+fdiml (long double x, long double y)
+{
+ int cx = fpclassify (x), cy = fpclassify (y);
+ long double r;
+
+ if (cx == FP_NAN || cy == FP_NAN
+ || (y < 0 && cx == FP_INFINITE && cy == FP_INFINITE))
+ return x - y; /* Take care invalid flag is raised. */
+ if (x <= y)
+ return 0.0;
+ r = x - y;
+ if (fpclassify (r) == FP_INFINITE)
+ errno = ERANGE;
+ return r;
+}
diff --git a/winsup/cygwin/math/finite.c b/winsup/cygwin/math/finite.c
new file mode 100644
index 000000000..bcef72a92
--- /dev/null
+++ b/winsup/cygwin/math/finite.c
@@ -0,0 +1,19 @@
+#include <math.h>
+
+int
+finite (double x)
+{
+ return __builtin_isfinite (x);
+}
+
+int
+finitef (float x)
+{
+ return __builtin_isfinite (x);
+}
+
+int
+finitel (long double x)
+{
+ return __builtin_isfinite (x);
+}
diff --git a/winsup/cygwin/math/floorl.S b/winsup/cygwin/math/floorl.S
new file mode 100644
index 000000000..19ab3f099
--- /dev/null
+++ b/winsup/cygwin/math/floorl.S
@@ -0,0 +1,72 @@
+/**
+ * This file has no copyright assigned and is placed in the Public Domain.
+ * This file is part of the mingw-w64 runtime package.
+ * No warranty is given; refer to the file DISCLAIMER.PD within this package.
+ */
+#include <_mingw_mac.h>
+
+ .file "floorl.S"
+ .text
+#ifdef __x86_64__
+ .align 8
+#else
+ .align 4
+#endif
+ .globl __MINGW_USYMBOL(floorl)
+ .def __MINGW_USYMBOL(floorl); .scl 2; .type 32; .endef
+__MINGW_USYMBOL(floorl):
+#if defined(_AMD64_) || defined(__x86_64__)
+ fldt (%rdx)
+ subq $24,%rsp
+
+ fstcw 8(%rsp) /* store fpu control word */
+
+ /* We use here %edx although only the low 1 bits are defined.
+ But none of the operations should care and they are faster
+ than the 16 bit operations. */
+ movl $0x400,%edx /* round towards -oo */
+ orl 8(%rsp),%edx
+ andl $0xf7ff,%edx
+ movl %edx,(%rsp)
+ fldcw (%rsp) /* load modified control word */
+
+ frndint /* round */
+
+ fldcw 8(%rsp) /* restore original control word */
+
+ addq $24,%rsp
+ movq %rcx,%rax
+ movq $0,8(%rcx)
+ fstpt (%rcx)
+ ret
+#elif defined(_ARM_) || defined(__arm__)
+ vmrs r1, fpscr
+ bic r0, r1, #0x00c00000
+ orr r0, r0, #0x00800000 /* Round towards Minus Infinity */
+ vmsr fpscr, r0
+ vcvtr.s32.f64 s0, d0
+ vcvt.f64.s32 d0, s0
+ vmsr fpscr, r1
+ bx lr
+#elif defined(_X86_) || defined(__i386__)
+ fldt 4(%esp)
+ subl $8,%esp
+
+ fstcw 4(%esp) /* store fpu control word */
+
+ /* We use here %edx although only the low 1 bits are defined.
+ But none of the operations should care and they are faster
+ than the 16 bit operations. */
+ movl $0x400,%edx /* round towards -oo */
+ orl 4(%esp),%edx
+ andl $0xf7ff,%edx
+ movl %edx,(%esp)
+ fldcw (%esp) /* load modified control word */
+
+ frndint /* round */
+
+ fldcw 4(%esp) /* restore original control word */
+
+ addl $8,%esp
+ ret
+#endif
diff --git a/winsup/cygwin/math/fmal.c b/winsup/cygwin/math/fmal.c
new file mode 100644
index 000000000..3d0eb020b
--- /dev/null
+++ b/winsup/cygwin/math/fmal.c
@@ -0,0 +1,12 @@
+/**
+ * This file has no copyright assigned and is placed in the Public Domain.
+ * This file is part of the mingw-w64 runtime package.
+ * No warranty is given; refer to the file DISCLAIMER.PD within this package.
+ */
+long double fmal ( long double _x, long double _y, long double _z);
+
+long double
+fmal ( long double _x, long double _y, long double _z)
+{
+ return ((_x * _y) + _z);
+}
diff --git a/winsup/cygwin/math/fmaxl.c b/winsup/cygwin/math/fmaxl.c
new file mode 100644
index 000000000..4ac6e2194
--- /dev/null
+++ b/winsup/cygwin/math/fmaxl.c
@@ -0,0 +1,13 @@
+/**
+ * This file has no copyright assigned and is placed in the Public Domain.
+ * This file is part of the mingw-w64 runtime package.
+ * No warranty is given; refer to the file DISCLAIMER.PD within this package.
+ */
+#include <math.h>
+
+long double
+fmaxl (long double _x, long double _y)
+{
+ return (__builtin_isgreaterequal (_x, _y) || __builtin_isnan (_y))
+ ? _x : _y;
+}
diff --git a/winsup/cygwin/math/fminl.c b/winsup/cygwin/math/fminl.c
new file mode 100644
index 000000000..0396a8eba
--- /dev/null
+++ b/winsup/cygwin/math/fminl.c
@@ -0,0 +1,12 @@
+/**
+ * This file has no copyright assigned and is placed in the Public Domain.
+ * This file is part of the mingw-w64 runtime package.
+ * No warranty is given; refer to the file DISCLAIMER.PD within this package.
+ */
+#include <math.h>
+
+long double
+fminl (long double _x, long double _y)
+{
+ return ((__builtin_islessequal(_x, _y) || __builtin_isnan (_y)) ? _x : _y );
+}
diff --git a/winsup/cygwin/math/fmodl.c b/winsup/cygwin/math/fmodl.c
new file mode 100644
index 000000000..6224db13b
--- /dev/null
+++ b/winsup/cygwin/math/fmodl.c
@@ -0,0 +1,20 @@
+/**
+ * This file has no copyright assigned and is placed in the Public Domain.
+ * This file is part of the mingw-w64 runtime package.
+ * No warranty is given; refer to the file DISCLAIMER.PD within this package.
+ */
+long double fmodl (long double x, long double y);
+
+long double
+fmodl (long double x, long double y)
+{
+ long double res = 0.0L;
+
+ asm ("1:\tfprem\n\t"
+ "fstsw %%ax\n\t"
+ "sahf\n\t"
+ "jp 1b\n\t"
+ "fstp %%st(1)"
+ : "=t" (res) : "0" (x), "u" (y) : "ax", "st(1)");
+ return res;
+}
diff --git a/winsup/cygwin/math/frexpl.S b/winsup/cygwin/math/frexpl.S
new file mode 100644
index 000000000..f9fcc6be1
--- /dev/null
+++ b/winsup/cygwin/math/frexpl.S
@@ -0,0 +1,130 @@
+/**
+ * This file has no copyright assigned and is placed in the Public Domain.
+ * This file is part of the mingw-w64 runtime package.
+ * No warranty is given; refer to the file DISCLAIMER.PD within this package.
+ */
+#include <_mingw_mac.h>
+
+/*
+ * frexpl(long double x, int* expnt) extracts the exponent from x.
+ * It returns an integer power of two to expnt and the significand
+ * between 0.5 and 1 to y. Thus x = y * 2**expn.
+ */
+#ifdef __x86_64__
+ .align 8
+#else
+ .align 2
+#endif
+.globl __MINGW_USYMBOL(frexpl)
+__MINGW_USYMBOL(frexpl):
+#ifdef __x86_64__
+ pushq %rbp
+ movq %rsp,%rbp
+ subq $48,%rsp
+ pushq %rsi
+ fldt (%rdx)
+ movq %rcx,%r9
+ fld %st(0)
+ fstpt -12(%rbp)
+ leaq -4(%rbp),%rcx
+ movw -4(%rbp),%dx
+ andl $32767,%edx
+ jne L25
+ fldz
+ fucompp
+ fnstsw %ax
+ andb $68,%ah
+ xorb $64,%ah
+ jne L21
+ movl $0,(%r8)
+ fldz
+ jmp L24
+ .align 4,0x90
+ .align 4,0x90
+L21:
+ fldt -12(%rbp)
+ fadd %st(0),%st
+ fstpt -12(%rbp)
+ decl %edx
+ movw (%rcx),%si
+ andl $32767,%esi
+ jne L22
+ cmpl $-66,%edx
+ jg L21
+L22:
+ add %esi,%edx
+ jmp L19
+ .align 2,0x90
+L25:
+ fstp %st(0)
+L19:
+ addl $-16382,%edx
+ movl %edx,(%r8)
+ movw (%rcx),%ax
+ andl $-32768,%eax
+ orl $16382,%eax
+ movw %ax,(%rcx)
+ fldt -12(%rbp)
+L24:
+ popq %rsi
+ movq %r9,%rax
+ movq $0,8(%r9)
+ fstpt (%r9)
+ leave
+ ret
+#else
+ pushl %ebp
+ movl %esp,%ebp
+ subl $24,%esp
+ pushl %esi
+ pushl %ebx
+ fldt 8(%ebp)
+ movl 20(%ebp),%ebx
+ fld %st(0)
+ fstpt -12(%ebp)
+ leal -4(%ebp),%ecx
+ movw -4(%ebp),%dx
+ andl $32767,%edx
+ jne L25
+ fldz
+ fucompp
+ fnstsw %ax
+ andb $68,%ah
+ xorb $64,%ah
+ jne L21
+ movl $0,(%ebx)
+ fldz
+ jmp L24
+ .align 2,0x90
+ .align 2,0x90
+L21:
+ fldt -12(%ebp)
+ fadd %st(0),%st
+ fstpt -12(%ebp)
+ decl %edx
+ movw (%ecx),%si
+ andl $32767,%esi
+ jne L22
+ cmpl $-66,%edx
+ jg L21
+L22:
+ addl %esi,%edx
+ jmp L19
+ .align 2,0x90
+L25:
+ fstp %st(0)
+L19:
+ addl $-16382,%edx
+ movl %edx,(%ebx)
+ movw (%ecx),%ax
+ andl $-32768,%eax
+ orl $16382,%eax
+ movw %ax,(%ecx)
+ fldt -12(%ebp)
+L24:
+ leal -32(%ebp),%esp
+ popl %ebx
+ popl %esi
+ leave
+ ret
+#endif
diff --git a/winsup/cygwin/math/ilogbl.S b/winsup/cygwin/math/ilogbl.S
new file mode 100644
index 000000000..f68082ce6
--- /dev/null
+++ b/winsup/cygwin/math/ilogbl.S
@@ -0,0 +1,65 @@
+/**
+ * This file has no copyright assigned and is placed in the Public Domain.
+ * This file is part of the mingw-w64 runtime package.
+ * No warranty is given; refer to the file DISCLAIMER.PD within this package.
+ */
+#include <_mingw_mac.h>
+
+ .file "ilogbl.S"
+ .text
+#ifdef __x86_64__
+ .align 8
+#else
+ .align 4
+#endif
+.globl __MINGW_USYMBOL(ilogbl)
+ .def __MINGW_USYMBOL(ilogbl); .scl 2; .type 32; .endef
+__MINGW_USYMBOL(ilogbl):
+#ifdef __x86_64__
+ fldt (%rcx)
+ fxam /* Is NaN or +-Inf? */
+ fstsw %ax
+ movb $0x45, %dh
+ andb %ah, %dh
+ cmpb $0x05, %dh
+ je 1f /* Is +-Inf, jump. */
+
+ fxtract
+ pushq %rax
+ fstp %st
+
+ fistpl (%rsp)
+ fwait
+ popq %rax
+
+ ret
+
+1: fstp %st
+ movl $0x7fffffff, %eax
+ ret
+#else
+ fldt 4(%esp)
+/* I added the following ugly construct because ilogb(+-Inf) is
+ required to return INT_MAX in ISO C99.
+ -- jakub@redhat.com. */
+ fxam /* Is NaN or +-Inf? */
+ fstsw %ax
+ movb $0x45, %dh
+ andb %ah, %dh
+ cmpb $0x05, %dh
+ je 1f /* Is +-Inf, jump. */
+
+ fxtract
+ pushl %eax
+ fstp %st
+
+ fistpl (%esp)
+ fwait
+ popl %eax
+
+ ret
+
+1: fstp %st
+ movl $0x7fffffff, %eax
+ ret
+#endif
diff --git a/winsup/cygwin/math/internal_logl.S b/winsup/cygwin/math/internal_logl.S
new file mode 100644
index 000000000..f8a075774
--- /dev/null
+++ b/winsup/cygwin/math/internal_logl.S
@@ -0,0 +1,66 @@
+/**
+ * This file has no copyright assigned and is placed in the Public Domain.
+ * This file is part of the mingw-w64 runtime package.
+ * No warranty is given; refer to the file DISCLAIMER.PD within this package.
+ */
+#include <_mingw_mac.h>
+
+ .file "internal_logl.S"
+ .text
+#ifdef __x86_64__
+ .align 8
+#else
+ .align 4
+#endif
+one: .double 1.0
+ /* It is not important that this constant is precise. It is only
+ a value which is known to be on the safe side for using the
+ fyl2xp1 instruction. */
+limit: .double 0.29
+
+.globl __MINGW_USYMBOL(__logl_internal)
+ .def __MINGW_USYMBOL(__logl_internal); .scl 2; .type 32; .endef
+__MINGW_USYMBOL(__logl_internal):
+#ifdef __x86_64__
+ fldln2 // log(2)
+ fldt (%rdx) // x : log(2)
+ fld %st // x : x : log(2)
+ fsubl one(%rip) // x-1 : x : log(2)
+ fld %st // x-1 : x-1 : x : log(2)
+ fabs // |x-1| : x-1 : x : log(2)
+ fcompl limit(%rip) // x-1 : x : log(2)
+ fnstsw // x-1 : x : log(2)
+ andb $0x45, %ah
+ jz 2f
+ fstp %st(1) // x-1 : log(2)
+ fyl2xp1 // log(x)
+ movq %rcx,%rax
+ movq $0,8(%rcx)
+ fstpt (%rcx)
+ ret
+
+2: fstp %st(0) // x : log(2)
+ fyl2x // log(x)
+ movq %rcx,%rax
+ movq $0,8(%rcx)
+ fstpt (%rcx)
+ ret
+#else
+ fldln2 // log(2)
+ fldt 4(%esp) // x : log(2)
+ fld %st // x : x : log(2)
+ fsubl one // x-1 : x : log(2)
+ fld %st // x-1 : x-1 : x : log(2)
+ fabs // |x-1| : x-1 : x : log(2)
+ fcompl limit // x-1 : x : log(2)
+ fnstsw // x-1 : x : log(2)
+ andb $0x45, %ah
+ jz 2f
+ fstp %st(1) // x-1 : log(2)
+ fyl2xp1 // log(x)
+ ret
+
+2: fstp %st(0) // x : log(2)
+ fyl2x // log(x)
+ ret
+#endif
diff --git a/winsup/cygwin/math/isinf.c b/winsup/cygwin/math/isinf.c
new file mode 100644
index 000000000..fd9e2992a
--- /dev/null
+++ b/winsup/cygwin/math/isinf.c
@@ -0,0 +1,18 @@
+int
+isinf (double x)
+{
+ return __builtin_isinf_sign (x);
+}
+
+int
+isinff (float x)
+{
+ return __builtin_isinf_sign (x);
+}
+
+int
+isinfl (long double x)
+{
+ return __builtin_isinf_sign (x);
+}
+
diff --git a/winsup/cygwin/math/isnan.c b/winsup/cygwin/math/isnan.c
new file mode 100644
index 000000000..ac68bef6d
--- /dev/null
+++ b/winsup/cygwin/math/isnan.c
@@ -0,0 +1,18 @@
+int
+isnan (double x)
+{
+ return __builtin_isnan (x);
+}
+
+int
+isnanf (float x)
+{
+ return __builtin_isnan (x);
+}
+
+int
+isnanl (long double x)
+{
+ return __builtin_isnan (x);
+}
+
diff --git a/winsup/cygwin/math/ldexpl.c b/winsup/cygwin/math/ldexpl.c
new file mode 100644
index 000000000..fde31a23c
--- /dev/null
+++ b/winsup/cygwin/math/ldexpl.c
@@ -0,0 +1,23 @@
+/**
+ * This file has no copyright assigned and is placed in the Public Domain.
+ * This file is part of the mingw-w64 runtime package.
+ * No warranty is given; refer to the file DISCLAIMER.PD within this package.
+ */
+#include <math.h>
+#include <errno.h>
+
+long double ldexpl(long double x, int expn)
+{
+ long double res = 0.0L;
+ if (!isfinite (x) || x == 0.0L)
+ return x;
+
+ __asm__ __volatile__ ("fscale"
+ : "=t" (res)
+ : "0" (x), "u" ((long double) expn));
+
+ if (!isfinite (res) || res == 0.0L)
+ errno = ERANGE;
+
+ return res;
+}
diff --git a/winsup/cygwin/math/lgammal.c b/winsup/cygwin/math/lgammal.c
new file mode 100644
index 000000000..03c030e00
--- /dev/null
+++ b/winsup/cygwin/math/lgammal.c
@@ -0,0 +1,342 @@
+/**
+ * This file has no copyright assigned and is placed in the Public Domain.
+ * This file is part of the mingw-w64 runtime package.
+ * No warranty is given; refer to the file DISCLAIMER.PD within this package.
+ */
+#include "cephes_mconf.h"
+
+#if UNK
+static uLD S[9] = {
+ { { -1.193945051381510095614E-3L } },
+ { { 7.220599478036909672331E-3L } },
+ { { -9.622023360406271645744E-3L } },
+ { { -4.219773360705915470089E-2L } },
+ { { 1.665386113720805206758E-1L } },
+ { { -4.200263503403344054473E-2L } },
+ { { -6.558780715202540684668E-1L } },
+ { { 5.772156649015328608253E-1L } },
+ { { 1.000000000000000000000E0L } }
+};
+#endif
+#if IBMPC
+static const uLD S[] = {
+ { { 0xbaeb,0xd6d3,0x25e5,0x9c7e,0xbff5, 0, 0, 0 } },
+ { { 0xfe9a,0xceb4,0xc74e,0xec9a,0x3ff7, 0, 0, 0 } },
+ { { 0x9225,0xdfef,0xb0e9,0x9da5,0xbff8, 0, 0, 0 } },
+ { { 0x10b0,0xec17,0x87dc,0xacd7,0xbffa, 0, 0, 0 } },
+ { { 0x6b8d,0x7515,0x1905,0xaa89,0x3ffc, 0, 0, 0 } },
+ { { 0xf183,0x126b,0xf47d,0xac0a,0xbffa, 0, 0, 0 } },
+ { { 0x7bf6,0x57d1,0xa013,0xa7e7,0xbffe, 0, 0, 0 } },
+ { { 0xc7a9,0x7db0,0x67e3,0x93c4,0x3ffe, 0, 0, 0 } },
+ { { 0x0000,0x0000,0x0000,0x8000,0x3fff, 0, 0, 0 } }
+};
+#endif
+#if MIEEE
+static uLD S[27] = {
+ { { 0xbff50000,0x9c7e25e5,0xd6d3baeb, 0 } },
+ { { 0x3ff70000,0xec9ac74e,0xceb4fe9a, 0 } },
+ { { 0xbff80000,0x9da5b0e9,0xdfef9225, 0 } },
+ { { 0xbffa0000,0xacd787dc,0xec1710b0, 0 } },
+ { { 0x3ffc0000,0xaa891905,0x75156b8d, 0 } },
+ { { 0xbffa0000,0xac0af47d,0x126bf183, 0 } },
+ { { 0xbffe0000,0xa7e7a013,0x57d17bf6, 0 } },
+ { { 0x3ffe0000,0x93c467e3,0x7db0c7a9, 0 } },
+ { { 0x3fff0000,0x80000000,0x00000000, 0 } }
+};
+#endif
+
+#if UNK
+static uLD SN[9] = {
+ { { 1.133374167243894382010E-3L } },
+ { { 7.220837261893170325704E-3L } },
+ { { 9.621911155035976733706E-3L } },
+ { { -4.219773343731191721664E-2L } },
+ { { -1.665386113944413519335E-1L } },
+ { { -4.200263503402112910504E-2L } },
+ { { 6.558780715202536547116E-1L } },
+ { { 5.772156649015328608727E-1L } },
+ { { -1.000000000000000000000E0L } }
+};
+#endif
+#if IBMPC
+static const uLD SN[] = {
+ { { 0x5dd1,0x02de,0xb9f7,0x948d,0x3ff5, 0, 0, 0 } },
+ { { 0x989b,0xdd68,0xc5f1,0xec9c,0x3ff7, 0, 0, 0 } },
+ { { 0x2ca1,0x18f0,0x386f,0x9da5,0x3ff8, 0, 0, 0 } },
+ { { 0x783f,0x41dd,0x87d1,0xacd7,0xbffa, 0, 0, 0 } },
+ { { 0x7a5b,0xd76d,0x1905,0xaa89,0xbffc, 0, 0, 0 } },
+ { { 0x7f64,0x1234,0xf47d,0xac0a,0xbffa, 0, 0, 0 } },
+ { { 0x5e26,0x57d1,0xa013,0xa7e7,0x3ffe, 0, 0, 0 } },
+ { { 0xc7aa,0x7db0,0x67e3,0x93c4,0x3ffe, 0, 0, 0 } },
+ { { 0x0000,0x0000,0x0000,0x8000,0xbfff, 0, 0, 0 } }
+};
+#endif
+#if MIEEE
+static uLD SN[] = {
+ { { 0x3ff50000,0x948db9f7,0x02de5dd1, 0 } },
+ { { 0x3ff70000,0xec9cc5f1,0xdd68989b, 0 } },
+ { { 0x3ff80000,0x9da5386f,0x18f02ca1, 0 } },
+ { { 0xbffa0000,0xacd787d1,0x41dd783f, 0 } },
+ { { 0xbffc0000,0xaa891905,0xd76d7a5b, 0 } },
+ { { 0xbffa0000,0xac0af47d,0x12347f64, 0 } },
+ { { 0x3ffe0000,0xa7e7a013,0x57d15e26, 0 } },
+ { { 0x3ffe0000,0x93c467e3,0x7db0c7aa, 0 } },
+ { { 0xbfff0000,0x80000000,0x00000000, 0 } }
+};
+#endif
+
+
+/* A[]: Stirling's formula expansion of log gamma
+ * B[], C[]: log gamma function between 2 and 3
+ */
+
+
+/* log gamma(x) = ( x - 0.5 ) * log(x) - x + LS2PI + 1/x A(1/x^2)
+ * x >= 8
+ * Peak relative error 1.51e-21
+ * Relative spread of error peaks 5.67e-21
+ */
+#if UNK
+static uLD A[7] = {
+ { { 4.885026142432270781165E-3L } },
+ { { -1.880801938119376907179E-3L } },
+ { { 8.412723297322498080632E-4L } },
+ { { -5.952345851765688514613E-4L } },
+ { { 7.936507795855070755671E-4L } },
+ { { -2.777777777750349603440E-3L } },
+ { { 8.333333333333331447505E-2L } }
+};
+#endif
+#if IBMPC
+static const uLD A[] = {
+ { { 0xd984,0xcc08,0x91c2,0xa012,0x3ff7, 0, 0, 0 } },
+ { { 0x3d91,0x0304,0x3da1,0xf685,0xbff5, 0, 0, 0 } },
+ { { 0x3bdc,0xaad1,0xd492,0xdc88,0x3ff4, 0, 0, 0 } },
+ { { 0x8b20,0x9fce,0x844e,0x9c09,0xbff4, 0, 0, 0 } },
+ { { 0xf8f2,0x30e5,0x0092,0xd00d,0x3ff4, 0, 0, 0 } },
+ { { 0x4d88,0x03a8,0x60b6,0xb60b,0xbff6, 0, 0, 0 } },
+ { { 0x9fcc,0xaaaa,0xaaaa,0xaaaa,0x3ffb, 0, 0, 0 } }
+};
+#endif
+#if MIEEE
+static uLD A[] = {
+ { { 0x3ff70000,0xa01291c2,0xcc08d984, 0 } },
+ { { 0xbff50000,0xf6853da1,0x03043d91, 0 } },
+ { { 0x3ff40000,0xdc88d492,0xaad13bdc, 0 } },
+ { { 0xbff40000,0x9c09844e,0x9fce8b20, 0 } },
+ { { 0x3ff40000,0xd00d0092,0x30e5f8f2, 0 } },
+ { { 0xbff60000,0xb60b60b6,0x03a84d88, 0 } },
+ { { 0x3ffb0000,0xaaaaaaaa,0xaaaa9fcc, 0 } }
+};
+#endif
+
+/* log gamma(x+2) = x B(x)/C(x)
+ * 0 <= x <= 1
+ * Peak relative error 7.16e-22
+ * Relative spread of error peaks 4.78e-20
+ */
+#if UNK
+static uLD B[7] = {
+ { { -2.163690827643812857640E3L } },
+ { { -8.723871522843511459790E4L } },
+ { { -1.104326814691464261197E6L } },
+ { { -6.111225012005214299996E6L } },
+ { { -1.625568062543700591014E7L } },
+ { { -2.003937418103815175475E7L } },
+ { { -8.875666783650703802159E6L } }
+};
+static uLD C[7] = {
+ { { -5.139481484435370143617E2L } },
+ { { -3.403570840534304670537E4L } },
+ { { -6.227441164066219501697E5L } },
+ { { -4.814940379411882186630E6L } },
+ { { -1.785433287045078156959E7L } },
+ { { -3.138646407656182662088E7L } },
+ { { -2.099336717757895876142E7L } }
+};
+#endif
+#if IBMPC
+static const uLD B[] = {
+ { { 0x9557,0x4995,0x0da1,0x873b,0xc00a, 0, 0, 0 } },
+ { { 0xfe44,0x9af8,0x5b8c,0xaa63,0xc00f, 0, 0, 0 } },
+ { { 0x5aa8,0x7cf5,0x3684,0x86ce,0xc013, 0, 0, 0 } },
+ { { 0x259a,0x258c,0xf206,0xba7f,0xc015, 0, 0, 0 } },
+ { { 0xbe18,0x1ca3,0xc0a0,0xf80a,0xc016, 0, 0, 0 } },
+ { { 0x168f,0x2c42,0x6717,0x98e3,0xc017, 0, 0, 0 } },
+ { { 0x2051,0x9d55,0x92c8,0x876e,0xc016, 0, 0, 0 } }
+};
+static const uLD C[] = {
+ { { 0xaa77,0xcf2f,0xae76,0x807c,0xc008, 0, 0, 0 } },
+ { { 0xb280,0x0d74,0xb55a,0x84f3,0xc00e, 0, 0, 0 } },
+ { { 0xa505,0xcd30,0x81dc,0x9809,0xc012, 0, 0, 0 } },
+ { { 0x3369,0x4246,0xb8c2,0x92f0,0xc015, 0, 0, 0 } },
+ { { 0x63cf,0x6aee,0xbe6f,0x8837,0xc017, 0, 0, 0 } },
+ { { 0x26bb,0xccc7,0xb009,0xef75,0xc017, 0, 0, 0 } },
+ { { 0x462b,0xbae8,0xab96,0xa02a,0xc017, 0, 0, 0 } }
+};
+#endif
+#if MIEEE
+static uLD B[] = {
+ { { 0xc00a0000,0x873b0da1,0x49959557, 0 } },
+ { { 0xc00f0000,0xaa635b8c,0x9af8fe44, 0 } },
+ { { 0xc0130000,0x86ce3684,0x7cf55aa8, 0 } },
+ { { 0xc0150000,0xba7ff206,0x258c259a, 0 } },
+ { { 0xc0160000,0xf80ac0a0,0x1ca3be18, 0 } },
+ { { 0xc0170000,0x98e36717,0x2c42168f, 0 } },
+ { { 0xc0160000,0x876e92c8,0x9d552051, 0 } }
+};
+static uLD C[] = {
+ { { 0xc0080000,0x807cae76,0xcf2faa77, 0 } },
+ { { 0xc00e0000,0x84f3b55a,0x0d74b280, 0 } },
+ { { 0xc0120000,0x980981dc,0xcd30a505, 0 } },
+ { { 0xc0150000,0x92f0b8c2,0x42463369, 0 } },
+ { { 0xc0170000,0x8837be6f,0x6aee63cf, 0 } },
+ { { 0xc0170000,0xef75b009,0xccc726bb, 0 } },
+ { { 0xc0170000,0xa02aab96,0xbae8462b, 0 } }
+};
+#endif
+
+/* log( sqrt( 2*pi ) ) */
+static const long double LS2PI = 0.91893853320467274178L;
+#if defined(__arm__) || defined(_ARM_)
+#define MAXLGM 2.035093e36
+#else
+#define MAXLGM 1.04848146839019521116e+4928L
+#endif /* defined(__arm__) || defined(_ARM_) */
+
+/* Logarithm of gamma function */
+/* Reentrant version */
+long double __lgammal_r(long double x, int* sgngaml);
+
+long double __lgammal_r(long double x, int* sgngaml)
+{
+ long double p, q, w, z, f, nx;
+ int i;
+
+ *sgngaml = 1;
+#ifdef NANS
+ if (isnanl(x))
+ return(NANL);
+#endif
+#ifdef INFINITIES
+ if (!isfinitel(x))
+ return (INFINITYL);
+#endif
+ if (x < -34.0L)
+ {
+ q = -x;
+ w = __lgammal_r(q, sgngaml); /* note this modifies sgngam! */
+ p = floorl(q);
+ if (p == q)
+ {
+lgsing:
+ _SET_ERRNO(EDOM);
+ mtherr( "lgammal", SING );
+#ifdef INFINITIES
+ return (INFINITYL);
+#else
+ return (MAXNUML);
+#endif
+ }
+ i = p;
+ if ((i & 1) == 0)
+ *sgngaml = -1;
+ else
+ *sgngaml = 1;
+ z = q - p;
+ if (z > 0.5L)
+ {
+ p += 1.0L;
+ z = p - q;
+ }
+ z = q * sinl(PIL * z);
+ if (z == 0.0L)
+ goto lgsing;
+ /* z = LOGPI - logl( z ) - w; */
+ z = logl(PIL/z) - w;
+ return (z);
+ }
+
+ if (x < 13.0L)
+ {
+ z = 1.0L;
+ nx = floorl(x + 0.5L);
+ f = x - nx;
+ while (x >= 3.0L)
+ {
+ nx -= 1.0L;
+ x = nx + f;
+ z *= x;
+ }
+ while (x < 2.0L)
+ {
+ if (fabsl(x) <= 0.03125)
+ goto lsmall;
+ z /= nx + f;
+ nx += 1.0L;
+ x = nx + f;
+ }
+ if (z < 0.0L)
+ {
+ *sgngaml = -1;
+ z = -z;
+ }
+ else
+ *sgngaml = 1;
+ if (x == 2.0L)
+ return ( logl(z) );
+ x = (nx - 2.0L) + f;
+ p = x * polevll(x, B, 6) / p1evll(x, C, 7);
+ return ( logl(z) + p );
+ }
+
+ if (x > MAXLGM)
+ {
+ _SET_ERRNO(ERANGE);
+ mtherr("lgammal", OVERFLOW);
+#ifdef INFINITIES
+ return (*sgngaml * INFINITYL);
+#else
+ return (*sgngaml * MAXNUML);
+#endif
+ }
+
+ q = (x - 0.5L) * logl(x) - x + LS2PI;
+ if (x > 1.0e10L)
+ return(q);
+ p = 1.0L/(x*x);
+ q += polevll(p, A, 6) / x;
+ return (q);
+
+lsmall:
+ if (x == 0.0L)
+ goto lgsing;
+ if (x < 0.0L)
+ {
+ x = -x;
+ q = z / (x * polevll(x, SN, 8));
+ }
+ else
+ q = z / (x * polevll(x, S, 8));
+ if (q < 0.0L)
+ {
+ *sgngaml = -1;
+ q = -q;
+ }
+ else
+ *sgngaml = 1;
+ q = logl(q);
+ return (q);
+}
+
+/* This is the C99 version */
+long double lgammal(long double x)
+{
+ return (__lgammal_r (x, &signgam));
+}
+
+long double lgammal_r(long double x, int *signp)
+{
+ return (__lgammal_r (x, signp));
+}
+
diff --git a/winsup/cygwin/math/llrint.c b/winsup/cygwin/math/llrint.c
new file mode 100644
index 000000000..1fc11e886
--- /dev/null
+++ b/winsup/cygwin/math/llrint.c
@@ -0,0 +1,18 @@
+/**
+ * This file has no copyright assigned and is placed in the Public Domain.
+ * This file is part of the mingw-w64 runtime package.
+ * No warranty is given; refer to the file DISCLAIMER.PD within this package.
+ */
+#include <math.h>
+
+long long llrint (double x)
+{
+ long long retval = 0ll;
+#if defined(_AMD64_) || defined(__x86_64__) || defined(_X86_) || defined(__i386__)
+ __asm__ __volatile__ ("fistpll %0" : "=m" (retval) : "t" (x) : "st");
+#else
+ retval = (long long)x;
+#endif
+ return retval;
+}
+
diff --git a/winsup/cygwin/math/llrintf.c b/winsup/cygwin/math/llrintf.c
new file mode 100644
index 000000000..aabd81f33
--- /dev/null
+++ b/winsup/cygwin/math/llrintf.c
@@ -0,0 +1,17 @@
+/**
+ * This file has no copyright assigned and is placed in the Public Domain.
+ * This file is part of the mingw-w64 runtime package.
+ * No warranty is given; refer to the file DISCLAIMER.PD within this package.
+ */
+#include <math.h>
+
+long long llrintf (float x)
+{
+ long long retval = 0ll;
+#if defined(_AMD64_) || defined(__x86_64__) || defined(_X86_) || defined(__i386__)
+ __asm__ __volatile__ ("fistpll %0" : "=m" (retval) : "t" (x) : "st");
+#else
+ retval = (long long)x;
+#endif
+ return retval;
+}
diff --git a/winsup/cygwin/math/llrintl.c b/winsup/cygwin/math/llrintl.c
new file mode 100644
index 000000000..59ace2dfe
--- /dev/null
+++ b/winsup/cygwin/math/llrintl.c
@@ -0,0 +1,18 @@
+/**
+ * This file has no copyright assigned and is placed in the Public Domain.
+ * This file is part of the mingw-w64 runtime package.
+ * No warranty is given; refer to the file DISCLAIMER.PD within this package.
+ */
+#include <math.h>
+
+long long llrintl (long double x)
+{
+ long long retval = 0ll;
+#if defined(_AMD64_) || defined(__x86_64__) || defined(_X86_) || defined(__i386__)
+ __asm__ __volatile__ ("fistpll %0" : "=m" (retval) : "t" (x) : "st");
+#else
+ retval = (long long)x;
+#endif
+ return retval;
+}
+
diff --git a/winsup/cygwin/math/llroundl.c b/winsup/cygwin/math/llroundl.c
new file mode 100644
index 000000000..fc600e77d
--- /dev/null
+++ b/winsup/cygwin/math/llroundl.c
@@ -0,0 +1,38 @@
+/**
+ * This file has no copyright assigned and is placed in the Public Domain.
+ * This file is part of the mingw-w64 runtime package.
+ * No warranty is given; refer to the file DISCLAIMER.PD within this package.
+ */
+#include <math.h>
+#include <limits.h>
+#include <errno.h>
+
+long long
+llroundl (long double x)
+{
+ long double res;
+
+ if (x >= 0.0L)
+ {
+ res = ceill (x);
+ if (res - x > 0.5L)
+ res -= 1.0L;
+ }
+ else
+ {
+ res = ceill (-x);
+ if (res + x > 0.5L)
+ res -= 1.0L;
+ res = -res;
+ }
+ if (!isfinite (res)
+ || res > (double) LLONG_MAX
+ || res < (double) LLONG_MIN)
+ {
+ errno = ERANGE;
+ /* Undefined behaviour, so we could return anything. */
+ /* return res > 0.0 ? LLONG_MAX : LLONG_MIN; */
+ }
+ return (long long) res;
+}
+
diff --git a/winsup/cygwin/math/log.def.h b/winsup/cygwin/math/log.def.h
new file mode 100644
index 000000000..94a77007f
--- /dev/null
+++ b/winsup/cygwin/math/log.def.h
@@ -0,0 +1,69 @@
+/*
+ This Software is provided under the Zope Public License (ZPL) Version 2.1.
+
+ Copyright (c) 2009, 2010 by the mingw-w64 project
+
+ See the AUTHORS file for the list of contributors to the mingw-w64 project.
+
+ This license has been certified as open source. It has also been designated
+ as GPL compatible by the Free Software Foundation (FSF).
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions in source code must retain the accompanying copyright
+ notice, this list of conditions, and the following disclaimer.
+ 2. Redistributions in binary form must reproduce the accompanying
+ copyright notice, this list of conditions, and the following disclaimer
+ in the documentation and/or other materials provided with the
+ distribution.
+ 3. Names of the copyright holders must not be used to endorse or promote
+ products derived from this software without prior written permission
+ from the copyright holders.
+ 4. The right to distribute this software or to use it for any purpose does
+ not give you the right to use Servicemarks (sm) or Trademarks (tm) of
+ the copyright holders. Use of them is covered by separate agreement
+ with the copyright holders.
+ 5. If any files are modified, you must cause the modified files to carry
+ prominent notices stating that you changed the files and the date of
+ any change.
+
+ Disclaimer
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY EXPRESSED
+ 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 HOLDERS 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 "complex_internal.h"
+#include <errno.h>
+
+extern long double __cdecl __logl_internal (long double);
+
+__FLT_TYPE __cdecl
+__FLT_ABI(log) (__FLT_TYPE x)
+{
+ int x_class = fpclassify (x);
+ if (x_class == FP_ZERO)
+ {
+ __FLT_RPT_ERANGE ("log", x, 0.0, -__FLT_HUGE_VAL, 1);
+ return -__FLT_HUGE_VAL;
+ }
+ else if (signbit (x))
+ {
+ __FLT_RPT_DOMAIN ("log", x, 0.0, __FLT_NAN);
+ return __FLT_NAN;
+ }
+ else if (x_class == FP_INFINITE)
+ return __FLT_HUGE_VAL;
+ else if (x_class == FP_NAN)
+ return __FLT_NAN;
+ return (__FLT_TYPE) __logl_internal ((long double) x);
+}
diff --git a/winsup/cygwin/math/log10l.S b/winsup/cygwin/math/log10l.S
new file mode 100644
index 000000000..33d45a3a8
--- /dev/null
+++ b/winsup/cygwin/math/log10l.S
@@ -0,0 +1,93 @@
+/**
+ * This file has no copyright assigned and is placed in the Public Domain.
+ * This file is part of the mingw-w64 runtime package.
+ * No warranty is given; refer to the file DISCLAIMER.PD within this package.
+ */
+#include <_mingw_mac.h>
+
+ .file "log10l.S"
+ .text
+#ifdef __x86_64__
+ .align 8
+#else
+ .align 4
+#endif
+one: .double 1.0
+ /* It is not important that this constant is precise. It is only
+ a value which is known to be on the safe side for using the
+ fyl2xp1 instruction. */
+limit: .double 0.29
+
+ .text
+#ifdef __x86_64__
+ .align 8
+#else
+ .align 4
+#endif
+.globl __MINGW_USYMBOL(log10l)
+ .def __MINGW_USYMBOL(log10l); .scl 2; .type 32; .endef
+__MINGW_USYMBOL(log10l):
+#ifdef __x86_64__
+ fldlg2 // log10(2)
+ fldt (%rdx) // x : log10(2)
+ fxam
+ fnstsw
+ fld %st // x : x : log10(2)
+ sahf
+ jc 3f // in case x is NaN or ±Inf
+4: fsubl one(%rip) // x-1 : x : log10(2)
+ fld %st // x-1 : x-1 : x : log10(2)
+ fabs // |x-1| : x-1 : x : log10(2)
+ fcompl limit(%rip) // x-1 : x : log10(2)
+ fnstsw // x-1 : x : log10(2)
+ andb $0x45, %ah
+ jz 2f
+ fstp %st(1) // x-1 : log10(2)
+ fyl2xp1 // log10(x)
+ movq %rcx,%rax
+ movq $0,8(%rcx)
+ fstpt (%rcx)
+ ret
+
+2: fstp %st(0) // x : log10(2)
+ fyl2x // log10(x)
+ movq %rcx,%rax
+ movq $0,8(%rcx)
+ fstpt (%rcx)
+ ret
+
+3: jp 4b // in case x is ±Inf
+ fstp %st(1)
+ fstp %st(1)
+ movq %rcx,%rax
+ movq $0,8(%rcx)
+ fstpt (%rcx)
+ ret
+#else
+ fldlg2 // log10(2)
+ fldt 4(%esp) // x : log10(2)
+ fxam
+ fnstsw
+ fld %st // x : x : log10(2)
+ sahf
+ jc 3f // in case x is NaN or ±Inf
+4: fsubl one // x-1 : x : log10(2)
+ fld %st // x-1 : x-1 : x : log10(2)
+ fabs // |x-1| : x-1 : x : log10(2)
+ fcompl limit // x-1 : x : log10(2)
+ fnstsw // x-1 : x : log10(2)
+ andb $0x45, %ah
+ jz 2f
+ fstp %st(1) // x-1 : log10(2)
+ fyl2xp1 // log10(x)
+ ret
+
+2: fstp %st(0) // x : log10(2)
+ fyl2x // log10(x)
+ ret
+
+3: jp 4b // in case x is ±Inf
+ fstp %st(1)
+ fstp %st(1)
+ ret
+#endif
diff --git a/winsup/cygwin/math/log1pl.S b/winsup/cygwin/math/log1pl.S
new file mode 100644
index 000000000..a56bcf4ec
--- /dev/null
+++ b/winsup/cygwin/math/log1pl.S
@@ -0,0 +1,102 @@
+/**
+ * This file has no copyright assigned and is placed in the Public Domain.
+ * This file is part of the mingw-w64 runtime package.
+ * No warranty is given; refer to the file DISCLAIMER.PD within this package.
+ */
+#include <_mingw_mac.h>
+
+ .file "log1pl.S"
+ .text
+ /* The fyl2xp1 can only be used for values in
+ -1 + sqrt(2) / 2 <= x <= 1 - sqrt(2) / 2
+ 0.29 is a safe value.
+ */
+
+ /* Only gcc understands the .tfloat type
+ The series of .long below represents
+ limit: .tfloat 0.29
+ */
+ .align 16
+limit:
+ .long 2920577761
+ .long 2491081031
+ .long 16381
+#ifdef __x86_64__
+ .align 8
+#else
+ .align 4
+#endif
+ /* Please note: we use a double value here. Since 1.0 has
+ an exact representation this does not effect the accuracy
+ but it helps to optimize the code. */
+one: .double 1.0
+
+/*
+ * Use the fyl2xp1 function when the argument is in the range -0.29 to 0.29,
+ * otherwise fyl2x with the needed extra computation.
+ */
+.globl __MINGW_USYMBOL(log1pl)
+ .def __MINGW_USYMBOL(log1pl); .scl 2; .type 32; .endef
+__MINGW_USYMBOL(log1pl):
+#ifdef __x86_64__
+ fldln2
+ fldt (%rdx)
+ fxam
+ fnstsw
+ fld %st
+ sahf
+ jc 3f // in case x is NaN or ±Inf
+4:
+ fabs
+ fldt limit(%rip)
+ fcompp
+ fnstsw
+ sahf
+ jnc 2f
+ faddl one(%rip)
+ fyl2x
+ movq %rcx,%rax
+ movq $0,8(%rcx)
+ fstpt (%rcx)
+ ret
+
+2: fyl2xp1
+ movq %rcx,%rax
+ movq $0,8(%rcx)
+ fstpt (%rcx)
+ ret
+
+3: jp 4b // in case x is ±Inf
+ fstp %st(1)
+ fstp %st(1)
+ movq %rcx,%rax
+ movq $0,8(%rcx)
+ fstpt (%rcx)
+ ret
+#else
+ fldln2
+ fldt 4(%esp)
+ fxam
+ fnstsw
+ fld %st
+ sahf
+ jc 3f // in case x is NaN or ±Inf
+4:
+ fabs
+ fldt limit
+ fcompp
+ fnstsw
+ sahf
+ jnc 2f
+ faddl one
+ fyl2x
+ ret
+
+2: fyl2xp1
+ ret
+
+3: jp 4b // in case x is ±Inf
+ fstp %st(1)
+ fstp %st(1)
+ ret
+#endif
diff --git a/winsup/cygwin/math/log2l.S b/winsup/cygwin/math/log2l.S
new file mode 100644
index 000000000..771cd8ae4
--- /dev/null
+++ b/winsup/cygwin/math/log2l.S
@@ -0,0 +1,87 @@
+/**
+ * This file has no copyright assigned and is placed in the Public Domain.
+ * This file is part of the mingw-w64 runtime package.
+ * No warranty is given; refer to the file DISCLAIMER.PD within this package.
+ */
+#include <_mingw_mac.h>
+
+ .file "log2l.S"
+ .text
+#ifdef __x86_64__
+ .align 8
+#else
+ .align 4
+#endif
+one: .double 1.0
+ /* It is not important that this constant is precise. It is only
+ a value which is known to be on the safe side for using the
+ fyl2xp1 instruction. */
+limit: .double 0.29
+
+.globl __MINGW_USYMBOL(log2l)
+ .def __MINGW_USYMBOL(log2l); .scl 2; .type 32; .endef
+__MINGW_USYMBOL(log2l):
+#ifdef __x86_64__
+ fldl one(%rip)
+ fldt (%rdx) // x : 1
+ fxam
+ fnstsw
+ fld %st // x : x : 1
+ sahf
+ jc 3f // in case x is NaN or ±Inf
+4: fsub %st(2), %st // x-1 : x : 1
+ fld %st // x-1 : x-1 : x : 1
+ fabs // |x-1| : x-1 : x : 1
+ fcompl limit(%rip) // x-1 : x : 1
+ fnstsw // x-1 : x : 1
+ andb $0x45, %ah
+ jz 2f
+ fstp %st(1) // x-1 : 1
+ fyl2xp1 // log(x)
+ movq %rcx,%rax
+ movq $0,8(%rcx)
+ fstpt (%rcx)
+ ret
+
+2: fstp %st(0) // x : 1
+ fyl2x // log(x)
+ movq %rcx,%rax
+ movq $0,8(%rcx)
+ fstpt (%rcx)
+ ret
+
+3: jp 4b // in case x is ±Inf
+ fstp %st(1)
+ fstp %st(1)
+ movq %rcx,%rax
+ movq $0,8(%rcx)
+ fstpt (%rcx)
+ ret
+#else
+ fldl one
+ fldt 4(%esp) // x : 1
+ fxam
+ fnstsw
+ fld %st // x : x : 1
+ sahf
+ jc 3f // in case x is NaN or ±Inf
+4: fsub %st(2), %st // x-1 : x : 1
+ fld %st // x-1 : x-1 : x : 1
+ fabs // |x-1| : x-1 : x : 1
+ fcompl limit // x-1 : x : 1
+ fnstsw // x-1 : x : 1
+ andb $0x45, %ah
+ jz 2f
+ fstp %st(1) // x-1 : 1
+ fyl2xp1 // log(x)
+ ret
+
+2: fstp %st(0) // x : 1
+ fyl2x // log(x)
+ ret
+
+3: jp 4b // in case x is ±Inf
+ fstp %st(1)
+ fstp %st(1)
+ ret
+#endif
diff --git a/winsup/cygwin/math/logbl.c b/winsup/cygwin/math/logbl.c
new file mode 100644
index 000000000..310c4457b
--- /dev/null
+++ b/winsup/cygwin/math/logbl.c
@@ -0,0 +1,22 @@
+/**
+ * This file has no copyright assigned and is placed in the Public Domain.
+ * This file is part of the mingw-w64 runtime package.
+ * No warranty is given; refer to the file DISCLAIMER.PD within this package.
+ */
+/*
+ * Written by J.T. Conklin <jtc@netbsd.org>.
+ * Changes for long double by Ulrich Drepper <drepper@cygnus.com>
+ * Public domain.
+ */
+
+#include <math.h>
+
+long double
+logbl (long double x)
+{
+ long double res = 0.0L;
+
+ asm ("fxtract\n\t"
+ "fstp %%st" : "=t" (res) : "0" (x));
+ return res;
+}
diff --git a/winsup/cygwin/math/logl.c b/winsup/cygwin/math/logl.c
new file mode 100644
index 000000000..a0fa386dc
--- /dev/null
+++ b/winsup/cygwin/math/logl.c
@@ -0,0 +1,46 @@
+/*
+ This Software is provided under the Zope Public License (ZPL) Version 2.1.
+
+ Copyright (c) 2009, 2010 by the mingw-w64 project
+
+ See the AUTHORS file for the list of contributors to the mingw-w64 project.
+
+ This license has been certified as open source. It has also been designated
+ as GPL compatible by the Free Software Foundation (FSF).
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions in source code must retain the accompanying copyright
+ notice, this list of conditions, and the following disclaimer.
+ 2. Redistributions in binary form must reproduce the accompanying
+ copyright notice, this list of conditions, and the following disclaimer
+ in the documentation and/or other materials provided with the
+ distribution.
+ 3. Names of the copyright holders must not be used to endorse or promote
+ products derived from this software without prior written permission
+ from the copyright holders.
+ 4. The right to distribute this software or to use it for any purpose does
+ not give you the right to use Servicemarks (sm) or Trademarks (tm) of
+ the copyright holders. Use of them is covered by separate agreement
+ with the copyright holders.
+ 5. If any files are modified, you must cause the modified files to carry
+ prominent notices stating that you changed the files and the date of
+ any change.
+
+ Disclaimer
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY EXPRESSED
+ 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 HOLDERS 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.
+*/
+
+#define _NEW_COMPLEX_LDOUBLE 1
+#include "log.def.h"
diff --git a/winsup/cygwin/math/lrint.c b/winsup/cygwin/math/lrint.c
new file mode 100644
index 000000000..0409da660
--- /dev/null
+++ b/winsup/cygwin/math/lrint.c
@@ -0,0 +1,30 @@
+/**
+ * This file has no copyright assigned and is placed in the Public Domain.
+ * This file is part of the mingw-w64 runtime package.
+ * No warranty is given; refer to the file DISCLAIMER.PD within this package.
+ */
+#include <math.h>
+
+#if defined(__arm__) || defined(_ARM_)
+/* This works around a compiler bug */
+long __lrint_internal( double x );
+asm(".def __lrint_internal; .scl 2; .type 32; .endef\n"
+ "\t.text\n"
+ "\t.align 4\n"
+ "\t.globl __lrint_internal\n"
+ "__lrint_internal:\n"
+ "\tvcvtr.s32.f64 s0, d0\n"
+ "\tfmrs r0, s0\n"
+ "\tbx lr");
+#endif /* defined(__arm__) || defined(_ARM_) */
+
+long lrint (double x)
+{
+ long retval = 0L;
+#if defined(_AMD64_) || defined(__x86_64__) || defined(_X86_) || defined(__i386__)
+ __asm__ __volatile__ ("fistpl %0" : "=m" (retval) : "t" (x) : "st");
+#elif defined(__arm__) || defined(_ARM_)
+ retval = __lrint_internal(x);
+#endif
+ return retval;
+}
diff --git a/winsup/cygwin/math/lrintf.c b/winsup/cygwin/math/lrintf.c
new file mode 100644
index 000000000..2b6d89318
--- /dev/null
+++ b/winsup/cygwin/math/lrintf.c
@@ -0,0 +1,30 @@
+/**
+ * This file has no copyright assigned and is placed in the Public Domain.
+ * This file is part of the mingw-w64 runtime package.
+ * No warranty is given; refer to the file DISCLAIMER.PD within this package.
+ */
+#include <math.h>
+
+#if defined(__arm__) || defined(_ARM_)
+/* This works around a compiler bug */
+long __lrintf_internal( float x );
+asm(".def __lrintf_internal; .scl 2; .type 32; .endef\n"
+ "\t.text\n"
+ "\t.align 4\n"
+ "\t.globl __lrintf_internal\n"
+ "__lrintf_internal:\n"
+ "\tvcvtr.s32.f32 s0, s0\n"
+ "\tfmrs r0, s0\n"
+ "\tbx lr");
+#endif /* defined(__arm__) || defined(_ARM_) */
+
+long lrintf (float x)
+{
+ long retval = 0l;
+#if defined(_AMD64_) || defined(__x86_64__) || defined(_X86_) || defined(__i386__)
+ __asm__ __volatile__ ("fistpl %0" : "=m" (retval) : "t" (x) : "st");
+#elif defined(__arm__) || defined(_ARM_)
+ retval = __lrintf_internal(x);
+#endif
+ return retval;
+}
diff --git a/winsup/cygwin/math/lrintl.c b/winsup/cygwin/math/lrintl.c
new file mode 100644
index 000000000..94c4e4924
--- /dev/null
+++ b/winsup/cygwin/math/lrintl.c
@@ -0,0 +1,18 @@
+/**
+ * This file has no copyright assigned and is placed in the Public Domain.
+ * This file is part of the mingw-w64 runtime package.
+ * No warranty is given; refer to the file DISCLAIMER.PD within this package.
+ */
+#include <math.h>
+
+long lrintl (long double x)
+{
+ long retval = 0l;
+#if defined(_AMD64_) || defined(__x86_64__) || defined(_X86_) || defined(__i386__)
+ __asm__ __volatile__ ("fistpl %0" : "=m" (retval) : "t" (x) : "st");
+#elif defined(__arm__) || defined(_ARM_)
+ retval = lrint(x);
+#endif
+ return retval;
+}
+
diff --git a/winsup/cygwin/math/lroundl.c b/winsup/cygwin/math/lroundl.c
new file mode 100644
index 000000000..b4584a896
--- /dev/null
+++ b/winsup/cygwin/math/lroundl.c
@@ -0,0 +1,37 @@
+/**
+ * This file has no copyright assigned and is placed in the Public Domain.
+ * This file is part of the mingw-w64 runtime package.
+ * No warranty is given; refer to the file DISCLAIMER.PD within this package.
+ */
+#include <math.h>
+#include <limits.h>
+#include <errno.h>
+
+long
+lroundl (long double x)
+{
+ long double res;
+
+ if (x >= 0.0L)
+ {
+ res = ceill (x);
+ if (res - x > 0.5L)
+ res -= 1.0;
+ }
+ else
+ {
+ res = ceill (-x);
+ if (res + x > 0.5L)
+ res -= 1.0L;
+ res = -res;
+ }
+ if (!isfinite (res)
+ || res > (long double)LONG_MAX
+ || res < (long double)LONG_MIN)
+ {
+ errno = ERANGE;
+ /* Undefined behaviour, so we could return anything. */
+ /* return res > 0.0L ? LONG_MAX : LONG_MIN; */
+ }
+ return (long) res;
+}
diff --git a/winsup/cygwin/math/modfl.c b/winsup/cygwin/math/modfl.c
new file mode 100644
index 000000000..af75a8b8c
--- /dev/null
+++ b/winsup/cygwin/math/modfl.c
@@ -0,0 +1,41 @@
+/**
+ * This file has no copyright assigned and is placed in the Public Domain.
+ * This file is part of the mingw-w64 runtime package.
+ * No warranty is given; refer to the file DISCLAIMER.PD within this package.
+ */
+#include <fenv.h>
+#include <math.h>
+#include <errno.h>
+
+long double
+modfl (long double value, long double* iptr)
+{
+ long double int_part = 0.0L;
+ /* truncate */
+#if defined(_AMD64_) || defined(__x86_64__)
+ asm ("subq $8, %%rsp\n"
+ "fnstcw 4(%%rsp)\n"
+ "movzwl 4(%%rsp), %%eax\n"
+ "orb $12, %%ah\n"
+ "movw %%ax, (%%rsp)\n"
+ "fldcw (%%rsp)\n"
+ "frndint\n"
+ "fldcw 4(%%rsp)\n"
+ "addq $8, %%rsp\n" : "=t" (int_part) : "0" (value)); /* round */
+#elif defined(_X86_) || defined(__i386__)
+ asm ("push %%eax\n\tsubl $8, %%esp\n"
+ "fnstcw 4(%%esp)\n"
+ "movzwl 4(%%esp), %%eax\n"
+ "orb $12, %%ah\n"
+ "movw %%ax, (%%esp)\n"
+ "fldcw (%%esp)\n"
+ "frndint\n"
+ "fldcw 4(%%esp)\n"
+ "addl $8, %%esp\n\tpop %%eax\n" : "=t" (int_part) : "0" (value)); /* round */
+#else
+ int_part = truncl(value);
+#endif
+ if (iptr)
+ *iptr = int_part;
+ return (isinf (value) ? 0.0L : value - int_part);
+}
diff --git a/winsup/cygwin/math/nanl.c b/winsup/cygwin/math/nanl.c
new file mode 100644
index 000000000..f936b31cd
--- /dev/null
+++ b/winsup/cygwin/math/nanl.c
@@ -0,0 +1,5 @@
+long double
+nanl (const char *tagp)
+{
+ return __builtin_nanl ("");
+}
diff --git a/winsup/cygwin/math/nearbyint.S b/winsup/cygwin/math/nearbyint.S
new file mode 100644
index 000000000..8aec9bdb0
--- /dev/null
+++ b/winsup/cygwin/math/nearbyint.S
@@ -0,0 +1,57 @@
+/**
+ * This file has no copyright assigned and is placed in the Public Domain.
+ * This file is part of the mingw-w64 runtime package.
+ * No warranty is given; refer to the file DISCLAIMER.PD within this package.
+ */
+#include <_mingw_mac.h>
+
+ .file "nearbyint.S"
+ .text
+#ifdef __x86_64__
+ .align 8
+#else
+ .align 4
+#endif
+ .globl __MINGW_USYMBOL(nearbyint)
+ .def __MINGW_USYMBOL(nearbyint); .scl 2; .type 32; .endef
+__MINGW_USYMBOL(nearbyint):
+#if defined(_AMD64_) || defined(__x86_64__)
+ movsd %xmm0,-16(%rsp)
+ fldl -16(%rsp)
+ pushq %rax
+ pushq %rcx
+ fnstcw (%rsp)
+ movq (%rsp), %rax
+ orq $0x20, %rax
+ movq %rax, 8(%rsp)
+ fldcw 8(%rsp)
+ frndint
+ fclex
+ fldcw (%rsp)
+ popq %rcx
+ popq %rax
+ fstpl -16(%rsp)
+ movsd -16(%rsp),%xmm0
+ ret
+#elif defined(_ARM_) || defined(__arm__)
+ vmrs r1, fpscr
+ vcvtr.s32.f64 s0, d0
+ vcvt.f64.s32 d0, s0
+ vmsr fpscr, r1
+ bx lr
+#elif defined(_X86_) || defined(__i386__)
+ fldl 4(%esp)
+ pushl %eax
+ pushl %ecx
+ fnstcw (%esp)
+ movl (%esp), %eax
+ orl $0x20, %eax
+ movl %eax, 4(%esp)
+ fldcw 4(%esp)
+ frndint
+ fclex
+ fldcw (%esp)
+ popl %ecx
+ popl %eax
+ ret
+#endif
diff --git a/winsup/cygwin/math/nearbyintf.S b/winsup/cygwin/math/nearbyintf.S
new file mode 100644
index 000000000..460e1a5e5
--- /dev/null
+++ b/winsup/cygwin/math/nearbyintf.S
@@ -0,0 +1,57 @@
+/**
+ * This file has no copyright assigned and is placed in the Public Domain.
+ * This file is part of the mingw-w64 runtime package.
+ * No warranty is given; refer to the file DISCLAIMER.PD within this package.
+ */
+#include <_mingw_mac.h>
+
+ .file "nearbyintf.S"
+ .text
+#ifdef __x86_64__
+ .align 8
+#else
+ .align 4
+#endif
+ .globl __MINGW_USYMBOL(nearbyintf)
+ .def __MINGW_USYMBOL(nearbyintf); .scl 2; .type 32; .endef
+__MINGW_USYMBOL(nearbyintf):
+#if defined(_AMD64_) || defined(__x86_64__)
+ movss %xmm0,-12(%rsp)
+ flds -12(%rsp)
+ pushq %rax
+ pushq %rcx
+ fnstcw (%rsp)
+ movq (%rsp), %rax
+ orq $0x20, %rax
+ movq %rax, 8(%rsp)
+ fldcw 8(%rsp)
+ frndint
+ fclex
+ fldcw (%rsp)
+ popq %rcx
+ popq %rax
+ fstps -12(%rsp)
+ movss -12(%rsp),%xmm0
+ ret
+#elif defined(_ARM_) || defined(__arm__)
+ vmrs r1, fpscr
+ vcvt.s32.f32 s0, s0
+ vcvt.f32.s32 s0, s0
+ vmsr fpscr, r1
+ bx lr
+#elif defined(_X86_) || defined(__i386__)
+ flds 4(%esp)
+ pushl %eax
+ pushl %ecx
+ fnstcw (%esp)
+ movl (%esp), %eax
+ orl $0x20, %eax
+ movl %eax, 4(%esp)
+ fldcw 4(%esp)
+ frndint
+ fclex
+ fldcw (%esp)
+ popl %ecx
+ popl %eax
+ ret
+#endif
diff --git a/winsup/cygwin/math/nearbyintl.S b/winsup/cygwin/math/nearbyintl.S
new file mode 100644
index 000000000..f4262a2e0
--- /dev/null
+++ b/winsup/cygwin/math/nearbyintl.S
@@ -0,0 +1,58 @@
+/**
+ * This file has no copyright assigned and is placed in the Public Domain.
+ * This file is part of the mingw-w64 runtime package.
+ * No warranty is given; refer to the file DISCLAIMER.PD within this package.
+ */
+#include <_mingw_mac.h>
+
+ .file "nearbyintl.S"
+ .text
+#ifdef __x86_64__
+ .align 8
+#else
+ .align 4
+#endif
+ .globl __MINGW_USYMBOL(nearbyintl)
+ .def __MINGW_USYMBOL(nearbyintl); .scl 2; .type 32; .endef
+__MINGW_USYMBOL(nearbyintl):
+#if defined(_AMD64_) || defined(__x86_64__)
+ fldt (%rdx)
+ movq %rcx,%r8
+ pushq %rax
+ pushq %rcx
+ fnstcw (%rsp)
+ movl (%rsp), %eax
+ orl $0x20, %eax
+ movl %eax, 8(%rsp)
+ fldcw 8(%rsp)
+ frndint
+ fclex
+ fldcw (%rsp)
+ popq %rcx
+ popq %rax
+ movq %r8,%rax
+ movq $0,8(%r8)
+ fstpt (%r8)
+ ret
+#elif defined(_ARM_) || defined(__arm__)
+ vmrs r1, fpscr
+ vcvtr.s32.f64 s0, d0
+ vcvt.f64.s32 d0, s0
+ vmsr fpscr, r1
+ bx lr
+#elif defined(_X86_) || defined(__i386__)
+ fldt 4(%esp)
+ pushl %eax
+ pushl %ecx
+ fnstcw (%esp)
+ movl (%esp), %eax
+ orl $0x20, %eax
+ movl %eax, 4(%esp)
+ fldcw 4(%esp)
+ frndint
+ fclex
+ fldcw (%esp)
+ popl %ecx
+ popl %eax
+ ret
+#endif
diff --git a/winsup/cygwin/math/nextafterl.c b/winsup/cygwin/math/nextafterl.c
new file mode 100644
index 000000000..5db3af74a
--- /dev/null
+++ b/winsup/cygwin/math/nextafterl.c
@@ -0,0 +1,71 @@
+/**
+ * This file has no copyright assigned and is placed in the Public Domain.
+ * This file is part of the mingw-w64 runtime package.
+ * No warranty is given; refer to the file DISCLAIMER.PD within this package.
+ */
+/*
+ nextafterl.c
+ Contributed by Danny Smith <dannysmith@users.sourceforge.net>
+ No copyright claimed, absolutely no warranties.
+
+ 2005-05-09
+*/
+
+#include <math.h>
+
+long double
+nextafterl (long double x, long double y)
+{
+ union {
+ long double ld;
+ struct {
+ /* packed attribute is unnecessary on x86/x64 for these three variables */
+ unsigned long long mantissa;
+ unsigned short expn;
+ unsigned short pad;
+ } parts;
+ } u;
+
+ /* The normal bit is explicit for long doubles, unlike
+ float and double. */
+ static const unsigned long long normal_bit = 0x8000000000000000ull;
+ u.ld = 0.0L;
+ if (isnan (y) || isnan (x))
+ return x + y;
+
+ if (x == y )
+ /* nextafter (0.0, -O.0) should return -0.0. */
+ return y;
+
+ u.ld = x;
+ if (x == 0.0L)
+ {
+ u.parts.mantissa = 1ull;
+ return y > 0.0L ? u.ld : -u.ld;
+ }
+
+ if (((x > 0.0L) ^ (y > x)) == 0)
+ {
+ u.parts.mantissa++;
+ if ((u.parts.mantissa & ~normal_bit) == 0ull)
+ u.parts.expn++;
+ }
+ else
+ {
+ if ((u.parts.mantissa & ~normal_bit) == 0ull)
+ u.parts.expn--;
+ u.parts.mantissa--;
+ }
+
+ /* If we have updated the expn of a normal number,
+ or moved from denormal to normal, [re]set the normal bit. */
+ if (u.parts.expn & 0x7fff)
+ u.parts.mantissa |= normal_bit;
+
+ return u.ld;
+}
+
+/* nexttowardl is the same function with a different name. */
+long double
+nexttowardl (long double, long double) __attribute__ ((alias("nextafterl")));
+
diff --git a/winsup/cygwin/math/nexttoward.c b/winsup/cygwin/math/nexttoward.c
new file mode 100644
index 000000000..909f6ea2d
--- /dev/null
+++ b/winsup/cygwin/math/nexttoward.c
@@ -0,0 +1,47 @@
+/**
+ * This file has no copyright assigned and is placed in the Public Domain.
+ * This file is part of the mingw-w64 runtime package.
+ * No warranty is given; refer to the file DISCLAIMER.PD within this package.
+ */
+/*
+ nexttoward.c
+ Contributed by Danny Smith <dannysmith@users.sourceforge.net>
+ No copyright claimed, absolutely no warranties.
+
+ 2005-05-10
+*/
+
+#include <math.h>
+
+double
+nexttoward (double x, long double y)
+{
+ union
+ {
+ double d;
+ unsigned long long ll;
+ } u;
+
+ long double xx = x;
+
+ if (isnan (y) || isnan (x))
+ return x + y;
+
+ if (xx == y)
+ /* nextafter (0.0, -O.0) should return -0.0. */
+ return y;
+ u.d = x;
+ if (x == 0.0)
+ {
+ u.ll = 1;
+ return y > 0.0L ? u.d : -u.d;
+ }
+
+ /* Non-extended encodings are lexicographically ordered,
+ with implicit "normal" bit. */
+ if (((x > 0.0) ^ (y > xx)) == 0)
+ u.ll++;
+ else
+ u.ll--;
+ return u.d;
+}
diff --git a/winsup/cygwin/math/nexttowardf.c b/winsup/cygwin/math/nexttowardf.c
new file mode 100644
index 000000000..0a2f3bfb7
--- /dev/null
+++ b/winsup/cygwin/math/nexttowardf.c
@@ -0,0 +1,43 @@
+/**
+ * This file has no copyright assigned and is placed in the Public Domain.
+ * This file is part of the mingw-w64 runtime package.
+ * No warranty is given; refer to the file DISCLAIMER.PD within this package.
+ */
+/*
+ nexttowardf.c
+ Contributed by Danny Smith <dannysmith@users.sourceforge.net>
+ No copyright claimed, absolutely no warranties.
+
+ 2005-05-10
+*/
+
+#include <math.h>
+
+float
+nexttowardf (float x, long double y)
+{
+ union
+ {
+ float f;
+ unsigned int i;
+ } u;
+
+ long double xx = x;
+
+ if (isnan (y) || isnan (x))
+ return x + y;
+ if (xx == y )
+ /* nextafter (0.0, -O.0) should return -0.0. */
+ return y;
+ u.f = x;
+ if (x == 0.0F)
+ {
+ u.i = 1;
+ return y > 0.0L ? u.f : -u.f;
+ }
+ if (((x > 0.0F) ^ (y > xx)) == 0)
+ u.i++;
+ else
+ u.i--;
+ return u.f;
+}
diff --git a/winsup/cygwin/math/pow.def.h b/winsup/cygwin/math/pow.def.h
new file mode 100644
index 000000000..a5513c1f9
--- /dev/null
+++ b/winsup/cygwin/math/pow.def.h
@@ -0,0 +1,215 @@
+/*
+ This Software is provided under the Zope Public License (ZPL) Version 2.1.
+
+ Copyright (c) 2009, 2010 by the mingw-w64 project
+
+ See the AUTHORS file for the list of contributors to the mingw-w64 project.
+
+ This license has been certified as open source. It has also been designated
+ as GPL compatible by the Free Software Foundation (FSF).
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions in source code must retain the accompanying copyright
+ notice, this list of conditions, and the following disclaimer.
+ 2. Redistributions in binary form must reproduce the accompanying
+ copyright notice, this list of conditions, and the following disclaimer
+ in the documentation and/or other materials provided with the
+ distribution.
+ 3. Names of the copyright holders must not be used to endorse or promote
+ products derived from this software without prior written permission
+ from the copyright holders.
+ 4. The right to distribute this software or to use it for any purpose does
+ not give you the right to use Servicemarks (sm) or Trademarks (tm) of
+ the copyright holders. Use of them is covered by separate agreement
+ with the copyright holders.
+ 5. If any files are modified, you must cause the modified files to carry
+ prominent notices stating that you changed the files and the date of
+ any change.
+
+ Disclaimer
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY EXPRESSED
+ 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 HOLDERS 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.
+*/
+
+/* IEEE 754 - Elementary Functions - Special Cases
+ * pow(+/-0, oo) is +0
+ * pow(+/-0, -oo) is +oo
+ * pow (x, +/-0) is 1 for any x (even a zero, quiet NaN, or infinity)
+ * pow (+1, y) is 1 for any y (even a quiet NaN)
+ * pow (+/-0, y) is +/-oo and signals the divideByZero exception for y an odd integer < 0
+ * pow (+/-0, y) is +oo and signals the divideByZero exception for finite y < 0 and not an odd integer
+ * pow (+/-0, y) is +/-0 for finite y > 0 an odd integer
+ * pow (+/-0, y) is +0 for finite y > 0 and not an odd integer
+ * pow (-1, +/-oo) is 1 with no exception
+ pow( -inf, y) = +0 for y<0 and not an odd integer
+ pow( -inf, y) = -inf for y an odd integer > 0
+ pow( -inf, y) = +inf for y>0 and not an odd integer
+ pow (+/-inf, y) is +/-0 with no exception for y an odd integer < 0
+ pow (+/-inf, -inf) is +0 with no exception
+ pow (+/-inf, +inf) is +inf with no exception
+ pow (+/-inf, y) is +0 with no exception for finite y < 0 and not an odd integer
+ pow (+/-inf, y) is +/-inf with no exception for finite y > 0 an odd integer
+ pow (+/-inf, y) is +inf with no exception for finite y > 0 and not an odd integer
+ pow (x, y) signals the invalid operation exception for finite x < 0 and finite non-integer y.
+
+ For x /= 0: lim y->oo (1/x)^y results as: for |x| < 1 that sgn(x)*0 and for |x| > 0 that sgn(x)*Infinity
+
+*/
+#include "complex_internal.h"
+#include <errno.h>
+#include <limits.h>
+#include <fenv.h>
+#include <math.h>
+#include <errno.h>
+#define FE_ROUNDING_MASK \
+ (FE_TONEAREST | FE_DOWNWARD | FE_UPWARD | FE_TOWARDZERO)
+
+static __FLT_TYPE
+internal_modf (__FLT_TYPE value, __FLT_TYPE *iptr)
+{
+ __FLT_TYPE int_part = (__FLT_TYPE) 0.0;
+ /* truncate */
+ /* truncate */
+#ifdef __x86_64__
+ asm ("pushq %%rax\n\tsubq $8, %%rsp\n"
+ "fnstcw 4(%%rsp)\n"
+ "movzwl 4(%%rsp), %%eax\n"
+ "orb $12, %%ah\n"
+ "movw %%ax, (%%rsp)\n"
+ "fldcw (%%rsp)\n"
+ "frndint\n"
+ "fldcw 4(%%rsp)\n"
+ "addq $8, %%rsp\npopq %%rax" : "=t" (int_part) : "0" (value)); /* round */
+#else
+ asm ("push %%eax\n\tsubl $8, %%esp\n"
+ "fnstcw 4(%%esp)\n"
+ "movzwl 4(%%esp), %%eax\n"
+ "orb $12, %%ah\n"
+ "movw %%ax, (%%esp)\n"
+ "fldcw (%%esp)\n"
+ "frndint\n"
+ "fldcw 4(%%esp)\n"
+ "addl $8, %%esp\n\tpop %%eax\n" : "=t" (int_part) : "0" (value)); /* round */
+#endif
+ if (iptr)
+ *iptr = int_part;
+ return (isinf (value) ? (__FLT_TYPE) 0.0 : value - int_part);
+}
+
+__FLT_TYPE __cdecl __FLT_ABI(__powi) (__FLT_TYPE x, int n);
+
+__FLT_TYPE __cdecl
+__FLT_ABI(pow) (__FLT_TYPE x, __FLT_TYPE y)
+{
+ int x_class = fpclassify (x);
+ int y_class = fpclassify (y);
+ long odd_y = 0;
+ __FLT_TYPE d, rslt;
+
+ if (y_class == FP_ZERO || x == __FLT_CST(1.0))
+ return __FLT_CST(1.0);
+ else if (x_class == FP_NAN || y_class == FP_NAN)
+ {
+ rslt = (signbit(x) ? -__FLT_NAN : __FLT_NAN);
+ __FLT_RPT_DOMAIN ("pow", x, y, rslt);
+ return rslt;
+ }
+ else if (x_class == FP_ZERO)
+ {
+ if (y_class == FP_INFINITE)
+ return (signbit(y) ? __FLT_HUGE_VAL : __FLT_CST(0.0));
+
+ if (signbit(x) && internal_modf (y, &d) != 0.0)
+ {
+ return signbit (y) ? (1.0 / -x) : __FLT_CST (0.0);
+ /*__FLT_RPT_DOMAIN ("pow", x, y, -__FLT_NAN);
+ return -__FLT_NAN; */
+ }
+ odd_y = (internal_modf (__FLT_ABI (ldexp) (y, -1), &d) != 0.0) ? 1 : 0;
+ if (!signbit(y))
+ {
+ if (!odd_y || !signbit (x))
+ return __FLT_CST (0.0);
+ return -__FLT_CST(0.0);
+ }
+
+ if (!odd_y || !signbit (x))
+ return __FLT_HUGE_VAL;
+ return (signbit(x) ? -__FLT_HUGE_VAL : __FLT_HUGE_VAL);
+ }
+ else if (y_class == FP_INFINITE)
+ {
+ __FLT_TYPE a_x;
+
+ if (x_class == FP_INFINITE)
+ return (signbit (y) ? __FLT_CST (0.0) : __FLT_HUGE_VAL);
+ a_x = (signbit (x) ? -x : x);
+ if (a_x == 1.0)
+ return __FLT_CST (1.0);
+ if (a_x > 1.0)
+ return (signbit (y) == 0 ? __FLT_HUGE_VAL : __FLT_CST (0.0));
+ return (!signbit (y) ? __FLT_CST (0.0) : __FLT_HUGE_VAL);
+ }
+ else if (x_class == FP_INFINITE)
+ {
+ /* pow (x, y) signals the invalid operation exception for finite x < 0 and finite non-integer y. */
+ if (signbit(x) && internal_modf (y, &d) != 0.0)
+ {
+ return signbit(y) ? 1.0 / -x : -x;
+ /*__FLT_RPT_DOMAIN ("pow", x, y, -__FLT_NAN);
+ return -__FLT_NAN;*/
+ }
+ odd_y = (internal_modf (__FLT_ABI (ldexp) (y, -1), &d) != 0.0) ? 1 : 0;
+ /* pow( -inf, y) = +0 for y<0 and not an odd integer, */
+ if (signbit(x) && signbit(y) && !odd_y)
+ return __FLT_CST(0.0);
+ /* pow( -inf, y) = -inf for y an odd integer > 0. */
+ if (signbit(x) && !signbit(y) && odd_y)
+ return -__FLT_HUGE_VAL;
+ /* pow( -inf, y) = +inf for y>0 and not an odd integer. */
+ if (signbit(x) && !signbit(y) && !odd_y)
+ return __FLT_HUGE_VAL;
+ /* pow (+/-inf, y) is +/-0 with no exception for y an odd integer < 0. */
+ if (signbit(y))
+ {
+ /* pow (+/-inf, y) is +0 with no exception for finite y < 0 and not an odd integer. */
+ return (odd_y && signbit(x) ? -__FLT_CST(0.0) : __FLT_CST(0.0));
+ }
+ /* pow (+/-inf, y) is +/-inf with no exception for finite y > 0 an odd integer. */
+ /* pow (+/-inf, y) is +inf with no exception for finite y > 0 and not an odd integer. */
+ return (odd_y && signbit(x) ? -__FLT_HUGE_VAL : __FLT_HUGE_VAL);
+ }
+
+ if (internal_modf (y, &d) != 0.0)
+ {
+ if (signbit (x))
+ {
+ __FLT_RPT_DOMAIN ("pow", x, y, -__FLT_NAN);
+ return -__FLT_NAN;
+ }
+ if (y == __FLT_CST(0.5))
+ {
+ asm ("fsqrt" : "=t" (rslt) : "0" (x));
+ return rslt;
+ }
+ }
+ else if ((d <= (__FLT_TYPE) INT_MAX && d >= (__FLT_TYPE) INT_MIN))
+ return __FLT_ABI (__powi) (x, (int) y);
+ /* As exp already checks for minlog and maxlog no further checks are necessary. */
+ rslt = (__FLT_TYPE) exp2l ((long double) y * log2l ((long double) __FLT_ABI(fabs) (x)));
+
+ if (signbit (x) && internal_modf (__FLT_ABI (ldexp) (y, -1), &d) != 0.0)
+ rslt = -rslt;
+ return rslt;
+}
diff --git a/winsup/cygwin/math/pow10l.c b/winsup/cygwin/math/pow10l.c
new file mode 100644
index 000000000..ad5348951
--- /dev/null
+++ b/winsup/cygwin/math/pow10l.c
@@ -0,0 +1,8 @@
+#undef pow10l
+#include <math.h>
+
+long double
+pow10l (long double x)
+{
+ return powl (10.0L, x);
+}
diff --git a/winsup/cygwin/math/powi.def.h b/winsup/cygwin/math/powi.def.h
new file mode 100644
index 000000000..f7fa860a6
--- /dev/null
+++ b/winsup/cygwin/math/powi.def.h
@@ -0,0 +1,153 @@
+/*
+ This Software is provided under the Zope Public License (ZPL) Version 2.1.
+
+ Copyright (c) 2009, 2010 by the mingw-w64 project
+
+ See the AUTHORS file for the list of contributors to the mingw-w64 project.
+
+ This license has been certified as open source. It has also been designated
+ as GPL compatible by the Free Software Foundation (FSF).
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions in source code must retain the accompanying copyright
+ notice, this list of conditions, and the following disclaimer.
+ 2. Redistributions in binary form must reproduce the accompanying
+ copyright notice, this list of conditions, and the following disclaimer
+ in the documentation and/or other materials provided with the
+ distribution.
+ 3. Names of the copyright holders must not be used to endorse or promote
+ products derived from this software without prior written permission
+ from the copyright holders.
+ 4. The right to distribute this software or to use it for any purpose does
+ not give you the right to use Servicemarks (sm) or Trademarks (tm) of
+ the copyright holders. Use of them is covered by separate agreement
+ with the copyright holders.
+ 5. If any files are modified, you must cause the modified files to carry
+ prominent notices stating that you changed the files and the date of
+ any change.
+
+ Disclaimer
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY EXPRESSED
+ 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 HOLDERS 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.
+*/
+
+/* IEEE 754 - Elementary Functions - Special Cases
+ * powi (x, +/-0) is 1 for any x (even a zero, quiet NaN, or infinity)
+ * powi (+1, y) is 1 for any y (even a quiet NaN)
+ * powi (+/-0, y) is +/-oo and signals the divideByZero exception for y an odd integer < 0
+ * powi (+/-0, y) is +oo and signals the divideByZero exception for finite y < 0 and not an odd integer
+ * powi (+/-0, y) is +/-0 for finite y > 0 an odd integer
+ * powi (+/-0, y) is +0 for finite y > 0 and not an odd integer
+ powi (-inf, y) = +0 for y<0 and not an odd integer
+ powi (-inf, y) = -inf for y an odd integer > 0
+ powi (-inf, y) = +inf for y>0 and not an odd integer
+ powi (+/-inf, y) is +/-0 with no exception for y an odd integer < 0
+ powi (+/-inf, y) is +0 with no exception for finite y < 0 and not an odd integer
+ powi (+/-inf, y) is +/-inf with no exception for finite y > 0 an odd integer
+ powi (+/-inf, y) is +inf with no exception for finite y > 0 and not an odd integer
+ powi (x, y) signals the invalid operation exception for finite x < 0 and finite non-integer y.
+
+ For x /= 0: lim y->oo (1/x)^y results as: for |x| < 1 that sgn(x)*0 and for |x| > 0 that sgn(x)*Infinity
+
+*/
+#include "complex_internal.h"
+#include <errno.h>
+#include <limits.h>
+#include <fenv.h>
+#include <math.h>
+#include <errno.h>
+
+__FLT_TYPE __cdecl
+__FLT_ABI(__powi) (__FLT_TYPE x, int y);
+
+__FLT_TYPE __cdecl
+__FLT_ABI(__powi) (__FLT_TYPE x, int y)
+{
+ int x_class = fpclassify (x);
+ int odd_y = y & 1;
+ __FLT_TYPE d, rslt;
+
+ if (y == 0 || x == __FLT_CST(1.0))
+ return __FLT_CST(1.0);
+ else if (x_class == FP_NAN)
+ {
+ rslt = (signbit(x) ? -__FLT_NAN : __FLT_NAN);
+ __FLT_RPT_DOMAIN ("__powi", x, (__FLT_TYPE) y, rslt);
+ return rslt;
+ }
+ else if (x_class == FP_ZERO)
+ {
+ if (y >= 0)
+ {
+ if (!odd_y || !signbit (x))
+ return __FLT_CST (0.0);
+ return -__FLT_CST(0.0);
+ }
+
+ if (!odd_y || !signbit (x))
+ return __FLT_HUGE_VAL;
+ return (signbit(x) ? -__FLT_HUGE_VAL : __FLT_HUGE_VAL);
+ }
+ else if (x_class == FP_INFINITE)
+ {
+ /* pow( -inf, y) = +0 for y<0 and not an odd integer, */
+ if (signbit(x) && y < 0 && !odd_y)
+ return __FLT_CST(0.0);
+ /* pow( -inf, y) = -inf for y an odd integer > 0. */
+ if (signbit(x) && y >= 0 && odd_y)
+ return -__FLT_HUGE_VAL;
+ /* pow( -inf, y) = +inf for y>0 and not an odd integer. */
+ if (signbit(x) && y >= 0 && !odd_y)
+ return __FLT_HUGE_VAL;
+ /* pow (+/-inf, y) is +/-0 with no exception for y an odd integer < 0. */
+ if (y < 0)
+ {
+ /* pow (+/-inf, y) is +0 with no exception for finite y < 0 and not an odd integer. */
+ return (odd_y && signbit(x) ? -__FLT_CST(0.0) : __FLT_CST(0.0));
+ }
+ /* pow (+/-inf, y) is +/-inf with no exception for finite y > 0 an odd integer. */
+ /* pow (+/-inf, y) is +inf with no exception for finite y > 0 and not an odd integer. */
+ return (odd_y && signbit(x) ? -__FLT_HUGE_VAL : __FLT_HUGE_VAL);
+ }
+
+ d = __FLT_ABI(fabs) (x);
+
+ if (y < 0)
+ {
+ d = __FLT_CST(1.0) / d;
+ y = -y;
+ }
+
+ if (!y)
+ rslt = __FLT_CST(1.0);
+ else if (y == 1)
+ rslt = d;
+ else
+ {
+ unsigned int u = (unsigned int) y;
+ rslt = ((u & 1) != 0) ? d : __FLT_CST(1.0);
+ u >>= 1;
+ do
+ {
+ d *= d;
+ if ((u & 1) != 0)
+ rslt *= d;
+ u >>= 1;
+ }
+ while (u > 0);
+ }
+ if (signbit (x) && odd_y)
+ rslt = -rslt;
+ return rslt;
+}
diff --git a/winsup/cygwin/math/powil.c b/winsup/cygwin/math/powil.c
new file mode 100644
index 000000000..d3e08e301
--- /dev/null
+++ b/winsup/cygwin/math/powil.c
@@ -0,0 +1,46 @@
+/*
+ This Software is provided under the Zope Public License (ZPL) Version 2.1.
+
+ Copyright (c) 2009, 2010 by the mingw-w64 project
+
+ See the AUTHORS file for the list of contributors to the mingw-w64 project.
+
+ This license has been certified as open source. It has also been designated
+ as GPL compatible by the Free Software Foundation (FSF).
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions in source code must retain the accompanying copyright
+ notice, this list of conditions, and the following disclaimer.
+ 2. Redistributions in binary form must reproduce the accompanying
+ copyright notice, this list of conditions, and the following disclaimer
+ in the documentation and/or other materials provided with the
+ distribution.
+ 3. Names of the copyright holders must not be used to endorse or promote
+ products derived from this software without prior written permission
+ from the copyright holders.
+ 4. The right to distribute this software or to use it for any purpose does
+ not give you the right to use Servicemarks (sm) or Trademarks (tm) of
+ the copyright holders. Use of them is covered by separate agreement
+ with the copyright holders.
+ 5. If any files are modified, you must cause the modified files to carry
+ prominent notices stating that you changed the files and the date of
+ any change.
+
+ Disclaimer
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY EXPRESSED
+ 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 HOLDERS 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.
+*/
+
+#define _NEW_COMPLEX_LDOUBLE 1
+#include "powi.def.h"
diff --git a/winsup/cygwin/math/powl.c b/winsup/cygwin/math/powl.c
new file mode 100644
index 000000000..686437069
--- /dev/null
+++ b/winsup/cygwin/math/powl.c
@@ -0,0 +1,46 @@
+/*
+ This Software is provided under the Zope Public License (ZPL) Version 2.1.
+
+ Copyright (c) 2009, 2010 by the mingw-w64 project
+
+ See the AUTHORS file for the list of contributors to the mingw-w64 project.
+
+ This license has been certified as open source. It has also been designated
+ as GPL compatible by the Free Software Foundation (FSF).
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions in source code must retain the accompanying copyright
+ notice, this list of conditions, and the following disclaimer.
+ 2. Redistributions in binary form must reproduce the accompanying
+ copyright notice, this list of conditions, and the following disclaimer
+ in the documentation and/or other materials provided with the
+ distribution.
+ 3. Names of the copyright holders must not be used to endorse or promote
+ products derived from this software without prior written permission
+ from the copyright holders.
+ 4. The right to distribute this software or to use it for any purpose does
+ not give you the right to use Servicemarks (sm) or Trademarks (tm) of
+ the copyright holders. Use of them is covered by separate agreement
+ with the copyright holders.
+ 5. If any files are modified, you must cause the modified files to carry
+ prominent notices stating that you changed the files and the date of
+ any change.
+
+ Disclaimer
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY EXPRESSED
+ 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 HOLDERS 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.
+*/
+
+#define _NEW_COMPLEX_LDOUBLE 1
+#include "pow.def.h"
diff --git a/winsup/cygwin/math/remainder.S b/winsup/cygwin/math/remainder.S
new file mode 100644
index 000000000..5a713f904
--- /dev/null
+++ b/winsup/cygwin/math/remainder.S
@@ -0,0 +1,40 @@
+/**
+ * This file has no copyright assigned and is placed in the Public Domain.
+ * This file is part of the mingw-w64 runtime package.
+ * No warranty is given; refer to the file DISCLAIMER.PD within this package.
+ */
+#include <_mingw_mac.h>
+
+ .file "remainder.S"
+ .text
+#ifdef __x86_64__
+ .align 8
+#else
+ .align 4
+#endif
+.globl __MINGW_USYMBOL(remainder)
+ .def __MINGW_USYMBOL(remainder); .scl 2; .type 32; .endef
+__MINGW_USYMBOL(remainder):
+#ifdef __x86_64__
+ movsd %xmm0,-16(%rsp)
+ movsd %xmm1,-32(%rsp)
+ fldl -32(%rsp)
+ fldl -16(%rsp)
+1: fprem1
+ fstsw %ax
+ sahf
+ jp 1b
+ fstp %st(1)
+ fstpl -16(%rsp)
+ movsd -16(%rsp),%xmm0
+ ret
+#else
+ fldl 12(%esp)
+ fldl 4(%esp)
+1: fprem1
+ fstsw %ax
+ sahf
+ jp 1b
+ fstp %st(1)
+ ret
+#endif
diff --git a/winsup/cygwin/math/remainderf.S b/winsup/cygwin/math/remainderf.S
new file mode 100644
index 000000000..c3a3a3dc5
--- /dev/null
+++ b/winsup/cygwin/math/remainderf.S
@@ -0,0 +1,40 @@
+/**
+ * This file has no copyright assigned and is placed in the Public Domain.
+ * This file is part of the mingw-w64 runtime package.
+ * No warranty is given; refer to the file DISCLAIMER.PD within this package.
+ */
+#include <_mingw_mac.h>
+
+ .file "remainderf.S"
+ .text
+#ifdef __x86_64__
+ .align 8
+#else
+ .align 4
+#endif
+.globl __MINGW_USYMBOL(remainder)
+ .def __MINGW_USYMBOL(remainderf); .scl 2; .type 32; .endef
+__MINGW_USYMBOL(remainderf):
+#ifdef __x86_64__
+ movss %xmm1,-12(%rsp)
+ flds -12(%rsp)
+ movss %xmm0,-12(%rsp)
+ flds -12(%rsp)
+1: fprem1
+ fstsw %ax
+ sahf
+ jp 1b
+ fstp %st(1)
+ fstps -12(%rsp)
+ movss -12(%rsp),%xmm0
+ ret
+#else
+ flds 8(%esp)
+ flds 4(%esp)
+1: fprem1
+ fstsw %ax
+ sahf
+ jp 1b
+ fstp %st(1)
+ ret
+#endif
diff --git a/winsup/cygwin/math/remainderl.S b/winsup/cygwin/math/remainderl.S
new file mode 100644
index 000000000..a69e38296
--- /dev/null
+++ b/winsup/cygwin/math/remainderl.S
@@ -0,0 +1,39 @@
+/**
+ * This file has no copyright assigned and is placed in the Public Domain.
+ * This file is part of the mingw-w64 runtime package.
+ * No warranty is given; refer to the file DISCLAIMER.PD within this package.
+ */
+#include <_mingw_mac.h>
+
+ .file "remainderl.S"
+ .text
+#ifdef __x86_64__
+ .align 8
+#else
+ .align 4
+#endif
+.globl __MINGW_USYMBOL(remainderl)
+ .def __MINGW_USYMBOL(remainderl); .scl 2; .type 32; .endef
+__MINGW_USYMBOL(remainderl):
+#ifdef __x86_64__
+ fldt (%r8)
+ fldt (%rdx)
+1: fprem1
+ fstsw %ax
+ sahf
+ jp 1b
+ fstp %st(1)
+ movq %rcx,%rax
+ movq $0,8(%rcx)
+ fstpt (%rcx)
+ ret
+#else
+ fldt 16(%esp)
+ fldt 4(%esp)
+1: fprem1
+ fstsw %ax
+ sahf
+ jp 1b
+ fstp %st(1)
+ ret
+#endif
diff --git a/winsup/cygwin/math/remquol.S b/winsup/cygwin/math/remquol.S
new file mode 100644
index 000000000..42cc2a78d
--- /dev/null
+++ b/winsup/cygwin/math/remquol.S
@@ -0,0 +1,75 @@
+/**
+ * This file has no copyright assigned and is placed in the Public Domain.
+ * This file is part of the mingw-w64 runtime package.
+ * No warranty is given; refer to the file DISCLAIMER.PD within this package.
+ */
+#include <_mingw_mac.h>
+
+ .file "remquol.S"
+ .text
+#ifdef __x86_64__
+ .align 8
+#else
+ .align 4
+#endif
+.globl __MINGW_USYMBOL(remquol)
+__MINGW_USYMBOL(remquol):
+#ifdef __x86_64__
+ pushq %rcx
+ fldt (%r8)
+ fldt (%rdx)
+1: fprem1
+ fstsw %ax
+ sahf
+ jp 1b
+ fstp %st(1)
+ movl %eax, %ecx
+ shrl $8, %eax
+ shrl $12, %ecx
+ andl $4, %ecx
+ andl $3, %eax
+ orl %eax, %ecx
+ movl $0xef2a60, %eax
+ leal (%ecx,%ecx,2),%ecx
+ shrl %cl, %eax
+ andl $7, %eax
+ movl 8(%rdx), %edx
+ xorl 8(%r8), %edx
+ testl $0x8000, %edx
+ jz 1f
+ negl %eax
+1: movl %eax, (%r9)
+
+ popq %rcx
+ movq %rcx,%rax
+ movq $0,8(%rcx)
+ fstpt (%rcx)
+ ret
+#else
+ fldt 4 +12(%esp)
+ fldt 4(%esp)
+1: fprem1
+ fstsw %ax
+ sahf
+ jp 1b
+ fstp %st(1)
+ movl %eax, %ecx
+ shrl $8, %eax
+ shrl $12, %ecx
+ andl $4, %ecx
+ andl $3, %eax
+ orl %eax, %ecx
+ movl $0xef2a60, %eax
+ leal (%ecx,%ecx,2),%ecx
+ shrl %cl, %eax
+ andl $7, %eax
+ movl 4 +12 +12(%esp), %ecx
+ movl 4 +8(%esp), %edx
+ xorl 4 +12 +8(%esp), %edx
+ testl $0x8000, %edx
+ jz 1f
+ negl %eax
+1: movl %eax, (%ecx)
+
+ ret
+#endif
diff --git a/winsup/cygwin/math/rint.c b/winsup/cygwin/math/rint.c
new file mode 100644
index 000000000..01f9644b1
--- /dev/null
+++ b/winsup/cygwin/math/rint.c
@@ -0,0 +1,29 @@
+/**
+ * This file has no copyright assigned and is placed in the Public Domain.
+ * This file is part of the mingw-w64 runtime package.
+ * No warranty is given; refer to the file DISCLAIMER.PD within this package.
+ */
+#include <math.h>
+
+#if defined(__arm__) || defined(_ARM_)
+/* This works around a compiler bug */
+double __rint_internal( double x );
+asm(".def __rint_internal; .scl 2; .type 32; .endef\n"
+ "\t.text\n"
+ "\t.align 4\n"
+ "\t.globl __rint_internal\n"
+ "__rint_internal:\n"
+ "\tvcvtr.s32.f64 s0, d0\n"
+ "\tvcvt.f64.s32 d0, s0\n"
+ "\tbx lr");
+#endif /* defined(__arm__) || defined(_ARM_) */
+
+double rint (double x) {
+ double retval = 0.0;
+#if defined(_AMD64_) || defined(__x86_64__) || defined(_X86_) || defined(__i386__)
+ __asm__ __volatile__ ("frndint;" : "=t" (retval) : "0" (x));
+#elif defined(__arm__) || defined(_ARM_)
+ retval = __rint_internal(x);
+#endif
+ return retval;
+}
diff --git a/winsup/cygwin/math/rintf.c b/winsup/cygwin/math/rintf.c
new file mode 100644
index 000000000..09c641bcd
--- /dev/null
+++ b/winsup/cygwin/math/rintf.c
@@ -0,0 +1,29 @@
+/**
+ * This file has no copyright assigned and is placed in the Public Domain.
+ * This file is part of the mingw-w64 runtime package.
+ * No warranty is given; refer to the file DISCLAIMER.PD within this package.
+ */
+#include <math.h>
+
+#if defined(__arm__) || defined(_ARM_)
+/* This works around a compiler bug */
+float __rintf_internal( float x );
+asm(".def __rintf_internal; .scl 2; .type 32; .endef\n"
+ "\t.text\n"
+ "\t.align 4\n"
+ "\t.globl __rintf_internal\n"
+ "__rintf_internal:\n"
+ "\tvcvtr.s32.f32 s0, s0\n"
+ "\tvcvt.f32.s32 s0, s0\n"
+ "\tbx lr");
+#endif /* defined(__arm__) || defined(_ARM_) */
+
+float rintf (float x) {
+ float retval = 0.0F;
+#if defined(_AMD64_) || defined(__x86_64__) || defined(_X86_) || defined(__i386__)
+ __asm__ __volatile__ ("frndint;": "=t" (retval) : "0" (x));
+#elif defined(__arm__) || defined(_ARM_)
+ retval = __rintf_internal(x);
+#endif
+ return retval;
+}
diff --git a/winsup/cygwin/math/rintl.c b/winsup/cygwin/math/rintl.c
new file mode 100644
index 000000000..9ec159d17
--- /dev/null
+++ b/winsup/cygwin/math/rintl.c
@@ -0,0 +1,16 @@
+/**
+ * This file has no copyright assigned and is placed in the Public Domain.
+ * This file is part of the mingw-w64 runtime package.
+ * No warranty is given; refer to the file DISCLAIMER.PD within this package.
+ */
+#include <math.h>
+
+long double rintl (long double x) {
+ long double retval = 0.0L;
+#if defined(_AMD64_) || defined(__x86_64__) || defined(_X86_) || defined(__i386__)
+ __asm__ __volatile__ ("frndint;": "=t" (retval) : "0" (x));
+#elif defined(__arm__) || defined(_ARM_)
+ retval = rint(x);
+#endif
+ return retval;
+}
diff --git a/winsup/cygwin/math/roundl.c b/winsup/cygwin/math/roundl.c
new file mode 100644
index 000000000..9879a82cc
--- /dev/null
+++ b/winsup/cygwin/math/roundl.c
@@ -0,0 +1,26 @@
+/**
+ * This file has no copyright assigned and is placed in the Public Domain.
+ * This file is part of the mingw-w64 runtime package.
+ * No warranty is given; refer to the file DISCLAIMER.PD within this package.
+ */
+#include <math.h>
+
+long double
+roundl (long double x)
+{
+ long double res = 0.0L;
+ if (x >= 0.0L)
+ {
+ res = ceill (x);
+ if (res - x > 0.5L)
+ res -= 1.0L;
+ }
+ else
+ {
+ res = ceill (-x);
+ if (res + x > 0.5L)
+ res -= 1.0L;
+ res = -res;
+ }
+ return res;
+}
diff --git a/winsup/cygwin/math/scalbl.S b/winsup/cygwin/math/scalbl.S
new file mode 100644
index 000000000..f9675ac4b
--- /dev/null
+++ b/winsup/cygwin/math/scalbl.S
@@ -0,0 +1,35 @@
+/**
+ * This file has no copyright assigned and is placed in the Public Domain.
+ * This file is part of the mingw-w64 runtime package.
+ * No warranty is given; refer to the file DISCLAIMER.PD within this package.
+ */
+#include <_mingw_mac.h>
+
+ .file "scalbl.S"
+ .text
+#ifdef __x86_64__
+ .align 8
+#else
+ .align 4
+#endif
+.globl __MINGW_USYMBOL(scalbl)
+ .def __MINGW_USYMBOL(scalbl); .scl 2; .type 32; .endef
+__MINGW_USYMBOL(scalbl):
+#ifdef __x86_64__
+ subq $24, %rsp
+ fldt (%r8)
+ fldt (%rdx)
+ fscale
+ fstp %st(1)
+ movq %rcx,%rax
+ movq $0,8(%rcx)
+ fstpt (%rcx)
+ addq $24, %rsp
+ ret
+#else
+ fildl 16(%esp)
+ fldt 4(%esp)
+ fscale
+ fstp %st(1)
+ ret
+#endif
diff --git a/winsup/cygwin/math/scalbnl.S b/winsup/cygwin/math/scalbnl.S
new file mode 100644
index 000000000..5ff0a68f3
--- /dev/null
+++ b/winsup/cygwin/math/scalbnl.S
@@ -0,0 +1,41 @@
+/**
+ * This file has no copyright assigned and is placed in the Public Domain.
+ * This file is part of the mingw-w64 runtime package.
+ * No warranty is given; refer to the file DISCLAIMER.PD within this package.
+ */
+#include <_mingw_mac.h>
+
+ .file "scalbnl.S"
+ .text
+#ifdef __x86_64__
+ .align 8
+#else
+ .align 4
+#endif
+.globl __MINGW_USYMBOL(scalbnl)
+ .def __MINGW_USYMBOL(scalbnl); .scl 2; .type 32; .endef
+__MINGW_USYMBOL(scalbnl):
+#ifdef __x86_64__
+ subq $24, %rsp
+ andl $-1, %r8d
+ movq %r8, (%rsp)
+ fildl (%rsp)
+ fldt (%rdx)
+ fscale
+ fstp %st(1)
+ movq %rcx,%rax
+ movq $0,8(%rcx)
+ fstpt (%rcx)
+ addq $24, %rsp
+ ret
+#else
+ fildl 16(%esp)
+ fldt 4(%esp)
+ fscale
+ fstp %st(1)
+ ret
+#endif
+
+.globl __MINGW_USYMBOL(scalblnl)
+ .set __MINGW_USYMBOL(scalblnl),__MINGW_USYMBOL(scalbnl)
+
diff --git a/winsup/cygwin/math/sin.def.h b/winsup/cygwin/math/sin.def.h
new file mode 100644
index 000000000..c9b3b0499
--- /dev/null
+++ b/winsup/cygwin/math/sin.def.h
@@ -0,0 +1,65 @@
+/*
+ This Software is provided under the Zope Public License (ZPL) Version 2.1.
+
+ Copyright (c) 2009, 2010 by the mingw-w64 project
+
+ See the AUTHORS file for the list of contributors to the mingw-w64 project.
+
+ This license has been certified as open source. It has also been designated
+ as GPL compatible by the Free Software Foundation (FSF).
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions in source code must retain the accompanying copyright
+ notice, this list of conditions, and the following disclaimer.
+ 2. Redistributions in binary form must reproduce the accompanying
+ copyright notice, this list of conditions, and the following disclaimer
+ in the documentation and/or other materials provided with the
+ distribution.
+ 3. Names of the copyright holders must not be used to endorse or promote
+ products derived from this software without prior written permission
+ from the copyright holders.
+ 4. The right to distribute this software or to use it for any purpose does
+ not give you the right to use Servicemarks (sm) or Trademarks (tm) of
+ the copyright holders. Use of them is covered by separate agreement
+ with the copyright holders.
+ 5. If any files are modified, you must cause the modified files to carry
+ prominent notices stating that you changed the files and the date of
+ any change.
+
+ Disclaimer
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY EXPRESSED
+ 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 HOLDERS 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 "complex_internal.h"
+#include <errno.h>
+
+extern long double __sinl_internal (long double);
+
+__FLT_TYPE
+__FLT_ABI(sin) (__FLT_TYPE x)
+{
+ int x_class = fpclassify (x);
+ if (x_class == FP_NAN)
+ {
+ __FLT_RPT_DOMAIN ("sin", x, 0.0, x);
+ return x;
+ }
+ else if (x_class == FP_INFINITE)
+ {
+ __FLT_RPT_DOMAIN ("sin", x, 0.0, __FLT_NAN);
+ return __FLT_NAN;
+ }
+ return (__FLT_TYPE) __sinl_internal ((long double) x);
+}
diff --git a/winsup/cygwin/math/sinhl.c b/winsup/cygwin/math/sinhl.c
new file mode 100644
index 000000000..f6ecef0f2
--- /dev/null
+++ b/winsup/cygwin/math/sinhl.c
@@ -0,0 +1,100 @@
+/**
+ * This file has no copyright assigned and is placed in the Public Domain.
+ * This file is part of the mingw-w64 runtime package.
+ * No warranty is given; refer to the file DISCLAIMER.PD within this package.
+ */
+#include "cephes_mconf.h"
+#include <errno.h>
+
+#ifdef UNK
+static uLD P[] = {
+ { { 1.7550769032975377032681E-6L } },
+ { { 4.1680702175874268714539E-4L } },
+ { { 3.0993532520425419002409E-2L } },
+ { { 9.9999999999999999998002E-1L } }
+};
+static long double Q[] = {
+ { { 1.7453965448620151484660E-8L } },
+ { { -5.9116673682651952419571E-6L } },
+ { { 1.0599252315677389339530E-3L } },
+ { { -1.1403880487744749056675E-1L } },
+ { { 6.0000000000000000000200E0L } }
+};
+#endif
+
+#ifdef IBMPC
+static const uLD P[] = {
+ { { 0xec6a,0xd942,0xfbb3,0xeb8f,0x3feb, 0, 0, 0 } },
+ { { 0x365e,0xb30a,0xe437,0xda86,0x3ff3, 0, 0, 0 } },
+ { { 0x8890,0x01f6,0x2612,0xfde6,0x3ff9, 0, 0, 0 } },
+ { { 0x0000,0x0000,0x0000,0x8000,0x3fff, 0, 0, 0 } }
+};
+static const uLD Q[] = {
+ { { 0x4edd,0x4c21,0xad09,0x95ed,0x3fe5, 0, 0, 0 } },
+ { { 0x4376,0x9b70,0xd605,0xc65c,0xbfed, 0, 0, 0 } },
+ { { 0xc8ad,0x5d21,0x3069,0x8aed,0x3ff5, 0, 0, 0 } },
+ { { 0x9c32,0x6374,0x2d4b,0xe98d,0xbffb, 0, 0, 0 } },
+ { { 0x0000,0x0000,0x0000,0xc000,0x4001, 0, 0, 0 } }
+};
+#endif
+
+#ifdef MIEEE
+static uLD P[] = {
+ { { 0x3feb0000,0xeb8ffbb3,0xd942ec6a, 0 } },
+ { { 0x3ff30000,0xda86e437,0xb30a365e, 0 } },
+ { { 0x3ff90000,0xfde62612,0x01f68890, 0 } },
+ { { 0x3fff0000,0x80000000,0x00000000, 0 } }
+};
+static uLD Q[] = {
+ { { 0x3fe50000,0x95edad09,0x4c214edd, 0 } },
+ { { 0xbfed0000,0xc65cd605,0x9b704376, 0 } },
+ { { 0x3ff50000,0x8aed3069,0x5d21c8ad, 0 } },
+ { { 0xbffb0000,0xe98d2d4b,0x63749c32, 0 } },
+ { { 0x40010000,0xc0000000,0x00000000, 0 } }
+};
+#endif
+
+long double sinhl(long double x)
+{
+ long double a;
+ int x_class = fpclassify (x);
+
+ if (x_class == FP_NAN)
+ {
+ errno = EDOM;
+ return x;
+ }
+ if (x_class == FP_ZERO)
+ return x;
+ if (x_class == FP_INFINITE ||
+ (fabs (x) > (MAXLOGL + LOGE2L)))
+ {
+ errno = ERANGE;
+#ifdef INFINITIES
+ return (signbit (x) ? -INFINITYL : INFINITYL);
+#else
+ return (signbit (x) ? -MAXNUML : MAXNUML);
+#endif
+ }
+ a = fabsl (x);
+ if (a > 1.0L)
+ {
+ if (a >= (MAXLOGL - LOGE2L))
+ {
+ a = expl(0.5L*a);
+ a = (0.5L * a) * a;
+ if (x < 0.0L)
+ a = -a;
+ return (a);
+ }
+ a = expl(a);
+ a = 0.5L*a - (0.5L/a);
+ if (x < 0.0L)
+ a = -a;
+ return (a);
+ }
+
+ a *= a;
+ return (x + x * a * (polevll(a,P,3)/polevll(a,Q,4)));
+}
+
diff --git a/winsup/cygwin/math/sinl.c b/winsup/cygwin/math/sinl.c
new file mode 100644
index 000000000..0bbb71d37
--- /dev/null
+++ b/winsup/cygwin/math/sinl.c
@@ -0,0 +1,46 @@
+/*
+ This Software is provided under the Zope Public License (ZPL) Version 2.1.
+
+ Copyright (c) 2009, 2010 by the mingw-w64 project
+
+ See the AUTHORS file for the list of contributors to the mingw-w64 project.
+
+ This license has been certified as open source. It has also been designated
+ as GPL compatible by the Free Software Foundation (FSF).
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions in source code must retain the accompanying copyright
+ notice, this list of conditions, and the following disclaimer.
+ 2. Redistributions in binary form must reproduce the accompanying
+ copyright notice, this list of conditions, and the following disclaimer
+ in the documentation and/or other materials provided with the
+ distribution.
+ 3. Names of the copyright holders must not be used to endorse or promote
+ products derived from this software without prior written permission
+ from the copyright holders.
+ 4. The right to distribute this software or to use it for any purpose does
+ not give you the right to use Servicemarks (sm) or Trademarks (tm) of
+ the copyright holders. Use of them is covered by separate agreement
+ with the copyright holders.
+ 5. If any files are modified, you must cause the modified files to carry
+ prominent notices stating that you changed the files and the date of
+ any change.
+
+ Disclaimer
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY EXPRESSED
+ 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 HOLDERS 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.
+*/
+
+#define _NEW_COMPLEX_LDOUBLE 1
+#include "sin.def.h"
diff --git a/winsup/cygwin/math/sinl_internal.S b/winsup/cygwin/math/sinl_internal.S
new file mode 100644
index 000000000..6d766b098
--- /dev/null
+++ b/winsup/cygwin/math/sinl_internal.S
@@ -0,0 +1,58 @@
+/**
+ * This file has no copyright assigned and is placed in the Public Domain.
+ * This file is part of the mingw-w64 runtime package.
+ * No warranty is given; refer to the file DISCLAIMER.PD within this package.
+ */
+#include <_mingw_mac.h>
+
+ .file "sinl_internal.S"
+ .text
+#ifdef __x86_64__
+ .align 8
+#else
+ .align 4
+#endif
+.globl __MINGW_USYMBOL(__sinl_internal)
+ .def __MINGW_USYMBOL(__sinl_internal); .scl 2; .type 32; .endef
+__MINGW_USYMBOL(__sinl_internal):
+#ifdef __x86_64__
+ fldt (%rdx)
+ fsin
+ fnstsw %ax
+ testl $0x400,%eax
+ jnz 1f
+ movq %rcx,%rax
+ movq $0,8(%rcx)
+ fstpt (%rcx)
+ ret
+1: fldpi
+ fadd %st(0)
+ fxch %st(1)
+2: fprem1
+ fnstsw %ax
+ testl $0x400,%eax
+ jnz 2b
+ fstp %st(1)
+ fsin
+ movq %rcx,%rax
+ movq $0,8(%rcx)
+ fstpt (%rcx)
+ ret
+#else
+ fldt 4(%esp)
+ fsin
+ fnstsw %ax
+ testl $0x400,%eax
+ jnz 1f
+ ret
+1: fldpi
+ fadd %st(0)
+ fxch %st(1)
+2: fprem1
+ fnstsw %ax
+ testl $0x400,%eax
+ jnz 2b
+ fstp %st(1)
+ fsin
+ ret
+#endif
diff --git a/winsup/cygwin/math/sqrt.def.h b/winsup/cygwin/math/sqrt.def.h
new file mode 100644
index 000000000..1048130d0
--- /dev/null
+++ b/winsup/cygwin/math/sqrt.def.h
@@ -0,0 +1,94 @@
+/*
+ This Software is provided under the Zope Public License (ZPL) Version 2.1.
+
+ Copyright (c) 2009, 2010 by the mingw-w64 project
+
+ See the AUTHORS file for the list of contributors to the mingw-w64 project.
+
+ This license has been certified as open source. It has also been designated
+ as GPL compatible by the Free Software Foundation (FSF).
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions in source code must retain the accompanying copyright
+ notice, this list of conditions, and the following disclaimer.
+ 2. Redistributions in binary form must reproduce the accompanying
+ copyright notice, this list of conditions, and the following disclaimer
+ in the documentation and/or other materials provided with the
+ distribution.
+ 3. Names of the copyright holders must not be used to endorse or promote
+ products derived from this software without prior written permission
+ from the copyright holders.
+ 4. The right to distribute this software or to use it for any purpose does
+ not give you the right to use Servicemarks (sm) or Trademarks (tm) of
+ the copyright holders. Use of them is covered by separate agreement
+ with the copyright holders.
+ 5. If any files are modified, you must cause the modified files to carry
+ prominent notices stating that you changed the files and the date of
+ any change.
+
+ Disclaimer
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY EXPRESSED
+ 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 HOLDERS 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 "complex_internal.h"
+#include <errno.h>
+
+#if defined(__arm__) || defined(_ARM_)
+/* This works around a compiler bug, normally you would inline it with e.g.
+ * asm ("fsqrts %[dst], %[src];\n" : [dst] "=w" (res) : [src] "w" (x));
+ */
+__FLT_TYPE __fsqrt_internal( __FLT_TYPE x );
+asm(".def __fsqrt_internal; .scl 2; .type 32; .endef\n"
+ "\t.text\n"
+ "\t.align 4\n"
+ "\t.globl __fsqrt_internal\n"
+ "__fsqrt_internal:\n"
+#if _NEW_COMPLEX_FLOAT
+ "\t" "fsqrts s0, s0\n"
+#else
+ "\t" "fsqrtd d0, d0\n"
+#endif /* _NEW_COMPLEX_FLOAT */
+ "\tbx lr");
+#endif /* defined(__arm__) || defined(_ARM_) */
+
+__FLT_TYPE
+__FLT_ABI (sqrt) (__FLT_TYPE x)
+{
+ __FLT_TYPE res = __FLT_CST (0.0);
+ int x_class = fpclassify (x);
+ if (x_class == FP_NAN || signbit (x))
+ {
+ if (x_class == FP_ZERO)
+ return __FLT_CST (-0.0);
+
+ res = (signbit (x) ? -__FLT_NAN : __FLT_NAN);
+ __FLT_RPT_DOMAIN ("sqrt", x, 0.0, res);
+ return res;
+ }
+ else if (x_class == FP_ZERO)
+ return __FLT_CST (0.0);
+ else if (x_class == FP_INFINITE)
+ return __FLT_HUGE_VAL;
+ else if (x == __FLT_CST (1.0))
+ return __FLT_CST (1.0);
+#if defined(__arm__) || defined(_ARM_)
+ __fsqrt_internal(x);
+#elif defined(_X86_) || defined(__i386__) || defined(_AMD64_) || defined(__x86_64__)
+ asm ("fsqrt" : "=t" (res) : "0" (x));
+#else
+#error Not supported on your platform yet
+#endif
+ return res;
+}
diff --git a/winsup/cygwin/math/sqrtl.c b/winsup/cygwin/math/sqrtl.c
new file mode 100644
index 000000000..ffd818591
--- /dev/null
+++ b/winsup/cygwin/math/sqrtl.c
@@ -0,0 +1,46 @@
+/*
+ This Software is provided under the Zope Public License (ZPL) Version 2.1.
+
+ Copyright (c) 2009, 2010 by the mingw-w64 project
+
+ See the AUTHORS file for the list of contributors to the mingw-w64 project.
+
+ This license has been certified as open source. It has also been designated
+ as GPL compatible by the Free Software Foundation (FSF).
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions in source code must retain the accompanying copyright
+ notice, this list of conditions, and the following disclaimer.
+ 2. Redistributions in binary form must reproduce the accompanying
+ copyright notice, this list of conditions, and the following disclaimer
+ in the documentation and/or other materials provided with the
+ distribution.
+ 3. Names of the copyright holders must not be used to endorse or promote
+ products derived from this software without prior written permission
+ from the copyright holders.
+ 4. The right to distribute this software or to use it for any purpose does
+ not give you the right to use Servicemarks (sm) or Trademarks (tm) of
+ the copyright holders. Use of them is covered by separate agreement
+ with the copyright holders.
+ 5. If any files are modified, you must cause the modified files to carry
+ prominent notices stating that you changed the files and the date of
+ any change.
+
+ Disclaimer
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY EXPRESSED
+ 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 HOLDERS 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.
+*/
+
+#define _NEW_COMPLEX_LDOUBLE 1
+#include "sqrt.def.h"
diff --git a/winsup/cygwin/math/tanhl.c b/winsup/cygwin/math/tanhl.c
new file mode 100644
index 000000000..2c48a6aab
--- /dev/null
+++ b/winsup/cygwin/math/tanhl.c
@@ -0,0 +1,92 @@
+/**
+ * This file has no copyright assigned and is placed in the Public Domain.
+ * This file is part of the mingw-w64 runtime package.
+ * No warranty is given; refer to the file DISCLAIMER.PD within this package.
+ */
+#include "cephes_mconf.h"
+#ifndef _SET_ERRNO
+#define _SET_ERRNO(x)
+#endif
+
+#ifdef UNK
+static uLD P[] = {
+ { { -6.8473739392677100872869E-5L } },
+ { { -9.5658283111794641589011E-1L } },
+ { { -8.4053568599672284488465E1L } },
+ { { -1.3080425704712825945553E3L } }
+};
+static uLD Q[] = {
+ { { 9.6259501838840336946872E1L } },
+ { { 1.8218117903645559060232E3L } },
+ { { 3.9241277114138477845780E3L } }
+};
+#endif
+
+#ifdef IBMPC
+static uLD P[] = {
+ { { 0xd2a4,0x1b0c,0x8f15,0x8f99,0xbff1, 0, 0, 0 } },
+ { { 0x5959,0x9111,0x9cc7,0xf4e2,0xbffe, 0, 0, 0 } },
+ { { 0xb576,0xef5e,0x6d57,0xa81b,0xc005, 0, 0, 0 } },
+ { { 0xe3be,0xbfbd,0x5cbc,0xa381,0xc009, 0, 0, 0 } }
+};
+static uLD Q[] = {
+ { { 0x687f,0xce24,0xdd6c,0xc084,0x4005, 0, 0, 0 } },
+ { { 0x3793,0xc95f,0xfa2f,0xe3b9,0x4009, 0, 0, 0 } },
+ { { 0xd5a2,0x1f9c,0x0b1b,0xf542,0x400a, 0, 0, 0 } }
+};
+#endif
+
+#ifdef MIEEE
+static uLD P[] = {
+ { { 0xbff10000,0x8f998f15,0x1b0cd2a4, 0 } },
+ { { 0xbffe0000,0xf4e29cc7,0x91115959, 0 } },
+ { { 0xc0050000,0xa81b6d57,0xef5eb576, 0 } },
+ { { 0xc0090000,0xa3815cbc,0xbfbde3be, 0 } }
+};
+static uLD Q[] = {
+ { { 0x40050000,0xc084dd6c,0xce24687f, 0 } },
+ { { 0x40090000,0xe3b9fa2f,0xc95f3793, 0 } },
+ { { 0x400a0000,0xf5420b1b,0x1f9cd5a2, 0 } }
+};
+#endif
+
+long double tanhl(long double x)
+{
+ long double s, z;
+
+#ifdef MINUSZERO
+ if (x == 0.0L)
+ return (x);
+#endif
+ if (isnanl(x))
+ {
+ _SET_ERRNO (EDOM);
+ return x;
+ }
+
+ z = fabsl(x);
+ if (z > 0.5L * MAXLOGL)
+ {
+ _SET_ERRNO (ERANGE);
+ if (x > 0)
+ return (1.0L);
+ else
+ return (-1.0L);
+ }
+ if (z >= 0.625L)
+ {
+ s = expl(2.0*z);
+ z = 1.0L - 2.0/(s + 1.0L);
+ if (x < 0)
+ z = -z;
+ }
+ else
+ {
+ s = x * x;
+ z = polevll( s, P, 3 )/p1evll(s, Q, 3);
+ z = x * s * z;
+ z = x + z;
+ }
+ return (z);
+}
+
diff --git a/winsup/cygwin/math/tanl.S b/winsup/cygwin/math/tanl.S
new file mode 100644
index 000000000..f11b53920
--- /dev/null
+++ b/winsup/cygwin/math/tanl.S
@@ -0,0 +1,62 @@
+/**
+ * This file has no copyright assigned and is placed in the Public Domain.
+ * This file is part of the mingw-w64 runtime package.
+ * No warranty is given; refer to the file DISCLAIMER.PD within this package.
+ */
+#include <_mingw_mac.h>
+
+ .file "tanl.S"
+ .text
+#ifdef __x86_64__
+ .align 8
+#else
+ .align 4
+#endif
+.globl __MINGW_USYMBOL(tanl)
+ .def __MINGW_USYMBOL(tanl); .scl 2; .type 32; .endef
+__MINGW_USYMBOL(tanl):
+#ifdef __x86_64__
+ fldt (%rdx)
+ fptan
+ fnstsw %ax
+ testl $0x400,%eax
+ jnz 1f
+ fstp %st(0)
+ movq %rcx,%rax
+ movq $0,8(%rcx)
+ fstpt (%rcx)
+ ret
+1: fldpi
+ fadd %st(0)
+ fxch %st(1)
+2: fprem1
+ fstsw %ax
+ testl $0x400,%eax
+ jnz 2b
+ fstp %st(1)
+ fptan
+ fstp %st(0)
+ movq %rcx,%rax
+ movq $0,8(%rcx)
+ fstpt (%rcx)
+ ret
+#else
+ fldt 4(%esp)
+ fptan
+ fnstsw %ax
+ testl $0x400,%eax
+ jnz 1f
+ fstp %st(0)
+ ret
+1: fldpi
+ fadd %st(0)
+ fxch %st(1)
+2: fprem1
+ fstsw %ax
+ testl $0x400,%eax
+ jnz 2b
+ fstp %st(1)
+ fptan
+ fstp %st(0)
+ ret
+#endif
diff --git a/winsup/cygwin/math/tgammal.c b/winsup/cygwin/math/tgammal.c
new file mode 100644
index 000000000..99408eed7
--- /dev/null
+++ b/winsup/cygwin/math/tgammal.c
@@ -0,0 +1,393 @@
+/**
+ * This file has no copyright assigned and is placed in the Public Domain.
+ * This file is part of the mingw-w64 runtime package.
+ * No warranty is given; refer to the file DISCLAIMER.PD within this package.
+ */
+#include "cephes_mconf.h"
+
+/*
+gamma(x+2) = gamma(x+2) P(x)/Q(x)
+0 <= x <= 1
+Relative error
+n=7, d=8
+Peak error = 1.83e-20
+Relative error spread = 8.4e-23
+*/
+
+#if UNK
+static const uLD P[8] = {
+ { { 4.212760487471622013093E-5L } },
+ { { 4.542931960608009155600E-4L } },
+ { { 4.092666828394035500949E-3L } },
+ { { 2.385363243461108252554E-2L } },
+ { { 1.113062816019361559013E-1L } },
+ { { 3.629515436640239168939E-1L } },
+ { { 8.378004301573126728826E-1L } },
+ { { 1.000000000000000000009E0L } }
+};
+static const uLD Q[9] = {
+ { { -1.397148517476170440917E-5L } },
+ { { 2.346584059160635244282E-4L } },
+ { { -1.237799246653152231188E-3L } },
+ { { -7.955933682494738320586E-4L } },
+ { { 2.773706565840072979165E-2L } },
+ { { -4.633887671244534213831E-2L } },
+ { { -2.243510905670329164562E-1L } },
+ { { 4.150160950588455434583E-1L } },
+ { { 9.999999999999999999908E-1L } }
+};
+#endif
+#if IBMPC
+static const uLD P[8] = {
+ { { 0x434a,0x3f22,0x2bda,0xb0b2,0x3ff0, 0x0, 0x0, 0x0 } },
+ { { 0xf5aa,0xe82f,0x335b,0xee2e,0x3ff3, 0x0, 0x0, 0x0 } },
+ { { 0xbe6c,0x3757,0xc717,0x861b,0x3ff7, 0x0, 0x0, 0x0 } },
+ { { 0x7f43,0x5196,0xb166,0xc368,0x3ff9, 0x0, 0x0, 0x0 } },
+ { { 0x9549,0x8eb5,0x8c3a,0xe3f4,0x3ffb, 0x0, 0x0, 0x0 } },
+ { { 0x8d75,0x23af,0xc8e4,0xb9d4,0x3ffd, 0x0, 0x0, 0x0 } },
+ { { 0x29cf,0x19b3,0x16c8,0xd67a,0x3ffe, 0x0, 0x0, 0x0 } },
+ { { 0x0000,0x0000,0x0000,0x8000,0x3fff, 0x0, 0x0, 0x0 } }
+};
+static const uLD Q[9] = {
+ { { 0x5473,0x2de8,0x1268,0xea67,0xbfee, 0x0, 0x0, 0x0 } },
+ { { 0x334b,0xc2f0,0xa2dd,0xf60e,0x3ff2, 0x0, 0x0, 0x0 } },
+ { { 0xbeed,0x1853,0xa691,0xa23d,0xbff5, 0x0, 0x0, 0x0 } },
+ { { 0x296e,0x7cb1,0x5dfd,0xd08f,0xbff4, 0x0, 0x0, 0x0 } },
+ { { 0x0417,0x7989,0xd7bc,0xe338,0x3ff9, 0x0, 0x0, 0x0 } },
+ { { 0x3295,0x3698,0xd580,0xbdcd,0xbffa, 0x0, 0x0, 0x0 } },
+ { { 0x75ef,0x3ab7,0x4ad3,0xe5bc,0xbffc, 0x0, 0x0, 0x0 } },
+ { { 0xe458,0x2ec7,0xfd57,0xd47c,0x3ffd, 0x0, 0x0, 0x0 } },
+ { { 0x0000,0x0000,0x0000,0x8000,0x3fff, 0x0, 0x0, 0x0 } }
+};
+#endif
+#if MIEEE
+static const uLD P[8] = {
+ { { 0x3ff00000,0xb0b22bda,0x3f22434a, 0 } },
+ { { 0x3ff30000,0xee2e335b,0xe82ff5aa, 0 } },
+ { { 0x3ff70000,0x861bc717,0x3757be6c, 0 } },
+ { { 0x3ff90000,0xc368b166,0x51967f43, 0 } },
+ { { 0x3ffb0000,0xe3f48c3a,0x8eb59549, 0 } },
+ { { 0x3ffd0000,0xb9d4c8e4,0x23af8d75, 0 } },
+ { { 0x3ffe0000,0xd67a16c8,0x19b329cf, 0 } },
+ { { 0x3fff0000,0x80000000,0x00000000, 0 } }
+};
+static const uLD Q[9] = {
+ { { 0xbfee0000,0xea671268,0x2de85473, 0 } },
+ { { 0x3ff20000,0xf60ea2dd,0xc2f0334b, 0 } },
+ { { 0xbff50000,0xa23da691,0x1853beed, 0 } },
+ { { 0xbff40000,0xd08f5dfd,0x7cb1296e, 0 } },
+ { { 0x3ff90000,0xe338d7bc,0x79890417, 0 } },
+ { { 0xbffa0000,0xbdcdd580,0x36983295, 0 } },
+ { { 0xbffc0000,0xe5bc4ad3,0x3ab775ef, 0 } },
+ { { 0x3ffd0000,0xd47cfd57,0x2ec7e458, 0 } },
+ { { 0x3fff0000,0x80000000,0x00000000, 0 } }
+};
+#endif
+
+#define MAXGAML 1755.455L
+/*static const long double LOGPI = 1.14472988584940017414L;*/
+
+/* Stirling's formula for the gamma function
+gamma(x) = sqrt(2 pi) x^(x-.5) exp(-x) (1 + 1/x P(1/x))
+z(x) = x
+13 <= x <= 1024
+Relative error
+n=8, d=0
+Peak error = 9.44e-21
+Relative error spread = 8.8e-4
+*/
+#if UNK
+static const uLD STIR[9] = {
+ { { 7.147391378143610789273E-4L } },
+ { { -2.363848809501759061727E-5L } },
+ { { -5.950237554056330156018E-4L } },
+ { { 6.989332260623193171870E-5L } },
+ { { 7.840334842744753003862E-4L } },
+ { { -2.294719747873185405699E-4L } },
+ { { -2.681327161876304418288E-3L } },
+ { { 3.472222222230075327854E-3L } },
+ { { 8.333333333333331800504E-2L } }
+};
+#endif
+#if IBMPC
+static const uLD STIR[9] = {
+ { { 0x6ede,0x69f7,0x54e3,0xbb5d,0x3ff4, 0, 0, 0 } },
+ { { 0xc395,0x0295,0x4443,0xc64b,0xbfef, 0, 0, 0 } },
+ { { 0xba6f,0x7c59,0x5e47,0x9bfb,0xbff4, 0, 0, 0 } },
+ { { 0x5704,0x1a39,0xb11d,0x9293,0x3ff1, 0, 0, 0 } },
+ { { 0x30b7,0x1a21,0x98b2,0xcd87,0x3ff4, 0, 0, 0 } },
+ { { 0xbef3,0x7023,0x6a08,0xf09e,0xbff2, 0, 0, 0 } },
+ { { 0x3a1c,0x5ac8,0x3478,0xafb9,0xbff6, 0, 0, 0 } },
+ { { 0xc3c9,0x906e,0x38e3,0xe38e,0x3ff6, 0, 0, 0 } },
+ { { 0xa1d5,0xaaaa,0xaaaa,0xaaaa,0x3ffb, 0, 0, 0 } }
+};
+#endif
+#if MIEEE
+static const uLD STIR[9] = {
+ { { 0x3ff40000,0xbb5d54e3,0x69f76ede, 0 } },
+ { { 0xbfef0000,0xc64b4443,0x0295c395, 0 } },
+ { { 0xbff40000,0x9bfb5e47,0x7c59ba6f, 0 } },
+ { { 0x3ff10000,0x9293b11d,0x1a395704, 0 } },
+ { { 0x3ff40000,0xcd8798b2,0x1a2130b7, 0 } },
+ { { 0xbff20000,0xf09e6a08,0x7023bef3, 0 } },
+ { { 0xbff60000,0xafb93478,0x5ac83a1c, 0 } },
+ { { 0x3ff60000,0xe38e38e3,0x906ec3c9, 0 } },
+ { { 0x3ffb0000,0xaaaaaaaa,0xaaaaa1d5, 0 } }
+};
+#endif
+#define MAXSTIR 1024.0L
+static const long double SQTPI = 2.50662827463100050242E0L;
+
+/* 1/gamma(x) = z P(z)
+ * z(x) = 1/x
+ * 0 < x < 0.03125
+ * Peak relative error 4.2e-23
+ */
+#if UNK
+static const uLD S[9] = {
+ { { -1.193945051381510095614E-3L } },
+ { { 7.220599478036909672331E-3L } },
+ { { -9.622023360406271645744E-3L } },
+ { { -4.219773360705915470089E-2L } },
+ { { 1.665386113720805206758E-1L } },
+ { { -4.200263503403344054473E-2L } },
+ { { -6.558780715202540684668E-1L } },
+ { { 5.772156649015328608253E-1L } },
+ { { 1.000000000000000000000E0L } }
+};
+#endif
+#if IBMPC
+static const uLD S[9] = {
+ { { 0xbaeb,0xd6d3,0x25e5,0x9c7e,0xbff5, 0, 0, 0 } },
+ { { 0xfe9a,0xceb4,0xc74e,0xec9a,0x3ff7, 0, 0, 0 } },
+ { { 0x9225,0xdfef,0xb0e9,0x9da5,0xbff8, 0, 0, 0 } },
+ { { 0x10b0,0xec17,0x87dc,0xacd7,0xbffa, 0, 0, 0 } },
+ { { 0x6b8d,0x7515,0x1905,0xaa89,0x3ffc, 0, 0, 0 } },
+ { { 0xf183,0x126b,0xf47d,0xac0a,0xbffa, 0, 0, 0 } },
+ { { 0x7bf6,0x57d1,0xa013,0xa7e7,0xbffe, 0, 0, 0 } },
+ { { 0xc7a9,0x7db0,0x67e3,0x93c4,0x3ffe, 0, 0, 0 } },
+ { { 0x0000,0x0000,0x0000,0x8000,0x3fff, 0, 0, 0 } }
+};
+#endif
+#if MIEEE
+static const long S[9] = {
+ { { 0xbff50000,0x9c7e25e5,0xd6d3baeb, 0 } },
+ { { 0x3ff70000,0xec9ac74e,0xceb4fe9a, 0 } },
+ { { 0xbff80000,0x9da5b0e9,0xdfef9225, 0 } },
+ { { 0xbffa0000,0xacd787dc,0xec1710b0, 0 } },
+ { { 0x3ffc0000,0xaa891905,0x75156b8d, 0 } },
+ { { 0xbffa0000,0xac0af47d,0x126bf183, 0 } },
+ { { 0xbffe0000,0xa7e7a013,0x57d17bf6, 0 } },
+ { { 0x3ffe0000,0x93c467e3,0x7db0c7a9, 0 } },
+ { { 0x3fff0000,0x80000000,0x00000000, 0 } }
+};
+#endif
+/* 1/gamma(-x) = z P(z)
+ * z(x) = 1/x
+ * 0 < x < 0.03125
+ * Peak relative error 5.16e-23
+ * Relative error spread = 2.5e-24
+ */
+#if UNK
+static const uLD SN[9] = {
+ { { 1.133374167243894382010E-3L } },
+ { { 7.220837261893170325704E-3L } },
+ { { 9.621911155035976733706E-3L } },
+ { { -4.219773343731191721664E-2L } },
+ { { -1.665386113944413519335E-1L } },
+ { { -4.200263503402112910504E-2L } },
+ { { 6.558780715202536547116E-1L } },
+ { { 5.772156649015328608727E-1L } },
+ { { -1.000000000000000000000E0L } }
+};
+#endif
+#if IBMPC
+static const uLD SN[9] = {
+ { { 0x5dd1,0x02de,0xb9f7,0x948d,0x3ff5, 0, 0, 0 } },
+ { { 0x989b,0xdd68,0xc5f1,0xec9c,0x3ff7, 0, 0, 0 } },
+ { { 0x2ca1,0x18f0,0x386f,0x9da5,0x3ff8, 0, 0, 0 } },
+ { { 0x783f,0x41dd,0x87d1,0xacd7,0xbffa, 0, 0, 0 } },
+ { { 0x7a5b,0xd76d,0x1905,0xaa89,0xbffc, 0, 0, 0 } },
+ { { 0x7f64,0x1234,0xf47d,0xac0a,0xbffa, 0, 0, 0 } },
+ { { 0x5e26,0x57d1,0xa013,0xa7e7,0x3ffe, 0, 0, 0 } },
+ { { 0xc7aa,0x7db0,0x67e3,0x93c4,0x3ffe, 0, 0, 0 } },
+ { { 0x0000,0x0000,0x0000,0x8000,0xbfff, 0, 0, 0 } }
+};
+#endif
+#if MIEEE
+static const uLD SN[9] = {
+ { { 0x3ff50000,0x948db9f7,0x02de5dd1, 0 } },
+ { { 0x3ff70000,0xec9cc5f1,0xdd68989b, 0 } },
+ { { 0x3ff80000,0x9da5386f,0x18f02ca1, 0 } },
+ { { 0xbffa0000,0xacd787d1,0x41dd783f, 0 } },
+ { { 0xbffc0000,0xaa891905,0xd76d7a5b, 0 } },
+ { { 0xbffa0000,0xac0af47d,0x12347f64, 0 } },
+ { { 0x3ffe0000,0xa7e7a013,0x57d15e26, 0 } },
+ { { 0x3ffe0000,0x93c467e3,0x7db0c7aa, 0 } },
+ { { 0xbfff0000,0x80000000,0x00000000, 0 } }
+};
+#endif
+
+static long double stirf (long double);
+
+/* Gamma function computed by Stirling's formula. */
+
+static long double stirf(long double x)
+{
+ long double y, w, v;
+
+ w = 1.0L/x;
+ /* For large x, use rational coefficients from the analytical expansion. */
+ if (x > 1024.0L)
+ w = (((((6.97281375836585777429E-5L * w
+ + 7.84039221720066627474E-4L) * w
+ - 2.29472093621399176955E-4L) * w
+ - 2.68132716049382716049E-3L) * w
+ + 3.47222222222222222222E-3L) * w
+ + 8.33333333333333333333E-2L) * w
+ + 1.0L;
+ else
+ w = 1.0L + w * polevll( w, STIR, 8 );
+ y = expl(x);
+ if (x > MAXSTIR)
+ { /* Avoid overflow in pow() */
+ v = powl(x, 0.5L * x - 0.25L);
+ y = v * (v / y);
+ }
+ else
+ {
+ y = powl(x, x - 0.5L) / y;
+ }
+ y = SQTPI * y * w;
+ return (y);
+}
+
+long double __tgammal_r(long double, int *);
+
+long double __tgammal_r(long double x, int* sgngaml)
+{
+ long double p, q, z;
+ int i;
+
+ *sgngaml = 1;
+#ifdef NANS
+ if (isnanl(x))
+ return (NANL);
+#endif
+#ifdef INFINITIES
+#ifdef NANS
+ if (x == INFINITYL)
+ return (x);
+ if (x == -INFINITYL)
+ return (NANL);
+#else
+ if (!isfinite(x))
+ return (x);
+#endif
+#endif
+ q = fabsl(x);
+
+ if (q > 13.0L)
+ {
+ if (q > MAXGAML)
+ goto goverf;
+ if (x < 0.0L)
+ {
+ p = floorl(q);
+ if (p == q)
+ {
+gsing:
+ _SET_ERRNO(EDOM);
+ mtherr("tgammal", SING);
+#ifdef INFINITIES
+ return (INFINITYL);
+#else
+ return (*sgngaml * MAXNUML);
+#endif
+ }
+ i = p;
+ if ((i & 1) == 0)
+ *sgngaml = -1;
+ z = q - p;
+ if (z > 0.5L)
+ {
+ p += 1.0L;
+ z = q - p;
+ }
+ z = q * sinl(PIL * z);
+ z = fabsl(z) * stirf(q);
+ if (z <= PIL/MAXNUML)
+ {
+goverf:
+ _SET_ERRNO(ERANGE);
+ mtherr("tgammal", OVERFLOW);
+#ifdef INFINITIES
+ return(*sgngaml * INFINITYL);
+#else
+ return(*sgngaml * MAXNUML);
+#endif
+ }
+ z = PIL/z;
+ }
+ else
+ {
+ z = stirf(x);
+ }
+ return (*sgngaml * z);
+ }
+
+ z = 1.0L;
+ while (x >= 3.0L)
+ {
+ x -= 1.0L;
+ z *= x;
+ }
+
+ while (x < -0.03125L)
+ {
+ z /= x;
+ x += 1.0L;
+ }
+
+ if (x <= 0.03125L)
+ goto Small;
+
+ while (x < 2.0L)
+ {
+ z /= x;
+ x += 1.0L;
+ }
+
+ if (x == 2.0L)
+ return (z);
+
+ x -= 2.0L;
+ p = polevll( x, P, 7 );
+ q = polevll( x, Q, 8 );
+ return (z * p / q);
+
+Small:
+ if (x == 0.0L)
+ {
+ goto gsing;
+ }
+ else
+ {
+ if (x < 0.0L)
+ {
+ x = -x;
+ q = z / (x * polevll(x, SN, 8));
+ }
+ else
+ q = z / (x * polevll(x, S, 8));
+ }
+ return q;
+}
+
+/* This is the C99 version. */
+long double tgammal(long double x)
+{
+ int local_sgngaml = 0;
+ return (__tgammal_r(x, &local_sgngaml));
+}
+
diff --git a/winsup/cygwin/math/truncl.c b/winsup/cygwin/math/truncl.c
new file mode 100644
index 000000000..ddc6af68f
--- /dev/null
+++ b/winsup/cygwin/math/truncl.c
@@ -0,0 +1,26 @@
+/**
+ * This file has no copyright assigned and is placed in the Public Domain.
+ * This file is part of the mingw-w64 runtime package.
+ * No warranty is given; refer to the file DISCLAIMER.PD within this package.
+ */
+#include <fenv.h>
+#include <math.h>
+
+long double
+truncl (long double _x)
+{
+#if defined(_ARM_) || defined(__arm__)
+ return trunc(_x);
+#else
+ long double retval = 0.0L;
+ unsigned short saved_cw;
+ unsigned short tmp_cw;
+ __asm__ __volatile__ ("fnstcw %0;" : "=m" (saved_cw)); /* save FPU control word */
+ tmp_cw = (saved_cw & ~(FE_TONEAREST | FE_DOWNWARD | FE_UPWARD | FE_TOWARDZERO))
+ | FE_TOWARDZERO;
+ __asm__ __volatile__ ("fldcw %0;" : : "m" (tmp_cw));
+ __asm__ __volatile__ ("frndint;" : "=t" (retval) : "0" (_x)); /* round towards zero */
+ __asm__ __volatile__ ("fldcw %0;" : : "m" (saved_cw) ); /* restore saved control word */
+ return retval;
+#endif /* defined(_ARM_) || defined(__arm__) */
+}
diff --git a/winsup/cygwin/mcount.c b/winsup/cygwin/mcount.c
index fad672881..08d79b598 100644
--- a/winsup/cygwin/mcount.c
+++ b/winsup/cygwin/mcount.c
@@ -41,6 +41,7 @@ static char rcsid[] = "$OpenBSD: mcount.c,v 1.6 1997/07/23 21:11:27 kstailey Exp
#endif
#include <sys/types.h>
#include "gmon.h"
+#include "winsup.h"
/*
* mcount is called on entry to each function compiled with the profiling
@@ -62,7 +63,7 @@ _MCOUNT_DECL (size_t, size_t);
_MCOUNT_DECL (size_t frompc, size_t selfpc)
{
- register u_short *frompcindex;
+ register u_int16_t *frompcindex;
register struct tostruct *top, *prevtop;
register struct gmonparam *p;
register long toindex;
@@ -70,11 +71,12 @@ _MCOUNT_DECL (size_t frompc, size_t selfpc)
p = &_gmonparam;
/*
* check that we are profiling
- * and that we aren't recursively invoked.
+ * and that we aren't recursively invoked by this thread
+ * or entered anew by any other thread.
*/
- if (p->state != GMON_PROF_ON)
+ if (InterlockedCompareExchange (
+ &p->state, GMON_PROF_BUSY, GMON_PROF_ON) != GMON_PROF_ON)
return;
- p->state = GMON_PROF_BUSY;
/*
* check that frompcindex is a reasonable pc value.
* for example: signal catchers get called from the stack,
@@ -162,10 +164,10 @@ _MCOUNT_DECL (size_t frompc, size_t selfpc)
}
}
done:
- p->state = GMON_PROF_ON;
+ InterlockedExchange (&p->state, GMON_PROF_ON);
return;
overflow:
- p->state = GMON_PROF_ERROR;
+ InterlockedExchange (&p->state, GMON_PROF_ERROR);
return;
}
diff --git a/winsup/cygwin/miscfuncs.cc b/winsup/cygwin/miscfuncs.cc
index 819eaa54e..80fa95420 100644
--- a/winsup/cygwin/miscfuncs.cc
+++ b/winsup/cygwin/miscfuncs.cc
@@ -1,8 +1,5 @@
/* miscfuncs.cc: misc funcs that don't belong anywhere else
- Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008, 2009, 2010, 2011, 2012, 2013 Red Hat, Inc.
-
This file is part of Cygwin.
This software is a copyrighted work licensed under the terms of the
@@ -17,9 +14,6 @@ details. */
#include <limits.h>
#include <sys/param.h>
#include <wchar.h>
-#include <wingdi.h>
-#include <winuser.h>
-#include <winnls.h>
#include "cygtls.h"
#include "ntdll.h"
#include "path.h"
@@ -149,8 +143,8 @@ cygwin_strncasecmp (const char *cs, const char *ct, size_t n)
return RtlCompareUnicodeString (&us, &ut, TRUE);
}
-extern "C" char * __stdcall
-cygwin_strlwr (char *string)
+extern "C" char *
+strlwr (char *string)
{
UNICODE_STRING us;
size_t len = (strlen (string) + 1) * sizeof (WCHAR);
@@ -163,8 +157,8 @@ cygwin_strlwr (char *string)
return string;
}
-extern "C" char * __stdcall
-cygwin_strupr (char *string)
+extern "C" char *
+strupr (char *string)
{
UNICODE_STRING us;
size_t len = (strlen (string) + 1) * sizeof (WCHAR);
@@ -199,41 +193,63 @@ dummytest (volatile char *p)
ssize_t
check_iovec (const struct iovec *iov, int iovcnt, bool forwrite)
{
- if (iovcnt <= 0 || iovcnt > IOV_MAX)
+ if (iovcnt < 0 || iovcnt > IOV_MAX)
{
set_errno (EINVAL);
return -1;
}
- myfault efault;
- if (efault.faulted (EFAULT))
- return -1;
+ __try
+ {
- size_t tot = 0;
+ size_t tot = 0;
- while (iovcnt != 0)
- {
- if (iov->iov_len > SSIZE_MAX || (tot += iov->iov_len) > SSIZE_MAX)
+ while (iovcnt != 0)
{
- set_errno (EINVAL);
- return -1;
+ if (iov->iov_len > SSIZE_MAX || (tot += iov->iov_len) > SSIZE_MAX)
+ {
+ set_errno (EINVAL);
+ __leave;
+ }
+
+ volatile char *p = ((char *) iov->iov_base) + iov->iov_len - 1;
+ if (!iov->iov_len)
+ /* nothing to do */;
+ else if (!forwrite)
+ *p = dummytest (p);
+ else
+ dummytest (p);
+
+ iov++;
+ iovcnt--;
}
- volatile char *p = ((char *) iov->iov_base) + iov->iov_len - 1;
- if (!iov->iov_len)
- /* nothing to do */;
- else if (!forwrite)
- *p = dummytest (p);
- else
- dummytest (p);
+ assert (tot <= SSIZE_MAX);
- iov++;
- iovcnt--;
+ return (ssize_t) tot;
}
+ __except (EFAULT)
+ __endtry
+ return -1;
+}
- assert (tot <= SSIZE_MAX);
+/* There's a bug in ntsecapi.h (Mingw as well as MSFT). SystemFunction036
+ is, in fact, a WINAPI function, but it's not defined as such. Therefore
+ we have to do it correctly here. */
+#define RtlGenRandom SystemFunction036
+extern "C" BOOLEAN WINAPI RtlGenRandom (PVOID, ULONG);
- return (ssize_t) tot;
+/* Used by arc2random, fhandler_socket and fhandler_random. */
+extern "C" int
+getentropy (void *ptr, size_t len)
+{
+ if (!RtlGenRandom (ptr, len))
+ {
+ debug_printf ("%E = RtlGenRandom()");
+ set_errno (EIO);
+ return -1;
+ }
+ return 0;
}
/* Try hard to schedule another thread.
@@ -387,6 +403,82 @@ WritePipeOverlapped (HANDLE h, LPCVOID buf, DWORD len, LPDWORD ret_len,
return ret;
}
+bool
+NT_readline::init (POBJECT_ATTRIBUTES attr, PCHAR in_buf, ULONG in_buflen)
+{
+ NTSTATUS status;
+ IO_STATUS_BLOCK io;
+
+ status = NtOpenFile (&fh, SYNCHRONIZE | FILE_READ_DATA, attr, &io,
+ FILE_SHARE_VALID_FLAGS,
+ FILE_SYNCHRONOUS_IO_NONALERT
+ | FILE_OPEN_FOR_BACKUP_INTENT);
+ if (!NT_SUCCESS (status))
+ {
+ paranoid_printf ("NtOpenFile(%S) failed, status %y",
+ attr->ObjectName, status);
+ return false;
+ }
+ buf = in_buf;
+ buflen = in_buflen;
+ got = end = buf;
+ len = 0;
+ line = 1;
+ return true;
+}
+
+PCHAR
+NT_readline::gets ()
+{
+ IO_STATUS_BLOCK io;
+
+ while (true)
+ {
+ /* len == 0 indicates we have to read from the file. */
+ if (!len)
+ {
+ if (!NT_SUCCESS (NtReadFile (fh, NULL, NULL, NULL, &io, got,
+ (buflen - 2) - (got - buf), NULL, NULL)))
+ return NULL;
+ len = io.Information;
+ /* Set end marker. */
+ got[len] = got[len + 1] = '\0';
+ /* Set len to the absolute len of bytes in buf. */
+ len += got - buf;
+ /* Reset got to start reading at the start of the buffer again. */
+ got = end = buf;
+ }
+ else
+ {
+ got = end + 1;
+ ++line;
+ }
+ /* Still some valid full line? */
+ if (got < buf + len)
+ {
+ if ((end = strchr (got, '\n')))
+ {
+ end[end[-1] == '\r' ? -1 : 0] = '\0';
+ return got;
+ }
+ /* Last line missing a \n at EOF? */
+ if (len < buflen - 2)
+ {
+ len = 0;
+ return got;
+ }
+ }
+ /* We have to read once more. Move remaining bytes to the start of
+ the buffer and reposition got so that it points to the end of
+ the remaining bytes. */
+ len = buf + len - got;
+ memmove (buf, got, len);
+ got = buf + len;
+ buf[len] = buf[len + 1] = '\0';
+ len = 0;
+ }
+}
+
/* backslashify: Convert all forward slashes in src path to back slashes
in dst path. Add a trailing slash to dst when trailing_slash_p arg
is set to 1. */
@@ -439,18 +531,36 @@ slashify (const char *src, char *dst, bool trailing_slash_p)
void * __reg1
__import_address (void *imp)
{
- if (*((uint16_t *) imp) != 0x25ff)
- return NULL;
- myfault efault;
- if (efault.faulted ())
- return NULL;
- const char *ptr = (const char *) imp;
+ __try
+ {
+ if (*((uint16_t *) imp) == 0x25ff)
+ {
+ const char *ptr = (const char *) imp;
#ifdef __x86_64__
- const uintptr_t *jmpto = (uintptr_t *) (ptr + 6 + *(int32_t *)(ptr + 2));
+ const uintptr_t *jmpto = (uintptr_t *)
+ (ptr + 6 + *(int32_t *)(ptr + 2));
#else
- const uintptr_t *jmpto = (uintptr_t *) *((uintptr_t *) (ptr + 2));
+ const uintptr_t *jmpto = (uintptr_t *) *((uintptr_t *) (ptr + 2));
#endif
- return (void *) *jmpto;
+ return (void *) *jmpto;
+ }
+ }
+ __except (NO_ERROR) {}
+ __endtry
+ return NULL;
+}
+
+/* Helper function to generate the correct caller address. For external
+ calls, the return address on the stack is _sigbe. In that case the
+ actual caller return address is on the cygtls stack. Use this function
+ via the macro caller_return_address. */
+extern "C" void _sigbe ();
+
+void *
+__caller_return_address (void *builtin_ret_addr)
+{
+ return builtin_ret_addr == &_sigbe
+ ? (void *) _my_tls.retaddr () : builtin_ret_addr;
}
/* CygwinCreateThread.
@@ -459,32 +569,30 @@ __import_address (void *imp)
parameters we don't use and instead to add parameters we need to make
the function pthreads compatible. */
-struct thread_wrapper_arg
+struct pthread_wrapper_arg
{
LPTHREAD_START_ROUTINE func;
PVOID arg;
PBYTE stackaddr;
PBYTE stackbase;
PBYTE stacklimit;
+ ULONG guardsize;
};
-static DWORD WINAPI
-thread_wrapper (PVOID arg)
+DWORD WINAPI
+pthread_wrapper (PVOID arg)
{
/* Just plain paranoia. */
if (!arg)
return ERROR_INVALID_PARAMETER;
- /* The process is now threaded. Note the fact for later usage. */
+ /* The process is now threaded. Note for later usage by arc4random. */
__isthreaded = 1;
/* Fetch thread wrapper info and free from cygheap. */
- thread_wrapper_arg wrapper_arg = *(thread_wrapper_arg *) arg;
+ pthread_wrapper_arg wrapper_arg = *(pthread_wrapper_arg *) arg;
cfree (arg);
- /* Remove _cygtls from this stack since it won't be used anymore. */
- _my_tls.remove (0);
-
/* Set stack values in TEB */
PTEB teb = NtCurrentTeb ();
teb->Tib.StackBase = wrapper_arg.stackbase;
@@ -501,7 +609,14 @@ thread_wrapper (PVOID arg)
The below assembler code will release the OS stack after switching to our
new stack. */
wrapper_arg.stackaddr = dealloc_addr;
-
+ /* On post-XP systems, set thread stack guarantee matching the guardsize.
+ Note that the guardsize is one page bigger than the guarantee. */
+ if (wincap.has_set_thread_stack_guarantee ()
+ && wrapper_arg.guardsize > wincap.def_guard_page_size ())
+ {
+ wrapper_arg.guardsize -= wincap.page_size ();
+ SetThreadStackGuarantee (&wrapper_arg.guardsize);
+ }
/* Initialize new _cygtls. */
_my_tls.init_thread (wrapper_arg.stackbase - CYGTLS_PADSIZE,
(DWORD (*)(void*, void*)) wrapper_arg.func);
@@ -541,7 +656,7 @@ thread_wrapper (PVOID arg)
#endif
#ifdef __x86_64__
__asm__ ("\n\
- movq %[WRAPPER_ARG], %%rbx # Load &wrapper_arg into rbx \n\
+ leaq %[WRAPPER_ARG], %%rbx # Load &wrapper_arg into rbx \n\
movq (%%rbx), %%r12 # Load thread func into r12 \n\
movq 8(%%rbx), %%r13 # Load thread arg into r13 \n\
movq 16(%%rbx), %%rcx # Load stackaddr into rcx \n\
@@ -561,11 +676,11 @@ thread_wrapper (PVOID arg)
# register r13 and then just call the function. \n\
movq %%r13, %%rcx # Move thread arg to 1st arg reg\n\
call *%%r12 # Call thread func \n"
- : : [WRAPPER_ARG] "r" (&wrapper_arg),
+ : : [WRAPPER_ARG] "o" (wrapper_arg),
[CYGTLS] "i" (CYGTLS_PADSIZE));
#else
__asm__ ("\n\
- movl %[WRAPPER_ARG], %%ebx # Load &wrapper_arg into ebx \n\
+ leal %[WRAPPER_ARG], %%ebx # Load &wrapper_arg into ebx \n\
movl (%%ebx), %%eax # Load thread func into eax \n\
movl 4(%%ebx), %%ecx # Load thread arg into ecx \n\
movl 8(%%ebx), %%edx # Load stackaddr into edx \n\
@@ -592,11 +707,12 @@ thread_wrapper (PVOID arg)
# stack in the expected spot. \n\
popl %%eax # Pop thread_func address \n\
call *%%eax # Call thread func \n"
- : : [WRAPPER_ARG] "r" (&wrapper_arg),
+ : : [WRAPPER_ARG] "o" (wrapper_arg),
[CYGTLS] "i" (CYGTLS_PADSIZE));
#endif
- /* Never return from here. */
- ExitThread (0);
+ /* pthread::thread_init_wrapper calls pthread::exit, which
+ in turn calls ExitThread, so we should never arrive here. */
+ api_fatal ("Dumb thinko in pthread handling. Whip the developer.");
}
#ifdef __x86_64__
@@ -660,6 +776,49 @@ public:
};
thread_allocator thr_alloc NO_COPY;
+
+/* Just set up a system-like main thread stack from the pthread stack area
+ maintained by the thr_alloc class. See the description in the x86_64-only
+ code in _dll_crt0 to understand why we have to do this. */
+PVOID
+create_new_main_thread_stack (PVOID &allocationbase, SIZE_T parent_commitsize)
+{
+ PIMAGE_DOS_HEADER dosheader;
+ PIMAGE_NT_HEADERS ntheader;
+ SIZE_T stacksize;
+ ULONG guardsize;
+ SIZE_T commitsize;
+ PBYTE stacklimit;
+
+ dosheader = (PIMAGE_DOS_HEADER) GetModuleHandle (NULL);
+ ntheader = (PIMAGE_NT_HEADERS)
+ ((PBYTE) dosheader + dosheader->e_lfanew);
+ stacksize = ntheader->OptionalHeader.SizeOfStackReserve;
+ stacksize = roundup2 (stacksize, wincap.allocation_granularity ());
+
+ allocationbase
+ = thr_alloc.alloc (ntheader->OptionalHeader.SizeOfStackReserve);
+ guardsize = wincap.def_guard_page_size ();
+ if (parent_commitsize)
+ commitsize = (SIZE_T) parent_commitsize;
+ else
+ commitsize = ntheader->OptionalHeader.SizeOfStackCommit;
+ commitsize = roundup2 (commitsize, wincap.page_size ());
+ if (commitsize > stacksize - guardsize - wincap.page_size ())
+ commitsize = stacksize - guardsize - wincap.page_size ();
+ stacklimit = (PBYTE) allocationbase + stacksize - commitsize - guardsize;
+ /* Setup guardpage. */
+ if (!VirtualAlloc (stacklimit, guardsize,
+ MEM_COMMIT, PAGE_READWRITE | PAGE_GUARD))
+ return NULL;
+ /* Setup committed region. */
+ stacklimit += guardsize;
+ if (!VirtualAlloc (stacklimit, commitsize, MEM_COMMIT, PAGE_READWRITE))
+ return NULL;
+ NtCurrentTeb()->Tib.StackBase = ((PBYTE) allocationbase + stacksize);
+ NtCurrentTeb()->Tib.StackLimit = stacklimit;
+ return ((PBYTE) allocationbase + stacksize - 16);
+}
#endif
HANDLE WINAPI
@@ -670,10 +829,10 @@ CygwinCreateThread (LPTHREAD_START_ROUTINE thread_func, PVOID thread_arg,
PVOID real_stackaddr = NULL;
ULONG real_stacksize = 0;
ULONG real_guardsize = 0;
- thread_wrapper_arg *wrapper_arg;
+ pthread_wrapper_arg *wrapper_arg;
HANDLE thread = NULL;
- wrapper_arg = (thread_wrapper_arg *) ccalloc (HEAP_STR, 1,
+ wrapper_arg = (pthread_wrapper_arg *) ccalloc (HEAP_STR, 1,
sizeof *wrapper_arg);
if (!wrapper_arg)
{
@@ -685,7 +844,8 @@ CygwinCreateThread (LPTHREAD_START_ROUTINE thread_func, PVOID thread_arg,
if (stackaddr)
{
- /* If the application provided the stack, just use it. */
+ /* If the application provided the stack, just use it. There won't
+ be any stack overflow handling! */
wrapper_arg->stackaddr = (PBYTE) stackaddr;
wrapper_arg->stackbase = (PBYTE) stackaddr + stacksize;
}
@@ -698,10 +858,8 @@ CygwinCreateThread (LPTHREAD_START_ROUTINE thread_func, PVOID thread_arg,
real_guardsize = roundup2 (guardsize, wincap.page_size ());
/* Add the guardsize to the stacksize */
real_stacksize += real_guardsize;
- /* If we use the default Windows guardpage method, we have to take
- the 2 pages dead zone into account. */
- if (real_guardsize == wincap.page_size ())
- real_stacksize += 2 * wincap.page_size ();
+ /* Take dead zone page into account, which always stays uncommited. */
+ real_stacksize += wincap.page_size ();
/* Now roundup the result to the next allocation boundary. */
real_stacksize = roundup2 (real_stacksize,
wincap.allocation_granularity ());
@@ -719,53 +877,70 @@ CygwinCreateThread (LPTHREAD_START_ROUTINE thread_func, PVOID thread_arg,
#endif
if (!real_stackaddr)
return NULL;
- /* Set up committed region. Two cases: */
- if (real_guardsize != wincap.page_size ())
+ /* Set up committed region. We have two cases: */
+ if (!wincap.has_set_thread_stack_guarantee ()
+ && real_guardsize != wincap.def_guard_page_size ())
{
- /* If guardsize is set to something other than the page size, we
- commit the entire stack and, if guardsize is > 0, we set up a
- POSIX guardpage. We don't set up a Windows guardpage. */
- if (!VirtualAlloc (real_stackaddr, real_guardsize, MEM_COMMIT,
- PAGE_NOACCESS))
+ /* If guardsize is set to something other than the default guard page
+ size, and if we're running on Windows XP 32 bit, we commit the
+ entire stack, and, if guardsize is > 0, set up a guard page. */
+ real_stacklimit = (PBYTE) real_stackaddr + wincap.page_size ();
+ if (real_guardsize
+ && !VirtualAlloc (real_stacklimit, real_guardsize, MEM_COMMIT,
+ PAGE_READWRITE | PAGE_GUARD))
goto err;
- real_stacklimit = (PBYTE) real_stackaddr + real_guardsize;
- if (!VirtualAlloc (real_stacklimit, real_stacksize - real_guardsize,
+ real_stacklimit += real_guardsize;
+ if (!VirtualAlloc (real_stacklimit, real_stacksize - real_guardsize
+ - wincap.page_size (),
MEM_COMMIT, PAGE_READWRITE))
goto err;
}
else
{
- /* If guardsize is exactly the page_size, we can assume that the
- application will behave Windows conformant in terms of stack usage.
- We can especially assume that it never allocates more than one
- page at a time (alloca/_chkstk). Therefore, this is the default
- case which allows a Windows compatible stack setup with a
- reserved region, a guard page, and a commited region. We don't
- need to set up a POSIX guardpage since Windows already handles
- stack overflow: Trying to extend the stack into the last three
- pages of the stack results in a SEGV.
- We always commit 64K here, starting with the guardpage. */
+ /* Otherwise we set up the stack like the OS does, with a reserved
+ region, the guard pages, and a commited region. We commit the
+ stack commit size from the executable header, but at least
+ PTHREAD_STACK_MIN (64K). */
+ static ULONG exe_commitsize;
+
+ if (!exe_commitsize)
+ {
+ PIMAGE_DOS_HEADER dosheader;
+ PIMAGE_NT_HEADERS ntheader;
+
+ dosheader = (PIMAGE_DOS_HEADER) GetModuleHandle (NULL);
+ ntheader = (PIMAGE_NT_HEADERS)
+ ((PBYTE) dosheader + dosheader->e_lfanew);
+ exe_commitsize = ntheader->OptionalHeader.SizeOfStackCommit;
+ exe_commitsize = roundup2 (exe_commitsize, wincap.page_size ());
+ }
+ ULONG commitsize = exe_commitsize;
+ if (commitsize > real_stacksize - real_guardsize
+ - wincap.page_size ())
+ commitsize = real_stacksize - real_guardsize - wincap.page_size ();
+ else if (commitsize < PTHREAD_STACK_MIN)
+ commitsize = PTHREAD_STACK_MIN;
real_stacklimit = (PBYTE) real_stackaddr + real_stacksize
- - wincap.allocation_granularity ();
- if (!VirtualAlloc (real_stacklimit, wincap.page_size (), MEM_COMMIT,
- PAGE_READWRITE | PAGE_GUARD))
+ - commitsize - real_guardsize;
+ if (!VirtualAlloc (real_stacklimit, real_guardsize,
+ MEM_COMMIT, PAGE_READWRITE | PAGE_GUARD))
goto err;
- real_stacklimit += wincap.page_size ();
- if (!VirtualAlloc (real_stacklimit, wincap.allocation_granularity ()
- - wincap.page_size (), MEM_COMMIT,
+ real_stacklimit += real_guardsize;
+ if (!VirtualAlloc (real_stacklimit, commitsize, MEM_COMMIT,
PAGE_READWRITE))
goto err;
}
wrapper_arg->stackaddr = (PBYTE) real_stackaddr;
wrapper_arg->stackbase = (PBYTE) real_stackaddr + real_stacksize;
wrapper_arg->stacklimit = real_stacklimit;
+ wrapper_arg->guardsize = real_guardsize;
}
/* Use the STACK_SIZE_PARAM_IS_A_RESERVATION parameter so only the
minimum size for a thread stack is reserved by the OS. Note that we
reserve a 256K stack, not 64K, otherwise the thread creation might
crash the process due to a stack overflow. */
thread = CreateThread (&sec_none_nih, 4 * PTHREAD_STACK_MIN,
- thread_wrapper, wrapper_arg,
+ pthread_wrapper, wrapper_arg,
creation_flags | STACK_SIZE_PARAM_IS_A_RESERVATION,
thread_id);
@@ -782,23 +957,178 @@ err:
}
#ifdef __x86_64__
-// TODO: The equivalent newlib functions only work for SYSV ABI so far.
-#undef RtlFillMemory
-#undef RtlCopyMemory
-extern "C" void NTAPI RtlFillMemory (PVOID, SIZE_T, BYTE);
-extern "C" void NTAPI RtlCopyMemory (PVOID, const VOID *, SIZE_T);
-
-extern "C" void *
-memset (void *s, int c, size_t n)
-{
- RtlFillMemory (s, n, c);
- return s;
-}
-
-extern "C" void *
-memcpy(void *dest, const void *src, size_t n)
-{
- RtlCopyMemory (dest, src, n);
- return dest;
-}
+/* These functions are almost verbatim FreeBSD code (even if the header of
+ one file mentiones NetBSD), just wrapped in the minimum required code to
+ make them work with the MS AMD64 ABI.
+ See FreeBSD src/lib/libc/amd64/string/memset.S
+ and FreeBSD src/lib/libc/amd64/string/bcopy.S */
+
+asm volatile (" \n\
+/* \n\
+ * Written by J.T. Conklin <jtc@NetBSD.org>. \n\
+ * Public domain. \n\
+ * Adapted for NetBSD/x86_64 by \n\
+ * Frank van der Linden <fvdl@wasabisystems.com> \n\
+ */ \n\
+ \n\
+ .globl memset \n\
+ .seh_proc memset \n\
+memset: \n\
+ movq %rsi,8(%rsp) \n\
+ movq %rdi,16(%rsp) \n\
+ .seh_endprologue \n\
+ movq %rcx,%rdi \n\
+ movq %rdx,%rsi \n\
+ movq %r8,%rdx \n\
+ \n\
+ movq %rsi,%rax \n\
+ andq $0xff,%rax \n\
+ movq %rdx,%rcx \n\
+ movq %rdi,%r11 \n\
+ \n\
+ cld /* set fill direction forward */ \n\
+ \n\
+ /* if the string is too short, it's really not worth the \n\
+ * overhead of aligning to word boundries, etc. So we jump to \n\
+ * a plain unaligned set. */ \n\
+ cmpq $0x0f,%rcx \n\
+ jle L1 \n\
+ \n\
+ movb %al,%ah /* copy char to all bytes in word */\n\
+ movl %eax,%edx \n\
+ sall $16,%eax \n\
+ orl %edx,%eax \n\
+ \n\
+ movl %eax,%edx \n\
+ salq $32,%rax \n\
+ orq %rdx,%rax \n\
+ \n\
+ movq %rdi,%rdx /* compute misalignment */ \n\
+ negq %rdx \n\
+ andq $7,%rdx \n\
+ movq %rcx,%r8 \n\
+ subq %rdx,%r8 \n\
+ \n\
+ movq %rdx,%rcx /* set until word aligned */ \n\
+ rep \n\
+ stosb \n\
+ \n\
+ movq %r8,%rcx \n\
+ shrq $3,%rcx /* set by words */ \n\
+ rep \n\
+ stosq \n\
+ \n\
+ movq %r8,%rcx /* set remainder by bytes */ \n\
+ andq $7,%rcx \n\
+L1: rep \n\
+ stosb \n\
+ movq %r11,%rax \n\
+ \n\
+ movq 8(%rsp),%rsi \n\
+ movq 16(%rsp),%rdi \n\
+ ret \n\
+ .seh_endproc \n\
+");
+
+asm volatile (" \n\
+/*- \n\
+ * Copyright (c) 1990 The Regents of the University of California. \n\
+ * All rights reserved. \n\
+ * \n\
+ * This code is derived from locore.s. \n\
+ * \n\
+ * Redistribution and use in source and binary forms, with or without \n\
+ * modification, are permitted provided that the following conditions \n\
+ * are met: \n\
+ * 1. Redistributions of source code must retain the above copyright \n\
+ * notice, this list of conditions and the following disclaimer. \n\
+ * 2. Redistributions in binary form must reproduce the above copyright \n\
+ * notice, this list of conditions and the following disclaimer in \n\
+ * the documentation and/or other materials provided with the \n\
+ * distribution. \n\
+ * 3. Neither the name of the University nor the names of its \n\
+ * contributors may be used to endorse or promote products derived \n\
+ * from this software without specific prior written permission. \n\
+ * \n\
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' \n\
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,\n\
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A \n\
+ * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR \n\
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,\n\
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, \n\
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR \n\
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY \n\
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT \n\
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE \n\
+ * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH \n\
+ * DAMAGE. \n\
+ */ \n\
+ \n\
+ .globl memmove \n\
+ .seh_proc memmove \n\
+memmove: \n\
+ .seh_endprologue \n\
+ nop /* FALLTHRU */ \n\
+ .seh_endproc \n\
+ \n\
+ .globl memcpy \n\
+ .seh_proc memcpy \n\
+memcpy: \n\
+ movq %rsi,8(%rsp) \n\
+ movq %rdi,16(%rsp) \n\
+ .seh_endprologue \n\
+ movq %rcx,%rdi \n\
+ movq %rdx,%rsi \n\
+ movq %r8,%rdx \n\
+ \n\
+ movq %rdi,%rax /* return dst */ \n\
+ movq %rdx,%rcx \n\
+ movq %rdi,%r8 \n\
+ subq %rsi,%r8 \n\
+ cmpq %rcx,%r8 /* overlapping? */ \n\
+ jb 1f \n\
+ cld /* nope, copy forwards. */ \n\
+ shrq $3,%rcx /* copy by words */ \n\
+ rep movsq \n\
+ movq %rdx,%rcx \n\
+ andq $7,%rcx /* any bytes left? */ \n\
+ rep movsb \n\
+ jmp 2f \n\
+1: \n\
+ addq %rcx,%rdi /* copy backwards. */ \n\
+ addq %rcx,%rsi \n\
+ std \n\
+ andq $7,%rcx /* any fractional bytes? */ \n\
+ decq %rdi \n\
+ decq %rsi \n\
+ rep movsb \n\
+ movq %rdx,%rcx /* copy remainder by words */ \n\
+ shrq $3,%rcx \n\
+ subq $7,%rsi \n\
+ subq $7,%rdi \n\
+ rep movsq \n\
+ cld \n\
+2: \n\
+ movq 8(%rsp),%rsi \n\
+ movq 16(%rsp),%rdi \n\
+ ret \n\
+ .seh_endproc \n\
+");
+
+asm volatile (" \n\
+ .globl wmemmove \n\
+ .seh_proc wmemmove \n\
+wmemmove: \n\
+ .seh_endprologue \n\
+ nop /* FALLTHRU */ \n\
+ .seh_endproc \n\
+ \n\
+ .globl wmemcpy \n\
+ .seh_proc wmemcpy \n\
+wmemcpy: \n\
+ .seh_endprologue \n\
+ shlq $1,%r8 /* cnt * sizeof (wchar_t) */ \n\
+ jmp memcpy \n\
+ .seh_endproc \n\
+");
#endif
diff --git a/winsup/cygwin/miscfuncs.h b/winsup/cygwin/miscfuncs.h
index bc36a1987..a885dcf19 100644
--- a/winsup/cygwin/miscfuncs.h
+++ b/winsup/cygwin/miscfuncs.h
@@ -1,8 +1,5 @@
/* miscfuncs.h: main Cygwin header file.
- Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008, 2009, 2010, 2011, 2012, 2013 Red Hat, Inc.
-
This file is part of Cygwin.
This software is a copyrighted work licensed under the terms of the
@@ -11,6 +8,12 @@ details. */
#ifndef _MISCFUNCS_H
#define _MISCFUNCS_H
+
+#define likely(X) __builtin_expect (!!(X), 1)
+#define unlikely(X) __builtin_expect (!!(X), 0)
+
+extern "C" int getentropy (void *ptr, size_t len);
+
int __reg1 winprio_to_nice (DWORD);
DWORD __reg1 nice_to_winprio (int &);
@@ -23,10 +26,33 @@ BOOL WINAPI ReadPipeOverlapped (HANDLE h, PVOID buf, DWORD len,
BOOL WINAPI WritePipeOverlapped (HANDLE h, LPCVOID buf, DWORD len,
LPDWORD ret_len, DWORD timeout);
+/* class for per-line reading using native functions. The caller provides
+ the file as an POBJECT_ATTRIBUTES, and the buffer space. */
+class NT_readline
+{
+ HANDLE fh;
+ PCHAR buf;
+ PCHAR got;
+ PCHAR end;
+ ULONG buflen;
+ ULONG len;
+ ULONG line;
+public:
+ NT_readline () : fh (NULL) {}
+ bool init (POBJECT_ATTRIBUTES attr, char *buf, ULONG buflen);
+ PCHAR gets ();
+ void close () { if (fh) NtClose (fh); fh = NULL; }
+ ~NT_readline () { close (); }
+};
+
extern "C" void yield ();
#define import_address(x) __import_address ((void *)(x))
void * __reg1 __import_address (void *);
+
+#define caller_return_address() \
+ __caller_return_address (__builtin_return_address (0))
+void * __reg1 __caller_return_address (void *);
void backslashify (const char *, char *, bool);
void slashify (const char *, char *, bool);
@@ -47,6 +73,12 @@ ssize_t __reg3 check_iovec (const struct iovec *, int, bool);
#define check_iovec_for_read(a, b) check_iovec ((a), (b), false)
#define check_iovec_for_write(a, b) check_iovec ((a), (b), true)
+#ifdef __x86_64__
+extern PVOID create_new_main_thread_stack (PVOID &allocationbase,
+ SIZE_T parent_commitsize);
+#endif
+
+extern "C" DWORD WINAPI pthread_wrapper (PVOID arg);
extern "C" HANDLE WINAPI CygwinCreateThread (LPTHREAD_START_ROUTINE thread_func,
PVOID thread_arg, PVOID stackaddr,
ULONG stacksize, ULONG guardsize,
diff --git a/winsup/cygwin/mkglobals_h b/winsup/cygwin/mkglobals_h
index ea4a582f4..2d185f2e8 100755
--- a/winsup/cygwin/mkglobals_h
+++ b/winsup/cygwin/mkglobals_h
@@ -1,6 +1,7 @@
#!/usr/bin/perl
my @argv = @ARGV;
$_ = join('', <>);
+s/\s+\n/\n/sog;
s/\n[^\n]*!globals.h[^\n]*\n/\n/sog;
s%/\*.*?\*/%%sog;
s/(enum\s.*?{.*?})/munge($1)/soge;
@@ -12,7 +13,6 @@ s/^\n+//sog;
s/#include "winsup\.h"\n//so;
s/-NL-/\n/sog;
s/-EQ-/=/sog;
-s/\s+\n/\n/sog;
s/\n{2,}/\n/sog;
print <<PRELUDE,$_;
/* $target - Autogenerated from @argv. Look there for comments. */
diff --git a/winsup/cygwin/mkvers.sh b/winsup/cygwin/mkvers.sh
index 93912e720..7e763e0f9 100755
--- a/winsup/cygwin/mkvers.sh
+++ b/winsup/cygwin/mkvers.sh
@@ -1,9 +1,6 @@
#!/bin/sh
# mkvers.sh - Make version information for cygwin DLL
#
-# Copyright 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2010, 2012 Red Hat,
-# Inc.
-#
# This file is part of Cygwin.
#
# This software is a copyrighted work licensed under the terms of the
@@ -21,22 +18,43 @@ windres="$1"; shift
iflags=
# Find header file locations
while [ -n "$*" ]; do
- case "$1" in
- -I*)
- iflags="$iflags $1"
- ;;
- -idirafter)
- shift
- iflags="$iflags -I$1"
- ;;
- esac
+ case "$1" in
+ -I*)
+ iflags="$iflags $1"
+ ;;
+ -idirafter)
shift
+ iflags="$iflags -I$1"
+ ;;
+ esac
+ shift
done
[ -r $incfile ] || {
- echo "**** Couldn't open file '$incfile'. Aborting."
+ echo "**** Couldn't open file '$incfile'. Aborting."
}
+function parse_preproc_flags() {
+ # Since we're manually specifying the preprocessor, pass the default flags
+ # normally defined.
+ ccflags="--preprocessor=$1 --preprocessor-arg=-E \
+ --preprocessor-arg=-xc-header --define=RC_INVOKED "
+ shift
+ while [ -n "$*" ]; do
+ case "$1" in
+ # We need to be able to find the just-built cc1 binary.
+ -B*)
+ ccflags="$ccflags --preprocessor-arg=$1"
+ ;;
+ esac
+ shift
+ done
+}
+
+parse_preproc_flags $CC
+
+
+
#
# Load the current date so we can work on individual fields
#
@@ -68,15 +86,15 @@ EOF
#
# Split version file into dir and filename components
#
-dir=`dirname $incfile`
-fn=`basename $incfile`
+dir=$(dirname $incfile)
+fn=$(basename $incfile)
#
# Look in the include file CVS directory for a CVS Tag file. This file,
# if it exists, will contain the name of the sticky tag associated with
# the current build. Save that for output later.
#
-cvs_tag="`sed -e '/dontuse/d' -e 's%^.\(.*\)%\1%' $dir/CVS/Tag 2>/dev/null`"
+cvs_tag="$(sed -e '/dontuse/d' -e 's%^.\(.*\)%\1%' $dir/CVS/Tag 2>/dev/null)"
wv_cvs_tag="$cvs_tag"
[ -n "$cvs_tag" ] && cvs_tag=" CVS tag"'
@@ -85,14 +103,14 @@ wv_cvs_tag="$cvs_tag"
#
# Look in the source directory containing the include/cygwin/version.h
# and set dir accordingly.
-dir=`echo $dir | sed -e 's%/include/cygwin.*$%%' -e 's%include/cygwin.*$%.%'`
+dir=$(echo $dir | sed -e 's%/include/cygwin.*$%%' -e 's%include/cygwin.*$%.%')
# Look in $dir for a a ".snapshot-date" file. If one is found then this
# information will be saved for output to the DLL.
#
if [ -r "$dir/.snapshot-date" ]; then
- read snapshotdate < "$dir/.snapshot-date"
- snapshot="snapshot date
+ read snapshotdate < "$dir/.snapshot-date"
+ snapshot="snapshot date
$snapshotdate"
fi
@@ -105,11 +123,13 @@ fi
# These strings are strictly for use by a user to scan the DLL for
# interesting information.
#
-(sed -n -e 's%#define CYGWIN_INFO_\([A-Z_]*\)[ ][ ]*\([a-zA-Z0-9"][^/]*\).*%_\1\
+(
+ sed -n -e 's%#define CYGWIN_INFO_\([A-Z_]*\)[ ][ ]*\([a-zA-Z0-9"][^/]*\).*%_\1\
\2%p' -e 's%#define CYGWIN_VERSION_\([A-Z_]*\)[ ][ ]*\([a-zA-Z0-9"][^/]*\).*%_\1\
\2%p' $incfile | sed -e 's/["\\]//g' -e '/^_/y/ABCDEFGHIJKLMNOPQRSTUVWXYZ_/abcdefghijklmnopqrstuvwxyz /';
-echo ' build date'; echo $build_date; [ -n "$cvs_tag" ] && echo "$cvs_tag";\
-[ -n "$snapshot" ] && echo "$snapshot"
+ echo ' build date'; echo $build_date;
+ [ -n "$cvs_tag" ] && echo "$cvs_tag";
+ [ -n "$snapshot" ] && echo "$snapshot"
) | while read var; do
read val
cat <<EOF
@@ -120,7 +140,7 @@ done | tee /tmp/mkvers.$$ 1>&9
trap "rm -f /tmp/mkvers.$$" 0 1 2 15
if [ -n "$snapshotdate" ]; then
- usedate="`echo $snapshotdate | sed 's/-\\(..:..[^-]*\\).*$/ \1SNP/'`"
+ usedate="$(echo $snapshotdate | sed 's/-\\(..:..[^-]*\\).*$/ \1SNP/')"
else
usedate="$builddate"
fi
@@ -155,15 +175,21 @@ EOF
# Generate winver.o using cygwin/version.h information.
# Turn the cygwin major number from some large number to something like 1.1.0.
#
-eval `sed -n 's/^.*dll \(m[ai][jn]or\): \([0-9]*\)[^0-9]*$/\1=\2/p' /tmp/mkvers.$$`
-cygverhigh=`expr $major / 1000`
-cygverlow=`expr $major % 1000`
+eval $(sed -n 's/^.*dll \(m[ai][jn]or\): \([0-9]*\)[^0-9]*$/\1=\2/p' /tmp/mkvers.$$)
+cygverhigh=$(expr $major / 1000)
+cygverlow=$(expr $major % 1000)
cygwin_ver="$cygverhigh.$cygverlow.$minor"
-if [ -n "$cvs_tag" ]; then
- cvs_tag="`echo $wv_cvs_tag | sed -e 's/-branch.*//'`"
- cygwin_ver="$cygwin_ver-$cvs_tag"
+if [ -n "$cvs_tag" ]
+then
+ cvs_tag="$(echo $wv_cvs_tag | sed -e 's/-branch.*//')"
+ cygwin_ver="$cygwin_ver-$cvs_tag"
fi
echo "Version $cygwin_ver"
set -$- $builddate
-$windres $iflags --define CYGWIN_BUILD_DATE="$1" --define CYGWIN_BUILD_TIME="$2" --define CYGWIN_VERSION='"'"$cygwin_ver"'"' $rcfile winver.o
+$windres $iflags $ccflags \
+ --define CYGWIN_BUILD_DATE="$1" \
+ --define CYGWIN_BUILD_TIME="$2" \
+ --define CYGWIN_BUILD_YEAR=$y \
+ --define CYGWIN_VERSION='"'"$cygwin_ver"'"' \
+ $rcfile winver.o
diff --git a/winsup/cygwin/mmap.cc b/winsup/cygwin/mmap.cc
index c68d4195e..462e6c3b7 100644
--- a/winsup/cygwin/mmap.cc
+++ b/winsup/cygwin/mmap.cc
@@ -1,8 +1,5 @@
/* mmap.cc
- Copyright 1996, 1997, 1998, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007,
- 2008, 2009, 2010, 2011, 2012, 2013 Red Hat, Inc.
-
This file is part of Cygwin.
This software is a copyrighted work licensed under the terms of the
@@ -272,7 +269,7 @@ class mmap_record
DWORD page_map[0];
public:
- mmap_record (int nfd, HANDLE h, DWORD of, int p, int f, off_t o, DWORD l,
+ mmap_record (int nfd, HANDLE h, DWORD of, int p, int f, off_t o, SIZE_T l,
caddr_t b) :
mapping_hdl (h),
len (l),
@@ -309,9 +306,9 @@ class mmap_record
void init_page_map (mmap_record &r);
- DWORD find_unused_pages (DWORD pages) const;
- bool match (caddr_t addr, SIZE_T len, caddr_t &m_addr, DWORD &m_len);
- off_t map_pages (off_t off, SIZE_T len);
+ SIZE_T find_unused_pages (SIZE_T pages) const;
+ bool match (caddr_t addr, SIZE_T len, caddr_t &m_addr, SIZE_T &m_len);
+ off_t map_pages (SIZE_T len);
bool map_pages (caddr_t addr, SIZE_T len);
bool unmap_pages (caddr_t addr, SIZE_T len);
int access (caddr_t address);
@@ -368,29 +365,29 @@ mmap_record::compatible_flags (int fl) const
return (get_flags () & MAP_COMPATMASK) == (fl & MAP_COMPATMASK);
}
-DWORD
-mmap_record::find_unused_pages (DWORD pages) const
+SIZE_T
+mmap_record::find_unused_pages (SIZE_T pages) const
{
- DWORD mapped_pages = PAGE_CNT (get_len ());
- DWORD start;
+ SIZE_T mapped_pages = PAGE_CNT (get_len ());
+ SIZE_T start;
if (pages > mapped_pages)
- return (DWORD)-1;
+ return (SIZE_T) -1;
for (start = 0; start <= mapped_pages - pages; ++start)
if (!MAP_ISSET (start))
{
- DWORD cnt;
+ SIZE_T cnt;
for (cnt = 0; cnt < pages; ++cnt)
if (MAP_ISSET (start + cnt))
break;
if (cnt >= pages)
return start;
}
- return (DWORD)-1;
+ return (SIZE_T) -1;
}
bool
-mmap_record::match (caddr_t addr, SIZE_T len, caddr_t &m_addr, DWORD &m_len)
+mmap_record::match (caddr_t addr, SIZE_T len, caddr_t &m_addr, SIZE_T &m_len)
{
caddr_t low = (addr >= get_address ()) ? addr : get_address ();
caddr_t high = get_address ();
@@ -427,25 +424,26 @@ mmap_record::init_page_map (mmap_record &r)
}
off_t
-mmap_record::map_pages (off_t off, SIZE_T len)
+mmap_record::map_pages (SIZE_T len)
{
/* Used ONLY if this mapping matches into the chunk of another already
performed mapping in a special case of MAP_ANON|MAP_PRIVATE.
Otherwise it's job is now done by init_page_map(). */
DWORD old_prot;
- debug_printf ("map_pages (fd=%d, off=%Y, len=%lu)", get_fd (), off, len);
+ debug_printf ("map_pages (fd=%d, len=%lu)", get_fd (), len);
len = PAGE_CNT (len);
- if ((off = find_unused_pages (len)) == (DWORD)-1)
- return 0L;
+ off_t off = find_unused_pages (len);
+ if (off == (off_t) -1)
+ return (off_t) 0;
if (!noreserve ()
&& !VirtualProtect (get_address () + off * wincap.page_size (),
len * wincap.page_size (), gen_protect (),
&old_prot))
{
__seterrno ();
- return (off_t)-1;
+ return (off_t) -1;
}
while (len-- > 0)
@@ -458,11 +456,11 @@ mmap_record::map_pages (caddr_t addr, SIZE_T len)
{
debug_printf ("map_pages (addr=%p, len=%lu)", addr, len);
DWORD old_prot;
- DWORD off = addr - get_address ();
+ off_t off = addr - get_address ();
off /= wincap.page_size ();
len = PAGE_CNT (len);
/* First check if the area is unused right now. */
- for (DWORD l = 0; l < len; ++l)
+ for (SIZE_T l = 0; l < len; ++l)
if (MAP_ISSET (off + l))
{
set_errno (EINVAL);
@@ -485,7 +483,7 @@ bool
mmap_record::unmap_pages (caddr_t addr, SIZE_T len)
{
DWORD old_prot;
- DWORD off = addr - get_address ();
+ SIZE_T off = addr - get_address ();
if (noreserve ()
&& !VirtualFree (get_address () + off, len, MEM_DECOMMIT))
debug_printf ("VirtualFree in unmap_pages () failed, %E");
@@ -510,7 +508,7 @@ mmap_record::access (caddr_t address)
{
if (address < get_address () || address >= get_address () + get_len ())
return 0;
- DWORD off = (address - get_address ()) / wincap.page_size ();
+ SIZE_T off = (address - get_address ()) / wincap.page_size ();
return MAP_ISSET (off);
}
@@ -594,11 +592,11 @@ mmap_list::try_map (void *addr, size_t len, int flags, off_t off)
chunk of another already performed mapping. */
SIZE_T plen = PAGE_CNT (len);
LIST_FOREACH (rec, &recs, mr_next)
- if (rec->find_unused_pages (plen) != (DWORD) -1)
+ if (rec->find_unused_pages (plen) != (SIZE_T) -1)
break;
if (rec && rec->compatible_flags (flags))
{
- if ((off = rec->map_pages (off, len)) == (off_t) -1)
+ if ((off = rec->map_pages (len)) == (off_t) -1)
return (caddr_t) MAP_FAILED;
return (caddr_t) rec->get_address () + off;
}
@@ -609,7 +607,7 @@ mmap_list::try_map (void *addr, size_t len, int flags, off_t off)
unmapped part of an still active mapping. This can happen
if a memory region is unmapped and remapped with MAP_FIXED. */
caddr_t u_addr;
- DWORD u_len;
+ SIZE_T u_len;
LIST_FOREACH (rec, &recs, mr_next)
if (rec->match ((caddr_t) addr, len, u_addr, u_len))
@@ -686,7 +684,7 @@ is_mmapped_region (caddr_t start_addr, caddr_t end_address)
mmap_record *rec;
caddr_t u_addr;
- DWORD u_len;
+ SIZE_T u_len;
bool ret = false;
LIST_FOREACH (rec, &map_list->recs, mr_next)
@@ -712,7 +710,7 @@ is_mmapped_region (caddr_t start_addr, caddr_t end_address)
Check if the address range is all within noreserve mmap regions. If so,
call VirtualAlloc to commit the pages and return MMAP_NORESERVE_COMMITED
on success. If the page has __PROT_ATTACH (SUSv3 memory protection
- extension), or if VirutalAlloc fails, return MMAP_RAISE_SIGBUS.
+ extension), or if VirtualAlloc fails, return MMAP_RAISE_SIGBUS.
Otherwise, return MMAP_NONE if the address range is not covered by an
attached or noreserve map.
@@ -738,7 +736,7 @@ mmap_is_attached_or_noreserve (void *addr, size_t len)
mmap_record *rec;
caddr_t u_addr;
- DWORD u_len;
+ SIZE_T u_len;
LIST_FOREACH (rec, &map_list->recs, mr_next)
{
@@ -901,7 +899,7 @@ mmap64 (void *addr, size_t len, int prot, int flags, int fd, off_t off)
caddr_t base = NULL;
struct stat st;
- DWORD pagesize = wincap.allocation_granularity ();
+ size_t pagesize = wincap.allocation_granularity ();
fh_anonymous.set_io_handle (INVALID_HANDLE_VALUE);
fh_anonymous.set_access (GENERIC_READ | GENERIC_WRITE | GENERIC_EXECUTE);
@@ -1262,14 +1260,13 @@ munmap (void *addr, size_t len)
LIST_LOCK ();
- /* Iterate through the map, unmap pages between addr and addr+len
- in all maps. */
+ /* Iterate over maps, unmap pages between addr and addr+len in all maps. */
mmap_list *map_list, *next_map_list;
LIST_FOREACH_SAFE (map_list, &mmapped_areas.lists, ml_next, next_map_list)
{
mmap_record *rec, *next_rec;
caddr_t u_addr;
- DWORD u_len;
+ SIZE_T u_len;
LIST_FOREACH_SAFE (rec, &map_list->recs, mr_next, next_rec)
{
@@ -1327,8 +1324,7 @@ msync (void *addr, size_t len, int flags)
len = roundup2 (len, wincap.allocation_granularity ());
#endif
- /* Iterate through the map, looking for the mmapped area.
- Error if not found. */
+ /* Iterate over maps, looking for the mmapped area. Error if not found. */
LIST_FOREACH (map_list, &mmapped_areas.lists, ml_next)
{
mmap_record *rec;
@@ -1337,7 +1333,7 @@ msync (void *addr, size_t len, int flags)
if (rec->access ((caddr_t) addr))
{
/* Check whole area given by len. */
- for (DWORD i = wincap.allocation_granularity ();
+ for (SIZE_T i = wincap.allocation_granularity ();
i < len;
i += wincap.allocation_granularity ())
if (!rec->access ((caddr_t) addr + i))
@@ -1385,14 +1381,13 @@ mprotect (void *addr, size_t len, int prot)
LIST_LOCK ();
- /* Iterate through the map, protect pages between addr and addr+len
- in all maps. */
+ /* Iterate over maps, protect pages between addr and addr+len in all maps. */
mmap_list *map_list;
LIST_FOREACH (map_list, &mmapped_areas.lists, ml_next)
{
mmap_record *rec;
caddr_t u_addr;
- DWORD u_len;
+ SIZE_T u_len;
LIST_FOREACH (rec, &map_list->recs, mr_next)
{
@@ -1534,35 +1529,111 @@ munlock (const void *addr, size_t len)
return ret;
}
+/* This is required until Mingw-w64 catches up with newer functions. */
+extern "C" WINAPI DWORD DiscardVirtualMemory (PVOID, SIZE_T);
+
extern "C" int
posix_madvise (void *addr, size_t len, int advice)
{
- int ret;
+ int ret = 0;
/* Check parameters. */
if (advice < POSIX_MADV_NORMAL || advice > POSIX_MADV_DONTNEED
|| !len)
- ret = EINVAL;
- else
{
- /* Check requested memory area. */
- MEMORY_BASIC_INFORMATION m;
- char *p = (char *) addr;
- char *endp = p + len;
- while (p < endp)
+ ret = EINVAL;
+ goto out;
+ }
+
+ /* Check requested memory area. */
+ MEMORY_BASIC_INFORMATION m;
+ char *p, *endp;
+
+ for (p = (char *) addr, endp = p + len;
+ p < endp;
+ p = (char *) m.BaseAddress + m.RegionSize)
+ {
+ if (!VirtualQuery (p, &m, sizeof m) || m.State == MEM_FREE)
{
- if (!VirtualQuery (p, &m, sizeof m) || m.State == MEM_FREE)
+ ret = ENOMEM;
+ break;
+ }
+ }
+ if (ret)
+ goto out;
+ switch (advice)
+ {
+ case POSIX_MADV_WILLNEED:
+ {
+ /* Align address and length values to page size. */
+ size_t pagesize = wincap.allocation_granularity ();
+ PVOID base = (PVOID) rounddown ((uintptr_t) addr, pagesize);
+ SIZE_T size = roundup2 (((uintptr_t) addr - (uintptr_t) base)
+ + len, pagesize);
+ WIN32_MEMORY_RANGE_ENTRY me = { base, size };
+ if (!PrefetchVirtualMemory (GetCurrentProcess (), 1, &me, 0)
+ && GetLastError () != ERROR_PROC_NOT_FOUND)
+ {
+ /* FIXME 2015-08-27: On W10 build 10240 under WOW64,
+ PrefetchVirtualMemory always returns ERROR_INVALID_PARAMETER
+ for some reason. If we're running on W10 WOW64, ignore this
+ error. This has been fixed in W10 1511. */
+ if (!wincap.has_broken_prefetchvm ()
+ || GetLastError () != ERROR_INVALID_PARAMETER)
+ ret = EINVAL;
+ }
+ }
+ break;
+ case POSIX_MADV_DONTNEED:
+ {
+ /* Align address and length values to page size. */
+ size_t pagesize = wincap.allocation_granularity ();
+ PVOID base = (PVOID) rounddown ((uintptr_t) addr, pagesize);
+ SIZE_T size = roundup2 (((uintptr_t) addr - (uintptr_t) base)
+ + len, pagesize);
+ DWORD err = DiscardVirtualMemory (base, size);
+ /* DiscardVirtualMemory is unfortunately pretty crippled:
+ On copy-on-write pages it returns ERROR_INVALID_PARAMETER, on
+ any file-backed memory map it returns ERROR_USER_MAPPED_FILE.
+ Since POSIX_MADV_DONTNEED is advisory only anyway, let them
+ slip through. */
+ switch (err)
+ {
+ case ERROR_PROC_NOT_FOUND:
+ case ERROR_USER_MAPPED_FILE:
+ case 0:
+ break;
+ case ERROR_INVALID_PARAMETER:
{
- ret = ENOMEM;
- break;
+ ret = EINVAL;
+ /* Check if the region contains copy-on-write pages.*/
+ for (p = (char *) addr, endp = p + len;
+ p < endp;
+ p = (char *) m.BaseAddress + m.RegionSize)
+ {
+ if (VirtualQuery (p, &m, sizeof m)
+ && m.State == MEM_COMMIT
+ && m.Protect
+ & (PAGE_EXECUTE_WRITECOPY | PAGE_WRITECOPY))
+ {
+ /* Yes, let this slip. */
+ ret = 0;
+ break;
+ }
+ }
}
- p = (char *) m.BaseAddress + m.RegionSize;
- }
- ret = 0;
+ break;
+ default:
+ ret = geterrno_from_win_error (err);
+ break;
+ }
+ }
+ break;
+ default:
+ break;
}
-
+out:
syscall_printf ("%d = posix_madvise(%p, %lu, %d)", ret, addr, len, advice);
- /* Eventually do nothing. */
- return 0;
+ return ret;
}
/*
@@ -1601,7 +1672,7 @@ fhandler_base::msync (HANDLE h, caddr_t addr, size_t len, int flags)
bool
fhandler_base::fixup_mmap_after_fork (HANDLE h, int prot, int flags,
- off_t offset, DWORD size,
+ off_t offset, SIZE_T size,
void *address)
{
set_errno (ENODEV);
@@ -1699,7 +1770,7 @@ fhandler_dev_zero::msync (HANDLE h, caddr_t addr, size_t len, int flags)
bool
fhandler_dev_zero::fixup_mmap_after_fork (HANDLE h, int prot, int flags,
- off_t offset, DWORD size,
+ off_t offset, SIZE_T size,
void *address)
{
/* Re-create the map */
@@ -1795,7 +1866,7 @@ fhandler_disk_file::msync (HANDLE h, caddr_t addr, size_t len, int flags)
bool
fhandler_disk_file::fixup_mmap_after_fork (HANDLE h, int prot, int flags,
- off_t offset, DWORD size,
+ off_t offset, SIZE_T size,
void *address)
{
/* Re-create the map */
@@ -1820,7 +1891,7 @@ fhandler_disk_file::fixup_mmap_after_fork (HANDLE h, int prot, int flags,
int __stdcall
fixup_mmaps_after_fork (HANDLE parent)
{
- /* Iterate through the map */
+ /* Iterate over maps */
mmap_list *map_list;
LIST_FOREACH (map_list, &mmapped_areas.lists, ml_next)
{
diff --git a/winsup/cygwin/mmap_helper.h b/winsup/cygwin/mmap_helper.h
index cd65461bd..645c5e3aa 100644
--- a/winsup/cygwin/mmap_helper.h
+++ b/winsup/cygwin/mmap_helper.h
@@ -1,7 +1,5 @@
/* mmap_helper.h
- Copyright 2006, 2011 Red Hat, Inc.
-
This file is part of Cygwin.
This software is a copyrighted work licensed under the terms of the
diff --git a/winsup/cygwin/mount.cc b/winsup/cygwin/mount.cc
index 0d943f727..9d74bd99e 100644
--- a/winsup/cygwin/mount.cc
+++ b/winsup/cygwin/mount.cc
@@ -1,8 +1,5 @@
/* mount.cc: mount handling.
- Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008, 2009, 2010, 2011, 2012 Red Hat, Inc.
-
This file is part of Cygwin.
This software is a copyrighted work licensed under the terms of the
@@ -14,10 +11,6 @@ details. */
#include <mntent.h>
#include <ctype.h>
#include <winioctl.h>
-#include <wingdi.h>
-#include <winuser.h>
-#include <winnetwk.h>
-#include <shlobj.h>
#include <cygwin/version.h>
#include "cygerrno.h"
#include "security.h"
@@ -181,17 +174,17 @@ fs_info::update (PUNICODE_STRING upath, HANDLE in_vol)
FILE_FS_VOLUME_INFORMATION ffvi;
WCHAR buf[NAME_MAX + 1];
} ffvi_buf;
+ UNICODE_STRING dir;
UNICODE_STRING fsname;
clear ();
+ /* Always caseinsensitive. We really just need access to the drive. */
+ InitializeObjectAttributes (&attr, upath, OBJ_CASE_INSENSITIVE, NULL, NULL);
if (in_vol)
vol = in_vol;
else
{
ULONG access = READ_CONTROL;
- /* Always caseinsensitive. We really just need access to the drive. */
- InitializeObjectAttributes (&attr, upath, OBJ_CASE_INSENSITIVE, NULL,
- NULL);
/* Note: Don't use the FILE_OPEN_REPARSE_POINT flag here. The reason
is that symlink_info::check relies on being able to open a handle
to the target of a volume mount point. */
@@ -209,7 +202,6 @@ fs_info::update (PUNICODE_STRING upath, HANDLE in_vol)
&& (attr.ObjectName->Length > 7 * sizeof (WCHAR)
|| status == STATUS_NO_MEDIA_IN_DEVICE))
{
- UNICODE_STRING dir;
RtlSplitUnicodePath (attr.ObjectName, &dir, NULL);
attr.ObjectName = &dir;
if (status == STATUS_NO_MEDIA_IN_DEVICE)
@@ -236,6 +228,33 @@ fs_info::update (PUNICODE_STRING upath, HANDLE in_vol)
uint32_t hash = 0;
if (NT_SUCCESS (status))
{
+ /* If the FS doesn't return a valid serial number (PrlSF is a candidate),
+ create reproducible serial number from path. We need this to create
+ a unique per-drive/share hash. */
+ if (ffvi_buf.ffvi.VolumeSerialNumber == 0)
+ {
+ UNICODE_STRING path_prefix;
+ WCHAR *p;
+
+ if (upath->Buffer[5] == L':' && upath->Buffer[6] == L'\\')
+ p = upath->Buffer + 6;
+ else
+ {
+ /* We're expecting an UNC path. Move p to the backslash after
+ "\??\UNC\server\share" or the trailing NUL. */
+ p = upath->Buffer + 7; /* Skip "\??\UNC" */
+ int bs_cnt = 0;
+
+ while (*++p)
+ if (*p == L'\\')
+ if (++bs_cnt > 1)
+ break;
+ }
+ RtlInitCountedUnicodeString (&path_prefix, upath->Buffer,
+ (p - upath->Buffer) * sizeof (WCHAR));
+ ffvi_buf.ffvi.VolumeSerialNumber = hash_path_name ((ino_t) 0,
+ &path_prefix);
+ }
fs_info *fsi = fsi_cache.search (&ffvi_buf.ffvi, hash);
if (fsi)
{
@@ -268,8 +287,8 @@ fs_info::update (PUNICODE_STRING upath, HANDLE in_vol)
NtClose (vol);
return false;
}
- flags (ffai_buf.ffai.FileSystemAttributes);
- name_len (ffai_buf.ffai.MaximumComponentNameLength);
+ flags (ffai_buf.ffai.FileSystemAttributes);
+ name_len (ffai_buf.ffai.MaximumComponentNameLength);
RtlInitCountedUnicodeString (&fsname, ffai_buf.ffai.FileSystemName,
ffai_buf.ffai.FileSystemNameLength);
if (is_remote_drive ())
@@ -374,7 +393,10 @@ fs_info::update (PUNICODE_STRING upath, HANDLE in_vol)
&& !is_unixfs (RtlEqualUnicodeString (&fsname, &ro_u_unixfs, FALSE))
/* AFSRDRFsd == Andrew File System. Doesn't support DOS attributes.
Only native symlinks are supported. */
- && !is_afs (RtlEqualUnicodeString (&fsname, &ro_u_afs, FALSE)))
+ && !is_afs (RtlEqualUnicodeString (&fsname, &ro_u_afs, FALSE))
+ /* PrlSF == Parallels Desktop File System. Has a bug in
+ FileNetworkOpenInformation, see below. */
+ && !is_prlfs (RtlEqualUnicodeString (&fsname, &ro_u_prlfs, FALSE)))
{
/* Known remote file system with buggy open calls. Further
explanation in fhandler.cc (fhandler_disk_file::open_fs). */
@@ -472,19 +494,19 @@ mount_info::create_root_entry (const PWCHAR root)
/* init: Initialize the mount table. */
void
-mount_info::init ()
+mount_info::init (bool user_init)
{
PWCHAR pathend;
WCHAR path[PATH_MAX];
pathend = wcpcpy (path, cygheap->installation_root);
- create_root_entry (path);
- pathend = wcpcpy (pathend, L"\\etc\\fstab");
+ if (!user_init)
+ create_root_entry (path);
- from_fstab (false, path, pathend);
- from_fstab (true, path, pathend);
+ pathend = wcpcpy (pathend, L"\\etc\\fstab");
+ from_fstab (user_init, path, pathend);
- if (!got_usr_bin || !got_usr_lib)
+ if (!user_init && (!got_usr_bin || !got_usr_lib))
{
char native[PATH_MAX];
if (root_idx < 0)
@@ -568,12 +590,10 @@ mount_item::build_win32 (char *dst, const char *src, unsigned *outflags, unsigne
int
mount_info::conv_to_win32_path (const char *src_path, char *dst, device& dev,
- unsigned *flags)
+ unsigned *flags, bool hide_cygwin_virtuals)
{
bool chroot_ok = !cygheap->root.exists ();
- MALLOC_CHECK;
-
dev = FH_FS;
*flags = 0;
@@ -597,6 +617,13 @@ mount_info::conv_to_win32_path (const char *src_path, char *dst, device& dev,
converting normalizex UNIX path to a DOS-style path, looking up the
appropriate drive in the mount table. */
+ if (hide_cygwin_virtuals)
+ {
+ dev = *fs_dev;
+ backslashify (src_path, dst, 0);
+ rc = 0;
+ goto out_no_chroot_check;
+ }
/* See if this is a cygwin "device" */
if (win32_device_name (src_path, dst, dev))
{
@@ -605,7 +632,6 @@ mount_info::conv_to_win32_path (const char *src_path, char *dst, device& dev,
goto out_no_chroot_check;
}
- MALLOC_CHECK;
/* If the path is on a network drive or a //./ resp. //?/ path prefix,
bypass the mount table. If it's // or //MACHINE, use the netdrive
device. */
@@ -715,7 +741,6 @@ mount_info::conv_to_win32_path (const char *src_path, char *dst, device& dev,
backslashify (src_path, dst + offset, 0);
}
out:
- MALLOC_CHECK;
if (chroot_ok || cygheap->root.ischroot_native (dst))
rc = 0;
else
@@ -762,14 +787,28 @@ mount_info::get_mounts_here (const char *parent_dir, int parent_dir_len,
/* cygdrive_posix_path: Build POSIX path used as the
mount point for cygdrives created when there is no other way to
- obtain a POSIX path from a Win32 one. */
+ obtain a POSIX path from a Win32 one.
+
+ Recognized flag values:
+ - 0x001: Add trailing slash.
+ - 0x200 == CCP_PROC_CYGDRIVE: Return /proc/cygdrive rather than actual
+ cygdrive prefix. */
void
-mount_info::cygdrive_posix_path (const char *src, char *dst, int trailing_slash_p)
+mount_info::cygdrive_posix_path (const char *src, char *dst, int flags)
{
- int len = cygdrive_len;
+ int len;
- memcpy (dst, cygdrive, len + 1);
+ if (flags & CCP_PROC_CYGDRIVE)
+ {
+ len = sizeof ("/proc/cygdrive/") - 1;
+ memcpy (dst, "/proc/cygdrive/", len + 1);
+ }
+ else
+ {
+ len = cygdrive_len;
+ memcpy (dst, cygdrive, len + 1);
+ }
/* Now finish the path off with the drive letter to be used.
The cygdrive prefix always ends with a trailing slash so
@@ -787,7 +826,7 @@ mount_info::cygdrive_posix_path (const char *src, char *dst, int trailing_slash_
n = 2;
strcpy (dst + len, src + n);
}
- slashify (dst, dst, trailing_slash_p);
+ slashify (dst, dst, !!(flags & 0x1));
}
int
@@ -826,7 +865,7 @@ mount_info::cygdrive_win32_path (const char *src, char *dst, int& unit)
/* src_path is a wide Win32 path. */
int
mount_info::conv_to_posix_path (PWCHAR src_path, char *posix_path,
- int keep_rel_p)
+ int ccp_flags)
{
bool changed = false;
if (!wcsncmp (src_path, L"\\\\?\\", 4))
@@ -841,7 +880,7 @@ mount_info::conv_to_posix_path (PWCHAR src_path, char *posix_path,
tmp_pathbuf tp;
char *buf = tp.c_get ();
sys_wcstombs (buf, NT_MAX_PATH, src_path);
- int ret = conv_to_posix_path (buf, posix_path, keep_rel_p);
+ int ret = conv_to_posix_path (buf, posix_path, ccp_flags);
if (changed)
src_path[0] = L'C';
return ret;
@@ -849,24 +888,23 @@ mount_info::conv_to_posix_path (PWCHAR src_path, char *posix_path,
int
mount_info::conv_to_posix_path (const char *src_path, char *posix_path,
- int keep_rel_p)
+ int ccp_flags)
{
int src_path_len = strlen (src_path);
- int relative_path_p = !isabspath (src_path);
- int trailing_slash_p;
+ int relative = !isabspath (src_path);
+ int append_slash;
if (src_path_len <= 1)
- trailing_slash_p = 0;
+ append_slash = 0;
else
{
const char *lastchar = src_path + src_path_len - 1;
- trailing_slash_p = isdirsep (*lastchar) && lastchar[-1] != ':';
+ append_slash = isdirsep (*lastchar)
+ && ((ccp_flags & __CCP_APP_SLASH) || lastchar[-1] != ':');
}
- debug_printf ("conv_to_posix_path (%s, %s, %s)", src_path,
- keep_rel_p ? "keep-rel" : "no-keep-rel",
- trailing_slash_p ? "add-slash" : "no-add-slash");
- MALLOC_CHECK;
+ debug_printf ("conv_to_posix_path (%s, 0x%x, %s)", src_path, ccp_flags,
+ append_slash ? "add-slash" : "no-add-slash");
if (src_path_len >= NT_MAX_PATH)
{
@@ -877,7 +915,7 @@ mount_info::conv_to_posix_path (const char *src_path, char *posix_path,
/* FIXME: For now, if the path is relative and it's supposed to stay
that way, skip mount table processing. */
- if (keep_rel_p && relative_path_p)
+ if ((ccp_flags & CCP_RELATIVE) && relative)
{
slashify (src_path, posix_path, 0);
debug_printf ("%s = conv_to_posix_path (%s)", posix_path, src_path);
@@ -894,81 +932,8 @@ mount_info::conv_to_posix_path (const char *src_path, char *posix_path,
return rc;
}
- int pathbuflen = tail - pathbuf;
- for (int i = 0; i < nmounts; ++i)
- {
- mount_item &mi = mount[native_sorted[i]];
- if (!path_prefix_p (mi.native_path, pathbuf, mi.native_pathlen,
- mi.flags & MOUNT_NOPOSIX))
- continue;
-
- if (cygheap->root.exists () && !cygheap->root.posix_ok (mi.posix_path))
- continue;
-
- /* SRC_PATH is in the mount table. */
- int nextchar;
- const char *p = pathbuf + mi.native_pathlen;
-
- if (!*p || !p[1])
- nextchar = 0;
- else if (isdirsep (*p))
- nextchar = -1;
- else
- nextchar = 1;
-
- int addslash = nextchar > 0 ? 1 : 0;
- if ((mi.posix_pathlen + (pathbuflen - mi.native_pathlen) + addslash) >= NT_MAX_PATH)
- return ENAMETOOLONG;
- strcpy (posix_path, mi.posix_path);
- if (addslash)
- strcat (posix_path, "/");
- if (nextchar)
- slashify (p,
- posix_path + addslash + (mi.posix_pathlen == 1 ? 0 : mi.posix_pathlen),
- trailing_slash_p);
-
- if (cygheap->root.exists ())
- {
- const char *p = cygheap->root.unchroot (posix_path);
- memmove (posix_path, p, strlen (p) + 1);
- }
- goto out;
- }
-
- if (!cygheap->root.exists ())
- /* nothing */;
- else if (!cygheap->root.ischroot_native (pathbuf))
- return ENOENT;
- else
- {
- const char *p = pathbuf + cygheap->root.native_length ();
- if (*p)
- slashify (p, posix_path, trailing_slash_p);
- else
- {
- posix_path[0] = '/';
- posix_path[1] = '\0';
- }
- goto out;
- }
-
- /* Not in the database. This should [theoretically] only happen if either
- the path begins with //, or / isn't mounted, or the path has a drive
- letter not covered by the mount table. If it's a relative path then the
- caller must want an absolute path (otherwise we would have returned
- above). So we always return an absolute path at this point. */
- if (isdrive (pathbuf))
- cygdrive_posix_path (pathbuf, posix_path, trailing_slash_p);
- else
- {
- /* The use of src_path and not pathbuf here is intentional.
- We couldn't translate the path, so just ensure no \'s are present. */
- slashify (src_path, posix_path, trailing_slash_p);
- }
-
-out:
+ slashify (pathbuf, posix_path, 0);
debug_printf ("%s = conv_to_posix_path (%s)", posix_path, src_path);
- MALLOC_CHECK;
return 0;
}
@@ -1143,6 +1108,8 @@ mount_info::from_fstab_line (char *line, bool user)
unsigned mount_flags = MOUNT_SYSTEM | MOUNT_BINARY;
if (!strcmp (fs_type, "cygdrive"))
mount_flags |= MOUNT_NOPOSIX;
+ if (!strcmp (fs_type, "usertemp"))
+ mount_flags |= MOUNT_IMMUTABLE;
if (!fstab_read_flags (&c, mount_flags, false))
return true;
if (mount_flags & MOUNT_BIND)
@@ -1167,6 +1134,22 @@ mount_info::from_fstab_line (char *line, bool user)
slashify (posix_path, cygdrive, 1);
cygdrive_len = strlen (cygdrive);
}
+ else if (!strcmp (fs_type, "usertemp"))
+ {
+ WCHAR tmp[PATH_MAX + 1];
+
+ if (GetTempPathW (PATH_MAX, tmp))
+ {
+ tmp_pathbuf tp;
+ char *mb_tmp = tp.c_get ();
+ sys_wcstombs (mb_tmp, PATH_MAX, tmp);
+
+ mount_flags |= MOUNT_USER_TEMP;
+ int res = mount_table->add_item (mb_tmp, posix_path, mount_flags);
+ if (res && get_errno () == EMFILE)
+ return false;
+ }
+ }
else
{
int res = mount_table->add_item (native_path, posix_path, mount_flags);
@@ -1181,9 +1164,9 @@ mount_info::from_fstab (bool user, WCHAR fstab[], PWCHAR fstab_end)
{
UNICODE_STRING upath;
OBJECT_ATTRIBUTES attr;
- IO_STATUS_BLOCK io;
- NTSTATUS status;
- HANDLE fh;
+ NT_readline rl;
+ tmp_pathbuf tp;
+ char *buf = tp.c_get ();
if (user)
{
@@ -1198,81 +1181,10 @@ mount_info::from_fstab (bool user, WCHAR fstab[], PWCHAR fstab_end)
RtlInitUnicodeString (&upath, fstab);
InitializeObjectAttributes (&attr, &upath, OBJ_CASE_INSENSITIVE, NULL, NULL);
debug_printf ("Try to read mounts from %W", fstab);
- status = NtOpenFile (&fh, SYNCHRONIZE | FILE_READ_DATA, &attr, &io,
- FILE_SHARE_VALID_FLAGS,
- FILE_SYNCHRONOUS_IO_NONALERT
- | FILE_OPEN_FOR_BACKUP_INTENT);
- if (!NT_SUCCESS (status))
- {
- debug_printf ("NtOpenFile(%S) failed, %y", &upath, status);
- return false;
- }
-
- char buf[NT_MAX_PATH];
- char *got = buf;
- DWORD len = 0;
- unsigned line = 1;
- /* Using buffer size - 2 leaves space to append two \0. */
- while (NT_SUCCESS (NtReadFile (fh, NULL, NULL, NULL, &io, got,
- (sizeof (buf) - 2) - (got - buf), NULL, NULL)))
- {
- char *end;
-
- len = io.Information;
- /* Set end marker. */
- got[len] = got[len + 1] = '\0';
- /* Set len to the absolute len of bytes in buf. */
- len += got - buf;
- /* Reset got to start reading at the start of the buffer again. */
- got = buf;
-retry:
- bool got_nl = false;
- while (got < buf + len && (end = strchr (got, '\n')))
- {
- got_nl = true;
- end[end[-1] == '\r' ? -1 : 0] = '\0';
- if (!from_fstab_line (got, user))
- goto done;
- got = end + 1;
- ++line;
- }
- if (len < (sizeof (buf) - 2))
+ if (rl.init (&attr, buf, NT_MAX_PATH))
+ while ((buf = rl.gets ()))
+ if (!from_fstab_line (buf, user))
break;
- /* Check if the buffer contained at least one \n. If not, the
- line length is > 32K. We don't take such long lines. Print
- a debug message and skip this line entirely. */
- if (!got_nl)
- {
- system_printf ("%W: Line %d too long, skipping...", fstab, line);
- while (NT_SUCCESS (NtReadFile (fh, NULL, NULL, NULL, &io, buf,
- (sizeof (buf) - 2), NULL, NULL)))
- {
- len = io.Information;
- buf[len] = buf[len + 1] = '\0';
- got = strchr (buf, '\n');
- if (got)
- {
- ++got;
- ++line;
- goto retry;
- }
- }
- got = buf;
- break;
- }
- /* We have to read once more. Move remaining bytes to the start of
- the buffer and reposition got so that it points to the end of
- the remaining bytes. */
- len = buf + len - got;
- memmove (buf, got, len);
- got = buf + len;
- buf[len] = buf[len + 1] = '\0';
- }
- /* Catch a last line without trailing \n. */
- if (got > buf)
- from_fstab_line (got, user);
-done:
- NtClose (fh);
return true;
}
@@ -1450,6 +1362,17 @@ mount_info::add_item (const char *native, const char *posix,
if (posix == NULL || !isabspath (posix) ||
is_unc_share (posix) || isdrive (posix))
posixerr = EINVAL;
+ else if (posix[0] == '/' && posix[1] == 0)
+ {
+ /* Special case hack for root, because the Cygnal
+ * version of normalize_posix_path
+ * doesn't handle this.
+ */
+ posixtail = posixtmp;
+ *posixtail++ = '/';
+ *posixtail = '\0';
+ posixerr = 0;
+ }
else
posixerr = normalize_posix_path (posix, posixtmp, posixtail);
@@ -1602,6 +1525,7 @@ fs_names_t fs_names[] = {
{ "nwfs", false },
{ "ncfsd", false },
{ "afs", false },
+ { "prlfs", false },
{ NULL, false }
};
@@ -1694,6 +1618,9 @@ fillout_mntent (const char *native_path, const char *posix_path, unsigned flags)
if (flags & (MOUNT_BIND))
strcat (_my_tls.locals.mnt_opts, (char *) ",bind");
+ if (flags & (MOUNT_USER_TEMP))
+ strcat (_my_tls.locals.mnt_opts, (char *) ",usertemp");
+
ret.mnt_opts = _my_tls.locals.mnt_opts;
ret.mnt_freq = 1;
@@ -1775,50 +1702,54 @@ mount (const char *win32_path, const char *posix_path, unsigned flags)
isn't really supported except from fstab? */
int res = -1;
- myfault efault;
- if (efault.faulted (EFAULT))
- /* errno set */;
- else if (!*posix_path)
- set_errno (EINVAL);
- else if (strpbrk (posix_path, "\\:"))
- set_errno (EINVAL);
- else if (flags & MOUNT_CYGDRIVE) /* normal mount */
+ __try
{
- /* When flags include MOUNT_CYGDRIVE, take this to mean that
- we actually want to change the cygdrive prefix and flags
- without actually mounting anything. */
- res = mount_table->write_cygdrive_info (posix_path, flags);
- win32_path = NULL;
- }
- else if (!*win32_path)
- set_errno (EINVAL);
- else
- {
- char *w32_path = (char *) win32_path;
- if (flags & MOUNT_BIND)
+ if (!*posix_path)
+ set_errno (EINVAL);
+ else if (strpbrk (posix_path, "\\:"))
+ set_errno (EINVAL);
+ else if (flags & MOUNT_CYGDRIVE) /* normal mount */
{
- /* Prepend root path to bound path. */
- tmp_pathbuf tp;
- device dev;
-
- unsigned conv_flags = 0;
- const char *bound_path = w32_path;
-
- w32_path = tp.c_get ();
- int error = mount_table->conv_to_win32_path (bound_path, w32_path,
- dev, &conv_flags);
- if (error || strlen (w32_path) >= MAX_PATH)
- return true;
- if ((flags & ~MOUNT_SYSTEM) == (MOUNT_BIND | MOUNT_BINARY))
- flags = (MOUNT_BIND | conv_flags)
- & ~(MOUNT_IMMUTABLE | MOUNT_AUTOMATIC);
+ /* When flags include MOUNT_CYGDRIVE, take this to mean that
+ we actually want to change the cygdrive prefix and flags
+ without actually mounting anything. */
+ res = mount_table->write_cygdrive_info (posix_path, flags);
+ win32_path = NULL;
+ }
+ else if (!*win32_path)
+ set_errno (EINVAL);
+ else
+ {
+ char *w32_path = (char *) win32_path;
+ if (flags & MOUNT_BIND)
+ {
+ /* Prepend root path to bound path. */
+ tmp_pathbuf tp;
+ device dev;
+
+ unsigned conv_flags = 0;
+ const char *bound_path = w32_path;
+
+ w32_path = tp.c_get ();
+ int error = mount_table->conv_to_win32_path (bound_path, w32_path,
+ dev, &conv_flags);
+ if (error || strlen (w32_path) >= MAX_PATH)
+ return true;
+ if ((flags & ~MOUNT_SYSTEM) == (MOUNT_BIND | MOUNT_BINARY))
+ flags = (MOUNT_BIND | conv_flags)
+ & ~(MOUNT_IMMUTABLE | MOUNT_AUTOMATIC);
+ }
+ /* Make sure all mounts are user mounts, even those added via
+ mount -a. */
+ flags &= ~MOUNT_SYSTEM;
+ res = mount_table->add_item (w32_path, posix_path, flags);
}
- /* Make sure all mounts are user mounts, even those added via mount -a. */
- flags &= ~MOUNT_SYSTEM;
- res = mount_table->add_item (w32_path, posix_path, flags);
- }
- syscall_printf ("%R = mount(%s, %s, %y)", res, win32_path, posix_path, flags);
+ syscall_printf ("%R = mount(%s, %s, %y)",
+ res, win32_path, posix_path, flags);
+ }
+ __except (EFAULT) {}
+ __endtry
return res;
}
@@ -1830,15 +1761,18 @@ mount (const char *win32_path, const char *posix_path, unsigned flags)
extern "C" int
umount (const char *path)
{
- myfault efault;
- if (efault.faulted (EFAULT))
- return -1;
- if (!*path)
+ __try
{
- set_errno (EINVAL);
- return -1;
+ if (!*path)
+ {
+ set_errno (EINVAL);
+ __leave;
+ }
+ return cygwin_umount (path, 0);
}
- return cygwin_umount (path, 0);
+ __except (EFAULT) {}
+ __endtry
+ return -1;
}
/* cygwin_umount: This is like umount but takes an additional flags
@@ -1964,7 +1898,7 @@ dos_drive_mappings::dos_drive_mappings ()
HANDLE sh = FindFirstVolumeW (vol, 64);
if (sh == INVALID_HANDLE_VALUE)
debug_printf ("FindFirstVolumeW, %E");
- else
+ else {
do
{
/* Skip drives which are not mounted. */
@@ -2025,6 +1959,7 @@ dos_drive_mappings::dos_drive_mappings ()
}
while (FindNextVolumeW (sh, vol, 64));
FindVolumeClose (sh);
+ }
}
wchar_t *
diff --git a/winsup/cygwin/mount.h b/winsup/cygwin/mount.h
index 203bfff33..ee2339581 100644
--- a/winsup/cygwin/mount.h
+++ b/winsup/cygwin/mount.h
@@ -1,8 +1,5 @@
/* mount.h: mount definitions.
- Copyright 1996, 1997, 1998, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007,
- 2008, 2009, 2010, 2011, 2012, 2013 Red Hat, Inc.
-
This file is part of Cygwin.
This software is a copyrighted work licensed under the terms of the
@@ -12,6 +9,10 @@ details. */
#ifndef _MOUNT_H
#define _MOUNT_H
+#define __CCP_APP_SLASH 0x10000000 /* Internal flag for conv_to_posix_path.
+ always append slash, even if path
+ is "X:\\" only. */
+
enum disk_type
{
DT_NODISK,
@@ -45,6 +46,7 @@ enum fs_info_type
nwfs,
ncfsd,
afs,
+ prlfs,
/* Always last. */
max_fs_type
};
@@ -116,6 +118,7 @@ class fs_info
IMPLEMENT_FS_FLAG (nwfs)
IMPLEMENT_FS_FLAG (ncfsd)
IMPLEMENT_FS_FLAG (afs)
+ IMPLEMENT_FS_FLAG (prlfs)
fs_info_type what_fs () const { return status.fs_type; }
bool got_fs () const { return status.fs_type != none; }
@@ -184,23 +187,23 @@ class mount_info
int native_sorted[MAX_MOUNTS];
public:
- void init ();
+ void init (bool);
int add_item (const char *dev, const char *path, unsigned flags);
int del_item (const char *path, unsigned flags);
unsigned set_flags_from_win32_path (const char *path);
int conv_to_win32_path (const char *src_path, char *dst, device&,
- unsigned *flags = NULL);
- int conv_to_posix_path (PWCHAR src_path, char *posix_path,
- int keep_rel_p);
+ unsigned *flags = NULL,
+ bool hide_cygwin_virtuals = false);
+ int conv_to_posix_path (PWCHAR src_path, char *posix_path, int ccp_flags);
int conv_to_posix_path (const char *src_path, char *posix_path,
- int keep_rel_p);
+ int ccp_flags);
struct mntent *getmntent (int x);
int write_cygdrive_info (const char *cygdrive_prefix, unsigned flags);
int get_cygdrive_info (char *user, char *system, char* user_flags,
char* system_flags);
- void cygdrive_posix_path (const char *src, char *dst, int trailing_slash_p);
+ void cygdrive_posix_path (const char *src, char *dst, int flags);
int get_mounts_here (const char *parent_dir, int,
PUNICODE_STRING mount_points,
PUNICODE_STRING cygd);
diff --git a/winsup/cygwin/msg.cc b/winsup/cygwin/msg.cc
index f970121c9..373973eac 100644
--- a/winsup/cygwin/msg.cc
+++ b/winsup/cygwin/msg.cc
@@ -1,7 +1,5 @@
/* msg.cc: XSI IPC interface for Cygwin.
- Copyright 2002, 2003, 2004, 2005, 2008, 2009 Red Hat, Inc.
-
This file is part of Cygwin.
This software is a copyrighted work licensed under the terms of the
@@ -91,38 +89,38 @@ client_request_msg::client_request_msg (int msqid,
extern "C" int
msgctl (int msqid, int cmd, struct msqid_ds *buf)
{
- syscall_printf ("msgctl (msqid = %d, cmd = %y, buf = %p)",
- msqid, cmd, buf);
- myfault efault;
- if (efault.faulted (EFAULT))
- return -1;
- switch (cmd)
+ syscall_printf ("msgctl (msqid = %d, cmd = %y, buf = %p)", msqid, cmd, buf);
+ __try
{
- case IPC_STAT:
- break;
- case IPC_SET:
- break;
- case IPC_RMID:
- break;
- case IPC_INFO:
- break;
- case MSG_INFO:
- break;
- default:
- syscall_printf ("-1 [%d] = msgctl ()", EINVAL);
- set_errno (EINVAL);
- return -1;
+ switch (cmd)
+ {
+ case IPC_STAT:
+ break;
+ case IPC_SET:
+ break;
+ case IPC_RMID:
+ break;
+ case IPC_INFO:
+ break;
+ case MSG_INFO:
+ break;
+ default:
+ syscall_printf ("-1 [%d] = msgctl ()", EINVAL);
+ set_errno (EINVAL);
+ __leave;
+ }
+ client_request_msg request (msqid, cmd, buf);
+ if (request.make_request () == -1 || request.retval () == -1)
+ {
+ syscall_printf ("-1 [%d] = msgctl ()", request.error_code ());
+ set_errno (request.error_code ());
+ __leave;
+ }
+ return request.retval ();
}
- client_request_msg request (msqid, cmd, buf);
- if (request.make_request () == -1 || request.retval () == -1)
- {
- syscall_printf ("-1 [%d] = msgctl ()", request.error_code ());
- set_errno (request.error_code ());
- if (request.error_code () == ENOSYS)
- raise (SIGSYS);
- return -1;
- }
- return request.retval ();
+ __except (EFAULT) {}
+ __endtry
+ return -1;
}
extern "C" int
@@ -134,8 +132,6 @@ msgget (key_t key, int msgflg)
{
syscall_printf ("-1 [%d] = msgget ()", request.error_code ());
set_errno (request.error_code ());
- if (request.error_code () == ENOSYS)
- raise (SIGSYS);
return -1;
}
return request.retval ();
@@ -147,19 +143,20 @@ msgrcv (int msqid, void *msgp, size_t msgsz, long msgtyp, int msgflg)
syscall_printf ("msgrcv (msqid = %d, msgp = %p, msgsz = %ld, "
"msgtyp = %d, msgflg = %y)",
msqid, msgp, msgsz, msgtyp, msgflg);
- myfault efault;
- if (efault.faulted (EFAULT))
- return -1;
- client_request_msg request (msqid, msgp, msgsz, msgtyp, msgflg);
- if (request.make_request () == -1 || request.rcvval () == -1)
+ __try
{
- syscall_printf ("-1 [%d] = msgrcv ()", request.error_code ());
- set_errno (request.error_code ());
- if (request.error_code () == ENOSYS)
- raise (SIGSYS);
- return -1;
+ client_request_msg request (msqid, msgp, msgsz, msgtyp, msgflg);
+ if (request.make_request () == -1 || request.rcvval () == -1)
+ {
+ syscall_printf ("-1 [%d] = msgrcv ()", request.error_code ());
+ set_errno (request.error_code ());
+ __leave;
+ }
+ return request.rcvval ();
}
- return request.rcvval ();
+ __except (EFAULT) {}
+ __endtry
+ return -1;
}
extern "C" int
@@ -167,17 +164,18 @@ msgsnd (int msqid, const void *msgp, size_t msgsz, int msgflg)
{
syscall_printf ("msgsnd (msqid = %d, msgp = %p, msgsz = %ld, msgflg = %y)",
msqid, msgp, msgsz, msgflg);
- myfault efault;
- if (efault.faulted (EFAULT))
- return -1;
- client_request_msg request (msqid, msgp, msgsz, msgflg);
- if (request.make_request () == -1 || request.retval () == -1)
+ __try
{
- syscall_printf ("-1 [%d] = msgsnd ()", request.error_code ());
- set_errno (request.error_code ());
- if (request.error_code () == ENOSYS)
- raise (SIGSYS);
- return -1;
+ client_request_msg request (msqid, msgp, msgsz, msgflg);
+ if (request.make_request () == -1 || request.retval () == -1)
+ {
+ syscall_printf ("-1 [%d] = msgsnd ()", request.error_code ());
+ set_errno (request.error_code ());
+ __leave;
+ }
+ return request.retval ();
}
- return request.retval ();
+ __except (EFAULT) {}
+ __endtry
+ return -1;
}
diff --git a/winsup/cygwin/mtinfo.h b/winsup/cygwin/mtinfo.h
index e7624b704..d99cd2ef2 100644
--- a/winsup/cygwin/mtinfo.h
+++ b/winsup/cygwin/mtinfo.h
@@ -1,7 +1,5 @@
/* mtinfo.h: Defininitions for the Cygwin tape driver class.
- Copyright 2004, 2005, 2006, 2008, 2012, 2013 Red Hat, Inc.
-
This file is part of Cygwin.
This software is a copyrighted work licensed under the terms of the
diff --git a/winsup/cygwin/net.cc b/winsup/cygwin/net.cc
index 053c66718..21075a563 100644
--- a/winsup/cygwin/net.cc
+++ b/winsup/cygwin/net.cc
@@ -1,8 +1,5 @@
/* net.cc: network-related routines.
- Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008, 2009, 2010, 2011, 2012, 2013 Red Hat, Inc.
-
This file is part of Cygwin.
This software is a copyrighted work licensed under the terms of the
@@ -18,8 +15,16 @@ details. */
if_indextoname functions in iphlpapi.h since Vista.
TODO: Convert if_nametoindex to cygwin_if_nametoindex and call
system functions on Vista and later. */
-#define _INC_NETIOAPI
+#define _INC_NETIOAPI /* w32api < 4.0 */
+#define _NETIOAPI_H_
#include "winsup.h"
+#ifdef __x86_64__
+/* 2014-04-24: Current Mingw headers define sockaddr_in6 using u_long (8 byte)
+ because a redefinition for LP64 systems is missing. This leads to a wrong
+ definition and size of sockaddr_in6 when building with winsock headers. */
+#undef u_long
+#define u_long __ms_u_long
+#endif
#include <ws2tcpip.h>
#include <mswsock.h>
#include <iphlpapi.h>
@@ -63,14 +68,15 @@ extern "C"
int __stdcall rcmd (char **ahost, unsigned short inport, char *locuser,
char *remuser, char *cmd, SOCKET * fd2p);
int sscanf (const char *, const char *, ...);
+ int cygwin_inet_pton(int, const char *, void *);
int cygwin_inet_aton(const char *, struct in_addr *);
const char *cygwin_inet_ntop (int, const void *, char *, socklen_t);
int dn_length1(const unsigned char *, const unsigned char *,
const unsigned char *);
} /* End of "C" section */
-const struct in6_addr in6addr_any = {{IN6ADDR_ANY_INIT}};
-const struct in6_addr in6addr_loopback = {{IN6ADDR_LOOPBACK_INIT}};
+const struct in6_addr in6addr_any = IN6ADDR_ANY_INIT;
+const struct in6_addr in6addr_loopback = IN6ADDR_LOOPBACK_INIT;
static fhandler_socket *
get (const int fd)
@@ -158,6 +164,9 @@ struct tl
};
static const struct tl errmap[] = {
+ {WSA_INVALID_HANDLE, "WSA_INVALID_HANDLE", EBADF},
+ {WSA_NOT_ENOUGH_MEMORY, "WSA_NOT_ENOUGH_MEMORY", ENOMEM},
+ {WSA_INVALID_PARAMETER, "WSA_INVALID_PARAMETER", EINVAL},
{WSAEINTR, "WSAEINTR", EINTR},
{WSAEWOULDBLOCK, "WSAEWOULDBLOCK", EWOULDBLOCK},
{WSAEINPROGRESS, "WSAEINPROGRESS", EINPROGRESS},
@@ -491,10 +500,13 @@ dup_ent (servent *src)
extern "C" struct protoent *
cygwin_getprotobyname (const char *p)
{
- myfault efault;
- if (efault.faulted (EFAULT))
- return NULL;
- return dup_ent (getprotobyname (p));
+ __try
+ {
+ return dup_ent (getprotobyname (p));
+ }
+ __except (EFAULT) {}
+ __endtry
+ return NULL;
}
/* exported as getprotobynumber: standards? */
@@ -609,13 +621,20 @@ fdsock (cygheap_fdmanip& fd, const device *dev, SOCKET soc)
this is no problem on 64 bit. So we set the default buffer size to
the default values in current 3.x Linux versions.
+ NOTE 3. Setting the window size to 65535 results in extremely bad
+ performance for apps that send data in multiples of Kb, as they
+ eventually end up sending 1 byte on the network and naggle + delay
+ ack kicks in. For example, iperf on a 10Gb network gives only 10
+ Mbits/sec with a 65535 send buffer. We want this to be a multiple
+ of 1k, but since 64k breaks WSADuplicateSocket we use 63Kb.
+
(*) Maximum normal TCP window size. Coincidence? */
#ifdef __x86_64__
((fhandler_socket *) fd)->rmem () = 212992;
((fhandler_socket *) fd)->wmem () = 212992;
#else
- ((fhandler_socket *) fd)->rmem () = 65535;
- ((fhandler_socket *) fd)->wmem () = 65535;
+ ((fhandler_socket *) fd)->rmem () = 64512;
+ ((fhandler_socket *) fd)->wmem () = 64512;
#endif
if (::setsockopt (soc, SOL_SOCKET, SO_RCVBUF,
(char *) &((fhandler_socket *) fd)->rmem (), sizeof (int)))
@@ -636,6 +655,11 @@ fdsock (cygheap_fdmanip& fd, const device *dev, SOCKET soc)
system_printf ("getsockopt(SO_SNDBUF) failed, %u", WSAGetLastError ());
}
+ /* A unique ID is necessary to recognize fhandler entries which are
+ duplicated by dup(2) or fork(2). This is used in BSD flock calls
+ to identify the descriptor. */
+ ((fhandler_socket *) fd)->set_unique_id ();
+
return true;
}
@@ -717,18 +741,18 @@ extern "C" ssize_t
cygwin_sendto (int fd, const void *buf, size_t len, int flags,
const struct sockaddr *to, socklen_t tolen)
{
- ssize_t res;
+ ssize_t res = -1;
pthread_testcancel ();
- fhandler_socket *fh = get (fd);
-
- myfault efault;
- if (efault.faulted (EFAULT) || !fh)
- res = -1;
- else
- res = fh->sendto (buf, len, flags, to, tolen);
-
+ __try
+ {
+ fhandler_socket *fh = get (fd);
+ if (fh)
+ res = fh->sendto (buf, len, flags, to, tolen);
+ }
+ __except (EFAULT) {}
+ __endtry
syscall_printf ("%lR = sendto(%d, %p, %ld, %y, %p, %d)",
res, fd, buf, len, flags, to, tolen);
return res;
@@ -739,22 +763,22 @@ extern "C" ssize_t
cygwin_recvfrom (int fd, void *buf, size_t len, int flags,
struct sockaddr *from, socklen_t *fromlen)
{
- ssize_t res;
+ ssize_t res = -1;
pthread_testcancel ();
- fhandler_socket *fh = get (fd);
-
- myfault efault;
- if (efault.faulted (EFAULT) || !fh)
- res = -1;
- else
- /* Originally we shortcircuited here if res == 0.
- Allow 0 bytes buffer. This is valid in POSIX and handled in
- fhandler_socket::recv_internal. If we shortcircuit, we fail
- to deliver valid error conditions and peer address. */
- res = fh->recvfrom (buf, len, flags, from, fromlen);
-
+ __try
+ {
+ fhandler_socket *fh = get (fd);
+ if (fh)
+ /* Originally we shortcircuited here if res == 0.
+ Allow 0 bytes buffer. This is valid in POSIX and handled in
+ fhandler_socket::recv_internal. If we shortcircuit, we fail
+ to deliver valid error conditions and peer address. */
+ res = fh->recvfrom (buf, len, flags, from, fromlen);
+ }
+ __except (EFAULT) {}
+ __endtry
syscall_printf ("%lR = recvfrom(%d, %p, %ld, %y, %p, %p)",
res, fd, buf, len, flags, from, fromlen);
return res;
@@ -786,14 +810,30 @@ extern "C" int
cygwin_setsockopt (int fd, int level, int optname, const void *optval,
socklen_t optlen)
{
- int res;
- fhandler_socket *fh = get (fd);
+ int res = -1;
- myfault efault;
- if (efault.faulted (EFAULT) || !fh)
- res = -1;
- else
+ __try
{
+ fhandler_socket *fh = get (fd);
+ if (!fh)
+ __leave;
+
+ /* Switch off the AF_LOCAL handshake and thus SO_PEERCRED handling
+ for AF_LOCAL/SOCK_STREAM sockets. This allows to handle special
+ situations in which connect is called before a listening socket
+ accepts connections.
+ FIXME: In the long run we should find a more generic solution which
+ doesn't require a blocking handshake in accept/connect to exchange
+ SO_PEERCRED credentials. */
+ if (level == SOL_SOCKET && optname == SO_PEERCRED)
+ {
+ if (optval || optlen)
+ set_errno (EINVAL);
+ else
+ res = fh->af_local_set_no_getpeereid ();
+ __leave;
+ }
+
/* Old applications still use the old WinSock1 IPPROTO_IP values. */
if (level == IPPROTO_IP && CYGWIN_VERSION_CHECK_FOR_USING_WINSOCK1_VALUES)
optname = convert_ws1_ip_optname (optname);
@@ -843,13 +883,22 @@ cygwin_setsockopt (int fd, int level, int optname, const void *optval,
Sidenote: The reasoning for dropping ToS in Win2K is that ToS
per RFC 1349 is incompatible with DiffServ per RFC 2474/2475.
- We just ignore the return value of setting IP_TOS entirely. */
+ We just ignore the return value of setting IP_TOS entirely.
+
+ CV 2014-04-16: Same for IPV6_TCLASS
+ FIXME: Same for IPV6_RECVTCLASS? */
if (level == IPPROTO_IP && optname == IP_TOS
&& WSAGetLastError () == WSAEINVAL)
{
debug_printf ("Faked IP_TOS success");
res = 0;
}
+ else if (level == IPPROTO_IPV6 && optname == IPV6_TCLASS
+ && WSAGetLastError () == WSAENOPROTOOPT)
+ {
+ debug_printf ("Faked IPV6_TCLASS success");
+ res = 0;
+ }
else
set_winsock_errno ();
}
@@ -869,7 +918,11 @@ cygwin_setsockopt (int fd, int level, int optname, const void *optval,
break;
}
}
-
+ __except (EFAULT)
+ {
+ res = -1;
+ }
+ __endtry
syscall_printf ("%R = setsockopt(%d, %d, %y, %p, %d)",
res, fd, level, optname, optval, optlen);
return res;
@@ -880,19 +933,19 @@ extern "C" int
cygwin_getsockopt (int fd, int level, int optname, void *optval,
socklen_t *optlen)
{
- int res;
- fhandler_socket *fh = get (fd);
+ int res = -1;
- myfault efault;
- if (efault.faulted (EFAULT) || !fh)
- res = -1;
- else if (optname == SO_PEERCRED && level == SOL_SOCKET)
- {
- struct ucred *cred = (struct ucred *) optval;
- res = fh->getpeereid (&cred->pid, &cred->uid, &cred->gid);
- }
- else
+ __try
{
+ fhandler_socket *fh = get (fd);
+ if (!fh)
+ __leave;
+ if (optname == SO_PEERCRED && level == SOL_SOCKET)
+ {
+ struct ucred *cred = (struct ucred *) optval;
+ res = fh->getpeereid (&cred->pid, &cred->uid, &cred->gid);
+ __leave;
+ }
/* Old applications still use the old WinSock1 IPPROTO_IP values. */
if (level == IPPROTO_IP && CYGWIN_VERSION_CHECK_FOR_USING_WINSOCK1_VALUES)
optname = convert_ws1_ip_optname (optname);
@@ -900,41 +953,53 @@ cygwin_getsockopt (int fd, int level, int optname, void *optval,
(int *) optlen);
if (res == SOCKET_ERROR)
set_winsock_errno ();
- else if (level == SOL_SOCKET)
+ else if (level == SOL_SOCKET && optname == SO_ERROR)
+ {
+ int *e = (int *) optval;
+ debug_printf ("WinSock SO_ERROR = %d", *e);
+ *e = find_winsock_errno (*e);
+ }
+ else if (*optlen == 1)
{
- switch (optname)
+ /* Regression in Vista and later: instead of a 4 byte BOOL value,
+ a 1 byte BOOLEAN value is returned, in contrast to older systems
+ and the documentation. Since an int type is expected by the
+ calling application, we convert the result here. For some reason
+ only three BSD-compatible socket options seem to be affected. */
+ if ((level == SOL_SOCKET
+ && (optname == SO_KEEPALIVE || optname == SO_DONTROUTE))
+ || (level == IPPROTO_TCP && optname == TCP_NODELAY))
{
- case SO_ERROR:
- {
- int *e = (int *) optval;
- debug_printf ("WinSock SO_ERROR = %d", *e);
- *e = find_winsock_errno (*e);
- }
- break;
- case SO_KEEPALIVE:
- case SO_DONTROUTE:
- /* Regression in Vista and later: instead of a 4 byte BOOL
- value, a 1 byte BOOLEAN value is returned, in contrast
- to older systems and the documentation. Since an int
- type is expected by the calling application, we convert
- the result here. */
- if (*optlen == 1)
- {
- BOOLEAN *in = (BOOLEAN *) optval;
- int *out = (int *) optval;
- *out = *in;
- *optlen = 4;
- }
- break;
+ BOOLEAN *in = (BOOLEAN *) optval;
+ int *out = (int *) optval;
+ *out = *in;
+ *optlen = 4;
}
}
}
-
+ __except (EFAULT)
+ {
+ res = -1;
+ }
+ __endtry
syscall_printf ("%R = getsockopt(%d, %d, %y, %p, %p)",
res, fd, level, optname, optval, optlen);
return res;
}
+/* POSIX.1-2001 */
+extern "C" int
+sockatmark (int fd)
+{
+ int ret;
+
+ fhandler_socket *fh = get (fd);
+ if (fh && fh->ioctl (SIOCATMARK, &ret) != -1)
+ return ret;
+ return -1;
+}
+
+/* BSD */
extern "C" int
getpeereid (int fd, uid_t *euid, gid_t *egid)
{
@@ -948,20 +1013,19 @@ getpeereid (int fd, uid_t *euid, gid_t *egid)
extern "C" int
cygwin_connect (int fd, const struct sockaddr *name, socklen_t namelen)
{
- int res;
+ int res = -1;
pthread_testcancel ();
- fhandler_socket *fh = get (fd);
-
- myfault efault;
- if (efault.faulted (EFAULT) || !fh)
- res = -1;
- else
- res = fh->connect (name, namelen);
-
+ __try
+ {
+ fhandler_socket *fh = get (fd);
+ if (fh)
+ res = fh->connect (name, namelen);
+ }
+ __except (EFAULT) {}
+ __endtry
syscall_printf ("%R = connect(%d, %p, %d)", res, fd, name, namelen);
-
return res;
}
@@ -969,11 +1033,14 @@ cygwin_connect (int fd, const struct sockaddr *name, socklen_t namelen)
extern "C" struct servent *
cygwin_getservbyname (const char *name, const char *proto)
{
- myfault efault;
- if (efault.faulted (EFAULT))
- return NULL;
+ servent *res = NULL;
- servent *res = dup_ent (getservbyname (name, proto));
+ __try
+ {
+ res = dup_ent (getservbyname (name, proto));
+ }
+ __except (EFAULT) {}
+ __endtry
syscall_printf ("%p = getservbyname (%s, %s)", res, name, proto);
return res;
}
@@ -982,11 +1049,14 @@ cygwin_getservbyname (const char *name, const char *proto)
extern "C" struct servent *
cygwin_getservbyport (int port, const char *proto)
{
- myfault efault;
- if (efault.faulted (EFAULT))
- return NULL;
+ servent *res = NULL;
- servent *res = dup_ent (getservbyport (port, proto));
+ __try
+ {
+ res = dup_ent (getservbyport (port, proto));
+ }
+ __except (EFAULT) {}
+ __endtry
syscall_printf ("%p = getservbyport (%d, %s)", res, port, proto);
return res;
}
@@ -994,21 +1064,43 @@ cygwin_getservbyport (int port, const char *proto)
extern "C" int
cygwin_gethostname (char *name, size_t len)
{
- myfault efault;
- if (efault.faulted (EFAULT))
- return -1;
+ int res = -1;
- if (gethostname (name, len))
+ __try
{
- DWORD local_len = len;
-
- if (!GetComputerNameA (name, &local_len))
+ if (gethostname (name, len))
{
- set_winsock_errno ();
- return -1;
+ DWORD local_len = len;
+
+ if (!GetComputerNameExA (ComputerNameDnsFullyQualified, name,
+ &local_len))
+ {
+ if (GetLastError () == ERROR_MORE_DATA)
+ set_errno (ENAMETOOLONG);
+ else
+ set_winsock_errno ();
+ __leave;
+ }
}
+ debug_printf ("name %s", name);
+ res = 0;
+ }
+ __except (EFAULT) {}
+ __endtry
+ return res;
+}
+
+extern "C" int
+sethostname (const char *name, size_t len)
+{
+ WCHAR wname[MAX_COMPUTERNAME_LENGTH + 1];
+
+ sys_mbstowcs (wname, MAX_COMPUTERNAME_LENGTH + 1, name, len);
+ if (!SetComputerNameExW (ComputerNamePhysicalDnsHostname, wname))
+ {
+ __seterrno ();
+ return -1;
}
- debug_printf ("name %s", name);
return 0;
}
@@ -1016,45 +1108,50 @@ cygwin_gethostname (char *name, size_t len)
extern "C" struct hostent *
cygwin_gethostbyname (const char *name)
{
- myfault efault;
- if (efault.faulted (EFAULT))
- return NULL;
-
unsigned char tmp_addr[4];
struct hostent tmp, *h;
char *tmp_aliases[1] = {0};
char *tmp_addr_list[2] = {0,0};
unsigned int a, b, c, d;
char dummy;
+ hostent *res = NULL;
- if (sscanf (name, "%u.%u.%u.%u%c", &a, &b, &c, &d, &dummy) != 4
- || a >= 256 || b >= 256 || c >= 256 || d >= 256)
- h = gethostbyname (name);
- else
+ __try
{
- /* In case you don't have DNS, at least x.x.x.x still works */
- memset (&tmp, 0, sizeof (tmp));
- tmp_addr[0] = a;
- tmp_addr[1] = b;
- tmp_addr[2] = c;
- tmp_addr[3] = d;
- tmp_addr_list[0] = (char *) tmp_addr;
- tmp.h_name = name;
- tmp.h_aliases = tmp_aliases;
- tmp.h_addrtype = 2;
- tmp.h_length = 4;
- tmp.h_addr_list = tmp_addr_list;
- h = &tmp;
- }
+ if (sscanf (name, "%u.%u.%u.%u%c", &a, &b, &c, &d, &dummy) != 4
+ || a >= 256 || b >= 256 || c >= 256 || d >= 256)
+ h = gethostbyname (name);
+ else
+ {
+ /* In case you don't have DNS, at least x.x.x.x still works */
+ memset (&tmp, 0, sizeof (tmp));
+ tmp_addr[0] = a;
+ tmp_addr[1] = b;
+ tmp_addr[2] = c;
+ tmp_addr[3] = d;
+ tmp_addr_list[0] = (char *) tmp_addr;
+ tmp.h_name = name;
+ tmp.h_aliases = tmp_aliases;
+ tmp.h_addrtype = 2;
+ tmp.h_length = 4;
+ tmp.h_addr_list = tmp_addr_list;
+ h = &tmp;
+ }
- hostent *res = dup_ent (h);
- if (res)
- debug_printf ("h_name %s", res->h_name);
- else
+ res = dup_ent (h);
+ if (res)
+ debug_printf ("h_name %s", res->h_name);
+ else
+ {
+ debug_printf ("dup_ent returned NULL for name %s, h %p", name, h);
+ set_host_errno ();
+ }
+ }
+ __except (EFAULT)
{
- debug_printf ("dup_ent returned NULL for name %s, h %p", name, h);
- set_host_errno ();
+ res = NULL;
}
+ __endtry
return res;
}
@@ -1062,26 +1159,130 @@ cygwin_gethostbyname (const char *name)
extern "C" struct hostent *
cygwin_gethostbyaddr (const char *addr, int len, int type)
{
- myfault efault;
- if (efault.faulted (EFAULT))
- return NULL;
+ hostent *res = NULL;
- hostent *res = dup_ent (gethostbyaddr (addr, len, type));
- if (res)
- debug_printf ("h_name %s", res->h_name);
- else
- set_host_errno ();
+ __try
+ {
+ res = dup_ent (gethostbyaddr (addr, len, type));
+ if (res)
+ debug_printf ("h_name %s", res->h_name);
+ else
+ set_host_errno ();
+ }
+ __except (EFAULT)
+ {
+ res = NULL;
+ }
+ __endtry
return res;
}
static void
-memcpy4to6 (char *dst, const u_char *src)
+memcpy4to6 (char *dst, const u_int8_t *src)
{
const unsigned int h[] = {0, 0, htonl (0xFFFF)};
memcpy (dst, h, 12);
memcpy (dst + 12, src, NS_INADDRSZ);
}
+/* gethostby_specials: RFC 6761
+ Handles numerical addresses and special names for gethostbyname2 */
+static hostent *
+gethostby_specials (const char *name, const int af,
+ const int addrsize_in, const int addrsize_out)
+{
+ int namelen = strlen (name);
+ /* Ignore a final '.' */
+ if ((namelen == 0) || ((namelen -= (name[namelen - 1] == '.')) == 0))
+ {
+ set_errno (EINVAL);
+ h_errno = NETDB_INTERNAL;
+ return NULL;
+ }
+
+ int res;
+ u_int8_t address[NS_IN6ADDRSZ];
+ /* Test for numerical addresses */
+ res = cygwin_inet_pton(af, name, address);
+ /* Test for special domain names */
+ if (res != 1)
+ {
+ {
+ char const match[] = "invalid";
+ int const matchlen = sizeof(match) - 1;
+ int start = namelen - matchlen;
+ if ((start >= 0) && ((start == 0) || (name[start-1] == '.'))
+ && (strncasecmp (&name[start], match , matchlen) == 0))
+ {
+ h_errno = HOST_NOT_FOUND;
+ return NULL;
+ }
+ }
+ {
+ char const match[] = "localhost";
+ int const matchlen = sizeof(match) - 1;
+ int start = namelen - matchlen;
+ if ((start >= 0) && ((start == 0) || (name[start-1] == '.'))
+ && (strncasecmp (&name[start], match , matchlen) == 0))
+ {
+ res = 1;
+ if (af == AF_INET)
+ {
+ address[0] = 127;
+ address[1] = address[2] = 0;
+ address[3] = 1;
+ }
+ else
+ {
+ memset (address, 0, NS_IN6ADDRSZ);
+ address[NS_IN6ADDRSZ-1] = 1;
+ }
+ }
+ }
+ }
+ if (res != 1)
+ return NULL;
+
+ int const alias_count = 0, address_count = 1;
+ char * string_ptr;
+ int sz = DWORD_round (sizeof(hostent))
+ + sizeof (char *) * (alias_count + address_count + 2)
+ + namelen + 1
+ + address_count * addrsize_out;
+ hostent *ret = realloc_ent (sz, (hostent *) NULL);
+ if (!ret)
+ {
+ /* errno is already set */
+ h_errno = NETDB_INTERNAL;
+ return NULL;
+ }
+
+ ret->h_addrtype = af;
+ ret->h_length = addrsize_out;
+ ret->h_aliases = (char **) (((char *) ret) + DWORD_round (sizeof(hostent)));
+ ret->h_addr_list = ret->h_aliases + alias_count + 1;
+ string_ptr = (char *) (ret->h_addr_list + address_count + 1);
+ ret->h_name = string_ptr;
+
+ memcpy (string_ptr, name, namelen);
+ string_ptr[namelen] = 0;
+ string_ptr += namelen + 1;
+
+ ret->h_addr_list[0] = string_ptr;
+ if (addrsize_in != addrsize_out)
+ {
+ memcpy4to6 (string_ptr, address);
+ ret->h_addrtype = AF_INET6;
+ }
+ else
+ memcpy (string_ptr, address, addrsize_out);
+
+ ret->h_aliases[alias_count] = NULL;
+ ret->h_addr_list[address_count] = NULL;
+
+ return ret;
+}
+
static hostent *
gethostby_helper (const char *name, const int af, const int type,
const int addrsize_in, const int addrsize_out)
@@ -1089,7 +1290,7 @@ gethostby_helper (const char *name, const int af, const int type,
/* Get the data from the name server */
const int maxcount = 3;
int old_errno, ancount = 0, anlen = 1024, msgsize = 0;
- u_char *ptr, *msg = NULL;
+ unsigned char *ptr, *msg = NULL;
int sz;
hostent *ret;
char *string_ptr;
@@ -1097,7 +1298,7 @@ gethostby_helper (const char *name, const int af, const int type,
while ((anlen > msgsize) && (ancount++ < maxcount))
{
msgsize = anlen;
- ptr = (u_char *) realloc (msg, msgsize);
+ ptr = (unsigned char *) realloc (msg, msgsize);
if (ptr == NULL )
{
old_errno = errno;
@@ -1123,8 +1324,7 @@ gethostby_helper (const char *name, const int af, const int type,
set_errno (old_errno);
return NULL;
}
- u_char *eomsg = msg + anlen - 1;
-
+ unsigned char *eomsg = msg + anlen - 1;
/* We scan the answer records to determine the required memory size.
They can be corrupted and we don't fully trust that the message
@@ -1144,10 +1344,11 @@ gethostby_helper (const char *name, const int af, const int type,
unsigned namelen1: 16; // expanded length (with final 0)
unsigned next_o: 16; // offset to next valid
unsigned size: 16; // data size
- u_char data[]; // data
+ unsigned char data[]; // data
record * next () { return (record *) (((char *) this) + next_o); }
void set_next ( record * nxt) { next_o = ((char *) nxt) - ((char *) this); }
- u_char * name () { return (u_char *) (((char *) this) - complen); }
+ unsigned char *name () { return (unsigned char *)
+ (((char *) this) - complen); }
};
record * anptr = NULL, * prevptr = NULL, * curptr;
@@ -1261,13 +1462,17 @@ gethostby_helper (const char *name, const int af, const int type,
{
if (address_count == 0)
{
- dn_expand (msg, eomsg, curptr->name (), string_ptr, curptr->namelen1);
+ dn_expand (msg, eomsg, curptr->name (), string_ptr,
+ curptr->namelen1);
ret->h_name = string_ptr;
string_ptr += curptr->namelen1;
}
ret->h_addr_list[address_count++] = string_ptr;
if (addrsize_in != addrsize_out)
- memcpy4to6 (string_ptr, curptr->data);
+ {
+ memcpy4to6 (string_ptr, curptr->data);
+ ret->h_addrtype = AF_INET6;
+ }
else
memcpy (string_ptr, curptr->data, addrsize_in);
string_ptr += addrsize_out;
@@ -1281,7 +1486,7 @@ gethostby_helper (const char *name, const int af, const int type,
return ret;
- corrupted:
+corrupted:
free (msg);
/* Hopefully message corruption errors are temporary.
Should it be NO_RECOVERY ? */
@@ -1293,51 +1498,60 @@ gethostby_helper (const char *name, const int af, const int type,
extern "C" struct hostent *
gethostbyname2 (const char *name, int af)
{
- myfault efault;
- if (efault.faulted (EFAULT))
- return NULL;
+ hostent *res = NULL;
- if (!(_res.options & RES_INIT))
- res_init();
- bool v4to6 = _res.options & RES_USE_INET6;
-
- int type, addrsize_in, addrsize_out;
- switch (af)
+ __try
{
- case AF_INET:
- addrsize_in = NS_INADDRSZ;
- addrsize_out = (v4to6) ? NS_IN6ADDRSZ : NS_INADDRSZ;
- type = ns_t_a;
- break;
- case AF_INET6:
- addrsize_in = addrsize_out = NS_IN6ADDRSZ;
- type = ns_t_aaaa;
- break;
- default:
- set_errno (EAFNOSUPPORT);
- h_errno = NETDB_INTERNAL;
- return NULL;
- }
+ if (!(_res.options & RES_INIT))
+ res_init();
- return gethostby_helper (name, af, type, addrsize_in, addrsize_out);
+ bool v4to6 = _res.options & RES_USE_INET6;
+ int type, addrsize_in, addrsize_out;
+
+ switch (af)
+ {
+ case AF_INET:
+ addrsize_in = NS_INADDRSZ;
+ addrsize_out = (v4to6) ? NS_IN6ADDRSZ : NS_INADDRSZ;
+ type = ns_t_a;
+ break;
+ case AF_INET6:
+ addrsize_in = addrsize_out = NS_IN6ADDRSZ;
+ type = ns_t_aaaa;
+ break;
+ default:
+ set_errno (EAFNOSUPPORT);
+ h_errno = NETDB_INTERNAL;
+ __leave;
+ }
+
+ h_errno = NETDB_SUCCESS;
+ res = gethostby_specials (name, af, addrsize_in, addrsize_out);
+ if ((res == NULL) && (h_errno == NETDB_SUCCESS))
+ res = gethostby_helper (name, af, type, addrsize_in, addrsize_out);
+ }
+ __except (EFAULT) {}
+ __endtry
+ return res;
}
/* exported as accept: standards? */
extern "C" int
cygwin_accept (int fd, struct sockaddr *peer, socklen_t *len)
{
- int res;
+ int res = -1;
pthread_testcancel ();
- fhandler_socket *fh = get (fd);
-
- myfault efault;
- if (efault.faulted (EFAULT) || !fh)
- res = -1;
- else
- res = fh->accept4 (peer, len, fh->is_nonblocking () ? SOCK_NONBLOCK : 0);
-
+ __try
+ {
+ fhandler_socket *fh = get (fd);
+ if (fh)
+ res = fh->accept4 (peer, len,
+ fh->is_nonblocking () ? SOCK_NONBLOCK : 0);
+ }
+ __except (EFAULT) {}
+ __endtry
syscall_printf ("%R = accept(%d, %p, %p)", res, fd, peer, len);
return res;
}
@@ -1345,23 +1559,22 @@ cygwin_accept (int fd, struct sockaddr *peer, socklen_t *len)
extern "C" int
accept4 (int fd, struct sockaddr *peer, socklen_t *len, int flags)
{
- int res;
+ int res = -1;
pthread_testcancel ();
- fhandler_socket *fh = get (fd);
-
- myfault efault;
- if (efault.faulted (EFAULT) || !fh)
- res = -1;
- else if ((flags & ~(SOCK_NONBLOCK | SOCK_CLOEXEC)) != 0)
+ __try
{
- set_errno (EINVAL);
- res = -1;
+ fhandler_socket *fh = get (fd);
+ if (!fh)
+ __leave;
+ if ((flags & ~(SOCK_NONBLOCK | SOCK_CLOEXEC)) != 0)
+ set_errno (EINVAL);
+ else
+ res = fh->accept4 (peer, len, flags);
}
- else
- res = fh->accept4 (peer, len, flags);
-
+ __except (EFAULT) {}
+ __endtry
syscall_printf ("%R = accept4(%d, %p, %p, %y)", res, fd, peer, len, flags);
return res;
}
@@ -1370,15 +1583,16 @@ accept4 (int fd, struct sockaddr *peer, socklen_t *len, int flags)
extern "C" int
cygwin_bind (int fd, const struct sockaddr *my_addr, socklen_t addrlen)
{
- int res;
- fhandler_socket *fh = get (fd);
-
- myfault efault;
- if (efault.faulted (EFAULT) || !fh)
- res = -1;
- else
- res = fh->bind (my_addr, addrlen);
+ int res = -1;
+ __try
+ {
+ fhandler_socket *fh = get (fd);
+ if (fh)
+ res = fh->bind (my_addr, addrlen);
+ }
+ __except (EFAULT) {}
+ __endtry
syscall_printf ("%R = bind(%d, %p, %d)", res, fd, my_addr, addrlen);
return res;
}
@@ -1387,16 +1601,16 @@ cygwin_bind (int fd, const struct sockaddr *my_addr, socklen_t addrlen)
extern "C" int
cygwin_getsockname (int fd, struct sockaddr *addr, socklen_t *namelen)
{
- int res;
-
- fhandler_socket *fh = get (fd);
-
- myfault efault;
- if (efault.faulted (EFAULT) || !fh)
- res = -1;
- else
- res = fh->getsockname (addr, namelen);
+ int res = -1;
+ __try
+ {
+ fhandler_socket *fh = get (fd);
+ if (fh)
+ res = fh->getsockname (addr, namelen);
+ }
+ __except (EFAULT) {}
+ __endtry
syscall_printf ("%R =getsockname (%d, %p, %p)", res, fd, addr, namelen);
return res;
}
@@ -1405,14 +1619,16 @@ cygwin_getsockname (int fd, struct sockaddr *addr, socklen_t *namelen)
extern "C" int
cygwin_listen (int fd, int backlog)
{
- int res;
- fhandler_socket *fh = get (fd);
-
- if (!fh)
- res = -1;
- else
- res = fh->listen (backlog);
+ int res = -1;
+ __try
+ {
+ fhandler_socket *fh = get (fd);
+ if (fh)
+ res = fh->listen (backlog);
+ }
+ __except (EFAULT) {}
+ __endtry
syscall_printf ("%R = listen(%d, %d)", res, fd, backlog);
return res;
}
@@ -1421,15 +1637,11 @@ cygwin_listen (int fd, int backlog)
extern "C" int
cygwin_shutdown (int fd, int how)
{
- int res;
+ int res = -1;
fhandler_socket *fh = get (fd);
-
- if (!fh)
- res = -1;
- else
+ if (fh)
res = fh->shutdown (how);
-
syscall_printf ("%R = shutdown(%d, %d)", res, fd, how);
return res;
}
@@ -1451,51 +1663,54 @@ cygwin_hstrerror (int err)
extern "C" void
cygwin_herror (const char *s)
{
- myfault efault;
- if (efault.faulted ())
- return;
- if (cygheap->fdtab.not_open (2))
- return;
-
- if (s)
+ __try
{
- write (2, s, strlen (s));
- write (2, ": ", 2);
- }
+ if (cygheap->fdtab.not_open (2))
+ return;
+
+ if (s)
+ {
+ write (2, s, strlen (s));
+ write (2, ": ", 2);
+ }
- const char *h_errstr = cygwin_hstrerror (h_errno);
+ const char *h_errstr = cygwin_hstrerror (h_errno);
- if (!h_errstr)
- switch (h_errno)
- {
- case NETDB_INTERNAL:
- h_errstr = "Resolver internal error";
- break;
- case NETDB_SUCCESS:
- h_errstr = "Resolver error 0 (no error)";
- break;
- default:
- h_errstr = "Unknown resolver error";
- break;
- }
- write (2, h_errstr, strlen (h_errstr));
- write (2, "\n", 1);
+ if (!h_errstr)
+ switch (h_errno)
+ {
+ case NETDB_INTERNAL:
+ h_errstr = "Resolver internal error";
+ break;
+ case NETDB_SUCCESS:
+ h_errstr = "Resolver error 0 (no error)";
+ break;
+ default:
+ h_errstr = "Unknown resolver error";
+ break;
+ }
+ write (2, h_errstr, strlen (h_errstr));
+ write (2, "\n", 1);
+ }
+ __except (NO_ERROR) {}
+ __endtry
}
/* exported as getpeername: standards? */
extern "C" int
cygwin_getpeername (int fd, struct sockaddr *name, socklen_t *len)
{
- int res;
-
- fhandler_socket *fh = get (fd);
-
- myfault efault;
- if (efault.faulted (EFAULT) || !fh)
- res = -1;
- else
- res = fh->getpeername (name, len);
+ int res = -1;
+ fhandler_socket *fh = NULL;
+ __try
+ {
+ fh = get (fd);
+ if (fh)
+ res = fh->getpeername (name, len);
+ }
+ __except (EFAULT) {}
+ __endtry
syscall_printf ("%R = getpeername(%d) %p", res, fd,
(fh ? fh->get_socket () : (SOCKET) -1));
return res;
@@ -1505,22 +1720,22 @@ cygwin_getpeername (int fd, struct sockaddr *name, socklen_t *len)
extern "C" ssize_t
cygwin_recv (int fd, void *buf, size_t len, int flags)
{
- ssize_t res;
+ ssize_t res = -1;
pthread_testcancel ();
- fhandler_socket *fh = get (fd);
-
- myfault efault;
- if (efault.faulted (EFAULT) || !fh)
- res = -1;
- else
- /* Originally we shortcircuited here if res == 0.
- Allow 0 bytes buffer. This is valid in POSIX and handled in
- fhandler_socket::recv_internal. If we shortcircuit, we fail
- to deliver valid error conditions. */
- res = fh->recvfrom (buf, len, flags, NULL, NULL);
-
+ __try
+ {
+ fhandler_socket *fh = get (fd);
+ if (fh)
+ /* Originally we shortcircuited here if res == 0.
+ Allow 0 bytes buffer. This is valid in POSIX and handled in
+ fhandler_socket::recv_internal. If we shortcircuit, we fail
+ to deliver valid error conditions. */
+ res = fh->recvfrom (buf, len, flags, NULL, NULL);
+ }
+ __except (EFAULT) {}
+ __endtry
syscall_printf ("%lR = recv(%d, %p, %ld, %y)", res, fd, buf, len, flags);
return res;
}
@@ -1529,18 +1744,18 @@ cygwin_recv (int fd, void *buf, size_t len, int flags)
extern "C" ssize_t
cygwin_send (int fd, const void *buf, size_t len, int flags)
{
- ssize_t res;
+ ssize_t res = -1;
pthread_testcancel ();
- fhandler_socket *fh = get (fd);
-
- myfault efault;
- if (efault.faulted (EFAULT) || !fh)
- res = -1;
- else
- res = fh->sendto (buf, len, flags, NULL, 0);
-
+ __try
+ {
+ fhandler_socket *fh = get (fd);
+ if (fh)
+ res = fh->sendto (buf, len, flags, NULL, 0);
+ }
+ __except (EFAULT)
+ __endtry
syscall_printf ("%lR = send(%d, %p, %ld, %y)", res, fd, buf, len, flags);
return res;
}
@@ -1549,21 +1764,22 @@ cygwin_send (int fd, const void *buf, size_t len, int flags)
extern "C" int
getdomainname (char *domain, size_t len)
{
- myfault efault;
- if (efault.faulted (EFAULT))
- return -1;
-
- PFIXED_INFO info = NULL;
- ULONG size = 0;
-
- if (GetNetworkParams(info, &size) == ERROR_BUFFER_OVERFLOW
- && (info = (PFIXED_INFO) alloca(size))
- && GetNetworkParams(info, &size) == ERROR_SUCCESS)
+ __try
{
- strncpy(domain, info->DomainName, len);
- return 0;
+ PFIXED_INFO info = NULL;
+ ULONG size = 0;
+
+ if (GetNetworkParams(info, &size) == ERROR_BUFFER_OVERFLOW
+ && (info = (PFIXED_INFO) alloca(size))
+ && GetNetworkParams(info, &size) == ERROR_SUCCESS)
+ {
+ strncpy(domain, info->DomainName, len);
+ return 0;
+ }
+ __seterrno ();
}
- __seterrno ();
+ __except (EFAULT)
+ __endtry
return -1;
}
@@ -1655,7 +1871,7 @@ call_gaa (LPVOID param)
if (ret != ERROR_SUCCESS)
{
free (pa0);
- *p->pa_ret = pa0;
+ *p->pa_ret = NULL;
}
else
*p->pa_ret = pa0;
@@ -1667,7 +1883,7 @@ bool
get_adapters_addresses (PIP_ADAPTER_ADDRESSES *pa_ret, ULONG family)
{
DWORD ret;
- gaa_wa param = { family, pa_ret ?: NULL };
+ gaa_wa param = { family, pa_ret };
if ((uintptr_t) &param >= (uintptr_t) 0x80000000L
&& wincap.has_gaa_largeaddress_bug ())
@@ -1693,21 +1909,7 @@ get_adapters_addresses (PIP_ADAPTER_ADDRESSES *pa_ret, ULONG family)
return ret == ERROR_SUCCESS || (!pa_ret && ret == ERROR_BUFFER_OVERFLOW);
}
-#define WS_IFF_UP 1
-#define WS_IFF_BROADCAST 2
-#define WS_IFF_LOOPBACK 4
-#define WS_IFF_POINTTOPOINT 8
-#define WS_IFF_MULTICAST 16
-
-static inline short
-convert_ifr_flags (u_long ws_flags)
-{
- return (ws_flags & (WS_IFF_UP | WS_IFF_BROADCAST))
- | ((ws_flags & (WS_IFF_LOOPBACK | WS_IFF_POINTTOPOINT)) << 1)
- | ((ws_flags & WS_IFF_MULTICAST) << 8);
-}
-
-static u_long
+static in_addr_t
get_routedst (DWORD if_index)
{
PMIB_IPFORWARDTABLE pift;
@@ -1730,11 +1932,7 @@ struct ifall {
struct sockaddr_storage ifa_addr;
struct sockaddr_storage ifa_brddstaddr;
struct sockaddr_storage ifa_netmask;
- struct sockaddr ifa_hwaddr;
- int ifa_metric;
- int ifa_mtu;
- int ifa_ifindex;
- struct ifreq_frndlyname ifa_frndlyname;
+ struct ifaddrs_hwdata ifa_hwdata;
};
static unsigned int
@@ -1884,10 +2082,10 @@ static void
get_friendlyname (struct ifall *ifp, PIP_ADAPTER_ADDRESSES pap)
{
struct ifreq_frndlyname *iff = (struct ifreq_frndlyname *)
- &ifp->ifa_frndlyname;
+ &ifp->ifa_hwdata.ifa_frndlyname;
iff->ifrf_len = sys_wcstombs (iff->ifrf_friendlyname,
IFRF_FRIENDLYNAMESIZ,
- pap->FriendlyName);
+ pap->FriendlyName) + 1;
}
static void
@@ -1895,9 +2093,9 @@ get_hwaddr (struct ifall *ifp, PIP_ADAPTER_ADDRESSES pap)
{
for (UINT i = 0; i < IFHWADDRLEN; ++i)
if (i >= pap->PhysicalAddressLength)
- ifp->ifa_hwaddr.sa_data[i] = '\0';
+ ifp->ifa_hwdata.ifa_hwaddr.sa_data[i] = '\0';
else
- ifp->ifa_hwaddr.sa_data[i] = pap->PhysicalAddress[i];
+ ifp->ifa_hwdata.ifa_hwaddr.sa_data[i] = pap->PhysicalAddress[i];
}
/*
@@ -2013,13 +2211,15 @@ get_ifs (ULONG family)
/* Hardware address */
get_hwaddr (ifp, pap);
/* Metric */
- ifp->ifa_metric = 1;
+ ifp->ifa_hwdata.ifa_metric = 1;
/* MTU */
- ifp->ifa_mtu = pap->Mtu;
+ ifp->ifa_hwdata.ifa_mtu = pap->Mtu;
/* Interface index */
- ifp->ifa_ifindex = pap->IfIndex;
+ ifp->ifa_hwdata.ifa_ifindex = pap->IfIndex;
/* Friendly name */
get_friendlyname (ifp, pap);
+ /* Let ifa_data member point to "ifaddrs_hwdata" data. */
+ ifp->ifa_ifa.ifa_data = &ifp->ifa_hwdata;
++ifp;
}
else
@@ -2062,10 +2262,12 @@ get_ifs (ULONG family)
break;
case AF_INET6:
if_sin6 = (struct sockaddr_in6 *) &ifp->ifa_netmask;
- for (cnt = 0; cnt < 4 && prefix; ++cnt, prefix -= 32)
- if_sin6->sin6_addr.s6_addr32[cnt] = UINT32_MAX;
- if (prefix < 32)
- if_sin6->sin6_addr.s6_addr32[cnt] <<= 32 - prefix;
+ for (cnt = 0; cnt < 4 && prefix > 0; ++cnt, prefix -= 32)
+ {
+ if_sin6->sin6_addr.s6_addr32[cnt] = UINT32_MAX;
+ if (prefix < 32)
+ if_sin6->sin6_addr.s6_addr32[cnt] <<= 32 - prefix;
+ }
break;
}
ifp->ifa_ifa.ifa_netmask = (struct sockaddr *) &ifp->ifa_netmask;
@@ -2105,17 +2307,20 @@ get_ifs (ULONG family)
get_hwaddr (ifp, pap);
/* Metric */
if (wincap.has_gaa_on_link_prefix ())
- ifp->ifa_metric = (sa->sa_family == AF_INET
- ? ((PIP_ADAPTER_ADDRESSES_LH) pap)->Ipv4Metric
- : ((PIP_ADAPTER_ADDRESSES_LH) pap)->Ipv6Metric);
+ ifp->ifa_hwdata.ifa_metric
+ = (sa->sa_family == AF_INET)
+ ? ((PIP_ADAPTER_ADDRESSES_LH) pap)->Ipv4Metric
+ : ((PIP_ADAPTER_ADDRESSES_LH) pap)->Ipv6Metric;
else
- ifp->ifa_metric = 1;
+ ifp->ifa_hwdata.ifa_metric = 1;
/* MTU */
- ifp->ifa_mtu = pap->Mtu;
+ ifp->ifa_hwdata.ifa_mtu = pap->Mtu;
/* Interface index */
- ifp->ifa_ifindex = pap->IfIndex;
+ ifp->ifa_hwdata.ifa_ifindex = pap->IfIndex;
/* Friendly name */
get_friendlyname (ifp, pap);
+ /* Let ifa_data member point to "ifaddrs_hwdata" data. */
+ ifp->ifa_ifa.ifa_data = &ifp->ifa_hwdata;
++ifp;
# undef sin
# undef sin6
@@ -2156,85 +2361,88 @@ freeifaddrs (struct ifaddrs *ifp)
int
get_ifconf (struct ifconf *ifc, int what)
{
- myfault efault;
- if (efault.faulted (EFAULT))
- return -1;
-
- /* Ensure we have space for at least one struct ifreqs, fail if not. */
- if (ifc->ifc_len < (int) sizeof (struct ifreq))
+ __try
{
- set_errno (EINVAL);
- return -1;
- }
+ /* Ensure we have space for at least one struct ifreqs, fail if not. */
+ if (ifc->ifc_len < (int) sizeof (struct ifreq))
+ {
+ set_errno (EINVAL);
+ __leave;
+ }
- struct ifall *ifret, *ifp;
- ifret = get_ifs (AF_INET);
- if (!ifret)
- return -1;
+ struct ifall *ifret, *ifp;
+ ifret = get_ifs (AF_INET);
+ if (!ifret)
+ __leave;
- struct sockaddr_in *sin;
- struct ifreq *ifr = ifc->ifc_req;
- int cnt = 0;
- for (ifp = ifret; ifp; ifp = (struct ifall *) ifp->ifa_ifa.ifa_next)
- {
- ++cnt;
- strcpy (ifr->ifr_name, ifp->ifa_name);
- switch (what)
+ struct sockaddr_in *sin;
+ struct ifreq *ifr = ifc->ifc_req;
+ int cnt = 0;
+ for (ifp = ifret; ifp; ifp = (struct ifall *) ifp->ifa_ifa.ifa_next)
{
- case SIOCGIFFLAGS:
- ifr->ifr_flags = ifp->ifa_ifa.ifa_flags;
- break;
- case SIOCGIFCONF:
- case SIOCGIFADDR:
- sin = (struct sockaddr_in *) &ifr->ifr_addr;
- memcpy (sin, &ifp->ifa_addr, sizeof *sin);
- break;
- case SIOCGIFNETMASK:
- sin = (struct sockaddr_in *) &ifr->ifr_netmask;
- memcpy (sin, &ifp->ifa_netmask, sizeof *sin);
- break;
- case SIOCGIFDSTADDR:
- sin = (struct sockaddr_in *) &ifr->ifr_dstaddr;
- if (ifp->ifa_ifa.ifa_flags & IFF_POINTOPOINT)
- memcpy (sin, &ifp->ifa_brddstaddr, sizeof *sin);
- else /* Return addr as on Linux. */
- memcpy (sin, &ifp->ifa_addr, sizeof *sin);
- break;
- case SIOCGIFBRDADDR:
- sin = (struct sockaddr_in *) &ifr->ifr_broadaddr;
- if (!(ifp->ifa_ifa.ifa_flags & IFF_POINTOPOINT))
- memcpy (sin, &ifp->ifa_brddstaddr, sizeof *sin);
- else
+ ++cnt;
+ strcpy (ifr->ifr_name, ifp->ifa_name);
+ switch (what)
{
- sin->sin_addr.s_addr = INADDR_ANY;
- sin->sin_family = AF_INET;
- sin->sin_port = 0;
+ case SIOCGIFFLAGS:
+ ifr->ifr_flags = ifp->ifa_ifa.ifa_flags;
+ break;
+ case SIOCGIFCONF:
+ case SIOCGIFADDR:
+ sin = (struct sockaddr_in *) &ifr->ifr_addr;
+ memcpy (sin, &ifp->ifa_addr, sizeof *sin);
+ break;
+ case SIOCGIFNETMASK:
+ sin = (struct sockaddr_in *) &ifr->ifr_netmask;
+ memcpy (sin, &ifp->ifa_netmask, sizeof *sin);
+ break;
+ case SIOCGIFDSTADDR:
+ sin = (struct sockaddr_in *) &ifr->ifr_dstaddr;
+ if (ifp->ifa_ifa.ifa_flags & IFF_POINTOPOINT)
+ memcpy (sin, &ifp->ifa_brddstaddr, sizeof *sin);
+ else /* Return addr as on Linux. */
+ memcpy (sin, &ifp->ifa_addr, sizeof *sin);
+ break;
+ case SIOCGIFBRDADDR:
+ sin = (struct sockaddr_in *) &ifr->ifr_broadaddr;
+ if (!(ifp->ifa_ifa.ifa_flags & IFF_POINTOPOINT))
+ memcpy (sin, &ifp->ifa_brddstaddr, sizeof *sin);
+ else
+ {
+ sin->sin_addr.s_addr = INADDR_ANY;
+ sin->sin_family = AF_INET;
+ sin->sin_port = 0;
+ }
+ break;
+ case SIOCGIFHWADDR:
+ memcpy (&ifr->ifr_hwaddr, &ifp->ifa_hwdata.ifa_hwaddr,
+ sizeof ifr->ifr_hwaddr);
+ break;
+ case SIOCGIFMETRIC:
+ ifr->ifr_metric = ifp->ifa_hwdata.ifa_metric;
+ break;
+ case SIOCGIFMTU:
+ ifr->ifr_mtu = ifp->ifa_hwdata.ifa_mtu;
+ break;
+ case SIOCGIFINDEX:
+ ifr->ifr_ifindex = ifp->ifa_hwdata.ifa_ifindex;
+ break;
+ case SIOCGIFFRNDLYNAM:
+ memcpy (ifr->ifr_frndlyname, &ifp->ifa_hwdata.ifa_frndlyname,
+ sizeof (struct ifreq_frndlyname));
}
- break;
- case SIOCGIFHWADDR:
- memcpy (&ifr->ifr_hwaddr, &ifp->ifa_hwaddr, sizeof ifr->ifr_hwaddr);
- break;
- case SIOCGIFMETRIC:
- ifr->ifr_metric = ifp->ifa_metric;
- break;
- case SIOCGIFMTU:
- ifr->ifr_mtu = ifp->ifa_mtu;
- break;
- case SIOCGIFINDEX:
- ifr->ifr_ifindex = ifp->ifa_ifindex;
- break;
- case SIOCGIFFRNDLYNAM:
- memcpy (ifr->ifr_frndlyname, &ifp->ifa_frndlyname,
- sizeof (struct ifreq_frndlyname));
+ if ((caddr_t) ++ifr >
+ ifc->ifc_buf + ifc->ifc_len - sizeof (struct ifreq))
+ break;
}
- if ((caddr_t) ++ifr >
- ifc->ifc_buf + ifc->ifc_len - sizeof (struct ifreq))
- break;
+ /* Set the correct length */
+ ifc->ifc_len = cnt * sizeof (struct ifreq);
+ free (ifret);
+ return 0;
}
- /* Set the correct length */
- ifc->ifc_len = cnt * sizeof (struct ifreq);
- free (ifret);
- return 0;
+ __except (EFAULT) {}
+ __endtry
+ return -1;
}
extern "C" unsigned
@@ -2243,26 +2451,30 @@ if_nametoindex (const char *name)
PIP_ADAPTER_ADDRESSES pa0 = NULL, pap;
unsigned index = 0;
- myfault efault;
- if (efault.faulted (EFAULT))
- return 0;
-
- if (get_adapters_addresses (&pa0, AF_UNSPEC))
+ __try
{
- char lname[IF_NAMESIZE], *c;
-
- lname[0] = '\0';
- strncat (lname, name, IF_NAMESIZE - 1);
- if (lname[0] == '{' && (c = strchr (lname, ':')))
- *c = '\0';
- for (pap = pa0; pap; pap = pap->Next)
- if (strcasematch (lname, pap->AdapterName))
- {
- index = pap->Ipv6IfIndex ?: pap->IfIndex;
- break;
- }
- free (pa0);
+ if (get_adapters_addresses (&pa0, AF_UNSPEC))
+ {
+ char lname[IF_NAMESIZE], *c;
+
+ lname[0] = '\0';
+ strncat (lname, name, IF_NAMESIZE - 1);
+ if (lname[0] == '{' && (c = strchr (lname, ':')))
+ *c = '\0';
+ for (pap = pa0; pap; pap = pap->Next)
+ if (strcasematch (lname, pap->AdapterName))
+ {
+ index = pap->Ipv6IfIndex ?: pap->IfIndex;
+ break;
+ }
+ free (pa0);
+ }
}
+ __except (EFAULT)
+ {
+ index = 0;
+ }
+ __endtry
return index;
}
@@ -2272,35 +2484,38 @@ if_indextoname (unsigned ifindex, char *ifname)
PIP_ADAPTER_ADDRESSES pa0 = NULL, pap;
char *name = NULL;
- myfault efault;
- if (efault.faulted (EFAULT))
- return NULL;
-
- if (get_adapters_addresses (&pa0, AF_UNSPEC))
+ __try
{
- for (pap = pa0; pap; pap = pap->Next)
- if (ifindex == (pap->Ipv6IfIndex ?: pap->IfIndex))
- {
- /* Unfortunately the pre-Vista IPv6 stack has a distinct loopback
- device with the same Ipv6IfIndex as the IfIndex of the IPv4
- loopback device, but with a different adapter name.
- For consistency with /proc/net/if_inet6, try to find the
- IPv6 loopback device and use that adapter name instead.
- We identify the loopback device by its IfIndex of 1. */
- if (pap->IfIndex == 1 && pap->Ipv6IfIndex == 0)
- for (PIP_ADAPTER_ADDRESSES pap2 = pa0; pap2; pap2 = pap2->Next)
- if (pap2->Ipv6IfIndex == 1)
- {
- pap = pap2;
- break;
- }
- name = strcpy (ifname, pap->AdapterName);
- break;
- }
- free (pa0);
+ if (get_adapters_addresses (&pa0, AF_UNSPEC))
+ {
+ for (pap = pa0; pap; pap = pap->Next)
+ if (ifindex == (pap->Ipv6IfIndex ?: pap->IfIndex))
+ {
+ /* Unfortunately the pre-Vista IPv6 stack has a distinct
+ loopback device with the same Ipv6IfIndex as the IfIndex
+ of the IPv4 loopback device, but with a different adapter
+ name. For consistency with /proc/net/if_inet6, try to find
+ the IPv6 loopback device and use that adapter name instead.
+ We identify the loopback device by its IfIndex of 1. */
+ if (pap->IfIndex == 1 && pap->Ipv6IfIndex == 0)
+ for (PIP_ADAPTER_ADDRESSES pap2 = pa0;
+ pap2;
+ pap2 = pap2->Next)
+ if (pap2->Ipv6IfIndex == 1)
+ {
+ pap = pap2;
+ break;
+ }
+ name = strcpy (ifname, pap->AdapterName);
+ break;
+ }
+ free (pa0);
+ }
+ else
+ set_errno (ENXIO);
}
- else
- set_errno (ENXIO);
+ __except (EFAULT) {}
+ __endtry
return name;
}
@@ -2311,58 +2526,60 @@ if_nameindex (void)
struct if_nameindex *iflist = NULL;
char (*ifnamelist)[IF_NAMESIZE];
- myfault efault;
- if (efault.faulted (EFAULT))
- return NULL;
-
- if (get_adapters_addresses (&pa0, AF_UNSPEC))
+ __try
{
- int cnt = 0;
- for (pap = pa0; pap; pap = pap->Next)
- ++cnt;
- iflist = (struct if_nameindex *)
- malloc ((cnt + 1) * sizeof (struct if_nameindex)
- + cnt * IF_NAMESIZE);
- if (!iflist)
- set_errno (ENOBUFS);
- else
+ if (get_adapters_addresses (&pa0, AF_UNSPEC))
{
- ifnamelist = (char (*)[IF_NAMESIZE]) (iflist + cnt + 1);
- for (pap = pa0, cnt = 0; pap; pap = pap->Next)
+ int cnt = 0;
+ for (pap = pa0; pap; pap = pap->Next)
+ ++cnt;
+ iflist = (struct if_nameindex *)
+ malloc ((cnt + 1) * sizeof (struct if_nameindex)
+ + cnt * IF_NAMESIZE);
+ if (!iflist)
+ set_errno (ENOBUFS);
+ else
{
- for (int i = 0; i < cnt; ++i)
- if (iflist[i].if_index == (pap->Ipv6IfIndex ?: pap->IfIndex))
- goto outer_loop;
- iflist[cnt].if_index = pap->Ipv6IfIndex ?: pap->IfIndex;
- strcpy (iflist[cnt].if_name = ifnamelist[cnt], pap->AdapterName);
- /* See comment in if_indextoname. */
- if (pap->IfIndex == 1 && pap->Ipv6IfIndex == 0)
- for (PIP_ADAPTER_ADDRESSES pap2 = pa0; pap2; pap2 = pap2->Next)
- if (pap2->Ipv6IfIndex == 1)
- {
- strcpy (ifnamelist[cnt], pap2->AdapterName);
- break;
- }
- ++cnt;
- outer_loop:
- ;
+ ifnamelist = (char (*)[IF_NAMESIZE]) (iflist + cnt + 1);
+ for (pap = pa0, cnt = 0; pap; pap = pap->Next)
+ {
+ for (int i = 0; i < cnt; ++i)
+ if (iflist[i].if_index
+ == (pap->Ipv6IfIndex ?: pap->IfIndex))
+ goto outer_loop;
+ iflist[cnt].if_index = pap->Ipv6IfIndex ?: pap->IfIndex;
+ strcpy (iflist[cnt].if_name = ifnamelist[cnt],
+ pap->AdapterName);
+ /* See comment in if_indextoname. */
+ if (pap->IfIndex == 1 && pap->Ipv6IfIndex == 0)
+ for (PIP_ADAPTER_ADDRESSES pap2 = pa0;
+ pap2;
+ pap2 = pap2->Next)
+ if (pap2->Ipv6IfIndex == 1)
+ {
+ strcpy (ifnamelist[cnt], pap2->AdapterName);
+ break;
+ }
+ ++cnt;
+ outer_loop:
+ ;
+ }
+ iflist[cnt].if_index = 0;
+ iflist[cnt].if_name = NULL;
}
- iflist[cnt].if_index = 0;
- iflist[cnt].if_name = NULL;
+ free (pa0);
}
- free (pa0);
+ else
+ set_errno (ENXIO);
}
- else
- set_errno (ENXIO);
+ __except (EFAULT) {}
+ __endtry
return iflist;
}
extern "C" void
if_freenameindex (struct if_nameindex *ptr)
{
- myfault efault;
- if (efault.faulted (EFAULT))
- return;
free (ptr);
}
@@ -2378,72 +2595,75 @@ cygwin_bindresvport_sa (int fd, struct sockaddr *sa)
struct sockaddr_in6 *sin6 = NULL;
in_port_t port;
socklen_t salen;
- int ret;
+ int ret = -1;
- myfault efault;
- if (efault.faulted (EFAULT))
- return -1;
+ __try
+ {
+ fhandler_socket *fh = get (fd);
+ if (!fh)
+ __leave;
- fhandler_socket *fh = get (fd);
- if (!fh)
- return -1;
+ if (!sa)
+ {
+ sa = (struct sockaddr *) &sst;
+ memset (&sst, 0, sizeof sst);
+ sa->sa_family = fh->get_addr_family ();
+ }
- if (!sa)
- {
- sa = (struct sockaddr *) &sst;
- memset (&sst, 0, sizeof sst);
- sa->sa_family = fh->get_addr_family ();
- }
+ switch (sa->sa_family)
+ {
+ case AF_INET:
+ salen = sizeof (struct sockaddr_in);
+ sin = (struct sockaddr_in *) sa;
+ port = sin->sin_port;
+ break;
+ case AF_INET6:
+ salen = sizeof (struct sockaddr_in6);
+ sin6 = (struct sockaddr_in6 *) sa;
+ port = sin6->sin6_port;
+ break;
+ default:
+ set_errno (EPFNOSUPPORT);
+ __leave;
+ }
- switch (sa->sa_family)
- {
- case AF_INET:
- salen = sizeof (struct sockaddr_in);
- sin = (struct sockaddr_in *) sa;
- port = sin->sin_port;
- break;
- case AF_INET6:
- salen = sizeof (struct sockaddr_in6);
- sin6 = (struct sockaddr_in6 *) sa;
- port = sin6->sin6_port;
- break;
- default:
- set_errno (EPFNOSUPPORT);
- return -1;
- }
+ /* If a non-zero port number is given, try this first. If that succeeds,
+ or if the error message is serious, return. */
+ if (port)
+ {
+ ret = fh->bind (sa, salen);
+ if (!ret || (get_errno () != EADDRINUSE && get_errno () != EINVAL))
+ __leave;
+ }
- /* If a non-zero port number is given, try this first. If that succeeds,
- or if the error message is serious, return. */
- if (port)
- {
- ret = fh->bind (sa, salen);
- if (!ret || (get_errno () != EADDRINUSE && get_errno () != EINVAL))
- return ret;
- }
+ LONG myport;
- LONG myport;
+ for (int i = 0; i < NUM_PORTS; i++)
+ {
+ while ((myport = InterlockedExchange (
+ &cygwin_shared->last_used_bindresvport, -1)) == -1)
+ yield ();
+ if (myport == 0 || --myport < PORT_LOW)
+ myport = PORT_HIGH;
+ InterlockedExchange (&cygwin_shared->last_used_bindresvport, myport);
+
+ if (sa->sa_family == AF_INET6)
+ sin6->sin6_port = htons (myport);
+ else
+ sin->sin_port = htons (myport);
+ if (!(ret = fh->bind (sa, salen)))
+ break;
+ if (get_errno () != EADDRINUSE && get_errno () != EINVAL)
+ break;
+ }
- for (int i = 0; i < NUM_PORTS; i++)
- {
- while ((myport = InterlockedExchange (&cygwin_shared->last_used_bindresvport, -1)) == -1)
- yield ();
- if (myport == 0 || --myport < PORT_LOW)
- myport = PORT_HIGH;
- InterlockedExchange (&cygwin_shared->last_used_bindresvport, myport);
-
- if (sa->sa_family == AF_INET6)
- sin6->sin6_port = htons (myport);
- else
- sin->sin_port = htons (myport);
- if (!(ret = fh->bind (sa, salen)))
- break;
- if (get_errno () != EADDRINUSE && get_errno () != EINVAL)
- break;
}
-
+ __except (EFAULT) {}
+ __endtry
return ret;
}
+
extern "C" int
cygwin_bindresvport (int fd, struct sockaddr_in *sin)
{
@@ -2456,204 +2676,195 @@ extern "C" int
socketpair (int family, int type, int protocol, int *sb)
{
int res = -1;
- SOCKET insock, outsock, newsock;
+ SOCKET insock = INVALID_SOCKET;
+ SOCKET outsock = INVALID_SOCKET;
+ SOCKET newsock = INVALID_SOCKET;
struct sockaddr_in sock_in, sock_out;
int len;
- myfault efault;
- if (efault.faulted (EFAULT))
- return -1;
-
- int flags = type & _SOCK_FLAG_MASK;
- type &= ~_SOCK_FLAG_MASK;
-
- if (family != AF_LOCAL && family != AF_INET)
- {
- set_errno (EAFNOSUPPORT);
- goto done;
- }
- if (type != SOCK_STREAM && type != SOCK_DGRAM)
- {
- set_errno (EPROTOTYPE);
- goto done;
- }
- if ((flags & ~(SOCK_NONBLOCK | SOCK_CLOEXEC)) != 0)
- {
- set_errno (EINVAL);
- goto done;
- }
- if ((family == AF_LOCAL && protocol != PF_UNSPEC && protocol != PF_LOCAL)
- || (family == AF_INET && protocol != PF_UNSPEC && protocol != PF_INET))
- {
- set_errno (EPROTONOSUPPORT);
- goto done;
- }
-
- /* create the first socket */
- newsock = socket (AF_INET, type, 0);
- if (newsock == INVALID_SOCKET)
+ __try
{
- debug_printf ("first socket call failed");
- set_winsock_errno ();
- goto done;
- }
+ int flags = type & _SOCK_FLAG_MASK;
+ type &= ~_SOCK_FLAG_MASK;
- /* bind the socket to any unused port */
- sock_in.sin_family = AF_INET;
- sock_in.sin_port = 0;
- sock_in.sin_addr.s_addr = htonl (INADDR_LOOPBACK);
- if (bind (newsock, (struct sockaddr *) &sock_in, sizeof (sock_in)) < 0)
- {
- debug_printf ("bind failed");
- set_winsock_errno ();
- closesocket (newsock);
- goto done;
- }
- len = sizeof (sock_in);
- if (getsockname (newsock, (struct sockaddr *) &sock_in, &len) < 0)
- {
- debug_printf ("getsockname error");
- set_winsock_errno ();
- closesocket (newsock);
- goto done;
- }
-
- /* For stream sockets, create a listener */
- if (type == SOCK_STREAM)
- listen (newsock, 2);
+ if (family != AF_LOCAL && family != AF_INET)
+ {
+ set_errno (EAFNOSUPPORT);
+ __leave;
+ }
+ if (type != SOCK_STREAM && type != SOCK_DGRAM)
+ {
+ set_errno (EPROTOTYPE);
+ __leave;
+ }
+ if ((flags & ~(SOCK_NONBLOCK | SOCK_CLOEXEC)) != 0)
+ {
+ set_errno (EINVAL);
+ __leave;
+ }
+ if ((family == AF_LOCAL && protocol != PF_UNSPEC && protocol != PF_LOCAL)
+ || (family == AF_INET && protocol != PF_UNSPEC && protocol != PF_INET))
+ {
+ set_errno (EPROTONOSUPPORT);
+ __leave;
+ }
- /* create a connecting socket */
- outsock = socket (AF_INET, type, 0);
- if (outsock == INVALID_SOCKET)
- {
- debug_printf ("second socket call failed");
- set_winsock_errno ();
- closesocket (newsock);
- goto done;
- }
+ /* create the first socket */
+ newsock = socket (AF_INET, type, 0);
+ if (newsock == INVALID_SOCKET)
+ {
+ debug_printf ("first socket call failed");
+ set_winsock_errno ();
+ __leave;
+ }
- /* For datagram sockets, bind the 2nd socket to an unused address, too */
- if (type == SOCK_DGRAM)
- {
- sock_out.sin_family = AF_INET;
- sock_out.sin_port = 0;
- sock_out.sin_addr.s_addr = htonl (INADDR_LOOPBACK);
- if (bind (outsock, (struct sockaddr *) &sock_out, sizeof (sock_out)) < 0)
+ /* bind the socket to any unused port */
+ sock_in.sin_family = AF_INET;
+ sock_in.sin_port = 0;
+ sock_in.sin_addr.s_addr = htonl (INADDR_LOOPBACK);
+ if (bind (newsock, (struct sockaddr *) &sock_in, sizeof (sock_in)) < 0)
{
debug_printf ("bind failed");
set_winsock_errno ();
- closesocket (newsock);
- closesocket (outsock);
- goto done;
+ __leave;
}
- len = sizeof (sock_out);
- if (getsockname (outsock, (struct sockaddr *) &sock_out, &len) < 0)
+ len = sizeof (sock_in);
+ if (getsockname (newsock, (struct sockaddr *) &sock_in, &len) < 0)
{
debug_printf ("getsockname error");
set_winsock_errno ();
- closesocket (newsock);
- closesocket (outsock);
- goto done;
+ __leave;
}
- }
-
- /* Force IP address to loopback */
- sock_in.sin_addr.s_addr = htonl (INADDR_LOOPBACK);
- if (type == SOCK_DGRAM)
- sock_out.sin_addr.s_addr = htonl (INADDR_LOOPBACK);
- /* Do a connect */
- if (connect (outsock, (struct sockaddr *) &sock_in, sizeof (sock_in)) < 0)
- {
- debug_printf ("connect error");
- set_winsock_errno ();
- closesocket (newsock);
- closesocket (outsock);
- goto done;
- }
+ /* For stream sockets, create a listener */
+ if (type == SOCK_STREAM)
+ listen (newsock, 2);
- if (type == SOCK_STREAM)
- {
- /* For stream sockets, accept the connection and close the listener */
- len = sizeof (sock_in);
- insock = accept (newsock, (struct sockaddr *) &sock_in, &len);
- if (insock == INVALID_SOCKET)
+ /* create a connecting socket */
+ outsock = socket (AF_INET, type, 0);
+ if (outsock == INVALID_SOCKET)
{
- debug_printf ("accept error");
+ debug_printf ("second socket call failed");
set_winsock_errno ();
- closesocket (newsock);
- closesocket (outsock);
- goto done;
+ __leave;
}
- closesocket (newsock);
- }
- else
- {
- /* For datagram sockets, connect the 2nd socket */
- if (connect (newsock, (struct sockaddr *) &sock_out,
- sizeof (sock_out)) < 0)
+
+ /* For datagram sockets, bind the 2nd socket to an unused address, too */
+ if (type == SOCK_DGRAM)
{
- debug_printf ("connect error");
- set_winsock_errno ();
- closesocket (newsock);
- closesocket (outsock);
- goto done;
+ sock_out.sin_family = AF_INET;
+ sock_out.sin_port = 0;
+ sock_out.sin_addr.s_addr = htonl (INADDR_LOOPBACK);
+ if (bind (outsock, (struct sockaddr *) &sock_out, sizeof (sock_out)) < 0)
+ {
+ debug_printf ("bind failed");
+ set_winsock_errno ();
+ __leave;
+ }
+ len = sizeof (sock_out);
+ if (getsockname (outsock, (struct sockaddr *) &sock_out, &len) < 0)
+ {
+ debug_printf ("getsockname error");
+ set_winsock_errno ();
+ __leave;
+ }
}
- insock = newsock;
- }
- {
- cygheap_fdnew sb0;
- const device *dev;
+ /* Force IP address to loopback */
+ sock_in.sin_addr.s_addr = htonl (INADDR_LOOPBACK);
+ if (type == SOCK_DGRAM)
+ sock_out.sin_addr.s_addr = htonl (INADDR_LOOPBACK);
- if (family == AF_INET)
- dev = (type == SOCK_STREAM ? tcp_dev : udp_dev);
- else
- dev = (type == SOCK_STREAM ? stream_dev : dgram_dev);
+ /* Do a connect */
+ if (connect (outsock, (struct sockaddr *) &sock_in, sizeof (sock_in)) < 0)
+ {
+ debug_printf ("connect error");
+ set_winsock_errno ();
+ __leave;
+ }
- if (sb0 >= 0 && fdsock (sb0, dev, insock))
- {
- ((fhandler_socket *) sb0)->set_addr_family (family);
- ((fhandler_socket *) sb0)->set_socket_type (type);
- ((fhandler_socket *) sb0)->connect_state (connected);
- if (flags & SOCK_NONBLOCK)
- ((fhandler_socket *) sb0)->set_nonblocking (true);
- if (flags & SOCK_CLOEXEC)
- ((fhandler_socket *) sb0)->set_close_on_exec (true);
- if (family == AF_LOCAL && type == SOCK_STREAM)
- ((fhandler_socket *) sb0)->af_local_set_sockpair_cred ();
+ if (type == SOCK_STREAM)
+ {
+ /* For stream sockets, accept the connection and close the listener */
+ len = sizeof (sock_in);
+ insock = accept (newsock, (struct sockaddr *) &sock_in, &len);
+ if (insock == INVALID_SOCKET)
+ {
+ debug_printf ("accept error");
+ set_winsock_errno ();
+ __leave;
+ }
+ closesocket (newsock);
+ newsock = INVALID_SOCKET;
+ }
+ else
+ {
+ /* For datagram sockets, connect the 2nd socket */
+ if (connect (newsock, (struct sockaddr *) &sock_out,
+ sizeof (sock_out)) < 0)
+ {
+ debug_printf ("connect error");
+ set_winsock_errno ();
+ __leave;
+ }
+ insock = newsock;
+ newsock = INVALID_SOCKET;
+ }
- cygheap_fdnew sb1 (sb0, false);
+ cygheap_fdnew sb0;
+ const device *dev;
- if (sb1 >= 0 && fdsock (sb1, dev, outsock))
- {
- ((fhandler_socket *) sb1)->set_addr_family (family);
- ((fhandler_socket *) sb1)->set_socket_type (type);
- ((fhandler_socket *) sb1)->connect_state (connected);
- if (flags & SOCK_NONBLOCK)
- ((fhandler_socket *) sb1)->set_nonblocking (true);
- if (flags & SOCK_CLOEXEC)
- ((fhandler_socket *) sb1)->set_close_on_exec (true);
- if (family == AF_LOCAL && type == SOCK_STREAM)
- ((fhandler_socket *) sb1)->af_local_set_sockpair_cred ();
-
- sb[0] = sb0;
- sb[1] = sb1;
- res = 0;
- }
- else
- sb0.release ();
- }
+ if (family == AF_INET)
+ dev = (type == SOCK_STREAM ? tcp_dev : udp_dev);
+ else
+ dev = (type == SOCK_STREAM ? stream_dev : dgram_dev);
- if (res == -1)
- {
+ if (sb0 >= 0 && fdsock (sb0, dev, insock))
+ {
+ ((fhandler_socket *) sb0)->set_addr_family (family);
+ ((fhandler_socket *) sb0)->set_socket_type (type);
+ ((fhandler_socket *) sb0)->connect_state (connected);
+ if (flags & SOCK_NONBLOCK)
+ ((fhandler_socket *) sb0)->set_nonblocking (true);
+ if (flags & SOCK_CLOEXEC)
+ ((fhandler_socket *) sb0)->set_close_on_exec (true);
+ if (family == AF_LOCAL && type == SOCK_STREAM)
+ ((fhandler_socket *) sb0)->af_local_set_sockpair_cred ();
+
+ cygheap_fdnew sb1 (sb0, false);
+
+ if (sb1 >= 0 && fdsock (sb1, dev, outsock))
+ {
+ ((fhandler_socket *) sb1)->set_addr_family (family);
+ ((fhandler_socket *) sb1)->set_socket_type (type);
+ ((fhandler_socket *) sb1)->connect_state (connected);
+ if (flags & SOCK_NONBLOCK)
+ ((fhandler_socket *) sb1)->set_nonblocking (true);
+ if (flags & SOCK_CLOEXEC)
+ ((fhandler_socket *) sb1)->set_close_on_exec (true);
+ if (family == AF_LOCAL && type == SOCK_STREAM)
+ ((fhandler_socket *) sb1)->af_local_set_sockpair_cred ();
+
+ sb[0] = sb0;
+ sb[1] = sb1;
+ res = 0;
+ }
+ else
+ sb0.release ();
+ }
+ }
+ __except (EFAULT) {}
+ __endtry
+ syscall_printf ("%R = socketpair(...)", res);
+ if (res == -1)
+ {
+ if (insock != INVALID_SOCKET)
closesocket (insock);
+ if (outsock != INVALID_SOCKET)
closesocket (outsock);
- }
- }
-
-done:
- syscall_printf ("%R = socketpair(...)", res);
+ if (newsock != INVALID_SOCKET)
+ closesocket (newsock);
+ }
return res;
}
@@ -2673,26 +2884,29 @@ endhostent (void)
extern "C" ssize_t
cygwin_recvmsg (int fd, struct msghdr *msg, int flags)
{
- ssize_t res;
+ ssize_t res = -1;
pthread_testcancel ();
- fhandler_socket *fh = get (fd);
-
- myfault efault;
- if (efault.faulted (EFAULT) || !fh)
- res = -1;
- else
+ __try
{
- res = check_iovec_for_read (msg->msg_iov, msg->msg_iovlen);
- /* Originally we shortcircuited here if res == 0.
- Allow 0 bytes buffer. This is valid in POSIX and handled in
- fhandler_socket::recv_internal. If we shortcircuit, we fail
- to deliver valid error conditions and peer address. */
- if (res >= 0)
- res = fh->recvmsg (msg, flags);
+ fhandler_socket *fh = get (fd);
+ if (fh)
+ {
+ res = check_iovec_for_read (msg->msg_iov, msg->msg_iovlen);
+ /* Originally we shortcircuited here if res == 0.
+ Allow 0 bytes buffer. This is valid in POSIX and handled in
+ fhandler_socket::recv_internal. If we shortcircuit, we fail
+ to deliver valid error conditions and peer address. */
+ if (res >= 0)
+ res = fh->recvmsg (msg, flags);
+ }
}
-
+ __except (EFAULT)
+ {
+ res = -1;
+ }
+ __endtry
syscall_printf ("%lR = recvmsg(%d, %p, %y)", res, fd, msg, flags);
return res;
}
@@ -2701,22 +2915,25 @@ cygwin_recvmsg (int fd, struct msghdr *msg, int flags)
extern "C" ssize_t
cygwin_sendmsg (int fd, const struct msghdr *msg, int flags)
{
- ssize_t res;
+ ssize_t res = -1;
pthread_testcancel ();
- fhandler_socket *fh = get (fd);
-
- myfault efault;
- if (efault.faulted (EFAULT) || !fh)
- res = -1;
- else
+ __try
{
- res = check_iovec_for_write (msg->msg_iov, msg->msg_iovlen);
- if (res >= 0)
- res = fh->sendmsg (msg, flags);
+ fhandler_socket *fh = get (fd);
+ if (fh)
+ {
+ res = check_iovec_for_write (msg->msg_iov, msg->msg_iovlen);
+ if (res >= 0)
+ res = fh->sendmsg (msg, flags);
+ }
}
-
+ __except (EFAULT)
+ {
+ res = -1;
+ }
+ __endtry
syscall_printf ("%lR = sendmsg(%d, %p, %y)", res, fd, msg, flags);
return res;
}
@@ -2750,11 +2967,11 @@ cygwin_sendmsg (int fd, const struct msghdr *msg, int flags)
* Paul Vixie, 1996.
*/
static int
-inet_pton4 (const char *src, u_char *dst)
+inet_pton4 (const char *src, u_int8_t *dst)
{
static const char digits[] = "0123456789";
int saw_digit, octets, ch;
- u_char tmp[INADDRSZ], *tp;
+ u_int8_t tmp[INADDRSZ], *tp;
saw_digit = 0;
octets = 0;
@@ -2765,7 +2982,7 @@ inet_pton4 (const char *src, u_char *dst)
if ((pch = strchr(digits, ch)) != NULL)
{
- u_int ret = *tp * 10 + (pch - digits);
+ u_int32_t ret = *tp * 10 + (pch - digits);
if (ret > 255)
return (0);
@@ -2808,14 +3025,14 @@ inet_pton4 (const char *src, u_char *dst)
* Paul Vixie, 1996.
*/
static int
-inet_pton6 (const char *src, u_char *dst)
+inet_pton6 (const char *src, u_int8_t *dst)
{
static const char xdigits_l[] = "0123456789abcdef",
xdigits_u[] = "0123456789ABCDEF";
- u_char tmp[IN6ADDRSZ], *tp, *endp, *colonp;
+ u_int8_t tmp[IN6ADDRSZ], *tp, *endp, *colonp;
const char *xdigits, *curtok;
int ch, saw_xdigit;
- u_int val;
+ u_int32_t val;
memset((tp = tmp), 0, IN6ADDRSZ);
endp = tp + IN6ADDRSZ;
@@ -2854,8 +3071,8 @@ inet_pton6 (const char *src, u_char *dst)
}
if (tp + INT16SZ > endp)
return (0);
- *tp++ = (u_char) (val >> 8) & 0xff;
- *tp++ = (u_char) val & 0xff;
+ *tp++ = (u_int8_t) (val >> 8) & 0xff;
+ *tp++ = (u_int8_t) val & 0xff;
saw_xdigit = 0;
val = 0;
continue;
@@ -2872,8 +3089,8 @@ inet_pton6 (const char *src, u_char *dst)
{
if (tp + INT16SZ > endp)
return (0);
- *tp++ = (u_char) (val >> 8) & 0xff;
- *tp++ = (u_char) val & 0xff;
+ *tp++ = (u_int8_t) (val >> 8) & 0xff;
+ *tp++ = (u_int8_t) val & 0xff;
}
if (colonp != NULL)
{
@@ -2915,9 +3132,9 @@ cygwin_inet_pton (int af, const char *src, void *dst)
switch (af)
{
case AF_INET:
- return (inet_pton4(src, (u_char *) dst));
+ return (inet_pton4(src, (u_int8_t *) dst));
case AF_INET6:
- return (inet_pton6(src, (u_char *) dst));
+ return (inet_pton6(src, (u_int8_t *) dst));
default:
errno = EAFNOSUPPORT;
return (-1);
@@ -2932,12 +3149,12 @@ cygwin_inet_pton (int af, const char *src, void *dst)
* `dst' (as a const)
* notes:
* (1) uses no statics
- * (2) takes a u_char* not an in_addr as input
+ * (2) takes a u_int8_t* not an in_addr as input
* author:
* Paul Vixie, 1996.
*/
static const char *
-inet_ntop4 (const u_char *src, char *dst, size_t size)
+inet_ntop4 (const u_int8_t *src, char *dst, size_t size)
{
static const char fmt[] = "%u.%u.%u.%u";
char tmp[sizeof "255.255.255.255"];
@@ -2959,7 +3176,7 @@ inet_ntop4 (const u_char *src, char *dst, size_t size)
* Paul Vixie, 1996.
*/
static const char *
-inet_ntop6 (const u_char *src, char *dst, size_t size)
+inet_ntop6 (const u_int8_t *src, char *dst, size_t size)
{
/*
* Note that int32_t and int16_t need only be "at least" large enough
@@ -2970,7 +3187,7 @@ inet_ntop6 (const u_char *src, char *dst, size_t size)
*/
char tmp[sizeof "ffff:ffff:ffff:ffff:ffff:ffff:255.255.255.255"], *tp;
struct { int base, len; } best, cur;
- u_int words[IN6ADDRSZ / INT16SZ];
+ u_int32_t words[IN6ADDRSZ / INT16SZ];
int i;
/*
@@ -3076,9 +3293,9 @@ cygwin_inet_ntop (int af, const void *src, char *dst, socklen_t size)
switch (af)
{
case AF_INET:
- return (inet_ntop4((const u_char *) src, dst, size));
+ return (inet_ntop4((const u_int8_t *) src, dst, size));
case AF_INET6:
- return (inet_ntop6((const u_char *) src, dst, size));
+ return (inet_ntop6((const u_int8_t *) src, dst, size));
default:
errno = EAFNOSUPPORT;
return (NULL);
@@ -3086,145 +3303,74 @@ cygwin_inet_ntop (int af, const void *src, char *dst, socklen_t size)
/* NOTREACHED */
}
-/* W. Richard STEVENS libgai implementation, slightly tweaked for inclusion
- into Cygwin as pure IPv4 replacement. Please note that the code is
- kept intact as much as possible. Especially the IPv6 and AF_UNIX code
- is kept in, even though we can support neither of them. Please don't
- activate them, they won't work correctly. */
-
-#define IPv4
-#undef IPv6
-#undef UNIXdomain
-
-#undef HAVE_SOCKADDR_SA_LEN
-#define gethostbyname2(host,family) cygwin_gethostbyname((host))
-
-#define AI_CLONE 0x8000 /* Avoid collision with AI_ values in netdb.h */
-
-/*
- * Create and fill in an addrinfo{}.
- */
-
-/* include ga_aistruct1 */
-static int
-ga_aistruct (struct addrinfo ***paipnext, const struct addrinfo *hintsp,
- const void *addr, int family)
+extern "C" void
+cygwin_freeaddrinfo (struct addrinfo *addr)
{
- struct addrinfo *ai;
-
- if ((ai = (struct addrinfo *) calloc (1, sizeof (struct addrinfo))) == NULL)
- return (EAI_MEMORY);
- ai->ai_next = NULL;
- ai->ai_canonname = NULL;
- **paipnext = ai;
- *paipnext = &ai->ai_next;
-
- if ((ai->ai_socktype = hintsp->ai_socktype) == 0)
- ai->ai_flags |= AI_CLONE;
-
- ai->ai_protocol = hintsp->ai_protocol;
-/* end ga_aistruct1 */
+ struct addrinfo *ai, *ainext;
-/* include ga_aistruct2 */
- switch ((ai->ai_family = family))
+ for (ai = addr; ai != NULL; ai = ainext)
{
-#ifdef IPv4
- case AF_INET:
- {
- struct sockaddr_in *sinptr;
-
- /* 4allocate sockaddr_in{} and fill in all but port */
- if ((sinptr = (struct sockaddr_in *)
- calloc (1, sizeof (struct sockaddr_in))) == NULL)
- return (EAI_MEMORY);
-#ifdef HAVE_SOCKADDR_SA_LEN
- sinptr->sin_len = sizeof (struct sockaddr_in);
-#endif
- sinptr->sin_family = AF_INET;
- memcpy (&sinptr->sin_addr, addr, sizeof (struct in_addr));
- ai->ai_addr = (struct sockaddr *) sinptr;
- ai->ai_addrlen = sizeof (struct sockaddr_in);
- break;
- }
-#endif /* IPV4 */
-#ifdef IPv6
- case AF_INET6:
- {
- struct sockaddr_in6 *sin6ptr;
+ if (ai->ai_addr != NULL)
+ free (ai->ai_addr); /* socket address structure */
- /* 4allocate sockaddr_in6{} and fill in all but port */
- if ((sin6ptr = calloc (1, sizeof (struct sockaddr_in6))) == NULL)
- return (EAI_MEMORY);
-#ifdef HAVE_SOCKADDR_SA_LEN
- sin6ptr->sin6_len = sizeof (struct sockaddr_in6);
-#endif
- sin6ptr->sin6_family = AF_INET6;
- memcpy (&sin6ptr->sin6_addr, addr, sizeof (struct in6_addr));
- ai->ai_addr = (struct sockaddr *) sin6ptr;
- ai->ai_addrlen = sizeof (struct sockaddr_in6);
- break;
- }
-#endif /* IPV6 */
-#ifdef UNIXdomain
- case AF_LOCAL:
- {
- struct sockaddr_un *unp;
-
- /* 4allocate sockaddr_un{} and fill in */
-/* *INDENT-OFF* */
- if (strlen(addr) >= sizeof(unp->sun_path))
- return(EAI_SERVICE);
- if ( (unp = calloc(1, sizeof(struct sockaddr_un))) == NULL)
- return(EAI_MEMORY);
-/* *INDENT-ON* */
- unp->sun_family = AF_LOCAL;
- strcpy (unp->sun_path, addr);
-#ifdef HAVE_SOCKADDR_SA_LEN
- unp->sun_len = SUN_LEN (unp);
-#endif
- ai->ai_addr = (struct sockaddr *) unp;
- ai->ai_addrlen = sizeof (struct sockaddr_un);
- if (hintsp->ai_flags & AI_PASSIVE)
- unlink (unp->sun_path); /* OK if this fails */
- break;
- }
-#endif /* UNIXDOMAIN */
+ if (ai->ai_canonname != NULL)
+ free (ai->ai_canonname);
+
+ ainext = ai->ai_next; /* can't fetch ai_next after free() */
+ free (ai); /* the addrinfo{} itself */
}
- return (0);
}
-/* end ga_aistruct2 */
-
-/*
- * Clone a new addrinfo structure from an existing one.
- */
-
-/* include ga_clone */
-
-/* Cygwin specific: The ga_clone function is split up to allow an easy
- duplication of addrinfo structs. This is used to duplicate the
- structures from WinSock, so that we have the allocation of the structs
- returned to the application under control. This is especially helpful
- for the AI_V4MAPPED case prior to Vista. */
static struct addrinfo *
-ga_dup (struct addrinfo *ai, bool v4mapped)
+ga_dup (struct addrinfoW *ai, bool v4mapped, int idn_flags, int &err)
{
struct addrinfo *nai;
if ((nai = (struct addrinfo *) calloc (1, sizeof (struct addrinfo))) == NULL)
- return (NULL);
+ {
+ err = EAI_MEMORY;
+ return NULL;
+ }
- nai->ai_flags = 0; /* make sure AI_CLONE is off */
nai->ai_family = v4mapped ? AF_INET6 : ai->ai_family;
nai->ai_socktype = ai->ai_socktype;
nai->ai_protocol = ai->ai_protocol;
- nai->ai_canonname = NULL;
- if (!(ai->ai_flags & AI_CLONE) && ai->ai_canonname
- && !(nai->ai_canonname = strdup (ai->ai_canonname)))
+ if (ai->ai_canonname)
{
- free (nai);
- return NULL;
+ tmp_pathbuf tp;
+ wchar_t *canonname = ai->ai_canonname;
+
+ if (idn_flags & AI_CANONIDN)
+ {
+ /* Map flags to equivalent IDN_* flags. */
+ wchar_t *canonbuf = tp.w_get ();
+ if (IdnToUnicode (idn_flags >> 16, canonname, -1,
+ canonbuf, NT_MAX_PATH))
+ canonname = canonbuf;
+ else if (GetLastError () != ERROR_PROC_NOT_FOUND)
+ {
+ free (nai);
+ err = EAI_IDN_ENCODE;
+ return NULL;
+ }
+ }
+ size_t len = wcstombs (NULL, canonname, 0);
+ if (len == (size_t) -1)
+ {
+ free (nai);
+ err = EAI_IDN_ENCODE;
+ return NULL;
+ }
+ nai->ai_canonname = (char *) malloc (len + 1);
+ if (!nai->ai_canonname)
+ {
+ free (nai);
+ err = EAI_MEMORY;
+ return NULL;
+ }
+ wcstombs (nai->ai_canonname, canonname, len + 1);
}
+
nai->ai_addrlen = v4mapped ? sizeof (struct sockaddr_in6) : ai->ai_addrlen;
if ((nai->ai_addr = (struct sockaddr *) malloc (v4mapped
? sizeof (struct sockaddr_in6)
@@ -3233,6 +3379,7 @@ ga_dup (struct addrinfo *ai, bool v4mapped)
if (nai->ai_canonname)
free (nai->ai_canonname);
free (nai);
+ err = EAI_MEMORY;
return NULL;
}
if (v4mapped)
@@ -3254,27 +3401,13 @@ ga_dup (struct addrinfo *ai, bool v4mapped)
}
static struct addrinfo *
-ga_clone (struct addrinfo *ai)
-{
- struct addrinfo *nai;
-
- if ((nai = ga_dup (ai, false)))
- {
- nai->ai_next = ai->ai_next;
- ai->ai_next = nai;
- }
- return nai;
-}
-
-static struct addrinfo *
-ga_duplist (struct addrinfo *ai, bool v4mapped)
+ga_duplist (struct addrinfoW *ai, bool v4mapped, int idn_flags, int &err)
{
- void ipv4_freeaddrinfo (struct addrinfo *aihead);
struct addrinfo *tmp, *nai = NULL, *nai0 = NULL;
for (; ai; ai = ai->ai_next, nai = tmp)
{
- if (!(tmp = ga_dup (ai, v4mapped)))
+ if (!(tmp = ga_dup (ai, v4mapped, idn_flags, err)))
goto bad;
if (!nai0)
nai0 = tmp;
@@ -3284,960 +3417,335 @@ ga_duplist (struct addrinfo *ai, bool v4mapped)
return nai0;
bad:
- ipv4_freeaddrinfo (nai0);
+ cygwin_freeaddrinfo (nai0);
return NULL;
}
-/* end ga_clone */
-
-/*
- * Basic error checking of flags, family, socket type, and protocol.
- */
-
-/* include ga_echeck */
-static int
-ga_echeck (const char *hostname, const char *servname,
- int flags, int family, int socktype, int protocol)
+/* Cygwin specific wrappers around the gai functions. */
+static struct gai_errmap_t
{
-#if 0
- if (flags & ~(AI_PASSIVE | AI_CANONNAME))
- return (EAI_BADFLAGS); /* unknown flag bits */
-#endif
- if (hostname == NULL || hostname[0] == '\0')
- {
- if (servname == NULL || servname[0] == '\0')
- return (EAI_NONAME); /* host or service must be specified */
- }
-
- switch (family)
- {
- case AF_UNSPEC:
- break;
-#ifdef IPv4
- case AF_INET:
- if (socktype != 0 &&
- (socktype != SOCK_STREAM &&
- socktype != SOCK_DGRAM && socktype != SOCK_RAW))
- return (EAI_SOCKTYPE); /* invalid socket type */
- break;
-#endif
-#ifdef IPv6
- case AF_INET6:
- if (socktype != 0 &&
- (socktype != SOCK_STREAM &&
- socktype != SOCK_DGRAM && socktype != SOCK_RAW))
- return (EAI_SOCKTYPE); /* invalid socket type */
- break;
-#endif
-#ifdef UNIXdomain
- case AF_LOCAL:
- if (socktype != 0 &&
- (socktype != SOCK_STREAM && socktype != SOCK_DGRAM))
- return (EAI_SOCKTYPE); /* invalid socket type */
- break;
-#endif
- default:
- return (EAI_FAMILY); /* unknown protocol family */
- }
- return (0);
-}
-
-/* end ga_echeck */
-
-struct search {
- const char *host; /* hostname or address string */
- int family; /* AF_xxx */
+ int w32_errval;
+ const char *errtxt;
+} gai_errmap[] =
+{
+ {0, "Success"},
+ /* EAI_ADDRFAMILY */
+ {0, "Address family for hostname not supported"},
+ /* EAI_AGAIN */
+ {WSATRY_AGAIN, "Temporary failure in name resolution"},
+ /* EAI_BADFLAGS */
+ {WSAEINVAL, "Bad value for ai_flags"},
+ /* EAI_FAIL */
+ {WSANO_RECOVERY, "Non-recoverable failure in name resolution"},
+ /* EAI_FAMILY */
+ {WSAEAFNOSUPPORT, "ai_family not supported"},
+ /* EAI_MEMORY */
+ {WSA_NOT_ENOUGH_MEMORY, "Memory allocation failure"},
+ /* EAI_NODATA */
+ {WSANO_DATA, "No address associated with hostname"},
+ /* EAI_NONAME */
+ {WSAHOST_NOT_FOUND, "Name or service not known"},
+ /* EAI_SERVICE */
+ {WSATYPE_NOT_FOUND, "Servname not supported for ai_socktype"},
+ /* EAI_SOCKTYPE */
+ {WSAESOCKTNOSUPPORT, "ai_socktype not supported"},
+ /* EAI_SYSTEM */
+ {0, "System error"},
+ /* EAI_BADHINTS */
+ {0, "Invalid value for hints"},
+ /* EAI_PROTOCOL */
+ {0, "Resolved protocol is unknown"},
+ /* EAI_OVERFLOW */
+ {WSAEFAULT, "An argument buffer overflowed"},
+ /* EAI_IDN_ENCODE */
+ {0, "Parameter string not correctly encoded"}
};
-/*
- * Set up the search[] array with the hostnames and address families
- * that we are to look up.
- */
+extern "C" const char *
+cygwin_gai_strerror (int err)
+{
+ if (err >= 0 && err < (int) (sizeof gai_errmap / sizeof *gai_errmap))
+ return gai_errmap[err].errtxt;
+ return "Unknown error";
+}
-/* include ga_nsearch1 */
static int
-ga_nsearch (const char *hostname, const struct addrinfo *hintsp,
- struct search *search)
+w32_to_gai_err (int w32_err)
{
- int nsearch = 0;
+ if (w32_err >= WSABASEERR)
+ for (unsigned i = 0; i < sizeof gai_errmap / sizeof *gai_errmap; ++i)
+ if (gai_errmap[i].w32_errval == w32_err)
+ return i;
+ return w32_err;
+}
- if (hostname == NULL || hostname[0] == '\0')
- {
- if (hintsp->ai_flags & AI_PASSIVE)
- {
- /* 4no hostname and AI_PASSIVE: implies wildcard bind */
- switch (hintsp->ai_family)
- {
-#ifdef IPv4
- case AF_INET:
- search[nsearch].host = "0.0.0.0";
- search[nsearch].family = AF_INET;
- nsearch++;
- break;
-#endif
-#ifdef IPv6
- case AF_INET6:
- search[nsearch].host = "0::0";
- search[nsearch].family = AF_INET6;
- nsearch++;
- break;
-#endif
- case AF_UNSPEC:
-#ifdef IPv6
- search[nsearch].host = "0::0"; /* IPv6 first, then IPv4 */
- search[nsearch].family = AF_INET6;
- nsearch++;
-#endif
-#ifdef IPv4
- search[nsearch].host = "0.0.0.0";
- search[nsearch].family = AF_INET;
- nsearch++;
-#endif
- break;
- }
-/* end ga_nsearch1 */
-/* include ga_nsearch2 */
- }
- else
- {
- /* 4no host and not AI_PASSIVE: connect to local host */
- switch (hintsp->ai_family)
- {
-#ifdef IPv4
- case AF_INET:
- search[nsearch].host = "localhost"; /* 127.0.0.1 */
- search[nsearch].family = AF_INET;
- nsearch++;
- break;
-#endif
-#ifdef IPv6
- case AF_INET6:
- search[nsearch].host = "0::1";
- search[nsearch].family = AF_INET6;
- nsearch++;
- break;
-#endif
- case AF_UNSPEC:
-#ifdef IPv6
- search[nsearch].host = "0::1"; /* IPv6 first, then IPv4 */
- search[nsearch].family = AF_INET6;
- nsearch++;
-#endif
-#ifdef IPv4
- search[nsearch].host = "localhost";
- search[nsearch].family = AF_INET;
- nsearch++;
+extern "C" int
+cygwin_getaddrinfo (const char *hostname, const char *servname,
+ const struct addrinfo *hints, struct addrinfo **res)
+{
+ int ret = 0;
+
+ /* Windows' getaddrinfo implementations lets all possible values
+ in ai_flags slip through and just ignores unknown values. So we
+ check manually here. */
+#define AI_IDN_MASK (AI_IDN | \
+ AI_CANONIDN | \
+ AI_IDN_ALLOW_UNASSIGNED | \
+ AI_IDN_USE_STD3_ASCII_RULES)
+#ifndef AI_DISABLE_IDN_ENCODING
+#define AI_DISABLE_IDN_ENCODING 0x80000
#endif
- break;
- }
- }
-/* end ga_nsearch2 */
-/* include ga_nsearch3 */
- }
- else
- { /* host is specified */
- switch (hintsp->ai_family)
+ __try
+ {
+ if (hints && (hints->ai_flags
+ & ~(AI_PASSIVE | AI_CANONNAME | AI_NUMERICHOST | AI_ALL
+ | AI_NUMERICSERV | AI_ADDRCONFIG | AI_V4MAPPED
+ | AI_IDN_MASK)))
+ return EAI_BADFLAGS;
+ /* AI_NUMERICSERV is not supported prior to Windows Vista. We just check
+ the servname parameter by ourselves here. */
+ if (hints && (hints->ai_flags & AI_NUMERICSERV))
{
-#ifdef IPv4
- case AF_INET:
- search[nsearch].host = hostname;
- search[nsearch].family = AF_INET;
- nsearch++;
- break;
-#endif
-#ifdef IPv6
- case AF_INET6:
- search[nsearch].host = hostname;
- search[nsearch].family = AF_INET6;
- nsearch++;
- break;
-#endif
- case AF_UNSPEC:
-#ifdef IPv6
- search[nsearch].host = hostname;
- search[nsearch].family = AF_INET6; /* IPv6 first */
- nsearch++;
-#endif
-#ifdef IPv4
- search[nsearch].host = hostname;
- search[nsearch].family = AF_INET; /* then IPv4 */
- nsearch++;
-#endif
- break;
+ char *p;
+ if (servname && *servname && (strtoul (servname, &p, 10), *p))
+ return EAI_NONAME;
}
- }
- if (nsearch < 1 || nsearch > 2)
- return -1;
- return (nsearch);
-}
-
-/* end ga_nsearch3 */
-
-/*
- * Go through all the addrinfo structures, checking for a match of the
- * socket type and filling in the socket type, and then the port number
- * in the corresponding socket address structures.
- *
- * The AI_CLONE flag works as follows. Consider a multihomed host with
- * two IP addresses and no socket type specified by the caller. After
- * the "host" search there are two addrinfo structures, one per IP address.
- * Assuming a service supported by both TCP and UDP (say the daytime
- * service) we need to return *four* addrinfo structures:
- * IP#1, SOCK_STREAM, TCP port,
- * IP#1, SOCK_DGRAM, UDP port,
- * IP#2, SOCK_STREAM, TCP port,
- * IP#2, SOCK_DGRAM, UDP port.
- * To do this, when the "host" loop creates an addrinfo structure, if the
- * caller has not specified a socket type (hintsp->ai_socktype == 0), the
- * AI_CLONE flag is set. When the following function finds an entry like
- * this it is handled as follows: If the entry's ai_socktype is still 0,
- * this is the first use of the structure, and the ai_socktype field is set.
- * But, if the entry's ai_socktype is nonzero, then we clone a new addrinfo
- * structure and set it's ai_socktype to the new value. Although we only
- * need two socket types today (SOCK_STREAM and SOCK_DGRAM) this algorithm
- * will handle any number. Also notice that Posix.1g requires all socket
- * types to be nonzero.
- */
-/* include ga_port */
-static int
-ga_port (struct addrinfo *aihead, int port, int socktype)
- /* port must be in network byte order */
-{
- int nfound = 0;
- struct addrinfo *ai;
+ int idn_flags = hints ? (hints->ai_flags & AI_IDN_MASK) : 0;
+ const char *src;
+ mbstate_t ps;
+ tmp_pathbuf tp;
+ wchar_t *whost = NULL, *wserv = NULL;
+ struct addrinfoW whints, *wres;
- for (ai = aihead; ai != NULL; ai = ai->ai_next)
- {
- if (ai->ai_flags & AI_CLONE)
+ if (hostname)
{
- if (ai->ai_socktype != 0)
+ memset (&ps, 0, sizeof ps);
+ src = hostname;
+ whost = tp.w_get ();
+ if (mbsrtowcs (whost, &src, NT_MAX_PATH, &ps) == (size_t) -1)
+ return EAI_IDN_ENCODE;
+ if (src)
+ return EAI_MEMORY;
+ if (idn_flags & AI_IDN)
{
- if ((ai = ga_clone (ai)) == NULL)
- return (-1); /* memory allocation error */
- /* ai points to newly cloned entry, which is what we want */
+ /* Map flags to equivalent IDN_* flags. */
+ wchar_t *ascbuf = tp.w_get ();
+ if (IdnToAscii (idn_flags >> 16, whost, -1, ascbuf, NT_MAX_PATH))
+ whost = ascbuf;
+ else if (GetLastError () != ERROR_PROC_NOT_FOUND)
+ return EAI_IDN_ENCODE;
}
}
- else if (ai->ai_socktype != socktype)
- continue; /* ignore if mismatch on socket type */
-
- ai->ai_socktype = socktype;
-
- switch (ai->ai_family)
+ if (servname)
{
-#ifdef IPv4
- case AF_INET:
- ((struct sockaddr_in *) ai->ai_addr)->sin_port = port;
- nfound++;
- break;
-#endif
-#ifdef IPv6
- case AF_INET6:
- ((struct sockaddr_in6 *) ai->ai_addr)->sin6_port = port;
- nfound++;
- break;
-#endif
+ memset (&ps, 0, sizeof ps);
+ src = servname;
+ wserv = tp.w_get ();
+ if (mbsrtowcs (wserv, &src, NT_MAX_PATH, &ps) == (size_t) -1)
+ return EAI_IDN_ENCODE;
+ if (src)
+ return EAI_MEMORY;
}
- }
- return (nfound);
-}
-
-/* end ga_port */
-
-/*
- * This function handles the service string.
- */
-/* include ga_serv */
-static int
-ga_serv (struct addrinfo *aihead, const struct addrinfo *hintsp,
- const char *serv)
-{
- int port, rc, nfound;
- struct servent *sptr;
-
- nfound = 0;
- if (isdigit (serv[0]))
- { /* check for port number string first */
- port = htons (atoi (serv));
- if (hintsp->ai_socktype)
+ if (!hints)
{
- /* 4caller specifies socket type */
- if ((rc = ga_port (aihead, port, hintsp->ai_socktype)) < 0)
- return (EAI_MEMORY);
- nfound += rc;
+ /* Default settings per glibc man page. */
+ memset (&whints, 0, sizeof whints);
+ whints.ai_family = PF_UNSPEC;
+ whints.ai_flags = AI_V4MAPPED | AI_ADDRCONFIG;
}
else
{
- /* 4caller does not specify socket type */
- if ((rc = ga_port (aihead, port, SOCK_STREAM)) < 0)
- return (EAI_MEMORY);
- nfound += rc;
- if ((rc = ga_port (aihead, port, SOCK_DGRAM)) < 0)
- return (EAI_MEMORY);
- nfound += rc;
- }
- }
- else
- {
- /* 4try service name, TCP then UDP */
- if (hintsp->ai_socktype == 0 || hintsp->ai_socktype == SOCK_STREAM)
- {
- if ((sptr = cygwin_getservbyname (serv, "tcp")) != NULL)
- {
- if ((rc = ga_port (aihead, sptr->s_port, SOCK_STREAM)) < 0)
- return (EAI_MEMORY);
- nfound += rc;
- }
+ /* sizeof addrinfo == sizeof addrinfoW */
+ memcpy (&whints, hints, sizeof whints);
+ whints.ai_flags &= ~AI_IDN_MASK;
+#ifdef __x86_64__
+ /* ai_addrlen is socklen_t (4 bytes) in POSIX but size_t (8 bytes) in
+ Winsock. Sert upper 4 bytes explicitely to 0 to avoid EAI_FAIL. */
+ whints.ai_addrlen &= UINT32_MAX;
+#endif
+ /* AI_ADDRCONFIG is not supported prior to Vista. Rather it's
+ the default and only possible setting.
+ On Vista, the default behaviour is as if AI_ADDRCONFIG is set,
+ apparently for performance reasons. To get the POSIX default
+ behaviour, the AI_ALL flag has to be set. */
+ if (wincap.supports_all_posix_ai_flags ()
+ && whints.ai_family == PF_UNSPEC
+ && !(whints.ai_flags & AI_ADDRCONFIG))
+ whints.ai_flags |= AI_ALL;
}
- if (hintsp->ai_socktype == 0 || hintsp->ai_socktype == SOCK_DGRAM)
+ /* Disable automatic IDN conversion on W8 and later. */
+ whints.ai_flags |= AI_DISABLE_IDN_ENCODING;
+ ret = GetAddrInfoW (whost, wserv, &whints, &wres);
+ /* Try to workaround an apparent shortcoming in Winsock's getaddrinfo
+ implementation. See this link for details:
+ https://communities.vmware.com/message/2577858#2577858 */
+ if (ret == WSANO_RECOVERY && (whints.ai_flags & AI_ALL))
{
- if ((sptr = cygwin_getservbyname (serv, "udp")) != NULL)
- {
- if ((rc = ga_port (aihead, sptr->s_port, SOCK_DGRAM)) < 0)
- return (EAI_MEMORY);
- nfound += rc;
- }
+ whints.ai_flags &= ~AI_ALL;
+ ret = GetAddrInfoW (whost, wserv, &whints, &wres);
}
- }
-
- if (nfound == 0)
- {
- if (hintsp->ai_socktype == 0)
- return (EAI_NONAME); /* all calls to getservbyname() failed */
- else
- return (EAI_SERVICE); /* service not supported for socket type */
- }
- return (0);
-}
-
-/* end ga_serv */
-
-#ifdef UNIXdomain
-/* include ga_unix */
-static int
-ga_unix (const char *path, struct addrinfo *hintsp, struct addrinfo **result)
-{
- int rc;
- struct addrinfo *aihead, **aipnext;
-
- aihead = NULL;
- aipnext = &aihead;
-
- if (hintsp->ai_family != AF_UNSPEC && hintsp->ai_family != AF_LOCAL)
- return (EAI_ADDRFAMILY);
-
- if (hintsp->ai_socktype == 0)
- {
- /* 4no socket type specified: return stream then dgram */
- hintsp->ai_socktype = SOCK_STREAM;
- if ((rc = ga_aistruct (&aipnext, hintsp, path, AF_LOCAL)) != 0)
- return (rc);
- hintsp->ai_socktype = SOCK_DGRAM;
- }
-
- if ((rc = ga_aistruct (&aipnext, hintsp, path, AF_LOCAL)) != 0)
- return (rc);
-
- if (hintsp->ai_flags & AI_CANONNAME)
- {
- struct utsname myname;
-
- if (uname (&myname) < 0)
- return (EAI_SYSTEM);
- if ((aihead->ai_canonname = strdup (myname.nodename)) == NULL)
- return (EAI_MEMORY);
- }
-
- *result = aihead; /* pointer to first structure in linked list */
- return (0);
-}
-
-/* end ga_unix */
-#endif /* UNIXdomain */
-
-/* include gn_ipv46 */
-static int
-gn_ipv46 (char *host, size_t hostlen, char *serv, size_t servlen,
- void *aptr, size_t alen, int family, int port, int flags)
-{
- char *ptr;
- struct hostent *hptr;
- struct servent *sptr;
-
- if (host && hostlen > 0)
- {
- if (flags & NI_NUMERICHOST)
+ ret = w32_to_gai_err (ret);
+ /* Always copy over to self-allocated memory. */
+ if (!ret)
{
- if (cygwin_inet_ntop (family, aptr, host, hostlen) == NULL)
- return (1);
+ *res = ga_duplist (wres, false, idn_flags, ret);
+ FreeAddrInfoW (wres);
+ if (!*res)
+ __leave;
}
- else
+ /* AI_V4MAPPED and AI_ALL are not supported prior to Vista. So, what
+ we do here is to emulate AI_V4MAPPED. If no IPv6 addresses are
+ returned, or the AI_ALL flag is set, we try with AF_INET again, and
+ convert the returned IPv4 addresses into v4-in-v6 entries. This
+ is done in ga_dup if the v4mapped flag is set. */
+ if (!wincap.supports_all_posix_ai_flags ()
+ && hints
+ && hints->ai_family == AF_INET6
+ && (hints->ai_flags & AI_V4MAPPED)
+ && (ret == EAI_NODATA || ret == EAI_NONAME
+ || (hints->ai_flags & AI_ALL)))
{
- hptr = cygwin_gethostbyaddr ((const char *) aptr, alen, family);
- if (hptr != NULL && hptr->h_name != NULL)
+ /* sizeof addrinfo == sizeof addrinfoW */
+ memcpy (&whints, hints, sizeof whints);
+ whints.ai_family = AF_INET;
+#ifdef __x86_64__
+ /* ai_addrlen is socklen_t (4 bytes) in POSIX but size_t (8 bytes) in
+ Winsock. Sert upper 4 bytes explicitely to 0 to avoid EAI_FAIL. */
+ whints.ai_addrlen &= UINT32_MAX;
+#endif
+ int ret2 = w32_to_gai_err (GetAddrInfoW (whost, wserv, &whints, &wres));
+ if (!ret2)
{
- if (flags & NI_NOFQDN)
+ struct addrinfo *v4res = ga_duplist (wres, true, idn_flags, ret);
+ FreeAddrInfoW (wres);
+ if (!v4res)
{
- if ((ptr = strchr (hptr->h_name, '.')) != NULL)
- *ptr = 0; /* overwrite first dot */
+ if (!ret)
+ cygwin_freeaddrinfo (*res);
+ __leave;
}
- //snprintf (host, hostlen, "%s", hptr->h_name);
- *host = '\0';
- strncat (host, hptr->h_name, hostlen - 1);
- }
- else
- {
- if (flags & NI_NAMEREQD)
- return (1);
- if (cygwin_inet_ntop (family, aptr, host, hostlen) == NULL)
- return (1);
+ /* If a list of v6 addresses exists, append the v4-in-v6 address
+ list. Otherwise just return the v4-in-v6 address list. */
+ if (!ret)
+ {
+ struct addrinfo *ptr;
+ for (ptr = *res; ptr->ai_next; ptr = ptr->ai_next)
+ ;
+ ptr->ai_next = v4res;
+ }
+ else
+ *res = v4res;
+ ret = 0;
}
}
}
-
- if (serv && servlen > 0)
+ __except (EFAULT)
{
- if (flags & NI_NUMERICSERV)
- {
- //snprintf (serv, servlen, "%d", ntohs (port));
- char buf[32];
- __small_sprintf (buf, "%d", ntohs (port));
- *serv = '\0';
- strncat (serv, buf, servlen - 1);
- }
- else
- {
- sptr = cygwin_getservbyport (port, (flags & NI_DGRAM) ? "udp" : NULL);
- if (sptr != NULL && sptr->s_name != NULL)
- {
- //snprintf (serv, servlen, "%s", sptr->s_name);
- *serv = '\0';
- strncat (serv, sptr->s_name, servlen - 1);
- }
- else
- {
- //snprintf (serv, servlen, "%d", ntohs (port));
- char buf[32];
- __small_sprintf (buf, "%d", ntohs (port));
- *serv = '\0';
- strncat (serv, buf, servlen - 1);
- }
- }
- }
- return (0);
-}
-
-/* end gn_ipv46 */
-
-/* include freeaddrinfo */
-void
-ipv4_freeaddrinfo (struct addrinfo *aihead)
-{
- struct addrinfo *ai, *ainext;
-
- for (ai = aihead; ai != NULL; ai = ainext)
- {
- if (ai->ai_addr != NULL)
- free (ai->ai_addr); /* socket address structure */
-
- if (ai->ai_canonname != NULL)
- free (ai->ai_canonname);
-
- ainext = ai->ai_next; /* can't fetch ai_next after free() */
- free (ai); /* the addrinfo{} itself */
+ ret = EAI_SYSTEM;
}
+ __endtry
+ return ret;
}
-/* end freeaddrinfo */
-
-/* include ga1 */
-
-int
-ipv4_getaddrinfo (const char *hostname, const char *servname,
- const struct addrinfo *hintsp, struct addrinfo **result)
+extern "C" int
+cygwin_getnameinfo (const struct sockaddr *sa, socklen_t salen,
+ char *host, size_t hostlen, char *serv,
+ size_t servlen, int flags)
{
- int rc, error, nsearch;
- char **ap, *canon;
- struct hostent *hptr;
- struct search search[3], *sptr;
- struct addrinfo hints, *aihead, **aipnext;
-
- /*
- * If we encounter an error we want to free() any dynamic memory
- * that we've allocated. This is our hack to simplify the code.
- */
-#define error(e) { error = (e); goto bad; }
-
- aihead = NULL; /* initialize automatic variables */
- aipnext = &aihead;
- canon = NULL;
+ int ret = 0;
- if (hintsp == NULL)
- {
- bzero (&hints, sizeof (hints));
- hints.ai_family = AF_UNSPEC;
- }
- else
- hints = *hintsp; /* struct copy */
-
- /* 4first some basic error checking */
- if ((rc = ga_echeck (hostname, servname, hints.ai_flags, hints.ai_family,
- hints.ai_socktype, hints.ai_protocol)) != 0)
- error (rc);
-
-#ifdef UNIXdomain
- /* 4special case Unix domain first */
- if (hostname != NULL &&
- (strcmp (hostname, "/local") == 0 || strcmp (hostname, "/unix") == 0) &&
- (servname != NULL && servname[0] == '/'))
- return (ga_unix (servname, &hints, result));
-#endif
-/* end ga1 */
-
-/* include ga3 */
- /* 4remainder of function for IPv4/IPv6 */
- nsearch = ga_nsearch (hostname, &hints, &search[0]);
- if (nsearch == -1)
- error (EAI_FAMILY);
- for (sptr = &search[0]; sptr < &search[nsearch]; sptr++)
+ __try
{
-#ifdef IPv4
- /* 4check for an IPv4 dotted-decimal string */
- if (isdigit (sptr->host[0]))
- {
- struct in_addr inaddr;
-
- if (inet_pton4 (sptr->host, (u_char *) &inaddr) == 1)
- {
- if (hints.ai_family != AF_UNSPEC && hints.ai_family != AF_INET)
- error (EAI_ADDRFAMILY);
- if (sptr->family != AF_INET)
- continue; /* ignore */
- rc = ga_aistruct (&aipnext, &hints, &inaddr, AF_INET);
- if (rc != 0)
- error (rc);
- continue;
- }
- }
-#endif
-
-#ifdef IPv6
- /* 4check for an IPv6 hex string */
- if ((isxdigit (sptr->host[0]) || sptr->host[0] == ':') &&
- (strchr (sptr->host, ':') != NULL))
- {
- struct in6_addr in6addr;
-
- if (inet_pton6 (sptr->host, &in6addr) == 1)
- {
- if (hints.ai_family != AF_UNSPEC && hints.ai_family != AF_INET6)
- error (EAI_ADDRFAMILY);
- if (sptr->family != AF_INET6)
- continue; /* ignore */
- rc = ga_aistruct (&aipnext, &hints, &in6addr, AF_INET6);
- if (rc != 0)
- error (rc);
- continue;
- }
- }
-#endif
-/* end ga3 */
-/* include ga4 */
-#ifdef IPv6
- /* 4remainder of for() to look up hostname */
- if ((_res.options & RES_INIT) == 0)
- res_init (); /* need this to set _res.options */
-#endif
-
- if (nsearch == 2)
- {
-#ifdef IPv6
- _res.options &= ~RES_USE_INET6;
-#endif
- hptr = gethostbyname2 (sptr->host, sptr->family);
- }
- else
- {
-#ifdef IPv6
- if (sptr->family == AF_INET6)
- _res.options |= RES_USE_INET6;
- else
- _res.options &= ~RES_USE_INET6;
-#endif
- hptr = gethostbyname (sptr->host);
- }
- if (hptr == NULL)
+ /* When the incoming port number does not resolve to a well-known service,
+ WinSock's getnameinfo up to Windows 2003 returns with error WSANO_DATA
+ instead of setting `serv' to the numeric port number string, as
+ required by RFC 3493. This is fixed on Vista and later. To avoid the
+ error on systems up to Windows 2003, we check if the port number
+ resolves to a well-known service. If not, we set the NI_NUMERICSERV
+ flag. */
+ if (!wincap.supports_all_posix_ai_flags ())
{
- if (nsearch == 2)
- continue; /* failure OK if multiple searches */
+ int port = 0;
- switch (h_errno)
+ switch (sa->sa_family)
{
- case HOST_NOT_FOUND:
- error (EAI_NONAME);
- case TRY_AGAIN:
- error (EAI_AGAIN);
- case NO_RECOVERY:
- error (EAI_FAIL);
- case NO_DATA:
- error (EAI_NODATA);
+ case AF_INET:
+ port = ((struct sockaddr_in *) sa)->sin_port;
+ break;
+ case AF_INET6:
+ port = ((struct sockaddr_in6 *) sa)->sin6_port;
+ break;
default:
- error (EAI_NONAME);
+ return EAI_FAMILY;
}
+ if (!port || !getservbyport (port, flags & NI_DGRAM ? "udp" : "tcp"))
+ flags |= NI_NUMERICSERV;
}
-
- /* 4check for address family mismatch if one specified */
- if (hints.ai_family != AF_UNSPEC && hints.ai_family != hptr->h_addrtype)
- error (EAI_ADDRFAMILY);
-
- /* 4save canonical name first time */
- if (hostname != NULL && hostname[0] != '\0' &&
- (hints.ai_flags & AI_CANONNAME) && canon == NULL)
+ /* We call GetNameInfoW with local buffers and convert to locale
+ charset to allow RFC 3490 IDNs like glibc 2.3.4 and later. */
+#define NI_IDN_MASK (NI_IDN | \
+ NI_IDN_ALLOW_UNASSIGNED | \
+ NI_IDN_USE_STD3_ASCII_RULES)
+ int idn_flags = flags & NI_IDN_MASK;
+ flags &= ~NI_IDN_MASK;
+ tmp_pathbuf tp;
+ wchar_t *whost = NULL, *wserv = NULL;
+ DWORD whlen = 0, wslen = 0;
+
+ if (host && hostlen)
{
- if ((canon = strdup (hptr->h_name)) == NULL)
- error (EAI_MEMORY);
+ whost = tp.w_get ();
+ whlen = NT_MAX_PATH;
}
-
- /* 4create one addrinfo{} for each returned address */
- for (ap = hptr->h_addr_list; *ap != NULL; ap++)
+ if (serv && servlen)
{
- rc = ga_aistruct (&aipnext, &hints, *ap, hptr->h_addrtype);
- if (rc != 0)
- error (rc);
+ wserv = tp.w_get ();
+ wslen = NT_MAX_PATH;
}
- }
- if (aihead == NULL)
- error (EAI_NONAME); /* nothing found */
-/* end ga4 */
-
-/* include ga5 */
- /* 4return canonical name */
- if (hostname != NULL && hostname[0] != '\0' &&
- hints.ai_flags & AI_CANONNAME)
- {
- if (canon != NULL)
- aihead->ai_canonname = canon; /* strdup'ed earlier */
- else
- {
- if ((aihead->ai_canonname = strdup (search[0].host)) == NULL)
- error (EAI_MEMORY);
- }
- }
-
- /* 4now process the service name */
- if (servname != NULL && servname[0] != '\0')
- {
- if ((rc = ga_serv (aihead, &hints, servname)) != 0)
- error (rc);
- }
-
- *result = aihead; /* pointer to first structure in linked list */
- return (0);
-
-bad:
- ipv4_freeaddrinfo (aihead); /* free any alloc'ed memory */
- return (error);
-}
-
-/* end ga5 */
-
-/* include getnameinfo */
-int
-ipv4_getnameinfo (const struct sockaddr *sa, socklen_t salen,
- char *host, size_t hostlen,
- char *serv, size_t servlen, int flags)
-{
-
- switch (sa->sa_family)
- {
-#ifdef IPv4
- case AF_INET:
- {
- struct sockaddr_in *sain = (struct sockaddr_in *) sa;
- return (gn_ipv46 (host, hostlen, serv, servlen,
- &sain->sin_addr, sizeof (struct in_addr),
- AF_INET, sain->sin_port, flags));
- }
-#endif
-
-#ifdef IPv6
- case AF_INET6:
- {
- struct sockaddr_in6 *sain = (struct sockaddr_in6 *) sa;
-
- return (gn_ipv46 (host, hostlen, serv, servlen,
- &sain->sin6_addr, sizeof (struct in6_addr),
- AF_INET6, sain->sin6_port, flags));
- }
-#endif
-
-#ifdef UNIXdomain
- case AF_LOCAL:
- {
- struct sockaddr_un *un = (struct sockaddr_un *) sa;
-
- if (hostlen > 0)
- snprintf (host, hostlen, "%s", "/local");
- if (servlen > 0)
- snprintf (serv, servlen, "%s", un->sun_path);
- return (0);
- }
-#endif
-
- default:
- return (EAI_FAMILY);
- }
-}
-
-/* end getnameinfo */
-
-/* Start of cygwin specific wrappers around the gai functions. */
-
-struct gai_errmap_t
-{
- int w32_errval;
- const char *errtxt;
-};
-
-static gai_errmap_t gai_errmap[] =
-{
- {0, "Success"},
- {0, "Address family for hostname not supported"},
- {WSATRY_AGAIN, "Temporary failure in name resolution"},
- {WSAEINVAL, "Invalid value for ai_flags"},
- {WSANO_RECOVERY, "Non-recoverable failure in name resolution"},
- {WSAEAFNOSUPPORT, "ai_family not supported"},
- {WSA_NOT_ENOUGH_MEMORY, "Memory allocation failure"},
- {WSANO_DATA, "No address associated with hostname"},
- {WSAHOST_NOT_FOUND, "hostname nor servname provided, or not known"},
- {WSATYPE_NOT_FOUND, "servname not supported for ai_socktype"},
- {WSAESOCKTNOSUPPORT, "ai_socktype not supported"},
- {0, "System error returned in errno"},
- {0, "Invalid value for hints"},
- {0, "Resolved protocol is unknown"},
- {WSAEFAULT, "An argument buffer overflowed"}
-};
-
-extern "C" const char *
-cygwin_gai_strerror (int err)
-{
- if (err >= 0 && err < (int) (sizeof gai_errmap / sizeof *gai_errmap))
- return gai_errmap[err].errtxt;
- return "Unknown error";
-}
-
-static int
-w32_to_gai_err (int w32_err)
-{
- if (w32_err >= WSABASEERR)
- for (unsigned i = 0; i < sizeof gai_errmap / sizeof *gai_errmap; ++i)
- if (gai_errmap[i].w32_errval == w32_err)
- return i;
- return w32_err;
-}
-
-/* We can't use autoload here because we don't know if the functions
- are available (pre-Vista). For those systems we redirect to the
- ipv4-only version above. */
-
-static void (WINAPI *ws_freeaddrinfo)(const struct addrinfo *);
-static int (WINAPI *ws_getaddrinfo)(const char *, const char *,
- const struct addrinfo *,
- struct addrinfo **);
-static int (WINAPI *ws_getnameinfo)(const struct sockaddr *, socklen_t,
- char *, size_t, char *, size_t, int);
-static bool
-get_ipv6_funcs (HMODULE lib)
-{
- return ((ws_freeaddrinfo = (void (WINAPI *)(const struct addrinfo *))
- GetProcAddress (lib, "freeaddrinfo"))
- && (ws_getaddrinfo = (int (WINAPI *)(const char *, const char *,
- const struct addrinfo *,
- struct addrinfo **))
- GetProcAddress (lib, "getaddrinfo"))
- && (ws_getnameinfo = (int (WINAPI *)(const struct sockaddr *,
- socklen_t, char *, size_t,
- char *, size_t, int))
- GetProcAddress (lib, "getnameinfo")));
-}
-
-static NO_COPY muto load_ipv6_guard;
-static NO_COPY bool ipv6_inited = false;
-#define load_ipv6() if (!ipv6_inited) load_ipv6_funcs ();
-
-static void
-load_ipv6_funcs ()
-{
- tmp_pathbuf tp;
- PWCHAR lib_path = tp.w_get ();
- PWCHAR lib_name;
- HMODULE lib;
-
- load_ipv6_guard.init ("klog_guard")->acquire ();
- if (ipv6_inited)
- goto out;
- WSAGetLastError (); /* Kludge. Enforce WSAStartup call. */
- lib_name = wcpcpy (lib_path, windows_system_directory);
- wcpcpy (lib_name, L"ws2_32.dll");
- if ((lib = LoadLibraryW (lib_path)))
- {
- if (get_ipv6_funcs (lib))
- goto out;
- FreeLibrary (lib);
- }
- ws_freeaddrinfo = NULL;
- ws_getaddrinfo = NULL;
- ws_getnameinfo = NULL;
-
-out:
- ipv6_inited = true;
- load_ipv6_guard.release ();
-}
-
-extern "C" void
-cygwin_freeaddrinfo (struct addrinfo *addr)
-{
- myfault efault;
- if (efault.faulted (EFAULT))
- return;
- ipv4_freeaddrinfo (addr);
-}
-
-extern "C" int
-cygwin_getaddrinfo (const char *hostname, const char *servname,
- const struct addrinfo *hints, struct addrinfo **res)
-{
- myfault efault;
- if (efault.faulted (EFAULT))
- return EAI_SYSTEM;
- /* Both subsequent getaddrinfo implementations let all possible values
- in ai_flags slip through and just ignore unknowen values. So we have
- to check manually here. */
- if (hints && (hints->ai_flags
- & ~(AI_PASSIVE | AI_CANONNAME | AI_NUMERICHOST | AI_ALL
- | AI_NUMERICSERV | AI_ADDRCONFIG | AI_V4MAPPED)))
- return EAI_BADFLAGS;
- /* AI_NUMERICSERV is not supported in our replacement getaddrinfo, nor
- is it supported by WinSock prior to Vista. We just check the servname
- parameter by ourselves here. */
- if (hints && (hints->ai_flags & AI_NUMERICSERV))
- {
- char *p;
- if (servname && *servname && (strtoul (servname, &p, 10), *p))
- return EAI_NONAME;
- }
- load_ipv6 ();
- if (!ws_getaddrinfo)
- return ipv4_getaddrinfo (hostname, servname, hints, res);
-
- struct addrinfo nhints, *dupres;
-
- /* AI_ADDRCONFIG is not supported prior to Vista. Rather it's
- the default and only possible setting.
- On Vista, the default behaviour is as if AI_ADDRCONFIG is set,
- apparently for performance reasons. To get the POSIX default
- behaviour, the AI_ALL flag has to be set. */
- if (wincap.supports_all_posix_ai_flags ()
- && hints && hints->ai_family == PF_UNSPEC)
- {
- nhints = *hints;
- hints = &nhints;
- nhints.ai_flags |= AI_ALL;
- }
- int ret = w32_to_gai_err (ws_getaddrinfo (hostname, servname, hints, res));
- /* Always copy over to self-allocated memory. */
- if (!ret)
- {
- dupres = ga_duplist (*res, false);
- ws_freeaddrinfo (*res);
- *res = dupres;
- if (!dupres)
- return EAI_MEMORY;
- }
- /* AI_V4MAPPED and AI_ALL are not supported prior to Vista. So, what
- we do here is to emulate AI_V4MAPPED. If no IPv6 addresses are
- returned, or the AI_ALL flag is set, we try with AF_INET again, and
- convert the returned IPv4 addresses into v4-in-v6 entries. This
- is done in ga_dup if the v4mapped flag is set. */
- if (!wincap.supports_all_posix_ai_flags ()
- && hints
- && hints->ai_family == AF_INET6
- && (hints->ai_flags & AI_V4MAPPED)
- && (ret == EAI_NODATA || ret == EAI_NONAME
- || (hints->ai_flags & AI_ALL)))
- {
- struct addrinfo *v4res;
- nhints = *hints;
- nhints.ai_family = AF_INET;
- int ret2 = w32_to_gai_err (ws_getaddrinfo (hostname, servname,
- &nhints, &v4res));
- if (!ret2)
+ ret = w32_to_gai_err (GetNameInfoW (sa, salen, whost, whlen,
+ wserv, wslen, flags));
+ if (!ret)
{
- dupres = ga_duplist (v4res, true);
- ws_freeaddrinfo (v4res);
- if (!dupres)
+ const wchar_t *src;
+
+ if (whost)
{
- if (!ret)
- ipv4_freeaddrinfo (*res);
- return EAI_MEMORY;
+ if (idn_flags & NI_IDN)
+ {
+ /* Map flags to equivalent IDN_* flags. */
+ wchar_t *idnbuf = tp.w_get ();
+ if (IdnToUnicode (idn_flags >> 16, whost, -1,
+ idnbuf, NT_MAX_PATH))
+ whost = idnbuf;
+ else if (GetLastError () != ERROR_PROC_NOT_FOUND)
+ return EAI_IDN_ENCODE;
+ }
+ src = whost;
+ if (wcsrtombs (host, &src, hostlen, NULL) == (size_t) -1)
+ return EAI_IDN_ENCODE;
+ if (src)
+ return EAI_OVERFLOW;
}
- /* If a list of v6 addresses exists, append the v4-in-v6 address
- list. Otherwise just return the v4-in-v6 address list. */
- if (!ret)
+ if (wserv)
{
- struct addrinfo *ptr;
- for (ptr = *res; ptr->ai_next; ptr = ptr->ai_next)
- ;
- ptr->ai_next = dupres;
+ src = wserv;
+ if (wcsrtombs (serv, &src, servlen, NULL) == (size_t) -1)
+ return EAI_IDN_ENCODE;
+ if (src)
+ return EAI_OVERFLOW;
}
- else
- *res = dupres;
- ret = 0;
}
+ else if (ret == EAI_SYSTEM)
+ set_winsock_errno ();
}
- return ret;
-}
-
-extern "C" int
-cygwin_getnameinfo (const struct sockaddr *sa, socklen_t salen,
- char *host, size_t hostlen, char *serv,
- size_t servlen, int flags)
-{
- myfault efault;
- if (efault.faulted (EFAULT))
- return EAI_SYSTEM;
- load_ipv6 ();
- if (!ws_getnameinfo)
- return ipv4_getnameinfo (sa, salen, host, hostlen, serv, servlen, flags);
-
- /* When the incoming port number does not resolve to a well-known service,
- WinSock's getnameinfo up to Windows 2003 returns with error WSANO_DATA
- instead of setting `serv' to the numeric port number string, as required
- by RFC 3493. This is fixed on Vista and later. To avoid the error on
- systems up to Windows 2003, we check if the port number resolves
- to a well-known service. If not, we set the NI_NUMERICSERV flag. */
- if (!wincap.supports_all_posix_ai_flags ())
+ __except (EFAULT)
{
- int port = 0;
-
- switch (sa->sa_family)
- {
- case AF_INET:
- port = ((struct sockaddr_in *) sa)->sin_port;
- break;
- case AF_INET6:
- port = ((struct sockaddr_in6 *) sa)->sin6_port;
- break;
- }
- if (!port || !getservbyport (port, flags & NI_DGRAM ? "udp" : "tcp"))
- flags |= NI_NUMERICSERV;
+ ret = EAI_SYSTEM;
}
- int ret = w32_to_gai_err (ws_getnameinfo (sa, salen, host, hostlen, serv,
- servlen, flags));
- if (ret)
- set_winsock_errno ();
+ __endtry
return ret;
}
diff --git a/winsup/cygwin/netdb.cc b/winsup/cygwin/netdb.cc
index 3e3b35498..cfae78220 100644
--- a/winsup/cygwin/netdb.cc
+++ b/winsup/cygwin/netdb.cc
@@ -1,7 +1,5 @@
/* netdb.cc: network database related routines.
- Copyright 2002, 2003, 2007, 2008, 2010, 2011, 2013 Red Hat, Inc.
-
This file is part of Cygwin.
This software is a copyrighted work licensed under the terms of the
@@ -192,7 +190,7 @@ parse_services_line (FILE *svc_file, struct servent *sep)
*protocol++ = '\0';
sep->s_name = strdup (name);
paranoid_printf ("sep->s_name strdup %p", sep->s_name);
- sep->s_port = atoi (port);
+ sep->s_port = htons (atoi (port));
sep->s_proto = strdup (protocol);
paranoid_printf ("sep->s_proto strdup %p", sep->s_proto);
/* parse_alias_list relies on side effects. Read the comments
diff --git a/winsup/cygwin/nfs.cc b/winsup/cygwin/nfs.cc
index 32d9ad2bf..eaefe237e 100644
--- a/winsup/cygwin/nfs.cc
+++ b/winsup/cygwin/nfs.cc
@@ -1,7 +1,5 @@
/* nfs.cc
- Copyright 2008, 2010 Red Hat, Inc.
-
This software is a copyrighted work licensed under the terms of the
Cygwin license. Please consult the file "CYGWIN_LICENSE" for
details. */
diff --git a/winsup/cygwin/nfs.h b/winsup/cygwin/nfs.h
index 72a0179c7..cd7ffa039 100644
--- a/winsup/cygwin/nfs.h
+++ b/winsup/cygwin/nfs.h
@@ -1,7 +1,5 @@
/* nfs.h
- Copyright 2008, 2010 Red Hat, Inc.
-
This software is a copyrighted work licensed under the terms of the
Cygwin license. Please consult the file "CYGWIN_LICENSE" for
details. */
diff --git a/winsup/cygwin/nlsfuncs.cc b/winsup/cygwin/nlsfuncs.cc
index 91b2439b1..1fc3086d3 100644
--- a/winsup/cygwin/nlsfuncs.cc
+++ b/winsup/cygwin/nlsfuncs.cc
@@ -1,7 +1,5 @@
/* nlsfuncs.cc: NLS helper functions
- Copyright 2010, 2011, 2012, 2013 Red Hat, Inc.
-
This file is part of Cygwin.
This software is a copyrighted work licensed under the terms of the
@@ -9,7 +7,6 @@ Cygwin license. Please consult the file "CYGWIN_LICENSE" for
details. */
#include "winsup.h"
-#include <winnls.h>
#include <stdio.h>
#include <stdlib.h>
#include <locale.h>
@@ -32,6 +29,8 @@ details. */
#define getlocaleinfo(category,type) \
__getlocaleinfo(lcid,(type),_LC(category))
+#define setlocaleinfo(category,val) \
+ __setlocaleinfo(_LC(category),(val))
#define eval_datetimefmt(type,flags) \
__eval_datetimefmt(lcid,(type),(flags),&lc_time_ptr,\
lc_time_end-lc_time_ptr)
@@ -89,7 +88,9 @@ __get_lcid_from_locale (const char *name)
*c = '-';
mbstowcs (wlocale, locale, ENCODING_LEN + 1);
lcid = LocaleNameToLCID (wlocale, 0);
- if (lcid == 0)
+ /* Bug on Windows 10: LocaleNameToLCID returns LOCALE_CUSTOM_UNSPECIFIED
+ for unknown locales. */
+ if (lcid == 0 || lcid == LOCALE_CUSTOM_UNSPECIFIED)
{
/* Unfortunately there are a couple of locales for which no form
without a Script part per RFC 4646 exists.
@@ -128,24 +129,29 @@ __get_lcid_from_locale (const char *name)
{
/* Vista/2K8 is missing sr-ME and sr-RS. It has only the
deprecated sr-CS. So we map ME and RS to CS here. */
- if (lcid == 0)
+ if (lcid == 0 || lcid == LOCALE_CUSTOM_UNSPECIFIED)
lcid = LocaleNameToLCID (L"sr-Cyrl-CS", 0);
/* "@latin" modifier for the sr_XY locales changes
collation behaviour so lcid should accommodate that
by being set to the Latin sublang. */
- if (lcid != 0 && has_modifier ("@latin"))
+ if (lcid != 0 && lcid != LOCALE_CUSTOM_UNSPECIFIED
+ && has_modifier ("@latin"))
lcid = MAKELANGID (lcid & 0x3ff, (lcid >> 10) - 1);
}
else if (!strncmp (locale, "uz-", 3))
{
/* Equivalent for "@cyrillic" modifier in uz_UZ locale */
- if (lcid != 0 && has_modifier ("@cyrillic"))
+ if (lcid != 0 && lcid != LOCALE_CUSTOM_UNSPECIFIED
+ && has_modifier ("@cyrillic"))
lcid = MAKELANGID (lcid & 0x3ff, (lcid >> 10) + 1);
}
break;
}
}
- last_lcid = lcid ?: (LCID) -1;
+ if (lcid && lcid != LOCALE_CUSTOM_UNSPECIFIED)
+ last_lcid = lcid;
+ else
+ last_lcid = (LCID) -1;
debug_printf ("LCID=%04y", last_lcid);
return last_lcid;
}
@@ -359,6 +365,20 @@ __getlocaleinfo (LCID lcid, LCTYPE type, char **ptr, size_t size)
return ret;
}
+static wchar_t *
+__setlocaleinfo (char **ptr, size_t size, wchar_t val)
+{
+ wchar_t *ret;
+
+ if ((uintptr_t) *ptr % 1)
+ ++*ptr;
+ ret = (wchar_t *) *ptr;
+ ret[0] = val;
+ ret[1] = L'\0';
+ *ptr = (char *) (ret + 2);
+ return ret;
+}
+
static char *
__charfromwchar (const wchar_t *in, char **ptr, size_t size,
wctomb_p f_wctomb, const char *charset)
@@ -862,11 +882,28 @@ __set_lc_numeric_from_win (const char *name,
memcpy (_numeric_locale, _C_numeric_locale, sizeof (struct lc_numeric_T));
else
{
- /* decimal_point */
- _numeric_locale->wdecimal_point = getlocaleinfo (numeric, LOCALE_SDECIMAL);
+ /* decimal_point and thousands_sep */
+ if (lcid == 0x0429) /* fa_IR. Windows decimal_point is slash,
+ correct is dot */
+ {
+ _numeric_locale->wdecimal_point = setlocaleinfo (numeric, L'.');
+ _numeric_locale->wthousands_sep = setlocaleinfo (numeric, L',');
+ }
+ else if (lcid == 0x0463) /* ps_AF. Windows decimal_point is dot,
+ thousands_sep is comma, correct are
+ arabic separators. */
+ {
+ _numeric_locale->wdecimal_point = setlocaleinfo (numeric, 0x066b);
+ _numeric_locale->wthousands_sep = setlocaleinfo (numeric, 0x066c);
+ }
+ else
+ {
+ _numeric_locale->wdecimal_point = getlocaleinfo (numeric,
+ LOCALE_SDECIMAL);
+ _numeric_locale->wthousands_sep = getlocaleinfo (numeric,
+ LOCALE_STHOUSAND);
+ }
_numeric_locale->decimal_point = charfromwchar (numeric, wdecimal_point);
- /* thousands_sep */
- _numeric_locale->wthousands_sep = getlocaleinfo (numeric, LOCALE_STHOUSAND);
_numeric_locale->thousands_sep = charfromwchar (numeric, wthousands_sep);
/* grouping */
_numeric_locale->grouping = conv_grouping (lcid, LOCALE_SGROUPING,
@@ -947,14 +984,27 @@ __set_lc_monetary_from_win (const char *name,
else
_monetary_locale->currency_symbol = charfromwchar (monetary,
wcurrency_symbol);
- /* mon_decimal_point */
- _monetary_locale->wmon_decimal_point = getlocaleinfo (monetary,
- LOCALE_SMONDECIMALSEP);
+ /* mon_decimal_point and mon_thousands_sep */
+ if (lcid == 0x0429 || lcid == 0x0463) /* fa_IR or ps_AF. Windows
+ mon_decimal_point is slash
+ and comma, mon_thousands_sep
+ is comma and dot, correct
+ are arabic separators. */
+ {
+ _monetary_locale->wmon_decimal_point = setlocaleinfo (monetary,
+ 0x066b);
+ _monetary_locale->wmon_thousands_sep = setlocaleinfo (monetary,
+ 0x066c);
+ }
+ else
+ {
+ _monetary_locale->wmon_decimal_point = getlocaleinfo (monetary,
+ LOCALE_SMONDECIMALSEP);
+ _monetary_locale->wmon_thousands_sep = getlocaleinfo (monetary,
+ LOCALE_SMONTHOUSANDSEP);
+ }
_monetary_locale->mon_decimal_point = charfromwchar (monetary,
wmon_decimal_point);
- /* mon_thousands_sep */
- _monetary_locale->wmon_thousands_sep = getlocaleinfo (monetary,
- LOCALE_SMONTHOUSANDSEP);
_monetary_locale->mon_thousands_sep = charfromwchar (monetary,
wmon_thousands_sep);
/* mon_grouping */
@@ -1151,7 +1201,7 @@ __get_current_collate_codeset (void)
transformation. The advantage is that we don't need any files with
collation information. */
extern "C" int
-wcscoll (const wchar_t *ws1, const wchar_t *ws2)
+wcscoll (const wchar_t *__restrict ws1, const wchar_t *__restrict ws2)
{
int ret;
@@ -1164,7 +1214,7 @@ wcscoll (const wchar_t *ws1, const wchar_t *ws2)
}
extern "C" int
-strcoll (const char *s1, const char *s2)
+strcoll (const char *__restrict s1, const char *__restrict s2)
{
size_t n1, n2;
wchar_t *ws1, *ws2;
@@ -1205,7 +1255,7 @@ __collate_range_cmp (int c1, int c2)
}
extern "C" size_t
-wcsxfrm (wchar_t *ws1, const wchar_t *ws2, size_t wsn)
+wcsxfrm (wchar_t *__restrict ws1, const wchar_t *__restrict ws2, size_t wsn)
{
size_t ret;
@@ -1219,21 +1269,27 @@ wcsxfrm (wchar_t *ws1, const wchar_t *ws2, size_t wsn)
the result is wchar_t-NUL terminated. */
if (ret)
{
- ret = (ret + 1) / sizeof (wchar_t);
- if (ret >= wsn)
- return wsn;
- ws1[ret] = L'\0';
+ ret /= sizeof (wchar_t);
+ if (ret < wsn)
+ ws1[ret] = L'\0';
return ret;
}
if (GetLastError () != ERROR_INSUFFICIENT_BUFFER)
set_errno (EINVAL);
+ else
+ {
+ ret = LCMapStringW (collate_lcid, LCMAP_SORTKEY | LCMAP_BYTEREV, ws2, -1,
+ NULL, 0);
+ if (ret)
+ wsn = ret / sizeof (wchar_t);
+ }
return wsn;
}
extern "C" size_t
-strxfrm (char *s1, const char *s2, size_t sn)
+strxfrm (char *__restrict s1, const char *__restrict s2, size_t sn)
{
- size_t ret;
+ size_t ret = 0;
size_t n2;
wchar_t *ws2;
tmp_pathbuf tp;
@@ -1245,17 +1301,23 @@ strxfrm (char *s1, const char *s2, size_t sn)
n2 = lc_mbstowcs (collate_mbtowc, collate_charset, NULL, s2, 0) + 1;
ws2 = (n2 > NT_MAX_PATH ? (wchar_t *) malloc (n2 * sizeof (wchar_t))
: tp.w_get ());
- lc_mbstowcs (collate_mbtowc, collate_charset, ws2, s2, n2);
- /* The sort key is a NUL-terminated byte string. */
- ret = LCMapStringW (collate_lcid, LCMAP_SORTKEY, ws2, -1, (PWCHAR) s1, sn);
- if (n2 > NT_MAX_PATH)
- free (ws2);
+ if (ws2)
+ {
+ lc_mbstowcs (collate_mbtowc, collate_charset, ws2, s2, n2);
+ /* The sort key is a NUL-terminated byte string. */
+ ret = LCMapStringW (collate_lcid, LCMAP_SORTKEY, ws2, -1,
+ (PWCHAR) s1, sn);
+ }
if (ret == 0)
{
- if (GetLastError () != ERROR_INSUFFICIENT_BUFFER)
+ ret = sn + 1;
+ if (!ws2 || GetLastError () != ERROR_INSUFFICIENT_BUFFER)
set_errno (EINVAL);
- return sn;
+ else
+ ret = LCMapStringW (collate_lcid, LCMAP_SORTKEY, ws2, -1, NULL, 0);
}
+ if (ws2 && n2 > NT_MAX_PATH)
+ free (ws2);
/* LCMapStringW returns byte count including the terminating NUL character.
strxfrm is supposed to return length excluding the NUL. */
return ret - 1;
diff --git a/winsup/cygwin/ntdll.h b/winsup/cygwin/ntdll.h
index c67a775ec..448eadf20 100644
--- a/winsup/cygwin/ntdll.h
+++ b/winsup/cygwin/ntdll.h
@@ -1,8 +1,5 @@
/* ntdll.h. Contains ntdll specific stuff not defined elsewhere.
- Copyright 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
- 2011, 2012, 2013 Red Hat, Inc.
-
This file is part of Cygwin.
This software is a copyrighted work licensed under the terms of the
@@ -69,7 +66,9 @@
#define SYMBOLIC_LINK_QUERY 1
/* Transaction access rights. */
+#ifndef TRANSACTION_ALL_ACCESS
#define TRANSACTION_ALL_ACCESS (STANDARD_RIGHTS_REQUIRED | 0x3F)
+#endif
/* Event object access rights. */
#define EVENT_QUERY_STATE 1
@@ -141,6 +140,19 @@
#define HEAP_FLAG_EXECUTABLE 0x40000
#define HEAP_FLAG_DEBUGGED 0x40000000
+#define FILE_VC_QUOTA_NONE 0x00000000
+#define FILE_VC_QUOTA_TRACK 0x00000001
+#define FILE_VC_QUOTA_ENFORCE 0x00000002
+#define FILE_VC_QUOTA_MASK 0x00000003
+#define FILE_VC_CONTENT_INDEX_DISABLED 0x00000008
+#define FILE_VC_LOG_QUOTA_THRESHOLD 0x00000010
+#define FILE_VC_LOG_QUOTA_LIMIT 0x00000020
+#define FILE_VC_LOG_VOLUME_THRESHOLD 0x00000040
+#define FILE_VC_LOG_VOLUME_LIMIT 0x00000080
+#define FILE_VC_QUOTAS_INCOMPLETE 0x00000100
+#define FILE_VC_QUOTAS_REBUILDING 0x00000200
+#define FILE_VC_VALID_MASK 0x000003ff
+
/* IOCTL code to impersonate client of named pipe. */
#define FSCTL_PIPE_IMPERSONATE CTL_CODE(FILE_DEVICE_NAMED_PIPE, 7, \
METHOD_BUFFERED, FILE_ANY_ACCESS)
@@ -517,7 +529,8 @@ typedef enum _PROCESSINFOCLASS
ProcessTimes = 4,
ProcessSessionInformation = 24,
ProcessWow64Information = 26,
- ProcessImageFileName = 27
+ ProcessImageFileName = 27,
+ ProcessDebugFlags = 31
} PROCESSINFOCLASS;
/* Checked on 64 bit. */
@@ -842,7 +855,7 @@ typedef struct _FILE_NETWORK_OPEN_INFORMATION
/* Checked on 64 bit. */
typedef struct _FILE_INTERNAL_INFORMATION
{
- LARGE_INTEGER FileId;
+ LARGE_INTEGER IndexNumber;
} FILE_INTERNAL_INFORMATION, *PFILE_INTERNAL_INFORMATION;
/* Checked on 64 bit. */
@@ -998,6 +1011,16 @@ typedef struct _FILE_FS_SIZE_INFORMATION
} FILE_FS_SIZE_INFORMATION, *PFILE_FS_SIZE_INFORMATION;
/* Checked on 64 bit. */
+typedef struct _FILE_FS_CONTROL_INFORMATION {
+ LARGE_INTEGER FreeSpaceStartFiltering;
+ LARGE_INTEGER FreeSpaceThreshold;
+ LARGE_INTEGER FreeSpaceStopFiltering;
+ LARGE_INTEGER DefaultQuotaThreshold;
+ LARGE_INTEGER DefaultQuotaLimit;
+ ULONG FileSystemControlFlags;
+} FILE_FS_CONTROL_INFORMATION, *PFILE_FS_CONTROL_INFORMATION;
+
+/* Checked on 64 bit. */
typedef struct _FILE_FS_FULL_SIZE_INFORMATION
{
LARGE_INTEGER TotalAllocationUnits;
@@ -1065,6 +1088,24 @@ typedef struct _DIRECTORY_BASIC_INFORMATION
} DIRECTORY_BASIC_INFORMATION, *PDIRECTORY_BASIC_INFORMATION;
/* Checked on 64 bit. */
+typedef struct _FILE_GET_QUOTA_INFORMATION {
+ ULONG NextEntryOffset;
+ ULONG SidLength;
+ SID Sid;
+} FILE_GET_QUOTA_INFORMATION, *PFILE_GET_QUOTA_INFORMATION;
+
+/* Checked on 64 bit. */
+typedef struct _FILE_QUOTA_INFORMATION {
+ ULONG NextEntryOffset;
+ ULONG SidLength;
+ LARGE_INTEGER ChangeTime;
+ LARGE_INTEGER QuotaUsed;
+ LARGE_INTEGER QuotaThreshold;
+ LARGE_INTEGER QuotaLimit;
+ SID Sid;
+} FILE_QUOTA_INFORMATION, *PFILE_QUOTA_INFORMATION;
+
+/* Checked on 64 bit. */
typedef struct _FILE_GET_EA_INFORMATION
{
ULONG NextEntryOffset;
@@ -1114,12 +1155,13 @@ typedef enum _SEMAPHORE_INFORMATION_CLASS
SemaphoreBasicInformation = 0
} SEMAPHORE_INFORMATION_CLASS, *PSEMAPHORE_INFORMATION_CLASS;
-typedef enum _THREAD_INFORMATION_CLASS
+typedef enum _THREADINFOCLASS
{
ThreadBasicInformation = 0,
ThreadTimes = 1,
- ThreadImpersonationToken = 5
-} THREAD_INFORMATION_CLASS, *PTHREAD_INFORMATION_CLASS;
+ ThreadImpersonationToken = 5,
+ ThreadQuerySetWin32StartAddress = 9
+} THREADINFOCLASS, *PTHREADINFOCLASS;
/* Checked on 64 bit. */
typedef struct _THREAD_BASIC_INFORMATION
@@ -1178,8 +1220,19 @@ typedef enum _SECTION_INHERIT
typedef VOID (APIENTRY *PTIMER_APC_ROUTINE)(PVOID, ULONG, ULONG);
-/* Function declarations for ntdll.dll. These don't appear in any
- standard Win32 header. */
+#ifdef __x86_64__
+typedef struct _SCOPE_TABLE
+{
+ ULONG Count;
+ struct
+ {
+ ULONG BeginAddress;
+ ULONG EndAddress;
+ ULONG HandlerAddress;
+ ULONG JumpTarget;
+ } ScopeRecord[1];
+} SCOPE_TABLE, *PSCOPE_TABLE;
+#endif
#ifdef __cplusplus
/* This is the mapping of the KUSER_SHARED_DATA structure into the user
@@ -1188,6 +1241,9 @@ typedef VOID (APIENTRY *PTIMER_APC_ROUTINE)(PVOID, ULONG, ULONG);
static volatile KUSER_SHARED_DATA &SharedUserData
= *(volatile KUSER_SHARED_DATA *) 0x7ffe0000;
+/* Function declarations for ntdll.dll. These don't appear in any
+ standard Win32 header. */
+
extern "C"
{
#endif
@@ -1201,6 +1257,7 @@ extern "C"
NTSTATUS NTAPI NtCancelTimer (HANDLE, PBOOLEAN);
NTSTATUS NTAPI NtClose (HANDLE);
NTSTATUS NTAPI NtCommitTransaction (HANDLE, BOOLEAN);
+ NTSTATUS NTAPI NtContinue (PCONTEXT, BOOLEAN);
NTSTATUS NTAPI NtCreateDirectoryObject (PHANDLE, ACCESS_MASK,
POBJECT_ATTRIBUTES);
NTSTATUS NTAPI NtCreateKey (PHANDLE, ACCESS_MASK, POBJECT_ATTRIBUTES, ULONG,
@@ -1281,12 +1338,15 @@ extern "C"
ULONG, FILE_INFORMATION_CLASS);
NTSTATUS NTAPI NtQueryInformationProcess (HANDLE, PROCESSINFOCLASS,
PVOID, ULONG, PULONG);
- NTSTATUS NTAPI NtQueryInformationThread (HANDLE, THREAD_INFORMATION_CLASS,
- PVOID, ULONG, PULONG);
+ NTSTATUS NTAPI NtQueryInformationThread (HANDLE, THREADINFOCLASS, PVOID,
+ ULONG, PULONG);
NTSTATUS NTAPI NtQueryInformationToken (HANDLE, TOKEN_INFORMATION_CLASS,
PVOID, ULONG, PULONG);
- NTSTATUS NTAPI NtQueryObject (HANDLE, OBJECT_INFORMATION_CLASS, VOID *,
- ULONG, ULONG *);
+ NTSTATUS NTAPI NtQueryObject (HANDLE, OBJECT_INFORMATION_CLASS, PVOID, ULONG,
+ PULONG);
+ NTSTATUS NTAPI NtQueryQuotaInformationFile (HANDLE, PIO_STATUS_BLOCK, PVOID,
+ ULONG, BOOLEAN, PVOID, ULONG,
+ PSID, BOOLEAN);
NTSTATUS NTAPI NtQuerySemaphore (HANDLE, SEMAPHORE_INFORMATION_CLASS,
PVOID, ULONG, PULONG);
NTSTATUS NTAPI NtQuerySystemInformation (SYSTEM_INFORMATION_CLASS,
@@ -1303,9 +1363,8 @@ extern "C"
PULONG);
NTSTATUS NTAPI NtQueryVirtualMemory (HANDLE, PVOID, MEMORY_INFORMATION_CLASS,
PVOID, SIZE_T, PSIZE_T);
- NTSTATUS NTAPI NtQueryVolumeInformationFile (HANDLE, IO_STATUS_BLOCK *,
- VOID *, ULONG,
- FS_INFORMATION_CLASS);
+ NTSTATUS NTAPI NtQueryVolumeInformationFile (HANDLE, PIO_STATUS_BLOCK, PVOID,
+ ULONG, FS_INFORMATION_CLASS);
NTSTATUS NTAPI NtReadFile (HANDLE, HANDLE, PIO_APC_ROUTINE, PVOID,
PIO_STATUS_BLOCK, PVOID, ULONG, PLARGE_INTEGER,
PULONG);
@@ -1314,10 +1373,11 @@ extern "C"
NTSTATUS NTAPI NtSetEvent (HANDLE, PULONG);
NTSTATUS NTAPI NtSetInformationFile (HANDLE, PIO_STATUS_BLOCK, PVOID, ULONG,
FILE_INFORMATION_CLASS);
- NTSTATUS NTAPI NtSetInformationThread (HANDLE, THREAD_INFORMATION_CLASS,
- PVOID, ULONG);
+ NTSTATUS NTAPI NtSetInformationThread (HANDLE, THREADINFOCLASS, PVOID, ULONG);
NTSTATUS NTAPI NtSetInformationToken (HANDLE, TOKEN_INFORMATION_CLASS, PVOID,
ULONG);
+ NTSTATUS NTAPI NtSetQuotaInformationFile (HANDLE, PIO_STATUS_BLOCK, PVOID,
+ ULONG);
NTSTATUS NTAPI NtSetSecurityObject (HANDLE, SECURITY_INFORMATION,
PSECURITY_DESCRIPTOR);
NTSTATUS NTAPI NtSetTimer (HANDLE, PLARGE_INTEGER, PTIMER_APC_ROUTINE, PVOID,
@@ -1325,6 +1385,8 @@ extern "C"
NTSTATUS NTAPI NtSetTimerResolution (ULONG, BOOLEAN, PULONG);
NTSTATUS NTAPI NtSetValueKey (HANDLE, PUNICODE_STRING, ULONG, ULONG, PVOID,
ULONG);
+ NTSTATUS NTAPI NtSetVolumeInformationFile (HANDLE, PIO_STATUS_BLOCK, PVOID,
+ ULONG, FS_INFORMATION_CLASS);
NTSTATUS NTAPI NtUnlockFile (HANDLE, PIO_STATUS_BLOCK, PLARGE_INTEGER,
PLARGE_INTEGER, ULONG);
NTSTATUS NTAPI NtUnlockVirtualMemory (HANDLE, PVOID *, PSIZE_T, ULONG);
@@ -1387,8 +1449,10 @@ extern "C"
PACL *, PBOOLEAN);
NTSTATUS NTAPI RtlGetGroupSecurityDescriptor (PSECURITY_DESCRIPTOR, PSID *,
PBOOLEAN);
+ NTSTATUS NTAPI RtlGetNtVersionNumbers (LPDWORD, LPDWORD, LPDWORD);
NTSTATUS NTAPI RtlGetOwnerSecurityDescriptor (PSECURITY_DESCRIPTOR, PSID *,
PBOOLEAN);
+ NTSTATUS NTAPI RtlGetVersion (PRTL_OSVERSIONINFOEXW);
PSID_IDENTIFIER_AUTHORITY NTAPI RtlIdentifierAuthoritySid (PSID);
VOID NTAPI RtlInitEmptyUnicodeString (PUNICODE_STRING, PCWSTR, USHORT);
VOID NTAPI RtlInitAnsiString (PANSI_STRING, PCSTR);
diff --git a/winsup/cygwin/ntea.cc b/winsup/cygwin/ntea.cc
index 3c860096e..6896b880f 100644
--- a/winsup/cygwin/ntea.cc
+++ b/winsup/cygwin/ntea.cc
@@ -1,8 +1,5 @@
/* ntea.cc: code for manipulating Extended Attributes
- Copyright 1997, 1998, 2000, 2001, 2002, 2003, 2005, 2006, 2007, 2008, 2009,
- 2010, 2011 Red Hat, Inc.
-
This file is part of Cygwin.
This software is a copyrighted work licensed under the terms of the
@@ -17,15 +14,26 @@ details. */
#include "dtable.h"
#include "cygheap.h"
#include "ntdll.h"
+#include "tls_pbuf.h"
#include <stdlib.h>
#include <attr/xattr.h>
#define MAX_EA_NAME_LEN 256
#define MAX_EA_VALUE_LEN 65536
-/* At least one maximum sized entry fits. */
-#define EA_BUFSIZ (sizeof (FILE_FULL_EA_INFORMATION) + MAX_EA_NAME_LEN \
- + MAX_EA_VALUE_LEN)
+/* At least one maximum sized entry fits.
+ CV 2014-04-04: NtQueryEaFile function chokes on buffers bigger than 64K
+ with STATUS_INVALID_PARAMETER if the handle points to a file
+ on a remote share, at least on Windows 7 and later.
+ In theory the buffer should have a size of
+
+ sizeof (FILE_FULL_EA_INFORMATION) + MAX_EA_NAME_LEN
+ + MAX_EA_VALUE_LEN
+
+ (65804 bytes), but we're opting for simplicity here, and
+ a 64K buffer has the advantage that we can use a tmp_pathbuf
+ buffer, rather than having to alloca 64K from stack. */
+#define EA_BUFSIZ MAX_EA_VALUE_LEN
#define NEXT_FEA(p) ((PFILE_FULL_EA_INFORMATION) (p->NextEntryOffset \
? (char *) p + p->NextEntryOffset : NULL))
@@ -41,176 +49,181 @@ read_ea (HANDLE hdl, path_conv &pc, const char *name, char *value, size_t size)
ULONG glen = 0;
PFILE_GET_EA_INFORMATION gea = NULL;
PFILE_FULL_EA_INFORMATION fea;
+ tmp_pathbuf tp;
/* We have to store the latest EaName to compare with the next one, since
- ZwQueryEaFile has a bug when accessing files on a remote share. It
+ NtQueryEaFile has a bug when accessing files on a remote share. It
returns the last EA entry of the file infinitely. Even utilizing the
optional EaIndex only helps marginally. If you use that, the last
EA in the file is returned twice. */
char lastname[MAX_EA_NAME_LEN];
- myfault efault;
- if (efault.faulted (EFAULT))
- goto out;
-
- pc.get_object_attr (attr, sec_none_nih);
+ __try
+ {
+ pc.get_object_attr (attr, sec_none_nih);
- debug_printf ("read_ea (%S, %s, %p, %lu)",
- attr.ObjectName, name, value, size);
+ debug_printf ("read_ea (%S, %s, %p, %lu)",
+ attr.ObjectName, name, value, size);
- /* Early open if handle is NULL. This allows to return error codes like
- ENOENT before we actually check for the correctness of the EA name and
- stuff like that. */
- if (!hdl)
- {
- status = NtOpenFile (&h, READ_CONTROL | FILE_READ_EA, &attr, &io,
- FILE_SHARE_VALID_FLAGS, FILE_OPEN_FOR_BACKUP_INTENT);
- if (!NT_SUCCESS (status))
+ /* Early open if handle is NULL. This allows to return error codes like
+ ENOENT before we actually check for the correctness of the EA name and
+ stuff like that. */
+ if (!hdl)
{
- __seterrno_from_nt_status (status);
- goto out;
+ status = NtOpenFile (&h, READ_CONTROL | FILE_READ_EA, &attr, &io,
+ FILE_SHARE_VALID_FLAGS,
+ FILE_OPEN_FOR_BACKUP_INTENT);
+ if (!NT_SUCCESS (status))
+ {
+ __seterrno_from_nt_status (status);
+ __leave;
+ }
}
- hdl = NULL;
- }
-
- fea = (PFILE_FULL_EA_INFORMATION) alloca (EA_BUFSIZ);
- if (name)
- {
- size_t nlen;
+ fea = (PFILE_FULL_EA_INFORMATION) tp.w_get ();
- /* For compatibility with Linux, we only allow user xattrs and
- return ENOTSUP otherwise. */
- if (ascii_strncasematch (name, "user.", 5))
- name += 5;
- else
+ if (name)
{
- set_errno (ENOTSUP);
- goto out;
- }
+ size_t nlen;
- if ((nlen = strlen (name)) >= MAX_EA_NAME_LEN)
- {
- set_errno (EINVAL);
- return -1;
- }
- glen = sizeof (FILE_GET_EA_INFORMATION) + nlen;
- gea = (PFILE_GET_EA_INFORMATION) alloca (glen);
+ /* For compatibility with Linux, we only allow user xattrs and
+ return ENOTSUP otherwise. */
+ if (ascii_strncasematch (name, "user.", 5))
+ name += 5;
+ else
+ {
+ set_errno (ENOTSUP);
+ __leave;
+ }
- gea->NextEntryOffset = 0;
- gea->EaNameLength = nlen;
- strcpy (gea->EaName, name);
- }
+ if ((nlen = strlen (name)) >= MAX_EA_NAME_LEN)
+ {
+ set_errno (EINVAL);
+ __leave;
+ }
+ glen = sizeof (FILE_GET_EA_INFORMATION) + nlen;
+ gea = (PFILE_GET_EA_INFORMATION) alloca (glen);
- while (true)
- {
- if (h)
+ gea->NextEntryOffset = 0;
+ gea->EaNameLength = nlen;
+ strcpy (gea->EaName, name);
+ }
+
+ while (true)
{
- status = NtQueryEaFile (h, &io, fea, EA_BUFSIZ, TRUE, gea, glen,
- NULL, TRUE);
- if (status != STATUS_ACCESS_DENIED || !hdl)
+ if (h)
+ {
+ status = NtQueryEaFile (h, &io, fea, EA_BUFSIZ, TRUE, gea, glen,
+ NULL, TRUE);
+ if (status != STATUS_ACCESS_DENIED || !hdl)
+ break;
+ pc.init_reopen_attr (attr, h);
+ }
+ status = NtOpenFile (&h, READ_CONTROL | FILE_READ_EA, &attr, &io,
+ FILE_SHARE_VALID_FLAGS,
+ FILE_OPEN_FOR_BACKUP_INTENT);
+ if (!NT_SUCCESS (status))
break;
+ hdl = NULL;
}
- status = NtOpenFile (&h, READ_CONTROL | FILE_READ_EA, &attr, &io,
- FILE_SHARE_VALID_FLAGS, FILE_OPEN_FOR_BACKUP_INTENT);
if (!NT_SUCCESS (status))
- break;
- hdl = NULL;
- }
- if (!NT_SUCCESS (status))
- {
- switch (status)
- {
- case STATUS_NO_EAS_ON_FILE:
- ret = 0;
- break;
- case STATUS_INVALID_DEVICE_REQUEST:
- set_errno (ENOTSUP);
- break;
- case STATUS_NOT_FOUND:
- /* STATUS_NOT_FOUND is returned when calling NtQueryEaFile on NFS.
- In theory this should mean that the file just has no EAs, but in
- fact NFS doesn't support EAs, other than the EAs which are used
- for NFS requests. We're playing safe and convert STATUS_NOT_FOUND
- to ENOATTR, unless we're on NFS, where we convert it to ENOTSUP. */
- set_errno (pc.fs_is_nfs () ? ENOTSUP : ENOATTR);
- break;
- case STATUS_NONEXISTENT_EA_ENTRY:
- /* Actually STATUS_NONEXISTENT_EA_ENTRY is either never generated, or
- it was only generated in some old and long forgotton NT version.
- See below. For safty reasons, we handle it here, nevertheless. */
- set_errno (ENOATTR);
- break;
- default:
- __seterrno_from_nt_status (status);
- break;
- }
- goto out;
- }
- if (name)
- {
- /* Another weird behaviour of ZwQueryEaFile. If you ask for a
- specific EA which is not present in the file's EA list, you don't
- get a useful error code like STATUS_NONEXISTENT_EA_ENTRY. Rather
- ZwQueryEaFile returns success with the entry's EaValueLength
- set to 0. */
- if (!fea->EaValueLength)
- {
- set_errno (ENOATTR);
- goto out;
- }
- if (size > 0)
{
- if (size < fea->EaValueLength)
+ switch (status)
{
- set_errno (ERANGE);
- goto out;
+ case STATUS_NO_EAS_ON_FILE:
+ ret = 0;
+ break;
+ case STATUS_INVALID_DEVICE_REQUEST:
+ set_errno (ENOTSUP);
+ break;
+ case STATUS_NOT_FOUND:
+ /* STATUS_NOT_FOUND is returned when calling NtQueryEaFile on NFS.
+ In theory this should mean that the file just has no EAs, but
+ in fact NFS doesn't support EAs, other than the EAs which are
+ used for NFS requests. We're playing safe and convert
+ STATUS_NOT_FOUND to ENOATTR, unless we're on NFS, where we
+ convert it to ENOTSUP. */
+ set_errno (pc.fs_is_nfs () ? ENOTSUP : ENOATTR);
+ break;
+ case STATUS_NONEXISTENT_EA_ENTRY:
+ /* Actually STATUS_NONEXISTENT_EA_ENTRY is either never generated,
+ or it was only generated in some old and long forgotton NT
+ version. See below. For safty reasons, we handle it here,
+ nevertheless. */
+ set_errno (ENOATTR);
+ break;
+ default:
+ __seterrno_from_nt_status (status);
+ break;
}
- memcpy (value, fea->EaName + fea->EaNameLength + 1,
- fea->EaValueLength);
+ __leave;
}
- ret = fea->EaValueLength;
- }
- else
- {
- ret = 0;
- do
+ if (name)
{
- fea->EaNameLength += 5; /* "user." */
+ /* Another weird behaviour of NtQueryEaFile. If you ask for a
+ specific EA which is not present in the file's EA list, you don't
+ get a useful error code like STATUS_NONEXISTENT_EA_ENTRY. Rather
+ NtQueryEaFile returns success with the entry's EaValueLength
+ set to 0. */
+ if (!fea->EaValueLength)
+ {
+ set_errno (ENOATTR);
+ __leave;
+ }
if (size > 0)
{
- if ((size_t) ret + fea->EaNameLength + 1 > size)
+ if (size < fea->EaValueLength)
{
set_errno (ERANGE);
- goto out;
+ __leave;
}
- /* For compatibility with Linux, we always prepend "user." to
- the attribute name, so effectively we only support user
- attributes from a application point of view. */
- char tmpbuf[MAX_EA_NAME_LEN * 2];
- char *tp = stpcpy (tmpbuf, "user.");
- stpcpy (tp, fea->EaName);
- /* NTFS stores all EA names in uppercase unfortunately. To keep
- compatibility with ext/xfs EA namespaces and accompanying
- tools, which expect the namespaces to be lower case, we return
- EA names in lowercase if the file is on a native NTFS. */
- if (pc.fs_is_ntfs ())
- strlwr (tp);
- tp = stpcpy (value, tmpbuf) + 1;
- ret += tp - value;
- value = tp;
+ memcpy (value, fea->EaName + fea->EaNameLength + 1,
+ fea->EaValueLength);
}
- else
- ret += fea->EaNameLength + 1;
- strcpy (lastname, fea->EaName);
- status = NtQueryEaFile (h, &io, fea, EA_BUFSIZ, TRUE, NULL, 0,
- NULL, FALSE);
+ ret = fea->EaValueLength;
+ }
+ else
+ {
+ ret = 0;
+ do
+ {
+ fea->EaNameLength += 5; /* "user." */
+ if (size > 0)
+ {
+ if ((size_t) ret + fea->EaNameLength + 1 > size)
+ {
+ set_errno (ERANGE);
+ __leave;
+ }
+ /* For compatibility with Linux, we always prepend "user." to
+ the attribute name, so effectively we only support user
+ attributes from a application point of view. */
+ char tmpbuf[MAX_EA_NAME_LEN * 2];
+ char *tp = stpcpy (tmpbuf, "user.");
+ stpcpy (tp, fea->EaName);
+ /* NTFS stores all EA names in uppercase unfortunately. To
+ keep compatibility with ext/xfs EA namespaces and
+ accompanying tools, which expect the namespaces to be
+ lower case, we return EA names in lowercase if the file
+ is on a native NTFS. */
+ if (pc.fs_is_ntfs ())
+ strlwr (tp);
+ tp = stpcpy (value, tmpbuf) + 1;
+ ret += tp - value;
+ value = tp;
+ }
+ else
+ ret += fea->EaNameLength + 1;
+ strcpy (lastname, fea->EaName);
+ status = NtQueryEaFile (h, &io, fea, EA_BUFSIZ, TRUE, NULL, 0,
+ NULL, FALSE);
+ }
+ while (NT_SUCCESS (status) && strcmp (lastname, fea->EaName) != 0);
}
- while (NT_SUCCESS (status) && strcmp (lastname, fea->EaName) != 0);
}
-
-out:
- if (!hdl)
- CloseHandle (h);
+ __except (EFAULT) {}
+ __endtry
+ if (!hdl && h)
+ NtClose (h);
debug_printf ("%d = read_ea(%S, %s, %p, %lu)",
ret, attr.ObjectName, name, value, size);
return ret;
@@ -229,122 +242,123 @@ write_ea (HANDLE hdl, path_conv &pc, const char *name, const char *value,
ULONG flen;
size_t nlen;
- myfault efault;
- if (efault.faulted (EFAULT))
- goto out;
-
- pc.get_object_attr (attr, sec_none_nih);
+ __try
+ {
+ pc.get_object_attr (attr, sec_none_nih);
- debug_printf ("write_ea (%S, %s, %p, %lu, %d)",
- attr.ObjectName, name, value, size, flags);
+ debug_printf ("write_ea (%S, %s, %p, %lu, %d)",
+ attr.ObjectName, name, value, size, flags);
- /* Early open if handle is NULL. This allows to return error codes like
- ENOENT before we actually check for the correctness of the EA name and
- stuff like that. */
- if (!hdl)
- {
- status = NtOpenFile (&h, READ_CONTROL | FILE_WRITE_EA, &attr, &io,
- FILE_SHARE_VALID_FLAGS, FILE_OPEN_FOR_BACKUP_INTENT);
- if (!NT_SUCCESS (status))
+ /* Early open if handle is NULL. This allows to return error codes like
+ ENOENT before we actually check for the correctness of the EA name and
+ stuff like that. */
+ if (!hdl)
{
- __seterrno_from_nt_status (status);
- goto out;
+ status = NtOpenFile (&h, READ_CONTROL | FILE_WRITE_EA, &attr, &io,
+ FILE_SHARE_VALID_FLAGS,
+ FILE_OPEN_FOR_BACKUP_INTENT);
+ if (!NT_SUCCESS (status))
+ {
+ __seterrno_from_nt_status (status);
+ __leave;
+ }
}
- hdl = NULL;
- }
-
- /* For compatibility with Linux, we only allow user xattrs and
- return ENOTSUP otherwise. */
- if (!ascii_strncasematch (name, "user.", 5))
- {
- set_errno (ENOTSUP);
- goto out;
- }
-
- /* removexattr is supposed to fail with ENOATTR if the requested EA is not
- available. This is equivalent to the XATTR_REPLACE flag for setxattr. */
- if (!value)
- flags = XATTR_REPLACE;
- if (flags)
- {
- if (flags != XATTR_CREATE && flags != XATTR_REPLACE)
+ /* For compatibility with Linux, we only allow user xattrs and
+ return ENOTSUP otherwise. */
+ if (!ascii_strncasematch (name, "user.", 5))
{
- set_errno (EINVAL);
- goto out;
+ set_errno (ENOTSUP);
+ __leave;
}
- ssize_t rret = read_ea (hdl, pc, name, NULL, 0);
- if (flags == XATTR_CREATE && rret > 0)
+
+ /* removexattr is supposed to fail with ENOATTR if the requested EA is
+ not available. This is equivalent to XATTR_REPLACE for setxattr. */
+ if (!value)
+ flags = XATTR_REPLACE;
+
+ if (flags)
{
- set_errno (EEXIST);
- goto out;
+ if (flags != XATTR_CREATE && flags != XATTR_REPLACE)
+ {
+ set_errno (EINVAL);
+ __leave;
+ }
+ ssize_t rret = read_ea (hdl, pc, name, NULL, 0);
+ if (flags == XATTR_CREATE && rret > 0)
+ {
+ set_errno (EEXIST);
+ __leave;
+ }
+ if (flags == XATTR_REPLACE && rret < 0)
+ __leave;
}
- if (flags == XATTR_REPLACE && rret < 0)
- goto out;
- }
- /* Skip "user." prefix. */
- name += 5;
+ /* Skip "user." prefix. */
+ name += 5;
- if ((nlen = strlen (name)) >= MAX_EA_NAME_LEN)
- {
- set_errno (EINVAL);
- goto out;
- }
- flen = sizeof (FILE_FULL_EA_INFORMATION) + nlen + 1 + size;
- fea = (PFILE_FULL_EA_INFORMATION) alloca (flen);
- fea->NextEntryOffset = 0;
- fea->Flags = 0;
- fea->EaNameLength = nlen;
- fea->EaValueLength = size;
- strcpy (fea->EaName, name);
- if (value)
- memcpy (fea->EaName + fea->EaNameLength + 1, value, size);
-
- while (true)
- {
- if (h)
+ if ((nlen = strlen (name)) >= MAX_EA_NAME_LEN)
+ {
+ set_errno (EINVAL);
+ __leave;
+ }
+ flen = sizeof (FILE_FULL_EA_INFORMATION) + nlen + 1 + size;
+ fea = (PFILE_FULL_EA_INFORMATION) alloca (flen);
+ fea->NextEntryOffset = 0;
+ fea->Flags = 0;
+ fea->EaNameLength = nlen;
+ fea->EaValueLength = size;
+ strcpy (fea->EaName, name);
+ if (value)
+ memcpy (fea->EaName + fea->EaNameLength + 1, value, size);
+
+ while (true)
{
- status = NtSetEaFile (h, &io, fea, flen);
- if (status != STATUS_ACCESS_DENIED || !hdl)
+ if (h)
+ {
+ status = NtSetEaFile (h, &io, fea, flen);
+ if (status != STATUS_ACCESS_DENIED || !hdl)
+ break;
+ pc.init_reopen_attr (attr, h);
+ }
+ status = NtOpenFile (&h, READ_CONTROL | FILE_WRITE_EA, &attr, &io,
+ FILE_SHARE_VALID_FLAGS,
+ FILE_OPEN_FOR_BACKUP_INTENT);
+ if (!NT_SUCCESS (status))
break;
+ hdl = NULL;
}
- status = NtOpenFile (&h, READ_CONTROL | FILE_WRITE_EA, &attr, &io,
- FILE_SHARE_VALID_FLAGS, FILE_OPEN_FOR_BACKUP_INTENT);
if (!NT_SUCCESS (status))
- break;
- hdl = NULL;
- }
- if (!NT_SUCCESS (status))
- {
- switch (status)
{
- case STATUS_EA_TOO_LARGE:
- /* STATUS_EA_TOO_LARGE has a matching Win32 error ERROR_EA_TABLE_FULL.
- For some unknown reason RtlNtStatusToDosError does not translate
- STATUS_EA_TOO_LARGE to ERROR_EA_TABLE_FULL, but instead to
- ERROR_EA_LIST_INCONSISTENT. This error code is also returned for
- STATUS_EA_LIST_INCONSISTENT, which means the incoming EA list is...
- inconsistent. For obvious reasons we translate
- ERROR_EA_LIST_INCONSISTENT to EINVAL, so we have to handle
- STATUS_EA_TOO_LARGE explicitely here, to get the correct mapping
- to ENOSPC. */
- set_errno (ENOSPC);
- break;
- case STATUS_INVALID_DEVICE_REQUEST:
- set_errno (ENOTSUP);
- break;
- default:
- __seterrno_from_nt_status (status);
- break;
+ switch (status)
+ {
+ case STATUS_EA_TOO_LARGE:
+ /* STATUS_EA_TOO_LARGE has a matching Win32 error code
+ ERROR_EA_TABLE_FULL. For some reason RtlNtStatusToDosError
+ does not translate STATUS_EA_TOO_LARGE to ERROR_EA_TABLE_FULL,
+ but instead to ERROR_EA_LIST_INCONSISTENT. This error code is
+ also returned for STATUS_EA_LIST_INCONSISTENT, which means the
+ incoming EA list is... inconsistent. For obvious reasons we
+ translate ERROR_EA_LIST_INCONSISTENT to EINVAL, so we have to
+ handle STATUS_EA_TOO_LARGE explicitely here, to get the correct
+ mapping to ENOSPC. */
+ set_errno (ENOSPC);
+ break;
+ case STATUS_INVALID_DEVICE_REQUEST:
+ set_errno (ENOTSUP);
+ break;
+ default:
+ __seterrno_from_nt_status (status);
+ break;
+ }
}
+ else
+ ret = 0;
}
- else
- ret = 0;
-
-out:
- if (!hdl)
- CloseHandle (h);
+ __except (EFAULT) {}
+ __endtry
+ if (!hdl && h)
+ NtClose (h);
debug_printf ("%d = write_ea(%S, %s, %p, %lu, %d)",
ret, attr.ObjectName, name, value, size, flags);
return ret;
diff --git a/winsup/cygwin/passwd.cc b/winsup/cygwin/passwd.cc
index 9cb9c2ed2..dfa90acb3 100644
--- a/winsup/cygwin/passwd.cc
+++ b/winsup/cygwin/passwd.cc
@@ -1,8 +1,5 @@
/* passwd.cc: getpwnam () and friends
- Copyright 1996, 1997, 1998, 2000, 2001, 2002, 2003, 2004, 2005, 2007, 2008,
- 2009, 2010, 2011, 2012 Red Hat, Inc.
-
This file is part of Cygwin.
This software is a copyrighted work licensed under the terms of the
@@ -10,6 +7,7 @@ Cygwin license. Please consult the file "CYGWIN_LICENSE" for
details. */
#include "winsup.h"
+#include <lm.h>
#include <stdlib.h>
#include <stdio.h>
#include "cygerrno.h"
@@ -19,127 +17,213 @@ details. */
#include "dtable.h"
#include "pinfo.h"
#include "cygheap.h"
-#include "pwdgrp.h"
#include "shared_info.h"
-
-/* Read /etc/passwd only once for better performance. This is done
- on the first call that needs information from it. */
-
-passwd *passwd_buf;
-static pwdgrp pr (passwd_buf);
+#include "miscfuncs.h"
+#include "ldap.h"
+#include "tls_pbuf.h"
/* Parse /etc/passwd line into passwd structure. */
bool
pwdgrp::parse_passwd ()
{
- passwd &res = (*passwd_buf)[curr_lines];
- res.pw_name = next_str (':');
- res.pw_passwd = next_str (':');
- if (!next_num (res.pw_uid))
+ pg_pwd &res = passwd ()[curr_lines];
+ res.p.pw_name = next_str (pwd_sep);
+ res.p.pw_passwd = next_str (pwd_sep);
+ if (!next_num (res.p.pw_uid))
return false;
- if (!next_num (res.pw_gid))
+ if (!next_num (res.p.pw_gid))
return false;
- res.pw_comment = NULL;
- res.pw_gecos = next_str (':');
- res.pw_dir = next_str (':');
- res.pw_shell = next_str (':');
+ res.p.pw_comment = NULL;
+ res.p.pw_gecos = next_str (pwd_sep);
+ res.p.pw_dir = next_str (pwd_sep);
+ res.p.pw_shell = next_str (pwd_sep);
+ cygsid csid;
+ if (csid.getfrompw_gecos (&res.p))
+ RtlCopySid (SECURITY_MAX_SID_SIZE, res.sid, csid);
+ /* lptr points to the \0 after pw_shell. Increment by one to get the correct
+ required buffer len in getpw_cp. */
+ res.len = lptr - res.p.pw_name + 1;
return true;
}
-/* Read in /etc/passwd and save contents in the password cache.
- This sets pr to loaded or emulated so functions in this file can
- tell that /etc/passwd has been read in or will be emulated. */
void
-pwdgrp::read_passwd ()
-{
- load (L"\\etc\\passwd");
-
- char strbuf[128] = "";
- bool searchentry = true;
- struct passwd *pw;
- /* must be static */
- static char NO_COPY pretty_ls[] = "????????:*:-1:-1:::";
-
- add_line (pretty_ls);
- cygsid tu = cygheap->user.sid ();
- tu.string (strbuf);
- if (!user_shared->cb || myself->uid == ILLEGAL_UID)
- searchentry = !internal_getpwsid (tu);
- if (searchentry
- && (!(pw = internal_getpwnam (cygheap->user.name ()))
- || !user_shared->cb
- || (myself->uid != ILLEGAL_UID
- && myself->uid != pw->pw_uid
- && !internal_getpwuid (myself->uid))))
- {
- static char linebuf[1024]; // must be static and
- // should not be NO_COPY
- snprintf (linebuf, sizeof (linebuf), "%s:*:%u:%u:,%s:%s:/bin/sh",
- cygheap->user.name (),
- (!user_shared->cb || myself->uid == ILLEGAL_UID)
- ? UNKNOWN_UID : myself->uid,
- !user_shared->cb ? UNKNOWN_GID : myself->gid,
- strbuf, getenv ("HOME") ?: "");
- debug_printf ("Completing /etc/passwd: %s", linebuf);
- add_line (linebuf);
- }
+pwdgrp::init_pwd ()
+{
+ pwdgrp_buf_elem_size = sizeof (pg_pwd);
+ parse = &pwdgrp::parse_passwd;
+ pwd_sep = ':';
}
struct passwd *
-internal_getpwsid (cygpsid &sid)
+pwdgrp::find_user (cygpsid &sid)
{
- struct passwd *pw;
- char *ptr1, *ptr2, *endptr;
- char sid_string[128] = {0,','};
+ for (ULONG i = 0; i < curr_lines; i++)
+ if (sid == passwd ()[i].sid)
+ return &passwd ()[i].p;
+ return NULL;
+}
- pr.refresh (false);
+struct passwd *
+pwdgrp::find_user (const char *name)
+{
+ for (ULONG i = 0; i < curr_lines; i++)
+ /* on Windows NT user names are case-insensitive */
+ if (strcasematch (name, passwd ()[i].p.pw_name))
+ return &passwd ()[i].p;
+ return NULL;
+}
- if (sid.string (sid_string + 2))
+struct passwd *
+pwdgrp::find_user (uid_t uid)
+{
+ for (ULONG i = 0; i < curr_lines; i++)
+ if (uid == passwd ()[i].p.pw_uid)
+ return &passwd ()[i].p;
+ return NULL;
+}
+
+struct passwd *
+internal_getpwsid (cygpsid &sid, cyg_ldap *pldap)
+{
+ struct passwd *ret;
+
+ cygheap->pg.nss_init ();
+ /* Check caches first. */
+ if (cygheap->pg.nss_cygserver_caching ()
+ && (ret = cygheap->pg.pwd_cache.cygserver.find_user (sid)))
+ return ret;
+ if (cygheap->pg.nss_pwd_files ()
+ && (ret = cygheap->pg.pwd_cache.file.find_user (sid)))
+ return ret;
+ if (cygheap->pg.nss_pwd_db ()
+ && (ret = cygheap->pg.pwd_cache.win.find_user (sid)))
+ return ret;
+ /* Ask sources afterwards. */
+ if (cygheap->pg.nss_cygserver_caching ()
+ && (ret = cygheap->pg.pwd_cache.cygserver.add_user_from_cygserver (sid)))
+ return ret;
+ if (cygheap->pg.nss_pwd_files ())
{
- endptr = strchr (sid_string + 2, 0) - 1;
- for (int i = 0; i < pr.curr_lines; i++)
- {
- pw = passwd_buf + i;
- if (pw->pw_dir > pw->pw_gecos + 8)
- for (ptr1 = endptr, ptr2 = pw->pw_dir - 2;
- *ptr1 == *ptr2; ptr2--)
- if (!*--ptr1)
- return pw;
- }
+ cygheap->pg.pwd_cache.file.check_file ();
+ if ((ret = cygheap->pg.pwd_cache.file.add_user_from_file (sid)))
+ return ret;
}
+ if (cygheap->pg.nss_pwd_db ())
+ return cygheap->pg.pwd_cache.win.add_user_from_windows (sid, pldap);
return NULL;
}
+/* This function gets only called from mkpasswd via cygwin_internal. */
struct passwd *
-internal_getpwuid (uid_t uid, bool check)
+internal_getpwsid_from_db (cygpsid &sid)
{
- pr.refresh (check);
+ cygheap->pg.nss_init ();
+ return cygheap->pg.pwd_cache.win.add_user_from_windows (sid);
+}
- for (int i = 0; i < pr.curr_lines; i++)
- if (uid == passwd_buf[i].pw_uid)
- return passwd_buf + i;
+struct passwd *
+internal_getpwnam (const char *name, cyg_ldap *pldap)
+{
+ struct passwd *ret;
+
+ cygheap->pg.nss_init ();
+ /* Check caches first. */
+ if (cygheap->pg.nss_cygserver_caching ()
+ && (ret = cygheap->pg.pwd_cache.cygserver.find_user (name)))
+ return ret;
+ if (cygheap->pg.nss_pwd_files ()
+ && (ret = cygheap->pg.pwd_cache.file.find_user (name)))
+ return ret;
+ if (cygheap->pg.nss_pwd_db ()
+ && (ret = cygheap->pg.pwd_cache.win.find_user (name)))
+ return ret;
+ /* Ask sources afterwards. */
+ if (cygheap->pg.nss_cygserver_caching ()
+ && (ret = cygheap->pg.pwd_cache.cygserver.add_user_from_cygserver (name)))
+ return ret;
+ if (cygheap->pg.nss_pwd_files ())
+ {
+ cygheap->pg.pwd_cache.file.check_file ();
+ if ((ret = cygheap->pg.pwd_cache.file.add_user_from_file (name)))
+ return ret;
+ }
+ if (cygheap->pg.nss_pwd_db ())
+ return cygheap->pg.pwd_cache.win.add_user_from_windows (name, pldap);
return NULL;
}
struct passwd *
-internal_getpwnam (const char *name, bool check)
+internal_getpwuid (uid_t uid, cyg_ldap *pldap)
{
- pr.refresh (check);
-
- for (int i = 0; i < pr.curr_lines; i++)
- /* on Windows NT user names are case-insensitive */
- if (strcasematch (name, passwd_buf[i].pw_name))
- return passwd_buf + i;
+ struct passwd *ret;
+
+ cygheap->pg.nss_init ();
+ /* Check caches first. */
+ if (cygheap->pg.nss_cygserver_caching ()
+ && (ret = cygheap->pg.pwd_cache.cygserver.find_user (uid)))
+ return ret;
+ if (cygheap->pg.nss_pwd_files ()
+ && (ret = cygheap->pg.pwd_cache.file.find_user (uid)))
+ return ret;
+ if (cygheap->pg.nss_pwd_db ()
+ && (ret = cygheap->pg.pwd_cache.win.find_user (uid)))
+ return ret;
+ /* Ask sources afterwards. */
+ if (cygheap->pg.nss_cygserver_caching ()
+ && (ret = cygheap->pg.pwd_cache.cygserver.add_user_from_cygserver (uid)))
+ return ret;
+ if (cygheap->pg.nss_pwd_files ())
+ {
+ cygheap->pg.pwd_cache.file.check_file ();
+ if ((ret = cygheap->pg.pwd_cache.file.add_user_from_file (uid)))
+ return ret;
+ }
+ if (cygheap->pg.nss_pwd_db () || uid == ILLEGAL_UID)
+ return cygheap->pg.pwd_cache.win.add_user_from_windows (uid, pldap);
return NULL;
}
+/* getpwuid/getpwnam are not reentrant. */
+static struct {
+ struct passwd p;
+ char *buf;
+ size_t bufsiz;
+} app_pw;
+
+static struct passwd *
+getpw_cp (struct passwd *temppw)
+{
+ if (!temppw)
+ return NULL;
+ pg_pwd *pw = (pg_pwd *) temppw;
+ if (app_pw.bufsiz < pw->len)
+ {
+ char *newbuf = (char *) realloc (app_pw.buf, pw->len);
+ if (!newbuf)
+ {
+ set_errno (ENOMEM);
+ return NULL;
+ }
+ app_pw.buf = newbuf;
+ app_pw.bufsiz = pw->len;
+ }
+ memcpy (app_pw.buf, pw->p.pw_name, pw->len);
+ memcpy (&app_pw.p, &pw->p, sizeof pw->p);
+ ptrdiff_t diff = app_pw.buf - pw->p.pw_name;
+ app_pw.p.pw_name += diff;
+ app_pw.p.pw_passwd += diff;
+ app_pw.p.pw_gecos += diff;
+ app_pw.p.pw_dir += diff;
+ app_pw.p.pw_shell += diff;
+ return &app_pw.p;
+}
extern "C" struct passwd *
getpwuid32 (uid_t uid)
{
- struct passwd *temppw = internal_getpwuid (uid, true);
+ struct passwd *temppw = internal_getpwuid (uid);
pthread_testcancel ();
- return temppw;
+ return getpw_cp (temppw);
}
#ifdef __x86_64__
@@ -160,7 +244,7 @@ getpwuid_r32 (uid_t uid, struct passwd *pwd, char *buffer, size_t bufsize, struc
if (!pwd || !buffer)
return ERANGE;
- struct passwd *temppw = internal_getpwuid (uid, true);
+ struct passwd *temppw = internal_getpwuid (uid);
pthread_testcancel ();
if (!temppw)
return 0;
@@ -198,9 +282,9 @@ getpwuid_r (__uid16_t uid, struct passwd *pwd, char *buffer, size_t bufsize, str
extern "C" struct passwd *
getpwnam (const char *name)
{
- struct passwd *temppw = internal_getpwnam (name, true);
+ struct passwd *temppw = internal_getpwnam (name);
pthread_testcancel ();
- return temppw;
+ return getpw_cp (temppw);
}
@@ -216,7 +300,7 @@ getpwnam_r (const char *nam, struct passwd *pwd, char *buffer, size_t bufsize, s
if (!pwd || !buffer || !nam)
return ERANGE;
- struct passwd *temppw = internal_getpwnam (nam, true);
+ struct passwd *temppw = internal_getpwnam (nam);
pthread_testcancel ();
if (!temppw)
@@ -242,39 +326,445 @@ getpwnam_r (const char *nam, struct passwd *pwd, char *buffer, size_t bufsize, s
return 0;
}
-extern "C" struct passwd *
-getpwent (void)
+/* getpwent functions are not reentrant. */
+static pw_ent pwent;
+
+void
+pg_ent::clear_cache ()
{
- if (_my_tls.locals.pw_pos == 0)
- pr.refresh (true);
- if (_my_tls.locals.pw_pos < pr.curr_lines)
- return passwd_buf + _my_tls.locals.pw_pos++;
+ if (pg.curr_lines)
+ {
+ if (state > from_file)
+ cfree (group ? grp.g.gr_name : pwd.p.pw_name);
+ pg.curr_lines = 0;
+ }
+}
+void
+pg_ent::setent (bool _group, int _enums, PCWSTR _enum_tdoms)
+{
+ cygheap->dom.init ();
+ endent (_group);
+ if (!_enums && !_enum_tdoms)
+ {
+ /* This is the default, when called from the usual setpwent/setgrent
+ functions. */
+ enums = cygheap->pg.nss_db_enums ();
+ enum_tdoms = cygheap->pg.nss_db_enum_tdoms ();
+ if (_group)
+ {
+ from_files = cygheap->pg.nss_grp_files ();
+ from_db = cygheap->pg.nss_grp_db ();
+ }
+ else
+ {
+ from_files = cygheap->pg.nss_pwd_files ();
+ from_db = cygheap->pg.nss_pwd_db ();
+ }
+ }
+ else
+ {
+ /* This case is when called from mkpasswd/mkgroup via cygwin_internal. */
+ enums = _enums;
+ enum_tdoms = _enum_tdoms;
+ from_files = false;
+ from_db = true;
+ }
+ state = from_cache;
+}
+
+void *
+pg_ent::getent (void)
+{
+ void *entry;
+
+ switch (state)
+ {
+ case rewound:
+ state = from_cache;
+ /*FALLTHRU*/
+ case from_cache:
+ if (nss_db_enum_caches ()
+ && (entry = enumerate_caches ()))
+ return entry;
+ state = from_file;
+ /*FALLTHRU*/
+ case from_file:
+ if (from_files
+ && nss_db_enum_files ()
+ && (entry = enumerate_file ()))
+ return entry;
+ state = from_builtin;
+ /*FALLTHRU*/
+ case from_builtin:
+ if (from_db
+ && nss_db_enum_builtin ()
+ && (entry = enumerate_builtin ()))
+ return entry;
+ state = from_local;
+ /*FALLTHRU*/
+ case from_local:
+ if (from_db
+ && nss_db_enum_local ()
+ && (!cygheap->dom.member_machine ()
+ || !nss_db_enum_primary ())
+ && (entry = enumerate_local ()))
+ return entry;
+ state = from_sam;
+ /*FALLTHRU*/
+ case from_sam:
+ if (from_db
+ && nss_db_enum_local ()
+ /* Domain controller? If so, sam and ad are one and the same
+ and "local ad" would list all domain accounts twice without
+ this test. */
+ && (cygheap->dom.account_flat_name ()[0] != L'@'
+ || !nss_db_enum_primary ())
+ && (entry = enumerate_sam ()))
+ return entry;
+ state = from_ad;
+ /*FALLTHRU*/
+ case from_ad:
+ if (cygheap->dom.member_machine ()
+ && from_db
+ && (entry = enumerate_ad ()))
+ return entry;
+ state = finished;
+ /*FALLTHRU*/
+ case finished:
+ break;
+ }
return NULL;
}
-#ifndef __x86_64__
-extern "C" struct passwd *
-getpwduid (__uid16_t)
+void
+pg_ent::endent (bool _group)
+{
+ if (buf)
+ {
+ if (state == from_file)
+ free (buf);
+ else if (state == from_local || state == from_sam)
+ NetApiBufferFree (buf);
+ buf = NULL;
+ }
+ if (!pg.curr_lines)
+ {
+ if ((group = _group))
+ {
+ pg.init_grp ();
+ pg.pwdgrp_buf = (void *) &grp;
+ }
+ else
+ {
+ pg.init_pwd ();
+ pg.pwdgrp_buf = (void *) &pwd;
+ }
+ pg.max_lines = 1;
+ }
+ else
+ clear_cache ();
+ cldap.close ();
+ rl.close ();
+ cnt = max = resume = 0;
+ enums = 0;
+ enum_tdoms = NULL;
+ state = rewound;
+}
+
+void *
+pg_ent::enumerate_file ()
+{
+ void *entry;
+
+ if (!cnt)
+ {
+ pwdgrp &prf = group ? cygheap->pg.grp_cache.file
+ : cygheap->pg.pwd_cache.file;
+ if (prf.check_file ())
+ {
+ if (!buf)
+ buf = (char *) malloc (NT_MAX_PATH);
+ if (buf
+ && !rl.init (prf.file_attr (), buf, NT_MAX_PATH))
+ {
+ free (buf);
+ buf = NULL;
+ }
+ }
+ }
+ ++cnt;
+ if ((entry = pg.add_account_post_fetch (rl.gets (), false)))
+ return entry;
+ rl.close ();
+ free (buf);
+ buf = NULL;
+ cnt = max = resume = 0;
+ return NULL;
+}
+
+void *
+pg_ent::enumerate_builtin ()
+{
+ static cygpsid *pwd_builtins[] = {
+ &well_known_system_sid,
+ &well_known_local_service_sid,
+ &well_known_network_service_sid,
+ &well_known_admins_sid,
+ &trusted_installer_sid,
+ NULL
+ };
+ static cygpsid *grp_builtins[] = {
+ &well_known_system_sid,
+ &trusted_installer_sid,
+ NULL
+ };
+
+ cygpsid **builtins = group ? grp_builtins : pwd_builtins;
+ if (!builtins[cnt])
+ {
+ cnt = max = resume = 0;
+ return NULL;
+ }
+ cygsid sid (*builtins[cnt++]);
+ fetch_user_arg_t arg;
+ arg.type = SID_arg;
+ arg.sid = &sid;
+ char *line = pg.fetch_account_from_windows (arg);
+ return pg.add_account_post_fetch (line, false);
+}
+
+void *
+pg_ent::enumerate_sam ()
+{
+ while (true)
+ {
+ if (!cnt)
+ {
+ DWORD total;
+ NET_API_STATUS ret;
+
+ if (buf)
+ {
+ NetApiBufferFree (buf);
+ buf = NULL;
+ }
+ if (resume == ULONG_MAX)
+ ret = ERROR_NO_MORE_ITEMS;
+ else if (group)
+ ret = NetGroupEnum (NULL, 2, (PBYTE *) &buf, MAX_PREFERRED_LENGTH,
+ &max, &total, &resume);
+ else
+ ret = NetUserEnum (NULL, 20, FILTER_NORMAL_ACCOUNT, (PBYTE *) &buf,
+ MAX_PREFERRED_LENGTH, &max, &total,
+ (PDWORD) &resume);
+ if (ret == NERR_Success)
+ resume = ULONG_MAX;
+ else if (ret != ERROR_MORE_DATA)
+ {
+ cnt = max = resume = 0;
+ return NULL;
+ }
+ }
+ while (cnt < max)
+ {
+ cygsid sid (cygheap->dom.account_sid ());
+ sid_sub_auth (sid, sid_sub_auth_count (sid)) =
+ group ? ((PGROUP_INFO_2) buf)[cnt].grpi2_group_id
+ : ((PUSER_INFO_20) buf)[cnt].usri20_user_id;
+ ++cnt;
+ ++sid_sub_auth_count (sid);
+ fetch_user_arg_t arg;
+ arg.type = SID_arg;
+ arg.sid = &sid;
+ char *line = pg.fetch_account_from_windows (arg);
+ if (line)
+ return pg.add_account_post_fetch (line, false);
+ }
+ cnt = 0;
+ }
+}
+
+void *
+pg_ent::enumerate_ad ()
+{
+ while (true)
+ {
+ if (!cnt)
+ {
+ PDS_DOMAIN_TRUSTSW td;
+
+ if (!resume)
+ {
+ ++resume;
+ if (!nss_db_enum_primary ()
+ || cldap.enumerate_ad_accounts (NULL, group) != NO_ERROR)
+ continue;
+ RtlInitUnicodeString (&dom, cygheap->dom.primary_flat_name ());
+ }
+ else if ((td = cygheap->dom.trusted_domain (resume - 1)))
+ {
+ ++resume;
+ /* Ignore primary domain in list of trusted domains only if all
+ trusted domains are enumerated anyway. This handles an
+ annoying backward compatibility problem in mkpasswd/mkgroup.
+ Without this test, `mkpasswd -d PRIMARY_DOMAIN' wouldn't
+ work as expected. */
+ if (((enums & ENUM_TDOMS_ALL) && td->Flags & DS_DOMAIN_PRIMARY)
+ || !td->DomainSid
+ || (!nss_db_enum_tdom (td->NetbiosDomainName)
+ && !nss_db_enum_tdom (td->DnsDomainName))
+ || cldap.enumerate_ad_accounts (td->DnsDomainName, group)
+ != NO_ERROR)
+ continue;
+ RtlInitUnicodeString (&dom, td->NetbiosDomainName);
+ }
+ else
+ {
+ cldap.close ();
+ return NULL;
+ }
+ }
+ ++cnt;
+ cygsid sid;
+ int ret = cldap.next_account (sid);
+ if (ret == NO_ERROR)
+ {
+ fetch_acc_t full;
+ fetch_user_arg_t arg;
+ UNICODE_STRING name;
+
+ arg.type = FULL_acc_arg;
+ arg.full_acc = &full;
+ full.sid = sid;
+ RtlInitUnicodeString (&name,
+ cldap.get_string_attribute (L"sAMAccountName"));
+ full.name = &name;
+ full.dom = &dom;
+ if (sid_sub_auth (sid, 0) == SECURITY_BUILTIN_DOMAIN_RID)
+ full.acc_type = SidTypeAlias;
+ else
+ full.acc_type = group ? SidTypeGroup : SidTypeUser;
+ char *line = pg.fetch_account_from_windows (arg, &cldap);
+ if (line)
+ return pg.add_account_post_fetch (line, false);
+ ret = EIO;
+ }
+ if (ret != ENMFILE)
+ {
+ cldap.close ();
+ set_errno (ret);
+ return NULL;
+ }
+ cnt = 0;
+ }
+}
+
+void *
+pw_ent::enumerate_caches ()
+{
+ switch (max)
+ {
+ case 0:
+ if (cygheap->pg.nss_cygserver_caching ())
+ {
+ pwdgrp &prc = cygheap->pg.pwd_cache.cygserver;
+ if (cnt < prc.cached_users ())
+ return &prc.passwd ()[cnt++].p;
+ }
+ cnt = 0;
+ max = 1;
+ /*FALLTHRU*/
+ case 1:
+ if (from_files)
+ {
+ pwdgrp &prf = cygheap->pg.pwd_cache.file;
+ prf.check_file ();
+ if (cnt < prf.cached_users ())
+ return &prf.passwd ()[cnt++].p;
+ }
+ cnt = 0;
+ max = 2;
+ /*FALLTHRU*/
+ default:
+ if (from_db)
+ {
+ pwdgrp &prw = cygheap->pg.pwd_cache.win;
+ if (cnt < prw.cached_users ())
+ return &prw.passwd ()[cnt++].p;
+ }
+ break;
+ }
+ cnt = max = 0;
+ return NULL;
+}
+
+void *
+pw_ent::enumerate_local ()
{
return NULL;
}
-#endif
+
+struct passwd *
+pw_ent::getpwent (void)
+{
+ if (state == rewound)
+ setent (false);
+ else
+ clear_cache ();
+ return (struct passwd *) getent ();
+}
extern "C" void
-setpwent (void)
+setpwent ()
+{
+ pwent.setpwent ();
+}
+
+extern "C" struct passwd *
+getpwent (void)
{
- _my_tls.locals.pw_pos = 0;
+ return pwent.getpwent ();
}
extern "C" void
endpwent (void)
{
- _my_tls.locals.pw_pos = 0;
+ pwent.endpwent ();
}
+/* *_filtered functions are called from mkpasswd */
+void *
+setpwent_filtered (int enums, PCWSTR enum_tdoms)
+{
+ pw_ent *pw = new pw_ent;
+ if (pw)
+ pw->setpwent (enums, enum_tdoms);
+ return (void *) pw;
+}
+
+void *
+getpwent_filtered (void *pw)
+{
+ return (void *) ((pw_ent *) pw)->getpwent ();
+}
+
+void
+endpwent_filtered (void *pw)
+{
+ ((pw_ent *) pw)->endpwent ();
+}
+
+#ifndef __x86_64__
+extern "C" struct passwd *
+getpwduid (__uid16_t)
+{
+ return NULL;
+}
+#endif
+
extern "C" int
-setpassent ()
+setpassent (int)
{
return 0;
}
diff --git a/winsup/cygwin/path.cc b/winsup/cygwin/path.cc
index 8acb6ff6b..519aef118 100644
--- a/winsup/cygwin/path.cc
+++ b/winsup/cygwin/path.cc
@@ -1,8 +1,5 @@
/* path.cc: path support.
- Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
- 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 Red Hat, Inc.
-
This file is part of Cygwin.
This software is a copyrighted work licensed under the terms of the
@@ -48,14 +45,16 @@
c: means c:\.
*/
+/* This file includes both the XPG and GNU basename functions, with the
+ former exported as "basename" for ABI compatibility but the latter
+ declared as such for source compatibility with glibc. This tells
+ <string.h> not to declare the GNU variant in order to prevent a conflicting
+ declaration error with the XPG variant implemented herein. */
+#define basename basename
#include "winsup.h"
#include "miscfuncs.h"
#include <ctype.h>
#include <winioctl.h>
-#include <wingdi.h>
-#include <winuser.h>
-#include <winnetwk.h>
-#include <winnls.h>
#include <shlobj.h>
#include <sys/param.h>
#include <sys/cygwin.h>
@@ -73,6 +72,7 @@
#include <ntdll.h>
#include <wchar.h>
#include <wctype.h>
+#undef basename
suffix_info stat_suffixes[] =
{
@@ -94,7 +94,7 @@ struct symlink_info
bool isdevice;
_major_t major;
_minor_t minor;
- _mode_t mode;
+ __mode_t mode;
int check (char *path, const suffix_info *suffixes, fs_info &fs,
path_conv_handle &conv_hdl);
int set (char *path);
@@ -231,9 +231,30 @@ has_dot_last_component (const char *dir, bool test_dot_dot)
return last_comp == dir || last_comp[-1] == '/';
}
+static int
+is_posix_space(const char *path)
+{
+ const int nprefixes = 2;
+ static const char *prefix[] = { "dev:/", "proc:/" };
+ static int length[] = { 5, 6 };
+ int i;
+
+ for (i = 0; i < nprefixes; i++)
+ {
+ int len = length[i];
+ if (strncmp(path, prefix[i], len) == 0)
+ return len - 2;
+ }
+
+ return 0;
+}
+
/* Normalize a POSIX path.
All duplicate /'s, except for 2 leading /'s, are deleted.
- The result is 0 for success, or an errno error value. */
+ The result is:
+ 0 == success;
+ -1 == success: Win32 path;
+ > 0 == errno error value; */
int
normalize_posix_path (const char *src, char *dst, char *&tail)
@@ -243,28 +264,32 @@ normalize_posix_path (const char *src, char *dst, char *&tail)
bool check_parent = false;
syscall_printf ("src %s", src);
- if ((isdrive (src) && isdirsep (src[2])) || *src == '\\')
+ /*
+ * Under Cygnal, only a few special paths beginning with a prefix
+ * are in a "POSIX space" and are transformed into Cygwin paths
+ * according to this pattern:
+ *
+ * dev:/path/to -> /dev/path/to
+ *
+ * Only certain words are recognized.
+ */
+
+ int len = is_posix_space(src);
+
+ if (!len)
goto win32_path;
tail = dst;
- if (!isslash (src[0]))
- {
- if (!cygheap->cwd.get (dst))
- return get_errno ();
- tail = strchr (tail, '\0');
- if (isslash (dst[0]) && isslash (dst[1]))
- ++dst_start;
- if (*src == '.')
- {
- if (tail == dst_start + 1 && *dst_start == '/')
- tail--;
- goto sawdot;
- }
- if (tail > dst && !isslash (tail[-1]))
- *tail++ = '/';
- }
+
+ *tail++ = '/';
+
+ strncpy(tail, src, len);
+
+ src += len + 1; /* src now points at slash after colon */
+ tail += len; /* dst holds "/word" with no colon */
+
/* Two leading /'s? If so, preserve them. */
- else if (isslash (src[1]) && !isslash (src[2]))
+ if (isslash (src[1]) && !isslash (src[2]))
{
*tail++ = *src++;
++dst_start;
@@ -288,7 +313,6 @@ normalize_posix_path (const char *src, char *dst, char *&tail)
if (*src != '.')
break;
- sawdot:
if (src[1] != '.')
{
if (!src[1])
@@ -315,9 +339,31 @@ normalize_posix_path (const char *src, char *dst, char *&tail)
{
*tail = 0;
debug_printf ("checking %s before '..'", dst);
- path_conv head (dst);
+ /* In conjunction with native and NFS symlinks,
+ this call can result in a recursion which eats
+ up our tmp_pathbuf buffers. This in turn results
+ in a api_fatal call. To avoid that, we're
+ checking our remaining buffers and return an
+ error code instead. Note that this only happens
+ if the path contains 15 or more relative native/NFS
+ symlinks with a ".." in the target path. */
+ tmp_pathbuf tp;
+ if (!tp.check_usage (4, 3))
+ return ELOOP;
+ path_conv head (dst, PC_SYM_FOLLOW | PC_POSIX);
if (!head.isdir())
return ENOENT;
+ /* At this point, dst is a normalized path. If the
+ normalized path created by path_conv does not
+ match the normalized path we're just testing, then
+ the path in dst contains native symlinks. If we
+ just plunge along, removing the previous path
+ component, we may end up removing a symlink from
+ the path and the resulting path will be invalid.
+ So we replace dst with what we found in head
+ instead. All the work replacing symlinks has been
+ done in that path anyway, so why repeat it? */
+ tail = stpcpy (dst, head.get_posix ());
}
check_parent = false;
}
@@ -355,9 +401,9 @@ path_conv::add_ext_from_sym (symlink_info &sym)
{
if (sym.ext_here && *sym.ext_here)
{
- known_suffix = path + sym.extn;
+ suffix = path + sym.extn;
if (sym.ext_tacked_on)
- strcpy ((char *) known_suffix, sym.ext_here);
+ strcpy ((char *) suffix, sym.ext_here);
}
}
@@ -391,13 +437,13 @@ mkrelpath (char *path, bool caseinsensitive)
}
void
-path_conv::set_normalized_path (const char *path_copy)
+path_conv::set_posix (const char *path_copy)
{
if (path_copy)
{
size_t n = strlen (path_copy) + 1;
- char *p = (char *) crealloc_abort ((void *) normalized_path, n);
- normalized_path = (const char *) memcpy (p, path_copy, n);
+ char *p = (char *) crealloc_abort ((void *) posix_path, n);
+ posix_path = (const char *) memcpy (p, path_copy, n);
}
}
@@ -467,6 +513,18 @@ get_nt_native_path (const char *path, UNICODE_STRING& upath, bool dos)
return &upath;
}
+/* Handle with extrem care! Only used in a certain instance in try_to_bin.
+ Every other usage needs a careful check. */
+void
+path_conv::set_nt_native_path (PUNICODE_STRING new_path)
+{
+ wide_path = (PWCHAR) crealloc_abort (wide_path, new_path->MaximumLength);
+ memcpy (wide_path, new_path->Buffer, new_path->Length);
+ uni_path.Length = new_path->Length;
+ uni_path.MaximumLength = new_path->MaximumLength;
+ uni_path.Buffer = wide_path;
+}
+
PUNICODE_STRING
path_conv::get_nt_native_path ()
{
@@ -499,24 +557,28 @@ path_conv::get_wide_win32_path (PWCHAR wc)
return wc;
}
-void
+static void
warn_msdos (const char *src)
{
- if (user_shared->warned_msdos || !dos_file_warning || !cygwin_finished_initializing)
+ if (user_shared->warned_msdos || !cygwin_finished_initializing)
return;
tmp_pathbuf tp;
char *posix_path = tp.c_get ();
- small_printf ("cygwin warning:\n");
+ small_printf ("Cygwin WARNING:\n");
if (cygwin_conv_path (CCP_WIN_A_TO_POSIX | CCP_RELATIVE, src,
posix_path, NT_MAX_PATH))
- small_printf (" MS-DOS style path detected: %ls\n POSIX equivalent preferred.\n",
+ small_printf (
+" MS-DOS style path detected: %ls\n POSIX equivalent preferred.\n",
src);
else
- small_printf (" MS-DOS style path detected: %ls\n Preferred POSIX equivalent is: %ls\n",
+ small_printf (
+" MS-DOS style path detected: %ls\n"
+" Preferred POSIX equivalent is: %ls\n",
src, posix_path);
- small_printf (" CYGWIN environment variable option \"nodosfilewarning\" turns off this warning.\n"
- " Consult the user's guide for more details about POSIX paths:\n"
- " http://cygwin.com/cygwin-ug-net/using.html#using-pathnames\n");
+ small_printf (
+" CYGWIN environment variable option \"nodosfilewarning\" turns off this\n"
+" warning. Consult the user's guide for more details about POSIX paths:\n"
+" http://cygwin.com/cygwin-ug-net/using.html#using-pathnames\n");
user_shared->warned_msdos = true;
}
@@ -633,569 +695,606 @@ path_conv::check (const char *src, unsigned opt,
}
#endif
- myfault efault;
- if (efault.faulted ())
- {
- error = EFAULT;
- return;
- }
- int loop = 0;
- path_flags = 0;
- known_suffix = NULL;
- fileattr = INVALID_FILE_ATTRIBUTES;
- caseinsensitive = OBJ_CASE_INSENSITIVE;
- if (wide_path)
- cfree (wide_path);
- wide_path = NULL;
- if (path)
+ __try
{
- cfree (modifiable_path ());
- path = NULL;
- }
- close_conv_handle ();
- memset (&dev, 0, sizeof (dev));
- fs.clear ();
- if (normalized_path)
- {
- cfree ((void *) normalized_path);
- normalized_path = NULL;
- }
- int component = 0; // Number of translated components
-
- if (!(opt & PC_NULLEMPTY))
- error = 0;
- else if (!*src)
- {
- error = ENOENT;
- return;
- }
-
- bool is_msdos = false;
- /* This loop handles symlink expansion. */
- for (;;)
- {
- MALLOC_CHECK;
- assert (src);
-
- is_relpath = !isabspath (src);
- error = normalize_posix_path (src, path_copy, tail);
- if (error > 0)
- return;
- if (error < 0)
+ int loop = 0;
+ path_flags = 0;
+ suffix = NULL;
+ fileattr = INVALID_FILE_ATTRIBUTES;
+ caseinsensitive = OBJ_CASE_INSENSITIVE;
+ if (wide_path)
+ cfree (wide_path);
+ wide_path = NULL;
+ if (path)
+ {
+ cfree (modifiable_path ());
+ path = NULL;
+ }
+ close_conv_handle ();
+ memset (&dev, 0, sizeof (dev));
+ fs.clear ();
+ if (posix_path)
{
- if (component == 0)
- is_msdos = true;
- error = 0;
+ cfree ((void *) posix_path);
+ posix_path = NULL;
}
+ int component = 0; // Number of translated components
- /* Detect if the user was looking for a directory. We have to strip the
- trailing slash initially while trying to add extensions but take it
- into account during processing */
- if (tail > path_copy + 2 && isslash (tail[-1]))
+ if (!(opt & PC_NULLEMPTY))
+ error = 0;
+ else if (!*src)
{
- need_directory = 1;
- *--tail = '\0';
+ error = ENOENT;
+ return;
}
- path_end = tail;
-
- /* Scan path_copy from right to left looking either for a symlink
- or an actual existing file. If an existing file is found, just
- return. If a symlink is found, exit the for loop.
- Also: be careful to preserve the errno returned from
- symlink.check as the caller may need it. */
- /* FIXME: Do we have to worry about multiple \'s here? */
- component = 0; // Number of translated components
- sym.contents[0] = '\0';
-
- int symlen = 0;
-
- for (unsigned pflags_or = opt & (PC_NO_ACCESS_CHECK | PC_KEEP_HANDLE);
- ;
- pflags_or = 0)
+
+ bool is_msdos = false;
+ /* This loop handles symlink expansion. */
+ for (;;)
{
- const suffix_info *suff;
- char *full_path;
+ assert (src);
- /* Don't allow symlink.check to set anything in the path_conv
- class if we're working on an inner component of the path */
- if (component)
+ is_relpath = !isabspath (src);
+ error = normalize_posix_path (src, path_copy, tail);
+ if (error > 0)
+ return;
+ if (error < 0)
{
- suff = NULL;
- full_path = pathbuf;
+ if (component == 0)
+ is_msdos = true;
+ error = 0;
}
- else
+
+ /* Detect if the user was looking for a directory. We have to strip
+ the trailing slash initially while trying to add extensions but
+ take it into account during processing */
+ if (tail > path_copy + 2 && isslash (tail[-1]))
{
- suff = suffixes;
- full_path = THIS_path;
+ need_directory = 1;
+ *--tail = '\0';
}
+ path_end = tail;
+
+ /* Scan path_copy from right to left looking either for a symlink
+ or an actual existing file. If an existing file is found, just
+ return. If a symlink is found, exit the for loop.
+ Also: be careful to preserve the errno returned from
+ symlink.check as the caller may need it. */
+ /* FIXME: Do we have to worry about multiple \'s here? */
+ component = 0; // Number of translated components
+ sym.contents[0] = '\0';
+
+ int symlen = 0;
+
+ for (unsigned pflags_or = opt & (PC_NO_ACCESS_CHECK | PC_KEEP_HANDLE);
+ ;
+ pflags_or = 0)
+ {
+ const suffix_info *suff;
+ char *full_path;
- /* Convert to native path spec sans symbolic link info. */
- error = mount_table->conv_to_win32_path (path_copy, full_path, dev,
- &sym.pflags);
+ /* Don't allow symlink.check to set anything in the path_conv
+ class if we're working on an inner component of the path */
+ if (component)
+ {
+ suff = NULL;
+ full_path = pathbuf;
+ }
+ else
+ {
+ suff = suffixes;
+ full_path = THIS_path;
+ }
- if (error)
- return;
+ retry_fs_via_processfd:
- sym.pflags |= pflags_or;
+ /* Convert to native path spec sans symbolic link info. */
+ error = mount_table->conv_to_win32_path (path_copy, full_path,
+ dev, &sym.pflags,
+ is_msdos);
- if (!dev.exists ())
- {
- error = ENXIO;
- return;
- }
+ if (error)
+ return;
- if (iscygdrive_dev (dev))
- {
- if (!component)
- fileattr = FILE_ATTRIBUTE_DIRECTORY | FILE_ATTRIBUTE_READONLY;
- else
+ sym.pflags |= pflags_or;
+
+ if (!dev.exists ())
{
- fileattr = getfileattr (THIS_path,
- sym.pflags & MOUNT_NOPOSIX);
- dev = FH_FS;
+ error = ENXIO;
+ return;
}
- goto out;
- }
- else if (isdev_dev (dev))
- {
- /* Just make sure that the path handling goes on as with FH_FS. */
- }
- else if (isvirtual_dev (dev))
- {
- /* FIXME: Calling build_fhandler here is not the right way to handle this. */
- fhandler_virtual *fh = (fhandler_virtual *) build_fh_dev (dev, path_copy);
- virtual_ftype_t file_type;
- if (!fh)
- file_type = virt_none;
- else
+
+ if (iscygdrive_dev (dev))
{
- file_type = fh->exists ();
- if (file_type == virt_symlink)
+ if (!component)
+ fileattr = FILE_ATTRIBUTE_DIRECTORY
+ | FILE_ATTRIBUTE_READONLY;
+ else
{
- fh->fill_filebuf ();
- symlen = sym.set (fh->get_filebuf ());
+ fileattr = getfileattr (THIS_path,
+ sym.pflags & MOUNT_NOPOSIX);
+ dev = FH_FS;
}
- delete fh;
+ goto out;
}
- switch (file_type)
+ else if (isdev_dev (dev))
{
- case virt_directory:
- case virt_rootdir:
- if (component == 0)
- fileattr = FILE_ATTRIBUTE_DIRECTORY;
- break;
- case virt_file:
- if (component == 0)
- fileattr = 0;
- break;
- case virt_symlink:
- goto is_virtual_symlink;
- case virt_pipe:
- if (component == 0)
- {
- fileattr = 0;
- dev.parse (FH_PIPE);
- }
- break;
- case virt_socket:
- if (component == 0)
- {
- fileattr = 0;
- dev.parse (FH_TCP);
- }
- break;
- case virt_fsdir:
- case virt_fsfile:
- /* Access to real file or directory via block device
- entry in /proc/sys. Convert to real file and go with
- the flow. */
- dev.parse (FH_FS);
- goto is_fs_via_procsys;
- case virt_blk:
- /* Block special device. If the trailing slash has been
- requested, the target is the root directory of the
- filesystem on this block device. So we convert this to
- a real file and attach the backslash. */
- if (component == 0 && need_directory)
- {
+ /* Make sure that the path handling goes on as with FH_FS. */
+ }
+ else if (isvirtual_dev (dev))
+ {
+ /* FIXME: Calling build_fhandler here is not the right way to
+ handle this. */
+ fhandler_virtual *fh = (fhandler_virtual *)
+ build_fh_dev (dev, path_copy);
+ virtual_ftype_t file_type;
+ if (!fh)
+ file_type = virt_none;
+ else
+ {
+ file_type = fh->exists ();
+ if (file_type == virt_symlink)
+ {
+ fh->fill_filebuf ();
+ symlen = sym.set (fh->get_filebuf ());
+ }
+ else if (file_type == virt_fsdir && dev == FH_PROCESS)
+ {
+ /* FIXME: This is YA bad hack to workaround that
+ we're checking for isvirtual_dev at this point.
+ This should only happen if the file is actually
+ a virtual file, and NOT already if the preceeding
+ path components constitute a virtual file.
+
+ Anyway, what we do here is this: If the descriptor
+ symlink points to a dir, and if there are trailing
+ path components, it's actually pointing somewhere
+ else. The format_process_fd function returns the
+ full path, resolved symlink plus trailing path
+ components, in its filebuf. This is a POSIX path
+ we know nothing about, so we have to convert it to
+ native again, calling conv_to_win32_path. Since
+ basically nothing happened yet, just copy it over
+ into full_path and jump back to the
+ conv_to_win32_path call. What a mess. */
+ stpcpy (path_copy, fh->get_filebuf ());
+ delete fh;
+ goto retry_fs_via_processfd;
+ }
+ delete fh;
+ }
+ switch (file_type)
+ {
+ case virt_directory:
+ case virt_rootdir:
+ if (component == 0)
+ fileattr = FILE_ATTRIBUTE_DIRECTORY;
+ break;
+ case virt_file:
+ if (component == 0)
+ fileattr = 0;
+ break;
+ case virt_symlink:
+ goto is_virtual_symlink;
+ case virt_pipe:
+ if (component == 0)
+ {
+ fileattr = 0;
+ dev.parse (FH_PIPE);
+ }
+ break;
+ case virt_socket:
+ if (component == 0)
+ {
+ fileattr = 0;
+ dev.parse (FH_TCP);
+ }
+ break;
+ case virt_fsdir:
+ case virt_fsfile:
+ /* Access to real file or directory via block device
+ entry in /proc/sys. Convert to real file and go with
+ the flow. */
dev.parse (FH_FS);
- strcat (full_path, "\\");
- fileattr = FILE_ATTRIBUTE_DIRECTORY
- | FILE_ATTRIBUTE_DEVICE;
- goto out;
- }
- /*FALLTHRU*/
- case virt_chr:
- if (component == 0)
- fileattr = FILE_ATTRIBUTE_DEVICE;
- break;
- default:
- if (component == 0)
- fileattr = INVALID_FILE_ATTRIBUTES;
- goto virtual_component_retry;
+ goto is_fs_via_procsys;
+ case virt_blk:
+ /* Block special device. If the trailing slash has been
+ requested, the target is the root directory of the
+ filesystem on this block device. So we convert this
+ to a real file and attach the backslash. */
+ if (component == 0 && need_directory)
+ {
+ dev.parse (FH_FS);
+ strcat (full_path, "\\");
+ fileattr = FILE_ATTRIBUTE_DIRECTORY
+ | FILE_ATTRIBUTE_DEVICE;
+ goto out;
+ }
+ /*FALLTHRU*/
+ case virt_chr:
+ if (component == 0)
+ fileattr = FILE_ATTRIBUTE_DEVICE;
+ break;
+ default:
+ if (component == 0)
+ fileattr = INVALID_FILE_ATTRIBUTES;
+ goto virtual_component_retry;
+ }
+ if (component == 0 || dev != FH_NETDRIVE)
+ path_flags |= PATH_RO;
+ goto out;
}
- if (component == 0 || dev != FH_NETDRIVE)
- path_flags |= PATH_RO;
- goto out;
- }
- /* devn should not be a device. If it is, then stop parsing now. */
- else if (dev != FH_FS)
- {
- fileattr = 0;
- path_flags = sym.pflags;
- if (component)
+ /* devn should not be a device. If it is, then stop parsing. */
+ else if (dev != FH_FS)
{
- error = ENOTDIR;
- return;
+ fileattr = 0;
+ path_flags = sym.pflags;
+ if (component)
+ {
+ error = ENOTDIR;
+ return;
+ }
+ goto out; /* Found a device. Stop parsing. */
}
- goto out; /* Found a device. Stop parsing. */
- }
- /* If path is only a drivename, Windows interprets it as the
- current working directory on this drive instead of the root
- dir which is what we want. So we need the trailing backslash
- in this case. */
- if (full_path[0] && full_path[1] == ':' && full_path[2] == '\0')
- {
- full_path[2] = '\\';
- full_path[3] = '\0';
- }
+ /* If path is only a drivename, Windows interprets it as the
+ current working directory on this drive instead of the root
+ dir which is what we want. So we need the trailing backslash
+ in this case. */
+ if (full_path[0] && full_path[1] == ':' && full_path[2] == '\0')
+ {
+ full_path[2] = '\\';
+ full_path[3] = '\0';
+ }
- /* If the incoming path was given in DOS notation, always treat
- it as caseinsensitive,noacl path. This must be set before
- calling sym.check, otherwise the path is potentially treated
- casesensitive. */
- if (is_msdos)
- sym.pflags |= PATH_NOPOSIX | PATH_NOACL;
+ /* If the incoming path was given in DOS notation, always treat
+ it as caseinsensitive,noacl path. This must be set before
+ calling sym.check, otherwise the path is potentially treated
+ casesensitive. */
+ if (is_msdos) {
+ sym.pflags |= PATH_NOPOSIX | PATH_NOACL;
+ path_flags |= PATH_NOPOSIX | PATH_NOACL;
+ }
-is_fs_via_procsys:
+ is_fs_via_procsys:
- symlen = sym.check (full_path, suff, fs, conv_handle);
+ symlen = sym.check (full_path, suff, fs, conv_handle);
-is_virtual_symlink:
+ is_virtual_symlink:
- if (sym.isdevice)
- {
- if (component)
+ if (sym.isdevice)
{
- error = ENOTDIR;
- return;
+ if (component)
+ {
+ error = ENOTDIR;
+ return;
+ }
+ dev.parse (sym.major, sym.minor);
+ dev.setfs (1);
+ dev.mode = sym.mode;
+ fileattr = sym.fileattr;
+ goto out;
}
- dev.parse (sym.major, sym.minor);
- dev.setfs (1);
- dev.mode = sym.mode;
- fileattr = sym.fileattr;
- goto out;
- }
- if (sym.pflags & PATH_SOCKET)
- {
- if (component)
+ if (sym.pflags & PATH_SOCKET)
{
- error = ENOTDIR;
- return;
+ if (component)
+ {
+ error = ENOTDIR;
+ return;
+ }
+ fileattr = sym.fileattr;
+ dev.parse (FH_UNIX);
+ dev.setfs (1);
+ goto out;
}
- fileattr = sym.fileattr;
- dev.parse (FH_UNIX);
- dev.setfs (1);
- goto out;
- }
- if (!component)
- {
- /* Make sure that /dev always exists. */
- fileattr = isdev_dev (dev) ? FILE_ATTRIBUTE_DIRECTORY
- : sym.fileattr;
- path_flags = sym.pflags;
- }
- else if (isdev_dev (dev))
- {
- /* If we're looking for a file below /dev, which doesn't exist,
- make sure that the device type is converted to FH_FS, so that
- subsequent code handles the file correctly.
- Unless /dev itself doesn't exist on disk. In that case /dev
- is handled as virtual filesystem, and virtual filesystems are
- read-only. The PC_KEEP_HANDLE check allows to check for
- a call from an informational system call. In that case we
- just stick to ENOENT, and the device type doesn't matter
- anyway. */
- if (sym.error == ENOENT && !(opt & PC_KEEP_HANDLE))
- sym.error = EROFS;
- else
- dev = FH_FS;
- }
+ if (!component)
+ {
+ /* Make sure that /dev always exists. */
+ fileattr = isdev_dev (dev) ? FILE_ATTRIBUTE_DIRECTORY
+ : sym.fileattr;
+ path_flags = sym.pflags;
+ }
+ else if (isdev_dev (dev))
+ {
+ /* If we're looking for a non-existing file below /dev,
+ make sure that the device type is converted to FH_FS, so
+ that subsequent code handles the file correctly. Unless
+ /dev itself doesn't exist on disk. In that case /dev
+ is handled as virtual filesystem, and virtual filesystems
+ are read-only. The PC_KEEP_HANDLE check allows to check
+ for a call from an informational system call. In that
+ case we just stick to ENOENT, and the device type doesn't
+ matter anyway. */
+ if (sym.error == ENOENT && !(opt & PC_KEEP_HANDLE))
+ sym.error = EROFS;
+ else
+ dev = FH_FS;
+ }
- /* If symlink.check found an existing non-symlink file, then
- it sets the appropriate flag. It also sets any suffix found
- into `ext_here'. */
- if (!sym.issymlink && sym.fileattr != INVALID_FILE_ATTRIBUTES)
- {
- error = sym.error;
- if (component == 0)
- add_ext = true;
- else if (!(sym.fileattr & FILE_ATTRIBUTE_DIRECTORY))
+ /* If symlink.check found an existing non-symlink file, then
+ it sets the appropriate flag. It also sets any suffix found
+ into `ext_here'. */
+ if (!sym.issymlink && sym.fileattr != INVALID_FILE_ATTRIBUTES)
{
- error = ENOTDIR;
- goto out;
+ error = sym.error;
+ if (component == 0)
+ add_ext = true;
+ else if (!(sym.fileattr & FILE_ATTRIBUTE_DIRECTORY))
+ {
+ error = ENOTDIR;
+ goto out;
+ }
+ goto out; // file found
}
- goto out; // file found
- }
- /* Found a symlink if symlen > 0. If component == 0, then the
- src path itself was a symlink. If !follow_mode then
- we're done. Otherwise we have to insert the path found
- into the full path that we are building and perform all of
- these operations again on the newly derived path. */
- else if (symlen > 0)
- {
- saw_symlinks = 1;
- if (component == 0 && !need_directory
- && (!(opt & PC_SYM_FOLLOW)
- || (is_rep_symlink () && (opt & PC_SYM_NOFOLLOW_REP))))
+ /* Found a symlink if symlen > 0. If component == 0, then the
+ src path itself was a symlink. If !follow_mode then
+ we're done. Otherwise we have to insert the path found
+ into the full path that we are building and perform all of
+ these operations again on the newly derived path. */
+ else if (symlen > 0)
{
- set_symlink (symlen); // last component of path is a symlink.
- if (opt & PC_SYM_CONTENTS)
+ saw_symlinks = 1;
+ if (component == 0 && !need_directory
+ && (!(opt & PC_SYM_FOLLOW)
+ || (is_rep_symlink ()
+ && (opt & PC_SYM_NOFOLLOW_REP))))
{
- strcpy (THIS_path, sym.contents);
+ /* last component of path is a symlink. */
+ set_symlink (symlen);
+ if (opt & PC_SYM_CONTENTS)
+ {
+ strcpy (THIS_path, sym.contents);
+ goto out;
+ }
+ add_ext = true;
goto out;
}
- add_ext = true;
+ /* Following a symlink we can't trust the collected
+ filesystem information any longer. */
+ fs.clear ();
+ /* Close handle, if we have any. Otherwise we're collecting
+ handles while following symlinks. */
+ conv_handle.close ();
+ break;
+ }
+ else if (sym.error && sym.error != ENOENT)
+ {
+ error = sym.error;
goto out;
}
- /* Following a symlink we can't trust the collected filesystem
- information any longer. */
- fs.clear ();
- /* Close handle, if we have any. Otherwise we're collecting
- handles while following symlinks. */
- conv_handle.close ();
- break;
+ /* No existing file found. */
+
+ virtual_component_retry:
+ /* Find the new "tail" of the path, e.g. in '/for/bar/baz',
+ /baz is the tail. */
+ if (tail != path_end)
+ *tail = '/';
+ while (--tail > path_copy + 1 && *tail != '/') {}
+ /* Exit loop if there is no tail or we are at the
+ beginning of a UNC path */
+ if (tail <= path_copy + 1)
+ goto out; // all done
+
+ /* Haven't found an existing pathname component yet.
+ Pinch off the tail and try again. */
+ *tail = '\0';
+ component++;
}
- else if (sym.error && sym.error != ENOENT)
+
+ /* Arrive here if above loop detected a symlink. */
+ if (++loop > SYMLOOP_MAX)
{
- error = sym.error;
- goto out;
+ error = ELOOP; // Eep.
+ return;
}
- /* No existing file found. */
-virtual_component_retry:
- /* Find the new "tail" of the path, e.g. in '/for/bar/baz',
- /baz is the tail. */
- if (tail != path_end)
- *tail = '/';
- while (--tail > path_copy + 1 && *tail != '/') {}
- /* Exit loop if there is no tail or we are at the
- beginning of a UNC path */
- if (tail <= path_copy + 1)
- goto out; // all done
-
- /* Haven't found an existing pathname component yet.
- Pinch off the tail and try again. */
- *tail = '\0';
- component++;
- }
+ /* Place the link content, possibly with head and/or tail,
+ in tmp_buf */
- /* Arrive here if above loop detected a symlink. */
- if (++loop > SYMLOOP_MAX)
- {
- error = ELOOP; // Eep.
- return;
- }
+ char *headptr;
+ if (isabspath (sym.contents))
+ headptr = tmp_buf; /* absolute path */
+ else
+ {
+ /* Copy the first part of the path (with ending /) and point to
+ the end. */
+ char *prevtail = tail;
+ while (--prevtail > path_copy && *prevtail != '/') {}
+ int headlen = prevtail - path_copy + 1;;
+ memcpy (tmp_buf, path_copy, headlen);
+ headptr = &tmp_buf[headlen];
+ }
- MALLOC_CHECK;
+ /* Make sure there is enough space */
+ if (headptr + symlen >= tmp_buf + (2 * NT_MAX_PATH))
+ {
+ too_long:
+ error = ENAMETOOLONG;
+ set_path ("::ENAMETOOLONG::");
+ return;
+ }
+ /* Copy the symlink contents to the end of tmp_buf.
+ Convert slashes. */
+ for (char *p = sym.contents; *p; p++)
+ *headptr++ = *p == '\\' ? '/' : *p;
+ *headptr = '\0';
- /* Place the link content, possibly with head and/or tail, in tmp_buf */
+ /* Copy any tail component (with the 0) */
+ if (tail++ < path_end)
+ {
+ /* Add a slash if needed. There is space. */
+ if (*(headptr - 1) != '/')
+ *headptr++ = '/';
+ int taillen = path_end - tail + 1;
+ if (headptr + taillen > tmp_buf + (2 * NT_MAX_PATH))
+ goto too_long;
+ memcpy (headptr, tail, taillen);
+ }
- char *headptr;
- if (isabspath (sym.contents))
- headptr = tmp_buf; /* absolute path */
- else
- {
- /* Copy the first part of the path (with ending /) and point to the end. */
- char *prevtail = tail;
- while (--prevtail > path_copy && *prevtail != '/') {}
- int headlen = prevtail - path_copy + 1;;
- memcpy (tmp_buf, path_copy, headlen);
- headptr = &tmp_buf[headlen];
+ /* Evaluate everything all over again. */
+ src = tmp_buf;
}
- /* Make sure there is enough space */
- if (headptr + symlen >= tmp_buf + (2 * NT_MAX_PATH))
+ if (!(opt & PC_SYM_CONTENTS))
+ add_ext = true;
+
+ out:
+ set_path (THIS_path);
+ if (add_ext)
+ add_ext_from_sym (sym);
+ if (dev == FH_NETDRIVE && component)
{
- too_long:
- error = ENAMETOOLONG;
- set_path ("::ENAMETOOLONG::");
+ /* This case indicates a non-existant resp. a non-retrievable
+ share. This happens for instance if the share is a printer.
+ In this case the path must not be treated like a FH_NETDRIVE,
+ but like a FH_FS instead, so the usual open call for files
+ is used on it. */
+ dev.parse (FH_FS);
+ }
+ else if (isproc_dev (dev) && fileattr == INVALID_FILE_ATTRIBUTES)
+ {
+ /* FIXME: Usually we don't set error to ENOENT if a file doesn't
+ exist. This is typically indicated by the fileattr content.
+ So, why here? The downside is that cygwin_conv_path just gets
+ an error for these paths so it reports the error back to the
+ application. Unlike in all other cases of non-existant files,
+ for which check doesn't set error, so cygwin_conv_path just
+ returns the path, as intended. */
+ error = ENOENT;
return;
}
-
- /* Copy the symlink contents to the end of tmp_buf.
- Convert slashes. */
- for (char *p = sym.contents; *p; p++)
- *headptr++ = *p == '\\' ? '/' : *p;
- *headptr = '\0';
-
- /* Copy any tail component (with the 0) */
- if (tail++ < path_end)
+ else if (!need_directory || error)
+ /* nothing to do */;
+ else if (fileattr == INVALID_FILE_ATTRIBUTES)
+ /* Reattach trailing dirsep in native path. */
+ strcat (modifiable_path (), "\\");
+ else if (fileattr & FILE_ATTRIBUTE_DIRECTORY)
+ path_flags &= ~PATH_SYMLINK;
+ else
{
- /* Add a slash if needed. There is space. */
- if (*(headptr - 1) != '/')
- *headptr++ = '/';
- int taillen = path_end - tail + 1;
- if (headptr + taillen > tmp_buf + (2 * NT_MAX_PATH))
- goto too_long;
- memcpy (headptr, tail, taillen);
+ debug_printf ("%s is a non-directory", path);
+ error = ENOTDIR;
+ return;
}
- /* Evaluate everything all over again. */
- src = tmp_buf;
- }
-
- if (!(opt & PC_SYM_CONTENTS))
- add_ext = true;
-
-out:
- set_path (THIS_path);
- if (add_ext)
- add_ext_from_sym (sym);
- if (dev == FH_NETDRIVE && component)
- {
- /* This case indicates a non-existant resp. a non-retrievable
- share. This happens for instance if the share is a printer.
- In this case the path must not be treated like a FH_NETDRIVE,
- but like a FH_FS instead, so the usual open call for files
- is used on it. */
- dev.parse (FH_FS);
- }
- else if (isproc_dev (dev) && fileattr == INVALID_FILE_ATTRIBUTES)
- {
- /* FIXME: Usually we don't set error to ENOENT if a file doesn't
- exist. This is typically indicated by the fileattr content.
- So, why here? The downside is that cygwin_conv_path just gets
- an error for these paths so it reports the error back to the
- application. Unlike in all other cases of non-existant files,
- for which check doesn't set error, so cygwin_conv_path just
- returns the path, as intended. */
- error = ENOENT;
- return;
- }
- else if (!need_directory || error)
- /* nothing to do */;
- else if (fileattr == INVALID_FILE_ATTRIBUTES)
- strcat (modifiable_path (), "\\"); /* Reattach trailing dirsep in native path. */
- else if (fileattr & FILE_ATTRIBUTE_DIRECTORY)
- path_flags &= ~PATH_SYMLINK;
- else
- {
- debug_printf ("%s is a non-directory", path);
- error = ENOTDIR;
- return;
- }
-
- if (dev.isfs ())
- {
- if (strncmp (path, "\\\\.\\", 4))
+ if (dev.isfs ())
{
- if (!tail || tail == path)
- /* nothing */;
- else if (tail[-1] != '\\')
- *tail = '\0';
- else
+ if (strncmp (path, "\\\\.\\", 4))
{
- error = ENOENT;
- return;
+ if (!tail || tail == path)
+ /* nothing */;
+ else if (tail[-1] != '\\')
+ *tail = '\0';
+ else
+ {
+ error = ENOENT;
+ return;
+ }
}
- }
- /* If FS hasn't been checked already in symlink_info::check, do so now. */
- if (fs.inited ()|| fs.update (get_nt_native_path (), NULL))
- {
- /* Incoming DOS paths are treated like DOS paths in native
- Windows applications. No ACLs, just default settings. */
- if (is_msdos)
- fs.has_acls (false);
- debug_printf ("this->path(%s), has_acls(%d)", path, fs.has_acls ());
- /* CV: We could use this->has_acls() but I want to make sure that
- we don't forget that the PATH_NOACL flag must be taken into
- account here. */
- if (!(path_flags & PATH_NOACL) && fs.has_acls ())
- set_exec (0); /* We really don't know if this is executable or not here
- but set it to not executable since it will be figured out
- later by anything which cares about this. */
+ /* If FS hasn't been checked already in symlink_info::check,
+ do so now. */
+ if (fs.inited ()|| fs.update (get_nt_native_path (), NULL))
+ {
+ /* Incoming DOS paths are treated like DOS paths in native
+ Windows applications. No ACLs, just default settings. */
+ if (is_msdos)
+ fs.has_acls (false);
+ debug_printf ("this->path(%s), has_acls(%d)",
+ path, fs.has_acls ());
+ /* CV: We could use this->has_acls() but I want to make sure that
+ we don't forget that the PATH_NOACL flag must be taken into
+ account here. */
+ if (!(path_flags & PATH_NOACL) && fs.has_acls ())
+ set_exec (0); /* We really don't know if this is executable or
+ not here but set it to not executable since
+ it will be figured out later by anything
+ which cares about this. */
+ }
+ /* If the FS has been found to have unrelibale inodes, note
+ that in path_flags. */
+ if (!fs.hasgood_inode ())
+ path_flags |= PATH_IHASH;
+ /* If the OS is caseinsensitive or the FS is caseinsensitive,
+ don't handle path casesensitive. */
+ if (cygwin_shared->obcaseinsensitive || fs.caseinsensitive ())
+ path_flags |= PATH_NOPOSIX;
+ caseinsensitive = (path_flags & PATH_NOPOSIX)
+ ? OBJ_CASE_INSENSITIVE : 0;
+ if (exec_state () != dont_know_if_executable)
+ /* ok */;
+ else if (isdir ())
+ set_exec (1);
+ else if (issymlink () || issocket ())
+ set_exec (0);
}
- /* If the FS has been found to have unrelibale inodes, note
- that in path_flags. */
- if (!fs.hasgood_inode ())
- path_flags |= PATH_IHASH;
- /* If the OS is caseinsensitive or the FS is caseinsensitive,
- don't handle path casesensitive. */
- if (cygwin_shared->obcaseinsensitive || fs.caseinsensitive ())
- path_flags |= PATH_NOPOSIX;
- caseinsensitive = (path_flags & PATH_NOPOSIX)
- ? OBJ_CASE_INSENSITIVE : 0;
- if (exec_state () != dont_know_if_executable)
- /* ok */;
- else if (isdir ())
- set_exec (1);
- else if (issymlink () || issocket ())
- set_exec (0);
- }
- if (opt & PC_NOFULL)
- {
- if (is_relpath)
- {
- mkrelpath (this->modifiable_path (), !!caseinsensitive);
- /* Invalidate wide_path so that wide relpath can be created
- in later calls to get_nt_native_path or get_wide_win32_path. */
- if (wide_path)
- cfree (wide_path);
- wide_path = NULL;
- }
- if (need_directory)
+ if (opt & PC_NOFULL)
{
- size_t n = strlen (this->path);
- /* Do not add trailing \ to UNC device names like \\.\a: */
- if (this->path[n - 1] != '\\' &&
- (strncmp (this->path, "\\\\.\\", 4) != 0))
+ if (is_relpath)
{
- this->modifiable_path ()[n] = '\\';
- this->modifiable_path ()[n + 1] = '\0';
+ mkrelpath (this->modifiable_path (), !!caseinsensitive);
+ /* Invalidate wide_path so that wide relpath can be created
+ in later calls to get_nt_native_path or get_wide_win32_path. */
+ if (wide_path)
+ cfree (wide_path);
+ wide_path = NULL;
+ }
+ if (need_directory)
+ {
+ size_t n = strlen (this->path);
+ /* Do not add trailing \ to UNC device names like \\.\a: */
+ if (this->path[n - 1] != '\\' &&
+ (strncmp (this->path, "\\\\.\\", 4) != 0))
+ {
+ this->modifiable_path ()[n] = '\\';
+ this->modifiable_path ()[n + 1] = '\0';
+ }
}
}
- }
- if (saw_symlinks)
- set_has_symlinks ();
+ if (saw_symlinks)
+ set_has_symlinks ();
- if (opt & PC_OPEN)
- path_flags |= PATH_OPEN;
+ if (opt & PC_OPEN)
+ path_flags |= PATH_OPEN;
- if (opt & PC_CTTY)
- path_flags |= PATH_CTTY;
+ if (opt & PC_CTTY)
+ path_flags |= PATH_CTTY;
- if (opt & PC_POSIX)
- {
- if (tail < path_end && tail > path_copy + 1)
- *tail = '/';
- set_normalized_path (path_copy);
- if (is_msdos && !(opt & PC_NOWARN))
- warn_msdos (src);
- }
+ if (opt & PC_POSIX)
+ {
+ if (tail < path_end && tail > path_copy + 1)
+ *tail = '/';
+ set_posix (path_copy);
+ if (is_msdos && dos_file_warning && !(opt & PC_NOWARN))
+ warn_msdos (src);
+ }
#if 0
- if (!error)
+ if (!error)
+ {
+ last_path_conv = *this;
+ strcpy (last_src, src);
+ }
+#endif
+ }
+ __except (NO_ERROR)
{
- last_path_conv = *this;
- strcpy (last_src, src);
+ error = EFAULT;
}
-#endif
+ __endtry
}
path_conv::~path_conv ()
{
- if (normalized_path)
+ if (posix_path)
{
- cfree ((void *) normalized_path);
- normalized_path = NULL;
+ cfree ((void *) posix_path);
+ posix_path = NULL;
}
if (path)
{
@@ -1221,44 +1320,18 @@ path_conv::is_binary ()
&& (bin == SCS_32BIT_BINARY || bin == SCS_64BIT_BINARY);
}
-/* Helper function to fill the fnoi datastructure for a file. */
+/* Helper function to fill the fai datastructure for a file. */
NTSTATUS
-file_get_fnoi (HANDLE h, bool skip_network_open_inf,
- PFILE_NETWORK_OPEN_INFORMATION pfnoi)
+file_get_fai (HANDLE h, PFILE_ALL_INFORMATION pfai)
{
NTSTATUS status;
IO_STATUS_BLOCK io;
/* Some FSes (Netapps) don't implement FileNetworkOpenInformation. */
- status = skip_network_open_inf ? STATUS_INVALID_PARAMETER
- : NtQueryInformationFile (h, &io, pfnoi, sizeof *pfnoi,
- FileNetworkOpenInformation);
- if (status == STATUS_INVALID_PARAMETER)
- {
- /* Apart from accessing Netapps, this also occurs when accessing SMB
- share root dirs hosted on NT4. */
- FILE_BASIC_INFORMATION fbi;
- FILE_STANDARD_INFORMATION fsi;
-
- status = NtQueryInformationFile (h, &io, &fbi, sizeof fbi,
- FileBasicInformation);
- if (NT_SUCCESS (status))
- {
- memcpy (pfnoi, &fbi, 4 * sizeof (LARGE_INTEGER));
- if (NT_SUCCESS (NtQueryInformationFile (h, &io, &fsi,
- sizeof fsi,
- FileStandardInformation)))
- {
- pfnoi->EndOfFile.QuadPart = fsi.EndOfFile.QuadPart;
- pfnoi->AllocationSize.QuadPart
- = fsi.AllocationSize.QuadPart;
- }
- else
- pfnoi->EndOfFile.QuadPart
- = pfnoi->AllocationSize.QuadPart = 0;
- pfnoi->FileAttributes = fbi.FileAttributes;
- }
- }
+ status = NtQueryInformationFile (h, &io, pfai, sizeof *pfai,
+ FileAllInformation);
+ if (status == STATUS_BUFFER_OVERFLOW)
+ status = STATUS_SUCCESS;
return status;
}
@@ -1310,9 +1383,35 @@ normalize_win32_path (const char *src, char *dst, char *&tail)
if (tail == dst)
{
if (isdrive (src))
- /* Always convert drive letter to uppercase for case sensitivity. */
- *tail++ = cyg_toupper (*src++);
- else if (*src != '/')
+ {
+ /* Drive followed by separator is an absolute path */
+ if (isdirsep (src[2]))
+ /* Always convert drive letter to uppercase for case sensitivity. */
+ *tail++ = cyg_toupper (*src++);
+ else
+ {
+ /* Drive-relative path: get drive path from environment. */
+ char env[] = { '!', cyg_toupper (*src), ':', 0 };
+ const char *drvpath = getenv(env);
+
+ if (drvpath)
+ {
+ size_t len = strlcpy(tail, drvpath, NT_MAX_PATH);
+
+ if (len >= NT_MAX_PATH - 1)
+ return ENAMETOOLONG;
+
+ tail += len;
+ *tail++ = '\\';
+ src += 2;
+ }
+ else
+ {
+ *tail++ = cyg_toupper (*src++);
+ }
+ }
+ }
+ else
{
if (beg_src_slash)
tail += cygheap->cwd.get_drive (dst);
@@ -1557,17 +1656,16 @@ symlink_native (const char *oldpath, path_conv &win32_newpath)
{
win32_oldpath.check (oldpath, PC_SYM_NOFOLLOW, stat_suffixes);
final_oldpath = win32_oldpath.get_nt_native_path ();
- final_oldpath->Buffer[1] = L'\\';
}
else
{
/* The symlink target is relative to the directory in which
the symlink gets created, not relative to the cwd. Therefore
we have to mangle the path quite a bit before calling path_conv. */
- ssize_t len = strrchr (win32_newpath.normalized_path, '/')
- - win32_newpath.normalized_path + 1;
+ ssize_t len = strrchr (win32_newpath.get_posix (), '/')
+ - win32_newpath.get_posix () + 1;
char *absoldpath = tp.t_get ();
- stpcpy (stpncpy (absoldpath, win32_newpath.normalized_path, len),
+ stpcpy (stpncpy (absoldpath, win32_newpath.get_posix (), len),
oldpath);
win32_oldpath.check (absoldpath, PC_SYM_NOFOLLOW, stat_suffixes);
@@ -1590,12 +1688,11 @@ symlink_native (const char *oldpath, path_conv &win32_newpath)
prefix strings. We start counting behind the \\?\ for speed. */
int num = cnt_bs (win32_oldpath.get_nt_native_path ()->Buffer + 4, c_old);
if (num < 1 /* locale drive. */
- || (win32_oldpath.get_nt_native_path ()->Buffer[6] != L':'
+ || (win32_oldpath.get_nt_native_path ()->Buffer[5] != L':'
&& num < 3)) /* UNC path. */
{
/* 3a. No valid common path prefix: Create absolute symlink. */
final_oldpath = win32_oldpath.get_nt_native_path ();
- final_oldpath->Buffer[1] = L'\\';
}
else
{
@@ -1623,15 +1720,39 @@ symlink_native (const char *oldpath, path_conv &win32_newpath)
SetLastError (ERROR_FILE_NOT_FOUND);
return -1;
}
- /* Convert native path to DOS UNC path. */
+ /* Don't allow native symlinks to Cygwin special files. However, the
+ caller shoud know because this case shouldn't be covered by the
+ default "nativestrict" behaviour, so we use a special return code. */
+ if (win32_oldpath.isspecial ())
+ return -2;
+ /* Convert native paths to Win32 UNC paths. */
final_newpath = win32_newpath.get_nt_native_path ();
final_newpath->Buffer[1] = L'\\';
+ /* oldpath may be relative. Make sure to convert only absolute paths
+ to Win32 paths. */
+ if (final_oldpath->Buffer[0] == L'\\')
+ {
+ /* Workaround Windows 8.1 bug. On Windows 8.1, the ShellExecuteW
+ function does not handle the long path prefix correctly for symlink
+ targets. Thus, we create simple short paths < MAX_PATH without
+ long path prefix. */
+ if (RtlEqualUnicodePathPrefix (final_oldpath, &ro_u_uncp, TRUE)
+ && final_oldpath->Length < (MAX_PATH + 6) * sizeof (WCHAR))
+ {
+ final_oldpath->Buffer += 6;
+ final_oldpath->Buffer[0] = L'\\';
+ }
+ else if (final_oldpath->Length < (MAX_PATH + 4) * sizeof (WCHAR))
+ final_oldpath->Buffer += 4;
+ else /* Stick to long path, fix native prefix for Win32 API calls. */
+ final_oldpath->Buffer[1] = L'\\';
+ }
/* Try to create native symlink. */
if (!CreateSymbolicLinkW (final_newpath->Buffer, final_oldpath->Buffer,
win32_oldpath.isdir ()
? SYMBOLIC_LINK_FLAG_DIRECTORY : 0))
{
- /* Repair native path, we still need it. */
+ /* Repair native newpath, we still need it. */
final_newpath->Buffer[1] = L'?';
return -1;
}
@@ -1653,332 +1774,342 @@ symlink_worker (const char *oldpath, const char *newpath, bool isdevice)
/* POSIX says that empty 'newpath' is invalid input while empty
'oldpath' is valid -- it's symlink resolver job to verify if
symlink contents point to existing filesystem object */
- myfault efault;
- if (efault.faulted (EFAULT))
- goto done;
- if (!*oldpath || !*newpath)
- {
- set_errno (ENOENT);
- goto done;
- }
-
- if (strlen (oldpath) > SYMLINK_MAX)
+ __try
{
- set_errno (ENAMETOOLONG);
- goto done;
- }
+ if (!*oldpath || !*newpath)
+ {
+ set_errno (ENOENT);
+ __leave;
+ }
- /* Trailing dirsep is a no-no. */
- len = strlen (newpath);
- has_trailing_dirsep = isdirsep (newpath[len - 1]);
- if (has_trailing_dirsep)
- {
- newpath = strdup (newpath);
- ((char *) newpath)[len - 1] = '\0';
- }
+ if (strlen (oldpath) > SYMLINK_MAX)
+ {
+ set_errno (ENAMETOOLONG);
+ __leave;
+ }
- check_opt = PC_SYM_NOFOLLOW | PC_POSIX | (isdevice ? PC_NOWARN : 0);
- /* We need the normalized full path below. */
- win32_newpath.check (newpath, check_opt, stat_suffixes);
-
- /* Default symlink type is determined by global allow_winsymlinks variable.
- Device files are always shortcuts. */
- wsym_type = isdevice ? WSYM_lnk : allow_winsymlinks;
- /* NFS has its own, dedicated way to create symlinks. */
- if (win32_newpath.fs_is_nfs ())
- wsym_type = WSYM_nfs;
- /* MVFS doesn't handle the SYSTEM DOS attribute, but it handles the R/O
- attribute. Therefore we create symlinks on MVFS always as shortcuts. */
- else if (win32_newpath.fs_is_mvfs ())
- wsym_type = WSYM_lnk;
- /* AFS only supports native symlinks. */
- else if (win32_newpath.fs_is_afs ())
- {
- /* Bail out if OS doesn't support native symlinks. */
- if (wincap.max_sys_priv () < SE_CREATE_SYMBOLIC_LINK_PRIVILEGE)
+ /* Trailing dirsep is a no-no. */
+ len = strlen (newpath);
+ has_trailing_dirsep = isdirsep (newpath[len - 1]);
+ if (has_trailing_dirsep)
{
- set_errno (EPERM);
- goto done;
+ newpath = strdup (newpath);
+ ((char *) newpath)[len - 1] = '\0';
}
- wsym_type = WSYM_nativestrict;
- }
- /* Don't try native symlinks on filesystems not supporting reparse points. */
- else if ((wsym_type == WSYM_native || wsym_type == WSYM_nativestrict)
- && !(win32_newpath.fs_flags () & FILE_SUPPORTS_REPARSE_POINTS))
- wsym_type = WSYM_sysfile;
-
- /* Attach .lnk suffix when shortcut is requested. */
- if (wsym_type == WSYM_lnk && !win32_newpath.exists ()
- && (isdevice || !win32_newpath.fs_is_nfs ()))
- {
- char *newplnk = tp.c_get ();
- stpcpy (stpcpy (newplnk, newpath), ".lnk");
- win32_newpath.check (newplnk, check_opt);
- }
- if (win32_newpath.error)
- {
- set_errno (win32_newpath.error);
- goto done;
- }
+ check_opt = PC_SYM_NOFOLLOW | PC_POSIX | (isdevice ? PC_NOWARN : 0);
+ /* We need the normalized full path below. */
+ win32_newpath.check (newpath, check_opt, stat_suffixes);
+
+ /* Default symlink type is determined by global allow_winsymlinks
+ variable. Device files are always shortcuts. */
+ wsym_type = isdevice ? WSYM_lnk : allow_winsymlinks;
+ /* NFS has its own, dedicated way to create symlinks. */
+ if (win32_newpath.fs_is_nfs ())
+ wsym_type = WSYM_nfs;
+ /* MVFS doesn't handle the SYSTEM DOS attribute, but it handles the R/O
+ attribute. Therefore we create symlinks on MVFS always as shortcuts. */
+ else if (win32_newpath.fs_is_mvfs ())
+ wsym_type = WSYM_lnk;
+ /* AFS only supports native symlinks. */
+ else if (win32_newpath.fs_is_afs ())
+ {
+ /* Bail out if OS doesn't support native symlinks. */
+ if (wincap.max_sys_priv () < SE_CREATE_SYMBOLIC_LINK_PRIVILEGE)
+ {
+ set_errno (EPERM);
+ __leave;
+ }
+ wsym_type = WSYM_nativestrict;
+ }
+ /* Don't try native symlinks on FSes not supporting reparse points. */
+ else if ((wsym_type == WSYM_native || wsym_type == WSYM_nativestrict)
+ && !(win32_newpath.fs_flags () & FILE_SUPPORTS_REPARSE_POINTS))
+ wsym_type = WSYM_sysfile;
+
+ /* Attach .lnk suffix when shortcut is requested. */
+ if (wsym_type == WSYM_lnk && !win32_newpath.exists ()
+ && (isdevice || !win32_newpath.fs_is_nfs ()))
+ {
+ char *newplnk = tp.c_get ();
+ stpcpy (stpcpy (newplnk, newpath), ".lnk");
+ win32_newpath.check (newplnk, check_opt);
+ }
- syscall_printf ("symlink (%s, %S) wsym_type %d", oldpath,
- win32_newpath.get_nt_native_path (), wsym_type);
+ if (win32_newpath.error)
+ {
+ set_errno (win32_newpath.error);
+ __leave;
+ }
- if ((!isdevice && win32_newpath.exists ())
- || win32_newpath.is_auto_device ())
- {
- set_errno (EEXIST);
- goto done;
- }
- if (has_trailing_dirsep && !win32_newpath.exists ())
- {
- set_errno (ENOENT);
- goto done;
- }
+ syscall_printf ("symlink (%s, %S) wsym_type %d", oldpath,
+ win32_newpath.get_nt_native_path (), wsym_type);
- /* Handle NFS and native symlinks in their own functions. */
- switch (wsym_type)
- {
- case WSYM_nfs:
- res = symlink_nfs (oldpath, win32_newpath);
- goto done;
- case WSYM_native:
- case WSYM_nativestrict:
- res = symlink_native (oldpath, win32_newpath);
- if (!res)
- goto done;
- /* Strictly native? Too bad. */
- if (wsym_type == WSYM_nativestrict)
+ if ((!isdevice && win32_newpath.exists ())
+ || win32_newpath.is_auto_device ())
{
- __seterrno ();
- goto done;
+ set_errno (EEXIST);
+ __leave;
+ }
+ if (has_trailing_dirsep && !win32_newpath.exists ())
+ {
+ set_errno (ENOENT);
+ __leave;
}
- /* Otherwise, fall back to default symlink type. */
- wsym_type = WSYM_sysfile;
- break;
- default:
- break;
- }
-
- if (wsym_type == WSYM_lnk)
- {
- path_conv win32_oldpath;
- ITEMIDLIST *pidl = NULL;
- size_t full_len = 0;
- unsigned short oldpath_len, desc_len, relpath_len, pidl_len = 0;
- char desc[MAX_PATH + 1], *relpath;
- if (!isdevice)
+ /* Handle NFS and native symlinks in their own functions. */
+ switch (wsym_type)
{
- /* First create an IDLIST to learn how big our shortcut is
- going to be. */
- IShellFolder *psl;
-
- /* The symlink target is relative to the directory in which
- the symlink gets created, not relative to the cwd. Therefore
- we have to mangle the path quite a bit before calling path_conv. */
- if (isabspath (oldpath))
- win32_oldpath.check (oldpath,
- PC_SYM_NOFOLLOW,
- stat_suffixes);
- else
+ case WSYM_nfs:
+ res = symlink_nfs (oldpath, win32_newpath);
+ __leave;
+ case WSYM_native:
+ case WSYM_nativestrict:
+ res = symlink_native (oldpath, win32_newpath);
+ if (!res)
+ __leave;
+ /* Strictly native? Too bad, unless the target is a Cygwin
+ special file. */
+ if (res == -1 && wsym_type == WSYM_nativestrict)
{
- len = strrchr (win32_newpath.normalized_path, '/')
- - win32_newpath.normalized_path + 1;
- char *absoldpath = tp.t_get ();
- stpcpy (stpncpy (absoldpath, win32_newpath.normalized_path, len),
- oldpath);
- win32_oldpath.check (absoldpath, PC_SYM_NOFOLLOW, stat_suffixes);
+ __seterrno ();
+ __leave;
}
- if (SUCCEEDED (SHGetDesktopFolder (&psl)))
+ /* Otherwise, fall back to default symlink type. */
+ wsym_type = WSYM_sysfile;
+ break;
+ default:
+ break;
+ }
+
+ if (wsym_type == WSYM_lnk)
+ {
+ path_conv win32_oldpath;
+ ITEMIDLIST *pidl = NULL;
+ size_t full_len = 0;
+ unsigned short oldpath_len, desc_len, relpath_len, pidl_len = 0;
+ char desc[MAX_PATH + 1], *relpath;
+
+ if (!isdevice)
{
- WCHAR wc_path[win32_oldpath.get_wide_win32_path_len () + 1];
- win32_oldpath.get_wide_win32_path (wc_path);
- /* Amazing but true: Even though the ParseDisplayName method
- takes a wide char path name, it does not understand the
- Win32 prefix for long pathnames! So we have to tack off
- the prefix and convert the path to the "normal" syntax
- for ParseDisplayName. */
- WCHAR *wc = wc_path + 4;
- if (wc[1] != L':') /* native UNC path */
- *(wc += 2) = L'\\';
- HRESULT res;
- if (SUCCEEDED (res = psl->ParseDisplayName (NULL, NULL, wc, NULL,
- &pidl, NULL)))
+ /* First create an IDLIST to learn how big our shortcut is
+ going to be. */
+ IShellFolder *psl;
+
+ /* The symlink target is relative to the directory in which the
+ symlink gets created, not relative to the cwd. Therefore we
+ have to mangle the path quite a bit before calling path_conv.*/
+ if (isabspath (oldpath))
+ win32_oldpath.check (oldpath,
+ PC_SYM_NOFOLLOW,
+ stat_suffixes);
+ else
{
- ITEMIDLIST *p;
+ len = strrchr (win32_newpath.get_posix (), '/')
+ - win32_newpath.get_posix () + 1;
+ char *absoldpath = tp.t_get ();
+ stpcpy (stpncpy (absoldpath, win32_newpath.get_posix (),
+ len),
+ oldpath);
+ win32_oldpath.check (absoldpath, PC_SYM_NOFOLLOW,
+ stat_suffixes);
+ }
+ if (SUCCEEDED (SHGetDesktopFolder (&psl)))
+ {
+ WCHAR wc_path[win32_oldpath.get_wide_win32_path_len () + 1];
+ win32_oldpath.get_wide_win32_path (wc_path);
+ /* Amazing but true: Even though the ParseDisplayName method
+ takes a wide char path name, it does not understand the
+ Win32 prefix for long pathnames! So we have to tack off
+ the prefix and convert the path to the "normal" syntax
+ for ParseDisplayName. */
+ WCHAR *wc = wc_path + 4;
+ if (wc[1] != L':') /* native UNC path */
+ *(wc += 2) = L'\\';
+ HRESULT res;
+ if (SUCCEEDED (res = psl->ParseDisplayName (NULL, NULL, wc,
+ NULL, &pidl,
+ NULL)))
+ {
+ ITEMIDLIST *p;
- for (p = pidl; p->mkid.cb > 0;
- p = (ITEMIDLIST *)((char *) p + p->mkid.cb))
- ;
- pidl_len = (char *) p - (char *) pidl + 2;
+ for (p = pidl; p->mkid.cb > 0;
+ p = (ITEMIDLIST *)((char *) p + p->mkid.cb))
+ ;
+ pidl_len = (char *) p - (char *) pidl + 2;
+ }
+ psl->Release ();
}
- psl->Release ();
}
+ /* Compute size of shortcut file. */
+ full_len = sizeof (win_shortcut_hdr);
+ if (pidl_len)
+ full_len += sizeof (unsigned short) + pidl_len;
+ oldpath_len = strlen (oldpath);
+ /* Unfortunately the length of the description is restricted to a
+ length of 2000 bytes. We don't want to add considerations for
+ the different lengths and even 2000 bytes is not enough for long
+ path names. So what we do here is to set the description to the
+ POSIX path only if the path is not longer than MAX_PATH characters.
+ We append the full path name after the regular shortcut data
+ (see below), which works fine with Windows Explorer as well
+ as older Cygwin versions (as long as the whole file isn't bigger
+ than 8K). The description field is only used for backward
+ compatibility to older Cygwin versions and those versions are
+ not capable of handling long path names anyway. */
+ desc_len = stpcpy (desc, oldpath_len > MAX_PATH
+ ? "[path too long]" : oldpath) - desc;
+ full_len += sizeof (unsigned short) + desc_len;
+ /* Devices get the oldpath string unchanged as relative path. */
+ if (isdevice)
+ {
+ relpath_len = oldpath_len;
+ stpcpy (relpath = tp.c_get (), oldpath);
+ }
+ else
+ {
+ relpath_len = strlen (win32_oldpath.get_win32 ());
+ stpcpy (relpath = tp.c_get (), win32_oldpath.get_win32 ());
+ }
+ full_len += sizeof (unsigned short) + relpath_len;
+ full_len += sizeof (unsigned short) + oldpath_len;
+ /* 1 byte more for trailing 0 written by stpcpy. */
+ if (full_len < NT_MAX_PATH * sizeof (WCHAR))
+ buf = tp.t_get ();
+ else
+ buf = (char *) alloca (full_len + 1);
+
+ /* Create shortcut header */
+ win_shortcut_hdr *shortcut_header = (win_shortcut_hdr *) buf;
+ memset (shortcut_header, 0, sizeof *shortcut_header);
+ shortcut_header->size = sizeof *shortcut_header;
+ shortcut_header->magic = GUID_shortcut;
+ shortcut_header->flags = (WSH_FLAG_DESC | WSH_FLAG_RELPATH);
+ if (pidl)
+ shortcut_header->flags |= WSH_FLAG_IDLIST;
+ shortcut_header->run = SW_NORMAL;
+ cp = buf + sizeof (win_shortcut_hdr);
+
+ /* Create IDLIST */
+ if (pidl)
+ {
+ *(unsigned short *)cp = pidl_len;
+ memcpy (cp += 2, pidl, pidl_len);
+ cp += pidl_len;
+ CoTaskMemFree (pidl);
+ }
+
+ /* Create description */
+ *(unsigned short *)cp = desc_len;
+ cp = stpcpy (cp += 2, desc);
+
+ /* Create relpath */
+ *(unsigned short *)cp = relpath_len;
+ cp = stpcpy (cp += 2, relpath);
+
+ /* Append the POSIX path after the regular shortcut data for
+ the long path support. */
+ unsigned short *plen = (unsigned short *) cp;
+ cp += 2;
+ *(PWCHAR) cp = 0xfeff; /* BOM */
+ cp += 2;
+ *plen = sys_mbstowcs ((PWCHAR) cp, NT_MAX_PATH, oldpath)
+ * sizeof (WCHAR);
+ cp += *plen;
}
- /* Compute size of shortcut file. */
- full_len = sizeof (win_shortcut_hdr);
- if (pidl_len)
- full_len += sizeof (unsigned short) + pidl_len;
- oldpath_len = strlen (oldpath);
- /* Unfortunately the length of the description is restricted to a
- length of 2000 bytes. We don't want to add considerations for
- the different lengths and even 2000 bytes is not enough for long
- path names. So what we do here is to set the description to the
- POSIX path only if the path is not longer than MAX_PATH characters.
- We append the full path name after the regular shortcut data
- (see below), which works fine with Windows Explorer as well
- as older Cygwin versions (as long as the whole file isn't bigger
- than 8K). The description field is only used for backward
- compatibility to older Cygwin versions and those versions are
- not capable of handling long path names anyway. */
- desc_len = stpcpy (desc, oldpath_len > MAX_PATH
- ? "[path too long]" : oldpath) - desc;
- full_len += sizeof (unsigned short) + desc_len;
- /* Devices get the oldpath string unchanged as relative path. */
- if (isdevice)
- {
- relpath_len = oldpath_len;
- stpcpy (relpath = tp.c_get (), oldpath);
- }
- else
- {
- relpath_len = strlen (win32_oldpath.get_win32 ());
- stpcpy (relpath = tp.c_get (), win32_oldpath.get_win32 ());
- }
- full_len += sizeof (unsigned short) + relpath_len;
- full_len += sizeof (unsigned short) + oldpath_len;
- /* 1 byte more for trailing 0 written by stpcpy. */
- if (full_len < NT_MAX_PATH * sizeof (WCHAR))
- buf = tp.t_get ();
else
- buf = (char *) alloca (full_len + 1);
-
- /* Create shortcut header */
- win_shortcut_hdr *shortcut_header = (win_shortcut_hdr *) buf;
- memset (shortcut_header, 0, sizeof *shortcut_header);
- shortcut_header->size = sizeof *shortcut_header;
- shortcut_header->magic = GUID_shortcut;
- shortcut_header->flags = (WSH_FLAG_DESC | WSH_FLAG_RELPATH);
- if (pidl)
- shortcut_header->flags |= WSH_FLAG_IDLIST;
- shortcut_header->run = SW_NORMAL;
- cp = buf + sizeof (win_shortcut_hdr);
-
- /* Create IDLIST */
- if (pidl)
{
- *(unsigned short *)cp = pidl_len;
- memcpy (cp += 2, pidl, pidl_len);
- cp += pidl_len;
- CoTaskMemFree (pidl);
+ /* Default technique creating a symlink. */
+ buf = tp.t_get ();
+ cp = stpcpy (buf, SYMLINK_COOKIE);
+ *(PWCHAR) cp = 0xfeff; /* BOM */
+ cp += 2;
+ /* Note that the terminating nul is written. */
+ cp += sys_mbstowcs ((PWCHAR) cp, NT_MAX_PATH, oldpath)
+ * sizeof (WCHAR);
}
- /* Create description */
- *(unsigned short *)cp = desc_len;
- cp = stpcpy (cp += 2, desc);
-
- /* Create relpath */
- *(unsigned short *)cp = relpath_len;
- cp = stpcpy (cp += 2, relpath);
-
- /* Append the POSIX path after the regular shortcut data for
- the long path support. */
- unsigned short *plen = (unsigned short *) cp;
- cp += 2;
- *(PWCHAR) cp = 0xfeff; /* BOM */
- cp += 2;
- *plen = sys_mbstowcs ((PWCHAR) cp, NT_MAX_PATH, oldpath) * sizeof (WCHAR);
- cp += *plen;
- }
- else
- {
- /* Default technique creating a symlink. */
- buf = tp.t_get ();
- cp = stpcpy (buf, SYMLINK_COOKIE);
- *(PWCHAR) cp = 0xfeff; /* BOM */
- cp += 2;
- /* Note that the terminating nul is written. */
- cp += sys_mbstowcs ((PWCHAR) cp, NT_MAX_PATH, oldpath) * sizeof (WCHAR);
- }
-
- OBJECT_ATTRIBUTES attr;
- IO_STATUS_BLOCK io;
- NTSTATUS status;
- ULONG access;
- HANDLE fh;
+ OBJECT_ATTRIBUTES attr;
+ IO_STATUS_BLOCK io;
+ NTSTATUS status;
+ ULONG access;
+ HANDLE fh;
- access = DELETE | FILE_GENERIC_WRITE;
- if (isdevice && win32_newpath.exists ())
- {
- status = NtOpenFile (&fh, FILE_WRITE_ATTRIBUTES,
- win32_newpath.get_object_attr (attr, sec_none_nih),
- &io, 0, FILE_OPEN_FOR_BACKUP_INTENT);
+ access = DELETE | FILE_GENERIC_WRITE;
+ if (isdevice && win32_newpath.exists ())
+ {
+ status = NtOpenFile (&fh, FILE_WRITE_ATTRIBUTES,
+ win32_newpath.get_object_attr (attr,
+ sec_none_nih),
+ &io, 0, FILE_OPEN_FOR_BACKUP_INTENT);
+ if (!NT_SUCCESS (status))
+ {
+ __seterrno_from_nt_status (status);
+ __leave;
+ }
+ status = NtSetAttributesFile (fh, FILE_ATTRIBUTE_NORMAL);
+ NtClose (fh);
+ if (!NT_SUCCESS (status))
+ {
+ __seterrno_from_nt_status (status);
+ __leave;
+ }
+ }
+ else if (!isdevice && win32_newpath.has_acls ()
+ && !win32_newpath.isremote ())
+ /* If the filesystem supports ACLs, we will overwrite the DACL after the
+ call to NtCreateFile. This requires a handle with READ_CONTROL and
+ WRITE_DAC access, otherwise get_file_sd and set_file_sd both have to
+ open the file again.
+ FIXME: On remote NTFS shares open sometimes fails because even the
+ creator of the file doesn't have the right to change the DACL.
+ I don't know what setting that is or how to recognize such a share,
+ so for now we don't request WRITE_DAC on remote drives. */
+ access |= READ_CONTROL | WRITE_DAC;
+
+ status = NtCreateFile (&fh, access,
+ win32_newpath.get_object_attr (attr, sec_none_nih),
+ &io, NULL, FILE_ATTRIBUTE_NORMAL,
+ FILE_SHARE_VALID_FLAGS,
+ isdevice ? FILE_OVERWRITE_IF : FILE_CREATE,
+ FILE_SYNCHRONOUS_IO_NONALERT
+ | FILE_NON_DIRECTORY_FILE
+ | FILE_OPEN_FOR_BACKUP_INTENT,
+ NULL, 0);
if (!NT_SUCCESS (status))
{
__seterrno_from_nt_status (status);
- goto done;
+ __leave;
}
- status = NtSetAttributesFile (fh, FILE_ATTRIBUTE_NORMAL);
- NtClose (fh);
- if (!NT_SUCCESS (status))
+ if (io.Information == FILE_CREATED && win32_newpath.has_acls ())
+ set_created_file_access (fh, win32_newpath,
+ S_IFLNK | STD_RBITS | STD_WBITS);
+ status = NtWriteFile (fh, NULL, NULL, NULL, &io, buf, cp - buf,
+ NULL, NULL);
+ if (NT_SUCCESS (status) && io.Information == (ULONG) (cp - buf))
+ {
+ status = NtSetAttributesFile (fh, wsym_type == WSYM_lnk
+ ? FILE_ATTRIBUTE_READONLY
+ : FILE_ATTRIBUTE_SYSTEM);
+ if (!NT_SUCCESS (status))
+ debug_printf ("Setting attributes failed, status = %y", status);
+ res = 0;
+ }
+ else
{
__seterrno_from_nt_status (status);
- goto done;
+ FILE_DISPOSITION_INFORMATION fdi = { TRUE };
+ status = NtSetInformationFile (fh, &io, &fdi, sizeof fdi,
+ FileDispositionInformation);
+ if (!NT_SUCCESS (status))
+ debug_printf ("Setting delete dispostion failed, status = %y",
+ status);
}
- }
- else if (!isdevice && win32_newpath.has_acls () && !win32_newpath.isremote ())
- /* If the filesystem supports ACLs, we will overwrite the DACL after the
- call to NtCreateFile. This requires a handle with READ_CONTROL and
- WRITE_DAC access, otherwise get_file_sd and set_file_sd both have to
- open the file again.
- FIXME: On remote NTFS shares open sometimes fails because even the
- creator of the file doesn't have the right to change the DACL.
- I don't know what setting that is or how to recognize such a share,
- so for now we don't request WRITE_DAC on remote drives. */
- access |= READ_CONTROL | WRITE_DAC;
-
- status = NtCreateFile (&fh, access,
- win32_newpath.get_object_attr (attr, sec_none_nih),
- &io, NULL, FILE_ATTRIBUTE_NORMAL,
- FILE_SHARE_VALID_FLAGS,
- isdevice ? FILE_OVERWRITE_IF : FILE_CREATE,
- FILE_SYNCHRONOUS_IO_NONALERT
- | FILE_NON_DIRECTORY_FILE
- | FILE_OPEN_FOR_BACKUP_INTENT,
- NULL, 0);
- if (!NT_SUCCESS (status))
- {
- __seterrno_from_nt_status (status);
- goto done;
- }
- if (win32_newpath.has_acls ())
- set_file_attribute (fh, win32_newpath, ILLEGAL_UID, ILLEGAL_GID,
- (io.Information == FILE_CREATED ? S_JUSTCREATED : 0)
- | S_IFLNK | STD_RBITS | STD_WBITS);
- status = NtWriteFile (fh, NULL, NULL, NULL, &io, buf, cp - buf, NULL, NULL);
- if (NT_SUCCESS (status) && io.Information == (ULONG) (cp - buf))
- {
- status = NtSetAttributesFile (fh, wsym_type == WSYM_lnk
- ? FILE_ATTRIBUTE_READONLY
- : FILE_ATTRIBUTE_SYSTEM);
- if (!NT_SUCCESS (status))
- debug_printf ("Setting attributes failed, status = %y", status);
- res = 0;
- }
- else
- {
- __seterrno_from_nt_status (status);
- FILE_DISPOSITION_INFORMATION fdi = { TRUE };
- status = NtSetInformationFile (fh, &io, &fdi, sizeof fdi,
- FileDispositionInformation);
- if (!NT_SUCCESS (status))
- debug_printf ("Setting delete dispostion failed, status = %y", status);
- }
- NtClose (fh);
+ NtClose (fh);
-done:
+ }
+ __except (EFAULT) {}
+ __endtry
syscall_printf ("%d = symlink_worker(%s, %s, %d)",
res, oldpath, newpath, isdevice);
if (has_trailing_dirsep)
@@ -2061,7 +2192,7 @@ symlink_info::check_shortcut (HANDLE h)
{
char *tmpbuf = tp.c_get ();
if (sys_wcstombs (tmpbuf, NT_MAX_PATH, (PWCHAR) (cp + 2))
- > SYMLINK_MAX + 1)
+ > SYMLINK_MAX)
return 0;
res = posixify (tmpbuf);
}
@@ -2142,7 +2273,7 @@ symlink_info::check_sysfile (HANDLE h)
srcbuf += 2;
char *tmpbuf = tp.c_get ();
if (sys_wcstombs (tmpbuf, NT_MAX_PATH, (PWCHAR) srcbuf)
- > SYMLINK_MAX + 1)
+ > SYMLINK_MAX)
debug_printf ("symlink string too long");
else
res = posixify (tmpbuf);
@@ -2183,7 +2314,13 @@ symlink_info::check_reparse_point (HANDLE h, bool remote)
{
debug_printf ("NtFsControlFile(FSCTL_GET_REPARSE_POINT) failed, %y",
status);
- set_error (EIO);
+ /* When accessing the root dir of some remote drives (observed with
+ OS X shares), the FILE_ATTRIBUTE_REPARSE_POINT flag is set, but
+ the followup call to NtFsControlFile(FSCTL_GET_REPARSE_POINT)
+ returns with STATUS_NOT_A_REPARSE_POINT. That's quite buggy, but
+ we cope here with this scenario by not setting an error code. */
+ if (status != STATUS_NOT_A_REPARSE_POINT)
+ set_error (EIO);
return 0;
}
if (rp->ReparseTag == IO_REPARSE_TAG_SYMLINK)
@@ -2256,7 +2393,7 @@ symlink_info::check_nfs_symlink (HANDLE h)
PWCHAR spath = (PWCHAR)
(pffei->EaName + pffei->EaNameLength + 1);
res = sys_wcstombs (contents, SYMLINK_MAX + 1,
- spath, pffei->EaValueLength) - 1;
+ spath, pffei->EaValueLength);
pflags |= PATH_SYMLINK;
}
return res;
@@ -2478,7 +2615,7 @@ symlink_info::parse_device (const char *contents)
char *endptr;
_major_t mymajor;
_major_t myminor;
- _mode_t mymode;
+ __mode_t mymode;
mymajor = strtol (contents += 2, &endptr, 16);
if (endptr == contents)
@@ -2707,19 +2844,9 @@ restart:
This speeds up path_conv noticably (~10%). */
&& (fs.inited () || fs.update (&upath, h)))
{
- if (fs.is_nfs ())
- {
- status = nfs_fetch_fattr3 (h, conv_hdl.nfsattr ());
- if (NT_SUCCESS (status))
- fileattr = ((conv_hdl.nfsattr ()->type & 7) == NF3DIR)
- ? FILE_ATTRIBUTE_DIRECTORY : 0;
- }
- else
- {
- status = file_get_fnoi (h, fs.is_netapp (), conv_hdl.fnoi ());
- if (NT_SUCCESS (status))
- fileattr = conv_hdl.fnoi ()->FileAttributes;
- }
+ status = conv_hdl.get_finfo (h, fs.is_nfs ());
+ if (NT_SUCCESS (status))
+ fileattr = conv_hdl.get_dosattr (fs.is_nfs ());
}
if (!NT_SUCCESS (status))
{
@@ -2756,7 +2883,7 @@ restart:
OBJECT_ATTRIBUTES dattr;
HANDLE dir;
struct {
- FILE_BOTH_DIR_INFORMATION fdi;
+ FILE_ID_BOTH_DIR_INFORMATION fdi;
WCHAR dummy_buf[NAME_MAX + 1];
} fdi_buf;
@@ -2776,13 +2903,19 @@ restart:
This case is only recognized by the length of the
basename part. If it's 0, the incoming file is the
root of a drive. So we at least know it's a directory. */
- fileattr = basename.Length ? 0 : FILE_ATTRIBUTE_DIRECTORY;
+ if (basename.Length)
+ fileattr = FILE_ATTRIBUTE_DIRECTORY;
+ else
+ {
+ fileattr = 0;
+ set_error (geterrno_from_nt_status (status));
+ }
}
else
{
status = NtQueryDirectoryFile (dir, NULL, NULL, NULL, &io,
&fdi_buf, sizeof fdi_buf,
- FileBothDirectoryInformation,
+ FileIdBothDirectoryInformation,
TRUE, &basename, TRUE);
/* Take the opportunity to check file system while we're
having the handle to the parent dir. */
@@ -2808,18 +2941,20 @@ restart:
}
else
{
- PFILE_NETWORK_OPEN_INFORMATION pfnoi = conv_hdl.fnoi ();
+ PFILE_ALL_INFORMATION pfai = conv_hdl.fai ();
fileattr = fdi_buf.fdi.FileAttributes;
- memcpy (pfnoi, &fdi_buf.fdi.CreationTime, sizeof *pfnoi);
- /* Amazing, but true: The FILE_NETWORK_OPEN_INFORMATION
- structure has the AllocationSize and EndOfFile members
- interchanged relative to the directory information
- classes. */
- pfnoi->AllocationSize.QuadPart
+ memcpy (&pfai->BasicInformation.CreationTime,
+ &fdi_buf.fdi.CreationTime,
+ 4 * sizeof (LARGE_INTEGER));
+ pfai->BasicInformation.FileAttributes = fileattr;
+ pfai->StandardInformation.AllocationSize.QuadPart
= fdi_buf.fdi.AllocationSize.QuadPart;
- pfnoi->EndOfFile.QuadPart
+ pfai->StandardInformation.EndOfFile.QuadPart
= fdi_buf.fdi.EndOfFile.QuadPart;
+ pfai->StandardInformation.NumberOfLinks = 1;
+ pfai->InternalInformation.IndexNumber.QuadPart
+ = fdi_buf.fdi.FileId.QuadPart;
}
}
ext_tacked_on = !!*ext_here;
@@ -2853,7 +2988,8 @@ restart:
if (res > 0)
{
/* A symlink is never a directory. */
- conv_hdl.fnoi ()->FileAttributes &= ~FILE_ATTRIBUTE_DIRECTORY;
+ conv_hdl.fai ()->BasicInformation.FileAttributes
+ &= ~FILE_ATTRIBUTE_DIRECTORY;
break;
}
else
@@ -2993,7 +3129,7 @@ symlink_info::set (char *path)
/* readlink system call */
extern "C" ssize_t
-readlink (const char *path, char *buf, size_t buflen)
+readlink (const char *__restrict path, char *__restrict buf, size_t buflen)
{
if (buflen < 0)
{
@@ -3074,13 +3210,16 @@ extern "C" char *
getcwd (char *buf, size_t ulen)
{
char* res = NULL;
- myfault efault;
- if (efault.faulted (EFAULT))
- /* errno set */;
- else if (ulen == 0 && buf)
- set_errno (EINVAL);
- else
- res = cygheap->cwd.get (buf, 1, 1, ulen);
+
+ __try
+ {
+ if (ulen == 0 && buf)
+ set_errno (EINVAL);
+ else
+ res = cygheap->cwd.get (buf, 1, 1, ulen);
+ }
+ __except (EFAULT) {}
+ __endtry
return res;
}
@@ -3115,59 +3254,61 @@ get_current_dir_name (void)
extern "C" int
chdir (const char *in_dir)
{
- myfault efault;
- if (efault.faulted (EFAULT))
- return -1;
- if (!*in_dir)
+ int res = -1;
+
+ __try
{
- set_errno (ENOENT);
- return -1;
- }
+ if (!*in_dir)
+ {
+ set_errno (ENOENT);
+ __leave;
+ }
- syscall_printf ("dir '%s'", in_dir);
+ syscall_printf ("dir '%s'", in_dir);
- /* Convert path. First argument ensures that we don't check for NULL/empty/invalid
- again. */
- path_conv path (PC_NONULLEMPTY, in_dir, PC_SYM_FOLLOW | PC_POSIX);
- if (path.error)
- {
- set_errno (path.error);
- syscall_printf ("-1 = chdir (%s)", in_dir);
- return -1;
- }
+ /* Convert path. First argument ensures that we don't check for
+ NULL/empty/invalid again. */
+ path_conv path (PC_NONULLEMPTY, in_dir, PC_SYM_FOLLOW | PC_POSIX);
+ if (path.error)
+ {
+ set_errno (path.error);
+ syscall_printf ("-1 = chdir (%s)", in_dir);
+ __leave;
+ }
- int res = -1;
- const char *posix_cwd = NULL;
- dev_t devn = path.get_device ();
- if (!path.exists ())
- set_errno (ENOENT);
- else if (!path.isdir ())
- set_errno (ENOTDIR);
- else if (!isvirtual_dev (devn))
+ const char *posix_cwd = NULL;
+
+ if (!path.exists ())
+ set_errno (ENOENT);
+ else if (!path.isdir ())
+ set_errno (ENOTDIR);
+ else if (!path.is_native ())
+ set_errno (EOPNOTSUPP);
+ else
+ {
+ /* The sequence chdir("xx"); chdir(".."); must be a noop if xx
+ is not a symlink. This is exploited by find.exe.
+ The posix_cwd is just path.get_posix ().
+ In other cases we let cwd.set obtain the Posix path through
+ the mount table. */
+ if (!isdrive (path.get_posix ()))
+ posix_cwd = path.get_posix ();
+ res = 0;
+ }
+
+ if (!res)
+ res = cygheap->cwd.set (&path, posix_cwd);
+
+ /* Note that we're accessing cwd.posix without a lock here.
+ I didn't think it was worth locking just for strace. */
+ syscall_printf ("%R = chdir() cygheap->cwd.posix '%s' native '%S'", res,
+ cygheap->cwd.get_posix (), path.get_nt_native_path ());
+ }
+ __except (EFAULT)
{
- /* The sequence chdir("xx"); chdir(".."); must be a noop if xx
- is not a symlink. This is exploited by find.exe.
- The posix_cwd is just path.normalized_path.
- In other cases we let cwd.set obtain the Posix path through
- the mount table. */
- if (!isdrive(path.normalized_path))
- posix_cwd = path.normalized_path;
- res = 0;
+ res = -1;
}
- else
- {
- posix_cwd = path.normalized_path;
- res = 0;
- }
-
- if (!res)
- res = cygheap->cwd.set (&path, posix_cwd);
-
- /* Note that we're accessing cwd.posix without a lock here. I didn't think
- it was worth locking just for strace. */
- syscall_printf ("%R = chdir() cygheap->cwd.posix '%s' native '%S'", res,
- cygheap->cwd.get_posix (), path.get_nt_native_path ());
- MALLOC_CHECK;
+ __endtry
return res;
}
@@ -3204,163 +3345,186 @@ cygwin_conv_path (cygwin_conv_path_t what, const void *from, void *to,
size_t size)
{
tmp_pathbuf tp;
- myfault efault;
- if (efault.faulted (EFAULT))
- return -1;
-
path_conv p;
size_t lsiz = 0;
char *buf = NULL;
PWCHAR path = NULL;
int error = 0;
- bool relative = !!(what & CCP_RELATIVE);
+ int how = what & CCP_CONVFLAGS_MASK;
what &= CCP_CONVTYPE_MASK;
+ int ret = -1;
- if (!from)
+ __try
{
- set_errno (EINVAL);
- return -1;
- }
+ if (!from)
+ {
+ set_errno (EINVAL);
+ __leave;
+ }
- switch (what)
- {
- case CCP_POSIX_TO_WIN_A:
- {
- p.check ((const char *) from,
- PC_POSIX | PC_SYM_FOLLOW | PC_SYM_NOFOLLOW_REP
- | PC_NO_ACCESS_CHECK | PC_NOWARN | (relative ? PC_NOFULL : 0));
- if (p.error)
- return_with_errno (p.error);
- PUNICODE_STRING up = p.get_nt_native_path ();
- buf = tp.c_get ();
- sys_wcstombs (buf, NT_MAX_PATH,
- up->Buffer, up->Length / sizeof (WCHAR));
- /* Convert native path to standard DOS path. */
- if (!strncmp (buf, "\\??\\", 4))
- {
- buf += 4;
- if (buf[1] != ':') /* native UNC path */
- *(buf += 2) = '\\';
- }
- else if (*buf == '\\')
+ switch (what)
+ {
+ case CCP_POSIX_TO_WIN_A:
{
- /* Device name points to somewhere else in the NT namespace.
- Use GLOBALROOT prefix to convert to Win32 path. */
- char *p = buf + sys_wcstombs (buf, NT_MAX_PATH,
- ro_u_globalroot.Buffer,
- ro_u_globalroot.Length
- / sizeof (WCHAR));
- sys_wcstombs (p, NT_MAX_PATH - (p - buf),
+ p.check ((const char *) from,
+ PC_POSIX | PC_SYM_FOLLOW | PC_SYM_NOFOLLOW_REP
+ | PC_NO_ACCESS_CHECK | PC_NOWARN
+ | ((how & CCP_RELATIVE) ? PC_NOFULL : 0));
+ if (p.error)
+ {
+ set_errno (p.error);
+ __leave;
+ }
+ PUNICODE_STRING up = p.get_nt_native_path ();
+ buf = tp.c_get ();
+ sys_wcstombs (buf, NT_MAX_PATH,
up->Buffer, up->Length / sizeof (WCHAR));
+ /* Convert native path to standard DOS path. */
+ if (!strncmp (buf, "\\??\\", 4))
+ {
+ buf += 4;
+ if (buf[1] != ':') /* native UNC path */
+ *(buf += 2) = '\\';
+ }
+ else if (*buf == '\\')
+ {
+ /* Device name points to somewhere else in the NT namespace.
+ Use GLOBALROOT prefix to convert to Win32 path. */
+ char *p = buf + sys_wcstombs (buf, NT_MAX_PATH,
+ ro_u_globalroot.Buffer,
+ ro_u_globalroot.Length
+ / sizeof (WCHAR));
+ sys_wcstombs (p, NT_MAX_PATH - (p - buf),
+ up->Buffer, up->Length / sizeof (WCHAR));
+ }
+ lsiz = strlen (buf) + 1;
+ /* TODO: Incoming "." is a special case which leads to a trailing
+ backslash ".\\" in the Win32 path. That's a result of the
+ conversion in normalize_posix_path. This should not occur
+ so the below code is just a band-aid. */
+ if ((how & CCP_RELATIVE) && !strcmp ((const char *) from, ".")
+ && !strcmp (buf, ".\\"))
+ {
+ lsiz = 2;
+ buf[1] = '\0';
+ }
}
- lsiz = strlen (buf) + 1;
- /* TODO: Incoming "." is a special case which leads to a trailing
- backslash ".\\" in the Win32 path. That's a result of the
- conversion in normalize_posix_path. This should not occur
- so the below code is just a band-aid. */
- if (relative && !strcmp ((const char *) from, ".")
- && !strcmp (buf, ".\\"))
- {
- lsiz = 2;
- buf[1] = '\0';
- }
- }
- break;
- case CCP_POSIX_TO_WIN_W:
- p.check ((const char *) from,
- PC_POSIX | PC_SYM_FOLLOW | PC_SYM_NOFOLLOW_REP
- | PC_NO_ACCESS_CHECK | PC_NOWARN | (relative ? PC_NOFULL : 0));
- if (p.error)
- return_with_errno (p.error);
- /* Relative Windows paths are always restricted to MAX_PATH chars. */
- if (relative && !isabspath (p.get_win32 ())
- && sys_mbstowcs (NULL, 0, p.get_win32 ()) > MAX_PATH)
- {
- /* Recreate as absolute path. */
- p.check ((const char *) from, PC_POSIX | PC_SYM_FOLLOW
- | PC_NO_ACCESS_CHECK | PC_NOWARN);
+ break;
+ case CCP_POSIX_TO_WIN_W:
+ p.check ((const char *) from,
+ PC_POSIX | PC_SYM_FOLLOW | PC_SYM_NOFOLLOW_REP
+ | PC_NO_ACCESS_CHECK | PC_NOWARN
+ | ((how & CCP_RELATIVE) ? PC_NOFULL : 0));
if (p.error)
- return_with_errno (p.error);
- }
- lsiz = p.get_wide_win32_path_len () + 1;
- path = p.get_nt_native_path ()->Buffer;
+ {
+ set_errno (p.error);
+ __leave;
+ }
+ /* Relative Windows paths are always restricted to MAX_PATH chars. */
+ if ((how & CCP_RELATIVE) && !isabspath (p.get_win32 ())
+ && sys_mbstowcs (NULL, 0, p.get_win32 ()) > MAX_PATH)
+ {
+ /* Recreate as absolute path. */
+ p.check ((const char *) from, PC_POSIX | PC_SYM_FOLLOW
+ | PC_NO_ACCESS_CHECK | PC_NOWARN);
+ if (p.error)
+ {
+ set_errno (p.error);
+ __leave;
+ }
+ }
+ lsiz = p.get_wide_win32_path_len () + 1;
+ path = p.get_nt_native_path ()->Buffer;
- /* Convert native path to standard DOS path. */
- if (!wcsncmp (path, L"\\??\\", 4))
- {
- path[1] = L'\\';
-
- /* Drop long path prefix for short pathnames. Unfortunately there's
- quite a bunch of Win32 functions, especially in user32.dll,
- apparently, which don't grok long path names at all, not even
- in the UNICODE API. */
- if ((path[5] == L':' && lsiz <= MAX_PATH + 4)
- || (!wcsncmp (path + 4, L"UNC\\", 4) && lsiz <= MAX_PATH + 6))
+ /* Convert native path to standard DOS path. */
+ if (!wcsncmp (path, L"\\??\\", 4))
{
- path += 4;
- lsiz -= 4;
- if (path[1] != L':')
+ path[1] = L'\\';
+
+ /* Drop long path prefix for short pathnames. Unfortunately there's
+ quite a bunch of Win32 functions, especially in user32.dll,
+ apparently, which don't grok long path names at all, not even
+ in the UNICODE API. */
+ if ((path[5] == L':' && lsiz <= MAX_PATH + 4)
+ || (!wcsncmp (path + 4, L"UNC\\", 4) && lsiz <= MAX_PATH + 6))
{
- *(path += 2) = '\\';
- lsiz -= 2;
+ path += 4;
+ lsiz -= 4;
+ if (path[1] != L':')
+ {
+ *(path += 2) = '\\';
+ lsiz -= 2;
+ }
}
}
+ else if (*path == L'\\')
+ {
+ /* Device name points to somewhere else in the NT namespace.
+ Use GLOBALROOT prefix to convert to Win32 path. */
+ to = (void *) wcpcpy ((wchar_t *) to, ro_u_globalroot.Buffer);
+ lsiz += ro_u_globalroot.Length / sizeof (WCHAR);
+ }
+ /* TODO: Same ".\\" band-aid as in CCP_POSIX_TO_WIN_A case. */
+ if ((how & CCP_RELATIVE) && !strcmp ((const char *) from, ".")
+ && !wcscmp (path, L".\\"))
+ {
+ lsiz = 2;
+ path[1] = L'\0';
+ }
+ lsiz *= sizeof (WCHAR);
+ break;
+ case CCP_WIN_A_TO_POSIX:
+ buf = tp.c_get ();
+ error = mount_table->conv_to_posix_path ((const char *) from, buf,
+ how | __CCP_APP_SLASH);
+ if (error)
+ {
+ set_errno (p.error);
+ __leave;
+ }
+ lsiz = strlen (buf) + 1;
+ break;
+ case CCP_WIN_W_TO_POSIX:
+ buf = tp.c_get ();
+ error = mount_table->conv_to_posix_path ((const PWCHAR) from, buf,
+ how | __CCP_APP_SLASH);
+ if (error)
+ {
+ set_errno (error);
+ __leave;
+ }
+ lsiz = strlen (buf) + 1;
+ break;
+ default:
+ set_errno (EINVAL);
+ __leave;
}
- else if (*path == L'\\')
+ if (!size)
{
- /* Device name points to somewhere else in the NT namespace.
- Use GLOBALROOT prefix to convert to Win32 path. */
- to = (void *) wcpcpy ((wchar_t *) to, ro_u_globalroot.Buffer);
- lsiz += ro_u_globalroot.Length / sizeof (WCHAR);
+ ret = lsiz;
+ __leave;
}
- /* TODO: Same ".\\" band-aid as in CCP_POSIX_TO_WIN_A case. */
- if (relative && !strcmp ((const char *) from, ".")
- && !wcscmp (path, L".\\"))
+ if (size < lsiz)
{
- lsiz = 2;
- path[1] = L'\0';
+ set_errno (ENOSPC);
+ __leave;
}
- lsiz *= sizeof (WCHAR);
- break;
- case CCP_WIN_A_TO_POSIX:
- buf = tp.c_get ();
- error = mount_table->conv_to_posix_path ((const char *) from, buf,
- relative);
- if (error)
- return_with_errno (error);
- lsiz = strlen (buf) + 1;
- break;
- case CCP_WIN_W_TO_POSIX:
- buf = tp.c_get ();
- error = mount_table->conv_to_posix_path ((const PWCHAR) from, buf,
- relative);
- if (error)
- return_with_errno (error);
- lsiz = strlen (buf) + 1;
- break;
- default:
- set_errno (EINVAL);
- return -1;
- }
- if (!size)
- return lsiz;
- if (size < lsiz)
- {
- set_errno (ENOSPC);
- return -1;
- }
- switch (what)
- {
- case CCP_POSIX_TO_WIN_A:
- case CCP_WIN_A_TO_POSIX:
- case CCP_WIN_W_TO_POSIX:
- stpcpy ((char *) to, buf);
- break;
- case CCP_POSIX_TO_WIN_W:
- wcpcpy ((PWCHAR) to, path);
- break;
+ switch (what)
+ {
+ case CCP_POSIX_TO_WIN_A:
+ case CCP_WIN_A_TO_POSIX:
+ case CCP_WIN_W_TO_POSIX:
+ stpcpy ((char *) to, buf);
+ break;
+ case CCP_POSIX_TO_WIN_W:
+ wcpcpy ((PWCHAR) to, path);
+ break;
+ }
+ ret = 0;
}
- return 0;
+ __except (EFAULT) {}
+ __endtry
+ return ret;
}
extern "C" void *
@@ -3417,8 +3581,11 @@ cygwin_conv_to_full_posix_path (const char *path, char *posix_path)
/* The realpath function is required by POSIX:2008. */
extern "C" char *
-realpath (const char *path, char *resolved)
+realpath (const char *__restrict path, char *__restrict resolved)
{
+ tmp_pathbuf tp;
+ char *tpath;
+
/* Make sure the right errno is returned if path is NULL. */
if (!path)
{
@@ -3428,48 +3595,50 @@ realpath (const char *path, char *resolved)
/* Guard reading from a potentially invalid path and writing to a
potentially invalid resolved. */
- tmp_pathbuf tp;
- myfault efault;
- if (efault.faulted (EFAULT))
- return NULL;
-
- /* Win32 drive letter paths have to be converted to a POSIX path first,
- because path_conv leaves the incoming path untouched except for
- converting backslashes to forward slashes. */
- char *tpath;
- if (isdrive (path))
- {
- tpath = tp.c_get ();
- mount_table->conv_to_posix_path (path, tpath, 0);
- }
- else
- tpath = (char *) path;
+ __try
+ {
+ /* Win32 drive letter paths and, generally, any path starting with a
+ backslash, have to be converted to a POSIX path first, because
+ path_conv leaves the incoming path untouched except for converting
+ backslashes to forward slashes. This also covers '\\?\ and '\??\'
+ path prefixes. */
+ if (isdrive (path) || path[0] == '\\')
+ {
+ tpath = tp.c_get ();
+ mount_table->conv_to_posix_path (path, tpath, 0);
+ }
+ else
+ tpath = (char *) path;
- path_conv real_path (tpath, PC_SYM_FOLLOW | PC_POSIX, stat_suffixes);
+ path_conv real_path (tpath, PC_SYM_FOLLOW | PC_POSIX, stat_suffixes);
- /* POSIX 2008 requires malloc'ing if resolved is NULL, and states
- that using non-NULL resolved is asking for portability
- problems. */
+ /* POSIX 2008 requires malloc'ing if resolved is NULL, and states
+ that using non-NULL resolved is asking for portability
+ problems. */
- if (!real_path.error && real_path.exists ())
- {
- if (!resolved)
+ if (!real_path.error && real_path.exists ())
{
- resolved = (char *) malloc (strlen (real_path.normalized_path) + 1);
if (!resolved)
- return NULL;
+ {
+ resolved = (char *)
+ malloc (strlen (real_path.get_posix ()) + 1);
+ if (!resolved)
+ return NULL;
+ }
+ strcpy (resolved, real_path.get_posix ());
+ return resolved;
}
- strcpy (resolved, real_path.normalized_path);
- return resolved;
- }
- /* FIXME: on error, Linux puts the name of the path
- component which could not be resolved into RESOLVED, but POSIX
- does not require this. */
- if (resolved)
- resolved[0] = '\0';
- set_errno (real_path.error ?: ENOENT);
+ /* FIXME: on error, Linux puts the name of the path
+ component which could not be resolved into RESOLVED, but POSIX
+ does not require this. */
+ if (resolved)
+ resolved[0] = '\0';
+ set_errno (real_path.error ?: ENOENT);
+ }
+ __except (EFAULT) {}
+ __endtry
return NULL;
}
@@ -3544,7 +3713,7 @@ conv_path_list_buf_size (const char *path_list, bool to_posix)
/* 100: slop */
size = strlen (path_list)
+ (num_elms * max_mount_path_len)
- + (nrel * strlen (to_posix ? pc.normalized_path : pc.get_win32 ()))
+ + (nrel * strlen (to_posix ? pc.get_posix () : pc.get_win32 ()))
+ 100;
return size;
@@ -3899,8 +4068,7 @@ fcwd_access_t::SetVersionFromPointer (PBYTE buf_p, bool is_buffer)
This code has been tested on Vista 32/64 bit, Server 2008 32/64 bit,
Windows 7 32/64 bit, Server 2008 R2 (which is only 64 bit anyway),
- and W8CP 32/64 bit. There's some hope this will still work for
- Windows 8 RTM... */
+ Windows 8 32/64 bit, Windows 8.1 32/64 bit, and Server 2012 R2. */
#ifdef __x86_64__
@@ -4108,9 +4276,11 @@ find_fast_cwd ()
used on the system. */
fcwd_access_t **f_cwd_ptr = find_fast_cwd_pointer ();
if (!f_cwd_ptr)
- system_printf ("WARNING: Couldn't compute FAST_CWD pointer. "
- "Please report this problem to\nthe public mailing "
- "list cygwin@cygwin.com");
+ small_printf ("Cygwin WARNING:\n"
+" Couldn't compute FAST_CWD pointer. This typically occurs if you're using\n"
+" an older Cygwin version on a newer Windows. Please update to the latest\n"
+" available Cygwin version from https://cygwin.com/. If the problem persists,\n"
+" please see https://cygwin.com/problems.html\n\n");
if (f_cwd_ptr && *f_cwd_ptr)
{
/* Just evaluate structure version. */
@@ -4262,6 +4432,20 @@ cwdstuff::override_win32_cwd (bool init, ULONG old_dismount_count)
if (h && h != dir)
NtClose (h);
}
+
+ /* Simulate the SetCurrentDirectory effect of associating a drive
+ with its own current directory. This behavior dating all the way
+ back to MS-DOS is done in Windows with special environment
+ variables. */
+ if (iswdrive (win32.Buffer)) {
+ tmp_pathbuf tp;
+ char env[] = { '!', (char) win32.Buffer[0], ':', 0 };
+ char *cwdcopy = tp.c_get ();
+
+ sys_wcstombs (cwdcopy, NT_MAX_PATH, win32.Buffer,
+ win32.Length / sizeof (WCHAR));
+ setenv(env, cwdcopy, 1);
+ }
}
/* Initialize cygcwd 'muto' for serializing access to cwd info. */
@@ -4550,8 +4734,6 @@ cwdstuff::reset_posix (wchar_t *w_cwd)
char *
cwdstuff::get (char *buf, int need_posix, int with_chroot, unsigned ulen)
{
- MALLOC_CHECK;
-
tmp_pathbuf tp;
if (ulen)
/* nothing */;
@@ -4595,146 +4777,9 @@ cwdstuff::get (char *buf, int need_posix, int with_chroot, unsigned ulen)
out:
syscall_printf ("(%s) = cwdstuff::get (%p, %u, %d, %d), errno %d",
buf, buf, ulen, need_posix, with_chroot, errno);
- MALLOC_CHECK;
return buf;
}
-int etc::curr_ix = 0;
-/* Note that the first elements of the below arrays are unused */
-bool etc::change_possible[MAX_ETC_FILES + 1];
-OBJECT_ATTRIBUTES etc::fn[MAX_ETC_FILES + 1];
-LARGE_INTEGER etc::last_modified[MAX_ETC_FILES + 1];
-
-int
-etc::init (int n, POBJECT_ATTRIBUTES attr)
-{
- if (n > 0)
- /* ok */;
- else if (++curr_ix <= MAX_ETC_FILES)
- n = curr_ix;
- else
- api_fatal ("internal error");
-
- fn[n] = *attr;
- change_possible[n] = false;
- test_file_change (n);
- paranoid_printf ("fn[%d] %S, curr_ix %d", n, fn[n].ObjectName, curr_ix);
- return n;
-}
-
-bool
-etc::test_file_change (int n)
-{
- NTSTATUS status;
- FILE_NETWORK_OPEN_INFORMATION fnoi;
- bool res;
-
- status = NtQueryFullAttributesFile (&fn[n], &fnoi);
- if (!NT_SUCCESS (status))
- {
- res = true;
- memset (last_modified + n, 0, sizeof (last_modified[n]));
- debug_printf ("NtQueryFullAttributesFile (%S) failed, %y",
- fn[n].ObjectName, status);
- }
- else
- {
- res = CompareFileTime ((FILETIME *) &fnoi.LastWriteTime,
- (FILETIME *) last_modified + n) > 0;
- last_modified[n].QuadPart = fnoi.LastWriteTime.QuadPart;
- }
-
- paranoid_printf ("fn[%d] %S res %d", n, fn[n].ObjectName, res);
- return res;
-}
-
-bool
-etc::dir_changed (int n)
-{
- /* io MUST be static because NtNotifyChangeDirectoryFile works asynchronously.
- It may write into io after the function has left, which may result in all
- sorts of stack corruption. */
- static IO_STATUS_BLOCK io NO_COPY;
- static HANDLE changed_h NO_COPY;
-
- if (!change_possible[n])
- {
- NTSTATUS status;
-
- if (!changed_h)
- {
- OBJECT_ATTRIBUTES attr;
-
- path_conv dir ("/etc");
- status = NtOpenFile (&changed_h, SYNCHRONIZE | FILE_LIST_DIRECTORY,
- dir.get_object_attr (attr, sec_none_nih), &io,
- FILE_SHARE_VALID_FLAGS, FILE_DIRECTORY_FILE);
- if (!NT_SUCCESS (status))
- {
-#ifdef DEBUGGING
- system_printf ("NtOpenFile (%S) failed, %y",
- dir.get_nt_native_path (), status);
-#endif
- changed_h = INVALID_HANDLE_VALUE;
- }
- else
- {
- status = NtNotifyChangeDirectoryFile (changed_h, NULL, NULL,
- NULL, &io, NULL, 0,
- FILE_NOTIFY_CHANGE_LAST_WRITE
- | FILE_NOTIFY_CHANGE_FILE_NAME,
- FALSE);
- if (!NT_SUCCESS (status))
- {
-#ifdef DEBUGGING
- system_printf ("NtNotifyChangeDirectoryFile (1) failed, %y",
- status);
-#endif
- NtClose (changed_h);
- changed_h = INVALID_HANDLE_VALUE;
- }
- }
- memset (change_possible, true, sizeof (change_possible));
- }
-
- if (changed_h == INVALID_HANDLE_VALUE)
- change_possible[n] = true;
- else if (WaitForSingleObject (changed_h, 0) == WAIT_OBJECT_0)
- {
- status = NtNotifyChangeDirectoryFile (changed_h, NULL, NULL,
- NULL, &io, NULL, 0,
- FILE_NOTIFY_CHANGE_LAST_WRITE
- | FILE_NOTIFY_CHANGE_FILE_NAME,
- FALSE);
- if (!NT_SUCCESS (status))
- {
-#ifdef DEBUGGING
- system_printf ("NtNotifyChangeDirectoryFile (2) failed, %y",
- status);
-#endif
- NtClose (changed_h);
- changed_h = INVALID_HANDLE_VALUE;
- }
- memset (change_possible, true, sizeof change_possible);
- }
- }
-
- paranoid_printf ("fn[%d] %S change_possible %d",
- n, fn[n].ObjectName, change_possible[n]);
- return change_possible[n];
-}
-
-bool
-etc::file_changed (int n)
-{
- bool res = false;
- if (dir_changed (n) && test_file_change (n))
- res = true;
- change_possible[n] = false; /* Change is no longer possible */
- paranoid_printf ("fn[%d] %S res %d", n, fn[n].ObjectName, res);
- return res;
-}
-
/* No need to be reentrant or thread-safe according to SUSv3.
/ and \\ are treated equally. Leading drive specifiers are
kept intact as far as it makes sense. Everything else is
@@ -4776,6 +4821,33 @@ basename (char *path)
return path;
}
+/* The differences with the POSIX version above:
+ - declared in <string.h> (instead of <libgen.h>);
+ - the argument is never modified, and therefore is marked const;
+ - the empty string is returned if path is an empty string, "/", or ends
+ with a trailing slash. */
+extern "C" char *
+__gnu_basename (const char *path)
+{
+ static char buf[1];
+ char *c, *d, *bs = (char *)path;
+
+ if (!path || !*path)
+ return strcpy (buf, "");
+ if (isalpha (path[0]) && path[1] == ':')
+ bs += 2;
+ else if (strspn (path, "/\\") > 1)
+ ++bs;
+ c = strrchr (bs, '/');
+ if ((d = strrchr (c ?: bs, '\\')) > c)
+ c = d;
+ if (c)
+ return c + 1;
+ else if (!bs[0])
+ return strcpy (buf, "");
+ return (char *)path;
+}
+
/* No need to be reentrant or thread-safe according to SUSv3.
/ and \\ are treated equally. Leading drive specifiers and
leading double (back)slashes are kept intact as far as it
diff --git a/winsup/cygwin/path.h b/winsup/cygwin/path.h
index d6c386075..c6f43c183 100644
--- a/winsup/cygwin/path.h
+++ b/winsup/cygwin/path.h
@@ -1,8 +1,5 @@
/* path.h: path data structures
- Copyright 1996, 1997, 1998, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007,
- 2008, 2009, 2010, 2011, 2012, 2013 Red Hat, Inc.
-
This file is part of Cygwin.
This software is a copyrighted work licensed under the terms of the
@@ -90,24 +87,15 @@ enum path_types
PATH_SOCKET = 0x40000000
};
+NTSTATUS file_get_fai (HANDLE, PFILE_ALL_INFORMATION);
+
class symlink_info;
-struct _FILE_NETWORK_OPEN_INFORMATION;
class path_conv_handle
{
HANDLE hdl;
union {
- /* Identical to FILE_NETWORK_OPEN_INFORMATION. We don't want to pull in
- ntdll.h here, though. */
- struct {
- LARGE_INTEGER CreationTime;
- LARGE_INTEGER LastAccessTime;
- LARGE_INTEGER LastWriteTime;
- LARGE_INTEGER ChangeTime;
- LARGE_INTEGER AllocationSize;
- LARGE_INTEGER EndOfFile;
- ULONG FileAttributes;
- } _fnoi;
+ FILE_ALL_INFORMATION _fai;
/* For NFS. */
fattr3 _fattr3;
} attribs;
@@ -128,10 +116,25 @@ public:
hdl = NULL;
}
inline HANDLE handle () const { return hdl; }
- inline struct _FILE_NETWORK_OPEN_INFORMATION *fnoi ()
- { return (struct _FILE_NETWORK_OPEN_INFORMATION *) &attribs._fnoi; }
- inline struct fattr3 *nfsattr ()
+ inline PFILE_ALL_INFORMATION fai () const
+ { return (PFILE_ALL_INFORMATION) &attribs._fai; }
+ inline struct fattr3 *nfsattr () const
{ return (struct fattr3 *) &attribs._fattr3; }
+ inline NTSTATUS get_finfo (HANDLE h, bool nfs)
+ {
+ return nfs ? nfs_fetch_fattr3 (h, nfsattr ()) : file_get_fai (h, fai ());
+ }
+ inline ino_t get_ino (bool nfs) const
+ {
+ return nfs ? nfsattr ()->fileid
+ : fai ()->InternalInformation.IndexNumber.QuadPart;
+ }
+ inline DWORD get_dosattr (bool nfs) const
+ {
+ if (nfs)
+ return (nfsattr ()->type & 7) == NF3DIR ? FILE_ATTRIBUTE_DIRECTORY : 0;
+ return fai ()->BasicInformation.FileAttributes;
+ }
};
class path_conv
@@ -144,19 +147,21 @@ class path_conv
void add_ext_from_sym (symlink_info&);
DWORD symlink_length;
const char *path;
+ unsigned path_flags;
+ const char *suffix;
+ const char *posix_path;
path_conv_handle conv_handle;
public:
- unsigned path_flags;
- const char *known_suffix;
- const char *normalized_path;
int error;
device dev;
+ const char *known_suffix () { return suffix; }
bool isremote () const {return fs.is_remote_drive ();}
ULONG objcaseinsensitive () const {return caseinsensitive;}
bool has_acls () const {return !(path_flags & PATH_NOACL) && fs.has_acls (); }
bool hasgood_inode () const {return !(path_flags & PATH_IHASH); }
bool isgood_inode (ino_t ino) const;
+ bool is_native () const {return !!(path_flags & PATH_NOPOSIX);}
bool support_sparse () const
{
return (path_flags & PATH_SPARSE)
@@ -232,7 +237,7 @@ class path_conv
path_conv (const device& in_dev)
: fileattr (INVALID_FILE_ATTRIBUTES), wide_path (NULL), path (NULL),
- path_flags (0), known_suffix (NULL), normalized_path (NULL), error (0),
+ path_flags (0), suffix (NULL), posix_path (NULL), error (0),
dev (in_dev)
{
set_path (in_dev.native);
@@ -241,7 +246,7 @@ class path_conv
path_conv (int, const char *src, unsigned opt = PC_SYM_FOLLOW,
const suffix_info *suffixes = NULL)
: fileattr (INVALID_FILE_ATTRIBUTES), wide_path (NULL), path (NULL),
- path_flags (0), known_suffix (NULL), normalized_path (NULL), error (0)
+ path_flags (0), suffix (NULL), posix_path (NULL), error (0)
{
check (src, opt, suffixes);
}
@@ -249,7 +254,7 @@ class path_conv
path_conv (const UNICODE_STRING *src, unsigned opt = PC_SYM_FOLLOW,
const suffix_info *suffixes = NULL)
: fileattr (INVALID_FILE_ATTRIBUTES), wide_path (NULL), path (NULL),
- path_flags (0), known_suffix (NULL), normalized_path (NULL), error (0)
+ path_flags (0), suffix (NULL), posix_path (NULL), error (0)
{
check (src, opt | PC_NULLEMPTY, suffixes);
}
@@ -257,18 +262,19 @@ class path_conv
path_conv (const char *src, unsigned opt = PC_SYM_FOLLOW,
const suffix_info *suffixes = NULL)
: fileattr (INVALID_FILE_ATTRIBUTES), wide_path (NULL), path (NULL),
- path_flags (0), known_suffix (NULL), normalized_path (NULL), error (0)
+ path_flags (0), suffix (NULL), posix_path (NULL), error (0)
{
check (src, opt | PC_NULLEMPTY, suffixes);
}
path_conv ()
: fileattr (INVALID_FILE_ATTRIBUTES), wide_path (NULL), path (NULL),
- path_flags (0), known_suffix (NULL), normalized_path (NULL), error (0)
+ path_flags (0), suffix (NULL), posix_path (NULL), error (0)
{}
~path_conv ();
- inline const char *get_win32 () { return path; }
+ inline const char *get_win32 () const { return path; }
+ void set_nt_native_path (PUNICODE_STRING);
PUNICODE_STRING get_nt_native_path ();
inline POBJECT_ATTRIBUTES get_object_attr (OBJECT_ATTRIBUTES &attr,
SECURITY_ATTRIBUTES &sa)
@@ -281,14 +287,15 @@ class path_conv
NULL, sa.lpSecurityDescriptor);
return &attr;
}
- inline void init_reopen_attr (POBJECT_ATTRIBUTES attr, HANDLE h)
+ inline POBJECT_ATTRIBUTES init_reopen_attr (OBJECT_ATTRIBUTES &attr, HANDLE h)
{
if (has_buggy_reopen ())
- InitializeObjectAttributes (attr, get_nt_native_path (),
+ InitializeObjectAttributes (&attr, get_nt_native_path (),
objcaseinsensitive (), NULL, NULL)
else
- InitializeObjectAttributes (attr, &ro_u_empty, objcaseinsensitive (),
+ InitializeObjectAttributes (&attr, &ro_u_empty, objcaseinsensitive (),
h, NULL);
+ return &attr;
}
inline size_t get_wide_win32_path_len ()
{
@@ -308,17 +315,17 @@ class path_conv
void free_strings ()
{
cfree_and_null (path);
- cfree_and_null (normalized_path);
+ cfree_and_null (posix_path);
cfree_and_null (wide_path);
}
path_conv& eq_worker (const path_conv& pc, const char *in_path,
- const char *in_normalized_path)
+ const char *in_posix_path)
{
free_strings ();
memcpy (this, &pc, sizeof pc);
path = cstrdup (in_path);
conv_handle.dup (pc.conv_handle);
- normalized_path = cstrdup(pc.normalized_path);
+ posix_path = cstrdup(pc.posix_path);
if (pc.wide_path)
{
wide_path = cwcsdup (uni_path.Buffer);
@@ -332,7 +339,7 @@ class path_conv
path_conv &operator << (const path_conv& pc)
{
const char *save_path;
- const char *save_normalized_path;
+ const char *save_posix_path;
if (!path)
save_path = pc.path;
else
@@ -340,19 +347,19 @@ class path_conv
save_path = (char *) alloca (strlen (path) + 1);
strcpy ((char *) save_path, path);
}
- if (!normalized_path)
- save_normalized_path = pc.normalized_path;
+ if (!posix_path)
+ save_posix_path = pc.posix_path;
else
{
- save_normalized_path = (char *) alloca (strlen (normalized_path) + 1);
- strcpy ((char *) save_normalized_path, path);
+ save_posix_path = (char *) alloca (strlen (posix_path) + 1);
+ strcpy ((char *) save_posix_path, path);
}
- return eq_worker (pc, save_path, save_normalized_path);
+ return eq_worker (pc, save_path, save_posix_path);
}
path_conv &operator =(const path_conv& pc)
{
- return eq_worker (pc, pc.path, pc.normalized_path);
+ return eq_worker (pc, pc.path, pc.posix_path);
}
dev_t get_device () {return dev.get_device ();}
DWORD file_attributes () const {return fileattr;}
@@ -372,6 +379,7 @@ class path_conv
bool fs_is_nwfs () const {return fs.is_nwfs ();}
bool fs_is_ncfsd () const {return fs.is_ncfsd ();}
bool fs_is_afs () const {return fs.is_afs ();}
+ bool fs_is_prlfs () const {return fs.is_prlfs ();}
fs_info_type fs_type () const {return fs.what_fs ();}
ULONG fs_serial_number () const {return fs.serial_number ();}
inline const char *set_path (const char *p)
@@ -385,16 +393,19 @@ class path_conv
bool is_binary ();
HANDLE handle () const { return conv_handle.handle (); }
- struct _FILE_NETWORK_OPEN_INFORMATION *fnoi () { return conv_handle.fnoi (); }
+ PFILE_ALL_INFORMATION fai () { return conv_handle.fai (); }
struct fattr3 *nfsattr () { return conv_handle.nfsattr (); }
+ inline NTSTATUS get_finfo (HANDLE h)
+ {
+ return conv_handle.get_finfo (h, fs.is_nfs ());
+ }
+ inline ino_t get_ino () const { return conv_handle.get_ino (fs.is_nfs ()); }
void reset_conv_handle () { conv_handle.set (NULL); }
void close_conv_handle () { conv_handle.close (); }
ino_t get_ino_by_handle (HANDLE h);
-#if 0 /* obsolete, method still exists in fhandler_disk_file.cc */
- unsigned __stdcall ndisk_links (DWORD);
-#endif
- void __reg2 set_normalized_path (const char *);
+ inline const char *get_posix () const { return posix_path; }
+ void __reg2 set_posix (const char *);
DWORD get_symlink_length () { return symlink_length; };
private:
char *modifiable_path () {return (char *) path;}
@@ -413,12 +424,11 @@ enum fe_types
{
FE_NADA = 0, /* Nothing special */
FE_NNF = 1, /* Return NULL if not found */
- FE_NATIVE = 2, /* Return native path in path_conv struct */
FE_CWD = 4, /* Search CWD for program */
FE_DLL = 8 /* Search for DLLs, not executables. */
};
const char *__reg3 find_exec (const char *name, path_conv& buf,
- const char *winenv = "PATH=",
+ const char *search = "PATH",
unsigned opt = FE_NADA,
const char **known_suffix = NULL);
@@ -442,26 +452,9 @@ bool __reg2 has_dot_last_component (const char *dir, bool test_dot_dot);
int __reg3 path_prefix_p (const char *path1, const char *path2, int len1,
bool caseinsensitive);
-NTSTATUS file_get_fnoi (HANDLE, bool, struct _FILE_NETWORK_OPEN_INFORMATION *);
int normalize_win32_path (const char *, char *, char *&);
int normalize_posix_path (const char *, char *, char *&);
PUNICODE_STRING __reg3 get_nt_native_path (const char *, UNICODE_STRING&, bool);
-/* FIXME: Move to own include file eventually */
-
-#define MAX_ETC_FILES 2
-class etc
-{
- friend class dtable;
- static int curr_ix;
- static bool change_possible[MAX_ETC_FILES + 1];
- static OBJECT_ATTRIBUTES fn[MAX_ETC_FILES + 1];
- static LARGE_INTEGER last_modified[MAX_ETC_FILES + 1];
- static bool dir_changed (int);
- static int init (int, POBJECT_ATTRIBUTES);
- static bool file_changed (int);
- static bool test_file_change (int);
- friend class pwdgrp;
-};
-
int __reg3 symlink_worker (const char *, const char *, bool);
+const char *get_cmd_exe_path();
diff --git a/winsup/cygwin/perprocess.h b/winsup/cygwin/perprocess.h
index 13cf17716..b524ab9db 100644
--- a/winsup/cygwin/perprocess.h
+++ b/winsup/cygwin/perprocess.h
@@ -1,7 +1,5 @@
/* per_process.h: main Cygwin header file.
- Copyright 2000, 2001, 2013 Red Hat, Inc.
-
This file is part of Cygwin.
This software is a copyrighted work licensed under the terms of the
diff --git a/winsup/cygwin/pinfo.cc b/winsup/cygwin/pinfo.cc
index 51d01322c..8e2be3227 100644
--- a/winsup/cygwin/pinfo.cc
+++ b/winsup/cygwin/pinfo.cc
@@ -1,8 +1,5 @@
/* pinfo.cc: process table support
- Copyright 1996, 1997, 1998, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007,
- 2008, 2009, 2010, 2011, 2012, 2013 Red Hat, Inc.
-
This file is part of Cygwin.
This software is a copyrighted work licensed under the terms of the
@@ -38,10 +35,12 @@ public:
pinfo_basic::pinfo_basic ()
{
pid = dwProcessId = GetCurrentProcessId ();
- GetModuleFileNameW (NULL, progname, sizeof (progname));
+ PWCHAR pend = wcpncpy (progname, global_progname,
+ sizeof (progname) / sizeof (WCHAR) - 1);
+ *pend = L'\0';
/* Default uid/gid are needed very early to initialize shared user info. */
uid = ILLEGAL_UID;
- gid = UNKNOWN_GID;
+ gid = ILLEGAL_GID;
}
pinfo_basic myself_initial NO_COPY;
@@ -56,26 +55,29 @@ pinfo::thisproc (HANDLE h)
{
procinfo = NULL;
+ DWORD flags = PID_IN_USE | PID_ACTIVE;
if (!h)
- cygheap->pid = cygwin_pid (myself_initial.pid);
+ {
+ h = INVALID_HANDLE_VALUE;
+ cygheap->pid = cygwin_pid (myself_initial.pid);
+ flags |= PID_NEW;
+ }
- init (cygheap->pid, PID_IN_USE, h ?: INVALID_HANDLE_VALUE);
+ init (cygheap->pid, flags, h);
procinfo->process_state |= PID_IN_USE;
procinfo->dwProcessId = myself_initial.pid;
procinfo->sendsig = myself_initial.sendsig;
wcscpy (procinfo->progname, myself_initial.progname);
debug_printf ("myself dwProcessId %u", procinfo->dwProcessId);
- if (h)
+ if (h != INVALID_HANDLE_VALUE)
{
/* here if execed */
static pinfo NO_COPY myself_identity;
myself_identity.init (cygwin_pid (procinfo->dwProcessId), PID_EXECED, NULL);
procinfo->exec_sendsig = NULL;
procinfo->exec_dwProcessId = 0;
+ myself_identity->ppid = procinfo->pid;
}
- else if (!child_proc_info) /* child_proc_info is only set when this process
- was started by another cygwin process */
- procinfo->start_time = time (NULL); /* Register our starting time. */
}
/* Initialize the process table entry for the current task.
@@ -94,20 +96,20 @@ pinfo_init (char **envp, int envc)
/* Invent our own pid. */
myself.thisproc (NULL);
- myself->ppid = 1;
myself->pgid = myself->sid = myself->pid;
myself->ctty = -1;
myself->uid = ILLEGAL_UID;
- myself->gid = UNKNOWN_GID;
+ myself->gid = ILLEGAL_GID;
environ_init (NULL, 0); /* call after myself has been set up */
myself->nice = winprio_to_nice (GetPriorityClass (GetCurrentProcess ()));
+ myself->ppid = 1; /* always set last */
debug_printf ("Set nice to %d", myself->nice);
}
myself->process_state |= PID_ACTIVE;
myself->process_state &= ~(PID_INITIALIZING | PID_EXITED | PID_REAPED);
myself.preserve ();
- debug_printf ("pid %d, pgid %d", myself->pid, myself->pgid);
+ debug_printf ("pid %d, pgid %d, process_state %y", myself->pid, myself->pgid, myself->process_state);
}
DWORD
@@ -117,20 +119,18 @@ pinfo::status_exit (DWORD x)
{
case STATUS_DLL_NOT_FOUND:
{
- char posix_prog[NT_MAX_PATH];
path_conv pc;
if (!procinfo)
- pc.check ("/dev/null");
+ pc.check ("/dev/null", PC_NOWARN | PC_POSIX);
else
{
UNICODE_STRING uc;
RtlInitUnicodeString(&uc, procinfo->progname);
- pc.check (&uc, PC_NOWARN);
+ pc.check (&uc, PC_NOWARN | PC_POSIX);
}
- mount_table->conv_to_posix_path (pc.get_win32 (), posix_prog, 1);
small_printf ("%s: error while loading shared libraries: %s: cannot "
"open shared object file: No such file or directory\n",
- posix_prog, find_first_notloaded_dll (pc));
+ pc.get_posix (), find_first_notloaded_dll (pc));
x = 127 << 8;
}
break;
@@ -314,11 +314,12 @@ pinfo::init (pid_t n, DWORD flag, HANDLE h0)
/* Detect situation where a transitional memory block is being retrieved.
If the block has been allocated with PINFO_REDIR_SIZE but not yet
updated with a PID_EXECED state then we'll retry. */
- MEMORY_BASIC_INFORMATION mbi;
- if (!created && procinfo->exists ()
- && VirtualQuery (procinfo, &mbi, sizeof (mbi))
- && mbi.RegionSize < sizeof (_pinfo))
- goto loop;
+ if (!created && !(flag & PID_NEW))
+ /* If not populated, wait 2 seconds for procinfo to become populated.
+ Would like to wait with finer granularity but that is not easily
+ doable. */
+ for (int i = 0; i < 200 && !procinfo->ppid; i++)
+ Sleep (10);
if (!created && createit && (procinfo->process_state & PID_REAPED))
{
@@ -360,6 +361,8 @@ pinfo::init (pid_t n, DWORD flag, HANDLE h0)
goto loop;
}
+ if (flag & PID_NEW)
+ procinfo->start_time = time (NULL);
if (!created)
/* nothing */;
else if (!(flag & PID_EXECED))
@@ -456,7 +459,7 @@ _pinfo::set_ctty (fhandler_termios *fh, int flags)
{
tty_min& tc = *fh->tc ();
debug_printf ("old %s, ctty device number %y, tc.ntty device number %y flags & O_NOCTTY %y", __ctty (), ctty, tc.ntty, flags & O_NOCTTY);
- if (fh && &tc && (ctty <= 0 || ctty == tc.ntty) && !(flags & O_NOCTTY))
+ if (fh && (ctty <= 0 || ctty == tc.ntty) && !(flags & O_NOCTTY))
{
ctty = tc.ntty;
if (cygheap->ctty != fh->archetype)
@@ -616,11 +619,11 @@ commune_process (void *arg)
case PICOM_PIPE_FHANDLER:
{
sigproc_printf ("processing PICOM_FDS");
- HANDLE hdl = si._si_commune._si_pipe_fhandler;
+ int64_t unique_id = si._si_commune._si_pipe_unique_id;
unsigned int n = 0;
cygheap_fdenum cfd;
while (cfd.next () >= 0)
- if (cfd->get_handle () == hdl)
+ if (cfd->get_unique_id () == unique_id)
{
fhandler_pipe *fh = cfd;
n = sizeof *fh;
@@ -684,13 +687,18 @@ _pinfo::commune_request (__uint32_t code, ...)
set_errno (ESRCH);
goto err;
}
+ if (ISSTATE (this, PID_NOTCYGWIN))
+ {
+ set_errno (ENOTSUP);
+ goto err;
+ }
va_start (args, code);
si._si_commune._si_code = code;
switch (code)
{
case PICOM_PIPE_FHANDLER:
- si._si_commune._si_pipe_fhandler = va_arg (args, HANDLE);
+ si._si_commune._si_pipe_unique_id = va_arg (args, int64_t);
break;
case PICOM_FD:
@@ -770,13 +778,13 @@ out:
}
fhandler_pipe *
-_pinfo::pipe_fhandler (HANDLE hdl, size_t &n)
+_pinfo::pipe_fhandler (int64_t unique_id, size_t &n)
{
if (!this || !pid)
return NULL;
if (pid == myself->pid)
return NULL;
- commune_result cr = commune_request (PICOM_PIPE_FHANDLER, hdl);
+ commune_result cr = commune_request (PICOM_PIPE_FHANDLER, unique_id);
n = cr.n;
return (fhandler_pipe *) cr.s;
}
@@ -839,7 +847,7 @@ _pinfo::root (size_t& n)
char *s;
if (!this || !pid)
return NULL;
- if (pid != myself->pid)
+ if (pid != myself->pid && !ISSTATE (this, PID_NOTCYGWIN))
{
commune_result cr = commune_request (PICOM_ROOT);
s = cr.s;
@@ -856,13 +864,60 @@ _pinfo::root (size_t& n)
return s;
}
+static HANDLE
+open_commune_proc_parms (DWORD pid, PRTL_USER_PROCESS_PARAMETERS prupp)
+{
+ HANDLE proc;
+ NTSTATUS status;
+ PROCESS_BASIC_INFORMATION pbi;
+ PEB lpeb;
+
+ proc = OpenProcess (PROCESS_QUERY_INFORMATION | PROCESS_VM_READ, FALSE, pid);
+ if (!proc)
+ return NULL;
+ status = NtQueryInformationProcess (proc, ProcessBasicInformation,
+ &pbi, sizeof pbi, NULL);
+ if (NT_SUCCESS (status)
+ && ReadProcessMemory (proc, pbi.PebBaseAddress, &lpeb, sizeof lpeb, NULL)
+ && ReadProcessMemory (proc, lpeb.ProcessParameters, prupp, sizeof *prupp,
+ NULL))
+ return proc;
+ NtClose (proc);
+ return NULL;
+}
+
char *
_pinfo::cwd (size_t& n)
{
- char *s;
+ char *s = NULL;
if (!this || !pid)
return NULL;
- if (pid != myself->pid)
+ if (ISSTATE (this, PID_NOTCYGWIN))
+ {
+ RTL_USER_PROCESS_PARAMETERS rupp;
+ HANDLE proc = open_commune_proc_parms (dwProcessId, &rupp);
+
+ n = 0;
+ if (!proc)
+ return NULL;
+
+ tmp_pathbuf tp;
+ PWCHAR cwd = tp.w_get ();
+
+ if (ReadProcessMemory (proc, rupp.CurrentDirectoryName.Buffer,
+ cwd, rupp.CurrentDirectoryName.Length,
+ NULL))
+ {
+ /* Drop trailing backslash, add trailing \0 in passing. */
+ cwd[rupp.CurrentDirectoryName.Length / sizeof (WCHAR) - 1]
+ = L'\0';
+ s = (char *) cmalloc_abort (HEAP_COMMUNE, NT_MAX_PATH);
+ mount_table->conv_to_posix_path (cwd, s, 0);
+ n = strlen (s) + 1;
+ }
+ NtClose (proc);
+ }
+ else if (pid != myself->pid)
{
commune_result cr = commune_request (PICOM_CWD);
s = cr.s;
@@ -880,10 +935,41 @@ _pinfo::cwd (size_t& n)
char *
_pinfo::cmdline (size_t& n)
{
- char *s;
+ char *s = NULL;
if (!this || !pid)
return NULL;
- if (pid != myself->pid)
+ if (ISSTATE (this, PID_NOTCYGWIN))
+ {
+ RTL_USER_PROCESS_PARAMETERS rupp;
+ HANDLE proc = open_commune_proc_parms (dwProcessId, &rupp);
+
+ n = 0;
+ if (!proc)
+ return NULL;
+
+ tmp_pathbuf tp;
+ PWCHAR cmdline = tp.w_get ();
+
+ if (ReadProcessMemory (proc, rupp.CommandLine.Buffer, cmdline,
+ rupp.CommandLine.Length, NULL))
+ {
+ /* Add trailing \0. */
+ cmdline[rupp.CommandLine.Length / sizeof (WCHAR)]
+ = L'\0';
+ n = sys_wcstombs_alloc (&s, HEAP_COMMUNE, cmdline,
+ rupp.CommandLine.Length
+ / sizeof (WCHAR));
+ /* Quotes & Spaces post-processing. */
+ bool in_quote = false;
+ for (char *c = s; *c; ++c)
+ if (*c == '"')
+ in_quote = !in_quote;
+ else if (*c == ' ' && !in_quote)
+ *c = '\0';
+ }
+ NtClose (proc);
+ }
+ else if (pid != myself->pid)
{
commune_result cr = commune_request (PICOM_CMDLINE);
s = cr.s;
@@ -1112,19 +1198,23 @@ cygwin_winpid_to_pid (int winpid)
#define size_pinfolist(i) (sizeof (pinfolist[0]) * ((i) + 1))
class _onreturn
{
- HANDLE *h;
+ HANDLE h;
public:
~_onreturn ()
{
- if (h && *h)
+ if (h)
{
- CloseHandle (*h);
- *h = NULL;
- h = NULL;
+ CloseHandle (h);
}
}
- void no_close_p_handle () {h = NULL;}
- _onreturn (HANDLE& _h): h (&_h) {}
+ void no_close_handle (pinfo& p)
+ {
+ p.hProcess = h;
+ h = NULL;
+ }
+ _onreturn (): h (NULL) {}
+ void operator = (HANDLE h0) {h = h0;}
+ operator HANDLE () const {return h;}
};
inline void
@@ -1139,27 +1229,35 @@ winpids::add (DWORD& nelem, bool winpid, DWORD pid)
pinfolist = (pinfo *) realloc (pinfolist, size_pinfolist (npidlist + 1));
}
+ _onreturn onreturn;
pinfo& p = pinfolist[nelem];
memset (&p, 0, sizeof (p));
- /* Open a process to prevent a subsequent exit from invalidating the
- shared memory region. */
- p.hProcess = OpenProcess (PROCESS_QUERY_INFORMATION, false, pid);
- _onreturn onreturn (p.hProcess);
-
- /* If we couldn't open the process then we don't have rights to it and should
- make a copy of the shared memory area if it exists (it may not). */
bool perform_copy;
- if (!p.hProcess)
- perform_copy = true;
+ if (cygpid == myself->pid)
+ {
+ p = myself;
+ perform_copy = false;
+ }
else
- perform_copy = make_copy;
+ {
+ /* Open a process to prevent a subsequent exit from invalidating the
+ shared memory region. */
+ onreturn = OpenProcess (PROCESS_QUERY_INFORMATION, false, pid);
- p.init (cygpid, PID_NOREDIR | pinfo_access, NULL);
+ /* If we couldn't open the process then we don't have rights to it and should
+ make a copy of the shared memory area when it exists (it may not). */
+ perform_copy = onreturn ? make_copy : true;
+
+ p.init (cygpid, PID_NOREDIR | pinfo_access, NULL);
+ }
/* If we're just looking for winpids then don't do any special cygwin "stuff* */
if (winpid)
- goto out;
+ {
+ perform_copy = true;
+ goto out;
+ }
/* !p means that we couldn't find shared memory for this pid. Probably means
that it isn't a cygwin process. */
@@ -1170,7 +1268,7 @@ winpids::add (DWORD& nelem, bool winpid, DWORD pid)
p.init (cygpid, PID_NOREDIR, NULL);
if (!p)
return;
- }
+ }
/* Scan list of previously recorded pids to make sure that this pid hasn't
shown up before. This can happen when a process execs. */
@@ -1212,18 +1310,20 @@ out:
/* handle specially. Close the handle but (eventually) don't
deallocate procinfo in release call */;
else if (!perform_copy)
- onreturn.no_close_p_handle (); /* Don't close the handle until release */
+ onreturn.no_close_handle (p); /* Don't close the handle until release */
else
{
_pinfo *pnew = (_pinfo *) malloc (sizeof (*p.procinfo));
if (!pnew)
- onreturn.no_close_p_handle ();
+ onreturn.no_close_handle (p);
else
{
*pnew = *p.procinfo;
p.release ();
p.procinfo = pnew;
p.destroy = false;
+ if (winpid)
+ p->dwProcessId = pid;
}
}
}
@@ -1235,76 +1335,51 @@ DWORD
winpids::enum_processes (bool winpid)
{
DWORD nelem = 0;
- DWORD cygwin_pid_nelem = 0;
- NTSTATUS status;
- ULONG context;
- struct fdbi
- {
- DIRECTORY_BASIC_INFORMATION dbi;
- WCHAR buf[2][NAME_MAX + 1];
- } f;
- HANDLE dir = get_shared_parent_dir ();
- BOOLEAN restart = TRUE;
- do
+ if (!winpid)
{
- status = NtQueryDirectoryObject (dir, &f, sizeof f, TRUE, restart,
- &context, NULL);
- if (NT_SUCCESS (status))
+ HANDLE dir = get_shared_parent_dir ();
+ BOOLEAN restart = TRUE;
+ ULONG context;
+ struct fdbi
+ {
+ DIRECTORY_BASIC_INFORMATION dbi;
+ WCHAR buf[2][NAME_MAX + 1];
+ } f;
+ while (NT_SUCCESS (NtQueryDirectoryObject (dir, &f, sizeof f, TRUE,
+ restart, &context, NULL)))
{
restart = FALSE;
- f.dbi.ObjectName.Buffer[f.dbi.ObjectName.Length / sizeof (WCHAR)]
- = L'\0';
+ f.dbi.ObjectName.Buffer[f.dbi.ObjectName.Length / sizeof (WCHAR)] = L'\0';
if (wcsncmp (f.dbi.ObjectName.Buffer, L"cygpid.", 7) == 0)
{
- DWORD pid = wcstoul (f.dbi.ObjectName.Buffer + 7, NULL, 10);
- add (nelem, false, pid);
- }
+ DWORD pid = wcstoul (f.dbi.ObjectName.Buffer + 7, NULL, 10);
+ add (nelem, false, pid);
+ }
}
}
- while (NT_SUCCESS (status));
- cygwin_pid_nelem = nelem;
-
- if (winpid)
+ else
{
static DWORD szprocs;
static PSYSTEM_PROCESS_INFORMATION procs;
- if (!szprocs)
+ while (1)
{
- procs = (PSYSTEM_PROCESS_INFORMATION)
- malloc (sizeof (*procs) + (szprocs = 200 * sizeof (*procs)));
- if (!procs)
+ PSYSTEM_PROCESS_INFORMATION new_p = (PSYSTEM_PROCESS_INFORMATION)
+ realloc (procs, szprocs += 200 * sizeof (*procs));
+ if (!new_p)
{
system_printf ("out of memory reading system process "
"information");
return 0;
}
- }
-
- for (;;)
- {
- status =
- NtQuerySystemInformation (SystemProcessInformation,
- procs, szprocs, NULL);
+ procs = new_p;
+ NTSTATUS status = NtQuerySystemInformation (SystemProcessInformation,
+ procs, szprocs, NULL);
if (NT_SUCCESS (status))
break;
- if (status == STATUS_INFO_LENGTH_MISMATCH)
- {
- PSYSTEM_PROCESS_INFORMATION new_p;
-
- new_p = (PSYSTEM_PROCESS_INFORMATION)
- realloc (procs, szprocs += 200 * sizeof (*procs));
- if (!new_p)
- {
- system_printf ("out of memory reading system process "
- "information");
- return 0;
- }
- procs = new_p;
- }
- else
+ if (status != STATUS_INFO_LENGTH_MISMATCH)
{
system_printf ("error %y reading system process information",
status);
@@ -1313,37 +1388,24 @@ winpids::enum_processes (bool winpid)
}
PSYSTEM_PROCESS_INFORMATION px = procs;
- for (;;)
+ while (1)
{
if (px->UniqueProcessId)
- {
- bool do_add = true;
- for (unsigned i = 0; i < cygwin_pid_nelem; ++i)
- if (pidlist[i] == (uintptr_t) px->UniqueProcessId)
- {
- do_add = false;
- break;
- }
- if (do_add)
- add (nelem, true, (DWORD) (uintptr_t) px->UniqueProcessId);
- }
+ add (nelem, true, (DWORD) (uintptr_t) px->UniqueProcessId);
if (!px->NextEntryOffset)
break;
- px = (PSYSTEM_PROCESS_INFORMATION) ((char *) px + px->NextEntryOffset);
+ px = (PSYSTEM_PROCESS_INFORMATION) ((char *) px + px->NextEntryOffset);
}
}
-
return nelem;
}
void
winpids::set (bool winpid)
{
- __malloc_lock ();
npids = enum_processes (winpid);
if (pidlist)
pidlist[npids] = 0;
- __malloc_unlock ();
}
DWORD
diff --git a/winsup/cygwin/pinfo.h b/winsup/cygwin/pinfo.h
index 0a13c4bf8..fd76c8d6b 100644
--- a/winsup/cygwin/pinfo.h
+++ b/winsup/cygwin/pinfo.h
@@ -1,8 +1,5 @@
/* pinfo.h: process table info
- Copyright 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
- 2011, 2012, 2013 Red Hat, Inc.
-
This file is part of Cygwin.
This software is a copyrighted work licensed under the terms of the
@@ -50,6 +47,8 @@ public:
constants in <sys/cygwin.h>. */
DWORD process_state;
+ pid_t ppid; /* Parent process id. */
+
DWORD exitcode; /* set when process exits */
#define PINFO_REDIR_SIZE ((char *) &myself.procinfo->exitcode - (char *) myself.procinfo)
@@ -57,9 +56,6 @@ public:
/* > 0 if started by a cygwin process */
DWORD cygstarted;
- /* Parent process id. */
- pid_t ppid;
-
/* dwProcessId contains the processid used for sending signals. It
will be reset in a child process when it is capable of receiving
signals. */
@@ -104,7 +100,7 @@ public:
commune_result commune_request (__uint32_t, ...);
bool alive ();
- fhandler_pipe *pipe_fhandler (HANDLE, size_t &);
+ fhandler_pipe *pipe_fhandler (int64_t, size_t &);
char *fd (int fd, size_t &);
char *fds (size_t &);
char *root (size_t &);
diff --git a/winsup/cygwin/pipe.cc b/winsup/cygwin/pipe.cc
index 9159dddb0..4ccfef69c 100644
--- a/winsup/cygwin/pipe.cc
+++ b/winsup/cygwin/pipe.cc
@@ -1,7 +1,7 @@
/* pipe.cc: pipe for Cygwin.
Copyright 1996, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007,
- 2008, 2009, 2010, 2011, 2012, 2013 Hat, Inc.
+ 2008, 2009, 2010, 2011, 2012, 2013, 2015 Hat, Inc.
This file is part of Cygwin.
@@ -31,7 +31,7 @@ fhandler_pipe::fhandler_pipe ()
}
int
-fhandler_pipe::init (HANDLE f, DWORD a, mode_t mode)
+fhandler_pipe::init (HANDLE f, DWORD a, mode_t mode, int64_t uniq_id)
{
/* FIXME: Have to clean this up someday
FIXME: Do we have to check for both !get_win32_name() and
@@ -54,6 +54,8 @@ fhandler_pipe::init (HANDLE f, DWORD a, mode_t mode)
a &= ~FILE_CREATE_PIPE_INSTANCE;
fhandler_base::init (f, a, mode);
close_on_exec (mode & O_CLOEXEC);
+ set_ino (uniq_id);
+ set_unique_id (uniq_id | !!(mode & GENERIC_WRITE));
if (opened_properly)
setup_overlapped ();
else
@@ -66,27 +68,33 @@ extern "C" int sscanf (const char *, const char *, ...);
int
fhandler_pipe::open (int flags, mode_t mode)
{
- HANDLE proc, pipe_hdl, nio_hdl = NULL;
- fhandler_pipe *fh = NULL;
+ HANDLE proc, nio_hdl = NULL;
+ int64_t uniq_id;
+ fhandler_pipe *fh = NULL, *fhr = NULL, *fhw = NULL;
size_t size;
int pid, rwflags = (flags & O_ACCMODE);
bool inh;
+ bool got_one = false;
- sscanf (get_name (), "/proc/%d/fd/pipe:[%lu]",
- &pid, (unsigned long *) &pipe_hdl);
+ sscanf (get_name (), "/proc/%d/fd/pipe:[%lld]",
+ &pid, (long long *) &uniq_id);
if (pid == myself->pid)
{
cygheap_fdenum cfd (true);
while (cfd.next () >= 0)
{
- if (cfd->get_handle () != pipe_hdl)
+ /* Windows doesn't allow to copy a pipe HANDLE with another access
+ mode. So we check for read and write side of pipe and try to
+ find the one matching the requested access mode. */
+ if (cfd->get_unique_id () == uniq_id)
+ got_one = true;
+ else if (cfd->get_unique_id () == uniq_id + 1)
+ got_one = true;
+ else
continue;
if ((rwflags == O_RDONLY && !(cfd->get_access () & GENERIC_READ))
|| (rwflags == O_WRONLY && !(cfd->get_access () & GENERIC_WRITE)))
- {
- set_errno (EACCES);
- return 0;
- }
+ continue;
cfd->copyto (this);
set_io_handle (NULL);
pc.reset_conv_handle ();
@@ -94,7 +102,9 @@ fhandler_pipe::open (int flags, mode_t mode)
return 1;
return 0;
}
- set_errno (ENOENT);
+ /* Found the pipe but access mode didn't match? EACCES.
+ Otherwise ENOENT */
+ set_errno (got_one ? EACCES : ENOENT);
return 0;
}
@@ -109,27 +119,31 @@ fhandler_pipe::open (int flags, mode_t mode)
__seterrno ();
return 0;
}
- if (!(fh = p->pipe_fhandler (pipe_hdl, size)) || !size)
+ fhr = p->pipe_fhandler (uniq_id, size);
+ if (fhr && rwflags == O_RDONLY)
+ fh = fhr;
+ else
{
- set_errno (ENOENT);
- goto out;
+ fhw = p->pipe_fhandler (uniq_id + 1, size);
+ if (fhw && rwflags == O_WRONLY)
+ fh = fhw;
}
- /* Too bad, but Windows only allows the same access mode when dup'ing
- the pipe. */
- if ((rwflags == O_RDONLY && !(fh->get_access () & GENERIC_READ))
- || (rwflags == O_WRONLY && !(fh->get_access () & GENERIC_WRITE)))
+ if (!fh)
{
- set_errno (EACCES);
+ /* Too bad, but Windows only allows the same access mode when dup'ing
+ the pipe. */
+ set_errno (fhr || fhw ? EACCES : ENOENT);
goto out;
}
inh = !(flags & O_CLOEXEC);
- if (!DuplicateHandle (proc, pipe_hdl, GetCurrentProcess (), &nio_hdl,
- 0, inh, DUPLICATE_SAME_ACCESS))
+ if (!DuplicateHandle (proc, fh->get_handle (), GetCurrentProcess (),
+ &nio_hdl, 0, inh, DUPLICATE_SAME_ACCESS))
{
__seterrno ();
goto out;
}
- init (nio_hdl, fh->get_access (), mode & O_TEXT ?: O_BINARY);
+ init (nio_hdl, fh->get_access (), mode & O_TEXT ?: O_BINARY,
+ fh->get_plain_ino ());
cfree (fh);
CloseHandle (proc);
return 1;
@@ -168,7 +182,7 @@ fhandler_pipe::ftruncate (off_t length, bool allow_truncate)
char *
fhandler_pipe::get_proc_fd_name (char *buf)
{
- __small_sprintf (buf, "pipe:[%lu]", get_handle ());
+ __small_sprintf (buf, "pipe:[%D]", get_plain_ino ());
return buf;
}
@@ -199,7 +213,8 @@ fhandler_pipe::dup (fhandler_base *child, int flags)
unlike CreatePipe, which returns a bool for success or failure. */
DWORD
fhandler_pipe::create (LPSECURITY_ATTRIBUTES sa_ptr, PHANDLE r, PHANDLE w,
- DWORD psize, const char *name, DWORD open_mode)
+ DWORD psize, const char *name, DWORD open_mode,
+ int64_t *unique_id)
{
/* Default to error. */
if (r)
@@ -241,8 +256,12 @@ fhandler_pipe::create (LPSECURITY_ATTRIBUTES sa_ptr, PHANDLE r, PHANDLE w,
{
static volatile ULONG pipe_unique_id;
if (!name)
- __small_sprintf (pipename + len, "pipe-%p",
- InterlockedIncrement ((LONG *) &pipe_unique_id));
+ {
+ LONG id = InterlockedIncrement ((LONG *) &pipe_unique_id);
+ __small_sprintf (pipename + len, "pipe-%p", id);
+ if (unique_id)
+ *unique_id = ((int64_t) id << 32 | GetCurrentProcessId ());
+ }
debug_printf ("name %s, size %u, mode %s", pipename, psize,
(pipe_mode & PIPE_TYPE_MESSAGE)
@@ -341,8 +360,9 @@ fhandler_pipe::create (fhandler_pipe *fhs[2], unsigned psize, int mode)
HANDLE r, w;
SECURITY_ATTRIBUTES *sa = sec_none_cloexec (mode);
int res = -1;
+ int64_t unique_id;
- int ret = create (sa, &r, &w, psize, NULL, FILE_FLAG_OVERLAPPED);
+ int ret = create (sa, &r, &w, psize, NULL, FILE_FLAG_OVERLAPPED, &unique_id);
if (ret)
__seterrno_from_win_error (ret);
else if ((fhs[0] = (fhandler_pipe *) build_fh_dev (*piper_dev)) == NULL)
@@ -358,8 +378,10 @@ fhandler_pipe::create (fhandler_pipe *fhs[2], unsigned psize, int mode)
else
{
mode |= mode & O_TEXT ?: O_BINARY;
- fhs[0]->init (r, FILE_CREATE_PIPE_INSTANCE | GENERIC_READ, mode);
- fhs[1]->init (w, FILE_CREATE_PIPE_INSTANCE | GENERIC_WRITE, mode);
+ fhs[0]->init (r, FILE_CREATE_PIPE_INSTANCE | GENERIC_READ, mode,
+ unique_id);
+ fhs[1]->init (w, FILE_CREATE_PIPE_INSTANCE | GENERIC_WRITE, mode,
+ unique_id);
res = 0;
}
@@ -395,6 +417,20 @@ fhandler_pipe::ioctl (unsigned int cmd, void *p)
}
int __reg2
+fhandler_pipe::fstat (struct stat *buf)
+{
+ int ret = fhandler_base::fstat (buf);
+ if (!ret)
+ {
+ buf->st_dev = FH_PIPE;
+ if (!(buf->st_ino = get_plain_ino ()))
+ sscanf (get_name (), "/proc/%*d/fd/pipe:[%lld]",
+ (long long *) &buf->st_ino);
+ }
+ return ret;
+}
+
+int __reg2
fhandler_pipe::fstatvfs (struct statvfs *sfs)
{
set_errno (EBADF);
@@ -410,11 +446,11 @@ pipe_worker (int filedes[2], unsigned int psize, int mode)
{
cygheap_fdnew fdin;
cygheap_fdnew fdout (fdin, false);
- char buf[sizeof ("/dev/fd/pipe:[2147483647]")];
- __small_sprintf (buf, "/dev/fd/pipe:[%d]", (int) fdin);
- fhs[0]->pc.set_normalized_path (buf);
- __small_sprintf (buf, "pipe:[%d]", (int) fdout);
- fhs[1]->pc.set_normalized_path (buf);
+ char buf[sizeof ("/dev/fd/pipe:[9223372036854775807]")];
+ __small_sprintf (buf, "/dev/fd/pipe:[%D]", fhs[0]->get_plain_ino ());
+ fhs[0]->pc.set_posix (buf);
+ __small_sprintf (buf, "pipe:[%D]", fhs[1]->get_plain_ino ());
+ fhs[1]->pc.set_posix (buf);
fdin = fhs[0];
fdout = fhs[1];
filedes[0] = fdin;
diff --git a/winsup/cygwin/poll.cc b/winsup/cygwin/poll.cc
index 8ce4a28be..ea45b70ad 100644
--- a/winsup/cygwin/poll.cc
+++ b/winsup/cygwin/poll.cc
@@ -1,8 +1,5 @@
/* poll.cc. Implements poll(2) via usage of select(2) call.
- Copyright 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2011,
- 2012 Red Hat, Inc.
-
This file is part of Cygwin.
This software is a copyrighted work licensed under the terms of the
@@ -12,6 +9,7 @@
#define FD_SETSIZE 16384 // lots of fds
#include "winsup.h"
#include <sys/poll.h>
+#include <sys/param.h>
#include <stdlib.h>
#define USE_SYS_TYPES_FD_SET
#include "cygerrno.h"
@@ -21,6 +19,7 @@
#include "cygheap.h"
#include "pinfo.h"
#include "sigproc.h"
+#include "select.h"
extern "C" int
poll (struct pollfd *fds, nfds_t nfds, int timeout)
@@ -115,8 +114,9 @@ poll (struct pollfd *fds, nfds_t nfds, int timeout)
So it looks like there's actually no good reason to
return POLLERR. */
fds[i].revents |= POLLIN;
- /* Handle failed connect. */
- if (FD_ISSET(fds[i].fd, write_fds)
+ /* Handle failed connect. A failed connect implicitly sets
+ POLLOUT, if requested, but it doesn't set POLLIN. */
+ if ((fds[i].events & POLLIN)
&& (sock = cygheap->fdtab[fds[i].fd]->is_socket ())
&& sock->connect_state () == connect_failed)
fds[i].revents |= (POLLIN | POLLERR);
@@ -143,16 +143,19 @@ ppoll (struct pollfd *fds, nfds_t nfds, const struct timespec *timeout_ts,
int timeout;
sigset_t oldset = _my_tls.sigmask;
- myfault efault;
- if (efault.faulted (EFAULT))
- return -1;
- timeout = (timeout_ts == NULL)
- ? -1
- : (timeout_ts->tv_sec * 1000 + timeout_ts->tv_nsec / 1000000);
- if (sigmask)
- set_signal_mask (_my_tls.sigmask, *sigmask);
- int ret = poll (fds, nfds, timeout);
- if (sigmask)
- set_signal_mask (_my_tls.sigmask, oldset);
- return ret;
+ __try
+ {
+ timeout = (timeout_ts == NULL)
+ ? -1
+ : (timeout_ts->tv_sec * 1000 + timeout_ts->tv_nsec / 1000000);
+ if (sigmask)
+ set_signal_mask (_my_tls.sigmask, *sigmask);
+ int ret = poll (fds, nfds, timeout);
+ if (sigmask)
+ set_signal_mask (_my_tls.sigmask, oldset);
+ return ret;
+ }
+ __except (EFAULT) {}
+ __endtry
+ return -1;
}
diff --git a/winsup/cygwin/posix_ipc.cc b/winsup/cygwin/posix_ipc.cc
index be4a973a9..f5c4009ff 100644
--- a/winsup/cygwin/posix_ipc.cc
+++ b/winsup/cygwin/posix_ipc.cc
@@ -1,7 +1,5 @@
/* posix_ipc.cc: POSIX IPC API for Cygwin.
- Copyright 2007, 2008, 2009, 2010, 2011, 2012 Red Hat, Inc.
-
This file is part of Cygwin.
This software is a copyrighted work licensed under the terms of the
@@ -117,9 +115,10 @@ ipc_mutex_init (HANDLE *pmtx, const char *name)
}
static int
-ipc_mutex_lock (HANDLE mtx)
+ipc_mutex_lock (HANDLE mtx, bool eintr)
{
- switch (cygwait (mtx, cw_infinite, cw_sig_eintr | cw_cancel | cw_cancel_self))
+ switch (cygwait (mtx, cw_infinite, cw_cancel | cw_cancel_self
+ | (eintr ? cw_sig_eintr : cw_sig_restart)))
{
case WAIT_OBJECT_0:
case WAIT_ABANDONED_0:
@@ -177,7 +176,7 @@ ipc_cond_timedwait (HANDLE evt, HANDLE mtx, const struct timespec *abstime)
DWORD timer_idx = 0;
int ret = 0;
- set_signal_arrived here (w4[1]);
+ wait_signal_arrived here (w4[1]);
if ((w4[cnt] = pthread::get_cancel_event ()) != NULL)
++cnt;
if (abstime)
@@ -414,17 +413,17 @@ extern "C" void *mmap64 (void *, size_t, int, int, int, off_t);
extern "C" mqd_t
mq_open (const char *name, int oflag, ...)
{
- int i, fd = -1, nonblock, created;
+ int i, fd = -1, nonblock, created = 0;
long msgsize, index;
off_t filesize = 0;
va_list ap;
mode_t mode;
- int8_t *mptr;
+ int8_t *mptr = (int8_t *) MAP_FAILED;
struct stat statbuff;
struct mq_hdr *mqhdr;
struct msg_hdr *msghdr;
struct mq_attr *attr;
- struct mq_info *mqinfo;
+ struct mq_info *mqinfo = NULL;
LUID luid;
size_t len = strlen (name);
@@ -433,190 +432,198 @@ mq_open (const char *name, int oflag, ...)
if (!check_path (mqname, mqueue, name, len))
return (mqd_t) -1;
- myfault efault;
- if (efault.faulted (EFAULT))
- return (mqd_t) -1;
+ __try
+ {
+ oflag &= (O_CREAT | O_EXCL | O_NONBLOCK);
+ nonblock = oflag & O_NONBLOCK;
+ oflag &= ~O_NONBLOCK;
- oflag &= (O_CREAT | O_EXCL | O_NONBLOCK);
- created = 0;
- nonblock = oflag & O_NONBLOCK;
- oflag &= ~O_NONBLOCK;
- mptr = (int8_t *) MAP_FAILED;
- mqinfo = NULL;
+ again:
+ if (oflag & O_CREAT)
+ {
+ va_start (ap, oflag); /* init ap to final named argument */
+ mode = va_arg (ap, mode_t) & ~S_IXUSR;
+ attr = va_arg (ap, struct mq_attr *);
+ va_end (ap);
+
+ /* Open and specify O_EXCL and user-execute */
+ fd = open (mqname, oflag | O_EXCL | O_RDWR | O_CLOEXEC,
+ mode | S_IXUSR);
+ if (fd < 0)
+ {
+ if (errno == EEXIST && (oflag & O_EXCL) == 0)
+ goto exists; /* already exists, OK */
+ return (mqd_t) -1;
+ }
+ created = 1;
+ /* First one to create the file initializes it */
+ if (attr == NULL)
+ attr = &defattr;
+ /* Check minimum and maximum values. The max values are pretty much
+ arbitrary, taken from the linux mq_overview man page. However,
+ these max values make sure that the internal mq_fattr structure
+ can use 32 bit types. */
+ else if (attr->mq_maxmsg <= 0 || attr->mq_maxmsg > 32768
+ || attr->mq_msgsize <= 0 || attr->mq_msgsize > 1048576)
+ {
+ set_errno (EINVAL);
+ __leave;
+ }
+ /* Calculate and set the file size */
+ msgsize = MSGSIZE (attr->mq_msgsize);
+ filesize = sizeof (struct mq_hdr)
+ + (attr->mq_maxmsg * (sizeof (struct msg_hdr) + msgsize));
+ if (lseek64 (fd, filesize - 1, SEEK_SET) == -1)
+ __leave;
+ if (write (fd, "", 1) == -1)
+ __leave;
+
+ /* Memory map the file */
+ mptr = (int8_t *) mmap64 (NULL, (size_t) filesize,
+ PROT_READ | PROT_WRITE,
+ MAP_SHARED, fd, 0);
+ if (mptr == (int8_t *) MAP_FAILED)
+ __leave;
+
+ /* Allocate one mq_info{} for the queue */
+ if (!(mqinfo = (struct mq_info *)
+ calloc (1, sizeof (struct mq_info))))
+ __leave;
+ mqinfo->mqi_hdr = mqhdr = (struct mq_hdr *) mptr;
+ mqinfo->mqi_magic = MQI_MAGIC;
+ mqinfo->mqi_flags = nonblock;
+
+ /* Initialize header at beginning of file */
+ /* Create free list with all messages on it */
+ mqhdr->mqh_attr.mq_flags = 0;
+ mqhdr->mqh_attr.mq_maxmsg = attr->mq_maxmsg;
+ mqhdr->mqh_attr.mq_msgsize = attr->mq_msgsize;
+ mqhdr->mqh_attr.mq_curmsgs = 0;
+ mqhdr->mqh_nwait = 0;
+ mqhdr->mqh_pid = 0;
+ NtAllocateLocallyUniqueId (&luid);
+ __small_sprintf (mqhdr->mqh_uname, "%016X%08x%08x",
+ hash_path_name (0,mqname),
+ luid.HighPart, luid.LowPart);
+ mqhdr->mqh_head = 0;
+ mqhdr->mqh_magic = MQI_MAGIC;
+ index = sizeof (struct mq_hdr);
+ mqhdr->mqh_free = index;
+ for (i = 0; i < attr->mq_maxmsg - 1; i++)
+ {
+ msghdr = (struct msg_hdr *) &mptr[index];
+ index += sizeof (struct msg_hdr) + msgsize;
+ msghdr->msg_next = index;
+ }
+ msghdr = (struct msg_hdr *) &mptr[index];
+ msghdr->msg_next = 0; /* end of free list */
-again:
- if (oflag & O_CREAT)
- {
- va_start (ap, oflag); /* init ap to final named argument */
- mode = va_arg (ap, mode_t) & ~S_IXUSR;
- attr = va_arg (ap, struct mq_attr *);
- va_end (ap);
-
- /* Open and specify O_EXCL and user-execute */
- fd = open (mqname, oflag | O_EXCL | O_RDWR | O_CLOEXEC, mode | S_IXUSR);
- if (fd < 0)
+ /* Initialize mutex & condition variables */
+ i = ipc_mutex_init (&mqinfo->mqi_lock, mqhdr->mqh_uname);
+ if (i != 0)
+ {
+ set_errno (i);
+ __leave;
+ }
+ i = ipc_cond_init (&mqinfo->mqi_waitsend, mqhdr->mqh_uname, 'S');
+ if (i != 0)
+ {
+ set_errno (i);
+ __leave;
+ }
+ i = ipc_cond_init (&mqinfo->mqi_waitrecv, mqhdr->mqh_uname, 'R');
+ if (i != 0)
+ {
+ set_errno (i);
+ __leave;
+ }
+ /* Initialization complete, turn off user-execute bit */
+ if (fchmod (fd, mode) == -1)
+ __leave;
+ close (fd);
+ return ((mqd_t) mqinfo);
+ }
+
+ exists:
+ /* Open the file then memory map */
+ if ((fd = open (mqname, O_RDWR | O_CLOEXEC)) < 0)
{
- if (errno == EEXIST && (oflag & O_EXCL) == 0)
- goto exists; /* already exists, OK */
- return (mqd_t) -1;
+ if (errno == ENOENT && (oflag & O_CREAT))
+ goto again;
+ __leave;
}
- created = 1;
- /* First one to create the file initializes it */
- if (attr == NULL)
- attr = &defattr;
- /* Check minimum and maximum values. The max values are pretty much
- arbitrary, taken from the linux mq_overview man page. However,
- these max values make sure that the internal mq_fattr structure
- can use 32 bit types. */
- else if (attr->mq_maxmsg <= 0 || attr->mq_maxmsg > 32768
- || attr->mq_msgsize <= 0 || attr->mq_msgsize > 1048576)
+ /* Make certain initialization is complete */
+ for (i = 0; i < MAX_TRIES; i++)
{
- set_errno (EINVAL);
- goto err;
+ if (stat64 (mqname, &statbuff) == -1)
+ {
+ if (errno == ENOENT && (oflag & O_CREAT))
+ {
+ close (fd);
+ fd = -1;
+ goto again;
+ }
+ __leave;
+ }
+ if ((statbuff.st_mode & S_IXUSR) == 0)
+ break;
+ sleep (1);
+ }
+ if (i == MAX_TRIES)
+ {
+ set_errno (ETIMEDOUT);
+ __leave;
}
- /* Calculate and set the file size */
- msgsize = MSGSIZE (attr->mq_msgsize);
- filesize = sizeof (struct mq_hdr)
- + (attr->mq_maxmsg * (sizeof (struct msg_hdr) + msgsize));
- if (lseek64 (fd, filesize - 1, SEEK_SET) == -1)
- goto err;
- if (write (fd, "", 1) == -1)
- goto err;
- /* Memory map the file */
+ filesize = statbuff.st_size;
mptr = (int8_t *) mmap64 (NULL, (size_t) filesize, PROT_READ | PROT_WRITE,
MAP_SHARED, fd, 0);
if (mptr == (int8_t *) MAP_FAILED)
- goto err;
+ __leave;
+ close (fd);
+ fd = -1;
- /* Allocate one mq_info{} for the queue */
+ /* Allocate one mq_info{} for each open */
if (!(mqinfo = (struct mq_info *) calloc (1, sizeof (struct mq_info))))
- goto err;
+ __leave;
mqinfo->mqi_hdr = mqhdr = (struct mq_hdr *) mptr;
- mqinfo->mqi_magic = MQI_MAGIC;
- mqinfo->mqi_flags = nonblock;
-
- /* Initialize header at beginning of file */
- /* Create free list with all messages on it */
- mqhdr->mqh_attr.mq_flags = 0;
- mqhdr->mqh_attr.mq_maxmsg = attr->mq_maxmsg;
- mqhdr->mqh_attr.mq_msgsize = attr->mq_msgsize;
- mqhdr->mqh_attr.mq_curmsgs = 0;
- mqhdr->mqh_nwait = 0;
- mqhdr->mqh_pid = 0;
- NtAllocateLocallyUniqueId (&luid);
- __small_sprintf (mqhdr->mqh_uname, "%016X%08x%08x",
- hash_path_name (0,mqname),
- luid.HighPart, luid.LowPart);
- mqhdr->mqh_head = 0;
- mqhdr->mqh_magic = MQI_MAGIC;
- index = sizeof (struct mq_hdr);
- mqhdr->mqh_free = index;
- for (i = 0; i < attr->mq_maxmsg - 1; i++)
+ if (mqhdr->mqh_magic != MQI_MAGIC)
{
- msghdr = (struct msg_hdr *) &mptr[index];
- index += sizeof (struct msg_hdr) + msgsize;
- msghdr->msg_next = index;
+ system_printf (
+ "Old message queue \"%s\" detected!\n"
+ "This file is not usable as message queue anymore due to changes in the "
+ "internal file layout. Please remove the file and try again.", mqname);
+ set_errno (EACCES);
+ __leave;
}
- msghdr = (struct msg_hdr *) &mptr[index];
- msghdr->msg_next = 0; /* end of free list */
+ mqinfo->mqi_magic = MQI_MAGIC;
+ mqinfo->mqi_flags = nonblock;
- /* Initialize mutex & condition variables */
+ /* Initialize mutex & condition variable */
i = ipc_mutex_init (&mqinfo->mqi_lock, mqhdr->mqh_uname);
if (i != 0)
- goto pthreaderr;
-
+ {
+ set_errno (i);
+ __leave;
+ }
i = ipc_cond_init (&mqinfo->mqi_waitsend, mqhdr->mqh_uname, 'S');
if (i != 0)
- goto pthreaderr;
-
+ {
+ set_errno (i);
+ __leave;
+ }
i = ipc_cond_init (&mqinfo->mqi_waitrecv, mqhdr->mqh_uname, 'R');
if (i != 0)
- goto pthreaderr;
-
- /* Initialization complete, turn off user-execute bit */
- if (fchmod (fd, mode) == -1)
- goto err;
- close (fd);
- return ((mqd_t) mqinfo);
- }
-
-exists:
- /* Open the file then memory map */
- if ((fd = open (mqname, O_RDWR | O_CLOEXEC)) < 0)
- {
- if (errno == ENOENT && (oflag & O_CREAT))
- goto again;
- goto err;
- }
- /* Make certain initialization is complete */
- for (i = 0; i < MAX_TRIES; i++)
- {
- if (stat64 (mqname, &statbuff) == -1)
{
- if (errno == ENOENT && (oflag & O_CREAT))
- {
- close (fd);
- fd = -1;
- goto again;
- }
- goto err;
+ set_errno (i);
+ __leave;
}
- if ((statbuff.st_mode & S_IXUSR) == 0)
- break;
- sleep (1);
+ return (mqd_t) mqinfo;
}
- if (i == MAX_TRIES)
- {
- set_errno (ETIMEDOUT);
- goto err;
- }
-
- filesize = statbuff.st_size;
- mptr = (int8_t *) mmap64 (NULL, (size_t) filesize, PROT_READ | PROT_WRITE,
- MAP_SHARED, fd, 0);
- if (mptr == (int8_t *) MAP_FAILED)
- goto err;
- close (fd);
- fd = -1;
-
- /* Allocate one mq_info{} for each open */
- if (!(mqinfo = (struct mq_info *) calloc (1, sizeof (struct mq_info))))
- goto err;
- mqinfo->mqi_hdr = mqhdr = (struct mq_hdr *) mptr;
- if (mqhdr->mqh_magic != MQI_MAGIC)
- {
- system_printf (
-"Old message queue \"%s\" detected!\n"
-"This file is not usable as message queue anymore due to changes in the "
-"internal file layout. Please remove the file and try again.", mqname);
- set_errno (EACCES);
- goto err;
- }
- mqinfo->mqi_magic = MQI_MAGIC;
- mqinfo->mqi_flags = nonblock;
-
- /* Initialize mutex & condition variable */
- i = ipc_mutex_init (&mqinfo->mqi_lock, mqhdr->mqh_uname);
- if (i != 0)
- goto pthreaderr;
-
- i = ipc_cond_init (&mqinfo->mqi_waitsend, mqhdr->mqh_uname, 'S');
- if (i != 0)
- goto pthreaderr;
-
- i = ipc_cond_init (&mqinfo->mqi_waitrecv, mqhdr->mqh_uname, 'R');
- if (i != 0)
- goto pthreaderr;
-
- return (mqd_t) mqinfo;
-
-pthreaderr:
- errno = i;
-err:
+ __except (EFAULT) {}
+ __endtry
/* Don't let following function calls change errno */
save_errno save;
-
if (created)
unlink (mqname);
if (mptr != (int8_t *) MAP_FAILED)
@@ -644,30 +651,32 @@ mq_getattr (mqd_t mqd, struct mq_attr *mqstat)
struct mq_fattr *attr;
struct mq_info *mqinfo;
- myfault efault;
- if (efault.faulted (EBADF))
- return -1;
-
- mqinfo = (struct mq_info *) mqd;
- if (mqinfo->mqi_magic != MQI_MAGIC)
- {
- set_errno (EBADF);
- return -1;
- }
- mqhdr = mqinfo->mqi_hdr;
- attr = &mqhdr->mqh_attr;
- if ((n = ipc_mutex_lock (mqinfo->mqi_lock)) != 0)
+ __try
{
- errno = n;
- return -1;
- }
- mqstat->mq_flags = mqinfo->mqi_flags; /* per-open */
- mqstat->mq_maxmsg = attr->mq_maxmsg; /* remaining three per-queue */
- mqstat->mq_msgsize = attr->mq_msgsize;
- mqstat->mq_curmsgs = attr->mq_curmsgs;
+ mqinfo = (struct mq_info *) mqd;
+ if (mqinfo->mqi_magic != MQI_MAGIC)
+ {
+ set_errno (EBADF);
+ __leave;
+ }
+ mqhdr = mqinfo->mqi_hdr;
+ attr = &mqhdr->mqh_attr;
+ if ((n = ipc_mutex_lock (mqinfo->mqi_lock, false)) != 0)
+ {
+ errno = n;
+ __leave;
+ }
+ mqstat->mq_flags = mqinfo->mqi_flags; /* per-open */
+ mqstat->mq_maxmsg = attr->mq_maxmsg; /* remaining three per-queue */
+ mqstat->mq_msgsize = attr->mq_msgsize;
+ mqstat->mq_curmsgs = attr->mq_curmsgs;
- ipc_mutex_unlock (mqinfo->mqi_lock);
- return 0;
+ ipc_mutex_unlock (mqinfo->mqi_lock);
+ return 0;
+ }
+ __except (EBADF) {}
+ __endtry
+ return -1;
}
extern "C" int
@@ -678,39 +687,41 @@ mq_setattr (mqd_t mqd, const struct mq_attr *mqstat, struct mq_attr *omqstat)
struct mq_fattr *attr;
struct mq_info *mqinfo;
- myfault efault;
- if (efault.faulted (EBADF))
- return -1;
-
- mqinfo = (struct mq_info *) mqd;
- if (mqinfo->mqi_magic != MQI_MAGIC)
- {
- set_errno (EBADF);
- return -1;
- }
- mqhdr = mqinfo->mqi_hdr;
- attr = &mqhdr->mqh_attr;
- if ((n = ipc_mutex_lock (mqinfo->mqi_lock)) != 0)
+ __try
{
- errno = n;
- return -1;
- }
+ mqinfo = (struct mq_info *) mqd;
+ if (mqinfo->mqi_magic != MQI_MAGIC)
+ {
+ set_errno (EBADF);
+ __leave;
+ }
+ mqhdr = mqinfo->mqi_hdr;
+ attr = &mqhdr->mqh_attr;
+ if ((n = ipc_mutex_lock (mqinfo->mqi_lock, false)) != 0)
+ {
+ errno = n;
+ __leave;
+ }
- if (omqstat != NULL)
- {
- omqstat->mq_flags = mqinfo->mqi_flags; /* previous attributes */
- omqstat->mq_maxmsg = attr->mq_maxmsg;
- omqstat->mq_msgsize = attr->mq_msgsize;
- omqstat->mq_curmsgs = attr->mq_curmsgs; /* and current status */
- }
+ if (omqstat != NULL)
+ {
+ omqstat->mq_flags = mqinfo->mqi_flags; /* previous attributes */
+ omqstat->mq_maxmsg = attr->mq_maxmsg;
+ omqstat->mq_msgsize = attr->mq_msgsize;
+ omqstat->mq_curmsgs = attr->mq_curmsgs; /* and current status */
+ }
- if (mqstat->mq_flags & O_NONBLOCK)
- mqinfo->mqi_flags |= O_NONBLOCK;
- else
- mqinfo->mqi_flags &= ~O_NONBLOCK;
+ if (mqstat->mq_flags & O_NONBLOCK)
+ mqinfo->mqi_flags |= O_NONBLOCK;
+ else
+ mqinfo->mqi_flags &= ~O_NONBLOCK;
- ipc_mutex_unlock (mqinfo->mqi_lock);
- return 0;
+ ipc_mutex_unlock (mqinfo->mqi_lock);
+ return 0;
+ }
+ __except (EBADF) {}
+ __endtry
+ return -1;
}
extern "C" int
@@ -721,45 +732,47 @@ mq_notify (mqd_t mqd, const struct sigevent *notification)
struct mq_hdr *mqhdr;
struct mq_info *mqinfo;
- myfault efault;
- if (efault.faulted (EBADF))
- return -1;
-
- mqinfo = (struct mq_info *) mqd;
- if (mqinfo->mqi_magic != MQI_MAGIC)
+ __try
{
- set_errno (EBADF);
- return -1;
- }
- mqhdr = mqinfo->mqi_hdr;
- if ((n = ipc_mutex_lock (mqinfo->mqi_lock)) != 0)
- {
- errno = n;
- return -1;
- }
+ mqinfo = (struct mq_info *) mqd;
+ if (mqinfo->mqi_magic != MQI_MAGIC)
+ {
+ set_errno (EBADF);
+ __leave;
+ }
+ mqhdr = mqinfo->mqi_hdr;
+ if ((n = ipc_mutex_lock (mqinfo->mqi_lock, false)) != 0)
+ {
+ errno = n;
+ __leave;
+ }
- pid = getpid ();
- if (!notification)
- {
- if (mqhdr->mqh_pid == pid)
- mqhdr->mqh_pid = 0; /* unregister calling process */
- }
- else
- {
- if (mqhdr->mqh_pid != 0)
+ pid = getpid ();
+ if (!notification)
{
- if (kill (mqhdr->mqh_pid, 0) != -1 || errno != ESRCH)
+ if (mqhdr->mqh_pid == pid)
+ mqhdr->mqh_pid = 0; /* unregister calling process */
+ }
+ else
+ {
+ if (mqhdr->mqh_pid != 0)
{
- set_errno (EBUSY);
- ipc_mutex_unlock (mqinfo->mqi_lock);
- return -1;
+ if (kill (mqhdr->mqh_pid, 0) != -1 || errno != ESRCH)
+ {
+ set_errno (EBUSY);
+ ipc_mutex_unlock (mqinfo->mqi_lock);
+ __leave;
+ }
}
+ mqhdr->mqh_pid = pid;
+ mqhdr->mqh_event = *notification;
}
- mqhdr->mqh_pid = pid;
- mqhdr->mqh_event = *notification;
+ ipc_mutex_unlock (mqinfo->mqi_lock);
+ return 0;
}
- ipc_mutex_unlock (mqinfo->mqi_lock);
- return 0;
+ __except (EBADF) {}
+ __endtry
+ return -1;
}
static int
@@ -773,113 +786,116 @@ _mq_send (mqd_t mqd, const char *ptr, size_t len, unsigned int prio,
struct mq_hdr *mqhdr;
struct mq_fattr *attr;
struct msg_hdr *msghdr, *nmsghdr, *pmsghdr;
- struct mq_info *mqinfo;
+ struct mq_info *mqinfo = NULL;
+ bool ipc_mutex_locked = false;
+ int ret = -1;
pthread_testcancel ();
- myfault efault;
- if (efault.faulted (EBADF))
- return -1;
-
- mqinfo = (struct mq_info *) mqd;
- if (mqinfo->mqi_magic != MQI_MAGIC)
- {
- set_errno (EBADF);
- return -1;
- }
- if (prio > MQ_PRIO_MAX)
- {
- set_errno (EINVAL);
- return -1;
- }
-
- mqhdr = mqinfo->mqi_hdr; /* struct pointer */
- mptr = (int8_t *) mqhdr; /* byte pointer */
- attr = &mqhdr->mqh_attr;
- if ((n = ipc_mutex_lock (mqinfo->mqi_lock)) != 0)
+ __try
{
- errno = n;
- return -1;
- }
+ mqinfo = (struct mq_info *) mqd;
+ if (mqinfo->mqi_magic != MQI_MAGIC)
+ {
+ set_errno (EBADF);
+ __leave;
+ }
+ if (prio > MQ_PRIO_MAX)
+ {
+ set_errno (EINVAL);
+ __leave;
+ }
- if (len > (size_t) attr->mq_msgsize)
- {
- set_errno (EMSGSIZE);
- goto err;
- }
- if (attr->mq_curmsgs == 0)
- {
- if (mqhdr->mqh_pid != 0 && mqhdr->mqh_nwait == 0)
+ mqhdr = mqinfo->mqi_hdr; /* struct pointer */
+ mptr = (int8_t *) mqhdr; /* byte pointer */
+ attr = &mqhdr->mqh_attr;
+ if ((n = ipc_mutex_lock (mqinfo->mqi_lock, true)) != 0)
{
- sigev = &mqhdr->mqh_event;
- if (sigev->sigev_notify == SIGEV_SIGNAL)
- sigqueue (mqhdr->mqh_pid, sigev->sigev_signo, sigev->sigev_value);
- mqhdr->mqh_pid = 0; /* unregister */
+ errno = n;
+ __leave;
}
- }
- else if (attr->mq_curmsgs >= attr->mq_maxmsg)
- {
- /* Queue is full */
- if (mqinfo->mqi_flags & O_NONBLOCK)
+ ipc_mutex_locked = true;
+ if (len > (size_t) attr->mq_msgsize)
{
- set_errno (EAGAIN);
- goto err;
+ set_errno (EMSGSIZE);
+ __leave;
}
- /* Wait for room for one message on the queue */
- while (attr->mq_curmsgs >= attr->mq_maxmsg)
+ if (attr->mq_curmsgs == 0)
{
- int ret = ipc_cond_timedwait (mqinfo->mqi_waitsend, mqinfo->mqi_lock,
- abstime);
- if (ret != 0)
+ if (mqhdr->mqh_pid != 0 && mqhdr->mqh_nwait == 0)
{
- set_errno (ret);
- return -1;
+ sigev = &mqhdr->mqh_event;
+ if (sigev->sigev_notify == SIGEV_SIGNAL)
+ sigqueue (mqhdr->mqh_pid, sigev->sigev_signo,
+ sigev->sigev_value);
+ mqhdr->mqh_pid = 0; /* unregister */
+ }
+ }
+ else if (attr->mq_curmsgs >= attr->mq_maxmsg)
+ {
+ /* Queue is full */
+ if (mqinfo->mqi_flags & O_NONBLOCK)
+ {
+ set_errno (EAGAIN);
+ __leave;
+ }
+ /* Wait for room for one message on the queue */
+ while (attr->mq_curmsgs >= attr->mq_maxmsg)
+ {
+ int ret = ipc_cond_timedwait (mqinfo->mqi_waitsend,
+ mqinfo->mqi_lock, abstime);
+ if (ret != 0)
+ {
+ set_errno (ret);
+ __leave;
+ }
}
}
- }
- /* nmsghdr will point to new message */
- if ((freeindex = mqhdr->mqh_free) == 0)
- api_fatal ("mq_send: curmsgs = %ld; free = 0", attr->mq_curmsgs);
+ /* nmsghdr will point to new message */
+ if ((freeindex = mqhdr->mqh_free) == 0)
+ api_fatal ("mq_send: curmsgs = %ld; free = 0", attr->mq_curmsgs);
- nmsghdr = (struct msg_hdr *) &mptr[freeindex];
- nmsghdr->msg_prio = prio;
- nmsghdr->msg_len = len;
- memcpy (nmsghdr + 1, ptr, len); /* copy message from caller */
- mqhdr->mqh_free = nmsghdr->msg_next; /* new freelist head */
+ nmsghdr = (struct msg_hdr *) &mptr[freeindex];
+ nmsghdr->msg_prio = prio;
+ nmsghdr->msg_len = len;
+ memcpy (nmsghdr + 1, ptr, len); /* copy message from caller */
+ mqhdr->mqh_free = nmsghdr->msg_next; /* new freelist head */
- /* Find right place for message in linked list */
- index = mqhdr->mqh_head;
- pmsghdr = (struct msg_hdr *) &(mqhdr->mqh_head);
- while (index)
- {
- msghdr = (struct msg_hdr *) &mptr[index];
- if (prio > msghdr->msg_prio)
+ /* Find right place for message in linked list */
+ index = mqhdr->mqh_head;
+ pmsghdr = (struct msg_hdr *) &(mqhdr->mqh_head);
+ while (index)
{
- nmsghdr->msg_next = index;
+ msghdr = (struct msg_hdr *) &mptr[index];
+ if (prio > msghdr->msg_prio)
+ {
+ nmsghdr->msg_next = index;
+ pmsghdr->msg_next = freeindex;
+ break;
+ }
+ index = msghdr->msg_next;
+ pmsghdr = msghdr;
+ }
+ if (index == 0)
+ {
+ /* Queue was empty or new goes at end of list */
pmsghdr->msg_next = freeindex;
- break;
+ nmsghdr->msg_next = 0;
}
- index = msghdr->msg_next;
- pmsghdr = msghdr;
- }
- if (index == 0)
- {
- /* Queue was empty or new goes at end of list */
- pmsghdr->msg_next = freeindex;
- nmsghdr->msg_next = 0;
- }
- /* Wake up anyone blocked in mq_receive waiting for a message */
- if (attr->mq_curmsgs == 0)
- ipc_cond_signal (mqinfo->mqi_waitrecv);
- attr->mq_curmsgs++;
-
- ipc_mutex_unlock (mqinfo->mqi_lock);
- return 0;
+ /* Wake up anyone blocked in mq_receive waiting for a message */
+ if (attr->mq_curmsgs == 0)
+ ipc_cond_signal (mqinfo->mqi_waitrecv);
+ attr->mq_curmsgs++;
-err:
- ipc_mutex_unlock (mqinfo->mqi_lock);
- return -1;
+ ipc_mutex_unlock (mqinfo->mqi_lock);
+ ret = 0;
+ }
+ __except (EBADF) {}
+ __endtry
+ if (ipc_mutex_locked)
+ ipc_mutex_unlock (mqinfo->mqi_lock);
+ return ret;
}
extern "C" int
@@ -902,85 +918,84 @@ _mq_receive (mqd_t mqd, char *ptr, size_t maxlen, unsigned int *priop,
int n;
long index;
int8_t *mptr;
- ssize_t len;
+ ssize_t len = -1;
struct mq_hdr *mqhdr;
struct mq_fattr *attr;
struct msg_hdr *msghdr;
- struct mq_info *mqinfo;
+ struct mq_info *mqinfo = (struct mq_info *) mqd;
+ bool ipc_mutex_locked = false;
pthread_testcancel ();
- myfault efault;
- if (efault.faulted (EBADF))
- return -1;
-
- mqinfo = (struct mq_info *) mqd;
- if (mqinfo->mqi_magic != MQI_MAGIC)
+ __try
{
- set_errno (EBADF);
- return -1;
- }
- mqhdr = mqinfo->mqi_hdr; /* struct pointer */
- mptr = (int8_t *) mqhdr; /* byte pointer */
- attr = &mqhdr->mqh_attr;
- if ((n = ipc_mutex_lock (mqinfo->mqi_lock)) != 0)
- {
- errno = n;
- return -1;
- }
-
- if (maxlen < (size_t) attr->mq_msgsize)
- {
- set_errno (EMSGSIZE);
- goto err;
- }
- if (attr->mq_curmsgs == 0) /* queue is empty */
- {
- if (mqinfo->mqi_flags & O_NONBLOCK)
+ if (mqinfo->mqi_magic != MQI_MAGIC)
+ {
+ set_errno (EBADF);
+ __leave;
+ }
+ mqhdr = mqinfo->mqi_hdr; /* struct pointer */
+ mptr = (int8_t *) mqhdr; /* byte pointer */
+ attr = &mqhdr->mqh_attr;
+ if ((n = ipc_mutex_lock (mqinfo->mqi_lock, true)) != 0)
+ {
+ errno = n;
+ __leave;
+ }
+ ipc_mutex_locked = true;
+ if (maxlen < (size_t) attr->mq_msgsize)
{
- set_errno (EAGAIN);
- goto err;
+ set_errno (EMSGSIZE);
+ __leave;
}
- /* Wait for a message to be placed onto queue */
- mqhdr->mqh_nwait++;
- while (attr->mq_curmsgs == 0)
+ if (attr->mq_curmsgs == 0) /* queue is empty */
{
- int ret = ipc_cond_timedwait (mqinfo->mqi_waitrecv, mqinfo->mqi_lock,
- abstime);
- if (ret != 0)
+ if (mqinfo->mqi_flags & O_NONBLOCK)
{
- set_errno (ret);
- return -1;
+ set_errno (EAGAIN);
+ __leave;
}
+ /* Wait for a message to be placed onto queue */
+ mqhdr->mqh_nwait++;
+ while (attr->mq_curmsgs == 0)
+ {
+ int ret = ipc_cond_timedwait (mqinfo->mqi_waitrecv,
+ mqinfo->mqi_lock, abstime);
+ if (ret != 0)
+ {
+ set_errno (ret);
+ __leave;
+ }
+ }
+ mqhdr->mqh_nwait--;
}
- mqhdr->mqh_nwait--;
- }
-
- if ((index = mqhdr->mqh_head) == 0)
- api_fatal ("mq_receive: curmsgs = %ld; head = 0", attr->mq_curmsgs);
- msghdr = (struct msg_hdr *) &mptr[index];
- mqhdr->mqh_head = msghdr->msg_next; /* new head of list */
- len = msghdr->msg_len;
- memcpy(ptr, msghdr + 1, len); /* copy the message itself */
- if (priop != NULL)
- *priop = msghdr->msg_prio;
+ if ((index = mqhdr->mqh_head) == 0)
+ api_fatal ("mq_receive: curmsgs = %ld; head = 0", attr->mq_curmsgs);
- /* Just-read message goes to front of free list */
- msghdr->msg_next = mqhdr->mqh_free;
- mqhdr->mqh_free = index;
+ msghdr = (struct msg_hdr *) &mptr[index];
+ mqhdr->mqh_head = msghdr->msg_next; /* new head of list */
+ len = msghdr->msg_len;
+ memcpy(ptr, msghdr + 1, len); /* copy the message itself */
+ if (priop != NULL)
+ *priop = msghdr->msg_prio;
+
+ /* Just-read message goes to front of free list */
+ msghdr->msg_next = mqhdr->mqh_free;
+ mqhdr->mqh_free = index;
- /* Wake up anyone blocked in mq_send waiting for room */
- if (attr->mq_curmsgs == attr->mq_maxmsg)
- ipc_cond_signal (mqinfo->mqi_waitsend);
- attr->mq_curmsgs--;
+ /* Wake up anyone blocked in mq_send waiting for room */
+ if (attr->mq_curmsgs == attr->mq_maxmsg)
+ ipc_cond_signal (mqinfo->mqi_waitsend);
+ attr->mq_curmsgs--;
- ipc_mutex_unlock (mqinfo->mqi_lock);
+ ipc_mutex_unlock (mqinfo->mqi_lock);
+ }
+ __except (EBADF) {}
+ __endtry
+ if (ipc_mutex_locked)
+ ipc_mutex_unlock (mqinfo->mqi_lock);
return len;
-
-err:
- ipc_mutex_unlock (mqinfo->mqi_lock);
- return -1;
}
extern "C" ssize_t
@@ -1004,34 +1019,36 @@ mq_close (mqd_t mqd)
struct mq_fattr *attr;
struct mq_info *mqinfo;
- myfault efault;
- if (efault.faulted (EBADF))
- return -1;
-
- mqinfo = (struct mq_info *) mqd;
- if (mqinfo->mqi_magic != MQI_MAGIC)
+ __try
{
- set_errno (EBADF);
- return -1;
- }
- mqhdr = mqinfo->mqi_hdr;
- attr = &mqhdr->mqh_attr;
+ mqinfo = (struct mq_info *) mqd;
+ if (mqinfo->mqi_magic != MQI_MAGIC)
+ {
+ set_errno (EBADF);
+ __leave;
+ }
+ mqhdr = mqinfo->mqi_hdr;
+ attr = &mqhdr->mqh_attr;
- if (mq_notify (mqd, NULL)) /* unregister calling process */
- return -1;
+ if (mq_notify (mqd, NULL)) /* unregister calling process */
+ __leave;
- msgsize = MSGSIZE (attr->mq_msgsize);
- filesize = sizeof (struct mq_hdr)
- + (attr->mq_maxmsg * (sizeof (struct msg_hdr) + msgsize));
- if (munmap (mqinfo->mqi_hdr, filesize) == -1)
- return -1;
+ msgsize = MSGSIZE (attr->mq_msgsize);
+ filesize = sizeof (struct mq_hdr)
+ + (attr->mq_maxmsg * (sizeof (struct msg_hdr) + msgsize));
+ if (munmap (mqinfo->mqi_hdr, filesize) == -1)
+ __leave;
- mqinfo->mqi_magic = 0; /* just in case */
- ipc_cond_close (mqinfo->mqi_waitsend);
- ipc_cond_close (mqinfo->mqi_waitrecv);
- ipc_mutex_close (mqinfo->mqi_lock);
- free (mqinfo);
- return 0;
+ mqinfo->mqi_magic = 0; /* just in case */
+ ipc_cond_close (mqinfo->mqi_waitsend);
+ ipc_cond_close (mqinfo->mqi_waitrecv);
+ ipc_mutex_close (mqinfo->mqi_lock);
+ free (mqinfo);
+ return 0;
+ }
+ __except (EBADF) {}
+ __endtry
+ return -1;
}
extern "C" int
@@ -1062,7 +1079,7 @@ struct sem_finfo
extern "C" sem_t *
sem_open (const char *name, int oflag, ...)
{
- int i, fd = -1, created;
+ int i, fd = -1, created = 0;
va_list ap;
mode_t mode = 0;
unsigned int value = 0;
@@ -1078,97 +1095,99 @@ sem_open (const char *name, int oflag, ...)
if (!check_path (semname, semaphore, name, len))
return SEM_FAILED;
- myfault efault;
- if (efault.faulted (EFAULT))
- return SEM_FAILED;
-
- created = 0;
- oflag &= (O_CREAT | O_EXCL);
-
-again:
- if (oflag & O_CREAT)
+ __try
{
- va_start (ap, oflag); /* init ap to final named argument */
- mode = va_arg (ap, mode_t) & ~S_IXUSR;
- value = va_arg (ap, unsigned int);
- va_end (ap);
-
- /* Open and specify O_EXCL and user-execute */
- fd = open (semname, oflag | O_EXCL | O_RDWR | O_CLOEXEC, mode | S_IXUSR);
- if (fd < 0)
+ oflag &= (O_CREAT | O_EXCL);
+
+ again:
+ if (oflag & O_CREAT)
{
- if (errno == EEXIST && (oflag & O_EXCL) == 0)
- goto exists; /* already exists, OK */
- return SEM_FAILED;
+ va_start (ap, oflag); /* init ap to final named argument */
+ mode = va_arg (ap, mode_t) & ~S_IXUSR;
+ value = va_arg (ap, unsigned int);
+ va_end (ap);
+
+ /* Open and specify O_EXCL and user-execute */
+ fd = open (semname, oflag | O_EXCL | O_RDWR | O_CLOEXEC,
+ mode | S_IXUSR);
+ if (fd < 0)
+ {
+ if (errno == EEXIST && (oflag & O_EXCL) == 0)
+ goto exists; /* already exists, OK */
+ return SEM_FAILED;
+ }
+ created = 1;
+ /* First one to create the file initializes it. */
+ NtAllocateLocallyUniqueId (&sf.luid);
+ sf.value = value;
+ sf.hash = hash_path_name (0, semname);
+ if (write (fd, &sf, sizeof sf) != sizeof sf)
+ __leave;
+ sem = semaphore::open (sf.hash, sf.luid, fd, oflag, mode, value,
+ wasopen);
+ if (sem == SEM_FAILED)
+ __leave;
+ /* Initialization complete, turn off user-execute bit */
+ if (fchmod (fd, mode) == -1)
+ __leave;
+ /* Don't close (fd); */
+ return sem;
}
- created = 1;
- /* First one to create the file initializes it. */
- NtAllocateLocallyUniqueId (&sf.luid);
- sf.value = value;
- sf.hash = hash_path_name (0, semname);
- if (write (fd, &sf, sizeof sf) != sizeof sf)
- goto err;
- sem = semaphore::open (sf.hash, sf.luid, fd, oflag, mode, value, wasopen);
- if (sem == SEM_FAILED)
- goto err;
- /* Initialization complete, turn off user-execute bit */
- if (fchmod (fd, mode) == -1)
- goto err;
- /* Don't close (fd); */
- return sem;
- }
-exists:
- /* Open the file and fetch the semaphore name. */
- if ((fd = open (semname, O_RDWR | O_CLOEXEC)) < 0)
- {
- if (errno == ENOENT && (oflag & O_CREAT))
- goto again;
- goto err;
- }
- /* Make certain initialization is complete */
- for (i = 0; i < MAX_TRIES; i++)
- {
- if (stat64 (semname, &statbuff) == -1)
+ exists:
+ /* Open the file and fetch the semaphore name. */
+ if ((fd = open (semname, O_RDWR | O_CLOEXEC)) < 0)
{
if (errno == ENOENT && (oflag & O_CREAT))
+ goto again;
+ __leave;
+ }
+ /* Make certain initialization is complete */
+ for (i = 0; i < MAX_TRIES; i++)
+ {
+ if (stat64 (semname, &statbuff) == -1)
{
- close (fd);
- fd = -1;
- goto again;
+ if (errno == ENOENT && (oflag & O_CREAT))
+ {
+ close (fd);
+ fd = -1;
+ goto again;
+ }
+ __leave;
}
- goto err;
+ if ((statbuff.st_mode & S_IXUSR) == 0)
+ break;
+ sleep (1);
}
- if ((statbuff.st_mode & S_IXUSR) == 0)
- break;
- sleep (1);
- }
- if (i == MAX_TRIES)
- {
- set_errno (ETIMEDOUT);
- goto err;
+ if (i == MAX_TRIES)
+ {
+ set_errno (ETIMEDOUT);
+ __leave;
+ }
+ if (file.lock (fd, sizeof sf))
+ __leave;
+ if (read (fd, &sf, sizeof sf) != sizeof sf)
+ __leave;
+ sem = semaphore::open (sf.hash, sf.luid, fd, oflag, mode, sf.value,
+ wasopen);
+ file.unlock (fd);
+ if (sem == SEM_FAILED)
+ __leave;
+ /* If wasopen is set, the semaphore was already opened and we already have
+ an open file descriptor pointing to the file. This means, we have to
+ close the file descriptor created in this call. It won't be stored
+ anywhere anyway. */
+ if (wasopen)
+ close (fd);
+ return sem;
}
- if (file.lock (fd, sizeof sf))
- goto err;
- if (read (fd, &sf, sizeof sf) != sizeof sf)
- goto err;
- sem = semaphore::open (sf.hash, sf.luid, fd, oflag, mode, sf.value, wasopen);
- file.unlock (fd);
- if (sem == SEM_FAILED)
- goto err;
- /* If wasopen is set, the semaphore was already opened and we already have
- an open file descriptor pointing to the file. This means, we have to
- close the file descriptor created in this call. It won't be stored
- anywhere anyway. */
- if (wasopen)
- close (fd);
- return sem;
-
-err:
+ __except (EFAULT) {}
+ __endtry
/* Don't let following function calls change errno */
save_errno save;
- file.unlock (fd);
+ if (fd >= 0)
+ file.unlock (fd);
if (created)
unlink (semname);
if (sem != SEM_FAILED)
diff --git a/winsup/cygwin/profil.c b/winsup/cygwin/profil.c
index eb41c0844..be59b4909 100644
--- a/winsup/cygwin/profil.c
+++ b/winsup/cygwin/profil.c
@@ -1,7 +1,5 @@
/* profil.c -- win32 profil.c equivalent
- Copyright 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
-
This file is part of Cygwin.
This software is a copyrighted work licensed under the terms of the
@@ -18,9 +16,10 @@
#endif
#include <windows.h>
#include <stdio.h>
+#include <sys/cygwin.h>
#include <sys/types.h>
#include <errno.h>
-#include <math.h>
+#include <pthread.h>
#include "profil.h"
#define SLEEPTIME (1000 / PROF_HZ)
@@ -65,25 +64,42 @@ print_prof (struct profinfo *p)
}
#endif
-/* Everytime we wake up use the main thread pc to hash into the cell in the
- profile buffer ARG. */
+/* Every time we wake up sample the main thread's pc to hash into the cell
+ in the profile buffer ARG. Then all other pthreads' pc's are sampled. */
+
+static void
+profthr_byhandle (HANDLE thr)
+{
+ size_t pc;
+
+ /* Sample the pc of the thread indicated by thr; bail if anything amiss. */
+ if (thr == INVALID_HANDLE_VALUE)
+ return;
+ pc = get_thrpc (thr);
+ if (pc == -1)
+ return;
-static void CALLBACK profthr_func (LPVOID);
+ /* Code assumes there's only one profinfo in play: the static prof above. */
+ if (pc >= prof.lowpc && pc < prof.highpc)
+ {
+ size_t idx = PROFIDX (pc, prof.lowpc, prof.scale);
+ prof.counter[idx]++;
+ }
+}
static void CALLBACK
profthr_func (LPVOID arg)
{
struct profinfo *p = (struct profinfo *) arg;
- size_t pc, idx;
for (;;)
{
- pc = (size_t) get_thrpc (p->targthr);
- if (pc >= p->lowpc && pc < p->highpc)
- {
- idx = PROFIDX (pc, p->lowpc, p->scale);
- p->counter[idx]++;
- }
+ /* Record profiling sample for main thread. */
+ profthr_byhandle (p->targthr);
+
+ /* Record profiling samples for other pthreads, if any. */
+ cygwin_internal (CW_CYGHEAP_PROFTHR_ALL, profthr_byhandle);
+
#if 0
print_prof (p);
#endif
@@ -106,6 +122,7 @@ profile_off (struct profinfo *p)
}
if (p->targthr)
CloseHandle (p->targthr);
+ p->targthr = 0;
return 0;
}
@@ -121,6 +138,7 @@ profile_on (struct profinfo *p)
GetCurrentProcess (), &p->targthr, 0, FALSE,
DUPLICATE_SAME_ACCESS))
{
+ p->targthr = 0;
errno = ESRCH;
return -1;
}
@@ -129,7 +147,7 @@ profile_on (struct profinfo *p)
if (!p->quitevt)
{
- CloseHandle (p->quitevt);
+ CloseHandle (p->targthr);
p->targthr = 0;
errno = EAGAIN;
return -1;
@@ -148,8 +166,8 @@ profile_on (struct profinfo *p)
}
/* Set profiler thread priority to highest to be sure that it gets the
- processor as soon it request it (i.e. when the Sleep terminate) to get
- the next data out of the profile. */
+ processor as soon it requests it (i.e. when the Sleep terminates) to get
+ the next data sample as quickly as possible. */
SetThreadPriority (p->profthr, THREAD_PRIORITY_TIME_CRITICAL);
@@ -157,20 +175,45 @@ profile_on (struct profinfo *p)
}
/*
- * start or stop profiling
+ * Restart profiling in child after fork.
+ *
+ * The profiling control info in prof needs to be selectively updated.
+ * Items counter, lowpc, highpc, and scale are correct as-is. But items
+ * targthr, profthr, and quitevt need updating because these copied HANDLE
+ * values are only valid in parent process. We also zero out the sample
+ * buffer so that samples aren't double-counted if multiple gmon.out files
+ * are aggregated. We calculate buffer's size from other data in prof.
+ */
+static void
+profile_child (void)
+{
+ /* Bail if this was a fork after profiling turned off or was never on. */
+ if (!prof.targthr)
+ return;
+
+ /* Figure out how big the sample buffer is and zero it out. */
+ size_t size = PROFIDX (prof.highpc, prof.lowpc, prof.scale) << 1;
+ memset ((char *) prof.counter, 0, size);
+
+ /* Replace stale HANDLEs in prof and create profiling thread. */
+ profile_on (&prof);
+}
+
+/*
+ * Start or stop profiling.
*
- * profiling goes into the SAMPLES buffer of size SIZE (which is treated
- * as an array of u_shorts of size size/2)
+ * Profiling data goes into the SAMPLES buffer of size SIZE (which is treated
+ * as an array of uint16_t of size SIZE/2).
*
- * each bin represents a range of pc addresses from OFFSET. The number
+ * Each bin represents a range of pc addresses from OFFSET. The number
* of pc addresses in a bin depends on SCALE. (A scale of 65536 maps
* each bin to two addresses, A scale of 32768 maps each bin to 4 addresses,
* a scale of 1 maps each bin to 128k addreses). Scale may be 1 - 65536,
- * or zero to turn off profiling
+ * or zero to turn off profiling.
*/
int
profile_ctl (struct profinfo * p, char *samples, size_t size,
- size_t offset, u_int scale)
+ size_t offset, uint32_t scale)
{
size_t maxbin;
@@ -186,11 +229,14 @@ profile_ctl (struct profinfo * p, char *samples, size_t size,
memset (samples, 0, size);
memset (p, 0, sizeof *p);
maxbin = size >> 1;
- prof.counter = (u_short *) samples;
+ prof.counter = (uint16_t *) samples;
prof.lowpc = offset;
prof.highpc = PROFADDR (maxbin, offset, scale);
prof.scale = scale;
+ /* Set up callback to restart profiling in child after fork. */
+ pthread_atfork (NULL, NULL, profile_child);
+
return profile_on (p);
}
return 0;
@@ -202,7 +248,7 @@ profile_ctl (struct profinfo * p, char *samples, size_t size,
The word pointed to by this address is incremented. Buf is unused. */
int
-profil (char *samples, size_t size, size_t offset, u_int scale)
+profil (char *samples, size_t size, size_t offset, uint32_t scale)
{
return profile_ctl (&prof, samples, size, offset, scale);
}
diff --git a/winsup/cygwin/profil.h b/winsup/cygwin/profil.h
index f33591d09..cb1a092da 100644
--- a/winsup/cygwin/profil.h
+++ b/winsup/cygwin/profil.h
@@ -1,7 +1,5 @@
/* profil.h: gprof profiling header file
- Copyright 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
-
This file is part of Cygwin.
This software is a copyrighted work licensed under the terms of the
@@ -45,11 +43,11 @@ struct profinfo {
_WINHANDLE targthr; /* thread to profile */
_WINHANDLE profthr; /* profiling thread */
_WINHANDLE quitevt; /* quit event */
- u_short *counter; /* profiling counters */
+ uint16_t *counter; /* profiling counters */
size_t lowpc, highpc; /* range to be profiled */
- u_int scale; /* scale value of bins */
+ uint32_t scale; /* scale value of bins */
};
-int profile_ctl(struct profinfo *, char *, size_t, size_t, u_int);
-int profil(char *, size_t, size_t, u_int);
+int profile_ctl(struct profinfo *, char *, size_t, size_t, uint32_t);
+int profil(char *, size_t, size_t, uint32_t);
diff --git a/winsup/cygwin/pseudo-reloc.cc b/winsup/cygwin/pseudo-reloc.cc
index 00c58d7a8..c250fdc01 100644
--- a/winsup/cygwin/pseudo-reloc.cc
+++ b/winsup/cygwin/pseudo-reloc.cc
@@ -85,20 +85,18 @@ __report_error (const char *msg, ...)
* cygwin ptys.
*/
char buf[128];
- WCHAR module[MAX_PATH];
- char * posix_module = NULL;
+ char *posix_module = NULL;
static const char UNKNOWN_MODULE[] = "<unknown module>: ";
static const char CYGWIN_FAILURE_MSG[] = "Cygwin runtime failure: ";
HANDLE errh = GetStdHandle (STD_ERROR_HANDLE);
- ssize_t modulelen = GetModuleFileNameW (NULL, module, sizeof (module));
va_list args;
/* FIXME: cleanup further to avoid old use of cygwin_internal */
if (errh == INVALID_HANDLE_VALUE)
cygwin_internal (CW_EXIT_PROCESS, STATUS_ILLEGAL_DLL_PSEUDO_RELOCATION, 1);
- if (modulelen > 0)
- posix_module = (char *) cygwin_create_path (CCP_WIN_W_TO_POSIX, module);
+ posix_module = (char *) cygwin_create_path (CCP_WIN_W_TO_POSIX,
+ global_progname);
va_start (args, msg);
vsnprintf (buf, sizeof (buf), msg, args);
@@ -344,7 +342,7 @@ do_pseudo_reloc (void * start, void * end, void * base)
__write_memory ((void *) reloc_target, &reldata, 2);
break;
case 32:
-#if defined (__CYGWIN__) && defined (__x86_64__) && !defined (__OPTIMIZE__)
+#if defined (__CYGWIN__) && defined (__x86_64__)
if (reldata > (ptrdiff_t) __INT32_MAX__
|| reldata < -((ptrdiff_t) __INT32_MAX__) - 1)
__report_error ("Invalid relocation. Offset %p at address %p "
diff --git a/winsup/cygwin/pthread.cc b/winsup/cygwin/pthread.cc
index c63c1b8ac..b9da2eff7 100644
--- a/winsup/cygwin/pthread.cc
+++ b/winsup/cygwin/pthread.cc
@@ -1,8 +1,5 @@
/* pthread.cc: posix pthread interface for Cygwin
- Copyright 1998, 1999, 2000, 2001, 2002, 2003, 2005, 2007, 2008, 2010, 2011,
- 2013 Red Hat, Inc.
-
Originally written by Marco Fuykschot <marco@ddi.nl>
This file is part of Cygwin.
@@ -185,7 +182,7 @@ sem_timedwait (sem_t * sem, const struct timespec *abstime)
}
int
-sem_post (sem_t * sem)
+sem_post (sem_t *sem)
{
return semaphore::post (sem);
}
diff --git a/winsup/cygwin/pwdgrp.h b/winsup/cygwin/pwdgrp.h
index fe3c3f2a1..639773683 100644
--- a/winsup/cygwin/pwdgrp.h
+++ b/winsup/cygwin/pwdgrp.h
@@ -1,7 +1,5 @@
/* pwdgrp.h
- Copyright 2001, 2002, 2003 Red Hat inc.
-
Stuff common to pwd and grp handling.
This file is part of Cygwin.
@@ -10,42 +8,72 @@ This software is a copyrighted work licensed under the terms of the
Cygwin license. Please consult the file "CYGWIN_LICENSE" for
details. */
+#pragma once
+
+#include "sync.h"
+#include "ldap.h"
+#include "miscfuncs.h"
+#include "userinfo.h"
+
/* These functions are needed to allow searching and walking through
the passwd and group lists */
-extern struct passwd *internal_getpwsid (cygpsid &);
-extern struct passwd *internal_getpwnam (const char *, bool = FALSE);
-extern struct passwd *internal_getpwuid (uid_t, bool = FALSE);
-extern struct group *internal_getgrsid (cygpsid &);
-extern struct group *internal_getgrgid (gid_t gid, bool = FALSE);
-extern struct group *internal_getgrnam (const char *, bool = FALSE);
-extern struct group *internal_getgrent (int);
-int internal_getgroups (int, gid_t *, cygpsid * = NULL);
+extern struct passwd *internal_getpwsid (cygpsid &, cyg_ldap * = NULL);
+extern struct passwd *internal_getpwsid_from_db (cygpsid &sid);
+extern struct passwd *internal_getpwnam (const char *, cyg_ldap * = NULL);
+extern struct passwd *internal_getpwuid (uid_t, cyg_ldap * = NULL);
+extern struct group *internal_getgrsid (cygpsid &, cyg_ldap * = NULL);
+extern struct group *internal_getgrsid_from_db (cygpsid &sid);
+extern struct group *internal_getgrgid (gid_t, cyg_ldap * = NULL);
+extern struct group *internal_getgrnam (const char *, cyg_ldap * = NULL);
+
+extern int internal_getgroups (int, gid_t *, cyg_ldap *);
+
+/* These functions are called from mkpasswd/mkgroup via cygwin_internal. */
+void *setpwent_filtered (int enums, PCWSTR enum_tdoms);
+void *getpwent_filtered (void *gr);
+void endpwent_filtered (void *gr);
+void *setgrent_filtered (int enums, PCWSTR enum_tdoms);
+void *getgrent_filtered (void *gr);
+void endgrent_filtered (void *gr);
+
+/* NOTE: The below sid members were cygsid's originally. Don't do that.
+ cygsid's are pointer based. When adding new entries to the passwd or
+ group caches, a crealloc call potenitally moves the entries and then
+ the cygsid pointers point into neverneverland. */
+struct pg_pwd
+{
+ struct passwd p;
+ BYTE sid[SECURITY_MAX_SID_SIZE];
+ size_t len;
+};
+
+struct pg_grp
+{
+ struct group g;
+ BYTE sid[SECURITY_MAX_SID_SIZE];
+ size_t len;
+};
-#include "sync.h"
-#include "cygtls.h"
class pwdgrp
{
+ friend class pg_ent;
+ friend class pw_ent;
+ friend class gr_ent;
+
unsigned pwdgrp_buf_elem_size;
- union
- {
- passwd **passwd_buf;
- group **group_buf;
- void **pwdgrp_buf;
- };
- void (pwdgrp::*read) ();
+ void *pwdgrp_buf;
bool (pwdgrp::*parse) ();
- int etc_ix;
- UNICODE_STRING upath;
- PWCHAR path;
- char *buf, *lptr;
- int max_lines;
- bool initialized;
+ char pwd_sep;
+ UNICODE_STRING path;
+ OBJECT_ATTRIBUTES attr;
+ LARGE_INTEGER last_modified;
+ char *lptr;
+ ULONG curr_lines;
+ ULONG max_lines;
static muto pglock;
bool parse_passwd ();
bool parse_group ();
- void read_passwd ();
- void read_group ();
char *add_line (char *);
char *raw_ptr () const {return lptr;}
char *next_str (char);
@@ -64,21 +92,184 @@ class pwdgrp
i = (int) x;
return res;
}
+ void *add_account_post_fetch (char *line, bool lock);
+ void *add_account_from_file (cygpsid &sid);
+ void *add_account_from_file (const char *name);
+ void *add_account_from_file (uint32_t id);
+ void *add_account_from_windows (cygpsid &sid, cyg_ldap *pldap = NULL);
+ void *add_account_from_windows (const char *name, cyg_ldap *pldap = NULL);
+ void *add_account_from_windows (uint32_t id, cyg_ldap *pldap = NULL);
+ void *add_account_from_cygserver (cygpsid &sid);
+ void *add_account_from_cygserver (const char *name);
+ void *add_account_from_cygserver (uint32_t id);
+ char *fetch_account_from_line (fetch_user_arg_t &arg, const char *line);
+ char *fetch_account_from_file (fetch_user_arg_t &arg);
+ char *fetch_account_from_windows (fetch_user_arg_t &arg,
+ cyg_ldap *pldap = NULL);
+ char *fetch_account_from_cygserver (fetch_user_arg_t &arg);
public:
- int curr_lines;
+ ULONG cached_users () const { return curr_lines; }
+ ULONG cached_groups () const { return curr_lines; }
+ POBJECT_ATTRIBUTES file_attr () { return &attr; }
+ bool check_file ();
- void load (const wchar_t *);
- inline void refresh (bool check)
- {
- if (!check && initialized)
- return;
- if (pglock.acquire () == 1 &&
- (!initialized || (check && etc::file_changed (etc_ix))))
- (this->*read) ();
- pglock.release ();
- }
+ void init_pwd ();
+ bool is_passwd () const { return pwdgrp_buf_elem_size == sizeof (pg_pwd); }
+ pg_pwd *passwd () const { return (pg_pwd *) pwdgrp_buf; };
+ struct passwd *add_user_from_cygserver (cygpsid &sid)
+ { return (struct passwd *) add_account_from_cygserver (sid); }
+ struct passwd *add_user_from_cygserver (const char *name)
+ { return (struct passwd *) add_account_from_cygserver (name); }
+ struct passwd *add_user_from_cygserver (uint32_t id)
+ { return (struct passwd *) add_account_from_cygserver (id); }
+ struct passwd *add_user_from_file (cygpsid &sid)
+ { return (struct passwd *) add_account_from_file (sid); }
+ struct passwd *add_user_from_file (const char *name)
+ { return (struct passwd *) add_account_from_file (name); }
+ struct passwd *add_user_from_file (uint32_t id)
+ { return (struct passwd *) add_account_from_file (id); }
+ struct passwd *add_user_from_windows (cygpsid &sid, cyg_ldap *pldap = NULL)
+ { return (struct passwd *) add_account_from_windows (sid, pldap); }
+ struct passwd *add_user_from_windows (const char *name,
+ cyg_ldap* pldap = NULL)
+ { return (struct passwd *) add_account_from_windows (name, pldap); }
+ struct passwd *add_user_from_windows (uint32_t id, cyg_ldap *pldap = NULL)
+ { return (struct passwd *) add_account_from_windows (id, pldap); }
+ struct passwd *find_user (cygpsid &sid);
+ struct passwd *find_user (const char *name);
+ struct passwd *find_user (uid_t uid);
+
+ void init_grp ();
+ bool is_group () const { return pwdgrp_buf_elem_size == sizeof (pg_grp); }
+ pg_grp *group () const { return (pg_grp *) pwdgrp_buf; };
+ struct group *add_group_from_cygserver (cygpsid &sid)
+ { return (struct group *) add_account_from_cygserver (sid); }
+ struct group *add_group_from_cygserver (const char *name)
+ { return (struct group *) add_account_from_cygserver (name); }
+ struct group *add_group_from_cygserver (uint32_t id)
+ { return (struct group *) add_account_from_cygserver (id); }
+ struct group *add_group_from_file (cygpsid &sid)
+ { return (struct group *) add_account_from_file (sid); }
+ struct group *add_group_from_file (const char *name)
+ { return (struct group *) add_account_from_file (name); }
+ struct group *add_group_from_file (uint32_t id)
+ { return (struct group *) add_account_from_file (id); }
+ struct group *add_group_from_windows (cygpsid &sid, cyg_ldap *pldap = NULL)
+ { return (struct group *) add_account_from_windows (sid, pldap); }
+ struct group *add_group_from_windows (const char *name,
+ cyg_ldap *pldap = NULL)
+ { return (struct group *) add_account_from_windows (name, pldap); }
+ struct group *add_group_from_windows (uint32_t id, cyg_ldap *pldap = NULL)
+ { return (struct group *) add_account_from_windows (id, pldap); }
+ struct group *add_group_from_windows (fetch_acc_t &full_acc,
+ cyg_ldap *pldap = NULL);
+ struct group *find_group (cygpsid &sid);
+ struct group *find_group (const char *name);
+ struct group *find_group (gid_t gid);
+};
- pwdgrp (passwd *&pbuf);
- pwdgrp (group *&gbuf);
+class pg_ent
+{
+protected:
+ pwdgrp pg;
+ bool group;
+ pg_pwd pwd;
+ pg_grp grp;
+ NT_readline rl;
+ cyg_ldap cldap;
+ PCHAR buf;
+ ULONG cnt;
+ ULONG max;
+ ULONG_PTR resume;
+ int enums; /* ENUM_xxx values defined in sys/cygwin.h. */
+ PCWSTR enum_tdoms;
+ bool from_files;
+ bool from_db;
+ UNICODE_STRING dom;
+ enum {
+ rewound = 0,
+ from_cache,
+ from_file,
+ from_builtin,
+ from_local,
+ from_sam,
+ from_ad,
+ finished
+ } state;
+
+ void clear_cache ();
+ inline bool nss_db_enum_caches () const { return !!(enums & ENUM_CACHE); }
+ inline bool nss_db_enum_files () const { return !!(enums & ENUM_FILES); }
+ inline bool nss_db_enum_builtin () const { return !!(enums & ENUM_BUILTIN); }
+ inline bool nss_db_enum_local () const { return !!(enums & ENUM_LOCAL); }
+ inline bool nss_db_enum_primary () const { return !!(enums & ENUM_PRIMARY); }
+ inline bool nss_db_enum_tdom (PWCHAR domain)
+ {
+ if (enums & ENUM_TDOMS_ALL)
+ return true;
+ if (!(enums & ENUM_TDOMS) || !enum_tdoms || !domain)
+ return false;
+ for (PCWSTR td = enum_tdoms; td && *td; td = wcschr (td, L'\0'))
+ if (!wcscasecmp (td, domain))
+ return true;
+ return false;
+ }
+ virtual void *enumerate_caches () = 0;
+ virtual void *enumerate_file ();
+ virtual void *enumerate_builtin ();
+ virtual void *enumerate_local () = 0;
+ virtual void *enumerate_sam ();
+ virtual void *enumerate_ad ();
+
+public:
+ void setent (bool _group, int _enums = 0, PCWSTR _enum_tdoms = NULL);
+ void *getent ();
+ void endent (bool _group);
+};
+
+class pw_ent : public pg_ent
+{
+ void *enumerate_caches ();
+ void *enumerate_local ();
+public:
+ inline void setpwent (int _enums = 0, PCWSTR _enum_tdoms = NULL)
+ { setent (false, _enums, _enum_tdoms); }
+ struct passwd *getpwent ();
+ inline void endpwent () { endent (false); }
};
+
+class gr_ent : public pg_ent
+{
+ void *enumerate_caches ();
+ void *enumerate_local ();
+public:
+ inline void setgrent (int _enums = 0, PCWSTR _enum_tdoms = NULL)
+ { setent (true, _enums, _enum_tdoms); }
+ struct group *getgrent ();
+ inline void endgrent () { endent (true); }
+};
+
+/* These inline methods have to be defined here so that pg_pwd and pg_grp
+ are defined. */
+inline BOOL cygsid::getfrompw (const struct passwd *pw)
+ { return (*this = pw ? (PSID) ((pg_pwd *) pw)->sid : NO_SID) != NO_SID; }
+
+inline BOOL cygsid::getfromgr (const struct group *gr)
+ { return (*this = gr ? (PSID) ((pg_grp *) gr)->sid : NO_SID) != NO_SID; }
+
+/* Use these functions if you just need the PSID. */
+inline PSID sidfromuid (uid_t uid, cyg_ldap *pldap)
+ {
+ struct passwd *pw = internal_getpwuid (uid, pldap);
+ if (pw)
+ return (PSID) ((pg_pwd *) pw)->sid;
+ return NO_SID;
+ }
+inline PSID sidfromgid (gid_t gid, cyg_ldap *pldap)
+ {
+ struct group *gr = internal_getgrgid (gid, pldap);
+ if (gr)
+ return (PSID) ((pg_grp *) gr)->sid;
+ return NO_SID;
+ }
diff --git a/winsup/cygwin/quotactl.cc b/winsup/cygwin/quotactl.cc
new file mode 100644
index 000000000..7218b54ad
--- /dev/null
+++ b/winsup/cygwin/quotactl.cc
@@ -0,0 +1,331 @@
+/* quotactl.cc: code for manipulating disk quotas
+
+This file is part of Cygwin.
+
+This software is a copyrighted work licensed under the terms of the
+Cygwin license. Please consult the file "CYGWIN_LICENSE" for
+details. */
+
+#include "winsup.h"
+#include "cygtls.h"
+#include "security.h"
+#include "path.h"
+#include "fhandler.h"
+#include "dtable.h"
+#include "cygheap.h"
+#include "ntdll.h"
+#include "tls_pbuf.h"
+#include <sys/mount.h>
+#include <sys/quota.h>
+
+#define PGQI_SIZE (sizeof (FILE_GET_QUOTA_INFORMATION) + SECURITY_MAX_SID_SIZE)
+#define PFQI_SIZE (sizeof (FILE_QUOTA_INFORMATION) + SECURITY_MAX_SID_SIZE)
+
+/* Modelled after the Linux quotactl function. */
+extern "C" int
+quotactl (int cmd, const char *special, int id, caddr_t addr)
+{
+ ACCESS_MASK access = FILE_READ_DATA;
+ PSID sid = NO_SID;
+ path_conv pc;
+ tmp_pathbuf tp;
+ UNICODE_STRING path;
+ OBJECT_ATTRIBUTES attr;
+ NTSTATUS status;
+ HANDLE fh;
+ IO_STATUS_BLOCK io;
+ FILE_FS_CONTROL_INFORMATION ffci;
+ int ret = 0;
+
+ uint32_t subcmd = (uint32_t) cmd >> SUBCMDSHIFT;
+ uint32_t type = (uint32_t) cmd & SUBCMDMASK;
+
+ if (type != USRQUOTA && type != GRPQUOTA)
+ {
+ set_errno (EINVAL);
+ return -1;
+ }
+ switch (subcmd)
+ {
+ case Q_SYNC:
+ if (!special)
+ return 0;
+ access |= FILE_WRITE_DATA;
+ break;
+ case Q_QUOTAON:
+ if (id < QFMT_VFS_OLD || id > QFMT_VFS_V1)
+ {
+ set_errno (EINVAL);
+ return -1;
+ }
+ /*FALLTHRU*/
+ case Q_QUOTAOFF:
+ case Q_SETINFO:
+ access |= FILE_WRITE_DATA;
+ break;
+ case Q_GETFMT:
+ case Q_GETINFO:
+ break;
+ case Q_SETQUOTA:
+ access |= FILE_WRITE_DATA;
+ /*FALLTHRU*/
+ case Q_GETQUOTA:
+ /* Windows feature: Default limits. Get or set them with id == -1. */
+ if (id != -1)
+ {
+ if (type == USRQUOTA)
+ sid = sidfromuid (id, NULL);
+ else
+ sid = sidfromgid (id, NULL);
+ if (sid == NO_SID)
+ {
+ set_errno (EINVAL);
+ return -1;
+ }
+ }
+ break;
+ default:
+ set_errno (EINVAL);
+ return -1;
+ }
+ /* Check path */
+ pc.check (special, PC_SYM_FOLLOW | PC_NOWARN, stat_suffixes);
+ if (pc.error)
+ {
+ set_errno (pc.error);
+ return -1;
+ }
+ if (!pc.exists ())
+ {
+ set_errno (ENOENT);
+ return -1;
+ }
+ if (!S_ISBLK (pc.dev.mode))
+ {
+ set_errno (ENOTBLK);
+ return -1;
+ }
+ pc.get_object_attr (attr, sec_none_nih);
+ /* For the following functions to work, we must attach the virtual path to
+ the quota file to the device path.
+
+ FIXME: Note that this is NTFS-specific. Adding ReFS in another step. */
+ tp.u_get (&path);
+ RtlCopyUnicodeString (&path, attr.ObjectName);
+ RtlAppendUnicodeToString (&path, L"\\$Extend\\$Quota:$Q:$INDEX_ALLOCATION");
+ attr.ObjectName = &path;
+
+ /* Open filesystem */
+ status = NtOpenFile (&fh, access, &attr, &io, FILE_SHARE_VALID_FLAGS, 0);
+ if (NT_SUCCESS (status))
+ switch (subcmd)
+ {
+ case Q_SYNC:
+ /* No sync, just report success. */
+ status = STATUS_SUCCESS;
+ break;
+ case Q_QUOTAON:
+ case Q_QUOTAOFF:
+ /* Ignore filename in addr. */
+ status = NtQueryVolumeInformationFile (fh, &io, &ffci, sizeof ffci,
+ FileFsControlInformation);
+ if (!NT_SUCCESS (status))
+ break;
+ ffci.FileSystemControlFlags &= ~FILE_VC_QUOTA_ENFORCE
+ & ~FILE_VC_QUOTA_TRACK
+ & ~FILE_VC_QUOTAS_INCOMPLETE
+ & ~FILE_VC_QUOTAS_REBUILDING;
+ if (subcmd == Q_QUOTAON)
+ ffci.FileSystemControlFlags |= FILE_VC_QUOTA_ENFORCE;
+ status = NtSetVolumeInformationFile (fh, &io, &ffci, sizeof ffci,
+ FileFsControlInformation);
+ break;
+ case Q_GETFMT:
+ __try
+ {
+ uint32_t *retval = (uint32_t *) addr;
+
+ /* Always fake the latest format. */
+ *retval = QFMT_VFS_V1;
+ }
+ __except (EFAULT)
+ {
+ ret = -1;
+ break;
+ }
+ __endtry
+ status = STATUS_SUCCESS;
+ break;
+ case Q_GETINFO:
+ __try
+ {
+ struct dqinfo *dqi = (struct dqinfo *) addr;
+
+ dqi->dqi_bgrace = dqi->dqi_igrace = UINT64_MAX;
+ dqi->dqi_flags = 0;
+ dqi->dqi_valid = IIF_BGRACE | IIF_IGRACE;
+ }
+ __except (EFAULT)
+ {
+ ret = -1;
+ break;
+ }
+ __endtry
+ status = STATUS_SUCCESS;
+ break;
+ case Q_SETINFO:
+ /* No settings possible, just report success. */
+ status = STATUS_SUCCESS;
+ break;
+ case Q_GETQUOTA:
+ /* Windows feature: Default limits. Get or set them with id == -1. */
+ if (id == -1)
+ {
+ status = NtQueryVolumeInformationFile (fh, &io, &ffci, sizeof ffci,
+ FileFsControlInformation);
+ if (!NT_SUCCESS (status))
+ break;
+ __try
+ {
+ struct dqblk *dq = (struct dqblk *) addr;
+
+ dq->dqb_bhardlimit = (uint64_t) ffci.DefaultQuotaLimit.QuadPart;
+ if (dq->dqb_bhardlimit != UINT64_MAX)
+ dq->dqb_bhardlimit /= BLOCK_SIZE;
+ dq->dqb_bsoftlimit =
+ (uint64_t) ffci.DefaultQuotaThreshold.QuadPart;
+ if (dq->dqb_bsoftlimit != UINT64_MAX)
+ dq->dqb_bsoftlimit /= BLOCK_SIZE;
+ dq->dqb_curspace = 0;
+ dq->dqb_ihardlimit = UINT64_MAX;
+ dq->dqb_isoftlimit = UINT64_MAX;
+ dq->dqb_curinodes = 0;
+ dq->dqb_btime = UINT64_MAX;
+ dq->dqb_itime = UINT64_MAX;
+ dq->dqb_valid = QIF_BLIMITS;
+ }
+ __except (EFAULT)
+ {
+ ret = -1;
+ break;
+ }
+ __endtry
+ }
+ else
+ {
+ PFILE_GET_QUOTA_INFORMATION pgqi = (PFILE_GET_QUOTA_INFORMATION)
+ alloca (PGQI_SIZE);
+ PFILE_QUOTA_INFORMATION pfqi = (PFILE_QUOTA_INFORMATION)
+ alloca (PFQI_SIZE);
+
+ pgqi->NextEntryOffset = 0;
+ pgqi->SidLength = RtlLengthSid (sid);
+ RtlCopySid (RtlLengthSid (sid), &pgqi->Sid, sid);
+ status = NtQueryQuotaInformationFile (fh, &io, pfqi, PFQI_SIZE,
+ TRUE, pgqi, PGQI_SIZE,
+ NULL, TRUE);
+ if (!NT_SUCCESS (status))
+ break;
+ __try
+ {
+ struct dqblk *dq = (struct dqblk *) addr;
+
+ dq->dqb_bhardlimit = (uint64_t) pfqi->QuotaLimit.QuadPart;
+ if (dq->dqb_bhardlimit != UINT64_MAX)
+ dq->dqb_bhardlimit /= BLOCK_SIZE;
+ dq->dqb_bsoftlimit = (uint64_t) pfqi->QuotaThreshold.QuadPart;
+ if (dq->dqb_bsoftlimit != UINT64_MAX)
+ dq->dqb_bsoftlimit /= BLOCK_SIZE;
+ dq->dqb_curspace = (uint64_t) pfqi->QuotaUsed.QuadPart;
+ if (dq->dqb_curspace != UINT64_MAX)
+ dq->dqb_curspace /= BLOCK_SIZE;
+ dq->dqb_ihardlimit = UINT64_MAX;
+ dq->dqb_isoftlimit = UINT64_MAX;
+ dq->dqb_curinodes = 0;
+ dq->dqb_btime = UINT64_MAX;
+ dq->dqb_itime = UINT64_MAX;
+ dq->dqb_valid = QIF_BLIMITS | QIF_SPACE;
+ }
+ __except (EFAULT)
+ {
+ ret = -1;
+ break;
+ }
+ __endtry
+ }
+ break;
+ case Q_SETQUOTA:
+ /* Windows feature: Default limits. Get or set them with id == -1. */
+ if (id == -1)
+ {
+ status = NtQueryVolumeInformationFile (fh, &io, &ffci, sizeof ffci,
+ FileFsControlInformation);
+ if (!NT_SUCCESS (status))
+ break;
+ __try
+ {
+ struct dqblk *dq = (struct dqblk *) addr;
+
+ if (!(dq->dqb_valid & QIF_BLIMITS))
+ break;
+ ffci.DefaultQuotaLimit.QuadPart = dq->dqb_bhardlimit;
+ if (ffci.DefaultQuotaLimit.QuadPart != -1)
+ ffci.DefaultQuotaLimit.QuadPart *= BLOCK_SIZE;
+ ffci.DefaultQuotaThreshold.QuadPart = dq->dqb_bsoftlimit;
+ if (ffci.DefaultQuotaThreshold.QuadPart != -1)
+ ffci.DefaultQuotaThreshold.QuadPart *= BLOCK_SIZE;
+ }
+ __except (EFAULT)
+ {
+ ret = -1;
+ break;
+ }
+ __endtry
+ status = NtSetVolumeInformationFile (fh, &io, &ffci, sizeof ffci,
+ FileFsControlInformation);
+ }
+ else
+ {
+ PFILE_GET_QUOTA_INFORMATION pgqi = (PFILE_GET_QUOTA_INFORMATION)
+ alloca (PGQI_SIZE);
+ PFILE_QUOTA_INFORMATION pfqi = (PFILE_QUOTA_INFORMATION)
+ alloca (PFQI_SIZE);
+
+ pgqi->NextEntryOffset = 0;
+ pgqi->SidLength = RtlLengthSid (sid);
+ RtlCopySid (RtlLengthSid (sid), &pgqi->Sid, sid);
+ status = NtQueryQuotaInformationFile (fh, &io, pfqi, PFQI_SIZE,
+ TRUE, pgqi, PGQI_SIZE,
+ NULL, TRUE);
+ if (!NT_SUCCESS (status))
+ break;
+ __try
+ {
+ struct dqblk *dq = (struct dqblk *) addr;
+
+ if (!(dq->dqb_valid & QIF_BLIMITS))
+ break;
+ pfqi->QuotaLimit.QuadPart = dq->dqb_bhardlimit;
+ if (pfqi->QuotaLimit.QuadPart != -1)
+ pfqi->QuotaLimit.QuadPart *= BLOCK_SIZE;
+ pfqi->QuotaThreshold.QuadPart = dq->dqb_bsoftlimit;
+ if (pfqi->QuotaThreshold.QuadPart != -1)
+ pfqi->QuotaThreshold.QuadPart *= BLOCK_SIZE;
+ }
+ __except (EFAULT)
+ {
+ ret = -1;
+ break;
+ }
+ __endtry
+ status = NtSetQuotaInformationFile (fh, &io, pfqi, PFQI_SIZE);
+ }
+ break;
+ }
+ if (!NT_SUCCESS (status))
+ {
+ __seterrno_from_nt_status (status);
+ ret = -1;
+ }
+ return ret;
+}
diff --git a/winsup/cygwin/random.cc b/winsup/cygwin/random.cc
index fe1ac08fd..a6ae05543 100644
--- a/winsup/cygwin/random.cc
+++ b/winsup/cygwin/random.cc
@@ -299,7 +299,6 @@ dummy (unsigned volatile long *x)
void
srandomdev()
{
- int fd, done;
size_t len;
if (rand_type == TYPE_0)
@@ -307,15 +306,7 @@ srandomdev()
else
len = rand_deg * sizeof state[0];
- done = 0;
- fd = open("/dev/random", O_RDONLY, 0);
- if (fd >= 0) {
- if (read(fd, (void *) state, len) == (ssize_t) len)
- done = 1;
- close(fd);
- }
-
- if (!done) {
+ if (getentropy ((void *) state, len)) {
struct timeval tv;
unsigned long junk;
@@ -422,7 +413,7 @@ initstate(unsigned seed, /* seed for R.N.G. */
* complain about mis-alignment, but you should disregard these messages.
*/
char *
-setstate(const char *arg_state /* pointer to state array */)
+setstate(char *arg_state /* pointer to state array */)
{
uint32_t *new_state = (uint32_t *)arg_state;
uint32_t type = new_state[0] % MAX_TYPES;
diff --git a/winsup/cygwin/regex/regcomp.c b/winsup/cygwin/regex/regcomp.c
index b68db99c7..554b43ae3 100644
--- a/winsup/cygwin/regex/regcomp.c
+++ b/winsup/cygwin/regex/regcomp.c
@@ -1246,7 +1246,7 @@ freeset(struct parse *p, cset *cs)
static wint_t
singleton(cset *cs)
{
- wint_t i, s, n;
+ wint_t i, s = OUT, n;
for (i = n = 0; i < NC; i++)
if (CHIN(cs, i)) {
@@ -1803,7 +1803,10 @@ computematchjumps(struct parse *p, struct re_guts *g)
g->matchjump = (int*) malloc(g->mlen * sizeof(unsigned int));
if (g->matchjump == NULL) /* Not a fatal error */
+ {
+ free (pmatches);
return;
+ }
/* Set maximum possible jump for each character in the pattern */
for (mindex = 0; mindex < g->mlen; mindex++)
diff --git a/winsup/cygwin/registry.cc b/winsup/cygwin/registry.cc
index 632260aae..273067143 100644
--- a/winsup/cygwin/registry.cc
+++ b/winsup/cygwin/registry.cc
@@ -1,8 +1,5 @@
/* registry.cc: registry interface
- Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008, 2009, 2010, 2011, 2012 Red Hat, Inc.
-
This file is part of Cygwin.
This software is a copyrighted work licensed under the terms of the
@@ -19,7 +16,6 @@ details. */
#include "tls_pbuf.h"
#include "ntdll.h"
#include <wchar.h>
-#include <alloca.h>
/* Opens a key under the appropriate Cygwin key.
Do not use HKCU per MS KB 199190 */
@@ -213,96 +209,3 @@ reg_key::~reg_key ()
NtClose (key);
key_is_invalid = 1;
}
-
-/* The buffer path points to should be at least MAX_PATH bytes. */
-PWCHAR
-get_registry_hive_path (PCWSTR name, PWCHAR path)
-{
- if (!name || !path)
- return NULL;
-
- WCHAR key[256];
- UNICODE_STRING buf;
- tmp_pathbuf tp;
- tp.u_get (&buf);
- NTSTATUS status;
-
- RTL_QUERY_REGISTRY_TABLE tab[2] = {
- { NULL, RTL_QUERY_REGISTRY_NOEXPAND | RTL_QUERY_REGISTRY_DIRECT
- | RTL_QUERY_REGISTRY_REQUIRED,
- L"ProfileImagePath", &buf, REG_NONE, NULL, 0 },
- { NULL, 0, NULL, NULL, 0, NULL, 0 }
- };
- wcpcpy (wcpcpy (key, L"ProfileList\\"), name);
- status = RtlQueryRegistryValues (RTL_REGISTRY_WINDOWS_NT, key, tab,
- NULL, NULL);
- if (!NT_SUCCESS (status) || buf.Length == 0)
- {
- debug_printf ("ProfileImagePath for %W not found, status %y", name,
- status);
- return NULL;
- }
- ExpandEnvironmentStringsW (buf.Buffer, path, MAX_PATH);
- debug_printf ("ProfileImagePath for %W: %W", name, path);
- return path;
-}
-
-void
-load_registry_hive (PCWSTR name)
-{
- if (!name)
- return;
-
- /* Fetch the path. Prepend native NT path prefix. */
- tmp_pathbuf tp;
- PWCHAR path = tp.w_get ();
- if (!get_registry_hive_path (name, wcpcpy (path, L"\\??\\")))
- return;
-
- WCHAR key[256];
- PWCHAR path_comp;
- UNICODE_STRING ukey, upath;
- OBJECT_ATTRIBUTES key_attr, path_attr;
- NTSTATUS status;
-
- /* Create keyname and path strings and object attributes. */
- wcpcpy (wcpcpy (key, L"\\Registry\\User\\"), name);
- RtlInitUnicodeString (&ukey, key);
- InitializeObjectAttributes (&key_attr, &ukey, OBJ_CASE_INSENSITIVE,
- NULL, NULL);
- /* First try to load the "normal" registry hive, which is what the user
- is supposed to see under HKEY_CURRENT_USER. */
- path_comp = wcschr (path, L'\0');
- wcpcpy (path_comp, L"\\ntuser.dat");
- RtlInitUnicodeString (&upath, path);
- InitializeObjectAttributes (&path_attr, &upath, OBJ_CASE_INSENSITIVE,
- NULL, NULL);
- status = NtLoadKey (&key_attr, &path_attr);
- if (!NT_SUCCESS (status))
- {
- debug_printf ("Loading user registry hive %S into %S failed: %y",
- &upath, &ukey, status);
- return;
- }
- debug_printf ("Loading user registry hive %S into %S SUCCEEDED: %y",
- &upath, &ukey, status);
- /* If loading the normal hive worked, try to load the classes hive into
- the sibling *_Classes subkey, which is what the user is supposed to
- see under HKEY_CLASSES_ROOT, merged with the machine-wide classes. */
- wcscat (key, L"_Classes");
- RtlInitUnicodeString (&ukey, key);
- /* Path to UsrClass.dat changed in Vista to
- \\AppData\\Local\\Microsoft\\Windows\\UsrClass.dat
- but old path is still available via symlinks. */
- wcpcpy (path_comp, L"\\Local Settings\\Application Data\\Microsoft\\"
- "Windows\\UsrClass.dat");
- RtlInitUnicodeString (&upath, path);
- /* Load UsrClass.dat file into key. */
- status = NtLoadKey (&key_attr, &path_attr);
- if (!NT_SUCCESS (status))
- debug_printf ("Loading user classes hive %S into %S failed: %y",
- &upath, &ukey, status);
- else
- debug_printf ("Loading user classes hive %S into %S SUCCEEDED: %y",
- &upath, &ukey, status);
-}
diff --git a/winsup/cygwin/registry.h b/winsup/cygwin/registry.h
index 50d6345ab..eed640401 100644
--- a/winsup/cygwin/registry.h
+++ b/winsup/cygwin/registry.h
@@ -1,8 +1,5 @@
/* registry.h: shared info for cygwin
- Copyright 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
- 2011 Red Hat, Inc.
-
This file is part of Cygwin.
This software is a copyrighted work licensed under the terms of the
@@ -37,7 +34,3 @@ public:
~reg_key ();
};
-
-/* Evaluates path to the directory of the local user registry hive */
-PWCHAR __stdcall get_registry_hive_path (PCWSTR name, PWCHAR path);
-void __stdcall load_registry_hive (PCWSTR name);
diff --git a/winsup/cygwin/regparm.h b/winsup/cygwin/regparm.h
index 5b954261f..cce1bab4a 100644
--- a/winsup/cygwin/regparm.h
+++ b/winsup/cygwin/regparm.h
@@ -1,7 +1,5 @@
/* regparm.h: Define macros for regparm functions and methods.
- Copyright 2013 Red Hat, Inc.
-
This file is part of Cygwin.
This software is a copyrighted work licensed under the terms of the
diff --git a/winsup/cygwin/release/1.7.26 b/winsup/cygwin/release/1.7.26
new file mode 100644
index 000000000..ef838126c
--- /dev/null
+++ b/winsup/cygwin/release/1.7.26
@@ -0,0 +1,71 @@
+What's new:
+-----------
+
+- getaddrinfo now supports glibc-specific International Domain Name (IDN)
+ extension flags: AI_IDN, AI_CANONIDN, AI_IDN_ALLOW_UNASSIGNED,
+ AI_IDN_USE_STD3_ASCII_RULES.
+
+- getnameinfo now supports glibc-specific International Domain Name (IDN)
+ extension flags: NI_IDN, NI_IDN_ALLOW_UNASSIGNED, NI_IDN_USE_STD3_ASCII_RULES.
+
+- Preliminary, experimental support of the posix_spawn family of functions.
+ New associated header /usr/include/spawn.h.
+
+
+What changed:
+-------------
+
+- Slightly improve randomness of /dev/random emulation.
+
+- Allow to use advisory locking on any device. POSIX fcntl and lockf locking
+ works with any device, BSD flock locking only with devices backed by an OS
+ handle. Right now this excludes console windows on pre Windows 8, as well as
+ almost all virtual files under /proc from BSD flock locking.
+
+- The header /usr/include/exceptions.h, containing implementation details for
+ 32 bit Windows' exception handling only, has been removed.
+
+
+Bug fixes:
+----------
+
+- pthread_atparent hook should not be called in the child.
+ Fixes: http://cygwin.com/ml/cygwin/2013-09/msg00365.html
+
+- 64 bit only: Correctly mmap'ing regions > 4 Gigs.
+ Fixes: http://cygwin.com/ml/cygwin/2013-09/msg00155.html
+
+- Fix random content of /proc/$PID/ctty if the process has no controlling
+ tty. Set to just "\n" instead.
+
+- Properly set process sid rather than always using -1.
+ Fixes: http://cygwin.com/ml/cygwin/2013-10/threads.html#00237
+
+- Fix a potential crash after calling lseek on /dev/clipboard.
+
+- Fix a handle inheritance bug in raw disk and tape device handling which
+ led to EBADF errors in child processes.
+
+- open("/dev", O_CREAT) accidentally created a /dev file if no /dev
+ exists at the time.
+
+- DIR *d = opendir ("foo"); flock (dirfd (d), ...); worked, but did the
+ wrong thing.
+
+- Reading from /dev/windows was broken for some time.
+
+- select'ing on /dev/windows accidentally didn't take the setting of
+ ioctl (WINDOWS_HWND) into account.
+
+- Fix typos in cygcheck which could crash Windows 8 and 8.1 machines.
+ Fixes: http://cygwin.com/ml/cygwin/2013-11/msg00334.html
+
+- Show OS version correctly even on Windows 8.1 and Server 2012 R2.
+ Fixes: http://cygwin.com/ml/cygwin/2013-11/msg00343.html
+
+- dup2() could crash in some cases for a destination >= 256
+ Fixes: http://cygwin.com/ml/cygwin/2013-09/msg00397.html
+
+- Try to workaround the following problem: unlink(2) could fail, if the
+ file was opened casesensitive and has to be moved to the recycler due
+ to a sharing violation.
diff --git a/winsup/cygwin/release/1.7.27 b/winsup/cygwin/release/1.7.27
new file mode 100644
index 000000000..d1352fc99
--- /dev/null
+++ b/winsup/cygwin/release/1.7.27
@@ -0,0 +1,19 @@
+What changed:
+-------------
+
+- Don't create native symlinks with target paths having long path prefixes
+ "\\?\" if the target path is shorter than MAX_PATH characters. This works
+ around a Windows 8.1 bug: The ShellExecuteW fails if the lpFile parameter
+ points to a native NTFS symlink with a target path prefixed with "\\?\".
+ Fixes: http://cygwin.com/ml/cygwin/2013-12/msg00101.html
+
+
+Bug Fixes
+---------
+
+- Some devices, like, /dev/dsp are no longer detected due to the new
+ use of \Device\Null for devices which have no real handle.
+ Fixes: http://cygwin.com/ml/cygwin/2013-12/threads.html#00000
+
+- Cygwin could easily run out of file handles.
+ Fixes: http://cygwin.com/ml/cygwin/2013-12/threads.html#00000
diff --git a/winsup/cygwin/release/1.7.28 b/winsup/cygwin/release/1.7.28
new file mode 100644
index 000000000..a7f8494c0
--- /dev/null
+++ b/winsup/cygwin/release/1.7.28
@@ -0,0 +1,55 @@
+What's new:
+-----------
+
+- popen now supports the Glibc 'e' flag to set the FD_CLOEXEC flag on the pipe
+ in a thread-safe way.
+
+- netinet/ip6.h header.
+
+
+What changed:
+-------------
+
+- Switch to BSD FILE stream fopen/exit semantics, as in all BSD variants and
+ Linux/GLibc: Don't fflush/lseek a FILE stream on fclose and exit, if it
+ only has been read from.
+ See: http://cygwin.com/ml/cygwin/2014-01/msg00110.html
+
+
+Bug Fixes
+---------
+
+- Store and restore FPU control word and XMM registers when a signal is
+ handled.
+ Fixes: http://cygwin.com/ml/cygwin/2014-01/msg00075.html
+
+- Signals should no longer hang when they occur within a low-level
+ Windows DLL.
+ Fixes: http://cygwin.com/ml/cygwin/2013-12/threads.html#00151
+
+- If it turns out that transactions don't work during unlink(2) or rename(2),
+ despite the fact that the filesystem claims to handle them, stop transaction
+ and try again without.
+ Fixes: http://cygwin.com/ml/cygwin/2013-12/msg00119.html
+
+- Closing a dup'ed master tty handle should no longer invalidate the dup'ed fd.
+ Fixes: http://cygwin.com/ml/cygwin/2013-12/threads.html#00279
+
+- Problems where ps hangs when used in a pipeline should now be solved.
+ Fixes: http://cygwin.com/ml/cygwin/2013-12/threads.html#00262
+
+- Using gdb from a Windows console rather than a pty should no longer randomly
+ hang.
+
+- Fix locale-specific radix char handling in scanf family of functions.
+ Fixes: http://cygwin.com/ml/cygwin/2013-12/msg00294.html
+
+- The console buffer should no longer be cleared when the resolution of the
+ console exceeds some magic threshold.
+ Fixes: http://cygwin.com/ml/cygwin/2013-12/threads.html#00406
+
+- Fix inadvertent clearing of entire console buffer on clear screen.
+ See: http://cygwin.com/ml/cygwin/2014-01/msg00011.html
+
+- Make sure that stackdump file is closed after use.
+ See: http://cygwin.com/ml/cygwin/2014-01/threads.html#00029
diff --git a/winsup/cygwin/release/1.7.29 b/winsup/cygwin/release/1.7.29
new file mode 100644
index 000000000..4896934f6
--- /dev/null
+++ b/winsup/cygwin/release/1.7.29
@@ -0,0 +1,44 @@
+What's new:
+-----------
+
+- Allow quoting of arguments to the CYGWIN environment variable, i.e.,
+ set CYGWIN=error_start="c:\bin\someprogram -T"
+
+
+What changed:
+-------------
+
+
+Bug Fixes
+---------
+
+- Try harder to do the right thing in the presence of console screen buffers,
+ i.e., never clear the screen buffer unless the user asked for it. Also
+ fix screen escape sequences which attempted to scroll the screen.
+ Addresses: http://cygwin.com/ml/cygwin/2014-02/threads.html#00274
+
+- Make "ps -W" report different WINPIDs for processes that have been execed
+ from, e.g., cmd.
+ Addresses: http://cygwin.com/ml/cygwin/2014-02/threads.html#00382
+
+- Avoid error messages from the signal handler if we're exiting.
+ Addresses: A random irc #cygwin complaint.
+
+- Fix return value from getgrouplist function to behave like glibc.
+
+- Fix initialization of open_memstream which could lead to dropping the
+ entire string.
+ Addresses: http://cygwin.com/ml/cygwin/2014-03/threads.html#00413
+
+- Fix problem where ending chunk of audio was missing when accessing /dev/dsp.
+ Addresses: http://cygwin.com/ml/cygwin/2014-03/threads.html#00117
+
+- Fix exception handling on x86_64.
+ Addresses: http://cygwin.com/ml/cygwin/2014-03/threads.html#00026
+
+- Fix reading extended attributes from files on remote shares.
+ Addresses: A personally encountered spurious error message:
+ mv: listing attributes of `//server/share/file': Invalid argument
+
+- Fix sending an invalid pointer to cygserver during fork.
+ Addresses: http://cygwin.com/ml/cygwin/2014-04/msg00001.html
diff --git a/winsup/cygwin/release/1.7.30 b/winsup/cygwin/release/1.7.30
new file mode 100644
index 000000000..5d3e18d5b
--- /dev/null
+++ b/winsup/cygwin/release/1.7.30
@@ -0,0 +1,43 @@
+Bug Fixes
+---------
+
+- Only handle the minimum amount of exceptions required in internal Cygwin
+ SEGV handling.
+ Addresses: https://cygwin.com/ml/cygwin/2014-04/msg00132.html
+ https://cygwin.com/ml/cygwin/2014-04/msg00464.html
+ https://cygwin.com/ml/cygwin/2014-05/msg00361.html
+
+- Ignore setsockopt(IPV6_TCLASS). It always returns an error code on Windows.
+
+- Workaround a problem following native NTFS symlinks.
+ Addresses: https://cygwin.com/ml/cygwin/2014-04/msg00384.html
+
+- Fix `passwd -R' broken since 1.7.28.
+ Addresses: https://cygwin.com/ml/cygwin/2014-04/msg00446.html
+
+- Allow 0 length in calls to readv/writev.
+ Addresses: https://cygwin.com/ml/cygwin/2014-04/msg00509.html
+
+- Workaround Winsock not setting SO_ERROR on dup'ed socket after receiving
+ event on sibling socket.
+ Addresses: https://cygwin.com/ml/cygwin/2014-04/msg00510.html
+
+- Accept INADDR_ANY/in6addr_any to connect to local AF_INET/AF_INET6
+ address, as on Linux.
+ Addresses: https://cygwin.com/ml/cygwin/2014-04/msg00510.html
+
+- Workaround weird status codes returned when trying to run transactions
+ under a Perforce SCCS managed directory.
+ Addresses: https://cygwin.com/ml/cygwin/2014-04/msg00531.html
+
+- Return expected 4 bytes size from getsockopt(TCP_NODELAY), not 1 as
+ Winsock.
+ Addresses: https://cygwin.com/ml/cygwin/2014-04/msg00624.html
+
+- Ignore trailing whitespace on #! scripts.
+ Addresses: https://cygwin.com/ml/cygwin/2014-05/msg00022.html
+
+- Fix raw floppy drive handling broken since 1.7.19.
+ Addresses: https://cygwin.com/ml/cygwin/2014-05/msg00401.html
+
+- Fix handling of ioctl for /dev/dsp.
diff --git a/winsup/cygwin/release/1.7.31 b/winsup/cygwin/release/1.7.31
new file mode 100644
index 000000000..c54d96814
--- /dev/null
+++ b/winsup/cygwin/release/1.7.31
@@ -0,0 +1,42 @@
+What changed:
+-------------
+
+- Improve performance of send(2), sendto(2), sendmsg(2) when using small
+ input buffers.
+ Addresses: https://cygwin.com/ml/cygwin/2014-07/msg00069.html
+
+- The default pthread_mutex type is now PTHREAD_MUTEX_NORMAL, rather than
+ PTHREAD_MUTEX_ERRORCHECK, just as on Linux.
+
+- Align pthread_attr stack functions more closely to Linux.
+
+- Mark pthread_attr_getstackaddr and pthread_attr_setstackaddr as deprecated,
+ as on Linux.
+
+
+Bug Fixes
+---------
+
+- Fix various assorted bugs (potential buffer overruns, resource leaks, you
+ name it) caught by Coverity.
+
+- Fix return value of getgrouplist if the number of groups is bigger than the
+ application-provided buffer can hold.
+ See https://cygwin.com/ml/cygwin/2014-05/msg00469.html
+
+- Fix a spurious error condition in calls to getaddrinfo on x86_64.
+ Addresses: https://cygwin.com/ml/cygwin/2014-06/msg00350.html
+
+- Workaround a problem following native NTFS symlinks. This patch has been
+ not applied to 1.7.30, accidentally.
+ Addresses: https://cygwin.com/ml/cygwin/2014-04/msg00384.html
+
+- Fix an off-by-one bug in res_querydomain.
+ Addresses: https://cygwin.com/ml/cygwin/2014-07/msg00052.html
+
+- Don't catch STATUS_STACK_OVERFLOW preliminary on 64 bit.
+ Fixes: https://cygwin.com/ml/cygwin/2014-07/msg00046.html
+
+- Make sure that signals are properly delivered when sending lots of signals
+ in succession.
+ Fixes: https://cygwin.com/ml/cygwin/2014-07/threads.html#00149
diff --git a/winsup/cygwin/release/1.7.32 b/winsup/cygwin/release/1.7.32
new file mode 100644
index 000000000..e4386b798
--- /dev/null
+++ b/winsup/cygwin/release/1.7.32
@@ -0,0 +1,23 @@
+What's new:
+-----------
+
+- Export __cxa_atexit and __cxa_finalize to allow C++ standards-compliant
+ destructor handling in libstdc++ and g++ compiled code.
+
+ Please note that, in order to benefit from this new feature, C++ code
+ must be recompiled with the upcoming gcc 4.8.3-3 release which will
+ enable the -fuse-cxa-atexit flag by default, and that C++ applications
+ using this feature will not run on older Cygwin releases.
+
+- Support more recent CPU flags in /proc/cpuinfo.
+
+
+Bug Fixes
+---------
+
+- Decorate attribute names with __, for namespace safety in various header
+ files.
+ Addresses: https://cygwin.com/ml/cygwin/2014-07/msg00371.html
+
+- Fix sys/file.h for using in C++ code.
+ Addresses: https://cygwin.com/ml/cygwin/2014-08/msg00122.html
diff --git a/winsup/cygwin/release/1.7.33 b/winsup/cygwin/release/1.7.33
new file mode 100644
index 000000000..0875e48a9
--- /dev/null
+++ b/winsup/cygwin/release/1.7.33
@@ -0,0 +1,80 @@
+What's new:
+-----------
+
+- /proc/cygdrive is a new symlink pointing to the current cygdrive prefix.
+ This can be utilized in scripts to access paths via cygdrive prefix, even
+ if the cygdrive prefix has been changed by the user.
+
+- /proc/partitions now prints the windows mount points the device is mounted
+ on. This allows to recognize the underlying Windows devices of the Cygwin
+ raw device names.
+
+- New API: quotactl, designed after the Linux/BSD function, but severely
+ restricted: Windows only supports user block quotas on NTFS, no group
+ quotas, no inode quotas, no time constraints.
+
+- New APIs: ffsl, ffsll (glibc extensions).
+
+- New API: stime (SVr4).
+
+
+What changed:
+-------------
+
+- New internal exception handling based on SEH on 64 bit Cygwin.
+
+- When exec'ing applications, check if $PATH exists and is non-empty. If not,
+ add PATH variable with Cygwin installation directory as content to Windows
+ environment to allow loading of Cygwin system DLLs.
+
+- Disable CYGWIN "dosfilewarning" option by default.
+
+- Improve various header files for C++- and standards-compliance.
+
+- Doug Lea malloc implementation update from 2.8.3 to the latest 2.8.6.
+
+- atexit is now exported as statically linked function from libcygwin.a.
+ This allows reliable access to the DSO handle of the caller for newly
+ built executables. The former atexit entry point into the DLL remains
+ for backward compatibility only.
+
+
+Bug Fixes
+---------
+
+- Per POSIX, dirfd(3) now returns EINVAL rather than EBADF on invalid
+ directory stream.
+
+- Fix a resource leak in rmdir(2).
+
+- Fix fchmod(2)/fchown(2)/fsetxattr(2) in case the file got renamed after
+ open and before calling one of the affected functions.
+ Addresses: https://cygwin.com/ml/cygwin/2014-08/msg00517.html
+
+- Handle Netapp-specific problem in statvfs(2)/fstatvfs(2).
+ Addresses: https://cygwin.com/ml/cygwin/2014-06/msg00425.html
+
+- Fix chown(2) on ptys in a corner case.
+
+- Generate correct error when a path is inaccessible due to missing permissions.
+ Addresses: https://cygwin.com/ml/cygwin-developers/2014-10/msg00010.html
+
+- Don't hang in accept calls if socket is no listener. Set errno to EINVAL
+ instead.
+
+- Don't allow seeking on serial lines and sockets. Set errno to ESPIPE
+ instead.
+ Addresses: https://cygwin.com/ml/cygwin/2014-08/msg00319.html
+
+- Fix output of /proc/<PID>/statm.
+
+- Fix a SEGV in cygcheck if the environment variable COMSPEC is not, or
+ incorrectly set.
+ Addresses: https://cygwin.com/ml/cygwin/2014-10/msg00292.html
+
+- Fix a SEGV in some 64 bit applications explicitely dlclosing DLLs.
+ Addresses: https://cygwin.com/ml/cygwin/2014-10/msg00402.html
+
+- Fix -fuse-cxa-atexit handling where dlclose fails to trigger calling
+ global dtors in dynamically loaded modules in C++ applications (and
+ thus another potential SEGV).
diff --git a/winsup/cygwin/release/1.7.34 b/winsup/cygwin/release/1.7.34
new file mode 100644
index 000000000..3473736bc
--- /dev/null
+++ b/winsup/cygwin/release/1.7.34
@@ -0,0 +1,94 @@
+What's new:
+-----------
+
+- Cygwin can now generate passwd/group entries directly from Windows
+ user databases (local SAM or Active Directory), thus allowing to run
+ Cygwin without having to create /etc/passwd and /etc/group files.
+ Introduce /etc/nsswitch.conf file to configure passwd/group handling.
+
+ For bordercase which require to use /etc/passwd and /etc/group files,
+ change mkpasswd/mkgroup to generate passwd/group entries compatible
+ with the entries read from SAM/AD.
+
+- Add -b/--remove-all option to setfacl to reduce the ACL to only the
+ entries representing POSIX permission bits.
+
+- Add -k/--remove-default option to setfacl to remove all default ACL
+ entries from an ACL.
+
+- Add restore action to regtool.
+
+- Provide Cygwin documentation (PDFs and HTML) for offline usage in
+ /usr/share/doc/cygwin-${version}.
+
+- Make gethostbyname2 handle numeric host addresses as well as the reserved
+ domain names "localhost" and "invalid" per RFC 6761.
+
+- New APIs: qsort_r, __bsd_qsort_r.
+
+- New API: wcstold.
+
+- New APIs: __fbufsize, __flbf, __fpending, __freadable, __freading,
+ __fsetlocking, __fwritable, __fwriting.
+
+- New APIs: clearerr_unlocked, feof_unlocked, ferror_unlocked, fflush_unlocked,
+ fgetc_unlocked, fgets_unlocked, fgetwc_unlocked, fgetws_unlocked,
+ fileno_unlocked, fputc_unlocked, fputs_unlocked, fputwc_unlocked,
+ fputws_unlocked, fread_unlocked, fwrite_unlocked, getwc_unlocked,
+ getwchar_unlocked, putwc_unlocked, putwchar_unlocked.
+
+- New API: sockatmark.
+
+
+What changed:
+-------------
+
+- Revamp Solaris ACL implementation to more closely work like POSIX ACLs
+ are supposed to work. Finally implement a CLASS_OBJ emulation. Update
+ getfacl(1)/setfacl(1) accordingly.
+
+- The xdr functions are no longer exported for newly built executables.
+ Use libtirpc-devel instead.
+
+- 32 bit only: Change default values for socket buffer size to raise
+ performance on 10Gb networks.
+
+- When spawning a process under another user account, merge the user's
+ default Windows environment into the new process' environment.
+
+
+Bug Fixes
+---------
+
+- Fix the problem that ptys master side always writes single byte packages
+ to the slave side, and pty slaves always read VMIN byte packages from
+ the master side if VMIN is > 0.
+ Fixes: https://cygwin.com/ml/cygwin-developers/2014-11/msg00000.html
+
+- Fix a synchronization problem in signal handling when using pthreads.
+ Addresses: https://cygwin.com/ml/cygwin/2014-11/msg00472.html
+
+- Fix an "invalid handle" problem when using flock(2) with a parent process
+ holding the lock.
+ Addresses: https://cygwin.com/ml/cygwin/2014-12/msg00012.html
+
+- Load correct timezone offsets when fetching timezone info from
+ zoneinfo files. Use tm_gmtoff and tm_zone members in strftime to
+ generate more correct timezone info for non-recent eras.
+ Addresses: https://cygwin.com/ml/cygwin/2014-12/msg00313.html
+
+- Fix type of cmsg_len member of struct cmsghdr in /usr/include/cygwin/socket.h
+ to size_t to align with Winsock.
+ Addresses: https://cygwin.com/ml/cygwin/2014-12/msg00376.html
+
+- Fix a problem in the resolver trying to resolve "localhost".
+ Addresses: https://cygwin.com/ml/cygwin/2015-01/msg00044.html
+
+- Update Cygserver's idea of signal handling to the latest state of
+ per-thread signalling in Cygwin.
+ Addresses: https://cygwin.com/ml/cygwin/2015-01/msg00259.html
+ https://cygwin.com/ml/cygwin/2015-01/msg00269.html
+
+- Fix handling of /proc/$PID/fd/... paths with trailing path components
+ beyond the symlink path itself.
+ Addresses: https://cygwin.com/ml/cygwin/2015-01/msg00293.html
diff --git a/winsup/cygwin/release/1.7.35 b/winsup/cygwin/release/1.7.35
new file mode 100644
index 000000000..6773f758e
--- /dev/null
+++ b/winsup/cygwin/release/1.7.35
@@ -0,0 +1,90 @@
+What's new:
+-----------
+
+- New APIs: cabsl, cimagl, creall, finitel, hypotl, sqrtl.
+
+- New API: issetugid.
+
+
+What changed:
+-------------
+
+- Performance improvements of the new account DB handling.
+
+- Since 1.7.34, chmod does not always affect the POSIX permission mask as
+ returned by stat(2) or printed by ls(1), due to the improved POSIX ACL
+ handling. However, that's still far from perfect, so, as a temporary
+ workaround, chmod now checks if secondary groups and users in the ACL
+ have more permissions than the primary group. If so, the permissions
+ of the secondary users and groups will be reduced according to the mask
+ given by the new primary group permissions. I.e, chmod 600 will remove
+ all permissions from the primary group as well as all secondary user and
+ group entries in the ACL.
+
+- Change handling of group permissions if owner SID == group SID. Now the
+ group permissions don't mirror the user permissions anymore, thus leading
+ to less hassle with security-conscious applications.
+
+- Allow group SID to be the same as owner SID for "Microsoft Accounts".
+ Those have the group in their user token set to the owner SID by default.
+ Drop the workaround to change their primary group to "Users". It's not
+ required anymore due to the aforementioned changes.
+
+- Change getfacl long options from --all to --access and from --dir to
+ --default, along the lines of the Linux getfacl tool.
+
+- Don't raise a SIGSYS signal in the XSI IPC functions if cygserver is not
+ running. Just return -1 with errno set to ENOSYS.
+
+
+Bug Fixes
+---------
+
+- Fix /proc/cpuinfo multicore info on Intel CPUs.
+ Addresses: https://cygwin.com/ml/cygwin-apps/2015-02/msg00077.html
+
+- Generate unique inode number for /dev/tty under all circumstances.
+ Addresses: https://cygwin.com/ml/cygwin/2015-02/msg00211.html
+
+- Fix handling of PATH search in execlp and other calls to honor mount flags.
+ Addresses: https://cygwin.com/ml/cygwin/2015-02/msg00119.html
+
+- Remove a debug message accidentally printed to the terminal window
+ if an application calls fcntl(F_SETFL) erroneously.
+
+- Two regressions in 1.7.34 acl(SETACL, ...):
+
+ - SETACL overwrote the incoming acltent_t array for bookkeeping purposes
+ while iterating over its entries. This broke reusing the acl in the
+ calling application (e.g. setfacl).
+ Addresses: https://cygwin.com/ml/cygwin/2015-02/msg00304.html
+
+ - SETACL accidentally missed to grant owner FILE_WRITE_ATTRIBUTES access.
+ Addresses: https://cygwin.com/ml/cygwin/2015-02/msg00457.html
+
+- Keep SETACL from duplicating user/group deny/allow ACEs if owner SID is
+ the same as group SID.
+
+- When creating directories, keep permissions inherited from parent directory
+ inheritable, per POSIX 1003.1e.
+
+- 64 bit: Export forgotten symbol __mempcpy.
+ Addresses: https://cygwin.com/ml/cygwin/2015-02/msg00394.html
+
+- 64 bit: Avoid misbehaviour in signal mask computation.
+ Addresses: https://cygwin.com/ml/cygwin/2015-02/msg00665.html
+
+- Avoid data loss on non-blocking pipes after switching back to blocking.
+ Addresses: https://cygwin.com/ml/cygwin/2015-02/msg00575.html
+
+- Fix a potential heap corruption in mkgroup and mkpasswd when enumerating
+ Unix users.
+
+- Regression in 1.7.34: A patch to the pty handling fixing the problem
+ reported in https://cygwin.com/ml/cygwin-developers/2014-11/msg00000.html
+ was incomplete and lead to undesired buffering in non-canonical mode.
+ This should be fixed now.
+ Addresses: https://cygwin.com/ml/cygwin/2015-02/msg00608.html
+
+- Fix signal handling in a few functions.
+ Partially addresses: https://cygwin.com/ml/cygwin/2015-02/msg00762.html
diff --git a/winsup/cygwin/release/2.0.0 b/winsup/cygwin/release/2.0.0
new file mode 100644
index 000000000..08d44502b
--- /dev/null
+++ b/winsup/cygwin/release/2.0.0
@@ -0,0 +1,51 @@
+What's new:
+-----------
+
+- basename(3) now comes in two flavors, POSIX and GNU. The POSIX version is
+ the default. You get the GNU version after
+
+ #define _GNU_SOURCE
+ #include <string.h>
+
+
+What changed:
+-------------
+
+- The maximum number of PTYs has been raised from 64 to 128.
+
+
+Bug Fixes
+---------
+
+- Fix potential hang in pseudo ttys when generating ECHO output while the slave
+ is flooding the pty with output.
+ Addresses: https://cygwin.com/ml/cygwin/2015-03/msg00019.html
+
+- Fix potential premature SIGHUP in pty code.
+ Addresses: https://cygwin.com/ml/cygwin/2015-03/msg00070.html
+
+- Fix a name change from symlink to target name in calls to execvp, system, etc.
+ Addresses: https://cygwin.com/ml/cygwin/2015-03/msg00270.html
+
+- Fix internal error in pty -ONLCR handling. Fix timing bug in pty OPOST
+ handling.
+ Addresses: https://cygwin.com/ml/cygwin/2015-02/msg00929.html
+
+- Avoid creating passwd and group records from fully qualified Windows
+ account names (domain\name, name@domain).
+ Addresses: https://cygwin.com/ml/cygwin/2015-03/msg00528.html
+
+- Avoid potential crash at startup or in getgroups(2).
+ Addresses: https://cygwin.com/ml/cygwin/2015-04/msg00010.html
+
+- Fix UTF-16 surrogate handling in wctomb and friends.
+ Addresses: https://cygwin.com/ml/cygwin/2015-03/msg00452.html
+
+- Fix shmget usage of size parameter for already existing segments.
+ Addresses: https://cygwin.com/ml/cygwin/2015-04/msg00105.html
+
+- Fix how in-use files on virtual drives created via subst are moved to
+ the recycler in unlink(2).
+ Addresses: https://cygwin.com/ml/cygwin/2015-04/msg00527.html
+
+- Fix how in-use files on Samba drives are renamed in unlink(2).
diff --git a/winsup/cygwin/release/2.0.1 b/winsup/cygwin/release/2.0.1
new file mode 100644
index 000000000..3d10d8d9a
--- /dev/null
+++ b/winsup/cygwin/release/2.0.1
@@ -0,0 +1,8 @@
+Bug Fixes
+---------
+
+- Fix type check for base type of int32_t/uint32_t.
+ Addresses: https://cygwin.com/ml/cygwin/2015-04/msg00602.html
+
+- Fix a bug in SID conversion per RFC2307 on Samba shares.
+ Addresses: https://cygwin.com/ml/cygwin/2015-04/msg00636.html
diff --git a/winsup/cygwin/release/2.0.3 b/winsup/cygwin/release/2.0.3
new file mode 100644
index 000000000..910590727
--- /dev/null
+++ b/winsup/cygwin/release/2.0.3
@@ -0,0 +1,8 @@
+Bug Fixes
+---------
+
+- Fix potential memory leak in argz_replace.
+ Addresses: https://sourceware.org/ml/newlib/2015/msg00417.html
+
+- Fix potential hang when accessing pty's in a certain way.
+ Addresses: https://cygwin.com/ml/cygwin/2015-05/msg00221.html
diff --git a/winsup/cygwin/release/2.0.4 b/winsup/cygwin/release/2.0.4
new file mode 100644
index 000000000..f9bddb568
--- /dev/null
+++ b/winsup/cygwin/release/2.0.4
@@ -0,0 +1,18 @@
+Bug Fixes
+---------
+
+- Handle SIGHUP in pty master close.
+ Addresses: https://cygwin.com/ml/cygwin/2015-06/msg00133.html
+ https://cygwin.com/ml/cygwin/2011-07/msg00295.html
+
+- Avoid fetching /proc process info from non-Cygwin processes.
+ Addresses: https://cygwin.com/ml/cygwin/2015-06/msg00133.html
+ https://cygwin.com/ml/cygwin/2015-05/msg00331.html
+ https://cygwin.com/ml/cygwin/2015-05/msg00314.html
+
+- Fix installing newly added bind mounts with `mount -a'.
+ Addresses: https://cygwin.com/ml/cygwin/2015-06/msg00150.html
+
+- Add missing evaluation of /proc/$PID/{root,cwd,cmdline} for native processes.
+ Addresses: https://cygwin.com/ml/cygwin/2015-06/msg00173.html
+
diff --git a/winsup/cygwin/release/2.1.0 b/winsup/cygwin/release/2.1.0
new file mode 100644
index 000000000..1b9e19f97
--- /dev/null
+++ b/winsup/cygwin/release/2.1.0
@@ -0,0 +1,39 @@
+What's new:
+-----------
+
+- Handle pthread stacksizes as in GLibc: Default to RLIMIT_STACK resource.
+ Allow to set RLIMIT_STACK via setrlimit. Default RLIMIT_STACK to value
+ from executable header as described on
+ https://msdn.microsoft.com/en-us/library/windows/desktop/ms686774.aspx
+ Default stacksize to 2 Megs in case RLIMIT_STACK is set to RLIM_INFINITY.
+
+- First cut of an implementation to allow signal handlers running on an
+ alternate signal stack.
+
+- New API sigaltstack, plus definitions for SA_ONSTACK, SS_ONSTACK, SS_DISABLE,
+ MINSIGSTKSZ, SIGSTKSZ.
+
+- New API: sethostname.
+
+
+What changed:
+-------------
+
+
+Bug Fixes
+---------
+
+- Enable non-SA_RESTART behaviour on threads other than main thread.
+ Addresses: https://cygwin.com/ml/cygwin/2015-06/msg00260.html
+
+- Try to handle concurrent close on socket more gracefully
+ Addresses: https://cygwin.com/ml/cygwin/2015-06/msg00235.html
+
+- Fix fork failing after the parent recovered from a stack overflow.
+ Addresses: https://cygwin.com/ml/cygwin/2015-06/msg00384.html
+
+- Fix a crash on 64 bit XP/2003 when opening /proc/$PID/maps.
+
+- Apparently on some Windows systems timezones differ in case
+ from the standard. Fix the tzset tool to check case-insensitive.
+ Addresses: https://cygwin.com/ml/cygwin/2015-07/msg00113.html
diff --git a/winsup/cygwin/release/2.2.0 b/winsup/cygwin/release/2.2.0
new file mode 100644
index 000000000..291283e6a
--- /dev/null
+++ b/winsup/cygwin/release/2.2.0
@@ -0,0 +1,30 @@
+What's new:
+-----------
+
+- New APIs: getcontext, setcontext, makecontext, swapcontext.
+
+- New functions: sigsetjmp, siglongjmp.
+ These were only available as macros up to now, but POSIX requires that
+ siglongjmp has to be available as function.
+
+
+What changed:
+-------------
+
+- When started from a non-Cygwin process, check if $HOME starts with a
+ slash (absolute POSIX path). Otherwise ignore it.
+ Addresses: https://cygwin.com/ml/cygwin/2015-07/msg00344.html
+
+
+Bug Fixes
+---------
+
+- Fix potential hang running ldd(1).
+ Addresses: https://cygwin.com/ml/cygwin/2015-07/msg00292.html
+
+- Fix crashes under AllocationPreference=0x100000 condition
+ Addresses: https://cygwin.com/ml/cygwin/2015-02/msg00765.html
+
+- x86_64 only: Implement memset, memmove, memcpy, wmemmove, wmemcpy in
+ assembler derived from NetBSD.
+ Addresses: https://cygwin.com/ml/cygwin-patches/2015-q3/msg00010.html
diff --git a/winsup/cygwin/release/2.2.1 b/winsup/cygwin/release/2.2.1
new file mode 100644
index 000000000..24a4b8187
--- /dev/null
+++ b/winsup/cygwin/release/2.2.1
@@ -0,0 +1,29 @@
+Bug Fixes
+---------
+
+- Revert the following patch from 2.2.0:
+ When started from a non-Cygwin process, check if $HOME starts with a
+ slash (absolute POSIX path). Otherwise ignore it.
+ Addresses discussion starting at
+ https://cygwin.com/ml/cygwin/2015-08/msg00048.html
+
+- Fix output of /proc/cpuinfo in terms of cpu topology and cache size for
+ modern CPUs and modern Windows OSes supporting more than 64 logical CPUs.
+ Addresses: https://cygwin.com/ml/cygwin/2015-06/msg00345.html
+
+- Don't call LsaLookupSids to fetch group information and don't perform RFC2307
+ owner/group mapping on Samba/NFS if account info is only fetched from local
+ passwd/group files.
+ Addresses: https://cygwin.com/ml/cygwin/2015-07/msg00270.html
+
+- Precautionally fix a potential data corruption problem in pipe I/O, only
+ actually observered in Wine yet. However, MSDN language indicates this
+ might be a problem on real Windows as well.
+ Addresses: https://cygwin.com/ml/cygwin/2015-08/msg00225.html
+
+- Include <sys/ucontext.h> from <sys/signal.h> if compiling for POSIX.1-2008.
+ Addresses: https://cygwin.com/ml/cygwin/2015-08/msg00266.html
+
+- getservent(3) returned the port number in host byte order. Change that to
+ network byte order as required.
+ Addresses: https://cygwin.com/ml/cygwin/2015-08/msg00301.html
diff --git a/winsup/cygwin/release/2.3.0 b/winsup/cygwin/release/2.3.0
new file mode 100644
index 000000000..737555510
--- /dev/null
+++ b/winsup/cygwin/release/2.3.0
@@ -0,0 +1,70 @@
+What's new:
+-----------
+
+- strftime(3) supports %s (seconds since Epoch) now.
+
+- posix_madvise(POSIX_MADV_WILLNEED) now utilizes OS functionality available
+ starting with Windows 8/Server 2012. Still a no-op on older systems.
+
+- posix_madvise(POSIX_MADV_DONTNEED) now utilizes OS functionality available
+ starting with Windows 8.1/Server 2012R2. Still a no-op on older systems.
+
+- sysconf() now supports returning CPU cache information:
+ _SC_LEVEL1_ICACHE_SIZE, _SC_LEVEL1_ICACHE_ASSOC, _SC_LEVEL1_ICACHE_LINESIZE,
+ _SC_LEVEL1_DCACHE_SIZE, _SC_LEVEL1_DCACHE_ASSOC, _SC_LEVEL1_DCACHE_LINESIZE,
+ _SC_LEVEL2_CACHE_SIZE, _SC_LEVEL2_CACHE_ASSOC, _SC_LEVEL2_CACHE_LINESIZE,
+ _SC_LEVEL3_CACHE_SIZE, _SC_LEVEL3_CACHE_ASSOC, _SC_LEVEL3_CACHE_LINESIZE,
+ _SC_LEVEL4_CACHE_SIZE, _SC_LEVEL4_CACHE_ASSOC, _SC_LEVEL4_CACHE_LINESIZE
+
+- New API: aligned_alloc, at_quick_exit, quick_exit.
+
+
+What changed:
+-------------
+
+- Add support for Parallels Desktop FS (prlfs).
+
+
+Bug Fixes
+---------
+
+- Fix a hang when stracing a forking or spawning process without activating
+ stracing of child processes.
+ Addresses: https://cygwin.com/ml/cygwin/2015-08/msg00390.html
+
+- Fix long-standing potential SEGV on 32 bit Cygwin when the dynamic loader
+ for OS functions fails to load a function on Windows 7 or later.
+ Addresses: No actual bug report known.
+
+- sysconf _SC_NPROCESSORS_CONF and _SC_NPROCESSORS_ONLN now handle more than
+ 64 CPUs on Windows 7 and later.
+
+- Fix a potential crash in advisory file locking due to usage of stack space
+ out of scope.
+ Addresses: https://cygwin.com/ml/cygwin/2015-09/msg00079.html
+
+- Fix EIO error accessing certain (OS X SMB?) drives
+ Addresses: https://cygwin.com/ml/cygwin/2015-09/msg00229.html
+
+- Fix memory leak in calls to pthread_getattr_np.
+
+- Fix output of /proc/<PID>/winexename.
+
+- Avoid SEGV when handling SIDs with 0 subauthorities.
+ Addresses: https://cygwin.com/ml/cygwin/2015-10/msg00141.html
+
+- Fix a potential SEGV on (at least) Wine.
+ Addresses: https://cygwin.com/ml/cygwin/2015-10/msg00018.html
+
+- Fix sigwait(3) to return errno instead of -1 and never to return with EINTR.
+
+- Fix pthread_kill(3) to return errno instead of -1.
+
+- Remove lingering pending signals after a thread exited.
+ Addresses: https://cygwin.com/ml/cygwin/2015-09/msg00197.html
+
+- Workaround a bug in Windows 10 NLS handling.
+ Addresses: https://cygwin.com/ml/cygwin/2015-10/msg00547.html
+
+- Avoid unnecessry locking and thus a potential deadlock in flock(2).
+ Addresses: https://cygwin.com/ml/cygwin/2015-11/msg00095.html
diff --git a/winsup/cygwin/release/2.3.1 b/winsup/cygwin/release/2.3.1
new file mode 100644
index 000000000..a552ee812
--- /dev/null
+++ b/winsup/cygwin/release/2.3.1
@@ -0,0 +1,19 @@
+What's new:
+-----------
+
+
+What changed:
+-------------
+
+
+Bug Fixes
+---------
+
+- The fix for wine introduced in 2.3.0 crashes in 32 bit Cygwin on 64 bit XP
+ and 64 bit Server 2003 only. This should work now.
+ Addresses: https://cygwin.com/ml/cygwin/2015-11/msg00187.html
+
+- The fix to avoid a potential crash in advisory file locking introduced in
+ 2.3.0 waas not entirely correct and failed to work in certain border cases.
+ This should work now.
+ Addresses: https://cygwin.com/ml/cygwin/2015-11/msg00189.html
diff --git a/winsup/cygwin/release/2.4.0 b/winsup/cygwin/release/2.4.0
new file mode 100644
index 000000000..6247fb8f4
--- /dev/null
+++ b/winsup/cygwin/release/2.4.0
@@ -0,0 +1,86 @@
+What's new:
+-----------
+
+- New, unified implementation of POSIX permission and ACL handling. The
+ new ACLs now store the POSIX ACL MASK/CLASS_OBJ permission mask, and
+ they allow to inherit the S_ISGID bit. ACL inheritance now really
+ works as desired, in a limited, but theoretically equivalent fashion
+ even for non-Cygwin processes.
+
+ To accommodate standard Windows ACLs, the POSIX permissions of the
+ owner and all other users in the ACL are computed using the Windows
+ AuthZ API. This may slow down the computation of POSIX permissions
+ noticably in some circumstances, but is generally more correct. The
+ new code also ignores SYSTEM and Administrators group permissions when
+ computing the MASK/CLASS_OBJ permission mask on old ACLs, and it
+ doesn't deny access to SYSTEM and Administrators group based on the
+ value of MASK/CLASS_OBJ when creating the new ACLs.
+
+ The new code now handles the S_ISGID bit on directories as on Linux:
+ Setting S_ISGID on a directory causes new files and subdirs created
+ within to inherit its group, rather than the primary group of the user
+ who created the file. This only works for files and directories
+ created by Cygwin processes.
+
+- New mount type "usertemp" which allows to mount a POSIX directory to
+ the Windows per-user temporary directory.
+
+- cygpath has a new -U option, which creates cygdrive paths using the
+ unambiguous /proc/cygdrive prefix.
+
+- New API: rpmatch.
+
+
+What changed:
+-------------
+
+- Align setfacl(1) usage a bit closer to the usage on Linux. Rename -d option
+ to -x, --substitute to --set. Add --no-mask and --mask options. Allow to
+ use the -b and -k option combined to allow reducing an ACL to only reflect
+ standard POSIX permissions.
+
+- Fix (numeric and monetary) decimal point and thousands separator in
+ fa_IR and ps_AF locales to be aligned with Linux.
+
+- utmpname/utmpxname are now defined as int functions as on Linux.
+ Addresses: https://cygwin.com/ml/cygwin/2015-12/msg00320.html
+
+
+Bug Fixes
+---------
+
+- Not a bug fix as such, but a workaround for new behaviour in Windows 10
+ version 1511 64 bit. This version introduces a problem which existed in
+ a similar variation (just vice versa) in XP and Server 2003 64 bit as well.
+ An unexpected stack arrangement when starting a 64 bit Cygwin application
+ from a 32 bit application (e.g. 32 bit CMD.EXE) broke Cygwin's fork.
+ Addresses: https://cygwin.com/ml/cygwin/2015-12/msg00003.html
+
+- Replaced old, buggy strtold implementation with well-tested gdtoa version
+ from David M. Gay.
+ Addresses: https://cygwin.com/ml/cygwin/2015-11/msg00205.html
+
+- Fix handling of relative paths in native symlinks if the target is in a
+ drive's root dir or one level below.
+ Addresses: https://cygwin.com/ml/cygwin/2015-11/msg00277.html
+
+- Fix a SEGV when calling `kill -l 0'.
+ Addresses: https://cygwin.com/ml/cygwin/2015-11/msg00430.html
+
+- Fix a race condition in signal handling.
+ Addresses: https://cygwin.com/ml/cygwin/2015-11/msg00387.html
+
+- Fix a potential crash reading invalid passwd and group entries from
+ /etc/passwd and /etc/group.
+ Addresses: https://cygwin.com/ml/cygwin/2015-12/msg00170.html
+
+- Cygpath(1) now tries to correct the case of system directories when
+ returned as POSIX paths.
+ Addresses: https://cygwin.com/ml/cygwin/2016-01/msg00002.html
+
+- *Always* zero out descriptor arrays when returning from select due to
+ timeout, per POSIX.
+ Addresses: https://cygwin.com/ml/cygwin/2015-12/msg00332.html
+
+- Return unique inode numbers when calling stat/fstat on pipes and IP sockets.
+ Addresses: https://cygwin.com/ml/cygwin/2015-12/msg00310.html
diff --git a/winsup/cygwin/release/2.4.1 b/winsup/cygwin/release/2.4.1
new file mode 100644
index 000000000..ee2ae4385
--- /dev/null
+++ b/winsup/cygwin/release/2.4.1
@@ -0,0 +1,12 @@
+Bug Fixes
+---------
+
+- The cygpath(1) patch to correct the case of system directories when
+ returned as POSIX paths didn't work correctly for the SYSTEMROOT
+ directory on 32 bit Cygwin running on 64 bit Windows.
+ Addresses: https://cygwin.com/ml/cygwin/2016-01/msg00257.html
+
+- cygwin_login_user(2): Don't fail if the calling user has no TCB privileges
+ and the user account to create the token for is an admin account. Return
+ the UAC-restricted token instead.
+ Addresses: Reported on IRC.
diff --git a/winsup/cygwin/release/2.5.0 b/winsup/cygwin/release/2.5.0
new file mode 100644
index 000000000..d6533f349
--- /dev/null
+++ b/winsup/cygwin/release/2.5.0
@@ -0,0 +1,115 @@
+What's new:
+-----------
+
+- Full set of POSIX.1e ACL API functions now implemented.
+ New APIs: acl_add_perm, acl_calc_mask, acl_clear_perms, acl_copy_entry,
+ acl_copy_ext, acl_copy_int, acl_create_entry, acl_delete_def_file,
+ acl_delete_entry, acl_delete_perm, acl_dup, acl_free, acl_from_text,
+ acl_get_entry, acl_get_fd, acl_get_file, acl_get_permset, acl_get_qualifier,
+ acl_get_tag_type, acl_init, acl_set_fd, acl_set_file, acl_set_permset,
+ acl_set_qualifier, acl_set_tag_type, acl_size, acl_to_text, acl_valid.
+
+- Most libacl extensions now implemented, too:
+ New APIs: acl_check, acl_cmp, acl_entries, acl_equiv_mode, acl_error,
+ acl_extended_fd, acl_extended_file, acl_extended_file_nofollow,
+ acl_from_mode, acl_get_perm, acl_to_any_text.
+
+- First implementation of pthread_barrier/pthread_barrierattr functions.
+ New APIs: pthread_barrierattr_init, pthread_barrierattr_setpshared,
+ pthread_barrierattr_getpshared, pthread_barrierattr_destroy,
+ pthread_barrier_init, pthread_barrier_destroy, pthread_barrier_wait.
+
+- Enabled console reports requested by escape sequences: Requesting primary
+ and secondary device attributes, requesting cursor position report;
+ see https://cygwin.com/ml/cygwin-patches/2012-q3/msg00019.html
+
+- New APIs: clog10, clog10f, nexttoward, nexttowardf, nexttowardl.
+
+- Add missing long double functions. New APIs:
+ acoshl, acosl, asinhl, asinl, atan2l, atanhl, atanl, cacoshl, cacosl, cargl,
+ casinhl, casinl, catanhl, catanl, ccoshl, ccosl, ceill, cexpl, clog10l,
+ clogl, conjl, copysignl, coshl, cosl, cpowl, cprojl, csinhl, csinl, csqrtl,
+ ctanhl, ctanl, dreml, erfcl, erfl, exp10l, exp2l, expl, expm1l, fabsl,
+ fdiml, floorl, fmal, fmaxl, fminl, fmodl, frexpl, ilogbl, isinfl, isnanl,
+ ldexpl, lgammal, lgammal_r, llroundl, log10l, log1pl, log2l, logbl, logl,
+ lroundl, modfl, nearbyintl, nextafterl, pow10l, powl, remainderl, remquol,
+ roundl, scalbl, scalblnl, scalbnl, sincosl, sinhl, sinl, tanhl, tanl,
+ tgammal, truncl.
+
+
+What changed:
+-------------
+
+- Including <sys/acl.h> now *only* includes the POSIX ACL API. To include
+ the old Solaris API, include <cygwin/acl.h>.
+
+- In calls to chmod treat ACLs with extra ACEs *only* for Admins and
+ SYSTEM like a trivial ACL.
+
+- Bump POSIX option macros to POSIX.1-2008.
+
+- Profiling data, specifically pc sampling, now covers all threads of a
+ program and not just the main thread. Environment variable GMON_OUT_PREFIX
+ enables multiple gmon.out files to preserve profiling data after fork or
+ from multiple program runs.
+
+- Feature test macros, which control which symbols are exposed in the standard
+ headers, have been completely overhauled for compatibility with glibc.
+
+- The isinf, isinff, and isinfl functions are signed, returning -1 for
+ negative infinity for compatibility with glibc.
+
+
+Bug Fixes
+---------
+
+- Fix potential hang when using LoadLibraryEx(LOAD_LIBRARY_SEARCH_SYSTEM32).
+ Reported and tested via IRC.
+
+- Fix a bug in ACL handling which might result in a spurious extra entry
+ for the primary group. Self-observed.
+
+- printf(3): Handle multibyte decimal point in field size computation.
+ Addresses: https://cygwin.com/ml/cygwin/2016-02/msg00014.html
+
+- cygwin_conv_path: Always preserve trailing backslashes in conversion
+ to POSIX paths.
+ Addresses: https://cygwin.com/ml/cygwin/2016-01/msg00480.html
+
+- Make buffered console characters visible to select().
+ Addresses: https://cygwin.com/ml/cygwin/2014-12/msg00118.html
+
+- Always report relocation problems, not only in debug DLL.
+ Addresses: https://cygwin.com/ml/cygwin/2016-02/msg00147.html
+
+- Don't spill network credentials of privileged user changing the user
+ context via setuid method 1
+ (https://cygwin.com/cygwin-ug-net/ntsec.html#ntsec-nopasswd1) into
+ user session.
+ Addresses: https://cygwin.com/ml/cygwin/2016-02/msg00101.html
+
+- Fix bug in setvbuf resulting in overwriting data in line buffered IO
+ when writing after reading.
+ Addresses: https://cygwin.com/ml/cygwin/2016-03/msg00180.html
+
+- Fix typo in code converting Windows ACL to POSIX ACL, potentially
+ resulting in incorrect group permissions. Self-observed.
+
+- Fix reading/writing ACLs on Samba shares when using RFC2307 mapped uid/gid
+ values. Self-observed.
+
+- Fix a wrong error code returned when trying to execute a file which can't
+ be read for any reason.
+ Addresses: https://cygwin.com/ml/cygwin/2016-03/msg00364.html
+
+- Only allow enabled groups from the user token's group list as primary
+ token.
+ Addresses: https://cygwin.com/ml/cygwin/2016-03/msg00477.html
+
+- Fix implementation of finitel.
+ Addresses: https://cygwin.com/ml/cygwin-apps/2016-03/msg00152.html
+
+- Fix strtold return value for +/-infinity.
+ Addresses: https://cygwin.com/ml/cygwin-apps/2016-03/msg00152.html
+
+- Fix accepted specifications with `getconf -v' on 64-bit. Self-observed.
diff --git a/winsup/cygwin/release/2.5.1 b/winsup/cygwin/release/2.5.1
new file mode 100644
index 000000000..c9d3b613d
--- /dev/null
+++ b/winsup/cygwin/release/2.5.1
@@ -0,0 +1,22 @@
+What's new:
+-----------
+
+
+What changed:
+-------------
+
+
+Bug Fixes
+---------
+
+- Fix strxfrm/wcsxfrm return value if output buffer is too small. Fix
+ wcsxfrm return value either way.
+ Addresses: https://cygwin.com/ml/cygwin/2016-04/msg00232.html
+
+- Fix bug introduced in 2.5.0: Fix condition specifying when to write a
+ NULL SID ACE.
+ Addresses: https://cygwin.com/ml/cygwin/2016-04/msg00400.html
+
+- Remove spurious checks for already initialized pthread object in pthread
+ object init functions.
+ Addresses: https://cygwin.com/ml/cygwin/2016-04/msg00473.html
diff --git a/winsup/cygwin/release/2.5.2 b/winsup/cygwin/release/2.5.2
new file mode 100644
index 000000000..fe4a86930
--- /dev/null
+++ b/winsup/cygwin/release/2.5.2
@@ -0,0 +1,33 @@
+What's new:
+-----------
+
+
+What changed:
+-------------
+
+- select(2) now supports timeouts less than a Windows tick (10-16 ms).
+
+
+Bug Fixes
+---------
+
+- Fix an error message depending on the system header inclusion order.
+ Addresses: https://cygwin.com/ml/cygwin-developers/2016-05/msg00003.html
+
+- Fix non-POSIXy scheduler priority handling.
+ Addresses: Bugreport via private email
+
+- Allow mmap to map regions > 4 Gigs on 64 bit.
+ Addresses: https://cygwin.com/ml/cygwin/2016-05/msg00140.html
+
+- Fix realpath(3) for incoming paths starting with long path prefixes.
+ Addresses: https://sourceware.org/ml/cygwin/2016-04/msg00281.html
+
+- Fix a usage of INT_MAX (required limits.h) in math.h
+ Addresses: Report on #cygwin-developers
+
+- Return at most one line of input in canonical mode and fix tcflush.
+ Addresses: https://cygwin.com/ml/cygwin/2016-05/msg00318.html
+
+- Fix using wrong inode number on newly created files.
+ Addresses: https://cygwin.com/ml/cygwin/2016-06/msg00269.html
diff --git a/winsup/cygwin/resource.cc b/winsup/cygwin/resource.cc
index 25e87e6e0..11a04f13d 100644
--- a/winsup/cygwin/resource.cc
+++ b/winsup/cygwin/resource.cc
@@ -1,8 +1,5 @@
/* resource.cc: getrusage () and friends.
- Copyright 1996, 1997, 1998, 2000, 2001, 2002, 2003, 2005, 2008, 2009, 2010,
- 2011, 2012, 2013 Red Hat, Inc.
-
Written by Steve Chamberlain (sac@cygnus.com), Doug Evans (dje@cygnus.com),
Geoffrey Noer (noer@cygnus.com) of Cygnus Support.
Rewritten by Sergey S. Okhapkin (sos@prospect.com.ru)
@@ -111,58 +108,102 @@ getrusage (int intwho, struct rusage *rusage_in)
return res;
}
-extern "C" int
-getrlimit (int resource, struct rlimit *rlp)
+/* Default stacksize in case RLIMIT_STACK is RLIM_INFINITY is 2 Megs with
+ system-dependent number of guard pages. The pthread stacksize does not
+ include the guardpage size, so we have to subtract the default guardpage
+ size. Additionally the Windows stack handling disallows to commit the
+ last page, so we subtract it, too. */
+#define DEFAULT_STACKSIZE (2 * 1024 * 1024)
+#define DEFAULT_STACKGUARD (wincap.def_guard_page_size() + wincap.page_size ())
+
+muto NO_COPY rlimit_stack_guard;
+static struct rlimit rlimit_stack = { 0, RLIM_INFINITY };
+
+static void
+__set_rlimit_stack (const struct rlimit *rlp)
{
- MEMORY_BASIC_INFORMATION m;
+ rlimit_stack_guard.init ("rlimit_stack_guard")->acquire ();
+ rlimit_stack = *rlp;
+ rlimit_stack_guard.release ();
+}
- myfault efault;
- if (efault.faulted (EFAULT))
- return -1;
+static void
+__get_rlimit_stack (struct rlimit *rlp)
+{
+ rlimit_stack_guard.init ("rlimit_stack_guard")->acquire ();
+ if (!rlimit_stack.rlim_cur)
+ {
+ /* Fetch the default stacksize from the executable header... */
+ PIMAGE_DOS_HEADER dosheader;
+ PIMAGE_NT_HEADERS ntheader;
+
+ dosheader = (PIMAGE_DOS_HEADER) GetModuleHandle (NULL);
+ ntheader = (PIMAGE_NT_HEADERS) ((PBYTE) dosheader + dosheader->e_lfanew);
+ rlimit_stack.rlim_cur = ntheader->OptionalHeader.SizeOfStackReserve;
+ /* ...and subtract the guardpages. */
+ rlimit_stack.rlim_cur -= DEFAULT_STACKGUARD;
+ }
+ *rlp = rlimit_stack;
+ rlimit_stack_guard.release ();
+}
- rlp->rlim_cur = RLIM_INFINITY;
- rlp->rlim_max = RLIM_INFINITY;
+size_t
+get_rlimit_stack (void)
+{
+ struct rlimit rl;
+
+ __get_rlimit_stack (&rl);
+ /* RLIM_INFINITY doesn't make much sense. As in glibc, use an
+ "architecture-specific default". */
+ if (rl.rlim_cur == RLIM_INFINITY)
+ rl.rlim_cur = DEFAULT_STACKSIZE - DEFAULT_STACKGUARD;
+ /* Always return at least minimum stacksize. */
+ else if (rl.rlim_cur < PTHREAD_STACK_MIN)
+ rl.rlim_cur = PTHREAD_STACK_MIN;
+ return (size_t) rl.rlim_cur;
+}
- switch (resource)
+extern "C" int
+getrlimit (int resource, struct rlimit *rlp)
+{
+ __try
{
- case RLIMIT_CPU:
- case RLIMIT_FSIZE:
- case RLIMIT_DATA:
- case RLIMIT_AS:
- break;
- case RLIMIT_STACK:
- if (!VirtualQuery ((LPCVOID) &m, &m, sizeof m))
- debug_printf ("couldn't get stack info, returning def.values. %E");
- else
+ rlp->rlim_cur = RLIM_INFINITY;
+ rlp->rlim_max = RLIM_INFINITY;
+
+ switch (resource)
{
- rlp->rlim_cur = (rlim_t) &m - (rlim_t) m.AllocationBase;
- rlp->rlim_max = (rlim_t) m.BaseAddress + m.RegionSize
- - (rlim_t) m.AllocationBase;
+ case RLIMIT_CPU:
+ case RLIMIT_FSIZE:
+ case RLIMIT_DATA:
+ case RLIMIT_AS:
+ break;
+ case RLIMIT_STACK:
+ __get_rlimit_stack (rlp);
+ break;
+ case RLIMIT_NOFILE:
+ rlp->rlim_cur = getdtablesize ();
+ if (rlp->rlim_cur < OPEN_MAX)
+ rlp->rlim_cur = OPEN_MAX;
+ rlp->rlim_max = OPEN_MAX_MAX;
+ break;
+ case RLIMIT_CORE:
+ rlp->rlim_cur = cygheap->rlim_core;
+ break;
+ default:
+ set_errno (EINVAL);
+ __leave;
}
- break;
- case RLIMIT_NOFILE:
- rlp->rlim_cur = getdtablesize ();
- if (rlp->rlim_cur < OPEN_MAX)
- rlp->rlim_cur = OPEN_MAX;
- rlp->rlim_max = OPEN_MAX_MAX;
- break;
- case RLIMIT_CORE:
- rlp->rlim_cur = cygheap->rlim_core;
- break;
- default:
- set_errno (EINVAL);
- return -1;
+ return 0;
}
- return 0;
+ __except (EFAULT) {}
+ __endtry
+ return -1;
}
extern "C" int
setrlimit (int resource, const struct rlimit *rlp)
{
- myfault efault;
- if (efault.faulted (EFAULT))
- return -1;
-
struct rlimit oldlimits;
/* Check if the request is to actually change the resource settings.
@@ -170,29 +211,38 @@ setrlimit (int resource, const struct rlimit *rlp)
if (getrlimit (resource, &oldlimits) < 0)
return -1;
- if (oldlimits.rlim_cur == rlp->rlim_cur &&
- oldlimits.rlim_max == rlp->rlim_max)
- /* No change in resource requirements, succeed immediately */
- return 0;
-
- if (rlp->rlim_cur > rlp->rlim_max)
+ __try
{
- set_errno (EINVAL);
- return -1;
- }
+ if (oldlimits.rlim_cur == rlp->rlim_cur &&
+ oldlimits.rlim_max == rlp->rlim_max)
+ /* No change in resource requirements, succeed immediately */
+ return 0;
- switch (resource)
- {
- case RLIMIT_CORE:
- cygheap->rlim_core = rlp->rlim_cur;
- break;
- case RLIMIT_NOFILE:
- if (rlp->rlim_cur != RLIM_INFINITY)
- return setdtablesize (rlp->rlim_cur);
- break;
- default:
- set_errno (EINVAL);
- return -1;
+ if (rlp->rlim_cur > rlp->rlim_max)
+ {
+ set_errno (EINVAL);
+ __leave;
+ }
+
+ switch (resource)
+ {
+ case RLIMIT_CORE:
+ cygheap->rlim_core = rlp->rlim_cur;
+ break;
+ case RLIMIT_NOFILE:
+ if (rlp->rlim_cur != RLIM_INFINITY)
+ return setdtablesize (rlp->rlim_cur);
+ break;
+ case RLIMIT_STACK:
+ __set_rlimit_stack (rlp);
+ break;
+ default:
+ set_errno (EINVAL);
+ __leave;
+ }
+ return 0;
}
- return 0;
+ __except (EFAULT)
+ __endtry
+ return -1;
}
diff --git a/winsup/cygwin/scandir.cc b/winsup/cygwin/scandir.cc
index 53d635f57..1c324c196 100644
--- a/winsup/cygwin/scandir.cc
+++ b/winsup/cygwin/scandir.cc
@@ -1,7 +1,5 @@
/* scandir.cc
- Copyright 1998, 1999, 2000, 2001, 2003, 2005 Red Hat, Inc.
-
Written by Corinna Vinschen <corinna.vinschen@cityweb.de>
This file is part of Cygwin.
@@ -87,7 +85,6 @@ scandir (const char *dir,
closedir (dirp);
qsort (nl, count, sizeof *nl, (int (*)(const void *, const void *)) compar);
- if (namelist)
- *namelist = nl;
+ *namelist = nl;
return count;
}
diff --git a/winsup/cygwin/sched.cc b/winsup/cygwin/sched.cc
index b39400d02..085909ea4 100644
--- a/winsup/cygwin/sched.cc
+++ b/winsup/cygwin/sched.cc
@@ -1,8 +1,5 @@
/* sched.cc: scheduler interface for Cygwin
- Copyright 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2010, 2011, 2012,
- 2013 Red Hat, Inc.
-
Written by Robert Collins <rbtcollins@hotmail.com>
This file is part of Cygwin.
@@ -19,83 +16,60 @@
#include <unistd.h>
#include "registry.h"
-/* Win32 priority to UNIX priority Mapping.
-
- For now, I'm just following the spec: any range of priorities is ok.
- There are probably many many issues with this...
-
- FIXME: We don't support pre-Windows 2000 so we should fix the priority
- computation. Here's the description for the current code:
-
- We don't want process's going realtime. Well, they probably could, but
- the issues with avoiding the priority values 17-22 and 27-30 (not
- supported before win2k) make that inefficient.
-
- However to complicate things most unixes use lower is better priorities.
-
- So we map -14 to 15, and 15 to 1 via (16- ((n+16) >> 1)). We then map 1
- to 15 to various process class and thread priority combinations. Then we
- need to look at the threads process priority. As win95, 98 and NT 4
- don't support opening threads cross-process (unless a thread HANDLE is
- passed around) for now, we'll just use the priority class.
-
- The code and logic are present to calculate the priority for thread, if a
- thread handle can be obtained. Alternatively, if the symbols wouldn't be
- resolved until they are used we could support this.
-
- Lastly, because we can't assume that the pid we're given are Windows pids,
- we can't alter non-cygwin started programs. */
+/* Win32 priority to UNIX priority Mapping. */
extern "C"
{
+/* We support prio values from 1 to 32. This is marginally in line with Linux
+ (1 - 99) and matches the POSIX requirement to support at least 32 priority
+ values. */
+
/* max priority for policy */
int
sched_get_priority_max (int policy)
{
- if (policy < 1 || policy > 3)
+ switch (policy)
{
- set_errno (EINVAL);
- return -1;
+ case SCHED_FIFO:
+ case SCHED_RR:
+ case SCHED_OTHER:
+ return 32;
}
- return -14;
+ set_errno (EINVAL);
+ return -1;
}
/* min priority for policy */
int
sched_get_priority_min (int policy)
{
- if (policy < 1 || policy > 3)
+ switch (policy)
{
- set_errno (EINVAL);
- return -1;
+ case SCHED_FIFO:
+ case SCHED_RR:
+ case SCHED_OTHER:
+ return 1;
}
- return 15;
+ set_errno (EINVAL);
+ return -1;
}
/* Check a scheduler parameter struct for valid settings */
-int
+bool
valid_sched_parameters (const struct sched_param *param)
{
- if (param->sched_priority < -14 || param->sched_priority > 15)
- {
- return 0;
- }
- return -1;
-
+ return param->sched_priority >= 1 && param->sched_priority <= 32;
}
/* get sched params for process
- Note, I'm never returning EPERM,
- Always ESRCH. This is by design (If cygwin ever looks at paranoid security
- Walking the pid values is a known hole in some os's)
-*/
+ Note, we're never returning EPERM, always ESRCH. This is by design.
+ Walking the pid values is a known hole in some OSes. */
int
sched_getparam (pid_t pid, struct sched_param *param)
{
pid_t localpid;
- int winpri;
if (!param || pid < 0)
{
set_errno (EINVAL);
@@ -104,13 +78,11 @@ sched_getparam (pid_t pid, struct sched_param *param)
localpid = pid ? pid : getpid ();
- DWORD Class;
- int ThreadPriority;
+ DWORD pclass;
HANDLE process;
pinfo p (localpid);
/* get the class */
-
if (!p)
{
set_errno (ESRCH);
@@ -122,112 +94,43 @@ sched_getparam (pid_t pid, struct sched_param *param)
set_errno (ESRCH);
return -1;
}
- Class = GetPriorityClass (process);
+ pclass = GetPriorityClass (process);
CloseHandle (process);
- if (!Class)
+ if (!pclass)
{
set_errno (ESRCH);
return -1;
}
- ThreadPriority = THREAD_PRIORITY_NORMAL;
-
/* calculate the unix priority. */
-
- switch (Class)
+ switch (pclass)
{
case IDLE_PRIORITY_CLASS:
- switch (ThreadPriority)
- {
- case THREAD_PRIORITY_IDLE:
- winpri = 1;
- break;
- case THREAD_PRIORITY_LOWEST:
- winpri = 2;
- break;
- case THREAD_PRIORITY_BELOW_NORMAL:
- winpri = 3;
- break;
- case THREAD_PRIORITY_NORMAL:
- winpri = 4;
- break;
- case THREAD_PRIORITY_ABOVE_NORMAL:
- winpri = 5;
- break;
- case THREAD_PRIORITY_HIGHEST:
- default:
- winpri = 6;
- break;
- }
+ param->sched_priority = 3;
break;
- case HIGH_PRIORITY_CLASS:
- switch (ThreadPriority)
- {
- case THREAD_PRIORITY_IDLE:
- winpri = 1;
- break;
- case THREAD_PRIORITY_LOWEST:
- winpri = 11;
- break;
- case THREAD_PRIORITY_BELOW_NORMAL:
- winpri = 12;
- break;
- case THREAD_PRIORITY_NORMAL:
- winpri = 13;
- break;
- case THREAD_PRIORITY_ABOVE_NORMAL:
- winpri = 14;
- break;
- case THREAD_PRIORITY_HIGHEST:
- default:
- winpri = 15;
- break;
- }
+ case BELOW_NORMAL_PRIORITY_CLASS:
+ param->sched_priority = 9;
break;
case NORMAL_PRIORITY_CLASS:
default:
- switch (ThreadPriority)
- {
- case THREAD_PRIORITY_IDLE:
- winpri = 1;
- break;
- case THREAD_PRIORITY_LOWEST:
- winpri = 7;
- break;
- case THREAD_PRIORITY_BELOW_NORMAL:
- winpri = 8;
- break;
- case THREAD_PRIORITY_NORMAL:
- winpri = 9;
- break;
- case THREAD_PRIORITY_ABOVE_NORMAL:
- winpri = 10;
- break;
- case THREAD_PRIORITY_HIGHEST:
- default:
- winpri = 11;
- break;
- }
+ param->sched_priority = 15;
+ break;
+ case ABOVE_NORMAL_PRIORITY_CLASS:
+ param->sched_priority = 21;
+ break;
+ case HIGH_PRIORITY_CLASS:
+ param->sched_priority = 27;
+ break;
+ case REALTIME_PRIORITY_CLASS:
+ param->sched_priority = 32;
break;
}
- /* reverse out winpri = (16- ((unixpri+16) >> 1)) */
- /*
- winpri-16 = - (unixpri +16 ) >> 1
-
- -(winpri-16) = unixpri +16 >> 1
- (-(winpri-16)) << 1 = unixpri+16
- ((-(winpri - 16)) << 1) - 16 = unixpri
- */
-
- param->sched_priority = ((-(winpri - 16)) << 1) - 16;
-
return 0;
}
/* get the scheduler for pid
- All process's on WIN32 run with SCHED_FIFO.
- So we just give an answer.
+ All process's on WIN32 run with SCHED_FIFO. So we just give an answer.
(WIN32 uses a multi queue FIFO).
*/
int
@@ -307,8 +210,8 @@ int
sched_setparam (pid_t pid, const struct sched_param *param)
{
pid_t localpid;
- int winpri;
- DWORD Class;
+ int pri;
+ DWORD pclass;
HANDLE process;
if (!param || pid < 0)
@@ -323,17 +226,22 @@ sched_setparam (pid_t pid, const struct sched_param *param)
return -1;
}
- /* winpri = (16- ((unixpri+16) >> 1)) */
- winpri = 16 - ((param->sched_priority + 16) >> 1);
-
- /* calculate our desired priority class and thread priority */
-
- if (winpri < 7)
- Class = IDLE_PRIORITY_CLASS;
- else if (winpri > 10)
- Class = HIGH_PRIORITY_CLASS;
+ pri = param->sched_priority;
+
+ /* calculate our desired priority class. We only reserve a small area
+ (31/32) for realtime priority. */
+ if (pri <= 6)
+ pclass = IDLE_PRIORITY_CLASS;
+ else if (pri <= 12)
+ pclass = BELOW_NORMAL_PRIORITY_CLASS;
+ else if (pri <= 18)
+ pclass = NORMAL_PRIORITY_CLASS;
+ else if (pri <= 24)
+ pclass = ABOVE_NORMAL_PRIORITY_CLASS;
+ else if (pri <= 30)
+ pclass = HIGH_PRIORITY_CLASS;
else
- Class = NORMAL_PRIORITY_CLASS;
+ pclass = REALTIME_PRIORITY_CLASS;
localpid = pid ? pid : getpid ();
@@ -346,14 +254,13 @@ sched_setparam (pid_t pid, const struct sched_param *param)
set_errno (ESRCH);
return -1;
}
- process =
- OpenProcess (PROCESS_SET_INFORMATION, FALSE, (DWORD) p->dwProcessId);
+ process = OpenProcess (PROCESS_SET_INFORMATION, FALSE, p->dwProcessId);
if (!process)
{
- set_errno (2); //ESRCH);
+ set_errno (ESRCH);
return -1;
}
- if (!SetPriorityClass (process, Class))
+ if (!SetPriorityClass (process, pclass))
{
CloseHandle (process);
set_errno (EPERM);
@@ -364,31 +271,121 @@ sched_setparam (pid_t pid, const struct sched_param *param)
return 0;
}
-/* we map -14 to 15, and 15 to 1 via (16- ((n+16) >> 1)). This lines up with
- the allowed values we return elsewhere in the sched* functions. We then
- map in groups of three to allowed thread priority's. The reason for dropping
- accuracy while still returning a wide range of values is to allow more
- flexible code in the future. */
+/* POSIX thread priorities loosely compare to Windows thread base priorities.
+
+ Base priority is a function of process priority class and thread priority.
+ https://msdn.microsoft.com/en-us/library/windows/desktop/ms685100%28v=vs.85%29.aspx
+
+ Note 1:
+
+ We deliberately handle the REALTIME prority class the same as the HIGH
+ priority class. Realtime has it's own range from 16 to 31 so half the
+ arena is reserved for REALTIME. The problem is that this isn't visible
+ nor expected in the POSIX scenario. Therefore we hide this here and
+ fold REALTIME into HIGH.
+
+ Note 2:
+
+ sched_get_thread_priority is only called internally and only for threads
+ of the current process, with no good reason for the caller to fail.
+ Therefore it never returns an error but a valid priority (base value
+ equivalent to process priority class + THREAD_PRIORITY_NORMAL...
+
+ Note 3:
+
+ ...multiplied by 2 to stretch the priorities over the entire range 1 - 32.
+*/
+
+static int
+sched_base_prio_from_win_prio_class (DWORD pclass)
+{
+ int base;
+
+ switch (pclass)
+ {
+ case IDLE_PRIORITY_CLASS:
+ base = 4;
+ break;
+ case BELOW_NORMAL_PRIORITY_CLASS:
+ base = 6;
+ break;
+ case NORMAL_PRIORITY_CLASS:
+ default:
+ base = 8;
+ break;
+ case ABOVE_NORMAL_PRIORITY_CLASS:
+ base = 10;
+ break;
+ case HIGH_PRIORITY_CLASS:
+ case REALTIME_PRIORITY_CLASS: /* See above note 1 */
+ base = 13;
+ break;
+ }
+ return base;
+}
+
+int
+sched_get_thread_priority (HANDLE thread)
+{
+ int tprio;
+ DWORD pclass;
+ int priority;
+
+ tprio = GetThreadPriority (thread);
+ pclass = GetPriorityClass (GetCurrentProcess ());
+ switch (tprio)
+ {
+ case THREAD_PRIORITY_ERROR_RETURN:
+ priority = sched_base_prio_from_win_prio_class (pclass);
+ break;
+ case THREAD_PRIORITY_IDLE:
+ priority = 1;
+ break;
+ case THREAD_PRIORITY_TIME_CRITICAL:
+ priority = 15;
+ break;
+ default:
+ priority = tprio + sched_base_prio_from_win_prio_class (pclass);
+ break;
+ }
+ return priority << 1; /* See above note 3 */
+}
+
int
sched_set_thread_priority (HANDLE thread, int priority)
{
- int real_pri;
- real_pri = 16 - ((priority + 16) >> 1);
- if (real_pri <1 || real_pri > 15)
+ DWORD pclass;
+ int tprio;
+
+ pclass = GetPriorityClass (GetCurrentProcess ());
+ if (!pclass)
+ return EPERM;
+ if (priority < 1 || priority > 32)
return EINVAL;
- if (real_pri < 4)
- real_pri = THREAD_PRIORITY_LOWEST;
- else if (real_pri < 7)
- real_pri = THREAD_PRIORITY_BELOW_NORMAL;
- else if (real_pri < 10)
- real_pri = THREAD_PRIORITY_NORMAL;
- else if (real_pri < 13)
- real_pri = THREAD_PRIORITY_ABOVE_NORMAL;
- else
- real_pri = THREAD_PRIORITY_HIGHEST;
+ priority >>= 1; /* See above note 3 */
+ if (priority < 1)
+ priority = 1;
+ else if (priority > 15)
+ priority = 15;
- if (!SetThreadPriority (thread, real_pri))
+ if (priority == 1)
+ tprio = THREAD_PRIORITY_IDLE;
+ else if (priority == 15)
+ tprio = THREAD_PRIORITY_TIME_CRITICAL;
+ else
+ {
+ tprio = priority - sched_base_prio_from_win_prio_class (pclass);
+ /* Intermediate values only allowed in REALTIME_PRIORITY_CLASS. */
+ if (pclass != REALTIME_PRIORITY_CLASS)
+ {
+ if (tprio < THREAD_PRIORITY_LOWEST)
+ tprio = THREAD_PRIORITY_LOWEST;
+ else if (tprio > THREAD_PRIORITY_HIGHEST)
+ tprio = THREAD_PRIORITY_HIGHEST;
+ }
+ }
+ if (!SetThreadPriority (thread, tprio))
/* invalid handle, no access are the only expected errors. */
return EPERM;
return 0;
diff --git a/winsup/cygwin/sec_acl.cc b/winsup/cygwin/sec_acl.cc
index 2f7ac278d..64d183c48 100644
--- a/winsup/cygwin/sec_acl.cc
+++ b/winsup/cygwin/sec_acl.cc
@@ -1,7 +1,4 @@
-/* sec_acl.cc: Sun compatible ACL functions.
-
- Copyright 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
- 2011, 2012 Red Hat, Inc.
+/* sec_acl.cc: Solaris compatible ACL functions.
Written by Corinna Vinschen <corinna@vinschen.de>
@@ -13,7 +10,6 @@ details. */
#include "winsup.h"
#include <stdlib.h>
-#include <sys/acl.h>
#include <ctype.h>
#include "cygerrno.h"
#include "security.h"
@@ -22,183 +18,520 @@ details. */
#include "dtable.h"
#include "cygheap.h"
#include "ntdll.h"
-#include "pwdgrp.h"
#include "tls_pbuf.h"
+#include "sec_posixacl.h"
-static int
-searchace (aclent_t *aclp, int nentries, int type, uid_t id = ILLEGAL_UID)
+/* How does a correctly constructed new-style Windows ACL claiming to be a
+ POSIX ACL look like?
+
+ - NULL deny ACE (special bits, CLASS_OBJ).
+
+ - USER_OBJ deny. If the user has less permissions than the sum of CLASS_OBJ
+ (or GROUP_OBJ if CLASS_OBJ doesn't exist) and OTHER_OBJ, deny the excess
+ permissions so that group and other perms don't spill into the owner perms.
+
+ USER_OBJ deny ACE == ~USER_OBJ & (CLASS_OBJ | OTHER_OBJ)
+ or
+ USER_OBJ deny ACE == ~USER_OBJ & (GROUP_OBJ | OTHER_OBJ)
+
+ - USER deny. If a user has more permissions than CLASS_OBJ, or if the
+ user has less permissions than OTHER_OBJ, deny the excess permissions.
+
+ USER deny ACE == (USER & ~CLASS_OBJ) | (~USER & OTHER_OBJ)
+
+ - USER_OBJ allow ACE
+ - USER allow ACEs
+
+ The POSIX permissions returned for a USER entry are the allow bits alone!
+
+ - GROUP{_OBJ} deny. If a group has more permissions than CLASS_OBJ,
+ or less permissions than OTHER_OBJ, deny the excess permissions.
+
+ GROUP{_OBJ} deny ACEs == (GROUP & ~CLASS_OBJ)
+
+ - GROUP_OBJ allow ACE
+ - GROUP allow ACEs
+
+ The POSIX permissions returned for a GROUP entry are the allow bits alone!
+
+ - 2. GROUP{_OBJ} deny. If a group has less permissions than OTHER_OBJ,
+ deny the excess permissions.
+
+ 2. GROUP{_OBJ} deny ACEs == (~GROUP & OTHER_OBJ)
+
+ - OTHER_OBJ allow ACE
+
+ Rinse and repeat for default ACEs with INHERIT flags set.
+
+ - Default NULL deny ACE (S_ISGID, CLASS_OBJ). */
+
+ /* POSIX <-> Win32 */
+
+/* Historically, these bits are stored in a NULL allow SID ACE. To distinguish
+ the new ACL style from the old one, we're using an access denied ACE, plus
+ setting an as yet unused bit in the access mask. The new ACEs can exist
+ twice in an ACL, the "normal one" containing CLASS_OBJ and special bits
+ and the one with INHERIT bit set to pass the DEF_CLASS_OBJ bits and the
+ S_ISGID bit on. */
+#define CYG_ACE_ISVTX 0x001 /* 0x200 <-> 0x001 */
+#define CYG_ACE_ISGID 0x002 /* 0x400 <-> 0x002 */
+#define CYG_ACE_ISUID 0x004 /* 0x800 <-> 0x004 */
+#define CYG_ACE_ISBITS_TO_POSIX(val) \
+ (((val) & 0x007) << 9)
+#define CYG_ACE_ISBITS_TO_WIN(val) \
+ (((val) & (S_ISVTX | S_ISUID | S_ISGID)) >> 9)
+
+#define CYG_ACE_MASK_X 0x008 /* 0x001 <-> 0x008 */
+#define CYG_ACE_MASK_W 0x010 /* 0x002 <-> 0x010 */
+#define CYG_ACE_MASK_R 0x020 /* 0x004 <-> 0x020 */
+#define CYG_ACE_MASK_RWX 0x038
+#define CYG_ACE_MASK_VALID 0x040 /* has mask if set */
+#define CYG_ACE_MASK_TO_POSIX(val) \
+ (((val) & CYG_ACE_MASK_RWX) >> 3)
+#define CYG_ACE_MASK_TO_WIN(val) \
+ ((((val) & S_IRWXO) << 3) \
+ | CYG_ACE_MASK_VALID)
+#define CYG_ACE_NEW_STYLE READ_CONTROL /* New style if set. */
+
+/* Define own bit masks rather than using the GENERIC masks. The latter
+ also contain standard rights, which we don't need here. */
+#define FILE_ALLOW_READ (FILE_READ_DATA | FILE_READ_ATTRIBUTES | \
+ FILE_READ_EA)
+#define FILE_DENY_READ (FILE_READ_DATA | FILE_READ_EA)
+#define FILE_ALLOW_WRITE (FILE_WRITE_DATA | FILE_WRITE_ATTRIBUTES | \
+ FILE_WRITE_EA | FILE_APPEND_DATA)
+#define FILE_DENY_WRITE FILE_ALLOW_WRITE | FILE_DELETE_CHILD
+#define FILE_DENY_WRITE_OWNER (FILE_WRITE_DATA | FILE_WRITE_EA | \
+ FILE_APPEND_DATA | FILE_DELETE_CHILD)
+#define FILE_ALLOW_EXEC (FILE_EXECUTE)
+#define FILE_DENY_EXEC FILE_ALLOW_EXEC
+
+#define STD_RIGHTS_OTHER (STANDARD_RIGHTS_READ | SYNCHRONIZE)
+#define STD_RIGHTS_OWNER (STANDARD_RIGHTS_ALL | SYNCHRONIZE)
+
+int
+searchace (aclent_t *aclp, int nentries, int type, uid_t id)
{
int i;
for (i = 0; i < nentries; ++i)
- if ((aclp[i].a_type == type && (id == ILLEGAL_UID || aclp[i].a_id == id))
+ if ((aclp[i].a_type == type
+ && (id == ACL_UNDEFINED_ID || aclp[i].a_id == id))
|| !aclp[i].a_type)
return i;
return -1;
}
-int
-setacl (HANDLE handle, path_conv &pc, int nentries, aclent_t *aclbufp,
- bool &writable)
+/* From the attributes and the POSIX ACL list, compute a new-style Cygwin
+ security descriptor. The function returns a pointer to the
+ SECURITY_DESCRIPTOR in sd_ret, or NULL if the function fails.
+
+ This function *requires* a verified and sorted acl list! */
+PSECURITY_DESCRIPTOR
+set_posix_access (mode_t attr, uid_t uid, gid_t gid,
+ aclent_t *aclbufp, int nentries,
+ security_descriptor &sd_ret,
+ bool is_samba)
{
- security_descriptor sd_ret;
+ SECURITY_DESCRIPTOR sd;
+ cyg_ldap cldap;
+ PSID owner = NULL, group = NULL;
+ cygsid smb_owner, smb_group;
+ NTSTATUS status;
tmp_pathbuf tp;
+ cygpsid *aclsid;
+ PACL acl;
+ size_t acl_len = sizeof (ACL);
+ mode_t user_obj, group_obj, other_obj, deny;
+ mode_t class_obj = 0;
+ DWORD access;
+ int idx, start_idx, tmp_idx;
+ bool owner_eq_group = false;
+ bool dev_has_admins = false;
+ bool has_class_obj;
- if (get_file_sd (handle, pc, sd_ret, false))
- return -1;
+ /* Initialize local security descriptor. */
+ RtlCreateSecurityDescriptor (&sd, SECURITY_DESCRIPTOR_REVISION);
- NTSTATUS status;
- BOOLEAN dummy;
+ /* As in alloc_sd, set SE_DACL_PROTECTED to prevent the DACL from being
+ modified by inheritable ACEs. */
+ RtlSetControlSecurityDescriptor (&sd, SE_DACL_PROTECTED, SE_DACL_PROTECTED);
- /* Get owner SID. */
- PSID owner_sid;
- status = RtlGetOwnerSecurityDescriptor (sd_ret, &owner_sid, &dummy);
- if (!NT_SUCCESS (status))
+ /* Fetch owner and group and set in security descriptor.
+
+ For Samba we check if there's an RFC2307 mapping in place, otherwise
+ we're trying to create an ACL with the wrong Windows SIDs rather than
+ the correct Unix SIDs. Same happens below for mapping other USER and
+ GROUP SIDs. */
+ if (is_samba)
{
- __seterrno_from_nt_status (status);
- return -1;
+ uint32_t smb_uid, smb_gid;
+
+ smb_uid = cygheap->ugid_cache.reverse_get_uid (uid);
+ if (smb_uid != ILLEGAL_UID)
+ owner = smb_owner.create (22, 2, 1, smb_uid);
+ smb_gid = cygheap->ugid_cache.reverse_get_gid (gid);
+ if (smb_gid != ILLEGAL_GID)
+ group = smb_group.create (22, 2, 2, smb_gid);
}
- cygsid owner (owner_sid);
-
- /* Get group SID. */
- PSID group_sid;
- status = RtlGetGroupSecurityDescriptor (sd_ret, &group_sid, &dummy);
- if (!NT_SUCCESS (status))
+ if (!owner)
+ owner = sidfromuid (uid, &cldap);
+ if (!group)
+ group = sidfromgid (gid, &cldap);
+ if (!owner || !group)
{
- __seterrno_from_nt_status (status);
- return -1;
+ set_errno (EINVAL);
+ return NULL;
}
- cygsid group (group_sid);
-
- /* Initialize local security descriptor. */
- SECURITY_DESCRIPTOR sd;
- RtlCreateSecurityDescriptor (&sd, SECURITY_DESCRIPTOR_REVISION);
status = RtlSetOwnerSecurityDescriptor (&sd, owner, FALSE);
if (!NT_SUCCESS (status))
{
__seterrno_from_nt_status (status);
- return -1;
+ return NULL;
}
status = RtlSetGroupSecurityDescriptor (&sd, group, FALSE);
if (!NT_SUCCESS (status))
{
__seterrno_from_nt_status (status);
- return -1;
+ return NULL;
}
+ owner_eq_group = RtlEqualSid (owner, group);
+ if (S_ISCHR (attr))
+ dev_has_admins = well_known_admins_sid == owner
+ || well_known_admins_sid == group;
- /* Fill access control list. */
- PACL acl = (PACL) tp.w_get ();
- size_t acl_len = sizeof (ACL);
- int ace_off = 0;
+ /* No POSIX ACL? Use attr to generate one from scratch. */
+ if (!aclbufp)
+ {
+ aclbufp = (aclent_t *) tp.c_get ();
+ aclbufp[0].a_type = USER_OBJ;
+ aclbufp[0].a_id = ACL_UNDEFINED_ID;
+ aclbufp[0].a_perm = (attr >> 6) & S_IRWXO;
+ aclbufp[1].a_type = GROUP_OBJ;
+ aclbufp[1].a_id = ACL_UNDEFINED_ID;
+ aclbufp[1].a_perm = (attr >> 3) & S_IRWXO;
+ aclbufp[2].a_type = OTHER_OBJ;
+ aclbufp[2].a_id = ACL_UNDEFINED_ID;
+ aclbufp[2].a_perm = attr & S_IRWXO;
+ nentries = MIN_ACL_ENTRIES;
+ if (S_ISDIR (attr))
+ {
+ aclbufp[3].a_type = DEF_USER_OBJ;
+ aclbufp[3].a_id = ACL_UNDEFINED_ID;
+ aclbufp[3].a_perm = (attr >> 6) & S_IRWXO;
+ aclbufp[4].a_type = GROUP_OBJ;
+ aclbufp[4].a_id = ACL_UNDEFINED_ID;
+ aclbufp[4].a_perm = (attr >> 3) & S_IRWXO;
+ aclbufp[5].a_type = OTHER_OBJ;
+ aclbufp[5].a_id = ACL_UNDEFINED_ID;
+ aclbufp[5].a_perm = attr & S_IRWXO;
+ nentries += MIN_ACL_ENTRIES;
+ }
+ }
- cygsid sid;
- struct passwd *pw;
- struct group *gr;
- int pos;
+ /* Collect SIDs of all entries in aclbufp. */
+ aclsid = (cygpsid *) tp.w_get ();
+ for (idx = 0; idx < nentries; ++idx)
+ switch (aclbufp[idx].a_type)
+ {
+ case USER_OBJ:
+ aclsid[idx] = owner;
+ break;
+ case DEF_USER_OBJ:
+ aclsid[idx] = well_known_creator_owner_sid;
+ break;
+ case USER:
+ case DEF_USER:
+ aclsid[idx] = NO_SID;
+ if (is_samba)
+ {
+ uint32_t smb_uid;
+ cygsid *smb_sid;
+
+ smb_uid = cygheap->ugid_cache.reverse_get_uid (aclbufp[idx].a_id);
+ if (smb_uid != ILLEGAL_UID)
+ {
+ smb_sid = (cygsid *) alloca (sizeof (cygsid));
+ aclsid[idx] = smb_sid->create (22, 2, 1, smb_uid);
+ }
+ }
+ if (!aclsid[idx])
+ aclsid[idx] = sidfromuid (aclbufp[idx].a_id, &cldap);
+ break;
+ case GROUP_OBJ:
+ aclsid[idx] = group;
+ break;
+ case DEF_GROUP_OBJ:
+ aclsid[idx] = !(attr & S_ISGID) ? (PSID) well_known_creator_group_sid
+ : group;
+ break;
+ case GROUP:
+ case DEF_GROUP:
+ aclsid[idx] = NO_SID;
+ if (is_samba)
+ {
+ uint32_t smb_gid;
+ cygsid *smb_sid;
+
+ smb_gid = cygheap->ugid_cache.reverse_get_gid (aclbufp[idx].a_id);
+ if (smb_gid != ILLEGAL_GID)
+ {
+ smb_sid = (cygsid *) alloca (sizeof (cygsid));
+ aclsid[idx] = smb_sid->create (22, 2, 2, smb_gid);
+ }
+ }
+ if (!aclsid[idx])
+ aclsid[idx] = sidfromgid (aclbufp[idx].a_id, &cldap);
+ break;
+ case CLASS_OBJ:
+ case DEF_CLASS_OBJ:
+ aclsid[idx] = well_known_null_sid;
+ break;
+ case OTHER_OBJ:
+ case DEF_OTHER_OBJ:
+ aclsid[idx] = well_known_world_sid;
+ break;
+ }
+ /* Initialize ACL. */
+ acl = (PACL) tp.w_get ();
RtlCreateAcl (acl, ACL_MAXIMUM_SIZE, ACL_REVISION);
- writable = false;
-
- for (int i = 0; i < nentries; ++i)
+ /* This loop has two runs, the first handling the actual permission,
+ the second handling the default permissions. */
+ idx = 0;
+ for (int def = 0; def <= ACL_DEFAULT; def += ACL_DEFAULT)
{
- DWORD allow;
- /* Owner has more standard rights set. */
- if ((aclbufp[i].a_type & ~ACL_DEFAULT) == USER_OBJ)
- allow = STANDARD_RIGHTS_ALL
- | (pc.fs_is_samba ()
- ? 0 : (FILE_READ_ATTRIBUTES | FILE_WRITE_ATTRIBUTES));
- else
- allow = STANDARD_RIGHTS_READ
- | (pc.fs_is_samba () ? 0 : FILE_READ_ATTRIBUTES);
- if (aclbufp[i].a_perm & S_IROTH)
- allow |= FILE_GENERIC_READ;
- if (aclbufp[i].a_perm & S_IWOTH)
+ DWORD inherit = def ? SUB_CONTAINERS_AND_OBJECTS_INHERIT | INHERIT_ONLY
+ : NO_INHERITANCE;
+
+ /* No default ACEs on files. */
+ if (def && !S_ISDIR (attr))
{
- allow |= FILE_GENERIC_WRITE;
- writable = true;
+ /* Trying to set default ACEs on a non-directory is an error.
+ The underlying functions on Linux return EACCES. */
+ if (idx < nentries && aclbufp[idx].a_type & ACL_DEFAULT)
+ {
+ set_errno (EACCES);
+ return NULL;
+ }
+ break;
}
- if (aclbufp[i].a_perm & S_IXOTH)
- allow |= FILE_GENERIC_EXECUTE & ~FILE_READ_ATTRIBUTES;
- if ((aclbufp[i].a_perm & (S_IWOTH | S_IXOTH)) == (S_IWOTH | S_IXOTH))
- allow |= FILE_DELETE_CHILD;
- /* Set inherit property. */
- DWORD inheritance = (aclbufp[i].a_type & ACL_DEFAULT)
- ? (CONTAINER_INHERIT_ACE | OBJECT_INHERIT_ACE
- | INHERIT_ONLY_ACE)
- : NO_INHERITANCE;
- /*
- * If a specific acl contains a corresponding default entry with
- * identical permissions, only one Windows ACE with proper
- * inheritance bits is created.
- */
- if (!(aclbufp[i].a_type & ACL_DEFAULT)
- && aclbufp[i].a_type & (USER|GROUP|OTHER_OBJ)
- && (pos = searchace (aclbufp + i + 1, nentries - i - 1,
- aclbufp[i].a_type | ACL_DEFAULT,
- (aclbufp[i].a_type & (USER|GROUP))
- ? aclbufp[i].a_id : ILLEGAL_UID)) >= 0
- && aclbufp[i].a_perm == aclbufp[i + 1 + pos].a_perm)
+
+ /* To check if the NULL SID deny ACE is required we need user_obj. */
+ tmp_idx = searchace (aclbufp, nentries, def | USER_OBJ);
+ /* No default entries present? */
+ if (tmp_idx < 0)
+ break;
+ user_obj = aclbufp[tmp_idx].a_perm;
+ /* To compute deny access masks, we need group_obj, other_obj and... */
+ tmp_idx = searchace (aclbufp, nentries, def | GROUP_OBJ);
+ group_obj = aclbufp[tmp_idx].a_perm;
+ tmp_idx = searchace (aclbufp, nentries, def | OTHER_OBJ);
+ other_obj = aclbufp[tmp_idx].a_perm;
+
+ /* ... class_obj. Create NULL deny ACE. Only the S_ISGID attribute gets
+ inherited. For directories check if we are also going to generate
+ default entries. If not we have a problem. We can't generate only a
+ single, inheritable NULL SID ACE because that leads to (fixable, TODO)
+ access problems when trying to create the matching child permissions.
+ Therefore we remove the S_ISGID bit on the directory because having it
+ set would be misleading. */
+ if (!def && S_ISDIR (attr) && (attr & S_ISGID))
{
- inheritance = CONTAINER_INHERIT_ACE | OBJECT_INHERIT_ACE;
- /* This invalidates the corresponding default entry. */
- aclbufp[i + 1 + pos].a_type = USER|GROUP|ACL_DEFAULT;
+ /* Check for a required entry per POSIX. */
+ tmp_idx = searchace (aclbufp, nentries, DEF_USER_OBJ);
+ if (tmp_idx < 0)
+ attr &= ~S_ISGID;
}
- switch (aclbufp[i].a_type)
+ access = CYG_ACE_ISBITS_TO_WIN (def ? attr & S_ISGID : attr)
+ | CYG_ACE_NEW_STYLE;
+ tmp_idx = searchace (aclbufp, nentries, def | CLASS_OBJ);
+ if (tmp_idx >= 0)
{
- case USER_OBJ:
- if (!add_access_allowed_ace (acl, ace_off++, allow,
- owner, acl_len, inheritance))
- return -1;
- break;
- case DEF_USER_OBJ:
- if (!add_access_allowed_ace (acl, ace_off++, allow,
- well_known_creator_owner_sid, acl_len, inheritance))
- return -1;
- break;
- case USER:
- case DEF_USER:
- if (!(pw = internal_getpwuid (aclbufp[i].a_id))
- || !sid.getfrompw (pw))
+ has_class_obj = true;
+ class_obj = aclbufp[tmp_idx].a_perm;
+ access |= CYG_ACE_MASK_TO_WIN (class_obj);
+ }
+ else
+ {
+ /* Setting class_obj to group_obj allows to write below code without
+ additional checks for existence of a CLASS_OBJ. */
+ has_class_obj = false;
+ class_obj = group_obj;
+ }
+ /* Note that Windows filters the ACE Mask value so it only reflects
+ the bit values supported by the object type. The result is that
+ we can't set a CLASS_OBJ value for ptys. The get_posix_access
+ function has to workaround that.
+
+ We also don't write the NULL SID ACE in case we have a simple POSIX
+ permission ACL with the user perms >= group perms >= other perms and
+ no special bits set. In all other cases we either need the NULL SID
+ ACE or we write it to avoid calls to AuthZ from get_posix_access. */
+ if (!S_ISCHR (attr)
+ && (has_class_obj
+ || access != CYG_ACE_NEW_STYLE
+ || ((user_obj | group_obj | other_obj) != user_obj
+ || (group_obj | other_obj) != group_obj))
+ && !add_access_denied_ace (acl, access, well_known_null_sid, acl_len,
+ inherit))
+ return NULL;
+
+ /* Do we potentially chmod a file with owner SID == group SID? If so,
+ make sure the owner perms are always >= group perms. */
+ if (!def && owner_eq_group)
+ aclbufp[0].a_perm |= group_obj & class_obj;
+
+ /* This loop has two runs, the first w/ check_types == (USER_OBJ | USER),
+ the second w/ check_types == (GROUP_OBJ | GROUP). Each run creates
+ first the deny, then the allow ACEs for the current types. */
+ for (int check_types = USER_OBJ | USER;
+ check_types < CLASS_OBJ;
+ check_types <<= 2)
+ {
+ /* Create deny ACEs for users, then 1st run for groups. For groups,
+ only take CLASS_OBJ permissions into account. Class permissions
+ are handled in the 2nd deny loop below. */
+ for (start_idx = idx;
+ idx < nentries && aclbufp[idx].a_type & check_types;
+ ++idx)
{
- set_errno (EINVAL);
- return -1;
+ /* Avoid creating DENY ACEs for the second occurrence of
+ accounts which show up twice, as USER_OBJ and USER, or
+ GROUP_OBJ and GROUP. */
+ if ((aclbufp[idx].a_type & USER && aclsid[idx] == owner)
+ || (aclbufp[idx].a_type & GROUP && aclsid[idx] == group))
+ continue;
+ /* For the rules how to construct the deny access mask, see the
+ comment right at the start of this file. */
+ if (aclbufp[idx].a_type & USER_OBJ)
+ deny = ~aclbufp[idx].a_perm & (class_obj | other_obj);
+ else if (aclbufp[idx].a_type & USER)
+ deny = (aclbufp[idx].a_perm & ~class_obj)
+ | (~aclbufp[idx].a_perm & other_obj);
+ /* Accommodate Windows: Only generate deny masks for SYSTEM
+ and the Administrators group in terms of the execute bit,
+ if they are not the primary group. */
+ else if (aclbufp[idx].a_type & GROUP
+ && (aclsid[idx] == well_known_system_sid
+ || aclsid[idx] == well_known_admins_sid))
+ deny = aclbufp[idx].a_perm & ~(class_obj | S_IROTH | S_IWOTH);
+ else
+ deny = (aclbufp[idx].a_perm & ~class_obj);
+ if (!deny)
+ continue;
+ access = 0;
+ if (deny & S_IROTH)
+ access |= FILE_DENY_READ;
+ if (deny & S_IWOTH)
+ access |= (aclbufp[idx].a_type & USER_OBJ)
+ ? FILE_DENY_WRITE_OWNER : FILE_DENY_WRITE;
+ if (deny & S_IXOTH)
+ access |= FILE_DENY_EXEC;
+ if (!add_access_denied_ace (acl, access, aclsid[idx], acl_len,
+ inherit))
+ return NULL;
}
- if (!add_access_allowed_ace (acl, ace_off++, allow,
- sid, acl_len, inheritance))
- return -1;
- break;
- case GROUP_OBJ:
- if (!add_access_allowed_ace (acl, ace_off++, allow,
- group, acl_len, inheritance))
- return -1;
- break;
- case DEF_GROUP_OBJ:
- if (!add_access_allowed_ace (acl, ace_off++, allow,
- well_known_creator_group_sid, acl_len, inheritance))
- return -1;
- break;
- case GROUP:
- case DEF_GROUP:
- if (!(gr = internal_getgrgid (aclbufp[i].a_id))
- || !sid.getfromgr (gr))
+ /* Create allow ACEs for users, then groups. */
+ for (idx = start_idx;
+ idx < nentries && aclbufp[idx].a_type & check_types;
+ ++idx)
{
- set_errno (EINVAL);
- return -1;
+ /* Don't set FILE_READ/WRITE_ATTRIBUTES unconditionally on Samba,
+ otherwise it enforces read permissions. */
+ access = STD_RIGHTS_OTHER | (is_samba ? 0 : FILE_READ_ATTRIBUTES);
+ if (aclbufp[idx].a_type & USER_OBJ)
+ {
+ access |= STD_RIGHTS_OWNER;
+ if (!is_samba)
+ access |= FILE_WRITE_ATTRIBUTES;
+ /* Set FILE_DELETE_CHILD on files with "rwx" perms for the
+ owner so that the owner gets "full control" (Duh). */
+ if (aclbufp[idx].a_perm == S_IRWXO)
+ access |= FILE_DELETE_CHILD;
+ }
+ if (aclbufp[idx].a_perm & S_IROTH)
+ access |= FILE_ALLOW_READ;
+ if (aclbufp[idx].a_perm & S_IWOTH)
+ access |= FILE_ALLOW_WRITE;
+ if (aclbufp[idx].a_perm & S_IXOTH)
+ access |= FILE_ALLOW_EXEC;
+ /* Handle S_ISVTX. */
+ if (S_ISDIR (attr)
+ && (aclbufp[idx].a_perm & (S_IWOTH | S_IXOTH))
+ == (S_IWOTH | S_IXOTH)
+ && (!(attr & S_ISVTX) || aclbufp[idx].a_type & USER_OBJ))
+ access |= FILE_DELETE_CHILD;
+ /* For ptys, make sure the Administrators group has WRITE_DAC
+ and WRITE_OWNER perms. */
+ if (dev_has_admins && aclsid[idx] == well_known_admins_sid)
+ access |= STD_RIGHTS_OWNER;
+ if (!add_access_allowed_ace (acl, access, aclsid[idx], acl_len,
+ inherit))
+ return NULL;
}
- if (!add_access_allowed_ace (acl, ace_off++, allow,
- sid, acl_len, inheritance))
- return -1;
- break;
- case OTHER_OBJ:
- case DEF_OTHER_OBJ:
- if (!add_access_allowed_ace (acl, ace_off++, allow,
- well_known_world_sid,
- acl_len, inheritance))
- return -1;
- break;
+ /* 2nd deny loop: Create deny ACEs for groups when they have less
+ permissions than OTHER_OBJ. */
+ if (check_types == (GROUP_OBJ | GROUP))
+ for (idx = start_idx;
+ idx < nentries && aclbufp[idx].a_type & check_types;
+ ++idx)
+ {
+ if (aclbufp[idx].a_type & GROUP && aclsid[idx] == group)
+ continue;
+ /* Only generate deny masks for SYSTEM and the Administrators
+ group if they are the primary group. */
+ if (aclbufp[idx].a_type & GROUP
+ && (aclsid[idx] == well_known_system_sid
+ || aclsid[idx] == well_known_admins_sid))
+ deny = 0;
+ else
+ deny = (~aclbufp[idx].a_perm & other_obj);
+ if (!deny)
+ continue;
+ access = 0;
+ if (deny & S_IROTH)
+ access |= FILE_DENY_READ;
+ if (deny & S_IWOTH)
+ access |= FILE_DENY_WRITE;
+ if (deny & S_IXOTH)
+ access |= FILE_DENY_EXEC;
+ if (!add_access_denied_ace (acl, access, aclsid[idx], acl_len,
+ inherit))
+ return NULL;
+ }
}
+ /* For ptys if the admins group isn't in the ACL, add an ACE to make
+ sure the admins group has WRITE_DAC and WRITE_OWNER perms. */
+ if (S_ISCHR (attr) && !dev_has_admins
+ && !add_access_allowed_ace (acl,
+ STD_RIGHTS_OWNER | FILE_ALLOW_READ
+ | FILE_ALLOW_WRITE,
+ well_known_admins_sid, acl_len,
+ NO_INHERITANCE))
+ return NULL;
+ /* Create allow ACE for other. It's preceeded by class_obj if it exists.
+ If so, skip it. */
+ if (aclbufp[idx].a_type & CLASS_OBJ)
+ ++idx;
+ access = STD_RIGHTS_OTHER | (is_samba ? 0 : FILE_READ_ATTRIBUTES);
+ if (aclbufp[idx].a_perm & S_IROTH)
+ access |= FILE_ALLOW_READ;
+ if (aclbufp[idx].a_perm & S_IWOTH)
+ access |= FILE_ALLOW_WRITE;
+ if (aclbufp[idx].a_perm & S_IXOTH)
+ access |= FILE_ALLOW_EXEC;
+ /* Handle S_ISVTX. */
+ if (S_ISDIR (attr)
+ && (aclbufp[idx].a_perm & (S_IWOTH | S_IXOTH)) == (S_IWOTH | S_IXOTH)
+ && !(attr & S_ISVTX))
+ access |= FILE_DELETE_CHILD;
+ if (!add_access_allowed_ace (acl, access, aclsid[idx++], acl_len,
+ inherit))
+ return NULL;
}
+
/* Set AclSize to computed value. */
acl->AclSize = acl_len;
debug_printf ("ACL-Size: %u", acl_len);
@@ -207,7 +540,7 @@ setacl (HANDLE handle, path_conv &pc, int nentries, aclent_t *aclbufp,
if (!NT_SUCCESS (status))
{
__seterrno_from_nt_status (status);
- return -1;
+ return NULL;
}
/* Make self relative security descriptor in sd_ret. */
DWORD sd_size = 0;
@@ -215,36 +548,65 @@ setacl (HANDLE handle, path_conv &pc, int nentries, aclent_t *aclbufp,
if (sd_size <= 0)
{
__seterrno ();
- return -1;
+ return NULL;
}
if (!sd_ret.realloc (sd_size))
{
set_errno (ENOMEM);
- return -1;
+ return NULL;
}
status = RtlAbsoluteToSelfRelativeSD (&sd, sd_ret, &sd_size);
if (!NT_SUCCESS (status))
{
__seterrno_from_nt_status (status);
- return -1;
+ return NULL;
}
debug_printf ("Created SD-Size: %u", sd_ret.size ());
+ return sd_ret;
+}
+
+/* This function *requires* a verified and sorted acl list! */
+int
+setacl (HANDLE handle, path_conv &pc, int nentries, aclent_t *aclbufp,
+ bool &writable)
+{
+ security_descriptor sd, sd_ret;
+ mode_t attr = pc.isdir () ? S_IFDIR : 0;
+ uid_t uid;
+ gid_t gid;
+
+ if (get_file_sd (handle, pc, sd, false))
+ return -1;
+ if (get_posix_access (sd, &attr, &uid, &gid, NULL, 0) < 0)
+ return -1;
+ if (!set_posix_access (attr, uid, gid, aclbufp, nentries,
+ sd_ret, pc.fs_is_samba ()))
+ return -1;
+ /* FIXME? Caller needs to know if any write perms are set to allow removing
+ the DOS R/O bit. */
+ writable = true;
return set_file_sd (handle, pc, sd_ret, false);
}
-/* Temporary access denied bits */
+/* Temporary access denied bits used by getace and get_posix_access during
+ Windows ACL processing. These bits get removed before the created POSIX
+ ACL gets published. */
#define DENY_R 040000
#define DENY_W 020000
#define DENY_X 010000
+#define DENY_RWX (DENY_R | DENY_W | DENY_X)
+/* New style ACL means, just read the bits and store them away. Don't
+ create masked values on your own. */
static void
getace (aclent_t &acl, int type, int id, DWORD win_ace_mask,
- DWORD win_ace_type)
+ DWORD win_ace_type, bool new_style)
{
acl.a_type = type;
acl.a_id = id;
- if ((win_ace_mask & FILE_READ_BITS) && !(acl.a_perm & (S_IROTH | DENY_R)))
+ if ((win_ace_mask & FILE_READ_BITS)
+ && (new_style || !(acl.a_perm & (S_IROTH | DENY_R))))
{
if (win_ace_type == ACCESS_ALLOWED_ACE_TYPE)
acl.a_perm |= S_IROTH;
@@ -252,7 +614,8 @@ getace (aclent_t &acl, int type, int id, DWORD win_ace_mask,
acl.a_perm |= DENY_R;
}
- if ((win_ace_mask & FILE_WRITE_BITS) && !(acl.a_perm & (S_IWOTH | DENY_W)))
+ if ((win_ace_mask & FILE_WRITE_BITS)
+ && (new_style || !(acl.a_perm & (S_IWOTH | DENY_W))))
{
if (win_ace_type == ACCESS_ALLOWED_ACE_TYPE)
acl.a_perm |= S_IWOTH;
@@ -260,7 +623,8 @@ getace (aclent_t &acl, int type, int id, DWORD win_ace_mask,
acl.a_perm |= DENY_W;
}
- if ((win_ace_mask & FILE_EXEC_BITS) && !(acl.a_perm & (S_IXOTH | DENY_X)))
+ if ((win_ace_mask & FILE_EXEC_BITS)
+ && (new_style || !(acl.a_perm & (S_IXOTH | DENY_X))))
{
if (win_ace_type == ACCESS_ALLOWED_ACE_TYPE)
acl.a_perm |= S_IXOTH;
@@ -269,177 +633,575 @@ getace (aclent_t &acl, int type, int id, DWORD win_ace_mask,
}
}
+/* From the SECURITY_DESCRIPTOR given in psd, compute user, owner, posix
+ attributes, as well as the POSIX acl. The function returns the number
+ of entries returned in aclbufp, or -1 in case of error.
+
+ When called from chmod, it also returns the fact if the ACL is a "standard"
+ ACL. A "standard" ACL is an ACL which only consists of ACEs for owner,
+ group, other, as well as (this is Windows) the Administrators group and
+ SYSTEM. See fhandler_disk_file::fchmod for how this is used to fake
+ stock POSIX perms even if Administrators and SYSTEM is in the ACE. */
int
-getacl (HANDLE handle, path_conv &pc, int nentries, aclent_t *aclbufp)
+get_posix_access (PSECURITY_DESCRIPTOR psd,
+ mode_t *attr_ret, uid_t *uid_ret, gid_t *gid_ret,
+ aclent_t *aclbufp, int nentries, bool *std_acl)
{
- security_descriptor sd;
-
- if (get_file_sd (handle, pc, sd, false))
- return -1;
-
- cygpsid owner_sid;
- cygpsid group_sid;
+ tmp_pathbuf tp;
NTSTATUS status;
- BOOLEAN dummy;
+ BOOLEAN dummy, acl_exists;
+ SECURITY_DESCRIPTOR_CONTROL ctrl;
+ ULONG rev;
+ PACL acl;
+ PACCESS_ALLOWED_ACE ace;
+ cygpsid owner_sid, group_sid;
+ cyg_ldap cldap;
uid_t uid;
gid_t gid;
-
- status = RtlGetOwnerSecurityDescriptor (sd, (PSID *) &owner_sid, &dummy);
+ mode_t attr = 0;
+ aclent_t *lacl = NULL;
+ cygpsid ace_sid, *aclsid;
+ int pos, type, id, idx;
+
+ bool owner_eq_group;
+ bool just_created = false;
+ bool standard_ACEs_only = true;
+ bool new_style = false;
+ bool saw_user_obj = false;
+ bool saw_group_obj = false;
+ bool saw_other_obj = false;
+ bool saw_def_user_obj = false;
+ bool saw_def_group_obj = false;
+ bool has_class_perm = false;
+ bool has_def_class_perm = false;
+
+ mode_t class_perm = 0;
+ mode_t def_class_perm = 0;
+ int types_def = 0;
+ int def_pgrp_pos = -1;
+
+ if (aclbufp && nentries < MIN_ACL_ENTRIES)
+ {
+ set_errno (EINVAL);
+ return -1;
+ }
+ /* If reading the security descriptor failed, treat the object as
+ unreadable. */
+ if (!psd)
+ {
+ if (attr_ret)
+ *attr_ret &= S_IFMT;
+ if (uid_ret)
+ *uid_ret = ACL_UNDEFINED_ID;
+ if (gid_ret)
+ *gid_ret = ACL_UNDEFINED_ID;
+ if (aclbufp)
+ {
+ aclbufp[0].a_type = USER_OBJ;
+ aclbufp[0].a_id = ACL_UNDEFINED_ID;
+ aclbufp[0].a_perm = 0;
+ aclbufp[1].a_type = GROUP_OBJ;
+ aclbufp[1].a_id = ACL_UNDEFINED_ID;
+ aclbufp[1].a_perm = 0;
+ aclbufp[2].a_type = OTHER_OBJ;
+ aclbufp[2].a_id = ACL_UNDEFINED_ID;
+ aclbufp[2].a_perm = 0;
+ return MIN_ACL_ENTRIES;
+ }
+ return 0;
+ }
+ /* Fetch owner, group, and ACL from security descriptor. */
+ status = RtlGetOwnerSecurityDescriptor (psd, (PSID *) &owner_sid, &dummy);
if (!NT_SUCCESS (status))
{
__seterrno_from_nt_status (status);
return -1;
}
- uid = owner_sid.get_uid ();
-
- status = RtlGetGroupSecurityDescriptor (sd, (PSID *) &group_sid, &dummy);
+ status = RtlGetGroupSecurityDescriptor (psd, (PSID *) &group_sid, &dummy);
if (!NT_SUCCESS (status))
{
__seterrno_from_nt_status (status);
return -1;
}
- gid = group_sid.get_gid ();
+ status = RtlGetDaclSecurityDescriptor (psd, &acl_exists, &acl, &dummy);
+ if (!NT_SUCCESS (status))
+ {
+ __seterrno_from_nt_status (status);
+ return -1;
+ }
+ /* Set uidret, gidret, and initalize attributes. */
+ uid = owner_sid.get_uid (&cldap);
+ gid = group_sid.get_gid (&cldap);
+ if (attr_ret)
+ {
+ attr = *attr_ret & S_IFMT;
+ just_created = *attr_ret & S_JUSTCREATED;
+ }
+ /* Remember the fact that owner and group are the same account. */
+ owner_eq_group = owner_sid == group_sid;
- aclent_t lacl[MAX_ACL_ENTRIES];
- memset (&lacl, 0, MAX_ACL_ENTRIES * sizeof (aclent_t));
+ /* Create and initialize local aclent_t array. */
+ lacl = (aclent_t *) tp.c_get ();
+ memset (lacl, 0, MAX_ACL_ENTRIES * sizeof (aclent_t *));
lacl[0].a_type = USER_OBJ;
lacl[0].a_id = uid;
lacl[1].a_type = GROUP_OBJ;
lacl[1].a_id = gid;
lacl[2].a_type = OTHER_OBJ;
- lacl[2].a_id = ILLEGAL_GID;
- lacl[3].a_type = CLASS_OBJ;
- lacl[3].a_id = ILLEGAL_GID;
- lacl[3].a_perm = S_IROTH | S_IWOTH | S_IXOTH;
-
- PACL acl;
- BOOLEAN acl_exists;
-
- status = RtlGetDaclSecurityDescriptor (sd, &acl_exists, &acl, &dummy);
- if (!NT_SUCCESS (status))
+ lacl[2].a_id = ACL_UNDEFINED_ID;
+ /* Create array to collect SIDs of all entries in lacl. */
+ aclsid = (cygpsid *) tp.w_get ();
+ aclsid[0] = owner_sid;
+ aclsid[1] = group_sid;
+ aclsid[2] = well_known_world_sid;
+
+ /* No ACEs? Everybody has full access. */
+ if (!acl_exists || !acl || acl->AceCount == 0)
{
- __seterrno_from_nt_status (status);
- return -1;
+ for (pos = 0; pos < MIN_ACL_ENTRIES; ++pos)
+ lacl[pos].a_perm = S_IROTH | S_IWOTH | S_IXOTH;
+ goto out;
}
- int pos, i, types_def = 0;
-
- if (!acl_exists || !acl)
- for (pos = 0; pos < 3; ++pos) /* Don't change CLASS_OBJ entry */
- lacl[pos].a_perm = S_IROTH | S_IWOTH | S_IXOTH;
- else
+ /* Files and dirs are created with a NULL descriptor, so inheritence
+ rules kick in. If no inheritable entries exist in the parent object,
+ Windows will create entries according to the user token's default DACL.
+ These entries are not desired and we ignore them at creation time.
+ We're just checking the SE_DACL_AUTO_INHERITED flag here, since that's
+ what we set in get_file_sd. Read the longish comment there before
+ changing this test! */
+ if (just_created
+ && NT_SUCCESS (RtlGetControlSecurityDescriptor (psd, &ctrl, &rev))
+ && !(ctrl & SE_DACL_AUTO_INHERITED))
+ ;
+ else for (idx = 0; idx < acl->AceCount; ++idx)
{
- for (i = 0; i < acl->AceCount; ++i)
- {
- ACCESS_ALLOWED_ACE *ace;
-
- if (!NT_SUCCESS (RtlGetAce (acl, i, (PVOID *) &ace)))
- continue;
+ if (!NT_SUCCESS (RtlGetAce (acl, idx, (PVOID *) &ace)))
+ continue;
- cygpsid ace_sid ((PSID) &ace->SidStart);
- int id;
- int type = 0;
+ ace_sid = (PSID) &ace->SidStart;
- if (ace_sid == well_known_world_sid)
- {
- type = OTHER_OBJ;
- id = ILLEGAL_GID;
- }
- else if (ace_sid == group_sid)
- {
- type = GROUP_OBJ;
- id = gid;
- }
- else if (ace_sid == owner_sid)
- {
- type = USER_OBJ;
- id = uid;
- }
- else if (ace_sid == well_known_creator_group_sid)
- {
- type = GROUP_OBJ | ACL_DEFAULT;
- types_def |= type;
- id = ILLEGAL_GID;
- }
- else if (ace_sid == well_known_creator_owner_sid)
+ if (ace_sid == well_known_null_sid)
+ {
+ /* Fetch special bits. */
+ attr |= CYG_ACE_ISBITS_TO_POSIX (ace->Mask);
+ if (ace->Header.AceType == ACCESS_DENIED_ACE_TYPE
+ && ace->Mask & CYG_ACE_NEW_STYLE)
{
- type = USER_OBJ | ACL_DEFAULT;
- types_def |= type;
- id = ILLEGAL_GID;
+ /* New-style ACL. Note the fact that a mask value is present
+ since that changes how getace fetches the information. That's
+ fine, because the NULL deny ACE is supposed to precede all
+ USER, GROUP and GROUP_OBJ entries. Any ACL not created that
+ way has been rearranged by the Windows functionality to create
+ the brain-dead "canonical" ACL order and is broken anyway. */
+ new_style = true;
+ attr |= CYG_ACE_ISBITS_TO_POSIX (ace->Mask);
+ if (ace->Mask & CYG_ACE_MASK_VALID)
+ {
+ if (!(ace->Header.AceFlags & INHERIT_ONLY))
+ {
+ if ((pos = searchace (lacl, MAX_ACL_ENTRIES, CLASS_OBJ))
+ >= 0)
+ {
+ lacl[pos].a_type = CLASS_OBJ;
+ lacl[pos].a_id = ACL_UNDEFINED_ID;
+ lacl[pos].a_perm = CYG_ACE_MASK_TO_POSIX (ace->Mask);
+ aclsid[pos] = well_known_null_sid;
+ }
+ has_class_perm = true;
+ standard_ACEs_only = false;
+ class_perm = lacl[pos].a_perm;
+ }
+ if (ace->Header.AceFlags & SUB_CONTAINERS_AND_OBJECTS_INHERIT)
+ {
+ if ((pos = searchace (lacl, MAX_ACL_ENTRIES,
+ DEF_CLASS_OBJ)) >= 0)
+ {
+ lacl[pos].a_type = DEF_CLASS_OBJ;
+ lacl[pos].a_id = ACL_UNDEFINED_ID;
+ lacl[pos].a_perm = CYG_ACE_MASK_TO_POSIX (ace->Mask);
+ aclsid[pos] = well_known_null_sid;
+ }
+ has_def_class_perm = true;
+ def_class_perm = lacl[pos].a_perm;
+ }
+ }
}
- else
- id = ace_sid.get_id (true, &type);
-
+ continue;
+ }
+ if (ace_sid == owner_sid)
+ {
+ type = USER_OBJ;
+ id = uid;
+ }
+ else if (ace_sid == group_sid)
+ {
+ type = GROUP_OBJ;
+ id = gid;
+ }
+ else if (ace_sid == well_known_world_sid)
+ {
+ type = OTHER_OBJ;
+ id = ACL_UNDEFINED_ID;
+ if (ace->Header.AceType == ACCESS_ALLOWED_ACE_TYPE
+ && !(ace->Header.AceFlags & INHERIT_ONLY))
+ saw_other_obj = true;
+ }
+ else if (ace_sid == well_known_creator_owner_sid)
+ {
+ type = DEF_USER_OBJ;
+ types_def |= type;
+ id = ACL_UNDEFINED_ID;
+ saw_def_user_obj = true;
+ }
+ else if (ace_sid == well_known_creator_group_sid)
+ {
+ type = DEF_GROUP_OBJ;
+ types_def |= type;
+ id = ACL_UNDEFINED_ID;
+ saw_def_group_obj = true;
+ }
+ else
+ {
+ id = ace_sid.get_id (TRUE, &type, &cldap);
if (!type)
continue;
- if (!(ace->Header.AceFlags & INHERIT_ONLY_ACE || type & ACL_DEFAULT))
+ }
+ /* If the SGID attribute is set on a just created file or dir, the
+ first group in the ACL is the desired primary group of the new
+ object. Alternatively, the first repetition of the owner SID is
+ the desired primary group, and we mark the object as owner_eq_group
+ object. */
+ if (just_created && attr & S_ISGID && !saw_group_obj
+ && (type == GROUP || (type == USER_OBJ && saw_user_obj)))
+ {
+ type = GROUP_OBJ;
+ lacl[1].a_id = gid = id;
+ if (type == USER_OBJ)
+ owner_eq_group = true;
+ }
+ if (!(ace->Header.AceFlags & INHERIT_ONLY || type & ACL_DEFAULT))
+ {
+ if (type == USER_OBJ)
{
- if ((pos = searchace (lacl, MAX_ACL_ENTRIES, type, id)) >= 0)
- getace (lacl[pos], type, id, ace->Mask, ace->Header.AceType);
+ /* If we get a second entry for the owner SID, it's either a
+ GROUP_OBJ entry for the same SID, if owner SID == group SID,
+ or it's an additional USER entry. The latter can happen
+ when chown'ing a file. */
+ if (saw_user_obj)
+ {
+ if (owner_eq_group && !saw_group_obj)
+ {
+ type = GROUP_OBJ;
+ /* Gid and uid are not necessarily the same even if the
+ SID is the same: /etc/group is in use and the user got
+ added to /etc/group using another gid than the uid.
+ This is a border case but it happened and resetting id
+ to gid is not much of a burden. */
+ id = gid;
+ if (ace->Header.AceType == ACCESS_ALLOWED_ACE_TYPE)
+ saw_group_obj = true;
+ }
+ else
+ type = USER;
+ }
+ else if (ace->Header.AceType == ACCESS_ALLOWED_ACE_TYPE)
+ saw_user_obj = true;
}
- if ((ace->Header.AceFlags
- & (CONTAINER_INHERIT_ACE | OBJECT_INHERIT_ACE))
- && pc.isdir ())
+ else if (type == GROUP_OBJ)
{
- if (type == USER_OBJ)
- type = USER;
- else if (type == GROUP_OBJ)
- type = GROUP;
- type |= ACL_DEFAULT;
- types_def |= type;
- if ((pos = searchace (lacl, MAX_ACL_ENTRIES, type, id)) >= 0)
- getace (lacl[pos], type, id, ace->Mask, ace->Header.AceType);
+ /* Same for the primary group. */
+ if (ace->Header.AceType == ACCESS_ALLOWED_ACE_TYPE)
+ {
+ if (saw_group_obj)
+ type = GROUP;
+ saw_group_obj = true;
+ }
}
- }
- if (types_def && (pos = searchace (lacl, MAX_ACL_ENTRIES, 0)) >= 0)
- {
- /* Ensure that the default acl contains at
- least DEF_(USER|GROUP|OTHER)_OBJ entries. */
- if (!(types_def & USER_OBJ))
+ if ((pos = searchace (lacl, MAX_ACL_ENTRIES, type, id)) >= 0)
{
- lacl[pos].a_type = DEF_USER_OBJ;
- lacl[pos].a_id = uid;
- lacl[pos].a_perm = lacl[0].a_perm;
- pos++;
+ getace (lacl[pos], type, id, ace->Mask, ace->Header.AceType,
+ new_style && type & (USER | GROUP_OBJ | GROUP));
+ aclsid[pos] = ace_sid;
+ if (!new_style)
+ {
+ /* Fix up CLASS_OBJ value. */
+ if (type & (USER | GROUP))
+ {
+ has_class_perm = true;
+ /* Accommodate Windows: Never add SYSTEM and Admins to
+ CLASS_OBJ. Unless (implicitly) if they are the
+ GROUP_OBJ entry. */
+ if (ace_sid != well_known_system_sid
+ && ace_sid != well_known_admins_sid)
+ {
+ class_perm |= lacl[pos].a_perm;
+ standard_ACEs_only = false;
+ }
+ }
+ }
+ /* For a newly created file, we'd like to know if we're running
+ with a standard ACL, one only consisting of POSIX perms, plus
+ SYSTEM and Admins as maximum non-POSIX perms entries. If it's
+ a standard ACL, we apply umask. That's not entirely correct,
+ but it's probably the best we can do. Chmod also wants to
+ know this. See there for the details. */
+ else if (type & (USER | GROUP)
+ && standard_ACEs_only
+ && ace_sid != well_known_system_sid
+ && ace_sid != well_known_admins_sid)
+ standard_ACEs_only = false;
}
- if (!(types_def & GROUP_OBJ) && pos < MAX_ACL_ENTRIES)
+ }
+ if ((ace->Header.AceFlags & SUB_CONTAINERS_AND_OBJECTS_INHERIT))
+ {
+ if (type == USER_OBJ)
{
- lacl[pos].a_type = DEF_GROUP_OBJ;
- lacl[pos].a_id = gid;
- lacl[pos].a_perm = lacl[1].a_perm;
- pos++;
+ /* As above: If we get a second entry for the owner SID, it's
+ a GROUP_OBJ entry for the same SID if owner SID == group SID,
+ but this time only if the S_ISGID bit is set. Otherwise it's
+ an additional USER entry. */
+ if (saw_def_user_obj)
+ {
+ if (owner_eq_group && !saw_def_group_obj && attr & S_ISGID)
+ {
+ /* Needs post-processing in the following GROUP_OBJ block.
+ Set id to ACL_UNDEFINED_ID to play it safe. */
+ type = GROUP_OBJ;
+ id = ACL_UNDEFINED_ID;
+ }
+ else
+ type = USER;
+ }
+ else if (ace->Header.AceType == ACCESS_ALLOWED_ACE_TYPE)
+ saw_def_user_obj = true;
}
- if (!(types_def & OTHER_OBJ) && pos < MAX_ACL_ENTRIES)
+ if (type == GROUP_OBJ)
{
- lacl[pos].a_type = DEF_OTHER_OBJ;
- lacl[pos].a_id = ILLEGAL_GID;
- lacl[pos].a_perm = lacl[2].a_perm;
- pos++;
+ /* If the SGID bit is set, the inheritable entry for the
+ primary group is, in fact, the DEF_GROUP_OBJ entry,
+ so don't change the type to GROUP in this case. */
+ if (!new_style || saw_def_group_obj || !(attr & S_ISGID))
+ type = GROUP;
+ else if (ace->Header.AceType == ACCESS_ALLOWED_ACE_TYPE)
+ saw_def_group_obj = true;
}
- /* Include DEF_CLASS_OBJ if any named default ace exists. */
- if ((types_def & (USER|GROUP)) && pos < MAX_ACL_ENTRIES)
+ type |= ACL_DEFAULT;
+ types_def |= type;
+ if ((pos = searchace (lacl, MAX_ACL_ENTRIES, type, id)) >= 0)
{
- lacl[pos].a_type = DEF_CLASS_OBJ;
- lacl[pos].a_id = ILLEGAL_GID;
- lacl[pos].a_perm = S_IROTH | S_IWOTH | S_IXOTH;
+ getace (lacl[pos], type, id, ace->Mask, ace->Header.AceType,
+ new_style && type & (USER | GROUP_OBJ | GROUP));
+ aclsid[pos] = ace_sid;
+ if (!new_style)
+ {
+ /* Fix up DEF_CLASS_OBJ value. */
+ if (type & (USER | GROUP))
+ {
+ has_def_class_perm = true;
+ /* Accommodate Windows: Never add SYSTEM and Admins to
+ CLASS_OBJ. Unless (implicitly) if they are the
+ GROUP_OBJ entry. */
+ if (ace_sid != well_known_system_sid
+ && ace_sid != well_known_admins_sid)
+ def_class_perm |= lacl[pos].a_perm;
+ }
+ /* And note the position of the DEF_GROUP_OBJ entry. */
+ if (type == DEF_GROUP_OBJ)
+ def_pgrp_pos = pos;
+ }
}
}
}
+ /* If this is an old-style or non-Cygwin ACL, and secondary user and group
+ entries exist in the ACL, fake a matching CLASS_OBJ entry. The CLASS_OBJ
+ permissions are the or'ed permissions of the primary group permissions
+ and all secondary user and group permissions. */
+ if (!new_style && has_class_perm
+ && (pos = searchace (lacl, MAX_ACL_ENTRIES, 0)) >= 0)
+ {
+ lacl[pos].a_type = CLASS_OBJ;
+ lacl[pos].a_id = ACL_UNDEFINED_ID;
+ class_perm |= lacl[1].a_perm;
+ lacl[pos].a_perm = class_perm;
+ aclsid[pos] = well_known_null_sid;
+ }
+ /* For ptys, fake a mask if the admins group is neither owner nor group.
+ In that case we have an extra ACE for the admins group, and we need a
+ CLASS_OBJ to get a valid POSIX ACL. However, Windows filters the ACE
+ Mask value so it only reflects the bit values supported by the object
+ type. The result is that we can't set an explicit CLASS_OBJ value for
+ ptys in the NULL SID ACE. */
+ else if (S_ISCHR (attr) && owner_sid != well_known_admins_sid
+ && group_sid != well_known_admins_sid
+ && (pos = searchace (lacl, MAX_ACL_ENTRIES, CLASS_OBJ)) >= 0)
+ {
+ lacl[pos].a_type = CLASS_OBJ;
+ lacl[pos].a_id = ACL_UNDEFINED_ID;
+ lacl[pos].a_perm = lacl[1].a_perm; /* == group perms */
+ aclsid[pos] = well_known_null_sid;
+ }
+ /* If this is a just created file, and this is an ACL with only standard
+ entries, or if standard POSIX permissions are missing (probably no
+ inherited ACEs so created from a default DACL), assign the permissions
+ specified by the file creation mask. The values get masked by the
+ actually requested permissions by the caller per POSIX 1003.1e draft 17. */
+ if (just_created)
+ {
+ mode_t perms = (S_IRWXU | S_IRWXG | S_IRWXO) & ~cygheap->umask;
+ if (standard_ACEs_only || !saw_user_obj)
+ lacl[0].a_perm = (perms >> 6) & S_IRWXO;
+ if (standard_ACEs_only || !saw_group_obj)
+ lacl[1].a_perm = (perms >> 3) & S_IRWXO;
+ if (standard_ACEs_only || !saw_other_obj)
+ lacl[2].a_perm = perms & S_IRWXO;
+ }
+ /* Ensure that the default acl contains at least
+ DEF_(USER|GROUP|OTHER)_OBJ entries. */
+ if (types_def && (pos = searchace (lacl, MAX_ACL_ENTRIES, 0)) >= 0)
+ {
+ if (!(types_def & USER_OBJ))
+ {
+ lacl[pos].a_type = DEF_USER_OBJ;
+ lacl[pos].a_id = uid;
+ lacl[pos].a_perm = lacl[0].a_perm;
+ aclsid[pos] = well_known_creator_owner_sid;
+ pos++;
+ }
+ if (!(types_def & GROUP_OBJ) && pos < MAX_ACL_ENTRIES)
+ {
+ lacl[pos].a_type = DEF_GROUP_OBJ;
+ lacl[pos].a_id = gid;
+ lacl[pos].a_perm = lacl[1].a_perm;
+ /* Note the position of the DEF_GROUP_OBJ entry. */
+ def_pgrp_pos = pos;
+ aclsid[pos] = well_known_creator_group_sid;
+ pos++;
+ }
+ if (!(types_def & OTHER_OBJ) && pos < MAX_ACL_ENTRIES)
+ {
+ lacl[pos].a_type = DEF_OTHER_OBJ;
+ lacl[pos].a_id = ACL_UNDEFINED_ID;
+ lacl[pos].a_perm = lacl[2].a_perm;
+ aclsid[pos] = well_known_world_sid;
+ pos++;
+ }
+ }
+ /* If this is an old-style or non-Cygwin ACL, and secondary user default
+ and group default entries exist in the ACL, fake a matching DEF_CLASS_OBJ
+ entry. The DEF_CLASS_OBJ permissions are the or'ed permissions of the
+ primary group default permissions and all secondary user and group def.
+ permissions. */
+ if (!new_style && has_def_class_perm
+ && (pos = searchace (lacl, MAX_ACL_ENTRIES, 0)) >= 0)
+ {
+ lacl[pos].a_type = DEF_CLASS_OBJ;
+ lacl[pos].a_id = ACL_UNDEFINED_ID;
+ lacl[pos].a_perm = def_class_perm;
+ if (def_pgrp_pos >= 0)
+ lacl[pos].a_perm |= lacl[def_pgrp_pos].a_perm;
+ aclsid[pos] = well_known_null_sid;
+ }
+
+ /* Make sure `pos' contains the number of used entries in lacl. */
if ((pos = searchace (lacl, MAX_ACL_ENTRIES, 0)) < 0)
pos = MAX_ACL_ENTRIES;
- if (aclbufp) {
- if (owner_sid == group_sid)
- lacl[0].a_perm = lacl[1].a_perm;
- if (pos > nentries)
+
+ /* For old-style or non-Cygwin ACLs, check for merging permissions. */
+ if (!new_style)
+ for (idx = 0; idx < pos; ++idx)
{
- set_errno (ENOSPC);
- return -1;
+ if (lacl[idx].a_type & (USER_OBJ | USER)
+ && !(lacl[idx].a_type & ACL_DEFAULT))
+ {
+ mode_t perm;
+
+ /* Don't merge if the user already has all permissions, or... */
+ if (lacl[idx].a_perm == S_IRWXO)
+ continue;
+ /* ...if the sum of perms is less than or equal the user's perms. */
+ perm = lacl[idx].a_perm
+ | (has_class_perm ? class_perm : lacl[1].a_perm)
+ | lacl[2].a_perm;
+ if (perm == lacl[idx].a_perm)
+ continue;
+ /* Otherwise, if we use the Windows user DB, utilize Authz to make
+ sure all user permissions are correctly reflecting the Windows
+ permissions. */
+ if (cygheap->pg.nss_pwd_db ()
+ && authz_get_user_attribute (&perm, psd, aclsid[idx]))
+ lacl[idx].a_perm = perm;
+ /* Otherwise we only check the current user. If the user entry
+ has a deny ACE, don't check. */
+ else if (lacl[idx].a_id == myself->uid
+ && !(lacl[idx].a_perm & DENY_RWX))
+ {
+ /* Sum up all permissions of groups the user is member of, plus
+ everyone perms, and merge them to user perms. */
+ BOOL ret;
+
+ perm = lacl[2].a_perm & S_IRWXO;
+ for (int gidx = 1; gidx < pos; ++gidx)
+ if (lacl[gidx].a_type & (GROUP_OBJ | GROUP)
+ && CheckTokenMembership (cygheap->user.issetuid ()
+ ? cygheap->user.imp_token () : NULL,
+ aclsid[gidx], &ret)
+ && ret)
+ perm |= lacl[gidx].a_perm & S_IRWXO;
+ lacl[idx].a_perm |= perm;
+ }
+ }
+ /* For all groups, if everyone has more permissions, add everyone
+ perms to group perms. Skip groups with deny ACE. */
+ else if (lacl[idx].a_type & (GROUP_OBJ | GROUP)
+ && !(lacl[idx].a_type & ACL_DEFAULT)
+ && !(lacl[idx].a_perm & DENY_RWX))
+ lacl[idx].a_perm |= lacl[2].a_perm & S_IRWXO;
}
- memcpy (aclbufp, lacl, pos * sizeof (aclent_t));
- for (i = 0; i < pos; ++i)
- aclbufp[i].a_perm &= ~(DENY_R | DENY_W | DENY_X);
- aclsort32 (pos, 0, aclbufp);
- }
+ /* If owner SID == group SID (Microsoft Accounts) merge group perms into
+ user perms but leave group perms intact. That's a fake, but it allows
+ to keep track of the POSIX group perms without much effort. */
+ if (owner_eq_group)
+ lacl[0].a_perm |= lacl[1].a_perm;
+ /* Construct POSIX permission bits. Fortunately we know exactly where
+ to fetch the affecting bits from, at least as long as the array
+ hasn't been sorted. */
+ attr |= (lacl[0].a_perm & S_IRWXO) << 6;
+ attr |= ((has_class_perm ? class_perm : lacl[1].a_perm) & S_IRWXO) << 3;
+ attr |= (lacl[2].a_perm & S_IRWXO);
+
+out:
+ if (uid_ret)
+ *uid_ret = uid;
+ if (gid_ret)
+ *gid_ret = gid;
+ if (attr_ret)
+ *attr_ret = attr;
+ if (aclbufp)
+ {
+ if (pos > nentries)
+ {
+ set_errno (ENOSPC);
+ return -1;
+ }
+ memcpy (aclbufp, lacl, pos * sizeof (aclent_t));
+ for (idx = 0; idx < pos; ++idx)
+ aclbufp[idx].a_perm &= S_IRWXO;
+ aclsort32 (pos, 0, aclbufp);
+ }
+ if (std_acl)
+ *std_acl = standard_ACEs_only;
+ return pos;
+}
+
+int
+getacl (HANDLE handle, path_conv &pc, int nentries, aclent_t *aclbufp)
+{
+ security_descriptor sd;
+
+ if (get_file_sd (handle, pc, sd, false))
+ return -1;
+ int pos = get_posix_access (sd, NULL, NULL, NULL, aclbufp, nentries);
syscall_printf ("%R = getacl(%S)", pos, pc.get_nt_native_path ());
return pos;
}
@@ -490,130 +1252,151 @@ facl32 (int fd, int cmd, int nentries, aclent_t *aclbufp)
return res;
}
-extern "C" int
-aclcheck32 (aclent_t *aclbufp, int nentries, int *which)
+int
+__aclcheck (aclent_t *aclbufp, int nentries, int *which, bool posix)
{
bool has_user_obj = false;
bool has_group_obj = false;
bool has_other_obj = false;
bool has_class_obj = false;
- bool has_ug_objs __attribute__ ((unused)) = false;
- bool has_def_user_obj __attribute__ ((unused)) = false;
+ bool has_ug_objs = false;
+ bool has_def_objs = false;
+ bool has_def_user_obj = false;
bool has_def_group_obj = false;
bool has_def_other_obj = false;
bool has_def_class_obj = false;
- bool has_def_ug_objs __attribute__ ((unused)) = false;
+ bool has_def_ug_objs = false;
int pos2;
for (int pos = 0; pos < nentries; ++pos)
- switch (aclbufp[pos].a_type)
- {
- case USER_OBJ:
- if (has_user_obj)
- {
- if (which)
- *which = pos;
- return USER_ERROR;
- }
- has_user_obj = true;
- break;
- case GROUP_OBJ:
- if (has_group_obj)
- {
- if (which)
- *which = pos;
- return GRP_ERROR;
- }
- has_group_obj = true;
- break;
- case OTHER_OBJ:
- if (has_other_obj)
- {
- if (which)
- *which = pos;
- return OTHER_ERROR;
- }
- has_other_obj = true;
- break;
- case CLASS_OBJ:
- if (has_class_obj)
- {
- if (which)
- *which = pos;
- return CLASS_ERROR;
- }
- has_class_obj = true;
- break;
- case USER:
- case GROUP:
- if ((pos2 = searchace (aclbufp + pos + 1, nentries - pos - 1,
- aclbufp[pos].a_type, aclbufp[pos].a_id)) >= 0)
- {
- if (which)
- *which = pos2;
- return DUPLICATE_ERROR;
- }
- has_ug_objs = true;
- break;
- case DEF_USER_OBJ:
- if (has_def_user_obj)
- {
- if (which)
- *which = pos;
- return USER_ERROR;
- }
- has_def_user_obj = true;
- break;
- case DEF_GROUP_OBJ:
- if (has_def_group_obj)
- {
- if (which)
- *which = pos;
- return GRP_ERROR;
- }
- has_def_group_obj = true;
- break;
- case DEF_OTHER_OBJ:
- if (has_def_other_obj)
- {
- if (which)
- *which = pos;
- return OTHER_ERROR;
- }
- has_def_other_obj = true;
- break;
- case DEF_CLASS_OBJ:
- if (has_def_class_obj)
- {
- if (which)
- *which = pos;
- return CLASS_ERROR;
- }
- has_def_class_obj = true;
- break;
- case DEF_USER:
- case DEF_GROUP:
- if ((pos2 = searchace (aclbufp + pos + 1, nentries - pos - 1,
- aclbufp[pos].a_type, aclbufp[pos].a_id)) >= 0)
- {
- if (which)
- *which = pos2;
- return DUPLICATE_ERROR;
- }
- has_def_ug_objs = true;
- break;
- default:
- return ENTRY_ERROR;
- }
+ {
+ /* POSIX ACLs may contain deleted entries. Just ignore them. */
+ if (posix && aclbufp[pos].a_type == ACL_DELETED_TAG)
+ continue;
+ /* POSIX defines two sorts of ACLs, access and default, none of which
+ is supposed to have the ACL_DEFAULT flag set. */
+ if (posix && (aclbufp[pos].a_type & ACL_DEFAULT))
+ {
+ if (which)
+ *which = pos;
+ return ENTRY_ERROR;
+ }
+ switch (aclbufp[pos].a_type)
+ {
+ case USER_OBJ:
+ if (has_user_obj)
+ {
+ if (which)
+ *which = pos;
+ return USER_ERROR;
+ }
+ has_user_obj = true;
+ break;
+ case GROUP_OBJ:
+ if (has_group_obj)
+ {
+ if (which)
+ *which = pos;
+ return GRP_ERROR;
+ }
+ has_group_obj = true;
+ break;
+ case OTHER_OBJ:
+ if (has_other_obj)
+ {
+ if (which)
+ *which = pos;
+ return OTHER_ERROR;
+ }
+ has_other_obj = true;
+ break;
+ case CLASS_OBJ:
+ if (has_class_obj)
+ {
+ if (which)
+ *which = pos;
+ return CLASS_ERROR;
+ }
+ has_class_obj = true;
+ break;
+ case USER:
+ case GROUP:
+ if ((pos2 = searchace (aclbufp + pos + 1, nentries - pos - 1,
+ aclbufp[pos].a_type, aclbufp[pos].a_id)) >= 0)
+ {
+ if (which)
+ *which = pos2;
+ return DUPLICATE_ERROR;
+ }
+ has_ug_objs = true;
+ break;
+ case DEF_USER_OBJ:
+ if (has_def_user_obj)
+ {
+ if (which)
+ *which = pos;
+ return USER_ERROR;
+ }
+ has_def_objs = has_def_user_obj = true;
+ break;
+ case DEF_GROUP_OBJ:
+ if (has_def_group_obj)
+ {
+ if (which)
+ *which = pos;
+ return GRP_ERROR;
+ }
+ has_def_objs = has_def_group_obj = true;
+ break;
+ case DEF_OTHER_OBJ:
+ if (has_def_other_obj)
+ {
+ if (which)
+ *which = pos;
+ return OTHER_ERROR;
+ }
+ has_def_objs = has_def_other_obj = true;
+ break;
+ case DEF_CLASS_OBJ:
+ if (has_def_class_obj)
+ {
+ if (which)
+ *which = pos;
+ return CLASS_ERROR;
+ }
+ has_def_objs = has_def_class_obj = true;
+ break;
+ case DEF_USER:
+ case DEF_GROUP:
+ if ((pos2 = searchace (aclbufp + pos + 1, nentries - pos - 1,
+ aclbufp[pos].a_type, aclbufp[pos].a_id)) >= 0)
+ {
+ if (which)
+ *which = pos2;
+ return DUPLICATE_ERROR;
+ }
+ has_def_objs = has_def_ug_objs = true;
+ break;
+ default:
+ if (which)
+ *which = pos;
+ return ENTRY_ERROR;
+ }
+ }
if (!has_user_obj
|| !has_group_obj
|| !has_other_obj
-#if 0
- /* These checks are not ok yet since CLASS_OBJ isn't fully implemented. */
- || (has_ug_objs && !has_class_obj)
- || (has_def_ug_objs && !has_def_class_obj)
-#endif
- )
+ || (has_ug_objs && !has_class_obj))
+ {
+ if (which)
+ *which = -1;
+ return MISS_ERROR;
+ }
+ /* Check for missing default entries only on Solaris ACLs. */
+ if (!posix &&
+ ((has_def_objs
+ && !(has_def_user_obj && has_def_group_obj && has_def_other_obj))
+ || (has_def_ug_objs && !has_def_class_obj)))
{
if (which)
*which = -1;
@@ -622,6 +1405,46 @@ aclcheck32 (aclent_t *aclbufp, int nentries, int *which)
return 0;
}
+extern "C" int
+aclcheck32 (aclent_t *aclbufp, int nentries, int *which)
+{
+ return __aclcheck (aclbufp, nentries, which, false);
+}
+
+/* For the sake of acl_calc_mask, return -1 if the ACL doesn't need a mask
+ or if a mask entry already exists (__aclcalcmask sets the mask by itself).
+ Otherwise return the mask value so acl_calc_mask can create a mask entry.
+ This doesn't matter when called from aclsort. */
+mode_t
+__aclcalcmask (aclent_t *aclbufp, int nentries)
+{
+ mode_t mask = 0;
+ bool need_mask = false;
+ int mask_idx = -1;
+
+ for (int idx = 0; idx < nentries; ++idx)
+ switch (aclbufp[idx].a_type)
+ {
+ case USER:
+ case GROUP:
+ need_mask = true;
+ /*FALLTHRU*/
+ case GROUP_OBJ:
+ mask |= aclbufp[idx].a_perm;
+ break;
+ case CLASS_OBJ:
+ mask_idx = idx;
+ break;
+ default:
+ break;
+ }
+ if (mask_idx != -1)
+ aclbufp[mask_idx].a_perm = mask;
+ if (need_mask && mask_idx == -1)
+ return mask;
+ return (acl_perm_t) -1;
+}
+
static int
acecmp (const void *a1, const void *a2)
{
@@ -633,17 +1456,32 @@ acecmp (const void *a1, const void *a2)
#undef ace
}
+/* Sorts any acl. Called from sec_posixacl.cc. */
+int
+__aclsort (int nentries, aclent_t *aclbufp)
+{
+ if (!aclbufp || nentries < 0)
+ {
+ set_errno (EINVAL);
+ return -1;
+ }
+ if (nentries > 0)
+ qsort ((void *) aclbufp, nentries, sizeof (aclent_t), acecmp);
+ return 0;
+}
+
extern "C" int
-aclsort32 (int nentries, int, aclent_t *aclbufp)
+aclsort32 (int nentries, int calclass, aclent_t *aclbufp)
{
- if (aclcheck32 (aclbufp, nentries, NULL))
- return -1;
- if (!aclbufp || nentries < 1)
+ if (!aclbufp || nentries < MIN_ACL_ENTRIES
+ || aclcheck32 (aclbufp, nentries, NULL))
{
set_errno (EINVAL);
return -1;
}
qsort ((void *) aclbufp, nentries, sizeof (aclent_t), acecmp);
+ if (calclass)
+ __aclcalcmask (aclbufp, nentries);
return 0;
}
@@ -736,78 +1574,224 @@ aclfrompbits32 (aclent_t *aclbufp, int nentries, mode_t *pbitsp)
}
static char *
-permtostr (mode_t perm)
+permtostr (char *bufp, mode_t perm)
{
- static char pbuf[4];
-
- pbuf[0] = (perm & S_IROTH) ? 'r' : '-';
- pbuf[1] = (perm & S_IWOTH) ? 'w' : '-';
- pbuf[2] = (perm & S_IXOTH) ? 'x' : '-';
- pbuf[3] = '\0';
- return pbuf;
+ *bufp++ = (perm & S_IROTH) ? 'r' : '-';
+ *bufp++ = (perm & S_IWOTH) ? 'w' : '-';
+ *bufp++ = (perm & S_IXOTH) ? 'x' : '-';
+ return bufp;
}
-extern "C" char *
-acltotext32 (aclent_t *aclbufp, int aclcnt)
+#define _OPT(o) (options & (o))
+
+#define _CHK(l) \
+ if (bufp + (l) >= buf + 2 * NT_MAX_PATH - 1) \
+ { \
+ set_errno (ENOMEM); \
+ return NULL; \
+ }
+#define _CPY(s) ({ \
+ const char *_s = (s); \
+ _CHK (strlen (_s)); \
+ bufp = stpcpy (bufp, _s); \
+ })
+#define _PTS(p) { \
+ _CHK (3); \
+ bufp = permtostr (bufp, p); \
+ }
+
+#define _CMP(s) (!strncmp (bufp, acl_part[s].str, acl_part[s].len))
+
+struct _acl_part
+{
+ const char *str;
+ size_t len;
+};
+
+static _acl_part acl_part_l[] =
+{
+ { "default:", 8 },
+ { "user:", 5 },
+ { "group:", 6 },
+ { "mask:", 5 },
+ { "other:", 6 }
+};
+
+static _acl_part acl_part_s[] =
+{
+ { "d:", 2 },
+ { "u:", 2 },
+ { "g:", 2 },
+ { "m:", 2 },
+ { "o:", 2 }
+};
+
+enum _acl_type {
+ default_s,
+ user_s,
+ group_s,
+ mask_s,
+ other_s,
+ none_s
+};
+
+char *
+__acltotext (aclent_t *aclbufp, int aclcnt, const char *prefix, char separator,
+ int options)
{
if (!aclbufp || aclcnt < 1 || aclcnt > MAX_ACL_ENTRIES
- || aclcheck32 (aclbufp, aclcnt, NULL))
+ || aclsort32 (aclcnt, 0, aclbufp))
{
set_errno (EINVAL);
return NULL;
}
- char buf[32000];
- buf[0] = '\0';
+ cyg_ldap cldap;
+ tmp_pathbuf tp;
+ char *buf = tp.t_get ();
+ char *bufp = buf;
+ char *entry_start;
bool first = true;
+ struct passwd *pw;
+ struct group *gr;
+ mode_t mask = S_IRWXO;
+ mode_t def_mask = S_IRWXO;
+ mode_t effective;
+ int pos;
+ _acl_part *acl_part = _OPT (TEXT_ABBREVIATE) ? acl_part_s : acl_part_l;
- for (int pos = 0; pos < aclcnt; ++pos)
+ *bufp = '\0';
+ /* If effective rights are requested, fetch mask values. */
+ if (_OPT (TEXT_SOME_EFFECTIVE | TEXT_ALL_EFFECTIVE))
+ {
+ if ((pos = searchace (aclbufp, aclcnt, CLASS_OBJ)) >= 0)
+ mask = aclbufp[pos].a_perm;
+ if ((pos = searchace (aclbufp, aclcnt, DEF_CLASS_OBJ)) >= 0)
+ def_mask = aclbufp[pos].a_perm;
+ }
+ for (pos = 0; pos < aclcnt; ++pos)
{
if (!first)
- strcat (buf, ",");
+ {
+ _CHK (1);
+ *bufp++ = separator;
+ }
first = false;
- if (aclbufp[pos].a_type & ACL_DEFAULT)
- strcat (buf, "default");
+ /* Rememeber start position of entry to compute TEXT_SMART_INDENT tabs. */
+ entry_start = bufp;
+ /* prefix */
+ if (prefix)
+ _CPY (prefix);
+ /* Solaris default acl? */
+ if (!_OPT (TEXT_IS_POSIX) && aclbufp[pos].a_type & ACL_DEFAULT)
+ _CPY (acl_part[default_s].str);
+ /* acl type */
switch (aclbufp[pos].a_type & ~ACL_DEFAULT)
{
case USER_OBJ:
- __small_sprintf (buf + strlen (buf), "user::%s",
- permtostr (aclbufp[pos].a_perm));
- break;
case USER:
- __small_sprintf (buf + strlen (buf), "user:%d:%s",
- aclbufp[pos].a_id, permtostr (aclbufp[pos].a_perm));
+ _CPY (acl_part[user_s].str);
break;
case GROUP_OBJ:
- __small_sprintf (buf + strlen (buf), "group::%s",
- permtostr (aclbufp[pos].a_perm));
- break;
case GROUP:
- __small_sprintf (buf + strlen (buf), "group:%d:%s",
- aclbufp[pos].a_id, permtostr (aclbufp[pos].a_perm));
+ _CPY (acl_part[group_s].str);
break;
case CLASS_OBJ:
- __small_sprintf (buf + strlen (buf), "mask::%s",
- permtostr (aclbufp[pos].a_perm));
+ _CPY (acl_part[mask_s].str);
break;
case OTHER_OBJ:
- __small_sprintf (buf + strlen (buf), "other::%s",
- permtostr (aclbufp[pos].a_perm));
+ _CPY (acl_part[other_s].str);
+ break;
+ }
+ /* id, if any */
+ switch (aclbufp[pos].a_type & ~ACL_DEFAULT)
+ {
+ case USER:
+ if (_OPT (TEXT_NUMERIC_IDS)
+ || !(pw = internal_getpwuid (aclbufp[pos].a_id, &cldap)))
+ {
+ _CHK (11);
+ bufp += __small_sprintf (bufp, "%u:", aclbufp[pos].a_id);
+ }
+ else
+ {
+ _CHK (strlen (pw->pw_name + 1));
+ bufp += __small_sprintf (bufp, "%s:", pw->pw_name);
+ }
+ break;
+ case GROUP:
+ if (_OPT (TEXT_NUMERIC_IDS)
+ || !(gr = internal_getgrgid (aclbufp[pos].a_id, &cldap)))
+ {
+ _CHK (11);
+ bufp += __small_sprintf (bufp, "%u:", aclbufp[pos].a_id);
+ }
+ else
+ {
+ _CHK (strlen (gr->gr_name));
+ bufp += __small_sprintf (bufp, "%s:", gr->gr_name);
+ }
break;
default:
- set_errno (EINVAL);
- return NULL;
+ _CPY (":");
+ break;
}
+ /* real permissions */
+ _PTS (aclbufp[pos].a_perm);
+ if (!_OPT (TEXT_SOME_EFFECTIVE | TEXT_ALL_EFFECTIVE))
+ continue;
+ /* effective permissions */
+ switch (aclbufp[pos].a_type)
+ {
+ case USER:
+ case GROUP_OBJ:
+ case GROUP:
+ effective = aclbufp[pos].a_perm & mask;
+ break;
+ case DEF_USER:
+ case DEF_GROUP_OBJ:
+ case DEF_GROUP:
+ effective = aclbufp[pos].a_perm & def_mask;
+ break;
+ default:
+ continue;
+ }
+ if (_OPT (TEXT_ALL_EFFECTIVE) || effective != aclbufp[pos].a_perm)
+ {
+ if (_OPT (TEXT_SMART_INDENT))
+ {
+ int tabs = 3 - (bufp - entry_start) / 8;
+ if (tabs-- > 0)
+ {
+ _CHK (tabs);
+ while (tabs-- > 0)
+ *bufp++ = '\t';
+ }
+ }
+ _CPY ("\t#effective:");
+ _PTS (effective);
+ }
+ }
+ if (_OPT (TEXT_END_SEPARATOR))
+ {
+ _CHK (1);
+ *bufp++ = separator;
}
+ *bufp = '\0';
return strdup (buf);
}
+extern "C" char *
+acltotext32 (aclent_t *aclbufp, int aclcnt)
+{
+ return __acltotext (aclbufp, aclcnt, NULL, ',', 0);
+}
+
static mode_t
-permfromstr (char *perm)
+permfromstr (char *perm, bool posix_long)
{
mode_t mode = 0;
+ int idx;
- if (strlen (perm) != 3)
- return 01000;
if (perm[0] == 'r')
mode |= S_IROTH;
else if (perm[0] != '-')
@@ -820,119 +1804,170 @@ permfromstr (char *perm)
mode |= S_IXOTH;
else if (perm[2] != '-')
return 01000;
- return mode;
+ idx = 3;
+ /* In posix long mode, only tabs up to a hash sign allowed. */
+ if (posix_long)
+ while (perm[idx] == '\t')
+ ++idx;
+ if (perm[idx] == '\0' || (posix_long && perm[idx] == '#'))
+ return mode;
+ return 01000;
}
-extern "C" aclent_t *
-aclfromtext32 (char *acltextp, int *)
+void *
+__aclfromtext (const char *acltextp, int *aclcnt, bool posix)
{
- if (!acltextp)
+ if (!acltextp || strlen (acltextp) >= 2 * NT_MAX_PATH)
{
set_errno (EINVAL);
return NULL;
}
- char buf[strlen (acltextp) + 1];
- aclent_t lacl[MAX_ACL_ENTRIES];
- memset (lacl, 0, sizeof lacl);
+ cyg_ldap cldap;
+ tmp_pathbuf tp;
+ const char *delim;
+ _acl_part *acl_part;
+ char *bufp, *lasts, *qualifier;
int pos = 0;
- strcpy (buf, acltextp);
- char *lasts;
- for (char *c = strtok_r (buf, ",", &lasts);
- c;
- c = strtok_r (NULL, ",", &lasts))
+ int acl_type;
+
+ aclent_t *lacl = (aclent_t *) tp.c_get ();
+ memset (lacl, 0, MAX_ACL_ENTRIES * sizeof (aclent_t *));
+ char *buf = tp.t_get ();
+ stpcpy (buf, acltextp);
+
+ if (posix)
+ {
+ /* Posix long or short form. Any \n in the string means long form. */
+ if (strchr (buf, '\n'))
+ {
+ delim = "\n";
+ acl_part = acl_part_l;
+ }
+ else
+ {
+ delim = ",";
+ acl_part = acl_part_s;
+ }
+ }
+ else
{
- if (!strncmp (c, "default", 7))
+ /* Solaris aclfromtext format. */
+ delim = ",";
+ acl_part = acl_part_l;
+ }
+
+ for (bufp = strtok_r (buf, delim, &lasts);
+ bufp;
+ bufp = strtok_r (NULL, delim, &lasts))
+ {
+ /* Handle default acl entries only for Solaris ACLs. */
+ if (!posix && _CMP (default_s))
{
lacl[pos].a_type |= ACL_DEFAULT;
- c += 7;
+ bufp += acl_part[default_s].len;
}
- if (!strncmp (c, "user:", 5))
+ lacl[pos].a_id = ACL_UNDEFINED_ID;
+ for (acl_type = user_s; acl_type < none_s; ++acl_type)
+ if (_CMP (acl_type))
+ break;
+ if (acl_type == none_s)
{
- if (c[5] == ':')
- lacl[pos].a_type |= USER_OBJ;
- else
- {
- lacl[pos].a_type |= USER;
- c += 5;
- if (isalpha (*c))
- {
- struct passwd *pw = internal_getpwnam (c);
- if (!pw)
- {
- set_errno (EINVAL);
- return NULL;
- }
- lacl[pos].a_id = pw->pw_uid;
- c = strchrnul (c, ':');
- }
- else if (isdigit (*c))
- lacl[pos].a_id = strtol (c, &c, 10);
- if (*c != ':')
- {
- set_errno (EINVAL);
- return NULL;
- }
- }
+ set_errno (EINVAL);
+ return NULL;
}
- else if (!strncmp (c, "group:", 6))
+ bufp += acl_part[acl_type].len;
+ switch (acl_type)
{
- if (c[5] == ':')
- lacl[pos].a_type |= GROUP_OBJ;
- else
+ case user_s:
+ case group_s:
+ qualifier = bufp;
+ bufp = strchrnul (bufp, ':');
+ *bufp++ = '\0';
+ /* No qualifier? USER_OBJ or GROUP_OBJ */
+ if (!*qualifier)
{
- lacl[pos].a_type |= GROUP;
- c += 5;
- if (isalpha (*c))
- {
- struct group *gr = internal_getgrnam (c);
- if (!gr)
- {
- set_errno (EINVAL);
- return NULL;
- }
- lacl[pos].a_id = gr->gr_gid;
- c = strchrnul (c, ':');
- }
- else if (isdigit (*c))
- lacl[pos].a_id = strtol (c, &c, 10);
- if (*c != ':')
+ lacl[pos].a_type |= (acl_type == user_s) ? USER_OBJ : GROUP_OBJ;
+ break;
+ }
+ /* Some qualifier, USER or GROUP */
+ lacl[pos].a_type |= (acl_type == user_s) ? USER : GROUP;
+ if (isdigit (*qualifier))
+ {
+ char *ep;
+
+ id_t id = strtol (qualifier, &ep, 10);
+ if (*ep == '\0')
{
- set_errno (EINVAL);
- return NULL;
+ lacl[pos].a_id = id;
+ break;
}
}
- }
- else if (!strncmp (c, "mask:", 5))
- {
- if (c[5] == ':')
- lacl[pos].a_type |= CLASS_OBJ;
+ if (acl_type == user_s)
+ {
+ struct passwd *pw = internal_getpwnam (qualifier, &cldap);
+ if (pw)
+ lacl[pos].a_id = pw->pw_uid;
+ }
else
{
+ struct group *gr = internal_getgrnam (qualifier, &cldap);
+ if (gr)
+ lacl[pos].a_id = gr->gr_gid;
+ }
+ if (lacl[pos].a_id == ACL_UNDEFINED_ID)
+ {
set_errno (EINVAL);
return NULL;
}
- }
- else if (!strncmp (c, "other:", 6))
- {
- if (c[5] == ':')
- lacl[pos].a_type |= OTHER_OBJ;
- else
+ break;
+ case mask_s:
+ case other_s:
+ if (*bufp++ != ':')
{
set_errno (EINVAL);
return NULL;
}
+ lacl[pos].a_type |= (acl_type == mask_s) ? CLASS_OBJ : OTHER_OBJ;
+ break;
}
- if ((lacl[pos].a_perm = permfromstr (c)) == 01000)
+ /* In posix long mode, the next char after the permissions may be a tab
+ followed by effective permissions we can ignore here. */
+ if ((lacl[pos].a_perm = permfromstr (bufp, *delim == '\n')) == 01000)
{
set_errno (EINVAL);
return NULL;
}
++pos;
}
- aclent_t *aclp = (aclent_t *) malloc (pos * sizeof (aclent_t));
- if (aclp)
- memcpy (aclp, lacl, pos * sizeof (aclent_t));
- return aclp;
+ if (posix)
+ {
+ acl_t acl = (acl_t) acl_init (pos);
+ if (acl)
+ {
+ memcpy (acl->entry, lacl, pos * sizeof (aclent_t));
+ acl->count = pos;
+ if (aclcnt)
+ *aclcnt = pos;
+ }
+ return (void *) acl;
+ }
+ else
+ {
+ aclent_t *aclp = (aclent_t *) malloc (pos * sizeof (aclent_t));
+ if (aclp)
+ {
+ memcpy (aclp, lacl, pos * sizeof (aclent_t));
+ if (aclcnt)
+ *aclcnt = pos;
+ }
+ return (void *) aclp;
+ }
+}
+
+extern "C" aclent_t *
+aclfromtext32 (char *acltextp, int *aclcnt)
+{
+ return (aclent_t *) __aclfromtext (acltextp, aclcnt, false);
}
#ifdef __x86_64__
@@ -947,6 +1982,12 @@ EXPORT_ALIAS (aclfrompbits32, aclfrompbits)
EXPORT_ALIAS (acltotext32, acltotext)
EXPORT_ALIAS (aclfromtext32, aclfromtext)
#else
+typedef struct __acl16 {
+ int a_type;
+ __uid16_t a_id;
+ mode_t a_perm;
+} __aclent16_t;
+
/* __aclent16_t and aclent_t have same size and same member offsets */
static aclent_t *
acl16to32 (__aclent16_t *aclbufp, int nentries)
@@ -1022,7 +2063,7 @@ acltotext (__aclent16_t *aclbufp, int aclcnt)
}
extern "C" __aclent16_t *
-aclfromtext (char *acltextp, int * aclcnt)
+aclfromtext (char *acltextp, int *aclcnt)
{
return (__aclent16_t *) aclfromtext32 (acltextp, aclcnt);
}
diff --git a/winsup/cygwin/sec_auth.cc b/winsup/cygwin/sec_auth.cc
index d6f3bb5d8..853a07fad 100644
--- a/winsup/cygwin/sec_auth.cc
+++ b/winsup/cygwin/sec_auth.cc
@@ -1,8 +1,5 @@
/* sec_auth.cc: NT authentication functions
- Copyright 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007,
- 2008, 2009, 2010, 2011, 2012, 2013 Red Hat, Inc.
-
This file is part of Cygwin.
This software is a copyrighted work licensed under the terms of the
@@ -14,22 +11,31 @@ details. */
#include <wchar.h>
#include <wininet.h>
#include <ntsecapi.h>
-#include <dsgetdc.h>
#include "cygerrno.h"
#include "security.h"
#include "path.h"
#include "fhandler.h"
#include "dtable.h"
#include "cygheap.h"
+#include "registry.h"
#include "ntdll.h"
#include "tls_pbuf.h"
#include <lm.h>
#include <iptypes.h>
-#include "pwdgrp.h"
+#include <wininet.h>
+#include <userenv.h>
#include "cyglsa.h"
#include "cygserver_setpwd.h"
#include <cygwin/version.h>
+/* OpenBSD 2.0 and later. */
+extern "C"
+int
+issetugid (void)
+{
+ return cygheap->user.issetuid () ? 1 : 0;
+}
+
/* Starting with Windows Vista, the token returned by system functions
is a restricted token. The full admin token is linked to it and can
be fetched with NtQueryInformationToken. This function returns the original
@@ -110,7 +116,10 @@ extract_nt_dom_user (const struct passwd *pw, PWCHAR domain, PWCHAR user)
debug_printf ("pw_gecos %p (%s)", pw->pw_gecos, pw->pw_gecos);
- if (psid.getfrompw (pw)
+ /* The incoming passwd entry is not necessarily a pointer to the
+ internal passwd buffers, thus we must not rely on being able to
+ cast it to pg_pwd. */
+ if (psid.getfrompw_gecos (pw)
&& LookupAccountSidW (NULL, psid, user, &ulen, domain, &dlen, &use))
return;
@@ -122,11 +131,11 @@ extract_nt_dom_user (const struct passwd *pw, PWCHAR domain, PWCHAR user)
{
c = strchrnul (d + 2, ',');
if ((u = strchrnul (d + 2, '\\')) >= c)
- u = d + 1;
+ u = d + 1;
else if (u - d <= MAX_DOMAIN_NAME_LEN + 2)
- sys_mbstowcs (domain, MAX_DOMAIN_NAME_LEN + 1, d + 2, u - d - 1);
+ sys_mbstowcs (domain, MAX_DOMAIN_NAME_LEN + 1, d + 2, u - d - 1);
if (c - u <= UNLEN + 1)
- sys_mbstowcs (user, UNLEN + 1, u + 1, c - u);
+ sys_mbstowcs (user, UNLEN + 1, u + 1, c - u);
}
}
@@ -160,84 +169,182 @@ cygwin_logon_user (const struct passwd *pw, const char *password)
}
else
{
+ HANDLE hPrivToken = NULL;
+
/* See the comment in get_full_privileged_inheritable_token for a
description why we enable TCB privileges here. */
push_self_privilege (SE_TCB_PRIVILEGE, true);
- hToken = get_full_privileged_inheritable_token (hToken);
+ hPrivToken = get_full_privileged_inheritable_token (hToken);
pop_self_privilege ();
- if (!hToken)
- hToken = INVALID_HANDLE_VALUE;
+ if (!hPrivToken)
+ debug_printf ("Can't fetch linked token (%E), use standard token");
+ else
+ hToken = hPrivToken;
}
+ RtlSecureZeroMemory (passwd, NT_MAX_PATH);
cygheap->user.reimpersonate ();
debug_printf ("%R = logon_user(%s,...)", hToken, pw->pw_name);
return hToken;
}
-static void
-str2lsa (LSA_STRING &tgt, const char *srcstr)
+/* The buffer path points to should be at least MAX_PATH bytes. */
+PWCHAR
+get_user_profile_directory (PCWSTR sidstr, PWCHAR path, SIZE_T path_len)
{
- tgt.Length = strlen (srcstr);
- tgt.MaximumLength = tgt.Length + 1;
- tgt.Buffer = (PCHAR) srcstr;
+ if (!sidstr || !path)
+ return NULL;
+
+ UNICODE_STRING buf;
+ tmp_pathbuf tp;
+ tp.u_get (&buf);
+ NTSTATUS status;
+
+ RTL_QUERY_REGISTRY_TABLE tab[2] = {
+ { NULL, RTL_QUERY_REGISTRY_NOEXPAND | RTL_QUERY_REGISTRY_DIRECT
+ | RTL_QUERY_REGISTRY_REQUIRED,
+ L"ProfileImagePath", &buf, REG_NONE, NULL, 0 },
+ { NULL, 0, NULL, NULL, 0, NULL, 0 }
+ };
+
+ WCHAR key[wcslen (sidstr) + 16];
+ wcpcpy (wcpcpy (key, L"ProfileList\\"), sidstr);
+ status = RtlQueryRegistryValues (RTL_REGISTRY_WINDOWS_NT, key, tab,
+ NULL, NULL);
+ if (!NT_SUCCESS (status) || buf.Length == 0)
+ {
+ debug_printf ("ProfileImagePath for %W not found, status %y", sidstr,
+ status);
+ return NULL;
+ }
+ ExpandEnvironmentStringsW (buf.Buffer, path, path_len);
+ debug_printf ("ProfileImagePath for %W: %W", sidstr, path);
+ return path;
}
-static void
-str2buf2lsa (LSA_STRING &tgt, char *buf, const char *srcstr)
+/* The CreateProfile prototype is for some reason missing in our w32api headers,
+ even though it's defined upstream since Dec-2013. */
+extern "C" {
+ HRESULT WINAPI CreateProfile (LPCWSTR pszUserSid, LPCWSTR pszUserName,
+ LPWSTR pszProfilePath, DWORD cchProfilePath);
+}
+
+/* Load user profile if it's not already loaded. If the user profile doesn't
+ exist on the machine, and if we're running Vista or later, try to create it.
+
+ Return a handle to the loaded user registry hive only if it got actually
+ loaded here, not if it already existed. There's no reliable way to know
+ when to unload the hive yet, so we're leaking this registry handle for now.
+ TODO: Try to find a way to reliably unload the user profile again. */
+HANDLE
+load_user_profile (HANDLE token, struct passwd *pw, cygpsid &usersid)
{
- tgt.Length = strlen (srcstr);
- tgt.MaximumLength = tgt.Length + 1;
- tgt.Buffer = (PCHAR) buf;
- memcpy (buf, srcstr, tgt.MaximumLength);
+ WCHAR domain[DNLEN + 1];
+ WCHAR username[UNLEN + 1];
+ WCHAR sid[128];
+ HKEY hkey;
+ WCHAR userpath[MAX_PATH];
+ PROFILEINFOW pi;
+ WCHAR server[INTERNET_MAX_HOST_NAME_LENGTH + 3];
+ NET_API_STATUS nas = NERR_UserNotFound;
+ PUSER_INFO_3 ui;
+
+ extract_nt_dom_user (pw, domain, username);
+ usersid.string (sid);
+ debug_printf ("user: <%W> <%W>", username, sid);
+ /* Check if user hive is already loaded. */
+ if (!RegOpenKeyExW (HKEY_USERS, sid, 0, KEY_READ, &hkey))
+ {
+ debug_printf ("User registry hive for %W already exists", username);
+ RegCloseKey (hkey);
+ return NULL;
+ }
+ /* Check if the local profile dir has already been created. */
+ if (!get_user_profile_directory (sid, userpath, MAX_PATH))
+ {
+ /* No, try to create it. This function exists only on Vista and later. */
+ HRESULT res = CreateProfile (sid, username, userpath, MAX_PATH);
+ if (res != S_OK)
+ {
+ /* If res is 1 (S_FALSE), autoloading failed (XP or 2K3). */
+ if (res != S_FALSE)
+ debug_printf ("CreateProfile, HRESULT %x", res);
+ return NULL;
+ }
+ }
+ /* Fill PROFILEINFO */
+ memset (&pi, 0, sizeof pi);
+ pi.dwSize = sizeof pi;
+ pi.dwFlags = PI_NOUI;
+ pi.lpUserName = username;
+ /* Check if user has a roaming profile and fill in lpProfilePath, if so. */
+ if (get_logon_server (domain, server, DS_IS_FLAT_NAME))
+ {
+ nas = NetUserGetInfo (server, username, 3, (PBYTE *) &ui);
+ if (NetUserGetInfo (server, username, 3, (PBYTE *) &ui) != NERR_Success)
+ debug_printf ("NetUserGetInfo, %u", nas);
+ else if (ui->usri3_profile && *ui->usri3_profile)
+ pi.lpProfilePath = ui->usri3_profile;
+ }
+
+ if (!LoadUserProfileW (token, &pi))
+ debug_printf ("LoadUserProfileW, %E");
+ /* Free buffer created by NetUserGetInfo */
+ if (nas == NERR_Success)
+ NetApiBufferFree (ui);
+ return pi.hProfile;
}
HANDLE
-open_local_policy (ACCESS_MASK access)
+lsa_open_policy (PWCHAR server, ACCESS_MASK access)
{
- LSA_OBJECT_ATTRIBUTES oa = { 0, 0, 0, 0, 0, 0 };
- HANDLE lsa = INVALID_HANDLE_VALUE;
+ LSA_UNICODE_STRING srvbuf;
+ PLSA_UNICODE_STRING srv = NULL;
+ static LSA_OBJECT_ATTRIBUTES oa = { 0, 0, 0, 0, 0, 0 };
+ HANDLE lsa;
- NTSTATUS status = LsaOpenPolicy (NULL, &oa, access, &lsa);
+ if (server)
+ {
+ srv = &srvbuf;
+ RtlInitUnicodeString (srv, server);
+ }
+ NTSTATUS status = LsaOpenPolicy (srv, &oa, access, &lsa);
if (!NT_SUCCESS (status))
{
__seterrno_from_nt_status (status);
- /* Some versions of Windows set the lsa handle to NULL when
- LsaOpenPolicy fails. */
- lsa = INVALID_HANDLE_VALUE;
+ lsa = NULL;
}
return lsa;
}
-static void
-close_local_policy (LSA_HANDLE &lsa)
+void
+lsa_close_policy (HANDLE lsa)
{
- if (lsa != INVALID_HANDLE_VALUE)
+ if (lsa)
LsaClose (lsa);
- lsa = INVALID_HANDLE_VALUE;
}
bool
-get_logon_server (PWCHAR domain, WCHAR *server, bool rediscovery)
+get_logon_server (PCWSTR domain, PWCHAR server, ULONG flags)
{
DWORD ret;
PDOMAIN_CONTROLLER_INFOW pci;
- DWORD size = MAX_COMPUTERNAME_LENGTH + 1;
/* Empty domain is interpreted as local system */
- if ((GetComputerNameW (server + 2, &size)) &&
- (!wcscasecmp (domain, server + 2) || !domain[0]))
+ if (cygheap->dom.init ()
+ && (!domain[0]
+ || !wcscasecmp (domain, cygheap->dom.account_flat_name ())))
{
- server[0] = server[1] = L'\\';
+ wcpcpy (wcpcpy (server, L"\\\\"), cygheap->dom.account_flat_name ());
return true;
}
/* Try to get any available domain controller for this domain */
- ret = DsGetDcNameW (NULL, domain, NULL, NULL,
- rediscovery ? DS_FORCE_REDISCOVERY : 0, &pci);
+ ret = DsGetDcNameW (NULL, domain, NULL, NULL, flags, &pci);
if (ret == ERROR_SUCCESS)
{
wcscpy (server, pci->DomainControllerName);
NetApiBufferFree (pci);
- debug_printf ("DC: rediscovery: %d, server: %W", rediscovery, server);
+ debug_printf ("DC: server: %W", server);
return true;
}
__seterrno_from_win_error (ret);
@@ -276,7 +383,7 @@ get_user_groups (WCHAR *logonserver, cygsidlist &grp_list,
for (DWORD i = 0; i < cnt; ++i)
{
cygsid gsid;
- DWORD glen = MAX_SID_LEN;
+ DWORD glen = SECURITY_MAX_SID_SIZE;
WCHAR dom[MAX_DOMAIN_NAME_LEN + 1];
DWORD dlen = sizeof (dom);
SID_NAME_USE use = SidTypeInvalid;
@@ -324,7 +431,7 @@ get_user_local_groups (PWCHAR logonserver, PWCHAR domain,
for (DWORD i = 0; i < cnt; ++i)
{
cygsid gsid;
- DWORD glen = MAX_SID_LEN;
+ DWORD glen = SECURITY_MAX_SID_SIZE;
WCHAR dom[MAX_DOMAIN_NAME_LEN + 1];
DWORD domlen = MAX_DOMAIN_NAME_LEN + 1;
@@ -360,7 +467,7 @@ get_user_local_groups (PWCHAR logonserver, PWCHAR domain,
if (bg_ptr)
{
wcscpy (bg_ptr, dg_ptr);
- glen = MAX_SID_LEN;
+ glen = SECURITY_MAX_SID_SIZE;
domlen = MAX_DOMAIN_NAME_LEN + 1;
if (LookupAccountNameW (NULL, builtin_grp, gsid, &glen,
dom, &domlen, &use))
@@ -393,32 +500,8 @@ sid_in_token_groups (PTOKEN_GROUPS grps, cygpsid sid)
}
static void
-get_unix_group_sidlist (struct passwd *pw, cygsidlist &grp_list)
+get_token_group_sidlist (cygsidlist &grp_list, PTOKEN_GROUPS my_grps)
{
- struct group *gr;
- cygsid gsid;
-
- for (int gidx = 0; (gr = internal_getgrent (gidx)); ++gidx)
- {
- if (gr->gr_gid == pw->pw_gid)
- goto found;
- else if (gr->gr_mem)
- for (int gi = 0; gr->gr_mem[gi]; ++gi)
- if (strcasematch (pw->pw_name, gr->gr_mem[gi]))
- goto found;
- continue;
- found:
- if (gsid.getfromgr (gr))
- grp_list += gsid;
-
- }
-}
-
-static void
-get_token_group_sidlist (cygsidlist &grp_list, PTOKEN_GROUPS my_grps,
- LUID auth_luid, int &auth_pos)
-{
- auth_pos = -1;
if (my_grps)
{
grp_list += well_known_local_sid;
@@ -450,20 +533,10 @@ get_token_group_sidlist (cygsidlist &grp_list, PTOKEN_GROUPS my_grps,
grp_list *= well_known_interactive_sid;
grp_list *= well_known_users_sid;
}
- if (get_ll (auth_luid) != 999LL) /* != SYSTEM_LUID */
- {
- for (DWORD i = 0; i < my_grps->GroupCount; ++i)
- if (my_grps->Groups[i].Attributes & SE_GROUP_LOGON_ID)
- {
- grp_list += my_grps->Groups[i].Sid;
- auth_pos = grp_list.count () - 1;
- break;
- }
- }
}
bool
-get_server_groups (cygsidlist &grp_list, PSID usersid, struct passwd *pw)
+get_server_groups (cygsidlist &grp_list, PSID usersid)
{
WCHAR user[UNLEN + 1];
WCHAR domain[MAX_DOMAIN_NAME_LEN + 1];
@@ -475,7 +548,6 @@ get_server_groups (cygsidlist &grp_list, PSID usersid, struct passwd *pw)
if (well_known_system_sid == usersid)
{
grp_list *= well_known_admins_sid;
- get_unix_group_sidlist (pw, grp_list);
return true;
}
@@ -487,27 +559,28 @@ get_server_groups (cygsidlist &grp_list, PSID usersid, struct passwd *pw)
__seterrno ();
return false;
}
- if (get_logon_server (domain, server, false)
- && !get_user_groups (server, grp_list, user, domain)
- && get_logon_server (domain, server, true))
- get_user_groups (server, grp_list, user, domain);
- get_user_local_groups (server, domain, grp_list, user);
- get_unix_group_sidlist (pw, grp_list);
+ /* If the SID does NOT start with S-1-5-21, the domain is some builtin
+ domain. The search for a logon server and fetching group accounts
+ is moot. */
+ if (sid_id_auth (usersid) == 5 /* SECURITY_NT_AUTHORITY */
+ && sid_sub_auth (usersid, 0) == SECURITY_NT_NON_UNIQUE
+ && get_logon_server (domain, server, DS_IS_FLAT_NAME))
+ {
+ get_user_groups (server, grp_list, user, domain);
+ get_user_local_groups (server, domain, grp_list, user);
+ }
return true;
}
static bool
-get_initgroups_sidlist (cygsidlist &grp_list,
- PSID usersid, PSID pgrpsid, struct passwd *pw,
- PTOKEN_GROUPS my_grps, LUID auth_luid, int &auth_pos)
+get_initgroups_sidlist (cygsidlist &grp_list, PSID usersid, PSID pgrpsid,
+ PTOKEN_GROUPS my_grps)
{
grp_list *= well_known_world_sid;
grp_list *= well_known_authenticated_users_sid;
- if (well_known_system_sid == usersid)
- auth_pos = -1;
- else
- get_token_group_sidlist (grp_list, my_grps, auth_luid, auth_pos);
- if (!get_server_groups (grp_list, usersid, pw))
+ if (well_known_system_sid != usersid)
+ get_token_group_sidlist (grp_list, my_grps);
+ if (!get_server_groups (grp_list, usersid))
return false;
/* special_pgrp true if pgrpsid is not in normal groups */
@@ -516,14 +589,13 @@ get_initgroups_sidlist (cygsidlist &grp_list,
}
static void
-get_setgroups_sidlist (cygsidlist &tmp_list, PSID usersid, struct passwd *pw,
- PTOKEN_GROUPS my_grps, user_groups &groups,
- LUID auth_luid, int &auth_pos)
+get_setgroups_sidlist (cygsidlist &tmp_list, PSID usersid,
+ PTOKEN_GROUPS my_grps, user_groups &groups)
{
tmp_list *= well_known_world_sid;
tmp_list *= well_known_authenticated_users_sid;
- get_token_group_sidlist (tmp_list, my_grps, auth_luid, auth_pos);
- get_server_groups (tmp_list, usersid, pw);
+ get_token_group_sidlist (tmp_list, my_grps);
+ get_server_groups (tmp_list, usersid);
for (int gidx = 0; gidx < groups.sgsids.count (); gidx++)
tmp_list += groups.sgsids.sids[gidx];
tmp_list += groups.pgsid;
@@ -688,6 +760,7 @@ verify_token (HANDLE token, cygsid &usersid, user_groups &groups, bool *pintern)
NTSTATUS status;
ULONG size;
bool intern = false;
+ tmp_pathbuf tp;
if (pintern)
{
@@ -700,7 +773,7 @@ verify_token (HANDLE token, cygsid &usersid, user_groups &groups, bool *pintern)
*pintern = intern = !memcmp (ts.SourceName, "Cygwin.1", 8);
}
/* Verify usersid */
- cygsid tok_usersid = NO_SID;
+ cygsid tok_usersid (NO_SID);
status = NtQueryInformationToken (token, TokenUser, &tok_usersid,
sizeof tok_usersid, &size);
if (!NT_SUCCESS (status))
@@ -712,7 +785,8 @@ verify_token (HANDLE token, cygsid &usersid, user_groups &groups, bool *pintern)
is not well_known_null_sid, it must match pgrpsid */
if (intern && !groups.issetgroups ())
{
- const DWORD sd_buf_siz = MAX_SID_LEN + sizeof (SECURITY_DESCRIPTOR);
+ const DWORD sd_buf_siz = SECURITY_MAX_SID_SIZE
+ + sizeof (SECURITY_DESCRIPTOR);
PSECURITY_DESCRIPTOR sd_buf = (PSECURITY_DESCRIPTOR) alloca (sd_buf_siz);
cygpsid gsid (NO_SID);
NTSTATUS status;
@@ -732,16 +806,10 @@ verify_token (HANDLE token, cygsid &usersid, user_groups &groups, bool *pintern)
return gsid == groups.pgsid;
}
- PTOKEN_GROUPS my_grps;
+ PTOKEN_GROUPS my_grps = (PTOKEN_GROUPS) tp.w_get ();
- status = NtQueryInformationToken (token, TokenGroups, NULL, 0, &size);
- if (!NT_SUCCESS (status) && status != STATUS_BUFFER_TOO_SMALL)
- {
- debug_printf ("NtQueryInformationToken(token, TokenGroups), %y", status);
- return false;
- }
- my_grps = (PTOKEN_GROUPS) alloca (size);
- status = NtQueryInformationToken (token, TokenGroups, my_grps, size, &size);
+ status = NtQueryInformationToken (token, TokenGroups, my_grps,
+ 2 * NT_MAX_PATH, &size);
if (!NT_SUCCESS (status))
{
debug_printf ("NtQueryInformationToken(my_token, TokenGroups), %y",
@@ -753,35 +821,26 @@ verify_token (HANDLE token, cygsid &usersid, user_groups &groups, bool *pintern)
if (groups.issetgroups ()) /* setgroups was called */
{
- cygsid gsid;
- struct group *gr;
+ cygpsid gsid;
bool saw[groups.sgsids.count ()];
- memset (saw, 0, sizeof(saw));
- /* token groups found in /etc/group match the user.gsids ? */
- for (int gidx = 0; (gr = internal_getgrent (gidx)); ++gidx)
- if (gsid.getfromgr (gr) && sid_in_token_groups (my_grps, gsid))
- {
- int pos = groups.sgsids.position (gsid);
- if (pos >= 0)
- saw[pos] = true;
- else if (groups.pgsid == gsid)
- sawpg = true;
-#if 0
- /* With this `else', verify_token returns false if we find
- groups in the token, which are not in the group list set
- with setgroups(). That's rather dangerous. What we're
- really interested in is that all groups in the setgroups()
- list are in the token. A token created through ADVAPI
- should be allowed to contain more groups than requested
- through setgroups(), esecially since Vista and the
- addition of integrity groups. So we disable this statement
- for now. */
- else if (gsid != well_known_world_sid
- && gsid != usersid)
- goto done;
-#endif
- }
+ /* Check that all groups in the setgroups () list are in the token.
+ A token created through ADVAPI should be allowed to contain more
+ groups than requested through setgroups(), especially since Vista
+ and the addition of integrity groups. */
+ memset (saw, 0, sizeof(saw));
+ for (int gidx = 0; gidx < groups.sgsids.count (); gidx++)
+ {
+ gsid = groups.sgsids.sids[gidx];
+ if (sid_in_token_groups (my_grps, gsid))
+ {
+ int pos = groups.sgsids.position (gsid);
+ if (pos >= 0)
+ saw[pos] = true;
+ else if (groups.pgsid == gsid)
+ sawpg = true;
+ }
+ }
/* user.sgsids groups must be in the token, except for builtin groups.
These can be different on domain member machines compared to
domain controllers, so these builtin groups may be validly missing
@@ -799,17 +858,26 @@ verify_token (HANDLE token, cygsid &usersid, user_groups &groups, bool *pintern)
}
HANDLE
-create_token (cygsid &usersid, user_groups &new_groups, struct passwd *pw)
+create_token (cygsid &usersid, user_groups &new_groups)
{
NTSTATUS status;
- LSA_HANDLE lsa = INVALID_HANDLE_VALUE;
+ LSA_HANDLE lsa = NULL;
cygsidlist tmp_gsids (cygsidlist_auto, 12);
SECURITY_QUALITY_OF_SERVICE sqos =
{ sizeof sqos, SecurityImpersonation, SECURITY_STATIC_TRACKING, FALSE };
OBJECT_ATTRIBUTES oa = { sizeof oa, 0, 0, 0, 0, &sqos };
- LUID auth_luid = SYSTEM_LUID;
+ /* Up to Windows 7, when using a authwentication LUID other than "Anonymous",
+ Windows whoami prints the wrong username, the one from the login session,
+ not the one from the actual user token of the process. This is apparently
+ fixed in Windows 8. However, starting with Windows 8, access rights of
+ the anonymous logon session is further restricted. Therefore we create
+ the new user token with the authentication id of the local service
+ account. Hopefully that's sufficient. */
+ const LUID auth_luid_7 = ANONYMOUS_LOGON_LUID;
+ const LUID auth_luid_8 = LOCALSERVICE_LUID;
+ LUID auth_luid = wincap.has_broken_whoami () ? auth_luid_7 : auth_luid_8;
LARGE_INTEGER exp = { QuadPart:INT64_MAX };
TOKEN_USER user;
@@ -827,6 +895,7 @@ create_token (cygsid &usersid, user_groups &new_groups, struct passwd *pw)
HANDLE token = INVALID_HANDLE_VALUE;
HANDLE primary_token = INVALID_HANDLE_VALUE;
+ tmp_pathbuf tp;
PTOKEN_GROUPS my_tok_gsids = NULL;
cygpsid mandatory_integrity_sid;
ULONG size;
@@ -836,7 +905,7 @@ create_token (cygsid &usersid, user_groups &new_groups, struct passwd *pw)
push_self_privilege (SE_CREATE_TOKEN_PRIVILEGE, true);
/* Open policy object. */
- if ((lsa = open_local_policy (POLICY_EXECUTE)) == INVALID_HANDLE_VALUE)
+ if (!(lsa = lsa_open_policy (NULL, POLICY_EXECUTE)))
goto out;
/* User, owner, primary group. */
@@ -858,40 +927,26 @@ create_token (cygsid &usersid, user_groups &new_groups, struct passwd *pw)
if (!NT_SUCCESS (status))
debug_printf ("NtQueryInformationToken(hProcToken, "
"TokenStatistics), %y", status);
- else
- auth_luid = stats.AuthenticationId;
}
/* Retrieving current processes group list to be able to inherit
some important well known group sids. */
- status = NtQueryInformationToken (hProcToken, TokenGroups, NULL, 0,
- &size);
- if (!NT_SUCCESS (status) && status != STATUS_BUFFER_TOO_SMALL)
- debug_printf ("NtQueryInformationToken(hProcToken, TokenGroups), %y",
- status);
- else if (!(my_tok_gsids = (PTOKEN_GROUPS) malloc (size)))
- debug_printf ("malloc (my_tok_gsids) failed.");
- else
+ my_tok_gsids = (PTOKEN_GROUPS) tp.w_get ();
+ status = NtQueryInformationToken (hProcToken, TokenGroups, my_tok_gsids,
+ 2 * NT_MAX_PATH, &size);
+ if (!NT_SUCCESS (status))
{
- status = NtQueryInformationToken (hProcToken, TokenGroups,
- my_tok_gsids, size, &size);
- if (!NT_SUCCESS (status))
- {
- debug_printf ("NtQueryInformationToken(hProcToken, TokenGroups), "
- "%y", status);
- free (my_tok_gsids);
- my_tok_gsids = NULL;
- }
+ debug_printf ("NtQueryInformationToken(hProcToken, TokenGroups), "
+ "%y", status);
+ my_tok_gsids = NULL;
}
}
/* Create list of groups, the user is member in. */
- int auth_pos;
if (new_groups.issetgroups ())
- get_setgroups_sidlist (tmp_gsids, usersid, pw, my_tok_gsids, new_groups,
- auth_luid, auth_pos);
- else if (!get_initgroups_sidlist (tmp_gsids, usersid, new_groups.pgsid, pw,
- my_tok_gsids, auth_luid, auth_pos))
+ get_setgroups_sidlist (tmp_gsids, usersid, my_tok_gsids, new_groups);
+ else if (!get_initgroups_sidlist (tmp_gsids, usersid, new_groups.pgsid,
+ my_tok_gsids))
goto out;
/* Primary group. */
@@ -909,8 +964,6 @@ create_token (cygsid &usersid, user_groups &new_groups, struct passwd *pw)
| SE_GROUP_ENABLED_BY_DEFAULT
| SE_GROUP_ENABLED;
}
- if (auth_pos >= 0)
- new_tok_gsids->Groups[auth_pos].Attributes |= SE_GROUP_LOGON_ID;
/* Retrieve list of privileges of that user. Based on the usersid and
the returned privileges, get_priv_list sets the mandatory_integrity_sid
@@ -952,25 +1005,22 @@ out:
CloseHandle (token);
if (privs)
free (privs);
- if (my_tok_gsids)
- free (my_tok_gsids);
- close_local_policy (lsa);
+ lsa_close_policy (lsa);
debug_printf ("%p = create_token ()", primary_token);
return primary_token;
}
HANDLE
-lsaauth (cygsid &usersid, user_groups &new_groups, struct passwd *pw)
+lsaauth (cygsid &usersid, user_groups &new_groups)
{
cygsidlist tmp_gsids (cygsidlist_auto, 12);
cygpsid pgrpsid;
LSA_STRING name;
- HANDLE lsa_hdl = NULL, lsa = INVALID_HANDLE_VALUE;
+ HANDLE lsa_hdl = NULL, lsa = NULL;
LSA_OPERATIONAL_MODE sec_mode;
NTSTATUS status, sub_status;
ULONG package_id, size;
- LUID auth_luid = SYSTEM_LUID;
struct {
LSA_STRING str;
CHAR buf[16];
@@ -996,7 +1046,7 @@ lsaauth (cygsid &usersid, user_groups &new_groups, struct passwd *pw)
push_self_privilege (SE_TCB_PRIVILEGE, true);
/* Register as logon process. */
- str2lsa (name, "Cygwin");
+ RtlInitAnsiString (&name, "Cygwin");
SetLastError (0);
status = LsaRegisterLogonProcess (&name, &lsa_hdl, &sec_mode);
if (status != STATUS_SUCCESS)
@@ -1011,7 +1061,7 @@ lsaauth (cygsid &usersid, user_groups &new_groups, struct passwd *pw)
goto out;
}
/* Get handle to our own LSA package. */
- str2lsa (name, CYG_LSA_PKGNAME);
+ RtlInitAnsiString (&name, CYG_LSA_PKGNAME);
status = LsaLookupAuthenticationPackage (lsa_hdl, &name, &package_id);
if (status != STATUS_SUCCESS)
{
@@ -1021,23 +1071,22 @@ lsaauth (cygsid &usersid, user_groups &new_groups, struct passwd *pw)
}
/* Open policy object. */
- if ((lsa = open_local_policy (POLICY_EXECUTE)) == INVALID_HANDLE_VALUE)
+ if (!(lsa = lsa_open_policy (NULL, POLICY_EXECUTE)))
goto out;
/* Create origin. */
- str2buf2lsa (origin.str, origin.buf, "Cygwin");
+ stpcpy (origin.buf, "Cygwin");
+ RtlInitAnsiString (&origin.str, origin.buf);
/* Create token source. */
memcpy (ts.SourceName, "Cygwin.1", 8);
ts.SourceIdentifier.HighPart = 0;
ts.SourceIdentifier.LowPart = 0x0103;
/* Create list of groups, the user is member in. */
- int auth_pos;
if (new_groups.issetgroups ())
- get_setgroups_sidlist (tmp_gsids, usersid, pw, NULL, new_groups, auth_luid,
- auth_pos);
- else if (!get_initgroups_sidlist (tmp_gsids, usersid, new_groups.pgsid, pw,
- NULL, auth_luid, auth_pos))
+ get_setgroups_sidlist (tmp_gsids, usersid, NULL, new_groups);
+ else if (!get_initgroups_sidlist (tmp_gsids, usersid, new_groups.pgsid,
+ NULL))
goto out;
tmp_gsids.debug_print ("tmp_gsids");
@@ -1192,7 +1241,7 @@ lsaauth (cygsid &usersid, user_groups &new_groups, struct passwd *pw)
out:
if (privs)
free (privs);
- close_local_policy (lsa);
+ lsa_close_policy (lsa);
if (lsa_hdl)
LsaDeregisterLogonProcess (lsa_hdl);
pop_self_privilege ();
@@ -1207,21 +1256,21 @@ HANDLE
lsaprivkeyauth (struct passwd *pw)
{
NTSTATUS status;
- HANDLE lsa = INVALID_HANDLE_VALUE;
+ HANDLE lsa = NULL;
HANDLE token = NULL;
WCHAR sid[256];
WCHAR domain[MAX_DOMAIN_NAME_LEN + 1];
WCHAR user[UNLEN + 1];
WCHAR key_name[MAX_DOMAIN_NAME_LEN + UNLEN + wcslen (SFU_LSA_KEY_SUFFIX) + 2];
UNICODE_STRING key;
- PUNICODE_STRING data;
+ PUNICODE_STRING data = NULL;
cygsid psid;
+ BOOL ret;
push_self_privilege (SE_TCB_PRIVILEGE, true);
/* Open policy object. */
- if ((lsa = open_local_policy (POLICY_GET_PRIVATE_INFORMATION))
- == INVALID_HANDLE_VALUE)
+ if (!(lsa = lsa_open_policy (NULL, POLICY_GET_PRIVATE_INFORMATION)))
goto out;
/* Needed for Interix key and LogonUser. */
@@ -1234,36 +1283,46 @@ lsaprivkeyauth (struct passwd *pw)
RtlInitUnicodeString (&key, key_name);
status = LsaRetrievePrivateData (lsa, &key, &data);
if (!NT_SUCCESS (status))
- {
- /* No Cygwin key, try Interix key. */
- if (!*domain)
- goto out;
- __small_swprintf (key_name, L"%W_%W%W",
- domain, user, SFU_LSA_KEY_SUFFIX);
- RtlInitUnicodeString (&key, key_name);
- status = LsaRetrievePrivateData (lsa, &key, &data);
- if (!NT_SUCCESS (status))
- goto out;
- }
+ data = NULL;
}
-
- /* The key is not 0-terminated. */
- PWCHAR passwd;
- passwd = (PWCHAR) alloca (data->Length + sizeof (WCHAR));
- *wcpncpy (passwd, data->Buffer, data->Length / sizeof (WCHAR)) = L'\0';
- LsaFreeMemory (data);
- debug_printf ("Try logon for %W\\%W", domain, user);
- if (!LogonUserW (user, domain, passwd, LOGON32_LOGON_INTERACTIVE,
- LOGON32_PROVIDER_DEFAULT, &token))
+ /* No Cygwin key, try Interix key. */
+ if (!data && *domain)
{
- __seterrno ();
- token = NULL;
+ __small_swprintf (key_name, L"%W_%W%W",
+ domain, user, SFU_LSA_KEY_SUFFIX);
+ RtlInitUnicodeString (&key, key_name);
+ status = LsaRetrievePrivateData (lsa, &key, &data);
+ if (!NT_SUCCESS (status))
+ data = NULL;
}
- else
- token = get_full_privileged_inheritable_token (token);
+ /* Found an entry? Try to logon. */
+ if (data)
+ {
+ /* The key is not 0-terminated. */
+ PWCHAR passwd;
+ size_t pwdsize = data->Length + sizeof (WCHAR);
+
+ passwd = (PWCHAR) alloca (pwdsize);
+ *wcpncpy (passwd, data->Buffer, data->Length / sizeof (WCHAR)) = L'\0';
+ /* Weird: LsaFreeMemory invalidates the content of the UNICODE_STRING
+ structure, but it does not invalidate the Buffer content. */
+ RtlSecureZeroMemory (data->Buffer, data->Length);
+ LsaFreeMemory (data);
+ debug_printf ("Try logon for %W\\%W", domain, user);
+ ret = LogonUserW (user, domain, passwd, LOGON32_LOGON_INTERACTIVE,
+ LOGON32_PROVIDER_DEFAULT, &token);
+ RtlSecureZeroMemory (passwd, pwdsize);
+ if (!ret)
+ {
+ __seterrno ();
+ token = NULL;
+ }
+ else
+ token = get_full_privileged_inheritable_token (token);
+ }
+ lsa_close_policy (lsa);
out:
- close_local_policy (lsa);
pop_self_privilege ();
return token;
}
diff --git a/winsup/cygwin/sec_helper.cc b/winsup/cygwin/sec_helper.cc
index 2d81cbd38..dec767e82 100644
--- a/winsup/cygwin/sec_helper.cc
+++ b/winsup/cygwin/sec_helper.cc
@@ -1,8 +1,5 @@
/* sec_helper.cc: NT security helper functions
- Copyright 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
- 2011, 2012, 2013 Red Hat, Inc.
-
Written by Corinna Vinschen <corinna@vinschen.de>
This file is part of Cygwin.
@@ -13,7 +10,10 @@ details. */
#include "winsup.h"
#include <stdlib.h>
-#include <sys/acl.h>
+#include <stdarg.h>
+#include <cygwin/acl.h>
+#include <sys/queue.h>
+#include <authz.h>
#include <wchar.h>
#include "cygerrno.h"
#include "security.h"
@@ -22,8 +22,8 @@ details. */
#include "dtable.h"
#include "pinfo.h"
#include "cygheap.h"
-#include "pwdgrp.h"
#include "ntdll.h"
+#include "ldap.h"
/* General purpose security attribute objects for global use. */
static NO_COPY_RO SECURITY_DESCRIPTOR null_sdp =
@@ -66,6 +66,10 @@ MKSID (well_known_this_org_sid, "S-1-5-15",
SECURITY_NT_AUTHORITY, 1, 15);
MKSID (well_known_system_sid, "S-1-5-18",
SECURITY_NT_AUTHORITY, 1, SECURITY_LOCAL_SYSTEM_RID);
+MKSID (well_known_local_service_sid, "S-1-5-19",
+ SECURITY_NT_AUTHORITY, 1, SECURITY_LOCAL_SERVICE_RID);
+MKSID (well_known_network_service_sid, "S-1-5-20",
+ SECURITY_NT_AUTHORITY, 1, SECURITY_NETWORK_SERVICE_RID);
MKSID (well_known_builtin_sid, "S-1-5-32",
SECURITY_NT_AUTHORITY, 1, SECURITY_BUILTIN_DOMAIN_RID);
MKSID (well_known_admins_sid, "S-1-5-32-544",
@@ -74,6 +78,11 @@ MKSID (well_known_admins_sid, "S-1-5-32-544",
MKSID (well_known_users_sid, "S-1-5-32-545",
SECURITY_NT_AUTHORITY, 2, SECURITY_BUILTIN_DOMAIN_RID,
DOMAIN_ALIAS_RID_USERS);
+MKSID (trusted_installer_sid,
+ "S-1-5-80-956008885-3418522649-1831038044-1853292631-2271478464",
+ SECURITY_NT_AUTHORITY, SECURITY_SERVICE_ID_RID_COUNT,
+ SECURITY_SERVICE_ID_BASE_RID, 956008885U, 3418522649U, 1831038044U,
+ 1853292631U, 2271478464U);
MKSID (mandatory_medium_integrity_sid, "S-1-16-8192",
SECURITY_MANDATORY_LABEL_AUTHORITY, 1, SECURITY_MANDATORY_MEDIUM_RID);
MKSID (mandatory_high_integrity_sid, "S-1-16-12288",
@@ -93,7 +102,7 @@ cygpsid::operator== (const char *nsidstr) const
}
uid_t
-cygpsid::get_id (BOOL search_grp, int *type)
+cygpsid::get_id (BOOL search_grp, int *type, cyg_ldap *pldap)
{
/* First try to get SID from group, then passwd */
uid_t id = ILLEGAL_UID;
@@ -103,9 +112,34 @@ cygpsid::get_id (BOOL search_grp, int *type)
struct group *gr;
if (cygheap->user.groups.pgsid == psid)
id = myself->gid;
- else if ((gr = internal_getgrsid (*this)))
+ else if (sid_id_auth (psid) == 22 && cygheap->pg.nss_grp_db ())
+ {
+ /* Samba UNIX group? Try to map to Cygwin gid. If there's no
+ mapping in the cache, try to fetch it from the configured
+ RFC 2307 domain (see last comment in cygheap_domain_info::init()
+ for more information) and add it to the mapping cache.
+ If this is a user, not a group, make sure to skip the subsequent
+ internal_getgrsid call, otherwise we end up with a fake group
+ entry for a UNIX user account. */
+ if (sid_sub_auth (psid, 0) == 2)
+ {
+ gid_t gid = sid_sub_auth_rid (psid);
+ gid_t map_gid = cygheap->ugid_cache.get_gid (gid);
+ if (map_gid == ILLEGAL_GID)
+ {
+ if (pldap->open (cygheap->dom.get_rfc2307_domain ())
+ == NO_ERROR)
+ map_gid = pldap->remap_gid (gid);
+ if (map_gid == ILLEGAL_GID)
+ map_gid = MAP_UNIX_TO_CYGWIN_ID (gid);
+ cygheap->ugid_cache.add_gid (gid, map_gid);
+ }
+ id = (uid_t) map_gid;
+ }
+ }
+ else if ((gr = internal_getgrsid (*this, pldap)))
id = gr->gr_gid;
- if (id != ILLEGAL_UID)
+ if ((gid_t) id != ILLEGAL_GID)
{
if (type)
*type = GROUP;
@@ -117,7 +151,23 @@ cygpsid::get_id (BOOL search_grp, int *type)
struct passwd *pw;
if (*this == cygheap->user.sid ())
id = myself->uid;
- else if ((pw = internal_getpwsid (*this)))
+ else if (sid_id_auth (psid) == 22 && sid_sub_auth (psid, 0) == 1
+ && cygheap->pg.nss_pwd_db ())
+ {
+ /* Samba UNIX user. See comment above. */
+ uid_t uid = sid_sub_auth_rid (psid);
+ uid_t map_uid = cygheap->ugid_cache.get_uid (uid);
+ if (map_uid == ILLEGAL_UID)
+ {
+ if (pldap->open (cygheap->dom.get_rfc2307_domain ()) == NO_ERROR)
+ map_uid = pldap->remap_uid (uid);
+ if (map_uid == ILLEGAL_UID)
+ map_uid = MAP_UNIX_TO_CYGWIN_ID (uid);
+ cygheap->ugid_cache.add_uid (uid, map_uid);
+ }
+ id = map_uid;
+ }
+ else if ((pw = internal_getpwsid (*this, pldap)))
id = pw->pw_uid;
if (id != ILLEGAL_UID && type)
*type = USER;
@@ -126,7 +176,7 @@ cygpsid::get_id (BOOL search_grp, int *type)
}
PWCHAR
-cygpsid::string (PWCHAR nsidstr) const
+cygpsid::pstring (PWCHAR nsidstr) const
{
UNICODE_STRING sid;
@@ -134,11 +184,19 @@ cygpsid::string (PWCHAR nsidstr) const
return NULL;
RtlInitEmptyUnicodeString (&sid, nsidstr, 256);
RtlConvertSidToUnicodeString (&sid, psid, FALSE);
- return nsidstr;
+ return nsidstr + sid.Length / sizeof (WCHAR);
+}
+
+PWCHAR
+cygpsid::string (PWCHAR nsidstr) const
+{
+ if (pstring (nsidstr))
+ return nsidstr;
+ return NULL;
}
char *
-cygpsid::string (char *nsidstr) const
+cygpsid::pstring (char *nsidstr) const
{
char *t;
DWORD i;
@@ -147,10 +205,18 @@ cygpsid::string (char *nsidstr) const
return NULL;
strcpy (nsidstr, "S-1-");
t = nsidstr + sizeof ("S-1-") - 1;
- t += __small_sprintf (t, "%u", RtlIdentifierAuthoritySid (psid)->Value[5]);
- for (i = 0; i < *RtlSubAuthorityCountSid (psid); ++i)
- t += __small_sprintf (t, "-%lu", *RtlSubAuthoritySid (psid, i));
- return nsidstr;
+ t += __small_sprintf (t, "%u", sid_id_auth (psid));
+ for (i = 0; i < sid_sub_auth_count (psid); ++i)
+ t += __small_sprintf (t, "-%lu", sid_sub_auth (psid, i));
+ return t;
+}
+
+char *
+cygpsid::string (char *nsidstr) const
+{
+ if (pstring (nsidstr))
+ return nsidstr;
+ return NULL;
}
PSID
@@ -160,7 +226,10 @@ cygsid::get_sid (DWORD s, DWORD cnt, DWORD *r, bool well_known)
SID_IDENTIFIER_AUTHORITY sid_auth = { SECURITY_NULL_SID_AUTHORITY };
# define SECURITY_NT_AUTH 5
- if (s > 255 || cnt < 1 || cnt > 8)
+ /* 2015-10-22: Note that we let slip SIDs with a subauthority count of 0.
+ There are systems, which generate the SID S-1-0 as group ownership SID,
+ see https://cygwin.com/ml/cygwin/2015-10/msg00141.html. */
+ if (s > 255 || cnt > SID_MAX_SUB_AUTHORITIES)
{
psid = NO_SID;
return NULL;
@@ -168,8 +237,9 @@ cygsid::get_sid (DWORD s, DWORD cnt, DWORD *r, bool well_known)
sid_auth.Value[5] = s;
set ();
RtlInitializeSid (psid, &sid_auth, cnt);
+ PISID dsid = (PISID) psid;
for (i = 0; i < cnt; ++i)
- memcpy ((char *) psid + 8 + sizeof (DWORD) * i, &r[i], sizeof (DWORD));
+ dsid->SubAuthority[i] = r[i];
/* If the well_known flag isn't set explicitely, we check the SID
for being a well-known SID ourselves. That's necessary because this
cygsid is created from a SID string, usually from /etc/passwd or
@@ -185,16 +255,34 @@ cygsid::get_sid (DWORD s, DWORD cnt, DWORD *r, bool well_known)
}
const PSID
+cygsid::getfromstr (PCWSTR nsidstr, bool well_known)
+{
+ PWCHAR lasts;
+ DWORD s, cnt = 0;
+ DWORD r[SID_MAX_SUB_AUTHORITIES];
+
+ if (nsidstr && !wcsncmp (nsidstr, L"S-1-", 4))
+ {
+ s = wcstoul (nsidstr + 4, &lasts, 10);
+ while (cnt < SID_MAX_SUB_AUTHORITIES && *lasts == '-')
+ r[cnt++] = wcstoul (lasts + 1, &lasts, 10);
+ if (!*lasts)
+ return get_sid (s, cnt, r, well_known);
+ }
+ return psid = NO_SID;
+}
+
+const PSID
cygsid::getfromstr (const char *nsidstr, bool well_known)
{
char *lasts;
DWORD s, cnt = 0;
- DWORD r[8];
+ DWORD r[SID_MAX_SUB_AUTHORITIES];
if (nsidstr && !strncmp (nsidstr, "S-1-", 4))
{
s = strtoul (nsidstr + 4, &lasts, 10);
- while (cnt < 8 && *lasts == '-')
+ while (cnt < SID_MAX_SUB_AUTHORITIES && *lasts == '-')
r[cnt++] = strtoul (lasts + 1, &lasts, 10);
if (!*lasts)
return get_sid (s, cnt, r, well_known);
@@ -202,18 +290,35 @@ cygsid::getfromstr (const char *nsidstr, bool well_known)
return psid = NO_SID;
}
-BOOL
-cygsid::getfrompw (const struct passwd *pw)
+const PSID
+cygsid::create (DWORD auth, DWORD subauth_cnt, ...)
{
- char *sp = (pw && pw->pw_gecos) ? strrchr (pw->pw_gecos, ',') : NULL;
- return (*this = sp ? sp + 1 : sp) != NULL;
+ va_list ap;
+ PSID sid;
+
+ if (subauth_cnt > SID_MAX_SUB_AUTHORITIES)
+ return NULL;
+
+ DWORD subauth[subauth_cnt];
+
+ va_start (ap, subauth_cnt);
+ for (DWORD i = 0; i < subauth_cnt; ++i)
+ subauth[i] = va_arg (ap, DWORD);
+ sid = get_sid (auth, subauth_cnt, subauth, false);
+ va_end (ap);
+ return sid;
}
-BOOL
-cygsid::getfromgr (const struct group *gr)
+bool
+cygsid::append (DWORD rid)
{
- char *sp = (gr && gr->gr_passwd) ? gr->gr_passwd : NULL;
- return (*this = sp) != NULL;
+ if (psid == NO_SID)
+ return false;
+ PISID dsid = (PISID) psid;
+ if (dsid->SubAuthorityCount >= SID_MAX_SUB_AUTHORITIES)
+ return false;
+ dsid->SubAuthority[dsid->SubAuthorityCount++] = rid;
+ return true;
}
cygsid *
@@ -258,46 +363,6 @@ cygsidlist::add (const PSID nsi, bool well_known)
return TRUE;
}
-bool
-get_sids_info (cygpsid owner_sid, cygpsid group_sid, uid_t * uidret, gid_t * gidret)
-{
- struct passwd *pw;
- struct group *gr = NULL;
- bool ret = false;
-
- owner_sid.debug_print ("get_sids_info: owner SID =");
- group_sid.debug_print ("get_sids_info: group SID =");
-
- if (group_sid == cygheap->user.groups.pgsid)
- *gidret = myself->gid;
- else if ((gr = internal_getgrsid (group_sid)))
- *gidret = gr->gr_gid;
- else
- *gidret = ILLEGAL_GID;
-
- if (owner_sid == cygheap->user.sid ())
- {
- *uidret = myself->uid;
- if (*gidret == myself->gid)
- ret = true;
- else
- ret = (internal_getgroups (0, NULL, &group_sid) > 0);
- }
- else if ((pw = internal_getpwsid (owner_sid)))
- {
- *uidret = pw->pw_uid;
- if (gr || (*gidret != ILLEGAL_GID
- && (gr = internal_getgrgid (*gidret))))
- for (int idx = 0; gr->gr_mem[idx]; ++idx)
- if ((ret = strcasematch (pw->pw_name, gr->gr_mem[idx])))
- break;
- }
- else
- *uidret = ILLEGAL_UID;
-
- return ret;
-}
-
PSECURITY_DESCRIPTOR
security_descriptor::malloc (size_t nsize)
{
@@ -570,22 +635,21 @@ _recycler_sd (void *buf, bool users, bool dir)
pre-Vista permissions the same way as on Vista and later. */
RtlCreateAcl (dacl, MAX_DACL_LEN (3), ACL_REVISION);
RtlAddAccessAllowedAceEx (dacl, ACL_REVISION,
- dir ? CONTAINER_INHERIT_ACE | OBJECT_INHERIT_ACE
+ dir ? SUB_CONTAINERS_AND_OBJECTS_INHERIT
: NO_INHERITANCE,
FILE_ALL_ACCESS, well_known_admins_sid);
RtlAddAccessAllowedAceEx (dacl, ACL_REVISION,
- dir ? CONTAINER_INHERIT_ACE | OBJECT_INHERIT_ACE
+ dir ? SUB_CONTAINERS_AND_OBJECTS_INHERIT
: NO_INHERITANCE,
FILE_ALL_ACCESS, well_known_system_sid);
if (users)
- RtlAddAccessAllowedAceEx (dacl, ACL_REVISION, NO_PROPAGATE_INHERIT_ACE,
+ RtlAddAccessAllowedAceEx (dacl, ACL_REVISION, INHERIT_NO_PROPAGATE,
FILE_GENERIC_READ | FILE_GENERIC_EXECUTE
| FILE_APPEND_DATA | FILE_WRITE_ATTRIBUTES,
well_known_users_sid);
else
RtlAddAccessAllowedAceEx (dacl, ACL_REVISION,
- dir ? CONTAINER_INHERIT_ACE
- | OBJECT_INHERIT_ACE
+ dir ? SUB_CONTAINERS_AND_OBJECTS_INHERIT
: NO_INHERITANCE,
FILE_ALL_ACCESS, cygheap->user.sid ());
LPVOID ace;
@@ -642,3 +706,173 @@ _everyone_sd (void *buf, ACCESS_MASK access)
return psd;
}
+static NO_COPY muto authz_guard;
+static LUID authz_dummy_luid = { 0 };
+
+class authz_ctx_cache_entry
+{
+ SLIST_ENTRY (authz_ctx_cache_entry) ctx_next;
+ cygsid sid;
+ AUTHZ_CLIENT_CONTEXT_HANDLE ctx_hdl;
+
+ authz_ctx_cache_entry ()
+ : sid (NO_SID), ctx_hdl (NULL)
+ {
+ ctx_next.sle_next = NULL;
+ }
+ authz_ctx_cache_entry (bool)
+ : sid (NO_SID), ctx_hdl (NULL)
+ {
+ ctx_next.sle_next = NULL;
+ }
+ void set (PSID psid, AUTHZ_CLIENT_CONTEXT_HANDLE hdl)
+ {
+ sid = psid;
+ ctx_hdl = hdl;
+ }
+ bool is (PSID psid) const { return RtlEqualSid (sid, psid); }
+ AUTHZ_CLIENT_CONTEXT_HANDLE context () const { return ctx_hdl; }
+
+ friend class authz_ctx_cache;
+};
+
+class authz_ctx_cache
+{
+ SLIST_HEAD (, authz_ctx_cache_entry) ctx_list;
+
+ AUTHZ_CLIENT_CONTEXT_HANDLE context (PSID);
+
+ friend class authz_ctx;
+};
+
+class authz_ctx
+{
+ AUTHZ_RESOURCE_MANAGER_HANDLE authz_hdl;
+ AUTHZ_CLIENT_CONTEXT_HANDLE user_ctx_hdl;
+ authz_ctx_cache ctx_cache;
+ operator AUTHZ_RESOURCE_MANAGER_HANDLE ();
+
+ friend class authz_ctx_cache;
+public:
+ bool get_user_attribute (mode_t *, PSECURITY_DESCRIPTOR, PSID);
+};
+
+/* Authz handles are not inheritable. */
+static NO_COPY authz_ctx authz;
+
+authz_ctx::operator AUTHZ_RESOURCE_MANAGER_HANDLE ()
+{
+ if (!authz_hdl)
+ {
+ /* Create handle to Authz resource manager */
+ authz_guard.init ("authz_guard")->acquire ();
+ if (!authz_hdl
+ && !AuthzInitializeResourceManager (AUTHZ_RM_FLAG_NO_AUDIT,
+ NULL, NULL, NULL, NULL,
+ &authz_hdl))
+ debug_printf ("AuthzInitializeResourceManager, %E");
+ authz_guard.release ();
+ }
+ return authz_hdl;
+}
+
+AUTHZ_CLIENT_CONTEXT_HANDLE
+authz_ctx_cache::context (PSID user_sid)
+{
+ authz_ctx_cache_entry *entry;
+ AUTHZ_CLIENT_CONTEXT_HANDLE ctx_hdl = NULL;
+
+ SLIST_FOREACH (entry, &ctx_list, ctx_next)
+ {
+ if (entry->is (user_sid))
+ return entry->context ();
+ }
+ entry = new authz_ctx_cache_entry (true);
+ /* If the user is the current user, prefer to create the context from the
+ token, as outlined in MSDN. */
+ if (RtlEqualSid (user_sid, cygheap->user.sid ())
+ && !AuthzInitializeContextFromToken (0, cygheap->user.issetuid ()
+ ? cygheap->user.primary_token ()
+ : hProcToken,
+ authz, NULL, authz_dummy_luid,
+ NULL, &ctx_hdl))
+ debug_printf ("AuthzInitializeContextFromToken, %E");
+ /* In any other case, create the context from the user SID. */
+ else if (!AuthzInitializeContextFromSid (0, user_sid, authz, NULL,
+ authz_dummy_luid, NULL, &ctx_hdl))
+ debug_printf ("AuthzInitializeContextFromSid, %E");
+ else
+ {
+ entry->set (user_sid, ctx_hdl);
+ authz_guard.acquire ();
+ SLIST_INSERT_HEAD (&ctx_list, entry, ctx_next);
+ authz_guard.release ();
+ return entry->context ();
+ }
+ delete entry;
+ return NULL;
+}
+
+/* Ask Authz for the effective user permissions of the user with SID user_sid
+ on the object with security descriptor psd. We're caching the handles for
+ the Authz resource manager and the user contexts. */
+bool
+authz_ctx::get_user_attribute (mode_t *attribute, PSECURITY_DESCRIPTOR psd,
+ PSID user_sid)
+{
+ /* If the owner is the main user of the process token (not some impersonated
+ user), cache the user context in the global user_ctx_hdl variable. */
+ AUTHZ_CLIENT_CONTEXT_HANDLE ctx_hdl = NULL;
+ if (RtlEqualSid (user_sid, cygheap->user.sid ())
+ && !cygheap->user.issetuid ())
+ {
+ if (!user_ctx_hdl)
+ {
+ authz_guard.acquire ();
+ if (!AuthzInitializeContextFromToken (0, hProcToken, authz, NULL,
+ authz_dummy_luid, NULL,
+ &user_ctx_hdl))
+ debug_printf ("AuthzInitializeContextFromToken, %E");
+ authz_guard.release ();
+ }
+ if (user_ctx_hdl)
+ ctx_hdl = user_ctx_hdl;
+ }
+ if (!ctx_hdl && !(ctx_hdl = ctx_cache.context (user_sid)))
+ return false;
+ /* All set, check access. */
+ ACCESS_MASK access = 0;
+ DWORD error = 0;
+ AUTHZ_ACCESS_REQUEST req = {
+ .DesiredAccess = MAXIMUM_ALLOWED,
+ .PrincipalSelfSid = NULL,
+ .ObjectTypeList = NULL,
+ .ObjectTypeListLength = 0,
+ .OptionalArguments = NULL
+ };
+ AUTHZ_ACCESS_REPLY repl = {
+ .ResultListLength = 1,
+ .GrantedAccessMask = &access,
+ .SaclEvaluationResults = NULL,
+ .Error = &error
+ };
+ if (AuthzAccessCheck (0, ctx_hdl, &req, NULL, psd, NULL, 0, &repl, NULL))
+ {
+ if (access & FILE_READ_BITS)
+ *attribute |= S_IROTH;
+ if (access & FILE_WRITE_BITS)
+ *attribute |= S_IWOTH;
+ if (access & FILE_EXEC_BITS)
+ *attribute |= S_IXOTH;
+ return true;
+ }
+ return false;
+}
+
+bool
+authz_get_user_attribute (mode_t *attribute, PSECURITY_DESCRIPTOR psd,
+ PSID user_sid)
+{
+ *attribute = 0;
+ return authz.get_user_attribute (attribute, psd, user_sid);
+}
diff --git a/winsup/cygwin/sec_posixacl.cc b/winsup/cygwin/sec_posixacl.cc
new file mode 100644
index 000000000..6345220f3
--- /dev/null
+++ b/winsup/cygwin/sec_posixacl.cc
@@ -0,0 +1,1077 @@
+/* sec_posixacl.cc: POSIX ACL functions based on Solaris ACLs.
+
+This file is part of Cygwin.
+
+This software is a copyrighted work licensed under the terms of the
+Cygwin license. Please consult the file "CYGWIN_LICENSE" for
+details. */
+
+#include "winsup.h"
+#include <unistd.h>
+#include "cygerrno.h"
+#include "path.h"
+#include "fhandler.h"
+#include "dtable.h"
+#include "cygheap.h"
+#include "tls_pbuf.h"
+#include "sec_posixacl.h"
+#include <acl/libacl.h>
+
+#define _ENTRY_SIZE(_cnt) ((_cnt) * sizeof (aclent_t))
+#define _ACL_SIZE(_cnt) (sizeof (__acl_ext_t) + _ENTRY_SIZE (_cnt))
+#define ACL_SIZE(_acl) ({ acl_t __acl = _acl; \
+ _ACL_SIZE((__acl)->count - (__acl)->deleted); \
+ })
+#define ACL_PERM_MASK (ACL_READ | ACL_WRITE | ACL_EXECUTE)
+
+extern "C" acl_t
+acl_init (int count)
+{
+ acl_t acl;
+
+ if (count < 0 || count > UINT16_MAX)
+ {
+ set_errno (EINVAL);
+ return NULL;
+ }
+ acl = (acl_t) calloc (1, sizeof (__acl_t));
+ if (!acl)
+ return NULL;
+ acl->entry = (aclent_t *) calloc (count, sizeof (aclent_t));
+ if (!acl->entry)
+ {
+ free (acl);
+ return NULL;
+ }
+ acl->magic = ACL_MAGIC;
+ acl->max_count = count;
+ return acl;
+}
+
+extern "C" acl_t
+acl_dup (acl_t acl)
+{
+ __try
+ {
+ acl_t new_acl = acl_init (acl->max_count);
+ if (new_acl)
+ {
+ uint16_t new_idx = 0;
+
+ for (uint16_t idx = 0; idx < acl->count; ++idx)
+ if (acl->entry[idx].a_type != ACL_DELETED_TAG)
+ new_acl->entry[new_idx++] = acl->entry[idx];
+ new_acl->magic = ACL_MAGIC;
+ new_acl->count = new_idx;
+ return new_acl;
+ }
+ }
+ __except (EINVAL) {}
+ __endtry
+ return NULL;
+}
+
+extern "C" int
+acl_free (void *obj_p)
+{
+ __try
+ {
+ acl_t acl;
+
+ if (obj_p)
+ {
+ if (malloc_usable_size (obj_p) >= sizeof (__acl_t))
+ {
+ acl = (acl_t) obj_p;
+ if (acl->magic == ACL_MAGIC)
+ free (acl->entry);
+ }
+ free (obj_p);
+ return 0;
+ }
+ set_errno (EINVAL);
+ }
+ __except (EINVAL) {}
+ __endtry
+ return -1;
+}
+
+extern "C" int
+acl_valid (acl_t acl)
+{
+ __try
+ {
+ if (!(__aclcheck (acl->entry, acl->count, NULL, true)))
+ return 0;
+ set_errno (EINVAL);
+ }
+ __except (EINVAL) {}
+ __endtry
+ return -1;
+}
+
+extern "C" int
+acl_copy_entry (acl_entry_t dest_d, acl_entry_t src_d)
+{
+ __try
+ {
+ uint16_t d_idx, s_idx;
+ acl_t d_acl, s_acl;
+
+ d_acl = __from_entry (dest_d, d_idx);
+ s_acl = __from_entry (src_d, s_idx);
+ if (d_acl && s_acl)
+ {
+ d_acl->entry[d_idx] = s_acl->entry[s_idx];
+ return 0;
+ }
+ set_errno (EINVAL);
+ }
+ __except (EINVAL) {}
+ __endtry
+ return -1;
+}
+
+extern "C" int
+acl_create_entry (acl_t *acl_p, acl_entry_t *entry_p)
+{
+ __try
+ {
+ acl_t acl = *acl_p;
+ uint16_t idx;
+
+ if (acl->deleted > 0)
+ {
+ for (idx = 0; idx < acl->count; ++idx)
+ if (acl->entry[idx].a_type == ACL_DELETED_TAG)
+ {
+ *entry_p = __to_entry (acl, idx);
+ --acl->deleted;
+ goto fill_entry;
+ }
+ }
+ if (acl->count >= acl->max_count)
+ {
+ aclent_t *new_e;
+
+ new_e = (aclent_t *) realloc (acl->entry,
+ _ENTRY_SIZE (acl->max_count + 1));
+ if (!new_e)
+ __leave;
+ acl->entry = new_e;
+ ++acl->max_count;
+ }
+ idx = acl->count++;
+ *entry_p = __to_entry (acl, idx);
+ fill_entry:
+ acl->entry[idx].a_type = ACL_UNDEFINED_TAG;
+ acl->entry[idx].a_id = ACL_UNDEFINED_ID;
+ acl->entry[idx].a_perm = 0;
+ return 0;
+ }
+ __except (EINVAL) {}
+ __endtry
+ return -1;
+}
+
+extern "C" int
+acl_delete_entry (acl_t acl, acl_entry_t entry_d)
+{
+ __try
+ {
+ acl_t acl_p;
+ uint16_t idx;
+
+ acl_p = __from_entry (entry_d, idx);
+
+ if (acl_p == acl)
+ {
+ acl_p->entry[idx].a_type = ACL_DELETED_TAG;
+ acl_p->entry[idx].a_id = ACL_UNDEFINED_ID;
+ acl_p->entry[idx].a_perm = 0;
+ return 0;
+ }
+ set_errno (EINVAL);
+ }
+ __except (EINVAL) {}
+ __endtry
+ return -1;
+}
+
+extern "C" int
+acl_get_entry (acl_t acl, int entry_id, acl_entry_t *entry_p)
+{
+ __try
+ {
+ uint16_t idx;
+
+ if (entry_id == ACL_FIRST_ENTRY)
+ acl->next = 0;
+ else if (entry_id != ACL_NEXT_ENTRY)
+ {
+ set_errno (EINVAL);
+ __leave;
+ }
+ do
+ {
+ if (acl->next >= acl->count)
+ return 0;
+ idx = acl->next++;
+ }
+ while (acl->entry[idx].a_type == ACL_DELETED_TAG);
+ *entry_p = __to_entry (acl, idx);
+ return 1;
+ }
+ __except (EINVAL) {}
+ __endtry
+ return -1;
+}
+
+extern "C" int
+acl_calc_mask (acl_t *acl_p)
+{
+ __try
+ {
+ acl_t acl = *acl_p;
+ mode_t mask = 0;
+
+ mask = __aclcalcmask (acl->entry, acl->count);
+ /* If __aclcalcmask returns -1 we're done. Otherwise create a
+ mask entry here. */
+ if (mask != (acl_perm_t) -1)
+ {
+ acl_entry_t entry_d;
+ uint16_t mask_idx;
+
+ if (acl_create_entry (&acl, &entry_d) < 0)
+ __leave;
+ if (!__from_entry (entry_d, mask_idx))
+ {
+ set_errno (EINVAL);
+ __leave;
+ }
+ acl->entry[mask_idx].a_type = ACL_MASK;
+ acl->entry[mask_idx].a_id = ACL_UNDEFINED_ID;
+ acl->entry[mask_idx].a_perm = mask;
+ *acl_p = acl;
+ }
+ return 0;
+ }
+ __except (EINVAL) {}
+ __endtry
+ return -1;
+}
+
+extern "C" int
+acl_clear_perms (acl_permset_t permset_d)
+{
+ __try
+ {
+ acl_t acl;
+ uint16_t idx;
+
+ acl = __from_permset (permset_d, idx);
+ if (acl)
+ {
+ acl->entry[idx].a_perm = 0;
+ return 0;
+ }
+ set_errno (EINVAL);
+ }
+ __except (EINVAL) {}
+ __endtry
+ return -1;
+}
+
+extern "C" int
+acl_add_perm (acl_permset_t permset_d, acl_perm_t perm)
+{
+ __try
+ {
+ acl_t acl;
+ uint16_t idx;
+
+ acl = __from_permset (permset_d, idx);
+ if (acl && !(perm & ~ACL_PERM_MASK))
+ {
+ acl->entry[idx].a_perm |= perm;
+ return 0;
+ }
+ set_errno (EINVAL);
+ }
+ __except (EINVAL) {}
+ __endtry
+ return -1;
+}
+
+extern "C" int
+acl_delete_perm (acl_permset_t permset_d, acl_perm_t perm)
+{
+ __try
+ {
+ acl_t acl;
+ uint16_t idx;
+
+ acl = __from_permset (permset_d, idx);
+ if (acl && !(perm & ~ACL_PERM_MASK))
+ {
+ acl->entry[idx].a_perm &= ~perm;
+ return 0;
+ }
+ set_errno (EINVAL);
+ }
+ __except (EINVAL) {}
+ __endtry
+ return -1;
+}
+
+extern "C" int
+acl_get_permset (acl_entry_t entry_d, acl_permset_t *permset_p)
+{
+ __try
+ {
+ acl_t acl;
+ uint16_t idx;
+
+ acl = __from_entry (entry_d, idx);
+ if (acl)
+ {
+ *permset_p = (acl_permset_t) entry_d;
+ return 0;
+ }
+ set_errno (EINVAL);
+ }
+ __except (EINVAL) {}
+ __endtry
+ return -1;
+}
+
+extern "C" int
+acl_set_permset (acl_entry_t entry_d, acl_permset_t permset_d)
+{
+ __try
+ {
+ acl_t acl_e, acl_p;
+ uint16_t idx_e, idx_p;
+
+ acl_e = __from_entry (entry_d, idx_e);
+ acl_p = __from_permset (permset_d, idx_p);
+ if (acl_e && acl_p && !(acl_p->entry[idx_p].a_perm & ~ACL_PERM_MASK))
+ {
+ acl_e->entry[idx_e].a_perm = acl_p->entry[idx_p].a_perm;
+ return 0;
+ }
+ set_errno (EINVAL);
+ }
+ __except (EINVAL) {}
+ __endtry
+ return -1;
+}
+
+extern "C" void *
+acl_get_qualifier (acl_entry_t entry_d)
+{
+ __try
+ {
+ acl_t acl;
+ uint16_t idx;
+
+ acl = __from_entry (entry_d, idx);
+ if (acl && (acl->entry[idx].a_type & (ACL_USER | ACL_GROUP)))
+ {
+ id_t *id = (id_t *) malloc (sizeof (id_t));
+ if (id)
+ {
+ *id = acl->entry[idx].a_id;
+ return (void *) id;
+ }
+ }
+ else
+ set_errno (EINVAL);
+ }
+ __except (EINVAL) {}
+ __endtry
+ return NULL;
+}
+
+extern "C" int
+acl_set_qualifier (acl_entry_t entry_d, const void *qualifier_p)
+{
+ __try
+ {
+ acl_t acl;
+ uint16_t idx;
+
+ acl = __from_entry (entry_d, idx);
+ if (acl && (acl->entry[idx].a_type & (ACL_USER | ACL_GROUP)))
+ {
+ acl->entry[idx].a_id = *(id_t *) qualifier_p;
+ return 0;
+ }
+ set_errno (EINVAL);
+ }
+ __except (EINVAL) {}
+ __endtry
+ return -1;
+}
+
+extern "C" int
+acl_get_tag_type (acl_entry_t entry_d, acl_tag_t *tag_type_p)
+{
+ __try
+ {
+ acl_t acl;
+ uint16_t idx;
+
+ acl = __from_entry (entry_d, idx);
+ if (acl)
+ {
+ *tag_type_p = acl->entry[idx].a_type;
+ return 0;
+ }
+ set_errno (EINVAL);
+ }
+ __except (EINVAL) {}
+ __endtry
+ return -1;
+}
+
+extern "C" int
+acl_set_tag_type (acl_entry_t entry_d, acl_tag_t tag_type)
+{
+ __try
+ {
+ acl_t acl;
+ uint16_t idx;
+
+ acl = __from_entry (entry_d, idx);
+ if (acl)
+ switch (tag_type)
+ {
+ case ACL_USER_OBJ:
+ case ACL_GROUP_OBJ:
+ case ACL_MASK:
+ case ACL_OTHER:
+ acl->entry[idx].a_id = ACL_UNDEFINED_ID;
+ /*FALLTHRU*/
+ case ACL_USER:
+ case ACL_GROUP:
+ acl->entry[idx].a_type = tag_type;
+ return 0;
+ default:
+ break;
+ }
+ set_errno (EINVAL);
+ }
+ __except (EINVAL) {}
+ __endtry
+ return -1;
+}
+
+extern "C" ssize_t
+acl_size (acl_t acl)
+{
+ __try
+ {
+ return (ssize_t) ACL_SIZE (acl);
+ }
+ __except (EINVAL) {}
+ __endtry
+ return -1;
+}
+
+extern "C" ssize_t
+acl_copy_ext (void *buf_p, acl_t acl, ssize_t size)
+{
+ __try
+ {
+ ssize_t ext_size = (ssize_t) ACL_SIZE (acl);
+
+ if (size <= 0)
+ set_errno (EINVAL);
+ else if (ext_size > size)
+ set_errno (ERANGE);
+ else
+ {
+ uint16_t ext_idx = 0;
+ __acl_ext_t *acl_ext = (__acl_ext_t *) buf_p;
+
+ acl_ext->count = acl->count - acl->deleted;
+ for (uint16_t idx = 0; idx < acl->count; ++idx)
+ if (acl->entry[idx].a_type != ACL_DELETED_TAG)
+ acl_ext->entry[ext_idx++] = acl->entry[idx];
+ return ext_size;
+ }
+ }
+ __except (EINVAL) {}
+ __endtry
+ return -1;
+}
+
+extern "C" acl_t
+acl_copy_int (const void *buf_p)
+{
+ __try
+ {
+ acl_t acl;
+ __acl_ext_t *acl_ext = (__acl_ext_t *) buf_p;
+
+ acl = acl_init (acl_ext->count);
+ if (acl)
+ {
+ memcpy (acl->entry, acl_ext->entry, _ENTRY_SIZE (acl_ext->count));
+ acl->count = acl_ext->count;
+ return acl;
+ }
+ }
+ __except (EINVAL) {}
+ __endtry
+ return NULL;
+}
+
+extern "C" acl_t
+acl_from_text (const char *buf_p)
+{
+ __try
+ {
+ return (acl_t) __aclfromtext (buf_p, NULL, true);
+ }
+ __except (EINVAL) {}
+ __endtry
+ return NULL;
+}
+
+extern "C" char *
+acl_to_text (acl_t acl, ssize_t *len_p)
+{
+ __try
+ {
+ char *ret = __acltotext (acl->entry, acl->count, NULL, '\n',
+ TEXT_IS_POSIX
+ | TEXT_SOME_EFFECTIVE
+ | TEXT_END_SEPARATOR);
+ if (ret && len_p)
+ *len_p = strlen (ret);
+ return ret;
+ }
+ __except (EINVAL) {}
+ __endtry
+ return NULL;
+}
+
+acl_t __reg2
+fhandler_base::acl_get (acl_type_t type)
+{
+ set_errno (ENOTSUP);
+ return NULL;
+}
+
+acl_t __reg2
+fhandler_disk_file::acl_get (acl_type_t type)
+{
+ acl_t acl = NULL;
+ int oret = 0;
+
+ __try
+ {
+ tmp_pathbuf tp;
+ aclent_t *aclbufp;
+ uint16_t cnt, access_cnt;
+
+ if (!pc.has_acls ())
+ {
+ set_errno (ENOTSUP);
+ __leave;
+ }
+ if (type == ACL_TYPE_DEFAULT && !pc.isdir ())
+ {
+ set_errno (ENOTDIR);
+ __leave;
+ }
+ aclbufp = (aclent_t *) tp.c_get ();
+ if (!get_handle ())
+ {
+ query_open (query_read_control);
+ if (!(oret = open (O_BINARY, 0)))
+ __leave;
+ }
+ cnt = facl (GETACL, MAX_ACL_ENTRIES, aclbufp);
+ if (cnt < 0)
+ __leave;
+ /* Set access_cnt to number of non-default entries from file ACL. */
+ if (!pc.isdir ())
+ access_cnt = cnt;
+ else
+ for (access_cnt = 0; access_cnt < cnt; ++access_cnt)
+ if (aclbufp[access_cnt].a_type & ACL_DEFAULT)
+ break;
+ if (type == ACL_TYPE_ACCESS)
+ {
+ acl = acl_init (access_cnt);
+ if (!acl)
+ __leave;
+ memcpy (acl->entry, aclbufp, _ENTRY_SIZE (access_cnt));
+ acl->count = access_cnt;
+ }
+ else
+ {
+ cnt -= access_cnt;
+ acl = acl_init (cnt);
+ if (acl && cnt)
+ {
+ memcpy (acl->entry, aclbufp + access_cnt, _ENTRY_SIZE (cnt));
+ acl->count = cnt;
+ for (cnt = 0; cnt < acl->count; ++cnt)
+ acl->entry[cnt].a_type &= ~ACL_DEFAULT;
+ }
+ }
+ }
+ __except (EINVAL) {}
+ __endtry
+ if (oret)
+ close_fs ();
+ return acl;
+}
+
+extern "C" acl_t
+acl_get_fd (int fd)
+{
+ cygheap_fdget cfd (fd);
+ if (cfd < 0)
+ return NULL;
+ return cfd->acl_get (ACL_TYPE_ACCESS);
+}
+
+extern "C" acl_t
+acl_get_file (const char *path_p, acl_type_t type)
+{
+ if (type != ACL_TYPE_ACCESS && type != ACL_TYPE_DEFAULT)
+ {
+ set_errno (EINVAL);
+ return NULL;
+ }
+ fhandler_base *fh;
+ if (!(fh = build_fh_name (path_p, PC_SYM_FOLLOW, stat_suffixes)))
+ return NULL;
+ if (fh->error ())
+ {
+ set_errno (fh->error ());
+ return NULL;
+ }
+ acl_t acl = fh->acl_get (type);
+ delete fh;
+ return acl;
+}
+
+int __reg3
+fhandler_base::acl_set (acl_t acl, acl_type_t type)
+{
+ set_errno (ENOTSUP);
+ return -1;
+}
+
+int __reg3
+fhandler_disk_file::acl_set (acl_t acl, acl_type_t type)
+{
+ int ret = -1;
+ int oret = 0;
+
+ __try
+ {
+ tmp_pathbuf tp;
+ aclent_t *aclbufp, *aclbuf_from_file;
+ uint16_t cnt, cnt_from_file, access_cnt;
+
+ if (!pc.has_acls ())
+ {
+ set_errno (ENOTSUP);
+ __leave;
+ }
+ if (type == ACL_TYPE_DEFAULT && !pc.isdir ())
+ {
+ set_errno (ENOTDIR);
+ __leave;
+ }
+ if (acl->count > MAX_ACL_ENTRIES)
+ {
+ set_errno (EINVAL);
+ __leave;
+ }
+ aclbuf_from_file = (aclent_t *) tp.c_get ();
+ if (!get_handle ())
+ {
+ query_open (query_write_dac);
+ if (!(oret = open (O_BINARY, 0)))
+ __leave;
+ }
+ cnt_from_file = facl (GETACL, MAX_ACL_ENTRIES, aclbuf_from_file);
+ if (cnt_from_file < 0)
+ __leave;
+ aclbufp = (aclent_t *) tp.c_get ();
+ /* Set access_cnt to number of non-default entries from file ACL. */
+ if (!pc.isdir ())
+ access_cnt = cnt_from_file;
+ else
+ for (access_cnt = 0; access_cnt < cnt_from_file; ++access_cnt)
+ if (aclbuf_from_file[access_cnt].a_type & ACL_DEFAULT)
+ break;
+ if (type == ACL_TYPE_ACCESS)
+ {
+ /* Check if the number of ACEs fits into the buffer. */
+ if (acl->count - acl->deleted + cnt_from_file - access_cnt
+ > MAX_ACL_ENTRIES)
+ {
+ set_errno (EINVAL);
+ __leave;
+ }
+ /* Copy the new ACL entries. */
+ cnt = 0;
+ for (uint16_t idx = 0; idx < acl->count; ++idx)
+ if (acl->entry[idx].a_type != ACL_DELETED_TAG)
+ aclbufp[cnt++] = acl->entry[idx];
+ /* Append default ACL from file, if any. */
+ if (access_cnt < cnt_from_file)
+ {
+ memcpy (aclbufp + cnt, aclbuf_from_file + access_cnt,
+ _ENTRY_SIZE (cnt_from_file - access_cnt));
+ cnt += cnt_from_file - access_cnt;
+ }
+ }
+ else
+ {
+ /* Check if the number of ACEs fits into the buffer. */
+ if (acl->count - acl->deleted + access_cnt > MAX_ACL_ENTRIES)
+ {
+ set_errno (EINVAL);
+ __leave;
+ }
+ /* Copy non-default entries from file. */
+ memcpy (aclbufp, aclbuf_from_file, _ENTRY_SIZE (access_cnt));
+ cnt = access_cnt;
+ /* Append new default ACL entries (and add ACL_DEFAULT flag). */
+ for (uint16_t idx = 0; idx < acl->count; ++idx)
+ if (acl->entry[idx].a_type != ACL_DELETED_TAG)
+ {
+ aclbufp[cnt] = acl->entry[idx];
+ aclbufp[cnt++].a_type |= ACL_DEFAULT;
+ }
+ }
+ ret = facl (SETACL, cnt, aclbufp);
+ }
+ __except (EINVAL) {}
+ __endtry
+ if (oret)
+ close_fs ();
+ return ret;
+}
+
+extern "C" int
+acl_set_fd (int fd, acl_t acl)
+{
+ cygheap_fdget cfd (fd);
+ if (cfd < 0)
+ return -1;
+ return cfd->acl_set (acl, ACL_TYPE_ACCESS);
+}
+
+extern "C" int
+acl_set_file(const char *path_p, acl_type_t type, acl_t acl)
+{
+ if (type != ACL_TYPE_ACCESS && type != ACL_TYPE_DEFAULT)
+ {
+ set_errno (EINVAL);
+ return -1;
+ }
+ fhandler_base *fh;
+ if (!(fh = build_fh_name (path_p, PC_SYM_FOLLOW, stat_suffixes)))
+ return -1;
+ if (fh->error ())
+ {
+ set_errno (fh->error ());
+ return -1;
+ }
+ int ret = fh->acl_set (acl, type);
+ delete fh;
+ return ret;
+}
+
+extern "C" int
+acl_delete_def_file (const char *path_p)
+{
+ acl_t acl = (acl_t) alloca (sizeof (struct __acl_t));
+ acl->count = acl->max_count = acl->next = 0;
+ if (!acl)
+ return -1;
+ return acl_set_file(path_p, ACL_TYPE_DEFAULT, acl);
+}
+
+/* libacl extensions */
+
+extern "C" int
+acl_check (acl_t acl, int *last)
+{
+
+ __try
+ {
+ int ret = 0;
+
+ if (acl->count != 0)
+ {
+ ret = __aclcheck (acl->entry, acl->count, last, true);
+ switch (ret)
+ {
+ case GRP_ERROR:
+ case USER_ERROR:
+ case CLASS_ERROR:
+ case OTHER_ERROR:
+ ret = ACL_MULTI_ERROR;
+ break;
+ default:
+ break;
+ }
+ }
+ return ret;
+ }
+ __except (EINVAL) {}
+ __endtry
+ return -1;
+}
+
+extern "C" int
+acl_cmp (acl_t acl1, acl_t acl2)
+{
+ int ret = -1;
+
+ __try
+ {
+ tmp_pathbuf tp;
+
+ __acl_ext_t *acl1d = (__acl_ext_t *) tp.c_get ();
+ __acl_ext_t *acl2d = (__acl_ext_t *) tp.c_get ();
+ if (acl_copy_ext (acl1d, acl1, NT_MAX_PATH) < 0)
+ __leave;
+ if (acl_copy_ext (acl2d, acl2, NT_MAX_PATH) < 0)
+ __leave;
+ if (acl1d->count != acl2d->count)
+ return 1;
+ if (__aclsort (acl1d->count, acl1d->entry))
+ __leave;
+ if (__aclsort (acl2d->count, acl2d->entry))
+ __leave;
+ for (int idx = 0; idx < acl1d->count; ++idx)
+ {
+ if (acl1d->entry[idx].a_type != acl2d->entry[idx].a_type)
+ {
+ ret = 1;
+ __leave;
+ }
+ if ((acl1d->entry[idx].a_perm & ACL_PERM_MASK)
+ != (acl2d->entry[idx].a_perm & ACL_PERM_MASK))
+ {
+ ret = 1;
+ __leave;
+ }
+ if ((acl1d->entry[idx].a_type & (ACL_USER | ACL_GROUP))
+ && acl1d->entry[idx].a_id != acl2d->entry[idx].a_id)
+ {
+ ret = 1;
+ __leave;
+ }
+ }
+ ret = 0;
+ }
+ __except (EINVAL) {}
+ __endtry
+ return ret;
+}
+
+extern "C" int
+acl_entries (acl_t acl)
+{
+ __try
+ {
+ return acl->count - acl->deleted;
+ }
+ __except (EINVAL) {}
+ __endtry
+ return -1;
+}
+
+extern "C" int
+acl_equiv_mode (acl_t acl, mode_t *mode_p)
+{
+ __try
+ {
+ if (acl->count != 3)
+ {
+ set_errno (EINVAL);
+ __leave;
+ }
+ int u_idx = -1, g_idx = -1, o_idx = -1;
+ for (int idx = 0; idx < 3; ++idx)
+ switch (acl->entry[idx].a_type)
+ {
+ case ACL_USER_OBJ:
+ u_idx = idx;
+ break;
+ case ACL_GROUP_OBJ:
+ g_idx = idx;
+ break;
+ case ACL_OTHER:
+ o_idx = idx;
+ break;
+ }
+ if (u_idx == -1 || g_idx == -1 || o_idx == -1)
+ {
+ set_errno (EINVAL);
+ __leave;
+ }
+ if (mode_p)
+ *mode_p = ((acl->entry[u_idx].a_perm & ACL_PERM_MASK) << 6)
+ | ((acl->entry[g_idx].a_perm & ACL_PERM_MASK) << 3)
+ | (acl->entry[o_idx].a_perm & ACL_PERM_MASK);
+ return 0;
+ }
+ __except (EINVAL) {}
+ __endtry
+ return -1;
+}
+
+static const char *acl_err_txt[] =
+{
+ "Multiple entries",
+ "Duplicate entries",
+ "Invalid entry type",
+ "Missing or wrong entry"
+};
+
+extern "C" const char *
+acl_error (int code)
+{
+ if (code < ACL_MULTI_ERROR || code > ACL_MISS_ERROR)
+ return NULL;
+ return acl_err_txt[code - ACL_MULTI_ERROR];
+}
+
+static int
+__acl_extended_fh (fhandler_base *fh)
+{
+ int ret = -1;
+
+ if (!fh->pc.has_acls ())
+ set_errno (ENOTSUP);
+ else
+ {
+ ret = fh->facl (GETACLCNT, 0, NULL);
+ if (ret >= 0)
+ ret = (ret > MIN_ACL_ENTRIES) ? 1 : 0;
+ }
+ return ret;
+}
+
+extern "C" int
+acl_extended_fd (int fd)
+{
+ __try
+ {
+ cygheap_fdget cfd (fd);
+ if (cfd < 0)
+ __leave;
+ return __acl_extended_fh (cfd);
+ }
+ __except (EBADF) {}
+ __endtry
+ return -1;
+}
+
+static int
+__acl_extended_file (path_conv &pc)
+{
+ int ret = -1;
+
+ __try
+ {
+ if (pc.error)
+ set_errno (pc.error);
+ else if (!pc.exists ())
+ set_errno (ENOENT);
+ else
+ {
+ fhandler_base *fh;
+
+ if (!(fh = build_fh_pc (pc)))
+ __leave;
+ ret = __acl_extended_fh (fh);
+ delete fh;
+ }
+ }
+ __except (EFAULT) {}
+ __endtry
+ return ret;
+}
+
+extern "C" int
+acl_extended_file (const char *path_p)
+{
+ path_conv pc (path_p, PC_SYM_FOLLOW | PC_POSIX | PC_KEEP_HANDLE,
+ stat_suffixes);
+ return __acl_extended_file (pc);
+}
+
+extern "C" int
+acl_extended_file_nofollow (const char *path_p)
+{
+ path_conv pc (path_p, PC_SYM_NOFOLLOW | PC_POSIX | PC_KEEP_HANDLE,
+ stat_suffixes);
+ return __acl_extended_file (pc);
+}
+
+extern "C" acl_t
+acl_from_mode (mode_t mode)
+{
+ acl_t acl = acl_init (MIN_ACL_ENTRIES);
+ if (!acl)
+ return NULL;
+ acl->count = 3;
+ acl->entry[0].a_type = USER_OBJ;
+ acl->entry[0].a_id = ACL_UNDEFINED_ID;
+ acl->entry[0].a_perm = (mode >> 6) & ACL_PERM_MASK;
+ acl->entry[1].a_type = GROUP_OBJ;
+ acl->entry[1].a_id = ACL_UNDEFINED_ID;
+ acl->entry[1].a_perm = (mode >> 3) & ACL_PERM_MASK;
+ acl->entry[2].a_type = OTHER_OBJ;
+ acl->entry[2].a_id = ACL_UNDEFINED_ID;
+ acl->entry[2].a_perm = mode & ACL_PERM_MASK;
+ return acl;
+}
+
+extern "C" int
+acl_get_perm (acl_permset_t permset_d, acl_perm_t perm)
+{
+ __try
+ {
+ acl_t acl;
+ uint16_t idx;
+
+ acl = __from_permset (permset_d, idx);
+ if (acl && !(perm & ~ACL_PERM_MASK))
+ return (~acl->entry[idx].a_perm & perm) ? 0 : 1;
+ set_errno (EINVAL);
+ }
+ __except (EINVAL) {}
+ __endtry
+ return -1;
+}
+
+extern "C" char *
+acl_to_any_text (acl_t acl, const char *prefix, char separator, int options)
+{
+ __try
+ {
+ return __acltotext (acl->entry, acl->count, prefix, separator,
+ TEXT_IS_POSIX | options);
+ }
+ __except (EINVAL) {}
+ __endtry
+ return NULL;
+}
diff --git a/winsup/cygwin/sec_posixacl.h b/winsup/cygwin/sec_posixacl.h
new file mode 100644
index 000000000..a3790a52b
--- /dev/null
+++ b/winsup/cygwin/sec_posixacl.h
@@ -0,0 +1,68 @@
+/* sec_posixacl.h: Internal definitions for POSIX ACLs.
+
+This file is part of Cygwin.
+
+This software is a copyrighted work licensed under the terms of the
+Cygwin license. Please consult the file "CYGWIN_LICENSE" for
+details. */
+
+#include <cygwin/acl.h>
+#include <sys/acl.h>
+#include <acl/libacl.h>
+
+/* Magic marker for acl_t. */
+#define ACL_MAGIC (0xacdccdcadcaccacdULL)
+
+/* Only used internally as a_type for deleted entries. */
+#define ACL_DELETED_TAG (0xffff)
+
+/* Only used internally from acl_to_text/acl_to_any_text. */
+#define TEXT_END_SEPARATOR (0x1000)
+#define TEXT_IS_POSIX (0x2000)
+
+/* Internal ACL representation. */
+struct __acl_t
+{
+ uint64_t magic; /* Must be ACL_MAGIC. */
+ uint16_t max_count; /* Max. number of entries. */
+ uint16_t count; /* Number of used entries. */
+ uint16_t deleted; /* Number of used but deleted entries. */
+ uint16_t next; /* Next entry to be returned by acl_get_entry. */
+ aclent_t *entry; /* Pointer to variable array of ACL entries. */
+};
+
+inline acl_entry_t
+__to_entry (acl_t acl, uint16_t idx)
+{
+ return ((uint64_t) idx << 48) | (uint64_t) acl;
+}
+#define __to_permset(a,i) ((acl_permset_t)__to_entry((a),(i)))
+
+inline acl_t
+__from_entry (acl_entry_t entry_d, uint16_t &idx)
+{
+ idx = entry_d >> 48;
+ acl_t acl = (acl_t) (entry_d & ~((uint64_t) 0xffff << 48));
+ if (acl->magic != ACL_MAGIC)
+ return NULL;
+ if (idx >= acl->count)
+ return NULL;
+ if (acl->entry[idx].a_type == ACL_DELETED_TAG)
+ return NULL;
+ return acl;
+}
+#define __from_permset(p,i) __from_entry((acl_permset_t)(p),(i))
+
+/* External (but opaque) ACL representation. */
+struct __acl_ext_t
+{
+ uint16_t count; /* Number of used entries. */
+ aclent_t entry[0]; /* Variable array of ACL entries. */
+};
+
+/* Shared functions defined in sec_acl.cc. */
+mode_t __aclcalcmask (aclent_t *, int);
+int __aclsort (int, aclent_t *);
+int __aclcheck (aclent_t *, int, int *, bool);
+char *__acltotext (aclent_t *, int, const char *, char, int);
+void *__aclfromtext (const char *, int *, bool);
diff --git a/winsup/cygwin/security.cc b/winsup/cygwin/security.cc
index 251e9609e..7894a6038 100644
--- a/winsup/cygwin/security.cc
+++ b/winsup/cygwin/security.cc
@@ -1,8 +1,5 @@
/* security.cc: NT file access control functions
- Copyright 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007,
- 2008, 2009, 2010, 2011, 2012, 2013 Red Hat, Inc.
-
Originaly written by Gunther Ebert, gunther.ebert@ixos-leipzig.de
Completely rewritten by Corinna Vinschen <corinna@vinschen.de>
@@ -15,6 +12,7 @@ details. */
#include "winsup.h"
#include <unistd.h>
#include <stdlib.h>
+#include <cygwin/acl.h>
#include "cygerrno.h"
#include "security.h"
#include "path.h"
@@ -23,7 +21,6 @@ details. */
#include "pinfo.h"
#include "cygheap.h"
#include "ntdll.h"
-#include "pwdgrp.h"
#include "tls_pbuf.h"
#include <aclapi.h>
@@ -35,12 +32,11 @@ static GENERIC_MAPPING NO_COPY_RO file_mapping = { FILE_GENERIC_READ,
FILE_GENERIC_WRITE,
FILE_GENERIC_EXECUTE,
FILE_ALL_ACCESS };
-
LONG
get_file_sd (HANDLE fh, path_conv &pc, security_descriptor &sd,
bool justcreated)
{
- NTSTATUS status;
+ NTSTATUS status = STATUS_SUCCESS;
OBJECT_ATTRIBUTES attr;
IO_STATUS_BLOCK io;
ULONG len = SD_MAXIMUM_SIZE, rlen;
@@ -57,20 +53,19 @@ get_file_sd (HANDLE fh, path_conv &pc, security_descriptor &sd,
status = NtQuerySecurityObject (fh, ALL_SECURITY_INFORMATION,
sd, len, &rlen);
if (!NT_SUCCESS (status))
- {
- debug_printf ("NtQuerySecurityObject (%S), status %y",
- pc.get_nt_native_path (), status);
- fh = NULL;
- }
+ debug_printf ("NtQuerySecurityObject (%S), status %y",
+ pc.get_nt_native_path (), status);
}
/* If the handle was NULL, or fetching with the original handle didn't work,
try to reopen the file with READ_CONTROL and fetch the security descriptor
using that handle. */
- if (!fh)
+ if (!fh || !NT_SUCCESS (status))
{
status = NtOpenFile (&fh, READ_CONTROL,
- pc.get_object_attr (attr, sec_none_nih), &io,
- FILE_SHARE_VALID_FLAGS, FILE_OPEN_FOR_BACKUP_INTENT);
+ fh ? pc.init_reopen_attr (attr, fh)
+ : pc.get_object_attr (attr, sec_none_nih),
+ &io, FILE_SHARE_VALID_FLAGS,
+ FILE_OPEN_FOR_BACKUP_INTENT);
if (!NT_SUCCESS (status))
{
sd.free ();
@@ -87,62 +82,46 @@ get_file_sd (HANDLE fh, path_conv &pc, security_descriptor &sd,
return -1;
}
}
- /* Ok, so we have a security descriptor now. Unfortunately, if you want
- to know if an ACE is inherited from the parent object, you can't just
- call NtQuerySecurityObject once. The problem is this:
+ /* We have a security descriptor now. Unfortunately, if you want to know
+ if an ACE is inherited from the parent object, this isn't sufficient.
In the simple case, the SDs control word contains one of the
SE_DACL_AUTO_INHERITED or SE_DACL_PROTECTED flags, or at least one of
- the ACEs has the INHERITED_ACE flag set. In all of these cases the
- GetSecurityInfo function calls NtQuerySecurityObject only once, too,
- apparently because it figures that the DACL is self-sufficient, which
- it usually is. Windows Explorer, for instance, takes great care to
- set these flags in a security descriptor if you change the ACL in the
- GUI property dialog.
-
- The tricky case is if none of these flags is set in the SD. That means
- the information whether or not an ACE has been inherited is not available
- in the DACL of the object. In this case GetSecurityInfo also fetches the
- SD from the parent directory and tests if the object's SD contains
- inherited ACEs from the parent. The below code is closly emulating the
- behaviour of GetSecurityInfo so we can get rid of this advapi32 dependency.
-
- However, this functionality is slow, and the extra information is only
- required when the file has been created and the permissions are about
- to be set to POSIX permissions. Therefore we only use it in case the
- file just got created.
-
- Note that GetSecurityInfo has a problem on 5.1 and 5.2 kernels. Sometimes
- it returns ERROR_INVALID_ADDRESS if a former request for the parent
- directories' SD used NtQuerySecurityObject, rather than GetSecurityInfo
- as well. See http://cygwin.com/ml/cygwin-developers/2011-03/msg00027.html
- for the solution. This problem does not occur with the below code, so
- the workaround has been removed. */
+ the ACEs has the INHERITED_ACE flag set. In all of these cases we
+ know the DACL has been inherited.
+
+ If none of these flags is set in the SD, the information whether
+ or not an ACE has been inherited is not available in the DACL of the
+ object. In this case GetSecurityInfo fetches the SD from the parent
+ directory and tests if the object's SD contains inherited ACEs from the
+ parent.
+
+ Note that we're not testing the SE_DACL_AUTO_INHERITED and
+ SE_DACL_PROTECTED flags here because we know the state the file's SD
+ is in. Since we're creating all files with a NULL descriptor, the DACL
+ is either inherited from the parent, or it's the default DACL. In
+ neither case, one of these flags is set.
+
+ For speed, we're not calling RtlConvertToAutoInheritSecurityObject
+ anymore (but keep the code here for reference). Rather we just test
+ if one of the parent's ACEs is inheritable. If so, we know we inherited
+ it and set the SE_DACL_AUTO_INHERITED flag. If not, we may assume our
+ object's DACL is the default DACL.
+
+ This functionality is slow and the extra information is only required
+ when the file has been created and the permissions are about to be set
+ to POSIX permissions. Therefore we only use it in case the file just
+ got created. */
if (justcreated)
{
- SECURITY_DESCRIPTOR_CONTROL ctrl;
- ULONG dummy;
PACL dacl;
BOOLEAN exists, def;
ACCESS_ALLOWED_ACE *ace;
UNICODE_STRING dirname;
- PSECURITY_DESCRIPTOR psd, nsd;
+ PSECURITY_DESCRIPTOR psd;
tmp_pathbuf tp;
- /* Check SDs control flags. If SE_DACL_AUTO_INHERITED or
- SE_DACL_PROTECTED is set we're done. */
- RtlGetControlSecurityDescriptor (sd, &ctrl, &dummy);
- if (ctrl & (SE_DACL_AUTO_INHERITED | SE_DACL_PROTECTED))
- return 0;
- /* Otherwise iterate over the ACEs and see if any one of them has the
- INHERITED_ACE flag set. If so, we're done. */
- if (NT_SUCCESS (RtlGetDaclSecurityDescriptor (sd, &exists, &dacl, &def))
- && exists && dacl)
- for (ULONG idx = 0; idx < dacl->AceCount; ++idx)
- if (NT_SUCCESS (RtlGetAce (dacl, idx, (PVOID *) &ace))
- && (ace->Header.AceFlags & INHERITED_ACE))
- return 0;
- /* Otherwise, open the parent directory with READ_CONTROL... */
+ /* Open the parent directory with READ_CONTROL... */
RtlSplitUnicodePath (pc.get_nt_native_path (), &dirname, NULL);
InitializeObjectAttributes (&attr, &dirname, pc.objcaseinsensitive (),
NULL, NULL);
@@ -166,12 +145,14 @@ get_file_sd (HANDLE fh, path_conv &pc, security_descriptor &sd,
&dirname, status);
return 0;
}
+#if 0
/* ... and create a new security descriptor in which all inherited ACEs
are marked with the INHERITED_ACE flag. For a description of the
undocumented RtlConvertToAutoInheritSecurityObject function from
ntdll.dll see the MSDN man page for the advapi32 function
ConvertToAutoInheritPrivateObjectSecurity. Fortunately the latter
is just a shim. */
+ PSECURITY_DESCRIPTOR nsd;
status = RtlConvertToAutoInheritSecurityObject (psd, sd, &nsd, NULL,
pc.isdir (),
&file_mapping);
@@ -187,6 +168,36 @@ get_file_sd (HANDLE fh, path_conv &pc, security_descriptor &sd,
len = RtlLengthSecurityDescriptor (nsd);
memcpy ((PSECURITY_DESCRIPTOR) sd, nsd, len);
RtlDeleteSecurityObject (&nsd);
+#else
+ /* ... and check the parent descriptor for inheritable ACEs matching
+ our current object type (file/dir). The simple truth in our case
+ is, either the parent dir had inheritable ACEs and all our ACEs are
+ inherited, or the parent dir didn't have inheritable ACEs and all
+ our ACEs are taken from the default DACL. */
+ bool inherited = false;
+ BYTE search_flags = pc.isdir () ? SUB_CONTAINERS_AND_OBJECTS_INHERIT
+ : SUB_OBJECTS_ONLY_INHERIT;
+ if (NT_SUCCESS (RtlGetDaclSecurityDescriptor (psd, &exists, &dacl, &def))
+ && exists && dacl)
+ for (ULONG idx = 0; idx < dacl->AceCount; ++idx)
+ if (NT_SUCCESS (RtlGetAce (dacl, idx, (PVOID *) &ace))
+ && (ace->Header.AceFlags & search_flags))
+ {
+ inherited = true;
+ break;
+ }
+ /* Then, if the parent descriptor contained inheritable ACEs, we mark
+ the SD as SE_DACL_AUTO_INHERITED. Note that this requires the
+ matching check in get_posix_access. If we ever revert to
+ RtlConvertToAutoInheritSecurityObject, the check in get_posix_access
+ has to test every single ACE for the INHERITED_ACE flag again. */
+ if (inherited
+ && NT_SUCCESS (RtlGetDaclSecurityDescriptor (sd, &exists, &dacl,
+ &def))
+ && exists && dacl)
+ RtlSetControlSecurityDescriptor (sd, SE_DACL_AUTO_INHERITED,
+ SE_DACL_AUTO_INHERITED);
+#endif
}
return 0;
}
@@ -217,8 +228,10 @@ set_file_sd (HANDLE fh, path_conv &pc, security_descriptor &sd, bool is_chown)
OBJECT_ATTRIBUTES attr;
IO_STATUS_BLOCK io;
status = NtOpenFile (&fh, (is_chown ? WRITE_OWNER : 0) | WRITE_DAC,
- pc.get_object_attr (attr, sec_none_nih),
- &io, FILE_SHARE_VALID_FLAGS,
+ fh ? pc.init_reopen_attr (attr, fh)
+ : pc.get_object_attr (attr, sec_none_nih),
+ &io,
+ FILE_SHARE_VALID_FLAGS,
FILE_OPEN_FOR_BACKUP_INTENT);
if (!NT_SUCCESS (status))
{
@@ -234,161 +247,6 @@ set_file_sd (HANDLE fh, path_conv &pc, security_descriptor &sd, bool is_chown)
return res;
}
-static void
-get_attribute_from_acl (mode_t *attribute, PACL acl, PSID owner_sid,
- PSID group_sid, bool grp_member)
-{
- ACCESS_ALLOWED_ACE *ace;
- int allow = 0;
- int deny = 0;
- int *flags, *anti;
-
- for (DWORD i = 0; i < acl->AceCount; ++i)
- {
- if (!NT_SUCCESS (RtlGetAce (acl, i, (PVOID *) &ace)))
- continue;
- if (ace->Header.AceFlags & INHERIT_ONLY_ACE)
- continue;
- switch (ace->Header.AceType)
- {
- case ACCESS_ALLOWED_ACE_TYPE:
- flags = &allow;
- anti = &deny;
- break;
- case ACCESS_DENIED_ACE_TYPE:
- flags = &deny;
- anti = &allow;
- break;
- default:
- continue;
- }
-
- cygpsid ace_sid ((PSID) &ace->SidStart);
- if (ace_sid == well_known_world_sid)
- {
- if (ace->Mask & FILE_READ_BITS)
- *flags |= ((!(*anti & S_IROTH)) ? S_IROTH : 0)
- | ((!(*anti & S_IRGRP)) ? S_IRGRP : 0)
- | ((!(*anti & S_IRUSR)) ? S_IRUSR : 0);
- if (ace->Mask & FILE_WRITE_BITS)
- *flags |= ((!(*anti & S_IWOTH)) ? S_IWOTH : 0)
- | ((!(*anti & S_IWGRP)) ? S_IWGRP : 0)
- | ((!(*anti & S_IWUSR)) ? S_IWUSR : 0);
- if (ace->Mask & FILE_EXEC_BITS)
- *flags |= ((!(*anti & S_IXOTH)) ? S_IXOTH : 0)
- | ((!(*anti & S_IXGRP)) ? S_IXGRP : 0)
- | ((!(*anti & S_IXUSR)) ? S_IXUSR : 0);
- if ((S_ISDIR (*attribute)) &&
- (ace->Mask & (FILE_WRITE_DATA | FILE_EXECUTE | FILE_DELETE_CHILD))
- == (FILE_WRITE_DATA | FILE_EXECUTE))
- *flags |= S_ISVTX;
- }
- else if (ace_sid == well_known_null_sid)
- {
- /* Read SUID, SGID and VTX bits from NULL ACE. */
- if (ace->Mask & FILE_READ_DATA)
- *flags |= S_ISVTX;
- if (ace->Mask & FILE_WRITE_DATA)
- *flags |= S_ISGID;
- if (ace->Mask & FILE_APPEND_DATA)
- *flags |= S_ISUID;
- }
- else if (ace_sid == owner_sid)
- {
- if (ace->Mask & FILE_READ_BITS)
- *flags |= ((!(*anti & S_IRUSR)) ? S_IRUSR : 0);
- if (ace->Mask & FILE_WRITE_BITS)
- *flags |= ((!(*anti & S_IWUSR)) ? S_IWUSR : 0);
- if (ace->Mask & FILE_EXEC_BITS)
- *flags |= ((!(*anti & S_IXUSR)) ? S_IXUSR : 0);
- }
- else if (ace_sid == group_sid)
- {
- if (ace->Mask & FILE_READ_BITS)
- *flags |= ((!(*anti & S_IRGRP)) ? S_IRGRP : 0)
- | ((grp_member && !(*anti & S_IRUSR)) ? S_IRUSR : 0);
- if (ace->Mask & FILE_WRITE_BITS)
- *flags |= ((!(*anti & S_IWGRP)) ? S_IWGRP : 0)
- | ((grp_member && !(*anti & S_IWUSR)) ? S_IWUSR : 0);
- if (ace->Mask & FILE_EXEC_BITS)
- *flags |= ((!(*anti & S_IXGRP)) ? S_IXGRP : 0)
- | ((grp_member && !(*anti & S_IXUSR)) ? S_IXUSR : 0);
- }
- }
- *attribute &= ~(S_IRWXU | S_IRWXG | S_IRWXO | S_ISVTX | S_ISGID | S_ISUID);
- if (owner_sid && group_sid && RtlEqualSid (owner_sid, group_sid)
- /* FIXME: temporary exception for /var/empty */
- && well_known_system_sid != group_sid)
- {
- allow &= ~(S_IRGRP | S_IWGRP | S_IXGRP);
- allow |= (((allow & S_IRUSR) ? S_IRGRP : 0)
- | ((allow & S_IWUSR) ? S_IWGRP : 0)
- | ((allow & S_IXUSR) ? S_IXGRP : 0));
- }
- *attribute |= allow;
-}
-
-static void
-get_info_from_sd (PSECURITY_DESCRIPTOR psd, mode_t *attribute,
- uid_t *uidret, gid_t *gidret)
-{
- if (!psd)
- {
- /* If reading the security descriptor failed, treat the object
- as unreadable. */
- if (attribute)
- *attribute &= ~(S_IRWXU | S_IRWXG | S_IRWXO);
- if (uidret)
- *uidret = ILLEGAL_UID;
- if (gidret)
- *gidret = ILLEGAL_GID;
- return;
- }
-
- cygpsid owner_sid;
- cygpsid group_sid;
- NTSTATUS status;
- BOOLEAN dummy;
-
- status = RtlGetOwnerSecurityDescriptor (psd, (PSID *) &owner_sid, &dummy);
- if (!NT_SUCCESS (status))
- debug_printf ("RtlGetOwnerSecurityDescriptor: %y", status);
- status = RtlGetGroupSecurityDescriptor (psd, (PSID *) &group_sid, &dummy);
- if (!NT_SUCCESS (status))
- debug_printf ("RtlGetGroupSecurityDescriptor: %y", status);
-
- uid_t uid;
- gid_t gid;
- bool grp_member = get_sids_info (owner_sid, group_sid, &uid, &gid);
- if (uidret)
- *uidret = uid;
- if (gidret)
- *gidret = gid;
-
- if (!attribute)
- {
- syscall_printf ("uid %u, gid %u", uid, gid);
- return;
- }
-
- PACL acl;
- BOOLEAN acl_exists;
-
- status = RtlGetDaclSecurityDescriptor (psd, &acl_exists, &acl, &dummy);
- if (!NT_SUCCESS (status))
- {
- __seterrno_from_nt_status (status);
- *attribute &= ~(S_IRWXU | S_IRWXG | S_IRWXO);
- }
- else if (!acl_exists || !acl)
- *attribute |= S_IRWXU | S_IRWXG | S_IRWXO;
- else
- get_attribute_from_acl (attribute, acl, owner_sid, group_sid, grp_member);
-
- syscall_printf ("%sACL %y, uid %u, gid %u",
- (!acl_exists || !acl)?"NO ":"", *attribute, uid, gid);
-}
-
static int
get_reg_sd (HANDLE handle, security_descriptor &sd_ret)
{
@@ -421,7 +279,7 @@ get_reg_attribute (HKEY hkey, mode_t *attribute, uid_t *uidret,
if (!get_reg_sd (hkey, sd))
{
- get_info_from_sd (sd, attribute, uidret, gidret);
+ get_posix_access (sd, attribute, uidret, gidret, NULL, 0);
return 0;
}
/* The entries are already set to default values */
@@ -438,7 +296,7 @@ get_file_attribute (HANDLE handle, path_conv &pc,
if (!get_file_sd (handle, pc, sd, false))
{
- get_info_from_sd (sd, attribute, uidret, gidret);
+ get_posix_access (sd, attribute, uidret, gidret, NULL, 0);
return 0;
}
/* ENOSYS is returned by get_file_sd if fetching the DACL from a remote
@@ -466,8 +324,8 @@ get_file_attribute (HANDLE handle, path_conv &pc,
}
bool
-add_access_allowed_ace (PACL acl, int offset, DWORD attributes,
- PSID sid, size_t &len_add, DWORD inherit)
+add_access_allowed_ace (PACL acl, DWORD attributes, PSID sid, size_t &len_add,
+ DWORD inherit)
{
NTSTATUS status = RtlAddAccessAllowedAceEx (acl, ACL_REVISION, inherit,
attributes, sid);
@@ -481,8 +339,8 @@ add_access_allowed_ace (PACL acl, int offset, DWORD attributes,
}
bool
-add_access_denied_ace (PACL acl, int offset, DWORD attributes,
- PSID sid, size_t &len_add, DWORD inherit)
+add_access_denied_ace (PACL acl, DWORD attributes, PSID sid, size_t &len_add,
+ DWORD inherit)
{
NTSTATUS status = RtlAddAccessDeniedAceEx (acl, ACL_REVISION, inherit,
attributes, sid);
@@ -495,370 +353,6 @@ add_access_denied_ace (PACL acl, int offset, DWORD attributes,
return true;
}
-static PSECURITY_DESCRIPTOR
-alloc_sd (path_conv &pc, uid_t uid, gid_t gid, int attribute,
- security_descriptor &sd_ret)
-{
- NTSTATUS status;
- BOOLEAN dummy;
- tmp_pathbuf tp;
-
- /* NOTE: If the high bit of attribute is set, we have just created
- a file or directory. See below for an explanation. */
-
- debug_printf("uid %u, gid %u, attribute %y", uid, gid, attribute);
-
- /* Get owner and group from current security descriptor. */
- PSID cur_owner_sid = NULL;
- PSID cur_group_sid = NULL;
- status = RtlGetOwnerSecurityDescriptor (sd_ret, &cur_owner_sid, &dummy);
- if (!NT_SUCCESS (status))
- debug_printf ("RtlGetOwnerSecurityDescriptor: %y", status);
- status = RtlGetGroupSecurityDescriptor (sd_ret, &cur_group_sid, &dummy);
- if (!NT_SUCCESS (status))
- debug_printf ("RtlGetGroupSecurityDescriptor: %y", status);
-
- /* Get SID of owner. */
- cygsid owner_sid;
- /* Check for current user first */
- if (uid == myself->uid)
- owner_sid = cygheap->user.sid ();
- else if (uid == ILLEGAL_UID)
- owner_sid = cur_owner_sid;
- else if (!owner_sid.getfrompw (internal_getpwuid (uid)))
- {
- set_errno (EINVAL);
- return NULL;
- }
- owner_sid.debug_print ("alloc_sd: owner SID =");
-
- /* Get SID of new group. */
- cygsid group_sid;
- /* Check for current user first */
- if (gid == myself->gid)
- group_sid = cygheap->user.groups.pgsid;
- else if (gid == ILLEGAL_GID)
- group_sid = cur_group_sid;
- else if (!group_sid.getfromgr (internal_getgrgid (gid)))
- {
- set_errno (EINVAL);
- return NULL;
- }
- group_sid.debug_print ("alloc_sd: group SID =");
-
- /* Initialize local security descriptor. */
- SECURITY_DESCRIPTOR sd;
- RtlCreateSecurityDescriptor (&sd, SECURITY_DESCRIPTOR_REVISION);
-
- /* We set the SE_DACL_PROTECTED flag here to prevent the DACL from being
- modified by inheritable ACEs. */
- RtlSetControlSecurityDescriptor (&sd, SE_DACL_PROTECTED, SE_DACL_PROTECTED);
-
- /* Create owner for local security descriptor. */
- status = RtlSetOwnerSecurityDescriptor (&sd, owner_sid, FALSE);
- if (!NT_SUCCESS (status))
- {
- __seterrno_from_nt_status (status);
- return NULL;
- }
-
- /* Create group for local security descriptor. */
- status = RtlSetGroupSecurityDescriptor (&sd, group_sid, FALSE);
- if (!NT_SUCCESS (status))
- {
- __seterrno_from_nt_status (status);
- return NULL;
- }
-
- /* Initialize local access control list. */
- PACL acl = (PACL) tp.w_get ();
- RtlCreateAcl (acl, ACL_MAXIMUM_SIZE, ACL_REVISION);
-
- /* From here fill ACL. */
- size_t acl_len = sizeof (ACL);
- int ace_off = 0;
- /* Only used for sync objects (for ttys). The admins group should
- always have the right to manipulate the ACL, so we have to make sure
- that the ACL gives the admins group STANDARD_RIGHTS_ALL access. */
- bool saw_admins = false;
-
- /* Construct allow attribute for owner.
- Don't set FILE_READ/WRITE_ATTRIBUTES unconditionally on Samba, otherwise
- it enforces read permissions. Same for other's below. */
- DWORD owner_allow = STANDARD_RIGHTS_ALL
- | (pc.fs_is_samba ()
- ? 0 : (FILE_READ_ATTRIBUTES | FILE_WRITE_ATTRIBUTES));
- if (attribute & S_IRUSR)
- owner_allow |= FILE_GENERIC_READ;
- if (attribute & S_IWUSR)
- owner_allow |= FILE_GENERIC_WRITE;
- if (attribute & S_IXUSR)
- owner_allow |= FILE_GENERIC_EXECUTE & ~FILE_READ_ATTRIBUTES;
- if (S_ISDIR (attribute)
- && (attribute & (S_IWUSR | S_IXUSR)) == (S_IWUSR | S_IXUSR))
- owner_allow |= FILE_DELETE_CHILD;
- /* For sync objects note that the owner is admin. */
- if (S_ISCHR (attribute) && owner_sid == well_known_admins_sid)
- saw_admins = true;
-
- /* Construct allow attribute for group. */
- DWORD group_allow = STANDARD_RIGHTS_READ | SYNCHRONIZE
- | (pc.fs_is_samba () ? 0 : FILE_READ_ATTRIBUTES);
- if (attribute & S_IRGRP)
- group_allow |= FILE_GENERIC_READ;
- if (attribute & S_IWGRP)
- group_allow |= FILE_GENERIC_WRITE;
- if (attribute & S_IXGRP)
- group_allow |= FILE_GENERIC_EXECUTE & ~FILE_READ_ATTRIBUTES;
- if (S_ISDIR (attribute)
- && (attribute & (S_IWGRP | S_IXGRP)) == (S_IWGRP | S_IXGRP)
- && !(attribute & S_ISVTX))
- group_allow |= FILE_DELETE_CHILD;
- /* For sync objects, add STANDARD_RIGHTS_ALL for admins group. */
- if (S_ISCHR (attribute) && group_sid == well_known_admins_sid)
- {
- group_allow |= STANDARD_RIGHTS_ALL;
- saw_admins = true;
- }
-
- /* Construct allow attribute for everyone. */
- DWORD other_allow = STANDARD_RIGHTS_READ | SYNCHRONIZE
- | (pc.fs_is_samba () ? 0 : FILE_READ_ATTRIBUTES);
- if (attribute & S_IROTH)
- other_allow |= FILE_GENERIC_READ;
- if (attribute & S_IWOTH)
- other_allow |= FILE_GENERIC_WRITE;
- if (attribute & S_IXOTH)
- other_allow |= FILE_GENERIC_EXECUTE & ~FILE_READ_ATTRIBUTES;
- if (S_ISDIR (attribute)
- && (attribute & (S_IWOTH | S_IXOTH)) == (S_IWOTH | S_IXOTH)
- && !(attribute & S_ISVTX))
- other_allow |= FILE_DELETE_CHILD;
-
- /* Construct SUID, SGID and VTX bits in NULL ACE. */
- DWORD null_allow = 0L;
- if (attribute & (S_ISUID | S_ISGID | S_ISVTX))
- {
- if (attribute & S_ISUID)
- null_allow |= FILE_APPEND_DATA;
- if (attribute & S_ISGID)
- null_allow |= FILE_WRITE_DATA;
- if (attribute & S_ISVTX)
- null_allow |= FILE_READ_DATA;
- }
-
- /* Add owner and group permissions if SIDs are equal
- and construct deny attributes for group and owner. */
- bool isownergroup;
- if ((isownergroup = (owner_sid == group_sid)))
- owner_allow |= group_allow;
-
- DWORD owner_deny = ~owner_allow & (group_allow | other_allow);
- owner_deny &= ~(STANDARD_RIGHTS_READ
- | FILE_READ_ATTRIBUTES | FILE_WRITE_ATTRIBUTES);
-
- DWORD group_deny = ~group_allow & other_allow;
- group_deny &= ~(STANDARD_RIGHTS_READ | FILE_READ_ATTRIBUTES);
-
- /* Set deny ACE for owner. */
- if (owner_deny
- && !add_access_denied_ace (acl, ace_off++, owner_deny,
- owner_sid, acl_len, NO_INHERITANCE))
- return NULL;
- /* Set deny ACE for group here to respect the canonical order,
- if this does not impact owner */
- if (group_deny && !(group_deny & owner_allow) && !isownergroup
- && !add_access_denied_ace (acl, ace_off++, group_deny,
- group_sid, acl_len, NO_INHERITANCE))
- return NULL;
- /* Set allow ACE for owner. */
- if (!add_access_allowed_ace (acl, ace_off++, owner_allow,
- owner_sid, acl_len, NO_INHERITANCE))
- return NULL;
- /* Set deny ACE for group, if still needed. */
- if (group_deny & owner_allow && !isownergroup
- && !add_access_denied_ace (acl, ace_off++, group_deny,
- group_sid, acl_len, NO_INHERITANCE))
- return NULL;
- /* Set allow ACE for group. */
- if (!isownergroup
- && !add_access_allowed_ace (acl, ace_off++, group_allow,
- group_sid, acl_len, NO_INHERITANCE))
- return NULL;
-
- /* For sync objects, if we didn't see the admins group so far, add entry
- with STANDARD_RIGHTS_ALL access. */
- if (S_ISCHR (attribute) && !saw_admins)
- {
- if (!add_access_allowed_ace (acl, ace_off++, STANDARD_RIGHTS_ALL,
- well_known_admins_sid, acl_len,
- NO_INHERITANCE))
- return NULL;
- saw_admins = true;
- }
-
- /* Set allow ACE for everyone. */
- if (!add_access_allowed_ace (acl, ace_off++, other_allow,
- well_known_world_sid, acl_len, NO_INHERITANCE))
- return NULL;
- /* Set null ACE for special bits. */
- if (null_allow
- && !add_access_allowed_ace (acl, ace_off++, null_allow,
- well_known_null_sid, acl_len, NO_INHERITANCE))
- return NULL;
-
- /* Fill ACL with unrelated ACEs from current security descriptor. */
- PACL oacl;
- BOOLEAN acl_exists = FALSE;
- ACCESS_ALLOWED_ACE *ace;
-
- status = RtlGetDaclSecurityDescriptor (sd_ret, &acl_exists, &oacl, &dummy);
- if (NT_SUCCESS (status) && acl_exists && oacl)
- for (DWORD i = 0; i < oacl->AceCount; ++i)
- if (NT_SUCCESS (RtlGetAce (oacl, i, (PVOID *) &ace)))
- {
- cygpsid ace_sid ((PSID) &ace->SidStart);
-
- /* Always skip NULL SID as well as admins SID on virtual device files
- in /proc/sys. */
- if (ace_sid == well_known_null_sid
- || (S_ISCHR (attribute) && ace_sid == well_known_admins_sid))
- continue;
- /* Check for ACEs which are always created in the preceding code
- and check for the default inheritence ACEs which will be created
- for just created directories. Skip them for just created
- directories or if they are not inherited. If they are inherited,
- make sure they are *only* inherited, so they don't collide with
- the permissions set in this function. */
- if ((ace_sid == cur_owner_sid)
- || (ace_sid == owner_sid)
- || (ace_sid == cur_group_sid)
- || (ace_sid == group_sid)
- || (ace_sid == well_known_creator_owner_sid)
- || (ace_sid == well_known_creator_group_sid)
- || (ace_sid == well_known_world_sid))
- {
- if ((S_ISDIR (attribute) && (attribute & S_JUSTCREATED))
- || (ace->Header.AceFlags
- & (CONTAINER_INHERIT_ACE | OBJECT_INHERIT_ACE)) == 0)
- continue;
- else
- ace->Header.AceFlags |= INHERIT_ONLY_ACE;
- }
- if (attribute & S_JUSTCREATED)
- {
- /* Since files and dirs are created with a NULL descriptor,
- inheritence rules kick in. If no inheritable entries exist
- in the parent object, Windows will create entries from the
- user token's default DACL in the file DACL. These entries
- are not desired and we drop them silently. */
- if (!(ace->Header.AceFlags & INHERITED_ACE))
- continue;
- /* Remove the INHERITED_ACE flag since on POSIX systems
- inheritance is settled when the file has been created.
- This also avoids error messages in Windows Explorer when
- opening a file's security tab. Explorer complains if
- inheritable ACEs are preceding non-inheritable ACEs. */
- ace->Header.AceFlags &= ~INHERITED_ACE;
- }
- /*
- * Add unrelated ACCESS_DENIED_ACE to the beginning but
- * behind the owner_deny, ACCESS_ALLOWED_ACE to the end.
- * FIXME: this would break the order of the inherit-only ACEs
- */
- status = RtlAddAce (acl, ACL_REVISION,
- ace->Header.AceType == ACCESS_DENIED_ACE_TYPE
- ? (owner_deny ? 1 : 0) : MAXDWORD,
- (LPVOID) ace, ace->Header.AceSize);
- if (!NT_SUCCESS (status))
- {
- __seterrno_from_nt_status (status);
- return NULL;
- }
- ace_off++;
- acl_len += ace->Header.AceSize;
- }
-
- /* Construct appropriate inherit attribute for new directories. Keep in
- mind that we do this only for the sake of non-Cygwin applications.
- Cygwin applications don't need this. */
- if (S_ISDIR (attribute) && (attribute & S_JUSTCREATED))
- {
- const DWORD inherit = CONTAINER_INHERIT_ACE | OBJECT_INHERIT_ACE
- | INHERIT_ONLY_ACE;
-#if 0 /* FIXME: Not done currently as this breaks the canonical order */
- /* Set deny ACE for owner. */
- if (owner_deny
- && !add_access_denied_ace (acl, ace_off++, owner_deny,
- well_known_creator_owner_sid, acl_len, inherit))
- return NULL;
- /* Set deny ACE for group here to respect the canonical order,
- if this does not impact owner */
- if (group_deny && !(group_deny & owner_allow)
- && !add_access_denied_ace (acl, ace_off++, group_deny,
- well_known_creator_group_sid, acl_len, inherit))
- return NULL;
-#endif
- /* Set allow ACE for owner. */
- if (!add_access_allowed_ace (acl, ace_off++, owner_allow,
- well_known_creator_owner_sid, acl_len,
- inherit))
- return NULL;
-#if 0 /* FIXME: Not done currently as this breaks the canonical order and
- won't be preserved on chown and chmod */
- /* Set deny ACE for group, conflicting with owner_allow. */
- if (group_deny & owner_allow
- && !add_access_denied_ace (acl, ace_off++, group_deny,
- well_known_creator_group_sid, acl_len, inherit))
- return NULL;
-#endif
- /* Set allow ACE for group. */
- if (!add_access_allowed_ace (acl, ace_off++, group_allow,
- well_known_creator_group_sid, acl_len,
- inherit))
- return NULL;
- /* Set allow ACE for everyone. */
- if (!add_access_allowed_ace (acl, ace_off++, other_allow,
- well_known_world_sid, acl_len, inherit))
- return NULL;
- }
-
- /* Set AclSize to computed value. */
- acl->AclSize = acl_len;
- debug_printf ("ACL-Size: %d", acl_len);
-
- /* Create DACL for local security descriptor. */
- status = RtlSetDaclSecurityDescriptor (&sd, TRUE, acl, FALSE);
- if (!NT_SUCCESS (status))
- {
- __seterrno_from_nt_status (status);
- return NULL;
- }
-
- /* Make self relative security descriptor. */
- DWORD sd_size = 0;
- RtlAbsoluteToSelfRelativeSD (&sd, sd_ret, &sd_size);
- if (sd_size <= 0)
- {
- __seterrno ();
- return NULL;
- }
- if (!sd_ret.malloc (sd_size))
- {
- set_errno (ENOMEM);
- return NULL;
- }
- status = RtlAbsoluteToSelfRelativeSD (&sd, sd_ret, &sd_size);
- if (!NT_SUCCESS (status))
- {
- __seterrno_from_nt_status (status);
- return NULL;
- }
- debug_printf ("Created SD-Size: %u", sd_ret.size ());
-
- return sd_ret;
-}
-
void
set_security_attribute (path_conv &pc, int attribute, PSECURITY_ATTRIBUTES psa,
security_descriptor &sd)
@@ -866,8 +360,9 @@ set_security_attribute (path_conv &pc, int attribute, PSECURITY_ATTRIBUTES psa,
psa->lpSecurityDescriptor = sd.malloc (SECURITY_DESCRIPTOR_MIN_LENGTH);
RtlCreateSecurityDescriptor ((PSECURITY_DESCRIPTOR) psa->lpSecurityDescriptor,
SECURITY_DESCRIPTOR_REVISION);
- psa->lpSecurityDescriptor = alloc_sd (pc, geteuid32 (), getegid32 (),
- attribute, sd);
+ psa->lpSecurityDescriptor = set_posix_access (attribute, geteuid32 (),
+ getegid32 (), NULL, 0,
+ sd, false);
}
int
@@ -906,19 +401,16 @@ get_object_attribute (HANDLE handle, uid_t *uidret, gid_t *gidret,
if (get_object_sd (handle, sd))
return -1;
- get_info_from_sd (sd, attribute, uidret, gidret);
- return 0;
+ return get_posix_access (sd, attribute, uidret, gidret, NULL, 0)
+ >= 0 ? 0 : -1;
}
int
-create_object_sd_from_attribute (HANDLE handle, uid_t uid, gid_t gid,
- mode_t attribute, security_descriptor &sd)
+create_object_sd_from_attribute (uid_t uid, gid_t gid, mode_t attribute,
+ security_descriptor &sd)
{
- path_conv pc;
- if ((handle && get_object_sd (handle, sd))
- || !alloc_sd (pc, uid, gid, attribute, sd))
- return -1;
- return 0;
+ return set_posix_access (attribute, uid, gid, NULL, 0, sd, false)
+ ? 0 : -1;
}
int
@@ -936,36 +428,95 @@ set_object_sd (HANDLE handle, security_descriptor &sd, bool chown)
}
int
-set_object_attribute (HANDLE handle, uid_t uid, gid_t gid,
- mode_t attribute)
+set_object_attribute (HANDLE handle, uid_t uid, gid_t gid, mode_t attribute)
{
security_descriptor sd;
- if (create_object_sd_from_attribute (handle, uid, gid, attribute, sd)
+ if (create_object_sd_from_attribute (uid, gid, attribute, sd)
|| set_object_sd (handle, sd, uid != ILLEGAL_UID || gid != ILLEGAL_GID))
return -1;
return 0;
}
int
-set_file_attribute (HANDLE handle, path_conv &pc,
- uid_t uid, gid_t gid, mode_t attribute)
+set_created_file_access (HANDLE handle, path_conv &pc, mode_t attr)
{
int ret = -1;
-
- if (pc.has_acls ())
- {
- security_descriptor sd;
-
- if (!get_file_sd (handle, pc, sd, (bool)(attribute & S_JUSTCREATED))
- && alloc_sd (pc, uid, gid, attribute, sd))
- ret = set_file_sd (handle, pc, sd,
- uid != ILLEGAL_UID || gid != ILLEGAL_GID);
+ security_descriptor sd, sd_ret;
+ mode_t attr_rd;
+ uid_t uid;
+ gid_t gid;
+ tmp_pathbuf tp;
+ aclent_t *aclp;
+ int nentries, idx;
+
+ if (!get_file_sd (handle, pc, sd, true))
+ {
+ attr |= S_JUSTCREATED;
+ if (pc.isdir ())
+ attr |= S_IFDIR;
+ attr_rd = attr;
+ aclp = (aclent_t *) tp.c_get ();
+ if ((nentries = get_posix_access (sd, &attr_rd, &uid, &gid,
+ aclp, MAX_ACL_ENTRIES)) >= 0)
+ {
+ if (S_ISLNK (attr))
+ {
+ /* Symlinks always get the request POSIX perms. */
+ aclp[0].a_perm = (attr >> 6) & S_IRWXO;
+ if ((idx = searchace (aclp, nentries, GROUP_OBJ)) >= 0)
+ aclp[idx].a_perm = (attr >> 3) & S_IRWXO;
+ if (nentries > MIN_ACL_ENTRIES
+ && (idx = searchace (aclp, nentries, CLASS_OBJ)) >= 0)
+ aclp[idx].a_perm = (attr >> 3) & S_IRWXO;
+ if ((idx = searchace (aclp, nentries, OTHER_OBJ)) >= 0)
+ aclp[idx].a_perm = attr & S_IRWXO;
+ }
+ else
+ {
+ /* Overwrite ACL permissions as required by POSIX 1003.1e
+ draft 17. */
+ aclp[0].a_perm &= (attr >> 6) & S_IRWXO;
+ if (nentries > MIN_ACL_ENTRIES
+ && (idx = searchace (aclp, nentries, CLASS_OBJ)) >= 0)
+ aclp[idx].a_perm &= (attr >> 3) & S_IRWXO;
+ else if ((idx = searchace (aclp, nentries, GROUP_OBJ)) >= 0)
+ aclp[idx].a_perm &= (attr >> 3) & S_IRWXO;
+ if ((idx = searchace (aclp, nentries, OTHER_OBJ)) >= 0)
+ aclp[idx].a_perm &= attr & S_IRWXO;
+ }
+ /* Construct appropriate inherit attribute for new directories.
+ Basically we do this only for the sake of non-Cygwin applications.
+ Cygwin applications don't need these. Additionally, if the
+ S_ISGID bit is set, propagate it. */
+ if (S_ISDIR (attr))
+ {
+ if (searchace (aclp, nentries, DEF_USER_OBJ) < 0)
+ {
+ aclp[nentries].a_type = DEF_USER_OBJ;
+ aclp[nentries].a_id = ILLEGAL_UID;
+ aclp[nentries++].a_perm = (attr >> 6) & S_IRWXO;
+ }
+ if (searchace (aclp, nentries, DEF_GROUP_OBJ) < 0)
+ {
+ aclp[nentries].a_type = DEF_GROUP_OBJ;
+ aclp[nentries].a_id = ILLEGAL_GID;
+ aclp[nentries++].a_perm = (attr >> 3) & S_IRWXO;
+ }
+ if (searchace (aclp, nentries, DEF_OTHER_OBJ) < 0)
+ {
+ aclp[nentries].a_type = DEF_OTHER_OBJ;
+ aclp[nentries].a_id = ILLEGAL_UID;
+ aclp[nentries++].a_perm = attr & S_IRWXO;
+ }
+ if (attr_rd & S_ISGID)
+ attr |= S_ISGID;
+ }
+ if (set_posix_access (attr, uid, gid, aclp, nentries, sd_ret,
+ pc.fs_is_samba ()))
+ ret = set_file_sd (handle, pc, sd_ret, attr_rd & S_ISGID);
+ }
}
- else
- ret = 0;
- syscall_printf ("%d = set_file_attribute(%S, %d, %d, %y)",
- ret, pc.get_nt_native_path (), uid, gid, attribute);
return ret;
}
@@ -1047,6 +598,95 @@ check_access (security_descriptor &sd, GENERIC_MAPPING &mapping,
return ret;
}
+/* Samba override. Check security descriptor for Samba UNIX user and group
+ accounts and check if we have an RFC 2307 mapping to a Windows account.
+ Create a new security descriptor with all of the UNIX accounts with
+ valid mapping replaced with their Windows counterpart. */
+static void
+convert_samba_sd (security_descriptor &sd_ret)
+{
+ NTSTATUS status;
+ BOOLEAN dummy;
+ PSID sid;
+ cygsid owner;
+ cygsid group;
+ SECURITY_DESCRIPTOR sd;
+ cyg_ldap cldap;
+ tmp_pathbuf tp;
+ PACL acl, oacl;
+ size_t acl_len;
+ PACCESS_ALLOWED_ACE ace;
+
+ if (!NT_SUCCESS (RtlGetOwnerSecurityDescriptor (sd_ret, &sid, &dummy)))
+ return;
+ owner = sid;
+ if (!NT_SUCCESS (RtlGetGroupSecurityDescriptor (sd_ret, &sid, &dummy)))
+ return;
+ group = sid;
+
+ if (sid_id_auth (owner) == 22)
+ {
+ struct passwd *pwd;
+ uid_t uid = owner.get_uid (&cldap);
+ if (uid < UNIX_POSIX_OFFSET && (pwd = internal_getpwuid (uid)))
+ owner.getfrompw (pwd);
+ }
+ if (sid_id_auth (group) == 22)
+ {
+ struct group *grp;
+ gid_t gid = group.get_gid (&cldap);
+ if (gid < UNIX_POSIX_OFFSET && (grp = internal_getgrgid (gid)))
+ group.getfromgr (grp);
+ }
+
+ if (!NT_SUCCESS (RtlGetDaclSecurityDescriptor (sd_ret, &dummy,
+ &oacl, &dummy)))
+ return;
+ acl = (PACL) tp.w_get ();
+ RtlCreateAcl (acl, ACL_MAXIMUM_SIZE, ACL_REVISION);
+ acl_len = sizeof (ACL);
+
+ for (DWORD i = 0; i < oacl->AceCount; ++i)
+ if (NT_SUCCESS (RtlGetAce (oacl, i, (PVOID *) &ace)))
+ {
+ cygsid ace_sid ((PSID) &ace->SidStart);
+ if (sid_id_auth (ace_sid) == 22)
+ {
+ if (sid_sub_auth (ace_sid, 0) == 1) /* user */
+ {
+ struct passwd *pwd;
+ uid_t uid = ace_sid.get_uid (&cldap);
+ if (uid < UNIX_POSIX_OFFSET && (pwd = internal_getpwuid (uid)))
+ ace_sid.getfrompw (pwd);
+ }
+ else if (sid_sub_auth (ace_sid, 0) == 2) /* group */
+ {
+ struct group *grp;
+ gid_t gid = ace_sid.get_gid (&cldap);
+ if (gid < UNIX_POSIX_OFFSET && (grp = internal_getgrgid (gid)))
+ ace_sid.getfromgr (grp);
+ }
+ }
+ if (!add_access_allowed_ace (acl, ace->Mask, ace_sid, acl_len,
+ ace->Header.AceFlags))
+ return;
+ }
+ acl->AclSize = acl_len;
+
+ RtlCreateSecurityDescriptor (&sd, SECURITY_DESCRIPTOR_REVISION);
+ RtlSetControlSecurityDescriptor (&sd, SE_DACL_PROTECTED, SE_DACL_PROTECTED);
+ RtlSetOwnerSecurityDescriptor (&sd, owner, FALSE);
+ RtlSetGroupSecurityDescriptor (&sd, group, FALSE);
+
+ status = RtlSetDaclSecurityDescriptor (&sd, TRUE, acl, FALSE);
+ if (!NT_SUCCESS (status))
+ return;
+ DWORD sd_size = 0;
+ status = RtlAbsoluteToSelfRelativeSD (&sd, sd_ret, &sd_size);
+ if (sd_size > 0 && sd_ret.malloc (sd_size))
+ RtlAbsoluteToSelfRelativeSD (&sd, sd_ret, &sd_size);
+}
+
int
check_file_access (path_conv &pc, int flags, bool effective)
{
@@ -1060,7 +700,12 @@ check_file_access (path_conv &pc, int flags, bool effective)
if (flags & X_OK)
desired |= FILE_EXECUTE;
if (!get_file_sd (pc.handle (), pc, sd, false))
- ret = check_access (sd, file_mapping, desired, flags, effective);
+ {
+ /* Tweak Samba security descriptor as necessary. */
+ if (pc.fs_is_samba ())
+ convert_samba_sd (sd);
+ ret = check_access (sd, file_mapping, desired, flags, effective);
+ }
debug_printf ("flags %y, ret %d", flags, ret);
return ret;
}
diff --git a/winsup/cygwin/security.h b/winsup/cygwin/security.h
index ca0239b69..f61cfca1e 100644
--- a/winsup/cygwin/security.h
+++ b/winsup/cygwin/security.h
@@ -1,8 +1,5 @@
/* security.h: security declarations
- Copyright 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
- 2011, 2012, 2013 Red Hat, Inc.
-
This file is part of Cygwin.
This software is a copyrighted work licensed under the terms of the
@@ -12,18 +9,51 @@ details. */
#pragma once
#include <accctrl.h>
+#include <dsgetdc.h>
/* Special file attribute set, for instance, in open() and mkdir() to
flag that a file has just been created. Used in alloc_sd, see there. */
#define S_JUSTCREATED 0x80000000
-#define DEFAULT_UID DOMAIN_USER_RID_ADMIN
-#define UNKNOWN_UID 400 /* Non conflicting number */
-#define UNKNOWN_GID 401
+/* UID/GID */
+void uinfo_init ();
+
+#define ILLEGAL_UID ((uid_t)-1)
+#define ILLEGAL_GID ((gid_t)-1)
+
+/* Offset for accounts in the primary domain of the machine. */
+#define PRIMARY_POSIX_OFFSET (0x00100000)
+
+/* Fake POSIX offsets used in scenarios in which the account has no permission
+ to fetch the POSIX offset, or when the admins have set the offset to an
+ unreasonable low value. The values are chosen in the hope that they won't
+ collide with "real" offsets. */
+#define NOACCESS_POSIX_OFFSET (0xfe500000)
+#define UNUSABLE_POSIX_OFFSET (0xfea00000)
+
+/* For UNIX accounts not mapped to Windows accounts via winbind, Samba returns
+ SIDs of the form S-1-22-x-y, with x == 1 for users and x == 2 for groups,
+ and y == UNIX uid/gid. NFS returns no SIDs at all, but the plain UNIX
+ uid/gid values.
+
+ UNIX uid/gid values are mapped to Cygwin uid/gid values 0xff000000 +
+ unix uid/gid. This *might* collide with a posix_offset of some trusted
+ domain, but it's *very* unlikely. Define the mapping as macro. */
+#define UNIX_POSIX_OFFSET (0xff000000)
+#define UNIX_POSIX_MASK (0x00ffffff)
+#define MAP_UNIX_TO_CYGWIN_ID(id) (UNIX_POSIX_OFFSET \
+ | ((id) & UNIX_POSIX_MASK))
+
+#ifndef __x86_64__
+#define ILLEGAL_UID16 ((__uid16_t)-1)
+#define ILLEGAL_GID16 ((__gid16_t)-1)
+#define uid16touid32(u16) ((u16)==ILLEGAL_UID16?ILLEGAL_UID:(uid_t)(u16))
+#define gid16togid32(g16) ((g16)==ILLEGAL_GID16?ILLEGAL_GID:(gid_t)(g16))
+#endif
-#define MAX_SID_LEN 40
#define MAX_DACL_LEN(n) (sizeof (ACL) \
- + (n) * (sizeof (ACCESS_ALLOWED_ACE) - sizeof (DWORD) + MAX_SID_LEN))
+ + (n) * (sizeof (ACCESS_ALLOWED_ACE) - sizeof (DWORD) \
+ + SECURITY_MAX_SID_SIZE))
#define SD_MIN_SIZE (sizeof (SECURITY_DESCRIPTOR) + MAX_DACL_LEN (1))
#define ACL_MAXIMUM_SIZE 65532 /* Yeah, right. 64K - sizeof (DWORD). */
#define SD_MAXIMUM_SIZE 65536
@@ -75,7 +105,7 @@ typedef struct {
BYTE Revision;
BYTE SubAuthorityCount;
SID_IDENTIFIER_AUTHORITY IdentifierAuthority;
- DWORD SubAuthority[8];
+ DWORD SubAuthority[SID_MAX_SUB_AUTHORITIES];
} DBGSID, *PDBGSID;
/* Macro to define variable length SID structures */
@@ -92,6 +122,16 @@ cygpsid NO_COPY name = (PSID) &name##_struct;
#define FILE_WRITE_BITS (FILE_WRITE_DATA | GENERIC_WRITE | GENERIC_ALL)
#define FILE_EXEC_BITS (FILE_EXECUTE | GENERIC_EXECUTE | GENERIC_ALL)
+/* Convenience macros. The Windows SID access functions are crude. */
+#define sid_id_auth(s) \
+ (RtlIdentifierAuthoritySid (s)->Value[5])
+#define sid_sub_auth_count(s) \
+ (*RtlSubAuthorityCountSid ((s)))
+#define sid_sub_auth(s,i) \
+ (*RtlSubAuthoritySid ((s),(i)))
+#define sid_sub_auth_rid(s) \
+ (*RtlSubAuthoritySid ((s), (*RtlSubAuthorityCountSid ((s)) - 1)))
+
#ifdef __cplusplus
extern "C"
{
@@ -104,6 +144,8 @@ extern "C"
}
#endif
+class cyg_ldap;
+
class cygpsid {
protected:
PSID psid;
@@ -112,11 +154,13 @@ public:
cygpsid (PSID nsid) { psid = nsid; }
operator PSID () const { return psid; }
const PSID operator= (PSID nsid) { return psid = nsid;}
- uid_t get_id (BOOL search_grp, int *type = NULL);
- int get_uid () { return get_id (FALSE); }
- int get_gid () { return get_id (TRUE); }
+ uid_t get_id (BOOL search_grp, int *type, cyg_ldap *pldap);
+ int get_uid (cyg_ldap *pldap) { return get_id (FALSE, NULL, pldap); }
+ int get_gid (cyg_ldap *pldap) { return get_id (TRUE, NULL, pldap); }
+ PWCHAR pstring (PWCHAR nsidstr) const;
PWCHAR string (PWCHAR nsidstr) const;
+ char *pstring (char *nsidstr) const;
char *string (char *nsidstr) const;
bool operator== (const PSID nsid) const
@@ -139,9 +183,10 @@ public:
};
class cygsid : public cygpsid {
- char sbuf[MAX_SID_LEN];
+ char sbuf[SECURITY_MAX_SID_SIZE];
bool well_known_sid;
+ const PSID getfromstr (PCWSTR nsidstr, bool well_known);
const PSID getfromstr (const char *nsidstr, bool well_known);
PSID get_sid (DWORD s, DWORD cnt, DWORD *r, bool well_known);
@@ -152,7 +197,7 @@ class cygsid : public cygpsid {
else
{
psid = (PSID) sbuf;
- RtlCopySid (MAX_SID_LEN, psid, nsid);
+ RtlCopySid (SECURITY_MAX_SID_SIZE, psid, nsid);
well_known_sid = well_known;
}
return psid;
@@ -169,21 +214,41 @@ public:
{ return assign (nsid, nsid.well_known_sid); }
inline const PSID operator= (const PSID nsid)
{ return assign (nsid, false); }
+ inline const PSID operator= (PCWSTR nsidstr)
+ { return getfromstr (nsidstr, false); }
inline const PSID operator= (const char *nsidstr)
{ return getfromstr (nsidstr, false); }
inline const PSID operator*= (cygsid &nsid)
{ return assign (nsid, true); }
inline const PSID operator*= (const PSID nsid)
{ return assign (nsid, true); }
+ inline const PSID operator*= (PCWSTR nsidstr)
+ { return getfromstr (nsidstr, true); }
inline const PSID operator*= (const char *nsidstr)
{ return getfromstr (nsidstr, true); }
inline cygsid () : cygpsid ((PSID) sbuf), well_known_sid (false) {}
inline cygsid (const PSID nsid) { *this = nsid; }
inline cygsid (const char *nstrsid) { *this = nstrsid; }
+ inline cygsid (cygsid &nsid) { *this = nsid; }
inline PSID set () { return psid = (PSID) sbuf; }
+ inline BOOL getfrompw_gecos (const struct passwd *pw)
+ {
+ char *sp = (pw && pw->pw_gecos) ? strrchr (pw->pw_gecos, ',') : NULL;
+ return (*this = sp ? sp + 1 : sp) != NO_SID;
+ }
+ inline BOOL getfromgr_passwd (const struct group *gr)
+ {
+ char *sp = (gr && gr->gr_passwd) ? gr->gr_passwd : NULL;
+ return (*this = sp) != NO_SID;
+ }
+
+ const PSID create (DWORD auth, DWORD subauth_cnt, ...);
+ bool append (DWORD rid);
+
+ /* Implemented in pwdgrp.h. */
BOOL getfrompw (const struct passwd *pw);
BOOL getfromgr (const struct group *gr);
@@ -341,9 +406,12 @@ extern cygpsid well_known_service_sid;
extern cygpsid well_known_authenticated_users_sid;
extern cygpsid well_known_this_org_sid;
extern cygpsid well_known_system_sid;
+extern cygpsid well_known_local_service_sid;
+extern cygpsid well_known_network_service_sid;
extern cygpsid well_known_builtin_sid;
extern cygpsid well_known_admins_sid;
extern cygpsid well_known_users_sid;
+extern cygpsid trusted_installer_sid;
extern cygpsid mandatory_medium_integrity_sid;
extern cygpsid mandatory_high_integrity_sid;
extern cygpsid mandatory_system_integrity_sid;
@@ -368,20 +436,19 @@ class path_conv;
/* File manipulation */
int __reg3 get_file_attribute (HANDLE, path_conv &, mode_t *,
uid_t *, gid_t *);
-int __reg3 set_file_attribute (HANDLE, path_conv &,
- uid_t, gid_t, mode_t);
+int __reg3 set_created_file_access (HANDLE, path_conv &, mode_t);
int __reg2 get_object_sd (HANDLE, security_descriptor &);
int __reg3 get_object_attribute (HANDLE, uid_t *, gid_t *, mode_t *);
int __reg3 set_object_attribute (HANDLE, uid_t, gid_t, mode_t);
-int __reg3 create_object_sd_from_attribute (HANDLE, uid_t, gid_t,
- mode_t, security_descriptor &);
+int __reg3 create_object_sd_from_attribute (uid_t, gid_t, mode_t,
+ security_descriptor &);
int __reg3 set_object_sd (HANDLE, security_descriptor &, bool);
int __reg3 get_reg_attribute (HKEY hkey, mode_t *, uid_t *, gid_t *);
LONG __reg3 get_file_sd (HANDLE fh, path_conv &, security_descriptor &, bool);
LONG __reg3 set_file_sd (HANDLE fh, path_conv &, security_descriptor &, bool);
-bool __reg3 add_access_allowed_ace (PACL, int, DWORD, PSID, size_t &, DWORD);
-bool __reg3 add_access_denied_ace (PACL, int, DWORD, PSID, size_t &, DWORD);
+bool __reg3 add_access_allowed_ace (PACL, DWORD, PSID, size_t &, DWORD);
+bool __reg3 add_access_denied_ace (PACL, DWORD, PSID, size_t &, DWORD);
int __reg3 check_file_access (path_conv &, int, bool);
int __reg3 check_registry_access (HANDLE, int, bool);
@@ -389,34 +456,47 @@ void set_security_attribute (path_conv &pc, int attribute,
PSECURITY_ATTRIBUTES psa,
security_descriptor &sd_buf);
-bool get_sids_info (cygpsid, cygpsid, uid_t * , gid_t *);
+bool authz_get_user_attribute (mode_t *attribute, PSECURITY_DESCRIPTOR psd,
+ PSID user_sid);
/* sec_acl.cc */
struct acl;
extern "C" int aclsort32 (int, int, struct acl *);
extern "C" int acl32 (const char *, int, int, struct acl *);
+int searchace (struct acl *, int, int, uid_t id = ILLEGAL_UID);
+PSECURITY_DESCRIPTOR set_posix_access (mode_t, uid_t, gid_t, struct acl *, int,
+ security_descriptor &, bool);
+int get_posix_access (PSECURITY_DESCRIPTOR, mode_t *, uid_t *, gid_t *,
+ struct acl *, int, bool * = NULL);
int getacl (HANDLE, path_conv &, int, struct acl *);
int setacl (HANDLE, path_conv &, int, struct acl *, bool &);
/* Set impersonation or restricted token. */
void set_imp_token (HANDLE token, int type);
/* Function creating a token by calling NtCreateToken. */
-HANDLE create_token (cygsid &usersid, user_groups &groups, struct passwd * pw);
+HANDLE create_token (cygsid &usersid, user_groups &groups);
/* LSA authentication function. */
-HANDLE lsaauth (cygsid &, user_groups &, struct passwd *);
+HANDLE lsaauth (cygsid &, user_groups &);
/* LSA private key storage authentication, same as when using service logons. */
HANDLE lsaprivkeyauth (struct passwd *pw);
/* Verify an existing token */
bool verify_token (HANDLE token, cygsid &usersid, user_groups &groups, bool *pintern = NULL);
/* Get groups of a user */
-bool get_server_groups (cygsidlist &grp_list, PSID usersid, struct passwd *pw);
+bool get_server_groups (cygsidlist &grp_list, PSID usersid);
/* Extract U-domain\user field from passwd entry. */
void extract_nt_dom_user (const struct passwd *pw, PWCHAR domain, PWCHAR user);
/* Get default logonserver for a domain. */
-bool get_logon_server (PWCHAR domain, PWCHAR wserver, bool rediscovery);
+bool get_logon_server (PCWSTR domain, PWCHAR wserver, ULONG flags);
+
+/* Fetch user profile path from registry, if it already exists. */
+PWCHAR get_user_profile_directory (PCWSTR sidstr, PWCHAR path, SIZE_T path_len);
+
+/* Load user profile if it's not already loaded. */
+HANDLE load_user_profile (HANDLE token, struct passwd *pw, cygpsid &sid);
-HANDLE open_local_policy (ACCESS_MASK access);
+HANDLE lsa_open_policy (PWCHAR server, ACCESS_MASK access);
+void lsa_close_policy (HANDLE lsa);
/* sec_helper.cc: Security helper functions. */
int set_privilege (HANDLE token, DWORD privilege, bool enable);
diff --git a/winsup/cygwin/security.sgml b/winsup/cygwin/security.sgml
deleted file mode 100644
index b286ef540..000000000
--- a/winsup/cygwin/security.sgml
+++ /dev/null
@@ -1,45 +0,0 @@
-<sect1 id="func-cygwin-logon_user">
-<title>cygwin_logon_user</title>
-
-<funcsynopsis><funcprototype>
-<funcdef>extern "C" HANDLE
-<function>cygwin_logon_user</function></funcdef>
-<paramdef>const struct passwd *<parameter>passwd_entry</parameter></paramdef>
-<paramdef>const char *<parameter>password</parameter></paramdef>
-</funcprototype></funcsynopsis>
-
-<para>Given a pointer ot a passwd entry of a user and a cleartext password,
-returns a HANDLE to an impersonation token for this user which can be used
-in a subsequent call to <function>cygwin_set_impersonation_token</function>
-to impersonate that user. This function can only be called from a process
-which has the required NT user rights to perform a logon.</para>
-
-<para>See also the chapter "New setuid concept" in the Cygwin user's guide.
-</para>
-
-<para>See also <link linkend="func-cygwin-set-impersonation-token">cygwin_set_impersonation_token</link></para>
-
-</sect1>
-
-<sect1 id="func-cygwin-set-impersonation-token">
-<title>cygwin_set_impersonation_token</title>
-
-<funcsynopsis><funcprototype>
-<funcdef>extern "C" void
-<function>cygwin_set_impersonation_token</function></funcdef>
-<paramdef>const HANDLE <parameter>token</parameter></paramdef>
-</funcprototype></funcsynopsis>
-
-<para>Use this function to enable the token given as parameter as
-impersonation token for the next call to <function>setuid</function> or
-<function>seteuid</function>. Use
-<function>cygwin_set_impersonation_token</function> together with
-<function>cygwin_logon_user</function> to impersonate users using
-password authentication.</para>
-
-<para>See also the chapter "New setuid concept" in the Cygwin user's guide.
-</para>
-
-<para>See also <link linkend="func-cygwin-logon_user">cygwin_logon_user</link></para>
-
-</sect1>
diff --git a/winsup/cygwin/select.cc b/winsup/cygwin/select.cc
index ab6517cbf..217544e2a 100644
--- a/winsup/cygwin/select.cc
+++ b/winsup/cygwin/select.cc
@@ -1,8 +1,5 @@
/* select.cc
- Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008, 2009, 2010, 2011, 2012, 2013 Red Hat, Inc.
-
This file is part of Cygwin.
This software is a copyrighted work licensed under the terms of the
@@ -19,8 +16,6 @@ details. */
#include <sys/param.h>
#include "ntdll.h"
-#include <wingdi.h>
-#include <winuser.h>
#define USE_SYS_TYPES_FD_SET
#include <winsock2.h>
#include <netdb.h>
@@ -34,7 +29,6 @@ details. */
#include "pinfo.h"
#include "sigproc.h"
#include "cygtls.h"
-#include "cygwait.h"
/*
* All these defines below should be in sys/types.h
@@ -79,51 +73,76 @@ details. */
(fd_set *) __res; \
})
-#define copyfd_set(to, from, n) memcpy (to, from, sizeof_fd_set (n));
-
#define set_handle_or_return_if_not_open(h, s) \
- h = (s)->fh->get_handle (); \
+ h = (s)->fh->get_io_handle_cyg (); \
if (cygheap->fdtab.not_open ((s)->fd)) \
{ \
(s)->thread_errno = EBADF; \
return -1; \
}
-static int select (int, fd_set *, fd_set *, fd_set *, DWORD);
+static int select (int, fd_set *, fd_set *, fd_set *, LONGLONG);
/* The main select code. */
extern "C" int
-cygwin_select (int maxfds, fd_set *readfds, fd_set *writefds, fd_set *exceptfds,
- struct timeval *to)
+pselect (int maxfds, fd_set *readfds, fd_set *writefds, fd_set *exceptfds,
+ const struct timespec *to, const sigset_t *set)
{
- select_printf ("select(%d, %p, %p, %p, %p)", maxfds, readfds, writefds, exceptfds, to);
+ sigset_t oldset = _my_tls.sigmask;
- pthread_testcancel ();
- int res;
- if (maxfds < 0)
+ __try
{
- set_errno (EINVAL);
- res = -1;
- }
- else
- {
- /* Convert to milliseconds or INFINITE if to == NULL */
- DWORD ms = to ? (to->tv_sec * 1000) + (to->tv_usec / 1000) : INFINITE;
- if (ms == 0 && to->tv_usec)
- ms = 1; /* At least 1 ms granularity */
+ if (set)
+ set_signal_mask (_my_tls.sigmask, *set);
+
+ select_printf ("pselect (%d, %p, %p, %p, %p, %p)", maxfds, readfds, writefds, exceptfds, to, set);
- if (to)
- select_printf ("to->tv_sec %ld, to->tv_usec %ld, ms %d", to->tv_sec, to->tv_usec, ms);
+ pthread_testcancel ();
+ int res;
+ if (maxfds < 0)
+ {
+ set_errno (EINVAL);
+ res = -1;
+ }
else
- select_printf ("to NULL, ms %x", ms);
+ {
+ /* Convert to microseconds or -1 if to == NULL */
+ LONGLONG us = to ? to->tv_sec * 1000000LL + (to->tv_nsec + 999) / 1000 : -1LL;
+
+ if (to)
+ select_printf ("to->tv_sec %ld, to->tv_nsec %ld, us %D", to->tv_sec, to->tv_nsec, us);
+ else
+ select_printf ("to NULL, us %D", us);
+
+ res = select (maxfds, readfds ?: allocfd_set (maxfds),
+ writefds ?: allocfd_set (maxfds),
+ exceptfds ?: allocfd_set (maxfds), us);
+ }
+ syscall_printf ("%R = select (%d, %p, %p, %p, %p)", res, maxfds, readfds,
+ writefds, exceptfds, to);
- res = select (maxfds, readfds ?: allocfd_set (maxfds),
- writefds ?: allocfd_set (maxfds),
- exceptfds ?: allocfd_set (maxfds), ms);
+ if (set)
+ set_signal_mask (_my_tls.sigmask, oldset);
+ return res;
}
- syscall_printf ("%R = select(%d, %p, %p, %p, %p)", res, maxfds, readfds,
- writefds, exceptfds, to);
- return res;
+ __except (EFAULT) {}
+ __endtry
+ return -1;
+}
+
+/* select () is just a wrapper on pselect (). */
+extern "C" int
+cygwin_select (int maxfds, fd_set *readfds, fd_set *writefds, fd_set *exceptfds,
+ struct timeval *to)
+{
+ struct timespec ts;
+ if (to)
+ {
+ ts.tv_sec = to->tv_sec;
+ ts.tv_nsec = to->tv_usec * 1000;
+ }
+ return pselect (maxfds, readfds, writefds, exceptfds,
+ to ? &ts : NULL, NULL);
}
/* This function is arbitrarily split out from cygwin_select to avoid odd
@@ -131,11 +150,13 @@ cygwin_select (int maxfds, fd_set *readfds, fd_set *writefds, fd_set *exceptfds,
for the sel variable. */
static int
select (int maxfds, fd_set *readfds, fd_set *writefds, fd_set *exceptfds,
- DWORD ms)
+ LONGLONG us)
{
- int res = select_stuff::select_loop;
+ select_stuff::wait_states wait_state = select_stuff::select_set_zero;
+ int ret = 0;
- LONGLONG start_time = gtod.msecs (); /* Record the current time for later use. */
+ /* Record the current time for later use. */
+ LONGLONG start_time = gtod.usecs ();
select_stuff sel;
sel.return_on_signal = 0;
@@ -145,7 +166,7 @@ select (int maxfds, fd_set *readfds, fd_set *writefds, fd_set *exceptfds,
fd_set *w = allocfd_set (maxfds);
fd_set *e = allocfd_set (maxfds);
- while (res == select_stuff::select_loop)
+ do
{
/* Build the select record per fd linked list and set state as
needed. */
@@ -157,92 +178,58 @@ select (int maxfds, fd_set *readfds, fd_set *writefds, fd_set *exceptfds,
}
select_printf ("sel.always_ready %d", sel.always_ready);
- /* Degenerate case. No fds to wait for. Just wait for time to run out
- or signal to arrive. */
- if (sel.start.next == NULL)
- switch (cygwait (ms))
- {
- case WAIT_SIGNALED:
- select_printf ("signal received");
- /* select() is always interrupted by a signal so set EINTR,
- unconditionally, ignoring any SA_RESTART detection by
- call_signal_handler(). */
- _my_tls.call_signal_handler ();
- set_sig_errno (EINTR);
- res = select_stuff::select_signalled;
- break;
- case WAIT_CANCELED:
- sel.destroy ();
- pthread::static_cancel_self ();
- /*NOTREACHED*/
- default:
- res = select_stuff::select_set_zero; /* Set res to zero below. */
- break;
- }
- else if (sel.always_ready || ms == 0)
- res = 0; /* Catch any active fds via
- sel.poll() below */
+ if (sel.always_ready || us == 0)
+ /* Catch any active fds via sel.poll () below */
+ wait_state = select_stuff::select_ok;
else
- res = sel.wait (r, w, e, ms); /* wait for an fd to become
- become active or time out */
- select_printf ("res %d", res);
- if (res >= 0)
+ /* wait for an fd to become active or time out */
+ wait_state = sel.wait (r, w, e, us);
+
+ select_printf ("sel.wait returns %d", wait_state);
+
+ if (wait_state == select_stuff::select_ok)
{
- copyfd_set (readfds, r, maxfds);
- copyfd_set (writefds, w, maxfds);
- copyfd_set (exceptfds, e, maxfds);
- /* Actually set the bit mask from sel records */
- res = (res == select_stuff::select_set_zero) ? 0 : sel.poll (readfds, writefds, exceptfds);
+ UNIX_FD_ZERO (readfds, maxfds);
+ UNIX_FD_ZERO (writefds, maxfds);
+ UNIX_FD_ZERO (exceptfds, maxfds);
+ /* Set bit mask from sel records. This also sets ret to the
+ right value >= 0, matching the number of bits set in the
+ fds records. if ret is 0, continue to loop. */
+ ret = sel.poll (readfds, writefds, exceptfds);
+ if (!ret)
+ wait_state = select_stuff::select_set_zero;
}
/* Always clean up everything here. If we're looping then build it
all up again. */
sel.cleanup ();
sel.destroy ();
- /* Recalculate the time remaining to wait if we are going to be looping. */
- if (res == select_stuff::select_loop && ms != INFINITE)
+ /* Check and recalculate timeout. */
+ if (us != -1LL && wait_state == select_stuff::select_set_zero)
{
- select_printf ("recalculating ms");
- LONGLONG now = gtod.msecs ();
- if (now > (start_time + ms))
+ select_printf ("recalculating us");
+ LONGLONG now = gtod.usecs ();
+ if (now >= (start_time + us))
{
select_printf ("timed out after verification");
- res = 0;
+ /* Set descriptor bits to zero per POSIX. */
+ UNIX_FD_ZERO (readfds, maxfds);
+ UNIX_FD_ZERO (writefds, maxfds);
+ UNIX_FD_ZERO (exceptfds, maxfds);
+ wait_state = select_stuff::select_ok;
+ ret = 0;
}
else
{
- ms -= (now - start_time);
+ us -= (now - start_time);
start_time = now;
- select_printf ("ms now %u", ms);
+ select_printf ("us now %D", us);
}
}
}
+ while (wait_state == select_stuff::select_set_zero);
- if (res < -1)
- res = -1;
- return res;
-}
-
-extern "C" int
-pselect(int maxfds, fd_set *readfds, fd_set *writefds, fd_set *exceptfds,
- const struct timespec *ts, const sigset_t *set)
-{
- struct timeval tv;
- sigset_t oldset = _my_tls.sigmask;
-
- myfault efault;
- if (efault.faulted (EFAULT))
- return -1;
- if (ts)
- {
- tv.tv_sec = ts->tv_sec;
- tv.tv_usec = ts->tv_nsec / 1000;
- }
- if (set)
- set_signal_mask (_my_tls.sigmask, *set);
- int ret = cygwin_select (maxfds, readfds, writefds, exceptfds,
- ts ? &tv : NULL);
- if (set)
- set_signal_mask (_my_tls.sigmask, oldset);
+ if (wait_state < select_stuff::select_ok)
+ ret = -1;
return ret;
}
@@ -343,22 +330,29 @@ err:
/* The heart of select. Waits for an fd to do something interesting. */
select_stuff::wait_states
select_stuff::wait (fd_set *readfds, fd_set *writefds, fd_set *exceptfds,
- DWORD ms)
+ LONGLONG us)
{
HANDLE w4[MAXIMUM_WAIT_OBJECTS];
select_record *s = &start;
- DWORD m = 0;
+ DWORD m = 0, timer_idx = 0, cancel_idx = 0;
+
+ /* Always wait for signals. */
+ wait_signal_arrived here (w4[m++]);
+
+ /* Set a timeout, or not, for WMFO. */
+ DWORD wmfo_timeout = us ? INFINITE : 0;
- set_signal_arrived here (w4[m++]);
+ /* Optionally wait for pthread cancellation. */
if ((w4[m] = pthread::get_cancel_event ()) != NULL)
- m++;
+ cancel_idx = m++;
- DWORD startfds = m;
/* Loop through the select chain, starting up anything appropriate and
counting the number of active fds. */
+ DWORD startfds = m;
while ((s = s->next))
{
- if (m >= MAXIMUM_WAIT_OBJECTS)
+ /* Make sure to leave space for the timer, if we have a finite timeout. */
+ if (m >= MAXIMUM_WAIT_OBJECTS - (us > 0LL ? 1 : 0))
{
set_sig_errno (EINVAL);
return select_error;
@@ -378,20 +372,58 @@ select_stuff::wait (fd_set *readfds, fd_set *writefds, fd_set *exceptfds,
next_while:;
}
- debug_printf ("m %d, ms %u", m, ms);
+ /* Optionally create and set a waitable timer if a finite timeout has
+ been requested. Recycle cw_timer in the cygtls area so we only have
+ to create the timer once per thread. Since WFMO checks the handles
+ in order, we append the timer as last object, otherwise it's preferred
+ over actual events on the descriptors. */
+ HANDLE &wait_timer = _my_tls.locals.cw_timer;
+ if (us > 0LL)
+ {
+ NTSTATUS status;
+ if (!wait_timer)
+ {
+ status = NtCreateTimer (&wait_timer, TIMER_ALL_ACCESS, NULL,
+ NotificationTimer);
+ if (!NT_SUCCESS (status))
+ {
+ select_printf ("%y = NtCreateTimer ()\n", status);
+ return select_error;
+ }
+ }
+ LARGE_INTEGER ms_clock_ticks = { .QuadPart = -us * 10 };
+ status = NtSetTimer (wait_timer, &ms_clock_ticks, NULL, NULL, FALSE,
+ 0, NULL);
+ if (!NT_SUCCESS (status))
+ {
+ select_printf ("%y = NtSetTimer (%D)\n",
+ status, ms_clock_ticks.QuadPart);
+ return select_error;
+ }
+ w4[m] = wait_timer;
+ timer_idx = m++;
+ }
+
+ debug_printf ("m %d, us %U, wmfo_timeout %d", m, us, wmfo_timeout);
DWORD wait_ret;
if (!windows_used)
- wait_ret = WaitForMultipleObjects (m, w4, FALSE, ms);
+ wait_ret = WaitForMultipleObjects (m, w4, FALSE, wmfo_timeout);
else
/* Using MWMO_INPUTAVAILABLE is the officially supported solution for
the problem that the call to PeekMessage disarms the queue state
so that a subsequent MWFMO hangs, even if there are still messages
in the queue. */
- wait_ret = MsgWaitForMultipleObjectsEx (m, w4, ms,
+ wait_ret = MsgWaitForMultipleObjectsEx (m, w4, wmfo_timeout,
QS_ALLINPUT | QS_ALLPOSTMESSAGE,
MWMO_INPUTAVAILABLE);
- select_printf ("wait_ret %d. verifying", wait_ret);
+ select_printf ("wait_ret %d, m = %d. verifying", wait_ret, m);
+
+ if (timer_idx)
+ {
+ BOOLEAN current_state;
+ NtCancelTimer (wait_timer, &current_state);
+ }
wait_states res;
switch (wait_ret)
@@ -416,26 +448,31 @@ next_while:;
res = select_error;
break;
case WAIT_TIMEOUT:
+was_timeout:
select_printf ("timed out");
res = select_set_zero;
break;
case WAIT_OBJECT_0 + 1:
- if (startfds > 1)
+ /* Cancel event? */
+ if (wait_ret == cancel_idx)
{
cleanup ();
destroy ();
pthread::static_cancel_self ();
/*NOTREACHED*/
}
- /* Fall through. This wasn't a cancel event. It was just a normal object
- to wait for. */
+ /*FALLTHRU*/
default:
+ /* Timer event? */
+ if (wait_ret == timer_idx)
+ goto was_timeout;
+
s = &start;
- bool gotone = false;
- /* Some types of objects (e.g., consoles) wake up on "inappropriate" events
- like mouse movements. The verify function will detect these situations.
- If it returns false, then this wakeup was a false alarm and we should go
- back to waiting. */
+ res = select_set_zero;
+ /* Some types of objects (e.g., consoles) wake up on "inappropriate"
+ events like mouse movements. The verify function will detect these
+ situations. If it returns false, then this wakeup was a false alarm
+ and we should go back to waiting. */
while ((s = s->next))
if (s->saw_error ())
{
@@ -443,15 +480,12 @@ next_while:;
res = select_error; /* Somebody detected an error */
goto out;
}
- else if ((((wait_ret >= m && s->windows_handle) || s->h == w4[wait_ret]))
+ else if ((((wait_ret >= m && s->windows_handle)
+ || s->h == w4[wait_ret]))
&& s->verify (s, readfds, writefds, exceptfds))
- gotone = true;
+ res = select_ok;
- if (!gotone)
- res = select_loop;
- else
- res = select_ok;
- select_printf ("gotone %d", gotone);
+ select_printf ("res after verify %d", res);
break;
}
out:
@@ -476,16 +510,10 @@ set_bits (select_record *me, fd_set *readfds, fd_set *writefds,
UNIX_FD_SET (me->fd, writefds);
if (me->except_on_write && (sock = me->fh->is_socket ()))
{
- /* Special AF_LOCAL handling. */
- if (!me->read_ready && sock->connect_state () == connect_pending
- && sock->af_local_connect ())
- {
- if (me->read_selected)
- UNIX_FD_SET (me->fd, readfds);
- sock->connect_state (connect_failed);
- }
- else
- sock->connect_state (connected);
+ /* Set readfds entry in case of a failed connect. */
+ if (!me->read_ready && me->read_selected
+ && sock->connect_state () == connect_failed)
+ UNIX_FD_SET (me->fd, readfds);
}
ready++;
}
@@ -606,11 +634,6 @@ peek_pipe (select_record *s, bool from_select)
{
fhandler_pty_master *fhm = (fhandler_pty_master *) fh;
fhm->flush_to_slave ();
- if (fhm->need_nl)
- {
- gotone = s->read_ready = true;
- goto out;
- }
}
break;
default:
@@ -628,6 +651,9 @@ peek_pipe (select_record *s, bool from_select)
goto out;
}
int n = pipe_data_available (s->fd, fh, h, false);
+ /* On PTY masters, check if input from the echo pipe is available. */
+ if (n == 0 && fh->get_echo_handle ())
+ n = pipe_data_available (s->fd, fh, fh->get_echo_handle (), false);
if (n < 0)
{
@@ -828,12 +854,17 @@ fhandler_fifo::select_except (select_stuff *ss)
static int
peek_console (select_record *me, bool)
{
- extern const char * get_nonascii_key (INPUT_RECORD& input_rec, char *);
fhandler_console *fh = (fhandler_console *) me->fh;
if (!me->read_selected)
return me->write_ready;
+ if (fh->get_cons_readahead_valid ())
+ {
+ select_printf ("cons_readahead");
+ return me->read_ready = true;
+ }
+
if (fh->get_readahead_valid ())
{
select_printf ("readahead");
@@ -864,7 +895,7 @@ peek_console (select_record *me, bool)
{
if (irec.Event.KeyEvent.bKeyDown
&& (irec.Event.KeyEvent.uChar.AsciiChar
- || get_nonascii_key (irec, tmpbuf)))
+ || fhandler_console::get_nonascii_key (irec, tmpbuf)))
return me->read_ready = true;
}
else
@@ -905,7 +936,7 @@ fhandler_console::select_read (select_stuff *ss)
s->peek = peek_console;
s->h = get_handle ();
s->read_selected = true;
- s->read_ready = false;
+ s->read_ready = get_readahead_valid ();
return s;
}
@@ -1268,7 +1299,7 @@ fhandler_base::select_read (select_stuff *ss)
s->startup = no_startup;
s->verify = verify_ok;
}
- s->h = get_handle ();
+ s->h = get_io_handle_cyg ();
s->read_selected = true;
s->read_ready = true;
return s;
@@ -1413,7 +1444,10 @@ start_thread_socket (select_record *me, select_stuff *stuff)
si = new select_socket_info;
if (!init_tls_select_info ())
- return 0;
+ {
+ delete si;
+ return 0;
+ }
si->ser_num = _my_tls.locals.select.ser_num;
si->w4 = _my_tls.locals.select.w4;
@@ -1439,14 +1473,20 @@ start_thread_socket (select_record *me, select_stuff *stuff)
+ MAXIMUM_WAIT_OBJECTS)
* sizeof (LONG));
if (!nser)
- return 0;
+ {
+ delete si;
+ return 0;
+ }
_my_tls.locals.select.ser_num = si->ser_num = nser;
HANDLE *nw4 = (HANDLE *) realloc (si->w4,
(_my_tls.locals.select.max_w4
+ MAXIMUM_WAIT_OBJECTS)
* sizeof (HANDLE));
if (!nw4)
- return 0;
+ {
+ delete si;
+ return 0;
+ }
_my_tls.locals.select.w4 = si->w4 = nw4;
_my_tls.locals.select.max_w4 += MAXIMUM_WAIT_OBJECTS;
}
@@ -1542,6 +1582,8 @@ peek_windows (select_record *me, bool)
MSG m;
HANDLE h;
set_handle_or_return_if_not_open (h, me);
+ /* We need the hWnd value, not the io_handle. */
+ h = ((fhandler_windows *) me->fh)->get_hwnd ();
if (me->read_selected && me->read_ready)
return 1;
@@ -1576,7 +1618,6 @@ fhandler_windows::select_read (select_stuff *ss)
s->peek = peek_windows;
s->read_selected = true;
s->read_ready = false;
- s->h = get_handle ();
s->windows_handle = true;
return s;
}
@@ -1591,7 +1632,6 @@ fhandler_windows::select_write (select_stuff *ss)
s->verify = verify_ok;
}
s->peek = peek_windows;
- s->h = get_handle ();
s->write_selected = true;
s->write_ready = true;
s->windows_handle = true;
@@ -1608,7 +1648,6 @@ fhandler_windows::select_except (select_stuff *ss)
s->verify = verify_ok;
}
s->peek = peek_windows;
- s->h = get_handle ();
s->except_selected = true;
s->except_ready = false;
s->windows_handle = true;
@@ -1626,6 +1665,7 @@ peek_mailslot (select_record *me, bool)
DWORD msgcnt = 0;
if (!GetMailslotInfo (h, NULL, NULL, &msgcnt, NULL))
{
+ me->except_ready = true;
select_printf ("mailslot %d(%p) error %E", me->fd, h);
return 1;
}
diff --git a/winsup/cygwin/select.h b/winsup/cygwin/select.h
index 5ce092486..1536c2cb1 100644
--- a/winsup/cygwin/select.h
+++ b/winsup/cygwin/select.h
@@ -1,8 +1,5 @@
/* select.h
- Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008, 2009, 2010, 2011, 2012 Red Hat, Inc.
-
This file is part of Cygwin.
This software is a copyrighted work licensed under the terms of the
@@ -78,7 +75,6 @@ public:
enum wait_states
{
select_signalled = -3,
- select_loop = -2,
select_error = -1,
select_ok = 0,
select_set_zero = 1
@@ -96,7 +92,7 @@ public:
bool test_and_set (int, fd_set *, fd_set *, fd_set *);
int poll (fd_set *, fd_set *, fd_set *);
- wait_states wait (fd_set *, fd_set *, fd_set *, DWORD);
+ wait_states wait (fd_set *, fd_set *, fd_set *, LONGLONG);
void cleanup ();
void destroy ();
@@ -107,4 +103,8 @@ public:
device_specific_serial (NULL),
device_specific_mailslot (NULL) {}
};
+
+extern "C" int cygwin_select (int , fd_set *, fd_set *, fd_set *,
+ struct timeval *to);
+
#endif /* _SELECT_H_ */
diff --git a/winsup/cygwin/sem.cc b/winsup/cygwin/sem.cc
index 2c172990a..fc23cfb08 100644
--- a/winsup/cygwin/sem.cc
+++ b/winsup/cygwin/sem.cc
@@ -1,7 +1,5 @@
/* sem.cc: XSI IPC interface for Cygwin.
- Copyright 2002, 2003, 2004, 2005, 2008, 2009, 2012 Red Hat, Inc.
-
This file is part of Cygwin.
This software is a copyrighted work licensed under the terms of the
@@ -85,19 +83,20 @@ semctl (int semid, int semnum, int cmd, ...)
}
syscall_printf ("semctl (semid = %d, semnum = %d, cmd = %d, arg = %p)",
semid, semnum, cmd, arg.buf);
- myfault efault;
- if (efault.faulted (EFAULT))
- return -1;
- client_request_sem request (semid, semnum, cmd, &arg);
- if (request.make_request () == -1 || request.retval () == -1)
+ __try
{
- syscall_printf ("-1 [%d] = semctl ()", request.error_code ());
- set_errno (request.error_code ());
- if (request.error_code () == ENOSYS)
- raise (SIGSYS);
- return -1;
+ client_request_sem request (semid, semnum, cmd, &arg);
+ if (request.make_request () == -1 || request.retval () == -1)
+ {
+ syscall_printf ("-1 [%d] = semctl ()", request.error_code ());
+ set_errno (request.error_code ());
+ __leave;
+ }
+ return request.retval ();
}
- return request.retval ();
+ __except (EFAULT) {}
+ __endtry
+ return -1;
}
extern "C" int
@@ -110,8 +109,6 @@ semget (key_t key, int nsems, int semflg)
{
syscall_printf ("-1 [%d] = semget ()", request.error_code ());
set_errno (request.error_code ());
- if (request.error_code () == ENOSYS)
- raise (SIGSYS);
return -1;
}
return request.retval ();
@@ -122,17 +119,18 @@ semop (int semid, struct sembuf *sops, size_t nsops)
{
syscall_printf ("semop (semid = %d, sops = %p, nsops = %ld)",
semid, sops, nsops);
- myfault efault;
- if (efault.faulted (EFAULT))
- return -1;
- client_request_sem request (semid, sops, nsops);
- if (request.make_request () == -1 || request.retval () == -1)
+ __try
{
- syscall_printf ("-1 [%d] = semop ()", request.error_code ());
- set_errno (request.error_code ());
- if (request.error_code () == ENOSYS)
- raise (SIGSYS);
- return -1;
+ client_request_sem request (semid, sops, nsops);
+ if (request.make_request () == -1 || request.retval () == -1)
+ {
+ syscall_printf ("-1 [%d] = semop ()", request.error_code ());
+ set_errno (request.error_code ());
+ __leave;
+ }
+ return request.retval ();
}
- return request.retval ();
+ __except (EFAULT) {}
+ __endtry
+ return -1;
}
diff --git a/winsup/cygwin/setlsapwd.cc b/winsup/cygwin/setlsapwd.cc
index 8e1baa9bb..116ce93c9 100644
--- a/winsup/cygwin/setlsapwd.cc
+++ b/winsup/cygwin/setlsapwd.cc
@@ -1,7 +1,5 @@
/* setlsapwd.cc: Set LSA private data password for current user.
- Copyright 2008, 2009, 2011 Red Hat, Inc.
-
This file is part of Cygwin.
This software is a copyrighted work licensed under the terms of the
@@ -17,7 +15,6 @@ details. */
#include "cygheap.h"
#include "security.h"
#include "cygserver_setpwd.h"
-#include "pwdgrp.h"
#include "ntdll.h"
#include <ntsecapi.h>
#include <stdlib.h>
@@ -41,7 +38,7 @@ unsigned long
setlsapwd (const char *passwd, const char *username)
{
unsigned long ret = (unsigned long) -1;
- HANDLE lsa = INVALID_HANDLE_VALUE;
+ HANDLE lsa;
WCHAR sid[128];
WCHAR key_name[128 + wcslen (CYGWIN_LSA_KEY_PREFIX)];
PWCHAR data_buf = NULL;
@@ -51,7 +48,7 @@ setlsapwd (const char *passwd, const char *username)
if (username)
{
cygsid psid;
- struct passwd *pw = internal_getpwnam (username, false);
+ struct passwd *pw = internal_getpwnam (username);
if (!pw || !psid.getfrompw (pw))
{
@@ -71,8 +68,7 @@ setlsapwd (const char *passwd, const char *username)
if (data_buf)
RtlInitUnicodeString (&data, data_buf);
/* First try it locally. Works for admin accounts. */
- if ((lsa = open_local_policy (POLICY_CREATE_SECRET))
- != INVALID_HANDLE_VALUE)
+ if ((lsa = lsa_open_policy (NULL, POLICY_CREATE_SECRET)))
{
NTSTATUS status = LsaStorePrivateData (lsa, &key,
data.Length ? &data : NULL);
@@ -83,7 +79,7 @@ setlsapwd (const char *passwd, const char *username)
ret = 0;
else
__seterrno_from_nt_status (status);
- LsaClose (lsa);
+ lsa_close_policy (lsa);
}
else if (ret && !username)
{
@@ -95,7 +91,7 @@ setlsapwd (const char *passwd, const char *username)
}
if (data_buf)
{
- memset (data.Buffer, 0, data.Length);
+ RtlSecureZeroMemory (data.Buffer, data.Length);
free (data_buf);
}
}
diff --git a/winsup/cygwin/shared.cc b/winsup/cygwin/shared.cc
index ef25c592a..4ed4c1199 100644
--- a/winsup/cygwin/shared.cc
+++ b/winsup/cygwin/shared.cc
@@ -1,8 +1,5 @@
/* shared.cc: shared data area support.
- Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008, 2009, 2010, 2011, 2012, 2013 Red Hat, Inc.
-
This file is part of Cygwin.
This software is a copyrighted work licensed under the terms of the
@@ -22,12 +19,9 @@ details. */
#include "shared_info_magic.h"
#include "registry.h"
#include "cygwin_version.h"
-#include "pwdgrp.h"
#include "spinlock.h"
#include <alloca.h>
#include <wchar.h>
-#include <wingdi.h>
-#include <winuser.h>
shared_info NO_COPY *cygwin_shared;
user_info NO_COPY *user_shared;
@@ -232,14 +226,19 @@ user_info::initialize ()
spinlock sversion (version, CURR_USER_MAGIC);
if (!sversion)
{
- cb = sizeof (*user_shared);
+ cb = sizeof (*user_shared);
+ /* Initialize mount table from system fstab prior to calling
+ internal_getpwsid. This allows to convert pw_dir and pw_shell
+ paths given in DOS notation to valid POSIX paths. */
+ mountinfo.init (false);
cygpsid sid (cygheap->user.sid ());
struct passwd *pw = internal_getpwsid (sid);
/* Correct the user name with what's defined in /etc/passwd before
loading the user fstab file. */
if (pw)
cygheap->user.set_name (pw->pw_name);
- mountinfo.init (); /* Initialize the mount table. */
+ /* After fetching the user infos, add mount entries from user's fstab. */
+ mountinfo.init (true);
}
else if (sversion != CURR_USER_MAGIC)
sversion.multiple_cygwin_problem ("user shared memory version", version,
@@ -346,16 +345,8 @@ shared_info::initialize ()
}
void
-memory_init (bool init_cygheap)
+memory_init ()
{
- /* Initialize the Cygwin heap, if necessary */
- if (init_cygheap)
- {
- cygheap_init ();
- cygheap->user.init ();
- cygheap->init_installation_root (); /* Requires user.init! */
- }
-
shared_info::create (); /* Initialize global shared memory */
user_info::create (false); /* Initialize per-user shared memory */
/* Initialize tty list session stuff. Doesn't really belong here but
diff --git a/winsup/cygwin/shared_info.h b/winsup/cygwin/shared_info.h
index 6733b3636..ce17c15ba 100644
--- a/winsup/cygwin/shared_info.h
+++ b/winsup/cygwin/shared_info.h
@@ -1,8 +1,5 @@
/* shared_info.h: shared info for cygwin
- Copyright 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
- 2011, 2012, 2013 Red Hat, Inc.
-
This file is part of Cygwin.
This software is a copyrighted work licensed under the terms of the
@@ -75,7 +72,7 @@ enum shared_locations
};
-void __reg1 memory_init (bool);
+void memory_init ();
void __stdcall shared_destroy ();
#define shared_align_past(p) \
diff --git a/winsup/cygwin/shm.cc b/winsup/cygwin/shm.cc
index 226d2ee91..805a24b80 100644
--- a/winsup/cygwin/shm.cc
+++ b/winsup/cygwin/shm.cc
@@ -1,8 +1,5 @@
/* shm.cc: XSI IPC interface for Cygwin.
- Copyright 2001, 2002, 2003, 2004, 2005, 2007, 2008, 2009, 2012, 2013
- Red Hat, Inc.
-
This file is part of Cygwin.
This software is a copyrighted work licensed under the terms of the
@@ -21,6 +18,10 @@ details. */
#include "sync.h"
#include "ntdll.h"
+/* __getpagesize is only available from libcygwin.a */
+#undef SHMLBA
+#define SHMLBA (wincap.allocation_granularity ())
+
/*
* client_request_shm Constructors
*/
@@ -85,7 +86,7 @@ client_request_shm::client_request_shm (proc *p1)
: client_request (CYGSERVER_REQUEST_SHM, &_parameters, sizeof (_parameters))
{
_parameters.in.shmop = SHMOP_shmfork;
- ipc_set_proc_info (_parameters.in.ipcblk);
+ ipc_set_proc_info (_parameters.in.ipcblk, true);
_parameters.in.forkargs = *p1;
}
@@ -242,8 +243,6 @@ shmat (int shmid, const void *shmaddr, int shmflg)
delete sph_entry;
set_errno (request.error_code ());
--ssh_entry->ref_count;
- if (request.error_code () == ENOSYS)
- raise (SIGSYS);
return (void *) -1;
}
sph_entry->ptr = ptr;
@@ -260,41 +259,43 @@ shmctl (int shmid, int cmd, struct shmid_ds *buf)
{
syscall_printf ("shmctl (shmid = %d, cmd = %d, buf = %p)",
shmid, cmd, buf);
- myfault efault;
- if (efault.faulted (EFAULT))
- return -1;
- client_request_shm request (shmid, cmd, buf);
- if (request.make_request () == -1 || request.retval () == -1)
+ __try
{
- syscall_printf ("-1 [%d] = shmctl ()", request.error_code ());
- set_errno (request.error_code ());
- if (request.error_code () == ENOSYS)
- raise (SIGSYS);
- return -1;
- }
- if (cmd == IPC_RMID)
- {
- /* Cleanup */
- shm_shmid_list *ssh_entry, *ssh_next_entry;
- SLIST_LOCK ();
- SLIST_FOREACH_SAFE (ssh_entry, &ssh_list, ssh_next, ssh_next_entry)
+ client_request_shm request (shmid, cmd, buf);
+ if (request.make_request () == -1 || request.retval () == -1)
+ {
+ syscall_printf ("-1 [%d] = shmctl ()", request.error_code ());
+ set_errno (request.error_code ());
+ __leave;
+ }
+ if (cmd == IPC_RMID)
{
- if (ssh_entry->shmid == shmid)
+ /* Cleanup */
+ shm_shmid_list *ssh_entry, *ssh_next_entry;
+ SLIST_LOCK ();
+ SLIST_FOREACH_SAFE (ssh_entry, &ssh_list, ssh_next, ssh_next_entry)
{
- /* Remove this entry from the list and close the handle
- only if it's not in use anymore. */
- if (ssh_entry->ref_count <= 0)
+ if (ssh_entry->shmid == shmid)
{
- SLIST_REMOVE (&ssh_list, ssh_entry, shm_shmid_list, ssh_next);
- CloseHandle (ssh_entry->hdl);
- delete ssh_entry;
+ /* Remove this entry from the list and close the handle
+ only if it's not in use anymore. */
+ if (ssh_entry->ref_count <= 0)
+ {
+ SLIST_REMOVE (&ssh_list, ssh_entry, shm_shmid_list,
+ ssh_next);
+ CloseHandle (ssh_entry->hdl);
+ delete ssh_entry;
+ }
+ break;
}
- break;
}
+ SLIST_UNLOCK ();
}
- SLIST_UNLOCK ();
+ return request.retval ();
}
- return request.retval ();
+ __except (EFAULT) {}
+ __endtry
+ return -1;
}
extern "C" int
@@ -306,8 +307,6 @@ shmdt (const void *shmaddr)
{
syscall_printf ("-1 [%d] = shmdt ()", request.error_code ());
set_errno (request.error_code ());
- if (request.error_code () == ENOSYS)
- raise (SIGSYS);
return -1;
}
shm_attached_list *sph_entry, *sph_next_entry;
@@ -355,8 +354,6 @@ shmget (key_t key, size_t size, int shmflg)
syscall_printf ("-1 [%d] = shmget ()", request.error_code ());
delete ssh_new_entry;
set_errno (request.error_code ());
- if (request.error_code () == ENOSYS)
- raise (SIGSYS);
return -1;
}
int shmid = request.retval (); /* Shared mem ID */
@@ -381,7 +378,14 @@ shmget (key_t key, size_t size, int shmflg)
shmid and hdl value to the list. */
ssh_new_entry->shmid = shmid;
ssh_new_entry->hdl = hdl;
- ssh_new_entry->size = size;
+ /* Fetch segment size from server. If this is an already existing segment,
+ the size value in this shmget call is supposed to be meaningless. */
+ struct shmid_ds stat;
+ client_request_shm stat_req (shmid, IPC_STAT, &stat);
+ if (stat_req.make_request () == -1 || stat_req.retval () == -1)
+ ssh_new_entry->size = size;
+ else
+ ssh_new_entry->size = stat.shm_segsz;
ssh_new_entry->ref_count = 0;
SLIST_INSERT_HEAD (&ssh_list, ssh_new_entry, ssh_next);
SLIST_UNLOCK ();
diff --git a/winsup/cygwin/signal.cc b/winsup/cygwin/signal.cc
index 2501c1922..ff101e368 100644
--- a/winsup/cygwin/signal.cc
+++ b/winsup/cygwin/signal.cc
@@ -1,8 +1,5 @@
/* signal.cc
- Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008, 2009, 2010, 2011, 2012, 2013 Red Hat, Inc.
-
Written by Steve Chamberlain of Cygnus Support, sac@cygnus.com
Significant changes by Sergey Okhapkin <sos@prospect.com.ru>
@@ -183,7 +180,7 @@ sigprocmask (int how, const sigset_t *set, sigset_t *oldset)
set_errno (res);
res = -1;
}
- syscall_printf ("%R = sigprocmask (%d, %p, %p)", res, set, oldset);
+ syscall_printf ("%R = sigprocmask (%d, %p, %p)", res, how, set, oldset);
return res;
}
@@ -197,33 +194,37 @@ handle_sigprocmask (int how, const sigset_t *set, sigset_t *oldset, sigset_t& op
return EINVAL;
}
- myfault efault;
- if (efault.faulted (EFAULT))
- return EFAULT;
-
- if (oldset)
- *oldset = opmask;
+ __try
+ {
+ if (oldset)
+ *oldset = opmask;
- if (set)
- {
- sigset_t newmask = opmask;
- switch (how)
+ if (set)
{
- case SIG_BLOCK:
- /* add set to current mask */
- newmask |= *set;
- break;
- case SIG_UNBLOCK:
- /* remove set from current mask */
- newmask &= ~*set;
- break;
- case SIG_SETMASK:
- /* just set it */
- newmask = *set;
- break;
+ sigset_t newmask = opmask;
+ switch (how)
+ {
+ case SIG_BLOCK:
+ /* add set to current mask */
+ newmask |= *set;
+ break;
+ case SIG_UNBLOCK:
+ /* remove set from current mask */
+ newmask &= ~*set;
+ break;
+ case SIG_SETMASK:
+ /* just set it */
+ newmask = *set;
+ break;
+ }
+ set_signal_mask (opmask, newmask);
}
- set_signal_mask (opmask, newmask);
}
+ __except (EFAULT)
+ {
+ return EFAULT;
+ }
+ __endtry
return 0;
}
@@ -382,8 +383,7 @@ sigaction_worker (int sig, const struct sigaction *newact,
struct sigaction *oldact, bool isinternal)
{
int res = -1;
- myfault efault;
- if (!efault.faulted (EFAULT))
+ __try
{
sig_dispatch_pending ();
/* check that sig is in right range */
@@ -394,14 +394,17 @@ sigaction_worker (int sig, const struct sigaction *newact,
struct sigaction oa = global_sigs[sig];
if (!newact)
- sigproc_printf ("signal %d, newact %p, oa %p", sig, newact, oa, oa.sa_handler);
+ sigproc_printf ("signal %d, newact %p, oa %p",
+ sig, newact, oa, oa.sa_handler);
else
{
- sigproc_printf ("signal %d, newact %p (handler %p), oa %p", sig, newact, newact->sa_handler, oa, oa.sa_handler);
+ sigproc_printf ("signal %d, newact %p (handler %p), oa %p",
+ sig, newact, newact->sa_handler, oa,
+ oa.sa_handler);
if (sig == SIGKILL || sig == SIGSTOP)
{
set_errno (EINVAL);
- goto out;
+ __leave;
}
struct sigaction na = *newact;
struct sigaction& gs = global_sigs[sig];
@@ -430,8 +433,8 @@ sigaction_worker (int sig, const struct sigaction *newact,
res = 0;
}
}
-
-out:
+ __except (EFAULT) {}
+ __endtry
return res;
}
@@ -551,50 +554,56 @@ siginterrupt (int sig, int flag)
extern "C" int
sigwait (const sigset_t *set, int *sig_ptr)
{
- int sig = sigwaitinfo (set, NULL);
+ int sig;
+
+ do
+ {
+ sig = sigwaitinfo (set, NULL);
+ }
+ while (sig == -1 && get_errno () == EINTR);
if (sig > 0)
*sig_ptr = sig;
- return sig > 0 ? 0 : -1;
+ return sig > 0 ? 0 : get_errno ();
}
extern "C" int
sigwaitinfo (const sigset_t *set, siginfo_t *info)
{
- pthread_testcancel ();
-
- myfault efault;
- if (efault.faulted (EFAULT))
- return EFAULT;
+ int res = -1;
- set_signal_mask (_my_tls.sigwait_mask, *set);
- sig_dispatch_pending (true);
+ pthread_testcancel ();
- int res;
- switch (cygwait (NULL, cw_infinite, cw_sig_eintr | cw_cancel | cw_cancel_self))
+ __try
{
- case WAIT_SIGNALED:
- if (!sigismember (set, _my_tls.infodata.si_signo))
- {
- set_errno (EINTR);
- res = -1;
- }
- else
+ set_signal_mask (_my_tls.sigwait_mask, *set);
+ sig_dispatch_pending (true);
+
+ switch (cygwait (NULL, cw_infinite, cw_sig_eintr | cw_cancel | cw_cancel_self))
{
- _my_tls.lock ();
- if (info)
- *info = _my_tls.infodata;
- res = _my_tls.infodata.si_signo;
- _my_tls.sig = 0;
- if (_my_tls.retaddr () == (__stack_t) sigdelayed)
- _my_tls.pop ();
- _my_tls.unlock ();
+ case WAIT_SIGNALED:
+ if (!sigismember (set, _my_tls.infodata.si_signo))
+ set_errno (EINTR);
+ else
+ {
+ _my_tls.lock ();
+ if (info)
+ *info = _my_tls.infodata;
+ res = _my_tls.infodata.si_signo;
+ _my_tls.sig = 0;
+ if (_my_tls.retaddr () == (__tlsstack_t) sigdelayed)
+ _my_tls.pop ();
+ _my_tls.unlock ();
+ }
+ break;
+ default:
+ __seterrno ();
+ break;
}
- break;
- default:
- __seterrno ();
- res = -1;
}
-
+ __except (EFAULT) {
+ res = -1;
+ }
+ __endtry
sigproc_printf ("returning signal %d", res);
return res;
}
@@ -618,3 +627,69 @@ sigqueue (pid_t pid, int sig, const union sigval value)
si.si_value = value;
return sig_send (dest, si);
}
+
+extern "C" int
+sigaltstack (const stack_t *ss, stack_t *oss)
+{
+ _cygtls& me = _my_tls;
+
+ __try
+ {
+ if (ss)
+ {
+ if (me.altstack.ss_flags == SS_ONSTACK)
+ {
+ /* An attempt was made to modify an active stack. */
+ set_errno (EPERM);
+ return -1;
+ }
+ if (ss->ss_flags == SS_DISABLE)
+ {
+ me.altstack.ss_sp = NULL;
+ me.altstack.ss_flags = 0;
+ me.altstack.ss_size = 0;
+ }
+ else
+ {
+ if (ss->ss_flags)
+ {
+ /* The ss argument is not a null pointer, and the ss_flags
+ member pointed to by ss contains flags other than
+ SS_DISABLE. */
+ set_errno (EINVAL);
+ return -1;
+ }
+ if (ss->ss_size < MINSIGSTKSZ)
+ {
+ /* The size of the alternate stack area is less than
+ MINSIGSTKSZ. */
+ set_errno (ENOMEM);
+ return -1;
+ }
+ memcpy (&me.altstack, ss, sizeof *ss);
+ }
+ }
+ if (oss)
+ {
+ char stack_marker;
+ memcpy (oss, &me.altstack, sizeof *oss);
+ /* Check if the current stack is the alternate signal stack. If so,
+ set ss_flags accordingly. We do this here rather than setting
+ ss_flags in _cygtls::call_signal_handler since the signal handler
+ calls longjmp, so we never return to reset the flag. */
+ if (!me.altstack.ss_flags && me.altstack.ss_sp)
+ {
+ if (&stack_marker >= (char *) me.altstack.ss_sp
+ && &stack_marker < (char *) me.altstack.ss_sp
+ + me.altstack.ss_size)
+ oss->ss_flags = SS_ONSTACK;
+ }
+ }
+ }
+ __except (EFAULT)
+ {
+ return EFAULT;
+ }
+ __endtry
+ return 0;
+}
diff --git a/winsup/cygwin/sigproc.cc b/winsup/cygwin/sigproc.cc
index a2a2edd33..4ebcb0a8f 100644
--- a/winsup/cygwin/sigproc.cc
+++ b/winsup/cygwin/sigproc.cc
@@ -1,8 +1,5 @@
/* sigproc.cc: inter/intra signal and sub process handler
- Copyright 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007,
- 2008, 2009, 2010, 2011, 2012, 2013 Red Hat, Inc.
-
This file is part of Cygwin.
This software is a copyrighted work licensed under the terms of the
@@ -39,6 +36,8 @@ struct sigaction *global_sigs;
const char *__sp_fn ;
int __sp_ln;
+bool no_thread_exit_protect::flag;
+
char NO_COPY myself_nowait_dummy[1] = {'0'};// Flag to sig_send that signal goes to
// current process but no wait is required
@@ -77,9 +76,9 @@ public:
void add (sigpacket&);
bool pending () {retry = true; return !!start.next;}
void clear (int sig) {sigs[sig].si.si_signo = 0;}
- friend void __reg1 sig_dispatch_pending (bool);;
+ void clear (_cygtls *tls);
+ friend void __reg1 sig_dispatch_pending (bool);
friend void WINAPI wait_sig (VOID *arg);
- friend void sigproc_init ();
};
Static pending_signals sigq;
@@ -207,7 +206,6 @@ proc_subproc (DWORD what, uintptr_t val)
case PROC_DETACHED_CHILD:
if (vchild != myself)
{
- vchild->ppid = what == PROC_DETACHED_CHILD ? 1 : myself->pid;
vchild->uid = myself->uid;
vchild->gid = myself->gid;
vchild->pgid = myself->pgid;
@@ -215,6 +213,7 @@ proc_subproc (DWORD what, uintptr_t val)
vchild->ctty = myself->ctty;
vchild->cygstarted = true;
vchild->process_state |= PID_INITIALIZING;
+ vchild->ppid = what == PROC_DETACHED_CHILD ? 1 : myself->pid; /* always set last */
}
if (what == PROC_DETACHED_CHILD)
break;
@@ -336,6 +335,8 @@ _cygtls::remove_wq (DWORD wait)
if (exit_state < ES_FINAL && waitq_head.next && sync_proc_subproc
&& sync_proc_subproc.acquire (wait))
{
+ ForceCloseHandle1 (wq.thread_ev, wq_ev);
+ wq.thread_ev = NULL;
for (waitq *w = &waitq_head; w->next != NULL; w = w->next)
if (w->next == &wq)
{
@@ -344,7 +345,6 @@ _cygtls::remove_wq (DWORD wait)
}
sync_proc_subproc.release ();
}
- ForceCloseHandle1 (wq.thread_ev, wq_ev);
}
}
@@ -394,6 +394,30 @@ sig_clear (int sig)
sigq.clear (sig);
}
+/* Clear pending signals of specific thread. Called under TLS lock from
+ _cygtls::remove_pending_sigs. */
+void
+pending_signals::clear (_cygtls *tls)
+{
+ sigpacket *q = &start, *qnext;
+
+ while ((qnext = q->next))
+ if (qnext->sigtls == tls)
+ {
+ qnext->si.si_signo = 0;
+ q->next = qnext->next;
+ }
+ else
+ q = qnext;
+}
+
+/* Clear pending signals of specific thread. Called from _cygtls::remove */
+void
+_cygtls::remove_pending_sigs ()
+{
+ sigq.clear (this);
+}
+
extern "C" int
sigpending (sigset_t *mask)
{
@@ -423,7 +447,7 @@ sigproc_init ()
char char_sa_buf[1024];
PSECURITY_ATTRIBUTES sa = sec_user_nih ((PSECURITY_ATTRIBUTES) char_sa_buf, cygheap->user.sid());
DWORD err = fhandler_pipe::create (sa, &my_readsig, &my_sendsig,
- sizeof (sigpacket), "sigwait",
+ NSIG * sizeof (sigpacket), "sigwait",
PIPE_ADD_PID);
if (err)
{
@@ -445,7 +469,17 @@ void
exit_thread (DWORD res)
{
# undef ExitThread
+ if (no_thread_exit_protect ())
+ ExitThread (res);
sigfillset (&_my_tls.sigmask); /* No signals wanted */
+
+ /* CV 2014-11-21: Disable the code sending a signal. The problem with
+ this code is that it allows deadlocks under signal-rich multithreading
+ conditions.
+ The original problem reported in 2012 couldn't be reproduced anymore,
+ even disabling this code. Tested on XP 32, Vista 32, W7 32, WOW64, 64,
+ W8.1 WOW64, 64. */
+#if 0
lock_process for_now; /* May block indefinitely when exiting. */
HANDLE h;
if (!DuplicateHandle (GetCurrentProcess (), GetCurrentThread (),
@@ -464,16 +498,17 @@ exit_thread (DWORD res)
siginfo_t si = {__SIGTHREADEXIT, SI_KERNEL};
si.si_cyg = h;
sig_send (myself_nowait, si, &_my_tls);
- ExitThread (0);
+#endif
+ ExitThread (res);
}
int __reg3
-sig_send (_pinfo *p, int sig, _cygtls *tid)
+sig_send (_pinfo *p, int sig, _cygtls *tls)
{
siginfo_t si = {};
si.si_signo = sig;
si.si_code = SI_KERNEL;
- return sig_send (p, si, tid);
+ return sig_send (p, si, tls);
}
/* Send a signal to another process by raising its signal semaphore.
@@ -553,7 +588,16 @@ sig_send (_pinfo *p, siginfo_t& si, _cygtls *tls)
}
VerifyHandle (sendsig);
if (!communing)
- CloseHandle (hp);
+ {
+ CloseHandle (hp);
+ DWORD flag = PIPE_NOWAIT;
+ /* Set PIPE_NOWAIT here to avoid blocking when sending a signal.
+ (Yes, I know MSDN says not to use this)
+ We can't ever block here because it causes a deadlock when
+ debugging with gdb. */
+ BOOL res = SetNamedPipeHandleState (sendsig, &flag, NULL, NULL);
+ sigproc_printf ("%d = SetNamedPipeHandleState (%y, PIPE_NOWAIT, NULL, NULL)", res, sendsig);
+ }
else
{
si._si_commune._si_process_handle = hp;
@@ -585,7 +629,11 @@ sig_send (_pinfo *p, siginfo_t& si, _cygtls *tls)
else if (si.si_signo == __SIGPENDING)
pack.mask = &pending;
else if (si.si_signo == __SIGFLUSH || si.si_signo > 0)
- pack.mask = tls ? &tls->sigmask : &_main_tls->sigmask;
+ {
+ threadlist_t *tl_entry = cygheap->find_tls (tls ? tls : _main_tls);
+ pack.mask = tls ? &tls->sigmask : &_main_tls->sigmask;
+ cygheap->unlock_tls (tl_entry);
+ }
else
pack.mask = NULL;
@@ -613,15 +661,27 @@ sig_send (_pinfo *p, siginfo_t& si, _cygtls *tls)
else
{
size_t n = strlen (si._si_commune._si_str);
- char *p = leader = (char *) alloca (sizeof (pack) + sizeof (n) + n);
+ packsize = sizeof (pack) + sizeof (n) + n;
+ char *p = leader = (char *) alloca (packsize);
memcpy (p, &pack, sizeof (pack)); p += sizeof (pack);
memcpy (p, &n, sizeof (n)); p += sizeof (n);
memcpy (p, si._si_commune._si_str, n); p += n;
- packsize = p - leader;
}
DWORD nb;
- if (!WriteFile (sendsig, leader, packsize, &nb, NULL) || nb != packsize)
+ BOOL res;
+ /* Try multiple times to send if packsize != nb since that probably
+ means that the pipe buffer is full. */
+ for (int i = 0; i < 100; i++)
+ {
+ res = WriteFile (sendsig, leader, packsize, &nb, NULL);
+ if (!res || packsize == nb)
+ break;
+ Sleep (10);
+ res = 0;
+ }
+
+ if (!res)
{
/* Couldn't send to the pipe. This probably means that the
process is exiting. */
@@ -630,12 +690,9 @@ sig_send (_pinfo *p, siginfo_t& si, _cygtls *tls)
sigproc_printf ("WriteFile for pipe %p failed, %E", sendsig);
ForceCloseHandle (sendsig);
}
- else
- {
- if (!p->exec_sendsig)
- system_printf ("error sending signal %d to pid %d, pipe handle %p, %E",
- si.si_signo, p->pid, sendsig);
- }
+ else if (!p->exec_sendsig && !exit_state)
+ system_printf ("error sending signal %d, pid %u, pipe handle %p, nb %u, packsize %u, %E",
+ si.si_signo, p->pid, sendsig, nb, packsize);
if (GetLastError () == ERROR_BROKEN_PIPE)
set_errno (ESRCH);
else
@@ -736,7 +793,21 @@ child_info::child_info (unsigned in_cb, child_info_types chtype,
fhandler_union_cb = sizeof (fhandler_union);
user_h = cygwin_user_h;
if (strace.active ())
- flag |= _CI_STRACED;
+ {
+ NTSTATUS status;
+ ULONG DebugFlags;
+
+ /* Only propagate _CI_STRACED to child if strace is actually tracing
+ child processes of this process. The undocumented ProcessDebugFlags
+ returns 0 if EPROCESS->NoDebugInherit is TRUE, 1 otherwise.
+ This avoids a hang when stracing a forking or spawning process
+ with the -f flag set to "don't follow fork". */
+ status = NtQueryInformationProcess (GetCurrentProcess (),
+ ProcessDebugFlags, &DebugFlags,
+ sizeof (DebugFlags), NULL);
+ if (NT_SUCCESS (status) && DebugFlags)
+ flag |= _CI_STRACED;
+ }
if (need_subproc_ready)
{
subproc_ready = CreateEvent (&sec_all, FALSE, FALSE, NULL);
@@ -1205,6 +1276,8 @@ wait_sig (VOID *)
sigproc_printf ("entering ReadFile loop, my_readsig %p, my_sendsig %p",
my_readsig, my_sendsig);
+ hntdll = GetModuleHandle ("ntdll.dll");
+
for (;;)
{
DWORD nb;
@@ -1225,9 +1298,12 @@ wait_sig (VOID *)
continue;
sigset_t dummy_mask;
+ threadlist_t *tl_entry;
if (!pack.mask)
{
+ tl_entry = cygheap->find_tls (_main_tls);
dummy_mask = _main_tls->sigmask;
+ cygheap->unlock_tls (tl_entry);
pack.mask = &dummy_mask;
}
@@ -1242,11 +1318,16 @@ wait_sig (VOID *)
strace.activate (false);
break;
case __SIGPENDING:
- *pack.mask = 0;
- unsigned bit;
- while ((q = q->next))
- if (pack.sigtls->sigmask & (bit = SIGTOMASK (q->si.si_signo)))
- *pack.mask |= bit;
+ {
+ unsigned bit;
+
+ *pack.mask = 0;
+ tl_entry = cygheap->find_tls (pack.sigtls);
+ while ((q = q->next))
+ if (pack.sigtls->sigmask & (bit = SIGTOMASK (q->si.si_signo)))
+ *pack.mask |= bit;
+ cygheap->unlock_tls (tl_entry);
+ }
break;
case __SIGHOLD:
sig_held = true;
diff --git a/winsup/cygwin/sigproc.h b/winsup/cygwin/sigproc.h
index 23647a458..f2cd1132b 100644
--- a/winsup/cygwin/sigproc.h
+++ b/winsup/cygwin/sigproc.h
@@ -1,8 +1,5 @@
/* sigproc.h
- Copyright 1997, 1998, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009, 2010,
- 2011, 2012, 2013 Red Hat, Inc.
-
This file is part of Cygwin.
This software is a copyrighted work licensed under the terms of the
@@ -83,6 +80,22 @@ int kill_pgrp (pid_t, siginfo_t&);
void __reg1 exit_thread (DWORD) __attribute__ ((noreturn));
void __reg1 setup_signal_exit (int);
+class no_thread_exit_protect
+{
+ static bool flag;
+ bool modify;
+public:
+ no_thread_exit_protect (int) {flag = true; modify = true;}
+ ~no_thread_exit_protect ()
+ {
+ if (modify)
+ flag = false;
+ }
+ no_thread_exit_protect () {modify = false;}
+ operator int () {return flag;}
+};
+
+
extern "C" void sigdelayed ();
extern char myself_nowait_dummy[];
@@ -133,7 +146,7 @@ public:
class hold_everything
{
- bool ischild;
+ bool& ischild;
/* Note the order of the locks below. It is important,
to avoid races, that the lock order be preserved.
@@ -150,7 +163,7 @@ class hold_everything
lock_process process;
public:
- hold_everything (bool x = false): ischild (x) {}
+ hold_everything (bool& x): ischild (x) {}
operator int () const {return signals;}
~hold_everything()
diff --git a/winsup/cygwin/smallprint.cc b/winsup/cygwin/smallprint.cc
index e3e238fd9..ff71a3696 100644
--- a/winsup/cygwin/smallprint.cc
+++ b/winsup/cygwin/smallprint.cc
@@ -1,9 +1,5 @@
/* smallprint.cc: small print routines for WIN32
- Copyright 1996, 1998, 2000, 2001, 2002, 2003, 2005, 2006,
- 2007, 2008, 2009, 2012, 2013
- Red Hat, Inc.
-
This file is part of Cygwin.
This software is a copyrighted work licensed under the terms of the
@@ -201,6 +197,7 @@ __small_vsprintf (char *dst, const char *fmt, va_list ap)
for (c = buf; *c; ++c)
*dst++ = *c;
}
+ break;
case 'E':
strcpy (dst, "Win32 error ");
dst = __rn (dst + sizeof ("Win32 error"), 10, 0, err, len, pad, LMASK);
@@ -283,12 +280,6 @@ gen_decimalLL:
dst = rnarg (dst, 16, 0, len, pad);
#endif
break;
- case 'P':
- if (!GetModuleFileName (NULL, tmp, NT_MAX_PATH))
- s = "cygwin program";
- else
- s = tmp;
- goto fillin;
case '.':
n = strtol (fmt, (char **) &fmt, 10);
if (*fmt++ != 's')
@@ -310,6 +301,9 @@ gen_decimalLL:
else
*dst++ = *s++;
break;
+ case 'P':
+ RtlInitUnicodeString (us = &uw, global_progname);
+ goto wfillin;
case 'W':
w = va_arg (ap, PWCHAR);
RtlInitUnicodeString (us = &uw, w ?: L"(null)");
@@ -612,10 +606,7 @@ gen_decimalLL:
#endif
break;
case L'P':
- if (!GetModuleFileNameW (NULL, tmp, NT_MAX_PATH))
- RtlInitUnicodeString (us = &uw, L"cygwin program");
- else
- RtlInitUnicodeString (us = &uw, tmp);
+ RtlInitUnicodeString (us = &uw, global_progname);
goto fillin;
case L'.':
n = wcstoul (fmt, (wchar_t **) &fmt, 10);
diff --git a/winsup/cygwin/spawn.cc b/winsup/cygwin/spawn.cc
index 74c5fa40c..a064c3cee 100644
--- a/winsup/cygwin/spawn.cc
+++ b/winsup/cygwin/spawn.cc
@@ -1,8 +1,5 @@
/* spawn.cc
- Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008, 2009, 2010, 2011, 2012, 2013 Red Hat, Inc.
-
This file is part of Cygwin.
This software is a copyrighted work licensed under the terms of the
@@ -14,11 +11,11 @@ details. */
#include <unistd.h>
#include <process.h>
#include <sys/wait.h>
-#include <wingdi.h>
-#include <winuser.h>
#include <wchar.h>
#include <ctype.h>
+#include <stdio.h>
#include <sys/cygwin.h>
+#include <pthread.h>
#include "cygerrno.h"
#include "security.h"
#include "sigproc.h"
@@ -55,7 +52,7 @@ perhaps_suffix (const char *prog, path_conv& buf, int& err, unsigned opt)
err = 0;
debug_printf ("prog '%s'", prog);
- buf.check (prog, PC_SYM_FOLLOW | PC_NULLEMPTY,
+ buf.check (prog, PC_SYM_FOLLOW | PC_NULLEMPTY | PC_POSIX,
(opt & FE_DLL) ? stat_suffixes : exe_suffixes);
if (buf.isdir ())
@@ -68,8 +65,8 @@ perhaps_suffix (const char *prog, path_conv& buf, int& err, unsigned opt)
err = ENOENT;
ext = NULL;
}
- else if (buf.known_suffix)
- ext = buf.get_win32 () + (buf.known_suffix - buf.get_win32 ());
+ else if (buf.known_suffix ())
+ ext = buf.get_win32 () + (buf.known_suffix () - buf.get_win32 ());
else
ext = strchr (buf.get_win32 (), '\0');
@@ -77,125 +74,102 @@ perhaps_suffix (const char *prog, path_conv& buf, int& err, unsigned opt)
return ext;
}
-/* Find an executable name, possibly by appending known executable
- suffixes to it. The win32-translated name is placed in 'buf'.
- Any found suffix is returned in known_suffix.
-
- If the file is not found and !null_if_not_found then the win32 version
- of name is placed in buf and returned. Otherwise the contents of buf
- is undefined and NULL is returned. */
-
+/* Find an executable name, possibly by appending known executable suffixes
+ to it. The path_conv struct 'buf' is filled and contains both, win32 and
+ posix path of the target file. Any found suffix is returned in known_suffix.
+ Eventually the posix path in buf is overwritten with the exact path as it
+ gets constructed for the path search. The reason is that the path is used
+ to create argv[0] in av::setup, and this requires that the filename stays
+ intact, instead of being resolved if the file is a symlink.
+
+ If the file is not found and !FE_NNF then the POSIX version of name is
+ placed in buf and returned. Otherwise the contents of buf is undefined
+ and NULL is returned. */
const char * __reg3
-find_exec (const char *name, path_conv& buf, const char *mywinenv,
+find_exec (const char *name, path_conv& buf, const char *search,
unsigned opt, const char **known_suffix)
{
const char *suffix = "";
- debug_printf ("find_exec (%s)", name);
- const char *retval;
+ const char *retval = NULL;
tmp_pathbuf tp;
+ char *tmp_path;
char *tmp = tp.c_get ();
- const char *posix = (opt & FE_NATIVE) ? NULL : name;
bool has_slash = !!strpbrk (name, "/\\");
- int err;
+ int err = 0;
- /* Check to see if file can be opened as is first.
- Win32 systems always check . first, but PATH may not be set up to
- do this. */
+ debug_printf ("find_exec (%s)", name);
+
+ /* Check to see if file can be opened as is first. */
if ((has_slash || opt & FE_CWD)
&& (suffix = perhaps_suffix (name, buf, err, opt)) != NULL)
{
- if (posix && !has_slash)
- {
- tmp[0] = '.';
- tmp[1] = '/';
- strcpy (tmp + 2, name);
- posix = tmp;
- }
- retval = buf.get_win32 ();
+ /* Overwrite potential symlink target with original path.
+ See comment preceeding this method. */
+ tmp_path = tmp;
+ if (!has_slash)
+ tmp_path = stpcpy (tmp, "./");
+ stpcpy (tmp_path, name);
+ buf.set_posix (tmp);
+ retval = buf.get_posix ();
goto out;
}
- win_env *winpath;
const char *path;
- const char *posix_path;
-
- posix = (opt & FE_NATIVE) ? NULL : tmp;
-
- if (strchr (mywinenv, '/'))
- {
- /* it's not really an environment variable at all */
- int n = cygwin_conv_path_list (CCP_POSIX_TO_WIN_A, mywinenv, NULL, 0);
- char *s = (char *) alloca (n);
- if (cygwin_conv_path_list (CCP_POSIX_TO_WIN_A, mywinenv, s, n))
- goto errout;
- path = s;
- posix_path = mywinenv - 1;
- }
- else if (has_slash || strchr (name, '\\') || isdrive (name)
- || !(winpath = getwinenv (mywinenv))
- || !(path = winpath->get_native ()) || *path == '\0')
- /* Return the error condition if this is an absolute path or if there
- is no PATH to search. */
+ /* If it starts with a slash, it's a PATH-like pathlist. Otherwise it's
+ the name of an environment variable. */
+ if (strchr (search, '/'))
+ *stpncpy (tmp, search, NT_MAX_PATH - 1) = '\0';
+ else if (has_slash || isdrive (name) || !(path = getenv (search)) || !*path)
goto errout;
else
- posix_path = winpath->get_posix () - 1;
+ *stpncpy (tmp, path, NT_MAX_PATH - 1) = '\0';
+
+ path = tmp;
+ debug_printf ("searchpath %s", path);
- debug_printf ("%s%s", mywinenv, path);
- /* Iterate over the specified path, looking for the file with and without
- executable extensions. */
+ tmp_path = tp.c_get ();
do
{
- posix_path++;
- char *eotmp = strccpy (tmp, &path, ';');
+ /* Cygnal: semicolon delim, not colon. */
+ char *eotmp = strccpy (tmp_path, &path, ';');
/* An empty path or '.' means the current directory, but we've
already tried that. */
- if (opt & FE_CWD && (tmp[0] == '\0' || (tmp[0] == '.' && tmp[1] == '\0')))
+ if ((opt & FE_CWD) && (tmp_path[0] == '\0'
+ || (tmp_path[0] == '.' && tmp_path[1] == '\0')))
continue;
- *eotmp++ = '\\';
- strcpy (eotmp, name);
+ *eotmp++ = '/';
+ stpcpy (eotmp, name);
- debug_printf ("trying %s", tmp);
+ debug_printf ("trying %s", tmp_path);
int err1;
- if ((suffix = perhaps_suffix (tmp, buf, err1, opt)) != NULL)
+ if ((suffix = perhaps_suffix (tmp_path, buf, err1, opt)) != NULL)
{
if (buf.has_acls () && check_file_access (buf, X_OK, true))
continue;
-
- if (posix == tmp)
- {
- eotmp = strccpy (tmp, &posix_path, ':');
- if (eotmp == tmp)
- *eotmp++ = '.';
- *eotmp++ = '/';
- strcpy (eotmp, name);
- }
- retval = buf.get_win32 ();
+ /* Overwrite potential symlink target with original path.
+ See comment preceeding this method. */
+ buf.set_posix (tmp_path);
+ retval = buf.get_posix ();
goto out;
}
+
}
- while (*path && *++path && (posix_path = strchr (posix_path, ':')));
+ while (*path && *++path);
errout:
- posix = NULL;
/* Couldn't find anything in the given path.
- Take the appropriate action based on null_if_not_found. */
- if (opt & FE_NNF)
- retval = NULL;
- else if (!(opt & FE_NATIVE))
- retval = name;
- else
+ Take the appropriate action based on FE_NNF. */
+ if (!(opt & FE_NNF))
{
- buf.check (name);
- retval = buf.get_win32 ();
+ buf.check (name, PC_SYM_FOLLOW | PC_POSIX);
+ retval = buf.get_posix ();
}
out:
- if (posix)
- retval = buf.set_path (posix);
- debug_printf ("%s = find_exec (%s)", (char *) buf.get_win32 (), name);
+ debug_printf ("%s = find_exec (%s)", (char *) buf.get_posix (), name);
if (known_suffix)
*known_suffix = suffix ?: strchr (buf.get_win32 (), '\0');
if (!retval && err)
@@ -332,552 +306,563 @@ child_info_spawn::worker (const char *prog_arg, const char *const *argv,
STARTUPINFOW si = {};
int looped = 0;
- myfault efault;
system_call_handle system_call (mode == _P_SYSTEM);
- if (efault.faulted ())
+
+ __try
{
- if (get_errno () == ENOMEM)
- set_errno (E2BIG);
+ child_info_types chtype;
+ if (mode == _P_OVERLAY)
+ chtype = _CH_EXEC;
else
- set_errno (EFAULT);
- res = -1;
- goto out;
- }
-
- child_info_types chtype;
- if (mode == _P_OVERLAY)
- chtype = _CH_EXEC;
- else
- chtype = _CH_SPAWN;
-
- moreinfo = cygheap_exec_info::alloc ();
+ chtype = _CH_SPAWN;
- /* CreateProcess takes one long string that is the command line (sigh).
- We need to quote any argument that has whitespace or embedded "'s. */
+ moreinfo = cygheap_exec_info::alloc ();
- int ac;
- for (ac = 0; argv[ac]; ac++)
- /* nothing */;
+ /* CreateProcess takes one long string that is the command line (sigh).
+ We need to quote any argument that has whitespace or embedded "'s. */
- int err;
- const char *ext;
- if ((ext = perhaps_suffix (prog_arg, real_path, err, FE_NADA)) == NULL)
- {
- set_errno (err);
- res = -1;
- goto out;
- }
+ int ac;
+ for (ac = 0; argv[ac]; ac++)
+ /* nothing */;
- res = newargv.setup (prog_arg, real_path, ext, ac, argv, p_type_exec);
+ int err;
+ const char *ext;
+ if ((ext = perhaps_suffix (prog_arg, real_path, err, FE_NADA)) == NULL)
+ {
+ set_errno (err);
+ res = -1;
+ __leave;
+ }
- if (res)
- goto out;
+ res = newargv.setup (prog_arg, real_path, ext, ac, argv, p_type_exec);
- if (!real_path.iscygexec () && ::cygheap->cwd.get_error ())
- {
- small_printf ("Error: Current working directory %s.\n"
- "Can't start native Windows application from here.\n\n",
- ::cygheap->cwd.get_error_desc ());
- set_errno (::cygheap->cwd.get_error ());
- res = -1;
- goto out;
- }
+ if (res)
+ __leave;
- if (ac == 3 && argv[1][0] == '/' && tolower (argv[1][1]) == 'c' &&
- (iscmd (argv[0], "command.com") || iscmd (argv[0], "cmd.exe")))
- {
- real_path.check (prog_arg);
- cmd.add ("\"");
- if (!real_path.error)
- cmd.add (real_path.get_win32 ());
- else
- cmd.add (argv[0]);
- cmd.add ("\"");
- cmd.add (" ");
- cmd.add (argv[1]);
- cmd.add (" ");
- cmd.add (argv[2]);
- real_path.set_path (argv[0]);
- null_app_name = true;
- }
- else
- {
- if (real_path.iscygexec ())
- {
- moreinfo->argc = newargv.argc;
- moreinfo->argv = newargv;
- }
- if ((wincmdln || !real_path.iscygexec ())
- && !cmd.fromargv (newargv, real_path.get_win32 (),
- real_path.iscygexec ()))
+ if (!real_path.iscygexec () && ::cygheap->cwd.get_error ())
{
+ small_printf ("Error: Current working directory %s.\n"
+ "Can't start native Windows application from here.\n\n",
+ ::cygheap->cwd.get_error_desc ());
+ set_errno (::cygheap->cwd.get_error ());
res = -1;
- goto out;
+ __leave;
}
-
- if (mode != _P_OVERLAY || !real_path.iscygexec ()
- || !DuplicateHandle (GetCurrentProcess (), myself.shared_handle (),
- GetCurrentProcess (), &moreinfo->myself_pinfo,
- 0, TRUE, DUPLICATE_SAME_ACCESS))
- moreinfo->myself_pinfo = NULL;
+ if (ac == 3 && argv[1][0] == '/' && tolower (argv[1][1]) == 'c' &&
+ (iscmd (argv[0], "command.com") || iscmd (argv[0], "cmd.exe")))
+ {
+ real_path.check (prog_arg);
+ cmd.add ("\"");
+ if (!real_path.error)
+ cmd.add (real_path.get_win32 ());
+ else
+ cmd.add (argv[0]);
+ cmd.add ("\"");
+ cmd.add (" ");
+ cmd.add (argv[1]);
+ cmd.add (" ");
+ cmd.add (argv[2]);
+ real_path.set_path (argv[0]);
+ null_app_name = true;
+ }
else
- VerifyHandle (moreinfo->myself_pinfo);
- }
+ {
+ if (real_path.iscygexec ())
+ {
+ moreinfo->argc = newargv.argc;
+ moreinfo->argv = newargv;
+ }
+ if ((wincmdln || !real_path.iscygexec ())
+ && !cmd.fromargv (newargv, real_path.get_win32 (),
+ real_path.iscygexec ()))
+ {
+ res = -1;
+ __leave;
+ }
- PROCESS_INFORMATION pi;
- pi.hProcess = pi.hThread = NULL;
- pi.dwProcessId = pi.dwThreadId = 0;
- /* Set up needed handles for stdio */
- si.dwFlags = STARTF_USESTDHANDLES;
- si.hStdInput = handle ((in__stdin < 0 ? 0 : in__stdin), false);
- si.hStdOutput = handle ((in__stdout < 0 ? 1 : in__stdout), true);
- si.hStdError = handle (2, true);
+ if (mode != _P_OVERLAY || !real_path.iscygexec ()
+ || !DuplicateHandle (GetCurrentProcess (), myself.shared_handle (),
+ GetCurrentProcess (), &moreinfo->myself_pinfo,
+ 0, TRUE, DUPLICATE_SAME_ACCESS))
+ moreinfo->myself_pinfo = NULL;
+ else
+ VerifyHandle (moreinfo->myself_pinfo);
+ }
- si.cb = sizeof (si);
+ PROCESS_INFORMATION pi;
+ pi.hProcess = pi.hThread = NULL;
+ pi.dwProcessId = pi.dwThreadId = 0;
- c_flags = GetPriorityClass (GetCurrentProcess ());
- sigproc_printf ("priority class %d", c_flags);
+ /* Set up needed handles for stdio */
+ si.dwFlags = STARTF_USESTDHANDLES | STARTF_USESHOWWINDOW;
+ si.hStdInput = handle ((in__stdin < 0 ? 0 : in__stdin), false);
+ si.hStdOutput = handle ((in__stdout < 0 ? 1 : in__stdout), true);
+ si.hStdError = handle (2, true);
+ si.wShowWindow = SW_SHOWNORMAL;
- c_flags |= CREATE_SEPARATE_WOW_VDM | CREATE_UNICODE_ENVIRONMENT;
+ si.cb = sizeof (si);
- if (wincap.has_program_compatibility_assistant ())
- {
- /* We're adding the CREATE_BREAKAWAY_FROM_JOB flag here to workaround
- issues with the "Program Compatibility Assistant (PCA) Service"
- starting with Windows Vista. For some reason, when starting long
- running sessions from mintty(*), the affected svchost.exe process
- takes more and more memory and at one point takes over the CPU. At
- this point the machine becomes unresponsive. The only way to get
- back to normal is to stop the entire mintty session, or to stop the
- PCA service. However, a process which is controlled by PCA is part
- of a compatibility job, which allows child processes to break away
- from the job. This helps to avoid this issue.
-
- First we call IsProcessInJob. It fetches the information whether or
- not we're part of a job 20 times faster than QueryInformationJobObject.
-
- (*) Note that this is not mintty's fault. It has just been observed
- with mintty in the first place. See the archives for more info:
- http://cygwin.com/ml/cygwin-developers/2012-02/msg00018.html */
-
- JOBOBJECT_BASIC_LIMIT_INFORMATION jobinfo;
- BOOL is_in_job;
-
- if (IsProcessInJob (GetCurrentProcess (), NULL, &is_in_job)
- && is_in_job
- && QueryInformationJobObject (NULL, JobObjectBasicLimitInformation,
- &jobinfo, sizeof jobinfo, NULL)
- && (jobinfo.LimitFlags & (JOB_OBJECT_LIMIT_BREAKAWAY_OK
- | JOB_OBJECT_LIMIT_SILENT_BREAKAWAY_OK)))
- {
- debug_printf ("Add CREATE_BREAKAWAY_FROM_JOB");
- c_flags |= CREATE_BREAKAWAY_FROM_JOB;
- }
- }
+ c_flags = GetPriorityClass (GetCurrentProcess ());
+ sigproc_printf ("priority class %d", c_flags);
- if (mode == _P_DETACH)
- c_flags |= DETACHED_PROCESS;
- else
- fhandler_console::need_invisible ();
+ c_flags |= CREATE_SEPARATE_WOW_VDM | CREATE_UNICODE_ENVIRONMENT;
- if (mode != _P_OVERLAY)
- myself->exec_sendsig = NULL;
- else
- {
- /* Reset sendsig so that any process which wants to send a signal
- to this pid will wait for the new process to become active.
- Save the old value in case the exec fails. */
- if (!myself->exec_sendsig)
+ if (wincap.has_program_compatibility_assistant ())
{
- myself->exec_sendsig = myself->sendsig;
- myself->exec_dwProcessId = myself->dwProcessId;
- myself->sendsig = NULL;
- reset_sendsig = true;
+ /* We're adding the CREATE_BREAKAWAY_FROM_JOB flag here to workaround
+ issues with the "Program Compatibility Assistant (PCA) Service"
+ starting with Windows Vista. For some reason, when starting long
+ running sessions from mintty(*), the affected svchost.exe process
+ takes more and more memory and at one point takes over the CPU. At
+ this point the machine becomes unresponsive. The only way to get
+ back to normal is to stop the entire mintty session, or to stop the
+ PCA service. However, a process which is controlled by PCA is part
+ of a compatibility job, which allows child processes to break away
+ from the job. This helps to avoid this issue.
+
+ First we call IsProcessInJob. It fetches the information whether or
+ not we're part of a job 20 times faster than QueryInformationJobObject.
+
+ (*) Note that this is not mintty's fault. It has just been observed
+ with mintty in the first place. See the archives for more info:
+ http://cygwin.com/ml/cygwin-developers/2012-02/msg00018.html */
+
+ JOBOBJECT_BASIC_LIMIT_INFORMATION jobinfo;
+ BOOL is_in_job;
+
+ if (IsProcessInJob (GetCurrentProcess (), NULL, &is_in_job)
+ && is_in_job
+ && QueryInformationJobObject (NULL, JobObjectBasicLimitInformation,
+ &jobinfo, sizeof jobinfo, NULL)
+ && (jobinfo.LimitFlags & (JOB_OBJECT_LIMIT_BREAKAWAY_OK
+ | JOB_OBJECT_LIMIT_SILENT_BREAKAWAY_OK)))
+ {
+ debug_printf ("Add CREATE_BREAKAWAY_FROM_JOB");
+ c_flags |= CREATE_BREAKAWAY_FROM_JOB;
+ }
}
- }
- if (null_app_name)
- runpath = NULL;
- else
- {
- USHORT len = real_path.get_nt_native_path ()->Length / sizeof (WCHAR);
- if (RtlEqualUnicodePathPrefix (real_path.get_nt_native_path (),
- &ro_u_natp, FALSE))
+ if (mode == _P_DETACH)
+ c_flags |= DETACHED_PROCESS;
+
+ if (mode != _P_OVERLAY)
+ myself->exec_sendsig = NULL;
+ else
{
- runpath = real_path.get_wide_win32_path (runpath);
- /* If the executable path length is < MAX_PATH, make sure the long
- path win32 prefix is removed from the path to make subsequent
- not long path aware native Win32 child processes happy. */
- if (len < MAX_PATH + 4)
+ /* Reset sendsig so that any process which wants to send a signal
+ to this pid will wait for the new process to become active.
+ Save the old value in case the exec fails. */
+ if (!myself->exec_sendsig)
{
- if (runpath[5] == ':')
- runpath += 4;
- else if (len < MAX_PATH + 6)
- *(runpath += 6) = L'\\';
+ myself->exec_sendsig = myself->sendsig;
+ myself->exec_dwProcessId = myself->dwProcessId;
+ myself->sendsig = NULL;
+ reset_sendsig = true;
}
}
- else if (len < NT_MAX_PATH - ro_u_globalroot.Length / sizeof (WCHAR))
- {
- UNICODE_STRING rpath;
- RtlInitEmptyUnicodeString (&rpath, runpath,
- (NT_MAX_PATH - 1) * sizeof (WCHAR));
- RtlCopyUnicodeString (&rpath, &ro_u_globalroot);
- RtlAppendUnicodeStringToString (&rpath,
- real_path.get_nt_native_path ());
- }
+ if (null_app_name)
+ runpath = NULL;
else
{
- set_errno (ENAMETOOLONG);
- res = -1;
- goto out;
- }
- }
-
- cygbench ("spawn-worker");
-
- if (!real_path.iscygexec())
- ::cygheap->fdtab.set_file_pointers_for_exec ();
+ USHORT len = real_path.get_nt_native_path ()->Length / sizeof (WCHAR);
+ if (RtlEqualUnicodePathPrefix (real_path.get_nt_native_path (),
+ &ro_u_natp, FALSE))
+ {
+ runpath = real_path.get_wide_win32_path (runpath);
+ /* If the executable path length is < MAX_PATH, make sure the long
+ path win32 prefix is removed from the path to make subsequent
+ not long path aware native Win32 child processes happy. */
+ if (len < MAX_PATH + 4)
+ {
+ if (runpath[5] == ':')
+ runpath += 4;
+ else if (len < MAX_PATH + 6)
+ *(runpath += 6) = L'\\';
+ }
+ }
+ else if (len < NT_MAX_PATH - ro_u_globalroot.Length / sizeof (WCHAR))
+ {
+ UNICODE_STRING rpath;
- moreinfo->envp = build_env (envp, envblock, moreinfo->envc,
- real_path.iscygexec ());
- if (!moreinfo->envp || !envblock)
- {
- set_errno (E2BIG);
- res = -1;
- goto out;
- }
- set (chtype, real_path.iscygexec ());
- __stdin = in__stdin;
- __stdout = in__stdout;
- record_children ();
-
- si.lpReserved2 = (LPBYTE) this;
- si.cbReserved2 = sizeof (*this);
-
- /* Depends on set call above.
- Some file types might need extra effort in the parent after CreateProcess
- and before copying the datastructures to the child. So we have to start
- the child in suspend state, unfortunately, to avoid a race condition. */
- if (!newargv.win16_exe
- && (!iscygwin () || mode != _P_OVERLAY
- || ::cygheap->fdtab.need_fixup_before ()))
- c_flags |= CREATE_SUSPENDED;
- /* If a native application should be spawned, we test here if the spawning
- process is running in a console and, if so, if it's a foreground or
- background process. If it's a background process, we start the native
- process with the CREATE_NEW_PROCESS_GROUP flag set. This lets the native
- process ignore Ctrl-C by default. If we don't do that, pressing Ctrl-C
- in a console will break native processes running in the background,
- because the Ctrl-C event is sent to all processes in the console, unless
- they ignore it explicitely. CREATE_NEW_PROCESS_GROUP does that for us. */
- if (!iscygwin () && fhandler_console::exists ()
- && fhandler_console::tc_getpgid () != myself->pgid)
- c_flags |= CREATE_NEW_PROCESS_GROUP;
- refresh_cygheap ();
-
- if (mode == _P_DETACH)
- /* all set */;
- else if (mode != _P_OVERLAY || !my_wr_proc_pipe)
- prefork ();
- else
- wr_proc_pipe = my_wr_proc_pipe;
-
- /* Don't allow child to inherit these handles if it's not a Cygwin program.
- wr_proc_pipe will be injected later. parent won't be used by the child
- so there is no reason for the child to have it open as it can confuse
- ps into thinking that children of windows processes are all part of
- the same "execed" process.
- FIXME: Someday, make it so that parent is never created when starting
- non-Cygwin processes. */
- if (!iscygwin ())
- {
- SetHandleInformation (wr_proc_pipe, HANDLE_FLAG_INHERIT, 0);
- SetHandleInformation (parent, HANDLE_FLAG_INHERIT, 0);
- }
- /* FIXME: racy */
- if (mode != _P_OVERLAY)
- SetHandleInformation (my_wr_proc_pipe, HANDLE_FLAG_INHERIT, 0);
- parent_winpid = GetCurrentProcessId ();
-
-loop:
- /* When ruid != euid we create the new process under the current original
- account and impersonate in child, this way maintaining the different
- effective vs. real ids.
- FIXME: If ruid != euid and ruid != saved_uid we currently give
- up on ruid. The new process will have ruid == euid. */
- ::cygheap->user.deimpersonate ();
-
- if (!real_path.iscygexec () && mode == _P_OVERLAY)
- myself->process_state |= PID_NOTCYGWIN;
-
- wchar_t wcmd[(size_t) cmd];
- if (!::cygheap->user.issetuid ()
- || (::cygheap->user.saved_uid == ::cygheap->user.real_uid
- && ::cygheap->user.saved_gid == ::cygheap->user.real_gid
- && !::cygheap->user.groups.issetgroups ()
- && !::cygheap->user.setuid_to_restricted))
- {
- rc = CreateProcessW (runpath, /* image name - with full path */
- cmd.wcs (wcmd),/* what was passed to exec */
- &sec_none_nih, /* process security attrs */
- &sec_none_nih, /* thread security attrs */
- TRUE, /* inherit handles from parent */
- c_flags,
- envblock, /* environment */
- NULL,
- &si,
- &pi);
- }
- else
- {
- /* Give access to myself */
- if (mode == _P_OVERLAY)
- myself.set_acl();
-
- WCHAR wstname[1024] = { L'\0' };
- HWINSTA hwst_orig = NULL, hwst = NULL;
- HDESK hdsk_orig = NULL, hdsk = NULL;
- PSECURITY_ATTRIBUTES sa;
- DWORD n;
-
- hwst_orig = GetProcessWindowStation ();
- hdsk_orig = GetThreadDesktop (GetCurrentThreadId ());
- GetUserObjectInformationW (hwst_orig, UOI_NAME, wstname, 1024, &n);
- /* Prior to Vista it was possible to start a service with the
- "Interact with desktop" flag. This started the service in the
- interactive window station of the console. A big security
- risk, but we don't want to disable this behaviour for older
- OSes because it's still heavily used by some users. They have
- been warned. */
- if (!::cygheap->user.setuid_to_restricted
- && wcscasecmp (wstname, L"WinSta0") != 0)
- {
- WCHAR sid[128];
-
- sa = sec_user ((PSECURITY_ATTRIBUTES) alloca (1024),
- ::cygheap->user.sid ());
- /* We're creating a window station per user, not per logon session.
- First of all we might not have a valid logon session for
- the user (logon by create_token), and second, it doesn't
- make sense in terms of security to create a new window
- station for every logon of the same user. It just fills up
- the system with window stations for no good reason. */
- hwst = CreateWindowStationW (::cygheap->user.get_windows_id (sid), 0,
- GENERIC_READ | GENERIC_WRITE, sa);
- if (!hwst)
- system_printf ("CreateWindowStation failed, %E");
- else if (!SetProcessWindowStation (hwst))
- system_printf ("SetProcessWindowStation failed, %E");
- else if (!(hdsk = CreateDesktopW (L"Default", NULL, NULL, 0,
- GENERIC_ALL, sa)))
- system_printf ("CreateDesktop failed, %E");
+ RtlInitEmptyUnicodeString (&rpath, runpath,
+ (NT_MAX_PATH - 1) * sizeof (WCHAR));
+ RtlCopyUnicodeString (&rpath, &ro_u_globalroot);
+ RtlAppendUnicodeStringToString (&rpath,
+ real_path.get_nt_native_path ());
+ }
else
{
- wcpcpy (wcpcpy (wstname, sid), L"\\Default");
- si.lpDesktop = wstname;
- debug_printf ("Desktop: %W", si.lpDesktop);
+ set_errno (ENAMETOOLONG);
+ res = -1;
+ __leave;
}
}
- rc = CreateProcessAsUserW (::cygheap->user.primary_token (),
- runpath, /* image name - with full path */
- cmd.wcs (wcmd),/* what was passed to exec */
- &sec_none_nih, /* process security attrs */
- &sec_none_nih, /* thread security attrs */
- TRUE, /* inherit handles from parent */
- c_flags,
- envblock, /* environment */
- NULL,
- &si,
- &pi);
- if (hwst)
+ cygbench ("spawn-worker");
+
+ if (!real_path.iscygexec())
+ ::cygheap->fdtab.set_file_pointers_for_exec ();
+
+ /* If we switch the user, merge the user's Windows environment. */
+ bool switch_user = ::cygheap->user.issetuid ()
+ && (::cygheap->user.saved_uid
+ != ::cygheap->user.real_uid);
+ moreinfo->envp = build_env (envp, envblock, moreinfo->envc,
+ real_path.iscygexec (),
+ switch_user ? ::cygheap->user.primary_token ()
+ : NULL);
+ if (!moreinfo->envp || !envblock)
{
- SetProcessWindowStation (hwst_orig);
- CloseWindowStation (hwst);
+ set_errno (E2BIG);
+ res = -1;
+ __leave;
}
- if (hdsk)
+ set (chtype, real_path.iscygexec ());
+ __stdin = in__stdin;
+ __stdout = in__stdout;
+ record_children ();
+
+ si.lpReserved2 = (LPBYTE) this;
+ si.cbReserved2 = sizeof (*this);
+
+ /* Depends on set call above.
+ Some file types might need extra effort in the parent after CreateProcess
+ and before copying the datastructures to the child. So we have to start
+ the child in suspend state, unfortunately, to avoid a race condition. */
+ if (!newargv.win16_exe
+ && (!iscygwin () || mode != _P_OVERLAY
+ || ::cygheap->fdtab.need_fixup_before ()))
+ c_flags |= CREATE_SUSPENDED;
+ /* If a native application should be spawned, we test here if the spawning
+ process is running in a console and, if so, if it's a foreground or
+ background process. If it's a background process, we start the native
+ process with the CREATE_NEW_PROCESS_GROUP flag set. This lets the native
+ process ignore Ctrl-C by default. If we don't do that, pressing Ctrl-C
+ in a console will break native processes running in the background,
+ because the Ctrl-C event is sent to all processes in the console, unless
+ they ignore it explicitely. CREATE_NEW_PROCESS_GROUP does that for us. */
+ if (!iscygwin () && fhandler_console::exists ()
+ && fhandler_console::tc_getpgid () != myself->pgid)
+ c_flags |= CREATE_NEW_PROCESS_GROUP;
+ refresh_cygheap ();
+
+ if (mode == _P_DETACH)
+ /* all set */;
+ else if (mode != _P_OVERLAY || !my_wr_proc_pipe)
+ prefork ();
+ else
+ wr_proc_pipe = my_wr_proc_pipe;
+
+ /* Don't allow child to inherit these handles if it's not a Cygwin program.
+ wr_proc_pipe will be injected later. parent won't be used by the child
+ so there is no reason for the child to have it open as it can confuse
+ ps into thinking that children of windows processes are all part of
+ the same "execed" process.
+ FIXME: Someday, make it so that parent is never created when starting
+ non-Cygwin processes. */
+ if (!iscygwin ())
{
- SetThreadDesktop (hdsk_orig);
- CloseDesktop (hdsk);
+ SetHandleInformation (wr_proc_pipe, HANDLE_FLAG_INHERIT, 0);
+ SetHandleInformation (parent, HANDLE_FLAG_INHERIT, 0);
}
- }
-
- if (mode != _P_OVERLAY)
- SetHandleInformation (my_wr_proc_pipe, HANDLE_FLAG_INHERIT,
- HANDLE_FLAG_INHERIT);
-
- /* Set errno now so that debugging messages from it appear before our
- final debugging message [this is a general rule for debugging
- messages]. */
- if (!rc)
- {
- __seterrno ();
- syscall_printf ("CreateProcess failed, %E");
- /* If this was a failed exec, restore the saved sendsig. */
- if (reset_sendsig)
+ /* FIXME: racy */
+ if (mode != _P_OVERLAY)
+ SetHandleInformation (my_wr_proc_pipe, HANDLE_FLAG_INHERIT, 0);
+ parent_winpid = GetCurrentProcessId ();
+
+ /* Workaround for the issue of the window of a spawned process
+ not coming to the foreground. A useless call to TranslateMessage
+ cures this somehow. */
+ MSG dummy = { 0 };
+ (void) TranslateMessage(&dummy);
+
+ loop:
+ /* When ruid != euid we create the new process under the current original
+ account and impersonate in child, this way maintaining the different
+ effective vs. real ids.
+ FIXME: If ruid != euid and ruid != saved_uid we currently give
+ up on ruid. The new process will have ruid == euid. */
+ ::cygheap->user.deimpersonate ();
+
+ if (!real_path.iscygexec () && mode == _P_OVERLAY)
+ myself->process_state |= PID_NOTCYGWIN;
+
+ wchar_t wcmd[(size_t) cmd];
+ if (!::cygheap->user.issetuid ()
+ || (::cygheap->user.saved_uid == ::cygheap->user.real_uid
+ && ::cygheap->user.saved_gid == ::cygheap->user.real_gid
+ && !::cygheap->user.groups.issetgroups ()
+ && !::cygheap->user.setuid_to_restricted))
{
- myself->sendsig = myself->exec_sendsig;
- myself->exec_sendsig = NULL;
+ rc = CreateProcessW (runpath, /* image name - with full path */
+ cmd.wcs (wcmd),/* what was passed to exec */
+ &sec_none_nih, /* process security attrs */
+ &sec_none_nih, /* thread security attrs */
+ TRUE, /* inherit handles from parent */
+ c_flags,
+ envblock, /* environment */
+ NULL,
+ &si,
+ &pi);
+ }
+ else
+ {
+ /* Give access to myself */
+ if (mode == _P_OVERLAY)
+ myself.set_acl();
+
+ WCHAR wstname[1024] = { L'\0' };
+ HWINSTA hwst_orig = NULL, hwst = NULL;
+ HDESK hdsk_orig = NULL, hdsk = NULL;
+ PSECURITY_ATTRIBUTES sa;
+ DWORD n;
+
+ hwst_orig = GetProcessWindowStation ();
+ hdsk_orig = GetThreadDesktop (GetCurrentThreadId ());
+ GetUserObjectInformationW (hwst_orig, UOI_NAME, wstname, 1024, &n);
+ /* Prior to Vista it was possible to start a service with the
+ "Interact with desktop" flag. This started the service in the
+ interactive window station of the console. A big security
+ risk, but we don't want to disable this behaviour for older
+ OSes because it's still heavily used by some users. They have
+ been warned. */
+ if (!::cygheap->user.setuid_to_restricted
+ && wcscasecmp (wstname, L"WinSta0") != 0)
+ {
+ WCHAR sid[128];
+
+ sa = sec_user ((PSECURITY_ATTRIBUTES) alloca (1024),
+ ::cygheap->user.sid ());
+ /* We're creating a window station per user, not per logon session.
+ First of all we might not have a valid logon session for
+ the user (logon by create_token), and second, it doesn't
+ make sense in terms of security to create a new window
+ station for every logon of the same user. It just fills up
+ the system with window stations for no good reason. */
+ hwst = CreateWindowStationW (::cygheap->user.get_windows_id (sid),
+ 0, GENERIC_READ | GENERIC_WRITE, sa);
+ if (!hwst)
+ system_printf ("CreateWindowStation failed, %E");
+ else if (!SetProcessWindowStation (hwst))
+ system_printf ("SetProcessWindowStation failed, %E");
+ else if (!(hdsk = CreateDesktopW (L"Default", NULL, NULL, 0,
+ GENERIC_ALL, sa)))
+ system_printf ("CreateDesktop failed, %E");
+ else
+ {
+ wcpcpy (wcpcpy (wstname, sid), L"\\Default");
+ si.lpDesktop = wstname;
+ debug_printf ("Desktop: %W", si.lpDesktop);
+ }
+ }
+
+ rc = CreateProcessAsUserW (::cygheap->user.primary_token (),
+ runpath, /* image name - with full path */
+ cmd.wcs (wcmd),/* what was passed to exec */
+ &sec_none_nih, /* process security attrs */
+ &sec_none_nih, /* thread security attrs */
+ TRUE, /* inherit handles from parent */
+ c_flags,
+ envblock, /* environment */
+ NULL,
+ &si,
+ &pi);
+ if (hwst)
+ {
+ SetProcessWindowStation (hwst_orig);
+ CloseWindowStation (hwst);
+ }
+ if (hdsk)
+ {
+ SetThreadDesktop (hdsk_orig);
+ CloseDesktop (hdsk);
+ }
}
- myself->process_state &= ~PID_NOTCYGWIN;
- /* Reset handle inheritance to default when the execution of a non-Cygwin
- process fails. Only need to do this for _P_OVERLAY since the handle will
- be closed otherwise. Don't need to do this for 'parent' since it will
- be closed in every case. See FIXME above. */
- if (!iscygwin () && mode == _P_OVERLAY)
- SetHandleInformation (wr_proc_pipe, HANDLE_FLAG_INHERIT,
- HANDLE_FLAG_INHERIT);
- if (wr_proc_pipe == my_wr_proc_pipe)
- wr_proc_pipe = NULL; /* We still own it: don't nuke in destructor */
- /* Restore impersonation. In case of _P_OVERLAY this isn't
- allowed since it would overwrite child data. */
if (mode != _P_OVERLAY)
- ::cygheap->user.reimpersonate ();
+ SetHandleInformation (my_wr_proc_pipe, HANDLE_FLAG_INHERIT,
+ HANDLE_FLAG_INHERIT);
- res = -1;
- goto out;
- }
+ /* Set errno now so that debugging messages from it appear before our
+ final debugging message [this is a general rule for debugging
+ messages]. */
+ if (!rc)
+ {
+ __seterrno ();
+ syscall_printf ("CreateProcess failed, %E");
+ /* If this was a failed exec, restore the saved sendsig. */
+ if (reset_sendsig)
+ {
+ myself->sendsig = myself->exec_sendsig;
+ myself->exec_sendsig = NULL;
+ }
+ myself->process_state &= ~PID_NOTCYGWIN;
+ /* Reset handle inheritance to default when the execution of a non-Cygwin
+ process fails. Only need to do this for _P_OVERLAY since the handle will
+ be closed otherwise. Don't need to do this for 'parent' since it will
+ be closed in every case. See FIXME above. */
+ if (!iscygwin () && mode == _P_OVERLAY)
+ SetHandleInformation (wr_proc_pipe, HANDLE_FLAG_INHERIT,
+ HANDLE_FLAG_INHERIT);
+ if (wr_proc_pipe == my_wr_proc_pipe)
+ wr_proc_pipe = NULL; /* We still own it: don't nuke in destructor */
+
+ /* Restore impersonation. In case of _P_OVERLAY this isn't
+ allowed since it would overwrite child data. */
+ if (mode != _P_OVERLAY)
+ ::cygheap->user.reimpersonate ();
+
+ res = -1;
+ __leave;
+ }
- /* The CREATE_SUSPENDED case is handled below */
- if (iscygwin () && !(c_flags & CREATE_SUSPENDED))
- strace.write_childpid (pi.dwProcessId);
+ /* The CREATE_SUSPENDED case is handled below */
+ if (iscygwin () && !(c_flags & CREATE_SUSPENDED))
+ strace.write_childpid (pi.dwProcessId);
- /* Fixup the parent data structures if needed and resume the child's
- main thread. */
- if (::cygheap->fdtab.need_fixup_before ())
- ::cygheap->fdtab.fixup_before_exec (pi.dwProcessId);
+ /* Fixup the parent data structures if needed and resume the child's
+ main thread. */
+ if (::cygheap->fdtab.need_fixup_before ())
+ ::cygheap->fdtab.fixup_before_exec (pi.dwProcessId);
- if (mode != _P_OVERLAY)
- cygpid = cygwin_pid (pi.dwProcessId);
- else
- cygpid = myself->pid;
+ if (mode != _P_OVERLAY)
+ cygpid = cygwin_pid (pi.dwProcessId);
+ else
+ cygpid = myself->pid;
- /* We print the original program name here so the user can see that too. */
- syscall_printf ("pid %d, prog_arg %s, cmd line %.9500s)",
- rc ? cygpid : (unsigned int) -1, prog_arg, (const char *) cmd);
+ /* We print the original program name here so the user can see that too. */
+ syscall_printf ("pid %d, prog_arg %s, cmd line %.9500s)",
+ rc ? cygpid : (unsigned int) -1, prog_arg, (const char *) cmd);
- /* Name the handle similarly to proc_subproc. */
- ProtectHandle1 (pi.hProcess, childhProc);
+ /* Name the handle similarly to proc_subproc. */
+ ProtectHandle1 (pi.hProcess, childhProc);
- if (mode == _P_OVERLAY)
- {
- myself->dwProcessId = pi.dwProcessId;
- strace.execing = 1;
- myself.hProcess = hExeced = pi.hProcess;
- real_path.get_wide_win32_path (myself->progname); // FIXME: race?
- sigproc_printf ("new process name %W", myself->progname);
- if (!iscygwin ())
- close_all_files ();
- }
- else
- {
- myself->set_has_pgid_children ();
- ProtectHandle (pi.hThread);
- pinfo child (cygpid,
- PID_IN_USE | (real_path.iscygexec () ? 0 : PID_NOTCYGWIN));
- if (!child)
+ if (mode == _P_OVERLAY)
{
- syscall_printf ("pinfo failed");
- if (get_errno () != ENOMEM)
- set_errno (EAGAIN);
- res = -1;
- goto out;
+ myself->dwProcessId = pi.dwProcessId;
+ strace.execing = 1;
+ myself.hProcess = hExeced = pi.hProcess;
+ real_path.get_wide_win32_path (myself->progname); // FIXME: race?
+ sigproc_printf ("new process name %W", myself->progname);
+ if (!iscygwin ())
+ close_all_files ();
}
- child->dwProcessId = pi.dwProcessId;
- child.hProcess = pi.hProcess;
-
- real_path.get_wide_win32_path (child->progname);
- /* FIXME: This introduces an unreferenced, open handle into the child.
- The purpose is to keep the pid shared memory open so that all of
- the fields filled out by child.remember do not disappear and so there
- is not a brief period during which the pid is not available.
- However, we should try to find another way to do this eventually. */
- DuplicateHandle (GetCurrentProcess (), child.shared_handle (),
- pi.hProcess, NULL, 0, 0, DUPLICATE_SAME_ACCESS);
- child->start_time = time (NULL); /* Register child's starting time. */
- child->nice = myself->nice;
- postfork (child);
- if (!child.remember (mode == _P_DETACH))
+ else
{
- /* FIXME: Child in strange state now */
- CloseHandle (pi.hProcess);
- ForceCloseHandle (pi.hThread);
- res = -1;
- goto out;
+ myself->set_has_pgid_children ();
+ ProtectHandle (pi.hThread);
+ pinfo child (cygpid,
+ PID_IN_USE | (real_path.iscygexec () ? 0 : PID_NOTCYGWIN));
+ if (!child)
+ {
+ syscall_printf ("pinfo failed");
+ if (get_errno () != ENOMEM)
+ set_errno (EAGAIN);
+ res = -1;
+ __leave;
+ }
+ child->dwProcessId = pi.dwProcessId;
+ child.hProcess = pi.hProcess;
+
+ real_path.get_wide_win32_path (child->progname);
+ /* FIXME: This introduces an unreferenced, open handle into the child.
+ The purpose is to keep the pid shared memory open so that all of
+ the fields filled out by child.remember do not disappear and so there
+ is not a brief period during which the pid is not available.
+ However, we should try to find another way to do this eventually. */
+ DuplicateHandle (GetCurrentProcess (), child.shared_handle (),
+ pi.hProcess, NULL, 0, 0, DUPLICATE_SAME_ACCESS);
+ child->start_time = time (NULL); /* Register child's starting time. */
+ child->nice = myself->nice;
+ postfork (child);
+ if (!child.remember (mode == _P_DETACH))
+ {
+ /* FIXME: Child in strange state now */
+ CloseHandle (pi.hProcess);
+ ForceCloseHandle (pi.hThread);
+ res = -1;
+ __leave;
+ }
}
- }
- /* Start the child running */
- if (c_flags & CREATE_SUSPENDED)
- {
- /* Inject a non-inheritable wr_proc_pipe handle into child so that we
- can accurately track when the child exits without keeping this
- process waiting around for it to exit. */
- if (!iscygwin ())
- DuplicateHandle (GetCurrentProcess (), wr_proc_pipe, pi.hProcess, NULL,
- 0, false, DUPLICATE_SAME_ACCESS);
- ResumeThread (pi.hThread);
- if (iscygwin ())
- strace.write_childpid (pi.dwProcessId);
- }
- ForceCloseHandle (pi.hThread);
+ /* Start the child running */
+ if (c_flags & CREATE_SUSPENDED)
+ {
+ /* Inject a non-inheritable wr_proc_pipe handle into child so that we
+ can accurately track when the child exits without keeping this
+ process waiting around for it to exit. */
+ if (!iscygwin ())
+ DuplicateHandle (GetCurrentProcess (), wr_proc_pipe, pi.hProcess, NULL,
+ 0, false, DUPLICATE_SAME_ACCESS);
+ ResumeThread (pi.hThread);
+ if (iscygwin ())
+ strace.write_childpid (pi.dwProcessId);
+ }
+ ForceCloseHandle (pi.hThread);
- sigproc_printf ("spawned windows pid %d", pi.dwProcessId);
+ sigproc_printf ("spawned windows pid %d", pi.dwProcessId);
- bool synced;
- if ((mode == _P_DETACH || mode == _P_NOWAIT) && !iscygwin ())
- synced = false;
- else
- /* Just mark a non-cygwin process as 'synced'. We will still eventually
- wait for it to exit in maybe_set_exit_code_from_windows(). */
- synced = iscygwin () ? sync (pi.dwProcessId, pi.hProcess, INFINITE) : true;
+ bool synced;
+ if ((mode == _P_DETACH || mode == _P_NOWAIT) && !iscygwin ())
+ synced = false;
+ else
+ /* Just mark a non-cygwin process as 'synced'. We will still eventually
+ wait for it to exit in maybe_set_exit_code_from_windows(). */
+ synced = iscygwin () ? sync (pi.dwProcessId, pi.hProcess, INFINITE) : true;
- switch (mode)
- {
- case _P_OVERLAY:
- myself.hProcess = pi.hProcess;
- if (!synced)
+ switch (mode)
{
- if (!proc_retry (pi.hProcess))
+ case _P_OVERLAY:
+ myself.hProcess = pi.hProcess;
+ if (!synced)
{
- looped++;
- goto loop;
+ if (!proc_retry (pi.hProcess))
+ {
+ looped++;
+ goto loop;
+ }
+ close_all_files (true);
}
- close_all_files (true);
+ else
+ {
+ if (iscygwin ())
+ close_all_files (true);
+ if (!my_wr_proc_pipe
+ && WaitForSingleObject (pi.hProcess, 0) == WAIT_TIMEOUT)
+ wait_for_myself ();
+ }
+ myself.exit (EXITCODE_NOSET);
+ break;
+ case _P_WAIT:
+ case _P_SYSTEM:
+ system_call.arm ();
+ if (waitpid (cygpid, &res, 0) != cygpid)
+ res = -1;
+ break;
+ case _P_DETACH:
+ res = 0; /* Lost all memory of this child. */
+ break;
+ case _P_NOWAIT:
+ case _P_NOWAITO:
+ case _P_VFORK:
+ res = cygpid;
+ break;
+ default:
+ break;
}
+ }
+ __except (NO_ERROR)
+ {
+ if (get_errno () == ENOMEM)
+ set_errno (E2BIG);
else
- {
- if (iscygwin ())
- close_all_files (true);
- if (!my_wr_proc_pipe
- && WaitForSingleObject (pi.hProcess, 0) == WAIT_TIMEOUT)
- wait_for_myself ();
- }
- myself.exit (EXITCODE_NOSET);
- break;
- case _P_WAIT:
- case _P_SYSTEM:
- system_call.arm ();
- if (waitpid (cygpid, &res, 0) != cygpid)
- res = -1;
- break;
- case _P_DETACH:
- res = 0; /* Lost all memory of this child. */
- break;
- case _P_NOWAIT:
- case _P_NOWAITO:
- case _P_VFORK:
- res = cygpid;
- break;
- default:
- break;
+ set_errno (EFAULT);
+ res = -1;
}
-
-out:
+ __endtry
this->cleanup ();
if (envblock)
free (envblock);
@@ -901,15 +886,22 @@ spawnve (int mode, const char *path, const char *const *argv,
{
static char *const empty_env[] = { NULL };
- int ret;
-#ifdef NEWVFORK
- vfork_save *vf = vfork_storage.val ();
+ /* Cygnal hack! If the path is "/bin/sh" and argv is of the three-element
+ form { "<name>", "-c", "<cmd>" } then let us rewrite argv to:
+ { "<path-to-cmd.exe>", "/c", "<cmd>" } and invoke "<path-to-cmd.exe>".
+ This will automatically "port" many programs that use hard-coded /bin/sh
+ for command execution. For instance, we can use the Cygwin-packaged
+ gawk.exe binary over Cygnal; awk pipes will work using cmd.exe.*/
- if (vf != NULL && (vf->pid < 0) && mode == _P_OVERLAY)
- mode = _P_NOWAIT;
- else
- vf = NULL;
-#endif
+ if (argv[0] && argv[1] && argv[2] && !argv[3] &&
+ !strcmp(path, "/bin/sh") && !strcmp(argv[1], "-c"))
+ {
+ const char *argv_sub[3] = { get_cmd_exe_path(), "/c", argv[2] };
+ return spawnve (mode, argv_sub[0],
+ const_cast<const char *const *>(argv_sub), envp);
+ }
+
+ int ret;
syscall_printf ("spawnve (%s, %s, %p)", path, argv[0], envp);
@@ -930,16 +922,6 @@ spawnve (int mode, const char *path, const char *const *argv,
case _P_DETACH:
case _P_SYSTEM:
ret = ch_spawn.worker (path, argv, envp, mode);
-#ifdef NEWVFORK
- if (vf)
- {
- if (ret > 0)
- {
- debug_printf ("longjmping due to vfork");
- vf->restore_pid (ret);
- }
- }
-#endif
break;
default:
set_errno (EINVAL);
@@ -1105,6 +1087,7 @@ av::setup (const char *prog_arg, path_conv& real_path, const char *ext,
real_path.set_cygexec (true);
break;
}
+ SetLastError (RtlNtStatusToDosError (status));
goto err;
}
if (!GetFileSizeEx (h, &size))
@@ -1139,28 +1122,31 @@ av::setup (const char *prog_arg, path_conv& real_path, const char *ext,
}
{
- myfault efault;
- if (efault.faulted ())
+ __try
{
- UnmapViewOfFile (buf);
- CloseHandle (hm);
- real_path.set_cygexec (false);
- break;
+ if (buf[0] == 'M' && buf[1] == 'Z')
+ {
+ WORD subsys;
+ unsigned off = (unsigned char) buf[0x18] | (((unsigned char) buf[0x19]) << 8);
+ win16_exe = off < sizeof (IMAGE_DOS_HEADER);
+ if (!win16_exe)
+ real_path.set_cygexec (hook_or_detect_cygwin (buf, NULL,
+ subsys, hm));
+ else
+ real_path.set_cygexec (false);
+ UnmapViewOfFile (buf);
+ CloseHandle (hm);
+ break;
+ }
}
- if (buf[0] == 'M' && buf[1] == 'Z')
+ __except (NO_ERROR)
{
- WORD subsys;
- unsigned off = (unsigned char) buf[0x18] | (((unsigned char) buf[0x19]) << 8);
- win16_exe = off < sizeof (IMAGE_DOS_HEADER);
- if (!win16_exe)
- real_path.set_cygexec (hook_or_detect_cygwin (buf, NULL,
- subsys, hm));
- else
- real_path.set_cygexec (false);
UnmapViewOfFile (buf);
CloseHandle (hm);
+ real_path.set_cygexec (false);
break;
}
+ __endtry
}
CloseHandle (hm);
@@ -1171,6 +1157,8 @@ av::setup (const char *prog_arg, path_conv& real_path, const char *ext,
{
ptr += strspn (ptr, " \t");
size_t len = strcspn (ptr, "\r\n");
+ while (ptr[len - 1] == ' ' || ptr[len - 1] == '\t')
+ len--;
if (len)
{
char *namebuf = (char *) alloca (len + 1);
@@ -1208,7 +1196,10 @@ av::setup (const char *prog_arg, path_conv& real_path, const char *ext,
}
if (ascii_strcasematch (ext, ".com"))
break;
- pgm = (char *) "/bin/sh";
+ if ((pgm = const_cast<char *>(get_cmd_exe_path())) == NULL) {
+ set_errno (EOPNOTSUPP);
+ return -1;
+ }
arg1 = NULL;
}
@@ -1229,10 +1220,8 @@ av::setup (const char *prog_arg, path_conv& real_path, const char *ext,
if (arg1)
unshift (arg1);
- /* FIXME: This should not be using FE_NATIVE. It should be putting
- the posix path on the argv list. */
- find_exec (pgm, real_path, "PATH=", FE_NATIVE, &ext);
- unshift (real_path.get_win32 (), 1);
+ find_exec (pgm, real_path, "PATH", FE_NADA, &ext);
+ unshift (real_path.get_posix ());
}
if (real_path.iscygexec ())
dup_all ();
@@ -1242,3 +1231,28 @@ err:
__seterrno ();
return -1;
}
+
+static const char *cmd_exe_path = NULL;
+
+static void
+init_cmd_exe_path(void)
+{
+ char sysdir[NT_MAX_PATH];
+ char cmdname[] = "\\cmd.exe";
+ unsigned int nchars = GetSystemDirectoryA(sysdir, sizeof sysdir);
+
+ if (nchars < sizeof sysdir)
+ {
+ unsigned int total = nchars + sizeof cmdname;
+ char *path = static_cast<char *>(cmalloc_abort(HEAP_STR, total));
+ snprintf(path, total, "%s%s", sysdir, cmdname);
+ cmd_exe_path = path;
+ }
+}
+
+const char *get_cmd_exe_path()
+{
+ static pthread_once_t cmd_exe_once = PTHREAD_ONCE_INIT;
+ pthread_once(&cmd_exe_once, init_cmd_exe_path);
+ return cmd_exe_path;
+}
diff --git a/winsup/cygwin/spinlock.h b/winsup/cygwin/spinlock.h
index e43d19c88..f244355be 100644
--- a/winsup/cygwin/spinlock.h
+++ b/winsup/cygwin/spinlock.h
@@ -1,7 +1,5 @@
/* spinlock.h: Header file for cygwin time-sensitive synchronization primitive.
- Copyright 2010 Red Hat, Inc.
-
This file is part of Cygwin.
This software is a copyrighted work licensed under the terms of the
diff --git a/winsup/cygwin/stackdump.sgml b/winsup/cygwin/stackdump.sgml
deleted file mode 100644
index 1969e2e6f..000000000
--- a/winsup/cygwin/stackdump.sgml
+++ /dev/null
@@ -1,13 +0,0 @@
-<sect1 id="func-cygwin-stackdump">
-<title>cygwin_stackdump</title>
-
-<funcsynopsis><funcprototype>
-<funcdef>extern "C" void
-<function>cygwin_stackdump</function></funcdef>
-<void />
-</funcprototype></funcsynopsis>
-
-<para> Outputs a stackdump to stderr from the called location.
-</para>
-
-</sect1>
diff --git a/winsup/cygwin/strace.cc b/winsup/cygwin/strace.cc
index c77882007..a05a4e008 100644
--- a/winsup/cygwin/strace.cc
+++ b/winsup/cygwin/strace.cc
@@ -1,8 +1,5 @@
/* strace.cc: system/windows tracing
- Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008, 2009, 2010, 2011, 2012 Red Hat, Inc.
-
This file is part of Cygwin.
This software is a copyrighted work licensed under the terms of the
@@ -10,8 +7,6 @@ Cygwin license. Please consult the file "CYGWIN_LICENSE" for
details. */
#include "winsup.h"
-#include <wingdi.h>
-#include <winuser.h>
#include <ctype.h>
#include "cygerrno.h"
#include "pinfo.h"
@@ -23,9 +18,13 @@ details. */
#include "dtable.h"
#include "cygheap.h"
#include "child_info.h"
+#include "sync.h"
-#define PROTECT(x) x[sizeof (x)-1] = 0
-#define CHECK(x) if (x[sizeof (x)-1] != 0) { small_printf ("array bound exceeded %d\n", __LINE__); ExitProcess (1); }
+#define PROTECT(x) {x[NT_MAX_PATH - 1] = '\0';}
+#define CHECK(x) if (x[NT_MAX_PATH - 1] != '\0') \
+ { small_printf ("array bound exceeded %d\n", __LINE__); \
+ ExitProcess (1); \
+ }
class strace NO_COPY strace;
@@ -37,24 +36,25 @@ strace::activate (bool isfork)
if (!_active && being_debugged ())
{
char buf[30];
- __small_sprintf (buf, "cYg%8x %lx %d", _STRACE_INTERFACE_ACTIVATE_ADDR, &_active, isfork);
+ __small_sprintf (buf, "cYg%8x %lx %d",
+ _STRACE_INTERFACE_ACTIVATE_ADDR, &_active, isfork);
OutputDebugString (buf);
if (_active)
{
char pidbuf[80];
- WCHAR progname_buf[NT_MAX_PATH - 512];
- WCHAR *progname;
+ PWCHAR progname;
if (myself)
{
- __small_sprintf (pidbuf, "(pid %d, ppid %d, windows pid %u)", myself->pid,
- myself->ppid ?: 1, GetCurrentProcessId ());
+ __small_sprintf (pidbuf, "(pid %d, ppid %d, windows pid %u)",
+ myself->pid, myself->ppid ?: 1,
+ GetCurrentProcessId ());
progname = myself->progname;
}
else
{
- GetModuleFileNameW (NULL, progname_buf, sizeof (myself->progname));
- __small_sprintf (pidbuf, "(windows pid %u)", GetCurrentProcessId ());
- progname = progname_buf;
+ __small_sprintf (pidbuf, "(windows pid %u)",
+ GetCurrentProcessId ());
+ progname = global_progname;
}
prntf (1, NULL, "**********************************************");
prntf (1, NULL, "Program name: %W %s", progname, pidbuf);
@@ -152,31 +152,32 @@ strace::vsprntf (char *buf, const char *func, const char *infmt, va_list ap)
else
{
PWCHAR pn = NULL;
- WCHAR progname[NT_MAX_PATH];
- if (!cygwin_finished_initializing)
- pn = (myself) ? myself->progname : NULL;
- else if (__progname)
- sys_mbstowcs(pn = progname, NT_MAX_PATH, __progname);
-
- PWCHAR p;
- if (!pn)
- GetModuleFileNameW (NULL, pn = progname, sizeof (progname));
- if (!pn)
- /* hmm */;
- else if ((p = wcsrchr (pn, L'\\')) != NULL)
- p++;
- else if ((p = wcsrchr (pn, L'/')) != NULL)
- p++;
+ WCHAR progname[NAME_MAX];
+ if (cygwin_finished_initializing && __progname)
+ {
+ char *p = strrchr (__progname, '/');
+ if (p)
+ ++p;
+ else
+ p = __progname;
+ char *pe = strrchr (p, '.');
+ if (!pe || !ascii_strcasematch (pe, ".exe"))
+ pe = strrchr (p, '\0');
+ sys_mbstowcs (pn = progname, NAME_MAX, p, pe - p);
+ }
else
- p = pn;
- if (p != progname)
- wcscpy (progname, p);
- if ((p = wcsrchr (progname, '.')) != NULL
- && !wcscasecmp (p, L".exe"))
- *p = '\000';
- p = progname;
+ {
+ PWCHAR p = wcsrchr (global_progname, L'\\');
+ ++p;
+ PWCHAR pe = wcsrchr (p, '.');
+ if (!pe || wcscasecmp (pe, L".exe"))
+ pe = wcsrchr (p, L'\0');
+ pe = wcpncpy (progname, p, pe - p);
+ *pe = L'\0';
+ pn = progname;
+ }
char tmpbuf[20];
- count = __small_sprintf (buf, fmt, *p ? p : L"?", mypid (tmpbuf),
+ count = __small_sprintf (buf, fmt, pn, mypid (tmpbuf),
execing ? "!" : "");
if (func)
count += getfunc (buf + count, func);
@@ -235,14 +236,22 @@ strace::write_childpid (pid_t pid)
/* Printf function used when tracing system calls.
Warning: DO NOT SET ERRNO HERE! */
+static NO_COPY muto strace_buf_guard;
+static NO_COPY char *buf;
void
strace::vprntf (unsigned category, const char *func, const char *fmt, va_list ap)
{
DWORD err = GetLastError ();
int len;
- char buf[NT_MAX_PATH];
+ strace_buf_guard.init ("smallprint_buf")->acquire ();
+ /* Creating buffer on Windows process heap to drop stack pressure and
+ keeping our .bss small. */
+ if (!buf)
+ buf = (char *) HeapAlloc (GetProcessHeap (), 0, NT_MAX_PATH);
+ if (!buf)
+ return;
PROTECT (buf);
SetLastError (err);
@@ -272,6 +281,7 @@ strace::vprntf (unsigned category, const char *func, const char *fmt, va_list ap
if (active ())
write (category, buf, len);
#endif
+ strace_buf_guard.release ();
SetLastError (err);
}
diff --git a/winsup/cygwin/strfuncs.cc b/winsup/cygwin/strfuncs.cc
index d80f2ec6f..40f2c2945 100644
--- a/winsup/cygwin/strfuncs.cc
+++ b/winsup/cygwin/strfuncs.cc
@@ -1,8 +1,5 @@
/* strfuncs.cc: string functions
- Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008, 2009, 2010, 2011, 2012 Red Hat, Inc.
-
This file is part of Cygwin.
This software is a copyrighted work licensed under the terms of the
@@ -13,7 +10,6 @@ details. */
#include <stdlib.h>
#include <sys/param.h>
#include <wchar.h>
-#include <winnls.h>
#include <ntdll.h>
#include "path.h"
#include "fhandler.h"
@@ -60,7 +56,7 @@ static const WCHAR tfx_chars[] = {
0xf000 | '|', '}', '~', 127
};
-/* This is the table for the reverse functionality in sys_cp_wcstombs.
+/* This is the table for the reverse functionality in sys_wcstombs.
It differs deliberately in two code places (space and dot) to allow
converting back space and dot on filesystems only supporting DOS
filenames. */
@@ -410,9 +406,9 @@ __big5_mbtowc (struct _reent *r, wchar_t *pwc, const char *s, size_t n,
to buffer size, it's a bug in Cygwin and the buffer in the calling
function should be raised.
*/
-size_t __reg3
-sys_cp_wcstombs (wctomb_p f_wctomb, const char *charset, char *dst, size_t len,
- const wchar_t *src, size_t nwc)
+static size_t __reg3
+sys_wcstombs (char *dst, size_t len, const wchar_t *src, size_t nwc,
+ bool is_path)
{
char buf[10];
char *ptr = dst;
@@ -420,6 +416,8 @@ sys_cp_wcstombs (wctomb_p f_wctomb, const char *charset, char *dst, size_t len,
size_t n = 0;
mbstate_t ps;
save_errno save;
+ wctomb_p f_wctomb = cygheap->locale.wctomb;
+ const char *charset = cygheap->locale.charset;
memset (&ps, 0, sizeof ps);
if (dst == NULL)
@@ -434,7 +432,7 @@ sys_cp_wcstombs (wctomb_p f_wctomb, const char *charset, char *dst, size_t len,
ASCII area <= 0x7f (only for path names) is transform_chars above.
Reverse functionality for invalid bytes in a multibyte sequence is
in sys_cp_mbstowcs below. */
- if ((pw & 0xff00) == 0xf000
+ if (is_path && (pw & 0xff00) == 0xf000
&& (((cwc = (pw & 0xff)) <= 0x7f && tfx_rev_chars[cwc] >= 0xf000)
|| (cwc >= 0x80 && MB_CUR_MAX > 1)))
{
@@ -475,7 +473,6 @@ sys_cp_wcstombs (wctomb_p f_wctomb, const char *charset, char *dst, size_t len,
}
if (n + bytes <= len)
{
- n += bytes;
if (dst)
{
for (int i = 0; i < bytes; ++i)
@@ -483,6 +480,7 @@ sys_cp_wcstombs (wctomb_p f_wctomb, const char *charset, char *dst, size_t len,
}
if (*pwcs++ == 0x00)
break;
+ n += bytes;
}
else
break;
@@ -499,8 +497,13 @@ sys_cp_wcstombs (wctomb_p f_wctomb, const char *charset, char *dst, size_t len,
size_t __reg3
sys_wcstombs (char *dst, size_t len, const wchar_t * src, size_t nwc)
{
- return sys_cp_wcstombs (cygheap->locale.wctomb, cygheap->locale.charset,
- dst, len, src, nwc);
+ return sys_wcstombs (dst, len, src, nwc, true);
+}
+
+size_t __reg3
+sys_wcstombs_no_path (char *dst, size_t len, const wchar_t * src, size_t nwc)
+{
+ return sys_wcstombs (dst, len, src, nwc, false);
}
/* Allocate a buffer big enough for the string, always including the
@@ -513,12 +516,13 @@ sys_wcstombs (char *dst, size_t len, const wchar_t * src, size_t nwc)
Note that this code is shared by cygserver (which requires it via
__small_vsprintf) and so when built there plain calloc is the
only choice. */
-size_t __reg3
-sys_wcstombs_alloc (char **dst_p, int type, const wchar_t *src, size_t nwc)
+static size_t __reg3
+sys_wcstombs_alloc (char **dst_p, int type, const wchar_t *src, size_t nwc,
+ bool is_path)
{
size_t ret;
- ret = sys_wcstombs (NULL, (size_t) -1, src, nwc);
+ ret = sys_wcstombs (NULL, (size_t) -1, src, nwc, is_path);
if (ret > 0)
{
size_t dlen = ret + 1;
@@ -529,11 +533,24 @@ sys_wcstombs_alloc (char **dst_p, int type, const wchar_t *src, size_t nwc)
*dst_p = (char *) ccalloc ((cygheap_types) type, dlen, sizeof (char));
if (!*dst_p)
return 0;
- ret = sys_wcstombs (*dst_p, dlen, src, nwc);
+ ret = sys_wcstombs (*dst_p, dlen, src, nwc, is_path);
}
return ret;
}
+size_t __reg3
+sys_wcstombs_alloc (char **dst_p, int type, const wchar_t *src, size_t nwc)
+{
+ return sys_wcstombs_alloc (dst_p, type, src, nwc, true);
+}
+
+size_t __reg3
+sys_wcstombs_alloc_no_path (char **dst_p, int type, const wchar_t *src,
+ size_t nwc)
+{
+ return sys_wcstombs_alloc (dst_p, type, src, nwc, false);
+}
+
/* sys_cp_mbstowcs is actually most of the time called as sys_mbstowcs with
a 0 codepage. If cp is not 0, the codepage is evaluated and used for the
conversion. This is so that fhandler_console can switch to an alternate
@@ -682,13 +699,12 @@ sys_mbstowcs_alloc (wchar_t **dst_p, int type, const char *src, size_t nms)
NUL-terminate the destination string (s1).
Return pointer to terminating byte in dst string. */
char * __stdcall
-strccpy (char *s1, const char **s2, char c)
+strccpy (char *__restrict s1, const char **__restrict s2, char c)
{
while (**s2 && **s2 != c)
*s1++ = *((*s2)++);
*s1 = 0;
- MALLOC_CHECK;
return s1;
}
diff --git a/winsup/cygwin/string.h b/winsup/cygwin/string.h
index 9426577a6..c6cea364b 100644
--- a/winsup/cygwin/string.h
+++ b/winsup/cygwin/string.h
@@ -1,7 +1,5 @@
/* string.h: Extra string defs
- Copyright 2001, 2002, 2003, 2007, 2008, 2011, 2012 Red Hat, Inc.
-
This file is part of Cygwin.
This software is a copyrighted work licensed under the terms of the
@@ -79,17 +77,13 @@ int __stdcall cygwin_strncasecmp (const char *, const char *, size_t);
#define strcasematch(s1,s2) (!cygwin_strcasecmp ((s1),(s2)))
#define strncasematch(s1,s2,n) (!cygwin_strncasecmp ((s1),(s2),(n)))
-#undef strlwr
-#define strlwr cygwin_strlwr
-char * __stdcall cygwin_strlwr (char *);
-
-#undef strupr
-#define strupr cygwin_strupr
-char * __stdcall cygwin_strupr (char *);
+char *strlwr (char *);
+char *strupr (char *);
#endif /* __INSIDE_CYGWIN__ */
-char *__stdcall strccpy (char *s1, const char **s2, char c);
+char *__stdcall strccpy (char *__restrict s1, const char **__restrict s2,
+ char c);
#ifdef __cplusplus
}
diff --git a/winsup/cygwin/strsig.cc b/winsup/cygwin/strsig.cc
index 987e13549..6501c27d7 100644
--- a/winsup/cygwin/strsig.cc
+++ b/winsup/cygwin/strsig.cc
@@ -1,7 +1,5 @@
/* strsig.cc
- Copyright 2004, 2007, 2008, 2010, 2011, 2013 Red Hat, Inc.
-
This file is part of Cygwin.
This software is a copyrighted work licensed under the terms of the
@@ -26,7 +24,8 @@ struct sigdesc
_s(SIGQUIT, "Quit"), /* 3 */ \
_s(SIGILL, "Illegal instruction"), /* 4 */ \
_s(SIGTRAP, "Trace/breakpoint trap"), /* 5 */ \
- _s(SIGABRT, "Aborted"), /* 6 */ \
+ _s2(SIGABRT, "Aborted", /* 6 */ \
+ SIGIOT, "Aborted"), \
_s(SIGEMT, "EMT instruction"), /* 7 */ \
_s(SIGFPE, "Floating point exception"), /* 8 */ \
_s(SIGKILL, "Killed"), /* 9 */ \
diff --git a/winsup/cygwin/sync.cc b/winsup/cygwin/sync.cc
index 821c214f7..7decb7d19 100644
--- a/winsup/cygwin/sync.cc
+++ b/winsup/cygwin/sync.cc
@@ -4,9 +4,6 @@
which is intended to operate similarly to a mutex but attempts to
avoid making expensive calls to the kernel.
- Copyright 2000, 2001, 2002, 2003, 2004, 2005, 2008, 2009, 2010, 2011, 2012
- Red Hat, Inc.
-
This file is part of Cygwin.
This software is a copyrighted work licensed under the terms of the
diff --git a/winsup/cygwin/sync.h b/winsup/cygwin/sync.h
index ebfccab45..e11a2294b 100644
--- a/winsup/cygwin/sync.h
+++ b/winsup/cygwin/sync.h
@@ -1,8 +1,5 @@
/* sync.h: Header file for cygwin synchronization primitives.
- Copyright 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2010, 2011,
- 2012, 2013 Red Hat, Inc.
-
This file is part of Cygwin.
This software is a copyrighted work licensed under the terms of the
diff --git a/winsup/cygwin/syscalls.cc b/winsup/cygwin/syscalls.cc
index e1886e617..a87dc55cd 100644
--- a/winsup/cygwin/syscalls.cc
+++ b/winsup/cygwin/syscalls.cc
@@ -1,8 +1,5 @@
/* syscalls.cc: syscalls
- Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008, 2009, 2010, 2011, 2012, 2013 Red Hat, Inc.
-
This file is part of Cygwin.
This software is a copyrighted work licensed under the terms of the
@@ -24,7 +21,6 @@ details. */
#define pwrite __FOO_pwrite
#include "winsup.h"
-#include <winnls.h>
#include "miscfuncs.h"
#include <sys/stat.h>
#include <sys/vfs.h> /* needed for statfs */
@@ -59,8 +55,6 @@ details. */
#include "pinfo.h"
#include "shared_info.h"
#include "cygheap.h"
-#include "pwdgrp.h"
-#include "cpuid.h"
#include "registry.h"
#include "environ.h"
#include "tls_pbuf.h"
@@ -121,7 +115,12 @@ close_all_files (bool norelease)
extern "C" int
dup (int fd)
{
- int res = cygheap->fdtab.dup3 (fd, cygheap_fdnew (), 0);
+ int res;
+ cygheap_fdnew newfd;
+ if (newfd < 0)
+ res = -1;
+ else
+ res = cygheap->fdtab.dup3 (fd, newfd, 0);
syscall_printf ("%R = dup(%d)", res, fd);
return res;
}
@@ -181,6 +180,11 @@ dup3 (int oldfd, int newfd, int flags)
return res;
}
+/* Define macro to simplify checking for a transactional error code. */
+#define NT_TRANSACTIONAL_ERROR(s) \
+ (((ULONG)(s) >= (ULONG)STATUS_TRANSACTIONAL_CONFLICT) \
+ && ((ULONG)(s) <= (ULONG)STATUS_TRANSACTION_NOT_ENLISTED))
+
static inline void
start_transaction (HANDLE &old_trans, HANDLE &trans)
{
@@ -200,7 +204,7 @@ start_transaction (HANDLE &old_trans, HANDLE &trans)
}
static inline NTSTATUS
-stop_transaction (NTSTATUS status, HANDLE old_trans, HANDLE trans)
+stop_transaction (NTSTATUS status, HANDLE old_trans, HANDLE &trans)
{
RtlSetCurrentTransaction (old_trans);
if (NT_SUCCESS (status))
@@ -208,6 +212,7 @@ stop_transaction (NTSTATUS status, HANDLE old_trans, HANDLE trans)
else
status = NtRollbackTransaction (trans, TRUE);
NtClose (trans);
+ trans = NULL;
return status;
}
@@ -233,7 +238,7 @@ enum bin_status
};
static bin_status
-try_to_bin (path_conv &pc, HANDLE &fh, ACCESS_MASK access)
+try_to_bin (path_conv &pc, HANDLE &fh, ACCESS_MASK access, ULONG flags)
{
bin_status bin_stat = move_to_bin;
NTSTATUS status;
@@ -269,27 +274,72 @@ try_to_bin (path_conv &pc, HANDLE &fh, ACCESS_MASK access)
them into the recycler. */
if (pfni->FileNameLength == 2) /* root dir. */
goto out;
+ /* The recycler name on Vista and later is $Recycler.Bin by default. If the
+ recycler dir disappeared for some reason, the shell32.dll recreates the
+ directory in all upper case. So, we never know beforehand if the dir
+ is written in mixed case or in all upper case. That's a problem when
+ using casesensitivity. If the file handle given to FileRenameInformation
+ has been opened casesensitive, the call also handles the path to the
+ target dir casesensitive. Rather then trying to find the right name
+ of the recycler, we just reopen the file to move with OBJ_CASE_INSENSITIVE,
+ so the subsequent FileRenameInformation works caseinsensitive in terms of
+ the recycler directory name, too. */
+ if (!pc.objcaseinsensitive ())
+ {
+ InitializeObjectAttributes (&attr, &ro_u_empty, OBJ_CASE_INSENSITIVE,
+ fh, NULL);
+ status = NtOpenFile (&tmp_fh, access, &attr, &io, FILE_SHARE_VALID_FLAGS,
+ flags);
+ if (!NT_SUCCESS (status))
+ debug_printf ("NtOpenFile (%S) for reopening caseinsensitive failed, "
+ "status = %y", pc.get_nt_native_path (), status);
+ else
+ {
+ NtClose (fh);
+ fh = tmp_fh;
+ }
+ }
/* Initialize recycler path. */
RtlInitEmptyUnicodeString (&recycler, recyclerbuf, sizeof recyclerbuf);
if (!pc.isremote ())
{
if (wincap.has_recycle_dot_bin ()) /* NTFS and FAT since Vista, ReFS */
- RtlAppendUnicodeToString (&recycler, L"\\$RECYCLE.BIN\\");
+ RtlAppendUnicodeToString (&recycler, L"\\$Recycle.Bin\\");
else if (pc.fs_is_ntfs ()) /* NTFS up to 2K3 */
RtlAppendUnicodeToString (&recycler, L"\\RECYCLER\\");
else if (pc.fs_is_fat ()) /* FAT up to 2K3 */
RtlAppendUnicodeToString (&recycler, L"\\Recycled\\");
else
goto out;
- /* Is the file a subdir of the recycler? */
RtlInitCountedUnicodeString(&fname, pfni->FileName, pfni->FileNameLength);
+ /* Is the file a subdir of the recycler? */
if (RtlEqualUnicodePathPrefix (&fname, &recycler, TRUE))
goto out;
/* Is fname the recycler? Temporarily hide trailing backslash. */
recycler.Length -= sizeof (WCHAR);
if (RtlEqualUnicodeString (&fname, &recycler, TRUE))
goto out;
+ /* Is fname really a subcomponent of the full path? If not, there's
+ a high probability we're acessing the file via a virtual drive
+ created with "subst". Check and accommodate it. Note that we
+ ony get here if the virtual drive is really pointing to a local
+ drive. Otherwise pc.isremote () returns "true". */
+ if (!RtlEqualUnicodePathSuffix (pc.get_nt_native_path (), &fname, TRUE))
+ {
+ WCHAR drive[3] = { pc.get_nt_native_path ()->Buffer[4], ':', '\0' };
+ PWCHAR tgt = tp.w_get ();
+ if (QueryDosDeviceW (drive, tgt, NT_MAX_PATH)
+ && !wcsncmp (tgt, L"\\??\\", 4))
+ {
+ UNICODE_STRING new_path;
+
+ wcsncpy (tgt + 6, fname.Buffer, fname.Length / sizeof (WCHAR));
+ RtlInitCountedUnicodeString(&new_path, tgt,
+ 6 * sizeof (WCHAR) + fname.Length);
+ pc.set_nt_native_path (&new_path);
+ }
+ }
/* Create root dir path from file name information. */
RtlSplitUnicodePath (&fname, &fname, NULL);
RtlSplitUnicodePath (pc.get_nt_native_path (), &root, NULL);
@@ -334,9 +384,11 @@ try_to_bin (path_conv &pc, HANDLE &fh, ACCESS_MASK access)
starting at U+dc00. Use plain ASCII chars on filesystems not supporting
Unicode. The rest of the filename is the inode number in hex encoding
and a hash of the full NT path in hex. The combination allows to remove
- multiple hardlinks to the same file. */
+ multiple hardlinks to the same file. Samba doesn't like the transposed
+ names. */
RtlAppendUnicodeToString (&recycler,
- pc.fs_flags () & FILE_UNICODE_ON_DISK
+ (pc.fs_flags () & FILE_UNICODE_ON_DISK
+ && !pc.fs_is_samba ())
? L".\xdc63\xdc79\xdc67" : L".cyg");
pfii = (PFILE_INTERNAL_INFORMATION) infobuf;
/* Note: Modern Samba versions apparently don't like buffer sizes of more
@@ -350,7 +402,7 @@ try_to_bin (path_conv &pc, HANDLE &fh, ACCESS_MASK access)
"failed, status = %y", pc.get_nt_native_path (), status);
goto out;
}
- RtlInt64ToHexUnicodeString (pfii->FileId.QuadPart, &recycler, TRUE);
+ RtlInt64ToHexUnicodeString (pfii->IndexNumber.QuadPart, &recycler, TRUE);
RtlInt64ToHexUnicodeString (hash_path_name (0, pc.get_nt_native_path ()),
&recycler, TRUE);
/* Shoot. */
@@ -360,6 +412,7 @@ try_to_bin (path_conv &pc, HANDLE &fh, ACCESS_MASK access)
pfri->FileNameLength = recycler.Length;
memcpy (pfri->FileName, recycler.Buffer, recycler.Length);
frisiz = sizeof *pfri + pfri->FileNameLength - sizeof (WCHAR);
+
status = NtSetInformationFile (fh, &io, pfri, frisiz, FileRenameInformation);
if (status == STATUS_OBJECT_PATH_NOT_FOUND && !pc.isremote ())
{
@@ -672,7 +725,7 @@ unlink_nt (path_conv &pc)
if (wincap.has_transactions ()
&& (pc.fs_flags () & FILE_SUPPORTS_TRANSACTIONS))
start_transaction (old_trans, trans);
-
+retry_open:
status = NtOpenFile (&fh_ro, FILE_WRITE_ATTRIBUTES, &attr, &io,
FILE_SHARE_VALID_FLAGS, flags);
if (NT_SUCCESS (status))
@@ -685,11 +738,21 @@ unlink_nt (path_conv &pc)
if (!NT_SUCCESS (status2))
debug_printf ("Removing R/O on %S failed, status = %y",
pc.get_nt_native_path (), status2);
- pc.init_reopen_attr (&attr, fh_ro);
+ pc.init_reopen_attr (attr, fh_ro);
}
else
- debug_printf ("Opening %S for removing R/O failed, status = %y",
- pc.get_nt_native_path (), status);
+ {
+ debug_printf ("Opening %S for removing R/O failed, status = %y",
+ pc.get_nt_native_path (), status);
+ if (NT_TRANSACTIONAL_ERROR (status) && trans)
+ {
+ /* If NtOpenFile fails due to transactional problems, stop
+ transaction and go ahead without. */
+ stop_transaction (status, old_trans, trans);
+ debug_printf ("Transaction failure. Retry open.");
+ goto retry_open;
+ }
+ }
if (pc.is_lnk_symlink ())
{
status = NtQueryInformationFile (fh_ro, &io, &fsi, sizeof fsi,
@@ -787,7 +850,7 @@ unlink_nt (path_conv &pc)
/* Try to move to bin if a sharing violation occured. If that worked,
we're done. */
if (bin_stat == move_to_bin
- && (bin_stat = try_to_bin (pc, fh, access)) >= has_been_moved)
+ && (bin_stat = try_to_bin (pc, fh, access, flags)) >= has_been_moved)
{
if (bin_stat == has_been_moved)
status = STATUS_SUCCESS;
@@ -857,7 +920,7 @@ try_again:
{
debug_printf ("Try-to-bin %S",
pc.get_nt_native_path ());
- bin_stat = try_to_bin (pc, fh, access);
+ bin_stat = try_to_bin (pc, fh, access, flags);
}
}
/* Do NOT handle bin_stat == dir_not_empty here! */
@@ -903,8 +966,8 @@ try_again:
pc.get_nt_native_path ());
/* Re-open from handle so we open the correct file no matter if it
has been moved to the bin or not. */
- pc.init_reopen_attr (&attr, fh);
- status = NtOpenFile (&fh2, DELETE, &attr, &io,
+ status = NtOpenFile (&fh2, DELETE,
+ pc.init_reopen_attr (attr, fh), &io,
bin_stat == move_to_bin ? FILE_SHARE_VALID_FLAGS
: FILE_SHARE_DELETE,
flags | FILE_DELETE_ON_CLOSE);
@@ -917,7 +980,7 @@ try_again:
succeeds, we got rid of the file in some way, even if
unlinking didn't work. */
if (bin_stat == dont_move)
- bin_stat = try_to_bin (pc, fh, access);
+ bin_stat = try_to_bin (pc, fh, access, flags);
if (bin_stat >= has_been_moved)
status = bin_stat == has_been_moved
? STATUS_SUCCESS
@@ -954,11 +1017,8 @@ try_again:
}
out:
/* Stop transaction if we started one. */
- if ((access & FILE_WRITE_ATTRIBUTES)
- && wincap.has_transactions ()
- && (pc.fs_flags () & FILE_SUPPORTS_TRANSACTIONS))
+ if (trans)
stop_transaction (status, old_trans, trans);
-
syscall_printf ("%S, return status = %y", pc.get_nt_native_path (), status);
return status;
}
@@ -1066,21 +1126,6 @@ getppid ()
extern "C" pid_t
setsid (void)
{
-#ifdef NEWVFORK
- vfork_save *vf = vfork_storage.val ();
- /* This is a horrible, horrible kludge */
- if (vf && vf->pid < 0)
- {
- pid_t pid = fork ();
- if (pid > 0)
- {
- syscall_printf ("longjmping due to vfork");
- vf->restore_pid (pid);
- }
- /* assuming that fork was successful */
- }
-#endif
-
if (myself->pgid == myself->pid)
syscall_printf ("hmm. pgid %d pid %d", myself->pgid, myself->pid);
else
@@ -1122,33 +1167,32 @@ getsid (pid_t pid)
extern "C" ssize_t
read (int fd, void *ptr, size_t len)
{
- pthread_testcancel ();
-
- myfault efault;
- if (efault.faulted (EFAULT))
- return -1;
-
size_t res = (size_t) -1;
- cygheap_fdget cfd (fd);
- if (cfd < 0)
- goto done;
+ pthread_testcancel ();
- if ((cfd->get_flags () & O_ACCMODE) == O_WRONLY)
+ __try
{
- set_errno (EBADF);
- goto done;
- }
+ cygheap_fdget cfd (fd);
+ if (cfd < 0)
+ __leave;
- /* Could block, so let user know we at least got here. */
- syscall_printf ("read(%d, %p, %d) %sblocking",
- fd, ptr, len, cfd->is_nonblocking () ? "non" : "");
+ if ((cfd->get_flags () & O_ACCMODE) == O_WRONLY)
+ {
+ set_errno (EBADF);
+ __leave;
+ }
- cfd->read (ptr, res = len);
+ /* Could block, so let user know we at least got here. */
+ syscall_printf ("read(%d, %p, %d) %sblocking",
+ fd, ptr, len, cfd->is_nonblocking () ? "non" : "");
-done:
+ cfd->read (ptr, len);
+ res = len;
+ }
+ __except (EFAULT) {}
+ __endtry
syscall_printf ("%lR = read(%d, %p, %d)", res, fd, ptr, len);
- MALLOC_CHECK;
return (ssize_t) res;
}
@@ -1157,49 +1201,49 @@ EXPORT_ALIAS (read, _read)
extern "C" ssize_t
readv (int fd, const struct iovec *const iov, const int iovcnt)
{
- pthread_testcancel ();
-
- myfault efault;
- if (efault.faulted (EFAULT))
- return -1;
-
ssize_t res = -1;
- const ssize_t tot = check_iovec_for_read (iov, iovcnt);
- cygheap_fdget cfd (fd);
- if (cfd < 0)
- goto done;
+ pthread_testcancel ();
- if (tot <= 0)
+ __try
{
- res = tot;
- goto done;
- }
+ const ssize_t tot = check_iovec_for_read (iov, iovcnt);
- if ((cfd->get_flags () & O_ACCMODE) == O_WRONLY)
- {
- set_errno (EBADF);
- goto done;
- }
+ cygheap_fdget cfd (fd);
+ if (cfd < 0)
+ __leave;
- /* Could block, so let user know we at least got here. */
- syscall_printf ("readv(%d, %p, %d) %sblocking",
- fd, iov, iovcnt, cfd->is_nonblocking () ? "non" : "");
+ if (tot <= 0)
+ {
+ res = tot;
+ __leave;
+ }
+
+ if ((cfd->get_flags () & O_ACCMODE) == O_WRONLY)
+ {
+ set_errno (EBADF);
+ __leave;
+ }
- res = cfd->readv (iov, iovcnt, tot);
+ /* Could block, so let user know we at least got here. */
+ syscall_printf ("readv(%d, %p, %d) %sblocking",
+ fd, iov, iovcnt, cfd->is_nonblocking () ? "non" : "");
-done:
+ res = cfd->readv (iov, iovcnt, tot);
+ }
+ __except (EFAULT) {}
+ __endtry
syscall_printf ("%lR = readv(%d, %p, %d)", res, fd, iov, iovcnt);
- MALLOC_CHECK;
return res;
}
extern "C" ssize_t
pread (int fd, void *ptr, size_t len, off_t off)
{
+ ssize_t res;
+
pthread_testcancel ();
- ssize_t res;
cygheap_fdget cfd (fd);
if (cfd < 0)
res = -1;
@@ -1213,36 +1257,33 @@ pread (int fd, void *ptr, size_t len, off_t off)
extern "C" ssize_t
write (int fd, const void *ptr, size_t len)
{
- pthread_testcancel ();
-
- myfault efault;
- if (efault.faulted (EFAULT))
- return -1;
-
ssize_t res = -1;
- cygheap_fdget cfd (fd);
- if (cfd < 0)
- goto done;
+ pthread_testcancel ();
- if ((cfd->get_flags () & O_ACCMODE) == O_RDONLY)
+ __try
{
- set_errno (EBADF);
- goto done;
- }
+ cygheap_fdget cfd (fd);
+ if (cfd < 0)
+ __leave;
- /* Could block, so let user know we at least got here. */
- if (fd == 1 || fd == 2)
- paranoid_printf ("write(%d, %p, %d)", fd, ptr, len);
- else
- syscall_printf ("write(%d, %p, %d)", fd, ptr, len);
+ if ((cfd->get_flags () & O_ACCMODE) == O_RDONLY)
+ {
+ set_errno (EBADF);
+ __leave;
+ }
- res = cfd->write (ptr, len);
+ /* Could block, so let user know we at least got here. */
+ if (fd == 1 || fd == 2)
+ paranoid_printf ("write(%d, %p, %d)", fd, ptr, len);
+ else
+ syscall_printf ("write(%d, %p, %d)", fd, ptr, len);
-done:
+ res = cfd->write (ptr, len);
+ }
+ __except (EFAULT) {}
+ __endtry
syscall_printf ("%lR = write(%d, %p, %d)", res, fd, ptr, len);
-
- MALLOC_CHECK;
return res;
}
@@ -1251,46 +1292,44 @@ EXPORT_ALIAS (write, _write)
extern "C" ssize_t
writev (const int fd, const struct iovec *const iov, const int iovcnt)
{
- pthread_testcancel ();
-
- myfault efault;
- if (efault.faulted (EFAULT))
- return -1;
-
ssize_t res = -1;
- const ssize_t tot = check_iovec_for_write (iov, iovcnt);
- cygheap_fdget cfd (fd);
- if (cfd < 0)
- goto done;
+ pthread_testcancel ();
- if (tot <= 0)
+ __try
{
- res = tot;
- goto done;
- }
+ const ssize_t tot = check_iovec_for_write (iov, iovcnt);
- if ((cfd->get_flags () & O_ACCMODE) == O_RDONLY)
- {
- set_errno (EBADF);
- goto done;
- }
+ cygheap_fdget cfd (fd);
+ if (cfd < 0)
+ __leave;
- /* Could block, so let user know we at least got here. */
- if (fd == 1 || fd == 2)
- paranoid_printf ("writev(%d, %p, %d)", fd, iov, iovcnt);
- else
- syscall_printf ("writev(%d, %p, %d)", fd, iov, iovcnt);
+ if (tot <= 0)
+ {
+ res = tot;
+ __leave;
+ }
+
+ if ((cfd->get_flags () & O_ACCMODE) == O_RDONLY)
+ {
+ set_errno (EBADF);
+ __leave;
+ }
- res = cfd->writev (iov, iovcnt, tot);
+ /* Could block, so let user know we at least got here. */
+ if (fd == 1 || fd == 2)
+ paranoid_printf ("writev(%d, %p, %d)", fd, iov, iovcnt);
+ else
+ syscall_printf ("writev(%d, %p, %d)", fd, iov, iovcnt);
-done:
+ res = cfd->writev (iov, iovcnt, tot);
+ }
+ __except (EFAULT) {}
+ __endtry
if (fd == 1 || fd == 2)
paranoid_printf ("%lR = writev(%d, %p, %d)", res, fd, iov, iovcnt);
else
syscall_printf ("%lR = writev(%d, %p, %d)", res, fd, iov, iovcnt);
-
- MALLOC_CHECK;
return res;
}
@@ -1320,75 +1359,75 @@ open (const char *unix_path, int flags, ...)
va_list ap;
mode_t mode = 0;
- syscall_printf ("open(%s, %y)", unix_path, flags);
pthread_testcancel ();
- myfault efault;
- if (efault.faulted (EFAULT))
- /* errno already set */;
- else if (!*unix_path)
- set_errno (ENOENT);
- else
+
+ __try
{
- /* check for optional mode argument */
- va_start (ap, flags);
- mode = va_arg (ap, mode_t);
- va_end (ap);
+ syscall_printf ("open(%s, %y)", unix_path, flags);
+ if (!*unix_path)
+ set_errno (ENOENT);
+ else
+ {
+ /* check for optional mode argument */
+ va_start (ap, flags);
+ mode = va_arg (ap, mode_t);
+ va_end (ap);
- fhandler_base *fh;
- cygheap_fdnew fd;
+ fhandler_base *fh;
+ cygheap_fdnew fd;
- if (fd >= 0)
- {
- /* This is a temporary kludge until all utilities can catch up with
- a change in behavior that implements linux functionality: opening
- a tty should not automatically cause it to become the controlling
- tty for the process. */
- int opt = PC_OPEN | ((flags & (O_NOFOLLOW | O_EXCL))
- ? PC_SYM_NOFOLLOW : PC_SYM_FOLLOW);
- if (!(flags & O_NOCTTY) && fd > 2 && myself->ctty != -2)
- {
- flags |= O_NOCTTY;
- opt |= PC_CTTY; /* flag that, if opened, this fhandler could
- later be capable of being a controlling
- terminal if /dev/tty is opened. */
- }
- if (!(fh = build_fh_name (unix_path, opt, stat_suffixes)))
- res = -1; // errno already set
- else if ((flags & O_NOFOLLOW) && fh->issymlink ())
- {
- delete fh;
- res = -1;
- set_errno (ELOOP);
- }
- else if ((flags & O_DIRECTORY) && fh->exists () && !fh->pc.isdir ())
- {
- delete fh;
- res = -1;
- set_errno (ENOTDIR);
- }
- else if (((flags & (O_CREAT | O_EXCL)) == (O_CREAT | O_EXCL)) && fh->exists ())
- {
- delete fh;
- res = -1;
- set_errno (EEXIST);
- }
- else if ((fh->is_fs_special () && fh->device_access_denied (flags))
- || !fh->open_with_arch (flags, (mode & 07777) & ~cygheap->umask))
+ if (fd >= 0)
{
- delete fh;
- res = -1;
- }
- else
- {
- fd = fh;
- if (fd <= 2)
- set_std_handle (fd);
- res = fd;
+ /* This is a temporary kludge until all utilities can catch up
+ with a change in behavior that implements linux functionality:
+ opening a tty should not automatically cause it to become the
+ controlling tty for the process. */
+ int opt = PC_OPEN | ((flags & (O_NOFOLLOW | O_EXCL))
+ ? PC_SYM_NOFOLLOW : PC_SYM_FOLLOW);
+ if (!(flags & O_NOCTTY) && fd > 2 && myself->ctty != -2)
+ {
+ flags |= O_NOCTTY;
+ /* flag that, if opened, this fhandler could later be capable
+ of being a controlling terminal if /dev/tty is opened. */
+ opt |= PC_CTTY;
+ }
+ if (!(fh = build_fh_name (unix_path, opt, stat_suffixes)))
+ ; // errno already set
+ else if ((flags & O_NOFOLLOW) && fh->issymlink ())
+ {
+ delete fh;
+ set_errno (ELOOP);
+ }
+ else if ((flags & O_DIRECTORY) && fh->exists ()
+ && !fh->pc.isdir ())
+ {
+ delete fh;
+ set_errno (ENOTDIR);
+ }
+ else if (((flags & (O_CREAT | O_EXCL)) == (O_CREAT | O_EXCL))
+ && fh->exists ())
+ {
+ delete fh;
+ set_errno (EEXIST);
+ }
+ else if ((fh->is_fs_special ()
+ && fh->device_access_denied (flags))
+ || !fh->open_with_arch (flags, mode & 07777))
+ delete fh;
+ else
+ {
+ fd = fh;
+ if (fd <= 2)
+ set_std_handle (fd);
+ res = fd;
+ }
}
}
- }
- syscall_printf ("%R = open(%s, %y)", res, unix_path, flags);
+ syscall_printf ("%R = open(%s, %y)", res, unix_path, flags);
+ }
+ __except (EFAULT) {}
+ __endtry
return res;
}
@@ -1445,7 +1484,6 @@ close (int fd)
pthread_testcancel ();
- MALLOC_CHECK;
cygheap_fdget cfd (fd, true);
if (cfd < 0)
res = -1;
@@ -1457,7 +1495,6 @@ close (int fd)
}
syscall_printf ("%R = close(%d)", res, fd);
- MALLOC_CHECK;
return res;
}
@@ -1680,10 +1717,21 @@ void
fhandler_base::stat_fixup (struct stat *buf)
{
/* For devices, set inode number to device number. This gives us a valid,
- unique inode number without having to call hash_path_name. */
+ unique inode number without having to call hash_path_name. /dev/tty needs
+ a bit of persuasion to get the same st_ino value in stat and fstat. */
if (!buf->st_ino)
- buf->st_ino = (get_major () == DEV_VIRTFS_MAJOR) ? get_ino ()
- : get_device ();
+ {
+ if (get_major () == DEV_VIRTFS_MAJOR)
+ buf->st_ino = get_ino ();
+ else if (dev () == FH_TTY ||
+ ((get_major () == DEV_PTYS_MAJOR
+ || get_major () == DEV_CONS_MAJOR)
+ && !strcmp (get_name (), "/dev/tty")))
+ buf->st_ino = FH_TTY;
+ else
+ buf->st_ino = get_device ();
+
+ }
/* For /dev-based devices, st_dev must be set to the device number of /dev,
not it's own device major/minor numbers. What we do here to speed up
the process is to fetch the device number of /dev only once, liberally
@@ -1852,41 +1900,39 @@ stat_worker (path_conv &pc, struct stat *buf)
{
int res = -1;
- myfault efault;
- if (efault.faulted (EFAULT))
- goto error;
-
- if (pc.error)
+ __try
{
- debug_printf ("got %d error from path_conv", pc.error);
- set_errno (pc.error);
- }
- else if (pc.exists ())
- {
- fhandler_base *fh;
+ if (pc.error)
+ {
+ debug_printf ("got %d error from path_conv", pc.error);
+ set_errno (pc.error);
+ }
+ else if (pc.exists ())
+ {
+ fhandler_base *fh;
- if (!(fh = build_fh_pc (pc)))
- goto error;
+ if (!(fh = build_fh_pc (pc)))
+ __leave;
- debug_printf ("(%S, %p, %p), file_attributes %d",
- pc.get_nt_native_path (), buf, fh, (DWORD) *fh);
- memset (buf, 0, sizeof (*buf));
- res = fh->fstat (buf);
- if (!res)
- fh->stat_fixup (buf);
- delete fh;
+ debug_printf ("(%S, %p, %p), file_attributes %d",
+ pc.get_nt_native_path (), buf, fh, (DWORD) *fh);
+ memset (buf, 0, sizeof (*buf));
+ res = fh->fstat (buf);
+ if (!res)
+ fh->stat_fixup (buf);
+ delete fh;
+ }
+ else
+ set_errno (ENOENT);
}
- else
- set_errno (ENOENT);
-
- error:
- MALLOC_CHECK;
+ __except (EFAULT) {}
+ __endtry
syscall_printf ("%d = (%S,%p)", res, pc.get_nt_native_path (), buf);
return res;
}
extern "C" int
-stat64 (const char *name, struct stat *buf)
+stat64 (const char *__restrict name, struct stat *__restrict buf)
{
syscall_printf ("entering");
path_conv pc (name, PC_SYM_FOLLOW | PC_POSIX | PC_KEEP_HANDLE,
@@ -1895,7 +1941,8 @@ stat64 (const char *name, struct stat *buf)
}
extern "C" int
-_stat64_r (struct _reent *ptr, const char *name, struct stat *buf)
+_stat64_r (struct _reent *__restrict ptr, const char *__restrict name,
+ struct stat *buf)
{
int ret;
@@ -1909,7 +1956,7 @@ EXPORT_ALIAS (stat64, stat)
EXPORT_ALIAS (_stat64_r, _stat_r)
#else
extern "C" int
-stat (const char *name, struct stat *buf)
+stat (const char *__restrict name, struct stat *__restrict buf)
{
struct stat buf64;
int ret = stat64 (name, &buf64);
@@ -1919,7 +1966,8 @@ stat (const char *name, struct stat *buf)
}
extern "C" int
-_stat_r (struct _reent *ptr, const char *name, struct stat *buf)
+_stat_r (struct _reent *__restrict ptr, const char *__restrict name,
+ struct stat *__restrict buf)
{
int ret;
@@ -1931,7 +1979,7 @@ _stat_r (struct _reent *ptr, const char *name, struct stat *buf)
/* lstat: Provided by SVR4 and 4.3+BSD, POSIX? */
extern "C" int
-lstat64 (const char *name, struct stat *buf)
+lstat64 (const char *__restrict name, struct stat *__restrict buf)
{
syscall_printf ("entering");
path_conv pc (name, PC_SYM_NOFOLLOW | PC_POSIX | PC_KEEP_HANDLE,
@@ -1944,7 +1992,7 @@ EXPORT_ALIAS (lstat64, lstat)
#else
/* lstat: Provided by SVR4 and 4.3+BSD, POSIX? */
extern "C" int
-lstat (const char *name, struct stat *buf)
+lstat (const char *__restrict name, struct stat *__restrict buf)
{
struct stat buf64;
int ret = lstat64 (name, &buf64);
@@ -2069,479 +2117,511 @@ rename (const char *oldpath, const char *newpath)
FILE_STANDARD_INFORMATION ofsi;
PFILE_RENAME_INFORMATION pfri;
- myfault efault;
- if (efault.faulted (EFAULT))
- return -1;
-
- if (!*oldpath || !*newpath)
- {
- /* Reject rename("","x"), rename("x",""). */
- set_errno (ENOENT);
- goto out;
- }
- if (has_dot_last_component (oldpath, true))
- {
- /* Reject rename("dir/.","x"). */
- oldpc.check (oldpath, PC_SYM_NOFOLLOW, stat_suffixes);
- set_errno (oldpc.isdir () ? EINVAL : ENOTDIR);
- goto out;
- }
- if (has_dot_last_component (newpath, true))
- {
- /* Reject rename("dir","x/."). */
- newpc.check (newpath, PC_SYM_NOFOLLOW, stat_suffixes);
- set_errno (!newpc.exists () ? ENOENT : newpc.isdir () ? EINVAL : ENOTDIR);
- goto out;
- }
-
- /* A trailing slash requires that the pathname points to an existing
- directory. If it's not, it's a ENOTDIR condition. The same goes
- for newpath a bit further down this function. */
- olen = strlen (oldpath);
- if (isdirsep (oldpath[olen - 1]))
+ __try
{
- char *buf;
- char *p = stpcpy (buf = tp.c_get (), oldpath) - 1;
- oldpath = buf;
- while (p >= oldpath && isdirsep (*p))
- *p-- = '\0';
- olen = p + 1 - oldpath;
- if (!olen)
+ if (!*oldpath || !*newpath)
{
- /* The root directory cannot be renamed. This also rejects
- the corner case of rename("/","/"), even though it is the
- same file. */
- set_errno (EINVAL);
- goto out;
+ /* Reject rename("","x"), rename("x",""). */
+ set_errno (ENOENT);
+ __leave;
}
- old_dir_requested = true;
- }
- oldpc.check (oldpath, PC_SYM_NOFOLLOW, stat_suffixes);
- if (oldpc.error)
- {
- set_errno (oldpc.error);
- goto out;
- }
- if (!oldpc.exists ())
- {
- set_errno (ENOENT);
- goto out;
- }
- if (oldpc.isspecial () && !oldpc.issocket () && !oldpc.is_fs_special ())
- {
- /* No renames from virtual FS */
- set_errno (EROFS);
- goto out;
- }
- if (oldpc.has_attribute (FILE_ATTRIBUTE_REPARSE_POINT) && !oldpc.issymlink ())
- {
- /* Volume mount point. If we try to rename a volume mount point, NT
- returns STATUS_NOT_SAME_DEVICE ==> Win32 ERROR_NOT_SAME_DEVICE ==>
- errno EXDEV. That's bad since mv(1) will now perform a cross-device
- move. So what we do here is to treat the volume mount point just
- like Linux treats a mount point. */
- set_errno (EBUSY);
- goto out;
- }
- if (old_dir_requested && !oldpc.isdir ())
- {
- /* Reject rename("file/","x"). */
- set_errno (ENOTDIR);
- goto out;
- }
- if (oldpc.known_suffix
- && (ascii_strcasematch (oldpath + olen - 4, ".lnk")
- || ascii_strcasematch (oldpath + olen - 4, ".exe")))
- old_explicit_suffix = true;
-
- nlen = strlen (newpath);
- if (isdirsep (newpath[nlen - 1]))
- {
- char *buf;
- char *p = stpcpy (buf = tp.c_get (), newpath) - 1;
- newpath = buf;
- while (p >= newpath && isdirsep (*p))
- *p-- = '\0';
- nlen = p + 1 - newpath;
- if (!nlen) /* The root directory is never empty. */
+ if (has_dot_last_component (oldpath, true))
{
- set_errno (ENOTEMPTY);
- goto out;
+ /* Reject rename("dir/.","x"). */
+ oldpc.check (oldpath, PC_SYM_NOFOLLOW, stat_suffixes);
+ set_errno (oldpc.isdir () ? EINVAL : ENOTDIR);
+ __leave;
}
- new_dir_requested = true;
- }
- newpc.check (newpath, PC_SYM_NOFOLLOW, stat_suffixes);
- if (newpc.error)
- {
- set_errno (newpc.error);
- goto out;
- }
- if (newpc.isspecial () && !newpc.issocket ()) /* No renames to virtual FSes */
- {
- set_errno (EROFS);
- goto out;
- }
- if (new_dir_requested && !(newpc.exists ()
- ? newpc.isdir () : oldpc.isdir ()))
- {
- /* Reject rename("file1","file2/"), but allow rename("dir","d/"). */
- set_errno (newpc.exists () ? ENOTDIR : ENOENT);
- goto out;
- }
- if (newpc.exists () && (oldpc.isdir () ? !newpc.isdir () : newpc.isdir ()))
- {
- /* Reject rename("file","dir") and rename("dir","file"). */
- set_errno (newpc.isdir () ? EISDIR : ENOTDIR);
- goto out;
- }
- if (newpc.known_suffix
- && (ascii_strcasematch (newpath + nlen - 4, ".lnk")
- || ascii_strcasematch (newpath + nlen - 4, ".exe")))
- new_explicit_suffix = true;
-
- /* This test is necessary in almost every case, so just do it once here. */
- equal_path = RtlEqualUnicodeString (oldpc.get_nt_native_path (),
- newpc.get_nt_native_path (),
- oldpc.objcaseinsensitive ());
-
- /* First check if oldpath and newpath only differ by case. If so, it's
- just a request to change the case of the filename. By simply setting
- the file attributes to INVALID_FILE_ATTRIBUTES (which translates to
- "file doesn't exist"), all later tests are skipped. */
- if (oldpc.objcaseinsensitive () && newpc.exists () && equal_path
- && old_explicit_suffix == new_explicit_suffix)
- {
- if (RtlEqualUnicodeString (oldpc.get_nt_native_path (),
- newpc.get_nt_native_path (),
- FALSE))
+ if (has_dot_last_component (newpath, true))
{
- res = 0;
- goto out;
+ /* Reject rename("dir","x/."). */
+ newpc.check (newpath, PC_SYM_NOFOLLOW, stat_suffixes);
+ set_errno (!newpc.exists () ? ENOENT
+ : newpc.isdir () ? EINVAL : ENOTDIR);
+ __leave;
}
- newpc.file_attributes (INVALID_FILE_ATTRIBUTES);
- }
- else if (oldpc.isdir ())
- {
- /* Check for newpath being identical or a subdir of oldpath. */
- if (RtlPrefixUnicodeString (oldpc.get_nt_native_path (),
- newpc.get_nt_native_path (),
- TRUE))
+
+ /* A trailing slash requires that the pathname points to an existing
+ directory. If it's not, it's a ENOTDIR condition. The same goes
+ for newpath a bit further down this function. */
+ olen = strlen (oldpath);
+ if (isdirsep (oldpath[olen - 1]))
{
- if (newpc.get_nt_native_path ()->Length
- == oldpc.get_nt_native_path ()->Length)
- {
- res = 0;
- goto out;
- }
- if (*(PWCHAR) ((PBYTE) newpc.get_nt_native_path ()->Buffer
- + oldpc.get_nt_native_path ()->Length) == L'\\')
+ char *buf;
+ char *p = stpcpy (buf = tp.c_get (), oldpath) - 1;
+ oldpath = buf;
+ while (p >= oldpath && isdirsep (*p))
+ *p-- = '\0';
+ olen = p + 1 - oldpath;
+ if (!olen)
{
+ /* The root directory cannot be renamed. This also rejects
+ the corner case of rename("/","/"), even though it is the
+ same file. */
set_errno (EINVAL);
- goto out;
+ __leave;
}
+ old_dir_requested = true;
}
- }
- else if (!newpc.exists ())
- {
- if (equal_path && old_explicit_suffix != new_explicit_suffix)
+ oldpc.check (oldpath, PC_SYM_NOFOLLOW, stat_suffixes);
+ if (oldpc.error)
{
- newpc.check (newpath, PC_SYM_NOFOLLOW);
- if (RtlEqualUnicodeString (oldpc.get_nt_native_path (),
- newpc.get_nt_native_path (),
- oldpc.objcaseinsensitive ()))
+ set_errno (oldpc.error);
+ __leave;
+ }
+ if (!oldpc.exists ())
+ {
+ set_errno (ENOENT);
+ __leave;
+ }
+ if (oldpc.isspecial () && !oldpc.issocket () && !oldpc.is_fs_special ())
+ {
+ /* No renames from virtual FS */
+ set_errno (EROFS);
+ __leave;
+ }
+ if (oldpc.has_attribute (FILE_ATTRIBUTE_REPARSE_POINT)
+ && !oldpc.issymlink ())
+ {
+ /* Volume mount point. If we try to rename a volume mount point, NT
+ returns STATUS_NOT_SAME_DEVICE ==> Win32 ERROR_NOT_SAME_DEVICE ==>
+ errno EXDEV. That's bad since mv(1) will now perform a
+ cross-device move. So what we do here is to treat the volume
+ mount point just like Linux treats a mount point. */
+ set_errno (EBUSY);
+ __leave;
+ }
+ if (old_dir_requested && !oldpc.isdir ())
+ {
+ /* Reject rename("file/","x"). */
+ set_errno (ENOTDIR);
+ __leave;
+ }
+ if (oldpc.known_suffix ()
+ && (ascii_strcasematch (oldpath + olen - 4, ".lnk")
+ || ascii_strcasematch (oldpath + olen - 4, ".exe")))
+ old_explicit_suffix = true;
+
+ nlen = strlen (newpath);
+ if (isdirsep (newpath[nlen - 1]))
+ {
+ char *buf;
+ char *p = stpcpy (buf = tp.c_get (), newpath) - 1;
+ newpath = buf;
+ while (p >= newpath && isdirsep (*p))
+ *p-- = '\0';
+ nlen = p + 1 - newpath;
+ if (!nlen) /* The root directory is never empty. */
{
- res = 0;
- goto out;
+ set_errno (ENOTEMPTY);
+ __leave;
}
+ new_dir_requested = true;
}
- else if (oldpc.is_lnk_special ()
- && !RtlEqualUnicodePathSuffix (newpc.get_nt_native_path (),
- &ro_u_lnk, TRUE))
- rename_append_suffix (newpc, newpath, nlen, ".lnk");
- else if (oldpc.is_binary () && !old_explicit_suffix
- && oldpc.known_suffix
- && !nt_path_has_executable_suffix (newpc.get_nt_native_path ()))
- /* Never append .exe suffix if oldpath had .exe suffix given
- explicitely, or if oldpath wasn't already a .exe file, or
- if the destination filename has one of the blessed executable
- suffixes.
- Note: To rename an executable foo.exe to bar-without-suffix,
- the .exe suffix must be given explicitly in oldpath. */
- rename_append_suffix (newpc, newpath, nlen, ".exe");
- }
- else
- {
- if (equal_path && old_explicit_suffix != new_explicit_suffix)
+ newpc.check (newpath, PC_SYM_NOFOLLOW, stat_suffixes);
+ if (newpc.error)
+ {
+ set_errno (newpc.error);
+ __leave;
+ }
+ if (newpc.isspecial () && !newpc.issocket ())
+ {
+ /* No renames to virtual FSes */
+ set_errno (EROFS);
+ __leave;
+ }
+ if (new_dir_requested && !(newpc.exists ()
+ ? newpc.isdir () : oldpc.isdir ()))
+ {
+ /* Reject rename("file1","file2/"), but allow rename("dir","d/"). */
+ set_errno (newpc.exists () ? ENOTDIR : ENOENT);
+ __leave;
+ }
+ if (newpc.exists ()
+ && (oldpc.isdir () ? !newpc.isdir () : newpc.isdir ()))
+ {
+ /* Reject rename("file","dir") and rename("dir","file"). */
+ set_errno (newpc.isdir () ? EISDIR : ENOTDIR);
+ __leave;
+ }
+ if (newpc.known_suffix ()
+ && (ascii_strcasematch (newpath + nlen - 4, ".lnk")
+ || ascii_strcasematch (newpath + nlen - 4, ".exe")))
+ new_explicit_suffix = true;
+
+ /* This test is necessary in almost every case, so do it once here. */
+ equal_path = RtlEqualUnicodeString (oldpc.get_nt_native_path (),
+ newpc.get_nt_native_path (),
+ oldpc.objcaseinsensitive ());
+
+ /* First check if oldpath and newpath only differ by case. If so, it's
+ just a request to change the case of the filename. By simply setting
+ the file attributes to INVALID_FILE_ATTRIBUTES (which translates to
+ "file doesn't exist"), all later tests are skipped. */
+ if (oldpc.objcaseinsensitive () && newpc.exists () && equal_path
+ && old_explicit_suffix == new_explicit_suffix)
{
- newpc.check (newpath, PC_SYM_NOFOLLOW);
if (RtlEqualUnicodeString (oldpc.get_nt_native_path (),
newpc.get_nt_native_path (),
- oldpc.objcaseinsensitive ()))
+ FALSE))
{
res = 0;
- goto out;
+ __leave;
}
+ newpc.file_attributes (INVALID_FILE_ATTRIBUTES);
}
- else if (oldpc.is_lnk_special ())
+ else if (oldpc.isdir ())
{
- if (!newpc.is_lnk_special ()
- && !RtlEqualUnicodePathSuffix (newpc.get_nt_native_path (),
- &ro_u_lnk, TRUE))
+ /* Check for newpath being identical or a subdir of oldpath. */
+ if (RtlPrefixUnicodeString (oldpc.get_nt_native_path (),
+ newpc.get_nt_native_path (),
+ TRUE))
{
- rename_append_suffix (new2pc, newpath, nlen, ".lnk");
- removepc = &newpc;
+ if (newpc.get_nt_native_path ()->Length
+ == oldpc.get_nt_native_path ()->Length)
+ {
+ res = 0;
+ __leave;
+ }
+ if (*(PWCHAR) ((PBYTE) newpc.get_nt_native_path ()->Buffer
+ + oldpc.get_nt_native_path ()->Length) == L'\\')
+ {
+ set_errno (EINVAL);
+ __leave;
+ }
}
}
- else if (oldpc.is_binary ())
+ else if (!newpc.exists ())
{
- /* Never append .exe suffix if oldpath had .exe suffix given
- explicitely, or if newfile is a binary (in which case the given
- name probably makes sense as it is), or if the destination
- filename has one of the blessed executable suffixes. */
- if (!old_explicit_suffix && oldpc.known_suffix
- && !newpc.is_binary ()
- && !nt_path_has_executable_suffix (newpc.get_nt_native_path ()))
+ if (equal_path && old_explicit_suffix != new_explicit_suffix)
{
- rename_append_suffix (new2pc, newpath, nlen, ".exe");
- removepc = &newpc;
+ newpc.check (newpath, PC_SYM_NOFOLLOW);
+ if (RtlEqualUnicodeString (oldpc.get_nt_native_path (),
+ newpc.get_nt_native_path (),
+ oldpc.objcaseinsensitive ()))
+ {
+ res = 0;
+ __leave;
+ }
}
+ else if (oldpc.is_lnk_special ()
+ && !RtlEqualUnicodePathSuffix (newpc.get_nt_native_path (),
+ &ro_u_lnk, TRUE))
+ rename_append_suffix (newpc, newpath, nlen, ".lnk");
+ else if (oldpc.is_binary () && !old_explicit_suffix
+ && oldpc.known_suffix ()
+ && !nt_path_has_executable_suffix
+ (newpc.get_nt_native_path ()))
+ /* Never append .exe suffix if oldpath had .exe suffix given
+ explicitely, or if oldpath wasn't already a .exe file, or
+ if the destination filename has one of the blessed executable
+ suffixes.
+ Note: To rename an executable foo.exe to bar-without-suffix,
+ the .exe suffix must be given explicitly in oldpath. */
+ rename_append_suffix (newpc, newpath, nlen, ".exe");
}
else
{
- /* If the new path is an existing .lnk symlink or a .exe file,
- but the new path has not been specified with explicit suffix,
- rename to the new name without suffix, as expected, but also
- remove the clashing symlink or executable. Did I ever mention
- how I hate the file suffix idea? */
- if ((newpc.is_lnk_special ()
- || RtlEqualUnicodePathSuffix (newpc.get_nt_native_path (),
- &ro_u_exe, TRUE))
- && !new_explicit_suffix)
+ if (equal_path && old_explicit_suffix != new_explicit_suffix)
+ {
+ newpc.check (newpath, PC_SYM_NOFOLLOW);
+ if (RtlEqualUnicodeString (oldpc.get_nt_native_path (),
+ newpc.get_nt_native_path (),
+ oldpc.objcaseinsensitive ()))
+ {
+ res = 0;
+ __leave;
+ }
+ }
+ else if (oldpc.is_lnk_special ())
+ {
+ if (!newpc.is_lnk_special ()
+ && !RtlEqualUnicodePathSuffix (newpc.get_nt_native_path (),
+ &ro_u_lnk, TRUE))
+ {
+ rename_append_suffix (new2pc, newpath, nlen, ".lnk");
+ removepc = &newpc;
+ }
+ }
+ else if (oldpc.is_binary ())
{
- new2pc.check (newpath, PC_SYM_NOFOLLOW, stat_suffixes);
- newpc.get_nt_native_path ()->Length -= 4 * sizeof (WCHAR);
- if (new2pc.is_binary () || new2pc.is_lnk_special ())
- removepc = &new2pc;
+ /* Never append .exe suffix if oldpath had .exe suffix given
+ explicitely, or if newfile is a binary (in which case the given
+ name probably makes sense as it is), or if the destination
+ filename has one of the blessed executable suffixes. */
+ if (!old_explicit_suffix && oldpc.known_suffix ()
+ && !newpc.is_binary ()
+ && !nt_path_has_executable_suffix
+ (newpc.get_nt_native_path ()))
+ {
+ rename_append_suffix (new2pc, newpath, nlen, ".exe");
+ removepc = &newpc;
+ }
+ }
+ else
+ {
+ /* If the new path is an existing .lnk symlink or a .exe file,
+ but the new path has not been specified with explicit suffix,
+ rename to the new name without suffix, as expected, but also
+ remove the clashing symlink or executable. Did I ever mention
+ how I hate the file suffix idea? */
+ if ((newpc.is_lnk_special ()
+ || RtlEqualUnicodePathSuffix (newpc.get_nt_native_path (),
+ &ro_u_exe, TRUE))
+ && !new_explicit_suffix)
+ {
+ new2pc.check (newpath, PC_SYM_NOFOLLOW, stat_suffixes);
+ newpc.get_nt_native_path ()->Length -= 4 * sizeof (WCHAR);
+ if (new2pc.is_binary () || new2pc.is_lnk_special ())
+ removepc = &new2pc;
+ }
}
}
- }
- dstpc = (removepc == &newpc) ? &new2pc : &newpc;
+ dstpc = (removepc == &newpc) ? &new2pc : &newpc;
- /* Check cross-device before touching anything. Otherwise we might end
- up with an unlinked target dir even if the actual rename didn't work. */
- if (oldpc.fs_type () != dstpc->fs_type ()
- || oldpc.fs_serial_number () != dstpc->fs_serial_number ())
- {
- set_errno (EXDEV);
- goto out;
- }
-
- /* Opening the file must be part of the transaction. It's not sufficient
- to call only NtSetInformationFile under the transaction. Therefore we
- have to start the transaction here, if necessary. */
- if (wincap.has_transactions ()
- && (dstpc->fs_flags () & FILE_SUPPORTS_TRANSACTIONS)
- && (dstpc->isdir ()
- || (!removepc && dstpc->has_attribute (FILE_ATTRIBUTE_READONLY))))
- start_transaction (old_trans, trans);
-
- int retry_count;
- retry_count = 0;
-retry:
- /* Talking about inconsistent behaviour...
- - DELETE is required to rename a file. So far, so good.
- - At least one cifs FS (Tru64) needs FILE_READ_ATTRIBUTE, otherwise the
- FileRenameInformation call fails with STATUS_ACCESS_DENIED. However,
- on NFS we get a STATUS_ACCESS_DENIED if FILE_READ_ATTRIBUTE is used
- and the file we try to rename is a symlink. Urgh.
- - Samba (only some versions?) doesn't like the FILE_SHARE_DELETE mode if
- the file has the R/O attribute set and returns STATUS_ACCESS_DENIED in
- that case. */
- {
- ULONG access = DELETE | (oldpc.fs_is_cifs () ? FILE_READ_ATTRIBUTES : 0);
- ULONG sharing = FILE_SHARE_READ | FILE_SHARE_WRITE
- | (oldpc.fs_is_samba () ? 0 : FILE_SHARE_DELETE);
- ULONG flags = FILE_OPEN_FOR_BACKUP_INTENT
- | (oldpc.is_rep_symlink () ? FILE_OPEN_REPARSE_POINT : 0);
- status = NtOpenFile (&fh, access,
- oldpc.get_object_attr (attr, sec_none_nih),
- &io, sharing, flags);
- }
- if (!NT_SUCCESS (status))
- {
- debug_printf ("status %y", status);
- if (status == STATUS_SHARING_VIOLATION
- && cygwait (10L) != WAIT_SIGNALED)
+ /* Check cross-device before touching anything. Otherwise we might end
+ up with an unlinked target dir even if the actual rename didn't work.*/
+ if (oldpc.fs_type () != dstpc->fs_type ()
+ || oldpc.fs_serial_number () != dstpc->fs_serial_number ())
{
- /* Typical BLODA problem. Some virus scanners check newly generated
- files and while doing that disallow DELETE access. That's really
- bad because it breaks applications which copy files by creating
- a temporary filename and then rename the temp filename to the
- target filename. This renaming fails due to the jealous virus
- scanner and the application fails to create the target file.
-
- This kludge tries to work around that by yielding until the
- sharing violation goes away, or a signal arrived, or after
- about a second, give or take. */
- if (++retry_count < 40)
- {
- yield ();
- goto retry;
- }
+ set_errno (EXDEV);
+ __leave;
}
- __seterrno_from_nt_status (status);
- goto out;
- }
- /* Renaming a dir to another, existing dir fails always, even if
- ReplaceIfExists is set to TRUE and the existing dir is empty. So
- we have to remove the destination dir first. This also covers the
- case that the destination directory is not empty. In that case,
- unlink_nt returns with STATUS_DIRECTORY_NOT_EMPTY. */
- if (dstpc->isdir ())
- {
- status = unlink_nt (*dstpc);
+ /* Opening the file must be part of the transaction. It's not sufficient
+ to call only NtSetInformationFile under the transaction. Therefore we
+ have to start the transaction here, if necessary. */
+ if (wincap.has_transactions ()
+ && (dstpc->fs_flags () & FILE_SUPPORTS_TRANSACTIONS)
+ && (dstpc->isdir ()
+ || (!removepc && dstpc->has_attribute (FILE_ATTRIBUTE_READONLY))))
+ start_transaction (old_trans, trans);
+
+ int retry_count;
+ retry_count = 0;
+ retry:
+ /* Talking about inconsistent behaviour...
+ - DELETE is required to rename a file. So far, so good.
+ - At least one cifs FS (Tru64) needs FILE_READ_ATTRIBUTE, otherwise the
+ FileRenameInformation call fails with STATUS_ACCESS_DENIED. However,
+ on NFS we get a STATUS_ACCESS_DENIED if FILE_READ_ATTRIBUTE is used
+ and the file we try to rename is a symlink. Urgh.
+ - Samba (only some versions?) doesn't like the FILE_SHARE_DELETE
+ mode if the file has the R/O attribute set and returns
+ STATUS_ACCESS_DENIED in that case. */
+ {
+ ULONG access = DELETE
+ | (oldpc.fs_is_cifs () ? FILE_READ_ATTRIBUTES : 0);
+ ULONG sharing = FILE_SHARE_READ | FILE_SHARE_WRITE
+ | (oldpc.fs_is_samba () ? 0 : FILE_SHARE_DELETE);
+ ULONG flags = FILE_OPEN_FOR_BACKUP_INTENT
+ | (oldpc.is_rep_symlink () ? FILE_OPEN_REPARSE_POINT : 0);
+ status = NtOpenFile (&fh, access,
+ oldpc.get_object_attr (attr, sec_none_nih),
+ &io, sharing, flags);
+ }
if (!NT_SUCCESS (status))
{
+ debug_printf ("status %y", status);
+ if (status == STATUS_SHARING_VIOLATION
+ && cygwait (10L) != WAIT_SIGNALED)
+ {
+ /* Typical BLODA problem. Some virus scanners check newly
+ generated files and while doing that disallow DELETE access.
+ That's really bad because it breaks applications which copy
+ files by creating a temporary filename and then rename the
+ temp filename to the target filename. This renaming fails due
+ to the jealous virus scanner and the application fails to
+ create the target file.
+
+ This kludge tries to work around that by yielding until the
+ sharing violation goes away, or a signal arrived, or after
+ about a second, give or take. */
+ if (++retry_count < 40)
+ {
+ yield ();
+ goto retry;
+ }
+ }
+ else if (NT_TRANSACTIONAL_ERROR (status) && trans)
+ {
+ /* If NtOpenFile fails due to transactional problems, stop
+ transaction and go ahead without. */
+ stop_transaction (status, old_trans, trans);
+ debug_printf ("Transaction failure. Retry open.");
+ goto retry;
+ }
__seterrno_from_nt_status (status);
- goto out;
+ __leave;
}
- }
- /* You can't copy a file if the destination exists and has the R/O
- attribute set. Remove the R/O attribute first. But first check
- if a removepc exists. If so, dstpc points to a non-existing file
- due to a mangled suffix. */
- else if (!removepc && dstpc->has_attribute (FILE_ATTRIBUTE_READONLY))
- {
- status = NtOpenFile (&nfh, FILE_WRITE_ATTRIBUTES,
- dstpc->get_object_attr (attr, sec_none_nih),
- &io, FILE_SHARE_VALID_FLAGS,
- FILE_OPEN_FOR_BACKUP_INTENT
- | (dstpc->is_rep_symlink ()
- ? FILE_OPEN_REPARSE_POINT : 0));
- if (!NT_SUCCESS (status))
+
+ /* Renaming a dir to another, existing dir fails always, even if
+ ReplaceIfExists is set to TRUE and the existing dir is empty. So
+ we have to remove the destination dir first. This also covers the
+ case that the destination directory is not empty. In that case,
+ unlink_nt returns with STATUS_DIRECTORY_NOT_EMPTY. */
+ if (dstpc->isdir ())
{
- __seterrno_from_nt_status (status);
- goto out;
+ status = unlink_nt (*dstpc);
+ if (!NT_SUCCESS (status))
+ {
+ __seterrno_from_nt_status (status);
+ __leave;
+ }
}
- status = NtSetAttributesFile (nfh, dstpc->file_attributes ()
- & ~FILE_ATTRIBUTE_READONLY);
- NtClose (nfh);
- if (!NT_SUCCESS (status))
+ /* You can't copy a file if the destination exists and has the R/O
+ attribute set. Remove the R/O attribute first. But first check
+ if a removepc exists. If so, dstpc points to a non-existing file
+ due to a mangled suffix. */
+ else if (!removepc && dstpc->has_attribute (FILE_ATTRIBUTE_READONLY))
{
- __seterrno_from_nt_status (status);
- goto out;
+ status = NtOpenFile (&nfh, FILE_WRITE_ATTRIBUTES,
+ dstpc->get_object_attr (attr, sec_none_nih),
+ &io, FILE_SHARE_VALID_FLAGS,
+ FILE_OPEN_FOR_BACKUP_INTENT
+ | (dstpc->is_rep_symlink ()
+ ? FILE_OPEN_REPARSE_POINT : 0));
+ if (!NT_SUCCESS (status))
+ {
+ __seterrno_from_nt_status (status);
+ __leave;
+ }
+ status = NtSetAttributesFile (nfh, dstpc->file_attributes ()
+ & ~FILE_ATTRIBUTE_READONLY);
+ NtClose (nfh);
+ if (!NT_SUCCESS (status))
+ {
+ __seterrno_from_nt_status (status);
+ __leave;
+ }
}
- }
- /* SUSv3: If the old argument and the new argument resolve to the same
- existing file, rename() shall return successfully and perform no
- other action.
- The test tries to be as quick as possible. Due to the above cross device
- check we already know both files are on the same device. So it just
- tests if oldpath has more than 1 hardlink, then it opens newpath
- and tests for identical file ids. If so, oldpath and newpath refer to
- the same file. */
- if ((removepc || dstpc->exists ())
- && !oldpc.isdir ()
- && NT_SUCCESS (NtQueryInformationFile (fh, &io, &ofsi, sizeof ofsi,
- FileStandardInformation))
- && ofsi.NumberOfLinks > 1
- && NT_SUCCESS (NtOpenFile (&nfh, READ_CONTROL,
+ /* SUSv3: If the old argument and the new argument resolve to the same
+ existing file, rename() shall return successfully and perform no
+ other action.
+ The test tries to be as quick as possible. Due to the above cross
+ device check we already know both files are on the same device. So
+ it just tests if oldpath has more than 1 hardlink, then it opens
+ newpath and tests for identical file ids. If so, oldpath and newpath
+ refer to the same file. */
+ if ((removepc || dstpc->exists ())
+ && !oldpc.isdir ()
+ && NT_SUCCESS (NtQueryInformationFile (fh, &io, &ofsi, sizeof ofsi,
+ FileStandardInformation))
+ && ofsi.NumberOfLinks > 1
+ && NT_SUCCESS (NtOpenFile (&nfh, READ_CONTROL,
(removepc ?: dstpc)->get_object_attr (attr, sec_none_nih),
&io, FILE_SHARE_VALID_FLAGS,
FILE_OPEN_FOR_BACKUP_INTENT
| ((removepc ?: dstpc)->is_rep_symlink ()
? FILE_OPEN_REPARSE_POINT : 0))))
- {
- FILE_INTERNAL_INFORMATION ofii, nfii;
-
- if (NT_SUCCESS (NtQueryInformationFile (fh, &io, &ofii, sizeof ofii,
- FileInternalInformation))
- && NT_SUCCESS (NtQueryInformationFile (nfh, &io, &nfii, sizeof nfii,
- FileInternalInformation))
- && ofii.FileId.QuadPart == nfii.FileId.QuadPart)
{
- debug_printf ("%s and %s are the same file", oldpath, newpath);
+ FILE_INTERNAL_INFORMATION ofii, nfii;
+
+ if (NT_SUCCESS (NtQueryInformationFile (fh, &io, &ofii, sizeof ofii,
+ FileInternalInformation))
+ && NT_SUCCESS (NtQueryInformationFile (nfh, &io, &nfii,
+ sizeof nfii,
+ FileInternalInformation))
+ && ofii.IndexNumber.QuadPart == nfii.IndexNumber.QuadPart)
+ {
+ debug_printf ("%s and %s are the same file", oldpath, newpath);
+ NtClose (nfh);
+ res = 0;
+ __leave;
+ }
NtClose (nfh);
- res = 0;
- goto out;
}
- NtClose (nfh);
- }
- /* Create FILE_RENAME_INFORMATION struct. Using a tmp_pathbuf area allows
- for paths of up to 32757 chars. This test is just for paranoia's sake. */
- if (dstpc->get_nt_native_path ()->Length > NT_MAX_PATH * sizeof (WCHAR)
- - sizeof (FILE_RENAME_INFORMATION))
- {
- debug_printf ("target filename too long");
- set_errno (EINVAL);
- goto out;
- }
- pfri = (PFILE_RENAME_INFORMATION) tp.w_get ();
- pfri->ReplaceIfExists = TRUE;
- pfri->RootDirectory = NULL;
- pfri->FileNameLength = dstpc->get_nt_native_path ()->Length;
- memcpy (&pfri->FileName, dstpc->get_nt_native_path ()->Buffer,
- pfri->FileNameLength);
- status = NtSetInformationFile (fh, &io, pfri,
- sizeof *pfri + pfri->FileNameLength,
- FileRenameInformation);
- /* This happens if the access rights don't allow deleting the destination.
- Even if the handle to the original file is opened with BACKUP
- and/or RECOVERY, these flags don't apply to the destination of the
- rename operation. So, a privileged user can't rename a file to an
- existing file, if the permissions of the existing file aren't right.
- Like directories, we have to handle this separately by removing the
- destination before renaming. */
- if (status == STATUS_ACCESS_DENIED && dstpc->exists () && !dstpc->isdir ())
- {
- if (wincap.has_transactions ()
- && (dstpc->fs_flags () & FILE_SUPPORTS_TRANSACTIONS)
- && !trans)
+ /* Create FILE_RENAME_INFORMATION struct. Using a tmp_pathbuf area
+ allows for paths of up to 32757 chars. This test is just for
+ paranoia's sake. */
+ if (dstpc->get_nt_native_path ()->Length
+ > NT_MAX_PATH * sizeof (WCHAR) - sizeof (FILE_RENAME_INFORMATION))
{
- start_transaction (old_trans, trans);
- /* As mentioned earlier, opening the file must be part of the
- transaction. Therefore we have to reopen the file here if the
- transaction hasn't been started already. Unfortunately we can't
- use the NT "reopen file from existing handle" feature. In that
- case NtOpenFile returns STATUS_TRANSACTIONAL_CONFLICT. We *have*
- to close the handle to the file first, *then* we can re-open it.
- Fortunately nothing has happened yet, so the atomicity of the
- rename functionality is not spoiled. */
- NtClose (fh);
- status = NtOpenFile (&fh, DELETE,
- oldpc.get_object_attr (attr, sec_none_nih),
- &io, FILE_SHARE_VALID_FLAGS,
- FILE_OPEN_FOR_BACKUP_INTENT
- | (oldpc.is_rep_symlink ()
- ? FILE_OPEN_REPARSE_POINT : 0));
- if (!NT_SUCCESS (status))
+ debug_printf ("target filename too long");
+ set_errno (EINVAL);
+ __leave;
+ }
+ pfri = (PFILE_RENAME_INFORMATION) tp.w_get ();
+ pfri->ReplaceIfExists = TRUE;
+ pfri->RootDirectory = NULL;
+ pfri->FileNameLength = dstpc->get_nt_native_path ()->Length;
+ memcpy (&pfri->FileName, dstpc->get_nt_native_path ()->Buffer,
+ pfri->FileNameLength);
+ status = NtSetInformationFile (fh, &io, pfri,
+ sizeof *pfri + pfri->FileNameLength,
+ FileRenameInformation);
+ /* This happens if the access rights don't allow deleting the destination.
+ Even if the handle to the original file is opened with BACKUP
+ and/or RECOVERY, these flags don't apply to the destination of the
+ rename operation. So, a privileged user can't rename a file to an
+ existing file, if the permissions of the existing file aren't right.
+ Like directories, we have to handle this separately by removing the
+ destination before renaming. */
+ if (status == STATUS_ACCESS_DENIED && dstpc->exists ()
+ && !dstpc->isdir ())
+ {
+ if (wincap.has_transactions ()
+ && (dstpc->fs_flags () & FILE_SUPPORTS_TRANSACTIONS)
+ && !trans)
{
- __seterrno_from_nt_status (status);
- goto out;
+ start_transaction (old_trans, trans);
+ /* As mentioned earlier, opening the file must be part of the
+ transaction. Therefore we have to reopen the file here if the
+ transaction hasn't been started already. Unfortunately we
+ can't use the NT "reopen file from existing handle" feature.
+ In that case NtOpenFile returns STATUS_TRANSACTIONAL_CONFLICT.
+ We *have* to close the handle to the file first, *then* we can
+ re-open it. Fortunately nothing has happened yet, so the
+ atomicity of the rename functionality is not spoiled. */
+ NtClose (fh);
+ retry_reopen:
+ status = NtOpenFile (&fh, DELETE,
+ oldpc.get_object_attr (attr, sec_none_nih),
+ &io, FILE_SHARE_VALID_FLAGS,
+ FILE_OPEN_FOR_BACKUP_INTENT
+ | (oldpc.is_rep_symlink ()
+ ? FILE_OPEN_REPARSE_POINT : 0));
+ if (!NT_SUCCESS (status))
+ {
+ if (NT_TRANSACTIONAL_ERROR (status) && trans)
+ {
+ /* If NtOpenFile fails due to transactional problems,
+ stop transaction and go ahead without. */
+ stop_transaction (status, old_trans, trans);
+ debug_printf ("Transaction failure. Retry open.");
+ goto retry_reopen;
+ }
+ __seterrno_from_nt_status (status);
+ __leave;
+ }
}
+ if (NT_SUCCESS (status = unlink_nt (*dstpc)))
+ status = NtSetInformationFile (fh, &io, pfri,
+ sizeof *pfri + pfri->FileNameLength,
+ FileRenameInformation);
+ }
+ if (NT_SUCCESS (status))
+ {
+ if (removepc)
+ unlink_nt (*removepc);
+ res = 0;
}
- if (NT_SUCCESS (status = unlink_nt (*dstpc)))
- status = NtSetInformationFile (fh, &io, pfri,
- sizeof *pfri + pfri->FileNameLength,
- FileRenameInformation);
+ else
+ __seterrno_from_nt_status (status);
}
- if (NT_SUCCESS (status))
+ __except (EFAULT)
{
- if (removepc)
- unlink_nt (*removepc);
- res = 0;
+ res = -1;
}
- else
- __seterrno_from_nt_status (status);
-
-out:
+ __endtry
if (fh)
NtClose (fh);
- if (wincap.has_transactions () && trans)
+ /* Stop transaction if we started one. */
+ if (trans)
stop_transaction (status, old_trans, trans);
- syscall_printf ("%R = rename(%s, %s)", res, oldpath, newpath);
+ if (get_errno () != EFAULT)
+ syscall_printf ("%R = rename(%s, %s)", res, oldpath, newpath);
return res;
}
@@ -2550,35 +2630,46 @@ system (const char *cmdstring)
{
pthread_testcancel ();
- myfault efault;
- if (efault.faulted (EFAULT))
- return -1;
-
- int res;
- const char* command[4];
-
if (cmdstring == NULL)
return 1;
- command[0] = "sh";
- command[1] = "-c";
- command[2] = cmdstring;
- command[3] = (const char *) NULL;
+ int res = -1;
+ const char* command[4];
+ const char *cmdexe = get_cmd_exe_path();
- if ((res = spawnvp (_P_SYSTEM, "/bin/sh", command)) == -1)
+ if (cmdexe == NULL)
+ return res;
+
+ __try
{
- // when exec fails, return value should be as if shell
- // executed exit (127)
- res = 127;
- }
+ command[0] = cmdexe;
+ command[1] = "/c";
+ command[2] = cmdstring;
+ command[3] = (const char *) NULL;
+ if ((res = spawnvp (_P_SYSTEM, cmdexe, command)) == -1)
+ {
+ // when exec fails, return value should be as if shell
+ // executed exit (127)
+ res = 127;
+ }
+ }
+ __except (EFAULT) {}
+ __endtry
return res;
}
extern "C" int
setdtablesize (int size)
{
- if (size <= (int)cygheap->fdtab.size || cygheap->fdtab.extend (size - cygheap->fdtab.size))
+ if (size < 0)
+ {
+ set_errno (EINVAL);
+ return -1;
+ }
+
+ if (size <= (int) cygheap->fdtab.size
+ || cygheap->fdtab.extend (size - cygheap->fdtab.size, OPEN_MAX_MAX))
return 0;
return -1;
@@ -2587,7 +2678,7 @@ setdtablesize (int size)
extern "C" int
getdtablesize ()
{
- return cygheap->fdtab.size > OPEN_MAX ? cygheap->fdtab.size : OPEN_MAX;
+ return cygheap->fdtab.size;
}
extern "C" int
@@ -2609,24 +2700,25 @@ fpathconf (int fd, int v)
extern "C" long int
pathconf (const char *file, int v)
{
- fhandler_base *fh;
+ fhandler_base *fh = NULL;
long ret = -1;
- myfault efault;
- if (efault.faulted (EFAULT))
- return -1;
-
- if (!*file)
+ __try
{
- set_errno (ENOENT);
- return -1;
+ if (!*file)
+ {
+ set_errno (ENOENT);
+ return -1;
+ }
+ if (!(fh = build_fh_name (file, PC_SYM_FOLLOW, stat_suffixes)))
+ return -1;
+ if (!fh->exists ())
+ set_errno (ENOENT);
+ else
+ ret = fh->fpathconf (v);
}
- if (!(fh = build_fh_name (file, PC_SYM_FOLLOW, stat_suffixes)))
- return -1;
- if (!fh->exists ())
- set_errno (ENOENT);
- else
- ret = fh->fpathconf (v);
+ __except (EFAULT) {}
+ __endtry
delete fh;
return ret;
}
@@ -2635,10 +2727,8 @@ extern "C" int
ttyname_r (int fd, char *buf, size_t buflen)
{
int ret = 0;
- myfault efault;
- if (efault.faulted ())
- ret = EFAULT;
- else
+
+ __try
{
cygheap_fdget cfd (fd, true);
if (cfd < 0)
@@ -2649,8 +2739,13 @@ ttyname_r (int fd, char *buf, size_t buflen)
ret = ERANGE;
else
strcpy (buf, cfd->ttyname ());
+ debug_printf ("returning %d tty: %s", ret, ret ? "NULL" : buf);
+ }
+ __except (NO_ERROR)
+ {
+ ret = EFAULT;
}
- debug_printf ("returning %d tty: %s", ret, ret ? "NULL" : buf);
+ __endtry
return ret;
}
@@ -2907,14 +3002,16 @@ _get_osfhandle (int fd)
extern "C" int
fstatvfs (int fd, struct statvfs *sfs)
{
- myfault efault;
- if (efault.faulted (EFAULT))
- return -1;
-
- cygheap_fdget cfd (fd);
- if (cfd < 0)
- return -1;
- return cfd->fstatvfs (sfs);
+ __try
+ {
+ cygheap_fdget cfd (fd);
+ if (cfd < 0)
+ __leave;
+ return cfd->fstatvfs (sfs);
+ }
+ __except (EFAULT) {}
+ __endtry
+ return -1;
}
extern "C" int
@@ -2923,30 +3020,30 @@ statvfs (const char *name, struct statvfs *sfs)
int res = -1;
fhandler_base *fh = NULL;
- myfault efault;
- if (efault.faulted (EFAULT))
- goto error;
+ __try
+ {
+ if (!(fh = build_fh_name (name, PC_SYM_FOLLOW, stat_suffixes)))
+ __leave;
- if (!(fh = build_fh_name (name, PC_SYM_FOLLOW, stat_suffixes)))
- goto error;
+ if (fh->error ())
+ {
+ debug_printf ("got %d error from build_fh_name", fh->error ());
+ set_errno (fh->error ());
+ }
+ else if (fh->exists ())
+ {
+ debug_printf ("(%s, %p), file_attributes %d", name, sfs, (DWORD) *fh);
+ res = fh->fstatvfs (sfs);
+ }
+ else
+ set_errno (ENOENT);
- if (fh->error ())
- {
- debug_printf ("got %d error from build_fh_name", fh->error ());
- set_errno (fh->error ());
- }
- else if (fh->exists ())
- {
- debug_printf ("(%s, %p), file_attributes %d", name, sfs, (DWORD) *fh);
- res = fh->fstatvfs (sfs);
}
- else
- set_errno (ENOENT);
-
+ __except (EFAULT) {}
+ __endtry
delete fh;
- error:
- MALLOC_CHECK;
- syscall_printf ("%R = statvfs(%s,%p)", res, name, sfs);
+ if (get_errno () != EFAULT)
+ syscall_printf ("%R = statvfs(%s,%p)", res, name, sfs);
return res;
}
@@ -3087,55 +3184,58 @@ mknod_worker (const char *path, mode_t type, mode_t mode, _major_t major,
extern "C" int
mknod32 (const char *path, mode_t mode, dev_t dev)
{
- myfault efault;
- if (efault.faulted (EFAULT))
- return -1;
- if (!*path)
+ __try
{
- set_errno (ENOENT);
- return -1;
- }
+ if (!*path)
+ {
+ set_errno (ENOENT);
+ __leave;
+ }
- if (strlen (path) >= PATH_MAX)
- return -1;
+ if (strlen (path) >= PATH_MAX)
+ __leave;
- path_conv w32path (path, PC_SYM_NOFOLLOW);
- if (w32path.exists ())
- {
- set_errno (EEXIST);
- return -1;
- }
+ path_conv w32path (path, PC_SYM_NOFOLLOW);
+ if (w32path.exists ())
+ {
+ set_errno (EEXIST);
+ __leave;
+ }
- mode_t type = mode & S_IFMT;
- _major_t major = _major (dev);
- _minor_t minor = _minor (dev);
- switch (type)
- {
- case S_IFCHR:
- case S_IFBLK:
- break;
+ mode_t type = mode & S_IFMT;
+ _major_t major = _major (dev);
+ _minor_t minor = _minor (dev);
+ switch (type)
+ {
+ case S_IFCHR:
+ case S_IFBLK:
+ break;
- case S_IFIFO:
- major = _major (FH_FIFO);
- minor = _minor (FH_FIFO);
- break;
+ case S_IFIFO:
+ major = _major (FH_FIFO);
+ minor = _minor (FH_FIFO);
+ break;
- case 0:
- case S_IFREG:
- {
- int fd = open (path, O_CREAT, mode);
- if (fd < 0)
- return -1;
- close (fd);
- return 0;
- }
+ case 0:
+ case S_IFREG:
+ {
+ int fd = open (path, O_CREAT, mode);
+ if (fd < 0)
+ __leave;
+ close (fd);
+ return 0;
+ }
- default:
- set_errno (EINVAL);
- return -1;
- }
+ default:
+ set_errno (EINVAL);
+ __leave;
+ }
- return mknod_worker (w32path.get_win32 (), type, mode, major, minor);
+ return mknod_worker (w32path.get_win32 (), type, mode, major, minor);
+ }
+ __except (EFAULT)
+ __endtry
+ return -1;
}
extern "C" int
@@ -3273,10 +3373,10 @@ seteuid32 (uid_t uid)
if (!new_token)
{
debug_printf ("lsaprivkeyauth failed, try lsaauth.");
- if (!(new_token = lsaauth (usersid, groups, pw_new)))
+ if (!(new_token = lsaauth (usersid, groups)))
{
debug_printf ("lsaauth failed, try create_token.");
- new_token = create_token (usersid, groups, pw_new);
+ new_token = create_token (usersid, groups);
if (new_token == INVALID_HANDLE_VALUE)
{
debug_printf ("create_token failed, bail out of here");
@@ -3297,11 +3397,7 @@ seteuid32 (uid_t uid)
NTSTATUS status;
if (!request_restricted_uid_switch)
- {
- /* Avoid having HKCU use default user */
- WCHAR name[128];
- load_registry_hive (usersid.string (name));
- }
+ load_user_profile (new_token, pw_new, usersid);
/* Try setting owner to same value as user. */
status = NtSetInformationToken (new_token, TokenOwner,
@@ -3567,7 +3663,7 @@ chroot (const char *newroot)
else
{
getwinenv("PATH="); /* Save the native PATH */
- cygheap->root.set (path.normalized_path, path.get_win32 (),
+ cygheap->root.set (path.get_posix (), path.get_win32 (),
!!path.objcaseinsensitive ());
ret = 0;
}
@@ -3720,7 +3816,7 @@ getpriority (int which, id_t who)
case PRIO_USER:
if ((uid_t) who == p->uid && p->nice < nice)
nice = p->nice;
- break;
+ break;
}
}
out:
@@ -3746,23 +3842,19 @@ nice (int incr)
extern "C" int
ffs (int i)
{
- static const unsigned char table[] =
- {
- 0,1,2,2,3,3,3,3,4,4,4,4,4,4,4,4,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,
- 6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,
- 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,
- 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,
- 8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,
- 8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,
- 8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,
- 8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8
- };
- unsigned long int a;
- unsigned long int x = i & -i;
+ return __builtin_ffs (i);
+}
- a = x <= 0xffff ? (x <= 0xff ? 0 : 8) : (x <= 0xffffff ? 16 : 24);
+extern "C" int
+ffsl (long i)
+{
+ return __builtin_ffsl (i);
+}
- return table[x >> a] + a;
+extern "C" int
+ffsll (long long i)
+{
+ return __builtin_ffsll (i);
}
static void
@@ -3841,18 +3933,26 @@ endutent ()
}
}
-extern "C" void
+extern "C" int
utmpname (const char *file)
{
- myfault efault;
- if (efault.faulted () || !*file)
+ __try
{
- debug_printf ("Invalid file");
- return;
+ if (*file)
+ {
+ endutent ();
+ utmp_file = strdup (file);
+ if (utmp_file)
+ {
+ debug_printf ("New UTMP file: %s", utmp_file);
+ return 0;
+ }
+ }
}
- endutent ();
- utmp_file = strdup (file);
- debug_printf ("New UTMP file: %s", utmp_file);
+ __except (EFAULT) {}
+ __endtry
+ debug_printf ("Setting UTMP file failed");
+ return -1;
}
EXPORT_ALIAS (utmpname, utmpxname)
@@ -3897,94 +3997,99 @@ getutent ()
extern "C" struct utmp *
getutid (const struct utmp *id)
{
- myfault efault;
- if (efault.faulted (EFAULT))
- return NULL;
- if (utmp_fd < 0)
+ __try
{
- internal_setutent (false);
if (utmp_fd < 0)
- return NULL;
- }
-
- utmp *ut = utmp_data;
- while (read (utmp_fd, ut, sizeof *ut) == sizeof *ut)
- {
- switch (id->ut_type)
{
- case RUN_LVL:
- case BOOT_TIME:
- case OLD_TIME:
- case NEW_TIME:
- if (id->ut_type == ut->ut_type)
- return ut;
- break;
- case INIT_PROCESS:
- case LOGIN_PROCESS:
- case USER_PROCESS:
- case DEAD_PROCESS:
- if (strncmp (id->ut_id, ut->ut_id, UT_IDLEN) == 0)
- return ut;
- break;
- default:
- return NULL;
+ internal_setutent (false);
+ if (utmp_fd < 0)
+ __leave;
+ }
+ utmp *ut = utmp_data;
+ while (read (utmp_fd, ut, sizeof *ut) == sizeof *ut)
+ {
+ switch (id->ut_type)
+ {
+ case RUN_LVL:
+ case BOOT_TIME:
+ case OLD_TIME:
+ case NEW_TIME:
+ if (id->ut_type == ut->ut_type)
+ return ut;
+ break;
+ case INIT_PROCESS:
+ case LOGIN_PROCESS:
+ case USER_PROCESS:
+ case DEAD_PROCESS:
+ if (strncmp (id->ut_id, ut->ut_id, UT_IDLEN) == 0)
+ return ut;
+ break;
+ default:
+ break;
+ }
}
}
+ __except (EFAULT) {}
+ __endtry
return NULL;
}
extern "C" struct utmp *
getutline (const struct utmp *line)
{
- myfault efault;
- if (efault.faulted (EFAULT))
- return NULL;
- if (utmp_fd < 0)
+ __try
{
- internal_setutent (false);
if (utmp_fd < 0)
- return NULL;
- }
-
- utmp *ut = utmp_data;
- while (read (utmp_fd, ut, sizeof *ut) == sizeof *ut)
- if ((ut->ut_type == LOGIN_PROCESS ||
- ut->ut_type == USER_PROCESS) &&
- !strncmp (ut->ut_line, line->ut_line, sizeof (ut->ut_line)))
- return ut;
+ {
+ internal_setutent (false);
+ if (utmp_fd < 0)
+ __leave;
+ }
+ utmp *ut = utmp_data;
+ while (read (utmp_fd, ut, sizeof *ut) == sizeof *ut)
+ if ((ut->ut_type == LOGIN_PROCESS ||
+ ut->ut_type == USER_PROCESS) &&
+ !strncmp (ut->ut_line, line->ut_line, sizeof (ut->ut_line)))
+ return ut;
+ }
+ __except (EFAULT) {}
+ __endtry
return NULL;
}
extern "C" struct utmp *
pututline (const struct utmp *ut)
{
- myfault efault;
- if (efault.faulted (EFAULT))
- return NULL;
- internal_setutent (true);
- if (utmp_fd < 0)
+ __try
{
- debug_printf ("error: utmp_fd %d", utmp_fd);
- return NULL;
- }
- debug_printf ("ut->ut_type %d, ut->ut_pid %d, ut->ut_line '%s', ut->ut_id '%s'\n",
- ut->ut_type, ut->ut_pid, ut->ut_line, ut->ut_id);
- debug_printf ("ut->ut_user '%s', ut->ut_host '%s'\n",
- ut->ut_user, ut->ut_host);
+ internal_setutent (true);
+ if (utmp_fd < 0)
+ {
+ debug_printf ("error: utmp_fd %d", utmp_fd);
+ __leave;
+ }
+ debug_printf ("ut->ut_type %d, ut->ut_pid %d, ut->ut_line '%s', ut->ut_id '%s'\n",
+ ut->ut_type, ut->ut_pid, ut->ut_line, ut->ut_id);
+ debug_printf ("ut->ut_user '%s', ut->ut_host '%s'\n",
+ ut->ut_user, ut->ut_host);
- struct utmp *u;
- if ((u = getutid (ut)))
- {
- lseek (utmp_fd, -sizeof *ut, SEEK_CUR);
- write (utmp_fd, ut, sizeof *ut);
- }
- else
- locked_append (utmp_fd, ut, sizeof *ut);
- /* The documentation says to return a pointer to this which implies that
- this has to be cast from a const. That doesn't seem right but the
- documentation seems pretty clear on this. */
- return (struct utmp *) ut;
+ struct utmp *u;
+ if ((u = getutid (ut)))
+ {
+ lseek (utmp_fd, -sizeof *ut, SEEK_CUR);
+ write (utmp_fd, ut, sizeof *ut);
+ }
+ else
+ locked_append (utmp_fd, ut, sizeof *ut);
+ /* The documentation says to return a pointer to this which implies that
+ this has to be cast from a const. That doesn't seem right but the
+ documentation seems pretty clear on this. */
+ return (struct utmp *) ut;
+ }
+ __except (EFAULT) {}
+ __endtry
+ return NULL;
}
extern "C" void
@@ -4002,7 +4107,7 @@ endutxent ()
extern "C" struct utmpx *
getutxent ()
{
- /* UGH. Not thread safe. */
+ /* POSIX: Not required to be thread safe. */
static struct utmpx utx;
return copy_ut_to_utx (getutent (), &utx);
}
@@ -4010,40 +4115,49 @@ getutxent ()
extern "C" struct utmpx *
getutxid (const struct utmpx *id)
{
- /* UGH. Not thread safe. */
+ /* POSIX: Not required to be thread safe. */
static struct utmpx utx;
- myfault efault;
- if (efault.faulted (EFAULT))
- return NULL;
- ((struct utmpx *)id)->ut_time = id->ut_tv.tv_sec;
- return copy_ut_to_utx (getutid ((struct utmp *) id), &utx);
+ __try
+ {
+ ((struct utmpx *)id)->ut_time = id->ut_tv.tv_sec;
+ return copy_ut_to_utx (getutid ((struct utmp *) id), &utx);
+ }
+ __except (EFAULT) {}
+ __endtry
+ return NULL;
}
extern "C" struct utmpx *
getutxline (const struct utmpx *line)
{
- /* UGH. Not thread safe. */
+ /* POSIX: Not required to be thread safe. */
static struct utmpx utx;
- myfault efault;
- if (efault.faulted (EFAULT))
- return NULL;
- ((struct utmpx *)line)->ut_time = line->ut_tv.tv_sec;
- return copy_ut_to_utx (getutline ((struct utmp *) line), &utx);
+ __try
+ {
+ ((struct utmpx *)line)->ut_time = line->ut_tv.tv_sec;
+ return copy_ut_to_utx (getutline ((struct utmp *) line), &utx);
+ }
+ __except (EFAULT) {}
+ __endtry
+ return NULL;
}
extern "C" struct utmpx *
pututxline (const struct utmpx *utmpx)
{
- /* UGH. Not thread safe. */
+ /* POSIX: Not required to be thread safe. */
static struct utmpx utx;
- myfault efault;
- if (efault.faulted (EFAULT))
- return NULL;
- ((struct utmpx *)utmpx)->ut_time = utmpx->ut_tv.tv_sec;
- return copy_ut_to_utx (pututline ((struct utmp *) utmpx), &utx);
+ __try
+ {
+ ((struct utmpx *)utmpx)->ut_time = utmpx->ut_tv.tv_sec;
+ return copy_ut_to_utx (pututline ((struct utmp *) utmpx), &utx);
+ }
+ __except (EFAULT) {}
+ __endtry
+ return NULL;
}
extern "C" void
@@ -4077,70 +4191,30 @@ gethostid (void)
return (int32_t) hostid; /* Avoid sign extension. */
}
-#define ETC_SHELLS "/etc/shells"
static int shell_index;
-static struct __sFILE64 *shell_fp;
extern "C" char *
getusershell ()
{
- /* List of default shells if no /etc/shells exists, defined as on Linux.
- FIXME: SunOS has a far longer list, containing all shells which
- might be shipped with the OS. Should we do the same for the Cygwin
- distro, adding bash, tcsh, ksh, pdksh and zsh? */
- static const char *def_shells[] = {
- "/bin/sh",
- "/bin/csh",
- "/usr/bin/sh",
- "/usr/bin/csh",
- NULL
- };
- static char buf[PATH_MAX];
- int ch, buf_idx;
-
- if (!shell_fp && !(shell_fp = fopen64 (ETC_SHELLS, "rt")))
- {
- if (def_shells[shell_index])
- return strcpy (buf, def_shells[shell_index++]);
- return NULL;
- }
- /* Skip white space characters. */
- while ((ch = getc (shell_fp)) != EOF && isspace (ch))
- ;
- /* Get each non-whitespace character as part of the shell path as long as
- it fits in buf. */
- for (buf_idx = 0;
- ch != EOF && !isspace (ch) && buf_idx < PATH_MAX;
- buf_idx++, ch = getc (shell_fp))
- buf[buf_idx] = ch;
- /* Skip any trailing non-whitespace character not fitting in buf. If the
- path is longer than PATH_MAX, it's invalid anyway. */
- while (ch != EOF && !isspace (ch))
- ch = getc (shell_fp);
- if (buf_idx)
- {
- buf[buf_idx] = '\0';
- return buf;
+ if (shell_index == 0) {
+ char *cmdexe = const_cast<char *>(get_cmd_exe_path());
+ if (cmdexe != NULL) {
+ shell_index = 1;
+ return cmdexe;
}
+ }
return NULL;
}
extern "C" void
setusershell ()
{
- if (shell_fp)
- fseek (shell_fp, 0L, SEEK_SET);
shell_index = 0;
}
extern "C" void
endusershell ()
{
- if (shell_fp)
- {
- fclose (shell_fp);
- shell_fp = NULL;
- }
shell_index = 0;
}
@@ -4166,11 +4240,42 @@ extern "C" FILE *
popen (const char *command, const char *in_type)
{
const char *type = in_type;
- char rw = *type++;
+ char fdopen_flags[3] = "\0\0";
+ int pipe_flags = 0;
+ const char *cmdexe = get_cmd_exe_path();
+
+#define rw fdopen_flags[0]
+#define bintext fdopen_flags[1]
+
+ if (cmdexe == NULL) {
+ set_errno (EOPNOTSUPP);
+ return NULL;
+ }
- /* Sanity check in_type */
- if (*type == 'b' || *type == 't')
- type++;
+ /* Sanity check. GLibc allows any order and any number of repetition,
+ as long as the string doesn't contradict itself. We do the same here. */
+ while (*type)
+ {
+ if (*type == 'r' || *type == 'w')
+ {
+ if (rw && rw != *type)
+ break;
+ rw = *type++;
+ }
+ else if (*type == 'b' || *type == 't')
+ {
+ if (bintext && bintext != *type)
+ break;
+ bintext = *type++;
+ }
+ else if (*type == 'e')
+ {
+ pipe_flags = O_CLOEXEC;
+ ++type;
+ }
+ else
+ break;
+ }
if ((rw != 'r' && rw != 'w') || (*type != '\0'))
{
set_errno (EINVAL);
@@ -4178,13 +4283,13 @@ popen (const char *command, const char *in_type)
}
int fds[2];
- if (pipe (fds) < 0)
+ if (pipe2 (fds, pipe_flags) < 0)
return NULL;
int myix = rw == 'r' ? 0 : 1;
lock_process now;
- FILE *fp = fdopen (fds[myix], in_type);
+ FILE *fp = fdopen (fds[myix], fdopen_flags);
if (fp)
{
/* If fds are in the range of stdin/stdout/stderr, move them
@@ -4214,15 +4319,19 @@ popen (const char *command, const char *in_type)
const char *argv[4] =
{
- "/bin/sh",
- "-c",
+ cmdexe,
+ "/c",
command,
NULL
};
- /* Don't pass our end of the pipe to the child process */
- int fd_state = fcntl64 (myfd, F_GETFD, 0);
- fcntl64 (myfd, F_SETFD, fd_state | FD_CLOEXEC);
+ /* With 'e' flag given, we have to revert the close-on-exec on the child
+ end of the pipe. Otherwise don't pass our end of the pipe to the
+ child process. */
+ if (pipe_flags & O_CLOEXEC)
+ fcntl64 (__std[stdchild], F_SETFD, 0);
+ else
+ fcntl64 (myfd, F_SETFD, FD_CLOEXEC);
/* Also don't pass the file handle currently associated with stdin/stdout
to the child. This function may actually fail if the stdchild fd
@@ -4231,8 +4340,8 @@ popen (const char *command, const char *in_type)
fcntl64 (stdchild, F_SETFD, stdchild_state | FD_CLOEXEC);
/* Start a shell process to run the given command without forking. */
- pid_t pid = ch_spawn.worker ("/bin/sh", argv, cur_environ (), _P_NOWAIT,
- __std[0], __std[1]);
+ pid_t pid = ch_spawn.worker (cmdexe, argv, cur_environ (),
+ _P_NOWAIT, __std[0], __std[1]);
/* Reinstate the close-on-exec state */
fcntl64 (stdchild, F_SETFD, stdchild_state);
@@ -4248,10 +4357,8 @@ popen (const char *command, const char *in_type)
if (fds[myix] != orig_fds[myix])
cygheap->fdtab.move_fd (fds[myix], myfd = orig_fds[myix]);
fhandler_pipe *fh = (fhandler_pipe *) cygheap->fdtab[myfd];
- /* Flag that this handle is associated with popen and then reset
- the handle's original close-on-exec state. */
+ /* Flag that this handle is associated with popen. */
fh->set_popen_pid (pid);
- fcntl64 (myfd, F_SETFD, fd_state);
return fp;
}
}
@@ -4259,9 +4366,22 @@ popen (const char *command, const char *in_type)
/* If we reach here we've seen an error but the pipe handles are open.
Close them and return NULL. */
int save_errno = get_errno ();
- close (fds[0]);
- close (fds[1]);
+ if (fp)
+ {
+ /* Must fclose fp to avoid memory leak. */
+ fclose (fp);
+ close (fds[myix ^ 1]);
+ }
+ else
+ {
+ close (fds[0]);
+ close (fds[1]);
+ }
set_errno (save_errno);
+
+#undef rw
+#undef bintext
+
return NULL;
}
@@ -4367,51 +4487,57 @@ extern "C" int
openat (int dirfd, const char *pathname, int flags, ...)
{
tmp_pathbuf tp;
- myfault efault;
- if (efault.faulted (EFAULT))
- return -1;
- char *path = tp.c_get ();
- if (gen_full_path_at (path, dirfd, pathname))
- return -1;
+ __try
+ {
+ char *path = tp.c_get ();
+ if (gen_full_path_at (path, dirfd, pathname))
+ __leave;
- va_list ap;
- mode_t mode;
+ va_list ap;
+ mode_t mode;
- va_start (ap, flags);
- mode = va_arg (ap, mode_t);
- va_end (ap);
- return open (path, flags, mode);
+ va_start (ap, flags);
+ mode = va_arg (ap, mode_t);
+ va_end (ap);
+ return open (path, flags, mode);
+ }
+ __except (EFAULT) {}
+ __endtry
+ return -1;
}
extern "C" int
faccessat (int dirfd, const char *pathname, int mode, int flags)
{
tmp_pathbuf tp;
- myfault efault;
- if (efault.faulted (EFAULT))
- return -1;
-
int res = -1;
- char *path = tp.c_get ();
- if (!gen_full_path_at (path, dirfd, pathname))
+
+ __try
{
- if ((mode & ~(F_OK|R_OK|W_OK|X_OK))
- || (flags & ~(AT_SYMLINK_NOFOLLOW|AT_EACCESS)))
- set_errno (EINVAL);
- else
+ char *path = tp.c_get ();
+ if (!gen_full_path_at (path, dirfd, pathname))
{
- fhandler_base *fh = build_fh_name (path, (flags & AT_SYMLINK_NOFOLLOW
- ? PC_SYM_NOFOLLOW
- : PC_SYM_FOLLOW)
- | PC_KEEP_HANDLE,
- stat_suffixes);
- if (fh)
+ if ((mode & ~(F_OK|R_OK|W_OK|X_OK))
+ || (flags & ~(AT_SYMLINK_NOFOLLOW|AT_EACCESS)))
+ set_errno (EINVAL);
+ else
{
- res = fh->fhaccess (mode, !!(flags & AT_EACCESS));
- delete fh;
+ fhandler_base *fh = build_fh_name (path,
+ (flags & AT_SYMLINK_NOFOLLOW
+ ? PC_SYM_NOFOLLOW
+ : PC_SYM_FOLLOW)
+ | PC_KEEP_HANDLE,
+ stat_suffixes);
+ if (fh)
+ {
+ res = fh->fhaccess (mode, !!(flags & AT_EACCESS));
+ delete fh;
+ }
}
}
}
+ __except (EFAULT) {}
+ __endtry
debug_printf ("returning %d", res);
return res;
}
@@ -4420,61 +4546,71 @@ extern "C" int
fchmodat (int dirfd, const char *pathname, mode_t mode, int flags)
{
tmp_pathbuf tp;
- myfault efault;
- if (efault.faulted (EFAULT))
- return -1;
- if (flags)
+ __try
{
- /* BSD has lchmod, but Linux does not. POSIX says
- AT_SYMLINK_NOFOLLOW is allowed to fail on symlinks; but Linux
- blindly fails even for non-symlinks. */
- set_errno ((flags & ~AT_SYMLINK_NOFOLLOW) ? EINVAL : EOPNOTSUPP);
- return -1;
+ if (flags)
+ {
+ /* BSD has lchmod, but Linux does not. POSIX says
+ AT_SYMLINK_NOFOLLOW is allowed to fail on symlinks; but Linux
+ blindly fails even for non-symlinks. */
+ set_errno ((flags & ~AT_SYMLINK_NOFOLLOW) ? EINVAL : EOPNOTSUPP);
+ __leave;
+ }
+ char *path = tp.c_get ();
+ if (gen_full_path_at (path, dirfd, pathname))
+ __leave;
+ return chmod (path, mode);
}
- char *path = tp.c_get ();
- if (gen_full_path_at (path, dirfd, pathname))
- return -1;
- return chmod (path, mode);
+ __except (EFAULT) {}
+ __endtry
+ return -1;
}
extern "C" int
fchownat (int dirfd, const char *pathname, uid_t uid, gid_t gid, int flags)
{
tmp_pathbuf tp;
- myfault efault;
- if (efault.faulted (EFAULT))
- return -1;
- if (flags & ~AT_SYMLINK_NOFOLLOW)
+ __try
{
- set_errno (EINVAL);
- return -1;
- }
- char *path = tp.c_get ();
- if (gen_full_path_at (path, dirfd, pathname))
- return -1;
- return chown_worker (path, (flags & AT_SYMLINK_NOFOLLOW)
- ? PC_SYM_NOFOLLOW : PC_SYM_FOLLOW, uid, gid);
+ if (flags & ~AT_SYMLINK_NOFOLLOW)
+ {
+ set_errno (EINVAL);
+ __leave;
+ }
+ char *path = tp.c_get ();
+ if (gen_full_path_at (path, dirfd, pathname))
+ __leave;
+ return chown_worker (path, (flags & AT_SYMLINK_NOFOLLOW)
+ ? PC_SYM_NOFOLLOW : PC_SYM_FOLLOW, uid, gid);
+ }
+ __except (EFAULT) {}
+ __endtry
+ return -1;
}
extern "C" int
-fstatat (int dirfd, const char *pathname, struct stat *st, int flags)
+fstatat (int dirfd, const char *__restrict pathname, struct stat *__restrict st,
+ int flags)
{
tmp_pathbuf tp;
- myfault efault;
- if (efault.faulted (EFAULT))
- return -1;
- if (flags & ~AT_SYMLINK_NOFOLLOW)
+ __try
{
- set_errno (EINVAL);
- return -1;
- }
- char *path = tp.c_get ();
- if (gen_full_path_at (path, dirfd, pathname))
- return -1;
- path_conv pc (path, ((flags & AT_SYMLINK_NOFOLLOW)
- ? PC_SYM_NOFOLLOW : PC_SYM_FOLLOW)
- | PC_POSIX | PC_KEEP_HANDLE, stat_suffixes);
- return stat_worker (pc, st);
+ if (flags & ~AT_SYMLINK_NOFOLLOW)
+ {
+ set_errno (EINVAL);
+ __leave;
+ }
+ char *path = tp.c_get ();
+ if (gen_full_path_at (path, dirfd, pathname))
+ __leave;
+ path_conv pc (path, ((flags & AT_SYMLINK_NOFOLLOW)
+ ? PC_SYM_NOFOLLOW : PC_SYM_FOLLOW)
+ | PC_POSIX | PC_KEEP_HANDLE, stat_suffixes);
+ return stat_worker (pc, st);
+ }
+ __except (EFAULT) {}
+ __endtry
+ return -1;
}
extern int utimens_worker (path_conv &, const struct timespec *);
@@ -4484,34 +4620,40 @@ utimensat (int dirfd, const char *pathname, const struct timespec *times,
int flags)
{
tmp_pathbuf tp;
- myfault efault;
- if (efault.faulted (EFAULT))
- return -1;
- char *path = tp.c_get ();
- if (flags & ~AT_SYMLINK_NOFOLLOW)
+ __try
{
- set_errno (EINVAL);
- return -1;
- }
- if (gen_full_path_at (path, dirfd, pathname))
- return -1;
- path_conv win32 (path, PC_POSIX | ((flags & AT_SYMLINK_NOFOLLOW)
- ? PC_SYM_NOFOLLOW : PC_SYM_FOLLOW),
- stat_suffixes);
- return utimens_worker (win32, times);
+ char *path = tp.c_get ();
+ if (flags & ~AT_SYMLINK_NOFOLLOW)
+ {
+ set_errno (EINVAL);
+ __leave;
+ }
+ if (gen_full_path_at (path, dirfd, pathname))
+ __leave;
+ path_conv win32 (path, PC_POSIX | ((flags & AT_SYMLINK_NOFOLLOW)
+ ? PC_SYM_NOFOLLOW : PC_SYM_FOLLOW),
+ stat_suffixes);
+ return utimens_worker (win32, times);
+ }
+ __except (EFAULT) {}
+ __endtry
+ return -1;
}
extern "C" int
futimesat (int dirfd, const char *pathname, const struct timeval *times)
{
tmp_pathbuf tp;
- myfault efault;
- if (efault.faulted (EFAULT))
- return -1;
- char *path = tp.c_get ();
- if (gen_full_path_at (path, dirfd, pathname, true))
- return -1;
- return utimes (path, times);
+ __try
+ {
+ char *path = tp.c_get ();
+ if (gen_full_path_at (path, dirfd, pathname, true))
+ __leave;
+ return utimes (path, times);
+ }
+ __except (EFAULT) {}
+ __endtry
+ return -1;
}
extern "C" int
@@ -4520,83 +4662,99 @@ linkat (int olddirfd, const char *oldpathname,
int flags)
{
tmp_pathbuf tp;
- myfault efault;
- if (efault.faulted (EFAULT))
- return -1;
- if (flags & ~AT_SYMLINK_FOLLOW)
- {
- set_errno (EINVAL);
- return -1;
- }
- char *oldpath = tp.c_get ();
- if (gen_full_path_at (oldpath, olddirfd, oldpathname))
- return -1;
- char *newpath = tp.c_get ();
- if (gen_full_path_at (newpath, newdirfd, newpathname))
- return -1;
- if (flags & AT_SYMLINK_FOLLOW)
+ __try
{
- path_conv old_name (oldpath, PC_SYM_FOLLOW | PC_POSIX, stat_suffixes);
- if (old_name.error)
+ if (flags & ~AT_SYMLINK_FOLLOW)
{
- set_errno (old_name.error);
- return -1;
+ set_errno (EINVAL);
+ __leave;
+ }
+ char *oldpath = tp.c_get ();
+ if (gen_full_path_at (oldpath, olddirfd, oldpathname))
+ __leave;
+ char *newpath = tp.c_get ();
+ if (gen_full_path_at (newpath, newdirfd, newpathname))
+ __leave;
+ if (flags & AT_SYMLINK_FOLLOW)
+ {
+ path_conv old_name (oldpath, PC_SYM_FOLLOW | PC_POSIX, stat_suffixes);
+ if (old_name.error)
+ {
+ set_errno (old_name.error);
+ __leave;
+ }
+ strcpy (oldpath, old_name.get_posix ());
}
- strcpy (oldpath, old_name.normalized_path);
+ return link (oldpath, newpath);
}
- return link (oldpath, newpath);
+ __except (EFAULT) {}
+ __endtry
+ return -1;
}
extern "C" int
mkdirat (int dirfd, const char *pathname, mode_t mode)
{
tmp_pathbuf tp;
- myfault efault;
- if (efault.faulted (EFAULT))
- return -1;
- char *path = tp.c_get ();
- if (gen_full_path_at (path, dirfd, pathname))
- return -1;
- return mkdir (path, mode);
+ __try
+ {
+ char *path = tp.c_get ();
+ if (gen_full_path_at (path, dirfd, pathname))
+ __leave;
+ return mkdir (path, mode);
+ }
+ __except (EFAULT) {}
+ __endtry
+ return -1;
}
extern "C" int
mkfifoat (int dirfd, const char *pathname, mode_t mode)
{
tmp_pathbuf tp;
- myfault efault;
- if (efault.faulted (EFAULT))
- return -1;
- char *path = tp.c_get ();
- if (gen_full_path_at (path, dirfd, pathname))
- return -1;
- return mkfifo (path, mode);
+ __try
+ {
+ char *path = tp.c_get ();
+ if (gen_full_path_at (path, dirfd, pathname))
+ __leave;
+ return mkfifo (path, mode);
+ }
+ __except (EFAULT) {}
+ __endtry
+ return -1;
}
extern "C" int
mknodat (int dirfd, const char *pathname, mode_t mode, dev_t dev)
{
tmp_pathbuf tp;
- myfault efault;
- if (efault.faulted (EFAULT))
- return -1;
- char *path = tp.c_get ();
- if (gen_full_path_at (path, dirfd, pathname))
- return -1;
- return mknod32 (path, mode, dev);
+ __try
+ {
+ char *path = tp.c_get ();
+ if (gen_full_path_at (path, dirfd, pathname))
+ __leave;
+ return mknod32 (path, mode, dev);
+ }
+ __except (EFAULT) {}
+ __endtry
+ return -1;
}
extern "C" ssize_t
-readlinkat (int dirfd, const char *pathname, char *buf, size_t bufsize)
+readlinkat (int dirfd, const char *__restrict pathname, char *__restrict buf,
+ size_t bufsize)
{
tmp_pathbuf tp;
- myfault efault;
- if (efault.faulted (EFAULT))
- return -1;
- char *path = tp.c_get ();
- if (gen_full_path_at (path, dirfd, pathname))
- return -1;
- return readlink (path, buf, bufsize);
+ __try
+ {
+ char *path = tp.c_get ();
+ if (gen_full_path_at (path, dirfd, pathname))
+ __leave;
+ return readlink (path, buf, bufsize);
+ }
+ __except (EFAULT) {}
+ __endtry
+ return -1;
}
extern "C" int
@@ -4604,16 +4762,19 @@ renameat (int olddirfd, const char *oldpathname,
int newdirfd, const char *newpathname)
{
tmp_pathbuf tp;
- myfault efault;
- if (efault.faulted (EFAULT))
- return -1;
- char *oldpath = tp.c_get ();
- if (gen_full_path_at (oldpath, olddirfd, oldpathname))
- return -1;
- char *newpath = tp.c_get ();
- if (gen_full_path_at (newpath, newdirfd, newpathname))
- return -1;
- return rename (oldpath, newpath);
+ __try
+ {
+ char *oldpath = tp.c_get ();
+ if (gen_full_path_at (oldpath, olddirfd, oldpathname))
+ __leave;
+ char *newpath = tp.c_get ();
+ if (gen_full_path_at (newpath, newdirfd, newpathname))
+ __leave;
+ return rename (oldpath, newpath);
+ }
+ __except (EFAULT) {}
+ __endtry
+ return -1;
}
extern "C" int
@@ -4622,42 +4783,51 @@ scandirat (int dirfd, const char *pathname, struct dirent ***namelist,
int (*compar) (const struct dirent **, const struct dirent **))
{
tmp_pathbuf tp;
- myfault efault;
- if (efault.faulted (EFAULT))
- return -1;
- char *path = tp.c_get ();
- if (gen_full_path_at (path, dirfd, pathname))
- return -1;
- return scandir (pathname, namelist, select, compar);
+ __try
+ {
+ char *path = tp.c_get ();
+ if (gen_full_path_at (path, dirfd, pathname))
+ __leave;
+ return scandir (pathname, namelist, select, compar);
+ }
+ __except (EFAULT) {}
+ __endtry
+ return -1;
}
extern "C" int
symlinkat (const char *oldpath, int newdirfd, const char *newpathname)
{
tmp_pathbuf tp;
- myfault efault;
- if (efault.faulted (EFAULT))
- return -1;
- char *newpath = tp.c_get ();
- if (gen_full_path_at (newpath, newdirfd, newpathname))
- return -1;
- return symlink (oldpath, newpath);
+ __try
+ {
+ char *newpath = tp.c_get ();
+ if (gen_full_path_at (newpath, newdirfd, newpathname))
+ __leave;
+ return symlink (oldpath, newpath);
+ }
+ __except (EFAULT) {}
+ __endtry
+ return -1;
}
extern "C" int
unlinkat (int dirfd, const char *pathname, int flags)
{
tmp_pathbuf tp;
- myfault efault;
- if (efault.faulted (EFAULT))
- return -1;
- if (flags & ~AT_REMOVEDIR)
+ __try
{
- set_errno (EINVAL);
- return -1;
+ if (flags & ~AT_REMOVEDIR)
+ {
+ set_errno (EINVAL);
+ __leave;
+ }
+ char *path = tp.c_get ();
+ if (gen_full_path_at (path, dirfd, pathname))
+ __leave;
+ return (flags & AT_REMOVEDIR) ? rmdir (path) : unlink (path);
}
- char *path = tp.c_get ();
- if (gen_full_path_at (path, dirfd, pathname))
- return -1;
- return (flags & AT_REMOVEDIR) ? rmdir (path) : unlink (path);
+ __except (EFAULT) {}
+ __endtry
+ return -1;
}
diff --git a/winsup/cygwin/sysconf.cc b/winsup/cygwin/sysconf.cc
index 7d09f53d0..a24a98501 100644
--- a/winsup/cygwin/sysconf.cc
+++ b/winsup/cygwin/sysconf.cc
@@ -1,8 +1,5 @@
/* sysconf.cc
- Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008, 2009, 2010, 2011, 2012, 2013 Red Hat, Inc.
-
This file is part of Cygwin.
This software is a copyrighted work licensed under the terms of the
@@ -20,6 +17,8 @@ details. */
#include "dtable.h"
#include "pinfo.h"
#include "ntdll.h"
+#include "tls_pbuf.h"
+#include "cpuid.h"
static long
get_open_max (int in)
@@ -36,38 +35,79 @@ get_page_size (int in)
return wincap.allocation_granularity ();
}
-static long
-get_nproc_values (int in)
+static bool
+__nt_query_system (PSYSTEM_BASIC_INFORMATION psbi)
{
NTSTATUS status;
- SYSTEM_BASIC_INFORMATION sbi;
- status = NtQuerySystemInformation (SystemBasicInformation, (PVOID) &sbi,
- sizeof sbi, NULL);
- if (!NT_SUCCESS (status))
+ status = NtQuerySystemInformation (SystemBasicInformation, (PVOID) psbi,
+ sizeof *psbi, NULL);
+ return NT_SUCCESS (status);
+}
+
+#define add_size(p,s) ((p) = ((__typeof__(p))((PBYTE)(p)+(s))))
+
+static long
+get_nproc_values (int in)
+{
+ if (!wincap.has_processor_groups ()) /* Pre Windows 7 */
{
- __seterrno_from_nt_status (status);
- debug_printf ("NtQuerySystemInformation: status %y, %E", status);
- return -1;
+ SYSTEM_BASIC_INFORMATION sbi;
+
+ if (!__nt_query_system (&sbi))
+ return -1;
+ switch (in)
+ {
+ case _SC_NPROCESSORS_CONF:
+ return sbi.NumberProcessors;
+ case _SC_NPROCESSORS_ONLN:
+ {
+ int i = 0;
+ do
+ if (sbi.ActiveProcessors & 1)
+ i++;
+ while (sbi.ActiveProcessors >>= 1);
+ return i;
+ }
+ }
}
- switch (in)
- {
- case _SC_NPROCESSORS_CONF:
- return sbi.NumberProcessors;
- case _SC_NPROCESSORS_ONLN:
+
+ tmp_pathbuf tp;
+ PSYSTEM_LOGICAL_PROCESSOR_INFORMATION_EX lpi, plpi;
+ DWORD lpi_size = NT_MAX_PATH;
+ long cnt = 0;
+
+ lpi = (PSYSTEM_LOGICAL_PROCESSOR_INFORMATION_EX) tp.c_get ();
+ if (!GetLogicalProcessorInformationEx (RelationGroup, lpi, &lpi_size))
+ return -1;
+ plpi = lpi;
+ for (DWORD size = lpi_size; size > 0;
+ size -= plpi->Size, add_size (plpi, plpi->Size))
+ if (plpi->Relationship == RelationGroup)
{
- int i = 0;
- do
- if (sbi.ActiveProcessors & 1)
- i++;
- while (sbi.ActiveProcessors >>= 1);
- return i;
+ for (WORD i = 0; i < plpi->Group.MaximumGroupCount; ++i)
+ switch (in)
+ {
+ case _SC_NPROCESSORS_CONF:
+ cnt += plpi->Group.GroupInfo[0].MaximumProcessorCount;
+ break;
+ case _SC_NPROCESSORS_ONLN:
+ cnt += plpi->Group.GroupInfo[0].ActiveProcessorCount;
+ break;
+ }
}
- case _SC_PHYS_PAGES:
- return sbi.NumberOfPhysicalPages
- / (wincap.allocation_granularity () / wincap.page_size ());
- }
- return -1;
+ return cnt;
+}
+
+static long
+get_phys_pages (int in)
+{
+ SYSTEM_BASIC_INFORMATION sbi;
+
+ if (!__nt_query_system (&sbi))
+ return -1;
+ return sbi.NumberOfPhysicalPages
+ / (wincap.allocation_granularity () / wincap.page_size ());
}
static long
@@ -88,6 +128,372 @@ get_avphys (int in)
/ (wincap.allocation_granularity () / wincap.page_size ());
}
+enum cache_level
+{
+ LevelNone,
+ Level1I,
+ Level1D,
+ Level2,
+ Level3,
+ Level4
+};
+
+struct cpuid2_cache_desc
+{
+ uint8_t desc;
+ cache_level level;
+ uint32_t size;
+ uint32_t assoc;
+ uint32_t linesize;
+};
+
+static const cpuid2_cache_desc cpuid2_cache_descriptor[] =
+{
+ { 0x06, Level1I, 8, 4, 32 },
+ { 0x08, Level1I, 16, 4, 32 },
+ { 0x09, Level1I, 32, 4, 64 },
+ { 0x0a, Level1D, 8, 2, 32 },
+ { 0x0c, Level1D, 16, 4, 32 },
+ { 0x0d, Level1D, 16, 4, 64 },
+ { 0x0e, Level1D, 24, 6, 64 },
+ { 0x21, Level2, 256, 8, 64 },
+ { 0x22, Level3, 512, 4, 64 },
+ { 0x23, Level3, 1024, 8, 64 },
+ { 0x25, Level3, 2048, 8, 64 },
+ { 0x29, Level3, 4096, 8, 64 },
+ { 0x2c, Level1D, 32, 8, 64 },
+ { 0x30, Level1I, 32, 8, 64 },
+ { 0x39, Level2, 128, 4, 64 },
+ { 0x3a, Level2, 192, 6, 64 },
+ { 0x3b, Level2, 128, 2, 64 },
+ { 0x3c, Level2, 256, 4, 64 },
+ { 0x3d, Level2, 384, 6, 64 },
+ { 0x3e, Level2, 512, 4, 64 },
+ { 0x3f, Level2, 256, 2, 64 },
+ { 0x41, Level2, 128, 4, 32 },
+ { 0x42, Level2, 256, 4, 32 },
+ { 0x43, Level2, 512, 4, 32 },
+ { 0x44, Level2, 1024, 4, 32 },
+ { 0x45, Level2, 2048, 4, 32 },
+ { 0x46, Level3, 4096, 4, 64 },
+ { 0x47, Level3, 8192, 8, 64 },
+ { 0x48, Level2, 3072, 12, 64 },
+ { 0x49, Level3, 4096, 16, 64 },
+ { 0x4a, Level3, 6144, 12, 64 },
+ { 0x4b, Level3, 8192, 16, 64 },
+ { 0x4c, Level3, 12288, 12, 64 },
+ { 0x4d, Level3, 16384, 16, 64 },
+ { 0x4e, Level2, 6144, 24, 64 },
+ { 0x60, Level1D, 16, 8, 64 },
+ { 0x66, Level1D, 8, 4, 64 },
+ { 0x67, Level1D, 16, 4, 64 },
+ { 0x68, Level1D, 32, 4, 64 },
+ { 0x78, Level2, 1024, 4, 64 },
+ { 0x79, Level2, 128, 8, 64 },
+ { 0x7a, Level2, 256, 8, 64 },
+ { 0x7b, Level2, 512, 8, 64 },
+ { 0x7c, Level2, 1024, 8, 64 },
+ { 0x7d, Level2, 2048, 8, 64 },
+ { 0x7f, Level2, 512, 2, 64 },
+ { 0x80, Level2, 512, 8, 64 },
+ { 0x82, Level2, 256, 8, 32 },
+ { 0x83, Level2, 512, 8, 32 },
+ { 0x84, Level2, 1024, 8, 32 },
+ { 0x85, Level2, 2048, 8, 32 },
+ { 0x86, Level2, 512, 4, 64 },
+ { 0x87, Level2, 1024, 8, 64 },
+ { 0xd0, Level3, 512, 4, 64 },
+ { 0xd1, Level3, 1024, 4, 64 },
+ { 0xd2, Level3, 2048, 4, 64 },
+ { 0xd6, Level3, 1024, 8, 64 },
+ { 0xd7, Level3, 2048, 8, 64 },
+ { 0xd8, Level3, 4096, 12, 64 },
+ { 0xdc, Level3, 2048, 12, 64 },
+ { 0xdd, Level3, 4096, 12, 64 },
+ { 0xde, Level3, 8192, 12, 64 },
+ { 0xe2, Level3, 2048, 16, 64 },
+ { 0xe3, Level3, 4096, 16, 64 },
+ { 0xe4, Level3, 8192, 16, 64 },
+ { 0xea, Level3, 12288, 24, 64 },
+ { 0xeb, Level3, 18432, 24, 64 },
+ { 0xec, Level3, 24576, 24, 64 },
+};
+
+static int
+cpuid2_cache_desc_compar (const void *key, const void *memb)
+{
+ cpuid2_cache_desc *ckey = (cpuid2_cache_desc *) key;
+ cpuid2_cache_desc *cmemb = (cpuid2_cache_desc *) memb;
+ return ckey->desc - cmemb->desc;
+}
+
+static long
+get_cpu_cache_intel_cpuid2 (int in)
+{
+ uint32_t reg[4];
+ long ret = 0;
+ int num;
+
+ cpuid (reg, reg + 1, reg + 2, reg + 3, 0x00000002);
+ num = reg[0] & 0xff;
+ for (int i = 0; i < num; ++i)
+ {
+ cpuid (reg, reg + 1, reg + 2, reg + 3, 0x00000002);
+ for (int r = 0; r < 4; ++r)
+ {
+ if (reg[r] & 0x80000000)
+ continue;
+ for (int b = (r == 0) ? 1 : 0; b < 4; ++b)
+ {
+ cpuid2_cache_desc key, *cdp;
+
+ key.desc = ((uint8_t *) &reg[r])[b];
+ cdp = (cpuid2_cache_desc *)
+ bsearch (&key, cpuid2_cache_descriptor,
+ sizeof cpuid2_cache_descriptor
+ / sizeof *cpuid2_cache_descriptor,
+ sizeof *cpuid2_cache_descriptor,
+ cpuid2_cache_desc_compar);
+ if (!cdp)
+ continue;
+ switch (in)
+ {
+ case _SC_LEVEL1_ICACHE_SIZE:
+ if (cdp->level == Level1I)
+ ret += cdp->size * 1024;
+ break;
+ case _SC_LEVEL1_ICACHE_ASSOC:
+ if (cdp->level == Level1I)
+ return cdp->assoc;
+ break;
+ case _SC_LEVEL1_ICACHE_LINESIZE:
+ if (cdp->level == Level1I)
+ return cdp->linesize;
+ break;
+ case _SC_LEVEL1_DCACHE_SIZE:
+ if (cdp->level == Level1D)
+ ret += cdp->size * 1024;
+ break;
+ case _SC_LEVEL1_DCACHE_ASSOC:
+ if (cdp->level == Level1D)
+ return cdp->assoc;
+ break;
+ case _SC_LEVEL1_DCACHE_LINESIZE:
+ if (cdp->level == Level1D)
+ return cdp->linesize;
+ break;
+ case _SC_LEVEL2_CACHE_SIZE:
+ if (cdp->level == Level2)
+ ret += cdp->size * 1024;
+ break;
+ case _SC_LEVEL2_CACHE_ASSOC:
+ if (cdp->level == Level2)
+ return cdp->assoc;
+ break;
+ case _SC_LEVEL2_CACHE_LINESIZE:
+ if (cdp->level == Level2)
+ return cdp->linesize;
+ break;
+ case _SC_LEVEL3_CACHE_SIZE:
+ if (cdp->level == Level3)
+ ret += cdp->size * 1024;
+ break;
+ case _SC_LEVEL3_CACHE_ASSOC:
+ if (cdp->level == Level3)
+ return cdp->assoc;
+ break;
+ case _SC_LEVEL3_CACHE_LINESIZE:
+ if (cdp->level == Level3)
+ return cdp->linesize;
+ break;
+ }
+ }
+ }
+ }
+ return ret;
+}
+
+static long
+get_cpu_cache_intel_cpuid4 (int in)
+{
+ uint32_t eax, ebx, ecx, edx;
+ long ret = 0;
+
+ for (int idx = 0; ; ++idx)
+ {
+ uint32_t cache_type, cur_level, assoc, part, linesize, sets;
+
+ cpuid (&eax, &ebx, &ecx, &edx, 0x00000004, idx);
+ if ((cache_type = (eax & 0x1f))== 0)
+ break;
+ cur_level = ((eax >> 5) & 0x7);
+ assoc = ((ebx >> 22) & 0x3ff) + 1;
+ part = ((ebx >> 12) & 0x3ff) + 1;
+ linesize = (ebx & 0xfff) + 1;
+ sets = ecx + 1;
+ switch (in)
+ {
+ case _SC_LEVEL1_ICACHE_SIZE:
+ if (cur_level == 1 && cache_type == 2)
+ ret += assoc * part * linesize * sets;
+ break;
+ case _SC_LEVEL1_ICACHE_ASSOC:
+ if (cur_level == 1 && cache_type == 2)
+ return assoc;
+ case _SC_LEVEL1_ICACHE_LINESIZE:
+ if (cur_level == 1 && cache_type == 2)
+ return linesize;
+ case _SC_LEVEL1_DCACHE_SIZE:
+ if (cur_level == 1 && cache_type == 1)
+ ret += assoc * part * linesize * sets;
+ break;
+ case _SC_LEVEL1_DCACHE_ASSOC:
+ if (cur_level == 1 && cache_type == 1)
+ return assoc;
+ case _SC_LEVEL1_DCACHE_LINESIZE:
+ if (cur_level == 1 && cache_type == 1)
+ return linesize;
+ case _SC_LEVEL2_CACHE_SIZE:
+ if (cur_level == 2)
+ ret += assoc * part * linesize * sets;
+ break;
+ case _SC_LEVEL2_CACHE_ASSOC:
+ if (cur_level == 2)
+ return assoc;
+ case _SC_LEVEL2_CACHE_LINESIZE:
+ if (cur_level == 2)
+ return linesize;
+ case _SC_LEVEL3_CACHE_SIZE:
+ if (cur_level == 3)
+ ret += assoc * part * linesize * sets;
+ break;
+ case _SC_LEVEL3_CACHE_ASSOC:
+ if (cur_level == 3)
+ return assoc;
+ case _SC_LEVEL3_CACHE_LINESIZE:
+ if (cur_level == 3)
+ return linesize;
+ }
+ }
+ return ret;
+}
+
+/* Also called from format_proc_cpuinfo */
+long
+get_cpu_cache_intel (int in, uint32_t maxf)
+{
+ long ret = 0;
+
+ switch (in)
+ {
+ case _SC_LEVEL1_ICACHE_SIZE:
+ case _SC_LEVEL1_ICACHE_ASSOC:
+ case _SC_LEVEL1_ICACHE_LINESIZE:
+ case _SC_LEVEL1_DCACHE_SIZE:
+ case _SC_LEVEL1_DCACHE_ASSOC:
+ case _SC_LEVEL1_DCACHE_LINESIZE:
+ case _SC_LEVEL2_CACHE_SIZE:
+ case _SC_LEVEL2_CACHE_ASSOC:
+ case _SC_LEVEL2_CACHE_LINESIZE:
+ case _SC_LEVEL3_CACHE_SIZE:
+ case _SC_LEVEL3_CACHE_ASSOC:
+ case _SC_LEVEL3_CACHE_LINESIZE:
+ if (maxf >= 4)
+ ret = get_cpu_cache_intel_cpuid4 (in);
+ else if (maxf >= 2)
+ ret = get_cpu_cache_intel_cpuid2 (in);
+ break;
+ default:
+ break;
+ }
+ return ret;
+}
+
+static const long assoc[16] = { 0, 1, 2, 2, 4, 4, 8, 8,
+ 16, 16, 32, 48, 64, 96, 128, 0x8000 };
+
+/* Also called from format_proc_cpuinfo */
+long
+get_cpu_cache_amd (int in, uint32_t maxe)
+{
+ uint32_t eax, ebx, ecx, edx;
+ long ret = 0;
+
+ if (in >= _SC_LEVEL1_ICACHE_SIZE && in <= _SC_LEVEL1_DCACHE_LINESIZE
+ && maxe >= 0x80000005)
+ cpuid (&eax, &ebx, &ecx, &edx, 0x80000005);
+ else if (in >= _SC_LEVEL2_CACHE_SIZE && in <= _SC_LEVEL3_CACHE_LINESIZE
+ && maxe >= 0x80000006)
+ cpuid (&eax, &ebx, &ecx, &edx, 0x80000006);
+ else
+ return 0;
+
+ switch (in)
+ {
+ case _SC_LEVEL1_ICACHE_SIZE:
+ ret = (edx & 0xff000000) >> 14;
+ break;
+ case _SC_LEVEL1_ICACHE_ASSOC:
+ ret = (edx & 0xff0000) >> 16;
+ if (ret == 0xff)
+ ret = 0x8000;
+ break;
+ case _SC_LEVEL1_ICACHE_LINESIZE:
+ ret = (edx & 0xff);
+ break;
+ case _SC_LEVEL1_DCACHE_SIZE:
+ ret = (ecx & 0xff000000) >> 14;
+ break;
+ case _SC_LEVEL1_DCACHE_ASSOC:
+ ret = (ecx & 0xff0000) >> 16;
+ if (ret == 0xff)
+ ret = 0x8000;
+ break;
+ case _SC_LEVEL1_DCACHE_LINESIZE:
+ ret = (ecx & 0xff);
+ break;
+ case _SC_LEVEL2_CACHE_SIZE:
+ ret = (ecx & 0xffff0000) >> 6;
+ break;
+ case _SC_LEVEL2_CACHE_ASSOC:
+ ret = assoc[(ecx & 0xf000) >> 12];
+ break;
+ case _SC_LEVEL2_CACHE_LINESIZE:
+ ret = (ecx & 0xff);
+ break;
+ case _SC_LEVEL3_CACHE_SIZE:
+ ret = (long) ((edx & 0xfffc0000) >> 18) * 512 * 1024;
+ break;
+ case _SC_LEVEL3_CACHE_ASSOC:
+ ret = assoc[(edx & 0xf000) >> 12];
+ break;
+ case _SC_LEVEL3_CACHE_LINESIZE:
+ ret = (edx & 0xff);
+ break;
+ default:
+ break;
+ }
+ return ret;
+}
+
+static long
+get_cpu_cache (int in)
+{
+ uint32_t maxf, vendor_id[4];
+ cpuid (&maxf, &vendor_id[0], &vendor_id[2], &vendor_id[1], 0x00000000);
+
+ vendor_id[3] = 0;
+ if (!strcmp ((char*) vendor_id, "GenuineIntel"))
+ return get_cpu_cache_intel (in, maxf & 0xffff);
+ else if (!strcmp ((char*)vendor_id, "AuthenticAMD"))
+ {
+ uint32_t maxe = 0, unused;
+ cpuid (&maxe, &unused, &unused, &unused, 0x80000000);
+ return get_cpu_cache_amd (in, maxe);
+ }
+ return 0;
+}
+
enum sc_type { nsup, cons, func };
static struct
@@ -111,7 +517,7 @@ static struct
{func, {f:get_page_size}}, /* 8, _SC_PAGESIZE */
{func, {f:get_nproc_values}}, /* 9, _SC_NPROCESSORS_CONF */
{func, {f:get_nproc_values}}, /* 10, _SC_NPROCESSORS_ONLN */
- {func, {f:get_nproc_values}}, /* 11, _SC_PHYS_PAGES */
+ {func, {f:get_phys_pages}}, /* 11, _SC_PHYS_PAGES */
{func, {f:get_avphys}}, /* 12, _SC_AVPHYS_PAGES */
{cons, {c:MQ_OPEN_MAX}}, /* 13, _SC_MQ_OPEN_MAX */
{cons, {c:MQ_PRIO_MAX}}, /* 14, _SC_MQ_PRIO_MAX */
@@ -156,7 +562,7 @@ static struct
{cons, {c:PTHREAD_DESTRUCTOR_ITERATIONS}}, /* 53, _SC_THREAD_DESTRUCTOR_ITERATIONS */
{cons, {c:_POSIX_ADVISORY_INFO}}, /* 54, _SC_ADVISORY_INFO */
{cons, {c:ATEXIT_MAX}}, /* 55, _SC_ATEXIT_MAX */
- {cons, {c:-1L}}, /* 56, _SC_BARRIERS */
+ {cons, {c:_POSIX_BARRIERS}}, /* 56, _SC_BARRIERS */
{cons, {c:BC_BASE_MAX}}, /* 57, _SC_BC_BASE_MAX */
{cons, {c:BC_DIM_MAX}}, /* 58, _SC_BC_DIM_MAX */
{cons, {c:BC_SCALE_MAX}}, /* 59, _SC_BC_SCALE_MAX */
@@ -175,7 +581,7 @@ static struct
{cons, {c:_POSIX_REGEXP}}, /* 72, _SC_REGEXP */
{cons, {c:RE_DUP_MAX}}, /* 73, _SC_RE_DUP_MAX */
{cons, {c:_POSIX_SHELL}}, /* 74, _SC_SHELL */
- {cons, {c:-1L}}, /* 75, _SC_SPAWN */
+ {cons, {c:_POSIX_SPAWN}}, /* 75, _SC_SPAWN */
{cons, {c:_POSIX_SPIN_LOCKS}}, /* 76, _SC_SPIN_LOCKS */
{cons, {c:-1L}}, /* 77, _SC_SPORADIC_SERVER */
{nsup, {c:0}}, /* 78, _SC_SS_REPL_MAX */
@@ -209,7 +615,7 @@ static struct
{cons, {c:_XOPEN_VERSION}}, /* 106, _SC_XOPEN_VERSION */
{cons, {c:_POSIX2_CHAR_TERM}}, /* 107, _SC_2_CHAR_TERM */
{cons, {c:_POSIX2_C_BIND}}, /* 108, _SC_2_C_BIND */
- {cons, {c:_POSIX2_C_BIND}}, /* 109, _SC_2_C_DEV */
+ {cons, {c:_POSIX2_C_DEV}}, /* 109, _SC_2_C_DEV */
{cons, {c:-1L}}, /* 110, _SC_2_FORT_DEV */
{cons, {c:-1L}}, /* 111, _SC_2_FORT_RUN */
{cons, {c:-1L}}, /* 112, _SC_2_LOCALEDEF */
@@ -225,10 +631,25 @@ static struct
{cons, {c:-1L}}, /* 122, _SC_THREAD_ROBUST_PRIO_INHERIT */
{cons, {c:-1L}}, /* 123, _SC_THREAD_ROBUST_PRIO_PROTECT */
{cons, {c:-1L}}, /* 124, _SC_XOPEN_UUCP */
+ {func, {f:get_cpu_cache}}, /* 125, _SC_LEVEL1_ICACHE_SIZE */
+ {func, {f:get_cpu_cache}}, /* 126, _SC_LEVEL1_ICACHE_ASSOC */
+ {func, {f:get_cpu_cache}}, /* 127, _SC_LEVEL1_ICACHE_LINESIZE */
+ {func, {f:get_cpu_cache}}, /* 128, _SC_LEVEL1_DCACHE_SIZE */
+ {func, {f:get_cpu_cache}}, /* 129, _SC_LEVEL1_DCACHE_ASSOC */
+ {func, {f:get_cpu_cache}}, /* 130, _SC_LEVEL1_DCACHE_LINESIZE */
+ {func, {f:get_cpu_cache}}, /* 131, _SC_LEVEL2_CACHE_SIZE */
+ {func, {f:get_cpu_cache}}, /* 132, _SC_LEVEL2_CACHE_ASSOC */
+ {func, {f:get_cpu_cache}}, /* 133, _SC_LEVEL2_CACHE_LINESIZE */
+ {func, {f:get_cpu_cache}}, /* 134, _SC_LEVEL3_CACHE_SIZE */
+ {func, {f:get_cpu_cache}}, /* 135, _SC_LEVEL3_CACHE_ASSOC */
+ {func, {f:get_cpu_cache}}, /* 136, _SC_LEVEL3_CACHE_LINESIZE */
+ {func, {f:get_cpu_cache}}, /* 137, _SC_LEVEL4_CACHE_SIZE */
+ {func, {f:get_cpu_cache}}, /* 138, _SC_LEVEL4_CACHE_ASSOC */
+ {func, {f:get_cpu_cache}}, /* 139, _SC_LEVEL4_CACHE_LINESIZE */
};
#define SC_MIN _SC_ARG_MAX
-#define SC_MAX _SC_XOPEN_UUCP
+#define SC_MAX _SC_LEVEL4_CACHE_LINESIZE
/* sysconf: POSIX 4.8.1.1 */
/* Allows a portable app to determine quantities of resources or
@@ -335,7 +756,7 @@ get_nprocs (void)
extern "C" long
get_phys_pages (void)
{
- return get_nproc_values (_SC_PHYS_PAGES);
+ return get_phys_pages (_SC_PHYS_PAGES);
}
extern "C" long
diff --git a/winsup/cygwin/syslog.cc b/winsup/cygwin/syslog.cc
index 7949b7001..81717c645 100644
--- a/winsup/cygwin/syslog.cc
+++ b/winsup/cygwin/syslog.cc
@@ -1,8 +1,5 @@
/* syslog.cc
- Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008, 2009, 2011, 2012 Red Hat, Inc.
-
This file is part of Cygwin.
This software is a copyrighted work licensed under the terms of the
diff --git a/winsup/cygwin/termios.cc b/winsup/cygwin/termios.cc
index 2f6629842..938c2bb7d 100644
--- a/winsup/cygwin/termios.cc
+++ b/winsup/cygwin/termios.cc
@@ -1,8 +1,5 @@
/* termios.cc: termios for WIN32.
- Copyright 1996, 1997, 1998, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007,
- 2008, 2009, 2010, 2011, 2012 Red Hat, Inc.
-
Written by Doug Evans and Steve Chamberlain of Cygnus Support
dje@cygnus.com, sac@cygnus.com
diff --git a/winsup/cygwin/textmode.c b/winsup/cygwin/textmode.c
index 320b75453..9230d2142 100644
--- a/winsup/cygwin/textmode.c
+++ b/winsup/cygwin/textmode.c
@@ -1,7 +1,5 @@
/* binmode.c
- Copyright 2000, 2001, 2010, 2013 Red Hat, Inc.
-
This file is part of Cygwin.
This software is a copyrighted work licensed under the terms of the
@@ -18,6 +16,6 @@ cygwin_premain0 (int argc __attribute__ ((unused)),
char **argv __attribute__ ((unused)),
struct per_process *myself __attribute__ ((unused)))
{
- _fmode &= ~_O_BINARY;
- _fmode |= _O_TEXT;
+ _fmode &= ~O_BINARY;
+ _fmode |= O_TEXT;
}
diff --git a/winsup/cygwin/textreadmode.c b/winsup/cygwin/textreadmode.c
index 5425002f2..244673ffa 100644
--- a/winsup/cygwin/textreadmode.c
+++ b/winsup/cygwin/textreadmode.c
@@ -1,7 +1,5 @@
/* textreadmode.c
- Copyright 2004, 2010, 2013 Red Hat, Inc.
-
This file is part of Cygwin.
This software is a copyrighted work licensed under the terms of the
diff --git a/winsup/cygwin/thread.cc b/winsup/cygwin/thread.cc
index 0256ad717..4414785ad 100644
--- a/winsup/cygwin/thread.cc
+++ b/winsup/cygwin/thread.cc
@@ -1,8 +1,5 @@
/* thread.cc: Locking and threading module functions
- Copyright 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008,
- 2009, 2010, 2011, 2012, 2013 Red Hat, Inc.
-
This file is part of Cygwin.
This software is a copyrighted work licensed under the terms of the
@@ -36,14 +33,10 @@ details. */
extern "C" void __fp_lock_all ();
extern "C" void __fp_unlock_all ();
-extern "C" int valid_sched_parameters(const struct sched_param *);
+extern "C" bool valid_sched_parameters(const struct sched_param *);
+extern "C" int sched_get_thread_priority(HANDLE thread);
extern "C" int sched_set_thread_priority(HANDLE thread, int priority);
-#if __GNUC__ == 4 && __GNUC_MINOR__ >= 7
-/* FIXME: Temporarily workaround gcc 4.7+ bug. */
-static verifyable_object_state
-#else
static inline verifyable_object_state
-#endif
verifyable_object_isvalid (void const * objectptr, thread_magic_t magic,
void *static_ptr1 = NULL,
void *static_ptr2 = NULL,
@@ -55,6 +48,17 @@ const pthread_t pthread_mutex::_new_mutex = (pthread_t) 1;
const pthread_t pthread_mutex::_unlocked_mutex = (pthread_t) 2;
const pthread_t pthread_mutex::_destroyed_mutex = (pthread_t) 3;
+
+template <typename T>
+static inline
+void
+delete_and_clear (T * * const ptr)
+{
+ delete *ptr;
+ *ptr = 0;
+}
+
+
inline bool
pthread_mutex::no_owner()
{
@@ -122,28 +126,29 @@ __cygwin_lock_unlock (_LOCK_T *lock)
paranoid_printf ("threadcount %d. unlocked", MT_INTERFACE->threadcount);
}
-#if __GNUC__ == 4 && __GNUC_MINOR__ >= 7
-/* FIXME: Temporarily workaround gcc 4.7+ bug. */
-static verifyable_object_state
-#else
static inline verifyable_object_state
-#endif
verifyable_object_isvalid (void const *objectptr, thread_magic_t magic, void *static_ptr1,
void *static_ptr2, void *static_ptr3)
{
- myfault efault;
- if (efault.faulted (objectptr))
- return INVALID_OBJECT;
+ verifyable_object_state state = INVALID_OBJECT;
+
+ __try
+ {
+ if (!objectptr || !(*(const char **) objectptr))
+ __leave;
- verifyable_object **object = (verifyable_object **) objectptr;
+ verifyable_object **object = (verifyable_object **) objectptr;
- if ((static_ptr1 && *object == static_ptr1) ||
- (static_ptr2 && *object == static_ptr2) ||
- (static_ptr3 && *object == static_ptr3))
- return VALID_STATIC_OBJECT;
- if ((*object)->magic != magic)
- return INVALID_OBJECT;
- return VALID_OBJECT;
+ if ((static_ptr1 && *object == static_ptr1) ||
+ (static_ptr2 && *object == static_ptr2) ||
+ (static_ptr3 && *object == static_ptr3))
+ state = VALID_STATIC_OBJECT;
+ else if ((*object)->magic == magic)
+ state = VALID_OBJECT;
+ }
+ __except (NO_ERROR) {}
+ __endtry
+ return state;
}
/* static members */
@@ -271,6 +276,23 @@ pthread_cond::is_initializer_or_object (pthread_cond_t const *cond)
return true;
}
+inline bool
+pthread_barrierattr::is_good_object (pthread_barrierattr_t const *cond)
+{
+ if (verifyable_object_isvalid (cond, PTHREAD_BARRIERATTR_MAGIC)
+ != VALID_OBJECT)
+ return false;
+ return true;
+}
+
+inline bool
+pthread_barrier::is_good_object (pthread_barrier_t const *cond)
+{
+ if (verifyable_object_isvalid (cond, PTHREAD_BARRIER_MAGIC) != VALID_OBJECT)
+ return false;
+ return true;
+}
+
/* RW locks */
inline bool
pthread_rwlock::is_good_object (pthread_rwlock_t const *rwlock)
@@ -358,6 +380,10 @@ pthread::init_mainthread ()
if (!thread->create_cancel_event ())
api_fatal ("couldn't create cancel event for main thread");
VerifyHandle (thread->win32_obj_id);
+ /* Make sure the pthread mutex is recursive. See comment in
+ pthread::precreate (called only for subsequent pthreads)
+ for a description. */
+ thread->mutex.set_type (PTHREAD_MUTEX_RECURSIVE);
thread->postcreate ();
}
@@ -473,9 +499,13 @@ pthread::create (void *(*func) (void *), pthread_attr *newattr,
arg = threadarg;
mutex.lock ();
- win32_obj_id = CygwinCreateThread (thread_init_wrapper, this,
- attr.stackaddr, attr.stacksize,
- attr.guardsize, 0, &thread_id);
+ /* stackaddr holds the uppermost stack address. See the comments in
+ pthread_attr_setstack and pthread_attr_setstackaddr for a description. */
+ ULONG stacksize = attr.stacksize ?: get_rlimit_stack ();
+ PVOID stackaddr = attr.stackaddr ? ((caddr_t) attr.stackaddr - stacksize)
+ : NULL;
+ win32_obj_id = CygwinCreateThread (thread_init_wrapper, this, stackaddr,
+ stacksize, attr.guardsize, 0, &thread_id);
if (!win32_obj_id)
{
@@ -499,18 +529,22 @@ pthread::postcreate ()
valid = true;
InterlockedIncrement (&MT_INTERFACE->threadcount);
- /* FIXME: set the priority appropriately for system contention scope */
- if (attr.inheritsched == PTHREAD_EXPLICIT_SCHED)
- {
- /* FIXME: set the scheduling settings for the new thread */
- /* sched_thread_setparam (win32_obj_id, attr.schedparam); */
- }
+
+ /* Per POSIX the new thread inherits the sched priority from its caller
+ thread if PTHREAD_INHERIT_SCHED is set.
+ FIXME: set the priority appropriately for system contention scope */
+ if (attr.inheritsched == PTHREAD_INHERIT_SCHED)
+ attr.schedparam.sched_priority
+ = sched_get_thread_priority (GetCurrentThread ());
+ if (attr.schedparam.sched_priority)
+ sched_set_thread_priority (win32_obj_id, attr.schedparam.sched_priority);
}
void
pthread::exit (void *value_ptr)
{
class pthread *thread = this;
+ _cygtls *tls = cygtls; /* Save cygtls before deleting this. */
// run cleanup handlers
pop_all_cleanup_handlers ();
@@ -536,13 +570,16 @@ pthread::exit (void *value_ptr)
::exit (0);
else
{
- if (cygtls == _main_tls)
+ if (tls == _main_tls)
{
+ cygheap->find_tls (tls); /* Lock _main_tls mutex. */
_cygtls *dummy = (_cygtls *) malloc (sizeof (_cygtls));
*dummy = *_main_tls;
_main_tls = dummy;
- _main_tls->initialized = false;
+ _main_tls->initialized = 0;
}
+ /* This also unlocks and closes the _main_tls mutex. */
+ tls->remove (INFINITE);
ExitThread (0);
}
}
@@ -588,6 +625,7 @@ pthread::cancel ()
and tends to hang infinitely if we change the instruction pointer.
So just don't cancel asynchronously if the thread is currently
executing Windows code. Rely on deferred cancellation in this case. */
+ threadlist_t *tl_entry = cygheap->find_tls (cygtls);
if (!cygtls->inside_kernel (&context))
{
#ifdef __x86_64__
@@ -597,6 +635,7 @@ pthread::cancel ()
#endif
SetThreadContext (win32_obj_id, &context);
}
+ cygheap->unlock_tls (tl_entry);
}
mutex.unlock ();
/* See above. For instance, a thread which waits for a semaphore in sem_wait
@@ -826,8 +865,8 @@ pthread::cancel ()
posix_fallocate ()
posix_madvise ()
posix_openpt ()
- o posix_spawn ()
- o posix_spawnp ()
+ posix_spawn ()
+ posix_spawnp ()
o posix_trace_clear ()
o posix_trace_close ()
o posix_trace_create ()
@@ -956,43 +995,27 @@ pthread::static_cancel_self ()
int
pthread::setcancelstate (int state, int *oldstate)
{
- int result = 0;
-
- mutex.lock ();
-
if (state != PTHREAD_CANCEL_ENABLE && state != PTHREAD_CANCEL_DISABLE)
- result = EINVAL;
- else
- {
- if (oldstate)
- *oldstate = cancelstate;
- cancelstate = state;
- }
+ return EINVAL;
- mutex.unlock ();
+ if (oldstate)
+ *oldstate = cancelstate;
+ cancelstate = state;
- return result;
+ return 0;
}
int
pthread::setcanceltype (int type, int *oldtype)
{
- int result = 0;
-
- mutex.lock ();
-
if (type != PTHREAD_CANCEL_DEFERRED && type != PTHREAD_CANCEL_ASYNCHRONOUS)
- result = EINVAL;
- else
- {
- if (oldtype)
- *oldtype = canceltype;
- canceltype = type;
- }
+ return EINVAL;
- mutex.unlock ();
+ if (oldtype)
+ *oldtype = canceltype;
+ canceltype = type;
- return result;
+ return 0;
}
void
@@ -1082,8 +1105,8 @@ pthread::resume ()
pthread_attr::pthread_attr ():verifyable_object (PTHREAD_ATTR_MAGIC),
joinable (PTHREAD_CREATE_JOINABLE), contentionscope (PTHREAD_SCOPE_PROCESS),
-inheritsched (PTHREAD_INHERIT_SCHED), stackaddr (NULL),
-stacksize (PTHREAD_DEFAULT_STACKSIZE), guardsize (PTHREAD_DEFAULT_GUARDSIZE)
+inheritsched (PTHREAD_INHERIT_SCHED), stackaddr (NULL), stacksize (0),
+guardsize (wincap.def_guard_page_size ())
{
schedparam.sched_priority = 0;
}
@@ -1306,6 +1329,25 @@ pthread_cond::_fixup_after_fork ()
api_fatal ("pthread_cond::_fixup_after_fork () failed to recreate win32 semaphore");
}
+pthread_barrierattr::pthread_barrierattr ()
+ : verifyable_object (PTHREAD_BARRIERATTR_MAGIC)
+ , shared (PTHREAD_PROCESS_PRIVATE)
+{
+}
+
+pthread_barrierattr::~pthread_barrierattr ()
+{
+}
+
+pthread_barrier::pthread_barrier ()
+ : verifyable_object (PTHREAD_BARRIER_MAGIC)
+{
+}
+
+pthread_barrier::~pthread_barrier ()
+{
+}
+
pthread_rwlockattr::pthread_rwlockattr ():verifyable_object
(PTHREAD_RWLOCKATTR_MAGIC), shared (PTHREAD_PROCESS_PRIVATE)
{
@@ -1708,7 +1750,7 @@ pthread_mutex::pthread_mutex (pthread_mutexattr *attr) :
tid (0),
#endif
recursion_counter (0), condwaits (0),
- type (PTHREAD_MUTEX_ERRORCHECK),
+ type (PTHREAD_MUTEX_NORMAL),
pshared (PTHREAD_PROCESS_PRIVATE)
{
win32_obj_id = ::CreateEvent (&sec_none_nih, false, false, NULL);
@@ -1750,8 +1792,7 @@ pthread_mutex::lock ()
else if (type == PTHREAD_MUTEX_NORMAL /* potentially causes deadlock */
|| !pthread::equal (owner, self))
{
- /* FIXME: no cancel? */
- cygwait (win32_obj_id, cw_infinite, cw_sig);
+ cygwait (win32_obj_id, cw_infinite, cw_sig | cw_sig_restart);
set_owner (self);
}
else
@@ -1776,7 +1817,7 @@ pthread_mutex::unlock ()
if (type == PTHREAD_MUTEX_NORMAL)
/* no error checking */;
else if (no_owner ())
- res = type == PTHREAD_MUTEX_ERRORCHECK ? EINVAL : 0;
+ res = type == PTHREAD_MUTEX_ERRORCHECK ? EPERM : 0;
else if (!pthread::equal (owner, self))
res = EPERM;
if (!res && recursion_counter > 0 && --recursion_counter == 0)
@@ -1850,7 +1891,7 @@ pthread_mutex::_fixup_after_fork ()
}
pthread_mutexattr::pthread_mutexattr ():verifyable_object (PTHREAD_MUTEXATTR_MAGIC),
-pshared (PTHREAD_PROCESS_PRIVATE), mutextype (PTHREAD_MUTEX_ERRORCHECK)
+pshared (PTHREAD_PROCESS_PRIVATE), mutextype (PTHREAD_MUTEX_NORMAL)
{
}
@@ -1876,6 +1917,19 @@ pthread_spinlock::lock ()
{
pthread_t self = ::pthread_self ();
int result = -1;
+ unsigned spins = 0;
+
+ /*
+ We want to spin using 'pause' instruction on multi-core system but we
+ want to avoid this on single-core systems.
+
+ The limit of 1000 spins is semi-arbitrary. Microsoft suggests (in their
+ InitializeCriticalSectionAndSpinCount documentation on MSDN) they are
+ using spin count limit 4000 for their heap manager critical
+ sections. Other source suggest spin count as small as 200 for fast path
+ of mutex locking.
+ */
+ unsigned const FAST_SPINS_LIMIT = wincap.cpu_count () != 1 ? 1000 : 0;
do
{
@@ -1884,8 +1938,13 @@ pthread_spinlock::lock ()
set_owner (self);
result = 0;
}
- else if (pthread::equal (owner, self))
+ else if (unlikely(pthread::equal (owner, self)))
result = EDEADLK;
+ else if (spins < FAST_SPINS_LIMIT)
+ {
+ ++spins;
+ __asm__ volatile ("pause":::);
+ }
else
{
/* Minimal timeout to minimize CPU usage while still spinning. */
@@ -2117,9 +2176,6 @@ pthread::atfork (void (*prepare)(void), void (*parent)(void), void (*child)(void
extern "C" int
pthread_attr_init (pthread_attr_t *attr)
{
- if (pthread_attr::is_good_object (attr))
- return EBUSY;
-
*attr = new pthread_attr;
if (!pthread_attr::is_good_object (attr))
{
@@ -2252,7 +2308,13 @@ pthread_attr_setstack (pthread_attr_t *attr, void *addr, size_t size)
return EINVAL;
if (size < PTHREAD_STACK_MIN)
return EINVAL;
- (*attr)->stackaddr = addr;
+ /* The incoming address addr points to the lowest addressable byte of a
+ buffer of size bytes. Due to the way pthread_attr_setstackaddr is defined
+ on Linux, the lowest address ot the stack can't be reliably computed when
+ using pthread_attr_setstackaddr/pthread_attr_setstacksize. Therefore we
+ store the uppermost address of the stack in stackaddr. See also the
+ comment in pthread_attr_setstackaddr. */
+ (*attr)->stackaddr = (caddr_t) addr + size;
(*attr)->stacksize = size;
return 0;
}
@@ -2262,8 +2324,9 @@ pthread_attr_getstack (const pthread_attr_t *attr, void **addr, size_t *size)
{
if (!pthread_attr::is_good_object (attr))
return EINVAL;
- /* uses lowest address of stack on all platforms */
- *addr = (void *)((ptrdiff_t)(*attr)->stackaddr - (*attr)->stacksize);
+ /* stackaddr holds the uppermost stack address. See the comment in
+ pthread_attr_setstack. */
+ *addr = (caddr_t) (*attr)->stackaddr - (*attr)->stacksize;
*size = (*attr)->stacksize;
return 0;
}
@@ -2275,6 +2338,12 @@ pthread_attr_setstackaddr (pthread_attr_t *attr, void *addr)
return EINVAL;
if (addr == NULL)
return EINVAL;
+ /* This function is deprecated in SUSv4, but SUSv3 didn't define
+ if the incoming stack address is the lowest address of the memory
+ area defined as stack, or if it's the start address of the stack
+ at which it begins its growth. On Linux it's the latter which
+ means the uppermost stack address on x86 based systems. See comment
+ in pthread_attr_setstack as well. */
(*attr)->stackaddr = addr;
return 0;
}
@@ -2284,8 +2353,7 @@ pthread_attr_getstackaddr (const pthread_attr_t *attr, void **addr)
{
if (!pthread_attr::is_good_object (attr))
return EINVAL;
- /* uses stack address, which is the higher address on platforms
- where the stack grows downwards, such as x86 */
+ /* See comment in pthread_attr_setstackaddr. */
*addr = (*attr)->stackaddr;
return 0;
}
@@ -2306,7 +2374,10 @@ pthread_attr_getstacksize (const pthread_attr_t *attr, size_t *size)
{
if (!pthread_attr::is_good_object (attr))
return EINVAL;
- *size = (*attr)->stacksize;
+ /* If the stacksize has not been set by the application, return the
+ default stacksize. Note that this is different from what
+ pthread_attr_getstack returns. */
+ *size = (*attr)->stacksize ?: get_rlimit_stack ();
return 0;
}
@@ -2374,7 +2445,8 @@ pthread::join (pthread_t *thread, void **return_val)
(*thread)->attr.joinable = PTHREAD_CREATE_DETACHED;
(*thread)->mutex.unlock ();
- switch (cygwait ((*thread)->win32_obj_id, cw_infinite, cw_sig | cw_cancel))
+ switch (cygwait ((*thread)->win32_obj_id, cw_infinite,
+ cw_sig | cw_sig_restart | cw_cancel))
{
case WAIT_OBJECT_0:
if (return_val)
@@ -2460,8 +2532,7 @@ pthread::resume (pthread_t *thread)
extern "C" int
pthread_getattr_np (pthread_t thread, pthread_attr_t *attr)
{
- const size_t sizeof_tbi = sizeof (THREAD_BASIC_INFORMATION);
- PTHREAD_BASIC_INFORMATION tbi;
+ THREAD_BASIC_INFORMATION tbi;
NTSTATUS status;
if (!pthread::is_good_object (&thread))
@@ -2481,17 +2552,18 @@ pthread_getattr_np (pthread_t thread, pthread_attr_t *attr)
(*attr)->schedparam = thread->attr.schedparam;
(*attr)->guardsize = thread->attr.guardsize;
- tbi = (PTHREAD_BASIC_INFORMATION) malloc (sizeof_tbi);
status = NtQueryInformationThread (thread->win32_obj_id,
ThreadBasicInformation,
- tbi, sizeof_tbi, NULL);
+ &tbi, sizeof (tbi), NULL);
if (NT_SUCCESS (status))
{
- PNT_TIB tib = tbi->TebBaseAddress;
- (*attr)->stackaddr = tib->StackBase;
- /* stack grows downwards on x86 systems */
- (*attr)->stacksize = (uintptr_t) tib->StackBase
- - (uintptr_t) tib->StackLimit;
+ PTEB teb = (PTEB) tbi.TebBaseAddress;
+ /* stackaddr holds the uppermost stack address. See the comments
+ in pthread_attr_setstack and pthread_attr_setstackaddr for a
+ description. */
+ (*attr)->stackaddr = teb->Tib.StackBase;
+ (*attr)->stacksize = (uintptr_t) teb->Tib.StackBase
+ - (uintptr_t) (teb->DeallocationStack ?: teb->Tib.StackLimit);
}
else
{
@@ -2530,9 +2602,7 @@ pthread_getschedparam (pthread_t thread, int *policy,
if (!pthread::is_good_object (&thread))
return ESRCH;
*policy = SCHED_FIFO;
- /* we don't return the current effective priority, we return the current
- requested priority */
- *param = thread->attr.schedparam;
+ param->sched_priority = sched_get_thread_priority (thread->win32_obj_id);
return 0;
}
@@ -2658,18 +2728,20 @@ pthread_cond::init (pthread_cond_t *cond, const pthread_condattr_t *attr)
return EAGAIN;
}
- myfault efault;
- if (efault.faulted ())
+ int ret = 0;
+
+ __try
+ {
+ *cond = new_cond;
+ }
+ __except (NO_ERROR)
{
delete new_cond;
- cond_initialization_lock.unlock ();
- return EINVAL;
+ ret = EINVAL;
}
-
- *cond = new_cond;
+ __endtry
cond_initialization_lock.unlock ();
-
- return 0;
+ return ret;
}
extern "C" int
@@ -2721,45 +2793,47 @@ pthread_cond_timedwait (pthread_cond_t *cond, pthread_mutex_t *mutex,
struct timespec tp;
LARGE_INTEGER timeout;
- myfault efault;
- if (efault.faulted ())
- return EINVAL;
-
pthread_testcancel ();
- int err = __pthread_cond_wait_init (cond, mutex);
- if (err)
- return err;
+ __try
+ {
+ int err = __pthread_cond_wait_init (cond, mutex);
+ if (err)
+ return err;
- /* According to SUSv3, the abstime value must be checked for validity. */
- if (abstime->tv_sec < 0
- || abstime->tv_nsec < 0
- || abstime->tv_nsec > 999999999)
- return EINVAL;
+ /* According to SUSv3, the abstime value must be checked for validity. */
+ if (abstime->tv_sec < 0
+ || abstime->tv_nsec < 0
+ || abstime->tv_nsec > 999999999)
+ __leave;
- clock_gettime ((*cond)->clock_id, &tp);
+ clock_gettime ((*cond)->clock_id, &tp);
- /* Check for immediate timeout before converting */
- if (tp.tv_sec > abstime->tv_sec
- || (tp.tv_sec == abstime->tv_sec
- && tp.tv_nsec > abstime->tv_nsec))
- return ETIMEDOUT;
+ /* Check for immediate timeout before converting */
+ if (tp.tv_sec > abstime->tv_sec
+ || (tp.tv_sec == abstime->tv_sec
+ && tp.tv_nsec > abstime->tv_nsec))
+ return ETIMEDOUT;
- timeout.QuadPart = abstime->tv_sec * NSPERSEC
- + (abstime->tv_nsec + 99LL) / 100LL;
+ timeout.QuadPart = abstime->tv_sec * NSPERSEC
+ + (abstime->tv_nsec + 99LL) / 100LL;
- switch ((*cond)->clock_id)
- {
- case CLOCK_REALTIME:
- timeout.QuadPart += FACTOR;
- break;
- default:
- /* other clocks must be handled as relative timeout */
- timeout.QuadPart -= tp.tv_sec * NSPERSEC + tp.tv_nsec / 100LL;
- timeout.QuadPart *= -1LL;
- break;
+ switch ((*cond)->clock_id)
+ {
+ case CLOCK_REALTIME:
+ timeout.QuadPart += FACTOR;
+ break;
+ default:
+ /* other clocks must be handled as relative timeout */
+ timeout.QuadPart -= tp.tv_sec * NSPERSEC + tp.tv_nsec / 100LL;
+ timeout.QuadPart *= -1LL;
+ break;
+ }
+ return (*cond)->wait (*mutex, &timeout);
}
- return (*cond)->wait (*mutex, &timeout);
+ __except (NO_ERROR) {}
+ __endtry
+ return EINVAL;
}
extern "C" int
@@ -2776,9 +2850,6 @@ pthread_cond_wait (pthread_cond_t *cond, pthread_mutex_t *mutex)
extern "C" int
pthread_condattr_init (pthread_condattr_t *condattr)
{
- if (pthread_condattr::is_good_object (condattr))
- return EBUSY;
-
*condattr = new pthread_condattr;
if (!pthread_condattr::is_good_object (condattr))
{
@@ -2884,18 +2955,20 @@ pthread_rwlock::init (pthread_rwlock_t *rwlock, const pthread_rwlockattr_t *attr
return EAGAIN;
}
- myfault efault;
- if (efault.faulted ())
+ int ret = 0;
+
+ __try
+ {
+ *rwlock = new_rwlock;
+ }
+ __except (NO_ERROR)
{
delete new_rwlock;
- rwlock_initialization_lock.unlock ();
- return EINVAL;
+ ret = EINVAL;
}
-
- *rwlock = new_rwlock;
+ __endtry
rwlock_initialization_lock.unlock ();
-
- return 0;
+ return ret;
}
extern "C" int
@@ -2960,9 +3033,6 @@ pthread_rwlock_unlock (pthread_rwlock_t *rwlock)
extern "C" int
pthread_rwlockattr_init (pthread_rwlockattr_t *rwlockattr)
{
- if (pthread_rwlockattr::is_good_object (rwlockattr))
- return EBUSY;
-
*rwlockattr = new pthread_rwlockattr;
if (!pthread_rwlockattr::is_good_object (rwlockattr))
{
@@ -3025,7 +3095,11 @@ pthread_kill (pthread_t thread, int sig)
if (!thread->valid)
rval = ESRCH;
else if (sig)
- rval = sig_send (NULL, si, thread->cygtls);
+ {
+ rval = sig_send (NULL, si, thread->cygtls);
+ if (rval == -1)
+ rval = get_errno ();
+ }
else
switch (WaitForSingleObject (thread->win32_obj_id, 0))
{
@@ -3107,15 +3181,17 @@ pthread_mutex::init (pthread_mutex_t *mutex,
new_mutex->type = PTHREAD_MUTEX_ERRORCHECK;
}
- myfault efault;
- if (efault.faulted ())
+ __try
+ {
+ *mutex = new_mutex;
+ }
+ __except (NO_ERROR)
{
delete new_mutex;
mutex_initialization_lock.unlock ();
return EINVAL;
}
-
- *mutex = new_mutex;
+ __endtry
}
mutex_initialization_lock.unlock ();
pthread_printf ("*mutex %p, attr %p, initializer %p", *mutex, attr, initializer);
@@ -3161,7 +3237,7 @@ extern "C" int
pthread_mutex_unlock (pthread_mutex_t *mutex)
{
if (pthread_mutex::is_initializer (mutex))
- return EPERM;
+ pthread_mutex::init (mutex, NULL, *mutex);
if (!pthread_mutex::is_good_object (mutex))
return EINVAL;
return (*mutex)->unlock ();
@@ -3204,16 +3280,17 @@ pthread_spinlock::init (pthread_spinlock_t *spinlock, int pshared)
return EAGAIN;
}
- myfault efault;
- if (efault.faulted ())
+ __try
+ {
+ *spinlock = new_spinlock;
+ }
+ __except (NO_ERROR)
{
delete new_spinlock;
return EINVAL;
}
-
- *spinlock = new_spinlock;
+ __endtry
pthread_printf ("*spinlock %p, pshared %d", *spinlock, pshared);
-
return 0;
}
@@ -3283,9 +3360,6 @@ pthread_mutexattr_gettype (const pthread_mutexattr_t *attr, int *type)
extern "C" int
pthread_mutexattr_init (pthread_mutexattr_t *attr)
{
- if (pthread_mutexattr::is_good_object (attr))
- return EBUSY;
-
*attr = new pthread_mutexattr ();
if (!pthread_mutexattr::is_good_object (attr))
{
@@ -3443,9 +3517,19 @@ semaphore::_getvalue (int *sval)
status = NtQuerySemaphore (win32_obj_id, SemaphoreBasicInformation, &sbi,
sizeof sbi, NULL);
+ int res;
if (NT_SUCCESS (status))
- return sbi.CurrentCount;
- return startvalue;
+ {
+ *sval = sbi.CurrentCount;
+ res = 0;
+ }
+ else
+ {
+ *sval = startvalue;
+ __seterrno_from_nt_status (status);
+ res = -1;
+ }
+ return res;
}
int
@@ -3466,42 +3550,47 @@ semaphore::_timedwait (const struct timespec *abstime)
{
LARGE_INTEGER timeout;
- myfault efault;
- if (efault.faulted ())
+ __try
{
- /* According to SUSv3, abstime need not be checked for validity,
- if the semaphore can be locked immediately. */
- if (!_trywait ())
- return 0;
- set_errno (EINVAL);
- return -1;
- }
-
- timeout.QuadPart = abstime->tv_sec * NSPERSEC
- + (abstime->tv_nsec + 99) / 100 + FACTOR;
+ timeout.QuadPart = abstime->tv_sec * NSPERSEC
+ + (abstime->tv_nsec + 99) / 100 + FACTOR;
- switch (cygwait (win32_obj_id, &timeout, cw_cancel | cw_cancel_self | cw_sig_eintr))
+ switch (cygwait (win32_obj_id, &timeout,
+ cw_cancel | cw_cancel_self | cw_sig_eintr))
+ {
+ case WAIT_OBJECT_0:
+ break;
+ case WAIT_SIGNALED:
+ set_errno (EINTR);
+ return -1;
+ case WAIT_TIMEOUT:
+ set_errno (ETIMEDOUT);
+ return -1;
+ default:
+ pthread_printf ("cygwait failed. %E");
+ __seterrno ();
+ return -1;
+ }
+ }
+ __except (NO_ERROR)
{
- case WAIT_OBJECT_0:
- break;
- case WAIT_SIGNALED:
- set_errno (EINTR);
- return -1;
- case WAIT_TIMEOUT:
- set_errno (ETIMEDOUT);
- return -1;
- default:
- pthread_printf ("cygwait failed. %E");
- __seterrno ();
- return -1;
+ /* According to SUSv3, abstime need not be checked for validity,
+ if the semaphore can be locked immediately. */
+ if (_trywait ())
+ {
+ set_errno (EINVAL);
+ return -1;
+ }
}
+ __endtry
return 0;
}
int
semaphore::_wait ()
{
- switch (cygwait (win32_obj_id, cw_infinite, cw_cancel | cw_cancel_self | cw_sig_eintr))
+ switch (cygwait (win32_obj_id, cw_infinite,
+ cw_cancel | cw_cancel_self | cw_sig_eintr))
{
case WAIT_OBJECT_0:
break;
@@ -3644,7 +3733,7 @@ semaphore::open (unsigned long long hash, LUID luid, int fd, int oflag,
for (semaphore *sema = semaphores.head; sema; sema = sema->next)
if (sema->fd >= 0 && sema->hash == hash
&& sema->luid.HighPart == luid.HighPart
- && sema->luid.LowPart == sema->luid.LowPart)
+ && sema->luid.LowPart == luid.LowPart)
{
wasopen = true;
semaphores.mx.unlock ();
@@ -3725,36 +3814,38 @@ semaphore::post (sem_t *sem)
int
semaphore::getvalue (sem_t *sem, int *sval)
{
- myfault efault;
- if (efault.faulted () || !is_good_object (sem))
+ __try
{
- set_errno (EINVAL);
- return -1;
+ if (is_good_object (sem))
+ return (*sem)->_getvalue (sval);
}
-
- return (*sem)->_getvalue (sval);
+ __except (NO_ERROR) {}
+ __endtry
+ set_errno (EINVAL);
+ return -1;
}
int
semaphore::getinternal (sem_t *sem, int *sfd, unsigned long long *shash,
LUID *sluid, unsigned int *sval)
{
- myfault efault;
- if (efault.faulted () || !is_good_object (sem))
+ __try
{
- set_errno (EINVAL);
- return -1;
+ if (!is_good_object (sem))
+ __leave;
+ if ((*sfd = (*sem)->fd) < 0)
+ __leave;
+ *shash = (*sem)->hash;
+ *sluid = (*sem)->luid;
+ /* POSIX defines the value in calls to sem_init/sem_open as unsigned,
+ but the sem_getvalue gets a pointer to int to return the value.
+ Go figure! */
+ return (*sem)->_getvalue ((int *)sval);
}
- if ((*sfd = (*sem)->fd) < 0)
- {
- set_errno (EINVAL);
- return -1;
- }
- *shash = (*sem)->hash;
- *sluid = (*sem)->luid;
- /* POSIX defines the value in calls to sem_init/sem_open as unsigned, but
- the sem_getvalue gets a pointer to int to return the value. Go figure! */
- return (*sem)->_getvalue ((int *)sval);
+ __except (NO_ERROR) {}
+ __endtry
+ set_errno (EINVAL);
+ return -1;
}
/* pthread_null */
@@ -3830,3 +3921,218 @@ pthread_null::getsequence_np ()
}
pthread_null pthread_null::_instance;
+
+
+extern "C"
+int
+pthread_barrierattr_init (pthread_barrierattr_t * battr)
+{
+ if (unlikely (battr == NULL))
+ return EINVAL;
+
+ *battr = new pthread_barrierattr;
+ (*battr)->shared = PTHREAD_PROCESS_PRIVATE;
+
+ return 0;
+}
+
+
+extern "C"
+int
+pthread_barrierattr_setpshared (pthread_barrierattr_t * battr, int shared)
+{
+ if (unlikely (! pthread_barrierattr::is_good_object (battr)))
+ return EINVAL;
+
+ if (unlikely (shared != PTHREAD_PROCESS_SHARED
+ && shared != PTHREAD_PROCESS_PRIVATE))
+ return EINVAL;
+
+ (*battr)->shared = shared;
+ return 0;
+}
+
+
+extern "C"
+int
+pthread_barrierattr_getpshared (const pthread_barrierattr_t * battr,
+ int * shared)
+{
+ if (unlikely (! pthread_barrierattr::is_good_object (battr)
+ || shared == NULL))
+ return EINVAL;
+
+ *shared = (*battr)->shared;
+ return 0;
+}
+
+
+extern "C"
+int
+pthread_barrierattr_destroy (pthread_barrierattr_t * battr)
+{
+ if (unlikely (! pthread_barrierattr::is_good_object (battr)))
+ return EINVAL;
+
+ delete_and_clear (battr);
+ return 0;
+}
+
+
+extern "C"
+int
+pthread_barrier_init (pthread_barrier_t * bar,
+ const pthread_barrierattr_t * attr, unsigned count)
+{
+ if (unlikely (bar == NULL))
+ return EINVAL;
+
+ *bar = new pthread_barrier;
+ return (*bar)->init (attr, count);
+}
+
+
+int
+pthread_barrier::init (const pthread_barrierattr_t * attr, unsigned count)
+{
+ pthread_mutex_t * mutex = NULL;
+
+ if (unlikely ((attr != NULL
+ && (! pthread_barrierattr::is_good_object (attr)
+ || (*attr)->shared == PTHREAD_PROCESS_SHARED))
+ || count == 0))
+ return EINVAL;
+
+ int retval = pthread_mutex_init (&mtx, NULL);
+ if (unlikely (retval != 0))
+ return retval;
+
+ retval = pthread_cond_init (&cond, NULL);
+ if (unlikely (retval != 0))
+ {
+ int ret = pthread_mutex_destroy (mutex);
+ if (ret != 0)
+ api_fatal ("pthread_mutex_destroy (%p) = %d", mutex, ret);
+
+ mtx = NULL;
+ return retval;
+ }
+
+ cnt = count;
+ cyc = 0;
+ wt = 0;
+
+ return 0;
+}
+
+
+extern "C"
+int
+pthread_barrier_destroy (pthread_barrier_t * bar)
+{
+ if (unlikely (! pthread_barrier::is_good_object (bar)))
+ return EINVAL;
+
+ int ret;
+ ret = (*bar)->destroy ();
+ if (ret == 0)
+ delete_and_clear (bar);
+
+ return ret;
+}
+
+
+int
+pthread_barrier::destroy ()
+{
+ if (unlikely (wt != 0))
+ return EBUSY;
+
+ int retval = pthread_cond_destroy (&cond);
+ if (unlikely (retval != 0))
+ return retval;
+ else
+ cond = NULL;
+
+ retval = pthread_mutex_destroy (&mtx);
+ if (unlikely (retval != 0))
+ return retval;
+ else
+ mtx = NULL;
+
+ cnt = 0;
+ cyc = 0;
+ wt = 0;
+
+ return 0;
+}
+
+
+extern "C"
+int
+pthread_barrier_wait (pthread_barrier_t * bar)
+{
+ if (unlikely (! pthread_barrier::is_good_object (bar)))
+ return EINVAL;
+
+ return (*bar)->wait ();
+}
+
+
+int
+pthread_barrier::wait ()
+{
+ int retval = pthread_mutex_lock (&mtx);
+ if (unlikely (retval != 0))
+ return retval;
+
+ if (unlikely (wt >= cnt))
+ {
+ api_fatal ("wt >= cnt (%u >= %u)", wt, cnt);
+ return EINVAL;
+ }
+
+ if (unlikely (++wt == cnt))
+ {
+ ++cyc;
+ /* This is the last thread to reach the barrier. Signal the waiting
+ threads to wake up and continue. */
+ retval = pthread_cond_broadcast (&cond);
+ if (unlikely (retval != 0))
+ goto cond_error;
+
+ wt = 0;
+ retval = pthread_mutex_unlock (&mtx);
+ if (unlikely (retval != 0))
+ abort ();
+
+ return PTHREAD_BARRIER_SERIAL_THREAD;
+ }
+ else
+ {
+ uint64_t cycle = cyc;
+ do
+ {
+ retval = pthread_cond_wait (&cond, &mtx);
+ if (unlikely (retval != 0))
+ goto cond_error;
+ }
+ while (unlikely (cycle == cyc));
+
+ retval = pthread_mutex_unlock (&mtx);
+ if (unlikely (retval != 0))
+ api_fatal ("pthread_mutex_unlock (%p) = %d", &mtx, retval);
+
+ return 0;
+ }
+
+ cond_error:
+ {
+ --wt;
+ int ret = pthread_mutex_unlock (&mtx);
+ if (unlikely (ret != 0))
+ api_fatal ("pthread_mutex_unlock (%p) = %d", &mtx, ret);
+
+ return retval;
+ }
+}
diff --git a/winsup/cygwin/thread.h b/winsup/cygwin/thread.h
index badffcb79..5d5191320 100644
--- a/winsup/cygwin/thread.h
+++ b/winsup/cygwin/thread.h
@@ -1,8 +1,6 @@
+// -*- C++ -*-
/* thread.h: Locking and threading module definitions
- Copyright 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2007, 2008, 2009,
- 2010, 2011, 2012, 2013 Red Hat, Inc.
-
This file is part of Cygwin.
This software is a copyrighted work licensed under the terms of the
@@ -16,13 +14,8 @@ details. */
#define WRITE_LOCK 1
#define READ_LOCK 2
-/* Default is a 1 Megs stack with a 4K guardpage. The pthread stacksize
- does not include the guardpage size, so we subtract the default guardpage
- size. Additionally, the Windows stack handling disallows to use the last
- two pages as guard page (tested on XP and W7). That results in a zone of
- three pages which have to be subtract to get the actual stack size. */
-#define PTHREAD_DEFAULT_STACKSIZE (1024 * 1024 - 3 * wincap.page_size ())
-#define PTHREAD_DEFAULT_GUARDSIZE (wincap.page_size ())
+/* resource.cc */
+extern size_t get_rlimit_stack (void);
#include <pthread.h>
#include <limits.h>
@@ -60,7 +53,7 @@ public:
void lock ()
{
if (InterlockedIncrement (&lock_counter) != 1)
- cygwait (win32_obj_id, cw_infinite, cw_sig);
+ cygwait (win32_obj_id, cw_infinite, cw_sig | cw_sig_restart);
}
void unlock ()
@@ -89,6 +82,8 @@ class pinfo;
#define PTHREAD_RWLOCK_MAGIC PTHREAD_MAGIC+9
#define PTHREAD_RWLOCKATTR_MAGIC PTHREAD_MAGIC+10
#define PTHREAD_SPINLOCK_MAGIC PTHREAD_MAGIC+11
+#define PTHREAD_BARRIER_MAGIC PTHREAD_MAGIC+12
+#define PTHREAD_BARRIERATTR_MAGIC PTHREAD_MAGIC+13
#define MUTEX_OWNER_ANONYMOUS ((pthread_t) -1)
@@ -525,6 +520,38 @@ private:
static fast_mutex cond_initialization_lock;
};
+
+class pthread_barrierattr: public verifyable_object
+{
+public:
+ static bool is_good_object(pthread_barrierattr_t const *);
+ int shared;
+
+ pthread_barrierattr ();
+ ~pthread_barrierattr ();
+};
+
+
+class pthread_barrier: public verifyable_object
+{
+public:
+ static bool is_good_object(pthread_barrier_t const *);
+
+ pthread_mutex_t mtx; /* Mutex protecting everything below. */
+ pthread_cond_t cond; /* Conditional variable to wait on. */
+ unsigned cnt; /* Barrier count. Threads to wait for. */
+ uint64_t cyc; /* Cycle count. */
+ unsigned wt; /* Already waiting threads count. */
+
+ int init (const pthread_barrierattr_t *, unsigned);
+ int wait();
+ int destroy ();
+
+ pthread_barrier ();
+ ~pthread_barrier ();
+};
+
+
class pthread_rwlockattr: public verifyable_object
{
public:
diff --git a/winsup/cygwin/timer.cc b/winsup/cygwin/timer.cc
index 93b9cb592..044cdda40 100644
--- a/winsup/cygwin/timer.cc
+++ b/winsup/cygwin/timer.cc
@@ -1,7 +1,5 @@
/* timer.cc
- Copyright 2004, 2005, 2006, 2008, 2010, 2011, 2012 Red Hat, Inc.
-
This file is part of Cygwin.
This software is a copyrighted work licensed under the terms of the
@@ -66,8 +64,9 @@ timer_tracker::cancel ()
return false;
SetEvent (hcancel);
- if (WaitForSingleObject (syncthread, INFINITE) != WAIT_OBJECT_0)
- api_fatal ("WFSO failed waiting for timer thread, %E");
+ DWORD res = WaitForSingleObject (syncthread, INFINITE);
+ if (res != WAIT_OBJECT_0)
+ system_printf ("WFSO returned unexpected value %u, %E", res);
return true;
}
@@ -218,45 +217,49 @@ it_bad (const timespec& t)
int
timer_tracker::settime (int in_flags, const itimerspec *value, itimerspec *ovalue)
{
- if (!value)
+ int ret = -1;
+
+ __try
{
- set_errno (EINVAL);
- return -1;
- }
+ if (!value)
+ {
+ set_errno (EINVAL);
+ __leave;
+ }
- myfault efault;
- if (efault.faulted (EFAULT)
- || it_bad (value->it_value)
- || it_bad (value->it_interval))
- return -1;
+ if (it_bad (value->it_value) || it_bad (value->it_interval))
+ __leave;
- long long now = in_flags & TIMER_ABSTIME ? 0 : gtod.usecs ();
+ long long now = in_flags & TIMER_ABSTIME ? 0 : gtod.usecs ();
- lock_timer_tracker here;
- cancel ();
+ lock_timer_tracker here;
+ cancel ();
- if (ovalue)
- gettime (ovalue);
+ if (ovalue)
+ gettime (ovalue);
- if (!value->it_value.tv_sec && !value->it_value.tv_nsec)
- interval_us = sleepto_us = 0;
- else
- {
- sleepto_us = now + to_us (value->it_value);
- interval_us = to_us (value->it_interval);
- it_interval = value->it_interval;
- if (!hcancel)
- hcancel = CreateEvent (&sec_none_nih, TRUE, FALSE, NULL);
- else
- ResetEvent (hcancel);
- if (!syncthread)
- syncthread = CreateEvent (&sec_none_nih, TRUE, FALSE, NULL);
+ if (!value->it_value.tv_sec && !value->it_value.tv_nsec)
+ interval_us = sleepto_us = 0;
else
- ResetEvent (syncthread);
- new cygthread (timer_thread, this, "itimer", syncthread);
+ {
+ sleepto_us = now + to_us (value->it_value);
+ interval_us = to_us (value->it_interval);
+ it_interval = value->it_interval;
+ if (!hcancel)
+ hcancel = CreateEvent (&sec_none_nih, TRUE, FALSE, NULL);
+ else
+ ResetEvent (hcancel);
+ if (!syncthread)
+ syncthread = CreateEvent (&sec_none_nih, TRUE, FALSE, NULL);
+ else
+ ResetEvent (syncthread);
+ new cygthread (timer_thread, this, "itimer", syncthread);
+ }
+ ret = 0;
}
-
- return 0;
+ __except (EFAULT) {}
+ __endtry
+ return ret;
}
void
@@ -279,84 +282,104 @@ timer_tracker::gettime (itimerspec *ovalue)
extern "C" int
timer_gettime (timer_t timerid, struct itimerspec *ovalue)
{
- myfault efault;
- if (efault.faulted (EFAULT))
- return -1;
+ int ret = -1;
- timer_tracker *tt = (timer_tracker *) timerid;
- if (tt->magic != TT_MAGIC)
+ __try
{
- set_errno (EINVAL);
- return -1;
- }
+ timer_tracker *tt = (timer_tracker *) timerid;
+ if (tt->magic != TT_MAGIC)
+ {
+ set_errno (EINVAL);
+ return -1;
+ }
- tt->gettime (ovalue);
- return 0;
+ tt->gettime (ovalue);
+ ret = 0;
+ }
+ __except (EFAULT) {}
+ __endtry
+ return ret;
}
extern "C" int
-timer_create (clockid_t clock_id, struct sigevent *evp, timer_t *timerid)
+timer_create (clockid_t clock_id, struct sigevent *__restrict evp,
+ timer_t *__restrict timerid)
{
- myfault efault;
- if (efault.faulted (EFAULT))
- return -1;
+ int ret = -1;
- if (CLOCKID_IS_PROCESS (clock_id) || CLOCKID_IS_THREAD (clock_id))
+ __try
{
- set_errno (ENOTSUP);
- return -1;
- }
+ if (CLOCKID_IS_PROCESS (clock_id) || CLOCKID_IS_THREAD (clock_id))
+ {
+ set_errno (ENOTSUP);
+ return -1;
+ }
- if (clock_id != CLOCK_REALTIME)
- {
- set_errno (EINVAL);
- return -1;
- }
+ if (clock_id != CLOCK_REALTIME)
+ {
+ set_errno (EINVAL);
+ return -1;
+ }
- *timerid = (timer_t) new timer_tracker (clock_id, evp);
- return 0;
+ *timerid = (timer_t) new timer_tracker (clock_id, evp);
+ ret = 0;
+ }
+ __except (EFAULT) {}
+ __endtry
+ return ret;
}
extern "C" int
-timer_settime (timer_t timerid, int flags, const struct itimerspec *value,
- struct itimerspec *ovalue)
+timer_settime (timer_t timerid, int flags,
+ const struct itimerspec *__restrict value,
+ struct itimerspec *__restrict ovalue)
{
- timer_tracker *tt = (timer_tracker *) timerid;
- myfault efault;
- if (efault.faulted (EFAULT))
- return -1;
- if (tt->magic != TT_MAGIC)
+ int ret = -1;
+
+ __try
{
- set_errno (EINVAL);
- return -1;
+ timer_tracker *tt = (timer_tracker *) timerid;
+ if (tt->magic != TT_MAGIC)
+ {
+ set_errno (EINVAL);
+ __leave;
+ }
+ ret = tt->settime (flags, value, ovalue);
}
-
- return tt->settime (flags, value, ovalue);
+ __except (EFAULT) {}
+ __endtry
+ return ret;
}
extern "C" int
timer_delete (timer_t timerid)
{
- timer_tracker *in_tt = (timer_tracker *) timerid;
- myfault efault;
- if (efault.faulted (EFAULT))
- return -1;
- if (in_tt->magic != TT_MAGIC)
+ int ret = -1;
+
+ __try
{
+ timer_tracker *in_tt = (timer_tracker *) timerid;
+ if (in_tt->magic != TT_MAGIC)
+ {
+ set_errno (EINVAL);
+ __leave;
+ }
+
+ lock_timer_tracker here;
+ for (timer_tracker *tt = &ttstart; tt->next != NULL; tt = tt->next)
+ if (tt->next == in_tt)
+ {
+ tt->next = in_tt->next;
+ delete in_tt;
+ ret = 0;
+ __leave;
+ }
set_errno (EINVAL);
- return -1;
+ ret = 0;
}
-
- lock_timer_tracker here;
- for (timer_tracker *tt = &ttstart; tt->next != NULL; tt = tt->next)
- if (tt->next == in_tt)
- {
- tt->next = in_tt->next;
- delete in_tt;
- return 0;
- }
- set_errno (EINVAL);
- return 0;
+ __except (EFAULT) {}
+ __endtry
+ return ret;
}
void
@@ -374,7 +397,8 @@ fixup_timers_after_fork ()
extern "C" int
-setitimer (int which, const struct itimerval *value, struct itimerval *ovalue)
+setitimer (int which, const struct itimerval *__restrict value,
+ struct itimerval *__restrict ovalue)
{
int ret;
if (which != ITIMER_REAL)
@@ -408,18 +432,13 @@ setitimer (int which, const struct itimerval *value, struct itimerval *ovalue)
extern "C" int
getitimer (int which, struct itimerval *ovalue)
{
- int ret;
+ int ret = -1;
+
if (which != ITIMER_REAL)
- {
- set_errno (EINVAL);
- ret = -1;
- }
+ set_errno (EINVAL);
else
{
- myfault efault;
- if (efault.faulted (EFAULT))
- ret = -1;
- else
+ __try
{
struct itimerspec spec_ovalue;
ret = timer_gettime ((timer_t) &ttstart, &spec_ovalue);
@@ -431,6 +450,8 @@ getitimer (int which, struct itimerval *ovalue)
ovalue->it_value.tv_usec = spec_ovalue.it_value.tv_nsec / 1000;
}
}
+ __except (EFAULT) {}
+ __endtry
}
syscall_printf ("%R = getitimer()", ret);
return ret;
diff --git a/winsup/cygwin/times.cc b/winsup/cygwin/times.cc
index c9df29116..9589119fb 100644
--- a/winsup/cygwin/times.cc
+++ b/winsup/cygwin/times.cc
@@ -1,8 +1,5 @@
/* times.cc
- Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008, 2009, 2010, 2011, 2012, 2013 Red Hat, Inc.
-
This file is part of Cygwin.
This software is a copyrighted work licensed under the terms of the
@@ -31,9 +28,6 @@ hires_ms NO_COPY gtod;
hires_ns NO_COPY ntod;
-/* Temporary declare here until 32 bit w32api follows suit. */
-extern "C" { void WINAPI GetSystemTimePreciseAsFileTime (LPFILETIME); }
-
static inline void __attribute__ ((always_inline))
get_system_time (PLARGE_INTEGER systime)
{
@@ -42,6 +36,23 @@ get_system_time (PLARGE_INTEGER systime)
: GetSystemTimeAsFileTime ((LPFILETIME) systime);
}
+/* There's no GetTickCount64 on pre-Vista. This is the do-it-yourself kit,
+ as it was implemented as hires_ms::timeGetTime_ns once. Resurrect the
+ functionality to allow reliable (albeit low res) timing values. The
+ function returns the value in 100ns interval to avoid a division by 10000. */
+ULONGLONG
+GetTickCount_ns ()
+{
+ LARGE_INTEGER t;
+ do
+ {
+ t.HighPart = SharedUserData.InterruptTime.High1Time;
+ t.LowPart = SharedUserData.InterruptTime.LowPart;
+ }
+ while (t.HighPart != SharedUserData.InterruptTime.High2Time);
+ return (ULONGLONG) t.QuadPart;
+}
+
/* Cygwin internal */
static uint64_t __stdcall
__to_clock_t (PLARGE_INTEGER src, int flag)
@@ -59,35 +70,39 @@ __to_clock_t (PLARGE_INTEGER src, int flag)
extern "C" clock_t
times (struct tms *buf)
{
- myfault efault;
- if (efault.faulted (EFAULT))
- return ((clock_t) -1);
-
static SYSTEM_TIMEOFDAY_INFORMATION stodi;
KERNEL_USER_TIMES kut;
LARGE_INTEGER ticks;
+ clock_t tc = (clock_t) -1;
- /* Fetch boot time if we haven't already. */
- if (!stodi.BootTime.QuadPart)
- NtQuerySystemInformation (SystemTimeOfDayInformation,
- &stodi, sizeof stodi, NULL);
-
- NtQueryInformationProcess (NtCurrentProcess (), ProcessTimes,
- &kut, sizeof kut, NULL);
- get_system_time (&ticks);
-
- /* uptime */
- ticks.QuadPart -= stodi.BootTime.QuadPart;
- /* ticks is in in 100ns, convert to clock ticks. */
- clock_t tc = (clock_t) (ticks.QuadPart * CLOCKS_PER_SEC / NSPERSEC);
-
- buf->tms_stime = __to_clock_t (&kut.KernelTime, 0);
- buf->tms_utime = __to_clock_t (&kut.UserTime, 0);
- timeval_to_filetime (&myself->rusage_children.ru_stime, &kut.KernelTime);
- buf->tms_cstime = __to_clock_t (&kut.KernelTime, 1);
- timeval_to_filetime (&myself->rusage_children.ru_utime, &kut.UserTime);
- buf->tms_cutime = __to_clock_t (&kut.UserTime, 1);
+ __try
+ {
+ /* Fetch boot time if we haven't already. */
+ if (!stodi.BootTime.QuadPart)
+ NtQuerySystemInformation (SystemTimeOfDayInformation,
+ &stodi, sizeof stodi, NULL);
+ NtQueryInformationProcess (NtCurrentProcess (), ProcessTimes,
+ &kut, sizeof kut, NULL);
+ get_system_time (&ticks);
+
+ /* uptime */
+ ticks.QuadPart -= stodi.BootTime.QuadPart;
+ /* ticks is in in 100ns, convert to clock ticks. */
+ tc = (clock_t) (ticks.QuadPart * CLOCKS_PER_SEC / NSPERSEC);
+
+ buf->tms_stime = __to_clock_t (&kut.KernelTime, 0);
+ buf->tms_utime = __to_clock_t (&kut.UserTime, 0);
+ timeval_to_filetime (&myself->rusage_children.ru_stime, &kut.KernelTime);
+ buf->tms_cstime = __to_clock_t (&kut.KernelTime, 1);
+ timeval_to_filetime (&myself->rusage_children.ru_utime, &kut.UserTime);
+ buf->tms_cutime = __to_clock_t (&kut.UserTime, 1);
+ }
+ __except (EFAULT)
+ {
+ tc = (clock_t) -1;
+ }
+ __endtry
syscall_printf ("%D = times(%p)", tc, buf);
return tc;
}
@@ -100,38 +115,49 @@ settimeofday (const struct timeval *tv, const struct timezone *tz)
{
SYSTEMTIME st;
struct tm *ptm;
- int res;
+ int res = -1;
- myfault efault;
- if (efault.faulted (EFAULT))
- return -1;
+ __try
+ {
+ if (tv->tv_usec < 0 || tv->tv_usec >= 1000000)
+ {
+ set_errno (EINVAL);
+ return -1;
+ }
- if (tv->tv_usec < 0 || tv->tv_usec >= 1000000)
+ ptm = gmtime (&tv->tv_sec);
+ st.wYear = ptm->tm_year + 1900;
+ st.wMonth = ptm->tm_mon + 1;
+ st.wDayOfWeek = ptm->tm_wday;
+ st.wDay = ptm->tm_mday;
+ st.wHour = ptm->tm_hour;
+ st.wMinute = ptm->tm_min;
+ st.wSecond = ptm->tm_sec;
+ st.wMilliseconds = tv->tv_usec / 1000;
+
+ res = -!SetSystemTime (&st);
+ gtod.reset ();
+
+ if (res)
+ set_errno (EPERM);
+ }
+ __except (EFAULT)
{
- set_errno (EINVAL);
- return -1;
+ res = -1;
}
-
- ptm = gmtime (&tv->tv_sec);
- st.wYear = ptm->tm_year + 1900;
- st.wMonth = ptm->tm_mon + 1;
- st.wDayOfWeek = ptm->tm_wday;
- st.wDay = ptm->tm_mday;
- st.wHour = ptm->tm_hour;
- st.wMinute = ptm->tm_min;
- st.wSecond = ptm->tm_sec;
- st.wMilliseconds = tv->tv_usec / 1000;
-
- res = -!SetSystemTime (&st);
- gtod.reset ();
-
- if (res)
- set_errno (EPERM);
-
+ __endtry
syscall_printf ("%R = settimeofday(%p, %p)", res, tv, tz);
return res;
}
+/* stime: SVr4 */
+extern "C" int
+stime (const time_t *t)
+{
+ struct timeval tv = { *t, 0 };
+ return settimeofday(&tv, NULL);
+}
+
/* timezone: standards? */
extern "C" char *
timezone (void)
@@ -158,7 +184,7 @@ totimeval (struct timeval *dst, PLARGE_INTEGER src, int sub, int flag)
/* FIXME: Make thread safe */
extern "C" int
-gettimeofday (struct timeval *tv, void *tzvp)
+gettimeofday (struct timeval *__restrict tv, void *__restrict tzvp)
{
struct timezone *tz = (struct timezone *) tzvp;
static bool tzflag;
diff --git a/winsup/cygwin/tls_pbuf.cc b/winsup/cygwin/tls_pbuf.cc
index 56261e006..f5f318e98 100644
--- a/winsup/cygwin/tls_pbuf.cc
+++ b/winsup/cygwin/tls_pbuf.cc
@@ -1,14 +1,11 @@
/* tls_pbuf.cc
- Copyright 2008, 2010 Red Hat, Inc.
-
This software is a copyrighted work licensed under the terms of the
Cygwin license. Please consult the file "CYGWIN_LICENSE" for
details. */
#include <winsup.h>
#include <malloc.h>
-#include "cygtls.h"
#include "tls_pbuf.h"
#define tls_pbuf _my_tls.locals.pathbufs
@@ -16,30 +13,17 @@ details. */
void
tls_pathbuf::destroy ()
{
- for (int i = 0; i < TP_NUM_C_BUFS; ++i)
- if (c_buf[i])
- free (c_buf[i]);
- for (int i = 0; i < TP_NUM_W_BUFS; ++i)
- if (w_buf[i])
- free (w_buf[i]);
-}
-
-tmp_pathbuf::tmp_pathbuf ()
-: c_buf_old (tls_pbuf.c_cnt),
- w_buf_old (tls_pbuf.w_cnt)
-{}
-
-tmp_pathbuf::~tmp_pathbuf ()
-{
- tls_pbuf.c_cnt = c_buf_old;
- tls_pbuf.w_cnt = w_buf_old;
+ for (uint32_t i = 0; i < TP_NUM_C_BUFS && c_buf[i]; ++i)
+ free (c_buf[i]);
+ for (uint32_t i = 0; i < TP_NUM_W_BUFS && w_buf[i]; ++i)
+ free (w_buf[i]);
}
char *
tmp_pathbuf::c_get ()
{
if (tls_pbuf.c_cnt >= TP_NUM_C_BUFS)
- api_fatal ("Internal error: TP_NUM_C_BUFS too small: %u > %u", tls_pbuf.c_cnt, TP_NUM_C_BUFS);
+ api_fatal ("Internal error: TP_NUM_C_BUFS too small: %u", TP_NUM_C_BUFS);
if (!tls_pbuf.c_buf[tls_pbuf.c_cnt]
&& !(tls_pbuf.c_buf[tls_pbuf.c_cnt] = (char *) malloc (NT_MAX_PATH)))
api_fatal ("Internal error: Out of memory for new path buf.");
@@ -50,7 +34,7 @@ PWCHAR
tmp_pathbuf::w_get ()
{
if (tls_pbuf.w_cnt >= TP_NUM_W_BUFS)
- api_fatal ("Internal error: TP_NUM_W_BUFS too small %d >= %d.", tls_pbuf.w_cnt, TP_NUM_W_BUFS);
+ api_fatal ("Internal error: TP_NUM_W_BUFS too small: %u.", TP_NUM_W_BUFS);
if (!tls_pbuf.w_buf[tls_pbuf.w_cnt]
&& !(tls_pbuf.w_buf[tls_pbuf.w_cnt]
= (PWCHAR) malloc (NT_MAX_PATH * sizeof (WCHAR))))
diff --git a/winsup/cygwin/tls_pbuf.h b/winsup/cygwin/tls_pbuf.h
index d4143aaf1..7a36e0f7d 100644
--- a/winsup/cygwin/tls_pbuf.h
+++ b/winsup/cygwin/tls_pbuf.h
@@ -1,19 +1,31 @@
/* tls_pbuf.h
- Copyright 2008 Red Hat, Inc.
-
This software is a copyrighted work licensed under the terms of the
Cygwin license. Please consult the file "CYGWIN_LICENSE" for
details. */
+#pragma once
+
class tmp_pathbuf
{
- int c_buf_old;
- int w_buf_old;
+ uint32_t c_buf_old;
+ uint32_t w_buf_old;
public:
- tmp_pathbuf ();
- ~tmp_pathbuf ();
+ tmp_pathbuf () __attribute__ ((always_inline))
+ : c_buf_old (_my_tls.locals.pathbufs.c_cnt),
+ w_buf_old (_my_tls.locals.pathbufs.w_cnt)
+ {}
+ ~tmp_pathbuf () __attribute__ ((always_inline))
+ {
+ _my_tls.locals.pathbufs.c_cnt = c_buf_old;
+ _my_tls.locals.pathbufs.w_cnt = w_buf_old;
+ }
+ inline bool check_usage (uint32_t c_need, uint32_t w_need)
+ {
+ return c_need + c_buf_old < TP_NUM_C_BUFS
+ && w_need + w_buf_old < TP_NUM_W_BUFS;
+ }
char *c_get (); /* Create temporary TLS path buf of size NT_MAX_PATH. */
PWCHAR w_get (); /* Create temporary TLS path buf of size 2 * NT_MAX_PATH. */
inline char *t_get () { return (char *) w_get (); }
diff --git a/winsup/cygwin/tlsoffsets.h b/winsup/cygwin/tlsoffsets.h
index 37f30c070..13d1003e3 100644
--- a/winsup/cygwin/tlsoffsets.h
+++ b/winsup/cygwin/tlsoffsets.h
@@ -3,115 +3,123 @@
//; $tls::start_offset = -12700;
//; $tls::locals = -12700;
//; $tls::plocals = 0;
-//; $tls::local_clib = -11260;
-//; $tls::plocal_clib = 1440;
-//; $tls::__dontuse = -11260;
-//; $tls::p__dontuse = 1440;
-//; $tls::func = -10172;
-//; $tls::pfunc = 2528;
-//; $tls::saved_errno = -10168;
-//; $tls::psaved_errno = 2532;
-//; $tls::sa_flags = -10164;
-//; $tls::psa_flags = 2536;
-//; $tls::oldmask = -10160;
-//; $tls::poldmask = 2540;
-//; $tls::deltamask = -10156;
-//; $tls::pdeltamask = 2544;
-//; $tls::errno_addr = -10152;
-//; $tls::perrno_addr = 2548;
-//; $tls::sigmask = -10148;
-//; $tls::psigmask = 2552;
-//; $tls::sigwait_mask = -10144;
-//; $tls::psigwait_mask = 2556;
-//; $tls::sigwait_info = -10140;
-//; $tls::psigwait_info = 2560;
-//; $tls::signal_arrived = -10136;
-//; $tls::psignal_arrived = 2564;
-//; $tls::will_wait_for_signal = -10132;
-//; $tls::pwill_wait_for_signal = 2568;
-//; $tls::thread_context = -10128;
-//; $tls::pthread_context = 2572;
-//; $tls::thread_id = -9916;
-//; $tls::pthread_id = 2784;
-//; $tls::infodata = -9912;
-//; $tls::pinfodata = 2788;
-//; $tls::tid = -9764;
-//; $tls::ptid = 2936;
-//; $tls::_ctinfo = -9760;
-//; $tls::p_ctinfo = 2940;
-//; $tls::andreas = -9756;
-//; $tls::pandreas = 2944;
-//; $tls::wq = -9752;
-//; $tls::pwq = 2948;
-//; $tls::sig = -9724;
-//; $tls::psig = 2976;
-//; $tls::incyg = -9720;
-//; $tls::pincyg = 2980;
-//; $tls::spinning = -9716;
-//; $tls::pspinning = 2984;
-//; $tls::stacklock = -9712;
-//; $tls::pstacklock = 2988;
-//; $tls::stackptr = -9708;
-//; $tls::pstackptr = 2992;
-//; $tls::stack = -9704;
-//; $tls::pstack = 2996;
-//; $tls::initialized = -8680;
-//; $tls::pinitialized = 4020;
+//; $tls::local_clib = -10980;
+//; $tls::plocal_clib = 1720;
+//; $tls::__dontuse = -10980;
+//; $tls::p__dontuse = 1720;
+//; $tls::func = -9892;
+//; $tls::pfunc = 2808;
+//; $tls::saved_errno = -9888;
+//; $tls::psaved_errno = 2812;
+//; $tls::sa_flags = -9884;
+//; $tls::psa_flags = 2816;
+//; $tls::oldmask = -9880;
+//; $tls::poldmask = 2820;
+//; $tls::deltamask = -9876;
+//; $tls::pdeltamask = 2824;
+//; $tls::errno_addr = -9872;
+//; $tls::perrno_addr = 2828;
+//; $tls::sigmask = -9868;
+//; $tls::psigmask = 2832;
+//; $tls::sigwait_mask = -9864;
+//; $tls::psigwait_mask = 2836;
+//; $tls::altstack = -9860;
+//; $tls::paltstack = 2840;
+//; $tls::sigwait_info = -9848;
+//; $tls::psigwait_info = 2852;
+//; $tls::signal_arrived = -9844;
+//; $tls::psignal_arrived = 2856;
+//; $tls::will_wait_for_signal = -9840;
+//; $tls::pwill_wait_for_signal = 2860;
+//; $tls::__align = -9836;
+//; $tls::p__align = 2864;
+//; $tls::context = -9832;
+//; $tls::pcontext = 2868;
+//; $tls::thread_id = -9084;
+//; $tls::pthread_id = 3616;
+//; $tls::infodata = -9080;
+//; $tls::pinfodata = 3620;
+//; $tls::tid = -8932;
+//; $tls::ptid = 3768;
+//; $tls::_ctinfo = -8928;
+//; $tls::p_ctinfo = 3772;
+//; $tls::andreas = -8924;
+//; $tls::pandreas = 3776;
+//; $tls::wq = -8920;
+//; $tls::pwq = 3780;
+//; $tls::sig = -8892;
+//; $tls::psig = 3808;
+//; $tls::incyg = -8888;
+//; $tls::pincyg = 3812;
+//; $tls::spinning = -8884;
+//; $tls::pspinning = 3816;
+//; $tls::stacklock = -8880;
+//; $tls::pstacklock = 3820;
+//; $tls::stackptr = -8876;
+//; $tls::pstackptr = 3824;
+//; $tls::stack = -8872;
+//; $tls::pstack = 3828;
+//; $tls::initialized = -7848;
+//; $tls::pinitialized = 4852;
//; __DATA__
#define tls_locals (-12700)
#define tls_plocals (0)
-#define tls_local_clib (-11260)
-#define tls_plocal_clib (1440)
-#define tls___dontuse (-11260)
-#define tls_p__dontuse (1440)
-#define tls_func (-10172)
-#define tls_pfunc (2528)
-#define tls_saved_errno (-10168)
-#define tls_psaved_errno (2532)
-#define tls_sa_flags (-10164)
-#define tls_psa_flags (2536)
-#define tls_oldmask (-10160)
-#define tls_poldmask (2540)
-#define tls_deltamask (-10156)
-#define tls_pdeltamask (2544)
-#define tls_errno_addr (-10152)
-#define tls_perrno_addr (2548)
-#define tls_sigmask (-10148)
-#define tls_psigmask (2552)
-#define tls_sigwait_mask (-10144)
-#define tls_psigwait_mask (2556)
-#define tls_sigwait_info (-10140)
-#define tls_psigwait_info (2560)
-#define tls_signal_arrived (-10136)
-#define tls_psignal_arrived (2564)
-#define tls_will_wait_for_signal (-10132)
-#define tls_pwill_wait_for_signal (2568)
-#define tls_thread_context (-10128)
-#define tls_pthread_context (2572)
-#define tls_thread_id (-9916)
-#define tls_pthread_id (2784)
-#define tls_infodata (-9912)
-#define tls_pinfodata (2788)
-#define tls_tid (-9764)
-#define tls_ptid (2936)
-#define tls__ctinfo (-9760)
-#define tls_p_ctinfo (2940)
-#define tls_andreas (-9756)
-#define tls_pandreas (2944)
-#define tls_wq (-9752)
-#define tls_pwq (2948)
-#define tls_sig (-9724)
-#define tls_psig (2976)
-#define tls_incyg (-9720)
-#define tls_pincyg (2980)
-#define tls_spinning (-9716)
-#define tls_pspinning (2984)
-#define tls_stacklock (-9712)
-#define tls_pstacklock (2988)
-#define tls_stackptr (-9708)
-#define tls_pstackptr (2992)
-#define tls_stack (-9704)
-#define tls_pstack (2996)
-#define tls_initialized (-8680)
-#define tls_pinitialized (4020)
+#define tls_local_clib (-10980)
+#define tls_plocal_clib (1720)
+#define tls___dontuse (-10980)
+#define tls_p__dontuse (1720)
+#define tls_func (-9892)
+#define tls_pfunc (2808)
+#define tls_saved_errno (-9888)
+#define tls_psaved_errno (2812)
+#define tls_sa_flags (-9884)
+#define tls_psa_flags (2816)
+#define tls_oldmask (-9880)
+#define tls_poldmask (2820)
+#define tls_deltamask (-9876)
+#define tls_pdeltamask (2824)
+#define tls_errno_addr (-9872)
+#define tls_perrno_addr (2828)
+#define tls_sigmask (-9868)
+#define tls_psigmask (2832)
+#define tls_sigwait_mask (-9864)
+#define tls_psigwait_mask (2836)
+#define tls_altstack (-9860)
+#define tls_paltstack (2840)
+#define tls_sigwait_info (-9848)
+#define tls_psigwait_info (2852)
+#define tls_signal_arrived (-9844)
+#define tls_psignal_arrived (2856)
+#define tls_will_wait_for_signal (-9840)
+#define tls_pwill_wait_for_signal (2860)
+#define tls___align (-9836)
+#define tls_p__align (2864)
+#define tls_context (-9832)
+#define tls_pcontext (2868)
+#define tls_thread_id (-9084)
+#define tls_pthread_id (3616)
+#define tls_infodata (-9080)
+#define tls_pinfodata (3620)
+#define tls_tid (-8932)
+#define tls_ptid (3768)
+#define tls__ctinfo (-8928)
+#define tls_p_ctinfo (3772)
+#define tls_andreas (-8924)
+#define tls_pandreas (3776)
+#define tls_wq (-8920)
+#define tls_pwq (3780)
+#define tls_sig (-8892)
+#define tls_psig (3808)
+#define tls_incyg (-8888)
+#define tls_pincyg (3812)
+#define tls_spinning (-8884)
+#define tls_pspinning (3816)
+#define tls_stacklock (-8880)
+#define tls_pstacklock (3820)
+#define tls_stackptr (-8876)
+#define tls_pstackptr (3824)
+#define tls_stack (-8872)
+#define tls_pstack (3828)
+#define tls_initialized (-7848)
+#define tls_pinitialized (4852)
diff --git a/winsup/cygwin/tlsoffsets64.h b/winsup/cygwin/tlsoffsets64.h
index f85dae242..d137408d0 100644
--- a/winsup/cygwin/tlsoffsets64.h
+++ b/winsup/cygwin/tlsoffsets64.h
@@ -3,115 +3,123 @@
//; $tls::start_offset = -12800;
//; $tls::locals = -12800;
//; $tls::plocals = 0;
-//; $tls::local_clib = -11200;
-//; $tls::plocal_clib = 1600;
-//; $tls::__dontuse = -11200;
-//; $tls::p__dontuse = 1600;
-//; $tls::func = -9312;
-//; $tls::pfunc = 3488;
-//; $tls::saved_errno = -9304;
-//; $tls::psaved_errno = 3496;
-//; $tls::sa_flags = -9300;
-//; $tls::psa_flags = 3500;
-//; $tls::oldmask = -9296;
-//; $tls::poldmask = 3504;
-//; $tls::deltamask = -9288;
-//; $tls::pdeltamask = 3512;
-//; $tls::errno_addr = -9280;
-//; $tls::perrno_addr = 3520;
-//; $tls::sigmask = -9272;
-//; $tls::psigmask = 3528;
-//; $tls::sigwait_mask = -9264;
-//; $tls::psigwait_mask = 3536;
-//; $tls::sigwait_info = -9256;
-//; $tls::psigwait_info = 3544;
-//; $tls::signal_arrived = -9248;
-//; $tls::psignal_arrived = 3552;
-//; $tls::will_wait_for_signal = -9240;
-//; $tls::pwill_wait_for_signal = 3560;
-//; $tls::thread_context = -9232;
-//; $tls::pthread_context = 3568;
-//; $tls::thread_id = -8400;
-//; $tls::pthread_id = 4400;
-//; $tls::infodata = -8396;
-//; $tls::pinfodata = 4404;
-//; $tls::tid = -8248;
-//; $tls::ptid = 4552;
-//; $tls::_ctinfo = -8240;
-//; $tls::p_ctinfo = 4560;
-//; $tls::andreas = -8232;
-//; $tls::pandreas = 4568;
-//; $tls::wq = -8224;
-//; $tls::pwq = 4576;
-//; $tls::sig = -8176;
-//; $tls::psig = 4624;
-//; $tls::incyg = -8172;
-//; $tls::pincyg = 4628;
-//; $tls::spinning = -8168;
-//; $tls::pspinning = 4632;
-//; $tls::stacklock = -8164;
-//; $tls::pstacklock = 4636;
-//; $tls::stackptr = -8160;
-//; $tls::pstackptr = 4640;
-//; $tls::stack = -8152;
-//; $tls::pstack = 4648;
-//; $tls::initialized = -6104;
-//; $tls::pinitialized = 6696;
+//; $tls::local_clib = -10624;
+//; $tls::plocal_clib = 2176;
+//; $tls::__dontuse = -10624;
+//; $tls::p__dontuse = 2176;
+//; $tls::func = -8736;
+//; $tls::pfunc = 4064;
+//; $tls::saved_errno = -8728;
+//; $tls::psaved_errno = 4072;
+//; $tls::sa_flags = -8724;
+//; $tls::psa_flags = 4076;
+//; $tls::oldmask = -8720;
+//; $tls::poldmask = 4080;
+//; $tls::deltamask = -8712;
+//; $tls::pdeltamask = 4088;
+//; $tls::errno_addr = -8704;
+//; $tls::perrno_addr = 4096;
+//; $tls::sigmask = -8696;
+//; $tls::psigmask = 4104;
+//; $tls::sigwait_mask = -8688;
+//; $tls::psigwait_mask = 4112;
+//; $tls::altstack = -8680;
+//; $tls::paltstack = 4120;
+//; $tls::sigwait_info = -8656;
+//; $tls::psigwait_info = 4144;
+//; $tls::signal_arrived = -8648;
+//; $tls::psignal_arrived = 4152;
+//; $tls::will_wait_for_signal = -8640;
+//; $tls::pwill_wait_for_signal = 4160;
+//; $tls::__align = -8632;
+//; $tls::p__align = 4168;
+//; $tls::context = -8624;
+//; $tls::pcontext = 4176;
+//; $tls::thread_id = -7328;
+//; $tls::pthread_id = 5472;
+//; $tls::infodata = -7324;
+//; $tls::pinfodata = 5476;
+//; $tls::tid = -7176;
+//; $tls::ptid = 5624;
+//; $tls::_ctinfo = -7168;
+//; $tls::p_ctinfo = 5632;
+//; $tls::andreas = -7160;
+//; $tls::pandreas = 5640;
+//; $tls::wq = -7152;
+//; $tls::pwq = 5648;
+//; $tls::sig = -7104;
+//; $tls::psig = 5696;
+//; $tls::incyg = -7100;
+//; $tls::pincyg = 5700;
+//; $tls::spinning = -7096;
+//; $tls::pspinning = 5704;
+//; $tls::stacklock = -7092;
+//; $tls::pstacklock = 5708;
+//; $tls::stackptr = -7088;
+//; $tls::pstackptr = 5712;
+//; $tls::stack = -7080;
+//; $tls::pstack = 5720;
+//; $tls::initialized = -5032;
+//; $tls::pinitialized = 7768;
//; __DATA__
#define tls_locals (-12800)
#define tls_plocals (0)
-#define tls_local_clib (-11200)
-#define tls_plocal_clib (1600)
-#define tls___dontuse (-11200)
-#define tls_p__dontuse (1600)
-#define tls_func (-9312)
-#define tls_pfunc (3488)
-#define tls_saved_errno (-9304)
-#define tls_psaved_errno (3496)
-#define tls_sa_flags (-9300)
-#define tls_psa_flags (3500)
-#define tls_oldmask (-9296)
-#define tls_poldmask (3504)
-#define tls_deltamask (-9288)
-#define tls_pdeltamask (3512)
-#define tls_errno_addr (-9280)
-#define tls_perrno_addr (3520)
-#define tls_sigmask (-9272)
-#define tls_psigmask (3528)
-#define tls_sigwait_mask (-9264)
-#define tls_psigwait_mask (3536)
-#define tls_sigwait_info (-9256)
-#define tls_psigwait_info (3544)
-#define tls_signal_arrived (-9248)
-#define tls_psignal_arrived (3552)
-#define tls_will_wait_for_signal (-9240)
-#define tls_pwill_wait_for_signal (3560)
-#define tls_thread_context (-9232)
-#define tls_pthread_context (3568)
-#define tls_thread_id (-8400)
-#define tls_pthread_id (4400)
-#define tls_infodata (-8396)
-#define tls_pinfodata (4404)
-#define tls_tid (-8248)
-#define tls_ptid (4552)
-#define tls__ctinfo (-8240)
-#define tls_p_ctinfo (4560)
-#define tls_andreas (-8232)
-#define tls_pandreas (4568)
-#define tls_wq (-8224)
-#define tls_pwq (4576)
-#define tls_sig (-8176)
-#define tls_psig (4624)
-#define tls_incyg (-8172)
-#define tls_pincyg (4628)
-#define tls_spinning (-8168)
-#define tls_pspinning (4632)
-#define tls_stacklock (-8164)
-#define tls_pstacklock (4636)
-#define tls_stackptr (-8160)
-#define tls_pstackptr (4640)
-#define tls_stack (-8152)
-#define tls_pstack (4648)
-#define tls_initialized (-6104)
-#define tls_pinitialized (6696)
+#define tls_local_clib (-10624)
+#define tls_plocal_clib (2176)
+#define tls___dontuse (-10624)
+#define tls_p__dontuse (2176)
+#define tls_func (-8736)
+#define tls_pfunc (4064)
+#define tls_saved_errno (-8728)
+#define tls_psaved_errno (4072)
+#define tls_sa_flags (-8724)
+#define tls_psa_flags (4076)
+#define tls_oldmask (-8720)
+#define tls_poldmask (4080)
+#define tls_deltamask (-8712)
+#define tls_pdeltamask (4088)
+#define tls_errno_addr (-8704)
+#define tls_perrno_addr (4096)
+#define tls_sigmask (-8696)
+#define tls_psigmask (4104)
+#define tls_sigwait_mask (-8688)
+#define tls_psigwait_mask (4112)
+#define tls_altstack (-8680)
+#define tls_paltstack (4120)
+#define tls_sigwait_info (-8656)
+#define tls_psigwait_info (4144)
+#define tls_signal_arrived (-8648)
+#define tls_psignal_arrived (4152)
+#define tls_will_wait_for_signal (-8640)
+#define tls_pwill_wait_for_signal (4160)
+#define tls___align (-8632)
+#define tls_p__align (4168)
+#define tls_context (-8624)
+#define tls_pcontext (4176)
+#define tls_thread_id (-7328)
+#define tls_pthread_id (5472)
+#define tls_infodata (-7324)
+#define tls_pinfodata (5476)
+#define tls_tid (-7176)
+#define tls_ptid (5624)
+#define tls__ctinfo (-7168)
+#define tls_p_ctinfo (5632)
+#define tls_andreas (-7160)
+#define tls_pandreas (5640)
+#define tls_wq (-7152)
+#define tls_pwq (5648)
+#define tls_sig (-7104)
+#define tls_psig (5696)
+#define tls_incyg (-7100)
+#define tls_pincyg (5700)
+#define tls_spinning (-7096)
+#define tls_pspinning (5704)
+#define tls_stacklock (-7092)
+#define tls_pstacklock (5708)
+#define tls_stackptr (-7088)
+#define tls_pstackptr (5712)
+#define tls_stack (-7080)
+#define tls_pstack (5720)
+#define tls_initialized (-5032)
+#define tls_pinitialized (7768)
diff --git a/winsup/cygwin/tmpbuf.h b/winsup/cygwin/tmpbuf.h
index 937d50f6a..1149ef9b1 100644
--- a/winsup/cygwin/tmpbuf.h
+++ b/winsup/cygwin/tmpbuf.h
@@ -1,7 +1,5 @@
/* tmpbuf.h
- Copyright 2010 Red Hat, Inc.
-
This software is a copyrighted work licensed under the terms of the
Cygwin license. Please consult the file "CYGWIN_LICENSE" for
details. */
diff --git a/winsup/cygwin/tty.cc b/winsup/cygwin/tty.cc
index 7388ac1a3..e19ee80e4 100644
--- a/winsup/cygwin/tty.cc
+++ b/winsup/cygwin/tty.cc
@@ -1,8 +1,5 @@
/* tty.cc
- Copyright 1997, 1998, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2008, 2009,
- 2010, 2011, 2012 Red Hat, Inc.
-
This file is part of Cygwin.
This software is a copyrighted work licensed under the terms of the
@@ -141,7 +138,7 @@ tty_list::allocate (HANDLE& r, HANDLE& w)
{
t = ttys + i;
t->init ();
- t->setsid (-1);
+ t->setsid (0);
freetty = i;
break;
}
@@ -237,6 +234,7 @@ tty::init ()
was_opened = false;
master_pid = 0;
is_console = false;
+ column = 0;
}
HANDLE
diff --git a/winsup/cygwin/tty.h b/winsup/cygwin/tty.h
index f7a80e10f..362ae74dc 100644
--- a/winsup/cygwin/tty.h
+++ b/winsup/cygwin/tty.h
@@ -1,8 +1,5 @@
/* tty.h: shared tty info for cygwin
- Copyright 2000, 2001, 2002, 2003, 2004, 2006, 2009, 2010, 2011, 2012, 2013
- Red Hat, Inc.
-
This file is part of Cygwin.
This software is a copyrighted work licensed under the terms of the
@@ -15,7 +12,7 @@ details. */
#define INP_BUFFER_SIZE 256
#define OUT_BUFFER_SIZE 256
-#define NTTYS 64
+#define NTTYS 128
#define real_tty_attached(p) ((p)->ctty > 0 && !iscons_dev ((p)->ctty))
/* Input/Output/ioctl events */
@@ -67,7 +64,6 @@ public:
* -ERRNO
*/
int ioctl_retval;
- int write_error;
void setntty (_major_t t, _minor_t n) {ntty = (fh_devices) FHDEV (t, n);}
dev_t getntty () const {return ntty;}
@@ -91,32 +87,21 @@ public:
pid_t master_pid; /* PID of tty master process */
private:
- /* Since tty is shared, the HANDLEs must be 32 and 64 bit clean. The below
- code makes sure of that by setting the upper 4 byte of the union to 0
- when writing the handle value from a 32 bit process. Fortunately the
- actual values are 32 bit on both platforms, so the HANDLES can be
- used on both platforms. */
- union {
- HANDLE _from_master;
- LARGE_INTEGER _fm_dummy;
- };
- union {
- HANDLE _to_master;
- LARGE_INTEGER _tm_dummy;
- };
+ HANDLE _from_master;
+ HANDLE _to_master;
+ HANDLE _to_master_cyg;
+
public:
HANDLE from_master() const { return _from_master; }
HANDLE to_master() const { return _to_master; }
-#ifdef __x86_64__
+ HANDLE to_master_cyg() const { return _to_master_cyg; }
void set_from_master (HANDLE h) { _from_master = h; }
void set_to_master (HANDLE h) { _to_master = h; }
-#else
- void set_from_master (HANDLE h) { _fm_dummy.HighPart = 0; _from_master = h; }
- void set_to_master (HANDLE h) { _tm_dummy.HighPart = 0; _to_master = h; }
-#endif
+ void set_to_master_cyg (HANDLE h) { _to_master_cyg = h; }
int read_retval;
bool was_opened; /* True if opened at least once. */
+ int column; /* Current Column */
void init ();
HANDLE open_inuse (ACCESS_MASK access);
@@ -129,8 +114,7 @@ public:
{ return open_mutex (INPUT_MUTEX, access); }
bool exists ();
bool not_allocated (HANDLE&, HANDLE&);
- void set_master_closed () {master_pid = -1;}
- bool is_master_closed () const {return master_pid == -1;}
+ void set_master_ctl_closed () {master_pid = -1;}
static void __stdcall create_master (int);
static void __stdcall init_session ();
friend class fhandler_pty_master;
diff --git a/winsup/cygwin/uinfo.cc b/winsup/cygwin/uinfo.cc
index 4ca901f35..830ca9c97 100644
--- a/winsup/cygwin/uinfo.cc
+++ b/winsup/cygwin/uinfo.cc
@@ -1,8 +1,5 @@
/* uinfo.cc: user info (uid, gid, etc...)
- Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008, 2009, 2010, 2011, 2012 Red Hat, Inc.
-
This file is part of Cygwin.
This software is a copyrighted work licensed under the terms of the
@@ -10,12 +7,14 @@ Cygwin license. Please consult the file "CYGWIN_LICENSE" for
details. */
#include "winsup.h"
-#include <unistd.h>
+#include <iptypes.h>
+#include <lm.h>
+#include <ntsecapi.h>
#include <wininet.h>
+#include <unistd.h>
#include <stdlib.h>
+#include <stdio.h>
#include <wchar.h>
-#include <lm.h>
-#include <iptypes.h>
#include <sys/cygwin.h>
#include "cygerrno.h"
#include "pinfo.h"
@@ -27,32 +26,34 @@ details. */
#include "registry.h"
#include "child_info.h"
#include "environ.h"
-#include "pwdgrp.h"
#include "tls_pbuf.h"
+#include "miscfuncs.h"
#include "ntdll.h"
+#include "ldap.h"
+#include "cygserver_pwdgrp.h"
/* Initialize the part of cygheap_user that does not depend on files.
- The information is used in shared.cc for the user shared.
- Final initialization occurs in uinfo_init */
+ The information is used in shared.cc to create the shared user_info
+ region. Final initialization occurs in uinfo_init */
void
cygheap_user::init ()
{
WCHAR user_name[UNLEN + 1];
DWORD user_name_len = UNLEN + 1;
- /* This code is only run if a Cygwin process gets started by a native
- Win32 process. We try to get the username from the environment,
+ /* This method is only called if a Cygwin process gets started by a
+ native Win32 process. Try to get the username from the environment,
first USERNAME (Win32), then USER (POSIX). If that fails (which is
very unlikely), it only has an impact if we don't have an entry in
/etc/passwd for this user either. In that case the username sticks
to "unknown". Since this is called early in initialization, and
- since we don't want pull in a dependency to any other DLL except
+ since we don't want to pull in a dependency to any other DLL except
ntdll and kernel32 at this early stage, don't call GetUserName,
GetUserNameEx, NetWkstaUserGetInfo, etc. */
if (GetEnvironmentVariableW (L"USERNAME", user_name, user_name_len)
|| GetEnvironmentVariableW (L"USER", user_name, user_name_len))
{
- char mb_user_name[user_name_len = sys_wcstombs (NULL, 0, user_name)];
+ char mb_user_name[user_name_len = sys_wcstombs (NULL, 0, user_name) + 1];
sys_wcstombs (mb_user_name, user_name_len, user_name);
set_name (mb_user_name);
}
@@ -81,7 +82,7 @@ cygheap_user::init ()
status = NtSetInformationToken (hProcToken, TokenOwner, &effec_cygsid,
sizeof (cygsid));
if (!NT_SUCCESS (status))
- debug_printf ("NtSetInformationToken(TokenOwner), %y", status);
+ debug_printf ("NtSetInformationToken (TokenOwner), %y", status);
/* Standard way to build a security descriptor with the usual DACL */
PSECURITY_ATTRIBUTES sa_buf = (PSECURITY_ATTRIBUTES) alloca (1024);
@@ -109,44 +110,105 @@ cygheap_user::init ()
system_printf("Cannot get dacl, %E");
}
-void
-internal_getlogin (cygheap_user &user)
+/* Check if sid is an enabled SID in the token group list of the current
+ effective token. Note that we only check for ENABLED groups, not for
+ INTEGRITY_ENABLED. The latter just doesn't make sense in our scenario
+ of using the group as primary group.
+
+ This needs careful checking should we use check_token_membership in other
+ circumstances. */
+static bool
+check_token_membership (PSID sid)
{
- struct passwd *pw = NULL;
+ NTSTATUS status;
+ ULONG size;
+ tmp_pathbuf tp;
+ PTOKEN_GROUPS groups = (PTOKEN_GROUPS) tp.w_get ();
- cygpsid psid = user.sid ();
- pw = internal_getpwsid (psid);
+ /* If impersonated, use impersonation token. */
+ HANDLE tok = cygheap->user.issetuid () ? cygheap->user.primary_token ()
+ : hProcToken;
+ status = NtQueryInformationToken (tok, TokenGroups, groups, 2 * NT_MAX_PATH,
+ &size);
+ if (!NT_SUCCESS (status))
+ debug_printf ("NtQueryInformationToken (TokenGroups) %y", status);
+ else
+ {
+ for (DWORD pg = 0; pg < groups->GroupCount; ++pg)
+ if (RtlEqualSid (sid, groups->Groups[pg].Sid)
+ && (groups->Groups[pg].Attributes & SE_GROUP_ENABLED))
+ return true;
+ }
+ return false;
+}
- if (!pw && !(pw = internal_getpwnam (user.name ()))
- && !(pw = internal_getpwuid (DEFAULT_UID)))
- debug_printf ("user not found in augmented /etc/passwd");
+void
+internal_getlogin (cygheap_user &user)
+{
+ struct passwd *pwd;
+ struct group *pgrp, *grp, *grp2;
+ cyg_ldap cldap;
+
+ /* Fetch (and potentially generate) passwd and group entries for the user
+ and the primary group in the token. */
+ pwd = internal_getpwsid (user.sid (), &cldap);
+ pgrp = internal_getgrsid (user.groups.pgsid, &cldap);
+ if (!cygheap->pg.nss_cygserver_caching ())
+ internal_getgroups (0, NULL, &cldap);
+ if (!pwd)
+ debug_printf ("user not found in passwd DB");
else
{
cygsid gsid;
- myself->uid = pw->pw_uid;
- myself->gid = pw->pw_gid;
- user.set_name (pw->pw_name);
- if (gsid.getfromgr (internal_getgrgid (pw->pw_gid)))
+ user.set_name (pwd->pw_name);
+ myself->uid = pwd->pw_uid;
+ myself->gid = pwd->pw_gid;
+ /* If the primary group in the passwd DB is different from the primary
+ group in the user token, we have to find the SID of that group and
+ try to override the token primary group. */
+ if (!pgrp || myself->gid != pgrp->gr_gid)
{
- if (gsid != user.groups.pgsid)
+ if (gsid.getfromgr (grp = internal_getgrgid (pwd->pw_gid, &cldap)))
{
- /* Set primary group to the group in /etc/passwd. */
- NTSTATUS status = NtSetInformationToken (hProcToken,
- TokenPrimaryGroup,
- &gsid, sizeof gsid);
- if (!NT_SUCCESS (status))
- debug_printf ("NtSetInformationToken (TokenPrimaryGroup), %y",
- status);
- else
- user.groups.pgsid = gsid;
- clear_procimptoken ();
+ /* We might have a group file with a group entry for the current
+ user's primary group, but the current user has no entry in
+ passwd. If so, pw_gid is taken from windows and might
+ disagree with gr_gid from the group file. Overwrite it. */
+ if ((grp2 = internal_getgrsid (gsid, &cldap)) && grp2 != grp)
+ myself->gid = pwd->pw_gid = grp2->gr_gid;
+ /* Set primary group to the group in /etc/passwd, *iff*
+ the group in /etc/passwd is in the token *and* enabled. */
+ if (gsid != user.groups.pgsid)
+ {
+ NTSTATUS status = STATUS_INVALID_PARAMETER;
+
+ if (check_token_membership (gsid))
+ {
+ status = NtSetInformationToken (hProcToken,
+ TokenPrimaryGroup,
+ &gsid, sizeof gsid);
+ if (!NT_SUCCESS (status))
+ debug_printf ("NtSetInformationToken "
+ "(TokenPrimaryGroup), %y", status);
+ }
+ if (!NT_SUCCESS (status))
+ {
+ /* Revert the primary group setting and override the
+ setting in the passwd entry. */
+ if (pgrp)
+ myself->gid = pwd->pw_gid = pgrp->gr_gid;
+ }
+ else
+ user.groups.pgsid = gsid;
+ clear_procimptoken ();
+ }
}
+ else
+ debug_printf ("group not found in group DB");
}
- else
- debug_printf ("gsid not found in augmented /etc/group");
}
- cygheap->user.ontherange (CH_HOME, pw);
+ cygheap->user.ontherange (CH_HOME, pwd);
}
void
@@ -156,7 +218,7 @@ uinfo_init ()
return;
if (!child_proc_info)
- internal_getlogin (cygheap->user); /* Set the cygheap->user. */
+ internal_getlogin (cygheap->user); /* Set cygheap->user. */
/* Conditions must match those in spawn to allow starting child
processes with ruid != euid and rgid != egid. */
else if (cygheap->user.issetuid ()
@@ -191,10 +253,15 @@ getlogin_r (char *name, size_t namesize)
size_t len = strlen (login) + 1;
if (len > namesize)
return ERANGE;
- myfault efault;
- if (efault.faulted ())
- return EFAULT;
- strncpy (name, login, len);
+ __try
+ {
+ strncpy (name, login, len);
+ }
+ __except (NO_ERROR)
+ {
+ return EFAULT;
+ }
+ __endtry
return 0;
}
@@ -289,9 +356,6 @@ cuserid (char *src)
const char *
cygheap_user::ontherange (homebodies what, struct passwd *pw)
{
- LPUSER_INFO_3 ui = NULL;
- WCHAR wuser[UNLEN + 1];
- NET_API_STATUS ret;
char homedrive_env_buf[3];
char *newhomedrive = NULL;
char *newhomepath = NULL;
@@ -304,60 +368,72 @@ cygheap_user::ontherange (homebodies what, struct passwd *pw)
if ((p = getenv ("HOME")))
debug_printf ("HOME is already in the environment %s", p);
- else
+ if (!p)
{
if (pw && pw->pw_dir && *pw->pw_dir)
{
- debug_printf ("Set HOME (from /etc/passwd) to %s", pw->pw_dir);
+ debug_printf ("Set HOME (from account db) to %s", pw->pw_dir);
setenv ("HOME", pw->pw_dir, 1);
}
else
{
- char home[strlen (name ()) + 8];
-
- debug_printf ("Set HOME to default /home/USER");
- __small_sprintf (home, "/home/%s", name ());
- setenv ("HOME", home, 1);
+ char *usrpro = getenv("USERPROFILE");
+ if (usrpro)
+ setenv("HOME", usrpro, 1);
}
}
}
- if (what != CH_HOME && homepath == NULL && newhomepath == NULL)
+ if (what != CH_HOME && homepath == NULL)
{
+ WCHAR wuser[UNLEN + 1];
+ WCHAR wlogsrv[INTERNET_MAX_HOST_NAME_LENGTH + 3];
+ PUSER_INFO_3 ui = NULL;
char *homepath_env_buf = tp.c_get ();
- if (!pw)
- pw = internal_getpwnam (name ());
+ WCHAR profile[MAX_PATH];
+ WCHAR win_id[UNLEN + 1]; /* Large enough for SID */
+
+ homepath_env_buf[0] = homepath_env_buf[1] = '\0';
+ /* Use Cygwin home as HOMEDRIVE/HOMEPATH in the first place. This
+ should cover it completely, in theory. Still, it might be the
+ wrong choice in the long run, which might demand to set HOMEDRIVE/
+ HOMEPATH to the correct values per Windows. Keep the entire rest
+ of the code mainly for this reason, so switching is easy. */
+ pw = internal_getpwsid (sid ());
if (pw && pw->pw_dir && *pw->pw_dir)
cygwin_conv_path (CCP_POSIX_TO_WIN_A, pw->pw_dir, homepath_env_buf,
NT_MAX_PATH);
- else
+ /* First fallback: Windows path per Windows user DB. */
+ else if (logsrv ())
{
- homepath_env_buf[0] = homepath_env_buf[1] = '\0';
- if (logsrv ())
+ sys_mbstowcs (wlogsrv, sizeof (wlogsrv) / sizeof (*wlogsrv),
+ logsrv ());
+ sys_mbstowcs (wuser, sizeof wuser / sizeof *wuser, winname ());
+ if (NetUserGetInfo (wlogsrv, wuser, 3, (LPBYTE *) &ui)
+ == NERR_Success)
{
- WCHAR wlogsrv[INTERNET_MAX_HOST_NAME_LENGTH + 3];
- sys_mbstowcs (wlogsrv, sizeof (wlogsrv) / sizeof (*wlogsrv),
- logsrv ());
- sys_mbstowcs (wuser, sizeof (wuser) / sizeof (*wuser), winname ());
- if (!(ret = NetUserGetInfo (wlogsrv, wuser, 3, (LPBYTE *) &ui)))
+ if (ui->usri3_home_dir_drive && *ui->usri3_home_dir_drive)
{
sys_wcstombs (homepath_env_buf, NT_MAX_PATH,
- ui->usri3_home_dir);
- if (!homepath_env_buf[0])
- {
- sys_wcstombs (homepath_env_buf, NT_MAX_PATH,
- ui->usri3_home_dir_drive);
- if (homepath_env_buf[0])
- strcat (homepath_env_buf, "\\");
- else
- cygwin_conv_path (CCP_POSIX_TO_WIN_A | CCP_ABSOLUTE,
- "/", homepath_env_buf, NT_MAX_PATH);
- }
+ ui->usri3_home_dir_drive);
+ strcat (homepath_env_buf, "\\");
}
+ else if (ui->usri3_home_dir && *ui->usri3_home_dir)
+ sys_wcstombs (homepath_env_buf, NT_MAX_PATH,
+ ui->usri3_home_dir);
}
if (ui)
NetApiBufferFree (ui);
}
+ /* Second fallback: Windows profile dir. */
+ if (!homepath_env_buf[0]
+ && get_user_profile_directory (get_windows_id (win_id),
+ profile, MAX_PATH))
+ sys_wcstombs (homepath_env_buf, NT_MAX_PATH, profile);
+ /* Last fallback: Cygwin root dir. */
+ if (!homepath_env_buf[0])
+ cygwin_conv_path (CCP_POSIX_TO_WIN_A | CCP_ABSOLUTE,
+ "/", homepath_env_buf, NT_MAX_PATH);
if (homepath_env_buf[1] != ':')
{
@@ -415,7 +491,7 @@ cygheap_user::env_logsrv (const char *name, size_t namelen)
WCHAR wlogsrv[INTERNET_MAX_HOST_NAME_LENGTH + 3];
sys_mbstowcs (wdomain, MAX_DOMAIN_NAME_LEN + 1, mydomain);
cfree_and_set (plogsrv, almost_null);
- if (get_logon_server (wdomain, wlogsrv, false))
+ if (get_logon_server (wdomain, wlogsrv, DS_IS_FLAT_NAME))
sys_wcstombs_alloc (&plogsrv, HEAP_STR, wlogsrv);
return plogsrv;
}
@@ -451,13 +527,13 @@ cygheap_user::env_userprofile (const char *name, size_t namelen)
if (test_uid (puserprof, name, namelen))
return puserprof;
- /* User hive path is never longer than MAX_PATH. */
- WCHAR userprofile_env_buf[MAX_PATH];
+ /* User profile path is never longer than MAX_PATH. */
+ WCHAR profile[MAX_PATH];
WCHAR win_id[UNLEN + 1]; /* Large enough for SID */
cfree_and_set (puserprof, almost_null);
- if (get_registry_hive_path (get_windows_id (win_id), userprofile_env_buf))
- sys_wcstombs_alloc (&puserprof, HEAP_STR, userprofile_env_buf);
+ if (get_user_profile_directory (get_windows_id (win_id), profile, MAX_PATH))
+ sys_wcstombs_alloc (&puserprof, HEAP_STR, profile);
return puserprof;
}
@@ -514,7 +590,7 @@ pwdgrp::next_str (char c)
bool
pwdgrp::next_num (unsigned long& n)
{
- char *p = next_str (':');
+ char *p = next_str (pwd_sep);
char *cp;
n = strtoul (p, &cp, 10);
return p != cp && !*cp;
@@ -525,104 +601,2045 @@ pwdgrp::add_line (char *eptr)
{
if (eptr)
{
+ if (curr_lines >= max_lines)
+ {
+ max_lines += 10;
+ pwdgrp_buf = crealloc_abort (pwdgrp_buf,
+ max_lines * pwdgrp_buf_elem_size);
+ }
lptr = eptr;
- eptr = strchr (lptr, '\n');
- if (eptr)
+ if (!(this->*parse) ())
+ return NULL;
+ curr_lines++;
+ }
+ return eptr;
+}
+
+void
+cygheap_pwdgrp::init ()
+{
+ pwd_cache.cygserver.init_pwd ();
+ pwd_cache.file.init_pwd ();
+ pwd_cache.win.init_pwd ();
+ grp_cache.cygserver.init_grp ();
+ grp_cache.file.init_grp ();
+ grp_cache.win.init_grp ();
+ /* Default settings:
+
+ passwd: files db
+ group: files db
+ db_prefix: auto DISABLED
+ db_separator: + DISABLED
+ db_home: cygwin desc
+ db_shell: cygwin desc
+ db_gecos: cygwin desc
+ db_enum: cache builtin
+ */
+ pwd_src = (NSS_SRC_FILES | NSS_SRC_DB);
+ grp_src = (NSS_SRC_FILES | NSS_SRC_DB);
+ prefix = NSS_PFX_AUTO;
+ separator[0] = L'+';
+ enums = (ENUM_CACHE | ENUM_BUILTIN);
+ enum_tdoms = NULL;
+ caching = true; /* INTERNAL ONLY */
+}
+
+#define NSS_NCMP(s) (!strncmp(c, (s), sizeof(s)-1))
+#define NSS_CMP(s) (!strncmp(c, (s), sizeof(s)-1) \
+ && strchr (" \t", c[sizeof(s)-1]))
+
+/* The /etc/nsswitch.conf file is read exactly once by the root process of a
+ process tree. We can't afford methodical changes during the lifetime of a
+ process tree. */
+void
+cygheap_pwdgrp::nss_init_line (const char *line)
+{
+ const char *c = line + strspn (line, " \t");
+ char *comment = strchr (c, '#');
+ if (comment)
+ *comment = '\0';
+ switch (*c)
+ {
+ case 'p':
+ case 'g':
+ {
+ uint32_t *src = NULL;
+ if (NSS_NCMP ("passwd:"))
+ src = &pwd_src;
+ else if (NSS_NCMP ("group:"))
+ src = &grp_src;
+ c = strchr (c, ':') + 1;
+ if (src)
+ {
+ *src = 0;
+ while (*(c += strspn (c, " \t")))
+ {
+ if (NSS_CMP ("files"))
+ {
+ *src |= NSS_SRC_FILES;
+ c += 5;
+ }
+ else if (NSS_CMP ("db"))
+ {
+ *src |= NSS_SRC_DB;
+ c += 2;
+ }
+ else
+ {
+ c += strcspn (c, " \t");
+ debug_printf ("Invalid nsswitch.conf content: %s", line);
+ }
+ }
+ if (*src == 0)
+ *src = (NSS_SRC_FILES | NSS_SRC_DB);
+ }
+ }
+ break;
+ case 'd':
+ if (!NSS_NCMP ("db_"))
+ {
+ debug_printf ("Invalid nsswitch.conf content: %s", line);
+ break;
+ }
+ c += 3;
+#if 0 /* Disable setting prefix and separator from nsswitch.conf for now.
+ Remove if nobody complains too loudly. */
+ if (NSS_NCMP ("prefix:"))
{
- if (eptr > lptr && eptr[-1] == '\r')
- eptr[-1] = '\0';
+ c = strchr (c, ':') + 1;
+ c += strspn (c, " \t");
+ if (NSS_CMP ("auto"))
+ prefix = NSS_AUTO;
+ else if (NSS_CMP ("primary"))
+ prefix = NSS_PRIMARY;
+ else if (NSS_CMP ("always"))
+ prefix = NSS_ALWAYS;
else
- *eptr = '\0';
- eptr++;
+ debug_printf ("Invalid nsswitch.conf content: %s", line);
}
- if (curr_lines >= max_lines)
+ else if (NSS_NCMP ("separator:"))
{
- max_lines += 10;
- *pwdgrp_buf = realloc (*pwdgrp_buf, max_lines * pwdgrp_buf_elem_size);
+ c = strchr (c, ':') + 1;
+ c += strspn (c, " \t");
+ if ((unsigned char) *c <= 0x7f && *c != ':' && strchr (" \t", c[1]))
+ separator[0] = (unsigned char) *c;
+ else
+ debug_printf ("Invalid nsswitch.conf content: %s", line);
}
- if ((this->*parse) ())
- curr_lines++;
+ else
+#endif
+ if (NSS_NCMP ("enum:"))
+ {
+ tmp_pathbuf tp;
+ char *tdoms = tp.c_get ();
+ char *td = tdoms;
+ int new_enums = ENUM_NONE;
+
+ td[0] = '\0';
+ c = strchr (c, ':') + 1;
+ c += strspn (c, " \t");
+ while (!strchr (" \t", *c))
+ {
+ const char *e = c + strcspn (c, " \t");
+ if (NSS_CMP ("none"))
+ new_enums = ENUM_NONE;
+ else if (NSS_CMP ("builtin"))
+ new_enums |= ENUM_BUILTIN;
+ else if (NSS_CMP ("cache"))
+ new_enums |= ENUM_CACHE;
+ else if (NSS_CMP ("files"))
+ new_enums |= ENUM_FILES;
+ else if (NSS_CMP ("local"))
+ new_enums |= ENUM_LOCAL;
+ else if (NSS_CMP ("primary"))
+ new_enums |= ENUM_PRIMARY;
+ else if (NSS_CMP ("alltrusted"))
+ new_enums |= ENUM_TDOMS | ENUM_TDOMS_ALL;
+ else if (NSS_CMP ("all"))
+ new_enums |= ENUM_ALL;
+ else
+ {
+ td = stpcpy (stpncpy (td, c, e - c), " ");
+ new_enums |= ENUM_TDOMS;
+ }
+ c = e;
+ c += strspn (c, " \t");
+ }
+ if ((new_enums & (ENUM_TDOMS | ENUM_TDOMS_ALL)) == ENUM_TDOMS)
+ {
+ if (td > tdoms)
+ {
+ PWCHAR spc;
+ sys_mbstowcs_alloc (&enum_tdoms, HEAP_BUF, tdoms);
+ /* Convert string to REG_MULTI_SZ-style. */
+ while ((spc = wcsrchr (enum_tdoms, L' ')))
+ *spc = L'\0';
+ }
+ else
+ new_enums &= ~(ENUM_TDOMS | ENUM_TDOMS_ALL);
+ }
+ enums = new_enums;
+ }
+ else
+ {
+ nss_scheme_t *scheme = NULL;
+ if (NSS_NCMP ("home:"))
+ scheme = home_scheme;
+ else if (NSS_NCMP ("shell:"))
+ scheme = shell_scheme;
+ else if (NSS_NCMP ("gecos:"))
+ scheme = gecos_scheme;
+ if (scheme)
+ {
+ uint16_t idx = 0;
+
+ scheme[0].method = scheme[1].method = NSS_SCHEME_FALLBACK;
+ c = strchr (c, ':') + 1;
+ c += strspn (c, " \t");
+ while (*c && idx < NSS_SCHEME_MAX)
+ {
+ if (NSS_CMP ("windows"))
+ scheme[idx].method = NSS_SCHEME_WINDOWS;
+ else if (NSS_CMP ("cygwin"))
+ scheme[idx].method = NSS_SCHEME_CYGWIN;
+ else if (NSS_CMP ("unix"))
+ scheme[idx].method = NSS_SCHEME_UNIX;
+ else if (NSS_CMP ("desc"))
+ scheme[idx].method = NSS_SCHEME_DESC;
+ else if (NSS_NCMP ("/"))
+ {
+ const char *e = c + strcspn (c, " \t");
+ scheme[idx].method = NSS_SCHEME_PATH;
+ sys_mbstowcs_alloc (&scheme[idx].attrib, HEAP_STR,
+ c, e - c);
+ }
+ else if (NSS_NCMP ("@") && isalnum ((unsigned) *++c))
+ {
+ const char *e = c + strcspn (c, " \t");
+ scheme[idx].method = NSS_SCHEME_FREEATTR;
+ sys_mbstowcs_alloc (&scheme[idx].attrib, HEAP_STR,
+ c, e - c);
+ }
+ else
+ debug_printf ("Invalid nsswitch.conf content: %s", line);
+ c += strcspn (c, " \t");
+ c += strspn (c, " \t");
+ ++idx;
+ }
+ /* If nothing has been set, revert to default. */
+ if (scheme[0].method == NSS_SCHEME_FALLBACK)
+ {
+ scheme[0].method = NSS_SCHEME_CYGWIN;
+ scheme[1].method = NSS_SCHEME_DESC;
+ }
+ }
+ }
+ break;
+ case '\0':
+ break;
+ default:
+ debug_printf ("Invalid nsswitch.conf content: %s", line);
+ break;
}
- return eptr;
+}
+
+static char *
+fetch_windows_home (cyg_ldap *pldap, PUSER_INFO_3 ui, cygpsid &sid,
+ PCWSTR dnsdomain)
+{
+ PCWSTR home_from_db = NULL;
+ char *home = NULL;
+
+ if (pldap)
+ {
+ if (pldap->fetch_ad_account (sid, false, dnsdomain))
+ {
+#if 0
+ /* Disable preferring homeDrive for now. The drive letter may not
+ be available when it's needed. */
+ home_from_db = pldap->get_string_attribute (L"homeDrive");
+ if (!home_from_db || !*home_from_db)
+#endif
+ home_from_db = pldap->get_string_attribute (L"homeDirectory");
+ }
+ }
+ else if (ui)
+ {
+#if 0
+ /* Ditto. */
+ if (ui->usri3_home_dir_drive && *ui->usri3_home_dir_drive)
+ home_from_db = ui->usri3_home_dir_drive;
+ else
+#endif
+ if (ui->usri3_home_dir && *ui->usri3_home_dir)
+ home_from_db = ui->usri3_home_dir;
+ }
+ if (home_from_db && *home_from_db)
+ home = (char *) cygwin_create_path (CCP_WIN_W_TO_POSIX, home_from_db);
+ else
+ {
+ /* The db fields are empty, so we have to evaluate the local profile
+ path, which is the same thing as the default home directory on
+ Windows. So what we do here is to try to find out if the user
+ already has a profile on this machine.
+ Note that we don't try to generate the profile if it doesn't exist.
+ Think what would happen if we actually have the permissions to do
+ so and call getpwent... in a domain environment. The problem is,
+ of course, that we can't know the profile path, unless the OS
+ created it.
+ The only reason this could occur is if a user account, which never
+ logged on to the machine before, tries to logon via a Cygwin service
+ like sshd. */
+ WCHAR profile[MAX_PATH];
+ WCHAR sidstr[128];
+
+ if (get_user_profile_directory (sid.string (sidstr), profile, MAX_PATH))
+ home = (char *) cygwin_create_path (CCP_WIN_W_TO_POSIX, profile);
+ }
+ return home;
+}
+
+/* Local SAM accounts have only a handful attributes available to home users.
+ Therefore, allow to fetch additional passwd/group attributes from the
+ "Comment" field in XML short style. For symmetry, this is also allowed
+ from the equivalent "description" AD attribute. */
+static char *
+fetch_from_description (PCWSTR desc, PCWSTR search, size_t len)
+{
+ PWCHAR s, e;
+ char *ret = NULL;
+
+ if ((s = wcsstr (desc, L"<cygwin ")) && (e = wcsstr (s + 8, L"/>")))
+ {
+ s += 8;
+ while (s && s < e)
+ {
+ while (*s == L' ')
+ ++s;
+ if (!wcsncmp (s, search, len)) /* Found what we're searching? */
+ {
+ s += len;
+ if ((e = wcschr (s, L'"')))
+ {
+ sys_wcstombs_alloc (&ret, HEAP_NOTHEAP, s, e - s);
+ s = e + 1;
+ }
+ break;
+ }
+ else /* Skip the current foo="bar" string. */
+ if ((s = wcschr (s, L'"')) && (s = wcschr (s + 1, L'"')))
+ ++s;
+ }
+ }
+ return ret;
+}
+
+static char *
+fetch_from_path (cyg_ldap *pldap, PUSER_INFO_3 ui, cygpsid &sid, PCWSTR str,
+ PCWSTR dom, PCWSTR dnsdomain, PCWSTR name, bool full_qualified)
+{
+ tmp_pathbuf tp;
+ PWCHAR wpath = tp.w_get ();
+ PWCHAR w = wpath;
+ PWCHAR we = wpath + NT_MAX_PATH - 1;
+ char *home;
+ char *ret = NULL;
+
+ while (*str && w < we)
+ {
+ if (*str != L'%')
+ *w++ = *str++;
+ else
+ {
+ switch (*++str)
+ {
+ case L'u':
+ if (full_qualified)
+ {
+ w = wcpncpy (w, dom, we - w);
+ if (w < we)
+ *w++ = cygheap->pg.nss_separator ()[0];
+ }
+ w = wcpncpy (w, name, we - w);
+ break;
+ case L'U':
+ w = wcpncpy (w, name, we - w);
+ break;
+ case L'D':
+ w = wcpncpy (w, dom, we - w);
+ break;
+ case L'H':
+ home = fetch_windows_home (pldap, ui, sid, dnsdomain);
+ if (home)
+ {
+ /* Drop one leading slash to accommodate home being an
+ absolute path. We don't check for broken usage of
+ %H here, of course. */
+ if (w > wpath && w[-1] == L'/')
+ --w;
+ w += sys_mbstowcs (w, we - w, home) - 1;
+ free (home);
+ }
+ break;
+ case L'_':
+ *w++ = L' ';
+ break;
+ default:
+ *w++ = *str;
+ break;
+ }
+ ++str;
+ }
+ }
+ *w = L'\0';
+ sys_wcstombs_alloc (&ret, HEAP_NOTHEAP, wpath);
+ return ret;
+}
+
+char *
+cygheap_pwdgrp::get_home (cyg_ldap *pldap, cygpsid &sid, PCWSTR dom,
+ PCWSTR dnsdomain, PCWSTR name, bool full_qualified)
+{
+ PWCHAR val;
+ char *home = NULL;
+
+ for (uint16_t idx = 0; !home && idx < NSS_SCHEME_MAX; ++idx)
+ {
+ switch (home_scheme[idx].method)
+ {
+ case NSS_SCHEME_FALLBACK:
+ return NULL;
+ case NSS_SCHEME_WINDOWS:
+ if (pldap->fetch_ad_account (sid, false, dnsdomain))
+ home = fetch_windows_home (pldap, NULL, sid, dnsdomain);
+ break;
+ case NSS_SCHEME_CYGWIN:
+ if (pldap->fetch_ad_account (sid, false, dnsdomain))
+ {
+ val = pldap->get_string_attribute (L"cygwinHome");
+ if (val && *val)
+ sys_wcstombs_alloc (&home, HEAP_NOTHEAP, val);
+ }
+ break;
+ case NSS_SCHEME_UNIX:
+ if (pldap->fetch_ad_account (sid, false, dnsdomain))
+ {
+ val = pldap->get_string_attribute (L"unixHomeDirectory");
+ if (val && *val)
+ sys_wcstombs_alloc (&home, HEAP_NOTHEAP, val);
+ }
+ break;
+ case NSS_SCHEME_DESC:
+ if (pldap->fetch_ad_account (sid, false, dnsdomain))
+ {
+ val = pldap->get_string_attribute (L"description");
+ if (val && *val)
+ home = fetch_from_description (val, L"home=\"", 6);
+ }
+ break;
+ case NSS_SCHEME_PATH:
+ home = fetch_from_path (pldap, NULL, sid, home_scheme[idx].attrib,
+ dom, dnsdomain, name, full_qualified);
+ break;
+ case NSS_SCHEME_FREEATTR:
+ if (pldap->fetch_ad_account (sid, false, dnsdomain))
+ {
+ val = pldap->get_string_attribute (home_scheme[idx].attrib);
+ if (val && *val)
+ {
+ if (isdrive (val) || *val == '\\')
+ home = (char *)
+ cygwin_create_path (CCP_WIN_W_TO_POSIX, val);
+ else
+ sys_wcstombs_alloc (&home, HEAP_NOTHEAP, val);
+ }
+ }
+ break;
+ }
+ }
+ return home;
+}
+
+char *
+cygheap_pwdgrp::get_home (PUSER_INFO_3 ui, cygpsid &sid, PCWSTR dom,
+ PCWSTR name, bool full_qualified)
+{
+ char *home = NULL;
+
+ for (uint16_t idx = 0; !home && idx < NSS_SCHEME_MAX; ++idx)
+ {
+ switch (home_scheme[idx].method)
+ {
+ case NSS_SCHEME_FALLBACK:
+ return NULL;
+ case NSS_SCHEME_WINDOWS:
+ home = fetch_windows_home (NULL, ui, sid, NULL);
+ break;
+ case NSS_SCHEME_CYGWIN:
+ case NSS_SCHEME_UNIX:
+ case NSS_SCHEME_FREEATTR:
+ break;
+ case NSS_SCHEME_DESC:
+ home = fetch_from_description (ui->usri3_comment, L"home=\"", 6);
+ break;
+ case NSS_SCHEME_PATH:
+ home = fetch_from_path (NULL, ui, sid, home_scheme[idx].attrib,
+ dom, NULL, name, full_qualified);
+ break;
+ }
+ }
+ return home;
+}
+
+char *
+cygheap_pwdgrp::get_shell (cyg_ldap *pldap, cygpsid &sid, PCWSTR dom,
+ PCWSTR dnsdomain, PCWSTR name, bool full_qualified)
+{
+ PWCHAR val;
+ char *shell = NULL;
+
+ for (uint16_t idx = 0; !shell && idx < NSS_SCHEME_MAX; ++idx)
+ {
+ switch (shell_scheme[idx].method)
+ {
+ case NSS_SCHEME_FALLBACK:
+ return NULL;
+ case NSS_SCHEME_WINDOWS:
+ break;
+ case NSS_SCHEME_CYGWIN:
+ if (pldap->fetch_ad_account (sid, false, dnsdomain))
+ {
+ val = pldap->get_string_attribute (L"cygwinShell");
+ if (val && *val)
+ sys_wcstombs_alloc (&shell, HEAP_NOTHEAP, val);
+ }
+ break;
+ case NSS_SCHEME_UNIX:
+ if (pldap->fetch_ad_account (sid, false, dnsdomain))
+ {
+ val = pldap->get_string_attribute (L"loginShell");
+ if (val && *val)
+ sys_wcstombs_alloc (&shell, HEAP_NOTHEAP, val);
+ }
+ break;
+ case NSS_SCHEME_DESC:
+ if (pldap->fetch_ad_account (sid, false, dnsdomain))
+ {
+ val = pldap->get_string_attribute (L"description");
+ if (val && *val)
+ shell = fetch_from_description (val, L"shell=\"", 7);
+ }
+ break;
+ case NSS_SCHEME_PATH:
+ shell = fetch_from_path (pldap, NULL, sid, shell_scheme[idx].attrib,
+ dom, dnsdomain, name, full_qualified);
+ break;
+ case NSS_SCHEME_FREEATTR:
+ if (pldap->fetch_ad_account (sid, false, dnsdomain))
+ {
+ val = pldap->get_string_attribute (shell_scheme[idx].attrib);
+ if (val && *val)
+ {
+ if (isdrive (val) || *val == '\\')
+ shell = (char *)
+ cygwin_create_path (CCP_WIN_W_TO_POSIX, val);
+ else
+ sys_wcstombs_alloc (&shell, HEAP_NOTHEAP, val);
+ }
+ }
+ break;
+ }
+ }
+ return shell;
+}
+
+char *
+cygheap_pwdgrp::get_shell (PUSER_INFO_3 ui, cygpsid &sid, PCWSTR dom,
+ PCWSTR name, bool full_qualified)
+{
+ char *shell = NULL;
+
+ for (uint16_t idx = 0; !shell && idx < NSS_SCHEME_MAX; ++idx)
+ {
+ switch (shell_scheme[idx].method)
+ {
+ case NSS_SCHEME_FALLBACK:
+ return NULL;
+ case NSS_SCHEME_WINDOWS:
+ case NSS_SCHEME_CYGWIN:
+ case NSS_SCHEME_UNIX:
+ case NSS_SCHEME_FREEATTR:
+ break;
+ case NSS_SCHEME_DESC:
+ shell = fetch_from_description (ui->usri3_comment, L"shell=\"", 7);
+ break;
+ case NSS_SCHEME_PATH:
+ shell = fetch_from_path (NULL, ui, sid, shell_scheme[idx].attrib,
+ dom, NULL, name, full_qualified);
+ break;
+ }
+ }
+ return shell;
+}
+
+/* Helper function to replace colons with semicolons in pw_gecos field. */
+static inline void
+colon_to_semicolon (char *str)
+{
+ char *cp = str;
+ while ((cp = strchr (cp, L':')) != NULL)
+ *cp++ = L';';
+}
+
+char *
+cygheap_pwdgrp::get_gecos (cyg_ldap *pldap, cygpsid &sid, PCWSTR dom,
+ PCWSTR dnsdomain, PCWSTR name, bool full_qualified)
+{
+ PWCHAR val;
+ char *gecos = NULL;
+
+ for (uint16_t idx = 0; !gecos && idx < NSS_SCHEME_MAX; ++idx)
+ {
+ switch (gecos_scheme[idx].method)
+ {
+ case NSS_SCHEME_FALLBACK:
+ return NULL;
+ case NSS_SCHEME_WINDOWS:
+ if (pldap->fetch_ad_account (sid, false, dnsdomain))
+ {
+ val = pldap->get_string_attribute (L"displayName");
+ if (val && *val)
+ sys_wcstombs_alloc (&gecos, HEAP_NOTHEAP, val);
+ }
+ break;
+ case NSS_SCHEME_CYGWIN:
+ if (pldap->fetch_ad_account (sid, false, dnsdomain))
+ {
+ val = pldap->get_string_attribute (L"cygwinGecos");
+ if (val && *val)
+ sys_wcstombs_alloc (&gecos, HEAP_NOTHEAP, val);
+ }
+ break;
+ case NSS_SCHEME_UNIX:
+ if (pldap->fetch_ad_account (sid, false, dnsdomain))
+ {
+ val = pldap->get_string_attribute (L"gecos");
+ if (val && *val)
+ sys_wcstombs_alloc (&gecos, HEAP_NOTHEAP, val);
+ }
+ break;
+ case NSS_SCHEME_DESC:
+ if (pldap->fetch_ad_account (sid, false, dnsdomain))
+ {
+ val = pldap->get_string_attribute (L"description");
+ if (val && *val)
+ gecos = fetch_from_description (val, L"gecos=\"", 7);
+ }
+ break;
+ case NSS_SCHEME_PATH:
+ gecos = fetch_from_path (pldap, NULL, sid,
+ gecos_scheme[idx].attrib + 1,
+ dom, dnsdomain, name, full_qualified);
+ break;
+ case NSS_SCHEME_FREEATTR:
+ if (pldap->fetch_ad_account (sid, false, dnsdomain))
+ {
+ val = pldap->get_string_attribute (gecos_scheme[idx].attrib);
+ if (val && *val)
+ sys_wcstombs_alloc (&gecos, HEAP_NOTHEAP, val);
+ }
+ break;
+ }
+ }
+ if (gecos)
+ colon_to_semicolon (gecos);
+ return gecos;
+}
+
+char *
+cygheap_pwdgrp::get_gecos (PUSER_INFO_3 ui, cygpsid &sid, PCWSTR dom,
+ PCWSTR name, bool full_qualified)
+{
+ char *gecos = NULL;
+
+ for (uint16_t idx = 0; !gecos && idx < NSS_SCHEME_MAX; ++idx)
+ {
+ switch (gecos_scheme[idx].method)
+ {
+ case NSS_SCHEME_FALLBACK:
+ return NULL;
+ case NSS_SCHEME_WINDOWS:
+ if (ui->usri3_full_name && *ui->usri3_full_name)
+ sys_wcstombs_alloc (&gecos, HEAP_NOTHEAP, ui->usri3_full_name);
+ break;
+ case NSS_SCHEME_CYGWIN:
+ case NSS_SCHEME_UNIX:
+ case NSS_SCHEME_FREEATTR:
+ break;
+ case NSS_SCHEME_DESC:
+ gecos = fetch_from_description (ui->usri3_comment, L"gecos=\"", 7);
+ break;
+ case NSS_SCHEME_PATH:
+ gecos = fetch_from_path (NULL, ui, sid, gecos_scheme[idx].attrib + 1,
+ dom, NULL, name, full_qualified);
+ break;
+ }
+ }
+ if (gecos)
+ colon_to_semicolon (gecos);
+ return gecos;
}
void
-pwdgrp::load (const wchar_t *rel_path)
+cygheap_pwdgrp::_nss_init ()
{
- static const char failed[] = "failed";
- static const char succeeded[] = "succeeded";
- const char *res = failed;
- HANDLE fh = NULL;
+ UNICODE_STRING path;
+ OBJECT_ATTRIBUTES attr;
+ NT_readline rl;
+ tmp_pathbuf tp;
+ char *buf = tp.c_get ();
+
+ PCWSTR rel_path = L"\\etc\\nsswitch.conf";
+ path.Length = (wcslen (cygheap->installation_root) + wcslen (rel_path))
+ * sizeof (WCHAR);
+ path.MaximumLength = path.Length + sizeof (WCHAR);
+ path.Buffer = (PWCHAR) alloca (path.MaximumLength);
+ wcpcpy (wcpcpy (path.Buffer, cygheap->installation_root), rel_path);
+ InitializeObjectAttributes (&attr, &path, OBJ_CASE_INSENSITIVE,
+ NULL, NULL);
+ if (rl.init (&attr, buf, NT_MAX_PATH))
+ while ((buf = rl.gets ()))
+ nss_init_line (buf);
+ nss_inited = true;
+}
+/* Override the ParentIndex value of the PDS_DOMAIN_TRUSTSW entry with the
+ PosixOffset. */
+#define PosixOffset ParentIndex
+
+bool
+cygheap_domain_info::init ()
+{
+ HANDLE lsa;
NTSTATUS status;
- OBJECT_ATTRIBUTES attr;
- IO_STATUS_BLOCK io;
- FILE_STANDARD_INFORMATION fsi;
+ ULONG ret;
+ /* We *have* to copy the information. Apart from our wish to have the
+ stuff in the cygheap, even when not calling LsaFreeMemory on the result,
+ the data will be overwritten later. From what I gather, the information
+ is, in fact, stored on the stack. */
+ PPOLICY_DNS_DOMAIN_INFO pdom;
+ PPOLICY_ACCOUNT_DOMAIN_INFO adom;
+ PDS_DOMAIN_TRUSTSW td;
+ ULONG tdom_cnt;
+
+ if (adom_name)
+ return true;
+ lsa = lsa_open_policy (NULL, POLICY_VIEW_LOCAL_INFORMATION);
+ if (!lsa)
+ {
+ system_printf ("lsa_open_policy(NULL) failed");
+ return false;
+ }
+ /* Fetch primary domain information from local LSA. */
+ status = LsaQueryInformationPolicy (lsa, PolicyDnsDomainInformation,
+ (PVOID *) &pdom);
+ if (status != STATUS_SUCCESS)
+ {
+ system_printf ("LsaQueryInformationPolicy(Primary) %y", status);
+ return false;
+ }
+ /* Copy primary domain info to cygheap. */
+ pdom_name = cwcsdup (pdom->Name.Buffer);
+ pdom_dns_name = pdom->DnsDomainName.Length
+ ? cwcsdup (pdom->DnsDomainName.Buffer) : NULL;
+ pdom_sid = pdom->Sid;
+ LsaFreeMemory (pdom);
+ /* Fetch account domain information from local LSA. */
+ status = LsaQueryInformationPolicy (lsa, PolicyAccountDomainInformation,
+ (PVOID *) &adom);
+ if (status != STATUS_SUCCESS)
+ {
+ system_printf ("LsaQueryInformationPolicy(Account) %y", status);
+ return false;
+ }
+ /* Copy account domain info to cygheap. If we're running on a DC the account
+ domain is identical to the primary domain. This leads to confusion when
+ trying to compute the uid/gid values. Therefore we invalidate the account
+ domain name if we're running on a DC. */
+ adom_sid = adom->DomainSid;
+ adom_name = cwcsdup (pdom_sid == adom_sid ? L"@" : adom->DomainName.Buffer);
+ LsaFreeMemory (adom);
+ lsa_close_policy (lsa);
+ if (cygheap->dom.member_machine ())
+ {
+ ret = DsEnumerateDomainTrustsW (NULL, DS_DOMAIN_DIRECT_INBOUND
+ | DS_DOMAIN_DIRECT_OUTBOUND
+ | DS_DOMAIN_IN_FOREST,
+ &td, &tdom_cnt);
+ if (ret != ERROR_SUCCESS)
+ {
+ SetLastError (ret);
+ debug_printf ("DsEnumerateDomainTrusts: %E");
+ return true;
+ }
+ if (tdom_cnt == 0)
+ {
+ return true;
+ }
+ /* Copy trusted domain info to cygheap, setting PosixOffset on the fly. */
+ tdom = (PDS_DOMAIN_TRUSTSW)
+ cmalloc_abort (HEAP_BUF, tdom_cnt * sizeof (DS_DOMAIN_TRUSTSW));
+ memcpy (tdom, td, tdom_cnt * sizeof (DS_DOMAIN_TRUSTSW));
+ for (ULONG idx = 0; idx < tdom_cnt; ++idx)
+ {
+ /* Copy... */
+ tdom[idx].NetbiosDomainName = cwcsdup (td[idx].NetbiosDomainName);
+ /* DnsDomainName as well as DomainSid can be NULL. The reason is
+ usually a domain of type TRUST_TYPE_DOWNLEVEL. This can be an
+ old pre-AD domain, or a Netware domain, etc. If DnsDomainName
+ is NULL, just set it to NetbiosDomainName. This simplifies
+ subsequent code which doesn't have to check for a NULL pointer. */
+ tdom[idx].DnsDomainName = td[idx].DnsDomainName
+ ? cwcsdup (td[idx].DnsDomainName)
+ : tdom[idx].NetbiosDomainName;
+ if (td[idx].DomainSid)
+ {
+ ULONG len = RtlLengthSid (td[idx].DomainSid);
+ tdom[idx].DomainSid = cmalloc_abort(HEAP_BUF, len);
+ RtlCopySid (len, tdom[idx].DomainSid, td[idx].DomainSid);
+ }
+ /* ...and set PosixOffset to 0. This */
+ tdom[idx].PosixOffset = 0;
+ }
+ NetApiBufferFree (td);
+ tdom_count = tdom_cnt;
+ }
+ /* If we have Microsoft Client for NFS installed, we make use of a name
+ mapping server. This can be either Active Directory to map uids/gids
+ directly to Windows SIDs, or an AD LDS or other RFC 2307 compatible
+ identity store. The name of the mapping domain can be fetched from the
+ registry key created by the NFS client installation and entered by the
+ user via nfsadmin or the "Services For NFS" MMC snap-in.
+
+ Reference:
+ http://blogs.technet.com/b/filecab/archive/2012/10/09/nfs-identity-mapping-in-windows-server-2012.aspx
+ Note that we neither support UNMP nor local passwd/group file mapping,
+ nor UUUA.
+
+ This function returns the mapping server from the aforementioned registry
+ key, or, if none is configured, NULL, which will be resolved to the
+ primary domain of the machine by the ldap_init function.
+
+ The latter is useful to get an RFC 2307 mapping for Samba UNIX accounts,
+ even if no NFS name mapping is configured on the machine. Fortunately,
+ the posixAccount and posixGroup schemas are already available in the
+ Active Directory default setup since Windows Server 2003 R2. */
+ reg_key reg (HKEY_LOCAL_MACHINE, KEY_READ | KEY_WOW64_64KEY,
+ L"SOFTWARE", L"Microsoft", L"ServicesForNFS", NULL);
+ if (!reg.error ())
+ {
+ DWORD rfc2307 = reg.get_dword (L"Rfc2307", 0);
+ if (rfc2307)
+ {
+ rfc2307_domain_buf = (PWCHAR) ccalloc_abort (HEAP_STR, 257,
+ sizeof (WCHAR));
+ reg.get_string (L"Rfc2307Domain", rfc2307_domain_buf, 257, L"");
+ if (!rfc2307_domain_buf[0])
+ {
+ cfree (rfc2307_domain_buf);
+ rfc2307_domain_buf = NULL;
+ }
+ }
+ }
+ return true;
+}
+
+PDS_DOMAIN_TRUSTSW
+cygheap_domain_info::add_domain (PCWSTR domain, PSID sid)
+{
+ PDS_DOMAIN_TRUSTSW new_tdom;
+ cygsid tsid (sid);
+
+ new_tdom = (PDS_DOMAIN_TRUSTSW) crealloc (tdom, (tdom_count + 1)
+ * sizeof (DS_DOMAIN_TRUSTSW));
+ if (!new_tdom)
+ return NULL;
+
+ tdom = new_tdom;
+ new_tdom = &tdom[tdom_count];
+ new_tdom->DnsDomainName = new_tdom->NetbiosDomainName = cwcsdup (domain);
+ --*RtlSubAuthorityCountSid (tsid);
+ ULONG len = RtlLengthSid (tsid);
+ new_tdom->DomainSid = cmalloc_abort(HEAP_BUF, len);
+ RtlCopySid (len, new_tdom->DomainSid, tsid);
+ new_tdom->PosixOffset = 0;
+ ++tdom_count;
+ return new_tdom;
+}
- if (buf)
- free (buf);
- buf = NULL;
- curr_lines = 0;
+/* Per session, so it changes potentially when switching the user context. */
+static cygsid logon_sid ("");
- if (!path &&
- !(path = (PWCHAR) malloc ((wcslen (cygheap->installation_root)
- + wcslen (rel_path) + 1) * sizeof (WCHAR))))
+static void
+get_logon_sid ()
+{
+ if (PSID (logon_sid) == NO_SID)
{
- paranoid_printf ("malloc (%W) failed", rel_path);
- goto out;
+ NTSTATUS status;
+ ULONG size;
+ tmp_pathbuf tp;
+ PTOKEN_GROUPS groups = (PTOKEN_GROUPS) tp.w_get ();
+
+ status = NtQueryInformationToken (hProcToken, TokenGroups, groups,
+ 2 * NT_MAX_PATH, &size);
+ if (!NT_SUCCESS (status))
+ debug_printf ("NtQueryInformationToken (TokenGroups) %y", status);
+ else
+ {
+ for (DWORD pg = 0; pg < groups->GroupCount; ++pg)
+ if (groups->Groups[pg].Attributes & SE_GROUP_LOGON_ID)
+ {
+ logon_sid = groups->Groups[pg].Sid;
+ break;
+ }
+ }
}
- wcpcpy (wcpcpy (path, cygheap->installation_root), rel_path);
- RtlInitUnicodeString (&upath, path);
+}
- InitializeObjectAttributes (&attr, &upath, OBJ_CASE_INSENSITIVE, NULL, NULL);
- etc_ix = etc::init (etc_ix, &attr);
+void *
+pwdgrp::add_account_post_fetch (char *line, bool lock)
+{
+ void *ret = NULL;
+
+ if (line)
+ {
+ if (lock)
+ pglock.init ("pglock")->acquire ();
+ if (add_line (line))
+ ret = ((char *) pwdgrp_buf) + (curr_lines - 1) * pwdgrp_buf_elem_size;
+ if (lock)
+ pglock.release ();
+ }
+ return ret;
+}
- paranoid_printf ("%S", &upath);
+void *
+pwdgrp::add_account_from_file (cygpsid &sid)
+{
+ if (!path.MaximumLength)
+ return NULL;
+ fetch_user_arg_t arg;
+ arg.type = SID_arg;
+ arg.sid = &sid;
+ char *line = fetch_account_from_file (arg);
+ return (struct passwd *) add_account_post_fetch (line, true);
+}
- status = NtOpenFile (&fh, SYNCHRONIZE | FILE_READ_DATA, &attr, &io,
- FILE_SHARE_VALID_FLAGS,
- FILE_SYNCHRONOUS_IO_NONALERT
- | FILE_OPEN_FOR_BACKUP_INTENT);
- if (!NT_SUCCESS (status))
+void *
+pwdgrp::add_account_from_file (const char *name)
+{
+ if (!path.MaximumLength)
+ return NULL;
+ fetch_user_arg_t arg;
+ arg.type = NAME_arg;
+ arg.name = name;
+ char *line = fetch_account_from_file (arg);
+ return (struct passwd *) add_account_post_fetch (line, true);
+}
+
+void *
+pwdgrp::add_account_from_file (uint32_t id)
+{
+ if (!path.MaximumLength)
+ return NULL;
+ fetch_user_arg_t arg;
+ arg.type = ID_arg;
+ arg.id = id;
+ char *line = fetch_account_from_file (arg);
+ return (struct passwd *) add_account_post_fetch (line, true);
+}
+
+void *
+pwdgrp::add_account_from_windows (cygpsid &sid, cyg_ldap *pldap)
+{
+ fetch_user_arg_t arg;
+ arg.type = SID_arg;
+ arg.sid = &sid;
+ char *line = fetch_account_from_windows (arg, pldap);
+ if (!line)
+ return NULL;
+ return add_account_post_fetch (line, true);
+}
+
+void *
+pwdgrp::add_account_from_windows (const char *name, cyg_ldap *pldap)
+{
+ fetch_user_arg_t arg;
+ arg.type = NAME_arg;
+ arg.name = name;
+ char *line = fetch_account_from_windows (arg, pldap);
+ if (!line)
+ return NULL;
+ return add_account_post_fetch (line, true);
+}
+
+void *
+pwdgrp::add_account_from_windows (uint32_t id, cyg_ldap *pldap)
+{
+ fetch_user_arg_t arg;
+ arg.type = ID_arg;
+ arg.id = id;
+ char *line = fetch_account_from_windows (arg, pldap);
+ if (!line)
+ return NULL;
+ return add_account_post_fetch (line, true);
+}
+
+/* Called from internal_getgrfull, in turn called from internal_getgroups. */
+struct group *
+pwdgrp::add_group_from_windows (fetch_acc_t &full_acc, cyg_ldap *pldap)
+{
+ fetch_user_arg_t arg;
+ arg.type = FULL_acc_arg;
+ arg.full_acc = &full_acc;
+ char *line = fetch_account_from_windows (arg, pldap);
+ if (!line)
+ return NULL;
+ return (struct group *) add_account_post_fetch (line, true);
+}
+
+/* Check if file exists and if it has been written to since last checked.
+ If file has been changed, invalidate the current cache.
+
+ If the file doesn't exist when this function is called the first time,
+ by the first Cygwin process in a process tree, the file will never be
+ visited again by any process in this process tree. This is important,
+ because we cannot allow a change of UID/GID values for the lifetime
+ of a process tree.
+
+ If the file gets deleted or unreadable, the file cache will stay in
+ place, but we won't try to read new accounts from the file.
+
+ The return code indicates to the calling function if the file exists. */
+bool
+pwdgrp::check_file ()
+{
+ FILE_BASIC_INFORMATION fbi;
+ NTSTATUS status;
+
+ if (!path.Buffer)
{
- paranoid_printf ("NtOpenFile(%S) failed, status %y", &upath, status);
- goto out;
+ PCWSTR rel_path = is_group () ? L"\\etc\\group" : L"\\etc\\passwd";
+ path.Length = (wcslen (cygheap->installation_root) + wcslen (rel_path))
+ * sizeof (WCHAR);
+ path.MaximumLength = path.Length + sizeof (WCHAR);
+ path.Buffer = (PWCHAR) cmalloc_abort (HEAP_BUF, path.MaximumLength);
+ wcpcpy (wcpcpy (path.Buffer, cygheap->installation_root), rel_path);
+ InitializeObjectAttributes (&attr, &path, OBJ_CASE_INSENSITIVE,
+ NULL, NULL);
}
- status = NtQueryInformationFile (fh, &io, &fsi, sizeof fsi,
- FileStandardInformation);
+ else if (path.MaximumLength == 0) /* Indicates that the file doesn't exist. */
+ return false;
+ status = NtQueryAttributesFile (&attr, &fbi);
if (!NT_SUCCESS (status))
{
- paranoid_printf ("NtQueryInformationFile(%S) failed, status %y",
- &upath, status);
- goto out;
+ if (last_modified.QuadPart)
+ last_modified.QuadPart = 0LL;
+ else
+ path.MaximumLength = 0;
+ return false;
}
- /* FIXME: Should we test for HighPart set? If so, the
- passwd or group file is way beyond what we can handle. */
- /* FIXME 2: It's still ugly that we keep the file in memory.
- Big organizations have naturally large passwd files. */
- buf = (char *) malloc (fsi.EndOfFile.LowPart + 1);
- if (!buf)
+ if (fbi.LastWriteTime.QuadPart > last_modified.QuadPart)
{
- paranoid_printf ("malloc (%u) failed", fsi.EndOfFile.LowPart);
- goto out;
+ last_modified.QuadPart = fbi.LastWriteTime.QuadPart;
+ if (curr_lines > 0)
+ {
+ pglock.init ("pglock")->acquire ();
+ int curr = curr_lines;
+ curr_lines = 0;
+ for (int i = 0; i < curr; ++i)
+ cfree (is_group () ? this->group ()[i].g.gr_name
+ : this->passwd ()[i].p.pw_name);
+ pglock.release ();
+ }
}
- status = NtReadFile (fh, NULL, NULL, NULL, &io, buf, fsi.EndOfFile.LowPart,
- NULL, NULL);
- if (!NT_SUCCESS (status))
+ return true;
+}
+
+char *
+pwdgrp::fetch_account_from_line (fetch_user_arg_t &arg, const char *line)
+{
+ char *p, *e;
+
+ switch (arg.type)
+ {
+ case SID_arg:
+ /* Ignore fields, just scan for SID string. */
+ if (!(p = strstr (line, arg.name)) || p[arg.len] != pwd_sep)
+ return NULL;
+ break;
+ case NAME_arg:
+ /* First field is always name. */
+ if (!strncasematch (line, arg.name, arg.len) || line[arg.len] != pwd_sep)
+ return NULL;
+ break;
+ case ID_arg:
+ /* Skip to third field. */
+ if (!(p = strchr (line, pwd_sep)) || !(p = strchr (p + 1, pwd_sep)))
+ return NULL;
+ if (strtoul (p + 1, &e, 10) != arg.id || !e || *e != pwd_sep)
+ return NULL;
+ break;
+ default:
+ return NULL;
+ }
+ return cstrdup (line);
+}
+
+char *
+pwdgrp::fetch_account_from_file (fetch_user_arg_t &arg)
+{
+ NT_readline rl;
+ tmp_pathbuf tp;
+ char *buf = tp.c_get ();
+ char str[128];
+ char *ret = NULL;
+
+ /* Create search string. */
+ switch (arg.type)
+ {
+ case SID_arg:
+ /* Override SID with SID string. */
+ arg.sid->string (str);
+ arg.name = str;
+ /*FALLTHRU*/
+ case NAME_arg:
+ arg.len = strlen (arg.name);
+ break;
+ case ID_arg:
+ break;
+ default:
+ return NULL;
+ }
+ if (rl.init (&attr, buf, NT_MAX_PATH))
+ while ((buf = rl.gets ()))
+ if ((ret = fetch_account_from_line (arg, buf)))
+ return ret;
+ return NULL;
+}
+
+static ULONG
+fetch_posix_offset (PDS_DOMAIN_TRUSTSW td, cyg_ldap *cldap)
+{
+ uint32_t id_val = UINT32_MAX;
+
+ if (!td->PosixOffset && !(td->Flags & DS_DOMAIN_PRIMARY) && td->DomainSid)
+ {
+ if (cldap->open (NULL) == NO_ERROR)
+ id_val = cldap->fetch_posix_offset_for_domain (td->DnsDomainName);
+ if (id_val < PRIMARY_POSIX_OFFSET)
+ {
+ /* If the offset is less than the primay domain offset, we're bound
+ to suffer collisions with system and local accounts. Move offset
+ to a fixed replacement fake offset. This may result in collisions
+ between other domains all of which were moved to this replacement
+ offset, but we can't fix all problems caused by careless admins. */
+ id_val = UNUSABLE_POSIX_OFFSET;
+ }
+ else if (id_val == UINT32_MAX)
+ {
+ /* We're probably running under a local account, so we're not allowed
+ to fetch any information from AD beyond the most obvious. Fake a
+ reasonable posix offset as above and hope for the best. */
+ id_val = NOACCESS_POSIX_OFFSET;
+ }
+ td->PosixOffset = id_val;
+ }
+ return td->PosixOffset;
+}
+
+/* CV 2014-05-08: USER_INFO_24 is not yet defined in Mingw64, but will be in
+ the next release. For the time being, define the structure here with
+ another name which won't collide with the upcoming correct definition
+ in lmaccess.h. */
+struct cyg_USER_INFO_24
+{
+ BOOL usri24_internet_identity;
+ DWORD usri24_flags;
+ LPWSTR usri24_internet_provider_name;
+ LPWSTR usri24_internet_principal_name;
+ PSID usri24_user_sid;
+};
+
+char *
+pwdgrp::fetch_account_from_windows (fetch_user_arg_t &arg, cyg_ldap *pldap)
+{
+ /* Used in LookupAccount calls. */
+ WCHAR namebuf[UNLEN + 1], *name = namebuf;
+ WCHAR dom[DNLEN + 1] = L"";
+ cygsid csid;
+ DWORD nlen = UNLEN + 1;
+ DWORD dlen = DNLEN + 1;
+ DWORD slen = SECURITY_MAX_SID_SIZE;
+ cygpsid sid (NO_SID);
+ SID_NAME_USE acc_type;
+ BOOL ret = false;
+ /* Cygwin user name style. */
+ bool fully_qualified_name = false;
+ /* Computed stuff. */
+ uid_t uid = ILLEGAL_UID;
+ gid_t gid = ILLEGAL_GID;
+ bool is_domain_account = true;
+ PCWSTR domain = NULL;
+ bool is_current_user = false;
+ char *shell = NULL;
+ char *home = NULL;
+ char *gecos = NULL;
+ /* Temporary stuff. */
+ PWCHAR p;
+ WCHAR sidstr[128];
+ ULONG posix_offset = 0;
+ uint32_t id_val;
+ cyg_ldap loc_ldap;
+ cyg_ldap *cldap = pldap ?: &loc_ldap;
+
+ /* Initialize */
+ if (!cygheap->dom.init ())
+ return NULL;
+
+ switch (arg.type)
+ {
+ case FULL_acc_arg:
+ {
+ sid = arg.full_acc->sid;
+ *wcpncpy (name, arg.full_acc->name->Buffer,
+ arg.full_acc->name->Length / sizeof (WCHAR)) = L'\0';
+ *wcpncpy (dom, arg.full_acc->dom->Buffer,
+ arg.full_acc->dom->Length / sizeof (WCHAR)) = L'\0';
+ acc_type = arg.full_acc->acc_type;
+ ret = acc_type != SidTypeUnknown;
+ }
+ break;
+ case SID_arg:
+ sid = *arg.sid;
+ ret = LookupAccountSidW (NULL, sid, name, &nlen, dom, &dlen, &acc_type);
+ if (!ret
+ && cygheap->dom.member_machine ()
+ && sid_id_auth (sid) == 5 /* SECURITY_NT_AUTHORITY */
+ && sid_sub_auth (sid, 0) == SECURITY_BUILTIN_DOMAIN_RID)
+ {
+ /* LookupAccountSid called on a non-DC cannot resolve aliases which
+ are not defined in the local SAM. If we encounter an alias which
+ can't be resolved, and if we're a domain member machine, ask a DC.
+ Do *not* use LookupAccountSidW. It can take ages when called on a
+ DC for some weird reason. Use LDAP instead. */
+ PWCHAR val;
+
+ if (cldap->fetch_ad_account (sid, true)
+ && (val = cldap->get_group_name ()))
+ {
+ wcpcpy (name, val);
+ wcpcpy (dom, L"BUILTIN");
+ acc_type = SidTypeAlias;
+ ret = true;
+ }
+ }
+ if (!ret)
+ debug_printf ("LookupAccountSid(%W), %E", sid.string (sidstr));
+ break;
+ case NAME_arg:
+ bool fq_name;
+
+ fq_name = false;
+ /* Copy over to wchar for search. */
+ sys_mbstowcs (name, UNLEN + 1, arg.name);
+ /* If the incoming name has a backslash or at sign, and neither backslash
+ nor at are the domain separator chars, the name is invalid. */
+ if ((p = wcspbrk (name, L"\\@")) && *p != cygheap->pg.nss_separator ()[0])
+ {
+ debug_printf ("Invalid account name <%s> (backslash/at)", arg.name);
+ return NULL;
+ }
+ /* Replace domain separator char with backslash and make sure p is NULL
+ or points to the backslash. */
+ if ((p = wcschr (name, cygheap->pg.nss_separator ()[0])))
+ {
+ fq_name = true;
+ *p = L'\\';
+ }
+ sid = csid;
+ ret = LookupAccountNameW (NULL, name, sid, &slen, dom, &dlen, &acc_type);
+ /* If this is a name-only S-1-5-21 account *and* it's a machine account
+ on a domain member machine, then we found the wrong one. Another
+ weird, but perfectly valid case is, if the group name is identical
+ to the domain name. Try again with domain name prepended. */
+ if (ret
+ && !fq_name
+ && sid_id_auth (sid) == 5 /* SECURITY_NT_AUTHORITY */
+ && sid_sub_auth (sid, 0) == SECURITY_NT_NON_UNIQUE
+ && cygheap->dom.member_machine ()
+ && (wcscasecmp (dom, cygheap->dom.account_flat_name ()) == 0
+ || acc_type == SidTypeDomain))
+ {
+ p = wcpcpy (name, cygheap->dom.primary_flat_name ());
+ *p = L'\\';
+ sys_mbstowcs (p + 1, UNLEN + 1, arg.name);
+ slen = SECURITY_MAX_SID_SIZE;
+ dlen = DNLEN + 1;
+ sid = csid;
+ ret = LookupAccountNameW (NULL, name, sid, &slen, dom, &dlen,
+ &acc_type);
+ }
+ if (!ret)
+ {
+ debug_printf ("LookupAccountNameW (%W), %E", name);
+ return NULL;
+ }
+ /* We can skip the backslash in the rest of this function. */
+ if (p)
+ name = p + 1;
+ /* Last but not least, some validity checks on the name style. */
+ if (!fq_name)
+ {
+ /* name_only only if db_prefix is auto. */
+ if (!cygheap->pg.nss_prefix_auto ())
+ {
+ debug_printf ("Invalid account name <%s> (name only/"
+ "db_prefix not auto)", arg.name);
+ return NULL;
+ }
+ /* name_only account is either builtin or primary domain, or
+ account domain on non-domain machines. */
+ if (sid_id_auth (sid) == 5 /* SECURITY_NT_AUTHORITY */
+ && sid_sub_auth (sid, 0) == SECURITY_NT_NON_UNIQUE)
+ {
+ if (cygheap->dom.member_machine ())
+ {
+ if (wcscasecmp (dom, cygheap->dom.primary_flat_name ()) != 0)
+ {
+ debug_printf ("Invalid account name <%s> (name only/"
+ "non primary on domain machine)", arg.name);
+ return NULL;
+ }
+ }
+ else if (wcscasecmp (dom, cygheap->dom.account_flat_name ()) != 0)
+ {
+ debug_printf ("Invalid account name <%s> (name only/"
+ "non machine on non-domain machine)", arg.name);
+ return NULL;
+ }
+ }
+ }
+ else
+ {
+ /* All is well if db_prefix is always. */
+ if (cygheap->pg.nss_prefix_always ())
+ break;
+ /* Otherwise, no fully_qualified for builtin accounts, except for
+ NT SERVICE, for which we require the prefix. Note that there's
+ no equivalent test in the `if (!fq_name)' branch above, because
+ LookupAccountName never returns NT SERVICE accounts if they are
+ not prependend with the domain anyway. */
+ if (sid_id_auth (sid) != 5 /* SECURITY_NT_AUTHORITY */
+ || (sid_sub_auth (sid, 0) != SECURITY_NT_NON_UNIQUE
+ && sid_sub_auth (sid, 0) != SECURITY_SERVICE_ID_BASE_RID))
+ {
+ debug_printf ("Invalid account name <%s> (fully qualified/"
+ "not NON_UNIQUE or NT_SERVICE)", arg.name);
+ return NULL;
+ }
+ /* All is well if db_prefix is primary. */
+ if (cygheap->pg.nss_prefix_primary ())
+ break;
+ /* Domain member and domain == primary domain? */
+ if (cygheap->dom.member_machine ())
+ {
+ if (!wcscasecmp (dom, cygheap->dom.primary_flat_name ()))
+ {
+ debug_printf ("Invalid account name <%s> (fully qualified/"
+ "primary domain account)", arg.name);
+ return NULL;
+ }
+ }
+ /* Not domain member and domain == account domain? */
+ else if (!wcscasecmp (dom, cygheap->dom.account_flat_name ()))
+ {
+ debug_printf ("Invalid account name <%s> (fully qualified/"
+ "local account)", arg.name);
+ return NULL;
+ }
+ }
+ break;
+ case ID_arg:
+ /* Construct SID from ID using the SFU rules, just like the code below
+ goes the opposite route. */
+#ifndef INTERIX_COMPATIBLE
+ /* Except for Builtin and Alias groups in the SECURITY_NT_AUTHORITY.
+ We create uid/gid values compatible with the old values generated
+ by mkpasswd/mkgroup. */
+ if (arg.id < 0x200)
+ csid.create (5, 1, arg.id & 0x1ff);
+ else if (arg.id <= 0x3e7)
+ csid.create (5, 2, 32, arg.id & 0x3ff);
+ else if (arg.id == 0x3e8) /* Special case "Other Organization" */
+ csid.create (5, 1, 1000);
+ else
+#endif
+ if (arg.id == 0xffe)
+ {
+ /* OtherSession != Logon SID. */
+ get_logon_sid ();
+ /* LookupAccountSidW will fail. */
+ sid = csid = logon_sid;
+ sid_sub_auth_rid (sid) = 0;
+ break;
+ }
+ else if (arg.id == 0xfff)
+ {
+ /* CurrentSession == Logon SID. */
+ get_logon_sid ();
+ /* LookupAccountSidW will fail. */
+ sid = logon_sid;
+ break;
+ }
+ else if (arg.id < 0x10000)
+ {
+ /* Nothing. */
+ debug_printf ("Invalid POSIX id %u", arg.id);
+ return NULL;
+ }
+ else if (arg.id < 0x20000)
+ {
+ /* Well-Known Group */
+ arg.id -= 0x10000;
+ /* SECURITY_APP_PACKAGE_AUTHORITY */
+ if (arg.id >= 0xf20 && arg.id <= 0xf3f)
+ csid.create (15, 2, (arg.id >> 4) & 0xf, arg.id & 0xf);
+ else
+ csid.create (arg.id >> 8, 1, arg.id & 0xff);
+ }
+ else if (arg.id >= 0x30000 && arg.id < 0x40000)
+ {
+ /* Account domain user or group. */
+ csid = cygheap->dom.account_sid ();
+ csid.append (arg.id & 0xffff);
+ }
+ else if (arg.id < 0x60000)
+ {
+ /* Builtin Alias */
+ csid.create (5, 2, arg.id >> 12, arg.id & 0xffff);
+ }
+ else if (arg.id < 0x70000)
+ {
+ /* Mandatory Label. */
+ csid.create (16, 1, arg.id & 0xffff);
+ }
+ else if (arg.id < 0x80000)
+ {
+ /* Identity assertion SIDs. */
+ csid.create (18, 1, arg.id & 0xffff);
+ }
+ else if (arg.id < PRIMARY_POSIX_OFFSET)
+ {
+ /* Nothing. */
+ debug_printf ("Invalid POSIX id %u", arg.id);
+ return NULL;
+ }
+ else if (arg.id == ILLEGAL_UID)
+ {
+ /* Just some fake. */
+ sid = csid.create (99, 1, 0);
+ break;
+ }
+ else if (arg.id >= UNIX_POSIX_OFFSET)
+ {
+ /* UNIX (unknown NFS or Samba) user account. */
+ csid.create (22, 2, is_group () ? 2 : 1, arg.id & UNIX_POSIX_MASK);
+ /* LookupAccountSidW will fail. */
+ sid = csid;
+ break;
+ }
+ else
+ {
+ /* Some trusted domain? */
+ PDS_DOMAIN_TRUSTSW td = NULL, this_td = NULL;
+
+ for (ULONG idx = 0; (td = cygheap->dom.trusted_domain (idx)); ++idx)
+ {
+ fetch_posix_offset (td, &loc_ldap);
+ if (td->PosixOffset > posix_offset && td->PosixOffset <= arg.id)
+ posix_offset = (this_td = td)->PosixOffset;
+ }
+ if (this_td)
+ {
+ csid = this_td->DomainSid;
+ csid.append (arg.id - posix_offset);
+ }
+ else
+ {
+ /* Primary domain */
+ csid = cygheap->dom.primary_sid ();
+ csid.append (arg.id - PRIMARY_POSIX_OFFSET);
+ }
+ posix_offset = 0;
+ }
+ sid = csid;
+ ret = LookupAccountSidW (NULL, sid, name, &nlen, dom, &dlen, &acc_type);
+ if (!ret)
+ {
+ debug_printf ("LookupAccountSidW (%W), %E", sid.string (sidstr));
+ return NULL;
+ }
+ break;
+ }
+ if (ret)
+ {
+ /* Builtin account? SYSTEM, for instance, is returned as SidTypeUser,
+ if a process is running as LocalSystem service.
+ Microsoft Account? These show up in the user's group list, using the
+ undocumented security authority 11. Even though this is officially a
+ user account, it only matters as part of the group list, so we convert
+ it to a well-known group here. */
+ if (acc_type == SidTypeUser
+ && (sid_sub_auth_count (sid) <= 3 || sid_id_auth (sid) == 11))
+ acc_type = SidTypeWellKnownGroup;
+ switch (acc_type)
+ {
+ case SidTypeUser:
+ if (is_group ())
+ {
+ /* Don't allow users as group. While this is technically
+ possible, it doesn't make sense in a POSIX scenario.
+
+ And then there are the so-called Microsoft Accounts. The
+ special SID with security authority 11 is converted to a
+ well known group above, but additionally, when logging in
+ with such an account, the user's primary group SID is the
+ user's SID. Those we let pass, but no others. */
+ bool its_ok = false;
+ if (wincap.has_microsoft_accounts ())
+ {
+ struct cyg_USER_INFO_24 *ui24;
+ if (NetUserGetInfo (NULL, name, 24, (PBYTE *) &ui24)
+ == NERR_Success)
+ {
+ if (ui24->usri24_internet_identity)
+ its_ok = true;
+ NetApiBufferFree (ui24);
+ }
+ }
+ if (!its_ok)
+ return NULL;
+ }
+ /*FALLTHRU*/
+ case SidTypeGroup:
+ case SidTypeAlias:
+ /* Predefined alias? */
+ if (acc_type == SidTypeAlias
+ && sid_sub_auth (sid, 0) != SECURITY_NT_NON_UNIQUE)
+ {
+#ifdef INTERIX_COMPATIBLE
+ posix_offset = 0x30000;
+ uid = 0x1000 * sid_sub_auth (sid, 0)
+ + (sid_sub_auth_rid (sid) & 0xffff);
+#else
+ posix_offset = 0;
+#endif
+ fully_qualified_name = cygheap->pg.nss_prefix_always ();
+ is_domain_account = false;
+ }
+ /* Account domain account? */
+ else if (!wcscasecmp (dom, cygheap->dom.account_flat_name ()))
+ {
+ posix_offset = 0x30000;
+ if (cygheap->dom.member_machine ()
+ || !cygheap->pg.nss_prefix_auto ())
+ fully_qualified_name = true;
+ is_domain_account = false;
+ }
+ /* Domain member machine? */
+ else if (cygheap->dom.member_machine ())
+ {
+ /* Primary domain account? */
+ if (!wcscasecmp (dom, cygheap->dom.primary_flat_name ()))
+ {
+ posix_offset = PRIMARY_POSIX_OFFSET;
+ /* In theory domain should have been set to
+ cygheap->dom.primary_dns_name (), but it turns out that
+ not setting the domain here has advantages. We open the
+ ldap connection to NULL (== some DC of our primary domain)
+ anyway. So the domain is only used later on. So, don't
+ set domain here to non-NULL, unless you're sure you have
+ also changed subsequent assumptions that domain is NULL
+ if it's a primary domain account. */
+ if (!cygheap->pg.nss_prefix_auto ())
+ fully_qualified_name = true;
+ }
+ else
+ {
+ /* No, fetch POSIX offset. */
+ PDS_DOMAIN_TRUSTSW td = NULL;
+
+ fully_qualified_name = true;
+ for (ULONG idx = 0;
+ (td = cygheap->dom.trusted_domain (idx));
+ ++idx)
+ if (!wcscasecmp (dom, td->NetbiosDomainName))
+ {
+ domain = td->DnsDomainName;
+ break;
+ }
+ if (!domain)
+ {
+ /* This shouldn't happen, in theory, but it does. There
+ are cases where the user's logon domain does not show
+ up in the list of trusted domains. We're desperately
+ trying to workaround that here bu adding an entry for
+ this domain to the trusted domains and ask the DC for
+ a posix_offset. There's a good chance this doesn't
+ work either, but at least we tried, and the user can
+ work. */
+ debug_printf ("Unknown domain %W", dom);
+ td = cygheap->dom.add_domain (dom, sid);
+ if (td)
+ domain = td->DnsDomainName;
+ }
+ if (domain)
+ posix_offset = fetch_posix_offset (td, &loc_ldap);
+ }
+ }
+ /* If the domain returned by LookupAccountSid is not our machine
+ name, and if our machine is no domain member, we lose. We have
+ nobody to ask for the POSIX offset. */
+ else
+ {
+ debug_printf ("Unknown domain %W", dom);
+ return NULL;
+ }
+ /* Generate uid/gid values. */
+ if (uid == ILLEGAL_UID)
+ uid = posix_offset + sid_sub_auth_rid (sid);
+ if (!is_group () && acc_type == SidTypeUser)
+ {
+ /* Default primary group. If the sid is the current user, fetch
+ the default group from the current user token, otherwise make
+ the educated guess that the user is in group "Domain Users"
+ or "None". */
+ if (sid == cygheap->user.sid ())
+ {
+ is_current_user = true;
+ gid = posix_offset
+ + sid_sub_auth_rid (cygheap->user.groups.pgsid);
+ }
+ else
+ gid = posix_offset + DOMAIN_GROUP_RID_USERS;
+ }
+
+ if (is_domain_account)
+ {
+ /* Skip this when creating group entries and for non-users. */
+ if (is_group() || acc_type != SidTypeUser)
+ break;
+ /* On AD machines, use LDAP to fetch domain account infos. */
+ if (cygheap->dom.primary_dns_name ())
+ {
+ /* For the current user we got the primary group from the
+ user token. For any other user we fetch it from AD. */
+ if (!is_current_user
+ && cldap->fetch_ad_account (sid, false, domain)
+ && (id_val = cldap->get_primary_gid ()) != ILLEGAL_GID)
+ gid = posix_offset + id_val;
+ home = cygheap->pg.get_home (cldap, sid, dom, domain,
+ name, fully_qualified_name);
+ shell = cygheap->pg.get_shell (cldap, sid, dom, domain,
+ name,
+ fully_qualified_name);
+ gecos = cygheap->pg.get_gecos (cldap, sid, dom, domain,
+ name, fully_qualified_name);
+ /* Check and, if necessary, add unix<->windows id mapping
+ on the fly, unless we're called from getpwent. */
+ if (!pldap && cldap->is_open ())
+ {
+ id_val = cldap->get_unix_uid ();
+ if (id_val != ILLEGAL_UID
+ && cygheap->ugid_cache.get_uid (id_val)
+ == ILLEGAL_UID)
+ cygheap->ugid_cache.add_uid (id_val, uid);
+ }
+ }
+ /* If primary_dns_name() is empty, we're likely running under an
+ NT4 domain, so we can't use LDAP. For user accounts fall back
+ to NetUserGetInfo. This isn't overly fast, but keep in mind
+ that NT4 domains are mostly replaced by AD these days. */
+ else
+ {
+ WCHAR server[INTERNET_MAX_HOST_NAME_LENGTH + 3];
+ NET_API_STATUS nas;
+ PUSER_INFO_3 ui;
+
+ if (!get_logon_server (cygheap->dom.primary_flat_name (),
+ server, DS_IS_FLAT_NAME))
+ break;
+ nas = NetUserGetInfo (server, name, 3, (PBYTE *) &ui);
+ if (nas != NERR_Success)
+ {
+ debug_printf ("NetUserGetInfo(%W) %u", name, nas);
+ break;
+ }
+ gid = posix_offset + ui->usri3_primary_group_id;
+ home = cygheap->pg.get_home (ui, sid, dom, name,
+ fully_qualified_name);
+ shell = cygheap->pg.get_shell (ui, sid, dom, name,
+ fully_qualified_name);
+ gecos = cygheap->pg.get_gecos (ui, sid, dom, name,
+ fully_qualified_name);
+ }
+ }
+ /* Otherwise check account domain (local SAM).*/
+ else
+ {
+ NET_API_STATUS nas;
+ PUSER_INFO_3 ui;
+ PLOCALGROUP_INFO_1 gi;
+ char *pgrp = NULL;
+ char *uxid = NULL;
+
+ if (acc_type == SidTypeUser)
+ {
+ nas = NetUserGetInfo (NULL, name, 3, (PBYTE *) &ui);
+ if (nas != NERR_Success)
+ {
+ debug_printf ("NetUserGetInfo(%W) %u", name, nas);
+ break;
+ }
+ /* Fetch user attributes. */
+ home = cygheap->pg.get_home (ui, sid, dom, name,
+ fully_qualified_name);
+ shell = cygheap->pg.get_shell (ui, sid, dom, name,
+ fully_qualified_name);
+ gecos = cygheap->pg.get_gecos (ui, sid, dom, name,
+ fully_qualified_name);
+ uxid = fetch_from_description (ui->usri3_comment,
+ L"unix=\"", 6);
+ pgrp = fetch_from_description (ui->usri3_comment,
+ L"group=\"", 7);
+ }
+ else /* acc_type == SidTypeAlias */
+ {
+ nas = NetLocalGroupGetInfo (NULL, name, 1, (PBYTE *) &gi);
+ if (nas != NERR_Success)
+ {
+ debug_printf ("NetLocalGroupGetInfo(%W) %u", name, nas);
+ break;
+ }
+ /* Fetch unix gid from comment field. */
+ uxid = fetch_from_description (gi->lgrpi1_comment,
+ L"unix=\"", 6);
+ }
+
+ if (acc_type == SidTypeUser)
+ NetApiBufferFree (ui);
+ else
+ NetApiBufferFree (gi);
+ if (pgrp)
+ {
+ /* Set primary group from the "Description" field. Prepend
+ account domain if this is a domain member machine or the
+ db_prefix setting requires it. */
+ char gname[2 * DNLEN + strlen (pgrp) + 1], *gp = gname;
+ struct group *gr;
+
+ if (cygheap->dom.member_machine ()
+ || !cygheap->pg.nss_prefix_auto ())
+ {
+ gp = gname
+ + sys_wcstombs (gname, sizeof gname,
+ cygheap->dom.account_flat_name ());
+ *gp++ = cygheap->pg.nss_separator ()[0];
+ }
+ stpcpy (gp, pgrp);
+ if ((gr = internal_getgrnam (gname, cldap)))
+ gid = gr->gr_gid;
+ }
+ char *e;
+ if (!pldap && uxid && ((id_val = strtoul (uxid, &e, 10)), !*e))
+ {
+ if (acc_type == SidTypeUser)
+ {
+ if (cygheap->ugid_cache.get_uid (id_val) == ILLEGAL_UID)
+ cygheap->ugid_cache.add_uid (id_val, uid);
+ }
+ else if (cygheap->ugid_cache.get_gid (id_val) == ILLEGAL_GID)
+ cygheap->ugid_cache.add_gid (id_val, uid);
+ }
+ if (pgrp)
+ free (pgrp);
+ if (uxid)
+ free (uxid);
+ }
+ break;
+ case SidTypeWellKnownGroup:
+ fully_qualified_name = (cygheap->pg.nss_prefix_always ()
+ /* NT SERVICE Account */
+ || (sid_id_auth (sid) == 5 /* SECURITY_NT_AUTHORITY */
+ && sid_sub_auth (sid, 0) == SECURITY_SERVICE_ID_BASE_RID)
+ /* Microsoft Account */
+ || sid_id_auth (sid) == 11);
+#ifdef INTERIX_COMPATIBLE
+ if (sid_id_auth (sid) == 5 /* SECURITY_NT_AUTHORITY */
+ && sid_sub_auth_count (sid) > 1)
+ {
+ uid = 0x1000 * sid_sub_auth (sid, 0)
+ + (sid_sub_auth_rid (sid) & 0xffff);
+ fully_qualified_name = true;
+ }
+ else
+ uid = 0x10000 + 0x100 * sid_id_auth (sid)
+ + (sid_sub_auth_rid (sid) & 0xff);
+#else
+ if (sid_id_auth (sid) == 15 /* SECURITY_APP_PACKAGE_AUTHORITY */)
+ uid = 0x10000 + 0x100 * sid_id_auth (sid)
+ + 0x10 * sid_sub_auth (sid, 0)
+ + (sid_sub_auth_rid (sid) & 0xf);
+ else if (sid_id_auth (sid) != 5 /* SECURITY_NT_AUTHORITY */)
+ uid = 0x10000 + 0x100 * sid_id_auth (sid)
+ + (sid_sub_auth_rid (sid) & 0xff);
+ else if (sid_sub_auth (sid, 0) < SECURITY_PACKAGE_BASE_RID
+ || sid_sub_auth (sid, 0) > SECURITY_MAX_BASE_RID)
+ uid = sid_sub_auth_rid (sid) & 0x7ff;
+ else
+ {
+ uid = 0x1000 * sid_sub_auth (sid, 0)
+ + (sid_sub_auth_rid (sid) & 0xffff);
+ }
+#endif
+ /* Special case for "NULL SID", S-1-0-0 and "Everyone", S-1-1-0.
+ Never return "NULL SID" or Everyone as user or group. */
+ if (uid == 0x10000 || uid == 0x10100)
+ return NULL;
+ break;
+ case SidTypeLabel:
+ uid = 0x60000 + sid_sub_auth_rid (sid);
+ fully_qualified_name = cygheap->pg.nss_prefix_always ();
+ break;
+ default:
+ return NULL;
+ }
+ }
+ else if (sid_id_auth (sid) == 5 /* SECURITY_NT_AUTHORITY */
+ && sid_sub_auth (sid, 0) == SECURITY_LOGON_IDS_RID)
+ {
+ /* Logon ID. Mine or other? */
+ get_logon_sid ();
+ if (PSID (logon_sid) == NO_SID)
+ return NULL;
+ if (RtlEqualSid (sid, logon_sid))
+ {
+ uid = 0xfff;
+ wcpcpy (name = namebuf, L"CurrentSession");
+ }
+ else
+ {
+ uid = 0xffe;
+ wcpcpy (name = namebuf, L"OtherSession");
+ }
+ acc_type = SidTypeUnknown;
+ }
+ else if (sid_id_auth (sid) == 18)
+ {
+ /* Authentication assertion SIDs.
+
+ Available when using a 2012R2 DC, but not supported by
+ LookupAccountXXX on pre Windows 8/2012 machines */
+ uid = 0x11200 + sid_sub_auth_rid (sid);
+ wcpcpy (name = namebuf, sid_sub_auth_rid (sid) == 1
+ ? (PWCHAR) L"Authentication authority asserted identity"
+ : (PWCHAR) L"Service asserted identity");
+ fully_qualified_name = false;
+ acc_type = SidTypeUnknown;
+ }
+ else if (sid_id_auth (sid) == 22)
+ {
+ /* Samba UNIX Users/Groups
+
+ This *might* collide with a posix_offset of some trusted domain.
+ It's just very unlikely. */
+ uid = MAP_UNIX_TO_CYGWIN_ID (sid_sub_auth_rid (sid));
+ /* Unfortunately we have no access to the file server from here,
+ so we can't generate correct user names. */
+ p = wcpcpy (dom, L"Unix_");
+ wcpcpy (p, sid_sub_auth (sid, 0) == 1 ? L"User" : L"Group");
+ __small_swprintf (name = namebuf, L"%d", uid & UNIX_POSIX_MASK);
+ fully_qualified_name = true;
+ acc_type = SidTypeUnknown;
+ }
+ else
+ {
+ if (cygheap->dom.member_machine ()
+ && sid_id_auth (sid) == 5 /* SECURITY_NT_AUTHORITY */
+ && sid_sub_auth (sid, 0) == SECURITY_NT_NON_UNIQUE)
+ {
+ /* Check if we know the domain. If so, create a passwd/group
+ entry with domain prefix and RID as username. */
+ PDS_DOMAIN_TRUSTSW td = NULL;
+
+ sid_sub_auth_count (sid) = sid_sub_auth_count (sid) - 1;
+ if (RtlEqualSid (sid, cygheap->dom.primary_sid ()))
+ {
+ domain = cygheap->dom.primary_flat_name ();
+ posix_offset = PRIMARY_POSIX_OFFSET;
+ }
+ else
+ for (ULONG idx = 0; (td = cygheap->dom.trusted_domain (idx)); ++idx)
+ if (td->DomainSid && RtlEqualSid (sid, td->DomainSid))
+ {
+ domain = td->NetbiosDomainName;
+ posix_offset = fetch_posix_offset (td, &loc_ldap);
+ break;
+ }
+ sid_sub_auth_count (sid) = sid_sub_auth_count (sid) + 1;
+ }
+ if (domain)
+ {
+ wcscpy (dom, domain);
+ __small_swprintf (name = namebuf, L"%W(%u)",
+ is_group () ? L"Group" : L"User",
+ sid_sub_auth_rid (sid));
+ uid = posix_offset + sid_sub_auth_rid (sid);
+ }
+ else
+ {
+ wcpcpy (dom, L"Unknown");
+ wcpcpy (name = namebuf, is_group () ? L"Group" : L"User");
+ }
+ fully_qualified_name = true;
+ acc_type = SidTypeUnknown;
+ }
+
+ tmp_pathbuf tp;
+ char *linebuf = tp.c_get ();
+ char *line = NULL;
+ char *userprofile = getenv("USERPROFILE");
+
+ WCHAR posix_name[UNLEN + 1 + DNLEN + 1];
+ p = posix_name;
+ if (gid == ILLEGAL_GID)
+ gid = uid;
+ if (fully_qualified_name)
+ p = wcpcpy (wcpcpy (p, dom), cygheap->pg.nss_separator ());
+ wcpcpy (p, name);
+
+ pwd_sep = ':';
+
+ if (is_group ())
+ __small_sprintf (linebuf, "%W:%s:%u:",
+ posix_name, sid.string ((char *) sidstr), uid);
+ /* For non-users, create a passwd entry which doesn't allow interactive
+ logon. Unless it's the SYSTEM account. This conveniently allows to
+ logon interactively as SYSTEM for debugging purposes. */
+ else if (acc_type != SidTypeUser && sid != well_known_system_sid)
+ __small_sprintf (linebuf, "%W:*:%u:%u:U-%W\\%W,%s:/:/sbin/nologin",
+ posix_name, uid, gid,
+ dom, name,
+ sid.string ((char *) sidstr));
+ else
+ {
+ __small_sprintf (linebuf, "%W|*|%u|%u|%s%sU-%W\\%W,%s|%s|%s",
+ posix_name, uid, gid,
+ gecos ?: "", gecos ? "," : "",
+ dom, name,
+ sid.string ((char *) sidstr),
+ home ? home : (userprofile ? userprofile : ""),
+ shell ?: get_cmd_exe_path());
+ pwd_sep = '|';
+ }
+ if (gecos)
+ free (gecos);
+ if (home)
+ free (home);
+ if (shell)
+ free (shell);
+ line = cstrdup (linebuf);
+ debug_printf ("line: <%s>", line);
+ return line;
+}
+
+client_request_pwdgrp::client_request_pwdgrp (fetch_user_arg_t &arg, bool group)
+ : client_request (CYGSERVER_REQUEST_PWDGRP, &_parameters, sizeof (_parameters))
+{
+ size_t len = 0;
+ char *p;
+
+ _parameters.in.group = group;
+ _parameters.in.type = arg.type;
+ switch (arg.type)
{
- paranoid_printf ("NtReadFile(%S) failed, status %y", &upath, status);
- free (buf);
- goto out;
- }
- buf[fsi.EndOfFile.LowPart] = '\0';
- for (char *eptr = buf; (eptr = add_line (eptr)); )
- continue;
- debug_printf ("%W curr_lines %d", rel_path, curr_lines);
- res = succeeded;
-
-out:
- if (fh)
- NtClose (fh);
- debug_printf ("%W load %s", rel_path, res);
- initialized = true;
+ case SID_arg:
+ RtlCopySid (sizeof (DBGSID), (PSID) &_parameters.in.arg.sid, *arg.sid);
+ len = RtlLengthSid (*arg.sid);
+ break;
+ case NAME_arg:
+ p = stpcpy (_parameters.in.arg.name, arg.name);
+ len = p - _parameters.in.arg.name + 1;
+ break;
+ case ID_arg:
+ _parameters.in.arg.id = arg.id;
+ len = sizeof (uint32_t);
+ break;
+ default:
+ api_fatal ("Fetching account info from cygserver with wrong arg.type "
+ "%d", arg.type);
+ }
+ msglen (__builtin_offsetof (struct _pwdgrp_param_t::_pwdgrp_in_t, arg) + len);
+}
+
+char *
+pwdgrp::fetch_account_from_cygserver (fetch_user_arg_t &arg)
+{
+ client_request_pwdgrp request (arg, is_group ());
+ if (request.make_request () == -1 || request.error_code ())
+ {
+ /* Cygserver not running? Don't try again. This will automatically
+ avoid an endless loop in cygserver itself. */
+ if (request.error_code () == ENOSYS)
+ cygheap->pg.nss_disable_cygserver_caching ();
+ return NULL;
+ }
+ if (!request.line ())
+ return NULL;
+ return cstrdup (request.line ());
+}
+
+void *
+pwdgrp::add_account_from_cygserver (cygpsid &sid)
+{
+ /* No, Everyone is no group in terms of POSIX. */
+ if (sid_id_auth (sid) == 1 /* SECURITY_WORLD_SID_AUTHORITY */
+ && sid_sub_auth (sid, 0) == SECURITY_WORLD_RID)
+ return NULL;
+ fetch_user_arg_t arg;
+ arg.type = SID_arg;
+ arg.sid = &sid;
+ char *line = fetch_account_from_cygserver (arg);
+ return add_account_post_fetch (line, true);
+}
+
+void *
+pwdgrp::add_account_from_cygserver (const char *name)
+{
+ fetch_user_arg_t arg;
+ arg.type = NAME_arg;
+ arg.name = name;
+ char *line = fetch_account_from_cygserver (arg);
+ return add_account_post_fetch (line, true);
+}
+
+void *
+pwdgrp::add_account_from_cygserver (uint32_t id)
+{
+ fetch_user_arg_t arg;
+ arg.type = ID_arg;
+ arg.id = id;
+ char *line = fetch_account_from_cygserver (arg);
+ return add_account_post_fetch (line, true);
}
diff --git a/winsup/cygwin/uname.cc b/winsup/cygwin/uname.cc
index c571850b4..25d8d6268 100644
--- a/winsup/cygwin/uname.cc
+++ b/winsup/cygwin/uname.cc
@@ -1,7 +1,4 @@
/* uname.cc
-
- Copyright 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
- 2006, 2007, 2008, 2013 Red Hat, Inc.
Written by Steve Chamberlain of Cygnus Support, sac@cygnus.com
Rewritten by Geoffrey Noer of Cygnus Solutions, noer@cygnus.com
@@ -16,80 +13,85 @@ details. */
#include "cygwin_version.h"
#include "cygtls.h"
+extern "C" int cygwin_gethostname (char *__name, size_t __len);
+
/* uname: POSIX 4.4.1.1 */
extern "C" int
uname (struct utsname *name)
{
SYSTEM_INFO sysinfo;
- myfault efault;
- if (efault.faulted (EFAULT))
- return -1;
-
- char *snp = strstr (cygwin_version.dll_build_date, "SNP");
+ __try
+ {
+ char *snp = strstr (cygwin_version.dll_build_date, "SNP");
- memset (name, 0, sizeof (*name));
- __small_sprintf (name->sysname, "CYGWIN_%s", wincap.osname ());
+ memset (name, 0, sizeof (*name));
+ __small_sprintf (name->sysname, "CYGNAL_%s", wincap.osname ());
- /* Add a hint to the sysname, that we're running under WOW64. This might
- give an early clue if somebody encounters problems. */
- if (wincap.is_wow64 ())
- strncat (name->sysname, "-WOW64",
- sizeof name->sysname - strlen (name->sysname) - 1);
+ /* Add a hint to the sysname, that we're running under WOW64. This might
+ give an early clue if somebody encounters problems. */
+ if (wincap.is_wow64 ())
+ strncat (name->sysname, "-WOW",
+ sizeof name->sysname - strlen (name->sysname) - 1);
- GetSystemInfo (&sysinfo);
+ GetSystemInfo (&sysinfo);
- /* Computer name */
- cygwin_gethostname (name->nodename, sizeof (name->nodename) - 1);
+ /* Computer name */
+ cygwin_gethostname (name->nodename, sizeof (name->nodename) - 1);
- /* Cygwin dll release */
- __small_sprintf (name->release, "%d.%d.%d%s(%d.%d/%d/%d)",
- cygwin_version.dll_major / 1000,
- cygwin_version.dll_major % 1000,
- cygwin_version.dll_minor,
- snp ? "s" : "",
- cygwin_version.api_major,
- cygwin_version.api_minor,
- cygwin_version.shared_data,
- cygwin_version.mount_registry);
+ /* Cygwin dll release */
+ __small_sprintf (name->release, "%d.%d.%d%s(%d.%d/%d/%d)",
+ cygwin_version.dll_major / 1000,
+ cygwin_version.dll_major % 1000,
+ cygwin_version.dll_minor,
+ snp ? "s" : "",
+ cygwin_version.api_major,
+ cygwin_version.api_minor,
+ cygwin_version.shared_data,
+ cygwin_version.mount_registry);
- /* Cygwin "version" aka build date */
- strcpy (name->version, cygwin_version.dll_build_date);
- if (snp)
- name->version[snp - cygwin_version.dll_build_date] = '\0';
+ /* Cygwin "version" aka build date */
+ strcpy (name->version, cygwin_version.dll_build_date);
+ if (snp)
+ name->version[snp - cygwin_version.dll_build_date] = '\0';
- /* CPU type */
- switch (sysinfo.wProcessorArchitecture)
+ /* CPU type */
+ switch (sysinfo.wProcessorArchitecture)
+ {
+ case PROCESSOR_ARCHITECTURE_INTEL:
+ unsigned int ptype;
+ if (sysinfo.wProcessorLevel < 3) /* Shouldn't happen. */
+ ptype = 3;
+ else if (sysinfo.wProcessorLevel > 9) /* P4 */
+ ptype = 6;
+ else
+ ptype = sysinfo.wProcessorLevel;
+ __small_sprintf (name->machine, "i%d86", ptype);
+ break;
+ case PROCESSOR_ARCHITECTURE_IA64:
+ strcpy (name->machine, "ia64");
+ break;
+ case PROCESSOR_ARCHITECTURE_AMD64:
+ strcpy (name->machine, "x86_64");
+ break;
+ case PROCESSOR_ARCHITECTURE_IA32_ON_WIN64:
+ strcpy (name->machine, "ia32-win64");
+ break;
+ case PROCESSOR_ARCHITECTURE_ALPHA:
+ strcpy (name->machine, "alpha");
+ break;
+ case PROCESSOR_ARCHITECTURE_MIPS:
+ strcpy (name->machine, "mips");
+ break;
+ default:
+ strcpy (name->machine, "unknown");
+ break;
+ }
+ }
+ __except (EFAULT)
{
- case PROCESSOR_ARCHITECTURE_INTEL:
- unsigned int ptype;
- if (sysinfo.wProcessorLevel < 3) /* Shouldn't happen. */
- ptype = 3;
- else if (sysinfo.wProcessorLevel > 9) /* P4 */
- ptype = 6;
- else
- ptype = sysinfo.wProcessorLevel;
- __small_sprintf (name->machine, "i%d86", ptype);
- break;
- case PROCESSOR_ARCHITECTURE_IA64:
- strcpy (name->machine, "ia64");
- break;
- case PROCESSOR_ARCHITECTURE_AMD64:
- strcpy (name->machine, "x86_64");
- break;
- case PROCESSOR_ARCHITECTURE_IA32_ON_WIN64:
- strcpy (name->machine, "ia32-win64");
- break;
- case PROCESSOR_ARCHITECTURE_ALPHA:
- strcpy (name->machine, "alpha");
- break;
- case PROCESSOR_ARCHITECTURE_MIPS:
- strcpy (name->machine, "mips");
- break;
- default:
- strcpy (name->machine, "unknown");
- break;
+ return -1;
}
-
+ __endtry
return 0;
}
diff --git a/winsup/cygwin/userinfo.h b/winsup/cygwin/userinfo.h
new file mode 100644
index 000000000..ba22f918a
--- /dev/null
+++ b/winsup/cygwin/userinfo.h
@@ -0,0 +1,40 @@
+/* userinfo.h
+
+This file is part of Cygwin.
+
+This software is a copyrighted work licensed under the terms of the
+Cygwin license. Please consult the file "CYGWIN_LICENSE" for
+details. */
+
+#pragma once
+
+enum fetch_user_arg_type_t {
+ SID_arg,
+ NAME_arg,
+ ID_arg,
+ FULL_acc_arg,
+};
+
+#ifdef __INSIDE_CYGWIN__
+
+struct fetch_acc_t {
+ cygpsid sid;
+ PUNICODE_STRING name;
+ PUNICODE_STRING dom;
+ SID_NAME_USE acc_type;
+};
+
+struct fetch_user_arg_t
+{
+ fetch_user_arg_type_t type;
+ union {
+ cygpsid *sid;
+ const char *name;
+ uint32_t id;
+ fetch_acc_t *full_acc;
+ };
+ /* Only used in fetch_account_from_file/line. */
+ size_t len;
+};
+
+#endif
diff --git a/winsup/cygwin/wait.cc b/winsup/cygwin/wait.cc
index fca5a3c01..719547761 100644
--- a/winsup/cygwin/wait.cc
+++ b/winsup/cygwin/wait.cc
@@ -1,8 +1,5 @@
/* wait.cc: Posix wait routines.
- Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008,
- 2009, 2011, 2012 Red Hat, Inc.
-
This file is part of Cygwin.
This software is a copyrighted work licensed under the terms of the
diff --git a/winsup/cygwin/wchar.h b/winsup/cygwin/wchar.h
index 548ad0f86..1bffd6377 100644
--- a/winsup/cygwin/wchar.h
+++ b/winsup/cygwin/wchar.h
@@ -1,7 +1,5 @@
/* wchar.h: Extra wchar defs
- Copyright 2007, 2009, 2010, 2013 Red Hat, Inc.
-
This file is part of Cygwin.
This software is a copyrighted work licensed under the terms of the
@@ -50,12 +48,14 @@ extern char *__locale_charset ();
#ifdef __INSIDE_CYGWIN__
#ifdef __cplusplus
-size_t __reg3 sys_cp_wcstombs (wctomb_p, const char *, char *, size_t,
- const wchar_t *, size_t = (size_t) -1);
size_t __reg3 sys_wcstombs (char *dst, size_t len, const wchar_t * src,
size_t nwc = (size_t) -1);
+size_t __reg3 sys_wcstombs_no_path (char *dst, size_t len,
+ const wchar_t * src, size_t nwc = (size_t) -1);
size_t __reg3 sys_wcstombs_alloc (char **, int, const wchar_t *,
size_t = (size_t) -1);
+size_t __reg3 sys_wcstombs_alloc_no_path (char **, int, const wchar_t *,
+ size_t = (size_t) -1);
size_t __reg3 sys_cp_mbstowcs (mbtowc_p, const char *, wchar_t *, size_t,
const char *, size_t = (size_t) -1);
diff --git a/winsup/cygwin/winbase.h b/winsup/cygwin/winbase.h
deleted file mode 100644
index 666f74a2d..000000000
--- a/winsup/cygwin/winbase.h
+++ /dev/null
@@ -1,57 +0,0 @@
-/* winbase.h
-
- Copyright 2001, 2002, 2003, 2004, 2005, 2008, 2009, 2012 Red Hat, Inc.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-#include_next "winbase.h"
-
-#ifndef _WINBASE2_H
-#define _WINBASE2_H
-
-extern __inline__ LONG
-ilockcmpexch (volatile LONG *t, LONG v, LONG c)
-{
- return
- ({
- register LONG ret __asm ("%eax");
- __asm __volatile ("lock cmpxchgl %2, %1"
- : "=a" (ret), "=m" (*t)
- : "r" (v), "m" (*t), "0" (c)
- : "memory");
- ret;
- });
-}
-
-#undef InterlockedCompareExchange
-#define InterlockedCompareExchange ilockcmpexch
-#undef InterlockedCompareExchangePointer
-
-#ifdef __x86_64__
-extern __inline__ LONGLONG
-ilockcmpexch64 (volatile LONGLONG *t, LONGLONG v, LONGLONG c)
-{
- return
- ({
- register LONGLONG ret __asm ("%rax");
- __asm __volatile ("lock cmpxchgq %2, %1"
- : "=a" (ret), "=m" (*t)
- : "r" (v), "m" (*t), "0" (c)
- : "memory");
- ret;
- });
-}
-
-#define InterlockedCompareExchange64 ilockcmpexch64
-#define InterlockedCompareExchangePointer(d,e,c) \
- (PVOID)InterlockedCompareExchange64((LONGLONG volatile *)(d),(LONGLONG)(e),(LONGLONG)(c))
-
-#else
-
-#define InterlockedCompareExchangePointer(d,e,c) \
- (PVOID)InterlockedCompareExchange((LONG volatile *)(d),(LONG)(e),(LONG)(c))
-
-#endif /* !__x86_64 */
-#endif /*_WINBASE2_H*/
diff --git a/winsup/cygwin/wincap.cc b/winsup/cygwin/wincap.cc
index d84679df5..ba11e243f 100644
--- a/winsup/cygwin/wincap.cc
+++ b/winsup/cygwin/wincap.cc
@@ -1,9 +1,6 @@
/* wincap.cc -- figure out on which OS we're running. Set the
capability class to the appropriate values.
- Copyright 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011,
- 2012, 2013 Red Hat, Inc.
-
This file is part of Cygwin.
This software is a copyrighted work licensed under the terms of the
@@ -20,13 +17,10 @@ details. */
in the same session. I'm only writing this longish comment because I'm
puzzled that this has never been noticed before... */
-/* Minimal set of capabilities required to run Cygwin. */
-#define wincap_minimal wincap_xpsp2
-
wincaps wincap_xpsp2 __attribute__((section (".cygwin_dll_common"), shared)) = {
+ def_guard_pages:1,
max_sys_priv:SE_CREATE_GLOBAL_PRIVILEGE,
is_server:false,
- has_physical_mem_access:true,
has_mandatory_integrity_control:false,
needs_count_in_si_lpres2:false,
has_recycle_dot_bin:false,
@@ -49,12 +43,19 @@ wincaps wincap_xpsp2 __attribute__((section (".cygwin_dll_common"), shared)) = {
has_pipe_reject_remote_clients:false,
terminate_thread_frees_stack:false,
has_precise_system_time:false,
+ has_microsoft_accounts:false,
+ has_set_thread_stack_guarantee:false,
+ has_broken_rtl_query_process_debug_information:false,
+ has_processor_groups:false,
+ has_broken_prefetchvm:false,
+ has_new_pebteb_region:false,
+ has_broken_whoami:true,
};
wincaps wincap_2003 __attribute__((section (".cygwin_dll_common"), shared)) = {
+ def_guard_pages:1,
max_sys_priv:SE_CREATE_GLOBAL_PRIVILEGE,
is_server:false,
- has_physical_mem_access:false,
has_mandatory_integrity_control:false,
needs_count_in_si_lpres2:false,
has_recycle_dot_bin:false,
@@ -77,12 +78,19 @@ wincaps wincap_2003 __attribute__((section (".cygwin_dll_common"), shared)) = {
has_pipe_reject_remote_clients:false,
terminate_thread_frees_stack:false,
has_precise_system_time:false,
+ has_microsoft_accounts:false,
+ has_set_thread_stack_guarantee:true,
+ has_broken_rtl_query_process_debug_information:true,
+ has_processor_groups:false,
+ has_broken_prefetchvm:false,
+ has_new_pebteb_region:false,
+ has_broken_whoami:true,
};
wincaps wincap_vista __attribute__((section (".cygwin_dll_common"), shared)) = {
+ def_guard_pages:1,
max_sys_priv:SE_CREATE_SYMBOLIC_LINK_PRIVILEGE,
is_server:false,
- has_physical_mem_access:false,
has_mandatory_integrity_control:true,
needs_count_in_si_lpres2:true,
has_recycle_dot_bin:true,
@@ -105,12 +113,19 @@ wincaps wincap_vista __attribute__((section (".cygwin_dll_common"), shared)) = {
has_pipe_reject_remote_clients:true,
terminate_thread_frees_stack:true,
has_precise_system_time:false,
+ has_microsoft_accounts:false,
+ has_set_thread_stack_guarantee:true,
+ has_broken_rtl_query_process_debug_information:false,
+ has_processor_groups:false,
+ has_broken_prefetchvm:false,
+ has_new_pebteb_region:false,
+ has_broken_whoami:true,
};
wincaps wincap_7 __attribute__((section (".cygwin_dll_common"), shared)) = {
+ def_guard_pages:1,
max_sys_priv:SE_CREATE_SYMBOLIC_LINK_PRIVILEGE,
is_server:false,
- has_physical_mem_access:false,
has_mandatory_integrity_control:true,
needs_count_in_si_lpres2:false,
has_recycle_dot_bin:true,
@@ -133,12 +148,19 @@ wincaps wincap_7 __attribute__((section (".cygwin_dll_common"), shared)) = {
has_pipe_reject_remote_clients:true,
terminate_thread_frees_stack:true,
has_precise_system_time:false,
+ has_microsoft_accounts:false,
+ has_set_thread_stack_guarantee:true,
+ has_broken_rtl_query_process_debug_information:false,
+ has_processor_groups:true,
+ has_broken_prefetchvm:false,
+ has_new_pebteb_region:false,
+ has_broken_whoami:true,
};
wincaps wincap_8 __attribute__((section (".cygwin_dll_common"), shared)) = {
+ def_guard_pages:2,
max_sys_priv:SE_CREATE_SYMBOLIC_LINK_PRIVILEGE,
is_server:false,
- has_physical_mem_access:false,
has_mandatory_integrity_control:true,
needs_count_in_si_lpres2:false,
has_recycle_dot_bin:true,
@@ -161,6 +183,83 @@ wincaps wincap_8 __attribute__((section (".cygwin_dll_common"), shared)) = {
has_pipe_reject_remote_clients:true,
terminate_thread_frees_stack:true,
has_precise_system_time:true,
+ has_microsoft_accounts:true,
+ has_set_thread_stack_guarantee:true,
+ has_broken_rtl_query_process_debug_information:false,
+ has_processor_groups:true,
+ has_broken_prefetchvm:false,
+ has_new_pebteb_region:false,
+ has_broken_whoami:false,
+};
+
+wincaps wincap_10 __attribute__((section (".cygwin_dll_common"), shared)) = {
+ def_guard_pages:2,
+ max_sys_priv:SE_CREATE_SYMBOLIC_LINK_PRIVILEGE,
+ is_server:false,
+ has_mandatory_integrity_control:true,
+ needs_count_in_si_lpres2:false,
+ has_recycle_dot_bin:true,
+ has_gaa_on_link_prefix:true,
+ has_gaa_largeaddress_bug:false,
+ supports_all_posix_ai_flags:true,
+ has_restricted_stack_args:false,
+ has_transactions:true,
+ has_sendmsg:true,
+ has_broken_udf:false,
+ has_broken_alloc_console:true,
+ has_always_all_codepages:true,
+ has_localenames:true,
+ has_fast_cwd:true,
+ has_restricted_raw_disk_access:true,
+ use_dont_resolve_hack:false,
+ has_console_logon_sid:true,
+ wow64_has_secondary_stack:false,
+ has_program_compatibility_assistant:true,
+ has_pipe_reject_remote_clients:true,
+ terminate_thread_frees_stack:true,
+ has_precise_system_time:true,
+ has_microsoft_accounts:true,
+ has_set_thread_stack_guarantee:true,
+ has_broken_rtl_query_process_debug_information:false,
+ has_processor_groups:true,
+ has_broken_prefetchvm:true,
+ has_new_pebteb_region:false,
+ has_broken_whoami:false,
+};
+
+wincaps wincap_10_1511 __attribute__((section (".cygwin_dll_common"), shared)) = {
+ def_guard_pages:2,
+ max_sys_priv:SE_CREATE_SYMBOLIC_LINK_PRIVILEGE,
+ is_server:false,
+ has_mandatory_integrity_control:true,
+ needs_count_in_si_lpres2:false,
+ has_recycle_dot_bin:true,
+ has_gaa_on_link_prefix:true,
+ has_gaa_largeaddress_bug:false,
+ supports_all_posix_ai_flags:true,
+ has_restricted_stack_args:false,
+ has_transactions:true,
+ has_sendmsg:true,
+ has_broken_udf:false,
+ has_broken_alloc_console:true,
+ has_always_all_codepages:true,
+ has_localenames:true,
+ has_fast_cwd:true,
+ has_restricted_raw_disk_access:true,
+ use_dont_resolve_hack:false,
+ has_console_logon_sid:true,
+ wow64_has_secondary_stack:false,
+ has_program_compatibility_assistant:true,
+ has_pipe_reject_remote_clients:true,
+ terminate_thread_frees_stack:true,
+ has_precise_system_time:true,
+ has_microsoft_accounts:true,
+ has_set_thread_stack_guarantee:true,
+ has_broken_rtl_query_process_debug_information:false,
+ has_processor_groups:true,
+ has_broken_prefetchvm:false,
+ has_new_pebteb_region:true,
+ has_broken_whoami:false,
};
wincapc wincap __attribute__((section (".cygwin_dll_common"), shared));
@@ -172,8 +271,13 @@ wincapc::init ()
return; // already initialized
GetSystemInfo (&system_info);
- version.dwOSVersionInfoSize = sizeof (OSVERSIONINFOEX);
- GetVersionEx (reinterpret_cast<LPOSVERSIONINFO>(&version));
+ version.dwOSVersionInfoSize = sizeof (RTL_OSVERSIONINFOEXW);
+ RtlGetVersion (&version);
+ /* Overwrite unreliable kernel version with correct values returned by
+ RtlGetNtVersionNumbers. See git log of this change for a description. */
+ RtlGetNtVersionNumbers (&version.dwMajorVersion,
+ &version.dwMinorVersion,
+ &version.dwBuildNumber);
switch (version.dwMajorVersion)
{
@@ -197,20 +301,37 @@ wincapc::init ()
case 1:
caps = &wincap_7;
break;
- default:
+ case 2:
+ case 3:
caps = &wincap_8;
break;
+ default:
+ caps = &wincap_10;
+ break;
}
break;
+ case 10:
default:
- caps = &wincap_minimal;
+ if (version.dwBuildNumber >= 10586)
+ caps = &wincap_10_1511;
+ else
+ caps = &wincap_10;
break;
}
((wincaps *)caps)->is_server = (version.wProductType != VER_NT_WORKSTATION);
#ifdef __x86_64__
wow64 = 0;
+ /* 64 bit systems have one more guard page than their 32 bit counterpart. */
+ ++((wincaps *)caps)->def_guard_pages;
#else
+ /* RtlQueryProcessDebugInformation/CreateToolhelp32Snapshot both crash the
+ target process on 64 bit XP/2003 in native 64 bit mode only. Reset the
+ flag here for 32 bit. */
+ ((wincaps *)caps)->has_broken_rtl_query_process_debug_information = false;
+ /* Windows 10 1511 has a stack move when a 64 bit process is started from
+ a 32 bit process, just as it was vice versa in XP/2003. Reset the flag
+ here for 32 bit. */
if (NT_SUCCESS (NtQueryInformationProcess (NtCurrentProcess (),
ProcessWow64Information,
&wow64, sizeof wow64, NULL))
@@ -221,6 +342,7 @@ wincapc::init ()
((wincaps *)caps)->has_restricted_stack_args = false;
((wincaps *)caps)->wow64_has_secondary_stack = false;
((wincaps *)caps)->has_gaa_largeaddress_bug = false;
+ ((wincaps *)caps)->has_broken_prefetchvm = false;
}
__small_sprintf (osnam, "NT-%d.%d", version.dwMajorVersion,
diff --git a/winsup/cygwin/wincap.h b/winsup/cygwin/wincap.h
index cf42dc90e..2879b63b2 100644
--- a/winsup/cygwin/wincap.h
+++ b/winsup/cygwin/wincap.h
@@ -1,8 +1,5 @@
/* wincap.h: Header for OS capability class.
- Copyright 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011,
- 2012, 2013 Red Hat, Inc.
-
This file is part of Cygwin.
This software is a copyrighted work licensed under the terms of the
@@ -14,9 +11,9 @@ details. */
struct wincaps
{
+ DWORD def_guard_pages;
DWORD max_sys_priv;
unsigned is_server : 1;
- unsigned has_physical_mem_access : 1;
unsigned has_mandatory_integrity_control : 1;
unsigned needs_count_in_si_lpres2 : 1;
unsigned has_recycle_dot_bin : 1;
@@ -39,15 +36,22 @@ struct wincaps
unsigned has_pipe_reject_remote_clients : 1;
unsigned terminate_thread_frees_stack : 1;
unsigned has_precise_system_time : 1;
+ unsigned has_microsoft_accounts : 1;
+ unsigned has_set_thread_stack_guarantee : 1;
+ unsigned has_broken_rtl_query_process_debug_information : 1;
+ unsigned has_processor_groups : 1;
+ unsigned has_broken_prefetchvm : 1;
+ unsigned has_new_pebteb_region : 1;
+ unsigned has_broken_whoami : 1;
};
class wincapc
{
- SYSTEM_INFO system_info;
- OSVERSIONINFOEX version;
- char osnam[40];
- ULONG_PTR wow64;
- void *caps;
+ SYSTEM_INFO system_info;
+ RTL_OSVERSIONINFOEXW version;
+ char osnam[40];
+ ULONG_PTR wow64;
+ void *caps;
public:
void init ();
@@ -64,9 +68,12 @@ public:
#define IMPLEMENT(cap) cap() const { return ((wincaps *) this->caps)->cap; }
+ DWORD def_guard_page_size () const
+ {
+ return ((wincaps *) this->caps)->def_guard_pages * page_size ();
+ }
DWORD IMPLEMENT (max_sys_priv)
bool IMPLEMENT (is_server)
- bool IMPLEMENT (has_physical_mem_access)
bool IMPLEMENT (has_mandatory_integrity_control)
bool IMPLEMENT (needs_count_in_si_lpres2)
bool IMPLEMENT (has_recycle_dot_bin)
@@ -89,6 +96,13 @@ public:
bool IMPLEMENT (has_pipe_reject_remote_clients)
bool IMPLEMENT (terminate_thread_frees_stack)
bool IMPLEMENT (has_precise_system_time)
+ bool IMPLEMENT (has_microsoft_accounts)
+ bool IMPLEMENT (has_set_thread_stack_guarantee)
+ bool IMPLEMENT (has_broken_rtl_query_process_debug_information)
+ bool IMPLEMENT (has_processor_groups)
+ bool IMPLEMENT (has_broken_prefetchvm)
+ bool IMPLEMENT (has_new_pebteb_region)
+ bool IMPLEMENT (has_broken_whoami)
#undef IMPLEMENT
};
diff --git a/winsup/cygwin/window.cc b/winsup/cygwin/window.cc
index ce9a7c708..007542baf 100644
--- a/winsup/cygwin/window.cc
+++ b/winsup/cygwin/window.cc
@@ -1,8 +1,5 @@
/* window.cc: hidden windows for signals/itimer support
- Copyright 1997, 1998, 2000, 2001, 2002, 2003, 2004, 2005, 2008, 2010, 2011
- Red Hat, Inc.
-
Written by Sergey Okhapkin <sos@prospect.com.ru>
This file is part of Cygwin.
@@ -13,8 +10,6 @@ details. */
#include "winsup.h"
#include <sys/time.h>
-#include <wingdi.h>
-#include <winuser.h>
#define USE_SYS_TYPES_FD_SET
#include <winsock2.h>
#include "perprocess.h"
diff --git a/winsup/cygwin/winf.cc b/winsup/cygwin/winf.cc
index 26307a27d..d0c5c440f 100644
--- a/winsup/cygwin/winf.cc
+++ b/winsup/cygwin/winf.cc
@@ -1,7 +1,5 @@
/* winf.cc
- Copyright 2003, 2004, 2005, 2006, 2008, 2009 Red Hat, Inc.
-
This software is a copyrighted work licensed under the terms of the
Cygwin license. Please consult the file "CYGWIN_LICENSE" for
details. */
@@ -126,7 +124,7 @@ linebuf::fromargv (av& newargv, const char *real_path, bool cmdlenoverflow_ok)
}
int
-av::unshift (const char *what, int conv)
+av::unshift (const char *what)
{
char **av;
av = (char **) crealloc (argv, (argc + 2) * sizeof (char *));
@@ -135,17 +133,6 @@ av::unshift (const char *what, int conv)
argv = av;
memmove (argv + 1, argv, (argc + 1) * sizeof (char *));
- tmp_pathbuf tp;
- char *buf = tp.c_get ();
- if (conv)
- {
- cygwin_conv_path (CCP_WIN_A_TO_POSIX | CCP_RELATIVE, what, buf,
- NT_MAX_PATH);
- char *p = strchr (buf, '\0') - 4;
- if (p > buf && ascii_strcasematch (p, ".exe"))
- *p = '\0';
- what = buf;
- }
*argv = cstrdup1 (what);
calloced++;
argc++;
diff --git a/winsup/cygwin/winf.h b/winsup/cygwin/winf.h
index ca7d2bdd9..e3a65f8cc 100644
--- a/winsup/cygwin/winf.h
+++ b/winsup/cygwin/winf.h
@@ -1,7 +1,5 @@
/* winf.h
- Copyright 2006, 2007, 2009, 2011, 2013 Red Hat, Inc.
-
This software is a copyrighted work licensed under the terms of the
Cygwin license. Please consult the file "CYGWIN_LICENSE" for
details. */
@@ -41,7 +39,7 @@ class av
cfree (argv);
}
}
- int unshift (const char *what, int conv = 0) __reg2;
+ int unshift (const char *what) __reg2;
operator char **() {return argv;}
void all_calloced () {calloced = argc;}
void replace0_maybe (const char *arg0)
diff --git a/winsup/cygwin/wininfo.h b/winsup/cygwin/wininfo.h
index 0835f8d2f..193eb6add 100644
--- a/winsup/cygwin/wininfo.h
+++ b/winsup/cygwin/wininfo.h
@@ -1,7 +1,5 @@
/* wininfo.h: main Cygwin header file.
- Copyright 2004, 2005, 2006, 2013 Red Hat, Inc.
-
This file is part of Cygwin.
This software is a copyrighted work licensed under the terms of the
diff --git a/winsup/cygwin/winlean.h b/winsup/cygwin/winlean.h
index 8a4c2aeb2..deb79bef8 100644
--- a/winsup/cygwin/winlean.h
+++ b/winsup/cygwin/winlean.h
@@ -1,7 +1,5 @@
/* winlean.h - Standard "lean" windows include
- Copyright 2010, 2011, 2012, 2013 Red Hat, Inc.
-
This file is part of Cygwin.
This software is a copyrighted work licensed under the terms of the
@@ -12,18 +10,24 @@ details. */
#define _WINLEAN_H 1
#define WIN32_LEAN_AND_MEAN 1
-/* Mingw64 */
-#define _WINNLS_
-#define _WINNETWK_
-#define _WINSVC_
+/* The following macros have to be defined, otherwise the autoload mechanism
+ in autoload.cc leads to "multiple definition" errors. The macros control
+ the declarations of symbols in the Mingw64 w32api headers. If they are
+ not defined, a DECLSPEC_IMPORT will be added to the symbol declarations.
+ This leads to a definition of the symbols in the sources using the
+ autoloaded symbols, which in turn clashes with the definition in the
+ w32api library exporting the symbols. */
#define _ADVAPI32_
+#define _AUTHZ_
#define _DSGETDCAPI_
#define _GDI32_
#define _KERNEL32_
+#define _NORMALIZE_
#define _OLE32_
#define _SHELL32_
#define _SPOOL32_
#define _USER32_
+#define _USERENV_
#define _WINMM_
#define WINIMPM
#define WINSOCK_API_LINKAGE
@@ -54,11 +58,6 @@ details. */
#include <lmcons.h>
#include <ntdef.h>
-/* Temporary kludge for missing flag in Mingw64's w32api. */
-#ifndef PIPE_REJECT_REMOTE_CLIENTS
-#define PIPE_REJECT_REMOTE_CLIENTS 8
-#endif
-
#ifdef __undef_IN
#undef IN
#endif
@@ -75,9 +74,16 @@ details. */
#undef CRITICAL
#endif
-#undef _WINNLS_
-#undef _WINNETWK_
-#undef _WINSVC_
+/* So-called "Microsoft Account" SIDs (S-1-11-...) have a netbios domain name
+ "MicrosoftAccounts". The new "Application Container SIDs" (S-1-15-...)
+ have a netbios domain name "APPLICATION PACKAGE AUTHORITY"
+
+ The problem is, DNLEN is 15, but these domain names have a length of 16
+ resp. 29 chars :-P So we override DNLEN here to be 31, so that calls
+ to LookupAccountSid/Name don't fail if the buffer is based on DNLEN.
+ Hope that's enough for a while... */
+#undef DNLEN
+#define DNLEN 31
/* When Terminal Services are installed, the GetWindowsDirectory function
does not return the system installation dir, but a user specific directory
diff --git a/winsup/cygwin/winsup.h b/winsup/cygwin/winsup.h
index eb7a423dd..369b86215 100644
--- a/winsup/cygwin/winsup.h
+++ b/winsup/cygwin/winsup.h
@@ -1,8 +1,5 @@
/* winsup.h: main Cygwin header file.
- Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008, 2009, 2010, 2011, 2012, 2013 Red Hat, Inc.
-
This file is part of Cygwin.
This software is a copyrighted work licensed under the terms of the
@@ -19,13 +16,16 @@ details. */
#define EXPORT_ALIAS(sym,symalias) extern "C" __typeof (sym) symalias __attribute__ ((alias(#sym)));
-/* Fun, fun, fun. On Mingw64, WINVER is set according to the value of
- _WIN32_WINNT, on Mingw32 it's exactly the opposite... */
-#define _WIN32_WINNT 0x0602
-#define WINVER 0x0602
+#define _WIN32_WINNT 0x0a00
+#define WINVER 0x0a00
#define _NO_W32_PSEUDO_MODIFIERS
+/* Newlib's guarding functions more diligently based on their origin, starting
+ since 2013. To be sure to get everything and the kitchen sink, we have to
+ define _GNU_SOURCE. */
+#define _GNU_SOURCE 1
+
#include <sys/types.h>
#include <sys/strace.h>
@@ -85,9 +85,7 @@ extern const unsigned char case_folded_lower[];
extern const unsigned char case_folded_upper[];
#define cyg_toupper(c) ((char) case_folded_upper[(unsigned char)(c)])
-#ifndef MALLOC_DEBUG
#define cfree newlib_cfree_dont_use
-#endif
/* Used as type by sys_wcstombs_alloc and sys_mbstowcs_alloc. For a
description see there. */
@@ -126,7 +124,7 @@ extern int cygserver_running;
})
/* Convert a signal to a signal mask */
-#define SIGTOMASK(sig) (1 << ((sig) - 1))
+#define SIGTOMASK(sig) ((sigset_t) 1 << ((sig) - 1))
#define set_api_fatal_return(n) do {extern int __api_fatal_exit_val; __api_fatal_exit_val = (n);} while (0)
@@ -172,20 +170,8 @@ void __reg1 do_exit (int) __attribute__ ((noreturn));
/* libstdc++ malloc operator wrapper support. */
extern struct per_process_cxx_malloc default_cygwin_cxx_malloc;
-/* UID/GID */
-void uinfo_init ();
-
-#define ILLEGAL_UID ((uid_t)-1)
-#define ILLEGAL_GID ((gid_t)-1)
#define ILLEGAL_SEEK ((off_t)-1)
-#ifndef __x86_64__
-#define ILLEGAL_UID16 ((__uid16_t)-1)
-#define ILLEGAL_GID16 ((__gid16_t)-1)
-#define uid16touid32(u16) ((u16)==ILLEGAL_UID16?ILLEGAL_UID:(uid_t)(u16))
-#define gid16togid32(g16) ((g16)==ILLEGAL_GID16?ILLEGAL_GID:(gid_t)(g16))
-#endif
-
/* Convert LARGE_INTEGER into long long */
#define get_ll(pl) (((long long) (pl).HighPart << 32) | (pl).LowPart)
@@ -214,6 +200,7 @@ void __reg2 nofinalslash (const char *src, char *dst);
void __reg3 *hook_or_detect_cygwin (const char *, const void *, WORD&, HANDLE h = NULL);
/* Time related */
+ULONGLONG GetTickCount_ns ();
void __stdcall totimeval (struct timeval *, PLARGE_INTEGER, int, int);
time_t __stdcall to_time_t (PLARGE_INTEGER);
void __stdcall to_timestruc_t (PLARGE_INTEGER, timestruc_t *);
@@ -268,14 +255,6 @@ extern inline bool flush_file_buffers (HANDLE h)
/* Make sure that regular ExitThread is never called */
#define ExitThread exit_thread
-/**************************** Exports ******************************/
-
-extern "C" {
-int cygwin_select (int , fd_set *, fd_set *, fd_set *,
- struct timeval *to);
-int cygwin_gethostname (char *__name, size_t __len);
-};
-
/*************************** Unsorted ******************************/
#define WM_ASYNCIO 0x8000 // WM_APP
@@ -297,6 +276,17 @@ extern "C" char _data_start__, _data_end__, _bss_start__, _bss_end__;
extern "C" void (*__CTOR_LIST__) (void);
extern "C" void (*__DTOR_LIST__) (void);
+#ifdef NEEDED
+/* This was inexplicably needed after updating a toolchain.
+ The need disappeared when updating further but I'm keeping
+ it around temporarily in case the issue crops up again.
+ This manifests as SEGVs in one of the Interlocked functions below
+ in kernel32.dll. */
+#define InterlockedDecrement _InterlockedDecrement
+#define InterlockedExchange _InterlockedExchange
+#define InterlockedIncrement _InterlockedIncrement
+#endif /*NEEDED*/
+
#ifndef NO_GLOBALS_H
#define _RDATA /* See globals.h */
#include "globals.h"
diff --git a/winsup/cygwin/winver.rc b/winsup/cygwin/winver.rc
index caa0c0788..980d51204 100644
--- a/winsup/cygwin/winver.rc
+++ b/winsup/cygwin/winver.rc
@@ -33,7 +33,7 @@ BEGIN
VALUE "FileDescription", "Cygwin POSIX Emulation DLL"
VALUE "FileVersion", STRINGIFY(CYGWIN_VERSION)
VALUE "InternalName", CYGWIN_DLL_NAME
- VALUE "LegalCopyright", "Copyright \251 Red Hat, Inc. 1996-2013"
+ VALUE "LegalCopyright", "Copyright \251 Cygwin Authors 1996-" STRINGIFY(CYGWIN_BUILD_YEAR)
VALUE "OriginalFilename", CYGWIN_DLL_NAME
VALUE "ProductName", "Cygwin"
VALUE "ProductVersion", STRINGIFY(CYGWIN_VERSION)
diff --git a/winsup/cygwin/wow64.cc b/winsup/cygwin/wow64.cc
index 070b9c2c4..95651a8c0 100644
--- a/winsup/cygwin/wow64.cc
+++ b/winsup/cygwin/wow64.cc
@@ -1,7 +1,5 @@
/* wow64.cc
- Copyright 2011, 2012 Red Hat, Inc.
-
This file is part of Cygwin.
This software is a copyrighted work licensed under the terms of the
@@ -25,11 +23,11 @@ static void
wow64_eval_expected_main_stack (PVOID &allocbase, PVOID &stackbase)
{
PIMAGE_DOS_HEADER dosheader;
- PIMAGE_NT_HEADERS32 ntheader;
- DWORD size;
+ PIMAGE_NT_HEADERS ntheader;
+ SIZE_T size;
dosheader = (PIMAGE_DOS_HEADER) GetModuleHandle (NULL);
- ntheader = (PIMAGE_NT_HEADERS32) ((PBYTE) dosheader + dosheader->e_lfanew);
+ ntheader = (PIMAGE_NT_HEADERS) ((PBYTE) dosheader + dosheader->e_lfanew);
/* The main thread stack is expected to be located at 0x30000, which is the
case for all observed NT systems up to Server 2003 R2, unless the
stacksize requested by the StackReserve field in the PE/COFF header is
@@ -71,7 +69,7 @@ wow64_test_for_64bit_parent ()
we have to "alloc_stack_hard_way". However, this fails in almost all
cases because the stack slot of the parent process is taken by something
else in the child process.
- What we do here is to check if the current stack is the excpected main
+ What we do here is to check if the current stack is the expected main
thread stack and if not, if we really have been started from a 64 bit
process here. If so, we note this fact in wow64_needs_stack_adjustment
so we can workaround the stack problem in _dll_crt0. See there for how
@@ -86,7 +84,7 @@ wow64_test_for_64bit_parent ()
/* First check if the current stack is where it belongs. If so, we don't
have to do anything special. This is the case on Vista and later. */
wow64_eval_expected_main_stack (allocbase, stackbase);
- if (&wow64 >= (PULONG) allocbase && &wow64 < (PULONG) stackbase)
+ if (&wow64 >= (PULONG_PTR) allocbase && &wow64 < (PULONG_PTR) stackbase)
return false;
/* Check if the parent is a native 64 bit process. Unfortunately there's
@@ -171,10 +169,10 @@ wow64_revert_to_original_stack (PVOID &allocationbase)
accordingly, and return the new, 16 byte aligned address for the
stack pointer. The second half of the stack move is done by the
caller _dll_crt0. */
- _tlsbase = (char *) newbase;
- _tlstop = (char *) newtop;
+ NtCurrentTeb ()->Tib.StackBase = (char *) newbase;
+ NtCurrentTeb ()->Tib.StackLimit = (char *) newtop;
_main_tls = &_my_tls;
- return PTR_ADD (_tlsbase, -16);
+ return PTR_ADD (NtCurrentTeb ()->Tib.StackBase, -16);
}
/* Respawn WOW64 process. This is only called if we can't reuse the original
@@ -192,19 +190,17 @@ wow64_revert_to_original_stack (PVOID &allocationbase)
void
wow64_respawn_process ()
{
- WCHAR path[PATH_MAX];
PROCESS_INFORMATION pi;
STARTUPINFOW si;
DWORD ret = 0;
- GetModuleFileNameW (NULL, path, PATH_MAX);
GetStartupInfoW (&si);
- if (!CreateProcessW (path, GetCommandLineW (), NULL, NULL, TRUE,
+ if (!CreateProcessW (global_progname, GetCommandLineW (), NULL, NULL, TRUE,
CREATE_DEFAULT_ERROR_MODE
| GetPriorityClass (GetCurrentProcess ()),
NULL, NULL, &si, &pi))
api_fatal ("Failed to create process <%W> <%W>, %E",
- path, GetCommandLineW ());
+ global_progname, GetCommandLineW ());
CloseHandle (pi.hThread);
if (WaitForSingleObject (pi.hProcess, INFINITE) == WAIT_FAILED)
api_fatal ("Waiting for process %u failed, %E", pi.dwProcessId);
diff --git a/winsup/cygwin/wow64.h b/winsup/cygwin/wow64.h
index a0b5b318d..b1271bf28 100644
--- a/winsup/cygwin/wow64.h
+++ b/winsup/cygwin/wow64.h
@@ -1,7 +1,5 @@
/* wow64.h
- Copyright 2011, 2012 Red Hat, Inc.
-
This file is part of Cygwin.
This software is a copyrighted work licensed under the terms of the
diff --git a/winsup/cygwin/x86_64.din b/winsup/cygwin/x86_64.din
index 24f2584c6..e1896bf8a 100644
--- a/winsup/cygwin/x86_64.din
+++ b/winsup/cygwin/x86_64.din
@@ -12,9 +12,3 @@ __wrap__ZnwmRKSt9nothrow_t NOSIGFE # void *operator new(std::size_t sz, const s
_alloca = __alloca NOSIGFE
_dll_crt0 NOSIGFE
dll_entry NOSIGFE
-llrint NOSIGFE
-llrintf NOSIGFE
-lrint NOSIGFE
-lrintf NOSIGFE
-rint NOSIGFE
-rintf NOSIGFE
diff --git a/winsup/doc/.cvsignore b/winsup/doc/.gitignore
index 288848833..288848833 100644
--- a/winsup/doc/.cvsignore
+++ b/winsup/doc/.gitignore
diff --git a/winsup/doc/Makefile.in b/winsup/doc/Makefile.in
index 7a2cee36f..b28094bc1 100644
--- a/winsup/doc/Makefile.in
+++ b/winsup/doc/Makefile.in
@@ -1,6 +1,4 @@
# -*- Makefile -*- for winsup/doc
-# Copyright (c) 1998-2000, 2001, 2002, 2004, 2005, 2006, 2008, 2009, 2010,
-# 2013 Red Hat, Inc.
#
# This file is part of Cygwin.
#
@@ -12,85 +10,132 @@ SHELL = @SHELL@
srcdir = @srcdir@
VPATH = @srcdir@
-DBXDIRS = -d $(srcdir) -d $(srcdir)/../utils -d $(srcdir)/../cygwin
+prefix:=@prefix@
+datarootdir:=@datarootdir@
+docdir = @docdir@
+htmldir = @htmldir@
+mandir = @mandir@
+man1dir = $(mandir)/man1
+man3dir = $(mandir)/man3
+infodir:=@infodir@
+
+override INSTALL:=@INSTALL@
+override INSTALL_DATA:=@INSTALL_DATA@
+
+MKDIRP:=$(INSTALL) -m 755 -d
CC:=@CC@
CC_FOR_TARGET:=@CC@
-exeext:=@build_exeext@
XMLTO:=xmlto --skip-validation --with-dblatex
+DOCBOOK2XTEXI:=@DOCBOOK2XTEXI@ --xinclude --info --utf8trans-map=charmap
include $(srcdir)/../Makefile.common
-
-FAQ_SOURCES:= $(wildcard ${srcdir}/faq*.xml)
+-include Makefile.dep
.SUFFIXES: .html .body
.html.body:
$(srcdir)/bodysnatcher.pl $<
+.PHONY: all clean install install-all install-pdf install-html install-man \
+ info install-info
+
all: Makefile Makefile.dep \
cygwin-ug-net/cygwin-ug-net.html \
cygwin-ug-net/cygwin-ug-net-nochunks.html.gz \
cygwin-api/cygwin-api.html \
faq/faq.body faq/faq.html \
cygwin-ug-net/cygwin-ug-net.pdf \
- cygwin-api/cygwin-api.pdf
+ cygwin-api/cygwin-api.pdf \
+ utils2man.stamp \
+ api2man.stamp \
+ intro2man.stamp \
+ cygwin-ug-net.info cygwin-api.info
-Makefile: ${srcdir}/Makefile.in
+Makefile: $(srcdir)/Makefile.in
/bin/sh ./config.status
clean:
rm -f Makefile.dep
- rm -f doctool.exe doctool.o
- rm -f cygwin-api.xml
rm -f *.html *.html.gz
rm -Rf cygwin-api cygwin-ug cygwin-ug-net faq
-
-install: all
-
-cygwin-ug-net/cygwin-ug-net-nochunks.html.gz : cygwin-ug-net.xml
- -${XMLTO} html-nochunks -m $(srcdir)/cygwin.xsl $<
+ rm -f *.1 utils2man.stamp
+ rm -f *.3 api2man.stamp
+ rm -f *.info* charmap
+
+install: install-all
+
+install-all: install-pdf install-html install-man install-info
+
+install-pdf: cygwin-ug-net/cygwin-ug-net.pdf cygwin-api/cygwin-api.pdf
+ @$(MKDIRP) $(DESTDIR)$(docdir)
+ $(INSTALL_DATA) $^ $(DESTDIR)$(docdir)
+
+install-html: cygwin-ug-net/cygwin-ug-net.html cygwin-api/cygwin-api.html
+ @$(MKDIRP) $(DESTDIR)$(htmldir)/cygwin-ug-net
+ $(INSTALL_DATA) cygwin-ug-net/*.html $(DESTDIR)$(htmldir)/cygwin-ug-net
+ $(INSTALL_DATA) cygwin-ug-net/cygwin-ug-net.html $(DESTDIR)$(htmldir)/cygwin-ug-net/index.html
+ @$(MKDIRP) $(DESTDIR)$(htmldir)/cygwin-api
+ $(INSTALL_DATA) cygwin-api/*.html $(DESTDIR)$(htmldir)/cygwin-api
+ $(INSTALL_DATA) cygwin-api/cygwin-api.html $(DESTDIR)$(htmldir)/cygwin-api/index.html
+
+install-man: utils2man.stamp api2man.stamp intro2man.stamp
+ @$(MKDIRP) $(DESTDIR)$(man1dir)
+ $(INSTALL_DATA) *.1 $(DESTDIR)$(man1dir)
+ @$(MKDIRP) $(DESTDIR)$(man3dir)
+ $(INSTALL_DATA) *.3 $(DESTDIR)$(man3dir)
+
+install-info: cygwin-ug-net.info cygwin-api.info
+ $(MKDIRP) $(DESTDIR)$(infodir)
+ $(INSTALL_DATA) *.info* $(DESTDIR)$(infodir)
+
+cygwin-ug-net/cygwin-ug-net-nochunks.html.gz : $(cygwin-ug-net_SOURCES) html.xsl
+ -$(XMLTO) html-nochunks -m $(srcdir)/html.xsl $<
+ -@$(MKDIRP) cygwin-ug-net
-cp cygwin-ug-net.html cygwin-ug-net/cygwin-ug-net-nochunks.html
-rm -f cygwin-ug-net/cygwin-ug-net-nochunks.html.gz
-gzip cygwin-ug-net/cygwin-ug-net-nochunks.html
-cygwin-ug-net/cygwin-ug-net.html : cygwin-ug-net.xml cygwin.xsl
- -${XMLTO} html -o cygwin-ug-net/ -m $(srcdir)/cygwin.xsl $<
+cygwin-ug-net/cygwin-ug-net.html : $(cygwin-ug-net_SOURCES) html.xsl
+ -$(XMLTO) html -o cygwin-ug-net/ -m $(srcdir)/html.xsl $<
-cygwin-ug-net/cygwin-ug-net.pdf : cygwin-ug-net.xml fo.xsl
- -xsltproc --xinclude $(srcdir)/fo.xsl $< | fop -q -fo - $@
+cygwin-ug-net/cygwin-ug-net.pdf : $(cygwin-ug-net_SOURCES) fo.xsl
+ -$(XMLTO) pdf -o cygwin-ug-net/ -m $(srcdir)/fo.xsl $<
-cygwin-api/cygwin-api.html : cygwin-api.xml cygwin.xsl
- -${XMLTO} html -o cygwin-api/ -m $(srcdir)/cygwin.xsl $<
+utils2man.stamp: $(cygwin-ug-net_SOURCES) man.xsl
+ $(XMLTO) man -m ${srcdir}/man.xsl $<
+ @touch $@
-cygwin-api/cygwin-api.pdf : cygwin-api.xml fo.xsl
- -xsltproc --xinclude $(srcdir)/fo.xsl $< | fop -q -fo - $@
+cygwin-ug-net.info: $(cygwin-ug-net_SOURCES) charmap
+ -$(DOCBOOK2XTEXI) $(srcdir)/cygwin-ug-net.xml --string-param output-file=cygwin-ug-net
-cygwin-api.xml : cygwin-api.in.xml doctool Makefile.in
- -./doctool -m $(DBXDIRS) -s $(srcdir) -o $@ $<
+cygwin-api/cygwin-api.html : $(cygwin-api_SOURCES) html.xsl
+ -$(XMLTO) html -o cygwin-api/ -m $(srcdir)/html.xsl $<
-faq/faq.html : $(FAQ_SOURCES)
- -${XMLTO} html -o faq -m $(srcdir)/cygwin.xsl $(srcdir)/faq.xml
- -sed -i 's;</a><a name="id[0-9]*"></a>;</a>;g' faq/faq.html
+cygwin-api/cygwin-api.pdf : $(cygwin-api_SOURCES) fo.xsl
+ -$(XMLTO) pdf -o cygwin-api/ -m $(srcdir)/fo.xsl $<
-doctool : doctool.c
- gcc -g $< -o $@
+api2man.stamp: $(cygwin-api_SOURCES) man.xsl
+ $(XMLTO) man -m ${srcdir}/man.xsl $<
+ @touch $@
-TBFILES = cygwin-ug-net.dvi cygwin-ug-net.rtf cygwin-ug-net.ps \
- cygwin-ug-net.pdf cygwin-ug-net.xml \
- cygwin-api.dvi cygwin-api.rtf cygwin-api.ps \
- cygwin-api.pdf cygwin-api.xml
-TBDIRS = cygwin-ug-net cygwin-api
-TBDEPS = cygwin-ug-net/cygwin-ug-net.html cygwin-api/cygwin-api.html
+cygwin-api.info: $(cygwin-api_SOURCES) charmap
+ -$(DOCBOOK2XTEXI) $(srcdir)/cygwin-api.xml --string-param output-file=cygwin-api
-tarball : cygwin-docs.tar.bz2
-cygwin-docs.tar.bz2 : $(TBFILES) $(TBDEPS)
- find $(TBFILES) $(TBDIRS) \! -type d | sort | tar -T - -cf - | bzip2 > cygwin-docs.tar.bz2
+# this generates a custom charmap for docbook2x-texi which has a mapping for &reg;
+charmap:
+ cp /usr/share/docbook2X/charmaps/texi.charmap charmap
+ echo "ae (R)" >>charmap
-Makefile.dep: cygwin-ug-net.xml
- builddir=`pwd` \
- && cd $(srcdir) \
- && $(srcdir)/xidepend $^ > "$${builddir}/$@"
+intro2man.stamp: intro.xml man.xsl
+ -$(XMLTO) man -m ${srcdir}/man.xsl $<
+ @echo ".so intro.1" >cygwin.1
+ @touch $@
--include Makefile.dep
+faq/faq.html : $(faq_SOURCES)
+ -$(XMLTO) html -o faq -m $(srcdir)/html.xsl $(srcdir)/faq.xml
+ -sed -i 's;<a name="id[mp][0-9]*"></a>;;g' faq/faq.html
+
+Makefile.dep: cygwin-ug-net.xml cygwin-api.xml faq.xml
+ cd $(srcdir) && ./xidepend $^ > "${CURDIR}/$@"
diff --git a/winsup/doc/README b/winsup/doc/README
index 58fd88721..24970f8b7 100644
--- a/winsup/doc/README
+++ b/winsup/doc/README
@@ -1,29 +1,9 @@
-The cygwin-doc source files are kept in CVS. Please see
-http://cygwin.com/cvs.html for more information.
+ADDITIONAL BUILD REQUIREMENTS FOR DOCUMENTATION
-BUILD REQUIREMENTS:
-
-bash
-bzip2
-coreutils
-cygwin
dblatex
docbook-xml45
docbook-xsl
+docbook2x-texi
gzip
-make
texinfo
-perl
xmlto
-
-
-OTHER NOTES:
-
-You may use docbook2X to convert the DocBook files into info pages.
-I have not been able to get a working docbook2X installation on Cygwin,
-so currently I convert the files on a machine running GNU/Linux.
-
-A few handmade files (cygwin.texi, intro.3, etc.) are found in the
-cygwin-doc-x.y-z-src.tar.bz2 package. It also contains the utilities for
-building the cygwin-doc-x.y-z "binary" package--simply run each step in
-the cygwin-doc-x.y-z.sh script.
diff --git a/winsup/doc/aclocal.m4 b/winsup/doc/aclocal.m4
deleted file mode 100644
index ecef4244c..000000000
--- a/winsup/doc/aclocal.m4
+++ /dev/null
@@ -1,875 +0,0 @@
-dnl aclocal.m4 generated automatically by aclocal 1.4-p6
-
-dnl Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc.
-dnl This file is free software; the Free Software Foundation
-dnl gives unlimited permission to copy and/or distribute it,
-dnl with or without modifications, as long as this notice is preserved.
-
-dnl This program is distributed in the hope that it will be useful,
-dnl but WITHOUT ANY WARRANTY, to the extent permitted by law; without
-dnl even the implied warranty of MERCHANTABILITY or FITNESS FOR A
-dnl PARTICULAR PURPOSE.
-
-# lib-prefix.m4 serial 4 (gettext-0.14.2)
-dnl Copyright (C) 2001-2005 Free Software Foundation, Inc.
-dnl This file is free software; the Free Software Foundation
-dnl gives unlimited permission to copy and/or distribute it,
-dnl with or without modifications, as long as this notice is preserved.
-
-dnl From Bruno Haible.
-
-dnl AC_LIB_ARG_WITH is synonymous to AC_ARG_WITH in autoconf-2.13, and
-dnl similar to AC_ARG_WITH in autoconf 2.52...2.57 except that is doesn't
-dnl require excessive bracketing.
-ifdef([AC_HELP_STRING],
-[AC_DEFUN([AC_LIB_ARG_WITH], [AC_ARG_WITH([$1],[[$2]],[$3],[$4])])],
-[AC_DEFUN([AC_][LIB_ARG_WITH], [AC_ARG_WITH([$1],[$2],[$3],[$4])])])
-
-dnl AC_LIB_PREFIX adds to the CPPFLAGS and LDFLAGS the flags that are needed
-dnl to access previously installed libraries. The basic assumption is that
-dnl a user will want packages to use other packages he previously installed
-dnl with the same --prefix option.
-dnl This macro is not needed if only AC_LIB_LINKFLAGS is used to locate
-dnl libraries, but is otherwise very convenient.
-AC_DEFUN([AC_LIB_PREFIX],
-[
- AC_BEFORE([$0], [AC_LIB_LINKFLAGS])
- AC_REQUIRE([AC_PROG_CC])
- AC_REQUIRE([AC_CANONICAL_HOST])
- AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
- dnl By default, look in $includedir and $libdir.
- use_additional=yes
- AC_LIB_WITH_FINAL_PREFIX([
- eval additional_includedir=\"$includedir\"
- eval additional_libdir=\"$libdir\"
- ])
- AC_LIB_ARG_WITH([lib-prefix],
-[ --with-lib-prefix[=DIR] search for libraries in DIR/include and DIR/lib
- --without-lib-prefix don't search for libraries in includedir and libdir],
-[
- if test "X$withval" = "Xno"; then
- use_additional=no
- else
- if test "X$withval" = "X"; then
- AC_LIB_WITH_FINAL_PREFIX([
- eval additional_includedir=\"$includedir\"
- eval additional_libdir=\"$libdir\"
- ])
- else
- additional_includedir="$withval/include"
- additional_libdir="$withval/lib"
- fi
- fi
-])
- if test $use_additional = yes; then
- dnl Potentially add $additional_includedir to $CPPFLAGS.
- dnl But don't add it
- dnl 1. if it's the standard /usr/include,
- dnl 2. if it's already present in $CPPFLAGS,
- dnl 3. if it's /usr/local/include and we are using GCC on Linux,
- dnl 4. if it doesn't exist as a directory.
- if test "X$additional_includedir" != "X/usr/include"; then
- haveit=
- for x in $CPPFLAGS; do
- AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
- if test "X$x" = "X-I$additional_includedir"; then
- haveit=yes
- break
- fi
- done
- if test -z "$haveit"; then
- if test "X$additional_includedir" = "X/usr/local/include"; then
- if test -n "$GCC"; then
- case $host_os in
- linux* | gnu* | k*bsd*-gnu) haveit=yes;;
- esac
- fi
- fi
- if test -z "$haveit"; then
- if test -d "$additional_includedir"; then
- dnl Really add $additional_includedir to $CPPFLAGS.
- CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }-I$additional_includedir"
- fi
- fi
- fi
- fi
- dnl Potentially add $additional_libdir to $LDFLAGS.
- dnl But don't add it
- dnl 1. if it's the standard /usr/lib,
- dnl 2. if it's already present in $LDFLAGS,
- dnl 3. if it's /usr/local/lib and we are using GCC on Linux,
- dnl 4. if it doesn't exist as a directory.
- if test "X$additional_libdir" != "X/usr/lib"; then
- haveit=
- for x in $LDFLAGS; do
- AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
- if test "X$x" = "X-L$additional_libdir"; then
- haveit=yes
- break
- fi
- done
- if test -z "$haveit"; then
- if test "X$additional_libdir" = "X/usr/local/lib"; then
- if test -n "$GCC"; then
- case $host_os in
- linux*) haveit=yes;;
- esac
- fi
- fi
- if test -z "$haveit"; then
- if test -d "$additional_libdir"; then
- dnl Really add $additional_libdir to $LDFLAGS.
- LDFLAGS="${LDFLAGS}${LDFLAGS:+ }-L$additional_libdir"
- fi
- fi
- fi
- fi
- fi
-])
-
-dnl AC_LIB_PREPARE_PREFIX creates variables acl_final_prefix,
-dnl acl_final_exec_prefix, containing the values to which $prefix and
-dnl $exec_prefix will expand at the end of the configure script.
-AC_DEFUN([AC_LIB_PREPARE_PREFIX],
-[
- dnl Unfortunately, prefix and exec_prefix get only finally determined
- dnl at the end of configure.
- if test "X$prefix" = "XNONE"; then
- acl_final_prefix="$ac_default_prefix"
- else
- acl_final_prefix="$prefix"
- fi
- if test "X$exec_prefix" = "XNONE"; then
- acl_final_exec_prefix='${prefix}'
- else
- acl_final_exec_prefix="$exec_prefix"
- fi
- acl_save_prefix="$prefix"
- prefix="$acl_final_prefix"
- eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
- prefix="$acl_save_prefix"
-])
-
-dnl AC_LIB_WITH_FINAL_PREFIX([statement]) evaluates statement, with the
-dnl variables prefix and exec_prefix bound to the values they will have
-dnl at the end of the configure script.
-AC_DEFUN([AC_LIB_WITH_FINAL_PREFIX],
-[
- acl_save_prefix="$prefix"
- prefix="$acl_final_prefix"
- acl_save_exec_prefix="$exec_prefix"
- exec_prefix="$acl_final_exec_prefix"
- $1
- exec_prefix="$acl_save_exec_prefix"
- prefix="$acl_save_prefix"
-])
-
-# lib-link.m4 serial 6 (gettext-0.14.3)
-dnl Copyright (C) 2001-2005 Free Software Foundation, Inc.
-dnl This file is free software; the Free Software Foundation
-dnl gives unlimited permission to copy and/or distribute it,
-dnl with or without modifications, as long as this notice is preserved.
-
-dnl From Bruno Haible.
-
-AC_PREREQ(2.50)
-
-dnl AC_LIB_LINKFLAGS(name [, dependencies]) searches for libname and
-dnl the libraries corresponding to explicit and implicit dependencies.
-dnl Sets and AC_SUBSTs the LIB${NAME} and LTLIB${NAME} variables and
-dnl augments the CPPFLAGS variable.
-AC_DEFUN([AC_LIB_LINKFLAGS],
-[
- AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
- AC_REQUIRE([AC_LIB_RPATH])
- define([Name],[translit([$1],[./-], [___])])
- define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
- [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
- AC_CACHE_CHECK([how to link with lib[]$1], [ac_cv_lib[]Name[]_libs], [
- AC_LIB_LINKFLAGS_BODY([$1], [$2])
- ac_cv_lib[]Name[]_libs="$LIB[]NAME"
- ac_cv_lib[]Name[]_ltlibs="$LTLIB[]NAME"
- ac_cv_lib[]Name[]_cppflags="$INC[]NAME"
- ])
- LIB[]NAME="$ac_cv_lib[]Name[]_libs"
- LTLIB[]NAME="$ac_cv_lib[]Name[]_ltlibs"
- INC[]NAME="$ac_cv_lib[]Name[]_cppflags"
- AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME)
- AC_SUBST([LIB]NAME)
- AC_SUBST([LTLIB]NAME)
- dnl Also set HAVE_LIB[]NAME so that AC_LIB_HAVE_LINKFLAGS can reuse the
- dnl results of this search when this library appears as a dependency.
- HAVE_LIB[]NAME=yes
- undefine([Name])
- undefine([NAME])
-])
-
-dnl AC_LIB_HAVE_LINKFLAGS(name, dependencies, includes, testcode)
-dnl searches for libname and the libraries corresponding to explicit and
-dnl implicit dependencies, together with the specified include files and
-dnl the ability to compile and link the specified testcode. If found, it
-dnl sets and AC_SUBSTs HAVE_LIB${NAME}=yes and the LIB${NAME} and
-dnl LTLIB${NAME} variables and augments the CPPFLAGS variable, and
-dnl #defines HAVE_LIB${NAME} to 1. Otherwise, it sets and AC_SUBSTs
-dnl HAVE_LIB${NAME}=no and LIB${NAME} and LTLIB${NAME} to empty.
-AC_DEFUN([AC_LIB_HAVE_LINKFLAGS],
-[
- AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
- AC_REQUIRE([AC_LIB_RPATH])
- define([Name],[translit([$1],[./-], [___])])
- define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
- [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
-
- dnl Search for lib[]Name and define LIB[]NAME, LTLIB[]NAME and INC[]NAME
- dnl accordingly.
- AC_LIB_LINKFLAGS_BODY([$1], [$2])
-
- dnl Add $INC[]NAME to CPPFLAGS before performing the following checks,
- dnl because if the user has installed lib[]Name and not disabled its use
- dnl via --without-lib[]Name-prefix, he wants to use it.
- ac_save_CPPFLAGS="$CPPFLAGS"
- AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME)
-
- AC_CACHE_CHECK([for lib[]$1], [ac_cv_lib[]Name], [
- ac_save_LIBS="$LIBS"
- LIBS="$LIBS $LIB[]NAME"
- AC_TRY_LINK([$3], [$4], [ac_cv_lib[]Name=yes], [ac_cv_lib[]Name=no])
- LIBS="$ac_save_LIBS"
- ])
- if test "$ac_cv_lib[]Name" = yes; then
- HAVE_LIB[]NAME=yes
- AC_DEFINE([HAVE_LIB]NAME, 1, [Define if you have the $1 library.])
- AC_MSG_CHECKING([how to link with lib[]$1])
- AC_MSG_RESULT([$LIB[]NAME])
- else
- HAVE_LIB[]NAME=no
- dnl If $LIB[]NAME didn't lead to a usable library, we don't need
- dnl $INC[]NAME either.
- CPPFLAGS="$ac_save_CPPFLAGS"
- LIB[]NAME=
- LTLIB[]NAME=
- fi
- AC_SUBST([HAVE_LIB]NAME)
- AC_SUBST([LIB]NAME)
- AC_SUBST([LTLIB]NAME)
- undefine([Name])
- undefine([NAME])
-])
-
-dnl Determine the platform dependent parameters needed to use rpath:
-dnl libext, shlibext, hardcode_libdir_flag_spec, hardcode_libdir_separator,
-dnl hardcode_direct, hardcode_minus_L.
-AC_DEFUN([AC_LIB_RPATH],
-[
- dnl Tell automake >= 1.10 to complain if config.rpath is missing.
- m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([config.rpath])])
- AC_REQUIRE([AC_PROG_CC]) dnl we use $CC, $GCC, $LDFLAGS
- AC_REQUIRE([AC_LIB_PROG_LD]) dnl we use $LD, $with_gnu_ld
- AC_REQUIRE([AC_CANONICAL_HOST]) dnl we use $host
- AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT]) dnl we use $ac_aux_dir
- AC_CACHE_CHECK([for shared library run path origin], acl_cv_rpath, [
- CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
- ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
- . ./conftest.sh
- rm -f ./conftest.sh
- acl_cv_rpath=done
- ])
- wl="$acl_cv_wl"
- libext="$acl_cv_libext"
- shlibext="$acl_cv_shlibext"
- hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
- hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
- hardcode_direct="$acl_cv_hardcode_direct"
- hardcode_minus_L="$acl_cv_hardcode_minus_L"
- dnl Determine whether the user wants rpath handling at all.
- AC_ARG_ENABLE(rpath,
- [ --disable-rpath do not hardcode runtime library paths],
- :, enable_rpath=yes)
-])
-
-dnl AC_LIB_LINKFLAGS_BODY(name [, dependencies]) searches for libname and
-dnl the libraries corresponding to explicit and implicit dependencies.
-dnl Sets the LIB${NAME}, LTLIB${NAME} and INC${NAME} variables.
-AC_DEFUN([AC_LIB_LINKFLAGS_BODY],
-[
- define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
- [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
- dnl By default, look in $includedir and $libdir.
- use_additional=yes
- AC_LIB_WITH_FINAL_PREFIX([
- eval additional_includedir=\"$includedir\"
- eval additional_libdir=\"$libdir\"
- ])
- AC_LIB_ARG_WITH([lib$1-prefix],
-[ --with-lib$1-prefix[=DIR] search for lib$1 in DIR/include and DIR/lib
- --without-lib$1-prefix don't search for lib$1 in includedir and libdir],
-[
- if test "X$withval" = "Xno"; then
- use_additional=no
- else
- if test "X$withval" = "X"; then
- AC_LIB_WITH_FINAL_PREFIX([
- eval additional_includedir=\"$includedir\"
- eval additional_libdir=\"$libdir\"
- ])
- else
- additional_includedir="$withval/include"
- additional_libdir="$withval/lib"
- fi
- fi
-])
- dnl Search the library and its dependencies in $additional_libdir and
- dnl $LDFLAGS. Using breadth-first-seach.
- LIB[]NAME=
- LTLIB[]NAME=
- INC[]NAME=
- rpathdirs=
- ltrpathdirs=
- names_already_handled=
- names_next_round='$1 $2'
- while test -n "$names_next_round"; do
- names_this_round="$names_next_round"
- names_next_round=
- for name in $names_this_round; do
- already_handled=
- for n in $names_already_handled; do
- if test "$n" = "$name"; then
- already_handled=yes
- break
- fi
- done
- if test -z "$already_handled"; then
- names_already_handled="$names_already_handled $name"
- dnl See if it was already located by an earlier AC_LIB_LINKFLAGS
- dnl or AC_LIB_HAVE_LINKFLAGS call.
- uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
- eval value=\"\$HAVE_LIB$uppername\"
- if test -n "$value"; then
- if test "$value" = yes; then
- eval value=\"\$LIB$uppername\"
- test -z "$value" || LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$value"
- eval value=\"\$LTLIB$uppername\"
- test -z "$value" || LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$value"
- else
- dnl An earlier call to AC_LIB_HAVE_LINKFLAGS has determined
- dnl that this library doesn't exist. So just drop it.
- :
- fi
- else
- dnl Search the library lib$name in $additional_libdir and $LDFLAGS
- dnl and the already constructed $LIBNAME/$LTLIBNAME.
- found_dir=
- found_la=
- found_so=
- found_a=
- if test $use_additional = yes; then
- if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
- found_dir="$additional_libdir"
- found_so="$additional_libdir/lib$name.$shlibext"
- if test -f "$additional_libdir/lib$name.la"; then
- found_la="$additional_libdir/lib$name.la"
- fi
- else
- if test -f "$additional_libdir/lib$name.$libext"; then
- found_dir="$additional_libdir"
- found_a="$additional_libdir/lib$name.$libext"
- if test -f "$additional_libdir/lib$name.la"; then
- found_la="$additional_libdir/lib$name.la"
- fi
- fi
- fi
- fi
- if test "X$found_dir" = "X"; then
- for x in $LDFLAGS $LTLIB[]NAME; do
- AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
- case "$x" in
- -L*)
- dir=`echo "X$x" | sed -e 's/^X-L//'`
- if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
- found_dir="$dir"
- found_so="$dir/lib$name.$shlibext"
- if test -f "$dir/lib$name.la"; then
- found_la="$dir/lib$name.la"
- fi
- else
- if test -f "$dir/lib$name.$libext"; then
- found_dir="$dir"
- found_a="$dir/lib$name.$libext"
- if test -f "$dir/lib$name.la"; then
- found_la="$dir/lib$name.la"
- fi
- fi
- fi
- ;;
- esac
- if test "X$found_dir" != "X"; then
- break
- fi
- done
- fi
- if test "X$found_dir" != "X"; then
- dnl Found the library.
- LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$found_dir -l$name"
- if test "X$found_so" != "X"; then
- dnl Linking with a shared library. We attempt to hardcode its
- dnl directory into the executable's runpath, unless it's the
- dnl standard /usr/lib.
- if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
- dnl No hardcoding is needed.
- LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
- else
- dnl Use an explicit option to hardcode DIR into the resulting
- dnl binary.
- dnl Potentially add DIR to ltrpathdirs.
- dnl The ltrpathdirs will be appended to $LTLIBNAME at the end.
- haveit=
- for x in $ltrpathdirs; do
- if test "X$x" = "X$found_dir"; then
- haveit=yes
- break
- fi
- done
- if test -z "$haveit"; then
- ltrpathdirs="$ltrpathdirs $found_dir"
- fi
- dnl The hardcoding into $LIBNAME is system dependent.
- if test "$hardcode_direct" = yes; then
- dnl Using DIR/libNAME.so during linking hardcodes DIR into the
- dnl resulting binary.
- LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
- else
- if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
- dnl Use an explicit option to hardcode DIR into the resulting
- dnl binary.
- LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
- dnl Potentially add DIR to rpathdirs.
- dnl The rpathdirs will be appended to $LIBNAME at the end.
- haveit=
- for x in $rpathdirs; do
- if test "X$x" = "X$found_dir"; then
- haveit=yes
- break
- fi
- done
- if test -z "$haveit"; then
- rpathdirs="$rpathdirs $found_dir"
- fi
- else
- dnl Rely on "-L$found_dir".
- dnl But don't add it if it's already contained in the LDFLAGS
- dnl or the already constructed $LIBNAME
- haveit=
- for x in $LDFLAGS $LIB[]NAME; do
- AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
- if test "X$x" = "X-L$found_dir"; then
- haveit=yes
- break
- fi
- done
- if test -z "$haveit"; then
- LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir"
- fi
- if test "$hardcode_minus_L" != no; then
- dnl FIXME: Not sure whether we should use
- dnl "-L$found_dir -l$name" or "-L$found_dir $found_so"
- dnl here.
- LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
- else
- dnl We cannot use $hardcode_runpath_var and LD_RUN_PATH
- dnl here, because this doesn't fit in flags passed to the
- dnl compiler. So give up. No hardcoding. This affects only
- dnl very old systems.
- dnl FIXME: Not sure whether we should use
- dnl "-L$found_dir -l$name" or "-L$found_dir $found_so"
- dnl here.
- LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name"
- fi
- fi
- fi
- fi
- else
- if test "X$found_a" != "X"; then
- dnl Linking with a static library.
- LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_a"
- else
- dnl We shouldn't come here, but anyway it's good to have a
- dnl fallback.
- LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir -l$name"
- fi
- fi
- dnl Assume the include files are nearby.
- additional_includedir=
- case "$found_dir" in
- */lib | */lib/)
- basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
- additional_includedir="$basedir/include"
- ;;
- esac
- if test "X$additional_includedir" != "X"; then
- dnl Potentially add $additional_includedir to $INCNAME.
- dnl But don't add it
- dnl 1. if it's the standard /usr/include,
- dnl 2. if it's /usr/local/include and we are using GCC on Linux,
- dnl 3. if it's already present in $CPPFLAGS or the already
- dnl constructed $INCNAME,
- dnl 4. if it doesn't exist as a directory.
- if test "X$additional_includedir" != "X/usr/include"; then
- haveit=
- if test "X$additional_includedir" = "X/usr/local/include"; then
- if test -n "$GCC"; then
- case $host_os in
- linux* | gnu* | k*bsd*-gnu) haveit=yes;;
- esac
- fi
- fi
- if test -z "$haveit"; then
- for x in $CPPFLAGS $INC[]NAME; do
- AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
- if test "X$x" = "X-I$additional_includedir"; then
- haveit=yes
- break
- fi
- done
- if test -z "$haveit"; then
- if test -d "$additional_includedir"; then
- dnl Really add $additional_includedir to $INCNAME.
- INC[]NAME="${INC[]NAME}${INC[]NAME:+ }-I$additional_includedir"
- fi
- fi
- fi
- fi
- fi
- dnl Look for dependencies.
- if test -n "$found_la"; then
- dnl Read the .la file. It defines the variables
- dnl dlname, library_names, old_library, dependency_libs, current,
- dnl age, revision, installed, dlopen, dlpreopen, libdir.
- save_libdir="$libdir"
- case "$found_la" in
- */* | *\\*) . "$found_la" ;;
- *) . "./$found_la" ;;
- esac
- libdir="$save_libdir"
- dnl We use only dependency_libs.
- for dep in $dependency_libs; do
- case "$dep" in
- -L*)
- additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
- dnl Potentially add $additional_libdir to $LIBNAME and $LTLIBNAME.
- dnl But don't add it
- dnl 1. if it's the standard /usr/lib,
- dnl 2. if it's /usr/local/lib and we are using GCC on Linux,
- dnl 3. if it's already present in $LDFLAGS or the already
- dnl constructed $LIBNAME,
- dnl 4. if it doesn't exist as a directory.
- if test "X$additional_libdir" != "X/usr/lib"; then
- haveit=
- if test "X$additional_libdir" = "X/usr/local/lib"; then
- if test -n "$GCC"; then
- case $host_os in
- linux* | gnu* | k*bsd*-gnu) haveit=yes;;
- esac
- fi
- fi
- if test -z "$haveit"; then
- haveit=
- for x in $LDFLAGS $LIB[]NAME; do
- AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
- if test "X$x" = "X-L$additional_libdir"; then
- haveit=yes
- break
- fi
- done
- if test -z "$haveit"; then
- if test -d "$additional_libdir"; then
- dnl Really add $additional_libdir to $LIBNAME.
- LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$additional_libdir"
- fi
- fi
- haveit=
- for x in $LDFLAGS $LTLIB[]NAME; do
- AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
- if test "X$x" = "X-L$additional_libdir"; then
- haveit=yes
- break
- fi
- done
- if test -z "$haveit"; then
- if test -d "$additional_libdir"; then
- dnl Really add $additional_libdir to $LTLIBNAME.
- LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$additional_libdir"
- fi
- fi
- fi
- fi
- ;;
- -R*)
- dir=`echo "X$dep" | sed -e 's/^X-R//'`
- if test "$enable_rpath" != no; then
- dnl Potentially add DIR to rpathdirs.
- dnl The rpathdirs will be appended to $LIBNAME at the end.
- haveit=
- for x in $rpathdirs; do
- if test "X$x" = "X$dir"; then
- haveit=yes
- break
- fi
- done
- if test -z "$haveit"; then
- rpathdirs="$rpathdirs $dir"
- fi
- dnl Potentially add DIR to ltrpathdirs.
- dnl The ltrpathdirs will be appended to $LTLIBNAME at the end.
- haveit=
- for x in $ltrpathdirs; do
- if test "X$x" = "X$dir"; then
- haveit=yes
- break
- fi
- done
- if test -z "$haveit"; then
- ltrpathdirs="$ltrpathdirs $dir"
- fi
- fi
- ;;
- -l*)
- dnl Handle this in the next round.
- names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
- ;;
- *.la)
- dnl Handle this in the next round. Throw away the .la's
- dnl directory; it is already contained in a preceding -L
- dnl option.
- names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
- ;;
- *)
- dnl Most likely an immediate library name.
- LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$dep"
- LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$dep"
- ;;
- esac
- done
- fi
- else
- dnl Didn't find the library; assume it is in the system directories
- dnl known to the linker and runtime loader. (All the system
- dnl directories known to the linker should also be known to the
- dnl runtime loader, otherwise the system is severely misconfigured.)
- LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name"
- LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-l$name"
- fi
- fi
- fi
- done
- done
- if test "X$rpathdirs" != "X"; then
- if test -n "$hardcode_libdir_separator"; then
- dnl Weird platform: only the last -rpath option counts, the user must
- dnl pass all path elements in one option. We can arrange that for a
- dnl single library, but not when more than one $LIBNAMEs are used.
- alldirs=
- for found_dir in $rpathdirs; do
- alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
- done
- dnl Note: hardcode_libdir_flag_spec uses $libdir and $wl.
- acl_save_libdir="$libdir"
- libdir="$alldirs"
- eval flag=\"$hardcode_libdir_flag_spec\"
- libdir="$acl_save_libdir"
- LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag"
- else
- dnl The -rpath options are cumulative.
- for found_dir in $rpathdirs; do
- acl_save_libdir="$libdir"
- libdir="$found_dir"
- eval flag=\"$hardcode_libdir_flag_spec\"
- libdir="$acl_save_libdir"
- LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag"
- done
- fi
- fi
- if test "X$ltrpathdirs" != "X"; then
- dnl When using libtool, the option that works for both libraries and
- dnl executables is -R. The -R options are cumulative.
- for found_dir in $ltrpathdirs; do
- LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-R$found_dir"
- done
- fi
-])
-
-dnl AC_LIB_APPENDTOVAR(VAR, CONTENTS) appends the elements of CONTENTS to VAR,
-dnl unless already present in VAR.
-dnl Works only for CPPFLAGS, not for LIB* variables because that sometimes
-dnl contains two or three consecutive elements that belong together.
-AC_DEFUN([AC_LIB_APPENDTOVAR],
-[
- for element in [$2]; do
- haveit=
- for x in $[$1]; do
- AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
- if test "X$x" = "X$element"; then
- haveit=yes
- break
- fi
- done
- if test -z "$haveit"; then
- [$1]="${[$1]}${[$1]:+ }$element"
- fi
- done
-])
-
-# lib-ld.m4 serial 3 (gettext-0.13)
-dnl Copyright (C) 1996-2003 Free Software Foundation, Inc.
-dnl This file is free software; the Free Software Foundation
-dnl gives unlimited permission to copy and/or distribute it,
-dnl with or without modifications, as long as this notice is preserved.
-
-dnl Subroutines of libtool.m4,
-dnl with replacements s/AC_/AC_LIB/ and s/lt_cv/acl_cv/ to avoid collision
-dnl with libtool.m4.
-
-dnl From libtool-1.4. Sets the variable with_gnu_ld to yes or no.
-AC_DEFUN([AC_LIB_PROG_LD_GNU],
-[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], acl_cv_prog_gnu_ld,
-[# I'd rather use --version here, but apparently some GNU ld's only accept -v.
-case `$LD -v 2>&1 </dev/null` in
-*GNU* | *'with BFD'*)
- acl_cv_prog_gnu_ld=yes ;;
-*)
- acl_cv_prog_gnu_ld=no ;;
-esac])
-with_gnu_ld=$acl_cv_prog_gnu_ld
-])
-
-dnl From libtool-1.4. Sets the variable LD.
-AC_DEFUN([AC_LIB_PROG_LD],
-[AC_ARG_WITH(gnu-ld,
-[ --with-gnu-ld assume the C compiler uses GNU ld [default=no]],
-test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no)
-AC_REQUIRE([AC_PROG_CC])dnl
-AC_REQUIRE([AC_CANONICAL_HOST])dnl
-# Prepare PATH_SEPARATOR.
-# The user is always right.
-if test "${PATH_SEPARATOR+set}" != set; then
- echo "#! /bin/sh" >conf$$.sh
- echo "exit 0" >>conf$$.sh
- chmod +x conf$$.sh
- if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
- PATH_SEPARATOR=';'
- else
- PATH_SEPARATOR=:
- fi
- rm -f conf$$.sh
-fi
-ac_prog=ld
-if test "$GCC" = yes; then
- # Check if gcc -print-prog-name=ld gives a path.
- AC_MSG_CHECKING([for ld used by GCC])
- case $host in
- *-*-mingw*)
- # gcc leaves a trailing carriage return which upsets mingw
- ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
- *)
- ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
- esac
- case $ac_prog in
- # Accept absolute paths.
- [[\\/]* | [A-Za-z]:[\\/]*)]
- [re_direlt='/[^/][^/]*/\.\./']
- # Canonicalize the path of ld
- ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
- while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
- ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
- done
- test -z "$LD" && LD="$ac_prog"
- ;;
- "")
- # If it fails, then pretend we aren't using GCC.
- ac_prog=ld
- ;;
- *)
- # If it is relative, then search for the first ld in PATH.
- with_gnu_ld=unknown
- ;;
- esac
-elif test "$with_gnu_ld" = yes; then
- AC_MSG_CHECKING([for GNU ld])
-else
- AC_MSG_CHECKING([for non-GNU ld])
-fi
-AC_CACHE_VAL(acl_cv_path_LD,
-[if test -z "$LD"; then
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
- for ac_dir in $PATH; do
- test -z "$ac_dir" && ac_dir=.
- if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
- acl_cv_path_LD="$ac_dir/$ac_prog"
- # Check to see if the program is GNU ld. I'd rather use --version,
- # but apparently some GNU ld's only accept -v.
- # Break only if it was the GNU/non-GNU ld that we prefer.
- case `"$acl_cv_path_LD" -v 2>&1 < /dev/null` in
- *GNU* | *'with BFD'*)
- test "$with_gnu_ld" != no && break ;;
- *)
- test "$with_gnu_ld" != yes && break ;;
- esac
- fi
- done
- IFS="$ac_save_ifs"
-else
- acl_cv_path_LD="$LD" # Let the user override the test with a path.
-fi])
-LD="$acl_cv_path_LD"
-if test -n "$LD"; then
- AC_MSG_RESULT($LD)
-else
- AC_MSG_RESULT(no)
-fi
-test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
-AC_LIB_PROG_LD_GNU
-])
-
-dnl This provides configure definitions used by all the winsup
-dnl configure.in files.
-
-# FIXME: We temporarily define our own version of AC_PROG_CC. This is
-# copied from autoconf 2.12, but does not call AC_PROG_CC_WORKS. We
-# are probably using a cross compiler, which will not be able to fully
-# link an executable. This should really be fixed in autoconf
-# itself.
-
-AC_DEFUN([LIB_AC_PROG_CC_GNU],
-[AC_CACHE_CHECK(whether we are using GNU C, ac_cv_prog_gcc,
-[dnl The semicolon is to pacify NeXT's syntax-checking cpp.
-cat > conftest.c <<EOF
-#ifdef __GNUC__
- yes;
-#endif
-EOF
-if AC_TRY_COMMAND(${CC-cc} -E conftest.c) | egrep yes >/dev/null 2>&1; then
- ac_cv_prog_gcc=yes
-else
- ac_cv_prog_gcc=no
-fi])])
-
-AC_DEFUN([LIB_AC_PROG_CC],
-[AC_BEFORE([$0], [AC_PROG_CPP])dnl
-AC_CHECK_TOOL(CC, gcc, gcc)
-: ${CC:=gcc}
-AC_PROG_CC
-test -z "$CC" && AC_MSG_ERROR([no acceptable cc found in \$PATH])
-])
-
-AC_DEFUN([LIB_AC_PROG_CXX],
-[AC_BEFORE([$0], [AC_PROG_CPP])dnl
-AC_CHECK_TOOL(CXX, g++, g++)
-if test -z "$CXX"; then
- AC_CHECK_TOOL(CXX, g++, c++, , , )
- : ${CXX:=g++}
- AC_PROG_CXX
- test -z "$CC" && AC_MSG_ERROR([no acceptable cc found in \$PATH])
-fi
-
-CXXFLAGS='$(CFLAGS)'
-])
-
diff --git a/winsup/doc/bodysnatcher.pl b/winsup/doc/bodysnatcher.pl
index 1db30aad4..74d893cd2 100755
--- a/winsup/doc/bodysnatcher.pl
+++ b/winsup/doc/bodysnatcher.pl
@@ -1,5 +1,4 @@
#!/usr/bin/perl -w
-# Copyright © 2013 by Red Hat, Inc.
#
# This file is part of Cygwin.
#
diff --git a/winsup/doc/configure b/winsup/doc/configure
index 996722fc1..eeaa312f5 100755
--- a/winsup/doc/configure
+++ b/winsup/doc/configure
@@ -1,6 +1,8 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.69.
+# Generated by GNU Autoconf 2.69 for Cygwin Documentation 0.
+#
+# Report bugs to <cygwin@cygwin.com>.
#
#
# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
@@ -263,10 +265,11 @@ fi
$as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
$as_echo "$0: be upgraded to zsh 4.3.4 or later."
else
- $as_echo "$0: Please tell bug-autoconf@gnu.org about your system,
-$0: including any error possibly output before this
-$0: message. Then install a modern shell, or manually run
-$0: the script under such a shell if you do have one."
+ $as_echo "$0: Please tell bug-autoconf@gnu.org and cygwin@cygwin.com
+$0: about your system, including any error possibly output
+$0: before this message. Then install a modern shell, or
+$0: manually run the script under such a shell if you do
+$0: have one."
fi
exit 1
fi
@@ -574,14 +577,14 @@ MFLAGS=
MAKEFLAGS=
# Identity of this package.
-PACKAGE_NAME=
-PACKAGE_TARNAME=
-PACKAGE_VERSION=
-PACKAGE_STRING=
-PACKAGE_BUGREPORT=
-PACKAGE_URL=
-
-ac_unique_file="cygwin-api.in.xml"
+PACKAGE_NAME='Cygwin Documentation'
+PACKAGE_TARNAME='cygwin'
+PACKAGE_VERSION='0'
+PACKAGE_STRING='Cygwin Documentation 0'
+PACKAGE_BUGREPORT='cygwin@cygwin.com'
+PACKAGE_URL='https://cygwin.com'
+
+ac_unique_file="cygwin-api.xml"
ac_no_link=no
ac_subst_vars='LTLIBOBJS
LIBOBJS
@@ -605,6 +608,10 @@ build_os
build_vendor
build_cpu
build
+DOCBOOK2XTEXI
+INSTALL_DATA
+INSTALL_SCRIPT
+INSTALL_PROGRAM
target_alias
host_alias
build_alias
@@ -695,7 +702,7 @@ sharedstatedir='${prefix}/com'
localstatedir='${prefix}/var'
includedir='${prefix}/include'
oldincludedir='/usr/include'
-docdir='${datarootdir}/doc/${PACKAGE}'
+docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
infodir='${datarootdir}/info'
htmldir='${docdir}'
dvidir='${docdir}'
@@ -1195,7 +1202,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures this package to adapt to many kinds of systems.
+\`configure' configures Cygwin Documentation 0 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1243,7 +1250,7 @@ Fine tuning of the installation directories:
--infodir=DIR info documentation [DATAROOTDIR/info]
--localedir=DIR locale-dependent data [DATAROOTDIR/locale]
--mandir=DIR man documentation [DATAROOTDIR/man]
- --docdir=DIR documentation root [DATAROOTDIR/doc/PACKAGE]
+ --docdir=DIR documentation root [DATAROOTDIR/doc/cygwin]
--htmldir=DIR html documentation [DOCDIR]
--dvidir=DIR dvi documentation [DOCDIR]
--pdfdir=DIR pdf documentation [DOCDIR]
@@ -1260,7 +1267,9 @@ _ACEOF
fi
if test -n "$ac_init_help"; then
-
+ case $ac_init_help in
+ short | recursive ) echo "Configuration of Cygwin Documentation 0:";;
+ esac
cat <<\_ACEOF
Some influential environment variables:
@@ -1275,7 +1284,8 @@ Some influential environment variables:
Use these variables to override the choices made by `configure' or to help
it to find libraries and programs with nonstandard names/locations.
-Report bugs to the package provider.
+Report bugs to <cygwin@cygwin.com>.
+Cygwin Documentation home page: <https://cygwin.com>.
_ACEOF
ac_status=$?
fi
@@ -1338,7 +1348,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-configure
+Cygwin Documentation configure 0
generated by GNU Autoconf 2.69
Copyright (C) 2012 Free Software Foundation, Inc.
@@ -1393,7 +1403,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by $as_me, which was
+It was created by Cygwin Documentation $as_me 0, which was
generated by GNU Autoconf 2.69. Invocation command line was
$ $0 $@
@@ -1741,6 +1751,7 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $
ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
ac_aux_dir=
for ac_dir in ../.. "$srcdir"/../..; do
if test -f "$ac_dir/install-sh"; then
@@ -1771,6 +1782,142 @@ ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
+# Find a good install program. We prefer a C program (faster),
+# so one script is as good as another. But avoid the broken or
+# incompatible versions:
+# SysV /etc/install, /usr/sbin/install
+# SunOS /usr/etc/install
+# IRIX /sbin/install
+# AIX /bin/install
+# AmigaOS /C/install, which installs bootblocks on floppy discs
+# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
+# AFS /usr/afsws/bin/install, which mishandles nonexistent args
+# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
+# OS/2's system install, which has a completely different semantic
+# ./install, which can be erroneously created by make from ./install.sh.
+# Reject install programs that cannot install multiple files.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
+$as_echo_n "checking for a BSD-compatible install... " >&6; }
+if test -z "$INSTALL"; then
+if ${ac_cv_path_install+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ # Account for people who put trailing slashes in PATH elements.
+case $as_dir/ in #((
+ ./ | .// | /[cC]/* | \
+ /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
+ ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
+ /usr/ucb/* ) ;;
+ *)
+ # OSF1 and SCO ODT 3.0 have their own names for install.
+ # Don't use installbsd from OSF since it installs stuff as root
+ # by default.
+ for ac_prog in ginstall scoinst install; do
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
+ if test $ac_prog = install &&
+ grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
+ # AIX install. It has an incompatible calling convention.
+ :
+ elif test $ac_prog = install &&
+ grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
+ # program-specific install script used by HP pwplus--don't use.
+ :
+ else
+ rm -rf conftest.one conftest.two conftest.dir
+ echo one > conftest.one
+ echo two > conftest.two
+ mkdir conftest.dir
+ if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
+ test -s conftest.one && test -s conftest.two &&
+ test -s conftest.dir/conftest.one &&
+ test -s conftest.dir/conftest.two
+ then
+ ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
+ break 3
+ fi
+ fi
+ fi
+ done
+ done
+ ;;
+esac
+
+ done
+IFS=$as_save_IFS
+
+rm -rf conftest.one conftest.two conftest.dir
+
+fi
+ if test "${ac_cv_path_install+set}" = set; then
+ INSTALL=$ac_cv_path_install
+ else
+ # As a last resort, use the slow shell script. Don't cache a
+ # value for INSTALL within a source directory, because that will
+ # break other packages using the cache if that directory is
+ # removed, or if the value is a relative name.
+ INSTALL=$ac_install_sh
+ fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
+$as_echo "$INSTALL" >&6; }
+
+# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
+# It thinks the first close brace ends the variable substitution.
+test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
+
+test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
+
+test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
+
+for ac_prog in docbook2x-texi db2x_docbook2texi
+do
+ # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_DOCBOOK2XTEXI+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$DOCBOOK2XTEXI"; then
+ ac_cv_prog_DOCBOOK2XTEXI="$DOCBOOK2XTEXI" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_DOCBOOK2XTEXI="$ac_prog"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+DOCBOOK2XTEXI=$ac_cv_prog_DOCBOOK2XTEXI
+if test -n "$DOCBOOK2XTEXI"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DOCBOOK2XTEXI" >&5
+$as_echo "$DOCBOOK2XTEXI" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+ test -n "$DOCBOOK2XTEXI" && break
+done
+test -n "$DOCBOOK2XTEXI" || DOCBOOK2XTEXI="true"
+
# Make sure we can run config.sub.
$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
@@ -1883,100 +2030,6 @@ test -n "$target_alias" &&
NONENONEs,x,x, &&
program_prefix=${target_alias}-
-
-if test -n "$ac_tool_prefix"; then
- # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
-set dummy ${ac_tool_prefix}gcc; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_CC+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- if test -n "$CC"; then
- ac_cv_prog_CC="$CC" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_prog_CC="${ac_tool_prefix}gcc"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
- done
-IFS=$as_save_IFS
-
-fi
-fi
-CC=$ac_cv_prog_CC
-if test -n "$CC"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
-$as_echo "$CC" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-fi
-if test -z "$ac_cv_prog_CC"; then
- ac_ct_CC=$CC
- # Extract the first word of "gcc", so it can be a program name with args.
-set dummy gcc; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_ac_ct_CC+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- if test -n "$ac_ct_CC"; then
- ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_prog_ac_ct_CC="gcc"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
- done
-IFS=$as_save_IFS
-
-fi
-fi
-ac_ct_CC=$ac_cv_prog_ac_ct_CC
-if test -n "$ac_ct_CC"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
-$as_echo "$ac_ct_CC" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
- if test "x$ac_ct_CC" = x; then
- CC="gcc"
- else
- case $cross_compiling:$ac_tool_warned in
-yes:)
-{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
-$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
-ac_tool_warned=yes ;;
-esac
- CC=$ac_ct_CC
- fi
-else
- CC="$ac_cv_prog_CC"
-fi
-
-: ${CC:=gcc}
ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
@@ -2842,8 +2895,6 @@ ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_c_compiler_gnu
-test -z "$CC" && as_fn_error $? "no acceptable cc found in \$PATH" "$LINENO" 5
-
@@ -3391,7 +3442,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by $as_me, which was
+This file was extended by Cygwin Documentation $as_me 0, which was
generated by GNU Autoconf 2.69. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -3438,13 +3489,14 @@ Usage: $0 [OPTION]... [TAG]...
Configuration files:
$config_files
-Report bugs to the package provider."
+Report bugs to <cygwin@cygwin.com>.
+Cygwin Documentation home page: <https://cygwin.com>."
_ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
-config.status
+Cygwin Documentation config.status 0
configured by $0, generated by GNU Autoconf 2.69,
with options \\"\$ac_cs_config\\"
@@ -3454,6 +3506,7 @@ gives unlimited permission to copy, distribute and modify it."
ac_pwd='$ac_pwd'
srcdir='$srcdir'
+INSTALL='$INSTALL'
test -n "\$AWK" || AWK=awk
_ACEOF
@@ -3889,6 +3942,10 @@ ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
# CONFIG_FILE
#
+ case $INSTALL in
+ [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
+ *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
+ esac
_ACEOF
cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
@@ -3942,6 +3999,7 @@ s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
s&@builddir@&$ac_builddir&;t t
s&@abs_builddir@&$ac_abs_builddir&;t t
s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
+s&@INSTALL@&$ac_INSTALL&;t t
$ac_datarootdir_hack
"
eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
diff --git a/winsup/doc/configure.ac b/winsup/doc/configure.ac
index ea5d61074..8364dc79e 100644
--- a/winsup/doc/configure.ac
+++ b/winsup/doc/configure.ac
@@ -1,5 +1,4 @@
-dnl Autoconf configure script for winsup/regexp
-dnl Copyright 1997,1998,1999,2000,2001 Red Hat, Inc.
+dnl Autoconf configure script for winsup/doc
dnl
dnl This file is part of Cygwin.
dnl
@@ -9,15 +8,19 @@ dnl details.
dnl Process this file with autoconf to produce a configure script.
-AC_PREREQ(2.59)
-AC_INIT(cygwin-api.in.xml)
+AC_PREREQ([2.59])
+AC_INIT([Cygwin Documentation],[0],[cygwin@cygwin.com],[cygwin],[https://cygwin.com])
+AC_CONFIG_SRCDIR(cygwin-api.xml)
AC_CONFIG_AUX_DIR(../..)
+AC_PROG_INSTALL
+AC_CHECK_PROGS([DOCBOOK2XTEXI], [docbook2x-texi db2x_docbook2texi], [true])
AC_NO_EXECUTABLES
-AC_CANONICAL_SYSTEM
+AC_CANONICAL_TARGET
-LIB_AC_PROG_CC
+AC_PROG_CC
AC_SUBST(build_exeext)
-AC_OUTPUT(Makefile)
+AC_CONFIG_FILES([Makefile])
+AC_OUTPUT
diff --git a/winsup/doc/cygserver.xml b/winsup/doc/cygserver.xml
index 6a4ec4ec5..684904832 100644
--- a/winsup/doc/cygserver.xml
+++ b/winsup/doc/cygserver.xml
@@ -27,11 +27,6 @@
passwords in <command>set(e)uid</command> does not require running
Cygserver. For details, see <xref linkend="ntsec-setuid-overview"></xref>.
</para></listitem>
- <listitem><para>This functionality is no longer used since Cygwin 1.7.6,
- but the interface is still available: Control slave tty/pty handle dispersal
- from tty owner to other processes without compromising the owner processes'
- security. Starting with Cygwin 1.7.6 another safe mechanism to share tty/pty
- handles is used.</para></listitem>
</itemizedlist>
</sect2>
@@ -179,6 +174,19 @@
</sect2>
+<sect2 id="install-cygserver"><title>How to install Cygserver</title>
+
+<para>
+ Cygserver is part of the base <emphasis role='bold'>cygwin</emphasis> package.
+ Therefore, whenever Cygwin is installed, so is Cygserver.
+</para>
+<para>
+ You may want to install Cygserver as a service. See
+ <xref linkend="start-cygserver"></xref>.
+</para>
+
+</sect2>
+
<sect2 id="start-cygserver"><title>How to start Cygserver</title>
<para>
diff --git a/winsup/doc/cygwin-api.in.xml b/winsup/doc/cygwin-api.in.xml
deleted file mode 100644
index 3fee468dc..000000000
--- a/winsup/doc/cygwin-api.in.xml
+++ /dev/null
@@ -1,34 +0,0 @@
-<?xml version="1.0" encoding='UTF-8'?>
-<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook V4.5//EN"
- "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
-
-<book id="cygwin-api" xmlns:xi="http://www.w3.org/2001/XInclude">
-
- <bookinfo>
- <date>1998-08-31</date>
- <title>Cygwin API Reference</title>
-DOCTOOL-INSERT-legal
- </bookinfo>
-
- <toc></toc>
-
-<chapter id="compatibility"><title>Compatibility</title>
-DOCTOOL-INSERT-std-susv4
-DOCTOOL-INSERT-std-bsd
-DOCTOOL-INSERT-std-gnu
-DOCTOOL-INSERT-std-solaris
-DOCTOOL-INSERT-std-deprec
-DOCTOOL-INSERT-std-notimpl
-DOCTOOL-INSERT-std-notes
-</chapter>
-
-<chapter id="cygwin-functions"><title>Cygwin Functions</title>
-
-<para>These functions are specific to Cygwin itself, and probably
-won't be found anywhere else. </para>
-
-DOCTOOL-INSERT-func-
-
-</chapter>
-
-</book>
diff --git a/winsup/doc/cygwin-api.xml b/winsup/doc/cygwin-api.xml
new file mode 100644
index 000000000..267c2cb71
--- /dev/null
+++ b/winsup/doc/cygwin-api.xml
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding='UTF-8'?>
+<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook V4.5//EN"
+ "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
+
+<book id="cygwin-api" xmlns:xi="http://www.w3.org/2001/XInclude">
+
+ <bookinfo>
+ <title>Cygwin API Reference</title>
+ <abstract role="texinfo-node">
+ <para>Cygwin API Reference</para>
+ </abstract>
+ <xi:include href="legal.xml"/>
+ </bookinfo>
+
+ <toc></toc>
+
+ <xi:include href="posix.xml"/>
+
+ <chapter id="cygwin-functions" xmlns:xi="http://www.w3.org/2001/XInclude">
+ <title>Cygwin Functions</title>
+
+ <para>
+ These functions are specific to Cygwin itself, and probably won't be
+ found anywhere else.
+ </para>
+
+ <xi:include href="path.xml"/>
+ <xi:include href="logon-funcs.xml"/>
+ <xi:include href="misc-funcs.xml"/>
+
+ </chapter>
+
+</book>
diff --git a/winsup/doc/cygwin-ug-net.xml b/winsup/doc/cygwin-ug-net.xml
index 89526d721..b6a9eef97 100644
--- a/winsup/doc/cygwin-ug-net.xml
+++ b/winsup/doc/cygwin-ug-net.xml
@@ -4,8 +4,10 @@
<book id="cygwin-ug-net" xmlns:xi="http://www.w3.org/2001/XInclude">
<bookinfo>
- <date>2009-03-18</date>
<title>Cygwin User's Guide</title>
+ <abstract role="texinfo-node">
+ <para>Cygwin User's Guide</para>
+ </abstract>
<xi:include href="legal.xml"/>
</bookinfo>
diff --git a/winsup/doc/cygwin.xsl b/winsup/doc/cygwin.xsl
deleted file mode 100644
index 23512934a..000000000
--- a/winsup/doc/cygwin.xsl
+++ /dev/null
@@ -1,12 +0,0 @@
-<?xml version='1.0'?>
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
- xmlns:fo="http://www.w3.org/1999/XSL/Format"
- version='1.0'>
-
-<xsl:param name="chunker.output.doctype-public"
- select="'-//W3C//DTD HTML 4.01 Transitional//EN'" />
-<xsl:param name="html.stylesheet" select="'docbook.css'"/>
-<xsl:param name="use.id.as.filename" select="1" />
-<xsl:param name="root.filename" select="@id" />
-
-</xsl:stylesheet>
diff --git a/winsup/doc/cygwinenv.xml b/winsup/doc/cygwinenv.xml
index 5a3e999b2..5fadaee15 100644
--- a/winsup/doc/cygwinenv.xml
+++ b/winsup/doc/cygwinenv.xml
@@ -20,7 +20,7 @@ by prefixing with <literal>no</literal>.</para>
foreign applications which try to inject threads into a Cygwin process,
or which redirect system sockets by providing an enforced so-called
<literal>Layered Service Provider</literal>. This may or may not help to
-detect <ulink url="http://cygwin.com/faq/faq.html#faq.using.bloda">
+detect <ulink url="https://cygwin.com/faq/faq.html#faq.using.bloda">
BLODAs</ulink>. Don't use this option for day-to-day usage, it will slow
down every thread and socket creation!</para>
</listitem>
@@ -28,7 +28,7 @@ down every thread and socket creation!</para>
<listitem>
<para><envar>(no)dosfilewarning</envar> - If set, Cygwin will warn the
first time a user uses an "MS-DOS" style path name rather than a POSIX-style
-path name. Defaults to set.</para>
+path name. Defaults to off.</para>
</listitem>
<listitem>
@@ -119,8 +119,8 @@ system call will immediately fail.</para>
<title>Obsolete options</title>
<para>
-Certain CYGWIN options available in past releases have been removed in
-Cygwin 1.7 for one reason or another. These obsolete options are listed
+Certain CYGWIN options available in past releases have been removed over
+time for one reason or another. These obsolete options are listed
below.</para>
<itemizedlist mark="bullet">
@@ -225,34 +225,19 @@ Windows programs.</para>
<listitem>
<para><envar>(no)upcaseenv</envar> - This option could be used to convert
all environment variables to uppercase. This was the default behavior in
-releases prior to Cygwin 1.7. Since keeping the case of environment
-variables intact is POSIXly correct, Cygwin now does not change the case
+older releases of Cygwin. Since keeping the case of environment variables
+intact is POSIXly correct, Cygwin now does not change the case
of environment variables, except for a restricted set to maintain minimal
backward compatibility. The current list of always uppercased variables is:
</para>
<screen>
- ALLUSERSPROFILE
COMMONPROGRAMFILES
- COMPUTERNAME
COMSPEC
- HOME
- HOMEDRIVE
- HOMEPATH
- NUMBER_OF_PROCESSORS
- OS
PATH
- PATHEXT
- PROCESSOR_ARCHITECTURE
- PROCESSOR_IDENTIFIER
- PROCESSOR_LEVEL
- PROCESSOR_REVISION
- PROGRAMFILES
SYSTEMDRIVE
SYSTEMROOT
TEMP
- TERM
TMP
- TMPDIR
WINDIR
</screen>
</listitem>
diff --git a/winsup/doc/doctool.c b/winsup/doc/doctool.c
deleted file mode 100644
index 0a5060c76..000000000
--- a/winsup/doc/doctool.c
+++ /dev/null
@@ -1,622 +0,0 @@
-/* doctool.c
-
- Copyright 1998,1999,2000,2001,2006 Red Hat, Inc.
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <dirent.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <utime.h>
-
-/* Building native in a cross-built directory is tricky. Be careful,
-and beware that you don't have the full portability stuff available to
-you (like libiberty) */
-
-/*****************************************************************************/
-
-/* The list of extensions that may contain SGML snippets. We check
- both cases in case the file system isn't case sensitive enough. */
-
-struct {
- char *upper;
- char *lower;
- int is_sgml;
-} extensions[] = {
- { ".C", ".c", 0 },
- { ".CC", ".cc", 0 },
- { ".H", ".h", 0 },
- { ".SGML", ".sgml", 1 },
- { 0, 0, 0 }
-};
-
-/*****************************************************************************/
-
-void
-show_help()
-{
- printf("Usage: doctool [-m] [-i] [-d dir] [-o outfile] [-s prefix] \\\n");
- printf(" [-b book_id] infile\n");
- printf(" -m means to adjust Makefile to include new dependencies\n");
- printf(" -i means to include internal snippets\n");
- printf(" -d means to recursively scan directory for snippets\n");
- printf(" -o means to output to file (else stdout)\n");
- printf(" -s means to suppress source dir prefix\n");
- printf(" -b means to change the <book id=\"book_id\">\n");
- printf("\n");
- printf("doctool looks for DOCTOOL-START and DOCTOOL-END lines in source,\n");
- printf("saves <foo id=\"bar\"> blocks, and looks for DOCTOOL-INSERT-bar\n");
- printf("commands to insert selected sections. IDs starting with int-\n");
- printf("are internal only, add- are added at the end of relevant sections\n");
- printf("or add-int- for both. Inserted sections are chosen by prefix,\n");
- printf("and sorted when inserted.\n");
- exit(1);
-}
-
-/*****************************************************************************/
-
-typedef struct Section {
- struct Section *next;
- struct OneFile *file;
- char *name;
- char internal;
- char addend;
- char used;
- char **lines;
- int num_lines;
- int max_lines;
-} Section;
-
-typedef struct OneFile {
- struct OneFile *next;
- char *filename;
- int enable_scan;
- int used;
- Section *sections;
-} OneFile;
-
-OneFile *file_list = 0;
-
-char *output_name = 0;
-FILE *output_file = 0;
-
-char *source_dir_prefix = "";
-char *book_id = 0;
-
-int internal_flag = 0;
-
-/*****************************************************************************/
-
-char *
-has_string(char *line, char *string)
-{
- int i;
- while (*line)
- {
- for (i=0; line[i]; i++)
- {
- if (!string[i])
- return line;
- if (line[i] != string[i])
- break;
- }
- line++;
- }
- return 0;
-}
-
-int
-starts_with(char *line, char *string)
-{
- int i=0;
- while (1)
- {
- if (!string[i])
- return 1;
- if (!line[i] || line[i] != string[i])
- return 0;
- i++;
- }
-}
-
-/*****************************************************************************/
-
-#ifdef S_ISLNK
-#define STAT lstat
-#else
-#define STAT stat
-#endif
-
-void
-scan_directory(dirname)
- char *dirname;
-{
- struct stat st;
- char *name;
- struct dirent *de;
- DIR *dir = opendir(dirname);
- if (!dir)
- return;
- while (de = readdir(dir))
- {
- if (strcmp(de->d_name, ".") == 0
- || strcmp(de->d_name, "..") == 0)
- continue;
-
- name = (char *)malloc(strlen(dirname)+strlen(de->d_name)+3);
- strcpy(name, dirname);
- strcat(name, "/");
- strcat(name, de->d_name);
-
- STAT(name, &st);
-
- if (S_ISDIR(st.st_mode) && strcmp(de->d_name, "CVS") != 0)
- {
- scan_directory(name);
- }
-
- else if (S_ISREG(st.st_mode))
- {
- char *dot = strrchr(de->d_name, '.');
- int i;
-
- if (dot)
- {
- for (i=0; extensions[i].upper; i++)
- if (strcmp(dot, extensions[i].upper) == 0
- || strcmp(dot, extensions[i].lower) == 0)
- {
- OneFile *one = (OneFile *)malloc(sizeof(OneFile));
- one->next = file_list;
- file_list = one;
- one->filename = name;
- one->enable_scan = ! extensions[i].is_sgml;
- one->used = 0;
- one->sections = 0;
- }
- }
- }
- }
- closedir (dir);
-}
-
-/*****************************************************************************/
-
-void
-scan_file(OneFile *one)
-{
- FILE *f = fopen(one->filename, "r");
- int enabled = ! one->enable_scan;
- char line[1000], *tag=0, *id=0, *tmp;
- int taglen = 0;
- Section *section = 0;
- Section **prev_section_ptr = &(one->sections);
-
- if (!f)
- {
- perror(one->filename);
- return;
- }
-
- while (fgets(line, 1000, f))
- {
- if (one->enable_scan)
- {
- /* source files have comment-embedded docs, check for them */
- if (has_string(line, "DOCTOOL-START"))
- enabled = 1;
- if (has_string(line, "DOCTOOL-END"))
- enabled = 0;
- }
- if (!enabled)
- continue;
-
- /* DOCTOOL-START
-
-<sect1 id="dt-tags">
-this is the doctool tags section.
-</sect1>
-
- DOCTOOL-END */
-
- if (!tag && line[0] == '<')
- {
- tag = (char *)malloc(strlen(line)+1);
- id = (char *)malloc(strlen(line)+1);
- if (sscanf(line, "<%s id=\"%[^\"]\">", tag, id) == 2)
- {
- if (strcmp(tag, "book") == 0 || strcmp(tag, "BOOK") == 0)
- {
- /* Don't want to "scan" these */
- return;
- }
- taglen = strlen(tag);
- section = (Section *)malloc(sizeof(Section));
- /* We want chunks within single files to appear in that order */
- section->next = 0;
- section->file = one;
- *prev_section_ptr = section;
- prev_section_ptr = &(section->next);
- section->internal = 0;
- section->addend = 0;
- section->used = 0;
- section->name = id;
- if (starts_with(section->name, "add-"))
- {
- section->addend = 1;
- section->name += 4;
- }
- if (starts_with(section->name, "int-"))
- {
- section->internal = 1;
- section->name += 4;
- }
- section->lines = (char **)malloc(10*sizeof(char *));
- section->num_lines = 0;
- section->max_lines = 10;
- }
- else
- {
- free(tag);
- free(id);
- tag = id = 0;
- }
- }
-
- if (tag && section)
- {
- if (section->num_lines >= section->max_lines)
- {
- section->max_lines += 10;
- section->lines = (char **)realloc(section->lines,
- section->max_lines * sizeof (char *));
- }
- section->lines[section->num_lines] = (char *)malloc(strlen(line)+1);
- strcpy(section->lines[section->num_lines], line);
- section->num_lines++;
-
- if (line[0] == '<' && line[1] == '/'
- && memcmp(line+2, tag, taglen) == 0
- && (isspace(line[2+taglen]) || line[2+taglen] == '>'))
- {
- /* last line! */
- tag = 0;
- }
- }
- }
- fclose(f);
-}
-
-/*****************************************************************************/
-
-Section **
-enumerate_matching_sections(char *name_prefix, int internal, int addend, int *count_ret)
-{
- Section **rv = (Section **)malloc(12*sizeof(Section *));
- int count = 0, max=10, prefix_len = strlen(name_prefix);
- OneFile *one;
- int wildcard = 0;
-
- if (name_prefix[strlen(name_prefix)-1] == '-')
- wildcard = 1;
-
- for (one=file_list; one; one=one->next)
- {
- Section *s;
- for (s=one->sections; s; s=s->next)
- {
- int matches = 0;
- if (wildcard)
- {
- if (starts_with(s->name, name_prefix))
- matches = 1;
- }
- else
- {
- if (strcmp(s->name, name_prefix) == 0)
- matches = 1;
- }
- if (s->internal <= internal
- && s->addend == addend
- && matches
- && ! s->used)
- {
- s->used = 1;
- if (count >= max)
- {
- max += 10;
- rv = (Section **)realloc(rv, max*sizeof(Section *));
- }
- rv[count++] = s;
- rv[count] = 0;
- }
- }
- }
- if (count_ret)
- *count_ret = count;
- return rv;
-}
-
-/*****************************************************************************/
-
-#define ID_CHARS "~@$%&()_-+[]{}:."
-
-void include_section(char *name, int addend);
-
-char *
-unprefix(char *fn)
-{
- int l = strlen(source_dir_prefix);
- if (memcmp(fn, source_dir_prefix, l) == 0)
- {
- fn += l;
- while (*fn == '/' || *fn == '\\')
- fn++;
- return fn;
- }
- return fn;
-}
-
-void
-parse_line(char *line, char *filename)
-{
- char *cmd = has_string(line, "DOCTOOL-INSERT-");
- char *sname, *send, *id, *save;
- if (!cmd)
- {
- if (book_id
- && (starts_with(line, "<book") || starts_with(line, "<BOOK")))
- {
- cmd = strchr(line, '>');
- if (cmd)
- {
- cmd++;
- fprintf(output_file, "<book id=\"%s\">", book_id);
- fputs(cmd, output_file);
- return;
- }
- }
- fputs(line, output_file);
- return;
- }
- if (cmd != line)
- fwrite(line, cmd-line, 1, output_file);
- save = (char *)malloc(strlen(line)+1);
- strcpy(save, line);
- line = save;
-
- sname = cmd + 15; /* strlen("DOCTOOL-INSERT-") */
- for (send = sname;
- *send && isalnum(*send) || strchr(ID_CHARS, *send);
- send++);
- id = (char *)malloc(send-sname+2);
- memcpy(id, sname, send-sname);
- id[send-sname] = 0;
- include_section(id, 0);
-
- fprintf(output_file, "<!-- %s -->\n", unprefix(filename));
-
- fputs(send, output_file);
- free(save);
-}
-
-int
-section_sort(const void *va, const void *vb)
-{
- Section *a = *(Section **)va;
- Section *b = *(Section **)vb;
- int rv = strcmp(a->name, b->name);
- if (rv)
- return rv;
- return a->internal - b->internal;
-}
-
-void
-include_section(char *name, int addend)
-{
- Section **sections, *s;
- int count, i, l;
-
- sections = enumerate_matching_sections(name, internal_flag, addend, &count);
-
- qsort(sections, count, sizeof(sections[0]), section_sort);
- for (i=0; i<count; i++)
- {
- s = sections[i];
- s->file->used = 1;
- fprintf(output_file, "<!-- %s -->\n", unprefix(s->file->filename));
- for (l=addend; l<s->num_lines-1; l++)
- parse_line(s->lines[l], s->file->filename);
- if (!addend)
- {
- include_section(s->name, 1);
- parse_line(s->lines[l], s->file->filename);
- }
- }
-
- free(sections);
-}
-
-void
-parse_sgml(FILE *in, char *input_name)
-{
- static char line[1000];
- while (fgets(line, 1000, in))
- {
- parse_line(line, input_name);
- }
-}
-
-/*****************************************************************************/
-
-void
-fix_makefile(char *output_name)
-{
- FILE *in, *out;
- char line[1000];
- int oname_len = strlen(output_name);
- OneFile *one;
- int used_something = 0;
- struct stat st;
- struct utimbuf times;
-
- stat("Makefile", &st);
-
- in = fopen("Makefile", "r");
- if (!in)
- {
- perror("Makefile");
- return;
- }
-
- out = fopen("Makefile.new", "w");
- if (!out)
- {
- perror("Makefile.new");
- return;
- }
-
- while (fgets(line, 1000, in))
- {
- if (starts_with(line, output_name)
- && strcmp(line+oname_len, ": \\\n") == 0)
- {
- /* this is the old dependency */
- while (fgets(line, 1000, in))
- {
- if (strcmp(line+strlen(line)-2, "\\\n"))
- break;
- }
- }
- else
- fputs(line, out);
- }
- fclose(in);
-
- for (one=file_list; one; one=one->next)
- if (one->used)
- {
- used_something = 1;
- break;
- }
-
- if (used_something)
- {
- fprintf(out, "%s:", output_name);
- for (one=file_list; one; one=one->next)
- if (one->used)
- fprintf(out, " \\\n\t%s", one->filename);
- fprintf(out, "\n");
- }
-
- fclose(out);
-
- times.actime = st.st_atime;
- times.modtime = st.st_mtime;
- utime("Makefile.new", &times);
-
- if (rename("Makefile", "Makefile.old"))
- return;
- if (rename("Makefile.new", "Makefile"))
- rename("Makefile.old", "Makefile");
-}
-
-/*****************************************************************************/
-
-int
-main(argc, argv)
- int argc;
- char **argv;
-{
- int i;
- OneFile *one;
- FILE *input_file;
- int fix_makefile_flag = 0;
-
- while (argc > 1 && argv[1][0] == '-')
- {
- if (strcmp(argv[1], "-h") == 0 || strcmp(argv[1], "--help") == 0)
- {
- show_help();
- }
- else if (strcmp(argv[1], "-i") == 0)
- {
- internal_flag = 1;
- }
- else if (strcmp(argv[1], "-m") == 0)
- {
- fix_makefile_flag = 1;
- }
- else if (strcmp(argv[1], "-d") == 0 && argc > 2)
- {
- scan_directory(argv[2]);
- argc--;
- argv++;
- }
- else if (strcmp(argv[1], "-o") == 0 && argc > 2)
- {
- output_name = argv[2];
- argc--;
- argv++;
- }
- else if (strcmp(argv[1], "-s") == 0 && argc > 2)
- {
- source_dir_prefix = argv[2];
- argc--;
- argv++;
- }
- else if (strcmp(argv[1], "-b") == 0 && argc > 2)
- {
- book_id = argv[2];
- argc--;
- argv++;
- }
-
- argc--;
- argv++;
- }
-
- for (one=file_list; one; one=one->next)
- {
- scan_file(one);
- }
-
- input_file = fopen(argv[1], "r");
- if (!input_file)
- {
- perror(argv[1]);
- return 1;
- }
-
- if (output_name)
- {
- output_file = fopen(output_name, "w");
- if (!output_file)
- {
- perror(output_name);
- return 1;
- }
- }
- else
- {
- output_file = stdout;
- output_name = "<stdout>";
- }
-
- parse_sgml(input_file, argv[1]);
-
- if (output_file != stdout)
- fclose(output_file);
-
- if (fix_makefile_flag)
- fix_makefile(output_name);
-
- return 0;
-}
diff --git a/winsup/doc/doctool.txt b/winsup/doc/doctool.txt
deleted file mode 100644
index c89e39243..000000000
--- a/winsup/doc/doctool.txt
+++ /dev/null
@@ -1,146 +0,0 @@
-Doctool
-
-DJ Delorie <dj@cygnus.com>
-
-These are the instructions for using doctool. Yes, I should have
-written them *in* DocBook, but hey, I was in a hurry.
-
-OK, doctool is a program that gathers snippets of a docbook document and
-puts them all together in the right order. There are three
-places that it gets snippets from:
-
-1. The document that you tell it you want "finished"
-
-2. blocks of SGML in *.sgml files
-
-3. comments in source code
-
-The first of these is the template file, which is to say, it's a
-normal SGML file (sort of). This file is the first one read, and
-includes such things as your <book> tags etc. It contains commands to
-doctool to tell it where to put the other parts.
-
-The second, the *.sgml files, contain one or more blocks of SGML.
-To work with doctool, each of these snippets must begin and end
-with matching tags, must have an id="" attribute, and the start/end
-tags must begin at the beginning of the line. For example:
-
-<foo id="frob-45">
- stuff goes here
-</foo>
-<bar id="frob-48">
- stuff goes here
-</bar>
-
-In this example, the file contains two snippets, one marked by "foo"
-and one barked by "bar", with id's "from-45" and "from-48". Note that
-I made up the foo and bar tags. You'd usually use a <sect1> tag or
-something useful like that. Stuff outside the blocks is ignored.
-
-The third is simply an encapsulation of the second in comments, like this:
-
-/* DOCTOOL-START
-<foo id="frob-45">
- stuff goes here
-</foo>
-DOCTOOL-END */
-
-The DOCTOOL-START and DOCTOOL-END things are special. Doctool uses
-those to know which parts of which comments are useful, and which
-parts are the useless source code stuff ;-)
-
-
-OK, so now we've got all these snippets of SGML floating around. What
-do we do with them? Well, inside the template document (#1 in our
-list up there) you'd put text snippets that said "ok, put them
-here". Each text snippet looks like this:
-
-DOCTOOL-INSERT-frob-
-
-Note that the "frob-" part tells doctool to pull in all the snippets
-with IDs that start with "frob-", in alphabetical (well, asciibetical
-at the moment) order. So, by saying "DOCTOOL-INSERT-frob-" you'd get
-all the "frob-*" snippets, like "frob-45" and "frob-48".
-
-If you just said DOCTOOL-INSERT-frob, it inserts the snippet named
-"frob" and no others.
-
-Note that no snippet will ever be inserted more than once, no matter
-how many DOCTOOL-INSERTs you have.
-
-There's two other tricks doctool has. If it finds a snippet with an ID
-like "int-*" (i.e. int-frob-45) that means that snippet of documentation
-is for the "internal" version only. The "int-" is discarded, and if
-the -i option is given to doctool, this snippet is treated as if the
-int- wasn't there. Without the -i, the int-* snippets are ignored
-completely.
-
-If a snippet has "add-" on it, like "add-frob-45", that's an addendum.
-Each time a snippet named without the add- is found, doctool looks for
-an addendum with exactly that same name (i.e. frob-45 looks for
-add-frob-45). If it finds any, it puts them just before the last line
-of the non-add snippet (so that it's *inside* the main snippet's
-block, not after it). Example:
-
-<sect1 id="frob-45">
- some text
-</sect1>
-<sect1 id="add-frob-45">
- more text
-</sect1>
-
-This would yield:
-
-<sect1 id="frob-45">
- some text
- more text
-</sect1>
-
-You should use the same outermost tags as the main snippet, but only
-because it sets the proper nesting rules for what's enclosed.
-
-You can use add- and int- at the same time, but always do add-int- and
-not int-add- (i.e. "add-int-frob-45").
-
-
-OK, now for doctool command line options.
-
--m tells doctool to "fix" the Makefile (not makefile) to include the
-extra dependencies needed by the file you're generating. You need to
-manually include dependencies on the Makefile itself and the template
-file; doctool only includes the snippet files (sources etc) that it
-actually pulled content from. Note: this isn't perfect! Someone can
-come along and add a new snippet to a source file, and doctool would
-never know. Sometimes, it's best to just rebuild the docs all the
-time.
-
--i means to include snippets with the "int-" prefix on their IDs. Use
-with -b to make internal and public versions from the same sources.
-
-"-d dir" tells doctool to scan all the files in that directory (and
-subdirectories, recursively) for files that might contain snippets of
-SGML. These include *.c, *.cc, *.h, and *.sgml. The idea is that
-most of the documentation would be in a *.sgml file named after the
-source (i.e. foo.c -> foo.sgml) but some commentary within the source
-might be useful in the docs as well. SGML files (*.sgml) do not need
-the DOCTOOL-START/END tags but the others do.
-
--o sets the output file. Without -o, the file goes to stdout (ick).
-
--s tells doctool to supress a "source directory prefix". What this
-means is that, in the generated output doctool puts comments that say
-where each snippet comes from (for debugging), which includes the full
-path sometimes, but if you use -s, you can tell doctool to cut off
-that prefix. For example,
-/usr/people/dj/src/cygnus/latest/devo/winsup/foo.c might get shortened
-to winsup/foo.c if you gave "-s
-/usr/people/dj/src/cygnus/latest/devo/". Cygnus makefiles could
-just use -s $(srcdir) most of the time.
-
--b changes the ID for the <book> tag. db2html uses the <book> tag's
-ID as the default subdirectory name and/or html file name to create
-the book with. You'd need this to generate two books (internal vs
-public) from the same source.
-
-The only other thing you'd add to the command line is the ONE template
-file you want to pull in.
diff --git a/winsup/doc/faq-api.xml b/winsup/doc/faq-api.xml
index de2d31cc6..993274a33 100644
--- a/winsup/doc/faq-api.xml
+++ b/winsup/doc/faq-api.xml
@@ -36,7 +36,7 @@ is going on). They are only intended for those people who wish to
contribute code to the project. If you aren't going to be happy
debugging problems in a buggy snapshot, avoid these and wait for a real
release. The snapshots are available from
-<ulink url="http://cygwin.com/snapshots/">http://cygwin.com/snapshots/</ulink>.
+<ulink url="https://cygwin.com/snapshots/"/>.
</para>
</answer></qandaentry>
@@ -264,8 +264,9 @@ direct calls to Winsock functions. If you use Cygwin, use the POSIX API.
<question><para>I don't want Unix sockets, how do I use normal Win32 winsock?</para></question>
<answer>
-<para>You don't. Look for the MingW project to port applications using
-native Win32/Winsock functions.
+<para>You don't. Look for the Mingw-w64 project to port applications using
+native Win32/Winsock functions. Cross compilers packages to build Mingw-w64
+targets are available in the Cygwin distro.
</para>
</answer></qandaentry>
@@ -278,8 +279,9 @@ shared library. First of all, since October 1998 every Cygwin DLL has
been named <literal>cygwin1.dll</literal> and has a 1 in the release name.
Additionally, there are DLL major and minor numbers that correspond to
the name of the release, and a release number. In other words,
-cygwin-1.7.1-2 is <literal>cygwin1.dll</literal>, major version 7, minor
-version 1, release 2.
+cygwin-2.4.1-1 is <literal>cygwin1.dll</literal>, major version 2, minor
+version 4, release 1. -1 is a subrelease number required by the distro
+versioning scheme. It's not actually part of the Cygwin DLL version number.
</para>
<para>The <literal>cygwin1.dll</literal> major version number gets incremented
only when a change is made that makes existing software incompatible. For
diff --git a/winsup/doc/faq-copyright.xml b/winsup/doc/faq-copyright.xml
index 95abaa2b4..c7005b495 100644
--- a/winsup/doc/faq-copyright.xml
+++ b/winsup/doc/faq-copyright.xml
@@ -10,7 +10,7 @@
<question><para>What are the copyrights?</para></question>
<answer>
- <para>Please see <ulink url="http://cygwin.com/licensing.html"/>
+ <para>Please see <ulink url="https://cygwin.com/licensing.html"/>
for more information about Cygwin copyright and licensing.</para>
</answer>
</qandaentry>
diff --git a/winsup/doc/faq-programming.xml b/winsup/doc/faq-programming.xml
index c01a127e6..3aa773a64 100644
--- a/winsup/doc/faq-programming.xml
+++ b/winsup/doc/faq-programming.xml
@@ -15,17 +15,17 @@ volunteers to prepare and maintain packages, because the priority of the
Cygwin Team is Cygwin itself.
</para>
<para>The Cygwin Package Contributor's Guide at
-<ulink url="http://cygwin.com/setup.html">http://cygwin.com/setup.html</ulink> details everything you need to know
+<ulink url="https://cygwin.com/setup.html"/> details everything you need to know
about being a package maintainer. The quickest way to get started is to
read the <emphasis>Initial packaging procedure, script-based</emphasis> section on
that page. The <literal>generic-build-script</literal> found there works well for
most packages.
</para>
<para>For questions about package maintenance, use the cygwin-apps mailing
-list (start at <ulink url="http://cygwin.com/lists.html">http://cygwin.com/lists.html</ulink>) <emphasis>after</emphasis>
+list (start at <ulink url="https://cygwin.com/lists.html"/>) <emphasis>after</emphasis>
searching and browsing the cygwin-apps list archives, of course. Be
sure to look at the <emphasis>Submitting a package</emphasis> checklist at
-<ulink url="http://cygwin.com/setup.html">http://cygwin.com/setup.html</ulink> before sending an ITP (Intent To
+<ulink url="https://cygwin.com/setup.html"/> before sending an ITP (Intent To
Package) email to cygwin-apps.
</para>
<para>You should also announce your intentions to the general cygwin list, in
@@ -38,7 +38,7 @@ case others were thinking the same thing.
<answer>
<para>If you want to contribute to Cygwin itself, see
-<ulink url="http://cygwin.com/contrib.html">http://cygwin.com/contrib.html</ulink>.
+<ulink url="https://cygwin.com/contrib.html"/>.
</para>
</answer></qandaentry>
@@ -90,8 +90,8 @@ Windows, while `long' on 64 bit Cygwin is 8 bytes.</para>
ReadFile (HANDLE, LPVOID, DWORD, LPDWORD, LPOVERLAPPED);
</screen>
-<para>In the 32 bit Cygwin and Mingw environments, as well as in the 64 bit
-Mingw environment, it is no problem to substitute DWORD with unsigned
+<para>In the 32 bit Cygwin and Mingw-w64 environments, as well as in the 64 bit
+Mingw-w64 environment, it is no problem to substitute DWORD with unsigned
long:</para>
<screen>
@@ -360,7 +360,7 @@ package at runtime.
<answer>
<para>Beware of using non-portable shell features in your Makefiles (see tips
-at <ulink url="http://cygwin.com/faq/faq.html#faq.using.shell-scripts" />).
+at <ulink url="https://cygwin.com/faq/faq.html#faq.using.shell-scripts"/>).
</para>
<para>Errors of <literal>make: execvp: /bin/sh: Illegal Argument</literal> or
<literal>make: execvp: /bin/sh: Argument list too long</literal> are often
@@ -388,7 +388,7 @@ done
</screen>
<para>
-See <ulink url="http://cygwin.com/cygwin-ug-net/using.html#mount-table" />
+See <ulink url="https://cygwin.com/cygwin-ug-net/using.html#mount-table"/>
for more information on using mount.
</para>
@@ -401,7 +401,7 @@ error?</para></question>
<para>
Try running cygserver. Read
-<ulink url="http://cygwin.com/cygwin-ug-net/using-cygserver.html" />. If you're
+<ulink url="https://cygwin.com/cygwin-ug-net/using-cygserver.html"/>. If you're
trying to use PostgreSQL, also read
<literal>/usr/share/doc/Cygwin/postgresql-*.README</literal>.
</para>
@@ -469,23 +469,19 @@ or at least after all the object files and static libraries that reference them.
<note><para>There are a few restrictions for calls to the Win32 API.
For details, see the User's Guide section
-<ulink url="http://cygwin.com/cygwin-ug-net/setup-env.html#setup-env-win32">Restricted Win32 environment</ulink>,
+<ulink url="https://cygwin.com/cygwin-ug-net/setup-env.html#setup-env-win32">Restricted Win32 environment</ulink>,
as well as the User's Guide section
-<ulink url="http://cygwin.com/cygwin-ug-net/using.html#pathnames-win32-api">Using the Win32 file API in Cygwin applications</ulink>.</para></note>
+<ulink url="https://cygwin.com/cygwin-ug-net/using.html#pathnames-win32-api">Using the Win32 file API in Cygwin applications</ulink>.</para></note>
</answer></qandaentry>
<qandaentry id="faq.programming.win32-no-cygwin">
<question><para>How do I compile a Win32 executable that doesn't use Cygwin?</para></question>
<answer>
-<para>The compilers provided by the <literal>mingw-gcc</literal>,
-<literal>mingw64-i686-gcc</literal>, and <literal>mingw64-x86_64-gcc</literal>
-packages link against standard Microsoft DLLs instead of Cygwin. This is
-desirable for native Windows programs that don't need a UNIX emulation layer.
-</para>
-<para>This is not to be confused with 'MinGW' (Minimalist GNU for Windows),
-which is a completely separate effort. That project's home page is
-<ulink url="http://www.mingw.org/index.shtml">http://www.mingw.org/index.shtml</ulink>.
+<para>The compilers provided by the <literal>mingw64-i686-gcc</literal> and
+<literal>mingw64-x86_64-gcc</literal> packages link against standard Microsoft
+DLLs instead of Cygwin. This is desirable for native Windows programs that
+don't need a UNIX emulation layer.
</para>
</answer></qandaentry>
@@ -500,9 +496,8 @@ self-contained executable.
</para>
<para>If this is an issue because you intend to distribute your Cygwin
application, then you had better read and understand
-<ulink url="http://cygwin.com/licensing.html">http://cygwin.com/licensing.html</ulink>, which explains the licensing
-options. Unless you purchase a special commercial license from Red
-Hat, then your Cygwin application must be Open Source.
+<ulink url="https://cygwin.com/licensing.html"/>, which explains the
+licensing options.
</para>
</answer></qandaentry>
@@ -549,18 +544,9 @@ have our own Win32 headers which are pretty complete.
</answer></qandaentry>
<qandaentry id="faq.programming.msvs-mingw">
-<question><para>How do I use <literal>cygwin1.dll</literal> with Visual Studio or MinGW?</para></question>
+<question><para>How do I use <literal>cygwin1.dll</literal> with Visual Studio or Mingw-w64?</para></question>
<answer>
-<para>Before you begin, note that Cygwin is licensed under the GNU GPL (as
-indeed are many other Cygwin-based libraries). That means that if your
-code links against the Cygwin dll (and if your program is calling
-functions from Cygwin, it must, as a matter of fact, be linked against
-it), you must apply the GPL to your source as well. Of course, this
-only matters if you plan to distribute your program in binary form. For
-more information, see <ulink url="http://gnu.org/licenses/gpl-faq.html">http://gnu.org/licenses/gpl-faq.html</ulink>. If
-that is not a problem, read on.
-</para>
<para>If you want to load the DLL dynamically, read
<literal>winsup/cygwin/how-cygtls-works.txt</literal> and the sample code in
<literal>winsup/testsuite/cygload</literal> to understand how this works.
@@ -693,20 +679,28 @@ rewriting the runtime library in question from specs...
<answer>
<para>First, you need to make sure you have the necessary build tools
-installed; you at least need <literal>gcc</literal>, <literal>make</literal>,
-<literal>perl</literal>, and <literal>cocom</literal>. If you want to run
-the tests, <literal>dejagnu</literal> is also required.
+installed; you at least need <literal>gcc-g++</literal>, <literal>make</literal>,
+<literal>perl</literal>, <literal>cocom</literal>, <literal>gettext</literal>, <literal>gettext-devel</literal>,
+and <literal>zlib-devel</literal>.
+Building for 32-bit Cygwin also requires <literal>libiconv</literal>,
+<literal>mingw64-i686-gcc-g++</literal>, <literal>mingw64-i686-zlib</literal>,
+and <literal>mingw64-x86_64-gcc-core</literal>.
+Building for 64-bit Cygwin also requires <literal>libiconv-devel</literal>,
+<literal>mingw64-x86_64-gcc-g++</literal>, and
+<literal>mingw64-x86_64-zlib</literal>.
+If you want to run the tests, <literal>dejagnu</literal> is also required.
Normally, building ignores any errors in building the documentation,
-which requires the <literal>dblatex</literal>, <literal>docbook-xml45</literal>, <literal>docbook-xsl</literal>, and
+which requires the <literal>dblatex</literal>,
+<literal>docbook-xml45</literal>, <literal>docbook-xsl</literal>, and
<literal>xmlto</literal> packages. For more information on building the
documentation, see the README included in the <literal>cygwin-doc</literal> package.
</para>
-<para>Next, get the Cygwin source. Ideally, you should check out
-what you need from CVS (<ulink url="http://cygwin.com/cvs.html" />). This is the
-<emphasis>preferred method</emphasis> for acquiring the sources. Otherwise, if
-you are trying to duplicate a cygwin release then you should
-download the corresponding source package
+<para>Next, get the Cygwin source. Ideally, you should check out what you
+need from Git (<ulink url="https://cygwin.com/git.html"/>). This is the
+<emphasis>preferred method</emphasis> for acquiring the sources. Otherwise,
+if you are trying to duplicate a cygwin release then you should download the
+corresponding source package
(<literal>cygwin-x.y.z-n-src.tar.bz2</literal>). </para>
<para>You <emphasis>must</emphasis> build cygwin in a separate directory from
@@ -739,14 +733,32 @@ same time. Remove all but one.
<question><para>I may have found a bug in Cygwin, how can I debug it (the symbols in gdb look funny)?</para></question>
<answer>
-<para>Debugging symbols are stripped from distibuted Cygwin binaries, so any
-symbols that you see in gdb are basically meaningless. It is also a good
+<para>Debugging symbols are stripped from distibuted Cygwin binaries, so to
+debug with <command>gdb</command> you will need to install the
+<package>cygwin-debuginfo</package> package to obtain the debug symbols for
+<filename>cygwin1.dll</filename>
+</para>
+
+<para>
+If your bug causes an exception inside <filename>cygwin1.dll</filename> you will
+need to use the <command>gdb</command> command <userinput>set cygwin-exceptions
+on</userinput> to tell <command>gdb</command> to stop on exceptions inside the
+Cygwin DLL (by default they are ignored, as they may be generated during normal
+operation e.g. when checking a pointer is valid)
+</para>
+
+<para>
+It is also a good
idea to use the latest code in case the bug has been fixed, so we
recommend trying the latest snapshot from
-<ulink url="http://cygwin.com/snapshots/" /> or building the DLL from CVS.
+<ulink url="https://cygwin.com/snapshots/"/> or building the DLL from git.
</para>
+
<para>To build a debugging version of the Cygwin DLL, you will need to follow
-the instructions at <ulink url="http://cygwin.com/faq/faq.html#faq.programming.building-cygwin" />.
+the instructions at <ulink url="https://cygwin.com/faq/faq.html#faq.programming.building-cygwin"/>.
+</para>
+
+<para>
You can also contact the mailing list for pointers (a simple test case that
demonstrates the bug is always welcome).
</para>
@@ -768,7 +780,7 @@ incompatibilities. Please send us patches if you do this work!
<answer>
<para>If you need to change the maximum amount of memory available to Cygwin, see
-<ulink url="http://cygwin.com/cygwin-ug-net/setup-maxmem.html">http://cygwin.com/cygwin-ug-net/setup-maxmem.html</ulink>. Otherwise,
+<ulink url="https://cygwin.com/cygwin-ug-net/setup-maxmem.html"/>. Otherwise,
just pass heap/stack linker arguments to gcc. To create foo.exe with
a heap size of 200MB and a stack size of 8MB, you would invoke
gcc as:
@@ -794,7 +806,7 @@ recursively, provided the command is in your path.
<answer>
<para>There's documentation that explains the process in the Cygwin User's
-Guide here: <ulink url="http://cygwin.com/cygwin-ug-net/dll.html">http://cygwin.com/cygwin-ug-net/dll.html</ulink>
+Guide here: <ulink url="https://cygwin.com/cygwin-ug-net/dll.html"/>.
</para>
</answer></qandaentry>
@@ -809,107 +821,6 @@ question.
</para>
</answer></qandaentry>
-<qandaentry id="faq.programming.dll-relocatable">
-<question><para>How can I build a relocatable dll?</para></question>
-<answer>
-
-<para><emphasis role='bold'>(Please note: This section has not yet been updated for the latest net release. However, there was a discussion on the cygwin mailing list once that addresses this issue. Read <ulink url="http://cygwin.com/ml/cygwin/2000-06/msg00688.html">http://cygwin.com/ml/cygwin/2000-06/msg00688.html</ulink> and related messages.)</emphasis>
-</para>
-<para>You must execute the following sequence of five commands, in this
-order:
-</para>
-<screen>
-$(LD) -s --base-file BASEFILE --dll -o DLLNAME OBJS LIBS -e ENTRY
-
-$(DLLTOOL) --as=$(AS) --dllname DLLNAME --def DEFFILE \
- --base-file BASEFILE --output-exp EXPFILE
-
-$(LD) -s --base-file BASEFILE EXPFILE -dll -o DLLNAME OBJS LIBS -e ENTRY
-
-$(DLLTOOL) --as=$(AS) --dllname DLLNAME --def DEFFILE \
- --base-file BASEFILE --output-exp EXPFILE
-
-$(LD) EXPFILE --dll -o DLLNAME OBJS LIBS -e ENTRY
-</screen>
-
-<para>In this example, $(LD) is the linker, ld.
-</para>
-<para>$(DLLTOOL) is dlltool.
-</para>
-<para>$(AS) is the assembler, as.
-</para>
-<para>DLLNAME is the name of the DLL you want to create, e.g., tcl80.dll.
-</para>
-<para>OBJS is the list of object files you want to put into the DLL.
-</para>
-<para>LIBS is the list of libraries you want to link the DLL against. For
-example, you may or may not want -lcygwin. You may want -lkernel32.
-</para>
-<para>DEFFILE is the name of your definitions file. A simple DEFFILE would
-consist of ``EXPORTS'' followed by a list of all symbols which should
-be exported from the DLL. Each symbol should be on a line by itself.
-Other programs will only be able to access the listed symbols.
-</para>
-<para>BASEFILE is a temporary file that is used during this five stage
-process, e.g., tcl.base.
-</para>
-<para>EXPFILE is another temporary file, e.g., tcl.exp.
-</para>
-<para>ENTRY is the name of the function which you want to use as the entry
-point. This function should be defined using the WINAPI attribute,
-and should take three arguments:
- int WINAPI startup (HINSTANCE, DWORD, LPVOID)
-</para>
-<para>This means that the actual symbol name will have an appended @12, so if
-your entry point really is named <literal>startup</literal>, the string you should
-use for ENTRY in the above examples would be <literal>startup@12</literal>.
-</para>
-<para>If your DLL calls any Cygwin API functions, the entry function will need
-to initialize the Cygwin impure pointer. You can do that by declaring
-a global variable <literal>_impure_ptr</literal>, and then initializing it in the
-entry function. Be careful not to export the global variable
-<literal>_impure_ptr</literal> from your DLL; that is, do not put it in DEFFILE.
-</para>
-<screen>
-/* This is a global variable. */
-struct _reent *_impure_ptr;
-extern struct _reent *__imp_reent_data;
-
-int entry (HINSTANT hinst, DWORD reason, LPVOID reserved)
-{
- _impure_ptr = __imp_reent_data;
- /* Whatever else you want to do. */
-}
-</screen>
-
-<para>You may put an optional `--subsystem windows' on the $(LD) lines.
-Note that if you specify a --subsytem &lt;x&gt; flag to ld,
-the -e entry must come after the subsystem flag, since the subsystem flag
-sets a different default entry point.
-</para>
-<para>You may put an optional `--image-base BASEADDR' on the $(LD) lines.
-This will set the default image base. Programs using this DLL will
-start up a bit faster if each DLL occupies a different portion of the
-address space. Each DLL starts at the image base, and continues for
-whatever size it occupies.
-</para>
-<para>Now that you've built your DLL, you may want to build a library so
-that other programs can link against it. This is not required: you
-could always use the DLL via LoadLibrary. However, if you want to be
-able to link directly against the DLL, you need to create a library.
-Do that like this:
-</para>
-<para>$(DLLTOOL) --as=$(AS) --dllname DLLNAME --def DEFFILE --output-lib LIBFILE
-</para>
-<para>$(DLLTOOL), $(AS), DLLNAME, and DEFFILE are the same as above. Make
-sure you use the same DLLNAME and DEFFILE, or things won't work right.
-</para>
-<para>LIBFILE is the name of the library you want to create, e.g.,
-libtcl80.a. You can then link against that library using something
-like -ltcl80 in your linker command.
-</para>
-</answer></qandaentry>
-
<qandaentry id="faq.programming.debug">
<question><para>How can I debug what's going on?</para></question>
<answer>
@@ -929,21 +840,27 @@ info would not be compatible with gdb).
<para>Yes. You can use the <literal>strace.exe</literal> utility to run other cygwin
programs with various debug and trace messages enabled. For information
-on using <literal>strace</literal>, see the Cygwin User's Guide or the file
-<literal>winsup/utils/utils.sgml</literal> in the Cygwin sources.
+on using <literal>strace</literal>, see the Cygwin User's Guide.
</para>
</answer></qandaentry>
<qandaentry id="faq.programming.gdb-signals">
-<question><para>Why doesn't gdb handle signals?</para></question>
+<question><para>How does gdb handle signals?</para></question>
<answer>
-<para>Unfortunately, there is only minimal signal handling support in gdb
-currently. Signal handling only works with Windows-type signals.
-SIGINT may work, SIGFPE may work, SIGSEGV definitely does. You cannot
-'stop', 'print' or 'nopass' signals like SIGUSR1 or SIGHUP to the
-process being debugged.
+<para>
+gdb maps known Windows exceptions to signals such as SIGSEGV, SIGFPE, SIGTRAP,
+SIGINT and SIGILL. Other Windows exceptions are passed on to the handler (if
+any), and reported as an unknown signal if an unhandled (second chance)
+exception occurs.
+</para>
+
+<para>
+There is also an experimental feature to notify gdb of purely Cygwin signals
+like SIGABRT, SIGHUP or SIGUSR1. This currently has some known problems, for
+example, single-stepping from these signals may not work as expected.
</para>
+
</answer></qandaentry>
<qandaentry id="faq.programming.linker">
diff --git a/winsup/doc/faq-resources.xml b/winsup/doc/faq-resources.xml
index 128b713a3..c79712718 100644
--- a/winsup/doc/faq-resources.xml
+++ b/winsup/doc/faq-resources.xml
@@ -24,20 +24,19 @@ their documentation in <literal>/usr/doc/</literal>
instead of <literal>/usr/share/doc/</literal>.
</para>
<para>There are links to quite a lot of documentation on the main Cygwin
-project web page, <ulink url="http://cygwin.com/">http://cygwin.com/</ulink>,
-including this FAQ. Be sure to at least read any 'Release Notes' or 'Readme'
-or 'read this' links on the main web page, if there are any.
+project web page, <ulink url="https://cygwin.com/"/>, including this FAQ.
+Be sure to at least read any 'Release Notes' or 'Readme' or 'read this'
+links on the main web page, if there are any.
</para>
-<para>There is a comprehensive Cygwin User's Guide at <ulink
-url="http://cygwin.com/cygwin-ug-net/cygwin-ug-net.html">http://cygwin.com/cygwin-ug-net/cygwin-ug-net.html</ulink>
-and an API Reference at <ulink
-url="http://cygwin.com/cygwin-api/cygwin-api.html">http://cygwin.com/cygwin-api/cygwin-api.html</ulink>.
+<para>There is a comprehensive Cygwin User's Guide at
+<ulink url="https://cygwin.com/cygwin-ug-net/cygwin-ug-net.html"/>
+and an API Reference at
+<ulink url="https://cygwin.com/cygwin-api/cygwin-api.html"/>.
</para>
-<para>You can find documentation for the individual GNU tools at <ulink
-url="http://www.fsf.org/manual/">http://www.fsf.org/manual/</ulink>. (You
-should read GNU manuals from a local mirror, check <ulink
-url="http://www.fsf.org/server/list-mirrors.html">http://www.fsf.org/server/list-mirrors.html</ulink>
-for a list of them.)
+<para>You can find documentation for the individual GNU tools at
+<ulink url="http://www.fsf.org/manual/"/>. (You should read GNU manuals from
+a local mirror, check
+<ulink url="http://www.fsf.org/server/list-mirrors.html"/> for a list of them.)
</para>
</answer></qandaentry>
@@ -45,14 +44,14 @@ for a list of them.)
<question><para>What Cygwin mailing lists can I join?</para></question>
<answer>
<para>Comprehensive information about the Cygwin mailing lists can be found at
-<ulink url="http://cygwin.com/lists.html" />.
+<ulink url="https://cygwin.com/lists.html"/>.
</para>
</answer></qandaentry>
<qandaentry id="faq.resources.problems">
<question><para>What if I have a problem? (Or: Why won't you/the mailing list answer my questions?)</para></question>
<answer>
-<para>Comprehensive information about reporting problems with Cygwin can be found at <ulink url="http://cygwin.com/problems.html" />.
+<para>Comprehensive information about reporting problems with Cygwin can be found at <ulink url="https://cygwin.com/problems.html"/>.
</para>
</answer></qandaentry>
</qandadiv>
diff --git a/winsup/doc/faq-setup.xml b/winsup/doc/faq-setup.xml
index 8339b61f3..89ec00d12 100644
--- a/winsup/doc/faq-setup.xml
+++ b/winsup/doc/faq-setup.xml
@@ -11,22 +11,20 @@
<answer>
<para>There is only one recommended way to install Cygwin, which is to use the GUI
-installer ``Cygwin Setup''. It is flexible and easy to use.
+installer <command>setup-*.exe</command>. It is flexible and easy to use.
You can pick and choose the packages you wish to install, and update
them individually. Full source code is available for all packages and
tools. More information on using Cygwin Setup may be found at
-<ulink url="http://cygwin.com/cygwin-ug-net/setup-net.html" />.
+<ulink url="https://cygwin.com/cygwin-ug-net/setup-net.html"/>.
</para>
-<para>If you do it any other way, you're on your own! That said, keep in mind
-that the GUI installer is a "work in progress", so there might be a few
-difficulties, especially if you are behind a firewall or have other
-specific requirements. If something doesn't work right for you, and
+<para>If you do it any other way, you're on your own!
+If something doesn't work right for you, and
it's not covered here or in the latest development snapshot at
-<ulink url="http://cygwin.com/snapshots/">http://cygwin.com/snapshots/</ulink>, then by all means report it to the
+<ulink url="https://cygwin.com/snapshots/"/>, then by all means report it to the
mailing list.
</para>
<para>For a searchable list of packages that can be installed with Cygwin,
-see <ulink url="http://cygwin.com/packages/">http://cygwin.com/packages/</ulink>.
+see <ulink url="https://cygwin.com/packages/"/>.
</para>
</answer></qandaentry>
@@ -37,10 +35,10 @@ see <ulink url="http://cygwin.com/packages/">http://cygwin.com/packages/</ulink>
<para>The Cygwin Setup program is designed to be interactive, but there are
a few different ways to automate it. If you are deploying to multiple systems,
the best way is to run through a full installation once, saving the entire
-downloaded package tree. Then, on target systems, run setup.exe as a "Local
-Install" pointed at your downloaded package tree. You could do this
-non-interactively with the command line options
-<literal>setup.exe -q -L -l x:\cygwin-local\</literal>, where your downloaded
+downloaded package tree. Then, on target systems, run Cygwin Setup as a
+"Local Install" pointed at your downloaded package tree. You could do this
+non-interactively with the command line options
+<literal>-q -L -l x:\cygwin-local\</literal>, where your downloaded
package tree is in <literal>x:\cygwin-local\</literal> (see the next FAQ for
an explanation of those options.)
</para>
@@ -52,37 +50,67 @@ For other options, search the mailing lists with terms such as
</answer></qandaentry>
<qandaentry id="faq.setup.cli">
-<question><para>Does setup.exe accept command-line arguments?</para></question>
+<question><para>Does Setup accept command-line arguments?</para></question>
<answer>
<para>Yes, the full listing is written to the <literal>setup.log</literal> file
-when you run <literal>setup.exe --help</literal>. The current options are:
+when you run <literal>setup-x86.exe --help</literal> or
+<literal>setup-x86_64.exe --help</literal>. The current options are:
<screen>
Command Line Options:
- -A --disable-buggy-antivirus Disable known or suspected buggy anti
- virus software packages during execution.
- -C --categories Specify entire categories to install
- -D --download Download from internet
- -d --no-desktop Disable creation of desktop shortcut
- -h --help print help
- -K --pubkey URL of extra public key file (gpg format)
- -L --local-install Install from local directory
- -l --local-package-dir Local package directory
- -n --no-shortcuts Disable creation of desktop and start menu
- shortcuts
- -N --no-startmenu Disable creation of start menu shortcut
- -O --only-site Ignore all sites except for -s
- -P --packages Specify packages to install
- -p --proxy HTTP/FTP proxy (host:port)
- -q --quiet-mode Unattended setup mode
- -r --no-replaceonreboot Disable replacing in-use files on next
- reboot.
- -R --root Root installation directory
- -S --sexpr-pubkey Extra public key in s-expr format
- -s --site Download site
- -U --keep-untrusted-keys Use untrusted keys and retain all
- -u --untrusted-keys Use untrusted keys from last-extrakeys
- -X --no-verify Don't verify setup.ini signatures
+ -D --download Download from internet
+ -L --local-install Install from local directory
+ -s --site Download site
+ -O --only-site Ignore all sites except for -s
+ -R --root Root installation directory
+ -x --remove-packages Specify packages to uninstall
+ -c --remove-categories Specify categories to uninstall
+ -P --packages Specify packages to install
+ -C --categories Specify entire categories to install
+ -p --proxy HTTP/FTP proxy (host:port)
+ -a --arch architecture to install (x86_64 or x86)
+ -q --quiet-mode Unattended setup mode
+ -M --package-manager Semi-attended chooser-only mode
+ -B --no-admin Do not check for and enforce running as
+ Administrator
+ -h --help print help
+ -l --local-package-dir Local package directory
+ -r --no-replaceonreboot Disable replacing in-use files on next
+ reboot.
+ -X --no-verify Don't verify setup.ini signatures
+ -n --no-shortcuts Disable creation of desktop and start menu
+ shortcuts
+ -N --no-startmenu Disable creation of start menu shortcut
+ -d --no-desktop Disable creation of desktop shortcut
+ -K --pubkey URL of extra public key file (gpg format)
+ -S --sexpr-pubkey Extra public key in s-expr format
+ -u --untrusted-keys Use untrusted keys from last-extrakeys
+ -U --keep-untrusted-keys Use untrusted keys and retain all
+ -g --upgrade-also also upgrade installed packages
+ -o --delete-orphans remove orphaned packages
+ -A --disable-buggy-antivirus Disable known or suspected buggy anti virus
+ software packages during execution.
+</screen>
+</para>
+</answer></qandaentry>
+
+<qandaentry id="faq.setup.noroot">
+<question><para>Can I install Cygwin without administrator rights?</para></question>
+<answer>
+
+<para>Yes. The default installation requests administrator rights because
+this allows to set up the Cygwin environment so that all users can start
+a Cygwin shell out of the box. However, if you don't have administrator
+rights for your machine, and the admins don't want to install it for you,
+you can install Cygwin just for yourself by downloading
+<command>setup-x86.exe</command> (for a 32 bit install) or
+<command>setup-x86_64.exe</command> (for a 64 bit install) and then start
+it from the command line or via the "Run..." dialog from the start menu
+using the <literal>--no-admin</literal> option, for instance:</para>
+
+<para>
+<screen>
+ setup-x86.exe --no-admin
</screen>
</para>
</answer></qandaentry>
@@ -115,10 +143,10 @@ now.)
<para>Cygwin Setup can be used to install any packages that are on a
Cygwin mirror, which usually includes one version previous to the
current one. The complete list may be searched at
-<ulink url="http://cygwin.com/packages/">http://cygwin.com/packages/</ulink>. There is no complete archive of
+<ulink url="https://cygwin.com/packages/"/>. There is no complete archive of
older packages. If you have a problem with the current version of
a Cygwin package, please report it to the mailing list using the
-guidelines at <ulink url="http://cygwin.com/problems.html">http://cygwin.com/problems.html</ulink>.
+guidelines at <ulink url="https://cygwin.com/problems.html"/>.
</para>
<para>That said, if you really need an older package, you may be able to find
an outdated or archival mirror by searching the web for an old package
@@ -128,20 +156,117 @@ and that installing the older version will not help improve Cygwin.
</para>
</answer></qandaentry>
-<qandaentry id="faq.setup.upgrade-mountpoints">
-<question><para>After upgrading from Cygwin 1.5 to Cygwin 1.7 my user mount points disappeared! How can I get them back?</para></question>
+<qandaentry id="faq.setup.install-security">
+<question><para>How does Cygwin secure the installation and update process?</para></question>
+<answer>
+
+<para>
+Here is how Cygwin secures the installation and update process to counter
+<ulink url="https://en.wikipedia.org/wiki/Man-in-the-middle_attack">man-in-the-middle (MITM) attacks</ulink>:
+</para>
+
+<orderedlist>
+<listitem><para>The Cygwin website provides the setup program
+(<literal>setup-x86.exe</literal> or <literal>setup-x86_64.exe</literal>)
+using HTTPS (SSL/TLS).
+This authenticates that the setup program
+came from the Cygwin website
+(users simply use their web browsers to download the setup program).
+You can use tools like Qualsys' SSL Server Test,
+<ulink url="https://www.ssllabs.com/ssltest/"/>,
+to check the HTTPS configuration of Cygwin.
+The cygwin.com site supports HTTP Strict Transport Security (HSTS),
+which forces the browser to keep using HTTPS once the browser has seen
+it before (this counters many downgrade attacks).
+</para></listitem>
+<listitem><para>The setup program has the
+Cygwin public key embedded in it.
+The Cygwin public key is protected from attacker subversion
+during transmission by the previous step, and this public
+key is then used to protect all later steps.
+You can confirm that the key is in setup by looking at the setup project
+(<ulink url="http://sourceware.org/cygwin-apps/setup.html"/>)
+source code file <literal>cyg-pubkey.h</literal>
+(the key is automatically generated from file <literal>cygwin.pub</literal>).
+</para></listitem>
+<listitem><para>The setup program downloads
+the package list <literal>setup.ini</literal> from a mirror
+and checks its digital signature.
+The package list is in the file
+<literal>setup.bz2</literal> (compressed) or
+<literal>setup.ini</literal> (uncompressed) on the selected mirror.
+The package list includes for every official Cygwin package
+the package name, cryptographic hash, and length (in bytes).
+The setup program also gets the relevant <literal>.sig</literal>
+(signature) file for that package list, and checks that the package list
+is properly signed with the Cygwin public key embedded in the setup program.
+A mirror could corrupt the package list and/or signature, but this
+would be detected by setup program's signature detection
+(unless you use the <literal>-X</literal> option to disable signature checking).
+The setup program also checks the package list
+timestamp/version and reports to the user if the file
+goes backwards in time; that process detects downgrade attacks
+(e.g., where an attacker subverts a mirror to send a signed package list
+that is older than the currently-downloaded version).
+</para></listitem>
+<listitem><para>The packages to be installed
+(which may be updates) are downloaded and both their
+lengths and cryptographic hashes
+(from the signed <literal>setup.{bz2,ini}</literal> file) are checked.
+Non-matching packages are rejected, countering any attacker's
+attempt to subvert the files on a mirror.
+Cygwin currently uses the cryptographic hash function SHA-512
+for the <literal>setup.ini</literal> files.
+</para></listitem>
+</orderedlist>
+
+<para>
+Cygwin uses the cryptographic hash algorithm SHA-512 as of 2015-03-23.
+The earlier 2015-02-06 update of the setup program added support for SHA-512
+(Cygwin previously used MD5).
+There are no known practical exploits of SHA-512 (SHA-512 is part of the
+widely-used SHA-2 suite of cryptographic hashes).
+</para>
+
+</answer></qandaentry>
+
+<qandaentry id="faq.setup.increase-install-security">
+<question><para>What else can I do to ensure that my installation and updates are secure?</para></question>
<answer>
<para>
-When you upgrade an existing older Cygwin installation to Cygwin 1.7, your old
-system mount points (stored in the HKEY_LOCAL_MACHINE branch of your registry)
-are read by a script and the /etc/fstab file is generated from these entries.
-No such automatism exists for the user mount points formerly stored in the
-HKEY_CURRENT_USER branch of the registry. There's a bash script for your
-convenience, which creates a user-specific /etc/fstab/${USER} file for you,
-called /bin/copy-user-registry-fstab. For more information on the new fstab
-files see the User's Guide at
-<ulink url="http://cygwin.com/cygwin-ug-net/using.html#mount-table">http://cygwin.com/cygwin-ug-net/using.html#mount-table</ulink>
+To best secure your installation and update process, download
+the setup program <literal>setup-x86.exe</literal> (32-bit) or
+<literal>setup-x86_64.exe</literal> (64-bit), and then
+check its signature (using a signature-checking tool you trust)
+using the Cygwin public key
+(<ulink url="https://cygwin.com/key/pubring.asc"/>).
+This was noted on the front page for installing and updating.
+</para>
+<para>
+If you use the actual Cygwin public key, and have an existing secure
+signature-checking process, you will counter many other
+attacks such as subversion of the Cygwin website and
+malicious certificates issued by untrustworthy certificate authorities (CAs).
+One challenge, of course, is ensuring that
+you have the actual Cygwin public key.
+You can increase confidence in the Cygwin public key by checking older copies
+of the Cygwin public key (to see if it's been the same over time).
+Another challenge is having a secure signature-checking process.
+You can use GnuPG to check signatures; if you have a trusted Cygwin
+installation you can install GnuPG.
+Otherwise, to check the signature you must use an existing trusted tool or
+install a signature-checking tool you can trust.
+</para>
+<para>
+Not everyone will go through this additional effort,
+but we make it possible for those who want that extra confidence.
+We also provide automatic mechanisms
+(such as our use of HTTPS) for those with limited time and
+do not want to perform the signature checking on the setup program itself.
+Once the correct setup program is running, it will counter other attacks
+as described in
+<ulink url="https://cygwin.com/faq/faq.html#faq.setup.install-security"/>.
</para>
</answer></qandaentry>
@@ -168,7 +293,8 @@ archives. If this happens to you, consider disabling your anti-virus
software when running Cygwin Setup. The following procedure should be
a fairly safe way to do that:
</para>
-<orderedlist><listitem><para>Download <literal>setup.exe</literal> and scan it explicitly.
+<orderedlist><listitem><para>Download <literal>setup-x86.exe</literal> or
+<literal>setup-x86_64.exe</literal> and scan it explicitly.
</para>
</listitem>
<listitem><para>Turn off the anti-virus software.
@@ -185,9 +311,14 @@ disk if you are paranoid.
</orderedlist>
<para>This should be safe, but only if Cygwin Setup is not substituted by
-something malicious, and no mirror has been compromised.
+something malicious.
+See also
+<ulink url="https://cygwin.com/faq/faq.html#faq.setup.install-security"/>
+for a description of how the
+Cygwin project counters man-in-the-middle (MITM) attacks.
</para>
-<para>See also <ulink url="http://cygwin.com/faq/faq.html#faq.using.bloda" />
+
+<para>See also <ulink url="https://cygwin.com/faq/faq.html#faq.using.bloda"/>
for a list of applications that have been known, at one time or another, to
interfere with the normal functioning of Cygwin.
</para>
@@ -199,10 +330,10 @@ interfere with the normal functioning of Cygwin.
<para>When using Cygwin Setup for the first time, the default is to install
a minimal subset of all available packages. If you want anything beyond that,
you will have to select it explicitly. See
-<ulink url="http://cygwin.com/packages/" /> for a searchable list of available
+<ulink url="https://cygwin.com/packages/"/> for a searchable list of available
packages, or use <literal>cygcheck -p </literal> as described in the Cygwin
User's Guide at
-<ulink url="http://cygwin.com/cygwin-ug-net/using-utils.html#cygcheck" />.
+<ulink url="https://cygwin.com/cygwin-ug-net/using-utils.html#cygcheck"/>.
</para>
<para>If you want to build programs, of course you'll need <literal>gcc</literal>,
<literal>binutils</literal>, <literal>make</literal> and probably other packages from the
@@ -275,10 +406,11 @@ installed, not including the package archives themselves nor the source
code.
</para>
<para>After installation, the package archives remain in your ``Local
-Package Directory'', by default the location of <literal>setup.exe</literal>. You
-may conserve disk space by deleting the subdirectories there. These
-directories will have very weird looking names, being encoded with
-their URLs (named <literal>ftp%3a%2f...</literal>).
+Package Directory''. By default the location of
+<literal>setup-x86{_64}.exe</literal>. You may conserve disk space by
+deleting the subdirectories there. These directories will have very weird
+looking names, being encoded with their URLs
+(named <literal>ftp%3a%2f...</literal>).
</para>
<para>Of course, you can keep them around in case you want to reinstall a
package. If you want to clean out only the outdated packages, Michael Chase
@@ -303,12 +435,11 @@ prior actions is in <literal>/var/log/setup.log</literal>.
<answer>
<para>First, make sure that you are using the latest version of Cygwin Setup.
-The latest version is always available from the 'Install Cygwin now' link on
-the Cygwin Home Page at <ulink
-url="http://cygwin.com/">http://cygwin.com/</ulink>. </para>
+The latest version is always available from the Cygwin Home Page at
+<ulink url="https://cygwin.com/"/>.
+</para>
<para>If you are downloading from the Internet, setup will fail if it cannot
-download the list of mirrors at <ulink
-url="http://cygwin.com/mirrors.html">http://cygwin.com/mirrors.html</ulink>.
+download the list of mirrors at <ulink url="https://cygwin.com/mirrors.html"/>.
It could be that the network is too busy. Something similar could be the
cause of a download site not working. Try another mirror, or try again
later.
@@ -333,35 +464,6 @@ what happened that wasn't supposed to happen, etc.
</para>
</answer></qandaentry>
-<qandaentry id="faq.setup.setup-fails-on-ts">
-<question><para>My installation on a Terminal Server machine goes wrong. What can I do?</para></question>
-<answer>
-
-<para>The problem is that Terminal Server machines do some compatibility
-checks when running applications which are not marked as
-"Terminal Server-aware", and this compatibility check seems to be buggy,
-leaving parts of the application in a non-executable state. Curious enough,
-this only happens if DEP (Data Execution Prevention) is turned on for
-all applications.</para>
-
-<para>So far, only few Cygwin packages have their binaries marked as
-TS-aware, which means there's a good chance that the postinstall scripts
-during the installation will break, and that after installation you
-can't start a shell, etc.</para>
-
-<para>So, for the time being, here's how you install Cygwin on a Terminal
-Server. First, switch DEP to "Turn on DEP for essential Windows programs
-and services only" and reboot the machine. Then install via setup.exe.
-You can leave it at that and run the Terminal Server in the aforementioned
-DEP setting. Or use the peflags tool from the rebase package to set
-the TS-aware flag in all executables, switch DEP back to "Turn on DEP for
-all programs and services except [...]" and reboot again. However,
-please keep in mind that a package update might re-install a binary
-with the TS-aware flag switched off again. So you will have to re-use
-the peflags utility once in a while.
-</para>
-</answer></qandaentry>
-
<qandaentry id="faq.setup.name-with-space">
<question><para>My Windows logon name has a space in it, will this cause problems?</para></question>
<answer>
@@ -373,12 +475,13 @@ you are much better off if you can avoid the problem entirely.
</para>
<para>You have two choices:
</para><orderedlist>
-<listitem><para>You can rename the user in the Windows User Manager GUI and then
-run mkpasswd.
+<listitem><para>You can rename the user in the Windows User Manager GUI.
</para>
</listitem>
-<listitem><para>You can simply edit the /etc/passwd file and change the Cygwin user name
-(first field). It's also a good idea to avoid spaces in the home directory.
+<listitem><para>If that's not possible, you can create an /etc/passwd file
+using the <command>mkpasswd</command> command. Then you can simply edit your
+Cygwin user name (first field). It's also a good idea to avoid spaces in the
+home directory.
</para>
</listitem>
</orderedlist>
@@ -389,32 +492,35 @@ run mkpasswd.
<question><para>My <literal>HOME</literal> environment variable is not what I want.</para></question>
<answer>
-<para>When starting Cygwin from Windows, <literal>HOME</literal> is determined as follows
-in order of decreasing priority:
+<para>When starting Cygwin from Windows, <literal>HOME</literal> is determined
+as follows:
</para>
<orderedlist>
-<listitem><para><literal>HOME</literal> from the Windows environment, translated to POSIX form.
+<listitem><para>If <literal>HOME</literal> is set in the Windows environment,
+translated to POSIX form.
</para>
</listitem>
-<listitem><para>The entry in /etc/passwd
-</para>
-</listitem>
-<listitem><para>/home/USERNAME
+<listitem><para>Otherwise, use the pw_home field from the passwd entry as
+returned by <command>getent passwd</command>. If you want to learn how this
+field is set by Cygwin and how you can change it, this is explained in great
+detail in the Cygwin User's Guide at
+<ulink url="https://cygwin.com/cygwin-ug-net/ntsec.html"/>.
</para>
</listitem>
</orderedlist>
-<para>When using Cygwin from the network (telnet, ssh,...), <literal>HOME</literal> is set
-from /etc/passwd.
+<para>When using Cygwin from a network login (via ssh for instance),
+<literal>HOME</literal> is always taken from the passwd entry.
</para>
-<para>If your <literal>HOME</literal> is set to a value such as /cygdrive/c, it is likely
-that it was set in Windows. Start a DOS Command Window and type
+<para>If your <literal>HOME</literal> is set to a value such as /cygdrive/c,
+it is likely that it was set in Windows. Start a DOS Command Window and type
"set HOME" to verify if this is the case.
</para>
-<para>Access to shared drives is often restricted when starting from the network,
-thus Domain users may wish to have a different <literal>HOME</literal> in the
-Windows environment (on shared drive) than in /etc/passwd (on local drive).
-Note that ssh only considers /etc/passwd, disregarding <literal>HOME</literal>.
+<para>Access to shared drives is often restricted when starting from the
+network, thus Domain users may wish to have a different <literal>HOME</literal>
+in the Windows environment (on shared drive) than in Cygwin (on local drive).
+Note that ssh only considers the account information as retrieved by
+getpwnam(3), disregarding <literal>HOME</literal>.
</para>
</answer></qandaentry>
@@ -459,7 +565,7 @@ of Cygwin is as follows:
<orderedlist>
<listitem><para>If you have any Cygwin services running, remove by repeating
the instructions in <ulink
-url="http://cygwin.com/faq/faq.html#faq.setup.uninstall-service" /> for
+url="https://cygwin.com/faq/faq.html#faq.setup.uninstall-service"/> for
all services that you installed. Common services that might have been
installed are <literal>sshd</literal>, <literal>cron</literal>,
<literal>cygserver</literal>, <literal>inetd</literal>, <literal>apache</literal>,
@@ -470,7 +576,16 @@ installed are <literal>sshd</literal>, <literal>cron</literal>,
that might be running in the background. Exit the command prompt and ensure
that no Cygwin processes remain. Note: If you want to save your mount points for a later
reinstall, first save the output of <literal>mount -m</literal> as described at
-<ulink url="http://cygwin.com/cygwin-ug-net/using-utils.html#mount" />.
+<ulink url="https://cygwin.com/cygwin-ug-net/using-utils.html#mount"/>.
+</para>
+</listitem>
+<listitem><para>If you installed <literal>cyglsa.dll</literal> by running the
+shell script <literal>/usr/bin/cyglsa-config</literal> as described in
+<ulink url="https://cygwin.com/cygwin-ug-net/ntsec.html"/>, then you need to
+configure Windows to stop using the LSA authentication package. You do so by
+editing the registry and restoring
+<literal>/HKEY_LOCAL_MACHINE/SYSTEM/CurrentControlSet/Control/Lsa/Authentication Packages</literal>
+back to it's original value of <literal>msv1_0</literal>, and then rebooting.
</para>
</listitem>
<listitem><para>Delete the Cygwin root folder and all subfolders. If you get an error
@@ -493,10 +608,11 @@ this in Cygwin by typing <literal>chown -R user /</literal> or by using other
tools such as <literal>CACLS.EXE</literal>.
</para>
</listitem>
-<listitem><para>Delete the Cygwin shortcuts on the Desktop and Start Menu, and anything
-left by setup.exe in the download directory. However, if you plan to reinstall
-Cygwin it's a good idea to keep your setup.exe download directory since you can
-reinstall the packages left in its cache without redownloading them.
+<listitem><para>Delete the Cygwin shortcuts on the Desktop and Start Menu, and
+anything left by setup-x86{_64}.exe in the download directory. However, if you
+plan to reinstall Cygwin it's a good idea to keep your setup-x86{_64}.exe
+download directory since you can reinstall the packages left in its cache
+without redownloading them.
</para>
</listitem>
<listitem><para>If you added Cygwin to your system path, you should remove it unless you
@@ -525,14 +641,10 @@ have not been tested. Use them <emphasis role='bold'>only</emphasis> if there i
bugfix that you need to try, and you are willing to deal with any
problems, or at the request of a Cygwin developer.
</para>
-<para>You should generally install the full
-<literal>cygwin-inst-YYYYMMDD.tar.bz2</literal> update, rather than just the DLL,
-otherwise some components may be out of sync.
-</para>
<para>You cannot use Cygwin Setup to install a snapshot.
</para>
<para>First, you will need to download the snapshot from the snapshots
-page at <ulink url="http://cygwin.com/snapshots/">http://cygwin.com/snapshots/</ulink>. Note the directory where
+page at <ulink url="https://cygwin.com/snapshots/"/>. Note the directory where
you saved the snapshot tarball.
</para>
<para>Before installing a snapshot, you must first Close <emphasis role='bold'>all</emphasis> Cygwin
@@ -548,8 +660,8 @@ you are only installing the DLL snapshot, skip the first tar command. Open
a <literal>bash</literal> shell (it should be the only running Cygwin process) and issue
the following commands:
<screen>
- /bin/tar -C/ -jxvf /posix/path/to/cygwin-inst-YYYYMMDD.tar.bz2 --exclude=usr/bin/cygwin1.dll
- /bin/tar -C/tmp -jxvf /posix/path/to/cygwin-inst-YYYYMMDD.tar.bz2 usr/bin/cygwin1.dll
+ /bin/tar -C / -xvf /posix/path/to/cygwin-inst-YYYYMMDD.tar.* --exclude=usr/bin/cygwin1.dll
+ /bin/tar -C /tmp -xvf /posix/path/to/cygwin-inst-YYYYMMDD.tar.* usr/bin/cygwin1.dll
</screen>
</para>
<para>Exit the bash shell, and use Explorer or the Windows command shell to
@@ -562,7 +674,7 @@ to <literal>C:\cygwin\bin\cygwin1.dll</literal> (assuming you installed Cygwin i
<para>The operative word in trying the snapshots is "<emphasis>trying</emphasis>". If you
notice a problem with the snapshot that was not present in the release
DLL (what we call a "regression"), please report it to the Cygwin
-mailing list (see <ulink url="http://cygwin.com/problems.html">http://cygwin.com/problems.html</ulink> for problem
+mailing list (see <ulink url="https://cygwin.com/problems.html"/> for problem
reporting guidelines). If you wish to go back to the older version of the
DLL, again, close all Cygwin processes, delete
<literal>C:\cygwin\bin\cygwin1.dll</literal>, and
@@ -579,11 +691,11 @@ files, reinstall the "<literal>cygwin</literal>" package using Setup.
<answer>
<para>NO. Cygwin Setup cannot do this for you. Use a tool designed for
-this purpose. See <ulink url="http://rsync.samba.org/">http://rsync.samba.org/</ulink>,
-<ulink url="http://www.gnu.org/software/wget/">http://www.gnu.org/software/wget/</ulink> for utilities that can do this for you.
+this purpose. See <ulink url="http://rsync.samba.org/"/>,
+<ulink url="http://www.gnu.org/software/wget/"/> for utilities that can do this for you.
For more information on setting up a custom Cygwin package server, see
the Cygwin Setup homepage at
-<ulink url="http://sourceware.org/cygwin-apps/setup.html">http://sourceware.org/cygwin-apps/setup.html</ulink>.
+<ulink url="https://sourceware.org/cygwin-apps/setup.html"/>.
</para>
</answer></qandaentry>
@@ -592,14 +704,14 @@ the Cygwin Setup homepage at
<answer>
<para>While some users have successfully done this, for example Indiana
-University's XLiveCD <ulink url="http://xlivecd.indiana.edu/">http://xlivecd.indiana.edu/</ulink>, there is no
+University's XLiveCD <ulink url="http://xlivecd.indiana.edu/"/>, there is no
easy way to do it. Full instructions for constructing a portable Cygwin
on CD by hand can be found on the mailing list at
-<ulink url="http://www.cygwin.com/ml/cygwin/2003-07/msg01117.html">http://www.cygwin.com/ml/cygwin/2003-07/msg01117.html</ulink>
+<ulink url="https://www.cygwin.com/ml/cygwin/2003-07/msg01117.html"/>
(Thanks to fergus at bonhard dot uklinux dot net for these instructions.)
-Please note that these instructions are rather old and are referring to the
+Please note that these instructions are very old and are referring to the
somewhat different setup of a Cygwin 1.5.x release. As soon as somebody set
-this up for Cygwin 1.7, we might add this information here.
+this up for recent Cygwin releases, we might add this information here.
</para>
</answer></qandaentry>
@@ -607,9 +719,8 @@ this up for Cygwin 1.7, we might add this information here.
<question><para>How do I save, restore, delete, or modify the Cygwin information stored in the registry?</para></question>
<answer>
-<para>Since Cygwin 1.7, there's nothing important in the registry anymore,
-except for the installation directory information stored there for the sake
-of setup.exe. There's nothing left to manipulate anymore.
+<para>Cygwin doesn't store anything important in the registry anymore for
+quite some time. There's no reason to save, restore or delete it.
</para></answer></qandaentry>
</qandadiv>
diff --git a/winsup/doc/faq-using.xml b/winsup/doc/faq-using.xml
index 7ac928f91..412dfbb25 100644
--- a/winsup/doc/faq-using.xml
+++ b/winsup/doc/faq-using.xml
@@ -25,10 +25,131 @@ installed. Scroll down to locate the missing package, for instance
</para>
<para>For a detailed explanation of the general problem, and how to extend
it to other missing DLLs and identify their containing packages, see
-<ulink url="http://cygwin.com/ml/cygwin/2002-01/msg01619.html">http://cygwin.com/ml/cygwin/2002-01/msg01619.html</ulink>.
+<ulink url="https://cygwin.com/ml/cygwin/2002-01/msg01619.html"/>.
</para>
</answer></qandaentry>
+<qandaentry id="faq.using.startup-slow">
+<question><para>Starting a new terminal window is slow. What's going on?</para></question>
+<answer>
+
+<para>There are many possible causes for this.</para>
+
+<para>If your terminal windows suddenly began starting slowly after a
+Cygwin upgrade, it may indicate issues in the authentication
+setup.</para>
+
+<para>For almost all its lifetime, Cygwin has used Unix-like
+<filename>/etc/passwd</filename> and <filename>/etc/group</filename>
+files to mirror the contents of the Windows SAM and AD databases.
+Although these files can still be used, since Cygwin 1.7.34, new
+installations now use the SAM/AD databases directly.</para>
+
+<para>To switch to the new method, move these two files out of the way
+and restart the Cygwin terminal. That runs Cygwin in its new default
+mode.</para>
+
+<para>If you are on a system that isn't using AD domain logins, this
+makes Cygwin use the native Windows SAM database directly, which may be
+faster than the old method involving <filename>/etc/passwd</filename>
+and such. At worst, it will only be a bit slower. (The speed difference
+you see depends on which benchmark you run.) For the AD case, it can be
+slower than the old method, since it is trading a local file read for a
+network request. Version 1.7.35 will reduce the number of AD server
+requests the DLL makes relative to 1.7.34, with the consequence that you
+will now have to alter <filename>/etc/nsswitch.conf</filename> in order
+to change your Cygwin home directory, instead of being able to change it
+from the AD configuration.</para>
+
+<para>If you are still experiencing very slow shell startups, there are
+a number of other things you can look into:</para>
+
+<orderedlist>
+ <listitem>
+ <para>One common cause of slow Cygwin Terminal starts is a bad DNS
+ setup. This particularly affects AD clients, but there may be other
+ things in your Cygwin startup that depend on getting fast answers
+ back from a network server.</para>
+
+ <para>Keep in mind that this may affect Cygwin even when the domain
+ controller is on the same machine as Cygwin, or is on a nearby
+ server. A bad DNS server IP can cause long delays while the local
+ TCP/IP stack times out on a connection to a server that simply isn't
+ there, for example.</para>
+ </listitem>
+
+ <listitem>
+ <para>Another cause for AD client system is slow DC replies,
+ commonly observed in configurations with remote DC access. The
+ Cygwin DLL queries information about every group you're in to
+ populate the local cache on startup. You may speed up this process a
+ little by caching your own information in local files. Run these
+ commands in a Cygwin terminal with write access to
+ <filename>/etc</filename>:</para>
+
+ <screen>getent passwd $(id -u) > /etc/passwd
+getent group $(id -G) > /etc/group</screen>
+
+ <para>Also, set <filename>/etc/nsswitch.conf</filename> as
+ follows:</para>
+
+ <screen>passwd: files db
+group: files db</screen>
+
+ <para>This will limit the need for Cygwin to contact the AD domain
+ controller (DC) while still allowing for additional information to
+ be retrieved from DC, such as when listing remote
+ directories.</para>
+ </listitem>
+
+ <listitem>
+ <para>Either in addition to the previous item or instead of it, you
+ can run <ulink
+ url="https://cygwin.com/cygwin-ug-net/using-cygserver.html"><command>cygserver</command></ulink>
+ as a local caching service to speed up DC requests.</para>
+
+ <para>Cygwin programs will check with <command>cygserver</command>
+ before trying to query the DC directly.</para>
+ </listitem>
+
+ <listitem>
+ <para>A less preferable option is to create a static read-only cache
+ of the authentication data. This is the old-fashioned method of
+ making Cygwin integrate with AD, the only method available in
+ releases before 1.7.34. To do this, run <command>mkpasswd</command>
+ and <command>mkgroup</command>, then put the following into
+ <filename>/etc/nsswitch.conf</filename> to make Cygwin treat these
+ files as the only sources of user and group information:</para>
+
+ <screen>passwd: files
+group: files</screen>
+
+ <para>By leaving out the <computeroutput>db</computeroutput> option,
+ we are telling the Cygwin DLL not to even try to do AD lookups. If
+ your AD servers are slow, this local cache will speed things up. The
+ downside is that you open yourself up to the <ulink
+ url="http://en.wikipedia.org/wiki/Cache_(computing)">stale cache
+ problem</ulink>: any time the AD databases change, your local cache
+ will go out of date until you update the files manually.</para>
+ </listitem>
+</orderedlist>
+
+<para>If none of the above helps, the best troubleshooting method is to
+run your startup scripts in debug mode. Right-click your Cygwin Terminal
+icon, go to Properties, and edit the command. It should be something
+like <command>C:\cygwin\bin\mintty.exe -i /Cygwin-Terminal.ico
+-</command>. Assuming you are using Bash for your login shell, change
+it to <command>C:\cygwin\bin\mintty /bin/bash -lx</command> then try
+running Cygwin Terminal again. The <option>-x</option> option tells Bash
+to write every command it runs to the terminal before launching it. If
+the terminal immediately starts filling with lines of text but then
+pauses, the line where the output paused is your clue as to what's going
+on. The Cygwin DLL proper probably isn't the cause of the slowdown in
+this case, since those delays happen before the first line of text
+appears in the terminal.</para>
+
+</answer></qandaentry>
+
<qandaentry id="faq.using.slow">
<question><para>Why is Cygwin suddenly <emphasis>so</emphasis> slow?</para></question>
<answer>
@@ -50,7 +171,7 @@ will slow things down tremendously if it does not exist.
(sshd, inetd, etc), then it depends on the method used to switch to
another user. This problem as well as its solution is described in
detail in the Cygwin User's Guide, see
-<ulink url="http://cygwin.com/cygwin-ug-net/ntsec.html" />.
+<ulink url="https://cygwin.com/cygwin-ug-net/ntsec.html"/>.
</para>
<para>Workarounds include using public network share that does not require
authentication (for non-critical files), providing your password to a
@@ -137,7 +258,7 @@ as such.
<para>Your .bashrc is read from your home directory specified by the HOME
environment variable. It uses /.bashrc if HOME is not set. So you need
-to set HOME (and the home dir in your /etc/passwd entry) correctly.
+to set HOME (and the home dir in your passwd account information) correctly.
</para>
</answer></qandaentry>
@@ -238,8 +359,9 @@ currently installed as part of the sh-utils, but again, it does not work.
<literal>ssh username@localhost</literal> as a <literal>su</literal>
replacement.
</para>
-<para>For some technical background into why <literal>su</literal> doesn't work, read
-<ulink url="http://www.cygwin.com/ml/cygwin/2003-06/msg00897.html">http://www.cygwin.com/ml/cygwin/2003-06/msg00897.html</ulink> and
+<para>For some technical background into why <literal>su</literal> doesn't
+work, read
+<ulink url="https://www.cygwin.com/ml/cygwin/2003-06/msg00897.html"/> and
related messages.
</para>
</answer></qandaentry>
@@ -254,10 +376,10 @@ or <literal>whatis</literal>, you
must create the whatis database. Just run the command
</para>
<screen>
- /usr/sbin/makewhatis
+ mandb
</screen>
-<para>(it may take a minute to complete).
+<para>(it may take a few minutes to complete).
</para>
</answer></qandaentry>
@@ -265,12 +387,6 @@ must create the whatis database. Just run the command
<question><para>Why doesn't <literal>chmod</literal> work?</para></question>
<answer>
-<para>The most common case is that your <literal>/etc/passwd</literal>
-or <literal>/etc/group</literal> files are not properly set up. If
-<literal>ls -l</literal> shows a group of <literal>mkpasswd</literal>
-or <literal>mkgroup</literal>, you need to run one or both of those
-commands.
-</para>
<para>If you're using FAT32 instead of NTFS, <literal>chmod</literal>
will fail since FAT32 does not provide any permission information.
You should really consider converting the drive to NTFS with
@@ -280,7 +396,7 @@ for memory cards or USB sticks to exchange pictures...
<para>For other cases, understand that Cygwin attempts to show UNIX
permissions based on the security features of Windows, so the Windows
ACLs are likely the source of your problem. See the Cygwin User's
-Guide at <ulink url="http://cygwin.com/cygwin-ug-net/ntsec.html" />
+Guide at <ulink url="https://cygwin.com/cygwin-ug-net/ntsec.html"/>
for more information on how Cygwin maps Windows permissions.
</para>
</answer></qandaentry>
@@ -332,25 +448,26 @@ to determine whether they are executable.
<question><para>How do I print under Cygwin?</para></question>
<answer>
-<para>lpr is available in the <ulink url="http://cygwin.com/setup.exe">setup.exe</ulink> cygutils package. Some <ulink url="http://cygwin.com/ml/cygwin/2008-05/msg00123.html">usage hints</ulink> are available courtesy of Rodrigo Medina.
+<para>lpr is available in the cygutils package. Some <ulink url="https://cygwin.com/ml/cygwin/2008-05/msg00123.html">usage hints</ulink> are available courtesy of Rodrigo Medina.
</para>
<para>Jason Tishler has written a couple of messages that explain how to use
a2ps (for nicely formatted text in PostScript) and ghostscript (to print
PostScript files on non-PostScript Windows printers). Start at
-<ulink url="http://cygwin.com/ml/cygwin/2001-04/msg00657.html">http://cygwin.com/ml/cygwin/2001-04/msg00657.html</ulink>. Note that the
-<literal>file</literal> command is now available as part of Cygwin setup.
+<ulink url="https://cygwin.com/ml/cygwin/2001-04/msg00657.html"/>. Note that
+these are old mails and <command>a2ps</command> as well as
+<command>file</command> are long available as part of the Cygwin distribution.
</para>
-<para>Alternatively, you can use the Windows <literal>print</literal>
-command. (It does not seem to be available on Win9x.) Type
+<para>Alternatively, you can use the Windows <command>print</command>
+command. Type
</para>
<screen>
bash$ print /\?
</screen>
-<para>for usage instructions (note the <literal>?</literal> must be escaped from the
-shell).
+<para>for usage instructions (note the <literal>?</literal> must be escaped
+from the shell).
</para>
-<para>Finally, you can simply <literal>cat</literal> the file to the printer's share name:
+<para>Finally, you can simply <command>cat</command> the file to the printer's share name:
</para>
<screen>
bash$ cat myfile &gt; //host/printer
@@ -368,7 +485,7 @@ formfeed character to your file.
<para>Internationalization is a complex issue. The short answer is that
Cygwin relies on the setting of the setting of LANG/LC_xxx environment
variables. The long answer can be found in the User's Guide in the
-section <ulink url="http://cygwin.com/cygwin-ug-net/setup-locale.html">Internationalization</ulink>
+section <ulink url="https://cygwin.com/cygwin-ug-net/setup-locale.html">Internationalization</ulink>
</para>
<para> Cygwin uses UTF-8 by default. To use a different character set, you
@@ -420,7 +537,7 @@ if you have one a single Cygwin installation, for example, if you update the
Cygwin package without exiting <emphasis>all</emphasis> Cygwin apps (including
services like sshd) beforehand.</para>
<para>The only DLL that is sanctioned by the Cygwin project is the one that
-you get by running <ulink url="http://cygwin.com/setup.exe">setup.exe</ulink>,
+you get by running <ulink url="https://cygwin.com/install.html">setup-x86.exe or setup-x86_64.exe</ulink>,
installed in a directory controlled by this program. If you have other
versions on your system and desire help from the cygwin project, you should
delete or rename all DLLs that are not installed by
@@ -455,13 +572,15 @@ contributing it for others to use)
Can I bundle Cygwin with my product for free?
</para></question>
<answer><para>
-Only if you comply with Cygwin's <ulink
-url="http://cygwin.com/licensing.html">license</ulink> very carefully. If you
-choose to distribute cygwin1.dll, you must be willing to distribute the
-exact source code used to build that copy of cygwin1.dll as per the
-terms of the GPL. If you ship applications that link with cygwin1.dll,
-you must either provide those applications' source code under a
-GPL-compatible license, *or* purchase a cygwin license from Red Hat.
+Starting with Cygwin version 2.5.2, which is LGPL licensed, yes, albeit
+it's not recommended for interoperability reasons.</para>
+
+<para>Cygwin versions prior to 2.5.2 were GPL licensed.
+If you choose to distribute an older cygwin1.dll, you must be willing to
+distribute the exact source code used to build that copy of cygwin1.dll
+as per the terms of the GPL. If you ship applications that link with
+older cygwin1.dll, you must provide those applications' source code
+under a GPL-compatible license.
</para></answer></qandaentry>
<qandaentry id="faq.using.older-cygwin-conflict">
@@ -491,7 +610,7 @@ installed distribution.
<para>Probably because there is nobody willing or able to maintain it. It
takes time, and the priority for the Cygwin Team is the Cygwin package.
The rest is a volunteer effort. Want to contribute? See
-<ulink url="http://cygwin.com/setup.html">http://cygwin.com/setup.html</ulink>.
+<ulink url="https://cygwin.com/setup.html"/>.
</para>
</answer></qandaentry>
@@ -575,7 +694,7 @@ of your current Cygwin session.
</para>
<para>You can change the default <literal>cygdrive</literal> prefix and whether it is binmode or textmode using the <filename>/etc/fstab</filename> file
as well. See the Cygwin User's Guide at
-<ulink url="http://cygwin.com/cygwin-ug-net/using.html#mount-table">http://cygwin.com/cygwin-ug-net/using.html#mount-table</ulink>
+<ulink url="https://cygwin.com/cygwin-ug-net/using.html#mount-table"/>
for more details.
</para>
</answer></qandaentry>
@@ -624,7 +743,7 @@ of poorly written firewall-type software that causes things to break.
Note that with many of these products, simply disabling the firewall
does not remove these changes; it must be completely uninstalled.
</para>
-<para>See also <ulink url="http://cygwin.com/faq/faq.html#faq.using.bloda" />
+<para>See also <ulink url="https://cygwin.com/faq/faq.html#faq.using.bloda"/>
for a list of applications that have been known, at one time or another, to
interfere with the normal functioning of Cygwin.
</para>
@@ -655,10 +774,9 @@ of this is perl's configuration script, which wants
tell the difference between files with just different case, so the
configuration fails.
</para>
-<para>To help with this problem, Cygwin supports case sensitivity
-starting with Cygwin 1.7.0. For a detailed description how to use that
-feature see the Cygwin User's Guilde at
-<ulink url="http://cygwin.com/cygwin-ug-net/using-specialnames.html">http://cygwin.com/cygwin-ug-net/using-specialnames.html</ulink>.
+<para>To help with this problem, Cygwin supports case sensitivity. For a
+detailed description how to use that feature see the Cygwin User's Guide at
+<ulink url="https://cygwin.com/cygwin-ug-net/using-specialnames.html"/>.
</para>
</answer></qandaentry>
@@ -676,9 +794,8 @@ interesting. E.g., the perl distribution has a file called
letters 'aux' in it will hang.
</para>
<para>At least that's what happens when using native Windows tools. Cygwin
-1.7.0 and later can deal with these filenames just fine. Again, see the
-User's Guide at
-<ulink url="http://cygwin.com/cygwin-ug-net/using-specialnames.html">http://cygwin.com/cygwin-ug-net/using-specialnames.html</ulink>
+can deal with these filenames just fine. Again, see the User's Guide at
+<ulink url="https://cygwin.com/cygwin-ug-net/using-specialnames.html"/>
for a detailed description of what's possible with filenames and what is not.
</para>
</answer></qandaentry>
@@ -774,7 +891,7 @@ contents are exempt from scanning. In a default installation, this
would be <literal>C:\cygwin\bin</literal>. Obviously, this could be
exploited by a hostile non-Cygwin program, so do this at your own risk.
</para>
-<para>See also <ulink url="http://cygwin.com/faq/faq.html#faq.using.bloda" />
+<para>See also <ulink url="https://cygwin.com/faq/faq.html#faq.using.bloda"/>
for a list of applications that have been known, at one time or another, to
interfere with the normal functioning of Cygwin.
</para>
@@ -787,7 +904,7 @@ interfere with the normal functioning of Cygwin.
<para>Yes. Install the emacs package. This provides everything you
need in order to run GNU emacs in a terminal window. If you also want
to be able to use the X11
-(<ulink url="http://x.cygwin.com/">http://x.cygwin.com/</ulink>)
+(<ulink url="https://x.cygwin.com/"/>)
GUI, install the emacs-X11 package. In either case, you run emacs by
typing 'emacs' or '/usr/bin/emacs'.
</para>
@@ -799,7 +916,7 @@ typing 'emacs' or '/usr/bin/emacs'.
<para>Yes. It can be used in three different modes:</para>
<para><itemizedlist>
-<listitem><para>X11 (<ulink url="http://x.cygwin.com/">http://x.cygwin.com/</ulink>) GUI</para></listitem>
+<listitem><para>X11 (<ulink url="https://x.cygwin.com/"/>) GUI</para></listitem>
</itemizedlist></para>
<para>You have to <emphasis>set</emphasis> the DISPLAY environment variable
before starting xemacs.</para>
@@ -821,141 +938,25 @@ before starting xemacs.</para>
<screen>
bash$ xemacs -nw
</screen>
-<para>The current stable Cygwin version of XEmacs is 21.4.x. But there is also a
-Cygwin test release version (21.5.x) available for download via setup.exe.
-</para>
<para>To use all the standard packages with XEmacs you should download the following
two packages:</para>
<para><itemizedlist>
<listitem><para>xemacs-sumo - XEmacs standard packages</para></listitem>
<listitem><para>xemacs-mule-sumo - XEmacs MULE (MUlti Lingual Emacs) packages</para></listitem>
</itemizedlist></para>
-<para>An alternative <emphasis>native</emphasis> distribution of XEmacs for
-Windows based systems can be downloaded from
-<ulink url="http://xemacs.org/Download/win32/index.html">http://xemacs.org/Download/win32/index.html</ulink>.
-It uses an <emphasis>InnoSetup Kit</emphasis> based installer.</para>
-</answer></qandaentry>
-
-<qandaentry id="faq.using.ntemacs">
-<question><para>What about NT Emacs?</para></question>
-<answer>
-
-<para>If you want GNU Emacs with a native Microsoft GUI interface,
-then you can either use XEmacs (see above), or native
-NT Emacs: see section
-<ulink url="http://www.gnu.org/software/emacs/windows/Getting-Emacs.html#Getting-Emacs">Where can I get pre-compiled versions?</ulink> in NT Emacs FAQ.
-
-</para>
-<para>NT Emacs uses the Windows command shell by default. Since it is not a
-Cygwin application, it has no knowledge of Cygwin mounts. With those
-points in mind, you need to add the following code to your ~/.emacs
-(or ~/_emacs) file in order to use Cygwin bash. This is particularly useful
-for the JDEE package (<ulink url="http://jdee.sunsite.dk/">http://jdee.sunsite.dk/</ulink>). The following
-settings are for Emacs 21.1:
-</para>
-<screen>
-
- ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
- ;; Initial setup
- ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-
- ;; This assumes that Cygwin is installed in C:\cygwin (the
- ;; default) and that C:\cygwin\bin is not already in your
- ;; Windows Path (it generally should not be).
-
- (setq exec-path (cons "C:/cygwin/bin" exec-path))
- (setenv "PATH" (concat "C:\\cygwin\\bin;" (getenv "PATH")))
-
- ;; LOGNAME and USER are expected in many Emacs packages
- ;; Check these environment variables.
-
- (if (and (null (getenv "USER"))
- ;; Windows includes variable USERNAME, which is copied to
- ;; LOGNAME and USER respectively.
- (getenv "USERNAME"))
- (setenv "USER" (getenv "USERNAME")))
-
- (if (and (getenv "LOGNAME")
- ;; Bash shell defines only LOGNAME
- (null (getenv "USER")))
- (setenv "USER" (getenv "LOGNAME")))
-
- (if (and (getenv "USER")
- (null (getenv "LOGNAME")))
- (setenv "LOGNAME" (getenv "USER")))
-
- ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
- ;; (A) M-x shell: This change M-x shell permanently
- ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-
- ;; Would call Windows command interpreter. Change it.
-
- (setq shell-file-name "bash")
- (setenv "SHELL" shell-file-name)
- (setq explicit-shell-file-name shell-file-name)
-
- ;; Remove C-m (^M) characters that appear in output
-
- (add-hook 'comint-output-filter-functions
- 'comint-strip-ctrl-m)
-
- ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
- ;; (B) *OR* call following function with M-x my-bash
- ;; The M-x shell would continue to run standard Windows shell
- ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-
- (defun my-bash (&amp;optional buffer)
- "Run Cygwin Bash shell in optional BUFFER; default *shell-bash*."
- (autoload 'comint-check-proc "comint")
- (interactive
- (let ((name "*shell-bash*"))
- (if current-prefix-arg
- (setq name (read-string
- (format "Cygwin shell buffer (default %s): " name)
- (not 'initial-input)
- (not 'history)
- name)))
- (list name)))
- (or buffer
- (setq buffer "*shell-bash*"))
- (if (comint-check-proc buffer)
- (pop-to-buffer buffer)
- (let* ((shell-file-name "bash")
- (explicit-shell-file-name shell-file-name)
- (explicit-sh-args '("--login" "-i"))
- (explicit-bash-args explicit-sh-args)
- (w32-quote-process-args ?\"));; Use Cygwin quoting rules.
- (shell buffer)
- ;; By default Emacs sends "\r\n", but bash wants plain "\n"
- (set-buffer-process-coding-system 'undecided-dos 'undecided-unix)
- ;; With TAB completion, add slash path separator, none to filenames
- (make-local-variable 'comint-completion-addsuffix)
- (setq comint-completion-addsuffix '("/" . ""))
- ;; This variable is local to buffer
- (setq comint-prompt-regexp "^[ \n\t]*[$] ?"))))
-
-</screen>
-
-<para>If you want NT Emacs to understand Cygwin paths, get
-cygwin-mount.el from <ulink url="http://www.emacswiki.org/elisp/index.html">http://www.emacswiki.org/elisp/index.html</ulink>.
-</para>
-<para>Note that all of this ``just works'' if you use the Cygwin port of
-Emacs or XEmacs from Cygwin Setup.
-</para>
</answer></qandaentry>
<qandaentry id="faq.using.symlinkstoppedworking">
<question><para>Why don't some of my old symlinks work anymore?</para></question>
<answer>
-<para>Beginning with Cygwin 1.7, Cygwin supports multiple character sets.
-Symlinks created with Cygwin 1.7 are using the UTF-16 character set, which is
-portable across all character sets. Old symlinks were written using your
-current Windows codepage, which is not portable across all character sets.
-If the target of the symlink doesn't resolve anymore, it's very likely that
-the symlink points to a target filename using native, non-ASCII characters,
-and you're now using another character set than way back when you created
-the symlink.</para>
+<para>Cygwin supports multiple character sets. Symlinks created with Cygwin
+are using the UTF-16 character set, which is portable across all character
+sets. Old symlinks were written using your current Windows codepage, which
+is not portable across all character sets. If the target of the symlink
+doesn't resolve anymore, it's very likely that the symlink points to a target
+filename using native, non-ASCII characters, and you're now using another
+character set than way back when you created the symlink.</para>
<para>Solution: Delete the symlink and create it again under you new Cygwin.
The new symlink will be correctly point to the target no matter what character
@@ -980,7 +981,7 @@ file:
</para>
<para>Alternatively, use Windows shortcuts as symlinks. See the CYGWIN
environment variable option "winsymlinks"
-<ulink url="http://cygwin.com/cygwin-ug-net/using-cygwinenv.html">http://cygwin.com/cygwin-ug-net/using-cygwinenv.html</ulink>
+<ulink url="https://cygwin.com/cygwin-ug-net/using-cygwinenv.html"/>
</para>
</answer></qandaentry>
@@ -1032,19 +1033,6 @@ sure you're running bash elevated.
</para>
<para>
-If "cyg_server" is not already in <literal>/etc/passwd</literal>, add it
-using <literal>mkpasswd</literal>. Make sure all domain accounts which are
-supposed to be able to logon via ssh are in <literal>/etc/passwd</literal>.
-Also make sure that all important domain groups are in
-<literal>/etc/group</literal>. If in doubt, call
-</para>
-
-<screen>
- $ mkpasswd -l -d your_domain > /etc/passwd
- $ mkgroup -l -d your_domain > /etc/group
-</screen>
-
-<para>
Then run ssh-host-config. Answer all questions so that "cyg_server" is
used to run the service. When done, check ownership of
<literal>/var/empty</literal> and all <literal>/etc/ssh*</literal>
@@ -1064,6 +1052,178 @@ usually all set and you can start the sshd service via
</answer></qandaentry>
+<qandaentry id="faq.using.ssh-pubkey-stops-working">
+<question><para>Why does public key authentication with ssh fail after updating to Cygwin 1.7.34 or later?</para></question>
+<answer>
+
+<para>
+This is the result of fixing a long-standing security problem in Cygwin's
+POSIX ACL handling. IEEE 1003.1e draft 17 defines that the permissions
+of secondary user and group entries in an ACL are reflected in the group
+permission mask by or'ing the permissions of the file's primary group with
+all permissions of secondary users and groups in the ACL. The background
+is that this way the standard POSIX permission bits reflect the fact that
+<emphasis role='bold'>somebody else</emphasis> has additional, otherwise
+potentially invisible permissions on the file. This relatively complex
+interface has been defined in order to ensure that applications that are
+compliant with IEEE 1003.1 (“POSIX.1â€) will still function as expected on
+systems with ACLs.</para>
+
+<para>So, what does that mean for your situation? Typically this means the
+private key file, for instance <filename>~/.ssh/id_rsa</filename>, has too
+open permissions. OpenSSH expects the permissions of the private key file
+to be 0600. Let's use the default SSH2 RSA keyfile as example:</para>
+
+<screen>
+ $ ls -l .ssh/id_rsa
+ -rw------- 1 user group 1766 Aug 26 2013 .ssh/id_rsa
+</screen>
+
+<para>However, if other accounts can read the file, the key is potentially
+compromised. Consider the file has additional rw- permissions for a group
+<literal>bad_guys</literal>. Up to Cygwin 1.7.33 that would have looked
+like this:</para>
+
+<screen>
+ $ ls -l .ssh/id_rsa
+ -rw-------+ 1 user group 1766 Aug 26 2013 .ssh/id_rsa
+</screen>
+
+<para>Notice the extra <emphasis role='bold'>+</emphasis> character following
+the permission string. This shows that additional ACL entries are in the ACL.
+But an application only checking the POSIX permission bits (and ssh is one of
+them!), will not notice the fact, because it gets the permissions 0600 for the
+file.</para>
+
+<para>Starting with Cygwin 1.7.34, the extra permissions are reflected in
+the group permission bits per IEEE 1003.1e draft 17:</para>
+
+<screen>
+ $ ls -l .ssh/id_rsa
+ -rw-rw----+ 1 user group 1766 Aug 26 2013 .ssh/id_rsa
+</screen>
+
+<para>So now ssh will notice that the file has extra permissions and it will
+complain. The same problem occurs if the file
+<filename>~/.ssh/authorized_keys</filename> has too open permissions. On
+the client side you won't get any helping text, though, other than that you're
+suddenly asked for a password. That's a rather good hint to have a closer
+look at the server's <filename>~/.ssh/authorized_keys</filename> file.</para>
+
+<para>To fix the permissions of your private key file or your
+<filename>~/.ssh/authorized_keys</filename> file, simply use the
+<command>setfacl</command> command with the <literal>-b</literal> option.
+This removes all additional ACL entries and thus fixes the permissions to
+be not too open:</para>
+
+<screen>
+ $ ls -l .ssh/id_rsa
+ -rw-rw----+ 1 user group 1766 Aug 26 2013 .ssh/id_rsa
+ $ setfacl -b .ssh/id_rsa
+ $ ls -l .ssh/id_rsa
+ -rw------- 1 user group 1766 Aug 26 2013 .ssh/id_rsa
+</screen>
+
+<para>If the second <command>ls</command> command still gives you
+<computeroutput>-rw-rw----</computeroutput> permissions after running
+the above commands, it is proably because the file's primary group
+is your user's personal group:</para>
+
+<screen>
+ $ ls -l .ssh/id_rsa
+ -rw-rw---- 1 Fred Fred 1766 Aug 26 2013 .ssh/id_rsa
+</screen>
+
+<para>Since the Windows security system treats groups and users as
+much the same thing, a change to the user or group permissions on
+such a file reflects the change to both user and group. In effect,
+mode 0600 becomes mode 0660. Because we are saying we want these
+files to be readable only by our user, the fix for this is easy:</para>
+
+<screen>
+ $ chgrp `id -g` ~/.ssh/*
+</screen>
+
+<para>That resets the group on these files to your default group
+which should be something like <computeroutput>Users</computeroutput>,
+depending on your local configuration. If that doesn't work, you can
+try something like this instead:</para>
+
+<screen>
+ $ chgrp None ~/.ssh/*
+</screen>
+
+<para>That group always exists, but its name is different on
+non-English versions of Windows. You might also want to use a
+domain group instead of a local group if your site uses Windows
+domains. For example, you might want to use the <computeroutput>Domain
+Users</computeroutput> group instead.</para>
+
+<para>For more information on <command>setfacl</command>, see
+<ulink url="https://cygwin.com/cygwin-ug-net/using-utils.html#setfacl"/></para>
+</answer></qandaentry>
+
+<qandaentry id="faq.using.same-with-rhosts">
+<question><para>Why is my .rhosts file not recognized by rlogin anymore after updating to Cygwin 1.7.34?</para></question>
+<answer>
+
+<para>The problem is exactly the same as with the key files of SSH. See
+<xref linkend="faq.using.ssh-pubkey-stops-working"/>.</para>
+
+<para>The solution is the same:</para>
+
+<screen>
+ $ ls -l .rhosts
+ -rw-rw----+ 1 user group 42 Nov 12 2010 .rhosts
+ $ setfacl -b .rhosts
+ $ ls -l .rhosts
+ -rw------- 1 user group 42 Nov 12 2010 .rhosts
+</screen>
+
+</answer></qandaentry>
+
+<qandaentry id="faq.using.same-with-permissions">
+<question><para>Why do my files have extra permissions after updating to Cygwin 1.7.34?</para></question>
+<answer>
+
+<para>The problem is exactly the same as with the key files of SSH. See
+<xref linkend="faq.using.ssh-pubkey-stops-working"/>.</para>
+
+<para>The solution is the same:</para>
+
+<screen>
+ $ ls -l *
+ -rw-rwxr--+ 1 user group 42 Nov 12 2010 file1
+ -rw-rwxr--+ 1 user group 42 Nov 12 2010 file2
+ $ setfacl -b *
+ $ ls -l *
+ -rw-r--r-- 1 user group 42 Nov 12 2010 file1
+ -rw-r--r-- 1 user group 42 Nov 12 2010 file2
+</screen>
+
+<para>You may find that newly-created files also have unexpected
+permissions:</para>
+
+<screen>
+ $ touch foo
+ $ ls -l foo
+ -rw-rwxr--+ 1 user group 42 Nov 12 2010 foo
+</screen>
+
+<para>This probably means that the directory in which you're creating
+the files has unwanted default ACL entries that are inherited by
+newly-created files and subdirectories. The solution is again the
+same:</para>
+
+<screen>
+ $ setfacl -b .
+ $ touch bar
+ $ ls -l bar
+ -rw-r--r-- 1 user group 42 Nov 12 2010 bar
+</screen>
+
+</answer></qandaentry>
+
<qandaentry id="faq.using.tcl-tk">
<question><para>Why do my Tk programs not work anymore?</para></question>
<answer>
@@ -1084,7 +1244,7 @@ such as this when trying to start a Tk app:</para>
<para>Then you need to start an X server, or if one is already running, set the
<literal>DISPLAY</literal> variable to the proper value. The Cygwin distribution
-includes an X server; please see the <ulink url="http://x.cygwin.com/docs/ug/cygwin-x-ug.html">Cygwin/X User Guide</ulink>
+includes an X server; please see the <ulink url="https://x.cygwin.com/docs/ug/cygwin-x-ug.html">Cygwin/X User Guide</ulink>
for installation and startup instructions.
</para></answer></qandaentry>
@@ -1125,35 +1285,39 @@ behaviour which affect the operation of other programs, such as Cygwin.
</para>
<para>Among the software that has been found to cause difficulties are:</para>
<para><itemizedlist>
-<listitem><para>Sonic Solutions burning software containing DLA component (when DLA disabled)</para></listitem>
-<listitem><para>Norton/McAfee/Symantec antivirus or antispyware</para></listitem>
-<listitem><para>Logitech webcam software with "Logitech process monitor" service</para></listitem>
-<listitem><para>Kerio, Agnitum or ZoneAlarm Personal Firewall</para></listitem>
+<listitem><para>AR Soft RAM Disk</para></listitem>
+<listitem><para>ATI Catalyst (some versions)</para></listitem>
+<listitem><para>AVAST (disable FILESYSTEM and BEHAVIOR realtime shields)</para></listitem>
+<listitem><para>Avira AntiVir</para></listitem>
+<listitem><para>BitDefender</para></listitem>
+<listitem><para>Bufferzone from Trustware</para></listitem>
+<listitem><para>ByteMobile laptop optimization client</para></listitem>
+<listitem><para>COMODO Firewall Pro</para></listitem>
+<listitem><para>Citrix Metaframe Presentation Server/XenApp (see <ulink url="http://support.citrix.com/article/CTX107825">Citrix Support page</ulink>)</para></listitem>
+<listitem><para>Credant Guardian Shield</para></listitem>
+<listitem><para>Earthlink Total-Access</para></listitem>
+<listitem><para>Forefront TMG</para></listitem>
+<listitem><para>Google Desktop</para></listitem>
<listitem><para>Iolo System Mechanic/AntiVirus/Firewall</para></listitem>
+<listitem><para>Kerio, Agnitum or ZoneAlarm Personal Firewall</para></listitem>
<listitem><para>LanDesk</para></listitem>
-<listitem><para>Windows Defender </para></listitem>
-<listitem><para>Various programs by Wave Systems Corp using wxvault.dll, including Embassy Trust Suite and Embassy Security Center</para></listitem>
+<listitem><para>Lavasoft Web Companion</para></listitem>
+<listitem><para>Lenovo IPS Core Service (ipssvc)</para></listitem>
+<listitem><para>Lenovo RapidBoot Shield</para></listitem>
+<listitem><para>Logitech webcam software with "Logitech process monitor" service</para></listitem>
+<listitem><para>MacType</para></listitem>
<listitem><para>NOD32 Antivirus</para></listitem>
-<listitem><para>ByteMobile laptop optimization client</para></listitem>
-<listitem><para>Earthlink Total-Access</para></listitem>
-<listitem><para>Spybot S&amp;D TeaTimer</para></listitem>
-<listitem><para>AR Soft RAM Disk</para></listitem>
-<listitem><para>ATI Catalyst (some versions)</para></listitem>
<listitem><para>NVIDIA GeForce (some versions)</para></listitem>
-<listitem><para>Windows LiveOneCare</para></listitem>
-<listitem><para>Webroot Spy Sweeper with Antivirus</para></listitem>
-<listitem><para>COMODO Firewall Pro</para></listitem>
+<listitem><para>Norton/McAfee/Symantec antivirus or antispyware</para></listitem>
<listitem><para>PC Tools Spyware Doctor</para></listitem>
-<listitem><para>Avira AntiVir</para></listitem>
<listitem><para>Panda Internet Security</para></listitem>
-<listitem><para>BitDefender</para></listitem>
-<listitem><para>Google Desktop</para></listitem>
+<listitem><para>Sonic Solutions burning software containing DLA component (when DLA disabled)</para></listitem>
<listitem><para>Sophos Anti-Virus 7</para></listitem>
-<listitem><para>Bufferzone from Trustware</para></listitem>
-<listitem><para>Lenovo IPS Core Service (ipssvc)</para></listitem>
-<listitem><para>Credant Guardian Shield</para></listitem>
-<listitem><para>AVAST (disable FILESYSTEM and BEHAVIOR realtime shields)</para></listitem>
-<listitem><para>Citrix Metaframe Presentation Server/XenApp (see <ulink url="http://support.citrix.com/article/CTX107825">Citrix Support page</ulink>)</para></listitem>
+<listitem><para>Spybot S&amp;D TeaTimer</para></listitem>
+<listitem><para>Various programs by Wave Systems Corp using wxvault.dll, including Embassy Trust Suite and Embassy Security Center</para></listitem>
+<listitem><para>Webroot Spy Sweeper with Antivirus</para></listitem>
+<listitem><para>Windows Defender </para></listitem>
+<listitem><para>Windows LiveOneCare</para></listitem>
</itemizedlist></para>
<para>Sometimes these problems can be worked around, by temporarily or partially
disabling the offending software. For instance, it may be possible to disable
@@ -1168,7 +1332,7 @@ it may be necessary to uninstall the software altogether to restore normal opera
<para>Some of the symptoms you may experience are:</para>
<para><itemizedlist>
<listitem>
-<para>Random fork() failures.</para>
+<para>Random fork() failures</para>
<para>Caused by hook DLLs that load themselves into every process in the
system. POSIX fork() semantics require that the memory map of the child process
must be an exact duplicate of the parent process' layout. If one of these DLLs
@@ -1179,7 +1343,7 @@ DLL at that same address in the child, the fork() call has to fail.
</para>
</listitem>
<listitem>
-<para>File access problems.</para>
+<para>File access problems</para>
<para>Some programs (e.g., virus scanners with on-access scanning) scan or
otherwise operate on every file accessed by all the other software running on
your computer. In some cases they may retain an open handle on the file even
@@ -1229,19 +1393,45 @@ such as virtual memory paging and file caching.</para>
<para><itemizedlist>
<listitem>Restart whatever process is trying (and failing) to use
<literal>fork()</literal>. Sometimes Windows sets up a process
- environment that is even more hostile to fork() than usual.</listitem>
+ environment that is even more hostile to <literal>fork()</literal> than usual.</listitem>
<listitem>Ensure that you have eliminated (not just disabled) all
software on the <xref linkend="faq.using.bloda"/>.
</listitem>
- <listitem>Read the 'rebase' package README in
- <literal>/usr/share/doc/rebase/</literal>, and follow the
- instructions there to run 'rebaseall'.</listitem>
+ <listitem>Switch from 32-bit Cygwin to 64-bit Cygwin, if your OS and CPU support that.
+ With the bigger address space <literal>fork()</literal> is less likely to fail.</listitem>
+ <listitem>
+ <para>
+ Try setting the environment variable CYGWIN to "detect_bloda", which
+ enables some extra debugging, which may indicate what other software is
+ causing the problem.
+ </para>
+ <para>
+ See <ulink url="https://cygwin.com/ml/cygwin/2012-02/msg00797.html">this
+ mail</ulink> for more information.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ Force a full rebase: Run <command>rebase-trigger fullrebase</command>,
+ exit all Cygwin programs and run Cygwin setup.
+ </para>
+ <para>
+ By default, Cygwin's setup program automatically performs an incremental
+ rebase of newly installed files. Forcing a full rebase causes the
+ rebase map to be cleared before doing the rebase.
+ </para>
+ <para>
+ See <literal>/usr/share/doc/rebase/README</literal> and
+ <literal>/usr/share/doc/Cygwin/_autorebase.README</literal> for more
+ details.
+ </para>
+ <para>Please note that installing new packages or updating existing
+ ones undoes the effects of rebase and often causes fork() failures to
+ reappear.
+ </para>
+ </listitem>
</itemizedlist></para>
- <para>Please note that installing new packages or updating existing
- ones undoes the effects of rebaseall and often causes fork() failures
- to reappear. If so, just run rebaseall again.
- </para>
- <para>See the <ulink url="http://cygwin.com/cygwin-ug-net/highlights.html#ov-hi-process">
+ <para>See the <ulink url="https://cygwin.com/cygwin-ug-net/highlights.html#ov-hi-process">
process creation</ulink> section of the User's Guide for the technical reasons it is so
difficult to make <literal>fork()</literal> work reliably.</para>
</answer>
diff --git a/winsup/doc/faq-what.xml b/winsup/doc/faq-what.xml
index 6960c687e..393516a98 100644
--- a/winsup/doc/faq-what.xml
+++ b/winsup/doc/faq-what.xml
@@ -10,22 +10,19 @@
<question><para>What is it?</para></question>
<answer>
-<para>The Cygwin tools are ports of the popular GNU development tools for
-Microsoft Windows. They run thanks to the Cygwin library which
+<para>Cygwin is a distribution of popular GNU and other Open Source tools
+running on Microsoft Windows. The core part is the Cygwin library which
provides the POSIX system calls and environment these programs expect.
</para>
-<para>With these tools installed, it is possible to write Windows console
-or GUI applications that make use of significant parts of the POSIX API.
-As a result, it is possible to easily port many Unix programs without the need
-for extensive changes to the source code. This includes configuring
-and building most of the available GNU software (including the packages
-included with the Cygwin development tools themselves) as well as lots
-of BSD tools and packages (including OpenSSH). Even if
-the development tools are of little to no use to you, you may have
-interest in the many standard POSIX utilities provided with the package.
-They can be used from one of the provided Unix shells like bash, tcsh or zsh,
-as well as from the standard Windows command shell if you have to for some
-sad reason.
+<para>The Cygwin distribution contains thousands of packages from the Open
+Source world including most GNU tools, many BSD tools, an X server and a full
+set of X applications. If you're a developer you will find tools, headers
+and libraries allowing to write Windows console or GUI applications that make
+use of significant parts of the POSIX API. Cygwin allows easy porting of many
+Unix programs without the need for extensive changes to the source code. This
+includes configuring and building most of the available GNU or BSD software,
+including the packages included with the Cygwin distribution themselves.
+They can be used from one of the provided Unix shells like bash, tcsh or zsh.
</para>
</answer></qandaentry>
@@ -33,17 +30,12 @@ sad reason.
<question><para>What versions of Windows are supported?</para></question>
<answer>
-<para>Cygwin can be expected to run on all modern versions of Windows.
-This includes, as of the time of writing this, Windows XP SP3, Windows
-Server 2003, Windows Vista, Windows Server 2008, Windows 7, Windows
-Server 2012, Windows 8. The 32 bit version also runs in the WOW64 32 bit
-environment on released 64 bit versions of Windows
-(XP/2003/Vista/2008/7/2008 R2/8/2012).
-Since Cygwin is a community-supported free software project, patches to
-provide support for other versions would be thoughtfully considered.
-Paid support contracts or enhancements are available through Red Hat. For
-information about getting a Red Hat support contract, see
-<ulink url="http://cygwin.com/licensing.html" />.
+<para>Cygwin can be expected to run on all modern, released versions of Windows.
+State January 2015 this includes Windows XP SP3, Windows Server 2003/2003R2
+and all later versions of Windows up to Windows 8.1 and Windows Server 2012R2.
+The 32 bit version of Cygwin also runs in the WOW64 32 bit environment on
+released 64 bit versions of Windows (XP SP3 up to 8.1/2012R2), the 64 bit
+version of course only on 64 bit Windows.
</para>
<para>Keep in mind that Cygwin can only do as much as the underlying OS
supports. Because of this, Cygwin will behave differently, and
@@ -55,17 +47,17 @@ exhibit different limitations, on the various versions of Windows.
<question><para>Where can I get it?</para></question>
<answer>
-<para>The home page for the Cygwin project is <ulink url="http://cygwin.com/">http://cygwin.com/</ulink>.
+<para>The home page for the Cygwin project is
+<ulink url="https://cygwin.com/"/>.
There you should find everything you need for Cygwin, including links
for download and setup, a current list of mirror sites, a User's
-Guide, an API Reference, mailing lists and archives, and additional
-ported software.
+Guide, an API Reference, mailing lists and archives.
</para>
<para>You can find documentation for the individual GNU tools typically
as man pages or info pages as part of the Cygwin net distribution.
Additionally you can get the latest docs at
-<ulink url="http://www.gnu.org/manual/" />. (You should read GNU manuals from a
-local mirror. Check <ulink url="http://www.gnu.org/server/list-mirrors.html" />
+<ulink url="http://www.gnu.org/manual/"/>. (You should read GNU manuals from a
+local mirror. Check <ulink url="http://www.gnu.org/server/list-mirrors.html"/>
for a list of them.)
</para>
</answer></qandaentry>
@@ -82,17 +74,10 @@ but you should be sure to read the copyright section of the FAQ for more
information on how the GNU General Public License may affect your use of
these tools.
</para>
-<para>In particular, if you intend to port a proprietary (non-GPL'd)
-application using Cygwin, you will need the proprietary-use license
-for the Cygwin library. This is available for purchase from Red Hat;
-please visit <ulink url="http://cygwin.com/licensing.html" /> for more
-information. All other questions should be sent to the public project
-mailing list cygwin@cygwin.com.
-</para>
<para>Note that when we say "free" we mean freedom, not price. The goal of
such freedom is that the people who use a given piece of software
should be able to change it to fit their needs, learn from it, share
-it with their friends, etc. The Cygwin license allows you those
+it with their friends, etc. The GPL or LGPL licenses allows you those
freedoms, so it is free software.
</para>
</answer></qandaentry>
@@ -103,7 +88,9 @@ freedoms, so it is free software.
<para>To find the version of the Cygwin DLL installed, you can use
<filename>uname</filename> as on Linux or <filename>cygcheck</filename>. Refer to each command's
-<literal>--help</literal> output and the <ulink url='http://cygwin.com/cygwin-ug-net/'>Cygwin User's Guide</ulink> for more information.
+<literal>--help</literal> output and the
+<ulink url='https://cygwin.com/cygwin-ug-net/'>Cygwin User's Guide</ulink>
+for more information.
</para>
<para>If you are looking for the version number for the whole Cygwin
release, there is none. Each package in the Cygwin release has its own
@@ -112,11 +99,12 @@ the efforts of net volunteers who maintain the Cygwin binary ports.
Each package has its own version numbers and its own release process.
</para>
<para>So, how do you get the most up-to-date version of Cygwin? Easy. Just
-download the Cygwin Setup program from
-<ulink url='http://cygwin.com/setup.exe'>http://cygwin.com/setup.exe</ulink>. This program will handle the task
-of updating the packages on your system to the latest version. For
-more information about using Cygwin's <filename>setup.exe</filename>, see
-<ulink url='http://cygwin.com/cygwin-ug-net/setup-net.html'>Setting Up Cygwin</ulink>
+download the Cygwin Setup program by following the instructions
+<ulink url='https://cygwin.com/install.html'>here</ulink>.
+The setup program will handle the task of updating the packages on your system
+to the latest version. For more information about using Cygwin's
+<filename>setup.exe</filename>, see
+<ulink url='https://cygwin.com/cygwin-ug-net/setup-net.html'>Setting Up Cygwin</ulink>
in the Cygwin User's Guide.
</para></answer></qandaentry>
@@ -129,32 +117,29 @@ questions, all of these people will appreciate it if you use the cygwin
mailing lists rather than sending personal email.)</emphasis>
</para>
<para>
-Christopher Faylor (cgf) is one of the project leads. Chris works for
-Netapp but all of his Cygwin activities occur on his own time. He is
-most notably responsible for the support of signal handling and
-fork/exec in Cygwin. He also administers the site which hosts the
-Cygwin project.
+Corinna Vinschen is the current project lead. Corinna is a senior Red Hat
+engineer. Corinna is responsible for the Cygwin library and maintains a couple
+of packages, for instance OpenSSH, OpenSSL, and a lot more.
</para>
<para>
-Corinna Vinschen (corinna) is the other project lead. Corinna is a
-senior Red Hat engineer. Corinna is responsible for such important
-subsystems as security and networking and has recently added support to
-Cygwin for wide characters, increased path length, IPv6, advisory
-file locking and more.
+Yaakov Selkowitz is another Red Hat engineer working on the Cygwin project.
+He's the guy behind the current build and packaging system and maintains by
+far the most packages in the Cygwin distribution.
</para>
<para>
-Yaakov Selkowitz is the Cygwin/X coordinator. Jon Turney serves on the
-Cygwin/X team as a developer.
+Jon Turney is developer and maintainer of the Cygwin X server and a couple
+of related packages.
</para>
<para>
-The Cygwin setup project is currently maintained by a group of people, most notably, Brian Dessent (brian) and Dave Korn (dave.korn).
-</para>
-<para>Please note that all of us working on Cygwin try to
-be as responsive as possible and deal with patches and questions as we
-get them, but realistically we don't have time to answer all of the
-email that is sent to the main mailing list. Making Net releases of the
-Win32 tools and helping people on the Net out is not our primary job
-function, so some email will have to go unanswered.
+The packages in the Net release are maintained by a large group of people;
+a complete list can be found
+<ulink url='https://cygwin.com/cygwin-pkg-maint'>here</ulink>.
+</para>
+<para>Please note that all of us working on Cygwin try to be as responsive as
+possible and deal with patches and questions as we get them, but realistically
+we don't have time to answer all of the email that is sent to the main mailing
+list. Making Net releases of the Win32 tools and helping people on the Net out
+is not our primary job function, so some email will have to go unanswered.
</para>
<para>Many thanks to everyone using the tools for their many contributions in
the form of advice, bug reports, and code fixes. Keep them coming!
diff --git a/winsup/doc/fo.xsl b/winsup/doc/fo.xsl
index 4bc255ce8..f3fee0b14 100644
--- a/winsup/doc/fo.xsl
+++ b/winsup/doc/fo.xsl
@@ -29,4 +29,43 @@
<!-- Inform the DocBook stylesheets that it's safe to use FOP
specific extensions. -->
<xsl:param name="fop1.extensions" select="1"/>
+
+ <!-- autotoc.xsl customization to make refentry in sect1 appear in toc -->
+<xsl:template match="sect1" mode="toc">
+ <xsl:param name="toc-context" select="."/>
+
+ <xsl:variable name="id">
+ <xsl:call-template name="object.id"/>
+ </xsl:variable>
+
+ <xsl:variable name="cid">
+ <xsl:call-template name="object.id">
+ <xsl:with-param name="object" select="$toc-context"/>
+ </xsl:call-template>
+ </xsl:variable>
+
+ <xsl:call-template name="toc.line">
+ <xsl:with-param name="toc-context" select="$toc-context"/>
+ </xsl:call-template>
+
+ <xsl:variable name="depth.from.context" select="count(ancestor::*)-count($toc-context/ancestor::*)"/>
+
+ <xsl:if test="$toc.section.depth > 1
+ and $toc.max.depth > $depth.from.context">
+ <fo:block id="toc.{$cid}.{$id}">
+ <xsl:attribute name="margin-{$direction.align.start}">
+ <xsl:call-template name="set.toc.indent"/>
+ </xsl:attribute>
+
+ <xsl:apply-templates select="refentry|sect2|qandaset[$qanda.in.toc != 0]"
+ mode="toc">
+ <xsl:with-param name="toc-context" select="$toc-context"/>
+ </xsl:apply-templates>
+ </fo:block>
+ </xsl:if>
+</xsl:template>
+
+ <!-- generate ansi rather than k&r style function synopses -->
+ <xsl:param name="funcsynopsis.style" select="ansi" />
+
</xsl:stylesheet>
diff --git a/winsup/doc/gprof.xml b/winsup/doc/gprof.xml
new file mode 100644
index 000000000..b2043cbfd
--- /dev/null
+++ b/winsup/doc/gprof.xml
@@ -0,0 +1,250 @@
+<?xml version="1.0" encoding='UTF-8'?>
+<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook V4.5//EN"
+ "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
+
+<sect1 id="gprof"><title>Profiling Cygwin Programs</title>
+
+<sect2 id="gprof-intro"><title>Introduction</title>
+<para>Profiling is a way to analyze your program to find out where it is
+spending its time. You might need to do this if it seems your program is
+taking more time to do its job than you think it should. It is always
+preferable to profile your program than to just guess where the time is
+being spent; even expert programmers are known to guess badly at this.
+</para>
+
+<para>In Cygwin, you enable profiling with a compiler flag and you display
+the resulting profiling data with gprof. Read on to find out how.
+</para>
+
+<para>To enable profiling of your program, first compile it with an
+additional gcc flag: <userinput>-pg</userinput>. That flag should be used
+when compiling every source file of the program. If your program has a
+Makefile, you would add the flag to all gcc compilation commands or to the
+CFLAGS= setting. A manual compilation that enables profiling looks like this:
+</para>
+
+<screen>
+<prompt>bash$</prompt> <userinput>gcc -pg -g -o myapp myapp.c</userinput>
+</screen>
+
+<para>The <userinput>-pg</userinput> flag causes gcc to do two additional
+things as it compiles your program. First, a small bit of code is added to
+the beginning of each function that records its address and the address it
+was called from at run time. gprof uses this data to generate a call graph.
+Second, gcc arranges to have a special "front end" added to the beginning
+of your program. The front end starts a recurring timer and every time the
+timer fires, 100 times per second, the currently executing address is saved.
+gprof uses this data to generate a "flat profile" showing where your
+program is spending its time.
+</para>
+
+<para>After compiling your program (and linking it, if you do that as a
+separate step), you are ready to profile it. Just run it as you normally
+would. If there are specific code paths you want to profile, take the
+actions that would exercise those code paths. When your program exits,
+you will have an additional file in the current directory: gmon.out.
+That file contains the profiling data gprof processes and displays.
+</para>
+
+<para>gprof has many flags to control its operation. The
+<citation>gprof man page</citation> details everything gprof can do. We
+will only use a few of gprof's flags here. You launch gprof as follows:
+<screen>
+<prompt>bash$</prompt> <userinput>gprof [flags] appname [datafile]...</userinput>
+</screen>
+If you don't specify any flags, gprof operates as if you gave it flags
+<userinput>-p -q</userinput> which means: generate a flat profile with
+descriptive text and generate a call graph with more descriptive text. In
+the examples below we will give specific flags to gprof to demonstrate
+specific displays. We'll also use flag <userinput>-b</userinput> which
+means: be brief, i.e. don't display the descriptive text. You can also
+specify a trailing list of one or more profiling data files. If you don't,
+gprof assumes gmon.out is the only file to process and display.
+</para>
+</sect2>
+
+<sect2 id="gprof-ex"><title>Examples</title>
+<example id="gprof-flat"><title>Flat profile</title>
+<screen>
+<prompt>bash$</prompt> <userinput>gprof -b -p myapp</userinput>
+<literal>Flat profile:
+
+Each sample counts as 0.01 seconds.
+ % cumulative self self total
+ time seconds seconds calls s/call s/call name
+ 25.11 13.34 13.34 1 13.34 13.34 func0
+ 25.00 26.62 13.28 1 13.28 13.28 func1
+ 25.00 39.90 13.28 1 13.28 13.28 func3
+ 24.89 53.12 13.22 1 13.22 13.22 func2
+</literal> </screen> </example>
+
+<example id="gprof-cg"><title>Call graph</title>
+<screen>
+<prompt>bash$</prompt> <userinput>gprof -b -q myapp</userinput>
+<literal> Call graph
+
+
+granularity: each sample hit covers 4 byte(s) for 0.02% of 53.12 seconds
+
+index % time self children called name
+ &lt;spontaneous&gt;
+[1] 100.0 0.00 53.12 main [1]
+ 13.34 0.00 1/1 func0 [2]
+ 13.28 0.00 1/1 func1 [3]
+ 13.28 0.00 1/1 func3 [4]
+ 13.22 0.00 1/1 func2 [5]
+-----------------------------------------------
+ 13.34 0.00 1/1 main [1]
+[2] 25.1 13.34 0.00 1 func0 [2]
+-----------------------------------------------
+ 13.28 0.00 1/1 main [1]
+[3] 25.0 13.28 0.00 1 func1 [3]
+-----------------------------------------------
+ 13.28 0.00 1/1 main [1]
+[4] 25.0 13.28 0.00 1 func3 [4]
+-----------------------------------------------
+ 13.22 0.00 1/1 main [1]
+[5] 24.9 13.22 0.00 1 func2 [5]
+-----------------------------------------------
+
+
+Index by function name
+
+ [2] func0 [5] func2
+ [3] func1 [4] func3
+</literal> </screen> </example>
+
+<example id="gprof-line"><title>Source line profile</title>
+<screen>
+<prompt>bash$</prompt> <userinput>gprof -b -l myapp</userinput>
+<literal>Flat profile:
+
+Each sample counts as 0.01 seconds.
+ % cumulative self self total
+ time seconds seconds calls s/call s/call name
+ 25.11 13.34 13.34 1 13.34 13.34 func0 (myapp.c:9 @ 1004010e0)
+ 25.00 26.62 13.28 1 13.28 13.28 func1 (myapp.c:10 @ 10040111a)
+ 25.00 39.90 13.28 1 13.28 13.28 func3 (myapp.c:12 @ 10040118e)
+ 24.89 53.12 13.22 1 13.22 13.22 func2 (myapp.c:11 @ 100401154)
+
+
+ Call graph
+
+
+granularity: each sample hit covers 4 byte(s) for 0.02% of 53.12 seconds
+
+index % time self children called name
+ 13.34 0.00 1/1 main (myapp.c:26 @ 10040123c) [1]
+[2] 25.1 13.34 0.00 1 func0 (myapp.c:9 @ 1004010e0) [2]
+-----------------------------------------------
+ 13.28 0.00 1/1 main (myapp.c:26 @ 10040123c) [1]
+[3] 25.0 13.28 0.00 1 func1 (myapp.c:10 @ 10040111a) [3]
+-----------------------------------------------
+ 13.28 0.00 1/1 main (myapp.c:28 @ 100401246) [5]
+[4] 25.0 13.28 0.00 1 func3 (myapp.c:12 @ 10040118e) [4]
+-----------------------------------------------
+ 13.22 0.00 1/1 main (myapp.c:27 @ 100401241) [7]
+[6] 24.9 13.22 0.00 1 func2 (myapp.c:11 @ 100401154) [6]
+-----------------------------------------------
+
+
+Index by function name
+
+ [2] func0 (myapp.c:9 @ 1004010e0) [6] func2 (myapp.c:11 @ 100401154)
+ [3] func1 (myapp.c:10 @ 10040111a) [4] func3 (myapp.c:12 @ 10040118e)
+</literal> </screen> </example>
+</sect2>
+
+<sect2 id="gprof-ss"><title>Special situations</title>
+<sect3 id="gprof-mt"><title>Profiling multi-threaded programs</title>
+<para>Multi-threaded programs are profiled just like single-threaded programs.
+There is no mechanism to turn profiling on or off for specific threads.
+gprof combines the data for all threads when generating its displays.
+</para>
+</sect3>
+
+<sect3 id="gprof-fork"><title>Profiling programs that fork</title>
+<para>Programs that fork, i.e., use the fork() system call with or without
+using exec() afterwards, require special care. Since there is only one
+gmon.out file, profiling data from the parent process might get overwritten
+by the child process, or vice-versa, after a fork(). You can avoid this by
+setting the environment variable GMON_OUT_PREFIX before running your
+program. If the variable is non-empty, its contents will be used as a
+prefix to name the profiling data files. Here's an example:
+</para>
+
+<example id="gprof-prefix">
+<screen>
+<prompt>bash$</prompt> <userinput>export GMON_OUT_PREFIX=myapp.out</userinput>
+<prompt>bash$</prompt> <userinput>./myapp -fork</userinput>
+<prompt>bash$</prompt> <userinput>ls myapp.out*</userinput>
+<literal>myapp.out.2728 myapp.out.3224
+</literal>
+<prompt>bash$</prompt> <userinput>gprof -bp myapp myapp.out.2728</userinput>
+<literal>Flat profile:
+
+Each sample counts as 0.01 seconds.
+ % cumulative self self total
+ time seconds seconds calls s/call s/call name
+ 50.25 30.28 30.28 2 15.14 15.14 func3
+ 24.99 45.34 15.06 1 15.06 15.06 func1
+ 24.76 60.26 14.92 1 14.92 14.92 func2
+</literal>
+<prompt>bash$</prompt> <userinput>gprof -bp myapp myapp.out.3224</userinput>
+<literal>Flat profile:
+
+Each sample counts as 0.01 seconds.
+ % cumulative self self total
+ time seconds seconds calls s/call s/call name
+ 49.25 29.36 29.36 2 14.68 14.68 func3
+ 25.43 44.52 15.16 1 15.16 15.16 func1
+ 25.33 59.62 15.10 1 15.10 15.10 func2
+</literal>
+<prompt>bash$</prompt> <userinput>gprof -bp myapp myapp.out*</userinput>
+<literal>Flat profile:
+
+Each sample counts as 0.01 seconds.
+ % cumulative self self total
+ time seconds seconds calls s/call s/call name
+ 49.75 59.64 59.64 4 14.91 14.91 func3
+ 25.21 89.86 30.22 2 15.11 15.11 func1
+ 25.04 119.88 30.02 2 15.01 15.01 func2
+</literal> </screen> </example>
+<para>As the last gprof command above shows, gprof can combine the data
+from a selection of profiling data files to generate its displays. Just
+list the names of those files at the end of the gprof command; you can use
+a wildcard here. NOTE: If you update your program, remember to remove stale
+profiling data files before profiling your program again. If you aren't
+careful about this, gprof could combine data from your most recent version
+with stale data from prior versions, possibly giving misleading displays.
+</para>
+</sect3>
+
+<sect3 id="gprof-res"><title>Getting better profiling resolution</title>
+<para>To get better resolution (i.e., more data points) when profiling
+your program, try running it multiple times with the environment variable
+GMON_OUT_PREFIX set, as described in the previous situation. There will be
+multiple profiling data files generated and you can have gprof combine
+the data from all of them into one display.
+</para>
+</sect3>
+
+<sect3 id="gprof-lib"><title>Profiling programs with their libraries</title>
+<para>At the time of this writing Cygwin's profiling support only allows
+for one range of addresses per program. It is hard-wired to be the range
+covering the .text segment of your program, which is where your code resides.
+If you build your program with static libraries (e.g., libfoo.a), the code
+from those libraries is linked into your program's .text segment so will be
+included when profiling. But dynamic libraries (e.g., libfoo.dll) reside in
+other address ranges and code within them won't be included.
+</para>
+</sect3>
+
+<sect3 id="gprof-cyg"><title>Profiling Cygwin itself</title>
+<para>Due to the issue mentioned in the previous situation and other issues,
+at the time of this writing there is no support for profiling Cygwin itself.
+</para>
+</sect3>
+</sect2>
+
+</sect1>
diff --git a/winsup/doc/highlights.xml b/winsup/doc/highlights.xml
index 5de789a8c..65407ab15 100644
--- a/winsup/doc/highlights.xml
+++ b/winsup/doc/highlights.xml
@@ -49,7 +49,7 @@ The chmod call maps UNIX-style permissions back to the Win32 equivalents.
Because many programs expect to be able to find the
<filename>/etc/passwd</filename> and
<filename>/etc/group</filename> files, we provide <ulink
-url="http://cygwin.com/cygwin-ug-net/using-utils.html">utilities</ulink>
+url="https://cygwin.com/cygwin-ug-net/using-utils.html">utilities</ulink>
that can be used to construct them from the user and group information
provided by the operating system.</para>
@@ -74,10 +74,10 @@ a POSIX-compliant one. The implementation details are safely hidden in the
Cygwin DLL. UNC pathnames (starting with two slashes) are supported for
network paths.</para>
-<para>Since version 1.7.0, the layout of this POSIX view of the Windows file
-system space is stored in the <filename>/etc/fstab</filename> file. Actually,
-there is a system-wide <filename>/etc/fstab</filename> file as well as a
-user-specific fstab file <filename>/etc/fstab.d/${USER}</filename>.</para>
+<para>The layout of this POSIX view of the Windows file system space is
+stored in the <filename>/etc/fstab</filename> file. Actually, there is a
+system-wide <filename>/etc/fstab</filename> file as well as a user-specific
+fstab file <filename>/etc/fstab.d/${USER}</filename>.</para>
<para>At startup the DLL has to find out where it can find the
<filename>/etc/fstab</filename> file. The mechanism used for this is simple.
@@ -130,23 +130,22 @@ guaranteed to be unique. However, we have not found this to be a significant
problem because of the low probability of generating a duplicate inode number.
</para>
-<para>Cygwin 1.7 and later supports Extended Attributes (EAs) via the
-linux-specific function calls <function>getxattr</function>,
-<function>setxattr</function>, <function>listxattr</function>, and
-<function>removexattr</function>. All EAs on Samba or NTFS are treated as
-user EAs, so, if the name of an EA is "foo" from the Windows perspective,
-it's transformed into "user.foo" within Cygwin. This allows Linux-compatible
-EA operations and keeps tools like <command>attr</command>, or
-<command>setfattr</command> happy.
+<para>Cygwin supports Extended Attributes (EAs) via the linux-specific function
+calls <function>getxattr</function>, <function>setxattr</function>,
+<function>listxattr</function>, and <function>removexattr</function>. All EAs
+on Samba or NTFS are treated as user EAs, so, if the name of an EA is "foo"
+from the Windows perspective, it's transformed into "user.foo" within Cygwin.
+This allows Linux-compatible EA operations and keeps tools like
+<command>attr</command>, or <command>setfattr</command> happy.
</para>
-<para><function>chroot</function> is supported since Cygwin 1.1.3.
-However, chroot is not a concept known by Windows. This implies some serious
-restrictions. First of all, the <function>chroot</function> call isn't a
-privileged call. Any user may call it. Second, the chroot environment
-isn't safe against native windows processes. Given that, chroot in Cygwin
-is only a hack which pretends security where there is none. For that reason
-the usage of chroot is discouraged.
+<para><function>chroot</function> is supported. Kind of. Chroot is not a
+concept known by Windows. This implies some serious restrictions. First of
+all, the <function>chroot</function> call isn't a privileged call. Any user
+may call it. Second, the chroot environment isn't safe against native windows
+processes. Given that, chroot in Cygwin is only a hack which pretends security
+where there is none. For that reason the usage of chroot is discouraged.
+Don't use it unless you really, really know what you're doing.
</para>
</sect2>
@@ -245,8 +244,9 @@ support for cloning address space between processes and several
features actively undermine a reliable <literal>fork</literal>
implementation. Three issues are especially prevalent:</para>
-<para><itemizedlist>
-<listitem>DLL base address collisions. Unlike *nix shared
+<itemizedlist mark="bullet">
+
+<listitem><para>DLL base address collisions. Unlike *nix shared
libraries, which use "position-independent code", Windows shared
libraries assume a fixed base address. Whenever the hard-wired
address ranges of two DLLs collide (which occurs quite often), the
@@ -259,19 +259,19 @@ statically-linked dlls (dependencies known at compile time) are
resolved before <literal>cygwin1.dll</literal> initializes and
cannot be fixed afterward. This problem can only be solved by
removing the base address conflicts which cause the problem,
-usually using the <literal>rebaseall</literal> tool.</listitem>
+usually using the <literal>rebaseall</literal> tool.</para></listitem>
-<listitem>Address space layout randomization (ASLR). Starting with
+<listitem><para>Address space layout randomization (ASLR). Starting with
Vista, Windows implements ASLR, which means that thread stacks,
heap, memory-mapped files, and statically-linked dlls are placed
at different (random) locations in each process. This behaviour
interferes with a proper <literal>fork</literal>, and if an
unmovable object (process heap or system dll) ends up at the wrong
location, Cygwin can do nothing to compensate (though it will
-retry a few times automatically).</listitem>
+retry a few times automatically).</para></listitem>
-<listitem>DLL injection by
-<ulink url="http://cygwin.com/faq/faq.html#faq.using.bloda">
+<listitem><para>DLL injection by
+<ulink url="https://cygwin.com/faq/faq.html#faq.using.bloda">
BLODA</ulink>. Badly-behaved applications which
inject dlls into other processes often manage to clobber important
sections of the child's address space, leading to base address
@@ -279,7 +279,9 @@ collisions which rebasing cannot fix. The only way to resolve this
problem is to remove (usually uninstall) the offending app. See
<xref linkend="cygwinenv-implemented-options"></xref> for the
<literal>detect_bloda</literal> option, which may be able to identify the
-BLODA.</listitem></itemizedlist></para>
+BLODA.</para></listitem>
+
+</itemizedlist>
<para>In summary, current Windows implementations make it
impossible to implement a perfectly reliable fork, and occasional
@@ -344,14 +346,11 @@ completely transparent to the application. Cygwin's implementation also
supports the getpeereid BSD extension. However, Cygwin does not yet support
descriptor passing.</para>
-<para>IPv6 is supported beginning with Cygwin release 1.7.0. This
-support is dependent, however, on the availability of the Windows IPv6
-stack. The IPv6 stack was "experimental", i.e. not feature complete in
-Windows 2003 and earlier. Full IPv6 support became available starting
-with Windows Vista and Windows Server 2008. Cygwin does not depend on
-the underlying OS for the (newly implemented) <function>getaddrinfo</function>
-and <function>getnameinfo</function> functions. Cygwin 1.7.0 adds
-replacement functions which implement the full functionality for IPv4.</para>
+<para>IPv6 is supported. This support is dependent, however, on the
+availability of the Windows IPv6 stack. The IPv6 stack was "experimental",
+i.e. not feature complete in Windows 2003 and earlier. Full IPv6 support
+became only available starting with Windows Vista and Windows Server 2008.
+</para>
</sect2>
diff --git a/winsup/doc/html.xsl b/winsup/doc/html.xsl
new file mode 100644
index 000000000..59b77357a
--- /dev/null
+++ b/winsup/doc/html.xsl
@@ -0,0 +1,29 @@
+<?xml version='1.0'?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ xmlns:fo="http://www.w3.org/1999/XSL/Format"
+ version='1.0'>
+
+<xsl:param name="chunker.output.doctype-public"
+ select="'-//W3C//DTD HTML 4.01 Transitional//EN'" />
+<xsl:param name="html.stylesheet" select="'docbook.css'"/>
+<xsl:param name="use.id.as.filename" select="1" />
+<xsl:param name="root.filename" select="@id" />
+<xsl:param name="toc.section.depth" select="4" />
+
+<!-- autotoc.xsl customization to make refentry in sect1 appear in toc -->
+<xsl:template match="sect1" mode="toc">
+ <xsl:param name="toc-context" select="."/>
+ <xsl:call-template name="subtoc">
+ <xsl:with-param name="toc-context" select="$toc-context"/>
+ <xsl:with-param name="nodes" select="sect2|refentry
+ |bridgehead[$bridgehead.in.toc != 0]"/>
+ </xsl:call-template>
+</xsl:template>
+
+<!-- suppress refentry in toc being annotated with refpurpose -->
+<xsl:param name="annotate.toc" select="0" />
+
+<!-- generate ansi rather than k&r style function synopses -->
+<xsl:param name="funcsynopsis.style" select="ansi" />
+
+</xsl:stylesheet>
diff --git a/winsup/doc/intro.xml b/winsup/doc/intro.xml
new file mode 100644
index 000000000..5e96d8b5b
--- /dev/null
+++ b/winsup/doc/intro.xml
@@ -0,0 +1,199 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE reference PUBLIC "-//OASIS//DTD DocBook V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
+
+<reference id="intro" xmlns:xi="http://www.w3.org/2001/XInclude">
+ <referenceinfo>
+ <xi:include href="legal.xml"/>
+ </referenceinfo>
+ <title>Cygwin</title>
+ <refentry id="intro1">
+ <refmeta>
+ <refentrytitle>intro</refentrytitle>
+ <manvolnum>1</manvolnum>
+ <refmiscinfo class="manual">Cygwin</refmiscinfo>
+ </refmeta>
+ <refnamediv>
+ <refname>intro</refname>
+ <refpurpose>Introduction to the Cygwin Environment</refpurpose>
+ </refnamediv>
+ <refsect1>
+ <title>DESCRIPTION</title>
+ <para><emphasis>Cygwin</emphasis> is a Linux-like environment for
+ Windows. It consists of two parts:</para>
+ <para>A DLL (<filename>cygwin1.dll</filename>) which acts as a POSIX API
+ emulation layer providing substantial POSIX API functionality, modelled
+ after the GNU/Linux operating system. The
+ <citerefentry><refentrytitle>intro</refentrytitle><manvolnum>3</manvolnum></citerefentry>
+ man page gives an introduction to this API.</para>
+ <para>A collection of tools which provide Linux look and feel. This man
+ page describes the user environment.</para>
+ </refsect1>
+ <refsect1>
+ <title>AVAILABILITY</title>
+ <para><emphasis>Cygwin</emphasis> is developed by volunteers collaborating
+ over the Internet. It is distributed through the website <ulink
+ url="http://cygwin.com"/>, where you can find extensive documentation,
+ including FAQ, User's Guide, and API Reference. The
+ <emphasis>Cygwin</emphasis> website should be considered the authoritative
+ source of information. The source code, released under the <emphasis>GNU
+ General Public License, Version 3 (GPLv3+)</emphasis> and
+ <emphasis>Lesser GNU General Public License, Version 3 (LGPLv3+)</emphasis>,
+ is also available from the website or one of the mirrors.</para>
+ </refsect1>
+ <refsect1>
+ <title>COMPATIBILITY</title>
+ <para><emphasis>Cygwin</emphasis> uses the GNU versions of many of the
+ standard UNIX command-line utilities (<command>sed</command>,
+ <command>awk</command>, etc.), so the user environment is more similar to
+ a Linux system than, for example, Sun Solaris.</para>
+ <para>The default login shell and <command>/bin/sh</command> for
+ <emphasis>Cygwin</emphasis> is <command>bash</command>, the GNU
+ "Bourne-Again Shell", but other shells such as <command>tcsh</command>
+ (an improved <command>csh</command>) are also available and can be
+ installed using <emphasis>Cygwin</emphasis>'s setup.</para>
+ </refsect1>
+ <refsect1>
+ <title>NOTES</title>
+ <para>To port applications you will need to install the development tools,
+ which you can do by selecting <package>gcc</package> in
+ <emphasis>setup.exe</emphasis> (dependencies are automatically handled).
+ If you need a specific program or library, you can search for a
+ <emphasis>Cygwin</emphasis> package containing it at:</para>
+ <para>
+ <ulink url="http://cygwin.com/packages/"/>
+ </para>
+ <para>If you are a UNIX veteran who plans to use
+ <emphasis>Cygwin</emphasis> extensively, you will probably find it worth
+ your while to learn to use <emphasis>Cygwin</emphasis>-specific tools that
+ provide a UNIX-like interface to common operations. For example,
+ <command>cygpath</command> converts between UNIX and Win32-style
+ pathnames. The full documentation for these utilities is at:</para>
+ <para>
+ <ulink url="http://cygwin.com/cygwin-ug-net/using-utils.html"/>
+ </para>
+ <para>The optional <package>cygutils</package> package also contains
+ utilities that help with common problems, such as
+ <command>dos2unix</command> and <command>unix2dos</command> for the
+ CRLF issue.</para>
+ </refsect1>
+ <refsect1>
+ <title>DOCUMENTATION</title>
+ <para>In addition to man pages and texinfo documentation, many
+ <emphasis>Cygwin</emphasis> packages provide system-independent
+ documentation in the <filename>/usr/share/doc/</filename> directory and
+ <emphasis>Cygwin</emphasis>-specific documentation in
+ <filename>/usr/share/doc/Cygwin/</filename></para>
+ <para>For example, if you have both <command>less</command> and
+ <command>cron</command> installed, the command <command>less
+ /usr/share/doc/Cygwin/cron.README</command> would display the instructions
+ to set up <command>cron</command> on your system.</para>
+ </refsect1>
+ <refsect1>
+ <title>REPORTING BUGS</title>
+ <para>If you find a bug in <emphasis>Cygwin</emphasis>, please read</para>
+ <para>
+ <ulink url="http://cygwin.com/bugs.html"/>
+ </para>
+ <para>and follow the instructions for reporting found there. If you are
+ able to track down the source of the bug and can provide a fix, there are
+ instructions for contributing patches at:</para>
+ <para>
+ <ulink url="http://cygwin.com/contrib.html"/>
+ </para>
+ </refsect1>
+ <refsect1>
+ <title>SEE ALSO</title>
+ <para>
+ <citerefentry>
+ <refentrytitle>intro</refentrytitle>
+ <manvolnum>3</manvolnum>
+ </citerefentry>
+ </para>
+ </refsect1>
+ </refentry>
+
+ <refentry id="intro3">
+ <refmeta>
+ <refentrytitle>intro</refentrytitle>
+ <manvolnum>3</manvolnum>
+ <refmiscinfo class="manual">Cygwin</refmiscinfo>
+ </refmeta>
+ <refnamediv>
+ <refname>intro</refname>
+ <refpurpose>Introduction to the Cygwin API</refpurpose>
+ </refnamediv>
+ <refsect1>
+ <title>DESCRIPTION</title>
+ <para><emphasis>Cygwin</emphasis> is a Linux-like environment for
+ Windows. It consists of two parts:</para>
+ <para>A DLL (<filename>cygwin1.dll</filename>) which acts as a POSIX API
+ emulation layer providing substantial POSIX API functionality, modelled
+ after the GNU/Linux operating system. This page describes the API provided
+ by the DLL.
+ </para>
+ <para>A collection of tools which provide Linux look and feel. This
+ environment is described in the
+ <citerefentry><refentrytitle>intro</refentrytitle><manvolnum>1</manvolnum></citerefentry>
+ man page.</para>
+ </refsect1>
+ <refsect1>
+ <title>AVAILABILITY</title>
+ <para><emphasis>Cygwin</emphasis> is developed by volunteers collaborating
+ over the Internet. It is distributed through the website <ulink
+ url="http://cygwin.com"/>. The website has extensive documentation,
+ including FAQ, User's Guide, and API Reference. It should be considered
+ the authoritative source of information. The source code, released under
+ the <emphasis>GNU General Public License, Version 3 (GPLv3+)</emphasis> and
+ <emphasis>Lesser GNU General Public License, Version 3 (LGPLv3+)</emphasis>,
+ is also available from the website or one of the mirrors.</para>
+ </refsect1>
+ <refsect1>
+ <title>COMPATIBILITY</title>
+ <para><emphasis>Cygwin</emphasis> policy is to attempt to adhere to
+ <emphasis>POSIX.1-2008/SUSv4</emphasis> (Portable Operating System
+ Interface for UNIX / The Single UNIX Specification, Version 4) where
+ possible.</para>
+ <para><emphasis>SUSv4</emphasis> is available online at:</para>
+ <para>
+ <ulink url="http://pubs.opengroup.org/onlinepubs/9699919799/"/>
+ </para>
+ <para>For compatibility information about specific functions, see the API
+ Reference at:</para>
+ <para>
+ <ulink url="http://cygwin.com/cygwin-api/cygwin-api.html"/>
+ </para>
+ <para>Where these standards are ambiguous, Cygwin tries to mimic
+ <emphasis>Linux</emphasis>. However, <emphasis>Cygwin</emphasis> uses
+ <emphasis>newlib</emphasis> instead of <emphasis>glibc</emphasis> as its C
+ Library, available at:</para>
+ <para>
+ <ulink url="https://sourceware.org/newlib/"/>
+ </para>
+ <para>Keep in mind that there are many underlying differences between UNIX
+ and Win32 making complete compatibility an ongoing challenge.</para>
+ </refsect1>
+ <refsect1>
+ <title>REPORTING BUGS</title>
+ <para>If you find a bug in <emphasis>Cygwin</emphasis>, please read</para>
+ <para>
+ <ulink url="http://cygwin.com/bugs.html"/>
+ </para>
+ <para>and follow the instructions for reporting found there. If you are
+ able to track down the source of the bug and can provide a fix, there are
+ instructions for contributing patches at:</para>
+ <para>
+ <ulink url="http://cygwin.com/contrib.html"/>
+ </para>
+ </refsect1>
+ <refsect1>
+ <title>SEE ALSO</title>
+ <para>
+ <citerefentry>
+ <refentrytitle>intro</refentrytitle>
+ <manvolnum>1</manvolnum>
+ </citerefentry>
+ </para>
+ </refsect1>
+ </refentry>
+
+</reference>
diff --git a/winsup/doc/legal.xml b/winsup/doc/legal.xml
index f909f4915..fba3fddab 100644
--- a/winsup/doc/legal.xml
+++ b/winsup/doc/legal.xml
@@ -4,7 +4,7 @@
<legalnotice id="legal">
-<para>Copyright &copy; 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Red Hat, Inc.</para>
+<para>Copyright &copy; Cygwin authors</para>
<!--
diff --git a/winsup/doc/logon-funcs.xml b/winsup/doc/logon-funcs.xml
new file mode 100644
index 000000000..084b0c798
--- /dev/null
+++ b/winsup/doc/logon-funcs.xml
@@ -0,0 +1,95 @@
+<?xml version="1.0" encoding='UTF-8'?>
+<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook V4.5//EN"
+ "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
+
+<sect1 id="func-cygwin-login">
+<title>Helper functions to change user context</title>
+
+<refentry id="func-cygwin-logon_user">
+ <refmeta>
+ <refentrytitle>cygwin_logon_user</refentrytitle>
+ <manvolnum>3</manvolnum>
+ <refmiscinfo class="manual">Cygwin API Reference</refmiscinfo>
+ </refmeta>
+
+ <refnamediv>
+ <refname>cygwin_logon_user</refname>
+ </refnamediv>
+
+ <refsynopsisdiv>
+<funcsynopsis>
+<funcsynopsisinfo>
+#include &lt;sys/cygwin.h&gt;
+</funcsynopsisinfo>
+<funcprototype>
+<funcdef>HANDLE
+<function>cygwin_logon_user</function></funcdef>
+<paramdef>const struct passwd *<parameter>passwd_entry</parameter></paramdef>
+<paramdef>const char *<parameter>password</parameter></paramdef>
+</funcprototype></funcsynopsis>
+ </refsynopsisdiv>
+
+ <refsect1>
+ <title>Description</title>
+<para>Given a pointer to a passwd entry of a user and a cleartext password,
+returns a HANDLE to an impersonation token for this user which can be used
+in a subsequent call to <function>cygwin_set_impersonation_token</function>
+to impersonate that user. This function can only be called from a process
+which has the required NT user rights to perform a logon.</para>
+ </refsect1>
+
+ <refsect1>
+ <title>See also</title>
+<para>See also the chapter
+<ulink url="../cygwin-ug-net/ntsec.html#ntsec-setuid-overview">Switching the user context</ulink>
+in the Cygwin User's guide.</para>
+
+<para>See also <link linkend="func-cygwin-set-impersonation-token">cygwin_set_impersonation_token</link></para>
+ </refsect1>
+</refentry>
+
+<refentry id="func-cygwin-set-impersonation-token">
+ <refmeta>
+ <refentrytitle>cygwin_set_impersonation_token</refentrytitle>
+ <manvolnum>3</manvolnum>
+ <refmiscinfo class="manual">Cygwin API Reference</refmiscinfo>
+ </refmeta>
+
+ <refnamediv>
+ <refname>cygwin_set_impersonation_token</refname>
+ </refnamediv>
+
+ <refsynopsisdiv>
+<funcsynopsis>
+<funcsynopsisinfo>
+#include &lt;sys/cygwin.h&gt;
+</funcsynopsisinfo>
+<funcprototype>
+<funcdef>void
+<function>cygwin_set_impersonation_token</function></funcdef>
+<paramdef>const HANDLE <parameter>token</parameter></paramdef>
+</funcprototype></funcsynopsis>
+ </refsynopsisdiv>
+
+ <refsect1>
+ <title>Description</title>
+<para>Use this function to enable the token given as parameter as
+impersonation token for the next call to <function>setuid</function> or
+<function>seteuid</function>. Use
+<function>cygwin_set_impersonation_token</function> together with
+<function>cygwin_logon_user</function> to impersonate users using
+password authentication.</para>
+ </refsect1>
+
+ <refsect1>
+ <title>See also</title>
+<para>See also the chapter
+<ulink url="../cygwin-ug-net/ntsec.html#ntsec-setuid-overview">Switching the user context</ulink>
+in the Cygwin User's guide.</para>
+
+<para>See also <link linkend="func-cygwin-logon_user">cygwin_logon_user</link></para>
+ </refsect1>
+
+</refentry>
+
+</sect1>
diff --git a/winsup/doc/man.xsl b/winsup/doc/man.xsl
new file mode 100644
index 000000000..22e624fab
--- /dev/null
+++ b/winsup/doc/man.xsl
@@ -0,0 +1,13 @@
+<?xml version='1.0'?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version='1.0'>
+
+<!-- don't truncate manpage titles for long function names -->
+<xsl:param name="man.th.title.max.length" select="33" />
+
+<!-- don't moan about missing metadata -->
+<xsl:param name="refentry.meta.get.quietly" select="1" />
+
+<!-- base URL for relative links -->
+<xsl:param name="man.base.url.for.relative.links">https://cygwin.com/cygwin-ug-net/</xsl:param>
+
+</xsl:stylesheet>
diff --git a/winsup/doc/misc-funcs.xml b/winsup/doc/misc-funcs.xml
new file mode 100644
index 000000000..16b3d61eb
--- /dev/null
+++ b/winsup/doc/misc-funcs.xml
@@ -0,0 +1,113 @@
+<?xml version="1.0" encoding='UTF-8'?>
+<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook V4.5//EN"
+ "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
+
+<sect1 id="func-cygwin-misc">
+<title>Miscellaneous functions</title>
+
+<refentry id="func-cygwin-attach-handle-to-fd">
+ <refmeta>
+ <refentrytitle>cygwin_attach_handle_to_fd</refentrytitle>
+ <manvolnum>3</manvolnum>
+ <refmiscinfo class="manual">Cygwin API Reference</refmiscinfo>
+ </refmeta>
+
+ <refnamediv>
+ <refname>cygwin_attach_handle_to_fd</refname>
+ </refnamediv>
+
+ <refsynopsisdiv>
+<funcsynopsis>
+<funcsynopsisinfo>
+#include &lt;sys/cygwin.h&gt;
+</funcsynopsisinfo>
+<funcprototype>
+<funcdef>int
+<function>cygwin_attach_handle_to_fd</function></funcdef>
+<paramdef>char *<parameter>name</parameter></paramdef>
+<paramdef>int <parameter>fd</parameter></paramdef>
+<paramdef>HANDLE <parameter>handle</parameter></paramdef>
+<paramdef>int <parameter>bin</parameter></paramdef>
+<paramdef>int <parameter>access</parameter></paramdef>
+</funcprototype></funcsynopsis>
+ </refsynopsisdiv>
+
+ <refsect1>
+ <title>Description</title>
+<para>This function can be used to turn a Win32 "handle" into a
+posix-style file handle. <parameter>fd</parameter> may be -1 to
+make cygwin allocate a handle; the actual handle is returned
+in all cases.</para>
+
+<para>Even after using function, Cygwin doesn't know anything about the
+underlying file or device. It just tries to supply the typical file
+functions on a "best-effort" basis. Use with care. Don't expect too
+much.</para>
+ </refsect1>
+</refentry>
+
+<refentry id="func-cygwin-internal">
+ <refmeta>
+ <refentrytitle>cygwin_internal</refentrytitle>
+ <manvolnum>3</manvolnum>
+ <refmiscinfo class="manual">Cygwin API Reference</refmiscinfo>
+ </refmeta>
+
+ <refnamediv>
+ <refname>cygwin_internal</refname>
+ </refnamediv>
+
+ <refsynopsisdiv>
+<funcsynopsis>
+<funcsynopsisinfo>
+#include &lt;sys/cygwin.h&gt;
+</funcsynopsisinfo>
+<funcprototype>
+<funcdef>uintptr_t
+<function>cygwin_internal</function></funcdef>
+<paramdef>cygwin_getinfo_types <parameter>t</parameter></paramdef>
+<paramdef><parameter>...</parameter></paramdef>
+</funcprototype></funcsynopsis>
+ </refsynopsisdiv>
+
+ <refsect1>
+ <title>Description</title>
+<para>This function gives you access to various internal data and functions.
+It takes two arguments. The first argument is a type from the 'cygwin_getinfo_types'
+enum. The second is an optional pointer.</para>
+<para>Stay away unless you know what you're doing.</para>
+ </refsect1>
+</refentry>
+
+
+<refentry id="func-cygwin-stackdump">
+ <refmeta>
+ <refentrytitle>cygwin_stackdump</refentrytitle>
+ <manvolnum>3</manvolnum>
+ <refmiscinfo class="manual">Cygwin API Reference</refmiscinfo>
+ </refmeta>
+
+ <refnamediv>
+ <refname>cygwin_stackdump</refname>
+ </refnamediv>
+
+ <refsynopsisdiv>
+<funcsynopsis>
+<funcsynopsisinfo>
+#include &lt;sys/cygwin.h&gt;
+</funcsynopsisinfo>
+<funcprototype>
+<funcdef>void
+<function>cygwin_stackdump</function></funcdef>
+<void />
+</funcprototype></funcsynopsis>
+ </refsynopsisdiv>
+
+ <refsect1>
+ <title>Description</title>
+<para> Outputs a stackdump to stderr from the called location.
+</para>
+ </refsect1>
+</refentry>
+
+</sect1>
diff --git a/winsup/doc/new-features.xml b/winsup/doc/new-features.xml
index 5e0fa53fb..9d428e2e8 100644
--- a/winsup/doc/new-features.xml
+++ b/winsup/doc/new-features.xml
@@ -2,9 +2,615 @@
<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook V4.5//EN"
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
-<sect1 id="ov-new1.7"><title>What's new and what changed in Cygwin 1.7</title>
+<sect1 id="ov-new"><title>What's new and what changed in Cygwin</title>
-<sect2 id="ov-new1.7.25"><title>What's new and what changed from 1.7.24 to 1.7.25</title>
+<sect2 id="ov-new2.5"><title>What's new and what changed in 2.5</title>
+
+<itemizedlist mark="bullet">
+
+<listitem><para>
+Full set of POSIX.1e ACL API functions now implemented.
+New APIs: acl_add_perm, acl_calc_mask, acl_clear_perms, acl_copy_entry,
+acl_copy_ext, acl_copy_int, acl_create_entry, acl_delete_def_file,
+acl_delete_entry, acl_delete_perm, acl_dup, acl_free, acl_from_text,
+acl_get_entry, acl_get_fd, acl_get_file, acl_get_permset, acl_get_qualifier,
+acl_get_tag_type, acl_init, acl_set_fd, acl_set_file, acl_set_permset,
+acl_set_qualifier, acl_set_tag_type, acl_size, acl_to_text, acl_valid.
+</para></listitem>
+
+<listitem><para>
+Most libacl extensions now implemented, too:
+New APIs: acl_check, acl_cmp, acl_entries, acl_equiv_mode, acl_error,
+acl_extended_fd, acl_extended_file, acl_extended_file_nofollow,
+acl_from_mode, acl_get_perm, acl_to_any_text.
+</para></listitem>
+
+<listitem><para>
+Including &lt;sys/acl.h&gt; now *only* includes the POSIX ACL API. To include
+the old Solaris API, include &lt;cygwin/acl.h&gt;.
+</para></listitem>
+
+<listitem><para>
+First implementation of pthread_barrier/pthread_barrierattr functions.
+New APIs: pthread_barrierattr_init, pthread_barrierattr_setpshared,
+pthread_barrierattr_getpshared, pthread_barrierattr_destroy,
+pthread_barrier_init, pthread_barrier_destroy, pthread_barrier_wait.
+</para></listitem>
+
+<listitem><para>
+Enabled console reports requested by escape sequences: Requesting primary
+and secondary device attributes, requesting cursor position report;
+see https://cygwin.com/ml/cygwin-patches/2012-q3/msg00019.html
+</para></listitem>
+
+<listitem><para>
+New APIs: clog10, clog10f, nexttoward, nexttowardf, nexttowardl.
+</para></listitem>
+
+<listitem><para>
+Add missing long double functions. New APIs:
+acoshl, acosl, asinhl, asinl, atan2l, atanhl, atanl, cacoshl, cacosl, cargl,
+casinhl, casinl, catanhl, catanl, ccoshl, ccosl, ceill, cexpl, clog10l,
+clogl, conjl, copysignl, coshl, cosl, cpowl, cprojl, csinhl, csinl, csqrtl,
+ctanhl, ctanl, dreml, erfcl, erfl, exp10l, exp2l, expl, expm1l, fabsl,
+fdiml, floorl, fmal, fmaxl, fminl, fmodl, frexpl, ilogbl, isinfl, isnanl,
+ldexpl, lgammal, lgammal_r, llroundl, log10l, log1pl, log2l, logbl, logl,
+lroundl, modfl, nearbyintl, nextafterl, pow10l, powl, remainderl, remquol,
+roundl, scalbl, scalblnl, scalbnl, sincosl, sinhl, sinl, tanhl, tanl,
+tgammal, truncl.
+</para></listitem>
+
+<listitem><para>
+In calls to chmod treat ACLs with extra ACEs *only* for Admins and
+SYSTEM like a trivial ACL.
+</para></listitem>
+
+<listitem><para>
+Bump POSIX option macros to POSIX.1-2008.
+</para></listitem>
+
+<listitem><para>
+Profiling data, specifically pc sampling, now covers all threads of a
+program and not just the main thread. Environment variable GMON_OUT_PREFIX
+enables multiple gmon.out files to preserve profiling data after fork or
+from multiple program runs.
+</para></listitem>
+
+<listitem><para>
+Feature test macros, which control which symbols are exposed in the standard
+headers, have been completely overhauled for compatibility with glibc.
+</para></listitem>
+
+<listitem><para>
+The isinf, isinff, and isinfl functions are signed, returning -1 for
+negative infinity for compatibility with glibc.
+</para></listitem>
+
+</itemizedlist>
+
+</sect2>
+
+<sect2 id="ov-new2.4"><title>What's new and what changed in 2.4</title>
+
+<itemizedlist mark="bullet">
+
+<listitem><para>
+New, unified implementation of POSIX permission and ACL handling. The
+new ACLs now store the POSIX ACL MASK/CLASS_OBJ permission mask, and
+they allow to inherit the S_ISGID bit. ACL inheritance now really
+works as desired, in a limited, but theoretically equivalent fashion
+even for non-Cygwin processes.</para>
+
+<para>To accommodate standard Windows ACLs, the POSIX permissions of
+the owner and all other users in the ACL are computed using the Windows
+AuthZ API. This may slow down the computation of POSIX permissions
+noticably in some circumstances, but is generally more correct.
+The new code also ignores SYSTEM and Administrators group permissions
+when computing the MASK/CLASS_OBJ permission mask on old ACLs, and it
+doesn't deny access to SYSTEM and Administrators group based on the
+value of MASK/CLASS_OBJ when creating the new ACLs.</para>
+
+<para>The new code now handles the S_ISGID bit on directories as on Linux:
+Setting S_ISGID on a directory causes new files and subdirs created
+within to inherit its group, rather than the primary group of the user
+who created the file. This only works for files and directories
+created by Cygwin processes.
+</para></listitem>
+
+<listitem><para>
+cygpath has a new -U option, which creates cygdrive paths using the
+unambiguous /proc/cygdrive prefix.
+</para></listitem>
+
+<listitem><para>
+New API: rpmatch.
+</para></listitem>
+
+<listitem><para>
+Align setfacl(1) usage a bit closer to the usage on Linux. Rename -d option
+to -x, --substitute to --set. Add --no-mask and --mask options. Allow to
+use the -b and -k option combined to allow reducing an ACL to only reflect
+standard POSIX permissions.
+</para></listitem>
+
+<listitem><para>
+Fix (numeric and monetary) decimal point and thousands separator in
+fa_IR and ps_AF locales to be aligned with Linux.
+</para></listitem>
+
+<listitem><para>
+utmpname/utmpxname are now defined as int functions as on Linux.
+</para></listitem>
+
+</itemizedlist>
+
+</sect2>
+
+<sect2 id="ov-new2.3"><title>What's new and what changed in 2.3</title>
+
+<itemizedlist mark="bullet">
+
+<listitem><para>
+strftime(3) supports %s (seconds since Epoch) now.
+</para></listitem>
+
+<listitem><para>
+posix_madvise(POSIX_MADV_WILLNEED) now utilizes OS functionality available
+starting with Windows 8/Server 2012.
+</para><para>
+posix_madvise(POSIX_MADV_DONTNEED) now utilizes OS functionality available
+starting with Windows 8.1/Server 2012R2.
+</para></listitem>
+
+<listitem><para>
+sysconf() now supports returning CPU cache information:
+ <screen>
+ _SC_LEVEL1_ICACHE_SIZE, _SC_LEVEL1_ICACHE_ASSOC, _SC_LEVEL1_ICACHE_LINESIZE,
+ _SC_LEVEL1_DCACHE_SIZE, _SC_LEVEL1_DCACHE_ASSOC, _SC_LEVEL1_DCACHE_LINESIZE,
+ _SC_LEVEL2_CACHE_SIZE, _SC_LEVEL2_CACHE_ASSOC, _SC_LEVEL2_CACHE_LINESIZE,
+ _SC_LEVEL3_CACHE_SIZE, _SC_LEVEL3_CACHE_ASSOC, _SC_LEVEL3_CACHE_LINESIZE,
+ _SC_LEVEL4_CACHE_SIZE, _SC_LEVEL4_CACHE_ASSOC, _SC_LEVEL4_CACHE_LINESIZE
+ </screen>
+</para></listitem>
+
+<listitem><para>
+New API: aligned_alloc, at_quick_exit, quick_exit.
+</para></listitem>
+
+<listitem><para>
+Add support for Parallels Desktop FS (prlfs).
+</para></listitem>
+
+</itemizedlist>
+
+</sect2>
+
+<sect2 id="ov-new2.2"><title>What's new and what changed in 2.2</title>
+
+<itemizedlist mark="bullet">
+
+<listitem><para>
+New APIs: getcontext, setcontext, makecontext, swapcontext.
+</para></listitem>
+
+<listitem><para>
+New functions: sigsetjmp, siglongjmp.
+</para>
+<para>
+These were only available as macros up to now, but POSIX requires that
+siglongjmp has to be available as function.
+</para></listitem>
+
+</itemizedlist>
+
+</sect2>
+
+<sect2 id="ov-new2.1"><title>What's new and what changed in 2.1</title>
+
+<itemizedlist mark="bullet">
+
+<listitem><para>
+Handle pthread stacksizes as in GLibc: Default to RLIMIT_STACK resource.
+Allow to set RLIMIT_STACK via setrlimit. Default RLIMIT_STACK to value
+from executable header as described on the MSDN website
+<ulink url="https://msdn.microsoft.com/en-us/library/windows/desktop/ms686774.aspx">Thread Stack Size</ulink>
+Default stacksize to 2 Megs in case RLIMIT_STACK is set to RLIM_INFINITY.
+</para></listitem>
+
+<listitem><para>
+First cut of an implementation to allow signal handlers running on an
+alternate signal stack.
+</para></listitem>
+
+<listitem><para>
+New API sigaltstack, plus definitions for SA_ONSTACK, SS_ONSTACK,
+SS_DISABLE, MINSIGSTKSZ, SIGSTKSZ.
+</para></listitem>
+
+<listitem><para>
+New API: sethostname.
+</para></listitem>
+
+</itemizedlist>
+
+</sect2>
+
+<sect2 id="ov-new2.0"><title>What's new and what changed in 2.0</title>
+
+<itemizedlist mark="bullet">
+
+<listitem><para>
+basename(3) now comes in two flavors, POSIX and GNU. The POSIX version is
+the default. You get the GNU version after
+
+<screen>
+ #define _GNU_SOURCE
+ #include &lt;string.h&gt;
+</screen>
+</para></listitem>
+
+</itemizedlist>
+
+</sect2>
+
+<sect2 id="ov-new1.7.35"><title>What's new and what changed in 1.7.35</title>
+
+<itemizedlist mark="bullet">
+
+<listitem><para>
+Performance improvements of the new account DB handling.
+</para></listitem>
+
+<listitem><para>
+Since 1.7.34, chmod does not always affect the POSIX permission mask as
+returned by stat(2) or printed by ls(1), due to the improved POSIX ACL
+handling. However, that's still far from perfect, so, as a temporary
+workaround, chmod now checks if secondary groups and users in the ACL
+have more permissions than the primary group. If so, the permissions of
+the secondary users and groups will be reduced according to the mask
+given by the new primary group permissions. I.e, chmod 600 will remove
+all permissions from the primary group as well as all secondary user and
+group entries in the ACL.
+</para></listitem>
+
+<listitem><para>
+Change handling of group permissions if owner SID == group SID. Now the
+group permissions don't mirror the user permissions anymore, thus
+leading to less hassle with security-conscious applications.
+</para></listitem>
+
+<listitem><para>
+Allow group SID to be the same as owner SID for "Microsoft Accounts".
+Those have the group in their user token set to the owner SID by
+default. Drop the workaround to change their primary group to "Users".
+It's not required anymore due to the aforementioned changes.
+</para></listitem>
+
+<listitem><para>
+Change getfacl long options from --all to --access and from --dir to
+--default, along the lines of the Linux getfacl tool.
+</para></listitem>
+
+<listitem><para>
+Don't raise a SIGSYS signal in the XSI IPC functions if cygserver is not
+running. Just return -1 with errno set to ENOSYS.
+</para></listitem>
+
+<listitem><para>
+New APIs: cabsl, cimagl, creall, finitel, hypotl, sqrtl.
+</para></listitem>
+
+<listitem><para>
+New API: issetugid.
+</para></listitem>
+
+</itemizedlist>
+
+</sect2>
+
+<sect2 id="ov-new1.7.34"><title>What's new and what changed in 1.7.34</title>
+
+<itemizedlist mark="bullet">
+
+<listitem><para>
+Cygwin can now generate passwd/group entries directly from Windows user
+databases (local SAM or Active Directory), thus allowing to run Cygwin
+without having to create /etc/passwd and /etc/group files. Introduce
+/etc/nsswitch.conf file to configure passwd/group handling.
+</para>
+
+<para>
+For bordercase which require to use /etc/passwd and /etc/group files,
+change mkpasswd/mkgroup to generate passwd/group entries compatible with
+the entries read from SAM/AD.
+</para>
+
+<para>For a description of this exciting new feature see
+<xref linkend="ntsec"></xref>.
+</para></listitem>
+
+<listitem><para>
+Add -b/--remove-all option to setfacl to reduce the ACL to only the entries
+representing POSIX permission bits.
+</para></listitem>
+
+<listitem><para>
+Add -k/--remove-default option to setfacl to remove all default ACL entries
+from an ACL.
+</para></listitem>
+
+<listitem><para>
+Add restore action to regtool.
+</para></listitem>
+
+<listitem><para>
+Make gethostbyname2 handle numeric host addresses as well as the
+reserved domain names "localhost" and "invalid" per RFC 6761.
+</para></listitem>
+
+<listitem><para>
+Revamp Solaris ACL implementation to more closely work like POSIX ACLs
+are supposed to work. Finally implement a CLASS_OBJ emulation. Update
+getfacl(1)/setfacl(1) accordingly.
+</para></listitem>
+
+<listitem><para>
+The xdr functions are no longer exported for newly built executables.
+Use libtirpc-devel instead.
+</para></listitem>
+
+<listitem><para>
+32 bit only: Change default values for socket buffer size to raise
+performance on 10Gb networks.
+</para></listitem>
+
+<listitem><para>
+When spawning a process under another user account, merge the user's
+default Windows environment into the new process' environment.
+</para></listitem>
+
+<listitem><para>
+New APIs: qsort_r, __bsd_qsort_r.
+</para></listitem>
+
+<listitem><para>
+New API: wcstold.
+</para></listitem>
+
+<listitem><para>
+New APIs: __fbufsize, __flbf, __fpending, __freadable, __freading,
+__fsetlocking, __fwritable, __fwriting.
+</para></listitem>
+
+<listitem><para>
+New APIs: clearerr_unlocked, feof_unlocked, ferror_unlocked, fflush_unlocked,
+fgetc_unlocked, fgets_unlocked, fgetwc_unlocked, fgetws_unlocked,
+fileno_unlocked, fputc_unlocked, fputs_unlocked, fputwc_unlocked,
+fputws_unlocked, fread_unlocked, fwrite_unlocked, getwc_unlocked,
+getwchar_unlocked, putwc_unlocked, putwchar_unlocked.
+</para></listitem>
+
+<listitem><para>
+New API: sockatmark.
+</para></listitem>
+
+</itemizedlist>
+
+</sect2>
+
+<sect2 id="ov-new1.7.33"><title>What's new and what changed in 1.7.33</title>
+
+<itemizedlist mark="bullet">
+
+<listitem><para>
+/proc/cygdrive is a new symlink pointing to the current cygdrive prefix.
+This can be utilized in scripts to access paths via cygdrive prefix,
+even if the cygdrive prefix has been changed by the user.
+</para></listitem>
+
+<listitem><para>
+/proc/partitions now prints the windows mount points the device is
+mounted on. This allows to recognize the underlying Windows devices of
+the Cygwin raw device names.
+</para></listitem>
+
+<listitem><para>
+New API: quotactl, designed after the Linux/BSD function, but severely
+restricted: Windows only supports user block quotas on NTFS, no group
+quotas, no inode quotas, no time constraints.
+</para></listitem>
+
+<listitem><para>
+New APIs: ffsl, ffsll (glibc extensions).
+</para></listitem>
+
+<listitem><para>
+New API: stime (SVr4).
+</para></listitem>
+
+<listitem><para>
+Provide Cygwin documentation (PDFs and HTML) for offline usage in
+<filename>/usr/share/doc/cygwin-${version}</filename>.
+</para></listitem>
+
+<listitem><para>
+New internal exception handling based on SEH on 64 bit Cygwin.
+</para></listitem>
+
+<listitem><para>
+When exec'ing applications, check if $PATH exists and is non-empty. If
+not, add PATH variable with Cygwin installation directory as content to
+Windows environment to allow loading of Cygwin system DLLs.
+</para></listitem>
+
+<listitem><para>
+Disable CYGWIN "dosfilewarning" option by default.
+</para></listitem>
+
+<listitem><para>
+Improve various header files for C++- and standards-compliance.
+</para></listitem>
+
+<listitem><para>
+Doug Lea malloc implementation update from 2.8.3 to the latest 2.8.6.
+</para></listitem>
+
+<listitem><para>
+atexit(3) is now exported as statically linked function from libcygwin.a.
+This allows reliable access to the DSO handle of the caller for newly
+built executables. The former atexit entry point into the DLL remains
+for backward compatibility only.
+</para></listitem>
+
+</itemizedlist>
+
+</sect2>
+
+<sect2 id="ov-new1.7.32"><title>What's new and what changed in 1.7.32</title>
+
+<itemizedlist mark="bullet">
+
+<listitem><para>
+Export __cxa_atexit and __cxa_finalize to allow C++ standards-compliant
+destructor handling in libstdc++ and g++ compiled code.
+
+Please note that, in order to benefit from this new feature, C++ code
+must be recompiled with the upcoming gcc 4.8.3-3 release which will
+enable the -fuse-cxa-atexit flag by default, and that C++ applications
+using this feature will not run on older Cygwin releases.
+</para></listitem>
+
+<listitem><para>
+Support more recent CPU flags in /proc/cpuinfo.
+</para></listitem>
+
+</itemizedlist>
+
+</sect2>
+
+<sect2 id="ov-new1.7.31"><title>What's new and what changed in 1.7.31</title>
+
+<itemizedlist mark="bullet">
+
+<listitem><para>
+Improve performance of send(2), sendto(2), sendmsg(2) when using small
+input buffers.
+</para></listitem>
+
+<listitem><para>
+The default pthread_mutex type is now PTHREAD_MUTEX_NORMAL, rather than
+PTHREAD_MUTEX_ERRORCHECK, just as on Linux.
+</para></listitem>
+
+<listitem><para>
+Align pthread_attr stack functions more closely to Linux.
+</para></listitem>
+
+<listitem><para>
+Mark pthread_attr_getstackaddr and pthread_attr_setstackaddr as deprecated,
+as on Linux.
+</para></listitem>
+
+</itemizedlist>
+
+</sect2>
+
+<sect2 id="ov-new1.7.29"><title>What's new and what changed in 1.7.29</title>
+
+<itemizedlist mark="bullet">
+
+<listitem><para>
+Allow quoting of arguments to the CYGWIN environment variable, i.e.,
+set CYGWIN=error_start="c:\bin\someprogram -T"
+</para></listitem>
+
+<listitem><para>
+Console screen clearing works more like xterm or mintty.
+</para></listitem>
+
+</itemizedlist>
+
+</sect2>
+
+<sect2 id="ov-new1.7.28"><title>What's new and what changed in 1.7.28</title>
+
+<itemizedlist mark="bullet">
+
+<listitem><para>
+popen now supports the Glibc 'e' flag to set the FD_CLOEXEC flag on the pipe
+in a thread-safe way.
+</para></listitem>
+
+<listitem><para>
+New netinet/ip6.h header.
+</para></listitem>
+
+<listitem><para>
+Switch to BSD FILE stream fopen/exit semantics, as in all BSD variants
+and Linux/GLibc: Don't fflush/lseek a FILE stream on fclose and exit,
+if it only has been read from.
+</para></listitem>
+
+</itemizedlist>
+
+</sect2>
+
+<sect2 id="ov-new1.7.27"><title>What's new and what changed in 1.7.27</title>
+
+<itemizedlist mark="bullet">
+
+<listitem><para>
+Don't create native symlinks with target paths having long path prefixes
+"\\?\" if the target path is shorter than MAX_PATH characters. This works
+around a Windows 8.1 bug: The ShellExecuteW fails if the lpFile parameter
+points to a native NTFS symlink with a target path prefixed with "\\?\".
+</para></listitem>
+
+</itemizedlist>
+
+</sect2>
+
+<sect2 id="ov-new1.7.26"><title>What's new and what changed in 1.7.26</title>
+
+<itemizedlist mark="bullet">
+
+<listitem><para>
+getaddrinfo now supports glibc-specific International Domain Name (IDN)
+extension flags: AI_IDN, AI_CANONIDN, AI_IDN_ALLOW_UNASSIGNED,
+AI_IDN_USE_STD3_ASCII_RULES.
+</para></listitem>
+
+<listitem><para>
+getnameinfo now supports glibc-specific International Domain Name (IDN)
+extension flags: NI_IDN, NI_IDN_ALLOW_UNASSIGNED, NI_IDN_USE_STD3_ASCII_RULES.
+</para></listitem>
+
+<listitem><para>
+Slightly improve randomness of /dev/random emulation.
+</para></listitem>
+
+<listitem><para>
+Allow to use advisory locking on any device. POSIX fcntl and lockf locking
+works with any device, BSD flock locking only with devices backed by an OS
+handle. Right now this excludes console windows on pre Windows 8, as well as
+almost all virtual files under /proc from BSD flock locking.
+</para></listitem>
+
+<listitem><para>
+The header /usr/include/exceptions.h, containing implementation details for
+32 bit Windows' exception handling only, has been removed.
+</para></listitem>
+
+<listitem><para>
+Preliminary, experimental support of the posix_spawn family of functions.
+New associated header /usr/include/spawn.h.
+</para></listitem>
+
+</itemizedlist>
+
+</sect2>
+
+<sect2 id="ov-new1.7.25"><title>What's new and what changed in 1.7.25</title>
<itemizedlist mark="bullet">
@@ -22,7 +628,7 @@ partitions on a tape.
</sect2>
-<sect2 id="ov-new1.7.24"><title>What's new and what changed from 1.7.23 to 1.7.24</title>
+<sect2 id="ov-new1.7.24"><title>What's new and what changed in 1.7.24</title>
<itemizedlist mark="bullet">
@@ -34,7 +640,7 @@ Allow application override of posix_memalign.
</sect2>
-<sect2 id="ov-new1.7.23"><title>What's new and what changed from 1.7.22 to 1.7.23</title>
+<sect2 id="ov-new1.7.23"><title>What's new and what changed in 1.7.23</title>
<itemizedlist mark="bullet">
@@ -47,7 +653,7 @@ send the full windows command line to any subprocesses.
</sect2>
-<sect2 id="ov-new1.7.22"><title>What's new and what changed from 1.7.21 to 1.7.22</title>
+<sect2 id="ov-new1.7.22"><title>What's new and what changed in 1.7.22</title>
<itemizedlist mark="bullet">
@@ -71,7 +677,7 @@ containing arbitrary byte values as GLibc's regcomp.
</sect2>
-<sect2 id="ov-new1.7.21"><title>What's new and what changed from 1.7.20 to 1.7.21</title>
+<sect2 id="ov-new1.7.21"><title>What's new and what changed in 1.7.21</title>
<itemizedlist mark="bullet">
@@ -83,7 +689,7 @@ New API: rawmemchr.
</sect2>
-<sect2 id="ov-new1.7.19"><title>What's new and what changed from 1.7.18 to 1.7.19</title>
+<sect2 id="ov-new1.7.19"><title>What's new and what changed in 1.7.19</title>
<itemizedlist mark="bullet">
@@ -119,7 +725,7 @@ arc4random_buf, arc4random_stir, arc4random_uniform.
</sect2>
-<sect2 id="ov-new1.7.18"><title>What's new and what changed from 1.7.17 to 1.7.18</title>
+<sect2 id="ov-new1.7.18"><title>What's new and what changed in 1.7.18</title>
<itemizedlist mark="bullet">
@@ -155,7 +761,7 @@ New API: cfsetspeed.
</sect2>
-<sect2 id="ov-new1.7.17"><title>What's new and what changed from 1.7.16 to 1.7.17</title>
+<sect2 id="ov-new1.7.17"><title>What's new and what changed in 1.7.17</title>
<itemizedlist mark="bullet">
@@ -173,7 +779,7 @@ allows to open the file with the O_EXCL flag set.
</sect2>
-<sect2 id="ov-new1.7.16"><title>What's new and what changed from 1.7.15 to 1.7.16</title>
+<sect2 id="ov-new1.7.16"><title>What's new and what changed in 1.7.16</title>
<itemizedlist mark="bullet">
@@ -189,7 +795,7 @@ Recognize ReFS filesystem.
</sect2>
-<sect2 id="ov-new1.7.15"><title>What's new and what changed from 1.7.14 to 1.7.15</title>
+<sect2 id="ov-new1.7.15"><title>What's new and what changed in 1.7.15</title>
<itemizedlist mark="bullet">
@@ -201,7 +807,7 @@ CYGWIN=pipe_byte option now forces the opening of pipes in byte mode rather than
</sect2>
-<sect2 id="ov-new1.7.14"><title>What's new and what changed from 1.7.13 to 1.7.14</title>
+<sect2 id="ov-new1.7.14"><title>What's new and what changed in 1.7.14</title>
<itemizedlist mark="bullet">
@@ -213,7 +819,7 @@ Add mouse reporting modes 1005, 1006 and 1015 to console window.
</sect2>
-<sect2 id="ov-new1.7.13"><title>What's new and what changed from 1.7.12 to 1.7.13</title>
+<sect2 id="ov-new1.7.13"><title>What's new and what changed in 1.7.13</title>
<itemizedlist mark="bullet">
@@ -231,7 +837,7 @@ is now properly flushed.
</sect2>
-<sect2 id="ov-new1.7.12"><title>What's new and what changed from 1.7.11 to 1.7.12</title>
+<sect2 id="ov-new1.7.12"><title>What's new and what changed in 1.7.12</title>
<itemizedlist mark="bullet">
@@ -266,7 +872,7 @@ finding potential BLODAs.
</sect2>
-<sect2 id="ov-new1.7.11"><title>What's new and what changed from 1.7.10 to 1.7.11</title>
+<sect2 id="ov-new1.7.11"><title>What's new and what changed in 1.7.11</title>
<itemizedlist mark="bullet">
@@ -293,7 +899,7 @@ changed using the pthread_attr_setstacksize call.
</sect2>
-<sect2 id="ov-new1.7.10"><title>What's new and what changed from 1.7.9 to 1.7.10</title>
+<sect2 id="ov-new1.7.10"><title>What's new and what changed in 1.7.10</title>
<itemizedlist mark="bullet">
@@ -417,7 +1023,7 @@ pthread_sigqueue, sysinfo.
</sect2>
-<sect2 id="ov-new1.7.9"><title>What's new and what changed from 1.7.8 to 1.7.9</title>
+<sect2 id="ov-new1.7.9"><title>What's new and what changed in 1.7.9</title>
<itemizedlist mark="bullet">
@@ -429,7 +1035,7 @@ New API: strchrnul.
</sect2>
-<sect2 id="ov-new1.7.8"><title>What's new and what changed from 1.7.7 to 1.7.8</title>
+<sect2 id="ov-new1.7.8"><title>What's new and what changed in 1.7.8</title>
<itemizedlist mark="bullet">
@@ -497,7 +1103,7 @@ Support TIOCGPGRP, TIOCSPGRP ioctls.
</sect2>
-<sect2 id="ov-new1.7.7"><title>What's new and what changed from 1.7.6 to 1.7.7</title>
+<sect2 id="ov-new1.7.7"><title>What's new and what changed in 1.7.7</title>
<itemizedlist mark="bullet">
@@ -524,7 +1130,7 @@ See <xref linkend="textbin-devel"></xref> for details.
</sect2>
-<sect2 id="ov-new1.7.6"><title>What's new and what changed from 1.7.5 to 1.7.6</title>
+<sect2 id="ov-new1.7.6"><title>What's new and what changed in 1.7.6</title>
<itemizedlist mark="bullet">
@@ -581,7 +1187,7 @@ be out of the way. [...]
</sect2>
-<sect2 id="ov-new1.7.5"><title>What's new and what changed from 1.7.3 to 1.7.5</title>
+<sect2 id="ov-new1.7.5"><title>What's new and what changed in 1.7.5</title>
<itemizedlist mark="bullet">
@@ -594,7 +1200,7 @@ in Windows console.
</sect2>
-<sect2 id="ov-new1.7.3"><title>What's new and what changed from 1.7.2 to 1.7.3</title>
+<sect2 id="ov-new1.7.3"><title>What's new and what changed in 1.7.3</title>
<itemizedlist mark="bullet">
@@ -612,7 +1218,7 @@ Modification and access timestamps of devices reflect the current time.
</sect2>
-<sect2 id="ov-new1.7.2"><title>What's new and what changed from 1.7.1 to 1.7.2</title>
+<sect2 id="ov-new1.7.2"><title>What's new and what changed in 1.7.2</title>
<itemizedlist mark="bullet">
@@ -764,7 +1370,9 @@ Procedure Call (RPC) and NFS.
</sect2>
-<sect2 id="ov-new1.7-os"><title>OS related changes</title>
+<sect2 id="ov-new1.7.1"><title>What's new and what changed from 1.5 to 1.7</title>
+
+<sect3 id="ov-new1.7-os"><title>OS related changes</title>
<itemizedlist mark="bullet">
@@ -779,9 +1387,9 @@ Add support for Windows 7 and Windows Server 2008 R2.
</itemizedlist>
-</sect2>
+</sect3>
-<sect2 id="ov-new1.7-file"><title>File Access related changes</title>
+<sect3 id="ov-new1.7-file"><title>File Access related changes</title>
<itemizedlist mark="bullet">
@@ -967,9 +1575,9 @@ eaccess, euidaccess, canonicalize_file_name, fexecve, execvpe.
</itemizedlist>
-</sect2>
+</sect3>
-<sect2 id="ov-new1.7-net"><title>Network related changes</title>
+<sect3 id="ov-new1.7-net"><title>Network related changes</title>
<itemizedlist mark="bullet">
@@ -1035,9 +1643,9 @@ Add /proc/net/if_inet6.
</itemizedlist>
-</sect2>
+</sect3>
-<sect2 id="ov-new1.7-device"><title>Device related changes</title>
+<sect3 id="ov-new1.7-device"><title>Device related changes</title>
<itemizedlist mark="bullet">
@@ -1086,9 +1694,9 @@ get_phys_pages, posix_openpt.
</itemizedlist>
-</sect2>
+</sect3>
-<sect2 id="ov-new1.7-posix"><title>Other POSIX related changes</title>
+<sect3 id="ov-new1.7-posix"><title>Other POSIX related changes</title>
<itemizedlist mark="bullet">
@@ -1150,9 +1758,9 @@ vfwscanf, vswscanf.
</itemizedlist>
-</sect2>
+</sect3>
-<sect2 id="ov-new1.7-sec"><title>Security related changes</title>
+<sect3 id="ov-new1.7-sec"><title>Security related changes</title>
<itemizedlist mark="bullet">
@@ -1164,7 +1772,7 @@ Getting a domain user's groups is hopefully more bulletproof now.
Cygwin now comes with a real LSA authentication package. This must be
manually installed by a privileged user using the /bin/cyglsa-config
script. The advantages and disadvantages are noted in
-http://cygwin.com/ml/cygwin-developers/2006-11/msg00000.html
+https://cygwin.com/ml/cygwin-developers/2006-11/msg00000.html
</para></listitem>
<listitem><para>
@@ -1183,9 +1791,9 @@ options have a slightly changed behaviour.
</itemizedlist>
-</sect2>
+</sect3>
-<sect2 id="ov-new1.7-misc"><title>Miscellaneous</title>
+<sect3 id="ov-new1.7-misc"><title>Miscellaneous</title>
<itemizedlist mark="bullet">
@@ -1280,6 +1888,8 @@ having multiple concurrent Cygwin installations.
</itemizedlist>
+</sect3>
+
</sect2>
</sect1>
diff --git a/winsup/doc/ntsec.xml b/winsup/doc/ntsec.xml
index 72cf7bb89..ae0a1195a 100644
--- a/winsup/doc/ntsec.xml
+++ b/winsup/doc/ntsec.xml
@@ -2,12 +2,12 @@
<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook V4.5//EN"
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
-<sect1 id="ntsec"><title>Using Windows security in Cygwin</title>
+<sect1 id="ntsec"><title>POSIX accounts, permission, and security</title>
<para>This section discusses how the Windows security model is
-utilized in Cygwin to implement POSIX-like permissions, as well as how
-the Windows authentication model is used to allow cygwin applications
-to switch users in a POSIX-like fashion.</para>
+utilized in Cygwin to implement POSIX account information, POSIX-like
+permissions, and how the Windows authentication model is used to allow
+cygwin applications to switch users in a POSIX-like fashion.</para>
<para>The setting of POSIX-like file and directory permissions is
controlled by the <link linkend="mount-table">mount</link> option
@@ -23,7 +23,7 @@ discussed here, but assumed to be understood by the reader. If you
don't know the POSIX security model, search the web for beginner
documentation.</para>
-<sect2 id="ntsec-common"><title>Overview</title>
+<sect2 id="ntsec-common"><title>Brief overview of Windows security</title>
<para>In the Windows security model, almost any "object" is securable.
"Objects" are files, processes, threads, semaphores, etc.</para>
@@ -117,13 +117,22 @@ treat these SIDs as identifying two separate accounts. One is
"FOO\johndoe", the other one is "BAR\johndoe" or "johndoe@bar.local".
Different SID, different account. Full stop. </para>
-<para>The last part of the SID, the so called "Relative IDentifier" (RID),
-is by default used as UID and/or GID under Cygwin when you create the
-<filename>/etc/passwd</filename> and <filename>/etc/group</filename>
-files using the <command><link linkend="mkpasswd">mkpasswd</link></command> and <command><link linkend="mkgroup">mkgroup</link></command>
-tools. Domain account UIDs and GIDs are offset by 10000 by default
-which might be a bit low for very big organizations. Fortunately there's
-an option in both tools to change the offset...</para>
+<para>Starting with Cygwin 1.7.34, Cygwin uses an automatic, internal
+translation from Windows SID to POSIX UID/GID. This mechanism, which is
+the preferred method for the SID&lt;=&gt;UID/GID mapping, is described in
+detail in <xref linkend="ntsec-mapping"></xref>.</para>
+
+<para>Prior to Cygwin 1.7.34, the last part of the SID, the so called
+"Relative IDentifier" (RID), was by default used as UID and/or GID
+when you created the <filename>/etc/passwd</filename> and
+<filename>/etc/group</filename> files using the
+<command><link linkend="mkpasswd">mkpasswd</link></command> and
+<command><link linkend="mkgroup">mkgroup</link></command> tools.
+These tools as well as reading accounts from <filename>/etc/passwd</filename>
+and <filename>/etc/group</filename> files is still present in recent
+versions of Cygwin, but you should switch to the aforementioned
+automatic translation, unless you have very specific needs. Again,
+see <xref linkend="ntsec-mapping"></xref> for the details.</para>
<para>Do you still remember the SIDs with special meaning? In offical
notation they are called "well-known SIDs". For example, POSIX has no GID
@@ -207,214 +216,1921 @@ from the permission to change object data, and even changing object data
can be separated into different permission bits for different kind of
data. But there's a problem with the definition of a "correct" ACL
which disallows mapping of certain POSIX permissions cleanly. See
-<xref linkend="ntsec-mapping"></xref>.</para>
+<xref linkend="ntsec-files"></xref>.</para>
<para>POSIX is able to create only three different permissions? Not quite.
Newer operating systems and file systems on POSIX systems also provide
access control lists. Two different APIs exist for accessing these
-ACLs, the Solaris API and the POSIX API. Cygwin implements the Solaris
-API to access Windows ACLs in a Unixy way. At the time of writing this
-document, the Cygwin implementation of the Solaris API isn't quite up
-to speed. For instance, it doesn't handle access denied ACEs gracefully.
-So, use with care. Online man pages for the Solaris ACL API can be
-found on <ulink url="http://docs.sun.com">http://docs.sun.com</ulink>.</para>
+ACLs, the Solaris API and the POSIX API. Cygwin implements the original
+Solaris API to access Windows ACLs in a Unixy way. Online man pages for the
+Solaris ACL API can be found on
+<ulink url="http://docs.oracle.com">http://docs.oracle.com</ulink>.
+For an overview see <ulink url="http://docs.oracle.com/cd/E23824_01/html/821-1474/acl-5.html#scrolltoc">acl(5)</ulink>.</para>
</sect2>
-<sect2 id="ntsec-files"><title id="ntsec-files.title">File permissions</title>
-
-<para>On NTFS and if the <literal>noacl</literal> mount option is not
-specified for a mount point, Cygwin sets file permissions as in POSIX.
-Basically this is done by defining a SD with the matching owner and group
-SIDs, and a DACL which contains ACEs for the owner, the group and for
-"Everyone", which represents what POSIX calls "others".</para>
+<sect2 id="ntsec-mapping"><title id="ntsec-mapping.title">Mapping Windows accounts to POSIX accounts</title>
-<para>To use Windows security correctly, Cygwin depends on the files
+<para>
+For as long as Cygwin has existed, it has stored user and group information in
+<filename>/etc/passwd</filename> and <filename>/etc/group</filename> files.
+Under the assumption that these files would never be too large, the first
+process in a process tree, as well as every execing process within the tree
+would parse them into structures in memory. Thus every Cygwin process would
+contain an expanded copy of the full information from
<filename>/etc/passwd</filename> and <filename>/etc/group</filename>.
-These files define the translation between the Cygwin uid/gid and the
-Windows SID. The SID is stored in the pw_gecos field in
-<filename>/etc/passwd</filename>, and in the gr_passwd field in
-<filename>/etc/group</filename>. Since the pw_gecos field can contain
-more information than just a SID, there are some rules for the layout.
-It's required that the SID is the last entry of the pw_gecos field,
-assuming that the entries in pw_gecos are comma-separated. The
-commands <command>mkpasswd</command> and <command>mkgroup</command>
-usually do this for you.</para>
-
-<para>Another interesting entry in the pw_gecos field (which is also
-usually created by running <command>mkpasswd</command>) is the Windows user
-name entry. It takes the form "U-domain\username" and is sometimes used
-by services to authenticate a user. Logging in through
-<command>telnet</command> is a common scenario.</para>
-
-<para>A typical snippet from <filename>/etc/passwd</filename>:</para>
-
-<example id="ntsec-passwd">
-<title>/etc/passwd:</title>
-<screen>
-SYSTEM:*:18:544:,S-1-5-18::
-Administrators:*:544:544:,S-1-5-32-544::
-Administrator:unused:500:513:U-FOO\Administrator,S-1-5-21-790525478-115176313-839522115-500:/home/Administrator:/bin/bash
-corinna:unused:11001:11125:U-BAR\corinna,S-1-5-21-2913048732-1697188782-3448811101-1001:/home/corinna:/bin/tcsh
-</screen>
-</example>
-
-<para>The SYSTEM entry is usually needed by services. The Administrators
-entry (Huh? A group in /etc/passwd?) is only here to allow
-<command>ls</command> and similar commands to print some file ownerships
-correctly. Windows doesn't care if the owner of a file is a user or a
-group. In older versions of Windows NT the default ownership for files
-created by an administrator account was set to the group Administrators
-instead of to the creating user account. This has changed, but you can
-still switch to this setting on newer systems. So it's convenient to
-have the Administrators group in
-<filename>/etc/passwd</filename>.</para>
-
-<para>The really interesting entries are the next two. The Administrator
-entry is for the local administrator, the corinna entry matches the corinna
-account in the domain BAR. The information given in the pw_gecos field
-are all we need to exactly identify an account, and to have a two way
-translation, from Windows account name/SID to Cygwin account name uid and
-vice versa. Having this complete information allows us to choose a Cygwin
-user name and uid which doesn't have to match the Windows account at all. As
-long as the pw_gecos information is available, we're on the safe side:</para>
-
-<example id="ntsec-passwd-tweaked">
-<title>/etc/passwd, tweaked:</title>
-<screen>
-root:unused:0:513:U-FOO\Administrator,S-1-5-21-790525478-115176313-839522115-500:/home/Administrator:/bin/bash
-thursday_next:unused:11001:11125:U-BAR\corinna,S-1-5-21-2913048732-1697188782-3448811101-1001:/home/corinna:/bin/tcsh
-</screen>
-</example>
-
-<para> The above <filename>/etc/passwd</filename> will still work fine.
-You can now login via <command>ssh</command> as the user "root", and
-Cygwin dutifully translates "root" into the Windows user
-"FOO\Administrator" and files owned by FOO\Administrator are shown to
-have the uid 0 when calling <command>ls -ln</command>. All you do you're
-actually doing as Administrator. Files created as root will be owned by
-FOO\Administrator. And the domain user BAR\corinna can now happily
-pretend to be Thursday Next, but will wake up sooner or later finding
-out she's still actually the domain user BAR\corinna...</para>
-
-<para>Do I have to mention that you can also rename groups in
-<filename>/etc/group</filename>? As long as the SID is present and correct,
-all is well. This allows you to, for instance, rename the "Administrators"
-group to "root" as well:</para>
-
-<example id="ntsec-group-tweaked">
-<title>/etc/group, tweaked:</title>
-<screen>
-root:S-1-5-32-544:544:
-</screen>
-</example>
-
-<para>Last but not least, you can also change the primary group of a user
-in <filename>/etc/passwd</filename>. The only requirement is that the user
-is actually a member of the new primary group in Windows. For instance,
-normal users in a domain environment are members in the group "Domain Users",
-which in turn belongs to the well-known group "Users". So, if it's
-more convenient in your environment for the user's primary group to be
-"Users", just set the user's primary group in <filename>/etc/passwd</filename>
-to the Cygwin uid of "Users" (see in <filename>/etc/group</filename>,
-default 545) and let the user create files with a default group ownership
-of "Users".</para>
+</para>
+
+<para>
+This approach has a few downsides. One of them is that the idea that these
+files will always be small, is flawed. Another one is that reading the entire
+file is most of the time entirely useless, since most processes only
+need information on their own user and the primary group. Last but not
+least, the passwd and group files have to be maintained separately from
+the already existing Windows user databases, the local SAM and Active
+Directory.
+</para>
+
+<para>
+On the other hand, we have to have this mapping between Windows SIDs and
+POSIX uid/gid values, so we need a mechanism to convert SIDs to uid/gid
+values and vice versa.
+</para>
+
+<para>
+Microsoft "Services for UNIX" (SFU) (deprecated since Windows 8/Server 2012)
+never used passwd/group files. Rather, SFU used a fixed, computational mapping
+between SIDs and POSIX uid/gid which even has Active Directory support. It
+allows us to generate uid/gid values from SIDs and vice versa. The mechanism is
+documented, albeit in a confusing way and spread over multiple MSDN articles.
+</para>
+
+<para>
+Starting with Cygwin 1.7.34, Cygwin utilizes an approach inspired by the
+mapping method as implemented by SFU, with a few differences for backward
+compatibility and to handle some border cases differently.
+</para>
+
+<sect3 id="ntsec-mapping-how"><title id="ntsec-mapping-how.title">Mapping Windows SIDs to POSIX uid/gid values</title>
+
+<para>
+The following description assumes you're comfortable with the concept of
+Windows SIDs and RIDs. For a brief introduction, see
+<xref linkend="ntsec-common"></xref>.
+</para>
+
+<para>
+Cygwin's mapping between SIDs and uid/gid values works in two ways.
+</para>
+
+<itemizedlist spacing="compact">
+<listitem><para>Read <filename>/etc/passwd<filename> and
+</filename>/etc/group</filename> files if they exist, just as in the olden
+days, mainly for backward compatibility.</para></listitem>
+<listitem><para>If no files are present, or if an entry is missing in the files,
+ask Windows.</para></listitem>
+</itemizedlist>
+
+<para>
+At least, that's the default behaviour now. It will be configurable
+using a file <filename>/etc/nsswitch.conf</filename>, which is discussed in
+<xref linkend="ntsec-mapping-nsswitch"></xref>. Let's explore the default
+for now.
+</para>
+
+<para>
+If the passwd or group files are present, they will be scanned on demand as
+soon as a mapping from SIDs to uid/gid or account names is required. The new
+mechanism will never read the entire file into memory, but only scan for
+the requested entry and cache this one in memory.
+</para>
+
+<para>
+If no entry is found, or no passwd or group file was present, Cygwin
+will ask the OS.
+</para>
+
+<note>
+<para>
+If the first process in a Cygwin process tree determines that no
+<filename>/etc/passwd</filename> or <filename>/etc/group</filename> file is
+present, no other process in the entire process tree will try to read the files
+later on. This is done for self-preservation. It's rather bad if the uid
+or gid of a user changes during the lifetime of a process tree.
+</para>
+
+<para>
+For the same reason, if you delete the <filename>/etc/passwd</filename>
+or <filename>/etc/group</filename> file, this will be ignored. The passwd
+and group records read from the files will persist in memory until either a
+new <filename>/etc/passwd</filename> or <filename>/etc/group</filename>
+is created, or you exit all processes in the current process tree.
+</para>
+
+<para>
+See the note in <xref linkend="ntsec-mapping-nsswitch"></xref> for some
+comprehensive examples.
+</para>
+</note>
+
+<para>
+So if we've drawn a blank reading the files, we're going to ask the OS.
+First thing, we ask the local machine for the SID or the username. The
+OS functions
+<ulink url="http://msdn.microsoft.com/en-us/library/windows/desktop/aa379166%28v=vs.85%29.aspx">LookupAccountSid</ulink>
+and
+<ulink url="http://msdn.microsoft.com/en-us/library/windows/desktop/aa379159%28v=vs.85%29.aspx">LookupAccountName</ulink>
+are pretty intelligent. They have all the stuff built in to ask for any
+account of the local machine, the Active Directory domain of the machine,
+the Global Catalog of the forest of the domain, as well as any trusted
+domain of our forest for the information. One OS call and we're
+practically done...
+</para>
+
+<para>
+Except, the calls only return the mapping between SID, account name and the
+account's domain. We don't have a mapping to POSIX uid/gid and we're missing
+information on the user's home dir and login shell.
+</para>
+
+<para>
+Let's discuss the SID&lt;=&gt;uid/gid mapping first. Here's how it works.
+</para>
+
+<itemizedlist spacing="compact">
+
+<listitem>
+<para>
+<ulink url="http://msdn.microsoft.com/en-us/library/aa379649.aspx">Well-known
+SIDs</ulink>
+in the NT_AUTHORITY domain of the S-1-5-RID type, or aliases of the
+S-1-5-32-RID type are mapped to the uid/gid value RID. Examples:
+</para>
+
+<screen>
+ "SYSTEM" S-1-5-18 &lt;=&gt; uid/gid: 18
+ "Users" S-1-5-32-545 &lt;=&gt; uid/gid: 545
+</screen>
+</listitem>
+
+<listitem>
+<para>
+Other well-known SIDs in the NT_AUTHORITY domain (S-1-5-X-RID):
+</para>
+
+<screen>
+ S-1-5-X-RID &lt;=&gt; uid/gid: 0x1000 * X + RID
+</screen>
+
+<para>Example:</para>
+
+<screen>
+ "NTLM Authentication" S-1-5-64-10 &lt;=&gt; uid/gid: 0x4000A == 262154
+</screen>
+</listitem>
+
+<listitem><para>
+Other well-known SIDs:
+</para>
+
+<screen>
+ S-1-X-Y &lt;=&gt; uid/gid: 0x10000 + 0x100 * X + Y
+</screen>
+
+<para>Example:</para>
+
+<screen>
+ "LOCAL" S-1-2-0 &lt;=&gt; uid/gid: 0x10200 == 66048
+ "Creator Group" S-1-3-1 &lt;=&gt; uid/gid: 0x10301 == 66305
+</screen>
+</listitem>
+
+<listitem>
+<para>
+Logon SIDs: The LogonSid of the current user's session is converted to the
+fixed uid 0xfff == 4095 and named "CurrentSession". Any other LogonSid is
+converted to the fixed uid 0xffe == 4094 and named "OtherSession".
+</para>
+</listitem>
+
+<listitem>
+<para>
+Mandatory Labels:
+</para>
+
+<screen>
+ S-1-16-RID &lt;=&gt; uid/gid: 0x60000 + RID
+</screen>
+
+<para>Example:</para>
+
+<screen>
+ "Medium Mandatory Level" S-1-16-8192 &lt;=&gt; uid/gid: 0x62000 == 401408
+</screen>
+</listitem>
+
+<listitem>
+<para>
+Accounts from the local machine's user DB (SAM):
+</para>
+
+<screen>
+ S-1-5-21-X-Y-Z-RID &lt;=&gt; uid/gid: 0x30000 + RID
+</screen>
+
+<para>Example:</para>
+
+<screen>
+ "Administrator" S-1-5-21-X-Y-Z-500 &lt;=&gt; uid/gid: 0x301f4 == 197108
+</screen>
+</listitem>
+
+<listitem>
+<para>
+Accounts from the machine's primary domain:
+</para>
+
+<screen>
+ S-1-5-21-X-Y-Z-RID &lt;=&gt; uid/gid: 0x100000 + RID
+</screen>
+
+<para>Example:</para>
+
+<screen>
+ "Domain Users" S-1-5-21-X-Y-Z-513 &lt;=&gt; uid/gid: 0x100201 == 1049089
+</screen>
+</listitem>
+
+<listitem>
+<para>
+Accounts from a trusted domain of the machine's primary domain:
+</para>
+
+<screen>
+ S-1-5-21-X-Y-Z-RID &lt;=&gt; uid/gid: trustPosixOffset(domain) + RID
+</screen>
+
+<para>
+<literal>trustPosixOffset</literal>? This needs a bit of explanation. This
+value exists in Windows domains already since before Active Directory days.
+What happens is this. If you create a domain trust between two domains, a
+trustedDomain entry will be added to both databases. It describes how
+<emphasis>this</emphasis> domain trusts the <emphasis>other</emphasis> domain.
+One attribute of a trust is a 32 bit value called
+<literal>trustPosixOffset</literal> For each new trust,
+<literal>trustPosixOffset</literal> will get some automatic value. In recent
+AD domain implementations, the first trusted domain will get
+<literal>trustPosixOffset</literal> set to 0x80000000. Following domains will
+get lower values. Unfortunately the domain admins are allowed to set the
+<literal>trustPosixOffset</literal> value for each trusted domain to some
+arbitrary 32 bit value, no matter what the other
+<literal>trustPosixOffset</literal> are set to, thus allowing any kind of
+collisions between the <literal>trustPosixOffset</literal> values of domains.
+That's not exactly helpful, but as the user of this value, we have to
+<emphasis>trust</emphasis> the domain admins to set
+<literal>trustPosixOffset</literal> to sensible values, or to keep it at the
+system chosen defaults.
+</para>
+
+<para>
+So, for the first (or only) trusted domain of your domain, the automatic offset
+is 0x80000000. An example for a user of that trusted domain is
+</para>
+
+<screen>
+ S-1-5-21-X-Y-Z-1234 &lt;=&gt; uid/gid 0x800004d2 == 2147484882
+</screen>
+
+<para>
+There's one problem with this approach. Assuming you're running in the context
+of a local SAM user on a domain member machine. Local users don't have the
+right to fetch this kind of domain information from the DC, they'll get
+permission denied. In this case Cygwin will fake a sensible
+<literal>trustPosixOffset</literal> value.
+</para>
+
+<para>
+Another problem is if the AD administrators chose an unreasonably small
+<literal>trustPosixOffset</literal> value. Anything below the hexadecimal
+value 0x100000 (the POSIX offset of the primary domain) is bound to produce
+collisions with system accounts as well as local accounts. The right thing
+to do in this case is to notify your administrator of the problem and to ask
+for moving the offset to a more reasonable value. However, to reduce the
+probability for collisions, Cygwin overrides this offset with a sensible
+fixed replacement offset.
+</para>
+</listitem>
+
+<listitem>
+<para>
+Local accounts from another machine in the network:
+</para>
+
+<para>
+There's no SID&lt;=&gt;uid/gid mapping implemented for this case. The problem
+is, there's no way to generate a bijective mapping. There's no central place
+which keeps an analogue of the <literal>trustPosixOffset</literal>, and there's
+the additional problem that the
+<ulink url="http://msdn.microsoft.com/en-us/library/windows/desktop/aa379166%28v=vs.85%29.aspx">LookupAccountSid</ulink>
+and
+<ulink url="http://msdn.microsoft.com/en-us/library/windows/desktop/aa379159%28v=vs.85%29.aspx">LookupAccountName</ulink>
+functions cannnot resolve the SIDs, unless they know the name of the machine
+this SID comes from. And even then it will probably suffer a
+<literal>Permission denied</literal> error when trying to ask the machine
+for its local account.
+</para>
+</listitem>
+
+</itemizedlist>
+
+<para>
+Now we have a semi-bijective mapping between SIDs and POSIX uid/gid values,
+but given that we have potentially users and groups in different domains having
+the same name, how do we uniquely distinguish between them by name? Well, we
+can do that by making their names unique in a per-machine way. Dependent on
+the domain membership of the account, and dependent of the machine being a
+domain member or not, the user and group names will be generated using a domain
+prefix and a separator character between domain and account name.
+The <!-- default --> separator character is the plus sign, <literal>+</literal>.
+</para>
+
+<itemizedlist spacing="compact">
+
+<listitem>
+<para>
+Well-known and builtin accounts will be named as in Windows:
+</para>
+
+<screen>
+ "SYSTEM", "LOCAL", "Medium Mandatory Level", ...
+</screen>
+</listitem>
+
+<listitem>
+<para>
+If the machine is not a domain member machine, only local accounts can be resolved
+into names, so for ease of use, just the account names are used as Cygwin
+user/group names:
+</para>
+
+<screen>
+ "corinna", "bigfoot", "None", ...
+</screen>
+</listitem>
+
+<listitem>
+<para>
+If the machine is a domain member machine, all accounts from the primary domain
+of the machine are mapped to Cygwin names without domain prefix:
+</para>
+
+<screen>
+ "corinna", "bigfoot", "Domain Users", ...
+</screen>
+
+<para>
+while accounts from other domains are prepended by their domain:
+</para>
+
+<screen>
+ "DOMAIN1+corinna", "DOMAIN2+bigfoot", "DOMAIN3+Domain Users", ...
+</screen>
+</listitem>
+
+<listitem>
+<para>
+Local machine accounts of a domain member machine get a Cygwin user name the
+same way as accounts from another domain: The local machine name gets
+prepended:
+</para>
+
+<screen>
+ "MYMACHINE+corinna", "MYMACHINE+bigfoot", "MYMACHINE+None", ...
+</screen>
+</listitem>
+
+<listitem>
+<para>
+If LookupAccountSid fails, Cygwin checks the accounts against the known trusted
+domains. If the account is from one of the trusted domains, an artificial
+account name is created. It consists of the domain name, and a special name
+created from the account RID:
+</para>
+
+<screen>
+ "MY_DOM+User(1234)", "MY_DOM+Group(5678)"
+</screen>
+
+<para>
+Otherwise we know nothing about this SID, so it will be mapped to the
+fake accounts <literal>Unknown+User</literal>/<literal>Unknown+Group</literal>
+with uid/gid -1.
+</para>
+</listitem>
+
+</itemizedlist>
+
+</sect3>
+
+<sect3 id="ntsec-mapping-caching"><title id="ntsec-mapping-caching.title">Caching account information</title>
+
+<para>
+The information fetched from the Windows account database or the
+<filename>/etc/passwd</filename> and <filename>/etc/group</filename> files is
+cached by the process. The cached information is inherited by Cygwin child
+processes. A Cygwin process invoked from a Windows command, such as CMD.exe,
+will start a new Cygwin process tree and the caching starts from scratch
+(unless <command><link linkend="using-cygserver">cygserver</link></command> is
+running, but read on).
+</para>
+
+<para>
+While usually working fine, this has some drawbacks. Consider a shell calling
+<command>id</command>. <command>id</command> fetches all group information
+from the current token and caches them. Unfortunately <command>id</command>
+doesn't start any child processes, so the information is lost as soon as
+<command>id</command> exits.
+</para>
+
+<para>
+But there's another caching mechanism available. If
+<command><link linkend="using-cygserver">cygserver</link></command> is running
+it will provide passwd and group entry caching for all processes in every Cygwin
+process tree started after
+<command><link linkend="using-cygserver">cygserver</link></command>. So, if
+you start a Cygwin Terminal and
+<command><link linkend="using-cygserver">cygserver</link></command> is running
+at the time, <command>mintty</command>, the shell, and all child processes will
+use <command><link linkend="using-cygserver">cygserver</link></command> caching.
+If you start a Cygwin Terminal and
+<command><link linkend="using-cygserver">cygserver</link></command> is not
+running at the time, none of the processes started inside this terminal window
+will use <command><link linkend="using-cygserver">cygserver</link></command>
+caching.
+</para>
+
+<para>
+The advantage of
+<command><link linkend="using-cygserver">cygserver</link></command> caching is
+that it's system-wide and, as long as
+<command><link linkend="using-cygserver">cygserver</link></command> is running,
+unforgetful. Every Cygwin process on the system will have the
+<command><link linkend="using-cygserver">cygserver</link></command> cache at
+its service. Additionally, all information requested from
+<command><link linkend="using-cygserver">cygserver</link></command> once, will
+be cached inside the process itself and, again, propagated to child processes.
+</para>
+
+<para>
+If you automatically start Cygwin processes as Windows services at system
+startup, you may wish to consider starting
+<command><link linkend="using-cygserver">cygserver</link></command> first in
+order to take advantage of this system-wide caching. To assure that
+<command><link linkend="using-cygserver">cygserver</link></command> has started
+prior to starting <command>sshd</command> or other Cygwin processes, you may
+wish to create service startup dependencies.
+<command><link linkend="using-cygserver">Cygserver</link></command> should
+probably wait for Windows TCPIP and AFD services before it starts, and then
+other Cygwin process should start after
+<command><link linkend="using-cygserver">cygserver</link></command>. Example
+Windows commands to accomplish this (after the services already exist) are
+shown below. You will need an administrative prompt to run the
+<command>sc config</command> commands.
+</para>
+
+<screen>
+ # Delay Cygserver until TCPIP and AFD have started
+ # Note the (odd) required space character after "depend="
+
+ sc config cygserver depend= tcpip/afd
+
+ # Delay sshd until after Cygserver has started
+ # Again note the (odd) required space character after "depend="
+
+ sc config sshd depend= cygserver
+
+ # View the Cygserver service details
+
+ sc qc cygserver
+</screen>
+
+<para>
+Note that this <command>sc config</command> command
+<emphasis>replaces</emphasis> any existing dependencies. The above changes
+will not impact the running instance, only future instances.
+</para>
+
+<screen>
+ # To remove all dependencies from the cygserver service
+
+ sc config cygserver depend= /
+</screen>
+
+</sect3>
+
+<sect3 id="ntsec-mapping-passwdinfo"><title id="ntsec-mapping-passwdinfo.title">Cygwin user names, home dirs, login shells</title>
+
+<para>
+Obviously, if you don't maintain <filename>passwd</filename> and
+<filename>group</filename> files, you need to have a way to maintain the other
+fields of a passwd entry as well. A couple of things come to mind:
+</para>
+
+<itemizedlist spacing="compact">
+
+<listitem>
+<para>
+You want to use a Cygwin username different from your Windows username.
+</para>
<note><para>
-If you wish to make these kind of changes to /etc/passwd and /etc/group,
-do so only if you feel comfortable with the concepts. Otherwise, do not
-be surprised if things break in either subtle or surprising ways! If you
-do screw things up, revert to copies of <filename>/etc/passwd</filename>
-and <filename>/etc/group</filename> files created by
-<command>mkpasswd</command> and <command>mkgroup</command>. (Make
-backup copies of these files before modifying them.) Especially, don't
-change the UID or the name of the user SYSTEM. It may mostly work, but
-some Cygwin applications running as a local service under that account
-could suddenly start behaving strangely.
+This is only supported via <filename>/etc/passwd</filename>. A Cygwin
+username maintained in the Windows user databases would require very costly
+(read: slow) search operations.
</para></note>
+</listitem>
-</sect2>
+<listitem>
+<para>
+You want to change the primary group of a user. For AD accounts this is
+not supported. The primary group of a user is always the Windows
+primary group set in Active Directory and can't be changed. For SAM
+accounts, you can add the primary group to the SAM
+<literal>description</literal> field of the user. See <xref
+linkend="ntsec-mapping-nsswitch-desc"></xref> for more info.
+</para>
+</listitem>
+
+<listitem>
+<para>
+You want a home dir different from the default
+<filename>/home/$USERNAME</filename>.
+</para>
+</listitem>
+
+<listitem>
+<para>
+You want to specify a different login shell than <filename>/bin/bash</filename>.
+</para>
+</listitem>
+
+<listitem>
+<para>
+You want to add specific content to the pw_gecos field.
+</para>
+</listitem>
+
+</itemizedlist>
+
+<para>
+For simple needs you can create <filename>/etc/passwd</filename> and/or
+<filename>/etc/group</filename> files with entries for your account
+and tweak that.
+</para>
+
+<para>
+For bigger installations, maintaining per-client files is rather troublesome.
+Also, no two environments are the same, so the needs are pretty different.
+Therefore Cygwin supports configuring how to fetch home directory,
+login shell, and gecos information in /etc/nsswitch.conf. See the next
+section for detailed information how to configure Cygwin's account handling.
+</para>
+
+</sect3>
+
+<sect3 id="ntsec-mapping-nsswitch"><title id="ntsec-mapping-nsswitch.title">The <filename>/etc/nsswitch.conf</filename> file</title>
+
+<para>
+On Linux and some other UNIXy OSes, we have a file called
+<ulink url="http://linux.die.net/man/5/nsswitch.conf">/etc/nsswitch.conf</ulink>.
+Among other things, it determines how passwd and group entries are generated.
+That's what Cygwin now provides as well.
+</para>
+
+<para>
+The <filename>/etc/nsswitch.conf</filename> file is optional. If you don't
+have one, Cygwin uses sensible defaults.
+</para>
+
+<note>
+<para>
+The <filename>/etc/nsswitch.conf</filename> file is read exactly once by
+the first process of a Cygwin process tree. If there was no
+<filename>/etc/nsswitch.conf</filename> file when this first process started,
+then no other process in the running Cygwin process tree will try to read the
+file.
+</para>
+
+<para>
+If you create or change <filename>/etc/nsswitch.conf</filename>, you have to
+restart all Cygwin processes that need to see the change. If the process
+you want to see the change is a child of another process, you need to restart
+all of that process's parents, too.
+</para>
+
+<para>
+For example, if you run <command>vim</command> inside the default Cygwin
+Terminal, <command>vim</command> is a child of your shell, which is a child
+of <command>mintty</command>. If you edit
+<filename>/etc/nsswitch.conf</filename> in that <command>vim</command>
+instance, your shell won't immediately see the change, nor will
+<command>vim</command> if you restart it from that same shell instance.
+This is because both are getting their nsswitch information from their
+ancestor, <command>mintty</command>. You have to start a fresh terminal
+window for the change to take effect.
+</para>
+
+<para>
+By contrast, if you leave that Cygwin Terminal window open after making the
+change to <filename>/etc/nsswitch.conf</filename>, then restart a Cygwin
+service like <command>cron</command>, <command>cron</command> will see the
+change, because it is not a child of <command>mintty</command> or any other
+Cygwin process. (Technically, it is a child of <command>cygrunsrv</command>,
+but that instance also restarts when you restart the service.)
+</para>
+
+<para>
+The reason we point all this out is that the requirements for restarting
+things are not quite as stringent as when you replace
+<filename>cygwin1.dll</filename>. If you have three process trees, you have
+three independent copies of the nsswitch information. If you start a fresh
+process tree, it will see the changes. As long as any process in an existing
+process tree remains running, all processes in that tree will continue to use
+the old information.
+</para>
+</note>
+
+<para>
+So, what settings can we perform with <filename>/etc/nsswitch.conf</filename>?
+Let's start with an example <filename>/etc/nsswitch.conf</filename> file
+set up to all default values:
+</para>
+
+<screen>
+ # /etc/nsswitch.conf
+ passwd: files db
+ group: files db
+<!--
+ db_prefix: auto
+ db_separator: + -->
+ db_enum: cache builtin
+ db_home: /home/%U
+ db_shell: /bin/bash
+ db_gecos: &lt;empty&gt;
+</screen>
+
+<sect4 id="ntsec-mapping-nsswitch-syntax"><title id="ntsec-mapping-nsswitch-syntax.title">The <filename>/etc/nsswitch.conf</filename> syntax</title>
+
+<para>
+The first line, starting with a hash <literal>#</literal> is a comment.
+The hash character starts a comment, just as in shell scripts. Everything
+up to the end of the line is ignored. So this:
+</para>
+
+<screen>
+ foo: bar # baz
+</screen>
+
+<para>
+means, set "foo" to value "bar", ignore everything after the hash.
+</para>
+
+<para>
+The other lines define the available settings. The first word up to a
+colon is a keyword. Note that the colon <emphasis>must</emphasis> follow
+immediately after the keyword. This is a valid line:
+</para>
+
+<screen>
+ foo: bar
+</screen>
+
+<para>
+This is not valid:
+</para>
+
+<screen>
+ foo : bar
+</screen>
+
+<para>
+Apart from this restriction, the reminder of the line can have as
+many spaces and TABs as you like.
+</para>
+
+</sect4>
+
+<sect4 id="ntsec-mapping-nsswitch-pwdgrp"><title id="ntsec-mapping-nsswitch-pwdgrp.title">The <literal>passwd:</literal> and <literal>group:</literal> settings</title>
+
+<para>
+The two lines starting with the keywords <literal>passwd:</literal> and
+<literal>group:</literal> define where Cygwin gets its passwd and group
+information from. <literal>files</literal> means, fetch the information
+from the corresponding file in the /etc directory. <literal>db</literal>
+means, fetch the information from the Windows account databases, the SAM
+for local accounts, Active Directory for domain account. Examples:
+</para>
+
+<screen>
+ passwd: files
+</screen>
+
+<para>
+Read passwd entries only from /etc/passwd.
+</para>
+
+<screen>
+ group: db
+</screen>
+
+<para>
+Read group entries only from SAM/AD.
+</para>
+
+<screen>
+ group: files # db
+</screen>
+
+<para>
+Read group entries only from <filename>/etc/group</filename>
+(<literal>db</literal> is only a comment).
+</para>
+
+<screen>
+ passwd: files db
+</screen>
+
+<para>
+Read passwd entries from <filename>/etc/passwd</filename>. If a user account
+isn't found, try to find it in SAM or AD. This is the default for both,
+passwd and group information.
+</para>
+
+<screen>
+ group: db files
+</screen>
+
+<para>
+This is a valid entry, but the order will be ignored by Cygwin. If both
+settings, <literal>files</literal> and <literal>db</literal> are specified,
+Cygwin will always try the files first, then the db.
+</para>
+
+<para>
+<literal>passwd:</literal> and <literal>group:</literal> are the two basic
+settings defining where to get the account information from. The following
+settings starting with <literal>db_</literal> define certain aspects of the
+Windows account database search and how to generate <literal>passwd</literal>
+and <literal>group</literal> information from the database.
+</para>
+
+</sect4>
+
+<!--
+
+ DESCRIPTION OF db_prefix AND db_separator
+
+ Keep in for reference
+
+
+<itemizedlist spacing="compact">
+
+<listitem>
+<para>
+<literal>db_prefix:</literal> determines how the Cygwin user or group name
+is created. The recognized values are:
+</para>
+
+<variablelist>
+ <varlistentry>
+ <term><literal>auto</literal></term>
+ <listitem>
+ <para>
+ This is the default. If your account is from the primary domain of your
+ machine, or if your machine is a standalone machine (not a domain member),
+ your Cygwin account name is just the Windows account name.
+ </para>
+
+ <para>
+ If your account is from another domain, or if you're logged in as
+ local user on a domain machine, the Cygwin username will be the
+ combination of Windows domainname and username, with the separator
+ char in between:
+ </para>
+
+ <segmentedlist><?dbhtml list-presentation="table"?>
+ <seglistitem>
+ <seg><literal>MY_DOM+username</literal></seg>
+ <seg>(foreign domain)</seg>
+ </seglistitem>
+ <seglistitem>
+ <seg><literal>MACHINE+username</literal></seg>
+ <seg>(local account)</seg>
+ </seglistitem>
+ </segmentedlist>
+
+ <para>
+ Builtin accounts are simply used as is:
+ </para>
+
+ <segmentedlist><?dbhtml list-presentation="table"?>
+ <seglistitem>
+ <seg><literal>LOCAL</literal></seg>
+ </seglistitem>
+ <seglistitem>
+ <seg><literal>Users</literal></seg>
+ </seglistitem>
+ </segmentedlist>
+
+ <para>
+ Unknown accounts on NFS or Samba shares (that is, accounts which cannot be
+ mapped to Windows user accounts via
+ <ulink url="https://tools.ietf.org/html/rfc2307">RFC 2307</ulink>) get a
+ Cygwin account name consisting of the artificial domains
+ <literal>Unix_User</literal> or <literal>Unix_Group</literal> and the
+ uid/gid value, for instance:
+ </para>
+
+ <segmentedlist><?dbhtml list-presentation="table"?>
+ <seglistitem>
+ <seg><literal>Unix_User+0</literal></seg>
+ <seg>(root)</seg>
+ </seglistitem>
+ <seglistitem>
+ <seg><literal>Unix_Group+10</literal></seg>
+ <seg>(wheel)</seg>
+ </seglistitem>
+ </segmentedlist>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term><literal>primary</literal></term>
+ <listitem>
+ <para>
+ Like <literal>auto</literal>, but primary domain accounts will be
+ prepended by the domainname as well.
+ </para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term><literal>always</literal></term>
+ <listitem>
+ <para>
+ All accounts, even the builtin accounts, will have the domain name
+ prepended:
+ </para>
+
+ <segmentedlist><?dbhtml list-presentation="table"?>
+ <seglistitem>
+ <seg><literal>BUILTIN+Users</literal></seg>
+ </seglistitem>
+ </segmentedlist>
+
+ <para>
+ A special case are builtin accounts which have an emtpy domain name.
+ These will be prependend by just the separator character in
+ <literal>always</literal> mode:
+ </para>
+
+ <segmentedlist><?dbhtml list-presentation="table"?>
+ <seglistitem>
+ <seg><literal>+LOCAL</literal></seg>
+ </seglistitem>
+ </segmentedlist>
+ </listitem>
+ </varlistentry>
+</variablelist>
+
+</listitem>
+
+<listitem>
+<para>
+<literal>db_separator:</literal> defines the spearator char used to prepend the
+domain name to the user or group name. The default is the plus character
+<literal>+</literal>.
+</para>
+
+<screen>
+ MY_DOM+username
+</screen>
+
+<para>
+With <literal>db_separator:</literal>, you can define any ASCII char except
+space, tab, carriage return, line feed, and the colon, as separator char.
+Example:
+</para>
+
+<screen>
+ db_separator: \
+</screen>
+
+<para>
+This results in usernames with the backslash as separator:
+</para>
+
+<screen>
+ MY_DOM\username
+</screen>
+
+</listitem>
+
+</itemizedlist>
+-->
+
+<sect4 id="ntsec-mapping-nsswitch-enum"><title id="ntsec-mapping-nsswitch-enum.title">The <literal>db_enum:</literal> setting</title>
+
+<para>
+<literal>db_enum:</literal> defines the depth of a database search, if an
+application calls one of the enumeration functions
+<ulink url="http://linux.die.net/man/3/getpwent">getpwent</ulink>
+or <ulink url="http://linux.die.net/man/3/getgrent">getgrent</ulink>.
+The problem with these functions is, they neither allow to define how many
+entries will be enumerated when calling them in a loop, nor do they
+allow to add some filter criteria. They were designed back in the days,
+when only <filename>/etc/passwd</filename> and <filename>/etc/group</filename>
+files existed and the number of user accounts on a typical UNIX system was
+seldomly a three-digit number.
+</para>
+
+<para>
+These days, with user and group databases sometimes going in the
+six-digit range, they are a potential burden. For that reason, Cygwin
+does not enumerate all user or group accounts by default, but rather
+just a very small list, consisting only of the accounts cached in memory
+by the current process, as well as a handful of predefined builtin
+accounts.
+</para>
+
+<para>
+<literal>db_enum:</literal> allows to specify the accounts to enumerate in a
+fine-grained manner. It takes a list of sources as argument:
+</para>
+
+<screen>
+ db_enum: source1 source2 ...
+</screen>
+
+<para>
+The recognized sources are the following:
+</para>
+
+<variablelist>
+ <varlistentry>
+ <term><literal>none</literal></term>
+ <listitem>No output from
+ <function>getpwent</function>/<function>getgrent</function>
+ at all.</listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><literal>all</literal></term>
+ <listitem>The opposite. Enumerates accounts from all known sources,
+ including all trusted domains.</listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><literal>cache</literal></term>
+ <listitem>Enumerate all accounts currently cached in memory.</listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><literal>builtin</literal></term>
+ <listitem>Enumerate the predefined builtin accounts for backward
+ compatibility. These are five passwd accounts (SYSTEM,
+ LocalService, NetworkService, Administrators, TrustedInstaller)
+ and two group accounts (SYSTEM and TrustedInstaller).</listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><literal>files</literal></term>
+ <listitem>Enumerate the accounts from <filename>/etc/passwd</filename> or
+ <filename>/etc/group</filename>.</listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><literal>local</literal></term>
+ <listitem>Enumerate all accounts from the local SAM.</listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><literal>primary</literal></term>
+ <listitem>Enumerate all accounts from the primary domain.</listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><literal>alltrusted</literal></term>
+ <listitem>Enumerate all accounts from all trusted domains.</listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><literal>some.domain</literal></term>
+ <listitem>Enumerate all accounts from the trusted domain some.domain. The
+ trusted domain can be given as Netbios flat name (MY_DOMAIN) or
+ as dns domain name (my_domain.corp). In contrast to the
+ aforementioned fixed source keywords, distinct domain names are
+ caseinsensitive. Only domains which are actually trusted domains
+ are enumerated. Unknown domains are simply ignored.</listitem>
+ </varlistentry>
+</variablelist>
+
+<para>
+Please note that <function>getpwent</function>/<function>getgrent</function>
+do <emphasis>not</emphasis> test if an account was already listed from another
+source, so an account can easily show up twice or three times. Such a test
+would be rather tricky, nor does the Linux implementation perform such test.
+Here are a few examples for <filename>/etc/nsswitch.conf</filename>:
+</para>
+
+<screen>
+ db_enum: none
+</screen>
+
+<para>
+No output from <function>getpwent</function>/<function>getgrent</function>
+at all. The first call to the function immediately returns a NULL pointer.
+</para>
+
+<screen>
+ db_enum: cache files
+</screen>
+
+<para>
+Enumerate all accounts cached by the current process, plus all entries
+from either the /etc/passwd or /etc/group file.
+</para>
+
+<screen>
+ db_enum: cache local primary
+</screen>
+
+<para>
+Enumerate all accounts cached by the current process, all accounts from the SAM
+of the local machine, and all accounts from the primary domain of the machine.
+</para>
+
+<screen>
+ db_enum: local primary alltrusted
+</screen>
+
+<para>
+Enumerate the accounts from the machine's SAM, from the primary domain of the
+machine, and from all trusted domains.
+</para>
+
+<screen>
+ db_enum: primary domain1.corp sub.domain.corp domain2.net
+</screen>
+
+<para>
+Enumerate the accounts from the primary domain and from the domains
+domain1.corp, sub.domain.corp and domain2.net.
+</para>
+
+<screen>
+ db_enum: all
+</screen>
+
+<para>
+Enumerate everything and the kitchen sink.
+</para>
+
+</sect4>
+
+<sect4 id="ntsec-mapping-nsswitch-passwd"><title id="ntsec-mapping-nsswitch-passwd.title">Settings defining how to create the <literal>passwd</literal> entry</title>
+
+<para>
+<filename>/etc/nsswitch.conf</filename> supports three settings to configure
+where to get the pw_dir, pw_shell, and pw_gecos content of a
+<literal>passwd</literal> entry from:
+</para>
+
+<screen>
+ db_home: schema... # Define how to fetch the pw_dir entry.
+ db_shell: schema... # Define how to fetch the pw_shell entry.
+ db_gecos: schema... # Define how to fetch the pw_gecos entry.
+</screen>
+
+"schema..." is a list of up to four space-separated schemata:
+
+<screen>
+ db_FOO: schema1 schema2 ...
+</screen>
+
+<para>
+When generating a passwd entry, Cygwin tries the schemata in order. If
+the first schema returns an empty string, it skips to the second, and so
+on. Schemata only supported on AD are silently skipped for SAM accounts
+and on non-AD machines.
+</para>
+
+<para>
+Four schemata are predefined, two schemata are variable. The predefined
+schemata are the following:
+</para>
+
+<variablelist>
+ <varlistentry>
+ <term><literal>windows</literal></term>
+ <listitem>Utilizes typical Windows settings. Supported for AD and SAM
+ accounts.</listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><literal>cygwin</literal></term>
+ <listitem>Utilizes the cygwinUser AD schema extension. This schema
+ extension is available via a schema extension file
+ <filename>/usr/share/cygwin/cygwin.ldif</filename>.
+ See <xref linkend="ntsec-mapping-nsswitch-cygwin"></xref> for
+ more information.</listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><literal>unix</literal></term>
+ <listitem>Utilizes the posixAccount schema attributes per
+ <ulink url="https://tools.ietf.org/html/rfc2307">RFC 2307</ulink>.
+ The posixAccount schema is available by default since Windows
+ Server 2003 R2, but typically only utilized when installing the
+ Active Directory "Server for NIS" feature (which is deprecated
+ since Server 2012 R2).
+ See also <xref linkend="ntsec-mapping-nsswitch-posix"></xref>.
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><literal>desc</literal></term>
+ <listitem>Utilizes XML-style attributes in the description attribute.
+ Supported for AD and SAM accounts.
+ See <xref linkend="ntsec-mapping-nsswitch-desc"></xref>
+ for a more detailed description.</listitem>
+ </varlistentry>
+</variablelist>
+
+<para>
+The variable schemata are as follows. Note that the leading characters
+(<literal>@</literal> and <literal>/</literal>) are an integral part of the
+definition.
+</para>
+
+<variablelist>
+ <varlistentry>
+ <term><literal>@ad_attribute</literal></term>
+ <listitem><literal>ad_attribute</literal> is any arbitrary AD attribute
+ name which should (ideally) be available in the User class or
+ in any attached auxiliary class. It's always treated as a
+ single string argument. Only the first string of a multi-string
+ attributes will be read.</listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><literal>/path</literal></term>
+ <listitem>An arbitrary string, typically a path. The leading slash is
+ required. Given that a single, fixed path for all users
+ only makes marginal sense, the /path schema supports wildcards.
+ A wildcard is a per-cent (<literal>%</literal>) character,
+ followed by another character giving the meaning. The supported
+ wildcard characters are:
+
+ <variablelist>
+ <varlistentry>
+ <term><literal>%u</literal></term>
+ <listitem>The Cygwin username (that's lowercase
+ <literal>u</literal>).</listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><literal>%U</literal></term>
+ <listitem>The Windows username (that's uppercase
+ <literal>U</literal>).</listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><literal>%D</literal></term>
+ <listitem>Windows domain in NetBIOS style.</listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><literal>%H</literal></term>
+ <listitem>Windows home directory in POSIX style. Note that,
+ for the <literal>db_home:</literal> setting, this
+ only makes sense right after the preceeding slash,
+ as in
+<screen>
+db_home: /%H/cygwin
+</screen>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><literal>%_</literal></term>
+ <listitem>Since space and TAB characters are used to separate
+ the schemata, a space in the filename has to be
+ given as <literal>%_</literal> (that's an
+ underscore).</listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><literal>%%</literal></term>
+ <listitem>A per-cent character.</listitem>
+ </varlistentry>
+ </variablelist>
+ <para>Any other <literal>%X</literal> expression is treated as if
+ the character <literal>X</literal> has been given alone.</para>
+ </listitem>
+ </varlistentry>
+</variablelist>
+
+<para>
+The exact meaning of a schema depends on the setting it's used for. The
+following sections explain the settings in detail.
+</para>
+
+</sect4>
+
+<sect4 id="ntsec-mapping-nsswitch-home">
+ <sectioninfo>
+ <title role="texinfo-node">The <literal>db_home</literal> setting</title>
+ </sectioninfo>
+ <title id="ntsec-mapping-nsswitch-home.title">The <literal>db_home:</literal> setting</title>
+
+<para>
+The <literal>db_home:</literal> setting defines how Cygwin fetches the user's
+home directory, or, more precise, the content of the <literal>pw_dir</literal>
+member of the user's passwd entry. The following list describes the meaning
+of each schema when used with <literal>db_home:</literal>
+</para>
+
+<variablelist>
+ <varlistentry>
+ <term><literal>windows</literal></term>
+ <listitem>The user's home directory is set to the same directory which is
+ used as Windows home directory. This is the
+<!--
+ <literal>homeDrive</literal> AD attribute if set, or the
+ <literal>homeDirectory</literal> AD attribute if
+ <literal>homeDrive</literal> is not set.
+-->
+ <literal>homeDirectory</literal> AD attribute.
+ For SAM accounts, this is equivalent to the "Home folder" setting
+ in SAM. If both attributes are unset, Cygwin falls back to the
+ user's local profile directory, typically something along the
+ lines of <filename>C:\Users\$USERNAME</filename>. Of course, the
+ Windows directory is converted to POSIX-style by Cygwin.
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><literal>cygwin</literal></term>
+ <listitem>AD only: The user's home directory is set to the POSIX path given
+ in the <literal>cygwinHome</literal> attribute from the
+ <literal>cygwinUser</literal> auxiliary class.
+ See also <xref linkend="ntsec-mapping-nsswitch-cygwin"></xref>.
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><literal>unix</literal></term>
+ <listitem>AD only: The user's home directory is set to the POSIX path given
+ in the <literal>unixHomeDirectory</literal> attribute from the
+ <literal>posixAccount</literal> auxiliary class.
+ See also <xref linkend="ntsec-mapping-nsswitch-posix"></xref>.
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><literal>desc</literal></term>
+ <listitem>The user's home directory is set to the POSIX path given in the
+ home="..." XML-alike setting in the user's
+ <literal>description</literal> attribute in SAM or AD.
+ See <xref linkend="ntsec-mapping-nsswitch-desc"></xref>
+ for a detailed description.</listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><literal>@ad_attribute</literal></term>
+ <listitem>AD only: The user's home directory is set to the path given
+ in the <literal>ad_attribute</literal> attribute. The path
+ can be given as Windows or POSIX path.</listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><literal>/path</literal></term>
+ <listitem>The user's home directory is set to the given POSIX path.
+ Remember the wildcards described in
+ <xref linkend="ntsec-mapping-nsswitch-passwd"></xref>.</listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>Fallback</term>
+ <listitem>If none of the schemes given for <literal>db_home:</literal>
+ define a non-empty directory, the user's home directory is set to
+ <filename>/home/$USERNAME</filename>.</listitem>
+ </varlistentry>
+</variablelist>
+
+<para>
+As has been briefly mentioned before, the default setting for
+<literal>db_home:</literal> is
+</para>
+
+<screen>
+ db_home: /home/%U
+</screen>
+
+<para>
+So by default, Cygwin just sets the home dir to
+<filename>/home/$USERNAME</filename>.
+</para>
+
+</sect4>
+
+<sect4 id="ntsec-mapping-nsswitch-shell">
+ <sectioninfo>
+ <title role="texinfo-node">The <literal>db_shell</literal> setting</title>
+ </sectioninfo>
+ <title id="ntsec-mapping-nsswitch-shell.title">The <literal>db_shell:</literal> setting</title>
+
+<para>
+The <literal>db_shell:</literal> setting defines how Cygwin fetches the user's
+login shell, the content of the <literal>pw_shell</literal> member of the
+user's passwd entry. The following list describes the meaning of each schema
+when used with <literal>db_shell:</literal>
+</para>
+
+<variablelist>
+ <varlistentry>
+ <term><literal>windows</literal></term>
+ <listitem>The <literal>windows</literal> schema is ignored for now.
+ The logical choice would be CMD, but that introduces some
+ problems, for instance the fact that CMD has no concept of
+ running as <literal>login shell</literal>. This may change
+ in future.</listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><literal>cygwin</literal></term>
+ <listitem>AD only: The user's home directory is set to the POSIX path given
+ in the <literal>cygwinShell</literal> attribute from the
+ <literal>cygwinUser</literal> auxiliary class.
+ See also <xref linkend="ntsec-mapping-nsswitch-cygwin"></xref>.
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><literal>unix</literal></term>
+ <listitem>AD only: The user's login shell is set to the POSIX path given
+ in the <literal>loginShell</literal> attribute from the
+ <literal>posixAccount</literal> auxiliary class.
+ See also <xref linkend="ntsec-mapping-nsswitch-posix"></xref>.
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><literal>desc</literal></term>
+ <listitem>The user's login shell is set to the POSIX path given in the
+ shell="..." XML-alike setting in the user's
+ <literal>description</literal> attribute in SAM or AD.
+ See <xref linkend="ntsec-mapping-nsswitch-desc"></xref>
+ for a detailed description.</listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><literal>@ad_attribute</literal></term>
+ <listitem>AD only: The user's login shell is set to the path given
+ in the <literal>ad_attribute</literal> attribute. The path
+ can be given as Windows or POSIX path.</listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><literal>/path</literal></term>
+ <listitem>The user's login shell is set to the given POSIX path.
+ Albeit not being as important here, the wildcards described in
+ <xref linkend="ntsec-mapping-nsswitch-passwd"></xref>
+ are also available for specifying a login shell path.</listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>Fallback</term>
+ <listitem>If none of the schemes given for <literal>db_shell:</literal>
+ define a non-empty pathname, the user's login shell is set to
+ <filename>/bin/bash</filename>.</listitem>
+ </varlistentry>
+</variablelist>
+
+<para>
+As for <literal>db_home:</literal>, the default setting for
+<literal>db_shell:</literal> is pretty much a constant
+</para>
+
+<screen>
+ db_shell: /bin/bash
+</screen>
+
+
+</sect4>
+
+<sect4 id="ntsec-mapping-nsswitch-gecos">
+ <sectioninfo>
+ <title role="texinfo-node">The <literal>db_gecos</literal> setting</title>
+ </sectioninfo>
+ <title id="ntsec-mapping-nsswitch-gecos.title">The <literal>db_gecos:</literal> setting</title>
+
+<para>
+The <literal>db_gecos:</literal> setting defines how to fetch additional
+content for the <literal>pw_gecos</literal> member of the user's passwd entry.
+There's always a fixed, Cygwin-specific part in the <literal>pw_gecos</literal>
+field for identifying the account. However, an administrator might want to
+add informative content like, for instance, the user's full name. That's
+what the <literal>db_gecos:</literal> setting is for.
+The following list describes the meaning of each schema when used with
+<literal>db_gecos:</literal>
+</para>
+
+<variablelist>
+ <varlistentry>
+ <term><literal>windows</literal></term>
+ <listitem>Add the AD <literal>displayName</literal> attribute or, for
+ SAM accounts, the "Full name" entry to the
+ <literal>pw_gecos</literal> field.</listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><literal>cygwin</literal></term>
+ <listitem>AD only: The content of the <literal>cygwinGecos</literal>
+ attribute from the <literal>cygwinUser</literal> auxiliary class
+ is added to <literal>pw_gecos</literal>.
+ See also <xref linkend="ntsec-mapping-nsswitch-cygwin"></xref>.
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><literal>unix</literal></term>
+ <listitem>AD only: The content of the <literal>gecos</literal> attribute
+ from the <literal>posixAccount</literal> auxiliary class
+ is added to <literal>pw_gecos</literal>.
+ See also <xref linkend="ntsec-mapping-nsswitch-posix"></xref>.
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><literal>desc</literal></term>
+ <listitem>The content of the gecos="..." XML-alike setting in the user's
+ <literal>description</literal> attribute in SAM or AD is added
+ to <literal>pw_gecos</literal>.
+ See <xref linkend="ntsec-mapping-nsswitch-desc"></xref>
+ for a detailed description.</listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><literal>@ad_attribute</literal></term>
+ <listitem>AD only: The content of the <literal>ad_attribute</literal>
+ attribute is added to <literal>pw_gecos</literal>.</listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><literal>/path</literal></term>
+ <listitem>The string following the slash is added to
+ <literal>pw_gecos</literal>. Here, the wildcards described in
+ <xref linkend="ntsec-mapping-nsswitch-passwd"></xref>
+ may come in handy.</listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>Fallback</term>
+ <listitem>If none of the schemes given for <literal>db_gecos:</literal>
+ define a non-empty pathname, nothing is added to
+ <literal>pw_gecos</literal>.</listitem>
+ </varlistentry>
+</variablelist>
+
+<para>
+The default setting for <literal>db_gecos:</literal> is the empty string.
+</para>
+
+</sect4>
+
+<sect4 id="ntsec-mapping-nsswitch-cygwin"><title id="ntsec-mapping-nsswitch-cygwin.title">The <literal>cygwin</literal> schema</title>
+
+<para>
+The <literal>cygwin</literal> schema is based on a Cygwin-specific Active
+Directory schema extension. Using this schema extension allows to maintain
+Cygwin-specific settings entirely within AD, without colliding with any other
+schema.
+</para>
+
+<para>
+The cygwin schema extension is available in a default Cygwin installation
+in the file <filename>/usr/share/cygwin/cygwin.ldif</filename>. To install
+the schema extension, you have to be schema admin, and you have to run the
+<command>ldifde</command> command on the schema master. The installation
+itself is rather simple. Assuming you're schema admin and running a shell
+with administrative privileges:
+</para>
+
+<screen>
+ $ cd /usr/share/cygwin
+ $ ldifde -i -f cygwin.ldif -k -c "CN=schema,CN=Configuration,DC=X" #schemaNamingContext
+</screen>
+
+<para>
+Afterwards, the auxiliary class <literal>cygwinUser</literal> is attached to
+the class <literal>User</literal>, and the auxiliary class
+<literal>cygwinGroup</literal> is attached to the class
+<literal>Group</literal>. The new attributes can be immediately edited
+using <command>ADSI Edit</command>.
+</para>
+
+<para>
+At the time of writing the following attributes are utilized by Cygwin:
+</para>
+
+<segmentedlist><?dbhtml list-presentation="table"?>
+ <seglistitem>
+ <seg><literal>cygwinHome</literal></seg>
+ <seg>Used as Cygwin home directory with <literal>db_home: cygwin</literal>.
+ See <xref linkend="ntsec-mapping-nsswitch-home"></xref>.</seg>
+ </seglistitem>
+ <seglistitem>
+ <seg><literal>cygwinShell</literal></seg>
+ <seg>Used as Cygwin login shell with <literal>db_shell: cygwin</literal>.
+ See <xref linkend="ntsec-mapping-nsswitch-shell"></xref>.</seg>
+ </seglistitem>
+ <seglistitem>
+ <seg><literal>cygwinGecos</literal></seg>
+ <seg>Content will be added to the pw_gecos field with
+ <literal>db_gecos: cygwin</literal>.
+ See <xref linkend="ntsec-mapping-nsswitch-gecos"></xref>.</seg>
+ </seglistitem>
+<!--
+ <seglistitem>
+ <seg><literal>cygwinFstab</literal></seg>
+ <seg>yada yada yada</seg>
+ </seglistitem>
+ <seglistitem>
+ <seg><literal>cygwinUnixUid</literal></seg>
+ <seg>See <xref linkend="ntsec-mapping-nfs"></xref> and
+ <xref linkend="ntsec-mapping-samba"></xref>.</seg>
+ </seglistitem>
+
+<para>
+The group attributes utilized by Cygwin are:
+</para>
+
+</segmentedlist>
+ <seglistitem>
+ <seg><literal>cygwinUnixGid</literal></seg>
+ <seg>See <xref linkend="ntsec-mapping-nfs"></xref> and
+ <xref linkend="ntsec-mapping-samba"></xref>.</seg>
+ </seglistitem>
+</segmentedlist>
+-->
+</segmentedlist>
+
+</sect4>
+
+<sect4 id="ntsec-mapping-nsswitch-posix"><title id="ntsec-mapping-nsswitch-posix.title">The <literal>unix</literal> schema</title>
+
+<para>
+The <literal>unix</literal> schema utilizes the
+<literal>posixAccount</literal> attribute extension. This is one of two
+schema extensions which are connected to AD accounts, available by default
+starting with Windows Server 2003 R2. They are usually
+<emphasis role='bold'>not set</emphasis>, unless used by the Active Directory
+<literal>Server for NIS</literal> feature (deprecated since Server 2012 R2).
+
+Two schemata are interesting for Cygwin, <literal>posixAccount</literal>,
+connected to user accounts, and <literal>posixGroup</literal>, connected
+to group accounts. Both follow the description of RFC 2307,
+<ulink url="https://tools.ietf.org/html/rfc2307">an Approach for Using LDAP as
+a Network Information Service</ulink>.
+The user attributes utilized by Cygwin are:
+</para>
+
+<segmentedlist><?dbhtml list-presentation="table"?>
+ <seglistitem>
+ <seg><literal>unixHomeDirectory</literal></seg>
+ <seg>Used as Cygwin home directory with <literal>db_home: unix</literal>.
+ See <xref linkend="ntsec-mapping-nsswitch-home"></xref>.</seg>
+ </seglistitem>
+ <seglistitem>
+ <seg><literal>loginShell</literal></seg>
+ <seg>Used as Cygwin login shell with <literal>db_shell: unix</literal>.
+ See <xref linkend="ntsec-mapping-nsswitch-shell"></xref>.</seg>
+ </seglistitem>
+ <seglistitem>
+ <seg><literal>gecos</literal></seg>
+ <seg>Content will be added to the pw_gecos field with
+ <literal>db_gecos: unix</literal>.
+ See <xref linkend="ntsec-mapping-nsswitch-gecos"></xref>.</seg>
+ </seglistitem>
+ <seglistitem>
+ <seg><literal>uidNumber</literal></seg>
+ <seg>See <xref linkend="ntsec-mapping-nfs"></xref> and
+ <xref linkend="ntsec-mapping-samba"></xref>.</seg>
+ </seglistitem>
+</segmentedlist>
+
+<para>
+The group attributes utilized by Cygwin are:
+</para>
+
+<segmentedlist><?dbhtml list-presentation="table"?>
+ <seglistitem>
+ <seg><literal>gidNumber</literal></seg>
+ <seg>See <xref linkend="ntsec-mapping-nfs"></xref> and
+ <xref linkend="ntsec-mapping-samba"></xref>.</seg>
+ </seglistitem>
+</segmentedlist>
+
+<para>
+Apart from power shell scripting or inventing new CLI tools, these attributes
+can be changed using the <literal>Attribute Editor</literal> tab in the user
+properties dialog of the <literal>Active Directory Users and Computers</literal>
+MMC snap-in. Alternatively, if the <literal>Server for NIS</literal>
+administration feature has been installed, there will be a
+<literal>UNIX Attributes</literal> tab which contains the required fields,
+except for the gecos field. Last resort is <command>ADSI Edit</command>.
+</para>
+
+</sect4>
+
+<sect4 id="ntsec-mapping-nsswitch-desc"><title id="ntsec-mapping-nsswitch-desc.title">The <literal>desc</literal> schema</title>
+
+<para>
+When using user accounts from the local account database, the SAM, there
+are only a very limited number of settings available. In contrast to
+Active Directory there's no way to add fields to a user's entry. You have
+to make do with the fields available. The method to utilize the
+<literal>description</literal> field has been mainly introduced for those
+accounts, usually the only ones a home user has. However, for symmetry,
+and because there may be a reason to use this in an AD environment, this
+schema is also supported for AD users.
+</para>
+
+<note>
+<para>
+The presentation of local user account settings on Windows is confusing,
+to say the least. The <literal>description</literal> field is not visible at
+all in the user settings available via the <literal>User Accounts</literal>
+control settings. And while it's called <literal>Description</literal> in the
+<literal>Local Users and Groups</literal> MMC snap-in (available, for instance,
+via the <literal>Computer Management</literal> GUI), in the command
+line tool <command>net user</command> the same field is called
+<literal>comment</literal>. The latter is especially confusing for
+AD admins, because the <literal>comment</literal> attribute in AD is called
+<literal>usercomment</literal> on the command line. Confused? Never mind,
+you're not the only one...
+</para>
+</note>
+
+<para>
+Fortunately you can utilize the <literal>description</literal> field even if
+you're running a "home edition" of Windows, by using the command line. The
+<command>net user</command> command allows to set all values in the SAM, even
+if the GUI is crippled.
+</para>
+
+<para>
+A Cygwin SAM comment entry looks like this:
+</para>
+
+<screen>
+&lt;cygwin key="value" key="value" [...] /&gt;
+</screen>
+
+<para>
+The supported keys are:
+</para>
+
+<segmentedlist><?dbhtml list-presentation="table"?>
+ <seglistitem>
+ <seg><literal>home="value"</literal></seg>
+ <seg>Sets the Cygwin home dir to value.</seg>
+ </seglistitem>
+ <seglistitem>
+ <seg><literal>shell="value"</literal></seg>
+ <seg>Sets the Cygwin login shell to value.</seg>
+ </seglistitem>
+ <seglistitem>
+ <seg><literal>gecos="value"</literal></seg>
+ <seg>Adds the string value to the user's gecos field.</seg>
+ </seglistitem>
+</segmentedlist>
+
+<para>
+The next two settings are only supported for SAM accounts.
+</para>
+
+<segmentedlist><?dbhtml list-presentation="table"?>
+ <seglistitem>
+ <seg><literal>group="value"</literal></seg>
+ <seg>Sets the Cygwin primary group of the account to value, provided that
+ the user <emphasis>is</emphasis> already a member of that group.
+ This allows to override the default <literal>None</literal> primary
+ group for local accounts. One nice idea here is, for instance,
+ group="Users".</seg>
+ </seglistitem>
+ <seglistitem>
+ <seg><literal>unix="value"</literal></seg>
+ <seg>Sets the NFS/Samba uid of the user to the decimal value.
+ See <xref linkend="ntsec-mapping-nfs"></xref> and
+ <xref linkend="ntsec-mapping-samba"></xref>.</seg>
+ </seglistitem>
+</segmentedlist>
+
+<para>
+The &lt;cygwin .../&gt; string can start at any point in the comment, but
+you have to follow the rules:
+</para>
-<sect2 id="ntsec-ids"><title id="ntsec-ids.title">Special values of user and group ids</title>
-
-<para>If the current user is not present in
-<filename>/etc/passwd</filename>, that user's uid is set to a
-special value of 400. The user name for the current user will always be
-shown correctly. If another user (or a Windows group, treated as a
-user) is not present in <filename>/etc/passwd</filename>, the uid of
-that user will have a special value of -1 (which would be shown by
-<command>ls</command> as 65535). The user name shown in this case will
-be '????????'.</para>
-
-<para>If the current user is not present in
-<filename>/etc/passwd</filename>, that user's login gid is set to a
-special value of 401. The gid 401 is shown as 'mkpasswd',
-indicating the command that should be run to alleviate the
-situation.</para>
-
-<para>If another user is not present in
-<filename>/etc/passwd</filename>, that user's login gid is set to a
-special value of -1. If the user is present in
-<filename>/etc/passwd</filename>, but that user's group is not in
-<filename>/etc/group</filename> and is not the login group of that user,
-the gid is set to a special value of -1. The name of this group
-(id -1) will be shown as '????????'.</para>
-
-<para>If the current user is present in
-<filename>/etc/passwd</filename>, but that user's login group is not
-present in <filename>/etc/group</filename>, the group name will be shown
-as 'mkgroup', again indicating the appropriate command.</para>
-
-<para>A special case is if the current user's primary group SID is noted
-in the user's <filename>/etc/passwd</filename> entry using another group
-id than the group entry of the same group SID in
-<filename>/etc/group</filename>. This should be noted and corrected.
-The group name printed in this case is
-'passwd/group_GID_clash(PPP/GGG)', with PPP being the gid as noted
-in <filename>/etc/passwd</filename> and GGG the gid as noted in
-<filename>/etc/group</filename>.</para>
-
-<para>To summarize:</para>
<itemizedlist spacing="compact">
+<listitem>
+It starts with "&lt;cygwin " and ends with "/&gt;".
+</listitem>
+<listitem>
+The "cygwin" string and the key names have to be lowercase.
+</listitem>
+<listitem>
+No spaces between key and "value", just the equal sign.
+</listitem>
+<listitem>
+The value must be placed within double quotes and it must not contain a double
+quote itself. The double quotes are required for the decimal values as well!
+</listitem>
+</itemizedlist>
-<listitem><para>If the current user doesn't show up in
-<filename>/etc/passwd</filename>, it's <emphasis>group</emphasis> will
-be named 'mkpasswd'.</para></listitem>
+<note>
+<para>
+There's also a length restriction imposed by Windows. The
+<literal>description</literal> entry has a maximum length of 1023 characters.
+</para>
+</note>
-<listitem><para>Otherwise, if the login group of the current user isn't
-in <filename>/etc/group</filename>, it will be named 'mkgroup'.</para>
+<para>
+CMD example:
+</para>
+
+<screen>
+net user corinna /comment:"&lt;cygwin home=\"/home/foo\"/&gt;"
+</screen>
+
+<para>
+Bash example (use single quotes):
+</para>
+
+<screen>
+net user corinna /comment:'&lt;cygwin home="/home/foo"/&gt;'
+</screen>
+
+<para>
+For changing group comments, use the `net localgroup' command. The supported
+key/value pair for SAM groups are:
+</para>
+
+<segmentedlist><?dbhtml list-presentation="table"?>
+ <seglistitem>
+ <seg><literal>unix="value"</literal></seg>
+ <seg>Sets the NFS/Samba gid of the group to the decimal value.
+ See <xref linkend="ntsec-mapping-nfs"></xref> and
+ <xref linkend="ntsec-mapping-samba"></xref>.</seg>
+ </seglistitem>
+</segmentedlist>
+
+</sect4>
+
+</sect3>
+
+<sect3 id="ntsec-mapping-nfs"><title id="ntsec-mapping-nfs.title">NFS account mapping</title>
+
+<para>
+Microsoft's NFS client does not map the uid/gid values on the NFS shares
+to SIDs. There's no such thing as a (fake) security descriptor returned
+to the application. Rather, via an undocumented API an application can
+fetch <ulink url="https://tools.ietf.org/html/rfc1813">RFC 1813</ulink>
+compatible NFSv3 stat information from the share. This is what Cygwin is
+using to show stat information for files on NFS shares.
+</para>
+
+<para>
+The problem is, while all other information in this stat record, like
+timestamps, file size etc., can be used by Cygwin, Cygwin had no way to
+map the values of the st_uid and st_gid members to a Windows SID for a
+long time. So it just faked the file owner info and claimed that it's
+you.
+</para>
+
+<para>
+However, SFU has, over time, developed multiple methods to map UNIX
+uid/gid values on NFS shares to Windows SIDs. You'll find the full
+documentation of the mapping methods in
+<ulink url="http://blogs.technet.com/b/filecab/archive/2012/10/09/nfs-identity-mapping-in-windows-server-2012.aspx">NFS Identity Mapping in Windows Server 2012</ulink>
+</para>
+
+<para>
+Cygwin now utilizes the
+<ulink url="https://tools.ietf.org/html/rfc2307">RFC 2307</ulink>
+mapping for this purpose. This is most of the time provided by an AD domain,
+but it could also be a standalone LDAP mapping server. Per
+<ulink url="https://tools.ietf.org/html/rfc2307">RFC 2307</ulink>, the uid is
+in the attribute <literal>uidNumber</literal>. For groups, the gid is in the
+<literal>gidNumber</literal> attribute.
+See <xref linkend="ntsec-mapping-nsswitch-posix"></xref>.
+</para>
+
+<para>
+When Cygwin stat()s files on an NFS share, it asks the mapping server via
+LDAP in two different ways, depending on the role of the mapping server.
+</para>
+
+<itemizedlist spacing="compact">
+
+<listitem>
+If the server is an AD domain controller, it asks for an account with
+<literal>uidNumber</literal> attribute == <literal>st_uid</literal> field of
+the stat record returned by NFS. If an account matches, AD returns the
+Windows SID, so we have an immediate mapping from UNIX uid to a Windows SID,
+if the user account has a valid <literal>uidNumber</literal> attribute. For
+groups, the method is the same, just that Cygwin asks for a group with
+<literal>gidNumber</literal> attribute == <literal>st_gid</literal> field of the
+stat record.
</listitem>
-<listitem><para>Otherwise a group not in <filename>/etc/group</filename>
-will be shown as '????????' and a user not in
-<filename>/etc/passwd</filename> will be shown as "????????".</para>
+<listitem>
+If the server is a standalone LDAP mapping server Cygwin asks for the
+same <literal>uidNumber</literal>/<literal>gidNumber</literal> attributes, but
+it can't expect that the LDAP server knows anything about Windows SIDs.
+Rather, the mapping server returns the account name. Cygwin then asks the
+DC for an account with this name, and if that succeeds, we have a mapping
+between UNIX uid/gid and Windows SIDs.
</listitem>
-<listitem><para>If different group ids are used for a group with the same
-SID, the group name is shown as 'passwd/group_GID_clash(PPP/GGG)' with
-PPP and GGG being the different group ids.</para></listitem>
+</itemizedlist>
+
+<para>
+The mapping will be cached for the lifetime of the process, and inherited
+by child processes.
+</para>
+
+</sect3>
+
+<sect3 id="ntsec-mapping-samba"><title id="ntsec-mapping-samba.title">Samba account mapping</title>
+
+<para>
+A fully set up Samba file server with domain integration is running winbindd to
+map Windows SIDs to artificially created UNIX uids and gids, and this mapping is
+transparent within the domain, so Cygwin doesn't have to do anything special.
+</para>
+
+<para>
+However, setting up winbindd isn't for everybody, and it fails to map
+Windows accounts to already existing UNIX users or groups. In contrast
+to NFS, Samba returns security descriptors, but unmapped UNIX accounts
+get special SIDs:
+</para>
+
+<itemizedlist spacing="compact">
+
+<listitem>
+A UNIX user account with uid X is mapped to the Windows SID S-1-22-1-X.
+</listitem>
+
+<listitem>
+A UNIX group account with gid X is mapped to SID S-1-22-2-X.
+</listitem>
</itemizedlist>
<para>
-Note that, since the special user and group names are just indicators,
-nothing prevents you from actually having a user named `mkpasswd' in
-<filename>/etc/passwd</filename> (or a group named `mkgroup' in
-<filename>/etc/group</filename>). If you do that, however, be aware of
-the possible confusion.
+As you can see, even though we have SIDs, they just reflect the actual
+uid/gid values on the UNIX box in the RID value. It's only marginally
+different from the NFS method, so why not just use the same method as
+for NFS?
+</para>
+
+<para>
+That's what Cygwin will do. If it encounters a S-1-22-x-y SID, it
+will perform the same
+<ulink url="https://tools.ietf.org/html/rfc2307">RFC 2307</ulink>
+mapping as for NFS shares.
</para>
+<para>
+For home users without any Windows domain or LDAP server per
+<ulink url="https://tools.ietf.org/html/rfc2307">RFC 2307</ulink>,
+but with a Linux machine running Samba, just add this information to
+your SAM account. Assuming the uid of your Linux user account is 505
+and the gid of your primary group is, say, 100, just add the values to
+your SAM user and group accounts. The following example assumes you
+didn't already add something else to the comment field.
+</para>
+
+<para>
+To your user's SAM comment (remember: called <literal>Description</literal>
+in the GUI),
+add:
+</para>
+
+<screen>
+ &lt;cygwin group="Users" unix="505"/&gt;
+</screen>
+
+<para>
+To the <literal>Users</literal> group SAM comment add:
+</para>
+
+<screen>
+ &lt;cygwin unix="100"/&gt;
+</screen>
+
+<para>
+This should be sufficient to work on your Samba share and to see
+all files owned by your Linux user account as your files.
+</para>
+
+</sect3>
+
</sect2>
+<sect2 id="ntsec-files"><title id="ntsec-files.title">File permissions</title>
-<sect2 id="ntsec-mapping"><title id="ntsec-mapping.title">The POSIX permission mapping leak</title>
+<para>On NTFS and if the <literal>noacl</literal> mount option is not
+specified for a mount point, Cygwin sets file permissions as on POSIX
+systems. Basically this is done by defining a Security Descriptor with the
+matching owner and group SIDs, and a DACL which contains ACEs for the owner,
+the group and for "Everyone", which represents what POSIX calls "others".</para>
-<para>As promised earlier, here's the problem when trying to map the
-POSIX permission model onto the Windows permission model.</para>
+<para>There's just one problem when trying to map the POSIX permission model
+onto the Windows permission model.</para>
-<para>There's a leak in the definition of a "correct" ACL which
-disallows a certain POSIX permission setting. The official
-documentation explains in short the following:</para>
+<para>There's a leak in the definition of a "correct" ACL which disallows a
+certain POSIX permission setting. The official documentation explains in short
+the following:</para>
<itemizedlist spacing="compact">
<listitem><para>The requested permissions are checked against all
@@ -430,7 +2146,7 @@ met. Later ACEs are not taken into account.</para></listitem>
<listitem><para>All access denied ACEs <emphasis
role='bold'>should</emphasis> precede any access allowed ACE. ACLs
-following this rule are called "canonical"</para></listitem>
+following this rule are called "canonical".</para></listitem>
</itemizedlist>
<para>Note that the last rule is a preference or a definition of
@@ -501,7 +2217,7 @@ OthersAllow: 110
</screen>
<para>Again: This works on all existing versions of Windows NT, at the
-time of writing from at least Windows XP up to Server 2012. Only
+time of writing from at least Windows XP up to Server 2012 R2. Only
the GUIs aren't able (or willing) to deal with that order.</para>
</sect2>
@@ -534,9 +2250,7 @@ inherits the access token from its parent process. Every thread can
get its own access token, which allows, for instance, to define threads
with restricted permissions.</para>
-</sect2>
-
-<sect2 id="ntsec-logonuser"><title id="ntsec-logonuser.title">Switching the user context with password authentication</title>
+<sect3 id="ntsec-logonuser"><title id="ntsec-logonuser.title">Switching the user context with password authentication</title>
<para>To switch the user context, the process has to request such an access
token for the new user. This is typically done by calling the Win32 API
@@ -597,7 +2311,7 @@ example:</para>
/* Use standard method on non-Cygwin systems. */
hashed_password = crypt (cleartext_password, salt);
if (!user_pwd_entry ||
- strcmp (hashed_password, user_pwd_entry->pw_password))
+ strcmp (hashed_password, user_pwd_entry->pw_passwd))
error_exit;
#endif /* CYGWIN */
@@ -612,9 +2326,9 @@ example:</para>
</screen>
-</sect2>
+</sect3>
-<sect2 id="ntsec-nopasswd1"><title id="ntsec-nopasswd1.title">Switching the user context without password, Method 1: Create a token from scratch</title>
+<sect3 id="ntsec-nopasswd1"><title id="ntsec-nopasswd1.title">Switching the user context without password, Method 1: Create a token from scratch</title>
<para>An unfortunate aspect of the implementation of
<command>set(e)uid</command> is the fact that the calling process
@@ -702,9 +2416,9 @@ path as in</para>
bash$ grep foo //server/share/foofile
</screen>
-</sect2>
+</sect3>
-<sect2 id="ntsec-nopasswd2"><title id="ntsec-nopasswd2.title">Switching the user context without password, Method 2: LSA authentication package</title>
+<sect3 id="ntsec-nopasswd2"><title id="ntsec-nopasswd2.title">Switching the user context without password, Method 2: LSA authentication package</title>
<para>We're looking for another way to switch the user context without
having to provide the password. Another technique is to create an
@@ -749,9 +2463,9 @@ inconvenience compared to that...</para>
<para>Nevertheless, this is already a lot better than what we get by
using <command>NtCreateToken</command>, isn't it?</para>
-</sect2>
+</sect3>
-<sect2 id="ntsec-nopasswd3"><title id="ntsec-nopasswd3.title">Switching the user context without password, Method 3: With password</title>
+<sect3 id="ntsec-nopasswd3"><title id="ntsec-nopasswd3.title">Switching the user context without password, Method 3: With password</title>
<para>Ok, so we have solved almost any problem, except for the network
access problem. Not being able to access network shares without
@@ -824,9 +2538,9 @@ safely use this method.</para>
<para>In all other cases, don't use this method. You have been warned.</para>
-</sect2>
+</sect3>
-<sect2 id="ntsec-setuid-impl"><title id="ntsec-setuid-impl.title">Switching the user context, how does it all fit together?</title>
+<sect3 id="ntsec-setuid-impl"><title id="ntsec-setuid-impl.title">Switching the user context, how does it all fit together?</title>
<para>Now we learned about four different ways to switch the user
context using the <command>set(e)uid</command> system call, but
@@ -884,6 +2598,8 @@ fails and returns -1, setting errno to EPERM.</para>
</listitem>
</itemizedlist>
+</sect3>
+
</sect2>
</sect1>
diff --git a/winsup/doc/ov-ex-unix.xml b/winsup/doc/ov-ex-unix.xml
index e1debabdd..c47a3992b 100644
--- a/winsup/doc/ov-ex-unix.xml
+++ b/winsup/doc/ov-ex-unix.xml
@@ -32,16 +32,10 @@ By default, <command>setup.exe</command> only installs a minimal subset of
packages. Add any other packages by clicking on the <literal>+</literal>
next to the Category name and selecting the package from the displayed
list. You may search for specfic tools by using the
-<ulink url="http://cygwin.com/packages/">Setup Package Search</ulink>
+<ulink url="https://cygwin.com/packages/">Setup Package Search</ulink>
at the Cygwin web site.
</para>
<para>
-Another option is to install everything by clicking on the
-<literal>Default</literal> field next to the <literal>All</literal>
-category. However, be advised that this will download and install
-several hundreds of megabytes of software to your computer. The best
-plan is probably to click on individual categories and install either
-entire categories or packages from the categories themselves.
After installation, you can find Cygwin-specific documentation in
the <literal>/usr/share/doc/Cygwin/</literal> directory.
</para>
diff --git a/winsup/doc/ov-ex-win.xml b/winsup/doc/ov-ex-win.xml
index c9371a971..9a24021a7 100644
--- a/winsup/doc/ov-ex-win.xml
+++ b/winsup/doc/ov-ex-win.xml
@@ -27,12 +27,6 @@ package installation screen will provide you with the ability to control
what is installed or updated.
</para>
<para>
-Another option is to install everything by clicking on the
-<literal>Default</literal> field next to the <literal>All</literal>
-category. However, be advised that this will download and install
-several hundreds of megabytes of software to your computer. The best
-plan is probably to click on individual categories and install either
-entire categories or packages from the categories themselves.
After installation, you can find Cygwin-specific documentation in
the <literal>/usr/share/doc/Cygwin/</literal> directory.
</para>
diff --git a/winsup/doc/overview.xml b/winsup/doc/overview.xml
index f43a69719..6fb759f45 100644
--- a/winsup/doc/overview.xml
+++ b/winsup/doc/overview.xml
@@ -45,17 +45,11 @@ parts are covered by the standard
<ulink url="http://www.x.org/Downloads_terms.html">X11 license</ulink>,
some of it is public domain, some of it was written by Red Hat and placed under
the <ulink url="http://www.gnu.org/licenses/gpl.html">GNU General Public
-License</ulink> (GPL). None of it is shareware. You don't have to pay anyone to
-use it but you should be sure to read the copyright section of the FAQ for more
-information on how the GNU GPL may affect your use of these
-tools. If you intend to port a proprietary application using the Cygwin
-library, you may want the Cygwin proprietary-use license.
-For more information about the proprietary-use license, please go to
-<ulink url="http://www.redhat.com/services/custom/cygwin/">http://www.redhat.com/services/custom/cygwin/</ulink>.
-Customers of the native Win32 GNUPro should feel free to submit bug
-reports and ask questions through Red Hat channels. All other
-questions should be sent to the project mailing list
-<email>cygwin@cygwin.com</email>.</para>
+License</ulink> (GPL) or <ulink url="http://www.gnu.org/licenses/lgpl.html">
+GNU Lesser General Public License</ulink> (LGPL). None of it is shareware.
+You don't have to pay anyone to use it but you should be sure to read the
+copyright section of the FAQ for more information on how the GNU GPL may
+affect your use of these tools.</para>
</sect1>
@@ -105,7 +99,7 @@ the GNU configure mechanism. Self hosting was achieved as of the beta
<para>
The entire Cygwin toolset was available as a monolithic install. In
April 2000, the project announced a
-<ulink url="http://www.cygwin.com/ml/cygwin/2000-04/msg00269.html">
+<ulink url="https://www.cygwin.com/ml/cygwin/2000-04/msg00269.html">
New Cygwin Net Release</ulink> which provided the native non-Cygwin Win32 program
<command>setup.exe</command> to install and upgrade each package
separately. Since then, the Cygwin DLL and <command>setup.exe</command>
@@ -113,7 +107,7 @@ have seen continuous development.
</para>
<para>
-The biggest major improvement in this development is the 1.7 release in
+The biggest major improvement in this development was the 1.7 release in
2009, which dropped Windows 95/98/Me support in favor of using Windows
NT features more extensively. It adds a lot of new features like
case-sensitive filenames, NFS interoperability, IPv6 support and much
@@ -121,7 +115,7 @@ more.</para>
<para>The latest big improvement is the 64 bit Cygwin DLL which
allows to run natively on AMD64 Windows machines. The first release
-available in a 64 bit version is 1.7.19.</para>
+available in a 64 bit version was 1.7.19.</para>
</sect1>
diff --git a/winsup/cygwin/path.sgml b/winsup/doc/path.xml
index 79f97dff5..81d4c3f35 100644
--- a/winsup/cygwin/path.sgml
+++ b/winsup/doc/path.xml
@@ -1,15 +1,38 @@
-<sect1 id="func-cygwin-conv-path">
-<title>cygwin_conv_path</title>
+<?xml version="1.0" encoding='UTF-8'?>
+<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook V4.5//EN"
+ "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
-<funcsynopsis><funcprototype>
-<funcdef>extern "C" ssize_t
+<sect1 id="func-cygwin-path">
+<title>Path conversion functions</title>
+
+<refentry id="func-cygwin-conv-path">
+ <refmeta>
+ <refentrytitle>cygwin_conv_path</refentrytitle>
+ <manvolnum>3</manvolnum>
+ <refmiscinfo class="manual">Cygwin API Reference</refmiscinfo>
+ </refmeta>
+
+ <refnamediv>
+ <refname>cygwin_conv_path</refname>
+ </refnamediv>
+
+ <refsynopsisdiv>
+<funcsynopsis>
+<funcsynopsisinfo>
+#include &lt;sys/cygwin.h&gt;
+</funcsynopsisinfo>
+<funcprototype>
+<funcdef>ssize_t
<function>cygwin_conv_path</function></funcdef>
<paramdef>cygwin_conv_path_t <parameter>what</parameter></paramdef>
<paramdef>const void * <parameter>from</parameter></paramdef>
<paramdef>void * <parameter>to</parameter></paramdef>
<paramdef>size_t <parameter>size</parameter></paramdef>
</funcprototype></funcsynopsis>
+ </refsynopsisdiv>
+ <refsect1>
+ <title>Description</title>
<para>Use this function to convert POSIX paths in
<parameter>from</parameter> to Win32 paths in <parameter>to</parameter>
or, vice versa, Win32 paths in <parameter>from</parameter> to POSIX paths
@@ -31,8 +54,10 @@ relative paths in relative notation. Creating absolute paths is the
default.</para>
<programlisting>
- CCP_ABSOLUTE = 0, /* Request absolute path (default). */
- CCP_RELATIVE = 0x100 /* Request to keep path relative. */
+ CCP_ABSOLUTE = 0, /* Request absolute path (default). */
+ CCP_RELATIVE = 0x100 /* Request to keep path relative. */
+ CCP_PROC_CYGDRIVE = 0x200 /* Request to return /proc/cygdrive path
+ (only with CCP_*_TO_POSIX). */
</programlisting>
<para><parameter>size</parameter> is the size of the buffer pointed to
@@ -48,7 +73,10 @@ error and errno is set to one of the below values.</para>
of what == CCP_POSIX_TO_WIN_A, longer than MAX_PATH.
ENOSPC size is less than required for the conversion.
</programlisting>
+ </refsect1>
+ <refsect1>
+ <title>Example</title>
<example>
<title>Example use of cygwin_conv_path</title>
<programlisting>
@@ -73,21 +101,37 @@ else
]]>
</programlisting>
</example>
+ </refsect1>
+</refentry>
-</sect1>
+<refentry id="func-cygwin-conv-path-list">
+ <refmeta>
+ <refentrytitle>cygwin_conv_path_list</refentrytitle>
+ <manvolnum>3</manvolnum>
+ <refmiscinfo class="manual">Cygwin API Reference</refmiscinfo>
+ </refmeta>
-<sect1 id="func-cygwin-conv-path-list">
-<title>cygwin_conv_path_list</title>
+ <refnamediv>
+ <refname>cygwin_conv_path_list</refname>
+ </refnamediv>
-<funcsynopsis><funcprototype>
-<funcdef>extern "C" ssize_t
+ <refsynopsisdiv>
+<funcsynopsis>
+<funcsynopsisinfo>
+#include &lt;sys/cygwin.h&gt;
+</funcsynopsisinfo>
+<funcprototype>
+<funcdef>ssize_t
<function>cygwin_conv_path_list</function></funcdef>
<paramdef>cygwin_conv_path_t <parameter>what</parameter></paramdef>
<paramdef>const void * <parameter>from</parameter></paramdef>
<paramdef>void * <parameter>to</parameter></paramdef>
<paramdef>size_t <parameter>size</parameter></paramdef>
</funcprototype></funcsynopsis>
+ </refsynopsisdiv>
+ <refsect1>
+ <title>Description</title>
<para>This is the same as <function>cygwin_conv_path</function>, but the
input is treated as a path list in $PATH or %PATH% notation.</para>
<para>If <parameter>what</parameter> is CCP_POSIX_TO_WIN_A or
@@ -98,21 +142,40 @@ CCP_WIN_W_TO_POSIX, given a Win32 %PATH%-style string (i.e. d:\;e:\bar)
convert it to the equivalent POSIX $PATH-style string (i.e. /foo:/bar).</para>
<para><parameter>size</parameter> is the size of the buffer pointed to by
<parameter>to</parameter> in bytes.</para>
+ </refsect1>
+<refsect1>
+ <title>See also</title>
<para>See also <link linkend="func-cygwin-conv-path">cygwin_conv_path</link></para>
+ </refsect1>
+</refentry>
-</sect1>
+<refentry id="func-cygwin-create-path">
+ <refmeta>
+ <refentrytitle>cygwin_create_path</refentrytitle>
+ <manvolnum>3</manvolnum>
+ <refmiscinfo class="manual">Cygwin API Reference</refmiscinfo>
+ </refmeta>
-<sect1 id="func-cygwin-create-path">
-<title>cygwin_create_path</title>
+ <refnamediv>
+ <refname>cygwin_create_path</refname>
+ </refnamediv>
-<funcsynopsis><funcprototype>
-<funcdef>extern "C" void *
+ <refsynopsisdiv>
+<funcsynopsis>
+<funcsynopsisinfo>
+#include &lt;sys/cygwin.h&gt;
+</funcsynopsisinfo>
+<funcprototype>
+<funcdef>void *
<function>cygwin_create_path</function></funcdef>
<paramdef>cygwin_conv_path_t <parameter>what</parameter></paramdef>
<paramdef>const void * <parameter>from</parameter></paramdef>
</funcprototype></funcsynopsis>
+ </refsynopsisdiv>
+ <refsect1>
+ <title>Description</title>
<para>This is equivalent to the <function>cygwin_conv_path</function>, except
that <function>cygwin_create_path</function> does not take a buffer pointer
for the result of the conversion as input. Rather it allocates the buffer
@@ -127,20 +190,39 @@ errno can be set to the below value.</para>
<para>When you don't need the returned buffer anymore, use
<function>free</function>(3) to deallocate it.</para>
+ </refsect1>
+<refsect1>
+ <title>See also</title>
<para>See also <link linkend="func-cygwin-conv-path">cygwin_conv_path</link></para>
+ </refsect1>
+</refentry>
-</sect1>
+<refentry id="func-cygwin-posix-path-list-p">
+ <refmeta>
+ <refentrytitle>cygwin_posix_path_list_p</refentrytitle>
+ <manvolnum>3</manvolnum>
+ <refmiscinfo class="manual">Cygwin API Reference</refmiscinfo>
+ </refmeta>
-<sect1 id="func-cygwin-posix-path-list-p">
-<title>cygwin_posix_path_list_p</title>
+ <refnamediv>
+ <refname>cygwin_posix_path_list_p</refname>
+ </refnamediv>
-<funcsynopsis><funcprototype>
-<funcdef>extern "C" int
+ <refsynopsisdiv>
+<funcsynopsis>
+<funcsynopsisinfo>
+#include &lt;sys/cygwin.h&gt;
+</funcsynopsisinfo>
+<funcprototype>
+<funcdef>int
<function>cygwin_posix_path_list_p</function></funcdef>
<paramdef>const char *<parameter>path</parameter></paramdef>
</funcprototype></funcsynopsis>
+ </refsynopsisdiv>
+ <refsect1>
+ <title>Description</title>
<para>This function tells you if the supplied
<parameter>path</parameter> is a POSIX-style path (i.e. posix names,
forward slashes, colon delimiters) or a Win32-style path (drive
@@ -148,25 +230,44 @@ letters, reverse slashes, semicolon delimiters. The return value is
true if the path is a POSIX path. Note that "_p" means "predicate", a
lisp term meaning that the function tells you something about the
parameter.</para>
+ </refsect1>
+</refentry>
-</sect1>
+<refentry id="func-cygwin-split-path">
+ <refmeta>
+ <refentrytitle>cygwin_split_path</refentrytitle>
+ <manvolnum>3</manvolnum>
+ <refmiscinfo class="manual">Cygwin API Reference</refmiscinfo>
+ </refmeta>
-<sect1 id="func-cygwin-split-path">
-<title>cygwin_split_path</title>
+ <refnamediv>
+ <refname>cygwin_split_path</refname>
+ </refnamediv>
-<funcsynopsis><funcprototype>
-<funcdef>extern "C" void
+ <refsynopsisdiv>
+<funcsynopsis>
+<funcsynopsisinfo>
+#include &lt;sys/cygwin.h&gt;
+</funcsynopsisinfo>
+<funcprototype>
+<funcdef>void
<function>cygwin_split_path</function>
</funcdef>
<paramdef>const char * <parameter>path</parameter></paramdef>
<paramdef>char * <parameter>dir</parameter></paramdef>
<paramdef>char * <parameter>file</parameter></paramdef>
</funcprototype></funcsynopsis>
+ </refsynopsisdiv>
+ <refsect1>
+ <title>Description</title>
<para>Split a path into the directory and the file portions. Both
<parameter>dir</parameter> and <parameter>file</parameter> are
expected to point to buffers of sufficient size. </para>
+ </refsect1>
+ <refsect1>
+ <title>Example</title>
<example>
<title>Example use of cygwin_split_path</title>
<programlisting>
@@ -175,4 +276,7 @@ cygwin_split_path("c:/foo/bar.c", dir, file);
printf("dir=%s, file=%s\n", dir, file);
</programlisting>
</example>
+ </refsect1>
+</refentry>
+
</sect1>
diff --git a/winsup/doc/pathnames.xml b/winsup/doc/pathnames.xml
index 3647253e2..3c0bdc133 100644
--- a/winsup/doc/pathnames.xml
+++ b/winsup/doc/pathnames.xml
@@ -44,7 +44,9 @@ all users. Sometimes there's a requirement to have user specific
mount points. The Cygwin DLL supports user specific fstab files.
These are stored in the directory <filename>/etc/fstab.d</filename>
and the name of the file is the Cygwin username of the user, as it's
-stored in the <filename>/etc/passwd</filename> file. The structure of the
+created from the Windows account database or stored in the
+<filename>/etc/passwd</filename> file (see
+<xref linkend="ntsec-mapping"></xref>). The structure of the
user specific file is identical to the system-wide
<filename>fstab</filename> file.</para>
@@ -72,16 +74,16 @@ doesn't matter if you write <literal>FAT</literal> into this field even if
the filesystem is NTFS. Cygwin figures out the filesystem type and its
capabilities by itself.</para>
-<para>The only exception is the file system type cygdrive. This type is
-used to set the cygdrive prefix. For a description of the cygdrive prefix
-see <xref linkend="cygdrive"></xref></para>
+<para>The only two exceptions are the file system types cygdrive and usertemp.
+The cygdrive type is used to set the cygdrive prefix. For a description of
+the cygdrive prefix see <xref linkend="cygdrive"></xref>, for a description of
+the usertemp file system type see <xref linkend="usertemp"></xref></para>
<para>The fourth field describes the mount options associated
with the filesystem. It is formatted as a comma separated list of
options. It contains at least the type of mount (binary or text) plus
-any additional options appropriate to the filesystem type. Recognized
-options are binary, text, nouser, user, exec, notexec, cygexec, nosuid,
-posix=[0|1]. The meaning of the options is as follows.</para>
+any additional options appropriate to the filesystem type. The list of
+the options, including their meaning, follows.</para>
<screen>
acl - Cygwin uses the filesystem's access control lists (ACLs) to
@@ -134,14 +136,14 @@ executability, this is not possible on filesystems which don't support
permissions at all (like FAT/FAT32), or if ACLs are ignored on filesystems
supporting them (see the aforementioned <literal>acl</literal> mount option).
In these cases, the following heuristic is used to evaluate if a file is
-executable: Files ending in certain extensions (.exe, .com, .bat, .btm,
-.cmd) are assumed to be executable. Files whose first two characters begin
-with '#!' are also considered to be executable.
+executable: Files ending in certain extensions (.exe, .com, .lnk) are
+assumed to be executable. Files whose first two characters are "#!", "MZ",
+or ":\n" are also considered to be executable.
The <literal>exec</literal> option is used to instruct Cygwin that the
mounted file is "executable". If the <literal>exec</literal> option is used
with a directory then all files in the directory are executable.
This option allows other files to be marked as executable and avoids the
-overhead of opening each file to check for a '#!'. The
+overhead of opening each file to check for "magic" bytes. The
<literal>cygexec</literal> option is very similar to <literal>exec</literal>,
but also prevents Cygwin from setting up commands and environment variables
for a normal Windows program, adding another small performance gain. The
@@ -254,27 +256,6 @@ points will disappear as soon as your last Cygwin process ends.
See <xref linkend="mount"></xref> and <xref linkend="umount"></xref> for more
information.</para>
-<note><para>
-When you upgrade an existing older Cygwin installation to Cygwin 1.7,
-your old system mount points (stored in the HKEY_LOCAL_MACHINE branch
-of your registry) are read by a script and the <filename>/etc/fstab</filename>
-file is generated from these entries. Note that entries for
-<filename>/</filename>, <filename>/usr/bin</filename>, and
-<filename>/usr/lib</filename> are <emphasis role='bold'>never</emphasis>
-generated.
-</para>
-
-<para>
-The old user mount points in your HKEY_CURRENT_USER branch of the registry
-are not used to generate <filename>/etc/fstab</filename>. If you want
-to create a user specific <filename>/etc/fstab.d/${USER}</filename> file
-from your old entries, there's a script available which does exactly
-that for you, <filename>/bin/copy-user-registry-fstab</filename>. Just
-start the script and it will create your user specific fstab file. Stop
-all your Cygwin processes and restart them, and you can simply use your
-old user mount points as before.
-</para></note>
-
</sect2>
<sect2 id="unc-paths"><title>UNC paths</title>
@@ -353,6 +334,42 @@ the cygdrive prefix, use a distinct path prefix:</para>
D: /mnt/d somefs text 0 0
</screen>
+<para>To simplify scripting, Cygwin also provides a
+<filename>/proc/cygdrive</filename> symlink, which allows to use a fixed path
+in scripts, even if the actual cygdrive prefix has been changed, or is different
+between different users. So, in scripts, conveniently use the
+<filename>/proc/cygdrive</filename> symlink to successfully access files
+independently from the current cygdrive prefix:</para>
+
+<screen>
+ $ mount -p
+ Prefix Type Flags
+ /mnt user binmode
+ $ cat &gt; x.sh &lt;&lt;EOF
+ cd /proc/cygdrive/c/Windows/System32/Drivers/etc
+ ls -l hosts
+ EOF
+ $ sh -c ./x.sh
+ -rwxrwx---+ 1 SYSTEM SYSTEM 826 Sep 4 22:43 hosts
+</screen>
+
+</sect2>
+
+<sect2 id="usertemp"><title>The usertemp file system type</title>
+
+<para>On Windows, the environment variable <literal>TEMP</literal> specifies
+the location of the temp folder. It serves the same purpose as the /tmp/
+directory in Unix systems. In contrast to /tmp/, it is by default a
+different folder for every Windows user. By using the special purpose usertemp
+file system, that temp folder can be mapped to /tmp/. This is particularly
+useful in setups where the administrator wants to write-protect the entire
+Cygwin directory. The usertemp file system can be configured in /etc/fstab
+like this:</para>
+
+<screen>
+ none /tmp usertemp binary,posix=0 0 0
+</screen>
+
</sect2>
<sect2 id="pathnames-symlinks"><title>Symbolic links</title>
@@ -374,14 +391,13 @@ followed by the path to which the link points. They are marked with the
DOS SYSTEM attribute so that only files with that attribute have to be
read to determine whether or not the file is a symbolic link.</para>
-<note><para>Starting with Cygwin 1.7, symbolic links are using UTF-16 to encode
-the filename of the target file, to better support internationalization.
-Symlinks created by older Cygwin releases can be read just fine. However,
-you could run into problems with them if you're now using another character
-set than the one you used when creating these symlinks
-(see <xref linkend="setup-locale-problems"></xref>). Please note that this
-new UTF-16 style of symlinks is not compatible with older Cygwin release,
-which can't read the target filename correctly.</para></note>
+<note><para>Cygwin symbolic links are using UTF-16 to encode the filename of
+the target file, to better support internationalization. Symlinks created by
+old Cygwin releases can be read just fine. However, you could run into
+problems with them if you're now using another character set than the one you
+used when creating these symlinks
+(see <xref linkend="setup-locale-problems"></xref>).
+</para></note>
</listitem>
<listitem>
@@ -408,6 +424,9 @@ these two settings, see <xref linkend="using-cygwinenv"></xref>.
On AFS, native symlinks are the only supported type of symlink due to
AFS lacking support for DOS attributes. This is independent from the
<literal>winsymlinks</literal> setting.</para>
+<para>Creation of native symlinks follows special rules to ensure the links
+are usable outside of Cygwin. This includes dereferencing any Cygwin-only
+symlinks that lie in the target path.</para>
</listitem>
<listitem>
diff --git a/winsup/cygwin/posix.sgml b/winsup/doc/posix.xml
index af9cd2b9a..fddd8756e 100644
--- a/winsup/cygwin/posix.sgml
+++ b/winsup/doc/posix.xml
@@ -1,3 +1,10 @@
+<?xml version="1.0" encoding='UTF-8'?>
+<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook V4.5//EN"
+ "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
+
+<chapter id="compatibility" xmlns:xi="http://www.w3.org/2001/XInclude">
+<title>Compatibility</title>
+
<sect1 id="std-susv4"><title>System interfaces compatible with the Single Unix Specification, Version 4:</title>
<para>Note that the core of the Single Unix Specification, Version 4 is
@@ -23,6 +30,8 @@ also IEEE Std 1003.1-2008 (POSIX.1-2008).</para>
acosf
acosh
acoshf
+ acoshl
+ acosl
alarm
alphasort
asctime
@@ -31,53 +40,70 @@ also IEEE Std 1003.1-2008 (POSIX.1-2008).</para>
asinf
asinh
asinhf
+ asinhl
+ asinl
atan
atan2
atan2f
+ atan2l
atanf
atanh
atanhf
+ atanhl
+ atanl
atexit
atof
atoff
atoi
atol
atoll
- basename
+ basename (see chapter "Implementation Notes")
bind
bsearch
btowc
cabs
cabsf
+ cabsl
cacos
cacosf
cacosh
cacoshf
+ cacoshl
+ cacosl
calloc
carg
cargf
+ cargl
casin
casinf
casinh
casinhf
casinhl
+ casinl
catan
catanf
catanh
catanhf
+ catanhl
+ catanl
catclose (available in external "catgets" library)
catgets (available in external "catgets" library)
catopen (available in external "catgets" library)
cbrt
cbrtf
+ cbrtl
ccos
ccosf
ccosh
ccoshf
+ ccoshl
+ ccosl
ceil
ceilf
+ ceill
cexp
cexpf
+ cexpl
cfgetispeed
cfgetospeed
cfsetispeed
@@ -87,6 +113,7 @@ also IEEE Std 1003.1-2008 (POSIX.1-2008).</para>
chown
cimag
cimagf
+ cimagl
clearerr
clock
clock_getcpuclockid
@@ -96,37 +123,50 @@ also IEEE Std 1003.1-2008 (POSIX.1-2008).</para>
clock_settime (see chapter "Implementation Notes")
clog
clogf
+ clogl
close
closedir
closelog
confstr
conj
conjf
+ conjl
connect
copysign
copysignf
+ copysignl
cos
cosf
cosh
coshf
+ coshl
+ cosl
cpow
cpowf
+ cpowl
cproj
cprojf
+ cprojl
creal
crealf
+ creall
creat
crypt (available in external "crypt" library)
csin
csinf
csinh
csinhf
+ csinhl
+ csinl
csqrt
csqrtf
+ csqrtl
ctan
ctanf
ctanh
ctanhf
+ ctanhl
+ ctanl
ctermid
ctime
ctime_r
@@ -164,7 +204,9 @@ also IEEE Std 1003.1-2008 (POSIX.1-2008).</para>
erf
erfc
erfcf
+ erfcl
erff
+ erfl
errno
execl
execle
@@ -176,11 +218,15 @@ also IEEE Std 1003.1-2008 (POSIX.1-2008).</para>
exp
exp2
exp2f
+ exp2l
expf
+ expl
expm1
expm1f
+ expm1l
fabs
fabsf
+ fabsl
faccessat
fchdir
fchmod
@@ -192,6 +238,7 @@ also IEEE Std 1003.1-2008 (POSIX.1-2008).</para>
fdatasync
fdim
fdimf
+ fdiml
fdopen
fdopendir
feclearexcept
@@ -219,15 +266,20 @@ also IEEE Std 1003.1-2008 (POSIX.1-2008).</para>
flockfile
floor
floorf
+ floorl
fma
fmaf
+ fmal
fmax
fmaxf
+ fmaxl
fmemopen
fmin
fminf
+ fminl
fmod
fmodf
+ fmodl
fnmatch
fopen
fork
@@ -244,6 +296,7 @@ also IEEE Std 1003.1-2008 (POSIX.1-2008).</para>
freopen
frexp
frexpf
+ frexpl
fscanf
fseek
fseeko
@@ -334,6 +387,7 @@ also IEEE Std 1003.1-2008 (POSIX.1-2008).</para>
htons
hypot
hypotf
+ hypotl
iconv (available in external "libiconv" library)
iconv_close (available in external "libiconv" library)
iconv_open (available in external "libiconv" library)
@@ -343,6 +397,7 @@ also IEEE Std 1003.1-2008 (POSIX.1-2008).</para>
if_nametoindex
ilogb
ilogbf
+ ilogbl
imaxabs
imaxdiv
inet_addr
@@ -401,10 +456,12 @@ also IEEE Std 1003.1-2008 (POSIX.1-2008).</para>
lcong48
ldexp
ldexpf
+ ldexpl
ldiv
lfind
lgamma
lgammaf
+ lgammal
link
linkat
listen
@@ -415,6 +472,7 @@ also IEEE Std 1003.1-2008 (POSIX.1-2008).</para>
llrintl
llround
llroundf
+ llroundl
localeconv
localtime
localtime_r
@@ -422,13 +480,18 @@ also IEEE Std 1003.1-2008 (POSIX.1-2008).</para>
log
log10
log10f
+ log10l
log1p
log1pf
+ log1pl
log2
log2f
+ log2l
logb
logbf
+ logbl
logf
+ logl
longjmp
lrand48
lrint
@@ -436,6 +499,7 @@ also IEEE Std 1003.1-2008 (POSIX.1-2008).</para>
lrintl
lround
lroundf
+ lroundl
lsearch
lseek
lstat
@@ -467,6 +531,7 @@ also IEEE Std 1003.1-2008 (POSIX.1-2008).</para>
mmap
modf
modff
+ modfl
mprotect
mq_close
mq_getattr
@@ -488,11 +553,17 @@ also IEEE Std 1003.1-2008 (POSIX.1-2008).</para>
munmap
nan
nanf
+ nanl
nanosleep
nearbyint
nearbyintf
+ nearbyintl
nextafter
nextafterf
+ nextafterl
+ nexttoward
+ nexttowardf
+ nexttowardl
nftw
nice
nl_langinfo
@@ -521,8 +592,30 @@ also IEEE Std 1003.1-2008 (POSIX.1-2008).</para>
posix_madvise
posix_memalign
posix_openpt
+ posix_spawn
+ posix_spawn_file_actions_addclose
+ posix_spawn_file_actions_adddup2
+ posix_spawn_file_actions_addopen
+ posix_spawn_file_actions_destroy
+ posix_spawn_file_actions_init
+ posix_spawnattr_destroy
+ posix_spawnattr_getflags
+ posix_spawnattr_getpgroup
+ posix_spawnattr_getschedparam
+ posix_spawnattr_getschedpolicy
+ posix_spawnattr_getsigdefault
+ posix_spawnattr_getsigmask
+ posix_spawnattr_init
+ posix_spawnattr_setflags
+ posix_spawnattr_setpgroup
+ posix_spawnattr_setschedparam
+ posix_spawnattr_setschedpolicy
+ posix_spawnattr_setsigdefault
+ posix_spawnattr_setsigmask
+ posix_spawnp
pow
powf
+ powl
pread
printf
pselect
@@ -547,6 +640,13 @@ also IEEE Std 1003.1-2008 (POSIX.1-2008).</para>
pthread_attr_setscope
pthread_attr_setstack
pthread_attr_setstacksize
+ pthread_barrier_destroy
+ pthread_barrier_init
+ pthread_barrier_wait
+ pthread_barrierattr_destroy
+ pthread_barrierattr_getpshared
+ pthread_barrierattr_init
+ pthread_barrierattr_setpshared
pthread_cancel
pthread_cond_broadcast
pthread_cond_destroy
@@ -648,10 +748,12 @@ also IEEE Std 1003.1-2008 (POSIX.1-2008).</para>
regfree
remainder
remainderf
+ reminderl
remove
remque
remquo
remquof
+ remquol
rename
renameat
rewind
@@ -662,10 +764,13 @@ also IEEE Std 1003.1-2008 (POSIX.1-2008).</para>
rmdir
round
roundf
+ roundl
scalbln
scalblnf
+ scalblnl
scalbn
scalbnf
+ scalbnl
scandir
scanf
sched_get_priority_max
@@ -731,6 +836,7 @@ also IEEE Std 1003.1-2008 (POSIX.1-2008).</para>
shutdown
sigaction
sigaddset
+ sigaltstack
sigdelset
sigemptyset
sigfillset
@@ -756,13 +862,17 @@ also IEEE Std 1003.1-2008 (POSIX.1-2008).</para>
sinf
sinh
sinhf
+ sinhl
+ sinl
sleep
snprintf
+ sockatmark
socket
socketpair
sprintf
sqrt
sqrtf
+ sqrtl
srand
srand48
srandom
@@ -805,6 +915,7 @@ also IEEE Std 1003.1-2008 (POSIX.1-2008).</para>
strtok
strtok_r
strtol
+ strtold
strtoll
strtoul
strtoull
@@ -823,11 +934,14 @@ also IEEE Std 1003.1-2008 (POSIX.1-2008).</para>
tanf
tanh
tanhf
+ tanhl
+ tanl
tcdrain
tcflow
tcflush
tcgetattr
tcgetpgrp
+ tcgetsid
tcsendbreak
tcsetattr
tcsetpgrp
@@ -837,6 +951,7 @@ also IEEE Std 1003.1-2008 (POSIX.1-2008).</para>
tfind
tgamma
tgammaf
+ tgammal
time
timer_create (see chapter "Implementation Notes")
timer_delete
@@ -855,6 +970,7 @@ also IEEE Std 1003.1-2008 (POSIX.1-2008).</para>
trunc
truncate
truncf
+ truncl
tsearch
ttyname
ttyname_r
@@ -921,6 +1037,7 @@ also IEEE Std 1003.1-2008 (POSIX.1-2008).</para>
wcstoimax
wcstok
wcstol
+ wcstold
wcstoll
wcstombs
wcstoul
@@ -965,6 +1082,7 @@ also IEEE Std 1003.1-2008 (POSIX.1-2008).</para>
bindresvport_sa
cfmakeraw
cfsetspeed
+ clearerr_unlocked
daemon
dn_comp
dn_expand
@@ -974,12 +1092,20 @@ also IEEE Std 1003.1-2008 (POSIX.1-2008).</para>
endusershell
err
errx
+ feof_unlocked
+ ferror_unlocked
+ fflush_unlocked
+ fileno_unlocked
+ fgetc_unlocked
finite
finitef
+ finitel
fiprintf
flock (see chapter "Implementation Notes")
forkpty
fpurge
+ fputc_unlocked
+ fread_unlocked
freeifaddrs
fstatfs
fts_children
@@ -992,6 +1118,7 @@ also IEEE Std 1003.1-2008 (POSIX.1-2008).</para>
fts_set_clientptr
funopen
futimes
+ fwrite_unlocked
gamma
gamma_r
gammaf
@@ -1012,6 +1139,7 @@ also IEEE Std 1003.1-2008 (POSIX.1-2008).</para>
initgroups
iruserok
iruserok_sa
+ issetugid
login
login_tty
logout
@@ -1019,6 +1147,7 @@ also IEEE Std 1003.1-2008 (POSIX.1-2008).</para>
madvise
mkstemps
openpty
+ qsort_r (see chapter "Implementation Notes")
rcmd
rcmd_af
reallocf
@@ -1038,12 +1167,14 @@ also IEEE Std 1003.1-2008 (POSIX.1-2008).</para>
res_send
revoke
rexec
+ rpmatch
rresvport
rresvport_af
ruserok
sbrk
setbuffer
setgroups
+ sethostname
setlinebuf
setpassent
setprogname
@@ -1075,6 +1206,7 @@ also IEEE Std 1003.1-2008 (POSIX.1-2008).</para>
<sect1 id="std-gnu"><title>System interfaces compatible with GNU or Linux extensions:</title>
<screen>
+ __mempcpy
accept4
argz_add
argz_add_sep
@@ -1091,7 +1223,11 @@ also IEEE Std 1003.1-2008 (POSIX.1-2008).</para>
asnprintf
asprintf
asprintf_r
+ basename (see chapter "Implementation Notes")
canonicalize_file_name
+ clog10
+ clog10f
+ clog10l
dremf
dup3
envz_add
@@ -1106,6 +1242,7 @@ also IEEE Std 1003.1-2008 (POSIX.1-2008).</para>
execvpe
exp10
exp10f
+ exp10l
fcloseall
fcloseall_r
fegetprec
@@ -1113,9 +1250,17 @@ also IEEE Std 1003.1-2008 (POSIX.1-2008).</para>
feenableexcept
fedisableexcept
fegetexcept
+ ffsl
+ ffsll
+ fgets_unlocked
+ fgetwc_unlocked
+ fgetws_unlocked
fgetxattr
flistxattr
fopencookie
+ fputs_unlocked
+ fputwc_unlocked
+ fputws_unlocked
fremovexattr
fsetxattr
get_avphys_pages
@@ -1127,6 +1272,8 @@ also IEEE Std 1003.1-2008 (POSIX.1-2008).</para>
getopt_long
getopt_long_only
getpt
+ getwc_unlocked
+ getwchar_unlocked
getxattr
lgetxattr
listxattr
@@ -1141,14 +1288,22 @@ also IEEE Std 1003.1-2008 (POSIX.1-2008).</para>
pipe2
pow10
pow10f
+ pow10l
ppoll
pthread_getattr_np
pthread_sigqueue
ptsname_r
+ putwc_unlocked
+ putwchar_unlocked
+ qsort_r (see chapter "Implementation Notes")
+ quotactl
rawmemchr
removexattr
scandirat
setxattr
+ sincos
+ sincosf
+ sincosl
strchrnul
sysinfo
tdestroy
@@ -1166,7 +1321,15 @@ also IEEE Std 1003.1-2008 (POSIX.1-2008).</para>
<sect1 id="std-solaris"><title>System interfaces compatible with Solaris or SunOS functions:</title>
<screen>
+ __fbufsize
+ __flbf
+ __fpending
__fpurge
+ __freadable
+ __freading
+ __fsetlocking
+ __fwritable
+ __fwriting
acl
aclcheck
aclfrommode
@@ -1182,60 +1345,70 @@ also IEEE Std 1003.1-2008 (POSIX.1-2008).</para>
getmntent
memalign
setmntent
- xdr_array
- xdr_bool
- xdr_bytes
- xdr_char
- xdr_double
- xdr_enum
- xdr_float
- xdr_free
- xdr_hyper
- xdr_int
- xdr_int16_t
- xdr_int32_t
- xdr_int64_t
- xdr_int8_t
- xdr_long
- xdr_longlong_t
- xdr_netobj
- xdr_opaque
- xdr_pointer
- xdr_reference
- xdr_short
- xdr_sizeof
- xdr_string
- xdr_u_char
- xdr_u_hyper
- xdr_u_int
- xdr_u_int16_t
- xdr_u_int32_t
- xdr_u_int64_t
- xdr_u_int8_t
- xdr_u_long
- xdr_u_longlong_t
- xdr_u_short
- xdr_uint16_t
- xdr_uint32_t
- xdr_uint64_t
- xdr_uint8_t
- xdr_union
- xdr_vector
- xdr_void
- xdr_wrapstring
- xdrmem_create
- xdrrec_create
- xdrrec_endofrecord
- xdrrec_eof
- xdrrec_skiprecord
- __xdrrec_getrec
- __xdrrec_setnonblock
- xdrstdio_create
+ xdr_array (available in external "libtirpc" library)
+ xdr_bool (available in external "libtirpc" library)
+ xdr_bytes (available in external "libtirpc" library)
+ xdr_char (available in external "libtirpc" library)
+ xdr_double (available in external "libtirpc" library)
+ xdr_enum (available in external "libtirpc" library)
+ xdr_float (available in external "libtirpc" library)
+ xdr_free (available in external "libtirpc" library)
+ xdr_hyper (available in external "libtirpc" library)
+ xdr_int (available in external "libtirpc" library)
+ xdr_int16_t (available in external "libtirpc" library)
+ xdr_int32_t (available in external "libtirpc" library)
+ xdr_int64_t (available in external "libtirpc" library)
+ xdr_int8_t (available in external "libtirpc" library)
+ xdr_long (available in external "libtirpc" library)
+ xdr_longlong_t (available in external "libtirpc" library)
+ xdr_netobj (available in external "libtirpc" library)
+ xdr_opaque (available in external "libtirpc" library)
+ xdr_pointer (available in external "libtirpc" library)
+ xdr_reference (available in external "libtirpc" library)
+ xdr_short (available in external "libtirpc" library)
+ xdr_sizeof (available in external "libtirpc" library)
+ xdr_string (available in external "libtirpc" library)
+ xdr_u_char (available in external "libtirpc" library)
+ xdr_u_hyper (available in external "libtirpc" library)
+ xdr_u_int (available in external "libtirpc" library)
+ xdr_u_int16_t (available in external "libtirpc" library)
+ xdr_u_int32_t (available in external "libtirpc" library)
+ xdr_u_int64_t (available in external "libtirpc" library)
+ xdr_u_int8_t (available in external "libtirpc" library)
+ xdr_u_long (available in external "libtirpc" library)
+ xdr_u_longlong_t (available in external "libtirpc" library)
+ xdr_u_short (available in external "libtirpc" library)
+ xdr_uint16_t (available in external "libtirpc" library)
+ xdr_uint32_t (available in external "libtirpc" library)
+ xdr_uint64_t (available in external "libtirpc" library)
+ xdr_uint8_t (available in external "libtirpc" library)
+ xdr_union (available in external "libtirpc" library)
+ xdr_vector (available in external "libtirpc" library)
+ xdr_void (available in external "libtirpc" library)
+ xdr_wrapstring (available in external "libtirpc" library)
+ xdrmem_create (available in external "libtirpc" library)
+ xdrrec_create (available in external "libtirpc" library)
+ xdrrec_endofrecord (available in external "libtirpc" library)
+ xdrrec_eof (available in external "libtirpc" library)
+ xdrrec_skiprecord (available in external "libtirpc" library)
+ __xdrrec_getrec (available in external "libtirpc" library)
+ __xdrrec_setnonblock (available in external "libtirpc" library)
+ xdrstdio_create (available in external "libtirpc" library)
+</screen>
+
+<sect1 id="std-iso"><title>System interfaces not in POSIX but compatible with ISO C requirements:</title>
+
+<screen>
+ aligned_alloc (ISO C11)
+ at_quick_exit (ISO C11)
+ quick_exit (ISO C11)
</screen>
</sect1>
-<sect1 id="std-deprec"><title>Other UNIX system interfaces, deprecated or not in POSIX.1-2008:</title>
+</sect1>
+
+<sect1 id="std-deprec"><title>Other UNIX system interfaces, not in POSIX.1-2008 or deprecated:</title>
<screen>
bcmp (POSIX.1-2001, SUSv3)
@@ -1249,6 +1422,7 @@ also IEEE Std 1003.1-2008 (POSIX.1-2008).</para>
fcvt (SUSv3)
ftime (SUSv3)
gcvt (SUSv3)
+ getcontext (SUSv3)
gethostbyaddr (SUSv3)
gethostbyname (SUSv3)
gethostbyname2 (first defined in BIND 4.9.4)
@@ -1260,6 +1434,7 @@ also IEEE Std 1003.1-2008 (POSIX.1-2008).</para>
getwd (SUSv3)
h_errno (SUSv3)
index (SUSv3)
+ makecontext (SUSv3)
mallinfo (SVID)
mallopt (SVID)
mktemp (SUSv3)
@@ -1274,7 +1449,10 @@ also IEEE Std 1003.1-2008 (POSIX.1-2008).</para>
putw (SVID)
rindex (SUSv3)
scalb (SUSv3)
+ setcontext (SUSv3)
setutent (XPG2)
+ stime (SVID)
+ swapcontext (SUSv3)
sys_errlist (BSD)
sys_nerr (BSD)
sys_siglist (BSD)
@@ -1290,8 +1468,6 @@ also IEEE Std 1003.1-2008 (POSIX.1-2008).</para>
<sect1 id="std-notimpl"><title>NOT implemented system interfaces from the Single Unix Specification, Volume 4:</title>
<screen>
- acoshl
- acosl
aio_cancel
aio_error
aio_fsync
@@ -1299,55 +1475,11 @@ also IEEE Std 1003.1-2008 (POSIX.1-2008).</para>
aio_return
aio_suspend
aio_write
- asinhl
- asinl
- atan2l
- atanhl
- atanl
- cabsl
- cacoshl
- cacosl
- cargl
- casinl
- catanhl
- catanl
- cbrtl
- ccoshl
- ccosl
- ceill
- cexpl
- cimagl
- clogl
- conjl
- copysignl
- coshl
- cosl
- cpowl
- cprojl
- creall
- csinhl
- csinl
- csqrtl
- ctanhl
- ctanl
duplocale
endnetent
- erfcl
- erfl
- exp2l
- expl
- expm1l
- fabsl
fattach
- fdiml
- floorl
- fmal
- fmaxl
- fminl
- fmodl
fmtmsg
freelocale
- frexpl
getdate
getdate_err
gethostent
@@ -1356,8 +1488,6 @@ also IEEE Std 1003.1-2008 (POSIX.1-2008).</para>
getnetbyname
getnetent
getpmsg
- hypotl
- ilogbl
isalnum_l
isalpha_l
isastream
@@ -1383,32 +1513,13 @@ also IEEE Std 1003.1-2008 (POSIX.1-2008).</para>
iswupper_l
iswxdigit_l
isxdigit_l
- ldexpl
- lgammal
lio_listio
- llroundl
- log10l
- log1pl
- log2l
- logbl
- logl
- lroundl
mlockall
- modfl
munlockall
- nanl
- nearbyintl
newlocale
- nextafterl
- nexttoward
- nexttowardf
- nexttowardl
posix_mem_offset
- posix_spawn[...]
posix_trace[...]
posix_typed_[...]
- powl
- pthread_barrier[...]
pthread_mutexattr_getrobust
pthread_mutexattr_setrobust
pthread_mutex_consistent
@@ -1416,39 +1527,22 @@ also IEEE Std 1003.1-2008 (POSIX.1-2008).</para>
pthread_rwlock_timedrdlock
pthread_rwlock_timedwrlock
putmsg
- reminderl
- remquol
- roundl
- scalblnl
- scalbnl
setnetent
- sigaltstack
sigtimedwait
- sinhl
- sinl
- sockatmark
- sqrtl
strcasecmp_l
strcoll_l
strfmon_l
strncasecmp_l
- strtold
strxfrm_l
- tanhl
- tanl
- tcgetsid
- tgammal
timer_getoverrun
tolower_l
toupper_l
towctrans_l
- truncl
ulimit
uselocale
waitid
wcscasecmp_l
wcsncasecmp_l
- wcstold
wcsxfrm_l
wctrans_l
wctype_l
@@ -1533,4 +1627,16 @@ return -1 and set errno to ENOSYS. <function>grantpt</function> and
<function>msgrcv</function> and <function>msgsnd</function> are only
available when cygserver is running.</para>
+<para>The Linux-specific function <function>quotactl</function> only implements
+what works on Windows: Windows only supports user block quotas on NTFS, no
+group quotas, no inode quotas, no time constraints.</para>
+
+<para><function>qsort_r</function> is available in both BSD and GNU flavors,
+depending on whether _BSD_SOURCE or _GNU_SOURCE is defined when compiling.</para>
+
+<para><function>basename</function> is available in both POSIX and GNU flavors,
+depending on whether libgen.h is included or not.</para>
+
</sect1>
+
+</chapter>
diff --git a/winsup/doc/programming.xml b/winsup/doc/programming.xml
index 4b65c4090..05ca12e90 100644
--- a/winsup/doc/programming.xml
+++ b/winsup/doc/programming.xml
@@ -9,4 +9,5 @@
<xi:include href="gdb.xml"/>
<xi:include href="dll.xml"/>
<xi:include href="windres.xml"/>
+ <xi:include href="gprof.xml"/>
</chapter>
diff --git a/winsup/doc/setup-env.xml b/winsup/doc/setup-env.xml
index ab3d50bdc..c2674a798 100644
--- a/winsup/doc/setup-env.xml
+++ b/winsup/doc/setup-env.xml
@@ -30,9 +30,8 @@ This is, of course, just an example. For the recognized settings of the
<para>
Locale support is controlled by the <envar>LANG</envar> and
-<envar>LC_xxx</envar> environment variables. Since Cygwin 1.7.2, all of
-them are honored and have a meaning. For a more detailed description see
-<xref linkend="setup-locale"></xref>.
+<envar>LC_xxx</envar> environment variables. For a more detailed description
+see <xref linkend="setup-locale"></xref>.
</para>
<para>
@@ -50,10 +49,11 @@ This is usually done by the batch file you're starting your shell with.
<para>
The <envar>HOME</envar> environment variable is used by many programs to
-determine the location of your home directory and we recommend that it be
-defined. This environment variable is also converted from Windows format
-when a Cygwin process first starts. It's usually set in the shell
-profile scripts in the /etc directory.
+determine the location of your home directory. This environment variable,
+if it exists, is converted from Windows format when a Cygwin process first
+starts. However, it's usually set in the shell profile scripts in the /etc
+directory, and it's <emphasis role='bold'>not</emphasis> recommended to set
+the variable in your Windows environment.
</para>
<para>
@@ -70,9 +70,16 @@ first starts. Most Cygwin applications do not make use of the
<function>dlopen ()</function> call and do not need this variable.
</para>
+<para>The <envar>GMON_OUT_PREFIX</envar> environment variable is helpful
+in some situations when profiling Cygwin programs. For more information,
+see <xref linkend="gprof-fork"></xref>. Only software developers with a
+need to profile their programs have a use for this variable.
+</para>
+
<para>
In addition to <envar>PATH</envar>, <envar>HOME</envar>,
-and <envar>LD_LIBRARY_PATH</envar>, there are three other environment
+<envar>LD_LIBRARY_PATH</envar>, and <envar>GMON_OUT_PREFIX</envar>,
+there are three other environment
variables which, if they exist in the Windows environment, are
converted to UNIX format: <envar>TMPDIR</envar>, <envar>TMP</envar>,
and <envar>TEMP</envar>. The first is not set by default in the
diff --git a/winsup/doc/setup-files.xml b/winsup/doc/setup-files.xml
index 3fc4d0ccb..35aeb45f5 100644
--- a/winsup/doc/setup-files.xml
+++ b/winsup/doc/setup-files.xml
@@ -8,18 +8,16 @@
To set up bash so that cut and paste work properly, click on the
"Properties" button of the window, then on the "Misc" tab. Make sure
that "QuickEdit mode" and "Insert mode" are checked. These settings
-will be remembered next time you run bash from that shortcut. Similarly
-you can set the working directory inside the "Program" tab. The entry
-"%HOME%" is valid, but requires that you set <envar>HOME</envar> in
-the Windows environment.
+will be remembered next time you run bash from that shortcut.
</para>
<para>
-Your home directory should contain three initialization files
-that control the behavior of bash. They are
-<filename>.profile</filename>, <filename>.bashrc</filename> and
-<filename>.inputrc</filename>. The Cygwin base installation creates
-stub files when you start bash for the first time.</para>
+Your home directory should contain three initialization files that
+control the behavior of bash. They are <filename>.profile</filename>,
+<filename>.bashrc</filename> and <filename>.inputrc</filename>.
+The Cygwin base installation creates stub files when you start bash
+for the first time.
+</para>
<para>
<filename>.profile</filename> (other names are also valid, see the bash man
diff --git a/winsup/doc/setup-locale.xml b/winsup/doc/setup-locale.xml
index de0532f62..ebde7a257 100644
--- a/winsup/doc/setup-locale.xml
+++ b/winsup/doc/setup-locale.xml
@@ -60,11 +60,10 @@ provided by the gettext package under Cygwin.</para>
<para>
At application startup, the application's locale is set to the default
-"C" or "POSIX" locale. Under Cygwin 1.7.2 and later, this locale defaults
-to the ASCII character set on the application level. If you want to stick
-to the "C" locale and only change to another charset, you can define this
-by setting one of the locale environment variables to "C.charset". For
-instance</para>
+"C" or "POSIX" locale. This locale defaults to the ASCII character set
+on the application level. If you want to stick to the "C" locale and only
+change to another charset, you can define this by setting one of the locale
+environment variables to "C.charset". For instance</para>
<screen>
"C.ISO-8859-1"
@@ -117,10 +116,9 @@ interoperability with applications running in the default "C.UTF-8" locale.
</para>
<para>
-Starting with Cygwin 1.7.2, the language and territory are used to
-fetch locale-dependent information from Windows. If the language and
-territory are not known to Windows, the <function>setlocale</function>
-function fails.</para>
+The language and territory are used to fetch locale-dependent information
+from Windows. If the language and territory are not known to Windows, the
+<function>setlocale</function> function fails.</para>
<para>The following modifiers are recognized. Any other modifier is simply
ignored for now.</para>
@@ -181,10 +179,10 @@ Assume that you've set one of the aforementioned environment variables to some
valid POSIX locale value, other than "C" and "POSIX". Assume further that
you're living in Japan. You might want to use the language code "ja" and the
territory "JP", thus setting, say, <envar>LANG</envar> to "ja_JP". You didn't
-set a character set, so what will Cygwin use now? Starting with Cygwin 1.7.2,
-the default character set is determined by the default Windows ANSI codepage
-for this language and territory. Cygwin uses a character set which is the
-typical Unix-equivalent to the Windows ANSI codepage. For instance:</para>
+set a character set, so what will Cygwin use now? The default character set
+is determined by the default Windows ANSI codepage for this language and
+territory. Cygwin uses a character set which is the typical Unix-equivalent
+to the Windows ANSI codepage. For instance:</para>
<screen>
"en_US" ISO-8859-1
@@ -307,25 +305,9 @@ environment, if it's different from the UTF-8 charset.</para>
consist of valid ASCII characters, and only of uppercase letters, digits, and
the underscore for maximum portability.</para></note>
-<para>Symbolic links, too, may pose a problem when switching charsets on
-the fly. A symbolic link contains the filename of the target file the
-symlink points to. When a symlink had been created with older versions
-of Cygwin, the current ANSI or OEM character set had been used to store
-the target filename, dependent on the old <envar>CYGWIN</envar>
-environment variable setting <envar>codepage</envar> (see <xref
-linkend="cygwinenv-removed-options"></xref>. If the target filename
-contains non-ASCII characters and you use another character set than
-your default ANSI/OEM charset, the target filename of the symlink is now
-potentially an invalid character sequence in the new character set.
-This behaviour is not different from the behaviour in other Operating
-Systems. So, if you suddenly can't access a symlink anymore which
-worked all these years before, maybe it's because you switched to
-another character set. This doesn't occur with symlinks created with
-Cygwin 1.7 or later. </para>
-
<para>Another problem you might encounter is that older versions of
Windows did not install all charsets by default. If you are running
-Windows XP or older, you can open the "Regional and Language Options"
+Windows XP or 2003, you can open the "Regional and Language Options"
portion of the Control Panel, select the "Advanced" tab, and select
entries from the "Code page conversion tables" list. The following
entries are useful to cygwin: 932/SJIS, 936/GBK, 949/EUC-KR, 950/Big5,
diff --git a/winsup/doc/setup-maxmem.xml b/winsup/doc/setup-maxmem.xml
index 1f5ee31a6..d5e5b9913 100644
--- a/winsup/doc/setup-maxmem.xml
+++ b/winsup/doc/setup-maxmem.xml
@@ -9,12 +9,13 @@ Cygwin's heap is extensible. However, it does start out at a fixed size
and attempts to extend it may run into memory which has been previously
allocated by Windows. In some cases, this problem can be solved by
changing a field in the file header which is utilized by Cygwin since
-version 1.7.10 to keep the initial size of the application heap. If the
-field contains 0, which is the default, the application heap defaults to
-a size of 384 Megabyte. If the field is set to any other value between 4 and
-2048, Cygwin tries to reserve as much Megabytes for the application heap.
-The field used for this is the "LoaderFlags" field in the NT-specific
-PE header structure (<literal>(IMAGE_NT_HEADER)->OptionalHeader.LoaderFlags</literal>).</para>
+to keep the initial size of the application heap. If the field contains 0,
+which is the default, the application heap defaults to a size of 384 Megabyte
+on 32 bit Cygwin, 512 Megabyte on 64 bit Cygwin. If the field is set to any
+other value between 4 and 2048, Cygwin tries to reserve as much Megabytes
+for the application heap. The field used for this is the "LoaderFlags" field
+in the NT-specific PE header structure
+(<literal>(IMAGE_NT_HEADER)->OptionalHeader.LoaderFlags</literal>).</para>
<para>
This value can be changed for any executable by using a more recent version
@@ -42,25 +43,4 @@ up to 3 GB per process. See the Microsoft article
for more information.
</para>
-<note>
-<para>
-Older Cygwin releases only supported a global registry setting to
-change the initial heap size for all Cygwin processes. This setting is
-not used anymore. However, if you're running an older Cygwin release
-than 1.7.10, you can add the <literal>DWORD</literal> value
-<literal>heap_chunk_in_mb</literal> and set it to the desired memory limit
-in decimal MB. You have to stop all Cygwin processes for this setting to
-have any effect. It is preferred to do this in Cygwin using the
-<command>regtool</command> program included in the Cygwin package.
-(see <xref linkend="regtool"></xref>) This example sets the memory limit
-to 1024 MB for all Cygwin processes (use HKCU instead of HKLM if you
-want to set this only for the current user):
-
-<screen>
-$ regtool -i set /HKLM/Software/Cygwin/heap_chunk_in_mb 1024
-$ regtool -v list /HKLM/Software/Cygwin
-</screen>
-</para>
-</note>
-
</sect1>
diff --git a/winsup/doc/setup-net.xml b/winsup/doc/setup-net.xml
index 877489b9c..c66fe1f42 100644
--- a/winsup/doc/setup-net.xml
+++ b/winsup/doc/setup-net.xml
@@ -8,11 +8,25 @@
<sect1 id="internet-setup">
<title>Internet Setup</title>
<para>To install the Cygwin net release, go to <ulink
-url="http://cygwin.com/">http://cygwin.com/</ulink> and click on <ulink
-url="http://cygwin.com/setup.exe">"Install Cygwin Now!"</ulink>. This will
-download a GUI installer called <command>setup.exe</command> which can
-be run to download a complete cygwin installation via the internet.
-Follow the instructions on each screen to install Cygwin.
+url="https://cygwin.com/"/> and run either
+<ulink url="https://cygwin.com/setup-x86.exe">setup-x86.exe</ulink>
+to install the 32 bit version of Cygwin, or
+<ulink url="https://cygwin.com/setup-x86_64.exe">setup-x86_64.exe</ulink>
+to install the 64 bit version of Cygwin. This will download a GUI
+installer which can be run to download a complete cygwin installation
+via the internet. Follow the instructions on each screen to install Cygwin.
+</para>
+
+<para>
+<note>
+For easier reading the installer is called <command>setup.exe</command>
+throughout the following sections. This refers likewise to both
+installer applications,
+<ulink url="https://cygwin.com/setup-x86.exe">setup-x86.exe</ulink>
+for 32 bit, as well as
+<ulink url="https://cygwin.com/setup-x86_64.exe">setup-x86_64.exe</ulink>
+for 64 bit. Apart from the target architecture they are the same thing.
+</note>
</para>
<para>
@@ -20,8 +34,17 @@ The <command>setup.exe</command> installer is designed to be easy
for new users to understand while remaining flexible for the
experienced. The volunteer development team is constantly working
on <command>setup.exe</command>; before requesting a new feature,
-check the wishlist in the <ulink url="http://sourceware.org/cgi-bin/cvsweb.cgi/setup/README?cvsroot=cygwin-apps&amp;rev=2">CVS <literal>README</literal>
-</ulink>. It may already be present in the CVS version!
+check the wishlist in the
+<ulink url="https://sourceware.org/git/gitweb.cgi?p=cygwin-setup.git;a=blob_plain;f=README;hb=HEAD">Git <literal>README</literal>
+</ulink>. It may already be present in the Git version!
+</para>
+
+<para>
+On Windows Vista and later, <command>setup.exe</command> will check by
+default if it runs with administrative privileges and, if not, will try
+to elevate the process. If you want to avoid this behaviour and install
+under an unprivileged account just for your own usage, run
+<command>setup.exe</command> with the <literal>--no-admin</literal> option.
</para>
<para>
@@ -30,9 +53,7 @@ most installations, you can get a working minimal Cygwin environment
installed by simply clicking the <literal>Next</literal> button
at each page. The only exception to this is choosing a Cygwin mirror,
which you can choose by experimenting with those listed at
-<ulink url="http://cygwin.com/mirrors.html">
-http://cygwin.com/mirrors.html
-</ulink>. For more details about each of page of the
+<ulink url="https://cygwin.com/mirrors.html"/>. For more details about each of page of the
<command>setup.exe</command> installation, read on below.
Please note that this guide assumes that you have a basic understanding
of Unix (or a Unix-like OS). If you are new to Unix, you will also want
@@ -126,8 +147,8 @@ authorization for proxy servers.
<para>
Since there is no way of knowing from where you will be downloading
Cygwin, you need to choose at least one mirror site. Cygwin mirrors
-are geographically distributed around the world; check the list at <ulink
-url="http://cygwin.com/mirrors.html">http://cygwin.com/mirrors.html</ulink>
+are geographically distributed around the world; check the list at
+<ulink url="https://cygwin.com/mirrors.html"/>
to find one near you. You can select multiple mirrors by holding down
<literal>CTRL</literal> and clicking on each one. If you have the URL of
an unlisted mirror (for example, if your organization has an internal Cygwin
@@ -141,9 +162,8 @@ For each selected mirror site, <command>setup.exe</command> downloads a
small text file called <literal>setup.bz2</literal> that contains a list
of packages available from that site along with some basic information about
each package which <command>setup.exe</command> parses and uses to create the
-chooser window. For details about the format of this file, see
-the <ulink url="http://sourceware.org/cygwin-apps/setup.html">
-setup.exe homepage</ulink>.
+chooser window. For details about the format of this file, see the
+<ulink url="https://sourceware.org/cygwin-apps/setup.html">setup.exe homepage</ulink>.
</para>
<para>
The chooser is the most complex part of <command>setup.exe</command>.
@@ -238,7 +258,7 @@ scripts to finish correctly setting up installed packages. Since each
script is run separately, several windows may pop up. If you are
interested in what is being done, see the Cygwin Package Contributor's
Guide at <ulink
-url="http://cygwin.com/setup.html">http://cygwin.com/setup.html</ulink>
+url="https://cygwin.com/setup.html"/>
When the last post-install script is completed, <command>setup.exe</command>
will display a box announcing the completion. A few packages, such as
the OpenSSH server, require some manual site-specific configuration.
@@ -255,7 +275,7 @@ HTTP instead of FTP). If you notice something is not working after
running setup, you can check the <command>setup.exe</command> log file
at <literal>/var/log/setup.log.full</literal>. Make a backup of this
file before running <command>setup.exe</command> again, and follow the
-steps for <ulink url="http://cygwin.com/problems.html">Reporting
+steps for <ulink url="https://cygwin.com/problems.html">Reporting
Problems with Cygwin</ulink>.
</para>
</sect2>
diff --git a/winsup/doc/specialnames.xml b/winsup/doc/specialnames.xml
index 543a4f127..d67d484c7 100644
--- a/winsup/doc/specialnames.xml
+++ b/winsup/doc/specialnames.xml
@@ -50,10 +50,9 @@ to be readable by the $USER user account itself.</para>
<sect2 id="pathnames-dosdevices"><title>Invalid filenames</title>
-<para>Filenames invalid under Win32 are not necessarily invalid
-under Cygwin since release 1.7.0. There are a few rules which
-apply to Windows filenames. Most notably, DOS device names like
-<filename>AUX</filename>, <filename>COM1</filename>,
+<para>Filenames invalid under Win32 are not necessarily invalid under Cygwin.
+There are a few rules which apply to Windows filenames. Most notably, DOS
+device names like <filename>AUX</filename>, <filename>COM1</filename>,
<filename>LPT1</filename> or <filename>PRN</filename> (to name a few)
cannot be used as filename or extension in a native Win32 application.
So filenames like <filename>prn.txt</filename> or <filename>foo.aux</filename>
@@ -95,12 +94,12 @@ can create and access files with trailing dots and spaces without problems.
<para>An exception from this rule are some network filesystems (NetApp,
NWFS) which choke on these filenames. They return with an error like
-"No such file or directory" when trying to create such files. Starting
-with Cygwin 1.7.6, Cygwin recognizes these filesystems and works around
-this problem by applying the same rule as for the other forbidden characters.
-Leading spaces and trailing dots and spaces will be converted to UNICODE
-characters in the private use area. This behaviour can be switched on
-explicitely for a filesystem or a directory tree by using the mount option
+"No such file or directory" when trying to create such files. Cygwin
+recognizes these filesystems and works around this problem by applying
+the same rule as for the other forbidden characters. Leading spaces and
+trailing dots and spaces will be converted to UNICODE characters in the
+private use area. This behaviour can be switched on explicitely for a
+filesystem or a directory tree by using the mount option
<literal>dos</literal>.</para>
</sect2>
@@ -227,11 +226,8 @@ semaphores, shared memory, and message queues, so a system without a real
</para>
<para>Apart from that, Cygwin automatically simulates POSIX devices
-internally. Up to Cygwin 1.7.11, these devices couldn't be seen with the
-command <command>ls /dev/</command> although commands such as
-<command>ls /dev/tty</command> worked fine. Starting with Cygwin 1.7.12,
-the <filename>/dev</filename> directory is automagically populated with
-existing POSIX devices by Cygwin in a way comparable with a
+internally. The <filename>/dev</filename> directory is automagically
+populated with existing POSIX devices by Cygwin in a way comparable with a
<ulink url="http://en.wikipedia.org/wiki/Udev">udev</ulink> based virtual
<filename>/dev</filename> directory under Linux.</para>
@@ -245,15 +241,13 @@ Cygwin supports the following character devices commonly found on POSIX systems:
/dev/full
/dev/console Pseudo device name for the current console window of a session.
- Up to Cygwin 1.7.9, this was the only name for a console.
- Different consoles were indistinguishable.
Cygwin's /dev/console is not quite comparable with the console
device on UNIX machines.
-/dev/cons0 Starting with Cygwin 1.7.10, Console sessions are numbered from
-/dev/cons1 /dev/cons0 upwards. Console device names are pseudo device
-... names, only accessible from processes within this very console
- session. This is due to a restriction in Windows.
+/dev/cons0 Console sessions are numbered from /dev/cons0 upwards.
+/dev/cons1 Console device names are pseudo device names, only accessible
+... from processes within this very console session. This is due
+ to a restriction in Windows.
/dev/tty The current controlling tty of a session.
diff --git a/winsup/doc/textbinary.xml b/winsup/doc/textbinary.xml
index 112042f82..dbc540aea 100644
--- a/winsup/doc/textbinary.xml
+++ b/winsup/doc/textbinary.xml
@@ -146,7 +146,7 @@ in your project, like this:</para>
$ gcc my_tiny_app.c /lib/binmode.o -o my_tiny_app
</screen>
-<para>Starting with Cygwin 1.7.7, you can use the even simpler:</para>
+<para>Even simpler:</para>
<screen>
$ gcc my_tiny_app.c -lbinmode -o my_tiny_app
diff --git a/winsup/doc/using.xml b/winsup/doc/using.xml
index 1795acccd..3ec26707b 100644
--- a/winsup/doc/using.xml
+++ b/winsup/doc/using.xml
@@ -16,6 +16,6 @@ knowledge of standard UNIX commands.</para>
<xi:include href="cygwinenv.xml"/>
<xi:include href="ntsec.xml"/>
<xi:include href="cygserver.xml"/>
- <xi:include href="../utils/utils.xml"/>
+ <xi:include href="utils.xml"/>
<xi:include href="effectively.xml"/>
</chapter>
diff --git a/winsup/utils/utils.xml b/winsup/doc/utils.xml
index f3539239a..8c5a619b8 100644
--- a/winsup/utils/utils.xml
+++ b/winsup/doc/utils.xml
@@ -13,25 +13,35 @@
identically. All of the Cygwin command-line utilities support the
<literal>--help</literal> and <literal>--version</literal> options. </para>
- <sect2 id="cygcheck">
- <title>cygcheck</title>
-
- <screen>
-Usage: cygcheck [-v] [-h] PROGRAM
- cygcheck -c [-d] [PACKAGE]
- cygcheck -s [-r] [-v] [-h]
- cygcheck -k
- cygcheck -f FILE [FILE]...
- cygcheck -l [PACKAGE]...
- cygcheck -p REGEXP
- cygcheck --delete-orphaned-installation-keys
- cygcheck --enable-unique-object-names Cygwin-DLL
- cygcheck --disable-unique-object-names Cygwin-DLL
- cygcheck --show-unique-object-names Cygwin-DLL
- cygcheck -h
-
-List system information, check installed packages, or query package database.
-
+ <refentry id="cygcheck">
+ <refmeta>
+ <refentrytitle>cygcheck</refentrytitle>
+ <manvolnum>1</manvolnum>
+ <refmiscinfo class="manual">Cygwin Utilities</refmiscinfo>
+ </refmeta>
+
+ <refnamediv>
+ <refname>cygcheck</refname>
+ <refpurpose>List system information, check installed packages, or query package database</refpurpose>
+ </refnamediv>
+
+ <refsynopsisdiv>
+ <screen>
+cygcheck [-v] [-h] PROGRAM
+cygcheck -c [-d] [PACKAGE]
+cygcheck -s [-r] [-v] [-h]
+cygcheck -k
+cygcheck -f FILE [FILE]...
+cygcheck -l [PACKAGE]...
+cygcheck -p REGEXP
+cygcheck --delete-orphaned-installation-keys
+cygcheck -h
+ </screen>
+ </refsynopsisdiv>
+
+ <refsect1>
+ <title>Options</title>
+ <screen>
At least one command option or a PROGRAM is required, as shown above.
PROGRAM list library (DLL) dependencies of PROGRAM
@@ -50,15 +60,6 @@ At least one command option or a PROGRAM is required, as shown above.
Delete installation keys of old, now unused
installations from the registry. Requires the right
to change the registry.
- --enable-unique-object-names Cygwin-DLL
- --disable-unique-object-names Cygwin-DLL
- --show-unique-object-names Cygwin-DLL
- Enable, disable, or show the setting of the
- \"unique object names\" setting in the Cygwin DLL
- given as argument to this option. The DLL path must
- be given as valid Windows(!) path.
- See the users guide for more information.
- If you don't know what this means, don't change it.
-v, --verbose produce more verbose output
-h, --help annotate output with explanatory comments when given
with another command, otherwise print this help
@@ -68,7 +69,10 @@ Note: -c, -f, and -l only report on packages that are currently installed. To
search all official Cygwin packages use -p instead. The -p REGEXP matches
package names, descriptions, and names of files/paths within all packages.
</screen>
+ </refsect1>
+<refsect1>
+ <title>Description</title>
<para> The <command>cygcheck</command> program is a diagnostic utility for
dealing with Cygwin programs. If you are familiar with
<command>dpkg</command> or <command>rpm</command>,
@@ -141,7 +145,7 @@ $ cygcheck -l less
of packages. This feature requires an active internet connection, since
it must query the <literal>cygwin.com</literal> web site. In fact, it is
equivalent to the search that is available on the <ulink
- url="http://cygwin.com/packages/">Cygwin package listing</ulink>
+ url="https://cygwin.com/packages/">Cygwin package listing</ulink>
page.</para>
<para>For example, perhaps you are getting an error because you are missing
@@ -211,66 +215,34 @@ coreutils-5.3.0-6 GNU core utilities (includes fileutils, sh-utils and t
which the installation doesn't exist anymore. To get rid of these
orphaned registry entries, use the <command>cygcheck
--delete-orphaned-installation-keys</command> command.</para>
+ </refsect1>
- <para> Each Cygwin DLL generates a key value from its installation path.
- This value is not only stored in the registry, it's also used to generate
- global object names used for interprocess communication. This keeps
- different Cygwin installations separate. Processes running under a Cygwin
- DLL installed in C:\cygwin don't see processes running under a Cygwin DLL
- installed in C:\Program Files\cygwin. This allows running multiple
- versions of Cygwin DLLs without these versions to interfere with each
- other, or to run small third-party installations for a specific purpose
- independently from a Cygwin net distribution. </para>
-
- <para> For debugging purposes it could be desired that the various Cygwin
- DLLs use the same key, independently from their installation paths. If
- the DLLs have different versions, trying to run processes under these
- DLLs concurrently will result in error messages like this one:</para>
-
- <screen>
-*** shared version mismatch detected - 0x8A88009C/0x75BE0074.
-This problem is probably due to using incompatible versions of the Cygwin DLL.
-Search for cygwin1.dll using the Windows Start->Find/Search facility
-and delete all but the most recent version. The most recent version *should*
-reside in x:\\cygwin\\bin, where 'x' is the drive on which you have
-installed the cygwin distribution. Rebooting is also suggested if you
-are unable to find another Cygwin DLL.
-</screen>
+ </refentry>
- <para> To disable the usage of a unique key value of a certain Cygwin DLL,
- use the <command>cygcheck --disable-unique-object-names
- Cygwin-DLL</command> command. <literal>Cygwin-DLL</literal> is the
- Windows path (*not* a Cygwin POSIX path) to the DLL for which you want to
- disable this feature. Note that you have to stop all Cygwin processes
- running under this DLL, before you're allowed to change this setting. For
- instance, run <command>cygcheck</command> from a DOS command line for
- this purpose.</para>
+ <refentry id="cygpath">
+ <refmeta>
+ <refentrytitle>cygpath</refentrytitle>
+ <manvolnum>1</manvolnum>
+ <refmiscinfo class="manual">Cygwin Utilities</refmiscinfo>
+ </refmeta>
- <para>To re-enable the usage of a unique key, use the <command>cygcheck
- --enable-unique-object-names Cygwin-DLL</command> command. This option
- has the same characteristics as the
- <literal>--disable-unique-object-names</literal> option</para>
-
- <para>Finally, you can use <command>cygcheck --show-unique-object-names
- Cygwin-DLL</command> to find out if the given Cygwin DLL use unique
- object names or not. In contrast to the <literal>--disable-...</literal>
- and <literal>--enable-...</literal> options, the
- <literal>--show-unique-object-names</literal> option also works for
- Cygwin DLLs which are currently in use.</para>
-
- </sect2>
-
- <sect2 id="cygpath">
- <title>cygpath</title>
+ <refnamediv>
+ <refname>cygpath</refname>
+ <refpurpose>Convert Unix and Windows format paths, or output system path information</refpurpose>
+ </refnamediv>
+ <refsynopsisdiv>
+ <screen>
+cygpath (-d|-m|-u|-w|-t TYPE) [-f FILE] [OPTION]... NAME...
+cygpath [-c HANDLE]
+cygpath [-ADHOPSW]
+cygpath [-F ID]
+ </screen>
+ </refsynopsisdiv>
+
+ <refsect1>
+ <title>Options</title>
<screen>
-Usage: cygpath (-d|-m|-u|-w|-t TYPE) [-f FILE] [OPTION]... NAME...
- cygpath [-c HANDLE]
- cygpath [-ADHOPSW]
- cygpath [-F ID]
-
-Convert Unix and Windows format paths, or output system path information
-
Output type options:
-d, --dos print DOS (short) form of NAMEs (C:\PROGRA~1\)
@@ -285,6 +257,8 @@ Path conversion options:
-a, --absolute output absolute path
-l, --long-name print Windows long form of NAMEs (with -w, -m only)
-p, --path NAME is a PATH list (i.e., '/bin:/usr/bin')
+ -U, --proc-cygdrive Emit /proc/cygdrive path instead of cygdrive prefix
+ when converting Windows path to UNIX path.
-s, --short-name print DOS (short) form of NAMEs (with -w, -m only)
-C, --codepage CP print DOS, Windows, or mixed pathname in Windows
codepage CP. CP can be a numeric codepage identifier,
@@ -312,7 +286,10 @@ Other options:
-h, --help output usage information and exit
-V, --version output version information and exit
</screen>
+ </refsect1>
+ <refsect1>
+ <title>Description</title>
<para>The <command>cygpath</command> program is a utility that converts
Windows native filenames to Cygwin POSIX-style pathnames and vice versa.
It can be used when a Cygwin program needs to pass a file name to a
@@ -347,6 +324,16 @@ Other options:
graphical tools like Windows Explorer might expect pathnames in the
current ANSI codepage.</para>
+ <para>The <literal>-U</literal> option allows to use cygpath to create
+ unambiguous Unix paths pointing outside the Cygwin tree andf thus having
+ no explicit POSIX path. Those paths usually use the cygdrive prefix.
+ However, the cygdrive prefix can be changed by the user, so symbolic links
+ created using the cygdrive prefix are not foolproof. With
+ <literal>-U</literal> cygpath will generate such paths prepended by the
+ virtual <pathname>/proc/cygdrive</pathname> symbolic link, which will
+ never change, so the created path is safe against changing the cygdrive
+ prefix.</para>
+
<para>The <literal>-C</literal> option takes a single parameter:</para>
<itemizedlist spacing="compact">
<listitem>
@@ -416,23 +403,39 @@ explorer $XPATH &
(CDBurn area). By default the output is in UNIX (POSIX) format; use the
<literal>-w</literal> or <literal>-d</literal> options to get other
formats.</para>
+ </refsect1>
+ </refentry>
+
+ <refentry id="dumper">
+ <refmeta>
+ <refentrytitle>dumper</refentrytitle>
+ <manvolnum>1</manvolnum>
+ <refmiscinfo class="manual">Cygwin Utilities</refmiscinfo>
+ </refmeta>
+
+ <refnamediv>
+ <refname>dumper</refname>
+ <refpurpose>Dump core from WIN32PID to FILENAME.core</refpurpose>
+ </refnamediv>
+
+ <refsynopsisdiv>
+ <screen>
+dumper [OPTION] FILENAME WIN32PID
+ </screen>
+ </refsynopsisdiv>
- </sect2>
-
- <sect2 id="dumper">
- <title>dumper</title>
-
- <screen>
-Usage: dumper [OPTION] FILENAME WIN32PID
-
-Dump core from WIN32PID to FILENAME.core
-
+ <refsect1>
+ <title>Options</title>
+ <screen>
-d, --verbose be verbose while dumping
-h, --help output help information and exit
-q, --quiet be quiet while dumping (default)
-V, --version output version information and exit
</screen>
+ </refsect1>
+ <refsect1>
+ <title>Description</title>
<para>The <command>dumper</command> utility can be used to create a core
dump of running Windows process. This core dump can be later loaded to
<command>gdb</command> and analyzed. One common way to use
@@ -460,18 +463,31 @@ error_start=x:\path\to\dumper.exe
dump on one machine and try to debug it on another, you'll need to place
identical copies of the executable and dlls in the same directories as on
the machine where the core dump was created. </para>
+ </refsect1>
+ </refentry>
+
+ <refentry id="getconf">
+ <refmeta>
+ <refentrytitle>getconf</refentrytitle>
+ <manvolnum>1</manvolnum>
+ <refmiscinfo class="manual">Cygwin Utilities</refmiscinfo>
+ </refmeta>
+
+ <refnamediv>
+ <refname>getconf</refname>
+ <refpurpose>Get configuration values</refpurpose>
+ </refnamediv>
+
+ <refsynopsisdiv>
+ <screen>
+getconf [-v specification] variable_name [pathname]
+getconf -a [pathname]
+ </screen>
+ </refsynopsisdiv>
- </sect2>
-
- <sect2 id="getconf">
- <title>getconf</title>
-
- <screen>
-Usage: getconf [-v specification] variable_name [pathname]
- getconf -a [pathname]
-
-Get configuration values
-
+ <refsect1>
+ <title>Options</title>
+ <screen>
-v specification Indicate specific version for which configuration
values shall be fetched.
-a, --all Print all known configuration values
@@ -481,7 +497,10 @@ Other options:
-h, --help This text
-V, --version Print program version and exit
</screen>
+ </refsect1>
+ <refsect1>
+ <title>Description</title>
<para>The <command>getconf</command> utility prints the value of the
configuration variable specified by <literal>variable_name</literal>. If
no <literal>pathname</literal> is given, <command>getconf</command>
@@ -508,41 +527,60 @@ Other options:
<para>Use the <literal>-a</literal> option to print a list of all available
configuration variables for the system, or given
<literal>pathname</literal>, and their values.</para>
+ </refsect1>
+ </refentry>
+
+ <refentry id="getfacl">
+ <refmeta>
+ <refentrytitle>getfacl</refentrytitle>
+ <manvolnum>1</manvolnum>
+ <refmiscinfo class="manual">Cygwin Utilities</refmiscinfo>
+ </refmeta>
+
+ <refnamediv>
+ <refname>getfacl</refname>
+ <refpurpose>Display file and directory access control lists (ACLs)</refpurpose>
+ </refnamediv>
+
+ <refsynopsisdiv>
+ <screen>
+getfacl [-adceEn] FILE [FILE2...]
+ </screen>
+ </refsynopsisdiv>
- </sect2>
-
- <sect2 id="getfacl">
- <title>getfacl</title>
-
- <screen>
-Usage: getfacl [-adn] FILE [FILE2...]
-
-Display file and directory access control lists (ACLs).
-
- -a, --all display the filename, the owner, the group, and
- the ACL of the file
- -d, --dir display the filename, the owner, the group, and
- the default ACL of the directory, if it exists
- -h, --help output usage information and exit
- -n, --noname display user and group IDs instead of names
- -V, --version output version information and exit
+ <refsect1>
+ <title>Options</title>
+ <screen>
+ -a, --access display the file access control list only
+ -d, --default display the default access control list only
+ -c, --omit-header do not display the comment header
+ -e, --all-effective print all effective rights
+ -E, --no-effective print no effective rights
+ -n, --numeric print numeric user/group identifiers
+ -V, --version print version and exit
+ -h, --help this help text
When multiple files are specified on the command line, a blank
line separates the ACLs for each file.
</screen>
+ </refsect1>
+ <refsect1>
+ <title>Description</title>
<para> For each argument that is a regular file, special file or directory,
<command>getfacl</command> displays the owner, the group, and the ACL.
For directories <command>getfacl</command> displays additionally the
default ACL. With no options specified, <command>getfacl</command>
- displays the filename, the owner, the group, and both the ACL and the
- default ACL, if it exists. For more information on Cygwin and Windows
- ACLs, see <xref linkend="ntsec"/> in the Cygwin User's Guide. The format
+ displays the filename, the owner, the group, the setuid (s), setgid (s),
+ and sticky (t) bits if available, and both the ACL and the default ACL,
+ if it exists. For more information on Cygwin and Windows ACLs, see
+ <xref linkend="ntsec"/> in the Cygwin User's Guide. The format
for ACL output is as follows:
<screen>
# file: filename
# owner: name or uid
# group: name or uid
+ # flags: sst
user::perm
user:name or uid:perm
group::perm
@@ -557,24 +595,41 @@ line separates the ACLs for each file.
default:other:perm
</screen>
</para>
- </sect2>
-
- <sect2 id="kill">
- <title>kill</title>
-
- <screen>
-Usage: kill [-f] [-signal] [-s signal] pid1 [pid2 ...]
- kill -l [signal]
-
-Send signals to processes
+ </refsect1>
+ </refentry>
+
+ <refentry id="kill">
+ <refmeta>
+ <refentrytitle>kill</refentrytitle>
+ <manvolnum>1</manvolnum>
+ <refmiscinfo class="manual">Cygwin Utilities</refmiscinfo>
+ </refmeta>
+
+ <refnamediv>
+ <refname>kill</refname>
+ <refpurpose>Send signals to processes</refpurpose>
+ </refnamediv>
+
+ <refsynopsisdiv>
+ <screen>
+kill [-f] [-signal] [-s signal] pid1 [pid2 ...]
+kill -l [signal]
+ </screen>
+ </refsynopsisdiv>
+ <refsect1>
+ <title>Options</title>
+ <screen>
-f, --force force, using win32 interface if necessary
-l, --list print a list of signal names
-s, --signal send signal (use kill --list for a list)
-h, --help output usage information and exit
-V, --version output version information and exit
</screen>
+ </refsect1>
+ <refsect1>
+ <title>Description</title>
<para>The <command>kill</command> program allows you to send arbitrary
signals to other Cygwin programs. The usual purpose is to end a running
program from some other window when ^C won't work, but you can also send
@@ -628,6 +683,7 @@ SIGQUIT 3 quit
SIGILL 4 illegal instruction (not reset when caught)
SIGTRAP 5 trace trap (not reset when caught)
SIGABRT 6 used by abort
+SIGIOT 6 another name for SIGABRT
SIGEMT 7 EMT instruction
SIGFPE 8 floating point exception
SIGKILL 9 kill (cannot be caught or ignored)
@@ -657,17 +713,30 @@ SIGPWR 29 power failure
SIGUSR1 30 user defined signal 1
SIGUSR2 31 user defined signal 2
</screen>
+ </refsect1>
+ </refentry>
+
+ <refentry id="ldd">
+ <refmeta>
+ <refentrytitle>ldd</refentrytitle>
+ <manvolnum>1</manvolnum>
+ <refmiscinfo class="manual">Cygwin Utilities</refmiscinfo>
+ </refmeta>
+
+ <refnamediv>
+ <refname>ldd</refname>
+ <refpurpose>Print shared library dependencies</refpurpose>
+ </refnamediv>
+
+ <refsynopsisdiv>
+ <screen>
+ldd [OPTION]... FILE...
+ </screen>
+ </refsynopsisdiv>
- </sect2>
-
- <sect2 id="ldd">
- <title>ldd</title>
-
- <screen>
-Usage: ldd [OPTION]... FILE...
-
-Print shared library dependencies
-
+ <refsect1>
+ <title>Options</title>
+ <screen>
-h, --help print this help and exit
-V, --version print version information and exit
-r, --function-relocs process data and function relocations
@@ -677,23 +746,39 @@ Print shared library dependencies
-v, --verbose print all information
(currently unimplemented)
</screen>
+ </refsect1>
+ <refsect1>
+ <title>Description</title>
<para><command>ldd</command> prints the shared libraries (DLLs) an
executable or DLL is linked against. No modifying option is implemented
yet.</para>
-
- </sect2>
-
- <sect2 id="locale">
- <title>locale</title>
-
- <screen>
-Usage: locale [-amvhV]
- or: locale [-ck] NAME
- or: locale [-usfnU]
-
-Get locale-specific information.
-
+ </refsect1>
+ </refentry>
+
+ <refentry id="locale">
+ <refmeta>
+ <refentrytitle>locale</refentrytitle>
+ <manvolnum>1</manvolnum>
+ <refmiscinfo class="manual">Cygwin Utilities</refmiscinfo>
+ </refmeta>
+
+ <refnamediv>
+ <refname>locale</refname>
+ <refpurpose>Get locale-specific information</refpurpose>
+ </refnamediv>
+
+ <refsynopsisdiv>
+ <screen>
+locale [-amvhV]
+locale [-ck] NAME
+locale [-usfnU]
+ </screen>
+ </refsynopsisdiv>
+
+ <refsect1>
+ <title>Options</title>
+ <screen>
System information:
-a, --all-locales List all available supported locales
@@ -719,7 +804,10 @@ Other options:
-h, --help This text
-V, --version Print program version and exit
</screen>
+ </refsect1>
+ <refsect1>
+ <title>Description</title>
<para><command>locale</command> without parameters prints information about
the current locale environment settings.</para>
@@ -829,189 +917,254 @@ nostr="no"
messages-codeset="UTF-8"
bash$ locale noexpr
^[nN]
-</screen>
-
- </sect2>
-
- <sect2 id="mkgroup">
- <title>mkgroup</title>
-
- <screen>
-Usage: mkgroup [OPTION]...
+ </screen>
+ </refsect1>
+ </refentry>
+
+ <refentry id="minidumper">
+ <refmeta>
+ <refentrytitle>minidumper</refentrytitle>
+ <manvolnum>1</manvolnum>
+ <refmiscinfo class="manual">Cygwin Utilities</refmiscinfo>
+ </refmeta>
+
+ <refnamediv>
+ <refname>minidumper</refname>
+ <refpurpose>Write minidump from WIN32PID to FILENAME.dmp</refpurpose>
+ </refnamediv>
+
+ <refsynopsisdiv>
+ <screen>
+minidumper [OPTION] FILENAME WIN32PID
+ </screen>
+ </refsynopsisdiv>
-Print /etc/group file to stdout
+ <refsect1>
+ <title>Options</title>
+ <screen>
+-t, --type minidump type flags
+-n, --nokill don't terminate the dumped process
+-d, --verbose be verbose while dumping
+-h, --help output help information and exit
+-q, --quiet be quiet while dumping (default)
+-V, --version output version information and exit
+ </screen>
+ </refsect1>
+
+ <refsect1>
+ <title>Description</title>
+ <para>
+ The <command>minidumper</command> utility can be used to create a
+ minidump of a running Windows process. This minidump can be later
+ analysed using breakpad or Windows debugging tools.
+ </para>
+
+ <para>
+ <command>minidumper</command> can be used with cygwin's Just-In-Time
+ debugging facility in exactly the same way as <command>dumper</command>
+ (See <xref linkend="dumper"></xref>).
+ </para>
+
+ <para>
+ <command>minidumper</command> can also be started from the command line to
+ create a minidump of any running process. For compatibility with
+ <command>dumper</command> the target process is terminated after dumping
+ unless the <literal>-n</literal> option is given.
+ </para>
+ </refsect1>
+ </refentry>
+
+ <refentry id="mkgroup">
+ <refmeta>
+ <refentrytitle>mkgroup</refentrytitle>
+ <manvolnum>1</manvolnum>
+ <refmiscinfo class="manual">Cygwin Utilities</refmiscinfo>
+ </refmeta>
+
+ <refnamediv>
+ <refname>mkgroup</refname>
+ <refpurpose>Write /etc/group-like output to stdout</refpurpose>
+ </refnamediv>
+
+ <refsynopsisdiv>
+ <screen>
+mkgroup [OPTION]...
+ </screen>
+ </refsynopsisdiv>
+ <refsect1>
+ <title>Options</title>
+ <screen>
Options:
- -l,--local [machine[,offset]]
- print local groups with gid offset offset
- (from local machine if no machine specified)
- -L,--Local [machine[,offset]]
- ditto, but generate groupname with machine prefix
- -d,--domain [domain[,offset]]
- print domain groups with gid offset offset
- (from current domain if no domain specified)
- -D,--Domain [domain[,offset]]
- ditto, but generate groupname with machine prefix
- -c,--current print current group
- -C,--Current ditto, but generate groupname with machine or
- domain prefix
- -S,--separator char for -L, -D, -C use character char as domain\group
- separator in groupname instead of the default '\'
- -o,--id-offset offset change the default offset (10000) added to gids
- in domain or foreign server accounts.
- -g,--group groupname only return information for the specified group
- one of -l, -L, -d, -D must be specified, too
- -b,--no-builtin don't print BUILTIN groups
- -U,--unix grouplist additionally print UNIX groups when using -l or -L
- on a UNIX Samba server
- grouplist is a comma-separated list of groupnames
- or gid ranges (root,-25,50-100).
- (enumerating large ranges can take a long time!)
- -s,--no-sids (ignored)
- -u,--users (ignored)
- -h,--help print this message
- -V,--version print version information and exit
+ -l,--local [machine] Print local group accounts of \"machine\",
+ from local machine if no machine specified.
+ Automatically adding machine prefix for local
+ machine depends on settings in /etc/nsswitch.conf.
+ -L,--Local machine Ditto, but generate groupname with machine prefix.
+ -d,--domain [domain] Print domain groups,
+ from current domain if no domain specified.
+ -c,--current Print current group.
+ -S,--separator char For -L use character char as domain\\group
+ separator in groupname instead of default '+'.
+ -o,--id-offset offset Change the default offset (0x10000) added to gids
+ -g,--group groupname Only return information for the specified group.
+ One of -l, -d must be specified, too.
+ -b,--no-builtin Don't print BUILTIN groups.
+ -U,--unix grouplist Print UNIX groups when using -l on a UNIX Samba
+ server. Grouplist is a comma-separated list of
+ groupnames or gid ranges (root,-25,50-100).
+ Enumerating large ranges can take a long time!
+ -h,--help Print this message.
+ -v,--version Print version information and exit.
Default is to print local groups on stand-alone machines, plus domain
groups on domain controllers and domain member machines.
</screen>
-
- <para>The <command>mkgroup</command> program can be used to help configure
- Cygwin by creating a <filename>/etc/group</filename> file. Its use is
- essential to include Windows security information.</para>
-
- <para>The command is initially called by <command>setup.exe</command> to
- create a default <filename>/etc/group</filename>. This should be
- sufficient in most circumstances. However, especially when working in a
- multi-domain environment, you can use <command>mkgroup</command> manually
- to create a more complete <filename>/etc/group</filename> file for all
- domains. Especially when you have the same group name used on multiple
- machines or in multiple domains, you can use the <literal>-D</literal>,
- <literal>-L</literal> and <literal>-C</literal> options to create unique
- domain\group style groupnames.</para>
-
- <para>Note that this information is static. If you change the group
- information in your system, you'll need to regenerate the group file for
- it to have the new information.</para>
-
- <para>The <literal>-d/-D</literal> and <literal>-l/-L</literal> options
- allow you to specify where the information comes from, the local SAM of a
- machine or from the domain, or both. With the <literal>-d/-D</literal>
- options the program contacts a Domain Controller, which my be unreachable
- or have restricted access. Comma-separated from the machine or domain,
- you can specify an offset which is used as base added to the group's RID
- to compute the gid (offset + RID = gid). This allows you to create the
- same gids every time you re-run <command>mkgroup</command>. For very
- simple needs, an entry for the current user's group can be created by
- using the option <literal>-c</literal> or <literal>-C</literal>. If you
- want to use one of the <literal>-D</literal>, <literal>-L</literal> or
- <literal>-C</literal> options, but you don't like the backslash as
- domain/group separator, you can specify another separator using the
- <literal>-S</literal> option, for instance:</para>
+ </refsect1>
+
+ <refsect1>
+ <title>Description</title>
+ <para>Don't use this command to generate a local /etc/group file, unless you
+ really need one. See the Cygwin User's Guide for more information.
+ </para>
+
+ <para>The <command>mkgroup</command> program can be used to create a local
+ <filename>/etc/group</filename> file. Cygwin doesn't need this file,
+ because it reads group information from the Windows account databases,
+ but you can add an <filename>/etc/group</filename> file for instance, if
+ your machine is often disconnected from its domain controller.
+ </para>
+
+ <para>Note that this information is static, in contrast to the information
+ automatically gathered by Cygwin from the Windows account databases. If
+ you change the group information on your system, you'll need to regenerate
+ the group file for it to have the new information.</para>
+
+ <para>By default, the information generated by <command>mkgroup</command>
+ is equivalent to the information generated by Cygwin itself. The
+ <literal>-d</literal> and <literal>-l/-L</literal> options allow you to
+ specify where the information comes from, some domain, or the local SAM
+ of a machine. Note that you can only enumerate accounts from trusted
+ domains. Any non-trusted domain will be ignored. Access-restrictions
+ of your current account apply. The <literal>-l/-L</literal> when used
+ with a machine name, tries to contact that machine to enumerate local
+ groups of other machines, typically outside of domains. This scenario
+ cannot be covered by Cygwin's account automatism. If you want to use
+ the <literal>-L</literal> option, but you don't like the default
+ domain/group separator from <filename>/etc/nsswitch.conf</filename>,
+ you can specify another separator using the <literal>-S</literal> option,
+ for instance:</para>
<example id="utils-mkgroup-ex">
<title>Setting up group entry for current user with different
domain/group separator</title>
<screen>
-<prompt>$</prompt> <userinput>mkgroup -C -S+ &gt; /etc/group</userinput>
-<prompt>$</prompt> <userinput>cat /etc/group</userinput>
-DOMAIN+my_group:S-1-5-21-2913048732-1697188782-3448811101-1144:11144:
+<prompt>$</prompt> <userinput>mkgroup -L server1 -S= &gt; /etc/group</userinput>
</screen>
</example>
- <para>The <literal>-o</literal> option allows for special cases (such as
- multiple domains) where the GIDs might match otherwise. The
+ <para>For very simple needs, an entry for the current user's group can be
+ created by using the option <literal>-c</literal>.</para>
+
+ <para>The <literal>-o</literal> option allows for (unlikely) special cases
+ with multiple machines where the GIDs might match otherwise. The
<literal>-g</literal> option only prints the information for one group.
The <literal>-U</literal> option allows you to enumerate the standard
UNIX groups on a Samba machine. It's used together with <literal>-l
samba-server</literal> or <literal>-L samba-server</literal>. The normal
UNIX groups are usually not enumerated, but they can show up as a group
in <command>ls -l</command> output. </para>
+ </refsect1>
+ </refentry>
+
+ <refentry id="mkpasswd">
+ <refmeta>
+ <refentrytitle>mkpasswd</refentrytitle>
+ <manvolnum>1</manvolnum>
+ <refmiscinfo class="manual">Cygwin Utilities</refmiscinfo>
+ </refmeta>
+
+ <refnamediv>
+ <refname>mkpasswd</refname>
+ <refpurpose>Write /etc/passwd-like output to stdout</refpurpose>
+ </refnamediv>
+
+ <refsynopsisdiv>
+ <screen>
+mkpasswd [OPTIONS]...
+ </screen>
+ </refsynopsisdiv>
- </sect2>
-
- <sect2 id="mkpasswd">
- <title>mkpasswd</title>
-
- <screen>
-Usage: mkpasswd [OPTIONS]...
-
-Print /etc/passwd file to stdout
-
-Options:
-
- -l,--local [machine[,offset]]
- print local user accounts with uid offset offset
- (from local machine if no machine specified)
- -L,--Local [machine[,offset]]
- ditto, but generate username with machine prefix
- -d,--domain [domain[,offset]]
- print domain accounts with uid offset offset
- (from current domain if no domain specified)
- -D,--Domain [domain[,offset]]
- ditto, but generate username with domain prefix
- -c,--current print current user
- -C,--Current ditto, but generate username with machine or
- domain prefix
- -S,--separator char for -L, -D, -C use character char as domain\user
- separator in username instead of the default '\'
- -o,--id-offset offset change the default offset (10000) added to uids
- in domain or foreign server accounts.
- -u,--username username only return information for the specified user
- one of -l, -L, -d, -D must be specified, too
- -p,--path-to-home path use specified path instead of user account home dir
- or /home prefix
- -U,--unix userlist additionally print UNIX users when using -l or -L\
- on a UNIX Samba server
- userlist is a comma-separated list of usernames
- or uid ranges (root,-25,50-100).
- (enumerating large ranges can take a long time!)
- -s,--no-sids (ignored)
- -m,--no-mount (ignored)
- -g,--local-groups (ignored)
- -h,--help displays this message
- -V,--version version information and exit
+ <refsect1>
+ <title>Options</title>
+ <screen>
+ Options:
+
+ -l,--local [machine] Print local user accounts of \"machine\",
+ from local machine if no machine specified.
+ Automatically adding machine prefix for local
+ machine depends on settings in /etc/nsswitch.conf.
+ -L,--Local machine Ditto, but generate username with machine prefix.
+ -d,--domain [domain] Print domain accounts,
+ from current domain if no domain specified.
+ -c,--current Print current user.
+ -S,--separator char For -L use character char as domain\\user
+ separator in username instead of the default '+'.
+ -o,--id-offset offset Change the default offset (0x10000) added to uids
+ of foreign local machine accounts. Use with -l/-L.
+ -u,--username username Only return information for the specified user.
+ One of -l, -d must be specified, too
+ -b,--no-builtin Don't print BUILTIN users.
+ -p,--path-to-home path Use specified path instead of user account home dir
+ or /home prefix.
+ -U,--unix userlist Print UNIX users when using -l on a UNIX Samba
+ server. Userlist is a comma-separated list of
+ usernames or uid ranges (root,-25,50-100).
+ Enumerating large ranges can take a long time!
+ -h,--help Displays this message.
+ -V,--version Version information and exit.
Default is to print local accounts on stand-alone machines, domain accounts
on domain controllers and domain member machines.
</screen>
+ </refsect1>
+
+ <refsect1>
+ <title>Description</title>
+ <para>Don't use this command to generate a local /etc/passwd file, unless you
+ really need one. See the Cygwin User's Guide for more information.</para>
+
+ <para>The <command>mkpasswd</command> program can be used to create a
+ <filename>/etc/passwd</filename> file. Cygwin doesn't need this file,
+ because it reads user information from the Windows account databases,
+ but you can add an <filename>/etc/passwd</filename> file, for instance
+ if your machine is often disconnected from its domain controller.</para>
+
+ <para>Note that this information is static, in contrast to the information
+ automatically gathered by Cygwin from the Windows account databases. If
+ you change the user information on your system, you'll need to regenerate
+ the passwd file for it to have the new information.</para>
+
+ <para>By default, the information generated by <command>mkpasswd</command>
+ is equivalent to the information generated by Cygwin itself. The
+ <literal>-d</literal> and <literal>-l/-L</literal> options allow you to
+ specify where the information comes from, some domain, or the local SAM
+ of a machine. Note that you can only enumerate accounts from trusted
+ domains. Any non-trusted domain will be ignored. Access-restrictions
+ of your current account apply. The <literal>-l/-L</literal> when used
+ with a machine name, tries to contact that machine to enumerate local
+ groups of other machines, typically outside of domains. This scenario
+ cannot be covered by Cygwin's account automatism. If you want to use
+ the <literal>-L</literal> option, but you don't like the default
+ domain/group separator from <filename>/etc/nsswitch.conf</filename>,
+ you can specify another separator using the <literal>-S</literal> option,
+ analog to <command>mkgroup</command>.</para>
+
+ <para>For very simple needs, an entry for the current user can be created
+ by using the option <literal>-c</literal>.</para>
- <para>The <command>mkpasswd</command> program can be used to help configure
- Cygwin by creating a <filename>/etc/passwd</filename> from your system
- information. Its use is essential to include Windows security
- information. However, the actual passwords are determined by Windows, not
- by the content of <filename>/etc/passwd</filename>.</para>
-
- <para>The command is initially called by <command>setup.exe</command> to
- create a default <filename>/etc/passwd</filename>. This should be
- sufficient in most circumstances. However, especially when working in a
- multi-domain environment, you can use <command>mkpasswd</command>
- manually to create a more complete <filename>/etc/passwd</filename> file
- for all domains. Especially when you have the same user name used on
- multiple machines or in multiple domains, you can use the
- <literal>-D</literal>, <literal>-L</literal> and <literal>-C</literal>
- options to create unique domain\user style usernames.</para>
-
- <para>Note that this information is static. If you change the user
- information in your system, you'll need to regenerate the passwd file for
- it to have the new information.</para>
-
- <para>The <literal>-d/-D</literal> and <literal>-l/-L</literal> options
- allow you to specify where the information comes from, the local machine
- or the domain (default or given), or both. With the
- <literal>-d/-D</literal> options the program contacts the Domain
- Controller, which may be unreachable or have restricted access.
- Comma-separated from the machine or domain, you can specify an offset
- which is used as base added to the user's RID to compute the uid (offset
- + RID = uid). This allows to create the same uids every time you re-run
- <command>mkpasswd</command>. An entry for the current user can be created
- by using the option <literal>-c</literal> or <literal>-C</literal>. If
- you want to use one of the <literal>-D</literal>, <literal>-L</literal>
- or <literal>-C</literal> options, but you don't like the backslash as
- domain/group separator, you can specify another separator using the
- <literal>-S</literal> option, similar to the <command>mkgroup</command>.
- The <literal>-o</literal> option allows for special cases (such as
+ <para>The <literal>-o</literal> option allows for special cases (such as
multiple domains) where the UIDs might match otherwise. The
<literal>-p</literal> option causes <command>mkpasswd</command> to use
the specified prefix instead of the account home dir or <literal>/home/
@@ -1026,20 +1179,34 @@ on domain controllers and domain member machines.
to enumerate the standard UNIX users on a Samba machine. It's used
together with <literal>-l samba-server</literal> or <literal>-L
samba-server</literal>. The normal UNIX users are usually not enumerated,
- but they can show up as file owners in <command>ls -l</command> output. </para>
-
- </sect2>
-
- <sect2 id="mount">
- <title>mount</title>
-
+ but they can show up as file owners in <command>ls -l</command> output.
+ </para>
+ </refsect1>
+ </refentry>
+
+ <refentry id="mount">
+ <refmeta>
+ <refentrytitle>mount</refentrytitle>
+ <manvolnum>1</manvolnum>
+ <refmiscinfo class="manual">Cygwin Utilities</refmiscinfo>
+ </refmeta>
+
+ <refnamediv>
+ <refname>mount</refname>
+ <refpurpose>Display information about mounted filesystems, or mount a filesystem</refpurpose>
+ </refnamediv>
+
+ <refsynopsisdiv>
+ <screen>
+mount [OPTION] [&lt;win32path&gt; &lt;posixpath&gt;]
+mount -a
+mount &lt;posixpath&gt;
+ </screen>
+ </refsynopsisdiv>
+
+ <refsect1>
+ <title>Options</title>
<screen>
-Usage: mount [OPTION] [&lt;win32path&gt; &lt;posixpath&gt;]
- mount -a
- mount &lt;posixpath&gt;
-
-Display information about mounted filesystems, or mount a filesystem
-
-a, --all mount all filesystems mentioned in fstab
-c, --change-cygdrive-prefix change the cygdrive path prefix to &lt;posixpath&gt;
-f, --force force mount, don't warn about missing mount
@@ -1051,7 +1218,10 @@ Display information about mounted filesystems, or mount a filesystem
-p, --show-cygdrive-prefix show user and/or system cygdrive path prefix
-V, --version output version information and exit
</screen>
+ </refsect1>
+ <refsect1>
+ <title>Description</title>
<para>The <command>mount</command> program is used to map your drives and
shares onto Cygwin's simulated POSIX directory tree, much like as is done
by mount commands on typical UNIX systems. However, in contrast to mount
@@ -1062,7 +1232,7 @@ Display information about mounted filesystems, or mount a filesystem
the Cygwin POSIX file system and strategies for using mounts. To remove
mounts temporarily, use <command>umount</command></para>
- <sect3 id="utils-mount">
+ <refsect2 id="utils-mount">
<title>Using mount</title>
<para>If you just type <command>mount</command> with no parameters, it
@@ -1128,22 +1298,22 @@ D: on /d type fat (binary,user,noumount)
implement real POSIX permissions (default).
binary - Files default to binary mode (default).
bind - Allows to remount part of the file hierarchy somewhere else.
- Different from other mount calls, the first argument
- specifies an absolute POSIX path, rather than a Win32 path.
- This POSIX path is remounted to the POSIX path specified as
- the second parameter. The conversion to a Win32 path is done
- within Cygwin immediately at the time of the call. Note that
- symlinks are ignored while performing this path conversion.
+ Different from other mount calls, the first argument
+ specifies an absolute POSIX path, rather than a Win32 path.
+ This POSIX path is remounted to the POSIX path specified as
+ the second parameter. The conversion to a Win32 path is done
+ within Cygwin immediately at the time of the call. Note that
+ symlinks are ignored while performing this path conversion.
cygexec - Treat all files below mount point as cygwin executables.
dos - Always convert leading spaces and trailing dots and spaces to
- characters in the UNICODE private use area. This allows to use
- broken filesystems which only allow DOS filenames, even if they
- are not recognized as such by Cygwin.
+ characters in the UNICODE private use area. This allows to use
+ broken filesystems which only allow DOS filenames, even if they
+ are not recognized as such by Cygwin.
exec - Treat all files below mount point as executable.
ihash - Always fake inode numbers rather than using the ones returned
- by the filesystem. This allows to use broken filesystems which
- don't return unambiguous inode numbers, even if they are not
- recognized as such by Cygwin.
+ by the filesystem. This allows to use broken filesystems which
+ don't return unambiguous inode numbers, even if they are not
+ recognized as such by Cygwin.
noacl - Ignore ACLs and fake POSIX permissions.
nosuid - No suid files are allowed (currently unimplemented)
notexec - Treat all files below mount point as not executable.
@@ -1152,7 +1322,7 @@ D: on /d type fat (binary,user,noumount)
posix=1 - Switch on case sensitivity for paths under this mount point
(default).
sparse - Switch on support for sparse files. This option only makes
- sense on NTFS and then only if you really need sparse files.
+ sense on NTFS and then only if you really need sparse files.
text - Files default to CRLF text mode line endings.
</screen>
@@ -1207,9 +1377,9 @@ D: on /d type fat (binary,user,noumount)
<filename>/etc/fstab</filename> to restore the old state. It also makes
moving your settings to a different machine much easier.</para>
- </sect3>
+ </refsect2>
- <sect3 id="utils-cygdrive">
+ <refsect2 id="utils-cygdrive">
<title>Cygdrive mount points</title>
<para>Whenever Cygwin cannot use any of the existing mounts to convert
@@ -1248,15 +1418,14 @@ D: on /d type fat (binary,user,noumount)
</example>
- </sect3>
+ </refsect2>
- <sect3 id="utils-limitations">
+ <refsect2 id="utils-limitations">
<title>Limitations</title>
- <para>Limitations: there is a hard-coded limit of 64 mount points (up to
- Cygwin 1.7.9: 30 mount points). Also, although you can mount to
- pathnames that do not start with "/", there is no way to make use of
- such mount points.</para>
+ <para>Limitations: there is a hard-coded limit of 64 mount points.
+ Also, although you can mount to pathnames that do not start with "/",
+ there is no way to make use of such mount points.</para>
<para>Normally the POSIX mount point in Cygwin is an existing empty
directory, as in standard UNIX. If this is the case, or if there is a
@@ -1277,18 +1446,31 @@ D: on /d type fat (binary,user,noumount)
or <command>echo *</command> command and <command>find .</command> will
not find <filename>mtpt</filename>. </para>
- </sect3>
+ </refsect2>
+ </refsect1>
+ </refentry>
- </sect2>
+ <refentry id="passwd">
+ <refmeta>
+ <refentrytitle>passwd</refentrytitle>
+ <manvolnum>1</manvolnum>
+ <refmiscinfo class="manual">Cygwin Utilities</refmiscinfo>
+ </refmeta>
- <sect2 id="passwd">
- <title>passwd</title>
+ <refnamediv>
+ <refname>passwd</refname>
+ <refpurpose>Change USER's password or password attributes.</refpurpose>
+ </refnamediv>
- <screen>
-Usage: passwd [OPTION] [USER]
-
-Change USER's password or password attributes.
+ <refsynopsisdiv>
+ <screen>
+passwd [OPTION] [USER]
+ </screen>
+ </refsynopsisdiv>
+ <refsect1>
+ <title>Options</title>
+ <screen>
User operations:
-l, --lock lock USER's account.
-u, --unlock unlock USER's account.
@@ -1306,15 +1488,13 @@ User operations:
System operations:
-i, --inactive NUM set NUM of days before inactive accounts are disabled
(inactive accounts are those with expired passwords).
- -n, --minage DAYS set system minimum password age to DAYS days.
- -x, --maxage DAYS set system maximum password age to DAYS days.
+ -n, --minage MINDAYS set system minimum password age to MINDAYS days.
+ -x, --maxage MAXDAYS set system maximum password age to MAXDAYS days.
-L, --length LEN set system minimum password length to LEN.
Other options:
-d, --logonserver SERVER connect to SERVER (e.g. domain controller).
- Default server is the local system, unless
- changing the current user, in which case the
- default is the content of $LOGONSERVER.
+ Usually not required.
-S, --status display password status for USER (locked, expired,
etc.) plus global system password settings.
-h, --help output usage information and exit.
@@ -1322,7 +1502,7 @@ Other options:
If no option is given, change USER's password. If no user name is given,
operate on current user. System operations must not be mixed with user
-operations. Don't specify a USER when triggering a system operation.
+operations. Don't specify a USER when triggering a system operation.
Don't specify a user or any other option together with the -R option.
Non-Admin users can only store their password if cygserver is running.
@@ -1332,7 +1512,10 @@ Don't use this feature if you don't need network access within a remote
session. You can delete your stored password by using `passwd -R' and
specifying an empty password.
</screen>
+ </refsect1>
+ <refsect1>
+ <title>Description</title>
<para> <command>passwd</command> changes passwords for user accounts. A
normal user may only change the password for their own account, but
administrators may change passwords on any account.
@@ -1392,11 +1575,12 @@ specifying an empty password.
<para> All operations affecting the current user are by default run against
the logon server of the current user (taken from the environment variable
<envar>LOGONSERVER</envar>. When password or account information of other
- users should be changed, the default server is the local system. To
- change a user account on a remote machine, use the <literal>-d</literal>
- option to specify the machine to run the command against. Note that the
- current user must be a valid member of the administrators group on the
- remote machine to perform such actions. </para>
+ users should be changed, the logon server is evaluated automatically.
+ In rare cases, it might be necessary to switch to another domain
+ controller to perform the action. In this case, use the
+ <literal>-d</literal> option to specify the machine to run the command
+ against. Note that the current user must have account operator permissions
+ to perform user account changes in a domain. </para>
<para>Users can use the <command>passwd -R</command> to enter a password
which then gets stored in a special area of the registry on the local
@@ -1424,35 +1608,64 @@ specifying an empty password.
<para>Limitations: Users may not be able to change their password on some
systems.</para>
+ </refsect1>
+ </refentry>
+
+ <refentry id="pldd">
+ <refmeta>
+ <refentrytitle>pldd</refentrytitle>
+ <manvolnum>1</manvolnum>
+ <refmiscinfo class="manual">Cygwin Utilities</refmiscinfo>
+ </refmeta>
+
+ <refnamediv>
+ <refname>pldd</refname>
+ <refpurpose>List dynamic shared objects loaded into a process</refpurpose>
+ </refnamediv>
+
+ <refsynopsisdiv>
+ <screen>
+pldd [OPTION...] PID
+ </screen>
+ </refsynopsisdiv>
- </sect2>
-
- <sect2 id="pldd">
- <title>pldd</title>
-
- <screen>
-Usage: pldd [OPTION...] PID
-
-List dynamic shared objects loaded into a process.
-
+ <refsect1>
+ <title>Options</title>
+ <screen>
-?, --help Give this help list
--usage Give a short usage message
-V, --version Print program version
</screen>
+ </refsect1>
+ <refsect1>
+ <title>Description</title>
<para><command>pldd</command> prints the shared libraries (DLLs) loaded by
the process with the given PID.</para>
+ </refsect1>
+ </refentry>
+
+ <refentry id="ps">
+ <refmeta>
+ <refentrytitle>ps</refentrytitle>
+ <manvolnum>1</manvolnum>
+ <refmiscinfo class="manual">Cygwin Utilities</refmiscinfo>
+ </refmeta>
+
+ <refnamediv>
+ <refname>ps</refname>
+ <refpurpose>Report process status</refpurpose>
+ </refnamediv>
+
+ <refsynopsisdiv>
+ <screen>
+ps [-aefls] [-u UID]
+ </screen>
+ </refsynopsisdiv>
- </sect2>
-
- <sect2 id="ps">
- <title>ps</title>
-
- <screen>
-Usage: ps [-aefls] [-u UID]
-
-Report process status
-
+ <refsect1>
+ <title>Options</title>
+ <screen>
-a, --all show processes of all users
-e, --everyone show processes of all users
-f, --full show process uids, ppids
@@ -1465,7 +1678,10 @@ Report process status
-W, --windows show windows as well as cygwin processes
With no options, ps outputs the long format by default
</screen>
+ </refsect1>
+ <refsect1>
+ <title>Description</title>
<para>The <command>ps</command> program gives the status of all the Cygwin
processes running on the system (ps = "process status"). Due to the
limitations of simulating a POSIX environment under Windows, there is
@@ -1499,17 +1715,30 @@ With no options, ps outputs the long format by default
non-Cygwin Windows processes as well as Cygwin processes. The WINPID is
also the PID, and they can be killed with the Cygwin
<command>kill</command> command's <literal>-f</literal> option. </para>
+ </refsect1>
+ </refentry>
+
+ <refentry id="regtool">
+ <refmeta>
+ <refentrytitle>regtool</refentrytitle>
+ <manvolnum>1</manvolnum>
+ <refmiscinfo class="manual">Cygwin Utilities</refmiscinfo>
+ </refmeta>
+
+ <refnamediv>
+ <refname>regtool</refname>
+ <refpurpose>View or edit the Windows registry</refpurpose>
+ </refnamediv>
+
+ <refsynopsisdiv>
+ <screen>
+regtool [OPTION] (add|check|get|list|remove|unset|load|unload|save) KEY
+ </screen>
+ </refsynopsisdiv>
- </sect2>
-
- <sect2 id="regtool">
- <title>regtool</title>
-
- <screen>
-Usage: regtool [OPTION] (add|check|get|list|remove|unset|load|unload|save) KEY
-
-View or edit the Win32 registry
-
+ <refsect1>
+ <title>Options</title>
+ <screen>
Actions:
add KEY\SUBKEY add new SUBKEY
@@ -1521,7 +1750,8 @@ Actions:
unset KEY\VALUE removes VALUE from KEY
load KEY\SUBKEY PATH load hive from PATH into new SUBKEY
unload KEY\SUBKEY unload hive and remove SUBKEY
- save KEY\SUBKEY PATH save SUBKEY into new hive PATH
+ save KEY\SUBKEY PATH save SUBKEY into new file PATH
+ restore KEY\SUBKEY PATH restore SUBKEY from file PATH
Options for 'list' Action:
@@ -1550,6 +1780,11 @@ Options for 'set' and 'unset' Actions:
-K&lt;c&gt;, --key-separator[=]&lt;c&gt; set key separator to &lt;c&gt; instead of '\'
+Options for 'restore' action:
+
+ -f, --force restore even if open handles exist at or beneath the location
+ in the registry hierarchy to which KEY\SUBKEY points
+
Other Options:
-h, --help output usage information and exit
@@ -1569,9 +1804,12 @@ remote host in either \\hostname or hostname: format and prefix is any of:
You can use forward slash ('/') as a separator instead of backslash, in
that case backslash is treated as escape character
-Example: regtool.exe get '\user\software\Microsoft\Clock\iFormat'
+Example: regtool get '\user\software\Microsoft\Clock\iFormat'
</screen>
+ </refsect1>
+ <refsect1>
+ <title>Description</title>
<para>The <command>regtool</command> program allows shell scripts to access
and modify the Windows registry. Note that modifying the Windows registry
is dangerous, and carelessness here can result in an unusable system. Be
@@ -1656,42 +1894,65 @@ Example: regtool.exe get '\user\software\Microsoft\Clock\iFormat'
unloads the file and removes the subkey. </para>
<para>The <literal>save</literal> action saves a subkey into a registry
- hive. </para>
+ file. Ideally you append the suffix <filename>.reg</filename> to the file
+ so it gets automatically recognized as registry file by
+ <command>Windows Explorer</command>.</para>
+
+ <para>The <literal>restore</literal> action restores a registry subkey
+ from a file saved via the aforementioned <literal>save</literal> action.
+ </para>
<para> By default, the last "\" or "/" is assumed to be the separator
between the key and the value. You can use the <literal>-K</literal>
option to provide an alternate key/value separator character. </para>
+ </refsect1>
+ </refentry>
+
+ <refentry id="setfacl">
+ <refmeta>
+ <refentrytitle>setfacl</refentrytitle>
+ <manvolnum>1</manvolnum>
+ <refmiscinfo class="manual">Cygwin Utilities</refmiscinfo>
+ </refmeta>
+
+ <refnamediv>
+ <refname>setfacl</refname>
+ <refpurpose>Modify file and directory access control lists (ACLs)</refpurpose>
+ </refnamediv>
+
+ <refsynopsisdiv>
+ <screen>
+setfacl [-n] {-f ACL_FILE | -s acl_entries} FILE...
+setfacl [-n] {[-bk]|[-x acl_entries] [-m acl_entries]} FILE...
+ </screen>
+ </refsynopsisdiv>
- </sect2>
-
- <sect2 id="setfacl">
- <title>setfacl</title>
-
- <screen>
-Usage: setfacl [-r] (-f ACL_FILE | -s acl_entries) FILE...
- setfacl [-r] ([-d acl_entries] [-m acl_entries]) FILE...
-
-Modify file and directory access control lists (ACLs)
-
- -d, --delete delete one or more specified ACL entries
- -f, --file set ACL entries for FILE to ACL entries read
- from a ACL_FILE
- -m, --modify modify one or more specified ACL entries
- -r, --replace replace mask entry with maximum permissions
- needed for the file group class
- -s, --substitute substitute specified ACL entries for the
- ACL of FILE
- -h, --help output usage information and exit
- -V, --version output version information and exit
-
-At least one of (-d, -f, -m, -s) must be specified
+ <refsect1>
+ <title>Options</title>
+ <screen>
+ -b, --remove-all remove all extended ACL entries\n"
+ -x, --delete delete one or more specified ACL entries\n"
+ -f, --file set ACL entries for FILE to ACL entries read\n"
+ from ACL_FILE\n"
+ -k, --remove-default remove all default ACL entries\n"
+ -m, --modify modify one or more specified ACL entries\n"
+ -n, --no-mask don't recalculate the effective rights mask\n"
+ --mask do recalculate the effective rights mask\n"
+ -s, --set set specified ACL entries on FILE\n"
+ -V, --version print version and exit\n"
+ -h, --help this help text\n"
+
+At least one of (-b, -x, -f, -k, -m, -s) must be specified\n"
</screen>
+ </refsect1>
+ <refsect1>
+ <title>Description</title>
<para> For each file given as parameter, <command>setfacl</command> will
either replace its complete ACL (<literal>-s</literal>,
<literal>-f</literal>), or it will add, modify, or delete ACL entries.
- For more information on Cygwin and Windows ACLs, see see <xref
- linkend="ntsec"/> in the Cygwin User's Guide. </para>
+ For more information on Cygwin and Windows ACLs, see
+ <xref linkend="ntsec"/> in the Cygwin User's Guide. </para>
<para> Acl_entries are one or more comma-separated ACL entries from the
following list:
@@ -1718,24 +1979,32 @@ At least one of (-d, -f, -m, -s) must be specified
<para> The following options are supported: </para>
- <para> <literal>-d</literal> Delete one or more specified entries from the
- file's ACL. The owner, group and others entries must not be deleted.
- Acl_entries to be deleted should be specified without permissions, as in
- the following list:
- <screen>
- u[ser]:uid
- g[roup]:gid
- d[efault]:u[ser]:uid
- d[efault]:g[roup]:gid
- d[efault]:m[ask]:
- d[efault]:o[ther]:
+ <para> <literal>-b</literal>,<literal>--remove-all</literal> Remove all
+ extended ACL entries. The base ACL entries of the owner, group and
+ others are retained. This option can be combined with the
+ <literal>-k</literal>,<literal>--remove-default</literal> option
+ to delete all non-standard POSIX permissions.</para>
+
+ <para> <literal>-x</literal>,<literal>--delete</literal> Delete one or
+ more specified entries from the file's ACL. The owner, group and others
+ entries must not be deleted. Acl_entries to be deleted should be
+ specified without permissions, as in the following list:
+ <screen>
+ u[ser]:uid[:]
+ g[roup]:gid[:]
+ m[ask][:]
+ d[efault]:u[ser][:uid]
+ d[efault]:g[roup][:gid]
+ d[efault]:m[ask][:]
+ d[efault]:o[ther][:]
</screen> </para>
- <para> <literal>-f</literal> Take the Acl_entries from ACL_FILE one per
- line. Whitespace characters are ignored, and the character "#" may be
- used to start a comment. The special filename "-" indicates reading from
- stdin. Note that you can use this with <command>getfacl</command> and
- <command>setfacl</command> to copy ACLs from one file to another:
+ <para> <literal>-f</literal>,<literal>--file</literal> Take the Acl_entries
+ from ACL_FILE one per line. Whitespace characters are ignored, and the
+ character "#" may be used to start a comment. The special filename "-"
+ indicates reading from stdin. Note that you can use this with
+ <command>getfacl</command> and <command>setfacl</command> to copy ACLs
+ from one file to another:
<screen>
$ getfacl source_file | setfacl -f - target_file
</screen> </para>
@@ -1751,41 +2020,66 @@ $ getfacl source_file | setfacl -f - target_file
file, one default group entry for the group of the file, one default mask
entry for the file group class, and one default other entry. </para>
- <para> <literal>-m</literal> Add or modify one or more specified ACL
- entries. Acl_entries is a comma-separated list of entries from the same
- list as above. </para>
-
- <para> <literal>-r</literal> Causes the permissions specified in the mask
- entry to be ignored and replaced by the maximum permissions needed for
- the file group class. </para>
-
- <para> <literal>-s</literal> Like <literal>-f</literal>, but substitute the
- file's ACL with Acl_entries specified in a comma-separated list on the
- command line. </para>
-
- <para> While the <literal>-d</literal> and <literal>-m</literal> options
+ <para> <literal>-k</literal>,<literal>--remove-default</literal> Remove all
+ default ACL entries. If no default ACL entries exist, no warnings are
+ issued. This option can be combined with the
+ <literal>-b</literal>,<literal>--remove-all</literal> option
+ to delete all non-standard POSIX permissions.</para>
+
+ <para> <literal>-m</literal>,<literal>--modify</literal> Add or modify one
+ or more specified ACL entries. Acl_entries is a comma-separated list of
+ entries from the same list as above. </para>
+
+ <para> <literal>-n</literal>,<literal>--no-mask</literal> Valid in
+ conjunction with -m. Do not recalculate the effective rights mask.
+ The default behavior of setfacl is to recalculate the ACL mask entry,
+ unless a mask entry was explicitly given. The mask entry is set to
+ the union of all permissions of the owning group, and all named user
+ and group entries. (These are exactly the entries affected by the
+ mask entry). </para>
+
+ <para> <literal>--mask</literal> Valid in conjunction with -m. Do
+ recalculate the effective rights mask, even if an ACL mask entry was
+ explicitly given. (See the -n option.) </para>
+
+ <para> <literal>-s</literal>,<literal>--set</literal> Like
+ <literal>-f</literal>, but set the file's ACL with Acl_entries
+ specified in a comma-separated list on the command line. </para>
+
+ <para> While the <literal>-x</literal> and <literal>-m</literal> options
may be used in the same command, the <literal>-f</literal> and
<literal>-s</literal> options may be used only exclusively. </para>
<para> Directories may contain default ACL entries. Files created in a
directory that contains default ACL entries will have permissions
according to the combination of the current umask, the explicit
- permissions requested and the default ACL entries </para>
-
- <para> Limitations: Under Cygwin, the default ACL entries are not taken
- into account currently. </para>
-
- </sect2>
-
- <sect2 id="setmetamode">
- <title>setmetamode</title>
-
- <screen>
-Usage: setmetamode [metabit|escprefix]
-
-Get or set keyboard meta mode
+ permissions requested and the default ACL entries.</para>
+ </refsect1>
+ </refentry>
+
+ <refentry id="setmetamode">
+ <refmeta>
+ <refentrytitle>setmetamode</refentrytitle>
+ <manvolnum>1</manvolnum>
+ <refmiscinfo class="manual">Cygwin Utilities</refmiscinfo>
+ </refmeta>
+
+ <refnamediv>
+ <refname>setmetamode</refname>
+ <refpurpose>Get or set keyboard meta mode</refpurpose>
+ </refnamediv>
+
+ <refsynopsisdiv>
+ <screen>
+setmetamode [metabit|escprefix]
+ </screen>
+ </refsynopsisdiv>
+ <refsect1>
+ <title>Options</title>
+ <screen>
Without argument, it shows the current meta key mode.
+
metabit|meta|bit The meta key sets the top bit of the character.
escprefix|esc|prefix The meta key sends an escape prefix.
@@ -1794,20 +2088,36 @@ Other options:
-h, --help This text
-V, --version Print program version and exit
</screen>
+ </refsect1>
+ <refsect1>
+ <title>Description</title>
<para><command>setmetamode</command> can be used to determine and set the
key code sent by the meta (aka <literal>Alt</literal>) key.</para>
+ </refsect1>
+ </refentry>
+
+ <refentry id="ssp">
+ <refmeta>
+ <refentrytitle>ssp</refentrytitle>
+ <manvolnum>1</manvolnum>
+ <refmiscinfo class="manual">Cygwin Utilities</refmiscinfo>
+ </refmeta>
+
+ <refnamediv>
+ <refname>ssp</refname>
+ <refpurpose>Single-step profile COMMAND</refpurpose>
+ </refnamediv>
+
+ <refsynopsisdiv>
+ <screen>
+ssp [options] low_pc high_pc command...
+ </screen>
+ </refsynopsisdiv>
- </sect2>
-
- <sect2 id="ssp">
- <title>ssp</title>
-
- <screen>
-Usage: ssp [options] low_pc high_pc command...
-
-Single-step profile COMMAND
-
+ <refsect1>
+ <title>Options</title>
+ <screen>
-c, --console-trace trace every EIP value to the console. *Lots* slower.
-d, --disable disable single-stepping by default; use
OutputDebugString ("ssp on") to enable stepping
@@ -1825,7 +2135,10 @@ Single-step profile COMMAND
Example: ssp 0x401000 0x403000 hello.exe
</screen>
+ </refsect1>
+ <refsect1>
+ <title>Description</title>
<para> SSP - The Single Step Profiler </para>
<para> Original Author: DJ Delorie </para>
@@ -1955,19 +2268,34 @@ Each sample counts as 0.01 seconds.
$ ssp <literal>-v</literal> <literal>-s</literal> <literal>-l</literal> <literal>-d</literal> 0x61001000 0x61080000 hello.exe
</screen>
</para>
- </sect2>
-
- <sect2 id="strace">
- <title>strace</title>
-
- <screen>
-Usage: strace.exe [OPTIONS] &lt;command-line&gt;
-Usage: strace.exe [OPTIONS] -p &lt;pid&gt;
-
-Trace system calls and signals
+ </refsect1>
+ </refentry>
+
+ <refentry id="strace">
+ <refmeta>
+ <refentrytitle>strace</refentrytitle>
+ <manvolnum>1</manvolnum>
+ <refmiscinfo class="manual">Cygwin Utilities</refmiscinfo>
+ </refmeta>
+
+ <refnamediv>
+ <refname>strace</refname>
+ <refpurpose>Trace system calls and signals</refpurpose>
+ </refnamediv>
+
+ <refsynopsisdiv>
+ <screen>
+strace [OPTIONS] &lt;command-line&gt;
+strace [OPTIONS] -p &lt;pid&gt;
+ </screen>
+ </refsynopsisdiv>
+ <refsect1>
+ <title>Options</title>
+ <screen>
-b, --buffer-size=SIZE set size of output file buffer
-d, --no-delta don't display the delta-t microsecond timestamp
+ -e, --events log all Windows DEBUG_EVENTS (toggle - default true)
-f, --trace-children trace child processes (toggle - default true)
-h, --help output usage information and exit
-m, --mask=MASK set message filter mask
@@ -1978,7 +2306,7 @@ Trace system calls and signals
-q, --quiet toggle "quiet" flag. Defaults to on if "-p",
off otherwise.
-S, --flush-period=PERIOD flush buffered strace output every PERIOD secs
- -t, --timestamp use an absolute hh:mm:ss timestamp insted of
+ -t, --timestamp use an absolute hh:mm:ss timestamp insted of
the default microsecond timestamp. Implies -d
-T, --toggle toggle tracing in a process already being
traced. Requires -p &lt;pid&gt;
@@ -1999,7 +2327,7 @@ Trace system calls and signals
uhoh 0x000008 (_STRACE_UHOH) Unusual or weird phenomenon.
syscall 0x000010 (_STRACE_SYSCALL) System calls.
startup 0x000020 (_STRACE_STARTUP) argc/envp printout at startup.
- debug 0x000040 (_STRACE_DEBUG) Info to help debugging.
+ debug 0x000040 (_STRACE_DEBUG) Info to help debugging.
paranoid 0x000080 (_STRACE_PARANOID) Paranoid info.
termios 0x000100 (_STRACE_TERMIOS) Info for debugging termios stuff.
select 0x000200 (_STRACE_SELECT) Info on ugly select internals.
@@ -2015,7 +2343,10 @@ Trace system calls and signals
special 0x100000 (_STRACE_SPECIAL) Special debugging printfs for
non-checked-in code
</screen>
+ </refsect1>
+ <refsect1>
+ <title>Description</title>
<para>The <command>strace</command> program executes a program, and
optionally the children of the program, reporting any Cygwin DLL output
from the program(s) to stdout, or to a file with the
@@ -2032,51 +2363,84 @@ $ strace -o tracing_output -w sh -c 'while true; do echo "tracing..."; done' &am
<command>cygcheck</command>). As a result it does not understand
symlinks. This program is mainly useful for debugging the Cygwin DLL
itself.</para>
+ </refsect1>
+ </refentry>
+
+ <refentry id="tzset">
+ <refmeta>
+ <refentrytitle>tzset</refentrytitle>
+ <manvolnum>1</manvolnum>
+ <refmiscinfo class="manual">Cygwin Utilities</refmiscinfo>
+ </refmeta>
+
+ <refnamediv>
+ <refname>tzset</refname>
+ <refpurpose>Print POSIX-compatible timezone ID from current Windows timezone setting</refpurpose>
+ </refnamediv>
+
+ <refsynopsisdiv>
+ <screen>
+tzset [OPTION]
+ </screen>
+ </refsynopsisdiv>
- </sect2>
-
- <sect2 id="tzset">
- <title>tzset</title>
-
- <screen>
-Usage: tzset [OPTION]
-
-Print POSIX-compatible timezone ID from current Windows timezone setting
-
+ <refsect1>
+ <title>Options</title>
+ <screen>
Options:
-h, --help output usage information and exit.
-V, --version output version information and exit.
+ </screen>
+ </refsect1>
-Use tzset to set your TZ variable. In POSIX-compatible shells like bash,
-dash, mksh, or zsh:
-
- export TZ=$(tzset)
-
-In csh-compatible shells like tcsh:
-
- setenv TZ `tzset`
-</screen>
+ <refsect1>
+ <title>Description</title>
+ Use tzset to set your TZ variable. In POSIX-compatible shells like bash,
+ dash, mksh, or zsh:
+ <screen>
+export TZ=$(tzset)
+ </screen>
+ In csh-compatible shells like tcsh:
+ <screen>
+setenv TZ `tzset`
+ </screen>
<para>The <command>tzset</command> tool reads the current timezone from
Windows and generates a POSIX-compatible timezone information for the TZ
environment variable from that information. That's all there is to it.
For the way how to use it, see the above usage information.</para>
+ </refsect1>
+ </refentry>
+
+ <refentry id="umount">
+ <refmeta>
+ <refentrytitle>umount</refentrytitle>
+ <manvolnum>1</manvolnum>
+ <refmiscinfo class="manual">Cygwin Utilities</refmiscinfo>
+ </refmeta>
+
+ <refnamediv>
+ <refname>umount</refname>
+ <refpurpose>Unmount filesystems</refpurpose>
+ </refnamediv>
+
+ <refsynopsisdiv>
+ <screen>
+umount [OPTION] [&lt;posixpath&gt;]
+ </screen>
+ </refsynopsisdiv>
- </sect2>
-
- <sect2 id="umount">
- <title>umount</title>
-
- <screen>
-Usage: umount.exe [OPTION] [&lt;posixpath&gt;]
-
-Unmount filesystems
-
+ <refsect1>
+ <title>Options</title>
+ <screen>
-h, --help output usage information and exit
-U, --remove-user-mounts remove all user mounts
-V, --version output version information and exit
</screen>
+ </refsect1>
+ <refsect1>
+ <title>Description</title>
<para>The <command>umount</command> program removes mounts from the mount
table in the current session. If you specify a POSIX path that
corresponds to a current mount point, <command>umount</command> will
@@ -2086,6 +2450,7 @@ Unmount filesystems
<para>See <xref linkend="mount-table"/> for more information on the mount
table.</para>
- </sect2>
+ </refsect1>
+ </refentry>
</sect1>
diff --git a/winsup/doc/xidepend b/winsup/doc/xidepend
index 2a1fc831d..cc04f4a12 100755
--- a/winsup/doc/xidepend
+++ b/winsup/doc/xidepend
@@ -11,11 +11,12 @@ fi
for f in "$@"
do
+ f=`basename "$f"`
if fgrep -q 'xi:include' "$f"
then
# This file uses XIncludes. Let's chase its deps recursively.
base=`basename "$f" .xml`
- if [ $subproc -eq 0 ] ; then echo -n "$base/$base.html:" ; fi
+ if [ $subproc -eq 0 ] ; then echo -n "${base}_SOURCES=${f}" ; fi
deps=`grep 'xi:include.*href' "$f" | cut -f2 -d\" | tr '\n' ' '`
echo -n " $deps"
diff --git a/winsup/lsaauth/Makefile.in b/winsup/lsaauth/Makefile.in
index 53e91c406..997eaf9b4 100644
--- a/winsup/lsaauth/Makefile.in
+++ b/winsup/lsaauth/Makefile.in
@@ -1,4 +1,3 @@
-# Copyright (c) 2006, 2008, 2009, 2011, 2012, 2013 Red Hat, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/winsup/lsaauth/aclocal.m4 b/winsup/lsaauth/aclocal.m4
deleted file mode 100644
index ecef4244c..000000000
--- a/winsup/lsaauth/aclocal.m4
+++ /dev/null
@@ -1,875 +0,0 @@
-dnl aclocal.m4 generated automatically by aclocal 1.4-p6
-
-dnl Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc.
-dnl This file is free software; the Free Software Foundation
-dnl gives unlimited permission to copy and/or distribute it,
-dnl with or without modifications, as long as this notice is preserved.
-
-dnl This program is distributed in the hope that it will be useful,
-dnl but WITHOUT ANY WARRANTY, to the extent permitted by law; without
-dnl even the implied warranty of MERCHANTABILITY or FITNESS FOR A
-dnl PARTICULAR PURPOSE.
-
-# lib-prefix.m4 serial 4 (gettext-0.14.2)
-dnl Copyright (C) 2001-2005 Free Software Foundation, Inc.
-dnl This file is free software; the Free Software Foundation
-dnl gives unlimited permission to copy and/or distribute it,
-dnl with or without modifications, as long as this notice is preserved.
-
-dnl From Bruno Haible.
-
-dnl AC_LIB_ARG_WITH is synonymous to AC_ARG_WITH in autoconf-2.13, and
-dnl similar to AC_ARG_WITH in autoconf 2.52...2.57 except that is doesn't
-dnl require excessive bracketing.
-ifdef([AC_HELP_STRING],
-[AC_DEFUN([AC_LIB_ARG_WITH], [AC_ARG_WITH([$1],[[$2]],[$3],[$4])])],
-[AC_DEFUN([AC_][LIB_ARG_WITH], [AC_ARG_WITH([$1],[$2],[$3],[$4])])])
-
-dnl AC_LIB_PREFIX adds to the CPPFLAGS and LDFLAGS the flags that are needed
-dnl to access previously installed libraries. The basic assumption is that
-dnl a user will want packages to use other packages he previously installed
-dnl with the same --prefix option.
-dnl This macro is not needed if only AC_LIB_LINKFLAGS is used to locate
-dnl libraries, but is otherwise very convenient.
-AC_DEFUN([AC_LIB_PREFIX],
-[
- AC_BEFORE([$0], [AC_LIB_LINKFLAGS])
- AC_REQUIRE([AC_PROG_CC])
- AC_REQUIRE([AC_CANONICAL_HOST])
- AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
- dnl By default, look in $includedir and $libdir.
- use_additional=yes
- AC_LIB_WITH_FINAL_PREFIX([
- eval additional_includedir=\"$includedir\"
- eval additional_libdir=\"$libdir\"
- ])
- AC_LIB_ARG_WITH([lib-prefix],
-[ --with-lib-prefix[=DIR] search for libraries in DIR/include and DIR/lib
- --without-lib-prefix don't search for libraries in includedir and libdir],
-[
- if test "X$withval" = "Xno"; then
- use_additional=no
- else
- if test "X$withval" = "X"; then
- AC_LIB_WITH_FINAL_PREFIX([
- eval additional_includedir=\"$includedir\"
- eval additional_libdir=\"$libdir\"
- ])
- else
- additional_includedir="$withval/include"
- additional_libdir="$withval/lib"
- fi
- fi
-])
- if test $use_additional = yes; then
- dnl Potentially add $additional_includedir to $CPPFLAGS.
- dnl But don't add it
- dnl 1. if it's the standard /usr/include,
- dnl 2. if it's already present in $CPPFLAGS,
- dnl 3. if it's /usr/local/include and we are using GCC on Linux,
- dnl 4. if it doesn't exist as a directory.
- if test "X$additional_includedir" != "X/usr/include"; then
- haveit=
- for x in $CPPFLAGS; do
- AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
- if test "X$x" = "X-I$additional_includedir"; then
- haveit=yes
- break
- fi
- done
- if test -z "$haveit"; then
- if test "X$additional_includedir" = "X/usr/local/include"; then
- if test -n "$GCC"; then
- case $host_os in
- linux* | gnu* | k*bsd*-gnu) haveit=yes;;
- esac
- fi
- fi
- if test -z "$haveit"; then
- if test -d "$additional_includedir"; then
- dnl Really add $additional_includedir to $CPPFLAGS.
- CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }-I$additional_includedir"
- fi
- fi
- fi
- fi
- dnl Potentially add $additional_libdir to $LDFLAGS.
- dnl But don't add it
- dnl 1. if it's the standard /usr/lib,
- dnl 2. if it's already present in $LDFLAGS,
- dnl 3. if it's /usr/local/lib and we are using GCC on Linux,
- dnl 4. if it doesn't exist as a directory.
- if test "X$additional_libdir" != "X/usr/lib"; then
- haveit=
- for x in $LDFLAGS; do
- AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
- if test "X$x" = "X-L$additional_libdir"; then
- haveit=yes
- break
- fi
- done
- if test -z "$haveit"; then
- if test "X$additional_libdir" = "X/usr/local/lib"; then
- if test -n "$GCC"; then
- case $host_os in
- linux*) haveit=yes;;
- esac
- fi
- fi
- if test -z "$haveit"; then
- if test -d "$additional_libdir"; then
- dnl Really add $additional_libdir to $LDFLAGS.
- LDFLAGS="${LDFLAGS}${LDFLAGS:+ }-L$additional_libdir"
- fi
- fi
- fi
- fi
- fi
-])
-
-dnl AC_LIB_PREPARE_PREFIX creates variables acl_final_prefix,
-dnl acl_final_exec_prefix, containing the values to which $prefix and
-dnl $exec_prefix will expand at the end of the configure script.
-AC_DEFUN([AC_LIB_PREPARE_PREFIX],
-[
- dnl Unfortunately, prefix and exec_prefix get only finally determined
- dnl at the end of configure.
- if test "X$prefix" = "XNONE"; then
- acl_final_prefix="$ac_default_prefix"
- else
- acl_final_prefix="$prefix"
- fi
- if test "X$exec_prefix" = "XNONE"; then
- acl_final_exec_prefix='${prefix}'
- else
- acl_final_exec_prefix="$exec_prefix"
- fi
- acl_save_prefix="$prefix"
- prefix="$acl_final_prefix"
- eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
- prefix="$acl_save_prefix"
-])
-
-dnl AC_LIB_WITH_FINAL_PREFIX([statement]) evaluates statement, with the
-dnl variables prefix and exec_prefix bound to the values they will have
-dnl at the end of the configure script.
-AC_DEFUN([AC_LIB_WITH_FINAL_PREFIX],
-[
- acl_save_prefix="$prefix"
- prefix="$acl_final_prefix"
- acl_save_exec_prefix="$exec_prefix"
- exec_prefix="$acl_final_exec_prefix"
- $1
- exec_prefix="$acl_save_exec_prefix"
- prefix="$acl_save_prefix"
-])
-
-# lib-link.m4 serial 6 (gettext-0.14.3)
-dnl Copyright (C) 2001-2005 Free Software Foundation, Inc.
-dnl This file is free software; the Free Software Foundation
-dnl gives unlimited permission to copy and/or distribute it,
-dnl with or without modifications, as long as this notice is preserved.
-
-dnl From Bruno Haible.
-
-AC_PREREQ(2.50)
-
-dnl AC_LIB_LINKFLAGS(name [, dependencies]) searches for libname and
-dnl the libraries corresponding to explicit and implicit dependencies.
-dnl Sets and AC_SUBSTs the LIB${NAME} and LTLIB${NAME} variables and
-dnl augments the CPPFLAGS variable.
-AC_DEFUN([AC_LIB_LINKFLAGS],
-[
- AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
- AC_REQUIRE([AC_LIB_RPATH])
- define([Name],[translit([$1],[./-], [___])])
- define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
- [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
- AC_CACHE_CHECK([how to link with lib[]$1], [ac_cv_lib[]Name[]_libs], [
- AC_LIB_LINKFLAGS_BODY([$1], [$2])
- ac_cv_lib[]Name[]_libs="$LIB[]NAME"
- ac_cv_lib[]Name[]_ltlibs="$LTLIB[]NAME"
- ac_cv_lib[]Name[]_cppflags="$INC[]NAME"
- ])
- LIB[]NAME="$ac_cv_lib[]Name[]_libs"
- LTLIB[]NAME="$ac_cv_lib[]Name[]_ltlibs"
- INC[]NAME="$ac_cv_lib[]Name[]_cppflags"
- AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME)
- AC_SUBST([LIB]NAME)
- AC_SUBST([LTLIB]NAME)
- dnl Also set HAVE_LIB[]NAME so that AC_LIB_HAVE_LINKFLAGS can reuse the
- dnl results of this search when this library appears as a dependency.
- HAVE_LIB[]NAME=yes
- undefine([Name])
- undefine([NAME])
-])
-
-dnl AC_LIB_HAVE_LINKFLAGS(name, dependencies, includes, testcode)
-dnl searches for libname and the libraries corresponding to explicit and
-dnl implicit dependencies, together with the specified include files and
-dnl the ability to compile and link the specified testcode. If found, it
-dnl sets and AC_SUBSTs HAVE_LIB${NAME}=yes and the LIB${NAME} and
-dnl LTLIB${NAME} variables and augments the CPPFLAGS variable, and
-dnl #defines HAVE_LIB${NAME} to 1. Otherwise, it sets and AC_SUBSTs
-dnl HAVE_LIB${NAME}=no and LIB${NAME} and LTLIB${NAME} to empty.
-AC_DEFUN([AC_LIB_HAVE_LINKFLAGS],
-[
- AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
- AC_REQUIRE([AC_LIB_RPATH])
- define([Name],[translit([$1],[./-], [___])])
- define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
- [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
-
- dnl Search for lib[]Name and define LIB[]NAME, LTLIB[]NAME and INC[]NAME
- dnl accordingly.
- AC_LIB_LINKFLAGS_BODY([$1], [$2])
-
- dnl Add $INC[]NAME to CPPFLAGS before performing the following checks,
- dnl because if the user has installed lib[]Name and not disabled its use
- dnl via --without-lib[]Name-prefix, he wants to use it.
- ac_save_CPPFLAGS="$CPPFLAGS"
- AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME)
-
- AC_CACHE_CHECK([for lib[]$1], [ac_cv_lib[]Name], [
- ac_save_LIBS="$LIBS"
- LIBS="$LIBS $LIB[]NAME"
- AC_TRY_LINK([$3], [$4], [ac_cv_lib[]Name=yes], [ac_cv_lib[]Name=no])
- LIBS="$ac_save_LIBS"
- ])
- if test "$ac_cv_lib[]Name" = yes; then
- HAVE_LIB[]NAME=yes
- AC_DEFINE([HAVE_LIB]NAME, 1, [Define if you have the $1 library.])
- AC_MSG_CHECKING([how to link with lib[]$1])
- AC_MSG_RESULT([$LIB[]NAME])
- else
- HAVE_LIB[]NAME=no
- dnl If $LIB[]NAME didn't lead to a usable library, we don't need
- dnl $INC[]NAME either.
- CPPFLAGS="$ac_save_CPPFLAGS"
- LIB[]NAME=
- LTLIB[]NAME=
- fi
- AC_SUBST([HAVE_LIB]NAME)
- AC_SUBST([LIB]NAME)
- AC_SUBST([LTLIB]NAME)
- undefine([Name])
- undefine([NAME])
-])
-
-dnl Determine the platform dependent parameters needed to use rpath:
-dnl libext, shlibext, hardcode_libdir_flag_spec, hardcode_libdir_separator,
-dnl hardcode_direct, hardcode_minus_L.
-AC_DEFUN([AC_LIB_RPATH],
-[
- dnl Tell automake >= 1.10 to complain if config.rpath is missing.
- m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([config.rpath])])
- AC_REQUIRE([AC_PROG_CC]) dnl we use $CC, $GCC, $LDFLAGS
- AC_REQUIRE([AC_LIB_PROG_LD]) dnl we use $LD, $with_gnu_ld
- AC_REQUIRE([AC_CANONICAL_HOST]) dnl we use $host
- AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT]) dnl we use $ac_aux_dir
- AC_CACHE_CHECK([for shared library run path origin], acl_cv_rpath, [
- CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
- ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
- . ./conftest.sh
- rm -f ./conftest.sh
- acl_cv_rpath=done
- ])
- wl="$acl_cv_wl"
- libext="$acl_cv_libext"
- shlibext="$acl_cv_shlibext"
- hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
- hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
- hardcode_direct="$acl_cv_hardcode_direct"
- hardcode_minus_L="$acl_cv_hardcode_minus_L"
- dnl Determine whether the user wants rpath handling at all.
- AC_ARG_ENABLE(rpath,
- [ --disable-rpath do not hardcode runtime library paths],
- :, enable_rpath=yes)
-])
-
-dnl AC_LIB_LINKFLAGS_BODY(name [, dependencies]) searches for libname and
-dnl the libraries corresponding to explicit and implicit dependencies.
-dnl Sets the LIB${NAME}, LTLIB${NAME} and INC${NAME} variables.
-AC_DEFUN([AC_LIB_LINKFLAGS_BODY],
-[
- define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
- [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
- dnl By default, look in $includedir and $libdir.
- use_additional=yes
- AC_LIB_WITH_FINAL_PREFIX([
- eval additional_includedir=\"$includedir\"
- eval additional_libdir=\"$libdir\"
- ])
- AC_LIB_ARG_WITH([lib$1-prefix],
-[ --with-lib$1-prefix[=DIR] search for lib$1 in DIR/include and DIR/lib
- --without-lib$1-prefix don't search for lib$1 in includedir and libdir],
-[
- if test "X$withval" = "Xno"; then
- use_additional=no
- else
- if test "X$withval" = "X"; then
- AC_LIB_WITH_FINAL_PREFIX([
- eval additional_includedir=\"$includedir\"
- eval additional_libdir=\"$libdir\"
- ])
- else
- additional_includedir="$withval/include"
- additional_libdir="$withval/lib"
- fi
- fi
-])
- dnl Search the library and its dependencies in $additional_libdir and
- dnl $LDFLAGS. Using breadth-first-seach.
- LIB[]NAME=
- LTLIB[]NAME=
- INC[]NAME=
- rpathdirs=
- ltrpathdirs=
- names_already_handled=
- names_next_round='$1 $2'
- while test -n "$names_next_round"; do
- names_this_round="$names_next_round"
- names_next_round=
- for name in $names_this_round; do
- already_handled=
- for n in $names_already_handled; do
- if test "$n" = "$name"; then
- already_handled=yes
- break
- fi
- done
- if test -z "$already_handled"; then
- names_already_handled="$names_already_handled $name"
- dnl See if it was already located by an earlier AC_LIB_LINKFLAGS
- dnl or AC_LIB_HAVE_LINKFLAGS call.
- uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
- eval value=\"\$HAVE_LIB$uppername\"
- if test -n "$value"; then
- if test "$value" = yes; then
- eval value=\"\$LIB$uppername\"
- test -z "$value" || LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$value"
- eval value=\"\$LTLIB$uppername\"
- test -z "$value" || LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$value"
- else
- dnl An earlier call to AC_LIB_HAVE_LINKFLAGS has determined
- dnl that this library doesn't exist. So just drop it.
- :
- fi
- else
- dnl Search the library lib$name in $additional_libdir and $LDFLAGS
- dnl and the already constructed $LIBNAME/$LTLIBNAME.
- found_dir=
- found_la=
- found_so=
- found_a=
- if test $use_additional = yes; then
- if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
- found_dir="$additional_libdir"
- found_so="$additional_libdir/lib$name.$shlibext"
- if test -f "$additional_libdir/lib$name.la"; then
- found_la="$additional_libdir/lib$name.la"
- fi
- else
- if test -f "$additional_libdir/lib$name.$libext"; then
- found_dir="$additional_libdir"
- found_a="$additional_libdir/lib$name.$libext"
- if test -f "$additional_libdir/lib$name.la"; then
- found_la="$additional_libdir/lib$name.la"
- fi
- fi
- fi
- fi
- if test "X$found_dir" = "X"; then
- for x in $LDFLAGS $LTLIB[]NAME; do
- AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
- case "$x" in
- -L*)
- dir=`echo "X$x" | sed -e 's/^X-L//'`
- if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
- found_dir="$dir"
- found_so="$dir/lib$name.$shlibext"
- if test -f "$dir/lib$name.la"; then
- found_la="$dir/lib$name.la"
- fi
- else
- if test -f "$dir/lib$name.$libext"; then
- found_dir="$dir"
- found_a="$dir/lib$name.$libext"
- if test -f "$dir/lib$name.la"; then
- found_la="$dir/lib$name.la"
- fi
- fi
- fi
- ;;
- esac
- if test "X$found_dir" != "X"; then
- break
- fi
- done
- fi
- if test "X$found_dir" != "X"; then
- dnl Found the library.
- LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$found_dir -l$name"
- if test "X$found_so" != "X"; then
- dnl Linking with a shared library. We attempt to hardcode its
- dnl directory into the executable's runpath, unless it's the
- dnl standard /usr/lib.
- if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
- dnl No hardcoding is needed.
- LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
- else
- dnl Use an explicit option to hardcode DIR into the resulting
- dnl binary.
- dnl Potentially add DIR to ltrpathdirs.
- dnl The ltrpathdirs will be appended to $LTLIBNAME at the end.
- haveit=
- for x in $ltrpathdirs; do
- if test "X$x" = "X$found_dir"; then
- haveit=yes
- break
- fi
- done
- if test -z "$haveit"; then
- ltrpathdirs="$ltrpathdirs $found_dir"
- fi
- dnl The hardcoding into $LIBNAME is system dependent.
- if test "$hardcode_direct" = yes; then
- dnl Using DIR/libNAME.so during linking hardcodes DIR into the
- dnl resulting binary.
- LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
- else
- if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
- dnl Use an explicit option to hardcode DIR into the resulting
- dnl binary.
- LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
- dnl Potentially add DIR to rpathdirs.
- dnl The rpathdirs will be appended to $LIBNAME at the end.
- haveit=
- for x in $rpathdirs; do
- if test "X$x" = "X$found_dir"; then
- haveit=yes
- break
- fi
- done
- if test -z "$haveit"; then
- rpathdirs="$rpathdirs $found_dir"
- fi
- else
- dnl Rely on "-L$found_dir".
- dnl But don't add it if it's already contained in the LDFLAGS
- dnl or the already constructed $LIBNAME
- haveit=
- for x in $LDFLAGS $LIB[]NAME; do
- AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
- if test "X$x" = "X-L$found_dir"; then
- haveit=yes
- break
- fi
- done
- if test -z "$haveit"; then
- LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir"
- fi
- if test "$hardcode_minus_L" != no; then
- dnl FIXME: Not sure whether we should use
- dnl "-L$found_dir -l$name" or "-L$found_dir $found_so"
- dnl here.
- LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
- else
- dnl We cannot use $hardcode_runpath_var and LD_RUN_PATH
- dnl here, because this doesn't fit in flags passed to the
- dnl compiler. So give up. No hardcoding. This affects only
- dnl very old systems.
- dnl FIXME: Not sure whether we should use
- dnl "-L$found_dir -l$name" or "-L$found_dir $found_so"
- dnl here.
- LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name"
- fi
- fi
- fi
- fi
- else
- if test "X$found_a" != "X"; then
- dnl Linking with a static library.
- LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_a"
- else
- dnl We shouldn't come here, but anyway it's good to have a
- dnl fallback.
- LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir -l$name"
- fi
- fi
- dnl Assume the include files are nearby.
- additional_includedir=
- case "$found_dir" in
- */lib | */lib/)
- basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
- additional_includedir="$basedir/include"
- ;;
- esac
- if test "X$additional_includedir" != "X"; then
- dnl Potentially add $additional_includedir to $INCNAME.
- dnl But don't add it
- dnl 1. if it's the standard /usr/include,
- dnl 2. if it's /usr/local/include and we are using GCC on Linux,
- dnl 3. if it's already present in $CPPFLAGS or the already
- dnl constructed $INCNAME,
- dnl 4. if it doesn't exist as a directory.
- if test "X$additional_includedir" != "X/usr/include"; then
- haveit=
- if test "X$additional_includedir" = "X/usr/local/include"; then
- if test -n "$GCC"; then
- case $host_os in
- linux* | gnu* | k*bsd*-gnu) haveit=yes;;
- esac
- fi
- fi
- if test -z "$haveit"; then
- for x in $CPPFLAGS $INC[]NAME; do
- AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
- if test "X$x" = "X-I$additional_includedir"; then
- haveit=yes
- break
- fi
- done
- if test -z "$haveit"; then
- if test -d "$additional_includedir"; then
- dnl Really add $additional_includedir to $INCNAME.
- INC[]NAME="${INC[]NAME}${INC[]NAME:+ }-I$additional_includedir"
- fi
- fi
- fi
- fi
- fi
- dnl Look for dependencies.
- if test -n "$found_la"; then
- dnl Read the .la file. It defines the variables
- dnl dlname, library_names, old_library, dependency_libs, current,
- dnl age, revision, installed, dlopen, dlpreopen, libdir.
- save_libdir="$libdir"
- case "$found_la" in
- */* | *\\*) . "$found_la" ;;
- *) . "./$found_la" ;;
- esac
- libdir="$save_libdir"
- dnl We use only dependency_libs.
- for dep in $dependency_libs; do
- case "$dep" in
- -L*)
- additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
- dnl Potentially add $additional_libdir to $LIBNAME and $LTLIBNAME.
- dnl But don't add it
- dnl 1. if it's the standard /usr/lib,
- dnl 2. if it's /usr/local/lib and we are using GCC on Linux,
- dnl 3. if it's already present in $LDFLAGS or the already
- dnl constructed $LIBNAME,
- dnl 4. if it doesn't exist as a directory.
- if test "X$additional_libdir" != "X/usr/lib"; then
- haveit=
- if test "X$additional_libdir" = "X/usr/local/lib"; then
- if test -n "$GCC"; then
- case $host_os in
- linux* | gnu* | k*bsd*-gnu) haveit=yes;;
- esac
- fi
- fi
- if test -z "$haveit"; then
- haveit=
- for x in $LDFLAGS $LIB[]NAME; do
- AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
- if test "X$x" = "X-L$additional_libdir"; then
- haveit=yes
- break
- fi
- done
- if test -z "$haveit"; then
- if test -d "$additional_libdir"; then
- dnl Really add $additional_libdir to $LIBNAME.
- LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$additional_libdir"
- fi
- fi
- haveit=
- for x in $LDFLAGS $LTLIB[]NAME; do
- AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
- if test "X$x" = "X-L$additional_libdir"; then
- haveit=yes
- break
- fi
- done
- if test -z "$haveit"; then
- if test -d "$additional_libdir"; then
- dnl Really add $additional_libdir to $LTLIBNAME.
- LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$additional_libdir"
- fi
- fi
- fi
- fi
- ;;
- -R*)
- dir=`echo "X$dep" | sed -e 's/^X-R//'`
- if test "$enable_rpath" != no; then
- dnl Potentially add DIR to rpathdirs.
- dnl The rpathdirs will be appended to $LIBNAME at the end.
- haveit=
- for x in $rpathdirs; do
- if test "X$x" = "X$dir"; then
- haveit=yes
- break
- fi
- done
- if test -z "$haveit"; then
- rpathdirs="$rpathdirs $dir"
- fi
- dnl Potentially add DIR to ltrpathdirs.
- dnl The ltrpathdirs will be appended to $LTLIBNAME at the end.
- haveit=
- for x in $ltrpathdirs; do
- if test "X$x" = "X$dir"; then
- haveit=yes
- break
- fi
- done
- if test -z "$haveit"; then
- ltrpathdirs="$ltrpathdirs $dir"
- fi
- fi
- ;;
- -l*)
- dnl Handle this in the next round.
- names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
- ;;
- *.la)
- dnl Handle this in the next round. Throw away the .la's
- dnl directory; it is already contained in a preceding -L
- dnl option.
- names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
- ;;
- *)
- dnl Most likely an immediate library name.
- LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$dep"
- LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$dep"
- ;;
- esac
- done
- fi
- else
- dnl Didn't find the library; assume it is in the system directories
- dnl known to the linker and runtime loader. (All the system
- dnl directories known to the linker should also be known to the
- dnl runtime loader, otherwise the system is severely misconfigured.)
- LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name"
- LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-l$name"
- fi
- fi
- fi
- done
- done
- if test "X$rpathdirs" != "X"; then
- if test -n "$hardcode_libdir_separator"; then
- dnl Weird platform: only the last -rpath option counts, the user must
- dnl pass all path elements in one option. We can arrange that for a
- dnl single library, but not when more than one $LIBNAMEs are used.
- alldirs=
- for found_dir in $rpathdirs; do
- alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
- done
- dnl Note: hardcode_libdir_flag_spec uses $libdir and $wl.
- acl_save_libdir="$libdir"
- libdir="$alldirs"
- eval flag=\"$hardcode_libdir_flag_spec\"
- libdir="$acl_save_libdir"
- LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag"
- else
- dnl The -rpath options are cumulative.
- for found_dir in $rpathdirs; do
- acl_save_libdir="$libdir"
- libdir="$found_dir"
- eval flag=\"$hardcode_libdir_flag_spec\"
- libdir="$acl_save_libdir"
- LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag"
- done
- fi
- fi
- if test "X$ltrpathdirs" != "X"; then
- dnl When using libtool, the option that works for both libraries and
- dnl executables is -R. The -R options are cumulative.
- for found_dir in $ltrpathdirs; do
- LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-R$found_dir"
- done
- fi
-])
-
-dnl AC_LIB_APPENDTOVAR(VAR, CONTENTS) appends the elements of CONTENTS to VAR,
-dnl unless already present in VAR.
-dnl Works only for CPPFLAGS, not for LIB* variables because that sometimes
-dnl contains two or three consecutive elements that belong together.
-AC_DEFUN([AC_LIB_APPENDTOVAR],
-[
- for element in [$2]; do
- haveit=
- for x in $[$1]; do
- AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
- if test "X$x" = "X$element"; then
- haveit=yes
- break
- fi
- done
- if test -z "$haveit"; then
- [$1]="${[$1]}${[$1]:+ }$element"
- fi
- done
-])
-
-# lib-ld.m4 serial 3 (gettext-0.13)
-dnl Copyright (C) 1996-2003 Free Software Foundation, Inc.
-dnl This file is free software; the Free Software Foundation
-dnl gives unlimited permission to copy and/or distribute it,
-dnl with or without modifications, as long as this notice is preserved.
-
-dnl Subroutines of libtool.m4,
-dnl with replacements s/AC_/AC_LIB/ and s/lt_cv/acl_cv/ to avoid collision
-dnl with libtool.m4.
-
-dnl From libtool-1.4. Sets the variable with_gnu_ld to yes or no.
-AC_DEFUN([AC_LIB_PROG_LD_GNU],
-[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], acl_cv_prog_gnu_ld,
-[# I'd rather use --version here, but apparently some GNU ld's only accept -v.
-case `$LD -v 2>&1 </dev/null` in
-*GNU* | *'with BFD'*)
- acl_cv_prog_gnu_ld=yes ;;
-*)
- acl_cv_prog_gnu_ld=no ;;
-esac])
-with_gnu_ld=$acl_cv_prog_gnu_ld
-])
-
-dnl From libtool-1.4. Sets the variable LD.
-AC_DEFUN([AC_LIB_PROG_LD],
-[AC_ARG_WITH(gnu-ld,
-[ --with-gnu-ld assume the C compiler uses GNU ld [default=no]],
-test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no)
-AC_REQUIRE([AC_PROG_CC])dnl
-AC_REQUIRE([AC_CANONICAL_HOST])dnl
-# Prepare PATH_SEPARATOR.
-# The user is always right.
-if test "${PATH_SEPARATOR+set}" != set; then
- echo "#! /bin/sh" >conf$$.sh
- echo "exit 0" >>conf$$.sh
- chmod +x conf$$.sh
- if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
- PATH_SEPARATOR=';'
- else
- PATH_SEPARATOR=:
- fi
- rm -f conf$$.sh
-fi
-ac_prog=ld
-if test "$GCC" = yes; then
- # Check if gcc -print-prog-name=ld gives a path.
- AC_MSG_CHECKING([for ld used by GCC])
- case $host in
- *-*-mingw*)
- # gcc leaves a trailing carriage return which upsets mingw
- ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
- *)
- ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
- esac
- case $ac_prog in
- # Accept absolute paths.
- [[\\/]* | [A-Za-z]:[\\/]*)]
- [re_direlt='/[^/][^/]*/\.\./']
- # Canonicalize the path of ld
- ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
- while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
- ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
- done
- test -z "$LD" && LD="$ac_prog"
- ;;
- "")
- # If it fails, then pretend we aren't using GCC.
- ac_prog=ld
- ;;
- *)
- # If it is relative, then search for the first ld in PATH.
- with_gnu_ld=unknown
- ;;
- esac
-elif test "$with_gnu_ld" = yes; then
- AC_MSG_CHECKING([for GNU ld])
-else
- AC_MSG_CHECKING([for non-GNU ld])
-fi
-AC_CACHE_VAL(acl_cv_path_LD,
-[if test -z "$LD"; then
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
- for ac_dir in $PATH; do
- test -z "$ac_dir" && ac_dir=.
- if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
- acl_cv_path_LD="$ac_dir/$ac_prog"
- # Check to see if the program is GNU ld. I'd rather use --version,
- # but apparently some GNU ld's only accept -v.
- # Break only if it was the GNU/non-GNU ld that we prefer.
- case `"$acl_cv_path_LD" -v 2>&1 < /dev/null` in
- *GNU* | *'with BFD'*)
- test "$with_gnu_ld" != no && break ;;
- *)
- test "$with_gnu_ld" != yes && break ;;
- esac
- fi
- done
- IFS="$ac_save_ifs"
-else
- acl_cv_path_LD="$LD" # Let the user override the test with a path.
-fi])
-LD="$acl_cv_path_LD"
-if test -n "$LD"; then
- AC_MSG_RESULT($LD)
-else
- AC_MSG_RESULT(no)
-fi
-test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
-AC_LIB_PROG_LD_GNU
-])
-
-dnl This provides configure definitions used by all the winsup
-dnl configure.in files.
-
-# FIXME: We temporarily define our own version of AC_PROG_CC. This is
-# copied from autoconf 2.12, but does not call AC_PROG_CC_WORKS. We
-# are probably using a cross compiler, which will not be able to fully
-# link an executable. This should really be fixed in autoconf
-# itself.
-
-AC_DEFUN([LIB_AC_PROG_CC_GNU],
-[AC_CACHE_CHECK(whether we are using GNU C, ac_cv_prog_gcc,
-[dnl The semicolon is to pacify NeXT's syntax-checking cpp.
-cat > conftest.c <<EOF
-#ifdef __GNUC__
- yes;
-#endif
-EOF
-if AC_TRY_COMMAND(${CC-cc} -E conftest.c) | egrep yes >/dev/null 2>&1; then
- ac_cv_prog_gcc=yes
-else
- ac_cv_prog_gcc=no
-fi])])
-
-AC_DEFUN([LIB_AC_PROG_CC],
-[AC_BEFORE([$0], [AC_PROG_CPP])dnl
-AC_CHECK_TOOL(CC, gcc, gcc)
-: ${CC:=gcc}
-AC_PROG_CC
-test -z "$CC" && AC_MSG_ERROR([no acceptable cc found in \$PATH])
-])
-
-AC_DEFUN([LIB_AC_PROG_CXX],
-[AC_BEFORE([$0], [AC_PROG_CPP])dnl
-AC_CHECK_TOOL(CXX, g++, g++)
-if test -z "$CXX"; then
- AC_CHECK_TOOL(CXX, g++, c++, , , )
- : ${CXX:=g++}
- AC_PROG_CXX
- test -z "$CC" && AC_MSG_ERROR([no acceptable cc found in \$PATH])
-fi
-
-CXXFLAGS='$(CFLAGS)'
-])
-
diff --git a/winsup/lsaauth/configure b/winsup/lsaauth/configure
index 51e28587b..173d3a887 100755
--- a/winsup/lsaauth/configure
+++ b/winsup/lsaauth/configure
@@ -1,11 +1,11 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.68.
+# Generated by GNU Autoconf 2.69 for Cygwin Lsaauth 0.
#
+# Report bugs to <cygwin@cygwin.com>.
#
-# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
-# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software
-# Foundation, Inc.
+#
+# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
#
#
# This configure script is free software; the Free Software Foundation
@@ -134,6 +134,31 @@ export LANGUAGE
# CDPATH.
(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
+# Use a proper internal environment variable to ensure we don't fall
+ # into an infinite loop, continuously re-executing ourselves.
+ if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
+ _as_can_reexec=no; export _as_can_reexec;
+ # We cannot yet assume a decent shell, so we have to provide a
+# neutralization value for shells without unset; and this also
+# works around shells that cannot unset nonexistent variables.
+# Preserve -v and -x to the replacement shell.
+BASH_ENV=/dev/null
+ENV=/dev/null
+(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
+case $- in # ((((
+ *v*x* | *x*v* ) as_opts=-vx ;;
+ *v* ) as_opts=-v ;;
+ *x* ) as_opts=-x ;;
+ * ) as_opts= ;;
+esac
+exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
+# Admittedly, this is quite paranoid, since all the known shells bail
+# out after a failed `exec'.
+$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
+as_fn_exit 255
+ fi
+ # We don't want this to propagate to other subprocesses.
+ { _as_can_reexec=; unset _as_can_reexec;}
if test "x$CONFIG_SHELL" = x; then
as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
emulate sh
@@ -167,7 +192,8 @@ if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
else
exitcode=1; echo positional parameters were not saved.
fi
-test x\$exitcode = x0 || exit 1"
+test x\$exitcode = x0 || exit 1
+test -x / || exit 1"
as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
@@ -211,21 +237,25 @@ IFS=$as_save_IFS
if test "x$CONFIG_SHELL" != x; then :
- # We cannot yet assume a decent shell, so we have to provide a
- # neutralization value for shells without unset; and this also
- # works around shells that cannot unset nonexistent variables.
- # Preserve -v and -x to the replacement shell.
- BASH_ENV=/dev/null
- ENV=/dev/null
- (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
- export CONFIG_SHELL
- case $- in # ((((
- *v*x* | *x*v* ) as_opts=-vx ;;
- *v* ) as_opts=-v ;;
- *x* ) as_opts=-x ;;
- * ) as_opts= ;;
- esac
- exec "$CONFIG_SHELL" $as_opts "$as_myself" ${1+"$@"}
+ export CONFIG_SHELL
+ # We cannot yet assume a decent shell, so we have to provide a
+# neutralization value for shells without unset; and this also
+# works around shells that cannot unset nonexistent variables.
+# Preserve -v and -x to the replacement shell.
+BASH_ENV=/dev/null
+ENV=/dev/null
+(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
+case $- in # ((((
+ *v*x* | *x*v* ) as_opts=-vx ;;
+ *v* ) as_opts=-v ;;
+ *x* ) as_opts=-x ;;
+ * ) as_opts= ;;
+esac
+exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
+# Admittedly, this is quite paranoid, since all the known shells bail
+# out after a failed `exec'.
+$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
+exit 255
fi
if test x$as_have_required = xno; then :
@@ -235,10 +265,11 @@ fi
$as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
$as_echo "$0: be upgraded to zsh 4.3.4 or later."
else
- $as_echo "$0: Please tell bug-autoconf@gnu.org about your system,
-$0: including any error possibly output before this
-$0: message. Then install a modern shell, or manually run
-$0: the script under such a shell if you do have one."
+ $as_echo "$0: Please tell bug-autoconf@gnu.org and cygwin@cygwin.com
+$0: about your system, including any error possibly output
+$0: before this message. Then install a modern shell, or
+$0: manually run the script under such a shell if you do
+$0: have one."
fi
exit 1
fi
@@ -327,6 +358,14 @@ $as_echo X"$as_dir" |
} # as_fn_mkdir_p
+
+# as_fn_executable_p FILE
+# -----------------------
+# Test if FILE is an executable regular file.
+as_fn_executable_p ()
+{
+ test -f "$1" && test -x "$1"
+} # as_fn_executable_p
# as_fn_append VAR VALUE
# ----------------------
# Append the text in VALUE to the end of the definition contained in VAR. Take
@@ -448,6 +487,10 @@ as_cr_alnum=$as_cr_Letters$as_cr_digits
chmod +x "$as_me.lineno" ||
{ $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
+ # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
+ # already done that, so ensure we don't try to do so again and fall
+ # in an infinite loop. This has already happened in practice.
+ _as_can_reexec=no; export _as_can_reexec
# Don't try to exec as it changes $[0], causing all sort of problems
# (the dirname of $[0] is not the place where we might find the
# original and so on. Autoconf is especially sensitive to this).
@@ -482,16 +525,16 @@ if (echo >conf$$.file) 2>/dev/null; then
# ... but there are two gotchas:
# 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
# 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
- # In both cases, we have to default to `cp -p'.
+ # In both cases, we have to default to `cp -pR'.
ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
- as_ln_s='cp -p'
+ as_ln_s='cp -pR'
elif ln conf$$.file conf$$ 2>/dev/null; then
as_ln_s=ln
else
- as_ln_s='cp -p'
+ as_ln_s='cp -pR'
fi
else
- as_ln_s='cp -p'
+ as_ln_s='cp -pR'
fi
rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
rmdir conf$$.dir 2>/dev/null
@@ -503,28 +546,8 @@ else
as_mkdir_p=false
fi
-if test -x / >/dev/null 2>&1; then
- as_test_x='test -x'
-else
- if ls -dL / >/dev/null 2>&1; then
- as_ls_L_option=L
- else
- as_ls_L_option=
- fi
- as_test_x='
- eval sh -c '\''
- if test -d "$1"; then
- test -d "$1/.";
- else
- case $1 in #(
- -*)set "./$1";;
- esac;
- case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
- ???[sx]*):;;*)false;;esac;fi
- '\'' sh
- '
-fi
-as_executable_p=$as_test_x
+as_test_x='test -x'
+as_executable_p=as_fn_executable_p
# Sed expression to map a string onto a valid CPP name.
as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
@@ -554,12 +577,12 @@ MFLAGS=
MAKEFLAGS=
# Identity of this package.
-PACKAGE_NAME=
-PACKAGE_TARNAME=
-PACKAGE_VERSION=
-PACKAGE_STRING=
-PACKAGE_BUGREPORT=
-PACKAGE_URL=
+PACKAGE_NAME='Cygwin Lsaauth'
+PACKAGE_TARNAME='cygwin'
+PACKAGE_VERSION='0'
+PACKAGE_STRING='Cygwin Lsaauth 0'
+PACKAGE_BUGREPORT='cygwin@cygwin.com'
+PACKAGE_URL='https://cygwin.com'
ac_unique_file="Makefile.in"
ac_no_link=no
@@ -679,7 +702,7 @@ sharedstatedir='${prefix}/com'
localstatedir='${prefix}/var'
includedir='${prefix}/include'
oldincludedir='/usr/include'
-docdir='${datarootdir}/doc/${PACKAGE}'
+docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
infodir='${datarootdir}/info'
htmldir='${docdir}'
dvidir='${docdir}'
@@ -1094,8 +1117,6 @@ target=$target_alias
if test "x$host_alias" != x; then
if test "x$build_alias" = x; then
cross_compiling=maybe
- $as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host.
- If a cross compiler is detected then cross compile mode will be used" >&2
elif test "x$build_alias" != "x$host_alias"; then
cross_compiling=yes
fi
@@ -1181,7 +1202,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures this package to adapt to many kinds of systems.
+\`configure' configures Cygwin Lsaauth 0 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1229,7 +1250,7 @@ Fine tuning of the installation directories:
--infodir=DIR info documentation [DATAROOTDIR/info]
--localedir=DIR locale-dependent data [DATAROOTDIR/locale]
--mandir=DIR man documentation [DATAROOTDIR/man]
- --docdir=DIR documentation root [DATAROOTDIR/doc/PACKAGE]
+ --docdir=DIR documentation root [DATAROOTDIR/doc/cygwin]
--htmldir=DIR html documentation [DOCDIR]
--dvidir=DIR dvi documentation [DOCDIR]
--pdfdir=DIR pdf documentation [DOCDIR]
@@ -1251,7 +1272,9 @@ _ACEOF
fi
if test -n "$ac_init_help"; then
-
+ case $ac_init_help in
+ short | recursive ) echo "Configuration of Cygwin Lsaauth 0:";;
+ esac
cat <<\_ACEOF
Some influential environment variables:
@@ -1266,7 +1289,8 @@ Some influential environment variables:
Use these variables to override the choices made by `configure' or to help
it to find libraries and programs with nonstandard names/locations.
-Report bugs to the package provider.
+Report bugs to <cygwin@cygwin.com>.
+Cygwin Lsaauth home page: <https://cygwin.com>.
_ACEOF
ac_status=$?
fi
@@ -1329,10 +1353,10 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-configure
-generated by GNU Autoconf 2.68
+Cygwin Lsaauth configure 0
+generated by GNU Autoconf 2.69
-Copyright (C) 2010 Free Software Foundation, Inc.
+Copyright (C) 2012 Free Software Foundation, Inc.
This configure script is free software; the Free Software Foundation
gives unlimited permission to copy, distribute and modify it.
_ACEOF
@@ -1384,8 +1408,8 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by $as_me, which was
-generated by GNU Autoconf 2.68. Invocation command line was
+It was created by Cygwin Lsaauth $as_me 0, which was
+generated by GNU Autoconf 2.69. Invocation command line was
$ $0 $@
@@ -1733,6 +1757,7 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
ac_aux_dir=
for ac_dir in ../.. "$srcdir"/../..; do
if test -f "$ac_dir/install-sh"; then
@@ -1875,100 +1900,6 @@ test -n "$target_alias" &&
NONENONEs,x,x, &&
program_prefix=${target_alias}-
-
-if test -n "$ac_tool_prefix"; then
- # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
-set dummy ${ac_tool_prefix}gcc; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_CC+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- if test -n "$CC"; then
- ac_cv_prog_CC="$CC" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_prog_CC="${ac_tool_prefix}gcc"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
- done
-IFS=$as_save_IFS
-
-fi
-fi
-CC=$ac_cv_prog_CC
-if test -n "$CC"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
-$as_echo "$CC" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-fi
-if test -z "$ac_cv_prog_CC"; then
- ac_ct_CC=$CC
- # Extract the first word of "gcc", so it can be a program name with args.
-set dummy gcc; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_ac_ct_CC+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- if test -n "$ac_ct_CC"; then
- ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_prog_ac_ct_CC="gcc"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
- done
-IFS=$as_save_IFS
-
-fi
-fi
-ac_ct_CC=$ac_cv_prog_ac_ct_CC
-if test -n "$ac_ct_CC"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
-$as_echo "$ac_ct_CC" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
- if test "x$ac_ct_CC" = x; then
- CC="gcc"
- else
- case $cross_compiling:$ac_tool_warned in
-yes:)
-{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
-$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
-ac_tool_warned=yes ;;
-esac
- CC=$ac_ct_CC
- fi
-else
- CC="$ac_cv_prog_CC"
-fi
-
-: ${CC:=gcc}
ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
@@ -1991,7 +1922,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_CC="${ac_tool_prefix}gcc"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -2031,7 +1962,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_ac_ct_CC="gcc"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -2084,7 +2015,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_CC="${ac_tool_prefix}cc"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -2125,7 +2056,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
ac_prog_rejected=yes
continue
@@ -2183,7 +2114,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -2227,7 +2158,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_ac_ct_CC="$ac_prog"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -2749,8 +2680,7 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <stdarg.h>
#include <stdio.h>
-#include <sys/types.h>
-#include <sys/stat.h>
+struct stat;
/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
struct buf { int x; };
FILE * (*rcsopen) (struct buf *, struct stat *, int);
@@ -2835,8 +2765,6 @@ ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_c_compiler_gnu
-test -z "$CC" && as_fn_error $? "no acceptable cc found in \$PATH" "$LINENO" 5
-
case "$target_cpu" in
i?86)
@@ -2858,7 +2786,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_MINGW32_CC="$ac_prog"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -2904,7 +2832,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_MINGW64_CC="$ac_prog"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -2978,7 +2906,7 @@ case $as_dir/ in #((
# by default.
for ac_prog in ginstall scoinst install; do
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
if test $ac_prog = install &&
grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
# AIX install. It has an incompatible calling convention.
@@ -3480,16 +3408,16 @@ if (echo >conf$$.file) 2>/dev/null; then
# ... but there are two gotchas:
# 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
# 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
- # In both cases, we have to default to `cp -p'.
+ # In both cases, we have to default to `cp -pR'.
ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
- as_ln_s='cp -p'
+ as_ln_s='cp -pR'
elif ln conf$$.file conf$$ 2>/dev/null; then
as_ln_s=ln
else
- as_ln_s='cp -p'
+ as_ln_s='cp -pR'
fi
else
- as_ln_s='cp -p'
+ as_ln_s='cp -pR'
fi
rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
rmdir conf$$.dir 2>/dev/null
@@ -3549,28 +3477,16 @@ else
as_mkdir_p=false
fi
-if test -x / >/dev/null 2>&1; then
- as_test_x='test -x'
-else
- if ls -dL / >/dev/null 2>&1; then
- as_ls_L_option=L
- else
- as_ls_L_option=
- fi
- as_test_x='
- eval sh -c '\''
- if test -d "$1"; then
- test -d "$1/.";
- else
- case $1 in #(
- -*)set "./$1";;
- esac;
- case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
- ???[sx]*):;;*)false;;esac;fi
- '\'' sh
- '
-fi
-as_executable_p=$as_test_x
+
+# as_fn_executable_p FILE
+# -----------------------
+# Test if FILE is an executable regular file.
+as_fn_executable_p ()
+{
+ test -f "$1" && test -x "$1"
+} # as_fn_executable_p
+as_test_x='test -x'
+as_executable_p=as_fn_executable_p
# Sed expression to map a string onto a valid CPP name.
as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
@@ -3591,8 +3507,8 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by $as_me, which was
-generated by GNU Autoconf 2.68. Invocation command line was
+This file was extended by Cygwin Lsaauth $as_me 0, which was
+generated by GNU Autoconf 2.69. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
CONFIG_HEADERS = $CONFIG_HEADERS
@@ -3638,17 +3554,18 @@ Usage: $0 [OPTION]... [TAG]...
Configuration files:
$config_files
-Report bugs to the package provider."
+Report bugs to <cygwin@cygwin.com>.
+Cygwin Lsaauth home page: <https://cygwin.com>."
_ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
-config.status
-configured by $0, generated by GNU Autoconf 2.68,
+Cygwin Lsaauth config.status 0
+configured by $0, generated by GNU Autoconf 2.69,
with options \\"\$ac_cs_config\\"
-Copyright (C) 2010 Free Software Foundation, Inc.
+Copyright (C) 2012 Free Software Foundation, Inc.
This config.status script is free software; the Free Software Foundation
gives unlimited permission to copy, distribute and modify it."
@@ -3726,7 +3643,7 @@ fi
_ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
if \$ac_cs_recheck; then
- set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
+ set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
shift
\$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
CONFIG_SHELL='$SHELL'
diff --git a/winsup/lsaauth/configure.ac b/winsup/lsaauth/configure.ac
index fe2e30bf0..995a0991d 100644
--- a/winsup/lsaauth/configure.ac
+++ b/winsup/lsaauth/configure.ac
@@ -1,29 +1,26 @@
-dnl Copyright (c) 2006, Red Hat, Inc.
-dnl
-dnl This program is free software; you can redistribute it and/or modify
-dnl it under the terms of the GNU General Public License as published by
-dnl the Free Software Foundation; either version 2 of the License, or
-dnl (at your option) any later version.
+dnl Autoconf configure script for Cygwin utilities.
dnl
-dnl A copy of the GNU General Public License can be found at
-dnl http://www.gnu.org/
+dnl This file is part of Cygwin.
+dnl
+dnl This software is a copyrighted work licensed under the terms of the
+dnl Cygwin license. Please consult the file "CYGWIN_LICENSE" for
+dnl details.
dnl
dnl Written by Christopher Faylor <cgf@redhat.com>
dnl Changed for lsa subdir by Corinna Vinschen <corinna@vinschen.de>
-dnl Autoconf configure script for Cygwin utilities.
-dnl
dnl Process this file with autoconf to produce a configure script.
-AC_PREREQ(2.59)
-AC_INIT(Makefile.in)
+AC_PREREQ([2.59])
+AC_INIT([Cygwin Lsaauth],[0],[cygwin@cygwin.com],[cygwin],[https://cygwin.com])
+AC_CONFIG_SRCDIR(Makefile.in)
AC_CONFIG_AUX_DIR(../..)
AC_NO_EXECUTABLES
-AC_CANONICAL_SYSTEM
+AC_CANONICAL_TARGET
-LIB_AC_PROG_CC
+AC_PROG_CC
case "$target_cpu" in
i?86)
@@ -39,4 +36,5 @@ AC_ARG_PROGRAM
AC_PROG_INSTALL
-AC_OUTPUT(Makefile cyglsa.def:cyglsa.din)
+AC_CONFIG_FILES([Makefile cyglsa.def:cyglsa.din])
+AC_OUTPUT
diff --git a/winsup/lsaauth/cyglsa-config b/winsup/lsaauth/cyglsa-config
index 076a16694..0e911c278 100755
--- a/winsup/lsaauth/cyglsa-config
+++ b/winsup/lsaauth/cyglsa-config
@@ -1,7 +1,5 @@
#!/bin/bash
#
-# cyglsa-config, Copyright 2006, 2010 Red Hat Inc.
-#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
diff --git a/winsup/lsaauth/cyglsa.c b/winsup/lsaauth/cyglsa.c
index 341fdd12c..9d9c9ff03 100644
--- a/winsup/lsaauth/cyglsa.c
+++ b/winsup/lsaauth/cyglsa.c
@@ -1,7 +1,5 @@
/* cyglsa.c: LSA authentication module for Cygwin
- Copyright 2006, 2008, 2010, 2011, 2012 Red Hat, Inc.
-
Written by Corinna Vinschen <corinna@vinschen.de>
This file is part of Cygwin.
@@ -20,7 +18,6 @@ Cygwin license. Please consult the file "CYGWIN_LICENSE" for details. */
#include "../cygwin/include/cygwin/version.h"
static PLSA_SECPKG_FUNCS funcs;
-static BOOL must_create_logon_sid;
BOOL APIENTRY
DllMain (HINSTANCE inst, DWORD reason, LPVOID res)
@@ -252,7 +249,6 @@ LsaApInitializePackage (ULONG authp_id, PLSA_SECPKG_FUNCS dpt,
PLSA_STRING *authp_name)
{
PLSA_STRING name = NULL;
- DWORD vers, major, minor;
/* Set global pointer to lsa helper function table. */
funcs = dpt;
@@ -271,14 +267,6 @@ LsaApInitializePackage (ULONG authp_id, PLSA_SECPKG_FUNCS dpt,
strcpy (name->Buffer, CYG_LSA_PKGNAME);
(*authp_name) = name;
- vers = GetVersion ();
- major = LOBYTE (LOWORD (vers));
- minor = HIBYTE (LOWORD (vers));
- /* Check if we're running on Windows 2000 or lower. If so, we must create
- the logon sid in the group list by ourselves. */
- if (major < 5 || (major == 5 && minor == 0))
- must_create_logon_sid = TRUE;
-
#ifdef DEBUGGING
fh = CreateFile ("C:\\cyglsa.dbgout", GENERIC_WRITE,
FILE_SHARE_READ | FILE_SHARE_WRITE | FILE_SHARE_DELETE,
@@ -540,14 +528,6 @@ LsaApLogonUserEx (PLSA_CLIENT_REQUEST request, SECURITY_LOGON_TYPE logon_type,
{
/* ...on 32 bit systems we just allocate tokinf with the same size as
we get, copy the whole structure and convert offsets into pointers. */
-
- /* Allocate LUID for usage in the logon SID on Windows 2000. This is
- not done in the 64 bit code above for hopefully obvious reasons... */
- LUID logon_sid_id;
-
- if (must_create_logon_sid && !AllocateLocallyUniqueId (&logon_sid_id))
- return STATUS_INSUFFICIENT_RESOURCES;
-
if (!(tokinf = funcs->AllocateLsaHeap (authinf->inf_size)))
return STATUS_NO_MEMORY;
memcpy (tokinf, &authinf->inf, authinf->inf_size);
@@ -560,22 +540,8 @@ LsaApLogonUserEx (PLSA_CLIENT_REQUEST request, SECURITY_LOGON_TYPE logon_type,
((PBYTE) tokinf + (LONG_PTR) tokinf->Groups);
/* Group SIDs */
for (i = 0; i < tokinf->Groups->GroupCount; ++i)
- {
- tokinf->Groups->Groups[i].Sid = (PSID)
- ((PBYTE) tokinf + (LONG_PTR) tokinf->Groups->Groups[i].Sid);
- if (must_create_logon_sid
- && tokinf->Groups->Groups[i].Attributes & SE_GROUP_LOGON_ID
- && *GetSidSubAuthorityCount (tokinf->Groups->Groups[i].Sid) == 3
- && *GetSidSubAuthority (tokinf->Groups->Groups[i].Sid, 0)
- == SECURITY_LOGON_IDS_RID)
- {
- *GetSidSubAuthority (tokinf->Groups->Groups[i].Sid, 1)
- = logon_sid_id.HighPart;
- *GetSidSubAuthority (tokinf->Groups->Groups[i].Sid, 2)
- = logon_sid_id.LowPart;
- }
- }
-
+ tokinf->Groups->Groups[i].Sid = (PSID)
+ ((PBYTE) tokinf + (LONG_PTR) tokinf->Groups->Groups[i].Sid);
/* Primary Group SID */
tokinf->PrimaryGroup.PrimaryGroup = (PSID)
((PBYTE) tokinf + (LONG_PTR) tokinf->PrimaryGroup.PrimaryGroup);
@@ -587,7 +553,6 @@ LsaApLogonUserEx (PLSA_CLIENT_REQUEST request, SECURITY_LOGON_TYPE logon_type,
/* Default DACL */
tokinf->DefaultDacl.DefaultDacl = (PACL)
((PBYTE) tokinf + (LONG_PTR) tokinf->DefaultDacl.DefaultDacl);
-
}
#endif
diff --git a/winsup/testsuite/Makefile.in b/winsup/testsuite/Makefile.in
index 04ff99bc0..a86a35b88 100644
--- a/winsup/testsuite/Makefile.in
+++ b/winsup/testsuite/Makefile.in
@@ -1,5 +1,4 @@
# Makefile.in for Cygwin's testsuite.
-# Copyright 2000, 2001, 2002, 2003, 2005, 2006, 2009, 2012 Red Hat, Inc.
#
# This file is part of Cygwin.
#
diff --git a/winsup/testsuite/configure b/winsup/testsuite/configure
index f0767845a..da4616582 100644..100755
--- a/winsup/testsuite/configure
+++ b/winsup/testsuite/configure
@@ -1,11 +1,11 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.68.
+# Generated by GNU Autoconf 2.69 for Cygwin Testsuite 0.
#
+# Report bugs to <cygwin@cygwin.com>.
#
-# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
-# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software
-# Foundation, Inc.
+#
+# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
#
#
# This configure script is free software; the Free Software Foundation
@@ -134,6 +134,31 @@ export LANGUAGE
# CDPATH.
(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
+# Use a proper internal environment variable to ensure we don't fall
+ # into an infinite loop, continuously re-executing ourselves.
+ if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
+ _as_can_reexec=no; export _as_can_reexec;
+ # We cannot yet assume a decent shell, so we have to provide a
+# neutralization value for shells without unset; and this also
+# works around shells that cannot unset nonexistent variables.
+# Preserve -v and -x to the replacement shell.
+BASH_ENV=/dev/null
+ENV=/dev/null
+(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
+case $- in # ((((
+ *v*x* | *x*v* ) as_opts=-vx ;;
+ *v* ) as_opts=-v ;;
+ *x* ) as_opts=-x ;;
+ * ) as_opts= ;;
+esac
+exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
+# Admittedly, this is quite paranoid, since all the known shells bail
+# out after a failed `exec'.
+$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
+as_fn_exit 255
+ fi
+ # We don't want this to propagate to other subprocesses.
+ { _as_can_reexec=; unset _as_can_reexec;}
if test "x$CONFIG_SHELL" = x; then
as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
emulate sh
@@ -167,7 +192,8 @@ if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
else
exitcode=1; echo positional parameters were not saved.
fi
-test x\$exitcode = x0 || exit 1"
+test x\$exitcode = x0 || exit 1
+test -x / || exit 1"
as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
@@ -211,21 +237,25 @@ IFS=$as_save_IFS
if test "x$CONFIG_SHELL" != x; then :
- # We cannot yet assume a decent shell, so we have to provide a
- # neutralization value for shells without unset; and this also
- # works around shells that cannot unset nonexistent variables.
- # Preserve -v and -x to the replacement shell.
- BASH_ENV=/dev/null
- ENV=/dev/null
- (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
- export CONFIG_SHELL
- case $- in # ((((
- *v*x* | *x*v* ) as_opts=-vx ;;
- *v* ) as_opts=-v ;;
- *x* ) as_opts=-x ;;
- * ) as_opts= ;;
- esac
- exec "$CONFIG_SHELL" $as_opts "$as_myself" ${1+"$@"}
+ export CONFIG_SHELL
+ # We cannot yet assume a decent shell, so we have to provide a
+# neutralization value for shells without unset; and this also
+# works around shells that cannot unset nonexistent variables.
+# Preserve -v and -x to the replacement shell.
+BASH_ENV=/dev/null
+ENV=/dev/null
+(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
+case $- in # ((((
+ *v*x* | *x*v* ) as_opts=-vx ;;
+ *v* ) as_opts=-v ;;
+ *x* ) as_opts=-x ;;
+ * ) as_opts= ;;
+esac
+exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
+# Admittedly, this is quite paranoid, since all the known shells bail
+# out after a failed `exec'.
+$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
+exit 255
fi
if test x$as_have_required = xno; then :
@@ -235,10 +265,11 @@ fi
$as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
$as_echo "$0: be upgraded to zsh 4.3.4 or later."
else
- $as_echo "$0: Please tell bug-autoconf@gnu.org about your system,
-$0: including any error possibly output before this
-$0: message. Then install a modern shell, or manually run
-$0: the script under such a shell if you do have one."
+ $as_echo "$0: Please tell bug-autoconf@gnu.org and cygwin@cygwin.com
+$0: about your system, including any error possibly output
+$0: before this message. Then install a modern shell, or
+$0: manually run the script under such a shell if you do
+$0: have one."
fi
exit 1
fi
@@ -327,6 +358,14 @@ $as_echo X"$as_dir" |
} # as_fn_mkdir_p
+
+# as_fn_executable_p FILE
+# -----------------------
+# Test if FILE is an executable regular file.
+as_fn_executable_p ()
+{
+ test -f "$1" && test -x "$1"
+} # as_fn_executable_p
# as_fn_append VAR VALUE
# ----------------------
# Append the text in VALUE to the end of the definition contained in VAR. Take
@@ -448,6 +487,10 @@ as_cr_alnum=$as_cr_Letters$as_cr_digits
chmod +x "$as_me.lineno" ||
{ $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
+ # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
+ # already done that, so ensure we don't try to do so again and fall
+ # in an infinite loop. This has already happened in practice.
+ _as_can_reexec=no; export _as_can_reexec
# Don't try to exec as it changes $[0], causing all sort of problems
# (the dirname of $[0] is not the place where we might find the
# original and so on. Autoconf is especially sensitive to this).
@@ -482,16 +525,16 @@ if (echo >conf$$.file) 2>/dev/null; then
# ... but there are two gotchas:
# 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
# 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
- # In both cases, we have to default to `cp -p'.
+ # In both cases, we have to default to `cp -pR'.
ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
- as_ln_s='cp -p'
+ as_ln_s='cp -pR'
elif ln conf$$.file conf$$ 2>/dev/null; then
as_ln_s=ln
else
- as_ln_s='cp -p'
+ as_ln_s='cp -pR'
fi
else
- as_ln_s='cp -p'
+ as_ln_s='cp -pR'
fi
rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
rmdir conf$$.dir 2>/dev/null
@@ -503,28 +546,8 @@ else
as_mkdir_p=false
fi
-if test -x / >/dev/null 2>&1; then
- as_test_x='test -x'
-else
- if ls -dL / >/dev/null 2>&1; then
- as_ls_L_option=L
- else
- as_ls_L_option=
- fi
- as_test_x='
- eval sh -c '\''
- if test -d "$1"; then
- test -d "$1/.";
- else
- case $1 in #(
- -*)set "./$1";;
- esac;
- case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
- ???[sx]*):;;*)false;;esac;fi
- '\'' sh
- '
-fi
-as_executable_p=$as_test_x
+as_test_x='test -x'
+as_executable_p=as_fn_executable_p
# Sed expression to map a string onto a valid CPP name.
as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
@@ -554,12 +577,12 @@ MFLAGS=
MAKEFLAGS=
# Identity of this package.
-PACKAGE_NAME=
-PACKAGE_TARNAME=
-PACKAGE_VERSION=
-PACKAGE_STRING=
-PACKAGE_BUGREPORT=
-PACKAGE_URL=
+PACKAGE_NAME='Cygwin Testsuite'
+PACKAGE_TARNAME='cygwin'
+PACKAGE_VERSION='0'
+PACKAGE_STRING='Cygwin Testsuite 0'
+PACKAGE_BUGREPORT='cygwin@cygwin.com'
+PACKAGE_URL='https://cygwin.com'
ac_unique_file="Makefile.in"
ac_subst_vars='LTLIBOBJS
@@ -664,7 +687,7 @@ sharedstatedir='${prefix}/com'
localstatedir='${prefix}/var'
includedir='${prefix}/include'
oldincludedir='/usr/include'
-docdir='${datarootdir}/doc/${PACKAGE}'
+docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
infodir='${datarootdir}/info'
htmldir='${docdir}'
dvidir='${docdir}'
@@ -1079,8 +1102,6 @@ target=$target_alias
if test "x$host_alias" != x; then
if test "x$build_alias" = x; then
cross_compiling=maybe
- $as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host.
- If a cross compiler is detected then cross compile mode will be used" >&2
elif test "x$build_alias" != "x$host_alias"; then
cross_compiling=yes
fi
@@ -1166,7 +1187,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures this package to adapt to many kinds of systems.
+\`configure' configures Cygwin Testsuite 0 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1214,7 +1235,7 @@ Fine tuning of the installation directories:
--infodir=DIR info documentation [DATAROOTDIR/info]
--localedir=DIR locale-dependent data [DATAROOTDIR/locale]
--mandir=DIR man documentation [DATAROOTDIR/man]
- --docdir=DIR documentation root [DATAROOTDIR/doc/PACKAGE]
+ --docdir=DIR documentation root [DATAROOTDIR/doc/cygwin]
--htmldir=DIR html documentation [DOCDIR]
--dvidir=DIR dvi documentation [DOCDIR]
--pdfdir=DIR pdf documentation [DOCDIR]
@@ -1226,7 +1247,9 @@ _ACEOF
fi
if test -n "$ac_init_help"; then
-
+ case $ac_init_help in
+ short | recursive ) echo "Configuration of Cygwin Testsuite 0:";;
+ esac
cat <<\_ACEOF
Some influential environment variables:
@@ -1242,7 +1265,8 @@ Some influential environment variables:
Use these variables to override the choices made by `configure' or to help
it to find libraries and programs with nonstandard names/locations.
-Report bugs to the package provider.
+Report bugs to <cygwin@cygwin.com>.
+Cygwin Testsuite home page: <https://cygwin.com>.
_ACEOF
ac_status=$?
fi
@@ -1305,10 +1329,10 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-configure
-generated by GNU Autoconf 2.68
+Cygwin Testsuite configure 0
+generated by GNU Autoconf 2.69
-Copyright (C) 2010 Free Software Foundation, Inc.
+Copyright (C) 2012 Free Software Foundation, Inc.
This configure script is free software; the Free Software Foundation
gives unlimited permission to copy, distribute and modify it.
_ACEOF
@@ -1397,8 +1421,8 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by $as_me, which was
-generated by GNU Autoconf 2.68. Invocation command line was
+It was created by Cygwin Testsuite $as_me 0, which was
+generated by GNU Autoconf 2.69. Invocation command line was
$ $0 $@
@@ -1656,7 +1680,7 @@ $as_echo "$as_me: loading site script $ac_site_file" >&6;}
|| { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
as_fn_error $? "failed to load site script $ac_site_file
-See \`config.log' for more details" "$LINENO" 5 ; }
+See \`config.log' for more details" "$LINENO" 5; }
fi
done
@@ -1746,6 +1770,7 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
@@ -1768,7 +1793,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_CC="${ac_tool_prefix}gcc"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -1808,7 +1833,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_ac_ct_CC="gcc"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -1861,7 +1886,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_CC="${ac_tool_prefix}cc"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -1902,7 +1927,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
ac_prog_rejected=yes
continue
@@ -1960,7 +1985,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -2004,7 +2029,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_ac_ct_CC="$ac_prog"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -2047,7 +2072,7 @@ fi
test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
as_fn_error $? "no acceptable C compiler found in \$PATH
-See \`config.log' for more details" "$LINENO" 5 ; }
+See \`config.log' for more details" "$LINENO" 5; }
# Provide some information about the compiler.
$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
@@ -2162,7 +2187,7 @@ sed 's/^/| /' conftest.$ac_ext >&5
{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
as_fn_error 77 "C compiler cannot create executables
-See \`config.log' for more details" "$LINENO" 5 ; }
+See \`config.log' for more details" "$LINENO" 5; }
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
@@ -2205,7 +2230,7 @@ else
{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
as_fn_error $? "cannot compute suffix of executables: cannot compile and link
-See \`config.log' for more details" "$LINENO" 5 ; }
+See \`config.log' for more details" "$LINENO" 5; }
fi
rm -f conftest conftest$ac_cv_exeext
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
@@ -2264,7 +2289,7 @@ $as_echo "$ac_try_echo"; } >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
as_fn_error $? "cannot run C compiled programs.
If you meant to cross compile, use \`--host'.
-See \`config.log' for more details" "$LINENO" 5 ; }
+See \`config.log' for more details" "$LINENO" 5; }
fi
fi
fi
@@ -2316,7 +2341,7 @@ sed 's/^/| /' conftest.$ac_ext >&5
{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
as_fn_error $? "cannot compute suffix of object files: cannot compile
-See \`config.log' for more details" "$LINENO" 5 ; }
+See \`config.log' for more details" "$LINENO" 5; }
fi
rm -f conftest.$ac_cv_objext conftest.$ac_ext
fi
@@ -2450,8 +2475,7 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <stdarg.h>
#include <stdio.h>
-#include <sys/types.h>
-#include <sys/stat.h>
+struct stat;
/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
struct buf { int x; };
FILE * (*rcsopen) (struct buf *, struct stat *, int);
@@ -2664,7 +2688,7 @@ else
{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
-See \`config.log' for more details" "$LINENO" 5 ; }
+See \`config.log' for more details" "$LINENO" 5; }
fi
ac_ext=c
@@ -2690,7 +2714,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_AR="${ac_tool_prefix}ar"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -2730,7 +2754,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_ac_ct_AR="ar"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -3211,16 +3235,16 @@ if (echo >conf$$.file) 2>/dev/null; then
# ... but there are two gotchas:
# 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
# 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
- # In both cases, we have to default to `cp -p'.
+ # In both cases, we have to default to `cp -pR'.
ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
- as_ln_s='cp -p'
+ as_ln_s='cp -pR'
elif ln conf$$.file conf$$ 2>/dev/null; then
as_ln_s=ln
else
- as_ln_s='cp -p'
+ as_ln_s='cp -pR'
fi
else
- as_ln_s='cp -p'
+ as_ln_s='cp -pR'
fi
rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
rmdir conf$$.dir 2>/dev/null
@@ -3280,28 +3304,16 @@ else
as_mkdir_p=false
fi
-if test -x / >/dev/null 2>&1; then
- as_test_x='test -x'
-else
- if ls -dL / >/dev/null 2>&1; then
- as_ls_L_option=L
- else
- as_ls_L_option=
- fi
- as_test_x='
- eval sh -c '\''
- if test -d "$1"; then
- test -d "$1/.";
- else
- case $1 in #(
- -*)set "./$1";;
- esac;
- case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
- ???[sx]*):;;*)false;;esac;fi
- '\'' sh
- '
-fi
-as_executable_p=$as_test_x
+
+# as_fn_executable_p FILE
+# -----------------------
+# Test if FILE is an executable regular file.
+as_fn_executable_p ()
+{
+ test -f "$1" && test -x "$1"
+} # as_fn_executable_p
+as_test_x='test -x'
+as_executable_p=as_fn_executable_p
# Sed expression to map a string onto a valid CPP name.
as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
@@ -3322,8 +3334,8 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by $as_me, which was
-generated by GNU Autoconf 2.68. Invocation command line was
+This file was extended by Cygwin Testsuite $as_me 0, which was
+generated by GNU Autoconf 2.69. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
CONFIG_HEADERS = $CONFIG_HEADERS
@@ -3369,17 +3381,18 @@ Usage: $0 [OPTION]... [TAG]...
Configuration files:
$config_files
-Report bugs to the package provider."
+Report bugs to <cygwin@cygwin.com>.
+Cygwin Testsuite home page: <https://cygwin.com>."
_ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
-config.status
-configured by $0, generated by GNU Autoconf 2.68,
+Cygwin Testsuite config.status 0
+configured by $0, generated by GNU Autoconf 2.69,
with options \\"\$ac_cs_config\\"
-Copyright (C) 2010 Free Software Foundation, Inc.
+Copyright (C) 2012 Free Software Foundation, Inc.
This config.status script is free software; the Free Software Foundation
gives unlimited permission to copy, distribute and modify it."
@@ -3456,7 +3469,7 @@ fi
_ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
if \$ac_cs_recheck; then
- set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
+ set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
shift
\$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
CONFIG_SHELL='$SHELL'
@@ -3487,7 +3500,7 @@ do
case $ac_config_target in
"Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
- *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5 ;;
+ *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
esac
done
@@ -3695,7 +3708,7 @@ do
esac
case $ac_mode$ac_tag in
:[FHL]*:*);;
- :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5 ;;
+ :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
:[FH]-) ac_tag=-:-;;
:[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
esac
@@ -3723,7 +3736,7 @@ do
[\\/$]*) false;;
*) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
esac ||
- as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5 ;;
+ as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
esac
case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
as_fn_append ac_file_inputs " '$ac_f'"
@@ -3750,7 +3763,7 @@ $as_echo "$as_me: creating $ac_file" >&6;}
case $ac_tag in
*:-:* | *:-) cat >"$ac_tmp/stdin" \
- || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
+ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
esac
;;
esac
diff --git a/winsup/testsuite/configure.ac b/winsup/testsuite/configure.ac
index 37190f9d9..46f9fb092 100755
--- a/winsup/testsuite/configure.ac
+++ b/winsup/testsuite/configure.ac
@@ -1,5 +1,4 @@
dnl Autoconf configure script for Cygwin's testsuite.
-dnl Copyright 2000 Red Hat, Inc.
dnl
dnl This file is part of Cygwin.
dnl
@@ -10,7 +9,8 @@ dnl
dnl Process this file with autoconf to produce a configure script.
AC_PREREQ(2.59)
-AC_INIT(Makefile.in)
+AC_INIT([Cygwin Testsuite],[0],[cygwin@cygwin.com],[cygwin],[https://cygwin.com])
+AC_CONFIG_SRCDIR(Makefile.in)
AC_PROG_CC
AC_PROG_CPP
diff --git a/winsup/testsuite/cygrun.c b/winsup/testsuite/cygrun.c
index 60330ca33..d1f53aad3 100644
--- a/winsup/testsuite/cygrun.c
+++ b/winsup/testsuite/cygrun.c
@@ -1,7 +1,5 @@
/* cygrun.c: testsuite support program
- Copyright 1999, 2000, 2001, 2002 Red Hat, Inc.
-
This file is part of Cygwin.
This software is a copyrighted work licensed under the terms of the
diff --git a/winsup/testsuite/winsup.api/cygload.cc b/winsup/testsuite/winsup.api/cygload.cc
index bdbbcd1a3..ad4599666 100644
--- a/winsup/testsuite/winsup.api/cygload.cc
+++ b/winsup/testsuite/winsup.api/cygload.cc
@@ -1,7 +1,5 @@
/* cygload.cc
- Copyright 2005, 2006 Red Hat, Inc.
-
Written by Max Kaehn <slothman@electric-cloud.com>
This software is a copyrighted work licensed under the terms of the
diff --git a/winsup/testsuite/winsup.api/cygload.h b/winsup/testsuite/winsup.api/cygload.h
index c7c562093..8007fd593 100644
--- a/winsup/testsuite/winsup.api/cygload.h
+++ b/winsup/testsuite/winsup.api/cygload.h
@@ -1,6 +1,5 @@
// cygload.h -*- C++ -*-
//
-// Copyright 2005, Red Hat, Inc.
//
// Written by Max Kaehn <slothman@electric-cloud.com>
//
diff --git a/winsup/testsuite/winsup.api/devdsp.c b/winsup/testsuite/winsup.api/devdsp.c
index d5ed65365..6c8850a74 100644
--- a/winsup/testsuite/winsup.api/devdsp.c
+++ b/winsup/testsuite/winsup.api/devdsp.c
@@ -1,7 +1,5 @@
/* devdsp.c: Device tests for /dev/dsp
- Copyright 2004 Red Hat, Inc
-
Written by Gerd Spalink (Gerd.Spalink@t-online.de)
This file is part of Cygwin.
diff --git a/winsup/testsuite/winsup.api/signal-into-win32-api.c b/winsup/testsuite/winsup.api/signal-into-win32-api.c
index 57ab8b5c8..57ab8b5c8 100755..100644
--- a/winsup/testsuite/winsup.api/signal-into-win32-api.c
+++ b/winsup/testsuite/winsup.api/signal-into-win32-api.c
diff --git a/winsup/utils/Makefile.in b/winsup/utils/Makefile.in
index dc72bebff..0ad73fb76 100644
--- a/winsup/utils/Makefile.in
+++ b/winsup/utils/Makefile.in
@@ -1,6 +1,4 @@
# Makefile for Cygwin utilities
-# Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
-# 2007, 2008, 2009, 2010, 2011, 2012 Red Hat, Inc.
# This file is part of Cygwin.
@@ -56,7 +54,7 @@ MINGW_CXX := @MINGW_CXX@
# List all binaries to be linked in Cygwin mode. Each binary on this list
# must have a corresponding .o of the same name.
-CYGWIN_BINS := ${addsuffix .exe,cygpath getconf getfacl ldd locale kill mkgroup \
+CYGWIN_BINS := ${addsuffix .exe,cygpath getconf getfacl ldd locale kill minidumper mkgroup \
mkpasswd mount passwd pldd ps regtool setfacl setmetamode ssp tzset umount}
# List all binaries to be linked in MinGW mode. Each binary on this list
@@ -84,9 +82,18 @@ path-mount.o: path.cc
${COMPILE.cc} -c -DFSTAB_ONLY -o $@ $<
mount.exe: path-mount.o
+.PHONY: tzmap
+tzmap:
+ ${srcdir}/tzmap-from-unicode.org > ${srcdir}/$@.h
+
+tzmap.h:
+ [ -f "${srcdir}/tzmap.h" ] || ${srcdir}/tzmap-from-unicode.org > ${srcdir}/$@
+
+tzset.o: tzmap.h
+
# Provide any necessary per-target variable overrides.
-cygcheck.exe: MINGW_LDFLAGS += ${ZLIB} -lpsapi -lntdll
+cygcheck.exe: MINGW_LDFLAGS += ${ZLIB} -lwininet -lpsapi -lntdll
cygcheck.exe: ${CYGCHECK_OBJS}
cygpath.o: CXXFLAGS += -fno-threadsafe-statics
@@ -96,6 +103,7 @@ strace.exe: MINGW_LDFLAGS += -lntdll
ldd.exe:CYGWIN_LDFLAGS += -lpsapi
pldd.exe: CYGWIN_LDFLAGS += -lpsapi
+minidumper.exe: CYGWIN_LDFLAGS += -ldbghelp
ldh.exe: MINGW_LDFLAGS += -nostdlib -lkernel32
@@ -108,7 +116,7 @@ CYGWIN_BINS += dumper.exe
dumper.o module_info.o parse_pe.o: CXXFLAGS += -I$(top_srcdir)/include
dumper.o parse_pe.o: dumper.h
dumper.exe: module_info.o parse_pe.o
-dumper.exe: CYGWIN_LDFLAGS += -lbfd -lintl -liconv -liberty ${ZLIB}
+dumper.exe: CYGWIN_LDFLAGS += -lpsapi -lbfd -lintl -liconv -liberty ${ZLIB}
else
all: warn_dumper
endif
diff --git a/winsup/utils/aclocal.m4 b/winsup/utils/aclocal.m4
index b08bdfec5..c48aad01d 100644
--- a/winsup/utils/aclocal.m4
+++ b/winsup/utils/aclocal.m4
@@ -1,4 +1,4 @@
-# generated automatically by aclocal 1.12.1 -*- Autoconf -*-
+# generated automatically by aclocal 1.12.6 -*- Autoconf -*-
# Copyright (C) 1996-2012 Free Software Foundation, Inc.
diff --git a/winsup/utils/bloda.cc b/winsup/utils/bloda.cc
index 6ff433fa9..ffaee5229 100644
--- a/winsup/utils/bloda.cc
+++ b/winsup/utils/bloda.cc
@@ -1,7 +1,5 @@
/* bloda.cc
- Copyright 2007, 2008, 2011, 2012 Red Hat, Inc.
-
This file is part of Cygwin.
This software is a copyrighted work licensed under the terms of the
diff --git a/winsup/utils/configure b/winsup/utils/configure
index 76432e743..32f75d6e0 100755
--- a/winsup/utils/configure
+++ b/winsup/utils/configure
@@ -1,6 +1,8 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.69.
+# Generated by GNU Autoconf 2.69 for Cygwin Utils 0.
+#
+# Report bugs to <cygwin@cygwin.com>.
#
#
# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
@@ -263,10 +265,11 @@ fi
$as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
$as_echo "$0: be upgraded to zsh 4.3.4 or later."
else
- $as_echo "$0: Please tell bug-autoconf@gnu.org about your system,
-$0: including any error possibly output before this
-$0: message. Then install a modern shell, or manually run
-$0: the script under such a shell if you do have one."
+ $as_echo "$0: Please tell bug-autoconf@gnu.org and cygwin@cygwin.com
+$0: about your system, including any error possibly output
+$0: before this message. Then install a modern shell, or
+$0: manually run the script under such a shell if you do
+$0: have one."
fi
exit 1
fi
@@ -574,12 +577,12 @@ MFLAGS=
MAKEFLAGS=
# Identity of this package.
-PACKAGE_NAME=
-PACKAGE_TARNAME=
-PACKAGE_VERSION=
-PACKAGE_STRING=
-PACKAGE_BUGREPORT=
-PACKAGE_URL=
+PACKAGE_NAME='Cygwin Utils'
+PACKAGE_TARNAME='cygwin'
+PACKAGE_VERSION='0'
+PACKAGE_STRING='Cygwin Utils 0'
+PACKAGE_BUGREPORT='cygwin@cygwin.com'
+PACKAGE_URL='https://cygwin.com'
ac_unique_file="mount.cc"
ac_no_link=no
@@ -596,6 +599,7 @@ windows_headers
ac_ct_CXX
CXXFLAGS
CXX
+windows_libdir
OBJEXT
EXEEXT
ac_ct_CC
@@ -615,7 +619,6 @@ build_os
build_vendor
build_cpu
build
-windows_libdir
target_alias
host_alias
build_alias
@@ -713,7 +716,7 @@ sharedstatedir='${prefix}/com'
localstatedir='${prefix}/var'
includedir='${prefix}/include'
oldincludedir='/usr/include'
-docdir='${datarootdir}/doc/${PACKAGE}'
+docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
infodir='${datarootdir}/info'
htmldir='${docdir}'
dvidir='${docdir}'
@@ -1213,7 +1216,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures this package to adapt to many kinds of systems.
+\`configure' configures Cygwin Utils 0 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1261,7 +1264,7 @@ Fine tuning of the installation directories:
--infodir=DIR info documentation [DATAROOTDIR/info]
--localedir=DIR locale-dependent data [DATAROOTDIR/locale]
--mandir=DIR man documentation [DATAROOTDIR/man]
- --docdir=DIR documentation root [DATAROOTDIR/doc/PACKAGE]
+ --docdir=DIR documentation root [DATAROOTDIR/doc/cygwin]
--htmldir=DIR html documentation [DOCDIR]
--dvidir=DIR dvi documentation [DOCDIR]
--pdfdir=DIR pdf documentation [DOCDIR]
@@ -1283,7 +1286,9 @@ _ACEOF
fi
if test -n "$ac_init_help"; then
-
+ case $ac_init_help in
+ short | recursive ) echo "Configuration of Cygwin Utils 0:";;
+ esac
cat <<\_ACEOF
Optional Packages:
@@ -1307,7 +1312,8 @@ Some influential environment variables:
Use these variables to override the choices made by `configure' or to help
it to find libraries and programs with nonstandard names/locations.
-Report bugs to the package provider.
+Report bugs to <cygwin@cygwin.com>.
+Cygwin Utils home page: <https://cygwin.com>.
_ACEOF
ac_status=$?
fi
@@ -1370,7 +1376,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-configure
+Cygwin Utils configure 0
generated by GNU Autoconf 2.69
Copyright (C) 2012 Free Software Foundation, Inc.
@@ -1463,7 +1469,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by $as_me, which was
+It was created by Cygwin Utils $as_me 0, which was
generated by GNU Autoconf 2.69. Invocation command line was
$ $0 $@
@@ -1811,6 +1817,7 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $
ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
ac_aux_dir=
for ac_dir in ../.. "$srcdir"/../..; do
if test -f "$ac_dir/install-sh"; then
@@ -1845,34 +1852,6 @@ ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
. ${srcdir}/../configure.cygwin
-
-
-# Check whether --with-windows-headers was given.
-if test "${with_windows_headers+set}" = set; then :
- withval=$with_windows_headers; test -z "$withval" && as_fn_error $? "must specify value for --with-windows-headers" "$LINENO" 5
-
-fi
-
-
-
-
-# Check whether --with-windows-libs was given.
-if test "${with_windows_libs+set}" = set; then :
- withval=$with_windows_libs; test -z "$withval" && as_fn_error $? "must specify value for --with-windows-libs" "$LINENO" 5
-
-fi
-
-windows_libdir=$(realdirpath "$with_windows_libs")
-if test -z "$windows_libdir"; then
- windows_libdir=$(realdirpath $(${ac_cv_prog_CC:-$CC} -xc /dev/null -Wl,--verbose=1 -lntdll 2>&1 | sed -rn 's%^.*\s(\S+)/libntdll\..*succeeded%\1%p'))
- if test -z "$windows_libdir"; then
- as_fn_error $? "cannot find windows library files" "$LINENO" 5
- fi
-fi
-
-
-
-
# Make sure we can run config.sub.
$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
@@ -1984,7 +1963,6 @@ test -n "$target_alias" &&
NONENONEs,x,x, &&
program_prefix=${target_alias}-
-
ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
@@ -2850,6 +2828,35 @@ ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+
+# Check whether --with-windows-headers was given.
+if test "${with_windows_headers+set}" = set; then :
+ withval=$with_windows_headers; test -z "$withval" && as_fn_error $? "must specify value for --with-windows-headers" "$LINENO" 5
+
+fi
+
+
+
+
+# Check whether --with-windows-libs was given.
+if test "${with_windows_libs+set}" = set; then :
+ withval=$with_windows_libs; test -z "$withval" && as_fn_error $? "must specify value for --with-windows-libs" "$LINENO" 5
+
+fi
+
+windows_libdir=$(realdirpath "$with_windows_libs")
+if test -z "$windows_libdir"; then
+ windows_libdir=$(realdirpath $(${ac_cv_prog_CC:-$CC} -xc /dev/null -Wl,--verbose=1 -lntdll 2>&1 | sed -rn 's%^.*\s(\S+)/libntdll\..*succeeded%\1%p'))
+ if test -z "$windows_libdir"; then
+ as_fn_error $? "cannot find windows library files" "$LINENO" 5
+ fi
+fi
+
+
+
+
ac_ext=cpp
ac_cpp='$CXXCPP $CPPFLAGS'
ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
@@ -3852,7 +3859,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by $as_me, which was
+This file was extended by Cygwin Utils $as_me 0, which was
generated by GNU Autoconf 2.69. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -3899,13 +3906,14 @@ Usage: $0 [OPTION]... [TAG]...
Configuration files:
$config_files
-Report bugs to the package provider."
+Report bugs to <cygwin@cygwin.com>.
+Cygwin Utils home page: <https://cygwin.com>."
_ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
-config.status
+Cygwin Utils config.status 0
configured by $0, generated by GNU Autoconf 2.69,
with options \\"\$ac_cs_config\\"
diff --git a/winsup/utils/configure.ac b/winsup/utils/configure.ac
index 2cd45239f..63fc55e56 100644
--- a/winsup/utils/configure.ac
+++ b/winsup/utils/configure.ac
@@ -1,5 +1,4 @@
dnl Autoconf configure script for Cygwin utilities.
-dnl Copyright 1996, 1997, 1998, 1999, 2000 Cygnus Solutions.
dnl
dnl This file is part of Cygwin.
dnl
@@ -9,20 +8,22 @@ dnl details.
dnl Process this file with autoconf to produce a configure script.
-AC_PREREQ(2.59)
-AC_INIT(mount.cc)
+AC_PREREQ([2.59])
+AC_INIT([Cygwin Utils],[0],[cygwin@cygwin.com],[cygwin],[https://cygwin.com])
+AC_CONFIG_SRCDIR(mount.cc)
AC_CONFIG_AUX_DIR(../..)
AC_NO_EXECUTABLES
. ${srcdir}/../configure.cygwin
+AC_CANONICAL_TARGET
+
+AC_PROG_CC
+
AC_WINDOWS_HEADERS
AC_WINDOWS_LIBS
-AC_CANONICAL_SYSTEM
-
-AC_PROG_CC
AC_PROG_CXX
AC_CYGWIN_INCLUDES
@@ -36,4 +37,5 @@ test -n "$MINGW_CXX" || AC_MSG_ERROR([no acceptable mingw g++ found in \$PATH])
AC_EXEEXT
AC_CONFIGURE_ARGS
-AC_OUTPUT(Makefile)
+AC_CONFIG_FILES([Makefile])
+AC_OUTPUT
diff --git a/winsup/utils/cygcheck.cc b/winsup/utils/cygcheck.cc
index b9e93b966..4f311f2b6 100644
--- a/winsup/utils/cygcheck.cc
+++ b/winsup/utils/cygcheck.cc
@@ -1,14 +1,12 @@
/* cygcheck.cc
- Copyright 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008,
- 2009, 2010, 2011, 2012, 2013 Red Hat, Inc.
-
This file is part of Cygwin.
This software is a copyrighted work licensed under the terms of the
Cygwin license. Please consult the file "CYGWIN_LICENSE" for
details. */
+#define _WIN32_WINNT 0x0602
#define cygwin_internal cygwin_internal_dontuse
#include <stdio.h>
#include <stdlib.h>
@@ -26,7 +24,6 @@
#include "../cygwin/include/sys/cygwin.h"
#define _NOMNTENT_MACROS
#include "../cygwin/include/mntent.h"
-#include "../cygwin/cygprops.h"
#undef cygwin_internal
#include "loadlib.h"
@@ -49,14 +46,9 @@ int find_package = 0;
int list_package = 0;
int grep_packages = 0;
int del_orphaned_reg = 0;
-int unique_object_name_opt = 0;
static char emptystr[] = "";
-/* This is global because it's used in both internet_display_error as well
- as package_grep. */
-BOOL (WINAPI *pInternetCloseHandle) (HINTERNET);
-
#ifdef __GNUC__
typedef long long longlong;
#else
@@ -135,9 +127,6 @@ static common_apps[] = {
enum
{
CO_DELETE_KEYS = 0x100,
- CO_ENABLE_UON = 0x101,
- CO_DISABLE_UON = 0x102,
- CO_SHOW_UON = 0x103
};
static int num_paths, max_paths;
@@ -230,7 +219,7 @@ display_internet_error (const char *message, ...)
va_start (hptr, message);
while ((h = va_arg (hptr, HINTERNET)) != 0)
- pInternetCloseHandle (h);
+ InternetCloseHandle (h);
va_end (hptr);
return 1;
@@ -590,9 +579,6 @@ cygwin_info (HANDLE h)
return;
}
-/* Special case. Don't complain about this one. */
-#define CYGLSA64_DLL "\\cyglsa64.dll"
-
static void
dll_info (const char *path, HANDLE fh, int lvl, int recurse)
{
@@ -770,7 +756,12 @@ track_down (const char *file, const char *suffix, int lvl)
const char *path = find_on_path (file, suffix, false, true);
if (!path)
{
- display_error ("track_down: could not find %s\n", file);
+ /* The api-ms-win-*.dll files are in system32/downlevel and not in the
+ DLL search path, so find_on_path doesn't find them. Since they are
+ never actually linked against by the executables, they are of no
+ interest to us. Skip any error message in not finding them. */
+ if (strncasecmp (file, "api-ms-win-", 11) || strcasecmp (suffix, ".dll"))
+ display_error ("track_down: could not find %s\n", file);
return false;
}
@@ -1342,88 +1333,7 @@ memmem (char *haystack, size_t haystacklen,
return NULL;
}
-int
-handle_unique_object_name (int opt, char *path)
-{
- HANDLE fh, fm;
- void *haystack = NULL;
-
- if (!path || !*path)
- usage (stderr, 1);
-
- DWORD access, share, protect, mapping;
-
- if (opt == CO_SHOW_UON)
- {
- access = GENERIC_READ;
- share = FILE_SHARE_READ | FILE_SHARE_WRITE | FILE_SHARE_DELETE;
- protect = PAGE_READONLY;
- mapping = FILE_MAP_READ;
- }
- else
- {
- access = GENERIC_READ | GENERIC_WRITE;
- share = 0;
- protect = PAGE_READWRITE;
- mapping = FILE_MAP_WRITE;
- }
-
- fh = CreateFile (path, access, share, NULL, OPEN_EXISTING,
- FILE_FLAG_BACKUP_SEMANTICS, NULL);
- if (fh == INVALID_HANDLE_VALUE)
- {
- DWORD err = GetLastError ();
- switch (err)
- {
- case ERROR_SHARING_VIOLATION:
- display_error ("%s still used by other Cygwin processes.\n"
- "Please stop all of them and retry.", path);
- break;
- case ERROR_ACCESS_DENIED:
- display_error (
- "Your permissions are not sufficient to change the file \"%s\"",
- path);
- break;
- case ERROR_FILE_NOT_FOUND:
- display_error ("%s: No such file.", path);
- break;
- default:
- display_error (path, true, false);
- break;
- }
- return 1;
- }
- if (!(fm = CreateFileMapping (fh, NULL, protect, 0, 0, NULL)))
- display_error ("CreateFileMapping");
- else if (!(haystack = MapViewOfFile (fm, mapping, 0, 0, 0)))
- display_error ("MapViewOfFile");
- else
- {
- size_t haystacklen = GetFileSize (fh, NULL);
- cygwin_props_t *cygwin_props = (cygwin_props_t *)
- memmem ((char *) haystack, haystacklen,
- CYGWIN_PROPS_MAGIC, sizeof (CYGWIN_PROPS_MAGIC));
- if (!cygwin_props)
- display_error ("Can't find Cygwin properties in %s", path);
- else
- {
- if (opt != CO_SHOW_UON)
- cygwin_props->disable_key = opt - CO_ENABLE_UON;
- printf ("Unique object names are %s\n",
- cygwin_props->disable_key ? "disabled" : "enabled");
- UnmapViewOfFile (haystack);
- CloseHandle (fm);
- CloseHandle (fh);
- return 0;
- }
- }
- if (haystack)
- UnmapViewOfFile (haystack);
- if (fm)
- CloseHandle (fm);
- CloseHandle (fh);
- return 1;
-}
+extern "C" NTSTATUS NTAPI RtlGetVersion (PRTL_OSVERSIONINFOEXW);
static void
dump_sysinfo ()
@@ -1433,56 +1343,71 @@ dump_sysinfo ()
time_t now;
char *found_cygwin_dll;
bool is_nt = false;
- bool more_info = true;
char osname[128];
DWORD obcaseinsensitive = 1;
HKEY key;
+ /* MSVCRT popen (called by pretty_id and dump_sysinfo_services) SEGVs if
+ COMSPEC isn't set correctly. Simply enforce it here. Using
+ Get/SetEnvironmentVariable to set the dir does *not* help, btw.
+ Apparently MSVCRT keeps its own copy of the environment and changing
+ that requires to use _wputenv. */
+ if (!_wgetenv (L"COMSPEC"))
+ {
+ WCHAR comspec[MAX_PATH + 17];
+ wcscpy (comspec, L"COMSPEC=");
+ GetSystemDirectoryW (comspec + 8, MAX_PATH);
+ wcsncat (comspec, L"\\cmd.exe", sizeof comspec);
+ _wputenv (comspec);
+ }
+
printf ("\nCygwin Configuration Diagnostics\n");
time (&now);
printf ("Current System Time: %s\n", ctime (&now));
- OSVERSIONINFOEX osversion;
- osversion.dwOSVersionInfoSize = sizeof (OSVERSIONINFOEX);
- if (!GetVersionEx (reinterpret_cast<LPOSVERSIONINFO>(&osversion)))
- {
- more_info = false;
- osversion.dwOSVersionInfoSize = sizeof (OSVERSIONINFO);
- if (!GetVersionEx (reinterpret_cast<LPOSVERSIONINFO>(&osversion)))
- display_error ("dump_sysinfo: GetVersionEx()");
- }
-
- HMODULE k32 = GetModuleHandleW (L"kernel32.dll");
+ RTL_OSVERSIONINFOEXW osversion;
+ osversion.dwOSVersionInfoSize = sizeof (RTL_OSVERSIONINFOEXW);
+ RtlGetVersion (&osversion);
switch (osversion.dwPlatformId)
{
- case VER_PLATFORM_WIN32s:
- strcpy (osname, "32s (not supported)");
- break;
- case VER_PLATFORM_WIN32_WINDOWS:
- strcpy (osname, "95/98/Me (not supported)");
- break;
case VER_PLATFORM_WIN32_NT:
is_nt = true;
- if (osversion.dwMajorVersion == 6)
+ if (osversion.dwMajorVersion >= 6)
{
+ HMODULE k32 = GetModuleHandleW (L"kernel32.dll");
BOOL (WINAPI *GetProductInfo) (DWORD, DWORD, DWORD, DWORD, PDWORD) =
(BOOL (WINAPI *)(DWORD, DWORD, DWORD, DWORD, PDWORD))
GetProcAddress (k32, "GetProductInfo");
- switch (osversion.dwMinorVersion)
+ if (osversion.dwMajorVersion == 6)
+ switch (osversion.dwMinorVersion)
+ {
+ case 0:
+ strcpy (osname, osversion.wProductType == VER_NT_WORKSTATION
+ ? "Vista" : "2008");
+ break;
+ case 1:
+ strcpy (osname, osversion.wProductType == VER_NT_WORKSTATION
+ ? "7" : "2008 R2");
+ break;
+ case 2:
+ strcpy (osname, osversion.wProductType == VER_NT_WORKSTATION
+ ? "8" : "2012");
+ break;
+ case 3:
+ strcpy (osname, osversion.wProductType == VER_NT_WORKSTATION
+ ? "8.1" : "2012 R2");
+ break;
+ case 4:
+ default:
+ strcpy (osname, osversion.wProductType == VER_NT_WORKSTATION
+ ? "10 Preview" : "2016 Preview");
+ break;
+ }
+ else if (osversion.dwMajorVersion == 10)
{
- case 0:
strcpy (osname, osversion.wProductType == VER_NT_WORKSTATION
- ? "Vista" : "2008");
- break;
- case 1:
- strcpy (osname, osversion.wProductType == VER_NT_WORKSTATION
- ? "7" : "2008 R2");
- break;
- default:
- strcpy (osname, osversion.wProductType == VER_NT_WORKSTATION
- ? "8" : "2012");
- break;
+ ? "10" : "2016");
}
DWORD prod;
if (GetProductInfo (osversion.dwMajorVersion,
@@ -1491,10 +1416,6 @@ dump_sysinfo ()
osversion.wServicePackMinor,
&prod))
{
-#define PRODUCT_UNLICENSED 0xabcdabcd
-#ifndef PRODUCT_PROFESSIONAL_WMC
-#define PRODUCT_PROFESSIONAL_WMC 0x00000067
-#endif
const char *products[] =
{
/* 0x00000000 */ "",
@@ -1528,7 +1449,7 @@ dump_sysinfo ()
/* 0x0000001c */ " Ultimate N",
/* 0x0000001d */ " Web Server Core",
/* 0x0000001e */ " Essential Business Server Management Server",
- /* 0x0000001f */ " Essential Business Server Security Server"
+ /* 0x0000001f */ " Essential Business Server Security Server",
/* 0x00000020 */ " Essential Business Server Messaging Server",
/* 0x00000021 */ " Server Foundation",
/* 0x00000022 */ " Home Server 2011",
@@ -1547,7 +1468,7 @@ dump_sysinfo ()
/* 0x0000002f */ " Starter N",
/* 0x00000030 */ " Professional",
/* 0x00000031 */ " Professional N",
- /* 0x00000032 */ " Small Business Server 2011 Essentials"
+ /* 0x00000032 */ " Small Business Server 2011 Essentials",
/* 0x00000033 */ " Server For SB Solutions",
/* 0x00000034 */ " Server Solutions Premium",
/* 0x00000035 */ " Server Solutions Premium Core",
@@ -1568,7 +1489,7 @@ dump_sysinfo ()
/* 0x00000044 */ " Home Premium E",
/* 0x00000045 */ " Professional E",
/* 0x00000046 */ " Enterprise E",
- /* 0x00000047 */ " Ultimate E"
+ /* 0x00000047 */ " Ultimate E",
/* 0x00000048 */ " Server Enterprise (Evaluation inst.)",
/* 0x00000049 */ "",
/* 0x0000004a */ "",
@@ -1595,16 +1516,46 @@ dump_sysinfo ()
/* 0x0000005f */ " Storage Server Workgroup (Evaluation inst.)",
/* 0x00000060 */ " Storage Server Standard (Evaluation inst.)",
/* 0x00000061 */ "",
- /* 0x00000062 */ " N", /* "8 N" */
- /* 0x00000063 */ " China", /* "8 China" */
- /* 0x00000064 */ " Single Language", /* "8 Single Language" */
- /* 0x00000065 */ "", /* "8" */
+ /* 0x00000062 */ " N",
+ /* 0x00000063 */ " China",
+ /* 0x00000064 */ " Single Language",
+ /* 0x00000065 */ " Home",
/* 0x00000066 */ "",
- /* 0x00000067 */ " Professional with Media Center"
+ /* 0x00000067 */ " Professional with Media Center",
+ /* 0x00000068 */ " Mobile",
+ /* 0x00000069 */ "",
+ /* 0x0000006a */ "",
+ /* 0x0000006b */ "",
+ /* 0x0000006c */ "",
+ /* 0x0000006d */ "",
+ /* 0x0000006e */ "",
+ /* 0x0000006f */ "",
+ /* 0x00000070 */ "",
+ /* 0x00000071 */ "",
+ /* 0x00000072 */ "",
+ /* 0x00000073 */ "",
+ /* 0x00000074 */ "",
+ /* 0x00000075 */ "",
+ /* 0x00000076 */ "",
+ /* 0x00000077 */ "",
+ /* 0x00000078 */ "",
+ /* 0x00000079 */ " Education",
+ /* 0x0000007a */ " Education N",
+ /* 0x0000007b */ "",
+ /* 0x0000007c */ "",
+ /* 0x0000007d */ "",
+ /* 0x0000007e */ "",
+ /* 0x0000007f */ "",
+ /* 0x00000080 */ "",
+ /* 0x00000081 */ "",
+ /* 0x00000082 */ "",
+ /* 0x00000083 */ "",
+ /* 0x00000084 */ "",
+ /* 0x00000085 */ " Mobile Enterprise",
};
if (prod == PRODUCT_UNLICENSED)
strcat (osname, "Unlicensed");
- else if (prod > PRODUCT_PROFESSIONAL_WMC)
+ else if (prod > 0x00000085)
strcat (osname, "");
else
strcat (osname, products[prod]);
@@ -1615,19 +1566,8 @@ dump_sysinfo ()
}
else if (osversion.dwMajorVersion == 5)
{
- if (osversion.dwMinorVersion == 0)
- {
- strcpy (osname, "2000");
- if (osversion.wProductType == VER_NT_WORKSTATION)
- strcat (osname, " Professional");
- else if (osversion.wSuiteMask & VER_SUITE_DATACENTER)
- strcat (osname, " Datacenter Server");
- else if (osversion.wSuiteMask & VER_SUITE_ENTERPRISE)
- strcat (osname, " Advanced Server");
- else
- strcat (osname, " Server");
- }
- else if (osversion.dwMinorVersion == 1)
+ /* cygcheck won't run on Windows 200 or earlier. */
+ if (osversion.dwMinorVersion == 1)
{
strcpy (osname, "XP");
if (GetSystemMetrics (SM_MEDIACENTER))
@@ -1656,21 +1596,6 @@ dump_sysinfo ()
strcat (osname, " Compute Cluster Edition");
}
}
- else if (osversion.dwMajorVersion == 4)
- {
- strcpy (osname, "NT 4");
- if (more_info)
- {
- if (osversion.wProductType == VER_NT_WORKSTATION)
- strcat (osname, " Workstation");
- else
- {
- strcat (osname, " Server");
- if (osversion.wSuiteMask & VER_SUITE_ENTERPRISE)
- strcat (osname, " Enterprise Edition");
- }
- }
- }
else
strcpy (osname, "NT");
break;
@@ -1678,26 +1603,22 @@ dump_sysinfo ()
strcpy (osname, "??");
break;
}
- printf ("Windows %s Ver %lu.%lu Build %lu %s\n", osname,
+ printf ("Windows %s Ver %lu.%lu Build %lu %ls\n", osname,
osversion.dwMajorVersion, osversion.dwMinorVersion,
osversion.dwPlatformId == VER_PLATFORM_WIN32_NT ?
osversion.dwBuildNumber : (osversion.dwBuildNumber & 0xffff),
osversion.dwPlatformId == VER_PLATFORM_WIN32_NT ?
- osversion.szCSDVersion : "");
+ osversion.szCSDVersion : L"");
if (osversion.dwPlatformId == VER_PLATFORM_WIN32s
|| osversion.dwPlatformId == VER_PLATFORM_WIN32_WINDOWS)
exit (EXIT_FAILURE);
- BOOL (WINAPI *wow64_func) (HANDLE, PBOOL) = (BOOL (WINAPI *) (HANDLE, PBOOL))
- GetProcAddress (k32, "IsWow64Process");
BOOL is_wow64 = FALSE;
- if (wow64_func && wow64_func (GetCurrentProcess (), &is_wow64) && is_wow64)
+ if (IsWow64Process (GetCurrentProcess (), &is_wow64) && is_wow64)
{
- void (WINAPI *nativinfo) (LPSYSTEM_INFO) = (void (WINAPI *)
- (LPSYSTEM_INFO)) GetProcAddress (k32, "GetNativeSystemInfo");
SYSTEM_INFO natinfo;
- nativinfo (&natinfo);
+ GetNativeSystemInfo (&natinfo);
fputs ("\nRunning under WOW64 on ", stdout);
switch (natinfo.wProcessorArchitecture)
{
@@ -1833,10 +1754,6 @@ dump_sysinfo ()
SetErrorMode (SEM_FAILCRITICALERRORS | SEM_NOOPENFILEERRORBOX);
int drivemask = GetLogicalDrives ();
- BOOL (WINAPI * gdfse) (LPCSTR, long long *, long long *, long long *) =
- (BOOL (WINAPI *) (LPCSTR, long long *, long long *, long long *))
- GetProcAddress (k32, "GetDiskFreeSpaceExA");
-
for (i = 0; i < 26; i++)
{
if (!(drivemask & (1 << i)))
@@ -1886,11 +1803,14 @@ dump_sysinfo ()
long capacity_mb = -1;
int percent_full = -1;
- long long free_me = 0ULL, free_bytes = 0ULL, total_bytes = 1ULL;
- if (gdfse != NULL && gdfse (drive, &free_me, &total_bytes, &free_bytes))
+ ULARGE_INTEGER free_me, free_bytes, total_bytes;
+ free_me.QuadPart = free_bytes.QuadPart = 0ULL;
+ total_bytes.QuadPart = 1ULL;
+ if (GetDiskFreeSpaceEx (drive, &free_me, &total_bytes, &free_bytes))
{
- capacity_mb = total_bytes / (1024L * 1024L);
- percent_full = 100 - (int) ((100.0 * free_me) / total_bytes);
+ capacity_mb = total_bytes.QuadPart / (1024L * 1024L);
+ percent_full = 100 - (int) ((100.0 * free_me.QuadPart)
+ / total_bytes.QuadPart);
}
else
{
@@ -2138,43 +2058,6 @@ package_grep (char *search)
{
char buf[1024];
- /* Attempt to dynamically load the necessary WinInet API functions so that
- cygcheck can still function on older systems without IE. */
- HMODULE hWinInet;
- if (!(hWinInet = LoadLibrary ("wininet.dll")))
- {
- fputs ("Unable to locate WININET.DLL. This feature requires Microsoft "
- "Internet Explorer v3 or later to function.\n", stderr);
- return 1;
- }
-
- /* InternetCloseHandle is used outside this function so it is declared
- global. The rest of these functions are only used here, so declare them
- and call GetProcAddress for each of them with the following macro. */
-
- pInternetCloseHandle = (BOOL (WINAPI *) (HINTERNET))
- GetProcAddress (hWinInet, "InternetCloseHandle");
-#define make_func_pointer(name, ret, args) ret (WINAPI * p##name) args = \
- (ret (WINAPI *) args) GetProcAddress (hWinInet, #name);
- make_func_pointer (InternetAttemptConnect, DWORD, (DWORD));
- make_func_pointer (InternetOpenA, HINTERNET, (LPCSTR, DWORD, LPCSTR, LPCSTR,
- DWORD));
- make_func_pointer (InternetOpenUrlA, HINTERNET, (HINTERNET, LPCSTR, LPCSTR,
- DWORD, DWORD, DWORD));
- make_func_pointer (InternetReadFile, BOOL, (HINTERNET, PVOID, DWORD, PDWORD));
- make_func_pointer (HttpQueryInfoA, BOOL, (HINTERNET, DWORD, PVOID, PDWORD,
- PDWORD));
-#undef make_func_pointer
-
- if(!pInternetCloseHandle || !pInternetAttemptConnect || !pInternetOpenA
- || !pInternetOpenUrlA || !pInternetReadFile || !pHttpQueryInfoA)
- {
- fputs ("Unable to load one or more functions from WININET.DLL. This "
- "feature requires Microsoft Internet Explorer v3 or later to "
- "function.\n", stderr);
- return 1;
- }
-
/* construct the actual URL by escaping */
char *url = (char *) alloca (sizeof (base_url) + strlen ("&arch=x86_64") + strlen (search) * 3);
strcpy (url, base_url);
@@ -2201,7 +2084,7 @@ package_grep (char *search)
#endif
/* Connect to the net and open the URL. */
- if (pInternetAttemptConnect (0) != ERROR_SUCCESS)
+ if (InternetAttemptConnect (0) != ERROR_SUCCESS)
{
fputs ("An internet connection is required for this function.\n", stderr);
return 1;
@@ -2209,16 +2092,16 @@ package_grep (char *search)
/* Initialize WinInet and attempt to fetch our URL. */
HINTERNET hi = NULL, hurl = NULL;
- if (!(hi = pInternetOpenA ("cygcheck", INTERNET_OPEN_TYPE_PRECONFIG, NULL, NULL, 0)))
+ if (!(hi = InternetOpenA ("cygcheck", INTERNET_OPEN_TYPE_PRECONFIG, NULL, NULL, 0)))
return display_internet_error ("InternetOpen() failed", NULL);
- if (!(hurl = pInternetOpenUrlA (hi, url, NULL, 0, 0, 0)))
+ if (!(hurl = InternetOpenUrlA (hi, url, NULL, 0, 0, 0)))
return display_internet_error ("unable to contact cygwin.com site, "
"InternetOpenUrl() failed", hi, NULL);
/* Check the HTTP response code. */
DWORD rc = 0, rc_s = sizeof (DWORD);
- if (!pHttpQueryInfoA (hurl, HTTP_QUERY_STATUS_CODE | HTTP_QUERY_FLAG_NUMBER,
+ if (!HttpQueryInfoA (hurl, HTTP_QUERY_STATUS_CODE | HTTP_QUERY_FLAG_NUMBER,
(void *) &rc, &rc_s, NULL))
return display_internet_error ("HttpQueryInfo() failed", hurl, hi, NULL);
@@ -2233,15 +2116,15 @@ package_grep (char *search)
DWORD numread;
do
{
- if (!pInternetReadFile (hurl, (void *) buf, sizeof (buf), &numread))
+ if (!InternetReadFile (hurl, (void *) buf, sizeof (buf), &numread))
return display_internet_error ("InternetReadFile failed", hurl, hi, NULL);
if (numread)
fwrite ((void *) buf, (size_t) numread, 1, stdout);
}
while (numread);
- pInternetCloseHandle (hurl);
- pInternetCloseHandle (hi);
+ InternetCloseHandle (hurl);
+ InternetCloseHandle (hi);
return 0;
}
@@ -2257,9 +2140,6 @@ Usage: cygcheck [-v] [-h] PROGRAM\n\
cygcheck -l [PACKAGE]...\n\
cygcheck -p REGEXP\n\
cygcheck --delete-orphaned-installation-keys\n\
- cygcheck --enable-unique-object-names Cygwin-DLL\n\
- cygcheck --disable-unique-object-names Cygwin-DLL\n\
- cygcheck --show-unique-object-names Cygwin-DLL\n\
cygcheck -h\n\n\
List system information, check installed packages, or query package database.\n\
\n\
@@ -2281,15 +2161,6 @@ At least one command option or a PROGRAM is required, as shown above.\n\
Delete installation keys of old, now unused\n\
installations from the registry. Requires the right\n\
to change the registry.\n\
- --enable-unique-object-names Cygwin-DLL\n\
- --disable-unique-object-names Cygwin-DLL\n\
- --show-unique-object-names Cygwin-DLL\n\
- Enable, disable, or show the setting of the\n\
- \"unique object names\" setting in the Cygwin DLL\n\
- given as argument to this option. The DLL path must\n\
- be given as valid Windows(!) path.\n\
- See the users guide for more information.\n\
- If you don't know what this means, don't change it.\n\
-v, --verbose produce more verbose output\n\
-h, --help annotate output with explanatory comments when given\n\
with another command, otherwise print this help\n\
@@ -2313,9 +2184,6 @@ struct option longopts[] = {
{"list-package", no_argument, NULL, 'l'},
{"package-query", no_argument, NULL, 'p'},
{"delete-orphaned-installation-keys", no_argument, NULL, CO_DELETE_KEYS},
- {"enable-unique-object-names", no_argument, NULL, CO_ENABLE_UON},
- {"disable-unique-object-names", no_argument, NULL, CO_DISABLE_UON},
- {"show-unique-object-names", no_argument, NULL, CO_SHOW_UON},
{"help", no_argument, NULL, 'h'},
{"version", no_argument, 0, 'V'},
{0, no_argument, NULL, 0}
@@ -2328,7 +2196,7 @@ print_version ()
{
printf ("cygcheck (cygwin) %d.%d.%d\n"
"System Checker for Cygwin\n"
- "Copyright (C) 1998 - %s Red Hat, Inc.\n"
+ "Copyright (C) 1998 - %s Cygwin Authors\n"
"This is free software; see the source for copying conditions. There is NO\n"
"warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n",
CYGWIN_VERSION_DLL_MAJOR / 1000,
@@ -2366,7 +2234,8 @@ load_cygwin (int& argc, char **&argv)
char **av = (char **) cygwin_internal (CW_ARGV);
if (av && ((uintptr_t) av != (uintptr_t) -1))
{
- /* Copy cygwin's idea of the argument list into this Window application. */
+ /* Copy cygwin's idea of the argument list into this Window
+ application. */
for (argc = 0; av[argc]; argc++)
continue;
argv = (char **) calloc (argc + 1, sizeof (char *));
@@ -2378,8 +2247,8 @@ load_cygwin (int& argc, char **&argv)
char **envp = (char **) cygwin_internal (CW_ENVP);
if (envp && ((uintptr_t) envp != (uintptr_t) -1))
{
- /* Store path and revert to this value, otherwise path gets overwritten
- by the POSIXy Cygwin variation, which breaks cygcheck.
+ /* Store path and revert to this value, otherwise path gets
+ overwritten by the POSIXy Cygwin variation, which breaks cygcheck.
Another approach would be to use the Cygwin PATH and convert it to
Win32 again. */
char *path = NULL;
@@ -2397,7 +2266,10 @@ load_cygwin (int& argc, char **&argv)
putenv (path);
}
}
- FreeLibrary (h);
+ /* GDB chokes when the DLL got unloaded and, for some reason, fails to set
+ any breakpoint after the fact. */
+ if (!IsDebuggerPresent ())
+ FreeLibrary (h);
}
int
@@ -2448,11 +2320,6 @@ main (int argc, char **argv)
case CO_DELETE_KEYS:
del_orphaned_reg = 1;
break;
- case CO_ENABLE_UON:
- case CO_DISABLE_UON:
- case CO_SHOW_UON:
- unique_object_name_opt = i;
- break;
case 'V':
print_version ();
exit (0);
@@ -2476,7 +2343,7 @@ main (int argc, char **argv)
}
if ((check_setup || sysinfo || find_package || list_package || grep_packages
- || del_orphaned_reg || unique_object_name_opt)
+ || del_orphaned_reg)
&& keycheck)
usage (stderr, 1);
@@ -2484,11 +2351,6 @@ main (int argc, char **argv)
&& (check_setup || del_orphaned_reg))
usage (stderr, 1);
- if ((check_setup || sysinfo || find_package || list_package || grep_packages
- || del_orphaned_reg)
- && unique_object_name_opt)
- usage (stderr, 1);
-
if (dump_only && !check_setup && !sysinfo)
usage (stderr, 1);
@@ -2497,8 +2359,6 @@ main (int argc, char **argv)
if (keycheck)
return check_keys ();
- if (unique_object_name_opt)
- return handle_unique_object_name (unique_object_name_opt, *argv);
if (del_orphaned_reg)
del_orphaned_reg_installations ();
if (grep_packages)
diff --git a/winsup/utils/cygpath.cc b/winsup/utils/cygpath.cc
index 6094eb7eb..3d402ea4a 100644
--- a/winsup/utils/cygpath.cc
+++ b/winsup/utils/cygpath.cc
@@ -1,6 +1,4 @@
/* cygpath.cc -- convert pathnames between Windows and Unix format
- Copyright 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008,
- 2009, 2010, 2011, 2012, 2013 Red Hat, Inc.
This file is part of Cygwin.
@@ -20,6 +18,7 @@ details. */
#include <sys/cygwin.h>
#include <cygwin/version.h>
#include <ctype.h>
+#include <wctype.h>
#include <errno.h>
#define _WIN32_WINNT 0x0602
@@ -36,7 +35,7 @@ details. */
static char *prog_name;
static char *file_arg, *output_arg;
-static int path_flag, unix_flag, windows_flag, absolute_flag;
+static int path_flag, unix_flag, windows_flag, absolute_flag, cygdrive_flag;
static int shortname_flag, longname_flag;
static int ignore_flag, allusers_flag, output_flag;
static int mixed_flag, options_from_file_flag, mode_flag;
@@ -56,6 +55,7 @@ static struct option long_options[] = {
{(char *) "mode", no_argument, NULL, 'M'},
{(char *) "option", no_argument, NULL, 'o'},
{(char *) "path", no_argument, NULL, 'p'},
+ {(char *) "proc-cygdrive", no_argument, NULL, 'U'},
{(char *) "short-name", no_argument, NULL, 's'},
{(char *) "type", required_argument, NULL, 't'},
{(char *) "unix", no_argument, NULL, 'u'},
@@ -73,7 +73,7 @@ static struct option long_options[] = {
{0, no_argument, 0, 0}
};
-static char options[] = "ac:df:hilmMopst:uVwAC:DHOPSWF:";
+static char options[] = "ac:df:hilmMopst:uUVwAC:DHOPSWF:";
static void
usage (FILE * stream, int status)
@@ -101,6 +101,8 @@ Path conversion options:\n\
-a, --absolute output absolute path\n\
-l, --long-name print Windows long form of NAMEs (with -w, -m only)\n\
-p, --path NAME is a PATH list (i.e., '/bin:/usr/bin')\n\
+ -U, --proc-cygdrive Emit /proc/cygdrive path instead of cygdrive prefix\n\
+ when converting Windows path to UNIX path.\n\
-s, --short-name print DOS (short) form of NAMEs (with -w, -m only)\n\
-C, --codepage CP print DOS, Windows, or mixed pathname in Windows\n\
codepage CP. CP can be a numeric codepage identifier,\n\
@@ -535,6 +537,7 @@ do_sysfolders (char option)
{
WCHAR wbuf[MAX_PATH];
char buf[PATH_MAX];
+ BOOL iswow64 = FALSE;
wbuf[0] = L'\0';
switch (option)
@@ -576,20 +579,19 @@ do_sysfolders (char option)
break;
case 'S':
- {
- HANDLE fh;
- WIN32_FIND_DATAW w32_fd;
-
- GetSystemDirectoryW (wbuf, MAX_PATH);
- /* The path returned by GetSystemDirectoryW is not case preserving.
- The below code is a trick to get the correct case of the system
- directory from Windows. */
- if ((fh = FindFirstFileW (wbuf, &w32_fd)) != INVALID_HANDLE_VALUE)
- {
- FindClose (fh);
- wcscpy (wcsrchr (wbuf, L'\\') + 1, w32_fd.cFileName);
- }
- }
+ GetSystemDirectoryW (wbuf, MAX_PATH);
+ if (!windows_flag
+ && IsWow64Process (GetCurrentProcess (), &iswow64) && iswow64)
+ {
+ /* When calling NtQueryInformationFile(FileNameInformation) on WOW64,
+ the returned path will point to SysWOW64. This breaks path
+ redirection to the network related files under device/etc. This
+ here is a bad hack to make sure that the conversion will convert
+ the case *and* stick to System32. */
+ PWCHAR last_bs = wcsrchr (wbuf, L'\\');
+ if (last_bs)
+ wcpcpy (last_bs + 1, L"Sysnative");
+ }
break;
case 'W':
@@ -604,10 +606,45 @@ do_sysfolders (char option)
{
fprintf (stderr, "%s: failed to retrieve special folder path\n",
prog_name);
+ return;
}
else if (!windows_flag)
{
- if (cygwin_conv_path (CCP_WIN_W_TO_POSIX, wbuf, buf, PATH_MAX))
+ /* The system folders are not necessarily case-correct. To allow
+ case-sensitivity, try to correct the case. Note that this only
+ works for local filesystems. */
+ if (iswalpha (wbuf[0]) && wbuf[1] == L':' && wbuf[2] == L'\\')
+ {
+ OBJECT_ATTRIBUTES attr;
+ NTSTATUS status;
+ HANDLE h;
+ IO_STATUS_BLOCK io;
+ UNICODE_STRING upath;
+ const ULONG size = sizeof (FILE_NAME_INFORMATION)
+ + PATH_MAX * sizeof (WCHAR);
+ PFILE_NAME_INFORMATION pfni = (PFILE_NAME_INFORMATION) alloca (size);
+
+ /* Avoid another buffer, reuse pfni. */
+ wcpcpy (wcpcpy (pfni->FileName, L"\\??\\"), wbuf);
+ RtlInitUnicodeString (&upath, pfni->FileName);
+ InitializeObjectAttributes (&attr, &upath, OBJ_CASE_INSENSITIVE,
+ NULL, NULL);
+ status = NtOpenFile (&h, READ_CONTROL, &attr, &io,
+ FILE_SHARE_VALID_FLAGS, FILE_OPEN_REPARSE_POINT);
+ if (NT_SUCCESS (status))
+ {
+ status = NtQueryInformationFile (h, &io, pfni, size,
+ FileNameInformation);
+ if (NT_SUCCESS (status))
+ {
+ pfni->FileName[pfni->FileNameLength / sizeof (WCHAR)] = L'\0';
+ wcscpy (wbuf + 2, pfni->FileName);
+ }
+ NtClose (h);
+ }
+ }
+ if (cygwin_conv_path (CCP_WIN_W_TO_POSIX | cygdrive_flag,
+ wbuf, buf, PATH_MAX))
fprintf (stderr, "%s: error converting \"%ls\" - %s\n",
prog_name, wbuf, strerror (errno));
}
@@ -652,7 +689,7 @@ do_pathconv (char *filename)
bool print_tmp = false;
cygwin_conv_path_t conv_func =
(unix_flag ? CCP_WIN_W_TO_POSIX : CCP_POSIX_TO_WIN_W)
- | (absolute_flag ? CCP_ABSOLUTE : CCP_RELATIVE);
+ | absolute_flag | cygdrive_flag;
if (!filename || !filename[0])
{
@@ -768,7 +805,7 @@ print_version ()
{
printf ("cygpath (cygwin) %d.%d.%d\n"
"Path Conversion Utility\n"
- "Copyright (C) 1998 - %s Red Hat, Inc.\n"
+ "Copyright (C) 1998 - %s Cygwin Authors\n"
"This is free software; see the source for copying conditions. There is NO\n"
"warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n",
CYGWIN_VERSION_DLL_MAJOR / 1000,
@@ -792,6 +829,8 @@ do_options (int argc, char **argv, int from_file)
output_flag = 0;
mode_flag = 0;
codepage = 0;
+ cygdrive_flag = 0;
+ absolute_flag = CCP_RELATIVE;
if (!from_file)
options_from_file_flag = 0;
optind = 0;
@@ -801,7 +840,7 @@ do_options (int argc, char **argv, int from_file)
switch (c)
{
case 'a':
- absolute_flag = 1;
+ absolute_flag = CCP_ABSOLUTE;
break;
case 'c':
@@ -883,6 +922,10 @@ do_options (int argc, char **argv, int from_file)
allusers_flag = 1;
break;
+ case 'U':
+ cygdrive_flag = CCP_PROC_CYGDRIVE;
+ break;
+
case 'C':
if (!optarg)
usage (stderr, 1);
diff --git a/winsup/utils/dump_setup.cc b/winsup/utils/dump_setup.cc
index ae5fc0446..320d69fab 100644
--- a/winsup/utils/dump_setup.cc
+++ b/winsup/utils/dump_setup.cc
@@ -1,7 +1,5 @@
/* dump_setup.cc
- Copyright 2001, 2002, 2003, 2004, 2005, 2008, 2010, 2011, 2012 Red Hat, Inc.
-
This file is part of Cygwin.
This software is a copyrighted work licensed under the terms of the
@@ -41,18 +39,13 @@ typedef struct
static int
find_tar_ext (const char *path)
{
- char *p = strchr (path, '\0') - 7;
+ char *p = strchr (path, '\0') - 9;
if (p <= path)
return 0;
- if (*p == '.')
- {
- if (strcmp (p, ".tar.gz") != 0)
- return 0;
- }
- else if (--p <= path || strcmp (p, ".tar.bz2") != 0)
+ if ((p = strstr (p, ".tar")) != NULL)
+ return p - path;
+ else
return 0;
-
- return p - path;
}
static char *
@@ -401,7 +394,7 @@ check_package_files (int verbose, char *package)
if (!directory_exists (verbose, filename, package))
result = false;
}
- else if (!strncmp (filename, "etc/postinstall/", 16))
+ else if (strstr (filename, "/postinstall/"))
{
if (!file_exists (verbose, filename, ".done", package))
result = false;
diff --git a/winsup/utils/dumper.cc b/winsup/utils/dumper.cc
index 50df44569..b2e03e883 100644
--- a/winsup/utils/dumper.cc
+++ b/winsup/utils/dumper.cc
@@ -1,14 +1,12 @@
/* dumper.cc
- Copyright 1999, 2001, 2002, 2004, 2006, 2007, 2011, 2013 Red Hat Inc.
-
Written by Egor Duda <deo@logos-m.ru>
This file is part of Cygwin.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
+ the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
@@ -872,7 +870,7 @@ print_version ()
{
printf ("dumper (cygwin) %d.%d.%d\n"
"Core Dumper for Cygwin\n"
- "Copyright (C) 1999 - %s Red Hat, Inc.\n"
+ "Copyright (C) 1999 - %s Cygwin Authors\n"
"This is free software; see the source for copying conditions. There is NO\n"
"warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n",
CYGWIN_VERSION_DLL_MAJOR / 1000,
diff --git a/winsup/utils/dumper.h b/winsup/utils/dumper.h
index b6c70308c..9367587bf 100644
--- a/winsup/utils/dumper.h
+++ b/winsup/utils/dumper.h
@@ -1,7 +1,5 @@
/* dumper.h
- Copyright 1999, 2001, 2013 Red Hat Inc.
-
Written by Egor Duda <deo@logos-m.ru>
This file is part of Cygwin.
diff --git a/winsup/utils/getconf.c b/winsup/utils/getconf.c
index 7e0b5f595..85392339c 100644
--- a/winsup/utils/getconf.c
+++ b/winsup/utils/getconf.c
@@ -1,6 +1,5 @@
/*-
* Copyright (c) 1996, 1998 The NetBSD Foundation, Inc.
- * Copyright (c) 2011 Red Hat, Inc.
* All rights reserved.
*
* This code is derived from software contributed to The NetBSD Foundation
@@ -357,6 +356,21 @@ static const struct conf_variable conf_table[] =
{ "POSIX2_UPE", SYSCONF, _SC_2_UPE },
{ "POSIX2_VERSION", SYSCONF, _SC_2_VERSION },
/* implementation-specific values */
+ { "LEVEL1_ICACHE_SIZE", SYSCONF, _SC_LEVEL1_ICACHE_SIZE },
+ { "LEVEL1_ICACHE_ASSOC", SYSCONF, _SC_LEVEL1_ICACHE_ASSOC },
+ { "LEVEL1_ICACHE_LINESIZE", SYSCONF, _SC_LEVEL1_ICACHE_LINESIZE },
+ { "LEVEL1_DCACHE_SIZE", SYSCONF, _SC_LEVEL1_DCACHE_SIZE },
+ { "LEVEL1_DCACHE_ASSOC", SYSCONF, _SC_LEVEL1_DCACHE_ASSOC },
+ { "LEVEL1_DCACHE_LINESIZE", SYSCONF, _SC_LEVEL1_DCACHE_LINESIZE },
+ { "LEVEL2_CACHE_SIZE", SYSCONF, _SC_LEVEL2_CACHE_SIZE },
+ { "LEVEL2_CACHE_ASSOC", SYSCONF, _SC_LEVEL2_CACHE_ASSOC },
+ { "LEVEL2_CACHE_LINESIZE", SYSCONF, _SC_LEVEL2_CACHE_LINESIZE },
+ { "LEVEL3_CACHE_SIZE", SYSCONF, _SC_LEVEL3_CACHE_SIZE },
+ { "LEVEL3_CACHE_ASSOC", SYSCONF, _SC_LEVEL3_CACHE_ASSOC },
+ { "LEVEL3_CACHE_LINESIZE", SYSCONF, _SC_LEVEL3_CACHE_LINESIZE },
+ { "LEVEL4_CACHE_SIZE", SYSCONF, _SC_LEVEL4_CACHE_SIZE },
+ { "LEVEL4_CACHE_ASSOC", SYSCONF, _SC_LEVEL4_CACHE_ASSOC },
+ { "LEVEL4_CACHE_LINESIZE", SYSCONF, _SC_LEVEL4_CACHE_LINESIZE },
{ "_NPROCESSORS_CONF", SYSCONF, _SC_NPROCESSORS_CONF },
{ "_NPROCESSORS_ONLN", SYSCONF, _SC_NPROCESSORS_ONLN },
{ "_AVPHYS_PAGES", SYSCONF, _SC_AVPHYS_PAGES },
@@ -370,22 +384,33 @@ struct spec_variable {
int valid;
};
+#if __LP64__
+#define ILP32 0
+#define LP64 1
+#else
+#define ILP32 1
+#define LP64 0
+#endif
+
static const struct spec_variable spec_table[] = {
- { "POSIX_V7_ILP32_OFF32", 0 },
- { "POSIX_V7_ILP32_OFFBIG", 1 },
- { "POSIX_V7_LP64_OFF64", 0 },
- { "POSIX_V7_LPBIG_OFFBIG", 0 },
- { "POSIX_V6_ILP32_OFF32", 0 },
- { "POSIX_V6_ILP32_OFFBIG", 1 },
- { "POSIX_V6_LP64_OFF64", 0 },
- { "POSIX_V6_LPBIG_OFFBIG", 0 },
- { "XBS5_ILP32_OFF32", 0 },
- { "XBS5_ILP32_OFFBIG", 1 },
- { "XBS5_LP64_OFF64", 0 },
- { "XBS5_LPBIG_OFFBIG", 0 },
+ { "POSIX_V7_ILP32_OFF32", 0 },
+ { "POSIX_V7_ILP32_OFFBIG", ILP32 },
+ { "POSIX_V7_LP64_OFF64", LP64 },
+ { "POSIX_V7_LPBIG_OFFBIG", LP64 },
+ { "POSIX_V6_ILP32_OFF32", 0 },
+ { "POSIX_V6_ILP32_OFFBIG", ILP32 },
+ { "POSIX_V6_LP64_OFF64", LP64 },
+ { "POSIX_V6_LPBIG_OFFBIG", LP64 },
+ { "XBS5_ILP32_OFF32", 0 },
+ { "XBS5_ILP32_OFFBIG", ILP32 },
+ { "XBS5_LP64_OFF64", LP64 },
+ { "XBS5_LPBIG_OFFBIG", LP64 },
{ NULL, 0 },
};
+#undef ILP32
+#undef LP64
+
static int a_flag = 0; /* list all variables */
static int v_flag = 0; /* follow given specification */
@@ -494,7 +519,7 @@ print_version ()
{
printf ("getconf (cygwin) %d.%d.%d\n"
"Get configuration values\n"
- "Copyright (C) 2011 - %s Red Hat, Inc.\n"
+ "Copyright (C) 2011 - %s Cygwin Authors\n"
"This is free software; see the source for copying conditions. There is NO\n"
"warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n",
CYGWIN_VERSION_DLL_MAJOR / 1000,
diff --git a/winsup/utils/getfacl.c b/winsup/utils/getfacl.c
index cbde4668a..6fb04e667 100644
--- a/winsup/utils/getfacl.c
+++ b/winsup/utils/getfacl.c
@@ -1,7 +1,5 @@
/* getfacl.c
- Copyright 2000, 2001, 2002, 2003, 2004, 2009, 2011 Red Hat Inc.
-
Written by Corinna Vinschen <vinschen@redhat.com>
This file is part of Cygwin.
@@ -15,8 +13,7 @@ details. */
#include <stdio.h>
#include <unistd.h>
#include <getopt.h>
-#include <sys/types.h>
-#include <sys/acl.h>
+#include <cygwin/acl.h>
#include <sys/stat.h>
#include <cygwin/version.h>
#include <string.h>
@@ -66,66 +63,75 @@ static void
usage (FILE * stream)
{
fprintf (stream, "Usage: %s [-adn] FILE [FILE2...]\n"
- "\n"
- "Display file and directory access control lists (ACLs).\n"
- "\n"
- " -a, --all display the filename, the owner, the group, and\n"
- " the ACL of the file\n"
- " -d, --dir display the filename, the owner, the group, and\n"
- " the default ACL of the directory, if it exists\n"
- " -h, --help output usage information and exit\n"
- " -n, --noname display user and group IDs instead of names\n"
- " -V, --version output version information and exit\n"
- "\n"
- "When multiple files are specified on the command line, a blank\n"
- "line separates the ACLs for each file.\n", prog_name);
+ "\n"
+ "Display file and directory access control lists (ACLs).\n"
+ "\n"
+ " -a, --access display the file access control list only\n"
+ " -d, --default display the default access control list only\n"
+ " -c, --omit-header do not display the comment header\n"
+ " -e, --all-effective print all effective rights\n"
+ " -E, --no-effective print no effective rights\n"
+ " -n, --numeric print numeric user/group identifiers\n"
+ " -V, --version print version and exit\n"
+ " -h, --help this help text\n"
+ "\n"
+ "When multiple files are specified on the command line, a blank\n"
+ "line separates the ACLs for each file.\n", prog_name);
if (stream == stdout)
{
fprintf (stream, ""
- "For each argument that is a regular file, special file or\n"
- "directory, getfacl displays the owner, the group, and the ACL.\n"
- "For directories getfacl displays additionally the default ACL.\n"
- "\n"
- "With no options specified, getfacl displays the filename, the\n"
- "owner, the group, and both the ACL and the default ACL, if it\n"
- "exists.\n"
- "\n"
- "The format for ACL output is as follows:\n"
- " # file: filename\n"
- " # owner: name or uid\n"
- " # group: name or uid\n"
- " user::perm\n"
- " user:name or uid:perm\n"
- " group::perm\n"
- " group:name or gid:perm\n"
- " mask:perm\n"
- " other:perm\n"
- " default:user::perm\n"
- " default:user:name or uid:perm\n"
- " default:group::perm\n"
- " default:group:name or gid:perm\n"
- " default:mask:perm\n"
- " default:other:perm\n"
- "\n");
+ "For each argument that is a regular file, special file or\n"
+ "directory, getfacl displays the owner, the group, and the ACL.\n"
+ "For directories getfacl displays additionally the default ACL.\n"
+ "\n"
+ "With no options specified, getfacl displays the filename, the\n"
+ "owner, the group, the setuid (s), setgid (s), and sticky (t)\n"
+ "bits if available, and both the ACL and the default ACL, if it\n"
+ "exists.\n"
+ "\n"
+ "The format for ACL output is as follows:\n"
+ " # file: filename\n"
+ " # owner: name or uid\n"
+ " # group: name or uid\n"
+ " # flags: sst\n"
+ " user::perm\n"
+ " user:name or uid:perm\n"
+ " group::perm\n"
+ " group:name or gid:perm\n"
+ " mask:perm\n"
+ " other:perm\n"
+ " default:user::perm\n"
+ " default:user:name or uid:perm\n"
+ " default:group::perm\n"
+ " default:group:name or gid:perm\n"
+ " default:mask:perm\n"
+ " default:other:perm\n"
+ "\n");
}
}
struct option longopts[] = {
+ {"access", no_argument, NULL, 'a'},
{"all", no_argument, NULL, 'a'},
+ {"omit-header", no_argument, NULL, 'c'},
+ {"all-effective", no_argument, NULL, 'e'},
+ {"no-effective", no_argument, NULL, 'E'},
+ {"default", no_argument, NULL, 'd'},
{"dir", no_argument, NULL, 'd'},
{"help", no_argument, NULL, 'h'},
- {"noname", no_argument, NULL, 'n'},
+ {"noname", no_argument, NULL, 'n'}, /* Backward compat */
+ {"numeric", no_argument, NULL, 'n'},
{"version", no_argument, NULL, 'V'},
{0, no_argument, NULL, 0}
};
-const char *opts = "adhnV";
+const char *opts = "acdeEhnV";
static void
print_version ()
{
printf ("getfacl (cygwin) %d.%d.%d\n"
"Get POSIX ACL information\n"
- "Copyright (C) 2000 - %s Red Hat, Inc.\n"
+ "Copyright (C) 2000 - %s Cygwin Authors\n"
"This is free software; see the source for copying conditions. There is NO\n"
"warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n",
CYGWIN_VERSION_DLL_MAJOR / 1000,
@@ -140,8 +146,11 @@ main (int argc, char **argv)
int c;
int ret = 0;
int aopt = 0;
+ int copt = 0;
+ int eopt = 0;
int dopt = 0;
int nopt = 0;
+ int istty = isatty (fileno (stdout));
struct stat st;
aclent_t acls[MAX_ACL_ENTRIES];
@@ -153,9 +162,18 @@ main (int argc, char **argv)
case 'a':
aopt = 1;
break;
+ case 'c':
+ copt = 1;
+ break;
case 'd':
dopt = 1;
break;
+ case 'e':
+ eopt = 1;
+ break;
+ case 'E':
+ eopt = -1;
+ break;
case 'h':
usage (stdout);
return 0;
@@ -177,6 +195,8 @@ main (int argc, char **argv)
for (; optind < argc; ++optind)
{
int i, num_acls;
+ mode_t mask = S_IRWXO, def_mask = S_IRWXO;
+
if (stat (argv[optind], &st)
|| (num_acls = acl (argv[optind], GETACL, MAX_ACL_ENTRIES, acls)) < 0)
{
@@ -185,24 +205,42 @@ main (int argc, char **argv)
ret = 2;
continue;
}
- printf ("# file: %s\n", argv[optind]);
- if (nopt)
+ if (!copt)
{
- printf ("# owner: %lu\n", (unsigned long)st.st_uid);
- printf ("# group: %lu\n", (unsigned long)st.st_gid);
+ printf ("# file: %s\n", argv[optind]);
+ if (nopt)
+ {
+ printf ("# owner: %lu\n", (unsigned long)st.st_uid);
+ printf ("# group: %lu\n", (unsigned long)st.st_gid);
+ }
+ else
+ {
+ printf ("# owner: %s\n", username (st.st_uid));
+ printf ("# group: %s\n", groupname (st.st_gid));
+ }
+ if (st.st_mode & (S_ISUID | S_ISGID | S_ISVTX))
+ printf ("# flags: %c%c%c\n", (st.st_mode & S_ISUID) ? 's' : '-',
+ (st.st_mode & S_ISGID) ? 's' : '-',
+ (st.st_mode & S_ISVTX) ? 't' : '-');
}
- else
+ for (i = 0; i < num_acls; ++i)
{
- printf ("# owner: %s\n", username (st.st_uid));
- printf ("# group: %s\n", groupname (st.st_gid));
+ if (acls[i].a_type == CLASS_OBJ)
+ mask = acls[i].a_perm;
+ else if (acls[i].a_type == DEF_CLASS_OBJ)
+ def_mask = acls[i].a_perm;
}
for (i = 0; i < num_acls; ++i)
{
+ int n = 0;
+ int print_effective = 0;
+ mode_t effective = acls[i].a_perm;
+
if (acls[i].a_type & ACL_DEFAULT)
{
if (aopt)
continue;
- printf ("default:");
+ n += printf ("default:");
}
else if (dopt)
continue;
@@ -213,18 +251,18 @@ main (int argc, char **argv)
break;
case USER:
if (nopt)
- printf ("user:%lu:", (unsigned long)acls[i].a_id);
+ n += printf ("user:%lu:", (unsigned long)acls[i].a_id);
else
- printf ("user:%s:", username (acls[i].a_id));
+ n += printf ("user:%s:", username (acls[i].a_id));
break;
case GROUP_OBJ:
- printf ("group::");
+ n += printf ("group::");
break;
case GROUP:
if (nopt)
- printf ("group:%lu:", (unsigned long)acls[i].a_id);
+ n += printf ("group:%lu:", (unsigned long)acls[i].a_id);
else
- printf ("group:%s:", groupname (acls[i].a_id));
+ n += printf ("group:%s:", groupname (acls[i].a_id));
break;
case CLASS_OBJ:
printf ("mask:");
@@ -233,7 +271,53 @@ main (int argc, char **argv)
printf ("other:");
break;
}
- printf ("%s\n", permstr (acls[i].a_perm));
+ n += printf ("%s", permstr (acls[i].a_perm));
+ switch (acls[i].a_type)
+ {
+ case USER:
+ case GROUP_OBJ:
+ effective = acls[i].a_perm & mask;
+ print_effective = 1;
+ break;
+ case GROUP:
+ /* Special case SYSTEM and Admins group: The mask only
+ applies to them as far as the execute bit is concerned. */
+ if (acls[i].a_id == 18 || acls[i].a_id == 544)
+ effective = acls[i].a_perm & (mask | S_IROTH | S_IWOTH);
+ else
+ effective = acls[i].a_perm & mask;
+ print_effective = 1;
+ break;
+ case DEF_USER:
+ case DEF_GROUP_OBJ:
+ effective = acls[i].a_perm & def_mask;
+ print_effective = 1;
+ break;
+ case DEF_GROUP:
+ /* Special case SYSTEM and Admins group: The mask only
+ applies to them as far as the execute bit is concerned. */
+ if (acls[i].a_id == 18 || acls[i].a_id == 544)
+ effective = acls[i].a_perm & (def_mask | S_IROTH | S_IWOTH);
+ else
+ effective = acls[i].a_perm & def_mask;
+ print_effective = 1;
+ break;
+ }
+ if (print_effective && eopt >= 0
+ && (eopt > 0 || effective != acls[i].a_perm))
+ {
+ if (istty)
+ {
+ n = 40 - n;
+ if (n <= 0)
+ n = 1;
+ printf ("%*s", n, " ");
+ }
+ else
+ putchar ('\t');
+ printf ("#effective:%s", permstr (effective));
+ }
+ putchar ('\n');
}
putchar ('\n');
}
diff --git a/winsup/utils/kill.cc b/winsup/utils/kill.cc
index edabff321..e771cdbde 100644
--- a/winsup/utils/kill.cc
+++ b/winsup/utils/kill.cc
@@ -1,8 +1,5 @@
/* kill.cc
- Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2007,
- 2009, 2011 Red Hat, Inc.
-
This file is part of Cygwin.
This software is a copyrighted work licensed under the terms of the
@@ -58,7 +55,7 @@ print_version ()
{
printf ("kill (cygwin) %d.%d.%d\n"
"Process Signaller\n"
- "Copyright (C) 1996 - %s Red Hat, Inc.\n"
+ "Copyright (C) 1996 - %s Cygwin Authors\n"
"This is free software; see the source for copying conditions. There is NO\n"
"warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n",
CYGWIN_VERSION_DLL_MAJOR / 1000,
@@ -70,7 +67,7 @@ print_version ()
static const char *
strsigno (int signo)
{
- if (signo >= 0 && signo < NSIG)
+ if (signo > 0 && signo < NSIG)
return sys_sigabbrev[signo];
static char buf[sizeof ("Unknown signal") + 32];
sprintf (buf, "Unknown signal %d", signo);
@@ -121,7 +118,7 @@ listsig (const char *in_sig)
{
sig = getsig (in_sig);
test_for_unknown_sig (sig, in_sig);
- if (atoi (in_sig) == sig)
+ if (sig && atoi (in_sig) == sig)
puts (strsigno (sig) + 3);
else
printf ("%d\n", sig);
diff --git a/winsup/utils/ldd.cc b/winsup/utils/ldd.cc
index de98658bc..233d65097 100644
--- a/winsup/utils/ldd.cc
+++ b/winsup/utils/ldd.cc
@@ -5,11 +5,11 @@
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.
- * Neither the name of the owner nor the names of its
- contributors may be used to endorse or promote products derived from
- this software without specific prior written permission.
+ 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 COPYRIGHT HOLDER AND CONTRIBUTORS "AS
IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
@@ -42,10 +42,6 @@
#include <imagehlp.h>
#include <psapi.h>
-#ifndef STATUS_DLL_NOT_FOUND
-#define STATUS_DLL_NOT_FOUND (0xC0000135L)
-#endif
-
struct option longopts[] =
{
{"help", no_argument, NULL, 'h'},
@@ -346,6 +342,11 @@ report (const char *in_fn, bool multiple)
case EXCEPTION_DEBUG_EVENT:
switch (ev.u.Exception.ExceptionRecord.ExceptionCode)
{
+ case STATUS_ENTRYPOINT_NOT_FOUND:
+ /* A STATUS_ENTRYPOINT_NOT_FOUND might be encountered right after
+ loading all DLLs. We have to handle it here, otherwise ldd
+ runs into an endless loop. */
+ goto print_and_exit;
case STATUS_DLL_NOT_FOUND:
process_fn = fn_win;
break;
@@ -359,6 +360,7 @@ report (const char *in_fn, bool multiple)
TerminateProcess (hProcess, 0);
break;
case EXIT_PROCESS_DEBUG_EVENT:
+print_and_exit:
print_dlls (&dll_list, isdll ? fn_win : NULL, process_fn);
exitnow = true;
break;
diff --git a/winsup/utils/loadlib.h b/winsup/utils/loadlib.h
index 34ed1277d..c83b76478 100644
--- a/winsup/utils/loadlib.h
+++ b/winsup/utils/loadlib.h
@@ -1,7 +1,5 @@
/* loadlib.h
- Copyright 2010, 2011, 2012 Red Hat, Inc.
-
This file is part of Cygwin.
This software is a copyrighted work licensed under the terms of the
diff --git a/winsup/utils/locale.cc b/winsup/utils/locale.cc
index fadf3f3da..1a5b50958 100644
--- a/winsup/utils/locale.cc
+++ b/winsup/utils/locale.cc
@@ -82,15 +82,10 @@ usage ()
void
print_version ()
{
- printf ("locale (cygwin) %d.%d.%d\n"
- "Get locale-specific information\n"
- "Copyright (C) 2010 - %s Red Hat, Inc.\n"
- "This is free software; see the source for copying conditions. There is NO\n"
- "warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n",
+ printf ("locale (cygwin) %d.%d.%d\n",
CYGWIN_VERSION_DLL_MAJOR / 1000,
CYGWIN_VERSION_DLL_MAJOR % 1000,
- CYGWIN_VERSION_DLL_MINOR,
- strrchr (__DATE__, ' ') + 1);
+ CYGWIN_VERSION_DLL_MINOR);
}
struct option longopts[] = {
diff --git a/winsup/utils/minidumper.cc b/winsup/utils/minidumper.cc
new file mode 100644
index 000000000..bc46358fb
--- /dev/null
+++ b/winsup/utils/minidumper.cc
@@ -0,0 +1,273 @@
+/* minidumper.cc
+
+ This file is part of Cygwin.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License (file COPYING.dumper) for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+*/
+
+#include <sys/cygwin.h>
+#include <cygwin/version.h>
+#include <getopt.h>
+#include <errno.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <windows.h>
+#include <dbghelp.h>
+
+DEFINE_ENUM_FLAG_OPERATORS(MINIDUMP_TYPE);
+
+BOOL verbose = FALSE;
+BOOL nokill = FALSE;
+
+/* Not yet in dbghelp.h */
+#define MiniDumpWithModuleHeaders (static_cast<MINIDUMP_TYPE>(0x00080000))
+#define MiniDumpFilterTriage (static_cast<MINIDUMP_TYPE>(0x00100000))
+
+static MINIDUMP_TYPE
+filter_minidump_type(MINIDUMP_TYPE dump_type)
+{
+ API_VERSION build_version = { 6, 0, API_VERSION_NUMBER, 0 };
+ API_VERSION *v = ImagehlpApiVersionEx(&build_version);
+
+ if (verbose)
+ printf ("dbghelp version %d.%d.%d.%d\n", v->MajorVersion,
+ v->MinorVersion, v->Revision, v->Reserved);
+
+ MINIDUMP_TYPE supported_types = MiniDumpNormal | MiniDumpWithDataSegs
+ | MiniDumpWithFullMemory | MiniDumpWithHandleData | MiniDumpFilterMemory
+ | MiniDumpScanMemory;
+
+ /*
+ This mainly trial and error and guesswork, as the MSDN documentation only
+ says what version of "Debugging Tools for Windows" added these flags, but
+ doesn't actually tell us the dbghelp.dll version which was contained in that
+ (and seems to have errors as well)
+ */
+
+ if (v->MajorVersion >= 5)
+ supported_types |= MiniDumpWithUnloadedModules
+ | MiniDumpWithIndirectlyReferencedMemory | MiniDumpFilterModulePaths
+ | MiniDumpWithProcessThreadData | MiniDumpWithPrivateReadWriteMemory;
+
+ if (v->MajorVersion >= 6)
+ supported_types |= MiniDumpWithoutOptionalData | MiniDumpWithFullMemoryInfo
+ | MiniDumpWithThreadInfo | MiniDumpWithCodeSegs
+ | MiniDumpWithoutAuxiliaryState | MiniDumpWithFullAuxiliaryState // seems to be documentation error that these two aren't listed as 'Not supported prior to 6.1'
+ | MiniDumpWithPrivateWriteCopyMemory | MiniDumpIgnoreInaccessibleMemory
+ | MiniDumpWithTokenInformation;
+
+ if ((v->MajorVersion*10 + v->MinorVersion) >= 62)
+ supported_types |= MiniDumpWithModuleHeaders | MiniDumpFilterTriage; // seems to be documentation error that these two are listed as 'Not supported prior to 6.1'
+
+ if (verbose)
+ printf ("supported MINIDUMP_TYPE flags 0x%x\n", supported_types);
+
+ return (dump_type & supported_types);
+}
+
+static void
+minidump(DWORD pid, MINIDUMP_TYPE dump_type, const char *minidump_file)
+{
+ HANDLE dump_file;
+ HANDLE process;
+
+ dump_file = CreateFile(minidump_file,
+ GENERIC_READ | GENERIC_WRITE,
+ 0,
+ NULL,
+ CREATE_ALWAYS,
+ FILE_FLAG_BACKUP_SEMANTICS,
+ NULL);
+ if (dump_file == INVALID_HANDLE_VALUE)
+ {
+ fprintf (stderr, "error opening file\n");
+ return;
+ }
+
+ process = OpenProcess(PROCESS_QUERY_INFORMATION | PROCESS_VM_READ | PROCESS_TERMINATE,
+ FALSE,
+ pid);
+ if (process == NULL)
+ {
+ fprintf (stderr, "error opening process\n");
+ return;
+ }
+
+ BOOL success = MiniDumpWriteDump(process,
+ pid,
+ dump_file,
+ dump_type,
+ NULL,
+ NULL,
+ NULL);
+ if (success)
+ {
+ if (verbose)
+ printf ("minidump created successfully\n");
+ }
+ else
+ {
+ fprintf (stderr, "error creating minidump\n");
+ }
+
+ /* Unless nokill is given, behave like dumper and terminate the dumped
+ process */
+ if (!nokill)
+ {
+ TerminateProcess(process, 128 + 9);
+ WaitForSingleObject(process, INFINITE);
+ }
+
+ CloseHandle(process);
+ CloseHandle(dump_file);
+}
+
+static void
+usage (FILE *stream, int status)
+{
+ fprintf (stream, "\
+Usage: %s [OPTION] FILENAME WIN32PID\n\
+\n\
+Write minidump from WIN32PID to FILENAME.dmp\n\
+\n\
+ -t, --type minidump type flags\n\
+ -n, --nokill don't terminate the dumped process\n\
+ -d, --verbose be verbose while dumping\n\
+ -h, --help output help information and exit\n\
+ -q, --quiet be quiet while dumping (default)\n\
+ -V, --version output version information and exit\n\
+\n", program_invocation_short_name);
+ exit (status);
+}
+
+struct option longopts[] = {
+ {"type", required_argument, NULL, 't'},
+ {"nokill", no_argument, NULL, 'n'},
+ {"verbose", no_argument, NULL, 'd'},
+ {"help", no_argument, NULL, 'h'},
+ {"quiet", no_argument, NULL, 'q'},
+ {"version", no_argument, 0, 'V'},
+ {0, no_argument, NULL, 0}
+};
+const char *opts = "t:ndhqV";
+
+static void
+print_version ()
+{
+ printf ("minidumper (cygwin) %d.%d.%d\n"
+ "Minidump write for Cygwin\n"
+ "Copyright (C) 1999 - %s Cygwin Authors\n"
+ "This is free software; see the source for copying conditions. There is NO\n"
+ "warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n",
+ CYGWIN_VERSION_DLL_MAJOR / 1000,
+ CYGWIN_VERSION_DLL_MAJOR % 1000,
+ CYGWIN_VERSION_DLL_MINOR,
+ strrchr (__DATE__, ' ') + 1);
+}
+
+int
+main (int argc, char **argv)
+{
+ int opt;
+ const char *p = "";
+ DWORD pid;
+ BOOL default_dump_type = TRUE;
+ MINIDUMP_TYPE dump_type = MiniDumpNormal;
+
+ while ((opt = getopt_long (argc, argv, opts, longopts, NULL) ) != EOF)
+ switch (opt)
+ {
+ case 't':
+ {
+ char *endptr;
+ default_dump_type = FALSE;
+ dump_type = (MINIDUMP_TYPE)strtoul(optarg, &endptr, 0);
+ if (*endptr != '\0')
+ {
+ fprintf (stderr, "syntax error in minidump type \"%s\" near character #%d.\n", optarg, (int) (endptr - optarg));
+ exit(1);
+ }
+ }
+ break;
+ case 'n':
+ nokill = TRUE;
+ break;
+ case 'd':
+ verbose = TRUE;
+ break;
+ case 'q':
+ verbose = FALSE;
+ break;
+ case 'h':
+ usage (stdout, 0);
+ case 'V':
+ print_version ();
+ exit (0);
+ default:
+ fprintf (stderr, "Try `%s --help' for more information.\n",
+ program_invocation_short_name);
+ exit (1);
+ }
+
+ if (argv && *(argv + optind) && *(argv + optind +1))
+ {
+ ssize_t len = cygwin_conv_path (CCP_POSIX_TO_WIN_A | CCP_RELATIVE,
+ *(argv + optind), NULL, 0);
+ char *win32_name = (char *) alloca (len);
+ cygwin_conv_path (CCP_POSIX_TO_WIN_A | CCP_RELATIVE, *(argv + optind),
+ win32_name, len);
+ if ((p = strrchr (win32_name, '\\')))
+ p++;
+ else
+ p = win32_name;
+
+ pid = strtoul (*(argv + optind + 1), NULL, 10);
+ }
+ else
+ {
+ usage (stderr, 1);
+ return -1;
+ }
+
+ char *minidump_file = (char *) malloc (strlen (p) + sizeof (".dmp"));
+ if (!minidump_file)
+ {
+ fprintf (stderr, "error allocating memory\n");
+ return -1;
+ }
+ sprintf (minidump_file, "%s.dmp", p);
+
+ if (default_dump_type)
+ {
+ dump_type = MiniDumpWithHandleData | MiniDumpWithFullMemoryInfo
+ | MiniDumpWithThreadInfo | MiniDumpWithFullAuxiliaryState
+ | MiniDumpIgnoreInaccessibleMemory | MiniDumpWithTokenInformation
+ | MiniDumpWithIndirectlyReferencedMemory;
+
+ /*
+ Only filter out unsupported dump_type flags if we are using the default
+ dump type, so that future dump_type flags can be explicitly used even if
+ we don't know about them
+ */
+ dump_type = filter_minidump_type(dump_type);
+ }
+
+ if (verbose)
+ printf ("dumping process %u to %s using dump type flags 0x%x\n", (unsigned int)pid, minidump_file, (unsigned int)dump_type);
+
+ minidump(pid, dump_type, minidump_file);
+
+ free (minidump_file);
+};
diff --git a/winsup/utils/mkgroup.c b/winsup/utils/mkgroup.c
index 05f5910b0..f57592f82 100644
--- a/winsup/utils/mkgroup.c
+++ b/winsup/utils/mkgroup.c
@@ -1,8 +1,5 @@
/* mkgroup.c:
- Copyright 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007,
- 2008, 2009, 2010, 2011, 2012, 2013 Red Hat, Inc.
-
This file is part of Cygwin.
This software is a copyrighted work licensed under the terms of the
@@ -21,6 +18,7 @@
#include <inttypes.h>
#include <getopt.h>
#include <io.h>
+#include <grp.h>
#include <sys/fcntl.h>
#include <sys/cygwin.h>
#include <cygwin/version.h>
@@ -29,14 +27,10 @@
#include <wininet.h>
#include <iptypes.h>
#include <ntsecapi.h>
-#include <dsgetdc.h>
#include <ntdef.h>
-#include "loadlib.h"
#define print_win_error(x) _print_win_error(x, __LINE__)
-#define MAX_SID_LEN 40
-
SID_IDENTIFIER_AUTHORITY sid_world_auth = {SECURITY_WORLD_SID_AUTHORITY};
SID_IDENTIFIER_AUTHORITY sid_nt_auth = {SECURITY_NT_AUTHORITY};
@@ -47,7 +41,6 @@ SID_IDENTIFIER_AUTHORITY sid_nt_auth = {SECURITY_NT_AUTHORITY};
typedef struct
{
char *str;
- DWORD id_offset;
BOOL domain;
BOOL with_dom;
} domlist_t;
@@ -70,31 +63,6 @@ _print_win_error (DWORD code, int line)
line, (unsigned int) code);
}
-static PWCHAR
-get_dcname (char *domain)
-{
- static WCHAR server[INTERNET_MAX_HOST_NAME_LENGTH + 1];
- DWORD rc;
- WCHAR domain_name[MAX_DOMAIN_NAME_LEN + 1];
- PDOMAIN_CONTROLLER_INFOW pdci = NULL;
-
- if (domain)
- {
- mbstowcs (domain_name, domain, strlen (domain) + 1);
- rc = DsGetDcNameW (NULL, domain_name, NULL, NULL, 0, &pdci);
- }
- else
- rc = DsGetDcNameW (NULL, NULL, NULL, NULL, 0, &pdci);
- if (rc != ERROR_SUCCESS)
- {
- print_win_error (rc);
- return (PWCHAR) -1;
- }
- wcscpy (server, pdci->DomainControllerName);
- NetApiBufferFree (pdci);
- return server;
-}
-
static char *
put_sid (PSID psid)
{
@@ -149,67 +117,35 @@ fetch_current_pgrp_sid ()
}
static void
-current_group (const char *sep, DWORD id_offset)
-{
- WCHAR grp[GNLEN + 1];
- WCHAR dom[MAX_DOMAIN_NAME_LEN + 1];
- DWORD glen = GNLEN + 1;
- DWORD dlen = MAX_DOMAIN_NAME_LEN + 1;
- int gid;
- SID_NAME_USE acc_type;
-
- if (!curr_pgrp.psid
- || !LookupAccountSidW (NULL, curr_pgrp.psid, grp, &glen, dom, &dlen,
- &acc_type))
- {
- print_win_error (GetLastError ());
- return;
- }
- gid = *GetSidSubAuthority (curr_pgrp.psid,
- *GetSidSubAuthorityCount(curr_pgrp.psid) - 1);
- printf ("%ls%s%ls:%s:%" PRIu32 ":\n",
- sep ? dom : L"",
- sep ?: "",
- grp,
- put_sid (curr_pgrp.psid),
- (unsigned int) (id_offset + gid));
-}
-
-static void
-enum_unix_groups (domlist_t *dom_or_machine, const char *sep, DWORD id_offset,
+enum_unix_groups (domlist_t *mach, const char *sep, DWORD id_offset,
char *unix_grp_list)
{
WCHAR machine[INTERNET_MAX_HOST_NAME_LENGTH + 1];
- PWCHAR servername = NULL;
- char *d_or_m = dom_or_machine ? dom_or_machine->str : NULL;
- BOOL with_dom = dom_or_machine ? dom_or_machine->with_dom : FALSE;
SID_IDENTIFIER_AUTHORITY auth = { { 0, 0, 0, 0, 0, 22 } };
char *gstr, *grp_list;
WCHAR grp[GNLEN + sizeof ("Unix Group\\") + 1];
WCHAR dom[MAX_DOMAIN_NAME_LEN + 1];
DWORD glen, dlen, sidlen;
PSID psid;
- char psid_buffer[MAX_SID_LEN];
+ PSID numeric_psid;
+ char psid_buffer[SECURITY_MAX_SID_SIZE];
SID_NAME_USE acc_type;
- if (!d_or_m)
- return;
-
- int ret = mbstowcs (machine, d_or_m, INTERNET_MAX_HOST_NAME_LENGTH + 1);
+ int ret = mbstowcs (machine, mach->str, INTERNET_MAX_HOST_NAME_LENGTH + 1);
if (ret < 1 || ret >= INTERNET_MAX_HOST_NAME_LENGTH + 1)
{
fprintf (stderr, "%s: Invalid machine name '%s'. Skipping...\n",
- program_invocation_short_name, d_or_m);
+ program_invocation_short_name, mach->str);
return;
}
- servername = machine;
- if (!AllocateAndInitializeSid (&auth, 2, 2, 0, 0, 0, 0, 0, 0, 0, &psid))
+ if (!AllocateAndInitializeSid (&auth, 2, 2, 0, 0, 0, 0, 0, 0, 0,
+ &numeric_psid))
return;
if (!(grp_list = strdup (unix_grp_list)))
{
- FreeSid (psid);
+ FreeSid (numeric_psid);
return;
}
@@ -220,17 +156,19 @@ enum_unix_groups (domlist_t *dom_or_machine, const char *sep, DWORD id_offset,
PWCHAR p = wcpcpy (grp, L"Unix Group\\");
ret = mbstowcs (p, gstr, GNLEN + 1);
if (ret < 1 || ret >= GNLEN + 1)
- fprintf (stderr, "%s: Invalid group name '%s'. Skipping...\n",
- program_invocation_short_name, gstr);
- else if (LookupAccountNameW (servername, grp,
- psid = (PSID) psid_buffer,
- (sidlen = MAX_SID_LEN, &sidlen),
- dom,
- (dlen = MAX_DOMAIN_NAME_LEN + 1, &dlen),
- &acc_type))
+ {
+ fprintf (stderr, "%s: Invalid group name '%s'. Skipping...\n",
+ program_invocation_short_name, gstr);
+ continue;
+ }
+ psid = (PSID) psid_buffer;
+ sidlen = SECURITY_MAX_SID_SIZE;
+ dlen = MAX_DOMAIN_NAME_LEN + 1;
+ if (LookupAccountNameW (machine, grp, psid, &sidlen,
+ dom, &dlen, &acc_type))
printf ("%s%s%ls:%s:%" PRIu32 ":\n",
- with_dom ? "Unix Group" : "",
- with_dom ? sep : "",
+ "Unix_Group",
+ sep,
p,
put_sid (psid),
(unsigned int) (id_offset +
@@ -257,17 +195,17 @@ enum_unix_groups (domlist_t *dom_or_machine, const char *sep, DWORD id_offset,
}
for (; start <= stop; ++ start)
{
+ psid = numeric_psid;
*GetSidSubAuthority (psid, *GetSidSubAuthorityCount(psid) - 1)
= start;
- if (LookupAccountSidW (servername, psid,
- grp, (glen = GNLEN + 1, &glen),
- dom,
- (dlen = MAX_DOMAIN_NAME_LEN + 1, &dlen),
- &acc_type)
+ glen = GNLEN + 1;
+ dlen = MAX_DOMAIN_NAME_LEN + 1;
+ if (LookupAccountSidW (machine, psid, grp, &glen,
+ dom, &dlen, &acc_type)
&& !iswdigit (grp[0]))
printf ("%s%s%ls:%s:%" PRIu32 ":\n",
- with_dom ? "Unix Group" : "",
- with_dom ? sep : "",
+ "Unix_Group",
+ sep,
grp,
put_sid (psid),
(unsigned int) (id_offset + start));
@@ -276,18 +214,15 @@ enum_unix_groups (domlist_t *dom_or_machine, const char *sep, DWORD id_offset,
}
free (grp_list);
- FreeSid (psid);
+ FreeSid (numeric_psid);
}
static int
-enum_local_groups (BOOL domain, domlist_t *dom_or_machine, const char *sep,
+enum_local_groups (domlist_t *mach, const char *sep,
DWORD id_offset, char *disp_groupname, int print_builtin,
int print_current)
{
WCHAR machine[INTERNET_MAX_HOST_NAME_LENGTH + 1];
- PWCHAR servername = NULL;
- char *d_or_m = dom_or_machine ? dom_or_machine->str : NULL;
- BOOL with_dom = dom_or_machine ? dom_or_machine->with_dom : FALSE;
LOCALGROUP_INFO_0 *buffer;
DWORD entriesread = 0;
DWORD totalentries = 0;
@@ -295,22 +230,12 @@ enum_local_groups (BOOL domain, domlist_t *dom_or_machine, const char *sep,
WCHAR gname[GNLEN + 1];
DWORD rc;
- if (domain)
- {
- servername = get_dcname (d_or_m);
- if (servername == (PWCHAR) -1)
- return 1;
- }
- else if (d_or_m)
+ int ret = mbstowcs (machine, mach->str, INTERNET_MAX_HOST_NAME_LENGTH + 1);
+ if (ret < 1 || ret >= INTERNET_MAX_HOST_NAME_LENGTH + 1)
{
- int ret = mbstowcs (machine, d_or_m, INTERNET_MAX_HOST_NAME_LENGTH + 1);
- if (ret < 1 || ret >= INTERNET_MAX_HOST_NAME_LENGTH + 1)
- {
- fprintf (stderr, "%s: Invalid machine name '%s'. Skipping...\n",
- program_invocation_short_name, d_or_m);
- return 1;
- }
- servername = machine;
+ fprintf (stderr, "%s: Invalid machine name '%s'. Skipping...\n",
+ program_invocation_short_name, mach->str);
+ return 1;
}
do
@@ -320,7 +245,7 @@ enum_local_groups (BOOL domain, domlist_t *dom_or_machine, const char *sep,
if (disp_groupname)
{
mbstowcs (gname, disp_groupname, GNLEN + 1);
- rc = NetLocalGroupGetInfo (servername, gname, 0, (void *) &buffer);
+ rc = NetLocalGroupGetInfo (machine, gname, 0, (void *) &buffer);
if (rc == ERROR_SUCCESS)
entriesread = 1;
/* Allow further searching for the group and avoid annoying
@@ -330,7 +255,7 @@ enum_local_groups (BOOL domain, domlist_t *dom_or_machine, const char *sep,
return 0;
}
else
- rc = NetLocalGroupEnum (servername, 0, (void *) &buffer,
+ rc = NetLocalGroupEnum (machine, 0, (void *) &buffer,
MAX_PREFERRED_LENGTH, &entriesread,
&totalentries, &resume_handle);
switch (rc)
@@ -352,15 +277,15 @@ enum_local_groups (BOOL domain, domlist_t *dom_or_machine, const char *sep,
{
WCHAR domain_name[MAX_DOMAIN_NAME_LEN + 1];
DWORD domname_len = MAX_DOMAIN_NAME_LEN + 1;
- char psid_buffer[MAX_SID_LEN];
+ char psid_buffer[SECURITY_MAX_SID_SIZE];
PSID psid = (PSID) psid_buffer;
- DWORD sid_length = MAX_SID_LEN;
+ DWORD sid_length = SECURITY_MAX_SID_SIZE;
DWORD gid;
SID_NAME_USE acc_type;
PDBGSID pdsid;
BOOL is_builtin = FALSE;
- if (!LookupAccountNameW (servername, buffer[i].lgrpi0_name, psid,
+ if (!LookupAccountNameW (machine, buffer[i].lgrpi0_name, psid,
&sid_length, domain_name, &domname_len,
&acc_type))
{
@@ -375,9 +300,9 @@ enum_local_groups (BOOL domain, domlist_t *dom_or_machine, const char *sep,
wcscpy (domname, domain_name);
wcscat (domname, L"\\");
wcscat (domname, buffer[i].lgrpi0_name);
- sid_length = MAX_SID_LEN;
+ sid_length = SECURITY_MAX_SID_SIZE;
domname_len = MAX_DOMAIN_NAME_LEN + 1;
- if (!LookupAccountNameW (servername, domname,
+ if (!LookupAccountNameW (machine, domname,
psid, &sid_length,
domain_name, &domname_len,
&acc_type))
@@ -415,8 +340,8 @@ enum_local_groups (BOOL domain, domlist_t *dom_or_machine, const char *sep,
gid = *GetSidSubAuthority (psid, *GetSidSubAuthorityCount(psid) - 1);
printf ("%ls%s%ls:%s:%" PRIu32 ":\n",
- with_dom && !is_builtin ? domain_name : L"",
- with_dom && !is_builtin ? sep : "",
+ mach->with_dom && !is_builtin ? domain_name : L"",
+ mach->with_dom && !is_builtin ? sep : "",
buffer[i].lgrpi0_name,
put_sid (psid),
(unsigned int) (gid + (is_builtin ? 0 : id_offset)));
@@ -436,13 +361,10 @@ skip_group:
}
static void
-enum_groups (BOOL domain, domlist_t *dom_or_machine, const char *sep,
- DWORD id_offset, char *disp_groupname, int print_current)
+enum_groups (domlist_t *mach, const char *sep, DWORD id_offset,
+ char *disp_groupname, int print_current)
{
WCHAR machine[INTERNET_MAX_HOST_NAME_LENGTH + 1];
- PWCHAR servername = NULL;
- char *d_or_m = dom_or_machine ? dom_or_machine->str : NULL;
- BOOL with_dom = dom_or_machine ? dom_or_machine->with_dom : FALSE;
GROUP_INFO_2 *buffer;
DWORD entriesread = 0;
DWORD totalentries = 0;
@@ -450,22 +372,12 @@ enum_groups (BOOL domain, domlist_t *dom_or_machine, const char *sep,
WCHAR gname[GNLEN + 1];
DWORD rc;
- if (domain)
- {
- servername = get_dcname (d_or_m);
- if (servername == (PWCHAR) -1)
- return;
- }
- else if (d_or_m)
+ int ret = mbstowcs (machine, mach->str, INTERNET_MAX_HOST_NAME_LENGTH + 1);
+ if (ret < 1 || ret >= INTERNET_MAX_HOST_NAME_LENGTH + 1)
{
- int ret = mbstowcs (machine, d_or_m, INTERNET_MAX_HOST_NAME_LENGTH + 1);
- if (ret < 1 || ret >= INTERNET_MAX_HOST_NAME_LENGTH + 1)
- {
- fprintf (stderr, "%s: Invalid machine name '%s'. Skipping...\n",
- program_invocation_short_name, d_or_m);
- return;
- }
- servername = machine;
+ fprintf (stderr, "%s: Invalid machine name '%s'. Skipping...\n",
+ program_invocation_short_name, mach->str);
+ return;
}
do
@@ -475,8 +387,7 @@ enum_groups (BOOL domain, domlist_t *dom_or_machine, const char *sep,
if (disp_groupname != NULL)
{
mbstowcs (gname, disp_groupname, GNLEN + 1);
- rc = NetGroupGetInfo (servername, (LPWSTR) & gname, 2,
- (void *) &buffer);
+ rc = NetGroupGetInfo (machine, (LPWSTR) & gname, 2, (void *) &buffer);
entriesread=1;
/* Avoid annoying error messages just because the group hasn't been
found. */
@@ -484,9 +395,8 @@ enum_groups (BOOL domain, domlist_t *dom_or_machine, const char *sep,
return;
}
else
- rc = NetGroupEnum (servername, 2, (void *) & buffer,
- MAX_PREFERRED_LENGTH, &entriesread, &totalentries,
- &resume_handle);
+ rc = NetGroupEnum (machine, 2, (void *) & buffer, MAX_PREFERRED_LENGTH,
+ &entriesread, &totalentries, &resume_handle);
switch (rc)
{
case ERROR_ACCESS_DENIED:
@@ -506,13 +416,13 @@ enum_groups (BOOL domain, domlist_t *dom_or_machine, const char *sep,
{
WCHAR domain_name[MAX_DOMAIN_NAME_LEN + 1];
DWORD domname_len = MAX_DOMAIN_NAME_LEN + 1;
- char psid_buffer[MAX_SID_LEN];
+ char psid_buffer[SECURITY_MAX_SID_SIZE];
PSID psid = (PSID) psid_buffer;
- DWORD sid_length = MAX_SID_LEN;
+ DWORD sid_length = SECURITY_MAX_SID_SIZE;
SID_NAME_USE acc_type;
int gid = buffer[i].grpi2_group_id;
- if (!LookupAccountNameW (servername, buffer[i].grpi2_name,
+ if (!LookupAccountNameW (machine, buffer[i].grpi2_name,
psid, &sid_length,
domain_name, &domname_len,
&acc_type))
@@ -525,16 +435,13 @@ enum_groups (BOOL domain, domlist_t *dom_or_machine, const char *sep,
{
WCHAR domname[MAX_DOMAIN_NAME_LEN + GNLEN + 2];
- wcscpy (domname, domain || !servername
- ? domain_name : servername);
+ wcscpy (domname, machine);
wcscat (domname, L"\\");
wcscat (domname, buffer[i].grpi2_name);
- sid_length = MAX_SID_LEN;
+ sid_length = SECURITY_MAX_SID_SIZE;
domname_len = MAX_DOMAIN_NAME_LEN + 1;
- if (!LookupAccountNameW (servername, domname,
- psid, &sid_length,
- domain_name, &domname_len,
- &acc_type))
+ if (!LookupAccountNameW (machine, domname, psid, &sid_length,
+ domain_name, &domname_len, &acc_type))
{
print_win_error (GetLastError ());
fprintf(stderr, " (%ls)\n", domname);
@@ -547,8 +454,8 @@ enum_groups (BOOL domain, domlist_t *dom_or_machine, const char *sep,
got_curr_pgrp = TRUE;
printf ("%ls%s%ls:%s:%" PRIu32 ":\n",
- with_dom ? domain_name : L"",
- with_dom ? sep : "",
+ mach->with_dom ? domain_name : L"",
+ mach->with_dom ? sep : "",
buffer[i].grpi2_name,
put_sid (psid),
(unsigned int) (id_offset + gid));
@@ -560,107 +467,45 @@ enum_groups (BOOL domain, domlist_t *dom_or_machine, const char *sep,
while (rc == ERROR_MORE_DATA);
}
-static void
-print_special_by_sid (PSID_IDENTIFIER_AUTHORITY auth, BYTE cnt,
- DWORD sub1, DWORD sub2, DWORD sub3, DWORD sub4,
- DWORD sub5, DWORD sub6, DWORD sub7, DWORD sub8)
-{
- WCHAR grp[GNLEN + 1], dom[MAX_DOMAIN_NAME_LEN + 1];
- DWORD glen, dlen, rid;
- PSID psid;
- SID_NAME_USE acc_type;
-
- if (AllocateAndInitializeSid (auth, cnt, sub1, sub2, sub3, sub4,
- sub5, sub6, sub7, sub8, &psid))
- {
- if (LookupAccountSidW (NULL, psid,
- grp, (glen = GNLEN + 1, &glen),
- dom, (dlen = MAX_DOMAIN_NAME_LEN + 1, &dlen),
- &acc_type))
- {
- if (sub8)
- rid = sub8;
- else if (sub7)
- rid = sub7;
- else if (sub6)
- rid = sub6;
- else if (sub5)
- rid = sub5;
- else if (sub4)
- rid = sub4;
- else if (sub3)
- rid = sub3;
- else if (sub2)
- rid = sub2;
- else
- rid = sub1;
- printf ("%ls:%s:%" PRIu32 ":\n", grp, put_sid (psid),
- (unsigned int) rid);
- }
- FreeSid (psid);
- }
-}
-
-static void
-print_special_by_name (PCWSTR name, gid_t gid)
-{
- DWORD size = 256, dom_size = 256;
- PSID sid = (PSID) alloca (size);
- WCHAR dom[dom_size];
- SID_NAME_USE use;
-
- PWCHAR name_only = wcschr (name, L'\\');
- if (name_only)
- ++name_only;
-
- if (LookupAccountNameW (NULL, name, sid, &size, dom, &dom_size, &use))
- printf ("%ls:%s:%lu:\n",
- name_only ?: name, put_sid (sid), (unsigned long) gid);
-}
-
static int
usage (FILE * stream)
{
fprintf (stream,
"Usage: %s [OPTION]...\n"
"\n"
-"Print /etc/group file to stdout\n"
+"Write /etc/group-like output to stdout\n"
+"\n"
+"Don't use this command to generate a local /etc/group file, unless you\n"
+"really need one. See the Cygwin User's Guide for more information.\n"
"\n"
"Options:\n"
"\n"
-" -l,--local [machine[,offset]]\n"
-" print local groups with gid offset offset\n"
-" (from local machine if no machine specified)\n"
-" -L,--Local [machine[,offset]]\n"
-" ditto, but generate groupname with machine prefix\n"
-" -d,--domain [domain[,offset]]\n"
-" print domain groups with gid offset offset\n"
-" (from current domain if no domain specified)\n"
-" -D,--Domain [domain[,offset]]\n"
-" ditto, but generate groupname with machine prefix\n"
-" -c,--current print current group\n"
-" -C,--Current ditto, but generate groupname with machine or\n"
-" domain prefix\n"
-" -S,--separator char for -L, -D, -C use character char as domain\\group\n"
-" separator in groupname instead of the default '\\'\n"
-" -o,--id-offset offset change the default offset (10000) added to gids\n"
-" in domain or foreign server accounts.\n"
-" -g,--group groupname only return information for the specified group\n"
-" one of -l, -L, -d, -D must be specified, too\n"
-" -b,--no-builtin don't print BUILTIN groups\n"
-" -U,--unix grouplist additionally print UNIX groups when using -l or -L\n"
-" on a UNIX Samba server\n"
-" grouplist is a comma-separated list of groupnames\n"
-" or gid ranges (root,-25,50-100).\n"
-" (enumerating large ranges can take a long time!)\n"
-" -s,--no-sids (ignored)\n"
-" -u,--users (ignored)\n"
-" -h,--help print this message\n"
-" -v,--version print version information and exit\n"
+" -l,--local [machine] Print local group accounts of \"machine\",\n"
+" from local machine if no machine specified.\n"
+" Automatically adding machine prefix for local\n"
+" machine depends on settings in /etc/nsswitch.conf.\n"
+" -L,--Local machine Ditto, but generate groupname with machine prefix.\n"
+" -d,--domain [domain] Print domain groups,\n"
+" from current domain if no domain specified.\n"
+" -c,--current Print current group.\n"
+" -S,--separator char For -L use character char as domain\\group\n"
+" separator in groupname instead of default '%s'.\n"
+" -o,--id-offset offset Change the default offset (0x10000) added to gids\n"
+" of foreign local machine accounts. Use with -l/-L.\n"
+" -g,--group groupname Only return information for the specified group.\n"
+" One of -l, -d must be specified, too.\n"
+" -b,--no-builtin Don't print BUILTIN groups.\n"
+" -U,--unix grouplist Print UNIX groups when using -l on a UNIX Samba\n"
+" server. Grouplist is a comma-separated list of\n"
+" groupnames or gid ranges (root,-25,50-100).\n"
+" Enumerating large ranges can take a long time!\n"
+" -h,--help Print this message.\n"
+" -v,--version Print version information and exit.\n"
"\n"
"Default is to print local groups on stand-alone machines, plus domain\n"
"groups on domain controllers and domain member machines.\n"
-"\n", program_invocation_short_name);
+"\n", program_invocation_short_name,
+ (const char *) cygwin_internal (CW_GETNSSSEP));
return 1;
}
@@ -690,7 +535,7 @@ print_version ()
{
printf ("mkgroup (cygwin) %d.%d.%d\n"
"Group File Generator\n"
- "Copyright (C) 1997 - %s Red Hat, Inc.\n"
+ "Copyright (C) 1997 - %s Cygwin Authors\n"
"This is free software; see the source for copying conditions. There is NO\n"
"warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n",
CYGWIN_VERSION_DLL_MAJOR / 1000,
@@ -699,45 +544,22 @@ print_version ()
strrchr (__DATE__, ' ') + 1);
}
-static PPOLICY_PRIMARY_DOMAIN_INFO p_dom;
-
-static BOOL
-fetch_primary_domain ()
-{
- NTSTATUS status;
- LSA_OBJECT_ATTRIBUTES oa = { 0, 0, 0, 0, 0, 0 };
- LSA_HANDLE lsa;
-
- if (!p_dom)
- {
- status = LsaOpenPolicy (NULL, &oa, POLICY_EXECUTE, &lsa);
- if (!NT_SUCCESS (status))
- return FALSE;
- status = LsaQueryInformationPolicy (lsa, PolicyPrimaryDomainInformation,
- (PVOID *) ((void *) &p_dom));
- LsaClose (lsa);
- if (!NT_SUCCESS (status))
- return FALSE;
- }
- return !!p_dom->Sid;
-}
-
int
main (int argc, char **argv)
{
int print_domlist = 0;
domlist_t domlist[32];
- char *opt, *p, *ep;
+ char cname[1024];
+ char *opt, *p;
int print_current = 0;
- int print_system = 0;
int print_builtin = 1;
char *print_unix = NULL;
- const char *sep_char = "\\";
- DWORD id_offset = 10000, off;
+ const char *sep_char = (const char *) cygwin_internal (CW_GETNSSSEP);
+ DWORD id_offset = 0x10000, off;
int c, i;
char *disp_groupname = NULL;
- BOOL in_domain;
int optional_args = 0;
+ uintptr_t nss_src = cygwin_internal (CW_GETNSS_GRP_SRC);
if (!isatty (1))
setmode (1, O_BINARY);
@@ -746,22 +568,21 @@ main (int argc, char **argv)
setlocale (LC_CTYPE, "");
if (!strcmp (setlocale (LC_CTYPE, NULL), "C"))
setlocale (LC_CTYPE, "en_US.UTF-8");
- in_domain = fetch_primary_domain ();
fetch_current_pgrp_sid ();
if (argc == 1)
{
- print_special_by_sid (&sid_nt_auth, 1, SECURITY_LOCAL_SYSTEM_RID,
- 0, 0, 0, 0, 0, 0, 0);
- if (in_domain)
+ int enums = ENUM_PRIMARY | ENUM_LOCAL | ENUM_BUILTIN;
+ uintptr_t ticket = cygwin_internal (CW_SETENT, TRUE, enums, NULL);
+ if (ticket)
{
- if (!enum_local_groups (TRUE, NULL, sep_char, id_offset,
- disp_groupname, print_builtin, 0))
- enum_groups (TRUE, NULL, sep_char, id_offset, disp_groupname, 0);
+ struct group *grp;
+
+ while ((grp = (struct group *) cygwin_internal (CW_GETENT, TRUE,
+ ticket)))
+ printf ("%s:%s:%u:\n", grp->gr_name, grp->gr_passwd, grp->gr_gid);
+ cygwin_internal (CW_ENDENT, TRUE, ticket);
}
- else if (!enum_local_groups (FALSE, NULL, sep_char, 0, disp_groupname,
- print_builtin, 0))
- enum_groups (FALSE, NULL, sep_char, 0, disp_groupname, 0);
return 0;
}
@@ -797,33 +618,55 @@ main (int argc, char **argv)
program_invocation_short_name,
domlist[i].domain ? "domain" : "machine",
domlist[i].str);
- goto skip;
+ break;
}
- if (!(domlist[print_domlist].str = opt))
- print_system = 1;
- domlist[print_domlist].id_offset = UINT32_MAX;
+ domlist[print_domlist].str = opt;
if (opt && (p = strchr (opt, ',')))
{
- if (p == opt
- || !isdigit ((unsigned char) p[1])
- || (domlist[print_domlist].id_offset = strtol (p + 1, &ep, 10)
- , *ep))
+ if (p == opt)
{
- fprintf (stderr, "%s: Malformed machine,offset string '%s'. "
+ fprintf (stderr, "%s: Malformed machine string '%s'. "
"Skipping...\n", program_invocation_short_name, opt);
break;
}
*p = '\0';
}
- domlist[print_domlist++].with_dom = (c == 'D' || c == 'L');
-skip:
+ if (c == 'l' || c == 'L')
+ {
+ DWORD csize = sizeof cname;
+
+ domlist[print_domlist].with_dom = (c == 'L');
+ if (!opt)
+ {
+ /* If the system uses /etc/group exclusively as account DB,
+ create local group names the old fashioned way. */
+ if (nss_src == NSS_SRC_FILES)
+ {
+ GetComputerNameExA (ComputerNameNetBIOS, cname, &csize);
+ domlist[print_domlist].str = cname;
+ }
+ }
+ else if (nss_src != NSS_SRC_FILES)
+ {
+ /* If the system uses Windows account DBs, check if machine
+ name is local machine. If so, remove the domain name to
+ enforce system naming convention. */
+ if (GetComputerNameExA (strchr (opt, '.')
+ ? ComputerNameDnsFullyQualified
+ : ComputerNameNetBIOS,
+ cname, &csize)
+ && strcasecmp (opt, cname) == 0)
+ domlist[print_domlist].str = NULL;
+ }
+ }
+ ++print_domlist;
break;
case 'S':
sep_char = optarg;
if (strlen (sep_char) > 1)
{
- fprintf (stderr, "%s: Only one character allowed as domain\\user "
- "separator character.\n",
+ fprintf (stderr, "%s: Only one ASCII character allowed as "
+ "domain\\user separator character.\n",
program_invocation_short_name);
return 1;
}
@@ -838,8 +681,6 @@ skip:
print_unix = optarg;
break;
case 'c':
- sep_char = NULL;
- /*FALLTHRU*/
case 'C':
print_current = 1;
break;
@@ -876,34 +717,79 @@ skip:
exit (1);
}
- /* Get 'system' group */
- if (!disp_groupname && print_system && print_builtin && print_domlist)
+ struct group *pgrp = NULL;
+ if (print_current)
+ pgrp = (struct group *) cygwin_internal (CW_GETGRSID, TRUE, curr_pgrp.psid);
+
+ int enums = ENUM_NONE;
+ WCHAR tdoms[print_domlist * 258];
+ PWCHAR t = tdoms;
+ if (!disp_groupname && print_builtin && print_domlist)
+ enums |= ENUM_BUILTIN;
+ for (i = 0; i < print_domlist; ++i)
{
- print_special_by_sid (&sid_nt_auth, 1, SECURITY_LOCAL_SYSTEM_RID,
- 0, 0, 0, 0, 0, 0, 0);
- print_special_by_name (L"NT SERVICE\\TrustedInstaller", -2);
+ if (domlist[i].domain)
+ {
+ if (domlist[i].str)
+ {
+ enums |= ENUM_TDOMS;
+ t += mbstowcs (t, domlist[i].str, 257);
+ *t++ = L'\0';
+ }
+ else
+ enums |= ENUM_PRIMARY;
+ }
+ else if (!domlist[i].str)
+ enums |= ENUM_LOCAL;
+ }
+ if (t > tdoms)
+ *t++ = L'\0';
+ if (enums)
+ {
+ uintptr_t ticket = cygwin_internal (CW_SETENT, TRUE, enums,
+ t > tdoms ? tdoms : NULL);
+ if (ticket)
+ {
+ struct group *grp;
+ const char *nss_sep = (const char *) cygwin_internal (CW_GETNSSSEP);
+
+ while ((grp = (struct group *)
+ cygwin_internal (CW_GETENT, TRUE, ticket)))
+ {
+ if (disp_groupname
+ && strcasecmp (disp_groupname, grp->gr_name) != 0
+ && (!(p = strchr (grp->gr_name, nss_sep[0]))
+ || strcasecmp (disp_groupname, p + 1) != 0))
+ continue;
+ printf ("%s:%s:%u:\n", grp->gr_name, grp->gr_passwd,
+ grp->gr_gid);
+ if (pgrp && !strcmp (grp->gr_passwd, pgrp->gr_passwd))
+ got_curr_pgrp = TRUE;
+ }
+ cygwin_internal (CW_ENDENT, TRUE, ticket);
+ }
}
- off = id_offset;
+ if (print_current && !got_curr_pgrp)
+ printf ("%s:%s:%u:\n", pgrp->gr_name, pgrp->gr_passwd, pgrp->gr_gid);
+
+ off = 0xfd000000;
for (i = 0; i < print_domlist; ++i)
{
- DWORD my_off = (domlist[i].domain || domlist[i].str)
- ? domlist[i].id_offset != UINT_MAX
- ? domlist[i].id_offset : off : 0;
- if (!enum_local_groups (domlist[i].domain, domlist + i, sep_char,
- my_off, disp_groupname, print_builtin, print_current))
+ if (domlist[i].domain || !domlist[i].str)
+ continue;
+ if (!enum_local_groups (domlist + i, sep_char,
+ (nss_src == NSS_SRC_FILES) ? 0x30000 : off,
+ disp_groupname, print_builtin, print_current))
{
- if (!domlist[i].domain && domlist[i].str && print_unix)
- enum_unix_groups (domlist + i, sep_char, my_off, print_unix);
- enum_groups (domlist[i].domain, domlist + i, sep_char, my_off,
+ enum_groups (domlist + i, sep_char,
+ (nss_src == NSS_SRC_FILES) ? 0x30000 : off,
disp_groupname, print_current);
- if (my_off)
- off += id_offset;
+ if (!domlist[i].domain && domlist[i].str && print_unix)
+ enum_unix_groups (domlist + i, sep_char, 0xff000000, print_unix);
+ off += id_offset;
}
}
- if (print_current && !got_curr_pgrp)
- current_group (sep_char, off);
-
return 0;
}
diff --git a/winsup/utils/mkpasswd.c b/winsup/utils/mkpasswd.c
index d080dbd70..3f33496aa 100644
--- a/winsup/utils/mkpasswd.c
+++ b/winsup/utils/mkpasswd.c
@@ -1,8 +1,5 @@
/* mkpasswd.c:
- Copyright 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2005, 2006, 2008, 2009,
- 2010, 2011, 2012, 2013 Red Hat, Inc.
-
This file is part of Cygwin.
This software is a copyrighted work licensed under the terms of the
@@ -21,6 +18,7 @@
#include <inttypes.h>
#include <getopt.h>
#include <io.h>
+#include <pwd.h>
#include <sys/fcntl.h>
#include <sys/cygwin.h>
#include <cygwin/version.h>
@@ -31,12 +29,9 @@
#include <ntsecapi.h>
#include <dsgetdc.h>
#include <ntdef.h>
-#include "loadlib.h"
#define print_win_error(x) _print_win_error(x, __LINE__)
-#define MAX_SID_LEN 40
-
SID_IDENTIFIER_AUTHORITY sid_world_auth = {SECURITY_WORLD_SID_AUTHORITY};
SID_IDENTIFIER_AUTHORITY sid_nt_auth = {SECURITY_NT_AUTHORITY};
@@ -47,7 +42,6 @@ SID_IDENTIFIER_AUTHORITY sid_nt_auth = {SECURITY_NT_AUTHORITY};
typedef struct
{
char *str;
- DWORD id_offset;
BOOL domain;
BOOL with_dom;
} domlist_t;
@@ -70,31 +64,6 @@ _print_win_error(DWORD code, int line)
line, (unsigned int) code);
}
-static PWCHAR
-get_dcname (char *domain)
-{
- static WCHAR server[INTERNET_MAX_HOST_NAME_LENGTH + 1];
- DWORD rc;
- WCHAR domain_name[MAX_DOMAIN_NAME_LEN + 1];
- PDOMAIN_CONTROLLER_INFOW pdci = NULL;
-
- if (domain)
- {
- mbstowcs (domain_name, domain, strlen (domain) + 1);
- rc = DsGetDcNameW (NULL, domain_name, NULL, NULL, 0, &pdci);
- }
- else
- rc = DsGetDcNameW (NULL, NULL, NULL, NULL, 0, &pdci);
- if (rc != ERROR_SUCCESS)
- {
- print_win_error (rc);
- return (PWCHAR) -1;
- }
- wcscpy (server, pdci->DomainControllerName);
- NetApiBufferFree (pdci);
- return server;
-}
-
static char *
put_sid (PSID sid)
{
@@ -150,99 +119,35 @@ fetch_current_user_sid ()
}
static void
-current_user (const char *sep, const char *passed_home_path, DWORD id_offset,
- const char *disp_username)
-{
- WCHAR user[UNLEN + 1];
- WCHAR dom[MAX_DOMAIN_NAME_LEN + 1];
- DWORD ulen = UNLEN + 1;
- DWORD dlen = MAX_DOMAIN_NAME_LEN + 1;
- SID_NAME_USE acc_type;
- int uid, gid;
- char homedir_psx[PATH_MAX] = {0};
-
- if (!curr_user.psid || !curr_pgrp.psid
- || !LookupAccountSidW (NULL, curr_user.psid, user, &ulen, dom, &dlen,
- &acc_type))
- {
- print_win_error (GetLastError ());
- return;
- }
-
- uid = *GetSidSubAuthority (curr_user.psid,
- *GetSidSubAuthorityCount(curr_user.psid) - 1);
- gid = *GetSidSubAuthority (curr_pgrp.psid,
- *GetSidSubAuthorityCount(curr_pgrp.psid) - 1);
- if (passed_home_path[0] == '\0')
- {
- char *envhome = getenv ("HOME");
-
- /* If $HOME exists and is non-empty, just copy it over to homedir_psx.
- Otherwise, generate a new path of the form "/home/$USER". */
- if (envhome && envhome[0] != '\0')
- strncat (homedir_psx, envhome, sizeof (homedir_psx) - 1);
- else
- {
- wcstombs (stpncpy (homedir_psx, "/home/", sizeof (homedir_psx)),
- user, sizeof (homedir_psx) - 6);
- homedir_psx[PATH_MAX - 1] = '\0';
- }
- }
- else
- {
- char *p = stpncpy (homedir_psx, passed_home_path, sizeof (homedir_psx));
- wcstombs (p, user, sizeof (homedir_psx) - (p - homedir_psx));
- homedir_psx[PATH_MAX - 1] = '\0';
- }
-
- printf ("%ls%s%ls:unused:%" PRIu32 ":%" PRIu32
- ":U-%ls\\%ls,%s:%s:/bin/bash\n",
- sep ? dom : L"",
- sep ?: "",
- user,
- (unsigned int) (id_offset + uid),
- (unsigned int) (id_offset + gid),
- dom,
- user,
- put_sid (curr_user.psid),
- homedir_psx);
-}
-
-static void
-enum_unix_users (domlist_t *dom_or_machine, const char *sep, DWORD id_offset,
+enum_unix_users (domlist_t *mach, const char *sep, DWORD id_offset,
char *unix_user_list)
{
WCHAR machine[INTERNET_MAX_HOST_NAME_LENGTH + 1];
- PWCHAR servername = NULL;
- char *d_or_m = dom_or_machine ? dom_or_machine->str : NULL;
- BOOL with_dom = dom_or_machine ? dom_or_machine->with_dom : FALSE;
SID_IDENTIFIER_AUTHORITY auth = { { 0, 0, 0, 0, 0, 22 } };
char *ustr, *user_list;
WCHAR user[UNLEN + sizeof ("Unix User\\") + 1];
WCHAR dom[MAX_DOMAIN_NAME_LEN + 1];
DWORD ulen, dlen, sidlen;
PSID psid;
- char psid_buffer[MAX_SID_LEN];
+ PSID numeric_psid;
+ char psid_buffer[SECURITY_MAX_SID_SIZE];
SID_NAME_USE acc_type;
- if (!d_or_m)
- return;
-
- int ret = mbstowcs (machine, d_or_m, INTERNET_MAX_HOST_NAME_LENGTH + 1);
+ int ret = mbstowcs (machine, mach->str, INTERNET_MAX_HOST_NAME_LENGTH + 1);
if (ret < 1 || ret >= INTERNET_MAX_HOST_NAME_LENGTH + 1)
{
fprintf (stderr, "%s: Invalid machine name '%s'. Skipping...\n",
- program_invocation_short_name, d_or_m);
+ program_invocation_short_name, mach->str);
return;
}
- servername = machine;
- if (!AllocateAndInitializeSid (&auth, 2, 1, 0, 0, 0, 0, 0, 0, 0, &psid))
+ if (!AllocateAndInitializeSid (&auth, 2, 1, 0, 0, 0, 0, 0, 0, 0,
+ &numeric_psid))
return;
if (!(user_list = strdup (unix_user_list)))
{
- FreeSid (psid);
+ FreeSid (numeric_psid);
return;
}
@@ -253,17 +158,19 @@ enum_unix_users (domlist_t *dom_or_machine, const char *sep, DWORD id_offset,
PWCHAR p = wcpcpy (user, L"Unix User\\");
ret = mbstowcs (p, ustr, UNLEN + 1);
if (ret < 1 || ret >= UNLEN + 1)
- fprintf (stderr, "%s: Invalid user name '%s'. Skipping...\n",
- program_invocation_short_name, ustr);
- else if (LookupAccountNameW (servername, user,
- psid = (PSID) psid_buffer,
- (sidlen = MAX_SID_LEN, &sidlen),
- dom,
- (dlen = MAX_DOMAIN_NAME_LEN + 1, &dlen),
- &acc_type))
- printf ("%s%s%ls:unused:%" PRIu32 ":99999:,%s::\n",
- with_dom ? "Unix User" : "",
- with_dom ? sep : "",
+ {
+ fprintf (stderr, "%s: Invalid user name '%s'. Skipping...\n",
+ program_invocation_short_name, ustr);
+ continue;
+ }
+ psid = (PSID) psid_buffer;
+ sidlen = SECURITY_MAX_SID_SIZE;
+ dlen = MAX_DOMAIN_NAME_LEN + 1;
+ if (LookupAccountNameW (machine, user, psid, &sidlen,
+ dom, &dlen, &acc_type))
+ printf ("%s%s%ls:*:%" PRIu32 ":99999:,%s::\n",
+ "Unix_User",
+ sep,
user + 10,
(unsigned int) (id_offset +
*GetSidSubAuthority (psid,
@@ -290,17 +197,17 @@ enum_unix_users (domlist_t *dom_or_machine, const char *sep, DWORD id_offset,
}
for (; start <= stop; ++ start)
{
+ psid = numeric_psid;
*GetSidSubAuthority (psid, *GetSidSubAuthorityCount(psid) - 1)
= start;
- if (LookupAccountSidW (servername, psid,
- user, (ulen = GNLEN + 1, &ulen),
- dom,
- (dlen = MAX_DOMAIN_NAME_LEN + 1, &dlen),
- &acc_type)
+ ulen = GNLEN + 1;
+ dlen = MAX_DOMAIN_NAME_LEN + 1;
+ if (LookupAccountSidW (machine, psid, user, &ulen,
+ dom, &dlen, &acc_type)
&& !iswdigit (user[0]))
- printf ("%s%s%ls:unused:%" PRIu32 ":99999:,%s::\n",
- with_dom ? "Unix User" : "",
- with_dom ? sep : "",
+ printf ("%s%s%ls:*:%" PRIu32 ":99999:,%s::\n",
+ "Unix_User",
+ sep,
user,
(unsigned int) (id_offset + start),
put_sid (psid));
@@ -309,40 +216,27 @@ enum_unix_users (domlist_t *dom_or_machine, const char *sep, DWORD id_offset,
}
free (user_list);
- FreeSid (psid);
+ FreeSid (numeric_psid);
}
static int
-enum_users (BOOL domain, domlist_t *dom_or_machine, const char *sep,
- const char *passed_home_path, DWORD id_offset, char *disp_username,
- int print_current)
+enum_users (domlist_t *mach, const char *sep, const char *passed_home_path,
+ DWORD id_offset, char *disp_username, int print_current)
{
WCHAR machine[INTERNET_MAX_HOST_NAME_LENGTH + 1];
- PWCHAR servername = NULL;
- char *d_or_m = dom_or_machine ? dom_or_machine->str : NULL;
- BOOL with_dom = dom_or_machine ? dom_or_machine->with_dom : FALSE;
USER_INFO_3 *buffer;
DWORD entriesread = 0;
DWORD totalentries = 0;
DWORD resume_handle = 0;
DWORD rc;
WCHAR uni_name[UNLEN + 1];
- if (domain)
- {
- servername = get_dcname (d_or_m);
- if (servername == (PWCHAR) -1)
- return 1;
- }
- else if (d_or_m)
+
+ int ret = mbstowcs (machine, mach->str, INTERNET_MAX_HOST_NAME_LENGTH + 1);
+ if (ret < 1 || ret >= INTERNET_MAX_HOST_NAME_LENGTH + 1)
{
- int ret = mbstowcs (machine, d_or_m, INTERNET_MAX_HOST_NAME_LENGTH + 1);
- if (ret < 1 || ret >= INTERNET_MAX_HOST_NAME_LENGTH + 1)
- {
- fprintf (stderr, "%s: Invalid machine name '%s'. Skipping...\n",
- program_invocation_short_name, d_or_m);
- return 1;
- }
- servername = machine;
+ fprintf (stderr, "%s: Invalid machine name '%s'. Skipping...\n",
+ program_invocation_short_name, mach->str);
+ return 1;
}
do
@@ -352,7 +246,7 @@ enum_users (BOOL domain, domlist_t *dom_or_machine, const char *sep,
if (disp_username != NULL)
{
mbstowcs (uni_name, disp_username, UNLEN + 1);
- rc = NetUserGetInfo (servername, (LPWSTR) &uni_name, 3,
+ rc = NetUserGetInfo (machine, (LPWSTR) &uni_name, 3,
(void *) &buffer);
entriesread = 1;
/* Avoid annoying error messages just because the user hasn't been
@@ -361,7 +255,7 @@ enum_users (BOOL domain, domlist_t *dom_or_machine, const char *sep,
return 0;
}
else
- rc = NetUserEnum (servername, 3, FILTER_NORMAL_ACCOUNT,
+ rc = NetUserEnum (machine, 3, FILTER_NORMAL_ACCOUNT,
(void *) &buffer, MAX_PREFERRED_LENGTH,
&entriesread, &totalentries, &resume_handle);
switch (rc)
@@ -384,9 +278,9 @@ enum_users (BOOL domain, domlist_t *dom_or_machine, const char *sep,
char homedir_psx[PATH_MAX];
WCHAR domain_name[MAX_DOMAIN_NAME_LEN + 1];
DWORD domname_len = MAX_DOMAIN_NAME_LEN + 1;
- char psid_buffer[MAX_SID_LEN];
+ char psid_buffer[SECURITY_MAX_SID_SIZE];
PSID psid = (PSID) psid_buffer;
- DWORD sid_length = MAX_SID_LEN;
+ DWORD sid_length = SECURITY_MAX_SID_SIZE;
SID_NAME_USE acc_type;
int uid = buffer[i].usri3_user_id;
@@ -407,7 +301,7 @@ enum_users (BOOL domain, domlist_t *dom_or_machine, const char *sep,
stpcpy (homedir_psx, passed_home_path),
PATH_MAX - strlen (passed_home_path));
- if (!LookupAccountNameW (servername, buffer[i].usri3_name,
+ if (!LookupAccountNameW (machine, buffer[i].usri3_name,
psid, &sid_length, domain_name,
&domname_len, &acc_type))
{
@@ -419,13 +313,12 @@ enum_users (BOOL domain, domlist_t *dom_or_machine, const char *sep,
{
WCHAR domname[MAX_DOMAIN_NAME_LEN + UNLEN + 2];
- wcscpy (domname, domain || !servername
- ? domain_name : servername);
+ wcscpy (domname, machine);
wcscat (domname, L"\\");
wcscat (domname, buffer[i].usri3_name);
- sid_length = MAX_SID_LEN;
+ sid_length = SECURITY_MAX_SID_SIZE;
domname_len = sizeof (domname);
- if (!LookupAccountNameW (servername, domname, psid,
+ if (!LookupAccountNameW (machine, domname, psid,
&sid_length, domain_name,
&domname_len, &acc_type))
{
@@ -439,10 +332,10 @@ enum_users (BOOL domain, domlist_t *dom_or_machine, const char *sep,
else if (EqualSid (curr_user.psid, psid))
got_curr_user = TRUE;
- printf ("%ls%s%ls:unused:%" PRIu32 ":%" PRIu32
+ printf ("%ls%s%ls:*:%" PRIu32 ":%" PRIu32
":%ls%sU-%ls\\%ls,%s:%s:/bin/bash\n",
- with_dom ? domain_name : L"",
- with_dom ? sep : "",
+ mach->with_dom ? domain_name : L"",
+ mach->with_dom ? sep : "",
buffer[i].usri3_name,
(unsigned int) (id_offset + uid),
(unsigned int) (id_offset + gid),
@@ -463,98 +356,52 @@ enum_users (BOOL domain, domlist_t *dom_or_machine, const char *sep,
return 0;
}
-static void
-print_special_by_sid (PSID_IDENTIFIER_AUTHORITY auth, BYTE cnt,
- DWORD sub1, DWORD sub2, DWORD sub3, DWORD sub4,
- DWORD sub5, DWORD sub6, DWORD sub7, DWORD sub8)
-{
- WCHAR user[UNLEN + 1], dom[MAX_DOMAIN_NAME_LEN + 1];
- DWORD len, len2, rid;
- PSID sid;
- SID_NAME_USE acc_type;
-
- if (AllocateAndInitializeSid (auth, cnt, sub1, sub2, sub3, sub4,
- sub5, sub6, sub7, sub8, &sid))
- {
- if (LookupAccountSidW (NULL, sid,
- user, (len = UNLEN + 1, &len),
- dom, (len2 = MAX_DOMAIN_NAME_LEN + 1, &len2),
- &acc_type))
- {
- if (sub8)
- rid = sub8;
- else if (sub7)
- rid = sub7;
- else if (sub6)
- rid = sub6;
- else if (sub5)
- rid = sub5;
- else if (sub4)
- rid = sub4;
- else if (sub3)
- rid = sub3;
- else if (sub2)
- rid = sub2;
- else
- rid = sub1;
- printf ("%ls:*:%" PRIu32 ":%" PRIu32 ":,%s::\n",
- user, (unsigned int) rid,
- (unsigned int) (rid == 18 ? 544 : rid), /* SYSTEM hack */
- put_sid (sid));
- }
- FreeSid (sid);
- }
-}
-
static int
usage (FILE * stream)
{
fprintf (stream,
"Usage: %s [OPTIONS]...\n"
"\n"
-"Print /etc/passwd file to stdout\n"
+"Write /etc/passwd-like output to stdout\n"
+"\n"
+"Don't use this command to generate a local /etc/passwd file, unless you\n"
+"really need one. See the Cygwin User's Guide for more information.\n"
"\n"
"Options:\n"
"\n"
-" -l,--local [machine[,offset]]\n"
-" print local user accounts with uid offset offset\n"
-" (from local machine if no machine specified)\n"
-" -L,--Local [machine[,offset]]\n"
-" ditto, but generate username with machine prefix\n"
-" -d,--domain [domain[,offset]]\n"
-" print domain accounts with uid offset offset\n"
-" (from current domain if no domain specified)\n"
-" -D,--Domain [domain[,offset]]\n"
-" ditto, but generate username with domain prefix\n"
-" -c,--current print current user\n"
-" -C,--Current ditto, but generate username with machine or\n"
-" domain prefix\n"
-" -S,--separator char for -L, -D, -C use character char as domain\\user\n"
-" separator in username instead of the default '\\'\n"
-" -o,--id-offset offset change the default offset (10000) added to uids\n"
-" in domain or foreign server accounts.\n"
-" -u,--username username only return information for the specified user\n"
-" one of -l, -L, -d, -D must be specified, too\n"
-" -p,--path-to-home path use specified path instead of user account home dir\n"
-" or /home prefix\n"
-" -U,--unix userlist additionally print UNIX users when using -l or -L\n"
-" on a UNIX Samba server\n"
-" userlist is a comma-separated list of usernames\n"
-" or uid ranges (root,-25,50-100).\n"
-" (enumerating large ranges can take a long time!)\n"
-" -s,--no-sids (ignored)\n"
-" -m,--no-mount (ignored)\n"
-" -g,--local-groups (ignored)\n"
-" -h,--help displays this message\n"
-" -V,--version version information and exit\n"
+" -l,--local [machine] Print local user accounts of \"machine\",\n"
+" from local machine if no machine specified.\n"
+" Automatically adding machine prefix for local\n"
+" machine depends on settings in /etc/nsswitch.conf.\n"
+" -L,--Local machine Ditto, but generate username with machine prefix.\n"
+" -d,--domain [domain] Print domain accounts,\n"
+" from current domain if no domain specified.\n"
+" -c,--current Print current user.\n"
+" -S,--separator char For -L use character char as domain\\user\n"
+" separator in username instead of the default '%s'.\n"
+" -o,--id-offset offset Change the default offset (0x10000) added to uids\n"
+" of foreign local machine accounts. Use with -l/-L.\n"
+" -u,--username username Only return information for the specified user.\n"
+" One of -l, -d must be specified, too\n"
+" -b,--no-builtin Don't print BUILTIN users.\n"
+" -p,--path-to-home path Use specified path instead of user account home dir\n"
+" or /home prefix.\n"
+" -U,--unix userlist Print UNIX users when using -l on a UNIX Samba\n"
+" server. Userlist is a comma-separated list of\n"
+" usernames or uid ranges (root,-25,50-100).\n"
+" Enumerating large ranges can take a long time!\n"
+" -h,--help Displays this message.\n"
+" -V,--version Version information and exit.\n"
"\n"
"Default is to print local accounts on stand-alone machines, domain accounts\n"
"on domain controllers and domain member machines.\n"
-"\n", program_invocation_short_name);
+"\n", program_invocation_short_name,
+ (const char *) cygwin_internal (CW_GETNSSSEP));
return 1;
}
static struct option longopts[] = {
+ {"no-builtin", no_argument, NULL, 'b'},
{"current", no_argument, NULL, 'c'},
{"Current", no_argument, NULL, 'C'},
{"domain", optional_argument, NULL, 'd'},
@@ -574,14 +421,14 @@ static struct option longopts[] = {
{0, no_argument, NULL, 0}
};
-static char opts[] = "cCd::D::ghl::L::mo:sS:p:u:U:V";
+static char opts[] = "bcCd::D::ghl::L::mo:sS:p:u:U:V";
static void
print_version ()
{
printf ("mkpasswd (cygwin) %d.%d.%d\n"
"Passwd File Generator\n"
- "Copyright (C) 1997 - %s Red Hat, Inc.\n"
+ "Copyright (C) 1997 - %s Cygwin Authors\n"
"This is free software; see the source for copying conditions. There is NO\n"
"warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n",
CYGWIN_VERSION_DLL_MAJOR / 1000,
@@ -590,81 +437,24 @@ print_version ()
strrchr (__DATE__, ' ') + 1);
}
-static void
-print_special_by_name (PCWSTR name, uid_t uid, gid_t gid)
-{
- DWORD size = 256, dom_size = 256;
- PSID sid = (PSID) alloca (size);
- WCHAR dom[dom_size];
- SID_NAME_USE use;
-
- PWCHAR name_only = wcschr (name, L'\\');
- if (name_only)
- ++name_only;
-
- if (LookupAccountNameW (NULL, name, sid, &size, dom, &dom_size, &use))
- printf ("%ls:*:%lu:%lu:U-%ls%s%ls,%s::\n",
- name_only ?: name,
- (unsigned long) uid,
- (unsigned long) gid,
- name_only ? dom : L"",
- name_only ? "\\" : "",
- name_only ?: name,
- put_sid (sid));
-}
-
-static void
-enum_std_accounts ()
-{
- /* Generate service starter account entries. */
- printf ("SYSTEM:*:18:544:,S-1-5-18::\n");
- printf ("LocalService:*:19:544:U-NT AUTHORITY\\LocalService,S-1-5-19::\n");
- printf ("NetworkService:*:20:544:U-NT AUTHORITY\\NetworkService,S-1-5-20::\n");
- /* Get 'administrators' group (has localized name). */
- print_special_by_sid (&sid_nt_auth, 2, SECURITY_BUILTIN_DOMAIN_RID,
- DOMAIN_ALIAS_RID_ADMINS, 0, 0, 0, 0, 0, 0);
- /* Fetch "TrustedInstaller" account starting with Vista. */
- print_special_by_name (L"NT SERVICE\\TrustedInstaller", -2, -2);
-}
-
-static PPOLICY_PRIMARY_DOMAIN_INFO p_dom;
-
-static BOOL
-fetch_primary_domain ()
-{
- NTSTATUS status;
- LSA_OBJECT_ATTRIBUTES oa = { 0, 0, 0, 0, 0, 0 };
- LSA_HANDLE lsa;
-
- if (!p_dom)
- {
- status = LsaOpenPolicy (NULL, &oa, POLICY_VIEW_LOCAL_INFORMATION, &lsa);
- if (!NT_SUCCESS (status))
- return FALSE;
- status = LsaQueryInformationPolicy (lsa, PolicyPrimaryDomainInformation,
- (PVOID *) ((void *) &p_dom));
- LsaClose (lsa);
- if (!NT_SUCCESS (status))
- return FALSE;
- }
- return !!p_dom->Sid;
-}
-
int
main (int argc, char **argv)
{
int print_domlist = 0;
domlist_t domlist[32];
+ char cname[1024];
char *opt, *p, *ep;
int print_current = 0;
+ int print_builtin = 1;
char *print_unix = NULL;
- const char *sep_char = "\\";
- DWORD id_offset = 10000, off;
+ const char *nss_sep = (const char *) cygwin_internal (CW_GETNSSSEP);
+ const char *sep_char = nss_sep;
+ DWORD id_offset = 0x10000, off;
int c, i;
char *disp_username = NULL;
char passed_home_path[PATH_MAX];
- BOOL in_domain;
int optional_args = 0;
+ uintptr_t nss_src = cygwin_internal (CW_GETNSS_PWD_SRC);
passed_home_path[0] = '\0';
if (!isatty (1))
@@ -674,18 +464,23 @@ main (int argc, char **argv)
setlocale (LC_CTYPE, "");
if (!strcmp (setlocale (LC_CTYPE, NULL), "C"))
setlocale (LC_CTYPE, "en_US.UTF-8");
- in_domain = fetch_primary_domain ();
fetch_current_user_sid ();
if (argc == 1)
{
- enum_std_accounts ();
- if (in_domain)
- enum_users (TRUE, NULL, sep_char, passed_home_path, 10000,
- disp_username, 0);
- else
- enum_users (FALSE, NULL, sep_char, passed_home_path, 0,
- disp_username, 0);
+ int enums = ENUM_PRIMARY | ENUM_LOCAL | ENUM_BUILTIN;
+ uintptr_t ticket = cygwin_internal (CW_SETENT, FALSE, enums, NULL);
+ if (ticket)
+ {
+ struct passwd *pwd;
+
+ while ((pwd = (struct passwd *) cygwin_internal (CW_GETENT, FALSE,
+ ticket)))
+ printf ("%s:%s:%u:%u:%s:%s:%s\n", pwd->pw_name, pwd->pw_passwd,
+ pwd->pw_uid, pwd->pw_gid, pwd->pw_gecos, pwd->pw_dir,
+ pwd->pw_shell);
+ cygwin_internal (CW_ENDENT, FALSE, ticket);
+ }
return 0;
}
@@ -721,32 +516,55 @@ main (int argc, char **argv)
program_invocation_short_name,
domlist[i].domain ? "domain" : "machine",
domlist[i].str);
- goto skip;
+ break;
}
domlist[print_domlist].str = opt;
- domlist[print_domlist].id_offset = UINT32_MAX;
if (opt && (p = strchr (opt, ',')))
{
- if (p == opt
- || !isdigit ((unsigned char) p[1])
- || (domlist[print_domlist].id_offset = strtol (p + 1, &ep, 10)
- , *ep))
+ if (p == opt)
{
- fprintf (stderr, "%s: Malformed domain,offset string '%s'. "
+ fprintf (stderr, "%s: Malformed domain string '%s'. "
"Skipping...\n", program_invocation_short_name, opt);
break;
}
*p = '\0';
}
- domlist[print_domlist++].with_dom = (c == 'D' || c == 'L');
-skip:
+ if (c == 'l' || c == 'L')
+ {
+ DWORD csize = sizeof cname;
+
+ domlist[print_domlist].with_dom = (c == 'L');
+ if (!opt)
+ {
+ /* If the system uses /etc/passwd exclusively as account DB,
+ create local group names the old fashioned way. */
+ if (nss_src == NSS_SRC_FILES)
+ {
+ GetComputerNameExA (ComputerNameNetBIOS, cname, &csize);
+ domlist[print_domlist].str = cname;
+ }
+ }
+ else if (nss_src != NSS_SRC_FILES)
+ {
+ /* If the system uses Windows account DBs, check if machine
+ name is local machine. If so, remove the domain name to
+ enforce system naming convention. */
+ if (GetComputerNameExA (strchr (opt, '.')
+ ? ComputerNameDnsFullyQualified
+ : ComputerNameNetBIOS,
+ cname, &csize)
+ && strcasecmp (opt, cname) == 0)
+ domlist[print_domlist].str = NULL;
+ }
+ }
+ ++print_domlist;
break;
case 'S':
sep_char = optarg;
if (strlen (sep_char) > 1)
{
- fprintf (stderr, "%s: Only one character allowed as domain\\user "
- "separator character.\n",
+ fprintf (stderr, "%s: Only one ASCII character allowed as "
+ "domain\\user separator character.\n",
program_invocation_short_name);
return 1;
}
@@ -761,19 +579,14 @@ skip:
print_unix = optarg;
break;
case 'c':
- sep_char = NULL;
- /*FALLTHRU*/
case 'C':
print_current = 1;
break;
case 'o':
id_offset = strtoul (optarg, &ep, 10);
- if (*ep)
- {
- fprintf (stderr, "%s: Malformed offset '%s'. "
- "Skipping...\n", program_invocation_short_name, optarg);
- return 1;
- }
+ break;
+ case 'b':
+ print_builtin = 0;
break;
case 'p':
if (optarg[0] != '/')
@@ -814,24 +627,92 @@ skip:
exit (1);
}
- off = id_offset;
+ struct passwd *ppwd = NULL;
+ const char *ppwd_sid = NULL;
+ if (print_current)
+ {
+ ppwd = (struct passwd *) cygwin_internal (CW_GETPWSID, TRUE,
+ curr_user.psid);
+ if (ppwd)
+ ppwd_sid = strrchr (ppwd->pw_gecos, ',');
+ }
+
+ int enums = ENUM_NONE;
+ WCHAR tdoms[print_domlist * 258];
+ PWCHAR t = tdoms;
+ if (!disp_username && print_builtin && print_domlist)
+ enums |= ENUM_BUILTIN;
for (i = 0; i < print_domlist; ++i)
{
- DWORD my_off = (domlist[i].domain || domlist[i].str)
- ? domlist[i].id_offset != UINT_MAX
- ? domlist[i].id_offset : off : 0;
- if (!domlist[i].domain && domlist[i].str && print_unix)
- enum_unix_users (domlist + i, sep_char, my_off, print_unix);
- if (!my_off && !disp_username)
- enum_std_accounts ();
- enum_users (domlist[i].domain, domlist + i, sep_char, passed_home_path,
- my_off, disp_username, print_current);
- if (my_off)
- off += id_offset;
+ if (domlist[i].domain)
+ {
+ if (domlist[i].str)
+ {
+ enums |= ENUM_TDOMS;
+ t += mbstowcs (t, domlist[i].str, 257);
+ *t++ = L'\0';
+ }
+ else
+ enums |= ENUM_PRIMARY;
+ }
+ else if (!domlist[i].str)
+ enums |= ENUM_LOCAL;
+ }
+ if (t > tdoms)
+ *t++ = L'\0';
+ if (enums)
+ {
+ uintptr_t ticket = cygwin_internal (CW_SETENT, FALSE, enums,
+ t > tdoms ? tdoms : NULL);
+ if (ticket)
+ {
+ struct passwd *pwd;
+
+ while ((pwd = (struct passwd *)
+ cygwin_internal (CW_GETENT, FALSE, ticket)))
+ {
+ p = NULL;
+ if (disp_username
+ && strcasecmp (disp_username, pwd->pw_name) != 0
+ && (!(p = strchr (pwd->pw_name, nss_sep[0]))
+ || strcasecmp (disp_username, p + 1) != 0))
+ continue;
+ printf ("%s:%s:%u:%u:%s:%s%s:%s\n", pwd->pw_name, pwd->pw_passwd,
+ pwd->pw_uid, pwd->pw_gid, pwd->pw_gecos,
+ passed_home_path[0] ? passed_home_path : "",
+ passed_home_path[0] ? (p ? p + 1 : pwd->pw_name)
+ : pwd->pw_dir,
+ pwd->pw_shell);
+ const char *pwd_sid = strrchr (pwd->pw_gecos, ',');
+ if (ppwd && ppwd_sid && pwd_sid && !strcmp (pwd_sid, ppwd_sid))
+ got_curr_user = TRUE;
+ }
+ cygwin_internal (CW_ENDENT, FALSE, ticket);
+ }
}
if (print_current && !got_curr_user)
- current_user (sep_char, passed_home_path, off, disp_username);
+ {
+ p = strchr (ppwd->pw_name, nss_sep[0]);
+ printf ("%s:%s:%u:%u:%s:%s%s:%s\n", ppwd->pw_name, ppwd->pw_passwd,
+ ppwd->pw_uid, ppwd->pw_gid, ppwd->pw_gecos,
+ passed_home_path[0] ? passed_home_path : "",
+ passed_home_path[0] ? (p ? p + 1 : ppwd->pw_name) : ppwd->pw_dir,
+ ppwd->pw_shell);
+ }
+
+ off = 0xfd000000;
+ for (i = 0; i < print_domlist; ++i)
+ {
+ if (domlist[i].domain || !domlist[i].str)
+ continue;
+ enum_users (domlist + i, sep_char, passed_home_path,
+ (nss_src == NSS_SRC_FILES) ? 0x30000 : off,
+ disp_username, print_current);
+ if (!domlist[i].domain && domlist[i].str && print_unix)
+ enum_unix_users (domlist + i, sep_char, 0xff000000, print_unix);
+ off += id_offset;
+ }
return 0;
}
diff --git a/winsup/utils/module_info.cc b/winsup/utils/module_info.cc
index 12e74de39..bf3a18bf3 100644
--- a/winsup/utils/module_info.cc
+++ b/winsup/utils/module_info.cc
@@ -1,7 +1,5 @@
/* module_info.cc
- Copyright 1999, 2000, 2001, 2010, 2013 Red Hat, Inc.
-
Written by Egor Duda <deo@logos-m.ru>
This file is part of Cygwin.
@@ -15,20 +13,6 @@ details. */
#include <psapi.h>
#include "loadlib.h"
-static int psapi_loaded = 0;
-static HMODULE psapi_module_handle = NULL;
-
-typedef BOOL WINAPI (tf_EnumProcessModules) (HANDLE, HMODULE *, DWORD,
- LPDWORD);
-typedef BOOL WINAPI (tf_GetModuleInformation) (HANDLE, HMODULE, LPMODULEINFO,
- DWORD);
-typedef DWORD WINAPI (tf_GetModuleFileNameExA) (HANDLE, HMODULE, LPSTR,
- DWORD);
-
-static tf_EnumProcessModules *psapi_EnumProcessModules = NULL;
-static tf_GetModuleInformation *psapi_GetModuleInformation = NULL;
-static tf_GetModuleFileNameExA *psapi_GetModuleFileNameExA = NULL;
-
/* Returns full name of Dll, which is loaded by hProcess at BaseAddress.
Uses psapi.dll. */
@@ -45,41 +29,14 @@ psapi_get_module_name (HANDLE hProcess, LPVOID BaseAddress)
char name_buf[MAX_PATH + 1];
- if (!psapi_loaded ||
- psapi_EnumProcessModules == NULL ||
- psapi_GetModuleInformation == NULL ||
- psapi_GetModuleFileNameExA == NULL)
- {
- if (psapi_loaded)
- goto failed;
- psapi_loaded = 1;
- psapi_module_handle = LoadLibrary ("psapi.dll");
- if (!psapi_module_handle)
- goto failed;
- psapi_EnumProcessModules =
- (tf_EnumProcessModules *) GetProcAddress (psapi_module_handle,
- "EnumProcessModules");
- psapi_GetModuleInformation =
- (tf_GetModuleInformation *) GetProcAddress (psapi_module_handle,
- "GetModuleInformation");
- psapi_GetModuleFileNameExA =
- (tf_GetModuleFileNameExA *) GetProcAddress (psapi_module_handle,
- "GetModuleFileNameExA");
- if (psapi_EnumProcessModules == NULL
- || psapi_GetModuleInformation == NULL
- || psapi_GetModuleFileNameExA == NULL)
- goto failed;
- }
-
- ok = (*psapi_EnumProcessModules) (hProcess,
- DllHandle, sizeof (HMODULE), &cbNeeded);
+ ok = EnumProcessModules (hProcess, DllHandle, sizeof (HMODULE), &cbNeeded);
if (!ok || !cbNeeded)
goto failed;
DllHandle = (HMODULE *) malloc (cbNeeded);
if (!DllHandle)
goto failed;
- ok = (*psapi_EnumProcessModules) (hProcess, DllHandle, cbNeeded, &cbNeeded);
+ ok = EnumProcessModules (hProcess, DllHandle, cbNeeded, &cbNeeded);
if (!ok)
{
free (DllHandle);
@@ -88,15 +45,13 @@ psapi_get_module_name (HANDLE hProcess, LPVOID BaseAddress)
for (i = 0; i < cbNeeded / sizeof (HMODULE); i++)
{
- if (!(*psapi_GetModuleInformation) (hProcess,
- DllHandle[i], &mi, sizeof (mi)))
+ if (!GetModuleInformation (hProcess, DllHandle[i], &mi, sizeof (mi)))
{
free (DllHandle);
goto failed;
}
- len = (*psapi_GetModuleFileNameExA) (hProcess,
- DllHandle[i], name_buf, MAX_PATH);
+ len = GetModuleFileNameExA (hProcess, DllHandle[i], name_buf, MAX_PATH);
if (len == 0)
{
free (DllHandle);
diff --git a/winsup/utils/mount.cc b/winsup/utils/mount.cc
index 650266d3f..1d32755c9 100644
--- a/winsup/utils/mount.cc
+++ b/winsup/utils/mount.cc
@@ -1,8 +1,5 @@
/* mount.cc
- Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008, 2009, 2010, 2011, 2013 Red Hat, Inc.
-
This file is part of Cygwin.
This software is a copyrighted work licensed under the terms of the
@@ -238,7 +235,7 @@ print_version ()
{
printf ("mount (cygwin) %d.%d.%d\n"
"Mount filesystem utility\n"
- "Copyright (C) 1996 - %s Red Hat, Inc.\n"
+ "Copyright (C) 1996 - %s Cygwin Authors\n"
"This is free software; see the source for copying conditions. There is NO\n"
"warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n",
CYGWIN_VERSION_DLL_MAJOR / 1000,
diff --git a/winsup/utils/parse_pe.cc b/winsup/utils/parse_pe.cc
index c3ae7bb11..2a388638c 100644
--- a/winsup/utils/parse_pe.cc
+++ b/winsup/utils/parse_pe.cc
@@ -1,14 +1,12 @@
/* parse_pe.cc
- Copyright 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2007, 2012, 2013 Red Hat, Inc.
-
Written by Egor Duda <deo@logos-m.ru>
This file is part of Cygwin.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
+ the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
diff --git a/winsup/utils/passwd.c b/winsup/utils/passwd.c
index ea3e2d159..9510be514 100644
--- a/winsup/utils/passwd.c
+++ b/winsup/utils/passwd.c
@@ -1,8 +1,5 @@
/* passwd.c: Changing passwords and managing account information
- Copyright 1999, 2000, 2001, 2002, 2003, 2005, 2008, 2009, 2011, 2012,
- 2013 Red Hat, Inc.
-
Written by Corinna Vinschen <corinna.vinschen@cityweb.de>
This file is part of Cygwin.
@@ -17,6 +14,7 @@ details. */
#include <lmerr.h>
#include <lmcons.h>
#include <lmapibuf.h>
+#include <dsgetdc.h>
#include <stdio.h>
#include <stdlib.h>
@@ -84,7 +82,7 @@ EvalRet (int ret, const char *user)
return 0;
case ERROR_ACCESS_DENIED:
- if (! user)
+ if (!user)
eprint (0, "You may not change password expiry information.");
else
eprint (0, "You may not change the password for %s.", user);
@@ -115,7 +113,7 @@ EvalRet (int ret, const char *user)
}
PUSER_INFO_3
-GetPW (char *user, int print_win_name, LPCWSTR server)
+GetPW (char *user, int print_win_name, LPWSTR *server)
{
char usr_buf[UNLEN + 1];
WCHAR name[UNLEN + 1];
@@ -124,7 +122,7 @@ GetPW (char *user, int print_win_name, LPCWSTR server)
struct passwd *pw;
char *domain = (char *) alloca (INTERNET_MAX_HOST_NAME_LENGTH + 1);
- /* Try getting a Win32 username in case the user edited /etc/passwd */
+ /* Get the Win32 username and a suitable server. */
if ((pw = getpwnam (user)))
{
cygwin_internal (CW_EXTRACT_DOMAIN_AND_USER, pw, domain, usr_buf);
@@ -138,22 +136,40 @@ GetPW (char *user, int print_win_name, LPCWSTR server)
printf ("Windows username : %s\n", user);
}
}
+ if (!*server)
+ {
+ PDOMAIN_CONTROLLER_INFOW dci;
+ char machine[INTERNET_MAX_HOST_NAME_LENGTH + 1];
+ DWORD mlen = sizeof machine;
+ WCHAR wdom[INTERNET_MAX_HOST_NAME_LENGTH + 1];
+
+ /* If we can't fetch the local machine name, or if the machine name
+ is not the same as the user's domain name, try to fetch the DC via
+ DsGetDcName. Otherwise, just stick to a NULL servername, since
+ that's the same as using the local machine. */
+ if (!GetComputerNameExA (ComputerNameNetBIOS, machine, &mlen)
+ || strcasecmp (domain, machine) != 0)
+ {
+ mbstowcs (wdom, domain, INTERNET_MAX_HOST_NAME_LENGTH + 1);
+ if (!DsGetDcNameW (NULL, wdom, NULL, NULL, DS_IS_FLAT_NAME, &dci))
+ *server = dci->DomainControllerName;
+ }
+ }
}
mbstowcs (name, user, UNLEN + 1);
- ret = NetUserGetInfo (server, name, 3, (void *) &ui);
+ ret = NetUserGetInfo (*server, name, 3, (void *) &ui);
return EvalRet (ret, user) ? NULL : ui;
}
int
-ChangePW (const char *user, const char *oldpwd, const char *pwd, int justcheck,
- LPCWSTR server)
+ChangePW (const char *user, PCWSTR name, const char *oldpwd, const char *pwd,
+ int justcheck, LPCWSTR server)
{
- WCHAR name[UNLEN + 1], oldpass[512], pass[512];
+ WCHAR oldpass[512], pass[512];
DWORD ret;
- mbstowcs (name, user, UNLEN + 1);
mbstowcs (pass, pwd, 512);
- if (! oldpwd)
+ if (!oldpwd)
{
USER_INFO_1003 ui;
@@ -167,10 +183,8 @@ ChangePW (const char *user, const char *oldpwd, const char *pwd, int justcheck,
}
if (justcheck && ret != ERROR_INVALID_PASSWORD)
return 0;
- if (! EvalRet (ret, user) && ! justcheck)
- {
- eprint (0, "Password changed.");
- }
+ if (!EvalRet (ret, user) && !justcheck)
+ eprint (0, "Password changed.");
return ret;
}
@@ -193,7 +207,7 @@ PrintPW (PUSER_INFO_3 ui, LPCWSTR server)
(ui->usri3_password_expired) ? "yes\n" : "no\n");
printf ("Latest password change : %s", ctime(&t));
ret = NetUserModalsGet (server, 0, (void *) &mi);
- if (! ret)
+ if (!ret)
{
if (mi->usrmod0_max_passwd_age == TIMEQ_FOREVER)
mi->usrmod0_max_passwd_age = 0;
@@ -222,7 +236,7 @@ SetModals (int xarg, int narg, int iarg, int Larg, LPCWSTR server)
PUSER_MODALS_INFO_0 mi;
ret = NetUserModalsGet (server, 0, (void *) &mi);
- if (! ret)
+ if (!ret)
{
if (xarg == 0)
mi->usrmod0_max_passwd_age = TIMEQ_FOREVER;
@@ -277,15 +291,13 @@ usage (FILE * stream, int status)
"System operations:\n"
" -i, --inactive NUM set NUM of days before inactive accounts are disabled\n"
" (inactive accounts are those with expired passwords).\n"
- " -n, --minage DAYS set system minimum password age to DAYS days.\n"
- " -x, --maxage DAYS set system maximum password age to DAYS days.\n"
+ " -n, --minage MINDAYS set system minimum password age to MINDAYS days.\n"
+ " -x, --maxage MAXDAYS set system maximum password age to MAXDAYS days.\n"
" -L, --length LEN set system minimum password length to LEN.\n"
"\n"
"Other options:\n"
" -d, --logonserver SERVER connect to SERVER (e.g. domain controller).\n"
- " Default server is the local system, unless\n"
- " changing the current user, in which case the\n"
- " default is the content of $LOGONSERVER.\n"
+ " Usually not required.\n"
" -S, --status display password status for USER (locked, expired,\n"
" etc.) plus global system password settings.\n"
" -h, --help output usage information and exit.\n"
@@ -354,7 +366,7 @@ print_version ()
{
printf ("passwd (cygwin) %d.%d.%d\n"
"Password Utility\n"
- "Copyright (C) 1999 - %s Red Hat, Inc.\n"
+ "Copyright (C) 1999 - %s Cygwin Authors\n"
"This is free software; see the source for copying conditions. There is NO\n"
"warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n",
CYGWIN_VERSION_DLL_MAJOR / 1000,
@@ -484,7 +496,7 @@ main (int argc, char **argv)
break;
case 'V':
- case 'v': /* Keep this option for historrical reasons,
+ case 'v': /* Keep this option for historical reasons,
but don't advertize it. */
print_version ();
exit (0);
@@ -537,7 +549,8 @@ main (int argc, char **argv)
if (!strcmp (username, getlogin ()))
username = NULL;
else if (!caller_is_admin ())
- return eprint (0, "You may not change the password for %s.", user);
+ return eprint (0, "You may not change the password for %s.",
+ username);
if (optind < argc)
usage (stderr, 1);
@@ -591,8 +604,8 @@ main (int argc, char **argv)
}
}
- ui = GetPW (user, 1, server);
- if (! ui)
+ ui = GetPW (user, 1, &server);
+ if (!ui)
return 1;
if (lopt || uopt || copt || Copt || eopt || Eopt || popt || Popt || Sopt)
@@ -635,14 +648,11 @@ main (int argc, char **argv)
if (!caller_is_admin () && !myself)
return eprint (0, "You may not change the password for %s.", user);
- eprint (0, "Enter the new password (minimum of 5, maximum of 8 characters).");
- eprint (0, "Please use a combination of upper and lower case letters and numbers.");
-
oldpwd[0] = '\0';
if (!caller_is_admin ())
{
strcpy (oldpwd, getpass ("Old password: "));
- if (ChangePW (user, oldpwd, oldpwd, 1, server))
+ if (ChangePW (user, ui->usri3_name, oldpwd, oldpwd, 1, server))
return 1;
}
@@ -651,11 +661,12 @@ main (int argc, char **argv)
strcpy (newpwd, getpass ("New password: "));
if (strcmp (newpwd, getpass ("Re-enter new password: ")))
eprint (0, "Password is not identical.");
- else if (! ChangePW (user, *oldpwd ? oldpwd : NULL, newpwd, 0, server))
+ else if (!ChangePW (user, ui->usri3_name, *oldpwd ? oldpwd : NULL,
+ newpwd, 0, server))
ret = 1;
- if (! ret && cnt < 2)
+ if (!ret && cnt < 2)
eprint (0, "Try again.");
}
- while (! ret && ++cnt < 3);
- return ! ret;
+ while (!ret && ++cnt < 3);
+ return !ret;
}
diff --git a/winsup/utils/path.cc b/winsup/utils/path.cc
index d1d01e92b..4877f6a3c 100644
--- a/winsup/utils/path.cc
+++ b/winsup/utils/path.cc
@@ -1,8 +1,5 @@
/* path.cc
- Copyright 2001, 2002, 2003, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012,
- 2013 Red Hat, Inc.
-
This file is part of Cygwin.
This software is a copyrighted work licensed under the terms of the
@@ -443,7 +440,12 @@ from_fstab_line (mnt_t *m, char *line, bool user)
return false;
}
m->posix = strdup (posix_path);
- unconvert_slashes (native_path);
+ /* Bind mounts require POSIX paths, otherwise the path is wrongly
+ prefixed with the Cygwin root dir when trying to convert it to
+ a Win32 path in mount(2). So don't convert slashes to backslashes
+ in this case. */
+ if (!(mount_flags & MOUNT_BIND))
+ unconvert_slashes (native_path);
m->native = strdup (native_path);
m->flags = mount_flags;
}
diff --git a/winsup/utils/path.h b/winsup/utils/path.h
index a5c77ef58..53ef4d2f6 100644
--- a/winsup/utils/path.h
+++ b/winsup/utils/path.h
@@ -1,7 +1,5 @@
/* path.h
- Copyright 2001, 2002, 2003, 2006, 2008, 2009 Red Hat, Inc.
-
This file is part of Cygwin.
This software is a copyrighted work licensed under the terms of the
diff --git a/winsup/utils/pldd.c b/winsup/utils/pldd.c
index ea99a8bac..84c5b9168 100644
--- a/winsup/utils/pldd.c
+++ b/winsup/utils/pldd.c
@@ -1,7 +1,5 @@
/* pldd.c
- Copyright 2012 Red Hat, Inc.
-
This file is part of Cygwin.
This software is a copyrighted work licensed under the terms of the
@@ -55,7 +53,7 @@ print_version ()
{
printf ("pldd (cygwin) %d.%d.%d\n"
"List dynamic shared objects loaded into process.\n"
- "Copyright (C) 2012 Red Hat, Inc.\n\n"
+ "Copyright (C) 2012 Cygwin Authors\n\n"
"This program comes with NO WARRANTY, to the extent permitted by law.\n"
"You may redistribute copies of this program under the terms of\n"
"the Cygwin license. Please consult the CYGWIN_LICENSE file for details.\n",
diff --git a/winsup/utils/ps.cc b/winsup/utils/ps.cc
index 952b63ee3..ce5a4dc6e 100644
--- a/winsup/utils/ps.cc
+++ b/winsup/utils/ps.cc
@@ -1,8 +1,5 @@
/* ps.cc
- Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008, 2009, 2010, 2011, 2012 Red Hat, Inc.
-
This file is part of Cygwin.
This software is a copyrighted work licensed under the terms of the
@@ -134,7 +131,7 @@ print_version ()
{
printf ("ps (cygwin) %d.%d.%d\n"
"Show process statistics\n"
- "Copyright (C) 1996 - %s Red Hat, Inc.\n"
+ "Copyright (C) 1996 - %s Cygwin Authors\n"
"This is free software; see the source for copying conditions. There is NO\n"
"warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n",
CYGWIN_VERSION_DLL_MAJOR / 1000,
@@ -158,8 +155,8 @@ main (int argc, char *argv[])
const char *dfmt = "%7d%4s%10s %s\n";
const char *ftitle = " UID PID PPID TTY STIME COMMAND\n";
const char *ffmt = "%8.8s%8d%8d%4s%10s %s\n";
- const char *ltitle = " PID PPID PGID WINPID TTY UID STIME COMMAND\n";
- const char *lfmt = "%c %7d %7d %7d %10u %4s %4u %8s %s\n";
+ const char *ltitle = " PID PPID PGID WINPID TTY UID STIME COMMAND\n";
+ const char *lfmt = "%c %7d %7d %7d %10u %4s %8u %8s %s\n";
char ch;
PUNICODE_STRING uni = (PUNICODE_STRING) unicode_buf;
void *drive_map = NULL;
@@ -259,27 +256,15 @@ main (int argc, char *argv[])
version.dwOSVersionInfoSize = sizeof version;
GetVersionEx (&version);
if (version.dwMajorVersion <= 5) /* pre-Vista */
- {
- proc_access = PROCESS_QUERY_INFORMATION;
- if (version.dwMinorVersion < 1) /* Windows 2000 */
- proc_access |= PROCESS_VM_READ;
- else
- {
- }
- }
-
- /* Except on Windows 2000, fetch an opaque drive mapping object from the
- Cygwin DLL. This is used to map NT device paths to Win32 paths. */
- if (!(proc_access & PROCESS_VM_READ))
- {
- drive_map = (void *) cygwin_internal (CW_ALLOC_DRIVE_MAP);
- /* Check old Cygwin version. */
- if (drive_map == (void *) -1)
- drive_map = NULL;
- /* Allow fallback to GetModuleFileNameEx for post-W2K. */
- if (!drive_map)
- proc_access = PROCESS_QUERY_INFORMATION | PROCESS_VM_READ;
- }
+ proc_access = PROCESS_QUERY_INFORMATION;
+
+ drive_map = (void *) cygwin_internal (CW_ALLOC_DRIVE_MAP);
+ /* Check old Cygwin version. */
+ if (drive_map == (void *) -1)
+ drive_map = NULL;
+ /* Allow fallback to GetModuleFileNameEx. */
+ if (!drive_map)
+ proc_access = PROCESS_QUERY_INFORMATION | PROCESS_VM_READ;
}
for (int pid = 0;
@@ -332,9 +317,9 @@ main (int argc, char *argv[])
if (!h)
continue;
/* We use NtQueryInformationProcess in the first place, because
- GetModuleFileNameEx does not work on 64 bit systems when trying
+ GetModuleFileNameEx does not work under WOW64 when trying
to fetch module names of 64 bit processes. */
- if (!(proc_access & PROCESS_VM_READ)) /* Windows 2000 */
+ if (!(proc_access & PROCESS_VM_READ))
{
status = NtQueryInformationProcess (h, ProcessImageFileName, uni,
sizeof unicode_buf, NULL);
@@ -358,12 +343,9 @@ main (int argc, char *argv[])
}
}
}
- else
- {
- if (GetModuleFileNameExW (h, NULL, (PWCHAR) unicode_buf,
- NT_MAX_PATH))
- win32path = (wchar_t *) unicode_buf;
- }
+ else if (GetModuleFileNameExW (h, NULL, (PWCHAR) unicode_buf,
+ NT_MAX_PATH))
+ win32path = (wchar_t *) unicode_buf;
if (win32path)
wcstombs (pname, win32path, sizeof pname);
else
diff --git a/winsup/utils/regtool.cc b/winsup/utils/regtool.cc
index 86f2bb61f..ad746adf7 100644
--- a/winsup/utils/regtool.cc
+++ b/winsup/utils/regtool.cc
@@ -1,8 +1,5 @@
/* regtool.cc
- Copyright 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008,
- 2009, 2010, 2011 Red Hat Inc.
-
This file is part of Cygwin.
This software is a copyrighted work licensed under the terms of the
@@ -42,6 +39,7 @@ static struct option longopts[] =
{"dword", no_argument, NULL, 'd' },
{"dword-be", no_argument, NULL, 'D' },
{"expand-string", no_argument, NULL, 'e' },
+ {"force", no_argument, NULL, 'f' },
{"help", no_argument, NULL, 'h' },
{"integer", no_argument, NULL, 'i' },
{"keys", no_argument, NULL, 'k'},
@@ -61,7 +59,7 @@ static struct option longopts[] =
{NULL, 0, NULL, 0}
};
-static char opts[] = "bdDehiklmnpqQsvVwWxK:";
+static char opts[] = "bdDefhiklmnpqQsvVwWxK:";
const char *types[] =
{
@@ -85,6 +83,7 @@ int verbose = 0;
int quiet = 0;
int hex = 0;
DWORD wow64 = 0;
+DWORD restore_flags = 0;
char **argv;
HKEY key;
@@ -112,22 +111,23 @@ usage (FILE *where = stderr)
" unset KEY\\VALUE removes VALUE from KEY\n"
" load KEY\\SUBKEY PATH load hive from PATH into new SUBKEY\n"
" unload KEY\\SUBKEY unload hive and remove SUBKEY\n"
- " save KEY\\SUBKEY PATH save SUBKEY into new hive PATH\n"
+ " save KEY\\SUBKEY PATH save SUBKEY into new file PATH\n"
+ " restore KEY\\SUBKEY PATH restore SUBKEY from file PATH\n"
"\n");
fprintf (where, ""
- "Options for 'list' Action:\n"
+ "Options for 'list' action:\n"
"\n"
" -k, --keys print only KEYs\n"
" -l, --list print only VALUEs\n"
" -p, --postfix like ls -p, appends '\\' postfix to KEY names\n"
"\n"
- "Options for 'get' Action:\n"
+ "Options for 'get' action:\n"
"\n"
" -b, --binary print data as printable hex bytes\n"
" -n, --none print data as stream of bytes as stored in registry\n"
" -x, --hex print numerical data as hex numbers\n"
"\n"
- "Options for 'set' Action:\n"
+ "Options for 'set' action:\n"
"\n"
" -b, --binary set type to REG_BINARY (hex args or '-')\n"
" -d, --dword set type to REG_DWORD\n"
@@ -143,6 +143,11 @@ usage (FILE *where = stderr)
"\n"
" -K<c>, --key-separator[=]<c> set key-value separator to <c> instead of '\\'\n"
"\n"
+ "Options for 'restore' action:\n"
+ "\n"
+ " -f, --force restore even if open handles exist at or beneath the location\n"
+ " in the registry hierarchy to which KEY\\SUBKEY points\n"
+ "\n"
"Other Options:\n"
"\n"
" -h, --help output usage information and exit\n"
@@ -180,7 +185,7 @@ print_version ()
{
printf ("regtool (cygwin) %d.%d.%d\n"
"Registry tool\n"
- "Copyright (C) 2000 - %s Red Hat, Inc.\n"
+ "Copyright (C) 2000 - %s Cygwin Authors\n"
"This is free software; see the source for copying conditions. There is NO\n"
"warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n",
CYGWIN_VERSION_DLL_MAJOR / 1000,
@@ -838,25 +843,6 @@ cmd_unload ()
return 0;
}
-DWORD
-set_privilege (const char *name)
-{
- TOKEN_PRIVILEGES tp;
- if (!LookupPrivilegeValue (NULL, name, &tp.Privileges[0].Luid))
- return GetLastError ();
- tp.PrivilegeCount = 1;
- tp.Privileges[0].Attributes = SE_PRIVILEGE_ENABLED;
- HANDLE t;
- /* OpenProcessToken does not work here, because main thread has its own
- impersonation token */
- if (!OpenThreadToken (GetCurrentThread (), TOKEN_ADJUST_PRIVILEGES, FALSE, &t))
- return GetLastError ();
- AdjustTokenPrivileges (t, FALSE, &tp, 0, NULL, NULL);
- DWORD rv = GetLastError ();
- CloseHandle (t);
- return rv;
-}
-
int
cmd_save ()
{
@@ -865,8 +851,6 @@ cmd_save ()
usage ();
return 1;
}
- /* try to set SeBackupPrivilege, let RegSaveKey report the error */
- set_privilege (SE_BACKUP_NAME);
/* REG_OPTION_BACKUP_RESTORE is necessary to save /HKLM/SECURITY */
find_key (1, KEY_QUERY_VALUE, REG_OPTION_BACKUP_RESTORE);
ssize_t len = cygwin_conv_path (CCP_POSIX_TO_WIN_W, argv[1], NULL, 0);
@@ -880,6 +864,27 @@ cmd_save ()
return 0;
}
+int
+cmd_restore ()
+{
+ if (!argv[1])
+ {
+ usage ();
+ return 1;
+ }
+ /* REG_OPTION_BACKUP_RESTORE is necessary to restore /HKLM/SECURITY */
+ find_key (1, KEY_ALL_ACCESS, REG_OPTION_BACKUP_RESTORE);
+ ssize_t len = cygwin_conv_path (CCP_POSIX_TO_WIN_W, argv[1], NULL, 0);
+ wchar_t win32_path[len];
+ cygwin_conv_path (CCP_POSIX_TO_WIN_W, argv[1], win32_path, len);
+ DWORD rv = RegRestoreKeyW (key, win32_path, restore_flags);
+ if (rv != ERROR_SUCCESS)
+ Fail (rv);
+ if (verbose)
+ printf ("key saved to %ls\n", win32_path);
+ return 0;
+}
+
static struct
{
const char *name;
@@ -896,6 +901,7 @@ static struct
{"load", cmd_load},
{"unload", cmd_unload},
{"save", cmd_save},
+ {"restore", cmd_restore},
{0, 0}
};
@@ -923,6 +929,9 @@ main (int argc, char **_argv)
case 'e':
value_type = REG_EXPAND_SZ;
break;
+ case 'f':
+ restore_flags = REG_FORCE_RESTORE;
+ break;
case 'k':
listwhat |= LIST_KEYS;
break;
diff --git a/winsup/utils/setfacl.c b/winsup/utils/setfacl.c
index 66739c043..373265bf0 100644
--- a/winsup/utils/setfacl.c
+++ b/winsup/utils/setfacl.c
@@ -1,7 +1,5 @@
/* setfacl.c
- Copyright 2000, 2001, 2002, 2003, 2006, 2008, 2009, 2010, 2011 Red Hat Inc.
-
Written by Corinna Vinschen <vinschen@redhat.com>
This file is part of Cygwin.
@@ -19,8 +17,7 @@ details. */
#include <getopt.h>
#include <pwd.h>
#include <grp.h>
-#include <sys/types.h>
-#include <sys/acl.h>
+#include <cygwin/acl.h>
#include <cygwin/version.h>
#ifndef BOOL
@@ -42,7 +39,10 @@ details. */
static char *prog_name;
typedef enum {
- NoAction,
+ NoAction = 0,
+ DeleteExt = 1, /* The values 1,2,3 allow bitmasking below. */
+ DeleteDef = 2,
+ DeleteAll = 3,
Set,
Modify,
Delete,
@@ -50,6 +50,8 @@ typedef enum {
SetFromFile
} action_t;
+int mask_opt = 0;
+
mode_t getperm (char *in)
{
if (isdigit ((unsigned char) *in) && !in[1])
@@ -107,16 +109,22 @@ getaclentry (action_t action, char *c, aclent_t *ace)
return FALSE;
/* Skip to next field. */
c = c2;
- if (!*c && action != Delete)
- return FALSE;
- /* If this is a user or group entry, check if next char is a colon char.
- If so, skip it, otherwise it's the name of a user or group. */
- if (!(ace->a_type & (USER_OBJ | GROUP_OBJ)))
+ if (!*c)
+ {
+ /* Nothing follows. This is only valid if action is Delete and the
+ type is CLASS_OBJ, or if ACL_DEFAULT is set. */
+ if (action != Delete
+ || (!(ace->a_type & (CLASS_OBJ | ACL_DEFAULT))))
+ return FALSE;
+ }
+ else if (!(ace->a_type & (USER_OBJ | GROUP_OBJ)))
{
/* Mask and other entries may contain an extra colon. */
if (*c == ':')
++c;
}
+ /* If this is a user or group entry, check if next char is a colon char.
+ If so, skip it, otherwise it's the name of a user or group. */
else if (*c == ':')
++c;
else if (*c)
@@ -130,8 +138,6 @@ getaclentry (action_t action, char *c, aclent_t *ace)
*c2++ = '\0';
else if (action != Delete)
return FALSE;
- else if (!(ace->a_type & ACL_DEFAULT))
- return FALSE;
/* Fetch user/group id. */
if (isdigit ((unsigned char) *c))
{
@@ -232,25 +238,48 @@ searchace (aclent_t *aclp, int nentries, int type, int id)
}
int
+delace (aclent_t *tgt, int tcnt, int t)
+{
+ int i;
+
+ for (i = t + 1; i < tcnt; ++i)
+ tgt[i - 1] = tgt[i];
+ --tcnt;
+ return tcnt;
+}
+
+int
+delacl (aclent_t *tgt, int tcnt, aclent_t *src, int scnt)
+{
+ int t, s;
+
+ for (s = 0; s < scnt; ++s)
+ {
+ t = searchace (tgt, MAX_ACL_ENTRIES, src[s].a_type,
+ (src[s].a_type & (USER | GROUP)) ? src[s].a_id : -1);
+ if (t < 0)
+ return -1;
+ if (t < tcnt)
+ tcnt = delace (tgt, tcnt, t);
+ }
+ return tcnt;
+}
+
+int
modacl (aclent_t *tgt, int tcnt, aclent_t *src, int scnt)
{
- int t, s, i;
+ int t, s;
+ /* Delete, replace or add given acl entries. */
for (s = 0; s < scnt; ++s)
{
t = searchace (tgt, MAX_ACL_ENTRIES, src[s].a_type,
(src[s].a_type & (USER | GROUP)) ? src[s].a_id : -1);
if (t < 0)
return -1;
- if (src[s].a_perm == ILLEGAL_MODE)
- {
- if (t < tcnt)
- {
- for (i = t + 1; i < tcnt; ++i)
- tgt[i - 1] = tgt[i];
- --tcnt;
- }
- }
+ /* ILLEGAL_MODE means "delete". */
+ if (src[s].a_perm == ILLEGAL_MODE && t < tcnt)
+ tcnt = delace (tgt, tcnt, t);
else
{
tgt[t] = src[s];
@@ -261,157 +290,388 @@ modacl (aclent_t *tgt, int tcnt, aclent_t *src, int scnt)
return tcnt;
}
+void
+check_got_mask (aclent_t *src, int scnt, int *got_mask, int *got_def_mask)
+{
+ *got_mask = searchace (src, scnt, CLASS_OBJ, -1) >= 0;
+ *got_def_mask = searchace (src, scnt, DEF_CLASS_OBJ, -1) >= 0;
+}
+
int
-setfacl (action_t action, char *path, aclent_t *acls, int cnt)
+recompute_mask (aclent_t *tgt, int tcnt, int got_mask, int got_def_mask)
+{
+ int t;
+ int need_mask = 0, need_def_mask = 0;
+ int mask_idx = -1, def_mask_idx = -1;
+ mode_t mask = 0, def_mask = 0;
+
+ /* Now recompute mask, if requested (default) */
+ for (t = 0; t < tcnt; ++t)
+ {
+ switch (tgt[t].a_type)
+ {
+ case USER:
+ case GROUP:
+ /* Do we need a CLASS_OBJ at all? */
+ need_mask = 1;
+ /*FALLTHRU*/
+ case GROUP_OBJ:
+ /* Compute resulting maximum mask. */
+ mask |= tgt[t].a_perm;
+ break;
+ case CLASS_OBJ:
+ /* Do we already have a CLASS_OBJ? */
+ mask_idx = t;
+ break;
+ case DEF_USER:
+ case DEF_GROUP:
+ /* Do we need a DEF_CLASS_OBJ at all? */
+ need_def_mask = 1;
+ /*FALLTHRU*/
+ case DEF_GROUP_OBJ:
+ /* Compute resulting maximum default mask. */
+ def_mask |= tgt[t].a_perm;
+ break;
+ case DEF_CLASS_OBJ:
+ /* Do we already have a DEF_CLASS_OBJ? */
+ def_mask_idx = t;
+ break;
+ }
+ }
+ /* Recompute mask, if requested
+ - If we got a mask in the input string, recompute only if --mask has been
+ specified.
+ - If we got no mask in the input, but we either need a mask or we already
+ have one, and --no-mask has *not* been specified, recompute. */
+ if ((got_mask && mask_opt > 0)
+ || (!got_mask && mask_opt >= 0 && (need_mask || mask_idx >= 0)))
+ {
+ if (mask_idx >= 0)
+ t = mask_idx;
+ else
+ t = searchace (tgt, MAX_ACL_ENTRIES, CLASS_OBJ, -1);
+ if (t < 0)
+ return -1;
+ if (t >= tcnt)
+ ++tcnt;
+ tgt[t].a_type = CLASS_OBJ;
+ tgt[t].a_id = -1;
+ tgt[t].a_perm = mask;
+ }
+ /* Recompute default mask, if requested */
+ if ((got_def_mask && mask_opt > 0)
+ || (!got_def_mask && mask_opt >= 0
+ && (need_def_mask || def_mask_idx >= 0)))
+ {
+ if (def_mask_idx >= 0)
+ t = def_mask_idx;
+ else
+ t = searchace (tgt, MAX_ACL_ENTRIES, DEF_CLASS_OBJ, -1);
+ if (t < 0)
+ return -1;
+ if (t >= tcnt)
+ ++tcnt;
+ tgt[t].a_type = DEF_CLASS_OBJ;
+ tgt[t].a_id = -1;
+ tgt[t].a_perm = def_mask;
+ }
+ return tcnt;
+}
+
+int
+addmissing (aclent_t *tgt, int tcnt)
+{
+ int t;
+ int types = 0, def_types = 0;
+ int perm = 0, def_perm = 0;
+
+ /* Check if we have all the required entries now. */
+ for (t = 0; t < tcnt; ++t)
+ if (tgt[t].a_type & ACL_DEFAULT)
+ {
+ def_types |= tgt[t].a_type;
+ if (tgt[t].a_type & GROUP_OBJ)
+ def_perm |= tgt[t].a_perm;
+ else if ((tgt[t].a_type & (USER | GROUP)) && mask_opt >= 0)
+ def_perm |= tgt[t].a_perm;
+ }
+ else
+ {
+ types |= tgt[t].a_type;
+ if (tgt[t].a_type & GROUP_OBJ)
+ perm |= tgt[t].a_perm;
+ else if ((tgt[t].a_type & (USER | GROUP)) && mask_opt >= 0)
+ perm |= tgt[t].a_perm;
+ }
+ /* Add missing CLASS_OBJ */
+ if ((types & (USER | GROUP)) && !(types & CLASS_OBJ))
+ {
+ tgt[tcnt].a_type = CLASS_OBJ;
+ tgt[tcnt].a_id = (uid_t) -1;
+ tgt[tcnt++].a_perm = perm;
+ }
+ if (def_types)
+ {
+ /* Add missing default entries. */
+ if (!(def_types & USER_OBJ) && tcnt < MAX_ACL_ENTRIES)
+ {
+ t = searchace (tgt, tcnt, USER_OBJ, -1);
+ tgt[tcnt].a_type = DEF_USER_OBJ;
+ tgt[tcnt].a_id = (uid_t) -1;
+ tgt[tcnt++].a_perm = t >= 0 ? tgt[t].a_perm : S_IRWXO;
+ }
+ if (!(def_types & GROUP_OBJ) && tcnt < MAX_ACL_ENTRIES)
+ {
+ t = searchace (tgt, tcnt, GROUP_OBJ, -1);
+ tgt[tcnt].a_type = DEF_GROUP_OBJ;
+ tgt[tcnt].a_id = (uid_t) -1;
+ tgt[tcnt].a_perm = t >= 0 ? tgt[t].a_perm : (S_IROTH | S_IXOTH);
+ def_perm |= tgt[tcnt++].a_perm;
+ }
+ if (!(def_types & OTHER_OBJ) && tcnt < MAX_ACL_ENTRIES)
+ {
+ t = searchace (tgt, tcnt, OTHER_OBJ, -1);
+ tgt[tcnt].a_type = DEF_OTHER_OBJ;
+ tgt[tcnt].a_id = (uid_t) -1;
+ tgt[tcnt++].a_perm = t >= 0 ? tgt[t].a_perm : (S_IROTH | S_IXOTH);
+ }
+ /* Add missing DEF_CLASS_OBJ */
+ if ((def_types & (USER | GROUP)) && !(def_types & CLASS_OBJ))
+ {
+ tgt[tcnt].a_type = DEF_CLASS_OBJ;
+ tgt[tcnt].a_id = (uid_t) -1;
+ tgt[tcnt++].a_perm = def_perm;
+ }
+ }
+ return tcnt;
+}
+
+int
+delallacl (aclent_t *tgt, int tcnt, action_t action)
+{
+ int t;
+
+ for (t = 0; t < tcnt; ++t)
+ /* -b (DeleteExt): Remove all extended ACL entries.
+ -k (DeleteDef): Remove all default ACL entries.
+ -b -k (DeleteAll): Remove extended and remove defaults. That means,
+ only preserve standard POSIX perms. */
+ if (((action & DeleteExt) && (tgt[t].a_type & (USER | GROUP | CLASS_OBJ)))
+ || ((action & DeleteDef) && (tgt[t].a_type & ACL_DEFAULT)))
+ {
+ --tcnt;
+ if (t < tcnt)
+ memmove (&tgt[t], &tgt[t + 1], (tcnt - t) * sizeof (aclent_t));
+ --t;
+ }
+ return tcnt;
+}
+
+int
+setfacl (action_t action, const char *path, aclent_t *acls, int cnt)
{
aclent_t lacl[MAX_ACL_ENTRIES];
- int lcnt;
+ int lcnt, got_mask = 0, got_def_mask = 0;
memset (lacl, 0, sizeof lacl);
- if (action == Set)
+ switch (action)
{
- if (acl (path, SETACL, cnt, acls))
+ case Set:
+ check_got_mask (acls, cnt, &got_mask, &got_def_mask);
+ memcpy (lacl, acls, (lcnt = cnt) * sizeof (aclent_t));
+ if ((lcnt = recompute_mask (lacl, lcnt, got_mask, got_def_mask)) < 0
+ || (lcnt = addmissing (lacl, lcnt)) < 0
+ || acl (path, SETACL, lcnt, lacl) < 0)
{
perror (prog_name);
return 2;
}
- }
- else if ((lcnt = acl (path, GETACL, MAX_ACL_ENTRIES, lacl)) < 0
- || (lcnt = modacl (lacl, lcnt, acls, cnt)) < 0
- || (lcnt = acl (path, SETACL, lcnt, lacl)) < 0)
- {
- perror (prog_name);
- return 2;
+ break;
+ case Delete:
+ check_got_mask (acls, cnt, &got_mask, &got_def_mask);
+ if ((lcnt = acl (path, GETACL, MAX_ACL_ENTRIES, lacl)) < 0
+ || (lcnt = delacl (lacl, lcnt, acls, cnt)) < 0
+ || (lcnt = recompute_mask (lacl, lcnt, got_mask, got_def_mask)) < 0
+ || acl (path, SETACL, lcnt, lacl) < 0)
+ {
+ perror (prog_name);
+ return 2;
+ }
+ break;
+ case DeleteExt:
+ case DeleteDef:
+ case DeleteAll:
+ if ((lcnt = acl (path, GETACL, MAX_ACL_ENTRIES, lacl)) < 0
+ || (lcnt = delallacl (lacl, lcnt, action)) < 0
+ || acl (path, SETACL, lcnt, lacl) < 0)
+ {
+ perror (prog_name);
+ return 2;
+ }
+ break;
+ default:
+ check_got_mask (acls, cnt, &got_mask, &got_def_mask);
+ if ((lcnt = acl (path, GETACL, MAX_ACL_ENTRIES, lacl)) < 0
+ || (lcnt = modacl (lacl, lcnt, acls, cnt)) < 0
+ || (lcnt = recompute_mask (lacl, lcnt, got_mask, got_def_mask)) < 0
+ || (lcnt = addmissing (lacl, lcnt)) < 0
+ || acl (path, SETACL, lcnt, lacl) < 0)
+ {
+ perror (prog_name);
+ return 2;
+ }
+ break;
}
return 0;
}
static void
-usage (FILE * stream)
+usage (FILE *stream)
{
fprintf (stream, ""
- "Usage: %s [-r] (-f ACL_FILE | -s acl_entries) FILE...\n"
- " %s [-r] ([-d acl_entries] [-m acl_entries]) FILE...\n"
- "\n"
- "Modify file and directory access control lists (ACLs)\n"
- "\n"
- " -d, --delete delete one or more specified ACL entries\n"
- " -f, --file set ACL entries for FILE to ACL entries read\n"
- " from a ACL_FILE\n"
- " -m, --modify modify one or more specified ACL entries\n"
- " -r, --replace replace mask entry with maximum permissions\n"
- " needed for the file group class\n"
- " -s, --substitute substitute specified ACL entries for the\n"
- " ACL of FILE\n"
- " -h, --help output usage information and exit\n"
- " -V, --version output version information and exit\n"
- "\n"
- "At least one of (-d, -f, -m, -s) must be specified\n"
- "\n", prog_name, prog_name);
- if (stream == stdout)
- {
- printf(""
- " Acl_entries are one or more comma-separated ACL entries \n"
- " from the following list:\n"
- "\n"
- " u[ser]::perm\n"
- " u[ser]:uid:perm\n"
- " g[roup]::perm\n"
- " g[roup]:gid:perm\n"
- " m[ask]:perm\n"
- " o[ther]:perm\n"
- "\n"
- " Default entries are like the above with the additional\n"
- " default identifier. For example: \n"
- "\n"
- " d[efault]:u[ser]:uid:perm\n"
- "\n"
- " 'perm' is either a 3-char permissions string in the form\n"
- " \"rwx\" with the character - for no permission\n"
- " or it is the octal representation of the permissions, a\n"
- " value from 0 (equivalent to \"---\") to 7 (\"rwx\").\n"
- " 'uid' is a user name or a numerical uid.\n"
- " 'gid' is a group name or a numerical gid.\n"
- "\n"
- "\n"
- "For each file given as parameter, %s will either replace its\n"
- "complete ACL (-s, -f), or it will add, modify, or delete ACL\n"
- "entries.\n"
- "\n"
- "The following options are supported:\n"
- "\n"
- "-d Delete one or more specified entries from the file's ACL.\n"
- " The owner, group and others entries must not be deleted.\n"
- " Acl_entries to be deleted should be specified without\n"
- " permissions, as in the following list:\n"
- "\n"
- " u[ser]:uid\n"
- " g[roup]:gid\n"
- " d[efault]:u[ser]:uid\n"
- " d[efault]:g[roup]:gid\n"
- " d[efault]:m[ask]:\n"
- " d[efault]:o[ther]:\n"
- "\n"
- "-f Take the Acl_entries from ACL_FILE one per line. Whitespace\n"
- " characters are ignored, and the character \"#\" may be used\n"
- " to start a comment. The special filename \"-\" indicates\n"
- " reading from stdin.\n"
- " Required entries are\n"
- " - One user entry for the owner of the file.\n"
- " - One group entry for the group of the file.\n"
- " - One other entry.\n"
- " If additional user and group entries are given:\n"
- " - A mask entry for the file group class of the file.\n"
- " - No duplicate user or group entries with the same uid/gid.\n"
- " If it is a directory:\n"
- " - One default user entry for the owner of the file.\n"
- " - One default group entry for the group of the file.\n"
- " - One default mask entry for the file group class.\n"
- " - One default other entry.\n"
- "\n"
- "-m Add or modify one or more specified ACL entries.\n"
- " Acl_entries is a comma-separated list of entries from the \n"
- " same list as above.\n"
- "\n"
- "-r Causes the permissions specified in the mask entry to be\n"
- " ignored and replaced by the maximum permissions needed for\n"
- " the file group class.\n"
- "\n"
- "-s Like -f, but substitute the file's ACL with Acl_entries\n"
- " specified in a comma-separated list on the command line.\n"
- "\n"
- "While the -d and -m options may be used in the same command, the\n"
- "-f and -s options may be used only exclusively.\n"
- "\n"
- "Directories may contain default ACL entries. Files created\n"
- "in a directory that contains default ACL entries will have\n"
- "permissions according to the combination of the current umask,\n"
- "the explicit permissions requested and the default ACL entries\n"
- "Note: Under Cygwin, the default ACL entries are not taken into\n"
- "account currently.\n\n", prog_name);
+"Usage: %s [-n] {-f ACL_FILE | -s acl_entries} FILE...\n"
+" %s [-n] {[-bk]|[-x acl_entries] [-m acl_entries]} FILE...\n"
+"\n"
+"Modify file and directory access control lists (ACLs)\n"
+"\n"
+" -b, --remove-all remove all extended ACL entries\n"
+" -x, --delete delete one or more specified ACL entries\n"
+" -f, --file set ACL entries for FILE to ACL entries read\n"
+" from ACL_FILE\n"
+" -k, --remove-default remove all default ACL entries\n"
+" -m, --modify modify one or more specified ACL entries\n"
+" -n, --no-mask don't recalculate the effective rights mask\n"
+" --mask do recalculate the effective rights mask\n"
+" -s, --set set specified ACL entries on FILE\n"
+" -V, --version print version and exit\n"
+" -h, --help this help text\n"
+"\n"
+"At least one of (-b, -x, -f, -k, -m, -s) must be specified\n"
+"\n", prog_name, prog_name);
+ if (stream == stdout)
+ {
+ printf(""
+" Acl_entries are one or more comma-separated ACL entries from the following\n"
+" list:\n"
+"\n"
+" u[ser]::perm\n"
+" u[ser]:uid:perm\n"
+" g[roup]::perm\n"
+" g[roup]:gid:perm\n"
+" m[ask]:perm\n"
+" o[ther]:perm\n"
+"\n"
+" Default entries are like the above with the additional default identifier.\n"
+" For example: \n"
+"\n"
+" d[efault]:u[ser]:uid:perm\n"
+"\n"
+" 'perm' is either a 3-char permissions string in the form \"rwx\" with the\n"
+" character - for no permission, or it is the octal representation of the\n"
+" permissions, a value from 0 (equivalent to \"---\") to 7 (\"rwx\").\n"
+" 'uid' is a user name or a numerical uid.\n"
+" 'gid' is a group name or a numerical gid.\n"
+"\n"
+"For each file given as parameter, %s will either replace its complete ACL\n"
+"(-s, -f), or it will add, modify, or delete ACL entries.\n"
+"\n"
+"The following options are supported:\n"
+"\n"
+"-b, --remove-all\n"
+" Remove all extended ACL entries. The base ACL entries of the owner, group\n"
+" and others are retained. This option can be combined with the\n"
+" -k,--remove-default option to delete all non-standard POSIX permissions.\n"
+"\n"
+"-x, --delete\n"
+" Delete one or more specified entries from the file's ACL. The owner, group\n"
+" and others entries must not be deleted. Acl_entries to be deleted should\n"
+" be specified without permissions, as in the following list:\n"
+"\n"
+" u[ser]:uid[:]\n"
+" g[roup]:gid[:]\n"
+" m[ask][:]\n"
+" d[efault]:u[ser][:uid]\n"
+" d[efault]:g[roup][:gid]\n"
+" d[efault]:m[ask][:]\n"
+" d[efault]:o[ther][:]\n"
+"\n"
+"-f, --file\n"
+" Take the Acl_entries from ACL_FILE one per line. Whitespace characters are\n"
+" ignored, and the character \"#\" may be used to start a comment. The special\n"
+" filename \"-\" indicates reading from stdin.\n"
+" Required entries are\n"
+" - One user entry for the owner of the file.\n"
+" - One group entry for the group of the file.\n"
+" - One other entry.\n"
+" If additional user and group entries are given:\n"
+" - A mask entry for the file group class of the file.\n"
+" - No duplicate user or group entries with the same uid/gid.\n"
+" If it is a directory:\n"
+" - One default user entry for the owner of the file.\n"
+" - One default group entry for the group of the file.\n"
+" - One default mask entry for the file group class.\n"
+" - One default other entry.\n"
+"\n"
+"-k, --remove-default\n"
+" Remove all default ACL entries. If no default ACL entries exist, no\n"
+" warnings are issued. This option can be combined with the -b,--remove-all\n"
+" option to delete all non-standard POSIX permissions.\n"
+"\n"
+"-m, --modify\n"
+" Add or modify one or more specified ACL entries. Acl_entries is a\n"
+" comma-separated list of entries from the same list as above.\n"
+"\n"
+"-n, --no-mask\n"
+" Valid in conjunction with -m. Do not recalculate the effective rights\n"
+" mask. The default behavior of setfacl is to recalculate the ACL mask entry,\n"
+" unless a mask entry was explicitly given. The mask entry is set to the\n"
+" union of all permissions of the owning group, and all named user and group\n"
+" entries. (These are exactly the entries affected by the mask entry).\n"
+"\n"
+"--mask\n"
+" Valid in conjunction with -m. Do recalculate the effective rights mask,\n"
+" even if an ACL mask entry was explicitly given. (See the -n option.)\n"
+"\n"
+"-s, --set\n"
+" Like -f, but set the file's ACL with ACL entries specified in a\n"
+" comma-separated list on the command line.\n"
+"\n"
+"While the -x and -m options may be used in the same command, the -f and -s\n"
+"options may be used only exclusively.\n"
+"\n"
+"Directories may contain default ACL entries. Files created in a directory\n"
+"that contains default ACL entries will have permissions according to the\n"
+"combination of the current umask, the explicit permissions requested and\n"
+"the default ACL entries.\n"
+"\n", prog_name);
}
else
fprintf(stream, "Try '%s --help' for more information.\n", prog_name);
}
struct option longopts[] = {
- {"delete", required_argument, NULL, 'd'},
+ {"remove-all", no_argument, NULL, 'b'},
+ {"delete", required_argument, NULL, 'x'},
{"file", required_argument, NULL, 'f'},
+ {"remove-default", no_argument, NULL, 'k'},
{"modify", required_argument, NULL, 'm'},
+ {"no-mask", no_argument, NULL, 'n'},
+ {"mask", no_argument, NULL, '\n'},
{"replace", no_argument, NULL, 'r'},
+ {"set", required_argument, NULL, 's'},
{"substitute", required_argument, NULL, 's'},
{"help", no_argument, NULL, 'h'},
{"version", no_argument, NULL, 'V'},
{0, no_argument, NULL, 0}
};
-const char *opts = "d:f:hm:rs:V";
+const char *opts = "bd:f:hkm:nrs:Vx:";
static void
print_version ()
{
printf ("setfacl (cygwin) %d.%d.%d\n"
"POSIX ACL modification utility\n"
- "Copyright (C) 2000 - %s Red Hat, Inc.\n"
+ "Copyright (C) 2000 - %s Cygwin Authors\n"
"This is free software; see the source for copying conditions. There is NO\n"
"warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n",
CYGWIN_VERSION_DLL_MAJOR / 1000,
@@ -425,7 +685,6 @@ main (int argc, char **argv)
{
int c;
action_t action = NoAction;
- int ropt = 0;
aclent_t acls[MAX_ACL_ENTRIES];
int aclidx = 0;
int ret = 0;
@@ -436,7 +695,19 @@ main (int argc, char **argv)
while ((c = getopt_long (argc, argv, opts, longopts, NULL)) != EOF)
switch (c)
{
- case 'd':
+ case 'b':
+ if (action == NoAction)
+ action = DeleteExt;
+ else if (action == DeleteDef)
+ action = DeleteAll;
+ else
+ {
+ usage (stderr);
+ return 1;
+ }
+ break;
+ case 'd': /* Backward compat */
+ case 'x':
if (action == NoAction)
action = Delete;
else if (action == Modify)
@@ -469,6 +740,17 @@ main (int argc, char **argv)
case 'h':
usage (stdout);
return 0;
+ case 'k':
+ if (action == NoAction)
+ action = DeleteDef;
+ else if (action == DeleteExt)
+ action = DeleteAll;
+ else
+ {
+ usage (stderr);
+ return 1;
+ }
+ break;
case 'm':
if (action == NoAction)
action = Modify;
@@ -485,14 +767,13 @@ main (int argc, char **argv)
return 2;
}
break;
+ case 'n':
+ mask_opt = -1;
+ break;
+ case '\n':
+ mask_opt = 1;
+ break;
case 'r':
- if (!ropt)
- ropt = 1;
- else
- {
- usage (stderr);
- return 1;
- }
break;
case 's':
if (action == NoAction)
diff --git a/winsup/utils/setmetamode.c b/winsup/utils/setmetamode.c
index fc1059f7c..7ec6cf0c1 100644
--- a/winsup/utils/setmetamode.c
+++ b/winsup/utils/setmetamode.c
@@ -1,7 +1,5 @@
/* setmetamode.c
- Copyright 2006, 2011 Red Hat Inc.
-
Written by Kazuhiro Fujieda <fujieda@jaist.ac.jp>
This file is part of Cygwin.
@@ -49,7 +47,7 @@ print_version ()
{
printf ("setmetamode (cygwin) %d.%d.%d\n"
"Get or set keyboard meta mode\n"
- "Copyright (C) 2006 - %s Red Hat, Inc.\n"
+ "Copyright (C) 2006 - %s Cygwin Authors\n"
"This is free software; see the source for copying conditions. There is NO\n"
"warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n",
CYGWIN_VERSION_DLL_MAJOR / 1000,
diff --git a/winsup/utils/ssp.c b/winsup/utils/ssp.c
index 3136a9f66..548b89ac8 100644
--- a/winsup/utils/ssp.c
+++ b/winsup/utils/ssp.c
@@ -1,5 +1,4 @@
/*
- * Copyright (c) 2000, 2001, 2002, 2009, 2011, 2013 Red Hat, Inc.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -13,20 +12,6 @@
*
*/
-#ifdef __x86_64__
-
-#include <stdio.h>
-
-int
-main (int argc, char **argv)
-{
- fprintf (stderr, "%s: This application is unsuported on x86_64 so far.\n",
- argv[0]);
- return 1;
-}
-
-#else
-
#include <errno.h>
#include <stdio.h>
#include <string.h>
@@ -56,39 +41,60 @@ static struct option longopts[] =
static char opts[] = "+cdehlstvV";
+#ifdef __x86_64__
+#define KERNEL_ADDR 0x00007FF000000000
+#define CONTEXT_SP Rsp
+#define CONTEXT_IP Rip
+typedef DWORD64 CONTEXT_REG;
+#define CONTEXT_REG_FMT "%016llx"
+#define ADDR_SSCANF_FMT "%lli"
+#else
#define KERNEL_ADDR 0x77000000
+#define CONTEXT_SP Esp
+#define CONTEXT_IP Eip
+typedef DWORD CONTEXT_REG;
+#define CONTEXT_REG_FMT "%08lx"
+#define ADDR_SSCANF_FMT "%li"
+#endif
#define TRACE_SSP 0
#define VERBOSE 1
#define TIMES 1000
-/* from winsup/gmon.h */
+/* from winsup/cygwin/gmon.h */
struct gmonhdr {
- unsigned long lpc; /* base pc address of sample buffer */
- unsigned long hpc; /* max pc address of sampled buffer */
+ size_t lpc; /* base pc address of sample buffer */
+ size_t hpc; /* max pc address of sampled buffer */
int ncnt; /* size of sample buffer (plus this header) */
int version; /* version number */
int profrate; /* profiling clock rate */
int spare[3]; /* reserved */
};
+
+struct rawarc {
+ size_t from_pc;
+ size_t to_pc;
+ long count;
+};
+
#define GMONVERSION 0x00051879
#define HISTCOUNTER unsigned short
typedef struct {
- unsigned int base_address;
+ CONTEXT_REG base_address;
int pcount;
int scount;
char *name;
} DllInfo;
typedef struct {
- unsigned int address;
+ CONTEXT_REG address;
unsigned char real_byte;
} PendingBreakpoints;
-unsigned low_pc=0, high_pc=0;
-unsigned last_pc=0, pc, last_sp=0, sp;
+CONTEXT_REG low_pc, high_pc=0;
+CONTEXT_REG last_pc=0, pc, last_sp=0, sp;
int total_cycles, count;
HANDLE hProcess;
PROCESS_INFORMATION procinfo;
@@ -98,7 +104,6 @@ HISTCOUNTER *hits=0;
struct gmonhdr hdr;
int running = 1, profiling = 1;
char dll_name[1024], *dll_ptr, *cp;
-int eip;
unsigned opcode_count = 0;
int stepping_enabled = 1;
@@ -111,8 +116,8 @@ int verbose = 0;
#define MAXTHREADS 100
DWORD active_thread_ids[MAXTHREADS];
HANDLE active_threads[MAXTHREADS];
-DWORD thread_step_flags[MAXTHREADS];
-DWORD thread_return_address[MAXTHREADS];
+int thread_step_flags[MAXTHREADS];
+CONTEXT_REG thread_return_address[MAXTHREADS];
int num_active_threads = 0;
int suspended_count=0;
@@ -125,10 +130,10 @@ PendingBreakpoints pending_breakpoints[MAXPENDS];
int num_breakpoints=0;
static void
-add_breakpoint (unsigned int address)
+add_breakpoint (CONTEXT_REG address)
{
int i;
- DWORD rv;
+ SIZE_T rv;
static char int3[] = { 0xcc };
for (i=0; i<num_breakpoints; i++)
{
@@ -141,31 +146,31 @@ add_breakpoint (unsigned int address)
return;
pending_breakpoints[i].address = address;
ReadProcessMemory (hProcess,
- (void *)address,
- &(pending_breakpoints[i].real_byte),
- 1, &rv);
+ (void *)address,
+ &(pending_breakpoints[i].real_byte),
+ 1, &rv);
WriteProcessMemory (hProcess,
- (void *)address,
- (LPVOID)int3, 1, &rv);
+ (void *)address,
+ (LPVOID)int3, 1, &rv);
if (i >= num_breakpoints)
num_breakpoints = i+1;
}
static int
-remove_breakpoint (unsigned int address)
+remove_breakpoint (CONTEXT_REG address)
{
int i;
- DWORD rv;
+ SIZE_T rv;
for (i=0; i<num_breakpoints; i++)
{
if (pending_breakpoints[i].address == address)
{
pending_breakpoints[i].address = 0;
WriteProcessMemory (hProcess,
- (void *)address,
- &(pending_breakpoints[i].real_byte),
- 1, &rv);
+ (void *)address,
+ &(pending_breakpoints[i].real_byte),
+ 1, &rv);
return 1;
}
}
@@ -176,7 +181,10 @@ static HANDLE
lookup_thread_id (DWORD threadId, int *tix)
{
int i;
- *tix = 0;
+
+ if (tix)
+ *tix = 0;
+
for (i=0; i<num_active_threads; i++)
if (active_thread_ids[i] == threadId)
{
@@ -231,7 +239,7 @@ dll_sort (const void *va, const void *vb)
}
static char *
-addr2dllname (unsigned int addr)
+addr2dllname (CONTEXT_REG addr)
{
int i;
for (i=num_dlls-1; i>=0; i--)
@@ -249,39 +257,44 @@ dump_registers (HANDLE thread)
{
context.ContextFlags = CONTEXT_FULL;
GetThreadContext (thread, &context);
+#ifdef __x86_64__
+ printf ("eax %016llx ebx %016llx ecx %016llx edx %016llx eip\n",
+ context.Rax, context.Rbx, context.Rcx, context.Rdx);
+ printf ("esi %016llx edi %016llx ebp %016llx esp %016llx %016llx\n",
+ context.Rsi, context.Rdi, context.Rbp, context.Rsp, context.Rip);
+#else
printf ("eax %08lx ebx %08lx ecx %08lx edx %08lx eip\n",
context.Eax, context.Ebx, context.Ecx, context.Edx);
printf ("esi %08lx edi %08lx ebp %08lx esp %08lx %08lx\n",
- context.Esi, context.Esi, context.Ebp, context.Esp, context.Eip);
+ context.Esi, context.Edi, context.Ebp, context.Esp, context.Eip);
+#endif
}
typedef struct Edge {
struct Edge *next;
- unsigned int from_pc;
- unsigned int to_pc;
- unsigned int count;
+ struct rawarc rawarc;
} Edge;
Edge *edges[4096];
void
-store_call_edge (unsigned int from_pc, unsigned int to_pc)
+store_call_edge (CONTEXT_REG from_pc, CONTEXT_REG to_pc)
{
Edge *e;
unsigned int h = ((from_pc + to_pc)>>4) & 4095;
for (e=edges[h]; e; e=e->next)
- if (e->from_pc == from_pc && e->to_pc == to_pc)
+ if (e->rawarc.from_pc == from_pc && e->rawarc.to_pc == to_pc)
break;
if (!e)
{
e = (Edge *)malloc (sizeof (Edge));
e->next = edges[h];
edges[h] = e;
- e->from_pc = from_pc;
- e->to_pc = to_pc;
- e->count = 0;
+ e->rawarc.from_pc = from_pc;
+ e->rawarc.to_pc = to_pc;
+ e->rawarc.count = 0;
}
- e->count++;
+ e->rawarc.count++;
}
void
@@ -291,7 +304,7 @@ write_call_edges (FILE *f)
Edge *e;
for (h=0; h<4096; h++)
for (e=edges[h]; e; e=e->next)
- fwrite (&(e->from_pc), 1, 3*sizeof (unsigned int), f);
+ fwrite (&(e->rawarc), 1, sizeof (struct rawarc), f);
}
char *
@@ -326,14 +339,14 @@ run_program (char *cmdline)
| DEBUG_ONLY_THIS_PROCESS,
0, 0, &startup, &procinfo))
{
- fprintf (stderr, "Can't create process: error %ld\n", GetLastError ());
+ fprintf (stderr, "Can't create process: error %u\n", (unsigned int)GetLastError ());
exit (1);
}
hProcess = procinfo.hProcess;
#if 0
- printf ("procinfo: %08x %08x %08x %08x\n",
- hProcess, procinfo.hThread, procinfo.dwProcessId, procinfo.dwThreadId);
+ printf ("procinfo: %p %p %08x %08x\n",
+ hProcess, procinfo.hThread, (int)procinfo.dwProcessId, (int)procinfo.dwThreadId);
#endif
active_threads[0] = procinfo.hThread;
@@ -369,7 +382,7 @@ run_program (char *cmdline)
while (running)
{
int src, dest;
- DWORD rv;
+ SIZE_T rv;
DEBUG_EVENT event;
int contv = DBG_CONTINUE;
@@ -382,16 +395,16 @@ run_program (char *cmdline)
hThread = lookup_thread_id (event.dwThreadId, &tix);
#if 0
- printf ("DE: %x/%d %d %d ",
- hThread, tix,
- event.dwDebugEventCode, num_active_threads);
+ printf ("DE: %p/%d %d %d ",
+ hThread, tix,
+ (int)event.dwDebugEventCode, num_active_threads);
for (src=0; src<num_active_threads; src++)
{
int sc = SuspendThread (active_threads[src]);
int rv = GetThreadContext (active_threads[src], &context);
ResumeThread (active_threads[src]);
- printf (" [%x,%x,%x]",
- active_threads[src], context.Eip, active_thread_ids[src]);
+ printf (" [%p," CONTEXT_REG_FMT ",%x]",
+ active_threads[src], context.CONTEXT_IP, (int)active_thread_ids[src]);
}
printf ("\n");
#endif
@@ -404,10 +417,10 @@ run_program (char *cmdline)
case CREATE_THREAD_DEBUG_EVENT:
if (verbose)
- printf ("create thread %08lx at %08x %s\n",
- event.dwThreadId,
- (int)event.u.CreateThread.lpStartAddress,
- addr2dllname ((unsigned int)event.u.CreateThread.lpStartAddress));
+ printf ("create thread %08x at " CONTEXT_REG_FMT " %s\n",
+ (int)event.dwThreadId,
+ (CONTEXT_REG)event.u.CreateThread.lpStartAddress,
+ addr2dllname ((CONTEXT_REG)event.u.CreateThread.lpStartAddress));
active_thread_ids[num_active_threads] = event.dwThreadId;
active_threads[num_active_threads] = event.u.CreateThread.hThread;
@@ -417,16 +430,16 @@ run_program (char *cmdline)
if (trace_all_threads && stepping_enabled)
{
thread_step_flags[num_active_threads-1] = stepping_enabled;
- add_breakpoint ((int)event.u.CreateThread.lpStartAddress);
+ add_breakpoint ((CONTEXT_REG)event.u.CreateThread.lpStartAddress);
}
break;
case EXIT_THREAD_DEBUG_EVENT:
if (verbose)
- printf ("exit thread %08lx, code=%ld\n",
- event.dwThreadId,
- event.u.ExitThread.dwExitCode);
+ printf ("exit thread %08x, code=%d\n",
+ (int)event.dwThreadId,
+ (int)event.u.ExitThread.dwExitCode);
for (src=0, dest=0; src<num_active_threads; src++)
if (active_thread_ids[src] != event.dwThreadId)
@@ -443,24 +456,25 @@ run_program (char *cmdline)
switch (event.u.Exception.ExceptionRecord.ExceptionCode)
{
case STATUS_BREAKPOINT:
- if (remove_breakpoint ((int)event.u.Exception.ExceptionRecord.ExceptionAddress))
+ if (remove_breakpoint ((CONTEXT_REG)event.u.Exception.ExceptionRecord.ExceptionAddress))
{
- context.Eip --;
+ context.CONTEXT_IP --;
if (!rv)
SetThreadContext (hThread, &context);
- if (ReadProcessMemory (hProcess, (void *)context.Esp, &rv, 4, &rv))
+ if (ReadProcessMemory (hProcess, (void *)context.CONTEXT_SP, &rv, sizeof(rv), &rv))
thread_return_address[tix] = rv;
}
set_step_threads (event.dwThreadId, stepping_enabled);
+ /* fall-through */
case STATUS_SINGLE_STEP:
opcode_count++;
- pc = (unsigned int)event.u.Exception.ExceptionRecord.ExceptionAddress;
- sp = (unsigned int)context.Esp;
+ pc = (CONTEXT_REG)event.u.Exception.ExceptionRecord.ExceptionAddress;
+ sp = context.CONTEXT_SP;
if (tracing_enabled)
- fprintf (tracefile, "%08x %08lx\n", pc, event.dwThreadId);
+ fprintf (tracefile, CONTEXT_REG_FMT " %08x\n", pc, (int)event.dwThreadId);
if (trace_console)
{
- printf ("%d %08x\n", tix, pc);
+ printf ("%d " CONTEXT_REG_FMT "\n", tix, pc);
fflush (stdout);
}
@@ -469,7 +483,7 @@ run_program (char *cmdline)
int i;
for (i=num_dlls-1; i>=0; i--)
{
- if (dll_info[i].base_address < context.Eip)
+ if (dll_info[i].base_address < context.CONTEXT_IP)
{
if (hThread == procinfo.hThread)
dll_info[i].pcount++;
@@ -485,23 +499,23 @@ run_program (char *cmdline)
static int ncalls=0;
static int qq=0;
if (++qq % 100 == 0)
- fprintf (stderr, " %08x %d %d \r",
+ fprintf (stderr, " " CONTEXT_REG_FMT " %d %d \r",
pc, ncalls, opcode_count);
- if (sp == last_sp-4)
+ if (sp == last_sp-sizeof(CONTEXT_REG))
{
ncalls++;
store_call_edge (last_pc, pc);
if (last_pc < KERNEL_ADDR && pc > KERNEL_ADDR)
{
- int retaddr;
- DWORD rv;
+#if 0
+ CONTEXT_REG retaddr;
+ SIZE_T rv;
ReadProcessMemory (hProcess,
(void *)sp,
(LPVOID)&(retaddr),
- 4, &rv);
-#if 0
- printf ("call last_pc = %08x pc = %08x rv = %08x\n",
+ sizeof(retaddr), &rv);
+ printf ("call last_pc = " CONTEXT_REG_FMT " pc = " CONTEXT_REG_FMT " rv = " CONTEXT_REG_FMT "\n",
last_pc, pc, retaddr);
/* experimental - try to skip kernel calls for speed */
add_breakpoint (retaddr);
@@ -520,10 +534,10 @@ run_program (char *cmdline)
default:
if (verbose)
{
- printf ("exception %ld, ", event.u.Exception.dwFirstChance);
- printf ("code: %lx flags: %lx\n",
- event.u.Exception.ExceptionRecord.ExceptionCode,
- event.u.Exception.ExceptionRecord.ExceptionFlags);
+ printf ("exception %d, ", (int)event.u.Exception.dwFirstChance);
+ printf ("code: %x flags: %x\n",
+ (int)event.u.Exception.ExceptionRecord.ExceptionCode,
+ (int)event.u.Exception.ExceptionRecord.ExceptionFlags);
if (event.u.Exception.dwFirstChance == 1)
dump_registers (hThread);
}
@@ -562,11 +576,11 @@ run_program (char *cmdline)
&rv);
if (!i)
{
- printf ("error reading memory: %ld %ld\n", rv, GetLastError ());
+ printf ("error reading memory: %zu %u\n", (size_t)rv, (unsigned int)GetLastError ());
}
if (verbose)
- printf ("ODS: %x/%d \"%s\"\n",
- (int)hThread, tix, string);
+ printf ("ODS: %p/%d \"%s\"\n",
+ hThread, tix, string);
if (strcmp (string, "ssp on") == 0)
{
@@ -585,21 +599,22 @@ run_program (char *cmdline)
case LOAD_DLL_DEBUG_EVENT:
if (verbose)
- printf ("load dll %08x:",
- (int)event.u.LoadDll.lpBaseOfDll);
+ printf ("load dll " CONTEXT_REG_FMT ":",
+ (CONTEXT_REG)event.u.LoadDll.lpBaseOfDll);
dll_ptr = (char *)"( u n k n o w n ) \0\0";
if (event.u.LoadDll.lpImageName)
{
+ void *buf;
ReadProcessMemory (hProcess,
event.u.LoadDll.lpImageName,
- (LPVOID)&src,
- sizeof (src),
+ (LPVOID)&buf,
+ sizeof (buf),
&rv);
- if (src)
+ if (buf)
{
ReadProcessMemory (hProcess,
- (void *)src,
+ buf,
(LPVOID)dll_name,
sizeof (dll_name),
&rv);
@@ -617,8 +632,7 @@ run_program (char *cmdline)
}
- dll_info[num_dlls].base_address
- = (unsigned int)event.u.LoadDll.lpBaseOfDll;
+ dll_info[num_dlls].base_address = (CONTEXT_REG)event.u.LoadDll.lpBaseOfDll;
dll_info[num_dlls].pcount = 0;
dll_info[num_dlls].scount = 0;
dll_info[num_dlls].name = wide_strdup (dll_ptr);
@@ -636,9 +650,9 @@ run_program (char *cmdline)
case EXIT_PROCESS_DEBUG_EVENT:
if (verbose)
- printf ("process %08lx %08lx exit %ld\n",
- event.dwProcessId, event.dwThreadId,
- event.u.ExitProcess.dwExitCode);
+ printf ("process %08x %08x exit %d\n",
+ (int)event.dwProcessId, (int)event.dwThreadId,
+ (int)event.u.ExitProcess.dwExitCode);
running = 0;
break;
@@ -828,7 +842,7 @@ print_version ()
{
printf ("ssp (cygwin) %d.%d.%d\n"
"Single-Step Profiler\n"
- "Copyright (C) 2000 - %s Red Hat, Inc.\n"
+ "Copyright (C) 2000 - %s Cygwin Authors\n"
"This is free software; see the source for copying conditions. There is NO\n"
"warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n",
CYGWIN_VERSION_DLL_MAJOR / 1000,
@@ -843,6 +857,7 @@ main (int argc, char **argv)
int c, i;
int total_pcount = 0, total_scount = 0;
FILE *gmon;
+ ssize_t range;
setbuf (stdout, 0);
@@ -892,39 +907,50 @@ main (int argc, char **argv)
if ( (argc - optind) < 3 )
usage (stderr);
- sscanf (argv[optind++], "%i", &low_pc);
- sscanf (argv[optind++], "%i", &high_pc);
+ sscanf (argv[optind++], ADDR_SSCANF_FMT, &low_pc);
+ sscanf (argv[optind++], ADDR_SSCANF_FMT, &high_pc);
- if (low_pc > high_pc-8)
+ range = high_pc - low_pc;
+ if (range <= 0)
{
fprintf (stderr, "Hey, low_pc must be lower than high_pc\n");
exit (1);
}
- hits = (HISTCOUNTER *)malloc (high_pc-low_pc+4);
- memset (hits, 0, high_pc-low_pc+4);
+ hits = (HISTCOUNTER *)malloc (range+4);
+ if (!hits)
+ {
+ fprintf (stderr, "Ouch, malloc failed\n");
+ exit (1);
+ }
+ memset (hits, 0, range+4);
- fprintf (stderr, "prun: [%08x,%08x] Running '%s'\n",
+ fprintf (stderr, "prun: [" CONTEXT_REG_FMT "," CONTEXT_REG_FMT "] Running '%s'\n",
low_pc, high_pc, argv[optind]);
run_program (argv[optind]);
hdr.lpc = low_pc;
hdr.hpc = high_pc;
- hdr.ncnt = high_pc-low_pc + sizeof (hdr);
+ hdr.ncnt = range + sizeof (hdr);
hdr.version = GMONVERSION;
hdr.profrate = 100;
gmon = fopen ("gmon.out", "wb");
fwrite (&hdr, 1, sizeof (hdr), gmon);
- fwrite (hits, 1, high_pc-low_pc, gmon);
+ fwrite (hits, 1, range, gmon);
write_call_edges (gmon);
fclose (gmon);
if (dll_counts)
{
- /* 1234567 123% 1234567 123% 12345678 xxxxxxxxxxx */
+#ifdef __x86_64__
+ /* 1234567 123% 1234567 123% 1234567812345678 xxxxxxxxxxx */
+ printf (" Main-Thread Other-Thread BaseAddr DLL Name\n");
+#else
+ /* 1234567 123% 1234567 123% 12345678 xxxxxxxxxxx */
printf (" Main-Thread Other-Thread BaseAddr DLL Name\n");
+#endif
total_pcount = 0;
total_scount = 0;
@@ -940,7 +966,7 @@ main (int argc, char **argv)
for (i=0; i<num_dlls; i++)
if (dll_info[i].pcount || dll_info[i].scount)
{
- printf ("%7d %3d%% %7d %3d%% %08x %s\n",
+ printf ("%7d %3d%% %7d %3d%% " CONTEXT_REG_FMT " %s\n",
dll_info[i].pcount,
(dll_info[i].pcount*100)/opcode_count,
dll_info[i].scount,
@@ -952,5 +978,3 @@ main (int argc, char **argv)
exit (0);
}
-
-#endif /* !__x86_64 */
diff --git a/winsup/utils/strace.cc b/winsup/utils/strace.cc
index 73096ab3b..3042d1b66 100644
--- a/winsup/utils/strace.cc
+++ b/winsup/utils/strace.cc
@@ -1,8 +1,5 @@
/* strace.cc
- Copyright 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008,
- 2009, 2010, 2011, 2012, 2013 Red Hat Inc.
-
Written by Chris Faylor <cgf@redhat.com>
This file is part of Cygwin.
@@ -26,6 +23,7 @@ details. */
#include "../cygwin/include/sys/strace.h"
#include "../cygwin/include/sys/cygwin.h"
#include "../cygwin/include/cygwin/version.h"
+#include "../cygwin/cygtls_padsize.h"
#include "path.h"
#undef cygwin_internal
#include "loadlib.h"
@@ -40,6 +38,7 @@ static int forkdebug = 1;
static int numerror = 1;
static int show_usecs = 1;
static int delta = 1;
+static int events = 1;
static int hhmmss;
static int bufsize;
static int new_window;
@@ -54,6 +53,8 @@ static BOOL close_handle (HANDLE h, DWORD ok);
#define CloseHandle(h) close_handle(h, 0)
+static void *drive_map;
+
struct child_list
{
DWORD id;
@@ -637,6 +638,30 @@ handle_output_debug_string (DWORD id, LPVOID p, unsigned mask, FILE *ofile)
fflush (ofile);
}
+static BOOL
+GetFileNameFromHandle(HANDLE hFile, WCHAR pszFilename[MAX_PATH+1])
+{
+ BOOL result = FALSE;
+ ULONG len = 0;
+ OBJECT_NAME_INFORMATION *ntfn = (OBJECT_NAME_INFORMATION *) alloca (65536);
+ NTSTATUS status = NtQueryObject (hFile, ObjectNameInformation,
+ ntfn, 65536, &len);
+ if (NT_SUCCESS (status))
+ {
+ PWCHAR win32path = ntfn->Name.Buffer;
+ win32path[ntfn->Name.Length / sizeof (WCHAR)] = L'\0';
+
+ /* NtQueryObject returns a native NT path. (Try to) convert to Win32. */
+ if (drive_map)
+ win32path = (PWCHAR) cygwin_internal (CW_MAP_DRIVE_MAP, drive_map,
+ win32path);
+ pszFilename[0] = L'\0';
+ wcsncat (pszFilename, win32path, MAX_PATH);
+ result = TRUE;
+ }
+ return result;
+}
+
static DWORD
proc_child (unsigned mask, FILE *ofile, pid_t pid)
{
@@ -670,19 +695,42 @@ proc_child (unsigned mask, FILE *ofile, pid_t pid)
switch (ev.dwDebugEventCode)
{
case CREATE_PROCESS_DEBUG_EVENT:
+ if (events)
+ fprintf (ofile, "--- Process %lu created\n", ev.dwProcessId);
if (ev.u.CreateProcessInfo.hFile)
CloseHandle (ev.u.CreateProcessInfo.hFile);
add_child (ev.dwProcessId, ev.u.CreateProcessInfo.hProcess);
break;
case CREATE_THREAD_DEBUG_EVENT:
+ if (events)
+ fprintf (ofile, "--- Process %lu thread %lu created\n",
+ ev.dwProcessId, ev.dwThreadId);
break;
case LOAD_DLL_DEBUG_EVENT:
+ if (events)
+ {
+ // lpImageName is not always populated, so find the filename for
+ // hFile instead
+ WCHAR dllname[MAX_PATH+1];
+ if (!GetFileNameFromHandle(ev.u.LoadDll.hFile, dllname))
+ wcscpy(dllname, L"(unknown)");
+
+ fprintf (ofile, "--- Process %lu loaded %ls at %p\n",
+ ev.dwProcessId, dllname, ev.u.LoadDll.lpBaseOfDll);
+ }
+
if (ev.u.LoadDll.hFile)
CloseHandle (ev.u.LoadDll.hFile);
break;
+ case UNLOAD_DLL_DEBUG_EVENT:
+ if (events)
+ fprintf (ofile, "--- Process %lu unloaded DLL at %p\n",
+ ev.dwProcessId, ev.u.UnloadDll.lpBaseOfDll);
+ break;
+
case OUTPUT_DEBUG_STRING_EVENT:
handle_output_debug_string (ev.dwProcessId,
ev.u.DebugString.lpDebugStringData,
@@ -690,9 +738,19 @@ proc_child (unsigned mask, FILE *ofile, pid_t pid)
break;
case EXIT_PROCESS_DEBUG_EVENT:
+ if (events)
+ fprintf (ofile, "--- Process %lu exited with status 0x%lx\n",
+ ev.dwProcessId, ev.u.ExitProcess.dwExitCode);
res = ev.u.ExitProcess.dwExitCode;
remove_child (ev.dwProcessId);
break;
+
+ case EXIT_THREAD_DEBUG_EVENT:
+ if (events)
+ fprintf (ofile, "--- Process %lu thread %lu exited with status 0x%lx\n",
+ ev.dwProcessId, ev.dwThreadId, ev.u.ExitThread.dwExitCode);
+ break;
+
case EXCEPTION_DEBUG_EVENT:
if (ev.u.Exception.ExceptionRecord.ExceptionCode
!= (DWORD) STATUS_BREAKPOINT)
@@ -873,6 +931,7 @@ Trace system calls and signals\n\
\n\
-b, --buffer-size=SIZE set size of output file buffer\n\
-d, --no-delta don't display the delta-t microsecond timestamp\n\
+ -e, --events log all Windows DEBUG_EVENTS (toggle - default true)\n\
-f, --trace-children trace child processes (toggle - default true)\n\
-h, --help output usage information and exit\n\
-m, --mask=MASK set message filter mask\n\
@@ -928,6 +987,7 @@ Trace system calls and signals\n\
struct option longopts[] = {
{"buffer-size", required_argument, NULL, 'b'},
+ {"events", no_argument, NULL, 'e'},
{"help", no_argument, NULL, 'h'},
{"flush-period", required_argument, NULL, 'S'},
{"hex", no_argument, NULL, 'H'},
@@ -946,14 +1006,14 @@ struct option longopts[] = {
{NULL, 0, NULL, 0}
};
-static const char *const opts = "+b:dhHfm:no:p:qS:tTuVw";
+static const char *const opts = "+b:dehHfm:no:p:qS:tTuVw";
static void
print_version ()
{
printf ("strace (cygwin) %d.%d.%d\n"
"System Trace\n"
- "Copyright (C) 2000 - %s Red Hat, Inc.\n"
+ "Copyright (C) 2000 - %s Cygwin Authors\n"
"This is free software; see the source for copying conditions. There is NO\n"
"warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n",
CYGWIN_VERSION_DLL_MAJOR / 1000,
@@ -963,7 +1023,7 @@ print_version ()
}
int
-main (int argc, char **argv)
+main2 (int argc, char **argv)
{
unsigned mask = 0;
FILE *ofile = NULL;
@@ -971,6 +1031,7 @@ main (int argc, char **argv)
int opt;
int toggle = 0;
int sawquiet = -1;
+ DWORD ret = 0;
if (load_cygwin ())
{
@@ -994,6 +1055,9 @@ main (int argc, char **argv)
case 'd':
delta ^= 1;
break;
+ case 'e':
+ events ^= 1;
+ break;
case 'f':
forkdebug ^= 1;
break;
@@ -1081,17 +1145,37 @@ character #%d.\n", optarg, (int) (endptr - optarg), endptr);
if (!mask)
mask = _STRACE_ALL;
- if (bufsize)
- setvbuf (ofile, (char *) alloca (bufsize), _IOFBF, bufsize);
-
if (!ofile)
ofile = stdout;
+ if (bufsize)
+ setvbuf (ofile, (char *) alloca (bufsize), _IOFBF, bufsize);
+
if (toggle)
dotoggle (pid);
else
- ExitProcess (dostrace (mask, ofile, pid, argv + optind));
- return 0;
+ {
+ drive_map = (void *) cygwin_internal (CW_ALLOC_DRIVE_MAP);
+ ret = dostrace (mask, ofile, pid, argv + optind);
+ if (drive_map)
+ cygwin_internal (CW_FREE_DRIVE_MAP, drive_map);
+ }
+ if (ofile && ofile != stdout)
+ fclose (ofile);
+ ExitProcess (ret);
+}
+
+int
+main (int argc, char **argv)
+{
+ /* Make sure to have room for the _cygtls area *and* to initialize it.
+ This is required to make sure cygwin_internal calls into Cygwin work
+ reliably. This problem has been noticed under AllocationPreference
+ registry setting to 0x100000 (TOP_DOWN). */
+ char buf[CYGTLS_PADSIZE];
+
+ memset (buf, 0, sizeof (buf));
+ exit (main2 (argc, argv));
}
#undef CloseHandle
diff --git a/winsup/utils/testsuite.cc b/winsup/utils/testsuite.cc
index bab6f309e..c0a800b01 100644
--- a/winsup/utils/testsuite.cc
+++ b/winsup/utils/testsuite.cc
@@ -1,7 +1,5 @@
/* testsuite.cc
- Copyright 2008, 2011 Red Hat, Inc.
-
This file is part of Cygwin.
This software is a copyrighted work licensed under the terms of the
diff --git a/winsup/utils/testsuite.h b/winsup/utils/testsuite.h
index 2632f719b..4ed9eb2c4 100644
--- a/winsup/utils/testsuite.h
+++ b/winsup/utils/testsuite.h
@@ -1,7 +1,5 @@
/* testsuite.h
- Copyright 2008, 2011 Red Hat, Inc.
-
This file is part of Cygwin.
This software is a copyrighted work licensed under the terms of the
diff --git a/winsup/utils/tzmap-from-unicode.org b/winsup/utils/tzmap-from-unicode.org
new file mode 100755
index 000000000..e169ee7a7
--- /dev/null
+++ b/winsup/utils/tzmap-from-unicode.org
@@ -0,0 +1,86 @@
+#!/bin/bash
+#
+# tzset-from-unicode.org
+#
+# Fetch XML file containing mapping of Windows timezone keynames and countries
+# per ISO 3166-1 to POSIX timezones from unicode.org.
+#
+# Create the table file as required by tzset.c.
+#
+
+ZONES_FILE="http://unicode.org/repos/cldr/trunk/common/supplemental/windowsZones.xml"
+
+echo "/*"
+echo " This file gets auto-generated by the script tzmap-from-unicode.org via"
+echo " a Makefile rule. To regenerate the file, just call 'make tzmap'. It"
+echo " fetches the file"
+echo ""
+echo " ${ZONES_FILE}"
+echo ""
+echo " using wget and converts it into the tzmap table required by tzget.c."
+echo " Regenerating might be necessary on a regular basis..."
+echo ""
+echo " This table maps Windows timezone keynames and countries per ISO 3166-1 to"
+echo " POSIX-compatible timezone IDs."
+echo ""
+echo " The mapping from unicode.org is just a bit incomplete. It doesn't contain"
+echo " a few timezones available on Windows XP, namely:"
+echo ""
+echo " Armenian Standard Time"
+echo " Mexico Standard Time"
+echo " Mexico Standard Time 2"
+echo ""
+echo " as well as the still (Windows 8.1) available"
+echo ""
+echo " E. Europe Standard Time"
+echo " Mid-Atlantic Standard Time"
+echo " Kamchatka Standard Time"
+echo ""
+echo " as well as a few combinations which got a new Windows timezone name"
+echo ""
+echo " Eastern Standard Time/TC"
+echo " Egypt Standard Time/PS"
+echo " Greenwich Standard Time/EH"
+echo " Hawaiian Standard Time/TK"
+echo " Kaliningrad Standard Time/BY"
+echo " SA Pacific Standard Time/HT "
+echo " South Africa Standard Time/LY"
+echo ""
+echo " It also doesn't contain some of the deprecated country codes used in older"
+echo " OSes, namely:"
+echo ""
+echo " SP (Serbian, proposed) used in XP"
+echo " CS (Serbian and Montenegro, dissolved, now RS and ME) used in Vista"
+echo " "
+echo " While these are apparently old, they are required here to get a complete"
+echo " mapping on all supported OSes. */"
+echo "struct"
+echo "{"
+echo " PCWSTR win_tzkey;"
+echo " PCWSTR country;"
+echo " PCWSTR posix_tzid;"
+echo "} const tzmap[] ="
+echo "{"
+wget -O - "${ZONES_FILE}" | \
+{
+ sed -n -e 's#territory="001"#territory=""#
+ s#Asia/Calcutta#Asia/Kolkata#
+ s#.*mapZone other=\("[^"]*"\) territory=\("[^"]*"\) type=\("[^"]*"\).*# { L\1, L\2, L\3 },#p'
+ echo ' { L"Armenian Standard Time", L"AM", L"Asia/Yerevan" },'
+ echo ' { L"Central Europe Standard Time", L"CS", L"Europe/Belgrade" },'
+ echo ' { L"Central Europe Standard Time", L"SP", L"Europe/Belgrade" },'
+ echo ' { L"E. Europe Standard Time", L"", L"Asia/Nicosia" },'
+ echo ' { L"E. Europe Standard Time", L"CY", L"Asia/Nicosia" },'
+ echo ' { L"Eastern Standard Time", L"TC", L"America/Grand_Turk" },'
+ echo ' { L"Egypt Standard Time", L"PS", L"Asia/Gaza Asia/Hebron" },'
+ echo ' { L"Greenwich Standard Time", L"EH", L"Africa/El_Aaiun" },'
+ echo ' { L"Kaliningrad Standard Time", L"BY", L"Europe/Minsk" },'
+ echo ' { L"Kamchatka Standard Time", L"", L"Asia/Kamchatka" },'
+ echo ' { L"Hawaiian Standard Time", L"TK", L"Pacific/Fakaofo" },'
+ echo ' { L"Mexico Standard Time", L"", L"America/Mexico_City" },'
+ echo ' { L"Mexico Standard Time 2", L"", L"America/Mazatlan" },'
+ echo ' { L"Mid-Atlantic Standard Time", L"", L"Atlantic/South_Georgia" },'
+ echo ' { L"SA Pacific Standard Time", L"HT", L"America/Port-au-Prince" },'
+ echo ' { L"South Africa Standard Time", L"LY", L"Africa/Tripoli" },'
+} | sort -d
+echo "};"
diff --git a/winsup/utils/tzmap.h b/winsup/utils/tzmap.h
new file mode 100644
index 000000000..31a83c96d
--- /dev/null
+++ b/winsup/utils/tzmap.h
@@ -0,0 +1,517 @@
+/*
+ This file gets auto-generated by the script tzmap-from-unicode.org via
+ a Makefile rule. To regenerate the file, just call 'make tzmap'. It
+ fetches the file
+
+ http://unicode.org/repos/cldr/trunk/common/supplemental/windowsZones.xml
+
+ using wget and converts it into the tzmap table required by tzget.c.
+ Regenerating might be necessary on a regular basis...
+
+ This table maps Windows timezone keynames and countries per ISO 3166-1 to
+ POSIX-compatible timezone IDs.
+
+ The mapping from unicode.org is just a bit incomplete. It doesn't contain
+ a few timezones available on Windows XP, namely:
+
+ Armenian Standard Time
+ Mexico Standard Time
+ Mexico Standard Time 2
+
+ as well as the still (Windows 8.1) available
+
+ E. Europe Standard Time
+ Mid-Atlantic Standard Time
+ Kamchatka Standard Time
+
+ as well as a few combinations which got a new Windows timezone name
+
+ Eastern Standard Time/TC
+ Egypt Standard Time/PS
+ Greenwich Standard Time/EH
+ Hawaiian Standard Time/TK
+ Kaliningrad Standard Time/BY
+ SA Pacific Standard Time/HT
+ South Africa Standard Time/LY
+
+ It also doesn't contain some of the deprecated country codes used in older
+ OSes, namely:
+
+ SP (Serbian, proposed) used in XP
+ CS (Serbian and Montenegro, dissolved, now RS and ME) used in Vista
+
+ While these are apparently old, they are required here to get a complete
+ mapping on all supported OSes. */
+struct
+{
+ PCWSTR win_tzkey;
+ PCWSTR country;
+ PCWSTR posix_tzid;
+} const tzmap[] =
+{
+ { L"AUS Central Standard Time", L"", L"Australia/Darwin" },
+ { L"AUS Central Standard Time", L"AU", L"Australia/Darwin" },
+ { L"AUS Eastern Standard Time", L"", L"Australia/Sydney" },
+ { L"AUS Eastern Standard Time", L"AU", L"Australia/Sydney Australia/Melbourne" },
+ { L"Afghanistan Standard Time", L"", L"Asia/Kabul" },
+ { L"Afghanistan Standard Time", L"AF", L"Asia/Kabul" },
+ { L"Alaskan Standard Time", L"", L"America/Anchorage" },
+ { L"Alaskan Standard Time", L"US", L"America/Anchorage America/Juneau America/Nome America/Sitka America/Yakutat" },
+ { L"Arab Standard Time", L"", L"Asia/Riyadh" },
+ { L"Arab Standard Time", L"BH", L"Asia/Bahrain" },
+ { L"Arab Standard Time", L"KW", L"Asia/Kuwait" },
+ { L"Arab Standard Time", L"QA", L"Asia/Qatar" },
+ { L"Arab Standard Time", L"SA", L"Asia/Riyadh" },
+ { L"Arab Standard Time", L"YE", L"Asia/Aden" },
+ { L"Arabian Standard Time", L"", L"Asia/Dubai" },
+ { L"Arabian Standard Time", L"AE", L"Asia/Dubai" },
+ { L"Arabian Standard Time", L"OM", L"Asia/Muscat" },
+ { L"Arabian Standard Time", L"ZZ", L"Etc/GMT-4" },
+ { L"Arabic Standard Time", L"", L"Asia/Baghdad" },
+ { L"Arabic Standard Time", L"IQ", L"Asia/Baghdad" },
+ { L"Argentina Standard Time", L"", L"America/Buenos_Aires" },
+ { L"Argentina Standard Time", L"AR", L"America/Buenos_Aires America/Argentina/La_Rioja America/Argentina/Rio_Gallegos America/Argentina/Salta America/Argentina/San_Juan America/Argentina/San_Luis America/Argentina/Tucuman America/Argentina/Ushuaia America/Catamarca America/Cordoba America/Jujuy America/Mendoza" },
+ { L"Armenian Standard Time", L"AM", L"Asia/Yerevan" },
+ { L"Atlantic Standard Time", L"", L"America/Halifax" },
+ { L"Atlantic Standard Time", L"BM", L"Atlantic/Bermuda" },
+ { L"Atlantic Standard Time", L"CA", L"America/Halifax America/Glace_Bay America/Goose_Bay America/Moncton" },
+ { L"Atlantic Standard Time", L"GL", L"America/Thule" },
+ { L"Azerbaijan Standard Time", L"", L"Asia/Baku" },
+ { L"Azerbaijan Standard Time", L"AZ", L"Asia/Baku" },
+ { L"Azores Standard Time", L"", L"Atlantic/Azores" },
+ { L"Azores Standard Time", L"GL", L"America/Scoresbysund" },
+ { L"Azores Standard Time", L"PT", L"Atlantic/Azores" },
+ { L"Bahia Standard Time", L"", L"America/Bahia" },
+ { L"Bahia Standard Time", L"BR", L"America/Bahia" },
+ { L"Bangladesh Standard Time", L"", L"Asia/Dhaka" },
+ { L"Bangladesh Standard Time", L"BD", L"Asia/Dhaka" },
+ { L"Bangladesh Standard Time", L"BT", L"Asia/Thimphu" },
+ { L"Belarus Standard Time", L"", L"Europe/Minsk" },
+ { L"Belarus Standard Time", L"BY", L"Europe/Minsk" },
+ { L"Canada Central Standard Time", L"", L"America/Regina" },
+ { L"Canada Central Standard Time", L"CA", L"America/Regina America/Swift_Current" },
+ { L"Cape Verde Standard Time", L"", L"Atlantic/Cape_Verde" },
+ { L"Cape Verde Standard Time", L"CV", L"Atlantic/Cape_Verde" },
+ { L"Cape Verde Standard Time", L"ZZ", L"Etc/GMT+1" },
+ { L"Caucasus Standard Time", L"", L"Asia/Yerevan" },
+ { L"Caucasus Standard Time", L"AM", L"Asia/Yerevan" },
+ { L"Cen. Australia Standard Time", L"", L"Australia/Adelaide" },
+ { L"Cen. Australia Standard Time", L"AU", L"Australia/Adelaide Australia/Broken_Hill" },
+ { L"Central America Standard Time", L"", L"America/Guatemala" },
+ { L"Central America Standard Time", L"BZ", L"America/Belize" },
+ { L"Central America Standard Time", L"CR", L"America/Costa_Rica" },
+ { L"Central America Standard Time", L"EC", L"Pacific/Galapagos" },
+ { L"Central America Standard Time", L"GT", L"America/Guatemala" },
+ { L"Central America Standard Time", L"HN", L"America/Tegucigalpa" },
+ { L"Central America Standard Time", L"NI", L"America/Managua" },
+ { L"Central America Standard Time", L"SV", L"America/El_Salvador" },
+ { L"Central America Standard Time", L"ZZ", L"Etc/GMT+6" },
+ { L"Central Asia Standard Time", L"", L"Asia/Almaty" },
+ { L"Central Asia Standard Time", L"AQ", L"Antarctica/Vostok" },
+ { L"Central Asia Standard Time", L"CN", L"Asia/Urumqi" },
+ { L"Central Asia Standard Time", L"IO", L"Indian/Chagos" },
+ { L"Central Asia Standard Time", L"KG", L"Asia/Bishkek" },
+ { L"Central Asia Standard Time", L"KZ", L"Asia/Almaty Asia/Qyzylorda" },
+ { L"Central Asia Standard Time", L"ZZ", L"Etc/GMT-6" },
+ { L"Central Brazilian Standard Time", L"", L"America/Cuiaba" },
+ { L"Central Brazilian Standard Time", L"BR", L"America/Cuiaba America/Campo_Grande" },
+ { L"Central Europe Standard Time", L"", L"Europe/Budapest" },
+ { L"Central Europe Standard Time", L"AL", L"Europe/Tirane" },
+ { L"Central Europe Standard Time", L"CS", L"Europe/Belgrade" },
+ { L"Central Europe Standard Time", L"CZ", L"Europe/Prague" },
+ { L"Central Europe Standard Time", L"HU", L"Europe/Budapest" },
+ { L"Central Europe Standard Time", L"ME", L"Europe/Podgorica" },
+ { L"Central Europe Standard Time", L"RS", L"Europe/Belgrade" },
+ { L"Central Europe Standard Time", L"SI", L"Europe/Ljubljana" },
+ { L"Central Europe Standard Time", L"SK", L"Europe/Bratislava" },
+ { L"Central Europe Standard Time", L"SP", L"Europe/Belgrade" },
+ { L"Central European Standard Time", L"", L"Europe/Warsaw" },
+ { L"Central European Standard Time", L"BA", L"Europe/Sarajevo" },
+ { L"Central European Standard Time", L"HR", L"Europe/Zagreb" },
+ { L"Central European Standard Time", L"MK", L"Europe/Skopje" },
+ { L"Central European Standard Time", L"PL", L"Europe/Warsaw" },
+ { L"Central Pacific Standard Time", L"", L"Pacific/Guadalcanal" },
+ { L"Central Pacific Standard Time", L"AU", L"Antarctica/Macquarie" },
+ { L"Central Pacific Standard Time", L"FM", L"Pacific/Ponape Pacific/Kosrae" },
+ { L"Central Pacific Standard Time", L"NC", L"Pacific/Noumea" },
+ { L"Central Pacific Standard Time", L"PG", L"Pacific/Bougainville" },
+ { L"Central Pacific Standard Time", L"SB", L"Pacific/Guadalcanal" },
+ { L"Central Pacific Standard Time", L"VU", L"Pacific/Efate" },
+ { L"Central Pacific Standard Time", L"ZZ", L"Etc/GMT-11" },
+ { L"Central Standard Time", L"", L"America/Chicago" },
+ { L"Central Standard Time", L"CA", L"America/Winnipeg America/Rainy_River America/Rankin_Inlet America/Resolute" },
+ { L"Central Standard Time", L"MX", L"America/Matamoros" },
+ { L"Central Standard Time", L"US", L"America/Chicago America/Indiana/Knox America/Indiana/Tell_City America/Menominee America/North_Dakota/Beulah America/North_Dakota/Center America/North_Dakota/New_Salem" },
+ { L"Central Standard Time", L"ZZ", L"CST6CDT" },
+ { L"Central Standard Time (Mexico)", L"", L"America/Mexico_City" },
+ { L"Central Standard Time (Mexico)", L"MX", L"America/Mexico_City America/Bahia_Banderas America/Merida America/Monterrey" },
+ { L"China Standard Time", L"", L"Asia/Shanghai" },
+ { L"China Standard Time", L"CN", L"Asia/Shanghai" },
+ { L"China Standard Time", L"HK", L"Asia/Hong_Kong" },
+ { L"China Standard Time", L"MO", L"Asia/Macau" },
+ { L"Dateline Standard Time", L"", L"Etc/GMT+12" },
+ { L"Dateline Standard Time", L"ZZ", L"Etc/GMT+12" },
+ { L"E. Africa Standard Time", L"", L"Africa/Nairobi" },
+ { L"E. Africa Standard Time", L"AQ", L"Antarctica/Syowa" },
+ { L"E. Africa Standard Time", L"DJ", L"Africa/Djibouti" },
+ { L"E. Africa Standard Time", L"ER", L"Africa/Asmera" },
+ { L"E. Africa Standard Time", L"ET", L"Africa/Addis_Ababa" },
+ { L"E. Africa Standard Time", L"KE", L"Africa/Nairobi" },
+ { L"E. Africa Standard Time", L"KM", L"Indian/Comoro" },
+ { L"E. Africa Standard Time", L"MG", L"Indian/Antananarivo" },
+ { L"E. Africa Standard Time", L"SD", L"Africa/Khartoum" },
+ { L"E. Africa Standard Time", L"SO", L"Africa/Mogadishu" },
+ { L"E. Africa Standard Time", L"SS", L"Africa/Juba" },
+ { L"E. Africa Standard Time", L"TZ", L"Africa/Dar_es_Salaam" },
+ { L"E. Africa Standard Time", L"UG", L"Africa/Kampala" },
+ { L"E. Africa Standard Time", L"YT", L"Indian/Mayotte" },
+ { L"E. Africa Standard Time", L"ZZ", L"Etc/GMT-3" },
+ { L"E. Australia Standard Time", L"", L"Australia/Brisbane" },
+ { L"E. Australia Standard Time", L"AU", L"Australia/Brisbane Australia/Lindeman" },
+ { L"E. Europe Standard Time", L"", L"Asia/Nicosia" },
+ { L"E. Europe Standard Time", L"CY", L"Asia/Nicosia" },
+ { L"E. South America Standard Time", L"", L"America/Sao_Paulo" },
+ { L"E. South America Standard Time", L"BR", L"America/Sao_Paulo" },
+ { L"Eastern Standard Time", L"", L"America/New_York" },
+ { L"Eastern Standard Time", L"BS", L"America/Nassau" },
+ { L"Eastern Standard Time", L"CA", L"America/Toronto America/Iqaluit America/Montreal America/Nipigon America/Pangnirtung America/Thunder_Bay" },
+ { L"Eastern Standard Time", L"CU", L"America/Havana" },
+ { L"Eastern Standard Time", L"HT", L"America/Port-au-Prince" },
+ { L"Eastern Standard Time", L"TC", L"America/Grand_Turk" },
+ { L"Eastern Standard Time", L"US", L"America/New_York America/Detroit America/Indiana/Petersburg America/Indiana/Vincennes America/Indiana/Winamac America/Kentucky/Monticello America/Louisville" },
+ { L"Eastern Standard Time", L"ZZ", L"EST5EDT" },
+ { L"Eastern Standard Time (Mexico)", L"", L"America/Cancun" },
+ { L"Eastern Standard Time (Mexico)", L"MX", L"America/Cancun" },
+ { L"Egypt Standard Time", L"", L"Africa/Cairo" },
+ { L"Egypt Standard Time", L"EG", L"Africa/Cairo" },
+ { L"Egypt Standard Time", L"PS", L"Asia/Gaza Asia/Hebron" },
+ { L"Ekaterinburg Standard Time", L"", L"Asia/Yekaterinburg" },
+ { L"Ekaterinburg Standard Time", L"RU", L"Asia/Yekaterinburg" },
+ { L"FLE Standard Time", L"", L"Europe/Kiev" },
+ { L"FLE Standard Time", L"AX", L"Europe/Mariehamn" },
+ { L"FLE Standard Time", L"BG", L"Europe/Sofia" },
+ { L"FLE Standard Time", L"EE", L"Europe/Tallinn" },
+ { L"FLE Standard Time", L"FI", L"Europe/Helsinki" },
+ { L"FLE Standard Time", L"LT", L"Europe/Vilnius" },
+ { L"FLE Standard Time", L"LV", L"Europe/Riga" },
+ { L"FLE Standard Time", L"UA", L"Europe/Kiev Europe/Uzhgorod Europe/Zaporozhye" },
+ { L"Fiji Standard Time", L"", L"Pacific/Fiji" },
+ { L"Fiji Standard Time", L"FJ", L"Pacific/Fiji" },
+ { L"GMT Standard Time", L"", L"Europe/London" },
+ { L"GMT Standard Time", L"ES", L"Atlantic/Canary" },
+ { L"GMT Standard Time", L"FO", L"Atlantic/Faeroe" },
+ { L"GMT Standard Time", L"GB", L"Europe/London" },
+ { L"GMT Standard Time", L"GG", L"Europe/Guernsey" },
+ { L"GMT Standard Time", L"IE", L"Europe/Dublin" },
+ { L"GMT Standard Time", L"IM", L"Europe/Isle_of_Man" },
+ { L"GMT Standard Time", L"JE", L"Europe/Jersey" },
+ { L"GMT Standard Time", L"PT", L"Europe/Lisbon Atlantic/Madeira" },
+ { L"GTB Standard Time", L"", L"Europe/Bucharest" },
+ { L"GTB Standard Time", L"CY", L"Asia/Nicosia" },
+ { L"GTB Standard Time", L"GR", L"Europe/Athens" },
+ { L"GTB Standard Time", L"MD", L"Europe/Chisinau" },
+ { L"GTB Standard Time", L"RO", L"Europe/Bucharest" },
+ { L"Georgian Standard Time", L"", L"Asia/Tbilisi" },
+ { L"Georgian Standard Time", L"GE", L"Asia/Tbilisi" },
+ { L"Greenland Standard Time", L"", L"America/Godthab" },
+ { L"Greenland Standard Time", L"GL", L"America/Godthab" },
+ { L"Greenwich Standard Time", L"", L"Atlantic/Reykjavik" },
+ { L"Greenwich Standard Time", L"BF", L"Africa/Ouagadougou" },
+ { L"Greenwich Standard Time", L"CI", L"Africa/Abidjan" },
+ { L"Greenwich Standard Time", L"EH", L"Africa/El_Aaiun" },
+ { L"Greenwich Standard Time", L"GH", L"Africa/Accra" },
+ { L"Greenwich Standard Time", L"GM", L"Africa/Banjul" },
+ { L"Greenwich Standard Time", L"GN", L"Africa/Conakry" },
+ { L"Greenwich Standard Time", L"GW", L"Africa/Bissau" },
+ { L"Greenwich Standard Time", L"IS", L"Atlantic/Reykjavik" },
+ { L"Greenwich Standard Time", L"LR", L"Africa/Monrovia" },
+ { L"Greenwich Standard Time", L"ML", L"Africa/Bamako" },
+ { L"Greenwich Standard Time", L"MR", L"Africa/Nouakchott" },
+ { L"Greenwich Standard Time", L"SH", L"Atlantic/St_Helena" },
+ { L"Greenwich Standard Time", L"SL", L"Africa/Freetown" },
+ { L"Greenwich Standard Time", L"SN", L"Africa/Dakar" },
+ { L"Greenwich Standard Time", L"ST", L"Africa/Sao_Tome" },
+ { L"Greenwich Standard Time", L"TG", L"Africa/Lome" },
+ { L"Hawaiian Standard Time", L"", L"Pacific/Honolulu" },
+ { L"Hawaiian Standard Time", L"CK", L"Pacific/Rarotonga" },
+ { L"Hawaiian Standard Time", L"PF", L"Pacific/Tahiti" },
+ { L"Hawaiian Standard Time", L"TK", L"Pacific/Fakaofo" },
+ { L"Hawaiian Standard Time", L"UM", L"Pacific/Johnston" },
+ { L"Hawaiian Standard Time", L"US", L"Pacific/Honolulu" },
+ { L"Hawaiian Standard Time", L"ZZ", L"Etc/GMT+10" },
+ { L"India Standard Time", L"", L"Asia/Kolkata" },
+ { L"India Standard Time", L"IN", L"Asia/Kolkata" },
+ { L"Iran Standard Time", L"", L"Asia/Tehran" },
+ { L"Iran Standard Time", L"IR", L"Asia/Tehran" },
+ { L"Israel Standard Time", L"", L"Asia/Jerusalem" },
+ { L"Israel Standard Time", L"IL", L"Asia/Jerusalem" },
+ { L"Jordan Standard Time", L"", L"Asia/Amman" },
+ { L"Jordan Standard Time", L"JO", L"Asia/Amman" },
+ { L"Kaliningrad Standard Time", L"", L"Europe/Kaliningrad" },
+ { L"Kaliningrad Standard Time", L"BY", L"Europe/Minsk" },
+ { L"Kaliningrad Standard Time", L"RU", L"Europe/Kaliningrad" },
+ { L"Kamchatka Standard Time", L"", L"Asia/Kamchatka" },
+ { L"Korea Standard Time", L"", L"Asia/Seoul" },
+ { L"Korea Standard Time", L"KP", L"Asia/Pyongyang" },
+ { L"Korea Standard Time", L"KR", L"Asia/Seoul" },
+ { L"Libya Standard Time", L"", L"Africa/Tripoli" },
+ { L"Libya Standard Time", L"LY", L"Africa/Tripoli" },
+ { L"Line Islands Standard Time", L"", L"Pacific/Kiritimati" },
+ { L"Line Islands Standard Time", L"KI", L"Pacific/Kiritimati" },
+ { L"Line Islands Standard Time", L"ZZ", L"Etc/GMT-14" },
+ { L"Magadan Standard Time", L"", L"Asia/Magadan" },
+ { L"Magadan Standard Time", L"RU", L"Asia/Magadan" },
+ { L"Mauritius Standard Time", L"", L"Indian/Mauritius" },
+ { L"Mauritius Standard Time", L"MU", L"Indian/Mauritius" },
+ { L"Mauritius Standard Time", L"RE", L"Indian/Reunion" },
+ { L"Mauritius Standard Time", L"SC", L"Indian/Mahe" },
+ { L"Mexico Standard Time 2", L"", L"America/Mazatlan" },
+ { L"Mexico Standard Time", L"", L"America/Mexico_City" },
+ { L"Mid-Atlantic Standard Time", L"", L"Atlantic/South_Georgia" },
+ { L"Middle East Standard Time", L"", L"Asia/Beirut" },
+ { L"Middle East Standard Time", L"LB", L"Asia/Beirut" },
+ { L"Montevideo Standard Time", L"", L"America/Montevideo" },
+ { L"Montevideo Standard Time", L"UY", L"America/Montevideo" },
+ { L"Morocco Standard Time", L"", L"Africa/Casablanca" },
+ { L"Morocco Standard Time", L"EH", L"Africa/El_Aaiun" },
+ { L"Morocco Standard Time", L"MA", L"Africa/Casablanca" },
+ { L"Mountain Standard Time", L"", L"America/Denver" },
+ { L"Mountain Standard Time", L"CA", L"America/Edmonton America/Cambridge_Bay America/Inuvik America/Yellowknife" },
+ { L"Mountain Standard Time", L"MX", L"America/Ojinaga" },
+ { L"Mountain Standard Time", L"US", L"America/Denver America/Boise" },
+ { L"Mountain Standard Time", L"ZZ", L"MST7MDT" },
+ { L"Mountain Standard Time (Mexico)", L"", L"America/Chihuahua" },
+ { L"Mountain Standard Time (Mexico)", L"MX", L"America/Chihuahua America/Mazatlan" },
+ { L"Myanmar Standard Time", L"", L"Asia/Rangoon" },
+ { L"Myanmar Standard Time", L"CC", L"Indian/Cocos" },
+ { L"Myanmar Standard Time", L"MM", L"Asia/Rangoon" },
+ { L"N. Central Asia Standard Time", L"", L"Asia/Novosibirsk" },
+ { L"N. Central Asia Standard Time", L"RU", L"Asia/Novosibirsk Asia/Omsk" },
+ { L"Namibia Standard Time", L"", L"Africa/Windhoek" },
+ { L"Namibia Standard Time", L"NA", L"Africa/Windhoek" },
+ { L"Nepal Standard Time", L"", L"Asia/Katmandu" },
+ { L"Nepal Standard Time", L"NP", L"Asia/Katmandu" },
+ { L"New Zealand Standard Time", L"", L"Pacific/Auckland" },
+ { L"New Zealand Standard Time", L"AQ", L"Antarctica/McMurdo" },
+ { L"New Zealand Standard Time", L"NZ", L"Pacific/Auckland" },
+ { L"Newfoundland Standard Time", L"", L"America/St_Johns" },
+ { L"Newfoundland Standard Time", L"CA", L"America/St_Johns" },
+ { L"North Asia East Standard Time", L"", L"Asia/Irkutsk" },
+ { L"North Asia East Standard Time", L"RU", L"Asia/Irkutsk Asia/Chita" },
+ { L"North Asia Standard Time", L"", L"Asia/Krasnoyarsk" },
+ { L"North Asia Standard Time", L"RU", L"Asia/Krasnoyarsk Asia/Novokuznetsk" },
+ { L"Pacific SA Standard Time", L"", L"America/Santiago" },
+ { L"Pacific SA Standard Time", L"AQ", L"Antarctica/Palmer" },
+ { L"Pacific SA Standard Time", L"CL", L"America/Santiago" },
+ { L"Pacific Standard Time", L"", L"America/Los_Angeles" },
+ { L"Pacific Standard Time", L"CA", L"America/Vancouver America/Dawson America/Whitehorse" },
+ { L"Pacific Standard Time", L"MX", L"America/Tijuana" },
+ { L"Pacific Standard Time", L"US", L"America/Los_Angeles" },
+ { L"Pacific Standard Time", L"ZZ", L"PST8PDT" },
+ { L"Pacific Standard Time (Mexico)", L"", L"America/Santa_Isabel" },
+ { L"Pacific Standard Time (Mexico)", L"MX", L"America/Santa_Isabel" },
+ { L"Pakistan Standard Time", L"", L"Asia/Karachi" },
+ { L"Pakistan Standard Time", L"PK", L"Asia/Karachi" },
+ { L"Paraguay Standard Time", L"", L"America/Asuncion" },
+ { L"Paraguay Standard Time", L"PY", L"America/Asuncion" },
+ { L"Romance Standard Time", L"", L"Europe/Paris" },
+ { L"Romance Standard Time", L"BE", L"Europe/Brussels" },
+ { L"Romance Standard Time", L"DK", L"Europe/Copenhagen" },
+ { L"Romance Standard Time", L"ES", L"Europe/Madrid Africa/Ceuta" },
+ { L"Romance Standard Time", L"FR", L"Europe/Paris" },
+ { L"Russia Time Zone 10", L"", L"Asia/Srednekolymsk" },
+ { L"Russia Time Zone 10", L"RU", L"Asia/Srednekolymsk" },
+ { L"Russia Time Zone 11", L"", L"Asia/Kamchatka" },
+ { L"Russia Time Zone 11", L"RU", L"Asia/Kamchatka Asia/Anadyr" },
+ { L"Russia Time Zone 3", L"", L"Europe/Samara" },
+ { L"Russia Time Zone 3", L"RU", L"Europe/Samara" },
+ { L"Russian Standard Time", L"", L"Europe/Moscow" },
+ { L"Russian Standard Time", L"RU", L"Europe/Moscow Europe/Simferopol Europe/Volgograd" },
+ { L"SA Eastern Standard Time", L"", L"America/Cayenne" },
+ { L"SA Eastern Standard Time", L"AQ", L"Antarctica/Rothera" },
+ { L"SA Eastern Standard Time", L"BR", L"America/Fortaleza America/Araguaina America/Belem America/Maceio America/Recife America/Santarem" },
+ { L"SA Eastern Standard Time", L"FK", L"Atlantic/Stanley" },
+ { L"SA Eastern Standard Time", L"GF", L"America/Cayenne" },
+ { L"SA Eastern Standard Time", L"SR", L"America/Paramaribo" },
+ { L"SA Eastern Standard Time", L"ZZ", L"Etc/GMT+3" },
+ { L"SA Pacific Standard Time", L"", L"America/Bogota" },
+ { L"SA Pacific Standard Time", L"BR", L"America/Rio_Branco America/Eirunepe" },
+ { L"SA Pacific Standard Time", L"CA", L"America/Coral_Harbour" },
+ { L"SA Pacific Standard Time", L"CO", L"America/Bogota" },
+ { L"SA Pacific Standard Time", L"EC", L"America/Guayaquil" },
+ { L"SA Pacific Standard Time", L"HT", L"America/Port-au-Prince" },
+ { L"SA Pacific Standard Time", L"JM", L"America/Jamaica" },
+ { L"SA Pacific Standard Time", L"KY", L"America/Cayman" },
+ { L"SA Pacific Standard Time", L"PA", L"America/Panama" },
+ { L"SA Pacific Standard Time", L"PE", L"America/Lima" },
+ { L"SA Pacific Standard Time", L"ZZ", L"Etc/GMT+5" },
+ { L"SA Western Standard Time", L"", L"America/La_Paz" },
+ { L"SA Western Standard Time", L"AG", L"America/Antigua" },
+ { L"SA Western Standard Time", L"AI", L"America/Anguilla" },
+ { L"SA Western Standard Time", L"AW", L"America/Aruba" },
+ { L"SA Western Standard Time", L"BB", L"America/Barbados" },
+ { L"SA Western Standard Time", L"BL", L"America/St_Barthelemy" },
+ { L"SA Western Standard Time", L"BO", L"America/La_Paz" },
+ { L"SA Western Standard Time", L"BQ", L"America/Kralendijk" },
+ { L"SA Western Standard Time", L"BR", L"America/Manaus America/Boa_Vista America/Porto_Velho" },
+ { L"SA Western Standard Time", L"CA", L"America/Blanc-Sablon" },
+ { L"SA Western Standard Time", L"CW", L"America/Curacao" },
+ { L"SA Western Standard Time", L"DM", L"America/Dominica" },
+ { L"SA Western Standard Time", L"DO", L"America/Santo_Domingo" },
+ { L"SA Western Standard Time", L"GD", L"America/Grenada" },
+ { L"SA Western Standard Time", L"GP", L"America/Guadeloupe" },
+ { L"SA Western Standard Time", L"GY", L"America/Guyana" },
+ { L"SA Western Standard Time", L"KN", L"America/St_Kitts" },
+ { L"SA Western Standard Time", L"LC", L"America/St_Lucia" },
+ { L"SA Western Standard Time", L"MF", L"America/Marigot" },
+ { L"SA Western Standard Time", L"MQ", L"America/Martinique" },
+ { L"SA Western Standard Time", L"MS", L"America/Montserrat" },
+ { L"SA Western Standard Time", L"PR", L"America/Puerto_Rico" },
+ { L"SA Western Standard Time", L"SX", L"America/Lower_Princes" },
+ { L"SA Western Standard Time", L"TC", L"America/Grand_Turk" },
+ { L"SA Western Standard Time", L"TT", L"America/Port_of_Spain" },
+ { L"SA Western Standard Time", L"VC", L"America/St_Vincent" },
+ { L"SA Western Standard Time", L"VG", L"America/Tortola" },
+ { L"SA Western Standard Time", L"VI", L"America/St_Thomas" },
+ { L"SA Western Standard Time", L"ZZ", L"Etc/GMT+4" },
+ { L"SE Asia Standard Time", L"", L"Asia/Bangkok" },
+ { L"SE Asia Standard Time", L"AQ", L"Antarctica/Davis" },
+ { L"SE Asia Standard Time", L"CX", L"Indian/Christmas" },
+ { L"SE Asia Standard Time", L"ID", L"Asia/Jakarta Asia/Pontianak" },
+ { L"SE Asia Standard Time", L"KH", L"Asia/Phnom_Penh" },
+ { L"SE Asia Standard Time", L"LA", L"Asia/Vientiane" },
+ { L"SE Asia Standard Time", L"MN", L"Asia/Hovd" },
+ { L"SE Asia Standard Time", L"TH", L"Asia/Bangkok" },
+ { L"SE Asia Standard Time", L"VN", L"Asia/Saigon" },
+ { L"SE Asia Standard Time", L"ZZ", L"Etc/GMT-7" },
+ { L"Samoa Standard Time", L"", L"Pacific/Apia" },
+ { L"Samoa Standard Time", L"WS", L"Pacific/Apia" },
+ { L"Singapore Standard Time", L"", L"Asia/Singapore" },
+ { L"Singapore Standard Time", L"BN", L"Asia/Brunei" },
+ { L"Singapore Standard Time", L"ID", L"Asia/Makassar" },
+ { L"Singapore Standard Time", L"MY", L"Asia/Kuala_Lumpur Asia/Kuching" },
+ { L"Singapore Standard Time", L"PH", L"Asia/Manila" },
+ { L"Singapore Standard Time", L"SG", L"Asia/Singapore" },
+ { L"Singapore Standard Time", L"ZZ", L"Etc/GMT-8" },
+ { L"South Africa Standard Time", L"", L"Africa/Johannesburg" },
+ { L"South Africa Standard Time", L"BI", L"Africa/Bujumbura" },
+ { L"South Africa Standard Time", L"BW", L"Africa/Gaborone" },
+ { L"South Africa Standard Time", L"CD", L"Africa/Lubumbashi" },
+ { L"South Africa Standard Time", L"LS", L"Africa/Maseru" },
+ { L"South Africa Standard Time", L"LY", L"Africa/Tripoli" },
+ { L"South Africa Standard Time", L"MW", L"Africa/Blantyre" },
+ { L"South Africa Standard Time", L"MZ", L"Africa/Maputo" },
+ { L"South Africa Standard Time", L"RW", L"Africa/Kigali" },
+ { L"South Africa Standard Time", L"SZ", L"Africa/Mbabane" },
+ { L"South Africa Standard Time", L"ZA", L"Africa/Johannesburg" },
+ { L"South Africa Standard Time", L"ZM", L"Africa/Lusaka" },
+ { L"South Africa Standard Time", L"ZW", L"Africa/Harare" },
+ { L"South Africa Standard Time", L"ZZ", L"Etc/GMT-2" },
+ { L"Sri Lanka Standard Time", L"", L"Asia/Colombo" },
+ { L"Sri Lanka Standard Time", L"LK", L"Asia/Colombo" },
+ { L"Syria Standard Time", L"", L"Asia/Damascus" },
+ { L"Syria Standard Time", L"SY", L"Asia/Damascus" },
+ { L"Taipei Standard Time", L"", L"Asia/Taipei" },
+ { L"Taipei Standard Time", L"TW", L"Asia/Taipei" },
+ { L"Tasmania Standard Time", L"", L"Australia/Hobart" },
+ { L"Tasmania Standard Time", L"AU", L"Australia/Hobart Australia/Currie" },
+ { L"Tokyo Standard Time", L"", L"Asia/Tokyo" },
+ { L"Tokyo Standard Time", L"ID", L"Asia/Jayapura" },
+ { L"Tokyo Standard Time", L"JP", L"Asia/Tokyo" },
+ { L"Tokyo Standard Time", L"PW", L"Pacific/Palau" },
+ { L"Tokyo Standard Time", L"TL", L"Asia/Dili" },
+ { L"Tokyo Standard Time", L"ZZ", L"Etc/GMT-9" },
+ { L"Tonga Standard Time", L"", L"Pacific/Tongatapu" },
+ { L"Tonga Standard Time", L"KI", L"Pacific/Enderbury" },
+ { L"Tonga Standard Time", L"TK", L"Pacific/Fakaofo" },
+ { L"Tonga Standard Time", L"TO", L"Pacific/Tongatapu" },
+ { L"Tonga Standard Time", L"ZZ", L"Etc/GMT-13" },
+ { L"Turkey Standard Time", L"", L"Europe/Istanbul" },
+ { L"Turkey Standard Time", L"TR", L"Europe/Istanbul" },
+ { L"US Eastern Standard Time", L"", L"America/Indianapolis" },
+ { L"US Eastern Standard Time", L"US", L"America/Indianapolis America/Indiana/Marengo America/Indiana/Vevay" },
+ { L"US Mountain Standard Time", L"", L"America/Phoenix" },
+ { L"US Mountain Standard Time", L"CA", L"America/Dawson_Creek America/Creston" },
+ { L"US Mountain Standard Time", L"MX", L"America/Hermosillo" },
+ { L"US Mountain Standard Time", L"US", L"America/Phoenix" },
+ { L"US Mountain Standard Time", L"ZZ", L"Etc/GMT+7" },
+ { L"UTC", L"", L"Etc/GMT" },
+ { L"UTC", L"GL", L"America/Danmarkshavn" },
+ { L"UTC", L"ZZ", L"Etc/GMT" },
+ { L"UTC-02", L"", L"Etc/GMT+2" },
+ { L"UTC-02", L"BR", L"America/Noronha" },
+ { L"UTC-02", L"GS", L"Atlantic/South_Georgia" },
+ { L"UTC-02", L"ZZ", L"Etc/GMT+2" },
+ { L"UTC-11", L"", L"Etc/GMT+11" },
+ { L"UTC-11", L"AS", L"Pacific/Pago_Pago" },
+ { L"UTC-11", L"NU", L"Pacific/Niue" },
+ { L"UTC-11", L"UM", L"Pacific/Midway" },
+ { L"UTC-11", L"ZZ", L"Etc/GMT+11" },
+ { L"UTC+12", L"", L"Etc/GMT-12" },
+ { L"UTC+12", L"KI", L"Pacific/Tarawa" },
+ { L"UTC+12", L"MH", L"Pacific/Majuro Pacific/Kwajalein" },
+ { L"UTC+12", L"NR", L"Pacific/Nauru" },
+ { L"UTC+12", L"TV", L"Pacific/Funafuti" },
+ { L"UTC+12", L"UM", L"Pacific/Wake" },
+ { L"UTC+12", L"WF", L"Pacific/Wallis" },
+ { L"UTC+12", L"ZZ", L"Etc/GMT-12" },
+ { L"Ulaanbaatar Standard Time", L"", L"Asia/Ulaanbaatar" },
+ { L"Ulaanbaatar Standard Time", L"MN", L"Asia/Ulaanbaatar Asia/Choibalsan" },
+ { L"Venezuela Standard Time", L"", L"America/Caracas" },
+ { L"Venezuela Standard Time", L"VE", L"America/Caracas" },
+ { L"Vladivostok Standard Time", L"", L"Asia/Vladivostok" },
+ { L"Vladivostok Standard Time", L"RU", L"Asia/Vladivostok Asia/Sakhalin Asia/Ust-Nera" },
+ { L"W. Australia Standard Time", L"", L"Australia/Perth" },
+ { L"W. Australia Standard Time", L"AQ", L"Antarctica/Casey" },
+ { L"W. Australia Standard Time", L"AU", L"Australia/Perth" },
+ { L"W. Central Africa Standard Time", L"", L"Africa/Lagos" },
+ { L"W. Central Africa Standard Time", L"AO", L"Africa/Luanda" },
+ { L"W. Central Africa Standard Time", L"BJ", L"Africa/Porto-Novo" },
+ { L"W. Central Africa Standard Time", L"CD", L"Africa/Kinshasa" },
+ { L"W. Central Africa Standard Time", L"CF", L"Africa/Bangui" },
+ { L"W. Central Africa Standard Time", L"CG", L"Africa/Brazzaville" },
+ { L"W. Central Africa Standard Time", L"CM", L"Africa/Douala" },
+ { L"W. Central Africa Standard Time", L"DZ", L"Africa/Algiers" },
+ { L"W. Central Africa Standard Time", L"GA", L"Africa/Libreville" },
+ { L"W. Central Africa Standard Time", L"GQ", L"Africa/Malabo" },
+ { L"W. Central Africa Standard Time", L"NE", L"Africa/Niamey" },
+ { L"W. Central Africa Standard Time", L"NG", L"Africa/Lagos" },
+ { L"W. Central Africa Standard Time", L"TD", L"Africa/Ndjamena" },
+ { L"W. Central Africa Standard Time", L"TN", L"Africa/Tunis" },
+ { L"W. Central Africa Standard Time", L"ZZ", L"Etc/GMT-1" },
+ { L"W. Europe Standard Time", L"", L"Europe/Berlin" },
+ { L"W. Europe Standard Time", L"AD", L"Europe/Andorra" },
+ { L"W. Europe Standard Time", L"AT", L"Europe/Vienna" },
+ { L"W. Europe Standard Time", L"CH", L"Europe/Zurich" },
+ { L"W. Europe Standard Time", L"DE", L"Europe/Berlin Europe/Busingen" },
+ { L"W. Europe Standard Time", L"GI", L"Europe/Gibraltar" },
+ { L"W. Europe Standard Time", L"IT", L"Europe/Rome" },
+ { L"W. Europe Standard Time", L"LI", L"Europe/Vaduz" },
+ { L"W. Europe Standard Time", L"LU", L"Europe/Luxembourg" },
+ { L"W. Europe Standard Time", L"MC", L"Europe/Monaco" },
+ { L"W. Europe Standard Time", L"MT", L"Europe/Malta" },
+ { L"W. Europe Standard Time", L"NL", L"Europe/Amsterdam" },
+ { L"W. Europe Standard Time", L"NO", L"Europe/Oslo" },
+ { L"W. Europe Standard Time", L"SE", L"Europe/Stockholm" },
+ { L"W. Europe Standard Time", L"SJ", L"Arctic/Longyearbyen" },
+ { L"W. Europe Standard Time", L"SM", L"Europe/San_Marino" },
+ { L"W. Europe Standard Time", L"VA", L"Europe/Vatican" },
+ { L"West Asia Standard Time", L"", L"Asia/Tashkent" },
+ { L"West Asia Standard Time", L"AQ", L"Antarctica/Mawson" },
+ { L"West Asia Standard Time", L"KZ", L"Asia/Oral Asia/Aqtau Asia/Aqtobe" },
+ { L"West Asia Standard Time", L"MV", L"Indian/Maldives" },
+ { L"West Asia Standard Time", L"TF", L"Indian/Kerguelen" },
+ { L"West Asia Standard Time", L"TJ", L"Asia/Dushanbe" },
+ { L"West Asia Standard Time", L"TM", L"Asia/Ashgabat" },
+ { L"West Asia Standard Time", L"UZ", L"Asia/Tashkent Asia/Samarkand" },
+ { L"West Asia Standard Time", L"ZZ", L"Etc/GMT-5" },
+ { L"West Pacific Standard Time", L"", L"Pacific/Port_Moresby" },
+ { L"West Pacific Standard Time", L"AQ", L"Antarctica/DumontDUrville" },
+ { L"West Pacific Standard Time", L"FM", L"Pacific/Truk" },
+ { L"West Pacific Standard Time", L"GU", L"Pacific/Guam" },
+ { L"West Pacific Standard Time", L"MP", L"Pacific/Saipan" },
+ { L"West Pacific Standard Time", L"PG", L"Pacific/Port_Moresby" },
+ { L"West Pacific Standard Time", L"ZZ", L"Etc/GMT-10" },
+ { L"Yakutsk Standard Time", L"", L"Asia/Yakutsk" },
+ { L"Yakutsk Standard Time", L"RU", L"Asia/Yakutsk Asia/Khandyga" },
+};
diff --git a/winsup/utils/tzset.c b/winsup/utils/tzset.c
index 45f3f1655..02ac5f3f2 100644
--- a/winsup/utils/tzset.c
+++ b/winsup/utils/tzset.c
@@ -1,7 +1,5 @@
/* tzset.c: Convert current Windows timezone to POSIX timezone information.
- Copyright 2012, 2013 Red Hat, Inc.
-
This file is part of Cygwin.
This software is a copyrighted work licensed under the terms of the
@@ -21,475 +19,10 @@ details. */
#define GEOID_NOT_AVAILABLE -1
#endif
-/* This table maps Windows timezone keynames and countries per ISO 3166-1 to
- POSIX-compatible timezone IDs. The information is taken from
- http://unicode.org/repos/cldr-tmp/trunk/diff/supplemental/zone_tzid.html
-
- The mapping from unicode.org is just a bit incomplete. It doesn't contain
- a few timezones available on Windows XP, namely:
-
- Armenian Standard Time
- Mexico Standard Time
- Mexico Standard Time 2
-
- as well as the still (Windows 7) available
-
- Mid-Atlantic Standard Time
-
- It also doesn't contain some of the deprecated country codes used in older
- OSes, namely:
-
- SP (Serbian, proposed) used in XP
- CS (Serbian and Montenegro, dissolved, now RS and ME) used in Vista
-
- While these are apparently old, they are required here to get a complete
- mapping on all supported OSes. */
-struct
-{
- PCWSTR win_tzkey;
- PCWSTR country;
- PCWSTR posix_tzid;
-} tzmap[] =
-{
- { L"AUS Central Standard Time", L"", L"Australia/Darwin" },
- { L"AUS Central Standard Time", L"AU", L"Australia/Darwin" },
- { L"AUS Eastern Standard Time", L"", L"Australia/Sydney" },
- { L"AUS Eastern Standard Time", L"AU", L"Australia/Sydney Australia/Melbourne" },
- { L"Afghanistan Standard Time", L"", L"Asia/Kabul" },
- { L"Afghanistan Standard Time", L"AF", L"Asia/Kabul" },
- { L"Alaskan Standard Time", L"", L"America/Anchorage" },
- { L"Alaskan Standard Time", L"US", L"America/Anchorage America/Juneau America/Nome America/Sitka America/Yakutat" },
- { L"Arab Standard Time", L"", L"Asia/Riyadh" },
- { L"Arab Standard Time", L"BH", L"Asia/Bahrain" },
- { L"Arab Standard Time", L"KW", L"Asia/Kuwait" },
- { L"Arab Standard Time", L"QA", L"Asia/Qatar" },
- { L"Arab Standard Time", L"SA", L"Asia/Riyadh" },
- { L"Arab Standard Time", L"YE", L"Asia/Aden" },
- { L"Arabian Standard Time", L"", L"Asia/Dubai" },
- { L"Arabian Standard Time", L"AE", L"Asia/Dubai" },
- { L"Arabian Standard Time", L"OM", L"Asia/Muscat" },
- { L"Arabian Standard Time", L"ZZ", L"Etc/GMT-4" },
- { L"Arabic Standard Time", L"", L"Asia/Baghdad" },
- { L"Arabic Standard Time", L"IQ", L"Asia/Baghdad" },
- { L"Argentina Standard Time", L"", L"America/Buenos_Aires" },
- { L"Argentina Standard Time", L"AR", L"America/Buenos_Aires America/Argentina/La_Rioja America/Argentina/Rio_Gallegos America/Argentina/Salta America/Argentina/San_Juan America/Argentina/San_Luis America/Argentina/Tucuman America/Argentina/Ushuaia America/Catamarca America/Cordoba America/Jujuy America/Mendoza" },
- { L"Armenian Standard Time", L"AM", L"Asia/Yerevan" },
- { L"Atlantic Standard Time", L"", L"America/Halifax" },
- { L"Atlantic Standard Time", L"BM", L"Atlantic/Bermuda" },
- { L"Atlantic Standard Time", L"CA", L"America/Halifax America/Glace_Bay America/Goose_Bay America/Moncton" },
- { L"Atlantic Standard Time", L"GL", L"America/Thule" },
- { L"Azerbaijan Standard Time", L"", L"Asia/Baku" },
- { L"Azerbaijan Standard Time", L"AZ", L"Asia/Baku" },
- { L"Azores Standard Time", L"", L"Atlantic/Azores" },
- { L"Azores Standard Time", L"GL", L"America/Scoresbysund" },
- { L"Azores Standard Time", L"PT", L"Atlantic/Azores" },
- { L"Bahia Standard Time", L"", L"America/Bahia" },
- { L"Bahia Standard Time", L"BR", L"America/Bahia" },
- { L"Bangladesh Standard Time", L"", L"Asia/Dhaka" },
- { L"Bangladesh Standard Time", L"BD", L"Asia/Dhaka" },
- { L"Bangladesh Standard Time", L"BT", L"Asia/Thimphu" },
- { L"Canada Central Standard Time", L"", L"America/Regina" },
- { L"Canada Central Standard Time", L"CA", L"America/Regina America/Swift_Current" },
- { L"Cape Verde Standard Time", L"", L"Atlantic/Cape_Verde" },
- { L"Cape Verde Standard Time", L"CV", L"Atlantic/Cape_Verde" },
- { L"Cape Verde Standard Time", L"ZZ", L"Etc/GMT+1" },
- { L"Caucasus Standard Time", L"", L"Asia/Yerevan" },
- { L"Caucasus Standard Time", L"AM", L"Asia/Yerevan" },
- { L"Cen. Australia Standard Time", L"", L"Australia/Adelaide" },
- { L"Cen. Australia Standard Time", L"AU", L"Australia/Adelaide Australia/Broken_Hill" },
- { L"Central America Standard Time", L"", L"America/Guatemala" },
- { L"Central America Standard Time", L"BZ", L"America/Belize" },
- { L"Central America Standard Time", L"CR", L"America/Costa_Rica" },
- { L"Central America Standard Time", L"EC", L"Pacific/Galapagos" },
- { L"Central America Standard Time", L"GT", L"America/Guatemala" },
- { L"Central America Standard Time", L"HN", L"America/Tegucigalpa" },
- { L"Central America Standard Time", L"NI", L"America/Managua" },
- { L"Central America Standard Time", L"SV", L"America/El_Salvador" },
- { L"Central America Standard Time", L"ZZ", L"Etc/GMT+6" },
- { L"Central Asia Standard Time", L"", L"Asia/Almaty" },
- { L"Central Asia Standard Time", L"AQ", L"Antarctica/Vostok" },
- { L"Central Asia Standard Time", L"IO", L"Indian/Chagos" },
- { L"Central Asia Standard Time", L"KG", L"Asia/Bishkek" },
- { L"Central Asia Standard Time", L"KZ", L"Asia/Almaty Asia/Qyzylorda" },
- { L"Central Asia Standard Time", L"ZZ", L"Etc/GMT-6" },
- { L"Central Brazilian Standard Time", L"", L"America/Cuiaba" },
- { L"Central Brazilian Standard Time", L"BR", L"America/Cuiaba America/Campo_Grande" },
- { L"Central Europe Standard Time", L"", L"Europe/Budapest" },
- { L"Central Europe Standard Time", L"AL", L"Europe/Tirane" },
- { L"Central Europe Standard Time", L"CS", L"Europe/Belgrade" },
- { L"Central Europe Standard Time", L"CZ", L"Europe/Prague" },
- { L"Central Europe Standard Time", L"HU", L"Europe/Budapest" },
- { L"Central Europe Standard Time", L"ME", L"Europe/Podgorica" },
- { L"Central Europe Standard Time", L"RS", L"Europe/Belgrade" },
- { L"Central Europe Standard Time", L"SI", L"Europe/Ljubljana" },
- { L"Central Europe Standard Time", L"SK", L"Europe/Bratislava" },
- { L"Central Europe Standard Time", L"SP", L"Europe/Belgrade" },
- { L"Central European Standard Time", L"", L"Europe/Warsaw" },
- { L"Central European Standard Time", L"BA", L"Europe/Sarajevo" },
- { L"Central European Standard Time", L"HR", L"Europe/Zagreb" },
- { L"Central European Standard Time", L"MK", L"Europe/Skopje" },
- { L"Central European Standard Time", L"PL", L"Europe/Warsaw" },
- { L"Central Pacific Standard Time", L"", L"Pacific/Guadalcanal" },
- { L"Central Pacific Standard Time", L"AQ", L"Antarctica/Macquarie" },
- { L"Central Pacific Standard Time", L"FM", L"Pacific/Ponape Pacific/Kosrae" },
- { L"Central Pacific Standard Time", L"NC", L"Pacific/Noumea" },
- { L"Central Pacific Standard Time", L"SB", L"Pacific/Guadalcanal" },
- { L"Central Pacific Standard Time", L"VU", L"Pacific/Efate" },
- { L"Central Pacific Standard Time", L"ZZ", L"Etc/GMT-11" },
- { L"Central Standard Time", L"", L"America/Chicago" },
- { L"Central Standard Time", L"CA", L"America/Winnipeg America/Rainy_River America/Rankin_Inlet America/Resolute" },
- { L"Central Standard Time", L"MX", L"America/Matamoros" },
- { L"Central Standard Time", L"US", L"America/Chicago America/Indiana/Knox America/Indiana/Tell_City America/Menominee America/North_Dakota/Beulah America/North_Dakota/Center America/North_Dakota/New_Salem" },
- { L"Central Standard Time", L"ZZ", L"CST6CDT" },
- { L"Central Standard Time (Mexico)", L"", L"America/Mexico_City" },
- { L"Central Standard Time (Mexico)", L"MX", L"America/Mexico_City America/Bahia_Banderas America/Cancun America/Merida America/Monterrey" },
- { L"China Standard Time", L"", L"Asia/Shanghai" },
- { L"China Standard Time", L"CN", L"Asia/Shanghai Asia/Chongqing Asia/Harbin Asia/Kashgar Asia/Urumqi" },
- { L"China Standard Time", L"HK", L"Asia/Hong_Kong" },
- { L"China Standard Time", L"MO", L"Asia/Macau" },
- { L"Dateline Standard Time", L"", L"Etc/GMT+12" },
- { L"Dateline Standard Time", L"ZZ", L"Etc/GMT+12" },
- { L"E. Africa Standard Time", L"", L"Africa/Nairobi" },
- { L"E. Africa Standard Time", L"AQ", L"Antarctica/Syowa" },
- { L"E. Africa Standard Time", L"DJ", L"Africa/Djibouti" },
- { L"E. Africa Standard Time", L"ER", L"Africa/Asmera" },
- { L"E. Africa Standard Time", L"ET", L"Africa/Addis_Ababa" },
- { L"E. Africa Standard Time", L"KE", L"Africa/Nairobi" },
- { L"E. Africa Standard Time", L"KM", L"Indian/Comoro" },
- { L"E. Africa Standard Time", L"MG", L"Indian/Antananarivo" },
- { L"E. Africa Standard Time", L"SD", L"Africa/Khartoum" },
- { L"E. Africa Standard Time", L"SO", L"Africa/Mogadishu" },
- { L"E. Africa Standard Time", L"SS", L"Africa/Juba" },
- { L"E. Africa Standard Time", L"TZ", L"Africa/Dar_es_Salaam" },
- { L"E. Africa Standard Time", L"UG", L"Africa/Kampala" },
- { L"E. Africa Standard Time", L"YT", L"Indian/Mayotte" },
- { L"E. Africa Standard Time", L"ZZ", L"Etc/GMT-3" },
- { L"E. Australia Standard Time", L"", L"Australia/Brisbane" },
- { L"E. Australia Standard Time", L"AU", L"Australia/Brisbane Australia/Lindeman" },
- { L"E. Europe Standard Time", L"", L"Asia/Nicosia" },
- { L"E. Europe Standard Time", L"CY", L"Asia/Nicosia" },
- { L"E. South America Standard Time", L"", L"America/Sao_Paulo" },
- { L"E. South America Standard Time", L"BR", L"America/Sao_Paulo" },
- { L"Eastern Standard Time", L"", L"America/New_York" },
- { L"Eastern Standard Time", L"BS", L"America/Nassau" },
- { L"Eastern Standard Time", L"CA", L"America/Toronto America/Iqaluit America/Montreal America/Nipigon America/Pangnirtung America/Thunder_Bay" },
- { L"Eastern Standard Time", L"TC", L"America/Grand_Turk" },
- { L"Eastern Standard Time", L"US", L"America/New_York America/Detroit America/Indiana/Petersburg America/Indiana/Vincennes America/Indiana/Winamac America/Kentucky/Monticello America/Louisville" },
- { L"Eastern Standard Time", L"ZZ", L"EST5EDT" },
- { L"Egypt Standard Time", L"", L"Africa/Cairo" },
- { L"Egypt Standard Time", L"EG", L"Africa/Cairo" },
- { L"Egypt Standard Time", L"PS", L"Asia/Gaza Asia/Hebron" },
- { L"Ekaterinburg Standard Time", L"", L"Asia/Yekaterinburg" },
- { L"Ekaterinburg Standard Time", L"RU", L"Asia/Yekaterinburg" },
- { L"FLE Standard Time", L"", L"Europe/Kiev" },
- { L"FLE Standard Time", L"AX", L"Europe/Mariehamn" },
- { L"FLE Standard Time", L"BG", L"Europe/Sofia" },
- { L"FLE Standard Time", L"EE", L"Europe/Tallinn" },
- { L"FLE Standard Time", L"FI", L"Europe/Helsinki" },
- { L"FLE Standard Time", L"LT", L"Europe/Vilnius" },
- { L"FLE Standard Time", L"LV", L"Europe/Riga" },
- { L"FLE Standard Time", L"UA", L"Europe/Kiev Europe/Simferopol Europe/Uzhgorod Europe/Zaporozhye" },
- { L"Fiji Standard Time", L"", L"Pacific/Fiji" },
- { L"Fiji Standard Time", L"FJ", L"Pacific/Fiji" },
- { L"GMT Standard Time", L"", L"Europe/London" },
- { L"GMT Standard Time", L"ES", L"Atlantic/Canary" },
- { L"GMT Standard Time", L"FO", L"Atlantic/Faeroe" },
- { L"GMT Standard Time", L"GB", L"Europe/London" },
- { L"GMT Standard Time", L"GG", L"Europe/Guernsey" },
- { L"GMT Standard Time", L"IE", L"Europe/Dublin" },
- { L"GMT Standard Time", L"IM", L"Europe/Isle_of_Man" },
- { L"GMT Standard Time", L"JE", L"Europe/Jersey" },
- { L"GMT Standard Time", L"PT", L"Europe/Lisbon Atlantic/Madeira" },
- { L"GTB Standard Time", L"", L"Europe/Bucharest" },
- { L"GTB Standard Time", L"GR", L"Europe/Athens" },
- { L"GTB Standard Time", L"MD", L"Europe/Chisinau" },
- { L"GTB Standard Time", L"RO", L"Europe/Bucharest" },
- { L"Georgian Standard Time", L"", L"Asia/Tbilisi" },
- { L"Georgian Standard Time", L"GE", L"Asia/Tbilisi" },
- { L"Greenland Standard Time", L"", L"America/Godthab" },
- { L"Greenland Standard Time", L"GL", L"America/Godthab" },
- { L"Greenwich Standard Time", L"", L"Atlantic/Reykjavik" },
- { L"Greenwich Standard Time", L"BF", L"Africa/Ouagadougou" },
- { L"Greenwich Standard Time", L"CI", L"Africa/Abidjan" },
- { L"Greenwich Standard Time", L"EH", L"Africa/El_Aaiun" },
- { L"Greenwich Standard Time", L"GH", L"Africa/Accra" },
- { L"Greenwich Standard Time", L"GM", L"Africa/Banjul" },
- { L"Greenwich Standard Time", L"GN", L"Africa/Conakry" },
- { L"Greenwich Standard Time", L"GW", L"Africa/Bissau" },
- { L"Greenwich Standard Time", L"IS", L"Atlantic/Reykjavik" },
- { L"Greenwich Standard Time", L"LR", L"Africa/Monrovia" },
- { L"Greenwich Standard Time", L"ML", L"Africa/Bamako" },
- { L"Greenwich Standard Time", L"MR", L"Africa/Nouakchott" },
- { L"Greenwich Standard Time", L"SH", L"Atlantic/St_Helena" },
- { L"Greenwich Standard Time", L"SL", L"Africa/Freetown" },
- { L"Greenwich Standard Time", L"SN", L"Africa/Dakar" },
- { L"Greenwich Standard Time", L"ST", L"Africa/Sao_Tome" },
- { L"Greenwich Standard Time", L"TG", L"Africa/Lome" },
- { L"Hawaiian Standard Time", L"", L"Pacific/Honolulu" },
- { L"Hawaiian Standard Time", L"CK", L"Pacific/Rarotonga" },
- { L"Hawaiian Standard Time", L"PF", L"Pacific/Tahiti" },
- { L"Hawaiian Standard Time", L"TK", L"Pacific/Fakaofo" },
- { L"Hawaiian Standard Time", L"UM", L"Pacific/Johnston" },
- { L"Hawaiian Standard Time", L"US", L"Pacific/Honolulu" },
- { L"Hawaiian Standard Time", L"ZZ", L"Etc/GMT+10" },
- { L"India Standard Time", L"", L"Asia/Calcutta" },
- { L"India Standard Time", L"IN", L"Asia/Calcutta" },
- { L"Iran Standard Time", L"", L"Asia/Tehran" },
- { L"Iran Standard Time", L"IR", L"Asia/Tehran" },
- { L"Israel Standard Time", L"", L"Asia/Jerusalem" },
- { L"Israel Standard Time", L"IL", L"Asia/Jerusalem" },
- { L"Jordan Standard Time", L"", L"Asia/Amman" },
- { L"Jordan Standard Time", L"JO", L"Asia/Amman" },
- { L"Kaliningrad Standard Time", L"", L"Europe/Kaliningrad" },
- { L"Kaliningrad Standard Time", L"BY", L"Europe/Minsk" },
- { L"Kaliningrad Standard Time", L"RU", L"Europe/Kaliningrad" },
- { L"Kamchatka Standard Time", L"", L"Asia/Kamchatka" },
- { L"Korea Standard Time", L"", L"Asia/Seoul" },
- { L"Korea Standard Time", L"KP", L"Asia/Pyongyang" },
- { L"Korea Standard Time", L"KR", L"Asia/Seoul" },
- { L"Magadan Standard Time", L"", L"Asia/Magadan" },
- { L"Magadan Standard Time", L"RU", L"Asia/Magadan Asia/Anadyr Asia/Kamchatka" },
- { L"Mauritius Standard Time", L"", L"Indian/Mauritius" },
- { L"Mauritius Standard Time", L"MU", L"Indian/Mauritius" },
- { L"Mauritius Standard Time", L"RE", L"Indian/Reunion" },
- { L"Mauritius Standard Time", L"SC", L"Indian/Mahe" },
- { L"Mexico Standard Time", L"", L"America/Mexico_City" },
- { L"Mexico Standard Time 2", L"", L"America/Mazatlan" },
- { L"Mid-Atlantic Standard Time", L"", L"Atlantic/South_Georgia" },
- { L"Middle East Standard Time", L"", L"Asia/Beirut" },
- { L"Middle East Standard Time", L"LB", L"Asia/Beirut" },
- { L"Montevideo Standard Time", L"", L"America/Montevideo" },
- { L"Montevideo Standard Time", L"UY", L"America/Montevideo" },
- { L"Morocco Standard Time", L"", L"Africa/Casablanca" },
- { L"Morocco Standard Time", L"MA", L"Africa/Casablanca" },
- { L"Mountain Standard Time", L"", L"America/Denver" },
- { L"Mountain Standard Time", L"CA", L"America/Edmonton America/Cambridge_Bay America/Inuvik America/Yellowknife" },
- { L"Mountain Standard Time", L"MX", L"America/Ojinaga" },
- { L"Mountain Standard Time", L"US", L"America/Denver America/Boise America/Shiprock" },
- { L"Mountain Standard Time", L"ZZ", L"MST7MDT" },
- { L"Mountain Standard Time (Mexico)", L"", L"America/Chihuahua" },
- { L"Mountain Standard Time (Mexico)", L"MX", L"America/Chihuahua America/Mazatlan" },
- { L"Myanmar Standard Time", L"", L"Asia/Rangoon" },
- { L"Myanmar Standard Time", L"CC", L"Indian/Cocos" },
- { L"Myanmar Standard Time", L"MM", L"Asia/Rangoon" },
- { L"N. Central Asia Standard Time", L"", L"Asia/Novosibirsk" },
- { L"N. Central Asia Standard Time", L"RU", L"Asia/Novosibirsk Asia/Novokuznetsk Asia/Omsk" },
- { L"Namibia Standard Time", L"", L"Africa/Windhoek" },
- { L"Namibia Standard Time", L"NA", L"Africa/Windhoek" },
- { L"Nepal Standard Time", L"", L"Asia/Kathmandu" },
- { L"Nepal Standard Time", L"NP", L"Asia/Kathmandu" },
- { L"New Zealand Standard Time", L"", L"Pacific/Auckland" },
- { L"New Zealand Standard Time", L"AQ", L"Antarctica/South_Pole Antarctica/McMurdo" },
- { L"New Zealand Standard Time", L"NZ", L"Pacific/Auckland" },
- { L"Newfoundland Standard Time", L"", L"America/St_Johns" },
- { L"Newfoundland Standard Time", L"CA", L"America/St_Johns" },
- { L"North Asia East Standard Time", L"", L"Asia/Irkutsk" },
- { L"North Asia East Standard Time", L"RU", L"Asia/Irkutsk" },
- { L"North Asia Standard Time", L"", L"Asia/Krasnoyarsk" },
- { L"North Asia Standard Time", L"RU", L"Asia/Krasnoyarsk" },
- { L"Pacific SA Standard Time", L"", L"America/Santiago" },
- { L"Pacific SA Standard Time", L"AQ", L"Antarctica/Palmer" },
- { L"Pacific SA Standard Time", L"CL", L"America/Santiago" },
- { L"Pacific Standard Time", L"", L"America/Los_Angeles" },
- { L"Pacific Standard Time", L"CA", L"America/Vancouver America/Dawson America/Whitehorse" },
- { L"Pacific Standard Time", L"MX", L"America/Tijuana" },
- { L"Pacific Standard Time", L"US", L"America/Los_Angeles" },
- { L"Pacific Standard Time", L"ZZ", L"PST8PDT" },
- { L"Pacific Standard Time (Mexico)", L"", L"America/Santa_Isabel" },
- { L"Pacific Standard Time (Mexico)", L"MX", L"America/Santa_Isabel" },
- { L"Pakistan Standard Time", L"", L"Asia/Karachi" },
- { L"Pakistan Standard Time", L"PK", L"Asia/Karachi" },
- { L"Paraguay Standard Time", L"", L"America/Asuncion" },
- { L"Paraguay Standard Time", L"PY", L"America/Asuncion" },
- { L"Romance Standard Time", L"", L"Europe/Paris" },
- { L"Romance Standard Time", L"BE", L"Europe/Brussels" },
- { L"Romance Standard Time", L"DK", L"Europe/Copenhagen" },
- { L"Romance Standard Time", L"ES", L"Europe/Madrid Africa/Ceuta" },
- { L"Romance Standard Time", L"FR", L"Europe/Paris" },
- { L"Russian Standard Time", L"", L"Europe/Moscow" },
- { L"Russian Standard Time", L"RU", L"Europe/Moscow Europe/Samara Europe/Volgograd" },
- { L"SA Eastern Standard Time", L"", L"America/Cayenne" },
- { L"SA Eastern Standard Time", L"AQ", L"Antarctica/Rothera" },
- { L"SA Eastern Standard Time", L"BR", L"America/Fortaleza America/Araguaina America/Belem America/Maceio America/Recife America/Santarem" },
- { L"SA Eastern Standard Time", L"GF", L"America/Cayenne" },
- { L"SA Eastern Standard Time", L"SR", L"America/Paramaribo" },
- { L"SA Eastern Standard Time", L"ZZ", L"Etc/GMT+3" },
- { L"SA Pacific Standard Time", L"", L"America/Bogota" },
- { L"SA Pacific Standard Time", L"CA", L"America/Coral_Harbour" },
- { L"SA Pacific Standard Time", L"CO", L"America/Bogota" },
- { L"SA Pacific Standard Time", L"EC", L"America/Guayaquil" },
- { L"SA Pacific Standard Time", L"HT", L"America/Port-au-Prince" },
- { L"SA Pacific Standard Time", L"JM", L"America/Jamaica" },
- { L"SA Pacific Standard Time", L"KY", L"America/Cayman" },
- { L"SA Pacific Standard Time", L"PA", L"America/Panama" },
- { L"SA Pacific Standard Time", L"PE", L"America/Lima" },
- { L"SA Pacific Standard Time", L"ZZ", L"Etc/GMT+5" },
- { L"SA Western Standard Time", L"", L"America/La_Paz" },
- { L"SA Western Standard Time", L"AG", L"America/Antigua" },
- { L"SA Western Standard Time", L"AI", L"America/Anguilla" },
- { L"SA Western Standard Time", L"AW", L"America/Aruba" },
- { L"SA Western Standard Time", L"BB", L"America/Barbados" },
- { L"SA Western Standard Time", L"BL", L"America/St_Barthelemy" },
- { L"SA Western Standard Time", L"BO", L"America/La_Paz" },
- { L"SA Western Standard Time", L"BR", L"America/Manaus America/Boa_Vista America/Eirunepe America/Porto_Velho America/Rio_Branco" },
- { L"SA Western Standard Time", L"CA", L"America/Blanc-Sablon" },
- { L"SA Western Standard Time", L"CW", L"America/Curacao" },
- { L"SA Western Standard Time", L"DM", L"America/Dominica" },
- { L"SA Western Standard Time", L"DO", L"America/Santo_Domingo" },
- { L"SA Western Standard Time", L"GD", L"America/Grenada" },
- { L"SA Western Standard Time", L"GP", L"America/Guadeloupe" },
- { L"SA Western Standard Time", L"GY", L"America/Guyana" },
- { L"SA Western Standard Time", L"KN", L"America/St_Kitts" },
- { L"SA Western Standard Time", L"LC", L"America/St_Lucia" },
- { L"SA Western Standard Time", L"MF", L"America/Marigot" },
- { L"SA Western Standard Time", L"MQ", L"America/Martinique" },
- { L"SA Western Standard Time", L"MS", L"America/Montserrat" },
- { L"SA Western Standard Time", L"PR", L"America/Puerto_Rico" },
- { L"SA Western Standard Time", L"TT", L"America/Port_of_Spain" },
- { L"SA Western Standard Time", L"VC", L"America/St_Vincent" },
- { L"SA Western Standard Time", L"VG", L"America/Tortola" },
- { L"SA Western Standard Time", L"VI", L"America/St_Thomas" },
- { L"SA Western Standard Time", L"ZZ", L"Etc/GMT+4" },
- { L"SE Asia Standard Time", L"", L"Asia/Bangkok" },
- { L"SE Asia Standard Time", L"AQ", L"Antarctica/Davis" },
- { L"SE Asia Standard Time", L"CX", L"Indian/Christmas" },
- { L"SE Asia Standard Time", L"ID", L"Asia/Jakarta Asia/Pontianak" },
- { L"SE Asia Standard Time", L"KH", L"Asia/Phnom_Penh" },
- { L"SE Asia Standard Time", L"LA", L"Asia/Vientiane" },
- { L"SE Asia Standard Time", L"MN", L"Asia/Hovd" },
- { L"SE Asia Standard Time", L"TH", L"Asia/Bangkok" },
- { L"SE Asia Standard Time", L"VN", L"Asia/Saigon" },
- { L"SE Asia Standard Time", L"ZZ", L"Etc/GMT-7" },
- { L"Samoa Standard Time", L"", L"Pacific/Apia" },
- { L"Samoa Standard Time", L"WS", L"Pacific/Apia" },
- { L"Singapore Standard Time", L"", L"Asia/Singapore" },
- { L"Singapore Standard Time", L"BN", L"Asia/Brunei" },
- { L"Singapore Standard Time", L"ID", L"Asia/Makassar" },
- { L"Singapore Standard Time", L"MY", L"Asia/Kuala_Lumpur Asia/Kuching" },
- { L"Singapore Standard Time", L"PH", L"Asia/Manila" },
- { L"Singapore Standard Time", L"SG", L"Asia/Singapore" },
- { L"Singapore Standard Time", L"ZZ", L"Etc/GMT-8" },
- { L"South Africa Standard Time", L"", L"Africa/Johannesburg" },
- { L"South Africa Standard Time", L"BI", L"Africa/Bujumbura" },
- { L"South Africa Standard Time", L"BW", L"Africa/Gaborone" },
- { L"South Africa Standard Time", L"CD", L"Africa/Lubumbashi" },
- { L"South Africa Standard Time", L"LS", L"Africa/Maseru" },
- { L"South Africa Standard Time", L"LY", L"Africa/Tripoli" },
- { L"South Africa Standard Time", L"MW", L"Africa/Blantyre" },
- { L"South Africa Standard Time", L"MZ", L"Africa/Maputo" },
- { L"South Africa Standard Time", L"RW", L"Africa/Kigali" },
- { L"South Africa Standard Time", L"SZ", L"Africa/Mbabane" },
- { L"South Africa Standard Time", L"ZA", L"Africa/Johannesburg" },
- { L"South Africa Standard Time", L"ZM", L"Africa/Lusaka" },
- { L"South Africa Standard Time", L"ZW", L"Africa/Harare" },
- { L"South Africa Standard Time", L"ZZ", L"Etc/GMT-2" },
- { L"Sri Lanka Standard Time", L"", L"Asia/Colombo" },
- { L"Sri Lanka Standard Time", L"LK", L"Asia/Colombo" },
- { L"Syria Standard Time", L"", L"Asia/Damascus" },
- { L"Syria Standard Time", L"SY", L"Asia/Damascus" },
- { L"Taipei Standard Time", L"", L"Asia/Taipei" },
- { L"Taipei Standard Time", L"TW", L"Asia/Taipei" },
- { L"Tasmania Standard Time", L"", L"Australia/Hobart" },
- { L"Tasmania Standard Time", L"AU", L"Australia/Hobart Australia/Currie" },
- { L"Tokyo Standard Time", L"", L"Asia/Tokyo" },
- { L"Tokyo Standard Time", L"ID", L"Asia/Jayapura" },
- { L"Tokyo Standard Time", L"JP", L"Asia/Tokyo" },
- { L"Tokyo Standard Time", L"PW", L"Pacific/Palau" },
- { L"Tokyo Standard Time", L"TL", L"Asia/Dili" },
- { L"Tokyo Standard Time", L"ZZ", L"Etc/GMT-9" },
- { L"Tonga Standard Time", L"", L"Pacific/Tongatapu" },
- { L"Tonga Standard Time", L"KI", L"Pacific/Enderbury" },
- { L"Tonga Standard Time", L"TO", L"Pacific/Tongatapu" },
- { L"Tonga Standard Time", L"ZZ", L"Etc/GMT-13" },
- { L"Turkey Standard Time", L"", L"Europe/Istanbul" },
- { L"Turkey Standard Time", L"TR", L"Europe/Istanbul" },
- { L"US Eastern Standard Time", L"", L"America/Indianapolis" },
- { L"US Eastern Standard Time", L"US", L"America/Indianapolis America/Indiana/Marengo America/Indiana/Vevay" },
- { L"US Mountain Standard Time", L"", L"America/Phoenix" },
- { L"US Mountain Standard Time", L"CA", L"America/Dawson_Creek" },
- { L"US Mountain Standard Time", L"MX", L"America/Hermosillo" },
- { L"US Mountain Standard Time", L"US", L"America/Phoenix" },
- { L"US Mountain Standard Time", L"ZZ", L"Etc/GMT+7" },
- { L"UTC", L"", L"Etc/GMT" },
- { L"UTC", L"GL", L"America/Danmarkshavn" },
- { L"UTC", L"ZZ", L"Etc/GMT" },
- { L"UTC+12", L"", L"Etc/GMT-12" },
- { L"UTC+12", L"KI", L"Pacific/Tarawa" },
- { L"UTC+12", L"MH", L"Pacific/Majuro Pacific/Kwajalein" },
- { L"UTC+12", L"NR", L"Pacific/Nauru" },
- { L"UTC+12", L"TV", L"Pacific/Funafuti" },
- { L"UTC+12", L"UM", L"Pacific/Wake" },
- { L"UTC+12", L"WF", L"Pacific/Wallis" },
- { L"UTC+12", L"ZZ", L"Etc/GMT-12" },
- { L"UTC-02", L"", L"Etc/GMT+2" },
- { L"UTC-02", L"BR", L"America/Noronha" },
- { L"UTC-02", L"GS", L"Atlantic/South_Georgia" },
- { L"UTC-02", L"ZZ", L"Etc/GMT+2" },
- { L"UTC-11", L"", L"Etc/GMT+11" },
- { L"UTC-11", L"AS", L"Pacific/Pago_Pago" },
- { L"UTC-11", L"NU", L"Pacific/Niue" },
- { L"UTC-11", L"UM", L"Pacific/Midway" },
- { L"UTC-11", L"ZZ", L"Etc/GMT+11" },
- { L"Ulaanbaatar Standard Time", L"", L"Asia/Ulaanbaatar" },
- { L"Ulaanbaatar Standard Time", L"MN", L"Asia/Ulaanbaatar Asia/Choibalsan" },
- { L"Venezuela Standard Time", L"", L"America/Caracas" },
- { L"Venezuela Standard Time", L"VE", L"America/Caracas" },
- { L"Vladivostok Standard Time", L"", L"Asia/Vladivostok" },
- { L"Vladivostok Standard Time", L"RU", L"Asia/Vladivostok Asia/Sakhalin" },
- { L"W. Australia Standard Time", L"", L"Australia/Perth" },
- { L"W. Australia Standard Time", L"AQ", L"Antarctica/Casey" },
- { L"W. Australia Standard Time", L"AU", L"Australia/Perth" },
- { L"W. Central Africa Standard Time", L"", L"Africa/Lagos" },
- { L"W. Central Africa Standard Time", L"AO", L"Africa/Luanda" },
- { L"W. Central Africa Standard Time", L"BJ", L"Africa/Porto-Novo" },
- { L"W. Central Africa Standard Time", L"CD", L"Africa/Kinshasa" },
- { L"W. Central Africa Standard Time", L"CF", L"Africa/Bangui" },
- { L"W. Central Africa Standard Time", L"CG", L"Africa/Brazzaville" },
- { L"W. Central Africa Standard Time", L"CM", L"Africa/Douala" },
- { L"W. Central Africa Standard Time", L"DZ", L"Africa/Algiers" },
- { L"W. Central Africa Standard Time", L"GA", L"Africa/Libreville" },
- { L"W. Central Africa Standard Time", L"GQ", L"Africa/Malabo" },
- { L"W. Central Africa Standard Time", L"NE", L"Africa/Niamey" },
- { L"W. Central Africa Standard Time", L"NG", L"Africa/Lagos" },
- { L"W. Central Africa Standard Time", L"TD", L"Africa/Ndjamena" },
- { L"W. Central Africa Standard Time", L"TN", L"Africa/Tunis" },
- { L"W. Central Africa Standard Time", L"ZZ", L"Etc/GMT-1" },
- { L"W. Europe Standard Time", L"", L"Europe/Berlin" },
- { L"W. Europe Standard Time", L"AD", L"Europe/Andorra" },
- { L"W. Europe Standard Time", L"AT", L"Europe/Vienna" },
- { L"W. Europe Standard Time", L"CH", L"Europe/Zurich" },
- { L"W. Europe Standard Time", L"DE", L"Europe/Berlin" },
- { L"W. Europe Standard Time", L"GI", L"Europe/Gibraltar" },
- { L"W. Europe Standard Time", L"IT", L"Europe/Rome" },
- { L"W. Europe Standard Time", L"LI", L"Europe/Vaduz" },
- { L"W. Europe Standard Time", L"LU", L"Europe/Luxembourg" },
- { L"W. Europe Standard Time", L"MC", L"Europe/Monaco" },
- { L"W. Europe Standard Time", L"MT", L"Europe/Malta" },
- { L"W. Europe Standard Time", L"NL", L"Europe/Amsterdam" },
- { L"W. Europe Standard Time", L"NO", L"Europe/Oslo" },
- { L"W. Europe Standard Time", L"SE", L"Europe/Stockholm" },
- { L"W. Europe Standard Time", L"SJ", L"Arctic/Longyearbyen" },
- { L"W. Europe Standard Time", L"SM", L"Europe/San_Marino" },
- { L"W. Europe Standard Time", L"VA", L"Europe/Vatican" },
- { L"West Asia Standard Time", L"", L"Asia/Tashkent" },
- { L"West Asia Standard Time", L"AQ", L"Antarctica/Mawson" },
- { L"West Asia Standard Time", L"KZ", L"Asia/Oral Asia/Aqtau Asia/Aqtobe" },
- { L"West Asia Standard Time", L"MV", L"Indian/Maldives" },
- { L"West Asia Standard Time", L"TF", L"Indian/Kerguelen" },
- { L"West Asia Standard Time", L"TJ", L"Asia/Dushanbe" },
- { L"West Asia Standard Time", L"TM", L"Asia/Ashgabat" },
- { L"West Asia Standard Time", L"UZ", L"Asia/Tashkent Asia/Samarkand" },
- { L"West Asia Standard Time", L"ZZ", L"Etc/GMT-5" },
- { L"West Pacific Standard Time", L"", L"Pacific/Port_Moresby" },
- { L"West Pacific Standard Time", L"AQ", L"Antarctica/DumontDUrville" },
- { L"West Pacific Standard Time", L"FM", L"Pacific/Truk" },
- { L"West Pacific Standard Time", L"GU", L"Pacific/Guam" },
- { L"West Pacific Standard Time", L"MP", L"Pacific/Saipan" },
- { L"West Pacific Standard Time", L"PG", L"Pacific/Port_Moresby" },
- { L"West Pacific Standard Time", L"ZZ", L"Etc/GMT-10" },
- { L"Yakutsk Standard Time", L"", L"Asia/Yakutsk" },
- { L"Yakutsk Standard Time", L"RU", L"Asia/Yakutsk" }
-};
+/* The auto-generated tzmap.h contains the mapping table from Windows timezone
+ and country per ISO 3166-1 to POSIX timezone. For more info, see the file
+ itself. */
+#include "tzmap.h"
#define TZMAP_SIZE (sizeof tzmap / sizeof tzmap[0])
@@ -505,10 +38,6 @@ static char opts[] = "hV";
#define REG_TZINFO L"SYSTEM\\CurrentControlSet\\Control\\TimeZoneInformation"
#define REG_TZDB L"SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\Time Zones"
-/* Not available on pre-XP */
-GEOID WINAPI (*getusergeoid)(GEOCLASS);
-int WINAPI (*getgeoinfo)(GEOID, GEOTYPE, LPWSTR, int, LANGID);
-
static inline HKEY
reg_open (HKEY pkey, PCWSTR path, const char *msg)
{
@@ -577,7 +106,7 @@ print_version ()
{
printf ("tzset (cygwin) %d.%d.%d\n"
"POSIX-timezone generator\n"
- "Copyright (C) 2012 - %s Red Hat, Inc.\n"
+ "Copyright (C) 2012 - %s Cygwin Authors\n"
"This is free software; see the source for copying conditions. There is NO\n"
"warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n",
CYGWIN_VERSION_DLL_MAJOR / 1000,
@@ -661,22 +190,13 @@ main (int argc, char **argv)
}
reg_close (hkey);
- /* Fetch addresses of Geo functions. As long as we support Windows 2000
- this is required, unfortunately. */
- getusergeoid = (GEOID (WINAPI *)())
- GetProcAddress (GetModuleHandle ("kernel32.dll"), "GetUserGeoID");
- getgeoinfo = (int (WINAPI *)(GEOID, GEOTYPE, LPWSTR, int, LANGID))
- GetProcAddress (GetModuleHandle ("kernel32.dll"), "GetGeoInfoW");
+ /* We fetch the current Geo-location of the user and convert it to an
+ ISO 3166-1 compatible nation code. */
*country = L'\0';
- /* Post-W2K we fetch the current Geo-location of the user and convert it
- to a ISO 3166-1 compatible nation code. */
- if (getusergeoid && getgeoinfo)
- {
- geo = getusergeoid (GEOCLASS_NATION);
- if (geo != GEOID_NOT_AVAILABLE)
- getgeoinfo (geo, GEO_ISO2, country, sizeof country, 0);
- }
- /* On W2K, or if the Geo-location isn't available, we use the locale
+ geo = GetUserGeoID (GEOCLASS_NATION);
+ if (geo != GEOID_NOT_AVAILABLE)
+ GetGeoInfoW (geo, GEO_ISO2, country, sizeof country, 0);
+ /* If, for some reason, the Geo-location isn't available, we use the locale
setting instead. */
if (!*country)
GetLocaleInfoW (LOCALE_USER_DEFAULT, LOCALE_SISO3166CTRYNAME,
@@ -685,11 +205,11 @@ main (int argc, char **argv)
/* Now iterate over the mapping table and find the right entry. */
for (idx = 0; idx < TZMAP_SIZE; ++idx)
{
- if (!wcscmp (keyname, tzmap[idx].win_tzkey))
+ if (!wcscasecmp (keyname, tzmap[idx].win_tzkey))
{
if (gotit < 0)
gotit = idx;
- if (!wcscmp (country, tzmap[idx].country))
+ if (!wcscasecmp (country, tzmap[idx].country))
break;
}
else if (gotit >= 0)
diff --git a/winsup/utils/umount.cc b/winsup/utils/umount.cc
index e9b1cee5f..100f36f9c 100644
--- a/winsup/utils/umount.cc
+++ b/winsup/utils/umount.cc
@@ -1,7 +1,5 @@
/* umount.cc
- Copyright 1996, 1998, 1999, 2000, 2001, 2002, 2003, 2008, 2011 Red Hat, Inc.
-
This file is part of Cygwin.
This software is a copyrighted work licensed under the terms of the
@@ -58,7 +56,7 @@ print_version ()
{
printf ("umount (cygwin) %d.%d.%d\n"
"Unmount filesystem utility\n"
- "Copyright (C) 1996 - %s Red Hat, Inc.\n"
+ "Copyright (C) 1996 - %s Cygwin Authors\n"
"This is free software; see the source for copying conditions. There is NO\n"
"warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n",
CYGWIN_VERSION_DLL_MAJOR / 1000,
diff --git a/winsup/utils/wide_path.h b/winsup/utils/wide_path.h
index 7a507c809..e4f2ac957 100644
--- a/winsup/utils/wide_path.h
+++ b/winsup/utils/wide_path.h
@@ -2,8 +2,6 @@
to wchar_t Win32 path including long path prefix if
necessary.
- Copyright 2009, 2011, 2013 Red Hat, Inc.
-
This file is part of Cygwin.
This software is a copyrighted work licensed under the terms of the
diff --git a/ylwrap b/ylwrap
index 84d563405..13fa706c3 100755
--- a/ylwrap
+++ b/ylwrap
@@ -1,10 +1,9 @@
#! /bin/sh
# ylwrap - wrapper for lex/yacc invocations.
-scriptversion=2009-04-28.21; # UTC
+scriptversion=2013-01-12.17; # UTC
-# Copyright (C) 1996, 1997, 1998, 1999, 2001, 2002, 2003, 2004, 2005,
-# 2007, 2009 Free Software Foundation, Inc.
+# Copyright (C) 1996-2014 Free Software Foundation, Inc.
#
# Written by Tom Tromey <tromey@cygnus.com>.
#
@@ -30,9 +29,41 @@ scriptversion=2009-04-28.21; # UTC
# bugs to <bug-automake@gnu.org> or send patches to
# <automake-patches@gnu.org>.
+get_dirname ()
+{
+ case $1 in
+ */*|*\\*) printf '%s\n' "$1" | sed -e 's|\([\\/]\)[^\\/]*$|\1|';;
+ # Otherwise, we want the empty string (not ".").
+ esac
+}
+
+# guard FILE
+# ----------
+# The CPP macro used to guard inclusion of FILE.
+guard ()
+{
+ printf '%s\n' "$1" \
+ | sed \
+ -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/' \
+ -e 's/[^ABCDEFGHIJKLMNOPQRSTUVWXYZ]/_/g' \
+ -e 's/__*/_/g'
+}
+
+# quote_for_sed [STRING]
+# ----------------------
+# Return STRING (or stdin) quoted to be used as a sed pattern.
+quote_for_sed ()
+{
+ case $# in
+ 0) cat;;
+ 1) printf '%s\n' "$1";;
+ esac \
+ | sed -e 's|[][\\.*]|\\&|g'
+}
+
case "$1" in
'')
- echo "$0: No files given. Try \`$0 --help' for more information." 1>&2
+ echo "$0: No files given. Try '$0 --help' for more information." 1>&2
exit 1
;;
--basedir)
@@ -65,41 +96,62 @@ esac
# The input.
-input="$1"
+input=$1
shift
-case "$input" in
+# We'll later need for a correct munging of "#line" directives.
+input_sub_rx=`get_dirname "$input" | quote_for_sed`
+case $input in
[\\/]* | ?:[\\/]*)
# Absolute path; do nothing.
;;
*)
# Relative path. Make it absolute.
- input="`pwd`/$input"
+ input=`pwd`/$input
;;
esac
+input_rx=`get_dirname "$input" | quote_for_sed`
+
+# The parser itself, the first file, is the destination of the .y.c
+# rule in the Makefile.
+parser=$1
+
+# A sed program to s/FROM/TO/g for all the FROM/TO so that, for
+# instance, we rename #include "y.tab.h" into #include "parse.h"
+# during the conversion from y.tab.c to parse.c.
+sed_fix_filenames=
+
+# Also rename header guards, as Bison 2.7 for instance uses its header
+# guard in its implementation file.
+sed_fix_header_guards=
-pairlist=
-while test "$#" -ne 0; do
- if test "$1" = "--"; then
+while test $# -ne 0; do
+ if test x"$1" = x"--"; then
shift
break
fi
- pairlist="$pairlist $1"
+ from=$1
shift
+ to=$1
+ shift
+ sed_fix_filenames="${sed_fix_filenames}s|"`quote_for_sed "$from"`"|$to|g;"
+ sed_fix_header_guards="${sed_fix_header_guards}s|"`guard "$from"`"|"`guard "$to"`"|g;"
done
# The program to run.
-prog="$1"
+prog=$1
shift
# Make any relative path in $prog absolute.
-case "$prog" in
+case $prog in
[\\/]* | ?:[\\/]*) ;;
- *[\\/]*) prog="`pwd`/$prog" ;;
+ *[\\/]*) prog=`pwd`/$prog ;;
esac
-# FIXME: add hostname here for parallel makes that run commands on
-# other machines. But that might take us over the 14-char limit.
dirname=ylwrap$$
-trap "cd '`pwd`'; rm -rf $dirname > /dev/null 2>&1" 1 2 3 15
+do_exit="cd '`pwd`' && rm -rf $dirname > /dev/null 2>&1;"' (exit $ret); exit $ret'
+trap "ret=129; $do_exit" 1
+trap "ret=130; $do_exit" 2
+trap "ret=141; $do_exit" 13
+trap "ret=143; $do_exit" 15
mkdir $dirname || exit 1
cd $dirname
@@ -111,98 +163,56 @@ esac
ret=$?
if test $ret -eq 0; then
- set X $pairlist
- shift
- first=yes
- # Since DOS filename conventions don't allow two dots,
- # the DOS version of Bison writes out y_tab.c instead of y.tab.c
- # and y_tab.h instead of y.tab.h. Test to see if this is the case.
- y_tab_nodot="no"
- if test -f y_tab.c || test -f y_tab.h; then
- y_tab_nodot="yes"
- fi
-
- # The directory holding the input.
- input_dir=`echo "$input" | sed -e 's,\([\\/]\)[^\\/]*$,\1,'`
- # Quote $INPUT_DIR so we can use it in a regexp.
- # FIXME: really we should care about more than `.' and `\'.
- input_rx=`echo "$input_dir" | sed 's,\\\\,\\\\\\\\,g;s,\\.,\\\\.,g'`
-
- while test "$#" -ne 0; do
- from="$1"
- # Handle y_tab.c and y_tab.h output by DOS
- if test $y_tab_nodot = "yes"; then
- if test $from = "y.tab.c"; then
- from="y_tab.c"
- else
- if test $from = "y.tab.h"; then
- from="y_tab.h"
- fi
- fi
- fi
+ for from in *
+ do
+ to=`printf '%s\n' "$from" | sed "$sed_fix_filenames"`
if test -f "$from"; then
# If $2 is an absolute path name, then just use that,
- # otherwise prepend `../'.
- case "$2" in
- [\\/]* | ?:[\\/]*) target="$2";;
- *) target="../$2";;
+ # otherwise prepend '../'.
+ case $to in
+ [\\/]* | ?:[\\/]*) target=$to;;
+ *) target=../$to;;
esac
- # We do not want to overwrite a header file if it hasn't
- # changed. This avoid useless recompilations. However the
- # parser itself (the first file) should always be updated,
- # because it is the destination of the .y.c rule in the
- # Makefile. Divert the output of all other files to a temporary
- # file so we can compare them to existing versions.
- if test $first = no; then
- realtarget="$target"
- target="tmp-`echo $target | sed s/.*[\\/]//g`"
+ # Do not overwrite unchanged header files to avoid useless
+ # recompilations. Always update the parser itself: it is the
+ # destination of the .y.c rule in the Makefile. Divert the
+ # output of all other files to a temporary file so we can
+ # compare them to existing versions.
+ if test $from != $parser; then
+ realtarget=$target
+ target=tmp-`printf '%s\n' "$target" | sed 's|.*[\\/]||g'`
fi
- # Edit out `#line' or `#' directives.
- #
- # We don't want the resulting debug information to point at
- # an absolute srcdir; it is better for it to just mention the
- # .y file with no path.
- #
- # We want to use the real output file name, not yy.lex.c for
- # instance.
- #
- # We want the include guards to be adjusted too.
- FROM=`echo "$from" | sed \
- -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'\
- -e 's/[^ABCDEFGHIJKLMNOPQRSTUVWXYZ]/_/g'`
- TARGET=`echo "$2" | sed \
- -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'\
- -e 's/[^ABCDEFGHIJKLMNOPQRSTUVWXYZ]/_/g'`
-
- sed -e "/^#/!b" -e "s,$input_rx,," -e "s,$from,$2," \
- -e "s,$FROM,$TARGET," "$from" >"$target" || ret=$?
-
- # Check whether header files must be updated.
- if test $first = no; then
- if test -f "$realtarget" && cmp -s "$realtarget" "$target"; then
- echo "$2" is unchanged
- rm -f "$target"
- else
- echo updating "$2"
+
+ # Munge "#line" or "#" directives. Don't let the resulting
+ # debug information point at an absolute srcdir. Use the real
+ # output file name, not yy.lex.c for instance. Adjust the
+ # include guards too.
+ sed -e "/^#/!b" \
+ -e "s|$input_rx|$input_sub_rx|" \
+ -e "$sed_fix_filenames" \
+ -e "$sed_fix_header_guards" \
+ "$from" >"$target" || ret=$?
+
+ # Check whether files must be updated.
+ if test "$from" != "$parser"; then
+ if test -f "$realtarget" && cmp -s "$realtarget" "$target"; then
+ echo "$to is unchanged"
+ rm -f "$target"
+ else
+ echo "updating $to"
mv -f "$target" "$realtarget"
fi
fi
else
- # A missing file is only an error for the first file. This
- # is a blatant hack to let us support using "yacc -d". If -d
- # is not specified, we don't want an error when the header
- # file is "missing".
- if test $first = yes; then
+ # A missing file is only an error for the parser. This is a
+ # blatant hack to let us support using "yacc -d". If -d is not
+ # specified, don't fail when the header file is "missing".
+ if test "$from" = "$parser"; then
ret=1
fi
fi
- shift
- shift
- first=no
done
-else
- ret=$?
fi
# Remove the directory.